@dcl/shop 1.13.1-35085806935.commit-1d79e2c → 1.13.1-35088015492.commit-25d8a11
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-C_IerNiA.js → Activity-Br7TotTg.js} +4 -4
- package/_assets/{AnimatedBackground-rd0Cm7UJ.js → AnimatedBackground-mKUTCrsZ.js} +6 -6
- package/_assets/{Assets-BWPFNRh2.js → Assets-Bh3kAxON.js} +9 -9
- package/_assets/{Authorizations-KOzubUgz.js → Authorizations-DPVFuAHg.js} +2 -2
- package/_assets/{Cart-B2-isbha.js → Cart-Cz1_8pDF.js} +2 -2
- package/_assets/{Collection-D-8Bpi67.js → Collection-BIm7ajYT.js} +2 -2
- package/_assets/{CollectionCarousel-BuB-J2CU.js → CollectionCarousel-Dgmy1mBv.js} +3 -3
- package/_assets/{Confetti-CYipT9FZ.js → Confetti-TvBa-8L0.js} +4 -4
- package/_assets/{ConstantsUtil-DuHj0CMN.js → ConstantsUtil-BIW9CVUv.js} +2 -2
- package/_assets/{ContentClient-CAzHzG9i.js → ContentClient-CWLYPXGZ.js} +2 -2
- package/_assets/{Creator-CTFy7_m-.js → Creator-Bm286S4l.js} +2 -2
- package/_assets/{DeploymentBuilder-CtvVWhRq.js → DeploymentBuilder-lkKjiabA.js} +2 -2
- package/_assets/{EmotePlaybackBar-BsBGlr0h.js → EmotePlaybackBar-CmOnYKyU.js} +5 -5
- package/_assets/{ErrorNotice-C_S89bAS.js → ErrorNotice-Dqt3U2vl.js} +2 -2
- package/_assets/{Event-7sfgV2Md.js → Event-CzoOohtw.js} +2 -2
- package/_assets/{ExchangeController-DHN2m7yT.js → ExchangeController-DLt1pr9X.js} +2 -2
- package/_assets/{Faq-mqMFd-El.js → Faq-C75vztz0.js} +2 -2
- package/_assets/{GetCredits-Dd7nayxX.js → GetCredits-C4r6Z9Ll.js} +2 -2
- package/_assets/{Grow-oKBN4u5_.js → Grow-C89nQ9vj.js} +2 -2
- package/_assets/{HelpersUtil-CFsKkgDg.js → HelpersUtil-BZx2xXkr.js} +2 -2
- package/_assets/ItemDetail-O0E45P4x.js +3778 -0
- package/_assets/{LoadMore-BALknwCN.js → LoadMore-DgGHun07.js} +2 -2
- package/_assets/{ManaPricingBanner.styles-_vfEtCmJ.js → ManaPricingBanner.styles-DIaSN-0J.js} +2 -2
- package/_assets/{MyAssets-BW5TAGSd.js → MyAssets-B_B3e16w.js} +2 -2
- package/_assets/{MyFavorites-CpNcQvv5.js → MyFavorites-DyG3bnHZ.js} +2 -2
- package/_assets/{NetworkUtil-FgTwh6ht.js → NetworkUtil-C2mA-_Ya.js} +2 -2
- package/_assets/{NotFound-Cy2qsu2r.js → NotFound-C19ay2J0.js} +2 -2
- package/_assets/{NotificationsBell-CNV2Pg0I.js → NotificationsBell-Bg_tRjZT.js} +2 -2
- package/_assets/{OutfitDetail-C9XBwEIV.js → OutfitDetail-BILkjOT0.js} +2 -2
- package/_assets/{OutfitPreview-CnZSZod5.js → OutfitPreview-DnePnq6P.js} +2 -2
- package/_assets/{OutfitStudio-DvHXjWRS.js → OutfitStudio-BVxXtmNl.js} +2 -2
- package/_assets/{Spinner-C558dCbB.js → Spinner-CjR4Zw45.js} +2 -2
- package/_assets/{StoreSettings-1slOpk3_.js → StoreSettings-BI2PxdDc.js} +2 -2
- package/_assets/{Success-DMKBgnMb.js → Success-BMSTCual.js} +2 -2
- package/_assets/{SwapController-BI_o5Mdx.js → SwapController-MUVg1jDR.js} +2 -2
- package/_assets/{TradeService-DxIaYj6U.js → TradeService-DSbQ-N2T.js} +2 -2
- package/_assets/{W3MFrameProviderSingleton-B_HuzaO4.js → W3MFrameProviderSingleton-bGfA1Ldc.js} +4 -4
- package/_assets/{WebCryptoP256-mXccULbe.js → WebCryptoP256-RyjS14F-.js} +2 -2
- package/_assets/{authorizations-CVBKhCle.js → authorizations-o-LlYXNc.js} +2 -2
- package/_assets/{basic-Chw7xZAx.js → basic-nXP69bkA.js} +2 -2
- package/_assets/{biconomy-CXY0FYrS.js → biconomy-D6gisxlY.js} +2 -2
- package/_assets/{browseLayout.styles-BX8RNIIu.js → browseLayout.styles-Bza8FY3N.js} +2 -2
- package/_assets/{browser-90ZLxYpX.js → browser-D53imPjf.js} +2 -2
- package/_assets/{browser-Df4wyid-.js → browser-DIXts996.js} +2 -2
- package/_assets/{browser-ponyfill-CqpF85JO.js → browser-ponyfill-BaElO0Yy.js} +2 -2
- package/_assets/{builder-CfVDu5Z0.js → builder-CEDpBFkW.js} +2 -2
- package/_assets/{buy-Caju-Nj5.js → buy-8-Zq_4Fb.js} +2 -2
- package/_assets/{buy-gasless-BUFRMHYL.js → buy-gasless-mSBHbIka.js} +2 -2
- package/_assets/{categories-CZdjHjf9.js → categories-J0dMuNkM.js} +2 -2
- package/_assets/{ccip-CsQTQdMh.js → ccip-CNvm_wRE.js} +2 -2
- package/_assets/{ccip-BWG3a7A5.js → ccip-CgSAa6qI.js} +2 -2
- package/_assets/{chains-Bg7Yt-VK.js → chains-BbZKALwH.js} +2 -2
- package/_assets/{collectionPage.styles-BaIAkimk.js → collectionPage.styles-C--ki2P9.js} +8 -8
- package/_assets/{common-DJUhWO_g.js → common-TqxBDIuh.js} +2 -2
- package/_assets/{controller-DS4nSeab.js → controller-B5adsfCx.js} +3 -3
- package/_assets/{core-3J5SSgPT.js → core-Dz9rfTnP.js} +5 -5
- package/_assets/{createSvgIcon-Dcj-MthE.js → createSvgIcon-DSycgKQz.js} +2 -2
- package/_assets/{crumbs.styles-NOQP7gu4.js → crumbs.styles-BqMPTZMi.js} +2 -2
- package/_assets/{custom-CZwZDXcB.js → custom-SA3P34sS.js} +2 -2
- package/_assets/{data-capture-BCREkcGt.js → data-capture-QCuBCgVo.js} +2 -2
- package/_assets/{dcl-schemas-BhHIKpM4.js → dcl-schemas-BKQ0vYZF.js} +2 -2
- package/_assets/{decimals-CQh414kf.js → decimals-BlmrI4QX.js} +2 -2
- package/_assets/{decimals-AXPEfgKi.js → decimals-CZlYYHvF.js} +2 -2
- package/_assets/{detectExtension-DhgGAkTY.js → detectExtension-BES_31hM.js} +2 -2
- package/_assets/{disposePreview-DOxawycc.js → disposePreview-BDCsvWuP.js} +2 -2
- package/_assets/{email-CZoS-SB6.js → email--UGVY4VA.js} +2 -2
- package/_assets/{embedded-wallet-BgHzP-sQ.js → embedded-wallet-C0h1UGCI.js} +2 -2
- package/_assets/{emotion-styled.browser.esm-CeAxqmRx.js → emotion-styled.browser.esm-8Fn_bSaK.js} +2 -2
- package/_assets/{engine-ClIxmK8b.js → engine-CVmNCEKG.js} +2 -2
- package/_assets/{errors-CSqR1pci.js → errors-5abtsF-d.js} +2 -2
- package/_assets/{estimate-l1-fee-DrsdAIsF.js → estimate-l1-fee-Dh31wn7V.js} +2 -2
- package/_assets/{eth_estimateGas-sjr2uZ-_.js → eth_estimateGas-UbaxlGnG.js} +2 -2
- package/_assets/{eth_getStorageAt-DiEfelEu.js → eth_getStorageAt-BUvTw4uP.js} +2 -2
- package/_assets/{eth_getTransactionCount-B6QQ4gtE.js → eth_getTransactionCount-CGFdAd5L.js} +2 -2
- package/_assets/{ethereum-DUqOKRGC.js → ethereum-TadlwfdZ.js} +2 -2
- package/_assets/{ethers-CkmgjxHm.js → ethers-CqnE9_Iy.js} +2 -2
- package/_assets/{events-BC3T4RCY.js → events-DxeiWjZO.js} +2 -2
- package/_assets/{execute-BSB5qE4d.js → execute-bRHFO9T8.js} +3 -3
- package/_assets/{extractIPFS-DvcS_8de.js → extractIPFS-DTbEwfwl.js} +2 -2
- package/_assets/{features-D80mn54l.js → features-DOlQFJIn.js} +2 -2
- package/_assets/{fetchTokenMetadata-BzwBPBWc.js → fetchTokenMetadata-C1uUHgz6.js} +3 -3
- package/_assets/{field.styles-BIFdqCzy.js → field.styles-CGT52_F0.js} +2 -2
- package/_assets/{fortmatic-DnF86mLy.js → fortmatic-B4F48NpJ.js} +2 -2
- package/_assets/{get-bytecode-DpvPu_G_.js → get-bytecode-B61L8bJf.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-BoZDcL5t.js → get-ecosystem-wallet-info-W6y9v6fC.js} +2 -2
- package/_assets/{getBalance-BZp9GQ9N.js → getBalance-CgOiBcM_.js} +3 -3
- package/_assets/{getInstalledModules-VtAt7mHd.js → getInstalledModules-DWdNC3R0.js} +2 -2
- package/_assets/{getNFT-m0HM_XZ4.js → getNFT-BOhaT1yq.js} +3 -3
- package/_assets/{getNFT-BYmBhzoa.js → getNFT-Op6nNTCr.js} +2 -2
- package/_assets/{grid.styles-C2IQh-32.js → grid.styles-iTSFhsyn.js} +2 -2
- package/_assets/{hashTypedData-BVZHbmrs.js → hashTypedData-BjxqyJnO.js} +2 -2
- package/_assets/{hashTypedData-Tld_HkS8.js → hashTypedData-CTf6X_0x.js} +2 -2
- package/_assets/{import-DwXeY7AR.js → import-BFM9mYtD.js} +2 -2
- package/_assets/{in-app-Bo54_ze4.js → in-app-D-IPfiDb.js} +2 -2
- package/_assets/{in-app-wallet-calls-D0b-0cWi.js → in-app-wallet-calls-BivXJ6s-.js} +2 -2
- package/_assets/{index-DS5qHieE.js → index-8c2AE2rL.js} +2 -2
- package/_assets/{index-Bhh1VsVq.js → index-9ER2YXLE.js} +2 -2
- package/_assets/{index-R11XWKZf.js → index-AH8vZ3-a.js} +2 -2
- package/_assets/{index-Z5sRHcls.js → index-ApdCRpGh.js} +2 -2
- package/_assets/{index-mB3m9iZN.js → index-B0AMIOfY.js} +2 -2
- package/_assets/{index-BlxCL47V.js → index-B3cule6M.js} +2 -2
- package/_assets/{index-NuEVZ0UW.js → index-BE-bCzXU.js} +2 -2
- package/_assets/{index-CWERQA0y.js → index-BIU1Xflg.js} +2 -2
- package/_assets/{index-C0gpyWhu.js → index-BLF43zxA.js} +2 -2
- package/_assets/{index-COaYP6gF.js → index-BLu7rJtN.js} +2 -2
- package/_assets/{index-BE4j7Nuq.js → index-BMWj60Rz.js} +2 -2
- package/_assets/{index-CkHnQw8I.js → index-BbT8qu_L.js} +3 -3
- package/_assets/{index-Wmg185eM.js → index-BbYwNUDQ.js} +2 -2
- package/_assets/{index-BkuaFLII.js → index-Bece1vl_.js} +3 -3
- package/_assets/{index-zq6tYXCi.js → index-BgSm7poL.js} +2 -2
- package/_assets/{index-DGaeG6X9.js → index-BgewSO5d.js} +2 -2
- package/_assets/{index-DjxSVK-S.js → index-Bi7YdA0p.js} +2 -2
- package/_assets/{index-Cl-xJvVY.js → index-BjvOCOXo.js} +2 -2
- package/_assets/{index-BocYyaTP.js → index-Bo1Z5mEG.js} +2 -2
- package/_assets/{index-CobihOwe.js → index-BpgGRt4i.js} +2 -2
- package/_assets/{index-m6wHTHWn.js → index-BqXgj2c4.js} +2 -2
- package/_assets/{index-FbFczga-.js → index-BuUjwDYx.js} +2 -2
- package/_assets/{index-BjkERpTp.css → index-ByiMU36z.css} +1 -1
- package/_assets/{index-ChjrXYqO.js → index-C1ILo9mK.js} +2 -2
- package/_assets/{index-BLgMQkOw.js → index-C3ELTXuu.js} +3 -3
- package/_assets/{index-Dv88yctr.js → index-C6WGvNBW.js} +2 -2
- package/_assets/{index-DC8tm76o.js → index-C7RUGLgx.js} +420 -414
- package/_assets/{index-wntKx5z1.js → index-C8USgWUh.js} +2 -2
- package/_assets/{index-Cn0xip1b.js → index-CORj9AA6.js} +2 -2
- package/_assets/{index-DnqHdjvd.js → index-CQyQWevE.js} +2 -2
- package/_assets/{index-7xh3Jf5R.js → index-CToeVfXv.js} +2 -2
- package/_assets/{index-D_r0aCgk.js → index-CVfarqKE.js} +4 -4
- package/_assets/{index-S4gbJ6vm.js → index-CWpLrxaY.js} +2 -2
- package/_assets/{index-UUhXVcLF.js → index-CcJ1bQOV.js} +2 -2
- package/_assets/{index-Dd1Mcth_.js → index-CcMloegU.js} +2 -2
- package/_assets/{index-BvPCbOi0.js → index-Cg4gI1gY.js} +2 -2
- package/_assets/{index-BLtk7HUi.js → index-Ch8ZdFvj.js} +2 -2
- package/_assets/{index-j02PKBI-.js → index-Cj8n6jhR.js} +3 -3
- package/_assets/{index-CiR_D9DE.js → index-CkhRwzDn.js} +2 -2
- package/_assets/{index-DekYSqsL.js → index-Cw2X26uO.js} +2 -2
- package/_assets/{index-gZhU_I9S.js → index-D-g6tUrr.js} +4 -4
- package/_assets/{index-CxmCB6xW.js → index-D2iQXB_K.js} +2 -2
- package/_assets/{index-CzFGtRKU.js → index-D3vbPDep.js} +2 -2
- package/_assets/{index-CMyYL8tW.js → index-D6MOFBZd.js} +2 -2
- package/_assets/{index-DrAKRbPK.js → index-D6OhFIgK.js} +2 -2
- package/_assets/{index-DdLZ3fqM.js → index-D7KJ3B17.js} +2 -2
- package/_assets/{index-PNjPrkO6.js → index-DB5YO8eU.js} +2 -2
- package/_assets/{index-ByMFdC1C.js → index-DBjGF5O5.js} +2 -2
- package/_assets/{index-Qvd8HEf_.js → index-DBkGVGV_.js} +2 -2
- package/_assets/{index--CE53HY-.js → index-DDwh5CzB.js} +4 -4
- package/_assets/{index-B7UXh3Ur.js → index-DHmdplW7.js} +2 -2
- package/_assets/{index-C-lwiNvv.js → index-DHrx45E-.js} +2 -2
- package/_assets/{index-CMuSr6XM.js → index-DKNSn9FC.js} +2 -2
- package/_assets/{index-B9MjHL88.js → index-DNZQtb01.js} +2 -2
- package/_assets/{index-ClY8QHH2.js → index-DSYn1rPz.js} +2 -2
- package/_assets/{index-DHPhN2yl.js → index-D_b2TfPS.js} +2 -2
- package/_assets/{index-D7l-lBAg.js → index-Dh747mI9.js} +2 -2
- package/_assets/{index-DRFgzkoG.js → index-DhZR3d6F.js} +2 -2
- package/_assets/{index-gRZnphxh.js → index-DntLKm7o.js} +2 -2
- package/_assets/{index-GkBI8O2x.js → index-EO54jEJz.js} +2 -2
- package/_assets/{index-DP42dOpm.js → index-Je254H6v.js} +2 -2
- package/_assets/{index-D5KmMlwG.js → index-OxIuflSf.js} +2 -2
- package/_assets/{index-8o9VY33f.js → index-QryiMDf6.js} +2 -2
- package/_assets/{index-ytvqdaDN.js → index-TwJnCsCt.js} +2 -2
- package/_assets/{index-DSQ9SfM2.js → index-UORXqou9.js} +2 -2
- package/_assets/{index-hmhWzCFb.js → index-_eXXkY79.js} +2 -2
- package/_assets/{index-DI84AiHR.js → index-jo5IZGw6.js} +2 -2
- package/_assets/{index-CyiDFHdZ.js → index-kSQR1Rng.js} +2 -2
- package/_assets/{index.es-sUbE4Uzq.js → index.es-B-n7bK95.js} +2 -2
- package/_assets/{index.es-aHFqsJ11.js → index.es-C50Venyf.js} +5 -5
- package/_assets/{index.es-CkXh6VoG.js → index.es-Dn-oiXGY.js} +2 -2
- package/_assets/{index.es-bY325XUR.js → index.es-yT5643Oy.js} +2 -2
- package/_assets/{items-empty-BKm1-iY9.js → items-empty-CSlmEyZz.js} +2 -2
- package/_assets/{jump-BVRmaQDV.js → jump-BOiqSS4M.js} +2 -2
- package/_assets/{linkAccount-D4_Pqqkx.js → linkAccount-B6zz4AhU.js} +2 -2
- package/_assets/{localBatchGatewayRequest-Dxow1xzW.js → localBatchGatewayRequest-MsW7s5by.js} +2 -2
- package/_assets/{modal.styles-Cd-mz1I0.js → modal.styles-B7xjPjYV.js} +2 -2
- package/_assets/{native-p0UHbyoJ.js → native-UMs_9ER2.js} +2 -2
- package/_assets/{networks-BdaY78GR.js → networks-BxL8Ab1j.js} +2 -2
- package/_assets/{onramp-DsWERpni.js → onramp-DxZRTgp3.js} +2 -2
- package/_assets/{openzeppelin-CL5laCu8.js → openzeppelin-Cr4Y9xjf.js} +2 -2
- package/_assets/{ownerOf-oImsD-YS.js → ownerOf-DY8a2-2C.js} +2 -2
- package/_assets/{parseNft-DWm4FHvP.js → parseNft-DPdft2uD.js} +3 -3
- package/_assets/{parseSignature-DsfTTANP.js → parseSignature-BI_WyMN8.js} +2 -2
- package/_assets/{parseSignature-BEQjywfB.js → parseSignature-B_rheFpA.js} +4 -4
- package/_assets/{passkeys-CPDf710F.js → passkeys-D1ovHh1n.js} +2 -2
- package/_assets/{pay-with-exchange-CdeIulmP.js → pay-with-exchange-CAo2mIu7.js} +2 -2
- package/_assets/{prepare-contract-call-CjQoPYCU.js → prepare-contract-call-CC-FfypC.js} +2 -2
- package/_assets/{qr-overlay-DCZuVeTe.js → qr-overlay-Dqlh9s-P.js} +4 -4
- package/_assets/{react-BFtKLtDt.js → react-D7J-E0MH.js} +2 -2
- package/_assets/{receive-CEw4RfAa.js → receive-Cqln7Zzs.js} +2 -2
- package/_assets/{resolveImplementation-cLIVJ3af.js → resolveImplementation-CbOxSd1Z.js} +2 -2
- package/_assets/{resume-buy-BeKMuIVF.js → resume-buy-qr8Z1bgQ.js} +2 -2
- package/_assets/{rpc-sibmiiq0.js → rpc-6QQor2XU.js} +2 -2
- package/_assets/{sales-empty-CaY_5iqE.js → sales-empty-B3qcIyi6.js} +2 -2
- package/_assets/{search-empty-CKrttBU6.js → search-empty-B2ikWLFM.js} +2 -2
- package/_assets/{secp256k1-Di06xHtc.js → secp256k1-CQeO8_L9.js} +2 -2
- package/_assets/{secp256k1-DQPpYs2U.js → secp256k1-DibZRl6e.js} +2 -2
- package/_assets/{secp256k1-CLEtoEqk.js → secp256k1-N7Qrv3ox.js} +2 -2
- package/_assets/{send-batch-transaction-N0qmThjI.js → send-batch-transaction-UJjMLB2L.js} +2 -2
- package/_assets/{send-eip712-transaction-DnmUGZSp.js → send-eip712-transaction-DSyJkl_1.js} +3 -3
- package/_assets/{send-2ru-Xrz-.js → send-fc370TIG.js} +2 -2
- package/_assets/{send-gasless-transaction-CYOPCD2F.js → send-gasless-transaction-ByJ2YdbP.js} +3 -3
- package/_assets/{send-transaction-pNwCZiVr.js → send-transaction-8aUtEDXf.js} +3 -3
- package/_assets/{sendMetaTransaction-CPX0jVr6.js → sendMetaTransaction-C6Fbql0T.js} +2 -2
- package/_assets/{sendRawTransaction-Cki6M_rF.js → sendRawTransaction-BapPv41W.js} +4 -4
- package/_assets/{sentry-BsJBy84X.js → sentry-BK5YQzUx.js} +3 -3
- package/_assets/{serializeTransaction-z0lh3601.js → serializeTransaction-vu5gUsgc.js} +2 -2
- package/_assets/{session-proposal-DTmS0K3z.js → session-proposal-DigsDD4x.js} +2 -2
- package/_assets/{session-request-CiVeodTc.js → session-request-BSVWGsvU.js} +3 -3
- package/_assets/{sha256-Dk2cKrX0.js → sha256-CEHbBAco.js} +2 -2
- package/_assets/{sha3-BDxvk5QO.js → sha3-BShx66Ks.js} +2 -2
- package/_assets/signin-empty-K31kGWGu.js +2 -0
- package/_assets/{signing-rV5fiz9N.js → signing-BmfCro8S.js} +4 -4
- package/_assets/{skeleton.styles-BsQ_5pUq.js → skeleton.styles-BN71VInw.js} +2 -2
- package/_assets/{socials-BOfGkTXA.js → socials-BHFgLpAJ.js} +2 -2
- package/_assets/{styled-7TdoU1KU.js → styled-Doc5cwwv.js} +2 -2
- package/_assets/{swaps-BrSuszxw.js → swaps-K7u4TcXn.js} +2 -2
- package/_assets/{thirdweb-DzQyRKzG.js → thirdweb-BcMQ69Q0.js} +4 -4
- package/_assets/{to-serializable-transaction-lPTr-Mdl.js → to-serializable-transaction-BrhQQJr8.js} +3 -3
- package/_assets/{totalSupply-kq-SQhCo.js → totalSupply-CuA1naxr.js} +2 -2
- package/_assets/{transaction-DEZBws2E.js → transaction-HCF_3XYc.js} +2 -2
- package/_assets/{transactionReceipt-C20tUFw5.js → transactionReceipt-07DpCAC0.js} +2 -2
- package/_assets/{transactions-C5ZRtd37.js → transactions-a9mQj56V.js} +2 -2
- package/_assets/{useCreditPacks-DwebwNha.js → useCreditPacks-C4goi1v6.js} +2 -2
- package/_assets/{useInfiniteGrid-CEzTx-wX.js → useInfiniteGrid-x8-KLPvB.js} +2 -2
- package/_assets/{useStore-CXfsxoeS.js → useStore-fPz8-87J.js} +3 -3
- package/_assets/{useTheme-EKsHtgn6.js → useTheme-DQw02uin.js} +2 -2
- package/_assets/{utils-u-bcX7sy.js → utils-BIDnbzds.js} +2 -2
- package/_assets/{verifyHash-Db22YscA.js → verifyHash-zWGUEzxO.js} +2 -2
- package/_assets/{w3m-modal-C_YWh6LN.js → w3m-modal-DieNoy5B.js} +2 -2
- package/_assets/{w3m-modal-DiGlXkRp.js → w3m-modal-npxivmAE.js} +2 -2
- package/_assets/{wait-for-tx-receipt-DAVIwVwB.js → wait-for-tx-receipt-CLSVYeXT.js} +2 -2
- package/_assets/{wallet-Bu4Mv-6R.js → wallet-Bhi-khZu.js} +2 -2
- package/_assets/{wallets-_Bz6C5b8.js → wallets-BX3reIDg.js} +6 -6
- package/_assets/{web-connector-l9y1mWly.js → web-connector-B-Qttl4q.js} +4 -4
- package/_assets/{writeContract-aoLu5Q9m.js → writeContract-DBB3GCUP.js} +2 -2
- package/_assets/{zora-sepolia-OwesLQos.js → zora-sepolia-4aZYsx8C.js} +2 -2
- package/_assets/{zoraTestnet-CyEGexWN.js → zoraTestnet-k4gEq1qt.js} +2 -2
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/ItemDetail-D9qgvmxs.js +0 -3778
- package/_assets/signin-empty-TWiO0wp8.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-
|
|
2
|
-
import{m as Ae,bP as Ee,F as U,E,bQ as Le,s as h,d,k as Ne,J as Pe,c as o,X as $e,aQ as Te,Z as ce,bR as ne,bS as ae,bT as Se,_ as Ce,K as L,av as K,bU as Fe,L as De,bs as B,I as Q,S as Me,bV as He,N as P,bW as Re,bX as X}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-BqXgj2c4.js","_assets/react-D7J-E0MH.js","_assets/index-C7RUGLgx.js","_assets/dcl-schemas-BKQ0vYZF.js","_assets/sentry-BK5YQzUx.js","_assets/ethers-CqnE9_Iy.js","_assets/intl-AKLEHPeO.js","_assets/index-ByiMU36z.css","_assets/import-BFM9mYtD.js","_assets/buy-8-Zq_4Fb.js","_assets/authorizations-o-LlYXNc.js","_assets/sendMetaTransaction-C6Fbql0T.js","_assets/modal.styles-B7xjPjYV.js","_assets/ManaPricingBanner.styles-DIaSN-0J.js","_assets/Faq-C75vztz0.js","_assets/sales-empty-B3qcIyi6.js","_assets/field.styles-CGT52_F0.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{m as Ae,bP as Ee,F as U,E,bQ as Le,s as h,d,k as Ne,J as Pe,c as o,X as $e,aQ as Te,Z as ce,bR as ne,bS as ae,bT as Se,_ as Ce,K as L,av as K,bU as Fe,L as De,bs as B,I as Q,S as Me,bV as He,N as P,bW as Re,bX as X}from"./index-C7RUGLgx.js";import{r as f,a as qe,j as t,e as Oe,L as _e}from"./react-D7J-E0MH.js";import{u as ze,s as We}from"./sales-empty-B3qcIyi6.js";import{L as Ge}from"./LoadMore-DgGHun07.js";import{u as $}from"./useInfiniteGrid-x8-KLPvB.js";import{m as le}from"./mana-matic-CEqvSwrJ.js";import{n as Ue}from"./name-glyph-aUugT8vq.js";import{s as Ke}from"./signin-empty-K31kGWGu.js";import"./dcl-schemas-BKQ0vYZF.js";import"./sentry-BK5YQzUx.js";import"./ethers-CqnE9_Iy.js";import"./intl-AKLEHPeO.js";import"./import-BFM9mYtD.js";import"./buy-8-Zq_4Fb.js";import"./authorizations-o-LlYXNc.js";import"./sendMetaTransaction-C6Fbql0T.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="b5a3a1ad-7ef9-407a-97d5-1f932acc1b9a",e._sentryDebugIdIdentifier="sentry-dbid-b5a3a1ad-7ef9-407a-97d5-1f932acc1b9a")}catch{}})();const Be=15e3;function Qe(e,s){return e.txHash&&s.txHash?e.txHash===s.txHash:e.txHash||s.txHash?!1:e.status===s.status&&Math.abs(e.createdAt-s.createdAt)<=Be}function Xe(e){const s=[...e].sort((i,a)=>a.createdAt-i.createdAt),n=[];for(const i of s){const a=n[n.length-1];a&&Qe(a[a.length-1],i)?a.push(i):n.push([i])}return n.map(i=>{var a;return{id:((a=i.find(c=>c.txHash))==null?void 0:a.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(c=>c.createdAt)),status:Ve(i),totalCredits:i.reduce((c,l)=>c+l.credits,0),lines:i}})}function Ve(e){return e.some(s=>s.status==="PENDING")?"PENDING":e.some(s=>s.status==="SETTLED")?"SETTLED":"EXPIRED"}function Ye(e){return e==="SETTLED"?"SETTLED":e==="EXPIRED"?"FAILED":"PENDING"}function Ze(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Je(e){const s=[],n=new Map;for(const i of e){const a=Ze(i);if(!a){s.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits});continue}const c=n.get(a);if(c){c.quantity+=1,c.credits+=i.credits;continue}const l={key:a,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits};n.set(a,l),s.push(l)}return s}function et(e,s){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:s?Ae(e.manaWei,s):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function tt(e){return e.status!=="EXPIRED"||!!e.submittedTxHash}function it(e){const n=Xe(e.purchases.filter(tt)).map(r=>({kind:"purchase",id:`purchase:${r.id}`,createdAt:r.createdAt,order:r})),i=e.sales.map(r=>{const p=et(r,e.rate);return{kind:"sale",id:`sale:${p.id}`,createdAt:p.createdAt,sale:p}}),a=(e.creditOrders??[]).filter(r=>r.status!=="failed"&&r.status!=="abandoned").map(r=>({kind:"credit",id:`credit:${r.id}`,createdAt:r.createdAt,order:r})),c=new Set(e.purchases.filter(r=>r.txHash).map(r=>r.txHash.toLowerCase())),l=(e.manaPurchases??[]).filter(r=>!c.has(r.txHash.toLowerCase())).map(r=>({kind:"mana-purchase",id:`mana-purchase:${r.id}`,createdAt:r.createdAt,sale:r}));return[...n,...i,...a,...l].sort((r,p)=>p.createdAt-r.createdAt||(r.id<p.id?-1:1))}function st(e,s){return s==="all"?e:s==="sales"?e.filter(n=>n.kind==="sale"):e.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const ue=e=>e.trim().toLowerCase();function nt(e){const s=new Map;for(const n of e??[]){const i=ue(n.txHash??"");if(!i)continue;const a=s.get(i);a?a.push(n):s.set(i,[n])}return s}function at(e,s,n=Date.now()){const i=s.txHash?e.get(ue(s.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const a=i.length===1?rt(i[0].netCents):null,c=i.filter(r=>!r.available&&r.availableAt>n);if(c.length===0)return{kind:"credited",credits:a};const l=c.reduce((r,p)=>Math.max(r,p.availableAt),0);return{kind:"pending",credits:a,availableAt:l}}function rt(e){return Ee(e)}function ot(){const e=U(i=>{var a;return(a=i.session)==null?void 0:a.address}),{data:s,isLoading:n}=E({queryKey:["listing-count",e],queryFn:()=>Le({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:s==null?void 0:s.total,isLoading:n}}const dt="https://cdn.decentraland.org/@dcl/shop/1.13.1-35088015492.commit-25d8a11/_assets/credits-product-vs4Q6u6l.svg",V=Ne`
|
|
3
3
|
0% { background-position: 200% 0; }
|
|
4
4
|
100% { background-position: -200% 0; }
|
|
5
5
|
`,ct=h.section`
|
|
@@ -369,5 +369,5 @@ import{m as Ae,bP as Ee,F as U,E,bQ as Le,s as h,d,k as Ne,J as Pe,c as o,X as $
|
|
|
369
369
|
height: 26px;
|
|
370
370
|
object-fit: contain;
|
|
371
371
|
}
|
|
372
|
-
`,ee=N.withComponent(_e),wt=f.lazy(()=>Ce(()=>import("./index-m6wHTHWn.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])).then(e=>({default:e.ImportListings}))),T=24,It=["all","purchases","sales"],W="section",de="listings",G="view",At="migrate";function A(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function xe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function ge(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function fe({children:e}){const s=f.useRef(null),[n,i]=f.useState(null),a=()=>{var l;const c=(l=s.current)==null?void 0:l.getBoundingClientRect();c&&i({top:c.bottom+8,left:c.left+c.width/2})};return t.jsxs(bt,{ref:s,tabIndex:0,onMouseEnter:a,onMouseLeave:()=>i(null),onFocus:a,onBlur:()=>i(null),children:[e,n?Oe.createPortal(t.jsx(yt,{style:{top:n.top,left:n.left},role:"tooltip",children:o("activity.polygonMana")}),document.body):null]})}function Et({item:e}){const s=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||s,{data:i,isLoading:a}=E({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Re(e.tradeId):X(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),c=n&&a,l=(i==null?void 0:i.name)??o("activity.itemFallback"),r=(i==null?void 0:i.thumbnail)??"",p=B({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,w=t.jsxs(t.Fragment,{children:[c?t.jsx(Z,{}):t.jsx(q,{children:r?t.jsx("img",{src:r,alt:l}):t.jsx(Q,{name:"cart",size:20})}),t.jsxs(O,{children:[c?t.jsx(J,{}):t.jsx(_,{title:l,children:l}),e.quantity>1?t.jsx(z,{children:o("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(me,{children:[t.jsx(L,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]});return p?t.jsx(ee,{to:p,"data-link":"true",children:w}):t.jsx(N,{children:w})}function Lt({item:e}){const s=`@${e.registeredName}`;return t.jsxs(N,{"data-testid":"activity-name-line",children:[t.jsx(kt,{children:t.jsx("img",{src:Ue,alt:""})}),t.jsxs(O,{children:[t.jsx(_,{title:s,children:s}),t.jsx(z,{children:o("activity.nameRegistration")})]}),t.jsxs(me,{children:[t.jsx(L,{className:"ccy-mark"})," ",e.credits]})]})}function Nt({order:e}){const s=Je(e.lines),n=s.reduce((c,l)=>c+l.quantity,0),i=Ye(e.status),a=i==="SETTLED"?o("activity.completed"):i==="FAILED"?o("activity.failed"):o("activity.processing");return t.jsxs(S,{"data-testid":"purchase-order",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:A(e.createdAt)}),t.jsxs(M,{children:[o("activity.purchaseLabel")," · ",o("activity.itemCount",{count:n})]})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":i,children:a}),t.jsxs(k,{children:[t.jsx(L,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.totalCredits})]})]})]}),i==="FAILED"?t.jsx(vt,{children:o("activity.purchaseFailedNote")}):null,t.jsx(Y,{children:s.map(c=>c.registeredName?t.jsx(Lt,{item:c},c.key):t.jsx(Et,{item:c},c.key))})]})}function Pt({sale:e}){const{data:s,isLoading:n}=E({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>X(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??o("activity.itemFallback"),a=(s==null?void 0:s.thumbnail)??"",c=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,l=t.jsxs(t.Fragment,{children:[n?t.jsx(Z,{}):t.jsx(q,{children:a?t.jsx("img",{src:a,alt:i}):t.jsx(Q,{name:"offer",size:20})}),t.jsxs(O,{children:[n?t.jsx(J,{}):t.jsx(_,{title:i,children:i}),t.jsx(z,{children:o("activity.boughtFrom",{account:xe(e.seller)})})]})]});return t.jsxs(S,{"data-testid":"activity-mana-purchase",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:A(e.createdAt)}),t.jsx(M,{children:o("activity.paidWithMana")})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":"SETTLED",children:o("activity.completed")}),t.jsxs(k,{children:[ge(e.manaWei)," ",t.jsx(fe,{children:t.jsx(pe,{src:le,alt:"MANA"})})]})]})]}),t.jsx(Y,{children:c?t.jsx(ee,{to:c,"data-link":"true",children:l}):t.jsx(N,{children:l})})]})}function $t({sale:e,payout:s}){const{data:n,isLoading:i}=E({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>X(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),a=(n==null?void 0:n.name)??o("activity.itemFallback"),c=(n==null?void 0:n.thumbnail)??"",l=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,r=t.jsxs(t.Fragment,{children:[i?t.jsx(Z,{}):t.jsx(q,{children:c?t.jsx("img",{src:c,alt:a}):t.jsx(Q,{name:"offer",size:20})}),t.jsxs(O,{children:[i?t.jsx(J,{}):t.jsx(_,{title:a,children:a}),t.jsxs(z,{children:[o("activity.soldTo",{account:xe(e.counterparty)}),s.kind==="pending"?` · ${o("activity.payoutPendingOn",{date:A(s.availableAt)})}`:""]})]})]});return t.jsxs(S,{"data-testid":"activity-sale",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:A(e.createdAt)}),t.jsx(M,{children:o("activity.saleLabel")})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?o("activity.payoutPending"):o("activity.sold")}),s.kind==="direct"?t.jsxs(k,{"data-kind":"income",children:["+",ge(e.manaWei)," ",t.jsx(fe,{children:t.jsx(pe,{src:le,alt:"MANA"})})]}):s.credits!==null?t.jsxs(k,{"data-kind":"income",children:[t.jsx(L,{className:"ccy-mark"})," +",Me(s.credits)]}):t.jsx(k,{"data-kind":"income",children:o("activity.payoutCredited")})]})]}),t.jsx(Y,{children:l?t.jsx(ee,{to:l,"data-link":"true",children:r}):t.jsx(N,{children:r})})]})}function Tt({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,n=Fe(e.status),i=n==="SETTLED"?o("activity.completed"):n==="FAILED"?o("activity.failed"):n==="UNFINISHED"?o("activity.unfinished"):o("activity.processing"),a=U(m=>m.session),c=De(),[l,r]=f.useState(!1),p=e.status==="initiated"&&!!a;f.useEffect(()=>{const m=()=>r(!1);return window.addEventListener("pageshow",m),()=>window.removeEventListener("pageshow",m)},[]);async function w(){if(!(!a||l)){r(!0);try{const m=await He(e.id,a.identity);if(m.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(m.url)){window.location.href=m.url;return}P.error(o("activity.resumeUnavailable"))}else m.kind==="expired"?(P.info(o("activity.resumeExpired")),c.invalidateQueries({queryKey:["credit-orders"]})):m.kind==="paid"?(P.success(o("activity.resumePaid")),c.invalidateQueries({queryKey:["credit-orders"]})):P.error(o("activity.resumeUnavailable"));r(!1)}catch{r(!1)}}}return t.jsx(S,{"data-testid":"credit-order",children:t.jsxs(C,{children:[t.jsx(gt,{children:t.jsx("img",{src:dt,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(D,{children:A(e.createdAt)}),t.jsxs(M,{children:[o("activity.creditPurchaseLabel")," · ",o("activity.creditPaid",{usd:s})]})]}),t.jsxs(H,{children:[p?t.jsx(ft,{type:"button",onClick:()=>void w(),disabled:l,"data-testid":"resume-order",children:l?o("activity.resuming"):o("activity.resume")}):null,t.jsx(R,{"data-status":n,children:i}),t.jsxs(k,{"data-kind":n==="UNFINISHED"?void 0:"income",children:[n==="UNFINISHED"?"":"+",t.jsx(L,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]})]})})}function St({filter:e}){const s={all:o("activity.emptyAllBody"),purchases:o("activity.emptyPurchasesBody"),sales:o("activity.emptySalesBody")}[e];return t.jsx(jt,{children:t.jsx(ce,{testId:`activity-empty-${e}`,icon:We,title:o("activity.emptyTitle"),body:s,cta:{label:o("assets.empty.cta"),to:"/items"}})})}function Xt(){const{session:e,signIn:s}=U(),[n,i]=f.useState("all"),[a,c]=qe(),l=a.get(W)===de||a.get(G)===At;Pe({title:l?o("seo.import.title"):o("nav.activity"),noindex:!0});const{count:r}=ze(),{count:p}=ot(),m=r!==void 0&&p!==void 0&&(r>0||p>0||l),x=!!e&&!l&&n!=="sales",g=!!e&&!l&&n!=="purchases",b=$(["purchases",e==null?void 0:e.address],u=>Se(e.address,e.identity,{first:T,skip:u}),{enabled:x}),y=$(["sales",e==null?void 0:e.address],u=>ne(e.address,{role:"seller",first:T,skip:u}),{enabled:g}),v=$(["credit-orders",e==null?void 0:e.address],u=>ae(e.address,e.identity,{first:T,skip:u}),{enabled:x}),j=$(["mana-purchases",e==null?void 0:e.address],u=>ne(e.address,{role:"buyer",first:T,skip:u}),{enabled:x}),{data:te}=E({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ae(e.address,e.identity,{first:200}).then(u=>u.payouts),enabled:g,staleTime:6e4}),be=f.useMemo(()=>nt(te),[te]),{data:ye}=$e(g);if(!e)return t.jsx(Te,{children:t.jsx(ce,{testId:"activity-signin",icon:Ke,title:o("activity.signInTitle"),body:o("activity.signInBody"),cta:{label:o("storeSettings.signIn"),onClick:()=>s()},ctaVariant:"solid",fill:!0})});const ie=st(it({purchases:x?b.items:[],sales:g?y.items:[],creditOrders:x?v.items:[],manaPurchases:x?j.items:[],rate:ye}),n),ve=x&&(b.isLoading||v.isLoading||j.isLoading)||g&&y.isLoading,se=x&&(b.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||g&&y.isFetchingNextPage,je=x&&(b.hasNextPage||v.hasNextPage||j.hasNextPage)||g&&y.hasNextPage;function ke(){x&&b.hasNextPage&&b.fetchNextPage(),x&&v.hasNextPage&&v.fetchNextPage(),x&&j.hasNextPage&&j.fetchNextPage(),g&&y.hasNextPage&&y.fetchNextPage()}function we(u){if(i(u),!l)return;const I=new URLSearchParams(a);I.delete(W),I.delete(G),c(I,{replace:!0})}function Ie(){const u=new URLSearchParams(a);u.set(W,de),u.delete(G),c(u,{replace:!0})}return t.jsxs(ct,{children:[t.jsx(lt,{children:t.jsx(ut,{children:o("nav.activity")})}),t.jsxs(ht,{role:"tablist","aria-label":o("nav.activity"),children:[It.map(u=>t.jsx(he,{type:"button",role:"tab","aria-selected":!l&&n===u,"data-active":!l&&n===u,"data-testid":`activity-filter-${u}`,onClick:()=>we(u),children:o(`activity.filter.${u}`)},u)),m?t.jsxs(pt,{type:"button",role:"tab","aria-selected":l,"data-active":l,"data-testid":"activity-filter-migrate","aria-label":r?o("activity.migrate.chipAria",{count:r}):void 0,onClick:Ie,children:[o("activity.migrate.chip"),r?t.jsx(mt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:r}):null]}):null]}),l?t.jsx(f.Suspense,{fallback:t.jsx(xt,{"aria-busy":"true"}),children:t.jsx(wt,{})}):ve?t.jsx(re,{children:Array.from({length:5}).map((u,I)=>t.jsx(oe,{},I))}):ie.length===0?t.jsx(St,{filter:n}):t.jsxs(t.Fragment,{children:[t.jsxs(re,{children:[ie.map(u=>u.kind==="purchase"?t.jsx(Nt,{order:u.order},u.id):u.kind==="credit"?t.jsx(Tt,{order:u.order},u.id):u.kind==="mana-purchase"?t.jsx(Pt,{sale:u.sale},u.id):t.jsx($t,{sale:u.sale,payout:at(be,u.sale)},u.id)),se?t.jsx(oe,{}):null]}),t.jsx(Ge,{hasNextPage:je,isFetching:se,onLoadMore:ke})]})]})}export{Xt as Activity};
|
|
373
|
-
//# sourceMappingURL=Activity-
|
|
372
|
+
`,ee=N.withComponent(_e),wt=f.lazy(()=>Ce(()=>import("./index-BqXgj2c4.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])).then(e=>({default:e.ImportListings}))),T=24,It=["all","purchases","sales"],W="section",de="listings",G="view",At="migrate";function A(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function xe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function ge(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function fe({children:e}){const s=f.useRef(null),[n,i]=f.useState(null),a=()=>{var l;const c=(l=s.current)==null?void 0:l.getBoundingClientRect();c&&i({top:c.bottom+8,left:c.left+c.width/2})};return t.jsxs(bt,{ref:s,tabIndex:0,onMouseEnter:a,onMouseLeave:()=>i(null),onFocus:a,onBlur:()=>i(null),children:[e,n?Oe.createPortal(t.jsx(yt,{style:{top:n.top,left:n.left},role:"tooltip",children:o("activity.polygonMana")}),document.body):null]})}function Et({item:e}){const s=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||s,{data:i,isLoading:a}=E({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Re(e.tradeId):X(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),c=n&&a,l=(i==null?void 0:i.name)??o("activity.itemFallback"),r=(i==null?void 0:i.thumbnail)??"",p=B({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,w=t.jsxs(t.Fragment,{children:[c?t.jsx(Z,{}):t.jsx(q,{children:r?t.jsx("img",{src:r,alt:l}):t.jsx(Q,{name:"cart",size:20})}),t.jsxs(O,{children:[c?t.jsx(J,{}):t.jsx(_,{title:l,children:l}),e.quantity>1?t.jsx(z,{children:o("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(me,{children:[t.jsx(L,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]});return p?t.jsx(ee,{to:p,"data-link":"true",children:w}):t.jsx(N,{children:w})}function Lt({item:e}){const s=`@${e.registeredName}`;return t.jsxs(N,{"data-testid":"activity-name-line",children:[t.jsx(kt,{children:t.jsx("img",{src:Ue,alt:""})}),t.jsxs(O,{children:[t.jsx(_,{title:s,children:s}),t.jsx(z,{children:o("activity.nameRegistration")})]}),t.jsxs(me,{children:[t.jsx(L,{className:"ccy-mark"})," ",e.credits]})]})}function Nt({order:e}){const s=Je(e.lines),n=s.reduce((c,l)=>c+l.quantity,0),i=Ye(e.status),a=i==="SETTLED"?o("activity.completed"):i==="FAILED"?o("activity.failed"):o("activity.processing");return t.jsxs(S,{"data-testid":"purchase-order",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:A(e.createdAt)}),t.jsxs(M,{children:[o("activity.purchaseLabel")," · ",o("activity.itemCount",{count:n})]})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":i,children:a}),t.jsxs(k,{children:[t.jsx(L,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.totalCredits})]})]})]}),i==="FAILED"?t.jsx(vt,{children:o("activity.purchaseFailedNote")}):null,t.jsx(Y,{children:s.map(c=>c.registeredName?t.jsx(Lt,{item:c},c.key):t.jsx(Et,{item:c},c.key))})]})}function Pt({sale:e}){const{data:s,isLoading:n}=E({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>X(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??o("activity.itemFallback"),a=(s==null?void 0:s.thumbnail)??"",c=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,l=t.jsxs(t.Fragment,{children:[n?t.jsx(Z,{}):t.jsx(q,{children:a?t.jsx("img",{src:a,alt:i}):t.jsx(Q,{name:"offer",size:20})}),t.jsxs(O,{children:[n?t.jsx(J,{}):t.jsx(_,{title:i,children:i}),t.jsx(z,{children:o("activity.boughtFrom",{account:xe(e.seller)})})]})]});return t.jsxs(S,{"data-testid":"activity-mana-purchase",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:A(e.createdAt)}),t.jsx(M,{children:o("activity.paidWithMana")})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":"SETTLED",children:o("activity.completed")}),t.jsxs(k,{children:[ge(e.manaWei)," ",t.jsx(fe,{children:t.jsx(pe,{src:le,alt:"MANA"})})]})]})]}),t.jsx(Y,{children:c?t.jsx(ee,{to:c,"data-link":"true",children:l}):t.jsx(N,{children:l})})]})}function $t({sale:e,payout:s}){const{data:n,isLoading:i}=E({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>X(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),a=(n==null?void 0:n.name)??o("activity.itemFallback"),c=(n==null?void 0:n.thumbnail)??"",l=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,r=t.jsxs(t.Fragment,{children:[i?t.jsx(Z,{}):t.jsx(q,{children:c?t.jsx("img",{src:c,alt:a}):t.jsx(Q,{name:"offer",size:20})}),t.jsxs(O,{children:[i?t.jsx(J,{}):t.jsx(_,{title:a,children:a}),t.jsxs(z,{children:[o("activity.soldTo",{account:xe(e.counterparty)}),s.kind==="pending"?` · ${o("activity.payoutPendingOn",{date:A(s.availableAt)})}`:""]})]})]});return t.jsxs(S,{"data-testid":"activity-sale",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:A(e.createdAt)}),t.jsx(M,{children:o("activity.saleLabel")})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?o("activity.payoutPending"):o("activity.sold")}),s.kind==="direct"?t.jsxs(k,{"data-kind":"income",children:["+",ge(e.manaWei)," ",t.jsx(fe,{children:t.jsx(pe,{src:le,alt:"MANA"})})]}):s.credits!==null?t.jsxs(k,{"data-kind":"income",children:[t.jsx(L,{className:"ccy-mark"})," +",Me(s.credits)]}):t.jsx(k,{"data-kind":"income",children:o("activity.payoutCredited")})]})]}),t.jsx(Y,{children:l?t.jsx(ee,{to:l,"data-link":"true",children:r}):t.jsx(N,{children:r})})]})}function Tt({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,n=Fe(e.status),i=n==="SETTLED"?o("activity.completed"):n==="FAILED"?o("activity.failed"):n==="UNFINISHED"?o("activity.unfinished"):o("activity.processing"),a=U(m=>m.session),c=De(),[l,r]=f.useState(!1),p=e.status==="initiated"&&!!a;f.useEffect(()=>{const m=()=>r(!1);return window.addEventListener("pageshow",m),()=>window.removeEventListener("pageshow",m)},[]);async function w(){if(!(!a||l)){r(!0);try{const m=await He(e.id,a.identity);if(m.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(m.url)){window.location.href=m.url;return}P.error(o("activity.resumeUnavailable"))}else m.kind==="expired"?(P.info(o("activity.resumeExpired")),c.invalidateQueries({queryKey:["credit-orders"]})):m.kind==="paid"?(P.success(o("activity.resumePaid")),c.invalidateQueries({queryKey:["credit-orders"]})):P.error(o("activity.resumeUnavailable"));r(!1)}catch{r(!1)}}}return t.jsx(S,{"data-testid":"credit-order",children:t.jsxs(C,{children:[t.jsx(gt,{children:t.jsx("img",{src:dt,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(D,{children:A(e.createdAt)}),t.jsxs(M,{children:[o("activity.creditPurchaseLabel")," · ",o("activity.creditPaid",{usd:s})]})]}),t.jsxs(H,{children:[p?t.jsx(ft,{type:"button",onClick:()=>void w(),disabled:l,"data-testid":"resume-order",children:l?o("activity.resuming"):o("activity.resume")}):null,t.jsx(R,{"data-status":n,children:i}),t.jsxs(k,{"data-kind":n==="UNFINISHED"?void 0:"income",children:[n==="UNFINISHED"?"":"+",t.jsx(L,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]})]})})}function St({filter:e}){const s={all:o("activity.emptyAllBody"),purchases:o("activity.emptyPurchasesBody"),sales:o("activity.emptySalesBody")}[e];return t.jsx(jt,{children:t.jsx(ce,{testId:`activity-empty-${e}`,icon:We,title:o("activity.emptyTitle"),body:s,cta:{label:o("assets.empty.cta"),to:"/items"}})})}function Xt(){const{session:e,signIn:s}=U(),[n,i]=f.useState("all"),[a,c]=qe(),l=a.get(W)===de||a.get(G)===At;Pe({title:l?o("seo.import.title"):o("nav.activity"),noindex:!0});const{count:r}=ze(),{count:p}=ot(),m=r!==void 0&&p!==void 0&&(r>0||p>0||l),x=!!e&&!l&&n!=="sales",g=!!e&&!l&&n!=="purchases",b=$(["purchases",e==null?void 0:e.address],u=>Se(e.address,e.identity,{first:T,skip:u}),{enabled:x}),y=$(["sales",e==null?void 0:e.address],u=>ne(e.address,{role:"seller",first:T,skip:u}),{enabled:g}),v=$(["credit-orders",e==null?void 0:e.address],u=>ae(e.address,e.identity,{first:T,skip:u}),{enabled:x}),j=$(["mana-purchases",e==null?void 0:e.address],u=>ne(e.address,{role:"buyer",first:T,skip:u}),{enabled:x}),{data:te}=E({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ae(e.address,e.identity,{first:200}).then(u=>u.payouts),enabled:g,staleTime:6e4}),be=f.useMemo(()=>nt(te),[te]),{data:ye}=$e(g);if(!e)return t.jsx(Te,{children:t.jsx(ce,{testId:"activity-signin",icon:Ke,title:o("activity.signInTitle"),body:o("activity.signInBody"),cta:{label:o("storeSettings.signIn"),onClick:()=>s()},ctaVariant:"solid",fill:!0})});const ie=st(it({purchases:x?b.items:[],sales:g?y.items:[],creditOrders:x?v.items:[],manaPurchases:x?j.items:[],rate:ye}),n),ve=x&&(b.isLoading||v.isLoading||j.isLoading)||g&&y.isLoading,se=x&&(b.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||g&&y.isFetchingNextPage,je=x&&(b.hasNextPage||v.hasNextPage||j.hasNextPage)||g&&y.hasNextPage;function ke(){x&&b.hasNextPage&&b.fetchNextPage(),x&&v.hasNextPage&&v.fetchNextPage(),x&&j.hasNextPage&&j.fetchNextPage(),g&&y.hasNextPage&&y.fetchNextPage()}function we(u){if(i(u),!l)return;const I=new URLSearchParams(a);I.delete(W),I.delete(G),c(I,{replace:!0})}function Ie(){const u=new URLSearchParams(a);u.set(W,de),u.delete(G),c(u,{replace:!0})}return t.jsxs(ct,{children:[t.jsx(lt,{children:t.jsx(ut,{children:o("nav.activity")})}),t.jsxs(ht,{role:"tablist","aria-label":o("nav.activity"),children:[It.map(u=>t.jsx(he,{type:"button",role:"tab","aria-selected":!l&&n===u,"data-active":!l&&n===u,"data-testid":`activity-filter-${u}`,onClick:()=>we(u),children:o(`activity.filter.${u}`)},u)),m?t.jsxs(pt,{type:"button",role:"tab","aria-selected":l,"data-active":l,"data-testid":"activity-filter-migrate","aria-label":r?o("activity.migrate.chipAria",{count:r}):void 0,onClick:Ie,children:[o("activity.migrate.chip"),r?t.jsx(mt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:r}):null]}):null]}),l?t.jsx(f.Suspense,{fallback:t.jsx(xt,{"aria-busy":"true"}),children:t.jsx(wt,{})}):ve?t.jsx(re,{children:Array.from({length:5}).map((u,I)=>t.jsx(oe,{},I))}):ie.length===0?t.jsx(St,{filter:n}):t.jsxs(t.Fragment,{children:[t.jsxs(re,{children:[ie.map(u=>u.kind==="purchase"?t.jsx(Nt,{order:u.order},u.id):u.kind==="credit"?t.jsx(Tt,{order:u.order},u.id):u.kind==="mana-purchase"?t.jsx(Pt,{sale:u.sale},u.id):t.jsx($t,{sale:u.sale,payout:at(be,u.sale)},u.id)),se?t.jsx(oe,{}):null]}),t.jsx(Ge,{hasNextPage:je,isFetching:se,onLoadMore:ke})]})]})}export{Xt as Activity};
|
|
373
|
+
//# sourceMappingURL=Activity-Br7TotTg.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,j as d}from"./react-
|
|
1
|
+
import{r as u,j as d}from"./react-D7J-E0MH.js";import{s as m}from"./index-C7RUGLgx.js";import"./dcl-schemas-BKQ0vYZF.js";import"./sentry-BK5YQzUx.js";import"./ethers-CqnE9_Iy.js";import"./intl-AKLEHPeO.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="5bd5cd4f-e052-432a-9167-0bce4be379c5",e._sentryDebugIdIdentifier="sentry-dbid-5bd5cd4f-e052-432a-9167-0bce4be379c5")}catch{}})();const D="https://cdn.decentraland.org/@dcl/shop/1.13.1-35088015492.commit-25d8a11/_assets/custom-welcome-background-BxlFQma9.webp",P="https://cdn.decentraland.org/@dcl/shop/1.13.1-35088015492.commit-25d8a11/_assets/DCL_LogoPattern-BryBPc3d.png",L=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -77,11 +77,11 @@ void main() {
|
|
|
77
77
|
|
|
78
78
|
gl_FragColor = result;
|
|
79
79
|
}
|
|
80
|
-
`;function p(e,a,n){const r=e.createShader(a);return r?(e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)?r:(console.error("Shader compile error:",e.getShaderInfoLog(r)),e.deleteShader(r),null)):null}function B(e,a,n){const r=e.createProgram();return r?(e.attachShader(r,a),e.attachShader(r,n),e.linkProgram(r),e.getProgramParameter(r,e.LINK_STATUS)?r:(console.error("Program link error:",e.getProgramInfoLog(r)),e.deleteProgram(r),null)):null}function F(e,a,n){const r=e.createTexture();if(!r)return null;e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{n!=null&&n()||(e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.generateMipmap(e.TEXTURE_2D))},o.src=a,r}const C=
|
|
80
|
+
`;function p(e,a,n){const r=e.createShader(a);return r?(e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)?r:(console.error("Shader compile error:",e.getShaderInfoLog(r)),e.deleteShader(r),null)):null}function B(e,a,n){const r=e.createProgram();return r?(e.attachShader(r,a),e.attachShader(r,n),e.linkProgram(r),e.getProgramParameter(r,e.LINK_STATUS)?r:(console.error("Program link error:",e.getProgramInfoLog(r)),e.deleteProgram(r),null)):null}function F(e,a,n){const r=e.createTexture();if(!r)return null;e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{n!=null&&n()||(e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.generateMipmap(e.TEXTURE_2D))},o.src=a,r}const C=m.div`
|
|
81
81
|
position: absolute;
|
|
82
82
|
inset: 0;
|
|
83
83
|
overflow: hidden;
|
|
84
|
-
`,k=
|
|
84
|
+
`,k=m.div`
|
|
85
85
|
position: absolute;
|
|
86
86
|
inset: 0;
|
|
87
87
|
width: 100%;
|
|
@@ -89,10 +89,10 @@ void main() {
|
|
|
89
89
|
background-size: cover;
|
|
90
90
|
background-position: center;
|
|
91
91
|
background-repeat: no-repeat;
|
|
92
|
-
`,V=
|
|
92
|
+
`,V=m.canvas`
|
|
93
93
|
position: absolute;
|
|
94
94
|
inset: 0;
|
|
95
95
|
width: 100%;
|
|
96
96
|
height: 100%;
|
|
97
|
-
`;function K({patternTiling:e=1.66}){const a=u.useRef(null),n=u.useRef(0),r=u.useRef(e);return r.current=e,u.useEffect(()=>{var _;const o=a.current;if(!o||(_=window.matchMedia)!=null&&_.call(window,"(prefers-reduced-motion: reduce)").matches)return;const t=o.getContext("webgl",{alpha:!1,antialias:!1});if(!t)return;const c=p(t,t.VERTEX_SHADER,L),s=p(t,t.FRAGMENT_SHADER,I);if(!c||!s){c&&t.deleteShader(c),s&&t.deleteShader(s);return}const i=B(t,c,s);if(!i){t.deleteShader(c),t.deleteShader(s);return}const
|
|
98
|
-
//# sourceMappingURL=AnimatedBackground-
|
|
97
|
+
`;function K({patternTiling:e=1.66}){const a=u.useRef(null),n=u.useRef(0),r=u.useRef(e);return r.current=e,u.useEffect(()=>{var _;const o=a.current;if(!o||(_=window.matchMedia)!=null&&_.call(window,"(prefers-reduced-motion: reduce)").matches)return;const t=o.getContext("webgl",{alpha:!1,antialias:!1});if(!t)return;const c=p(t,t.VERTEX_SHADER,L),s=p(t,t.FRAGMENT_SHADER,I);if(!c||!s){c&&t.deleteShader(c),s&&t.deleteShader(s);return}const i=B(t,c,s);if(!i){t.deleteShader(c),t.deleteShader(s);return}const f=t.getAttribLocation(i,"a_position"),R=t.getUniformLocation(i,"u_time"),w=t.getUniformLocation(i,"u_resolution"),b=t.getUniformLocation(i,"u_overlayTex"),A=t.getUniformLocation(i,"u_overlayTiling"),v=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,v),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),t.STATIC_DRAW);let g=!1;const h=F(t,P,()=>g),S=()=>{const l=window.devicePixelRatio||1,E=o.clientWidth*l,x=o.clientHeight*l;(o.width!==E||o.height!==x)&&(o.width=E,o.height=x)},U=performance.now()/1e3,y=()=>{S(),t.viewport(0,0,o.width,o.height),t.useProgram(i),t.uniform1f(R,performance.now()/1e3-U),t.uniform2f(w,o.width,o.height),t.uniform1f(A,r.current),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,h),t.uniform1i(b,0),t.enableVertexAttribArray(f),t.bindBuffer(t.ARRAY_BUFFER,v),t.vertexAttribPointer(f,2,t.FLOAT,!1,0,0),t.drawArrays(t.TRIANGLES,0,6),n.current=requestAnimationFrame(y)},T=l=>{l.preventDefault(),cancelAnimationFrame(n.current),o.style.opacity="0"};return o.addEventListener("webglcontextlost",T,!1),n.current=requestAnimationFrame(y),()=>{g=!0,cancelAnimationFrame(n.current),o.removeEventListener("webglcontextlost",T),t.deleteProgram(i),t.deleteShader(c),t.deleteShader(s),t.deleteBuffer(v),t.deleteTexture(h)}},[]),d.jsxs(C,{"aria-hidden":!0,children:[d.jsx(k,{style:{backgroundImage:`url(${D})`}}),d.jsx(V,{ref:a})]})}export{K as default};
|
|
98
|
+
//# sourceMappingURL=AnimatedBackground-mKUTCrsZ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as
|
|
1
|
+
import{r as u,u as Ve,j as e,a as dt}from"./react-D7J-E0MH.js";import{h as Z,r as ht,i as pt,bE as ut,bA as ft,aH as mt,j as xt,E as gt,cG as bt,cH as yt,s as i,d as t,F as Ze,bm as wt,L as vt,S as $e,c as s,e as jt,I as _,K as D,cI as he,bk as Ct,ak as ce,bu as We,bD as $t,bC as kt,J as Ke,X as Qe,m as Je,cJ as St,G as Et,ay as Tt,Z as Rt,$ as Pe,a0 as te,aP as _t,bN as It}from"./index-C7RUGLgx.js";import{u as Lt,s as Nt}from"./search-empty-B2ikWLFM.js";import{i as At,u as zt,j as Mt,S as Wt,R as Pt,a as Bt,b as Ft,c as Ot,D as Ut,d as Ht,C as Dt,e as Gt,F as qt,f as Vt,g as Zt,M as Kt,h as Qt}from"./browseLayout.styles-Bza8FY3N.js";import{L as Jt}from"./LoadMore-DgGHun07.js";import{u as Xt}from"./useInfiniteGrid-x8-KLPvB.js";import{n as Yt,S as en}from"./categories-J0dMuNkM.js";import{E as tn}from"./ErrorNotice-Dqt3U2vl.js";import{d as nn}from"./dcl-schemas-BKQ0vYZF.js";import{s as sn,G as on,w as an,S as rn}from"./buy-gasless-mSBHbIka.js";import{t as ln,u as cn}from"./buy-8-Zq_4Fb.js";import{f as dn}from"./errors-5abtsF-d.js";import{J as hn,C as pn,B as ke}from"./ethers-CqnE9_Iy.js";import{n as un}from"./name-glyph-aUugT8vq.js";import{c as fn}from"./crumbs.styles-BqMPTZMi.js";import{G as mn}from"./grid.styles-iTSFhsyn.js";import"./sentry-BK5YQzUx.js";import"./intl-AKLEHPeO.js";import"./skeleton.styles-BN71VInw.js";import"./authorizations-o-LlYXNc.js";import"./sendMetaTransaction-C6Fbql0T.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new n.Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="c99fba52-42cf-4453-af0c-db76544efc48",n._sentryDebugIdIdentifier="sentry-dbid-c99fba52-42cf-4453-af0c-db76544efc48")}catch{}})();function ne(n){const o=n.source??"item",r=n.tradeId||`${n.contractAddress}-${n.tokenId??n.itemId??""}`;return`${o}:${r}`}const Q="100000000000000000000",Xe=2,de=15,xn=/^[a-zA-Z0-9]+$/;function Be(n){const o=n.trim();return o.length===0?{ok:!1,reason:"empty"}:xn.test(o)?o.length<Xe?{ok:!1,reason:"too-short"}:o.length>de?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function gn(n){return n.replace(/[^a-zA-Z0-9]/g,"").slice(0,de)}const bn=["function available(string _subdomain) view returns (bool)"],Fe={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function yn(){return Z.chainId===Number(nn.ChainId.MATIC_MAINNET)?Fe.mainnet:Fe.sepolia}async function wn(n,o={}){var m;const{rpc:r,address:h}=yn(),d=new hn(r),b=new pn(h,bn,d);console.info(`[names] availability check → DCLRegistrar(${h}).available("${n}") on ${r}`);const l=await b.available(n);if((m=o.signal)!=null&&m.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${n}" available=${l}`),l?"available":"taken"}const vn="https://app.across.to/api";class Te extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class Se extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class Ee extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function jn(n){return mt(Q,n)}async function Cn(n,o,r={}){var m;const h=r.chainId??Z.chainId,d=r.provider??"across",b=`${Z.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${h}&provider=${d}`,l=await xt(b,{method:"GET",identity:n,metadata:{}});if(!l.ok){let c;try{c=(m=await l.json())==null?void 0:m.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new Te:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function $n(n,o){const r=ke.from(n.availableAmount),d=ke.from(Q).sub(r);return{credits:[{value:n.amount,expiresAt:Number(n.expiresAt),salt:cn(n.id)}],creditsSignatures:[n.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:d.isNegative()?"0":d.toString(),maxCreditedValue:Q}}async function kn(n,o={}){const r=vn,h=o.intervalMs??1e4,d=o.maxAttempts??60;let b={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<d;l++){try{const m=await fetch(`${r}/deposit/status?originChainId=137&depositTxHash=${n}`);if(m.ok){const c=await m.json(),y=(c.status??"pending").toLowerCase(),f=c.fillTx??c.fillTxnRef??null,j=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(y==="filled")return{status:"filled",destinationTxHash:f,actionsSucceeded:j};if(y==="refunded"||y==="expired")return{status:y,destinationTxHash:null,actionsSucceeded:!1};b={status:"pending",destinationTxHash:f,actionsSucceeded:j}}}catch{}l<d-1&&await new Promise(m=>setTimeout(m,h))}return b}async function Sn(n){const{name:o,identity:r,signer:h}=n,d=f=>{var j;try{(j=n.onProgress)==null||j.call(n,f)}catch{}},b=n.chainId??Z.chainId,l=n.provider??"across",m=(n.beneficiary??await h.getAddress()).toLowerCase();let c=null,y="unconfirmed";console.info("[names] register start",{name:o,buyer:m,chainId:b,provider:l}),d("preparing");try{const f=await ht(pt(Z.chainId).address),j=jn(f);console.info("[names] step 1/6 sized reservation",{usdCents:j,manaRate:f});const C=await Cn(r,o,{chainId:b,provider:l});console.info("[names] step 2/6 route fetched",{target:C.externalCall.target,selector:C.externalCall.selector,provider:C.provider,quoteId:C.quoteId});const x=await ut(r,j,void 0,void 0,o);if(c=x.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:x.credit.id,maxCreditedValue:x.maxCreditedValue}),ke.from(x.maxCreditedValue).lt(Q))throw new Error("Credit under-sized for the name price");d("awaiting-confirmation");const S=$n(x.credit,C);let p;try{p=await sn({chainId:b,buyer:m,signer:h,args:S})}catch(g){if(!(g instanceof on))throw g;if(g.reason==="relayer-unreachable"){y="unobservable";const I=new Ee;throw I.cause=g,I}p=await ln(b,S,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:p}),d("confirming"),await an(p),y="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:p}),l==="across"){d("registering");const g=await kn(p,n.acrossPoll);if(console.info("[names] step 6/6 across status",g),g.status==="pending")return{status:"pending",originTxHash:p};if(g.status==="filled"&&g.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:p}),{status:"pending",originTxHash:p};if(g.status!=="filled"||g.actionsSucceeded!==!0)throw new Se;return{status:"registered",originTxHash:p,destinationTxHash:g.destinationTxHash}}return{status:"pending",originTxHash:p}}catch(f){if(console.error("[names] register failed — raw error:",f,{name:o,buyer:m,originState:y}),f instanceof rn)return{status:"pending",originTxHash:f.txHash};if(c&&y==="unconfirmed"&&await ft(r,[c]).catch(()=>{}),f instanceof Te||f instanceof Se||f instanceof Ee)throw f;const j=new Error(dn(f,"Couldn't register the name. Please try again.",{sale:!0}));throw j.cause=f,j}}function En(){const{data:n}=gt({queryKey:["feature-flag","shop-names"],queryFn:()=>bt(yt.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return n===!0}const Tn=60,Rn=700,_n=25;function In(n){if(!n)return[];const o=[];for(let r=1;r<=n.length;r++)o.push({text:n.slice(0,r),delay:Tn});o[o.length-1]={text:n,delay:Rn};for(let r=n.length-1;r>=1;r--)o.push({text:n.slice(0,r),delay:_n});return o}function Ln(n){return n.flatMap(In)}function Nn(n,o){const r=u.useMemo(()=>Ln(n),[n]),[h,d]=u.useState(0);return u.useEffect(()=>{if(!o||r.length===0)return;const b=setTimeout(()=>d(l=>(l+1)%r.length),r[h%r.length].delay);return()=>clearTimeout(b)},[h,o,r]),!o||r.length===0?"":r[h%r.length].text}const An="https://cdn.decentraland.org/@dcl/shop/1.13.1-35088015492.commit-25d8a11/_assets/name-verified-oGwQ3ntb.svg",zn="#34fee6",Mn=i.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -25,14 +25,14 @@ import{r as f,u as Ve,j as e,a as dt}from"./react-BFtKLtDt.js";import{h as Z,r a
|
|
|
25
25
|
align-items: flex-start;
|
|
26
26
|
justify-content: space-between;
|
|
27
27
|
gap: 12px;
|
|
28
|
-
`,
|
|
28
|
+
`,ue=i.h2`
|
|
29
29
|
margin: 0;
|
|
30
30
|
font-family: ${t.font.sans};
|
|
31
31
|
font-weight: 700;
|
|
32
32
|
font-size: 20px;
|
|
33
33
|
line-height: 1.6;
|
|
34
34
|
color: ${t.colors.text};
|
|
35
|
-
`,
|
|
35
|
+
`,fe=i.button`
|
|
36
36
|
flex: none;
|
|
37
37
|
display: grid;
|
|
38
38
|
place-items: center;
|
|
@@ -458,10 +458,10 @@ import{r as f,u as Ve,j as e,a as dt}from"./react-BFtKLtDt.js";import{h as Z,r a
|
|
|
458
458
|
color: ${t.colors.accent};
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
`;function rs({name:n,priceCredits:o,onClose:r}){const{session:h}=Ze(),{data:d,isError:b}=wt(h),l=vt(),m=Ve(),[c,y]=f.useState("confirm"),[u,j]=f.useState(""),[C,x]=f.useState(null),[S,p]=f.useState(!1),[g,I]=f.useState("preparing"),L=f.useRef(!1),N=u.trim().toLowerCase()===n.toLowerCase(),E=c==="completing",F=o!=null?$e(o):"—",$=o==null,k=d==null?void 0:d.credits,A=o!=null&&k!=null?o-k:0,T=A>0,G=$?s("names.priceUnavailable"):T?s("names.insufficientCredits",{credits:$e(A)}):null;f.useEffect(()=>{const w=O=>{O.key==="Escape"&&!E&&r()};document.addEventListener("keydown",w);const B=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",w),document.body.style.overflow=B}},[E,r]);async function z(){if(!(!h||!N||$||T||L.current)){L.current=!0,y("completing"),x(null),I("preparing");try{const w=await Sn({name:n,identity:h.identity,signer:h.signer,onProgress:I});ce("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:We(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:We(o??0),transaction_hash:w.originTxHash??null,settlement:w.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),y(w.status==="registered"?"success":"pending")}catch(w){ce(kt(w)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:$t(w),purchase_type:"name"});const B=w instanceof Se,O=w instanceof Ee;x(w instanceof Te?s("names.errorRouteCost"):B?s("names.errorNotRegistered"):O?s("names.errorSettlementUnknown"):(w==null?void 0:w.message)||s("names.errorGeneric")),p(B||O),y("error")}finally{L.current=!1}}}const M=c!=="success"&&c!=="pending",v=jt(h==null?void 0:h.providerType),W=v?2:1,P=v&&(g==="preparing"||g==="awaiting-confirmation"),R=P?1:W,J=P?s("names.confirming"):s("names.completing"),K=g==="registering"?s("names.processingRegistering"):null;return e.jsx(Mn,{onClick:E?void 0:r,role:"presentation",children:e.jsxs(Wn,{role:"dialog","aria-modal":"true","aria-label":s("names.buyTitle"),onClick:w=>w.stopPropagation(),children:[M&&e.jsxs(e.Fragment,{children:[e.jsxs(pe,{children:[e.jsx(fe,{children:c==="error"?s("names.errorTitle"):s("names.buyTitle")}),e.jsx(ue,{onClick:r,disabled:E,"aria-label":s("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(me,{children:[s("names.myCreditsBalance")," ",e.jsx(D,{})," ",he(d,b)]}),e.jsx(xe,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ge,{children:[e.jsx(Oe,{"aria-hidden":!0,children:"@"}),e.jsxs(be,{children:[e.jsxs(ye,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(we,{children:s("names.subtitle")})]}),e.jsxs(ve,{children:[e.jsx(D,{}),F]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(Ce,{children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),S?e.jsx(je,{onClick:r,children:s("names.errorSpentDismiss")}):e.jsx(je,{onClick:()=>y("confirm"),children:s("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Un,{children:[e.jsx(Hn,{children:s("names.confirmTitle")}),e.jsx(Dn,{dangerouslySetInnerHTML:{__html:s("names.confirmBody",{name:`<b>@${ls(n)}</b>`})}}),e.jsxs(Gn,{children:[e.jsx(qn,{"aria-hidden":!0,children:"@"}),e.jsx(Vn,{value:u,onChange:w=>j(w.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":s("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(u.length,8)}ch`}}),e.jsx(Zn,{children:".dcl.eth"})]})]}),G?e.jsxs(Ce,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:G})]}):null,e.jsx(je,{onClick:()=>void z(),disabled:!N||!h||$||T,children:s("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Kn,{children:[e.jsx(Qn,{src:Ct,alt:"",width:61,height:61}),e.jsxs(Jn,{children:[e.jsx(Xn,{children:J}),e.jsxs(es,{children:[e.jsx(ts,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(ns,{"data-testid":"name-progress-count",children:`${R}/${W}`})]}),K?e.jsx(Yn,{children:K}):null]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(pe,{children:[e.jsx(fe,{children:s("names.pendingHeaderTitle")}),e.jsx(ue,{onClick:r,"aria-label":s("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(me,{children:[s("names.myCreditsBalance")," ",e.jsx(D,{})," ",he(d,b)]}),e.jsx(xe,{}),e.jsxs(Ce,{"data-tone":"info",children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:s("names.pendingBannerBold")})," ",s("names.pendingBannerRest")]})]}),e.jsxs(ge,{style:{marginTop:20},children:[e.jsx(Oe,{"aria-hidden":!0,children:"@"}),e.jsxs(be,{children:[e.jsxs(ye,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(we,{children:s("names.subtitle")})]}),e.jsxs(ve,{children:[e.jsx(D,{}),F]})]}),e.jsx(Ue,{children:e.jsx(He,{onClick:()=>{r(),m("/my-items")},children:s("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(pe,{children:[e.jsx(fe,{children:s("names.successHeaderTitle")}),e.jsx(ue,{onClick:r,"aria-label":s("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(me,{children:[s("names.myCreditsBalance")," ",e.jsx(D,{})," ",he(d,b)]}),e.jsx(xe,{}),e.jsxs(ss,{children:[e.jsx(is,{"aria-hidden":!0,children:e.jsx(_,{name:"check"})}),e.jsxs(os,{children:[e.jsx("b",{children:s("names.successBannerBold")})," ",s("names.successBannerRest")]})]}),e.jsxs(ge,{style:{marginTop:20},children:[e.jsxs(Pn,{"data-testid":"name-success-tile",children:[e.jsx(Bn,{src:fn,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(Fn,{children:[e.jsx("span",{"aria-hidden":!0,children:n}),e.jsx(On,{src:An,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(be,{children:[e.jsxs(ye,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(we,{children:s("names.subtitle")})]}),e.jsxs(ve,{children:[e.jsx(D,{}),F]})]}),e.jsxs(Ue,{children:[e.jsx(He,{onClick:()=>{r(),m("/my-items")},children:s("names.myItems")}),e.jsx(as,{href:Z.profileUrl,target:"_blank",rel:"noopener noreferrer",children:s("names.assignToAvatar")})]})]})]})})}function ls(n){return n.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const cs="https://cdn.decentraland.org/@dcl/shop/1.13.1-35085806935.commit-1d79e2c/_assets/identity-icon-C8yAW_Gq.svg",ds="https://cdn.decentraland.org/@dcl/shop/1.13.1-35085806935.commit-1d79e2c/_assets/world-icon-6xQ-PmmW.svg",hs="https://cdn.decentraland.org/@dcl/shop/1.13.1-35085806935.commit-1d79e2c/_assets/invite-icon-Bz6lCTuB.svg",ps="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",fs=i.div`
|
|
461
|
+
`;function rs({name:n,priceCredits:o,onClose:r}){const{session:h}=Ze(),{data:d,isError:b}=wt(h),l=vt(),m=Ve(),[c,y]=u.useState("confirm"),[f,j]=u.useState(""),[C,x]=u.useState(null),[S,p]=u.useState(!1),[g,I]=u.useState("preparing"),L=u.useRef(!1),N=f.trim().toLowerCase()===n.toLowerCase(),E=c==="completing",F=o!=null?$e(o):"—",$=o==null,k=d==null?void 0:d.credits,A=o!=null&&k!=null?o-k:0,T=A>0,G=$?s("names.priceUnavailable"):T?s("names.insufficientCredits",{credits:$e(A)}):null;u.useEffect(()=>{const w=O=>{O.key==="Escape"&&!E&&r()};document.addEventListener("keydown",w);const B=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",w),document.body.style.overflow=B}},[E,r]);async function z(){if(!(!h||!N||$||T||L.current)){L.current=!0,y("completing"),x(null),I("preparing");try{const w=await Sn({name:n,identity:h.identity,signer:h.signer,onProgress:I});ce("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:We(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:We(o??0),transaction_hash:w.originTxHash??null,settlement:w.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),y(w.status==="registered"?"success":"pending")}catch(w){ce(kt(w)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:$t(w),purchase_type:"name"});const B=w instanceof Se,O=w instanceof Ee;x(w instanceof Te?s("names.errorRouteCost"):B?s("names.errorNotRegistered"):O?s("names.errorSettlementUnknown"):(w==null?void 0:w.message)||s("names.errorGeneric")),p(B||O),y("error")}finally{L.current=!1}}}const M=c!=="success"&&c!=="pending",v=jt(h==null?void 0:h.providerType),W=v?2:1,P=v&&(g==="preparing"||g==="awaiting-confirmation"),R=P?1:W,J=P?s("names.confirming"):s("names.completing"),K=g==="registering"?s("names.processingRegistering"):null;return e.jsx(Mn,{onClick:E?void 0:r,role:"presentation",children:e.jsxs(Wn,{role:"dialog","aria-modal":"true","aria-label":s("names.buyTitle"),onClick:w=>w.stopPropagation(),children:[M&&e.jsxs(e.Fragment,{children:[e.jsxs(pe,{children:[e.jsx(ue,{children:c==="error"?s("names.errorTitle"):s("names.buyTitle")}),e.jsx(fe,{onClick:r,disabled:E,"aria-label":s("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(me,{children:[s("names.myCreditsBalance")," ",e.jsx(D,{})," ",he(d,b)]}),e.jsx(xe,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ge,{children:[e.jsx(Oe,{"aria-hidden":!0,children:"@"}),e.jsxs(be,{children:[e.jsxs(ye,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(we,{children:s("names.subtitle")})]}),e.jsxs(ve,{children:[e.jsx(D,{}),F]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(Ce,{children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),S?e.jsx(je,{onClick:r,children:s("names.errorSpentDismiss")}):e.jsx(je,{onClick:()=>y("confirm"),children:s("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Un,{children:[e.jsx(Hn,{children:s("names.confirmTitle")}),e.jsx(Dn,{dangerouslySetInnerHTML:{__html:s("names.confirmBody",{name:`<b>@${ls(n)}</b>`})}}),e.jsxs(Gn,{children:[e.jsx(qn,{"aria-hidden":!0,children:"@"}),e.jsx(Vn,{value:f,onChange:w=>j(w.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":s("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(f.length,8)}ch`}}),e.jsx(Zn,{children:".dcl.eth"})]})]}),G?e.jsxs(Ce,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:G})]}):null,e.jsx(je,{onClick:()=>void z(),disabled:!N||!h||$||T,children:s("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Kn,{children:[e.jsx(Qn,{src:Ct,alt:"",width:61,height:61}),e.jsxs(Jn,{children:[e.jsx(Xn,{children:J}),e.jsxs(es,{children:[e.jsx(ts,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(ns,{"data-testid":"name-progress-count",children:`${R}/${W}`})]}),K?e.jsx(Yn,{children:K}):null]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(pe,{children:[e.jsx(ue,{children:s("names.pendingHeaderTitle")}),e.jsx(fe,{onClick:r,"aria-label":s("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(me,{children:[s("names.myCreditsBalance")," ",e.jsx(D,{})," ",he(d,b)]}),e.jsx(xe,{}),e.jsxs(Ce,{"data-tone":"info",children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:s("names.pendingBannerBold")})," ",s("names.pendingBannerRest")]})]}),e.jsxs(ge,{style:{marginTop:20},children:[e.jsx(Oe,{"aria-hidden":!0,children:"@"}),e.jsxs(be,{children:[e.jsxs(ye,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(we,{children:s("names.subtitle")})]}),e.jsxs(ve,{children:[e.jsx(D,{}),F]})]}),e.jsx(Ue,{children:e.jsx(He,{onClick:()=>{r(),m("/my-items")},children:s("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(pe,{children:[e.jsx(ue,{children:s("names.successHeaderTitle")}),e.jsx(fe,{onClick:r,"aria-label":s("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(me,{children:[s("names.myCreditsBalance")," ",e.jsx(D,{})," ",he(d,b)]}),e.jsx(xe,{}),e.jsxs(ss,{children:[e.jsx(is,{"aria-hidden":!0,children:e.jsx(_,{name:"check"})}),e.jsxs(os,{children:[e.jsx("b",{children:s("names.successBannerBold")})," ",s("names.successBannerRest")]})]}),e.jsxs(ge,{style:{marginTop:20},children:[e.jsxs(Pn,{"data-testid":"name-success-tile",children:[e.jsx(Bn,{src:un,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(Fn,{children:[e.jsx("span",{"aria-hidden":!0,children:n}),e.jsx(On,{src:An,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(be,{children:[e.jsxs(ye,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(we,{children:s("names.subtitle")})]}),e.jsxs(ve,{children:[e.jsx(D,{}),F]})]}),e.jsxs(Ue,{children:[e.jsx(He,{onClick:()=>{r(),m("/my-items")},children:s("names.myItems")}),e.jsx(as,{href:Z.profileUrl,target:"_blank",rel:"noopener noreferrer",children:s("names.assignToAvatar")})]})]})]})})}function ls(n){return n.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const cs="https://cdn.decentraland.org/@dcl/shop/1.13.1-35088015492.commit-25d8a11/_assets/identity-icon-C8yAW_Gq.svg",ds="https://cdn.decentraland.org/@dcl/shop/1.13.1-35088015492.commit-25d8a11/_assets/world-icon-6xQ-PmmW.svg",hs="https://cdn.decentraland.org/@dcl/shop/1.13.1-35088015492.commit-25d8a11/_assets/invite-icon-Bz6lCTuB.svg",ps="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",us=i.div`
|
|
462
462
|
width: 100%;
|
|
463
463
|
min-width: 0;
|
|
464
|
-
`,
|
|
464
|
+
`,fs=i.nav`
|
|
465
465
|
display: flex;
|
|
466
466
|
align-items: center;
|
|
467
467
|
gap: 6px;
|
|
@@ -470,7 +470,7 @@ import{r as f,u as Ve,j as e,a as dt}from"./react-BFtKLtDt.js";import{h as Z,r a
|
|
|
470
470
|
font-size: 12px;
|
|
471
471
|
line-height: 1;
|
|
472
472
|
color: ${t.colors.gray4};
|
|
473
|
-
${
|
|
473
|
+
${fn};
|
|
474
474
|
`,ms=i.button`
|
|
475
475
|
border: 0;
|
|
476
476
|
background: none;
|
|
@@ -919,7 +919,7 @@ import{r as f,u as Ve,j as e,a as dt}from"./react-BFtKLtDt.js";import{h as Z,r a
|
|
|
919
919
|
clip: rect(0, 0, 0, 0);
|
|
920
920
|
white-space: nowrap;
|
|
921
921
|
border: 0;
|
|
922
|
-
`,Ds="https://docs.decentraland.org/creator/worlds/about/",Gs="https://governance.decentraland.org";function Ge(n){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(n)}`}function qs({onBack:n}){Ke({title:s("seo.names.title"),description:s("seo.names.description")});const{session:o,signIn:r}=Ze(),h=En(),{data:d}=Qe(),b=d?Je(Q,d):null,[l,m]=
|
|
922
|
+
`,Ds="https://docs.decentraland.org/creator/worlds/about/",Gs="https://governance.decentraland.org";function Ge(n){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(n)}`}function qs({onBack:n}){Ke({title:s("seo.names.title"),description:s("seo.names.description")});const{session:o,signIn:r}=Ze(),h=En(),{data:d}=Qe(),b=d?Je(Q,d):null,[l,m]=u.useState(""),[c,y]=u.useState("idle"),[f,j]=u.useState(!1),[C,x]=u.useState(!1),[S,p]=u.useState(()=>{var v;return typeof window<"u"&&!!((v=window.matchMedia)!=null&&v.call(window,"(prefers-reduced-motion: reduce)").matches)});u.useEffect(()=>{var P;const v=(P=window.matchMedia)==null?void 0:P.call(window,"(prefers-reduced-motion: reduce)");if(!v)return;const W=R=>p(R.matches);return v.addEventListener("change",W),()=>v.removeEventListener("change",W)},[]);const g=s("names.placeholderExamples"),I=u.useMemo(()=>g.split(",").map(v=>v.trim()).filter(Boolean),[g]),N=Nn(I,!C&&!l&&!S)||s("names.inputPlaceholder"),E=u.useRef(null),[F,$]=u.useState(void 0);u.useLayoutEffect(()=>{E.current&&$(E.current.getBoundingClientRect().width)},[l,N]),u.useEffect(()=>{if(!Be(l).ok){y(l.length===0?"idle":"invalid");return}y("checking");const W=new AbortController,P=setTimeout(()=>{(async()=>{try{const R=await wn(l,{signal:W.signal});y(R)}catch(R){if((R==null?void 0:R.name)==="AbortError")return;y("error")}})()},400);return()=>{clearTimeout(P),W.abort()}},[l]);const k=Be(l),A=k.ok&&(c==="available"||c==="error"),T=h&&A,G=!h&&A;function z(){if(T){if(!o){r();return}j(!0)}}const M=e.jsxs(e.Fragment,{children:[s("names.claim"),b!=null?e.jsxs(As,{children:[e.jsx(D,{}),$e(b)]}):null]});return e.jsxs(us,{"data-testid":"names-page",children:[e.jsxs(fs,{"aria-label":s("names.breadcrumbAria"),children:[e.jsx(ms,{onClick:n,children:s("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(xs,{children:s("names.breadcrumbCurrent")})]}),e.jsxs(gs,{children:[e.jsxs(bs,{children:[e.jsxs(ys,{children:[e.jsx(ws,{children:s("names.heroTitle")}),e.jsx(vs,{children:s("names.heroSubtitle")})]}),e.jsxs(js,{children:[e.jsxs(Cs,{"data-testid":"names-input-wrap",children:[e.jsxs($s,{invalid:c==="taken",children:[e.jsxs(Ts,{children:[e.jsx(Rs,{"aria-hidden":!0,children:"@"}),e.jsx(_s,{value:l,onChange:v=>m(gn(v.target.value)),placeholder:N,"aria-label":s("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:de,onFocus:()=>x(!0),style:{width:F!=null?`${F}px`:void 0}}),e.jsx(ks,{ref:E,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||N}),e.jsx(Is,{children:s("names.suffix")})]}),l.length>0?e.jsxs(Ls,{"aria-hidden":!0,children:[l.length,"/",de]}):null,e.jsx(et,{onClick:z,disabled:!T,"data-testid":"names-claim",children:M})]}),c==="taken"?e.jsxs(Ss,{role:"status","data-testid":"names-taken",children:[e.jsx(_,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:s("names.taken")}),e.jsxs(Es,{href:Ge(l),target:"_blank",rel:"noopener noreferrer",children:[s("names.takenMakeOffer"),e.jsx(_,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,c==="checking"?e.jsx(se,{tone:"muted",role:"status","data-testid":"names-checking",children:s("names.checking")}):G?e.jsxs(se,{tone:"muted",role:"status","data-testid":"names-disabled",children:[e.jsx(_,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:s("names.registrationDisabled")}),e.jsxs(Ms,{href:Ge(l),target:"_blank",rel:"noopener noreferrer",children:[s("names.registrationDisabledLink"),e.jsx(_,{name:"external-link",size:13,"aria-hidden":!0})]})]}):c==="error"?e.jsx(se,{tone:"muted",role:"status",children:s("names.checkError")}):c==="invalid"&&!k.ok&&k.reason==="too-short"?e.jsx(se,{tone:"muted",role:"status",children:s("names.tooShort",{min:Xe})}):null]}),e.jsx(Ns,{onClick:z,disabled:!T,children:M}),e.jsx(Hs,{role:"status","aria-live":"polite",children:c==="available"?s("names.available",{name:l}):""})]})]}),e.jsxs(Ws,{children:[e.jsxs(Ps,{children:[e.jsx(Bs,{children:s("names.whyTitle")}),e.jsx(Fs,{children:s("names.whyIntro")})]}),e.jsxs(Os,{children:[e.jsxs(ie,{children:[e.jsx(oe,{src:cs,alt:""}),e.jsxs(ae,{children:[e.jsx(re,{children:s("names.why1Title")}),e.jsx(le,{children:s("names.why1")})]})]}),e.jsxs(ie,{children:[e.jsx(oe,{src:ds,alt:""}),e.jsxs(ae,{children:[e.jsx(re,{children:s("names.why2Title")}),e.jsxs(le,{children:[s("names.why2")," ",e.jsx(Us,{children:s("names.why2Address")})]}),e.jsxs(De,{href:Ds,target:"_blank",rel:"noopener noreferrer",children:[s("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(ie,{children:[e.jsx(oe,{src:hs,alt:""}),e.jsxs(ae,{children:[e.jsx(re,{children:s("names.why3Title")}),e.jsx(le,{children:s("names.why3")})]})]}),e.jsxs(ie,{children:[e.jsx(oe,{src:ps,alt:""}),e.jsxs(ae,{children:[e.jsx(re,{children:s("names.why4Title")}),e.jsx(le,{children:s("names.why4")}),e.jsxs(De,{href:Gs,target:"_blank",rel:"noopener noreferrer",children:[s("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(rs,{name:l,priceCredits:b,onClose:()=>j(!1)}):null]})}const Vs=i.p`
|
|
923
923
|
display: flex;
|
|
924
924
|
align-items: center;
|
|
925
925
|
gap: 10px;
|
|
@@ -935,5 +935,5 @@ import{r as f,u as Ve,j as e,a as dt}from"./react-BFtKLtDt.js";import{h as Z,r a
|
|
|
935
935
|
background: rgba(211, 51, 51, 0.1);
|
|
936
936
|
color: ${t.colors.err};
|
|
937
937
|
}
|
|
938
|
-
`,qe=48,Zs=["all","on_sale","not_for_sale"],Ks=n=>n?"all":"on_sale";function gi({contracts:n,hideNames:o=!1,seo:r,lockStatus:h}={}){const[d]=dt(),b=Ve(),l=(d.get("q")??"").trim().toLowerCase(),m=(d.get("q")??"").trim();Ke(r??{title:m?s("seo.collectibles.searchTitle",{query:m}):s("seo.collectibles.title"),description:s("seo.collectibles.description")});const c=Ks(!!l),y=St(),
|
|
939
|
-
//# sourceMappingURL=Assets-
|
|
938
|
+
`,qe=48,Zs=["all","on_sale","not_for_sale"],Ks=n=>n?"all":"on_sale";function gi({contracts:n,hideNames:o=!1,seo:r,lockStatus:h}={}){const[d]=dt(),b=Ve(),l=(d.get("q")??"").trim().toLowerCase(),m=(d.get("q")??"").trim();Ke(r??{title:m?s("seo.collectibles.searchTitle",{query:m}):s("seo.collectibles.title"),description:s("seo.collectibles.description")});const c=Ks(!!l),y=St(),f=y&&d.get("deals")==="true",j=u.useMemo(()=>({category:"all",status:c,subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,deals:!1,sort:f?"discount":"newest"}),[c,f]),[C,x]=Lt(j),{subCategory:S,rarities:p,priceMin:g,priceMax:I,smart:L,sort:N}=C,E=y&&C.deals,$=At.map(a=>a.key).filter(a=>!(o&&a==="names")).includes(C.category)?C.category:"all",k=h??(Zs.includes(C.status)?C.status:c);zt(`${$}:${S??""}`);const[A,T]=u.useState(!1);u.useEffect(()=>{if(!A)return;const a=ee=>{ee.key==="Escape"&&T(!1)};document.addEventListener("keydown",a);const H=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",a),document.body.style.overflow=H}},[A]);const G=n!==void 0&&n.length===0,z=k==="on_sale",M=g&&!Number.isNaN(Number(g))?Number(g):void 0,v=I&&!Number.isNaN(Number(I))?Number(I):void 0,W=Et(),P=S?en[S]:void 0,R=E?Mt:Wt,J=(R.find(a=>a.key===N)??R[0]).server,K={category:$,rarities:p.length?p:void 0,wearableCategories:P,minPriceCredits:M,maxPriceCredits:v,search:l||void 0,sortBy:J,isSmart:L||void 0,onSale:!0,discounted:E||void 0,listingType:W?void 0:"primary",contractAddresses:n!=null&&n.length?n:void 0},w={category:$,rarities:p.length?p:void 0,wearableCategories:P,search:l||void 0,sortBy:J,isWearableSmart:L||void 0,isOnSale:k==="not_for_sale"?!1:void 0,contractAddresses:n!=null&&n.length?n:void 0},{items:B,total:O,isLoading:U,isPlaceholderData:q,error:Re,hasNextPage:tt,isFetchingNextPage:_e,isFetchNextPageError:nt,fetchNextPage:st}=Xt(z?["shop-items",K]:["catalog-items",w],a=>z?_t({...K,first:qe,skip:a}):It({...w,first:qe,skip:a}),{enabled:$!=="names"&&!G}),X=O,{data:Ie,isError:it,isPending:ot}=Qe(),at=a=>Ie&&a.manaWei?Je(a.manaWei,Ie):null,rt=z&&ot&&B.some(a=>a.source==="legacy"),Le=U||q||rt,lt=U?15:Math.max(B.length,1),Ne=u.useRef(null);u.useEffect(()=>{U||q||!l||Ne.current===l||(Ne.current=l,ce("Shop Searched",{query:l,result_count:X}))},[l,U,q,X]);const Y=u.useRef("__init__");u.useEffect(()=>{if(U||q)return;const a=JSON.stringify({category:$,subCategory:S,rarities:p,min:M,max:v,sort:N,status:k,smart:L});if(Y.current==="__init__"||Y.current===a){Y.current=a;return}Y.current=a,ce("Shop Applied Filter",{filters:{category:$,sub_category:S,rarities:p,min_price_credits:M??null,max_price_credits:v??null,status:k,smart:L,sort:N},result_count:X})},[$,S,p,M,v,N,k,L,U,q,X]);function Ae(a){x({category:a,subCategory:null})}function ze(a){x({status:a})}function Me(a){x({rarities:p.includes(a)?p.filter(H=>H!==a):[...p,a]})}function ct(){x(j)}const V=[];(M!=null||v!=null)&&V.push({key:"price",label:s("filter.price"),onRemove:()=>{x({priceMin:"",priceMax:""})}});for(const a of Pt)p.includes(a)&&V.push({key:`rarity-${a}`,label:Tt(a),onRemove:()=>Me(a)});return L&&V.push({key:"smart",label:s("filter.smart"),onRemove:()=>x({smart:!1})}),E&&V.push({key:"deals",label:s("filter.deals"),onRemove:()=>x({deals:!1,sort:"newest"})}),k!==c&&V.push({key:"status",label:k==="all"?s("filter.statusAll"):k==="on_sale"?s("filter.onSale"):s("filter.notForSale"),onRemove:()=>ze(c)}),e.jsxs(Bt,{"data-testid":"browse",children:[$!=="names"&&e.jsxs(e.Fragment,{children:[A?e.jsx(Ft,{onClick:()=>T(!1),"aria-hidden":!0}):null,e.jsxs(Ot,{"data-open":A||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(Ut,{children:[e.jsx(Ht,{children:s("assets.filters")}),e.jsx(Dt,{onClick:()=>T(!1),"aria-label":s("assets.closeFilters"),children:"✕"})]}),e.jsx(Gt,{children:e.jsx(qt,{category:$,subCategory:S,onCategory:Ae,onSub:a=>x({subCategory:a}),priceMin:g,priceMax:I,onPriceMin:a=>x({priceMin:a}),onPriceMax:a=>x({priceMax:a}),rarities:p,onToggleRarity:Me,status:k,onStatus:ze,hideNames:o,smart:L,onSmart:a=>x({smart:a}),deals:E,onDeals:y?a=>x(a?{deals:!0,sort:"discount"}:{deals:!1,sort:"newest"}):void 0})}),e.jsx(Vt,{children:e.jsx(Zt,{type:"button",onClick:()=>T(!1),children:s("assets.showItems")})})]})]}),e.jsx(Kt,{children:$==="names"?e.jsx(qs,{onBack:()=>Ae("all")}):e.jsxs(e.Fragment,{children:[e.jsx(Qt,{sort:N,sortOptions:R,onSort:a=>x({sort:a}),total:O,loading:U||q,query:l,onOpenFilters:()=>T(!0),chips:V,onClearChips:ct}),it&&z&&B.some(a=>a.source==="legacy")?e.jsx(Vs,{"data-variant":"warn",children:s("assets.marketUnavailable")}):null,Re?e.jsx(tn,{message:s("assets.loadError"),testId:"browse-error"}):null,!Le&&B.length===0&&!Re?e.jsx(Rt,{testId:"browse-empty",icon:Nt,title:s("assets.empty.title"),body:m?e.jsxs(e.Fragment,{children:[s("assets.empty.searchBefore"),e.jsx("b",{children:m}),s("assets.empty.searchAfter")]}):s("assets.empty.filters"),cta:{label:s("assets.empty.cta"),onClick:()=>b("/overview")}}):e.jsxs(e.Fragment,{children:[e.jsx(mn,{"data-testid":"grid",children:Le?e.jsx(Pe,{count:lt}):e.jsxs(e.Fragment,{children:[B.map(a=>{if(!z)return e.jsx(te,{item:a,mode:"view"},ne(a));const H=a;if(H.source!=="legacy")return e.jsx(te,{item:a},ne(a));const ee=at(H);return ee==null?e.jsx(te,{item:a,mode:"view"},ne(a)):e.jsx(te,{item:{...H,priceCredits:ee}},ne(a))}),_e?e.jsx(Pe,{count:6}):null]})}),e.jsx(Jt,{hasNextPage:tt,isFetching:_e,isError:nt,onLoadMore:()=>void st()})]})]})})]})}export{gi as Assets};
|
|
939
|
+
//# sourceMappingURL=Assets-Bh3kAxON.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as G,r as B}from"./react-
|
|
1
|
+
import{j as e,L as G,r as B}from"./react-D7J-E0MH.js";import{d as o,s as n,H as K,k as P,J as H,c as i,F as Q,e as X,I as v,K as J,E as k,L as V,h as Z,M as U,N as T,x as Y,O as tt,P as M}from"./index-C7RUGLgx.js";import{c as et,d as it,e as C,a as ot,f as at,s as nt,g as st}from"./authorizations-o-LlYXNc.js";import{f as rt}from"./builder-CEDpBFkW.js";import{m as D}from"./mana-matic-CEqvSwrJ.js";import{f as ct}from"./errors-5abtsF-d.js";import"./dcl-schemas-BKQ0vYZF.js";import"./sentry-BK5YQzUx.js";import"./ethers-CqnE9_Iy.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-C6Fbql0T.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="57e7b648-fa24-4c24-bec2-5acf0c8dc364",t._sentryDebugIdIdentifier="sentry-dbid-57e7b648-fa24-4c24-bec2-5acf0c8dc364")}catch{}})();const lt=P`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,dt=P`
|
|
4
4
|
to { background-position: -200% 0; }
|
|
@@ -189,4 +189,4 @@ import{j as e,L as G,r as B}from"./react-BFtKLtDt.js";import{d as o,s as n,H as
|
|
|
189
189
|
`,W=n(K)`
|
|
190
190
|
margin-top: 12px;
|
|
191
191
|
`;function y({descriptor:t,owner:s,signer:r,name:a,description:c,image:d,icon:g,revokeOnly:$=!1}){const m=V(),[z,j]=B.useState(!1),{data:u,isLoading:l,refetch:h}=k({queryKey:["authorization",t.id,s],queryFn:()=>st(t,s),staleTime:3e4});async function p(){if(z||l)return;const w=!u;j(!0);try{await nt({auth:t,signer:r,active:w}),await h(),m.setQueryData(["authorization",t.id,s],w),T.success(w?i("authorizations.toastActivated",{name:a}):i("authorizations.toastDeactivated",{name:a}))}catch(I){Y(I,{flow:"authorizations",step:w?"grant":"revoke"}),T.error(ct(I,i("authorizations.errorGeneric")))}finally{j(!1)}}if($&&u===!1)return null;const f=l?i("authorizations.checking"):u?i("authorizations.active"):i("authorizations.inactive");return e.jsxs(mt,{"data-testid":`authorization-${t.id}`,"data-active":!!u,children:[e.jsx(ft,{children:d?e.jsx("img",{src:d,alt:""}):g}),e.jsxs(xt,{children:[e.jsx(yt,{title:a,children:a}),e.jsx(bt,{children:c})]}),e.jsxs(jt,{children:[e.jsx(zt,{"data-active":!!u,children:f}),z?e.jsx(vt,{"aria-label":i("authorizations.working")}):e.jsx(wt,{type:"button","data-testid":`authorization-toggle-${t.id}`,"data-active":!!u,role:"switch","aria-checked":!!u,"aria-label":u?i("authorizations.deactivateAria",{name:a}):i("authorizations.activateAria",{name:a}),disabled:l,onClick:()=>void p()})]})]})}const b=500,F=10,$t=b*F;async function q(t,s){const r=await M(t,{category:s,first:b}),a=Math.min(Math.ceil(r.total/b),F),c=await Promise.all(Array.from({length:Math.max(0,a-1)},(d,g)=>M(t,{category:s,first:b,skip:(g+1)*b})));return{assets:[...r.assets,...c.flatMap(d=>d.assets)],truncated:r.total>$t}}function Ct(t){return k({queryKey:["owned-collections",t],enabled:!!t,staleTime:6e4,queryFn:async()=>{const[s,r]=await Promise.all([q(t,"wearable"),q(t,"emote")]),a=new Map;for(const c of[...s.assets,...r.assets]){const d=c.contractAddress.toLowerCase();a.has(d)||a.set(d,c)}return{collections:[...a.values()],truncated:s.truncated||r.truncated,scanned:s.assets.length+r.assets.length}}})}function At(t){return k({queryKey:["contract-registry"],enabled:t,staleTime:1/0,gcTime:1/0,queryFn:tt})}function Et(t,s){const r=s==null?void 0:s.get(t.toLowerCase());if(r)return r;const a=U(t);return a===t?i("authorizations.collectionFallback"):a}function It(t,s){return k({queryKey:["creator-collections",t],enabled:!!t&&!!s,staleTime:6e4,queryFn:async()=>{const r=await rt(t,s),a=new Map;for(const c of r){const d=c.contractAddress.toLowerCase();a.has(d)||a.set(d,c)}return[...a.values()]}})}function Pt(){H({title:i("authorizations.title"),noindex:!0});const{session:t,signIn:s}=Q(),r=Z.chainId,a=X(t==null?void 0:t.providerType),{data:c,isLoading:d}=Ct(a?t==null?void 0:t.address:void 0),{data:g,isLoading:$}=At(!!a&&!!(t!=null&&t.address)),{data:m,isLoading:z}=It(a?t==null?void 0:t.address:void 0,a?t==null?void 0:t.identity:void 0);if(!t)return e.jsxs(_,{children:[e.jsx(v,{name:"info",size:40,color:o.colors.muted2}),e.jsx(R,{children:i("authorizations.signInTitle")}),e.jsx(O,{children:i("authorizations.signInBody")}),e.jsx(W,{variant:"white",onClick:()=>s(),children:i("storeSettings.signIn")})]});if(!a)return e.jsxs(_,{children:[e.jsx(v,{name:"check",size:40,color:o.colors.ok}),e.jsx(R,{children:i("authorizations.managedTitle")}),e.jsx(O,{children:i("authorizations.managedBody")}),e.jsx(W,{as:G,to:"/items",variant:"white",children:i("authorizations.managedCta")})]});const j=et(r),u=it(r);return e.jsxs(ut,{children:[e.jsxs(ht,{children:[e.jsx(pt,{children:i("authorizations.title")}),e.jsx(gt,{children:i("authorizations.intro")})]}),e.jsxs(A,{children:[e.jsx(E,{children:i("authorizations.buyingTitle")}),e.jsxs(x,{children:[e.jsx(y,{descriptor:j,owner:t.address,signer:t.signer,name:i("authorizations.creditsName"),description:i("authorizations.creditsDesc"),icon:e.jsx(J,{className:"ccy-mark"})}),e.jsx(y,{descriptor:u,owner:t.address,signer:t.signer,name:i("authorizations.manaName"),description:i("authorizations.manaDesc"),icon:e.jsx(S,{src:D,alt:"","aria-hidden":!0})}),C(u).map(l=>e.jsx(y,{descriptor:l,owner:t.address,signer:t.signer,name:`${i("authorizations.manaName")} ${i("authorizations.previousVersion")}`,description:i("authorizations.manaDesc"),icon:e.jsx(S,{src:D,alt:"","aria-hidden":!0}),revokeOnly:!0},l.id))]})]}),e.jsxs(A,{children:[e.jsx(E,{children:i("authorizations.sellingTitle")}),c!=null&&c.truncated?e.jsx(kt,{"data-testid":"authorizations-selling-truncated",children:i("authorizations.sellingTruncated",{count:c.scanned})}):null,d||$?e.jsx(x,{"aria-busy":"true","aria-label":i("authorizations.checking"),children:Array.from({length:3}).map((l,h)=>e.jsx(L,{"aria-hidden":!0},h))}):c&&c.collections.length>0?e.jsx(x,{children:c.collections.flatMap(l=>{const h=ot(l.contractAddress,r);return[h,...C(h)].map((p,f)=>e.jsx(y,{descriptor:p,owner:t.address,signer:t.signer,name:Et(l.contractAddress,g),description:i("authorizations.sellingDesc"),image:l.image,icon:e.jsx(v,{name:"pen",size:18}),revokeOnly:f>0},p.id))})}):e.jsx(N,{children:i("authorizations.sellingEmpty")})]}),e.jsxs(A,{children:[e.jsx(E,{children:i("authorizations.mintingTitle")}),z?e.jsx(x,{"aria-busy":"true","aria-label":i("authorizations.checking"),children:Array.from({length:3}).map((l,h)=>e.jsx(L,{"aria-hidden":!0},h))}):m&&m.length>0?e.jsx(x,{children:m.flatMap(l=>{const h=at(l.contractAddress,r);return[h,...C(h)].map((p,f)=>e.jsx(y,{descriptor:p,owner:t.address,signer:t.signer,name:l.name||i("authorizations.collectionFallback"),description:i("authorizations.mintingDesc"),icon:e.jsx(v,{name:"pen",size:18}),revokeOnly:f>0},p.id))})}):e.jsx(N,{children:i("authorizations.mintingEmpty")})]})]})}export{Pt as Authorizations};
|
|
192
|
-
//# sourceMappingURL=Authorizations-
|
|
192
|
+
//# sourceMappingURL=Authorizations-DPVFuAHg.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as Nt,r as T,u as fa,b as ma}from"./react-
|
|
1
|
+
import{j as e,L as Nt,r as T,u as fa,b as ma}from"./react-D7J-E0MH.js";import{s as i,d as E,c as a,K as Pe,S as ae,bj as Fe,C as Me,bk as ya,R as Le,bl as ba,Q as va,I as Y,y as Xe,J as wa,ai as H,W as jt,F as Ca,G as ja,E as ka,bm as $a,L as Sa,bn as Ma,X as Ta,bo as Pa,bp as kt,Z as Ia,bq as Aa,br as za,bs as Ea,av as Ke,e as Ba,bt as $t,ak as V,bu as St,bv as Ra,bw as _a,x as re,bx as qa,by as Wa,bz as Fa,bA as Qe,a2 as La,bB as we,bC as Ce,bD as Mt,bE as Ka,v as Tt,w as Pt,bF as Qa}from"./index-C7RUGLgx.js";import{M as Na,S as Ua,C as Ga,H as Oa,a as Ha,T as Da,X as Va,b as Ya,B as Ja,c as Xa,d as It,e as Za,f as Ie,g as es,h as ts,i as as,j as ss,k as Je,l as pe,L as ns,P as is,m as At,n as zt,W as rs,o as os,p as cs,q as ls,A as ds,r as us,s as hs,t as ps,u as gs,v as xs,w as fs,x as ms,y as ys,z as bs,D as vs,E as ws,F as Cs,G as js,I as ks,J as $s,K as Ss,N as Ne,O as Ms,Q as Ts,R as Ps,U as Et,V as Bt,Y as Is,Z as As,_ as zs,$ as Es,a0 as Rt,a1 as Bs}from"./CollectionCarousel-Dgmy1mBv.js";import{m as Te}from"./mana-matic-light-Bl5duieC.js";import{l as Rs,n as _s,g as qs,o as Ws,h as Fs,A as Ls}from"./authorizations-o-LlYXNc.js";import{p as _t,g as Ks,h as Ue}from"./buy-8-Zq_4Fb.js";import{w as Qs,S as Ge,b as Ns,G as Us}from"./buy-gasless-mSBHbIka.js";import{u as Gs,M as Os,R as je,r as Hs,c as Ds,g as Vs,a as Ys,p as qt,b as Oe}from"./useCreditPacks-C4goi1v6.js";import{i as Js,a as Xs}from"./errors-5abtsF-d.js";import{E as Zs}from"./ErrorNotice-Dqt3U2vl.js";import"./dcl-schemas-BKQ0vYZF.js";import"./sentry-BK5YQzUx.js";import"./ethers-CqnE9_Iy.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-C6Fbql0T.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new r.Error().stack;d&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[d]="6d91f7f4-ff36-4e4a-9937-f9c246fac8e9",r._sentryDebugIdIdentifier="sentry-dbid-6d91f7f4-ff36-4e4a-9937-f9c246fac8e9")}catch{}})();const en=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -745,4 +745,4 @@ import{j as e,L as Nt,r as T,u as fa,b as ma}from"./react-BFtKLtDt.js";import{s
|
|
|
745
745
|
margin-top: 0;
|
|
746
746
|
}
|
|
747
747
|
`;function Ve(r){if(Js(r))return a("errors.rejected");const d=(r.message??"").toLowerCase();return d.includes("insufficient")?a("cart.error.insufficient",{currency:Me.name}):d.includes("no active listing")||d.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const ni=12e4;function ii(r){const d=[];return r.unavailable.length&&d.push(a("cart.drop.unavailable",{count:r.unavailable.length})),r.own.length&&d.push(a("cart.drop.own",{count:r.own.length})),a("cart.drop.removed",{items:d.join(` ${a("cart.drop.and")} `)})}const Ye=r=>r.reduce((d,k)=>d+k.priceCredits*k.quantity,0),Se=r=>r.flatMap(d=>Array.from({length:d.quantity},()=>({...d,quantity:1})));function wi(){var Ct;wa({title:a("nav.cart"),noindex:!0});const r=H(t=>t.items),d=H(t=>t.remove),k=H(t=>t.increment),$=H(t=>t.decrement),B=H(t=>t.clear),U=H(t=>t.restore),O=H(t=>t.setFittingOpen),A=jt(t=>t.items),J=jt(t=>t.toggle),{session:n,signIn:G}=Ca(),Yt=ja(),ge=Gs().packs.slice(0,Os);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Jt=r.some(t=>t.category!=="emote"),{data:Ae}=ka({queryKey:["upsell-listings"],queryFn:()=>Qa({first:40}),staleTime:6e4}),{data:j}=$a(n),b=Sa(),X=fa(),{state:R}=ma(),[Xt,le]=T.useState(null),[Ze,xe]=T.useState(null),[Zt,_]=T.useState(!1),[q,D]=T.useState(null),et=T.useRef(0),[h,S]=T.useState(null),{data:fe}=Ma(n),{data:de}=Ta(!0),[ze,tt]=T.useState(""),ue=T.useRef(null),at=Pa(r),st=t=>$t(at[t.id]),Ee=r.filter(st),nt=r.length>0&&Ee.length===0,ea=Ee.reduce((t,s)=>t+s.priceCredits*s.quantity,0),ta=r.reduce((t,s)=>t+s.quantity,0),aa=Ee.reduce((t,s)=>t+s.quantity,0),it=q?q.liveTotalCredits:ea,sa=new Set(r.map(t=>t.id)),rt=((Ae==null?void 0:Ae.items)??[]).filter(t=>!sa.has(t.id)).slice(0,12),na=new Map(q==null?void 0:q.buyable.map(t=>[t.item.id,t])),me=(j==null?void 0:j.credits)??0,Be=it*10,ia=de?kt(Be,de):0n,Re=Ne({priceCents:Be,priceManaWei:ia,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n}),ra=t=>t.flatMap(s=>{const o=Oe(s);return o.kind==="store"?[o.mint]:[]}),oa=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),ca=t=>Object.fromEntries(t.flatMap(s=>s.acquisition==="trade"&&s.coupon?[[s.trade.id,s.coupon]]:[])),la=Ra,da=t=>Wa(t.contractAddress,String(t.itemId));function ye(t){t(),D(null),xe(null),le(null)}function ua(){S(null),_(!1)}function ot(t){const s=Ye(t),o=Math.max(0,s-me),c=ge.find(u=>u.credits>=o)??ge[ge.length-1];tt(c.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:me,shortfall:o}),S({phase:"nofunds",lines:t.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:o}),_(!1)}async function _e(t){if(!n||t.length===0)return;const s=Se(t),o=s.map(m=>({...m.item,priceCredits:m.priceCredits})),c=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),u=[];let v="authorize";const g=new Set,M=new Set,L=new Set,W=[];let w=!1;S({phase:"processing",stage:"reserving",step:1,total:s.length});try{const m=[],z=Vs(s,_t);let K=0;for(const p of z){S({phase:"processing",stage:"reserving",step:K+1,total:s.length});try{const{credit:f,maxCreditedValue:y}=await Fa(n.identity,p.units.map(Ys));p.units.forEach((N,ie)=>{u.push({salt:f.id,itemId:N.item.id}),m.push({...p.drafts[ie],credits:[f],maxCreditedValue:y})}),K+=p.units.length}catch(f){if(Xs(f)){if(u.length){try{await Qe(n.identity,[...new Set(u.map(y=>y.salt))])}catch(y){re(y,{flow:"cart_checkout",step:"release"})}b.invalidateQueries({queryKey:["usd-balance"]})}ot(t);return}throw f}}u.length&&b.invalidateQueries({queryKey:["usd-balance"]}),v="submit";const Q=Ks(m).length,te=p=>Q>1?{current:p,total:Q}:void 0,F=(p,f)=>S({phase:"processing",stage:p,step:s.length,total:s.length,signatures:te(f)}),C=p=>p<Q?F("awaiting-signature",p+1):F("settling",Q);F("awaiting-signature",1);let x=[];const P=new Map,se=async p=>{const f=await Promise.allSettled(p.map(y=>Qs(y)));return f.forEach((y,N)=>{const ie=P.get(p[N])??[];y.status==="fulfilled"?(ie.forEach(We=>M.add(We)),W.push(p[N])):y.reason instanceof Ge||ie.forEach(We=>L.add(We))}),f.flatMap(y=>y.status==="rejected"?[y.reason]:[])};if(Rs())try{let p=0;x=await Ns({purchases:m,buyer:n.address,signer:n.signer,identity:n.identity,onSigned:()=>F("settling",Math.min(p+1,Q)),onBroadcast:({txHash:y,salts:N})=>{p+=1,P.set(y,N),N.forEach(ie=>g.add(ie))},onGroupSettling:({settled:y})=>F("settling",y)});const f=await se(x);if(f.length&&!f.some(y=>y instanceof Ge))throw f[0];w=!0}catch(p){if(p instanceof Ge)throw await se([...P.keys()]),p;if(!(p instanceof Us)||!La(n.providerType))throw p;x=await Ue({purchases:m,buyer:n.address,signer:n.signer,onSigned:C,onBroadcast:({salts:f})=>f.forEach(y=>g.add(y)),onSettled:({txHash:f,salts:y})=>{y.forEach(N=>M.add(N)),W.push(f)},onReverted:({salts:f})=>f.forEach(y=>L.add(y))})}else x=await Ue({purchases:m,buyer:n.address,signer:n.signer,onSigned:C,onBroadcast:({salts:p})=>p.forEach(f=>g.add(f)),onSettled:({txHash:p,salts:f})=>{f.forEach(y=>M.add(y)),W.push(p)},onReverted:({salts:p})=>p.forEach(f=>L.add(f))});t.forEach(p=>d(p.item.id)),D(null),V("Shop Completed Purchase",{...we(o),payment_type:"credits",no_crypto_step:w,transaction_hash:x[0]??null}),Bt(b);const ve=ue.current;ue.current=null,S(null),_(!1);const ne={items:c,txHash:x[0]??void 0,txHashes:x,settled:!0,...ve?{creditsAdded:ve}:{}};X("/success",{state:ne,replace:!0})}catch(m){Ce(m)||re(m,{flow:"cart_checkout",step:v,cart_size:t.length});const z=new Set([...g].filter(x=>!L.has(x))),{toRelease:K,boughtItemIds:Q}=qt({reservations:u,spent:z,settled:M}),te=[...z].some(x=>!M.has(x)),F=o.filter(x=>Q.includes(x.id)),C=o.filter(x=>!Q.includes(x.id));if(V(Ce(m)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:v,error_code:Mt(m),value_usd:St(C.reduce((x,P)=>x+P.priceCredits,0)),cart_size:s.length,partial:F.length>0}),K.length)try{await Qe(n.identity,K)}catch(x){re(x,{flow:"cart_checkout",step:"release"})}if(b.invalidateQueries({queryKey:["usd-balance"]}),F.length>0){Q.forEach(x=>d(x)),D(null),Bt(b),V("Shop Completed Purchase",{...we(F),payment_type:"credits",no_crypto_step:w,transaction_hash:W[0]??null,partial:!0}),S({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:te}),_(!1);return}S({phase:"error",message:te?void 0:Ve(m),heldCredits:te})}}function ct(t,s){b.invalidateQueries({queryKey:["usd-balance"]}),b.invalidateQueries({queryKey:["detail-trade"]}),b.invalidateQueries({queryKey:["shop-item"]}),b.invalidateQueries({queryKey:["owned-token"]}),b.invalidateQueries({queryKey:["public-token"]}),b.invalidateQueries({queryKey:["item-resales"]}),b.invalidateQueries({queryKey:["shop-items"]}),b.invalidateQueries({queryKey:["catalog-items"]}),b.invalidateQueries({queryKey:["my-assets"]}),b.invalidateQueries({queryKey:["purchases"]}),b.invalidateQueries({queryKey:["owned-item-count"]}),b.invalidateQueries({queryKey:["overview-listings"]}),b.invalidateQueries({queryKey:["upsell-listings"]});const o=ue.current;ue.current=null,S(null),_(!1);const c={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...o?{creditsAdded:o}:{}};X("/success",{state:c,replace:!0})}function lt(t,s){Ce(t)||re(t,{flow:s,step:"submit"}),V(Ce(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Mt(t)}),S({phase:"error",message:Ve(t)}),_(!1)}async function ha(t,s,o){const c=Tt(Pt.MANAToken,s),u=Tt(Pt.CreditsManager,s);await Fs({auth:{kind:Ls.Allowance,contractAddress:c.address,spenderAddress:u.address,chainId:s},signer:t,requiredWei:o})}async function dt(){if(de)return de;try{return await b.fetchQuery(qa())}catch{return}}async function pa(t){const s=Se(t).reduce((v,g)=>v+g.usdCents,0),c=(fe??0n)>0n?await dt():de,u=c?kt(s,c):0n;return{totalCents:s,manaWei:u}}async function ut(t,s){const o=Ye(t),{totalCents:c,manaWei:u}=await pa(t),v=Ne({priceCents:c,priceManaWei:u,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n});if(s&&v.options.some(g=>g.method===s)){if(s==="credits"){_e(t);return}const g=xt(v,s);await pt(ht(s,t),g,()=>s==="mana"?void ft(t,g):void mt(t,c,u));return}if(v.options.some(g=>g.method==="mana"||g.method==="combined")){S({phase:"choose",lines:t,totalCents:c,manaWei:u}),_(!1);return}if(j!=null&&j.credits<o){ot(t);return}_e(t)}function qe(t){return Ne({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n})}const[he,be]=T.useState(null);function ht(t,s){const o=new Map;for(const c of s){const u=Is(t,Oe(c));o.set(`${u.chainId}:${u.spender.toLowerCase()}`,u)}return[...o.values()]}async function pt(t,s,o){const c=[];for(const{spender:u,chainId:v}of t){const g=_s(v,u),M=n?await qs(g,n.address,s).catch(()=>!0):!0;Ws(n==null?void 0:n.providerType,M)&&c.push(g)}if(c.length===0){o();return}_(!1),gt(c,0,o)}function gt(t,s,o){be({auth:t[s],index:s+1,total:t.length,run:()=>s+1<t.length?gt(t,s+1,o):o()})}function xt(t,s){var o;return((o=t.options.find(c=>c.method===s))==null?void 0:o.manaWei)??0n}function ga(t){if((h==null?void 0:h.phase)!=="choose")return;const{lines:s,totalCents:o,manaWei:c}=h;if(t==="credits"){_e(s);return}const u=xt(qe(h),t);pt(ht(t,s),u,()=>t==="mana"?void ft(s,u):void mt(s,o,c))}async function ft(t,s){if(!n||t.length===0)return;const o=Se(t),c=o.map(g=>({...g.item,priceCredits:g.priceCredits})),u=t.map(g=>({...g.item,priceCredits:g.priceCredits,quantity:g.quantity})),v=()=>S({phase:"processing",stage:"settling",step:o.length,total:o.length});S({phase:"processing",stage:"awaiting-signature",step:o.length,total:o.length});try{const g=await As({trades:oa(o),coupons:ca(o),mints:ra(o),buyer:n.address,signer:n.signer,onSigned:v,manaWei:s});t.forEach(M=>d(M.item.id)),D(null),V("Shop Completed Purchase",{...we(c),payment_type:"mana",transaction_hash:g[0]??null}),b.invalidateQueries({queryKey:["mana-balance"]}),ct(u,g)}catch(g){lt(g,"buy_cart_mana")}}async function mt(t,s,o){if(!n||t.length===0)return;const c=Se(t),u=c.map(w=>({...w.item,priceCredits:w.priceCredits})),v=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),g=zs(c.map(w=>w.usdCents),(j==null?void 0:j.balanceCents)??0),M=[],L=new Set,W=new Set;S({phase:"processing",stage:"reserving",step:1,total:c.length});try{const w=c.map(Oe),m=[],z=new Map,K=new Map;for(let C=0;C<c.length;C++){const x=c[C],P=w[C],se=g[C],ve=Es(Math.max(0,x.usdCents-se),s,o);let ne;if(se<=0)ne=Rt(P,[],"0");else{S({phase:"processing",stage:"reserving",step:C+1,total:c.length});const f=x.item,{credit:y,maxCreditedValue:N}=await Ka(n.identity,se,P.kind==="trade"?P.trade.id:void 0,f.contractAddress&&f.itemId!=null?{contractAddress:f.contractAddress,itemId:String(f.itemId)}:void 0);M.push({salt:y.id,itemId:f.id}),ne=Rt(P,[y],N)}const p=_t(ne);z.set(p,(z.get(p)??0n)+ve),K.has(p)||K.set(p,m.length),m.push(ne)}M.length&&b.invalidateQueries({queryKey:["usd-balance"]});for(const[C,x]of z){const P=K.get(C);P==null||x<=0n||(m[P]={...m[P],maxCreditedValue:(BigInt(m[P].maxCreditedValue)+x).toString()})}const Q=[...z.values()].reduce((C,x)=>C+x,0n);await ha(n.signer,Bs(w[0]),Q);const te=()=>S({phase:"processing",stage:"settling",step:c.length,total:c.length});S({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});const F=await Ue({purchases:m,buyer:n.address,signer:n.signer,onSigned:te,onBroadcast:({salts:C})=>C.forEach(x=>L.add(x)),onReverted:({salts:C})=>C.forEach(x=>W.add(x))});t.forEach(C=>d(C.item.id)),D(null),V("Shop Completed Purchase",{...we(u),payment_type:"credits_and_mana",transaction_hash:F[0]??null}),b.invalidateQueries({queryKey:["mana-balance"]}),ct(v,F)}catch(w){const{toRelease:m}=qt({reservations:M,spent:new Set([...L].filter(z=>!W.has(z))),settled:new Set});m.length&&Qe(n.identity,m).catch(()=>{}),M.length&&b.invalidateQueries({queryKey:["usd-balance"]}),lt(w,"buy_cart_combined")}}async function Z(t){if(!n){Et({type:"cart-checkout"}),G();return}const s=H.getState().items.filter(st);if(s.length===0)return;le(null),xe(null),_(!0);const o=s.reduce((c,u)=>c+u.priceCredits*u.quantity,0);V("Shop Started Checkout",{checkout_source:"cart",cart_size:s.length,cart_value_credits:o,cart_value_usd:St(o),has_sufficient_credits:me>=o});try{const c=await Hs(s,n.address,la,await dt(),da,_a),u=[...c.unavailable,...c.own];if(u.length&&(u.forEach(v=>d(v.id)),xe(ii(c))),c.buyable.length===0){le(a("cart.error.noneAvailable")),D(null);return}if(c.orderChanged){D(c),et.current=Date.now();return}await ut(c.buyable,t)}catch(c){re(c,{flow:"cart_checkout",step:"review",cart_size:s.length}),le(Ve(c))}finally{_(!1)}}async function yt(){if(q){if(!n){Et({type:"cart-checkout"}),G();return}if(Date.now()-et.current>ni){D(null),xe(null),await Z();return}le(null),ut(q.buyable)}}async function xa(){if(ze){try{sessionStorage.setItem(je,JSON.stringify(H.getState().items))}catch{}_(!0);try{const t=await Ds(ze,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}X("/credits")}catch(t){try{sessionStorage.removeItem(je)}catch{}re(t,{flow:"cart_buy_credits"}),S({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{_(!1)}}}const bt=T.useRef(!1);T.useEffect(()=>{if(!n||bt.current||!Ms("cart-checkout"))return;bt.current=!0;const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[n]);const vt=T.useRef(!1);T.useEffect(()=>{if(!(R!=null&&R.resumeCheckout)||vt.current)return;vt.current=!0,ue.current=R.creditsAdded??null;try{const s=sessionStorage.getItem(je);if(s){sessionStorage.removeItem(je);const o=JSON.parse(s);Array.isArray(o)&&o.length&&U(o)}}catch{}b.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[R==null?void 0:R.resumeCheckout]);const wt=T.useRef(!1);T.useEffect(()=>{if(!(R!=null&&R.startCheckout)||wt.current)return;wt.current=!0,X(".",{replace:!0,state:null});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[R==null?void 0:R.startCheckout]);const ee=Zt||(h==null?void 0:h.phase)==="processing";return r.length===0&&!h?e.jsx(Ft,{children:e.jsxs(Kt,{children:[e.jsxs(Lt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsx(vn,{children:e.jsx(Ia,{variant:"light",testId:"cart-empty",icon:Aa,title:a("cart.empty.title"),body:a("cart.empty.body"),cta:{label:a("cart.empty.cta"),to:"/items"}})})]})}):e.jsxs(Ft,{children:[e.jsxs(Kt,{children:[e.jsxs(Lt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(fn,{children:[e.jsxs(mn,{children:[e.jsxs(yn,{children:[e.jsx(wn,{onClick:()=>X(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(Y,{name:"arrow-left"})}),e.jsx(Cn,{children:a("cart.panelTitle",{count:ta})}),Jt?e.jsxs(jn,{onClick:()=>O(!0),disabled:ee,children:[e.jsx(Y,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(bn,{children:[e.jsx(kn,{children:r.map(t=>{const s=na.get(t.id),o=s?s.priceCredits:t.priceCredits,c=!!s&&s.priceCredits!==t.priceCredits,u=!t.tokenId,v=t.quantity,g=typeof t.available=="number"&&v>=t.available,M=o*v,L=za(t),W=!!L&&!!A[L],w=Ea(t),m=at[t.id],z=!$t(m),K=m==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs($n,{"data-unavailable":z||void 0,children:[e.jsxs(Sn,{"data-thumb":!0,children:[w?e.jsx(Mn,{to:w,state:{item:t,tradeId:t.tradeId},"aria-label":t.name,children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null}):t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null,e.jsx(Tn,{"data-check":!0,"aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs(Pn,{children:[e.jsxs(In,{"data-desc":!0,children:[w?e.jsx(zn,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(An,{title:t.name,children:t.name}),t.creator?e.jsx(En,{address:t.creator,linkToProfile:!0}):null,Yt&&u?e.jsxs(Nn,{"data-testid":"cart-creator-tag",children:[e.jsx(Un,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(Bn,{children:z?e.jsxs(Kn,{children:[e.jsx(Qn,{name:"warning-fill",size:24}),K]}):e.jsxs(e.Fragment,{children:[u?e.jsxs(Rn,{children:[e.jsx(Qt,{onClick:()=>ye(()=>$(t.id)),disabled:ee||v<=1,"aria-label":a("cart.decreaseQuantity",{name:t.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx(_n,{children:v}),e.jsx(Qt,{onClick:()=>ye(()=>k(t.id)),disabled:ee||g,"aria-label":a("cart.increaseQuantity"),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}):null,e.jsxs(qn,{children:[e.jsx(Wn,{})," ",e.jsx(Ke,{credits:M}),c?e.jsx(Fn,{children:e.jsx(Ke,{credits:t.priceCredits*v})}):null]})]})})]}),e.jsxs(Ln,{children:[L?e.jsx(Gn,{"data-on":W||void 0,onClick:()=>J(t),"aria-label":W?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:W?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(Y,{name:W?"heart-solid":"heart"})}):null,e.jsx(On,{onClick:()=>ye(()=>d(t.id)),disabled:ee,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(Y,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(Hn,{children:e.jsx("button",{className:"link",onClick:()=>ye(B),disabled:ee,children:a("cart.clearCart")})})]})]}),e.jsxs(Dn,{children:[e.jsx(Vn,{children:a("cart.purchaseSummary")}),e.jsxs(Yn,{children:[e.jsxs(Jn,{children:[e.jsx(Xn,{children:a("cart.totalItems",{count:aa})}),e.jsx(ei,{children:e.jsxs(Zn,{children:[e.jsx(ti,{})," ",e.jsx(Ke,{credits:it})]})})]}),e.jsx(Gt,{options:Re.options,totalCents:Be,shortfall:Re.manaShortfall,showCreditsAmount:!1,creditsLabel:q?a("marketCheckout.confirmPurchase"):Re.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:ee||nt,onPay:t=>void(q?yt():Z(t)),creditsFallback:{label:ee?a("cart.working"):q?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(q?yt():Z())}}),nt?e.jsx($e,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx($e,{className:"muted",children:a("cart.signInHint")}),q?e.jsx($e,{className:"muted",children:a("cart.priceChanged")}):null,Ze?e.jsx($e,{className:"muted",children:Ze}):null,e.jsx(ai,{message:Xt})]})]})]})]}),rt.length>0?e.jsx(si,{children:e.jsx(Ts,{title:a("cart.youMightAlsoLike"),items:rt})}):null,he&&n?e.jsx(Ps,{auth:he.auth,signer:n.signer,step:{index:he.index,total:he.total},title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:Te,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=he;be(null),t()},onCancel:()=>be(null),onClose:()=>be(null)}):null,h?e.jsx(hn,{phase:h.phase,balanceCredits:me,heldCreditsCount:((Ct=j==null?void 0:j.held)==null?void 0:Ct.credits)??null,onClose:ua,stage:h.phase==="processing"?h.stage:void 0,step:h.phase==="processing"?h.step:void 0,total:h.phase==="processing"?h.total:void 0,isSelfCustody:Ba(n==null?void 0:n.providerType),signatures:h.phase==="processing"?h.signatures:void 0,options:h.phase==="choose"?qe(h).options:void 0,shortfall:h.phase==="choose"?qe(h).manaShortfall:void 0,onPay:ga,totalCents:h.phase==="choose"?h.totalCents:void 0,totalManaWei:h.phase==="choose"?h.manaWei:void 0,totalCredits:h.phase==="choose"?Ye(h.lines):void 0,lines:h.phase==="nofunds"?h.lines:void 0,shortfallCredits:h.phase==="nofunds"?h.shortfall:void 0,packs:ge,selectedPack:ze,onSelectPack:tt,onBuyPacks:()=>void xa(),message:h.phase==="error"?h.message:void 0,heldCredits:h.phase==="error"&&!!h.heldCredits,onRetry:()=>void Z()}):null]})}export{wi as Cart};
|
|
748
|
-
//# sourceMappingURL=Cart-
|
|
748
|
+
//# sourceMappingURL=Cart-Cz1_8pDF.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as h,d as se,u as oe}from"./react-
|
|
1
|
+
import{j as e,r as h,d as se,u as oe}from"./react-D7J-E0MH.js";import{d as b,s as u,x as ae,I as re,k as ie,c as a,a5 as q,M,bL as ne,bM as le,h as ce,c1 as de,E as ue,J as me,ay as pe,Z as fe,$ as W,a0 as he,bN as xe,c2 as be}from"./index-C7RUGLgx.js";import{E as ge}from"./ErrorNotice-Dqt3U2vl.js";import{d as ye,P as ve,C as je,a as E,b as we,S as Ce}from"./collectionPage.styles-C--ki2P9.js";import{u as ke}from"./useStore-fPz8-87J.js";import{u as Se,S as G,R as $e,a as Ne,b as Ee,c as Ie,D as Me,d as Fe,C as Re,e as Te,F as _e,f as Ae,g as Pe,M as De,h as Le}from"./browseLayout.styles-Bza8FY3N.js";import{L as Be}from"./LoadMore-DgGHun07.js";import{u as ze}from"./useInfiniteGrid-x8-KLPvB.js";import{u as Oe,s as We}from"./search-empty-B2ikWLFM.js";import{S as Ge}from"./categories-J0dMuNkM.js";import{G as Ue}from"./grid.styles-iTSFhsyn.js";import"./dcl-schemas-BKQ0vYZF.js";import"./sentry-BK5YQzUx.js";import"./ethers-CqnE9_Iy.js";import"./intl-AKLEHPeO.js";import"./crumbs.styles-BqMPTZMi.js";import"./skeleton.styles-BN71VInw.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new o.Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="2bb5ab24-0fa3-4a58-90bc-ad419de9214e",o._sentryDebugIdIdentifier="sentry-dbid-2bb5ab24-0fa3-4a58-90bc-ad419de9214e")}catch{}})();const qe=u.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${b.radius.card};
|
|
4
4
|
overflow: hidden;
|
|
@@ -131,4 +131,4 @@ import{j as e,r as h,d as se,u as oe}from"./react-BFtKLtDt.js";import{d as b,s a
|
|
|
131
131
|
background: ${j.blackBtn};
|
|
132
132
|
}
|
|
133
133
|
`;function lt({address:o}){var d,n;const{data:s}=q(o);if(!o)return null;const i=(s==null?void 0:s.name)||M(o),l=(n=(d=s==null?void 0:s.avatar)==null?void 0:d.snapshots)==null?void 0:n.face256,r=`${ce.profileUrl}/${o}`,m=ne(le({name:s==null?void 0:s.name,hasClaimedName:s==null?void 0:s.hasClaimedName,ethAddress:(s==null?void 0:s.ethAddress)??o}));return e.jsxs(rt,{"data-testid":"creator-card",children:[l?e.jsx(U,{src:l,alt:"",loading:"eager",style:{backgroundColor:m}}):e.jsx(U,{as:"span","aria-hidden":!0,style:{backgroundColor:m}}),e.jsx(it,{title:i,children:i}),e.jsx(ot,{value:o,label:a("collection.copyAddress"),flow:"copy_creator_address",testId:"creator-card-copy",children:e.jsx("span",{children:M(o)})}),e.jsx(nt,{"data-testid":"creator-card-view",href:r,target:"_blank",rel:"noopener noreferrer",children:a("collection.viewProfile")})]})}const ct=48,dt=["all","on_sale","not_for_sale"];function Et(){var O;const{contractAddress:o}=se(),s=oe(),i=h.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[l,r]=Oe(i),{category:m,subCategory:d,rarities:n,priceMin:x,priceMax:f,smart:C,sort:F}=l,g=dt.includes(l.status)?l.status:"all",R=t=>r({status:t});Se(`${m}:${d??""}`);const[w,y]=h.useState(!1);h.useEffect(()=>{if(!w)return;const t=te=>{te.key==="Escape"&&y(!1)};document.addEventListener("keydown",t);const N=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=N}},[w]);const T=x&&!Number.isNaN(Number(x))?Number(x):void 0,_=f&&!Number.isNaN(Number(f))?Number(f):void 0,H=d?Ge[d]:void 0,K=(G.find(t=>t.key===F)??G[0]).server,A={contractAddress:o,category:m,rarities:n.length?n:void 0,wearableCategories:H,minPriceCredits:T,maxPriceCredits:_,isWearableSmart:C||void 0,isOnSale:g==="all"?void 0:g==="on_sale",sortBy:K},{items:Z,total:J,isLoading:k,error:P,hasNextPage:Q,isFetchingNextPage:D,isFetchNextPageError:V,fetchNextPage:X}=ze(["collection-page",A],t=>xe({...A,first:ct,skip:t}),{enabled:!!o}),S=de(Z),{data:c}=ue({queryKey:["collection-meta",o],queryFn:()=>be(o),enabled:!!o,staleTime:5*6e4}),L=(c==null?void 0:c.name)||a("collection.fallbackTitle");me({title:c==null?void 0:c.name,description:c!=null&&c.name?a("seo.collection.description",{name:c.name}):void 0});const p=(c==null?void 0:c.creator)||((O=S[0])==null?void 0:O.creator),{data:$}=q(p),Y=($==null?void 0:$.name)||(p?M(p):"");function ee(t){r({category:t,subCategory:null})}function B(t){r({rarities:n.includes(t)?n.filter(N=>N!==t):[...n,t]})}function z(){r(i)}const v=[];(T!=null||_!=null)&&v.push({key:"price",label:a("filter.price"),onRemove:()=>{r({priceMin:"",priceMax:""})}});for(const t of $e)n.includes(t)&&v.push({key:`rarity-${t}`,label:pe(t),onRemove:()=>B(t)});return C&&v.push({key:"smart",label:a("filter.smart"),onRemove:()=>r({smart:!1})}),g!=="all"&&v.push({key:"status",label:g==="on_sale"?a("filter.onSale"):a("filter.notForSale"),onRemove:()=>R("all")}),e.jsxs(ve,{"data-testid":"collection-page",children:[e.jsxs(je,{"aria-label":a("collection.breadcrumbAria"),children:[e.jsx(E,{onClick:()=>s("/items"),children:a("collection.breadcrumb")}),p?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>s(`/items/creator/${p}`),children:Y}),e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>s(`/items/creator/${p}?collections`),children:a("categories.collections")})]}):null,e.jsx("span",{children:"/"}),e.jsx(we,{children:L})]}),e.jsx(Qe,{name:L,creator:p}),e.jsxs(Ne,{"data-testid":"browse",children:[w?e.jsx(Ee,{onClick:()=>y(!1),"aria-hidden":!0}):null,e.jsxs(Ce,{children:[e.jsx(lt,{address:p}),e.jsxs(Ie,{"data-open":w||void 0,"data-static":!0,"data-testid":"browse-sidebar",children:[e.jsxs(Me,{children:[e.jsx(Fe,{children:a("assets.filters")}),e.jsx(Re,{onClick:()=>y(!1),"aria-label":a("assets.closeFilters"),children:"✕"})]}),e.jsx(Te,{children:e.jsx(_e,{category:m,subCategory:d,onCategory:ee,onSub:t=>r({subCategory:t}),priceMin:x,priceMax:f,onPriceMin:t=>r({priceMin:t}),onPriceMax:t=>r({priceMax:t}),rarities:n,onToggleRarity:B,status:g,onStatus:R,smart:C,onSmart:t=>r({smart:t}),hideNames:!0})}),e.jsx(Ae,{children:e.jsx(Pe,{type:"button",onClick:()=>y(!1),children:a("assets.showItems")})})]})]}),e.jsxs(De,{children:[e.jsx(Le,{sort:F,onSort:t=>r({sort:t}),total:J,loading:k,onOpenFilters:()=>y(!0),chips:v,onClearChips:z}),P?e.jsx(ge,{message:a("collection.error")}):null,!k&&!P&&S.length===0?e.jsx(fe,{testId:"collection-empty",icon:We,title:a("assets.empty.title"),body:a("collection.empty"),cta:{label:a("filterBar.clearAll"),onClick:z}}):e.jsxs(e.Fragment,{children:[e.jsx(Ue,{"data-testid":"grid",children:k?e.jsx(W,{count:15}):e.jsxs(e.Fragment,{children:[S.map(t=>e.jsx(he,{item:t},t.id)),D?e.jsx(W,{count:6}):null]})}),e.jsx(Be,{hasNextPage:Q,isFetching:D,isError:V,onLoadMore:()=>void X()})]})]})]})]})}export{Et as Collection,Et as default};
|
|
134
|
-
//# sourceMappingURL=Collection-
|
|
134
|
+
//# sourceMappingURL=Collection-BIm7ajYT.js.map
|