@dcl/shop 1.0.2-31053112537.commit-2eeb02b → 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-CT4EXTT1.js → Activity-DAMRT2bN.js} +3 -3
- package/_assets/{AnimatedBackground-wyzu1j63.js → AnimatedBackground-N_wcSf6D.js} +2 -2
- package/_assets/Assets-7wgiv5MU.js +866 -0
- package/_assets/{Assets.styles-De3LV6PK.js → Assets.styles-9R6ppWqo.js} +1 -1
- package/_assets/Authorizations-DCP2Yevg.js +191 -0
- package/_assets/{Cart-DJkaXf-4.js → Cart-CpLaRQWb.js} +2 -2
- package/_assets/{CircularProgress-CdQvdQq6.js → CircularProgress-BYXbDw8X.js} +1 -1
- package/_assets/{Collection-CJV4xLye.js → Collection-CA94Ylrk.js} +1 -1
- package/_assets/{CollectionCarousel-CvMsq3XH.js → CollectionCarousel-BkFV4le7.js} +1 -1
- package/_assets/{Confetti-BH2iBIUi.js → Confetti-D7bsXMqQ.js} +1 -1
- package/_assets/{Creator-Cyy5FpL2.js → Creator-DWKYxWTB.js} +1 -1
- package/_assets/{ErrorNotice-h0GUcJEu.js → ErrorNotice-CCsvrT3H.js} +1 -1
- package/_assets/{ExchangeController-B3cP_vUc.js → ExchangeController-KIbY1TeV.js} +1 -1
- package/_assets/{Faq-CKehqHI0.js → Faq-YyrvPI25.js} +1 -1
- package/_assets/{GetCredits-DdkULwKp.js → GetCredits-gCz6CMY3.js} +1 -1
- package/_assets/{Grow-BV4Iorxj.js → Grow-B6W2xyXd.js} +1 -1
- package/_assets/{HelpersUtil-CU-9vHU7.js → HelpersUtil-BmHoBPAz.js} +1 -1
- package/_assets/{ItemDetail-BAqZB6Be.js → ItemDetail-DsP2PTh3.js} +234 -229
- package/_assets/LazyEmoteControls-lVtDIvME.js +2 -0
- package/_assets/{LoadMore-D4fnHonl.js → LoadMore-ChGcAM1i.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-YVCL83wQ.js → ManaPricingBanner.styles-CZgGH3OR.js} +1 -1
- package/_assets/{MyAssets-DeZdrOao.js → MyAssets-jgTQywGo.js} +2 -2
- package/_assets/{MyFavorites-Jhmw64Z-.js → MyFavorites-B_oQzUR9.js} +1 -1
- package/_assets/NotFound-CjDp1Ys_.js +17 -0
- package/_assets/{NotificationsBell-CbzYe18m.js → NotificationsBell-Dkr9JB0w.js} +1 -1
- package/_assets/{OutfitDetail-mnH36Arv.js → OutfitDetail-BNlw-NwV.js} +1 -1
- package/_assets/{OutfitPreview-DEQlnmtN.js → OutfitPreview-J5m3e8Gl.js} +1 -1
- package/_assets/OutfitStudio-xpf5tPAA.js +556 -0
- package/_assets/StoreSettings-BkFED3xP.js +243 -0
- package/_assets/{Success-Duo1gCiQ.js → Success-lmJVKgtL.js} +1 -1
- package/_assets/{SwapController-CJtBte7L.js → SwapController-DKvQsgHw.js} +1 -1
- package/_assets/{Tooltip-H89dNdoQ.js → Tooltip-BBYuQHQb.js} +1 -1
- package/_assets/{TradeService-BcEoCIV7.js → TradeService-CkbprpVw.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-CZuJfgAC.js → W3MFrameProviderSingleton-6oL2Do5B.js} +3 -3
- package/_assets/{WebCryptoP256-BQ90tDtY.js → WebCryptoP256-6t0_XFco.js} +1 -1
- package/_assets/{authorizations-GLPsQqiP.js → authorizations-CbXH-W_L.js} +1 -1
- package/_assets/{basic-kk_TRFwe.js → basic-DSLXBfxu.js} +1 -1
- package/_assets/{biconomy-D-XcBmzY.js → biconomy-DKrndD59.js} +1 -1
- package/_assets/{builder-Dn0-qNG1.js → builder-CVMQir9d.js} +1 -1
- package/_assets/{buy-C36PZNHt.js → buy-BllmT-mt.js} +1 -1
- package/_assets/{buy-gasless-cVGUwJcn.js → buy-gasless-BuzErI_K.js} +1 -1
- package/_assets/{categories-l2OqZN_F.js → categories-Bjf-PXbG.js} +1 -1
- package/_assets/{ccip-DTvzkPzd.js → ccip-DI15Urx-.js} +1 -1
- package/_assets/{ccip-BkPpUcVC.js → ccip-DyRqdu6M.js} +1 -1
- package/_assets/{collectionPage.styles-BP7gMOku.js → collectionPage.styles-BgKDi1Aa.js} +2 -2
- package/_assets/{controller-Cm3hwM7G.js → controller-BSVA5WKe.js} +2 -2
- package/_assets/{core-DtQ_ZTXW.js → core-CflNwoXZ.js} +4 -4
- package/_assets/{createSvgIcon-DTfKYyFY.js → createSvgIcon-BCgRSx6l.js} +1 -1
- package/_assets/{custom-dDX_uBau.js → custom-ekboJ4XZ.js} +1 -1
- package/_assets/{data-capture-BHgEiKBs.js → data-capture-C00Edv8o.js} +1 -1
- package/_assets/{email-D-4NGs1z.js → email-D7bKqbcO.js} +1 -1
- package/_assets/{embedded-wallet-BQg7nplX.js → embedded-wallet-BgZe_e0-.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-DKFf4xqI.js → emotion-styled.browser.esm-BsZP4P-B.js} +1 -1
- package/_assets/{engine-9w9_00su.js → engine-Cnqy1olA.js} +1 -1
- package/_assets/{errors-DAy3n3Fl.js → errors-BXmP5k3l.js} +1 -1
- package/_assets/{estimate-l1-fee-CMUFNeJj.js → estimate-l1-fee-9ryWwmxC.js} +1 -1
- package/_assets/{execute-DmyMuEbq.js → execute-CY4XWL-J.js} +2 -2
- package/_assets/{features-dYRaytuv.js → features-MG4MlDMD.js} +1 -1
- package/_assets/{fetchTokenMetadata-B7vrevS4.js → fetchTokenMetadata-qCCUs6iE.js} +2 -2
- package/_assets/{field.styles-DxW4rsbZ.js → field.styles-DEvu6yNO.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-D-zi5D-3.js → get-ecosystem-wallet-info-DEImAnzE.js} +1 -1
- package/_assets/{getBalance-03ROSZOz.js → getBalance-J5grsfOj.js} +1 -1
- package/_assets/{getNFT-BZ5HS1py.js → getNFT-ByNh7y6k.js} +1 -1
- package/_assets/{getNFT-CGrmS4cn.js → getNFT-Dm5aL9u2.js} +1 -1
- package/_assets/{grid.styles-VdW_5pS8.js → grid.styles-CtrXwvIr.js} +1 -1
- package/_assets/{hashTypedData-DWrpUT7F.js → hashTypedData-BxKbqj1M.js} +1 -1
- package/_assets/{hashTypedData-D0grmu7Q.js → hashTypedData-CgttwS7E.js} +1 -1
- package/_assets/{in-app-Fd-r2Pt9.js → in-app-DF-fkkCZ.js} +1 -1
- package/_assets/{in-app-wallet-calls-US6STGvk.js → in-app-wallet-calls-D9z1I0uV.js} +1 -1
- package/_assets/{index-Desa5DLU.js → index--tlhUPhu.js} +1 -1
- package/_assets/{index-mHYk9Ana.js → index-7eX0SEVb.js} +1 -1
- package/_assets/{index-DXEO_tM8.js → index-B5TGt1q8.js} +1 -1
- package/_assets/{index-D6hB217e.js → index-B6xwPPMs.js} +1 -1
- package/_assets/{index-_VGZGU-r.js → index-B7Mvi-Fg.js} +3 -3
- package/_assets/{index-DM21W4eU.js → index-B7sgFJOZ.js} +1 -1
- package/_assets/{index-BXAhg_WL.js → index-BDPRDW4c.js} +1 -1
- package/_assets/{index-E6MYA_qz.js → index-BFgGvh7x.js} +1 -1
- package/_assets/{index-9wBxZvS3.js → index-BKC-pfo2.js} +1 -1
- package/_assets/{index-C9qZGyVn.js → index-BSmKDErh.js} +1 -1
- package/_assets/{index-DIEYvaFA.js → index-BZNkhtbZ.js} +1 -1
- package/_assets/{index-CTFDcqvg.js → index-BcQ98rhd.js} +1 -1
- package/_assets/{index-CBa9KvFL.js → index-BcW0TBOx.js} +1 -1
- package/_assets/{index-CUnVy-2F.js → index-BiSRuBrK.js} +1 -1
- package/_assets/{index-prmd5qIM.js → index-BlIt7KpC.js} +1 -1
- package/_assets/{index-b59UUC3O.js → index-BsD9lKdu.js} +1 -1
- package/_assets/{index-C9g5jnkn.js → index-BybKxZca.js} +3 -3
- package/_assets/{index-CvEQ-uxw.js → index-C0xt2SIQ.js} +1 -1
- package/_assets/{index-vO2jCoJA.js → index-C2s-_3dE.js} +1 -1
- package/_assets/{index-YtrNc4_U.js → index-C5fUw5Ha.js} +1 -1
- package/_assets/{index-D90sT5TF.js → index-C6RxhKIE.js} +1 -1
- package/_assets/{index-WGFd54XN.js → index-CAj85Mcv.js} +1 -1
- package/_assets/{index-DMqWpF7F.js → index-CAzui_hj.js} +1 -1
- package/_assets/{index-DCty_Nzt.js → index-CIKoh-oU.js} +1 -1
- package/_assets/{index-CzuJbwKM.js → index-CKXjZ-Kd.js} +1 -1
- package/_assets/{index-BOqWivx2.js → index-CbQYrUIv.js} +1 -1
- package/_assets/{index-Ck66rPGl.js → index-Cbj1bJsc.js} +1 -1
- package/_assets/{index-ojnKZ8lo.js → index-CgKz1pmK.js} +1 -1
- package/_assets/{index-3M7Oc88-.js → index-CjSsletQ.js} +1 -1
- package/_assets/{index-0ctogS4p.js → index-CkHS5p_Q.js} +1 -1
- package/_assets/{index-D-lui3ze.js → index-CpxvlmGa.js} +1 -1
- package/_assets/{index-BfrU5ARr.js → index-CszjRehO.js} +1 -1
- package/_assets/{index-CYelE7gc.js → index-CuZ7SJno.js} +1 -1
- package/_assets/{index-GGunchuI.js → index-CuZGDrIM.js} +1 -1
- package/_assets/{index-DmohqnOc.js → index-D20327nw.js} +1 -1
- package/_assets/{index-C6snVc74.js → index-D5jN8YQk.js} +2 -2
- package/_assets/{index-CpgH80QO.js → index-D7dTUoYt.js} +319 -315
- package/_assets/{index-Bw5aGSBt.js → index-D7foy_c1.js} +3 -3
- package/_assets/{index-DlOXAhkq.js → index-DRjhhI6j.js} +1 -1
- package/_assets/{index-DZE8IM2d.js → index-DVJFosyx.js} +1 -1
- package/_assets/{index-DR22dJ1f.js → index-DXpGefPo.js} +1 -1
- package/_assets/{index-Csv3ZE7U.js → index-DYQXXAKt.js} +1 -1
- package/_assets/{index-DpfgsZS7.js → index-D_a1Dj89.js} +2 -2
- package/_assets/{index-BLhzIl8l.js → index-DbCIWeQF.js} +2 -2
- package/_assets/{index-Cji3FYAQ.js → index-Dc_jl2yy.js} +1 -1
- package/_assets/{index-D_RGYDYj.js → index-DlewIau_.js} +1 -1
- package/_assets/{index-BGWFa_3t.js → index-Fn-DLeUg.js} +1 -1
- package/_assets/{index-DGVpcWzu.js → index-Z6tclw43.js} +1 -1
- package/_assets/{index-Dctqjcot.js → index-gbxeK1C-.js} +1 -1
- package/_assets/{index-B4OCkrkj.js → index-gmA5M3R1.js} +1 -1
- package/_assets/{index-Y3vrFRTZ.js → index-lIySTE8R.js} +1 -1
- package/_assets/{index-CHrjSjdy.js → index-zG9t0hxJ.js} +1 -1
- package/_assets/{index.es-C_PIRdls.js → index.es-11O0MAa5.js} +4 -4
- package/_assets/{index.es-CM-7pdUr.js → index.es-6tzroQMk.js} +1 -1
- package/_assets/{index.es-iNKw5JYV.js → index.es-BOuSF7GL.js} +1 -1
- package/_assets/{localBatchGatewayRequest-CvrWva1S.js → localBatchGatewayRequest-CByVkxJB.js} +1 -1
- package/_assets/name-verified-oGwQ3ntb.svg +25 -0
- package/_assets/{networks-DxxML95J.js → networks-CLAHX11r.js} +1 -1
- package/_assets/{onramp-DlmUl4wC.js → onramp-X6DWjNa-.js} +1 -1
- package/_assets/{openzeppelin-oRjzN4zB.js → openzeppelin-DWrLU4le.js} +1 -1
- package/_assets/{parseNft-B1VtTOpw.js → parseNft-C0F1eSr9.js} +2 -2
- package/_assets/{parseSignature-CiDHU6Nz.js → parseSignature-B1BDTVRI.js} +1 -1
- package/_assets/{parseSignature-D_U2MhSK.js → parseSignature-Cfa0bf3p.js} +3 -3
- package/_assets/{passkeys-C4nRLQjw.js → passkeys-Bq7ndAcy.js} +1 -1
- package/_assets/{pay-with-exchange-DjjSaX9l.js → pay-with-exchange-DU8q52b9.js} +1 -1
- package/_assets/{qr-overlay-D6ySLpj4.js → qr-overlay-2pcgXiq0.js} +1 -1
- package/_assets/{receive-BmTDhzFh.js → receive-UZ0WD1OR.js} +1 -1
- package/_assets/{resolveImplementation-C8betaeH.js → resolveImplementation-C5KIPshP.js} +1 -1
- package/_assets/{rpc-BIRrsCrS.js → rpc-q5JetAPC.js} +1 -1
- package/_assets/{secp256k1-BKrO94JQ.js → secp256k1-C35ing1J.js} +1 -1
- package/_assets/{secp256k1-ChWI25jO.js → secp256k1-C79pdbKP.js} +1 -1
- package/_assets/{secp256k1-BKzdJAUQ.js → secp256k1-CYrjGZQC.js} +1 -1
- package/_assets/{send-DkppUNQD.js → send-_ymraJKw.js} +1 -1
- package/_assets/{send-batch-transaction-BT57-cdv.js → send-batch-transaction-DkYVZ1xj.js} +1 -1
- package/_assets/{send-eip712-transaction-DzyYzWbO.js → send-eip712-transaction-BzZBuy56.js} +2 -2
- package/_assets/{send-gasless-transaction-CEY__cC5.js → send-gasless-transaction-ByRZPFH6.js} +2 -2
- package/_assets/{send-transaction-BUcSoRKJ.js → send-transaction-CUkh0xRu.js} +2 -2
- package/_assets/{sendMetaTransaction-ZsFc6TYS.js → sendMetaTransaction-De85nOcx.js} +1 -1
- package/_assets/{sendRawTransaction-RwVbISDi.js → sendRawTransaction-D5RykxPX.js} +3 -3
- package/_assets/{serializeTransaction-D7Ih8-j7.js → serializeTransaction-EYy94JNM.js} +1 -1
- package/_assets/{session-proposal-BDnKkUie.js → session-proposal-Bf_Po3Sl.js} +1 -1
- package/_assets/{session-request-maNMGkDh.js → session-request-DEDmAqA-.js} +2 -2
- package/_assets/{signing-O4ufWRe8.js → signing-DqKP5KUZ.js} +3 -3
- package/_assets/{skeleton.styles-B5G3DoRu.js → skeleton.styles-CVQk0siV.js} +1 -1
- package/_assets/{socials-DgrJfl24.js → socials-3pLrS-E7.js} +1 -1
- package/_assets/{styled-CzuG2SF7.js → styled-8pFgehSd.js} +1 -1
- package/_assets/{swaps-CEuJEeBK.js → swaps-C-dgABl9.js} +1 -1
- package/_assets/{thirdweb-CWMxyfTR.js → thirdweb-C6_KggNb.js} +3 -3
- package/_assets/{to-serializable-transaction-eILRk2uK.js → to-serializable-transaction-BWUJjZdO.js} +2 -2
- package/_assets/{transactionReceipt-YxHkhYmR.js → transactionReceipt-DmwkwkkP.js} +1 -1
- package/_assets/{transactions-DFikge11.js → transactions-BSJMdJi4.js} +1 -1
- package/_assets/{useCreditPacks-CPiiIVbF.js → useCreditPacks-DQxqJepP.js} +1 -1
- package/_assets/{useImportable-BhPYUErM.js → useImportable-Co0AaRPY.js} +1 -1
- package/_assets/{useInfiniteGrid-DmIgZTT1.js → useInfiniteGrid-UHC0Jjfu.js} +1 -1
- package/_assets/{useTheme-DnWPXYyn.js → useTheme-B-55uBZP.js} +1 -1
- package/_assets/{verifyHash-BCo8j0IO.js → verifyHash-BGJh7VH4.js} +1 -1
- package/_assets/{w3m-modal-Dyp8brdF.js → w3m-modal-CjXODL26.js} +1 -1
- package/_assets/{w3m-modal-D7JdGvOC.js → w3m-modal-CwXD068w.js} +1 -1
- package/_assets/{wait-for-tx-receipt-ITlfousv.js → wait-for-tx-receipt-DRA8zhkS.js} +1 -1
- package/_assets/{wallets-DoMl3uKp.js → wallets-DOXRX-PZ.js} +5 -5
- package/_assets/{web-connector-uCJIkgMa.js → web-connector-CXxJTFl4.js} +3 -3
- package/_assets/{writeContract-DMg_Cu_T.js → writeContract-BdEWRAPa.js} +1 -1
- package/_assets/{zoraTestnet-CzhulMA0.js → zoraTestnet-CzfX948o.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Assets-DFjWkvAj.js +0 -801
- package/_assets/Authorizations-Erxm3Fyz.js +0 -188
- package/_assets/LazyEmoteControls-Dsz7X5iX.js +0 -2
- package/_assets/NotFound-BV0gWDmk.js +0 -13
- package/_assets/OutfitStudio-DlMQxDuE.js +0 -537
- package/_assets/StoreSettings-DXQD9Iiv.js +0 -239
|
@@ -0,0 +1,866 @@
|
|
|
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
|
+
position: fixed;
|
|
3
|
+
inset: 0;
|
|
4
|
+
z-index: 10000;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
padding: 16px;
|
|
9
|
+
background: rgba(22, 21, 24, 0.55);
|
|
10
|
+
`,hn=s.div`
|
|
11
|
+
width: 560px;
|
|
12
|
+
max-width: 100%;
|
|
13
|
+
max-height: 92vh;
|
|
14
|
+
overflow-y: auto;
|
|
15
|
+
background: ${t.colors.white};
|
|
16
|
+
border-radius: 16px;
|
|
17
|
+
padding: 20px 24px 24px;
|
|
18
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
19
|
+
|
|
20
|
+
${t.media.maxWidth("mobile")} {
|
|
21
|
+
padding: 16px;
|
|
22
|
+
}
|
|
23
|
+
`,ee=s.div`
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: flex-start;
|
|
26
|
+
justify-content: space-between;
|
|
27
|
+
gap: 12px;
|
|
28
|
+
`,te=s.h2`
|
|
29
|
+
margin: 0;
|
|
30
|
+
font-family: ${t.font.sans};
|
|
31
|
+
font-weight: 700;
|
|
32
|
+
font-size: 22px;
|
|
33
|
+
line-height: 1.2;
|
|
34
|
+
color: ${t.colors.text};
|
|
35
|
+
`,ne=s.button`
|
|
36
|
+
flex: none;
|
|
37
|
+
display: grid;
|
|
38
|
+
place-items: center;
|
|
39
|
+
width: 28px;
|
|
40
|
+
height: 28px;
|
|
41
|
+
border: 0;
|
|
42
|
+
background: none;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
color: ${t.colors.text};
|
|
45
|
+
|
|
46
|
+
.ico {
|
|
47
|
+
width: 18px;
|
|
48
|
+
height: 18px;
|
|
49
|
+
}
|
|
50
|
+
&:disabled {
|
|
51
|
+
opacity: 0.4;
|
|
52
|
+
cursor: default;
|
|
53
|
+
}
|
|
54
|
+
&:focus-visible {
|
|
55
|
+
outline: 2px solid ${t.colors.accent};
|
|
56
|
+
outline-offset: 2px;
|
|
57
|
+
}
|
|
58
|
+
`,se=s.div`
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 6px;
|
|
62
|
+
margin-top: 4px;
|
|
63
|
+
font-family: ${t.font.sans};
|
|
64
|
+
font-size: 14px;
|
|
65
|
+
color: ${t.colors.text2};
|
|
66
|
+
|
|
67
|
+
.ico {
|
|
68
|
+
width: 16px;
|
|
69
|
+
height: 16px;
|
|
70
|
+
color: ${t.colors.brandViolet};
|
|
71
|
+
}
|
|
72
|
+
`,ie=s.hr`
|
|
73
|
+
border: 0;
|
|
74
|
+
border-top: 1px solid ${t.colors.line};
|
|
75
|
+
margin: 16px 0;
|
|
76
|
+
`,oe=s.div`
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: 16px;
|
|
80
|
+
`,xn=s.div`
|
|
81
|
+
flex: none;
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
gap: 12px;
|
|
87
|
+
width: 137px;
|
|
88
|
+
height: 137px;
|
|
89
|
+
padding: 20px 0;
|
|
90
|
+
border-radius: 12px;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
background: ${t.gradients.amethyst};
|
|
93
|
+
`,fn=s.img`
|
|
94
|
+
display: block;
|
|
95
|
+
width: 47px;
|
|
96
|
+
height: 47px;
|
|
97
|
+
`,mn=s.span`
|
|
98
|
+
display: inline-flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
gap: 2px;
|
|
101
|
+
max-width: 100%;
|
|
102
|
+
padding: 0 8px;
|
|
103
|
+
font-family: ${t.font.sans};
|
|
104
|
+
font-size: 18px;
|
|
105
|
+
font-weight: 600;
|
|
106
|
+
/* The design's cyan — it has to read against the purple, which the body text colour would not. */
|
|
107
|
+
color: ${dn};
|
|
108
|
+
white-space: nowrap;
|
|
109
|
+
overflow: hidden;
|
|
110
|
+
|
|
111
|
+
/* Truncation belongs on the flex item, not this box: text-overflow is inert on a flex container, and
|
|
112
|
+
the zero min-width is what lets the name shrink instead of pushing the tick out. */
|
|
113
|
+
> span {
|
|
114
|
+
min-width: 0;
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
text-overflow: ellipsis;
|
|
117
|
+
}
|
|
118
|
+
`,un=s.img`
|
|
119
|
+
flex: none;
|
|
120
|
+
display: block;
|
|
121
|
+
width: 14px;
|
|
122
|
+
height: 14px;
|
|
123
|
+
`,Ee=s.div`
|
|
124
|
+
flex: none;
|
|
125
|
+
display: grid;
|
|
126
|
+
place-items: center;
|
|
127
|
+
width: 56px;
|
|
128
|
+
height: 56px;
|
|
129
|
+
border-radius: 10px;
|
|
130
|
+
background: ${t.gradients.amethyst};
|
|
131
|
+
color: ${t.colors.white};
|
|
132
|
+
|
|
133
|
+
.ico {
|
|
134
|
+
width: 30px;
|
|
135
|
+
height: 30px;
|
|
136
|
+
}
|
|
137
|
+
`,re=s.div`
|
|
138
|
+
flex: 1;
|
|
139
|
+
min-width: 0;
|
|
140
|
+
`,ae=s.div`
|
|
141
|
+
font-family: ${t.font.sans};
|
|
142
|
+
font-weight: 700;
|
|
143
|
+
font-size: 20px;
|
|
144
|
+
line-height: 1.3;
|
|
145
|
+
color: ${t.colors.text};
|
|
146
|
+
overflow: hidden;
|
|
147
|
+
text-overflow: ellipsis;
|
|
148
|
+
white-space: nowrap;
|
|
149
|
+
|
|
150
|
+
span {
|
|
151
|
+
font-weight: 400;
|
|
152
|
+
color: ${t.colors.muted2};
|
|
153
|
+
}
|
|
154
|
+
`,le=s.div`
|
|
155
|
+
font-family: ${t.font.sans};
|
|
156
|
+
font-size: 14px;
|
|
157
|
+
color: ${t.colors.muted2};
|
|
158
|
+
`,ce=s.div`
|
|
159
|
+
flex: none;
|
|
160
|
+
display: flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
gap: 6px;
|
|
163
|
+
font-family: ${t.font.sans};
|
|
164
|
+
font-weight: 600;
|
|
165
|
+
font-size: 24px;
|
|
166
|
+
color: ${t.colors.text};
|
|
167
|
+
|
|
168
|
+
.ico {
|
|
169
|
+
width: 22px;
|
|
170
|
+
height: 22px;
|
|
171
|
+
color: ${t.colors.brandViolet};
|
|
172
|
+
}
|
|
173
|
+
`,gn=s.div`
|
|
174
|
+
margin-top: 16px;
|
|
175
|
+
padding: 16px;
|
|
176
|
+
border-radius: 12px;
|
|
177
|
+
background: #f2e7fc;
|
|
178
|
+
`,bn=s.div`
|
|
179
|
+
font-family: ${t.font.sans};
|
|
180
|
+
font-weight: 700;
|
|
181
|
+
font-size: 16px;
|
|
182
|
+
color: ${t.colors.text};
|
|
183
|
+
`,yn=s.p`
|
|
184
|
+
margin: 8px 0 16px;
|
|
185
|
+
font-family: ${t.font.sans};
|
|
186
|
+
font-size: 14px;
|
|
187
|
+
line-height: 1.5;
|
|
188
|
+
color: ${t.colors.text2};
|
|
189
|
+
|
|
190
|
+
b {
|
|
191
|
+
font-weight: 700;
|
|
192
|
+
color: ${t.colors.brandViolet};
|
|
193
|
+
}
|
|
194
|
+
`,wn=s.label`
|
|
195
|
+
display: flex;
|
|
196
|
+
align-items: center;
|
|
197
|
+
gap: 8px;
|
|
198
|
+
padding: 12px 14px;
|
|
199
|
+
background: ${t.colors.white};
|
|
200
|
+
border: 1px solid ${t.colors.text};
|
|
201
|
+
border-radius: 10px;
|
|
202
|
+
cursor: text;
|
|
203
|
+
|
|
204
|
+
&:focus-within {
|
|
205
|
+
border-color: ${t.colors.magenta};
|
|
206
|
+
}
|
|
207
|
+
`,jn=s.span`
|
|
208
|
+
flex: none;
|
|
209
|
+
font-family: ${t.font.sans};
|
|
210
|
+
font-size: 18px;
|
|
211
|
+
color: ${t.colors.muted2};
|
|
212
|
+
`,vn=s.input`
|
|
213
|
+
flex: 0 1 auto;
|
|
214
|
+
min-width: 0;
|
|
215
|
+
border: 0;
|
|
216
|
+
outline: none;
|
|
217
|
+
background: transparent;
|
|
218
|
+
font-family: ${t.font.sans};
|
|
219
|
+
font-size: 16px;
|
|
220
|
+
font-weight: 600;
|
|
221
|
+
color: ${t.colors.text};
|
|
222
|
+
|
|
223
|
+
&::placeholder {
|
|
224
|
+
color: ${t.colors.muted2};
|
|
225
|
+
font-weight: 400;
|
|
226
|
+
}
|
|
227
|
+
`,Cn=s.span`
|
|
228
|
+
flex: none;
|
|
229
|
+
font-family: ${t.font.sans};
|
|
230
|
+
font-size: 16px;
|
|
231
|
+
color: ${t.colors.muted2};
|
|
232
|
+
`,_e=s.button`
|
|
233
|
+
margin-top: 16px;
|
|
234
|
+
width: 100%;
|
|
235
|
+
height: 52px;
|
|
236
|
+
border: 0;
|
|
237
|
+
border-radius: 12px;
|
|
238
|
+
cursor: pointer;
|
|
239
|
+
background: ${t.gradients.amethyst};
|
|
240
|
+
color: ${t.colors.softWhite};
|
|
241
|
+
font-family: ${t.font.sans};
|
|
242
|
+
font-weight: 600;
|
|
243
|
+
font-size: 15px;
|
|
244
|
+
letter-spacing: 0.46px;
|
|
245
|
+
text-transform: uppercase;
|
|
246
|
+
|
|
247
|
+
&:hover:not(:disabled) {
|
|
248
|
+
filter: brightness(1.06);
|
|
249
|
+
}
|
|
250
|
+
&:focus-visible {
|
|
251
|
+
outline: 2px solid ${t.colors.accent};
|
|
252
|
+
outline-offset: 2px;
|
|
253
|
+
}
|
|
254
|
+
&:disabled {
|
|
255
|
+
cursor: not-allowed;
|
|
256
|
+
background: #ddc7ec;
|
|
257
|
+
color: #f4ecfa;
|
|
258
|
+
}
|
|
259
|
+
`,$n=s.div`
|
|
260
|
+
display: flex;
|
|
261
|
+
flex-direction: column;
|
|
262
|
+
align-items: flex-start;
|
|
263
|
+
gap: 20px;
|
|
264
|
+
padding: 32px 0 8px;
|
|
265
|
+
`,kn=s.img`
|
|
266
|
+
align-self: center;
|
|
267
|
+
width: 56px;
|
|
268
|
+
height: 56px;
|
|
269
|
+
`,Sn=s.div`
|
|
270
|
+
font-family: ${t.font.sans};
|
|
271
|
+
font-weight: 700;
|
|
272
|
+
font-size: 18px;
|
|
273
|
+
color: ${t.colors.text};
|
|
274
|
+
`,Tn=s.div`
|
|
275
|
+
display: flex;
|
|
276
|
+
align-items: center;
|
|
277
|
+
gap: 12px;
|
|
278
|
+
width: 100%;
|
|
279
|
+
`,En=s.div`
|
|
280
|
+
flex: 1;
|
|
281
|
+
height: 8px;
|
|
282
|
+
border-radius: 999px;
|
|
283
|
+
background: ${t.colors.chip};
|
|
284
|
+
overflow: hidden;
|
|
285
|
+
|
|
286
|
+
span {
|
|
287
|
+
display: block;
|
|
288
|
+
height: 100%;
|
|
289
|
+
width: 40%;
|
|
290
|
+
border-radius: 999px;
|
|
291
|
+
background: ${t.gradients.amethyst};
|
|
292
|
+
animation: nameProgress 1.1s ease-in-out infinite;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
@keyframes nameProgress {
|
|
296
|
+
0% {
|
|
297
|
+
transform: translateX(-100%);
|
|
298
|
+
}
|
|
299
|
+
100% {
|
|
300
|
+
transform: translateX(320%);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
`,_n=s.span`
|
|
304
|
+
flex: none;
|
|
305
|
+
font-family: ${t.font.sans};
|
|
306
|
+
font-size: 14px;
|
|
307
|
+
color: ${t.colors.muted};
|
|
308
|
+
`,Rn=s.div`
|
|
309
|
+
display: flex;
|
|
310
|
+
flex-direction: column;
|
|
311
|
+
align-items: center;
|
|
312
|
+
gap: 16px;
|
|
313
|
+
padding: 24px;
|
|
314
|
+
border-radius: 12px;
|
|
315
|
+
background: #e2f5ea;
|
|
316
|
+
text-align: center;
|
|
317
|
+
`,Mn=s.div`
|
|
318
|
+
display: grid;
|
|
319
|
+
place-items: center;
|
|
320
|
+
width: 56px;
|
|
321
|
+
height: 56px;
|
|
322
|
+
border-radius: 50%;
|
|
323
|
+
background: ${t.colors.ok};
|
|
324
|
+
color: ${t.colors.white};
|
|
325
|
+
|
|
326
|
+
.ico {
|
|
327
|
+
width: 30px;
|
|
328
|
+
height: 30px;
|
|
329
|
+
}
|
|
330
|
+
`,zn=s.p`
|
|
331
|
+
margin: 0;
|
|
332
|
+
font-family: ${t.font.sans};
|
|
333
|
+
font-size: 16px;
|
|
334
|
+
line-height: 1.4;
|
|
335
|
+
color: ${t.colors.text};
|
|
336
|
+
|
|
337
|
+
b {
|
|
338
|
+
font-weight: 700;
|
|
339
|
+
}
|
|
340
|
+
`,Re=s.div`
|
|
341
|
+
display: flex;
|
|
342
|
+
gap: 16px;
|
|
343
|
+
margin-top: 20px;
|
|
344
|
+
|
|
345
|
+
${t.media.maxWidth("mobile")} {
|
|
346
|
+
flex-direction: column;
|
|
347
|
+
}
|
|
348
|
+
`,Me=s.button`
|
|
349
|
+
flex: 1;
|
|
350
|
+
height: 48px;
|
|
351
|
+
border: 1px solid ${t.colors.accent};
|
|
352
|
+
border-radius: 8px;
|
|
353
|
+
background: ${t.colors.white};
|
|
354
|
+
color: ${t.colors.accent};
|
|
355
|
+
cursor: pointer;
|
|
356
|
+
font-family: ${t.font.sans};
|
|
357
|
+
font-weight: 600;
|
|
358
|
+
font-size: 13px;
|
|
359
|
+
letter-spacing: 0.46px;
|
|
360
|
+
text-transform: uppercase;
|
|
361
|
+
|
|
362
|
+
&:hover {
|
|
363
|
+
background: rgba(105, 31, 169, 0.06);
|
|
364
|
+
}
|
|
365
|
+
&:focus-visible {
|
|
366
|
+
outline: 2px solid ${t.colors.accent};
|
|
367
|
+
outline-offset: 2px;
|
|
368
|
+
}
|
|
369
|
+
`,Fn=s.a`
|
|
370
|
+
flex: 1;
|
|
371
|
+
display: inline-flex;
|
|
372
|
+
align-items: center;
|
|
373
|
+
justify-content: center;
|
|
374
|
+
height: 48px;
|
|
375
|
+
border-radius: 8px;
|
|
376
|
+
background: ${t.colors.dclRed};
|
|
377
|
+
color: ${t.colors.softWhite};
|
|
378
|
+
cursor: pointer;
|
|
379
|
+
text-decoration: none;
|
|
380
|
+
font-family: ${t.font.sans};
|
|
381
|
+
font-weight: 600;
|
|
382
|
+
font-size: 13px;
|
|
383
|
+
letter-spacing: 0.46px;
|
|
384
|
+
text-transform: uppercase;
|
|
385
|
+
|
|
386
|
+
&:hover {
|
|
387
|
+
filter: brightness(1.05);
|
|
388
|
+
}
|
|
389
|
+
&:focus-visible {
|
|
390
|
+
outline: 2px solid ${t.colors.accent};
|
|
391
|
+
outline-offset: 2px;
|
|
392
|
+
}
|
|
393
|
+
`,de=s.div`
|
|
394
|
+
display: flex;
|
|
395
|
+
align-items: flex-start;
|
|
396
|
+
gap: 12px;
|
|
397
|
+
padding: 16px;
|
|
398
|
+
margin-top: 8px;
|
|
399
|
+
border-radius: 12px;
|
|
400
|
+
background: rgba(255, 45, 85, 0.1);
|
|
401
|
+
font-family: ${t.font.sans};
|
|
402
|
+
font-size: 14px;
|
|
403
|
+
line-height: 1.5;
|
|
404
|
+
color: ${t.colors.text};
|
|
405
|
+
|
|
406
|
+
.ico {
|
|
407
|
+
width: 22px;
|
|
408
|
+
height: 22px;
|
|
409
|
+
flex: none;
|
|
410
|
+
color: ${t.colors.dclRed};
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Informational, not a failure. Used for "your payment went through, the NAME is on its way" and for the
|
|
415
|
+
* reason a purchase is not available yet (no price, not enough credits) — none of which is an error, and
|
|
416
|
+
* all of which would contradict themselves rendered in the red error treatment.
|
|
417
|
+
*/
|
|
418
|
+
&[data-tone='info'] {
|
|
419
|
+
background: ${t.colors.panel};
|
|
420
|
+
|
|
421
|
+
.ico {
|
|
422
|
+
color: ${t.colors.accent};
|
|
423
|
+
}
|
|
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 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
|
+
width: 100%;
|
|
427
|
+
min-width: 0;
|
|
428
|
+
`,Hn=s.nav`
|
|
429
|
+
display: flex;
|
|
430
|
+
align-items: center;
|
|
431
|
+
gap: 6px;
|
|
432
|
+
margin: 4px 0 16px;
|
|
433
|
+
font-family: ${t.font.sans};
|
|
434
|
+
font-size: 12px;
|
|
435
|
+
line-height: 1;
|
|
436
|
+
color: ${t.colors.gray4};
|
|
437
|
+
`,Un=s.button`
|
|
438
|
+
border: 0;
|
|
439
|
+
background: none;
|
|
440
|
+
padding: 0;
|
|
441
|
+
cursor: pointer;
|
|
442
|
+
font: inherit;
|
|
443
|
+
color: ${t.colors.gray4};
|
|
444
|
+
|
|
445
|
+
&:hover {
|
|
446
|
+
color: ${t.colors.white};
|
|
447
|
+
text-decoration: underline;
|
|
448
|
+
}
|
|
449
|
+
&:focus-visible {
|
|
450
|
+
outline: 2px solid ${t.colors.white};
|
|
451
|
+
outline-offset: 2px;
|
|
452
|
+
}
|
|
453
|
+
`,On=s.span`
|
|
454
|
+
font-weight: 700;
|
|
455
|
+
color: ${t.colors.softWhite};
|
|
456
|
+
`,Gn=s.div`
|
|
457
|
+
display: flex;
|
|
458
|
+
flex-direction: column;
|
|
459
|
+
gap: 48px;
|
|
460
|
+
padding-bottom: 48px;
|
|
461
|
+
background: #ecdbfd;
|
|
462
|
+
border-radius: ${t.radius.banner};
|
|
463
|
+
overflow: hidden;
|
|
464
|
+
|
|
465
|
+
${t.media.maxWidth("mobile")} {
|
|
466
|
+
gap: 32px;
|
|
467
|
+
padding-bottom: 32px;
|
|
468
|
+
}
|
|
469
|
+
`,Dn=s.div`
|
|
470
|
+
position: relative;
|
|
471
|
+
border-radius: ${t.radius.banner};
|
|
472
|
+
overflow: hidden;
|
|
473
|
+
padding: 88px 48px;
|
|
474
|
+
display: flex;
|
|
475
|
+
flex-direction: column;
|
|
476
|
+
align-items: center;
|
|
477
|
+
gap: 48px;
|
|
478
|
+
text-align: center;
|
|
479
|
+
background: radial-gradient(120% 95% at 50% 118%, #d13bd6 0%, #a026b0 28%, #6a1b9c 58%, #4a1173 100%);
|
|
480
|
+
|
|
481
|
+
${t.media.maxWidth("mobile")} {
|
|
482
|
+
padding: 40px 20px;
|
|
483
|
+
gap: 28px;
|
|
484
|
+
}
|
|
485
|
+
`,qn=s.div`
|
|
486
|
+
display: flex;
|
|
487
|
+
flex-direction: column;
|
|
488
|
+
align-items: center;
|
|
489
|
+
gap: 12px;
|
|
490
|
+
`,Zn=s.h1`
|
|
491
|
+
margin: 0;
|
|
492
|
+
font-family: ${t.font.sans};
|
|
493
|
+
font-weight: 600;
|
|
494
|
+
font-size: 40px;
|
|
495
|
+
line-height: 1.167;
|
|
496
|
+
color: ${t.colors.white};
|
|
497
|
+
|
|
498
|
+
${t.media.maxWidth("mobile")} {
|
|
499
|
+
font-size: 26px;
|
|
500
|
+
}
|
|
501
|
+
`,Vn=s.p`
|
|
502
|
+
margin: 0;
|
|
503
|
+
max-width: 760px;
|
|
504
|
+
font-family: ${t.font.sans};
|
|
505
|
+
font-weight: 500;
|
|
506
|
+
font-size: 24px;
|
|
507
|
+
line-height: 1.334;
|
|
508
|
+
color: #ecebed;
|
|
509
|
+
|
|
510
|
+
${t.media.maxWidth("mobile")} {
|
|
511
|
+
font-size: 16px;
|
|
512
|
+
}
|
|
513
|
+
`,Kn=s.div`
|
|
514
|
+
width: min(785px, 100%);
|
|
515
|
+
display: flex;
|
|
516
|
+
flex-direction: column;
|
|
517
|
+
gap: 12px;
|
|
518
|
+
`,Qn=s.div`
|
|
519
|
+
position: relative;
|
|
520
|
+
`,Jn=s("div",Vt("invalid"))`
|
|
521
|
+
display: flex;
|
|
522
|
+
align-items: center;
|
|
523
|
+
gap: 8px;
|
|
524
|
+
padding: 8px 8px 8px 16px;
|
|
525
|
+
background: ${t.colors.softWhite};
|
|
526
|
+
border: 1.5px solid ${({invalid:i})=>i?t.colors.dclRed:t.colors.line};
|
|
527
|
+
border-radius: 20px;
|
|
528
|
+
|
|
529
|
+
&:focus-within {
|
|
530
|
+
border-color: ${({invalid:i})=>i?t.colors.dclRed:t.colors.magenta};
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
${t.media.maxWidth("mobile")} {
|
|
534
|
+
border-radius: 16px;
|
|
535
|
+
}
|
|
536
|
+
`,Xn=s.span`
|
|
537
|
+
position: absolute;
|
|
538
|
+
left: -9999px;
|
|
539
|
+
top: 0;
|
|
540
|
+
visibility: hidden;
|
|
541
|
+
pointer-events: none;
|
|
542
|
+
white-space: pre;
|
|
543
|
+
font-family: ${t.font.sans};
|
|
544
|
+
font-size: 20px;
|
|
545
|
+
font-weight: 600;
|
|
546
|
+
line-height: 1.6;
|
|
547
|
+
|
|
548
|
+
${t.media.maxWidth("mobile")} {
|
|
549
|
+
font-size: 16px;
|
|
550
|
+
}
|
|
551
|
+
`,Yn=s.div`
|
|
552
|
+
position: absolute;
|
|
553
|
+
top: calc(100% + 8px);
|
|
554
|
+
left: 0;
|
|
555
|
+
right: 0;
|
|
556
|
+
z-index: 2;
|
|
557
|
+
display: flex;
|
|
558
|
+
align-items: center;
|
|
559
|
+
gap: 8px;
|
|
560
|
+
padding: 8px 12px;
|
|
561
|
+
border-radius: 8px;
|
|
562
|
+
background: #ffcdd4;
|
|
563
|
+
color: #ec303a;
|
|
564
|
+
font-family: ${t.font.sans};
|
|
565
|
+
font-size: 14px;
|
|
566
|
+
font-weight: 500;
|
|
567
|
+
line-height: 1.2;
|
|
568
|
+
text-align: left;
|
|
569
|
+
|
|
570
|
+
${t.media.maxWidth("mobile")} {
|
|
571
|
+
position: static;
|
|
572
|
+
margin-top: 8px;
|
|
573
|
+
align-items: flex-start;
|
|
574
|
+
flex-wrap: wrap;
|
|
575
|
+
}
|
|
576
|
+
`,es=s.a`
|
|
577
|
+
display: inline-flex;
|
|
578
|
+
align-items: center;
|
|
579
|
+
gap: 2px;
|
|
580
|
+
margin-left: auto;
|
|
581
|
+
color: #ec303a;
|
|
582
|
+
font-weight: 600;
|
|
583
|
+
text-decoration: underline;
|
|
584
|
+
text-transform: uppercase;
|
|
585
|
+
white-space: nowrap;
|
|
586
|
+
|
|
587
|
+
${t.media.maxWidth("mobile")} {
|
|
588
|
+
margin-left: 0;
|
|
589
|
+
}
|
|
590
|
+
`,ts=s.label`
|
|
591
|
+
flex: 1;
|
|
592
|
+
min-width: 0;
|
|
593
|
+
display: flex;
|
|
594
|
+
align-items: center;
|
|
595
|
+
gap: 0;
|
|
596
|
+
cursor: text;
|
|
597
|
+
overflow: hidden;
|
|
598
|
+
`,ns=s.span`
|
|
599
|
+
flex: none;
|
|
600
|
+
margin-right: 8px;
|
|
601
|
+
font-family: ${t.font.sans};
|
|
602
|
+
font-size: 26px;
|
|
603
|
+
font-weight: 500;
|
|
604
|
+
line-height: 1;
|
|
605
|
+
color: ${t.colors.muted2};
|
|
606
|
+
|
|
607
|
+
${t.media.maxWidth("mobile")} {
|
|
608
|
+
font-size: 20px;
|
|
609
|
+
}
|
|
610
|
+
`,ss=s.input`
|
|
611
|
+
flex: 0 1 auto;
|
|
612
|
+
min-width: 0;
|
|
613
|
+
max-width: 100%;
|
|
614
|
+
border: 0;
|
|
615
|
+
outline: none;
|
|
616
|
+
background: transparent;
|
|
617
|
+
font-family: ${t.font.sans};
|
|
618
|
+
font-size: 20px;
|
|
619
|
+
font-weight: 600;
|
|
620
|
+
line-height: 1.6;
|
|
621
|
+
color: ${t.colors.text};
|
|
622
|
+
padding: 0;
|
|
623
|
+
|
|
624
|
+
&::placeholder {
|
|
625
|
+
color: ${t.colors.muted1};
|
|
626
|
+
font-weight: 400;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
${t.media.maxWidth("mobile")} {
|
|
630
|
+
font-size: 16px;
|
|
631
|
+
}
|
|
632
|
+
`,is=s.span`
|
|
633
|
+
flex: none;
|
|
634
|
+
margin-left: 2px;
|
|
635
|
+
/* Not selectable: it is the fixed part of the address, not something the reader typed. */
|
|
636
|
+
user-select: none;
|
|
637
|
+
-webkit-user-select: none;
|
|
638
|
+
font-family: ${t.font.sans};
|
|
639
|
+
font-size: 20px;
|
|
640
|
+
font-weight: 400;
|
|
641
|
+
line-height: 1.6;
|
|
642
|
+
color: ${t.colors.muted1};
|
|
643
|
+
|
|
644
|
+
${t.media.maxWidth("mobile")} {
|
|
645
|
+
font-size: 16px;
|
|
646
|
+
}
|
|
647
|
+
`,os=s.span`
|
|
648
|
+
flex: none;
|
|
649
|
+
font-family: ${t.font.sans};
|
|
650
|
+
font-size: 13px;
|
|
651
|
+
color: ${t.colors.muted2};
|
|
652
|
+
white-space: nowrap;
|
|
653
|
+
`,Pe=s.button`
|
|
654
|
+
flex: none;
|
|
655
|
+
display: inline-flex;
|
|
656
|
+
align-items: center;
|
|
657
|
+
justify-content: center;
|
|
658
|
+
gap: 8px;
|
|
659
|
+
height: 52px;
|
|
660
|
+
padding: 0 24px;
|
|
661
|
+
border: 0;
|
|
662
|
+
border-radius: 12px;
|
|
663
|
+
cursor: pointer;
|
|
664
|
+
background: ${t.gradients.cerise};
|
|
665
|
+
color: ${t.colors.softWhite};
|
|
666
|
+
font-family: ${t.font.sans};
|
|
667
|
+
font-weight: 600;
|
|
668
|
+
font-size: 15px;
|
|
669
|
+
letter-spacing: 0.46px;
|
|
670
|
+
line-height: 24px;
|
|
671
|
+
text-transform: uppercase;
|
|
672
|
+
|
|
673
|
+
&:hover:not(:disabled) {
|
|
674
|
+
filter: brightness(1.05);
|
|
675
|
+
}
|
|
676
|
+
&:focus-visible {
|
|
677
|
+
outline: 2px solid ${t.colors.white};
|
|
678
|
+
outline-offset: 2px;
|
|
679
|
+
}
|
|
680
|
+
&:disabled {
|
|
681
|
+
cursor: not-allowed;
|
|
682
|
+
background: #e7c8e9;
|
|
683
|
+
color: #fbe9fb;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
${t.media.maxWidth("mobile")} {
|
|
687
|
+
display: none;
|
|
688
|
+
}
|
|
689
|
+
`,rs=s(Pe)`
|
|
690
|
+
display: none;
|
|
691
|
+
|
|
692
|
+
${t.media.maxWidth("mobile")} {
|
|
693
|
+
display: inline-flex;
|
|
694
|
+
width: 100%;
|
|
695
|
+
height: 48px;
|
|
696
|
+
border-radius: 12px;
|
|
697
|
+
}
|
|
698
|
+
`,as=s.span`
|
|
699
|
+
display: inline-flex;
|
|
700
|
+
align-items: center;
|
|
701
|
+
gap: 4px;
|
|
702
|
+
font-weight: 600;
|
|
703
|
+
|
|
704
|
+
.ico {
|
|
705
|
+
width: 16px;
|
|
706
|
+
height: 16px;
|
|
707
|
+
}
|
|
708
|
+
`,ls=s.div`
|
|
709
|
+
display: flex;
|
|
710
|
+
align-items: center;
|
|
711
|
+
gap: 8px;
|
|
712
|
+
padding: 8px 14px;
|
|
713
|
+
border-radius: 8px;
|
|
714
|
+
font-family: ${t.font.sans};
|
|
715
|
+
font-size: 13px;
|
|
716
|
+
font-weight: 500;
|
|
717
|
+
text-align: left;
|
|
718
|
+
|
|
719
|
+
background: ${({tone:i})=>i==="error"?"rgba(255, 45, 85, 0.12)":i==="ok"?"rgba(30, 166, 114, 0.14)":"rgba(255,255,255,0.14)"};
|
|
720
|
+
color: ${({tone:i})=>i==="error"?t.colors.dclRed:i==="ok"?"#0f7a4f":"#ecebed"};
|
|
721
|
+
|
|
722
|
+
.ico {
|
|
723
|
+
width: 16px;
|
|
724
|
+
height: 16px;
|
|
725
|
+
flex: none;
|
|
726
|
+
}
|
|
727
|
+
`,pe=s(ls)`
|
|
728
|
+
position: absolute;
|
|
729
|
+
top: calc(100% + 8px);
|
|
730
|
+
left: 0;
|
|
731
|
+
right: 0;
|
|
732
|
+
z-index: 2;
|
|
733
|
+
|
|
734
|
+
/* Static on mobile, as TakenBanner is: the claim button sits below InputWrap there, so anything
|
|
735
|
+
floating out of the input lands on top of it. */
|
|
736
|
+
${t.media.maxWidth("mobile")} {
|
|
737
|
+
position: static;
|
|
738
|
+
margin-top: 8px;
|
|
739
|
+
}
|
|
740
|
+
`,cs=s.section`
|
|
741
|
+
display: flex;
|
|
742
|
+
flex-direction: column;
|
|
743
|
+
gap: 48px;
|
|
744
|
+
padding: 0 48px;
|
|
745
|
+
|
|
746
|
+
${t.media.maxWidth("mobile")} {
|
|
747
|
+
gap: 32px;
|
|
748
|
+
padding: 0 20px;
|
|
749
|
+
}
|
|
750
|
+
`,ds=s.div`
|
|
751
|
+
display: flex;
|
|
752
|
+
flex-direction: column;
|
|
753
|
+
align-items: center;
|
|
754
|
+
gap: 24px;
|
|
755
|
+
`,ps=s.h2`
|
|
756
|
+
margin: 0;
|
|
757
|
+
text-align: center;
|
|
758
|
+
font-family: ${t.font.sans};
|
|
759
|
+
font-weight: 600;
|
|
760
|
+
font-size: 32px;
|
|
761
|
+
line-height: 1.167;
|
|
762
|
+
color: ${t.colors.text2};
|
|
763
|
+
|
|
764
|
+
${t.media.maxWidth("mobile")} {
|
|
765
|
+
font-size: 22px;
|
|
766
|
+
}
|
|
767
|
+
`,hs=s.p`
|
|
768
|
+
margin: 0;
|
|
769
|
+
max-width: 907px;
|
|
770
|
+
text-align: center;
|
|
771
|
+
font-family: ${t.font.sans};
|
|
772
|
+
font-weight: 400;
|
|
773
|
+
font-size: 20px;
|
|
774
|
+
line-height: 1.57;
|
|
775
|
+
color: ${t.colors.text};
|
|
776
|
+
|
|
777
|
+
${t.media.maxWidth("mobile")} {
|
|
778
|
+
font-size: 16px;
|
|
779
|
+
}
|
|
780
|
+
`,xs=s.div`
|
|
781
|
+
display: grid;
|
|
782
|
+
grid-template-columns: repeat(4, 1fr);
|
|
783
|
+
gap: 24px;
|
|
784
|
+
align-items: stretch;
|
|
785
|
+
|
|
786
|
+
${t.media.maxWidth("lg")} {
|
|
787
|
+
grid-template-columns: repeat(2, 1fr);
|
|
788
|
+
}
|
|
789
|
+
${t.media.maxWidth("mobile")} {
|
|
790
|
+
grid-template-columns: 1fr;
|
|
791
|
+
}
|
|
792
|
+
`,q=s.article`
|
|
793
|
+
min-width: 0;
|
|
794
|
+
display: flex;
|
|
795
|
+
flex-direction: column;
|
|
796
|
+
background: ${t.colors.white};
|
|
797
|
+
box-shadow: 0 0 0 0.25px ${t.colors.muted2};
|
|
798
|
+
border-radius: ${t.radius.card};
|
|
799
|
+
overflow: hidden;
|
|
800
|
+
|
|
801
|
+
/* Forced colours drop decorative shadows. Outline rather than border: it survives there and, like the
|
|
802
|
+
shadow, takes no layout, so the artwork still reaches the corner. */
|
|
803
|
+
@media (forced-colors: active) {
|
|
804
|
+
outline: 1px solid CanvasText;
|
|
805
|
+
}
|
|
806
|
+
`,Z=s.img`
|
|
807
|
+
display: block;
|
|
808
|
+
width: 100%;
|
|
809
|
+
aspect-ratio: 388 / 235;
|
|
810
|
+
object-fit: cover;
|
|
811
|
+
`,V=s.div`
|
|
812
|
+
flex: 1;
|
|
813
|
+
display: flex;
|
|
814
|
+
flex-direction: column;
|
|
815
|
+
gap: 6px;
|
|
816
|
+
padding: 12px 16px;
|
|
817
|
+
`,K=s.h3`
|
|
818
|
+
margin: 0;
|
|
819
|
+
font-family: ${t.font.sans};
|
|
820
|
+
font-weight: 700;
|
|
821
|
+
font-size: 20px;
|
|
822
|
+
line-height: 1.57;
|
|
823
|
+
text-transform: uppercase;
|
|
824
|
+
color: ${t.colors.text};
|
|
825
|
+
`,Q=s.p`
|
|
826
|
+
margin: 0;
|
|
827
|
+
font-family: ${t.font.sans};
|
|
828
|
+
font-weight: 400;
|
|
829
|
+
font-size: 14px;
|
|
830
|
+
line-height: 1.57;
|
|
831
|
+
color: ${t.colors.text};
|
|
832
|
+
`,fs=s.span`
|
|
833
|
+
font-weight: 600;
|
|
834
|
+
color: ${t.colors.accent};
|
|
835
|
+
`,ze=s.a`
|
|
836
|
+
display: inline-flex;
|
|
837
|
+
align-items: center;
|
|
838
|
+
gap: 2px;
|
|
839
|
+
margin-top: auto;
|
|
840
|
+
font-family: ${t.font.sans};
|
|
841
|
+
font-weight: 500;
|
|
842
|
+
font-size: 14px;
|
|
843
|
+
line-height: 30px;
|
|
844
|
+
color: ${t.colors.accent};
|
|
845
|
+
text-decoration: underline;
|
|
846
|
+
|
|
847
|
+
&:focus-visible {
|
|
848
|
+
outline: 2px solid ${t.colors.accent};
|
|
849
|
+
outline-offset: 2px;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
.ico {
|
|
853
|
+
width: 13px;
|
|
854
|
+
height: 13px;
|
|
855
|
+
}
|
|
856
|
+
`,ms=s.span`
|
|
857
|
+
position: absolute;
|
|
858
|
+
width: 1px;
|
|
859
|
+
height: 1px;
|
|
860
|
+
padding: 0;
|
|
861
|
+
margin: -1px;
|
|
862
|
+
overflow: hidden;
|
|
863
|
+
clip: rect(0, 0, 0, 0);
|
|
864
|
+
white-space: nowrap;
|
|
865
|
+
border: 0;
|
|
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};
|