@dcl/shop 1.11.2 → 1.11.3-33096177368.commit-6f0f3de
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-BhrsqnTy.js → Activity-DDiEmOsx.js} +8 -8
- package/_assets/{AnimatedBackground-DB2urHfN.js → AnimatedBackground-CVHTTGZi.js} +2 -2
- package/_assets/{Assets-CEOKXfHN.js → Assets-R174CnUb.js} +3 -3
- package/_assets/{Authorizations-zY_jkrdd.js → Authorizations-BpQ-lzdP.js} +2 -2
- package/_assets/{Cart-CD3QMZMU.js → Cart-BsI419x2.js} +2 -2
- package/_assets/{Collection-fLHFUGHo.js → Collection-C620zyzC.js} +2 -2
- package/_assets/{CollectionCarousel-Cs01J4sG.js → CollectionCarousel-Cwf724uA.js} +38 -21
- package/_assets/{Confetti-DI93CkCr.js → Confetti-CB1yZzVw.js} +4 -4
- package/_assets/{ConstantsUtil-9orAwS_V.js → ConstantsUtil-CFYdyJk0.js} +2 -2
- package/_assets/{ContentClient-Dr4IkAbb.js → ContentClient-GzostOsU.js} +2 -2
- package/_assets/{Creator-DGT3lqoW.js → Creator-DxjcHNGc.js} +2 -2
- package/_assets/{DeploymentBuilder-BsQ4GIy9.js → DeploymentBuilder-DDKLtbBM.js} +2 -2
- package/_assets/{EmotePlaybackBar-WqjOzm12.js → EmotePlaybackBar-DVIeTHjQ.js} +3 -3
- package/_assets/{ErrorNotice-BanVYx_o.js → ErrorNotice-DGpmSHFq.js} +2 -2
- package/_assets/{ExchangeController-BWLF9BXM.js → ExchangeController-56N8xni5.js} +2 -2
- package/_assets/{Faq-Dt8RPaHZ.js → Faq-mlHE1lJ-.js} +2 -2
- package/_assets/{GetCredits-BtM_F2J_.js → GetCredits-DsOH_PZB.js} +2 -2
- package/_assets/{Grow-DqnkmJ7j.js → Grow-D6DG-S-e.js} +2 -2
- package/_assets/{HelpersUtil-BtPtcaFe.js → HelpersUtil-BjRYK1HI.js} +2 -2
- package/_assets/{ItemDetail-C28UgJKw.js → ItemDetail-DO0vMUED.js} +319 -319
- package/_assets/{LoadMore-hoiSVN2H.js → LoadMore-CHhSQR_A.js} +2 -2
- package/_assets/{ManaPricingBanner.styles-rIYX7xjf.js → ManaPricingBanner.styles-CAJcVFK8.js} +2 -2
- package/_assets/{MyAssets-BtAcjcuT.js → MyAssets-Dj6Kvu7N.js} +2 -2
- package/_assets/{MyFavorites-C3BVkIkn.js → MyFavorites-BF76BQio.js} +2 -2
- package/_assets/{NetworkUtil-BIUbrPWa.js → NetworkUtil-DuWsUf1s.js} +2 -2
- package/_assets/{NotFound-BgmQ5oFS.js → NotFound-DMt0E07P.js} +2 -2
- package/_assets/{NotificationsBell-Bjpu5hGT.js → NotificationsBell-CFknF7nN.js} +2 -2
- package/_assets/{OutfitDetail-CIeX74fk.js → OutfitDetail-CqvqCpur.js} +2 -2
- package/_assets/{OutfitPreview-Clicok_x.js → OutfitPreview-BWSHYJQo.js} +2 -2
- package/_assets/{OutfitStudio-DLStaax_.js → OutfitStudio-YYVzC2vq.js} +2 -2
- package/_assets/{StoreSettings-DwoVLG99.js → StoreSettings-Bcj58Qsl.js} +22 -22
- package/_assets/{Success-BKkeu6d7.js → Success-DQFnJCq1.js} +31 -31
- package/_assets/{SwapController-Cnrhnusk.js → SwapController-BG_0Rnli.js} +2 -2
- package/_assets/{TradeService-BgsoZh0O.js → TradeService-BQ0LfIIn.js} +2 -2
- package/_assets/{W3MFrameProviderSingleton-DqaMm2mV.js → W3MFrameProviderSingleton-DFZh2-P1.js} +4 -4
- package/_assets/{WebCryptoP256-R5qc29Sl.js → WebCryptoP256-DY-BoRUy.js} +2 -2
- package/_assets/{authorizations-DC168PVR.js → authorizations-r_yIs4_S.js} +2 -2
- package/_assets/{basic-CcMC-Noe.js → basic-NTA-d2L3.js} +2 -2
- package/_assets/{biconomy-MuBR1fCG.js → biconomy-Ca4RWWX7.js} +2 -2
- package/_assets/{browseLayout.styles-C_vn8XYJ.js → browseLayout.styles-B5WZBOX4.js} +2 -2
- package/_assets/{browser-CTTbQgwQ.js → browser-BSJZzHk7.js} +2 -2
- package/_assets/{browser-ponyfill-2MY_3eYQ.js → browser-ponyfill-BfJ9XPXG.js} +2 -2
- package/_assets/{builder-CpxipFmE.js → builder-C7euKgzs.js} +2 -2
- package/_assets/{buy-C9vFcpIy.js → buy-BBspDwaD.js} +2 -2
- package/_assets/{buy-gasless-Co1yjKqt.js → buy-gasless-CDHGUFyR.js} +2 -2
- package/_assets/{categories-DSulO5YB.js → categories-CSWMIFKV.js} +2 -2
- package/_assets/{ccip-BGKWaLZd.js → ccip-C-7Q5nOx.js} +2 -2
- package/_assets/{ccip-CIGFVe9f.js → ccip-D59yTDkH.js} +2 -2
- package/_assets/{chains-B_96BGTk.js → chains-Df2U73pw.js} +2 -2
- package/_assets/collectionPage.styles-CVj8bQ38.js +40 -0
- package/_assets/{common-nayH6Qb7.js → common-Ced0DDGw.js} +2 -2
- package/_assets/{controller-BoM50IGk.js → controller-VIdMekC7.js} +3 -3
- package/_assets/{core-C6U0AzoB.js → core-DnqUUiNf.js} +5 -5
- package/_assets/{createSvgIcon-DLtjIgIX.js → createSvgIcon-rpmuP-04.js} +2 -2
- package/_assets/{custom-BDzyroM1.js → custom-CaIsQUk6.js} +2 -2
- package/_assets/{data-capture-Zb8-AfOh.js → data-capture-VFIfTOLh.js} +2 -2
- package/_assets/{dcl-schemas-OH8G4Ndl.js → dcl-schemas-D3MMsa96.js} +2 -2
- package/_assets/{decimals-gxw11IoF.js → decimals-Bhq5HaFG.js} +2 -2
- package/_assets/{decimals-DwmaOPpT.js → decimals-CbgB-D98.js} +2 -2
- package/_assets/{detectExtension-GZk2y11b.js → detectExtension-CTH4nWTQ.js} +2 -2
- package/_assets/{disposePreview-CoU0o2LJ.js → disposePreview-Dhj7G1yu.js} +2 -2
- package/_assets/{email-Bs2nQCjl.js → email-DKwgACJ9.js} +2 -2
- package/_assets/{embedded-wallet-DaMZY5wt.js → embedded-wallet-BvFexqw_.js} +2 -2
- package/_assets/{emotion-styled.browser.esm-pl53fr_X.js → emotion-styled.browser.esm--6OqWmeO.js} +2 -2
- package/_assets/{engine-_-Y9EygX.js → engine-Cj_ytnKe.js} +2 -2
- package/_assets/{errors-ISVrHVty.js → errors-V6zhnTod.js} +2 -2
- package/_assets/{estimate-l1-fee-C2MojaUq.js → estimate-l1-fee-CRr-9P4j.js} +2 -2
- package/_assets/{eth_estimateGas-ByaJEeM-.js → eth_estimateGas-8PG-LgjK.js} +2 -2
- package/_assets/{eth_getStorageAt-CfRtAGD-.js → eth_getStorageAt-CzRui93q.js} +2 -2
- package/_assets/{eth_getTransactionCount-DCx1pf2k.js → eth_getTransactionCount-B6uEKHJJ.js} +2 -2
- package/_assets/{ethereum-BgVZC6F_.js → ethereum-u7pXJb69.js} +2 -2
- package/_assets/{ethers-DwK2TdL6.js → ethers-CFmosx3s.js} +2 -2
- package/_assets/{events-CSIN-_05.js → events-BijXrLgV.js} +2 -2
- package/_assets/{execute-wmZZdldV.js → execute-B12s_EMl.js} +3 -3
- package/_assets/{extractIPFS-BS6I288E.js → extractIPFS-BO3gyVwL.js} +2 -2
- package/_assets/{features-DimRp-1s.js → features-DvGGBhy_.js} +2 -2
- package/_assets/{fetchTokenMetadata-DZy_tSZt.js → fetchTokenMetadata-B-L9nStS.js} +3 -3
- package/_assets/{field.styles-6_NAJBdz.js → field.styles-BYvs7GyZ.js} +2 -2
- package/_assets/{fortmatic-D-iEWKOV.js → fortmatic-Dk7tB2Cc.js} +2 -2
- package/_assets/{get-bytecode-We_Yud0L.js → get-bytecode-CRhd_-w6.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-CZ2Y-cLY.js → get-ecosystem-wallet-info-84hXtg9T.js} +2 -2
- package/_assets/{getBalance-SeTBLCzL.js → getBalance-BZ5IqH6E.js} +3 -3
- package/_assets/{getInstalledModules-Dj-K4xQC.js → getInstalledModules-BxDwRN8h.js} +2 -2
- package/_assets/{getNFT-BCYWBTK4.js → getNFT-B_RYObDB.js} +3 -3
- package/_assets/{getNFT-BiPo4cEC.js → getNFT-BlXV1Nbm.js} +2 -2
- package/_assets/{grid.styles-DlGaOCzf.js → grid.styles-B15cNj07.js} +2 -2
- package/_assets/{hashTypedData-OCiZaYsv.js → hashTypedData-CvW0E5r9.js} +2 -2
- package/_assets/{hashTypedData-Dr6t3Q-D.js → hashTypedData-iIDq5Ym-.js} +2 -2
- package/_assets/{in-app-CVvPAYT7.js → in-app-BtFFE7ZS.js} +2 -2
- package/_assets/{in-app-wallet-calls-ChA73nJF.js → in-app-wallet-calls-DUdTy2mQ.js} +2 -2
- package/_assets/{index-BDJuqgxU.js → index-1aJPWImZ.js} +2 -2
- package/_assets/{index-BWEvNyOP.js → index-4yyQV3Ii.js} +2 -2
- package/_assets/{index-CFGlj3ri.js → index-75GXxbyC.js} +2 -2
- package/_assets/{index-CATjpM0W.js → index-8Sq2Laxu.js} +2 -2
- package/_assets/{index-Cj5zg5gT.js → index-Awgz4ffT.js} +2 -2
- package/_assets/{index-BACBbqlk.js → index-B7yEfYvF.js} +2 -2
- package/_assets/{index-DLKAGp7r.js → index-BERlZlkD.js} +2 -2
- package/_assets/{index-nQ3hptXe.js → index-BFQuWtYs.js} +2 -2
- package/_assets/{index-gm_D0aNI.js → index-BGRK42zM.js} +2 -2
- package/_assets/{index-_-VFmxzj.js → index-BGa7JO1k.js} +2 -2
- package/_assets/{index-BPQVwfa5.js → index-BJYAOcKy.js} +2 -2
- package/_assets/{index-D7_zDlZP.js → index-Be3X4HXZ.js} +2 -2
- package/_assets/{index-DGwAzxg5.js → index-BfA6yQqc.js} +2 -2
- package/_assets/{index-C3LVhWuY.js → index-Bi_cxGZL.js} +2 -2
- package/_assets/{index-BHbHN01N.js → index-Blu_X-5c.js} +2 -2
- package/_assets/{index-DejzmYQv.js → index-BtF9e9Uu.js} +2 -2
- package/_assets/{index-ChNIU-k1.js → index-BtyN-hwY.js} +2 -2
- package/_assets/{index-CUa90VgH.js → index-BynUY8x7.js} +2 -2
- package/_assets/{index-D2CYJ9zD.js → index-BzifxYje.js} +2 -2
- package/_assets/{index-BjdjqJv4.js → index-C7t87Zs_.js} +4 -4
- package/_assets/{index-CQvLWK26.js → index-CHDVYYal.js} +2 -2
- package/_assets/{index-CS1VnyR1.js → index-CHp8Yn9f.js} +2 -2
- package/_assets/{index-2aK4zhJE.js → index-CLoD3Be1.js} +2 -2
- package/_assets/{index-ncctYqB-.js → index-CMAp5Zcw.js} +2 -2
- package/_assets/{index-Ct9dUkSX.js → index-CQtnSuxq.js} +2 -2
- package/_assets/{index-CO9qakt0.js → index-CSUAwcgb.js} +2 -2
- package/_assets/{index-CY38y8q8.js → index-CX3dLd9W.js} +2 -2
- package/_assets/{index-CtayMM8a.js → index-Cd-qOUE-.js} +4 -4
- package/_assets/{index-ARGrbe3A.js → index-CdKgL1QK.js} +3 -3
- package/_assets/{index-DAqd6v3r.js → index-ChboSjzT.js} +2 -2
- package/_assets/{index-D8QWWYMI.js → index-CitByYvg.js} +2 -2
- package/_assets/{index-DZcNiUa1.js → index-CqyGsGNi.js} +2 -2
- package/_assets/{index-B2uxq6bU.js → index-CtxqhjhC.js} +2 -2
- package/_assets/{index-B0OkSRGZ.js → index-Cu3FnKVy.js} +2 -2
- package/_assets/{index-DCE7JXu8.js → index-Cu7kQ3eJ.js} +2 -2
- package/_assets/{index-B1wSCmue.js → index-CwoKDI7V.js} +2 -2
- package/_assets/{index-BiAbz-7Q.js → index-D-jGbFC6.js} +2 -2
- package/_assets/{index-CbMw0H1W.js → index-D22uBSRA.js} +3 -3
- package/_assets/{index-DKiFTtAe.js → index-D6KrRNZn.js} +3 -3
- package/_assets/{index-CK4WqWqO.js → index-DCrOq2wd.js} +2 -2
- package/_assets/{index-DRR34LYo.js → index-DFLKOa3I.js} +2 -2
- package/_assets/{index-BlorBoCd.js → index-DGi-pDgC.js} +2 -2
- package/_assets/{index-BPinodm9.js → index-DIURmrHc.js} +2 -2
- package/_assets/{index-Axq2dKdE.js → index-DOYNCVik.js} +2 -2
- package/_assets/{index-DJXUib_8.js → index-DOZ6UG7t.js} +2 -2
- package/_assets/{index-Dn8vBHwo.js → index-DTQo8MWQ.js} +2 -2
- package/_assets/{index-CGdQ1CYx.js → index-DcdoZVBU.js} +3 -3
- package/_assets/{index-DGUzkX-I.js → index-DsLn2baO.js} +2 -2
- package/_assets/{index-bJXcZSYa.js → index-DtHHdoPj.js} +152 -123
- package/_assets/{index-CmcTFc5W.js → index-DucxpIJX.js} +4 -4
- package/_assets/{index-ficvqfHi.js → index-DyHgoZVr.js} +2 -2
- package/_assets/{index-DibFNBla.js → index-ET91y1L4.js} +2 -2
- package/_assets/{index-BJA_2Ynv.js → index-FwAqH4Jg.js} +2 -2
- package/_assets/{index-gAex9EE8.js → index-GMK5LYtv.js} +2 -2
- package/_assets/{index-MZXf7D1W.js → index-INu2i__0.js} +2 -2
- package/_assets/{index-B9Up_SK0.js → index-IzgVmiKy.js} +2 -2
- package/_assets/{index-n4qOUE64.js → index-O3-idy_g.js} +2 -2
- package/_assets/{index-D1jUYM4a.js → index-SrWaz5aK.js} +2 -2
- package/_assets/{index-Cst1nEOO.js → index-Wv_D67im.js} +2 -2
- package/_assets/{index-G5AacsmF.js → index-asQzvqC5.js} +2 -2
- package/_assets/{index-zkaZwO7E.js → index-hgUDiN1A.js} +2 -2
- package/_assets/{index-CWThS2BY.js → index-jDlI52U4.js} +2 -2
- package/_assets/{index-D0Wlf6gr.js → index-juvpUDkX.js} +2 -2
- package/_assets/{index-B3Ji4DRo.js → index-kJ8yZh7l.js} +2 -2
- package/_assets/{index-D0q045Px.js → index-phZzSnhX.js} +2 -2
- package/_assets/{index-Dxe6AOQE.js → index-shk4Nfrg.js} +2 -2
- package/_assets/{index-CmcvBNcU.js → index-xUQrDXPD.js} +2 -2
- package/_assets/{index.es-DzLQ6Fnb.js → index.es-B5BDv7Up.js} +2 -2
- package/_assets/{index.es-CstVHWlV.js → index.es-BKFBDEdF.js} +5 -5
- package/_assets/{index.es-DYbPPtM5.js → index.es-Dk-yJOBf.js} +2 -2
- package/_assets/{index.es-4xrWWZcO.js → index.es-nTFebsyp.js} +2 -2
- package/_assets/items-empty-DtvQhcHO.js +2 -0
- package/_assets/{jump-CVtY0iTz.js → jump-CKAtFOwO.js} +2 -2
- package/_assets/{linkAccount-6NTQv8aT.js → linkAccount-D37ZKt7i.js} +2 -2
- package/_assets/{localBatchGatewayRequest-Dks7VfkN.js → localBatchGatewayRequest-CnvnHVld.js} +2 -2
- package/_assets/{native-CXAGKkI7.js → native-CAETsTK5.js} +2 -2
- package/_assets/{networks-DtT18tMT.js → networks-DRuoicxJ.js} +2 -2
- package/_assets/{onramp-CUVL5AKN.js → onramp-BwGhJ_q4.js} +2 -2
- package/_assets/{openzeppelin-C6HmSX5F.js → openzeppelin-DAbLTIrx.js} +2 -2
- package/_assets/{ownerOf-iHeO-A0L.js → ownerOf-CccB5Df2.js} +2 -2
- package/_assets/{parseNft-_qkiBgGY.js → parseNft-QMLtRgH8.js} +3 -3
- package/_assets/{parseSignature-DpYJxwtD.js → parseSignature-DBFFz9Fc.js} +2 -2
- package/_assets/{parseSignature-DCX2Homx.js → parseSignature-DLhzdjdz.js} +4 -4
- package/_assets/{passkeys-CaDDwDfa.js → passkeys-DUhoeSr2.js} +2 -2
- package/_assets/{pay-with-exchange-mjjMFDoB.js → pay-with-exchange-wv4pj6K4.js} +2 -2
- package/_assets/{prepare-contract-call-B3PEXjk8.js → prepare-contract-call-CZgIb5_m.js} +2 -2
- package/_assets/{qr-overlay-Dte-FwLF.js → qr-overlay-BvMbYq7B.js} +4 -4
- package/_assets/{react-Io5Wove7.js → react-Cu6RTeaf.js} +2 -2
- package/_assets/{receive-BOylnCCD.js → receive-B1TTNgiL.js} +2 -2
- package/_assets/{resolveImplementation-eqKe_Jd_.js → resolveImplementation-DqHPzOZ1.js} +2 -2
- package/_assets/{resume-buy-l-MsHDN-.js → resume-buy-DBJOysCn.js} +2 -2
- package/_assets/{rpc-Bd3ag8E4.js → rpc-DY_6x6sN.js} +2 -2
- package/_assets/{sales-empty-71lDTBeo.js → sales-empty-sKHyys3f.js} +2 -2
- package/_assets/{search-empty-C2pIWVz4.js → search-empty-BLqSZDPi.js} +2 -2
- package/_assets/{secp256k1-D89skxyt.js → secp256k1-BEqU8sYg.js} +2 -2
- package/_assets/{secp256k1-ChjjZr2n.js → secp256k1-CmiJzTHS.js} +2 -2
- package/_assets/{secp256k1-BCTY01q6.js → secp256k1-WxEVCU75.js} +2 -2
- package/_assets/{send-BoRH3tdn.js → send-CAIzabYu.js} +2 -2
- package/_assets/{send-batch-transaction-qs3ijcbz.js → send-batch-transaction-D8sYAmn9.js} +2 -2
- package/_assets/{send-eip712-transaction-BLU365vg.js → send-eip712-transaction-Bj_Dviud.js} +3 -3
- package/_assets/{send-gasless-transaction-COE6PePF.js → send-gasless-transaction-D1sAgdfS.js} +3 -3
- package/_assets/{send-transaction-DWia223-.js → send-transaction-BlkeWOl3.js} +3 -3
- package/_assets/{sendMetaTransaction-Bnb1e1Oo.js → sendMetaTransaction-CqnRe296.js} +2 -2
- package/_assets/{sendRawTransaction-QUpRtv1T.js → sendRawTransaction-cowcF1Zi.js} +4 -4
- package/_assets/{sentry-faeuEJiQ.js → sentry-BIexM3hF.js} +3 -3
- package/_assets/{serializeTransaction-Bzap5VIj.js → serializeTransaction-DXNnXLd5.js} +2 -2
- package/_assets/{session-proposal-BRPQA6_F.js → session-proposal-DKZwcLCZ.js} +2 -2
- package/_assets/{session-request-DE3BfIwL.js → session-request-Dak6hx32.js} +3 -3
- package/_assets/{sha256-my9t8oLg.js → sha256-D6LtjOnB.js} +2 -2
- package/_assets/{signing-BKRnKKdl.js → signing-CeMNDy_m.js} +4 -4
- package/_assets/{skeleton.styles-Cjpy58bn.js → skeleton.styles-BC2avkie.js} +2 -2
- package/_assets/{socials-CHs46oCs.js → socials-ygRGzmms.js} +2 -2
- package/_assets/{styled-3e6FPpFM.js → styled-DjZ-UOQs.js} +2 -2
- package/_assets/{swaps-BQAfj8hR.js → swaps-DomEuyxC.js} +2 -2
- package/_assets/{thirdweb-I3ycy-sq.js → thirdweb-pkB5sCqN.js} +4 -4
- package/_assets/{to-serializable-transaction-D4JXNF6K.js → to-serializable-transaction-BGYR6mL7.js} +3 -3
- package/_assets/{totalSupply-RRjcgrsd.js → totalSupply-_s3nO9Hq.js} +2 -2
- package/_assets/{transaction-CpNDZT6H.js → transaction-Drph0tvC.js} +2 -2
- package/_assets/{transactionReceipt-BsGymDgp.js → transactionReceipt-UBxlSqk5.js} +2 -2
- package/_assets/{transactions-ZyGjrTz1.js → transactions-CHMKCKRv.js} +2 -2
- package/_assets/{useCreditPacks-RKaHRtDl.js → useCreditPacks-DV8TpCkV.js} +2 -2
- package/_assets/{useInfiniteGrid-CKUOL3of.js → useInfiniteGrid-EJxCLDAB.js} +2 -2
- package/_assets/{useStore-zwLaMv5E.js → useStore-CmOmf_pZ.js} +3 -3
- package/_assets/{useTheme-6lXtg_We.js → useTheme-CxS-nUL6.js} +2 -2
- package/_assets/{utils-DmCacC3Z.js → utils-DK0-s9yl.js} +2 -2
- package/_assets/{verifyHash-BnLy1LQ8.js → verifyHash-C7Sy8sQa.js} +2 -2
- package/_assets/{w3m-modal-igkHA2Yg.js → w3m-modal-DlSk4w8R.js} +2 -2
- package/_assets/{w3m-modal-CqeYEpsp.js → w3m-modal-dl0m9MGw.js} +2 -2
- package/_assets/{wait-for-tx-receipt-BBZ5JG62.js → wait-for-tx-receipt-u8qlSCaY.js} +2 -2
- package/_assets/{wallets-BUa02PiV.js → wallets-rkrKp4c1.js} +6 -6
- package/_assets/{web-connector-C7j-Aqf_.js → web-connector-B0ui-2UM.js} +4 -4
- package/_assets/{writeContract-DUS_4K4j.js → writeContract-CIcRNaaC.js} +2 -2
- package/_assets/{zora-sepolia-CDPQd0aL.js → zora-sepolia-BMPN4lD4.js} +2 -2
- package/_assets/{zoraTestnet-DzzH_a_k.js → zoraTestnet-CnfxOehO.js} +2 -2
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/collectionPage.styles-DUDsxvQH.js +0 -40
- package/_assets/items-empty-CpzVwMne.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-
|
|
2
|
-
import{U as we,bG as Ie,o as U,l as A,bH as Ae,t as o,s as l,m as Ee,n as Le,b as r,J as Ne,I as T,bI as se,bJ as ne,bK as $e,_ as Pe,L as Te,q as E,ao as K,bL as Se,r as Ce,bl as B,E as Fe,bM as De,w as N,bN as Me,bO as Q}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-DyHgoZVr.js","_assets/react-Cu6RTeaf.js","_assets/index-DtHHdoPj.js","_assets/dcl-schemas-D3MMsa96.js","_assets/sentry-BIexM3hF.js","_assets/ethers-CFmosx3s.js","_assets/intl-AKLEHPeO.js","_assets/index-CKGO8NWe.css","_assets/sales-empty-sKHyys3f.js","_assets/buy-BBspDwaD.js","_assets/authorizations-r_yIs4_S.js","_assets/sendMetaTransaction-CqnRe296.js","_assets/ManaPricingBanner.styles-CAJcVFK8.js","_assets/Faq-mlHE1lJ-.js","_assets/field.styles-BYvs7GyZ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{U as we,bG as Ie,o as U,l as A,bH as Ae,t as o,s as l,m as Ee,n as Le,b as r,J as Ne,I as T,bI as se,bJ as ne,bK as $e,_ as Pe,L as Te,q as E,ao as K,bL as Se,r as Ce,bl as B,E as Fe,bM as De,w as N,bN as Me,bO as Q}from"./index-DtHHdoPj.js";import{r as g,u as He,j as t,e as qe,L as Oe}from"./react-Cu6RTeaf.js";import{u as Re,s as _e}from"./sales-empty-sKHyys3f.js";import{L as ze}from"./LoadMore-CHhSQR_A.js";import{u as $}from"./useInfiniteGrid-EJxCLDAB.js";import{m as de}from"./mana-matic-CEqvSwrJ.js";import{n as We}from"./name-glyph-aUugT8vq.js";import"./dcl-schemas-D3MMsa96.js";import"./sentry-BIexM3hF.js";import"./ethers-CFmosx3s.js";import"./intl-AKLEHPeO.js";import"./buy-BBspDwaD.js";import"./authorizations-r_yIs4_S.js";import"./sendMetaTransaction-CqnRe296.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]="b1f9752f-2397-4989-8e36-d4eda3640865",e._sentryDebugIdIdentifier="sentry-dbid-b1f9752f-2397-4989-8e36-d4eda3640865")}catch{}})();const Ge=15e3;function Ue(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)<=Ge}function Ke(e){const s=[...e].sort((i,d)=>d.createdAt-i.createdAt),n=[];for(const i of s){const d=n[n.length-1];d&&Ue(d[d.length-1],i)?d.push(i):n.push([i])}return n.map(i=>{var d;return{id:((d=i.find(a=>a.txHash))==null?void 0:d.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(a=>a.createdAt)),status:Be(i),totalCredits:i.reduce((a,h)=>a+h.credits,0),lines:i}})}function Be(e){return e.some(s=>s.status==="PENDING")?"PENDING":e.some(s=>s.status==="SETTLED")?"SETTLED":"EXPIRED"}function Qe(e){return e==="SETTLED"?"SETTLED":e==="EXPIRED"?"FAILED":"PENDING"}function Xe(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Ve(e){const s=[],n=new Map;for(const i of e){const d=Xe(i);if(!d){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 a=n.get(d);if(a){a.quantity+=1,a.credits+=i.credits;continue}const h={key:d,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits};n.set(d,h),s.push(h)}return s}function Je(e,s){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:s?we(e.manaWei,s):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ye(e){return e.status!=="EXPIRED"||!!e.submittedTxHash}function Ze(e){const n=Ke(e.purchases.filter(Ye)).map(c=>({kind:"purchase",id:`purchase:${c.id}`,createdAt:c.createdAt,order:c})),i=e.sales.map(c=>{const m=Je(c,e.rate);return{kind:"sale",id:`sale:${m.id}`,createdAt:m.createdAt,sale:m}}),d=(e.creditOrders??[]).filter(c=>c.status!=="failed"&&c.status!=="abandoned").map(c=>({kind:"credit",id:`credit:${c.id}`,createdAt:c.createdAt,order:c})),a=new Set(e.purchases.filter(c=>c.txHash).map(c=>c.txHash.toLowerCase())),h=(e.manaPurchases??[]).filter(c=>!a.has(c.txHash.toLowerCase())).map(c=>({kind:"mana-purchase",id:`mana-purchase:${c.id}`,createdAt:c.createdAt,sale:c}));return[...n,...i,...d,...h].sort((c,m)=>m.createdAt-c.createdAt||(c.id<m.id?-1:1))}function et(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 ce=e=>e.trim().toLowerCase();function tt(e){const s=new Map;for(const n of e??[]){const i=ce(n.txHash??"");if(!i)continue;const d=s.get(i);d?d.push(n):s.set(i,[n])}return s}function it(e,s,n=Date.now()){const i=s.txHash?e.get(ce(s.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const d=i.length===1?st(i[0].netCents):null,a=i.filter(c=>!c.available&&c.availableAt>n);if(a.length===0)return{kind:"credited",credits:d};const h=a.reduce((c,m)=>Math.max(c,m.availableAt),0);return{kind:"pending",credits:d,availableAt:h}}function st(e){return Ie(e)}function nt(){const e=U(i=>{var d;return(d=i.session)==null?void 0:d.address}),{data:s,isLoading:n}=A({queryKey:["listing-count",e],queryFn:()=>Ae({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:s==null?void 0:s.total,isLoading:n}}const at="https://cdn.decentraland.org/@dcl/shop/1.11.3-33096177368.commit-6f0f3de/_assets/credits-product-vs4Q6u6l.svg",X=Ee`
|
|
3
3
|
0% { background-position: 200% 0; }
|
|
4
4
|
100% { background-position: -200% 0; }
|
|
5
5
|
`,rt=l.section`
|
|
@@ -188,7 +188,7 @@ import{U as we,bG as Ie,o as U,l as A,bH as Ae,t as o,s as l,m as Ee,n as Le,b a
|
|
|
188
188
|
background: ${o.colors.line};
|
|
189
189
|
color: ${o.colors.muted};
|
|
190
190
|
}
|
|
191
|
-
`,
|
|
191
|
+
`,mt=l.button`
|
|
192
192
|
font-size: 11px;
|
|
193
193
|
font-weight: 700;
|
|
194
194
|
text-transform: uppercase;
|
|
@@ -230,7 +230,7 @@ import{U as we,bG as Ie,o as U,l as A,bH as Ae,t as o,s as l,m as Ee,n as Le,b a
|
|
|
230
230
|
width: 16px;
|
|
231
231
|
height: 16px;
|
|
232
232
|
vertical-align: -0.15em;
|
|
233
|
-
`,
|
|
233
|
+
`,xt=l.span`
|
|
234
234
|
display: inline-flex;
|
|
235
235
|
align-items: center;
|
|
236
236
|
cursor: pointer;
|
|
@@ -357,11 +357,11 @@ import{U as we,bG as Ie,o as U,l as A,bH as Ae,t as o,s as l,m as Ee,n as Le,b a
|
|
|
357
357
|
@media (prefers-reduced-motion: reduce) {
|
|
358
358
|
animation: none;
|
|
359
359
|
}
|
|
360
|
-
`,
|
|
360
|
+
`,yt=l.div`
|
|
361
361
|
display: flex;
|
|
362
362
|
flex-direction: column;
|
|
363
363
|
align-items: center;
|
|
364
|
-
`,
|
|
364
|
+
`,bt=l.div`
|
|
365
365
|
display: flex;
|
|
366
366
|
flex-direction: column;
|
|
367
367
|
align-items: center;
|
|
@@ -385,5 +385,5 @@ import{U as we,bG as Ie,o as U,l as A,bH as Ae,t as o,s as l,m as Ee,n as Le,b a
|
|
|
385
385
|
height: 26px;
|
|
386
386
|
object-fit: contain;
|
|
387
387
|
}
|
|
388
|
-
`,Z=L.withComponent(Oe),wt=g.lazy(()=>Pe(()=>import("./index-ficvqfHi.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),P=24,It=["all","purchases","sales"],W="section",oe="listings",G="view",At="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function pe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function xe(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function me({children:e}){const s=g.useRef(null),[n,i]=g.useState(null),d=()=>{var h;const a=(h=s.current)==null?void 0:h.getBoundingClientRect();a&&i({top:a.bottom+8,left:a.left+a.width/2})};return t.jsxs(mt,{ref:s,tabIndex:0,onMouseEnter:d,onMouseLeave:()=>i(null),onFocus:d,onBlur:()=>i(null),children:[e,n?qe.createPortal(t.jsx(gt,{style:{top:n.top,left:n.left},role:"tooltip",children:r("activity.polygonMana")}),document.body):null]})}function Et({item:e}){const s=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||s,{data:i,isLoading:d}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Me(e.tradeId):Q(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),a=n&&d,h=(i==null?void 0:i.name)??r("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",x=B({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=t.jsxs(t.Fragment,{children:[a?t.jsx(J,{}):t.jsx(O,{children:c?t.jsx("img",{src:c,alt:h}):t.jsx(T,{name:"cart",size:20})}),t.jsxs(R,{children:[a?t.jsx(Y,{}):t.jsx(_,{title:h,children:h}),e.quantity>1?t.jsx(z,{children:r("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]});return x?t.jsx(Z,{to:x,"data-link":"true",children:f}):t.jsx(L,{children:f})}function Lt({item:e}){const s=`@${e.registeredName}`;return t.jsxs(L,{"data-testid":"activity-name-line",children:[t.jsx(kt,{children:t.jsx("img",{src:We,alt:""})}),t.jsxs(R,{children:[t.jsx(_,{title:s,children:s}),t.jsx(z,{children:r("activity.nameRegistration")})]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",e.credits]})]})}function Nt({order:e}){const s=Ve(e.lines),n=s.reduce((a,h)=>a+h.quantity,0),i=Qe(e.status),d=i==="SETTLED"?r("activity.completed"):i==="FAILED"?r("activity.failed"):r("activity.processing");return t.jsxs(S,{"data-testid":"purchase-order",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.purchaseLabel")," · ",r("activity.itemCount",{count:n})]})]}),t.jsxs(H,{children:[t.jsx(q,{"data-status":i,children:d}),t.jsxs(k,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.totalCredits})]})]})]}),i==="FAILED"?t.jsx(ft,{children:r("activity.purchaseFailedNote")}):null,t.jsx(V,{children:s.map(a=>a.registeredName?t.jsx(Lt,{item:a},a.key):t.jsx(Et,{item:a},a.key))})]})}function $t({sale:e}){const{data:s,isLoading:n}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??r("activity.itemFallback"),d=(s==null?void 0:s.thumbnail)??"",a=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,h=t.jsxs(t.Fragment,{children:[n?t.jsx(J,{}):t.jsx(O,{children:d?t.jsx("img",{src:d,alt:i}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(R,{children:[n?t.jsx(Y,{}):t.jsx(_,{title:i,children:i}),t.jsx(z,{children:r("activity.boughtFrom",{account:pe(e.seller)})})]})]});return t.jsxs(S,{"data-testid":"activity-mana-purchase",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.paidWithMana")})]}),t.jsxs(H,{children:[t.jsx(q,{"data-status":"SETTLED",children:r("activity.completed")}),t.jsxs(k,{children:[xe(e.manaWei)," ",t.jsx(me,{children:t.jsx(ue,{src:de,alt:"MANA"})})]})]})]}),t.jsx(V,{children:a?t.jsx(Z,{to:a,"data-link":"true",children:h}):t.jsx(L,{children:h})})]})}function Pt({sale:e,payout:s}){const{data:n,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),d=(n==null?void 0:n.name)??r("activity.itemFallback"),a=(n==null?void 0:n.thumbnail)??"",h=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,c=t.jsxs(t.Fragment,{children:[i?t.jsx(J,{}):t.jsx(O,{children:a?t.jsx("img",{src:a,alt:d}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(R,{children:[i?t.jsx(Y,{}):t.jsx(_,{title:d,children:d}),t.jsxs(z,{children:[r("activity.soldTo",{account:pe(e.counterparty)}),s.kind==="pending"?` · ${r("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return t.jsxs(S,{"data-testid":"activity-sale",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.saleLabel")})]}),t.jsxs(H,{children:[t.jsx(q,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?r("activity.payoutPending"):r("activity.sold")}),s.kind==="direct"?t.jsxs(k,{"data-kind":"income",children:["+",xe(e.manaWei)," ",t.jsx(me,{children:t.jsx(ue,{src:de,alt:"MANA"})})]}):s.credits!==null?t.jsxs(k,{"data-kind":"income",children:[t.jsx(E,{className:"ccy-mark"})," +",Fe(s.credits)]}):t.jsx(k,{"data-kind":"income",children:r("activity.payoutCredited")})]})]}),t.jsx(V,{children:h?t.jsx(Z,{to:h,"data-link":"true",children:c}):t.jsx(L,{children:c})})]})}function Tt({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,n=Se(e.status),i=n==="SETTLED"?r("activity.completed"):n==="FAILED"?r("activity.failed"):n==="UNFINISHED"?r("activity.unfinished"):r("activity.processing"),d=U(p=>p.session),a=Ce(),[h,c]=g.useState(!1),x=e.status==="initiated"&&!!d;g.useEffect(()=>{const p=()=>c(!1);return window.addEventListener("pageshow",p),()=>window.removeEventListener("pageshow",p)},[]);async function f(){if(!(!d||h)){c(!0);try{const p=await De(e.id,d.identity);if(p.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(p.url)){window.location.href=p.url;return}N.error(r("activity.resumeUnavailable"))}else p.kind==="expired"?(N.info(r("activity.resumeExpired")),a.invalidateQueries({queryKey:["credit-orders"]})):p.kind==="paid"?(N.success(r("activity.resumePaid")),a.invalidateQueries({queryKey:["credit-orders"]})):N.error(r("activity.resumeUnavailable"));c(!1)}catch{c(!1)}}}return t.jsx(S,{"data-testid":"credit-order",children:t.jsxs(C,{children:[t.jsx(pt,{children:t.jsx("img",{src:at,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.creditPurchaseLabel")," · ",r("activity.creditPaid",{usd:s})]})]}),t.jsxs(H,{children:[x?t.jsx(xt,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?r("activity.resuming"):r("activity.resume")}):null,t.jsx(q,{"data-status":n,children:i}),t.jsxs(k,{"data-kind":n==="UNFINISHED"?void 0:"income",children:[n==="UNFINISHED"?"":"+",t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]})]})})}function St({filter:e}){const s={all:r("activity.emptyAllBody"),purchases:r("activity.emptyPurchasesBody"),sales:r("activity.emptySalesBody")}[e];return t.jsx(bt,{children:t.jsx(Te,{testId:`activity-empty-${e}`,icon:_e,title:r("activity.emptyTitle"),body:s,cta:{label:r("assets.empty.cta"),to:"/items"}})})}function Bt(){const{session:e}=U(),[s,n]=g.useState("all"),[i,d]=He(),a=i.get(W)===oe||i.get(G)===At;Le({title:a?r("seo.import.title"):r("nav.activity"),noindex:!0});const{count:h}=Re(),{count:c}=nt(),f=h!==void 0&&c!==void 0&&(h>0||c>0||a),p=!!e&&!a&&s!=="sales",m=!!e&&!a&&s!=="purchases",b=$(["purchases",e==null?void 0:e.address],u=>$e(e.address,e.identity,{first:P,skip:u}),{enabled:p}),y=$(["sales",e==null?void 0:e.address],u=>se(e.address,{role:"seller",first:P,skip:u}),{enabled:m}),v=$(["credit-orders",e==null?void 0:e.address],u=>ne(e.address,e.identity,{first:P,skip:u}),{enabled:p}),j=$(["mana-purchases",e==null?void 0:e.address],u=>se(e.address,{role:"buyer",first:P,skip:u}),{enabled:p}),{data:ee}=A({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ne(e.address,e.identity,{first:200}).then(u=>u.payouts),enabled:m,staleTime:6e4}),ge=g.useMemo(()=>tt(ee),[ee]),{data:fe}=Ne(m);if(!e)return t.jsxs(yt,{children:[t.jsx(T,{name:"clock",size:40,color:o.colors.muted2}),t.jsx(vt,{children:r("activity.signInTitle")}),t.jsx(jt,{children:r("activity.signInBody")})]});const te=et(Ze({purchases:p?b.items:[],sales:m?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:fe}),s),be=p&&(b.isLoading||v.isLoading||j.isLoading)||m&&y.isLoading,ie=p&&(b.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||m&&y.isFetchingNextPage,ye=p&&(b.hasNextPage||v.hasNextPage||j.hasNextPage)||m&&y.hasNextPage;function ve(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),m&&y.hasNextPage&&y.fetchNextPage()}function je(u){if(n(u),!a)return;const w=new URLSearchParams(i);w.delete(W),w.delete(G),d(w,{replace:!0})}function ke(){const u=new URLSearchParams(i);u.set(W,oe),u.delete(G),d(u,{replace:!0})}return t.jsxs(rt,{children:[t.jsx(ot,{children:t.jsx(dt,{children:r("nav.activity")})}),t.jsxs(ct,{role:"tablist","aria-label":r("nav.activity"),children:[It.map(u=>t.jsx(le,{type:"button",role:"tab","aria-selected":!a&&s===u,"data-active":!a&&s===u,"data-testid":`activity-filter-${u}`,onClick:()=>je(u),children:r(`activity.filter.${u}`)},u)),f?t.jsxs(lt,{type:"button",role:"tab","aria-selected":a,"data-active":a,"data-testid":"activity-filter-migrate","aria-label":h?r("activity.migrate.chipAria",{count:h}):void 0,onClick:ke,children:[r("activity.migrate.chip"),h?t.jsx(ut,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),a?t.jsx(g.Suspense,{fallback:t.jsx(ht,{"aria-busy":"true"}),children:t.jsx(wt,{})}):be?t.jsx(ae,{children:Array.from({length:5}).map((u,w)=>t.jsx(re,{},w))}):te.length===0?t.jsx(St,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(ae,{children:[te.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($t,{sale:u.sale},u.id):t.jsx(Pt,{sale:u.sale,payout:it(ge,u.sale)},u.id)),ie?t.jsx(re,{}):null]}),t.jsx(ze,{hasNextPage:ye,isFetching:ie,onLoadMore:ve})]})]})}export{Bt as Activity};
|
|
389
|
-
//# sourceMappingURL=Activity-
|
|
388
|
+
`,Z=L.withComponent(Oe),wt=g.lazy(()=>Pe(()=>import("./index-DyHgoZVr.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),P=24,It=["all","purchases","sales"],W="section",oe="listings",G="view",At="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function pe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function me(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function xe({children:e}){const s=g.useRef(null),[n,i]=g.useState(null),d=()=>{var h;const a=(h=s.current)==null?void 0:h.getBoundingClientRect();a&&i({top:a.bottom+8,left:a.left+a.width/2})};return t.jsxs(xt,{ref:s,tabIndex:0,onMouseEnter:d,onMouseLeave:()=>i(null),onFocus:d,onBlur:()=>i(null),children:[e,n?qe.createPortal(t.jsx(gt,{style:{top:n.top,left:n.left},role:"tooltip",children:r("activity.polygonMana")}),document.body):null]})}function Et({item:e}){const s=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||s,{data:i,isLoading:d}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Me(e.tradeId):Q(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),a=n&&d,h=(i==null?void 0:i.name)??r("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",m=B({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=t.jsxs(t.Fragment,{children:[a?t.jsx(J,{}):t.jsx(O,{children:c?t.jsx("img",{src:c,alt:h}):t.jsx(T,{name:"cart",size:20})}),t.jsxs(R,{children:[a?t.jsx(Y,{}):t.jsx(_,{title:h,children:h}),e.quantity>1?t.jsx(z,{children:r("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]});return m?t.jsx(Z,{to:m,"data-link":"true",children:f}):t.jsx(L,{children:f})}function Lt({item:e}){const s=`@${e.registeredName}`;return t.jsxs(L,{"data-testid":"activity-name-line",children:[t.jsx(kt,{children:t.jsx("img",{src:We,alt:""})}),t.jsxs(R,{children:[t.jsx(_,{title:s,children:s}),t.jsx(z,{children:r("activity.nameRegistration")})]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",e.credits]})]})}function Nt({order:e}){const s=Ve(e.lines),n=s.reduce((a,h)=>a+h.quantity,0),i=Qe(e.status),d=i==="SETTLED"?r("activity.completed"):i==="FAILED"?r("activity.failed"):r("activity.processing");return t.jsxs(S,{"data-testid":"purchase-order",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.purchaseLabel")," · ",r("activity.itemCount",{count:n})]})]}),t.jsxs(H,{children:[t.jsx(q,{"data-status":i,children:d}),t.jsxs(k,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.totalCredits})]})]})]}),i==="FAILED"?t.jsx(ft,{children:r("activity.purchaseFailedNote")}):null,t.jsx(V,{children:s.map(a=>a.registeredName?t.jsx(Lt,{item:a},a.key):t.jsx(Et,{item:a},a.key))})]})}function $t({sale:e}){const{data:s,isLoading:n}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??r("activity.itemFallback"),d=(s==null?void 0:s.thumbnail)??"",a=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,h=t.jsxs(t.Fragment,{children:[n?t.jsx(J,{}):t.jsx(O,{children:d?t.jsx("img",{src:d,alt:i}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(R,{children:[n?t.jsx(Y,{}):t.jsx(_,{title:i,children:i}),t.jsx(z,{children:r("activity.boughtFrom",{account:pe(e.seller)})})]})]});return t.jsxs(S,{"data-testid":"activity-mana-purchase",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.paidWithMana")})]}),t.jsxs(H,{children:[t.jsx(q,{"data-status":"SETTLED",children:r("activity.completed")}),t.jsxs(k,{children:[me(e.manaWei)," ",t.jsx(xe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]})]})]}),t.jsx(V,{children:a?t.jsx(Z,{to:a,"data-link":"true",children:h}):t.jsx(L,{children:h})})]})}function Pt({sale:e,payout:s}){const{data:n,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),d=(n==null?void 0:n.name)??r("activity.itemFallback"),a=(n==null?void 0:n.thumbnail)??"",h=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,c=t.jsxs(t.Fragment,{children:[i?t.jsx(J,{}):t.jsx(O,{children:a?t.jsx("img",{src:a,alt:d}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(R,{children:[i?t.jsx(Y,{}):t.jsx(_,{title:d,children:d}),t.jsxs(z,{children:[r("activity.soldTo",{account:pe(e.counterparty)}),s.kind==="pending"?` · ${r("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return t.jsxs(S,{"data-testid":"activity-sale",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.saleLabel")})]}),t.jsxs(H,{children:[t.jsx(q,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?r("activity.payoutPending"):r("activity.sold")}),s.kind==="direct"?t.jsxs(k,{"data-kind":"income",children:["+",me(e.manaWei)," ",t.jsx(xe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]}):s.credits!==null?t.jsxs(k,{"data-kind":"income",children:[t.jsx(E,{className:"ccy-mark"})," +",Fe(s.credits)]}):t.jsx(k,{"data-kind":"income",children:r("activity.payoutCredited")})]})]}),t.jsx(V,{children:h?t.jsx(Z,{to:h,"data-link":"true",children:c}):t.jsx(L,{children:c})})]})}function Tt({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,n=Se(e.status),i=n==="SETTLED"?r("activity.completed"):n==="FAILED"?r("activity.failed"):n==="UNFINISHED"?r("activity.unfinished"):r("activity.processing"),d=U(p=>p.session),a=Ce(),[h,c]=g.useState(!1),m=e.status==="initiated"&&!!d;g.useEffect(()=>{const p=()=>c(!1);return window.addEventListener("pageshow",p),()=>window.removeEventListener("pageshow",p)},[]);async function f(){if(!(!d||h)){c(!0);try{const p=await De(e.id,d.identity);if(p.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(p.url)){window.location.href=p.url;return}N.error(r("activity.resumeUnavailable"))}else p.kind==="expired"?(N.info(r("activity.resumeExpired")),a.invalidateQueries({queryKey:["credit-orders"]})):p.kind==="paid"?(N.success(r("activity.resumePaid")),a.invalidateQueries({queryKey:["credit-orders"]})):N.error(r("activity.resumeUnavailable"));c(!1)}catch{c(!1)}}}return t.jsx(S,{"data-testid":"credit-order",children:t.jsxs(C,{children:[t.jsx(pt,{children:t.jsx("img",{src:at,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.creditPurchaseLabel")," · ",r("activity.creditPaid",{usd:s})]})]}),t.jsxs(H,{children:[m?t.jsx(mt,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?r("activity.resuming"):r("activity.resume")}):null,t.jsx(q,{"data-status":n,children:i}),t.jsxs(k,{"data-kind":n==="UNFINISHED"?void 0:"income",children:[n==="UNFINISHED"?"":"+",t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]})]})})}function St({filter:e}){const s={all:r("activity.emptyAllBody"),purchases:r("activity.emptyPurchasesBody"),sales:r("activity.emptySalesBody")}[e];return t.jsx(yt,{children:t.jsx(Te,{testId:`activity-empty-${e}`,icon:_e,title:r("activity.emptyTitle"),body:s,cta:{label:r("assets.empty.cta"),to:"/items"}})})}function Bt(){const{session:e}=U(),[s,n]=g.useState("all"),[i,d]=He(),a=i.get(W)===oe||i.get(G)===At;Le({title:a?r("seo.import.title"):r("nav.activity"),noindex:!0});const{count:h}=Re(),{count:c}=nt(),f=h!==void 0&&c!==void 0&&(h>0||c>0||a),p=!!e&&!a&&s!=="sales",x=!!e&&!a&&s!=="purchases",y=$(["purchases",e==null?void 0:e.address],u=>$e(e.address,e.identity,{first:P,skip:u}),{enabled:p}),b=$(["sales",e==null?void 0:e.address],u=>se(e.address,{role:"seller",first:P,skip:u}),{enabled:x}),v=$(["credit-orders",e==null?void 0:e.address],u=>ne(e.address,e.identity,{first:P,skip:u}),{enabled:p}),j=$(["mana-purchases",e==null?void 0:e.address],u=>se(e.address,{role:"buyer",first:P,skip:u}),{enabled:p}),{data:ee}=A({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ne(e.address,e.identity,{first:200}).then(u=>u.payouts),enabled:x,staleTime:6e4}),ge=g.useMemo(()=>tt(ee),[ee]),{data:fe}=Ne(x);if(!e)return t.jsxs(bt,{children:[t.jsx(T,{name:"clock",size:40,color:o.colors.muted2}),t.jsx(vt,{children:r("activity.signInTitle")}),t.jsx(jt,{children:r("activity.signInBody")})]});const te=et(Ze({purchases:p?y.items:[],sales:x?b.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:fe}),s),ye=p&&(y.isLoading||v.isLoading||j.isLoading)||x&&b.isLoading,ie=p&&(y.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||x&&b.isFetchingNextPage,be=p&&(y.hasNextPage||v.hasNextPage||j.hasNextPage)||x&&b.hasNextPage;function ve(){p&&y.hasNextPage&&y.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),x&&b.hasNextPage&&b.fetchNextPage()}function je(u){if(n(u),!a)return;const w=new URLSearchParams(i);w.delete(W),w.delete(G),d(w,{replace:!0})}function ke(){const u=new URLSearchParams(i);u.set(W,oe),u.delete(G),d(u,{replace:!0})}return t.jsxs(rt,{children:[t.jsx(ot,{children:t.jsx(dt,{children:r("nav.activity")})}),t.jsxs(ct,{role:"tablist","aria-label":r("nav.activity"),children:[It.map(u=>t.jsx(le,{type:"button",role:"tab","aria-selected":!a&&s===u,"data-active":!a&&s===u,"data-testid":`activity-filter-${u}`,onClick:()=>je(u),children:r(`activity.filter.${u}`)},u)),f?t.jsxs(lt,{type:"button",role:"tab","aria-selected":a,"data-active":a,"data-testid":"activity-filter-migrate","aria-label":h?r("activity.migrate.chipAria",{count:h}):void 0,onClick:ke,children:[r("activity.migrate.chip"),h?t.jsx(ut,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),a?t.jsx(g.Suspense,{fallback:t.jsx(ht,{"aria-busy":"true"}),children:t.jsx(wt,{})}):ye?t.jsx(ae,{children:Array.from({length:5}).map((u,w)=>t.jsx(re,{},w))}):te.length===0?t.jsx(St,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(ae,{children:[te.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($t,{sale:u.sale},u.id):t.jsx(Pt,{sale:u.sale,payout:it(ge,u.sale)},u.id)),ie?t.jsx(re,{}):null]}),t.jsx(ze,{hasNextPage:be,isFetching:ie,onLoadMore:ve})]})]})}export{Bt as Activity};
|
|
389
|
+
//# sourceMappingURL=Activity-DDiEmOsx.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-Cu6RTeaf.js";import{s as f}from"./index-DtHHdoPj.js";import"./dcl-schemas-D3MMsa96.js";import"./sentry-BIexM3hF.js";import"./ethers-CFmosx3s.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]="ea0bc4e3-5936-48ed-b9f7-58f6a1a26d3b",e._sentryDebugIdIdentifier="sentry-dbid-ea0bc4e3-5936-48ed-b9f7-58f6a1a26d3b")}catch{}})();const D="https://cdn.decentraland.org/@dcl/shop/1.11.3-33096177368.commit-6f0f3de/_assets/custom-welcome-background-BxlFQma9.webp",P="https://cdn.decentraland.org/@dcl/shop/1.11.3-33096177368.commit-6f0f3de/_assets/DCL_LogoPattern-BryBPc3d.png",L=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -95,4 +95,4 @@ void main() {
|
|
|
95
95
|
width: 100%;
|
|
96
96
|
height: 100%;
|
|
97
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 m=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(m),t.bindBuffer(t.ARRAY_BUFFER,v),t.vertexAttribPointer(m,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-
|
|
98
|
+
//# sourceMappingURL=AnimatedBackground-CVHTTGZi.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,b as He,j as e,u as et}from"./react-
|
|
1
|
+
import{r as u,b as He,j as e,u as et}from"./react-Cu6RTeaf.js";import{u as tt,s as nt}from"./search-empty-BLqSZDPi.js";import{u as st,t as Ie,R as it,j as ot,k as rt,l as at,m as lt,n as ct,o as dt,p as ht,v as pt,q as ut,r as ft,M as mt,s as xt}from"./browseLayout.styles-B5WZBOX4.js";import{c as V,R as gt,bv as bt,br as yt,aA as wt,a as vt,l as jt,cw as Ct,cx as $t,s as i,t,o as Oe,bf as kt,r as St,E as ve,b as n,p as Et,I as E,q as O,cy as le,bd as Tt,ad as oe,bn as Le,bu as Rt,bt as _t,n as De,J as Ge,U as qe,V as It,ar as Lt,L as Nt,S as Ne,M as J,aI as At,bE as zt}from"./index-DtHHdoPj.js";import{L as Mt}from"./LoadMore-CHhSQR_A.js";import{u as Wt}from"./useInfiniteGrid-EJxCLDAB.js";import{n as Bt,S as Pt}from"./categories-CSWMIFKV.js";import{E as Ft}from"./ErrorNotice-DGpmSHFq.js";import{d as Ut}from"./dcl-schemas-D3MMsa96.js";import{s as Ht,G as Ot,w as Dt,S as Gt}from"./buy-gasless-CDHGUFyR.js";import{s as qt,o as Vt}from"./buy-BBspDwaD.js";import{f as Zt}from"./errors-V6zhnTod.js";import{J as Qt,C as Kt,B as je}from"./ethers-CFmosx3s.js";import{n as Jt}from"./name-glyph-aUugT8vq.js";import{G as Xt}from"./grid.styles-B15cNj07.js";import"./skeleton.styles-BC2avkie.js";import"./sentry-BIexM3hF.js";import"./intl-AKLEHPeO.js";import"./authorizations-r_yIs4_S.js";import"./sendMetaTransaction-CqnRe296.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="faba39a6-e260-47bf-85f5-274e5032f11b",s._sentryDebugIdIdentifier="sentry-dbid-faba39a6-e260-47bf-85f5-274e5032f11b")}catch{}})();function X(s){const o=s.source??"item",r=s.tradeId||`${s.contractAddress}-${s.tokenId??s.itemId??""}`;return`${o}:${r}`}const Z="100000000000000000000",Ve=2,re=15,Yt=/^[a-zA-Z0-9]+$/;function Ae(s){const o=s.trim();return o.length===0?{ok:!1,reason:"empty"}:Yt.test(o)?o.length<Ve?{ok:!1,reason:"too-short"}:o.length>re?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function en(s){return s.replace(/[^a-zA-Z0-9]/g,"").slice(0,re)}const tn=["function available(string _subdomain) view returns (bool)"],ze={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function nn(){return V.chainId===Number(Ut.ChainId.MATIC_MAINNET)?ze.mainnet:ze.sepolia}async function sn(s,o={}){var m;const{rpc:r,address:d}=nn(),h=new Qt(r),f=new Kt(d,tn,h);console.info(`[names] availability check → DCLRegistrar(${d}).available("${s}") on ${r}`);const l=await f.available(s);if((m=o.signal)!=null&&m.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${s}" available=${l}`),l?"available":"taken"}const on="https://app.across.to/api";class ke extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class Ce extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class $e extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function rn(s){return wt(Z,s)}async function an(s,o,r={}){var m;const d=r.chainId??V.chainId,h=r.provider??"across",f=`${V.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${d}&provider=${h}`,l=await vt(f,{method:"GET",identity:s,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 ke:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function ln(s,o){const r=je.from(s.availableAmount),h=je.from(Z).sub(r);return{credits:[{value:s.amount,expiresAt:Number(s.expiresAt),salt:Vt(s.id)}],creditsSignatures:[s.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:Z}}async function cn(s,o={}){const r=on,d=o.intervalMs??1e4,h=o.maxAttempts??60;let f={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<h;l++){try{const m=await fetch(`${r}/deposit/status?originChainId=137&depositTxHash=${s}`);if(m.ok){const c=await m.json(),g=(c.status??"pending").toLowerCase(),p=c.fillTx??c.fillTxnRef??null,b=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(g==="filled")return{status:"filled",destinationTxHash:p,actionsSucceeded:b};if(g==="refunded"||g==="expired")return{status:g,destinationTxHash:null,actionsSucceeded:!1};f={status:"pending",destinationTxHash:p,actionsSucceeded:b}}}catch{}l<h-1&&await new Promise(m=>setTimeout(m,d))}return f}async function dn(s){const{name:o,identity:r,signer:d}=s,h=p=>{var b;try{(b=s.onProgress)==null||b.call(s,p)}catch{}},f=s.chainId??V.chainId,l=s.provider??"across",m=(s.beneficiary??await d.getAddress()).toLowerCase();let c=null,g="unconfirmed";console.info("[names] register start",{name:o,buyer:m,chainId:f,provider:l}),h("preparing");try{const p=await gt(f),b=rn(p);console.info("[names] step 1/6 sized reservation",{usdCents:b,manaRate:p});const C=await an(r,o,{chainId:f,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 w=await bt(r,b,void 0,void 0,o);if(c=w.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:w.credit.id,maxCreditedValue:w.maxCreditedValue}),je.from(w.maxCreditedValue).lt(Z))throw new Error("Credit under-sized for the name price");h("awaiting-confirmation");const $=ln(w.credit,C);let v;try{v=await Ht({chainId:f,buyer:m,signer:d,args:$})}catch(x){if(!(x instanceof Ot))throw x;if(x.reason==="relayer-unreachable"){g="unobservable";const k=new $e;throw k.cause=x,k}v=await qt(f,$,d)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:v}),h("confirming"),await Dt(v),g="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:v}),l==="across"){h("registering");const x=await cn(v,s.acrossPoll);if(console.info("[names] step 6/6 across status",x),x.status==="pending")return{status:"pending",originTxHash:v};if(x.status==="filled"&&x.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:v}),{status:"pending",originTxHash:v};if(x.status!=="filled"||x.actionsSucceeded!==!0)throw new Ce;return{status:"registered",originTxHash:v,destinationTxHash:x.destinationTxHash}}return{status:"pending",originTxHash:v}}catch(p){if(console.error("[names] register failed — raw error:",p,{name:o,buyer:m,originState:g}),p instanceof Gt)return{status:"pending",originTxHash:p.txHash};if(c&&g==="unconfirmed"&&await yt(r,[c]).catch(()=>{}),p instanceof ke||p instanceof Ce||p instanceof $e)throw p;const b=new Error(Zt(p,"Couldn't register the name. Please try again.",{sale:!0}));throw b.cause=p,b}}function hn(){const{data:s}=jt({queryKey:["feature-flag","shop-names"],queryFn:()=>Ct($t.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return s===!0}const pn=60,un=700,fn=25;function mn(s){if(!s)return[];const o=[];for(let r=1;r<=s.length;r++)o.push({text:s.slice(0,r),delay:pn});o[o.length-1]={text:s,delay:un};for(let r=s.length-1;r>=1;r--)o.push({text:s.slice(0,r),delay:fn});return o}function xn(s){return s.flatMap(mn)}function gn(s,o){const r=u.useMemo(()=>xn(s),[s]),[d,h]=u.useState(0);return u.useEffect(()=>{if(!o||r.length===0)return;const f=setTimeout(()=>h(l=>(l+1)%r.length),r[d%r.length].delay);return()=>clearTimeout(f)},[d,o,r]),!o||r.length===0?"":r[d%r.length].text}const bn="https://cdn.decentraland.org/@dcl/shop/1.11.3-33096177368.commit-6f0f3de/_assets/name-verified-oGwQ3ntb.svg",yn="#34fee6",wn=i.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -458,7 +458,7 @@ import{r as u,b as He,j as e,u as et}from"./react-Io5Wove7.js";import{u as tt,s
|
|
|
458
458
|
color: ${t.colors.accent};
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
`;function Gn({name:s,priceCredits:o,onClose:r}){const{session:d}=Oe(),{data:h,isError:f}=kt(d),l=St(),m=He(),[c,g]=u.useState("confirm"),[p,b]=u.useState(""),[C,w]=u.useState(null),[$,v]=u.useState(!1),[x,k]=u.useState("preparing"),L=u.useRef(!1),T=p.trim().toLowerCase()===s.toLowerCase(),N=c==="completing",M=o!=null?ve(o):"—",B=o==null,W=h==null?void 0:h.credits,P=o!=null&&W!=null?o-W:0,S=P>0,F=B?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:ve(P)}):null;u.useEffect(()=>{const y=G=>{G.key==="Escape"&&!N&&r()};document.addEventListener("keydown",y);const D=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=D}},[N,r]);async function R(){if(!(!d||!T||B||S||L.current)){L.current=!0,g("completing"),w(null),k("preparing");try{const y=await dn({name:s,identity:d.identity,signer:d.signer,onProgress:k});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Le(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:Le(o??0),transaction_hash:y.originTxHash??null,settlement:y.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),g(y.status==="registered"?"success":"pending")}catch(y){oe(_t(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Rt(y),purchase_type:"name"});const D=y instanceof Ce,G=y instanceof $e;w(y instanceof ke?n("names.errorRouteCost"):D?n("names.errorNotRegistered"):G?n("names.errorSettlementUnknown"):(y==null?void 0:y.message)||n("names.errorGeneric")),v(D||G),g("error")}finally{L.current=!1}}}const _=c!=="success"&&c!=="pending",j=Et(d==null?void 0:d.providerType),A=j?2:1,z=j&&(x==="preparing"||x==="awaiting-confirmation"),I=z?1:A,ae=z?n("names.confirming"):n("names.completing"),U=x==="registering"?n("names.processingRegistering"):null;return e.jsx(wn,{onClick:N?void 0:r,role:"presentation",children:e.jsxs(vn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[_&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(he,{onClick:r,disabled:N,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),$?e.jsx(ye,{onClick:r,children:n("names.errorSpentDismiss")}):e.jsx(ye,{onClick:()=>g("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Sn,{children:[e.jsx(En,{children:n("names.confirmTitle")}),e.jsx(Tn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${qn(s)}</b>`})}}),e.jsxs(Rn,{children:[e.jsx(_n,{"aria-hidden":!0,children:"@"}),e.jsx(In,{value:p,onChange:y=>b(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(p.length,8)}ch`}}),e.jsx(Ln,{children:".dcl.eth"})]})]}),F?e.jsxs(we,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:F})]}):null,e.jsx(ye,{onClick:()=>void R(),disabled:!T||!d||B||S,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Nn,{children:[e.jsx(An,{src:Tt,alt:"",width:61,height:61}),e.jsxs(zn,{children:[e.jsx(Mn,{children:ae}),e.jsxs(Bn,{children:[e.jsx(Pn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(Fn,{"data-testid":"name-progress-count",children:`${I}/${A}`})]}),U?e.jsx(Wn,{children:U}):null]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.pendingHeaderTitle")}),e.jsx(he,{onClick:r,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{}),e.jsxs(we,{"data-tone":"info",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),e.jsx(We,{children:e.jsx(Be,{onClick:()=>{r(),m("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.successHeaderTitle")}),e.jsx(he,{onClick:r,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{}),e.jsxs(Un,{children:[e.jsx(Hn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(On,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsxs(jn,{"data-testid":"name-success-tile",children:[e.jsx(Cn,{src:Jt,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs($n,{children:[e.jsx("span",{"aria-hidden":!0,children:s}),e.jsx(kn,{src:bn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),e.jsxs(We,{children:[e.jsx(Be,{onClick:()=>{r(),m("/my-items")},children:n("names.myItems")}),e.jsx(Dn,{href:V.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function qn(s){return s.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const Vn="https://cdn.decentraland.org/@dcl/shop/1.11.2/_assets/identity-icon-C8yAW_Gq.svg",Zn="https://cdn.decentraland.org/@dcl/shop/1.11.2/_assets/world-icon-6xQ-PmmW.svg",Qn="https://cdn.decentraland.org/@dcl/shop/1.11.2/_assets/invite-icon-Bz6lCTuB.svg",Kn="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",Jn=i.div`
|
|
461
|
+
`;function Gn({name:s,priceCredits:o,onClose:r}){const{session:d}=Oe(),{data:h,isError:f}=kt(d),l=St(),m=He(),[c,g]=u.useState("confirm"),[p,b]=u.useState(""),[C,w]=u.useState(null),[$,v]=u.useState(!1),[x,k]=u.useState("preparing"),L=u.useRef(!1),T=p.trim().toLowerCase()===s.toLowerCase(),N=c==="completing",M=o!=null?ve(o):"—",B=o==null,W=h==null?void 0:h.credits,P=o!=null&&W!=null?o-W:0,S=P>0,F=B?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:ve(P)}):null;u.useEffect(()=>{const y=G=>{G.key==="Escape"&&!N&&r()};document.addEventListener("keydown",y);const D=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=D}},[N,r]);async function R(){if(!(!d||!T||B||S||L.current)){L.current=!0,g("completing"),w(null),k("preparing");try{const y=await dn({name:s,identity:d.identity,signer:d.signer,onProgress:k});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Le(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:Le(o??0),transaction_hash:y.originTxHash??null,settlement:y.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),g(y.status==="registered"?"success":"pending")}catch(y){oe(_t(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Rt(y),purchase_type:"name"});const D=y instanceof Ce,G=y instanceof $e;w(y instanceof ke?n("names.errorRouteCost"):D?n("names.errorNotRegistered"):G?n("names.errorSettlementUnknown"):(y==null?void 0:y.message)||n("names.errorGeneric")),v(D||G),g("error")}finally{L.current=!1}}}const _=c!=="success"&&c!=="pending",j=Et(d==null?void 0:d.providerType),A=j?2:1,z=j&&(x==="preparing"||x==="awaiting-confirmation"),I=z?1:A,ae=z?n("names.confirming"):n("names.completing"),U=x==="registering"?n("names.processingRegistering"):null;return e.jsx(wn,{onClick:N?void 0:r,role:"presentation",children:e.jsxs(vn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[_&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(he,{onClick:r,disabled:N,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),$?e.jsx(ye,{onClick:r,children:n("names.errorSpentDismiss")}):e.jsx(ye,{onClick:()=>g("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Sn,{children:[e.jsx(En,{children:n("names.confirmTitle")}),e.jsx(Tn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${qn(s)}</b>`})}}),e.jsxs(Rn,{children:[e.jsx(_n,{"aria-hidden":!0,children:"@"}),e.jsx(In,{value:p,onChange:y=>b(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(p.length,8)}ch`}}),e.jsx(Ln,{children:".dcl.eth"})]})]}),F?e.jsxs(we,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:F})]}):null,e.jsx(ye,{onClick:()=>void R(),disabled:!T||!d||B||S,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Nn,{children:[e.jsx(An,{src:Tt,alt:"",width:61,height:61}),e.jsxs(zn,{children:[e.jsx(Mn,{children:ae}),e.jsxs(Bn,{children:[e.jsx(Pn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(Fn,{"data-testid":"name-progress-count",children:`${I}/${A}`})]}),U?e.jsx(Wn,{children:U}):null]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.pendingHeaderTitle")}),e.jsx(he,{onClick:r,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{}),e.jsxs(we,{"data-tone":"info",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),e.jsx(We,{children:e.jsx(Be,{onClick:()=>{r(),m("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.successHeaderTitle")}),e.jsx(he,{onClick:r,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{}),e.jsxs(Un,{children:[e.jsx(Hn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(On,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsxs(jn,{"data-testid":"name-success-tile",children:[e.jsx(Cn,{src:Jt,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs($n,{children:[e.jsx("span",{"aria-hidden":!0,children:s}),e.jsx(kn,{src:bn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),e.jsxs(We,{children:[e.jsx(Be,{onClick:()=>{r(),m("/my-items")},children:n("names.myItems")}),e.jsx(Dn,{href:V.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function qn(s){return s.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const Vn="https://cdn.decentraland.org/@dcl/shop/1.11.3-33096177368.commit-6f0f3de/_assets/identity-icon-C8yAW_Gq.svg",Zn="https://cdn.decentraland.org/@dcl/shop/1.11.3-33096177368.commit-6f0f3de/_assets/world-icon-6xQ-PmmW.svg",Qn="https://cdn.decentraland.org/@dcl/shop/1.11.3-33096177368.commit-6f0f3de/_assets/invite-icon-Bz6lCTuB.svg",Kn="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",Jn=i.div`
|
|
462
462
|
width: 100%;
|
|
463
463
|
min-width: 0;
|
|
464
464
|
`,Xn=i.nav`
|
|
@@ -935,4 +935,4 @@ import{r as u,b as He,j as e,u as et}from"./react-Io5Wove7.js";import{u as tt,s
|
|
|
935
935
|
color: ${t.colors.err};
|
|
936
936
|
}
|
|
937
937
|
`,Ue=48,Ls=["all","on_sale","not_for_sale"];function Ys(){const[s]=et(),o=He(),r=(s.get("q")??"").trim().toLowerCase(),d=(s.get("q")??"").trim();De({title:d?n("seo.collectibles.searchTitle",{query:d}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=u.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[f,l]=tt(h),{subCategory:m,rarities:c,priceMin:g,priceMax:p,smart:b,sort:C}=f,w=f.category,$=Ls.includes(f.status)?f.status:"on_sale";st(`${w}:${m??""}`);const[v,x]=u.useState(!1);u.useEffect(()=>{if(!v)return;const a=K=>{K.key==="Escape"&&x(!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}},[v]);const k=$==="on_sale",L=g&&!Number.isNaN(Number(g))?Number(g):void 0,T=p&&!Number.isNaN(Number(p))?Number(p):void 0,N=It(),M=m?Pt[m]:void 0,B=(Ie.find(a=>a.key===C)??Ie[0]).server,W={category:w,rarities:c.length?c:void 0,wearableCategories:M,minPriceCredits:L,maxPriceCredits:T,search:r||void 0,sortBy:B,isSmart:b||void 0,onSale:!0,listingType:N?void 0:"primary"},P={category:w,rarities:c.length?c:void 0,wearableCategories:M,search:r||void 0,sortBy:B,isWearableSmart:b||void 0,isOnSale:$==="not_for_sale"?!1:void 0},{items:S,total:F,isLoading:R,isPlaceholderData:_,error:j,hasNextPage:A,isFetchingNextPage:z,isFetchNextPageError:I,fetchNextPage:ae}=Wt(k?["shop-items",W]:["catalog-items",P],a=>k?At({...W,first:Ue,skip:a}):zt({...P,first:Ue,skip:a}),{enabled:w!=="names"}),U=F,{data:y,isError:D,isPending:G}=Ge(),Ke=a=>y&&a.manaWei?qe(a.manaWei,y):null,Je=k&&G&&S.some(a=>a.source==="legacy"),Se=R||_||Je,Xe=R?15:Math.max(S.length,1),Ee=u.useRef(null);u.useEffect(()=>{R||_||!r||Ee.current===r||(Ee.current=r,oe("Shop Searched",{query:r,result_count:U}))},[r,R,_,U]);const Q=u.useRef("__init__");u.useEffect(()=>{if(R||_)return;const a=JSON.stringify({category:w,subCategory:m,rarities:c,min:L,max:T,sort:C,status:$,smart:b});if(Q.current==="__init__"||Q.current===a){Q.current=a;return}Q.current=a,oe("Shop Applied Filter",{filters:{category:w,sub_category:m,rarities:c,min_price_credits:L??null,max_price_credits:T??null,status:$,smart:b,sort:C},result_count:U})},[w,m,c,L,T,C,$,b,R,_,U]);function Te(a){l({category:a,subCategory:null})}function Re(a){l({status:a})}function _e(a){l({rarities:c.includes(a)?c.filter(H=>H!==a):[...c,a]})}function Ye(){l(h)}const q=[];(L!=null||T!=null)&&q.push({key:"price",label:n("filter.price"),onRemove:()=>{l({priceMin:"",priceMax:""})}});for(const a of it)c.includes(a)&&q.push({key:`rarity-${a}`,label:Lt(a),onRemove:()=>_e(a)});return b&&q.push({key:"smart",label:n("filter.smart"),onRemove:()=>l({smart:!1})}),$!=="on_sale"&&q.push({key:"status",label:$==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Re("on_sale")}),e.jsxs(ot,{"data-testid":"browse",children:[w!=="names"&&e.jsxs(e.Fragment,{children:[v?e.jsx(rt,{onClick:()=>x(!1),"aria-hidden":!0}):null,e.jsxs(at,{"data-open":v||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(lt,{children:[e.jsx(ct,{children:n("assets.filters")}),e.jsx(dt,{onClick:()=>x(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(ht,{children:e.jsx(pt,{category:w,subCategory:m,onCategory:Te,onSub:a=>l({subCategory:a}),priceMin:g,priceMax:p,onPriceMin:a=>l({priceMin:a}),onPriceMax:a=>l({priceMax:a}),rarities:c,onToggleRarity:_e,status:$,onStatus:Re,smart:b,onSmart:a=>l({smart:a})})}),e.jsx(ut,{children:e.jsx(ft,{type:"button",onClick:()=>x(!1),children:n("assets.showItems")})})]})]}),e.jsx(mt,{children:w==="names"?e.jsx(_s,{onBack:()=>Te("all")}):e.jsxs(e.Fragment,{children:[e.jsx(xt,{sort:C,onSort:a=>l({sort:a}),total:F,loading:R||_,query:r,onOpenFilters:()=>x(!0),chips:q,onClearChips:Ye}),D&&k&&S.some(a=>a.source==="legacy")?e.jsx(Is,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,j?e.jsx(Ft,{message:n("assets.loadError"),testId:"browse-error"}):null,!Se&&S.length===0&&!j?e.jsx(Nt,{testId:"browse-empty",icon:nt,title:n("assets.empty.title"),body:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters"),cta:{label:n("assets.empty.cta"),onClick:()=>o("/overview")}}):e.jsxs(e.Fragment,{children:[e.jsx(Xt,{"data-testid":"grid",children:Se?e.jsx(Ne,{count:Xe}):e.jsxs(e.Fragment,{children:[S.map(a=>{if(!k)return e.jsx(J,{item:a,mode:"view"},X(a));const H=a;if(H.source!=="legacy")return e.jsx(J,{item:a},X(a));const K=Ke(H);return K==null?e.jsx(J,{item:a,mode:"view"},X(a)):e.jsx(J,{item:{...H,priceCredits:K}},X(a))}),z?e.jsx(Ne,{count:6}):null]})}),e.jsx(Mt,{hasNextPage:A,isFetching:z,isError:I,onLoadMore:()=>void ae()})]})]})})]})}export{Ys as Assets};
|
|
938
|
-
//# sourceMappingURL=Assets-
|
|
938
|
+
//# sourceMappingURL=Assets-R174CnUb.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as W,r as P}from"./react-
|
|
1
|
+
import{j as e,L as W,r as P}from"./react-Cu6RTeaf.js";import{t as o,s as n,B,m as R,n as F,b as i,o as G,p as O,I as z,q as K,l as w,r as Q,c as H,v as X,w as A,h as Z,x as J,y as I}from"./index-DtHHdoPj.js";import{a as U,b as V,c as Y,d as tt,s as et,e as it}from"./authorizations-r_yIs4_S.js";import{f as ot}from"./builder-C7euKgzs.js";import{m as at}from"./mana-matic-CEqvSwrJ.js";import{f as nt}from"./errors-V6zhnTod.js";import"./dcl-schemas-D3MMsa96.js";import"./sentry-BIexM3hF.js";import"./ethers-CFmosx3s.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-CqnRe296.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]="c2ec6301-beed-4385-8d18-7f5357a4a2c4",t._sentryDebugIdIdentifier="sentry-dbid-c2ec6301-beed-4385-8d18-7f5357a4a2c4")}catch{}})();const st=R`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,rt=R`
|
|
4
4
|
to { background-position: -200% 0; }
|
|
@@ -189,4 +189,4 @@ import{j as e,L as W,r as P}from"./react-Io5Wove7.js";import{t as o,s as n,B,m a
|
|
|
189
189
|
`,M=n(B)`
|
|
190
190
|
margin-top: 12px;
|
|
191
191
|
`;function j({descriptor:t,owner:s,signer:r,name:a,description:c,image:l,icon:p}){const v=Q(),[h,y]=P.useState(!1),{data:u,isLoading:g,refetch:d}=w({queryKey:["authorization",t.id,s],queryFn:()=>it(t,s),staleTime:3e4});async function m(){if(h||g)return;const b=!u;y(!0);try{await et({auth:t,signer:r,active:b}),await d(),v.setQueryData(["authorization",t.id,s],b),A.success(b?i("authorizations.toastActivated",{name:a}):i("authorizations.toastDeactivated",{name:a}))}catch(C){Z(C,{flow:"authorizations",step:b?"grant":"revoke"}),A.error(nt(C,i("authorizations.errorGeneric")))}finally{y(!1)}}const N=g?i("authorizations.checking"):u?i("authorizations.active"):i("authorizations.inactive");return e.jsxs(ht,{"data-testid":`authorization-${t.id}`,"data-active":!!u,children:[e.jsx(gt,{children:l?e.jsx("img",{src:l,alt:""}):p}),e.jsxs(mt,{children:[e.jsx(ft,{title:a,children:a}),e.jsx(xt,{children:c})]}),e.jsxs(bt,{children:[e.jsx(yt,{"data-active":!!u,children:N}),h?e.jsx(jt,{"aria-label":i("authorizations.working")}):e.jsx(zt,{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:g,onClick:()=>void m()})]})]})}const x=500,q=10,vt=x*q;async function _(t,s){const r=await I(t,{category:s,first:x}),a=Math.min(Math.ceil(r.total/x),q),c=await Promise.all(Array.from({length:Math.max(0,a-1)},(l,p)=>I(t,{category:s,first:x,skip:(p+1)*x})));return{assets:[...r.assets,...c.flatMap(l=>l.assets)],truncated:r.total>vt}}function kt(t){return w({queryKey:["owned-collections",t],enabled:!!t,staleTime:6e4,queryFn:async()=>{const[s,r]=await Promise.all([_(t,"wearable"),_(t,"emote")]),a=new Map;for(const c of[...s.assets,...r.assets]){const l=c.contractAddress.toLowerCase();a.has(l)||a.set(l,c)}return{collections:[...a.values()],truncated:s.truncated||r.truncated,scanned:s.assets.length+r.assets.length}}})}function $t(t){return w({queryKey:["contract-registry"],enabled:t,staleTime:1/0,gcTime:1/0,queryFn:J})}function Ct(t,s){const r=s==null?void 0:s.get(t.toLowerCase());if(r)return r;const a=X(t);return a===t?i("authorizations.collectionFallback"):a}function At(t,s){return w({queryKey:["creator-collections",t],enabled:!!t&&!!s,staleTime:6e4,queryFn:async()=>{const r=await ot(t,s),a=new Map;for(const c of r){const l=c.contractAddress.toLowerCase();a.has(l)||a.set(l,c)}return[...a.values()]}})}function Wt(){F({title:i("authorizations.title"),noindex:!0});const{session:t,signIn:s}=G(),r=H.chainId,a=O(t==null?void 0:t.providerType),{data:c,isLoading:l}=kt(a?t==null?void 0:t.address:void 0),{data:p,isLoading:v}=$t(!!a&&!!(t!=null&&t.address)),{data:h,isLoading:y}=At(a?t==null?void 0:t.address:void 0,a?t==null?void 0:t.identity:void 0);if(!t)return e.jsxs(D,{children:[e.jsx(z,{name:"info",size:40,color:o.colors.muted2}),e.jsx(S,{children:i("authorizations.signInTitle")}),e.jsx(L,{children:i("authorizations.signInBody")}),e.jsx(M,{variant:"white",onClick:()=>s(),children:i("storeSettings.signIn")})]});if(!a)return e.jsxs(D,{children:[e.jsx(z,{name:"check",size:40,color:o.colors.ok}),e.jsx(S,{children:i("authorizations.managedTitle")}),e.jsx(L,{children:i("authorizations.managedBody")}),e.jsx(M,{as:W,to:"/items",variant:"white",children:i("authorizations.managedCta")})]});const u=U(r),g=V(r);return e.jsxs(ct,{children:[e.jsxs(lt,{children:[e.jsx(dt,{children:i("authorizations.title")}),e.jsx(ut,{children:i("authorizations.intro")})]}),e.jsxs(k,{children:[e.jsx($,{children:i("authorizations.buyingTitle")}),e.jsxs(f,{children:[e.jsx(j,{descriptor:u,owner:t.address,signer:t.signer,name:i("authorizations.creditsName"),description:i("authorizations.creditsDesc"),icon:e.jsx(K,{className:"ccy-mark"})}),e.jsx(j,{descriptor:g,owner:t.address,signer:t.signer,name:i("authorizations.manaName"),description:i("authorizations.manaDesc"),icon:e.jsx(pt,{src:at,alt:"","aria-hidden":!0})})]})]}),e.jsxs(k,{children:[e.jsx($,{children:i("authorizations.sellingTitle")}),c!=null&&c.truncated?e.jsx(wt,{"data-testid":"authorizations-selling-truncated",children:i("authorizations.sellingTruncated",{count:c.scanned})}):null,l||v?e.jsx(f,{"aria-busy":"true","aria-label":i("authorizations.checking"),children:Array.from({length:3}).map((d,m)=>e.jsx(E,{"aria-hidden":!0},m))}):c&&c.collections.length>0?e.jsx(f,{children:c.collections.map(d=>e.jsx(j,{descriptor:Y(d.contractAddress,r),owner:t.address,signer:t.signer,name:Ct(d.contractAddress,p),description:i("authorizations.sellingDesc"),image:d.image,icon:e.jsx(z,{name:"pen",size:18})},d.contractAddress))}):e.jsx(T,{children:i("authorizations.sellingEmpty")})]}),e.jsxs(k,{children:[e.jsx($,{children:i("authorizations.mintingTitle")}),y?e.jsx(f,{"aria-busy":"true","aria-label":i("authorizations.checking"),children:Array.from({length:3}).map((d,m)=>e.jsx(E,{"aria-hidden":!0},m))}):h&&h.length>0?e.jsx(f,{children:h.map(d=>e.jsx(j,{descriptor:tt(d.contractAddress,r),owner:t.address,signer:t.signer,name:d.name||i("authorizations.collectionFallback"),description:i("authorizations.mintingDesc"),icon:e.jsx(z,{name:"pen",size:18})},d.contractAddress))}):e.jsx(T,{children:i("authorizations.mintingEmpty")})]})]})}export{Wt as Authorizations};
|
|
192
|
-
//# sourceMappingURL=Authorizations-
|
|
192
|
+
//# sourceMappingURL=Authorizations-BpQ-lzdP.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as Ut,r as T,b as fa,a as ma}from"./react-
|
|
1
|
+
import{j as e,L as Ut,r as T,b as fa,a as ma}from"./react-Cu6RTeaf.js";import{s as i,t as E,b as a,q as Ie,E as ae,bc as Fe,C as Me,bd as ya,D as Le,be as ba,z as va,I as Y,A as Xe,n as wa,ab as O,H as jt,o as Ca,V as ja,l as ka,bf as $a,r as Sa,bg as Ma,J as Ta,bh as Ia,bi as kt,L as Pa,bj as Aa,bk as za,bl as Ea,ao as Ke,p as Ra,bm as $t,ad as V,bn as St,bo as Ba,h as re,R as qa,c as Mt,bp as _a,bq as Wa,br as Ne,W as Fa,bs as we,bt as Ce,bu as Tt,bv as La,g as It,f as Pt,bw as Ka}from"./index-DtHHdoPj.js";import{m as Te,M as Na,S as Qa,C as Ua,H as Ga,a as Ha,T as Oa,X as Da,b as Va,B as Ya,c as Ja,d as At,e as Xa,f as Pe,g as Za,h as es,i as ts,j as as,k as Je,l as pe,L as ss,P as ns,n as zt,o as Et,W as is,p as rs,q as os,r as cs,A as ls,s as ds,t as us,u as hs,v as ps,w as gs,x as xs,y as fs,z as ms,D as ys,E as bs,F as vs,G as ws,I as Cs,J as js,K as ks,N as $s,O as Qe,Q as Ss,R as Ms,U as Ts,V as Rt,Y as Bt,Z as Is,_ as Ps,$ as As,a0 as zs,a1 as qt,a2 as Es}from"./CollectionCarousel-Cwf724uA.js";import{k as Rs,l as Bs,e as qs,n as _s,f as Ws,A as Fs}from"./authorizations-r_yIs4_S.js";import{p as _t,g as Ls,h as Ue}from"./buy-BBspDwaD.js";import{w as Ks,S as Ge,b as Ns,G as Qs}from"./buy-gasless-CDHGUFyR.js";import{u as Us,M as Gs,R as je,r as Hs,c as Os,g as Ds,a as Vs,p as Wt,b as He}from"./useCreditPacks-DV8TpCkV.js";import{i as Ys,a as Js}from"./errors-V6zhnTod.js";import{E as Xs}from"./ErrorNotice-DGpmSHFq.js";import"./dcl-schemas-D3MMsa96.js";import"./sentry-BIexM3hF.js";import"./ethers-CFmosx3s.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-CqnRe296.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]="114aeeec-407a-4490-a588-1fdc1dc08445",r._sentryDebugIdIdentifier="sentry-dbid-114aeeec-407a-4490-a588-1fdc1dc08445")}catch{}})();const Zs=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 Ut,r as T,b as fa,a as ma}from"./react-Io5Wove7.js";import{s
|
|
|
745
745
|
margin-top: 0;
|
|
746
746
|
}
|
|
747
747
|
`;function Ve(r){if(Ys(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 si=12e4;function ni(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 bi(){var Ct;wa({title:a("nav.cart"),noindex:!0});const r=O(t=>t.items),d=O(t=>t.remove),k=O(t=>t.increment),$=O(t=>t.decrement),R=O(t=>t.clear),U=O(t=>t.restore),H=O(t=>t.setFittingOpen),A=jt(t=>t.items),J=jt(t=>t.toggle),{session:n,signIn:G}=Ca(),Jt=ja(),ge=Us().packs.slice(0,Gs);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Xt=r.some(t=>t.category!=="emote"),{data:Ae}=ka({queryKey:["upsell-listings"],queryFn:()=>Ka({first:40}),staleTime:6e4}),{data:j}=$a(n),b=Sa(),X=fa(),{state:B}=ma(),[Zt,le]=T.useState(null),[Ze,xe]=T.useState(null),[ea,q]=T.useState(!1),[_,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=Ia(r),st=t=>$t(at[t.id]),Ee=r.filter(st),nt=r.length>0&&Ee.length===0,ta=Ee.reduce((t,s)=>t+s.priceCredits*s.quantity,0),aa=r.reduce((t,s)=>t+s.quantity,0),sa=Ee.reduce((t,s)=>t+s.quantity,0),it=_?_.liveTotalCredits:ta,na=new Set(r.map(t=>t.id)),rt=((Ae==null?void 0:Ae.items)??[]).filter(t=>!na.has(t.id)).slice(0,12),ia=new Map(_==null?void 0:_.buyable.map(t=>[t.item.id,t])),me=(j==null?void 0:j.credits)??0,Re=it*10,ra=de?kt(Re,de):0n,Be=Qe({priceCents:Re,priceManaWei:ra,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n}),oa=t=>t.flatMap(s=>{const c=He(s);return c.kind==="store"?[c.mint]:[]}),ca=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),la=Ba,da=t=>_a(t.contractAddress,String(t.itemId));function ye(t){t(),D(null),xe(null),le(null)}function ua(){S(null),q(!1)}function ot(t){const s=Ye(t),c=Math.max(0,s-me),o=ge.find(u=>u.credits>=c)??ge[ge.length-1];tt(o.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:me,shortfall:c}),S({phase:"nofunds",lines:t.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:c}),q(!1)}async function qe(t){if(!n||t.length===0)return;const s=Se(t),c=s.map(m=>({...m.item,priceCredits:m.priceCredits})),o=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=Ds(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 Wa(n.identity,p.units.map(Vs));p.units.forEach((Q,ie)=>{u.push({salt:f.id,itemId:Q.item.id}),m.push({...p.drafts[ie],credits:[f],maxCreditedValue:y})}),K+=p.units.length}catch(f){if(Js(f)){if(u.length){try{await Ne(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 N=Ls(m).length,te=p=>N>1?{current:p,total:N}:void 0,F=(p,f)=>S({phase:"processing",stage:p,step:s.length,total:s.length,signatures:te(f)}),C=p=>p<N?F("awaiting-signature",p+1):F("settling",N);F("awaiting-signature",1);let x=[];const I=new Map,se=async p=>{const f=await Promise.allSettled(p.map(y=>Ks(y)));return f.forEach((y,Q)=>{const ie=I.get(p[Q])??[];y.status==="fulfilled"?(ie.forEach(We=>M.add(We)),W.push(p[Q])):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,N)),onBroadcast:({txHash:y,salts:Q})=>{p+=1,I.set(y,Q),Q.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([...I.keys()]),p;if(!(p instanceof Qs)||!Fa(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(Q=>M.add(Q)),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(c),payment_type:"credits",no_crypto_step:w,transaction_hash:x[0]??null}),Bt(b);const ve=ue.current;ue.current=null,S(null),q(!1);const ne={items:o,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:N}=Wt({reservations:u,spent:z,settled:M}),te=[...z].some(x=>!M.has(x)),F=c.filter(x=>N.includes(x.id)),C=c.filter(x=>!N.includes(x.id));if(V(Ce(m)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:v,error_code:Tt(m),value_usd:St(C.reduce((x,I)=>x+I.priceCredits,0)),cart_size:s.length,partial:F.length>0}),K.length)try{await Ne(n.identity,K)}catch(x){re(x,{flow:"cart_checkout",step:"release"})}if(b.invalidateQueries({queryKey:["usd-balance"]}),F.length>0){N.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}),q(!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 c=ue.current;ue.current=null,S(null),q(!1);const o={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...c?{creditsAdded:c}:{}};X("/success",{state:o,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:Tt(t)}),S({phase:"error",message:Ve(t)}),q(!1)}async function ha(t,s,c){const o=It(Pt.MANAToken,s),u=It(Pt.CreditsManager,s);await Ws({auth:{kind:Fs.Allowance,contractAddress:o.address,spenderAddress:u.address,chainId:s},signer:t,requiredWei:c})}async function dt(){if(de)return de;try{return await b.fetchQuery({queryKey:["mana-rate",Mt.chainId],queryFn:()=>qa(Mt.chainId),staleTime:6e4})}catch{return}}async function pa(t){const s=Se(t).reduce((v,g)=>v+g.usdCents,0),o=(fe??0n)>0n?await dt():de,u=o?kt(s,o):0n;return{totalCents:s,manaWei:u}}async function ut(t,s){const c=Ye(t),{totalCents:o,manaWei:u}=await pa(t),v=Qe({priceCents:o,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"){qe(t);return}const g=xt(v,s);await pt(ht(s,t),g,()=>s==="mana"?void ft(t,g):void mt(t,o,u));return}if(v.options.some(g=>g.method==="mana"||g.method==="combined")){S({phase:"choose",lines:t,totalCents:o,manaWei:u}),q(!1);return}if(j!=null&&j.credits<c){ot(t);return}qe(t)}function _e(t){return Qe({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 c=new Map;for(const o of s){const u=Is(t,He(o));c.set(`${u.chainId}:${u.spender.toLowerCase()}`,u)}return[...c.values()]}async function pt(t,s,c){const o=[];for(const{spender:u,chainId:v}of t){const g=Bs(v,u),M=n?await qs(g,n.address,s).catch(()=>!0):!0;_s(n==null?void 0:n.providerType,M)&&o.push(g)}if(o.length===0){c();return}q(!1),gt(o,0,c)}function gt(t,s,c){be({auth:t[s],index:s+1,total:t.length,run:()=>s+1<t.length?gt(t,s+1,c):c()})}function xt(t,s){var c;return((c=t.options.find(o=>o.method===s))==null?void 0:c.manaWei)??0n}function ga(t){if((h==null?void 0:h.phase)!=="choose")return;const{lines:s,totalCents:c,manaWei:o}=h;if(t==="credits"){qe(s);return}const u=xt(_e(h),t);pt(ht(t,s),u,()=>t==="mana"?void ft(s,u):void mt(s,c,o))}async function ft(t,s){if(!n||t.length===0)return;const c=Se(t),o=c.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:c.length,total:c.length});S({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});try{const g=await Ps({trades:ca(c),mints:oa(c),buyer:n.address,signer:n.signer,onSigned:v,manaWei:s});t.forEach(M=>d(M.item.id)),D(null),V("Shop Completed Purchase",{...we(o),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,c){if(!n||t.length===0)return;const o=Se(t),u=o.map(w=>({...w.item,priceCredits:w.priceCredits})),v=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),g=As(o.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:o.length});try{const w=o.map(He),m=[],z=new Map,K=new Map;for(let C=0;C<o.length;C++){const x=o[C],I=w[C],se=g[C],ve=zs(Math.max(0,x.usdCents-se),s,c);let ne;if(se<=0)ne=qt(I,[],"0");else{S({phase:"processing",stage:"reserving",step:C+1,total:o.length});const f=x.item,{credit:y,maxCreditedValue:Q}=await La(n.identity,se,I.kind==="trade"?I.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=qt(I,[y],Q)}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 I=K.get(C);I==null||x<=0n||(m[I]={...m[I],maxCreditedValue:(BigInt(m[I].maxCreditedValue)+x).toString()})}const N=[...z.values()].reduce((C,x)=>C+x,0n);await ha(n.signer,Es(w[0]),N);const te=()=>S({phase:"processing",stage:"settling",step:o.length,total:o.length});S({phase:"processing",stage:"awaiting-signature",step:o.length,total:o.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}=Wt({reservations:M,spent:new Set([...L].filter(z=>!W.has(z))),settled:new Set});m.length&&Ne(n.identity,m).catch(()=>{}),M.length&&b.invalidateQueries({queryKey:["usd-balance"]}),lt(w,"buy_cart_combined")}}async function Z(t){if(!n){Rt({type:"cart-checkout"}),G();return}const s=O.getState().items.filter(st);if(s.length===0)return;le(null),xe(null),q(!0);const c=s.reduce((o,u)=>o+u.priceCredits*u.quantity,0);V("Shop Started Checkout",{checkout_source:"cart",cart_size:s.length,cart_value_credits:c,cart_value_usd:St(c),has_sufficient_credits:me>=c});try{const o=await Hs(s,n.address,la,await dt(),da),u=[...o.unavailable,...o.own];if(u.length&&(u.forEach(v=>d(v.id)),xe(ni(o))),o.buyable.length===0){le(a("cart.error.noneAvailable")),D(null);return}if(o.orderChanged){D(o),et.current=Date.now();return}await ut(o.buyable,t)}catch(o){re(o,{flow:"cart_checkout",step:"review",cart_size:s.length}),le(Ve(o))}finally{q(!1)}}async function yt(){if(_){if(!n){Rt({type:"cart-checkout"}),G();return}if(Date.now()-et.current>si){D(null),xe(null),await Z();return}le(null),ut(_.buyable)}}async function xa(){if(ze){try{sessionStorage.setItem(je,JSON.stringify(O.getState().items))}catch{}q(!0);try{const t=await Os(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{q(!1)}}}const bt=T.useRef(!1);T.useEffect(()=>{if(!n||bt.current||!Ss("cart-checkout"))return;bt.current=!0;const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[n]);const vt=T.useRef(!1);T.useEffect(()=>{if(!(B!=null&&B.resumeCheckout)||vt.current)return;vt.current=!0,ue.current=B.creditsAdded??null;try{const s=sessionStorage.getItem(je);if(s){sessionStorage.removeItem(je);const c=JSON.parse(s);Array.isArray(c)&&c.length&&U(c)}}catch{}b.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[B==null?void 0:B.resumeCheckout]);const wt=T.useRef(!1);T.useEffect(()=>{if(!(B!=null&&B.startCheckout)||wt.current)return;wt.current=!0,X(".",{replace:!0,state:null});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[B==null?void 0:B.startCheckout]);const ee=ea||(h==null?void 0:h.phase)==="processing";return r.length===0&&!h?e.jsx(Lt,{children:e.jsxs(Nt,{children:[e.jsxs(Kt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsx(bn,{children:e.jsx(Pa,{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(Lt,{children:[e.jsxs(Nt,{children:[e.jsxs(Kt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(xn,{children:[e.jsxs(fn,{children:[e.jsxs(mn,{children:[e.jsx(vn,{onClick:()=>X(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(Y,{name:"arrow-left"})}),e.jsx(wn,{children:a("cart.panelTitle",{count:aa})}),Xt?e.jsxs(Cn,{onClick:()=>H(!0),disabled:ee,children:[e.jsx(Y,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(yn,{children:[e.jsx(jn,{children:r.map(t=>{const s=ia.get(t.id),c=s?s.priceCredits:t.priceCredits,o=!!s&&s.priceCredits!==t.priceCredits,u=!t.tokenId,v=t.quantity,g=typeof t.available=="number"&&v>=t.available,M=c*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(kn,{"data-unavailable":z||void 0,children:[e.jsxs($n,{"data-thumb":!0,children:[w?e.jsx(Sn,{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(Mn,{"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(Tn,{children:[e.jsxs(In,{"data-desc":!0,children:[w?e.jsx(An,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(Pn,{title:t.name,children:t.name}),t.creator?e.jsx(zn,{address:t.creator,linkToProfile:!0}):null,Jt&&u?e.jsxs(Nn,{"data-testid":"cart-creator-tag",children:[e.jsx(Qn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(En,{children:z?e.jsxs(Ln,{children:[e.jsx(Kn,{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(Bn,{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(_n,{})," ",e.jsx(Ke,{credits:M}),o?e.jsx(Wn,{children:e.jsx(Ke,{credits:t.priceCredits*v})}):null]})]})})]}),e.jsxs(Fn,{children:[L?e.jsx(Un,{"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(Gn,{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(R),disabled:ee,children:a("cart.clearCart")})})]})]}),e.jsxs(On,{children:[e.jsx(Dn,{children:a("cart.purchaseSummary")}),e.jsxs(Vn,{children:[e.jsxs(Yn,{children:[e.jsx(Jn,{children:a("cart.totalItems",{count:sa})}),e.jsx(Zn,{children:e.jsxs(Xn,{children:[e.jsx(ei,{})," ",e.jsx(Ke,{credits:it})]})})]}),e.jsx(Ht,{options:Be.options,totalCents:Re,shortfall:Be.manaShortfall,showCreditsAmount:!1,creditsLabel:_?a("marketCheckout.confirmPurchase"):Be.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:ee||nt,onPay:t=>void(_?yt():Z(t)),creditsFallback:{label:ee?a("cart.working"):_?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(_?yt():Z())}}),nt?e.jsx($e,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx($e,{className:"muted",children:a("cart.signInHint")}),_?e.jsx($e,{className:"muted",children:a("cart.priceChanged")}):null,Ze?e.jsx($e,{className:"muted",children:Ze}):null,e.jsx(ti,{message:Zt})]})]})]})]}),rt.length>0?e.jsx(ai,{children:e.jsx(Ms,{title:a("cart.youMightAlsoLike"),items:rt})}):null,he&&n?e.jsx(Ts,{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(un,{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:Ra(n==null?void 0:n.providerType),signatures:h.phase==="processing"?h.signatures:void 0,options:h.phase==="choose"?_e(h).options:void 0,shortfall:h.phase==="choose"?_e(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{bi as Cart};
|
|
748
|
-
//# sourceMappingURL=Cart-
|
|
748
|
+
//# sourceMappingURL=Cart-BsI419x2.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as h,d as te,b as oe}from"./react-
|
|
1
|
+
import{j as e,r as h,d as te,b as oe}from"./react-Cu6RTeaf.js";import{t as b,s as u,h as se,I as re,m as ae,b as r,Z as q,v as F,bC as ie,bD as ne,c as le,l as ce,n as de,ar as ue,L as me,S as W,M as pe,bE as fe,bR as he}from"./index-DtHHdoPj.js";import{E as xe}from"./ErrorNotice-DGpmSHFq.js";import{d as be,P as ge,C as ye,a as N,b as ve,S as je}from"./collectionPage.styles-CVj8bQ38.js";import{u as we}from"./useStore-CmOmf_pZ.js";import{u as Ce,t as G,R as ke,j as Se,k as $e,l as Ee,m as Ne,n as Me,o as Fe,p as Ie,v as Re,q as Te,r as _e,M as Ae,s as Pe}from"./browseLayout.styles-B5WZBOX4.js";import{L as De}from"./LoadMore-CHhSQR_A.js";import{u as Le}from"./useInfiniteGrid-EJxCLDAB.js";import{u as Be,s as ze}from"./search-empty-BLqSZDPi.js";import{S as Oe}from"./categories-CSWMIFKV.js";import{G as We}from"./grid.styles-B15cNj07.js";import"./dcl-schemas-D3MMsa96.js";import"./sentry-BIexM3hF.js";import"./ethers-CFmosx3s.js";import"./intl-AKLEHPeO.js";import"./skeleton.styles-BC2avkie.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="0b51f0a5-f416-4607-b62f-12653d11d4c8",s._sentryDebugIdIdentifier="sentry-dbid-0b51f0a5-f416-4607-b62f-12653d11d4c8")}catch{}})();const Ge=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 te,b as oe}from"./react-Io5Wove7.js";import{t as b,s a
|
|
|
131
131
|
background: ${j.blackBtn};
|
|
132
132
|
}
|
|
133
133
|
`;function it({address:s}){var d,n;const{data:o}=q(s);if(!s)return null;const i=(o==null?void 0:o.name)||F(s),l=(n=(d=o==null?void 0:o.avatar)==null?void 0:d.snapshots)==null?void 0:n.face256,a=`${le.profileUrl}/${s}`,m=ie(ne({name:o==null?void 0:o.name,hasClaimedName:o==null?void 0:o.hasClaimedName,ethAddress:(o==null?void 0:o.ethAddress)??s}));return e.jsxs(st,{"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(rt,{title:i,children:i}),e.jsx(tt,{value:s,label:r("collection.copyAddress"),flow:"copy_creator_address",testId:"creator-card-copy",children:e.jsx("span",{children:F(s)})}),e.jsx(at,{"data-testid":"creator-card-view",href:a,target:"_blank",rel:"noopener noreferrer",children:r("collection.viewProfile")})]})}const nt=48,lt=["all","on_sale","not_for_sale"];function St(){var O;const{contractAddress:s}=te(),o=oe(),i=h.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[l,a]=Be(i),{category:m,subCategory:d,rarities:n,priceMin:x,priceMax:f,smart:C,sort:I}=l,g=lt.includes(l.status)?l.status:"all",R=t=>a({status:t});Ce(`${m}:${d??""}`);const[w,y]=h.useState(!1);h.useEffect(()=>{if(!w)return;const t=ee=>{ee.key==="Escape"&&y(!1)};document.addEventListener("keydown",t);const E=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=E}},[w]);const T=x&&!Number.isNaN(Number(x))?Number(x):void 0,_=f&&!Number.isNaN(Number(f))?Number(f):void 0,H=d?Oe[d]:void 0,K=(G.find(t=>t.key===I)??G[0]).server,A={contractAddress:s,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:k,total:Z,isLoading:S,error:P,hasNextPage:Q,isFetchingNextPage:D,isFetchNextPageError:V,fetchNextPage:J}=Le(["collection-page",A],t=>fe({...A,first:nt,skip:t}),{enabled:!!s}),{data:c}=ce({queryKey:["collection-meta",s],queryFn:()=>he(s),enabled:!!s,staleTime:5*6e4}),L=(c==null?void 0:c.name)||r("collection.fallbackTitle");de({title:c==null?void 0:c.name,description:c!=null&&c.name?r("seo.collection.description",{name:c.name}):void 0});const p=(c==null?void 0:c.creator)||((O=k[0])==null?void 0:O.creator),{data:$}=q(p),X=($==null?void 0:$.name)||(p?F(p):"");function Y(t){a({category:t,subCategory:null})}function B(t){a({rarities:n.includes(t)?n.filter(E=>E!==t):[...n,t]})}function z(){a(i)}const v=[];(T!=null||_!=null)&&v.push({key:"price",label:r("filter.price"),onRemove:()=>{a({priceMin:"",priceMax:""})}});for(const t of ke)n.includes(t)&&v.push({key:`rarity-${t}`,label:ue(t),onRemove:()=>B(t)});return C&&v.push({key:"smart",label:r("filter.smart"),onRemove:()=>a({smart:!1})}),g!=="all"&&v.push({key:"status",label:g==="on_sale"?r("filter.onSale"):r("filter.notForSale"),onRemove:()=>R("all")}),e.jsxs(ge,{"data-testid":"collection-page",children:[e.jsxs(ye,{"aria-label":r("collection.breadcrumbAria"),children:[e.jsx(N,{onClick:()=>o("/items"),children:r("collection.breadcrumb")}),p?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"/"}),e.jsx(N,{onClick:()=>o(`/items/creator/${p}`),children:X}),e.jsx("span",{children:"/"}),e.jsx(N,{onClick:()=>o(`/items/creator/${p}?collections`),children:r("categories.collections")})]}):null,e.jsx("span",{children:"/"}),e.jsx(ve,{children:L})]}),e.jsx(Ze,{name:L,creator:p}),e.jsxs(Se,{"data-testid":"browse",children:[w?e.jsx($e,{onClick:()=>y(!1),"aria-hidden":!0}):null,e.jsxs(je,{children:[e.jsx(it,{address:p}),e.jsxs(Ee,{"data-open":w||void 0,"data-static":!0,"data-testid":"browse-sidebar",children:[e.jsxs(Ne,{children:[e.jsx(Me,{children:r("assets.filters")}),e.jsx(Fe,{onClick:()=>y(!1),"aria-label":r("assets.closeFilters"),children:"✕"})]}),e.jsx(Ie,{children:e.jsx(Re,{category:m,subCategory:d,onCategory:Y,onSub:t=>a({subCategory:t}),priceMin:x,priceMax:f,onPriceMin:t=>a({priceMin:t}),onPriceMax:t=>a({priceMax:t}),rarities:n,onToggleRarity:B,status:g,onStatus:R,smart:C,onSmart:t=>a({smart:t}),hideNames:!0})}),e.jsx(Te,{children:e.jsx(_e,{type:"button",onClick:()=>y(!1),children:r("assets.showItems")})})]})]}),e.jsxs(Ae,{children:[e.jsx(Pe,{sort:I,onSort:t=>a({sort:t}),total:Z,loading:S,onOpenFilters:()=>y(!0),chips:v,onClearChips:z}),P?e.jsx(xe,{message:r("collection.error")}):null,!S&&!P&&k.length===0?e.jsx(me,{testId:"collection-empty",icon:ze,title:r("assets.empty.title"),body:r("collection.empty"),cta:{label:r("filterBar.clearAll"),onClick:z}}):e.jsxs(e.Fragment,{children:[e.jsx(We,{"data-testid":"grid",children:S?e.jsx(W,{count:15}):e.jsxs(e.Fragment,{children:[k.map(t=>e.jsx(pe,{item:t},t.id)),D?e.jsx(W,{count:6}):null]})}),e.jsx(De,{hasNextPage:Q,isFetching:D,isError:V,onLoadMore:()=>void J()})]})]})]})]})}export{St as Collection,St as default};
|
|
134
|
-
//# sourceMappingURL=Collection-
|
|
134
|
+
//# sourceMappingURL=Collection-C620zyzC.js.map
|