@dcl/shop 0.1.0-30043940031.commit-1a0b88f → 0.1.0-30098548645.commit-d41f1c2
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-BqXTjVty.js +244 -0
- package/assets/{AnimatedBackground-DKAviRVb.js → AnimatedBackground-B1wSbdZF.js} +3 -3
- package/assets/{Assets-CbIX010b.js → Assets-uNZ9-jka.js} +11 -11
- package/assets/{Assets.styles-C5zpZCUK.js → Assets.styles-C-xsD5dl.js} +6 -6
- package/assets/Authorizations-W1UUdrPD.js +175 -0
- package/assets/Cart-Blw7vVhV.js +3 -0
- package/assets/{CircularProgress-CeVjKviE.js → CircularProgress-BFfCy1Hd.js} +1 -1
- package/assets/{Collection-CdFvuhxV.js → Collection-DQPRvrkF.js} +2 -2
- package/assets/CollectionCarousel-D2Bi7Sgm.js +1 -0
- package/assets/{ConstantsUtil-CJUlyS7R.js → ConstantsUtil-DamObtDN.js} +1 -1
- package/assets/{ContentClient-DtuNqgIp.js → ContentClient-JBAwNjZ1.js} +1 -1
- package/assets/Creator-DPwgF8OQ.js +1 -0
- package/assets/{CssVarsProvider-B0QPJ9UY.js → CssVarsProvider-Cp4XcbYa.js} +3 -3
- package/assets/{DeploymentBuilder-Bt5zjBVh.js → DeploymentBuilder-Ch1YSyjd.js} +1 -1
- package/assets/{ErrorNotice-C7soUjRV.js → ErrorNotice-Cmr8aXJs.js} +1 -1
- package/assets/{ExchangeController-aeqEXROB.js → ExchangeController-DdMMOoWf.js} +1 -1
- package/assets/GetCredits-BbXMUpEL.js +1 -0
- package/assets/{HelpersUtil-fELrO7Xi.js → HelpersUtil-CQPNVThh.js} +1 -1
- package/assets/ImportListings-DvBSRPqC.js +5 -0
- package/assets/ItemDetail--8GO0Wno.css +1 -0
- package/assets/ItemDetail-CVK9Pwv2.js +1437 -0
- package/assets/{LoadMore-CHlPzPXC.js → LoadMore-Co82ACWq.js} +1 -1
- package/assets/{MarketCheckout-dyTQT0v3.js → MarketCheckout-CXF5RWuK.js} +1 -1
- package/assets/MyAssets-BPoXrFd-.js +258 -0
- package/assets/{MyFavorites-B7HUqvEe.js → MyFavorites-BLOtKEJq.js} +1 -1
- package/assets/{NetworkUtil-Xp0fNa8X.js → NetworkUtil-xdrSr8Td.js} +1 -1
- package/assets/{NotFound-DgN5Ojh9.js → NotFound-B-Y9Dm45.js} +1 -1
- package/assets/PrimaryListModal-cAIZGy2D.js +320 -0
- package/assets/{StoreSettings-Bx7T9d4h.js → StoreSettings-Bos_AZlO.js} +3 -3
- package/assets/{StoreSettings-Bk5IXwNu.css → StoreSettings-qz4M138c.css} +1 -1
- package/assets/{Success-B45Qtg3D.js → Success-DNHF9FcH.js} +1 -1
- package/assets/{SwapController-qtGuRSFp.js → SwapController-Bk4YDtlv.js} +1 -1
- package/assets/{Tooltip-BjVKL7Fw.js → Tooltip-CMiyDsYT.js} +1 -1
- package/assets/{TradeService-DWfELVYz.js → TradeService-B-E0tJaw.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-BYvOktGz.js → W3MFrameProviderSingleton-B4WegxTX.js} +3 -3
- package/assets/{WebCryptoP256-BaA8puph.js → WebCryptoP256-CIN8LP5I.js} +1 -1
- package/assets/authorizations-xecfPSH8.js +1 -0
- package/assets/{basic-Ceg7-rw5.js → basic-DrYgU33R.js} +1 -1
- package/assets/{biconomy-dWuJAVG6.js → biconomy-BkGZoSRG.js} +1 -1
- package/assets/{browser-9oFjBwrz.js → browser-EKOgZpqm.js} +1 -1
- package/assets/browser-ponyfill-CjkfloA2.js +1 -0
- package/assets/{browser-ponyfill-DMgE6PM5.js → browser-ponyfill-sXwzu6Qj.js} +1 -1
- package/assets/builder-CdMpbqLu.js +1 -0
- package/assets/buy-DnDBBIJp.js +1 -0
- package/assets/{buy-gasless-C7VsNrLp.js → buy-gasless-DITQks7J.js} +1 -1
- package/assets/{cart-checkout-QeMYLp4l.js → cart-checkout-DldS-zcM.js} +1 -1
- package/assets/{categories-DDZgtl6y.js → categories-q4cmLb4w.js} +5 -5
- package/assets/{ccip-D1vE27l0.js → ccip-6xULYkiQ.js} +1 -1
- package/assets/{ccip-O9QIlP6E.js → ccip-Iagv6b6U.js} +1 -1
- package/assets/{chains-Bzau33xB.js → chains-Ce3mOHm7.js} +1 -1
- package/assets/collection-9XqBYepL.js +1 -0
- package/assets/{common-BaN-pXG4.js → common-D_VcNXlU.js} +1 -1
- package/assets/{controller-BDtPSPmx.js → controller-CGXADiD7.js} +2 -2
- package/assets/{core-LjTvFg1D.js → core-ClJQ0SHg.js} +4 -4
- package/assets/{custom-COtXL8aP.js → custom-CRZtbdh1.js} +1 -1
- package/assets/{data-capture-CXZOXZ6B.js → data-capture-Brtecicz.js} +1 -1
- package/assets/decimals-Br2WcHKo.js +1 -0
- package/assets/{decimals-DaU_ek4_.js → decimals-DIRnQ_Ef.js} +1 -1
- package/assets/{detectExtension-C2ped1rb.js → detectExtension-DBVDFtUM.js} +1 -1
- package/assets/{email-BS7ZREiA.js → email-Dc521KI9.js} +1 -1
- package/assets/{embedded-wallet-CWaQUjgL.js → embedded-wallet-qO37cv4b.js} +1 -1
- package/assets/{emotion-styled.browser.esm-c2FFx3DR.js → emotion-styled.browser.esm-CdNioFJM.js} +1 -1
- package/assets/{engine-bGCn900B.js → engine-C38d94-_.js} +1 -1
- package/assets/{errors-D2EYBG38.js → errors-BHedmHUe.js} +1 -1
- package/assets/estimate-l1-fee-BIFy_-EC.js +1 -0
- package/assets/eth_estimateGas-DhEvfMK1.js +1 -0
- package/assets/{eth_getStorageAt-CvOhghFe.js → eth_getStorageAt-C5DWgtYS.js} +1 -1
- package/assets/eth_getTransactionCount-CYnx77q9.js +1 -0
- package/assets/{ethereum-B_IIMsg0.js → ethereum-C11g7mpZ.js} +1 -1
- package/assets/{ethers-w5dOkonM.js → ethers-BJDbBwOP.js} +1 -1
- package/assets/{execute-DySDEvjB.js → execute-CxvgrSL8.js} +2 -2
- package/assets/{extractIPFS-mhjpSq1K.js → extractIPFS-CvNdY0iH.js} +1 -1
- package/assets/{features-DLc5WZYN.js → features-CLCrkR7s.js} +1 -1
- package/assets/{fetchTokenMetadata-C9wYmfXl.js → fetchTokenMetadata-ChVieTUE.js} +2 -2
- package/assets/{fortmatic-DhmlcDbL.js → fortmatic-bc1cz1bJ.js} +1 -1
- package/assets/{get-bytecode-D38h1G96.js → get-bytecode-B9DXJUIQ.js} +1 -1
- package/assets/get-ecosystem-wallet-info-zShJZuFf.js +1 -0
- package/assets/{getBalance-j6TTPwxJ.js → getBalance-D426yGLP.js} +2 -2
- package/assets/{getInstalledModules-3Q5HYxkN.js → getInstalledModules-_oxiIuvc.js} +1 -1
- package/assets/getNFT-DDdhWmh5.js +1 -0
- package/assets/{getNFT-BJKaB30S.js → getNFT-DbYpgeGV.js} +2 -2
- package/assets/{getOverlayAlpha-Dgr3elr3.js → getOverlayAlpha-DF26uj8z.js} +1 -1
- package/assets/{hashTypedData-C3LWcJNr.js → hashTypedData-DBErsqac.js} +1 -1
- package/assets/{hashTypedData-B3ueg2tO.js → hashTypedData-ZQ4gFkel.js} +1 -1
- package/assets/{import-CT__rglP.js → import-ZCCl3Kgl.js} +1 -1
- package/assets/{in-app-eO_XP67Y.js → in-app-CpdkUQeY.js} +1 -1
- package/assets/{in-app-wallet-calls-CaxSZMND.js → in-app-wallet-calls-dlczJBmg.js} +1 -1
- package/assets/index-B-GW8Cic.js +1 -0
- package/assets/{index-LLNcsqnt.js → index-BCFHpbdv.js} +1 -1
- package/assets/{index-D7KDT9M9.js → index-BH2TijWz.js} +1 -1
- package/assets/{index-CqYbCFw1.js → index-BJ8Gi1m8.js} +1 -1
- package/assets/{index-BfnFZQqu.js → index-BKypSXDA.js} +1 -1
- package/assets/{index-BNz2c_gH.js → index-BPE4c8Hm.js} +1 -1
- package/assets/{index-DTVGIjcC.js → index-BTEpBP4F.js} +1 -1
- package/assets/{index-Bt4sSx0j.js → index-BUxPYCpI.js} +1 -1
- package/assets/{index-Chf28tkX.js → index-BYL4Amcw.js} +1 -1
- package/assets/{index-BLif3fcT.js → index-Be_wjnpZ.js} +1 -1
- package/assets/{index-D-DOtIYj.js → index-BfgxxLyc.js} +1 -1
- package/assets/{index-I60bR1z0.js → index-BmClkpNO.js} +1 -1
- package/assets/{index-B7mff2o2.js → index-BoQpPvsJ.js} +3 -3
- package/assets/{index-BLHU8DgF.js → index-BpsxTpFt.js} +1 -1
- package/assets/{index-CoBli9XK.js → index-BqBeehVu.js} +1 -1
- package/assets/{index-D2Lec10t.js → index-BwP2pQ92.js} +1 -1
- package/assets/{index-Dp3Py-Ws.js → index-C1J0uyJU.js} +1 -1
- package/assets/{index-C6h_WU9m.js → index-C8X5uQxK.js} +1 -1
- package/assets/{index-B6KO-WXc.js → index-C8gW1uS_.js} +1 -1
- package/assets/{index-lVvjFIjk.js → index-CBz9QBMp.js} +1 -1
- package/assets/{index-BcatoSfw.js → index-CIVsEPCC.js} +1 -1
- package/assets/{index-BR4zrdA9.js → index-CO8EAj61.js} +2 -2
- package/assets/index-CUtMWqIp.css +1 -0
- package/assets/{index-Ck1Cgm82.js → index-C_3MXGQ5.js} +1 -1
- package/assets/{index-UvWrbkyR.js → index-C_96F6p3.js} +1 -1
- package/assets/{index-dVV4LZRn.js → index-Cf3Ptwp7.js} +1 -1
- package/assets/{index-FmAwtPUy.js → index-CmFvRPK_.js} +1 -1
- package/assets/{index-BzQBX2p-.js → index-CnNzrERF.js} +1 -1
- package/assets/{index-CI_Eucnr.js → index-CtyVceSL.js} +3 -3
- package/assets/{index-BgEzTrtV.js → index-CwuYCSTt.js} +1 -1
- package/assets/{index-DRB-gQiu.js → index-D0UaCvc1.js} +1 -1
- package/assets/{index-BLLuYu72.js → index-D9WRMnJQ.js} +1 -1
- package/assets/{index-D84f1SZS.js → index-DCT6sOxM.js} +1 -1
- package/assets/{index-CSlkMlP4.js → index-DHqnjZXk.js} +1 -1
- package/assets/{index-Bk6ayCIs.js → index-DL1-u2m5.js} +1 -1
- package/assets/{index-DQ1f3JN6.js → index-DTFks6GD.js} +1 -1
- package/assets/{index-BTO-tMff.js → index-DTSWcrXA.js} +1 -1
- package/assets/{index-BCdiIcLt.js → index-DUHukso9.js} +1 -1
- package/assets/{index-DPeNzqnx.js → index-DWo6WByw.js} +1 -1
- package/assets/{index-QTjwITlm.js → index-DXsS9lM4.js} +1 -1
- package/assets/{index-D4SQVwZS.js → index-DZWZ4ZjC.js} +3 -3
- package/assets/{index-DtCbj4Bu.js → index-DjNqY58Q.js} +1 -1
- package/assets/{index-ahfZZDfz.js → index-DkV39niV.js} +2 -2
- package/assets/{index-yeRgwVVL.js → index-Dkdo-C-7.js} +2 -2
- package/assets/{index-DGOaB47n.js → index-DsEcY3jS.js} +1 -1
- package/assets/{index-Cfbe2Qvo.js → index-DsmEu83d.js} +2 -2
- package/assets/{index-CPhNis9E.js → index-Dum_hwGS.js} +1 -1
- package/assets/{index-BgKrxOfP.js → index-Dw9WIdKs.js} +1 -1
- package/assets/{index-B7P0UO1e.js → index-Dz6EILW5.js} +1 -1
- package/assets/{index-Bi7dtaTz.js → index-FfFqAJ3l.js} +1 -1
- package/assets/{index-DDk8aurE.js → index-GYAvpxvp.js} +1 -1
- package/assets/{index-6eUPFQAl.js → index-GctTWB_u.js} +1 -1
- package/assets/{index-BbfDA6Q2.js → index-Ix0aAVOz.js} +1 -1
- package/assets/{index-DFwKLiGe.js → index-LwWUxbJ1.js} +1 -1
- package/assets/index-N282EqWL.js +289 -0
- package/assets/{index-DhuOONXr.js → index-PtVfNA02.js} +1 -1
- package/assets/{index-DSY1kJ-n.js → index-SeXxQE7d.js} +1 -1
- package/assets/{index-QMzB_9kT.js → index-cm1yskAO.js} +1 -1
- package/assets/{index-CLZOJwm_.js → index-dOPjS08E.js} +3 -3
- package/assets/{index-DnjriEQ8.js → index-dc-VQ6_u.js} +1 -1
- package/assets/{index-F4KCRFXO.js → index-ej1HeaVq.js} +1 -1
- package/assets/{index-RYFuERlG.js → index-hSbfPxTM.js} +1 -1
- package/assets/{index-BAbZ1oMa.js → index-oDGz3alu.js} +1 -1
- package/assets/{index-CoY6w5ve.js → index-uRCNAkhD.js} +1 -1
- package/assets/{index-DTEyrFW2.js → index-xEDt5tK0.js} +2 -2
- package/assets/{index.es-DcggvVah.js → index.es-8l4m8O48.js} +1 -1
- package/assets/{index.es-pkeG3qQo.js → index.es-BAkCd3hx.js} +4 -4
- package/assets/{index.es-BxDkRG0j.js → index.es-mQdmYoWw.js} +1 -1
- package/assets/{linkAccount-e50lqdUE.js → linkAccount-Dt1RoiMg.js} +1 -1
- package/assets/{localBatchGatewayRequest-B7VW_3F8.js → localBatchGatewayRequest-C-QF008k.js} +1 -1
- package/assets/{mana-rate-Ez6IlT0x.js → mana-rate-B5qogWAy.js} +1 -1
- package/assets/{native-BMBZUPnx.js → native-8psXkTNV.js} +1 -1
- package/assets/{networks-CuAkQzro.js → networks-DTf6JA_i.js} +1 -1
- package/assets/{onramp-C5uxESKn.js → onramp-C6_Jmv_4.js} +1 -1
- package/assets/{openzeppelin-CEEpXs6H.js → openzeppelin-BI3jzvYe.js} +1 -1
- package/assets/{ownerOf-dLmWQ3QZ.js → ownerOf-CGV4XkwU.js} +1 -1
- package/assets/{parseNft-CjnCetmp.js → parseNft-BJiElQOd.js} +2 -2
- package/assets/{parseSignature-CjHHoeVW.js → parseSignature-BTArmdp-.js} +1 -1
- package/assets/{parseSignature-Ba1mhqh5.js → parseSignature-YsYfChHW.js} +3 -3
- package/assets/{passkeys-DKJW-FEa.js → passkeys-ClpAr2XQ.js} +1 -1
- package/assets/{pay-with-exchange-yOexVTa_.js → pay-with-exchange-BrMLcJvy.js} +1 -1
- package/assets/{prepare-contract-call-aT1l2NVg.js → prepare-contract-call-CWZtwOpY.js} +1 -1
- package/assets/{qr-overlay-CurN-_cO.js → qr-overlay-DFoBAvax.js} +3 -3
- package/assets/{react-C51i12iP.js → react-BXazHbBy.js} +1 -1
- package/assets/{receive-Bvf5SspN.js → receive-2v3kqZfq.js} +1 -1
- package/assets/{resolveImplementation-BMaNFS8w.js → resolveImplementation-Cz7jydx-.js} +1 -1
- package/assets/{rpc-Bclh4OVX.js → rpc-DcYX9vLT.js} +1 -1
- package/assets/{secp256k1-B7PtKdKr.js → secp256k1-CRO1xSNd.js} +1 -1
- package/assets/{secp256k1-BznDUTmG.js → secp256k1-D0kj9oiG.js} +1 -1
- package/assets/{secp256k1---Cfb5Gr.js → secp256k1-Du_5cnvk.js} +1 -1
- package/assets/{send-BxN6VGCE.js → send-EHrmCt5p.js} +1 -1
- package/assets/{send-batch-transaction-BY7yHkGa.js → send-batch-transaction-DrLYa7mf.js} +1 -1
- package/assets/{send-eip712-transaction-RXT3aSSm.js → send-eip712-transaction-DWQC0CYI.js} +2 -2
- package/assets/send-gasless-transaction-DraXgpfw.js +2 -0
- package/assets/{send-transaction-BvCcEvFd.js → send-transaction-Di96Go1T.js} +2 -2
- package/assets/{sendRawTransaction-BJZ0BEjt.js → sendRawTransaction-CzOwT9zB.js} +3 -3
- package/assets/{sentry-DKBoGDXH.js → sentry-CLqlZ0dX.js} +1 -1
- package/assets/{serializeTransaction-CRJP65Ad.js → serializeTransaction-BVfMAhW_.js} +1 -1
- package/assets/{session-proposal-Dvj-F2wQ.js → session-proposal-DQbScMFK.js} +1 -1
- package/assets/{session-request-Ce-DwiYu.js → session-request-BSJWiNx1.js} +2 -2
- package/assets/{sha256-BcAs0Y4r.js → sha256-CHkDhyAO.js} +1 -1
- package/assets/{signing-BCzW8Yh4.js → signing-BTj_vr30.js} +3 -3
- package/assets/{socials-2qO6GWvx.js → socials-Ca0m8Bc6.js} +1 -1
- package/assets/{swaps-Byx37cWK.js → swaps-Bxufbu_7.js} +1 -1
- package/assets/{thirdweb-Bzinkygh.js → thirdweb-BSXHM0bk.js} +3 -3
- package/assets/{to-serializable-transaction-BPYyQKxa.js → to-serializable-transaction-BiEB81zL.js} +2 -2
- package/assets/{totalSupply-BCBM6uY2.js → totalSupply-D7o26vFv.js} +1 -1
- package/assets/{trade-encoding-Bq9nPTSy.js → trade-encoding-6_dO5FYh.js} +1 -1
- package/assets/{transaction-Db6pntE5.js → transaction-B7gL56RA.js} +1 -1
- package/assets/{transactionReceipt-7aTE2Yz3.js → transactionReceipt-WUy2-DIs.js} +1 -1
- package/assets/{transactions-Y7mX5hPf.js → transactions-Ddu0qS1y.js} +1 -1
- package/assets/{useCreditPacks-CG7L_UQ4.js → useCreditPacks-BXDDD38Z.js} +1 -1
- package/assets/{useInfiniteGrid-H1sfBdhy.js → useInfiniteGrid-BokrX5YA.js} +1 -1
- package/assets/useManaRate-CtZMBb6a.js +1 -0
- package/assets/{useStore-Cbt7cLyp.js → useStore-DL2tZW7o.js} +2 -2
- package/assets/useTheme-B-xHZMoE.js +1 -0
- package/assets/{useTheme-CauhIIJq.js → useTheme-Tgfl6yPv.js} +1 -1
- package/assets/{utils-DBnU1jhd.js → utils-CPrJV6vP.js} +1 -1
- package/assets/{verifyHash-BzzdH-JT.js → verifyHash-DEKVRRCg.js} +1 -1
- package/assets/{w3m-modal-R9G6tUSA.js → w3m-modal-BOayHahj.js} +1 -1
- package/assets/{w3m-modal-Uf8zuJST.js → w3m-modal-DGk65SCN.js} +1 -1
- package/assets/{wait-for-tx-receipt-UIT99Yyq.js → wait-for-tx-receipt-C-yyIlse.js} +1 -1
- package/assets/{wallets-CgBIBei6.js → wallets-CKstZZYA.js} +5 -5
- package/assets/{web-connector-B1ptdbTS.js → web-connector-Df1Nw4jg.js} +3 -3
- package/assets/{writeContract-aQQPNQN6.js → writeContract-EXXVPkwI.js} +1 -1
- package/assets/{zora-sepolia-Bwjy_6bk.js → zora-sepolia-DQJtwyvj.js} +1 -1
- package/assets/{zoraTestnet-BxMHEDAV.js → zoraTestnet-Dj9qFBkp.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/Activity-CnoF6F3Z.js +0 -243
- package/assets/Authorizations-4u2_v7qf.js +0 -163
- package/assets/Cart-C1woE131.js +0 -3
- package/assets/CollectionCarousel-BC4r8J9j.js +0 -1
- package/assets/Creator-Cpw9Qy_r.js +0 -1
- package/assets/GetCredits-BfCzeAeD.js +0 -1
- package/assets/ImportListings-CxJDA8Su.js +0 -5
- package/assets/ItemDetail-BF1WOMVU.css +0 -1
- package/assets/ItemDetail-D1Xe6t7i.js +0 -82
- package/assets/MyAssets-C_wlVXNb.js +0 -258
- package/assets/PrimaryListModal-vBauRE_Q.js +0 -1
- package/assets/address-DrURAr9O.js +0 -1
- package/assets/authorizations-BdVBiEr7.js +0 -1
- package/assets/browser-ponyfill-Djb5Py6a.js +0 -1
- package/assets/buy-B_TXfJF4.js +0 -1
- package/assets/collection-d97cPr3w.js +0 -1
- package/assets/decimals-HChuNAkm.js +0 -1
- package/assets/estimate-l1-fee-CEy_ASr7.js +0 -1
- package/assets/eth_estimateGas-DcV1bi0C.js +0 -1
- package/assets/eth_getTransactionCount-BNyI69eR.js +0 -1
- package/assets/get-ecosystem-wallet-info-B4KRbr6l.js +0 -1
- package/assets/getNFT-B7SHBqxZ.js +0 -1
- package/assets/index-CkvNUeW9.css +0 -1
- package/assets/index-DH3Yzbz3.js +0 -1
- package/assets/index-k1Bog_tr.js +0 -289
- package/assets/send-gasless-transaction-DDPuuxQ-.js +0 -2
- package/assets/useManaRate-BO1b19Qr.js +0 -1
- package/assets/useTheme-TzAV5P1-.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.resales{margin-top:40px}.resales__head{margin-bottom:16px}.resales__title{font-size:22px;font-weight:700;color:var(--text)}.resales__subtitle{margin:4px 0 0;font-size:14px;color:var(--muted)}.resales__list{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}.resales__row{display:flex;align-items:center;gap:16px;padding:12px 4px;border-bottom:1px solid var(--line)}.resales__who{display:flex;align-items:center;gap:14px;min-width:0;flex:1 1 auto;text-align:left}.resales__who--link{padding:0;border:0;background:transparent;font:inherit;cursor:pointer}.resales__who--link:hover .resales__name{text-decoration:underline}.resales__ava{width:52px;height:52px;border-radius:50%;object-fit:cover;background:var(--skeleton);flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center}.resales__ava--letter{color:#fff;font-weight:700;font-size:21px}.resales__ava--empty{background:var(--skeleton)}.resales__ident{display:flex;flex-direction:column;gap:2px;min-width:0}.resales__name{font-weight:700;font-size:16px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.resales__serial{font-size:14px;color:var(--muted)}.resales__serial--muted{font-weight:600}.resales__issued{color:var(--text-2);font-weight:600}.resales__own-chip{font-size:13px;font-weight:600;color:var(--muted);background:var(--chip)}.resales__price{display:inline-flex;align-items:center;gap:6px;margin-left:auto;font-weight:700;font-size:17px;color:var(--text)}.resales__diamond{width:18px;height:18px}.resales__approx{color:var(--muted);font-weight:600}.resales__actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}.resales__add,.resales__buy{height:40px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 16px;border-radius:var(--radius-btn);font-weight:600;font-size:14px;cursor:pointer;transition:filter .15s ease}.resales__add{background:var(--black-btn);color:var(--soft-white);border:0}.resales__buy{background:var(--brand-violet);color:#fff;border:0}.resales__add:hover:not(:disabled),.resales__buy:hover:not(:disabled){filter:brightness(1.15)}.resales__add:disabled{opacity:.55;cursor:default}.resales__more{display:block;width:100%;margin:12px 0 0;height:48px;padding:0 20px;border-radius:var(--radius-btn);border:0;background:var(--chip);color:var(--text);font-weight:600;font-size:15px;cursor:pointer;transition:filter .15s ease}.resales__more:hover{filter:brightness(.96)}.resales__id{display:flex;align-items:center;gap:10px;min-width:0;flex:1 1 auto}.resales__legacy{margin-top:24px}.resales__legacy .resales__actions{margin-left:auto}.resales__legacy-head{display:flex;flex-direction:column;gap:2px;margin-bottom:10px}.resales__legacy-title{font-weight:700;font-size:15px;color:var(--text-2)}.resales__legacy-note{font-size:13px;color:var(--muted)}.resales__row--legacy{background:transparent;border-style:dashed}.resales__legacy-chip{font-size:11px;text-transform:uppercase;letter-spacing:.4px;color:var(--muted)}.resales__view-market{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 14px;border-radius:var(--radius-btn);border:1px solid var(--line-strong);color:var(--accent);font-weight:600;font-size:14px;text-decoration:none}.resales__view-market:hover{background:var(--chip)}@media(max-width:768px){.resales__row{flex-wrap:wrap;gap:12px}.resales__who{flex:1 1 100%}.resales__price{margin-left:0}.resales__actions{flex:1 1 100%;margin-left:auto}.resales__add,.resales__buy,.resales__view-market{flex:1 1 auto;height:44px}}.notify{display:flex;flex-direction:column;gap:8px;width:100%}.notify__label{font-size:14px;color:var(--text)}.notify__row{display:flex;align-items:stretch;gap:8px}.notify__input{flex:1;min-width:0;height:42px;padding:0 16px;border:1px solid var(--muted);border-radius:8px;background:#fff;font-size:16px;color:var(--text)}.notify__input::placeholder{color:var(--muted-2)}.notify__input:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.notify__btn{flex-shrink:0;height:42px;padding:0 16px;border:0;border-radius:8px;background:var(--accent);color:var(--soft-white);font-weight:600;font-size:15px;text-transform:uppercase;letter-spacing:.46px;cursor:pointer;transition:opacity .15s ease}.notify__btn:hover:not(:disabled){opacity:.9}.notify__btn:disabled{opacity:.5;cursor:default}.notify__signin{width:100%;height:42px;padding:0 16px;border:0;border-radius:8px;background:var(--accent);color:var(--soft-white);font-weight:600;font-size:15px;text-transform:uppercase;letter-spacing:.46px;cursor:pointer;transition:opacity .15s ease}.notify__signin:hover{opacity:.9}.notify__done{flex-direction:row;align-items:center;gap:16px;padding:12px;border-radius:16px;background:#c1eecf80}.notify__done-check{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:20px;height:20px;border-radius:50%;background:#34ce76;color:#fff}.notify__done-text{font-size:16px;line-height:1.5;color:var(--text-2)}.item-detail{max-width:1721px;margin:0 auto}.item-detail__crumbs{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);margin-bottom:24px}.item-detail__crumb-link{background:none;border:0;padding:0;font:inherit;color:var(--muted)}.item-detail__crumb-link:hover{color:var(--text)}.item-detail__crumb-sep{color:var(--muted-2)}.item-detail__crumb-current{color:var(--text);font-weight:600}.item-detail__main{display:grid;grid-template-columns:minmax(0,1045fr) minmax(0,514fr);gap:48px;align-items:start}@media(max-width:900px){.item-detail__main{grid-template-columns:1fr;gap:24px;max-width:none}}.item-detail__preview{position:relative;aspect-ratio:1045 / 752;border-radius:16px;overflow:hidden;background:var(--media)}@media(max-width:900px){.item-detail__preview{aspect-ratio:1 / 1}}.item-detail__preview iframe,.item-detail__preview>*{width:100%;height:100%;border:0;display:block}.item-detail__preview>.item-preview__toggle{position:absolute;top:16px;left:16px;z-index:2;width:auto;height:auto;display:inline-flex;gap:2px;padding:3px;background:#ffffffeb;border:1px solid var(--line);border-radius:999px;box-shadow:0 1px 4px #0000001f}.item-preview__toggle button{border:0;background:none;cursor:pointer;padding:6px 16px;border-radius:999px;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);transition:background .12s ease,color .12s ease}.item-preview__toggle button.is-active{background:var(--text);color:#fff}.item-preview__toggle button:not(.is-active):hover{color:var(--text)}.item-preview__toggle-ico{display:none;width:18px;height:18px}.item-detail__preview>.item-preview__emote-controls{position:absolute;bottom:16px;left:50%;transform:translate(-50%);z-index:2;width:min(360px,88%);height:auto;display:flex;align-items:center;background:#fffffff0;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);border:1px solid var(--line);border-radius:var(--radius-pill);padding:6px 12px;box-shadow:0 2px 10px #1615181f}.item-preview__emote-controls .MuiBox-root{position:static;width:100%;margin:0;padding:0;display:flex;align-items:center;gap:10px}.item-preview__emote-controls .MuiButtonBase-root{min-width:0;padding:0;margin:0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:none!important;box-shadow:none!important;color:var(--muted);flex:0 0 auto;transition:background .12s ease,color .12s ease}.item-preview__emote-controls .MuiButtonBase-root .MuiSvgIcon-root{font-size:20px;margin:0}.item-preview__emote-controls .MuiBox-root>.MuiButtonBase-root:first-child{width:34px;height:34px;background:var(--accent)!important;color:#fff}.item-preview__emote-controls .MuiBox-root>.MuiButtonBase-root:first-child:hover{background:var(--text)!important}.item-preview__emote-controls .MuiBox-root>input+.MuiButtonBase-root{width:30px;height:30px;color:var(--muted)}.item-preview__emote-controls .MuiBox-root>input+.MuiButtonBase-root:hover{background:var(--media)!important;color:var(--text)}.item-preview__emote-controls input[type=range]{flex:1 1 auto;width:auto;min-width:0;height:4px;margin:0;padding:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;cursor:pointer}.item-preview__emote-controls input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:999px;background:var(--line-strong)}.item-preview__emote-controls input[type=range]::-moz-range-track{height:4px;border-radius:999px;background:var(--line-strong)}.item-preview__emote-controls input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:13px;height:13px;margin-top:-4.5px;border-radius:50%;background:var(--accent);border:2px solid #fff;box-shadow:0 1px 3px #1615184d;cursor:pointer}.item-preview__emote-controls input[type=range]::-moz-range-thumb{width:13px;height:13px;border-radius:50%;background:var(--accent);border:2px solid #fff;box-shadow:0 1px 3px #1615184d;cursor:pointer}.item-preview__emote-controls input[type=range]:focus-visible{outline:none}.item-preview__emote-controls input[type=range]:focus-visible::-webkit-slider-thumb{outline:2px solid var(--accent);outline-offset:2px}.item-detail__preview>.item-preview__note{position:absolute;bottom:14px;left:50%;transform:translate(-50%);z-index:2;width:auto;height:auto;max-width:88%;margin:0;text-align:center;background:#161518c7;color:#fff;font-size:12px;font-weight:500;padding:6px 12px;border-radius:999px}.item-detail__preview>.item-preview__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;display:flex;align-items:center;justify-content:center;width:100%;height:100%;background:transparent}.item-preview__spinner{width:34px;height:34px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--accent);animation:item-preview-spin .8s linear infinite}@keyframes item-preview-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.item-preview__spinner{animation-duration:2.4s}}.item-detail__preview>.item-preview__loading .item-preview__skeleton{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;border-radius:inherit}.item-detail__info-skel{display:flex;flex-direction:column;gap:16px}.id-skel__title{height:34px;width:70%;border-radius:8px}.id-skel__chips{display:flex;gap:8px}.id-skel__chip{height:24px;width:88px;border-radius:6px}.id-skel__line{height:14px;width:100%;border-radius:6px}.id-skel__line--short{width:55%}.id-skel__price{height:30px;width:40%;border-radius:8px}.id-skel__btn{height:48px;width:100%;border-radius:8px;margin-top:8px}.item-detail__info{display:flex;flex-direction:column;gap:0}.item-detail__info-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.item-detail__title{font-size:28px;font-weight:600;line-height:34px;color:var(--text-2)}.item-detail__fav{flex:none;width:40px;height:40px;border-radius:50%;border:0;background:var(--media);display:grid;place-items:center;color:var(--text-2);cursor:pointer;transition:color .12s ease,background .12s ease}.item-detail__fav:hover{background:var(--line)}.item-detail__fav.is-on{color:var(--dcl-red)}.item-detail__preview>.item-detail__fav--preview{display:none}.item-detail__label{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:0;color:var(--muted)}.item-detail__chips{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}.item-detail__chips .chip{height:24px;padding:0 8px;gap:3px;font-size:13px;font-weight:500;border-radius:4px;letter-spacing:.02em;text-transform:uppercase}.item-detail__chip{background:var(--chip);color:var(--text-2)}.item-detail__section{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.item-detail__description{margin-top:15px;gap:11px}.item-detail__desc-text{margin:0;color:var(--text-2);font-size:14px;line-height:30px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.item-detail__desc-text.is-expanded{-webkit-line-clamp:unset;overflow:visible}.item-detail__desc-toggle{font-size:13px;align-self:flex-start}.item-detail__meta{display:flex;justify-content:space-between;gap:16px;margin-top:32px}.item-detail__meta-col{display:flex;flex-direction:column;gap:15px;min-width:0}.item-detail__meta-col--collection{align-items:flex-start}.item-detail__creator[data-testid=creator]{color:var(--accent);font-size:14px;gap:12px}.item-detail__creator [data-avatar]{width:48px;height:48px}.item-detail__creator [data-letter]{font-size:18px}.item-detail__creator [data-testid=creator-name]{color:var(--accent);font-weight:500;text-decoration:underline}.item-detail__creator[data-link]:hover [data-testid=creator-name]{color:var(--brand-violet)}.collection-collage{display:flex;flex-direction:column;overflow:hidden;gap:1px;background:var(--line-strong)}.collection-collage__row{display:flex;flex:1 1 50%;min-height:0;gap:1px}.collection-collage__row--full{flex-basis:100%}.collection-collage__row img{flex:1 1 0;min-width:0;width:100%;height:100%;object-fit:cover;display:block}.item-detail__divider{border:0;border-top:1px solid #cfcdd4;margin:24px 0 0;width:100%}.item-detail__price-block{margin-top:16px}.item-detail__price-row{display:flex;align-items:flex-start;gap:16px;width:100%}.item-detail__price-col{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:8px}.item-detail__stock-col{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:8px;text-align:right}.item-detail__stock-value{font-size:18px;font-weight:500;line-height:1;color:var(--text-2)}.item-detail__stock-value--out{font-size:14px;font-weight:600;text-transform:uppercase;letter-spacing:.02em;color:var(--muted-1)}.item-detail__price-label{font-size:14px;font-weight:600;text-transform:uppercase;letter-spacing:0;color:var(--muted-1)}.item-detail__price{display:flex;align-items:center;gap:10px;font-weight:700;color:var(--text)}.item-detail__diamond{width:30px;height:30px;color:var(--brand-violet)}.item-detail__price-value{font-size:30px;line-height:1}.item-detail__price--none{display:inline-flex;align-items:center;gap:6px;font-size:14px;font-weight:600;color:var(--text)}.item-detail__price-info{display:inline-flex;color:var(--muted-2);cursor:help}.item-detail__price-info:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}.item-detail__approx{font-size:24px;font-weight:700;color:var(--text);margin-right:-2px}.item-detail__market-note{font-size:13px;margin-top:6px}.item-detail__price--sale{flex-wrap:wrap;gap:10px 14px}.item-detail__price--sale .item-detail__price,.item-detail__price--sale .item-detail__price-value,.item-detail__price--sale .item-detail__diamond{color:var(--dcl-red)}.item-detail__price-was{display:inline-flex;align-items:center;gap:6px;color:var(--muted);text-decoration:line-through;font-weight:600;font-size:20px}.item-detail__diamond--was{width:18px;height:18px;color:var(--muted)}.item-detail__sale-badge{display:inline-flex;align-items:center;background:var(--dcl-red);color:#fff;font-weight:800;font-size:13px;letter-spacing:.03em;text-transform:uppercase;border-radius:6px;padding:4px 10px}.item-detail__countdown{display:inline-flex;align-items:center;gap:5px;background:var(--rarity-bg);color:var(--accent);font-size:13px;font-weight:700;border-radius:6px;padding:4px 10px;white-space:nowrap}.item-detail__ctas{display:flex;flex-direction:column;gap:12px;margin-top:20px}.item-detail__cta-price{display:none;align-items:center;gap:6px}.item-detail__cta-diamond{width:20px;height:20px;color:#fff}.item-detail__addcart{width:100%;height:48px;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--black-btn);color:var(--soft-white);border:0;border-radius:8px;font-weight:600;font-size:15px;text-transform:uppercase;letter-spacing:.46px;cursor:pointer;transition:filter .15s ease}.item-detail__addcart:hover:not(:disabled){filter:brightness(1.35)}.item-detail__addcart:disabled{opacity:.55;cursor:default}.item-detail__status{margin:0;font-size:13px}.item-detail__own-note{margin:0;font-size:14px}.item-detail__own-note a{color:var(--accent);font-weight:600}@media(max-width:900px){.item-detail__title{font-size:20px;line-height:24px}.item-detail__info-head{order:0}.item-detail__chips{order:1;margin-top:10px}.item-detail__meta{order:2;margin-top:20px}.item-detail__description{order:3;margin-top:20px}.item-detail__divider{order:4;margin-top:20px}.item-detail__price-block{order:5;margin-top:16px}.item-detail__ctas{order:6}.item-detail__status{order:7}.item-detail{padding-bottom:88px}.item-detail__ctas--buttons{position:fixed;left:0;right:0;bottom:0;z-index:40;margin-top:0;padding:12px 16px calc(12px + env(safe-area-inset-bottom));background:var(--soft-white);box-shadow:0 -4px 16px #1615181f}.item-detail__ctas--dual{flex-direction:row;align-items:stretch;gap:12px}.item-detail__ctas--dual .item-detail__cta-price{display:inline-flex}.item-detail__ctas--dual .item-detail__addcart{flex:0 0 auto;width:56px;padding:0}.item-detail__ctas--dual .item-detail__addcart-label{display:none}.item-detail__ctas--dual .item-detail__addcart .ico{margin:0}.item-detail__info-head .item-detail__fav{display:none}.item-detail__preview>.item-detail__fav--preview{display:grid;position:absolute;top:12px;right:12px;z-index:3;width:40px;height:40px;background:#ffffffeb;box-shadow:0 1px 4px #1615182e}.item-detail__preview>.item-detail__fav--preview:hover{background:#fff}.item-detail__preview>.item-preview__toggle{top:auto;left:auto;bottom:12px;right:12px;gap:0;padding:0;background:transparent;border:0;box-shadow:0 1px 4px #1615182e;overflow:hidden}.item-preview__toggle-label{display:none}.item-preview__toggle-ico{display:block}.item-preview__toggle button{padding:9px 13px;border-radius:0;background:#fff;color:var(--text-2)}.item-preview__toggle button.is-active{background:var(--text);color:#fff}.item-preview__toggle button:first-child{border-top-left-radius:999px;border-bottom-left-radius:999px}.item-preview__toggle button:last-child{border-top-right-radius:999px;border-bottom-right-radius:999px}}.item-detail--notfound{min-height:46vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:14px}.item-detail__notfound-ico{width:44px;height:44px;opacity:.4}.item-detail__notfound-title{font-size:22px}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-D4SQVwZS.js","assets/react-C51i12iP.js","assets/dcl-schemas-BICTSpB5.js","assets/index-k1Bog_tr.js","assets/sentry-DKBoGDXH.js","assets/ethers-w5dOkonM.js","assets/intl-CBcMB1D2.js","assets/index-CkvNUeW9.css","assets/emotion-styled.browser.esm-c2FFx3DR.js","assets/useTheme-CauhIIJq.js","assets/CircularProgress-CeVjKviE.js","assets/index-DTEyrFW2.js","assets/useTheme-TzAV5P1-.js","assets/CssVarsProvider-B0QPJ9UY.js","assets/getOverlayAlpha-Dgr3elr3.js","assets/index-UvWrbkyR.js","assets/colors-LINLm1ux.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{u as le,r as d,j as e,d as Ca,a as Aa,L as Sa}from"./react-C51i12iP.js";import{u as ae,a as Ma,b as pe,t,am as Pa,i as Fa,r as Ea,h as La,c as he,j as V,k as Ae,l as ke,an as Ta,E as ne,C as D,x as re,B as H,e as Ie,q as qa,J as ia,_ as Ce,ar as ra,aQ as Ra,aR as Da,aS as $a,aT as Ba,p as Me,aU as Oa,ad as ye,o as $,G as na,I as O,aV as Ka,aW as Wa,aX as Qa,M as la,aY as za,F as J,s as X,aZ as Va,a_ as Ua,a$ as Ga,n as He,b0 as Ya,b1 as Ha,b2 as Ja,b3 as Xa,b4 as Za,ae as es,m as as,b5 as ss,b6 as ts,b7 as is,w as rs,b8 as Je,b9 as ns,g as ls,as as ds,ba as os,bb as cs,at as ms,bc as us,bd as hs,be as _s}from"./index-k1Bog_tr.js";import{d as K}from"./dcl-schemas-BICTSpB5.js";import{W as ys,C as ps,t as fs,a as bs,s as xs}from"./CollectionCarousel-BC4r8J9j.js";import{b as Xe,c as gs}from"./buy-B_TXfJF4.js";import{P as vs,f as js}from"./PrimaryListModal-vBauRE_Q.js";import{b as Ns,w as ws,S as ks,G as Is}from"./buy-gasless-C7VsNrLp.js";import{g as Cs}from"./authorizations-BdVBiEr7.js";import{u as As,M as Ss,c as Ms}from"./useCreditPacks-CG7L_UQ4.js";import{R as Ze}from"./resume-buy-Bf0zIH7y.js";import{a as Ps,f as Se,i as Fs}from"./errors-D2EYBG38.js";import{E as fe}from"./ErrorNotice-C7soUjRV.js";import{l as Es}from"./loader-logo-BzY9EKdC.js";import{C as Ls}from"./CircularProgress-CeVjKviE.js";import{a as Ts,b as qs}from"./trade-encoding-Bq9nPTSy.js";import{M as da}from"./MarketCheckout-dyTQT0v3.js";import{u as oa}from"./useManaRate-BO1b19Qr.js";import{s as Rs}from"./address-DrURAr9O.js";import{T as ca}from"./Tooltip-BjVKL7Fw.js";import"./sentry-DKBoGDXH.js";import"./ethers-w5dOkonM.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-CiO3jI6F.js";import"./index-HN6Rk25C.js";import"./mana-rate-Ez6IlT0x.js";import"./emotion-CSxEP8yM.js";function ma({item:s,onClose:r,resume:c=!1}){var h,ee;const{session:i}=ae(),{data:y}=Ma(i),l=pe(),f=le(),v=As().packs.slice(0,Ss),[o,b]=d.useState("loading"),[m,N]=d.useState(null),[a,k]=d.useState(""),[E,u]=d.useState(s.priceCredits),[w,x]=d.useState(null),j=d.useRef(null),q=(w==null?void 0:w.credits)??E,M=(y==null?void 0:y.credits)??0;d.useEffect(()=>{let _=!1;if(!i){b("error"),N(t("buyModal.signInToCheckout"));return}const C=I=>{const A=I-((y==null?void 0:y.credits)??0),g=v.find(T=>T.credits>=A)??v[v.length-1];k(g.id),V("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:I,credits_balance:(y==null?void 0:y.credits)??0,shortfall:Math.max(0,A)}),b("nofunds")};return(async()=>{var I,A;try{const g=await Pa(s);if(!g)throw new Error("not for sale");if(Fa(g,i.address))throw new Error("You can't buy your own listing.");const T=Ea((A=(I=g.received)==null?void 0:I[0])==null?void 0:A.amount);if(!Number.isFinite(T)||T<=0)throw new Error("price unavailable");const S=Math.ceil(T/10);if(_)return;if(u(S),y!=null&&y.credits<S){C(S);return}try{const{credit:B,maxCreditedValue:se,usdCents:de}=await La(i.identity,T,g.id);if(_){he(i.identity,[B.id]).catch(()=>{});return}j.current=B.id;const oe=Math.ceil(de/10);u(oe);const U={trade:g,credit:B,maxCreditedValue:se,usdCents:de,credits:oe};x(U),c?W(U):b("ready")}catch(B){if(_)return;if(Ps(B)){C(S);return}throw B}}catch(g){if(_)return;V(ke(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Ae(g)}),b("error"),N(Se(g,t("buyModal.error.generic"),{sale:!0}))}})(),()=>{_=!0,j.current&&i&&(he(i.identity,[j.current]).catch(()=>{}),j.current=null)}},[]);async function W(_=w){if(!i||!_)return;b("processing"),N(null);let C=!1;try{const I={trade:_.trade,buyer:i.address,signer:i.signer,credits:[_.credit],maxCreditedValue:_.maxCreditedValue};let A;if(Cs())try{A=await Ns(I),await ws(A),C=!0}catch(g){if(g instanceof ks)C=!0;else if(g instanceof Is)A=await Xe(I);else throw g}else A=await Xe(I);j.current=null,V("Shop Completed Purchase",{...Ta([s]),payment_type:"credits",no_crypto_step:C,transaction_hash:A??null}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["detail-trade"]}),l.invalidateQueries({queryKey:["shop-item"]}),l.invalidateQueries({queryKey:["owned-token",s.contractAddress,s.tokenId]}),l.invalidateQueries({queryKey:["public-token",s.contractAddress,s.tokenId]}),l.invalidateQueries({queryKey:["item-resales",s.contractAddress,s.itemId]}),l.invalidateQueries({queryKey:["shop-items"]}),l.invalidateQueries({queryKey:["catalog-items"]}),l.invalidateQueries({queryKey:["my-assets"]}),l.invalidateQueries({queryKey:["purchases"]}),b("complete")}catch(I){ke(I)||ne(I,{flow:"buy",step:"submit",gasless:C}),he(i.identity,[_.credit.id]).catch(()=>{}),j.current=null,V(ke(I)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Ae(I)}),l.invalidateQueries({queryKey:["usd-balance"]}),N(Se(I,t("buyModal.error.generic"),{sale:!0})),b("error")}}async function Q(){if(!(!a||!i)){try{sessionStorage.setItem(Ze,JSON.stringify(s))}catch{}w&&he(i.identity,[w.credit.id]).catch(()=>{}),j.current=null,b("loading");try{const _=await Ms(a,{address:i.address,identity:i.identity});if(_.url){window.location.href=_.url;return}f("/credits")}catch(_){ne(_,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(Ze)}catch{}N(t("buyModal.error.creditsCheckout")),b("error")}}}const L=o==="processing",Z=o==="complete"?t("buyModal.titleComplete"):o==="nofunds"?t("buyModal.titleNoFunds"):t("buyModal.titleBuy");return e.jsxs("div",{className:"buy-modal",role:"dialog","aria-modal":"true","aria-label":t("buyModal.dialogAria",{name:s.name}),children:[e.jsx("div",{className:"buy-modal__scrim",onClick:L?void 0:r,"aria-hidden":!0}),e.jsxs("div",{className:`buy-modal__card${o==="processing"||o==="loading"?" buy-modal__card--tall":""}`,children:[e.jsxs("div",{className:"buy-modal__head",children:[e.jsxs("div",{className:"buy-modal__head-row",children:[e.jsx("h2",{className:"buy-modal__title",children:Z}),!L&&e.jsx("button",{className:"buy-modal__x",onClick:r,"aria-label":t("buyModal.close"),children:e.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})})]}),e.jsxs("div",{className:"buy-modal__balance",children:[e.jsx("span",{className:"buy-modal__balance-label",children:o==="nofunds"?t("buyModal.dclBalance"):t("buyModal.myCreditsBalance")}),e.jsx(D,{className:"buy-modal__balance-ico"}),e.jsx("span",{className:"buy-modal__balance-value",children:re(M)})]})]}),o==="loading"&&e.jsx("div",{className:"buy-modal__body buy-modal__processing",children:e.jsx(Ls,{size:44})}),o==="error"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx(fe,{message:m}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:r,children:t("buyModal.close")})})]}),o==="nofunds"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__warning",children:[e.jsx(ys,{className:"buy-modal__warning-ico"}),e.jsxs("p",{className:"buy-modal__warning-text",children:[e.jsx("b",{children:t("buyModal.insufficientFunds")})," ",t("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:t("buyModal.warningCreditsAmount",{count:Math.max(0,q-M)})})," ",t("buyModal.warningToPurchase",{count:1})]})]}),e.jsx(ea,{item:s,priceCredits:q}),e.jsx("div",{className:"buy-modal__packs",children:v.map(_=>{const C=_.credits,I=_.id===a;return e.jsxs("button",{className:`buy-modal__pack${I?" buy-modal__pack--on":""}`,onClick:()=>k(_.id),children:[e.jsx(D,{className:"buy-modal__pack-ico"}),e.jsx("span",{className:"buy-modal__pack-amount",children:re(C)}),e.jsxs("span",{className:"buy-modal__pack-usd",children:["($",_.usd.toFixed(2),")"]})]},_.id)})}),e.jsxs("div",{className:"buy-modal__total",children:[e.jsxs("div",{className:"buy-modal__total-credits",children:[e.jsx(D,{className:"buy-modal__total-ico"}),e.jsx("span",{children:re(((h=v.find(_=>_.id===a))==null?void 0:h.credits)??0)})]}),e.jsxs("span",{className:"buy-modal__total-usd",children:["$",(((ee=v.find(_=>_.id===a))==null?void 0:ee.usd)??0).toFixed(2)]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:r,children:t("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:()=>void Q(),children:t("buyModal.buy")})]})]}),o==="ready"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx(ea,{item:s,priceCredits:q}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient buy-modal__btn--full",onClick:()=>void W(),children:t("buyModal.buy")})})]}),o==="processing"&&e.jsxs("div",{className:"buy-modal__body buy-modal__processing",children:[e.jsx("img",{className:"buy-modal__logo",src:Es,alt:"",width:61,height:61}),e.jsx("div",{className:"buy-modal__processing-text",children:c?t("buyModal.completingPurchase"):t("buyModal.completingTransaction")}),e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill"})})]}),o==="complete"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__success",children:[e.jsxs("svg",{viewBox:"0 0 64 64",width:"64",height:"64","aria-hidden":!0,children:[e.jsx("circle",{cx:"32",cy:"32",r:"32",fill:"#34ce74"}),e.jsx("path",{d:"M20 33l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]}),e.jsxs("p",{className:"buy-modal__success-text",children:[e.jsx("b",{children:t("getCredits.successTitle")})," ",t("buyModal.successBody")]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:()=>f("/assets?tab=mine"),children:t("buyModal.myAssets")}),e.jsxs("button",{className:"buy-modal__btn buy-modal__btn--ruby",onClick:r,children:[t("buyModal.tryInWorld"),e.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20","aria-hidden":!0,children:e.jsx("path",{d:"M5 12h12M13 7l5 5-5 5",fill:"none",stroke:"#fcfcfc",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]})]})]})}function ea({item:s,priceCredits:r}){return e.jsxs("div",{className:"buy-modal__asset",children:[e.jsx("div",{className:"buy-modal__asset-thumb",children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:""}):null}),e.jsxs("div",{className:"buy-modal__asset-info",children:[e.jsxs("div",{children:[e.jsx("div",{className:"buy-modal__asset-name",title:s.name,children:s.name||t("buyModal.itemFallback")}),s.creator?e.jsx(ps,{address:s.creator,className:"buy-modal__asset-creator"}):null]}),e.jsxs("div",{className:"buy-modal__asset-price",children:[e.jsx(D,{className:"buy-modal__asset-price-ico"}),e.jsx("span",{children:re(r)})]})]})]})}const Ds=1e3*60*60*24*182;function $s({asset:s,session:r,onClose:c}){const i=pe(),y=le(),[l,f]=d.useState("10"),[v,o]=d.useState(null),[b,m]=d.useState(null),[N,a]=d.useState(!1),[k,E]=d.useState(null);async function u(){m(null);const x=Number(l);if(!Number.isInteger(x)||x<=0){m(t("sellModal.errorWholeNumber"));return}a(!0);try{o(t("sellModal.statusPreparing")),await Ts({signer:r.signer,contractAddress:s.contractAddress,chainId:s.chainId}),o(t("sellModal.statusListing"));const j=await qs({signer:r.signer,nft:{contractAddress:s.contractAddress,tokenId:s.tokenId,network:s.network,chainId:s.chainId},usdPrice:x/10,expiresAtMs:Date.now()+Ds});o(t("sellModal.statusPublishing")),await qa(j,r.identity),o(null),E(x),V("Shop Listed Item",{item_id:s.itemId??s.tokenId??null,contract_address:s.contractAddress,price_credits:x,price_usd:x/10,listing_type:"secondary",is_primary:!1}),ia.success(t("sellModal.toastOnSale",{name:s.name})),i.invalidateQueries({queryKey:["my-assets",r.address]})}catch(j){ne(j,{flow:"list_secondary"}),V("Shop Listing Failed",{listing_type:"secondary",error_code:Ae(j)}),m(Se(j,t("sellModal.errorGeneric"))),o(null)}finally{a(!1)}}function w(){c(),y(`/item/${s.contractAddress}/${s.tokenId}`)}return k!==null?e.jsx("div",{className:"modal-backdrop",onClick:c,role:"presentation",children:e.jsxs("div",{className:"modal modal--success",onClick:x=>x.stopPropagation(),role:"dialog","aria-modal":"true",children:[e.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),e.jsx("h2",{className:"modal__title",children:t("sellModal.successTitle")}),s.image?e.jsx("img",{className:"modal__img",src:s.image,alt:s.name}):null,e.jsx("p",{className:"modal-success__name",children:s.name}),e.jsxs("p",{className:"muted small",children:[t("sellModal.listedFor")," ",e.jsxs("strong",{children:[e.jsx(D,{className:"ccy-mark"})," ",k]})]}),e.jsxs("div",{className:"modal__actions",children:[e.jsx(H,{variant:"ghost",onClick:c,children:t("getCredits.done")}),e.jsx(H,{variant:"purple",onClick:w,children:t("sellModal.viewInShop")})]})]})}):e.jsx("div",{className:"modal-backdrop",onClick:c,role:"presentation",children:e.jsxs("div",{className:"modal","data-testid":"modal",onClick:x=>x.stopPropagation(),role:"dialog","aria-modal":"true",children:[e.jsx("h2",{className:"modal__title",children:t("sellModal.listTitle",{name:s.name})}),s.image?e.jsx("img",{className:"modal__img",src:s.image,alt:s.name}):null,e.jsxs("label",{className:"field",children:[e.jsx("span",{children:t("sellModal.priceLabel",{currency:Ie.name})}),e.jsx("input",{type:"number",min:"1",step:"1",value:l,onChange:x=>f(x.target.value),disabled:N})]}),e.jsx("p",{className:"muted small",children:t("sellModal.pricedInWhole",{currency:Ie.name,currencySingular:Ie.nameSingular})}),v?e.jsx("p",{className:"muted",children:v}):null,e.jsx(fe,{message:b}),e.jsxs("div",{className:"modal__actions",children:[e.jsx(H,{variant:"ghost",onClick:c,disabled:N,children:t("sellModal.cancel")}),e.jsx(H,{onClick:()=>void u(),disabled:N,children:N?t("sellModal.listing"):t("sellModal.putOnSale")})]})]})})}const Bs=d.lazy(async()=>{const[{EmoteControls:s},{Experimental_CssVarsProvider:r},{light:c}]=await Promise.all([Ce(()=>import("./index-D4SQVwZS.js").then(i=>i.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),Ce(()=>import("./index-DTEyrFW2.js"),__vite__mapDeps([11,3,1,2,4,5,6,7,12,9,13,14])),Ce(()=>import("./index-UvWrbkyR.js"),__vite__mapDeps([15,3,1,2,4,5,6,7,16,14,13,9]))]);return{default:i=>e.jsx(r,{theme:c,children:e.jsx(s,{...i})})}});function Os(s){return e.jsx(d.Suspense,{fallback:null,children:e.jsx(Bs,{...s})})}function Ks({item:s}){const r=ae(q=>{var M;return(M=q.session)==null?void 0:M.address}),{data:c,isLoading:i}=ra(r),y=r&&c?r:"default",l=s.category==="emote",[f,v]=d.useState("item"),o=!l&&f==="item",b=o||!i,[m,N]=d.useState(!0);d.useEffect(()=>{N(!0)},[s.id,o]);const[a,k]=d.useState(K.PreviewRenderer.UNITY),E=a===K.PreviewRenderer.BABYLON,u=!!r&&!!c,w=u&&Ra(s,Da(c)),x=$a(s)[0],j=u&&!w&&!l;return e.jsxs(e.Fragment,{children:[b?e.jsx(Ba,{id:"shop-item-preview",contractAddress:s.contractAddress,tokenId:s.tokenId??void 0,itemId:s.tokenId?void 0:s.itemId??void 0,profile:o?void 0:w?y:"default",bodyShape:o||w?void 0:x,type:l?void 0:o?K.PreviewType.WEARABLE:K.PreviewType.AVATAR,emote:l||o?void 0:K.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:l?1.5:void 0,wheelStart:l?100:void 0,dev:Me.chainId===80002,unity:!0,onRenderer:k,onLoad:()=>N(!1)}):null,!b||m?e.jsx("div",{className:"item-preview__loading","aria-busy":"true","aria-label":t("itemPreview.loading"),children:e.jsx("span",{className:"item-preview__spinner","aria-hidden":!0})}):null,j&&!o?e.jsx("p",{className:"item-preview__note",children:t("itemPreview.shownOnBody",{shape:Oa(x)})}):null,E?l?e.jsx("div",{className:"item-preview__emote-controls","data-testid":"emote-controls",children:e.jsx(Os,{wearablePreviewId:"shop-item-preview",hideFrameInput:!0})}):e.jsxs("div",{className:"item-preview__toggle",role:"group","aria-label":t("itemPreview.previewMode"),children:[e.jsxs("button",{type:"button",className:f==="avatar"?"is-active":"","aria-pressed":f==="avatar","aria-label":t("itemPreview.onAvatar"),onClick:()=>v("avatar"),children:[e.jsxs("svg",{className:"item-preview__toggle-ico",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:[e.jsx("circle",{cx:"12",cy:"7.5",r:"4"}),e.jsx("path",{d:"M4 20c0-4.2 3.6-6.5 8-6.5s8 2.3 8 6.5v.5H4z"})]}),e.jsx("span",{className:"item-preview__toggle-label",children:t("itemPreview.onAvatar")})]}),e.jsxs("button",{type:"button",className:f==="item"?"is-active":"","aria-pressed":f==="item","aria-label":t("itemPreview.item"),onClick:()=>v("item"),children:[e.jsx("svg",{className:"item-preview__toggle-ico",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:e.jsx("path",{d:"M8.5 3 3 6l1.8 3.8 2.2-1V21h10V8.8l2.2 1L22 6l-5.5-3a2.6 2.6 0 0 1-4.5 1.4A2.6 2.6 0 0 1 8.5 3z"})}),e.jsx("span",{className:"item-preview__toggle-label",children:t("itemPreview.item")})]})]}):null]})}const aa=8,Ws=!1;function Qs(s){if(!s)return;const r=s.toLowerCase();return Object.values(K.Rarity).includes(r)?K.Rarity.getMaxSupply(r):void 0}function zs(s){return/^0x[a-fA-F0-9]{40}$/.test(s)?`${s.slice(0,6)}…${s.slice(-4)}`:s}function Vs(s){let r=0;for(let c=0;c<s.length;c++)r=r*31+s.charCodeAt(c)>>>0;return`hsl(${r%360}, 52%, 45%)`}function Us(s,r){var c;return(((c=s==null?void 0:s.trim())==null?void 0:c[0])||r.replace(/^0x/i,"")[0]||"?").toUpperCase()}function Gs(s){return{tradeId:s.tradeId??s.id,listingType:"primary",contractAddress:s.contractAddress,itemId:s.itemId??"",name:s.name,thumbnail:s.thumbnail,rarity:s.rarity,category:s.category,wearableCategory:s.wearableCategory??null,creator:s.creator,manaWei:s.manaWei??"0",available:1,network:s.network,chainId:s.chainId,createdAt:0}}function Ys({r:s,seller:r,issuedId:c,total:i,isOwn:y,isLegacy:l,inCart:f,fallbackImage:v,onAdd:o,onBuyNative:b,onBuyLegacy:m}){var W,Q;const N=le(),{data:a}=ra(r),k=(Q=(W=a==null?void 0:a.avatar)==null?void 0:W.snapshots)==null?void 0:Q.face256,[E,u]=d.useState(!1);d.useEffect(()=>u(!1),[k]);const w=!!k&&!E,x=r?a!=null&&a.name?na(a.name):zs(r):void 0,j=w?e.jsx("img",{className:"resales__ava",src:k,alt:"",loading:"lazy",onError:()=>u(!0)}):r?e.jsx("span",{className:"resales__ava resales__ava--letter",style:{backgroundColor:Vs(r)},"aria-hidden":!0,children:Us(a==null?void 0:a.name,r)}):v?e.jsx("img",{className:"resales__ava",src:v,alt:"","aria-hidden":!0}):e.jsx("span",{className:"resales__ava resales__ava--empty","aria-hidden":!0}),q=e.jsxs("span",{className:"resales__ident",children:[x?e.jsx("span",{className:"resales__name","data-testid":"resale-seller",children:x}):null,c?e.jsxs("span",{className:"resales__serial",children:[t("resales.serialLabel")," ",e.jsxs("span",{className:"resales__issued","data-testid":"resale-issued",children:["#",c]}),i?` ${t("resales.serialOf")} ${i.toLocaleString("en-US")}`:""]}):e.jsx("span",{className:"resales__serial resales__serial--muted",children:t("resales.copy")})]}),M=r?e.jsxs("button",{type:"button",className:"resales__who resales__who--link",onClick:()=>N(`/assets/creator/${r}`),children:[j,q]}):e.jsxs("div",{className:"resales__who",children:[j,q]});return e.jsxs("li",{className:`resales__row${l?" resales__row--legacy":""}`,"data-testid":"resale-row","data-source":s.source,"data-own":y?"true":void 0,children:[M,e.jsxs("div",{className:`resales__price${l?" resales__price--approx":""}`,children:[l?e.jsx("span",{className:"resales__approx","aria-hidden":!0,children:"≈"}):null,e.jsx(D,{className:"resales__diamond"}),e.jsx("span",{className:"resales__price-value",children:re(s.priceCredits)})]}),e.jsx("div",{className:"resales__actions",children:y?e.jsx("span",{className:"chip resales__own-chip","data-testid":"resale-own",children:t("resales.yourListing")}):l?e.jsx("button",{className:"resales__buy",onClick:m,"aria-label":t("assetCard.buyNow"),"data-testid":"resale-buy",children:t("assetCard.buyNow")}):e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"resales__add",onClick:o,disabled:f,"aria-label":f?t("assetCard.inCart"):t("assetCard.addToCart"),"data-testid":"resale-add",children:[e.jsx(O,{name:"cart-solid",size:16}),e.jsx("span",{children:f?t("assetCard.inCart"):t("assetCard.addToCart")})]}),e.jsx("button",{className:"resales__buy",onClick:b,"aria-label":t("assetCard.buyNow"),"data-testid":"resale-buy",children:t("assetCard.buyNow")})]})})]})}function Hs({item:s}){var Z;const r=s.contractAddress,c=s.itemId,i=pe(),y=ye(h=>h.add),l=ye(h=>h.items),{session:f}=ae(),v=(Z=f==null?void 0:f.address)==null?void 0:Z.toLowerCase(),[o,b]=d.useState(null),[m,N]=d.useState(null),[a,k]=d.useState(aa),E=Qs(s.rarity),{data:u=[],isLoading:w}=$({queryKey:["item-resales",r,c],enabled:!!r&&!!c,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Ka(r,c)}),x=u.slice(0,a),j=x.filter(h=>!h.seller||!h.issuedId).map(h=>h.tokenId).filter(h=>!!h),{data:q={}}=$({queryKey:["resale-token-info",r,j.join(",")],enabled:!!r&&j.length>0,staleTime:6e4,queryFn:()=>Wa(r,j)}),{data:M=[]}=$({queryKey:["item-classic-orders",r,c],enabled:Ws,queryFn:()=>Qa(r,c)}),W=u.some(h=>h.source==="legacy"),{data:Q}=oa(W);function L(){i.invalidateQueries({queryKey:["item-resales",r,c]})}return w||u.length===0?null:e.jsxs("section",{className:"resales","data-testid":"resales-section",children:[e.jsxs("div",{className:"resales__head",children:[e.jsx("h2",{className:"resales__title",children:t("resales.title")}),e.jsx("p",{className:"resales__subtitle",children:t("resales.subtitle")})]}),u.length>0?e.jsxs(e.Fragment,{children:[e.jsx("ul",{className:"resales__list",children:x.map(h=>{const ee=h.source==="legacy",_=l.some(S=>S.id===h.id),C=h.tokenId&&q[h.tokenId]||{},I=h.issuedId??C.issuedId,A=h.seller??C.seller,g={...h,name:h.name||s.name,thumbnail:h.thumbnail||s.thumbnail,rarity:h.rarity||s.rarity,category:h.category||s.category,wearableCategory:h.wearableCategory??s.wearableCategory,gender:h.gender??s.gender},T=!!A&&!!v&&A.toLowerCase()===v;return e.jsx(Ys,{r:g,seller:A,issuedId:I,total:E,isOwn:T,isLegacy:ee,inCart:_,fallbackImage:g.thumbnail,onAdd:()=>y(g,"item_detail"),onBuyNative:()=>b(g),onBuyLegacy:()=>N(Gs(g))},h.tradeId??h.id)})}),u.length>a?e.jsx("button",{className:"resales__more",onClick:()=>k(h=>h+aa),"data-testid":"resale-show-more",children:t("resales.showMore")}):null]}):null,null,o?e.jsx(ma,{item:o,onClose:()=>{b(null),L()}}):null,m&&Q?e.jsx(da,{listing:m,rate:Q,onClose:()=>N(null),onSold:()=>{N(null),L()}}):null]})}function ua(){return Me.shopServerUrl||(typeof window<"u"?window.location.origin:"")}async function Js(s,r,c){const i=new URLSearchParams({contractAddress:s,itemId:r}),y=`${ua()}/notify-requests?${i.toString()}`,l=await la(y,{method:"GET",identity:c,metadata:{}});if(!l.ok)throw new Error(`getNotifyRequest ${l.status}`);return l.json()}async function Xs(s,r){const c=`${ua()}/notify-requests`,i=await la(c,{method:"POST",identity:r,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!i.ok)throw new Error(`createNotifyRequest ${i.status}: ${await i.text()}`);await i.json().catch(()=>{})}function sa(s){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s.trim())}function Zs({item:s}){const r=ae(u=>u.session),c=ae(u=>u.signIn),[i,y]=d.useState(""),[l,f]=d.useState(!1),[v,o]=d.useState(!1),[b,m]=d.useState(null),N=!!r&&!!s.contractAddress&&!!s.itemId,{data:a}=$({queryKey:["notify-request",s.contractAddress,s.itemId,r==null?void 0:r.address],enabled:N,queryFn:()=>Js(s.contractAddress,s.itemId,r.identity)});d.useEffect(()=>{a!=null&&a.email&&y(u=>u||a.email)},[a==null?void 0:a.email]),d.useEffect(()=>{if(!r)return;let u=!1;return za().then(w=>{!u&&w&&y(x=>x||w)}),()=>{u=!0}},[r]);const k=v||!!(a!=null&&a.subscribed);async function E(u){if(u.preventDefault(),!(!r||!s.itemId||!sa(i)||l)){f(!0),m(null);try{await Xs({contractAddress:s.contractAddress,itemId:s.itemId,chainId:s.chainId,email:i.trim()},r.identity),o(!0)}catch(w){ne(w,{flow:"notify-me",contractAddress:s.contractAddress,itemId:s.itemId}),m(t("notifyMe.error"))}finally{f(!1)}}}return r?k?e.jsxs("div",{className:"notify notify__done","data-testid":"notify-subscribed",children:[e.jsx("span",{className:"notify__done-check","aria-hidden":!0,children:e.jsx(O,{name:"check",size:12})}),e.jsx("span",{className:"notify__done-text",children:t("notifyMe.subscribedBody")})]}):e.jsxs("form",{className:"notify",onSubmit:E,"data-testid":"notify",children:[e.jsx("label",{className:"notify__label",htmlFor:"notify-email",children:t("notifyMe.label")}),e.jsxs("div",{className:"notify__row",children:[e.jsx("input",{id:"notify-email",className:"notify__input",type:"email",inputMode:"email",autoComplete:"email",placeholder:t("notifyMe.placeholder"),value:i,onChange:u=>y(u.target.value),"data-testid":"notify-email"}),e.jsx("button",{type:"submit",className:"notify__btn",disabled:!sa(i)||l,"data-testid":"notify-submit",children:l?t("notifyMe.working"):t("notifyMe.cta")})]}),e.jsx(fe,{message:b})]}):e.jsx("div",{className:"notify","data-testid":"notify",children:e.jsx("button",{type:"button",className:"notify__signin",onClick:c,"data-testid":"notify-signin",children:t("notifyMe.signInCta")})})}const et=X.button`
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
gap: 8px;
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 40px;
|
|
9
|
-
padding: 0 12px;
|
|
10
|
-
border: 2px solid #c640cd;
|
|
11
|
-
border-radius: 8px;
|
|
12
|
-
background: transparent;
|
|
13
|
-
color: ${J.colors.accent};
|
|
14
|
-
font-family: ${J.font.sans};
|
|
15
|
-
font-weight: 600;
|
|
16
|
-
font-size: 15px;
|
|
17
|
-
line-height: 24px;
|
|
18
|
-
letter-spacing: 0.46px;
|
|
19
|
-
text-transform: uppercase;
|
|
20
|
-
cursor: not-allowed;
|
|
21
|
-
opacity: 0.55;
|
|
22
|
-
transition: opacity 0.15s ease;
|
|
23
|
-
|
|
24
|
-
&:hover,
|
|
25
|
-
&:focus-visible {
|
|
26
|
-
opacity: 0.75;
|
|
27
|
-
}
|
|
28
|
-
&:focus-visible {
|
|
29
|
-
outline: 2px solid ${J.colors.accent};
|
|
30
|
-
outline-offset: 2px;
|
|
31
|
-
}
|
|
32
|
-
`;function at({item:s}){return e.jsx(ca,{block:!0,content:t("makeOffer.comingSoon"),onShow:()=>V("Shop Make Offer Tooltip Shown",{contractAddress:s.contractAddress,itemId:s.itemId}),children:e.jsxs(et,{type:"button","aria-disabled":!0,onClick:r=>r.preventDefault(),"data-testid":"make-offer",children:[e.jsx(O,{name:"offer",size:20,"aria-hidden":!0}),e.jsx("span",{children:t("makeOffer.cta")})]})})}const st=X(Va)`
|
|
33
|
-
display: flex;
|
|
34
|
-
flex-direction: column;
|
|
35
|
-
overflow: hidden;
|
|
36
|
-
gap: 1px;
|
|
37
|
-
background: ${J.colors.lineStrong};
|
|
38
|
-
`;function tt({contractAddress:s,name:r,items:c,className:i}){const y=le();if(!s||!r)return null;const l=(c??[]).map(o=>o.thumbnail).filter(o=>!!o).slice(0,4),f=l.slice(0,2),v=l.slice(2,4);return e.jsxs(Ua,{as:"button","data-link":!0,className:i,"data-testid":"creator",onClick:o=>{o.stopPropagation(),y(`/collection/${s}`)},children:[l.length>0?e.jsxs(st,{as:"span","data-avatar":!0,"data-testid":"creator-ava","aria-hidden":!0,children:[e.jsx("span",{className:`collection-collage__row${v.length===0?" collection-collage__row--full":""}`,children:f.map((o,b)=>e.jsx("img",{src:o,alt:""},b))}),v.length>0?e.jsx("span",{className:"collection-collage__row",children:v.map((o,b)=>e.jsx("img",{src:o,alt:""},b))}):null]}):null,e.jsx(Ga,{"data-testid":"creator-name",children:na(r)})]})}const it=X(H)`
|
|
39
|
-
margin-top: 6px;
|
|
40
|
-
`,_e=X(H)`
|
|
41
|
-
&& {
|
|
42
|
-
width: 100%;
|
|
43
|
-
height: 48px;
|
|
44
|
-
font-size: 15px;
|
|
45
|
-
font-weight: 600;
|
|
46
|
-
letter-spacing: 0.46px;
|
|
47
|
-
display: flex;
|
|
48
|
-
align-items: center;
|
|
49
|
-
justify-content: center;
|
|
50
|
-
gap: 8px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
${J.media.down("lg")} {
|
|
54
|
-
.item-detail__ctas--dual && {
|
|
55
|
-
flex: 1 1 auto;
|
|
56
|
-
width: auto;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
`,rt=X("div")`
|
|
60
|
-
display: flex;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
gap: 10px;
|
|
63
|
-
width: 100%;
|
|
64
|
-
`,nt=X(H)`
|
|
65
|
-
&& {
|
|
66
|
-
width: 100%;
|
|
67
|
-
height: 44px;
|
|
68
|
-
/* Match the primary manage CTA's all-caps treatment (the ghost variant doesn't uppercase on its
|
|
69
|
-
own). CSS-only, so the DOM text stays "Remove from sale" for tests/a11y. */
|
|
70
|
-
text-transform: uppercase;
|
|
71
|
-
letter-spacing: 0.46px;
|
|
72
|
-
}
|
|
73
|
-
`,lt=X("p")`
|
|
74
|
-
margin: 4px 0 0;
|
|
75
|
-
font-size: 13px;
|
|
76
|
-
color: ${J.colors.muted};
|
|
77
|
-
|
|
78
|
-
a {
|
|
79
|
-
color: ${J.colors.accent};
|
|
80
|
-
font-weight: 600;
|
|
81
|
-
}
|
|
82
|
-
`;function dt(s){return Object.values(K.Rarity).includes(s)}function ot(s){return s==="male"?t("itemDetail.genderMale"):s==="female"?t("itemDetail.genderFemale"):s==="unisex"?t("itemDetail.genderUnisex"):null}function ta(s){return s.wearableCategory?s.wearableCategory.replace(/_/g," "):s.category==="emote"?t("itemDetail.categoryEmote"):t("itemDetail.categoryWearable")}function Dt(){var Ye;const{contractAddress:s,tokenId:r}=Ca(),c=Aa(),i=c.state,y=le(),l=!!(i!=null&&i.market),f=(i==null?void 0:i.marketPriceCredits)??null,v=ye(n=>n.add),o=ye(n=>n.items),b=He(n=>n.toggle),{session:m,signIn:N}=ae(),[a,k]=d.useState(()=>i!=null&&i.item?{...i.item,tradeId:i.tradeId??i.item.tradeId}:{id:`${s}-${r}`,name:"",creator:"",contractAddress:s??"",itemId:null,category:"wearable",rarity:"common",network:"MATIC",chainId:Me.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:r??void 0,tradeId:i==null?void 0:i.tradeId}),[E,u]=d.useState(!1),[w,x]=d.useState(!!(i!=null&&i.resumeBuy));d.useEffect(()=>{i!=null&&i.resumeBuy&&u(!0)},[i==null?void 0:i.resumeBuy]);function j(){if(m){u(!0);return}l||xs({type:"item-buy",path:c.pathname}),N()}const q=d.useRef(!1);d.useEffect(()=>{if(!m||q.current)return;const n=fs("item-buy");!n||n.path!==c.pathname||(q.current=!0,x(!0),u(!0))},[m]);const{data:M=[],isFetched:W}=$({queryKey:["collection-items",a.contractAddress],enabled:!!a.contractAddress,queryFn:()=>ds(a.contractAddress,{first:20}).then(n=>n.items)}),Q=a.available==null&&!a.tokenId,{data:L,isLoading:Z}=$({queryKey:["shop-item",a.contractAddress,r],enabled:!l&&!!a.contractAddress&&!!r&&(!(i!=null&&i.item)||Q),staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>os(a.contractAddress,r)});d.useEffect(()=>{L&&k(n=>n.tradeId?n.available!=null&&n.wearableCategory?n:{...n,available:n.available??L.available,wearableCategory:n.wearableCategory??L.wearableCategory}:{...L})},[L]);const[h,ee]=d.useState(!1),{data:_=""}=$({queryKey:["item-desc",a.contractAddress,a.itemId],enabled:!!a.contractAddress&&!!a.itemId,staleTime:5*6e4,queryFn:()=>cs(a.contractAddress,a.itemId)}),{data:C}=$({queryKey:["collection-meta",a.contractAddress],enabled:!!a.contractAddress,staleTime:5*6e4,queryFn:()=>ms(a.contractAddress)});d.useEffect(()=>{if(a.name||L||M.length===0)return;const n=r&&M.find(F=>F.tokenId===r||F.itemId===r)||M.find(F=>F.contractAddress===a.contractAddress);n&&k(F=>({...n,tradeId:F.tradeId??n.tradeId}))},[M,L]);const I=d.useMemo(()=>{const n=new Set,F=[];for(const R of M){if(R.id===a.id||a.itemId&&R.itemId===a.itemId||a.tokenId&&R.tokenId===a.tokenId)continue;const ie=`${R.contractAddress}-${R.itemId??R.tokenId??R.id}`;n.has(ie)||(n.add(ie),F.push(R))}return F},[M,a.id,a.itemId,a.tokenId]),{data:A,isLoading:g}=$({queryKey:["detail-trade",a.id,a.tradeId,a.contractAddress,a.itemId],enabled:!!a.contractAddress,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:async()=>{if(a.tradeId)return a.tradeId;if(a.itemId){const n=await us(a.contractAddress,a.itemId);return(n==null?void 0:n.id)??null}return null}}),T=a.tradeId??A??void 0,S=!!T,{data:B}=oa(l),se=d.useMemo(()=>{if(!l||!(i!=null&&i.item))return null;const n=i.item;return n.manaWei?{tradeId:n.tradeId??n.id,listingType:"primary",contractAddress:n.contractAddress,itemId:n.itemId??"",name:n.name,thumbnail:n.thumbnail,rarity:n.rarity,category:n.category,wearableCategory:n.wearableCategory??null,creator:n.creator,manaWei:n.manaWei,available:1,network:n.network,chainId:n.chainId,createdAt:0}:null},[l,i==null?void 0:i.item]),de=l&&f!=null&&!!B&&!!se,oe=Ya({priceCredits:a.priceCredits,compareAtCredits:a.compareAtCredits,saleEndsAt:a.saleEndsAt}),U=d.useMemo(()=>({...a,tradeId:T,id:T??a.id}),[a,T]),be=o.some(n=>n.id===U.id),ce=!U.tokenId,ha=((Ye=o.find(n=>n.id===U.id))==null?void 0:Ye.quantity)??0,xe=ce&&typeof a.available=="number"&&ha>=a.available,G=He(n=>!!n.items[a.id]),Pe=d.useRef(null);d.useEffect(()=>{!a.name||g||Pe.current===a.id||(Pe.current=a.id,V("Shop Viewed Item",{...Ha(a),for_sale:S}),Ja(a))},[a.id,a.name,g,S]);const me=`${s}/${r}`,Fe=d.useRef(me);d.useEffect(()=>{Fe.current!==me&&(Fe.current=me,i!=null&&i.item&&k({...i.item,tradeId:i.tradeId??i.item.tradeId}),typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"}))},[me]);function _a(){!S||ve||g||!ce&&be||xe||v(U,"item_detail")}const ge=dt(a.rarity)?a.rarity:K.Rarity.COMMON,Ee=ot(a.gender),Le=Xa(a),Te=Za(a.gender),ya=S&&oe,pa=t("itemDetail.moreFromCollection"),ve=es(a,m==null?void 0:m.address),z=pe(),[fa,qe]=d.useState(!1),[ba,Re]=d.useState(!1),[te,ue]=d.useState(null),[xa,De]=d.useState(null),{data:p,isLoading:$e}=$({queryKey:["owned-token",a.contractAddress,a.tokenId,m==null?void 0:m.address],enabled:!l&&!!(m!=null&&m.address)&&!!a.contractAddress&&!!a.tokenId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>m?hs(m.address,a.contractAddress,a.tokenId):null});d.useEffect(()=>{p&&k(n=>n.name?n.issuedId?n:{...n,issuedId:p.issuedId}:{id:p.id,name:p.name,creator:"",contractAddress:p.contractAddress,itemId:p.itemId,category:p.category,rarity:p.rarity??"common",network:p.network,chainId:p.chainId,thumbnail:p.image,priceCredits:p.listingPrice??0,gender:null,isSmart:!1,tokenId:p.tokenId,issuedId:p.issuedId,tradeId:p.tradeId})},[p]);const{data:P}=$({queryKey:["public-token",a.contractAddress,a.tokenId],enabled:!l&&!!a.contractAddress&&!!a.tokenId&&!a.name&&!L&&!$e&&!p,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>_s(a.contractAddress,a.tokenId)});d.useEffect(()=>{P&&k(n=>n.name?n.issuedId?n:{...n,issuedId:P.issuedId}:{id:P.id,name:P.name,creator:"",contractAddress:P.contractAddress,itemId:P.itemId,category:P.category,rarity:P.rarity??"common",network:P.network,chainId:P.chainId,thumbnail:P.image,priceCredits:P.listingPrice??0,gender:null,isSmart:!1,tokenId:P.tokenId,issuedId:P.issuedId,tradeId:P.tradeId})},[P]);const{data:je}=$({queryKey:["publishable-item",a.contractAddress,a.itemId,m==null?void 0:m.address],enabled:ve&&!!m&&!!a.itemId,queryFn:async()=>m?(await js(m.address,m.identity)).find(F=>F.contractAddress.toLowerCase()===a.contractAddress.toLowerCase()&&F.blockchainItemId===a.itemId)??null:null}),Y=!!p,Ne=!l&&(ve||Y),Be=Y?!!(p!=null&&p.isOnSale):S,we=Y?p==null?void 0:p.tradeId:T,Oe=Y?!!p:!!je,Ke=Y?(p==null?void 0:p.listingPrice)??0:0;async function We(){await Promise.all([z.invalidateQueries({queryKey:["owned-token",a.contractAddress,a.tokenId]}),z.invalidateQueries({queryKey:["detail-trade"]}),z.invalidateQueries({queryKey:["shop-item"]}),z.invalidateQueries({queryKey:["collection-sale-state"]}),z.invalidateQueries({queryKey:["secondary-sale-state"]}),z.invalidateQueries({queryKey:["my-assets"]}),z.invalidateQueries({queryKey:["publishable-items"]}),z.invalidateQueries({queryKey:["publishable-item",a.contractAddress,a.itemId]}),z.invalidateQueries({queryKey:["item-resales",a.contractAddress,a.itemId]})])}async function Qe(n={}){const F=n.own!==!1;if(!m||!we)return!1;De(null),F&&ue("remove");try{const R=await ls(we);return await gs({trade:R,signer:m.signer}),n.silent||ia.success(t("myAssets.removedFromSale",{name:a.name})),await We(),!0}catch(R){const ie=Fs(R);return ie||ne(R,{flow:"remove-listing",tradeId:we}),De(ie?t("getCredits.errorCanceled"):t("myAssets.removeListingError")),!1}finally{F&&ue(null)}}function ze(){Y?qe(!0):Re(!0)}async function ga(){ue("update");try{await Qe({silent:!0,own:!1})&&ze()}finally{ue(null)}}function Ve(){qe(!1),Re(!1),We()}const Ue=S?g?t("itemDetail.checking"):xe?t("itemDetail.maxInCart"):!ce&&be?t("assetCard.inCart"):t("assetCard.addToCart"):t("itemDetail.notForSale"),va=typeof a.available=="number"&&a.available>0&&!a.tokenId&&!l,ja=!l&&!a.tokenId&&a.available===0,Na=!Ne&&S&&!l,wa=l||!Ne,ka=Z||!!a.contractAddress&&!W||!a.name&&$e,Ge=!a.name&&!ka,Ia=/^https?:\/\//i.test(a.thumbnail);return as(Ge?{title:t("seo.item.notFoundTitle"),noindex:!0}:a.name?{title:a.name,description:_||t("seo.item.fallbackDescription",{name:a.name,rarity:a.rarity,category:ta(a),creator:Rs(a.creator)}),image:Ia?a.thumbnail:void 0,type:"product"}:{}),Ge?e.jsxs("div",{className:"item-detail item-detail--notfound",children:[e.jsx(O,{name:"cart",className:"item-detail__notfound-ico"}),e.jsx("h1",{className:"item-detail__notfound-title",children:t("itemDetail.notAvailableTitle")}),e.jsx("p",{className:"muted",children:t("itemDetail.notAvailableBody")}),e.jsx(it,{variant:"purple",onClick:()=>y("/assets"),children:t("notFound.cta")})]}):e.jsxs("div",{className:"item-detail",children:[e.jsxs("nav",{className:"item-detail__crumbs","aria-label":t("itemDetail.breadcrumbAria"),children:[e.jsx("button",{className:"item-detail__crumb-link",onClick:()=>y("/assets"),children:t("nav.collectibles")}),e.jsx("span",{className:"item-detail__crumb-sep",children:"/"}),e.jsx("span",{className:"item-detail__crumb-current",children:a.name||t("itemDetail.itemFallback")})]}),e.jsxs("div",{className:"item-detail__main",children:[e.jsxs("div",{className:"item-detail__preview","data-testid":"item-preview",children:[a.name?e.jsx(Ks,{item:a}):e.jsx("div",{className:"item-preview__loading","aria-busy":"true","aria-label":t("itemPreview.loading"),children:e.jsx("span",{className:"skeleton item-preview__skeleton","aria-hidden":!0})}),e.jsx("button",{className:`item-detail__fav item-detail__fav--preview${G?" is-on":""}`,onClick:()=>b(a),"aria-pressed":G,"aria-label":G?t("assetCard.removeFromFavorites"):t("assetCard.addToFavorites"),children:e.jsx(O,{name:G?"heart-solid":"heart",size:18})})]}),e.jsx("div",{className:"item-detail__info",children:a.name?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"item-detail__info-head",children:[e.jsx("h1",{className:"item-detail__title",children:a.name}),e.jsx("button",{className:`item-detail__fav${G?" is-on":""}`,onClick:()=>b(a),"aria-pressed":G,"aria-label":G?t("assetCard.removeFromFavorites"):t("assetCard.addToFavorites"),children:e.jsx(O,{name:G?"heart-solid":"heart",size:18})})]}),e.jsxs("div",{className:"item-detail__chips",children:[e.jsx("span",{className:"chip chip--rarity",style:{background:is(ge),color:ts(ge)},title:ss(a.rarity),children:a.rarity}),e.jsxs("span",{className:"chip item-detail__chip",children:[Le?e.jsx(O,{name:Le,size:18,color:"var(--text-2)"}):null,ta(a)]}),Ee?e.jsxs("span",{className:"chip item-detail__chip",children:[Te?e.jsx(O,{name:Te,size:18,color:"var(--text-2)"}):null,Ee]}):null,a.issuedId?e.jsxs("span",{className:"chip item-detail__chip","data-testid":"detail-issued",children:["#",a.issuedId]}):null]}),_?e.jsxs("div",{className:"item-detail__section item-detail__description",children:[e.jsx("div",{className:"item-detail__label",children:t("itemDetail.description")}),e.jsx("p",{className:`item-detail__desc-text${h?" is-expanded":""}`,children:_}),_.length>140?e.jsx("button",{className:"link item-detail__desc-toggle",onClick:()=>ee(n=>!n),children:h?t("itemDetail.showLess"):t("itemDetail.readMore")}):null]}):null,a.creator||C!=null&&C.name?e.jsxs("div",{className:"item-detail__meta",children:[a.creator?e.jsxs("div",{className:"item-detail__meta-col",children:[e.jsx("div",{className:"item-detail__label",children:t("itemDetail.creator")}),e.jsx(rs,{address:a.creator,className:"item-detail__creator",linkToProfile:!0,hidePrefix:!0})]}):null,C!=null&&C.name?e.jsxs("div",{className:"item-detail__meta-col item-detail__meta-col--collection",children:[e.jsx("div",{className:"item-detail__label",children:t("itemDetail.collection")}),e.jsx(tt,{contractAddress:a.contractAddress,name:C.name,items:M,className:"item-detail__creator"})]}):null]}):null,e.jsx("hr",{className:"item-detail__divider"}),e.jsx("div",{className:"item-detail__price-block",children:e.jsxs("div",{className:"item-detail__price-row",children:[e.jsxs("div",{className:"item-detail__price-col",children:[l||S?e.jsx("div",{className:"item-detail__price-label",children:t("itemDetail.price")}):null,l?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"item-detail__price item-detail__price--market",children:f==null?e.jsx("span",{className:"item-detail__price-value",children:"—"}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"item-detail__approx","aria-hidden":!0,children:"≈"}),e.jsx(D,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:f})]})}),e.jsx("div",{className:"item-detail__market-note muted",children:t("assetCard.marketPrice")})]}):S?ya?e.jsxs("div",{className:"item-detail__price item-detail__price--sale",children:[e.jsxs("span",{className:"item-detail__price",children:[e.jsx(D,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:a.priceCredits})]}),e.jsxs("span",{className:"item-detail__price-was",children:[e.jsx(D,{className:"item-detail__diamond item-detail__diamond--was"}),a.compareAtCredits]}),Je(a.compareAtCredits,a.priceCredits)>0?e.jsx("span",{className:"item-detail__sale-badge",children:t("assetCard.saleWithDiscount",{pct:Je(a.compareAtCredits,a.priceCredits)})}):null,e.jsx(ns,{endsAt:a.saleEndsAt,className:"item-detail__countdown"})]}):e.jsxs("div",{className:"item-detail__price",children:[e.jsx(D,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:a.priceCredits})]}):Be&&Ke?e.jsxs("div",{className:"item-detail__price",children:[e.jsx(D,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:Ke})]}):e.jsxs("div",{className:"item-detail__price item-detail__price--none",children:[e.jsx("span",{children:t("itemDetail.notForSale")}),e.jsx(ca,{content:t("itemDetail.notForSaleHint"),children:e.jsx("span",{className:"item-detail__price-info",tabIndex:0,role:"img","aria-label":t("itemDetail.notForSaleHint"),children:e.jsx(O,{name:"info",size:14})})})]})]}),va?e.jsxs("div",{className:"item-detail__stock-col",children:[e.jsx("div",{className:"item-detail__price-label",children:t("itemDetail.stock")}),e.jsxs("div",{className:"item-detail__stock-value",children:[(a.available??0).toLocaleString(),"/",K.Rarity.getMaxSupply(ge).toLocaleString()]})]}):ja?e.jsx("div",{className:"item-detail__stock-col",children:e.jsx("div",{className:"item-detail__stock-value item-detail__stock-value--out","data-testid":"out-of-stock",children:t("itemDetail.outOfStock")})}):null]})}),e.jsx("div",{className:`item-detail__ctas${wa?" item-detail__ctas--buttons":""}${Na?" item-detail__ctas--dual":""}`,children:l?e.jsxs(_e,{variant:"purple",onClick:j,disabled:!de,children:[e.jsx("span",{className:"item-detail__cta-label",children:t("assetCard.buyNow")}),f!=null?e.jsxs("span",{className:"item-detail__cta-price","aria-hidden":!0,children:[e.jsx(D,{className:"item-detail__cta-diamond"}),f]}):null]}):Ne?e.jsxs(rt,{"data-testid":"manage-actions",children:[e.jsx(fe,{message:xa}),Be?e.jsxs(e.Fragment,{children:[e.jsx(_e,{variant:"purple",onClick:()=>void ga(),disabled:te!==null||!Oe,children:e.jsx("span",{className:"item-detail__cta-label",children:te==="update"?t("itemDetail.manageWorking"):t("itemDetail.manageUpdatePrice")})}),e.jsx(nt,{variant:"ghost",onClick:()=>void Qe(),disabled:te!==null,children:e.jsx("span",{className:"item-detail__cta-label",children:te==="remove"?t("myAssets.removing"):t("itemDetail.manageRemove")})})]}):e.jsx(_e,{variant:"purple",onClick:()=>{Y&&V("Shop Started Listing",{listing_type:"secondary",item_id:a.itemId??a.tokenId??null}),ze()},disabled:te!==null||!Oe,children:e.jsx("span",{className:"item-detail__cta-label",children:t("itemDetail.manageList")})}),e.jsxs(lt,{children:[t("itemDetail.ownItemPrefix")," ",e.jsx(Sa,{to:"/my-assets",children:t("nav.myAssets")}),t("itemDetail.ownItemSuffix")]})]}):S?e.jsxs(e.Fragment,{children:[e.jsxs(_e,{variant:"purple",onClick:j,disabled:g,children:[e.jsx("span",{className:"item-detail__cta-label",children:t("assetCard.buyNow")}),e.jsxs("span",{className:"item-detail__cta-price","aria-hidden":!0,children:[e.jsx(D,{className:"item-detail__cta-diamond"}),a.priceCredits]})]}),e.jsxs("button",{className:"item-detail__addcart",onClick:_a,disabled:g||(ce?xe:be),"aria-label":Ue,children:[e.jsx(O,{name:"cart-solid"}),e.jsx("span",{className:"item-detail__addcart-label",children:Ue})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(Zs,{item:a}),e.jsx(at,{item:a})]})})]}):e.jsx(ct,{})})]}),a.itemId?e.jsx(Hs,{item:a}):null,e.jsx(bs,{title:pa,items:I,onViewAll:a.contractAddress?()=>y(`/collection/${a.contractAddress}`):void 0}),E&&l&&se&&B?e.jsx(da,{listing:se,rate:B,onClose:()=>u(!1),onSold:()=>u(!1)}):E&&!l?e.jsx(ma,{item:U,resume:w,onClose:()=>{u(!1),x(!1)}}):null,fa&&p&&m?e.jsx($s,{asset:p,session:m,onClose:Ve}):null,ba&&je&&m?e.jsx(vs,{item:je,session:m,onClose:Ve}):null]})}function ct(){return e.jsxs("div",{className:"item-detail__info-skel","aria-hidden":!0,children:[e.jsx("span",{className:"skeleton id-skel__title"}),e.jsxs("div",{className:"id-skel__chips",children:[e.jsx("span",{className:"skeleton id-skel__chip"}),e.jsx("span",{className:"skeleton id-skel__chip"})]}),e.jsx("span",{className:"skeleton id-skel__line"}),e.jsx("span",{className:"skeleton id-skel__line id-skel__line--short"}),e.jsx("hr",{className:"item-detail__divider"}),e.jsx("span",{className:"skeleton id-skel__price"}),e.jsx("span",{className:"skeleton id-skel__btn"})]})}export{Dt as ItemDetail,Dt as default};
|
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
import{L as Ce,b as Xe,r as d,j as t}from"./react-C51i12iP.js";import{s as i,F as s,I as C,m as et,t as r,u as tt,b as st,G as me,o as O,B as ot,A as D,j as nt,H as rt,g as at,J as it,E as lt,p as Ie,K as ct,L as dt}from"./index-k1Bog_tr.js";import{f as mt}from"./import-CT__rglP.js";import{P as pt,f as ut}from"./PrimaryListModal-vBauRE_Q.js";import{c as ft}from"./buy-B_TXfJF4.js";import{R as Q,C as xt,a as ht,F as yt,S as U,b as pe}from"./categories-DDZgtl6y.js";import{L as gt}from"./LoadMore-CHlPzPXC.js";import{D as ue,F as fe,R as bt,a as wt,b as St,c as jt,d as $t,S as Ct,e as It,f as kt,g as vt,h as At,i as Et,j as Tt,k as Ft,C as Rt,l as _t,m as Ot,n as Lt,M as Pt}from"./Assets.styles-C5zpZCUK.js";import{u as zt}from"./useInfiniteGrid-H1sfBdhy.js";import{E as H}from"./ErrorNotice-C7soUjRV.js";import{n as ke}from"./emotion-CSxEP8yM.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DKBoGDXH.js";import"./ethers-w5dOkonM.js";import"./intl-CBcMB1D2.js";import"./mana-rate-Ez6IlT0x.js";import"./index-HN6Rk25C.js";import"./trade-encoding-Bq9nPTSy.js";import"./authorizations-BdVBiEr7.js";import"./sendMetaTransaction-CiO3jI6F.js";import"./errors-D2EYBG38.js";import"./Tooltip-BjVKL7Fw.js";i.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
gap: 4px;
|
|
5
|
-
width: 100%;
|
|
6
|
-
`;i.h2`
|
|
7
|
-
margin: 0;
|
|
8
|
-
padding: 4px 4px 2px;
|
|
9
|
-
font-family: ${s.font.sans};
|
|
10
|
-
font-weight: 700;
|
|
11
|
-
font-size: 12px;
|
|
12
|
-
letter-spacing: 0.46px;
|
|
13
|
-
text-transform: uppercase;
|
|
14
|
-
color: ${s.colors.muted};
|
|
15
|
-
`;i("button",ke("selected"))`
|
|
16
|
-
display: flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
gap: 10px;
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 40px;
|
|
21
|
-
padding: 4px 12px;
|
|
22
|
-
border: 0;
|
|
23
|
-
border-radius: 8px;
|
|
24
|
-
background: ${({selected:o})=>o?s.colors.media:"transparent"};
|
|
25
|
-
color: ${s.colors.text};
|
|
26
|
-
font-family: ${s.font.sans};
|
|
27
|
-
font-weight: ${({selected:o})=>o?600:400};
|
|
28
|
-
font-size: 14px;
|
|
29
|
-
text-align: left;
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
|
|
32
|
-
@media (hover: hover) {
|
|
33
|
-
&:hover {
|
|
34
|
-
background: ${s.colors.media};
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
&:focus-visible {
|
|
38
|
-
outline: 2px solid ${s.colors.accent};
|
|
39
|
-
outline-offset: 2px;
|
|
40
|
-
}
|
|
41
|
-
`;i(C)`
|
|
42
|
-
width: 18px;
|
|
43
|
-
height: 18px;
|
|
44
|
-
flex: none;
|
|
45
|
-
color: ${s.colors.muted};
|
|
46
|
-
`;i.div`
|
|
47
|
-
display: flex;
|
|
48
|
-
flex-direction: column;
|
|
49
|
-
gap: 8px;
|
|
50
|
-
width: 100%;
|
|
51
|
-
`;i.span`
|
|
52
|
-
font-family: ${s.font.sans};
|
|
53
|
-
font-weight: 600;
|
|
54
|
-
font-size: 14px;
|
|
55
|
-
line-height: 1.43;
|
|
56
|
-
color: ${s.colors.text};
|
|
57
|
-
padding: 0 4px;
|
|
58
|
-
`;i.div`
|
|
59
|
-
display: flex;
|
|
60
|
-
flex-wrap: wrap;
|
|
61
|
-
gap: 8px;
|
|
62
|
-
padding: 4px;
|
|
63
|
-
`;i("button",ke("selected"))`
|
|
64
|
-
display: inline-flex;
|
|
65
|
-
align-items: center;
|
|
66
|
-
gap: 4px;
|
|
67
|
-
padding: 4px 10px;
|
|
68
|
-
border-radius: 6px;
|
|
69
|
-
background: ${({selected:o})=>o?s.colors.text:s.colors.softWhite};
|
|
70
|
-
border: ${({selected:o})=>o?`1px solid ${s.colors.text}`:`0.5px solid ${s.colors.gray4}`};
|
|
71
|
-
color: ${({selected:o})=>o?s.colors.white:s.colors.gray0};
|
|
72
|
-
font-family: ${s.font.sans};
|
|
73
|
-
font-weight: ${({selected:o})=>o?600:400};
|
|
74
|
-
font-size: 12px;
|
|
75
|
-
cursor: pointer;
|
|
76
|
-
|
|
77
|
-
&:hover {
|
|
78
|
-
border-color: ${s.colors.text};
|
|
79
|
-
}
|
|
80
|
-
&:focus-visible {
|
|
81
|
-
outline: 2px solid ${s.colors.accent};
|
|
82
|
-
outline-offset: 2px;
|
|
83
|
-
}
|
|
84
|
-
`;const Kt=i.div`
|
|
85
|
-
display: flex;
|
|
86
|
-
align-items: center;
|
|
87
|
-
gap: 8px;
|
|
88
|
-
height: 44px;
|
|
89
|
-
padding: 0 12px;
|
|
90
|
-
margin-bottom: 16px;
|
|
91
|
-
border: 1px solid ${s.colors.lineStrong};
|
|
92
|
-
border-radius: ${s.radius.btn};
|
|
93
|
-
background: ${s.colors.white};
|
|
94
|
-
|
|
95
|
-
&:focus-within {
|
|
96
|
-
border-color: ${s.colors.accent};
|
|
97
|
-
}
|
|
98
|
-
`,qt=i(C)`
|
|
99
|
-
width: 18px;
|
|
100
|
-
height: 18px;
|
|
101
|
-
flex: none;
|
|
102
|
-
color: ${s.colors.muted};
|
|
103
|
-
`,Bt=i.input`
|
|
104
|
-
flex: 1;
|
|
105
|
-
min-width: 0;
|
|
106
|
-
border: 0;
|
|
107
|
-
background: none;
|
|
108
|
-
padding: 0;
|
|
109
|
-
font-family: ${s.font.sans};
|
|
110
|
-
font-size: 14px;
|
|
111
|
-
color: ${s.colors.text};
|
|
112
|
-
|
|
113
|
-
&::placeholder {
|
|
114
|
-
color: ${s.colors.muted2};
|
|
115
|
-
}
|
|
116
|
-
&:focus {
|
|
117
|
-
outline: 0;
|
|
118
|
-
}
|
|
119
|
-
`,Mt=i.button`
|
|
120
|
-
display: grid;
|
|
121
|
-
place-items: center;
|
|
122
|
-
width: 24px;
|
|
123
|
-
height: 24px;
|
|
124
|
-
border: 0;
|
|
125
|
-
border-radius: 50%;
|
|
126
|
-
background: ${s.colors.chip};
|
|
127
|
-
color: ${s.colors.text};
|
|
128
|
-
cursor: pointer;
|
|
129
|
-
flex: none;
|
|
130
|
-
|
|
131
|
-
&:focus-visible {
|
|
132
|
-
outline: 2px solid ${s.colors.accent};
|
|
133
|
-
outline-offset: 2px;
|
|
134
|
-
}
|
|
135
|
-
`,Nt=i(C)`
|
|
136
|
-
width: 12px;
|
|
137
|
-
height: 12px;
|
|
138
|
-
`,xe=i.div`
|
|
139
|
-
display: grid;
|
|
140
|
-
grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
|
|
141
|
-
gap: 20px;
|
|
142
|
-
|
|
143
|
-
${s.media.down("sm")} {
|
|
144
|
-
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
|
|
145
|
-
gap: 12px;
|
|
146
|
-
}
|
|
147
|
-
`;i.p`
|
|
148
|
-
margin: 24px 0;
|
|
149
|
-
font-family: ${s.font.sans};
|
|
150
|
-
font-size: 14px;
|
|
151
|
-
color: ${s.colors.muted};
|
|
152
|
-
`;const he=i.div`
|
|
153
|
-
display: flex;
|
|
154
|
-
flex-direction: column;
|
|
155
|
-
align-items: center;
|
|
156
|
-
justify-content: center;
|
|
157
|
-
gap: 6px;
|
|
158
|
-
padding: 72px 24px;
|
|
159
|
-
text-align: center;
|
|
160
|
-
`,ye=i.div`
|
|
161
|
-
display: flex;
|
|
162
|
-
align-items: center;
|
|
163
|
-
justify-content: center;
|
|
164
|
-
width: 72px;
|
|
165
|
-
height: 72px;
|
|
166
|
-
margin-bottom: 10px;
|
|
167
|
-
border-radius: 50%;
|
|
168
|
-
background: ${s.colors.navViolet};
|
|
169
|
-
color: ${s.colors.accent};
|
|
170
|
-
`,ge=i.p`
|
|
171
|
-
margin: 0;
|
|
172
|
-
font-family: ${s.font.sans};
|
|
173
|
-
font-size: 18px;
|
|
174
|
-
font-weight: 600;
|
|
175
|
-
color: ${s.colors.text};
|
|
176
|
-
`,be=i.p`
|
|
177
|
-
margin: 0;
|
|
178
|
-
max-width: 360px;
|
|
179
|
-
font-family: ${s.font.sans};
|
|
180
|
-
font-size: 14px;
|
|
181
|
-
line-height: 1.5;
|
|
182
|
-
color: ${s.colors.muted};
|
|
183
|
-
`,Gt=i(Ce)`
|
|
184
|
-
margin-top: 12px;
|
|
185
|
-
display: inline-flex;
|
|
186
|
-
align-items: center;
|
|
187
|
-
height: 40px;
|
|
188
|
-
padding: 0 20px;
|
|
189
|
-
border-radius: 8px;
|
|
190
|
-
background: ${s.colors.accent};
|
|
191
|
-
color: #fff;
|
|
192
|
-
font-family: ${s.font.sans};
|
|
193
|
-
font-size: 14px;
|
|
194
|
-
font-weight: 600;
|
|
195
|
-
text-decoration: none;
|
|
196
|
-
cursor: pointer;
|
|
197
|
-
|
|
198
|
-
&:hover {
|
|
199
|
-
background: ${s.colors.accentHover};
|
|
200
|
-
}
|
|
201
|
-
`,Dt=i.section`
|
|
202
|
-
max-width: 520px;
|
|
203
|
-
margin: 48px auto;
|
|
204
|
-
text-align: center;
|
|
205
|
-
display: flex;
|
|
206
|
-
flex-direction: column;
|
|
207
|
-
gap: 16px;
|
|
208
|
-
align-items: center;
|
|
209
|
-
`,Qt=i.h1`
|
|
210
|
-
margin: 0;
|
|
211
|
-
font-family: ${s.font.sans};
|
|
212
|
-
font-weight: 700;
|
|
213
|
-
font-size: 24px;
|
|
214
|
-
color: ${s.colors.text};
|
|
215
|
-
`,Ut=i.p`
|
|
216
|
-
margin: 0;
|
|
217
|
-
font-family: ${s.font.sans};
|
|
218
|
-
font-size: 15px;
|
|
219
|
-
color: ${s.colors.muted};
|
|
220
|
-
`,Ht=i(Ce)`
|
|
221
|
-
display: flex;
|
|
222
|
-
align-items: center;
|
|
223
|
-
gap: 12px;
|
|
224
|
-
margin-bottom: 16px;
|
|
225
|
-
padding: 12px 16px;
|
|
226
|
-
border-radius: ${s.radius.btn};
|
|
227
|
-
background: ${s.colors.rarityBg};
|
|
228
|
-
color: ${s.colors.text};
|
|
229
|
-
text-decoration: none;
|
|
230
|
-
|
|
231
|
-
&:hover {
|
|
232
|
-
filter: brightness(0.98);
|
|
233
|
-
}
|
|
234
|
-
&:focus-visible {
|
|
235
|
-
outline: 2px solid ${s.colors.accent};
|
|
236
|
-
outline-offset: 2px;
|
|
237
|
-
}
|
|
238
|
-
`,Wt=i.span`
|
|
239
|
-
display: flex;
|
|
240
|
-
flex-direction: column;
|
|
241
|
-
flex: 1;
|
|
242
|
-
min-width: 0;
|
|
243
|
-
font-family: ${s.font.sans};
|
|
244
|
-
`,Yt=i.strong`
|
|
245
|
-
font-weight: 600;
|
|
246
|
-
font-size: 14px;
|
|
247
|
-
color: ${s.colors.text};
|
|
248
|
-
`,Jt=i.span`
|
|
249
|
-
font-size: 12px;
|
|
250
|
-
color: ${s.colors.muted};
|
|
251
|
-
`,Vt=i.span`
|
|
252
|
-
flex: none;
|
|
253
|
-
font-weight: 600;
|
|
254
|
-
font-size: 13px;
|
|
255
|
-
color: ${s.colors.accent};
|
|
256
|
-
text-transform: uppercase;
|
|
257
|
-
letter-spacing: 0.046em;
|
|
258
|
-
`,Zt=48,we=[{key:"wearables",labelKey:"myAssets.sectionWearables",category:"wearable"},{key:"emotes",labelKey:"myAssets.sectionEmotes",category:"emote"},{key:"names",labelKey:"myAssets.sectionNames",category:"ens"},{key:"creations",labelKey:"myAssets.sectionCreations"}],W=[{key:"newest",label:"filterBar.sortNewest",server:"newest"},{key:"name",label:"filterBar.sortName",server:"name"},{key:"cheapest",label:"filterBar.sortCheapest",server:"cheapest"}];function Se(o){return o==="wearables"||o==="emotes"}const je={wearables:"wearable",emotes:"emote",names:"names",creations:""},Xt={wearable:"wearables",emote:"emotes",names:"names"};function es(o){return`${Ie.builderUrl}/names/${encodeURIComponent(o)}`}function $e(o,p){return{id:o.id,name:o.name,creator:"",contractAddress:o.contractAddress,itemId:o.itemId,category:o.category,rarity:o.rarity??"common",network:o.network,chainId:o.chainId,thumbnail:o.image,priceCredits:(p==null?void 0:p.priceCredits)??o.listingPrice??0,gender:null,isSmart:!1,tokenId:o.tokenId,issuedId:o.issuedId,tradeId:(p==null?void 0:p.tradeId)??o.tradeId}}function ts(o,p=0){return{id:`${o.contractAddress}-${o.blockchainItemId}`,name:o.name,creator:"",contractAddress:o.contractAddress,itemId:o.blockchainItemId,category:o.category,rarity:o.rarity,network:"MATIC",chainId:Ie.chainId,thumbnail:o.thumbnail,priceCredits:p,gender:null,isSmart:!1}}function Cs(){var le,ce;et({title:r("nav.myAssets"),noindex:!0});const{session:o,error:p,signIn:ve,restore:Y}=tt(),I=st(),[Ae,Ee]=Xe(),J=Ae.get("section"),l=we.some(e=>e.key===J)?J:"wearables",[m,L]=d.useState("all"),[y,P]=d.useState([]),[u,k]=d.useState(null),[S,Te]=d.useState("newest"),[v,V]=d.useState(""),[g,Fe]=d.useState(""),[A,b]=d.useState(!1),[Re,_e]=d.useState(!0),[Oe,Le]=d.useState(!1),[Z,X]=d.useState(null),[Pe,ee]=d.useState(null),[ze,te]=d.useState(null);d.useEffect(()=>{Y()},[Y]),d.useEffect(()=>{const e=setTimeout(()=>Fe(v.trim()),300);return()=>clearTimeout(e)},[v]),d.useEffect(()=>{if(!A)return;const e=a=>{a.key==="Escape"&&b(!1)};document.addEventListener("keydown",e);const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",e),document.body.style.overflow=n}},[A]);const f=o==null?void 0:o.address,Ke=we.find(e=>e.key===l),E=Se(l),se=(W.find(e=>e.key===S)??W[0]).server,qe=m==="on_sale"?r("filter.onSale"):m==="not_for_sale"?r("filter.notForSale"):"",Be=Q.filter(e=>y.includes(e)).map(me).join(", ");function oe(e){Ee(n=>{const a=new URLSearchParams(n);return a.set("section",e),a},{replace:!0}),k(null),Se(e)||P([]),b(!1)}function ne(e){P(n=>n.includes(e)?n.filter(a=>a!==e):[...n,e])}function Me(e){const n=Xt[e];n&&oe(n)}const{items:j,total:Ne,isLoading:z,isPlaceholderData:K,error:Ge,hasNextPage:De,isFetchingNextPage:re,fetchNextPage:Qe}=zt(["my-assets",f,l,m,y,u,g,se],e=>rt(f,{category:Ke.category,first:Zt,skip:e,search:g||void 0,rarities:E&&y.length?y:void 0,wearableCategories:l==="wearables"&&u?pe[u]:void 0,emoteCategories:l==="emotes"&&u?pe[u]:void 0,onlyOnSale:m==="on_sale"||void 0,sortBy:se}).then(n=>({items:n.assets,total:n.total})),{enabled:!!f&&l!=="creations"}),q=d.useMemo(()=>l==="wearables"||l==="emotes"?[...new Set(j.map(e=>e.contractAddress))]:[],[j,l]),{data:T}=O({queryKey:["secondary-sale-state",q],enabled:q.length>0,queryFn:async()=>{const e=await Promise.all(q.map(async a=>[a,await ct(a)])),n={};for(const[a,c]of e)for(const[x,h]of Object.entries(c))n[`${a}-${x}`]=h;return n}}),ae=e=>T==null?void 0:T[`${e.contractAddress}-${e.tokenId}`],Ue=e=>!!ae(e)||e.isOnSale,B=d.useMemo(()=>m==="not_for_sale"?j.filter(e=>!Ue(e)):j,[j,m,T]),{data:F,isLoading:M,isError:He}=O({queryKey:["publishable-items",f],queryFn:()=>ut(f,o.identity),enabled:!!o&&l==="creations",retry:!1}),N=d.useMemo(()=>[...new Set((F??[]).map(e=>e.contractAddress))],[F]),{data:R}=O({queryKey:["collection-sale-state",f,N],enabled:N.length>0,queryFn:async()=>{const e=await Promise.all(N.map(async a=>[a,await dt(a)])),n={};for(const[a,c]of e)for(const[x,h]of Object.entries(c))n[`${a}-${x}`]=h;return n}}),$=e=>R==null?void 0:R[`${e.contractAddress}-${e.blockchainItemId}`],G=d.useMemo(()=>{let e=F??[];if(m==="on_sale"?e=e.filter(a=>{var c;return(c=$(a))==null?void 0:c.isOnSale}):m==="not_for_sale"&&(e=e.filter(a=>{var c;return!((c=$(a))!=null&&c.isOnSale)})),g){const a=g.toLowerCase();e=e.filter(c=>c.name.toLowerCase().includes(a))}const n=[...e];return S==="name"?n.sort((a,c)=>a.name.localeCompare(c.name)):S==="cheapest"&&n.sort((a,c)=>{var x,h;return(((x=$(a))==null?void 0:x.priceCredits)??0)-(((h=$(c))==null?void 0:h.priceCredits)??0)}),n},[F,R,m,g,S]),{data:w}=O({queryKey:["importable",f],queryFn:()=>mt(f),enabled:!!f}),ie=((w==null?void 0:w.creations.length)??0)+((w==null?void 0:w.owned.length)??0);async function We(e,n,a){if(o){te(null),ee(a);try{const c=await at(e);await ft({trade:c,signer:o.signer}),it.success(r("myAssets.removedFromSale",{name:n})),await I.invalidateQueries({queryKey:["my-assets",o.address]}),await I.invalidateQueries({queryKey:["collection-sale-state"]}),await I.invalidateQueries({queryKey:["secondary-sale-state"]}),await I.invalidateQueries({queryKey:["publishable-items"]})}catch(c){const x=c,h=(x.message??"").toLowerCase(),de=x.code===4001||h.includes("reject")||h.includes("denied");de||lt(c,{flow:"remove-listing",tradeId:e}),te(de?r("getCredits.errorCanceled"):r("myAssets.removeListingError"))}finally{ee(null)}}}if(!o)return t.jsxs(Dt,{children:[t.jsx(Qt,{children:r("nav.myAssets")}),t.jsx(Ut,{children:r("myAssets.signInPrompt")}),t.jsx(ot,{variant:"purple",onClick:()=>ve(),children:r("storeSettings.signIn")}),t.jsx(H,{message:p})]});const Ye=l==="creations"?M:z||K,Je=l==="creations"?G.length:m==="not_for_sale"?B.length:Ne,_=[];if(m!=="all"&&_.push({key:"status",label:m==="on_sale"?r("filter.onSale"):r("filter.notForSale"),onRemove:()=>L("all")}),E)for(const e of Q)y.includes(e)&&_.push({key:`rarity-${e}`,label:me(e),onRemove:()=>ne(e)});if(E&&u){const e=(ce=(le=xt.find(n=>n.key===je[l]))==null?void 0:le.subs)==null?void 0:ce.find(n=>n.key===u);_.push({key:"sub",label:e?r(e.labelKey):u,onRemove:()=>k(null)})}function Ve(){L("all"),P([]),k(null)}const Ze=t.jsxs(t.Fragment,{children:[t.jsx(ht,{title:r("myAssets.assetsHeading"),category:je[l],subCategory:u,onCategory:Me,onSub:k,onCollections:()=>oe("creations"),collections:l==="creations",extraLabelKey:"myAssets.sectionCreations",hideAll:!0}),E?t.jsxs(t.Fragment,{children:[t.jsx(ue,{}),t.jsx(fe,{title:r("assets.rarity"),open:Oe,onToggle:()=>Le(e=>!e),summary:Be,headerTestId:"sidebar-section-toggle",children:t.jsx(bt,{"data-testid":"rarity-filter",children:Q.map(e=>{const n=y.includes(e);return t.jsxs(wt,{type:"button",selected:n,"aria-pressed":n,onClick:()=>ne(e),"data-testid":"rarity-filter-check",children:[t.jsx(St,{color:s.rarities[e],children:n?t.jsx(jt,{name:"check","aria-hidden":!0}):null}),t.jsx($t,{selected:n,children:e})]},e)})})})]}):null,t.jsx(ue,{}),t.jsx(fe,{title:r("filter.status"),open:Re,onToggle:()=>_e(e=>!e),summary:qe,children:[["all",r("filter.statusAll")],["on_sale",r("filter.onSale")],["not_for_sale",r("filter.notForSale")]].map(([e,n])=>t.jsxs(Ct,{children:[t.jsx(It,{type:"radio",name:"myassets-status",checked:m===e,onChange:()=>L(e)}),t.jsx(kt,{children:n})]},e))})]});return t.jsxs(vt,{"data-testid":"my-assets",children:[A?t.jsx(At,{onClick:()=>b(!1),"aria-hidden":!0}):null,t.jsxs(Et,{className:A?"is-open":"","data-testid":"my-assets-sidebar",children:[t.jsxs(Tt,{children:[t.jsx(Ft,{children:r("assets.filters")}),t.jsx(Rt,{onClick:()=>b(!1),"aria-label":r("assets.closeFilters"),children:"✕"})]}),t.jsx(_t,{children:Ze}),t.jsx(Ot,{children:t.jsx(Lt,{type:"button",onClick:()=>b(!1),children:r("assets.showItems")})})]}),t.jsxs(Pt,{children:[t.jsxs(Kt,{children:[t.jsx(qt,{name:"search","aria-hidden":!0}),t.jsx(Bt,{type:"search",value:v,placeholder:r("myAssets.searchPlaceholder"),"aria-label":r("myAssets.searchPlaceholder"),onChange:e=>V(e.target.value)}),v?t.jsx(Mt,{type:"button","aria-label":r("myAssets.clearSearch"),onClick:()=>V(""),children:t.jsx(Nt,{name:"close","aria-hidden":!0})}):null]}),ie>0?t.jsxs(Ht,{to:"/import",children:[t.jsx("span",{"aria-hidden":!0,children:"📦"}),t.jsxs(Wt,{children:[t.jsx(Yt,{children:r("myAssets.importTitle")}),t.jsx(Jt,{children:r("myAssets.importSub",{count:ie})})]}),t.jsx(Vt,{children:r("myAssets.import")})]}):null,t.jsx(yt,{sort:S,onSort:Te,sortOptions:W,total:Je,loading:Ye,query:g,onOpenFilters:()=>b(!0),chips:_,onClearChips:Ve}),(l==="creations"?He:Ge)?t.jsx(H,{message:r("myAssets.ownedError"),testId:"my-assets-error"}):null,t.jsx(H,{message:ze}),l==="creations"?t.jsxs(t.Fragment,{children:[t.jsx(xe,{"data-testid":"grid",children:M?t.jsx(U,{count:12}):G.map(e=>{const n=$(e),a=!!(n!=null&&n.isOnSale);return t.jsx(D,{item:ts(e,(n==null?void 0:n.priceCredits)??0),mode:"manage",listed:a,busy:Pe===e.id,onList:()=>{nt("Shop Started Listing",{listing_type:"primary",item_id:e.blockchainItemId}),X(e)},onUnlist:()=>{n!=null&&n.tradeId&&We(n.tradeId,e.name,e.id)}},`${e.contractAddress}-${e.blockchainItemId}`)})}),!M&&G.length===0?t.jsxs(he,{children:[t.jsx(ye,{children:t.jsx(C,{name:"pen",size:30,"aria-hidden":!0})}),t.jsx(ge,{children:r("myAssets.emptyCreationsTitle")}),t.jsx(be,{children:r("myAssets.nothingToPublish")})]}):null]}):t.jsxs(t.Fragment,{children:[t.jsxs(xe,{"data-testid":"grid",children:[z||K?t.jsx(U,{count:12}):B.map(e=>l==="names"?t.jsx(D,{item:{...$e(e),category:"ens"},mode:"manage-link",manageHref:es(e.name)},e.id):t.jsx(D,{item:$e(e,ae(e)),mode:"manage-link"},e.id)),re?t.jsx(U,{count:6}):null]}),m!=="not_for_sale"?t.jsx(gt,{hasNextPage:De,isFetching:re,onLoadMore:()=>void Qe()}):null,!z&&!K&&B.length===0?t.jsxs(he,{children:[t.jsx(ye,{children:t.jsx(C,{name:l==="names"?"website":l==="emotes"?"emote-dance":"cat-upper",size:30,"aria-hidden":!0})}),t.jsx(ge,{children:l==="names"?r("myAssets.emptyNamesTitle"):r("myAssets.emptyOwnedTitle")}),t.jsx(be,{children:l==="names"?r("myAssets.namesEmpty"):r("myAssets.ownedEmpty")}),l!=="names"?t.jsx(Gt,{to:"/assets",children:r("myAssets.emptyBrowse")}):null]}):null]})]}),Z?t.jsx(pt,{item:Z,session:o,onClose:()=>X(null)}):null]})}export{Cs as MyAssets};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as A,M as O,b as U,v as q,t as a,C as B,B as _,e as v,q as F,j as k,J as Q,E as W,k as D}from"./index-k1Bog_tr.js";import{d as w}from"./dcl-schemas-BICTSpB5.js";import{u as G,r as m,j as s}from"./react-C51i12iP.js";import{i as J,e as K,c as H}from"./trade-encoding-Bq9nPTSy.js";import{f as V}from"./errors-D2EYBG38.js";import{E as X}from"./ErrorNotice-C7soUjRV.js";const N=()=>`${A.builderServerUrl}/v1`;function P(e){return Array.isArray(e)?e:"results"in e&&Array.isArray(e.results)?e.results:"data"in e&&Array.isArray(e.data)?e.data:[]}async function E(e,r){const t=await O(e,{method:"GET",identity:r,metadata:{}});if(!t.ok)throw new Error(`builder-server ${t.status}: ${await t.text()}`);const n=await t.json();return n.data??n}function Y(e,r){const t=r-e;return t>0?t:0}function z(e){var r,t,n,i,l;return((t=(r=e.data)==null?void 0:r.wearable)==null?void 0:t.category)??((i=(n=e.data)==null?void 0:n.emote)==null?void 0:i.category)??((l=e.data)==null?void 0:l.category)??e.type??"wearable"}function I(e){return`${N()}/storage/contents/${e}`}function f(e,r){if(!e)return"";if(/^https?:\/\//.test(e))return e;const t=r==null?void 0:r[e];return t?I(t):/^(ba|Qm)/.test(e)?I(e):""}async function Z(e,r){try{const t=await fetch(`${N()}/items/${e}/${r}/contents`);if(!t.ok)return{};const n=await t.json();return n.data??n}catch{return{}}}async function ee(e,r,t){const n=f(e.thumbnail,e.contents)||f("thumbnail.png",e.contents);if(n)return n;if(r&&t){const i=await Z(r,t);return f(e.thumbnail,i)||f("thumbnail.png",i)||f("image.png",i)}return""}async function te(e,r){const t=`${N()}/${e.toLowerCase()}/collections?is_published=true`,n=await E(t,r);return P(n).filter(i=>i.is_published&&!!i.contract_address).map(i=>({id:i.id,name:i.name,contractAddress:i.contract_address.toLowerCase(),isPublished:i.is_published,isApproved:i.is_approved,minters:(i.minters??[]).map(l=>l.toLowerCase())}))}async function se(e,r){const t=`${N()}/collections/${e.id}/items`,n=await E(t,r);return(await Promise.all(P(n).map(async l=>{const b=l.rarity??"common",y=Number(l.total_supply??0)||0;let o;try{o=w.Rarity.getMaxSupply(b)}catch{o=0}const g=(l.contract_address??e.contractAddress).toLowerCase(),p=l.blockchain_item_id??"";return{id:l.id,collectionId:e.id,collectionName:e.name,contractAddress:g,blockchainItemId:p,name:l.name,category:z(l),rarity:b,thumbnail:await ee(l,g,p),type:l.type??"wearable",isPublished:l.is_published??e.isPublished,isApproved:l.is_approved??e.isApproved,totalSupply:y,maxSupply:o,remainingSupply:Y(y,o),minters:e.minters}}))).filter(re)}function re(e){return e.isPublished&&e.isApproved&&e.blockchainItemId!==""&&e.blockchainItemId!=null&&e.remainingSupply>0}async function ue(e,r){const t=await te(e,r);return(await Promise.all(t.map(async i=>{try{return await se(i,r)}catch{return[]}}))).flat()}const ae=1e3*60*60*24*182;function me({item:e,session:r,onClose:t}){const n=U(),i=G(),[l,b]=m.useState("10"),[y,o]=m.useState(null),[g,p]=m.useState(null),[d,L]=m.useState(!1),[h,j]=m.useState(null),[C,$]=m.useState(null),x=A.chainId,S=q(r.providerType);m.useEffect(()=>{let c=!1;return(async()=>{try{const u=await J({contractAddress:e.contractAddress,chainId:x});c||j(u)}catch{c||j(!1)}})(),()=>{c=!0}},[e.contractAddress,x]);async function M(){p(null);const c=Number(l);if(!Number.isInteger(c)||c<=0){p(a("primaryList.errorWholeNumber"));return}L(!0);try{h||(o(a("primaryList.statusEnabling")),await K({signer:r.signer,contractAddress:e.contractAddress,chainId:x}),j(!0)),o(a("primaryList.statusPublishing"));const u=await H({signer:r.signer,item:{contractAddress:e.contractAddress,itemId:e.blockchainItemId,network:w.Network.MATIC,chainId:x},usdPrice:c/10,uses:e.remainingSupply,expiresAtMs:Date.now()+ae});o(a("primaryList.statusFinishing")),await F(u,r.identity),o(null),$(c),k("Shop Listed Item",{item_id:e.blockchainItemId,contract_address:e.contractAddress,price_credits:c,price_usd:c/10,listing_type:"primary",is_primary:!0}),Q.success(a("primaryList.toastOnSale",{name:e.name})),n.invalidateQueries({queryKey:["publishable-items"]}),n.invalidateQueries({queryKey:["collection-sale-state"]})}catch(u){W(u,{flow:"list_primary"}),k("Shop Listing Failed",{listing_type:"primary",error_code:D(u)}),p(V(u,a("primaryList.errorGeneric"))),o(null)}finally{L(!1)}}function T(){t(),i(`/item/${e.contractAddress}/${e.blockchainItemId}`)}const R=d?a("primaryList.listing"):h===!1?a("primaryList.enableAndPutOnSale"):a("primaryList.putOnSale");return C!==null?s.jsx("div",{className:"modal-backdrop",onClick:t,role:"presentation",children:s.jsxs("div",{className:"modal modal--success",onClick:c=>c.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),s.jsx("h2",{className:"modal__title",children:a("primaryList.successTitle")}),e.thumbnail?s.jsx("img",{className:"modal__img",src:e.thumbnail,alt:e.name}):null,s.jsx("p",{className:"modal-success__name",children:e.name}),s.jsxs("p",{className:"muted small",children:[a("primaryList.listedFor")," ",s.jsxs("strong",{children:[s.jsx(B,{className:"ccy-mark"})," ",C]})," ",a("primaryList.dotAvailable",{count:e.remainingSupply})]}),s.jsxs("div",{className:"modal__actions",children:[s.jsx(_,{variant:"ghost",onClick:t,children:a("getCredits.done")}),s.jsx(_,{variant:"purple",onClick:T,children:a("primaryList.viewInShop")})]})]})}):s.jsx("div",{className:"modal-backdrop",onClick:t,role:"presentation",children:s.jsxs("div",{className:"modal","data-testid":"modal",onClick:c=>c.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsx("h2",{className:"modal__title",children:a("primaryList.publishTitle",{name:e.name})}),e.thumbnail?s.jsx("img",{className:"modal__img",src:e.thumbnail,alt:e.name}):null,s.jsx("p",{className:"muted small",children:a("primaryList.fromCollection",{collectionName:e.collectionName,count:e.remainingSupply})}),s.jsxs("label",{className:"field",children:[s.jsx("span",{children:a("primaryList.priceLabel",{currency:v.name})}),s.jsx("input",{type:"number",min:"1",step:"1",value:l,onChange:c=>b(c.target.value),disabled:d})]}),s.jsx("p",{className:"muted small",children:a("primaryList.pricedInWhole",{currency:v.name,currencySingular:v.nameSingular})}),h===!1&&!d?S?s.jsx("p",{className:"muted small primary-note",children:a("primaryList.firstTimeConfirm",{collectionName:e.collectionName})}):s.jsx("p",{className:"muted small primary-note",children:a("primaryList.firstTimeManaged",{collectionName:e.collectionName})}):h===!0&&!d?S?s.jsx("p",{className:"muted small primary-note",children:a("primaryList.readyConfirm")}):s.jsx("p",{className:"muted small primary-note",children:a("primaryList.readyManaged")}):null,y?s.jsx("p",{className:"muted",children:y}):null,s.jsx(X,{message:g}),s.jsxs("div",{className:"modal__actions",children:[s.jsx(_,{variant:"ghost",onClick:t,disabled:d,children:a("primaryList.cancel")}),s.jsx(_,{onClick:()=>void M(),disabled:d||h===null,children:h===null?a("primaryList.checking"):R})]})]})})}export{me as P,ue as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(s){return/^0x[a-fA-F0-9]{40}$/.test(s)?`${s.slice(0,6)}…${s.slice(-4)}`:s}export{e as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as h}from"./index-k1Bog_tr.js";import{g as c,C as i}from"./index-HN6Rk25C.js";import{M as C,E as y,s as M}from"./sendMetaTransaction-CiO3jI6F.js";import{c as _,C as o,M as E,Z as A,J as x,I as b}from"./ethers-w5dOkonM.js";const w="".trim().toLowerCase(),d={enabled:w!=="0"&&w!=="false",relayerUrl:"https://transactions-api.decentraland.zone/v1"};function B(){return d.enabled}var k=(e=>(e.Allowance="allowance",e.Approval="approval",e.Minter="minter",e))(k||{});const l=["function allowance(address owner, address spender) view returns (uint256)","function approve(address spender, uint256 amount) returns (bool)"],p=["function isApprovedForAll(address owner, address operator) view returns (bool)","function setApprovalForAll(address operator, bool approved)"],u=["function globalMinters(address minter) view returns (bool)","function setMinters(address[] minters, bool[] values)"],f=E;function g(){return new x(h.rpcUrl)}const T={chainId:"0x13882",chainName:"Polygon Amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:["https://rpc-amoy.polygon.technology"],blockExplorerUrls:["https://amoy.polygonscan.com"]};async function D(e,n){if((await e.getNetwork()).chainId===n)return;const t=_(n);try{await e.send("wallet_switchEthereumChain",[{chainId:t}])}catch(a){if(a.code===4902&&n===80002)await e.send("wallet_addEthereumChain",[T]);else throw a}}async function L(e,n){const r=g();switch(e.kind){case"allowance":return(await new o(e.contractAddress,l,r).allowance(n,e.spenderAddress)).gt(0);case"approval":return new o(e.contractAddress,p,r).isApprovedForAll(n,e.spenderAddress);case"minter":{const t=new o(e.contractAddress,u,r);try{return await t.globalMinters(e.spenderAddress)}catch{return!1}}}}function I(e){return e.kind==="allowance"?c(i.MANAToken,e.chainId):{...c(i.ERC721CollectionV2,e.chainId),address:e.contractAddress}}function F(e,n){const r=new b(e.kind==="allowance"?l:e.kind==="approval"?p:u);switch(e.kind){case"allowance":return r.encodeFunctionData("approve",[e.spenderAddress,n?f:A]);case"approval":return r.encodeFunctionData("setApprovalForAll",[e.spenderAddress,n]);case"minter":return r.encodeFunctionData("setMinters",[[e.spenderAddress],[n]])}}const N=new Set(["eth_signTypedData_v4","eth_signTypedData","eth_sign","personal_sign","eth_requestAccounts","eth_accounts","eth_chainId"]);function R(e,n){return{send:(r,t=[])=>N.has(r)?e.send(r,t):n.send(r,t)}}async function z(e,n,r){const t=F(e,r),a=I(e),s=g(),m=R(n.provider,s),v=await M(m,s,t,a,{serverURL:d.relayerUrl});await s.waitForTransaction(v,1,12e4)}async function O(e){const{auth:n,signer:r,active:t}=e;if(d.enabled)try{await z(n,r,t);return}catch(a){if(a instanceof C&&a.code===y.USER_DENIED)throw a;console.warn("[authorizations] gasless meta-tx failed, falling back to a direct tx:",a)}switch(await D(r.provider,n.chainId),n.kind){case"allowance":{await(await new o(n.contractAddress,l,r).approve(n.spenderAddress,t?f:A)).wait();return}case"approval":{await(await new o(n.contractAddress,p,r).setApprovalForAll(n.spenderAddress,t)).wait();return}case"minter":{await(await new o(n.contractAddress,u,r).setMinters([n.spenderAddress],[t])).wait();return}}}async function H(e){const n=await e.signer.getAddress();await L(e.auth,n)||await O({auth:e.auth,signer:e.signer,active:!0})}function J(e){const n=c(i.MANAToken,e),r=c(i.CreditsManager,e);return{id:"credits",group:"buying",kind:"allowance",contractAddress:n.address,spenderAddress:r.address,chainId:e}}function W(e,n){const r=c(i.OffChainMarketplaceV2,n);return{id:`selling:${e.toLowerCase()}`,group:"selling",kind:"approval",contractAddress:e,spenderAddress:r.address,chainId:n}}export{k as A,d as a,J as b,W as c,L as d,D as e,H as f,B as g,R as m,g as r,O as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as r}from"./react-C51i12iP.js";import{r as o}from"./browser-ponyfill-DMgE6PM5.js";var t=o();const f=r(t);export{f as o};
|
package/assets/buy-B_TXfJF4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as M}from"./dcl-schemas-BICTSpB5.js";import{p as A}from"./index-k1Bog_tr.js";import{a as h,e as C,r as N,m as U}from"./authorizations-BdVBiEr7.js";import{g as y,d as v,f as b}from"./trade-encoding-Bq9nPTSy.js";import{M as D,E as W,s as L}from"./sendMetaTransaction-CiO3jI6F.js";import{g as u,a as f,C as P}from"./index-HN6Rk25C.js";import{C as p,I as R,J as S,B as w}from"./ethers-w5dOkonM.js";async function V(a){const t=a.received[0],e=t.amount??"0";if(t.assetType!==Number(M.TradeAssetType.USD_PEGGED_MANA))return e;const n=u(f(a.contract),a.chainId),s=new S(A.rpcUrl),c=await new p(n.address,["function manaUsdAggregator() view returns (address)"],s).manaUsdAggregator(),r=new p(c,["function decimals() view returns (uint8)","function latestRoundData() view returns (uint80,int256,uint256,uint256,uint80)"],s),i=await r.decimals(),d=await r.latestRoundData(),g=w.from(d[1]);return w.from(e).mul(w.from(10).pow(i)).div(g).mul(102).div(100).toString()}async function x(a,t,e,n){const s=e.provider;await C(s,a);const o=await s.getNetwork();if(o.chainId!==a)throw new Error(`Wrong network: wallet is on chain ${o.chainId}, expected ${a}. Switch networks and try again.`);const c=u(P.CreditsManager,a),i=await new p(c.address,c.abi,e).useCredits(t,v(a));return n==null||n(),(await i.wait()).transactionHash}async function $(a,t,e){const n=u(f(a.contract),a.chainId),s=y(a,e),o=new R(n.abi).encodeFunctionData("cancelSignature",[[s]]),c=N(),r=U(t.provider,c),i=await L(r,c,o,n,{serverURL:h.relayerUrl});return await c.waitForTransaction(i,1,12e4),i}async function j(a){const{trade:t,signer:e}=a,n=(await e.getAddress()).toLowerCase();if(h.enabled)try{return await $(t,e,n)}catch(d){if(d instanceof D&&d.code===W.USER_DENIED)throw d;console.warn("[cancelListing] gasless meta-tx failed, falling back to a direct tx:",d)}await C(e.provider,t.chainId);const s=u(f(t.contract),t.chainId),o=y(t,n);return(await(await new p(s.address,s.abi,e).cancelSignature([o],v(t.chainId))).wait()).transactionHash}async function q(a){const{trade:t,buyer:e,signer:n,credits:s}=a;if(s.length===0)throw new Error("No credits to spend");const o=u(f(t.contract),t.chainId),c=a.maxCreditedValue??await V(t),r=b(o.address,o.abi,[t],e,s,c);return x(t.chainId,r,n)}async function z(a){const{purchases:t,buyer:e,signer:n,onSigned:s}=a;if(t.length===0)throw new Error("No items to buy");const o=new Map;for(const r of t){const i=`${r.trade.chainId}:${r.trade.contract.toLowerCase()}`,d=o.get(i);d?d.push(r):o.set(i,[r])}const c=[];for(const r of o.values()){const{chainId:i,contract:d}=r[0].trade,g=u(f(d),i),l=r.map(m=>m.trade),k=r.flatMap(m=>m.credits),E=r.reduce((m,I)=>m.add(w.from(I.maxCreditedValue)),w.from(0)).toString(),T=b(g.address,g.abi,l,e,k,E);c.push(await x(i,T,n,s))}return c}export{z as a,q as b,j as c,x as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./react-C51i12iP.js";import{ad as g,u as p,ae as A,t as u,C,B as b,J as x}from"./index-k1Bog_tr.js";const $="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/assets/default-cover-7vUE644d.jpeg",E=2166136261,_=16777619,M=4294967295,S=.75,I=1,N="#ffffff",T=/[\p{L}\p{N}]/u;function j(n){let s=E>>>0;for(let t=0;t<n.length;t++)s^=n.charCodeAt(t),s=Math.imul(s,_)>>>0;return s>>>0}function L(n,s,t){const a=n>=1?n-Math.floor(n):n,i=Math.floor(a*6),c=a*6-i,o=t*(1-s),e=t*(1-s*c),l=t*(1-s*(1-c));switch(i%6){case 0:return{r:t,g:l,b:o};case 1:return{r:e,g:t,b:o};case 2:return{r:o,g:t,b:l};case 3:return{r:o,g:e,b:t};case 4:return{r:l,g:o,b:t};default:return{r:t,g:o,b:e}}}function h(n){return Math.max(0,Math.min(255,Math.round(n*255))).toString(16).padStart(2,"0")}function R({r:n,g:s,b:t}){return`#${h(n)}${h(s)}${h(t)}`}function U(n){if(!n)return"";let s="";for(let t=0;t<n.length;t++){const a=n[t];T.test(a)&&(s+=a)}return s}function B({name:n,hasClaimedName:s,ethAddress:t}){const a=U(n);return a?s||!t||t.length<=4?a:`${a}#${t.slice(-4)}`:""}function H(n){if(!n)return N;const t=j(n)/M;return R(L(t,S,I))}function V({items:n,source:s}){const t=g(r=>r.add),a=g(r=>r.items.map(d=>d.id)),i=p(r=>{var d;return(d=r.session)==null?void 0:d.address}),c=n.filter(r=>r.priceCredits>0&&!A(r,i));if(c.length===0)return null;const o=new Set(a),e=c.filter(r=>!o.has(r.id)),l=c.reduce((r,d)=>r+d.priceCredits,0);function m(){e.forEach(r=>t(r,s)),x.success(u("addAll.added",{count:e.length}))}return f.jsxs("div",{className:"addall",children:[f.jsxs("span",{className:"addall__summary",children:[u("addAll.forSale",{count:c.length})," · ",f.jsx(C,{className:"addall__diamond"})," ",l.toLocaleString()]}),f.jsx(b,{variant:"purple",size:"sm",onClick:m,disabled:e.length===0,children:e.length===0?u("addAll.allInCart"):u("addAll.addAll",{count:e.length})})]})}export{V as A,B as a,$ as d,H as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{w as r}from"./utils-DBnU1jhd.js";import{d as a}from"./decimals-DaU_ek4_.js";import"./sentry-DKBoGDXH.js";import"./react-C51i12iP.js";import"./prepare-contract-call-aT1l2NVg.js";async function o(c){return r(()=>a(c),{cacheKey:`${c.contract.chain.id}:${c.contract.address}:decimals`,cacheTime:Number.POSITIVE_INFINITY})}export{o as decimals};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as s,t as n}from"./to-serializable-transaction-BPYyQKxa.js";import{r as c}from"./prepare-contract-call-aT1l2NVg.js";import{s as m}from"./signing-BCzW8Yh4.js";import"./index-k1Bog_tr.js";import"./react-C51i12iP.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-DKBoGDXH.js";import"./ethers-w5dOkonM.js";import"./intl-CBcMB1D2.js";import"./transaction-Db6pntE5.js";import"./utils-DBnU1jhd.js";import"./get-bytecode-D38h1G96.js";const p="0x420000000000000000000000000000000000000F";async function O(r){const{transaction:t,gasPriceOracleAddress:a}=r,i=s({address:a||p,chain:t.chain,client:t.client}),{gasPrice:l,...e}=await n({transaction:t}),o=m({transaction:e});return c({contract:i,method:"function getL1Fee(bytes memory _data) view returns (uint256)",params:[o]})}export{O as estimateL1Fee};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as i}from"./prepare-contract-call-aT1l2NVg.js";import"./utils-DBnU1jhd.js";import"./sentry-DKBoGDXH.js";import"./react-C51i12iP.js";async function n(t,e){const a=await t({method:"eth_estimateGas",params:[e]});return i(a)}export{n as eth_estimateGas};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,a as r}from"./prepare-contract-call-aT1l2NVg.js";import"./utils-DBnU1jhd.js";import"./sentry-DKBoGDXH.js";import"./react-C51i12iP.js";async function m(t,o){const n=await t({method:"eth_getTransactionCount",params:[o.address,o.blockNumber?e(o.blockNumber):o.blockTag||"pending"]});return r(n)}export{m as eth_getTransactionCount};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as o}from"./execute-DySDEvjB.js";import"./prepare-contract-call-aT1l2NVg.js";import"./utils-DBnU1jhd.js";import"./sentry-DKBoGDXH.js";import"./react-C51i12iP.js";import"./index-k1Bog_tr.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-w5dOkonM.js";import"./intl-CBcMB1D2.js";import"./detectExtension-C2ped1rb.js";async function g(n){const l=await o(n);return{app:{android:null,browser:null,chrome:null,edge:null,firefox:null,ios:null,linux:null,mac:null,opera:null,safari:null,windows:null},desktop:{native:null,universal:null},homepage:l.homepage||"",id:n,image_id:l.imageUrl||"",mobile:{native:null,universal:null},name:l.name,rdns:null}}export{g as getEcosystemWalletInfo};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as a}from"./thirdweb-Bzinkygh.js";import{f as o}from"./fetchTokenMetadata-C9wYmfXl.js";import{parseNFT as i}from"./parseNft-CjnCetmp.js";import{totalSupply as m}from"./totalSupply-BCBM6uY2.js";import{r as d}from"./prepare-contract-call-aT1l2NVg.js";import"./utils-DBnU1jhd.js";import"./sentry-DKBoGDXH.js";import"./react-C51i12iP.js";import"./signing-BCzW8Yh4.js";import"./index-k1Bog_tr.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-w5dOkonM.js";import"./intl-CBcMB1D2.js";import"./to-serializable-transaction-BPYyQKxa.js";import"./transaction-Db6pntE5.js";import"./get-bytecode-D38h1G96.js";import"./wait-for-tx-receipt-UIT99Yyq.js";import"./transactionReceipt-7aTE2Yz3.js";import"./sleep-mAKpSMLY.js";import"./eth_estimateGas-DcV1bi0C.js";import"./eth_getStorageAt-CvOhghFe.js";import"./eth_getTransactionCount-BNyI69eR.js";import"./eth_sendRawTransaction-DPdnXbFR.js";import"./decimals-HChuNAkm.js";import"./decimals-DaU_ek4_.js";import"./zora-sepolia-Bwjy_6bk.js";import"./send-batch-transaction-BY7yHkGa.js";import"./send-transaction-BvCcEvFd.js";import"./uint8-array-CjVHUazS.js";import"./detectExtension-C2ped1rb.js";const p="0x0e89341c",u=[{name:"tokenId",type:"uint256"}],I=[{type:"string"}];async function k(t){return d({contract:t.contract,method:[p,u,I],params:[t.tokenId]})}async function H(t){const{useIndexer:r=!0}=t;if(r)try{return await f(t)}catch{return await c(t)}return await c(t)}async function f(t){const r=await a({chain:t.contract.chain,client:t.contract.client,contractAddress:t.contract.address,tokenId:t.tokenId});return r||c(t)}async function c(t){const[r,e]=await Promise.all([k({contract:t.contract,tokenId:t.tokenId}),m({contract:t.contract,id:t.tokenId}).catch(()=>0n)]);return i(await o({client:t.contract.client,tokenId:t.tokenId,tokenUri:r}).then(n=>n||{id:t.tokenId,type:"ERC1155",uri:r}).catch(()=>({id:t.tokenId,type:"ERC1155",uri:r})),{chainId:t.contract.chain.id,owner:null,supply:e,tokenAddress:t.contract.address,tokenId:t.tokenId,tokenUri:r,type:"ERC1155"})}export{H as getNFT};
|