@dcl/shop 0.8.1-31011914733.commit-0303b0f → 0.8.1-31012874824.commit-6e7ed18
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-DGqf6vtH.js → Activity-BhSSAakf.js} +9 -9
- package/_assets/{AnimatedBackground-DYvwYlNX.js → AnimatedBackground-Cvqk30FH.js} +1 -1
- package/_assets/{Assets-BIhyhEpJ.js → Assets-DLDNWHJa.js} +15 -15
- package/_assets/{Assets.styles-BEwmRTV4.js → Assets.styles-CunpLCUx.js} +15 -15
- package/_assets/{Authorizations-CgtzIHfa.js → Authorizations-Ci34CfQY.js} +1 -1
- package/_assets/{Cart-k3bkiglX.js → Cart-C8Zg4X3w.js} +2 -2
- package/_assets/{CircularProgress-B7QTjxqg.js → CircularProgress-B3Mq4EXd.js} +1 -1
- package/_assets/{Collection-CIBOTqpS.js → Collection-DdsrrXUo.js} +2 -2
- package/_assets/{CollectionCarousel-aBELR_tf.js → CollectionCarousel-CvBagdhU.js} +21 -21
- package/_assets/{Creator-DXbJoM5n.js → Creator-BTDNDhpw.js} +6 -6
- package/_assets/{ErrorNotice-8bHn1hfP.js → ErrorNotice-CFWuvsq7.js} +1 -1
- package/_assets/{ExchangeController-BV3dQlup.js → ExchangeController-R47gLlwi.js} +1 -1
- package/_assets/{Faq-DNu30-Jv.js → Faq-BB7wrUia.js} +1 -1
- package/_assets/{GetCredits-9vsaKO2k.js → GetCredits-DhuqCCIh.js} +11 -11
- package/_assets/{Grow-OxzXVVhg.js → Grow-BpYCtlsS.js} +1 -1
- package/_assets/{HelpersUtil-NjrztWi6.js → HelpersUtil-dByKF1PV.js} +1 -1
- package/_assets/{ItemDetail-tYnpUH4x.js → ItemDetail-CuwMDoJ3.js} +1 -1
- package/_assets/LazyEmoteControls-BC6c3Qgk.js +2 -0
- package/_assets/{LoadMore-CwQ5CTJq.js → LoadMore-0XzEUItO.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-Bc06axQv.js → ManaPricingBanner.styles-n6d7KU1f.js} +3 -3
- package/_assets/{MyAssets-B0Mjtokt.js → MyAssets-jS8-K2Ri.js} +1 -1
- package/_assets/{MyFavorites-Cw_mmcDj.js → MyFavorites-7O3ccE8R.js} +1 -1
- package/_assets/{NotFound-An1qy2HJ.js → NotFound-BNHEw5IG.js} +1 -1
- package/_assets/{NotificationsBell-DQLaaXFc.js → NotificationsBell-BejI2p3M.js} +1 -1
- package/_assets/{OutfitDetail-BsbdpKHB.js → OutfitDetail-H9ddywTw.js} +1 -1
- package/_assets/{OutfitPreview-zqj27b-1.js → OutfitPreview-CRdYkhV8.js} +1 -1
- package/_assets/{OutfitStudio-BF3ZInz5.js → OutfitStudio-DRmu_NHk.js} +1 -1
- package/_assets/{StoreSettings-Dsw9PcCY.js → StoreSettings-DaxmWsFV.js} +1 -1
- package/_assets/{Success-DzSr1ZKs.js → Success-Grhj4s9F.js} +1 -1
- package/_assets/{SwapController-c0ZMV7-y.js → SwapController-DVlL5HFg.js} +1 -1
- package/_assets/{Tooltip-AFYoHds5.js → Tooltip-LzdtnJQn.js} +1 -1
- package/_assets/{TradeService-K7nSBrHI.js → TradeService-DWjf73z0.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-BvhBpuKR.js → W3MFrameProviderSingleton-DVCRdKoH.js} +3 -3
- package/_assets/{WebCryptoP256-uR3swvrR.js → WebCryptoP256-BBGgWnge.js} +1 -1
- package/_assets/{authorizations-D4wI085M.js → authorizations-Iqbcv5YT.js} +1 -1
- package/_assets/{basic-BPisXakk.js → basic-CTA1PRF9.js} +1 -1
- package/_assets/{biconomy-CvHs_GN7.js → biconomy-1OUHR9WB.js} +1 -1
- package/_assets/{builder-CkJrDc5k.js → builder-ProoRnNv.js} +1 -1
- package/_assets/{buy-BeDHfPC-.js → buy-CO7pIdYC.js} +1 -1
- package/_assets/{buy-gasless-DINFD15F.js → buy-gasless-JMjDmvgb.js} +1 -1
- package/_assets/{categories-kKk2jGpz.js → categories-H_VhO6tt.js} +1 -1
- package/_assets/{ccip-74NajMIb.js → ccip-Bs42uGrP.js} +1 -1
- package/_assets/{ccip-Umb7T-xD.js → ccip-CYVALh2h.js} +1 -1
- package/_assets/{collectionPage.styles-tZrmrhPT.js → collectionPage.styles-B3z9lqjo.js} +5 -5
- package/_assets/{controller-DGdZ6Mn-.js → controller-D-9xgjhH.js} +2 -2
- package/_assets/{core-CNlDVTsP.js → core-C72hMcSR.js} +4 -4
- package/_assets/{createSvgIcon-Ce14xVZm.js → createSvgIcon-nLWiACN7.js} +1 -1
- package/_assets/{custom-Dv8Lo1kL.js → custom-D4n3dXLk.js} +1 -1
- package/_assets/{data-capture-5ClKTSe8.js → data-capture-Csp1Vm8c.js} +1 -1
- package/_assets/{email-CiIvohkt.js → email-B4RUQabT.js} +1 -1
- package/_assets/{embedded-wallet-Cv54Jked.js → embedded-wallet-Kyi3PwfG.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-BDjD0BzD.js → emotion-styled.browser.esm-DhjW1ciH.js} +1 -1
- package/_assets/{engine-BSj9q-aH.js → engine-BPK9GbPb.js} +1 -1
- package/_assets/{errors-COaDYYX2.js → errors-B4qBuIpC.js} +1 -1
- package/_assets/{estimate-l1-fee-6I-Z51za.js → estimate-l1-fee-DLhvw7Et.js} +1 -1
- package/_assets/{execute-B6hfBxSa.js → execute-3vxcbyGi.js} +2 -2
- package/_assets/{features-BJpZyJij.js → features-BR-YfuQo.js} +1 -1
- package/_assets/{fetchTokenMetadata-ARrwD89L.js → fetchTokenMetadata-DQKhLbq7.js} +2 -2
- package/_assets/{field.styles-BjYlzCrg.js → field.styles-DAoBbGhv.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-9HmWzdfL.js → get-ecosystem-wallet-info-BTIILm0G.js} +1 -1
- package/_assets/{getBalance-32RCC6W6.js → getBalance-C2Tbq71N.js} +1 -1
- package/_assets/{getNFT-Bvh35NBt.js → getNFT-B_c439CD.js} +1 -1
- package/_assets/{getNFT-Bdzdl0tm.js → getNFT-DhNnqHsp.js} +1 -1
- package/_assets/{grid.styles-C5FdGoZt.js → grid.styles-B7sbzNDB.js} +1 -1
- package/_assets/{hashTypedData-C1J-Yu5X.js → hashTypedData-CRBhyfoU.js} +1 -1
- package/_assets/{hashTypedData-Cd2jo0fu.js → hashTypedData-vaDwOmuC.js} +1 -1
- package/_assets/{in-app-B12bHXEw.js → in-app-BQzU4PAv.js} +1 -1
- package/_assets/{in-app-wallet-calls-C6NnLiF5.js → in-app-wallet-calls-Cr4bYvxP.js} +1 -1
- package/_assets/{index-aXb_PvXT.js → index-2w_fRCbS.js} +1 -1
- package/_assets/{index-xl5neHLR.js → index-8KvxfLw1.js} +1 -1
- package/_assets/{index-BHNHvbUP.js → index-B5XfALSf.js} +1 -1
- package/_assets/{index-BQE4xPAY.js → index-B5tZ4njw.js} +1 -1
- package/_assets/{index-s_bfhZ6F.js → index-B7kFLUeo.js} +1 -1
- package/_assets/{index-9Q-G51o6.js → index-BJbErfY9.js} +1 -1
- package/_assets/{index-CxfuGaDv.js → index-BK90FEtk.js} +1 -1
- package/_assets/{index-D2_T8MLY.js → index-BL4P9jlp.js} +1 -1
- package/_assets/{index-f74S-M7s.js → index-BPSZd_TR.js} +1 -1
- package/_assets/{index-CVHBMZma.js → index-BWmjkTLb.js} +63 -63
- package/_assets/{index-CN92MtoS.js → index-BWnweo6e.js} +1 -1
- package/_assets/{index-BRh_MAtG.js → index-BcheFNSw.js} +1 -1
- package/_assets/{index-DIELA4su.js → index-Bd-K2QZ7.js} +1 -1
- package/_assets/{index-B984MHyM.js → index-BeHDTfXr.js} +1 -1
- package/_assets/{index-KoOOqA3z.js → index-Bh7xvPrX.js} +1 -1
- package/_assets/{index-B01yzeQ8.js → index-BqEpQVRu.js} +1 -1
- package/_assets/{index-Cx6dOZTN.js → index-BwXdcjvt.js} +3 -3
- package/_assets/{index-Bbo2skmn.js → index-BzHHAkOs.js} +1 -1
- package/_assets/{index-BhKN5EIF.js → index-CHS_E7pk.js} +1 -1
- package/_assets/{index-DM4ZKIDP.js → index-CHlHBg7I.js} +1 -1
- package/_assets/{index-CC-AzsUH.js → index-CIKiGCta.js} +1 -1
- package/_assets/{index-BrlzlDYY.js → index-CIPAl0Nx.js} +1 -1
- package/_assets/{index-CWqCDmmG.js → index-COcN-hIJ.js} +1 -1
- package/_assets/index-CVSHcMd8.js +3390 -0
- package/_assets/{index-0XvBS5zv.js → index-CVtNWGEM.js} +1 -1
- package/_assets/{index-CsM5PUdn.js → index-CZRERNtk.js} +2 -2
- package/_assets/{index--Ye27Vx_.js → index-ChBdrXE2.js} +1 -1
- package/_assets/{index-BngbLeyt.js → index-CihGJO1W.js} +2 -2
- package/_assets/{index-CEmq93Ky.js → index-CmUhskfa.js} +1 -1
- package/_assets/{index-BFBo1N5P.js → index-CwTmdCrp.js} +1 -1
- package/_assets/{index-Fivnn7mf.js → index-D2Rusqlj.js} +1 -1
- package/_assets/{index-CJlYjYNZ.js → index-D5CXZfs2.js} +1 -1
- package/_assets/{index-C3FbBJ0B.js → index-DAbSqtK_.js} +1 -1
- package/_assets/{index-BXgz5CqZ.js → index-DGdSP-PC.js} +1 -1
- package/_assets/{index-CK9g-jse.js → index-DMw0nD0C.js} +1 -1
- package/_assets/{index-DX4C1Af8.js → index-DPRoqqzs.js} +1 -1
- package/_assets/{index-srBAWpfF.js → index-Db4WDkiE.js} +1 -1
- package/_assets/{index-C4hDSOGl.js → index-DczeFhSx.js} +1 -1
- package/_assets/{index-Bl9A4aCY.js → index-DdDo2o0U.js} +1 -1
- package/_assets/{index-dixEk7jd.js → index-DeEXPC_f.js} +1 -1
- package/_assets/{index-DygpMJS7.js → index-DgR7gbuk.js} +3 -3
- package/_assets/{index-D4N_qlW4.js → index-DgdA05zJ.js} +1 -1
- package/_assets/{index-DpSVgnb5.js → index-DqhAQvqS.js} +1 -1
- package/_assets/{index-CMpfBNnD.js → index-DsDKDj-_.js} +1 -1
- package/_assets/{index-D1hB2lFW.js → index-UkQwF6dY.js} +1 -1
- package/_assets/{index-Y8dCmAYo.js → index-XRVonM2O.js} +1 -1
- package/_assets/{index-Do3GSrTN.js → index-_wVDBNGh.js} +3 -3
- package/_assets/{index-CpJZJukx.js → index-hde5aQt-.js} +2 -2
- package/_assets/{index-CO7GzJir.js → index-i8aSVEpf.js} +1 -1
- package/_assets/{index-B9aOPYnq.js → index-kNRgztx6.js} +2 -2
- package/_assets/{index-Dyrrv-jJ.js → index-lFEp3JhT.js} +1 -1
- package/_assets/{index-B0AXM_VY.js → index-v0-dKrsQ.js} +1 -1
- package/_assets/{index.es-BzqwSDFf.js → index.es-Bqr-G98A.js} +4 -4
- package/_assets/{index.es-B_wTHOdN.js → index.es-DPPbVVpi.js} +1 -1
- package/_assets/{index.es-sJaJm3UW.js → index.es-i03xcE3j.js} +1 -1
- package/_assets/{localBatchGatewayRequest-Ca5n5qCv.js → localBatchGatewayRequest-CRMLAHO1.js} +1 -1
- package/_assets/{networks-iVGk0JJM.js → networks-BmBZDY_K.js} +1 -1
- package/_assets/{onramp-C4kGKm8k.js → onramp-uXgOJ-Im.js} +1 -1
- package/_assets/{openzeppelin-Cq0U5Yj-.js → openzeppelin-BxVEJIc3.js} +1 -1
- package/_assets/{parseNft-DxFyV4vL.js → parseNft-BLoJ27g5.js} +2 -2
- package/_assets/{parseSignature-CGjLk_wy.js → parseSignature-BAIOns-n.js} +3 -3
- package/_assets/{parseSignature-COtTJutO.js → parseSignature-DLZEjsmw.js} +1 -1
- package/_assets/{passkeys-DaKZKc5X.js → passkeys-CkgKHJuB.js} +1 -1
- package/_assets/{pay-with-exchange-C9uv-ieY.js → pay-with-exchange-BUU-soFf.js} +1 -1
- package/_assets/{qr-overlay-CQQySlBn.js → qr-overlay-CZP1DBsP.js} +1 -1
- package/_assets/{receive-BBhp5SjJ.js → receive-BEv8Ifyd.js} +1 -1
- package/_assets/{resolveImplementation-BhoUOPQQ.js → resolveImplementation-BMvbzBCF.js} +1 -1
- package/_assets/{rpc-DTh3KIva.js → rpc-DrNJV-bX.js} +1 -1
- package/_assets/{secp256k1-DbjmQrSL.js → secp256k1-BDnjQjzi.js} +1 -1
- package/_assets/{secp256k1-D3oKlH7Y.js → secp256k1-Bte7PNcg.js} +1 -1
- package/_assets/{secp256k1-DDJ2_Bsx.js → secp256k1-DAXf_X2Z.js} +1 -1
- package/_assets/{send-B38BS5L-.js → send-Bbc5vmOx.js} +1 -1
- package/_assets/{send-batch-transaction-CKNSzTrU.js → send-batch-transaction-Ccbf4eYK.js} +1 -1
- package/_assets/{send-eip712-transaction-CQkqFshV.js → send-eip712-transaction-CKksFLhQ.js} +2 -2
- package/_assets/{send-gasless-transaction-0E-pHV_D.js → send-gasless-transaction-BWVyKTQJ.js} +2 -2
- package/_assets/{send-transaction-DUvtCNaC.js → send-transaction--i5jhDpl.js} +2 -2
- package/_assets/{sendMetaTransaction-BUU2XPaW.js → sendMetaTransaction-DMlBIjFr.js} +1 -1
- package/_assets/{sendRawTransaction-DSl2j5Tv.js → sendRawTransaction-DcZOhEZ1.js} +3 -3
- package/_assets/{serializeTransaction-GOaI2-vB.js → serializeTransaction-Cbl59pqD.js} +1 -1
- package/_assets/{session-proposal-B31UMpQa.js → session-proposal-DFLHSVb8.js} +1 -1
- package/_assets/{session-request-CXbKG_CB.js → session-request-2Twkqho_.js} +2 -2
- package/_assets/{signing-Bzt09eMi.js → signing-DaKHtVaE.js} +3 -3
- package/_assets/{socials-CNNRzT2N.js → socials-C3d-zVyd.js} +1 -1
- package/_assets/{styled-f0hxr1BX.js → styled-xfEmbNHB.js} +1 -1
- package/_assets/{swaps-Dm6opnzM.js → swaps-S0fyBWWZ.js} +1 -1
- package/_assets/{thirdweb-BsryIfzq.js → thirdweb-CHLJsEFj.js} +3 -3
- package/_assets/{to-serializable-transaction-CspH4HXW.js → to-serializable-transaction-Bi_VsmND.js} +2 -2
- package/_assets/{transactionReceipt-LkdfOGrW.js → transactionReceipt-CaylJrTu.js} +1 -1
- package/_assets/{transactions-CHt9afcL.js → transactions-Dak-irlC.js} +1 -1
- package/_assets/{useCreditPacks-DW-oKsgc.js → useCreditPacks-9iynvt9I.js} +1 -1
- package/_assets/{useImportable-4rP-UQqs.js → useImportable-bY2JTURZ.js} +1 -1
- package/_assets/{useInfiniteGrid-Cjl-Omaq.js → useInfiniteGrid-CoVhqyEA.js} +1 -1
- package/_assets/{useTheme-Dh6eiJOj.js → useTheme-DezdUQrY.js} +1 -1
- package/_assets/{verifyHash--XBApVq4.js → verifyHash-BNX02Mwk.js} +1 -1
- package/_assets/{w3m-modal-dINBeQa2.js → w3m-modal-C0P6WtEL.js} +1 -1
- package/_assets/{w3m-modal-cc9RBS7W.js → w3m-modal-DxTpVqtQ.js} +1 -1
- package/_assets/{wait-for-tx-receipt-CW92WmOA.js → wait-for-tx-receipt-CH7RMpwO.js} +1 -1
- package/_assets/{wallets-DgijLpqw.js → wallets-uppVZ6bf.js} +5 -5
- package/_assets/{web-connector-C3GRXbj_.js → web-connector-CRctIr_W.js} +3 -3
- package/_assets/{writeContract-B4uhDk93.js → writeContract-BWUdAFzn.js} +1 -1
- package/_assets/{zoraTestnet-CXJJv6qS.js → zoraTestnet-CWLyQspg.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/LazyEmoteControls-BW-FF_VV.js +0 -2
- package/_assets/index-V7aSbkHg.js +0 -3390
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-
|
|
2
|
-
import{n as we,
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-BWmjkTLb.js","_assets/react-OEOSdkUk.js","_assets/index-CVSHcMd8.js","_assets/sentry-B60WY-np.js","_assets/dcl-schemas-CmtP3U6y.js","_assets/ethers-lk3HAbPB.js","_assets/intl-CBcMB1D2.js","_assets/index-D-NhBWWr.css","_assets/useImportable-bY2JTURZ.js","_assets/buy-CO7pIdYC.js","_assets/authorizations-Iqbcv5YT.js","_assets/sendMetaTransaction-DMlBIjFr.js","_assets/ManaPricingBanner.styles-n6d7KU1f.js","_assets/Faq-BB7wrUia.js","_assets/field.styles-DAoBbGhv.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as we,bL as je,o as q,v as I,bM as ke,s as l,t as s,w as Ie,B as Ae,x as $e,b as c,ak as Pe,I as A,bN as Y,bO as ee,bP as Le,_ as Ne,z as N,bQ as Ee,A as Te,bg as z,aD as Ce,bR as Se,E as Fe,bS as De,bT as O}from"./index-CVSHcMd8.js";import{r as g,u as Me,j as t,L as se,b as He}from"./react-OEOSdkUk.js";import{u as qe}from"./useImportable-bY2JTURZ.js";import{L as ze}from"./LoadMore-0XzEUItO.js";import{u as P}from"./useInfiniteGrid-CoVhqyEA.js";import{m as ne}from"./mana-matic-C4e1sNO3.js";import"./sentry-B60WY-np.js";import"./dcl-schemas-CmtP3U6y.js";import"./ethers-lk3HAbPB.js";import"./intl-CBcMB1D2.js";import"./buy-CO7pIdYC.js";import"./authorizations-Iqbcv5YT.js";import"./sendMetaTransaction-DMlBIjFr.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 Be(e){const a=[],n=new Map;for(const i of e){const r=_e(i);if(!r){a.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const 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 Ge(e,a){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:a?we(e.manaWei,a):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ue(e){const n=We(e.purchases.filter(o=>o.status!=="EXPIRED")).map(o=>({kind:"purchase",id:`purchase:${o.id}`,createdAt:o.createdAt,order:o})),i=e.sales.map(o=>{const x=Ge(o,e.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),r=(e.creditOrders??[]).filter(o=>o.status!=="failed"&&o.status!=="abandoned").map(o=>({kind:"credit",id:`credit:${o.id}`,createdAt:o.createdAt,order:o})),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 Ke(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 Ze(){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 Je="https://cdn.decentraland.org/@dcl/shop/0.8.1-31012874824.commit-6e7ed18/_assets/credits-product-vs4Q6u6l.svg",R=Ie`
|
|
3
3
|
0% { background-position: 200% 0; }
|
|
4
4
|
100% { background-position: -200% 0; }
|
|
5
5
|
`,Ye=l.section`
|
|
@@ -240,15 +240,15 @@ import{n as we,bK as je,o as q,v as I,bL as ke,s as l,t as s,w as Ie,B as Ae,x a
|
|
|
240
240
|
&[data-kind='income'] {
|
|
241
241
|
color: ${s.colors.okStrong};
|
|
242
242
|
}
|
|
243
|
-
`,
|
|
243
|
+
`,de=l.img`
|
|
244
244
|
width: 16px;
|
|
245
245
|
height: 16px;
|
|
246
246
|
vertical-align: -0.15em;
|
|
247
|
-
`,
|
|
247
|
+
`,dt=l.span`
|
|
248
248
|
display: inline-flex;
|
|
249
249
|
align-items: center;
|
|
250
250
|
cursor: pointer;
|
|
251
|
-
`,
|
|
251
|
+
`,ct=l.span`
|
|
252
252
|
position: fixed;
|
|
253
253
|
transform: translateX(-50%);
|
|
254
254
|
padding: 6px 8px;
|
|
@@ -320,12 +320,12 @@ import{n as we,bK as je,o as q,v as I,bL as ke,s as l,t as s,w as Ie,B as Ae,x a
|
|
|
320
320
|
display: flex;
|
|
321
321
|
flex-direction: column;
|
|
322
322
|
gap: 2px;
|
|
323
|
-
`,
|
|
323
|
+
`,U=l.span`
|
|
324
324
|
font-weight: 700;
|
|
325
325
|
white-space: nowrap;
|
|
326
326
|
overflow: hidden;
|
|
327
327
|
text-overflow: ellipsis;
|
|
328
|
-
`,
|
|
328
|
+
`,K=l.span`
|
|
329
329
|
display: inline-block;
|
|
330
330
|
width: 140px;
|
|
331
331
|
max-width: 60%;
|
|
@@ -364,7 +364,7 @@ import{n as we,bK as je,o as q,v as I,bL as ke,s as l,t as s,w as Ie,B as Ae,x a
|
|
|
364
364
|
@media (prefers-reduced-motion: reduce) {
|
|
365
365
|
animation: none;
|
|
366
366
|
}
|
|
367
|
-
`,
|
|
367
|
+
`,ce=l.div`
|
|
368
368
|
display: flex;
|
|
369
369
|
flex-direction: column;
|
|
370
370
|
align-items: center;
|
|
@@ -378,4 +378,4 @@ import{n as we,bK as je,o as q,v as I,bL as ke,s as l,t as s,w as Ie,B as Ae,x a
|
|
|
378
378
|
margin: 6px 0 0;
|
|
379
379
|
`,ht=l(Ae)`
|
|
380
380
|
margin-top: 12px;
|
|
381
|
-
`,V=H.withComponent(se),ut=g.lazy(()=>Ne(()=>import("./index-
|
|
381
|
+
`,V=H.withComponent(se),ut=g.lazy(()=>Ne(()=>import("./index-BWmjkTLb.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),L=24,pt=["all","purchases","sales"],ae="migrate";function k(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function he(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function ue(e){const a=Number(e)/1e18;return Number.isFinite(a)?a.toLocaleString("en",{maximumFractionDigits:2}):"0"}function pe({children:e}){const a=g.useRef(null),[n,i]=g.useState(null),r=()=>{var u;const 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(B,{}):t.jsx(_,{children:o?t.jsx("img",{src:o,alt:u}):t.jsx(A,{name:"cart",size:20})}),t.jsxs(G,{children:[d?t.jsx(K,{}):t.jsx(U,{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=Be(e.lines),n=a.reduce((i,r)=>i+r.quantity,0);return t.jsxs(E,{"data-testid":"purchase-order",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsxs(F,{children:[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(B,{}):t.jsx(_,{children:r?t.jsx("img",{src:r,alt:i}):t.jsx(A,{name:"offer",size:20})}),t.jsxs(G,{children:[n?t.jsx(K,{}):t.jsx(U,{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(B,{}):t.jsx(_,{children:d?t.jsx("img",{src:d,alt:r}):t.jsx(A,{name:"offer",size:20})}),t.jsxs(G,{children:[i?t.jsx(K,{}):t.jsx(U,{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:Je,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 St(){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}=Ze(),f=u!==void 0&&o!==void 0&&(u>0||o>0||d),p=!!e&&!d&&a!=="sales",m=!!e&&!d&&a!=="purchases",b=P(["purchases",e==null?void 0:e.address],h=>Le(e.address,e.identity,{first:L,skip:h}),{enabled:p}),y=P(["sales",e==null?void 0:e.address],h=>Y(e.address,{role:"seller",first:L,skip:h}),{enabled:m}),v=P(["credit-orders",e==null?void 0:e.address],h=>ee(e.address,e.identity,{first:L,skip:h}),{enabled:p}),w=P(["mana-purchases",e==null?void 0:e.address],h=>Y(e.address,{role:"buyer",first:L,skip:h}),{enabled:p}),{data:X}=I({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ee(e.address,e.identity,{first:200}).then(h=>h.payouts),enabled:m,staleTime:6e4}),xe=g.useMemo(()=>Qe(X),[X]),{data:me}=Pe(m);if(!e)return t.jsxs(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 Z=Ke(Ue({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,J=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,{},$))}):Z.length===0?t.jsx(yt,{filter:a}):t.jsxs(t.Fragment,{children:[t.jsxs(te,{children:[Z.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)),J?t.jsx(ie,{}):null]}),t.jsx(ze,{hasNextPage:fe,isFetching:J,onLoadMore:be})]})]})}export{St as Activity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as v}from"./react-OEOSdkUk.js";import{s as u}from"./index-
|
|
1
|
+
import{r as l,j as v}from"./react-OEOSdkUk.js";import{s as u}from"./index-CVSHcMd8.js";import"./sentry-B60WY-np.js";import"./dcl-schemas-CmtP3U6y.js";import"./ethers-lk3HAbPB.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.8.1-31012874824.commit-6e7ed18/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.8.1-31012874824.commit-6e7ed18/_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{e as Ae,r as w,j as e,u as
|
|
1
|
+
import{e as Ae,r as w,j as e,u as Je}from"./react-OEOSdkUk.js";import{u as Ke}from"./useUrlFilters-DABDXRpV.js";import{c as W,r as Qe,bl as Xe,bm as Ye,ay as et,a as tt,s,t,o as Me,bb as nt,A as st,aD as me,b as n,y as it,I as _,z as A,bY as Y,ba as rt,V as Q,bq as ot,bp as at,x as Ne,ak as Pe,n as We,q as lt,ai as ct,am as ke,an as D,aF as dt,bJ as pt}from"./index-CVSHcMd8.js";import{g as ht,h as xt,i as mt,j as ft,k as ut,C as gt,l as bt,o as yt,m as wt,n as jt,M as vt,u as $t,E as Ct,v as kt,p as St,q as Et,r as _t,s as Tt,t as Rt}from"./Assets.styles-CunpLCUx.js";import{S as Se,R as zt,F as It,e as At}from"./categories-H_VhO6tt.js";import{L as Mt}from"./LoadMore-0XzEUItO.js";import{u as Nt}from"./useInfiniteGrid-CoVhqyEA.js";import{E as Pt}from"./ErrorNotice-CFWuvsq7.js";import{d as Wt}from"./dcl-schemas-CmtP3U6y.js";import{s as Bt,G as Ft,w as Lt,S as Ut}from"./buy-gasless-JMjDmvgb.js";import{s as Ht,k as Ot}from"./buy-CO7pIdYC.js";import{f as Dt}from"./errors-B4qBuIpC.js";import{J as Gt,C as qt,B as fe}from"./ethers-lk3HAbPB.js";import{n as Vt}from"./Tooltip-LzdtnJQn.js";import{G as Zt}from"./grid.styles-B7sbzNDB.js";import"./sentry-B60WY-np.js";import"./intl-CBcMB1D2.js";import"./authorizations-Iqbcv5YT.js";import"./sendMetaTransaction-DMlBIjFr.js";function G(i){const o=i.source??"item",l=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${o}:${l}`}const B="100000000000000000000",Be=2,X=15,Jt=/^[a-zA-Z0-9]+$/;function Ee(i){const o=i.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 Kt(i){return i.replace(/[^a-zA-Z0-9]/g,"").slice(0,X)}const Qt=["function available(string _subdomain) view returns (bool)"],_e={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Xt(){return W.chainId===Number(Wt.ChainId.MATIC_MAINNET)?_e.mainnet:_e.sepolia}async function Yt(i,o={}){var d;const{rpc:l,address:x}=Xt(),h=new Gt(l),c=new qt(x,Qt,h);console.info(`[names] availability check → DCLRegistrar(${x}).available("${i}") on ${l}`);const p=await c.available(i);if((d=o.signal)!=null&&d.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${p}`),p?"available":"taken"}const en="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 tn(i){return et(B,i)}async function nn(i,o,l={}){var d;const x=l.chainId??W.chainId,h=l.provider??"across",c=`${W.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${x}&provider=${h}`,p=await tt(c,{method:"GET",identity:i,metadata:{}});if(!p.ok){let a;try{a=(d=await p.json())==null?void 0:d.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new ue:new Error(`fetchNameCreditRoute ${p.status}`)}return p.json()}function sn(i,o){const l=fe.from(i.availableAmount),h=fe.from(B).sub(l);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Ot(i.id)}],creditsSignatures:[i.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:B}}async function rn(i,o={}){const l=en,x=o.intervalMs??1e4,h=o.maxAttempts??60;let c={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let p=0;p<h;p++){try{const d=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${i}`);if(d.ok){const a=await d.json(),m=(a.status??"pending").toLowerCase(),g=a.fillTx??a.fillTxnRef??null,u=a.actionsSucceeded!==!1;if(m==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:u};if(m==="refunded"||m==="expired")return{status:m,destinationTxHash:null,actionsSucceeded:!1};c={status:"pending",destinationTxHash:g,actionsSucceeded:u}}}catch{}p<h-1&&await new Promise(d=>setTimeout(d,x))}return c}async function on(i){const{name:o,identity:l,signer:x}=i,h=i.chainId??W.chainId,c=i.provider??"across",p=(i.beneficiary??await x.getAddress()).toLowerCase();let d=null,a=!1;console.info("[names] register start",{name:o,buyer:p,chainId:h,provider:c});try{const m=await Qe(h),g=tn(m);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:m});const u=await nn(l,o,{chainId:h,provider:c});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 Xe(l,g);if(d=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),fe.from(v.maxCreditedValue).lt(B))throw new Error("Credit under-sized for the name price");const j=sn(v.credit,u);let f;try{f=await Bt({chainId:h,buyer:p,signer:x,args:j})}catch(b){if(!(b instanceof Ft))throw b;f=await Ht(h,j,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:f}),await Lt(f),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:f}),c==="across"){const b=await rn(f,i.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:f};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:f,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:f}}catch(m){if(console.error("[names] register failed — raw error:",m,{name:o,buyer:p,originConfirmed:a}),m instanceof Ut)return{status:"pending",originTxHash:m.txHash};if(d&&!a&&await Ye(l,[d]).catch(()=>{}),m instanceof ue)throw m;const g=new Error(Dt(m,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=m,g}}const an=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -166,7 +166,7 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
166
166
|
font-family: ${t.font.sans};
|
|
167
167
|
font-size: 18px;
|
|
168
168
|
color: ${t.colors.muted2};
|
|
169
|
-
`,
|
|
169
|
+
`,mn=s.input`
|
|
170
170
|
flex: 0 1 auto;
|
|
171
171
|
min-width: 0;
|
|
172
172
|
border: 0;
|
|
@@ -181,7 +181,7 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
181
181
|
color: ${t.colors.muted2};
|
|
182
182
|
font-weight: 400;
|
|
183
183
|
}
|
|
184
|
-
`,
|
|
184
|
+
`,fn=s.span`
|
|
185
185
|
flex: none;
|
|
186
186
|
font-family: ${t.font.sans};
|
|
187
187
|
font-size: 16px;
|
|
@@ -379,7 +379,7 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
379
379
|
color: ${t.colors.accent};
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
`;function Sn({name:i,priceCredits:o,onClose:l}){const{session:x}=Me(),{data:h,isError:c}=nt(x),p=st(),d=Ae(),[a,
|
|
382
|
+
`;function Sn({name:i,priceCredits:o,onClose:l}){const{session:x}=Me(),{data:h,isError:c}=nt(x),p=st(),d=Ae(),[a,m]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),f=w.useRef(!1),b=g.trim().toLowerCase()===i.toLowerCase(),$=a==="completing",C=o!=null?me(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:me(M)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!$&&l()};document.addEventListener("keydown",y);const T=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=T}},[$,l]);async function F(){if(!(!x||!b||k||S||f.current)){f.current=!0,m("completing"),j(null);try{const y=await on({name:i,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"]}),m(y.status==="registered"?"success":"pending")}catch(y){Q(at(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ot(y),purchase_type:"name"}),j(y instanceof ue?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),m("error")}finally{f.current=!1}}}const L=a!=="success"&&a!=="pending",z=it(x==null?void 0:x.providerType);return e.jsx(an,{onClick:$?void 0:l,role:"presentation",children:e.jsxs(ln,{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(_,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,c)]}),e.jsx(ie,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(re,{children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[i,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(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(Te,{onClick:()=>m("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(cn,{children:[e.jsx(dn,{children:n("names.confirmTitle")}),e.jsx(pn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${En(i)}</b>`})}}),e.jsxs(hn,{children:[e.jsx(xn,{"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(fn,{children:".dcl.eth"})]})]}),N?e.jsxs(pe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:N})]}):null,e.jsx(Te,{onClick:()=>void F(),disabled:!b||!x||k||S,children:n("names.buyCta")})]})]}),a==="completing"&&e.jsxs(un,{children:[e.jsx(gn,{src:rt,alt:"",width:56,height:56}),e.jsx(bn,{children:z?n("names.confirming"):n("names.completing")}),e.jsxs(yn,{children:[e.jsx(wn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(jn,{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(_,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,c)]}),e.jsx(ie,{}),e.jsxs(pe,{"data-tone":"info",children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(re,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[i,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(ze,{onClick:()=>{l(),d("/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(_,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,c)]}),e.jsx(ie,{}),e.jsxs(vn,{children:[e.jsx($n,{"aria-hidden":!0,children:e.jsx(_,{name:"check"})}),e.jsxs(Cn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(re,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[i,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(ze,{onClick:()=>{l(),d("/my-items")},children:n("names.myItems")}),e.jsx(kn,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function En(i){return i.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const _n="https://cdn.decentraland.org/@dcl/shop/0.8.1-31012874824.commit-6e7ed18/_assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.8.1-31012874824.commit-6e7ed18/_assets/world-B-9aPlxu.webp",Rn="https://cdn.decentraland.org/@dcl/shop/0.8.1-31012874824.commit-6e7ed18/_assets/invite-BfwIhP2C.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.8.1-31012874824.commit-6e7ed18/_assets/governance-DnazlIjy.webp",In=s.div`
|
|
383
383
|
width: 100%;
|
|
384
384
|
min-width: 0;
|
|
385
385
|
`,An=s.nav`
|
|
@@ -422,7 +422,7 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
422
422
|
gap: 32px;
|
|
423
423
|
padding-bottom: 32px;
|
|
424
424
|
}
|
|
425
|
-
`,
|
|
425
|
+
`,Wn=s.div`
|
|
426
426
|
position: relative;
|
|
427
427
|
border-radius: ${t.radius.banner};
|
|
428
428
|
overflow: hidden;
|
|
@@ -438,12 +438,12 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
438
438
|
padding: 40px 20px;
|
|
439
439
|
gap: 28px;
|
|
440
440
|
}
|
|
441
|
-
`,
|
|
441
|
+
`,Bn=s.div`
|
|
442
442
|
display: flex;
|
|
443
443
|
flex-direction: column;
|
|
444
444
|
align-items: center;
|
|
445
445
|
gap: 12px;
|
|
446
|
-
`,
|
|
446
|
+
`,Fn=s.h1`
|
|
447
447
|
margin: 0;
|
|
448
448
|
font-family: ${t.font.sans};
|
|
449
449
|
font-weight: 600;
|
|
@@ -563,7 +563,7 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
563
563
|
${t.media.maxWidth("mobile")} {
|
|
564
564
|
font-size: 20px;
|
|
565
565
|
}
|
|
566
|
-
`,
|
|
566
|
+
`,Jn=s.input`
|
|
567
567
|
flex: 0 1 auto;
|
|
568
568
|
min-width: 0;
|
|
569
569
|
max-width: 100%;
|
|
@@ -585,7 +585,7 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
585
585
|
${t.media.maxWidth("mobile")} {
|
|
586
586
|
font-size: 16px;
|
|
587
587
|
}
|
|
588
|
-
`,
|
|
588
|
+
`,Kn=s.span`
|
|
589
589
|
flex: none;
|
|
590
590
|
margin-left: 2px;
|
|
591
591
|
font-family: ${t.font.sans};
|
|
@@ -597,13 +597,13 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
597
597
|
${t.media.maxWidth("mobile")} {
|
|
598
598
|
font-size: 16px;
|
|
599
599
|
}
|
|
600
|
-
`,
|
|
600
|
+
`,Qn=s.span`
|
|
601
601
|
flex: none;
|
|
602
602
|
font-family: ${t.font.sans};
|
|
603
603
|
font-size: 13px;
|
|
604
604
|
color: ${t.colors.muted2};
|
|
605
605
|
white-space: nowrap;
|
|
606
|
-
`,
|
|
606
|
+
`,Fe=s.button`
|
|
607
607
|
flex: none;
|
|
608
608
|
display: inline-flex;
|
|
609
609
|
align-items: center;
|
|
@@ -639,7 +639,7 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
639
639
|
${t.media.maxWidth("mobile")} {
|
|
640
640
|
display: none;
|
|
641
641
|
}
|
|
642
|
-
`,
|
|
642
|
+
`,Xn=s(Fe)`
|
|
643
643
|
display: none;
|
|
644
644
|
|
|
645
645
|
${t.media.maxWidth("mobile")} {
|
|
@@ -749,7 +749,7 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
749
749
|
flex-direction: column;
|
|
750
750
|
gap: 6px;
|
|
751
751
|
padding: 12px 16px;
|
|
752
|
-
`,
|
|
752
|
+
`,J=s.h3`
|
|
753
753
|
margin: 0;
|
|
754
754
|
font-family: ${t.font.sans};
|
|
755
755
|
font-weight: 700;
|
|
@@ -757,7 +757,7 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
757
757
|
line-height: 1.57;
|
|
758
758
|
text-transform: uppercase;
|
|
759
759
|
color: ${t.colors.text};
|
|
760
|
-
`,
|
|
760
|
+
`,K=s.p`
|
|
761
761
|
margin: 0;
|
|
762
762
|
font-family: ${t.font.sans};
|
|
763
763
|
font-weight: 400;
|
|
@@ -798,4 +798,4 @@ import{e as Ae,r as w,j as e,u as Ke}from"./react-OEOSdkUk.js";import{u as Xe}fr
|
|
|
798
798
|
clip: rect(0, 0, 0, 0);
|
|
799
799
|
white-space: nowrap;
|
|
800
800
|
border: 0;
|
|
801
|
-
`,as="https://docs.decentraland.org/creator/worlds/about/",ls="https://governance.decentraland.org";function cs(i){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function ds({onBack:i}){Ne({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:l}=Me(),{data:x}=Pe(),h=x?Fe(W,x):null,[c,p]=w.useState(""),[d,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)},[c]),w.useEffect(()=>{if(!Ee(c).ok){a(c.length===0?"idle":"invalid");return}a("checking");const E=new AbortController,M=setTimeout(()=>{(async()=>{try{const S=await Yt(c,{signal:E.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(M),E.abort()}},[c]);const m=Ee(c),b=m.ok&&(d==="available"||d==="error");function $(){if(b){if(!o){l();return}g(!0)}}const C=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(Yn,{children:[e.jsx(A,{}),fe(h)]}):null]});return e.jsxs(In,{"data-testid":"names-page",children:[e.jsxs(An,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Mn,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Nn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Pn,{children:[e.jsxs(Fn,{children:[e.jsxs(Wn,{children:[e.jsx(Bn,{children:n("names.heroTitle")}),e.jsx(Ln,{children:n("names.heroSubtitle")})]}),e.jsxs(Un,{children:[e.jsxs(Hn,{children:[e.jsxs(On,{invalid:d==="taken",children:[e.jsxs(Vn,{children:[e.jsx(Zn,{"aria-hidden":!0,children:"@"}),e.jsx(Kn,{value:c,onChange:k=>p(Xt(k.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:Q,style:{width:v!=null?`${v}px`:void 0}}),e.jsx(Dn,{ref:u,"aria-hidden":!0,children:c||n("names.inputPlaceholder")}),e.jsx(Xn,{children:n("names.suffix")})]}),c.length>0?e.jsxs(Jn,{"aria-hidden":!0,children:[c.length,"/",Q]}):null,e.jsx(Be,{onClick:$,disabled:!b,"data-testid":"names-claim",children:C})]}),d==="taken"?e.jsxs(Gn,{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(qn,{href:cs(c),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(_,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Qn,{onClick:$,disabled:!b,children:C}),d==="checking"?e.jsx(he,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):d==="error"?e.jsx(he,{tone:"muted",role:"status",children:n("names.checkError")}):d==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(he,{tone:"muted",role:"status",children:n("names.tooShort",{min:We})}):null,e.jsx(os,{role:"status","aria-live":"polite",children:d==="available"?n("names.available",{name:c}):""})]})]}),e.jsxs(es,{children:[e.jsxs(ts,{children:[e.jsx(ns,{children:n("names.whyTitle")}),e.jsx(ss,{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(X,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Tn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why2Title")}),e.jsxs(X,{children:[n("names.why2")," ",e.jsx(rs,{children:n("names.why2Address")})]}),e.jsxs(Ie,{href:as,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:Rn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why3Title")}),e.jsx(X,{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(X,{children:n("names.why4")}),e.jsxs(Ie,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(Sn,{name:c,priceCredits:h,onClose:()=>g(!1)}):null]})}const ps="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,hs=["all","on_sale","not_for_sale"];function Is(){const[i]=Ke(),o=Ae(),l=(i.get("q")??"").trim().toLowerCase(),x=(i.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:l?"all":"wearable",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[l]),[c,p]=Xe(h),{subCategory:d,rarities:a,priceMin:f,priceMax:g,smart:u,sort:v}=c,j=c.category,m=hs.includes(c.status)?c.status:"on_sale",[b,$]=w.useState(!1);w.useEffect(()=>{if(!b)return;const r=O=>{O.key==="Escape"&&$(!1)};document.addEventListener("keydown",r);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),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=lt(),S=d?At[d]:void 0,N=(Se.find(r=>r.key===v)??Se[0]).server,B={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}=Nt(C?["shop-items",B]:["catalog-items",L],r=>C?dt({...B,first:xe,skip:r}):pt({...L,first:xe,skip:r}),{enabled:j!=="names"}),U=y,{data:ye,isError:Oe,isPending:De}=Pe(),Ge=r=>ye&&r.manaWei?Fe(r.manaWei,ye):null,qe=C&&De&&z.some(r=>r.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,J("Shop Searched",{query:l,result_count:U}))},[l,T,R,U]);const H=w.useRef("__init__");w.useEffect(()=>{if(T||R)return;const r=JSON.stringify({category:j,subCategory:d,rarities:a,min:k,max:E,sort:v,status:m,smart:u});if(H.current==="__init__"||H.current===r){H.current=r;return}H.current=r,J("Shop Applied Filter",{filters:{category:j,sub_category:d,rarities:a,min_price_credits:k??null,max_price_credits:E??null,status:m,smart:u,sort:v},result_count:U})},[j,d,a,k,E,v,m,u,T,R,U]);function ve(r){p({category:r,subCategory:null})}function $e(r){p({status:r})}function Ce(r){p({rarities:a.includes(r)?a.filter(I=>I!==r):[...a,r]})}function Ze(){p(h)}const P=[];(k!=null||E!=null)&&P.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const r of zt)a.includes(r)&&P.push({key:`rarity-${r}`,label:ct(r),onRemove:()=>Ce(r)});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(ht,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(xt,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(ft,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(mt,{children:[e.jsx(ut,{children:n("assets.filters")}),e.jsx(gt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(bt,{children:e.jsx(yt,{category:j,subCategory:d,onCategory:ve,onSub:r=>p({subCategory:r}),priceMin:f,priceMax:g,onPriceMin:r=>p({priceMin:r}),onPriceMax:r=>p({priceMax:r}),rarities:a,onToggleRarity:Ce,status:m,onStatus:$e,smart:u,onSmart:r=>p({smart:r})})}),e.jsx(wt,{children:e.jsx(jt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(vt,{children:j==="names"?e.jsx(ds,{onBack:()=>ve("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(It,{sort:v,onSort:r=>p({sort:r}),total:y,loading:T||R,query:l,onOpenFilters:()=>$(!0),chips:P,onClearChips:Ze}),Oe&&C&&z.some(r=>r.source==="legacy")?e.jsx($t,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ge?e.jsx(Pt,{message:n("assets.loadError"),testId:"browse-error"}):null,!we&&z.length===0&&!ge?e.jsxs(Ct,{"data-testid":"browse-empty",children:[e.jsx(kt,{src:ps,alt:""}),e.jsxs(St,{children:[e.jsx(Et,{children:n("assets.empty.title")}),e.jsx(_t,{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(Tt,{children:e.jsx(Rt,{type:"button",onClick:()=>o("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Zt,{"data-testid":"grid",children:we?e.jsx(ke,{count:Ve}):e.jsxs(e.Fragment,{children:[z.map(r=>{if(!C)return e.jsx(D,{item:r,mode:"view"},G(r));const I=r;if(I.source!=="legacy")return e.jsx(D,{item:r},G(r));const O=Ge(I);return O==null?e.jsx(D,{item:r,mode:"view"},G(r)):e.jsx(D,{item:{...I,priceCredits:O}},G(r))}),be?e.jsx(ke,{count:6}):null]})}),e.jsx(Mt,{hasNextPage:Le,isFetching:be,isError:Ue,onLoadMore:()=>void He()})]})]})})]})}export{Is as Assets};
|
|
801
|
+
`,as="https://docs.decentraland.org/creator/worlds/about/",ls="https://governance.decentraland.org";function cs(i){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function ds({onBack:i}){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,[c,p]=w.useState(""),[d,a]=w.useState("idle"),[m,g]=w.useState(!1),u=w.useRef(null),[v,j]=w.useState(void 0);w.useLayoutEffect(()=>{u.current&&j(u.current.offsetWidth)},[c]),w.useEffect(()=>{if(!Ee(c).ok){a(c.length===0?"idle":"invalid");return}a("checking");const E=new AbortController,M=setTimeout(()=>{(async()=>{try{const S=await Yt(c,{signal:E.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(M),E.abort()}},[c]);const f=Ee(c),b=f.ok&&(d==="available"||d==="error");function $(){if(b){if(!o){l();return}g(!0)}}const C=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(Yn,{children:[e.jsx(A,{}),me(h)]}):null]});return e.jsxs(In,{"data-testid":"names-page",children:[e.jsxs(An,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Mn,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Nn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Pn,{children:[e.jsxs(Wn,{children:[e.jsxs(Bn,{children:[e.jsx(Fn,{children:n("names.heroTitle")}),e.jsx(Ln,{children:n("names.heroSubtitle")})]}),e.jsxs(Un,{children:[e.jsxs(Hn,{children:[e.jsxs(On,{invalid:d==="taken",children:[e.jsxs(Vn,{children:[e.jsx(Zn,{"aria-hidden":!0,children:"@"}),e.jsx(Jn,{value:c,onChange:k=>p(Kt(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(Dn,{ref:u,"aria-hidden":!0,children:c||n("names.inputPlaceholder")}),e.jsx(Kn,{children:n("names.suffix")})]}),c.length>0?e.jsxs(Qn,{"aria-hidden":!0,children:[c.length,"/",X]}):null,e.jsx(Fe,{onClick:$,disabled:!b,"data-testid":"names-claim",children:C})]}),d==="taken"?e.jsxs(Gn,{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(qn,{href:cs(c),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(_,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Xn,{onClick:$,disabled:!b,children:C}),d==="checking"?e.jsx(he,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):d==="error"?e.jsx(he,{tone:"muted",role:"status",children:n("names.checkError")}):d==="invalid"&&!f.ok&&f.reason==="too-short"?e.jsx(he,{tone:"muted",role:"status",children:n("names.tooShort",{min:Be})}):null,e.jsx(os,{role:"status","aria-live":"polite",children:d==="available"?n("names.available",{name:c}):""})]})]}),e.jsxs(es,{children:[e.jsxs(ts,{children:[e.jsx(ns,{children:n("names.whyTitle")}),e.jsx(ss,{children:n("names.whyIntro")})]}),e.jsxs(is,{children:[e.jsxs(q,{children:[e.jsx(V,{src:_n,alt:""}),e.jsxs(Z,{children:[e.jsx(J,{children:n("names.why1Title")}),e.jsx(K,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Tn,alt:""}),e.jsxs(Z,{children:[e.jsx(J,{children:n("names.why2Title")}),e.jsxs(K,{children:[n("names.why2")," ",e.jsx(rs,{children:n("names.why2Address")})]}),e.jsxs(Ie,{href:as,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:Rn,alt:""}),e.jsxs(Z,{children:[e.jsx(J,{children:n("names.why3Title")}),e.jsx(K,{children:n("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:zn,alt:""}),e.jsxs(Z,{children:[e.jsx(J,{children:n("names.why4Title")}),e.jsx(K,{children:n("names.why4")}),e.jsxs(Ie,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),m?e.jsx(Sn,{name:c,priceCredits:h,onClose:()=>g(!1)}):null]})}const ps="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,hs=["all","on_sale","not_for_sale"];function Is(){const[i]=Je(),o=Ae(),l=(i.get("q")??"").trim().toLowerCase(),x=(i.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:l?"all":"wearable",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[l]),[c,p]=Ke(h),{subCategory:d,rarities:a,priceMin:m,priceMax:g,smart:u,sort:v}=c,j=c.category,f=hs.includes(c.status)?c.status:"on_sale",[b,$]=w.useState(!1);w.useEffect(()=>{if(!b)return;const r=O=>{O.key==="Escape"&&$(!1)};document.addEventListener("keydown",r);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=I}},[b]);const C=f==="on_sale",k=m&&!Number.isNaN(Number(m))?Number(m):void 0,E=g&&!Number.isNaN(Number(g))?Number(g):void 0,M=lt(),S=d?At[d]:void 0,N=(Se.find(r=>r.key===v)??Se[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:f==="not_for_sale"?!1:void 0},{items:z,total:y,isLoading:T,isPlaceholderData:R,error:ge,hasNextPage:Le,isFetchingNextPage:be,isFetchNextPageError:Ue,fetchNextPage:He}=Nt(C?["shop-items",F]:["catalog-items",L],r=>C?dt({...F,first:xe,skip:r}):pt({...L,first:xe,skip:r}),{enabled:j!=="names"}),U=y,{data:ye,isError:Oe,isPending:De}=Pe(),Ge=r=>ye&&r.manaWei?We(r.manaWei,ye):null,qe=C&&De&&z.some(r=>r.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 r=JSON.stringify({category:j,subCategory:d,rarities:a,min:k,max:E,sort:v,status:f,smart:u});if(H.current==="__init__"||H.current===r){H.current=r;return}H.current=r,Q("Shop Applied Filter",{filters:{category:j,sub_category:d,rarities:a,min_price_credits:k??null,max_price_credits:E??null,status:f,smart:u,sort:v},result_count:U})},[j,d,a,k,E,v,f,u,T,R,U]);function ve(r){p({category:r,subCategory:null})}function $e(r){p({status:r})}function Ce(r){p({rarities:a.includes(r)?a.filter(I=>I!==r):[...a,r]})}function Ze(){p(h)}const P=[];(k!=null||E!=null)&&P.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const r of zt)a.includes(r)&&P.push({key:`rarity-${r}`,label:ct(r),onRemove:()=>Ce(r)});return u&&P.push({key:"smart",label:n("filter.smart"),onRemove:()=>p({smart:!1})}),f!=="on_sale"&&P.push({key:"status",label:f==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>$e("on_sale")}),e.jsxs(ht,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(xt,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(mt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(ft,{children:[e.jsx(ut,{children:n("assets.filters")}),e.jsx(gt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(bt,{children:e.jsx(yt,{category:j,subCategory:d,onCategory:ve,onSub:r=>p({subCategory:r}),priceMin:m,priceMax:g,onPriceMin:r=>p({priceMin:r}),onPriceMax:r=>p({priceMax:r}),rarities:a,onToggleRarity:Ce,status:f,onStatus:$e,smart:u,onSmart:r=>p({smart:r})})}),e.jsx(wt,{children:e.jsx(jt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(vt,{children:j==="names"?e.jsx(ds,{onBack:()=>ve("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(It,{sort:v,onSort:r=>p({sort:r}),total:y,loading:T||R,query:l,onOpenFilters:()=>$(!0),chips:P,onClearChips:Ze}),Oe&&C&&z.some(r=>r.source==="legacy")?e.jsx($t,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ge?e.jsx(Pt,{message:n("assets.loadError"),testId:"browse-error"}):null,!we&&z.length===0&&!ge?e.jsxs(Ct,{"data-testid":"browse-empty",children:[e.jsx(kt,{src:ps,alt:""}),e.jsxs(St,{children:[e.jsx(Et,{children:n("assets.empty.title")}),e.jsx(_t,{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(Tt,{children:e.jsx(Rt,{type:"button",onClick:()=>o("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Zt,{"data-testid":"grid",children:we?e.jsx(ke,{count:Ve}):e.jsxs(e.Fragment,{children:[z.map(r=>{if(!C)return e.jsx(D,{item:r,mode:"view"},G(r));const I=r;if(I.source!=="legacy")return e.jsx(D,{item:r},G(r));const O=Ge(I);return O==null?e.jsx(D,{item:r,mode:"view"},G(r)):e.jsx(D,{item:{...I,priceCredits:O}},G(r))}),be?e.jsx(ke,{count:6}):null]})}),e.jsx(Mt,{hasNextPage:Le,isFetching:be,isError:Ue,onLoadMore:()=>void He()})]})]})})]})}export{Is as Assets};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as
|
|
1
|
+
import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as ae,a as re,b as le}from"./categories-H_VhO6tt.js";import{n as c,T as ce}from"./Tooltip-LzdtnJQn.js";import{t as e,s as o,I as g,b as s,ai as W,C as v}from"./index-CVSHcMd8.js";const de=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -89,18 +89,18 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
89
89
|
justify-content: center;
|
|
90
90
|
gap: 6px;
|
|
91
91
|
padding: 8px 4px 0;
|
|
92
|
-
`,
|
|
92
|
+
`,N=o.label`
|
|
93
93
|
display: flex;
|
|
94
94
|
flex: 1;
|
|
95
95
|
min-width: 0;
|
|
96
96
|
flex-direction: column;
|
|
97
97
|
gap: 4px;
|
|
98
|
-
`,
|
|
98
|
+
`,P=o.span`
|
|
99
99
|
font-family: ${e.font.sans};
|
|
100
100
|
font-weight: 400;
|
|
101
101
|
font-size: 12px;
|
|
102
102
|
color: ${e.colors.muted};
|
|
103
|
-
`,
|
|
103
|
+
`,E=o.span`
|
|
104
104
|
display: flex;
|
|
105
105
|
align-items: center;
|
|
106
106
|
gap: 4px;
|
|
@@ -117,7 +117,7 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
117
117
|
width: 16px;
|
|
118
118
|
height: 16px;
|
|
119
119
|
color: ${e.colors.text};
|
|
120
|
-
`,
|
|
120
|
+
`,I=o.input`
|
|
121
121
|
width: 100%;
|
|
122
122
|
min-width: 0;
|
|
123
123
|
border: 0;
|
|
@@ -162,7 +162,7 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
162
162
|
right: ${({maxPct:i})=>`${100-i}%`};
|
|
163
163
|
background: ${e.colors.rarity};
|
|
164
164
|
border-radius: 2px;
|
|
165
|
-
`,
|
|
165
|
+
`,A=o.input`
|
|
166
166
|
position: absolute;
|
|
167
167
|
top: 0;
|
|
168
168
|
left: 0;
|
|
@@ -201,14 +201,14 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
201
201
|
align-items: center;
|
|
202
202
|
justify-content: space-between;
|
|
203
203
|
padding: 12px 4px 0;
|
|
204
|
-
`,
|
|
204
|
+
`,H=o.span`
|
|
205
205
|
display: inline-flex;
|
|
206
206
|
align-items: center;
|
|
207
207
|
gap: 2px;
|
|
208
208
|
font-family: ${e.font.sans};
|
|
209
209
|
font-size: 13px;
|
|
210
210
|
color: ${e.colors.text};
|
|
211
|
-
`,
|
|
211
|
+
`,L=o(g)`
|
|
212
212
|
width: 16px;
|
|
213
213
|
height: 16px;
|
|
214
214
|
color: ${e.colors.text};
|
|
@@ -245,13 +245,13 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
245
245
|
border-radius: 4px;
|
|
246
246
|
background: ${({color:i})=>i};
|
|
247
247
|
flex: none;
|
|
248
|
-
`,
|
|
248
|
+
`,Ce=o(g)`
|
|
249
249
|
position: absolute;
|
|
250
250
|
inset: 0;
|
|
251
251
|
width: 16px;
|
|
252
252
|
height: 16px;
|
|
253
253
|
color: ${e.colors.white};
|
|
254
|
-
`,
|
|
254
|
+
`,ze=o("span",c("selected"))`
|
|
255
255
|
font-family: ${e.font.sans};
|
|
256
256
|
font-weight: ${({selected:i})=>i?600:400};
|
|
257
257
|
font-size: 12px;
|
|
@@ -296,11 +296,11 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
296
296
|
${e.media.maxWidth("lg")} {
|
|
297
297
|
height: 52px;
|
|
298
298
|
}
|
|
299
|
-
`,
|
|
299
|
+
`,Ee=o.div`
|
|
300
300
|
display: flex;
|
|
301
301
|
align-items: center;
|
|
302
302
|
gap: 6px;
|
|
303
|
-
`,
|
|
303
|
+
`,Fe=o(g)`
|
|
304
304
|
width: 14px;
|
|
305
305
|
height: 14px;
|
|
306
306
|
color: ${e.colors.text};
|
|
@@ -350,7 +350,7 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
350
350
|
width: 40px;
|
|
351
351
|
height: 22px;
|
|
352
352
|
}
|
|
353
|
-
`,
|
|
353
|
+
`,Le=o("span",c("on"))`
|
|
354
354
|
position: absolute;
|
|
355
355
|
top: 50%;
|
|
356
356
|
left: ${({on:i})=>i?"calc(100% - 12px)":"0px"};
|
|
@@ -367,7 +367,7 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
367
367
|
height: 18px;
|
|
368
368
|
left: ${({on:i})=>i?"calc(100% - 18px)":"2px"};
|
|
369
369
|
}
|
|
370
|
-
`,d=1e5;function
|
|
370
|
+
`,d=1e5;function Be(i){var l;for(const h of re){const p=(l=h.subs)==null?void 0:l.find(a=>a.key===i);if(p)return s(p.labelKey)}return i}function j({title:i,open:l,onToggle:h,summary:p,desktopStatic:a,headerTestId:x,headerAria:f,children:u}){const m=t.jsx(le,{up:l,size:24,color:e.colors.text});return t.jsxs(pe,{children:[t.jsxs(xe,{type:"button",desktopStatic:a,onClick:h,"aria-expanded":l,"aria-label":f,"data-testid":x,children:[t.jsx(he,{children:i}),a?t.jsx(me,{children:m}):m]}),!l&&p?t.jsx(ge,{desktopHidden:a,children:p}):null,t.jsx(fe,{open:l,desktopStatic:a,children:t.jsx(ue,{children:u})})]})}function Ye({category:i,subCategory:l,onCategory:h,onSub:p,priceMin:a,priceMax:x,onPriceMin:f,onPriceMax:u,rarities:m,onToggleRarity:B,status:S,onStatus:D,smart:b,onSmart:O,hideNames:_=!1,collections:z=!1,onCollections:M}){const[Y,K]=$.useState(!0),[U,q]=$.useState(!0),[G,V]=$.useState(!1),[X,J]=$.useState(!0),R=a&&!Number.isNaN(Number(a))?Number(a):void 0,C=x&&!Number.isNaN(Number(x))?Number(x):void 0,w=R!=null?Math.min(R,d):0,y=C!=null?Math.min(C,d):d,Q=w/d*100,Z=y/d*100;function ee(n){const r=Math.min(n,y);f(r<=0?"":String(r))}function te(n){const r=Math.max(n,w);u(r>=d?"":String(r))}const oe=z?s("categories.collections"):l?Be(l):i!=="wearable"?s(`categories.${i==="emote"?"emotes":i==="all"?"shopAll":i}`):"",ie=R!=null||C!=null?`${a||"0"}-${x||"∞"}`:"",ne=T.filter(n=>m.includes(n)).map(W).join(", "),se=S==="on_sale"?s("filter.onSale"):S==="not_for_sale"?s("filter.notForSale"):"";return t.jsxs(de,{children:[t.jsx(j,{title:s("assets.category"),open:Y,onToggle:()=>K(n=>!n),summary:oe,desktopStatic:!0,children:t.jsx(ae,{category:i,subCategory:l,onCategory:h,onSub:p,hideNames:_,collections:z,onCollections:M})}),t.jsx(k,{}),t.jsxs(j,{title:s("filter.price"),open:U,onToggle:()=>q(n=>!n),summary:ie,desktopStatic:!0,children:[t.jsxs(be,{children:[t.jsxs(N,{children:[t.jsx(P,{children:s("assets.min")}),t.jsxs(E,{children:[t.jsx(F,{name:v.iconName,"aria-hidden":!0}),t.jsx(I,{type:"number",min:"0","aria-label":s("assets.minPriceAria"),placeholder:"0",value:a,onChange:n=>f(n.target.value)})]})]}),t.jsx(we,{children:s("assets.priceTo")}),t.jsxs(N,{children:[t.jsx(P,{children:s("assets.max")}),t.jsxs(E,{children:[t.jsx(F,{name:v.iconName,"aria-hidden":!0}),t.jsx(I,{type:"number",min:"0","aria-label":s("assets.maxPriceAria"),placeholder:"0",value:x,onChange:n=>u(n.target.value)})]})]})]}),t.jsxs(ye,{children:[t.jsx($e,{"aria-hidden":!0}),t.jsx(ve,{minPct:Q,maxPct:Z,"aria-hidden":!0}),t.jsx(A,{type:"range",min:0,max:d,value:w,"aria-label":s("assets.minPriceSliderAria"),onChange:n=>ee(Number(n.target.value))}),t.jsx(A,{type:"range",min:0,max:d,value:y,"aria-label":s("assets.maxPriceSliderAria"),onChange:n=>te(Number(n.target.value))})]}),t.jsxs(ke,{children:[t.jsxs(H,{children:[t.jsx(L,{name:v.iconName,"aria-hidden":!0}),w.toLocaleString()]}),t.jsxs(H,{children:[t.jsx(L,{name:v.iconName,"aria-hidden":!0}),y.toLocaleString()]})]})]}),t.jsx(k,{}),t.jsx(j,{title:s("assets.rarity"),open:G,onToggle:()=>V(n=>!n),summary:ne,headerTestId:"sidebar-section-toggle",children:t.jsx(je,{"data-testid":"rarity-filter",children:T.map(n=>{const r=m.includes(n);return t.jsxs(Se,{type:"button",selected:r,"aria-pressed":r,onClick:()=>B(n),"data-testid":"rarity-filter-check",children:[t.jsx(Re,{color:e.rarities[n],children:r?t.jsx(Ce,{name:"check","aria-hidden":!0}):null}),t.jsx(ze,{selected:r,children:W(n)})]},n)})})}),t.jsx(k,{}),t.jsx(j,{title:s("filter.status"),open:X,onToggle:()=>J(n=>!n),summary:se,children:[["all",s("filter.statusAll")],["on_sale",s("filter.onSale")],["not_for_sale",s("filter.notForSale")]].map(([n,r])=>t.jsxs(Te,{children:[t.jsx(We,{type:"radio",name:"shop-status",checked:S===n,onChange:()=>D(n)}),t.jsx(Ne,{children:r})]},n))}),t.jsx(k,{}),t.jsxs(Pe,{children:[t.jsxs(Ee,{children:[t.jsx(Fe,{name:"smart","aria-hidden":!0}),t.jsx(Ie,{children:s("filter.smart")}),t.jsx(ce,{content:s("filter.smartHint"),placement:"bottom",children:t.jsx(Ae,{name:"info",role:"img","aria-label":s("filter.smartHint"),tabIndex:0,"data-testid":"smart-hint"})})]}),t.jsx(He,{type:"button",role:"switch",on:b,"aria-checked":b,"aria-label":s("filter.smart"),onClick:()=>O(!b),children:t.jsx(Le,{on:b})})]})]})}const Ke=o.div`
|
|
371
371
|
position: relative;
|
|
372
372
|
display: flex;
|
|
373
373
|
gap: 32px;
|
|
@@ -632,4 +632,4 @@ import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as se,a as ae,b a
|
|
|
632
632
|
outline: 2px solid ${e.colors.accent};
|
|
633
633
|
outline-offset: 2px;
|
|
634
634
|
}
|
|
635
|
-
`;export{Qe as C,k as D,ot as E,j as F,Ue as M,je as R,Te as S,Se as a,Re as b,
|
|
635
|
+
`;export{Qe as C,k as D,ot as E,j as F,Ue as M,je as R,Te as S,Se as a,Re as b,Ce as c,ze as d,We as e,Ne as f,Ke as g,Ve as h,qe as i,Xe as j,Je as k,Ge as l,Ze as m,et as n,Ye as o,nt as p,st as q,at as r,rt as s,lt as t,tt as u,it as v};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i,L as _,r as F}from"./react-OEOSdkUk.js";import{s as n,B as G,t as a,w as D,x as P,b as e,o as W,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 _,r as F}from"./react-OEOSdkUk.js";import{s as n,B as G,t as a,w as D,x as P,b as e,o as W,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-CVSHcMd8.js";import{c as J,d as U,b as V,e as Y,s as tt,a as it}from"./authorizations-Iqbcv5YT.js";import{f as et}from"./builder-ProoRnNv.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-B4qBuIpC.js";import"./sentry-B60WY-np.js";import"./dcl-schemas-CmtP3U6y.js";import"./ethers-lk3HAbPB.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-DMlBIjFr.js";const nt=D`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,st=D`
|
|
4
4
|
to { background-position: -200% 0; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as Se,r as P,e as Zt,d as ea}from"./react-OEOSdkUk.js";import{t as le,s as i,b as a,aD as de,
|
|
1
|
+
import{j as e,L as Se,r as P,e as Zt,d as ea}from"./react-OEOSdkUk.js";import{t as le,s as i,b as a,aD as de,ba as ta,aC as aa,I as H,z as St,ah as Ke,x as sa,S as Q,aj as ot,o as na,q as ia,v as ra,bb as oa,A as ca,bc as da,ak as la,bd as ua,be as ct,bf as ha,bg as pa,y as ga,bh as dt,V as G,bi as lt,bj as xa,F as ae,r as ma,c as ut,bk as fa,C as ya,bl as ht,bm as Be,bn as ba,bo as fe,bp as ye,bq as pt,g as be,f as va,h as Re,br as wa}from"./index-CVSHcMd8.js";import{M as Ca,S as ja,C as ka,H as Sa,a as $a,T as Ma,X as Ta,b as Ia,B as Pa,c as za,d as gt,e as Aa,f as je,P as $t,m as Ea,g as qa,h as Ba,i as Ra,j as Mt,k as ke,L as _a,l as Wa,n as xt,o as mt,W as Fa,p as La,q as Ka,A as Ua,r as Na,s as Qa,t as Ha,u as Oa,v as Va,w as Ga,x as Da,y as Ya,z as Ja,D as Xa,E as Za,F as es,G as ts,I as as,J as ss,K as _e,N as ns,O as is,Q as rs,R as os,U as ft,V as yt,Y as cs,Z as ds,_ as ls}from"./CollectionCarousel-CvBagdhU.js";import{k as us,l as hs,a as ps,n as gs,f as xs,A as ms}from"./authorizations-Iqbcv5YT.js";import{g as fs,j as We}from"./buy-CO7pIdYC.js";import{b as ys,w as bs,S as bt,G as vs}from"./buy-gasless-JMjDmvgb.js";import{u as ws,M as Cs,R as ve,r as js,c as ks,p as vt}from"./useCreditPacks-9iynvt9I.js";import{i as Ss,a as $s}from"./errors-B4qBuIpC.js";import{E as Ms}from"./ErrorNotice-CFWuvsq7.js";import"./sentry-B60WY-np.js";import"./dcl-schemas-CmtP3U6y.js";import"./ethers-lk3HAbPB.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-DMlBIjFr.js";const{colors:se,radius:Ts}=le,Is=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -58,7 +58,7 @@ import{j as e,L as Se,r as P,e as Zt,d as ea}from"./react-OEOSdkUk.js";import{t
|
|
|
58
58
|
font-weight: 700;
|
|
59
59
|
color: ${se.text};
|
|
60
60
|
}
|
|
61
|
-
`,qs="https://cdn.decentraland.org/@dcl/shop/0.8.1-
|
|
61
|
+
`,qs="https://cdn.decentraland.org/@dcl/shop/0.8.1-31012874824.commit-6e7ed18/_assets/buy-error-22UunaPC.png";function Bs(o){const{phase:l,balanceCredits:I,onClose:z}=o,W=l==="processing",D=l==="error"?a("cartCheckout.errorTitle"):l==="nofunds"?a("cartCheckout.titleNoFunds"):l==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),Y=l==="processing";return e.jsxs(Ca,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(ja,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(ka,{"data-tall":Y||void 0,children:[e.jsxs(Sa,{children:[e.jsxs($a,{children:[e.jsx(Ma,{children:D}),!W&&e.jsx(Ta,{onClick:z,"aria-label":a("buyModal.close"),children:e.jsx(Ia,{})})]}),e.jsxs(Pa,{children:[e.jsx(za,{children:l==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(gt,{}),e.jsx(Aa,{children:de(I)})]})]}),l==="choose"&&e.jsxs(je,{children:[e.jsxs(Es,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(gt,{}),de(o.totalCredits??0)]})]}),e.jsx($t,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=Ea(o.totalCents??0,o.totalManaWei??0n);return A!=null?a("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&e.jsx(Rs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&e.jsx(_s,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:z}),l==="error"&&e.jsxs(je,{children:[e.jsxs(qa,{"data-testid":"buy-error",children:[e.jsx(Ba,{src:qs,alt:"",width:64,height:80}),e.jsxs(Ra,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.message??a("cartCheckout.errorBody")]})]}),e.jsxs(Mt,{children:[e.jsx(ke,{"data-variant":"outline",onClick:z,children:a("buyModal.cancel")}),e.jsx(ke,{"data-variant":"purple",onClick:o.onRetry??z,children:a("cartCheckout.tryAgain")})]})]})]})]})}function Rs({stage:o,step:l,total:I,isSelfCustody:z,signatures:W}){const D=o==="reserving",Y=I>0?Math.min(100,Math.round(l/I*100)):0,A=z&&W&&W.total>1,ne=o==="awaiting-signature"?z?A?a("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):o==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(je,{"data-processing":!0,children:[e.jsx(_a,{src:ta,alt:"",width:61,height:61}),e.jsx(Wa,{children:ne}),D?e.jsxs(Is,{children:[e.jsx(xt,{"aria-hidden":!0,children:e.jsx(mt,{"data-step":!0,style:{width:`${Y}%`}})}),I>1?e.jsxs(Ps,{children:[l,"/",I]}):null]}):e.jsx(xt,{"aria-hidden":!0,children:e.jsx(mt,{})})]})}function _s({lines:o,shortfallCredits:l,packs:I,selectedPack:z,onSelectPack:W,onBuyPacks:D,onCancel:Y}){const A=I.find(n=>n.id===z),ne=o.reduce((n,L)=>n+(L.quantity??1),0);return e.jsxs(je,{children:[e.jsxs(Fa,{"data-testid":"nofunds-warning",children:[e.jsx(La,{}),e.jsxs(Ka,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",a("buyModal.warningToPurchase",{count:ne})]})]}),e.jsx(zs,{children:o.map(n=>{const L=n.quantity??1;return e.jsxs(Ua,{children:[e.jsx(Na,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Qa,{children:[e.jsxs("div",{children:[e.jsxs(Ha,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),L>1?e.jsx(As,{children:a("cartCheckout.qty",{count:L})}):null]}),n.item.creator?e.jsx(Oa,{address:n.item.creator}):null]}),e.jsxs(Va,{children:[e.jsx(Ga,{}),e.jsx("span",{children:de(n.priceCredits*L)})]})]})]},n.item.id)})}),e.jsx(Da,{children:I.map(n=>{const L=n.id===z;return e.jsxs(Ya,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>W(n.id),children:[e.jsx(Ja,{}),e.jsx(Xa,{children:de(n.credits)}),e.jsxs(Za,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(es,{children:[e.jsxs(ts,{children:[e.jsx(as,{}),e.jsx("span",{children:de((A==null?void 0:A.credits)??0)})]}),e.jsxs(ss,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),e.jsxs(Mt,{children:[e.jsx(ke,{"data-variant":"outline",onClick:Y,children:a("buyModal.cancel")}),e.jsx(ke,{"data-variant":"gradient",onClick:D,children:a("buyModal.buy")})]})]})}const{colors:r,gradients:Tt,radius:Z}=le,It="@media (max-width: 1080px)",T="@media (max-width: 880px)",wt=i.div`
|
|
62
62
|
max-width: 1510px;
|
|
63
63
|
margin: 0 auto;
|
|
64
64
|
/* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ad as N,ae as w,af as o,ag as n,ah as D,w as M}from"./index-
|
|
1
|
+
import{ad as N,ae as w,af as o,ag as n,ah as D,w as M}from"./index-CVSHcMd8.js";import{r as U,j as g}from"./react-OEOSdkUk.js";import{g as z,a as E,c as I,b as F}from"./clsx-WwvpwSg0.js";import{s as v}from"./styled-xfEmbNHB.js";function K(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|