@dcl/shop 1.0.2-31055297774.commit-b808071 → 1.0.2-31061650925.commit-fa244eb
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-BGVAnqbp.js → Activity-DAMRT2bN.js} +3 -3
- package/_assets/{AnimatedBackground-BacIzfr9.js → AnimatedBackground-N_wcSf6D.js} +1 -1
- package/_assets/{Assets-Bs3sIn09.js → Assets-7wgiv5MU.js} +10 -9
- package/_assets/{Assets.styles-CkO8eYMZ.js → Assets.styles-9R6ppWqo.js} +1 -1
- package/_assets/Authorizations-DCP2Yevg.js +191 -0
- package/_assets/{Cart-CfbLgf8G.js → Cart-CpLaRQWb.js} +2 -2
- package/_assets/{CircularProgress-1YXgiQtT.js → CircularProgress-BYXbDw8X.js} +1 -1
- package/_assets/{Collection-DKA_h7HO.js → Collection-CA94Ylrk.js} +1 -1
- package/_assets/{CollectionCarousel-COMBJtj4.js → CollectionCarousel-BkFV4le7.js} +1 -1
- package/_assets/{Confetti-BSUE6v15.js → Confetti-D7bsXMqQ.js} +1 -1
- package/_assets/{Creator-Chfg4XCW.js → Creator-DWKYxWTB.js} +1 -1
- package/_assets/{ErrorNotice-aOead5te.js → ErrorNotice-CCsvrT3H.js} +1 -1
- package/_assets/{ExchangeController-D9wO5y3j.js → ExchangeController-KIbY1TeV.js} +1 -1
- package/_assets/{Faq-BUcIgNDP.js → Faq-YyrvPI25.js} +1 -1
- package/_assets/{GetCredits-BLECOB-N.js → GetCredits-gCz6CMY3.js} +1 -1
- package/_assets/{Grow-zqUJtnL7.js → Grow-B6W2xyXd.js} +1 -1
- package/_assets/{HelpersUtil-BrmwLkkp.js → HelpersUtil-BmHoBPAz.js} +1 -1
- package/_assets/{ItemDetail-B2vKg-9Z.js → ItemDetail-DsP2PTh3.js} +234 -229
- package/_assets/LazyEmoteControls-lVtDIvME.js +2 -0
- package/_assets/{LoadMore-Cy9OoEJz.js → LoadMore-ChGcAM1i.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-B9-hTa3D.js → ManaPricingBanner.styles-CZgGH3OR.js} +1 -1
- package/_assets/{MyAssets-CHgc1ZcI.js → MyAssets-jgTQywGo.js} +2 -2
- package/_assets/{MyFavorites-DWo1mliw.js → MyFavorites-B_oQzUR9.js} +1 -1
- package/_assets/NotFound-CjDp1Ys_.js +17 -0
- package/_assets/{NotificationsBell-Cg5PqU4H.js → NotificationsBell-Dkr9JB0w.js} +1 -1
- package/_assets/{OutfitDetail-DF87HN6H.js → OutfitDetail-BNlw-NwV.js} +1 -1
- package/_assets/{OutfitPreview-IPt5zFQ2.js → OutfitPreview-J5m3e8Gl.js} +1 -1
- package/_assets/OutfitStudio-xpf5tPAA.js +556 -0
- package/_assets/StoreSettings-BkFED3xP.js +243 -0
- package/_assets/{Success-B_ZedKxN.js → Success-lmJVKgtL.js} +1 -1
- package/_assets/{SwapController-DEl6q4-5.js → SwapController-DKvQsgHw.js} +1 -1
- package/_assets/{Tooltip-CfAbMWhJ.js → Tooltip-BBYuQHQb.js} +1 -1
- package/_assets/{TradeService-DCGCUpYo.js → TradeService-CkbprpVw.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-BEUP6hLZ.js → W3MFrameProviderSingleton-6oL2Do5B.js} +3 -3
- package/_assets/{WebCryptoP256-2ShtCeVF.js → WebCryptoP256-6t0_XFco.js} +1 -1
- package/_assets/{authorizations-B17B7Njo.js → authorizations-CbXH-W_L.js} +1 -1
- package/_assets/{basic-Dr3bEQfu.js → basic-DSLXBfxu.js} +1 -1
- package/_assets/{biconomy-3Y8X7VlC.js → biconomy-DKrndD59.js} +1 -1
- package/_assets/{builder-jjuFCu3k.js → builder-CVMQir9d.js} +1 -1
- package/_assets/{buy-wdud8pnf.js → buy-BllmT-mt.js} +1 -1
- package/_assets/{buy-gasless-DoSh-tFa.js → buy-gasless-BuzErI_K.js} +1 -1
- package/_assets/{categories-DGIg36Oc.js → categories-Bjf-PXbG.js} +1 -1
- package/_assets/{ccip-BKrghWQj.js → ccip-DI15Urx-.js} +1 -1
- package/_assets/{ccip-CXCfMVYe.js → ccip-DyRqdu6M.js} +1 -1
- package/_assets/{collectionPage.styles-DwFPJPce.js → collectionPage.styles-BgKDi1Aa.js} +2 -2
- package/_assets/{controller-DdgkWKgL.js → controller-BSVA5WKe.js} +2 -2
- package/_assets/{core-C8S2mN1s.js → core-CflNwoXZ.js} +4 -4
- package/_assets/{createSvgIcon-Cg8ZliIm.js → createSvgIcon-BCgRSx6l.js} +1 -1
- package/_assets/{custom-X9wHG9wg.js → custom-ekboJ4XZ.js} +1 -1
- package/_assets/{data-capture-BgPNXS18.js → data-capture-C00Edv8o.js} +1 -1
- package/_assets/{email-BGdZRw8p.js → email-D7bKqbcO.js} +1 -1
- package/_assets/{embedded-wallet-CqIU9APg.js → embedded-wallet-BgZe_e0-.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-DZbIWeAZ.js → emotion-styled.browser.esm-BsZP4P-B.js} +1 -1
- package/_assets/{engine-CBG8_pF-.js → engine-Cnqy1olA.js} +1 -1
- package/_assets/{errors-BruxKfZB.js → errors-BXmP5k3l.js} +1 -1
- package/_assets/{estimate-l1-fee-k3exg7PR.js → estimate-l1-fee-9ryWwmxC.js} +1 -1
- package/_assets/{execute-RjH3kC63.js → execute-CY4XWL-J.js} +2 -2
- package/_assets/{features-BnDZm8if.js → features-MG4MlDMD.js} +1 -1
- package/_assets/{fetchTokenMetadata-CdUuHqIj.js → fetchTokenMetadata-qCCUs6iE.js} +2 -2
- package/_assets/{field.styles-l0zobCFG.js → field.styles-DEvu6yNO.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-DALoL3Hc.js → get-ecosystem-wallet-info-DEImAnzE.js} +1 -1
- package/_assets/{getBalance-CefhuKko.js → getBalance-J5grsfOj.js} +1 -1
- package/_assets/{getNFT-D-L5zgdP.js → getNFT-ByNh7y6k.js} +1 -1
- package/_assets/{getNFT-nev9rcin.js → getNFT-Dm5aL9u2.js} +1 -1
- package/_assets/{grid.styles-DhFwhKRo.js → grid.styles-CtrXwvIr.js} +1 -1
- package/_assets/{hashTypedData-li6aoa3o.js → hashTypedData-BxKbqj1M.js} +1 -1
- package/_assets/{hashTypedData-BEKwcmlS.js → hashTypedData-CgttwS7E.js} +1 -1
- package/_assets/{in-app-DUJu2O6v.js → in-app-DF-fkkCZ.js} +1 -1
- package/_assets/{in-app-wallet-calls-C9Jxi05O.js → in-app-wallet-calls-D9z1I0uV.js} +1 -1
- package/_assets/{index-DAnXL5-b.js → index--tlhUPhu.js} +1 -1
- package/_assets/{index-BfqVu35d.js → index-7eX0SEVb.js} +1 -1
- package/_assets/{index-zDqeLkyG.js → index-B5TGt1q8.js} +1 -1
- package/_assets/{index-ChBwA1h2.js → index-B6xwPPMs.js} +1 -1
- package/_assets/{index-5uftLGuI.js → index-B7Mvi-Fg.js} +3 -3
- package/_assets/{index-CkF3QZy9.js → index-B7sgFJOZ.js} +1 -1
- package/_assets/{index-CpjzOH1b.js → index-BDPRDW4c.js} +1 -1
- package/_assets/{index-DU9MjygG.js → index-BFgGvh7x.js} +1 -1
- package/_assets/{index-syneNMGM.js → index-BKC-pfo2.js} +1 -1
- package/_assets/{index-DDLK5XSq.js → index-BSmKDErh.js} +1 -1
- package/_assets/{index-1nKs4-Ix.js → index-BZNkhtbZ.js} +1 -1
- package/_assets/{index-3_UdO-zA.js → index-BcQ98rhd.js} +1 -1
- package/_assets/{index-DecRfVMx.js → index-BcW0TBOx.js} +1 -1
- package/_assets/{index-d570G5B7.js → index-BiSRuBrK.js} +1 -1
- package/_assets/{index-CFEHIoaL.js → index-BlIt7KpC.js} +1 -1
- package/_assets/{index-C2_mL_dX.js → index-BsD9lKdu.js} +1 -1
- package/_assets/{index-CvPkDtGf.js → index-BybKxZca.js} +3 -3
- package/_assets/{index-vQ65olfe.js → index-C0xt2SIQ.js} +1 -1
- package/_assets/{index-BwjISY1Q.js → index-C2s-_3dE.js} +1 -1
- package/_assets/{index-Dd4KtrAw.js → index-C5fUw5Ha.js} +1 -1
- package/_assets/{index-BOgrc04A.js → index-C6RxhKIE.js} +1 -1
- package/_assets/{index-HaAGk4bQ.js → index-CAj85Mcv.js} +1 -1
- package/_assets/{index-C7AFAxAx.js → index-CAzui_hj.js} +1 -1
- package/_assets/{index-DXWzE47h.js → index-CIKoh-oU.js} +1 -1
- package/_assets/{index-Xuxrb8Q0.js → index-CKXjZ-Kd.js} +1 -1
- package/_assets/{index-DWiRe-sp.js → index-CbQYrUIv.js} +1 -1
- package/_assets/{index-DrWim4p_.js → index-Cbj1bJsc.js} +1 -1
- package/_assets/{index-DoVK9CTx.js → index-CgKz1pmK.js} +1 -1
- package/_assets/{index-dr6fXYBx.js → index-CjSsletQ.js} +1 -1
- package/_assets/{index-WSwhnTRZ.js → index-CkHS5p_Q.js} +1 -1
- package/_assets/{index-JG0FDNiP.js → index-CpxvlmGa.js} +1 -1
- package/_assets/{index-1wf8L6YU.js → index-CszjRehO.js} +1 -1
- package/_assets/{index-CV1_E3wb.js → index-CuZ7SJno.js} +1 -1
- package/_assets/{index-AKUvJK7K.js → index-CuZGDrIM.js} +1 -1
- package/_assets/{index-B2O7gZoQ.js → index-D20327nw.js} +1 -1
- package/_assets/{index-D-wVNkf3.js → index-D5jN8YQk.js} +2 -2
- package/_assets/{index-CTfBCyyR.js → index-D7dTUoYt.js} +319 -315
- package/_assets/{index-3PUZ8U0R.js → index-D7foy_c1.js} +3 -3
- package/_assets/{index-BlmfBcG1.js → index-DRjhhI6j.js} +1 -1
- package/_assets/{index-Bl-qZqD6.js → index-DVJFosyx.js} +1 -1
- package/_assets/{index-CE124P9G.js → index-DXpGefPo.js} +1 -1
- package/_assets/{index-Ctoo8CLR.js → index-DYQXXAKt.js} +1 -1
- package/_assets/{index-z7leYudl.js → index-D_a1Dj89.js} +2 -2
- package/_assets/{index-Dar3bPlr.js → index-DbCIWeQF.js} +2 -2
- package/_assets/{index-BBNLswz5.js → index-Dc_jl2yy.js} +1 -1
- package/_assets/{index-BXykQ7Kr.js → index-DlewIau_.js} +1 -1
- package/_assets/{index-1--tLqz8.js → index-Fn-DLeUg.js} +1 -1
- package/_assets/{index-CVqec2h5.js → index-Z6tclw43.js} +1 -1
- package/_assets/{index-DjqUHVKK.js → index-gbxeK1C-.js} +1 -1
- package/_assets/{index-DbrCcWJ3.js → index-gmA5M3R1.js} +1 -1
- package/_assets/{index-n49vue3k.js → index-lIySTE8R.js} +1 -1
- package/_assets/{index-BAyG95nG.js → index-zG9t0hxJ.js} +1 -1
- package/_assets/{index.es-yWYRmppU.js → index.es-11O0MAa5.js} +4 -4
- package/_assets/{index.es-DbgkC7jp.js → index.es-6tzroQMk.js} +1 -1
- package/_assets/{index.es-CE2sG7i4.js → index.es-BOuSF7GL.js} +1 -1
- package/_assets/{localBatchGatewayRequest-VK-lqBeb.js → localBatchGatewayRequest-CByVkxJB.js} +1 -1
- package/_assets/{networks-DlOv_Jl5.js → networks-CLAHX11r.js} +1 -1
- package/_assets/{onramp-15oxC79b.js → onramp-X6DWjNa-.js} +1 -1
- package/_assets/{openzeppelin-BpuVaBDh.js → openzeppelin-DWrLU4le.js} +1 -1
- package/_assets/{parseNft-D06uX5gG.js → parseNft-C0F1eSr9.js} +2 -2
- package/_assets/{parseSignature-DGgCDYUH.js → parseSignature-B1BDTVRI.js} +1 -1
- package/_assets/{parseSignature-CnSs3XPr.js → parseSignature-Cfa0bf3p.js} +3 -3
- package/_assets/{passkeys-B8jZMST_.js → passkeys-Bq7ndAcy.js} +1 -1
- package/_assets/{pay-with-exchange-DzV0qz9m.js → pay-with-exchange-DU8q52b9.js} +1 -1
- package/_assets/{qr-overlay-FhG6DCeK.js → qr-overlay-2pcgXiq0.js} +1 -1
- package/_assets/{receive-Bf8iJtVw.js → receive-UZ0WD1OR.js} +1 -1
- package/_assets/{resolveImplementation-DdV3P3Xk.js → resolveImplementation-C5KIPshP.js} +1 -1
- package/_assets/{rpc-BZX60R_2.js → rpc-q5JetAPC.js} +1 -1
- package/_assets/{secp256k1-BLNizqyz.js → secp256k1-C35ing1J.js} +1 -1
- package/_assets/{secp256k1-ChfCRMNj.js → secp256k1-C79pdbKP.js} +1 -1
- package/_assets/{secp256k1-BpFoXgJs.js → secp256k1-CYrjGZQC.js} +1 -1
- package/_assets/{send-CE26RsoC.js → send-_ymraJKw.js} +1 -1
- package/_assets/{send-batch-transaction-CdcLTVn2.js → send-batch-transaction-DkYVZ1xj.js} +1 -1
- package/_assets/{send-eip712-transaction-DFbUyBnM.js → send-eip712-transaction-BzZBuy56.js} +2 -2
- package/_assets/{send-gasless-transaction-IULoS1Vn.js → send-gasless-transaction-ByRZPFH6.js} +2 -2
- package/_assets/{send-transaction-vCrIjEYg.js → send-transaction-CUkh0xRu.js} +2 -2
- package/_assets/{sendMetaTransaction-C5CWJOs0.js → sendMetaTransaction-De85nOcx.js} +1 -1
- package/_assets/{sendRawTransaction-BnXA-t5g.js → sendRawTransaction-D5RykxPX.js} +3 -3
- package/_assets/{serializeTransaction-BuP136Wz.js → serializeTransaction-EYy94JNM.js} +1 -1
- package/_assets/{session-proposal-CnATfxsE.js → session-proposal-Bf_Po3Sl.js} +1 -1
- package/_assets/{session-request-PJjSNFhP.js → session-request-DEDmAqA-.js} +2 -2
- package/_assets/{signing-DVSxcG9z.js → signing-DqKP5KUZ.js} +3 -3
- package/_assets/{skeleton.styles-CLtTv572.js → skeleton.styles-CVQk0siV.js} +1 -1
- package/_assets/{socials-Bf2bVkOp.js → socials-3pLrS-E7.js} +1 -1
- package/_assets/{styled-DUDTxrNz.js → styled-8pFgehSd.js} +1 -1
- package/_assets/{swaps-CfzGwDGN.js → swaps-C-dgABl9.js} +1 -1
- package/_assets/{thirdweb-fPfEaf4k.js → thirdweb-C6_KggNb.js} +3 -3
- package/_assets/{to-serializable-transaction-DXr6jbkS.js → to-serializable-transaction-BWUJjZdO.js} +2 -2
- package/_assets/{transactionReceipt-eQP54mTE.js → transactionReceipt-DmwkwkkP.js} +1 -1
- package/_assets/{transactions-CGh5C6RL.js → transactions-BSJMdJi4.js} +1 -1
- package/_assets/{useCreditPacks-CasKnCD5.js → useCreditPacks-DQxqJepP.js} +1 -1
- package/_assets/{useImportable-SR1m5Hwh.js → useImportable-Co0AaRPY.js} +1 -1
- package/_assets/{useInfiniteGrid-Cy1tipbK.js → useInfiniteGrid-UHC0Jjfu.js} +1 -1
- package/_assets/{useTheme-BvkrK9YA.js → useTheme-B-55uBZP.js} +1 -1
- package/_assets/{verifyHash-Bi_3pzoI.js → verifyHash-BGJh7VH4.js} +1 -1
- package/_assets/{w3m-modal-D57uPD-0.js → w3m-modal-CjXODL26.js} +1 -1
- package/_assets/{w3m-modal-DAkUUjAI.js → w3m-modal-CwXD068w.js} +1 -1
- package/_assets/{wait-for-tx-receipt-ByVNtVUa.js → wait-for-tx-receipt-DRA8zhkS.js} +1 -1
- package/_assets/{wallets-DHJBT8N-.js → wallets-DOXRX-PZ.js} +5 -5
- package/_assets/{web-connector-zzH3rfgh.js → web-connector-CXxJTFl4.js} +3 -3
- package/_assets/{writeContract-BeuidFa5.js → writeContract-BdEWRAPa.js} +1 -1
- package/_assets/{zoraTestnet-D4oN56a_.js → zoraTestnet-CzfX948o.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Authorizations-CLC0gP2S.js +0 -188
- package/_assets/LazyEmoteControls-DnvyzyyY.js +0 -2
- package/_assets/NotFound-CIGIbTGI.js +0 -13
- package/_assets/OutfitStudio-DHyzlXbm.js +0 -537
- package/_assets/StoreSettings-SFcLGWm7.js +0 -239
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-
|
|
2
|
-
import{n as It,bO as At,o as O,v as A,bP as $t,t as s,s as l,w as Lt,B as Et,x as Pt,b as c,ap as Tt,I as $,bQ as et,bR as it,bS as Nt,_ as St,z as P,bT as Ct,A as Ft,bj as q,L as Dt,bU as Mt,E as Ht,bV as Rt,bW as W}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-zG9t0hxJ.js","_assets/react-BYHuwl8r.js","_assets/index-D7dTUoYt.js","_assets/dcl-schemas-CmtP3U6y.js","_assets/sentry-Dx-KuLV3.js","_assets/ethers-BDpbhgX6.js","_assets/intl-CBcMB1D2.js","_assets/index-BYP7oMPZ.css","_assets/useImportable-Co0AaRPY.js","_assets/buy-BllmT-mt.js","_assets/authorizations-CbXH-W_L.js","_assets/sendMetaTransaction-De85nOcx.js","_assets/ManaPricingBanner.styles-CZgGH3OR.js","_assets/Faq-YyrvPI25.js","_assets/field.styles-DEvu6yNO.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as It,bO as At,o as O,v as A,bP as $t,t as s,s as l,w as Lt,B as Et,x as Pt,b as c,ap as Tt,I as $,bQ as et,bR as it,bS as Nt,_ as St,z as P,bT as Ct,A as Ft,bj as q,L as Dt,bU as Mt,E as Ht,bV as Rt,bW as W}from"./index-D7dTUoYt.js";import{r as g,u as zt,j as e,L as rt,e as Ot}from"./react-BYHuwl8r.js";import{u as qt}from"./useImportable-Co0AaRPY.js";import{L as Wt}from"./LoadMore-ChGcAM1i.js";import{u as L}from"./useInfiniteGrid-UHC0Jjfu.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./buy-BllmT-mt.js";import"./authorizations-CbXH-W_L.js";import"./sendMetaTransaction-De85nOcx.js";const _t=15e3;function Gt(t,n){return t.txHash&&n.txHash?t.txHash===n.txHash:t.txHash||n.txHash?!1:t.status===n.status&&Math.abs(t.createdAt-n.createdAt)<=_t}function Bt(t){const n=[...t].sort((i,r)=>r.createdAt-i.createdAt),a=[];for(const i of n){const r=a[a.length-1];r&&Gt(r[r.length-1],i)?r.push(i):a.push([i])}return a.map(i=>{var r;return{id:((r=i.find(o=>o.txHash))==null?void 0:r.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(o=>o.createdAt)),status:Kt(i),totalCredits:i.reduce((o,h)=>o+h.credits,0),lines:i}})}function Kt(t){return t.some(n=>n.status==="PENDING")?"PENDING":t.some(n=>n.status==="SETTLED")?"SETTLED":"EXPIRED"}function Ut(t){return t==="SETTLED"?"SETTLED":t==="EXPIRED"?"FAILED":"PENDING"}function Qt(t){return t.tradeId?`trade:${t.tradeId}`:t.contractAddress&&t.itemId?`item:${t.contractAddress.toLowerCase()}:${t.itemId}`:null}function Vt(t){const n=[],a=new Map;for(const i of t){const r=Qt(i);if(!r){n.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const o=a.get(r);if(o){o.quantity+=1,o.credits+=i.credits;continue}const h={key:r,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};a.set(r,h),n.push(h)}return n}function Xt(t,n){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:n?It(t.manaWei,n):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Yt(t){return t.status!=="EXPIRED"||!!t.submittedTxHash}function Zt(t){const a=Bt(t.purchases.filter(Yt)).map(d=>({kind:"purchase",id:`purchase:${d.id}`,createdAt:d.createdAt,order:d})),i=t.sales.map(d=>{const x=Xt(d,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),r=(t.creditOrders??[]).filter(d=>d.status!=="failed"&&d.status!=="abandoned").map(d=>({kind:"credit",id:`credit:${d.id}`,createdAt:d.createdAt,order:d})),o=new Set(t.purchases.filter(d=>d.txHash).map(d=>d.txHash.toLowerCase())),h=(t.manaPurchases??[]).filter(d=>!o.has(d.txHash.toLowerCase())).map(d=>({kind:"mana-purchase",id:`mana-purchase:${d.id}`,createdAt:d.createdAt,sale:d}));return[...a,...i,...r,...h].sort((d,x)=>x.createdAt-d.createdAt||(d.id<x.id?-1:1))}function Jt(t,n){return n==="all"?t:n==="sales"?t.filter(a=>a.kind==="sale"):t.filter(a=>a.kind==="purchase"||a.kind==="credit"||a.kind==="mana-purchase")}const ct=t=>t.trim().toLowerCase();function te(t){const n=new Map;for(const a of t??[]){const i=ct(a.txHash??"");if(!i)continue;const r=n.get(i);r?r.push(a):n.set(i,[a])}return n}function ee(t,n,a=Date.now()){const i=n.txHash?t.get(ct(n.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const r=i.length===1?ie(i[0].netCents):null,o=i.filter(d=>!d.available&&d.availableAt>a);if(o.length===0)return{kind:"credited",credits:r};const h=o.reduce((d,x)=>Math.max(d,x.availableAt),0);return{kind:"pending",credits:r,availableAt:h}}function ie(t){return At(t)}function ne(){const t=O(i=>{var r;return(r=i.session)==null?void 0:r.address}),{data:n,isLoading:a}=A({queryKey:["listing-count",t],queryFn:()=>$t({creator:t,onSale:!0,first:1}),enabled:!!t,staleTime:5*6e4});return{count:n==null?void 0:n.total,isLoading:a}}const se="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061650925.commit-fa244eb/_assets/credits-product-vs4Q6u6l.svg",_=Lt`
|
|
3
3
|
0% { background-position: 200% 0; }
|
|
4
4
|
100% { background-position: -200% 0; }
|
|
5
5
|
`,ae=l.section`
|
|
@@ -375,4 +375,4 @@ import{n as It,bO as At,o as O,v as A,bP as $t,t as s,s as l,w as Lt,B as Et,x a
|
|
|
375
375
|
color: ${s.colors.softWhite};
|
|
376
376
|
`,be=l(Et)`
|
|
377
377
|
margin-top: 12px;
|
|
378
|
-
`,Y=H.withComponent(rt),ye=g.lazy(()=>St(()=>import("./index-
|
|
378
|
+
`,Y=H.withComponent(rt),ye=g.lazy(()=>St(()=>import("./index-zG9t0hxJ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(t=>({default:t.ImportListings}))),E=24,ve=["all","purchases","sales"],R="section",at="listings",z="view",je="migrate";function I(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function xt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function mt(t){const n=Number(t)/1e18;return Number.isFinite(n)?n.toLocaleString("en",{maximumFractionDigits:2}):"0"}function gt({children:t}){const n=g.useRef(null),[a,i]=g.useState(null),r=()=>{var h;const o=(h=n.current)==null?void 0:h.getBoundingClientRect();o&&i({top:o.bottom+8,left:o.left+o.width/2})};return e.jsxs(xe,{ref:n,tabIndex:0,onMouseEnter:r,onMouseLeave:()=>i(null),onFocus:r,onBlur:()=>i(null),children:[t,a?Ot.createPortal(e.jsx(me,{style:{top:a.top,left:a.left},role:"tooltip",children:c("activity.polygonMana")}),document.body):null]})}function ke({item:t}){const n=!!t.contractAddress&&!!t.itemId,a=!!t.tradeId||n,{data:i,isLoading:r}=A({queryKey:["order-line-display",t.tradeId,t.contractAddress,t.itemId],queryFn:()=>t.tradeId?Rt(t.tradeId):W(t.contractAddress,{itemId:t.itemId}),enabled:a,staleTime:5*6e4}),o=a&&r,h=(i==null?void 0:i.name)??c("activity.itemFallback"),d=(i==null?void 0:i.thumbnail)??"",x=q({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=e.jsxs(e.Fragment,{children:[o?e.jsx(K,{}):e.jsx(B,{children:d?e.jsx("img",{src:d,alt:h}):e.jsx($,{name:"cart",size:20})}),e.jsxs(U,{children:[o?e.jsx(V,{}):e.jsx(Q,{title:h,children:h}),t.quantity>1?e.jsx(X,{children:c("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(fe,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]});return x?e.jsx(Y,{to:x,"data-link":"true",children:f}):e.jsx(H,{children:f})}function we({order:t}){const n=Vt(t.lines),a=n.reduce((o,h)=>o+h.quantity,0),i=Ut(t.status),r=i==="SETTLED"?c("activity.completed"):i==="FAILED"?c("activity.failed"):c("activity.processing");return e.jsxs(T,{"data-testid":"purchase-order",children:[e.jsxs(N,{children:[e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsxs(F,{children:[c("activity.purchaseLabel")," · ",c("activity.itemCount",{count:a})]})]}),e.jsxs(D,{children:[e.jsx(M,{"data-status":i,children:r}),e.jsxs(k,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),i==="FAILED"?e.jsx(ge,{children:c("activity.purchaseFailedNote")}):null,e.jsx(G,{children:n.map(o=>e.jsx(ke,{item:o},o.key))})]})}function Ie({sale:t}){const{data:n,isLoading:a}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>W(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),i=(n==null?void 0:n.name)??c("activity.itemFallback"),r=(n==null?void 0:n.thumbnail)??"",o=q({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,h=e.jsxs(e.Fragment,{children:[a?e.jsx(K,{}):e.jsx(B,{children:r?e.jsx("img",{src:r,alt:i}):e.jsx($,{name:"offer",size:20})}),e.jsxs(U,{children:[a?e.jsx(V,{}):e.jsx(Q,{title:i,children:i}),e.jsx(X,{children:c("activity.boughtFrom",{account:xt(t.seller)})})]})]});return e.jsxs(T,{"data-testid":"activity-mana-purchase",children:[e.jsxs(N,{children:[e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsx(F,{children:c("activity.paidWithMana")})]}),e.jsxs(D,{children:[e.jsx(M,{"data-status":"SETTLED",children:c("activity.completed")}),e.jsxs(k,{children:[mt(t.manaWei)," ",e.jsx(gt,{children:e.jsx(lt,{src:ot,alt:"MANA"})})]})]})]}),e.jsx(G,{children:o?e.jsx(Y,{to:o,"data-link":"true",children:h}):e.jsx(H,{children:h})})]})}function Ae({sale:t,payout:n}){const{data:a,isLoading:i}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>W(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),r=(a==null?void 0:a.name)??c("activity.itemFallback"),o=(a==null?void 0:a.thumbnail)??"",h=q({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,d=e.jsxs(e.Fragment,{children:[i?e.jsx(K,{}):e.jsx(B,{children:o?e.jsx("img",{src:o,alt:r}):e.jsx($,{name:"offer",size:20})}),e.jsxs(U,{children:[i?e.jsx(V,{}):e.jsx(Q,{title:r,children:r}),e.jsxs(X,{children:[c("activity.soldTo",{account:xt(t.counterparty)}),n.kind==="pending"?` · ${c("activity.payoutPendingOn",{date:I(n.availableAt)})}`:""]})]})]});return e.jsxs(T,{"data-testid":"activity-sale",children:[e.jsxs(N,{children:[e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsx(F,{children:c("activity.saleLabel")})]}),e.jsxs(D,{children:[e.jsx(M,{"data-status":n.kind==="pending"?"PENDING":"SOLD",children:n.kind==="pending"?c("activity.payoutPending"):c("activity.sold")}),n.kind==="direct"?e.jsxs(k,{"data-kind":"income",children:["+",mt(t.manaWei)," ",e.jsx(gt,{children:e.jsx(lt,{src:ot,alt:"MANA"})})]}):n.credits!==null?e.jsxs(k,{"data-kind":"income",children:[e.jsx(P,{className:"ccy-mark"})," +",Dt(n.credits)]}):e.jsx(k,{"data-kind":"income",children:c("activity.payoutCredited")})]})]}),e.jsx(G,{children:h?e.jsx(Y,{to:h,"data-link":"true",children:d}):e.jsx(H,{children:d})})]})}function $e({order:t}){const n=`$${(t.usdCents/100).toFixed(2)}`,a=Ct(t.status),i=a==="SETTLED"?c("activity.completed"):a==="FAILED"?c("activity.failed"):a==="UNFINISHED"?c("activity.unfinished"):c("activity.processing"),r=O(p=>p.session),o=Ft(),[h,d]=g.useState(!1),x=t.status==="initiated"&&!!r;async function f(){if(!(!r||h)){d(!0);try{const p=await Mt(t.id,r.identity);if(p){window.location.href=p;return}Ht.info(c("activity.resumeExpired")),o.invalidateQueries({queryKey:["credit-orders"]})}finally{d(!1)}}}return e.jsx(T,{"data-testid":"credit-order",children:e.jsxs(N,{children:[e.jsx(he,{children:e.jsx("img",{src:se,alt:"","aria-hidden":!0})}),e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsxs(F,{children:[c("activity.creditPurchaseLabel")," · ",c("activity.creditPaid",{usd:n})]})]}),e.jsxs(D,{children:[x?e.jsx(pe,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?c("activity.resuming"):c("activity.resume")}):null,e.jsx(M,{"data-status":a,children:i}),e.jsxs(k,{"data-kind":"income",children:["+",e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]})]})})}function Le({filter:t}){const n={all:{icon:"clock",title:c("activity.emptyAllTitle"),body:c("activity.emptyAllBody")},purchases:{icon:"cart",title:c("activity.emptyPurchasesTitle"),body:c("activity.emptyPurchasesBody")},sales:{icon:"offer",title:c("activity.emptySalesTitle"),body:c("activity.emptySalesBody")}}[t];return e.jsxs(ut,{children:[e.jsx($,{name:n.icon,size:40,color:s.colors.muted2}),e.jsx(ht,{children:n.title}),e.jsx(pt,{children:n.body}),t!=="sales"?e.jsx(be,{as:rt,to:"/items",variant:"white",children:c("notFound.cta")}):null]})}function qe(){const{session:t}=O(),[n,a]=g.useState("all"),[i,r]=zt(),o=i.get(R)===at||i.get(z)===je;Pt({title:o?c("seo.import.title"):c("nav.activity"),noindex:!0});const{count:h}=qt(),{count:d}=ne(),f=h!==void 0&&d!==void 0&&(h>0||d>0||o),p=!!t&&!o&&n!=="sales",m=!!t&&!o&&n!=="purchases",b=L(["purchases",t==null?void 0:t.address],u=>Nt(t.address,t.identity,{first:E,skip:u}),{enabled:p}),y=L(["sales",t==null?void 0:t.address],u=>et(t.address,{role:"seller",first:E,skip:u}),{enabled:m}),v=L(["credit-orders",t==null?void 0:t.address],u=>it(t.address,t.identity,{first:E,skip:u}),{enabled:p}),j=L(["mana-purchases",t==null?void 0:t.address],u=>et(t.address,{role:"buyer",first:E,skip:u}),{enabled:p}),{data:Z}=A({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>it(t.address,t.identity,{first:200}).then(u=>u.payouts),enabled:m,staleTime:6e4}),ft=g.useMemo(()=>te(Z),[Z]),{data:bt}=Tt(m);if(!t)return e.jsxs(ut,{children:[e.jsx($,{name:"clock",size:40,color:s.colors.muted2}),e.jsx(ht,{children:c("activity.signInTitle")}),e.jsx(pt,{children:c("activity.signInBody")})]});const J=Jt(Zt({purchases:p?b.items:[],sales:m?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:bt}),n),yt=p&&(b.isLoading||v.isLoading||j.isLoading)||m&&y.isLoading,tt=p&&(b.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||m&&y.isFetchingNextPage,vt=p&&(b.hasNextPage||v.hasNextPage||j.hasNextPage)||m&&y.hasNextPage;function jt(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),m&&y.hasNextPage&&y.fetchNextPage()}function kt(u){if(a(u),!o)return;const w=new URLSearchParams(i);w.delete(R),w.delete(z),r(w,{replace:!0})}function wt(){const u=new URLSearchParams(i);u.set(R,at),u.delete(z),r(u,{replace:!0})}return e.jsxs(ae,{children:[e.jsx(re,{children:e.jsx(oe,{children:c("nav.activity")})}),e.jsxs(ce,{role:"tablist","aria-label":c("nav.activity"),children:[ve.map(u=>e.jsx(dt,{type:"button",role:"tab","aria-selected":!o&&n===u,"data-active":!o&&n===u,"data-testid":`activity-filter-${u}`,onClick:()=>kt(u),children:c(`activity.filter.${u}`)},u)),f?e.jsxs(de,{type:"button",role:"tab","aria-selected":o,"data-active":o,"data-testid":"activity-filter-migrate","aria-label":h?c("activity.migrate.chipAria",{count:h}):void 0,onClick:wt,children:[c("activity.migrate.chip"),h?e.jsx(le,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),o?e.jsx(g.Suspense,{fallback:e.jsx(ue,{"aria-busy":"true"}),children:e.jsx(ye,{})}):yt?e.jsx(nt,{children:Array.from({length:5}).map((u,w)=>e.jsx(st,{},w))}):J.length===0?e.jsx(Le,{filter:n}):e.jsxs(e.Fragment,{children:[e.jsxs(nt,{children:[J.map(u=>u.kind==="purchase"?e.jsx(we,{order:u.order},u.id):u.kind==="credit"?e.jsx($e,{order:u.order},u.id):u.kind==="mana-purchase"?e.jsx(Ie,{sale:u.sale},u.id):e.jsx(Ae,{sale:u.sale,payout:ee(ft,u.sale)},u.id)),tt?e.jsx(st,{}):null]}),e.jsx(Wt,{hasNextPage:vt,isFetching:tt,onLoadMore:jt})]})]})}export{qe as Activity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,j as m}from"./react-BYHuwl8r.js";import{s as d}from"./index-
|
|
1
|
+
import{r as u,j as m}from"./react-BYHuwl8r.js";import{s as d}from"./index-D7dTUoYt.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";const P="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061650925.commit-fa244eb/_assets/custom-welcome-background-BxlFQma9.webp",L="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061650925.commit-fa244eb/_assets/DCL_LogoPattern-BryBPc3d.png",D=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Fe,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Qe}from"./useUrlFilters-DH-gxdfV.js";import{u as Je,S as $e,R as Xe,F as Ye,e as et}from"./categories-
|
|
1
|
+
import{b as Fe,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Qe}from"./useUrlFilters-DH-gxdfV.js";import{u as Je,S as $e,R as Xe,F as Ye,e as et}from"./categories-Bjf-PXbG.js";import{c as L,r as tt,bo as nt,bp as st,aC as it,a as ot,s,t,o as Ie,be as rt,A as at,L as xe,b as n,y as lt,I as E,z as F,b$ as Y,bd as ct,$ as J,bt as dt,bs as pt,x as Ae,ap as Ne,n as Le,q as ht,an as xt,ar as ke,as as G,aI as ft,bM as mt}from"./index-D7dTUoYt.js";import{g as ut,h as gt,i as bt,j as yt,k as wt,C as jt,l as vt,o as Ct,m as $t,n as kt,M as St,u as Tt,E as Et,v as _t,p as Rt,q as Mt,r as zt,s as Ft,t as It}from"./Assets.styles-9R6ppWqo.js";import{L as At}from"./LoadMore-ChGcAM1i.js";import{u as Nt}from"./useInfiniteGrid-UHC0Jjfu.js";import{E as Lt}from"./ErrorNotice-CCsvrT3H.js";import{d as Wt}from"./dcl-schemas-CmtP3U6y.js";import{s as Pt,G as Bt,w as Ht,S as Ut}from"./buy-gasless-BuzErI_K.js";import{s as Ot,k as Gt}from"./buy-BllmT-mt.js";import{f as Dt}from"./errors-BXmP5k3l.js";import{J as qt,C as Zt,B as fe}from"./ethers-BDpbhgX6.js";import{n as Vt}from"./Tooltip-BBYuQHQb.js";import{G as Kt}from"./grid.styles-CtrXwvIr.js";import"./skeleton.styles-CVQk0siV.js";import"./sentry-Dx-KuLV3.js";import"./intl-CBcMB1D2.js";import"./authorizations-CbXH-W_L.js";import"./sendMetaTransaction-De85nOcx.js";function D(i){const r=i.source??"item",l=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${r}:${l}`}const W="100000000000000000000",We=2,X=15,Qt=/^[a-zA-Z0-9]+$/;function Se(i){const r=i.trim();return r.length===0?{ok:!1,reason:"empty"}:Qt.test(r)?r.length<We?{ok:!1,reason:"too-short"}:r.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Jt(i){return i.replace(/[^a-zA-Z0-9]/g,"").slice(0,X)}const Xt=["function available(string _subdomain) view returns (bool)"],Te={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return L.chainId===Number(Wt.ChainId.MATIC_MAINNET)?Te.mainnet:Te.sepolia}async function en(i,r={}){var c;const{rpc:l,address:x}=Yt(),h=new qt(l),d=new Zt(x,Xt,h);console.info(`[names] availability check → DCLRegistrar(${x}).available("${i}") on ${l}`);const p=await d.available(i);if((c=r.signal)!=null&&c.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${p}`),p?"available":"taken"}const tn="https://app.across.to/api";class me extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(i){return it(W,i)}async function sn(i,r,l={}){var c;const x=l.chainId??L.chainId,h=l.provider??"across",d=`${L.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(r)}&chainId=${x}&provider=${h}`,p=await ot(d,{method:"GET",identity:i,metadata:{}});if(!p.ok){let a;try{a=(c=await p.json())==null?void 0:c.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new me:new Error(`fetchNameCreditRoute ${p.status}`)}return p.json()}function on(i,r){const l=fe.from(i.availableAmount),h=fe.from(W).sub(l);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Gt(i.id)}],creditsSignatures:[i.signature],externalCall:{target:r.externalCall.target,selector:r.externalCall.selector,data:r.externalCall.data,expiresAt:r.externalCall.expiresAt,salt:r.externalCall.salt},customExternalCallSignature:r.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:W}}async function rn(i,r={}){const l=tn,x=r.intervalMs??1e4,h=r.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let p=0;p<h;p++){try{const c=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${i}`);if(c.ok){const a=await c.json(),f=(a.status??"pending").toLowerCase(),g=a.fillTx??a.fillTxnRef??null,u=a.actionsSucceeded!==!1;if(f==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:u};if(f==="refunded"||f==="expired")return{status:f,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:g,actionsSucceeded:u}}}catch{}p<h-1&&await new Promise(c=>setTimeout(c,x))}return d}async function an(i){const{name:r,identity:l,signer:x}=i,h=i.chainId??L.chainId,d=i.provider??"across",p=(i.beneficiary??await x.getAddress()).toLowerCase();let c=null,a=!1;console.info("[names] register start",{name:r,buyer:p,chainId:h,provider:d});try{const f=await tt(h),g=nn(f);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:f});const u=await sn(l,r,{chainId:h,provider:d});console.info("[names] step 2/6 route fetched",{target:u.externalCall.target,selector:u.externalCall.selector,provider:u.provider,quoteId:u.quoteId});const v=await nt(l,g);if(c=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),fe.from(v.maxCreditedValue).lt(W))throw new Error("Credit under-sized for the name price");const j=on(v.credit,u);let m;try{m=await Pt({chainId:h,buyer:p,signer:x,args:j})}catch(b){if(!(b instanceof Bt))throw b;m=await Ot(h,j,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:m}),await Ht(m),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:m}),d==="across"){const b=await rn(m,i.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:m};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:m,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:m}}catch(f){if(console.error("[names] register failed — raw error:",f,{name:r,buyer:p,originConfirmed:a}),f instanceof Ut)return{status:"pending",originTxHash:f.txHash};if(c&&!a&&await st(l,[c]).catch(()=>{}),f instanceof me)throw f;const g=new Error(Dt(f,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=f,g}}const ln="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='46.999'%20height='46.999'%20viewBox='0%200%2046.999%2046.999'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vector'%3e%3cpath%20d='M23.5861%2046.999C27.4441%2046.999%2031.1266%2046.1286%2034.3708%2044.475H12.8014C16.0456%2046.1286%2019.6405%2046.999%2023.5861%2046.999Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M8.76807%2041.9509H38.1411C39.1056%2041.1676%2040.1577%2040.2102%2040.7715%2039.514H6.13765C7.01445%2040.3843%207.89126%2041.2547%208.76807%2041.9509Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M25.0767%2034.0307H2.2797C2.80578%2035.0752%203.41955%2036.0326%204.03331%2036.9899H22.5339L25.0767%2034.0307Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M23.5861%200C10.6094%200%200%2010.4442%200%2023.4125C0%2026.2846%200.526084%2029.0697%201.49057%2031.5938L10.6094%2020.7144L15.8702%2014.3608L28.6716%2029.679L32.3542%2025.2402L41.999%2036.7288H42.7882C45.5063%2032.8993%2046.9968%2028.2864%2046.9968%2023.3254C47.1722%2010.4442%2036.5628%200%2023.5861%200ZM15.7825%2012.272C13.9412%2012.272%2012.5383%2010.7924%2012.5383%209.05166C12.5383%207.31095%2014.0289%205.83136%2015.7825%205.83136C17.6238%205.83136%2019.0267%207.31095%2019.0267%209.05166C19.0267%2010.7924%2017.6238%2012.272%2015.7825%2012.272ZM32.8803%2022.8032C29.2853%2022.8032%2026.3919%2019.931%2026.3919%2016.3626C26.3919%2012.7942%2029.2853%209.92201%2032.8803%209.92201C36.4752%209.92201%2039.3686%2012.7942%2039.3686%2016.3626C39.4563%2019.931%2036.4752%2022.8032%2032.8803%2022.8032Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M16.484%2018.7126V31.6808H27.2687L16.484%2018.7126Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M33.1433%2037.164H39.2809L33.1433%2029.766V37.164Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3c/g%3e%3c/svg%3e",cn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061650925.commit-fa244eb/_assets/name-verified-oGwQ3ntb.svg",dn="#34fee6",pn=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -422,7 +422,7 @@ import{b as Fe,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Qe}fr
|
|
|
422
422
|
color: ${t.colors.accent};
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
`;function In({name:i,priceCredits:r,onClose:l}){const{session:x}=Ie(),{data:h,isError:d}=rt(x),p=at(),c=Fe(),[a,f]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),m=w.useRef(!1),b=g.trim().toLowerCase()===i.toLowerCase(),C=a==="completing",$=r!=null?xe(r):"—",k=r==null,T=h==null?void 0:h.credits,I=r!=null&&T!=null?r-T:0,S=I>0,A=k?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:xe(I)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!C&&l()};document.addEventListener("keydown",y);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=_}},[C,l]);async function
|
|
425
|
+
`;function In({name:i,priceCredits:r,onClose:l}){const{session:x}=Ie(),{data:h,isError:d}=rt(x),p=at(),c=Fe(),[a,f]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),m=w.useRef(!1),b=g.trim().toLowerCase()===i.toLowerCase(),C=a==="completing",$=r!=null?xe(r):"—",k=r==null,T=h==null?void 0:h.credits,I=r!=null&&T!=null?r-T:0,S=I>0,A=k?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:xe(I)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!C&&l()};document.addEventListener("keydown",y);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=_}},[C,l]);async function P(){if(!(!x||!b||k||S||m.current)){m.current=!0,f("completing"),j(null);try{const y=await an({name:i,identity:x.identity,signer:x.signer});J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:r??null,settlement:y.status}),p.invalidateQueries({queryKey:["usd-balance"]}),p.invalidateQueries({queryKey:["my-assets"]}),f(y.status==="registered"?"success":"pending")}catch(y){J(pt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:dt(y),purchase_type:"name"}),j(y instanceof me?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),f("error")}finally{m.current=!1}}}const B=a!=="success"&&a!=="pending",M=lt(x==null?void 0:x.providerType);return e.jsx(pn,{onClick:C?void 0:l,role:"presentation",children:e.jsxs(hn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[B&&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:C,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(F,{})," ",Y(h,d)]}),e.jsx(ie,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(Ee,{"aria-hidden":!0,children:"@"}),e.jsxs(re,{children:[e.jsxs(ae,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(le,{children:n("names.subtitle")})]}),e.jsxs(ce,{children:[e.jsx(F,{}),$]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(de,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(_e,{onClick:()=>f("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(gn,{children:[e.jsx(bn,{children:n("names.confirmTitle")}),e.jsx(yn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${An(i)}</b>`})}}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:"@"}),e.jsx(vn,{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(Cn,{children:".dcl.eth"})]})]}),A?e.jsxs(de,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:A})]}):null,e.jsx(_e,{onClick:()=>void P(),disabled:!b||!x||k||S,children:n("names.buyCta")})]})]}),a==="completing"&&e.jsxs($n,{children:[e.jsx(kn,{src:ct,alt:"",width:56,height:56}),e.jsx(Sn,{children:M?n("names.confirming"):n("names.completing")}),e.jsxs(Tn,{children:[e.jsx(En,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(_n,{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(E,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(F,{})," ",Y(h,d)]}),e.jsx(ie,{}),e.jsxs(de,{"data-tone":"info",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(oe,{style:{marginTop:20},children:[e.jsx(Ee,{"aria-hidden":!0,children:"@"}),e.jsxs(re,{children:[e.jsxs(ae,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(le,{children:n("names.subtitle")})]}),e.jsxs(ce,{children:[e.jsx(F,{}),$]})]}),e.jsx(Re,{children:e.jsx(Me,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")})})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.successHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(F,{})," ",Y(h,d)]}),e.jsx(ie,{}),e.jsxs(Rn,{children:[e.jsx(Mn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(zn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(oe,{style:{marginTop:20},children:[e.jsxs(xn,{"data-testid":"name-success-tile",children:[e.jsx(fn,{src:ln,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(mn,{children:[e.jsx("span",{"aria-hidden":!0,children:i}),e.jsx(un,{src:cn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(re,{children:[e.jsxs(ae,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(le,{children:n("names.subtitle")})]}),e.jsxs(ce,{children:[e.jsx(F,{}),$]})]}),e.jsxs(Re,{children:[e.jsx(Me,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")}),e.jsx(Fn,{href:L.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function An(i){return i.replace(/[&<>"']/g,r=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[r])}const Nn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061650925.commit-fa244eb/_assets/identity-B4DXDuJP.webp",Ln="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061650925.commit-fa244eb/_assets/world-B-9aPlxu.webp",Wn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061650925.commit-fa244eb/_assets/invite-BfwIhP2C.webp",Pn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061650925.commit-fa244eb/_assets/governance-DnazlIjy.webp",Bn=s.div`
|
|
426
426
|
width: 100%;
|
|
427
427
|
min-width: 0;
|
|
428
428
|
`,Hn=s.nav`
|
|
@@ -433,25 +433,26 @@ import{b as Fe,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Qe}fr
|
|
|
433
433
|
font-family: ${t.font.sans};
|
|
434
434
|
font-size: 12px;
|
|
435
435
|
line-height: 1;
|
|
436
|
-
color: ${t.colors.
|
|
436
|
+
color: ${t.colors.gray4};
|
|
437
437
|
`,Un=s.button`
|
|
438
438
|
border: 0;
|
|
439
439
|
background: none;
|
|
440
440
|
padding: 0;
|
|
441
441
|
cursor: pointer;
|
|
442
442
|
font: inherit;
|
|
443
|
-
color: ${t.colors.
|
|
443
|
+
color: ${t.colors.gray4};
|
|
444
444
|
|
|
445
445
|
&:hover {
|
|
446
|
+
color: ${t.colors.white};
|
|
446
447
|
text-decoration: underline;
|
|
447
448
|
}
|
|
448
449
|
&:focus-visible {
|
|
449
|
-
outline: 2px solid ${t.colors.
|
|
450
|
+
outline: 2px solid ${t.colors.white};
|
|
450
451
|
outline-offset: 2px;
|
|
451
452
|
}
|
|
452
453
|
`,On=s.span`
|
|
453
454
|
font-weight: 700;
|
|
454
|
-
color: ${t.colors.
|
|
455
|
+
color: ${t.colors.softWhite};
|
|
455
456
|
`,Gn=s.div`
|
|
456
457
|
display: flex;
|
|
457
458
|
flex-direction: column;
|
|
@@ -649,7 +650,7 @@ import{b as Fe,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Qe}fr
|
|
|
649
650
|
font-size: 13px;
|
|
650
651
|
color: ${t.colors.muted2};
|
|
651
652
|
white-space: nowrap;
|
|
652
|
-
`,
|
|
653
|
+
`,Pe=s.button`
|
|
653
654
|
flex: none;
|
|
654
655
|
display: inline-flex;
|
|
655
656
|
align-items: center;
|
|
@@ -685,7 +686,7 @@ import{b as Fe,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Qe}fr
|
|
|
685
686
|
${t.media.maxWidth("mobile")} {
|
|
686
687
|
display: none;
|
|
687
688
|
}
|
|
688
|
-
`,rs=s(
|
|
689
|
+
`,rs=s(Pe)`
|
|
689
690
|
display: none;
|
|
690
691
|
|
|
691
692
|
${t.media.maxWidth("mobile")} {
|
|
@@ -862,4 +863,4 @@ import{b as Fe,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Qe}fr
|
|
|
862
863
|
clip: rect(0, 0, 0, 0);
|
|
863
864
|
white-space: nowrap;
|
|
864
865
|
border: 0;
|
|
865
|
-
`,us="https://docs.decentraland.org/creator/worlds/about/",gs="https://governance.decentraland.org";function bs(i){const r=typeof window<"u"?window.location.hostname:"";return`${r.endsWith("decentraland.org")?"https://decentraland.org":r.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function ys({onBack:i}){Ae({title:n("seo.names.title"),description:n("seo.names.description")});const{session:r,signIn:l}=Ie(),{data:x}=Ne(),h=x?Le(P,x):null,[d,p]=w.useState(""),[c,a]=w.useState("idle"),[f,g]=w.useState(!1),u=w.useRef(null),[v,j]=w.useState(void 0);w.useLayoutEffect(()=>{u.current&&j(u.current.offsetWidth)},[d]),w.useEffect(()=>{if(!Se(d).ok){a(d.length===0?"idle":"invalid");return}a("checking");const T=new AbortController,I=setTimeout(()=>{(async()=>{try{const S=await en(d,{signal:T.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(I),T.abort()}},[d]);const m=Se(d),b=m.ok&&(c==="available"||c==="error");function C(){if(b){if(!r){l();return}g(!0)}}const $=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(as,{children:[e.jsx(F,{}),xe(h)]}):null]});return e.jsxs(Bn,{"data-testid":"names-page",children:[e.jsxs(Hn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Un,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(On,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Gn,{children:[e.jsxs(Dn,{children:[e.jsxs(qn,{children:[e.jsx(Zn,{children:n("names.heroTitle")}),e.jsx(Vn,{children:n("names.heroSubtitle")})]}),e.jsxs(Kn,{children:[e.jsxs(Qn,{"data-testid":"names-input-wrap",children:[e.jsxs(Jn,{invalid:c==="taken",children:[e.jsxs(ts,{children:[e.jsx(ns,{"aria-hidden":!0,children:"@"}),e.jsx(ss,{value:d,onChange:k=>p(Jt(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(Xn,{ref:u,"aria-hidden":!0,children:d||n("names.inputPlaceholder")}),e.jsx(is,{children:n("names.suffix")})]}),d.length>0?e.jsxs(os,{"aria-hidden":!0,children:[d.length,"/",X]}):null,e.jsx(We,{onClick:C,disabled:!b,"data-testid":"names-claim",children:$})]}),c==="taken"?e.jsxs(Yn,{role:"status","data-testid":"names-taken",children:[e.jsx(E,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(es,{href:bs(d),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,c==="checking"?e.jsx(pe,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):c==="error"?e.jsx(pe,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(pe,{tone:"muted",role:"status",children:n("names.tooShort",{min:Pe})}):null]}),e.jsx(rs,{onClick:C,disabled:!b,children:$}),e.jsx(ms,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(cs,{children:[e.jsxs(ds,{children:[e.jsx(ps,{children:n("names.whyTitle")}),e.jsx(hs,{children:n("names.whyIntro")})]}),e.jsxs(xs,{children:[e.jsxs(q,{children:[e.jsx(Z,{src:Nn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why1Title")}),e.jsx(Q,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Ln,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why2Title")}),e.jsxs(Q,{children:[n("names.why2")," ",e.jsx(fs,{children:n("names.why2Address")})]}),e.jsxs(ze,{href:us,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Pn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why3Title")}),e.jsx(Q,{children:n("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Wn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why4Title")}),e.jsx(Q,{children:n("names.why4")}),e.jsxs(ze,{href:gs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(In,{name:d,priceCredits:h,onClose:()=>g(!1)}):null]})}const ws="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",he=48,js=["all","on_sale","not_for_sale"];function Us(){const[i]=Ke(),r=Fe(),l=(i.get("q")??"").trim().toLowerCase(),x=(i.get("q")??"").trim();Ae({title:x?n("seo.collectibles.searchTitle",{query:x}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=w.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[d,p]=Qe(h),{subCategory:c,rarities:a,priceMin:f,priceMax:g,smart:u,sort:v}=d,j=d.category,m=js.includes(d.status)?d.status:"on_sale";Je(`${j}:${c??""}`);const[b,C]=w.useState(!1);w.useEffect(()=>{if(!b)return;const o=O=>{O.key==="Escape"&&C(!1)};document.addEventListener("keydown",o);const z=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=z}},[b]);const $=m==="on_sale",k=f&&!Number.isNaN(Number(f))?Number(f):void 0,T=g&&!Number.isNaN(Number(g))?Number(g):void 0,I=ht(),S=c?et[c]:void 0,A=($e.find(o=>o.key===v)??$e[0]).server,W={category:j,rarities:a.length?a:void 0,wearableCategories:S,minPriceCredits:k,maxPriceCredits:T,search:l||void 0,sortBy:A,isSmart:u||void 0,onSale:!0,listingType:I?void 0:"primary"},B={category:j,rarities:a.length?a:void 0,wearableCategories:S,search:l||void 0,sortBy:A,isWearableSmart:u||void 0,isOnSale:m==="not_for_sale"?!1:void 0},{items:M,total:y,isLoading:_,isPlaceholderData:R,error:ue,hasNextPage:Be,isFetchingNextPage:ge,isFetchNextPageError:He,fetchNextPage:Ue}=Nt($?["shop-items",W]:["catalog-items",B],o=>$?ft({...W,first:he,skip:o}):mt({...B,first:he,skip:o}),{enabled:j!=="names"}),H=y,{data:be,isError:Oe,isPending:Ge}=Ne(),De=o=>be&&o.manaWei?Le(o.manaWei,be):null,qe=$&&Ge&&M.some(o=>o.source==="legacy"),ye=_||R||qe,Ze=_?15:Math.min(Math.max(M.length,1),he),we=w.useRef(null);w.useEffect(()=>{_||R||!l||we.current===l||(we.current=l,J("Shop Searched",{query:l,result_count:H}))},[l,_,R,H]);const U=w.useRef("__init__");w.useEffect(()=>{if(_||R)return;const o=JSON.stringify({category:j,subCategory:c,rarities:a,min:k,max:T,sort:v,status:m,smart:u});if(U.current==="__init__"||U.current===o){U.current=o;return}U.current=o,J("Shop Applied Filter",{filters:{category:j,sub_category:c,rarities:a,min_price_credits:k??null,max_price_credits:T??null,status:m,smart:u,sort:v},result_count:H})},[j,c,a,k,T,v,m,u,_,R,H]);function je(o){p({category:o,subCategory:null})}function ve(o){p({status:o})}function Ce(o){p({rarities:a.includes(o)?a.filter(z=>z!==o):[...a,o]})}function Ve(){p(h)}const N=[];(k!=null||T!=null)&&N.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const o of Xe)a.includes(o)&&N.push({key:`rarity-${o}`,label:xt(o),onRemove:()=>Ce(o)});return u&&N.push({key:"smart",label:n("filter.smart"),onRemove:()=>p({smart:!1})}),m!=="on_sale"&&N.push({key:"status",label:m==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>ve("on_sale")}),e.jsxs(ut,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(gt,{onClick:()=>C(!1),"aria-hidden":!0}):null,e.jsxs(bt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(yt,{children:[e.jsx(wt,{children:n("assets.filters")}),e.jsx(jt,{onClick:()=>C(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx(Ct,{category:j,subCategory:c,onCategory:je,onSub:o=>p({subCategory:o}),priceMin:f,priceMax:g,onPriceMin:o=>p({priceMin:o}),onPriceMax:o=>p({priceMax:o}),rarities:a,onToggleRarity:Ce,status:m,onStatus:ve,smart:u,onSmart:o=>p({smart:o})})}),e.jsx($t,{children:e.jsx(kt,{type:"button",onClick:()=>C(!1),children:n("assets.showItems")})})]})]}),e.jsx(St,{children:j==="names"?e.jsx(ys,{onBack:()=>je("all")}):e.jsxs(e.Fragment,{children:[e.jsx(Ye,{sort:v,onSort:o=>p({sort:o}),total:y,loading:_||R,query:l,onOpenFilters:()=>C(!0),chips:N,onClearChips:Ve}),Oe&&$&&M.some(o=>o.source==="legacy")?e.jsx(Tt,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ue?e.jsx(Lt,{message:n("assets.loadError"),testId:"browse-error"}):null,!ye&&M.length===0&&!ue?e.jsxs(Et,{"data-testid":"browse-empty",children:[e.jsx(_t,{src:ws,alt:""}),e.jsxs(Rt,{children:[e.jsx(Mt,{children:n("assets.empty.title")}),e.jsx(zt,{children:x?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:x}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Ft,{children:e.jsx(It,{type:"button",onClick:()=>r("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:ye?e.jsx(ke,{count:Ze}):e.jsxs(e.Fragment,{children:[M.map(o=>{if(!$)return e.jsx(G,{item:o,mode:"view"},D(o));const z=o;if(z.source!=="legacy")return e.jsx(G,{item:o},D(o));const O=De(z);return O==null?e.jsx(G,{item:o,mode:"view"},D(o)):e.jsx(G,{item:{...z,priceCredits:O}},D(o))}),ge?e.jsx(ke,{count:6}):null]})}),e.jsx(At,{hasNextPage:Be,isFetching:ge,isError:He,onLoadMore:()=>void Ue()})]})]})})]})}export{Us as Assets};
|
|
866
|
+
`,us="https://docs.decentraland.org/creator/worlds/about/",gs="https://governance.decentraland.org";function bs(i){const r=typeof window<"u"?window.location.hostname:"";return`${r.endsWith("decentraland.org")?"https://decentraland.org":r.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function ys({onBack:i}){Ae({title:n("seo.names.title"),description:n("seo.names.description")});const{session:r,signIn:l}=Ie(),{data:x}=Ne(),h=x?Le(W,x):null,[d,p]=w.useState(""),[c,a]=w.useState("idle"),[f,g]=w.useState(!1),u=w.useRef(null),[v,j]=w.useState(void 0);w.useLayoutEffect(()=>{u.current&&j(u.current.offsetWidth)},[d]),w.useEffect(()=>{if(!Se(d).ok){a(d.length===0?"idle":"invalid");return}a("checking");const T=new AbortController,I=setTimeout(()=>{(async()=>{try{const S=await en(d,{signal:T.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(I),T.abort()}},[d]);const m=Se(d),b=m.ok&&(c==="available"||c==="error");function C(){if(b){if(!r){l();return}g(!0)}}const $=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(as,{children:[e.jsx(F,{}),xe(h)]}):null]});return e.jsxs(Bn,{"data-testid":"names-page",children:[e.jsxs(Hn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Un,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(On,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Gn,{children:[e.jsxs(Dn,{children:[e.jsxs(qn,{children:[e.jsx(Zn,{children:n("names.heroTitle")}),e.jsx(Vn,{children:n("names.heroSubtitle")})]}),e.jsxs(Kn,{children:[e.jsxs(Qn,{"data-testid":"names-input-wrap",children:[e.jsxs(Jn,{invalid:c==="taken",children:[e.jsxs(ts,{children:[e.jsx(ns,{"aria-hidden":!0,children:"@"}),e.jsx(ss,{value:d,onChange:k=>p(Jt(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(Xn,{ref:u,"aria-hidden":!0,children:d||n("names.inputPlaceholder")}),e.jsx(is,{children:n("names.suffix")})]}),d.length>0?e.jsxs(os,{"aria-hidden":!0,children:[d.length,"/",X]}):null,e.jsx(Pe,{onClick:C,disabled:!b,"data-testid":"names-claim",children:$})]}),c==="taken"?e.jsxs(Yn,{role:"status","data-testid":"names-taken",children:[e.jsx(E,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(es,{href:bs(d),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,c==="checking"?e.jsx(pe,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):c==="error"?e.jsx(pe,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(pe,{tone:"muted",role:"status",children:n("names.tooShort",{min:We})}):null]}),e.jsx(rs,{onClick:C,disabled:!b,children:$}),e.jsx(ms,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(cs,{children:[e.jsxs(ds,{children:[e.jsx(ps,{children:n("names.whyTitle")}),e.jsx(hs,{children:n("names.whyIntro")})]}),e.jsxs(xs,{children:[e.jsxs(q,{children:[e.jsx(Z,{src:Nn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why1Title")}),e.jsx(Q,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Ln,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why2Title")}),e.jsxs(Q,{children:[n("names.why2")," ",e.jsx(fs,{children:n("names.why2Address")})]}),e.jsxs(ze,{href:us,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Wn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why3Title")}),e.jsx(Q,{children:n("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Pn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why4Title")}),e.jsx(Q,{children:n("names.why4")}),e.jsxs(ze,{href:gs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(In,{name:d,priceCredits:h,onClose:()=>g(!1)}):null]})}const ws="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",he=48,js=["all","on_sale","not_for_sale"];function Us(){const[i]=Ke(),r=Fe(),l=(i.get("q")??"").trim().toLowerCase(),x=(i.get("q")??"").trim();Ae({title:x?n("seo.collectibles.searchTitle",{query:x}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=w.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[d,p]=Qe(h),{subCategory:c,rarities:a,priceMin:f,priceMax:g,smart:u,sort:v}=d,j=d.category,m=js.includes(d.status)?d.status:"on_sale";Je(`${j}:${c??""}`);const[b,C]=w.useState(!1);w.useEffect(()=>{if(!b)return;const o=O=>{O.key==="Escape"&&C(!1)};document.addEventListener("keydown",o);const z=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=z}},[b]);const $=m==="on_sale",k=f&&!Number.isNaN(Number(f))?Number(f):void 0,T=g&&!Number.isNaN(Number(g))?Number(g):void 0,I=ht(),S=c?et[c]:void 0,A=($e.find(o=>o.key===v)??$e[0]).server,P={category:j,rarities:a.length?a:void 0,wearableCategories:S,minPriceCredits:k,maxPriceCredits:T,search:l||void 0,sortBy:A,isSmart:u||void 0,onSale:!0,listingType:I?void 0:"primary"},B={category:j,rarities:a.length?a:void 0,wearableCategories:S,search:l||void 0,sortBy:A,isWearableSmart:u||void 0,isOnSale:m==="not_for_sale"?!1:void 0},{items:M,total:y,isLoading:_,isPlaceholderData:R,error:ue,hasNextPage:Be,isFetchingNextPage:ge,isFetchNextPageError:He,fetchNextPage:Ue}=Nt($?["shop-items",P]:["catalog-items",B],o=>$?ft({...P,first:he,skip:o}):mt({...B,first:he,skip:o}),{enabled:j!=="names"}),H=y,{data:be,isError:Oe,isPending:Ge}=Ne(),De=o=>be&&o.manaWei?Le(o.manaWei,be):null,qe=$&&Ge&&M.some(o=>o.source==="legacy"),ye=_||R||qe,Ze=_?15:Math.min(Math.max(M.length,1),he),we=w.useRef(null);w.useEffect(()=>{_||R||!l||we.current===l||(we.current=l,J("Shop Searched",{query:l,result_count:H}))},[l,_,R,H]);const U=w.useRef("__init__");w.useEffect(()=>{if(_||R)return;const o=JSON.stringify({category:j,subCategory:c,rarities:a,min:k,max:T,sort:v,status:m,smart:u});if(U.current==="__init__"||U.current===o){U.current=o;return}U.current=o,J("Shop Applied Filter",{filters:{category:j,sub_category:c,rarities:a,min_price_credits:k??null,max_price_credits:T??null,status:m,smart:u,sort:v},result_count:H})},[j,c,a,k,T,v,m,u,_,R,H]);function je(o){p({category:o,subCategory:null})}function ve(o){p({status:o})}function Ce(o){p({rarities:a.includes(o)?a.filter(z=>z!==o):[...a,o]})}function Ve(){p(h)}const N=[];(k!=null||T!=null)&&N.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const o of Xe)a.includes(o)&&N.push({key:`rarity-${o}`,label:xt(o),onRemove:()=>Ce(o)});return u&&N.push({key:"smart",label:n("filter.smart"),onRemove:()=>p({smart:!1})}),m!=="on_sale"&&N.push({key:"status",label:m==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>ve("on_sale")}),e.jsxs(ut,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(gt,{onClick:()=>C(!1),"aria-hidden":!0}):null,e.jsxs(bt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(yt,{children:[e.jsx(wt,{children:n("assets.filters")}),e.jsx(jt,{onClick:()=>C(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx(Ct,{category:j,subCategory:c,onCategory:je,onSub:o=>p({subCategory:o}),priceMin:f,priceMax:g,onPriceMin:o=>p({priceMin:o}),onPriceMax:o=>p({priceMax:o}),rarities:a,onToggleRarity:Ce,status:m,onStatus:ve,smart:u,onSmart:o=>p({smart:o})})}),e.jsx($t,{children:e.jsx(kt,{type:"button",onClick:()=>C(!1),children:n("assets.showItems")})})]})]}),e.jsx(St,{children:j==="names"?e.jsx(ys,{onBack:()=>je("all")}):e.jsxs(e.Fragment,{children:[e.jsx(Ye,{sort:v,onSort:o=>p({sort:o}),total:y,loading:_||R,query:l,onOpenFilters:()=>C(!0),chips:N,onClearChips:Ve}),Oe&&$&&M.some(o=>o.source==="legacy")?e.jsx(Tt,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ue?e.jsx(Lt,{message:n("assets.loadError"),testId:"browse-error"}):null,!ye&&M.length===0&&!ue?e.jsxs(Et,{"data-testid":"browse-empty",children:[e.jsx(_t,{src:ws,alt:""}),e.jsxs(Rt,{children:[e.jsx(Mt,{children:n("assets.empty.title")}),e.jsx(zt,{children:x?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:x}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Ft,{children:e.jsx(It,{type:"button",onClick:()=>r("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:ye?e.jsx(ke,{count:Ze}):e.jsxs(e.Fragment,{children:[M.map(o=>{if(!$)return e.jsx(G,{item:o,mode:"view"},D(o));const z=o;if(z.source!=="legacy")return e.jsx(G,{item:o},D(o));const O=De(z);return O==null?e.jsx(G,{item:o,mode:"view"},D(o)):e.jsx(G,{item:{...z,priceCredits:O}},D(o))}),ge?e.jsx(ke,{count:6}):null]})}),e.jsx(At,{hasNextPage:Be,isFetching:ge,isError:He,onLoadMore:()=>void Ue()})]})]})})]})}export{Us as Assets};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as w,j as i}from"./react-BYHuwl8r.js";import{C as _,R as T,a as le,b as de}from"./categories-
|
|
1
|
+
import{r as w,j as i}from"./react-BYHuwl8r.js";import{C as _,R as T,a as le,b as de}from"./categories-Bjf-PXbG.js";import{n as d,T as ce}from"./Tooltip-BBYuQHQb.js";import{s as t,t as e,I as k,b as a,an as E,C as F}from"./index-D7dTUoYt.js";const pe=t.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import{j as i,L as _,r as F}from"./react-BYHuwl8r.js";import{t as o,s as n,B as G,w as N,x as P,b as e,o as B,y as O,I as z,z as K,v as w,A as H,c as Q,D as X,E as A,F as Z,G as J,H as E}from"./index-D7dTUoYt.js";import{c as U,d as V,b as Y,e as tt,s as it,a as et}from"./authorizations-CbXH-W_L.js";import{f as ot}from"./builder-CVMQir9d.js";import{m as at}from"./mana-matic-C4e1sNO3.js";import{f as nt}from"./errors-BXmP5k3l.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-De85nOcx.js";const st=N`
|
|
2
|
+
to { transform: rotate(360deg); }
|
|
3
|
+
`,rt=N`
|
|
4
|
+
to { background-position: -200% 0; }
|
|
5
|
+
`,ct=n.section`
|
|
6
|
+
width: 100%;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
/* Centre heading, intro and rows as ONE block, so the list isn't parked against the left edge of a
|
|
9
|
+
wide page (same treatment as the Activity feed). */
|
|
10
|
+
max-width: 760px;
|
|
11
|
+
margin-inline: auto;
|
|
12
|
+
`,lt=n.div`
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: 6px;
|
|
16
|
+
margin-bottom: 24px;
|
|
17
|
+
`,dt=n.h1`
|
|
18
|
+
font-family: ${o.font.sans};
|
|
19
|
+
margin: 0;
|
|
20
|
+
color: ${o.colors.softWhite};
|
|
21
|
+
`,ut=n.p`
|
|
22
|
+
color: ${o.colors.gray4};
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
margin: 0;
|
|
25
|
+
max-width: 60ch;
|
|
26
|
+
`,k=n.div`
|
|
27
|
+
margin-bottom: 28px;
|
|
28
|
+
`,$=n.h2`
|
|
29
|
+
font-family: ${o.font.sans};
|
|
30
|
+
font-size: 15px;
|
|
31
|
+
font-weight: 700;
|
|
32
|
+
color: ${o.colors.softWhite};
|
|
33
|
+
margin: 0 0 10px;
|
|
34
|
+
`,x=n.div`
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
gap: 12px;
|
|
38
|
+
`,ht=n.div`
|
|
39
|
+
display: grid;
|
|
40
|
+
grid-template-columns: 44px 1fr auto;
|
|
41
|
+
align-items: center;
|
|
42
|
+
gap: 14px;
|
|
43
|
+
padding: 14px 18px;
|
|
44
|
+
background: ${o.colors.white};
|
|
45
|
+
border: 1px solid ${o.colors.line};
|
|
46
|
+
border-radius: 16px;
|
|
47
|
+
|
|
48
|
+
${o.media.maxWidth("mobile")} {
|
|
49
|
+
grid-template-columns: 44px 1fr;
|
|
50
|
+
grid-row-gap: 10px;
|
|
51
|
+
}
|
|
52
|
+
`,T=n.div`
|
|
53
|
+
height: 74px;
|
|
54
|
+
border-radius: 16px;
|
|
55
|
+
background: linear-gradient(100deg, #efeef2 30%, #e2e0e7 50%, #efeef2 70%);
|
|
56
|
+
background-size: 200% 100%;
|
|
57
|
+
animation: ${rt} 1.4s infinite linear;
|
|
58
|
+
|
|
59
|
+
@media (prefers-reduced-motion: reduce) {
|
|
60
|
+
animation: none;
|
|
61
|
+
}
|
|
62
|
+
`,pt=n.img`
|
|
63
|
+
width: 22px !important;
|
|
64
|
+
height: 22px !important;
|
|
65
|
+
object-fit: contain;
|
|
66
|
+
`,mt=n.div`
|
|
67
|
+
width: 44px;
|
|
68
|
+
height: 44px;
|
|
69
|
+
border-radius: 10px;
|
|
70
|
+
background: ${o.colors.media};
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
color: ${o.colors.muted2};
|
|
76
|
+
|
|
77
|
+
img {
|
|
78
|
+
width: 100%;
|
|
79
|
+
height: 100%;
|
|
80
|
+
object-fit: contain;
|
|
81
|
+
}
|
|
82
|
+
`,gt=n.div`
|
|
83
|
+
min-width: 0;
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
gap: 3px;
|
|
87
|
+
`,xt=n.span`
|
|
88
|
+
font-weight: 700;
|
|
89
|
+
color: ${o.colors.text};
|
|
90
|
+
white-space: nowrap;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
text-overflow: ellipsis;
|
|
93
|
+
`,ft=n.span`
|
|
94
|
+
font-size: 13px;
|
|
95
|
+
color: ${o.colors.muted};
|
|
96
|
+
`,yt=n.span`
|
|
97
|
+
font-size: 12px;
|
|
98
|
+
font-weight: 700;
|
|
99
|
+
color: ${o.colors.muted2};
|
|
100
|
+
|
|
101
|
+
&[data-active='true'] {
|
|
102
|
+
color: ${o.colors.okStrong};
|
|
103
|
+
}
|
|
104
|
+
`,bt=n.div`
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
gap: 10px;
|
|
108
|
+
justify-self: end;
|
|
109
|
+
|
|
110
|
+
${o.media.maxWidth("mobile")} {
|
|
111
|
+
grid-column: 1 / -1;
|
|
112
|
+
justify-self: start;
|
|
113
|
+
}
|
|
114
|
+
`,zt=n.button`
|
|
115
|
+
position: relative;
|
|
116
|
+
width: 46px;
|
|
117
|
+
height: 26px;
|
|
118
|
+
flex: 0 0 auto;
|
|
119
|
+
border-radius: ${o.radius.pill};
|
|
120
|
+
border: none;
|
|
121
|
+
background: ${o.colors.gray4};
|
|
122
|
+
cursor: pointer;
|
|
123
|
+
transition: background 0.15s;
|
|
124
|
+
padding: 0;
|
|
125
|
+
|
|
126
|
+
&::after {
|
|
127
|
+
content: '';
|
|
128
|
+
position: absolute;
|
|
129
|
+
top: 3px;
|
|
130
|
+
left: 3px;
|
|
131
|
+
width: 20px;
|
|
132
|
+
height: 20px;
|
|
133
|
+
border-radius: 50%;
|
|
134
|
+
background: ${o.colors.white};
|
|
135
|
+
transition: transform 0.15s;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&[data-active='true'] {
|
|
139
|
+
background: ${o.colors.accent};
|
|
140
|
+
}
|
|
141
|
+
&[data-active='true']::after {
|
|
142
|
+
transform: translateX(20px);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&:disabled {
|
|
146
|
+
cursor: default;
|
|
147
|
+
opacity: 0.6;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&:focus-visible {
|
|
151
|
+
outline: 2px solid ${o.colors.accent};
|
|
152
|
+
outline-offset: 2px;
|
|
153
|
+
}
|
|
154
|
+
`,jt=n.span`
|
|
155
|
+
width: 16px;
|
|
156
|
+
height: 16px;
|
|
157
|
+
border-radius: 50%;
|
|
158
|
+
border: 2px solid ${o.colors.gray4};
|
|
159
|
+
border-top-color: ${o.colors.accent};
|
|
160
|
+
animation: ${st} 0.7s linear infinite;
|
|
161
|
+
|
|
162
|
+
@media (prefers-reduced-motion: reduce) {
|
|
163
|
+
animation: none;
|
|
164
|
+
}
|
|
165
|
+
`,I=n.p`
|
|
166
|
+
color: ${o.colors.gray4};
|
|
167
|
+
font-size: 14px;
|
|
168
|
+
margin: 0;
|
|
169
|
+
`,wt=n.p`
|
|
170
|
+
color: ${o.colors.muted};
|
|
171
|
+
font-size: 14px;
|
|
172
|
+
margin: 0 0 12px;
|
|
173
|
+
`,S=n.div`
|
|
174
|
+
display: flex;
|
|
175
|
+
flex-direction: column;
|
|
176
|
+
align-items: center;
|
|
177
|
+
gap: 8px;
|
|
178
|
+
text-align: center;
|
|
179
|
+
padding: 90px 20px;
|
|
180
|
+
min-height: 50vh;
|
|
181
|
+
color: ${o.colors.softWhite};
|
|
182
|
+
`,L=n.p`
|
|
183
|
+
font-size: 22px;
|
|
184
|
+
font-weight: 700;
|
|
185
|
+
margin: 6px 0 0;
|
|
186
|
+
`,M=n.p`
|
|
187
|
+
margin: 0;
|
|
188
|
+
color: ${o.colors.gray4};
|
|
189
|
+
`,D=n(G)`
|
|
190
|
+
margin-top: 12px;
|
|
191
|
+
`;function j({descriptor:t,owner:s,signer:r,name:a,description:c,image:l,icon:p}){const v=H(),[h,y]=F.useState(!1),{data:u,isLoading:m,refetch:d}=w({queryKey:["authorization",t.id,s],queryFn:()=>et(t,s),staleTime:3e4});async function g(){if(h||m)return;const b=!u;y(!0);try{await it({auth:t,signer:r,active:b}),await d(),v.setQueryData(["authorization",t.id,s],b),A.success(b?e("authorizations.toastActivated",{name:a}):e("authorizations.toastDeactivated",{name:a}))}catch(C){Z(C,{flow:"authorizations",step:b?"grant":"revoke"}),A.error(nt(C,e("authorizations.errorGeneric")))}finally{y(!1)}}const q=m?e("authorizations.checking"):u?e("authorizations.active"):e("authorizations.inactive");return i.jsxs(ht,{"data-testid":`authorization-${t.id}`,"data-active":!!u,children:[i.jsx(mt,{children:l?i.jsx("img",{src:l,alt:""}):p}),i.jsxs(gt,{children:[i.jsx(xt,{title:a,children:a}),i.jsx(ft,{children:c})]}),i.jsxs(bt,{children:[i.jsx(yt,{"data-active":!!u,children:q}),h?i.jsx(jt,{"aria-label":e("authorizations.working")}):i.jsx(zt,{type:"button","data-testid":`authorization-toggle-${t.id}`,"data-active":!!u,role:"switch","aria-checked":!!u,"aria-label":u?e("authorizations.deactivateAria",{name:a}):e("authorizations.activateAria",{name:a}),disabled:m,onClick:()=>void g()})]})]})}const f=500,W=10,vt=f*W;async function R(t,s){const r=await E(t,{category:s,first:f}),a=Math.min(Math.ceil(r.total/f),W),c=await Promise.all(Array.from({length:Math.max(0,a-1)},(l,p)=>E(t,{category:s,first:f,skip:(p+1)*f})));return{assets:[...r.assets,...c.flatMap(l=>l.assets)],truncated:r.total>vt}}function kt(t){return w({queryKey:["owned-collections",t],enabled:!!t,staleTime:6e4,queryFn:async()=>{const[s,r]=await Promise.all([R(t,"wearable"),R(t,"emote")]),a=new Map;for(const c of[...s.assets,...r.assets]){const l=c.contractAddress.toLowerCase();a.has(l)||a.set(l,c)}return{collections:[...a.values()],truncated:s.truncated||r.truncated,scanned:s.assets.length+r.assets.length}}})}function $t(t){return w({queryKey:["contract-registry"],enabled:t,staleTime:1/0,gcTime:1/0,queryFn:J})}function Ct(t,s){const r=s==null?void 0:s.get(t.toLowerCase());if(r)return r;const a=X(t);return a===t?e("authorizations.collectionFallback"):a}function At(t,s){return w({queryKey:["creator-collections",t],enabled:!!t&&!!s,staleTime:6e4,queryFn:async()=>{const r=await ot(t,s),a=new Map;for(const c of r){const l=c.contractAddress.toLowerCase();a.has(l)||a.set(l,c)}return[...a.values()]}})}function _t(){P({title:e("authorizations.title"),noindex:!0});const{session:t,signIn:s}=B(),r=Q.chainId,a=O(t==null?void 0:t.providerType),{data:c,isLoading:l}=kt(a?t==null?void 0:t.address:void 0),{data:p,isLoading:v}=$t(!!a&&!!(t!=null&&t.address)),{data:h,isLoading:y}=At(a?t==null?void 0:t.address:void 0,a?t==null?void 0:t.identity:void 0);if(!t)return i.jsxs(S,{children:[i.jsx(z,{name:"info",size:40,color:o.colors.muted2}),i.jsx(L,{children:e("authorizations.signInTitle")}),i.jsx(M,{children:e("authorizations.signInBody")}),i.jsx(D,{variant:"white",onClick:()=>s(),children:e("storeSettings.signIn")})]});if(!a)return i.jsxs(S,{children:[i.jsx(z,{name:"check",size:40,color:o.colors.ok}),i.jsx(L,{children:e("authorizations.managedTitle")}),i.jsx(M,{children:e("authorizations.managedBody")}),i.jsx(D,{as:_,to:"/items",variant:"white",children:e("authorizations.managedCta")})]});const u=U(r),m=V(r);return i.jsxs(ct,{children:[i.jsxs(lt,{children:[i.jsx(dt,{children:e("authorizations.title")}),i.jsx(ut,{children:e("authorizations.intro")})]}),i.jsxs(k,{children:[i.jsx($,{children:e("authorizations.buyingTitle")}),i.jsxs(x,{children:[i.jsx(j,{descriptor:u,owner:t.address,signer:t.signer,name:e("authorizations.creditsName"),description:e("authorizations.creditsDesc"),icon:i.jsx(K,{className:"ccy-mark"})}),i.jsx(j,{descriptor:m,owner:t.address,signer:t.signer,name:e("authorizations.manaName"),description:e("authorizations.manaDesc"),icon:i.jsx(pt,{src:at,alt:"","aria-hidden":!0})})]})]}),i.jsxs(k,{children:[i.jsx($,{children:e("authorizations.sellingTitle")}),c!=null&&c.truncated?i.jsx(wt,{"data-testid":"authorizations-selling-truncated",children:e("authorizations.sellingTruncated",{count:c.scanned})}):null,l||v?i.jsx(x,{"aria-busy":"true","aria-label":e("authorizations.checking"),children:Array.from({length:3}).map((d,g)=>i.jsx(T,{"aria-hidden":!0},g))}):c&&c.collections.length>0?i.jsx(x,{children:c.collections.map(d=>i.jsx(j,{descriptor:Y(d.contractAddress,r),owner:t.address,signer:t.signer,name:Ct(d.contractAddress,p),description:e("authorizations.sellingDesc"),image:d.image,icon:i.jsx(z,{name:"pen",size:18})},d.contractAddress))}):i.jsx(I,{children:e("authorizations.sellingEmpty")})]}),i.jsxs(k,{children:[i.jsx($,{children:e("authorizations.mintingTitle")}),y?i.jsx(x,{"aria-busy":"true","aria-label":e("authorizations.checking"),children:Array.from({length:3}).map((d,g)=>i.jsx(T,{"aria-hidden":!0},g))}):h&&h.length>0?i.jsx(x,{children:h.map(d=>i.jsx(j,{descriptor:tt(d.contractAddress,r),owner:t.address,signer:t.signer,name:d.name||e("authorizations.collectionFallback"),description:e("authorizations.mintingDesc"),icon:i.jsx(z,{name:"pen",size:18})},d.contractAddress))}):i.jsx(I,{children:e("authorizations.mintingEmpty")})]})]})}export{_t as Authorizations};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,L as ke,r as P,b as Xt,a as Zt}from"./react-BYHuwl8r.js";import{t as de,s as i,b as a,L as ce,bd as ea,J as ta,I as H,z as St,K as Le,x as aa,Y as Q,ao as ot,o as sa,q as na,v as ia,be as ra,A as oa,bf as ca,ap as da,bg as la,bh as ct,bi as ua,bj as ha,y as pa,bk as dt,$ as G,bl as lt,bm as ga,F as ae,r as ma,c as ut,bn as xa,C as fa,bo as ht,bp as Re,bq as ya,br as xe,bs as fe,bt as pt,g as ye,f as ba,h as qe,bu as va}from"./index-
|
|
1
|
+
import{j as t,L as ke,r as P,b as Xt,a as Zt}from"./react-BYHuwl8r.js";import{t as de,s as i,b as a,L as ce,bd as ea,J as ta,I as H,z as St,K as Le,x as aa,Y as Q,ao as ot,o as sa,q as na,v as ia,be as ra,A as oa,bf as ca,ap as da,bg as la,bh as ct,bi as ua,bj as ha,y as pa,bk as dt,$ as G,bl as lt,bm as ga,F as ae,r as ma,c as ut,bn as xa,C as fa,bo as ht,bp as Re,bq as ya,br as xe,bs as fe,bt as pt,g as ye,f as ba,h as qe,bu as va}from"./index-D7dTUoYt.js";import{M as wa,S as Ca,C as ja,H as ka,a as Sa,T as $a,X as Ta,b as Ma,B as Ia,c as Pa,d as gt,e as za,f as Ce,P as $t,m as Aa,g as Ea,h as Ra,i as qa,j as Tt,k as je,L as Ba,l as _a,n as mt,o as xt,W as Fa,p as Wa,q as La,A as Ka,r as Na,s as Ua,t as Qa,u as Ha,v as Oa,w as Ga,x as Va,y as Da,z as Ya,D as Ja,E as Xa,F as Za,G as es,I as ts,J as as,K as ss,N as Be,O as ns,Q as is,R as rs,U as os,V as ft,Y as yt,Z as cs,_ as ds,$ as ls}from"./CollectionCarousel-BkFV4le7.js";import{k as us,l as hs,a as ps,n as gs,f as ms,A as xs}from"./authorizations-CbXH-W_L.js";import{g as fs,j as _e}from"./buy-BllmT-mt.js";import{b as ys,w as bs,S as bt,G as vs}from"./buy-gasless-BuzErI_K.js";import{u as ws,M as Cs,R as be,r as js,c as ks,p as vt}from"./useCreditPacks-DQxqJepP.js";import{i as Ss,a as $s}from"./errors-BXmP5k3l.js";import{E as Ts}from"./ErrorNotice-CCsvrT3H.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-De85nOcx.js";const{colors:se,radius:Ms}=de,Is=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -58,7 +58,7 @@ import{j as t,L as ke,r as P,b as Xt,a as Zt}from"./react-BYHuwl8r.js";import{t
|
|
|
58
58
|
font-weight: 700;
|
|
59
59
|
color: ${se.text};
|
|
60
60
|
}
|
|
61
|
-
`,Rs="https://cdn.decentraland.org/@dcl/shop/1.0.2-
|
|
61
|
+
`,Rs="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061650925.commit-fa244eb/_assets/buy-error-22UunaPC.png";function qs(o){const{phase:l,balanceCredits:I,onClose:z}=o,F=l==="processing",V=l==="error"?a("cartCheckout.errorTitle"):l==="nofunds"?a("cartCheckout.titleNoFunds"):l==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),D=l==="processing";return t.jsxs(wa,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[t.jsx(Ca,{onClick:F?void 0:z,"aria-hidden":!0}),t.jsxs(ja,{"data-tall":D||void 0,children:[t.jsxs(ka,{children:[t.jsxs(Sa,{children:[t.jsx($a,{children:V}),!F&&t.jsx(Ta,{onClick:z,"aria-label":a("buyModal.close"),children:t.jsx(Ma,{})})]}),t.jsxs(Ia,{children:[t.jsx(Pa,{children:l==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),t.jsx(gt,{}),t.jsx(za,{children:ce(I)})]})]}),l==="choose"&&t.jsxs(Ce,{children:[t.jsxs(Es,{children:[t.jsx("span",{children:a("cart.purchaseSummary")}),t.jsxs("strong",{children:[t.jsx(gt,{}),ce(o.totalCredits??0)]})]}),t.jsx($t,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=Aa(o.totalCents??0,o.totalManaWei??0n);return A!=null?a("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&t.jsx(Bs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&t.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"&&t.jsxs(Ce,{children:[t.jsxs(Ea,{"data-testid":"buy-error",children:[t.jsx(Ra,{src:Rs,alt:"",width:64,height:80}),t.jsxs(qa,{children:[t.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.message??a("cartCheckout.errorBody")]})]}),t.jsxs(Tt,{children:[t.jsx(je,{"data-variant":"outline",onClick:z,children:a("buyModal.cancel")}),t.jsx(je,{"data-variant":"purple",onClick:o.onRetry??z,children:a("cartCheckout.tryAgain")})]})]})]})]})}function Bs({stage:o,step:l,total:I,isSelfCustody:z,signatures:F}){const V=o==="reserving",D=I>0?Math.min(100,Math.round(l/I*100)):0,A=z&&F&&F.total>1,ne=o==="awaiting-signature"?z?A?a("cartCheckout.confirmMultiple",{current:F.current,total:F.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):o==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return t.jsxs(Ce,{"data-processing":!0,children:[t.jsx(Ba,{src:ea,alt:"",width:61,height:61}),t.jsx(_a,{children:ne}),V?t.jsxs(Is,{children:[t.jsx(mt,{"aria-hidden":!0,children:t.jsx(xt,{"data-step":!0,style:{width:`${D}%`}})}),I>1?t.jsxs(Ps,{children:[l,"/",I]}):null]}):t.jsx(mt,{"aria-hidden":!0,children:t.jsx(xt,{})})]})}function _s({lines:o,shortfallCredits:l,packs:I,selectedPack:z,onSelectPack:F,onBuyPacks:V,onCancel:D}){const A=I.find(n=>n.id===z),ne=o.reduce((n,L)=>n+(L.quantity??1),0);return t.jsxs(Ce,{children:[t.jsxs(Fa,{"data-testid":"nofunds-warning",children:[t.jsx(Wa,{}),t.jsxs(La,{children:[t.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",t.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",a("buyModal.warningToPurchase",{count:ne})]})]}),t.jsx(zs,{children:o.map(n=>{const L=n.quantity??1;return t.jsxs(Ka,{children:[t.jsx(Na,{children:n.item.thumbnail?t.jsx("img",{src:n.item.thumbnail,alt:""}):null}),t.jsxs(Ua,{children:[t.jsxs("div",{children:[t.jsxs(Qa,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),L>1?t.jsx(As,{children:a("cartCheckout.qty",{count:L})}):null]}),n.item.creator?t.jsx(Ha,{address:n.item.creator}):null]}),t.jsxs(Oa,{children:[t.jsx(Ga,{}),t.jsx("span",{children:ce(n.priceCredits*L)})]})]})]},n.item.id)})}),t.jsx(Va,{children:I.map(n=>{const L=n.id===z;return t.jsxs(Da,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>F(n.id),children:[t.jsx(Ya,{src:Ja,alt:""}),t.jsx(Xa,{children:ce(n.credits)}),t.jsxs(Za,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),t.jsxs(es,{children:[t.jsxs(ts,{children:[t.jsx(as,{}),t.jsx("span",{children:ce((A==null?void 0:A.credits)??0)})]}),t.jsxs(ss,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),t.jsxs(Tt,{children:[t.jsx(je,{"data-variant":"outline",onClick:D,children:a("buyModal.cancel")}),t.jsx(je,{"data-variant":"gradient",onClick:V,children:a("buyModal.buy")})]})]})}const{colors:r,gradients:Fs,radius:Z}=de,Mt="@media (max-width: 1080px)",M="@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{aj as N,ak as w,al as o,am as n,K as D,w as M}from"./index-
|
|
1
|
+
import{aj as N,ak as w,al as o,am as n,K as D,w as M}from"./index-D7dTUoYt.js";import{r as U,j as g}from"./react-BYHuwl8r.js";import{g as z,a as E,c as I,b as K}from"./clsx-WwvpwSg0.js";import{s as v}from"./styled-8pFgehSd.js";function F(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
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as m,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,bv as ee,a2 as te,D as F,bw as ae,bx as oe,I as ie,b as a,c as re,F as se,v as ne,x as ce,C as le,ar as R,as as de,by as pe,bz as xe}from"./index-
|
|
1
|
+
import{j as e,r as m,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,bv as ee,a2 as te,D as F,bw as ae,bx as oe,I as ie,b as a,c as re,F as se,v as ne,x as ce,C as le,ar as R,as as de,by as pe,bz as xe}from"./index-D7dTUoYt.js";import{E as he}from"./ErrorNotice-CCsvrT3H.js";import{d as me,P as ge,C as ue,a as be,b as fe,A as ve}from"./collectionPage.styles-BgKDi1Aa.js";import{u as ye,S as W,a as je,F as Ce,c as we,P as $e,d as ke,H as Ne,e as Se}from"./categories-Bjf-PXbG.js";import{L as Pe}from"./LoadMore-ChGcAM1i.js";import{u as Ae}from"./useInfiniteGrid-UHC0Jjfu.js";import{G as Me}from"./grid.styles-CtrXwvIr.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./skeleton.styles-CVQk0siV.js";const Te=s.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${b.radius.card};
|
|
4
4
|
overflow: hidden;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,r as v}from"./react-BYHuwl8r.js";import{s as e,t as r,b as m,z as j,L as C,b_ as M,C as Z,w as J,I as X,F as Y,g as W,h as I,f as G,at as _,aa as ee,cn as F,as as te}from"./index-
|
|
1
|
+
import{j as t,r as v}from"./react-BYHuwl8r.js";import{s as e,t as r,b as m,z as j,L as C,b_ as M,C as Z,w as J,I as X,F as Y,g as W,h as I,f as G,at as _,aa as ee,cn as F,as as te}from"./index-D7dTUoYt.js";import{s as ne,f as D,A as q,g as L,r as ae,m as ie,i as oe,j as se}from"./authorizations-CbXH-W_L.js";import{i as re}from"./errors-BXmP5k3l.js";import{E as de}from"./ErrorNotice-CCsvrT3H.js";import{l as ce,m as le,n as pe}from"./buy-BllmT-mt.js";import{s as he,M as ue,E as xe}from"./sendMetaTransaction-De85nOcx.js";import{I as ge,C as fe}from"./ethers-BDpbhgX6.js";const P="shop:resume_after_signin",me=900*1e3;function dt(a){try{sessionStorage.setItem(P,JSON.stringify({...a,at:Date.now()}))}catch{}}function ct(a){let n;try{n=sessionStorage.getItem(P)}catch{return null}if(!n)return null;try{sessionStorage.removeItem(P)}catch{}let i;try{i=JSON.parse(n)}catch{return null}return!i||i.type!==a||typeof i.at!="number"||Date.now()-i.at>me?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function be(a,n){return(a+n-1n)/n}function we(a,n,i){return a<=0||n<=0?0n:a>=n?i:be(i*BigInt(a),BigInt(n))}function lt(a){var b,h,y;const n=Number.isFinite(a.priceCents)?Math.max(0,Math.trunc(a.priceCents)):0,i=Number.isFinite(a.balanceCents)?Math.max(0,Math.trunc(a.balanceCents)):0,o=a.priceManaWei>0n?a.priceManaWei:0n,l=a.manaBalanceWei>0n?a.manaBalanceWei:0n;if(n<=0)return{options:[],preferred:null,manaShortfall:null};const d=[];if(i>=n&&d.push({method:"credits",creditsCents:n,manaWei:0n}),o>0n&&i>0&&i<n){const c=n-i,w=we(c,n,o);l>=w&&d.push({method:"combined",creditsCents:i,manaWei:w})}o>0n&&l>=o&&d.push({method:"mana",creditsCents:0,manaWei:o});const p=((b=d.find(c=>c.method==="credits"))==null?void 0:b.method)??((h=d.find(c=>c.method==="combined"))==null?void 0:h.method)??((y=d.find(c=>c.method==="mana"))==null?void 0:y.method)??null,g=!d.some(c=>c.method==="mana"||c.method==="combined")&&o>0n&&l>0n?{manaWei:l,manaCents:ye(l,n,o),priceCents:n}:null;return{options:d,preferred:p,manaShortfall:g}}function ye(a,n,i){return Number(a*BigInt(n)/i)}function pt(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(o=>{const l=Number.isFinite(o)?Math.max(0,Math.trunc(o)):0,d=Math.min(l,i);return i-=d,d})}function A(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function ht(a,n){return a.options.find(i=>i.method===n)??null}function ut(a,n){if(!Number.isFinite(a)||a<=0||n<=0n)return null;const i=a/10;return Number(n)/1e18/i}const B="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",ve=e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-C4oAOZ2V.js","_assets/react-BYHuwl8r.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{s as o,_ as a}from"./index-
|
|
2
|
+
import{s as o,_ as a}from"./index-D7dTUoYt.js";import{r as n,j as e}from"./react-BYHuwl8r.js";const s=o.div`
|
|
3
3
|
position: fixed;
|
|
4
4
|
inset: 0;
|
|
5
5
|
/**
|