@dcl/shop 0.10.1-31040959942.commit-e9e6433 → 0.10.1-31047879016.commit-2c3846e
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-5KZahW4a.js +371 -0
- package/_assets/AnimatedBackground-CtA-lb0z.js +97 -0
- package/_assets/{Assets-UkGI952T.js → Assets-B-cgdG2V.js} +8 -8
- package/_assets/{Assets.styles-D1Vg-U1C.js → Assets.styles-CI8Un36f.js} +140 -132
- package/_assets/{Authorizations-B3yDMR41.js → Authorizations-94ctJx1t.js} +28 -26
- package/_assets/Cart-BNVSJOrw.js +707 -0
- package/_assets/{CircularProgress-CB62Wg9m.js → CircularProgress-CpjqStGb.js} +1 -1
- package/_assets/{Collection-CSv9R6xZ.js → Collection-CZJ9SSN3.js} +19 -19
- package/_assets/CollectionCarousel-DHOvuq0a.js +816 -0
- package/_assets/{Confetti-Blr9NSjA.js → Confetti-BTHehxYh.js} +1 -1
- package/_assets/{Creator-sh_sYH1o.js → Creator-vMhSn3Jg.js} +7 -7
- package/_assets/{ErrorNotice-CXsnDhEh.js → ErrorNotice-CpmhZUmE.js} +1 -1
- package/_assets/{ExchangeController-GIzn0xGk.js → ExchangeController-Bk_zMHVC.js} +1 -1
- package/_assets/{Faq-C0nCohQD.js → Faq-Bbk8h1Qk.js} +20 -14
- package/_assets/{GetCredits-CBLkNO-w.js → GetCredits-Dvf_riJZ.js} +114 -80
- package/_assets/{Grow-Nzyme9Oa.js → Grow-B3DyBqW4.js} +1 -1
- package/_assets/{HelpersUtil-D0wBF1PA.js → HelpersUtil-h6aaGDt3.js} +1 -1
- package/_assets/{ItemDetail-DZ3mEshJ.js → ItemDetail-oFomOkbt.js} +510 -480
- package/_assets/LazyEmoteControls-BdlpjPkr.js +2 -0
- package/_assets/{LoadMore-CKNE48ED.js → LoadMore-C9QaMyBo.js} +1 -1
- package/_assets/ManaPricingBanner.styles-MtBPxNv2.js +93 -0
- package/_assets/{MyAssets-Ble658vU.js → MyAssets-Bx9bW84W.js} +33 -33
- package/_assets/{MyFavorites-Qri7XFuW.js → MyFavorites-jhTRLOWx.js} +12 -11
- package/_assets/{NotFound-BnEiiuoJ.js → NotFound-y9wUvJSt.js} +1 -1
- package/_assets/{NotificationsBell-CXzlEnr9.js → NotificationsBell-BFMX1y3H.js} +1 -1
- package/_assets/{OutfitDetail-CL1Y8ii5.js → OutfitDetail-BfEl8ni7.js} +4 -4
- package/_assets/{OutfitPreview-DRqW1c5F.js → OutfitPreview-foX1l3Ho.js} +2 -2
- package/_assets/{OutfitStudio-DgL1kI47.js → OutfitStudio-CPQbAOhy.js} +1 -1
- package/_assets/{StoreSettings--R4i191j.js → StoreSettings-DxqpR3qG.js} +1 -1
- package/_assets/{Success-DApKfyee.js → Success-DiIlHKjo.js} +1 -1
- package/_assets/{SwapController-0aVdHfMW.js → SwapController-DzdjZRBH.js} +1 -1
- package/_assets/{Tooltip-B2qDq-8v.js → Tooltip-CXWXl43D.js} +1 -1
- package/_assets/{TradeService-COZXjCcV.js → TradeService-CGuEeH2R.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-BYmipTKt.js → W3MFrameProviderSingleton-DAG-EWFv.js} +3 -3
- package/_assets/{WebCryptoP256-Cid44am7.js → WebCryptoP256-BQdHu6KD.js} +1 -1
- package/_assets/{authorizations-dpp0OnHI.js → authorizations-Bbp82_V2.js} +1 -1
- package/_assets/{basic-An6X8Awg.js → basic-Cf3DJuRG.js} +1 -1
- package/_assets/{biconomy-CeZnHUNK.js → biconomy-D5_2I_rj.js} +1 -1
- package/_assets/{builder-Ce37-lC-.js → builder-CK5n6bEq.js} +1 -1
- package/_assets/{buy-Dgj0sRqb.js → buy-BjEPh7nk.js} +1 -1
- package/_assets/{buy-gasless-CYY_v3bj.js → buy-gasless-Bjj3XUsm.js} +1 -1
- package/_assets/{categories-KFHNUm7E.js → categories-BQHpVYif.js} +54 -54
- package/_assets/{ccip-8Mu0bgFv.js → ccip-B7LQbKA2.js} +1 -1
- package/_assets/{ccip-BsYdmRqX.js → ccip-C_76Sm3L.js} +1 -1
- package/_assets/collectionPage.styles-k2LmVKux.js +49 -0
- package/_assets/{controller-Cam05qfJ.js → controller-CjH--4wE.js} +2 -2
- package/_assets/{core-BdiPiyom.js → core-1ZzLkX5X.js} +4 -4
- package/_assets/{createSvgIcon-cAMuQ1mD.js → createSvgIcon-DcR4892_.js} +4 -4
- package/_assets/{custom-C7A-Vb1Q.js → custom-CW7Ai6OA.js} +1 -1
- package/_assets/{data-capture-COGpG9-r.js → data-capture-DGJOI5ie.js} +1 -1
- package/_assets/disposePreview-5vjiqVZ0.js +1 -0
- package/_assets/{email-WblN0-6I.js → email-BYO9_PSn.js} +1 -1
- package/_assets/{embedded-wallet-BDGaY-OT.js → embedded-wallet-Dc3ay_ju.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-D7YX5KN0.js → emotion-styled.browser.esm-IjZkrRjv.js} +1 -1
- package/_assets/{engine-DjipK7B5.js → engine-eMP7KFCK.js} +1 -1
- package/_assets/{errors-CzBZCztT.js → errors-65NA3HkA.js} +1 -1
- package/_assets/{estimate-l1-fee-Bk8rxjZm.js → estimate-l1-fee-z4Cv9am6.js} +1 -1
- package/_assets/{execute-C4AIZjft.js → execute-Be5majZ7.js} +2 -2
- package/_assets/{features-Dz4wLY98.js → features-DDe58ejV.js} +1 -1
- package/_assets/{fetchTokenMetadata-DjPW-ayp.js → fetchTokenMetadata-BfT_0X0P.js} +2 -2
- package/_assets/{field.styles-BThVZLzX.js → field.styles-5b7RHcOk.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-DMVrxBpI.js → get-ecosystem-wallet-info-BgyWgmsX.js} +1 -1
- package/_assets/{getBalance-DeFn5Yjk.js → getBalance-EUbWLqWa.js} +1 -1
- package/_assets/{getNFT-iw9a-h4A.js → getNFT-CZQJk04I.js} +1 -1
- package/_assets/{getNFT-CRgzh5wf.js → getNFT-DqZaIP8J.js} +1 -1
- package/_assets/{grid.styles-U_Gpy1wT.js → grid.styles-r1HwM-dl.js} +1 -1
- package/_assets/{hashTypedData-9Zh9SRr-.js → hashTypedData-CdCzwjEg.js} +1 -1
- package/_assets/{hashTypedData-CqewBwVq.js → hashTypedData-DpsVzpmw.js} +1 -1
- package/_assets/hero-credits-mobile-C9Muog4T.webp +0 -0
- package/_assets/{in-app-DNl1emxp.js → in-app-OWTERGos.js} +1 -1
- package/_assets/{in-app-wallet-calls-CBy5UcNA.js → in-app-wallet-calls-x6rZUVft.js} +1 -1
- package/_assets/{index-CcihKRSf.js → index-5qpydkyU.js} +1 -1
- package/_assets/{index-BVDj7GJL.js → index-B-c3ctWE.js} +1 -1
- package/_assets/{index-BdQAMxgJ.js → index-B2Y5KUFQ.js} +2 -2
- package/_assets/{index-Bc0mTSPi.js → index-B4hWF9JI.js} +1 -1
- package/_assets/{index-Dd8eTuKB.js → index-BRs5WQ4y.js} +1 -1
- package/_assets/{index-Cmc0GHkA.js → index-BXmbcLjL.js} +1 -1
- package/_assets/index-BYP7oMPZ.css +1 -0
- package/_assets/{index-CjvMMH2k.js → index-BZbZm3_Z.js} +1 -1
- package/_assets/{index-C6rF-YrH.js → index-Bk5pG7hH.js} +1 -1
- package/_assets/{index-Dax05iV5.js → index-BoMcphCu.js} +1 -1
- package/_assets/{index-BIJiNaiS.js → index-By7bM2FO.js} +1 -1
- package/_assets/{index-xMSSxrHn.js → index-C3ZkN3yx.js} +1 -1
- package/_assets/{index-CHCVsh7P.js → index-C5Zmr-fp.js} +1 -1
- package/_assets/{index-5SMH4VL2.js → index-C5gU7v63.js} +1 -1
- package/_assets/{index-Kq5fobWt.js → index-C6dKNgrS.js} +1 -1
- package/_assets/{index-B7Rm4vXt.js → index-CAdngWZA.js} +1 -1
- package/_assets/{index-h--qqRrb.js → index-CDn28wqX.js} +1 -1
- package/_assets/{index-CJCxe5kr.js → index-CF1R6Wyc.js} +1 -1
- package/_assets/index-CGHLVlhr.js +622 -0
- package/_assets/{index-DT4Zi23l.js → index-CGXSS33-.js} +3 -3
- package/_assets/{index-CqJzKRxe.js → index-CIDeydPG.js} +2 -2
- package/_assets/{index-CU5QiUkb.js → index-CKAGCwTj.js} +1 -1
- package/_assets/{index-y3U1nB0H.js → index-CUHTRIp3.js} +3 -3
- package/_assets/{index-DgPfV4X0.js → index-Cabu_wkc.js} +1 -1
- package/_assets/{index-DM2dLJ-M.js → index-CdE95fkC.js} +1 -1
- package/_assets/{index-xLgJxfJy.js → index-CgbD_7CJ.js} +1 -1
- package/_assets/{index-DwrPmkl2.js → index-CzYkiikw.js} +1 -1
- package/_assets/{index-CpQbv3Zu.js → index-CzjezMlh.js} +1 -1
- package/_assets/{index-DtAsm8Nr.js → index-DB8U79VL.js} +1 -1
- package/_assets/{index-D3iRZfgO.js → index-DFIOoHDj.js} +1 -1
- package/_assets/{index-BwGtaRec.js → index-DIk7fUKo.js} +1 -1
- package/_assets/{index-C_r09vuw.js → index-DJn0-6QO.js} +1 -1
- package/_assets/{index-RHSCZ-t0.js → index-DMQGc1DU.js} +1 -1
- package/_assets/{index-DfIQCR2U.js → index-DN-GBsyH.js} +1 -1
- package/_assets/{index-DXURSM0-.js → index-DVr9P_sW.js} +1 -1
- package/_assets/index-DWnXUohj.js +1 -0
- package/_assets/{index-HQUcvKn4.js → index-Db-p3Vgn.js} +3 -3
- package/_assets/{index-m-SAK4uo.js → index-DcP4Kxjm.js} +1 -1
- package/_assets/{index-B0wdLudq.js → index-DhKtXpNk.js} +1 -1
- package/_assets/{index-ByPjVaiq.js → index-DrNZnytJ.js} +1 -1
- package/_assets/{index-DQ7Kosvv.js → index-DtNI9AcR.js} +3 -3
- package/_assets/{index-DhRx4LkD.js → index-Dvpm24my.js} +1 -1
- package/_assets/{index-Dqdf5xVB.js → index-DzKQAwwD.js} +1 -1
- package/_assets/{index-BC_qLj4b.js → index-DzWVwnl8.js} +1 -1
- package/_assets/{index-DO0NylVf.js → index-Gjpu_VUp.js} +1 -1
- package/_assets/index-HxLvOExR.js +3699 -0
- package/_assets/{index-BsZ1af_A.js → index-JQcdGKbC.js} +1 -1
- package/_assets/{index-D3qXchU2.js → index-OpuK1fx_.js} +1 -1
- package/_assets/{index-1tktbprD.js → index-U_j9NAbS.js} +1 -1
- package/_assets/{index-MPYM0LiN.js → index-WMiYz6IH.js} +1 -1
- package/_assets/{index-D6LfEXYp.js → index-bMtXusxB.js} +1 -1
- package/_assets/{index-BdkbjSWP.js → index-f--Xju7p.js} +1 -1
- package/_assets/{index-B3jctKqs.js → index-tXA64dlA.js} +2 -2
- package/_assets/{index.es-CLldxJUJ.js → index.es-B7e293JB.js} +1 -1
- package/_assets/{index.es-DGQjR0dR.js → index.es-DLwvz1xx.js} +4 -4
- package/_assets/{index.es-DqD9HkXC.js → index.es-DlR-IQtM.js} +1 -1
- package/_assets/{localBatchGatewayRequest-COpd6g60.js → localBatchGatewayRequest-cLQ4UydX.js} +1 -1
- package/_assets/{networks-ChmokwGp.js → networks-C5yX7tyx.js} +1 -1
- package/_assets/{onramp-BmIZ6r8P.js → onramp-CEYvaS9l.js} +1 -1
- package/_assets/{openzeppelin-CzypsJB4.js → openzeppelin-Cc2KhXuv.js} +1 -1
- package/_assets/{parseNft-CydF3Edv.js → parseNft-YbkZLHPa.js} +2 -2
- package/_assets/{parseSignature-BeoYj8uB.js → parseSignature-BHOWaqkR.js} +1 -1
- package/_assets/{parseSignature-u2B-ofRt.js → parseSignature-Dgv2pIVc.js} +3 -3
- package/_assets/{passkeys-CVYlDRWu.js → passkeys-Dg5ldVwX.js} +1 -1
- package/_assets/{pay-with-exchange-DqJU65WS.js → pay-with-exchange-Dx2N2FiO.js} +1 -1
- package/_assets/promo-best-rated-emotes-C6kNvB-a.png +0 -0
- package/_assets/promo-week-selected-outfits-BBmkZYZx.png +0 -0
- package/_assets/{qr-overlay-DNwX_TPq.js → qr-overlay-CJis_Dku.js} +1 -1
- package/_assets/{receive-uVtJpZxa.js → receive-DyR3EUgS.js} +1 -1
- package/_assets/{resolveImplementation-CRaloAyf.js → resolveImplementation-D-Os7pbq.js} +1 -1
- package/_assets/{rpc-CqfSA8g9.js → rpc-gzHaMGM_.js} +1 -1
- package/_assets/{secp256k1-2YskFph9.js → secp256k1-A8695JK3.js} +1 -1
- package/_assets/{secp256k1-Do9ofviG.js → secp256k1-GWIDn9S3.js} +1 -1
- package/_assets/{secp256k1-DvDQYEQd.js → secp256k1-NjVLumzu.js} +1 -1
- package/_assets/{send-IbCZj2la.js → send-CKyxXi5G.js} +1 -1
- package/_assets/{send-batch-transaction-DFD_LTct.js → send-batch-transaction-BD0nxza5.js} +1 -1
- package/_assets/{send-eip712-transaction-DBf5Z4g_.js → send-eip712-transaction-C8HaD4Bl.js} +2 -2
- package/_assets/{send-gasless-transaction-TFSfXMLh.js → send-gasless-transaction-C3LFi8_y.js} +2 -2
- package/_assets/{send-transaction-DGhInFte.js → send-transaction-Cr1KGOfz.js} +2 -2
- package/_assets/{sendMetaTransaction-CzqCMKMd.js → sendMetaTransaction-BuD46hIl.js} +1 -1
- package/_assets/{sendRawTransaction-qf9SJfpX.js → sendRawTransaction-CHV_i5MH.js} +3 -3
- package/_assets/{serializeTransaction-D4cHSu0O.js → serializeTransaction-C6QCh8ng.js} +1 -1
- package/_assets/{session-proposal-5AODiiln.js → session-proposal-AzV-Di6A.js} +1 -1
- package/_assets/{session-request-hpYNptgl.js → session-request-BVptHKRT.js} +2 -2
- package/_assets/{signing-BQUpSEqZ.js → signing-BCnHiNxp.js} +3 -3
- package/_assets/{skeleton.styles-BfEPveSL.js → skeleton.styles-NdJWWZoO.js} +1 -1
- package/_assets/{socials-D6EP9g5a.js → socials-SFpy8Nfx.js} +1 -1
- package/_assets/{styled-FDInU8Rs.js → styled-YNWg-9qZ.js} +1 -1
- package/_assets/{swaps-CqwmfiPX.js → swaps-Bs58cXr0.js} +1 -1
- package/_assets/{thirdweb-Cecbmps_.js → thirdweb-Da9bKgaM.js} +3 -3
- package/_assets/{to-serializable-transaction-u0MhoPX5.js → to-serializable-transaction-BKFRuKok.js} +2 -2
- package/_assets/{transactionReceipt-l4NJYcz9.js → transactionReceipt-BB_HE5DZ.js} +1 -1
- package/_assets/{transactions-CeFT9Jfi.js → transactions-BiiNpaI6.js} +1 -1
- package/_assets/{useCreditPacks-DQE6Gg5O.js → useCreditPacks-kYM5sqXW.js} +1 -1
- package/_assets/{useImportable-Dh1ZOsU2.js → useImportable-CacakRaR.js} +1 -1
- package/_assets/{useInfiniteGrid--LOCzyU9.js → useInfiniteGrid-DmCoyc-5.js} +1 -1
- package/_assets/{useTheme-CpSHkSMG.js → useTheme-CDzzSrjV.js} +1 -1
- package/_assets/{verifyHash-BSS9_MWX.js → verifyHash-Bi8A6_OC.js} +1 -1
- package/_assets/{w3m-modal-BCjN4Uqc.js → w3m-modal-DXZzlpAy.js} +1 -1
- package/_assets/{w3m-modal-ByuBko0g.js → w3m-modal-hvo-cMQo.js} +1 -1
- package/_assets/{wait-for-tx-receipt-CfVB-CU0.js → wait-for-tx-receipt-DtoUQega.js} +1 -1
- package/_assets/{wallets-tUzLLBvA.js → wallets-DOYhTD-q.js} +5 -5
- package/_assets/{web-connector-BfVr5QpB.js → web-connector-L9IYDmGf.js} +3 -3
- package/_assets/{writeContract-B4n8yTsB.js → writeContract-C9Fd0Dqo.js} +1 -1
- package/_assets/{zoraTestnet-CNY7oWT9.js → zoraTestnet-CJh-5IFd.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Activity-CUf8ogRR.js +0 -381
- package/_assets/AnimatedBackground-_78VlBdV.js +0 -97
- package/_assets/Cart-CbY3Hhq6.js +0 -695
- package/_assets/CollectionCarousel-Cg2MTF9W.js +0 -804
- package/_assets/LazyEmoteControls-BEt_49wK.js +0 -2
- package/_assets/ManaPricingBanner.styles-CJS5V2Di.js +0 -74
- package/_assets/collectionPage.styles-jwKyDncq.js +0 -48
- package/_assets/disposePreview-C6zVmkpS.js +0 -1
- package/_assets/index-Ba-yhU-2.js +0 -1
- package/_assets/index-D-NhBWWr.css +0 -1
- package/_assets/index-D8LZCVOB.js +0 -519
- package/_assets/index-buu21jrH.js +0 -3390
- package/_assets/packs-backdrop-BcXiUPeP.webp +0 -0
package/index.html
CHANGED
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
<link rel="canonical" href="https://decentraland.org/shop/" />
|
|
17
17
|
|
|
18
18
|
<!-- Favicon: the Decentraland mark (same as the marketplace). -->
|
|
19
|
-
<link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.10.1-
|
|
20
|
-
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.10.1-
|
|
19
|
+
<link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.10.1-31047879016.commit-2c3846e/favicon.ico" sizes="16x16 32x32 48x48" />
|
|
20
|
+
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.10.1-31047879016.commit-2c3846e/dcl-mark.png" />
|
|
21
21
|
<meta name="apple-mobile-web-app-title" content="DCL Shop" />
|
|
22
|
-
<link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.10.1-
|
|
22
|
+
<link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.10.1-31047879016.commit-2c3846e/site.webmanifest" />
|
|
23
23
|
|
|
24
24
|
<!-- Open Graph.
|
|
25
25
|
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
<meta name="twitter:image:alt" content="Decentraland Shop — wearables and emotes for your avatar" />
|
|
59
59
|
|
|
60
60
|
<!-- Sitemap -->
|
|
61
|
-
<link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.10.1-
|
|
61
|
+
<link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.10.1-31047879016.commit-2c3846e/sitemap.xml" />
|
|
62
62
|
|
|
63
63
|
<!-- Warm the 3D preview / fonts -->
|
|
64
64
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
<link rel="preconnect" href="https://wearable-preview.decentraland.org" />
|
|
71
71
|
<link rel="preconnect" href="https://peer.decentraland.zone" crossorigin />
|
|
72
72
|
<link rel="preconnect" href="https://peer.decentraland.org" crossorigin />
|
|
73
|
-
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.10.1-
|
|
74
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.10.1-
|
|
75
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.10.1-
|
|
76
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.10.1-
|
|
77
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.10.1-
|
|
78
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.10.1-
|
|
79
|
-
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.10.1-
|
|
73
|
+
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.10.1-31047879016.commit-2c3846e/_assets/index-HxLvOExR.js"></script>
|
|
74
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.10.1-31047879016.commit-2c3846e/_assets/react-BYHuwl8r.js">
|
|
75
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.10.1-31047879016.commit-2c3846e/_assets/dcl-schemas-CmtP3U6y.js">
|
|
76
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.10.1-31047879016.commit-2c3846e/_assets/sentry-Dx-KuLV3.js">
|
|
77
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.10.1-31047879016.commit-2c3846e/_assets/ethers-BDpbhgX6.js">
|
|
78
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.10.1-31047879016.commit-2c3846e/_assets/intl-CBcMB1D2.js">
|
|
79
|
+
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.10.1-31047879016.commit-2c3846e/_assets/index-BYP7oMPZ.css">
|
|
80
80
|
</head>
|
|
81
81
|
<body>
|
|
82
82
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/shop",
|
|
3
|
-
"version": "0.10.1-
|
|
3
|
+
"version": "0.10.1-31047879016.commit-2c3846e",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"author": "Decentraland",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/decentraland/shop.git"
|
|
10
10
|
},
|
|
11
|
-
"commit": "
|
|
11
|
+
"commit": "2c3846e4c745227de11e88e69906ad8614079c2d"
|
|
12
12
|
}
|
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-D8LZCVOB.js","_assets/react-BYHuwl8r.js","_assets/index-buu21jrH.js","_assets/dcl-schemas-CmtP3U6y.js","_assets/sentry-Dx-KuLV3.js","_assets/ethers-BDpbhgX6.js","_assets/intl-CBcMB1D2.js","_assets/index-D-NhBWWr.css","_assets/useImportable-Dh1ZOsU2.js","_assets/buy-Dgj0sRqb.js","_assets/authorizations-dpp0OnHI.js","_assets/sendMetaTransaction-CzqCMKMd.js","_assets/ManaPricingBanner.styles-CJS5V2Di.js","_assets/Faq-C0nCohQD.js","_assets/field.styles-BThVZLzX.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as ke,bM as Ie,o as z,v as A,bN as Ae,s as h,t as a,w as $e,B as Le,x as Pe,b as d,ao as Ne,I as $,bO as te,bP as ie,bQ as Ee,_ as Te,z as N,bR as Ce,A as Se,bh as R,L as Fe,bS as Me,E as De,bT as Oe,bU as _}from"./index-buu21jrH.js";import{r as g,u as He,j as t,L as re,e as qe}from"./react-BYHuwl8r.js";import{u as ze}from"./useImportable-Dh1ZOsU2.js";import{L as Re}from"./LoadMore-CKNE48ED.js";import{u as L}from"./useInfiniteGrid--LOCzyU9.js";import{m as oe}from"./mana-matic-C4e1sNO3.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./buy-Dgj0sRqb.js";import"./authorizations-dpp0OnHI.js";import"./sendMetaTransaction-CzqCMKMd.js";const _e=15e3;function Ge(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)<=_e}function We(e){const s=[...e].sort((i,r)=>r.createdAt-i.createdAt),n=[];for(const i of s){const r=n[n.length-1];r&&Ge(r[r.length-1],i)?r.push(i):n.push([i])}return n.map(i=>{var r;return{id:((r=i.find(c=>c.txHash))==null?void 0:r.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(c=>c.createdAt)),status:i.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((c,u)=>c+u.credits,0),lines:i}})}function Be(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Ue(e){const s=[],n=new Map;for(const i of e){const r=Be(i);if(!r){s.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const c=n.get(r);if(c){c.quantity+=1,c.credits+=i.credits;continue}const u={key:r,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};n.set(r,u),s.push(u)}return s}function Ke(e,s){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:s?ke(e.manaWei,s):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Qe(e){const n=We(e.purchases.filter(o=>o.status!=="EXPIRED")).map(o=>({kind:"purchase",id:`purchase:${o.id}`,createdAt:o.createdAt,order:o})),i=e.sales.map(o=>{const x=Ke(o,e.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),r=(e.creditOrders??[]).filter(o=>o.status!=="failed"&&o.status!=="abandoned").map(o=>({kind:"credit",id:`credit:${o.id}`,createdAt:o.createdAt,order:o})),c=new Set(e.purchases.filter(o=>o.txHash).map(o=>o.txHash.toLowerCase())),u=(e.manaPurchases??[]).filter(o=>!c.has(o.txHash.toLowerCase())).map(o=>({kind:"mana-purchase",id:`mana-purchase:${o.id}`,createdAt:o.createdAt,sale:o}));return[...n,...i,...r,...u].sort((o,x)=>x.createdAt-o.createdAt||(o.id<x.id?-1:1))}function Ve(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 Xe(e){const s=new Map;for(const n of e??[]){const i=ce(n.txHash??"");if(!i)continue;const r=s.get(i);r?r.push(n):s.set(i,[n])}return s}function Ye(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 r=i.length===1?Ze(i[0].netCents):null,c=i.filter(o=>!o.available&&o.availableAt>n);if(c.length===0)return{kind:"credited",credits:r};const u=c.reduce((o,x)=>Math.max(o,x.availableAt),0);return{kind:"pending",credits:r,availableAt:u}}function Ze(e){return Ie(e)}function Je(){const e=z(i=>{var r;return(r=i.session)==null?void 0:r.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 et="https://cdn.decentraland.org/@dcl/shop/0.10.1-31040959942.commit-e9e6433/_assets/credits-product-vs4Q6u6l.svg",G=$e`
|
|
3
|
-
0% { background-position: 200% 0; }
|
|
4
|
-
100% { background-position: -200% 0; }
|
|
5
|
-
`,tt=h.section`
|
|
6
|
-
width: 100%;
|
|
7
|
-
min-width: 0;
|
|
8
|
-
min-height: 60vh;
|
|
9
|
-
/* Centre the whole column — heading, tabs and cards as ONE block — so the feed isn't parked against
|
|
10
|
-
the left edge of a wide page. Centring only the list would leave the heading orphaned from it.
|
|
11
|
-
|
|
12
|
-
ONE width for every view. The migration tool needs 1003px (its row is a thumbnail, a name and a
|
|
13
|
-
144px price field; narrower, the price field drops to its own line on a desktop), and the feed used
|
|
14
|
-
to sit at 760px — so switching chips resized the heading and the whole column under it, which reads
|
|
15
|
-
as the page reloading rather than as a filter changing. */
|
|
16
|
-
max-width: 1003px;
|
|
17
|
-
margin-inline: auto;
|
|
18
|
-
`,it=h.div`
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: baseline;
|
|
21
|
-
gap: 12px;
|
|
22
|
-
margin-bottom: 20px;
|
|
23
|
-
`,st=h.h1`
|
|
24
|
-
font-family: ${a.font.sans};
|
|
25
|
-
margin: 0;
|
|
26
|
-
`;h.span`
|
|
27
|
-
color: ${a.colors.muted};
|
|
28
|
-
font-size: 14px;
|
|
29
|
-
`;const at=h.div`
|
|
30
|
-
display: flex;
|
|
31
|
-
gap: 8px;
|
|
32
|
-
margin-bottom: 20px;
|
|
33
|
-
flex-wrap: wrap;
|
|
34
|
-
`,de=h.button`
|
|
35
|
-
appearance: none;
|
|
36
|
-
/* Figma draws the row as a 0.5px Gray 4 hairline, a shade darker and half the weight of the card
|
|
37
|
-
border this used, and sets the label a point smaller with the tracking the shop's other 13px
|
|
38
|
-
pills carry. */
|
|
39
|
-
border: 0.5px solid ${a.colors.gray4};
|
|
40
|
-
background: ${a.colors.white};
|
|
41
|
-
color: ${a.colors.text};
|
|
42
|
-
font-family: ${a.font.sans};
|
|
43
|
-
font-size: 13px;
|
|
44
|
-
font-weight: 600;
|
|
45
|
-
line-height: 24px;
|
|
46
|
-
letter-spacing: 0.46px;
|
|
47
|
-
/* The design gives the pill a flat 40px and no vertical padding, centring the 24px line box inside
|
|
48
|
-
it — so the height is the 40 it draws rather than the sum of a line box, padding and a border. */
|
|
49
|
-
display: inline-flex;
|
|
50
|
-
align-items: center;
|
|
51
|
-
justify-content: center;
|
|
52
|
-
padding: 0 16px;
|
|
53
|
-
min-height: 40px;
|
|
54
|
-
border-radius: ${a.radius.pill};
|
|
55
|
-
cursor: pointer;
|
|
56
|
-
transition:
|
|
57
|
-
background 0.15s,
|
|
58
|
-
border-color 0.15s,
|
|
59
|
-
color 0.15s;
|
|
60
|
-
|
|
61
|
-
&:hover {
|
|
62
|
-
background: ${a.colors.media};
|
|
63
|
-
}
|
|
64
|
-
&:focus-visible {
|
|
65
|
-
outline: 2px solid ${a.colors.accent};
|
|
66
|
-
outline-offset: 2px;
|
|
67
|
-
}
|
|
68
|
-
&[data-active='true'] {
|
|
69
|
-
background: ${a.colors.accent};
|
|
70
|
-
border-color: ${a.colors.accent};
|
|
71
|
-
color: ${a.colors.white};
|
|
72
|
-
}
|
|
73
|
-
`,nt=h(de)`
|
|
74
|
-
position: relative;
|
|
75
|
-
|
|
76
|
-
/* Violet-on-violet once the chip fills, so the badge inverts. Reached by test id rather than by
|
|
77
|
-
interpolating the styled def, which throws under vitest (see CLAUDE.md). */
|
|
78
|
-
&[data-active='true'] [data-testid='activity-migrate-count'] {
|
|
79
|
-
background: ${a.colors.white};
|
|
80
|
-
color: ${a.colors.accent};
|
|
81
|
-
/* See MigrateBadge: a white ring would vanish into the page here, since the disc itself is white. */
|
|
82
|
-
box-shadow: 0 0 0 2px ${a.colors.accent};
|
|
83
|
-
}
|
|
84
|
-
`,rt=h.span`
|
|
85
|
-
position: absolute;
|
|
86
|
-
/* Offsets run from the chip's PADDING box, so they carry the 1px its hairline occupies in layout on
|
|
87
|
-
top of the 5.5 / 2.5 the design measures from the pill's outer edge. */
|
|
88
|
-
top: -6.5px;
|
|
89
|
-
right: -3.5px;
|
|
90
|
-
display: grid;
|
|
91
|
-
place-items: center;
|
|
92
|
-
/* The chip's tracking would otherwise widen the disc off its 20px. */
|
|
93
|
-
letter-spacing: normal;
|
|
94
|
-
/* Figma only ever draws a single digit, as a fixed 20px disc. The padding is what lets a two- or
|
|
95
|
-
three-figure count grow leftwards out of the corner instead of spilling out of the circle. */
|
|
96
|
-
min-width: 20px;
|
|
97
|
-
height: 20px;
|
|
98
|
-
padding: 0 6px;
|
|
99
|
-
border-radius: ${a.radius.pill};
|
|
100
|
-
background: ${a.colors.brandViolet};
|
|
101
|
-
/**
|
|
102
|
-
* A ring, whose colour has to FOLLOW THE DISC rather than the page.
|
|
103
|
-
*
|
|
104
|
-
* The disc hangs off the corner: part of it sits on the chip, part on the page. Unselected it is violet
|
|
105
|
-
* on white, so it already reads and the white ring only separates it from the chip's grey hairline.
|
|
106
|
-
* Selected, the chip inverts it to white on violet — and a white disc against the white page has no edge
|
|
107
|
-
* at all along the half that overhangs, which is the state where the circle looked unfinished. That case
|
|
108
|
-
* needs the ring in the chip's accent instead (below), so the disc keeps a hard edge on both surfaces.
|
|
109
|
-
*
|
|
110
|
-
* box-shadow rather than a border: a border would grow the 20px disc the design fixes, while a spread
|
|
111
|
-
* shadow draws outside the box.
|
|
112
|
-
*/
|
|
113
|
-
box-shadow: 0 0 0 2px ${a.colors.white};
|
|
114
|
-
font-weight: 600;
|
|
115
|
-
font-size: 12px;
|
|
116
|
-
line-height: 1.6;
|
|
117
|
-
color: ${a.colors.white};
|
|
118
|
-
`,ot=h.div`
|
|
119
|
-
min-height: 60vh;
|
|
120
|
-
`,se=h.div`
|
|
121
|
-
display: flex;
|
|
122
|
-
flex-direction: column;
|
|
123
|
-
gap: 16px;
|
|
124
|
-
`,E=h.div`
|
|
125
|
-
background: ${a.colors.white};
|
|
126
|
-
border: 1px solid ${a.colors.line};
|
|
127
|
-
border-radius: 16px;
|
|
128
|
-
overflow: hidden;
|
|
129
|
-
`,T=h.div`
|
|
130
|
-
display: flex;
|
|
131
|
-
align-items: center;
|
|
132
|
-
justify-content: space-between;
|
|
133
|
-
gap: 12px;
|
|
134
|
-
padding: 14px 18px;
|
|
135
|
-
background: ${a.colors.softWhite};
|
|
136
|
-
border-bottom: 1px solid ${a.colors.line};
|
|
137
|
-
|
|
138
|
-
${a.media.maxWidth("mobile")} {
|
|
139
|
-
flex-wrap: wrap;
|
|
140
|
-
}
|
|
141
|
-
`,C=h.div`
|
|
142
|
-
display: flex;
|
|
143
|
-
flex-direction: column;
|
|
144
|
-
gap: 2px;
|
|
145
|
-
min-width: 0;
|
|
146
|
-
`,S=h.span`
|
|
147
|
-
font-weight: 700;
|
|
148
|
-
color: ${a.colors.text};
|
|
149
|
-
`,F=h.span`
|
|
150
|
-
font-size: 13px;
|
|
151
|
-
color: ${a.colors.muted};
|
|
152
|
-
`,M=h.div`
|
|
153
|
-
display: flex;
|
|
154
|
-
align-items: center;
|
|
155
|
-
gap: 14px;
|
|
156
|
-
/* Pin to the right regardless of how many elements sit on the left (the credit-purchase card adds a
|
|
157
|
-
leading thumbnail, giving the head three children instead of two). */
|
|
158
|
-
margin-left: auto;
|
|
159
|
-
`,ct=h.div`
|
|
160
|
-
flex: 0 0 auto;
|
|
161
|
-
width: 52px;
|
|
162
|
-
height: 52px;
|
|
163
|
-
border-radius: 10px;
|
|
164
|
-
background: ${a.colors.media};
|
|
165
|
-
display: flex;
|
|
166
|
-
align-items: center;
|
|
167
|
-
justify-content: center;
|
|
168
|
-
|
|
169
|
-
img {
|
|
170
|
-
width: 30px;
|
|
171
|
-
height: 30px;
|
|
172
|
-
display: block;
|
|
173
|
-
}
|
|
174
|
-
`,D=h.span`
|
|
175
|
-
font-size: 11px;
|
|
176
|
-
font-weight: 700;
|
|
177
|
-
text-transform: uppercase;
|
|
178
|
-
letter-spacing: 0.03em;
|
|
179
|
-
padding: 4px 10px;
|
|
180
|
-
border-radius: ${a.radius.pill};
|
|
181
|
-
white-space: nowrap;
|
|
182
|
-
|
|
183
|
-
&[data-status='SETTLED'] {
|
|
184
|
-
background: rgba(30, 166, 114, 0.14);
|
|
185
|
-
color: ${a.colors.okStrong};
|
|
186
|
-
}
|
|
187
|
-
&[data-status='PENDING'] {
|
|
188
|
-
background: rgba(245, 166, 35, 0.16);
|
|
189
|
-
color: #b5790a;
|
|
190
|
-
}
|
|
191
|
-
&[data-status='SOLD'] {
|
|
192
|
-
background: rgba(103, 58, 183, 0.14);
|
|
193
|
-
color: ${a.colors.accent};
|
|
194
|
-
}
|
|
195
|
-
&[data-status='FAILED'] {
|
|
196
|
-
background: rgba(214, 61, 61, 0.14);
|
|
197
|
-
color: #b02a2a;
|
|
198
|
-
}
|
|
199
|
-
/* Nobody paid and nobody is owed anything — deliberately the quietest of the four. Reusing PENDING's
|
|
200
|
-
amber here is what made an abandoned checkout look like money on its way. */
|
|
201
|
-
&[data-status='UNFINISHED'] {
|
|
202
|
-
background: ${a.colors.line};
|
|
203
|
-
color: ${a.colors.muted};
|
|
204
|
-
}
|
|
205
|
-
`,dt=h.button`
|
|
206
|
-
font-size: 11px;
|
|
207
|
-
font-weight: 700;
|
|
208
|
-
text-transform: uppercase;
|
|
209
|
-
letter-spacing: 0.03em;
|
|
210
|
-
padding: 4px 10px;
|
|
211
|
-
border-radius: ${a.radius.pill};
|
|
212
|
-
white-space: nowrap;
|
|
213
|
-
border: 1px solid ${a.colors.accent};
|
|
214
|
-
background: transparent;
|
|
215
|
-
color: ${a.colors.accent};
|
|
216
|
-
cursor: pointer;
|
|
217
|
-
transition: background 0.15s ease;
|
|
218
|
-
|
|
219
|
-
&:hover:not(:disabled) {
|
|
220
|
-
background: rgba(103, 58, 183, 0.08);
|
|
221
|
-
}
|
|
222
|
-
&:disabled {
|
|
223
|
-
opacity: 0.6;
|
|
224
|
-
cursor: default;
|
|
225
|
-
}
|
|
226
|
-
`,j=h.div`
|
|
227
|
-
display: flex;
|
|
228
|
-
align-items: center;
|
|
229
|
-
gap: 5px;
|
|
230
|
-
font-weight: 800;
|
|
231
|
-
color: ${a.colors.text};
|
|
232
|
-
white-space: nowrap;
|
|
233
|
-
|
|
234
|
-
.ccy-mark {
|
|
235
|
-
width: 16px;
|
|
236
|
-
height: 16px;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
// Money received (a sale) reads as income in the shop's success green.
|
|
240
|
-
&[data-kind='income'] {
|
|
241
|
-
color: ${a.colors.okStrong};
|
|
242
|
-
}
|
|
243
|
-
`,le=h.img`
|
|
244
|
-
width: 16px;
|
|
245
|
-
height: 16px;
|
|
246
|
-
vertical-align: -0.15em;
|
|
247
|
-
`,lt=h.span`
|
|
248
|
-
display: inline-flex;
|
|
249
|
-
align-items: center;
|
|
250
|
-
cursor: pointer;
|
|
251
|
-
`,ht=h.span`
|
|
252
|
-
position: fixed;
|
|
253
|
-
transform: translateX(-50%);
|
|
254
|
-
padding: 6px 8px;
|
|
255
|
-
border-radius: 6px;
|
|
256
|
-
background: #16141a;
|
|
257
|
-
color: ${a.colors.white};
|
|
258
|
-
font-size: 12px;
|
|
259
|
-
font-weight: 600;
|
|
260
|
-
line-height: 1;
|
|
261
|
-
white-space: nowrap;
|
|
262
|
-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
263
|
-
pointer-events: none;
|
|
264
|
-
z-index: 9999;
|
|
265
|
-
`,W=h.div`
|
|
266
|
-
display: flex;
|
|
267
|
-
flex-direction: column;
|
|
268
|
-
`,O=h.div`
|
|
269
|
-
display: grid;
|
|
270
|
-
grid-template-columns: 52px 1fr auto;
|
|
271
|
-
align-items: center;
|
|
272
|
-
gap: 14px;
|
|
273
|
-
padding: 12px 18px;
|
|
274
|
-
text-decoration: none;
|
|
275
|
-
color: inherit;
|
|
276
|
-
|
|
277
|
-
& + & {
|
|
278
|
-
border-top: 1px solid ${a.colors.line};
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
&[data-link='true'] {
|
|
282
|
-
transition: background 0.15s;
|
|
283
|
-
}
|
|
284
|
-
&[data-link='true']:hover {
|
|
285
|
-
background: ${a.colors.media};
|
|
286
|
-
}
|
|
287
|
-
&[data-link='true']:focus-visible {
|
|
288
|
-
outline: 2px solid ${a.colors.accent};
|
|
289
|
-
outline-offset: -2px;
|
|
290
|
-
}
|
|
291
|
-
`,B=h.div`
|
|
292
|
-
width: 52px;
|
|
293
|
-
height: 52px;
|
|
294
|
-
border-radius: 10px;
|
|
295
|
-
background: ${a.colors.media};
|
|
296
|
-
overflow: hidden;
|
|
297
|
-
display: flex;
|
|
298
|
-
align-items: center;
|
|
299
|
-
justify-content: center;
|
|
300
|
-
color: ${a.colors.muted2};
|
|
301
|
-
|
|
302
|
-
img {
|
|
303
|
-
width: 100%;
|
|
304
|
-
height: 100%;
|
|
305
|
-
object-fit: contain;
|
|
306
|
-
}
|
|
307
|
-
`,U=h.div`
|
|
308
|
-
width: 52px;
|
|
309
|
-
height: 52px;
|
|
310
|
-
border-radius: 10px;
|
|
311
|
-
background: linear-gradient(100deg, ${a.colors.media} 30%, ${a.colors.panel} 50%, ${a.colors.media} 70%);
|
|
312
|
-
background-size: 200% 100%;
|
|
313
|
-
animation: ${G} 1.3s infinite linear;
|
|
314
|
-
|
|
315
|
-
@media (prefers-reduced-motion: reduce) {
|
|
316
|
-
animation: none;
|
|
317
|
-
}
|
|
318
|
-
`,K=h.div`
|
|
319
|
-
min-width: 0;
|
|
320
|
-
display: flex;
|
|
321
|
-
flex-direction: column;
|
|
322
|
-
gap: 2px;
|
|
323
|
-
`,Q=h.span`
|
|
324
|
-
font-weight: 700;
|
|
325
|
-
white-space: nowrap;
|
|
326
|
-
overflow: hidden;
|
|
327
|
-
text-overflow: ellipsis;
|
|
328
|
-
`,V=h.span`
|
|
329
|
-
display: inline-block;
|
|
330
|
-
width: 140px;
|
|
331
|
-
max-width: 60%;
|
|
332
|
-
height: 12px;
|
|
333
|
-
border-radius: 6px;
|
|
334
|
-
background: linear-gradient(100deg, ${a.colors.media} 30%, ${a.colors.panel} 50%, ${a.colors.media} 70%);
|
|
335
|
-
background-size: 200% 100%;
|
|
336
|
-
animation: ${G} 1.3s infinite linear;
|
|
337
|
-
|
|
338
|
-
@media (prefers-reduced-motion: reduce) {
|
|
339
|
-
animation: none;
|
|
340
|
-
}
|
|
341
|
-
`,X=h.span`
|
|
342
|
-
font-size: 13px;
|
|
343
|
-
color: ${a.colors.muted};
|
|
344
|
-
`,ut=h.div`
|
|
345
|
-
display: flex;
|
|
346
|
-
align-items: center;
|
|
347
|
-
gap: 4px;
|
|
348
|
-
font-weight: 700;
|
|
349
|
-
color: ${a.colors.text};
|
|
350
|
-
white-space: nowrap;
|
|
351
|
-
|
|
352
|
-
.ccy-mark {
|
|
353
|
-
width: 14px;
|
|
354
|
-
height: 14px;
|
|
355
|
-
}
|
|
356
|
-
`,ae=h.div`
|
|
357
|
-
height: 132px;
|
|
358
|
-
border-radius: 16px;
|
|
359
|
-
border: 1px solid transparent;
|
|
360
|
-
background: linear-gradient(100deg, ${a.colors.media} 30%, ${a.colors.panel} 50%, ${a.colors.media} 70%);
|
|
361
|
-
background-size: 200% 100%;
|
|
362
|
-
animation: ${G} 1.3s infinite linear;
|
|
363
|
-
|
|
364
|
-
@media (prefers-reduced-motion: reduce) {
|
|
365
|
-
animation: none;
|
|
366
|
-
}
|
|
367
|
-
`,he=h.div`
|
|
368
|
-
display: flex;
|
|
369
|
-
flex-direction: column;
|
|
370
|
-
align-items: center;
|
|
371
|
-
gap: 8px;
|
|
372
|
-
text-align: center;
|
|
373
|
-
padding: 90px 20px;
|
|
374
|
-
min-height: 50vh;
|
|
375
|
-
`,ue=h.p`
|
|
376
|
-
font-size: 22px;
|
|
377
|
-
font-weight: 700;
|
|
378
|
-
margin: 6px 0 0;
|
|
379
|
-
`,pt=h(Le)`
|
|
380
|
-
margin-top: 12px;
|
|
381
|
-
`,Y=O.withComponent(re),xt=g.lazy(()=>Te(()=>import("./index-D8LZCVOB.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,mt=["all","purchases","sales"],H="section",ne="listings",q="view",gt="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),r=()=>{var u;const c=(u=s.current)==null?void 0:u.getBoundingClientRect();c&&i({top:c.bottom+8,left:c.left+c.width/2})};return t.jsxs(lt,{ref:s,tabIndex:0,onMouseEnter:r,onMouseLeave:()=>i(null),onFocus:r,onBlur:()=>i(null),children:[e,n?qe.createPortal(t.jsx(ht,{style:{top:n.top,left:n.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function ft({item:e}){const s=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||s,{data:i,isLoading:r}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Oe(e.tradeId):_(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),c=n&&r,u=(i==null?void 0:i.name)??d("activity.itemFallback"),o=(i==null?void 0:i.thumbnail)??"",x=R({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:[c?t.jsx(U,{}):t.jsx(B,{children:o?t.jsx("img",{src:o,alt:u}):t.jsx($,{name:"cart",size:20})}),t.jsxs(K,{children:[c?t.jsx(V,{}):t.jsx(Q,{title:u,children:u}),e.quantity>1?t.jsx(X,{children:d("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(ut,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]});return x?t.jsx(Y,{to:x,"data-link":"true",children:f}):t.jsx(O,{children:f})}function bt({order:e}){const s=Ue(e.lines),n=s.reduce((i,r)=>i+r.quantity,0);return t.jsxs(E,{"data-testid":"purchase-order",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:I(e.createdAt)}),t.jsxs(F,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:n})]})]}),t.jsxs(M,{children:[t.jsx(D,{"data-status":e.status,children:e.status==="PENDING"?d("activity.processing"):d("activity.completed")}),t.jsxs(j,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.totalCredits]})]})]}),t.jsx(W,{children:s.map(i=>t.jsx(ft,{item:i},i.key))})]})}function yt({sale:e}){const{data:s,isLoading:n}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>_(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??d("activity.itemFallback"),r=(s==null?void 0:s.thumbnail)??"",c=R({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,u=t.jsxs(t.Fragment,{children:[n?t.jsx(U,{}):t.jsx(B,{children:r?t.jsx("img",{src:r,alt:i}):t.jsx($,{name:"offer",size:20})}),t.jsxs(K,{children:[n?t.jsx(V,{}):t.jsx(Q,{title:i,children:i}),t.jsx(X,{children:d("activity.boughtFrom",{account:pe(e.seller)})})]})]});return t.jsxs(E,{"data-testid":"activity-mana-purchase",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:I(e.createdAt)}),t.jsx(F,{children:d("activity.paidWithMana")})]}),t.jsxs(M,{children:[t.jsx(D,{"data-status":"SETTLED",children:d("activity.completed")}),t.jsxs(j,{children:[xe(e.manaWei)," ",t.jsx(me,{children:t.jsx(le,{src:oe,alt:"MANA"})})]})]})]}),t.jsx(W,{children:c?t.jsx(Y,{to:c,"data-link":"true",children:u}):t.jsx(O,{children:u})})]})}function vt({sale:e,payout:s}){const{data:n,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>_(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),r=(n==null?void 0:n.name)??d("activity.itemFallback"),c=(n==null?void 0:n.thumbnail)??"",u=R({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,o=t.jsxs(t.Fragment,{children:[i?t.jsx(U,{}):t.jsx(B,{children:c?t.jsx("img",{src:c,alt:r}):t.jsx($,{name:"offer",size:20})}),t.jsxs(K,{children:[i?t.jsx(V,{}):t.jsx(Q,{title:r,children:r}),t.jsxs(X,{children:[d("activity.soldTo",{account:pe(e.counterparty)}),s.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return t.jsxs(E,{"data-testid":"activity-sale",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:I(e.createdAt)}),t.jsx(F,{children:d("activity.saleLabel")})]}),t.jsxs(M,{children:[t.jsx(D,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),s.kind==="direct"?t.jsxs(j,{"data-kind":"income",children:["+",xe(e.manaWei)," ",t.jsx(me,{children:t.jsx(le,{src:oe,alt:"MANA"})})]}):s.credits!==null?t.jsxs(j,{"data-kind":"income",children:[t.jsx(N,{className:"ccy-mark"})," +",Fe(s.credits)]}):t.jsx(j,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),t.jsx(W,{children:u?t.jsx(Y,{to:u,"data-link":"true",children:o}):t.jsx(O,{children:o})})]})}function wt({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,n=Ce(e.status),i=n==="SETTLED"?d("activity.completed"):n==="FAILED"?d("activity.failed"):n==="UNFINISHED"?d("activity.unfinished"):d("activity.processing"),r=z(p=>p.session),c=Se(),[u,o]=g.useState(!1),x=e.status==="initiated"&&!!r;async function f(){if(!(!r||u)){o(!0);try{const p=await Me(e.id,r.identity);if(p){window.location.href=p;return}De.info(d("activity.resumeExpired")),c.invalidateQueries({queryKey:["credit-orders"]})}finally{o(!1)}}}return t.jsx(E,{"data-testid":"credit-order",children:t.jsxs(T,{children:[t.jsx(ct,{children:t.jsx("img",{src:et,alt:"","aria-hidden":!0})}),t.jsxs(C,{children:[t.jsx(S,{children:I(e.createdAt)}),t.jsxs(F,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:s})]})]}),t.jsxs(M,{children:[x?t.jsx(dt,{type:"button",onClick:()=>void f(),disabled:u,"data-testid":"resume-order",children:u?d("activity.resuming"):d("activity.resume")}):null,t.jsx(D,{"data-status":n,children:i}),t.jsxs(j,{"data-kind":"income",children:["+",t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]})]})})}function jt({filter:e}){const s={all:{icon:"clock",title:d("activity.emptyAllTitle"),body:d("activity.emptyAllBody")},purchases:{icon:"cart",title:d("activity.emptyPurchasesTitle"),body:d("activity.emptyPurchasesBody")},sales:{icon:"offer",title:d("activity.emptySalesTitle"),body:d("activity.emptySalesBody")}}[e];return t.jsxs(he,{children:[t.jsx($,{name:s.icon,size:40,color:a.colors.muted2}),t.jsx(ue,{children:s.title}),t.jsx("p",{className:"muted",children:s.body}),e!=="sales"?t.jsx(pt,{as:re,to:"/items",variant:"purple",children:d("notFound.cta")}):null]})}function Dt(){const{session:e}=z(),[s,n]=g.useState("all"),[i,r]=He(),c=i.get(H)===ne||i.get(q)===gt;Pe({title:c?d("seo.import.title"):d("nav.activity"),noindex:!0});const{count:u}=ze(),{count:o}=Je(),f=u!==void 0&&o!==void 0&&(u>0||o>0||c),p=!!e&&!c&&s!=="sales",m=!!e&&!c&&s!=="purchases",b=L(["purchases",e==null?void 0:e.address],l=>Ee(e.address,e.identity,{first:P,skip:l}),{enabled:p}),y=L(["sales",e==null?void 0:e.address],l=>te(e.address,{role:"seller",first:P,skip:l}),{enabled:m}),v=L(["credit-orders",e==null?void 0:e.address],l=>ie(e.address,e.identity,{first:P,skip:l}),{enabled:p}),w=L(["mana-purchases",e==null?void 0:e.address],l=>te(e.address,{role:"buyer",first:P,skip:l}),{enabled:p}),{data:Z}=A({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ie(e.address,e.identity,{first:200}).then(l=>l.payouts),enabled:m,staleTime:6e4}),ge=g.useMemo(()=>Xe(Z),[Z]),{data:fe}=Ne(m);if(!e)return t.jsxs(he,{children:[t.jsx($,{name:"clock",size:40,color:a.colors.muted2}),t.jsx(ue,{children:d("activity.signInTitle")}),t.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const J=Ve(Qe({purchases:p?b.items:[],sales:m?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?w.items:[],rate:fe}),s),be=p&&(b.isLoading||v.isLoading||w.isLoading)||m&&y.isLoading,ee=p&&(b.isFetchingNextPage||v.isFetchingNextPage||w.isFetchingNextPage)||m&&y.isFetchingNextPage,ye=p&&(b.hasNextPage||v.hasNextPage||w.hasNextPage)||m&&y.hasNextPage;function ve(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&w.hasNextPage&&w.fetchNextPage(),m&&y.hasNextPage&&y.fetchNextPage()}function we(l){if(n(l),!c)return;const k=new URLSearchParams(i);k.delete(H),k.delete(q),r(k,{replace:!0})}function je(){const l=new URLSearchParams(i);l.set(H,ne),l.delete(q),r(l,{replace:!0})}return t.jsxs(tt,{children:[t.jsx(it,{children:t.jsx(st,{children:d("nav.activity")})}),t.jsxs(at,{role:"tablist","aria-label":d("nav.activity"),children:[mt.map(l=>t.jsx(de,{type:"button",role:"tab","aria-selected":!c&&s===l,"data-active":!c&&s===l,"data-testid":`activity-filter-${l}`,onClick:()=>we(l),children:d(`activity.filter.${l}`)},l)),f?t.jsxs(nt,{type:"button",role:"tab","aria-selected":c,"data-active":c,"data-testid":"activity-filter-migrate","aria-label":u?d("activity.migrate.chipAria",{count:u}):void 0,onClick:je,children:[d("activity.migrate.chip"),u?t.jsx(rt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:u}):null]}):null]}),c?t.jsx(g.Suspense,{fallback:t.jsx(ot,{"aria-busy":"true"}),children:t.jsx(xt,{})}):be?t.jsx(se,{children:Array.from({length:5}).map((l,k)=>t.jsx(ae,{},k))}):J.length===0?t.jsx(jt,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(se,{children:[J.map(l=>l.kind==="purchase"?t.jsx(bt,{order:l.order},l.id):l.kind==="credit"?t.jsx(wt,{order:l.order},l.id):l.kind==="mana-purchase"?t.jsx(yt,{sale:l.sale},l.id):t.jsx(vt,{sale:l.sale,payout:Ye(ge,l.sale)},l.id)),ee?t.jsx(ae,{}):null]}),t.jsx(Re,{hasNextPage:ye,isFetching:ee,onLoadMore:ve})]})]})}export{Dt as Activity};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import{r as l,j as v}from"./react-BYHuwl8r.js";import{s as u}from"./index-buu21jrH.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.10.1-31040959942.commit-e9e6433/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.10.1-31040959942.commit-e9e6433/_assets/DCL_LogoPattern-BryBPc3d.png",U=`
|
|
2
|
-
attribute vec2 a_position;
|
|
3
|
-
varying vec2 v_uv;
|
|
4
|
-
void main() {
|
|
5
|
-
v_uv = a_position * 0.5 + 0.5;
|
|
6
|
-
gl_Position = vec4(a_position, 0.0, 1.0);
|
|
7
|
-
}
|
|
8
|
-
`,P=`
|
|
9
|
-
precision highp float;
|
|
10
|
-
|
|
11
|
-
uniform float u_time;
|
|
12
|
-
uniform vec2 u_resolution;
|
|
13
|
-
uniform sampler2D u_overlayTex;
|
|
14
|
-
|
|
15
|
-
varying vec2 v_uv;
|
|
16
|
-
|
|
17
|
-
const vec4 innerColor = vec4(0.749, 0.0, 1.0, 1.0);
|
|
18
|
-
const vec4 outerColor = vec4(0.3176, 0.0235, 0.5176, 1.0);
|
|
19
|
-
const float vignetteRadius = 0.167;
|
|
20
|
-
const float vignetteSmoothness = 0.5;
|
|
21
|
-
const vec4 overlayColor = vec4(1.0, 1.0, 1.0, 1.0);
|
|
22
|
-
const float overlayTiling = 1.66;
|
|
23
|
-
const vec2 overlayDirection = vec2(1.0, -1.25);
|
|
24
|
-
const float overlaySpeed = 0.06;
|
|
25
|
-
const float overlayAlpha = 0.573;
|
|
26
|
-
const vec4 glowColor = vec4(0.5725, 0.0588, 0.6392, 1.0);
|
|
27
|
-
const float glowStrength = 0.17;
|
|
28
|
-
const vec2 glowRadiusVec = vec2(0.05, 0.13);
|
|
29
|
-
const float glowSmoothness = 3.61;
|
|
30
|
-
const vec2 glowCenter = vec2(0.68, 0.5);
|
|
31
|
-
const float luminosityStrength = 0.541;
|
|
32
|
-
|
|
33
|
-
vec3 rgb2hsv(vec3 c) {
|
|
34
|
-
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
|
|
35
|
-
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
|
|
36
|
-
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
|
|
37
|
-
float d = q.x - min(q.w, q.y);
|
|
38
|
-
float e = 1e-10;
|
|
39
|
-
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
vec3 hsv2rgb(vec3 c) {
|
|
43
|
-
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
|
44
|
-
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
|
|
45
|
-
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
void main() {
|
|
49
|
-
vec2 uv = v_uv;
|
|
50
|
-
|
|
51
|
-
vec2 centerUV = uv - 0.5;
|
|
52
|
-
float rad = length(centerUV);
|
|
53
|
-
float mask = smoothstep(vignetteRadius + vignetteSmoothness, vignetteRadius, rad);
|
|
54
|
-
vec4 vignette = mix(outerColor, innerColor, mask);
|
|
55
|
-
|
|
56
|
-
float aspect = u_resolution.x / u_resolution.y;
|
|
57
|
-
vec2 overlayUV = uv;
|
|
58
|
-
overlayUV.x *= overlayTiling * aspect;
|
|
59
|
-
overlayUV.y *= overlayTiling;
|
|
60
|
-
overlayUV += u_time * overlayDirection * overlaySpeed;
|
|
61
|
-
vec4 overlay = texture2D(u_overlayTex, overlayUV) * overlayColor;
|
|
62
|
-
overlay.a *= overlayAlpha * mask;
|
|
63
|
-
|
|
64
|
-
vec3 vignetteHSV = rgb2hsv(vignette.rgb);
|
|
65
|
-
vec3 overlayHSV = rgb2hsv(overlay.rgb);
|
|
66
|
-
float val = mix(0.5, 1.0, overlayHSV.z);
|
|
67
|
-
vec3 luminosityBlend = hsv2rgb(vec3(vignetteHSV.x, vignetteHSV.y, val));
|
|
68
|
-
float luminosityBlendAmount = overlay.a * luminosityStrength;
|
|
69
|
-
vec4 result = vec4(mix(vignette.rgb, luminosityBlend, luminosityBlendAmount), 1.0);
|
|
70
|
-
|
|
71
|
-
vec2 glowDelta = (uv - glowCenter) / glowRadiusVec;
|
|
72
|
-
glowDelta.x *= aspect;
|
|
73
|
-
float glowDist = length(glowDelta);
|
|
74
|
-
float glowMask = 1.0 - smoothstep(1.0, 1.0 + glowSmoothness, glowDist);
|
|
75
|
-
vec4 glow = glowColor * glowMask * glowStrength;
|
|
76
|
-
result.rgb += glow.rgb * glow.a;
|
|
77
|
-
|
|
78
|
-
gl_FragColor = result;
|
|
79
|
-
}
|
|
80
|
-
`;function p(t,n,r){const e=t.createShader(n);return e?(t.shaderSource(e,r),t.compileShader(e),t.getShaderParameter(e,t.COMPILE_STATUS)?e:(console.error("Shader compile error:",t.getShaderInfoLog(e)),t.deleteShader(e),null)):null}function D(t,n,r){const e=t.createProgram();return e?(t.attachShader(e,n),t.attachShader(e,r),t.linkProgram(e),t.getProgramParameter(e,t.LINK_STATUS)?e:(console.error("Program link error:",t.getProgramInfoLog(e)),t.deleteProgram(e),null)):null}function L(t,n,r){const e=t.createTexture();if(!e)return null;t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{r!=null&&r()||(t.bindTexture(t.TEXTURE_2D,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.generateMipmap(t.TEXTURE_2D))},o.src=n,e}const B=u.div`
|
|
81
|
-
position: absolute;
|
|
82
|
-
inset: 0;
|
|
83
|
-
overflow: hidden;
|
|
84
|
-
`,F=u.div`
|
|
85
|
-
position: absolute;
|
|
86
|
-
inset: 0;
|
|
87
|
-
width: 100%;
|
|
88
|
-
height: 100%;
|
|
89
|
-
background-size: cover;
|
|
90
|
-
background-position: center;
|
|
91
|
-
background-repeat: no-repeat;
|
|
92
|
-
`,I=u.canvas`
|
|
93
|
-
position: absolute;
|
|
94
|
-
inset: 0;
|
|
95
|
-
width: 100%;
|
|
96
|
-
height: 100%;
|
|
97
|
-
`;function G(){const t=l.useRef(null),n=l.useRef(0);return l.useEffect(()=>{var x;const r=t.current;if(!r||(x=window.matchMedia)!=null&&x.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=p(e,e.VERTEX_SHADER,U),i=p(e,e.FRAGMENT_SHADER,P);if(!o||!i){o&&e.deleteShader(o),i&&e.deleteShader(i);return}const a=D(e,o,i);if(!a){e.deleteShader(o),e.deleteShader(i);return}const m=e.getAttribLocation(a,"a_position"),R=e.getUniformLocation(a,"u_time"),_=e.getUniformLocation(a,"u_resolution"),y=e.getUniformLocation(a,"u_overlayTex"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),e.STATIC_DRAW);let d=!1;const f=L(e,b,()=>d),w=()=>{const c=window.devicePixelRatio||1,E=r.clientWidth*c,g=r.clientHeight*c;(r.width!==E||r.height!==g)&&(r.width=E,r.height=g)},A=performance.now()/1e3,h=()=>{w(),e.viewport(0,0,r.width,r.height),e.useProgram(a),e.uniform1f(R,performance.now()/1e3-A),e.uniform2f(_,r.width,r.height),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,f),e.uniform1i(y,0),e.enableVertexAttribArray(m),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(m,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,6),n.current=requestAnimationFrame(h)},T=c=>{c.preventDefault(),cancelAnimationFrame(n.current),r.style.opacity="0"};return r.addEventListener("webglcontextlost",T,!1),n.current=requestAnimationFrame(h),()=>{d=!0,cancelAnimationFrame(n.current),r.removeEventListener("webglcontextlost",T),e.deleteProgram(a),e.deleteShader(o),e.deleteShader(i),e.deleteBuffer(s),e.deleteTexture(f)}},[]),v.jsxs(B,{"aria-hidden":!0,children:[v.jsx(F,{style:{backgroundImage:`url(${S})`}}),v.jsx(I,{ref:t})]})}export{G as default};
|