@dcl/shop 1.11.3-33096177368.commit-6f0f3de → 1.11.3
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-DDiEmOsx.js → Activity-BEOVOdVV.js} +6 -6
- package/_assets/{AnimatedBackground-CVHTTGZi.js → AnimatedBackground-wAz9Odt0.js} +2 -2
- package/_assets/{Assets-R174CnUb.js → Assets-P4H-lV4U.js} +61 -61
- package/_assets/{Authorizations-BpQ-lzdP.js → Authorizations-BUN1TioY.js} +2 -2
- package/_assets/{Cart-BsI419x2.js → Cart-CUPHFj39.js} +2 -2
- package/_assets/{Collection-C620zyzC.js → Collection-BHRp_9DS.js} +2 -2
- package/_assets/{CollectionCarousel-Cwf724uA.js → CollectionCarousel-7w9vcOQY.js} +3 -3
- package/_assets/{Confetti-CB1yZzVw.js → Confetti-CYh3a_SI.js} +4 -4
- package/_assets/{ConstantsUtil-CFYdyJk0.js → ConstantsUtil-DblXIgum.js} +2 -2
- package/_assets/{ContentClient-GzostOsU.js → ContentClient-BgeGbQMc.js} +2 -2
- package/_assets/{Creator-DxjcHNGc.js → Creator-DHomo97d.js} +2 -2
- package/_assets/{DeploymentBuilder-DDKLtbBM.js → DeploymentBuilder-j66rJfGs.js} +2 -2
- package/_assets/{EmotePlaybackBar-DVIeTHjQ.js → EmotePlaybackBar-BERHYvEN.js} +3 -3
- package/_assets/{ErrorNotice-DGpmSHFq.js → ErrorNotice-AmLNAAkn.js} +2 -2
- package/_assets/{ExchangeController-56N8xni5.js → ExchangeController-CxJiKrmf.js} +2 -2
- package/_assets/{Faq-mlHE1lJ-.js → Faq-B-2IAlN1.js} +2 -2
- package/_assets/{GetCredits-DsOH_PZB.js → GetCredits-ncUz7MSF.js} +2 -2
- package/_assets/{Grow-D6DG-S-e.js → Grow-BrH_WQ15.js} +2 -2
- package/_assets/{HelpersUtil-BjRYK1HI.js → HelpersUtil-PZUZTOEJ.js} +2 -2
- package/_assets/{ItemDetail-DO0vMUED.js → ItemDetail-CTfaTNRb.js} +2 -2
- package/_assets/{LoadMore-CHhSQR_A.js → LoadMore-DscEf3Fk.js} +2 -2
- package/_assets/{ManaPricingBanner.styles-CAJcVFK8.js → ManaPricingBanner.styles-D9T4JSll.js} +2 -2
- package/_assets/{MyAssets-Dj6Kvu7N.js → MyAssets-D-0qpt_J.js} +2 -2
- package/_assets/{MyFavorites-BF76BQio.js → MyFavorites-BM0Fy0t_.js} +2 -2
- package/_assets/{NetworkUtil-DuWsUf1s.js → NetworkUtil-CcWpYyVE.js} +2 -2
- package/_assets/{NotFound-DMt0E07P.js → NotFound-DngznS1a.js} +2 -2
- package/_assets/{NotificationsBell-CFknF7nN.js → NotificationsBell-DlvSN7Il.js} +2 -2
- package/_assets/{OutfitDetail-CqvqCpur.js → OutfitDetail-DASkQM6x.js} +2 -2
- package/_assets/{OutfitPreview-BWSHYJQo.js → OutfitPreview-CuWTYpJV.js} +2 -2
- package/_assets/{OutfitStudio-YYVzC2vq.js → OutfitStudio-CI-08PA0.js} +2 -2
- package/_assets/{StoreSettings-Bcj58Qsl.js → StoreSettings-CrnV-oDS.js} +22 -22
- package/_assets/{Success-DQFnJCq1.js → Success-CuN1jEku.js} +2 -2
- package/_assets/{SwapController-BG_0Rnli.js → SwapController-CD6bIKjn.js} +2 -2
- package/_assets/{TradeService-BQ0LfIIn.js → TradeService-BBCk0RYw.js} +2 -2
- package/_assets/{W3MFrameProviderSingleton-DFZh2-P1.js → W3MFrameProviderSingleton-35iFXIWF.js} +4 -4
- package/_assets/{WebCryptoP256-DY-BoRUy.js → WebCryptoP256-Cf-XLLKK.js} +2 -2
- package/_assets/{authorizations-r_yIs4_S.js → authorizations-BYnIZF10.js} +2 -2
- package/_assets/{basic-NTA-d2L3.js → basic-Kurqa6Hg.js} +2 -2
- package/_assets/{biconomy-Ca4RWWX7.js → biconomy-DGTyqkE9.js} +2 -2
- package/_assets/{browseLayout.styles-B5WZBOX4.js → browseLayout.styles-C3O3rJ6E.js} +2 -2
- package/_assets/{browser-BSJZzHk7.js → browser-CKLQ1qFk.js} +2 -2
- package/_assets/{browser-ponyfill-BfJ9XPXG.js → browser-ponyfill-DiBM5SBC.js} +2 -2
- package/_assets/{builder-C7euKgzs.js → builder-Db2C6JNf.js} +2 -2
- package/_assets/{buy-BBspDwaD.js → buy-Tscnuj8P.js} +2 -2
- package/_assets/{buy-gasless-CDHGUFyR.js → buy-gasless-C1ToktQG.js} +2 -2
- package/_assets/{categories-CSWMIFKV.js → categories-B1BKLZKW.js} +2 -2
- package/_assets/{ccip-C-7Q5nOx.js → ccip-05aiYT-K.js} +2 -2
- package/_assets/{ccip-D59yTDkH.js → ccip-CNYS3aQW.js} +2 -2
- package/_assets/{chains-Df2U73pw.js → chains-ZAiL12Bm.js} +2 -2
- package/_assets/collectionPage.styles-CUZMIu19.js +40 -0
- package/_assets/{common-Ced0DDGw.js → common-jIM0_xX0.js} +2 -2
- package/_assets/{controller-VIdMekC7.js → controller-Qvm0QW2h.js} +3 -3
- package/_assets/{core-DnqUUiNf.js → core-DANcYiPS.js} +5 -5
- package/_assets/{createSvgIcon-rpmuP-04.js → createSvgIcon-DqIhLrW2.js} +2 -2
- package/_assets/{custom-CaIsQUk6.js → custom-DTxuVuIB.js} +2 -2
- package/_assets/{data-capture-VFIfTOLh.js → data-capture-DD7sCiZr.js} +2 -2
- package/_assets/{dcl-schemas-D3MMsa96.js → dcl-schemas-BHtFmNb-.js} +2 -2
- package/_assets/{decimals-CbgB-D98.js → decimals-CjF-BdSX.js} +2 -2
- package/_assets/{decimals-Bhq5HaFG.js → decimals-Ckn9cRy4.js} +2 -2
- package/_assets/{detectExtension-CTH4nWTQ.js → detectExtension-Gnu7LiZD.js} +2 -2
- package/_assets/{disposePreview-Dhj7G1yu.js → disposePreview-BtvqOg7t.js} +2 -2
- package/_assets/{email-DKwgACJ9.js → email-DaxW64cs.js} +2 -2
- package/_assets/{embedded-wallet-BvFexqw_.js → embedded-wallet-B0Fwgs2K.js} +2 -2
- package/_assets/{emotion-styled.browser.esm--6OqWmeO.js → emotion-styled.browser.esm-BxkApjMl.js} +2 -2
- package/_assets/{engine-Cj_ytnKe.js → engine-JThGOFXd.js} +2 -2
- package/_assets/{errors-V6zhnTod.js → errors-C8Iz-trA.js} +2 -2
- package/_assets/{estimate-l1-fee-CRr-9P4j.js → estimate-l1-fee-Dbvud_Cw.js} +2 -2
- package/_assets/{eth_estimateGas-8PG-LgjK.js → eth_estimateGas-rS25vqwZ.js} +2 -2
- package/_assets/{eth_getStorageAt-CzRui93q.js → eth_getStorageAt-Dfz80jyN.js} +2 -2
- package/_assets/{eth_getTransactionCount-B6uEKHJJ.js → eth_getTransactionCount-T_shF7-r.js} +2 -2
- package/_assets/{ethereum-u7pXJb69.js → ethereum-CJCFASug.js} +2 -2
- package/_assets/{ethers-CFmosx3s.js → ethers-DgOG59Su.js} +2 -2
- package/_assets/{events-BijXrLgV.js → events-DibVD_t7.js} +2 -2
- package/_assets/{execute-B12s_EMl.js → execute-CNwyt0G_.js} +3 -3
- package/_assets/{extractIPFS-BO3gyVwL.js → extractIPFS-C9dhUG6w.js} +2 -2
- package/_assets/{features-DvGGBhy_.js → features-ol0SSx5c.js} +2 -2
- package/_assets/{fetchTokenMetadata-B-L9nStS.js → fetchTokenMetadata-lhSHn6xi.js} +3 -3
- package/_assets/{field.styles-BYvs7GyZ.js → field.styles-B41qYJoU.js} +2 -2
- package/_assets/{fortmatic-Dk7tB2Cc.js → fortmatic-uL_s0OSn.js} +2 -2
- package/_assets/{get-bytecode-CRhd_-w6.js → get-bytecode-BOwL4NWW.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-84hXtg9T.js → get-ecosystem-wallet-info-u8rFPFzM.js} +2 -2
- package/_assets/{getBalance-BZ5IqH6E.js → getBalance-ZoN1tP3C.js} +3 -3
- package/_assets/{getInstalledModules-BxDwRN8h.js → getInstalledModules-B4P_9Ec-.js} +2 -2
- package/_assets/{getNFT-B_RYObDB.js → getNFT-UlaoLDKl.js} +3 -3
- package/_assets/{getNFT-BlXV1Nbm.js → getNFT-xR-ZGgUx.js} +2 -2
- package/_assets/{grid.styles-B15cNj07.js → grid.styles-Bfq3tOD5.js} +2 -2
- package/_assets/{hashTypedData-iIDq5Ym-.js → hashTypedData-KzAb0OXw.js} +2 -2
- package/_assets/{hashTypedData-CvW0E5r9.js → hashTypedData-qEav_ih0.js} +2 -2
- package/_assets/{in-app-BtFFE7ZS.js → in-app-DsTcp9g1.js} +2 -2
- package/_assets/{in-app-wallet-calls-DUdTy2mQ.js → in-app-wallet-calls-BHDyG_Hm.js} +2 -2
- package/_assets/{index-CHp8Yn9f.js → index-B7wtabS1.js} +2 -2
- package/_assets/{index-SrWaz5aK.js → index-BB63hriw.js} +2 -2
- package/_assets/{index-DsLn2baO.js → index-BDoxreOH.js} +2 -2
- package/_assets/{index-DCrOq2wd.js → index-BEPvT81m.js} +2 -2
- package/_assets/{index-BzifxYje.js → index-BSUctRYP.js} +2 -2
- package/_assets/{index-CSUAwcgb.js → index-BSiVr0DD.js} +2 -2
- package/_assets/{index-xUQrDXPD.js → index-BTGqCcTp.js} +2 -2
- package/_assets/{index-kJ8yZh7l.js → index-BX5k8Ia-.js} +2 -2
- package/_assets/{index-Cu3FnKVy.js → index-BY7ZDgU3.js} +2 -2
- package/_assets/{index-BGa7JO1k.js → index-B_oRHv6S.js} +2 -2
- package/_assets/{index-DtHHdoPj.js → index-Ba6ZjOcU.js} +12 -12
- package/_assets/{index-CdKgL1QK.js → index-Be1NJYDT.js} +3 -3
- package/_assets/{index-CHDVYYal.js → index-Bh1_eNVo.js} +2 -2
- package/_assets/{index-BERlZlkD.js → index-Bmjs-VA2.js} +2 -2
- package/_assets/{index-C7t87Zs_.js → index-BvHOSZKj.js} +4 -4
- package/_assets/{index-DOYNCVik.js → index-C-Jqa8tU.js} +2 -2
- package/_assets/{index-hgUDiN1A.js → index-C-Vm4vxE.js} +2 -2
- package/_assets/{index-BtF9e9Uu.js → index-CAJOEhqU.js} +2 -2
- package/_assets/{index-asQzvqC5.js → index-CF0TwWos.js} +2 -2
- package/_assets/{index-DucxpIJX.js → index-CFSE-4g9.js} +4 -4
- package/_assets/{index-CwoKDI7V.js → index-CTVBoJue.js} +2 -2
- package/_assets/{index-BFQuWtYs.js → index-CUe36oKW.js} +2 -2
- package/_assets/{index-Awgz4ffT.js → index-CXi4JrFW.js} +2 -2
- package/_assets/{index-FwAqH4Jg.js → index-CbK4PiBW.js} +2 -2
- package/_assets/{index-D22uBSRA.js → index-Ce4Edp7-.js} +3 -3
- package/_assets/{index-shk4Nfrg.js → index-CkpRws4w.js} +2 -2
- package/_assets/{index-BfA6yQqc.js → index-ClTFdTLe.js} +2 -2
- package/_assets/{index-jDlI52U4.js → index-CmH_zvOx.js} +2 -2
- package/_assets/{index-DIURmrHc.js → index-CpepHIup.js} +2 -2
- package/_assets/{index-IzgVmiKy.js → index-CrE3Fjux.js} +2 -2
- package/_assets/{index-DGi-pDgC.js → index-CrawRT0o.js} +2 -2
- package/_assets/{index-phZzSnhX.js → index-CskSOnyZ.js} +2 -2
- package/_assets/{index-BynUY8x7.js → index-CvYt90O2.js} +2 -2
- package/_assets/{index-D6KrRNZn.js → index-CyyRHdbc.js} +3 -3
- package/_assets/{index-DTQo8MWQ.js → index-D-peO4dU.js} +2 -2
- package/_assets/{index-Cu7kQ3eJ.js → index-D3fQaxNZ.js} +2 -2
- package/_assets/{index-CtxqhjhC.js → index-DDo55DDH.js} +2 -2
- package/_assets/{index-75GXxbyC.js → index-DF6WG3qn.js} +2 -2
- package/_assets/{index-ET91y1L4.js → index-DMAEUsQc.js} +2 -2
- package/_assets/{index-Blu_X-5c.js → index-DNnRMWE4.js} +2 -2
- package/_assets/{index-Cd-qOUE-.js → index-DVjQDdLu.js} +4 -4
- package/_assets/{index-BtyN-hwY.js → index-DW3ULbU6.js} +2 -2
- package/_assets/{index-CQtnSuxq.js → index-DZJvVVBz.js} +2 -2
- package/_assets/{index-CitByYvg.js → index-Dana8qUZ.js} +2 -2
- package/_assets/{index-1aJPWImZ.js → index-DclRc8UN.js} +2 -2
- package/_assets/{index-CMAp5Zcw.js → index-DdQvxv6H.js} +2 -2
- package/_assets/{index-BJYAOcKy.js → index-DeldA2Me.js} +2 -2
- package/_assets/{index-4yyQV3Ii.js → index-DiQlp13b.js} +2 -2
- package/_assets/{index-DOZ6UG7t.js → index-DtVc4xk5.js} +2 -2
- package/_assets/{index-8Sq2Laxu.js → index-DvWRa5G-.js} +2 -2
- package/_assets/{index-BGRK42zM.js → index-DwM-JZSi.js} +2 -2
- package/_assets/{index-O3-idy_g.js → index-GKtnnyfC.js} +2 -2
- package/_assets/{index-D-jGbFC6.js → index-KBa4w5_b.js} +2 -2
- package/_assets/{index-B7yEfYvF.js → index-McPhRhdX.js} +2 -2
- package/_assets/{index-DyHgoZVr.js → index-XKm4O5jb.js} +2 -2
- package/_assets/{index-INu2i__0.js → index-XkbNngUP.js} +2 -2
- package/_assets/{index-Wv_D67im.js → index-YkV_OCpx.js} +2 -2
- package/_assets/{index-CX3dLd9W.js → index-bPrjbeDi.js} +2 -2
- package/_assets/{index-GMK5LYtv.js → index-btSRhLw4.js} +2 -2
- package/_assets/{index-CLoD3Be1.js → index-fmt3aBMt.js} +2 -2
- package/_assets/{index-DFLKOa3I.js → index-lZ0PPqQV.js} +2 -2
- package/_assets/{index-ChboSjzT.js → index-mkHeSqYe.js} +2 -2
- package/_assets/{index-DcdoZVBU.js → index-oAZ1ZU-c.js} +3 -3
- package/_assets/{index-CqyGsGNi.js → index-ozHAxPgl.js} +2 -2
- package/_assets/{index-Be3X4HXZ.js → index-vA8IIEKD.js} +2 -2
- package/_assets/{index-Bi_cxGZL.js → index-wfbbVR0C.js} +2 -2
- package/_assets/{index-juvpUDkX.js → index-yeutDs-n.js} +2 -2
- package/_assets/{index.es-Dk-yJOBf.js → index.es-7_2j1y1c.js} +2 -2
- package/_assets/{index.es-nTFebsyp.js → index.es-CX2yBV9N.js} +2 -2
- package/_assets/{index.es-B5BDv7Up.js → index.es-DiYQfgia.js} +2 -2
- package/_assets/{index.es-BKFBDEdF.js → index.es-Uf1O-fY2.js} +5 -5
- package/_assets/items-empty-Di8AuNKB.js +2 -0
- package/_assets/{jump-CKAtFOwO.js → jump-DKhwghhc.js} +2 -2
- package/_assets/{linkAccount-D37ZKt7i.js → linkAccount-CI2WbmeE.js} +2 -2
- package/_assets/{localBatchGatewayRequest-CnvnHVld.js → localBatchGatewayRequest-CfRrj7XF.js} +2 -2
- package/_assets/{native-CAETsTK5.js → native-Do2B-Qxb.js} +2 -2
- package/_assets/{networks-DRuoicxJ.js → networks-Dqe7-N6R.js} +2 -2
- package/_assets/{onramp-BwGhJ_q4.js → onramp-gJypUnb8.js} +2 -2
- package/_assets/{openzeppelin-DAbLTIrx.js → openzeppelin-CqvwIh1K.js} +2 -2
- package/_assets/{ownerOf-CccB5Df2.js → ownerOf-CSaLDIRi.js} +2 -2
- package/_assets/{parseNft-QMLtRgH8.js → parseNft-Abg8wFVh.js} +3 -3
- package/_assets/{parseSignature-DLhzdjdz.js → parseSignature-BMAMdfMY.js} +4 -4
- package/_assets/{parseSignature-DBFFz9Fc.js → parseSignature-BkC3FKxl.js} +2 -2
- package/_assets/{passkeys-DUhoeSr2.js → passkeys-BMA2Vzjg.js} +2 -2
- package/_assets/{pay-with-exchange-wv4pj6K4.js → pay-with-exchange-BbaFUQ7y.js} +2 -2
- package/_assets/{prepare-contract-call-CZgIb5_m.js → prepare-contract-call-CTis3Ksb.js} +2 -2
- package/_assets/{qr-overlay-BvMbYq7B.js → qr-overlay-C1Y4nmkc.js} +4 -4
- package/_assets/{react-Cu6RTeaf.js → react-DyPiTXWH.js} +2 -2
- package/_assets/{receive-B1TTNgiL.js → receive-BC-Faqrt.js} +2 -2
- package/_assets/{resolveImplementation-DqHPzOZ1.js → resolveImplementation-C7gGuPZF.js} +2 -2
- package/_assets/{resume-buy-DBJOysCn.js → resume-buy-CrOe5wve.js} +2 -2
- package/_assets/{rpc-DY_6x6sN.js → rpc-EFTC3eie.js} +2 -2
- package/_assets/{sales-empty-sKHyys3f.js → sales-empty-B90K0W8H.js} +2 -2
- package/_assets/{search-empty-BLqSZDPi.js → search-empty-GvvlNANs.js} +2 -2
- package/_assets/{secp256k1-CmiJzTHS.js → secp256k1-CSKPyg7G.js} +2 -2
- package/_assets/{secp256k1-WxEVCU75.js → secp256k1-Cth-fPBi.js} +2 -2
- package/_assets/{secp256k1-BEqU8sYg.js → secp256k1-DruP3eGK.js} +2 -2
- package/_assets/{send-CAIzabYu.js → send-CSn4ZY-1.js} +2 -2
- package/_assets/{send-batch-transaction-D8sYAmn9.js → send-batch-transaction-BJtaWfLS.js} +2 -2
- package/_assets/{send-eip712-transaction-Bj_Dviud.js → send-eip712-transaction-C4Sq8ViN.js} +3 -3
- package/_assets/{send-gasless-transaction-D1sAgdfS.js → send-gasless-transaction-6SwFGxtl.js} +3 -3
- package/_assets/{send-transaction-BlkeWOl3.js → send-transaction-BS3sJtZU.js} +3 -3
- package/_assets/{sendMetaTransaction-CqnRe296.js → sendMetaTransaction-DdKlulxU.js} +2 -2
- package/_assets/{sendRawTransaction-cowcF1Zi.js → sendRawTransaction-CoNlS87a.js} +4 -4
- package/_assets/{sentry-BIexM3hF.js → sentry-wjuCVNXH.js} +3 -3
- package/_assets/{serializeTransaction-DXNnXLd5.js → serializeTransaction-Be5yK09O.js} +2 -2
- package/_assets/{session-proposal-DKZwcLCZ.js → session-proposal-Cr1bW3vR.js} +2 -2
- package/_assets/{session-request-Dak6hx32.js → session-request-C7XtyHpP.js} +3 -3
- package/_assets/{sha256-D6LtjOnB.js → sha256-UiFg1E6a.js} +2 -2
- package/_assets/{signing-CeMNDy_m.js → signing-B6MLGmUe.js} +4 -4
- package/_assets/{skeleton.styles-BC2avkie.js → skeleton.styles-DGb4Vags.js} +2 -2
- package/_assets/{socials-ygRGzmms.js → socials-B1QMNGq2.js} +2 -2
- package/_assets/{styled-DjZ-UOQs.js → styled-Bgmkc9S2.js} +2 -2
- package/_assets/{swaps-DomEuyxC.js → swaps-DII4kYq8.js} +2 -2
- package/_assets/{thirdweb-pkB5sCqN.js → thirdweb-B1YDVAJI.js} +4 -4
- package/_assets/{to-serializable-transaction-BGYR6mL7.js → to-serializable-transaction-D2a8RSyu.js} +3 -3
- package/_assets/{totalSupply-_s3nO9Hq.js → totalSupply-Cz_d9KgH.js} +2 -2
- package/_assets/{transaction-Drph0tvC.js → transaction-CSbiSCR6.js} +2 -2
- package/_assets/{transactionReceipt-UBxlSqk5.js → transactionReceipt-Cs2L3s90.js} +2 -2
- package/_assets/{transactions-CHMKCKRv.js → transactions-BM0AB6rD.js} +2 -2
- package/_assets/{useCreditPacks-DV8TpCkV.js → useCreditPacks-oQYk8AXU.js} +2 -2
- package/_assets/{useInfiniteGrid-EJxCLDAB.js → useInfiniteGrid-BKQ811RA.js} +2 -2
- package/_assets/{useStore-CmOmf_pZ.js → useStore-Dvc10vNY.js} +3 -3
- package/_assets/{useTheme-CxS-nUL6.js → useTheme-kL3HtKAH.js} +2 -2
- package/_assets/{utils-DK0-s9yl.js → utils-6qnhg71x.js} +2 -2
- package/_assets/{verifyHash-C7Sy8sQa.js → verifyHash-CHp_1dkh.js} +2 -2
- package/_assets/{w3m-modal-dl0m9MGw.js → w3m-modal-BidasrnU.js} +2 -2
- package/_assets/{w3m-modal-DlSk4w8R.js → w3m-modal-D-YLR-nS.js} +2 -2
- package/_assets/{wait-for-tx-receipt-u8qlSCaY.js → wait-for-tx-receipt-CuAEC_h9.js} +2 -2
- package/_assets/{wallets-rkrKp4c1.js → wallets-IqNjjBUC.js} +6 -6
- package/_assets/{web-connector-B0ui-2UM.js → web-connector-B6ZK-KnR.js} +4 -4
- package/_assets/{writeContract-CIcRNaaC.js → writeContract-BhYblJOj.js} +2 -2
- package/_assets/{zora-sepolia-BMPN4lD4.js → zora-sepolia-MBZVLRHn.js} +2 -2
- package/_assets/{zoraTestnet-CnfxOehO.js → zoraTestnet-z1EEFkWs.js} +2 -2
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/collectionPage.styles-CVj8bQ38.js +0 -40
- package/_assets/items-empty-DtvQhcHO.js +0 -2
|
@@ -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-DyPiTXWH.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-Ba6ZjOcU.js";import{a as U,b as V,c as Y,d as tt,s as et,e as it}from"./authorizations-BYnIZF10.js";import{f as ot}from"./builder-Db2C6JNf.js";import{m as at}from"./mana-matic-CEqvSwrJ.js";import{f as nt}from"./errors-C8Iz-trA.js";import"./dcl-schemas-BHtFmNb-.js";import"./sentry-wjuCVNXH.js";import"./ethers-DgOG59Su.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-DdKlulxU.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-Cu6RTeaf.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-BUN1TioY.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-DyPiTXWH.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-Ba6ZjOcU.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-7w9vcOQY.js";import{k as Rs,l as Bs,e as qs,n as _s,f as Ws,A as Fs}from"./authorizations-BYnIZF10.js";import{p as _t,g as Ls,h as Ue}from"./buy-Tscnuj8P.js";import{w as Ks,S as Ge,b as Ns,G as Qs}from"./buy-gasless-C1ToktQG.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-oQYk8AXU.js";import{i as Ys,a as Js}from"./errors-C8Iz-trA.js";import{E as Xs}from"./ErrorNotice-AmLNAAkn.js";import"./dcl-schemas-BHtFmNb-.js";import"./sentry-wjuCVNXH.js";import"./ethers-DgOG59Su.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-DdKlulxU.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-Cu6RTeaf.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-CUPHFj39.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-DyPiTXWH.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-Ba6ZjOcU.js";import{E as xe}from"./ErrorNotice-AmLNAAkn.js";import{d as be,P as ge,C as ye,a as N,b as ve,S as je}from"./collectionPage.styles-CUZMIu19.js";import{u as we}from"./useStore-Dvc10vNY.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-C3O3rJ6E.js";import{L as De}from"./LoadMore-DscEf3Fk.js";import{u as Le}from"./useInfiniteGrid-BKQ811RA.js";import{u as Be,s as ze}from"./search-empty-GvvlNANs.js";import{S as Oe}from"./categories-B1BKLZKW.js";import{G as We}from"./grid.styles-Bfq3tOD5.js";import"./dcl-schemas-BHtFmNb-.js";import"./sentry-wjuCVNXH.js";import"./ethers-DgOG59Su.js";import"./intl-AKLEHPeO.js";import"./skeleton.styles-DGb4Vags.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-Cu6RTeaf.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-BHRp_9DS.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as C,j as s}from"./react-
|
|
1
|
+
import{r as C,j as s}from"./react-DyPiTXWH.js";import{s as ae,f as E,A as $,g as T,r as H,m as O,i as R,j as X}from"./authorizations-BYnIZF10.js";import{i as ne}from"./errors-C8Iz-trA.js";import{t as c,s as a,m as ie,b as k,I as U,h as z,aC as re,bG as L,c5 as oe,g as A,f as M,aH as K,W as se,X as G,q as S,an as de,c6 as ce,c7 as D,M as le}from"./index-Ba6ZjOcU.js";import{E as he}from"./ErrorNotice-AmLNAAkn.js";import{j as pe,k as ue,l as Q,m as ge,n as fe}from"./buy-Tscnuj8P.js";import{a as xe,w as me,S as be,G as we}from"./buy-gasless-C1ToktQG.js";import{M as B,E as N,s as Z}from"./sendMetaTransaction-DdKlulxU.js";import{I as ve,C as J}from"./ethers-DgOG59Su.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="174c9fec-5e16-4f4d-ac2f-622dcb1c9297",t._sentryDebugIdIdentifier="sentry-dbid-174c9fec-5e16-4f4d-ac2f-622dcb1c9297")}catch{}})();const W="shop:resume_after_signin",ye=900*1e3;function ht(t){try{sessionStorage.setItem(W,JSON.stringify({...t,at:Date.now()}))}catch{}}function pt(t){let e;try{e=sessionStorage.getItem(W)}catch{return null}if(!e)return null;try{sessionStorage.removeItem(W)}catch{}let n;try{n=JSON.parse(e)}catch{return null}return!n||n.type!==t||typeof n.at!="number"||Date.now()-n.at>ye?null:n.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:n.path}}function ut(t,e){const n=(o,...l)=>void t.invalidateQueries({queryKey:e?[o,...l]:[o]});t.invalidateQueries({queryKey:["usd-balance"]}),t.invalidateQueries({queryKey:["detail-trade"]}),t.invalidateQueries({queryKey:["shop-item"]}),n("owned-token",e==null?void 0:e.contractAddress,e==null?void 0:e.tokenId),n("public-token",e==null?void 0:e.contractAddress,e==null?void 0:e.tokenId),n("item-resales",e==null?void 0:e.contractAddress,e==null?void 0:e.itemId),t.invalidateQueries({queryKey:["shop-items"]}),t.invalidateQueries({queryKey:["catalog-items"]}),t.invalidateQueries({queryKey:["overview-listings"]}),t.invalidateQueries({queryKey:["upsell-listings"]}),t.invalidateQueries({queryKey:["my-assets"]}),t.invalidateQueries({queryKey:["purchases"]}),t.invalidateQueries({queryKey:["owned-item-count"]})}const ke=ie`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,Ce=a.div`
|
|
4
4
|
position: fixed;
|
|
@@ -184,7 +184,7 @@ import{r as C,j as s}from"./react-Cu6RTeaf.js";import{s as ae,f as E,A as $,g as
|
|
|
184
184
|
@media (prefers-reduced-motion: reduce) {
|
|
185
185
|
animation: none;
|
|
186
186
|
}
|
|
187
|
-
`;function gt({auth:t,signer:e,step:n,title:o,reason:l,name:h,image:g,icon:u,onAuthorized:v,onCancel:b,onClose:p}){const[f,m]=C.useState(!1),[r,w]=C.useState(null);async function x(){m(!0),w(null);try{await ae({auth:t,signer:e,active:!0}),v()}catch(d){ne(d)?w(k("authorizeStep.errorRejected")):(z(d,{flow:"authorize_step",kind:t.kind}),w(k("authorizeStep.errorGeneric"))),m(!1)}}return s.jsx(Ce,{onClick:f?void 0:p,role:"presentation","data-testid":"authorize-step-scrim",children:s.jsxs(Ae,{onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":o,children:[s.jsxs(Me,{children:[s.jsx(Te,{children:o}),n&&n.total>1?s.jsx(ze,{"data-testid":"authorize-step-count",children:k("authorizeStep.stepOf",{index:n.index,total:n.total})}):null,s.jsx(je,{onClick:p,disabled:f,"aria-label":k("authorizeStep.close"),children:s.jsx(U,{name:"close",className:"ico"})})]}),s.jsxs(Ie,{"data-testid":"authorize-step-row",children:[s.jsx(We,{children:g?s.jsx("img",{src:g,alt:""}):u}),s.jsxs(Ee,{children:[s.jsx($e,{title:h,children:h}),s.jsx(Se,{children:l})]})]}),s.jsx(Be,{children:k("authorizeStep.note")}),s.jsx(he,{message:r}),s.jsxs(Ne,{children:[s.jsx(Pe,{type:"button",onClick:b,disabled:f,children:k("authorizeStep.cancel")}),s.jsx(Fe,{type:"button","data-testid":"authorize-step-action",onClick:()=>void x(),disabled:f,children:f?s.jsxs(s.Fragment,{children:[s.jsx(Ve,{"aria-hidden":!0}),k("authorizeStep.authorizing")]}):k("authorizeStep.authorize")})]})]})})}const ft="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",xt="data:image/webp;base64,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",mt="https://cdn.decentraland.org/@dcl/shop/1.11.3-33096177368.commit-6f0f3de/_assets/buy-error-22UunaPC.png";function Le(t,e){return(t+e-1n)/e}function De(t,e,n){return t<=0||e<=0?0n:t>=e?n:Le(n*BigInt(t),BigInt(e))}function bt(t){var p,f,m;const e=Number.isFinite(t.priceCents)?Math.max(0,Math.trunc(t.priceCents)):0,n=Number.isFinite(t.balanceCents)?Math.max(0,Math.trunc(t.balanceCents)):0,o=t.priceManaWei>0n?t.priceManaWei:0n,l=t.manaBalanceWei>0n?t.manaBalanceWei:0n;if(e<=0)return{options:[],preferred:null,manaShortfall:null};const h=[];n>=e&&h.push({method:"credits",creditsCents:e,credits:re(e),manaWei:0n});const g=L(n)*oe;if(o>0n&&g>0&&g<e){const r=e-g,w=De(r,e,o);l>=w&&h.push({method:"combined",creditsCents:g,credits:L(g),manaWei:w})}o>0n&&l>=o&&h.push({method:"mana",creditsCents:0,credits:0,manaWei:o});const u=((p=h.find(r=>r.method==="credits"))==null?void 0:p.method)??((f=h.find(r=>r.method==="combined"))==null?void 0:f.method)??((m=h.find(r=>r.method==="mana"))==null?void 0:m.method)??null,b=!h.some(r=>r.method==="mana"||r.method==="combined")&&o>0n&&l>0n?{manaWei:l,manaCents:qe(l,e,o),priceCents:e}:null;return{options:h,preferred:u,manaShortfall:b}}function qe(t,e,n){return Number(t*BigInt(e)/n)}function wt(t,e){let n=Number.isFinite(e)?Math.max(0,Math.trunc(e)):0;return t.map(o=>{const l=Number.isFinite(o)?Math.max(0,Math.trunc(o)):0,h=Math.min(l,n);return n-=h,h})}function vt(t,e){return t.options.find(n=>n.method===e)??null}async function yt(t){const[e]=await Y({...t,trades:[t.trade]});return e}async function kt(t){const[e]=await Y({...t,trades:[],mints:[t.mint]});return e}async function Y(t){const{trades:e,mints:n=[],buyer:o,signer:l,onSigned:h,manaWei:g}=t;if(e.length===0&&n.length===0)throw new Error("No items to buy");const u=new Map;for(const p of e){const f=`${p.chainId}:${p.contract.toLowerCase()}`,m=u.get(f);m?m.push(p):u.set(f,[p])}const v=new Map;for(const p of n){const f=v.get(p.chainId);f?f.push(p):v.set(p.chainId,[p])}const b=[];for(const p of u.values())b.push(await He({trades:p,buyer:o,signer:l,onSigned:h,requiredManaWei:g}));for(const[p,f]of v){const m=g??f.reduce((r,w)=>r+BigInt(w.item.priceWei),0n);b.push(await Oe({mints:f,chainId:p,buyer:o,signer:l,onSigned:h,requiredManaWei:m}))}return b}async function He(t){const{trades:e,buyer:n,signer:o,onSigned:l,requiredManaWei:h}=t,g=e[0],u=A(K(g.contract),g.chainId),v=A(M.MANAToken,g.chainId);await E({auth:{kind:$.Allowance,contractAddress:v.address,spenderAddress:u.address,chainId:g.chainId},signer:o,requiredWei:h});const b=e.map(r=>ue(r,n));if(T.enabled)try{const r=new ve(u.abi).encodeFunctionData("accept",[b]),w=H(),x=O(o.provider,w),d=await Z(x,w,r,u,{serverURL:T.relayerUrl});return l==null||l(),await R(d,"the MANA purchase"),d}catch(r){if(r instanceof B&&r.code===N.USER_DENIED||r instanceof X)throw r;z(r,{flow:"buy_mana",step:"gasless_fallback"})}await G(o.provider,g.chainId);const f=await new J(u.address,u.abi,o).accept(b,Q(g.chainId));return l==null||l(),(await f.wait()).transactionHash}async function Oe(t){const{mints:e,chainId:n,buyer:o,signer:l,onSigned:h,requiredManaWei:g}=t,u=A(M.CollectionStore,n),v=A(M.MANAToken,n),b=e.map(r=>r.item);if(await E({auth:{kind:$.Allowance,contractAddress:v.address,spenderAddress:u.address,chainId:n},signer:l,requiredWei:g}),T.enabled)try{const r=ge(b,o,u.abi),w=H(),x=O(l.provider,w),d=await Z(x,w,r,u,{serverURL:T.relayerUrl});return h==null||h(),await R(d,"the MANA purchase"),d}catch(r){if(r instanceof B&&r.code===N.USER_DENIED||r instanceof X)throw r;z(r,{flow:"buy_mint_mana",step:"gasless_fallback"})}await G(l.provider,n);const f=await new J(u.address,u.abi,l).buy(fe(b,o),Q(n));return h==null||h(),(await f.wait()).transactionHash}async function Ct(t){const{trade:e,...n}=t;return _({target:{kind:"trade",trade:e},...n})}async function At(t){const{mint:e,...n}=t;return _({target:{kind:"store",mint:e},...n})}async function _(t){const{target:e,buyer:n,signer:o,credits:l,manaGapWei:h,providerType:g,onBroadcast:u,onReverted:v,onUnobservable:b}=t;if(l.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(h<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const p=ee(e),f=A(M.MANAToken,p),m=A(M.CreditsManager,p);await E({auth:{kind:$.Allowance,contractAddress:f.address,spenderAddress:m.address,chainId:p},signer:o,requiredWei:h});const w=(l.reduce((d,y)=>d+BigInt(y.availableAmount),0n)+h).toString(),x=Re(e,l,w);if(T.enabled){let d;try{return d=await xe({purchase:x,buyer:n,signer:o}),u==null||u({txHash:d}),await me(d),d}catch(y){if(y instanceof B&&y.code===N.USER_DENIED||y instanceof be)throw y;if(!(y instanceof we))throw d&&(v==null||v({txHash:d})),y;if(y.reason==="relayer-unreachable")throw b==null||b(),y;if(!se(g))throw y;z(y,{flow:"buy_credits_and_mana",step:"gasless_fallback"})}}return pe({purchase:x,buyer:n,signer:o,onBroadcast:u,onReverted:v})}function ee(t){return t.kind==="trade"?t.trade.chainId:t.mint.chainId}function Re(t,e,n){return t.kind==="trade"?{kind:"trade",trade:t.trade,credits:e,maxCreditedValue:n}:{kind:"store",item:t.mint.item,chainId:t.mint.chainId,credits:e,maxCreditedValue:n}}function Mt(t,e){const n=ee(e);return t==="combined"?{spender:A(M.CreditsManager,n).address,chainId:n}:{spender:e.kind==="trade"?A(K(e.trade.contract),n).address:A(M.CollectionStore,n).address,chainId:n}}function Tt(t){return s.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...t,children:s.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function jt(t){return s.jsx("svg",{viewBox:"0 0 20 20",width:"24",height:"24","aria-hidden":!0,...t,children:s.jsx("path",{fill:"#f48221",d:"M10 0a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 11a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm0-8a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1Z"})})}const{colors:i,gradients:P,radius:te,z:Xe}=c,zt=a.div`
|
|
187
|
+
`;function gt({auth:t,signer:e,step:n,title:o,reason:l,name:h,image:g,icon:u,onAuthorized:v,onCancel:b,onClose:p}){const[f,m]=C.useState(!1),[r,w]=C.useState(null);async function x(){m(!0),w(null);try{await ae({auth:t,signer:e,active:!0}),v()}catch(d){ne(d)?w(k("authorizeStep.errorRejected")):(z(d,{flow:"authorize_step",kind:t.kind}),w(k("authorizeStep.errorGeneric"))),m(!1)}}return s.jsx(Ce,{onClick:f?void 0:p,role:"presentation","data-testid":"authorize-step-scrim",children:s.jsxs(Ae,{onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":o,children:[s.jsxs(Me,{children:[s.jsx(Te,{children:o}),n&&n.total>1?s.jsx(ze,{"data-testid":"authorize-step-count",children:k("authorizeStep.stepOf",{index:n.index,total:n.total})}):null,s.jsx(je,{onClick:p,disabled:f,"aria-label":k("authorizeStep.close"),children:s.jsx(U,{name:"close",className:"ico"})})]}),s.jsxs(Ie,{"data-testid":"authorize-step-row",children:[s.jsx(We,{children:g?s.jsx("img",{src:g,alt:""}):u}),s.jsxs(Ee,{children:[s.jsx($e,{title:h,children:h}),s.jsx(Se,{children:l})]})]}),s.jsx(Be,{children:k("authorizeStep.note")}),s.jsx(he,{message:r}),s.jsxs(Ne,{children:[s.jsx(Pe,{type:"button",onClick:b,disabled:f,children:k("authorizeStep.cancel")}),s.jsx(Fe,{type:"button","data-testid":"authorize-step-action",onClick:()=>void x(),disabled:f,children:f?s.jsxs(s.Fragment,{children:[s.jsx(Ve,{"aria-hidden":!0}),k("authorizeStep.authorizing")]}):k("authorizeStep.authorize")})]})]})})}const ft="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",xt="data:image/webp;base64,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",mt="https://cdn.decentraland.org/@dcl/shop/1.11.3/_assets/buy-error-22UunaPC.png";function Le(t,e){return(t+e-1n)/e}function De(t,e,n){return t<=0||e<=0?0n:t>=e?n:Le(n*BigInt(t),BigInt(e))}function bt(t){var p,f,m;const e=Number.isFinite(t.priceCents)?Math.max(0,Math.trunc(t.priceCents)):0,n=Number.isFinite(t.balanceCents)?Math.max(0,Math.trunc(t.balanceCents)):0,o=t.priceManaWei>0n?t.priceManaWei:0n,l=t.manaBalanceWei>0n?t.manaBalanceWei:0n;if(e<=0)return{options:[],preferred:null,manaShortfall:null};const h=[];n>=e&&h.push({method:"credits",creditsCents:e,credits:re(e),manaWei:0n});const g=L(n)*oe;if(o>0n&&g>0&&g<e){const r=e-g,w=De(r,e,o);l>=w&&h.push({method:"combined",creditsCents:g,credits:L(g),manaWei:w})}o>0n&&l>=o&&h.push({method:"mana",creditsCents:0,credits:0,manaWei:o});const u=((p=h.find(r=>r.method==="credits"))==null?void 0:p.method)??((f=h.find(r=>r.method==="combined"))==null?void 0:f.method)??((m=h.find(r=>r.method==="mana"))==null?void 0:m.method)??null,b=!h.some(r=>r.method==="mana"||r.method==="combined")&&o>0n&&l>0n?{manaWei:l,manaCents:qe(l,e,o),priceCents:e}:null;return{options:h,preferred:u,manaShortfall:b}}function qe(t,e,n){return Number(t*BigInt(e)/n)}function wt(t,e){let n=Number.isFinite(e)?Math.max(0,Math.trunc(e)):0;return t.map(o=>{const l=Number.isFinite(o)?Math.max(0,Math.trunc(o)):0,h=Math.min(l,n);return n-=h,h})}function vt(t,e){return t.options.find(n=>n.method===e)??null}async function yt(t){const[e]=await Y({...t,trades:[t.trade]});return e}async function kt(t){const[e]=await Y({...t,trades:[],mints:[t.mint]});return e}async function Y(t){const{trades:e,mints:n=[],buyer:o,signer:l,onSigned:h,manaWei:g}=t;if(e.length===0&&n.length===0)throw new Error("No items to buy");const u=new Map;for(const p of e){const f=`${p.chainId}:${p.contract.toLowerCase()}`,m=u.get(f);m?m.push(p):u.set(f,[p])}const v=new Map;for(const p of n){const f=v.get(p.chainId);f?f.push(p):v.set(p.chainId,[p])}const b=[];for(const p of u.values())b.push(await He({trades:p,buyer:o,signer:l,onSigned:h,requiredManaWei:g}));for(const[p,f]of v){const m=g??f.reduce((r,w)=>r+BigInt(w.item.priceWei),0n);b.push(await Oe({mints:f,chainId:p,buyer:o,signer:l,onSigned:h,requiredManaWei:m}))}return b}async function He(t){const{trades:e,buyer:n,signer:o,onSigned:l,requiredManaWei:h}=t,g=e[0],u=A(K(g.contract),g.chainId),v=A(M.MANAToken,g.chainId);await E({auth:{kind:$.Allowance,contractAddress:v.address,spenderAddress:u.address,chainId:g.chainId},signer:o,requiredWei:h});const b=e.map(r=>ue(r,n));if(T.enabled)try{const r=new ve(u.abi).encodeFunctionData("accept",[b]),w=H(),x=O(o.provider,w),d=await Z(x,w,r,u,{serverURL:T.relayerUrl});return l==null||l(),await R(d,"the MANA purchase"),d}catch(r){if(r instanceof B&&r.code===N.USER_DENIED||r instanceof X)throw r;z(r,{flow:"buy_mana",step:"gasless_fallback"})}await G(o.provider,g.chainId);const f=await new J(u.address,u.abi,o).accept(b,Q(g.chainId));return l==null||l(),(await f.wait()).transactionHash}async function Oe(t){const{mints:e,chainId:n,buyer:o,signer:l,onSigned:h,requiredManaWei:g}=t,u=A(M.CollectionStore,n),v=A(M.MANAToken,n),b=e.map(r=>r.item);if(await E({auth:{kind:$.Allowance,contractAddress:v.address,spenderAddress:u.address,chainId:n},signer:l,requiredWei:g}),T.enabled)try{const r=ge(b,o,u.abi),w=H(),x=O(l.provider,w),d=await Z(x,w,r,u,{serverURL:T.relayerUrl});return h==null||h(),await R(d,"the MANA purchase"),d}catch(r){if(r instanceof B&&r.code===N.USER_DENIED||r instanceof X)throw r;z(r,{flow:"buy_mint_mana",step:"gasless_fallback"})}await G(l.provider,n);const f=await new J(u.address,u.abi,l).buy(fe(b,o),Q(n));return h==null||h(),(await f.wait()).transactionHash}async function Ct(t){const{trade:e,...n}=t;return _({target:{kind:"trade",trade:e},...n})}async function At(t){const{mint:e,...n}=t;return _({target:{kind:"store",mint:e},...n})}async function _(t){const{target:e,buyer:n,signer:o,credits:l,manaGapWei:h,providerType:g,onBroadcast:u,onReverted:v,onUnobservable:b}=t;if(l.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(h<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const p=ee(e),f=A(M.MANAToken,p),m=A(M.CreditsManager,p);await E({auth:{kind:$.Allowance,contractAddress:f.address,spenderAddress:m.address,chainId:p},signer:o,requiredWei:h});const w=(l.reduce((d,y)=>d+BigInt(y.availableAmount),0n)+h).toString(),x=Re(e,l,w);if(T.enabled){let d;try{return d=await xe({purchase:x,buyer:n,signer:o}),u==null||u({txHash:d}),await me(d),d}catch(y){if(y instanceof B&&y.code===N.USER_DENIED||y instanceof be)throw y;if(!(y instanceof we))throw d&&(v==null||v({txHash:d})),y;if(y.reason==="relayer-unreachable")throw b==null||b(),y;if(!se(g))throw y;z(y,{flow:"buy_credits_and_mana",step:"gasless_fallback"})}}return pe({purchase:x,buyer:n,signer:o,onBroadcast:u,onReverted:v})}function ee(t){return t.kind==="trade"?t.trade.chainId:t.mint.chainId}function Re(t,e,n){return t.kind==="trade"?{kind:"trade",trade:t.trade,credits:e,maxCreditedValue:n}:{kind:"store",item:t.mint.item,chainId:t.mint.chainId,credits:e,maxCreditedValue:n}}function Mt(t,e){const n=ee(e);return t==="combined"?{spender:A(M.CreditsManager,n).address,chainId:n}:{spender:e.kind==="trade"?A(K(e.trade.contract),n).address:A(M.CollectionStore,n).address,chainId:n}}function Tt(t){return s.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...t,children:s.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function jt(t){return s.jsx("svg",{viewBox:"0 0 20 20",width:"24",height:"24","aria-hidden":!0,...t,children:s.jsx("path",{fill:"#f48221",d:"M10 0a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 11a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm0-8a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1Z"})})}const{colors:i,gradients:P,radius:te,z:Xe}=c,zt=a.div`
|
|
188
188
|
position: fixed;
|
|
189
189
|
inset: 0;
|
|
190
190
|
z-index: ${Xe.overlay};
|
|
@@ -848,4 +848,4 @@ import{r as C,j as s}from"./react-Cu6RTeaf.js";import{s as ae,f as E,A as $,g as
|
|
|
848
848
|
transform: scale(1.1);
|
|
849
849
|
}
|
|
850
850
|
`;function xa({title:t,items:e,onViewAll:n}){const o=C.useRef(null),[l,h]=C.useState(1),[g,u]=C.useState(0),[v,b]=C.useState(!0),[p,f]=C.useState(!1),m=C.useCallback(()=>{const x=o.current;if(!x)return;const{scrollLeft:d,scrollWidth:y,clientWidth:I}=x,V=Math.max(1,Math.ceil(y/I));h(V),u(Math.min(V-1,Math.round(d/I))),b(d<=1),f(d+I>=y-1)},[]);if(C.useEffect(()=>{m();const x=o.current;if(x)return x.addEventListener("scroll",m,{passive:!0}),window.addEventListener("resize",m),()=>{x.removeEventListener("scroll",m),window.removeEventListener("resize",m)}},[m,e.length]),e.length===0)return null;function r(x){const d=o.current;d&&d.scrollBy({left:x*d.clientWidth,behavior:"smooth"})}function w(x){const d=o.current;d&&d.scrollTo({left:x*d.clientWidth,behavior:"smooth"})}return s.jsxs(Ke,{"data-testid":"carousel",children:[s.jsxs(Ge,{children:[s.jsx(Qe,{children:t}),n?s.jsxs(Ze,{onClick:n,children:[k("collectionCarousel.viewAll"),s.jsx(Je,{name:"chevron-down",size:16})]}):null]}),s.jsxs(Ye,{children:[s.jsx(q,{"data-side":"left",onClick:()=>r(-1),"aria-label":k("collectionCarousel.scrollLeft"),disabled:v,children:s.jsx("img",{src:D,alt:"","aria-hidden":!0})}),s.jsx(_e,{ref:o,children:e.map(x=>s.jsx(le,{item:x},x.id))}),s.jsx(q,{"data-side":"right",onClick:()=>r(1),"aria-label":k("collectionCarousel.scrollRight"),disabled:p,children:s.jsx("img",{src:D,alt:"","aria-hidden":!0})})]}),l>1?s.jsx(et,{"aria-label":k("collectionCarousel.pages"),children:Array.from({length:l}).map((x,d)=>s.jsx(tt,{"data-active":d===g||void 0,"aria-label":k("collectionCarousel.goToPage",{page:d+1}),"aria-current":d===g?"true":void 0,onClick:()=>w(d)},d))}):null]})}export{wt as $,Dt as A,Nt as B,Wt as C,Yt as D,xt as E,_t as F,ea as G,Et as H,ta as I,aa as J,na as K,sa as L,zt as M,ia as N,bt as O,ha as P,pt as Q,xa as R,It as S,St as T,gt as U,ht as V,Kt as W,Bt as X,ut as Y,Mt as Z,Y as _,$t as a,De as a0,Re as a1,ee as a2,ga as a3,fa as a4,oa as a5,vt as a6,yt as a7,kt as a8,Ct as a9,At as aa,Tt as b,Pt as c,Ft as d,Vt as e,Lt as f,da as g,ca as h,mt as i,la as j,ra as k,Ue as l,ft as m,pa as n,ua as o,jt as p,Gt as q,Qt as r,qt as s,Ht as t,Ot as u,Rt as v,Xt as w,Ut as x,Zt as y,Jt as z};
|
|
851
|
-
//# sourceMappingURL=CollectionCarousel-
|
|
851
|
+
//# sourceMappingURL=CollectionCarousel-7w9vcOQY.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-
|
|
2
|
-
import{s as a,_ as s}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-CX2yBV9N.js","_assets/react-DyPiTXWH.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{s as a,_ as s}from"./index-Ba6ZjOcU.js";import{r as n,j as i}from"./react-DyPiTXWH.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6fa02be9-33fb-4ba3-9237-36b1dcd4bb39",e._sentryDebugIdIdentifier="sentry-dbid-6fa02be9-33fb-4ba3-9237-36b1dcd4bb39")}catch{}})();const o=a.div`
|
|
3
3
|
position: fixed;
|
|
4
4
|
inset: 0;
|
|
5
5
|
/**
|
|
@@ -14,5 +14,5 @@ import{s as a,_ as s}from"./index-DtHHdoPj.js";import{r as n,j as i}from"./react
|
|
|
14
14
|
*/
|
|
15
15
|
z-index: -1;
|
|
16
16
|
pointer-events: none;
|
|
17
|
-
`,r=n.lazy(async()=>{const[{default:e},{default:t}]=await Promise.all([s(()=>import("./index.es-
|
|
18
|
-
//# sourceMappingURL=Confetti-
|
|
17
|
+
`,r=n.lazy(async()=>{const[{default:e},{default:t}]=await Promise.all([s(()=>import("./index.es-CX2yBV9N.js"),__vite__mapDeps([0,1])),s(()=>import("./confettiAnimation-Btd6HRFo.js"),[])]);return{default:()=>i.jsx(e,{animationData:t,loop:1})}});function u(){const[e]=n.useState(()=>{var t;return!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)});return e?i.jsx(o,{"aria-hidden":!0,"data-testid":"confetti",children:i.jsx(n.Suspense,{fallback:null,children:i.jsx(r,{})})}):null}export{u as C};
|
|
18
|
+
//# sourceMappingURL=Confetti-CYh3a_SI.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as o}from"./sentry-
|
|
2
|
-
//# sourceMappingURL=ConstantsUtil-
|
|
1
|
+
import{p as o}from"./sentry-wjuCVNXH.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="212e6b2b-00bf-4961-b68b-1d32c6f901a6",e._sentryDebugIdIdentifier="sentry-dbid-212e6b2b-00bf-4961-b68b-1d32c6f901a6")}catch{}})();var n={};const r={ACCOUNT_TABS:[{label:"Tokens"},{label:"Activity"}],SECURE_SITE_ORIGIN:(typeof o<"u"&&typeof n<"u"?n.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",VIEW_DIRECTION:{Next:"next",Prev:"prev"},ANIMATION_DURATIONS:{HeaderText:120},VIEWS_WITH_LEGAL_FOOTER:["Connect","ConnectWallets","OnRampTokenSelect","OnRampFiatSelect","OnRampProviders"],VIEWS_WITH_DEFAULT_FOOTER:["Networks"]};export{r as C};
|
|
2
|
+
//# sourceMappingURL=ConstantsUtil-DblXIgum.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as z}from"./react-Cu6RTeaf.js";import{r as W}from"./index-phZzSnhX.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new s.Error().stack;d&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[d]="2c9a3b3a-7dd2-4d70-bff8-2b85d5b8a93a",s._sentryDebugIdIdentifier="sentry-dbid-2c9a3b3a-7dd2-4d70-bff8-2b85d5b8a93a")}catch{}})();function Y(s,d){for(var F=0;F<d.length;F++){const b=d[F];if(typeof b!="string"&&!Array.isArray(b)){for(const f in b)if(f!=="default"&&!(f in s)){const m=Object.getOwnPropertyDescriptor(b,f);m&&Object.defineProperty(s,f,m.get?m:{enumerable:!0,get:()=>b[f]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var O={},L={},D={},U={},I;function G(){if(I)return U;I=1,Object.defineProperty(U,"__esModule",{value:!0}),U.createFetchComponent=b;const s=new Set([400,401,403,404]),d=new Set(["GET","HEAD","OPTIONS","PUT","DELETE"]);async function F(f,m,y){var $;const{timeout:g,retryDelay:h,abortController:S}=y,q=S.signal;let M=y.attempts,w,_;do{w=void 0,_=void 0;let P=null;try{g&&(P=setTimeout(()=>S.abort(),g)),--M,w=await fetch(f,m)}catch(n){_=n}finally{P&&clearTimeout(P)}if(w&&(w.ok||s.has(w.status))||q.aborted||M===0)break;w&&await(($=w.body)==null?void 0:$.cancel().catch(()=>{})),await new Promise(n=>setTimeout(n,h))}while(!0);if(q.aborted)throw new Error("Request aborted (timed out)");if(!w)throw _;return w}function b(f){const m=f==null?void 0:f.defaultHeaders;async function y(g,h){const{timeout:S,method:q="GET",retryDelay:M=0,abortController:w,attempts:_,...$}={...f==null?void 0:f.defaultFetcherOptions,...h},P=w||new AbortController,n=d.has(q.toUpperCase())?_??1:1,e={...$,method:q,signal:P.signal};return m&&(e.headers={...m,...$.headers||{}}),F(g,e,{timeout:S,retryDelay:M,attempts:n,abortController:P})}return{fetch:y}}return U}var H;function X(){return H||(H=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.createFetchComponent=void 0;var d=G();Object.defineProperty(s,"createFetchComponent",{enumerable:!0,get:function(){return d.createFetchComponent}})})(D)),D}const J="0.0.0-development",K={version:J};var Q;function Z(){return Q||(Q=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.QueryBuilder=s.sanitizeUrl=s.mergeRequestOptions=s.convertFiltersToQueryParams=s.splitValuesIntoManyQueries=s.splitValuesIntoManyQueryBuilders=s.splitAndFetchPaginated=s.splitAndFetch=s.MAX_URL_LENGTH=s.addModelToFormData=s.getCurrentVersion=void 0;const d=X(),F=K;function b(){return F.version}s.getCurrentVersion=b;function f(n,e,i=""){for(const r in n){if(!n.hasOwnProperty(r)||n[r]===null||n[r]===void 0)continue;const t=i?`${i}[${r}]`:r;n[r]instanceof Date?e.append(t,n[r].toISOString()):n[r]instanceof Array?n[r].forEach((a,o)=>{const c=`${t}[${o}]`;f(a,e,c)}):typeof n[r]=="object"?f(n[r],e,t):e.append(t,n[r].toString())}return e}s.addModelToFormData=f;function m(n){return Array.from(new Set(n))}s.MAX_URL_LENGTH=2048;async function y({baseUrl:n,path:e,queryParams:i,fetcher:r,uniqueBy:t,options:a}){r=r||(0,d.createFetchComponent)();const o=q({baseUrl:n,path:e,queryParams:i}),c=new Map;for(const u of o)(await(await r.fetch(u,{...a,headers:{"Content-Type":"application/json"}})).json()).forEach(E=>c.set(t?E[t]:c.size,E));return Array.from(c.values())}s.splitAndFetch=y;const g=7;async function h({baseUrl:n,path:e,queryParams:i,elementsProperty:r,uniqueBy:t,options:a,fetcher:o}){o=o||(0,d.createFetchComponent)();const u=q({baseUrl:n,path:e,queryParams:i,reservedParams:new Map([["offset",g]])}),C=new Map;let E=!1;for(let v=0;v<u.length&&!E;v++){let l=u[v];for(;l&&!E;)try{const p=(await o.fetch(l,a)).json();p[r].forEach(j=>C.set(j[t],j));const T=p.pagination.next;l=T?new URL(T,l).toString():void 0}catch{E=!0}}return Array.from(C.values())}s.splitAndFetchPaginated=h;function S({queryParams:n,baseUrl:e,path:i,reservedParams:r}){const t="name"in n?new Map([[n.name,n.values]]):n;if(t.size===0)return[new P(e+i,t,r)];const o=Array.from(t.entries()).map(([l,p])=>[l,m(p)]).sort(([l,p],[A,T])=>p.length-T.length),c=new P(e+i,new Map,r);for(let l=0;l<o.length-1;l++){const[p,A]=o[l];if(!c.canSetParams(p,A))throw new Error("This library can split one query param into many HTTP requests, but it can't split more than one. You will need to do that on the client side.");c.setParams(p,A)}let u=P.clone(c);const[C,E]=o[o.length-1],v=[];for(const l of E)u.canAddParam(C,l)||(v.push(u),u=P.clone(c)),u.addParam(C,l);return v.push(u),v}s.splitValuesIntoManyQueryBuilders=S;function q(n){return S(n).map(i=>i.toString())}s.splitValuesIntoManyQueries=q;function M(n){if(!n)return new Map;const e=Object.entries(n).filter(([i,r])=>!!r).map(([i,r])=>{const t=i.endsWith("s")?i.slice(0,-1):i;let a;if(Array.isArray(r))a=[...r].filter(_).map(o=>`${o}`);else if(_(r))a=[`${r}`];else throw new Error("Query params must be either a string, a number, a boolean or an array of the types just mentioned");return[t,a]}).filter(([i,r])=>r.length>0);return new Map(e)}s.convertFiltersToQueryParams=M;function w(n,e){const i={...n==null?void 0:n.headers,...e==null?void 0:e.headers};return{...n,...e,headers:i}}s.mergeRequestOptions=w;function _(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"}function $(n){return n=n.trim(),!n.startsWith("https://")&&!n.startsWith("http://")&&(n="https://"+n),n.endsWith("/")&&(n=n.slice(0,-1)),n}s.sanitizeUrl=$;class P{constructor(e,i=new Map,r=new Map){this.baseUrl=e,this.queryParams=i,this.reservedParams=r,this.length=this.calculateUrlLength(i,r)}canAddParam(e,i){return this.length+e.length+i.length+2<s.MAX_URL_LENGTH}addParam(e,i){if(!this.canAddParam(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);const r=this.queryParams.get(e),t=r||[];return t.push(i),this.queryParams.set(e,t),this.length+=this.calculateAddedLength(e,[i]),this}canSetParams(e,i){const r=new Map([...this.queryParams,[e,i]]);return this.calculateUrlLength(r,this.reservedParams)<s.MAX_URL_LENGTH}setParams(e,i){if(!this.canSetParams(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);return this.queryParams.set(e,i.map(r=>`${r}`)),this.length=this.calculateUrlLength(this.queryParams,this.reservedParams),this}setParam(e,i){return this.setParams(e,[i]),this}toString(){let e=this.baseUrl,i=!1;for(const[r,t]of this.queryParams)for(const a of t)i?e+=`&${r}=${a}`:(e+=`?${r}=${a}`,i=!0);return e}calculateUrlLength(e,i){let r=this.baseUrl.length;for(const[t,a]of i)this.queryParams.has(t)||(r+=t.length+2+a);for(const[t,a]of e)r+=this.calculateAddedLength(t,a);return r}static clone(e){return new P(e.baseUrl,new Map(e.queryParams),e.reservedParams)}calculateAddedLength(e,i){return this.calculateArrayLength(i)+(e.length+2)*i.length}calculateArrayLength(e){return e.map(i=>`${i}`).reduce((i,r)=>i+r.length,0)}}s.QueryBuilder=P})(L)),L}var R={},V;function x(){if(V)return R;V=1,Object.defineProperty(R,"__esModule",{value:!0}),R.retry=void 0;async function s(d,F,b,f){for(;b>0;)try{return await F()}catch(m){if(b--,b>0)console.info(`Failed to ${d}. Still have ${b} attempt/s left. Will try again in ${f}`),await new Promise(y=>setTimeout(y,f));else throw m}throw new Error("Please specify more than one attempt for the retry function")}return R.retry=s,R}var N;function ee(){if(N)return O;N=1,Object.defineProperty(O,"__esModule",{value:!0}),O.createContentClient=O.downloadContent=void 0;const s=W(),d=Z(),F=x();async function b(m,y,g,h){const{attempts:S=3,retryDelay:q=500}=h||{},M=h!=null&&h.timeout?{timeout:h.timeout}:{};return(0,F.retry)(`fetch file with hash ${g} from ${y}`,async()=>{const w=await m.fetch(`${y}/${g}`,M),_=new Uint8Array(await w.arrayBuffer());if(!(h!=null&&h.avoidChecks)&&(g.startsWith("Qm")?await(0,s.hashV0)(_):await(0,s.hashV1)(_))!==g)throw new Error(`Failed to fetch file with hash ${g} from ${y}`);return _},S,q)}O.downloadContent=b;function f(m){const{fetcher:y,logger:g}=m,h=(0,d.sanitizeUrl)(m.url),S=m==null?void 0:m.parallelConfig;async function q(t,a,o){const c=new AbortController,u=c.signal,C=(0,d.mergeRequestOptions)(o,{signal:u});return new Promise(async E=>{let v=t.length;const l=()=>{v--,v===0&&E([])},p=A=>A&&Array.isArray(A)&&A.length>0?(c.abort(),E(A),!0):!1;t.forEach(async A=>{try{const T=(0,d.sanitizeUrl)(A),j=await y.fetch(`${T}${a}`,C);if(u.aborted){l();return}const B=await j.json();p(B)||l()}catch(T){u.aborted||g==null||g.warn(`Failed to fetch from ${A}:`,T),l()}})})}async function M(t,a,o){const u=(await Promise.allSettled(t.map(async l=>{try{const p=(0,d.sanitizeUrl)(l);return await(await y.fetch(`${p}${a}`,o)).json()}catch(p){return g==null||g.warn(`Failed to fetch from ${l}:`,p),[]}}))).filter(l=>l.status==="fulfilled").map(l=>l.value||[]),C=u.flatMap(l=>l),E=u.filter(l=>l.length===0).length,v=new Map;return C.forEach(l=>{(!v.has(l.id)||l.timestamp>v.get(l.id).timestamp)&&v.set(l.id,l)}),{entities:Array.from(v.values()),emptyResults:E}}async function w(t,a){const o=new FormData;o.append("entityId",t.entityId),(0,d.addModelToFormData)(t.authChain,o,"authChain");const c=await i(Array.from(t.files.keys()),a);for(const[u,C]of t.files)(!c.has(u)||u===t.entityId)&&o.append(u,new Blob([C]),u);return o}async function _(t,a){const o=await w(t,a),c=(0,d.mergeRequestOptions)(a||{},{body:o,method:"POST"});return await y.fetch(`${h}/entities`,c)}async function $(t,a){if(t.length===0)return Promise.reject("You must set at least one pointer.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:t}),method:"POST",headers:{"Content-Type":"application/json"}});return(await y.fetch(`${h}/entities/active`,o)).json()}async function P(t,a){if(t.length===0)return Promise.reject("You must set at least one id.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({ids:t}),method:"POST",headers:{"Content-Type":"application/json"}}),c=(a==null?void 0:a.parallel)||S;return c!=null&&c.urls&&(c==null?void 0:c.urls.length)>0?q([h,...c.urls],"/entities/active",o):(await y.fetch(`${h}/entities/active`,o)).json()}async function n(t,a){const o=await P([t],a);return o.length===0?Promise.reject(`Failed to find an entity with id '${t}'.`):o[0]}function e(t,a){return t.length===0?Promise.reject("You must set at least one cid."):(0,d.splitAndFetch)({fetcher:y,options:a,baseUrl:h,path:"/available-content",queryParams:{name:"cid",values:t},uniqueBy:"cid"})}async function i(t,a){const c=(await e(t,a)).filter(u=>u.available).map(({cid:u})=>u);return new Set(c)}async function r(t,a){const o=(a==null?void 0:a.parallel)||S;if(!(o!=null&&o.urls)||o.urls.length===0)throw new Error("Parallel configuration is required for checking pointer consistency");const c=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:[t]}),method:"POST",headers:{"Content-Type":"application/json"}}),u=[h,...o.urls],{entities:C,emptyResults:E}=await M(u,"/entities/active",c);if(C.length===0)return{isConsistent:!0,upToDateEntities:void 0,outdatedEntities:void 0};const v=Math.max(...C.map(T=>T.timestamp)),l=C.filter(T=>T.timestamp===v),p=C.filter(T=>T.timestamp<v);return{isConsistent:p.length===0&&E===0,upToDateEntities:l.length>0?l:void 0,outdatedEntities:p.length>0?p:void 0}}return{buildEntityFormDataForDeployment:w,fetchEntitiesByPointers:$,fetchEntitiesByIds:P,fetchEntityById:n,downloadContent:(t,a)=>b(y,h+"/contents",t,a),deploy:_,isContentAvailable:e,checkPointerConsistency:r}}return O.createContentClient=f,O}var k=ee();const te=z(k),ae=Y({__proto__:null,default:te},[k]);export{ae as C};
|
|
2
|
-
//# sourceMappingURL=ContentClient-
|
|
1
|
+
import{g as z}from"./react-DyPiTXWH.js";import{r as W}from"./index-CskSOnyZ.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new s.Error().stack;d&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[d]="2c9a3b3a-7dd2-4d70-bff8-2b85d5b8a93a",s._sentryDebugIdIdentifier="sentry-dbid-2c9a3b3a-7dd2-4d70-bff8-2b85d5b8a93a")}catch{}})();function Y(s,d){for(var F=0;F<d.length;F++){const b=d[F];if(typeof b!="string"&&!Array.isArray(b)){for(const f in b)if(f!=="default"&&!(f in s)){const m=Object.getOwnPropertyDescriptor(b,f);m&&Object.defineProperty(s,f,m.get?m:{enumerable:!0,get:()=>b[f]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var O={},L={},D={},U={},I;function G(){if(I)return U;I=1,Object.defineProperty(U,"__esModule",{value:!0}),U.createFetchComponent=b;const s=new Set([400,401,403,404]),d=new Set(["GET","HEAD","OPTIONS","PUT","DELETE"]);async function F(f,m,y){var $;const{timeout:g,retryDelay:h,abortController:S}=y,q=S.signal;let M=y.attempts,w,_;do{w=void 0,_=void 0;let P=null;try{g&&(P=setTimeout(()=>S.abort(),g)),--M,w=await fetch(f,m)}catch(n){_=n}finally{P&&clearTimeout(P)}if(w&&(w.ok||s.has(w.status))||q.aborted||M===0)break;w&&await(($=w.body)==null?void 0:$.cancel().catch(()=>{})),await new Promise(n=>setTimeout(n,h))}while(!0);if(q.aborted)throw new Error("Request aborted (timed out)");if(!w)throw _;return w}function b(f){const m=f==null?void 0:f.defaultHeaders;async function y(g,h){const{timeout:S,method:q="GET",retryDelay:M=0,abortController:w,attempts:_,...$}={...f==null?void 0:f.defaultFetcherOptions,...h},P=w||new AbortController,n=d.has(q.toUpperCase())?_??1:1,e={...$,method:q,signal:P.signal};return m&&(e.headers={...m,...$.headers||{}}),F(g,e,{timeout:S,retryDelay:M,attempts:n,abortController:P})}return{fetch:y}}return U}var H;function X(){return H||(H=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.createFetchComponent=void 0;var d=G();Object.defineProperty(s,"createFetchComponent",{enumerable:!0,get:function(){return d.createFetchComponent}})})(D)),D}const J="0.0.0-development",K={version:J};var Q;function Z(){return Q||(Q=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.QueryBuilder=s.sanitizeUrl=s.mergeRequestOptions=s.convertFiltersToQueryParams=s.splitValuesIntoManyQueries=s.splitValuesIntoManyQueryBuilders=s.splitAndFetchPaginated=s.splitAndFetch=s.MAX_URL_LENGTH=s.addModelToFormData=s.getCurrentVersion=void 0;const d=X(),F=K;function b(){return F.version}s.getCurrentVersion=b;function f(n,e,i=""){for(const r in n){if(!n.hasOwnProperty(r)||n[r]===null||n[r]===void 0)continue;const t=i?`${i}[${r}]`:r;n[r]instanceof Date?e.append(t,n[r].toISOString()):n[r]instanceof Array?n[r].forEach((a,o)=>{const c=`${t}[${o}]`;f(a,e,c)}):typeof n[r]=="object"?f(n[r],e,t):e.append(t,n[r].toString())}return e}s.addModelToFormData=f;function m(n){return Array.from(new Set(n))}s.MAX_URL_LENGTH=2048;async function y({baseUrl:n,path:e,queryParams:i,fetcher:r,uniqueBy:t,options:a}){r=r||(0,d.createFetchComponent)();const o=q({baseUrl:n,path:e,queryParams:i}),c=new Map;for(const u of o)(await(await r.fetch(u,{...a,headers:{"Content-Type":"application/json"}})).json()).forEach(E=>c.set(t?E[t]:c.size,E));return Array.from(c.values())}s.splitAndFetch=y;const g=7;async function h({baseUrl:n,path:e,queryParams:i,elementsProperty:r,uniqueBy:t,options:a,fetcher:o}){o=o||(0,d.createFetchComponent)();const u=q({baseUrl:n,path:e,queryParams:i,reservedParams:new Map([["offset",g]])}),C=new Map;let E=!1;for(let v=0;v<u.length&&!E;v++){let l=u[v];for(;l&&!E;)try{const p=(await o.fetch(l,a)).json();p[r].forEach(j=>C.set(j[t],j));const T=p.pagination.next;l=T?new URL(T,l).toString():void 0}catch{E=!0}}return Array.from(C.values())}s.splitAndFetchPaginated=h;function S({queryParams:n,baseUrl:e,path:i,reservedParams:r}){const t="name"in n?new Map([[n.name,n.values]]):n;if(t.size===0)return[new P(e+i,t,r)];const o=Array.from(t.entries()).map(([l,p])=>[l,m(p)]).sort(([l,p],[A,T])=>p.length-T.length),c=new P(e+i,new Map,r);for(let l=0;l<o.length-1;l++){const[p,A]=o[l];if(!c.canSetParams(p,A))throw new Error("This library can split one query param into many HTTP requests, but it can't split more than one. You will need to do that on the client side.");c.setParams(p,A)}let u=P.clone(c);const[C,E]=o[o.length-1],v=[];for(const l of E)u.canAddParam(C,l)||(v.push(u),u=P.clone(c)),u.addParam(C,l);return v.push(u),v}s.splitValuesIntoManyQueryBuilders=S;function q(n){return S(n).map(i=>i.toString())}s.splitValuesIntoManyQueries=q;function M(n){if(!n)return new Map;const e=Object.entries(n).filter(([i,r])=>!!r).map(([i,r])=>{const t=i.endsWith("s")?i.slice(0,-1):i;let a;if(Array.isArray(r))a=[...r].filter(_).map(o=>`${o}`);else if(_(r))a=[`${r}`];else throw new Error("Query params must be either a string, a number, a boolean or an array of the types just mentioned");return[t,a]}).filter(([i,r])=>r.length>0);return new Map(e)}s.convertFiltersToQueryParams=M;function w(n,e){const i={...n==null?void 0:n.headers,...e==null?void 0:e.headers};return{...n,...e,headers:i}}s.mergeRequestOptions=w;function _(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"}function $(n){return n=n.trim(),!n.startsWith("https://")&&!n.startsWith("http://")&&(n="https://"+n),n.endsWith("/")&&(n=n.slice(0,-1)),n}s.sanitizeUrl=$;class P{constructor(e,i=new Map,r=new Map){this.baseUrl=e,this.queryParams=i,this.reservedParams=r,this.length=this.calculateUrlLength(i,r)}canAddParam(e,i){return this.length+e.length+i.length+2<s.MAX_URL_LENGTH}addParam(e,i){if(!this.canAddParam(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);const r=this.queryParams.get(e),t=r||[];return t.push(i),this.queryParams.set(e,t),this.length+=this.calculateAddedLength(e,[i]),this}canSetParams(e,i){const r=new Map([...this.queryParams,[e,i]]);return this.calculateUrlLength(r,this.reservedParams)<s.MAX_URL_LENGTH}setParams(e,i){if(!this.canSetParams(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);return this.queryParams.set(e,i.map(r=>`${r}`)),this.length=this.calculateUrlLength(this.queryParams,this.reservedParams),this}setParam(e,i){return this.setParams(e,[i]),this}toString(){let e=this.baseUrl,i=!1;for(const[r,t]of this.queryParams)for(const a of t)i?e+=`&${r}=${a}`:(e+=`?${r}=${a}`,i=!0);return e}calculateUrlLength(e,i){let r=this.baseUrl.length;for(const[t,a]of i)this.queryParams.has(t)||(r+=t.length+2+a);for(const[t,a]of e)r+=this.calculateAddedLength(t,a);return r}static clone(e){return new P(e.baseUrl,new Map(e.queryParams),e.reservedParams)}calculateAddedLength(e,i){return this.calculateArrayLength(i)+(e.length+2)*i.length}calculateArrayLength(e){return e.map(i=>`${i}`).reduce((i,r)=>i+r.length,0)}}s.QueryBuilder=P})(L)),L}var R={},V;function x(){if(V)return R;V=1,Object.defineProperty(R,"__esModule",{value:!0}),R.retry=void 0;async function s(d,F,b,f){for(;b>0;)try{return await F()}catch(m){if(b--,b>0)console.info(`Failed to ${d}. Still have ${b} attempt/s left. Will try again in ${f}`),await new Promise(y=>setTimeout(y,f));else throw m}throw new Error("Please specify more than one attempt for the retry function")}return R.retry=s,R}var N;function ee(){if(N)return O;N=1,Object.defineProperty(O,"__esModule",{value:!0}),O.createContentClient=O.downloadContent=void 0;const s=W(),d=Z(),F=x();async function b(m,y,g,h){const{attempts:S=3,retryDelay:q=500}=h||{},M=h!=null&&h.timeout?{timeout:h.timeout}:{};return(0,F.retry)(`fetch file with hash ${g} from ${y}`,async()=>{const w=await m.fetch(`${y}/${g}`,M),_=new Uint8Array(await w.arrayBuffer());if(!(h!=null&&h.avoidChecks)&&(g.startsWith("Qm")?await(0,s.hashV0)(_):await(0,s.hashV1)(_))!==g)throw new Error(`Failed to fetch file with hash ${g} from ${y}`);return _},S,q)}O.downloadContent=b;function f(m){const{fetcher:y,logger:g}=m,h=(0,d.sanitizeUrl)(m.url),S=m==null?void 0:m.parallelConfig;async function q(t,a,o){const c=new AbortController,u=c.signal,C=(0,d.mergeRequestOptions)(o,{signal:u});return new Promise(async E=>{let v=t.length;const l=()=>{v--,v===0&&E([])},p=A=>A&&Array.isArray(A)&&A.length>0?(c.abort(),E(A),!0):!1;t.forEach(async A=>{try{const T=(0,d.sanitizeUrl)(A),j=await y.fetch(`${T}${a}`,C);if(u.aborted){l();return}const B=await j.json();p(B)||l()}catch(T){u.aborted||g==null||g.warn(`Failed to fetch from ${A}:`,T),l()}})})}async function M(t,a,o){const u=(await Promise.allSettled(t.map(async l=>{try{const p=(0,d.sanitizeUrl)(l);return await(await y.fetch(`${p}${a}`,o)).json()}catch(p){return g==null||g.warn(`Failed to fetch from ${l}:`,p),[]}}))).filter(l=>l.status==="fulfilled").map(l=>l.value||[]),C=u.flatMap(l=>l),E=u.filter(l=>l.length===0).length,v=new Map;return C.forEach(l=>{(!v.has(l.id)||l.timestamp>v.get(l.id).timestamp)&&v.set(l.id,l)}),{entities:Array.from(v.values()),emptyResults:E}}async function w(t,a){const o=new FormData;o.append("entityId",t.entityId),(0,d.addModelToFormData)(t.authChain,o,"authChain");const c=await i(Array.from(t.files.keys()),a);for(const[u,C]of t.files)(!c.has(u)||u===t.entityId)&&o.append(u,new Blob([C]),u);return o}async function _(t,a){const o=await w(t,a),c=(0,d.mergeRequestOptions)(a||{},{body:o,method:"POST"});return await y.fetch(`${h}/entities`,c)}async function $(t,a){if(t.length===0)return Promise.reject("You must set at least one pointer.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:t}),method:"POST",headers:{"Content-Type":"application/json"}});return(await y.fetch(`${h}/entities/active`,o)).json()}async function P(t,a){if(t.length===0)return Promise.reject("You must set at least one id.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({ids:t}),method:"POST",headers:{"Content-Type":"application/json"}}),c=(a==null?void 0:a.parallel)||S;return c!=null&&c.urls&&(c==null?void 0:c.urls.length)>0?q([h,...c.urls],"/entities/active",o):(await y.fetch(`${h}/entities/active`,o)).json()}async function n(t,a){const o=await P([t],a);return o.length===0?Promise.reject(`Failed to find an entity with id '${t}'.`):o[0]}function e(t,a){return t.length===0?Promise.reject("You must set at least one cid."):(0,d.splitAndFetch)({fetcher:y,options:a,baseUrl:h,path:"/available-content",queryParams:{name:"cid",values:t},uniqueBy:"cid"})}async function i(t,a){const c=(await e(t,a)).filter(u=>u.available).map(({cid:u})=>u);return new Set(c)}async function r(t,a){const o=(a==null?void 0:a.parallel)||S;if(!(o!=null&&o.urls)||o.urls.length===0)throw new Error("Parallel configuration is required for checking pointer consistency");const c=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:[t]}),method:"POST",headers:{"Content-Type":"application/json"}}),u=[h,...o.urls],{entities:C,emptyResults:E}=await M(u,"/entities/active",c);if(C.length===0)return{isConsistent:!0,upToDateEntities:void 0,outdatedEntities:void 0};const v=Math.max(...C.map(T=>T.timestamp)),l=C.filter(T=>T.timestamp===v),p=C.filter(T=>T.timestamp<v);return{isConsistent:p.length===0&&E===0,upToDateEntities:l.length>0?l:void 0,outdatedEntities:p.length>0?p:void 0}}return{buildEntityFormDataForDeployment:w,fetchEntitiesByPointers:$,fetchEntitiesByIds:P,fetchEntityById:n,downloadContent:(t,a)=>b(y,h+"/contents",t,a),deploy:_,isContentAvailable:e,checkPointerConsistency:r}}return O.createContentClient=f,O}var k=ee();const te=z(k),ae=Y({__proto__:null,default:te},[k]);export{ae as C};
|
|
2
|
+
//# sourceMappingURL=ContentClient-BgeGbQMc.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as ce,j as e,L as Ie,d as Le,u as Me,r as L}from"./react-
|
|
1
|
+
import{b as ce,j as e,L as Ie,d as Le,u as Me,r as L}from"./react-DyPiTXWH.js";import{u as _e,s as ze}from"./search-empty-GvvlNANs.js";import{u as Ae,t as Q,R as Re,j as Be,k as Te,l as De,m as We,n as Oe,o as Ke,p as Ue,v as Ge,q as He,r as qe,M as Ve,s as Ze}from"./browseLayout.styles-C3O3rJ6E.js";import{t as de,bx as Je,a4 as Y,a3 as X,s as i,by as Qe,z as Ye,bz as Xe,b as o,bA as et,bB as ee,B as tt,A as he,Z as ue,o as ot,v as me,bC as rt,bD as st,I as te,c as it,n as at,l as nt,ar as lt,J as ct,K as dt,S as M,L as A,M as oe,bE as re,bF as ht}from"./index-Ba6ZjOcU.js";import{T as pe}from"./skeleton.styles-DGb4Vags.js";import{d as ut,P as mt,C as pt,a as xt,b as gt,c as ft,e as bt}from"./collectionPage.styles-CUZMIu19.js";import{u as yt,L as wt}from"./useStore-Dvc10vNY.js";import{L as se}from"./LoadMore-DscEf3Fk.js";import{u as ie}from"./useInfiniteGrid-BKQ811RA.js";import{S as vt}from"./categories-B1BKLZKW.js";import{E as R}from"./ErrorNotice-AmLNAAkn.js";import{c as jt,i as kt}from"./items-empty-Di8AuNKB.js";import{G as ae}from"./grid.styles-Bfq3tOD5.js";import"./dcl-schemas-BHtFmNb-.js";import"./sentry-wjuCVNXH.js";import"./ethers-DgOG59Su.js";import"./intl-AKLEHPeO.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new r.Error().stack;s&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[s]="9be2227f-c71d-4b15-9933-febaf4cebc4e",r._sentryDebugIdIdentifier="sentry-dbid-9be2227f-c71d-4b15-9933-febaf4cebc4e")}catch{}})();function Ct(r){const{gridLoading:s,gridError:a,gridCount:l,baselinePending:c,baselineError:d,baselineCount:b}=r;return s?"skeletons":a?"error":l>0?"items":c?"skeletons":d?"error":b===0?"no-creations":"filters"}const{colors:y,radius:$,media:$t}=de,St=i.article`
|
|
2
2
|
height: 300px;
|
|
3
3
|
/* No fill of its own (Figma 922:183803): the mosaic covers the top and the footer paints its own
|
|
4
4
|
translucent black, so the page field is what shows through the corners. */
|
|
@@ -309,4 +309,4 @@ import{b as ce,j as e,L as Ie,d as Le,u as Me,r as L}from"./react-Cu6RTeaf.js";i
|
|
|
309
309
|
background: ${w.blackBtn};
|
|
310
310
|
}
|
|
311
311
|
`,Yt={website:"website",twitter:"twitter",discord:"discord",facebook:"facebook"};function Xt({address:r}){var m,k;const{data:s}=ue(r),{data:a}=yt(r),l=ot(p=>{var S;return(S=p.session)==null?void 0:S.address}),c=!!l&&l.toLowerCase()===r.toLowerCase(),d=(s==null?void 0:s.name)||me(r),b=(k=(m=s==null?void 0:s.avatar)==null?void 0:m.snapshots)==null?void 0:k.face256,j=(a==null?void 0:a.cover)||ut,n=a==null?void 0:a.description,g=`${it.profileUrl}/${r}`,f=wt.filter(p=>a==null?void 0:a.links[p]),h=rt(st({name:s==null?void 0:s.name,hasClaimedName:s==null?void 0:s.hasClaimedName,ethAddress:(s==null?void 0:s.ethAddress)??r}));return e.jsxs(Dt,{"aria-label":`${d} storefront`,children:[e.jsxs(Wt,{children:[e.jsx(Ot,{src:j,alt:"",loading:"eager"}),e.jsx(Kt,{"aria-hidden":!0})]}),(f.length>0||c)&&e.jsxs(Ut,{children:[f.map(p=>e.jsx(Gt,{"data-testid":"creator-hero-link",href:(a==null?void 0:a.links[p])??"",target:"_blank",rel:"noopener noreferrer",title:o(`creator.link.${p}`),"aria-label":o(`creator.link.${p}`),children:e.jsx(te,{name:Yt[p]})},p)),c&&e.jsx(Ht,{to:"/store-settings",title:o("creator.editStore"),"aria-label":o("creator.editStore"),children:e.jsx(te,{name:"pen"})})]}),e.jsxs(qt,{children:[b?e.jsx(ne,{src:b,alt:"",loading:"eager",style:{backgroundColor:h}}):e.jsx(ne,{as:"span","aria-hidden":!0,style:{backgroundColor:h}}),e.jsxs("div",{children:[e.jsx(Vt,{children:d}),n?e.jsx(Zt,{children:n}):null]}),e.jsxs(Jt,{children:[e.jsx(Qt,{"data-testid":"creator-hero-view",href:g,target:"_blank",rel:"noopener noreferrer",children:o("creator.viewProfile")}),e.jsx(Tt,{address:r,className:"creator-hero__follow"})]})]})]})}const eo=["all","on_sale","not_for_sale"],le=48;function yo(){var Z,J;const{address:r}=Le(),s=ce(),[a]=Me(),l=a.has("collections"),{data:c}=ue(r),d=(c==null?void 0:c.name)||(r?me(r):o("creator.fallbackName"));at({title:d,description:o("seo.creator.description",{name:d}),image:(J=(Z=c==null?void 0:c.avatar)==null?void 0:Z.snapshots)==null?void 0:J.face256});const b=L.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[j,n]=_e(b),{category:g,subCategory:f,rarities:h,priceMin:m,priceMax:k,smart:p,sort:S}=j,N=eo.includes(j.status)?j.status:"all",B=t=>n({status:t});Ae(`${l}:${g}:${f??""}`);const[P,E]=L.useState(!1);L.useEffect(()=>{if(!P)return;const t=Fe=>{Fe.key==="Escape"&&E(!1)};document.addEventListener("keydown",t);const x=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=x}},[P]);const T=m&&!Number.isNaN(Number(m))?Number(m):void 0,D=k&&!Number.isNaN(Number(k))?Number(k):void 0,be=f?vt[f]:void 0,ye=(Q.find(t=>t.key===S)??Q[0]).server,W={creator:r,category:g,rarities:h.length?h:void 0,wearableCategories:be,minPriceCredits:T,maxPriceCredits:D,isWearableSmart:p||void 0,isOnSale:N==="all"?void 0:N==="on_sale",sortBy:ye},{items:_,total:we,isLoading:ve,isPlaceholderData:je,error:O,hasNextPage:ke,isFetchingNextPage:K,isFetchNextPageError:Ce,fetchNextPage:$e}=ie(["creator-items",W],t=>re({...W,first:le,skip:t}),{enabled:!!r&&!l}),F=nt({queryKey:["creator-item-count",r],queryFn:()=>re({creator:r,first:1}).then(t=>t.total),enabled:!!r}),u=ie(["creator-collections",r],t=>ht(r,{first:le,skip:t}).then(x=>({items:x.collections,total:x.total})),{enabled:!!r&&l});function U(t){n({category:t,subCategory:null},{drop:l?["collections"]:void 0})}function Se(){const t=new URLSearchParams(a);t.delete("collections");const x=t.toString();s({search:x?`?${x}`:""},{replace:!0})}function Ne(){if(l){Se();return}const t=new URLSearchParams(a);t.delete("collections");const x=t.toString();s({search:x?`?${x}&collections`:"?collections"},{replace:!0})}function G(t){n({rarities:h.includes(t)?h.filter(x=>x!==t):[...h,t]})}function H(){n(b)}const C=[];(g==="wearable"||g==="emote")&&C.push({key:"category",label:o(g==="emote"?"categories.emotes":"categories.wearables"),onRemove:()=>U("all")}),(T!=null||D!=null)&&C.push({key:"price",label:o("filter.price"),onRemove:()=>{n({priceMin:"",priceMax:""})}});for(const t of Re)h.includes(t)&&C.push({key:`rarity-${t}`,label:lt(t),onRemove:()=>G(t)});p&&C.push({key:"smart",label:o("filter.smart"),onRemove:()=>n({smart:!1})}),N!=="all"&&C.push({key:"status",label:N==="on_sale"?o("filter.onSale"):o("filter.notForSale"),onRemove:()=>B("all")});const I=Ct({gridLoading:ve||je,gridError:!!O,gridCount:_.length,baselinePending:F.isPending,baselineError:F.isError,baselineCount:F.data}),q=I==="skeletons",{data:V}=ct(),Ee=L.useMemo(()=>_.map(t=>({...t,priceCredits:dt(t,V)})),[_,V]),Pe=t=>t.priceCredits>0||!!t.manaWei,z=I==="items"||I==="skeletons"?null:I;return e.jsxs(mt,{children:[e.jsxs(pt,{"aria-label":o("creator.breadcrumbAria"),children:[e.jsx(xt,{onClick:()=>s("/items"),children:o("creator.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(gt,{children:d})]}),r?e.jsx(Xt,{address:r}):null,e.jsxs(Be,{children:[P?e.jsx(Te,{onClick:()=>E(!1),"aria-hidden":!0}):null,e.jsxs(De,{"data-open":P||void 0,"data-testid":"creator-sidebar",children:[e.jsxs(We,{children:[e.jsx(Oe,{children:o("assets.filters")}),e.jsx(Ke,{onClick:()=>E(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(Ue,{children:e.jsx(Ge,{category:g,subCategory:f,onCategory:U,onSub:t=>n({subCategory:t}),priceMin:m,priceMax:k,onPriceMin:t=>n({priceMin:t}),onPriceMax:t=>n({priceMax:t}),rarities:h,onToggleRarity:G,status:N,onStatus:B,smart:p,onSmart:t=>n({smart:t}),hideNames:!0,collections:l,onCollections:Ne})}),e.jsx(He,{children:e.jsx(qe,{type:"button",onClick:()=>E(!1),children:o("assets.showItems")})})]}),e.jsx(Ve,{children:l?e.jsxs(e.Fragment,{children:[e.jsx(ft,{children:e.jsx(bt,{"data-testid":"creator-collections-count","aria-busy":u.isLoading||void 0,children:u.isLoading?e.jsx(pe,{className:"skeleton",width:72,"data-testid":"creator-collections-count-skeleton","aria-hidden":!0}):o("creator.collectionsCount",{count:u.total})})}),u.error?e.jsx(R,{message:o("creator.error")}):null,e.jsx(ae,{"data-variant":"collections",children:u.isLoading?e.jsx(M,{count:9}):e.jsxs(e.Fragment,{children:[u.items.map(t=>e.jsx(Bt,{collection:t,itemCount:t.itemCount},t.contractAddress)),u.isFetchingNextPage?e.jsx(M,{count:6}):null]})}),e.jsx(se,{hasNextPage:u.hasNextPage,isFetching:u.isFetchingNextPage,isError:u.isFetchNextPageError,onLoadMore:()=>void u.fetchNextPage()}),!u.isLoading&&!u.error&&u.items.length===0?e.jsx(A,{testId:"creator-collections-empty",icon:jt,title:o("creator.collectionsEmptyTitle"),body:o("creator.collectionsEmpty"),cta:{label:o("assets.empty.cta"),to:"/items"}}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(Ze,{sort:S,onSort:t=>n({sort:t}),total:we,loading:q,onOpenFilters:()=>E(!0),chips:C,onClearChips:H}),O?e.jsx(R,{message:o("creator.error"),testId:"creator-error"}):null,e.jsx(ae,{"data-testid":"creator-grid",children:q?e.jsx(M,{count:15}):e.jsxs(e.Fragment,{children:[Ee.map(t=>Pe(t)?e.jsx(oe,{item:t},t.id):e.jsx(oe,{item:t,mode:"view"},t.id)),K?e.jsx(M,{count:6}):null]})}),e.jsx(se,{hasNextPage:ke,isFetching:K,isError:Ce,onLoadMore:()=>void $e()}),z==="error"?e.jsx(R,{message:o("creator.error"),testId:"creator-empty-error"}):z==="no-creations"?e.jsx(A,{testId:"creator-empty-none",icon:kt,title:o("creator.emptyNoCreationsTitle"),body:o("creator.emptyNoCreations"),cta:{label:o("assets.empty.cta"),to:"/items"}}):z==="filters"?e.jsx(A,{testId:"creator-empty-filters",icon:ze,title:o("creator.emptyFilters.title"),body:o("creator.emptyFilters.body",{count:F.data??0}),cta:{label:o("filterBar.clearAll"),onClick:H}}):null]})})]})]})}export{yo as Creator,yo as default};
|
|
312
|
-
//# sourceMappingURL=Creator-
|
|
312
|
+
//# sourceMappingURL=Creator-DHomo97d.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as I}from"./react-
|
|
1
|
+
import{g as I}from"./react-DyPiTXWH.js";import{r as H}from"./index-CskSOnyZ.js";import{r as M}from"./dcl-schemas-BHtFmNb-.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},u=new o.Error().stack;u&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[u]="79873737-c068-42da-be3f-51fdd03de54b",o._sentryDebugIdIdentifier="sentry-dbid-79873737-c068-42da-be3f-51fdd03de54b")}catch{}})();function O(o,u){for(var w=0;w<u.length;w++){const h=u[w];if(typeof h!="string"&&!Array.isArray(h)){for(const b in h)if(b!=="default"&&!(b in o)){const g=Object.getOwnPropertyDescriptor(h,b);g&&Object.defineProperty(o,b,g.get?g:{enumerable:!0,get:()=>h[b]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}var y={},F;function C(){if(F)return y;F=1,Object.defineProperty(y,"__esModule",{value:!0}),y.getHashesByKey=y.buildEntityWithoutNewFiles=y.buildEntity=y.buildEntityAndFile=void 0;const o=H(),u=M();async function w({type:n,pointers:t,timestamp:e,content:a,metadata:r}){var i;if(t.length===0)throw new Error("All entities must have at least one pointer.");const d={version:"v3",type:n,pointers:t,timestamp:e,content:a,metadata:r};if(a){const s=new Set;for(const p of a){const E=p.file.toLowerCase();if(s.has(E))throw new Error(`Error creating the deployable entity: Decentraland's file system is case insensitive, the file ${JSON.stringify(p.file)} is repeated`);s.add(E)}}const f=new TextEncoder().encode(JSON.stringify(d)),l={id:await(0,o.hashV1)(f),...d};if(!u.Entity.validate(l))throw new Error(`Generated entity is not valid:
|
|
2
2
|
`+((i=u.Entity.validate.errors)===null||i===void 0?void 0:i.map(s=>s.message).join(`
|
|
3
3
|
`)));return{entity:l,entityFile:f}}y.buildEntityAndFile=w;async function h({type:n,pointers:t,files:e,metadata:a,timestamp:r}){const i=Array.from(e||[]).map(([l,s])=>({key:l,content:s})),d=await Promise.all(i.map(async({key:l,content:s})=>({key:l,content:s,hash:await(0,o.hashV1)(s)}))),f=new Map(d.map(({hash:l,key:s})=>[s,l])),c=new Map(d.map(({hash:l,content:s})=>[l,s]));return g(n,t,{hashesByKey:f,filesByHash:c,metadata:a,timestamp:r})}y.buildEntity=h;async function b(n,{contentUrl:t,type:e,pointers:a,hashesByKey:r,metadata:i,timestamp:d}){const f=r??i?m(i):void 0;if(f&&D(e,f)){const c=await _(n,t,f),l=await A(c,i);return h({type:e,pointers:a,files:c,metadata:l,timestamp:d})}return g(e,a,{hashesByKey:r,metadata:i,timestamp:d})}y.buildEntityWithoutNewFiles=b;async function g(n,t,e){if(t.length===0)throw new Error("All entities must have at least one pointer.");const a=e!=null&&e.hashesByKey?e==null?void 0:e.hashesByKey:new Map,r=Array.from(a.entries()).map(([l,s])=>({file:l,hash:s})),i=e!=null&&e.timestamp?e==null?void 0:e.timestamp:Date.now(),{entity:d,entityFile:f}=await w({type:n,pointers:t,timestamp:i,content:r,metadata:e==null?void 0:e.metadata}),c=e!=null&&e.filesByHash?e.filesByHash:new Map;return c.set(d.id,f),{files:c,entityId:d.id}}function D(n,t){return n===u.EntityType.PROFILE&&Array.from(t).some(([,e])=>e.toLowerCase().startsWith("qm"))}async function v(n,t){const a=await(await n.fetch(t)).arrayBuffer();return new Uint8Array(a)}async function _(n,t,e){const a=e.get("body.png"),r=e.get("face256.png"),i=new URL(`${t}/contents/${a}`).toString(),d=new URL(`${t}/contents/${r}`).toString(),[f,c]=await Promise.all([v(n,i),v(n,d)]);return new Map([["body.png",f],["face256.png",c]])}async function A(n,t){return t&&(t.avatars=await Promise.all(t.avatars.map(async e=>{const a={face256:"",body:""},r=n.get("face256.png");r&&(a.face256=await(0,o.hashV1)(r));const i=n.get("body.png");return i&&(a.body=await(0,o.hashV1)(i)),e.avatar.snapshots=a,e})),t)}function m(n){const t=n.avatars[0];if(t.avatar.snapshots)return new Map([["body.png",t.avatar.snapshots.body],["face256.png",t.avatar.snapshots.face256]])}return y.getHashesByKey=m,y}var B=C();const P=I(B),j=O({__proto__:null,default:P},[B]);export{j as D};
|
|
4
|
-
//# sourceMappingURL=DeploymentBuilder-
|
|
4
|
+
//# sourceMappingURL=DeploymentBuilder-j66rJfGs.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-
|
|
2
|
-
import{j as r,r as s}from"./react-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-DDo55DDH.js","_assets/react-DyPiTXWH.js","_assets/dcl-schemas-BHtFmNb-.js","_assets/index-Ba6ZjOcU.js","_assets/sentry-wjuCVNXH.js","_assets/ethers-DgOG59Su.js","_assets/intl-AKLEHPeO.js","_assets/index-CKGO8NWe.css","_assets/createSvgIcon-DqIhLrW2.js","_assets/emotion-styled.browser.esm-BxkApjMl.js","_assets/styled-Bgmkc9S2.js","_assets/index-DW3ULbU6.js","_assets/useTheme-kL3HtKAH.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as r,r as s}from"./react-DyPiTXWH.js";import{_ as n,t as d,s as p}from"./index-Ba6ZjOcU.js";import{E as u}from"./sentry-wjuCVNXH.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="0435b894-a909-40d5-ba20-13ee0df83c4b",t._sentryDebugIdIdentifier="sentry-dbid-0435b894-a909-40d5-ba20-13ee0df83c4b")}catch{}})();const l=s.lazy(async()=>{const[{EmoteControls:t},{Experimental_CssVarsProvider:o},{light:a}]=await Promise.all([n(()=>import("./index-DDo55DDH.js").then(i=>i.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),n(()=>import("./index-DW3ULbU6.js"),__vite__mapDeps([11,3,1,2,4,5,6,7,12,10])),n(()=>import("./index-Ba6ZjOcU.js").then(i=>i.dn),__vite__mapDeps([3,1,2,4,5,6,7]))]);return{default:i=>r.jsx(o,{theme:a,children:r.jsx(t,{...i})})}});function c(t){return r.jsx(u,{fallback:r.jsx(r.Fragment,{}),children:r.jsx(s.Suspense,{fallback:null,children:r.jsx(l,{...t})})})}const{colors:e,radius:b}=d,x=p.div`
|
|
3
3
|
/* Doubled class: a preview panel may size its children greedily (ItemDetail's stretches every child to
|
|
4
4
|
fill the stage), and the bar's own geometry has to win that whichever order the styles land in. */
|
|
5
5
|
&& {
|
|
@@ -118,4 +118,4 @@ import{j as r,r as s}from"./react-Cu6RTeaf.js";import{_ as n,t as d,s as p}from"
|
|
|
118
118
|
outline-offset: 2px;
|
|
119
119
|
}
|
|
120
120
|
`;function f({previewId:t,testId:o="emote-controls"}){return r.jsx(x,{"data-preview-controls":!0,"data-testid":o,children:r.jsx(c,{wearablePreviewId:t,hideFrameInput:!0})})}export{f as E};
|
|
121
|
-
//# sourceMappingURL=EmotePlaybackBar-
|
|
121
|
+
//# sourceMappingURL=EmotePlaybackBar-BERHYvEN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as n}from"./react-
|
|
2
|
-
//# sourceMappingURL=ErrorNotice-
|
|
1
|
+
import{j as n}from"./react-DyPiTXWH.js";import{I as o}from"./index-Ba6ZjOcU.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="c67eed24-9c07-42e3-aafe-ecbed75d6f90",e._sentryDebugIdIdentifier="sentry-dbid-c67eed24-9c07-42e3-aafe-ecbed75d6f90")}catch{}})();function i({message:e,className:r,testId:t}){return e?n.jsxs("p",{className:r?`error-notice ${r}`:"error-notice","data-testid":t,role:"alert",children:[n.jsx(o,{name:"alert",className:"error-notice__ico",size:18}),n.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{i as E};
|
|
2
|
+
//# sourceMappingURL=ErrorNotice-AmLNAAkn.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as d,E as w,b as h,S as E,d as k,O as U,N as A,g as P,B as x,e as N,i as I,p as _}from"./W3MFrameProviderSingleton-
|
|
2
|
-
//# sourceMappingURL=ExchangeController-
|
|
1
|
+
import{C as d,E as w,b as h,S as E,d as k,O as U,N as A,g as P,B as x,e as N,i as I,p as _}from"./W3MFrameProviderSingleton-35iFXIWF.js";import{g as L,a as D,f as b,b as v,c as T}from"./index-DVjQDdLu.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="042b3e81-1cc7-4a40-9f63-8f907278f5f7",t._sentryDebugIdIdentifier="sentry-dbid-042b3e81-1cc7-4a40-9f63-8f907278f5f7")}catch{}})();const W=0,C={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},e=_(C),m={state:e,subscribe(t){return I(e,()=>t(e))},subscribeKey(t,n){return N(e,t,n)},resetState(){Object.assign(e,{...C})},async getAssetsForNetwork(t){const n=T(t),s=await m.getAssetsImageAndPrice(n),r=n.map(a=>{var c,o,p,l;const u=a.asset==="native"?P():`${a.network}:${a.asset}`,i=s.find(S=>{var y,g,f;return((f=(g=(y=S.fungibles)==null?void 0:y[0])==null?void 0:g.address)==null?void 0:f.toLowerCase())===u.toLowerCase()});return{...a,price:((o=(c=i==null?void 0:i.fungibles)==null?void 0:c[0])==null?void 0:o.price)||1,metadata:{...a.metadata,iconUrl:(l=(p=i==null?void 0:i.fungibles)==null?void 0:p[0])==null?void 0:l.iconUrl}}});return e.assets=r,r},async getAssetsImageAndPrice(t){const n=t.map(r=>r.asset==="native"?P():`${r.network}:${r.asset}`);return await Promise.all(n.map(r=>x.fetchTokenPrice({addresses:[r]})))},getTokenAmount(){var s;if(!((s=e==null?void 0:e.paymentAsset)!=null&&s.price))throw new Error("Cannot get token price");const t=A.bigNumber(e.amount??0).round(8),n=A.bigNumber(e.paymentAsset.price).round(8);return t.div(n).round(8).toNumber()},setAmount(t){var n;e.amount=t,(n=e.paymentAsset)!=null&&n.price&&(e.tokenAmount=m.getTokenAmount())},setPaymentAsset(t){e.paymentAsset=t},isPayWithExchangeEnabled(){var t;return(t=U.state.remoteFeatures)==null?void 0:t.payWithExchange},isPayWithExchangeSupported(){return m.isPayWithExchangeEnabled()&&d.state.activeCaipNetwork&&k.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(d.state.activeCaipNetwork.chainNamespace)},async fetchExchanges(){var t;try{const n=m.isPayWithExchangeSupported();if(!e.paymentAsset||!n){e.exchanges=[],e.isLoading=!1;return}e.isLoading=!0;const s=await v({page:W,asset:b(e.paymentAsset.network,e.paymentAsset.asset),amount:((t=e.amount)==null?void 0:t.toString())??"0"});e.exchanges=s.exchanges.slice(0,2)}catch{throw E.showError("Unable to get exchanges"),new Error("Unable to get exchanges")}finally{e.isLoading=!1}},async getPayUrl(t,n){try{const s=Number(n.amount),r=await D({exchangeId:t,asset:b(n.network,n.asset),amount:s.toString(),recipient:`${n.network}:${n.recipient}`});return w.sendEvent({type:"track",event:"PAY_EXCHANGE_SELECTED",properties:{exchange:{id:t},configuration:{network:n.network,asset:n.asset,recipient:n.recipient,amount:s},currentPayment:{type:"exchange",exchangeId:t},source:"fund-from-exchange",headless:!1}}),r}catch(s){throw s instanceof Error&&s.message.includes("is not supported")?new Error("Asset not supported"):new Error(s.message)}},async handlePayWithExchange(t){var n;try{const s=(n=d.getAccountData())==null?void 0:n.address;if(!s)throw new Error("No account connected");if(!e.paymentAsset)throw new Error("No payment asset selected");const r=h.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!r)throw new Error("Could not create popup window");e.isPaymentInProgress=!0,e.paymentId=crypto.randomUUID(),e.currentPayment={type:"exchange",exchangeId:t};const{network:a,asset:u}=e.paymentAsset,i={network:a,asset:u,amount:e.tokenAmount,recipient:s},c=await m.getPayUrl(t,i);if(!c){try{r.close()}catch(o){console.error("Unable to close popup window",o)}throw new Error("Unable to initiate payment")}e.currentPayment.sessionId=c.sessionId,e.currentPayment.status="IN_PROGRESS",e.currentPayment.exchangeId=t,r.location.href=c.url}catch{e.error="Unable to initiate payment",E.showError(e.error)}},async waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r=20}){const a=await m.getBuyStatus(t,n,s);if(a.status==="SUCCESS"||a.status==="FAILED")return a;if(r===0)throw new Error("Unable to get deposit status");return await new Promise(u=>{setTimeout(u,5e3)}),m.waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r-1})},async getBuyStatus(t,n,s){var r,a,u,i,c;try{if(!e.currentPayment)throw new Error("No current payment");const o=await L({sessionId:n,exchangeId:t});if(e.currentPayment.status=o.status,o.status==="SUCCESS"||o.status==="FAILED"){const p=(r=d.getAccountData())==null?void 0:r.address;e.currentPayment.result=o.txHash,e.isPaymentInProgress=!1,w.sendEvent({type:"track",event:o.status==="SUCCESS"?"PAY_SUCCESS":"PAY_ERROR",properties:{message:o.status==="FAILED"?h.parseError(e.error):void 0,source:"fund-from-exchange",paymentId:s,configuration:{network:((a=e.paymentAsset)==null?void 0:a.network)||"",asset:((u=e.paymentAsset)==null?void 0:u.asset)||"",recipient:p||"",amount:e.amount??0},currentPayment:{type:"exchange",exchangeId:(i=e.currentPayment)==null?void 0:i.exchangeId,sessionId:(c=e.currentPayment)==null?void 0:c.sessionId,result:o.txHash}}})}return o}catch{return{status:"UNKNOWN",txHash:""}}},reset(){e.currentPayment=void 0,e.isPaymentInProgress=!1,e.paymentId="",e.paymentAsset=null,e.amount=0,e.tokenAmount=0,e.priceLoading=!1,e.error=null,e.exchanges=[],e.isLoading=!1}};export{m as E};
|
|
2
|
+
//# sourceMappingURL=ExchangeController-CxJiKrmf.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as x,j as o}from"./react-
|
|
1
|
+
import{r as x,j as o}from"./react-DyPiTXWH.js";import{t as e,s as a,b as h,I as w}from"./index-Ba6ZjOcU.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new i.Error().stack;s&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[s]="25e1e28b-e95e-44f5-9c49-6561c3eb67b7",i._sentryDebugIdIdentifier="sentry-dbid-25e1e28b-e95e-44f5-9c49-6561c3eb67b7")}catch{}})();const m=a.section`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 36px;
|
|
@@ -172,4 +172,4 @@ import{r as x,j as o}from"./react-Cu6RTeaf.js";import{t as e,s as a,b as h,I as
|
|
|
172
172
|
}
|
|
173
173
|
`;function S({title:i,entries:s,tone:l="light",className:u}){const[f,g]=x.useState(()=>new Set),p=x.useId();function b(t){g(n=>{const r=new Set(n);return r.delete(t)||r.add(t),r})}return o.jsxs(m,{className:u,"data-tone":l,"data-testid":"faq",children:[o.jsx(k,{"data-testid":"faq-title",children:h(i)}),o.jsx(v,{children:s.map(t=>{const n=f.has(t.question),r=`${p}-panel-${t.question}`,c=`${p}-header-${t.question}`;return o.jsxs($,{"data-open":n,"data-testid":"faq-item",children:[o.jsxs(y,{type:"button",onClick:()=>b(t.question),id:c,"aria-expanded":n,"aria-controls":n?r:void 0,"data-open":n,"data-testid":"faq-question",children:[o.jsx(q,{children:h(t.question)}),o.jsx(I,{"data-open":n,"aria-hidden":!0,children:o.jsx(w,{name:"chevron-up-line",size:36})})]}),n&&o.jsx(j,{id:r,role:"region","aria-labelledby":c,"data-testid":"faq-answer",children:h(t.answer).split(`
|
|
174
174
|
`).map(d=>d.trim()).filter(Boolean).map(d=>o.jsx("p",{children:d},d))})]},t.question)})})]})}export{S as F};
|
|
175
|
-
//# sourceMappingURL=Faq-
|
|
175
|
+
//# sourceMappingURL=Faq-B-2IAlN1.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as ue,u as ge,r as l,j as t}from"./react-
|
|
1
|
+
import{b as ue,u as ge,r as l,j as t}from"./react-DyPiTXWH.js";import{s as i,t as e,m as B,n as xe,b as o,C as h,o as fe,r as me,ad as g,bl as be,h as G,bu as M,bP as we,bd as H,q as ie,I as ye,ao as ke,bQ as N}from"./index-Ba6ZjOcU.js";import{C as ve}from"./Confetti-CYh3a_SI.js";import{F as Ce}from"./Faq-B-2IAlN1.js";import{R as Q}from"./resume-buy-CrOe5wve.js";import{u as $e,d as je,R as Se,c as Pe,i as Ae,e as _e}from"./useCreditPacks-oQYk8AXU.js";import"./dcl-schemas-BHtFmNb-.js";import"./sentry-wjuCVNXH.js";import"./ethers-DgOG59Su.js";import"./intl-AKLEHPeO.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new s.Error().stack;n&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[n]="49d32008-8b58-41df-9bd7-4f2c469760e6",s._sentryDebugIdIdentifier="sentry-dbid-49d32008-8b58-41df-9bd7-4f2c469760e6")}catch{}})();const A="https://cdn.decentraland.org/@dcl/shop/1.11.3/_assets/pack-coins-BDh1ZDbh.webp",re="https://cdn.decentraland.org/@dcl/shop/1.11.3/_assets/pack-stacks-D-V2jSHW.webp",ne="https://cdn.decentraland.org/@dcl/shop/1.11.3/_assets/pack-chest-BX_j84xW.webp",Te="https://cdn.decentraland.org/@dcl/shop/1.11.3/_assets/credit-coin-CmcTCd5i.webp",O="data:image/svg+xml,%3csvg%20width='60'%20height='60'%20viewBox='0%200%2060%2060'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='60'%20height='60'%20rx='30'%20fill='%2334CE77'/%3e%3cpath%20d='M21.6583%2046.1067L11.4656%2036.0591C10.1688%2034.829%2010.1905%2032.7207%2011.4769%2031.4622L13.6868%2029.3591C14.9732%2028.1006%2017.1615%2028.1058%2018.4582%2029.3359L23.8747%2034.6197L41.9704%2015.6527C43.2568%2014.3942%2045.4291%2014.2093%2046.7258%2015.4394L48.8765%2017.3628C50.1732%2018.5929%2050.3491%2020.6844%2049.0626%2021.9429L26.6112%2045.8766C25.1433%2047.342%2022.955%2047.3368%2021.6583%2046.1067Z'%20fill='%23FCFCFC'/%3e%3c/svg%3e",K="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",Re=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 24px;
|
|
@@ -852,4 +852,4 @@ import{b as ue,u as ge,r as l,j as t}from"./react-Cu6RTeaf.js";import{s as i,t a
|
|
|
852
852
|
font-family: ${e.font.sans};
|
|
853
853
|
color: ${e.colors.err};
|
|
854
854
|
`,v=Ae()?"mock":"stripe",ee=[A,A,re,ne],Ft={pack_5:A,pack_10:A,pack_25:re,pack_50:ne};function se(s,n){return Ft[s.id]??ee[n%ee.length]}function zt(s,n){return s.artUrl??se(s,n)}const Bt=[{question:"faq.buyers.whatAreQ",answer:"faq.buyers.whatAreA"},{question:"faq.buyers.whatCanIBuyQ",answer:"faq.buyers.whatCanIBuyA"},{question:"faq.buyers.whereBuyQ",answer:"faq.buyers.whereBuyA"},{question:"faq.buyers.whereUseQ",answer:"faq.buyers.whereUseA"},{question:"faq.buyers.expireQ",answer:"faq.buyers.expireA"},{question:"faq.buyers.transferQ",answer:"faq.buyers.transferA"}];function te(s){const n=s;if((n==null?void 0:n.name)==="AbortError")return o("getCredits.errorCanceled");const x=((n==null?void 0:n.message)??"").toLowerCase();return x.includes("sign in")?o("getCredits.errorSignIn",{currency:h.name}):x.includes("timed out")?o("getCredits.errorTimeout",{currency:h.name}):o("getCredits.errorGeneric")}function Qt(){var L;xe({title:o("nav.getCredits",{currency:h.name}),noindex:!0});const s=ue(),{session:n,signIn:x,restored:a}=fe(),m=me(),[b,$]=ge(),{packs:w,isLoading:ae}=$e(),[f,p]=l.useState("select"),[d,I]=l.useState(null),[j,q]=l.useState(null),de=(j!=null?(L=w.find(r=>r.credits===j))==null?void 0:L.artUrl:void 0)??Te,[ce,y]=l.useState(null),[le,S]=l.useState(!1),T=l.useRef(null);l.useEffect(()=>()=>{var r;return(r=T.current)==null?void 0:r.abort()},[]);const E=l.useCallback(()=>{$(r=>{const c=new URLSearchParams(r);return c.delete("order"),c.delete("canceled"),c},{replace:!0})},[$]),R=l.useCallback(async r=>{p("processing");const c=new AbortController;T.current=c;try{const u=await je(r,{signal:c.signal,address:n==null?void 0:n.address,identity:n==null?void 0:n.identity});if(u.status==="credited"){const k=u.creditsGranted??(d==null?void 0:d.credits)??0;q(k>0?k:null),p("success"),g("Shop Completed Buy Credits",{order_id:r,pack_usd:(d==null?void 0:d.usd)??null,credits:k>0?k:null,provider:v}),m.invalidateQueries({queryKey:["usd-balance"]});try{if(sessionStorage.getItem(Se)){const P={resumeCheckout:!0,...k>0?{creditsAdded:k}:{}};s("/cart",{state:P});return}}catch{}try{const P=sessionStorage.getItem(Q);if(P){sessionStorage.removeItem(Q);const U=JSON.parse(P),D=be(U);if(D){s(D,{state:{item:U,resumeBuy:!0}});return}}}catch{}}else u.status==="abandoned"||u.status==="initiated"?(g("Shop Buy Credits Cancelled",{order_id:r,provider:v,step:"grant"}),m.invalidateQueries({queryKey:["usd-balance"]}),S(!0),p("select")):u.status==="failed"?(g("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(d==null?void 0:d.usd)??null}),y(u.error??o("getCredits.errorGrant",{currency:h.name})),p("error")):(g("Shop Buy Credits Pending",{step:"grant",pack_usd:(d==null?void 0:d.usd)??null}),m.invalidateQueries({queryKey:["usd-balance"]}),p("pending"))}catch(u){G(u,{flow:"get_credits",step:"grant",order_id:r}),g("Shop Buy Credits Failed",{step:"grant",error_code:M(u),pack_usd:(d==null?void 0:d.usd)??null}),y(te(u)),p("error")}},[d,n,m,s]),pe=l.useCallback(async r=>{if(!n){x();return}y(null),S(!1),I(r),p(v==="mock"?"processing":"redirecting"),g("Shop Started Buy Credits",{pack_usd:r.usd,credits:r.credits,provider:v});try{const c=await Pe(r.id,{address:n.address,identity:n.identity});if(c.mock)R(c.orderId);else if(c.url)g("Shop Redirected To Stripe",{order_id:c.orderId,pack_usd:r.usd,credits:r.credits}),window.location.href=c.url;else throw new Error("Checkout did not return a redirect url")}catch(c){G(c,{flow:"get_credits",step:"checkout",provider:v}),g("Shop Buy Credits Failed",{step:"checkout",error_code:M(c),pack_usd:r.usd}),y(te(c)),p("error")}},[n,x,R]),F=l.useRef(!1),W=l.useRef(null);l.useEffect(()=>{if(F.current)return;const r=b.get("order");if(b.get("canceled")!=null){if(r&&!a)return;F.current=!0,g("Shop Buy Credits Cancelled",{order_id:r,provider:v}),r&&n&&we(r,n.identity),E(),S(!0),p("select");return}if(r){if(p("processing"),!n){a&&(g("Shop Buy Credits Failed",{step:"grant",error_code:"no_identity",pack_usd:(d==null?void 0:d.usd)??null}),y(o("getCredits.errorSignInAfterPay",{currency:h.name})),p("error"));return}F.current=!0,E(),R(r)}},[b,n,a]);function z(){var r;(r=T.current)==null||r.abort(),p("select"),I(null),q(null),y(null),S(!1)}function he(){const r=W.current;if(!r)return;const c=window.matchMedia("(prefers-reduced-motion: reduce)").matches;r.scrollIntoView({behavior:c?"auto":"smooth",block:"center"}),r.focus({preventScroll:!0})}return t.jsxs(Re,{children:[(f==="select"||f==="redirecting")&&t.jsxs(t.Fragment,{children:[t.jsx(Fe,{"data-testid":"credits-hero",children:t.jsxs(ze,{children:[t.jsxs(Ie,{$hidden:f==="redirecting",children:[t.jsxs(qe,{children:[t.jsx(Ee,{children:o("getCredits.title")}),t.jsxs(We,{children:[t.jsx(Le,{children:o("getCredits.subtitle")}),t.jsx(Ue,{type:"button",onClick:he,"data-testid":"credits-learn-more",children:o("getCredits.learnMore")})]})]}),le&&t.jsx(De,{role:"status",children:o("getCredits.canceledNote")}),t.jsx(It,{packs:w,loading:ae,onSelect:r=>void pe(r)})]}),f==="redirecting"&&t.jsxs(Je,{role:"status","aria-live":"polite",children:[t.jsx(rt,{src:H,alt:"",width:72,height:72}),t.jsx(et,{children:o("getCredits.redirecting")})]})]})}),t.jsx(Be,{ref:W,tabIndex:-1,"data-testid":"credits-faq",children:t.jsx(Ce,{title:"faq.title",entries:Bt,tone:"on-dark"})})]}),f==="processing"&&t.jsxs(it,{role:"status","aria-live":"polite",children:[t.jsx(oe,{src:H,alt:"",width:61,height:61}),t.jsxs(nt,{children:[t.jsxs(ot,{children:[t.jsx("strong",{children:o("getCredits.processing")}),"…"]}),t.jsxs(st,{"aria-hidden":!0,children:[t.jsx(dt,{children:t.jsx(ct,{})}),t.jsx(lt,{children:"1/1"})]})]})]}),f==="success"&&t.jsx(J,{"data-outcome":"success",children:t.jsxs(pt,{role:"status","aria-live":"polite",children:[t.jsx(ve,{}),t.jsxs(ht,{children:[t.jsx(ut,{src:O,alt:"",width:60,height:60}),t.jsxs(gt,{children:[t.jsx("strong",{children:o("getCredits.successTitle")})," ",o("getCredits.successBody",{currency:h.name})]})]}),j!=null&&t.jsx(xt,{children:t.jsxs(ft,{children:[t.jsx(mt,{src:de,alt:"",width:93,height:93}),t.jsxs(bt,{children:[t.jsx(ie,{}),t.jsxs("span",{children:[t.jsx(wt,{children:o("getCredits.creditsAmount",{credits:j,currency:h.name})})," ",t.jsx(yt,{children:o("getCredits.creditsAdded")})]})]})]})}),t.jsxs(kt,{children:[t.jsx(C,{"data-variant":"outline",onClick:z,children:o("getCredits.buyMore",{currency:h.name})}),t.jsx(C,{onClick:()=>s("/items"),children:o("getCredits.startShopping")})]})]})}),f==="pending"&&t.jsx(J,{children:t.jsxs(Ct,{role:"status","aria-live":"polite","data-testid":"credits-pending",children:[t.jsxs($t,{children:[t.jsx(jt,{src:O,alt:"",width:32,height:32}),t.jsx(St,{children:o("getCredits.pendingTitle",{currency:h.name})})]}),t.jsx(Pt,{children:o("getCredits.pendingBody")}),t.jsxs(At,{children:[t.jsx(C,{"data-variant":"outline",onClick:()=>s("/items"),children:o("getCredits.goShopping")}),t.jsx(C,{"data-variant":"ruby",onClick:z,children:o("getCredits.gotIt")})]})]})}),f==="error"&&t.jsxs(vt,{role:"alert",children:[t.jsx(_t,{"data-tone":"error",children:o("getCredits.errorTitle")}),t.jsx(Rt,{children:ce}),t.jsx(Tt,{children:t.jsx(C,{onClick:z,children:o("getCredits.tryAgain")})})]})]})}function It({packs:s,loading:n,onSelect:x}){return n?t.jsx(Y,{"aria-busy":"true","aria-label":o("getCredits.packsLoading",{currency:h.name}),children:[0,1,2,3].map(a=>t.jsxs(V,{as:"div","data-skeleton":"true","data-testid":"pack-skeleton","aria-hidden":!0,children:[t.jsxs(X,{children:[t.jsxs(Z,{children:[t.jsx(Ye,{}),t.jsx(Ve,{})]}),t.jsx(Xe,{})]}),t.jsx(Ze,{})]},a))}):t.jsx(Y,{children:s.map((a,m)=>{const b=_e(a,s);return t.jsxs(V,{type:"button","data-testid":"pack","data-best":a.bestValue?"true":void 0,onClick:()=>x(a),"aria-label":b?o("getCredits.packAriaBonus",{amount:N(a.credits),usd:a.usd,bonus:b.bonus,baseline:b.baseline}):o("getCredits.packAria",{amount:N(a.credits),usd:a.usd}),children:[a.bestValue&&t.jsxs(Ge,{children:[t.jsx(ye,{name:"star-rounded"}),o("getCredits.packBadge")]}),t.jsxs(X,{children:[t.jsxs(Z,{children:[t.jsxs(Me,{children:[t.jsx(ie,{}),t.jsx(He,{children:t.jsx(ke,{credits:a.credits})})]}),t.jsx(Ne,{children:o("getCredits.packUnit",{currency:h.name})})]}),t.jsx(Qe,{children:t.jsx("img",{src:zt(a,m),alt:"",loading:"lazy",width:507,height:507,onError:$=>{const w=$.currentTarget;w.dataset.artFallback||(w.dataset.artFallback="done",w.src=se(a,m))}})})]}),t.jsxs(Oe,{children:["$",a.usd.toFixed(2)]})]},a.id)})})}export{Qt as GetCredits,Qt as default};
|
|
855
|
-
//# sourceMappingURL=GetCredits-
|
|
855
|
+
//# sourceMappingURL=GetCredits-ncUz7MSF.js.map
|