@dcl/shop 1.4.2-31321117785.commit-e69ddc8 → 1.4.2-31321510979.commit-eaccdfa
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-vUciLqTf.js → Activity-Du3v4d55.js} +5 -5
- package/_assets/{AnimatedBackground-D8EE4gIZ.js → AnimatedBackground-cJyJ3k37.js} +1 -1
- package/_assets/{Assets-DeNWsLcJ.js → Assets-CgKshhdA.js} +2 -2
- package/_assets/{Assets.styles-9eZKD8s9.js → Assets.styles-C7r9wHQF.js} +1 -1
- package/_assets/{Authorizations-CuKbIbof.js → Authorizations-BJbX0ZkC.js} +1 -1
- package/_assets/{Cart-DRGswNIT.js → Cart-DK4zdt7W.js} +1 -1
- package/_assets/{CircularProgress-417O120F.js → CircularProgress-BI-Efq9-.js} +1 -1
- package/_assets/{Collection-DIl5sMmU.js → Collection-Cf172utI.js} +1 -1
- package/_assets/{CollectionCarousel-C6Qurv1c.js → CollectionCarousel-BxoPvgOg.js} +2 -2
- package/_assets/{Confetti-C-W2Wx7a.js → Confetti-D2X3FtD_.js} +1 -1
- package/_assets/{ConstantsUtil-B-N7tmhJ.js → ConstantsUtil-BYkVBz19.js} +1 -1
- package/_assets/{ContentClient-31_9Q5IS.js → ContentClient-BkLWw6Rk.js} +1 -1
- package/_assets/{Creator-DNk4uxt9.js → Creator-BFj8KtJ0.js} +1 -1
- package/_assets/{DeploymentBuilder-DQuYAFLI.js → DeploymentBuilder-8E575y44.js} +1 -1
- package/_assets/{ErrorNotice-DivoNxAh.js → ErrorNotice-BYO5Bvyc.js} +1 -1
- package/_assets/{ExchangeController-BcX3uUH7.js → ExchangeController-BA0Eliky.js} +1 -1
- package/_assets/{Faq-SbSZ_ven.js → Faq-CaXi1BNV.js} +1 -1
- package/_assets/{GetCredits-BiezC23h.js → GetCredits-khV-GXU_.js} +1 -1
- package/_assets/{Grow-CRDOnWnS.js → Grow-DVmpJZOV.js} +1 -1
- package/_assets/{HelpersUtil-B1FOZLKI.js → HelpersUtil-DynUp31-.js} +1 -1
- package/_assets/{ItemDetail-B8BxXpKv.js → ItemDetail-DDdnprOE.js} +1 -1
- package/_assets/LazyEmoteControls-BlgXCM-V.js +2 -0
- package/_assets/{LoadMore-Bj3YyMIu.js → LoadMore-CYVBsAhd.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-DaNuAlQd.js → ManaPricingBanner.styles-C44WWkRh.js} +1 -1
- package/_assets/{MyAssets-Bf6l8btr.js → MyAssets-ogqvhbaY.js} +2 -2
- package/_assets/{MyFavorites-B0xCRFDV.js → MyFavorites-D8erMGcd.js} +1 -1
- package/_assets/{NetworkUtil-B0TAHRVW.js → NetworkUtil-BsEXGHJo.js} +1 -1
- package/_assets/{NotFound-Mb8CPlkq.js → NotFound-D5seDwlz.js} +1 -1
- package/_assets/{NotificationsBell-BviPOVne.js → NotificationsBell-uJCcRX8e.js} +1 -1
- package/_assets/{OutfitDetail-Ci5MgpAF.js → OutfitDetail-Cnd07GLk.js} +45 -45
- package/_assets/{OutfitPreview-C0o9HFjd.js → OutfitPreview-BADnZcBi.js} +1 -1
- package/_assets/{OutfitStudio-UF3Nq1dn.js → OutfitStudio-DsQnrk15.js} +1 -1
- package/_assets/{StoreSettings-BZR8VCrX.js → StoreSettings-Du81JVhq.js} +21 -21
- package/_assets/{Success-BdnhPfxX.js → Success-CSByCd9s.js} +1 -1
- package/_assets/{SwapController-DnTd3a5J.js → SwapController-Dl69afRt.js} +1 -1
- package/_assets/{Tooltip-DyT9Nmx6.js → Tooltip-Cz34W2WD.js} +1 -1
- package/_assets/{TradeService-BU5sYL5A.js → TradeService-DYWoUp2O.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-DK8M6L_d.js → W3MFrameProviderSingleton-DMgnEflU.js} +3 -3
- package/_assets/{WebCryptoP256-D8fnuOYK.js → WebCryptoP256-DvJwZjAY.js} +1 -1
- package/_assets/{authorizations-CGsXmKlT.js → authorizations-CHiv1Pa7.js} +1 -1
- package/_assets/{basic-B5dlNOvx.js → basic-CgCNtuea.js} +1 -1
- package/_assets/{biconomy-DkX-xo0j.js → biconomy-ChCoIucR.js} +1 -1
- package/_assets/{builder-C5qlb5g7.js → builder-UN5pIfno.js} +1 -1
- package/_assets/{buy-DPUp0il9.js → buy-BsMK5C0W.js} +1 -1
- package/_assets/{buy-gasless-HWNzfRM9.js → buy-gasless-CChLhkv0.js} +1 -1
- package/_assets/{categories-rIrLyLhy.js → categories-BoH_BcuN.js} +1 -1
- package/_assets/{ccip-BwI-jEx0.js → ccip-BoCyT5Kw.js} +1 -1
- package/_assets/{ccip-BDTNQTNt.js → ccip-ci60pO9_.js} +1 -1
- package/_assets/{chains-D2oWbaWg.js → chains-BXxRVqOL.js} +1 -1
- package/_assets/{collectionPage.styles-DyZ6yfVA.js → collectionPage.styles-BK-K9Hp7.js} +2 -2
- package/_assets/{common-BAvH8GHQ.js → common-pfIErvdh.js} +1 -1
- package/_assets/{controller-Cuvny8mm.js → controller-Bmdml4vJ.js} +2 -2
- package/_assets/{core-d_w0otml.js → core-DSyHKtkv.js} +4 -4
- package/_assets/{createSvgIcon-Sv_6XDk_.js → createSvgIcon-B7oSzltn.js} +1 -1
- package/_assets/{custom-D3ThyY6Q.js → custom-CpeFfUh_.js} +1 -1
- package/_assets/{data-capture-CIAiYYr_.js → data-capture-D82nwrKY.js} +1 -1
- package/_assets/decimals-C8Nkd-f-.js +1 -0
- package/_assets/{decimals-CZsb_Tk_.js → decimals-CufGxqGB.js} +1 -1
- package/_assets/{detectExtension-rsF4cbdU.js → detectExtension-DJir-uLI.js} +1 -1
- package/_assets/{email-DYTNNiw_.js → email-B3_G7aNG.js} +1 -1
- package/_assets/{embedded-wallet-CaxCIqyZ.js → embedded-wallet-CbWrcRQY.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-D-zA0hBW.js → emotion-styled.browser.esm-mKrb76ZC.js} +1 -1
- package/_assets/{engine-B6Wkto0L.js → engine-Ck8sAaZu.js} +1 -1
- package/_assets/{errors-BgGl4_vk.js → errors-CvYDNXLT.js} +1 -1
- package/_assets/{estimate-l1-fee-CwRQP56r.js → estimate-l1-fee-BrAAemAM.js} +1 -1
- package/_assets/{eth_estimateGas-B0JtMXaP.js → eth_estimateGas-D9Pu3PNx.js} +1 -1
- package/_assets/{eth_getStorageAt-BWiaTHYk.js → eth_getStorageAt-BSkNzsMl.js} +1 -1
- package/_assets/{eth_getTransactionCount-DxkkCESB.js → eth_getTransactionCount-DpXnQ6cd.js} +1 -1
- package/_assets/{ethereum-BQu4alQE.js → ethereum-D1MZ_SH0.js} +1 -1
- package/_assets/{ethers-DYJhhXPV.js → ethers-BKEzvwKN.js} +1 -1
- package/_assets/{execute-CnNCm8P6.js → execute-DFgCeynW.js} +2 -2
- package/_assets/{extractIPFS-DcAd3dA4.js → extractIPFS-DuxYPj2T.js} +1 -1
- package/_assets/{features-Dy0GUX0N.js → features-CAYyw2t4.js} +1 -1
- package/_assets/{fetchTokenMetadata-D1q-pnnU.js → fetchTokenMetadata-CpttgW84.js} +2 -2
- package/_assets/{field.styles-DaRdJ0Y8.js → field.styles-DKv8B53l.js} +1 -1
- package/_assets/{get-bytecode-G9ucw6r2.js → get-bytecode-CL7QG9KN.js} +1 -1
- package/_assets/get-ecosystem-wallet-info-ClVaJBNf.js +1 -0
- package/_assets/{getBalance-DzL2VWrp.js → getBalance-B2ObTKo9.js} +2 -2
- package/_assets/{getInstalledModules-9JIeedPe.js → getInstalledModules-OWhC7ilZ.js} +1 -1
- package/_assets/getNFT-BSQnVoEz.js +1 -0
- package/_assets/{getNFT-gbQFtRNR.js → getNFT-DEL-8DlX.js} +2 -2
- package/_assets/{grid.styles-BLNJxnwJ.js → grid.styles-CLaodk5Q.js} +1 -1
- package/_assets/{hashTypedData-C5SQ50I6.js → hashTypedData-DejwI0fC.js} +1 -1
- package/_assets/{hashTypedData-cmcOA8ay.js → hashTypedData-l-4TMklh.js} +1 -1
- package/_assets/{in-app-BxN-iatR.js → in-app-CAxC4Ivh.js} +1 -1
- package/_assets/{in-app-wallet-calls-NBQL4XFJ.js → in-app-wallet-calls-B4qBtbAF.js} +1 -1
- package/_assets/{index-L88EKwUU.js → index-1QstDrwj.js} +1 -1
- package/_assets/{index-5O7asnX4.js → index-1hFNP4-J.js} +1 -1
- package/_assets/{index-BuoSbTCz.js → index-9KWmRLJY.js} +1 -1
- package/_assets/{index-DGNm9Eym.js → index-BHsHyxTp.js} +1 -1
- package/_assets/{index-CfsDDDtE.js → index-BJSqjAz5.js} +1 -1
- package/_assets/{index-BUpfB8FR.js → index-BKv8igl6.js} +1 -1
- package/_assets/{index-DiSEimfZ.js → index-BLuTTbXE.js} +1 -1
- package/_assets/{index-BDawxd7K.js → index-BMx0J1W7.js} +1 -1
- package/_assets/{index-Bfp0Y4Pw.js → index-BS30HDvk.js} +1 -1
- package/_assets/{index-DwmB1OcJ.js → index-BVi-9LKN.js} +1 -1
- package/_assets/{index-Db0xJokm.js → index-BWHG3_yU.js} +1 -1
- package/_assets/{index-DLdpXsvH.js → index-BYLXLXoc.js} +1 -1
- package/_assets/{index-X7MvWQQb.js → index-BbVTIE6o.js} +1 -1
- package/_assets/{index-DDi4NQb2.js → index-BeR8agGt.js} +1 -1
- package/_assets/{index-DzIDFWT0.js → index-Bf9Jh6ty.js} +3 -3
- package/_assets/{index-C-qoWK2S.js → index-BfOmf_Cp.js} +1 -1
- package/_assets/{index-BGS9C_i9.js → index-Bh6adykR.js} +23 -23
- package/_assets/{index-DJfImPGN.js → index-BkyZYtvZ.js} +1 -1
- package/_assets/{index-Bhtj7hDK.js → index-BoAHsqWZ.js} +3 -3
- package/_assets/{index-D3xGDSz7.js → index-Bv9rCbrF.js} +1 -1
- package/_assets/{index-xqoDvYsT.js → index-BvqQC62-.js} +1 -1
- package/_assets/{index-BnGs2U1H.js → index-BxnUk4ME.js} +1 -1
- package/_assets/{index-C5D0KpNA.js → index-C0Q2Xw9m.js} +2 -2
- package/_assets/{index-BaqALAx-.js → index-CEyMhxNB.js} +1 -1
- package/_assets/{index-CmTDUoFL.js → index-CK61l8v-.js} +1 -1
- package/_assets/{index-C6tCZwI6.js → index-CPeIXfrM.js} +1 -1
- package/_assets/{index-218Sej3Q.js → index-CRzzQfOr.js} +1 -1
- package/_assets/{index-D8XCi3aX.js → index-CXVjVFyf.js} +2 -2
- package/_assets/{index-v-oeqUfd.js → index-Cg55UGkV.js} +1 -1
- package/_assets/{index-BUzs9scd.js → index-ChXE0-3A.js} +1 -1
- package/_assets/{index-CF4Ku7YV.js → index-Cmjegovo.js} +1 -1
- package/_assets/{index-CO6uIjyC.js → index-Cumq3JZH.js} +3 -3
- package/_assets/{index-BOct49Vj.js → index-CzLF63y-.js} +1 -1
- package/_assets/{index-DwYM9TXB.js → index-D5hR2snR.js} +1 -1
- package/_assets/{index-BC1Wsxp3.js → index-D7lxJ3dw.js} +1 -1
- package/_assets/{index-RtOMytms.js → index-DEJfCl92.js} +1 -1
- package/_assets/{index-CrGGUg7V.js → index-DFBE_Qdk.js} +1 -1
- package/_assets/{index-DspCdG2m.js → index-DGlvMnC6.js} +1 -1
- package/_assets/{index-B8fBx8-w.js → index-DHGhfu2F.js} +1 -1
- package/_assets/{index-Btob1yJ2.js → index-DKT5zOvs.js} +1 -1
- package/_assets/{index-roUOVZsO.js → index-DOLSZTRS.js} +1 -1
- package/_assets/{index-yXUgI3Y8.js → index-DP6QK5zD.js} +1 -1
- package/_assets/{index-B5DFOtWx.js → index-DPwpeXbZ.js} +1 -1
- package/_assets/{index-2NVhi815.js → index-DUOQXffc.js} +1 -1
- package/_assets/{index-BaxEHXOM.js → index-DVLRWBza.js} +1 -1
- package/_assets/{index-DtYqvBS-.js → index-DakB46KR.js} +1 -1
- package/_assets/{index-gbLpvk0M.js → index-DawlAKc2.js} +1 -1
- package/_assets/{index-JUSoFFJD.js → index-Dcr_mOap.js} +1 -1
- package/_assets/{index-DdsbGkyj.js → index-Dhix6rUc.js} +1 -1
- package/_assets/{index-gqd47qxW.js → index-DiIBE3vJ.js} +1 -1
- package/_assets/{index-DYYZp072.js → index-DiWnKuWQ.js} +2 -2
- package/_assets/{index-BcyBTPof.js → index-DkPrBpEu.js} +1 -1
- package/_assets/{index-B23IgafR.js → index-DqhO9Fg3.js} +1 -1
- package/_assets/{index-B4PGHKPV.js → index-DvYOZ9Sr.js} +2 -2
- package/_assets/{index-B_A3LHnA.js → index-EF_jUQ8k.js} +1 -1
- package/_assets/{index-D1IqEWjK.js → index-PKeNbFmQ.js} +1 -1
- package/_assets/{index-_wt2ox1t.js → index-R9nHgWvM.js} +1 -1
- package/_assets/{index-CIfAYGCp.js → index-Uf7j7Muh.js} +1 -1
- package/_assets/{index-BzMH2n9V.js → index-Zf4oaxuE.js} +1 -1
- package/_assets/{index-CCvG9DBk.js → index-eNelMLKH.js} +1 -1
- package/_assets/{index-M8Qhipno.js → index-hKJudHRw.js} +1 -1
- package/_assets/{index-KhBWlDLt.js → index-tslnPDXe.js} +1 -1
- package/_assets/{index.es-CSI3hDuw.js → index.es-BrdXKoNI.js} +1 -1
- package/_assets/{index.es-C6y0J8Tt.js → index.es-CpRZxgSI.js} +1 -1
- package/_assets/{index.es-CzazB5gL.js → index.es-mC-IwkBp.js} +4 -4
- package/_assets/{linkAccount-Dqh7KxX0.js → linkAccount-BC_9YSzE.js} +1 -1
- package/_assets/{localBatchGatewayRequest-BE9sc6Bj.js → localBatchGatewayRequest-Sqedi9_T.js} +1 -1
- package/_assets/{native-BqatX2SO.js → native-Dc2tC-qn.js} +1 -1
- package/_assets/{networks-BTCxpPfq.js → networks-D1KxTI6W.js} +1 -1
- package/_assets/{onramp-BRQHD09i.js → onramp-DoImupnC.js} +1 -1
- package/_assets/{openzeppelin-Duoy0McU.js → openzeppelin-BgxtMme5.js} +1 -1
- package/_assets/{ownerOf-D2bgWPl4.js → ownerOf-3KXrH0u3.js} +1 -1
- package/_assets/{parseNft-L35iDsLu.js → parseNft-PSXPX8Qm.js} +2 -2
- package/_assets/{parseSignature-D82Px8bB.js → parseSignature-CYlDxQ9k.js} +3 -3
- package/_assets/{parseSignature-BW4RUQHL.js → parseSignature-DTi4uU4Z.js} +1 -1
- package/_assets/{passkeys-CWRdzOgW.js → passkeys-5lnypzRC.js} +1 -1
- package/_assets/{pay-with-exchange-e9qqe6Il.js → pay-with-exchange-CWcjyYs3.js} +1 -1
- package/_assets/{prepare-contract-call-DDUXPPWf.js → prepare-contract-call-Bc4Cpa9D.js} +1 -1
- package/_assets/{qr-overlay-Dfuos3Dx.js → qr-overlay-NPhJDGVq.js} +1 -1
- package/_assets/{receive-BZ2k6lzF.js → receive-VPgnkZS_.js} +1 -1
- package/_assets/{resolveImplementation-zyU9nNFG.js → resolveImplementation-fHRuJM82.js} +1 -1
- package/_assets/{rpc-D5Y8gbEs.js → rpc-DZP--mgd.js} +1 -1
- package/_assets/{secp256k1-CmtsAL4o.js → secp256k1-C3Qb75Qb.js} +1 -1
- package/_assets/{secp256k1-CKOpdK2z.js → secp256k1-oNvcpUA1.js} +1 -1
- package/_assets/{secp256k1-Em6pk7JJ.js → secp256k1-sqjfgWa7.js} +1 -1
- package/_assets/{send-batch-transaction-DOXxOqep.js → send-batch-transaction-C5BOzhrb.js} +1 -1
- package/_assets/{send-eip712-transaction-BH50-BBC.js → send-eip712-transaction-BfXD1pXX.js} +2 -2
- package/_assets/send-gasless-transaction-DTd_ER_v.js +2 -0
- package/_assets/{send-transaction-sMQ2fCJ1.js → send-transaction-DLLBmyZ2.js} +2 -2
- package/_assets/{send-BIFJ211N.js → send-yMlzgxV3.js} +1 -1
- package/_assets/{sendMetaTransaction-BzjGNyNr.js → sendMetaTransaction-DCqRrKxD.js} +1 -1
- package/_assets/{sendRawTransaction-BHReQOjp.js → sendRawTransaction-k2Sfh7AJ.js} +3 -3
- package/_assets/{sentry-ByNeKxg1.js → sentry-1ai9esXb.js} +1 -1
- package/_assets/{serializeTransaction-wTVp_UPB.js → serializeTransaction-CwlY06pE.js} +1 -1
- package/_assets/{session-proposal-D7dUDP4A.js → session-proposal-BR4gno3D.js} +1 -1
- package/_assets/{session-request-yXC_poMj.js → session-request-DelvKYtg.js} +2 -2
- package/_assets/{sha256-DlvyKk25.js → sha256-CeTmPq_Q.js} +1 -1
- package/_assets/{signing-tozip71V.js → signing-DBPT8c_m.js} +3 -3
- package/_assets/{skeleton.styles-BkIQo-2n.js → skeleton.styles-S0BlHaZF.js} +1 -1
- package/_assets/{socials-BqCKUUee.js → socials-HhtoVIIu.js} +1 -1
- package/_assets/{styled-D09jxUGQ.js → styled-9SIjAP06.js} +1 -1
- package/_assets/{swaps-CD2yvr5k.js → swaps-BzqeewT0.js} +1 -1
- package/_assets/{thirdweb-CVmDBG2O.js → thirdweb-YIX7a_02.js} +3 -3
- package/_assets/{to-serializable-transaction-D11t4_Ix.js → to-serializable-transaction-DqDYMKiS.js} +2 -2
- package/_assets/{totalSupply-BZAL3oCm.js → totalSupply-7X9a1Ctp.js} +1 -1
- package/_assets/{transaction-DdagAX_X.js → transaction-DcVIFcB7.js} +1 -1
- package/_assets/{transactionReceipt-C_HbaTZp.js → transactionReceipt-CdHeShcY.js} +1 -1
- package/_assets/{transactions-oSY8W1hd.js → transactions-DG7v8Ic7.js} +1 -1
- package/_assets/{useCreditPacks-USUUNSOp.js → useCreditPacks-vq0qzOlC.js} +1 -1
- package/_assets/{useImportable-CrCX6e-b.js → useImportable-BJCj_pDd.js} +1 -1
- package/_assets/{useInfiniteGrid-Cw-ORqbZ.js → useInfiniteGrid-BzWCN8NZ.js} +1 -1
- package/_assets/{useStore-CfjE2pXy.js → useStore-CQ5asPEA.js} +2 -2
- package/_assets/{useTheme-hg2AifFk.js → useTheme-BzrLLDZ8.js} +1 -1
- package/_assets/{utils-BjezQJkW.js → utils-DPjdBMrV.js} +1 -1
- package/_assets/{verifyHash-BRfBGsvp.js → verifyHash-B6Vh-Wda.js} +1 -1
- package/_assets/{w3m-modal-2MMPp63l.js → w3m-modal-BBx0I47s.js} +1 -1
- package/_assets/{w3m-modal-C4kBiIJJ.js → w3m-modal-DSuObTMF.js} +1 -1
- package/_assets/{wait-for-tx-receipt-CqYuxxBM.js → wait-for-tx-receipt-dL7u4t_k.js} +1 -1
- package/_assets/{wallets-DzlLDHLy.js → wallets-DUR60lPP.js} +5 -5
- package/_assets/{web-connector-5tLEu31t.js → web-connector-CehjxsVA.js} +3 -3
- package/_assets/{writeContract-DK1RD1Dv.js → writeContract-C0-n2OaV.js} +1 -1
- package/_assets/{zora-sepolia-Bj4K3_p8.js → zora-sepolia-k6yl8DpC.js} +1 -1
- package/_assets/{zoraTestnet-ZxpHk1Ex.js → zoraTestnet-7xxdYXjY.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/LazyEmoteControls-DFo4LVof.js +0 -2
- package/_assets/decimals-B0alSDDy.js +0 -1
- package/_assets/get-ecosystem-wallet-info-B3hjPPro.js +0 -1
- package/_assets/getNFT-DT3yCCbz.js +0 -1
- package/_assets/send-gasless-transaction-DoMxo8So.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-
|
|
2
|
-
import{q as Ae,bF as Ee,v as O,l as A,bG as $e,t as n,s as l,x as Le,B as Pe,y as Ne,b as r,an as Te,I as E,bH as ie,bI as se,bJ as Se,_ as Fe,A as N,bK as Ce,D as De,aF as W,L as Me,bL as He,F as $,bM as qe,bN as _}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-DVLRWBza.js","_assets/react-BYHuwl8r.js","_assets/index-Bh6adykR.js","_assets/dcl-schemas-CmtP3U6y.js","_assets/sentry-1ai9esXb.js","_assets/ethers-BKEzvwKN.js","_assets/intl-CBcMB1D2.js","_assets/index-l2QjlKjX.css","_assets/useImportable-BJCj_pDd.js","_assets/buy-BsMK5C0W.js","_assets/authorizations-CHiv1Pa7.js","_assets/sendMetaTransaction-DCqRrKxD.js","_assets/ManaPricingBanner.styles-C44WWkRh.js","_assets/Faq-CaXi1BNV.js","_assets/field.styles-DKv8B53l.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{q as Ae,bF as Ee,v as O,l as A,bG as $e,t as n,s as l,x as Le,B as Pe,y as Ne,b as r,an as Te,I as E,bH as ie,bI as se,bJ as Se,_ as Fe,A as N,bK as Ce,D as De,aF as W,L as Me,bL as He,F as $,bM as qe,bN as _}from"./index-Bh6adykR.js";import{r as g,u as ze,j as t,L as oe,e as Re}from"./react-BYHuwl8r.js";import{u as Oe}from"./useImportable-BJCj_pDd.js";import{L as We}from"./LoadMore-CYVBsAhd.js";import{u as L}from"./useInfiniteGrid-BzWCN8NZ.js";import{m as ce}from"./mana-matic-C4e1sNO3.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-1ai9esXb.js";import"./ethers-BKEzvwKN.js";import"./intl-CBcMB1D2.js";import"./buy-BsMK5C0W.js";import"./authorizations-CHiv1Pa7.js";import"./sendMetaTransaction-DCqRrKxD.js";const _e=15e3;function Ge(e,s){return e.txHash&&s.txHash?e.txHash===s.txHash:e.txHash||s.txHash?!1:e.status===s.status&&Math.abs(e.createdAt-s.createdAt)<=_e}function Ue(e){const s=[...e].sort((i,c)=>c.createdAt-i.createdAt),a=[];for(const i of s){const c=a[a.length-1];c&&Ge(c[c.length-1],i)?c.push(i):a.push([i])}return a.map(i=>{var c;return{id:((c=i.find(o=>o.txHash))==null?void 0:c.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(o=>o.createdAt)),status:Be(i),totalCredits:i.reduce((o,h)=>o+h.credits,0),lines:i}})}function Be(e){return e.some(s=>s.status==="PENDING")?"PENDING":e.some(s=>s.status==="SETTLED")?"SETTLED":"EXPIRED"}function Ke(e){return e==="SETTLED"?"SETTLED":e==="EXPIRED"?"FAILED":"PENDING"}function Qe(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Xe(e){const s=[],a=new Map;for(const i of e){const c=Qe(i);if(!c){s.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const o=a.get(c);if(o){o.quantity+=1,o.credits+=i.credits;continue}const h={key:c,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};a.set(c,h),s.push(h)}return s}function Ve(e,s){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:s?Ae(e.manaWei,s):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ye(e){return e.status!=="EXPIRED"||!!e.submittedTxHash}function Je(e){const a=Ue(e.purchases.filter(Ye)).map(d=>({kind:"purchase",id:`purchase:${d.id}`,createdAt:d.createdAt,order:d})),i=e.sales.map(d=>{const m=Ve(d,e.rate);return{kind:"sale",id:`sale:${m.id}`,createdAt:m.createdAt,sale:m}}),c=(e.creditOrders??[]).filter(d=>d.status!=="failed"&&d.status!=="abandoned").map(d=>({kind:"credit",id:`credit:${d.id}`,createdAt:d.createdAt,order:d})),o=new Set(e.purchases.filter(d=>d.txHash).map(d=>d.txHash.toLowerCase())),h=(e.manaPurchases??[]).filter(d=>!o.has(d.txHash.toLowerCase())).map(d=>({kind:"mana-purchase",id:`mana-purchase:${d.id}`,createdAt:d.createdAt,sale:d}));return[...a,...i,...c,...h].sort((d,m)=>m.createdAt-d.createdAt||(d.id<m.id?-1:1))}function Ze(e,s){return s==="all"?e:s==="sales"?e.filter(a=>a.kind==="sale"):e.filter(a=>a.kind==="purchase"||a.kind==="credit"||a.kind==="mana-purchase")}const de=e=>e.trim().toLowerCase();function et(e){const s=new Map;for(const a of e??[]){const i=de(a.txHash??"");if(!i)continue;const c=s.get(i);c?c.push(a):s.set(i,[a])}return s}function tt(e,s,a=Date.now()){const i=s.txHash?e.get(de(s.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const c=i.length===1?it(i[0].netCents):null,o=i.filter(d=>!d.available&&d.availableAt>a);if(o.length===0)return{kind:"credited",credits:c};const h=o.reduce((d,m)=>Math.max(d,m.availableAt),0);return{kind:"pending",credits:c,availableAt:h}}function it(e){return Ee(e)}function st(){const e=O(i=>{var c;return(c=i.session)==null?void 0:c.address}),{data:s,isLoading:a}=A({queryKey:["listing-count",e],queryFn:()=>$e({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:s==null?void 0:s.total,isLoading:a}}const nt="https://cdn.decentraland.org/@dcl/shop/1.4.2-31321510979.commit-eaccdfa/_assets/credits-product-vs4Q6u6l.svg",G=Le`
|
|
3
3
|
0% { background-position: 200% 0; }
|
|
4
4
|
100% { background-position: -200% 0; }
|
|
5
5
|
`,at=l.section`
|
|
@@ -27,7 +27,7 @@ import{q as Ae,bF as Ee,v as O,l as A,bG as $e,t as n,s as l,x as Le,B as Pe,y a
|
|
|
27
27
|
`;l.span`
|
|
28
28
|
color: ${n.colors.gray4};
|
|
29
29
|
font-size: 14px;
|
|
30
|
-
`;const
|
|
30
|
+
`;const ct=l.div`
|
|
31
31
|
display: flex;
|
|
32
32
|
gap: 8px;
|
|
33
33
|
margin-bottom: 20px;
|
|
@@ -76,7 +76,7 @@ import{q as Ae,bF as Ee,v as O,l as A,bG as $e,t as n,s as l,x as Le,B as Pe,y a
|
|
|
76
76
|
&[data-active='true']:focus-visible {
|
|
77
77
|
outline-color: ${n.colors.text};
|
|
78
78
|
}
|
|
79
|
-
`,
|
|
79
|
+
`,dt=l(le)`
|
|
80
80
|
position: relative;
|
|
81
81
|
`,lt=l.span`
|
|
82
82
|
position: absolute;
|
|
@@ -375,4 +375,4 @@ import{q as Ae,bF as Ee,v as O,l as A,bG as $e,t as n,s as l,x as Le,B as Pe,y a
|
|
|
375
375
|
color: ${n.colors.softWhite};
|
|
376
376
|
`,yt=l(Pe)`
|
|
377
377
|
margin-top: 12px;
|
|
378
|
-
`,J=q.withComponent(oe),bt=g.lazy(()=>Fe(()=>import("./index-BaxEHXOM.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),P=24,vt=["all","purchases","sales"],z="section",re="listings",R="view",jt="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function xe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function ge(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function fe({children:e}){const s=g.useRef(null),[a,i]=g.useState(null),d=()=>{var h;const o=(h=s.current)==null?void 0:h.getBoundingClientRect();o&&i({top:o.bottom+8,left:o.left+o.width/2})};return t.jsxs(mt,{ref:s,tabIndex:0,onMouseEnter:d,onMouseLeave:()=>i(null),onFocus:d,onBlur:()=>i(null),children:[e,a?Re.createPortal(t.jsx(xt,{style:{top:a.top,left:a.left},role:"tooltip",children:r("activity.polygonMana")}),document.body):null]})}function wt({item:e}){const s=!!e.contractAddress&&!!e.itemId,a=!!e.tradeId||s,{data:i,isLoading:d}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?qe(e.tradeId):_(e.contractAddress,{itemId:e.itemId}),enabled:a,staleTime:5*6e4}),o=a&&d,h=(i==null?void 0:i.name)??r("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",m=W({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=t.jsxs(t.Fragment,{children:[o?t.jsx(K,{}):t.jsx(B,{children:c?t.jsx("img",{src:c,alt:h}):t.jsx(E,{name:"cart",size:20})}),t.jsxs(Q,{children:[o?t.jsx(V,{}):t.jsx(X,{title:h,children:h}),e.quantity>1?t.jsx(Y,{children:r("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(ft,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]});return m?t.jsx(J,{to:m,"data-link":"true",children:f}):t.jsx(q,{children:f})}function kt({order:e}){const s=Xe(e.lines),a=s.reduce((o,h)=>o+h.quantity,0),i=Ke(e.status),d=i==="SETTLED"?r("activity.completed"):i==="FAILED"?r("activity.failed"):r("activity.processing");return t.jsxs(T,{"data-testid":"purchase-order",children:[t.jsxs(S,{children:[t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsxs(D,{children:[r("activity.purchaseLabel")," · ",r("activity.itemCount",{count:a})]})]}),t.jsxs(M,{children:[t.jsx(H,{"data-status":i,children:d}),t.jsxs(w,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.totalCredits]})]})]}),i==="FAILED"?t.jsx(gt,{children:r("activity.purchaseFailedNote")}):null,t.jsx(U,{children:s.map(o=>t.jsx(wt,{item:o},o.key))})]})}function It({sale:e}){const{data:s,isLoading:a}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>_(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??r("activity.itemFallback"),d=(s==null?void 0:s.thumbnail)??"",o=W({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,h=t.jsxs(t.Fragment,{children:[a?t.jsx(K,{}):t.jsx(B,{children:d?t.jsx("img",{src:d,alt:i}):t.jsx(E,{name:"offer",size:20})}),t.jsxs(Q,{children:[a?t.jsx(V,{}):t.jsx(X,{title:i,children:i}),t.jsx(Y,{children:r("activity.boughtFrom",{account:xe(e.seller)})})]})]});return t.jsxs(T,{"data-testid":"activity-mana-purchase",children:[t.jsxs(S,{children:[t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsx(D,{children:r("activity.paidWithMana")})]}),t.jsxs(M,{children:[t.jsx(H,{"data-status":"SETTLED",children:r("activity.completed")}),t.jsxs(w,{children:[ge(e.manaWei)," ",t.jsx(fe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]})]})]}),t.jsx(U,{children:o?t.jsx(J,{to:o,"data-link":"true",children:h}):t.jsx(q,{children:h})})]})}function At({sale:e,payout:s}){const{data:a,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>_(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),d=(a==null?void 0:a.name)??r("activity.itemFallback"),o=(a==null?void 0:a.thumbnail)??"",h=W({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,c=t.jsxs(t.Fragment,{children:[i?t.jsx(K,{}):t.jsx(B,{children:o?t.jsx("img",{src:o,alt:d}):t.jsx(E,{name:"offer",size:20})}),t.jsxs(Q,{children:[i?t.jsx(V,{}):t.jsx(X,{title:d,children:d}),t.jsxs(Y,{children:[r("activity.soldTo",{account:xe(e.counterparty)}),s.kind==="pending"?` · ${r("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return t.jsxs(T,{"data-testid":"activity-sale",children:[t.jsxs(S,{children:[t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsx(D,{children:r("activity.saleLabel")})]}),t.jsxs(M,{children:[t.jsx(H,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?r("activity.payoutPending"):r("activity.sold")}),s.kind==="direct"?t.jsxs(w,{"data-kind":"income",children:["+",ge(e.manaWei)," ",t.jsx(fe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]}):s.credits!==null?t.jsxs(w,{"data-kind":"income",children:[t.jsx(N,{className:"ccy-mark"})," +",Me(s.credits)]}):t.jsx(w,{"data-kind":"income",children:r("activity.payoutCredited")})]})]}),t.jsx(U,{children:h?t.jsx(J,{to:h,"data-link":"true",children:c}):t.jsx(q,{children:c})})]})}function Et({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,a=Ce(e.status),i=a==="SETTLED"?r("activity.completed"):a==="FAILED"?r("activity.failed"):a==="UNFINISHED"?r("activity.unfinished"):r("activity.processing"),d=O(p=>p.session),o=De(),[h,c]=g.useState(!1),m=e.status==="initiated"&&!!d;g.useEffect(()=>{const p=()=>c(!1);return window.addEventListener("pageshow",p),()=>window.removeEventListener("pageshow",p)},[]);async function f(){if(!(!d||h)){c(!0);try{const p=await He(e.id,d.identity);if(p.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(p.url)){window.location.href=p.url;return}$.error(r("activity.resumeUnavailable"))}else p.kind==="expired"?($.info(r("activity.resumeExpired")),o.invalidateQueries({queryKey:["credit-orders"]})):p.kind==="paid"?($.success(r("activity.resumePaid")),o.invalidateQueries({queryKey:["credit-orders"]})):$.error(r("activity.resumeUnavailable"));c(!1)}catch{c(!1)}}}return t.jsx(T,{"data-testid":"credit-order",children:t.jsxs(S,{children:[t.jsx(ht,{children:t.jsx("img",{src:nt,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsxs(D,{children:[r("activity.creditPurchaseLabel")," · ",r("activity.creditPaid",{usd:s})]})]}),t.jsxs(M,{children:[m?t.jsx(pt,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?r("activity.resuming"):r("activity.resume")}):null,t.jsx(H,{"data-status":a,children:i}),t.jsxs(w,{"data-kind":a==="UNFINISHED"?void 0:"income",children:[a==="UNFINISHED"?"":"+",t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]})]})})}function $t({filter:e}){const s={all:{icon:"clock",title:r("activity.emptyAllTitle"),body:r("activity.emptyAllBody")},purchases:{icon:"cart",title:r("activity.emptyPurchasesTitle"),body:r("activity.emptyPurchasesBody")},sales:{icon:"offer",title:r("activity.emptySalesTitle"),body:r("activity.emptySalesBody")}}[e];return t.jsxs(he,{children:[t.jsx(E,{name:s.icon,size:40,color:n.colors.muted2}),t.jsx(pe,{children:s.title}),t.jsx(me,{children:s.body}),e!=="sales"?t.jsx(yt,{as:oe,to:"/items",variant:"white",children:r("notFound.cta")}):null]})}function Ot(){const{session:e}=O(),[s,a]=g.useState("all"),[i,d]=ze(),o=i.get(z)===re||i.get(R)===jt;Ne({title:o?r("seo.import.title"):r("nav.activity"),noindex:!0});const{count:h}=Oe(),{count:c}=st(),f=h!==void 0&&c!==void 0&&(h>0||c>0||o),p=!!e&&!o&&s!=="sales",x=!!e&&!o&&s!=="purchases",y=L(["purchases",e==null?void 0:e.address],u=>Se(e.address,e.identity,{first:P,skip:u}),{enabled:p}),b=L(["sales",e==null?void 0:e.address],u=>ie(e.address,{role:"seller",first:P,skip:u}),{enabled:x}),v=L(["credit-orders",e==null?void 0:e.address],u=>se(e.address,e.identity,{first:P,skip:u}),{enabled:p}),j=L(["mana-purchases",e==null?void 0:e.address],u=>ie(e.address,{role:"buyer",first:P,skip:u}),{enabled:p}),{data:Z}=A({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>se(e.address,e.identity,{first:200}).then(u=>u.payouts),enabled:x,staleTime:6e4}),ye=g.useMemo(()=>et(Z),[Z]),{data:be}=Te(x);if(!e)return t.jsxs(he,{children:[t.jsx(E,{name:"clock",size:40,color:n.colors.muted2}),t.jsx(pe,{children:r("activity.signInTitle")}),t.jsx(me,{children:r("activity.signInBody")})]});const ee=Ze(Je({purchases:p?y.items:[],sales:x?b.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:be}),s),ve=p&&(y.isLoading||v.isLoading||j.isLoading)||x&&b.isLoading,te=p&&(y.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||x&&b.isFetchingNextPage,je=p&&(y.hasNextPage||v.hasNextPage||j.hasNextPage)||x&&b.hasNextPage;function we(){p&&y.hasNextPage&&y.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),x&&b.hasNextPage&&b.fetchNextPage()}function ke(u){if(a(u),!o)return;const k=new URLSearchParams(i);k.delete(z),k.delete(R),d(k,{replace:!0})}function Ie(){const u=new URLSearchParams(i);u.set(z,re),u.delete(R),d(u,{replace:!0})}return t.jsxs(at,{children:[t.jsx(rt,{children:t.jsx(ot,{children:r("nav.activity")})}),t.jsxs(dt,{role:"tablist","aria-label":r("nav.activity"),children:[vt.map(u=>t.jsx(le,{type:"button",role:"tab","aria-selected":!o&&s===u,"data-active":!o&&s===u,"data-testid":`activity-filter-${u}`,onClick:()=>ke(u),children:r(`activity.filter.${u}`)},u)),f?t.jsxs(ct,{type:"button",role:"tab","aria-selected":o,"data-active":o,"data-testid":"activity-filter-migrate","aria-label":h?r("activity.migrate.chipAria",{count:h}):void 0,onClick:Ie,children:[r("activity.migrate.chip"),h?t.jsx(lt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),o?t.jsx(g.Suspense,{fallback:t.jsx(ut,{"aria-busy":"true"}),children:t.jsx(bt,{})}):ve?t.jsx(ne,{children:Array.from({length:5}).map((u,k)=>t.jsx(ae,{},k))}):ee.length===0?t.jsx($t,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(ne,{children:[ee.map(u=>u.kind==="purchase"?t.jsx(kt,{order:u.order},u.id):u.kind==="credit"?t.jsx(Et,{order:u.order},u.id):u.kind==="mana-purchase"?t.jsx(It,{sale:u.sale},u.id):t.jsx(At,{sale:u.sale,payout:tt(ye,u.sale)},u.id)),te?t.jsx(ae,{}):null]}),t.jsx(We,{hasNextPage:je,isFetching:te,onLoadMore:we})]})]})}export{Ot as Activity};
|
|
378
|
+
`,J=q.withComponent(oe),bt=g.lazy(()=>Fe(()=>import("./index-DVLRWBza.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),P=24,vt=["all","purchases","sales"],z="section",re="listings",R="view",jt="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function xe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function ge(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function fe({children:e}){const s=g.useRef(null),[a,i]=g.useState(null),c=()=>{var h;const o=(h=s.current)==null?void 0:h.getBoundingClientRect();o&&i({top:o.bottom+8,left:o.left+o.width/2})};return t.jsxs(mt,{ref:s,tabIndex:0,onMouseEnter:c,onMouseLeave:()=>i(null),onFocus:c,onBlur:()=>i(null),children:[e,a?Re.createPortal(t.jsx(xt,{style:{top:a.top,left:a.left},role:"tooltip",children:r("activity.polygonMana")}),document.body):null]})}function wt({item:e}){const s=!!e.contractAddress&&!!e.itemId,a=!!e.tradeId||s,{data:i,isLoading:c}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?qe(e.tradeId):_(e.contractAddress,{itemId:e.itemId}),enabled:a,staleTime:5*6e4}),o=a&&c,h=(i==null?void 0:i.name)??r("activity.itemFallback"),d=(i==null?void 0:i.thumbnail)??"",m=W({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=t.jsxs(t.Fragment,{children:[o?t.jsx(K,{}):t.jsx(B,{children:d?t.jsx("img",{src:d,alt:h}):t.jsx(E,{name:"cart",size:20})}),t.jsxs(Q,{children:[o?t.jsx(V,{}):t.jsx(X,{title:h,children:h}),e.quantity>1?t.jsx(Y,{children:r("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(ft,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]});return m?t.jsx(J,{to:m,"data-link":"true",children:f}):t.jsx(q,{children:f})}function kt({order:e}){const s=Xe(e.lines),a=s.reduce((o,h)=>o+h.quantity,0),i=Ke(e.status),c=i==="SETTLED"?r("activity.completed"):i==="FAILED"?r("activity.failed"):r("activity.processing");return t.jsxs(T,{"data-testid":"purchase-order",children:[t.jsxs(S,{children:[t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsxs(D,{children:[r("activity.purchaseLabel")," · ",r("activity.itemCount",{count:a})]})]}),t.jsxs(M,{children:[t.jsx(H,{"data-status":i,children:c}),t.jsxs(w,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.totalCredits]})]})]}),i==="FAILED"?t.jsx(gt,{children:r("activity.purchaseFailedNote")}):null,t.jsx(U,{children:s.map(o=>t.jsx(wt,{item:o},o.key))})]})}function It({sale:e}){const{data:s,isLoading:a}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>_(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??r("activity.itemFallback"),c=(s==null?void 0:s.thumbnail)??"",o=W({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,h=t.jsxs(t.Fragment,{children:[a?t.jsx(K,{}):t.jsx(B,{children:c?t.jsx("img",{src:c,alt:i}):t.jsx(E,{name:"offer",size:20})}),t.jsxs(Q,{children:[a?t.jsx(V,{}):t.jsx(X,{title:i,children:i}),t.jsx(Y,{children:r("activity.boughtFrom",{account:xe(e.seller)})})]})]});return t.jsxs(T,{"data-testid":"activity-mana-purchase",children:[t.jsxs(S,{children:[t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsx(D,{children:r("activity.paidWithMana")})]}),t.jsxs(M,{children:[t.jsx(H,{"data-status":"SETTLED",children:r("activity.completed")}),t.jsxs(w,{children:[ge(e.manaWei)," ",t.jsx(fe,{children:t.jsx(ue,{src:ce,alt:"MANA"})})]})]})]}),t.jsx(U,{children:o?t.jsx(J,{to:o,"data-link":"true",children:h}):t.jsx(q,{children:h})})]})}function At({sale:e,payout:s}){const{data:a,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>_(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),c=(a==null?void 0:a.name)??r("activity.itemFallback"),o=(a==null?void 0:a.thumbnail)??"",h=W({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,d=t.jsxs(t.Fragment,{children:[i?t.jsx(K,{}):t.jsx(B,{children:o?t.jsx("img",{src:o,alt:c}):t.jsx(E,{name:"offer",size:20})}),t.jsxs(Q,{children:[i?t.jsx(V,{}):t.jsx(X,{title:c,children:c}),t.jsxs(Y,{children:[r("activity.soldTo",{account:xe(e.counterparty)}),s.kind==="pending"?` · ${r("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return t.jsxs(T,{"data-testid":"activity-sale",children:[t.jsxs(S,{children:[t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsx(D,{children:r("activity.saleLabel")})]}),t.jsxs(M,{children:[t.jsx(H,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?r("activity.payoutPending"):r("activity.sold")}),s.kind==="direct"?t.jsxs(w,{"data-kind":"income",children:["+",ge(e.manaWei)," ",t.jsx(fe,{children:t.jsx(ue,{src:ce,alt:"MANA"})})]}):s.credits!==null?t.jsxs(w,{"data-kind":"income",children:[t.jsx(N,{className:"ccy-mark"})," +",Me(s.credits)]}):t.jsx(w,{"data-kind":"income",children:r("activity.payoutCredited")})]})]}),t.jsx(U,{children:h?t.jsx(J,{to:h,"data-link":"true",children:d}):t.jsx(q,{children:d})})]})}function Et({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,a=Ce(e.status),i=a==="SETTLED"?r("activity.completed"):a==="FAILED"?r("activity.failed"):a==="UNFINISHED"?r("activity.unfinished"):r("activity.processing"),c=O(p=>p.session),o=De(),[h,d]=g.useState(!1),m=e.status==="initiated"&&!!c;g.useEffect(()=>{const p=()=>d(!1);return window.addEventListener("pageshow",p),()=>window.removeEventListener("pageshow",p)},[]);async function f(){if(!(!c||h)){d(!0);try{const p=await He(e.id,c.identity);if(p.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(p.url)){window.location.href=p.url;return}$.error(r("activity.resumeUnavailable"))}else p.kind==="expired"?($.info(r("activity.resumeExpired")),o.invalidateQueries({queryKey:["credit-orders"]})):p.kind==="paid"?($.success(r("activity.resumePaid")),o.invalidateQueries({queryKey:["credit-orders"]})):$.error(r("activity.resumeUnavailable"));d(!1)}catch{d(!1)}}}return t.jsx(T,{"data-testid":"credit-order",children:t.jsxs(S,{children:[t.jsx(ht,{children:t.jsx("img",{src:nt,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(C,{children:I(e.createdAt)}),t.jsxs(D,{children:[r("activity.creditPurchaseLabel")," · ",r("activity.creditPaid",{usd:s})]})]}),t.jsxs(M,{children:[m?t.jsx(pt,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?r("activity.resuming"):r("activity.resume")}):null,t.jsx(H,{"data-status":a,children:i}),t.jsxs(w,{"data-kind":a==="UNFINISHED"?void 0:"income",children:[a==="UNFINISHED"?"":"+",t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]})]})})}function $t({filter:e}){const s={all:{icon:"clock",title:r("activity.emptyAllTitle"),body:r("activity.emptyAllBody")},purchases:{icon:"cart",title:r("activity.emptyPurchasesTitle"),body:r("activity.emptyPurchasesBody")},sales:{icon:"offer",title:r("activity.emptySalesTitle"),body:r("activity.emptySalesBody")}}[e];return t.jsxs(he,{children:[t.jsx(E,{name:s.icon,size:40,color:n.colors.muted2}),t.jsx(pe,{children:s.title}),t.jsx(me,{children:s.body}),e!=="sales"?t.jsx(yt,{as:oe,to:"/items",variant:"white",children:r("notFound.cta")}):null]})}function Ot(){const{session:e}=O(),[s,a]=g.useState("all"),[i,c]=ze(),o=i.get(z)===re||i.get(R)===jt;Ne({title:o?r("seo.import.title"):r("nav.activity"),noindex:!0});const{count:h}=Oe(),{count:d}=st(),f=h!==void 0&&d!==void 0&&(h>0||d>0||o),p=!!e&&!o&&s!=="sales",x=!!e&&!o&&s!=="purchases",y=L(["purchases",e==null?void 0:e.address],u=>Se(e.address,e.identity,{first:P,skip:u}),{enabled:p}),b=L(["sales",e==null?void 0:e.address],u=>ie(e.address,{role:"seller",first:P,skip:u}),{enabled:x}),v=L(["credit-orders",e==null?void 0:e.address],u=>se(e.address,e.identity,{first:P,skip:u}),{enabled:p}),j=L(["mana-purchases",e==null?void 0:e.address],u=>ie(e.address,{role:"buyer",first:P,skip:u}),{enabled:p}),{data:Z}=A({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>se(e.address,e.identity,{first:200}).then(u=>u.payouts),enabled:x,staleTime:6e4}),ye=g.useMemo(()=>et(Z),[Z]),{data:be}=Te(x);if(!e)return t.jsxs(he,{children:[t.jsx(E,{name:"clock",size:40,color:n.colors.muted2}),t.jsx(pe,{children:r("activity.signInTitle")}),t.jsx(me,{children:r("activity.signInBody")})]});const ee=Ze(Je({purchases:p?y.items:[],sales:x?b.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:be}),s),ve=p&&(y.isLoading||v.isLoading||j.isLoading)||x&&b.isLoading,te=p&&(y.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||x&&b.isFetchingNextPage,je=p&&(y.hasNextPage||v.hasNextPage||j.hasNextPage)||x&&b.hasNextPage;function we(){p&&y.hasNextPage&&y.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),x&&b.hasNextPage&&b.fetchNextPage()}function ke(u){if(a(u),!o)return;const k=new URLSearchParams(i);k.delete(z),k.delete(R),c(k,{replace:!0})}function Ie(){const u=new URLSearchParams(i);u.set(z,re),u.delete(R),c(u,{replace:!0})}return t.jsxs(at,{children:[t.jsx(rt,{children:t.jsx(ot,{children:r("nav.activity")})}),t.jsxs(ct,{role:"tablist","aria-label":r("nav.activity"),children:[vt.map(u=>t.jsx(le,{type:"button",role:"tab","aria-selected":!o&&s===u,"data-active":!o&&s===u,"data-testid":`activity-filter-${u}`,onClick:()=>ke(u),children:r(`activity.filter.${u}`)},u)),f?t.jsxs(dt,{type:"button",role:"tab","aria-selected":o,"data-active":o,"data-testid":"activity-filter-migrate","aria-label":h?r("activity.migrate.chipAria",{count:h}):void 0,onClick:Ie,children:[r("activity.migrate.chip"),h?t.jsx(lt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),o?t.jsx(g.Suspense,{fallback:t.jsx(ut,{"aria-busy":"true"}),children:t.jsx(bt,{})}):ve?t.jsx(ne,{children:Array.from({length:5}).map((u,k)=>t.jsx(ae,{},k))}):ee.length===0?t.jsx($t,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(ne,{children:[ee.map(u=>u.kind==="purchase"?t.jsx(kt,{order:u.order},u.id):u.kind==="credit"?t.jsx(Et,{order:u.order},u.id):u.kind==="mana-purchase"?t.jsx(It,{sale:u.sale},u.id):t.jsx(At,{sale:u.sale,payout:tt(ye,u.sale)},u.id)),te?t.jsx(ae,{}):null]}),t.jsx(We,{hasNextPage:je,isFetching:te,onLoadMore:we})]})]})}export{Ot as Activity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,j as m}from"./react-BYHuwl8r.js";import{s as d}from"./index-
|
|
1
|
+
import{r as u,j as m}from"./react-BYHuwl8r.js";import{s as d}from"./index-Bh6adykR.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-1ai9esXb.js";import"./ethers-BKEzvwKN.js";import"./intl-CBcMB1D2.js";const P="https://cdn.decentraland.org/@dcl/shop/1.4.2-31321510979.commit-eaccdfa/_assets/custom-welcome-background-BxlFQma9.webp",L="https://cdn.decentraland.org/@dcl/shop/1.4.2-31321510979.commit-eaccdfa/_assets/DCL_LogoPattern-BryBPc3d.png",D=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,b as We,j as e,u as Ye}from"./react-BYHuwl8r.js";import{u as et}from"./useUrlFilters-DH-gxdfV.js";import{u as tt,S as Le,R as nt,F as st,e as it}from"./categories-
|
|
1
|
+
import{r as u,b as We,j as e,u as Ye}from"./react-BYHuwl8r.js";import{u as et}from"./useUrlFilters-DH-gxdfV.js";import{u as tt,S as Le,R as nt,F as st,e as it}from"./categories-BoH_BcuN.js";import{c as O,r as ot,aK as at,aL as rt,aR as lt,a as ct,l as dt,ch as ht,ci as pt,s,t,v as Be,aA as ft,D as mt,L as ge,b as n,z as ut,I as S,A as P,cj as ie,ax as xt,Z as ne,aP as gt,aO as yt,y as Pe,an as He,q as Ue,w as bt,ac as wt,ap as Te,aq as V,aZ as Ct,bD as vt}from"./index-Bh6adykR.js";import{R as jt,S as $t,a as kt,D as St,b as Et,C as Lt,c as Tt,F as Rt,d as _t,e as Mt,M as Ft,u as At,g as Nt,v as It,E as zt,h as Wt,f as Bt,i as Pt,j as Ht}from"./Assets.styles-C7r9wHQF.js";import{L as Ut}from"./LoadMore-CYVBsAhd.js";import{u as Ot}from"./useInfiniteGrid-BzWCN8NZ.js";import{E as Gt}from"./ErrorNotice-BYO5Bvyc.js";import{d as Dt}from"./dcl-schemas-CmtP3U6y.js";import{s as Zt,G as qt,w as Vt,S as Kt}from"./buy-gasless-CChLhkv0.js";import{s as Qt,j as Jt}from"./buy-BsMK5C0W.js";import{f as Xt}from"./errors-CvYDNXLT.js";import{J as Yt,C as en,B as ye}from"./ethers-BKEzvwKN.js";import{n as tn}from"./Tooltip-Cz34W2WD.js";import{G as nn}from"./grid.styles-CLaodk5Q.js";import"./skeleton.styles-S0BlHaZF.js";import"./sentry-1ai9esXb.js";import"./intl-CBcMB1D2.js";import"./authorizations-CHiv1Pa7.js";import"./sendMetaTransaction-DCqRrKxD.js";function K(i){const a=i.source??"item",o=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${a}:${o}`}const G="100000000000000000000",Oe=2,se=15,sn=/^[a-zA-Z0-9]+$/;function Re(i){const a=i.trim();return a.length===0?{ok:!1,reason:"empty"}:sn.test(a)?a.length<Oe?{ok:!1,reason:"too-short"}:a.length>se?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function on(i){return i.replace(/[^a-zA-Z0-9]/g,"").slice(0,se)}const an=["function available(string _subdomain) view returns (bool)"],_e={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function rn(){return O.chainId===Number(Dt.ChainId.MATIC_MAINNET)?_e.mainnet:_e.sepolia}async function ln(i,a={}){var m;const{rpc:o,address:h}=rn(),p=new Yt(o),x=new en(h,an,p);console.info(`[names] availability check → DCLRegistrar(${h}).available("${i}") on ${o}`);const l=await x.available(i);if((m=a.signal)!=null&&m.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${l}`),l?"available":"taken"}const cn="https://app.across.to/api";class Ce extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class be extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class we extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function dn(i){return lt(G,i)}async function hn(i,a,o={}){var m;const h=o.chainId??O.chainId,p=o.provider??"across",x=`${O.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(a)}&chainId=${h}&provider=${p}`,l=await ct(x,{method:"GET",identity:i,metadata:{}});if(!l.ok){let c;try{c=(m=await l.json())==null?void 0:m.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new Ce:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function pn(i,a){const o=ye.from(i.availableAmount),p=ye.from(G).sub(o);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Jt(i.id)}],creditsSignatures:[i.signature],externalCall:{target:a.externalCall.target,selector:a.externalCall.selector,data:a.externalCall.data,expiresAt:a.externalCall.expiresAt,salt:a.externalCall.salt},customExternalCallSignature:a.customExternalCallSignature,maxUncreditedValue:p.isNegative()?"0":p.toString(),maxCreditedValue:G}}async function fn(i,a={}){const o=cn,h=a.intervalMs??1e4,p=a.maxAttempts??60;let x={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<p;l++){try{const m=await fetch(`${o}/deposit/status?originChainId=137&depositTxHash=${i}`);if(m.ok){const c=await m.json(),d=(c.status??"pending").toLowerCase(),w=c.fillTx??c.fillTxnRef??null,y=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(d==="filled")return{status:"filled",destinationTxHash:w,actionsSucceeded:y};if(d==="refunded"||d==="expired")return{status:d,destinationTxHash:null,actionsSucceeded:!1};x={status:"pending",destinationTxHash:w,actionsSucceeded:y}}}catch{}l<p-1&&await new Promise(m=>setTimeout(m,h))}return x}async function mn(i){const{name:a,identity:o,signer:h}=i,p=i.chainId??O.chainId,x=i.provider??"across",l=(i.beneficiary??await h.getAddress()).toLowerCase();let m=null,c="unconfirmed";console.info("[names] register start",{name:a,buyer:l,chainId:p,provider:x});try{const d=await ot(p),w=dn(d);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:d});const y=await hn(o,a,{chainId:p,provider:x});console.info("[names] step 2/6 route fetched",{target:y.externalCall.target,selector:y.externalCall.selector,provider:y.provider,quoteId:y.quoteId});const j=await at(o,w);if(m=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),ye.from(j.maxCreditedValue).lt(G))throw new Error("Credit under-sized for the name price");const v=pn(j.credit,y);let g;try{g=await Zt({chainId:p,buyer:l,signer:h,args:v})}catch(b){if(!(b instanceof qt))throw b;if(b.reason==="relayer-unreachable"){c="unobservable";const $=new we;throw $.cause=b,$}g=await Qt(p,v,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:g}),await Vt(g),c="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:g}),x==="across"){const b=await fn(g,i.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:g};if(b.status==="filled"&&b.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:g}),{status:"pending",originTxHash:g};if(b.status!=="filled"||b.actionsSucceeded!==!0)throw new be;return{status:"registered",originTxHash:g,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:g}}catch(d){if(console.error("[names] register failed — raw error:",d,{name:a,buyer:l,originState:c}),d instanceof Kt)return{status:"pending",originTxHash:d.txHash};if(m&&c==="unconfirmed"&&await rt(o,[m]).catch(()=>{}),d instanceof Ce||d instanceof be||d instanceof we)throw d;const w=new Error(Xt(d,"Couldn't register the name. Please try again.",{sale:!0}));throw w.cause=d,w}}function un(){const{data:i}=dt({queryKey:["feature-flag","shop-names"],queryFn:()=>ht(pt.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return i===!0}const xn=60,gn=700,yn=25;function bn(i){if(!i)return[];const a=[];for(let o=1;o<=i.length;o++)a.push({text:i.slice(0,o),delay:xn});a[a.length-1]={text:i,delay:gn};for(let o=i.length-1;o>=1;o--)a.push({text:i.slice(0,o),delay:yn});return a}function wn(i){return i.flatMap(bn)}function Cn(i,a){const o=u.useMemo(()=>wn(i),[i]),[h,p]=u.useState(0);return u.useEffect(()=>{if(!a||o.length===0)return;const x=setTimeout(()=>p(l=>(l+1)%o.length),o[h%o.length].delay);return()=>clearTimeout(x)},[h,a,o]),!a||o.length===0?"":o[h%o.length].text}const vn="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='46.999'%20height='46.999'%20viewBox='0%200%2046.999%2046.999'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vector'%3e%3cpath%20d='M23.5861%2046.999C27.4441%2046.999%2031.1266%2046.1286%2034.3708%2044.475H12.8014C16.0456%2046.1286%2019.6405%2046.999%2023.5861%2046.999Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M8.76807%2041.9509H38.1411C39.1056%2041.1676%2040.1577%2040.2102%2040.7715%2039.514H6.13765C7.01445%2040.3843%207.89126%2041.2547%208.76807%2041.9509Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M25.0767%2034.0307H2.2797C2.80578%2035.0752%203.41955%2036.0326%204.03331%2036.9899H22.5339L25.0767%2034.0307Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M23.5861%200C10.6094%200%200%2010.4442%200%2023.4125C0%2026.2846%200.526084%2029.0697%201.49057%2031.5938L10.6094%2020.7144L15.8702%2014.3608L28.6716%2029.679L32.3542%2025.2402L41.999%2036.7288H42.7882C45.5063%2032.8993%2046.9968%2028.2864%2046.9968%2023.3254C47.1722%2010.4442%2036.5628%200%2023.5861%200ZM15.7825%2012.272C13.9412%2012.272%2012.5383%2010.7924%2012.5383%209.05166C12.5383%207.31095%2014.0289%205.83136%2015.7825%205.83136C17.6238%205.83136%2019.0267%207.31095%2019.0267%209.05166C19.0267%2010.7924%2017.6238%2012.272%2015.7825%2012.272ZM32.8803%2022.8032C29.2853%2022.8032%2026.3919%2019.931%2026.3919%2016.3626C26.3919%2012.7942%2029.2853%209.92201%2032.8803%209.92201C36.4752%209.92201%2039.3686%2012.7942%2039.3686%2016.3626C39.4563%2019.931%2036.4752%2022.8032%2032.8803%2022.8032Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M16.484%2018.7126V31.6808H27.2687L16.484%2018.7126Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M33.1433%2037.164H39.2809L33.1433%2029.766V37.164Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3c/g%3e%3c/svg%3e",jn="https://cdn.decentraland.org/@dcl/shop/1.4.2-31321510979.commit-eaccdfa/_assets/name-verified-oGwQ3ntb.svg",$n="#34fee6",kn=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -432,7 +432,7 @@ import{r as u,b as We,j as e,u as Ye}from"./react-BYHuwl8r.js";import{u as et}fr
|
|
|
432
432
|
color: ${t.colors.accent};
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
|
-
`;function Vn({name:i,priceCredits:a,onClose:o}){const{session:h}=Be(),{data:p,isError:x}=ft(h),l=mt(),m=We(),[c,d]=u.useState("confirm"),[w,y]=u.useState(""),[j,v]=u.useState(null),[g,b]=u.useState(!1),$=u.useRef(!1),_=w.trim().toLowerCase()===i.toLowerCase(),T=c==="completing",k=a!=null?ge(a):"—",F=a==null,N=p==null?void 0:p.credits,z=a!=null&&N!=null?a-N:0,M=z>0,I=F?n("names.priceUnavailable"):M?n("names.insufficientCredits",{credits:ge(z)}):null;u.useEffect(()=>{const f=L=>{L.key==="Escape"&&!T&&o()};document.addEventListener("keydown",f);const C=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",f),document.body.style.overflow=C}},[T,o]);async function R(){if(!(!h||!_||F||M||$.current)){$.current=!0,d("completing"),v(null);try{const f=await mn({name:i,identity:h.identity,signer:h.signer});ne("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:a??null,settlement:f.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),d(f.status==="registered"?"success":"pending")}catch(f){ne(yt(f)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:gt(f),purchase_type:"name"});const C=f instanceof be,L=f instanceof we;v(f instanceof Ce?n("names.errorRouteCost"):C?n("names.errorNotRegistered"):L?n("names.errorSettlementUnknown"):(f==null?void 0:f.message)||n("names.errorGeneric")),b(C||L),d("error")}finally{$.current=!1}}}const H=c!=="success"&&c!=="pending",E=ut(h==null?void 0:h.providerType);return e.jsx(kn,{onClick:T?void 0:o,role:"presentation",children:e.jsxs(Sn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:f=>f.stopPropagation(),children:[H&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(re,{onClick:o,disabled:T,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(de,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(P,{}),k]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(xe,{children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),g?e.jsx(ue,{onClick:o,children:n("names.errorSpentDismiss")}):e.jsx(ue,{onClick:()=>d("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(_n,{children:[e.jsx(Mn,{children:n("names.confirmTitle")}),e.jsx(Fn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Kn(i)}</b>`})}}),e.jsxs(An,{children:[e.jsx(Nn,{"aria-hidden":!0,children:"@"}),e.jsx(In,{value:w,onChange:f=>y(f.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(w.length,8)}ch`}}),e.jsx(zn,{children:".dcl.eth"})]})]}),I?e.jsxs(xe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:I})]}):null,e.jsx(ue,{onClick:()=>void R(),disabled:!_||!h||F||M,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Wn,{children:[e.jsx(Bn,{src:xt,alt:"",width:56,height:56}),e.jsx(Pn,{children:E?n("names.confirming"):n("names.completing")}),e.jsxs(Hn,{children:[e.jsx(Un,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(On,{children:"1/1"})]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:n("names.pendingHeaderTitle")}),e.jsx(re,{onClick:o,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{}),e.jsxs(xe,{"data-tone":"info",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(de,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(P,{}),k]})]}),e.jsx(Fe,{children:e.jsx(Ae,{onClick:()=>{o(),m("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:n("names.successHeaderTitle")}),e.jsx(re,{onClick:o,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{}),e.jsxs(Gn,{children:[e.jsx(Dn,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(Zn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(de,{style:{marginTop:20},children:[e.jsxs(En,{"data-testid":"name-success-tile",children:[e.jsx(Ln,{src:vn,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(Tn,{children:[e.jsx("span",{"aria-hidden":!0,children:i}),e.jsx(Rn,{src:jn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(P,{}),k]})]}),e.jsxs(Fe,{children:[e.jsx(Ae,{onClick:()=>{o(),m("/my-items")},children:n("names.myItems")}),e.jsx(qn,{href:O.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Kn(i){return i.replace(/[&<>"']/g,a=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[a])}const Qn="https://cdn.decentraland.org/@dcl/shop/1.4.2-
|
|
435
|
+
`;function Vn({name:i,priceCredits:a,onClose:o}){const{session:h}=Be(),{data:p,isError:x}=ft(h),l=mt(),m=We(),[c,d]=u.useState("confirm"),[w,y]=u.useState(""),[j,v]=u.useState(null),[g,b]=u.useState(!1),$=u.useRef(!1),_=w.trim().toLowerCase()===i.toLowerCase(),T=c==="completing",k=a!=null?ge(a):"—",F=a==null,N=p==null?void 0:p.credits,z=a!=null&&N!=null?a-N:0,M=z>0,I=F?n("names.priceUnavailable"):M?n("names.insufficientCredits",{credits:ge(z)}):null;u.useEffect(()=>{const f=L=>{L.key==="Escape"&&!T&&o()};document.addEventListener("keydown",f);const C=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",f),document.body.style.overflow=C}},[T,o]);async function R(){if(!(!h||!_||F||M||$.current)){$.current=!0,d("completing"),v(null);try{const f=await mn({name:i,identity:h.identity,signer:h.signer});ne("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:a??null,settlement:f.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),d(f.status==="registered"?"success":"pending")}catch(f){ne(yt(f)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:gt(f),purchase_type:"name"});const C=f instanceof be,L=f instanceof we;v(f instanceof Ce?n("names.errorRouteCost"):C?n("names.errorNotRegistered"):L?n("names.errorSettlementUnknown"):(f==null?void 0:f.message)||n("names.errorGeneric")),b(C||L),d("error")}finally{$.current=!1}}}const H=c!=="success"&&c!=="pending",E=ut(h==null?void 0:h.providerType);return e.jsx(kn,{onClick:T?void 0:o,role:"presentation",children:e.jsxs(Sn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:f=>f.stopPropagation(),children:[H&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(re,{onClick:o,disabled:T,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(de,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(P,{}),k]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(xe,{children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),g?e.jsx(ue,{onClick:o,children:n("names.errorSpentDismiss")}):e.jsx(ue,{onClick:()=>d("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(_n,{children:[e.jsx(Mn,{children:n("names.confirmTitle")}),e.jsx(Fn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Kn(i)}</b>`})}}),e.jsxs(An,{children:[e.jsx(Nn,{"aria-hidden":!0,children:"@"}),e.jsx(In,{value:w,onChange:f=>y(f.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(w.length,8)}ch`}}),e.jsx(zn,{children:".dcl.eth"})]})]}),I?e.jsxs(xe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:I})]}):null,e.jsx(ue,{onClick:()=>void R(),disabled:!_||!h||F||M,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Wn,{children:[e.jsx(Bn,{src:xt,alt:"",width:56,height:56}),e.jsx(Pn,{children:E?n("names.confirming"):n("names.completing")}),e.jsxs(Hn,{children:[e.jsx(Un,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(On,{children:"1/1"})]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:n("names.pendingHeaderTitle")}),e.jsx(re,{onClick:o,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{}),e.jsxs(xe,{"data-tone":"info",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(de,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(P,{}),k]})]}),e.jsx(Fe,{children:e.jsx(Ae,{onClick:()=>{o(),m("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:n("names.successHeaderTitle")}),e.jsx(re,{onClick:o,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{}),e.jsxs(Gn,{children:[e.jsx(Dn,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(Zn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(de,{style:{marginTop:20},children:[e.jsxs(En,{"data-testid":"name-success-tile",children:[e.jsx(Ln,{src:vn,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(Tn,{children:[e.jsx("span",{"aria-hidden":!0,children:i}),e.jsx(Rn,{src:jn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(P,{}),k]})]}),e.jsxs(Fe,{children:[e.jsx(Ae,{onClick:()=>{o(),m("/my-items")},children:n("names.myItems")}),e.jsx(qn,{href:O.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Kn(i){return i.replace(/[&<>"']/g,a=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[a])}const Qn="https://cdn.decentraland.org/@dcl/shop/1.4.2-31321510979.commit-eaccdfa/_assets/identity-icon-C8yAW_Gq.svg",Jn="https://cdn.decentraland.org/@dcl/shop/1.4.2-31321510979.commit-eaccdfa/_assets/world-icon-6xQ-PmmW.svg",Xn="https://cdn.decentraland.org/@dcl/shop/1.4.2-31321510979.commit-eaccdfa/_assets/invite-icon-Bz6lCTuB.svg",Yn="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",es=s.div`
|
|
436
436
|
width: 100%;
|
|
437
437
|
min-width: 0;
|
|
438
438
|
`,ts=s.nav`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as b,j as o}from"./react-BYHuwl8r.js";import{C as oe,R as B,a as je,b as We}from"./categories-
|
|
1
|
+
import{r as b,j as o}from"./react-BYHuwl8r.js";import{C as oe,R as B,a as je,b as We}from"./categories-BoH_BcuN.js";import{n as c,T as Re}from"./Tooltip-Cz34W2WD.js";import{s as t,t as e,I as T,b as a,ac as K,C as U}from"./index-Bh6adykR.js";const f=1e5,y=900,g=90,R=g*2,ie=y/g,ne=f-y,Y=100;function G(i){const s=Math.max(0,Math.min(Math.round(i),R));if(s<=g)return s*ie;const p=y+(s-g)/g*ne;return Math.round(p/Y)*Y}function M(i){const s=Math.max(0,Math.min(i,f));return s<=y?Math.round(s/ie):g+Math.round((s-y)/ne*g)}function q(i){return M(i)/R*100}const Te=t.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i,L as _,r as F}from"./react-BYHuwl8r.js";import{t as o,s as n,B as G,x as N,y as P,b as e,v as B,z as O,I as z,A as K,l as w,D as H,c as Q,E as X,F as A,k as Z,G as J,H as E}from"./index-
|
|
1
|
+
import{j as i,L as _,r as F}from"./react-BYHuwl8r.js";import{t as o,s as n,B as G,x as N,y as P,b as e,v as B,z as O,I as z,A as K,l as w,D as H,c as Q,E as X,F as A,k as Z,G as J,H as E}from"./index-Bh6adykR.js";import{c as U,d as V,b as Y,e as tt,s as it,a as et}from"./authorizations-CHiv1Pa7.js";import{f as ot}from"./builder-UN5pIfno.js";import{m as at}from"./mana-matic-C4e1sNO3.js";import{f as nt}from"./errors-CvYDNXLT.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-1ai9esXb.js";import"./ethers-BKEzvwKN.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-DCqRrKxD.js";const st=N`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,rt=N`
|
|
4
4
|
to { background-position: -200% 0; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as Qe,r as T,b as oa,a as ca}from"./react-BYHuwl8r.js";import{t as J,s as i,b as a,L as de,C as je,ax as la,ay as qe,az as da,J as ua,I as O,A as Et,K as Ne,y as ha,X as H,am as ht,v as pa,w as ga,l as ma,aA as xa,D as fa,aB as ya,an as ba,aC as va,aD as pt,aE as wa,aF as Ca,z as ja,aG as gt,Z as D,aH as mt,aI as ka,k as ne,r as $a,c as xt,aJ as Sa,aK as ft,aL as Be,aM as Ma,aN as ye,aO as be,aP as yt,g as bt,f as vt,aQ as Ta}from"./index-
|
|
1
|
+
import{j as e,L as Qe,r as T,b as oa,a as ca}from"./react-BYHuwl8r.js";import{t as J,s as i,b as a,L as de,C as je,ax as la,ay as qe,az as da,J as ua,I as O,A as Et,K as Ne,y as ha,X as H,am as ht,v as pa,w as ga,l as ma,aA as xa,D as fa,aB as ya,an as ba,aC as va,aD as pt,aE as wa,aF as Ca,z as ja,aG as gt,Z as D,aH as mt,aI as ka,k as ne,r as $a,c as xt,aJ as Sa,aK as ft,aL as Be,aM as Ma,aN as ye,aO as be,aP as yt,g as bt,f as vt,aQ as Ta}from"./index-Bh6adykR.js";import{M as Ia,S as Pa,C as Aa,H as za,a as Ea,T as qa,X as Ba,b as Ra,B as Fa,c as _a,d as wt,e as Wa,f as ke,P as qt,g as La,h as Ka,i as Qa,j as Na,k as Ke,l as ue,L as Ua,m as Ga,n as Ct,o as jt,W as Ha,p as Oa,q as Va,r as Da,A as Ja,s as Xa,t as Ya,u as Za,v as es,w as ts,x as as,y as ss,z as ns,D as is,E as rs,F as os,G as cs,I as ls,J as ds,K as us,N as hs,O as Re,Q as ps,R as gs,U as ms,V as xs,Y as kt,Z as $t,_ as fs,$ as ys,a0 as bs,a1 as vs,a2 as St,a3 as ws}from"./CollectionCarousel-BxoPvgOg.js";import{f as Cs,h as js,a as ks,n as $s,i as Ss,A as Ms}from"./authorizations-CHiv1Pa7.js";import{g as Ts,h as Fe,p as Is}from"./buy-BsMK5C0W.js";import{b as Ps,w as As,S as Mt,G as zs}from"./buy-gasless-CChLhkv0.js";import{u as Es,M as qs,R as ve,r as Bs,c as Rs,p as Tt,a as _e}from"./useCreditPacks-vq0qzOlC.js";import{i as Fs,a as _s}from"./errors-CvYDNXLT.js";import{E as Ws}from"./ErrorNotice-BYO5Bvyc.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-1ai9esXb.js";import"./ethers-BKEzvwKN.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-DCqRrKxD.js";const{colors:ie,radius:Ls}=J,Ks=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ai as N,aj as U,ak as o,al as n,K as D,x as M}from"./index-
|
|
1
|
+
import{ai as N,aj as U,ak as o,al as n,K as D,x as M}from"./index-Bh6adykR.js";import{r as w,j as g}from"./react-BYHuwl8r.js";import{g as z,a as E,c as I,b as K}from"./clsx-WwvpwSg0.js";import{s as v}from"./styled-9SIjAP06.js";function F(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as h,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,a1 as ee,E as z,bu as te,bv as ae,I as oe,b as a,c as ie,k as re,l as se,y as ne,C as ce,ap as F,aq as le,bw as de,bx as pe}from"./index-
|
|
1
|
+
import{j as e,r as h,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,a1 as ee,E as z,bu as te,bv as ae,I as oe,b as a,c as ie,k as re,l as se,y as ne,C as ce,ap as F,aq as le,bw as de,bx as pe}from"./index-Bh6adykR.js";import{E as xe}from"./ErrorNotice-BYO5Bvyc.js";import{d as me,P as he,C as ge,a as ue,b as be}from"./collectionPage.styles-BK-K9Hp7.js";import{u as fe}from"./useStore-CQ5asPEA.js";import{u as ve,S as W,a as ye,F as je,c as Ce,P as we,d as $e,H as ke,e as Ne}from"./categories-BoH_BcuN.js";import{L as Se}from"./LoadMore-CYVBsAhd.js";import{u as Pe}from"./useInfiniteGrid-BzWCN8NZ.js";import{G as Ae}from"./grid.styles-CLaodk5Q.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-1ai9esXb.js";import"./ethers-BKEzvwKN.js";import"./intl-CBcMB1D2.js";import"./skeleton.styles-S0BlHaZF.js";const Me=s.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${b.radius.card};
|
|
4
4
|
overflow: hidden;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n,r as k}from"./react-BYHuwl8r.js";import{s as a,t as r,b as y,A as C,L as D,bV as T,x as ce,I as K,k as le,g as j,f as M,aY as Q,ar as U,a9 as pe,ck as O,aq as he}from"./index-
|
|
1
|
+
import{j as n,r as k}from"./react-BYHuwl8r.js";import{s as a,t as r,b as y,A as C,L as D,bV as T,x as ce,I as K,k as le,g as j,f as M,aY as Q,ar as U,a9 as pe,ck as O,aq as he}from"./index-Bh6adykR.js";import{s as ue,i as P,A as S,g as z,r as Z,m as J,k as G,l as Y}from"./authorizations-CHiv1Pa7.js";import{i as xe}from"./errors-CvYDNXLT.js";import{E as ge}from"./ErrorNotice-BYO5Bvyc.js";import{k as fe,l as me,m as _,n as be,o as we}from"./buy-BsMK5C0W.js";import{s as ee,M as te,E as ae}from"./sendMetaTransaction-DCqRrKxD.js";import{I as ye,C as ne}from"./ethers-BKEzvwKN.js";const N="shop:resume_after_signin",ve=900*1e3;function ht(e){try{sessionStorage.setItem(N,JSON.stringify({...e,at:Date.now()}))}catch{}}function ut(e){let t;try{t=sessionStorage.getItem(N)}catch{return null}if(!t)return null;try{sessionStorage.removeItem(N)}catch{}let i;try{i=JSON.parse(t)}catch{return null}return!i||i.type!==e||typeof i.at!="number"||Date.now()-i.at>ve?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function ke(e,t){return(e+t-1n)/t}function je(e,t,i){return e<=0||t<=0?0n:e>=t?i:ke(i*BigInt(e),BigInt(t))}function xt(e){var p,h,b;const t=Number.isFinite(e.priceCents)?Math.max(0,Math.trunc(e.priceCents)):0,i=Number.isFinite(e.balanceCents)?Math.max(0,Math.trunc(e.balanceCents)):0,o=e.priceManaWei>0n?e.priceManaWei:0n,d=e.manaBalanceWei>0n?e.manaBalanceWei:0n;if(t<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=t&&c.push({method:"credits",creditsCents:t,manaWei:0n}),o>0n&&i>0&&i<t){const u=t-i,l=je(u,t,o);d>=l&&c.push({method:"combined",creditsCents:i,manaWei:l})}o>0n&&d>=o&&c.push({method:"mana",creditsCents:0,manaWei:o});const m=((p=c.find(u=>u.method==="credits"))==null?void 0:p.method)??((h=c.find(u=>u.method==="combined"))==null?void 0:h.method)??((b=c.find(u=>u.method==="mana"))==null?void 0:b.method)??null,w=!c.some(u=>u.method==="mana"||u.method==="combined")&&o>0n&&d>0n?{manaWei:d,manaCents:Me(d,t,o),priceCents:t}:null;return{options:c,preferred:m,manaShortfall:w}}function Me(e,t,i){return Number(e*BigInt(t)/i)}function gt(e,t){let i=Number.isFinite(t)?Math.max(0,Math.trunc(t)):0;return e.map(o=>{const d=Number.isFinite(o)?Math.max(0,Math.trunc(o)):0,c=Math.min(d,i);return i-=c,c})}function X(e){return Number.isFinite(e)?Math.max(0,e)/10:0}function ft(e,t){return e.options.find(i=>i.method===t)??null}const B="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",Ce=a.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -281,7 +281,7 @@ import{j as n,r as k}from"./react-BYHuwl8r.js";import{s as a,t as r,b as y,A as
|
|
|
281
281
|
@media (prefers-reduced-motion: reduce) {
|
|
282
282
|
animation: none;
|
|
283
283
|
}
|
|
284
|
-
`;function wt({auth:e,signer:t,title:i,reason:o,name:d,image:c,icon:m,onAuthorized:x,onCancel:w,onClose:p}){const[h,b]=k.useState(!1),[u,l]=k.useState(null);async function v(){b(!0),l(null);try{await ue({auth:e,signer:t,active:!0}),x()}catch(g){xe(g)?l(y("authorizeStep.errorRejected")):(le(g,{flow:"authorize_step",kind:e.kind}),l(y("authorizeStep.errorGeneric"))),b(!1)}}return n.jsx(Te,{onClick:h?void 0:p,role:"presentation","data-testid":"authorize-step-scrim",children:n.jsxs(Be,{onClick:g=>g.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i,children:[n.jsxs(Ie,{children:[n.jsx(Ee,{children:i}),n.jsx(Ne,{onClick:p,disabled:h,"aria-label":y("authorizeStep.close"),children:n.jsx(K,{name:"close",className:"ico"})})]}),n.jsxs(Pe,{"data-testid":"authorize-step-row",children:[n.jsx(Se,{children:c?n.jsx("img",{src:c,alt:""}):m}),n.jsxs(Fe,{children:[n.jsx(Ve,{title:d,children:d}),n.jsx(qe,{children:o})]})]}),n.jsx(Le,{children:y("authorizeStep.note")}),n.jsx(ge,{message:u}),n.jsxs(De,{children:[n.jsx(Oe,{type:"button",onClick:w,disabled:h,children:y("authorizeStep.cancel")}),n.jsx(Xe,{type:"button","data-testid":"authorize-step-action",onClick:()=>void v(),disabled:h,children:h?n.jsxs(n.Fragment,{children:[n.jsx(He,{"aria-hidden":!0}),y("authorizeStep.authorizing")]}):y("authorizeStep.authorize")})]})]})})}const yt="data:image/webp;base64,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",vt="https://cdn.decentraland.org/@dcl/shop/1.4.2-
|
|
284
|
+
`;function wt({auth:e,signer:t,title:i,reason:o,name:d,image:c,icon:m,onAuthorized:x,onCancel:w,onClose:p}){const[h,b]=k.useState(!1),[u,l]=k.useState(null);async function v(){b(!0),l(null);try{await ue({auth:e,signer:t,active:!0}),x()}catch(g){xe(g)?l(y("authorizeStep.errorRejected")):(le(g,{flow:"authorize_step",kind:e.kind}),l(y("authorizeStep.errorGeneric"))),b(!1)}}return n.jsx(Te,{onClick:h?void 0:p,role:"presentation","data-testid":"authorize-step-scrim",children:n.jsxs(Be,{onClick:g=>g.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i,children:[n.jsxs(Ie,{children:[n.jsx(Ee,{children:i}),n.jsx(Ne,{onClick:p,disabled:h,"aria-label":y("authorizeStep.close"),children:n.jsx(K,{name:"close",className:"ico"})})]}),n.jsxs(Pe,{"data-testid":"authorize-step-row",children:[n.jsx(Se,{children:c?n.jsx("img",{src:c,alt:""}):m}),n.jsxs(Fe,{children:[n.jsx(Ve,{title:d,children:d}),n.jsx(qe,{children:o})]})]}),n.jsx(Le,{children:y("authorizeStep.note")}),n.jsx(ge,{message:u}),n.jsxs(De,{children:[n.jsx(Oe,{type:"button",onClick:w,disabled:h,children:y("authorizeStep.cancel")}),n.jsx(Xe,{type:"button","data-testid":"authorize-step-action",onClick:()=>void v(),disabled:h,children:h?n.jsxs(n.Fragment,{children:[n.jsx(He,{"aria-hidden":!0}),y("authorizeStep.authorizing")]}):y("authorizeStep.authorize")})]})]})})}const yt="data:image/webp;base64,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",vt="https://cdn.decentraland.org/@dcl/shop/1.4.2-31321510979.commit-eaccdfa/_assets/buy-error-22UunaPC.png";async function kt(e){const[t]=await re({...e,trades:[e.trade]});return t}async function jt(e){const[t]=await re({...e,trades:[],mints:[e.mint]});return t}async function re(e){const{trades:t,mints:i=[],buyer:o,signer:d,onSigned:c,manaWei:m}=e;if(t.length===0&&i.length===0)throw new Error("No items to buy");const x=new Map;for(const h of t){const b=`${h.chainId}:${h.contract.toLowerCase()}`,u=x.get(b);u?u.push(h):x.set(b,[h])}const w=new Map;for(const h of i){const b=w.get(h.chainId);b?b.push(h):w.set(h.chainId,[h])}const p=[];for(const h of x.values())p.push(await Re({trades:h,buyer:o,signer:d,onSigned:c,requiredManaWei:m}));for(const[h,b]of w){const u=m??b.reduce((l,v)=>l+BigInt(v.item.priceWei),0n);p.push(await Ke({mints:b,chainId:h,buyer:o,signer:d,onSigned:c,requiredManaWei:u}))}return p}async function Re(e){const{trades:t,buyer:i,signer:o,onSigned:d,requiredManaWei:c}=e,m=t[0],x=j(Q(m.contract),m.chainId),w=j(M.MANAToken,m.chainId);await P({auth:{kind:S.Allowance,contractAddress:w.address,spenderAddress:x.address,chainId:m.chainId},signer:o,requiredWei:c});const p=t.map(l=>me(l,i));if(z.enabled)try{const l=new ye(x.abi).encodeFunctionData("accept",[p]),v=Z(),g=J(o.provider,v),f=await ee(g,v,l,x,{serverURL:z.relayerUrl});return d==null||d(),await G(f,"the MANA purchase"),f}catch(l){if(l instanceof te&&l.code===ae.USER_DENIED||l instanceof Y)throw l;console.warn("[buyWithMana] gasless meta-tx failed, falling back to a direct tx:",l)}await U(o.provider,m.chainId);const b=await new ne(x.address,x.abi,o).accept(p,_(m.chainId));return d==null||d(),(await b.wait()).transactionHash}async function Ke(e){const{mints:t,chainId:i,buyer:o,signer:d,onSigned:c,requiredManaWei:m}=e,x=j(M.CollectionStore,i),w=j(M.MANAToken,i),p=t.map(l=>l.item);if(await P({auth:{kind:S.Allowance,contractAddress:w.address,spenderAddress:x.address,chainId:i},signer:d,requiredWei:m}),z.enabled)try{const l=be(p,o,x.abi),v=Z(),g=J(d.provider,v),f=await ee(g,v,l,x,{serverURL:z.relayerUrl});return c==null||c(),await G(f,"the MANA purchase"),f}catch(l){if(l instanceof te&&l.code===ae.USER_DENIED||l instanceof Y)throw l;console.warn("[buyMintWithMana] gasless meta-tx failed, falling back to a direct tx:",l)}await U(d.provider,i);const b=await new ne(x.address,x.abi,d).buy(we(p,o),_(i));return c==null||c(),(await b.wait()).transactionHash}async function Mt(e){const{trade:t,...i}=e;return oe({target:{kind:"trade",trade:t},...i})}async function Ct(e){const{mint:t,...i}=e;return oe({target:{kind:"store",mint:t},...i})}async function oe(e){const{target:t,buyer:i,signer:o,credits:d,manaGapWei:c,onBroadcast:m,onReverted:x}=e;if(d.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(c<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const w=se(t),p=j(M.MANAToken,w),h=j(M.CreditsManager,w);await P({auth:{kind:S.Allowance,contractAddress:p.address,spenderAddress:h.address,chainId:w},signer:o,requiredWei:c});const u=(d.reduce((l,v)=>l+BigInt(v.availableAmount),0n)+c).toString();return fe({purchase:Qe(t,d,u),buyer:i,signer:o,onBroadcast:m,onReverted:x})}function se(e){return e.kind==="trade"?e.trade.chainId:e.mint.chainId}function Qe(e,t,i){return e.kind==="trade"?{kind:"trade",trade:e.trade,credits:t,maxCreditedValue:i}:{kind:"store",item:e.mint.item,chainId:e.mint.chainId,credits:t,maxCreditedValue:i}}function At(e,t){const i=se(t);return e==="combined"?{spender:j(M.CreditsManager,i).address,chainId:i}:{spender:t.kind==="trade"?j(Q(t.trade.contract),i).address:j(M.CollectionStore,i).address,chainId:i}}function Wt(e){return n.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...e,children:n.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function zt(e){return n.jsx("svg",{viewBox:"0 0 20 20",width:"24",height:"24","aria-hidden":!0,...e,children:n.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:s,gradients:F,radius:de,z:Ue}=r,$t=a.div`
|
|
285
285
|
position: fixed;
|
|
286
286
|
inset: 0;
|
|
287
287
|
z-index: ${Ue.overlay};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-C4oAOZ2V.js","_assets/react-BYHuwl8r.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{s as o,_ as a}from"./index-
|
|
2
|
+
import{s as o,_ as a}from"./index-Bh6adykR.js";import{r as n,j as e}from"./react-BYHuwl8r.js";const s=o.div`
|
|
3
3
|
position: fixed;
|
|
4
4
|
inset: 0;
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t}from"./sentry-
|
|
1
|
+
import{p as t}from"./sentry-1ai9esXb.js";var e={};const o={ACCOUNT_TABS:[{label:"Tokens"},{label:"Activity"}],SECURE_SITE_ORIGIN:(typeof t<"u"&&typeof e<"u"?e.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{o as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as z}from"./react-BYHuwl8r.js";import{r as W}from"./index-BcyBTPof.js";function Y(o,f){for(var S=0;S<f.length;S++){const P=f[S];if(typeof P!="string"&&!Array.isArray(P)){for(const h in P)if(h!=="default"&&!(h in o)){const m=Object.getOwnPropertyDescriptor(P,h);m&&Object.defineProperty(o,h,m.get?m:{enumerable:!0,get:()=>P[h]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}var O={},L={},D={},U={},H;function G(){if(H)return U;H=1,Object.defineProperty(U,"__esModule",{value:!0}),U.createFetchComponent=P;const o=new Set([400,401,403,404]),f=new Set(["GET","HEAD","OPTIONS","PUT","DELETE"]);async function S(h,m,y){var $;const{timeout:g,retryDelay:d,abortController:F}=y,q=F.signal;let M=y.attempts,w,A;do{w=void 0,A=void 0;let C=null;try{g&&(C=setTimeout(()=>F.abort(),g)),--M,w=await fetch(h,m)}catch(n){A=n}finally{C&&clearTimeout(C)}if(w&&(w.ok||o.has(w.status))||q.aborted||M===0)break;w&&await(($=w.body)==null?void 0:$.cancel().catch(()=>{})),await new Promise(n=>setTimeout(n,d))}while(!0);if(q.aborted)throw new Error("Request aborted (timed out)");if(!w)throw A;return w}function P(h){const m=h==null?void 0:h.defaultHeaders;async function y(g,d){const{timeout:F,method:q="GET",retryDelay:M=0,abortController:w,attempts:A,...$}={...h==null?void 0:h.defaultFetcherOptions,...d},C=w||new AbortController,n=f.has(q.toUpperCase())?A??1:1,e={...$,method:q,signal:C.signal};return m&&(e.headers={...m,...$.headers||{}}),S(g,e,{timeout:F,retryDelay:M,attempts:n,abortController:C})}return{fetch:y}}return U}var Q;function X(){return Q||(Q=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.createFetchComponent=void 0;var f=G();Object.defineProperty(o,"createFetchComponent",{enumerable:!0,get:function(){return f.createFetchComponent}})})(D)),D}const J="0.0.0-development",K={version:J};var V;function Z(){return V||(V=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.QueryBuilder=o.sanitizeUrl=o.mergeRequestOptions=o.convertFiltersToQueryParams=o.splitValuesIntoManyQueries=o.splitValuesIntoManyQueryBuilders=o.splitAndFetchPaginated=o.splitAndFetch=o.MAX_URL_LENGTH=o.addModelToFormData=o.getCurrentVersion=void 0;const f=X(),S=K;function P(){return S.version}o.getCurrentVersion=P;function h(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,s)=>{const c=`${t}[${s}]`;h(a,e,c)}):typeof n[r]=="object"?h(n[r],e,t):e.append(t,n[r].toString())}return e}o.addModelToFormData=h;function m(n){return Array.from(new Set(n))}o.MAX_URL_LENGTH=2048;async function y({baseUrl:n,path:e,queryParams:i,fetcher:r,uniqueBy:t,options:a}){r=r||(0,f.createFetchComponent)();const s=q({baseUrl:n,path:e,queryParams:i}),c=new Map;for(const u of s)(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())}o.splitAndFetch=y;const g=7;async function d({baseUrl:n,path:e,queryParams:i,elementsProperty:r,uniqueBy:t,options:a,fetcher:s}){s=s||(0,f.createFetchComponent)();const u=q({baseUrl:n,path:e,queryParams:i,reservedParams:new Map([["offset",g]])}),b=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 s.fetch(l,a)).json();p[r].forEach(j=>b.set(j[t],j));const _=p.pagination.next;l=_?new URL(_,l).toString():void 0}catch{E=!0}}return Array.from(b.values())}o.splitAndFetchPaginated=d;function F({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 C(e+i,t,r)];const s=Array.from(t.entries()).map(([l,p])=>[l,m(p)]).sort(([l,p],[T,_])=>p.length-_.length),c=new C(e+i,new Map,r);for(let l=0;l<s.length-1;l++){const[p,T]=s[l];if(!c.canSetParams(p,T))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,T)}let u=C.clone(c);const[b,E]=s[s.length-1],v=[];for(const l of E)u.canAddParam(b,l)||(v.push(u),u=C.clone(c)),u.addParam(b,l);return v.push(u),v}o.splitValuesIntoManyQueryBuilders=F;function q(n){return F(n).map(i=>i.toString())}o.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(A).map(s=>`${s}`);else if(A(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)}o.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}}o.mergeRequestOptions=w;function A(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}o.sanitizeUrl=$;class C{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<o.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)<o.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 C(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)}}o.QueryBuilder=C})(L)),L}var R={},I;function x(){if(I)return R;I=1,Object.defineProperty(R,"__esModule",{value:!0}),R.retry=void 0;async function o(f,S,P,h){for(;P>0;)try{return await S()}catch(m){if(P--,P>0)console.info(`Failed to ${f}. Still have ${P} attempt/s left. Will try again in ${h}`),await new Promise(y=>setTimeout(y,h));else throw m}throw new Error("Please specify more than one attempt for the retry function")}return R.retry=o,R}var N;function ee(){if(N)return O;N=1,Object.defineProperty(O,"__esModule",{value:!0}),O.createContentClient=O.downloadContent=void 0;const o=W(),f=Z(),S=x();async function P(m,y,g,d){const{attempts:F=3,retryDelay:q=500}=d||{},M=d!=null&&d.timeout?{timeout:d.timeout}:{};return(0,S.retry)(`fetch file with hash ${g} from ${y}`,async()=>{const w=await m.fetch(`${y}/${g}`,M),A=new Uint8Array(await w.arrayBuffer());if(!(d!=null&&d.avoidChecks)&&(g.startsWith("Qm")?await(0,o.hashV0)(A):await(0,o.hashV1)(A))!==g)throw new Error(`Failed to fetch file with hash ${g} from ${y}`);return A},F,q)}O.downloadContent=P;function h(m){const{fetcher:y,logger:g}=m,d=(0,f.sanitizeUrl)(m.url),F=m==null?void 0:m.parallelConfig;async function q(t,a,s){const c=new AbortController,u=c.signal,b=(0,f.mergeRequestOptions)(s,{signal:u});return new Promise(async E=>{let v=t.length;const l=()=>{v--,v===0&&E([])},p=T=>T&&Array.isArray(T)&&T.length>0?(c.abort(),E(T),!0):!1;t.forEach(async T=>{try{const _=(0,f.sanitizeUrl)(T),j=await y.fetch(`${_}${a}`,b);if(u.aborted){l();return}const k=await j.json();p(k)||l()}catch(_){u.aborted||g==null||g.warn(`Failed to fetch from ${T}:`,_),l()}})})}async function M(t,a,s){const u=(await Promise.allSettled(t.map(async l=>{try{const p=(0,f.sanitizeUrl)(l);return await(await y.fetch(`${p}${a}`,s)).json()}catch(p){return g==null||g.warn(`Failed to fetch from ${l}:`,p),[]}}))).filter(l=>l.status==="fulfilled").map(l=>l.value||[]),b=u.flatMap(l=>l),E=u.filter(l=>l.length===0).length,v=new Map;return b.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 s=new FormData;s.append("entityId",t.entityId),(0,f.addModelToFormData)(t.authChain,s,"authChain");const c=await i(Array.from(t.files.keys()),a);for(const[u,b]of t.files)(!c.has(u)||u===t.entityId)&&s.append(u,new Blob([b]),u);return s}async function A(t,a){const s=await w(t,a),c=(0,f.mergeRequestOptions)(a||{},{body:s,method:"POST"});return await y.fetch(`${d}/entities`,c)}async function $(t,a){if(t.length===0)return Promise.reject("You must set at least one pointer.");const s=(0,f.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:t}),method:"POST",headers:{"Content-Type":"application/json"}});return(await y.fetch(`${d}/entities/active`,s)).json()}async function C(t,a){if(t.length===0)return Promise.reject("You must set at least one id.");const s=(0,f.mergeRequestOptions)(a||{},{body:JSON.stringify({ids:t}),method:"POST",headers:{"Content-Type":"application/json"}}),c=(a==null?void 0:a.parallel)||F;return c!=null&&c.urls&&(c==null?void 0:c.urls.length)>0?q([d,...c.urls],"/entities/active",s):(await y.fetch(`${d}/entities/active`,s)).json()}async function n(t,a){const s=await C([t],a);return s.length===0?Promise.reject(`Failed to find an entity with id '${t}'.`):s[0]}function e(t,a){return t.length===0?Promise.reject("You must set at least one cid."):(0,f.splitAndFetch)({fetcher:y,options:a,baseUrl:d,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 s=(a==null?void 0:a.parallel)||F;if(!(s!=null&&s.urls)||s.urls.length===0)throw new Error("Parallel configuration is required for checking pointer consistency");const c=(0,f.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:[t]}),method:"POST",headers:{"Content-Type":"application/json"}}),u=[d,...s.urls],{entities:b,emptyResults:E}=await M(u,"/entities/active",c);if(b.length===0)return{isConsistent:!0,upToDateEntities:void 0,outdatedEntities:void 0};const v=Math.max(...b.map(_=>_.timestamp)),l=b.filter(_=>_.timestamp===v),p=b.filter(_=>_.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:C,fetchEntityById:n,downloadContent:(t,a)=>P(y,d+"/contents",t,a),deploy:A,isContentAvailable:e,checkPointerConsistency:r}}return O.createContentClient=h,O}var B=ee();const te=z(B),ae=Y({__proto__:null,default:te},[B]);export{ae as C};
|
|
1
|
+
import{g as z}from"./react-BYHuwl8r.js";import{r as W}from"./index-DkPrBpEu.js";function Y(o,f){for(var S=0;S<f.length;S++){const P=f[S];if(typeof P!="string"&&!Array.isArray(P)){for(const h in P)if(h!=="default"&&!(h in o)){const m=Object.getOwnPropertyDescriptor(P,h);m&&Object.defineProperty(o,h,m.get?m:{enumerable:!0,get:()=>P[h]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}var O={},L={},D={},U={},H;function G(){if(H)return U;H=1,Object.defineProperty(U,"__esModule",{value:!0}),U.createFetchComponent=P;const o=new Set([400,401,403,404]),f=new Set(["GET","HEAD","OPTIONS","PUT","DELETE"]);async function S(h,m,y){var $;const{timeout:g,retryDelay:d,abortController:F}=y,q=F.signal;let M=y.attempts,w,A;do{w=void 0,A=void 0;let C=null;try{g&&(C=setTimeout(()=>F.abort(),g)),--M,w=await fetch(h,m)}catch(n){A=n}finally{C&&clearTimeout(C)}if(w&&(w.ok||o.has(w.status))||q.aborted||M===0)break;w&&await(($=w.body)==null?void 0:$.cancel().catch(()=>{})),await new Promise(n=>setTimeout(n,d))}while(!0);if(q.aborted)throw new Error("Request aborted (timed out)");if(!w)throw A;return w}function P(h){const m=h==null?void 0:h.defaultHeaders;async function y(g,d){const{timeout:F,method:q="GET",retryDelay:M=0,abortController:w,attempts:A,...$}={...h==null?void 0:h.defaultFetcherOptions,...d},C=w||new AbortController,n=f.has(q.toUpperCase())?A??1:1,e={...$,method:q,signal:C.signal};return m&&(e.headers={...m,...$.headers||{}}),S(g,e,{timeout:F,retryDelay:M,attempts:n,abortController:C})}return{fetch:y}}return U}var Q;function X(){return Q||(Q=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.createFetchComponent=void 0;var f=G();Object.defineProperty(o,"createFetchComponent",{enumerable:!0,get:function(){return f.createFetchComponent}})})(D)),D}const J="0.0.0-development",K={version:J};var V;function Z(){return V||(V=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.QueryBuilder=o.sanitizeUrl=o.mergeRequestOptions=o.convertFiltersToQueryParams=o.splitValuesIntoManyQueries=o.splitValuesIntoManyQueryBuilders=o.splitAndFetchPaginated=o.splitAndFetch=o.MAX_URL_LENGTH=o.addModelToFormData=o.getCurrentVersion=void 0;const f=X(),S=K;function P(){return S.version}o.getCurrentVersion=P;function h(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,s)=>{const c=`${t}[${s}]`;h(a,e,c)}):typeof n[r]=="object"?h(n[r],e,t):e.append(t,n[r].toString())}return e}o.addModelToFormData=h;function m(n){return Array.from(new Set(n))}o.MAX_URL_LENGTH=2048;async function y({baseUrl:n,path:e,queryParams:i,fetcher:r,uniqueBy:t,options:a}){r=r||(0,f.createFetchComponent)();const s=q({baseUrl:n,path:e,queryParams:i}),c=new Map;for(const u of s)(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())}o.splitAndFetch=y;const g=7;async function d({baseUrl:n,path:e,queryParams:i,elementsProperty:r,uniqueBy:t,options:a,fetcher:s}){s=s||(0,f.createFetchComponent)();const u=q({baseUrl:n,path:e,queryParams:i,reservedParams:new Map([["offset",g]])}),b=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 s.fetch(l,a)).json();p[r].forEach(j=>b.set(j[t],j));const _=p.pagination.next;l=_?new URL(_,l).toString():void 0}catch{E=!0}}return Array.from(b.values())}o.splitAndFetchPaginated=d;function F({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 C(e+i,t,r)];const s=Array.from(t.entries()).map(([l,p])=>[l,m(p)]).sort(([l,p],[T,_])=>p.length-_.length),c=new C(e+i,new Map,r);for(let l=0;l<s.length-1;l++){const[p,T]=s[l];if(!c.canSetParams(p,T))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,T)}let u=C.clone(c);const[b,E]=s[s.length-1],v=[];for(const l of E)u.canAddParam(b,l)||(v.push(u),u=C.clone(c)),u.addParam(b,l);return v.push(u),v}o.splitValuesIntoManyQueryBuilders=F;function q(n){return F(n).map(i=>i.toString())}o.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(A).map(s=>`${s}`);else if(A(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)}o.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}}o.mergeRequestOptions=w;function A(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}o.sanitizeUrl=$;class C{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<o.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)<o.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 C(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)}}o.QueryBuilder=C})(L)),L}var R={},I;function x(){if(I)return R;I=1,Object.defineProperty(R,"__esModule",{value:!0}),R.retry=void 0;async function o(f,S,P,h){for(;P>0;)try{return await S()}catch(m){if(P--,P>0)console.info(`Failed to ${f}. Still have ${P} attempt/s left. Will try again in ${h}`),await new Promise(y=>setTimeout(y,h));else throw m}throw new Error("Please specify more than one attempt for the retry function")}return R.retry=o,R}var N;function ee(){if(N)return O;N=1,Object.defineProperty(O,"__esModule",{value:!0}),O.createContentClient=O.downloadContent=void 0;const o=W(),f=Z(),S=x();async function P(m,y,g,d){const{attempts:F=3,retryDelay:q=500}=d||{},M=d!=null&&d.timeout?{timeout:d.timeout}:{};return(0,S.retry)(`fetch file with hash ${g} from ${y}`,async()=>{const w=await m.fetch(`${y}/${g}`,M),A=new Uint8Array(await w.arrayBuffer());if(!(d!=null&&d.avoidChecks)&&(g.startsWith("Qm")?await(0,o.hashV0)(A):await(0,o.hashV1)(A))!==g)throw new Error(`Failed to fetch file with hash ${g} from ${y}`);return A},F,q)}O.downloadContent=P;function h(m){const{fetcher:y,logger:g}=m,d=(0,f.sanitizeUrl)(m.url),F=m==null?void 0:m.parallelConfig;async function q(t,a,s){const c=new AbortController,u=c.signal,b=(0,f.mergeRequestOptions)(s,{signal:u});return new Promise(async E=>{let v=t.length;const l=()=>{v--,v===0&&E([])},p=T=>T&&Array.isArray(T)&&T.length>0?(c.abort(),E(T),!0):!1;t.forEach(async T=>{try{const _=(0,f.sanitizeUrl)(T),j=await y.fetch(`${_}${a}`,b);if(u.aborted){l();return}const k=await j.json();p(k)||l()}catch(_){u.aborted||g==null||g.warn(`Failed to fetch from ${T}:`,_),l()}})})}async function M(t,a,s){const u=(await Promise.allSettled(t.map(async l=>{try{const p=(0,f.sanitizeUrl)(l);return await(await y.fetch(`${p}${a}`,s)).json()}catch(p){return g==null||g.warn(`Failed to fetch from ${l}:`,p),[]}}))).filter(l=>l.status==="fulfilled").map(l=>l.value||[]),b=u.flatMap(l=>l),E=u.filter(l=>l.length===0).length,v=new Map;return b.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 s=new FormData;s.append("entityId",t.entityId),(0,f.addModelToFormData)(t.authChain,s,"authChain");const c=await i(Array.from(t.files.keys()),a);for(const[u,b]of t.files)(!c.has(u)||u===t.entityId)&&s.append(u,new Blob([b]),u);return s}async function A(t,a){const s=await w(t,a),c=(0,f.mergeRequestOptions)(a||{},{body:s,method:"POST"});return await y.fetch(`${d}/entities`,c)}async function $(t,a){if(t.length===0)return Promise.reject("You must set at least one pointer.");const s=(0,f.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:t}),method:"POST",headers:{"Content-Type":"application/json"}});return(await y.fetch(`${d}/entities/active`,s)).json()}async function C(t,a){if(t.length===0)return Promise.reject("You must set at least one id.");const s=(0,f.mergeRequestOptions)(a||{},{body:JSON.stringify({ids:t}),method:"POST",headers:{"Content-Type":"application/json"}}),c=(a==null?void 0:a.parallel)||F;return c!=null&&c.urls&&(c==null?void 0:c.urls.length)>0?q([d,...c.urls],"/entities/active",s):(await y.fetch(`${d}/entities/active`,s)).json()}async function n(t,a){const s=await C([t],a);return s.length===0?Promise.reject(`Failed to find an entity with id '${t}'.`):s[0]}function e(t,a){return t.length===0?Promise.reject("You must set at least one cid."):(0,f.splitAndFetch)({fetcher:y,options:a,baseUrl:d,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 s=(a==null?void 0:a.parallel)||F;if(!(s!=null&&s.urls)||s.urls.length===0)throw new Error("Parallel configuration is required for checking pointer consistency");const c=(0,f.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:[t]}),method:"POST",headers:{"Content-Type":"application/json"}}),u=[d,...s.urls],{entities:b,emptyResults:E}=await M(u,"/entities/active",c);if(b.length===0)return{isConsistent:!0,upToDateEntities:void 0,outdatedEntities:void 0};const v=Math.max(...b.map(_=>_.timestamp)),l=b.filter(_=>_.timestamp===v),p=b.filter(_=>_.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:C,fetchEntityById:n,downloadContent:(t,a)=>P(y,d+"/contents",t,a),deploy:A,isContentAvailable:e,checkPointerConsistency:r}}return O.createContentClient=h,O}var B=ee();const te=z(B),ae=Y({__proto__:null,default:te},[B]);export{ae as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as ce,j as e,L as Me,d as Be,u as Ie,r as L}from"./react-BYHuwl8r.js";import{u as Re}from"./useUrlFilters-DH-gxdfV.js";import{u as Ae,S as Y,R as Te,F as _e,e as ze}from"./categories-
|
|
1
|
+
import{b as ce,j as e,L as Me,d as Be,u as Ie,r as L}from"./react-BYHuwl8r.js";import{u as Re}from"./useUrlFilters-DH-gxdfV.js";import{u as Ae,S as Y,R as Te,F as _e,e as ze}from"./categories-BoH_BcuN.js";import{t as de,by as We,P as Z,O as X,s,bz as De,J as Oe,bA as Ke,b as o,bB as Ue,bC as ee,B as Ge,K as he,a1 as ue,v as He,E as pe,bu as qe,bv as Ve,I as te,c as Je,y as Qe,l as Ye,ac as Ze,an as Xe,ao as et,ap as M,aq as oe,bD as re,bE as tt}from"./index-Bh6adykR.js";import{T as me}from"./skeleton.styles-S0BlHaZF.js";import{d as ot,P as rt,C as it,a as st,b as at,c as nt,e as lt}from"./collectionPage.styles-BK-K9Hp7.js";import{u as ct,L as dt}from"./useStore-CQ5asPEA.js";import{R as ht,S as ut,a as pt,D as mt,b as xt,C as gt,c as ft,F as bt,d as wt,e as yt,M as vt,E as R,f as A,g as jt,h as Ct,i as kt,j as $t}from"./Assets.styles-C7r9wHQF.js";import{L as ie}from"./LoadMore-CYVBsAhd.js";import{u as se}from"./useInfiniteGrid-BzWCN8NZ.js";import{E as T}from"./ErrorNotice-BYO5Bvyc.js";import{G as ae}from"./grid.styles-CLaodk5Q.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-1ai9esXb.js";import"./ethers-BKEzvwKN.js";import"./intl-CBcMB1D2.js";import"./Tooltip-Cz34W2WD.js";function St(r){const{gridLoading:i,gridError:a,gridCount:l,baselinePending:c,baselineError:d,baselineCount:b}=r;return i?"skeletons":a?"error":l>0?"items":c?"skeletons":d?"error":b===0?"no-creations":"filters"}const{colors:w,radius:xe,media:Nt}=de,Et=s.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. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{g as M}from"./react-BYHuwl8r.js";import{r as O}from"./index-
|
|
1
|
+
import{g as M}from"./react-BYHuwl8r.js";import{r as O}from"./index-DkPrBpEu.js";import{r as _}from"./dcl-schemas-CmtP3U6y.js";function C(u,w){for(var m=0;m<w.length;m++){const f=w[m];if(typeof f!="string"&&!Array.isArray(f)){for(const h in f)if(h!=="default"&&!(h in u)){const v=Object.getOwnPropertyDescriptor(f,h);v&&Object.defineProperty(u,h,v.get?v:{enumerable:!0,get:()=>f[h]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var d={},F;function P(){if(F)return d;F=1,Object.defineProperty(d,"__esModule",{value:!0}),d.getHashesByKey=d.buildEntityWithoutNewFiles=d.buildEntity=d.buildEntityAndFile=void 0;const u=O(),w=_();async function m({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 l={version:"v3",type:n,pointers:t,timestamp:e,content:a,metadata:r};if(a){const s=new Set;for(const b of a){const E=b.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(b.file)} is repeated`);s.add(E)}}const c=new TextEncoder().encode(JSON.stringify(l)),o={id:await(0,u.hashV1)(c),...l};if(!w.Entity.validate(o))throw new Error(`Generated entity is not valid:
|
|
2
2
|
`+((i=w.Entity.validate.errors)===null||i===void 0?void 0:i.map(s=>s.message).join(`
|
|
3
3
|
`)));return{entity:o,entityFile:c}}d.buildEntityAndFile=m;async function f({type:n,pointers:t,files:e,metadata:a,timestamp:r}){const i=Array.from(e||[]).map(([o,s])=>({key:o,content:s})),l=await Promise.all(i.map(async({key:o,content:s})=>({key:o,content:s,hash:await(0,u.hashV1)(s)}))),c=new Map(l.map(({hash:o,key:s})=>[s,o])),y=new Map(l.map(({hash:o,content:s})=>[o,s]));return v(n,t,{hashesByKey:c,filesByHash:y,metadata:a,timestamp:r})}d.buildEntity=f;async function h(n,{contentUrl:t,type:e,pointers:a,hashesByKey:r,metadata:i,timestamp:l}){const c=r??i?p(i):void 0;if(c&&A(e,c)){const y=await D(n,t,c),o=await H(y,i);return f({type:e,pointers:a,files:y,metadata:o,timestamp:l})}return v(e,a,{hashesByKey:r,metadata:i,timestamp:l})}d.buildEntityWithoutNewFiles=h;async function v(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(([o,s])=>({file:o,hash:s})),i=e!=null&&e.timestamp?e==null?void 0:e.timestamp:Date.now(),{entity:l,entityFile:c}=await m({type:n,pointers:t,timestamp:i,content:r,metadata:e==null?void 0:e.metadata}),y=e!=null&&e.filesByHash?e.filesByHash:new Map;return y.set(l.id,c),{files:y,entityId:l.id}}function A(n,t){return n===w.EntityType.PROFILE&&Array.from(t).some(([,e])=>e.toLowerCase().startsWith("qm"))}async function g(n,t){const a=await(await n.fetch(t)).arrayBuffer();return new Uint8Array(a)}async function D(n,t,e){const a=e.get("body.png"),r=e.get("face256.png"),i=new URL(`${t}/contents/${a}`).toString(),l=new URL(`${t}/contents/${r}`).toString(),[c,y]=await Promise.all([g(n,i),g(n,l)]);return new Map([["body.png",c],["face256.png",y]])}async function H(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,u.hashV1)(r));const i=n.get("body.png");return i&&(a.body=await(0,u.hashV1)(i)),e.avatar.snapshots=a,e})),t)}function p(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 d.getHashesByKey=p,d}var B=P();const N=M(B),I=C({__proto__:null,default:N},[B]);export{I as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./react-BYHuwl8r.js";import{I as i}from"./index-
|
|
1
|
+
import{j as r}from"./react-BYHuwl8r.js";import{I as i}from"./index-Bh6adykR.js";function a({message:e,className:o,testId:t}){return e?r.jsxs("p",{className:o?`error-notice ${o}`:"error-notice","data-testid":t,role:"alert",children:[r.jsx(i,{name:"alert",className:"error-notice__ico",size:18}),r.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{a as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as l,E as w,b as E,S as A,d as k,O as U,N as P,g as f,B as x,e as N,i as I,p as L}from"./W3MFrameProviderSingleton-
|
|
1
|
+
import{C as l,E as w,b as E,S as A,d as k,O as U,N as P,g as f,B as x,e as N,i as I,p as L}from"./W3MFrameProviderSingleton-DMgnEflU.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-BoAHsqWZ.js";const D=0,C={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},e=L(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=v(t),s=await m.getAssetsImageAndPrice(n),r=n.map(a=>{var c,o,p,y;const u=a.asset==="native"?f():`${a.network}:${a.asset}`,i=s.find(S=>{var g,d,h;return((h=(d=(g=S.fungibles)==null?void 0:g[0])==null?void 0:d.address)==null?void 0:h.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:(y=(p=i==null?void 0:i.fungibles)==null?void 0:p[0])==null?void 0:y.iconUrl}}});return e.assets=r,r},async getAssetsImageAndPrice(t){const n=t.map(r=>r.asset==="native"?f():`${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=P.bigNumber(e.amount??0).round(8),n=P.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()&&l.state.activeCaipNetwork&&k.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(l.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 _({page:D,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 A.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 W({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=l.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=E.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",A.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 T({sessionId:n,exchangeId:t});if(e.currentPayment.status=o.status,o.status==="SUCCESS"||o.status==="FAILED"){const p=(r=l.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"?E.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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as o}from"./react-BYHuwl8r.js";import{t as e,s as a,b as s,I as w}from"./index-
|
|
1
|
+
import{r as l,j as o}from"./react-BYHuwl8r.js";import{t as e,s as a,b as s,I as w}from"./index-Bh6adykR.js";const m=a.section`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 36px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as ue,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t as e,x as F,y as ge,b as n,C as h,v as fe,D as me,Z as x,aF as be,k as U,aP as N,bO as we,ax as Q,A as ie,I as ye,bP as H}from"./index-
|
|
1
|
+
import{b as ue,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t as e,x as F,y as ge,b as n,C as h,v as fe,D as me,Z as x,aF as be,k as U,aP as N,bO as we,ax as Q,A as ie,I as ye,bP as H}from"./index-Bh6adykR.js";import{C as ke}from"./Confetti-D2X3FtD_.js";import{F as ve}from"./Faq-CaXi1BNV.js";import{R as D}from"./resume-buy-Bf0zIH7y.js";import{u as Ce,b as $e,R as je,c as Se,i as Pe,d as Ae}from"./useCreditPacks-vq0qzOlC.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-1ai9esXb.js";import"./ethers-BKEzvwKN.js";import"./intl-CBcMB1D2.js";const A="https://cdn.decentraland.org/@dcl/shop/1.4.2-31321510979.commit-eaccdfa/_assets/pack-coins-BDh1ZDbh.webp",re="https://cdn.decentraland.org/@dcl/shop/1.4.2-31321510979.commit-eaccdfa/_assets/pack-stacks-D-V2jSHW.webp",ne="https://cdn.decentraland.org/@dcl/shop/1.4.2-31321510979.commit-eaccdfa/_assets/pack-chest-BX_j84xW.webp",_e="https://cdn.decentraland.org/@dcl/shop/1.4.2-31321510979.commit-eaccdfa/_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)",Te=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 24px;
|