@dcl/shop 1.15.0 → 1.16.0
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-BBgqwdRc.js → Activity-Zur2krvm.js} +4 -4
- package/_assets/{AnimatedBackground-CAe8erqx.js → AnimatedBackground-CCv_8WvR.js} +2 -2
- package/_assets/{Assets-BVr6Ienp.js → Assets-G4zKJq-g.js} +7 -7
- package/_assets/{Cart-uMh-LLkS.js → Cart-DsQMnYFW.js} +5 -5
- package/_assets/{Collection-C6wH7PGc.js → Collection-C4njSIXs.js} +9 -9
- package/_assets/{CollectionCarousel-DLu1yG2d.js → CollectionCarousel-Dg8w-Ze2.js} +6 -6
- package/_assets/{Confetti-CUYY8WKL.js → Confetti-DcqbQMk-.js} +4 -4
- package/_assets/{ConstantsUtil-Du7Rw-I9.js → ConstantsUtil-CEwS_5e4.js} +2 -2
- package/_assets/{ContentClient-CQ0rZRJX.js → ContentClient-BW1JgVbg.js} +2 -2
- package/_assets/{Creator-DiqRz4sK.js → Creator-CnhYdhYL.js} +9 -9
- package/_assets/{CreditPackPicker-CZe0q7lQ.js → CreditPackPicker-D6M8C5at.js} +7 -7
- package/_assets/{DeploymentBuilder-B8n1ixz5.js → DeploymentBuilder-Yv8ck1p_.js} +2 -2
- package/_assets/{EmotePlaybackBar-Dh9mWTmr.js → EmotePlaybackBar-DamRJKE8.js} +5 -5
- package/_assets/{ErrorNotice-BZweT4nq.js → ErrorNotice-5cQusmGK.js} +2 -2
- package/_assets/{Event-BhrUy_li.js → Event-DNSKDhvo.js} +2 -2
- package/_assets/{ExchangeController-B8eGX00R.js → ExchangeController-DnyR_njB.js} +2 -2
- package/_assets/{Faq-BRUGz0o1.js → Faq-DB62IPDv.js} +2 -2
- package/_assets/{Filters-CWaA5jz_.js → Filters-DZJTBasv.js} +9 -9
- package/_assets/{GetCredits-91FKPj2S.js → GetCredits-CQDD4Y7M.js} +2 -2
- package/_assets/{Grow-BtoTVtjh.js → Grow-Dqkd-8TJ.js} +2 -2
- package/_assets/{HelpersUtil-DtSGcn50.js → HelpersUtil-CefOE7SN.js} +2 -2
- package/_assets/{ItemDetail-CPUr9pIj.js → ItemDetail-BhOAzg_H.js} +219 -219
- package/_assets/{LoadMore-VpUeZFim.js → LoadMore-yxZw85kf.js} +2 -2
- package/_assets/{ManaPricingBanner.styles-CAt88qh9.js → ManaPricingBanner.styles-C-mAX-6w.js} +2 -2
- package/_assets/{MyAssets-BUFp0lDY.js → MyAssets-5gpOzD_e.js} +4 -4
- package/_assets/{MyFavorites-BJRUv9oZ.js → MyFavorites-C8PXtYWt.js} +2 -2
- package/_assets/{MyStore-CEJ3my3_.js → MyStore-C64oleTN.js} +7 -7
- package/_assets/{NetworkUtil-Ciq8Tbsc.js → NetworkUtil-DB3XDe5L.js} +2 -2
- package/_assets/{NotFound-DmCwRSbf.js → NotFound-Bvz1-F-x.js} +2 -2
- package/_assets/{NotificationsBell-DbHW9KbV.js → NotificationsBell-CkfnfOhR.js} +2 -2
- package/_assets/{OutfitDetail-BdCmpPcB.js → OutfitDetail-Bnstzwcb.js} +2 -2
- package/_assets/{OutfitPreview-ziiAIMxw.js → OutfitPreview-BoRA9kOx.js} +2 -2
- package/_assets/{OutfitStudio-i641piGk.js → OutfitStudio-CDJQlhEd.js} +2 -2
- package/_assets/{PaymentMethodStep-DLWg_1Mg.js → PaymentMethodStep-Dmy4hMV3.js} +3 -3
- package/_assets/{SaleCountdown-D_0C1G0b.js → SaleCountdown-C7e8fbLx.js} +2 -2
- package/_assets/{Spinner-k8dLtOrJ.js → Spinner-B2OgiWjC.js} +2 -2
- package/_assets/{StoreSettings-DiqvHUbK.js → StoreSettings-Boa-EyyK.js} +2 -2
- package/_assets/{Success-yvCjE3be.js → Success-CZuQ607L.js} +2 -2
- package/_assets/{SwapController-L-o_4Zfy.js → SwapController-5k9aONbx.js} +2 -2
- package/_assets/{Tooltip-BEJkU8QC.js → Tooltip-S7k1SpAV.js} +2 -2
- package/_assets/TradeService-B8-mao6x.js +2 -0
- package/_assets/{W3MFrameProviderSingleton-BxpE6Qai.js → W3MFrameProviderSingleton-BMplcCEo.js} +4 -4
- package/_assets/{WebCryptoP256-DKkCHgRo.js → WebCryptoP256-O7lzGJiD.js} +2 -2
- package/_assets/{basic-DHFzByJo.js → basic-Ccax6-qK.js} +2 -2
- package/_assets/{biconomy-DCsUE-Aa.js → biconomy-DvdEbc7G.js} +2 -2
- package/_assets/{browseLayout.styles-fXEIBUq8.js → browseLayout.styles-D4_s76IT.js} +2 -2
- package/_assets/{browser-gYEIuxiW.js → browser-5Iquaht5.js} +2 -2
- package/_assets/{browser-zYx7iqzr.js → browser-BZ3BqlqY.js} +2 -2
- package/_assets/{browser-ponyfill-5UyluzqP.js → browser-ponyfill-cZkQn4gz.js} +2 -2
- package/_assets/{buy-zKbAn0Jr.js → buy-Bz6BQ053.js} +2 -2
- package/_assets/{buy-gasless-BheWI81y.js → buy-gasless-C_qSC2r9.js} +2 -2
- package/_assets/{ccip-DAEHnzsX.js → ccip-4dYwjzuR.js} +2 -2
- package/_assets/{ccip-DvIRUO6I.js → ccip-DmZQ8H34.js} +2 -2
- package/_assets/{chains-lku0nIXt.js → chains-C05Ihug0.js} +2 -2
- package/_assets/collectionPage.styles-SF1IDwaV.js +41 -0
- package/_assets/{common-C03gEIWz.js → common-z_d14HNn.js} +2 -2
- package/_assets/{controller-CoiO-8ak.js → controller-Dxu_LD2b.js} +3 -3
- package/_assets/{core-BOjd_Eve.js → core-Ckvw2yS0.js} +5 -5
- package/_assets/{createSvgIcon-BiXHCpBo.js → createSvgIcon-Coc0eUXe.js} +6 -6
- package/_assets/{crumbs.styles-Bq-08Eo1.js → crumbs.styles-CQ8x8Q1s.js} +2 -2
- package/_assets/{custom-D9bjz_2p.js → custom-BobhwJvM.js} +2 -2
- package/_assets/{data-capture-CGASy8JJ.js → data-capture-B1l9YeOa.js} +2 -2
- package/_assets/{dcl-schemas-COntwfiV.js → dcl-schemas-B-Ph0Ls4.js} +2 -2
- package/_assets/{decimals-C39Js9A5.js → decimals-DMW-nilF.js} +2 -2
- package/_assets/{decimals-BpivF8HU.js → decimals-DWYtWgBS.js} +2 -2
- package/_assets/{detectExtension-CYK2hYlo.js → detectExtension-TTfkcmVw.js} +2 -2
- package/_assets/{disposePreview-C9RvsbNf.js → disposePreview-BWK9pW9i.js} +2 -2
- package/_assets/{email-B7Hqc3Al.js → email-CR6_v_7o.js} +2 -2
- package/_assets/{embedded-wallet-DQ3g7rbj.js → embedded-wallet-CMslqrer.js} +2 -2
- package/_assets/{emotion-styled.browser.esm-orHSWwQS.js → emotion-styled.browser.esm-B49fbxGZ.js} +2 -2
- package/_assets/{engine-BVrA-eDe.js → engine-Da2W6flo.js} +2 -2
- package/_assets/{errors-DxKvZXrL.js → errors-wUAVqc_c.js} +2 -2
- package/_assets/{estimate-l1-fee-CI9CaMqP.js → estimate-l1-fee-CYcm0S5M.js} +2 -2
- package/_assets/{eth_estimateGas-grjD8ZC6.js → eth_estimateGas-BF6-2JVJ.js} +2 -2
- package/_assets/{eth_getStorageAt-Di8D3-FZ.js → eth_getStorageAt-CPTGlZUx.js} +2 -2
- package/_assets/{eth_getTransactionCount-dmwPv1uL.js → eth_getTransactionCount-izvwkQul.js} +2 -2
- package/_assets/{ethereum-BXBXB0WJ.js → ethereum-BxDg7UsP.js} +2 -2
- package/_assets/{ethers-BIoA35Pn.js → ethers-bR7FzlYq.js} +2 -2
- package/_assets/{events-DNWUGNd7.js → events-CSMTNmJ4.js} +2 -2
- package/_assets/{execute-BRAlOglu.js → execute-DRuAik5I.js} +3 -3
- package/_assets/{extractIPFS-B6dS8Wbs.js → extractIPFS-Do1_pPys.js} +2 -2
- package/_assets/{features-YldM2Blt.js → features-DnUPrb3F.js} +2 -2
- package/_assets/{fetchTokenMetadata-BTPEU-3q.js → fetchTokenMetadata-0uUCrtuX.js} +3 -3
- package/_assets/{field.styles-7aAfESFo.js → field.styles-RDJk3ZFi.js} +2 -2
- package/_assets/{fortmatic-Du20O965.js → fortmatic-CzflUuB3.js} +2 -2
- package/_assets/{get-bytecode-Dmk-6Mk4.js → get-bytecode-CuUypJRS.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-IK9mOCLo.js → get-ecosystem-wallet-info-CmJgYBeZ.js} +2 -2
- package/_assets/{getBalance-ktnD9Moc.js → getBalance-CXMj_dSJ.js} +3 -3
- package/_assets/{getInstalledModules-jTPTLnb8.js → getInstalledModules-DwjgJmXZ.js} +2 -2
- package/_assets/{getNFT-CwzF6z_7.js → getNFT-D7lfpr7H.js} +2 -2
- package/_assets/{getNFT-DbXgJ4kx.js → getNFT-DAE6KSzC.js} +3 -3
- package/_assets/{grid.styles-Reh_Sfmk.js → grid.styles-CCv5GYbY.js} +2 -2
- package/_assets/{hashTypedData-B72YO7bf.js → hashTypedData-DMajHdTK.js} +2 -2
- package/_assets/{hashTypedData-B5WTbVYh.js → hashTypedData-uKFMbdty.js} +2 -2
- package/_assets/{import-CJWafgcM.js → import-CeVyQRnj.js} +2 -2
- package/_assets/{in-app-reC7MW7U.js → in-app-Macl9ih4.js} +2 -2
- package/_assets/{in-app-wallet-calls-YVgiy_Z_.js → in-app-wallet-calls-D4aUvnS_.js} +2 -2
- package/_assets/{index-DAh-ftDy.js → index-15wtEeEb.js} +2 -2
- package/_assets/{index-D4EeOyaA.js → index-4Wt1itZR.js} +2 -2
- package/_assets/{index-Cd_cQb_5.js → index-6Ea7HxB0.js} +4 -4
- package/_assets/{index-DcTChipn.js → index-9AH47OiK.js} +3 -3
- package/_assets/{index-B3PqY8NV.js → index-B2a3z3ZJ.js} +2 -2
- package/_assets/{index-CZiKz5pK.js → index-B3VjL_uo.js} +2 -2
- package/_assets/{index-uYTIcGSZ.js → index-B54oU8gi.js} +2 -2
- package/_assets/{index-YHzCYJkG.js → index-B5zTgTXf.js} +2 -2
- package/_assets/{index-DtTYXgF3.js → index-BD5IY2ZK.js} +2 -2
- package/_assets/{index-2QUWziXM.js → index-BE9Mcus4.js} +2 -2
- package/_assets/{index-CnZUnVbC.js → index-BFj-hzu9.js} +2 -2
- package/_assets/{index-1tydFwH5.js → index-BGPtWppq.js} +4 -4
- package/_assets/{index-D48CxYHB.js → index-BGgan3dP.js} +2 -2
- package/_assets/{index-COio6Ejd.js → index-BRNshUaV.js} +434 -434
- package/_assets/{index-B0NLjhmz.js → index-BVbWCh70.js} +2 -2
- package/_assets/{index-BQBSlmH-.js → index-BX0anDQH.js} +2 -2
- package/_assets/{index-D2gmXgfJ.js → index-Bj9lpeYa.js} +2 -2
- package/_assets/{index-BXCm1lR6.js → index-BlJwQFxj.js} +2 -2
- package/_assets/{index-DVuzXPDM.css → index-BmTyuiQs.css} +1 -1
- package/_assets/{index-CLFGNSZ-.js → index-BotYB9Ug.js} +2 -2
- package/_assets/{index-CnNEDEKF.js → index-BvY2KEZR.js} +2 -2
- package/_assets/{index-BYiScitc.js → index-BzfaUuJy.js} +2 -2
- package/_assets/{index-CBv79d7E.js → index-C4OMOTuz.js} +2 -2
- package/_assets/{index-D71yoQwh.js → index-C6uMO8F3.js} +4 -4
- package/_assets/{index-CyJXEo_c.js → index-C7BuumTt.js} +2 -2
- package/_assets/{index-DcpPAZS7.js → index-C975TN26.js} +2 -2
- package/_assets/{index-Butijfje.js → index-C9cxIatH.js} +2 -2
- package/_assets/{index-DDjkaD8J.js → index-CBygHfb6.js} +2 -2
- package/_assets/{index-B-cCk8d1.js → index-CCH3GG8S.js} +2 -2
- package/_assets/{index-B7A8C7MY.js → index-CCbd3W2s.js} +2 -2
- package/_assets/{index-BVGDgDVf.js → index-CCtrpRL3.js} +2 -2
- package/_assets/{index-CA7DDOOl.js → index-CI7ggdTq.js} +3 -3
- package/_assets/{index-B18ZHjoG.js → index-CM8il_cs.js} +2 -2
- package/_assets/{index-ClePbRUv.js → index-CO_NYi5I.js} +3 -3
- package/_assets/{index-C_gzza3J.js → index-CQRmPqX6.js} +2 -2
- package/_assets/{index-DW-Melj-.js → index-CUi-ykiz.js} +2 -2
- package/_assets/{index-DAFOiLHS.js → index-CYFe0Jna.js} +3 -3
- package/_assets/{index-D1h1jMQm.js → index-CbaYXysJ.js} +2 -2
- package/_assets/{index-C-w85US7.js → index-CeTfbZRA.js} +2 -2
- package/_assets/{index-DJIQTk8q.js → index-CjDu2TSA.js} +2 -2
- package/_assets/{index-Cvfa-O4J.js → index-Cl9akTA1.js} +2 -2
- package/_assets/{index-GQaePZB9.js → index-CoEQwfR-.js} +2 -2
- package/_assets/{index-DrLA_VU_.js → index-CvTuaMxq.js} +2 -2
- package/_assets/{index-B5Il9w_t.js → index-Cx07-hgn.js} +2 -2
- package/_assets/{index-BWz0ngpy.js → index-Cyu7VCzw.js} +2 -2
- package/_assets/{index-Ba4Qb-tQ.js → index-D02KSSv9.js} +2 -2
- package/_assets/{index-B7Z8xaGK.js → index-D08tUgRe.js} +2 -2
- package/_assets/{index-DSwXuC0D.js → index-D1vrdbBh.js} +2 -2
- package/_assets/{index-CJ1iqO8A.js → index-D4oNA6LG.js} +2 -2
- package/_assets/{index-Csltect9.js → index-DF3A7nt0.js} +2 -2
- package/_assets/{index-7WKP3ObD.js → index-DJk0y4Pb.js} +2 -2
- package/_assets/{index-DKiO6CtY.js → index-DVSIxGm9.js} +2 -2
- package/_assets/{index-jyj9sHwU.js → index-DWZpjai1.js} +2 -2
- package/_assets/{index-DkEEbiDR.js → index-DYa3ZRHr.js} +2 -2
- package/_assets/{index-Ys04Xign.js → index-D_UH7dG5.js} +2 -2
- package/_assets/{index-CYwEY6Wy.js → index-DddATSzO.js} +2 -2
- package/_assets/{index-CcdPYHZS.js → index-DhErzm2X.js} +3 -3
- package/_assets/{index-DHvU-KWh.js → index-Di89BRQr.js} +2 -2
- package/_assets/{index-COT5Frck.js → index-DsNJL-1_.js} +2 -2
- package/_assets/{index-B610oYVJ.js → index-GUobIWjX.js} +2 -2
- package/_assets/{index-D8OXtAip.js → index-PR_0BnK6.js} +2 -2
- package/_assets/{index-D-gigTjB.js → index-Wf_dU8kj.js} +2 -2
- package/_assets/{index-nBFm5kuI.js → index-a25ffY_L.js} +2 -2
- package/_assets/{index-BZcBt3X8.js → index-afs4W15f.js} +2 -2
- package/_assets/{index-CQ_hwt2w.js → index-bswiu2fP.js} +2 -2
- package/_assets/{index-DdpXntwz.js → index-rBUdQsaK.js} +2 -2
- package/_assets/{index-DURI-gf8.js → index-tWaiezoT.js} +4 -4
- package/_assets/{index-DA4F0G5P.js → index-zU2vwYZs.js} +2 -2
- package/_assets/{index.es-BXEjCl7y.js → index.es-DLcWAUrd.js} +2 -2
- package/_assets/{index.es-CU-vsJdv.js → index.es-Dq25h1l9.js} +2 -2
- package/_assets/{index.es-BZK_Cifn.js → index.es-_TtdXlOp.js} +5 -5
- package/_assets/{index.es-Bn4oTPjZ.js → index.es-kX0u41uY.js} +2 -2
- package/_assets/{items-empty-DGRxHTWy.js → items-empty-CFX8gNeF.js} +2 -2
- package/_assets/{jump-DWbTrGpm.js → jump-Xu9XuIAg.js} +2 -2
- package/_assets/{linkAccount-CMtMM4t3.js → linkAccount-CPkzkJuG.js} +2 -2
- package/_assets/loader-logo-DnFrESbi.js +2 -0
- package/_assets/{localBatchGatewayRequest-8oF0MPC1.js → localBatchGatewayRequest-xmkiXjrL.js} +2 -2
- package/_assets/{modal.styles-hpuefgX4.js → modal.styles-Do478QcD.js} +2 -2
- package/_assets/{native-CPeL4rJZ.js → native-DfSWgaR4.js} +2 -2
- package/_assets/{networks-BhouyyPS.js → networks-Cfa5rIsc.js} +2 -2
- package/_assets/{onramp-BvIHLQAv.js → onramp-BnohX24l.js} +2 -2
- package/_assets/{openzeppelin-OZNoWqYj.js → openzeppelin-DpMlfPE2.js} +2 -2
- package/_assets/{ownerOf-bCzxqzq0.js → ownerOf-qUf4d1F7.js} +2 -2
- package/_assets/{parseNft-pxEjnpjF.js → parseNft-DWZbRJRG.js} +3 -3
- package/_assets/{parseSignature-BAJHdtSB.js → parseSignature-CoNohiB0.js} +4 -4
- package/_assets/{parseSignature-CpDiAFfJ.js → parseSignature-J-955_t1.js} +2 -2
- package/_assets/{passkeys-iblxlDv1.js → passkeys-NXOIdrEd.js} +2 -2
- package/_assets/{pay-with-exchange-CLgZOiU6.js → pay-with-exchange-DAZa8ZY1.js} +2 -2
- package/_assets/{prepare-contract-call-CoHsXlvg.js → prepare-contract-call-CJg2QHZX.js} +2 -2
- package/_assets/{qr-overlay-B_NIDLKC.js → qr-overlay-Dv6gg5Q5.js} +4 -4
- package/_assets/{react-BmPeg6sG.js → react-COwX0Zlk.js} +2 -2
- package/_assets/{receive-DszbAWAn.js → receive-D0kNMOsa.js} +2 -2
- package/_assets/{resolveImplementation-32KPFc_U.js → resolveImplementation-C71So4sE.js} +2 -2
- package/_assets/{resume-buy-D2TWyIFl.js → resume-buy-DG0KaJKe.js} +2 -2
- package/_assets/{resume-name-B-MASXQk.js → resume-name-DGCFrQWT.js} +2 -2
- package/_assets/{rpc-CHnWH0rF.js → rpc-6is72ePA.js} +2 -2
- package/_assets/{sales-empty-UircscXh.js → sales-empty-BCWN_I8i.js} +2 -2
- package/_assets/{search-empty-CPirv6rw.js → search-empty-DlvFh8OP.js} +2 -2
- package/_assets/{secp256k1-Bb0zIfEz.js → secp256k1-BHyRMwqk.js} +2 -2
- package/_assets/{secp256k1-BUEs1rcj.js → secp256k1-By_oEGjh.js} +2 -2
- package/_assets/{secp256k1-D1DTa_mW.js → secp256k1-l4zSwoMY.js} +2 -2
- package/_assets/{send-C8TzZsHF.js → send-BxPbGMh3.js} +2 -2
- package/_assets/{send-batch-transaction-CcXPrdOH.js → send-batch-transaction-BizQRWSH.js} +2 -2
- package/_assets/{send-eip712-transaction-ouILrTb6.js → send-eip712-transaction-Cd2xhI0p.js} +3 -3
- package/_assets/{send-gasless-transaction-rKjG34Kj.js → send-gasless-transaction-DXUxg38U.js} +3 -3
- package/_assets/{send-transaction-BbLs2Ynf.js → send-transaction-D0szv-rw.js} +3 -3
- package/_assets/{sendMetaTransaction-Dy6lp92T.js → sendMetaTransaction-Cpk-JkUY.js} +2 -2
- package/_assets/{sendRawTransaction-BY7CWiPp.js → sendRawTransaction-CmggkI48.js} +4 -4
- package/_assets/{sentry-CfKEockx.js → sentry-D9BarSwm.js} +3 -3
- package/_assets/{serializeTransaction-DOIuoefa.js → serializeTransaction-DDF3EQOU.js} +2 -2
- package/_assets/{session-proposal-BR55dEaA.js → session-proposal-CHYRi6z3.js} +2 -2
- package/_assets/{session-request-C_hO74mD.js → session-request-r5jbMTp-.js} +3 -3
- package/_assets/{sha256-BJjUSCTX.js → sha256-DBqizRIu.js} +2 -2
- package/_assets/{sha3-B3El3U9k.js → sha3-B0gscz6j.js} +2 -2
- package/_assets/signin-empty-C2-U4-eJ.js +2 -0
- package/_assets/{signing-D66RpSSx.js → signing-Dv0wmdMO.js} +4 -4
- package/_assets/{skeleton.styles-B3BxeSy_.js → skeleton.styles-BEkEh9Xo.js} +2 -2
- package/_assets/{socials-fdANcU4O.js → socials-9e49sRbo.js} +2 -2
- package/_assets/{styled-ihfZhc5C.js → styled-byzvgoEW.js} +3 -3
- package/_assets/{swaps-DZV3-WZp.js → swaps-CMMXFVlc.js} +2 -2
- package/_assets/{thirdweb-dhrmjSPt.js → thirdweb-CilSVdOh.js} +4 -4
- package/_assets/{to-serializable-transaction-BxxEhlQY.js → to-serializable-transaction-BtKRmZ5q.js} +3 -3
- package/_assets/{totalSupply-B2nCZvgY.js → totalSupply-gIi83gXe.js} +2 -2
- package/_assets/{trade-encoding-D0iBabuM.js → trade-encoding-DqOFT-xH.js} +2 -2
- package/_assets/{transaction-CJXWN8an.js → transaction-Crt3oKUU.js} +2 -2
- package/_assets/{transactionReceipt-CpzMTSMZ.js → transactionReceipt-yftDQJCI.js} +2 -2
- package/_assets/{transactions-CKkVNjQ4.js → transactions-BFd4sGt3.js} +2 -2
- package/_assets/{useCreatorSales-Ze3V5ohC.js → useCreatorSales-D2bq-mjs.js} +77 -77
- package/_assets/{useInfiniteGrid-D8vhQEzx.js → useInfiniteGrid-CoFLGUq5.js} +2 -2
- package/_assets/{useStore-DdvCUhO-.js → useStore-DCfwTeT_.js} +3 -3
- package/_assets/{useTheme-QKnvhO7_.js → useTheme-BtQzSd_x.js} +2 -2
- package/_assets/{utils-5qk7WI4m.js → utils-Di6UMxpb.js} +2 -2
- package/_assets/{verifyHash-Dm5TFWpr.js → verifyHash-CyVD3HFU.js} +2 -2
- package/_assets/{w3m-modal-CEqDQIHN.js → w3m-modal-DY_5HDWk.js} +2 -2
- package/_assets/{w3m-modal-B5R3n_ak.js → w3m-modal-VycpFrGV.js} +2 -2
- package/_assets/{wait-for-tx-receipt-CUblm3Uy.js → wait-for-tx-receipt-BnSiwjNZ.js} +2 -2
- package/_assets/{wallets-BT0Osdwo.js → wallets-CF_BBG99.js} +6 -6
- package/_assets/{web-connector-BzJlWUBl.js → web-connector-DQro6gxL.js} +4 -4
- package/_assets/{writeContract-CH8f16EO.js → writeContract-DhM9t6Ig.js} +2 -2
- package/_assets/{zora-sepolia-BfgSfWmM.js → zora-sepolia-CVzG0Xwo.js} +2 -2
- package/_assets/{zoraTestnet-CiGZFo3e.js → zoraTestnet-D_-LBRSS.js} +2 -2
- package/index.html +12 -12
- package/package.json +2 -2
- package/_assets/TradeService-DVeKA0A9.js +0 -2
- package/_assets/collectionPage.styles-B8UMV0wt.js +0 -41
- package/_assets/loader-logo-CeNjVZuG.js +0 -2
- package/_assets/signin-empty-XsT9jLzt.js +0 -2
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";import{bf as Yt,c as rt,x as at,bj as Kr,bk as es,aG as ot,t as n,bu as ts,bv as ns,V as nt,O as Z,bC as Se,bB as be,bD as Tn,l as pe,bA as un,bz as Hr,i as is,C as De,ar as rs,F as Dn,d as as,E as xt,bi as ss,G as os,bw as ls,bx as ds,dd as cs,de as us,df as ps,dg as hs,w as se,bh as xs,s as r,a as i,a3 as Jt,b6 as Xt,bM as Wn,b7 as it,I as P,z as Re,p as Ur,aP as Mt,cf as Qr,H as Ve,as as ge,dh as fs,M as ms,h as gs,j as bs,n as gt,bc as pn,aa as Vr,di as Mi,d0 as ys,f as Gr,bd as ws,dj as vs,ce as js,dk as ks,bQ as $s,dl as Cs,dm as Is,k as Ss,ag as At,a_ as As,dn as Ms,a6 as Rs,dp as Ps,b0 as Ls,dq as Es,P as Yr,Y as Jr,dr as Xr,ds as Fs,dt as Ts,ba as Zr,du as zs,bR as Ns,dv as Bs,dw as _s,dx as Ds,ck as Ws,A as qs,dy as hn,X as Os,bm as Ks,bn as Hs,y as Us,m as Qs,dz as Vs,dA as Gs,dB as Ys,dC as Js,dD as Xs,at as Zs,au as eo,dE as to,B as no,dF as io,ax as Ri,aw as Pi,dG as ro,dH as ao,a0 as so,bt as oo,dI as Li,dJ as lo,dK as co,dL as uo,dM as po,dN as ho,dO as xo,dP as fo,dQ as mo}from"./index-COio6Ejd.js";import{d as Ae}from"./dcl-schemas-COntwfiV.js";import{p as go,e as Ei,i as bo,A as ea,C as yo,b as wo,f as vo,g as jo,h as ko,j as $o,m as Co,u as Io,t as So,k as Ao,a as Mo,s as Ro}from"./CollectionCarousel-DLu1yG2d.js";import{d as Fi,t as Po,e as Ti,G as Lo,c as Eo}from"./buy-zKbAn0Jr.js";import{c as Fo,i as Zt,D as To,S as zo,a as No,b as Bo,f as _o}from"./SaleCountdown-D_0C1G0b.js";import{u as Do,M as Wo,o as qo,f as Oo,b as Ko,l as ta,c as Ho}from"./loader-logo-CeNjVZuG.js";import{w as zi,M as Uo,S as Qo,C as Vo,H as Go,a as Yo,T as Jo,X as Xo,B as Zo,b as el,c as tl,d as nl,e as tt,f as il,g as rl,h as al,i as pt,j as qe,W as Wt,m as qt,n as Ot,o as sl,v as ol,L as na,P as ia,k as ra,l as aa,E as ll,F as dl,G as Ni,A as cl,p as ul,q as pl,r as hl,s as xl,t as fl,u as ml,I as Bi}from"./CreditPackPicker-CZe0q7lQ.js";import{P as gl}from"./PaymentMethodStep-DLWg_1Mg.js";import{m as bl}from"./mana-matic-light-Bl5duieC.js";import{q as sa,g as oa,t as yl,s as wl,a as _i,b as vl,d as jl,i as kl,e as $l,c as Cl,f as la,m as Il,k as Sl,r as Al,n as Ml,p as Rl}from"./trade-encoding-D0iBabuM.js";import{J as Pl,p as Ll,C as El,I as Fl}from"./ethers-BIoA35Pn.js";import{a as Tl,w as da,S as ca,G as ua,c as zl}from"./buy-gasless-BheWI81y.js";import{R as Di}from"./resume-buy-D2TWyIFl.js";import{a as Nl,f as Ue,i as mt}from"./errors-DxKvZXrL.js";import{C as Bl}from"./Confetti-CUYY8WKL.js";import{b as _l,J as Dl,a as Wl}from"./jump-DWbTrGpm.js";import{p as pa}from"./import-CJWafgcM.js";import{E as Qe}from"./ErrorNotice-BZweT4nq.js";import{L as Wi,M as ql,B as Ol,H as Kl,T as Hl,A as Ul}from"./modal.styles-hpuefgX4.js";import{S as Ql}from"./Spinner-k8dLtOrJ.js";import{M as Vl,E as Gl,s as Yl}from"./sendMetaTransaction-Dy6lp92T.js";import{E as Jl}from"./EmotePlaybackBar-Dh9mWTmr.js";import{d as Xl}from"./disposePreview-C9RvsbNf.js";import{T as Kt}from"./Tooltip-BEJkU8QC.js";import{c as Zl}from"./crumbs.styles-Bq-08Eo1.js";import"./sentry-CfKEockx.js";import"./intl-AKLEHPeO.js";import"./mana-matic-CEqvSwrJ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="7730cdd7-e79d-4e17-8d3d-2b0ce4be6b78",t._sentryDebugIdIdentifier="sentry-dbid-7730cdd7-e79d-4e17-8d3d-2b0ce4be6b78")}catch{}})();const ha=216n,ed=(1n<<ha)-1n;function td(t){const s=typeof t=="bigint"?t:BigInt(t.trim());if(s<0n)throw new Error(`Invalid tokenId: ${String(t)}`);return{itemId:(s>>ha).toString(),issuedId:(s&ed).toString()}}function nd(t){if(!t)return null;try{return td(t).itemId}catch{return null}}const xa=["cancelled-listings"];function id(t,s){s&&t.setQueryData(xa,l=>l!=null&&l.includes(s)?l:[...l??[],s])}function qi(t,s){var l;if(s)return(l=t.getQueryData(xa))!=null&&l.includes(s)?void 0:s}function Oi(t,s){return s.kind==="listed"?{...t,isOnSale:!0,listingPrice:s.priceCredits,tradeId:s.tradeId??t.tradeId}:{...t,isOnSale:!1,listingPrice:void 0,tradeId:void 0}}function xn(t,s,l){const{address:o,contractAddress:d,tokenId:u}=s;if(!d||!u)return;const x=`${d}-${u}`;t.cancelQueries({queryKey:["owned-token",d,u]}),t.cancelQueries({queryKey:["secondary-sale-state"]}),o&&t.cancelQueries({queryKey:["my-assets",o]});const f=l.kind==="gone";t.setQueriesData({queryKey:["owned-token",d,u]},$=>$&&(f?null:Oi($,l)));const m=o?["my-assets",o]:["my-assets"];t.setQueriesData({queryKey:m},$=>$!=null&&$.pages?{...$,pages:$.pages.map(h=>{if(f){const g=h.items.filter(y=>!(y.contractAddress===d&&y.tokenId===u));return{...h,items:g,total:Math.max(0,h.total-(h.items.length-g.length))}}return{...h,items:h.items.map(g=>g.contractAddress===d&&g.tokenId===u?Oi(g,l):g)}})}:$),t.setQueriesData({queryKey:["secondary-sale-state"]},$=>{var g;if(!$)return $;const h={...$};return l.kind==="removed"||l.kind==="gone"?delete h[x]:h[x]={priceCredits:l.priceCredits,tradeId:l.tradeId??((g=h[x])==null?void 0:g.tradeId)??""},h})}function rd(t){return!(t.isMarket||t.forSale&&t.priceKnown||t.manage||t.soldOutWithResale||!t.stillResolving&&!t.resolvingTrade&&(t.isTokenRoute?!t.ownedAssetLoading:!t.deepLinkLoading))}function fa(){const t=new Map,s=new Set,l=new Set,o=new Set;return{submitStarted:d=>{o.add(d)},submitFinished:d=>{o.delete(d)},broadcast:(d,u)=>{const x=t.get(d);x?x.add(u):t.set(d,new Set([u]))},reverted:d=>{s.add(d)},unobservable:d=>{l.add(d)},isInFlight:d=>o.has(d),mayBeConsumed:d=>{if(l.has(d))return!0;const u=t.get(d);if(!u)return!1;for(const x of u)if(!s.has(x))return!0;return!1}}}const ad=Ll("0.05");async function sd(t){try{return(await new Pl(rt.rpcUrl).getBalance(t)).gte(ad)}catch{return!1}}async function od(t,s){return Yt(t)?sd(s):!1}function ld({size:t=64,...s}){return e.jsxs("svg",{viewBox:"0 0 64 64",width:t,height:t,"aria-hidden":!0,...s,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"})]})}const dd=t=>ds(t.contractAddress,String(t.itemId));async function Ki(t,s={}){if(t.kind==="store")return BigInt(t.mint.item.priceWei);try{return cs(await us(t.trade),t.coupon)}catch(l){return s.reportFailure!==!1&&pe(l,{flow:"buy",step:"mana_price"}),null}}function Hi(t){return t.kind==="trade"?t.trade.id:void 0}function Ui(t){return t.contractAddress&&t.itemId!=null?{contractAddress:t.contractAddress,itemId:String(t.itemId)}:void 0}function zn({item:t,onClose:s,resume:l=!1}){const{session:o}=at(),{data:d}=Kr(o),{data:u}=es(o),x=ot(),f=st();async function m(){try{return await x.fetchQuery(ls())}catch{return}}async function $(){if(u!=null)return u;if(!o)return 0n;try{const j=await x.fetchQuery({queryKey:["mana-balance",o.address],queryFn:()=>hs(o.address),staleTime:3e4});return ie(j),j}catch{return 0n}}const h=Do().packs.slice(0,Wo),[g,y]=c.useState("loading"),[k,I]=c.useState(null),[C,S]=c.useState(null),[W,M]=c.useState(!1),[w,U]=c.useState(0),[a,K]=c.useState(""),[J,A]=c.useState(t.priceCredits),T=Math.max(0,J-((d==null?void 0:d.credits)??0)),{packs:X}=qo(h,T),[V,oe]=c.useState(null),[ce,ie]=c.useState(null),q=u??ce??0n,[N,O]=c.useState(!1),[v,re]=c.useState(null),[R,z]=c.useState(0),[B,H]=c.useState(null),[ae,ve]=c.useState(!1),ee=c.useRef(null),G=c.useRef(!1),te=c.useRef(fa()),fe=(B==null?void 0:B.credits)??J,je=(d==null?void 0:d.credits)??0;c.useEffect(()=>(G.current=!1,()=>{G.current=!0}),[]);async function ke(j,L,F,E){const Q=await $();if(E!=null&&E())return;const ne=Q>0n,D=ne?await Ki(L):null;if(E!=null&&E())return;D!=null?oe(D):ne&&O(!0);const We=zi({priceCents:F,priceManaWei:D??0n,balanceCents:(d==null?void 0:d.balanceCents)??0,manaBalanceWei:Q}).options.some(Fe=>Fe.method==="mana"||Fe.method==="combined"),ye=j-((d==null?void 0:d.credits)??0),Et=h.find(Fe=>Fe.credits>=ye)??h[h.length-1];K(Et.id),We||Z("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:j,credits_balance:(d==null?void 0:d.credits)??0,shortfall:Math.max(0,ye)}),y("nofunds")}c.useEffect(()=>{let j=!1;if(!o){y("error"),I(n("buyModal.signInToCheckout"));return}return(async()=>{try{const L=await Oo(t,o.address,ts,await m(),dd,ns);if(L.status==="own")throw new Error("You can't buy your own listing.");if(L.status==="no-price")throw new Error("price unavailable");if(L.status!=="buyable")throw new Error("not for sale");const F=Ko(L.line),E=L.line.usdCents,Q=nt(E);if(j)return;if(A(Q),re(F),z(E),d!=null&&d.credits<Q){await ke(Q,F,E,()=>j);return}l?lt({sale:F,usdCents:E}):y("ready")}catch(L){if(j)return;Z(be(L)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Se(L)}),ue(L)}})(),()=>{j=!0,ee.current&&o&&(bt([ee.current]),ee.current=null)}},[w]),c.useEffect(()=>{const j=(B==null?void 0:B.sale)??v;if(!j||g!=="ready"&&g!=="nofunds"||q<=0n||V!==null)return;let L=!1;return Ki(j,{reportFailure:!N}).then(F=>{L||(F!=null?oe(F):O(!0))}),()=>{L=!0}},[g,B,v,q,V,N]);const Y=zi({priceCents:R,priceManaWei:V??0n,balanceCents:(d==null?void 0:d.balanceCents)??0,manaBalanceWei:q});async function lt(j){const L=(B==null?void 0:B.sale)??(j==null?void 0:j.sale)??v,F=(B==null?void 0:B.usdCents)??(j==null?void 0:j.usdCents)??R;if(!o||!L||F<=0)return;y("processing"),I(null),ve(!1);let E=B;if(!E)try{const{credit:D,maxCreditedValue:xe,usdCents:We}=await Tn(o.identity,F,Hi(L),Ui(t));if(G.current){Pe([D.id]);return}ee.current=D.id,x.invalidateQueries({queryKey:["usd-balance"]});const ye=nt(We);if(E={sale:L,credit:D,maxCreditedValue:xe,usdCents:We,credits:ye},H(E),ye!==nt(F)){A(ye),z(We),ve(!0),y("ready");return}}catch(D){if(Nl(D)){x.invalidateQueries({queryKey:["usd-balance"]}),await ke(nt(F),L,F);return}be(D)||pe(D,{flow:"buy",step:"authorize"}),Z(be(D)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Se(D)}),I(Ue(D,n("buyModal.error.generic"),{sale:!0})),y("error");return}if(!E)return;let Q=!1,ne;try{const D={purchase:go(E.sale,[E.credit],E.maxCreditedValue),buyer:o.address,signer:o.signer,onBroadcast:({txHash:xe})=>te.current.broadcast(E.credit.id,xe),onReverted:({txHash:xe})=>{xe&&te.current.reverted(xe)}};if(te.current.submitStarted(E.credit.id),sa())try{ne=await Tl(D),te.current.broadcast(E.credit.id,ne),await da(ne),Q=!0}catch(xe){if(xe instanceof ca)Q=!0;else if(xe instanceof ua){if(xe.reason==="relayer-unreachable")throw te.current.unobservable(E.credit.id),xe;if(!Yt(o.providerType))throw xe;ne=await Fi(D)}else throw ne&&te.current.reverted(ne),xe}else ne=await Fi(D)}catch(D){te.current.submitFinished(E.credit.id),be(D)||pe(D,{flow:"buy",step:"submit",gasless:Q}),$e([E.credit.id]),ee.current=null,Z(be(D)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(D)}),x.invalidateQueries({queryKey:["usd-balance"]}),ue(D);return}te.current.submitFinished(E.credit.id),ee.current=null;try{Ei(t.coupon),bo(x,t),Z("Shop Completed Purchase",{...un([t]),payment_type:"credits",no_crypto_step:Q,transaction_hash:ne??null})}catch(D){pe(D,{flow:"buy",step:"post_purchase"})}y("complete")}function Pe(j){if(!o||j.length===0)return Promise.resolve(!1);const L=j.filter(F=>!te.current.mayBeConsumed(F));return L.length===0?Promise.resolve(!1):Hr(o.identity,L).then(()=>!0,()=>!0)}function $e(j){M(!0),Pe(j).then(L=>{L||M(!1)})}function bt(j){return Pe(j.filter(L=>!te.current.isInFlight(L)))}function Rt(){Ei(t.coupon),x.invalidateQueries({queryKey:["mana-balance"]}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["detail-trade"]}),x.invalidateQueries({queryKey:["shop-item"]}),x.invalidateQueries({queryKey:["owned-token",t.contractAddress,t.tokenId]}),x.invalidateQueries({queryKey:["public-token",t.contractAddress,t.tokenId]}),x.invalidateQueries({queryKey:["item-resales",t.contractAddress,t.itemId]}),x.invalidateQueries({queryKey:["shop-items"]}),x.invalidateQueries({queryKey:["catalog-items"]}),x.invalidateQueries({queryKey:["my-assets"]}),x.invalidateQueries({queryKey:["purchases"]}),x.invalidateQueries({queryKey:["owned-item-count"]}),x.invalidateQueries({queryKey:["overview-listings"]}),x.invalidateQueries({queryKey:["upsell-listings"]})}async function nn(){var L;const j=(B==null?void 0:B.sale)??v;if(!(!o||!j)){ee.current&&($e([ee.current]),ee.current=null),y("processing"),I(null);try{const F=(L=Bi(Y,"mana"))==null?void 0:L.manaWei,E=j.kind==="trade"?await vo({trade:j.trade,coupon:j.coupon,buyer:o.address,signer:o.signer,manaWei:F}):await jo({mint:j.mint,buyer:o.address,signer:o.signer,manaWei:F});Z("Shop Completed Purchase",{...un([t]),payment_type:"mana",transaction_hash:E??null}),Rt(),y("complete")}catch(F){be(F)||pe(F,{flow:"buy_mana",step:"submit"}),Z(be(F)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(F)}),ue(F)}}}async function Pt(){const j=(B==null?void 0:B.sale)??v,L=Bi(Y,"combined");if(!o||!j||!L)return;y("processing"),I(null),ee.current&&(await Pe([ee.current])&&M(!0),ee.current=null);let F=null,E;try{const{credit:Q}=await Tn(o.identity,L.creditsCents,Hi(j),Ui(t));F=Q.id,te.current.submitStarted(Q.id);const ne={buyer:o.address,signer:o.signer,credits:[Q],manaGapWei:L.manaWei,providerType:o.providerType,onBroadcast:({txHash:D})=>te.current.broadcast(Q.id,D),onReverted:({txHash:D})=>{D&&te.current.reverted(D)},onUnobservable:()=>te.current.unobservable(Q.id)};E=j.kind==="trade"?await ko({trade:j.trade,coupon:j.coupon,...ne}):await $o({mint:j.mint,...ne})}catch(Q){F&&te.current.submitFinished(F),F&&$e([F]),be(Q)||pe(Q,{flow:"buy_credits_and_mana",step:"submit"}),Z(be(Q)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(Q)}),x.invalidateQueries({queryKey:["usd-balance"]}),ue(Q);return}F&&te.current.submitFinished(F);try{Rt(),Z("Shop Completed Purchase",{...un([t]),payment_type:"credits_and_mana",transaction_hash:E??null})}catch(Q){pe(Q,{flow:"buy_credits_and_mana",step:"post_purchase"})}y("complete")}async function yt(){if(!(!a||!o)){try{sessionStorage.setItem(Di,JSON.stringify(t))}catch{}ee.current&&(Pe([ee.current]),ee.current=null),H(null),y("loading");try{const j=await Ho(a,{address:o.address,identity:o.identity});if(j.url){window.location.href=j.url;return}if(!j.orderId)throw new Error("Checkout returned neither a redirect url nor an order id");f(`/credits?order=${encodeURIComponent(j.orderId)}`)}catch(j){pe(j,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(Di)}catch{}I(n("buyModal.error.creditsCheckout")),y("error")}}}const[Ce,Le]=c.useState(null);function rn(j,L){const{spender:F,chainId:E}=Co(j,L);return wl(E,F)}function ue(j){if(I(Ue(j,n("buyModal.error.generic"),{sale:!0})),y("error"),!is(j)||!o)return;const L=j.required;(async()=>{if(await od(o.providerType,o.address)){S(L);return}I(n("buyModal.error.relayDownNoRail"))})()}async function dt(j){if(o){S(null);try{await ps(o.web3Provider,j)}catch(L){be(L)||pe(L,{flow:"buy",step:"switch_chain"}),S(j);return}wt()}}function Ee(j){j==="mana"?nn():j==="combined"?Pt():lt()}const Ke=c.useRef(!1);async function Ye(j){var L;if(!Ke.current){Ke.current=!0;try{const F=(B==null?void 0:B.sale)??v;if(j==="credits"||!F||!o){Ee(j);return}const E=rn(j,F),Q=((L=Y.options.find(D=>D.method===j))==null?void 0:L.manaWei)??0n,ne=await oa(E,o.address,Q).catch(()=>!0);if(yl(o.providerType,ne)){Le({auth:E,rail:j});return}Ee(j)}finally{Ke.current=!1}}}const Ie=Y.options.some(j=>j.method==="mana"||j.method==="combined"),Lt=g==="ready"&&(Ie||Y.manaShortfall!=null)||g==="nofunds"&&Ie;function wt(){I(null),H(null),ve(!1),M(!1),y("loading"),U(j=>j+1)}const vt=g==="error"&&C===null&&(!!ee.current||W),Je=g==="processing",an=g==="complete"?n("buyModal.titleComplete"):g==="error"?n("cartCheckout.errorTitle"):g==="nofunds"?n("buyModal.titleNoFunds"):n("buyModal.titleBuy");return Ce&&o?e.jsx(ea,{auth:Ce.auth,signer:o.signer,title:n(Ce.rail==="mana"?"authorizeStep.manaTitle":"authorizeStep.buyTitle"),name:n(Ce.rail==="mana"?"authorizeStep.manaName":"authorizeStep.buyName"),reason:n(Ce.rail==="mana"?"authorizeStep.manaReason":"authorizeStep.buyReason"),icon:e.jsx("img",{src:bl,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{rail:j}=Ce;Le(null),Ee(j)},onCancel:()=>Le(null),onClose:()=>{Le(null),s()}}):e.jsxs(Uo,{role:"dialog","aria-modal":"true","aria-label":n("buyModal.dialogAria",{name:t.name}),"data-testid":"buy-modal",children:[e.jsx(Qo,{onClick:Je?void 0:s,"aria-hidden":!0}),e.jsx(Vo,{"data-tall":g==="processing"||g==="loading"||void 0,children:Lt?e.jsx(gl,{asset:{name:t.name,thumb:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null,caption:t.creator?e.jsx(rs,{address:t.creator}):null},priceCredits:fe,priceCents:R,options:Y.options,priceManaWei:V??0n,balanceCredits:je,manaBalanceWei:q,onBuy:j=>void Ye(j),onClose:s,busy:Je,notice:ae?n("buyModal.priceChanged"):d!=null&&d.held?n("buyModal.heldExplainer",{credits:d.held.credits,currency:De.name}):null}):e.jsxs(e.Fragment,{children:[e.jsxs(Go,{children:[e.jsxs(Yo,{children:[e.jsx(Jo,{children:an}),!Je&&e.jsx(Xo,{onClick:s,"aria-label":n("buyModal.close"),children:e.jsx(yo,{})})]}),e.jsxs(Zo,{children:[e.jsx(el,{children:g==="nofunds"?n("buyModal.dclBalance"):n("buyModal.myCreditsBalance")}),e.jsx(tl,{}),e.jsx(nl,{children:Dn(je)})]})]}),g==="loading"&&e.jsx(tt,{"data-processing":!0,children:e.jsx("span",{className:"spinner","aria-hidden":!0})}),g==="error"&&e.jsxs(tt,{children:[e.jsxs(il,{"data-testid":"buy-error",children:[e.jsx(rl,{src:wo,alt:"",width:64,height:80}),e.jsxs(al,{children:[e.jsx("b",{children:n("cartCheckout.errorHeadline")})," ",k??(vt?null:n("cartCheckout.errorBody")),vt?e.jsxs(e.Fragment,{children:[k?" ":"",n("cartCheckout.heldLead",{currency:De.name}),e.jsx("b",{children:n("cartCheckout.heldBold")}),n("cartCheckout.heldTail",{currency:De.name})]}):null]})]}),C!==null?e.jsxs(pt,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),e.jsx(qe,{"data-variant":"purple","data-testid":"switch-and-retry",onClick:()=>void dt(C),children:n("buyModal.error.switchAndRetry",{network:as(C)})})]}):vt?e.jsx(pt,{children:e.jsx(qe,{"data-variant":"purple","data-full":!0,onClick:s,children:n("cartCheckout.gotIt")})}):e.jsxs(pt,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),e.jsx(qe,{"data-variant":"purple",onClick:wt,children:n("cartCheckout.tryAgain")})]})]}),g==="nofunds"&&e.jsxs(tt,{children:[N&&V===null&&q>0n?e.jsxs(Wt,{"data-testid":"mana-price-unavailable",children:[e.jsx(qt,{}),e.jsx(Ot,{children:n("buyModal.manaPriceUnavailable")})]}):null,d!=null&&d.held?e.jsxs(Wt,{"data-testid":"nofunds-held",children:[e.jsx(qt,{}),e.jsx(Ot,{children:n("buyModal.heldExplainer",{credits:d.held.credits,currency:De.name})})]}):null,e.jsxs(Wt,{children:[e.jsx(qt,{}),e.jsxs(Ot,{children:[e.jsx("b",{children:n("buyModal.insufficientFunds")})," ",n("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:n("buyModal.warningCreditsAmount",{count:Math.max(1,fe-je)})})," ",n("buyModal.warningToPurchase",{count:1}),xt()?null:e.jsxs(e.Fragment,{children:[" ",e.jsx(sl,{href:ss("/credits"),target:"_blank",rel:"noopener noreferrer",children:n("buyModal.warningLearnMore")})]})]})]}),e.jsx(Qi,{item:t,priceCredits:fe}),xt()?null:e.jsx(e.Fragment,{children:e.jsx(ol,{packs:X,selectedId:a||void 0,onSelect:K})}),e.jsxs(pt,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),xt()?null:e.jsx(qe,{"data-variant":"gradient",onClick:()=>void yt(),children:n("buyModal.buy")})]})]}),g==="ready"&&e.jsxs(tt,{children:[ae&&e.jsxs(Wt,{"data-testid":"price-changed",role:"status",children:[e.jsx(qt,{}),e.jsx(Ot,{children:n("buyModal.priceChanged")})]}),e.jsx(Qi,{item:t,priceCredits:fe}),e.jsx(pt,{children:e.jsx(qe,{"data-variant":"gradient","data-full":!0,onClick:()=>void lt(),children:n("buyModal.buy")})})]}),g==="processing"&&e.jsxs(tt,{"data-processing":!0,children:[e.jsx(na,{src:ta,alt:"",width:61,height:61}),e.jsx(ia,{children:l?n("buyModal.completingPurchase"):n("buyModal.completingTransaction")}),e.jsx(ra,{"aria-hidden":!0,children:e.jsx(aa,{})})]}),g==="complete"&&e.jsxs(tt,{children:[e.jsx(Bl,{}),e.jsxs(ll,{children:[e.jsx(ld,{}),e.jsxs(dl,{children:[e.jsx("b",{children:n("getCredits.successTitle")})," ",n("buyModal.successBody")]})]}),e.jsxs(pt,{"data-stack":!0,children:[e.jsx(qe,{"data-variant":"outline",onClick:()=>f(os([t.category])),children:n("buyModal.myAssets")}),xt()?e.jsx(Ni,{"data-variant":"ruby",href:_l([t]),onClick:s,children:n("success.goToBackpack")}):e.jsxs(Ni,{"data-variant":"ruby",href:Dl,target:"_blank",rel:"noreferrer",onClick:s,children:[n("buyModal.tryInWorld"),e.jsx(Wl,{})]})]})]})]})})]})}function Qi({item:t,priceCredits:s}){return e.jsxs(cl,{children:[e.jsx(ul,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(pl,{children:[e.jsxs("div",{children:[e.jsx(hl,{title:t.name,children:t.name||n("buyModal.itemFallback")}),t.creator?e.jsx(xl,{address:t.creator}):null]}),e.jsxs(fl,{children:[e.jsx(ml,{}),e.jsx("span",{children:Dn(s)})]})]})]})}function cd(){const{data:t}=se({queryKey:["feature-flag","proceeds-to-treasury"],queryFn:xs,staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return t===!0}const ud=r.div`
|
|
1
|
+
import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-COwX0Zlk.js";import{bh as Yt,c as rt,x as at,bl as Kr,bm as es,aG as ot,t as n,bw as ts,bx as ns,V as nt,O as Z,bE as Se,bD as be,bF as Tn,l as pe,bC as un,bB as Hr,i as is,C as De,ar as rs,F as Dn,d as as,E as xt,bk as ss,G as os,by as ls,bz as ds,df as cs,dg as us,dh as ps,di as hs,w as se,bj as xs,s as r,a as i,a3 as Jt,b6 as Xt,bO as Wn,b7 as it,I as P,z as Re,p as Ur,aP as Mt,ch as Qr,H as Ve,as as ge,dj as fs,M as ms,h as gs,j as bs,n as gt,bc as pn,aa as Vr,dk as Mi,d2 as ys,f as Gr,bd as ws,be as vs,dl as js,cg as ks,dm as $s,bS as Cs,dn as Is,dp as Ss,k as As,ag as At,a_ as Ms,dq as Rs,a6 as Ps,dr as Ls,b0 as Es,ds as Fs,P as Yr,Y as Jr,dt as Xr,du as Ts,dv as zs,ba as Zr,dw as Ns,bT as Bs,dx as _s,dy as Ds,dz as Ws,cm as qs,A as Os,dA as hn,X as Ks,bo as Hs,bp as Us,y as Qs,m as Vs,dB as Gs,dC as Ys,dD as Js,dE as Xs,dF as Zs,at as eo,au as to,dG as no,B as io,dH as ro,ax as Ri,aw as Pi,dI as ao,dJ as so,a0 as oo,bv as lo,dK as Li,dL as co,dM as uo,dN as po,dO as ho,dP as xo,dQ as fo,dR as mo,dS as go}from"./index-BRNshUaV.js";import{d as Ae}from"./dcl-schemas-B-Ph0Ls4.js";import{p as bo,e as Ei,i as yo,A as ea,C as wo,b as vo,f as jo,g as ko,h as $o,j as Co,m as Io,u as So,t as Ao,k as Mo,a as Ro,s as Po}from"./CollectionCarousel-Dg8w-Ze2.js";import{d as Fi,t as Lo,e as Ti,G as Eo,c as Fo}from"./buy-Bz6BQ053.js";import{c as To,i as Zt,D as zo,S as No,a as Bo,b as _o,f as Do}from"./SaleCountdown-C7e8fbLx.js";import{u as Wo,M as qo,o as Oo,f as Ko,b as Ho,l as ta,c as Uo}from"./loader-logo-DnFrESbi.js";import{w as zi,M as Qo,S as Vo,C as Go,H as Yo,a as Jo,T as Xo,X as Zo,B as el,b as tl,c as nl,d as il,e as tt,f as rl,g as al,h as sl,i as pt,j as qe,W as Wt,m as qt,n as Ot,o as ol,v as ll,L as na,P as ia,k as ra,l as aa,E as dl,F as cl,G as Ni,A as ul,p as pl,q as hl,r as xl,s as fl,t as ml,u as gl,I as Bi}from"./CreditPackPicker-D6M8C5at.js";import{P as bl}from"./PaymentMethodStep-Dmy4hMV3.js";import{m as yl}from"./mana-matic-light-Bl5duieC.js";import{q as sa,g as oa,t as wl,s as vl,a as _i,b as jl,d as kl,i as $l,e as Cl,c as Il,f as la,m as Sl,k as Al,r as Ml,n as Rl,p as Pl}from"./trade-encoding-DqOFT-xH.js";import{J as Ll,p as El,C as Fl,I as Tl}from"./ethers-bR7FzlYq.js";import{a as zl,w as da,S as ca,G as ua,c as Nl}from"./buy-gasless-C_qSC2r9.js";import{R as Di}from"./resume-buy-DG0KaJKe.js";import{a as Bl,f as Ue,i as mt}from"./errors-wUAVqc_c.js";import{C as _l}from"./Confetti-DcqbQMk-.js";import{b as Dl,J as Wl,a as ql}from"./jump-Xu9XuIAg.js";import{p as pa}from"./import-CeVyQRnj.js";import{E as Qe}from"./ErrorNotice-5cQusmGK.js";import{L as Wi,M as Ol,B as Kl,H as Hl,T as Ul,A as Ql}from"./modal.styles-Do478QcD.js";import{S as Vl}from"./Spinner-B2OgiWjC.js";import{M as Gl,E as Yl,s as Jl}from"./sendMetaTransaction-Cpk-JkUY.js";import{E as Xl}from"./EmotePlaybackBar-DamRJKE8.js";import{d as Zl}from"./disposePreview-BWK9pW9i.js";import{T as Kt}from"./Tooltip-S7k1SpAV.js";import{c as ed}from"./crumbs.styles-CQ8x8Q1s.js";import"./sentry-D9BarSwm.js";import"./intl-AKLEHPeO.js";import"./mana-matic-CEqvSwrJ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="64d7bb86-98f9-4e6f-a0f6-99269fe7df15",t._sentryDebugIdIdentifier="sentry-dbid-64d7bb86-98f9-4e6f-a0f6-99269fe7df15")}catch{}})();const ha=216n,td=(1n<<ha)-1n;function nd(t){const s=typeof t=="bigint"?t:BigInt(t.trim());if(s<0n)throw new Error(`Invalid tokenId: ${String(t)}`);return{itemId:(s>>ha).toString(),issuedId:(s&td).toString()}}function id(t){if(!t)return null;try{return nd(t).itemId}catch{return null}}const xa=["cancelled-listings"];function rd(t,s){s&&t.setQueryData(xa,l=>l!=null&&l.includes(s)?l:[...l??[],s])}function qi(t,s){var l;if(s)return(l=t.getQueryData(xa))!=null&&l.includes(s)?void 0:s}function Oi(t,s){return s.kind==="listed"?{...t,isOnSale:!0,listingPrice:s.priceCredits,tradeId:s.tradeId??t.tradeId}:{...t,isOnSale:!1,listingPrice:void 0,tradeId:void 0}}function xn(t,s,l){const{address:o,contractAddress:d,tokenId:u}=s;if(!d||!u)return;const x=`${d}-${u}`;t.cancelQueries({queryKey:["owned-token",d,u]}),t.cancelQueries({queryKey:["secondary-sale-state"]}),o&&t.cancelQueries({queryKey:["my-assets",o]});const f=l.kind==="gone";t.setQueriesData({queryKey:["owned-token",d,u]},$=>$&&(f?null:Oi($,l)));const m=o?["my-assets",o]:["my-assets"];t.setQueriesData({queryKey:m},$=>$!=null&&$.pages?{...$,pages:$.pages.map(h=>{if(f){const g=h.items.filter(y=>!(y.contractAddress===d&&y.tokenId===u));return{...h,items:g,total:Math.max(0,h.total-(h.items.length-g.length))}}return{...h,items:h.items.map(g=>g.contractAddress===d&&g.tokenId===u?Oi(g,l):g)}})}:$),t.setQueriesData({queryKey:["secondary-sale-state"]},$=>{var g;if(!$)return $;const h={...$};return l.kind==="removed"||l.kind==="gone"?delete h[x]:h[x]={priceCredits:l.priceCredits,tradeId:l.tradeId??((g=h[x])==null?void 0:g.tradeId)??""},h})}function ad(t){return!(t.isMarket||t.forSale&&t.priceKnown||t.manage||t.soldOutWithResale||!t.stillResolving&&!t.resolvingTrade&&(t.isTokenRoute?!t.ownedAssetLoading:!t.deepLinkLoading))}function fa(){const t=new Map,s=new Set,l=new Set,o=new Set;return{submitStarted:d=>{o.add(d)},submitFinished:d=>{o.delete(d)},broadcast:(d,u)=>{const x=t.get(d);x?x.add(u):t.set(d,new Set([u]))},reverted:d=>{s.add(d)},unobservable:d=>{l.add(d)},isInFlight:d=>o.has(d),mayBeConsumed:d=>{if(l.has(d))return!0;const u=t.get(d);if(!u)return!1;for(const x of u)if(!s.has(x))return!0;return!1}}}const sd=El("0.05");async function od(t){try{return(await new Ll(rt.rpcUrl).getBalance(t)).gte(sd)}catch{return!1}}async function ld(t,s){return Yt(t)?od(s):!1}function dd({size:t=64,...s}){return e.jsxs("svg",{viewBox:"0 0 64 64",width:t,height:t,"aria-hidden":!0,...s,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"})]})}const cd=t=>ds(t.contractAddress,String(t.itemId));async function Ki(t,s={}){if(t.kind==="store")return BigInt(t.mint.item.priceWei);try{return cs(await us(t.trade),t.coupon)}catch(l){return s.reportFailure!==!1&&pe(l,{flow:"buy",step:"mana_price"}),null}}function Hi(t){return t.kind==="trade"?t.trade.id:void 0}function Ui(t){return t.contractAddress&&t.itemId!=null?{contractAddress:t.contractAddress,itemId:String(t.itemId)}:void 0}function zn({item:t,onClose:s,resume:l=!1}){const{session:o}=at(),{data:d}=Kr(o),{data:u}=es(o),x=ot(),f=st();async function m(){try{return await x.fetchQuery(ls())}catch{return}}async function $(){if(u!=null)return u;if(!o)return 0n;try{const j=await x.fetchQuery({queryKey:["mana-balance",o.address],queryFn:()=>hs(o.address),staleTime:3e4});return ie(j),j}catch{return 0n}}const h=Wo().packs.slice(0,qo),[g,y]=c.useState("loading"),[k,I]=c.useState(null),[C,S]=c.useState(null),[q,M]=c.useState(!1),[w,U]=c.useState(0),[a,K]=c.useState(""),[J,A]=c.useState(t.priceCredits),T=Math.max(0,J-((d==null?void 0:d.credits)??0)),{packs:X}=Oo(h,T),[V,oe]=c.useState(null),[ce,ie]=c.useState(null),O=u??ce??0n,[N,D]=c.useState(!1),[v,re]=c.useState(null),[R,z]=c.useState(0),[B,H]=c.useState(null),[ae,ve]=c.useState(!1),ee=c.useRef(null),G=c.useRef(!1),te=c.useRef(fa()),fe=(B==null?void 0:B.credits)??J,je=(d==null?void 0:d.credits)??0;c.useEffect(()=>(G.current=!1,()=>{G.current=!0}),[]);async function ke(j,L,F,E){const Q=await $();if(E!=null&&E())return;const ne=Q>0n,W=ne?await Ki(L):null;if(E!=null&&E())return;W!=null?oe(W):ne&&D(!0);const We=zi({priceCents:F,priceManaWei:W??0n,balanceCents:(d==null?void 0:d.balanceCents)??0,manaBalanceWei:Q}).options.some(Fe=>Fe.method==="mana"||Fe.method==="combined"),ye=j-((d==null?void 0:d.credits)??0),Et=h.find(Fe=>Fe.credits>=ye)??h[h.length-1];K(Et.id),We||Z("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:j,credits_balance:(d==null?void 0:d.credits)??0,shortfall:Math.max(0,ye)}),y("nofunds")}c.useEffect(()=>{let j=!1;if(!o){y("error"),I(n("buyModal.signInToCheckout"));return}return(async()=>{try{const L=await Ko(t,o.address,ts,await m(),cd,ns);if(L.status==="own")throw new Error("You can't buy your own listing.");if(L.status==="no-price")throw new Error("price unavailable");if(L.status!=="buyable")throw new Error("not for sale");const F=Ho(L.line),E=L.line.usdCents,Q=nt(E);if(j)return;if(A(Q),re(F),z(E),d!=null&&d.credits<Q){await ke(Q,F,E,()=>j);return}l?lt({sale:F,usdCents:E}):y("ready")}catch(L){if(j)return;Z(be(L)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Se(L)}),ue(L)}})(),()=>{j=!0,ee.current&&o&&(bt([ee.current]),ee.current=null)}},[w]),c.useEffect(()=>{const j=(B==null?void 0:B.sale)??v;if(!j||g!=="ready"&&g!=="nofunds"||O<=0n||V!==null)return;let L=!1;return Ki(j,{reportFailure:!N}).then(F=>{L||(F!=null?oe(F):D(!0))}),()=>{L=!0}},[g,B,v,O,V,N]);const Y=zi({priceCents:R,priceManaWei:V??0n,balanceCents:(d==null?void 0:d.balanceCents)??0,manaBalanceWei:O});async function lt(j){const L=(B==null?void 0:B.sale)??(j==null?void 0:j.sale)??v,F=(B==null?void 0:B.usdCents)??(j==null?void 0:j.usdCents)??R;if(!o||!L||F<=0)return;y("processing"),I(null),ve(!1);let E=B;if(!E)try{const{credit:W,maxCreditedValue:xe,usdCents:We}=await Tn(o.identity,F,Hi(L),Ui(t));if(G.current){Pe([W.id]);return}ee.current=W.id,x.invalidateQueries({queryKey:["usd-balance"]});const ye=nt(We);if(E={sale:L,credit:W,maxCreditedValue:xe,usdCents:We,credits:ye},H(E),ye!==nt(F)){A(ye),z(We),ve(!0),y("ready");return}}catch(W){if(Bl(W)){x.invalidateQueries({queryKey:["usd-balance"]}),await ke(nt(F),L,F);return}be(W)||pe(W,{flow:"buy",step:"authorize"}),Z(be(W)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Se(W)}),I(Ue(W,n("buyModal.error.generic"),{sale:!0})),y("error");return}if(!E)return;let Q=!1,ne;try{const W={purchase:bo(E.sale,[E.credit],E.maxCreditedValue),buyer:o.address,signer:o.signer,onBroadcast:({txHash:xe})=>te.current.broadcast(E.credit.id,xe),onReverted:({txHash:xe})=>{xe&&te.current.reverted(xe)}};if(te.current.submitStarted(E.credit.id),sa())try{ne=await zl(W),te.current.broadcast(E.credit.id,ne),await da(ne),Q=!0}catch(xe){if(xe instanceof ca)Q=!0;else if(xe instanceof ua){if(xe.reason==="relayer-unreachable")throw te.current.unobservable(E.credit.id),xe;if(!Yt(o.providerType))throw xe;ne=await Fi(W)}else throw ne&&te.current.reverted(ne),xe}else ne=await Fi(W)}catch(W){te.current.submitFinished(E.credit.id),be(W)||pe(W,{flow:"buy",step:"submit",gasless:Q}),$e([E.credit.id]),ee.current=null,Z(be(W)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(W)}),x.invalidateQueries({queryKey:["usd-balance"]}),ue(W);return}te.current.submitFinished(E.credit.id),ee.current=null;try{Ei(t.coupon),yo(x,t),Z("Shop Completed Purchase",{...un([t]),payment_type:"credits",no_crypto_step:Q,transaction_hash:ne??null})}catch(W){pe(W,{flow:"buy",step:"post_purchase"})}y("complete")}function Pe(j){if(!o||j.length===0)return Promise.resolve(!1);const L=j.filter(F=>!te.current.mayBeConsumed(F));return L.length===0?Promise.resolve(!1):Hr(o.identity,L).then(()=>!0,()=>!0)}function $e(j){M(!0),Pe(j).then(L=>{L||M(!1)})}function bt(j){return Pe(j.filter(L=>!te.current.isInFlight(L)))}function Rt(){Ei(t.coupon),x.invalidateQueries({queryKey:["mana-balance"]}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["detail-trade"]}),x.invalidateQueries({queryKey:["shop-item"]}),x.invalidateQueries({queryKey:["owned-token",t.contractAddress,t.tokenId]}),x.invalidateQueries({queryKey:["public-token",t.contractAddress,t.tokenId]}),x.invalidateQueries({queryKey:["item-resales",t.contractAddress,t.itemId]}),x.invalidateQueries({queryKey:["shop-items"]}),x.invalidateQueries({queryKey:["catalog-items"]}),x.invalidateQueries({queryKey:["my-assets"]}),x.invalidateQueries({queryKey:["purchases"]}),x.invalidateQueries({queryKey:["owned-item-count"]}),x.invalidateQueries({queryKey:["overview-listings"]}),x.invalidateQueries({queryKey:["upsell-listings"]})}async function nn(){var L;const j=(B==null?void 0:B.sale)??v;if(!(!o||!j)){ee.current&&($e([ee.current]),ee.current=null),y("processing"),I(null);try{const F=(L=Bi(Y,"mana"))==null?void 0:L.manaWei,E=j.kind==="trade"?await jo({trade:j.trade,coupon:j.coupon,buyer:o.address,signer:o.signer,manaWei:F}):await ko({mint:j.mint,buyer:o.address,signer:o.signer,manaWei:F});Z("Shop Completed Purchase",{...un([t]),payment_type:"mana",transaction_hash:E??null}),Rt(),y("complete")}catch(F){be(F)||pe(F,{flow:"buy_mana",step:"submit"}),Z(be(F)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(F)}),ue(F)}}}async function Pt(){const j=(B==null?void 0:B.sale)??v,L=Bi(Y,"combined");if(!o||!j||!L)return;y("processing"),I(null),ee.current&&(await Pe([ee.current])&&M(!0),ee.current=null);let F=null,E;try{const{credit:Q}=await Tn(o.identity,L.creditsCents,Hi(j),Ui(t));F=Q.id,te.current.submitStarted(Q.id);const ne={buyer:o.address,signer:o.signer,credits:[Q],manaGapWei:L.manaWei,providerType:o.providerType,onBroadcast:({txHash:W})=>te.current.broadcast(Q.id,W),onReverted:({txHash:W})=>{W&&te.current.reverted(W)},onUnobservable:()=>te.current.unobservable(Q.id)};E=j.kind==="trade"?await $o({trade:j.trade,coupon:j.coupon,...ne}):await Co({mint:j.mint,...ne})}catch(Q){F&&te.current.submitFinished(F),F&&$e([F]),be(Q)||pe(Q,{flow:"buy_credits_and_mana",step:"submit"}),Z(be(Q)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(Q)}),x.invalidateQueries({queryKey:["usd-balance"]}),ue(Q);return}F&&te.current.submitFinished(F);try{Rt(),Z("Shop Completed Purchase",{...un([t]),payment_type:"credits_and_mana",transaction_hash:E??null})}catch(Q){pe(Q,{flow:"buy_credits_and_mana",step:"post_purchase"})}y("complete")}async function yt(){if(!(!a||!o)){try{sessionStorage.setItem(Di,JSON.stringify(t))}catch{}ee.current&&(Pe([ee.current]),ee.current=null),H(null),y("loading");try{const j=await Uo(a,{address:o.address,identity:o.identity});if(j.url){window.location.href=j.url;return}if(!j.orderId)throw new Error("Checkout returned neither a redirect url nor an order id");f(`/credits?order=${encodeURIComponent(j.orderId)}`)}catch(j){pe(j,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(Di)}catch{}I(n("buyModal.error.creditsCheckout")),y("error")}}}const[Ce,Le]=c.useState(null);function rn(j,L){const{spender:F,chainId:E}=Io(j,L);return vl(E,F)}function ue(j){if(I(Ue(j,n("buyModal.error.generic"),{sale:!0})),y("error"),!is(j)||!o)return;const L=j.required;(async()=>{if(await ld(o.providerType,o.address)){S(L);return}I(n("buyModal.error.relayDownNoRail"))})()}async function dt(j){if(o){S(null);try{await ps(o.web3Provider,j)}catch(L){be(L)||pe(L,{flow:"buy",step:"switch_chain"}),S(j);return}wt()}}function Ee(j){j==="mana"?nn():j==="combined"?Pt():lt()}const Ke=c.useRef(!1);async function Ye(j){var L;if(!Ke.current){Ke.current=!0;try{const F=(B==null?void 0:B.sale)??v;if(j==="credits"||!F||!o){Ee(j);return}const E=rn(j,F),Q=((L=Y.options.find(W=>W.method===j))==null?void 0:L.manaWei)??0n,ne=await oa(E,o.address,Q).catch(()=>!0);if(wl(o.providerType,ne)){Le({auth:E,rail:j});return}Ee(j)}finally{Ke.current=!1}}}const Ie=Y.options.some(j=>j.method==="mana"||j.method==="combined"),Lt=g==="ready"&&(Ie||Y.manaShortfall!=null)||g==="nofunds"&&Ie;function wt(){I(null),H(null),ve(!1),M(!1),y("loading"),U(j=>j+1)}const vt=g==="error"&&C===null&&(!!ee.current||q),Je=g==="processing",an=g==="complete"?n("buyModal.titleComplete"):g==="error"?n("cartCheckout.errorTitle"):g==="nofunds"?n("buyModal.titleNoFunds"):n("buyModal.titleBuy");return Ce&&o?e.jsx(ea,{auth:Ce.auth,signer:o.signer,title:n(Ce.rail==="mana"?"authorizeStep.manaTitle":"authorizeStep.buyTitle"),name:n(Ce.rail==="mana"?"authorizeStep.manaName":"authorizeStep.buyName"),reason:n(Ce.rail==="mana"?"authorizeStep.manaReason":"authorizeStep.buyReason"),icon:e.jsx("img",{src:yl,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{rail:j}=Ce;Le(null),Ee(j)},onCancel:()=>Le(null),onClose:()=>{Le(null),s()}}):e.jsxs(Qo,{role:"dialog","aria-modal":"true","aria-label":n("buyModal.dialogAria",{name:t.name}),"data-testid":"buy-modal",children:[e.jsx(Vo,{onClick:Je?void 0:s,"aria-hidden":!0}),e.jsx(Go,{"data-tall":g==="processing"||g==="loading"||void 0,children:Lt?e.jsx(bl,{asset:{name:t.name,thumb:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null,caption:t.creator?e.jsx(rs,{address:t.creator}):null},priceCredits:fe,priceCents:R,options:Y.options,priceManaWei:V??0n,balanceCredits:je,manaBalanceWei:O,onBuy:j=>void Ye(j),onClose:s,busy:Je,notice:ae?n("buyModal.priceChanged"):d!=null&&d.held?n("buyModal.heldExplainer",{credits:d.held.credits,currency:De.name}):null}):e.jsxs(e.Fragment,{children:[e.jsxs(Yo,{children:[e.jsxs(Jo,{children:[e.jsx(Xo,{children:an}),!Je&&e.jsx(Zo,{onClick:s,"aria-label":n("buyModal.close"),children:e.jsx(wo,{})})]}),e.jsxs(el,{children:[e.jsx(tl,{children:g==="nofunds"?n("buyModal.dclBalance"):n("buyModal.myCreditsBalance")}),e.jsx(nl,{}),e.jsx(il,{children:Dn(je)})]})]}),g==="loading"&&e.jsx(tt,{"data-processing":!0,children:e.jsx("span",{className:"spinner","aria-hidden":!0})}),g==="error"&&e.jsxs(tt,{children:[e.jsxs(rl,{"data-testid":"buy-error",children:[e.jsx(al,{src:vo,alt:"",width:64,height:80}),e.jsxs(sl,{children:[e.jsx("b",{children:n("cartCheckout.errorHeadline")})," ",k??(vt?null:n("cartCheckout.errorBody")),vt?e.jsxs(e.Fragment,{children:[k?" ":"",n("cartCheckout.heldLead",{currency:De.name}),e.jsx("b",{children:n("cartCheckout.heldBold")}),n("cartCheckout.heldTail",{currency:De.name})]}):null]})]}),C!==null?e.jsxs(pt,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),e.jsx(qe,{"data-variant":"purple","data-testid":"switch-and-retry",onClick:()=>void dt(C),children:n("buyModal.error.switchAndRetry",{network:as(C)})})]}):vt?e.jsx(pt,{children:e.jsx(qe,{"data-variant":"purple","data-full":!0,onClick:s,children:n("cartCheckout.gotIt")})}):e.jsxs(pt,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),e.jsx(qe,{"data-variant":"purple",onClick:wt,children:n("cartCheckout.tryAgain")})]})]}),g==="nofunds"&&e.jsxs(tt,{children:[N&&V===null&&O>0n?e.jsxs(Wt,{"data-testid":"mana-price-unavailable",children:[e.jsx(qt,{}),e.jsx(Ot,{children:n("buyModal.manaPriceUnavailable")})]}):null,d!=null&&d.held?e.jsxs(Wt,{"data-testid":"nofunds-held",children:[e.jsx(qt,{}),e.jsx(Ot,{children:n("buyModal.heldExplainer",{credits:d.held.credits,currency:De.name})})]}):null,e.jsxs(Wt,{children:[e.jsx(qt,{}),e.jsxs(Ot,{children:[e.jsx("b",{children:n("buyModal.insufficientFunds")})," ",n("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:n("buyModal.warningCreditsAmount",{count:Math.max(1,fe-je)})})," ",n("buyModal.warningToPurchase",{count:1}),xt()?null:e.jsxs(e.Fragment,{children:[" ",e.jsx(ol,{href:ss("/credits"),target:"_blank",rel:"noopener noreferrer",children:n("buyModal.warningLearnMore")})]})]})]}),e.jsx(Qi,{item:t,priceCredits:fe}),xt()?null:e.jsx(e.Fragment,{children:e.jsx(ll,{packs:X,selectedId:a||void 0,onSelect:K})}),e.jsxs(pt,{children:[e.jsx(qe,{"data-variant":"outline",onClick:s,children:n("buyModal.cancel")}),xt()?null:e.jsx(qe,{"data-variant":"gradient",onClick:()=>void yt(),children:n("buyModal.buy")})]})]}),g==="ready"&&e.jsxs(tt,{children:[ae&&e.jsxs(Wt,{"data-testid":"price-changed",role:"status",children:[e.jsx(qt,{}),e.jsx(Ot,{children:n("buyModal.priceChanged")})]}),e.jsx(Qi,{item:t,priceCredits:fe}),e.jsx(pt,{children:e.jsx(qe,{"data-variant":"gradient","data-full":!0,onClick:()=>void lt(),children:n("buyModal.buy")})})]}),g==="processing"&&e.jsxs(tt,{"data-processing":!0,children:[e.jsx(na,{src:ta,alt:"",width:61,height:61}),e.jsx(ia,{children:l?n("buyModal.completingPurchase"):n("buyModal.completingTransaction")}),e.jsx(ra,{"aria-hidden":!0,children:e.jsx(aa,{})})]}),g==="complete"&&e.jsxs(tt,{children:[e.jsx(_l,{}),e.jsxs(dl,{children:[e.jsx(dd,{}),e.jsxs(cl,{children:[e.jsx("b",{children:n("getCredits.successTitle")})," ",n("buyModal.successBody")]})]}),e.jsxs(pt,{"data-stack":!0,children:[e.jsx(qe,{"data-variant":"outline",onClick:()=>f(os([t.category])),children:n("buyModal.myAssets")}),xt()?e.jsx(Ni,{"data-variant":"ruby",href:Dl([t]),onClick:s,children:n("success.goToBackpack")}):e.jsxs(Ni,{"data-variant":"ruby",href:Wl,target:"_blank",rel:"noreferrer",onClick:s,children:[n("buyModal.tryInWorld"),e.jsx(ql,{})]})]})]})]})})]})}function Qi({item:t,priceCredits:s}){return e.jsxs(ul,{children:[e.jsx(pl,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(hl,{children:[e.jsxs("div",{children:[e.jsx(xl,{title:t.name,children:t.name||n("buyModal.itemFallback")}),t.creator?e.jsx(fl,{address:t.creator}):null]}),e.jsxs(ml,{children:[e.jsx(gl,{}),e.jsx("span",{children:Dn(s)})]})]})]})}function ud(){const{data:t}=se({queryKey:["feature-flag","proceeds-to-treasury"],queryFn:xs,staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return t===!0}const pd=r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
gap: 16px;
|
|
5
5
|
width: 100%;
|
|
6
6
|
max-width: 456px;
|
|
7
|
-
`,
|
|
7
|
+
`,hd=r.span`
|
|
8
8
|
flex: none;
|
|
9
9
|
font-family: ${i.font.sans};
|
|
10
10
|
font-size: 18px;
|
|
11
11
|
color: ${i.colors.muted};
|
|
12
|
-
`,
|
|
12
|
+
`,xd=r.p`
|
|
13
13
|
margin: 0;
|
|
14
14
|
font-family: ${i.font.sans};
|
|
15
15
|
font-size: 13px;
|
|
16
16
|
line-height: 1.5;
|
|
17
17
|
color: ${i.colors.muted};
|
|
18
18
|
text-align: center;
|
|
19
|
-
`,
|
|
19
|
+
`,fd=r.p`
|
|
20
20
|
margin: 0;
|
|
21
21
|
font-family: ${i.font.sans};
|
|
22
22
|
font-size: 13px;
|
|
23
23
|
line-height: 1.5;
|
|
24
24
|
color: ${i.colors.text};
|
|
25
|
-
`;function ma(t,s){const[l,o]=c.useState(!1),[d,u]=c.useState(!1),[x,f]=c.useState(null),m=c.useRef(null);c.useEffect(()=>{const h=new AbortController;return m.current=h,()=>h.abort(new DOMException("Modal closed","AbortError"))},[]);async function $(h){if(!t||l)return!0;f(null);try{const g=await t.cancelCurrent({payGas:h,onWaiting:y=>u(y>2e4)});return g!=="ok"?(f(g==="relay-reverted"?"reverted":"pending"),!1):(o(!0),!0)}catch(g){return pe(g,{flow:"edit_price_cancel"}),s(Ue(g,n("listingEdit.cancelFailed"))),!1}finally{u(!1)}}return{cancelDone:l,slow:d,cancelFailed:x,setCancelFailed:f,cancelCurrent:$,signal:()=>{var h;return(h=m.current)==null?void 0:h.signal}}}function qn({state:t,canPayGas:s,busy:l,onPayGas:o,onLater:d,testId:u="edit-cancel-relay-failed"}){return e.jsxs(
|
|
25
|
+
`;function ma(t,s){const[l,o]=c.useState(!1),[d,u]=c.useState(!1),[x,f]=c.useState(null),m=c.useRef(null);c.useEffect(()=>{const h=new AbortController;return m.current=h,()=>h.abort(new DOMException("Modal closed","AbortError"))},[]);async function $(h){if(!t||l)return!0;f(null);try{const g=await t.cancelCurrent({payGas:h,onWaiting:y=>u(y>2e4)});return g!=="ok"?(f(g==="relay-reverted"?"reverted":"pending"),!1):(o(!0),!0)}catch(g){return pe(g,{flow:"edit_price_cancel"}),s(Ue(g,n("listingEdit.cancelFailed"))),!1}finally{u(!1)}}return{cancelDone:l,slow:d,cancelFailed:x,setCancelFailed:f,cancelCurrent:$,signal:()=>{var h;return(h=m.current)==null?void 0:h.signal}}}function qn({state:t,canPayGas:s,busy:l,onPayGas:o,onLater:d,testId:u="edit-cancel-relay-failed"}){return e.jsxs(fd,{"data-testid":u,children:[s?t==="reverted"?n("itemDetail.cancelRelayReverted"):n("itemDetail.cancelRelayFailed"):n("itemDetail.cancelRelayRetry"),s?e.jsxs(e.Fragment,{children:[" ",e.jsx(Wi,{type:"button","data-testid":"cancel-pay-gas",onClick:o,disabled:l,children:n("itemDetail.cancelPayGas")}),d?e.jsxs(e.Fragment,{children:[" ",e.jsx(Wi,{type:"button","data-testid":"cancel-later",onClick:d,disabled:l,children:n("itemDetail.cancelLater")})]}):null]}):null]})}function ga({phase:t,managed:s,slow:l}){const d=t==="list"?2:1,u=`listingEdit.${s?"step":"confirm"}${t==="list"?"New":"Removal"}`;return e.jsxs(tt,{"data-processing":!0,"data-testid":"listing-steps",role:"status","aria-live":"polite",children:[e.jsx(na,{src:ta,alt:"",width:61,height:61}),e.jsx(ia,{children:n(u)}),e.jsxs(pd,{children:[e.jsx(ra,{"aria-hidden":!0,children:e.jsx(aa,{})}),e.jsxs(hd,{"data-testid":"listing-steps-count",children:[d,"/",2]})]}),l?e.jsx(xd,{"data-testid":"listing-steps-slow",children:n("listingEdit.slow")}):null]})}const fn=r.div`
|
|
26
26
|
position: fixed;
|
|
27
27
|
inset: 0;
|
|
28
28
|
z-index: 10000;
|
|
@@ -80,18 +80,18 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
80
80
|
outline: 2px solid ${i.colors.accent};
|
|
81
81
|
outline-offset: 2px;
|
|
82
82
|
}
|
|
83
|
-
`,
|
|
83
|
+
`,md=r.p`
|
|
84
84
|
margin: 0;
|
|
85
85
|
font-family: ${i.font.sans};
|
|
86
86
|
font-size: 14px;
|
|
87
87
|
line-height: 1.57;
|
|
88
88
|
color: ${i.colors.text};
|
|
89
89
|
text-align: left;
|
|
90
|
-
`,
|
|
90
|
+
`,gd=r.div`
|
|
91
91
|
display: flex;
|
|
92
92
|
align-items: center;
|
|
93
93
|
gap: 12px;
|
|
94
|
-
`,
|
|
94
|
+
`,bd=r.div`
|
|
95
95
|
flex: none;
|
|
96
96
|
display: grid;
|
|
97
97
|
place-items: center;
|
|
@@ -118,27 +118,27 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
118
118
|
height: 100px;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
`,
|
|
121
|
+
`,yd=r.div`
|
|
122
122
|
flex: 1 1 0;
|
|
123
123
|
min-width: 0;
|
|
124
124
|
display: flex;
|
|
125
125
|
flex-direction: column;
|
|
126
126
|
gap: 4px;
|
|
127
127
|
padding: 8px;
|
|
128
|
-
`,
|
|
128
|
+
`,wd=r.p`
|
|
129
129
|
margin: 0;
|
|
130
130
|
font-family: ${i.font.sans};
|
|
131
131
|
font-weight: 600;
|
|
132
132
|
font-size: 20px;
|
|
133
133
|
line-height: 1.57;
|
|
134
134
|
color: ${i.colors.text};
|
|
135
|
-
`,
|
|
135
|
+
`,vd=r.p`
|
|
136
136
|
margin: 0;
|
|
137
137
|
font-family: ${i.font.sans};
|
|
138
138
|
font-size: 10px;
|
|
139
139
|
line-height: 1.43;
|
|
140
140
|
color: ${i.colors.muted};
|
|
141
|
-
`,
|
|
141
|
+
`,jd=r.div`
|
|
142
142
|
display: flex;
|
|
143
143
|
gap: 12px;
|
|
144
144
|
|
|
@@ -155,7 +155,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
155
155
|
font-family: ${i.font.sans};
|
|
156
156
|
font-size: 12px;
|
|
157
157
|
color: ${i.colors.muted};
|
|
158
|
-
`,
|
|
158
|
+
`,kd=r.div`
|
|
159
159
|
display: flex;
|
|
160
160
|
align-items: center;
|
|
161
161
|
justify-content: space-between;
|
|
@@ -185,7 +185,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
185
185
|
height: 18px;
|
|
186
186
|
color: ${i.colors.text};
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
`,$d=r.input`
|
|
189
189
|
flex: 1 1 auto;
|
|
190
190
|
min-width: 0;
|
|
191
191
|
border: 0;
|
|
@@ -208,12 +208,12 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
208
208
|
-moz-appearance: textfield;
|
|
209
209
|
appearance: textfield;
|
|
210
210
|
}
|
|
211
|
-
|
|
211
|
+
`,Cd=r.span`
|
|
212
212
|
flex: none;
|
|
213
213
|
font-family: ${i.font.sans};
|
|
214
214
|
font-size: 10px;
|
|
215
215
|
color: ${i.colors.muted2};
|
|
216
|
-
`,
|
|
216
|
+
`,Id=r.div`
|
|
217
217
|
.react-datepicker-wrapper {
|
|
218
218
|
display: block;
|
|
219
219
|
width: 100%;
|
|
@@ -246,8 +246,8 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
246
246
|
opacity: 0.85;
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
${
|
|
250
|
-
`,
|
|
249
|
+
${To}
|
|
250
|
+
`,Sd=r.button`
|
|
251
251
|
width: 100%;
|
|
252
252
|
height: 48px;
|
|
253
253
|
border: 0;
|
|
@@ -280,13 +280,13 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
280
280
|
font-size: 13px;
|
|
281
281
|
color: ${i.colors.muted};
|
|
282
282
|
text-align: center;
|
|
283
|
-
`;const
|
|
283
|
+
`;const Ad=r.p`
|
|
284
284
|
margin: 0;
|
|
285
285
|
font-family: ${i.font.sans};
|
|
286
286
|
font-size: 12px;
|
|
287
287
|
line-height: 1.5;
|
|
288
288
|
color: ${i.colors.muted};
|
|
289
|
-
`,
|
|
289
|
+
`,Md=r.div`
|
|
290
290
|
display: flex;
|
|
291
291
|
flex-direction: column;
|
|
292
292
|
align-items: center;
|
|
@@ -295,7 +295,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
295
295
|
border-radius: 16px;
|
|
296
296
|
background: rgba(193, 238, 207, 0.5);
|
|
297
297
|
text-align: center;
|
|
298
|
-
`,
|
|
298
|
+
`,Rd=r.div`
|
|
299
299
|
display: grid;
|
|
300
300
|
place-items: center;
|
|
301
301
|
width: 64px;
|
|
@@ -308,7 +308,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
308
308
|
width: 34px;
|
|
309
309
|
height: 34px;
|
|
310
310
|
}
|
|
311
|
-
`,
|
|
311
|
+
`,Pd=r.p`
|
|
312
312
|
margin: 0;
|
|
313
313
|
font-family: ${i.font.sans};
|
|
314
314
|
font-size: 20px;
|
|
@@ -318,14 +318,14 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
318
318
|
b {
|
|
319
319
|
font-weight: 700;
|
|
320
320
|
}
|
|
321
|
-
`,
|
|
321
|
+
`,Ld=r.div`
|
|
322
322
|
display: flex;
|
|
323
323
|
gap: 12px;
|
|
324
324
|
|
|
325
325
|
${i.media.maxWidth("mobile")} {
|
|
326
326
|
flex-direction: column-reverse;
|
|
327
327
|
}
|
|
328
|
-
`,
|
|
328
|
+
`,Ed=r.button`
|
|
329
329
|
flex: 1 1 0;
|
|
330
330
|
height: 48px;
|
|
331
331
|
border: 2px solid ${i.colors.accent};
|
|
@@ -347,7 +347,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
347
347
|
outline: 2px solid ${i.colors.accent};
|
|
348
348
|
outline-offset: 2px;
|
|
349
349
|
}
|
|
350
|
-
`,
|
|
350
|
+
`,Fd=r.button`
|
|
351
351
|
flex: 1 1 0;
|
|
352
352
|
height: 48px;
|
|
353
353
|
border: 0;
|
|
@@ -369,7 +369,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
369
369
|
outline: 2px solid ${i.colors.accent};
|
|
370
370
|
outline-offset: 2px;
|
|
371
371
|
}
|
|
372
|
-
`,
|
|
372
|
+
`,Td=30;function Yi(t){const s=new Date;return s.setHours(0,0,0,0),s.setDate(s.getDate()+t),s}function zd({asset:t,session:s,creator:l,edit:o,onListed:d,onClose:u}){const x=ot(),f=st(),m=ud(),{data:$}=se({queryKey:["collection-meta",t.contractAddress],enabled:!l&&!!t.contractAddress,staleTime:5*6e4,queryFn:()=>Qr(t.contractAddress)}),h=l||($==null?void 0:$.creator),{data:g}=Jt(h),y=h?g!=null&&g.name?Xt(g.name):Wn(h):null,[k,I]=c.useState(o!=null&&o.currentCredits?String(o.currentCredits):"10"),[C,S]=c.useState(()=>Yi(Td)),[q,M]=c.useState(null),[w,U]=c.useState(!1),[a,K]=c.useState(null),[J,A]=c.useState("form"),T=c.useRef({}),{cancelDone:X,slow:V,cancelFailed:oe,setCancelFailed:ce,cancelCurrent:ie,signal:O}=ma(o,M),N=Zt(s),D=Number(k),v=Number.isInteger(D)&&D>0,re=!!o&&!X&&D===o.currentCredits,R=C?C.getTime():NaN,z=!!C&&R>Date.now(),B=Yi(1),H=v?`$${it(D).toFixed(2)}`:"$0";async function ae(G={}){if(M(null),!v){M(n("sellModal.errorWholeNumber"));return}if(!z){M(n("sellModal.invalidDate"));return}if(!N){U(!0);try{const te=_i(t.contractAddress,t.chainId),fe=await oa(te,s.address);if(U(!1),!fe){T.current=G,A("authorize");return}}catch{U(!1)}}await ve(G)}async function ve(G={}){var te,fe;if(M(null),!v){M(n("sellModal.errorWholeNumber"));return}if(!z){M(n("sellModal.invalidDate"));return}U(!0);try{if(!await ie(G.payGas))return;await jl({signer:s.signer,contractAddress:t.contractAddress,chainId:t.chainId});const je=await kl({signer:s.signer,nft:{contractAddress:t.contractAddress,tokenId:t.tokenId,network:t.network,chainId:t.chainId},usdPrice:it(D),expiresAtMs:R}),ke=await(o?pa(je,s.identity,{signal:O()}):Ur(je,s.identity));(te=O())==null||te.throwIfAborted(),K(D),Z("Shop Listed Item",{item_id:t.itemId??t.tokenId??null,contract_address:t.contractAddress,price_credits:D,price_usd:it(D),listing_type:"secondary",is_primary:!1}),Mt.success(n(o?"listingEdit.toastUpdated":"sellModal.toastOnSale",{name:t.name})),x.invalidateQueries({queryKey:["my-assets",s.address]}),d==null||d(D,ke.id)}catch(je){if((fe=O())!=null&&fe.aborted)return;pe(je,{flow:"list_secondary"}),Z("Shop Listing Failed",{listing_type:"secondary",error_code:Se(je)}),M(Ue(je,n(o?"listingEdit.listFailedAfterCancel":"sellModal.errorGeneric")))}finally{U(!1)}}function ee(){u(),f("/my-items")}return a!==null?e.jsx(fn,{onClick:u,role:"presentation",children:e.jsxs(mn,{onClick:G=>G.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n(o?"listingEdit.successHeader":"sellModal.successHeader"),children:[e.jsxs(gn,{children:[e.jsx(bn,{children:n(o?"listingEdit.successHeader":"sellModal.successHeader")}),e.jsx(yn,{onClick:u,"aria-label":n("getCredits.done"),children:e.jsx(P,{name:"close",className:"ico"})})]}),e.jsxs(Md,{children:[e.jsx(Rd,{"aria-hidden":!0,children:e.jsx(P,{name:"check",className:"ico"})}),e.jsxs(Pd,{children:[e.jsx("b",{children:n(o?"listingEdit.successBody":"sellModal.successOnSale")})," ",n("sellModal.successManage")]})]}),e.jsxs(Ld,{children:[e.jsx(Ed,{onClick:ee,children:n("sellModal.myItems")}),e.jsx(Fd,{onClick:u,children:n("getCredits.done")})]})]})}):J==="authorize"?e.jsx(ea,{auth:_i(t.contractAddress,t.chainId),signer:s.signer,title:n("authorizeStep.sellTitle"),name:t.name,image:t.image,icon:e.jsx(P,{name:"pen",className:"ico"}),reason:n("authorizeStep.sellReason",{name:t.name}),onAuthorized:()=>{A("form"),ve(T.current)},onCancel:()=>A("form"),onClose:u}):o&&w?e.jsx(fn,{role:"presentation",children:e.jsxs(mn,{onClick:G=>G.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("listingEdit.title"),"data-testid":"modal",children:[e.jsxs(gn,{children:[e.jsx(bn,{children:n("listingEdit.title")}),e.jsx(yn,{disabled:!0,"aria-label":n("sellModal.cancel"),children:e.jsx(P,{name:"close",className:"ico"})})]}),e.jsx(ga,{phase:X?"list":"cancel",managed:N,slow:V})]})}):e.jsx(fn,{onClick:w?void 0:u,role:"presentation",children:e.jsxs(mn,{"data-testid":"modal",onClick:G=>G.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n(o?"listingEdit.title":"sellModal.sellProduct"),children:[e.jsxs(gn,{children:[e.jsx(bn,{children:n(o?"listingEdit.title":"sellModal.sellProduct")}),e.jsx(yn,{onClick:u,disabled:w,"aria-label":n("sellModal.cancel"),children:e.jsx(P,{name:"close",className:"ico"})})]}),e.jsx(md,{children:n(o?"listingEdit.subtitle":"sellModal.subtitle")}),e.jsxs(gd,{children:[e.jsx(bd,{children:t.image?e.jsx("img",{src:t.image,alt:""}):null}),e.jsxs(yd,{children:[e.jsx(wd,{children:t.name}),y?e.jsx(vd,{children:n("sellModal.byCreator",{name:y})}):null]})]}),e.jsxs(jd,{children:[e.jsxs(Vi,{children:[e.jsx(Gi,{children:n("sellModal.priceShort")}),e.jsxs(kd,{"aria-invalid":k.length>0&&!v,children:[e.jsx(Re,{className:"ccy"}),e.jsx($d,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:k,onChange:G=>I(G.target.value),disabled:w,"aria-label":n("sellModal.priceLabel",{currency:"credits"})}),e.jsx(Cd,{"aria-hidden":!0,children:H})]})]}),e.jsxs(Vi,{children:[e.jsx(Gi,{children:n("sellModal.expirationLabel")}),e.jsx(Id,{"data-invalid":!!C&&!z,children:e.jsx(zo,{selected:C,onChange:S,minDate:B,dateFormat:"MM/dd/yyyy",placeholderText:"MM/DD/YYYY",disabled:w,showIcon:!0,showPopperArrow:!1,todayButton:n("sellModal.today"),ariaLabelledBy:void 0,"aria-label":n("sellModal.expirationLabel")})})]})]}),m&&v?e.jsx(Ad,{children:n("sellModal.proceedsCredits",{count:D})}):null,oe?e.jsx(qn,{state:oe,canPayGas:!!(o!=null&&o.canPayGas),busy:w,onPayGas:()=>void ae({payGas:!0}),onLater:()=>ce(null)}):null,e.jsx(Qe,{message:q}),e.jsx(Sd,{onClick:()=>void ae(),disabled:w||re||oe==="pending"||!v||!z,"data-testid":"list-submit",children:o?n(X?"sellModal.putUpForSale":"listingEdit.submit"):w?N?n("sellModal.puttingOnSale"):n("sellModal.confirmListing"):n("sellModal.putUpForSale")})]})})}const Nd=r.div`
|
|
373
373
|
position: fixed;
|
|
374
374
|
inset: 0;
|
|
375
375
|
z-index: 10000;
|
|
@@ -378,7 +378,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
378
378
|
justify-content: center;
|
|
379
379
|
padding: 16px;
|
|
380
380
|
background: rgba(22, 21, 24, 0.55);
|
|
381
|
-
`,
|
|
381
|
+
`,Bd=r.div`
|
|
382
382
|
width: 560px;
|
|
383
383
|
max-width: 100%;
|
|
384
384
|
max-height: 92vh;
|
|
@@ -394,25 +394,25 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
394
394
|
${i.media.maxWidth("mobile")} {
|
|
395
395
|
padding: 12px 16px 16px;
|
|
396
396
|
}
|
|
397
|
-
`,
|
|
397
|
+
`,_d=r.div`
|
|
398
398
|
display: flex;
|
|
399
399
|
flex-direction: column;
|
|
400
400
|
gap: 4px;
|
|
401
401
|
padding-bottom: 16px;
|
|
402
402
|
border-bottom: 1px solid ${i.colors.gray4};
|
|
403
|
-
`,
|
|
403
|
+
`,Dd=r.div`
|
|
404
404
|
display: flex;
|
|
405
405
|
align-items: center;
|
|
406
406
|
justify-content: space-between;
|
|
407
407
|
gap: 8px;
|
|
408
|
-
`,
|
|
408
|
+
`,Wd=r.h2`
|
|
409
409
|
margin: 0;
|
|
410
410
|
font-family: ${i.font.sans};
|
|
411
411
|
font-weight: 600;
|
|
412
412
|
font-size: 20px;
|
|
413
413
|
line-height: 1.6;
|
|
414
414
|
color: ${i.colors.text};
|
|
415
|
-
`,
|
|
415
|
+
`,qd=r.button`
|
|
416
416
|
flex: none;
|
|
417
417
|
display: grid;
|
|
418
418
|
place-items: center;
|
|
@@ -435,33 +435,33 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
435
435
|
outline: 2px solid ${i.colors.accent};
|
|
436
436
|
outline-offset: 2px;
|
|
437
437
|
}
|
|
438
|
-
`,
|
|
438
|
+
`,Od=r.div`
|
|
439
439
|
display: flex;
|
|
440
440
|
align-items: center;
|
|
441
441
|
gap: 12px;
|
|
442
|
-
`,
|
|
442
|
+
`,Kd=r.img`
|
|
443
443
|
flex: none;
|
|
444
444
|
width: 72px;
|
|
445
445
|
height: 72px;
|
|
446
446
|
border-radius: 12px;
|
|
447
447
|
object-fit: cover;
|
|
448
448
|
background: ${i.colors.media};
|
|
449
|
-
`,
|
|
449
|
+
`,Hd=r.p`
|
|
450
450
|
margin: 0;
|
|
451
451
|
font-family: ${i.font.sans};
|
|
452
452
|
font-weight: 600;
|
|
453
453
|
font-size: 18px;
|
|
454
454
|
line-height: 1.4;
|
|
455
455
|
color: ${i.colors.text};
|
|
456
|
-
`,
|
|
456
|
+
`,Ud=r.label`
|
|
457
457
|
display: flex;
|
|
458
458
|
flex-direction: column;
|
|
459
459
|
gap: 6px;
|
|
460
|
-
`,
|
|
460
|
+
`,Qd=r.span`
|
|
461
461
|
font-family: ${i.font.sans};
|
|
462
462
|
font-size: 12px;
|
|
463
463
|
color: ${i.colors.muted};
|
|
464
|
-
`,
|
|
464
|
+
`,Vd=r.input`
|
|
465
465
|
width: 100%;
|
|
466
466
|
height: 44px;
|
|
467
467
|
padding: 0 12px;
|
|
@@ -485,7 +485,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
485
485
|
&:disabled {
|
|
486
486
|
opacity: 0.6;
|
|
487
487
|
}
|
|
488
|
-
`,
|
|
488
|
+
`,Gd=r.p`
|
|
489
489
|
margin: 0;
|
|
490
490
|
padding: 12px 14px;
|
|
491
491
|
border-radius: 10px;
|
|
@@ -501,7 +501,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
501
501
|
${i.media.maxWidth("mobile")} {
|
|
502
502
|
flex-direction: column-reverse;
|
|
503
503
|
}
|
|
504
|
-
`,
|
|
504
|
+
`,Yd=r.button`
|
|
505
505
|
flex: 1;
|
|
506
506
|
height: 48px;
|
|
507
507
|
border: 2px solid ${i.colors.blackBtn};
|
|
@@ -557,7 +557,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
557
557
|
opacity: 0.55;
|
|
558
558
|
cursor: default;
|
|
559
559
|
}
|
|
560
|
-
`,
|
|
560
|
+
`,Jd=r.div`
|
|
561
561
|
display: flex;
|
|
562
562
|
flex-direction: column;
|
|
563
563
|
align-items: center;
|
|
@@ -566,7 +566,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
566
566
|
border-radius: 16px;
|
|
567
567
|
background: rgba(193, 238, 207, 0.5);
|
|
568
568
|
text-align: center;
|
|
569
|
-
`,
|
|
569
|
+
`,Xd=r.div`
|
|
570
570
|
display: grid;
|
|
571
571
|
place-items: center;
|
|
572
572
|
width: 64px;
|
|
@@ -579,7 +579,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
579
579
|
width: 34px;
|
|
580
580
|
height: 34px;
|
|
581
581
|
}
|
|
582
|
-
`,
|
|
582
|
+
`,Zd=r.p`
|
|
583
583
|
margin: 0;
|
|
584
584
|
font-family: ${i.font.sans};
|
|
585
585
|
font-size: 16px;
|
|
@@ -589,7 +589,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
589
589
|
b {
|
|
590
590
|
font-weight: 700;
|
|
591
591
|
}
|
|
592
|
-
`;function
|
|
592
|
+
`;function ec(t){return/^0x[a-fA-F0-9]{40}$/.test(t.trim())}function tc({item:t,session:s,onClose:l,onTransferred:o}){const[d,u]=c.useState(""),[x,f]=c.useState(!1),[m,$]=c.useState(null),[h,g]=c.useState(!1),y=d.trim(),k=ec(y),I=k&&y.toLowerCase()===s.address.toLowerCase(),C=y.length===0?null:k?I?n("transfer.selfAddress"):null:n("transfer.invalidAddress"),S=k&&!I&&!x;async function q(){if(S){$(null),f(!0);try{await Lo({contractAddress:t.contractAddress,chainId:t.chainId,tokenId:t.tokenId,to:y,signer:s.signer}),Z("Shop Transferred Item",{contract_address:t.contractAddress,token_id:t.tokenId}),g(!0),Mt.success(n("transfer.toastSuccess",{name:t.name})),o==null||o()}catch(M){mt(M)||pe(M,{flow:"transfer-item",tokenId:t.tokenId}),Z("Shop Transfer Failed",{error_code:Se(M)}),$(mt(M)?n("getCredits.errorCanceled"):Ue(M,n("transfer.errorGeneric")))}finally{f(!1)}}}return e.jsx(Nd,{onClick:x?void 0:l,role:"presentation",children:e.jsxs(Bd,{onClick:M=>M.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("transfer.title"),children:[e.jsx(_d,{children:e.jsxs(Dd,{children:[e.jsx(Wd,{children:n("transfer.title")}),e.jsx(qd,{onClick:l,disabled:x,"aria-label":n("sellModal.cancel"),children:e.jsx(P,{name:"close",className:"ico"})})]})}),h?e.jsxs(e.Fragment,{children:[e.jsxs(Jd,{children:[e.jsx(Xd,{"aria-hidden":!0,children:e.jsx(P,{name:"check",className:"ico"})}),e.jsx(Zd,{children:n("transfer.successBody",{name:t.name})})]}),e.jsx(Ji,{children:e.jsx(Xi,{onClick:l,children:n("getCredits.done")})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Od,{children:[t.thumbnail?e.jsx(Kd,{src:t.thumbnail,alt:""}):null,e.jsx(Hd,{children:t.name})]}),e.jsxs(Ud,{children:[e.jsx(Qd,{children:n("transfer.addressLabel")}),e.jsx(Vd,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:d,onChange:M=>u(M.target.value),disabled:x,"aria-invalid":!!C,"aria-label":n("transfer.addressLabel")}),C?e.jsx(Qe,{message:C}):null]}),e.jsx(Gd,{children:n("transfer.warning")}),e.jsx(Qe,{message:m}),e.jsxs(Ji,{children:[e.jsx(Yd,{onClick:l,disabled:x,children:n("sellModal.cancel")}),e.jsx(Xi,{onClick:()=>void q(),disabled:!S,children:x?n("transfer.transferring"):n("transfer.transfer")})]})]})]})})}const nc=r(Ol)`
|
|
593
593
|
width: min(500px, 92vw);
|
|
594
594
|
gap: 20px;
|
|
595
595
|
|
|
@@ -601,7 +601,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
601
601
|
width: 100%;
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
|
-
`,
|
|
604
|
+
`,ic=r(Ve)`
|
|
605
605
|
background: ${i.colors.accent};
|
|
606
606
|
color: ${i.colors.white};
|
|
607
607
|
text-transform: uppercase;
|
|
@@ -611,7 +611,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
611
611
|
&:hover:not(:disabled) {
|
|
612
612
|
background: ${i.colors.accentHover};
|
|
613
613
|
}
|
|
614
|
-
`;function
|
|
614
|
+
`;function rc({name:t,managed:s,canPayGas:l,cancel:o,onClose:d}){const[u,x]=c.useState(!1),[f,m]=c.useState(!1),[$,h]=c.useState(null),[g,y]=c.useState(null);async function k(I){h(null),y(null),x(!0);try{const C=await o({payGas:I,onWaiting:S=>m(S>2e4)});C==="ok"?d():y(C==="relay-reverted"?"reverted":"pending")}catch(C){const S=mt(C);S||pe(C,{flow:"remove-listing"});const q=n("myAssets.removeListingError");h(s?q:S?n("getCredits.errorCanceled"):Ue(C,q))}finally{x(!1),m(!1)}}return e.jsx(Kl,{onClick:u?void 0:d,role:"presentation",children:e.jsxs(nc,{onClick:I=>I.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("removeListing.title"),"data-testid":"remove-listing-modal",children:[e.jsx(Hl,{children:e.jsx(Ul,{children:n("removeListing.title")})}),e.jsx("p",{className:"muted",style:{margin:0},children:n("removeListing.body",{name:t})}),u&&f?e.jsx("p",{className:"muted small",style:{margin:0},"data-testid":"cancel-slow",children:n(l?"itemDetail.cancelSlow":"itemDetail.cancelSlowManaged")}):null,g?e.jsx(qn,{state:g,canPayGas:l,busy:u,onPayGas:()=>void k(!0),testId:"cancel-gasless-failed"}):null,e.jsx(Qe,{message:$}),e.jsxs(Ql,{"data-actions":!0,children:[e.jsx(Ve,{variant:"outline",onClick:d,disabled:u,children:n("sellModal.cancel")}),e.jsx(ic,{onClick:()=>void k(),disabled:u||g==="pending","data-testid":"remove-confirm",children:u?e.jsx(Vl,{size:"small"}):n("itemDetail.manageRemove")})]})]})})}const wn=r.div`
|
|
615
615
|
position: fixed;
|
|
616
616
|
inset: 0;
|
|
617
617
|
z-index: 10000;
|
|
@@ -669,18 +669,18 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
669
669
|
outline: 2px solid ${i.colors.accent};
|
|
670
670
|
outline-offset: 2px;
|
|
671
671
|
}
|
|
672
|
-
`,
|
|
672
|
+
`,ac=r.p`
|
|
673
673
|
margin: 0;
|
|
674
674
|
font-family: ${i.font.sans};
|
|
675
675
|
font-size: 14px;
|
|
676
676
|
line-height: 1.57;
|
|
677
677
|
color: ${i.colors.text};
|
|
678
678
|
text-align: left;
|
|
679
|
-
`,
|
|
679
|
+
`,sc=r.div`
|
|
680
680
|
display: flex;
|
|
681
681
|
align-items: center;
|
|
682
682
|
gap: 12px;
|
|
683
|
-
`,
|
|
683
|
+
`,oc=r.div`
|
|
684
684
|
flex: none;
|
|
685
685
|
display: grid;
|
|
686
686
|
place-items: center;
|
|
@@ -707,35 +707,35 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
707
707
|
height: 100px;
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
|
-
`,
|
|
710
|
+
`,lc=r.div`
|
|
711
711
|
flex: 1 1 0;
|
|
712
712
|
min-width: 0;
|
|
713
713
|
display: flex;
|
|
714
714
|
flex-direction: column;
|
|
715
715
|
gap: 4px;
|
|
716
716
|
padding: 8px;
|
|
717
|
-
`,
|
|
717
|
+
`,dc=r.p`
|
|
718
718
|
margin: 0;
|
|
719
719
|
font-family: ${i.font.sans};
|
|
720
720
|
font-weight: 600;
|
|
721
721
|
font-size: 20px;
|
|
722
722
|
line-height: 1.57;
|
|
723
723
|
color: ${i.colors.text};
|
|
724
|
-
`,
|
|
724
|
+
`,cc=r.p`
|
|
725
725
|
margin: 0;
|
|
726
726
|
font-family: ${i.font.sans};
|
|
727
727
|
font-size: 10px;
|
|
728
728
|
line-height: 1.43;
|
|
729
729
|
color: ${i.colors.muted};
|
|
730
|
-
`,
|
|
730
|
+
`,uc=r.label`
|
|
731
731
|
display: flex;
|
|
732
732
|
flex-direction: column;
|
|
733
733
|
gap: 4px;
|
|
734
|
-
`,
|
|
734
|
+
`,pc=r.span`
|
|
735
735
|
font-family: ${i.font.sans};
|
|
736
736
|
font-size: 12px;
|
|
737
737
|
color: ${i.colors.muted};
|
|
738
|
-
`,
|
|
738
|
+
`,hc=r.div`
|
|
739
739
|
display: flex;
|
|
740
740
|
align-items: center;
|
|
741
741
|
justify-content: space-between;
|
|
@@ -759,7 +759,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
759
759
|
height: 22px;
|
|
760
760
|
color: ${i.colors.rarity};
|
|
761
761
|
}
|
|
762
|
-
`,
|
|
762
|
+
`,xc=r.input`
|
|
763
763
|
flex: 1 1 auto;
|
|
764
764
|
min-width: 0;
|
|
765
765
|
border: 0;
|
|
@@ -782,7 +782,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
782
782
|
-moz-appearance: textfield;
|
|
783
783
|
appearance: textfield;
|
|
784
784
|
}
|
|
785
|
-
`,
|
|
785
|
+
`,fc=r.span`
|
|
786
786
|
flex: none;
|
|
787
787
|
font-family: ${i.font.sans};
|
|
788
788
|
font-size: 10px;
|
|
@@ -793,7 +793,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
793
793
|
font-size: 12px;
|
|
794
794
|
line-height: 1.5;
|
|
795
795
|
color: ${i.colors.muted};
|
|
796
|
-
`,
|
|
796
|
+
`,mc=r.button`
|
|
797
797
|
width: 100%;
|
|
798
798
|
height: 48px;
|
|
799
799
|
border: 0;
|
|
@@ -820,13 +820,13 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
820
820
|
background: rgba(105, 31, 169, 0.2);
|
|
821
821
|
color: ${i.colors.white};
|
|
822
822
|
}
|
|
823
|
-
`,
|
|
823
|
+
`,gc=r.p`
|
|
824
824
|
margin: 0;
|
|
825
825
|
font-family: ${i.font.sans};
|
|
826
826
|
font-size: 13px;
|
|
827
827
|
color: ${i.colors.muted};
|
|
828
828
|
text-align: center;
|
|
829
|
-
`,
|
|
829
|
+
`,bc=r.div`
|
|
830
830
|
display: flex;
|
|
831
831
|
flex-direction: column;
|
|
832
832
|
align-items: center;
|
|
@@ -835,7 +835,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
835
835
|
border-radius: 16px;
|
|
836
836
|
background: rgba(193, 238, 207, 0.5);
|
|
837
837
|
text-align: center;
|
|
838
|
-
`,
|
|
838
|
+
`,yc=r.div`
|
|
839
839
|
display: grid;
|
|
840
840
|
place-items: center;
|
|
841
841
|
width: 64px;
|
|
@@ -848,7 +848,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
848
848
|
width: 34px;
|
|
849
849
|
height: 34px;
|
|
850
850
|
}
|
|
851
|
-
`,
|
|
851
|
+
`,wc=r.p`
|
|
852
852
|
margin: 0;
|
|
853
853
|
font-family: ${i.font.sans};
|
|
854
854
|
font-size: 20px;
|
|
@@ -858,7 +858,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
858
858
|
b {
|
|
859
859
|
font-weight: 700;
|
|
860
860
|
}
|
|
861
|
-
`,
|
|
861
|
+
`,vc=r.p`
|
|
862
862
|
margin: 0;
|
|
863
863
|
display: inline-flex;
|
|
864
864
|
align-items: center;
|
|
@@ -879,14 +879,14 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
879
879
|
height: 18px;
|
|
880
880
|
color: ${i.colors.rarity};
|
|
881
881
|
}
|
|
882
|
-
`,
|
|
882
|
+
`,jc=r.div`
|
|
883
883
|
display: flex;
|
|
884
884
|
gap: 12px;
|
|
885
885
|
|
|
886
886
|
${i.media.maxWidth("mobile")} {
|
|
887
887
|
flex-direction: column-reverse;
|
|
888
888
|
}
|
|
889
|
-
`,
|
|
889
|
+
`,kc=r.button`
|
|
890
890
|
flex: 1 1 0;
|
|
891
891
|
height: 48px;
|
|
892
892
|
border: 2px solid ${i.colors.accent};
|
|
@@ -908,7 +908,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
908
908
|
outline: 2px solid ${i.colors.accent};
|
|
909
909
|
outline-offset: 2px;
|
|
910
910
|
}
|
|
911
|
-
|
|
911
|
+
`,$c=r.button`
|
|
912
912
|
flex: 1 1 0;
|
|
913
913
|
height: 48px;
|
|
914
914
|
border: 0;
|
|
@@ -930,7 +930,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
930
930
|
outline: 2px solid ${i.colors.accent};
|
|
931
931
|
outline-offset: 2px;
|
|
932
932
|
}
|
|
933
|
-
|
|
933
|
+
`,Cc=1e3*60*60*24*182;function Ic({item:t,session:s,edit:l,onListed:o,onClose:d}){const u=ot(),x=st(),[f,m]=c.useState(l!=null&&l.currentCredits?String(l.currentCredits):"10"),[$,h]=c.useState(null),[g,y]=c.useState(null),[k,I]=c.useState(!1),[C,S]=c.useState(null),[q,M]=c.useState(null),{cancelDone:w,slow:U,cancelFailed:a,setCancelFailed:K,cancelCurrent:J,signal:A}=ma(l,y),T=rt.chainId,X=Zt(s),{data:V}=Jt(s.address),oe=V!=null&&V.name?Xt(V.name):Wn(s.address),ce=Number(f),ie=Number.isInteger(ce)&&ce>0,O=!!l&&!w&&ce===l.currentCredits,N=ie?`$${it(ce).toFixed(2)}`:"$0";c.useEffect(()=>{let R=!1;return(async()=>{try{const z=await $l({contractAddress:t.contractAddress,chainId:T});R||S(z)}catch{R||S(!1)}})(),()=>{R=!0}},[t.contractAddress,T]);async function D(R={}){var B,H;y(null);const z=Number(f);if(!Number.isInteger(z)||z<=0){y(n("primaryList.errorWholeNumber"));return}I(!0);try{if(!await J(R.payGas))return;C||(h(n("primaryList.statusEnabling")),await Cl({signer:s.signer,contractAddress:t.contractAddress,chainId:T}),S(!0)),h(n("primaryList.statusPublishing"));const ae=await Il({signer:s.signer,item:{contractAddress:t.contractAddress,itemId:t.blockchainItemId,network:Ae.Network.MATIC,chainId:T},usdPrice:it(z),uses:t.remainingSupply,expiresAtMs:Date.now()+Cc});h(n("primaryList.statusFinishing"));const ve=await(l?pa(ae,s.identity,{signal:A()}):Ur(ae,s.identity));(B=A())==null||B.throwIfAborted(),h(null),M(z),Z("Shop Listed Item",{item_id:t.blockchainItemId,contract_address:t.contractAddress,price_credits:z,price_usd:it(z),listing_type:"primary",is_primary:!0}),Mt.success(n(l?"listingEdit.toastUpdated":"primaryList.toastOnSale",{name:t.name})),o==null||o(z,ve.id),u.invalidateQueries({queryKey:["publishable-items"]}),u.invalidateQueries({queryKey:["collection-sale-state"]}),u.invalidateQueries({queryKey:["shop-items"]}),u.invalidateQueries({queryKey:["catalog-items"]}),u.invalidateQueries({queryKey:["overview-listings"]}),u.invalidateQueries({queryKey:["upsell-listings"]})}catch(ae){if((H=A())!=null&&H.aborted)return;pe(ae,{flow:"list_primary"}),Z("Shop Listing Failed",{listing_type:"primary",error_code:Se(ae)}),y(Ue(ae,n(l?"listingEdit.listFailedAfterCancel":"primaryList.errorGeneric"))),h(null)}finally{I(!1)}}function v(){d(),x(fs(t.contractAddress,t.blockchainItemId))}const re=C===null?n("primaryList.checking"):l?n(w?"primaryList.putOnSale":"listingEdit.submit"):k?X?n("primaryList.publishing"):n("primaryList.confirmListing"):C===!1?n("primaryList.enableAndPutOnSale"):n("primaryList.putOnSale");return q!==null?e.jsx(wn,{onClick:d,role:"presentation",children:e.jsxs(vn,{onClick:R=>R.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n(l?"listingEdit.successHeader":"primaryList.successTitle"),children:[e.jsxs(jn,{children:[e.jsx(kn,{children:n(l?"listingEdit.successHeader":"primaryList.successTitle")}),e.jsx($n,{onClick:d,"aria-label":n("getCredits.done"),children:e.jsx(P,{name:"close",className:"ico"})})]}),e.jsxs(bc,{children:[e.jsx(yc,{"aria-hidden":!0,children:e.jsx(P,{name:"check",className:"ico"})}),e.jsx(wc,{children:e.jsx("b",{children:t.name})}),e.jsxs(vc,{children:[n("primaryList.listedFor")," ",e.jsxs("strong",{children:[e.jsx(Re,{className:"ccy-mark"})," ",e.jsx(ge,{credits:q})]})," ",n("primaryList.dotAvailable",{count:t.remainingSupply})]})]}),e.jsxs(jc,{children:[e.jsx(kc,{onClick:d,children:n("getCredits.done")}),e.jsx($c,{onClick:v,children:n("primaryList.viewInShop")})]})]})}):l&&k?e.jsx(wn,{role:"presentation",children:e.jsxs(vn,{onClick:R=>R.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("listingEdit.title"),"data-testid":"modal",children:[e.jsxs(jn,{children:[e.jsx(kn,{children:n("listingEdit.title")}),e.jsx($n,{disabled:!0,"aria-label":n("primaryList.cancel"),children:e.jsx(P,{name:"close",className:"ico"})})]}),e.jsx(ga,{phase:w?"list":"cancel",managed:X,slow:U})]})}):e.jsx(wn,{onClick:k?void 0:d,role:"presentation",children:e.jsxs(vn,{"data-testid":"modal",onClick:R=>R.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":l?n("listingEdit.title"):n("primaryList.publishTitle",{name:t.name}),children:[e.jsxs(jn,{children:[e.jsx(kn,{children:l?n("listingEdit.title"):n("primaryList.publishTitle",{name:t.name})}),e.jsx($n,{onClick:d,disabled:k,"aria-label":n("primaryList.cancel"),children:e.jsx(P,{name:"close",className:"ico"})})]}),e.jsx(ac,{children:n("primaryList.fromCollection",{collectionName:t.collectionName,count:t.remainingSupply})}),e.jsxs(sc,{children:[e.jsx(oc,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(lc,{children:[e.jsx(dc,{children:t.name}),oe?e.jsx(cc,{children:n("primaryList.byCreator",{name:oe})}):null]})]}),e.jsxs(uc,{children:[e.jsx(pc,{children:n("primaryList.priceShort")}),e.jsxs(hc,{"aria-invalid":f.length>0&&!ie,children:[e.jsx(Re,{className:"ccy"}),e.jsx(xc,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:f,onChange:R=>m(R.target.value),disabled:k,"aria-label":n("primaryList.priceLabel",{currency:De.name})}),e.jsx(fc,{"aria-hidden":!0,children:N})]})]}),e.jsx(Ht,{children:n("primaryList.pricedInWhole",{currency:De.name,currencySingular:De.nameSingular})}),l?!k&&!w?e.jsx(Ht,{children:n("listingEdit.subtitle")}):null:C===!1&&!k?e.jsx(Ht,{children:X?n("primaryList.firstTimeManaged",{collectionName:t.collectionName}):n("primaryList.firstTimeConfirm",{collectionName:t.collectionName})}):C===!0&&!k?e.jsx(Ht,{children:X?n("primaryList.readyManaged"):n("primaryList.readyConfirm")}):null,a?e.jsx(qn,{state:a,canPayGas:!!(l!=null&&l.canPayGas),busy:k,onPayGas:()=>void D({payGas:!0}),onLater:()=>K(null)}):null,$&&!l?e.jsx(gc,{children:$}):null,e.jsx(Qe,{message:g}),e.jsx(mc,{onClick:()=>void D(),disabled:k||O||a==="pending"||C===null||!ie,"data-testid":"list-submit",children:re})]})})}const ba=["function issueTokens(address[] _beneficiaries, uint256[] _itemIds)"];function ya(t){return/^0x[a-fA-F0-9]{40}$/.test(t.trim())}function wa(t){return t.reduce((s,l)=>s+Math.max(0,Math.floor(l.amount||0)),0)}function Sc(t,s){const l=t.filter(d=>d.address.trim().length>0||(d.amount||0)>0);if(l.length===0)return!1;for(const d of l)if(!ya(d.address)||!Number.isInteger(d.amount)||d.amount<1)return!1;const o=wa(l);return o>=1&&o<=s}function Ac(t,s){const l=[],o=[];for(const d of t){const u=d.address.trim(),x=Math.max(0,Math.floor(d.amount||0));if(!(!u||x===0))for(let f=0;f<x;f++)l.push(u),o.push(s)}return{beneficiaries:l,itemIds:o}}async function Mc(t){const{contractAddress:s,chainId:l,beneficiaries:o,itemIds:d,signer:u}=t,x={...gs(bs.ERC721CollectionV2,l),address:s},f=new Tl(ba).encodeFunctionData("issueTokens",[o,d]),m=Ml(),$=Rl(u.provider,m),h=await Jl($,m,f,x,{serverURL:la.relayerUrl});return await Pl(h,"the mint"),h}async function Rc(t){const{signer:s,contractAddress:l,chainId:o,entries:d,itemId:u}=t,{beneficiaries:x,itemIds:f}=Ac(d,u);if(x.length===0)throw new Error("No copies to issue");if(la.enabled)try{return await Mc({contractAddress:l,chainId:o,beneficiaries:x,itemIds:f,signer:s})}catch(g){if(g instanceof Gl&&g.code===Yl.USER_DENIED||g instanceof Sl)throw g;console.warn("[issue] gasless meta-tx failed, falling back to a direct tx:",g)}return await ms(s.provider,o),(await(await new Fl(l,ba,s).issueTokens(x,f,Al(o))).wait()).transactionHash}const Pc=r.div`
|
|
934
934
|
position: fixed;
|
|
935
935
|
inset: 0;
|
|
936
936
|
z-index: 10000;
|
|
@@ -939,7 +939,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
939
939
|
justify-content: center;
|
|
940
940
|
padding: 16px;
|
|
941
941
|
background: rgba(22, 21, 24, 0.55);
|
|
942
|
-
`,
|
|
942
|
+
`,Lc=r.div`
|
|
943
943
|
width: 560px;
|
|
944
944
|
max-width: 100%;
|
|
945
945
|
max-height: 92vh;
|
|
@@ -951,21 +951,21 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
951
951
|
display: flex;
|
|
952
952
|
flex-direction: column;
|
|
953
953
|
gap: 20px;
|
|
954
|
-
`,
|
|
954
|
+
`,Ec=r.div`
|
|
955
955
|
display: flex;
|
|
956
956
|
align-items: center;
|
|
957
957
|
justify-content: space-between;
|
|
958
958
|
gap: 8px;
|
|
959
959
|
padding-bottom: 16px;
|
|
960
960
|
border-bottom: 1px solid ${i.colors.gray4};
|
|
961
|
-
`,
|
|
961
|
+
`,Fc=r.h2`
|
|
962
962
|
margin: 0;
|
|
963
963
|
font-family: ${i.font.sans};
|
|
964
964
|
font-weight: 600;
|
|
965
965
|
font-size: 20px;
|
|
966
966
|
line-height: 1.6;
|
|
967
967
|
color: ${i.colors.text};
|
|
968
|
-
`,
|
|
968
|
+
`,Tc=r.button`
|
|
969
969
|
flex: none;
|
|
970
970
|
display: grid;
|
|
971
971
|
place-items: center;
|
|
@@ -988,18 +988,18 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
988
988
|
outline: 2px solid ${i.colors.accent};
|
|
989
989
|
outline-offset: 2px;
|
|
990
990
|
}
|
|
991
|
-
`,
|
|
991
|
+
`,zc=r.p`
|
|
992
992
|
margin: 0;
|
|
993
993
|
font-family: ${i.font.sans};
|
|
994
994
|
font-size: 14px;
|
|
995
995
|
line-height: 1.57;
|
|
996
996
|
color: ${i.colors.text};
|
|
997
997
|
text-align: left;
|
|
998
|
-
`,
|
|
998
|
+
`,Nc=r.div`
|
|
999
999
|
display: flex;
|
|
1000
1000
|
align-items: center;
|
|
1001
1001
|
gap: 12px;
|
|
1002
|
-
`,
|
|
1002
|
+
`,Bc=r.div`
|
|
1003
1003
|
flex: none;
|
|
1004
1004
|
display: grid;
|
|
1005
1005
|
place-items: center;
|
|
@@ -1016,28 +1016,28 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1016
1016
|
object-fit: contain;
|
|
1017
1017
|
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
|
|
1018
1018
|
}
|
|
1019
|
-
`,
|
|
1019
|
+
`,_c=r.p`
|
|
1020
1020
|
margin: 0;
|
|
1021
1021
|
font-family: ${i.font.sans};
|
|
1022
1022
|
font-weight: 600;
|
|
1023
1023
|
font-size: 16px;
|
|
1024
1024
|
line-height: 1.4;
|
|
1025
1025
|
color: ${i.colors.text};
|
|
1026
|
-
`,
|
|
1026
|
+
`,Dc=r.div`
|
|
1027
1027
|
display: flex;
|
|
1028
1028
|
flex-direction: column;
|
|
1029
1029
|
gap: 10px;
|
|
1030
|
-
`,
|
|
1030
|
+
`,Wc=r.div`
|
|
1031
1031
|
display: flex;
|
|
1032
1032
|
align-items: flex-start;
|
|
1033
1033
|
gap: 8px;
|
|
1034
|
-
`,
|
|
1034
|
+
`,qc=r.label`
|
|
1035
1035
|
flex: 1 1 auto;
|
|
1036
1036
|
min-width: 0;
|
|
1037
1037
|
display: flex;
|
|
1038
1038
|
flex-direction: column;
|
|
1039
1039
|
gap: 4px;
|
|
1040
|
-
`,
|
|
1040
|
+
`,Oc=r.label`
|
|
1041
1041
|
flex: none;
|
|
1042
1042
|
width: 96px;
|
|
1043
1043
|
display: flex;
|
|
@@ -1077,7 +1077,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1077
1077
|
-moz-appearance: textfield;
|
|
1078
1078
|
appearance: textfield;
|
|
1079
1079
|
}
|
|
1080
|
-
`,
|
|
1080
|
+
`,Kc=r.button`
|
|
1081
1081
|
flex: none;
|
|
1082
1082
|
margin-top: 22px;
|
|
1083
1083
|
display: grid;
|
|
@@ -1106,7 +1106,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1106
1106
|
outline: 2px solid ${i.colors.accent};
|
|
1107
1107
|
outline-offset: 2px;
|
|
1108
1108
|
}
|
|
1109
|
-
`,
|
|
1109
|
+
`,Hc=r.button`
|
|
1110
1110
|
align-self: flex-start;
|
|
1111
1111
|
display: inline-flex;
|
|
1112
1112
|
align-items: center;
|
|
@@ -1132,7 +1132,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1132
1132
|
outline: 2px solid ${i.colors.accent};
|
|
1133
1133
|
outline-offset: 2px;
|
|
1134
1134
|
}
|
|
1135
|
-
`,
|
|
1135
|
+
`,Uc=r.p`
|
|
1136
1136
|
margin: 0;
|
|
1137
1137
|
font-family: ${i.font.sans};
|
|
1138
1138
|
font-size: 13px;
|
|
@@ -1142,7 +1142,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1142
1142
|
strong {
|
|
1143
1143
|
font-weight: 700;
|
|
1144
1144
|
}
|
|
1145
|
-
`,
|
|
1145
|
+
`,Qc=r.p`
|
|
1146
1146
|
margin: 0;
|
|
1147
1147
|
font-family: ${i.font.sans};
|
|
1148
1148
|
font-size: 12px;
|
|
@@ -1154,7 +1154,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1154
1154
|
font-size: 13px;
|
|
1155
1155
|
color: ${i.colors.muted};
|
|
1156
1156
|
text-align: center;
|
|
1157
|
-
`;const
|
|
1157
|
+
`;const Vc=r.p`
|
|
1158
1158
|
margin: 0;
|
|
1159
1159
|
font-family: ${i.font.sans};
|
|
1160
1160
|
font-size: 11px;
|
|
@@ -1166,7 +1166,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1166
1166
|
${i.media.maxWidth("mobile")} {
|
|
1167
1167
|
flex-direction: column-reverse;
|
|
1168
1168
|
}
|
|
1169
|
-
`,
|
|
1169
|
+
`,Gc=r.button`
|
|
1170
1170
|
flex: 1 1 0;
|
|
1171
1171
|
height: 48px;
|
|
1172
1172
|
border: 2px solid ${i.colors.accent};
|
|
@@ -1219,7 +1219,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1219
1219
|
background: rgba(105, 31, 169, 0.2);
|
|
1220
1220
|
color: ${i.colors.white};
|
|
1221
1221
|
}
|
|
1222
|
-
`,
|
|
1222
|
+
`,Yc=r.div`
|
|
1223
1223
|
display: flex;
|
|
1224
1224
|
flex-direction: column;
|
|
1225
1225
|
align-items: center;
|
|
@@ -1228,7 +1228,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1228
1228
|
border-radius: 16px;
|
|
1229
1229
|
background: rgba(193, 238, 207, 0.5);
|
|
1230
1230
|
text-align: center;
|
|
1231
|
-
`,
|
|
1231
|
+
`,Jc=r.div`
|
|
1232
1232
|
display: grid;
|
|
1233
1233
|
place-items: center;
|
|
1234
1234
|
width: 64px;
|
|
@@ -1241,7 +1241,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1241
1241
|
width: 34px;
|
|
1242
1242
|
height: 34px;
|
|
1243
1243
|
}
|
|
1244
|
-
`,
|
|
1244
|
+
`,Xc=r.p`
|
|
1245
1245
|
margin: 0;
|
|
1246
1246
|
font-family: ${i.font.sans};
|
|
1247
1247
|
font-size: 20px;
|
|
@@ -1251,7 +1251,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1251
1251
|
b {
|
|
1252
1252
|
font-weight: 700;
|
|
1253
1253
|
}
|
|
1254
|
-
`;function
|
|
1254
|
+
`;function Zc(t){return t.map(s=>({address:s.address,amount:Number(s.amount)}))}function eu({item:t,session:s,onClose:l,onIssued:o}){const d=ot(),[u,x]=c.useState([{address:"",amount:"1"}]),[f,m]=c.useState(!1),[$,h]=c.useState(null),[g,y]=c.useState(null),k=c.useRef(null),I=Zt(s),C=Zc(u),S=wa(C),q=Sc(C,t.available),M=S>t.available;c.useEffect(()=>{var T;(T=k.current)==null||T.focus();function A(X){X.key==="Escape"&&!f&&l()}return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[f,l]);function w(A,T){x(X=>X.map((V,oe)=>oe===A?{...V,...T}:V))}function U(){x(A=>[...A,{address:"",amount:"1"}])}function a(A){x(T=>T.length<=1?T:T.filter((X,V)=>V!==A))}async function K(){if(!(!q||f)){h(null),m(!0);try{await Rc({signer:s.signer,contractAddress:t.contractAddress,chainId:t.chainId,entries:C,itemId:t.itemId}),Z("Shop Issued Item",{contract_address:t.contractAddress,item_id:t.itemId,recipients:C.filter(A=>A.address.trim().length>0).length,copies:S}),y(S),Mt.success(n("issue.toastSuccess",{count:S,name:t.name})),d.invalidateQueries({queryKey:["publishable-item"]}),d.invalidateQueries({queryKey:["publishable-items"]}),o==null||o()}catch(A){mt(A)||pe(A,{flow:"issue-item",itemId:t.itemId}),Z("Shop Issue Failed",{error_code:Se(A)}),h(mt(A)?n("getCredits.errorCanceled"):Ue(A,n("issue.errorGeneric")))}finally{m(!1)}}}const J=f?I?n("issue.issuing"):n("issue.confirm"):S>0?n("issue.issueCount",{count:S}):n("issue.issue");return e.jsx(Pc,{onClick:f?void 0:l,role:"presentation",children:e.jsxs(Lc,{ref:k,tabIndex:-1,"data-testid":"issue-modal",onClick:A=>A.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("issue.title"),children:[e.jsxs(Ec,{children:[e.jsx(Fc,{children:n("issue.title")}),e.jsx(Tc,{onClick:l,disabled:f,"aria-label":n("sellModal.cancel"),children:e.jsx(P,{name:"close",className:"ico"})})]}),g!==null?e.jsxs(e.Fragment,{children:[e.jsxs(Yc,{children:[e.jsx(Jc,{"aria-hidden":!0,children:e.jsx(P,{name:"check",className:"ico"})}),e.jsx(Xc,{children:n("issue.successBody",{count:g,name:t.name})})]}),e.jsx(tr,{children:e.jsx(nr,{onClick:l,children:n("getCredits.done")})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Nc,{children:[e.jsx(Bc,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsx(_c,{children:t.name})]}),e.jsx(zc,{children:n("issue.subtitle")}),e.jsx(Dc,{children:u.map((A,T)=>{const X=A.address.trim(),V=X.length>0&&!ya(X),oe=Number(A.amount),ce=A.amount.length>0&&(!Number.isInteger(oe)||oe<1);return e.jsxs(Wc,{children:[e.jsxs(qc,{children:[e.jsx(Zi,{children:n("issue.addressLabel")}),e.jsx(er,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:A.address,onChange:ie=>w(T,{address:ie.target.value}),disabled:f,"aria-invalid":V,"aria-label":n("issue.addressLabel")}),V?e.jsx(Vc,{children:n("issue.invalidAddress")}):null]}),e.jsxs(Oc,{children:[e.jsx(Zi,{children:n("issue.amountLabel")}),e.jsx(er,{type:"number",min:"1",step:"1",inputMode:"numeric",value:A.amount,onChange:ie=>w(T,{amount:ie.target.value}),disabled:f,"aria-invalid":ce,"aria-label":n("issue.amountLabel")})]}),e.jsx(Kc,{onClick:()=>a(T),disabled:f||u.length<=1,"aria-label":n("issue.removeRow"),children:e.jsx(P,{name:"close",className:"ico"})})]},T)})}),e.jsxs(Hc,{onClick:U,disabled:f,children:[e.jsx(P,{name:"plus",className:"ico"}),n("issue.addRow")]}),e.jsxs(Uc,{over:M,"aria-live":"polite",children:[e.jsx("strong",{children:S})," / ",t.available," ",n("issue.itemsToIssue")]}),M?e.jsx(Qc,{children:n("issue.overCap",{available:t.available})}):null,e.jsx(Qe,{message:$}),e.jsxs(tr,{children:[e.jsx(Gc,{onClick:l,disabled:f,children:n("sellModal.cancel")}),e.jsx(nr,{onClick:()=>void K(),disabled:!q||f,children:J})]})]})]})})}const tu=r.div`
|
|
1255
1255
|
position: fixed;
|
|
1256
1256
|
inset: 0;
|
|
1257
1257
|
z-index: 10000;
|
|
@@ -1260,7 +1260,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1260
1260
|
justify-content: center;
|
|
1261
1261
|
padding: 16px;
|
|
1262
1262
|
background: rgba(22, 21, 24, 0.55);
|
|
1263
|
-
`,
|
|
1263
|
+
`,nu=r.div`
|
|
1264
1264
|
width: 760px;
|
|
1265
1265
|
max-width: 100%;
|
|
1266
1266
|
background: ${i.colors.white};
|
|
@@ -1270,21 +1270,21 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1270
1270
|
display: flex;
|
|
1271
1271
|
flex-direction: column;
|
|
1272
1272
|
gap: 16px;
|
|
1273
|
-
`,
|
|
1273
|
+
`,iu=r.div`
|
|
1274
1274
|
display: flex;
|
|
1275
1275
|
align-items: center;
|
|
1276
1276
|
justify-content: space-between;
|
|
1277
1277
|
gap: 8px;
|
|
1278
1278
|
padding-bottom: 16px;
|
|
1279
1279
|
border-bottom: 1px solid ${i.colors.gray4};
|
|
1280
|
-
`,
|
|
1280
|
+
`,ru=r.h2`
|
|
1281
1281
|
margin: 0;
|
|
1282
1282
|
font-family: ${i.font.sans};
|
|
1283
1283
|
font-weight: 600;
|
|
1284
1284
|
font-size: 20px;
|
|
1285
1285
|
line-height: 1.6;
|
|
1286
1286
|
color: ${i.colors.text};
|
|
1287
|
-
`,
|
|
1287
|
+
`,au=r.button`
|
|
1288
1288
|
flex: none;
|
|
1289
1289
|
display: grid;
|
|
1290
1290
|
place-items: center;
|
|
@@ -1303,39 +1303,39 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1303
1303
|
outline: 2px solid ${i.colors.accent};
|
|
1304
1304
|
outline-offset: 2px;
|
|
1305
1305
|
}
|
|
1306
|
-
`,
|
|
1306
|
+
`,su=r.video`
|
|
1307
1307
|
display: block;
|
|
1308
1308
|
width: 100%;
|
|
1309
1309
|
max-height: 70vh;
|
|
1310
1310
|
border-radius: 12px;
|
|
1311
1311
|
background: ${i.colors.blackBtn};
|
|
1312
|
-
`;function
|
|
1312
|
+
`;function ou({src:t,itemName:s,onClose:l}){const o=c.useRef(null);return c.useEffect(()=>{var u;(u=o.current)==null||u.focus();function d(x){x.key==="Escape"&&l()}return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[l]),e.jsx(tu,{onClick:l,role:"presentation",children:e.jsxs(nu,{ref:o,tabIndex:-1,onClick:d=>d.stopPropagation(),"data-testid":"modal",role:"dialog","aria-modal":"true","aria-label":n("itemDetail.showcaseTitle"),children:[e.jsxs(iu,{children:[e.jsx(ru,{children:s||n("itemDetail.showcaseTitle")}),e.jsx(au,{onClick:l,"aria-label":n("itemDetail.showcaseClose"),children:e.jsx(P,{name:"close",size:18})})]}),e.jsx(su,{src:t,"data-testid":"showcase-video",controls:!0,autoPlay:!0,muted:!0,playsInline:!0,preload:"auto"})]})})}const{colors:Oe,radius:lu}=i,du=r.div`
|
|
1313
1313
|
position: fixed;
|
|
1314
1314
|
inset: 0;
|
|
1315
1315
|
z-index: 60;
|
|
1316
1316
|
display: grid;
|
|
1317
1317
|
place-items: center;
|
|
1318
1318
|
padding: 20px;
|
|
1319
|
-
`,
|
|
1319
|
+
`,cu=r.div`
|
|
1320
1320
|
position: absolute;
|
|
1321
1321
|
inset: 0;
|
|
1322
1322
|
background: rgba(22, 21, 24, 0.45);
|
|
1323
|
-
`,
|
|
1323
|
+
`,uu=r.div`
|
|
1324
1324
|
position: relative;
|
|
1325
1325
|
z-index: 1;
|
|
1326
1326
|
width: 100%;
|
|
1327
1327
|
max-width: 420px;
|
|
1328
1328
|
background: ${Oe.white};
|
|
1329
|
-
border-radius: ${
|
|
1329
|
+
border-radius: ${lu.banner};
|
|
1330
1330
|
padding: 24px;
|
|
1331
1331
|
box-shadow: 0 24px 60px rgba(22, 21, 24, 0.28);
|
|
1332
1332
|
animation: cart-pop-in 0.16s ease;
|
|
1333
|
-
`,
|
|
1333
|
+
`,pu=r.div`
|
|
1334
1334
|
display: flex;
|
|
1335
1335
|
align-items: center;
|
|
1336
1336
|
gap: 14px;
|
|
1337
1337
|
margin-bottom: 18px;
|
|
1338
|
-
`,
|
|
1338
|
+
`,hu=r.div`
|
|
1339
1339
|
width: 64px;
|
|
1340
1340
|
height: 64px;
|
|
1341
1341
|
flex: none;
|
|
@@ -1348,12 +1348,12 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1348
1348
|
height: 100%;
|
|
1349
1349
|
object-fit: contain;
|
|
1350
1350
|
}
|
|
1351
|
-
`,
|
|
1351
|
+
`,xu=r.div`
|
|
1352
1352
|
font-weight: 700;
|
|
1353
1353
|
font-size: 16px;
|
|
1354
1354
|
color: ${Oe.text};
|
|
1355
1355
|
margin-bottom: 6px;
|
|
1356
|
-
`,
|
|
1356
|
+
`,fu=r.div`
|
|
1357
1357
|
background: ${Oe.panel};
|
|
1358
1358
|
border-radius: 14px;
|
|
1359
1359
|
padding: 16px;
|
|
@@ -1374,7 +1374,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1374
1374
|
&[data-approx] {
|
|
1375
1375
|
color: ${Oe.text2};
|
|
1376
1376
|
}
|
|
1377
|
-
`,
|
|
1377
|
+
`,mu=r.span`
|
|
1378
1378
|
color: ${Oe.muted};
|
|
1379
1379
|
`,ar=r(Re)`
|
|
1380
1380
|
width: 20px;
|
|
@@ -1383,7 +1383,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1383
1383
|
`,sr=r.div`
|
|
1384
1384
|
margin-top: 6px;
|
|
1385
1385
|
font-size: 13px;
|
|
1386
|
-
`,
|
|
1386
|
+
`,gu=r.div`
|
|
1387
1387
|
font-size: 13px;
|
|
1388
1388
|
margin-bottom: 6px;
|
|
1389
1389
|
`,va=gt`
|
|
@@ -1391,30 +1391,30 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1391
1391
|
font-size: 13px;
|
|
1392
1392
|
`,Cn=r.p`
|
|
1393
1393
|
${va};
|
|
1394
|
-
`,
|
|
1394
|
+
`,bu=r(Qe)`
|
|
1395
1395
|
${va};
|
|
1396
|
-
`,
|
|
1396
|
+
`,yu=r.div`
|
|
1397
1397
|
display: flex;
|
|
1398
1398
|
gap: 10px;
|
|
1399
1399
|
margin-top: 18px;
|
|
1400
1400
|
`,or=r(Ve)`
|
|
1401
1401
|
flex: 1;
|
|
1402
|
-
`;function In(t){if(mt(t))return n("errors.rejected");const s=(t.message??"").toLowerCase();return s.includes("insufficient")?n("marketCheckout.error.insufficient",{currency:De.name}):s.includes("not found")||s.includes("no active listing")||s.includes("404")?n("marketCheckout.error.soldOrRemoved"):s.includes("your own listing")?n("errors.cantBuyOwn"):n("marketCheckout.error.generic")}function
|
|
1402
|
+
`;function In(t){if(mt(t))return n("errors.rejected");const s=(t.message??"").toLowerCase();return s.includes("insufficient")?n("marketCheckout.error.insufficient",{currency:De.name}):s.includes("not found")||s.includes("no active listing")||s.includes("404")?n("marketCheckout.error.soldOrRemoved"):s.includes("your own listing")?n("errors.cantBuyOwn"):n("marketCheckout.error.generic")}function wu(t){return{id:t.tradeId,tradeId:t.tradeId,name:t.name,creator:t.creator,contractAddress:t.contractAddress,itemId:t.itemId,category:t.category,wearableCategory:t.wearableCategory??void 0,rarity:t.rarity,network:t.network,chainId:t.chainId,thumbnail:t.thumbnail,priceCredits:0,gender:null,isSmart:!1}}function ja({listing:t,rate:s,onClose:l,onSold:o}){const{session:d}=at(),{data:u,isError:x}=Kr(d),f=ot(),m=st(),[$,h]=c.useState("confirm"),[g,y]=c.useState(n("marketCheckout.checkingListing")),[k,I]=c.useState(null),[C,S]=c.useState(null),[q,M]=c.useState(null),[w,U]=c.useState(!1),a=c.useRef(null),K=c.useRef(!1),J=c.useRef(fa());c.useEffect(()=>(K.current=!1,()=>{K.current=!0}),[]);const A=nt(pn(t.manaWei,s));c.useEffect(()=>{let O=!1;if(!d){h("error"),I(n("buyModal.signInToCheckout"));return}return(async()=>{try{const D=await Gr(t.tradeId);if(!D)throw new Error("not found");if(!ws(D))throw new Error("not found");if(vs(D,d.address))throw new Error("You can't buy your own listing.");const v=pn(t.manaWei,s);if(!Number.isFinite(v)||v<=0)throw new Error("price unavailable");if(O)return;S({trade:D,usdCents:v,credits:nt(v)}),y("")}catch(D){if(O)return;console.error("[market] listing check failed",D),Z(be(D)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Se(D),value_usd:Math.round(pn(t.manaWei,s))/100}),h("error"),I(In(D))}})(),()=>{O=!0,a.current&&d&&(oe([a.current]),a.current=null)}},[]);const T=!!C&&u!=null&&u.credits<C.credits;async function X(){if(!d||!C)return;if(T){Z("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:C.credits,credits_balance:(u==null?void 0:u.credits)??0,shortfall:Math.max(0,C.credits-((u==null?void 0:u.credits)??0))}),a.current&&(await V([a.current])&&M(null),a.current=null),m("/credits");return}h("working"),I(null),U(!1);let O=q;if(!O){y(n("marketCheckout.lockingPrice"));try{const{credit:R,maxCreditedValue:z,usdCents:B}=await Tn(d.identity,C.usdCents,t.tradeId);if(K.current){V([R.id]);return}a.current=R.id,f.invalidateQueries({queryKey:["usd-balance"]});const H=nt(B);if(O={trade:C.trade,credit:R,maxCreditedValue:z,usdCents:B,credits:H},M(O),H!==C.credits){S({trade:C.trade,usdCents:B,credits:H}),U(!0),y(""),h("confirm");return}}catch(R){console.error("[market] authorize failed",R),be(R)||pe(R,{flow:"market_buy_now",step:"authorize"}),Z(be(R)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Se(R),value_usd:C.usdCents/100}),y(""),I(In(R)),h("error");return}}if(!O)return;const N=O;let D=!1,v;try{y(n("marketCheckout.confirming"));const R={trade:N.trade,buyer:d.address,signer:d.signer,credits:[N.credit],maxCreditedValue:N.maxCreditedValue,onBroadcast:({txHash:z})=>J.current.broadcast(N.credit.id,z),onReverted:({txHash:z})=>{z&&J.current.reverted(z)}};if(J.current.submitStarted(N.credit.id),sa())try{v=await Nl(R),J.current.broadcast(N.credit.id,v),await da(v),D=!0}catch(z){if(z instanceof ca)D=!0;else if(z instanceof ua){if(z.reason==="relayer-unreachable")throw J.current.unobservable(N.credit.id),z;if(!Yt(d.providerType))throw z;v=await Ti(R)}else throw v&&J.current.reverted(v),z}else v=await Ti(R)}catch(R){J.current.submitFinished(N.credit.id),console.error("[market] buy now failed",R),await V([N.credit.id])&&M(null),a.current=null,Z(be(R)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Se(R),value_usd:N.usdCents/100}),f.invalidateQueries({queryKey:["usd-balance"]}),I(In(R)),h("error");const z=(R.message??"").toLowerCase();(z.includes("not found")||z.includes("no active listing")||z.includes("404"))&&o();return}J.current.submitFinished(N.credit.id),a.current=null;try{f.invalidateQueries({queryKey:["usd-balance"]}),Z("Shop Completed Purchase",{items:[{item_id:t.itemId??null,contract_address:t.contractAddress,token_id:null,price_usd:N.usdCents/100,category:t.category,is_smart:!1}],value_credits:N.credits,value_usd:N.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:D,transaction_hash:v??null}),f.invalidateQueries({queryKey:["detail-trade"]}),f.invalidateQueries({queryKey:["shop-item"]}),f.invalidateQueries({queryKey:["item-resales",t.contractAddress,t.itemId]}),f.invalidateQueries({queryKey:["shop-items"]}),f.invalidateQueries({queryKey:["catalog-items"]}),f.invalidateQueries({queryKey:["my-assets"]}),f.invalidateQueries({queryKey:["purchases"]})}catch(R){pe(R,{flow:"market_buy_now",step:"post_purchase"})}const re={items:[wu(t)],txHash:v};m("/success",{state:re})}async function V(O){if(!d||O.length===0)return!1;const N=O.filter(D=>!J.current.mayBeConsumed(D));if(N.length===0)return!1;try{return await Hr(d.identity,N),!0}catch{return!1}}function oe(O){V(O.filter(N=>!J.current.isInFlight(N)))}function ce(){d&&q&&V([q.credit.id]),a.current=null,l()}const ie=$==="working";return e.jsxs(du,{role:"dialog","aria-modal":"true","aria-label":n("buyModal.dialogAria",{name:t.name}),children:[e.jsx(cu,{onClick:ie?void 0:ce,"aria-hidden":!0}),e.jsxs(uu,{children:[e.jsxs(pu,{children:[e.jsx(hu,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs("div",{children:[e.jsx(xu,{title:t.name,children:t.name||n("buyModal.itemFallback")}),e.jsx(Vr,{"data-variant":"rarity",children:t.rarity})]})]}),e.jsx(fu,{children:C?e.jsxs(e.Fragment,{children:[e.jsx(ir,{children:n("marketCheckout.finalPrice")}),e.jsxs(rr,{children:[e.jsx(ar,{}),e.jsx(ge,{credits:C.credits})," ",Mi(C.credits)]}),e.jsxs(sr,{className:"muted",children:["$",it(C.credits).toFixed(2)]})]}):e.jsxs(e.Fragment,{children:[e.jsx(ir,{children:n("marketCheckout.todaysPrice")}),e.jsxs(rr,{"data-approx":!0,children:[e.jsx(mu,{"aria-hidden":!0,children:"≈"}),e.jsx(ar,{}),e.jsx(ge,{credits:A})," ",Mi(A)]}),e.jsx(sr,{className:"muted",children:g||n("marketCheckout.checkingListing")})]})}),d?e.jsxs(gu,{className:"muted",children:[n("marketCheckout.yourBalance")," ",e.jsx(Re,{className:"ccy-mark"})," ",ys(u,x)]}):null,T?e.jsx(Cn,{className:"muted",children:n("marketCheckout.needMore",{currency:De.name})}):null,w?e.jsx(Cn,{"data-testid":"price-changed",role:"status",children:n("buyModal.priceChanged")}):null,g&&$==="working"?e.jsx(Cn,{className:"muted",children:g}):null,e.jsx(bu,{message:k}),e.jsxs(yu,{children:[e.jsx(or,{variant:"ghost",onClick:ce,disabled:ie,children:n("buyModal.cancel")}),e.jsx(or,{variant:"purple",onClick:()=>void X(),disabled:ie||!C||T&&xt(),children:ie?n("marketCheckout.buying"):T&&!xt()?n("nav.getCredits",{currency:De.name}):n("marketCheckout.confirmPurchase")})]})]})]})}function vu(t,s,{enabled:l=!0,first:o}={}){const{data:d,isFetched:u}=se({queryKey:["related-items",t,s,o],enabled:l&&!!t&&!!s,staleTime:3e5,queryFn:()=>js(t,s,{first:o})});return{items:d??[],isFetched:u}}const ka=15;function ju(t){return`${t.contractAddress}-${t.itemId??t.tokenId??t.id}`.toLowerCase()}function ku(t,s){return!!(s.id&&t.id===s.id||s.itemId&&t.itemId===s.itemId&&lr(t,s)||s.tokenId&&t.tokenId===s.tokenId&&lr(t,s))}function lr(t,s){var l;return s.contractAddress?((l=t.contractAddress)==null?void 0:l.toLowerCase())===s.contractAddress.toLowerCase():!1}function Sn(t,s,l=ka){const o=new Set,d=[];function u(f,m){for(const $ of f){if(d.length>=m)return;if(ku($,s))continue;const h=ju($);o.has(h)||(o.add(h),d.push($))}}u(t.collection,1/0);const x=d.length;return u(t.creator??[],l),u(t.related??[],l),{items:d,isCollectionOnly:d.length>0&&d.length===x}}const $u=20,Cu=30,dr=[];function Iu(t,s=ka){const{id:l,contractAddress:o,itemId:d,tokenId:u,creator:x}=t,f=c.useMemo(()=>({id:l,contractAddress:o,itemId:d,tokenId:u}),[l,o,d,u]),{data:m=dr,isFetched:$}=se({queryKey:["collection-items",o],enabled:!!o,queryFn:()=>$s(o,{first:$u}).then(U=>U.items)}),h=c.useMemo(()=>Sn({collection:m},f,s).items.length,[m,f,s]),g=$&&h<s,y=g&&!!x,k=se({queryKey:["suggestions-creator",x],enabled:y,staleTime:5*6e4,queryFn:()=>Cs({creator:x,isOnSale:!0,first:Cu}).then(U=>U.items)}),I=k.data??dr,C=!y||k.isSuccess||k.isError,S=c.useMemo(()=>Sn({collection:m,creator:I},f,s).items.length,[m,I,f,s]),{items:q}=vu(o,d??null,{enabled:g&&C&&S<s,first:s}),M=c.useMemo(()=>Sn({collection:m,creator:I,related:q},f,s),[m,I,q,f,s]),w=ks(M.items);return{...M,items:w,siblings:m,siblingsFetched:$}}function Su(t){const s=Is();return!s||!Ss(s.contracts,t)?null:s.label}const{colors:_e,media:On}=i,Au=As`
|
|
1403
1403
|
to {
|
|
1404
1404
|
transform: rotate(360deg);
|
|
1405
1405
|
}
|
|
1406
|
-
`,
|
|
1406
|
+
`,Mu=r.div``,Ru=r.span`
|
|
1407
1407
|
width: 34px;
|
|
1408
1408
|
height: 34px;
|
|
1409
1409
|
border-radius: 50%;
|
|
1410
1410
|
border: 3px solid ${_e.line};
|
|
1411
1411
|
border-top-color: ${_e.accent};
|
|
1412
|
-
animation: ${
|
|
1412
|
+
animation: ${Au} 0.8s linear infinite;
|
|
1413
1413
|
|
|
1414
1414
|
@media (prefers-reduced-motion: reduce) {
|
|
1415
1415
|
animation-duration: 2.4s;
|
|
1416
1416
|
}
|
|
1417
|
-
`,
|
|
1417
|
+
`,Pu=r.p``,Lu=r.div``,cr=r.button`
|
|
1418
1418
|
border: 0;
|
|
1419
1419
|
background: none;
|
|
1420
1420
|
cursor: pointer;
|
|
@@ -1466,7 +1466,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1466
1466
|
${On.maxWidth("lg")} {
|
|
1467
1467
|
display: block;
|
|
1468
1468
|
}
|
|
1469
|
-
`,hr="shop-item-preview";function
|
|
1469
|
+
`,hr="shop-item-preview";function Eu({item:t}){const s=at(T=>{var X;return(X=T.session)==null?void 0:X.address}),{data:l,isLoading:o}=Jt(s),d=s&&l?s:"default",u=t.category==="emote",[x,f]=c.useState("avatar"),m=!u&&x==="item",$=m||!o,h=At(T=>T.fittingOpen),{ref:g,active:y}=Ms(),k=$&&y&&!h,[I,C]=c.useState(!0);c.useEffect(()=>{C(!0)},[t.id,m]),c.useEffect(()=>{k&&C(!0)},[k]);const S=c.useRef(null);c.useEffect(()=>{if(k)return()=>{Zl(S.current),S.current=null}},[k]);const[q,M]=c.useState(Ae.PreviewRenderer.UNITY),w=q===Ae.PreviewRenderer.BABYLON,U=!!s&&!!l,a=U&&Rs(t,Ps(l)),K=Ls(t)[0],J=U&&!a&&!u,A=t.urn?{urns:[t.urn]}:{contractAddress:t.contractAddress,tokenId:t.tokenId??void 0,itemId:t.tokenId?void 0:t.itemId??void 0};return e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:g,"data-preview-viewport":!0,"aria-hidden":!0}),k?e.jsx(Es,{id:hr,...A,profile:m?void 0:a?d:"default",bodyShape:m||a?void 0:K,type:u?void 0:m?Ae.PreviewType.WEARABLE:Ae.PreviewType.AVATAR,emote:u||m?void 0:Ae.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:u?1.5:void 0,wheelStart:u?100:void 0,onRenderer:M,onLoad:()=>{var T;C(!1),S.current=((T=document.getElementById(hr))==null?void 0:T.contentWindow)??null}}):null,!k||I?e.jsx(Mu,{"data-preview-loading":!0,"aria-busy":"true","aria-label":n("itemPreview.loading"),children:e.jsx(Ru,{"aria-hidden":!0})}):null,J&&!m?e.jsx(Pu,{"data-preview-note":!0,children:n("itemPreview.shownOnBody",{shape:Fs(K)})}):null,!w||!u?null:e.jsx(Xl,{previewId:"shop-item-preview"}),!w||u?null:e.jsxs(Lu,{"data-preview-toggle":!0,role:"group","aria-label":n("itemPreview.previewMode"),children:[e.jsxs(cr,{type:"button","data-active":x==="avatar"||void 0,"aria-pressed":x==="avatar","aria-label":n("itemPreview.onAvatar"),onClick:()=>f("avatar"),children:[e.jsx(pr,{name:"view-avatar",size:18}),e.jsx(ur,{children:n("itemPreview.onAvatar")})]}),e.jsxs(cr,{type:"button","data-active":x==="item"||void 0,"aria-pressed":x==="item","aria-label":n("itemPreview.item"),onClick:()=>f("item"),children:[e.jsx(pr,{name:"view-item",size:18}),e.jsx(ur,{children:n("itemPreview.item")})]})]})]})}const Fu=r.div`
|
|
1470
1470
|
position: fixed;
|
|
1471
1471
|
inset: 0;
|
|
1472
1472
|
z-index: 10000;
|
|
@@ -1475,7 +1475,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1475
1475
|
justify-content: center;
|
|
1476
1476
|
padding: 16px;
|
|
1477
1477
|
background: rgba(22, 21, 24, 0.55);
|
|
1478
|
-
`,
|
|
1478
|
+
`,Tu=r.div`
|
|
1479
1479
|
display: flex;
|
|
1480
1480
|
flex-direction: column;
|
|
1481
1481
|
gap: 12px;
|
|
@@ -1489,14 +1489,14 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1489
1489
|
&:focus {
|
|
1490
1490
|
outline: none;
|
|
1491
1491
|
}
|
|
1492
|
-
`,
|
|
1492
|
+
`,zu=r.div`
|
|
1493
1493
|
flex: none;
|
|
1494
1494
|
display: flex;
|
|
1495
1495
|
align-items: center;
|
|
1496
1496
|
gap: 8px;
|
|
1497
1497
|
padding: 16px;
|
|
1498
1498
|
border-bottom: 1px solid ${i.colors.gray4};
|
|
1499
|
-
`,
|
|
1499
|
+
`,Nu=r.h2`
|
|
1500
1500
|
flex: 1 1 auto;
|
|
1501
1501
|
min-width: 0;
|
|
1502
1502
|
margin: 0;
|
|
@@ -1505,7 +1505,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1505
1505
|
font-size: 20px;
|
|
1506
1506
|
line-height: 1.6;
|
|
1507
1507
|
color: ${i.colors.text};
|
|
1508
|
-
`,
|
|
1508
|
+
`,Bu=r.button`
|
|
1509
1509
|
flex: none;
|
|
1510
1510
|
display: grid;
|
|
1511
1511
|
place-items: center;
|
|
@@ -1525,7 +1525,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1525
1525
|
outline: 2px solid ${i.colors.accent};
|
|
1526
1526
|
outline-offset: 4px;
|
|
1527
1527
|
}
|
|
1528
|
-
`,
|
|
1528
|
+
`,_u=r.div`
|
|
1529
1529
|
flex: 1 1 auto;
|
|
1530
1530
|
min-height: 0;
|
|
1531
1531
|
overflow-y: auto;
|
|
@@ -1533,7 +1533,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1533
1533
|
flex-direction: column;
|
|
1534
1534
|
gap: 8px;
|
|
1535
1535
|
padding: 0 16px 24px;
|
|
1536
|
-
`,
|
|
1536
|
+
`,Du=r.div`
|
|
1537
1537
|
position: sticky;
|
|
1538
1538
|
top: 0;
|
|
1539
1539
|
z-index: 1;
|
|
@@ -1543,13 +1543,13 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1543
1543
|
gap: 8px;
|
|
1544
1544
|
padding-bottom: 8px;
|
|
1545
1545
|
background: ${i.colors.white};
|
|
1546
|
-
`,
|
|
1546
|
+
`,Wu=r.p`
|
|
1547
1547
|
margin: 0;
|
|
1548
1548
|
font-family: ${i.font.sans};
|
|
1549
1549
|
font-size: 14px;
|
|
1550
1550
|
line-height: 1.43;
|
|
1551
1551
|
color: ${i.colors.muted};
|
|
1552
|
-
`,
|
|
1552
|
+
`,qu=r.div`
|
|
1553
1553
|
position: relative;
|
|
1554
1554
|
flex: none;
|
|
1555
1555
|
display: inline-flex;
|
|
@@ -1586,7 +1586,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1586
1586
|
color: ${i.colors.text2};
|
|
1587
1587
|
pointer-events: none;
|
|
1588
1588
|
}
|
|
1589
|
-
`,
|
|
1589
|
+
`,Ou=r.div`
|
|
1590
1590
|
flex: none;
|
|
1591
1591
|
border: 1px solid ${i.colors.lineStrong};
|
|
1592
1592
|
border-radius: 16px;
|
|
@@ -1595,7 +1595,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1595
1595
|
overflow-x: auto;
|
|
1596
1596
|
overflow-y: hidden;
|
|
1597
1597
|
background: ${i.colors.white};
|
|
1598
|
-
`,
|
|
1598
|
+
`,Ku=r.table`
|
|
1599
1599
|
width: 100%;
|
|
1600
1600
|
min-width: 1096px;
|
|
1601
1601
|
table-layout: fixed;
|
|
@@ -1716,9 +1716,9 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1716
1716
|
line-height: 1.43;
|
|
1717
1717
|
color: ${i.colors.text2};
|
|
1718
1718
|
}
|
|
1719
|
-
`,
|
|
1719
|
+
`,Hu=r.div`
|
|
1720
1720
|
${$a}
|
|
1721
|
-
`,
|
|
1721
|
+
`,Uu=r.button`
|
|
1722
1722
|
${$a}
|
|
1723
1723
|
padding: 0;
|
|
1724
1724
|
border: 0;
|
|
@@ -1737,7 +1737,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1737
1737
|
}
|
|
1738
1738
|
`,xr=r.span`
|
|
1739
1739
|
color: ${i.colors.muted};
|
|
1740
|
-
`,
|
|
1740
|
+
`,Qu=r.div`
|
|
1741
1741
|
display: flex;
|
|
1742
1742
|
align-items: center;
|
|
1743
1743
|
justify-content: space-between;
|
|
@@ -1764,7 +1764,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1764
1764
|
color: ${i.colors.muted};
|
|
1765
1765
|
font-weight: 600;
|
|
1766
1766
|
}
|
|
1767
|
-
`,
|
|
1767
|
+
`,Vu=r.div`
|
|
1768
1768
|
flex: none;
|
|
1769
1769
|
display: flex;
|
|
1770
1770
|
align-items: center;
|
|
@@ -1811,7 +1811,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1811
1811
|
outline: 2px solid ${i.colors.accent};
|
|
1812
1812
|
outline-offset: 2px;
|
|
1813
1813
|
}
|
|
1814
|
-
`,
|
|
1814
|
+
`,Gu=r.button`
|
|
1815
1815
|
${Ca}
|
|
1816
1816
|
min-width: 106px;
|
|
1817
1817
|
background: ${i.colors.text2};
|
|
@@ -1832,7 +1832,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1832
1832
|
&:hover:not(:disabled) {
|
|
1833
1833
|
background: ${i.colors.accentHover};
|
|
1834
1834
|
}
|
|
1835
|
-
`,
|
|
1835
|
+
`,Yu=r.span`
|
|
1836
1836
|
display: inline-flex;
|
|
1837
1837
|
align-items: center;
|
|
1838
1838
|
height: 40px;
|
|
@@ -1845,13 +1845,13 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1845
1845
|
line-height: 24px;
|
|
1846
1846
|
color: ${i.colors.muted};
|
|
1847
1847
|
white-space: nowrap;
|
|
1848
|
-
`,
|
|
1848
|
+
`,Ju=r.div`
|
|
1849
1849
|
flex: none;
|
|
1850
1850
|
display: flex;
|
|
1851
1851
|
align-items: center;
|
|
1852
1852
|
justify-content: flex-end;
|
|
1853
1853
|
gap: 8px;
|
|
1854
|
-
`,
|
|
1854
|
+
`,Xu=r.p`
|
|
1855
1855
|
margin: 0;
|
|
1856
1856
|
font-family: ${i.font.sans};
|
|
1857
1857
|
font-size: 12px;
|
|
@@ -1885,7 +1885,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1885
1885
|
outline: 2px solid ${i.colors.accent};
|
|
1886
1886
|
outline-offset: 2px;
|
|
1887
1887
|
}
|
|
1888
|
-
`,
|
|
1888
|
+
`,Zu=r.p`
|
|
1889
1889
|
margin: 0;
|
|
1890
1890
|
padding: 32px 0;
|
|
1891
1891
|
font-family: ${i.font.sans};
|
|
@@ -1942,17 +1942,17 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1942
1942
|
width: 14px;
|
|
1943
1943
|
height: 14px;
|
|
1944
1944
|
}
|
|
1945
|
-
`;const Ut=10,
|
|
1945
|
+
`;const Ut=10,ep=!1;function tp(t){return/^0x[a-fA-F0-9]{40}$/.test(t)?`${t.slice(0,6)}…${t.slice(-4)}`:t}function np(t){let s=0;for(let l=0;l<t.length;l++)s=s*31+t.charCodeAt(l)>>>0;return`hsl(${s%360}, 52%, 45%)`}function ip(t,s){var l;return(((l=t==null?void 0:t.trim())==null?void 0:l[0])||s.replace(/^0x/i,"")[0]||"?").toUpperCase()}function rp(t){return t%100>=11&&t%100<=13?"th":["th","st","nd","rd"][t%10]??"th"}function ap(t,s){const l=new Date(t);return Number.isNaN(l.getTime())?"—":s==="en"?`${new Intl.DateTimeFormat("en",{month:"long"}).format(l)} ${l.getDate()}${rp(l.getDate())}, ${l.getFullYear()}`:new Intl.DateTimeFormat(s,{day:"numeric",month:"long",year:"numeric"}).format(l)}function sp(t){return{tradeId:t.tradeId??t.id,listingType:"primary",contractAddress:t.contractAddress,itemId:t.itemId??"",name:t.name,thumbnail:t.thumbnail,rarity:t.rarity,category:t.category,wearableCategory:t.wearableCategory??null,creator:t.creator,manaWei:t.manaWei??"0",available:1,network:t.network,chainId:t.chainId,createdAt:0}}function op({r:t,seller:s,issuedId:l,labels:o,locale:d,isOwn:u,isLegacy:x,inCart:f,fallbackImage:m,onAdd:$,onBuyNative:h,onBuyLegacy:g}){var a,K;const y=st(),{data:k}=Jt(s),I=(K=(a=k==null?void 0:k.avatar)==null?void 0:a.snapshots)==null?void 0:K.face256,[C,S]=c.useState(!1);c.useEffect(()=>S(!1),[I]);const q=!!I&&!C,M=s?k!=null&&k.name?Xt(k.name):tp(s):void 0,w=q?e.jsx("img",{className:"owner-ava",src:I,alt:"",loading:"lazy",onError:()=>S(!0)}):s?e.jsx("span",{className:"owner-ava",style:{backgroundColor:np(s)},"aria-hidden":!0,children:ip(k==null?void 0:k.name,s)}):m?e.jsx("img",{className:"owner-ava",src:m,alt:"","aria-hidden":!0}):e.jsx("span",{className:"owner-ava","aria-hidden":!0}),U=e.jsxs(e.Fragment,{children:[w,M?e.jsx("span",{className:"owner-name","data-testid":"resale-seller",children:M}):null]});return e.jsxs("tr",{"data-testid":"resale-row","data-source":t.source,"data-own":u?"true":void 0,children:[e.jsx("td",{"data-label":o.owner,children:s?e.jsx(Uu,{type:"button",onClick:()=>y(`/items/creator/${s}`),children:U}):e.jsx(Hu,{children:U})}),e.jsx("td",{"data-label":o.itemNumber,children:l?e.jsxs("span",{"data-testid":"resale-issued",children:["#",l]}):e.jsx(xr,{children:"—"})}),e.jsx("td",{"data-label":o.expiration,children:t.saleEndsAt?ap(t.saleEndsAt,d):e.jsx(xr,{children:"—"})}),e.jsx("td",{"data-label":o.price,children:e.jsxs(Qu,{children:[e.jsxs("span",{className:"amount",children:[x?e.jsx("span",{className:"approx","aria-hidden":!0,children:"≈"}):null,e.jsx(Re,{className:"ccy"}),e.jsx("span",{children:Dn(t.priceCredits)})]}),e.jsx(Vu,{"data-persistent":u?"true":void 0,children:u?e.jsx(Yu,{"data-testid":"resale-own",children:n("resales.yourListing")}):x?e.jsx(fr,{onClick:g,"aria-label":n("assetCard.buyNow"),"data-testid":"resale-buy",children:n("resales.buy")}):e.jsxs(e.Fragment,{children:[e.jsxs(Gu,{onClick:$,disabled:f,"aria-label":f?n("assetCard.inCart"):n("assetCard.addToCart"),"data-testid":"resale-add",children:[e.jsx(P,{name:"cart",className:"ico"}),e.jsx("span",{children:f?n("assetCard.inCart"):n("resales.add")})]}),e.jsx(fr,{onClick:h,"aria-label":n("assetCard.buyNow"),"data-testid":"resale-buy",children:n("resales.buy")})]})})]})})]})}function lp({item:t,onClose:s}){var D;const l=t.contractAddress,o=t.itemId,d=ot(),u=At(v=>v.add),x=At(v=>v.items),{session:f}=at(),m=Yr(v=>v.locale),$=(D=f==null?void 0:f.address)==null?void 0:D.toLowerCase(),h=c.useRef(null),[g,y]=c.useState(null),[k,I]=c.useState(null),[C,S]=c.useState("cheapest"),[q,M]=c.useState(0),w=!!g||!!k;c.useEffect(()=>{var v;(v=h.current)==null||v.focus()},[]),c.useEffect(()=>{function v(R){R.key==="Escape"&&!w&&s()}window.addEventListener("keydown",v);const re=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",v),document.body.style.overflow=re}},[w,s]);const{data:U=[],isLoading:a}=se({queryKey:["item-resales",l,o],enabled:!!l&&!!o,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Xr(l,o)}),K=c.useMemo(()=>C==="cheapest"?U:[...U].sort((v,re)=>re.priceCredits-v.priceCredits),[U,C]),J=Math.max(1,Math.ceil(K.length/Ut)),A=Math.min(q,J-1),T=K.slice(A*Ut,A*Ut+Ut),X=T.filter(v=>!v.seller||!v.issuedId).map(v=>v.tokenId).filter(v=>!!v),{data:V={}}=se({queryKey:["resale-token-info",l,X.join(",")],enabled:!!l&&X.length>0,staleTime:6e4,queryFn:()=>Ts(l,X)}),{data:oe=[]}=se({queryKey:["item-classic-orders",l,o],enabled:ep,queryFn:()=>zs(l,o)}),ce=U.some(v=>v.source==="legacy"),{data:ie}=Jr(ce);function O(){d.invalidateQueries({queryKey:["item-resales",l,o]})}const N={owner:n("resales.colOwner"),itemNumber:n("resales.colItemNumber"),expiration:n("resales.colExpiration"),price:n("resales.colPrice")};return e.jsxs(e.Fragment,{children:[e.jsx(Fu,{onClick:w?void 0:s,role:"presentation",children:e.jsxs(Tu,{ref:h,tabIndex:-1,onClick:v=>v.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":n("resales.modalTitle"),"data-testid":"resellers-modal",children:[e.jsxs(zu,{children:[e.jsx(Nu,{children:n("resales.modalTitle")}),e.jsx(Bu,{onClick:s,"aria-label":n("resales.close"),"data-testid":"resellers-close",children:e.jsx(P,{name:"close"})})]}),e.jsxs(_u,{children:[e.jsxs(Du,{children:[e.jsx(Wu,{"data-testid":"resales-count",children:n("resales.count",{count:U.length})}),e.jsxs(qu,{children:[e.jsxs("select",{value:C,onChange:v=>{S(v.target.value),M(0)},"aria-label":n("resales.sortLabel"),"data-testid":"resales-sort",children:[e.jsx("option",{value:"cheapest",children:n("resales.sortCheapest")}),e.jsx("option",{value:"most_expensive",children:n("resales.sortExpensive")})]}),e.jsx(P,{name:"chevron-down",className:"chev"})]})]}),a?null:K.length===0?e.jsx(Zu,{"data-testid":"resales-empty",children:n("resales.empty")}):null,K.length>0?e.jsxs(e.Fragment,{children:[e.jsx(Ou,{children:e.jsxs(Ku,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:N.owner}),e.jsx("th",{scope:"col",children:N.itemNumber}),e.jsx("th",{scope:"col",children:N.expiration}),e.jsx("th",{scope:"col",children:N.price})]})}),e.jsx("tbody",{children:T.map(v=>{const re=v.source==="legacy",R=x.some(ee=>ee.id===v.id),z=v.tokenId&&V[v.tokenId]||{},B=v.issuedId??z.issuedId,H=v.seller??z.seller,ae={...v,name:v.name||t.name,thumbnail:v.thumbnail||t.thumbnail,rarity:v.rarity||t.rarity,category:v.category||t.category,wearableCategory:v.wearableCategory??t.wearableCategory,gender:v.gender??t.gender},ve=!!H&&!!$&&H.toLowerCase()===$;return e.jsx(op,{r:ae,seller:H,issuedId:B,labels:N,locale:m,isOwn:ve,isLegacy:re,inCart:R,fallbackImage:ae.thumbnail,onAdd:()=>u(ae,"item_detail"),onBuyNative:()=>y(ae),onBuyLegacy:()=>I(sp(ae))},v.tradeId??v.id)})})]})}),J>1?e.jsxs(Ju,{children:[e.jsx(mr,{"data-dir":"prev",onClick:()=>M(v=>Math.max(0,v-1)),disabled:A===0,"aria-label":n("resales.prevPage"),"data-testid":"resale-prev-page",children:e.jsx(P,{name:"chevron-down"})}),e.jsx(Xu,{"data-testid":"resale-page-label",children:n("resales.page",{page:A+1,total:J})}),e.jsx(mr,{onClick:()=>M(v=>Math.min(J-1,v+1)),disabled:A>=J-1,"aria-label":n("resales.nextPage"),"data-testid":"resale-next-page",children:e.jsx(P,{name:"chevron-down"})})]}):null]}):null,null]})]})}),g?e.jsx(zn,{item:g,onClose:()=>{y(null),O()}}):null,k&&ie?e.jsx(ja,{listing:k,rate:ie,onClose:()=>I(null),onSold:()=>{I(null),O()}}):null]})}const dp="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='76'%20height='76'%20viewBox='0%200%2076%2076'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='weui:shop-outlined'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M25.3333%2022.1667V19C25.3333%2015.6406%2026.6679%2012.4188%2029.0433%2010.0433C31.4188%207.66785%2034.6406%206.33333%2038%206.33333C41.3594%206.33333%2044.5812%207.66785%2046.9567%2010.0433C49.3321%2012.4188%2050.6667%2015.6406%2050.6667%2019V22.1667H60.1667C61.9147%2022.1667%2063.3333%2023.5885%2063.3333%2025.3555V63.3587C63.3333%2066.842%2060.4992%2069.6667%2057.019%2069.6667H18.981C17.3074%2069.6667%2015.7023%2069.0023%2014.5183%2067.8195C13.3343%2066.6367%2012.6683%2065.0322%2012.6667%2063.3587V25.3587C12.6667%2023.5917%2014.0758%2022.1667%2015.8333%2022.1667H25.3333ZM29.1333%2022.1667H46.8667V19C46.8667%2016.6484%2045.9325%2014.3931%2044.2697%2012.7303C42.6069%2011.0675%2040.3516%2010.1333%2038%2010.1333C35.6484%2010.1333%2033.3931%2011.0675%2031.7303%2012.7303C30.0675%2014.3931%2029.1333%2016.6484%2029.1333%2019V22.1667ZM25.3333%2025.9667H16.4667V63.3587C16.4667%2064.7393%2017.594%2065.8667%2018.981%2065.8667H57.019C57.6847%2065.8667%2058.3233%2065.6026%2058.7947%2065.1325C59.266%2064.6623%2059.5317%2064.0244%2059.5333%2063.3587V25.9667H50.6667V34.8333H46.8667V25.9667H29.1333V34.8333H25.3333V25.9667Z'%20fill='url(%23paint0_linear_0_226)'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_0_226'%20x1='36.6705'%20y1='6.33333'%20x2='32.2014'%20y2='69.3597'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF7439'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",{colors:me,font:Ia,radius:Kn,z:cp}=i,up=r.div`
|
|
1946
1946
|
position: fixed;
|
|
1947
1947
|
inset: 0;
|
|
1948
|
-
z-index: ${
|
|
1948
|
+
z-index: ${cp.overlay};
|
|
1949
1949
|
display: flex;
|
|
1950
1950
|
align-items: center;
|
|
1951
1951
|
justify-content: center;
|
|
1952
1952
|
overflow-y: auto;
|
|
1953
1953
|
padding: 16px;
|
|
1954
1954
|
background: rgba(22, 21, 24, 0.55);
|
|
1955
|
-
`,
|
|
1955
|
+
`,pp=r.div`
|
|
1956
1956
|
width: 560px;
|
|
1957
1957
|
max-width: 100%;
|
|
1958
1958
|
max-height: 100%;
|
|
@@ -1970,20 +1970,20 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
1970
1970
|
&:focus {
|
|
1971
1971
|
outline: none;
|
|
1972
1972
|
}
|
|
1973
|
-
`,
|
|
1973
|
+
`,hp=r.div`
|
|
1974
1974
|
display: flex;
|
|
1975
1975
|
align-items: center;
|
|
1976
1976
|
justify-content: space-between;
|
|
1977
1977
|
gap: 8px;
|
|
1978
1978
|
padding-bottom: 16px;
|
|
1979
1979
|
border-bottom: 1px solid ${me.gray4};
|
|
1980
|
-
`,
|
|
1980
|
+
`,xp=r.h2`
|
|
1981
1981
|
margin: 0;
|
|
1982
1982
|
font-weight: 600;
|
|
1983
1983
|
font-size: 20px;
|
|
1984
1984
|
line-height: 1.6;
|
|
1985
1985
|
color: ${me.text};
|
|
1986
|
-
`,
|
|
1986
|
+
`,fp=r.button`
|
|
1987
1987
|
position: relative;
|
|
1988
1988
|
flex: none;
|
|
1989
1989
|
display: grid;
|
|
@@ -2010,7 +2010,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2010
2010
|
outline: 2px solid ${me.accent};
|
|
2011
2011
|
outline-offset: 2px;
|
|
2012
2012
|
}
|
|
2013
|
-
`,
|
|
2013
|
+
`,mp=r.div`
|
|
2014
2014
|
padding: 24px 16px;
|
|
2015
2015
|
border-radius: ${Kn.modal};
|
|
2016
2016
|
background: ${me.promptLilac};
|
|
@@ -2019,11 +2019,11 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2019
2019
|
align-items: center;
|
|
2020
2020
|
gap: 16px;
|
|
2021
2021
|
text-align: center;
|
|
2022
|
-
`,
|
|
2022
|
+
`,gp=r.img`
|
|
2023
2023
|
flex: none;
|
|
2024
2024
|
width: 76px;
|
|
2025
2025
|
height: 76px;
|
|
2026
|
-
`,
|
|
2026
|
+
`,bp=r.h3`
|
|
2027
2027
|
margin: 0;
|
|
2028
2028
|
font-weight: 700;
|
|
2029
2029
|
font-size: 20px;
|
|
@@ -2035,7 +2035,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2035
2035
|
font-size: 16px;
|
|
2036
2036
|
line-height: 1.334;
|
|
2037
2037
|
color: ${me.text2};
|
|
2038
|
-
`,
|
|
2038
|
+
`,yp=r.div`
|
|
2039
2039
|
display: flex;
|
|
2040
2040
|
align-items: center;
|
|
2041
2041
|
gap: 12px;
|
|
@@ -2064,7 +2064,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2064
2064
|
outline: 2px solid ${me.accent};
|
|
2065
2065
|
outline-offset: 2px;
|
|
2066
2066
|
}
|
|
2067
|
-
`,
|
|
2067
|
+
`,wp=r.button`
|
|
2068
2068
|
${Sa};
|
|
2069
2069
|
border: 0.5px solid ${me.text};
|
|
2070
2070
|
background: ${me.white};
|
|
@@ -2073,7 +2073,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2073
2073
|
&:hover {
|
|
2074
2074
|
background: ${me.panel};
|
|
2075
2075
|
}
|
|
2076
|
-
`,
|
|
2076
|
+
`,vp=r.a`
|
|
2077
2077
|
${Sa};
|
|
2078
2078
|
border: 0;
|
|
2079
2079
|
background: ${me.dclRed};
|
|
@@ -2083,7 +2083,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2083
2083
|
&:hover {
|
|
2084
2084
|
filter: brightness(1.08);
|
|
2085
2085
|
}
|
|
2086
|
-
`,
|
|
2086
|
+
`,jp=r.span`
|
|
2087
2087
|
flex: none;
|
|
2088
2088
|
display: grid;
|
|
2089
2089
|
place-items: center;
|
|
@@ -2094,12 +2094,12 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2094
2094
|
width: 100%;
|
|
2095
2095
|
height: 100%;
|
|
2096
2096
|
}
|
|
2097
|
-
`;function
|
|
2097
|
+
`;function kp(t,s){return`${rt.marketplaceUrl}/contracts/${t}/tokens/${s}`}function $p(t,s){return`${rt.marketplaceUrl}/contracts/${t}/items/${s}`}function br(t){const{contractAddress:s,onClose:l}=t,o=t.variant==="buy",d=t.variant==="buy"?t.itemId:null,u=t.variant==="buy"?null:t.tokenId,x=t.variant==="buy"?$p(s,t.itemId):kp(s,t.tokenId),f=c.useRef(null),m=c.useRef(l);return m.current=l,c.useEffect(()=>{var h;(h=f.current)==null||h.focus();function $(g){g.key==="Escape"&&m.current()}return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[]),e.jsx(up,{role:"presentation",onClick:l,children:e.jsxs(pp,{ref:f,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":n("marketplaceRedirect.title"),"data-testid":"marketplace-redirect-modal",onClick:$=>$.stopPropagation(),children:[e.jsxs(hp,{children:[e.jsx(xp,{children:n("marketplaceRedirect.title")}),e.jsx(fp,{onClick:l,"aria-label":n("marketplaceRedirect.close"),children:e.jsx(P,{name:"close",className:"ico"})})]}),e.jsxs(mp,{children:[e.jsx(gp,{src:dp,alt:"","aria-hidden":!0}),e.jsx(bp,{children:n("marketplaceRedirect.heading")}),e.jsx(gr,{children:o?n("marketplaceRedirect.buyBody"):n("marketplaceRedirect.body")}),o?e.jsx(gr,{children:n("marketplaceRedirect.buyCurrencyNote")}):null]}),e.jsxs(yp,{children:[e.jsx(wp,{onClick:l,"data-testid":"marketplace-redirect-cancel",children:n("marketplaceRedirect.cancel")}),e.jsxs(vp,{href:x,target:"_blank",rel:"noreferrer","data-testid":"marketplace-redirect-continue",onClick:()=>Z("Shop Redirected To Marketplace",{direction:o?"buy":"resell",contract_address:s,item_id:d,token_id:u}),children:[n("marketplaceRedirect.continue"),e.jsx(jp,{"aria-hidden":!0,children:e.jsx(P,{name:"view-all-arrow",className:"ico"})})]})]})]})})}function Hn(){return rt.shopServerUrl||null}function Aa(){return!!Hn()}async function Cp(t,s,l){const o=Hn();if(!o)return{subscribed:!1};const d=new URLSearchParams({contractAddress:t,itemId:s}),u=`${o}/notify-requests?${d.toString()}`,x=await Zr(u,{method:"GET",identity:l,metadata:{}});if(!x.ok)throw new Error(`getNotifyRequest ${x.status}`);return Sp(x,"getNotifyRequest")}async function Ip(t,s){const l=Hn();if(!l)throw new Error("createNotifyRequest: no shop-server host configured");const o=`${l}/notify-requests`,d=await Zr(o,{method:"POST",identity:s,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!d.ok)throw new Error(`createNotifyRequest ${d.status}: ${await d.text()}`);const u=await d.text();if(u.trim()&&!Ap(u))throw new Error("createNotifyRequest: response was not JSON")}async function Sp(t,s){try{return await t.json()}catch{throw new Error(`${s}: response was not JSON`)}}function Ap(t){try{return JSON.parse(t),!0}catch{return!1}}const{colors:Me,radius:Ma}=i,Ra=gt`
|
|
2098
2098
|
display: flex;
|
|
2099
2099
|
flex-direction: column;
|
|
2100
2100
|
gap: 8px;
|
|
2101
2101
|
width: 100%;
|
|
2102
|
-
`,
|
|
2102
|
+
`,Mp=r.form`
|
|
2103
2103
|
${Ra};
|
|
2104
2104
|
`,yr=r.div`
|
|
2105
2105
|
${Ra};
|
|
@@ -2112,14 +2112,14 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2112
2112
|
border-radius: 16px;
|
|
2113
2113
|
background: #c1d8c9;
|
|
2114
2114
|
}
|
|
2115
|
-
`,
|
|
2115
|
+
`,Rp=r.label`
|
|
2116
2116
|
font-size: 14px;
|
|
2117
2117
|
color: ${Me.softWhite};
|
|
2118
|
-
`,
|
|
2118
|
+
`,Pp=r.div`
|
|
2119
2119
|
display: flex;
|
|
2120
2120
|
align-items: stretch;
|
|
2121
2121
|
gap: 8px;
|
|
2122
|
-
`,
|
|
2122
|
+
`,Lp=r.input`
|
|
2123
2123
|
flex: 1;
|
|
2124
2124
|
min-width: 0;
|
|
2125
2125
|
height: 42px;
|
|
@@ -2165,7 +2165,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2165
2165
|
opacity: 0.5;
|
|
2166
2166
|
cursor: default;
|
|
2167
2167
|
}
|
|
2168
|
-
`,
|
|
2168
|
+
`,Ep=r.span`
|
|
2169
2169
|
display: inline-flex;
|
|
2170
2170
|
align-items: center;
|
|
2171
2171
|
justify-content: center;
|
|
@@ -2175,23 +2175,23 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2175
2175
|
border-radius: 50%;
|
|
2176
2176
|
background: #34ce76;
|
|
2177
2177
|
color: ${Me.white};
|
|
2178
|
-
`,
|
|
2178
|
+
`,Fp=r.span`
|
|
2179
2179
|
font-size: 16px;
|
|
2180
2180
|
line-height: 1.5;
|
|
2181
2181
|
color: ${Me.text2};
|
|
2182
|
-
`;function vr(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.trim())}function
|
|
2182
|
+
`;function vr(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.trim())}function Tp({item:t}){const s=at(S=>S.session),l=at(S=>S.signIn),[o,d]=c.useState(""),[u,x]=c.useState(!1),[f,m]=c.useState(!1),[$,h]=c.useState(null),g=Aa(),y=g&&!!s&&!!t.contractAddress&&!!t.itemId,{data:k}=se({queryKey:["notify-request",t.contractAddress,t.itemId,s==null?void 0:s.address],enabled:y,queryFn:()=>Cp(t.contractAddress,t.itemId,s.identity)});c.useEffect(()=>{k!=null&&k.email&&d(S=>S||k.email)},[k==null?void 0:k.email]),c.useEffect(()=>{if(!s||!g)return;let S=!1;return Ns().then(q=>{!S&&q&&d(M=>M||q)}),()=>{S=!0}},[g,s]);const I=f||!!(k!=null&&k.subscribed);async function C(S){if(S.preventDefault(),!(!s||!t.itemId||!vr(o)||u)){x(!0),h(null);try{await Ip({contractAddress:t.contractAddress,itemId:t.itemId,chainId:t.chainId,email:o.trim()},s.identity),m(!0),Z("Shop Requested Notify",{item_id:t.itemId,contract_address:t.contractAddress})}catch(q){pe(q,{flow:"notify-me",contractAddress:t.contractAddress,itemId:t.itemId}),h(n("notifyMe.error"))}finally{x(!1)}}}return g?s?I?e.jsxs(yr,{"data-done":!0,"data-testid":"notify-subscribed",children:[e.jsx(Ep,{"aria-hidden":!0,children:e.jsx(P,{name:"check",size:12})}),e.jsx(Fp,{children:n("notifyMe.subscribedBody")})]}):e.jsxs(Mp,{onSubmit:S=>void C(S),"data-testid":"notify",children:[e.jsx(Rp,{htmlFor:"notify-email",children:n("notifyMe.label")}),e.jsxs(Pp,{children:[e.jsx(Lp,{id:"notify-email",type:"email",inputMode:"email",autoComplete:"email",placeholder:n("notifyMe.placeholder"),value:o,onChange:S=>d(S.target.value),"data-testid":"notify-email"}),e.jsx(wr,{type:"submit",disabled:!vr(o)||u,"data-testid":"notify-submit",children:u?n("notifyMe.working"):n("notifyMe.cta")})]}),e.jsx(Qe,{message:$})]}):e.jsx(yr,{"data-testid":"notify",children:e.jsx(wr,{type:"button","data-full":!0,onClick:l,"data-testid":"notify-signin",children:n("notifyMe.signInCta")})}):null}const zp=r.div`
|
|
2183
2183
|
display: flex;
|
|
2184
2184
|
flex-direction: column;
|
|
2185
2185
|
gap: 4px;
|
|
2186
2186
|
width: 100%;
|
|
2187
2187
|
font-family: ${i.font.sans};
|
|
2188
|
-
`,
|
|
2188
|
+
`,Np=r.div`
|
|
2189
2189
|
display: flex;
|
|
2190
2190
|
align-items: flex-start;
|
|
2191
2191
|
justify-content: space-between;
|
|
2192
2192
|
gap: 12px;
|
|
2193
2193
|
font-size: 12px;
|
|
2194
|
-
`,
|
|
2194
|
+
`,Bp=r.span`
|
|
2195
2195
|
font-weight: 600;
|
|
2196
2196
|
line-height: 1.57;
|
|
2197
2197
|
color: ${i.colors.muted2};
|
|
@@ -2207,7 +2207,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2207
2207
|
color: ${i.colors.softWhite};
|
|
2208
2208
|
text-transform: lowercase;
|
|
2209
2209
|
white-space: nowrap;
|
|
2210
|
-
`,
|
|
2210
|
+
`,_p=r.div`
|
|
2211
2211
|
position: relative;
|
|
2212
2212
|
width: 100%;
|
|
2213
2213
|
height: 10px;
|
|
@@ -2215,7 +2215,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2215
2215
|
background: rgba(255, 255, 255, 0.2);
|
|
2216
2216
|
/* The fill is a child with its own radius; clipping here keeps a full bar's ends round. */
|
|
2217
2217
|
overflow: hidden;
|
|
2218
|
-
`,
|
|
2218
|
+
`,Dp=r.div`
|
|
2219
2219
|
position: absolute;
|
|
2220
2220
|
left: 0;
|
|
2221
2221
|
top: 0;
|
|
@@ -2227,7 +2227,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2227
2227
|
@media (prefers-reduced-motion: reduce) {
|
|
2228
2228
|
transition: none;
|
|
2229
2229
|
}
|
|
2230
|
-
`;function
|
|
2230
|
+
`;function Wp({claimed:t,total:s,className:l,testId:o}){if(!Number.isFinite(t)||!Number.isFinite(s)||s<=0)return null;const d=Math.min(s,Math.max(0,t)),u=Math.round(d/s*100);return e.jsxs(zp,{className:l,"data-testid":o,children:[e.jsxs(Np,{children:[e.jsx(Bp,{children:n("offerStock.label")}),e.jsx(jr,{children:n("offerStock.claimed",{claimed:d,total:s})})]}),e.jsx(_p,{role:"progressbar","aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":d,"aria-label":n("offerStock.claimed",{claimed:d,total:s}),children:e.jsx(Dp,{style:{width:`${u}%`}})}),e.jsx(jr,{children:n("offerStock.percent",{pct:u})})]})}const qp=new Map(Object.entries(Bs).flatMap(([t,s])=>s.length===1?[[s[0],t]]:[])),ft="/items";function Op(t){return t?`${ft}?rarities=${encodeURIComponent(t.toLowerCase())}`:null}function Kp(t){const s=t.wearableCategory;if(s){const l=qp.get(s);return l?`${ft}?category=wearable&subCategory=${encodeURIComponent(l)}`:`${ft}?category=wearable`}return t.category==="emote"?`${ft}?category=emote`:t.category==="wearable"?`${ft}?category=wearable`:null}function Hp(){return`${ft}?smart=true`}const Up=r(_s)`
|
|
2231
2231
|
display: flex;
|
|
2232
2232
|
flex-direction: column;
|
|
2233
2233
|
overflow: hidden;
|
|
@@ -2253,22 +2253,22 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2253
2253
|
object-fit: cover;
|
|
2254
2254
|
display: block;
|
|
2255
2255
|
}
|
|
2256
|
-
`;function
|
|
2256
|
+
`;function Qp({contractAddress:t,name:s,items:l,className:o}){const d=st();if(!t||!s)return null;const u=(l??[]).map(m=>m.thumbnail).filter(m=>!!m).slice(0,4),x=u.slice(0,2),f=u.slice(2,4);return e.jsxs(Ds,{as:"button","data-link":!0,className:o,"data-testid":"creator",onClick:m=>{m.stopPropagation(),d(`/collection/${t}`)},children:[u.length>0?e.jsxs(Up,{as:"span","data-avatar":!0,"data-testid":"creator-ava","aria-hidden":!0,children:[e.jsx("span",{"data-collage-row":!0,"data-full":f.length===0||void 0,children:x.map((m,$)=>e.jsx("img",{src:m,alt:""},$))}),f.length>0?e.jsx("span",{"data-collage-row":!0,children:f.map((m,$)=>e.jsx("img",{src:m,alt:""},$))}):null]}):null,e.jsx(Ws,{"data-testid":"creator-name",children:Xt(s)})]})}const{colors:b,radius:Ge,media:de,font:Vp,gradients:Gp}=i,Yp=r.div`
|
|
2257
2257
|
max-width: 1721px;
|
|
2258
2258
|
margin: 0 auto;
|
|
2259
2259
|
|
|
2260
2260
|
${de.maxWidth("lg")} {
|
|
2261
2261
|
padding-bottom: 88px;
|
|
2262
2262
|
}
|
|
2263
|
-
`,
|
|
2263
|
+
`,Jp=r.nav`
|
|
2264
2264
|
display: flex;
|
|
2265
2265
|
align-items: center;
|
|
2266
2266
|
gap: 8px;
|
|
2267
2267
|
font-size: 13px;
|
|
2268
2268
|
color: ${b.gray4};
|
|
2269
2269
|
margin-bottom: 24px;
|
|
2270
|
-
${
|
|
2271
|
-
`,
|
|
2270
|
+
${ed};
|
|
2271
|
+
`,Xp=r.button`
|
|
2272
2272
|
background: none;
|
|
2273
2273
|
border: 0;
|
|
2274
2274
|
padding: 0;
|
|
@@ -2278,12 +2278,12 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2278
2278
|
&:hover {
|
|
2279
2279
|
color: ${b.white};
|
|
2280
2280
|
}
|
|
2281
|
-
`,Xp=r.span`
|
|
2282
|
-
color: ${b.muted2};
|
|
2283
2281
|
`,Zp=r.span`
|
|
2282
|
+
color: ${b.muted2};
|
|
2283
|
+
`,eh=r.span`
|
|
2284
2284
|
color: ${b.softWhite};
|
|
2285
2285
|
font-weight: 600;
|
|
2286
|
-
`,
|
|
2286
|
+
`,th=r.div`
|
|
2287
2287
|
position: relative;
|
|
2288
2288
|
/* Confines the glow's negative z-index, which would otherwise escape to the root stacking context. */
|
|
2289
2289
|
isolation: isolate;
|
|
@@ -2328,7 +2328,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2328
2328
|
display: none;
|
|
2329
2329
|
}
|
|
2330
2330
|
}
|
|
2331
|
-
`,
|
|
2331
|
+
`,nh=r.div`
|
|
2332
2332
|
position: relative;
|
|
2333
2333
|
aspect-ratio: 1045 / 752;
|
|
2334
2334
|
border-radius: ${Ge.banner};
|
|
@@ -2482,17 +2482,17 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2482
2482
|
background: ${b.white};
|
|
2483
2483
|
}
|
|
2484
2484
|
}
|
|
2485
|
-
`,
|
|
2485
|
+
`,ih=r.div``,rh=r.span`
|
|
2486
2486
|
position: absolute;
|
|
2487
2487
|
inset: 0;
|
|
2488
2488
|
width: 100%;
|
|
2489
2489
|
height: 100%;
|
|
2490
2490
|
border-radius: inherit;
|
|
2491
|
-
`,
|
|
2491
|
+
`,ah=r.div`
|
|
2492
2492
|
display: flex;
|
|
2493
2493
|
flex-direction: column;
|
|
2494
2494
|
gap: 0;
|
|
2495
|
-
`,
|
|
2495
|
+
`,sh=r.div`
|
|
2496
2496
|
display: flex;
|
|
2497
2497
|
align-items: flex-start;
|
|
2498
2498
|
justify-content: space-between;
|
|
@@ -2501,7 +2501,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2501
2501
|
${de.maxWidth("lg")} {
|
|
2502
2502
|
order: 0;
|
|
2503
2503
|
}
|
|
2504
|
-
`,
|
|
2504
|
+
`,oh=r.h1`
|
|
2505
2505
|
font-size: 28px;
|
|
2506
2506
|
font-weight: 600;
|
|
2507
2507
|
line-height: 34px;
|
|
@@ -2554,7 +2554,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2554
2554
|
${de.maxWidth("lg")} {
|
|
2555
2555
|
color: ${b.text};
|
|
2556
2556
|
}
|
|
2557
|
-
`,
|
|
2557
|
+
`,lh=r.button`
|
|
2558
2558
|
display: inline-flex;
|
|
2559
2559
|
align-items: center;
|
|
2560
2560
|
gap: 8px;
|
|
@@ -2586,7 +2586,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2586
2586
|
text-transform: uppercase;
|
|
2587
2587
|
letter-spacing: 0;
|
|
2588
2588
|
color: ${b.gray4};
|
|
2589
|
-
`,
|
|
2589
|
+
`,dh=r.div`
|
|
2590
2590
|
display: flex;
|
|
2591
2591
|
align-items: center;
|
|
2592
2592
|
gap: 8px;
|
|
@@ -2645,12 +2645,12 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2645
2645
|
&[data-variant='rarity']:focus-visible {
|
|
2646
2646
|
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
|
|
2647
2647
|
}
|
|
2648
|
-
`,
|
|
2648
|
+
`,ch=r.div`
|
|
2649
2649
|
display: flex;
|
|
2650
2650
|
flex-direction: column;
|
|
2651
2651
|
align-items: flex-start;
|
|
2652
2652
|
gap: 8px;
|
|
2653
|
-
`,Nn=r(
|
|
2653
|
+
`,Nn=r(ch)`
|
|
2654
2654
|
gap: 11px;
|
|
2655
2655
|
`,Cr=r.p`
|
|
2656
2656
|
margin: 0;
|
|
@@ -2666,7 +2666,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2666
2666
|
-webkit-line-clamp: unset;
|
|
2667
2667
|
overflow: visible;
|
|
2668
2668
|
}
|
|
2669
|
-
`,
|
|
2669
|
+
`,uh=r.button`
|
|
2670
2670
|
font-size: 13px;
|
|
2671
2671
|
align-self: flex-start;
|
|
2672
2672
|
`,Pa=gt`
|
|
@@ -2726,9 +2726,9 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2726
2726
|
&[data-link]:hover [data-testid='creator-name'] {
|
|
2727
2727
|
color: ${b.gray4};
|
|
2728
2728
|
}
|
|
2729
|
-
`,
|
|
2729
|
+
`,ph=r(Os)`
|
|
2730
2730
|
${Fa}
|
|
2731
|
-
`,
|
|
2731
|
+
`,hh=r(Qp)`
|
|
2732
2732
|
${Fa}
|
|
2733
2733
|
`,Ta=r.hr`
|
|
2734
2734
|
border: 0;
|
|
@@ -2742,9 +2742,9 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2742
2742
|
order: 5;
|
|
2743
2743
|
margin-top: 16px;
|
|
2744
2744
|
}
|
|
2745
|
-
`,
|
|
2745
|
+
`,xh=r(qs)`
|
|
2746
2746
|
margin-bottom: 12px;
|
|
2747
|
-
`,
|
|
2747
|
+
`,fh=r.div`
|
|
2748
2748
|
margin-top: 16px;
|
|
2749
2749
|
/* The design's Pricing frame stacks its rows 16px apart; without it the stock scale sat against the
|
|
2750
2750
|
underside of the price and read as part of it. */
|
|
@@ -2756,12 +2756,12 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2756
2756
|
order: 4;
|
|
2757
2757
|
margin-top: 16px;
|
|
2758
2758
|
}
|
|
2759
|
-
`,
|
|
2759
|
+
`,mh=r.div`
|
|
2760
2760
|
display: flex;
|
|
2761
2761
|
align-items: flex-start;
|
|
2762
2762
|
gap: 16px;
|
|
2763
2763
|
width: 100%;
|
|
2764
|
-
`,
|
|
2764
|
+
`,gh=r.div`
|
|
2765
2765
|
flex: 1 1 auto;
|
|
2766
2766
|
min-width: 0;
|
|
2767
2767
|
display: flex;
|
|
@@ -2827,7 +2827,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2827
2827
|
`;const It=r.span`
|
|
2828
2828
|
font-size: 30px;
|
|
2829
2829
|
line-height: 1;
|
|
2830
|
-
`,
|
|
2830
|
+
`,bh=r.span`
|
|
2831
2831
|
display: inline-flex;
|
|
2832
2832
|
color: ${b.muted2};
|
|
2833
2833
|
cursor: help;
|
|
@@ -2837,12 +2837,12 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2837
2837
|
outline-offset: 2px;
|
|
2838
2838
|
border-radius: ${Ge.chip};
|
|
2839
2839
|
}
|
|
2840
|
-
`,
|
|
2840
|
+
`,yh=r.span`
|
|
2841
2841
|
font-size: 24px;
|
|
2842
2842
|
font-weight: 700;
|
|
2843
2843
|
color: ${b.softWhite};
|
|
2844
2844
|
margin-right: -2px;
|
|
2845
|
-
`,
|
|
2845
|
+
`,wh=r.div`
|
|
2846
2846
|
font-size: 13px;
|
|
2847
2847
|
margin-top: 6px;
|
|
2848
2848
|
color: ${b.gray4};
|
|
@@ -2852,11 +2852,11 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2852
2852
|
align-items: center;
|
|
2853
2853
|
flex-wrap: wrap;
|
|
2854
2854
|
gap: 8px 12px;
|
|
2855
|
-
`;const
|
|
2855
|
+
`;const vh=r.div`
|
|
2856
2856
|
font-size: 13px;
|
|
2857
2857
|
font-weight: 600;
|
|
2858
2858
|
color: ${b.dclRed};
|
|
2859
|
-
`,
|
|
2859
|
+
`,jh=r.span`
|
|
2860
2860
|
display: inline-flex;
|
|
2861
2861
|
align-items: center;
|
|
2862
2862
|
color: ${b.muted2};
|
|
@@ -2874,7 +2874,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2874
2874
|
text-transform: uppercase;
|
|
2875
2875
|
border-radius: 6px;
|
|
2876
2876
|
padding: 4px 10px;
|
|
2877
|
-
`;r(
|
|
2877
|
+
`;r(No)`
|
|
2878
2878
|
display: inline-flex;
|
|
2879
2879
|
align-items: center;
|
|
2880
2880
|
gap: 5px;
|
|
@@ -2885,7 +2885,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2885
2885
|
border-radius: 6px;
|
|
2886
2886
|
padding: 4px 10px;
|
|
2887
2887
|
white-space: nowrap;
|
|
2888
|
-
`;const
|
|
2888
|
+
`;const kh=r.div`
|
|
2889
2889
|
display: flex;
|
|
2890
2890
|
flex-direction: column;
|
|
2891
2891
|
gap: 12px;
|
|
@@ -2933,7 +2933,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2933
2933
|
cart's CHECKOUT and the credits CTA. This read as a flat #fb5c19 for a while — that colour was
|
|
2934
2934
|
sampled off the flattened render rather than the node's fill. */
|
|
2935
2935
|
&& {
|
|
2936
|
-
background: ${
|
|
2936
|
+
background: ${Gp.buyBtn};
|
|
2937
2937
|
}
|
|
2938
2938
|
&&::before {
|
|
2939
2939
|
content: none;
|
|
@@ -2948,7 +2948,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2948
2948
|
width: auto;
|
|
2949
2949
|
}
|
|
2950
2950
|
}
|
|
2951
|
-
|
|
2951
|
+
`,$h=r(Ve)`
|
|
2952
2952
|
${en};
|
|
2953
2953
|
&& {
|
|
2954
2954
|
background: ${b.blackBtn};
|
|
@@ -2989,7 +2989,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
2989
2989
|
opacity: 0.5;
|
|
2990
2990
|
cursor: default;
|
|
2991
2991
|
}
|
|
2992
|
-
|
|
2992
|
+
`,Ch=r(Ve)`
|
|
2993
2993
|
${en};
|
|
2994
2994
|
&& {
|
|
2995
2995
|
background: rgba(255, 255, 255, 0.2);
|
|
@@ -3076,7 +3076,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3076
3076
|
display: none;
|
|
3077
3077
|
}
|
|
3078
3078
|
}
|
|
3079
|
-
`,
|
|
3079
|
+
`,Ih=r.p`
|
|
3080
3080
|
margin: 12px 0 0;
|
|
3081
3081
|
font-size: 13px;
|
|
3082
3082
|
color: ${b.gray4};
|
|
@@ -3094,7 +3094,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3094
3094
|
color: ${b.accent};
|
|
3095
3095
|
font-weight: 600;
|
|
3096
3096
|
}
|
|
3097
|
-
`;const
|
|
3097
|
+
`;const Sh=r.div`
|
|
3098
3098
|
max-width: 1721px;
|
|
3099
3099
|
margin: 0 auto;
|
|
3100
3100
|
min-height: 46vh;
|
|
@@ -3105,16 +3105,16 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3105
3105
|
text-align: center;
|
|
3106
3106
|
gap: 14px;
|
|
3107
3107
|
color: ${b.softWhite};
|
|
3108
|
-
`,
|
|
3108
|
+
`,Ah=r.p`
|
|
3109
3109
|
margin: 0;
|
|
3110
3110
|
color: ${b.gray4};
|
|
3111
|
-
`,
|
|
3111
|
+
`,Mh=r(Ve)`
|
|
3112
3112
|
margin-top: 6px;
|
|
3113
|
-
`,
|
|
3113
|
+
`,Rh=r(P)`
|
|
3114
3114
|
opacity: 0.4;
|
|
3115
|
-
`,
|
|
3115
|
+
`,Ph=r.h1`
|
|
3116
3116
|
font-size: 22px;
|
|
3117
|
-
`,
|
|
3117
|
+
`,Lh=r.div`
|
|
3118
3118
|
display: flex;
|
|
3119
3119
|
flex-direction: column;
|
|
3120
3120
|
`,Pr=r.span`
|
|
@@ -3122,13 +3122,13 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3122
3122
|
height: 15px;
|
|
3123
3123
|
width: 84px;
|
|
3124
3124
|
border-radius: 4px;
|
|
3125
|
-
`,
|
|
3125
|
+
`,Eh=r.div`
|
|
3126
3126
|
display: flex;
|
|
3127
3127
|
flex-direction: column;
|
|
3128
3128
|
align-self: stretch;
|
|
3129
3129
|
gap: 16px;
|
|
3130
3130
|
padding: 8px 0;
|
|
3131
|
-
`,
|
|
3131
|
+
`,Fh=r.span`
|
|
3132
3132
|
display: inline-flex;
|
|
3133
3133
|
align-items: center;
|
|
3134
3134
|
height: 48px;
|
|
@@ -3152,12 +3152,12 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3152
3152
|
border-radius: 6px;
|
|
3153
3153
|
background: ${b.media};
|
|
3154
3154
|
}
|
|
3155
|
-
`,
|
|
3155
|
+
`,Th=r.span`
|
|
3156
3156
|
height: 34px;
|
|
3157
3157
|
width: 70%;
|
|
3158
3158
|
margin: 3px 0;
|
|
3159
3159
|
border-radius: 8px;
|
|
3160
|
-
`,
|
|
3160
|
+
`,zh=r.div`
|
|
3161
3161
|
display: flex;
|
|
3162
3162
|
gap: 8px;
|
|
3163
3163
|
/* Same as Chips above, so the row does not move when the real chips arrive. */
|
|
@@ -3174,13 +3174,13 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3174
3174
|
&[data-short] {
|
|
3175
3175
|
width: 55%;
|
|
3176
3176
|
}
|
|
3177
|
-
`,
|
|
3177
|
+
`,Nh=r.span`
|
|
3178
3178
|
display: block;
|
|
3179
3179
|
height: 30px;
|
|
3180
3180
|
width: 40%;
|
|
3181
3181
|
margin: 16px 0 13px;
|
|
3182
3182
|
border-radius: 8px;
|
|
3183
|
-
`,
|
|
3183
|
+
`,Bh=r.span`
|
|
3184
3184
|
display: block;
|
|
3185
3185
|
height: 42px;
|
|
3186
3186
|
width: 100%;
|
|
@@ -3199,7 +3199,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3199
3199
|
`,Fn=r(Re)`
|
|
3200
3200
|
width: 20px;
|
|
3201
3201
|
height: 20px;
|
|
3202
|
-
`,
|
|
3202
|
+
`,_h=r.div`
|
|
3203
3203
|
display: flex;
|
|
3204
3204
|
align-items: center;
|
|
3205
3205
|
justify-content: space-between;
|
|
@@ -3208,22 +3208,22 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3208
3208
|
margin: 16px 0;
|
|
3209
3209
|
border-radius: ${Ge.btn};
|
|
3210
3210
|
background: rgba(22, 21, 24, 0.55);
|
|
3211
|
-
`,
|
|
3211
|
+
`,Dh=r.span`
|
|
3212
3212
|
display: flex;
|
|
3213
3213
|
align-items: center;
|
|
3214
3214
|
gap: 8px;
|
|
3215
3215
|
font-size: 14px;
|
|
3216
3216
|
line-height: 14px;
|
|
3217
3217
|
color: ${b.softWhite};
|
|
3218
|
-
`,
|
|
3218
|
+
`,Wh=r(P)`
|
|
3219
3219
|
width: 20px;
|
|
3220
3220
|
height: 20px;
|
|
3221
3221
|
color: ${b.softWhite};
|
|
3222
|
-
`,
|
|
3222
|
+
`,qh=r(P)`
|
|
3223
3223
|
width: 24px;
|
|
3224
3224
|
height: 24px;
|
|
3225
3225
|
color: ${b.white};
|
|
3226
|
-
`,
|
|
3226
|
+
`,Oh=r.div`
|
|
3227
3227
|
display: flex;
|
|
3228
3228
|
align-items: center;
|
|
3229
3229
|
justify-content: space-between;
|
|
@@ -3234,7 +3234,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3234
3234
|
&[data-centered] {
|
|
3235
3235
|
justify-content: center;
|
|
3236
3236
|
}
|
|
3237
|
-
`,
|
|
3237
|
+
`,Kh=r.span`
|
|
3238
3238
|
display: flex;
|
|
3239
3239
|
align-items: center;
|
|
3240
3240
|
gap: 2px;
|
|
@@ -3247,7 +3247,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3247
3247
|
height: 20px;
|
|
3248
3248
|
color: ${b.gray4};
|
|
3249
3249
|
}
|
|
3250
|
-
`,
|
|
3250
|
+
`,Hh=r.span`
|
|
3251
3251
|
font-size: 16px;
|
|
3252
3252
|
font-weight: 700;
|
|
3253
3253
|
padding-left: 2px;
|
|
@@ -3256,7 +3256,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3256
3256
|
background: none;
|
|
3257
3257
|
padding: 0;
|
|
3258
3258
|
cursor: pointer;
|
|
3259
|
-
font-family: ${
|
|
3259
|
+
font-family: ${Vp.sans};
|
|
3260
3260
|
font-size: 13px;
|
|
3261
3261
|
font-weight: 600;
|
|
3262
3262
|
letter-spacing: 0.46px;
|
|
@@ -3272,7 +3272,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3272
3272
|
outline-offset: 2px;
|
|
3273
3273
|
border-radius: ${Ge.chip};
|
|
3274
3274
|
}
|
|
3275
|
-
`,
|
|
3275
|
+
`,Uh=r(_n)`
|
|
3276
3276
|
width: 100%;
|
|
3277
3277
|
height: 40px;
|
|
3278
3278
|
text-align: center;
|
|
@@ -3285,7 +3285,7 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3285
3285
|
color: ${b.softWhite};
|
|
3286
3286
|
background: ${b.glass};
|
|
3287
3287
|
}
|
|
3288
|
-
`,
|
|
3288
|
+
`,Qh=r.div`
|
|
3289
3289
|
display: flex;
|
|
3290
3290
|
flex-direction: column;
|
|
3291
3291
|
gap: 16px;
|
|
@@ -3341,14 +3341,14 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3341
3341
|
font-weight: 700;
|
|
3342
3342
|
color: ${b.text};
|
|
3343
3343
|
}
|
|
3344
|
-
`,
|
|
3344
|
+
`,Vh=r.span`
|
|
3345
3345
|
font-size: 14px;
|
|
3346
3346
|
font-weight: 600;
|
|
3347
3347
|
|
|
3348
3348
|
[data-variant='original'] & {
|
|
3349
3349
|
color: ${b.muted2};
|
|
3350
3350
|
}
|
|
3351
|
-
`,
|
|
3351
|
+
`,Gh=r.span`
|
|
3352
3352
|
font-size: 14px;
|
|
3353
3353
|
font-weight: 600;
|
|
3354
3354
|
color: ${b.text2};
|
|
@@ -3357,12 +3357,12 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3357
3357
|
width: 12px;
|
|
3358
3358
|
height: 12px;
|
|
3359
3359
|
color: ${b.muted2};
|
|
3360
|
-
`,
|
|
3360
|
+
`,Yh=r.div`
|
|
3361
3361
|
display: flex;
|
|
3362
3362
|
flex-direction: column;
|
|
3363
3363
|
gap: 12px;
|
|
3364
3364
|
width: 100%;
|
|
3365
|
-
`,
|
|
3365
|
+
`,Jh=r.div`
|
|
3366
3366
|
display: flex;
|
|
3367
3367
|
justify-content: center;
|
|
3368
3368
|
`,tn=gt`
|
|
@@ -3374,14 +3374,14 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3374
3374
|
@media (prefers-reduced-motion: reduce) {
|
|
3375
3375
|
animation: none;
|
|
3376
3376
|
}
|
|
3377
|
-
`,
|
|
3377
|
+
`,Xh=r.div`
|
|
3378
3378
|
display: flex;
|
|
3379
3379
|
flex-direction: column;
|
|
3380
3380
|
gap: 12px;
|
|
3381
3381
|
width: 100%;
|
|
3382
3382
|
/* Reserve the divider→CTA rhythm so the block is the same height loading vs loaded. */
|
|
3383
3383
|
padding-top: 4px;
|
|
3384
|
-
`,
|
|
3384
|
+
`,Zh=r.span`
|
|
3385
3385
|
${tn};
|
|
3386
3386
|
width: 120px;
|
|
3387
3387
|
height: 30px;
|
|
@@ -3407,5 +3407,5 @@ import{j as e,b as st,r as c,L as qr,e as Za,a as Or}from"./react-BmPeg6sG.js";i
|
|
|
3407
3407
|
width: 96px;
|
|
3408
3408
|
height: 16px;
|
|
3409
3409
|
border-radius: 6px;
|
|
3410
|
-
`;function Zh(t){return Object.values(Ae.Rarity).includes(t)}function ex(t){return t==="male"?n("itemDetail.genderMale"):t==="female"?n("itemDetail.genderFemale"):t==="unisex"?n("itemDetail.genderUnisex"):null}function Gt(t){return t.wearableCategory?t.wearableCategory.replace(/_/g," "):t.category==="emote"?n("itemDetail.categoryEmote"):n("itemDetail.categoryWearable")}const Wr=8;function Lx(){const{pathname:t}=Or();return e.jsx(tx,{},t)}function tx(){var Ii,Si,Ai;const{contractAddress:t,itemId:s,tokenId:l}=Za(),o=hn(t),d=Iu(o),u=hn(s),x=hn(l),f=!!x,m=u??nd(x)??null,$=Or(),h=$.state,g=st(),y=!!(h!=null&&h.market),k=(h==null?void 0:h.marketPriceCredits)??null,I=ot(),C=At(p=>p.add),S=Io(p=>p.spent),W=At(p=>p.items),M=Os(p=>p.toggle),{session:w,signIn:U}=at(),[a,K]=c.useState(()=>{if(h!=null&&h.item){const p={...h.item,tradeId:h.tradeId??h.item.tradeId};return f?{...p,tokenId:x,itemId:p.itemId??m}:{...p,tokenId:void 0,itemId:u??p.itemId}}return{id:`${o}-${x??u}`,name:"",creator:"",contractAddress:o??"",itemId:m,category:"wearable",rarity:"common",network:"MATIC",chainId:rt.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:x??void 0,tradeId:h==null?void 0:h.tradeId}}),[J,A]=c.useState(!1),[T,X]=c.useState(!!(h!=null&&h.resumeBuy));c.useEffect(()=>{h!=null&&h.resumeBuy&&A(!0)},[h==null?void 0:h.resumeBuy]);function V(){const p=a.priceCredits>0?a.priceCredits:null;Z("Shop Started Checkout",{checkout_source:"item_page",cart_size:1,cart_value_credits:p,cart_value_usd:p===null?null:oo(p)}),A(!0)}function oe(){if(w){V();return}y||Ro({type:"item-buy",path:$.pathname}),U()}const ce=c.useRef(!1);c.useEffect(()=>{if(!w||ce.current)return;const p=So("item-buy");!p||p.path!==$.pathname||(ce.current=!0,X(!0),V())},[w]);const ie=c.useMemo(()=>a.contractAddress&&(a.itemId??m)?[`${a.contractAddress.toLowerCase()}-${a.itemId??m}`]:void 0,[a.contractAddress,a.itemId,m]),q=Ks(Wr,{exclude:ie}),N=Hs({enabled:q.enabled,hasSignal:q.hasSignal,isLoading:q.isLoading,isError:q.isError,personalized:(Ii=q.result)==null?void 0:Ii.personalized,rowCount:((Si=q.result)==null?void 0:Si.data.length)??0}),{items:O,isCollectionOnly:v,siblings:re,siblingsFetched:R}=Cu({id:a.id,contractAddress:a.contractAddress,itemId:a.itemId??m,tokenId:a.tokenId,creator:a.creator}),{data:z,isLoading:B}=se({queryKey:["shop-item",a.contractAddress,m],enabled:!y&&!f&&!!a.contractAddress&&!!m,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>co(a.contractAddress,m)}),H=f?void 0:z;c.useEffect(()=>{H&&K(p=>p.tradeId?{...p,tradeId:H.tradeId,priceCredits:H.priceCredits,manaWei:H.manaWei,available:H.available??p.available,acquisition:H.acquisition,wearableCategory:p.wearableCategory??H.wearableCategory}:{...p,...H})},[H]);const[ae,ve]=c.useState(!1),{data:ee=""}=se({queryKey:["item-desc",a.contractAddress,a.itemId],enabled:!!a.contractAddress&&!!a.itemId,staleTime:5*6e4,queryFn:()=>uo(a.contractAddress,a.itemId)}),{data:G,isLoading:te}=se({queryKey:["collection-meta",a.contractAddress],enabled:!!a.contractAddress,staleTime:5*6e4,queryFn:()=>Qr(a.contractAddress)});c.useEffect(()=>{const p=(H==null?void 0:H.creator)||(G==null?void 0:G.creator);p&&K(le=>le.creator?le:{...le,creator:p})},[H,G]);const fe=c.useMemo(()=>{if(!(f||a.name||H||re.length===0))return(m?re.find(p=>p.itemId===m):void 0)??re.find(p=>p.contractAddress===a.contractAddress)},[f,a.name,a.contractAddress,H,re,m]);c.useEffect(()=>{fe&&K(p=>({...fe,tradeId:p.tradeId??fe.tradeId}))},[fe]);const{data:je,isLoading:ke}=se({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(!f&&a.itemId){const p=await po(a.contractAddress,a.itemId);return(p==null?void 0:p.id)??null}return null}}),{data:Y}=se({queryKey:["item-traits",a.contractAddress,m],enabled:!!a.contractAddress&&!!m,staleTime:5*6e4,retry:1,queryFn:()=>ho(a.contractAddress,m)}),lt=(Y==null?void 0:Y.isSmart)??a.isSmart,Pe=(Y==null?void 0:Y.utility)??null,$e=c.useMemo(()=>({...a,wearableCategory:a.wearableCategory??(Y==null?void 0:Y.wearableCategory)??void 0,gender:a.gender??(Y==null?void 0:Y.gender)??null}),[a,Y==null?void 0:Y.wearableCategory,Y==null?void 0:Y.gender]),bt=(Y==null?void 0:Y.urn)??null,{data:Rt}=se({queryKey:["item-vrm",bt],enabled:!!bt&&a.category==="wearable",staleTime:30*6e4,retry:!1,queryFn:()=>xo(bt)}),[nn,Pt]=c.useState(!1),{data:yt}=se({queryKey:["item-video",a.contractAddress,m],enabled:lt&&!!a.contractAddress&&!!m,staleTime:30*6e4,retry:!1,queryFn:()=>Bo(a.contractAddress,m)}),Ce=c.useMemo(()=>a.emoteLoop!==void 0?a:(m?re.find(le=>le.itemId===m):void 0)??a,[a,re,m]),Le=qi(I,a.tradeId)??qi(I,je),rn=a.acquisition==="store"&&(a.available??0)>0,ue=!!Le||rn,dt=Us(),{data:Ee=[]}=se({queryKey:["item-resales",a.contractAddress,a.itemId],enabled:dt&&!y&&!!a.contractAddress&&!!a.itemId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Xr(a.contractAddress,a.itemId)}),Ke=Ee.length>0?Ee[0].priceCredits:null,Ye=f&&a.tokenId?Ee.find(p=>p.tokenId===a.tokenId)??null:null,Ie=c.useMemo(()=>{const p=Ee[0];return p?{...p,name:p.name||a.name,thumbnail:p.thumbnail||a.thumbnail,rarity:p.rarity||a.rarity,category:p.category||a.category,wearableCategory:p.wearableCategory??a.wearableCategory,gender:p.gender??a.gender}:null},[Ee,a]),[Lt,wt]=c.useState(null),[vt,Je]=c.useState(!1),[an,j]=c.useState(!1),[L,F]=c.useState(!1),E=a.manaWei??null,{data:Q}=Jr(y||!!E),ne=E&&Q?Qs(E,Q):null;c.useEffect(()=>{ne!=null&&K(p=>p.priceCredits===ne?p:{...p,priceCredits:ne})},[ne,a.priceCredits]);const D=c.useMemo(()=>{if(!y||!(h!=null&&h.item))return null;const p=h.item;return p.manaWei?{tradeId:p.tradeId??p.id,listingType:"primary",contractAddress:p.contractAddress,itemId:p.itemId??"",name:p.name,thumbnail:p.thumbnail,rarity:p.rarity,category:p.category,wearableCategory:p.wearableCategory??null,creator:p.creator,manaWei:p.manaWei,available:1,network:p.network,chainId:p.chainId,createdAt:0}:null},[y,h==null?void 0:h.item]),xe=y&&k!=null&&!!Q&&!!D,We=Vs({priceCredits:a.priceCredits,compareAtCredits:a.compareAtCredits,saleEndsAt:a.saleEndsAt}),ye=(()=>{var we,ut;if(!We)return null;const p=Ao(S,a.coupon),le=Number(((ut=(we=a.coupon)==null?void 0:we.checks)==null?void 0:ut.uses)??0);return le>0&&p<=le?{claimed:p,total:le}:null})(),Et=(()=>{if(!We||a.saleUnitsLeft==null)return null;const p=ye?ye.total-ye.claimed:1/0;return a.saleUnitsLeft<p?a.saleUnitsLeft:null})(),Fe=c.useMemo(()=>({...a,tradeId:Le,id:Le??a.id}),[a,Le]),sn=W.some(p=>p.id===Fe.id),Ft=!Fe.tokenId,za=((Ai=W.find(p=>p.id===Fe.id))==null?void 0:Ai.quantity)??0,on=Ft&&typeof a.available=="number"&&za>=a.available,{key:Un,faved:Xe}=Gs(a),He=Ys(a),Na=Yr(p=>p.locale),Tt=He===void 0?null:He.toLocaleString(Na),Qn=Xe?n("assetCard.removeFromFavorites"):n("assetCard.addToFavorites"),Vn=He===void 0?Qn:n("itemDetail.favoriteAria",{action:Qn,count:He}),Gn=c.useRef(null);c.useEffect(()=>{!a.name||ke||Gn.current===a.id||(Gn.current=a.id,Z("Shop Viewed Item",{...Js(a),for_sale:ue}),Xs(a))},[a.id,a.name,ke,ue]);const zt=`${o}/${x??u}`,Yn=c.useRef(zt);c.useEffect(()=>{if(Yn.current!==zt){if(Yn.current=zt,h!=null&&h.item){const p={...h.item,tradeId:h.tradeId??h.item.tradeId};K(f?{...p,tokenId:x,itemId:p.itemId??m}:{...p,tokenId:void 0,itemId:u??p.itemId})}typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}},[zt]);function Ba(){!ue||ln||ke||!Ft&&sn||on||C(Fe,"item_detail")}const Ze=Zh(a.rarity)?a.rarity:Ae.Rarity.COMMON,Jn=ex($e.gender),Nt=Zs($e),Xn=eo($e.gender),Zn=qp(a.rarity),ei=Op($e),ti=ue&&We,_a=v?n("itemDetail.moreFromCollection"):n("itemDetail.youMightAlsoLike"),ln=to(a,w==null?void 0:w.address),[Da,ni]=c.useState(!1),[Wa,ii]=c.useState(!1),[qa,ri]=c.useState(!1),[Oa,ai]=c.useState(!1),[jt,kt]=c.useState(null),[Ka,si]=c.useState(!1),[oi,li]=c.useState(!1),di=Yt(w==null?void 0:w.providerType),{data:_,isLoading:Bt}=se({queryKey:["owned-token",a.contractAddress,a.tokenId,w==null?void 0:w.address],enabled:!y&&!!(w!=null&&w.address)&&!!a.contractAddress&&!!a.tokenId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>w?Li(w.address,a.contractAddress,a.tokenId):null});c.useEffect(()=>{_&&K(p=>p.name?{...p,issuedId:p.issuedId??_.issuedId,priceCredits:_.listingPrice??0,tradeId:_.tradeId}:{id:_.id,name:_.name,creator:"",contractAddress:_.contractAddress,itemId:_.itemId,category:_.category,rarity:_.rarity??"common",network:_.network,chainId:_.chainId,thumbnail:_.image,priceCredits:_.listingPrice??0,gender:null,isSmart:!1,tokenId:_.tokenId,issuedId:_.issuedId,tradeId:_.tradeId})},[_]),c.useEffect(()=>{Ye&&K(p=>p.priceCredits===Ye.priceCredits&&p.tradeId?p:{...p,priceCredits:Ye.priceCredits,tradeId:p.tradeId??Ye.tradeId})},[Ye]),c.useEffect(()=>{jt!=null&&_!=null&&_.isOnSale&&_.listingPrice===jt&&kt(null)},[_,jt]);const ci=!y&&!!a.contractAddress&&!!a.tokenId&&!a.name&&!H&&!Bt&&!_,{data:he,isFetched:Ha}=se({queryKey:["public-token",a.contractAddress,a.tokenId],enabled:ci,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>fo(a.contractAddress,a.tokenId)});c.useEffect(()=>{he&&K(p=>p.name?p.issuedId?p:{...p,issuedId:he.issuedId}:{id:he.id,name:he.name,creator:"",contractAddress:he.contractAddress,itemId:he.itemId,category:he.category,rarity:he.rarity??"common",network:he.network,chainId:he.chainId,thumbnail:he.image,priceCredits:he.listingPrice??0,gender:null,isSmart:!1,tokenId:he.tokenId,issuedId:he.issuedId,tradeId:he.tradeId})},[he]);const{data:Te}=se({queryKey:["publishable-item",a.contractAddress,a.itemId,w==null?void 0:w.address],enabled:ln&&!!w&&!!a.itemId,queryFn:async()=>w?(await _o(w.address,w.identity)).find(le=>le.contractAddress.toLowerCase()===a.contractAddress.toLowerCase()&&le.blockchainItemId===a.itemId)??null:null}),ze=f&&!!_,dn=!f&&ln,Ne=!y&&(dn||ze),ui=jt!=null?!0:ze?!!(_!=null&&_.isOnSale):ue,_t=ze?_==null?void 0:_.tradeId:Le,pi=ze?!!_:!!Te,hi=dn||ze&&dt,cn=jt??(ze?(_==null?void 0:_.listingPrice)??0:0),{data:xi=0}=se({queryKey:["owned-item-count",a.contractAddress,u,w==null?void 0:w.address],enabled:!f&&!y&&!!(w!=null&&w.address)&&!!a.contractAddress&&!!u,staleTime:3e4,queryFn:()=>w?mo(w.address,a.contractAddress,u):0});async function et(){await Promise.all([I.invalidateQueries({queryKey:["owned-token",a.contractAddress,a.tokenId]}),I.invalidateQueries({queryKey:["detail-trade"]}),I.invalidateQueries({queryKey:["shop-item"]}),I.invalidateQueries({queryKey:["collection-sale-state"]}),I.invalidateQueries({queryKey:["shop-items"]}),I.invalidateQueries({queryKey:["catalog-items"]}),I.invalidateQueries({queryKey:["publishable-items"]}),I.invalidateQueries({queryKey:["publishable-item",a.contractAddress,a.itemId]}),I.invalidateQueries({queryKey:["item-resales",a.contractAddress,a.itemId]})])}async function Ua(p){if(!w||!_t)throw new Error("No listing to take down");const le=await Gr(_t);await Eo({trade:le,signer:w.signer,mode:p.payGas?"direct":"gasless-only",watch:{isCancelled:async()=>{try{if(ze){if(!a.tokenId)return!1;const we=await Li(w.address,a.contractAddress,a.tokenId);return we!==null&&!we.isOnSale}return a.itemId?await lo(a.contractAddress,a.itemId)===null:!1}catch{return!1}},onWaiting:p.onWaiting}}),p.silent||Mt.success(n("myAssets.removedFromSale",{name:a.name})),kt(null),id(I,_t),K(we=>we.tradeId===_t?{...we,tradeId:void 0}:we),et(),xn(I,{address:w.address,contractAddress:a.contractAddress,tokenId:a.tokenId},{kind:"removed"})}const fi=p=>async({payGas:le,onWaiting:we})=>{try{return await Ua({silent:p,payGas:le,onWaiting:we}),"ok"}catch(ut){if(ut instanceof Lo)return ut.definitive?"relay-reverted":"relay-pending";throw ut}},mi={currentCredits:cn||a.priceCredits||void 0,canPayGas:di,cancelCurrent:fi(!0)};function gi({edit:p=!1}={}){p||Z("Shop Started Listing",{listing_type:ze?"secondary":"primary",item_id:a.itemId??a.tokenId??null}),li(p),ze?ni(!0):ii(!0)}function bi(){ni(!1),ii(!1),li(!1),et()}const yi=ue?ke?n("itemDetail.checking"):on?n("itemDetail.maxInCart"):!Ft&&sn?n("assetCard.inCart"):n("assetCard.addToCart"):n("itemDetail.notForSale"),$t=a.available??(Y==null?void 0:Y.available)??null,Qa=typeof $t=="number"&&$t>0&&!a.tokenId&&!y,wi=!y&&!a.tokenId&&$t===0,vi=a.network==="ETHEREUM",ct=wi&&!Ne&&!!Ie,Dt=!!Ie&&W.some(p=>p.id===Ie.id),Va=!Ne&&ue&&!y,Ga=y||!Ne&&(ue||ct&&!!Ie||Aa()),Ya=!a.name&&(!!H||!!_||!!he||!!fe),ji=B||!!a.contractAddress&&!R||!a.name&&Bt||Ya||ci&&!Ha,ki=!a.name&&!ji,Ja=!!a.name&&rd({isMarket:y,forSale:ue,priceKnown:a.priceCredits>0&&(!E||ne!=null)||Ne,stillResolving:ji||!!E&&ne==null,manage:Ne,soldOutWithResale:ct,resolvingTrade:ke,isTokenRoute:f,ownedAssetLoading:Bt,deepLinkLoading:B}),$i=!a.creator&&(B||te||Bt),Ci=!(G!=null&&G.name)&&te,Xa=/^https?:\/\//i.test(a.thumbnail);return no(ki?{title:n("seo.item.notFoundTitle"),noindex:!0}:a.name?{title:a.name,description:ee||n("seo.item.fallbackDescription",{name:a.name,rarity:a.rarity,category:Gt($e),creator:Wn(a.creator)}),image:Xa?a.thumbnail:void 0,type:"product"}:{}),ki?e.jsxs(Ih,{"data-notfound":!0,children:[e.jsx(Mh,{name:"cart"}),e.jsx(Rh,{children:n("itemDetail.notAvailableTitle")}),e.jsx(Sh,{children:n("itemDetail.notAvailableBody")}),e.jsx(Ah,{variant:"white",onClick:()=>g("/items"),children:n("notFound.cta")})]}):e.jsxs(Gp,{children:[e.jsxs(Yp,{"aria-label":n("itemDetail.breadcrumbAria"),children:[e.jsx(Jp,{onClick:()=>g("/items"),children:n("nav.collectibles")}),e.jsx(Xp,{children:"/"}),e.jsx(Zp,{children:a.name||n("itemDetail.itemFallback")})]}),e.jsxs(eh,{style:{"--glow-rgb":ao(Ze),"--glow-core":ro(Ze)},children:[e.jsxs(th,{"data-testid":"item-preview",children:[a.name?e.jsx(Lu,{item:a}):e.jsx(nh,{"aria-busy":"true","aria-label":n("itemPreview.loading"),children:e.jsx(ih,{className:"skeleton","aria-hidden":!0})}),Un?e.jsxs(kr,{"data-fav-preview":!0,"data-on":Xe||void 0,"data-count":Tt??void 0,onClick:()=>M(a,"item_detail"),"aria-pressed":Xe,"aria-label":Vn,children:[e.jsx(P,{name:Xe?"heart-solid":"heart",size:18}),He!==void 0?e.jsx($r,{title:n("itemDetail.savedCount",{count:He}),"data-testid":"fav-count-preview",children:Tt}):null]}):null,yt?e.jsxs(oh,{"data-play-showcase":!0,onClick:()=>Pt(!0),"data-testid":"play-showcase",children:[e.jsx(P,{name:"play",size:18}),n("itemDetail.playShowcase")]}):null]}),e.jsx(rh,{"data-testid":"item-info",children:a.name?e.jsxs(e.Fragment,{children:[ti&&a.compareAtCredits!=null?e.jsx(hh,{pct:io(a.compareAtCredits,a.priceCredits),size:"lg",testId:"detail-sale-badge"}):null,e.jsxs(ah,{children:[e.jsxs(sh,{children:[a.name,f&&a.issuedId?` #${a.issuedId}`:""]}),Un?e.jsxs(kr,{"data-fav-title":!0,"data-on":Xe||void 0,"data-count":Tt??void 0,onClick:()=>M(a,"item_detail"),"aria-pressed":Xe,"aria-label":Vn,children:[e.jsx(P,{name:Xe?"heart-solid":"heart",size:18}),He!==void 0?e.jsx($r,{title:n("itemDetail.savedCount",{count:He}),"data-testid":"fav-count",children:Tt}):null]}):null]}),e.jsxs(lh,{children:[Zn?e.jsx(Kt,{content:Pi(a.rarity),children:e.jsx(Qt,{to:Zn,"data-variant":"rarity","data-testid":"detail-rarity-link",style:{background:Ri(Ze)},children:a.rarity})}):e.jsx(Kt,{content:Pi(a.rarity),children:e.jsx(Be,{"data-variant":"rarity",style:{background:Ri(Ze)},children:a.rarity})}),ei?e.jsxs(Qt,{to:ei,"data-testid":"detail-category-link",title:n("filter.browseByCategory",{category:Gt($e)}),children:[Nt?e.jsx(P,{name:Nt,size:18}):null,Gt($e)]}):e.jsxs(Be,{children:[Nt?e.jsx(P,{name:Nt,size:18}):null,Gt($e)]}),Jn?e.jsxs(Be,{children:[Xn?e.jsx(P,{name:Xn,size:18}):null,Jn]}):null,!f&&a.issuedId?e.jsxs(Be,{"data-testid":"detail-issued",children:["#",a.issuedId]}):null,d?e.jsxs(Qt,{to:"/event","data-testid":"detail-event",title:d,children:[e.jsx(P,{name:"star-rounded",size:18}),d]}):null,lt?e.jsxs(Qt,{to:Kp(),"data-testid":"detail-smart",title:n("filter.browseBySmart"),children:[e.jsx(P,{name:"smart",size:18}),n("itemDetail.smart")]}):null,Ce.emoteLoop!==void 0?e.jsxs(Be,{"data-testid":"detail-play-mode",children:[e.jsx(P,{name:Ce.emoteLoop?"play-loop":"play-once",size:18}),Ce.emoteLoop?n("itemDetail.playLoop"):n("itemDetail.playOnce")]}):null,Ce.emoteHasSound?e.jsxs(Be,{"data-testid":"detail-sound",children:[e.jsx(P,{name:"sound",size:18}),n("itemDetail.emoteSound")]}):null,Ce.emoteHasProps?e.jsxs(Be,{"data-testid":"detail-props",children:[e.jsx(P,{name:"props",size:18}),n("itemDetail.emoteProps")]}):null,Rt?e.jsx(Kt,{content:n("itemDetail.exportBlockedTooltip"),children:e.jsxs(Be,{"data-variant":"blocked","data-testid":"detail-export-blocked",tabIndex:0,"aria-label":n("itemDetail.exportBlockedTooltip"),children:[e.jsx(P,{name:"ban",size:16}),n("itemDetail.exportBlocked")]})}):null,Pe?e.jsxs(Be,{"data-testid":"detail-utility-chip",children:[e.jsx(P,{name:"utility",size:18}),n("itemDetail.utility")]}):null]}),ee||Pe?e.jsxs(La,{children:[ee?e.jsx(Bn,{children:e.jsxs(Nn,{children:[e.jsx(ht,{children:n("itemDetail.description")}),e.jsx(Cr,{"data-expanded":ae||void 0,children:ee}),ee.length>140?e.jsx(ch,{className:"link",onClick:()=>ve(p=>!p),children:ae?n("itemDetail.showLess"):n("itemDetail.readMore")}):null]})}):null,Pe?e.jsx(Bn,{children:e.jsxs(Nn,{"data-testid":"detail-utility",children:[e.jsx(ht,{children:n("itemDetail.utility")}),e.jsx(Cr,{"data-expanded":!0,children:Pe})]})}):null]}):null,!vi&&(a.creator||$i)||G!=null&&G.name||Ci?e.jsxs(Ea,{children:[vi?null:a.creator?e.jsxs(St,{children:[e.jsx(ht,{children:n("itemDetail.creator")}),e.jsx(uh,{address:a.creator,linkToProfile:!0,hidePrefix:!0})]}):$i?e.jsxs(St,{children:[e.jsx(ht,{children:n("itemDetail.creator")}),e.jsxs(Br,{"aria-hidden":!0,"data-testid":"creator-loading",children:[e.jsx(_r,{}),e.jsx(Dr,{})]})]}):null,G!=null&&G.name?e.jsxs(St,{"data-collection":!0,children:[e.jsx(ht,{children:n("itemDetail.collection")}),e.jsx(ph,{contractAddress:a.contractAddress,name:G.name,items:re})]}):Ci?e.jsxs(St,{"data-collection":!0,children:[e.jsx(ht,{children:n("itemDetail.collection")}),e.jsxs(Br,{"aria-hidden":!0,"data-testid":"collection-loading",children:[e.jsx(_r,{}),e.jsx(Dr,{})]})]}):null]}):null,e.jsx(Ta,{}),Ja?e.jsxs(Jh,{"aria-hidden":!0,"data-testid":"sale-loading",children:[e.jsx(Xh,{}),e.jsx(Nr,{}),e.jsx(Nr,{})]}):e.jsxs(e.Fragment,{children:[dt&&!Ne&&!y&&ue&&!a.tokenId?e.jsxs(Bh,{"data-testid":"buy-from-creator",children:[e.jsxs(_h,{children:[e.jsx(Dh,{name:"buy-from-creator"}),n("itemDetail.buyFromCreator")]}),e.jsx(Wh,{name:"check-rounded"})]}):null,ct?e.jsxs(Uh,{"data-testid":"sold-out",children:[e.jsxs(Lr,{"data-variant":"original",children:[e.jsxs(Er,{children:[n("itemDetail.originalPrice"),e.jsxs(Fr,{children:[e.jsx(Re,{className:"ico"}),e.jsx(Tr,{children:e.jsx(ge,{credits:a.priceCredits})})]}),e.jsx(zr,{"aria-hidden":!0,children:e.jsx(P,{name:"info",size:12})})]}),e.jsx(Qh,{"data-testid":"out-of-stock",children:n("itemDetail.soldOut")})]}),e.jsxs(Lr,{"data-variant":"resale",children:[e.jsxs(Er,{children:[n("itemDetail.resalePrice"),e.jsxs(Fr,{children:[e.jsx(Re,{className:"ico"}),e.jsx(Tr,{children:e.jsx(ge,{credits:Ke})})]}),e.jsx(zr,{"aria-hidden":!0,children:e.jsx(P,{name:"info",size:12})})]}),e.jsxs(Vh,{children:[n("itemDetail.stock")," ",Ee.length,"/",Ae.Rarity.getMaxSupply(Ze).toLocaleString()]})]})]}):e.jsxs(xh,{children:[e.jsxs(fh,{children:[e.jsxs(mh,{children:[y||ue?e.jsx(Mn,{children:n("itemDetail.price")}):null,y?e.jsxs(e.Fragment,{children:[e.jsx(Ct,{"data-variant":"market","data-testid":"item-price",children:k==null?e.jsx(It,{children:"—"}):e.jsxs(e.Fragment,{children:[e.jsx(bh,{"aria-hidden":!0,children:"≈"}),e.jsx(Vt,{}),e.jsx(It,{children:e.jsx(ge,{credits:k})})]})}),e.jsx(yh,{children:n("assetCard.marketPrice")})]}):ue?ti?e.jsxs(Ct,{"data-variant":"sale","data-testid":"item-price",children:[e.jsx(Vt,{}),e.jsx(It,{children:e.jsx(ge,{credits:a.priceCredits})}),e.jsx(vh,{"data-testid":"detail-price-was",children:e.jsx(ge,{credits:a.compareAtCredits})}),e.jsx(No,{until:a.saleEndsAt,testId:"detail-countdown"})]}):e.jsxs(Ct,{"data-testid":"item-price",children:[e.jsx(Vt,{}),e.jsx(It,{children:e.jsx(ge,{credits:a.priceCredits})})]}):ui&&cn?e.jsxs(Ct,{"data-testid":"item-price",children:[e.jsx(Vt,{}),e.jsx(It,{children:e.jsx(ge,{credits:cn})})]}):Ne?null:e.jsxs(Ct,{"data-variant":"none","data-testid":"item-price",children:[e.jsx("span",{children:n("itemDetail.notForSale")}),e.jsx(Kt,{content:n("itemDetail.notForSaleHint"),children:e.jsx(gh,{tabIndex:0,role:"img","aria-label":n("itemDetail.notForSaleHint"),children:e.jsx(P,{name:"info",size:14})})})]})]}),Qa?e.jsxs(Ir,{children:[e.jsx(Mn,{children:n("itemDetail.stock")}),e.jsxs(An,{children:[($t??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(Ze).toLocaleString()]})]}):wi?e.jsxs(Ir,{children:[e.jsx(Mn,{children:n("itemDetail.stock")}),e.jsxs(An,{children:[($t??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(Ze).toLocaleString()]}),e.jsx(An,{"data-out":!0,"data-testid":"out-of-stock",children:n("itemDetail.outOfStock")})]}):null]}),ye?e.jsx(Dp,{claimed:ye.claimed,total:ye.total,testId:"detail-offer-stock"}):null,Et!=null?e.jsx(wh,{"data-testid":"detail-units-left",children:n("assetCard.unitsLeftAtThisPrice",{count:Et})}):null]}),e.jsx(jh,{"data-buttons":Ga||void 0,"data-dual":Va||void 0,children:y?e.jsxs(Rn,{variant:"purple",onClick:oe,disabled:!xe,children:[e.jsx("span",{children:n("assetCard.buyNow")}),k!=null?e.jsxs(Pn,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:k})]}):null]}):Ne?e.jsxs(Gh,{"data-testid":"manage-actions",children:[ui?e.jsxs(e.Fragment,{children:[hi?e.jsxs($h,{onClick:()=>gi({edit:!0}),disabled:!pi,"data-testid":"edit-price",children:[e.jsx(P,{name:"pen",className:"ico"}),e.jsx("span",{children:n("itemDetail.manageUpdatePrice")})]}):null,e.jsx(Ar,{onClick:()=>si(!0),"data-testid":"remove-listing",children:e.jsx("span",{children:n("itemDetail.manageRemove")})})]}):e.jsxs(e.Fragment,{children:[hi?e.jsx(kh,{onClick:()=>gi(),disabled:!pi,children:e.jsx("span",{children:n("itemDetail.manageList")})}):null,ze?e.jsxs(e.Fragment,{children:[e.jsx(Ar,{onClick:()=>ri(!0),children:e.jsx("span",{children:n("itemDetail.manageTransfer")})}),e.jsx(Sr,{type:"button","data-on-purple":!0,"data-testid":"resell-item",onClick:()=>j(!0),children:n("itemDetail.manageResell")})]}):null]}),dn&&Te?e.jsx(Sr,{type:"button","data-on-purple":!0,onClick:()=>ai(!0),children:n("itemDetail.manageIssue")}):null,Ke!=null?e.jsx(Yh,{children:e.jsx(_n,{onClick:()=>Je(!0),"data-testid":"view-resellers",children:n("itemDetail.viewAllResellers")})}):null]}):ue?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{variant:"purple",onClick:oe,disabled:ke,children:[e.jsx("span",{children:n("assetCard.buyNow")}),e.jsxs(Pn,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:a.priceCredits})]})]}),e.jsxs(Mr,{onClick:Ba,disabled:ke||(Ft?on:sn),"aria-label":yi,children:[e.jsx(P,{name:"cart"}),e.jsx(Rr,{children:yi})]})]}):ct&&Ie?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{variant:"purple",onClick:()=>w?wt(Ie):U(),children:[e.jsx("span",{children:n("assetCard.buyNow")}),e.jsxs(Pn,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:Ie.priceCredits})]})]}),e.jsxs(Mr,{onClick:()=>{Dt||C(Ie,"item_detail")},disabled:Dt,"aria-label":Dt?n("assetCard.inCart"):n("assetCard.addToCart"),children:[e.jsx(P,{name:"cart"}),e.jsx(Rr,{children:Dt?n("assetCard.inCart"):n("assetCard.addToCart")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(Fp,{item:a}),a.itemId?e.jsx(Hh,{onClick:()=>{Z("Shop Clicked Buy Resale",{item_id:a.itemId,contract_address:a.contractAddress,has_shop_resale:!!Ie}),F(!0)},"data-testid":"buy-resale","aria-haspopup":"dialog",children:n("itemDetail.buyResale")}):null]})}),!Ne&&!y&&Ke!=null?e.jsxs(qh,{"data-testid":"lowest-price","data-centered":ct||void 0,children:[ct?null:e.jsxs(Oh,{children:[n("itemDetail.lowestPrice"),e.jsx(Re,{className:"ico"}),e.jsx(Kh,{children:e.jsx(ge,{credits:Ke})})]}),e.jsx(_n,{onClick:()=>Je(!0),"data-testid":"view-resellers",children:n("itemDetail.viewAllResellers")})]}):null,!Ne&&!y&&xi>0?e.jsxs(Ch,{"data-testid":"you-own-note",children:[n("itemDetail.youOwnN",{count:xi})," ",e.jsx(qr,{to:"/my-items",children:n("nav.myAssets")})]}):null]})]}):e.jsx(nx,{})})]}),e.jsx(so,{exclude:ie,title:n("itemDetail.becauseYouOwn"),surface:"pdp",first:Wr}),N!==null&&e.jsx(Mo,{title:_a,items:O,onViewAll:v&&a.contractAddress?()=>g(`/collection/${a.contractAddress}`):void 0}),J&&y&&D&&Q?e.jsx(ja,{listing:D,rate:Q,onClose:()=>A(!1),onSold:()=>A(!1)}):J&&!y?e.jsx(zn,{item:Fe,resume:T,onClose:()=>{A(!1),X(!1)}}):null,Lt?e.jsx(zn,{item:Lt,onClose:()=>{wt(null),et()}}):null,dt&&vt&&a.itemId?e.jsx(op,{item:a,onClose:()=>Je(!1)}):null,an&&x?e.jsx(br,{contractAddress:o??"",tokenId:x,onClose:()=>j(!1)}):null,L&&a.itemId&&o?e.jsx(br,{variant:"buy",contractAddress:o,itemId:a.itemId,onClose:()=>F(!1)}):null,Da&&_&&w?e.jsx(Td,{asset:_,session:w,creator:a.creator,edit:oi?mi:void 0,onListed:(p,le)=>{kt(p),et(),xn(I,{address:w.address,contractAddress:a.contractAddress,tokenId:a.tokenId},{kind:"listed",priceCredits:p,tradeId:le})},onClose:bi}):null,Ka&&w?e.jsx(ic,{name:a.name,managed:Zt(w),canPayGas:di,cancel:fi(!1),onClose:()=>si(!1)}):null,qa&&w&&a.tokenId?e.jsx(ec,{item:{contractAddress:a.contractAddress,chainId:a.chainId,tokenId:a.tokenId,name:a.name,thumbnail:a.thumbnail},session:w,onClose:()=>{ri(!1),et()},onTransferred:()=>{kt(null),et(),xn(I,{address:w.address,contractAddress:a.contractAddress,tokenId:a.tokenId},{kind:"gone"})}}):null,Wa&&Te&&w?e.jsx(Cc,{item:Te,session:w,edit:oi?mi:void 0,onListed:(p,le)=>{kt(p),K(we=>({...we,tradeId:le}))},onClose:bi}):null,Oa&&Te&&w?e.jsx(Zc,{item:{contractAddress:Te.contractAddress,chainId:rt.chainId,itemId:Te.blockchainItemId,name:Te.name,thumbnail:Te.thumbnail,available:Te.remainingSupply},session:w,onClose:()=>{ai(!1),et()}}):null,nn&&yt?e.jsx(su,{src:yt,itemName:a.name,onClose:()=>Pt(!1)}):null]})}function nx(){return e.jsxs(Ph,{"aria-hidden":!0,children:[e.jsx(Fh,{className:"skeleton"}),e.jsxs(Th,{children:[e.jsx(Ln,{className:"skeleton"}),e.jsx(Ln,{className:"skeleton"}),e.jsx(Ln,{className:"skeleton"})]}),e.jsx(La,{children:[0,1].map(t=>e.jsx(Bn,{children:e.jsxs(Nn,{children:[e.jsx(Pr,{className:"skeleton"}),e.jsxs(Lh,{children:[e.jsx(En,{className:"skeleton"}),e.jsx(En,{className:"skeleton"}),e.jsx(En,{className:"skeleton","data-short":!0})]})]})},t))}),e.jsx(Ea,{children:[0,1].map(t=>e.jsxs(St,{...t===1?{"data-collection":!0}:{},children:[e.jsx(Pr,{className:"skeleton"}),e.jsx(Eh,{})]},t))}),e.jsx(Ta,{}),e.jsx(zh,{className:"skeleton"}),e.jsx(Nh,{className:"skeleton"})]})}export{tx as ItemDetail,Lx as ItemDetailRoute,tx as default};
|
|
3411
|
-
//# sourceMappingURL=ItemDetail-
|
|
3410
|
+
`;function ex(t){return Object.values(Ae.Rarity).includes(t)}function tx(t){return t==="male"?n("itemDetail.genderMale"):t==="female"?n("itemDetail.genderFemale"):t==="unisex"?n("itemDetail.genderUnisex"):null}function Gt(t){return t.wearableCategory?t.wearableCategory.replace(/_/g," "):t.category==="emote"?n("itemDetail.categoryEmote"):n("itemDetail.categoryWearable")}const Wr=8;function Ex(){const{pathname:t}=Or();return e.jsx(nx,{},t)}function nx(){var Ii,Si,Ai;const{contractAddress:t,itemId:s,tokenId:l}=Za(),o=hn(t),d=Su(o),u=hn(s),x=hn(l),f=!!x,m=u??id(x)??null,$=Or(),h=$.state,g=st(),y=!!(h!=null&&h.market),k=(h==null?void 0:h.marketPriceCredits)??null,I=ot(),C=At(p=>p.add),S=So(p=>p.spent),q=At(p=>p.items),M=Ks(p=>p.toggle),{session:w,signIn:U}=at(),[a,K]=c.useState(()=>{if(h!=null&&h.item){const p={...h.item,tradeId:h.tradeId??h.item.tradeId};return f?{...p,tokenId:x,itemId:p.itemId??m}:{...p,tokenId:void 0,itemId:u??p.itemId}}return{id:`${o}-${x??u}`,name:"",creator:"",contractAddress:o??"",itemId:m,category:"wearable",rarity:"common",network:"MATIC",chainId:rt.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:x??void 0,tradeId:h==null?void 0:h.tradeId}}),[J,A]=c.useState(!1),[T,X]=c.useState(!!(h!=null&&h.resumeBuy));c.useEffect(()=>{h!=null&&h.resumeBuy&&A(!0)},[h==null?void 0:h.resumeBuy]);function V(){const p=a.priceCredits>0?a.priceCredits:null;Z("Shop Started Checkout",{checkout_source:"item_page",cart_size:1,cart_value_credits:p,cart_value_usd:p===null?null:lo(p)}),A(!0)}function oe(){if(w){V();return}y||Po({type:"item-buy",path:$.pathname}),U()}const ce=c.useRef(!1);c.useEffect(()=>{if(!w||ce.current)return;const p=Ao("item-buy");!p||p.path!==$.pathname||(ce.current=!0,X(!0),V())},[w]);const ie=c.useMemo(()=>a.contractAddress&&(a.itemId??m)?[`${a.contractAddress.toLowerCase()}-${a.itemId??m}`]:void 0,[a.contractAddress,a.itemId,m]),O=Hs(Wr,{exclude:ie}),N=Us({enabled:O.enabled,hasSignal:O.hasSignal,isLoading:O.isLoading,isError:O.isError,personalized:(Ii=O.result)==null?void 0:Ii.personalized,rowCount:((Si=O.result)==null?void 0:Si.data.length)??0}),{items:D,isCollectionOnly:v,siblings:re,siblingsFetched:R}=Iu({id:a.id,contractAddress:a.contractAddress,itemId:a.itemId??m,tokenId:a.tokenId,creator:a.creator}),{data:z,isLoading:B}=se({queryKey:["shop-item",a.contractAddress,m],enabled:!y&&!f&&!!a.contractAddress&&!!m,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>uo(a.contractAddress,m)}),H=f?void 0:z;c.useEffect(()=>{H&&K(p=>p.tradeId?{...p,tradeId:H.tradeId,priceCredits:H.priceCredits,manaWei:H.manaWei,available:H.available??p.available,acquisition:H.acquisition,wearableCategory:p.wearableCategory??H.wearableCategory}:{...p,...H})},[H]);const[ae,ve]=c.useState(!1),{data:ee=""}=se({queryKey:["item-desc",a.contractAddress,a.itemId],enabled:!!a.contractAddress&&!!a.itemId,staleTime:5*6e4,queryFn:()=>po(a.contractAddress,a.itemId)}),{data:G,isLoading:te}=se({queryKey:["collection-meta",a.contractAddress],enabled:!!a.contractAddress,staleTime:5*6e4,queryFn:()=>Qr(a.contractAddress)});c.useEffect(()=>{const p=(H==null?void 0:H.creator)||(G==null?void 0:G.creator);p&&K(le=>le.creator?le:{...le,creator:p})},[H,G]);const fe=c.useMemo(()=>{if(!(f||a.name||H||re.length===0))return(m?re.find(p=>p.itemId===m):void 0)??re.find(p=>p.contractAddress===a.contractAddress)},[f,a.name,a.contractAddress,H,re,m]);c.useEffect(()=>{fe&&K(p=>({...fe,tradeId:p.tradeId??fe.tradeId}))},[fe]);const{data:je,isLoading:ke}=se({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(!f&&a.itemId){const p=await ho(a.contractAddress,a.itemId);return(p==null?void 0:p.id)??null}return null}}),{data:Y}=se({queryKey:["item-traits",a.contractAddress,m],enabled:!!a.contractAddress&&!!m,staleTime:5*6e4,retry:1,queryFn:()=>xo(a.contractAddress,m)}),lt=(Y==null?void 0:Y.isSmart)??a.isSmart,Pe=(Y==null?void 0:Y.utility)??null,$e=c.useMemo(()=>({...a,wearableCategory:a.wearableCategory??(Y==null?void 0:Y.wearableCategory)??void 0,gender:a.gender??(Y==null?void 0:Y.gender)??null}),[a,Y==null?void 0:Y.wearableCategory,Y==null?void 0:Y.gender]),bt=(Y==null?void 0:Y.urn)??null,{data:Rt}=se({queryKey:["item-vrm",bt],enabled:!!bt&&a.category==="wearable",staleTime:30*6e4,retry:!1,queryFn:()=>fo(bt)}),[nn,Pt]=c.useState(!1),{data:yt}=se({queryKey:["item-video",a.contractAddress,m],enabled:lt&&!!a.contractAddress&&!!m,staleTime:30*6e4,retry:!1,queryFn:()=>_o(a.contractAddress,m)}),Ce=c.useMemo(()=>a.emoteLoop!==void 0?a:(m?re.find(le=>le.itemId===m):void 0)??a,[a,re,m]),Le=qi(I,a.tradeId)??qi(I,je),rn=a.acquisition==="store"&&(a.available??0)>0,ue=!!Le||rn,dt=Qs(),{data:Ee=[]}=se({queryKey:["item-resales",a.contractAddress,a.itemId],enabled:dt&&!y&&!!a.contractAddress&&!!a.itemId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Xr(a.contractAddress,a.itemId)}),Ke=Ee.length>0?Ee[0].priceCredits:null,Ye=f&&a.tokenId?Ee.find(p=>p.tokenId===a.tokenId)??null:null,Ie=c.useMemo(()=>{const p=Ee[0];return p?{...p,name:p.name||a.name,thumbnail:p.thumbnail||a.thumbnail,rarity:p.rarity||a.rarity,category:p.category||a.category,wearableCategory:p.wearableCategory??a.wearableCategory,gender:p.gender??a.gender}:null},[Ee,a]),[Lt,wt]=c.useState(null),[vt,Je]=c.useState(!1),[an,j]=c.useState(!1),[L,F]=c.useState(!1),E=a.manaWei??null,{data:Q}=Jr(y||!!E),ne=E&&Q?Vs(E,Q):null;c.useEffect(()=>{ne!=null&&K(p=>p.priceCredits===ne?p:{...p,priceCredits:ne})},[ne,a.priceCredits]);const W=c.useMemo(()=>{if(!y||!(h!=null&&h.item))return null;const p=h.item;return p.manaWei?{tradeId:p.tradeId??p.id,listingType:"primary",contractAddress:p.contractAddress,itemId:p.itemId??"",name:p.name,thumbnail:p.thumbnail,rarity:p.rarity,category:p.category,wearableCategory:p.wearableCategory??null,creator:p.creator,manaWei:p.manaWei,available:1,network:p.network,chainId:p.chainId,createdAt:0}:null},[y,h==null?void 0:h.item]),xe=y&&k!=null&&!!Q&&!!W,We=Gs({priceCredits:a.priceCredits,compareAtCredits:a.compareAtCredits,saleEndsAt:a.saleEndsAt}),ye=(()=>{var we,ut;if(!We)return null;const p=Mo(S,a.coupon),le=Number(((ut=(we=a.coupon)==null?void 0:we.checks)==null?void 0:ut.uses)??0);return le>0&&p<=le?{claimed:p,total:le}:null})(),Et=(()=>{if(!We||a.saleUnitsLeft==null)return null;const p=ye?ye.total-ye.claimed:1/0;return a.saleUnitsLeft<p?a.saleUnitsLeft:null})(),Fe=c.useMemo(()=>({...a,tradeId:Le,id:Le??a.id}),[a,Le]),sn=q.some(p=>p.id===Fe.id),Ft=!Fe.tokenId,za=((Ai=q.find(p=>p.id===Fe.id))==null?void 0:Ai.quantity)??0,on=Ft&&typeof a.available=="number"&&za>=a.available,{key:Un,faved:Xe}=Ys(a),He=Js(a),Na=Yr(p=>p.locale),Tt=He===void 0?null:He.toLocaleString(Na),Qn=Xe?n("assetCard.removeFromFavorites"):n("assetCard.addToFavorites"),Vn=He===void 0?Qn:n("itemDetail.favoriteAria",{action:Qn,count:He}),Gn=c.useRef(null);c.useEffect(()=>{!a.name||ke||Gn.current===a.id||(Gn.current=a.id,Z("Shop Viewed Item",{...Xs(a),for_sale:ue}),Zs(a))},[a.id,a.name,ke,ue]);const zt=`${o}/${x??u}`,Yn=c.useRef(zt);c.useEffect(()=>{if(Yn.current!==zt){if(Yn.current=zt,h!=null&&h.item){const p={...h.item,tradeId:h.tradeId??h.item.tradeId};K(f?{...p,tokenId:x,itemId:p.itemId??m}:{...p,tokenId:void 0,itemId:u??p.itemId})}typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}},[zt]);function Ba(){!ue||ln||ke||!Ft&&sn||on||C(Fe,"item_detail")}const Ze=ex(a.rarity)?a.rarity:Ae.Rarity.COMMON,Jn=tx($e.gender),Nt=eo($e),Xn=to($e.gender),Zn=Op(a.rarity),ei=Kp($e),ti=ue&&We,_a=v?n("itemDetail.moreFromCollection"):n("itemDetail.youMightAlsoLike"),ln=no(a,w==null?void 0:w.address),[Da,ni]=c.useState(!1),[Wa,ii]=c.useState(!1),[qa,ri]=c.useState(!1),[Oa,ai]=c.useState(!1),[jt,kt]=c.useState(null),[Ka,si]=c.useState(!1),[oi,li]=c.useState(!1),di=Yt(w==null?void 0:w.providerType),{data:_,isLoading:Bt}=se({queryKey:["owned-token",a.contractAddress,a.tokenId,w==null?void 0:w.address],enabled:!y&&!!(w!=null&&w.address)&&!!a.contractAddress&&!!a.tokenId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>w?Li(w.address,a.contractAddress,a.tokenId):null});c.useEffect(()=>{_&&K(p=>p.name?{...p,issuedId:p.issuedId??_.issuedId,priceCredits:_.listingPrice??0,tradeId:_.tradeId}:{id:_.id,name:_.name,creator:"",contractAddress:_.contractAddress,itemId:_.itemId,category:_.category,rarity:_.rarity??"common",network:_.network,chainId:_.chainId,thumbnail:_.image,priceCredits:_.listingPrice??0,gender:null,isSmart:!1,tokenId:_.tokenId,issuedId:_.issuedId,tradeId:_.tradeId})},[_]),c.useEffect(()=>{Ye&&K(p=>p.priceCredits===Ye.priceCredits&&p.tradeId?p:{...p,priceCredits:Ye.priceCredits,tradeId:p.tradeId??Ye.tradeId})},[Ye]),c.useEffect(()=>{jt!=null&&_!=null&&_.isOnSale&&_.listingPrice===jt&&kt(null)},[_,jt]);const ci=!y&&!!a.contractAddress&&!!a.tokenId&&!a.name&&!H&&!Bt&&!_,{data:he,isFetched:Ha}=se({queryKey:["public-token",a.contractAddress,a.tokenId],enabled:ci,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>mo(a.contractAddress,a.tokenId)});c.useEffect(()=>{he&&K(p=>p.name?p.issuedId?p:{...p,issuedId:he.issuedId}:{id:he.id,name:he.name,creator:"",contractAddress:he.contractAddress,itemId:he.itemId,category:he.category,rarity:he.rarity??"common",network:he.network,chainId:he.chainId,thumbnail:he.image,priceCredits:he.listingPrice??0,gender:null,isSmart:!1,tokenId:he.tokenId,issuedId:he.issuedId,tradeId:he.tradeId})},[he]);const{data:Te}=se({queryKey:["publishable-item",a.contractAddress,a.itemId,w==null?void 0:w.address],enabled:ln&&!!w&&!!a.itemId,queryFn:async()=>w?(await Do(w.address,w.identity)).find(le=>le.contractAddress.toLowerCase()===a.contractAddress.toLowerCase()&&le.blockchainItemId===a.itemId)??null:null}),ze=f&&!!_,dn=!f&&ln,Ne=!y&&(dn||ze),ui=jt!=null?!0:ze?!!(_!=null&&_.isOnSale):ue,_t=ze?_==null?void 0:_.tradeId:Le,pi=ze?!!_:!!Te,hi=dn||ze&&dt,cn=jt??(ze?(_==null?void 0:_.listingPrice)??0:0),{data:xi=0}=se({queryKey:["owned-item-count",a.contractAddress,u,w==null?void 0:w.address],enabled:!f&&!y&&!!(w!=null&&w.address)&&!!a.contractAddress&&!!u,staleTime:3e4,queryFn:()=>w?go(w.address,a.contractAddress,u):0});async function et(){await Promise.all([I.invalidateQueries({queryKey:["owned-token",a.contractAddress,a.tokenId]}),I.invalidateQueries({queryKey:["detail-trade"]}),I.invalidateQueries({queryKey:["shop-item"]}),I.invalidateQueries({queryKey:["collection-sale-state"]}),I.invalidateQueries({queryKey:["shop-items"]}),I.invalidateQueries({queryKey:["catalog-items"]}),I.invalidateQueries({queryKey:["publishable-items"]}),I.invalidateQueries({queryKey:["publishable-item",a.contractAddress,a.itemId]}),I.invalidateQueries({queryKey:["item-resales",a.contractAddress,a.itemId]})])}async function Ua(p){if(!w||!_t)throw new Error("No listing to take down");const le=await Gr(_t);await Fo({trade:le,signer:w.signer,mode:p.payGas?"direct":"gasless-only",watch:{isCancelled:async()=>{try{if(ze){if(!a.tokenId)return!1;const we=await Li(w.address,a.contractAddress,a.tokenId);return we!==null&&!we.isOnSale}return a.itemId?await co(a.contractAddress,a.itemId)===null:!1}catch{return!1}},onWaiting:p.onWaiting}}),p.silent||Mt.success(n("myAssets.removedFromSale",{name:a.name})),kt(null),rd(I,_t),K(we=>we.tradeId===_t?{...we,tradeId:void 0}:we),et(),xn(I,{address:w.address,contractAddress:a.contractAddress,tokenId:a.tokenId},{kind:"removed"})}const fi=p=>async({payGas:le,onWaiting:we})=>{try{return await Ua({silent:p,payGas:le,onWaiting:we}),"ok"}catch(ut){if(ut instanceof Eo)return ut.definitive?"relay-reverted":"relay-pending";throw ut}},mi={currentCredits:cn||a.priceCredits||void 0,canPayGas:di,cancelCurrent:fi(!0)};function gi({edit:p=!1}={}){p||Z("Shop Started Listing",{listing_type:ze?"secondary":"primary",item_id:a.itemId??a.tokenId??null}),li(p),ze?ni(!0):ii(!0)}function bi(){ni(!1),ii(!1),li(!1),et()}const yi=ue?ke?n("itemDetail.checking"):on?n("itemDetail.maxInCart"):!Ft&&sn?n("assetCard.inCart"):n("assetCard.addToCart"):n("itemDetail.notForSale"),$t=a.available??(Y==null?void 0:Y.available)??null,Qa=typeof $t=="number"&&$t>0&&!a.tokenId&&!y,wi=!y&&!a.tokenId&&$t===0,vi=a.network==="ETHEREUM",ct=wi&&!Ne&&!!Ie,Dt=!!Ie&&q.some(p=>p.id===Ie.id),Va=!Ne&&ue&&!y,Ga=y||!Ne&&(ue||ct&&!!Ie||Aa()),Ya=!a.name&&(!!H||!!_||!!he||!!fe),ji=B||!!a.contractAddress&&!R||!a.name&&Bt||Ya||ci&&!Ha,ki=!a.name&&!ji,Ja=!!a.name&&ad({isMarket:y,forSale:ue,priceKnown:a.priceCredits>0&&(!E||ne!=null)||Ne,stillResolving:ji||!!E&&ne==null,manage:Ne,soldOutWithResale:ct,resolvingTrade:ke,isTokenRoute:f,ownedAssetLoading:Bt,deepLinkLoading:B}),$i=!a.creator&&(B||te||Bt),Ci=!(G!=null&&G.name)&&te,Xa=/^https?:\/\//i.test(a.thumbnail);return io(ki?{title:n("seo.item.notFoundTitle"),noindex:!0}:a.name?{title:a.name,description:ee||n("seo.item.fallbackDescription",{name:a.name,rarity:a.rarity,category:Gt($e),creator:Wn(a.creator)}),image:Xa?a.thumbnail:void 0,type:"product"}:{}),ki?e.jsxs(Sh,{"data-notfound":!0,children:[e.jsx(Rh,{name:"cart"}),e.jsx(Ph,{children:n("itemDetail.notAvailableTitle")}),e.jsx(Ah,{children:n("itemDetail.notAvailableBody")}),e.jsx(Mh,{variant:"white",onClick:()=>g("/items"),children:n("notFound.cta")})]}):e.jsxs(Yp,{children:[e.jsxs(Jp,{"aria-label":n("itemDetail.breadcrumbAria"),children:[e.jsx(Xp,{onClick:()=>g("/items"),children:n("nav.collectibles")}),e.jsx(Zp,{children:"/"}),e.jsx(eh,{children:a.name||n("itemDetail.itemFallback")})]}),e.jsxs(th,{style:{"--glow-rgb":so(Ze),"--glow-core":ao(Ze)},children:[e.jsxs(nh,{"data-testid":"item-preview",children:[a.name?e.jsx(Eu,{item:a}):e.jsx(ih,{"aria-busy":"true","aria-label":n("itemPreview.loading"),children:e.jsx(rh,{className:"skeleton","aria-hidden":!0})}),Un?e.jsxs(kr,{"data-fav-preview":!0,"data-on":Xe||void 0,"data-count":Tt??void 0,onClick:()=>M(a,"item_detail"),"aria-pressed":Xe,"aria-label":Vn,children:[e.jsx(P,{name:Xe?"heart-solid":"heart",size:18}),He!==void 0?e.jsx($r,{title:n("itemDetail.savedCount",{count:He}),"data-testid":"fav-count-preview",children:Tt}):null]}):null,yt?e.jsxs(lh,{"data-play-showcase":!0,onClick:()=>Pt(!0),"data-testid":"play-showcase",children:[e.jsx(P,{name:"play",size:18}),n("itemDetail.playShowcase")]}):null]}),e.jsx(ah,{"data-testid":"item-info",children:a.name?e.jsxs(e.Fragment,{children:[ti&&a.compareAtCredits!=null?e.jsx(xh,{pct:ro(a.compareAtCredits,a.priceCredits),size:"lg",testId:"detail-sale-badge"}):null,e.jsxs(sh,{children:[e.jsxs(oh,{children:[a.name,f&&a.issuedId?` #${a.issuedId}`:""]}),Un?e.jsxs(kr,{"data-fav-title":!0,"data-on":Xe||void 0,"data-count":Tt??void 0,onClick:()=>M(a,"item_detail"),"aria-pressed":Xe,"aria-label":Vn,children:[e.jsx(P,{name:Xe?"heart-solid":"heart",size:18}),He!==void 0?e.jsx($r,{title:n("itemDetail.savedCount",{count:He}),"data-testid":"fav-count",children:Tt}):null]}):null]}),e.jsxs(dh,{children:[Zn?e.jsx(Kt,{content:Pi(a.rarity),children:e.jsx(Qt,{to:Zn,"data-variant":"rarity","data-testid":"detail-rarity-link",style:{background:Ri(Ze)},children:a.rarity})}):e.jsx(Kt,{content:Pi(a.rarity),children:e.jsx(Be,{"data-variant":"rarity",style:{background:Ri(Ze)},children:a.rarity})}),ei?e.jsxs(Qt,{to:ei,"data-testid":"detail-category-link",title:n("filter.browseByCategory",{category:Gt($e)}),children:[Nt?e.jsx(P,{name:Nt,size:18}):null,Gt($e)]}):e.jsxs(Be,{children:[Nt?e.jsx(P,{name:Nt,size:18}):null,Gt($e)]}),Jn?e.jsxs(Be,{children:[Xn?e.jsx(P,{name:Xn,size:18}):null,Jn]}):null,!f&&a.issuedId?e.jsxs(Be,{"data-testid":"detail-issued",children:["#",a.issuedId]}):null,d?e.jsxs(Qt,{to:"/event","data-testid":"detail-event",title:d,children:[e.jsx(P,{name:"star-rounded",size:18}),d]}):null,lt?e.jsxs(Qt,{to:Hp(),"data-testid":"detail-smart",title:n("filter.browseBySmart"),children:[e.jsx(P,{name:"smart",size:18}),n("itemDetail.smart")]}):null,Ce.emoteLoop!==void 0?e.jsxs(Be,{"data-testid":"detail-play-mode",children:[e.jsx(P,{name:Ce.emoteLoop?"play-loop":"play-once",size:18}),Ce.emoteLoop?n("itemDetail.playLoop"):n("itemDetail.playOnce")]}):null,Ce.emoteHasSound?e.jsxs(Be,{"data-testid":"detail-sound",children:[e.jsx(P,{name:"sound",size:18}),n("itemDetail.emoteSound")]}):null,Ce.emoteHasProps?e.jsxs(Be,{"data-testid":"detail-props",children:[e.jsx(P,{name:"props",size:18}),n("itemDetail.emoteProps")]}):null,Rt?e.jsx(Kt,{content:n("itemDetail.exportBlockedTooltip"),children:e.jsxs(Be,{"data-variant":"blocked","data-testid":"detail-export-blocked",tabIndex:0,"aria-label":n("itemDetail.exportBlockedTooltip"),children:[e.jsx(P,{name:"ban",size:16}),n("itemDetail.exportBlocked")]})}):null,Pe?e.jsxs(Be,{"data-testid":"detail-utility-chip",children:[e.jsx(P,{name:"utility",size:18}),n("itemDetail.utility")]}):null]}),ee||Pe?e.jsxs(La,{children:[ee?e.jsx(Bn,{children:e.jsxs(Nn,{children:[e.jsx(ht,{children:n("itemDetail.description")}),e.jsx(Cr,{"data-expanded":ae||void 0,children:ee}),ee.length>140?e.jsx(uh,{className:"link",onClick:()=>ve(p=>!p),children:ae?n("itemDetail.showLess"):n("itemDetail.readMore")}):null]})}):null,Pe?e.jsx(Bn,{children:e.jsxs(Nn,{"data-testid":"detail-utility",children:[e.jsx(ht,{children:n("itemDetail.utility")}),e.jsx(Cr,{"data-expanded":!0,children:Pe})]})}):null]}):null,!vi&&(a.creator||$i)||G!=null&&G.name||Ci?e.jsxs(Ea,{children:[vi?null:a.creator?e.jsxs(St,{children:[e.jsx(ht,{children:n("itemDetail.creator")}),e.jsx(ph,{address:a.creator,linkToProfile:!0,hidePrefix:!0})]}):$i?e.jsxs(St,{children:[e.jsx(ht,{children:n("itemDetail.creator")}),e.jsxs(Br,{"aria-hidden":!0,"data-testid":"creator-loading",children:[e.jsx(_r,{}),e.jsx(Dr,{})]})]}):null,G!=null&&G.name?e.jsxs(St,{"data-collection":!0,children:[e.jsx(ht,{children:n("itemDetail.collection")}),e.jsx(hh,{contractAddress:a.contractAddress,name:G.name,items:re})]}):Ci?e.jsxs(St,{"data-collection":!0,children:[e.jsx(ht,{children:n("itemDetail.collection")}),e.jsxs(Br,{"aria-hidden":!0,"data-testid":"collection-loading",children:[e.jsx(_r,{}),e.jsx(Dr,{})]})]}):null]}):null,e.jsx(Ta,{}),Ja?e.jsxs(Xh,{"aria-hidden":!0,"data-testid":"sale-loading",children:[e.jsx(Zh,{}),e.jsx(Nr,{}),e.jsx(Nr,{})]}):e.jsxs(e.Fragment,{children:[dt&&!Ne&&!y&&ue&&!a.tokenId?e.jsxs(_h,{"data-testid":"buy-from-creator",children:[e.jsxs(Dh,{children:[e.jsx(Wh,{name:"buy-from-creator"}),n("itemDetail.buyFromCreator")]}),e.jsx(qh,{name:"check-rounded"})]}):null,ct?e.jsxs(Qh,{"data-testid":"sold-out",children:[e.jsxs(Lr,{"data-variant":"original",children:[e.jsxs(Er,{children:[n("itemDetail.originalPrice"),e.jsxs(Fr,{children:[e.jsx(Re,{className:"ico"}),e.jsx(Tr,{children:e.jsx(ge,{credits:a.priceCredits})})]}),e.jsx(zr,{"aria-hidden":!0,children:e.jsx(P,{name:"info",size:12})})]}),e.jsx(Vh,{"data-testid":"out-of-stock",children:n("itemDetail.soldOut")})]}),e.jsxs(Lr,{"data-variant":"resale",children:[e.jsxs(Er,{children:[n("itemDetail.resalePrice"),e.jsxs(Fr,{children:[e.jsx(Re,{className:"ico"}),e.jsx(Tr,{children:e.jsx(ge,{credits:Ke})})]}),e.jsx(zr,{"aria-hidden":!0,children:e.jsx(P,{name:"info",size:12})})]}),e.jsxs(Gh,{children:[n("itemDetail.stock")," ",Ee.length,"/",Ae.Rarity.getMaxSupply(Ze).toLocaleString()]})]})]}):e.jsxs(fh,{children:[e.jsxs(mh,{children:[e.jsxs(gh,{children:[y||ue?e.jsx(Mn,{children:n("itemDetail.price")}):null,y?e.jsxs(e.Fragment,{children:[e.jsx(Ct,{"data-variant":"market","data-testid":"item-price",children:k==null?e.jsx(It,{children:"—"}):e.jsxs(e.Fragment,{children:[e.jsx(yh,{"aria-hidden":!0,children:"≈"}),e.jsx(Vt,{}),e.jsx(It,{children:e.jsx(ge,{credits:k})})]})}),e.jsx(wh,{children:n("assetCard.marketPrice")})]}):ue?ti?e.jsxs(Ct,{"data-variant":"sale","data-testid":"item-price",children:[e.jsx(Vt,{}),e.jsx(It,{children:e.jsx(ge,{credits:a.priceCredits})}),e.jsx(jh,{"data-testid":"detail-price-was",children:e.jsx(ge,{credits:a.compareAtCredits})}),e.jsx(Bo,{until:a.saleEndsAt,testId:"detail-countdown"})]}):e.jsxs(Ct,{"data-testid":"item-price",children:[e.jsx(Vt,{}),e.jsx(It,{children:e.jsx(ge,{credits:a.priceCredits})})]}):ui&&cn?e.jsxs(Ct,{"data-testid":"item-price",children:[e.jsx(Vt,{}),e.jsx(It,{children:e.jsx(ge,{credits:cn})})]}):Ne?null:e.jsxs(Ct,{"data-variant":"none","data-testid":"item-price",children:[e.jsx("span",{children:n("itemDetail.notForSale")}),e.jsx(Kt,{content:n("itemDetail.notForSaleHint"),children:e.jsx(bh,{tabIndex:0,role:"img","aria-label":n("itemDetail.notForSaleHint"),children:e.jsx(P,{name:"info",size:14})})})]})]}),Qa?e.jsxs(Ir,{children:[e.jsx(Mn,{children:n("itemDetail.stock")}),e.jsxs(An,{children:[($t??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(Ze).toLocaleString()]})]}):wi?e.jsxs(Ir,{children:[e.jsx(Mn,{children:n("itemDetail.stock")}),e.jsxs(An,{children:[($t??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(Ze).toLocaleString()]}),e.jsx(An,{"data-out":!0,"data-testid":"out-of-stock",children:n("itemDetail.outOfStock")})]}):null]}),ye?e.jsx(Wp,{claimed:ye.claimed,total:ye.total,testId:"detail-offer-stock"}):null,Et!=null?e.jsx(vh,{"data-testid":"detail-units-left",children:n("assetCard.unitsLeftAtThisPrice",{count:Et})}):null]}),e.jsx(kh,{"data-buttons":Ga||void 0,"data-dual":Va||void 0,children:y?e.jsxs(Rn,{variant:"purple",onClick:oe,disabled:!xe,children:[e.jsx("span",{children:n("assetCard.buyNow")}),k!=null?e.jsxs(Pn,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:k})]}):null]}):Ne?e.jsxs(Yh,{"data-testid":"manage-actions",children:[ui?e.jsxs(e.Fragment,{children:[hi?e.jsxs(Ch,{onClick:()=>gi({edit:!0}),disabled:!pi,"data-testid":"edit-price",children:[e.jsx(P,{name:"pen",className:"ico"}),e.jsx("span",{children:n("itemDetail.manageUpdatePrice")})]}):null,e.jsx(Ar,{onClick:()=>si(!0),"data-testid":"remove-listing",children:e.jsx("span",{children:n("itemDetail.manageRemove")})})]}):e.jsxs(e.Fragment,{children:[hi?e.jsx($h,{onClick:()=>gi(),disabled:!pi,children:e.jsx("span",{children:n("itemDetail.manageList")})}):null,ze?e.jsxs(e.Fragment,{children:[e.jsx(Ar,{onClick:()=>ri(!0),children:e.jsx("span",{children:n("itemDetail.manageTransfer")})}),e.jsx(Sr,{type:"button","data-on-purple":!0,"data-testid":"resell-item",onClick:()=>j(!0),children:n("itemDetail.manageResell")})]}):null]}),dn&&Te?e.jsx(Sr,{type:"button","data-on-purple":!0,onClick:()=>ai(!0),children:n("itemDetail.manageIssue")}):null,Ke!=null?e.jsx(Jh,{children:e.jsx(_n,{onClick:()=>Je(!0),"data-testid":"view-resellers",children:n("itemDetail.viewAllResellers")})}):null]}):ue?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{variant:"purple",onClick:oe,disabled:ke,children:[e.jsx("span",{children:n("assetCard.buyNow")}),e.jsxs(Pn,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:a.priceCredits})]})]}),e.jsxs(Mr,{onClick:Ba,disabled:ke||(Ft?on:sn),"aria-label":yi,children:[e.jsx(P,{name:"cart"}),e.jsx(Rr,{children:yi})]})]}):ct&&Ie?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{variant:"purple",onClick:()=>w?wt(Ie):U(),children:[e.jsx("span",{children:n("assetCard.buyNow")}),e.jsxs(Pn,{"aria-hidden":!0,children:[e.jsx(Fn,{}),e.jsx(ge,{credits:Ie.priceCredits})]})]}),e.jsxs(Mr,{onClick:()=>{Dt||C(Ie,"item_detail")},disabled:Dt,"aria-label":Dt?n("assetCard.inCart"):n("assetCard.addToCart"),children:[e.jsx(P,{name:"cart"}),e.jsx(Rr,{children:Dt?n("assetCard.inCart"):n("assetCard.addToCart")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(Tp,{item:a}),a.itemId?e.jsx(Uh,{onClick:()=>{Z("Shop Clicked Buy Resale",{item_id:a.itemId,contract_address:a.contractAddress,has_shop_resale:!!Ie}),F(!0)},"data-testid":"buy-resale","aria-haspopup":"dialog",children:n("itemDetail.buyResale")}):null]})}),!Ne&&!y&&Ke!=null?e.jsxs(Oh,{"data-testid":"lowest-price","data-centered":ct||void 0,children:[ct?null:e.jsxs(Kh,{children:[n("itemDetail.lowestPrice"),e.jsx(Re,{className:"ico"}),e.jsx(Hh,{children:e.jsx(ge,{credits:Ke})})]}),e.jsx(_n,{onClick:()=>Je(!0),"data-testid":"view-resellers",children:n("itemDetail.viewAllResellers")})]}):null,!Ne&&!y&&xi>0?e.jsxs(Ih,{"data-testid":"you-own-note",children:[n("itemDetail.youOwnN",{count:xi})," ",e.jsx(qr,{to:"/my-items",children:n("nav.myAssets")})]}):null]})]}):e.jsx(ix,{})})]}),e.jsx(oo,{exclude:ie,title:n("itemDetail.becauseYouOwn"),surface:"pdp",first:Wr}),N!==null&&e.jsx(Ro,{title:_a,items:D,onViewAll:v&&a.contractAddress?()=>g(`/collection/${a.contractAddress}`):void 0}),J&&y&&W&&Q?e.jsx(ja,{listing:W,rate:Q,onClose:()=>A(!1),onSold:()=>A(!1)}):J&&!y?e.jsx(zn,{item:Fe,resume:T,onClose:()=>{A(!1),X(!1)}}):null,Lt?e.jsx(zn,{item:Lt,onClose:()=>{wt(null),et()}}):null,dt&&vt&&a.itemId?e.jsx(lp,{item:a,onClose:()=>Je(!1)}):null,an&&x?e.jsx(br,{contractAddress:o??"",tokenId:x,onClose:()=>j(!1)}):null,L&&a.itemId&&o?e.jsx(br,{variant:"buy",contractAddress:o,itemId:a.itemId,onClose:()=>F(!1)}):null,Da&&_&&w?e.jsx(zd,{asset:_,session:w,creator:a.creator,edit:oi?mi:void 0,onListed:(p,le)=>{kt(p),et(),xn(I,{address:w.address,contractAddress:a.contractAddress,tokenId:a.tokenId},{kind:"listed",priceCredits:p,tradeId:le})},onClose:bi}):null,Ka&&w?e.jsx(rc,{name:a.name,managed:Zt(w),canPayGas:di,cancel:fi(!1),onClose:()=>si(!1)}):null,qa&&w&&a.tokenId?e.jsx(tc,{item:{contractAddress:a.contractAddress,chainId:a.chainId,tokenId:a.tokenId,name:a.name,thumbnail:a.thumbnail},session:w,onClose:()=>{ri(!1),et()},onTransferred:()=>{kt(null),et(),xn(I,{address:w.address,contractAddress:a.contractAddress,tokenId:a.tokenId},{kind:"gone"})}}):null,Wa&&Te&&w?e.jsx(Ic,{item:Te,session:w,edit:oi?mi:void 0,onListed:(p,le)=>{kt(p),K(we=>({...we,tradeId:le}))},onClose:bi}):null,Oa&&Te&&w?e.jsx(eu,{item:{contractAddress:Te.contractAddress,chainId:rt.chainId,itemId:Te.blockchainItemId,name:Te.name,thumbnail:Te.thumbnail,available:Te.remainingSupply},session:w,onClose:()=>{ai(!1),et()}}):null,nn&&yt?e.jsx(ou,{src:yt,itemName:a.name,onClose:()=>Pt(!1)}):null]})}function ix(){return e.jsxs(Lh,{"aria-hidden":!0,children:[e.jsx(Th,{className:"skeleton"}),e.jsxs(zh,{children:[e.jsx(Ln,{className:"skeleton"}),e.jsx(Ln,{className:"skeleton"}),e.jsx(Ln,{className:"skeleton"})]}),e.jsx(La,{children:[0,1].map(t=>e.jsx(Bn,{children:e.jsxs(Nn,{children:[e.jsx(Pr,{className:"skeleton"}),e.jsxs(Eh,{children:[e.jsx(En,{className:"skeleton"}),e.jsx(En,{className:"skeleton"}),e.jsx(En,{className:"skeleton","data-short":!0})]})]})},t))}),e.jsx(Ea,{children:[0,1].map(t=>e.jsxs(St,{...t===1?{"data-collection":!0}:{},children:[e.jsx(Pr,{className:"skeleton"}),e.jsx(Fh,{})]},t))}),e.jsx(Ta,{}),e.jsx(Nh,{className:"skeleton"}),e.jsx(Bh,{className:"skeleton"})]})}export{nx as ItemDetail,Ex as ItemDetailRoute,nx as default};
|
|
3411
|
+
//# sourceMappingURL=ItemDetail-BhOAzg_H.js.map
|