@dcl/shop 1.13.1-35339357506.commit-a201fb1 → 1.13.1-35585926635.commit-02c8d2e
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-BZMB4hg5.js → Activity-DoatD7MW.js} +4 -4
- package/_assets/{AnimatedBackground-CXVxNT-G.js → AnimatedBackground-dVEk0PGp.js} +6 -6
- package/_assets/Assets-CN1LU5Xt.js +980 -0
- package/_assets/Cart-Bwf6I0xV.js +748 -0
- package/_assets/{Collection-D7LTf_OS.js → Collection-CPZhq7CU.js} +9 -9
- package/_assets/{CollectionCarousel-DsJ7L4rs.js → CollectionCarousel-CrMGuIJ3.js} +4 -4
- package/_assets/{Confetti-cdj3K_E3.js → Confetti-Bd901H1c.js} +4 -4
- package/_assets/{ConstantsUtil-BRm3N2MJ.js → ConstantsUtil-Bk0e9ERj.js} +2 -2
- package/_assets/{ContentClient-BuGONJzu.js → ContentClient-CWtagBtE.js} +2 -2
- package/_assets/{Creator-DTGBDA7q.js → Creator-pBuqm0Cj.js} +2 -2
- package/_assets/{modal.styles-G1Y436F0.js → CreditPackPicker-COb2KClL.js} +83 -50
- package/_assets/{DeploymentBuilder-t6QMfSJh.js → DeploymentBuilder-Dg-EXfAY.js} +2 -2
- package/_assets/{EmotePlaybackBar-DxozN5dA.js → EmotePlaybackBar-DyYs6qdM.js} +3 -3
- package/_assets/{ErrorNotice-Dlh8ddHO.js → ErrorNotice-Cm0KaFyV.js} +2 -2
- package/_assets/Event-C9d1J0Kb.js +72 -0
- package/_assets/{ExchangeController-CSSF68uc.js → ExchangeController-BzBrR3ZT.js} +2 -2
- package/_assets/{Faq-DQCrsGCA.js → Faq-D2noxWN_.js} +2 -2
- package/_assets/{Filters-BsZs-9_M.js → Filters-Dw8HD8Ma.js} +2 -2
- package/_assets/{GetCredits-DLjX5S-_.js → GetCredits-BmFWdIGx.js} +2 -2
- package/_assets/{Grow-CBOQ3rs-.js → Grow-BiGjBqEo.js} +2 -2
- package/_assets/{HelpersUtil-ItKIMa0k.js → HelpersUtil-DQga4Ywl.js} +2 -2
- package/_assets/ItemDetail-BSwm3WSx.js +3779 -0
- package/_assets/{LoadMore-BxuVAL5h.js → LoadMore-i7_riiE5.js} +2 -2
- package/_assets/{ManaPricingBanner.styles-dfVXcaNP.js → ManaPricingBanner.styles-Dyx_YmBW.js} +2 -2
- package/_assets/{MyAssets-BbWDjYod.js → MyAssets-Bs1a3OD9.js} +2 -2
- package/_assets/{MyFavorites-DY192etV.js → MyFavorites-C03JcdtN.js} +2 -2
- package/_assets/{MyStore-qM8HV1zc.js → MyStore-ryCuwvDl.js} +2 -2
- package/_assets/{NetworkUtil-B4oEt17N.js → NetworkUtil-BbMBxyRo.js} +2 -2
- package/_assets/{NotFound-CgcYb0ih.js → NotFound-DOO8Ql2w.js} +2 -2
- package/_assets/{NotificationsBell-txLDBZgz.js → NotificationsBell-VR9lnc9P.js} +2 -2
- package/_assets/{OutfitDetail-EWQSU1q3.js → OutfitDetail-Co1A4WCO.js} +2 -2
- package/_assets/OutfitPreview-Ceha9IWa.js +7 -0
- package/_assets/{OutfitStudio-CymFpAjx.js → OutfitStudio-DGibRraW.js} +2 -2
- package/_assets/{SaleCountdown-3pApusNf.js → SaleCountdown-NdYuBnTu.js} +2 -2
- package/_assets/{Spinner-BhJFlkpV.js → Spinner-B5rI43ql.js} +2 -2
- package/_assets/{StoreSettings-CuaXmFqQ.js → StoreSettings-C2dwtV13.js} +2 -2
- package/_assets/{Success-oMsLbOWh.js → Success-B6gpri2D.js} +2 -2
- package/_assets/{SwapController-DrYUKQJ9.js → SwapController-Di8HGSG3.js} +2 -2
- package/_assets/{Tooltip-BIdqgK8V.js → Tooltip-Bj-rfWuS.js} +2 -2
- package/_assets/{TradeService-JsADFsSl.js → TradeService-D2dJeuos.js} +2 -2
- package/_assets/{W3MFrameProviderSingleton-DvSh92CX.js → W3MFrameProviderSingleton-DwbyBYX9.js} +4 -4
- package/_assets/{WebCryptoP256-DgMWbKGz.js → WebCryptoP256-CZzgSMZW.js} +2 -2
- package/_assets/{basic-GpwOtGyM.js → basic-C0ccxPdk.js} +2 -2
- package/_assets/{biconomy-NuhcX0Yi.js → biconomy-DGsEEV8A.js} +2 -2
- package/_assets/{browseLayout.styles-D0MZbKfc.js → browseLayout.styles-Dg021Y7v.js} +2 -2
- package/_assets/{browser-CztLWw1I.js → browser-D3mkrR6N.js} +2 -2
- package/_assets/{browser-D0dzO3fx.js → browser-DfAY1k2K.js} +2 -2
- package/_assets/{browser-ponyfill-BdWvH_If.js → browser-ponyfill-C5RB02M7.js} +2 -2
- package/_assets/{buy-ZzigQNxZ.js → buy-Da1E8jgj.js} +2 -2
- package/_assets/{buy-gasless-5QIoW0es.js → buy-gasless-CaUM9sxG.js} +2 -2
- package/_assets/cart-checkout-uu8usx3x.js +2 -0
- package/_assets/{categories-BCcLvB19.js → categories-DeCaTWZU.js} +2 -2
- package/_assets/{ccip-CcFd-pp_.js → ccip-CIKPg0_h.js} +2 -2
- package/_assets/{ccip-0C-WJ2f3.js → ccip-CIPTk6YK.js} +2 -2
- package/_assets/{chains-BoWQ7jDs.js → chains-CWGwszpJ.js} +2 -2
- package/_assets/collectionPage.styles-DOzyhn9M.js +41 -0
- package/_assets/{common-aEQBU1aZ.js → common-DamPx7zD.js} +2 -2
- package/_assets/{controller-BHSkmDDd.js → controller-J7h5zgkf.js} +3 -3
- package/_assets/{core-Dnx08t4s.js → core-BILweyMC.js} +5 -5
- package/_assets/{createSvgIcon-C3DiORbY.js → createSvgIcon-BOJMqAuj.js} +2 -2
- package/_assets/{crumbs.styles-D969n73j.js → crumbs.styles-6TXvIB5e.js} +2 -2
- package/_assets/{custom-CyjlH7Cr.js → custom-CtbaVsvz.js} +2 -2
- package/_assets/{data-capture-BUt-tqa3.js → data-capture-D_Yc-lFk.js} +2 -2
- package/_assets/{dcl-schemas-CyEZVc6x.js → dcl-schemas-Do6ePE9M.js} +2 -2
- package/_assets/{decimals-BLhtmmbN.js → decimals-CPcEXrkP.js} +2 -2
- package/_assets/{decimals-CiM-QvAk.js → decimals-fY1-YeOV.js} +2 -2
- package/_assets/{detectExtension-CdbTZOKn.js → detectExtension-BzGhSQVN.js} +2 -2
- package/_assets/{disposePreview-D5v9GkJF.js → disposePreview-BhRqNFqz.js} +2 -2
- package/_assets/{email-BGoeypvI.js → email-CDJff6Le.js} +2 -2
- package/_assets/{embedded-wallet-Cg2BVqx1.js → embedded-wallet-OlJuY5Lb.js} +2 -2
- package/_assets/{emotion-styled.browser.esm-Bc8640ZT.js → emotion-styled.browser.esm-dqXx08M6.js} +2 -2
- package/_assets/{engine-BQ4XBK5G.js → engine-Cqgf8_-e.js} +2 -2
- package/_assets/{errors-DUBMk1_u.js → errors-COVZQXFS.js} +2 -2
- package/_assets/{estimate-l1-fee-Cvh02XjO.js → estimate-l1-fee-cwAe5Vqz.js} +2 -2
- package/_assets/{eth_estimateGas-BH-_dHsN.js → eth_estimateGas-Bi2jA3d6.js} +2 -2
- package/_assets/{eth_getStorageAt-CHailSu6.js → eth_getStorageAt-Drv0-oaq.js} +2 -2
- package/_assets/{eth_getTransactionCount-Ce8ytlz4.js → eth_getTransactionCount-u8vibbIm.js} +2 -2
- package/_assets/{ethereum-AiomgAl3.js → ethereum-Mtg8xwT8.js} +2 -2
- package/_assets/{ethers-CQbljc2C.js → ethers-DVrorjJ1.js} +2 -2
- package/_assets/{events-Ey8xQ1_i.js → events-CcYNTdVN.js} +2 -2
- package/_assets/{execute-CcyXPSES.js → execute-CoAxXj0W.js} +3 -3
- package/_assets/{extractIPFS-CZpI5_La.js → extractIPFS-DlbP2Osb.js} +2 -2
- package/_assets/{features-CW3BJut9.js → features-DNE6dOZ4.js} +2 -2
- package/_assets/{fetchTokenMetadata-zQ7k58lq.js → fetchTokenMetadata-CiNffAhl.js} +3 -3
- package/_assets/{field.styles-CNumGj8X.js → field.styles-Dsz8I5YB.js} +2 -2
- package/_assets/{fortmatic-D7_cu5X7.js → fortmatic-B2QacKOL.js} +2 -2
- package/_assets/{get-bytecode-ChEcvuHJ.js → get-bytecode-DCxZ_TJS.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-BXFPDksD.js → get-ecosystem-wallet-info-Dpf1xtjk.js} +2 -2
- package/_assets/{getBalance-CdWdKWho.js → getBalance-DacQHsEf.js} +3 -3
- package/_assets/{getInstalledModules-Dy7ryxbR.js → getInstalledModules-_KOhu2kj.js} +2 -2
- package/_assets/{getNFT-DEIlQj0F.js → getNFT-DLLMJ-N8.js} +2 -2
- package/_assets/{getNFT-CVhWquj2.js → getNFT-TgQU4sPn.js} +3 -3
- package/_assets/{grid.styles-DGwAy7au.js → grid.styles-zbj0YrVx.js} +2 -2
- package/_assets/{hashTypedData-CS0nSVCm.js → hashTypedData-C4V4k80v.js} +2 -2
- package/_assets/{hashTypedData-G7W_A13L.js → hashTypedData-CxzAx589.js} +2 -2
- package/_assets/{import-C1FMKChQ.js → import-p1kr6qLz.js} +2 -2
- package/_assets/{in-app-C03QvI9E.js → in-app-niBzraeI.js} +2 -2
- package/_assets/{in-app-wallet-calls-BSt_kW07.js → in-app-wallet-calls-Dyorin4y.js} +2 -2
- package/_assets/{index-QkD5v2W0.js → index-B1-eV0Yy.js} +2 -2
- package/_assets/{index-CbJaCRxI.js → index-B1DNuJsS.js} +2 -2
- package/_assets/{index-B4vPl9JJ.js → index-B39be1Q8.js} +2 -2
- package/_assets/{index-P_yp2lGD.js → index-B6iPDUS8.js} +2 -2
- package/_assets/{index-CAdxESjh.js → index-BC9VPSaU.js} +2 -2
- package/_assets/{index-B9BLMD9v.js → index-BEbVm5wA.js} +2 -2
- package/_assets/{index-CRdAPM4e.js → index-BW2_mJUZ.js} +2 -2
- package/_assets/{index-DNpS4XJW.js → index-BaeSw32D.js} +3 -3
- package/_assets/{index-B_Ukoyjo.js → index-BdTU9iVQ.js} +4 -4
- package/_assets/{index-Bx-HA0Fa.js → index-BdhRH7ae.js} +2 -2
- package/_assets/{index-TuFs6Mw_.js → index-BgrkbkKX.js} +3 -3
- package/_assets/{index-C0q8Kut4.js → index-BhPBG2XL.js} +2 -2
- package/_assets/{index-C53nEuU1.css → index-BhSgZf6d.css} +1 -1
- package/_assets/{index-SRawa_W1.js → index-Bpbs2w1c.js} +2 -2
- package/_assets/{index-WhAOvWl7.js → index-BrTe5eTC.js} +2 -2
- package/_assets/{index-CITTAZNc.js → index-BzKWq7pb.js} +2 -2
- package/_assets/{index-CZ765edO.js → index-C-cdcYSu.js} +2 -2
- package/_assets/{index-DBpSYzZ1.js → index-C9RSadCu.js} +2 -2
- package/_assets/{index-CMsQl6_s.js → index-CD44EXbq.js} +2 -2
- package/_assets/{index-BGlAHo1V.js → index-CEVRFChv.js} +2 -2
- package/_assets/{index-sc9WaH7T.js → index-CEbyUU5H.js} +2 -2
- package/_assets/{index-Cq3PcGZS.js → index-CKb-Chs7.js} +2 -2
- package/_assets/{index-ovxDr1NO.js → index-CRlpbq5e.js} +2 -2
- package/_assets/{index-ZSCJO9rV.js → index-CWE_Bdvd.js} +2 -2
- package/_assets/{index-CzzqMKs2.js → index-CWJFyp1v.js} +2 -2
- package/_assets/{index-mp9sO-P_.js → index-CWc56QrX.js} +2 -2
- package/_assets/{index-DUvDgJtL.js → index-CZEd2SGy.js} +3 -3
- package/_assets/{index-DCOfqwFn.js → index-CZmSHbVE.js} +2 -2
- package/_assets/{index-DiRK7oEZ.js → index-CcTOkZrG.js} +2 -2
- package/_assets/{index-201_pXjD.js → index-Ccey0v_W.js} +2 -2
- package/_assets/{index-BWhGWxu6.js → index-CfGsvFRR.js} +2 -2
- package/_assets/{index-DvGoWYRw.js → index-ChhJ84F9.js} +2 -2
- package/_assets/{index-Bc5rdQrs.js → index-Cn-ULh1k.js} +2 -2
- package/_assets/{index-B0G5-1U4.js → index-CpfmSBK0.js} +2 -2
- package/_assets/{index-C_MZ3G2Z.js → index-Cq-Etsdf.js} +2 -2
- package/_assets/{index-BjTaCUde.js → index-Csp5LciJ.js} +2 -2
- package/_assets/{index-DW4iGfw5.js → index-CwA52DzI.js} +2 -2
- package/_assets/{index-DbnwTj_J.js → index-CwoMLrsB.js} +2 -2
- package/_assets/{index-CseNtOsJ.js → index-CxNh07aM.js} +3 -3
- package/_assets/{index-Cbvqh2tB.js → index-CxOzFLm7.js} +2 -2
- package/_assets/{index-jG0dKzqZ.js → index-D05bb_h6.js} +2 -2
- package/_assets/{index-d0JdYucS.js → index-D8M-5R_3.js} +2 -2
- package/_assets/{index-CeBVhm3u.js → index-D8olnnil.js} +2 -2
- package/_assets/{index-Bvf3c8I8.js → index-DDb_ETfE.js} +2 -2
- package/_assets/{index-D-bvLCMJ.js → index-DLcPHJzx.js} +2 -2
- package/_assets/{index-BHRJojA7.js → index-DUaZ1t6t.js} +2 -2
- package/_assets/{index-DHAeKuI8.js → index-DXmPq_Kc.js} +2 -2
- package/_assets/{index-gx6q3jYb.js → index-D_SCQhiC.js} +2 -2
- package/_assets/{index-DzXb9yfS.js → index-Ddqdlsoi.js} +2 -2
- package/_assets/{index-DYEzTJ00.js → index-DeaVX3Ga.js} +2 -2
- package/_assets/{index-Dr8MILBs.js → index-DjQWTjO5.js} +2 -2
- package/_assets/{index-BDhEGVn5.js → index-DpJ4zJ7r.js} +2 -2
- package/_assets/{index-CSAbgA1H.js → index-Dpu-M2gs.js} +2 -2
- package/_assets/{index-BYpz1U-Z.js → index-DrGWXFkr.js} +2 -2
- package/_assets/{index-C8RRvl4w.js → index-Dyy6WQp0.js} +2 -2
- package/_assets/{index-Csid9_UU.js → index-DzWgqsYH.js} +2 -2
- package/_assets/{index-VVP1Lz5F.js → index-I_W87dfE.js} +2 -2
- package/_assets/{index-D7n0Nbcc.js → index-MqPRfHS_.js} +4 -4
- package/_assets/{index-DtQZWv2W.js → index-PmcUrVFZ.js} +2 -2
- package/_assets/{index-D080sfYK.js → index-U6lik-J8.js} +2 -2
- package/_assets/{index-4lxXm67R.js → index-WiX7N7NB.js} +2 -2
- package/_assets/{index-CtUq3VAh.js → index-_AZXosO6.js} +2 -2
- package/_assets/{index-CVjhybQY.js → index-gg05iP5j.js} +4 -4
- package/_assets/{index-rWvX-JNU.js → index-iRDDuzQN.js} +2 -2
- package/_assets/{index-Cy_pguIe.js → index-pibLOLKX.js} +2 -2
- package/_assets/{index-DmEpmcAI.js → index-rsyTCpy-.js} +2 -2
- package/_assets/{index-4y3ole-I.js → index-sTnDYGsF.js} +2 -2
- package/_assets/{index-BiR1vPRL.js → index-y9tZLe7Z.js} +13 -13
- package/_assets/{index.es-DmJ25C-K.js → index.es-BZZFX7UO.js} +2 -2
- package/_assets/{index.es-DF1aG5Z7.js → index.es-CPftFMVM.js} +2 -2
- package/_assets/{index.es-B3Zhssg2.js → index.es-CWkiohwA.js} +2 -2
- package/_assets/{index.es-CuJy51Rq.js → index.es-p9GOzpcM.js} +5 -5
- package/_assets/{items-empty-BAKFq7PT.js → items-empty-D3SdcrUb.js} +2 -2
- package/_assets/{jump-BolxKTOM.js → jump-BLEV_WoY.js} +2 -2
- package/_assets/{linkAccount-D4jgrDpa.js → linkAccount-DAFP48le.js} +2 -2
- package/_assets/{localBatchGatewayRequest-BMvn0i_b.js → localBatchGatewayRequest-dB8Wq4kD.js} +2 -2
- package/_assets/{modal.styles-wZfJxa-e.js → modal.styles-C5SxmNLg.js} +2 -2
- package/_assets/{native-BS9-NZgY.js → native-CBQhq49N.js} +2 -2
- package/_assets/{networks-BuXAUv57.js → networks-8H1PRpMW.js} +2 -2
- package/_assets/{onramp-B2gdYmCO.js → onramp-J5H4ebWV.js} +2 -2
- package/_assets/{openzeppelin-B_FytaNI.js → openzeppelin-D4p4dWkw.js} +2 -2
- package/_assets/{ownerOf-D6JpENJA.js → ownerOf-6NPphff8.js} +2 -2
- package/_assets/{parseNft-DiM6gxbM.js → parseNft-CNeONFsP.js} +3 -3
- package/_assets/{parseSignature-VwEmUV8h.js → parseSignature-CRChMV-U.js} +2 -2
- package/_assets/{parseSignature-BJVq2ShY.js → parseSignature-RdZmR6vg.js} +4 -4
- package/_assets/{passkeys-DEiWC5Z7.js → passkeys-asZ3JuTk.js} +2 -2
- package/_assets/{pay-with-exchange-C7Nm7Ic2.js → pay-with-exchange-Cv_5xsJB.js} +2 -2
- package/_assets/{prepare-contract-call-r6GCr7Mb.js → prepare-contract-call-Bgba2npe.js} +2 -2
- package/_assets/{qr-overlay-mbqSXRsy.js → qr-overlay-DkizM6BP.js} +4 -4
- package/_assets/{react-DKpLHQl0.js → react-ZT2P9-hV.js} +2 -2
- package/_assets/{receive-KMWzb1kT.js → receive-CawQ-n3T.js} +2 -2
- package/_assets/{resolveImplementation-NjDCaPa0.js → resolveImplementation-BVnQ0KdI.js} +2 -2
- package/_assets/{resume-buy-DRxVLtZn.js → resume-buy-VqFhR9e8.js} +2 -2
- package/_assets/{resume-name-m2sdJCvP.js → resume-name-CTz059A2.js} +2 -2
- package/_assets/{rpc-C6ONv-35.js → rpc-BJ7rd6au.js} +2 -2
- package/_assets/{sales-empty-BJGisiNF.js → sales-empty-l9JLZ5D0.js} +2 -2
- package/_assets/{search-empty-DcGDTM8L.js → search-empty-CkXuQVln.js} +2 -2
- package/_assets/{secp256k1-ZRJNrIuk.js → secp256k1-BGQ_Uqpo.js} +2 -2
- package/_assets/{secp256k1-BhLjMGke.js → secp256k1-BaU6Nn5x.js} +2 -2
- package/_assets/{secp256k1-Dogd-wfD.js → secp256k1-Bu5sn1ZV.js} +2 -2
- package/_assets/{send-B4t6gmpc.js → send-DONjIfwF.js} +2 -2
- package/_assets/{send-batch-transaction-BULbschT.js → send-batch-transaction-C_JYVBkw.js} +2 -2
- package/_assets/{send-eip712-transaction-B5q6HGy1.js → send-eip712-transaction-Clelg5Q-.js} +3 -3
- package/_assets/{send-gasless-transaction-BW_1tZ59.js → send-gasless-transaction-DNc4O0S0.js} +3 -3
- package/_assets/{send-transaction-D5g8ka92.js → send-transaction-pFbo31gg.js} +3 -3
- package/_assets/{sendMetaTransaction-BiqdXKVl.js → sendMetaTransaction-BcKatlZr.js} +2 -2
- package/_assets/{sendRawTransaction-DHZVBFUc.js → sendRawTransaction-BM57FQWh.js} +4 -4
- package/_assets/{sentry-WFsNKO98.js → sentry-qVQnooqM.js} +3 -3
- package/_assets/{serializeTransaction-C1OICSTJ.js → serializeTransaction-FdLqYQ-w.js} +2 -2
- package/_assets/{session-proposal-C_rldw8k.js → session-proposal-CAm5TVJB.js} +2 -2
- package/_assets/{session-request-DRsdGyCL.js → session-request-C8xtyN3L.js} +3 -3
- package/_assets/{sha256-YJL3wOOs.js → sha256-CcM85_-b.js} +2 -2
- package/_assets/{sha3-DxT-REZ2.js → sha3-FAYNGyBi.js} +2 -2
- package/_assets/signin-empty-UN_rVDWL.js +2 -0
- package/_assets/{signing-B9DcFwzm.js → signing-FPVJ2eSa.js} +4 -4
- package/_assets/{skeleton.styles-C4BBCe2d.js → skeleton.styles-DTLcQB9A.js} +2 -2
- package/_assets/{socials-Zki4qksa.js → socials-BHL-s99I.js} +2 -2
- package/_assets/{styled-uWbR3175.js → styled-BOKv7XKm.js} +2 -2
- package/_assets/{swaps-DiPvT9W6.js → swaps-DDuyuFV1.js} +2 -2
- package/_assets/{thirdweb-wDwbIJ1W.js → thirdweb-N4oYmhTQ.js} +4 -4
- package/_assets/{to-serializable-transaction-6f6pRX-q.js → to-serializable-transaction-DZXV0RS9.js} +3 -3
- package/_assets/{totalSupply-rJ9WcMzs.js → totalSupply-DnoXRYZk.js} +2 -2
- package/_assets/{trade-encoding-DcX77zVS.js → trade-encoding-JnGsRcov.js} +2 -2
- package/_assets/{transaction-DxXkarJJ.js → transaction-D82LqpKn.js} +2 -2
- package/_assets/{transactionReceipt-CxzioWsu.js → transactionReceipt-DEqK-l-5.js} +2 -2
- package/_assets/{transactions-BGQTb4VV.js → transactions-1TYNoevC.js} +2 -2
- package/_assets/{useCreatorSales-D4BzYp33.js → useCreatorSales-oruupPPN.js} +2 -2
- package/_assets/{useInfiniteGrid-BUDyyZZl.js → useInfiniteGrid-56c_34kP.js} +2 -2
- package/_assets/{useStore-tid_idJp.js → useStore-CGFjD1j7.js} +3 -3
- package/_assets/{useTheme-CRxh5DOu.js → useTheme-J18Pg7gw.js} +2 -2
- package/_assets/{utils-Cj21wfvp.js → utils-BE7z1_FY.js} +2 -2
- package/_assets/{verifyHash-mzlxS6TY.js → verifyHash-Buuby46g.js} +2 -2
- package/_assets/{w3m-modal-BArYWi0C.js → w3m-modal-BU-cBw0Z.js} +2 -2
- package/_assets/{w3m-modal-BXpuWB5y.js → w3m-modal-DhWirtG8.js} +2 -2
- package/_assets/{wait-for-tx-receipt-DRwGvrwD.js → wait-for-tx-receipt-CG08f_bj.js} +2 -2
- package/_assets/{wallets-HjCMtUn8.js → wallets-CMB2i32E.js} +6 -6
- package/_assets/{web-connector-15d-OnTN.js → web-connector-BPh_N46m.js} +4 -4
- package/_assets/{writeContract-BJQQGUKO.js → writeContract-BcpztdZJ.js} +2 -2
- package/_assets/{zora-sepolia-BFYuSeeX.js → zora-sepolia-arxykf8i.js} +2 -2
- package/_assets/{zoraTestnet-DdfVMUdb.js → zoraTestnet-DL2ClkoW.js} +2 -2
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Assets-tHTTA31T.js +0 -980
- package/_assets/Cart-BTFM7sgI.js +0 -748
- package/_assets/Event-B3nuIkGW.js +0 -72
- package/_assets/ItemDetail-Bfbuu0cW.js +0 -3779
- package/_assets/OutfitPreview-Cj1w-8ou.js +0 -7
- package/_assets/cart-checkout-D_rUzOn4.js +0 -2
- package/_assets/collectionPage.styles-rZa1BWWK.js +0 -41
- package/_assets/signin-empty-DXl1Qpby.js +0 -2
|
@@ -0,0 +1,3779 @@
|
|
|
1
|
+
import{r as c,j as e,b as dt,L as nr,e as hs,a as ir}from"./react-ZT2P9-hV.js";import{s as a,a as n,aG as Ge,t as i,I as R,ap as xs,z as ve,F as bt,C as ze,bh as Mi,be as Zt,c as ot,x as lt,bk as ar,bl as fs,aK as ct,bv as ms,bw as gs,O as X,bD as Ce,bC as we,bE as Tn,l as pe,bB as un,bA as rr,i as bs,d as ys,E as mt,bj as ws,bi as sr,G as vs,bx as js,by as ks,d9 as $s,da as Cs,db as Is,dc as Ss,w as te,bg as As,a1 as en,ba as tn,bL as Dn,bb as st,p as or,aT as Rt,cc as lr,H as Je,aq as ye,dd as Ms,M as zs,h as Rs,j as Ls,n as wt,aE as pn,a8 as dr,de as zi,cY as Ps,f as cr,aF as Es,df as Ts,cb as Fs,dg as Bs,bO as Ns,dh as Ws,di as Ds,k as Os,ae as zt,b2 as qs,dj as Ks,a4 as Hs,dk as Us,b4 as Qs,dl as Gs,P as ur,W as pr,dm as hr,dn as _s,dp as Vs,aC as xr,dq as Js,dr as Ys,ds as Xs,dt as Zs,ch as eo,A as to,du as hn,V as no,bn as io,bo as ao,y as ro,m as so,dv as oo,dw as lo,dx as co,dy as uo,dz as po,ar as ho,as as xo,dA as fo,B as mo,dB as go,av as Ri,au as Li,dC as bo,dD as yo,Z as wo,bu as vo,dE as Pi,dF as jo,dG as ko,dH as $o,dI as Co,dJ as Io,dK as So,dL as Ao,dM as Mo}from"./index-y9tZLe7Z.js";import{d as Ae}from"./dcl-schemas-Do6ePE9M.js";import{c as Ei,p as zo,i as Ro,A as fr,C as Lo,b as Po,h as Ti,j as Eo,k as To,l as Fo,n as Bo,m as No,t as Wo,a as Do,s as Oo}from"./CollectionCarousel-CrMGuIJ3.js";import{d as Fi,t as qo,e as Bi,G as Ko,c as Ho}from"./buy-Da1E8jgj.js";import{c as Uo,i as nn,D as Qo,S as Go,a as _o,b as Vo,f as Jo}from"./SaleCountdown-NdYuBnTu.js";import{u as Yo,M as Xo,o as Zo,f as el,b as tl,c as nl}from"./cart-checkout-uu8usx3x.js";import{M as il,S as al,C as rl,H as sl,a as ol,T as ll,X as dl,B as cl,b as ul,c as pl,d as hl,e as rt,f as xl,g as fl,h as ml,i as xt,j as De,W as Ht,m as Ut,n as Qt,o as gl,v as bl,L as mr,P as gr,k as br,l as yr,y as yl,z as wl,D as Ni,A as vl,p as jl,q as kl,r as $l,s as Cl,t as Il,u as Sl}from"./CreditPackPicker-COb2KClL.js";import{m as Wi}from"./mana-matic-CEqvSwrJ.js";import{m as Al}from"./mana-matic-light-Bl5duieC.js";import{q as wr,g as vr,t as Ml,s as zl,a as Di,b as Rl,d as Ll,i as Pl,e as El,c as Tl,f as jr,m as Fl,k as Bl,r as Nl,n as Wl,p as Dl}from"./trade-encoding-JnGsRcov.js";import{J as Ol,p as ql,C as Kl,I as Hl}from"./ethers-DVrorjJ1.js";import{a as Ul,w as kr,S as $r,G as Cr,c as Ql}from"./buy-gasless-CaUM9sxG.js";import{R as Oi}from"./resume-buy-VqFhR9e8.js";import{a as Gl,f as _e,i as yt}from"./errors-COVZQXFS.js";import{C as _l}from"./Confetti-Bd901H1c.js";import{b as Vl,J as Jl,a as Yl}from"./jump-BLEV_WoY.js";import{p as Ir}from"./import-p1kr6qLz.js";import{E as Ve}from"./ErrorNotice-Cm0KaFyV.js";import{L as qi,M as Xl,B as Zl,H as ed,T as td,A as nd}from"./modal.styles-C5SxmNLg.js";import{S as id}from"./Spinner-B5rI43ql.js";import{M as ad,E as rd,s as sd}from"./sendMetaTransaction-BcKatlZr.js";import{E as od}from"./EmotePlaybackBar-DyYs6qdM.js";import{d as ld}from"./disposePreview-BhRqNFqz.js";import{T as Gt}from"./Tooltip-Bj-rfWuS.js";import{S as dd}from"./categories-DeCaTWZU.js";import{c as cd}from"./crumbs.styles-6TXvIB5e.js";import"./sentry-qVQnooqM.js";import"./intl-AKLEHPeO.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]="363e8dfe-8747-427b-8eb6-c982f7ed2ffe",t._sentryDebugIdIdentifier="sentry-dbid-363e8dfe-8747-427b-8eb6-c982f7ed2ffe")}catch{}})();const Sr=216n,ud=(1n<<Sr)-1n;function pd(t){const s=typeof t=="bigint"?t:BigInt(t.trim());if(s<0n)throw new Error(`Invalid tokenId: ${String(t)}`);return{itemId:(s>>Sr).toString(),issuedId:(s&ud).toString()}}function hd(t){if(!t)return null;try{return pd(t).itemId}catch{return null}}const Ar=["cancelled-listings"];function xd(t,s){s&&t.setQueryData(Ar,l=>l!=null&&l.includes(s)?l:[...l??[],s])}function Ki(t,s){var l;if(s)return(l=t.getQueryData(Ar))!=null&&l.includes(s)?void 0:s}function Hi(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 m=l.kind==="gone";t.setQueriesData({queryKey:["owned-token",d,u]},$=>$&&(m?null:Hi($,l)));const b=o?["my-assets",o]:["my-assets"];t.setQueriesData({queryKey:b},$=>$!=null&&$.pages?{...$,pages:$.pages.map(h=>{if(m){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?Hi(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 fd(t){return!(t.isMarket||t.forSale&&t.priceKnown||t.manage||t.soldOutWithResale||!t.stillResolving&&!t.resolvingTrade&&(t.isTokenRoute?!t.ownedAssetLoading:!t.deepLinkLoading))}const md="data:image/webp;base64,UklGRqgOAABXRUJQVlA4IJwOAACwOwCdASqEAIsAPj0YikMiIaEWuib4IAPEtQBl0QC/bukK7J6X8cPZP5F69/Nvhj8oPlD3odY/QB8RXPv/C+3n59+izzA/0l/3/9064PmD/bH9Zvey/33r8/2PqC/zH/fdaX6EX7O+nP+3Xwlfub+33tOf/+7N8wTMuJT/znss7V9qD/DcDplr/deudN0/Rcajjp49/Q//7vLR70+4X+tP/R9az//+3r9z/Yk/ZVVfCa+jj+kU2kxc+zPDZIZQYWF19BTevkFTZdPnQBT3YukdDX/AtCNcmvBrFJ96eYkUWaCCtnOpfB+/IETSsPYuwsabIrqSWHYoPBskXi/DUubCFDAf/6+0pCLU1kmMIueWH8HebltZsATbIO+vXwG1gHAXjGECElz7j/+GXHZJM9ORAFgOa/b/pGdMUEE9PfuMHx1G3GpnRw8WEP5FknNoUNOyb6iY5VX/W5w6pnS5r1srs4CXTuHzUJLdvXVpyiQNuBwCyLYlukPjvLuqqHRrv5/jHTa1L+iumi2wLA8NzahM3euE6fvC7shIbIWajyLkVYhWOOdMRjOWdhSN1wi7JvE4t+bFXSVHOX+4DnQxVhhUKacLKMYPHhQKLZSdyYzM66dZ22undenNBcAjNHjBW+9t0W2glcAA/v44VaU8mJJP1Vz1l456kKu23B2wH7M9h1OtAwoGAGj8t///XA7H+OEVSxGjYfFAlM1Upvv/NmvKOBdxK8JXyQLqAqwy0bgja/QQTJKOEDkKXVg8HRGbA4YhU/9KZ5ulhbrnm7S6a3XhSmzHNxDfaPRezgQ0/P9ZW+KbLltsoK42ORYMdpD+ZNjvwybgVPBD9EHv+g73MeRCpYGemyJk33SfCLWO6KdUBlYRNr8Mo+qAoyC9JkWFe7IXV7Z97jmAJIiqXCgQLxyeB+hbtaa+FYbgl1eFTp7G94pdaY/8UctUnxSI5D+T1JSv+XjPm9esp935RnwxdbS6hotafVZHEYXhNE4yJuAqxUJUaOkBZ4Q5Np6wPjASRuycYuHZCHt2R3u3m2lnPOuVzRIM8oEZ+8HzouhdC8oAvg58NyHo8Vf/7w6NRKTABd/OXH580LMQQTdyszsubdMC9/V6zXxPvXQB4tlSIcLFtIZFgSmZyjuhvazQPJXERNOoR7CaZw2muWotmc1HOhl5YIiupxst1r61HraNl8+SaP5hh5c7eE4Z6mR6kPSQtsPTv801VocMwO0llrMRk3g20bZASEJCSF4Xx+DAKcXCpAzekMGHeOQQlMSqol0oZ2ysJ28N7WILeisnEJpp8bXhs8i8xP/JPeJ2mWM/qBOuL4jtzJRTFsHCrSkF/+pIoYxOUwFvqJ2lIDhsQ+Dz/qLXkaF2dV0Db/02Uizaa1nU3ROJmPBQ6h+88RI0hr61bueh7niiMRqzuJoERGL1qHWPKkBT/sDemsRnxsjKFqcFLTTAMZxAHbmHPs5H+gAJu4EWTOsRVgo4wVNO7iEWnl8abB2NKiM08EauUs8uWo5Z315p9I4R8yNXBrdAFfvjjpJnweJotSWdraKLe8Nl/IYJ30/Dch5FFjZQDeUJyDjNQ7UncafuesORQsS8gbMBhIjaMpkz6lFhQXTEwXffXf7Igim1f2TvIBMbUucINFHNBalbwuR9n4nktwHAAfhJinTX1ZSIcI1ivEBZqhr0PihAYnQEI4t+UIeMlIexMcD9pex7ffiC7xTypCNQZ4els7i0w1dRQPGkGSiqBhVpmYU/fa5AEsstEza3yJiyo46A8tdBZR7k+QjkjZi4R3JTDru7uAH8uAs99WmAWo7EtCfnIVcFLpMMVm4ysLp+H8w7tsa7oiAMOicQjpI206qt9gXJK0SRDCqXnpQPO5Za/sa0F9pFtQdk0IWV1bUZl50bsz1jRSgkgGLnG7codLl+O70us5JrrEAGElgaaXnHmCBhRme/TrpssMp3xOmZk0SYGH4jXStL3ojRg1WS450m9OdBzDKSErTczJlZu3nVH0YlqU/vLXp8ZUrVMqDnxO/EDMcahK1NulV8mcj+VKn2kPGku5QKF7iJJ93wd472rPI/Ty+MgECIrxo3TeA9OD96pLAgpF+t5iFercE6smtM9t5wruffSJ5YsS5pfMVNDdsPVS/vqwqHZRqUOSVWSD7wcqsWWt/WN3HUKS6iMJZmWe1iI77VOQ3eXgNA3zI7C5meewdOYjeaBg8EZ4cvdhJKn/67zSZITA8+fLTxDPm67nxcLbn0wDujGAF6ej27TC1GqzrpfQw+lBiRxSz4jn8x6VpAlKugU0gBAuZ2+zgZzWdAbq7juw3/PLVwGoU2eek5v1hW8Yi+T4pFEd7BdDbQRpv5l060TsIDWyr9/Pu6Tx8Sw/pTLwo9gG5L/9I96u2gJNoTogVbEpdYwfpMHBIK4E6gJ5WN2U5wK1nBhrHIFmBXZAyRjaCkurXxFowaB+aWWdVEz+6qj68/QnbWxjpU4xFg9mlaF5HokpyipN1BP+k6+3NQScKOSoApBIXm21svSUNNsYAQ+zgmQ6ZkAuSAynxgKswcfJiuA/e2Nuv6ODDw2h2Ceq5hldyZOZeMHbiAYuM60m33jsww0Uz8+4/Bry8tjZgXaLV/rlL5uP5pLf69IGbOFb1crxcN24yoKmIUAdtPf/co1SMQaxe913fYm8SZSj915c3LIj6HJguanjJB6xbKrwwZw9vmhrhshZpL2fNE3anpscm25z86/pFd9p//RYhaUgA56qx4HTvcD8lvvGAIW22PuYEMmYiZSbeHxpCKrG9iOKsxe7LXBfbQYCY12ed09vd/sLTpEmjuW1E/TSy9EhvRhF69d0KSSUeK1/2fqD9GZPe2s80Jdih9w6NwLxO/AC8AeZjS8gZIOafjhXVpzaKvhix8s1cO27cpUc/x13ywHu7WNVApWpCMNak9/QsanffreW5zk5UGrb/XFcJBpw/fp7Y3P/TiVlv9tm+xxsH4iw1MojhGsNJqBf9G0EGCyYh/OIjLOgv/KiVKn4KT9JKP/Uc0gvWfojQoL2cbQ/YHropMzIdwcarcB8fu08LL6cIHAPb9B2z/Rf4UJL/Ubdmy6jlxdkE01o3uWTeD2rD+IAvKf/22mdXvFK7jqHe499e/ceQouvvdG6cBfIpIAkF5/R7eOANm/YyxLS/ZfMwsdOv+JfuzzugHhAo470jWPURUr0Xn4njgpqI+Qj94gnkGTC0ReIxqIPS1b+RbjDc4MZZ9MAklPArtww4KsqO2JaWOom1/1AxsyPutOFrKBiuTdjE382yfu5g+GJKuwQu3cq2dabFpJyy44S7v5bpURssVtr1D8mxEYVlQ8fly+KRc+ozMRv8u9dj5jffRCTLisRHP3X8ahsJ2oZhd4aftYRWOx0T+gZ97rtkDRPJzlhfgLyMqiSvJjpxVKpv3PStthRNe8R8F9H8DFoPHSzHLmhe/uDSPeh3WffAKbjMKv32PUBbzp6f4GfwfjQD/xKCCRvV98FxqiqzNKlGnRzdZ6TCwaGLcgYygtYmNZKzhf7rOF9XXcVsNe/FloRRkBYeol7dma2BOGazDoZhxAkI5TWDGkO8Rd23eAUtpTOtgLoJdxik+XTsCLBz3xztmixjiZMgk33zVBoTsxJCpowT8UgJm56EBgWIJ8zDHdKSIvYtAuQo90BfPpwlqLFvQ62szIXGObwVCJBdaPQ6AOlSDrg/4M1Xptssca7lnD2z+0dh3f4AYJrPrGcXP9SGBq30IEgvBsrZOjfe7U2ZVguXost19mo1m/Hb/FwWSc3O9fFFBQJhZEYd9T8i0MIYbgdWdTEH41gDraRIKZizyjK4jVPPgi35lSRpQkyGFqloeLs0ULHVnqozYp97FxyjGuHBsWiA1dhcOzxWfb+9L2kk8EkzMe++yJQ9GqbD1xtOvYtb2UOexwpbDJAFJlPRYBxrMkATgGwSW4A2LWZy+pBo0GmiM1YGavhsPEBxglF83gZ9QIggiukPYB85BDmmb8ru99wD+DQvP4hu2YCz6A5kp/sJD3qOI7HIsJxRDkaO3sf/bYfZuqa3LdVmIT853KYb79N6neXufSxFSQnyi30mJHYwVcLOmAbDRvHYwF83Y4b3NN8NOUSH4LXUFaZBoYelYzeiQg8IgkLa+g/RwRCUThxaOaTGfQNDGN2fFLJrDqh88e6T9bmWy9AzEoG29fv9hO+1zA0iEWnoTtNr1dBlC2eHYfWgoiWCBVcaC6cO6fIpEIncf2VapcojDaS3FujWm+w8IoiKoq9+Zzm1wng7TIKJKpp1mkbm3M2In/0vTqkGRtDVzLmUu/MzvzlpfyE7VFsAdsreB5BqSs60/mfodU1+j2SN84H1YurnWx4Z0u73N5QCNLLIlXEzvcE48IcvnvHogKXfYviH/f2iBtI3vrK3GIiThSR8ykXmUtIrxTtqbHvy82xxbyqM/ya2sKPKRdTrD85uEPL0Z8dvPiUfiVRCut4V5CnXWKzMKwmyXh2zdT/Wx1klkw4ixJ8NP/3JGF0lDVYVde7ZwEYrPdHJhgCgfH5KfwXpHykSyj20QwjG+7rDeFrrmlBS2dEbI2bOB2rMTgueOmZlfczR+dUuIss1K61IE1X8XChw2KIfkpCOP4G5DW2FBnK7MOx72/39EtlmaGIvi2uPD/S5KJCGWSH/ADxGkdDXJbT7IjwL0GTIWO1pkQgtPfrQ4KW84E+PdkU9hIuQO3a3Vgp9tGVCmDEX5bfo3c8W46FFBoLX5w3HFzNNkhTPTtJV+IO6h3yF4X9d2YxLqM+HnAwS2XyEvNrrcQbJx60XMbhF2fZy8hFLKLl0VHYvud4N/vW3v2siUFHw/s3F2S/62Z0mef3ERpa+28r0gvweNyUduP3KKmphD4cnGwoSlKz/BeXUnlO/hw9Eftd/qtYsyl+fxCu6ydlFSjlf8r5gsxR3kPUVtX3Z+hYk0O6LvcRQsJSnlitd9TCW4zGE59EoMxN2N0izBRDgAAAAAAA==",gd="data:image/webp;base64,UklGRgwMAABXRUJQVlA4IAAMAABQMwCdASqOAI4APjkYiUMiIaEZqk6cIAOEtQBlWQCsPxs/GflL+WHzA1P+zfhD+l/sr8cvBbpH0DOTP9j/evah/rPUf5gn6af7r+49dfzDfsz+yPvGf6f1W/4r/M+wB/P/9T/8+wi9BLyzP28+En9t/3N9pH/y+wB///UA///FKf5/td/0HnLBOfeD9h6++yHaw/yO+agA+p/ExpOMeXoT54Xq72Df1z9Mz2AfuT7OS8YmVmOsmf5jqgueuMtdVDf7/8IGxCrKJVChp/KFp2oKFsO3+XUmwngaj6/KEi7C1DSuCh+zzCla9qnnEkR/lN/ebybUtOwxC/p+mhLOJMySpLEWwLMbmUzXCqcNK16hnpbCN+9vw3+nXHO91JFWS3EIj7YQRHRQllV+lVSTFM7EpzAIoof/7r+m1Y4VEnW29BCxuD7ccWEUcsaJd2V30EeDTbQCaEKZWFPJDxNOW38bQtKqiq2JW1YTvNG580QG2R6n6RStIpR01qX2WRZI0IQp89aKwHBuygxv09yseoLGd7tytCoaI5ow7+H+adzdekfWYAD+/t14UP643nlJr6+fzCSALmONrhm1HM9r/VJjGO780J/4xzq4fmwzMh+yAP7ORoQMYPQFL8+iKum/1qkeJnhtmLx36EDUhiylPQ1f/qsUYuEhCbZyW2XdXCBD6slorbYJhPZwGmkvNnewiRvcjvWe/0lvRe9+QjeaSNVOY2ffJT8NEWYqjJz0kA+mY53/IW+QpHju9l0d6eT6y8FYqHsW468sTTOvbtnAoyEhXaKkNND6o8lteDtnWHy+Odw4k0hfK3nM0cM+kp2GLZ+CT8ioE50GyNbNgn8B8vCW4Eb1K4YoeNGuq1kvFzfgCWvcW2sZTTO3e5pXWr9cnX3FbDGqPTujc9duJ35YmVbpjyAcEoH1KCsTRrycxu43ZGHhfL+GmEAA8o+8wd8lAHeorj9Ryp7uuWZ38R9AQACcqcUXurMjB7gxTl/8xweLH63MF21d2KMg4fem8ZkD3SkUG7Q2rP54BMmdjxJ9JgaZUrMBrV9GFqpJczgl9UAaP3Q/7R7nbexZ2UeB3HiCy5MKPjugecflKlll5aFJ07nRCYyOLOH9fb16mNlL9mWM259E31qcK4wpda3WGYMHOBOaKNfOxovW/u1df+qNevMn1SC/4vGKJstZ9PqE5btrilfwv0nSAQj/Q8dWAb3WKIAty9DT33t9vLz+e4aQNXru1U9rK+wTBmpCqEX9pSfSBywG8++6tF9Dzvt2dp4Ly/5FJPaOcH8+nU1a4l+XoTwpqk+yKJ0iY57ceXfl4fU77cs/8L0P1s44NWEIIX86Dx3zJvZGkQIn7YASFbLuKUuL3yyRmjK3epZIzS8q6ehQeQqVqnUw5eIPN0EX1yynGeDQjR24rjnxVtUlIqynCfszNLYPYyMIwwON0q2nCWvku6CZCUlEuZx+rruZ0xqcBzHF3xWmXItXuids516hkBSbPMThKqgTUZMGMMZ62azX5N94SBL7v+uS3P1ZCIza02Pgn8T/7NTE78CT0LmzqBEC1cH4OXLHyTqY4j+Cv4FoAejB3EJwCMhQiMLdnkb5qW+J4vEOTFUB7Xtvd2QgBXt0k5szm1QueRBDJMGAt549zXUvC1ayeSEuaGWhwb/JWOZA0tRqXLQIHMmA82/fqojN7zFdCeuCpV6YJGfleJFx9hM3E7DqKfRPG4dnevUWEzc89PCbOwSauxRXX967+DJbLaRzaXYPAP/+OlZ3hsk3xp6FDz62cJz/7UaqZ+L8ljKHJDJWb9z+bmcBGTKwg/bFy7aMSTVyVg/9Enj7xbwkU2zfy1/pKg7+NgTQWum04uv1OJbN57ArGK7D490MId38WjC65l78Pzu7NrN+B5ijzNoWH04e9Pcl73tni1fiORqqFrog6q/CamsBAlZRZWBLHKtN6Yh//b8qVGprn8VPF/VK7nZW70N1XtzyT2leLRfwRBqo4SIhuvqxOdHKNJHg1LXTlB/coShBHuyLS6wu/+o/YEwXybvqf7Ojys881X2cXNmexU04k0vUcyy+rKGmM6FnI6THfe2Tix72WnhHh2AingEVPQUoIIJG/7B5WrgJ2xfS2lCjFca1D73Hm7ye+fLOZSi+2TchrOAv2hi5xEYo5KiLYwKu2IfS0p+QqzkMEFyCIOuC5NFapFAWKWQ4O86kaENGqe1+v1ZILPmw86ztmGYuIizbkFakccHhURH+Ve+h8AyTPfiC9+E5uxgWh8E6sT7nhJN09IOah7RxqqKRX6/DFYH2bNmBZyWTrbWW1s1eweEC3mN7vG3Xt9bpw4bRqMuHNPiNK85445nBEmityQdIjtjF3JrZ9HpOaGrIuaaeW3iH7C44ITfsHcVJY/vTdpC3tqmtf6/BZ93mlQFBY0MluEiRTe7oUB1E7LiUGz8rkQZKJJIZ8JMSfjqUHyhDrL+B56rUW+pbd3PqVOLYiTglN+0DPhK3WpSI6wpdyvXOsWHG4Ta5xPCXk5JZSlld8F/X2O2QLiHXW587NTGkyZLQ6JCTo39tmm7vd3es4poNsDPbjhYJyGpRAqxjHLWCeyeJlvbDOieNltR+r952RSdtbkG3oHdvfxW6Pjb2YAyxaThXMTTyT/zYYm1Io6wic5GHpk2XOYbuPpM7ZevMxHtXuBU8xAFZEdeyKTe9uH/UGK8BYHm+N3bjkSBBpccHo+7RNVIX0s99vCP2NiXc4nAAswcNqVIDGDGL6yw9mQLnqJf67m0nhpkYMDU727dp0HJr9Ha4iu2nYrY4WbHC36j2N6iLfMKcTWaiJt5jGxWzb8A4vlC0YiHxi5G6hurHxARx6MMSf0bJmtyeeiRQVN0qy7dj2EAbarH0fHm8s8R9FBsmP+MaJ0EUAPwv7ty5BsY6D6Hyr/0JE2SgiBzriUqckvhNPR/OwC+JD1Mm2bjOFSq3qsiw9Kiw1KRymrWkF4Qd4V3XEi19kg/72fWqSSD/uvXkbLvcUeuGxmWIlDoBdKEkl/ld8xhLrLwdg7FyqOP4DS3VTAlFdd9/5MRMl56GDvO+HKTHXbsW9X+r6GRr2IX31uEVBI3/pfOScwYkF4hYkTmzP22VY8UCUvDruM6mfYED5HA88Gd+rn0t/0+v1vs1ArAcyeSS+U1QWvfTziu2+evgTaZB/x2HIzCmH0LGpMC6803Upr2innO/UcDUHEYKg6Un3+HxdlU2lPbniy4HPzLfzrAE94TRlcuoeOqrcTI7eAgYRNKwXh7XIeFrCsmIRgrt8YMu2v4jM0icqwly+QPuy2Kw8J6cXH2BA7K2LAF85VIVNVoRlDLXxjwsBb4heeCxAzkU+gm7I1b5uvL3i2xq/xj+lhL8t6XTKJliRrlPGHQuVR3ZceU87KLxOQcICfVOCe7B88mxyvsB2FmiotOM3UOnG+VcZ3jL1W+JFDzYyR9Y3KsZNaeJAazd5ajmnZLTYIY7gJ4N4t99U2hY/CMgI0yMNLaq3cJB0CNBsd1hRKl7lZ1wMh16/EZx5jig5JWvlZNPTMuJFHvpW42fyFjIfKslwVHB/SJKWDRr3w9uFCRm/Z3ABn2ydMFGvXjMZEaTsZlqF17J76wjrLkgmgcbtrtL9N8T3dXsKhM4LPscSPo2kc9MfW3dmjuo98vCdxBR/RvMAgm0VzEuXulny1QdmDMzoBUfPseIFkTNYFg89+m4OKn/8Xc28jcPteGx8v0vwYyKNlOAZvi/yt7OImF7kADj+rzqjSoqwVTnCCjOKrF1Gt1i+6oeDggdd5wEh1ghvxdHELxvJeJE8x82cfHEVXhE9Nheu7Q1WycLXUTZA8oZHsdBaBFpk6vyYdYFT8YTShaCjPle1+2DJHzXzhRUQ6ZY/HcDs/vS2V8+jO+pjV23u5WL6yRWULzVi+0qUXIiJzd9qj65YnWPMxIubcSpm+5n8vMpysoMuGzoNwBmNszF+S+b8acZRgm2Gi0UT5OGuYwq4wZ5kmd8OqnDzhze2RxwMRtRm+17eKYWzLWtgVuOca/HWuBI58UC9FNZtBLv1l2htg7Iyehb/cr9uKvXkPXh0LFeyfEc49dOsGvppssGqOAAAAA=",bd=a.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 24px;
|
|
5
|
+
padding: 12px 16px 16px;
|
|
6
|
+
min-height: 0;
|
|
7
|
+
overflow-y: auto;
|
|
8
|
+
`,yd=a.div`
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
gap: 8px;
|
|
13
|
+
padding-bottom: 16px;
|
|
14
|
+
border-bottom: 1px solid ${n.colors.gray4};
|
|
15
|
+
`,wd=a.h2`
|
|
16
|
+
margin: 0;
|
|
17
|
+
font-family: ${n.font.sans};
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
font-size: 20px;
|
|
20
|
+
line-height: 1.6;
|
|
21
|
+
color: ${n.colors.text};
|
|
22
|
+
`,vd=a.button`
|
|
23
|
+
flex: none;
|
|
24
|
+
display: grid;
|
|
25
|
+
place-items: center;
|
|
26
|
+
width: 18.535px;
|
|
27
|
+
height: 18.535px;
|
|
28
|
+
border: 0;
|
|
29
|
+
background: none;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
color: ${n.colors.text};
|
|
32
|
+
|
|
33
|
+
&:disabled {
|
|
34
|
+
opacity: 0.4;
|
|
35
|
+
cursor: default;
|
|
36
|
+
}
|
|
37
|
+
&:focus-visible {
|
|
38
|
+
outline: 2px solid ${n.colors.accent};
|
|
39
|
+
outline-offset: 2px;
|
|
40
|
+
}
|
|
41
|
+
`,jd=a.div`
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 12px;
|
|
45
|
+
`,kd=a.div`
|
|
46
|
+
flex: none;
|
|
47
|
+
display: grid;
|
|
48
|
+
place-items: center;
|
|
49
|
+
width: 180.465px;
|
|
50
|
+
height: 179.763px;
|
|
51
|
+
border-radius: 15.746px;
|
|
52
|
+
background: ${n.colors.media};
|
|
53
|
+
border: 0.176px solid ${n.colors.muted2};
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
|
|
56
|
+
img {
|
|
57
|
+
width: 149.568px;
|
|
58
|
+
height: 148.866px;
|
|
59
|
+
object-fit: contain;
|
|
60
|
+
filter: drop-shadow(0.736px 2.945px 3.682px rgba(0, 0, 0, 0.1));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
${n.media.maxWidth("mobile")} {
|
|
64
|
+
width: 120px;
|
|
65
|
+
height: 120px;
|
|
66
|
+
}
|
|
67
|
+
`,$d=a.div`
|
|
68
|
+
flex: 1 1 0;
|
|
69
|
+
min-width: 0;
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
gap: 32px;
|
|
73
|
+
padding: 8px;
|
|
74
|
+
`,Cd=a.p`
|
|
75
|
+
margin: 0;
|
|
76
|
+
font-family: ${n.font.sans};
|
|
77
|
+
font-weight: 600;
|
|
78
|
+
font-size: 20px;
|
|
79
|
+
line-height: 1.57;
|
|
80
|
+
color: ${n.colors.text};
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
text-overflow: ellipsis;
|
|
83
|
+
`,Id=a.div`
|
|
84
|
+
> div {
|
|
85
|
+
font-family: ${n.font.sans};
|
|
86
|
+
font-size: 10px;
|
|
87
|
+
line-height: 1.43;
|
|
88
|
+
color: ${n.colors.muted};
|
|
89
|
+
}
|
|
90
|
+
`,Sd=a.div`
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
gap: 4px;
|
|
94
|
+
|
|
95
|
+
/* A 24px slot holding a 19.855px glyph — keep both boxes rather than one flat size. */
|
|
96
|
+
.ico {
|
|
97
|
+
width: 24px;
|
|
98
|
+
height: 24px;
|
|
99
|
+
background: ${n.colors.text2};
|
|
100
|
+
-webkit-mask-size: 19.855px 19.855px;
|
|
101
|
+
mask-size: 19.855px 19.855px;
|
|
102
|
+
-webkit-mask-position: left center;
|
|
103
|
+
mask-position: left center;
|
|
104
|
+
}
|
|
105
|
+
span {
|
|
106
|
+
font-family: ${n.font.sans};
|
|
107
|
+
font-weight: 600;
|
|
108
|
+
font-size: 24px;
|
|
109
|
+
color: ${n.colors.text2};
|
|
110
|
+
}
|
|
111
|
+
`,Ad=a.div`
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
gap: 12px;
|
|
115
|
+
`,Ui=a.button`
|
|
116
|
+
position: relative;
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
justify-content: space-between;
|
|
120
|
+
width: 100%;
|
|
121
|
+
padding: 12px 12px 12px 0;
|
|
122
|
+
border-radius: 12px;
|
|
123
|
+
border: 0;
|
|
124
|
+
background: ${n.colors.white};
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
text-align: left;
|
|
127
|
+
font-family: ${n.font.sans};
|
|
128
|
+
|
|
129
|
+
&::after {
|
|
130
|
+
content: '';
|
|
131
|
+
position: absolute;
|
|
132
|
+
inset: 0;
|
|
133
|
+
border-radius: inherit;
|
|
134
|
+
border: 0.5px solid ${n.colors.muted};
|
|
135
|
+
pointer-events: none;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&[data-selected='true'] {
|
|
139
|
+
background: ${n.colors.media};
|
|
140
|
+
}
|
|
141
|
+
/* The gradient is masked to the border band alone, so the ring paints over nothing: a padding-box fill
|
|
142
|
+
here would sit on top of the row's content, since this layer is above it. */
|
|
143
|
+
&[data-selected='true']::after {
|
|
144
|
+
border: 3px solid transparent;
|
|
145
|
+
background: ${n.gradients.flare} border-box;
|
|
146
|
+
-webkit-mask:
|
|
147
|
+
linear-gradient(#000 0 0) padding-box,
|
|
148
|
+
linear-gradient(#000 0 0);
|
|
149
|
+
-webkit-mask-composite: xor;
|
|
150
|
+
mask-composite: exclude;
|
|
151
|
+
}
|
|
152
|
+
&[data-disabled='true'] {
|
|
153
|
+
cursor: not-allowed;
|
|
154
|
+
opacity: 0.55;
|
|
155
|
+
}
|
|
156
|
+
&:focus-visible {
|
|
157
|
+
outline: 2px solid ${n.colors.accent};
|
|
158
|
+
outline-offset: 2px;
|
|
159
|
+
}
|
|
160
|
+
`,Qi=a.div`
|
|
161
|
+
flex: none;
|
|
162
|
+
display: flex;
|
|
163
|
+
align-items: center;
|
|
164
|
+
justify-content: center;
|
|
165
|
+
min-width: 36px;
|
|
166
|
+
/* 12px on the left (per review) so the control clears the row's rounded corner; 9px elsewhere. */
|
|
167
|
+
padding: 9px 9px 9px 12px;
|
|
168
|
+
`,Gi=a.span`
|
|
169
|
+
display: grid;
|
|
170
|
+
place-items: center;
|
|
171
|
+
width: 20px;
|
|
172
|
+
height: 20px;
|
|
173
|
+
border-radius: 4px;
|
|
174
|
+
border: 2px solid ${n.colors.muted2};
|
|
175
|
+
background: ${n.colors.white};
|
|
176
|
+
|
|
177
|
+
&[data-checked='true'] {
|
|
178
|
+
border-color: ${n.colors.text};
|
|
179
|
+
background: ${n.colors.text};
|
|
180
|
+
}
|
|
181
|
+
.ico {
|
|
182
|
+
width: 14px;
|
|
183
|
+
height: 14px;
|
|
184
|
+
background: ${n.colors.white};
|
|
185
|
+
}
|
|
186
|
+
`,_i=a.div`
|
|
187
|
+
flex: 1 1 0;
|
|
188
|
+
min-width: 0;
|
|
189
|
+
display: flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
justify-content: space-between;
|
|
192
|
+
gap: 8px;
|
|
193
|
+
`,Vi=a.div`
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
gap: 13px;
|
|
197
|
+
min-width: 0;
|
|
198
|
+
`,Ji=a.span`
|
|
199
|
+
flex: none;
|
|
200
|
+
display: grid;
|
|
201
|
+
place-items: center;
|
|
202
|
+
`,Yi=a.img`
|
|
203
|
+
flex: none;
|
|
204
|
+
display: block;
|
|
205
|
+
width: ${({w:t})=>t}px;
|
|
206
|
+
height: ${({h:t})=>t}px;
|
|
207
|
+
object-fit: contain;
|
|
208
|
+
`,Xi=a.div`
|
|
209
|
+
display: flex;
|
|
210
|
+
flex-direction: column;
|
|
211
|
+
min-width: 0;
|
|
212
|
+
`,Zi=a.span`
|
|
213
|
+
text-transform: capitalize;
|
|
214
|
+
font-family: ${n.font.sans};
|
|
215
|
+
font-weight: 700;
|
|
216
|
+
font-size: 15px;
|
|
217
|
+
line-height: 26px;
|
|
218
|
+
letter-spacing: -0.2px;
|
|
219
|
+
color: ${n.colors.text2};
|
|
220
|
+
`,ea=a.span`
|
|
221
|
+
display: flex;
|
|
222
|
+
align-items: center;
|
|
223
|
+
gap: 4px;
|
|
224
|
+
font-family: ${n.font.sans};
|
|
225
|
+
font-size: 12px;
|
|
226
|
+
line-height: 1;
|
|
227
|
+
color: ${n.colors.muted1};
|
|
228
|
+
|
|
229
|
+
/* A 13px slot holding a 10.4px glyph. */
|
|
230
|
+
.ico {
|
|
231
|
+
width: 13px;
|
|
232
|
+
height: 13px;
|
|
233
|
+
background: ${n.colors.text};
|
|
234
|
+
-webkit-mask-size: 10.4px 10.4px;
|
|
235
|
+
mask-size: 10.4px 10.4px;
|
|
236
|
+
-webkit-mask-position: left center;
|
|
237
|
+
mask-position: left center;
|
|
238
|
+
}
|
|
239
|
+
`,ta=a.span`
|
|
240
|
+
font-size: 10.4px;
|
|
241
|
+
color: ${n.colors.text};
|
|
242
|
+
`;a.span`
|
|
243
|
+
font-family: ${n.font.sans};
|
|
244
|
+
font-size: 12px;
|
|
245
|
+
font-weight: 600;
|
|
246
|
+
color: ${n.colors.dclRed};
|
|
247
|
+
`;const na=a.div`
|
|
248
|
+
flex: none;
|
|
249
|
+
display: flex;
|
|
250
|
+
align-items: center;
|
|
251
|
+
gap: 6px;
|
|
252
|
+
|
|
253
|
+
.ico {
|
|
254
|
+
width: 24px;
|
|
255
|
+
height: 24px;
|
|
256
|
+
background: ${n.colors.text2};
|
|
257
|
+
-webkit-mask-size: 19.855px 19.855px;
|
|
258
|
+
mask-size: 19.855px 19.855px;
|
|
259
|
+
-webkit-mask-position: left center;
|
|
260
|
+
mask-position: left center;
|
|
261
|
+
}
|
|
262
|
+
span {
|
|
263
|
+
font-family: ${n.font.sans};
|
|
264
|
+
font-weight: 600;
|
|
265
|
+
font-size: 20px;
|
|
266
|
+
color: ${n.colors.text2};
|
|
267
|
+
}
|
|
268
|
+
`,ia=a.div`
|
|
269
|
+
flex: none;
|
|
270
|
+
display: flex;
|
|
271
|
+
flex-direction: column;
|
|
272
|
+
align-items: flex-end;
|
|
273
|
+
gap: 2px;
|
|
274
|
+
`,Md=a.button`
|
|
275
|
+
width: 100%;
|
|
276
|
+
height: 46px;
|
|
277
|
+
border: 0;
|
|
278
|
+
border-radius: 12px;
|
|
279
|
+
cursor: pointer;
|
|
280
|
+
background: ${n.gradients.amethyst};
|
|
281
|
+
color: ${n.colors.softWhite};
|
|
282
|
+
font-family: ${n.font.sans};
|
|
283
|
+
font-weight: 600;
|
|
284
|
+
font-size: 15px;
|
|
285
|
+
line-height: 24px;
|
|
286
|
+
letter-spacing: 0.46px;
|
|
287
|
+
text-transform: uppercase;
|
|
288
|
+
|
|
289
|
+
&:hover:not(:disabled) {
|
|
290
|
+
filter: brightness(1.05);
|
|
291
|
+
}
|
|
292
|
+
&:focus-visible {
|
|
293
|
+
outline: 2px solid ${n.colors.accent};
|
|
294
|
+
outline-offset: 2px;
|
|
295
|
+
}
|
|
296
|
+
&:disabled {
|
|
297
|
+
opacity: 0.6;
|
|
298
|
+
cursor: default;
|
|
299
|
+
}
|
|
300
|
+
`,zd=a.img`
|
|
301
|
+
width: 13px;
|
|
302
|
+
height: 13px;
|
|
303
|
+
display: block;
|
|
304
|
+
`,Rd=a.img`
|
|
305
|
+
width: 24px;
|
|
306
|
+
height: 24px;
|
|
307
|
+
display: block;
|
|
308
|
+
`;a.span`
|
|
309
|
+
flex: none;
|
|
310
|
+
width: 32px;
|
|
311
|
+
display: grid;
|
|
312
|
+
gap: 2px;
|
|
313
|
+
place-items: center;
|
|
314
|
+
|
|
315
|
+
.ico {
|
|
316
|
+
width: 15px;
|
|
317
|
+
height: 15px;
|
|
318
|
+
background: ${n.colors.text2};
|
|
319
|
+
}
|
|
320
|
+
img {
|
|
321
|
+
width: 15px;
|
|
322
|
+
height: 15px;
|
|
323
|
+
display: block;
|
|
324
|
+
}
|
|
325
|
+
`;a.div`
|
|
326
|
+
flex: none;
|
|
327
|
+
display: flex;
|
|
328
|
+
align-items: center;
|
|
329
|
+
gap: 4px;
|
|
330
|
+
|
|
331
|
+
.ico {
|
|
332
|
+
width: 18px;
|
|
333
|
+
height: 18px;
|
|
334
|
+
background: ${n.colors.text2};
|
|
335
|
+
}
|
|
336
|
+
img {
|
|
337
|
+
width: 18px;
|
|
338
|
+
height: 18px;
|
|
339
|
+
display: block;
|
|
340
|
+
}
|
|
341
|
+
span {
|
|
342
|
+
font-family: ${n.font.sans};
|
|
343
|
+
font-weight: 600;
|
|
344
|
+
font-size: 17px;
|
|
345
|
+
color: ${n.colors.text2};
|
|
346
|
+
}
|
|
347
|
+
`;a.span`
|
|
348
|
+
font-family: ${n.font.sans};
|
|
349
|
+
font-weight: 600;
|
|
350
|
+
font-size: 15px;
|
|
351
|
+
color: ${n.colors.muted};
|
|
352
|
+
`;const Ld=a.span`
|
|
353
|
+
font-family: ${n.font.sans};
|
|
354
|
+
font-size: 11px;
|
|
355
|
+
line-height: 1.35;
|
|
356
|
+
color: ${n.colors.muted};
|
|
357
|
+
`,Pd=a.p`
|
|
358
|
+
display: flex;
|
|
359
|
+
align-items: flex-start;
|
|
360
|
+
gap: 12px;
|
|
361
|
+
margin: 0;
|
|
362
|
+
background: rgba(255, 162, 90, 0.3);
|
|
363
|
+
border-radius: ${n.radius.btn};
|
|
364
|
+
padding: 16px;
|
|
365
|
+
font-family: ${n.font.sans};
|
|
366
|
+
font-size: 14px;
|
|
367
|
+
line-height: 1.334;
|
|
368
|
+
color: ${n.colors.text2};
|
|
369
|
+
`;function Ed({item:t,priceCredits:s,priceCents:l,options:o,priceManaWei:d,balanceCredits:u,manaBalanceWei:x,onBuy:m,onClose:b,busy:$=!1,notice:h}){const g=o.find(A=>A.method==="credits")??null,y=o.find(A=>A.method==="mana")??null,j=o.find(A=>A.method==="combined")??null,[I,C]=c.useState(()=>g?new Set(["credits"]):j?new Set(["credits","mana"]):y?new Set(["mana"]):new Set),S=!!g||!!j,N=!!y||!!j;c.useEffect(()=>{C(A=>{const z=new Set(A);return z.has("credits")&&!S&&z.delete("credits"),z.has("mana")&&!N&&z.delete("mana"),z.size===A.size?A:z})},[S,N]);const f=I.has("credits"),W=I.has("mana"),r=f&&W?j?"combined":null:f?g?"credits":null:W&&y?"mana":null,E=r==="combined"&&j?j.credits:(g==null?void 0:g.credits)??Ge(l),Y=r==="combined"&&j?j.manaWei:(y==null?void 0:y.manaWei)??d;function K(A){C(z=>{const H=new Set(z);return H.has(A)?H.delete(A):H.add(A),H})}return e.jsxs(bd,{children:[e.jsxs(yd,{children:[e.jsx(wd,{children:i("buyModal.choosePayment")}),e.jsx(vd,{onClick:b,disabled:$,"aria-label":i("buyModal.close"),children:e.jsx(R,{name:"close",className:"ico"})})]}),e.jsxs(jd,{children:[e.jsx(kd,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs($d,{children:[e.jsxs("div",{children:[e.jsx(Cd,{title:t.name,children:t.name||i("buyModal.itemFallback")}),t.creator?e.jsx(Id,{children:e.jsx(xs,{address:t.creator})}):null]}),e.jsxs(Sd,{children:[e.jsx(ve,{}),e.jsx("span",{children:bt(s)})]})]})]}),e.jsxs(Ad,{children:[e.jsxs(Ui,{type:"button","data-testid":"pay-with-credits","data-selected":f,"data-disabled":!S,disabled:$||!S,"aria-pressed":f,onClick:()=>K("credits"),children:[e.jsx(Qi,{children:e.jsx(Gi,{"data-checked":f,children:e.jsx(R,{name:"check",className:"ico"})})}),e.jsxs(_i,{children:[e.jsxs(Vi,{children:[e.jsx(Ji,{children:e.jsx(Yi,{src:md,w:32.582,h:34.401,alt:"","aria-hidden":!0})}),e.jsxs(Xi,{children:[e.jsx(Zi,{children:ze.name}),e.jsxs(ea,{children:[i("buyModal.creditsBalanceLabel"),e.jsx(ve,{}),e.jsx(ta,{children:bt(u)})]})]})]}),e.jsx(ia,{children:e.jsxs(na,{children:[e.jsx(ve,{}),e.jsx("span",{children:bt(E)})]})})]})]}),e.jsxs(Ui,{type:"button","data-testid":"pay-with-mana","data-selected":W,"data-disabled":!N,disabled:$||!N,"aria-pressed":W,onClick:()=>K("mana"),children:[e.jsx(Qi,{children:e.jsx(Gi,{"data-checked":W,children:e.jsx(R,{name:"check",className:"ico"})})}),e.jsxs(_i,{children:[e.jsxs(Vi,{children:[e.jsx(Ji,{children:e.jsx(Yi,{src:gd,w:35.328,h:35.328,alt:"","aria-hidden":!0})}),e.jsxs(Xi,{children:[e.jsx(Zi,{children:i("buyModal.methodMana")}),e.jsxs(ea,{children:[i("buyModal.manaBalanceLabel"),e.jsx(zd,{src:Wi,alt:"","aria-hidden":!0}),e.jsx(ta,{children:Mi(x)})]})]})]}),e.jsx(ia,{children:N?e.jsx(e.Fragment,{children:e.jsxs(na,{children:[e.jsx(Rd,{src:Wi,alt:"","aria-hidden":!0}),e.jsx("span",{children:Mi(Y)})]})}):e.jsx(Ld,{"data-testid":"mana-shortfall-note",children:i("buyModal.notEnoughMana")})})]})]})]}),h?e.jsx(Pd,{"data-testid":"price-changed",role:"status",children:h}):null,e.jsx(Md,{type:"button","data-testid":"confirm-payment",disabled:$||r===null,onClick:()=>r&&m(r),children:i("buyModal.buy")})]})}function Mr(){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 Td=ql("0.05");async function Fd(t){try{return(await new Ol(ot.rpcUrl).getBalance(t)).gte(Td)}catch{return!1}}async function Bd(t,s){return Zt(t)?Fd(s):!1}function Nd({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 Wd=t=>ks(t.contractAddress,String(t.itemId));async function aa(t,s={}){if(t.kind==="store")return BigInt(t.mint.item.priceWei);try{return $s(await Cs(t.trade),t.coupon)}catch(l){return s.reportFailure!==!1&&pe(l,{flow:"buy",step:"mana_price"}),null}}function ra(t){return t.kind==="trade"?t.trade.id:void 0}function sa(t){return t.contractAddress&&t.itemId!=null?{contractAddress:t.contractAddress,itemId:String(t.itemId)}:void 0}function Fn({item:t,onClose:s,resume:l=!1}){const{session:o}=lt(),{data:d}=ar(o),{data:u}=fs(o),x=ct(),m=dt();async function b(){try{return await x.fetchQuery(js())}catch{return}}async function $(){if(u!=null)return u;if(!o)return 0n;try{const k=await x.fetchQuery({queryKey:["mana-balance",o.address],queryFn:()=>Ss(o.address),staleTime:3e4});return ee(k),k}catch{return 0n}}const h=Yo().packs.slice(0,Xo),[g,y]=c.useState("loading"),[j,I]=c.useState(null),[C,S]=c.useState(null),[N,f]=c.useState(!1),[W,r]=c.useState(0),[E,Y]=c.useState(""),[K,A]=c.useState(t.priceCredits),z=Math.max(0,K-((d==null?void 0:d.credits)??0)),{packs:H}=Zo(h,z),[_,ne]=c.useState(null),[de,ee]=c.useState(null),V=u??de??0n,[D,q]=c.useState(!1),[w,fe]=c.useState(null),[L,F]=c.useState(0),[M,se]=c.useState(null),[ie,xe]=c.useState(!1),U=c.useRef(null),oe=c.useRef(!1),Z=c.useRef(Mr()),Ie=(M==null?void 0:M.credits)??K,ce=(d==null?void 0:d.credits)??0;c.useEffect(()=>(oe.current=!1,()=>{oe.current=!0}),[]);async function J(k,P,T,B){const G=await $();if(B!=null&&B())return;const ae=G>0n,Q=ae?await aa(P):null;if(B!=null&&B())return;Q!=null?ne(Q):ae&&q(!0);const $e=Ei({priceCents:T,priceManaWei:Q??0n,balanceCents:(d==null?void 0:d.balanceCents)??0,manaBalanceWei:G}).options.some(Ue=>Ue.method==="mana"||Ue.method==="combined"),We=k-((d==null?void 0:d.credits)??0),tt=h.find(Ue=>Ue.credits>=We)??h[h.length-1];Y(tt.id),$e||X("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:k,credits_balance:(d==null?void 0:d.credits)??0,shortfall:Math.max(0,We)}),y("nofunds")}c.useEffect(()=>{let k=!1;if(!o){y("error"),I(i("buyModal.signInToCheckout"));return}return(async()=>{try{const P=await el(t,o.address,ms,await b(),Wd,gs);if(P.status==="own")throw new Error("You can't buy your own listing.");if(P.status==="no-price")throw new Error("price unavailable");if(P.status!=="buyable")throw new Error("not for sale");const T=tl(P.line),B=P.line.usdCents,G=Ge(B);if(k)return;if(A(G),fe(T),F(B),d!=null&&d.credits<G){await J(G,T,B,()=>k);return}l?qe({sale:T,usdCents:B}):y("ready")}catch(P){if(k)return;X(we(P)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Ce(P)}),Be(P)}})(),()=>{k=!0,U.current&&o&&(sn([U.current]),U.current=null)}},[W]),c.useEffect(()=>{const k=(M==null?void 0:M.sale)??w;if(!k||g!=="ready"&&g!=="nofunds"||V<=0n||_!==null)return;let P=!1;return aa(k,{reportFailure:!D}).then(T=>{P||(T!=null?ne(T):q(!0))}),()=>{P=!0}},[g,M,w,V,_,D]);const Fe=Ei({priceCents:L,priceManaWei:_??0n,balanceCents:(d==null?void 0:d.balanceCents)??0,manaBalanceWei:V});async function qe(k){const P=(M==null?void 0:M.sale)??(k==null?void 0:k.sale)??w,T=(M==null?void 0:M.usdCents)??(k==null?void 0:k.usdCents)??L;if(!o||!P||T<=0)return;y("processing"),I(null),xe(!1);let B=M;if(!B)try{const{credit:Q,maxCreditedValue:ue,usdCents:$e}=await Tn(o.identity,T,ra(P),sa(t));if(oe.current){be([Q.id]);return}U.current=Q.id,x.invalidateQueries({queryKey:["usd-balance"]});const We=Ge($e);if(B={sale:P,credit:Q,maxCreditedValue:ue,usdCents:$e,credits:We},se(B),We!==Ge(T)){A(We),F($e),xe(!0),y("ready");return}}catch(Q){if(Gl(Q)){x.invalidateQueries({queryKey:["usd-balance"]}),await J(Ge(T),P,T);return}we(Q)||pe(Q,{flow:"buy",step:"authorize"}),X(we(Q)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Ce(Q)}),I(_e(Q,i("buyModal.error.generic"),{sale:!0})),y("error");return}if(!B)return;let G=!1,ae;try{const Q={purchase:zo(B.sale,[B.credit],B.maxCreditedValue),buyer:o.address,signer:o.signer,onBroadcast:({txHash:ue})=>Z.current.broadcast(B.credit.id,ue),onReverted:({txHash:ue})=>{ue&&Z.current.reverted(ue)}};if(Z.current.submitStarted(B.credit.id),wr())try{ae=await Ul(Q),Z.current.broadcast(B.credit.id,ae),await kr(ae),G=!0}catch(ue){if(ue instanceof $r)G=!0;else if(ue instanceof Cr){if(ue.reason==="relayer-unreachable")throw Z.current.unobservable(B.credit.id),ue;if(!Zt(o.providerType))throw ue;ae=await Fi(Q)}else throw ae&&Z.current.reverted(ae),ue}else ae=await Fi(Q)}catch(Q){Z.current.submitFinished(B.credit.id),we(Q)||pe(Q,{flow:"buy",step:"submit",gasless:G}),Xe([B.credit.id]),U.current=null,X(we(Q)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Ce(Q)}),x.invalidateQueries({queryKey:["usd-balance"]}),Be(Q);return}Z.current.submitFinished(B.credit.id),U.current=null;try{Ro(x,t),X("Shop Completed Purchase",{...un([t]),payment_type:"credits",no_crypto_step:G,transaction_hash:ae??null})}catch(Q){pe(Q,{flow:"buy",step:"post_purchase"})}y("complete")}function be(k){if(!o||k.length===0)return Promise.resolve(!1);const P=k.filter(T=>!Z.current.mayBeConsumed(T));return P.length===0?Promise.resolve(!1):rr(o.identity,P).then(()=>!0,()=>!0)}function Xe(k){f(!0),be(k).then(P=>{P||f(!1)})}function sn(k){return be(k.filter(P=>!Z.current.isInFlight(P)))}function Lt(){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 Pt(){var P;const k=(M==null?void 0:M.sale)??w;if(!(!o||!k)){U.current&&(Xe([U.current]),U.current=null),y("processing"),I(null);try{const T=(P=Ti(Fe,"mana"))==null?void 0:P.manaWei,B=k.kind==="trade"?await Eo({trade:k.trade,coupon:k.coupon,buyer:o.address,signer:o.signer,manaWei:T}):await To({mint:k.mint,buyer:o.address,signer:o.signer,manaWei:T});X("Shop Completed Purchase",{...un([t]),payment_type:"mana",transaction_hash:B??null}),Lt(),y("complete")}catch(T){we(T)||pe(T,{flow:"buy_mana",step:"submit"}),X(we(T)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Ce(T)}),Be(T)}}}async function vt(){const k=(M==null?void 0:M.sale)??w,P=Ti(Fe,"combined");if(!o||!k||!P)return;y("processing"),I(null),U.current&&(await be([U.current])&&f(!0),U.current=null);let T=null,B;try{const{credit:G}=await Tn(o.identity,P.creditsCents,ra(k),sa(t));T=G.id,Z.current.submitStarted(G.id);const ae={buyer:o.address,signer:o.signer,credits:[G],manaGapWei:P.manaWei,providerType:o.providerType,onBroadcast:({txHash:Q})=>Z.current.broadcast(G.id,Q),onReverted:({txHash:Q})=>{Q&&Z.current.reverted(Q)},onUnobservable:()=>Z.current.unobservable(G.id)};B=k.kind==="trade"?await Fo({trade:k.trade,coupon:k.coupon,...ae}):await Bo({mint:k.mint,...ae})}catch(G){T&&Z.current.submitFinished(T),T&&Xe([T]),we(G)||pe(G,{flow:"buy_credits_and_mana",step:"submit"}),X(we(G)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Ce(G)}),x.invalidateQueries({queryKey:["usd-balance"]}),Be(G);return}T&&Z.current.submitFinished(T);try{Lt(),X("Shop Completed Purchase",{...un([t]),payment_type:"credits_and_mana",transaction_hash:B??null})}catch(G){pe(G,{flow:"buy_credits_and_mana",step:"post_purchase"})}y("complete")}async function Ze(){if(!(!E||!o)){try{sessionStorage.setItem(Oi,JSON.stringify(t))}catch{}U.current&&(be([U.current]),U.current=null),se(null),y("loading");try{const k=await nl(E,{address:o.address,identity:o.identity});if(k.url){window.location.href=k.url;return}if(!k.orderId)throw new Error("Checkout returned neither a redirect url nor an order id");m(`/credits?order=${encodeURIComponent(k.orderId)}`)}catch(k){pe(k,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(Oi)}catch{}I(i("buyModal.error.creditsCheckout")),y("error")}}}const[ke,ut]=c.useState(null);function me(k,P){const{spender:T,chainId:B}=No(k,P);return zl(B,T)}function Be(k){if(I(_e(k,i("buyModal.error.generic"),{sale:!0})),y("error"),!bs(k)||!o)return;const P=k.required;(async()=>{if(await Bd(o.providerType,o.address)){S(P);return}I(i("buyModal.error.relayDownNoRail"))})()}async function Ke(k){if(o){S(null);try{await Is(o.web3Provider,k)}catch(P){we(P)||pe(P,{flow:"buy",step:"switch_chain"}),S(k);return}Tt()}}function He(k){k==="mana"?Pt():k==="combined"?vt():qe()}const Ne=c.useRef(!1);async function Se(k){var P;if(!Ne.current){Ne.current=!0;try{const T=(M==null?void 0:M.sale)??w;if(k==="credits"||!T||!o){He(k);return}const B=me(k,T),G=((P=Fe.options.find(Q=>Q.method===k))==null?void 0:P.manaWei)??0n,ae=await vr(B,o.address,G).catch(()=>!0);if(Ml(o.providerType,ae)){ut({auth:B,rail:k});return}He(k)}finally{Ne.current=!1}}}const jt=Fe.options.some(k=>k.method==="mana"||k.method==="combined"),Et=g==="ready"&&(jt||Fe.manaShortfall!=null)||g==="nofunds"&&jt;function Tt(){I(null),se(null),xe(!1),f(!1),y("loading"),r(k=>k+1)}const et=g==="error"&&C===null&&(!!U.current||N),kt=g==="processing",Ft=g==="complete"?i("buyModal.titleComplete"):g==="error"?i("cartCheckout.errorTitle"):g==="nofunds"?i("buyModal.titleNoFunds"):i("buyModal.titleBuy");return ke&&o?e.jsx(fr,{auth:ke.auth,signer:o.signer,title:i(ke.rail==="mana"?"authorizeStep.manaTitle":"authorizeStep.buyTitle"),name:i(ke.rail==="mana"?"authorizeStep.manaName":"authorizeStep.buyName"),reason:i(ke.rail==="mana"?"authorizeStep.manaReason":"authorizeStep.buyReason"),icon:e.jsx("img",{src:Al,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{rail:k}=ke;ut(null),He(k)},onCancel:()=>ut(null),onClose:()=>{ut(null),s()}}):e.jsxs(il,{role:"dialog","aria-modal":"true","aria-label":i("buyModal.dialogAria",{name:t.name}),"data-testid":"buy-modal",children:[e.jsx(al,{onClick:kt?void 0:s,"aria-hidden":!0}),e.jsx(rl,{"data-tall":g==="processing"||g==="loading"||void 0,children:Et?e.jsx(Ed,{item:t,priceCredits:Ie,priceCents:L,options:Fe.options,priceManaWei:_??0n,balanceCredits:ce,manaBalanceWei:V,onBuy:k=>void Se(k),onClose:s,busy:kt,notice:ie?i("buyModal.priceChanged"):d!=null&&d.held?i("buyModal.heldExplainer",{credits:d.held.credits,currency:ze.name}):null}):e.jsxs(e.Fragment,{children:[e.jsxs(sl,{children:[e.jsxs(ol,{children:[e.jsx(ll,{children:Ft}),!kt&&e.jsx(dl,{onClick:s,"aria-label":i("buyModal.close"),children:e.jsx(Lo,{})})]}),e.jsxs(cl,{children:[e.jsx(ul,{children:g==="nofunds"?i("buyModal.dclBalance"):i("buyModal.myCreditsBalance")}),e.jsx(pl,{}),e.jsx(hl,{children:bt(ce)})]})]}),g==="loading"&&e.jsx(rt,{"data-processing":!0,children:e.jsx("span",{className:"spinner","aria-hidden":!0})}),g==="error"&&e.jsxs(rt,{children:[e.jsxs(xl,{"data-testid":"buy-error",children:[e.jsx(fl,{src:Po,alt:"",width:64,height:80}),e.jsxs(ml,{children:[e.jsx("b",{children:i("cartCheckout.errorHeadline")})," ",j??(et?null:i("cartCheckout.errorBody")),et?e.jsxs(e.Fragment,{children:[j?" ":"",i("cartCheckout.heldLead",{currency:ze.name}),e.jsx("b",{children:i("cartCheckout.heldBold")}),i("cartCheckout.heldTail",{currency:ze.name})]}):null]})]}),C!==null?e.jsxs(xt,{children:[e.jsx(De,{"data-variant":"outline",onClick:s,children:i("buyModal.cancel")}),e.jsx(De,{"data-variant":"purple","data-testid":"switch-and-retry",onClick:()=>void Ke(C),children:i("buyModal.error.switchAndRetry",{network:ys(C)})})]}):et?e.jsx(xt,{children:e.jsx(De,{"data-variant":"purple","data-full":!0,onClick:s,children:i("cartCheckout.gotIt")})}):e.jsxs(xt,{children:[e.jsx(De,{"data-variant":"outline",onClick:s,children:i("buyModal.cancel")}),e.jsx(De,{"data-variant":"purple",onClick:Tt,children:i("cartCheckout.tryAgain")})]})]}),g==="nofunds"&&e.jsxs(rt,{children:[D&&_===null&&V>0n?e.jsxs(Ht,{"data-testid":"mana-price-unavailable",children:[e.jsx(Ut,{}),e.jsx(Qt,{children:i("buyModal.manaPriceUnavailable")})]}):null,d!=null&&d.held?e.jsxs(Ht,{"data-testid":"nofunds-held",children:[e.jsx(Ut,{}),e.jsx(Qt,{children:i("buyModal.heldExplainer",{credits:d.held.credits,currency:ze.name})})]}):null,e.jsxs(Ht,{children:[e.jsx(Ut,{}),e.jsxs(Qt,{children:[e.jsx("b",{children:i("buyModal.insufficientFunds")})," ",i("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:i("buyModal.warningCreditsAmount",{count:Math.max(1,Ie-ce)})})," ",i("buyModal.warningToPurchase",{count:1}),mt()?null:e.jsxs(e.Fragment,{children:[" ",e.jsx(gl,{href:ws("/credits"),target:"_blank",rel:"noopener noreferrer",children:i("buyModal.warningLearnMore")})]})]})]}),e.jsx(oa,{item:t,priceCredits:Ie}),mt()?null:e.jsx(e.Fragment,{children:e.jsx(bl,{packs:H,selectedId:E||void 0,onSelect:Y})}),e.jsxs(xt,{children:[e.jsx(De,{"data-variant":"outline",onClick:s,children:i("buyModal.cancel")}),mt()?null:e.jsx(De,{"data-variant":"gradient",onClick:()=>void Ze(),children:i("buyModal.buy")})]})]}),g==="ready"&&e.jsxs(rt,{children:[ie&&e.jsxs(Ht,{"data-testid":"price-changed",role:"status",children:[e.jsx(Ut,{}),e.jsx(Qt,{children:i("buyModal.priceChanged")})]}),e.jsx(oa,{item:t,priceCredits:Ie}),e.jsx(xt,{children:e.jsx(De,{"data-variant":"gradient","data-full":!0,onClick:()=>void qe(),children:i("buyModal.buy")})})]}),g==="processing"&&e.jsxs(rt,{"data-processing":!0,children:[e.jsx(mr,{src:sr,alt:"",width:61,height:61}),e.jsx(gr,{children:l?i("buyModal.completingPurchase"):i("buyModal.completingTransaction")}),e.jsx(br,{"aria-hidden":!0,children:e.jsx(yr,{})})]}),g==="complete"&&e.jsxs(rt,{children:[e.jsx(_l,{}),e.jsxs(yl,{children:[e.jsx(Nd,{}),e.jsxs(wl,{children:[e.jsx("b",{children:i("getCredits.successTitle")})," ",i("buyModal.successBody")]})]}),e.jsxs(xt,{"data-stack":!0,children:[e.jsx(De,{"data-variant":"outline",onClick:()=>m(vs([t.category])),children:i("buyModal.myAssets")}),mt()?e.jsx(Ni,{"data-variant":"ruby",href:Vl([t]),onClick:s,children:i("success.goToBackpack")}):e.jsxs(Ni,{"data-variant":"ruby",href:Jl,target:"_blank",rel:"noreferrer",onClick:s,children:[i("buyModal.tryInWorld"),e.jsx(Yl,{})]})]})]})]})})]})}function oa({item:t,priceCredits:s}){return e.jsxs(vl,{children:[e.jsx(jl,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(kl,{children:[e.jsxs("div",{children:[e.jsx($l,{title:t.name,children:t.name||i("buyModal.itemFallback")}),t.creator?e.jsx(Cl,{address:t.creator}):null]}),e.jsxs(Il,{children:[e.jsx(Sl,{}),e.jsx("span",{children:bt(s)})]})]})]})}function Dd(){const{data:t}=te({queryKey:["feature-flag","proceeds-to-treasury"],queryFn:As,staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return t===!0}const Od=a.div`
|
|
370
|
+
display: flex;
|
|
371
|
+
align-items: center;
|
|
372
|
+
gap: 16px;
|
|
373
|
+
width: 100%;
|
|
374
|
+
max-width: 456px;
|
|
375
|
+
`,qd=a.span`
|
|
376
|
+
flex: none;
|
|
377
|
+
font-family: ${n.font.sans};
|
|
378
|
+
font-size: 18px;
|
|
379
|
+
color: ${n.colors.muted};
|
|
380
|
+
`,Kd=a.p`
|
|
381
|
+
margin: 0;
|
|
382
|
+
font-family: ${n.font.sans};
|
|
383
|
+
font-size: 13px;
|
|
384
|
+
line-height: 1.5;
|
|
385
|
+
color: ${n.colors.muted};
|
|
386
|
+
text-align: center;
|
|
387
|
+
`,Hd=a.p`
|
|
388
|
+
margin: 0;
|
|
389
|
+
font-family: ${n.font.sans};
|
|
390
|
+
font-size: 13px;
|
|
391
|
+
line-height: 1.5;
|
|
392
|
+
color: ${n.colors.text};
|
|
393
|
+
`;function zr(t,s){const[l,o]=c.useState(!1),[d,u]=c.useState(!1),[x,m]=c.useState(null),b=c.useRef(null);c.useEffect(()=>{const h=new AbortController;return b.current=h,()=>h.abort(new DOMException("Modal closed","AbortError"))},[]);async function $(h){if(!t||l)return!0;m(null);try{const g=await t.cancelCurrent({payGas:h,onWaiting:y=>u(y>2e4)});return g!=="ok"?(m(g==="relay-reverted"?"reverted":"pending"),!1):(o(!0),!0)}catch(g){return pe(g,{flow:"edit_price_cancel"}),s(_e(g,i("listingEdit.cancelFailed"))),!1}finally{u(!1)}}return{cancelDone:l,slow:d,cancelFailed:x,setCancelFailed:m,cancelCurrent:$,signal:()=>{var h;return(h=b.current)==null?void 0:h.signal}}}function On({state:t,canPayGas:s,busy:l,onPayGas:o,onLater:d,testId:u="edit-cancel-relay-failed"}){return e.jsxs(Hd,{"data-testid":u,children:[s?t==="reverted"?i("itemDetail.cancelRelayReverted"):i("itemDetail.cancelRelayFailed"):i("itemDetail.cancelRelayRetry"),s?e.jsxs(e.Fragment,{children:[" ",e.jsx(qi,{type:"button","data-testid":"cancel-pay-gas",onClick:o,disabled:l,children:i("itemDetail.cancelPayGas")}),d?e.jsxs(e.Fragment,{children:[" ",e.jsx(qi,{type:"button","data-testid":"cancel-later",onClick:d,disabled:l,children:i("itemDetail.cancelLater")})]}):null]}):null]})}function Rr({phase:t,managed:s,slow:l}){const d=t==="list"?2:1,u=`listingEdit.${s?"step":"confirm"}${t==="list"?"New":"Removal"}`;return e.jsxs(rt,{"data-processing":!0,"data-testid":"listing-steps",role:"status","aria-live":"polite",children:[e.jsx(mr,{src:sr,alt:"",width:61,height:61}),e.jsx(gr,{children:i(u)}),e.jsxs(Od,{children:[e.jsx(br,{"aria-hidden":!0,children:e.jsx(yr,{})}),e.jsxs(qd,{"data-testid":"listing-steps-count",children:[d,"/",2]})]}),l?e.jsx(Kd,{"data-testid":"listing-steps-slow",children:i("listingEdit.slow")}):null]})}const fn=a.div`
|
|
394
|
+
position: fixed;
|
|
395
|
+
inset: 0;
|
|
396
|
+
z-index: 10000;
|
|
397
|
+
display: flex;
|
|
398
|
+
align-items: center;
|
|
399
|
+
justify-content: center;
|
|
400
|
+
padding: 16px;
|
|
401
|
+
background: rgba(22, 21, 24, 0.55);
|
|
402
|
+
`,mn=a.div`
|
|
403
|
+
width: 560px;
|
|
404
|
+
max-width: 100%;
|
|
405
|
+
max-height: 92vh;
|
|
406
|
+
overflow-y: auto;
|
|
407
|
+
background: ${n.colors.white};
|
|
408
|
+
border-radius: 16px;
|
|
409
|
+
padding: 12px 16px 16px;
|
|
410
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
411
|
+
display: flex;
|
|
412
|
+
flex-direction: column;
|
|
413
|
+
gap: 24px;
|
|
414
|
+
`,gn=a.div`
|
|
415
|
+
display: flex;
|
|
416
|
+
align-items: center;
|
|
417
|
+
justify-content: space-between;
|
|
418
|
+
gap: 8px;
|
|
419
|
+
padding-bottom: 16px;
|
|
420
|
+
border-bottom: 1px solid ${n.colors.gray4};
|
|
421
|
+
`,bn=a.h2`
|
|
422
|
+
margin: 0;
|
|
423
|
+
font-family: ${n.font.sans};
|
|
424
|
+
font-weight: 600;
|
|
425
|
+
font-size: 20px;
|
|
426
|
+
line-height: 1.6;
|
|
427
|
+
color: ${n.colors.text};
|
|
428
|
+
`,yn=a.button`
|
|
429
|
+
flex: none;
|
|
430
|
+
display: grid;
|
|
431
|
+
place-items: center;
|
|
432
|
+
width: 24px;
|
|
433
|
+
height: 24px;
|
|
434
|
+
border: 0;
|
|
435
|
+
background: none;
|
|
436
|
+
cursor: pointer;
|
|
437
|
+
color: ${n.colors.text};
|
|
438
|
+
|
|
439
|
+
.ico {
|
|
440
|
+
width: 18px;
|
|
441
|
+
height: 18px;
|
|
442
|
+
}
|
|
443
|
+
&:disabled {
|
|
444
|
+
opacity: 0.4;
|
|
445
|
+
cursor: default;
|
|
446
|
+
}
|
|
447
|
+
&:focus-visible {
|
|
448
|
+
outline: 2px solid ${n.colors.accent};
|
|
449
|
+
outline-offset: 2px;
|
|
450
|
+
}
|
|
451
|
+
`,Ud=a.p`
|
|
452
|
+
margin: 0;
|
|
453
|
+
font-family: ${n.font.sans};
|
|
454
|
+
font-size: 14px;
|
|
455
|
+
line-height: 1.57;
|
|
456
|
+
color: ${n.colors.text};
|
|
457
|
+
text-align: left;
|
|
458
|
+
`,Qd=a.div`
|
|
459
|
+
display: flex;
|
|
460
|
+
align-items: center;
|
|
461
|
+
gap: 12px;
|
|
462
|
+
`,Gd=a.div`
|
|
463
|
+
flex: none;
|
|
464
|
+
display: grid;
|
|
465
|
+
place-items: center;
|
|
466
|
+
width: 180px;
|
|
467
|
+
height: 180px;
|
|
468
|
+
border-radius: 16px;
|
|
469
|
+
background: ${n.colors.media};
|
|
470
|
+
border: 1px solid ${n.colors.gray4};
|
|
471
|
+
overflow: hidden;
|
|
472
|
+
|
|
473
|
+
img {
|
|
474
|
+
width: 150px;
|
|
475
|
+
height: 150px;
|
|
476
|
+
object-fit: contain;
|
|
477
|
+
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
${n.media.maxWidth("mobile")} {
|
|
481
|
+
width: 120px;
|
|
482
|
+
height: 120px;
|
|
483
|
+
|
|
484
|
+
img {
|
|
485
|
+
width: 100px;
|
|
486
|
+
height: 100px;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
`,_d=a.div`
|
|
490
|
+
flex: 1 1 0;
|
|
491
|
+
min-width: 0;
|
|
492
|
+
display: flex;
|
|
493
|
+
flex-direction: column;
|
|
494
|
+
gap: 4px;
|
|
495
|
+
padding: 8px;
|
|
496
|
+
`,Vd=a.p`
|
|
497
|
+
margin: 0;
|
|
498
|
+
font-family: ${n.font.sans};
|
|
499
|
+
font-weight: 600;
|
|
500
|
+
font-size: 20px;
|
|
501
|
+
line-height: 1.57;
|
|
502
|
+
color: ${n.colors.text};
|
|
503
|
+
`,Jd=a.p`
|
|
504
|
+
margin: 0;
|
|
505
|
+
font-family: ${n.font.sans};
|
|
506
|
+
font-size: 10px;
|
|
507
|
+
line-height: 1.43;
|
|
508
|
+
color: ${n.colors.muted};
|
|
509
|
+
`,Yd=a.div`
|
|
510
|
+
display: flex;
|
|
511
|
+
gap: 12px;
|
|
512
|
+
|
|
513
|
+
${n.media.maxWidth("mobile")} {
|
|
514
|
+
flex-direction: column;
|
|
515
|
+
}
|
|
516
|
+
`,la=a.label`
|
|
517
|
+
flex: 1 1 0;
|
|
518
|
+
min-width: 0;
|
|
519
|
+
display: flex;
|
|
520
|
+
flex-direction: column;
|
|
521
|
+
gap: 4px;
|
|
522
|
+
`,da=a.span`
|
|
523
|
+
font-family: ${n.font.sans};
|
|
524
|
+
font-size: 12px;
|
|
525
|
+
color: ${n.colors.muted};
|
|
526
|
+
`,Xd=a.div`
|
|
527
|
+
display: flex;
|
|
528
|
+
align-items: center;
|
|
529
|
+
justify-content: space-between;
|
|
530
|
+
gap: 4px;
|
|
531
|
+
height: 42px;
|
|
532
|
+
padding: 0 8px;
|
|
533
|
+
border: 0.5px solid ${n.colors.text};
|
|
534
|
+
border-radius: 8px;
|
|
535
|
+
background: ${n.colors.white};
|
|
536
|
+
|
|
537
|
+
&:focus-within {
|
|
538
|
+
border-color: ${n.colors.magenta};
|
|
539
|
+
}
|
|
540
|
+
&[aria-invalid='true'] {
|
|
541
|
+
border-color: ${n.colors.err};
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.ccy {
|
|
545
|
+
flex: none;
|
|
546
|
+
width: 22px;
|
|
547
|
+
height: 22px;
|
|
548
|
+
color: ${n.colors.rarity};
|
|
549
|
+
}
|
|
550
|
+
.cal {
|
|
551
|
+
flex: none;
|
|
552
|
+
width: 18px;
|
|
553
|
+
height: 18px;
|
|
554
|
+
color: ${n.colors.text};
|
|
555
|
+
}
|
|
556
|
+
`,Zd=a.input`
|
|
557
|
+
flex: 1 1 auto;
|
|
558
|
+
min-width: 0;
|
|
559
|
+
border: 0;
|
|
560
|
+
outline: none;
|
|
561
|
+
background: transparent;
|
|
562
|
+
font-family: ${n.font.sans};
|
|
563
|
+
font-size: 13px;
|
|
564
|
+
color: ${n.colors.text};
|
|
565
|
+
|
|
566
|
+
&::placeholder {
|
|
567
|
+
color: ${n.colors.muted2};
|
|
568
|
+
}
|
|
569
|
+
/* Strip the number spinners — the glyph + USD hint carry the affordance. */
|
|
570
|
+
&::-webkit-outer-spin-button,
|
|
571
|
+
&::-webkit-inner-spin-button {
|
|
572
|
+
-webkit-appearance: none;
|
|
573
|
+
margin: 0;
|
|
574
|
+
}
|
|
575
|
+
&[type='number'] {
|
|
576
|
+
-moz-appearance: textfield;
|
|
577
|
+
appearance: textfield;
|
|
578
|
+
}
|
|
579
|
+
`,ec=a.span`
|
|
580
|
+
flex: none;
|
|
581
|
+
font-family: ${n.font.sans};
|
|
582
|
+
font-size: 10px;
|
|
583
|
+
color: ${n.colors.muted2};
|
|
584
|
+
`,tc=a.div`
|
|
585
|
+
.react-datepicker-wrapper {
|
|
586
|
+
display: block;
|
|
587
|
+
width: 100%;
|
|
588
|
+
}
|
|
589
|
+
.react-datepicker__input-container {
|
|
590
|
+
display: flex;
|
|
591
|
+
align-items: center;
|
|
592
|
+
}
|
|
593
|
+
.react-datepicker__input-container input {
|
|
594
|
+
width: 100%;
|
|
595
|
+
height: 42px;
|
|
596
|
+
padding: 0 8px;
|
|
597
|
+
border: 0.5px solid ${n.colors.text};
|
|
598
|
+
border-radius: 8px;
|
|
599
|
+
background: ${n.colors.white};
|
|
600
|
+
font-family: ${n.font.sans};
|
|
601
|
+
font-size: 13px;
|
|
602
|
+
color: ${n.colors.text};
|
|
603
|
+
outline: none;
|
|
604
|
+
}
|
|
605
|
+
.react-datepicker__input-container input:focus {
|
|
606
|
+
border-color: ${n.colors.magenta};
|
|
607
|
+
}
|
|
608
|
+
&[data-invalid='true'] .react-datepicker__input-container input {
|
|
609
|
+
border-color: ${n.colors.err};
|
|
610
|
+
}
|
|
611
|
+
/* The showIcon calendar glyph inside the field. */
|
|
612
|
+
.react-datepicker__calendar-icon {
|
|
613
|
+
fill: ${n.colors.text};
|
|
614
|
+
opacity: 0.85;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
${Uo}
|
|
618
|
+
`,nc=a.button`
|
|
619
|
+
width: 100%;
|
|
620
|
+
height: 48px;
|
|
621
|
+
border: 0;
|
|
622
|
+
border-radius: 16px;
|
|
623
|
+
cursor: pointer;
|
|
624
|
+
background: ${n.colors.accent};
|
|
625
|
+
color: ${n.colors.white};
|
|
626
|
+
font-family: ${n.font.sans};
|
|
627
|
+
font-weight: 600;
|
|
628
|
+
font-size: 15px;
|
|
629
|
+
line-height: 24px;
|
|
630
|
+
letter-spacing: 0.46px;
|
|
631
|
+
text-transform: uppercase;
|
|
632
|
+
|
|
633
|
+
&:hover:not(:disabled) {
|
|
634
|
+
background: ${n.colors.accentHover};
|
|
635
|
+
}
|
|
636
|
+
&:focus-visible {
|
|
637
|
+
outline: 2px solid ${n.colors.accent};
|
|
638
|
+
outline-offset: 2px;
|
|
639
|
+
}
|
|
640
|
+
&:disabled {
|
|
641
|
+
cursor: not-allowed;
|
|
642
|
+
background: rgba(105, 31, 169, 0.2);
|
|
643
|
+
color: ${n.colors.white};
|
|
644
|
+
}
|
|
645
|
+
`;a.p`
|
|
646
|
+
margin: 0;
|
|
647
|
+
font-family: ${n.font.sans};
|
|
648
|
+
font-size: 13px;
|
|
649
|
+
color: ${n.colors.muted};
|
|
650
|
+
text-align: center;
|
|
651
|
+
`;const ic=a.p`
|
|
652
|
+
margin: 0;
|
|
653
|
+
font-family: ${n.font.sans};
|
|
654
|
+
font-size: 12px;
|
|
655
|
+
line-height: 1.5;
|
|
656
|
+
color: ${n.colors.muted};
|
|
657
|
+
`,ac=a.div`
|
|
658
|
+
display: flex;
|
|
659
|
+
flex-direction: column;
|
|
660
|
+
align-items: center;
|
|
661
|
+
gap: 16px;
|
|
662
|
+
padding: 24px 16px;
|
|
663
|
+
border-radius: 16px;
|
|
664
|
+
background: rgba(193, 238, 207, 0.5);
|
|
665
|
+
text-align: center;
|
|
666
|
+
`,rc=a.div`
|
|
667
|
+
display: grid;
|
|
668
|
+
place-items: center;
|
|
669
|
+
width: 64px;
|
|
670
|
+
height: 64px;
|
|
671
|
+
border-radius: 50%;
|
|
672
|
+
background: ${n.colors.ok};
|
|
673
|
+
color: ${n.colors.white};
|
|
674
|
+
|
|
675
|
+
.ico {
|
|
676
|
+
width: 34px;
|
|
677
|
+
height: 34px;
|
|
678
|
+
}
|
|
679
|
+
`,sc=a.p`
|
|
680
|
+
margin: 0;
|
|
681
|
+
font-family: ${n.font.sans};
|
|
682
|
+
font-size: 20px;
|
|
683
|
+
line-height: 1.334;
|
|
684
|
+
color: ${n.colors.text2};
|
|
685
|
+
|
|
686
|
+
b {
|
|
687
|
+
font-weight: 700;
|
|
688
|
+
}
|
|
689
|
+
`,oc=a.div`
|
|
690
|
+
display: flex;
|
|
691
|
+
gap: 12px;
|
|
692
|
+
|
|
693
|
+
${n.media.maxWidth("mobile")} {
|
|
694
|
+
flex-direction: column-reverse;
|
|
695
|
+
}
|
|
696
|
+
`,lc=a.button`
|
|
697
|
+
flex: 1 1 0;
|
|
698
|
+
height: 48px;
|
|
699
|
+
border: 2px solid ${n.colors.accent};
|
|
700
|
+
border-radius: 12px;
|
|
701
|
+
background: transparent;
|
|
702
|
+
color: ${n.colors.accent};
|
|
703
|
+
cursor: pointer;
|
|
704
|
+
font-family: ${n.font.sans};
|
|
705
|
+
font-weight: 600;
|
|
706
|
+
font-size: 13px;
|
|
707
|
+
line-height: 24px;
|
|
708
|
+
letter-spacing: 0.46px;
|
|
709
|
+
text-transform: uppercase;
|
|
710
|
+
|
|
711
|
+
&:hover {
|
|
712
|
+
background: rgba(105, 31, 169, 0.06);
|
|
713
|
+
}
|
|
714
|
+
&:focus-visible {
|
|
715
|
+
outline: 2px solid ${n.colors.accent};
|
|
716
|
+
outline-offset: 2px;
|
|
717
|
+
}
|
|
718
|
+
`,dc=a.button`
|
|
719
|
+
flex: 1 1 0;
|
|
720
|
+
height: 48px;
|
|
721
|
+
border: 0;
|
|
722
|
+
border-radius: 12px;
|
|
723
|
+
background: ${n.colors.accent};
|
|
724
|
+
color: ${n.colors.softWhite};
|
|
725
|
+
cursor: pointer;
|
|
726
|
+
font-family: ${n.font.sans};
|
|
727
|
+
font-weight: 600;
|
|
728
|
+
font-size: 13px;
|
|
729
|
+
line-height: 24px;
|
|
730
|
+
letter-spacing: 0.46px;
|
|
731
|
+
text-transform: uppercase;
|
|
732
|
+
|
|
733
|
+
&:hover {
|
|
734
|
+
background: ${n.colors.accentHover};
|
|
735
|
+
}
|
|
736
|
+
&:focus-visible {
|
|
737
|
+
outline: 2px solid ${n.colors.accent};
|
|
738
|
+
outline-offset: 2px;
|
|
739
|
+
}
|
|
740
|
+
`,cc=30;function ca(t){const s=new Date;return s.setHours(0,0,0,0),s.setDate(s.getDate()+t),s}function uc({asset:t,session:s,creator:l,edit:o,onListed:d,onClose:u}){const x=ct(),m=dt(),b=Dd(),{data:$}=te({queryKey:["collection-meta",t.contractAddress],enabled:!l&&!!t.contractAddress,staleTime:5*6e4,queryFn:()=>lr(t.contractAddress)}),h=l||($==null?void 0:$.creator),{data:g}=en(h),y=h?g!=null&&g.name?tn(g.name):Dn(h):null,[j,I]=c.useState(o!=null&&o.currentCredits?String(o.currentCredits):"10"),[C,S]=c.useState(()=>ca(cc)),[N,f]=c.useState(null),[W,r]=c.useState(!1),[E,Y]=c.useState(null),[K,A]=c.useState("form"),z=c.useRef({}),{cancelDone:H,slow:_,cancelFailed:ne,setCancelFailed:de,cancelCurrent:ee,signal:V}=zr(o,f),D=nn(s),q=Number(j),w=Number.isInteger(q)&&q>0,fe=!!o&&!H&&q===o.currentCredits,L=C?C.getTime():NaN,F=!!C&&L>Date.now(),M=ca(1),se=w?`$${st(q).toFixed(2)}`:"$0";async function ie(oe={}){if(f(null),!w){f(i("sellModal.errorWholeNumber"));return}if(!F){f(i("sellModal.invalidDate"));return}if(!D){r(!0);try{const Z=Di(t.contractAddress,t.chainId),Ie=await vr(Z,s.address);if(r(!1),!Ie){z.current=oe,A("authorize");return}}catch{r(!1)}}await xe(oe)}async function xe(oe={}){var Z,Ie;if(f(null),!w){f(i("sellModal.errorWholeNumber"));return}if(!F){f(i("sellModal.invalidDate"));return}r(!0);try{if(!await ee(oe.payGas))return;await Rl({signer:s.signer,contractAddress:t.contractAddress,chainId:t.chainId});const ce=await Ll({signer:s.signer,nft:{contractAddress:t.contractAddress,tokenId:t.tokenId,network:t.network,chainId:t.chainId},usdPrice:st(q),expiresAtMs:L}),J=await(o?Ir(ce,s.identity,{signal:V()}):or(ce,s.identity));(Z=V())==null||Z.throwIfAborted(),Y(q),X("Shop Listed Item",{item_id:t.itemId??t.tokenId??null,contract_address:t.contractAddress,price_credits:q,price_usd:st(q),listing_type:"secondary",is_primary:!1}),Rt.success(i(o?"listingEdit.toastUpdated":"sellModal.toastOnSale",{name:t.name})),x.invalidateQueries({queryKey:["my-assets",s.address]}),d==null||d(q,J.id)}catch(ce){if((Ie=V())!=null&&Ie.aborted)return;pe(ce,{flow:"list_secondary"}),X("Shop Listing Failed",{listing_type:"secondary",error_code:Ce(ce)}),f(_e(ce,i(o?"listingEdit.listFailedAfterCancel":"sellModal.errorGeneric")))}finally{r(!1)}}function U(){u(),m("/my-items")}return E!==null?e.jsx(fn,{onClick:u,role:"presentation",children:e.jsxs(mn,{onClick:oe=>oe.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i(o?"listingEdit.successHeader":"sellModal.successHeader"),children:[e.jsxs(gn,{children:[e.jsx(bn,{children:i(o?"listingEdit.successHeader":"sellModal.successHeader")}),e.jsx(yn,{onClick:u,"aria-label":i("getCredits.done"),children:e.jsx(R,{name:"close",className:"ico"})})]}),e.jsxs(ac,{children:[e.jsx(rc,{"aria-hidden":!0,children:e.jsx(R,{name:"check",className:"ico"})}),e.jsxs(sc,{children:[e.jsx("b",{children:i(o?"listingEdit.successBody":"sellModal.successOnSale")})," ",i("sellModal.successManage")]})]}),e.jsxs(oc,{children:[e.jsx(lc,{onClick:U,children:i("sellModal.myItems")}),e.jsx(dc,{onClick:u,children:i("getCredits.done")})]})]})}):K==="authorize"?e.jsx(fr,{auth:Di(t.contractAddress,t.chainId),signer:s.signer,title:i("authorizeStep.sellTitle"),name:t.name,image:t.image,icon:e.jsx(R,{name:"pen",className:"ico"}),reason:i("authorizeStep.sellReason",{name:t.name}),onAuthorized:()=>{A("form"),xe(z.current)},onCancel:()=>A("form"),onClose:u}):o&&W?e.jsx(fn,{role:"presentation",children:e.jsxs(mn,{onClick:oe=>oe.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("listingEdit.title"),"data-testid":"modal",children:[e.jsxs(gn,{children:[e.jsx(bn,{children:i("listingEdit.title")}),e.jsx(yn,{disabled:!0,"aria-label":i("sellModal.cancel"),children:e.jsx(R,{name:"close",className:"ico"})})]}),e.jsx(Rr,{phase:H?"list":"cancel",managed:D,slow:_})]})}):e.jsx(fn,{onClick:W?void 0:u,role:"presentation",children:e.jsxs(mn,{"data-testid":"modal",onClick:oe=>oe.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i(o?"listingEdit.title":"sellModal.sellProduct"),children:[e.jsxs(gn,{children:[e.jsx(bn,{children:i(o?"listingEdit.title":"sellModal.sellProduct")}),e.jsx(yn,{onClick:u,disabled:W,"aria-label":i("sellModal.cancel"),children:e.jsx(R,{name:"close",className:"ico"})})]}),e.jsx(Ud,{children:i(o?"listingEdit.subtitle":"sellModal.subtitle")}),e.jsxs(Qd,{children:[e.jsx(Gd,{children:t.image?e.jsx("img",{src:t.image,alt:""}):null}),e.jsxs(_d,{children:[e.jsx(Vd,{children:t.name}),y?e.jsx(Jd,{children:i("sellModal.byCreator",{name:y})}):null]})]}),e.jsxs(Yd,{children:[e.jsxs(la,{children:[e.jsx(da,{children:i("sellModal.priceShort")}),e.jsxs(Xd,{"aria-invalid":j.length>0&&!w,children:[e.jsx(ve,{className:"ccy"}),e.jsx(Zd,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:j,onChange:oe=>I(oe.target.value),disabled:W,"aria-label":i("sellModal.priceLabel",{currency:"credits"})}),e.jsx(ec,{"aria-hidden":!0,children:se})]})]}),e.jsxs(la,{children:[e.jsx(da,{children:i("sellModal.expirationLabel")}),e.jsx(tc,{"data-invalid":!!C&&!F,children:e.jsx(Qo,{selected:C,onChange:S,minDate:M,dateFormat:"MM/dd/yyyy",placeholderText:"MM/DD/YYYY",disabled:W,showIcon:!0,showPopperArrow:!1,todayButton:i("sellModal.today"),ariaLabelledBy:void 0,"aria-label":i("sellModal.expirationLabel")})})]})]}),b&&w?e.jsx(ic,{children:i("sellModal.proceedsCredits",{count:q})}):null,ne?e.jsx(On,{state:ne,canPayGas:!!(o!=null&&o.canPayGas),busy:W,onPayGas:()=>void ie({payGas:!0}),onLater:()=>de(null)}):null,e.jsx(Ve,{message:N}),e.jsx(nc,{onClick:()=>void ie(),disabled:W||fe||ne==="pending"||!w||!F,"data-testid":"list-submit",children:o?i(H?"sellModal.putUpForSale":"listingEdit.submit"):W?D?i("sellModal.puttingOnSale"):i("sellModal.confirmListing"):i("sellModal.putUpForSale")})]})})}const pc=a.div`
|
|
741
|
+
position: fixed;
|
|
742
|
+
inset: 0;
|
|
743
|
+
z-index: 10000;
|
|
744
|
+
display: flex;
|
|
745
|
+
align-items: center;
|
|
746
|
+
justify-content: center;
|
|
747
|
+
padding: 16px;
|
|
748
|
+
background: rgba(22, 21, 24, 0.55);
|
|
749
|
+
`,hc=a.div`
|
|
750
|
+
width: 560px;
|
|
751
|
+
max-width: 100%;
|
|
752
|
+
max-height: 92vh;
|
|
753
|
+
overflow-y: auto;
|
|
754
|
+
background: ${n.colors.white};
|
|
755
|
+
border-radius: 16px;
|
|
756
|
+
padding: 12px 16px 16px;
|
|
757
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
758
|
+
display: flex;
|
|
759
|
+
flex-direction: column;
|
|
760
|
+
gap: 24px;
|
|
761
|
+
|
|
762
|
+
${n.media.maxWidth("mobile")} {
|
|
763
|
+
padding: 12px 16px 16px;
|
|
764
|
+
}
|
|
765
|
+
`,xc=a.div`
|
|
766
|
+
display: flex;
|
|
767
|
+
flex-direction: column;
|
|
768
|
+
gap: 4px;
|
|
769
|
+
padding-bottom: 16px;
|
|
770
|
+
border-bottom: 1px solid ${n.colors.gray4};
|
|
771
|
+
`,fc=a.div`
|
|
772
|
+
display: flex;
|
|
773
|
+
align-items: center;
|
|
774
|
+
justify-content: space-between;
|
|
775
|
+
gap: 8px;
|
|
776
|
+
`,mc=a.h2`
|
|
777
|
+
margin: 0;
|
|
778
|
+
font-family: ${n.font.sans};
|
|
779
|
+
font-weight: 600;
|
|
780
|
+
font-size: 20px;
|
|
781
|
+
line-height: 1.6;
|
|
782
|
+
color: ${n.colors.text};
|
|
783
|
+
`,gc=a.button`
|
|
784
|
+
flex: none;
|
|
785
|
+
display: grid;
|
|
786
|
+
place-items: center;
|
|
787
|
+
width: 24px;
|
|
788
|
+
height: 24px;
|
|
789
|
+
border: 0;
|
|
790
|
+
background: none;
|
|
791
|
+
cursor: pointer;
|
|
792
|
+
color: ${n.colors.text};
|
|
793
|
+
|
|
794
|
+
.ico {
|
|
795
|
+
width: 18px;
|
|
796
|
+
height: 18px;
|
|
797
|
+
}
|
|
798
|
+
&:disabled {
|
|
799
|
+
opacity: 0.4;
|
|
800
|
+
cursor: default;
|
|
801
|
+
}
|
|
802
|
+
&:focus-visible {
|
|
803
|
+
outline: 2px solid ${n.colors.accent};
|
|
804
|
+
outline-offset: 2px;
|
|
805
|
+
}
|
|
806
|
+
`,bc=a.div`
|
|
807
|
+
display: flex;
|
|
808
|
+
align-items: center;
|
|
809
|
+
gap: 12px;
|
|
810
|
+
`,yc=a.img`
|
|
811
|
+
flex: none;
|
|
812
|
+
width: 72px;
|
|
813
|
+
height: 72px;
|
|
814
|
+
border-radius: 12px;
|
|
815
|
+
object-fit: cover;
|
|
816
|
+
background: ${n.colors.media};
|
|
817
|
+
`,wc=a.p`
|
|
818
|
+
margin: 0;
|
|
819
|
+
font-family: ${n.font.sans};
|
|
820
|
+
font-weight: 600;
|
|
821
|
+
font-size: 18px;
|
|
822
|
+
line-height: 1.4;
|
|
823
|
+
color: ${n.colors.text};
|
|
824
|
+
`,vc=a.label`
|
|
825
|
+
display: flex;
|
|
826
|
+
flex-direction: column;
|
|
827
|
+
gap: 6px;
|
|
828
|
+
`,jc=a.span`
|
|
829
|
+
font-family: ${n.font.sans};
|
|
830
|
+
font-size: 12px;
|
|
831
|
+
color: ${n.colors.muted};
|
|
832
|
+
`,kc=a.input`
|
|
833
|
+
width: 100%;
|
|
834
|
+
height: 44px;
|
|
835
|
+
padding: 0 12px;
|
|
836
|
+
border: 1px solid ${n.colors.text};
|
|
837
|
+
border-radius: 8px;
|
|
838
|
+
background: ${n.colors.white};
|
|
839
|
+
font-family: ${n.font.sans};
|
|
840
|
+
font-size: 14px;
|
|
841
|
+
color: ${n.colors.text};
|
|
842
|
+
|
|
843
|
+
&::placeholder {
|
|
844
|
+
color: ${n.colors.muted2};
|
|
845
|
+
}
|
|
846
|
+
&:focus-visible {
|
|
847
|
+
outline: none;
|
|
848
|
+
border-color: ${n.colors.magenta};
|
|
849
|
+
}
|
|
850
|
+
&[aria-invalid='true'] {
|
|
851
|
+
border-color: ${n.colors.err};
|
|
852
|
+
}
|
|
853
|
+
&:disabled {
|
|
854
|
+
opacity: 0.6;
|
|
855
|
+
}
|
|
856
|
+
`,$c=a.p`
|
|
857
|
+
margin: 0;
|
|
858
|
+
padding: 12px 14px;
|
|
859
|
+
border-radius: 10px;
|
|
860
|
+
background: rgba(255, 45, 85, 0.1);
|
|
861
|
+
font-family: ${n.font.sans};
|
|
862
|
+
font-size: 13px;
|
|
863
|
+
line-height: 1.5;
|
|
864
|
+
color: ${n.colors.text2};
|
|
865
|
+
`,ua=a.div`
|
|
866
|
+
display: flex;
|
|
867
|
+
gap: 12px;
|
|
868
|
+
|
|
869
|
+
${n.media.maxWidth("mobile")} {
|
|
870
|
+
flex-direction: column-reverse;
|
|
871
|
+
}
|
|
872
|
+
`,Cc=a.button`
|
|
873
|
+
flex: 1;
|
|
874
|
+
height: 48px;
|
|
875
|
+
border: 2px solid ${n.colors.blackBtn};
|
|
876
|
+
border-radius: 16px;
|
|
877
|
+
background: transparent;
|
|
878
|
+
color: ${n.colors.text};
|
|
879
|
+
cursor: pointer;
|
|
880
|
+
font-family: ${n.font.sans};
|
|
881
|
+
font-weight: 600;
|
|
882
|
+
font-size: 15px;
|
|
883
|
+
line-height: 24px;
|
|
884
|
+
letter-spacing: 0.46px;
|
|
885
|
+
text-transform: uppercase;
|
|
886
|
+
|
|
887
|
+
&:hover:not(:disabled) {
|
|
888
|
+
background: rgba(36, 33, 41, 0.06);
|
|
889
|
+
}
|
|
890
|
+
&:focus-visible {
|
|
891
|
+
outline: 2px solid ${n.colors.accent};
|
|
892
|
+
outline-offset: 2px;
|
|
893
|
+
}
|
|
894
|
+
&:disabled {
|
|
895
|
+
opacity: 0.5;
|
|
896
|
+
cursor: default;
|
|
897
|
+
}
|
|
898
|
+
`,pa=a.button`
|
|
899
|
+
flex: 1;
|
|
900
|
+
display: inline-flex;
|
|
901
|
+
align-items: center;
|
|
902
|
+
justify-content: center;
|
|
903
|
+
gap: 8px;
|
|
904
|
+
height: 48px;
|
|
905
|
+
border: 0;
|
|
906
|
+
border-radius: 16px;
|
|
907
|
+
background: ${n.colors.blackBtn};
|
|
908
|
+
color: ${n.colors.softWhite};
|
|
909
|
+
cursor: pointer;
|
|
910
|
+
font-family: ${n.font.sans};
|
|
911
|
+
font-weight: 600;
|
|
912
|
+
font-size: 15px;
|
|
913
|
+
line-height: 24px;
|
|
914
|
+
letter-spacing: 0.46px;
|
|
915
|
+
text-transform: uppercase;
|
|
916
|
+
|
|
917
|
+
&:hover:not(:disabled) {
|
|
918
|
+
filter: brightness(1.35);
|
|
919
|
+
}
|
|
920
|
+
&:focus-visible {
|
|
921
|
+
outline: 2px solid ${n.colors.accent};
|
|
922
|
+
outline-offset: 2px;
|
|
923
|
+
}
|
|
924
|
+
&:disabled {
|
|
925
|
+
opacity: 0.55;
|
|
926
|
+
cursor: default;
|
|
927
|
+
}
|
|
928
|
+
`,Ic=a.div`
|
|
929
|
+
display: flex;
|
|
930
|
+
flex-direction: column;
|
|
931
|
+
align-items: center;
|
|
932
|
+
gap: 16px;
|
|
933
|
+
padding: 24px 16px;
|
|
934
|
+
border-radius: 16px;
|
|
935
|
+
background: rgba(193, 238, 207, 0.5);
|
|
936
|
+
text-align: center;
|
|
937
|
+
`,Sc=a.div`
|
|
938
|
+
display: grid;
|
|
939
|
+
place-items: center;
|
|
940
|
+
width: 64px;
|
|
941
|
+
height: 64px;
|
|
942
|
+
border-radius: 50%;
|
|
943
|
+
background: ${n.colors.ok};
|
|
944
|
+
color: ${n.colors.white};
|
|
945
|
+
|
|
946
|
+
.ico {
|
|
947
|
+
width: 34px;
|
|
948
|
+
height: 34px;
|
|
949
|
+
}
|
|
950
|
+
`,Ac=a.p`
|
|
951
|
+
margin: 0;
|
|
952
|
+
font-family: ${n.font.sans};
|
|
953
|
+
font-size: 16px;
|
|
954
|
+
line-height: 1.34;
|
|
955
|
+
color: ${n.colors.text2};
|
|
956
|
+
|
|
957
|
+
b {
|
|
958
|
+
font-weight: 700;
|
|
959
|
+
}
|
|
960
|
+
`;function Mc(t){return/^0x[a-fA-F0-9]{40}$/.test(t.trim())}function zc({item:t,session:s,onClose:l,onTransferred:o}){const[d,u]=c.useState(""),[x,m]=c.useState(!1),[b,$]=c.useState(null),[h,g]=c.useState(!1),y=d.trim(),j=Mc(y),I=j&&y.toLowerCase()===s.address.toLowerCase(),C=y.length===0?null:j?I?i("transfer.selfAddress"):null:i("transfer.invalidAddress"),S=j&&!I&&!x;async function N(){if(S){$(null),m(!0);try{await qo({contractAddress:t.contractAddress,chainId:t.chainId,tokenId:t.tokenId,to:y,signer:s.signer}),X("Shop Transferred Item",{contract_address:t.contractAddress,token_id:t.tokenId}),g(!0),Rt.success(i("transfer.toastSuccess",{name:t.name})),o==null||o()}catch(f){yt(f)||pe(f,{flow:"transfer-item",tokenId:t.tokenId}),X("Shop Transfer Failed",{error_code:Ce(f)}),$(yt(f)?i("getCredits.errorCanceled"):_e(f,i("transfer.errorGeneric")))}finally{m(!1)}}}return e.jsx(pc,{onClick:x?void 0:l,role:"presentation",children:e.jsxs(hc,{onClick:f=>f.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("transfer.title"),children:[e.jsx(xc,{children:e.jsxs(fc,{children:[e.jsx(mc,{children:i("transfer.title")}),e.jsx(gc,{onClick:l,disabled:x,"aria-label":i("sellModal.cancel"),children:e.jsx(R,{name:"close",className:"ico"})})]})}),h?e.jsxs(e.Fragment,{children:[e.jsxs(Ic,{children:[e.jsx(Sc,{"aria-hidden":!0,children:e.jsx(R,{name:"check",className:"ico"})}),e.jsx(Ac,{children:i("transfer.successBody",{name:t.name})})]}),e.jsx(ua,{children:e.jsx(pa,{onClick:l,children:i("getCredits.done")})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(bc,{children:[t.thumbnail?e.jsx(yc,{src:t.thumbnail,alt:""}):null,e.jsx(wc,{children:t.name})]}),e.jsxs(vc,{children:[e.jsx(jc,{children:i("transfer.addressLabel")}),e.jsx(kc,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:d,onChange:f=>u(f.target.value),disabled:x,"aria-invalid":!!C,"aria-label":i("transfer.addressLabel")}),C?e.jsx(Ve,{message:C}):null]}),e.jsx($c,{children:i("transfer.warning")}),e.jsx(Ve,{message:b}),e.jsxs(ua,{children:[e.jsx(Cc,{onClick:l,disabled:x,children:i("sellModal.cancel")}),e.jsx(pa,{onClick:()=>void N(),disabled:!S,children:x?i("transfer.transferring"):i("transfer.transfer")})]})]})]})})}const Rc=a(Xl)`
|
|
961
|
+
width: min(500px, 92vw);
|
|
962
|
+
gap: 20px;
|
|
963
|
+
|
|
964
|
+
${n.media.maxWidth("mobile")} {
|
|
965
|
+
[data-actions] {
|
|
966
|
+
flex-direction: column-reverse;
|
|
967
|
+
}
|
|
968
|
+
[data-actions] > * {
|
|
969
|
+
width: 100%;
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
`,Lc=a(Je)`
|
|
973
|
+
background: ${n.colors.accent};
|
|
974
|
+
color: ${n.colors.white};
|
|
975
|
+
text-transform: uppercase;
|
|
976
|
+
letter-spacing: 0.046em;
|
|
977
|
+
font-size: 13px;
|
|
978
|
+
|
|
979
|
+
&:hover:not(:disabled) {
|
|
980
|
+
background: ${n.colors.accentHover};
|
|
981
|
+
}
|
|
982
|
+
`;function Pc({name:t,managed:s,canPayGas:l,cancel:o,onClose:d}){const[u,x]=c.useState(!1),[m,b]=c.useState(!1),[$,h]=c.useState(null),[g,y]=c.useState(null);async function j(I){h(null),y(null),x(!0);try{const C=await o({payGas:I,onWaiting:S=>b(S>2e4)});C==="ok"?d():y(C==="relay-reverted"?"reverted":"pending")}catch(C){const S=yt(C);S||pe(C,{flow:"remove-listing"});const N=i("myAssets.removeListingError");h(s?N:S?i("getCredits.errorCanceled"):_e(C,N))}finally{x(!1),b(!1)}}return e.jsx(Zl,{onClick:u?void 0:d,role:"presentation",children:e.jsxs(Rc,{onClick:I=>I.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("removeListing.title"),"data-testid":"remove-listing-modal",children:[e.jsx(ed,{children:e.jsx(td,{children:i("removeListing.title")})}),e.jsx("p",{className:"muted",style:{margin:0},children:i("removeListing.body",{name:t})}),u&&m?e.jsx("p",{className:"muted small",style:{margin:0},"data-testid":"cancel-slow",children:i(l?"itemDetail.cancelSlow":"itemDetail.cancelSlowManaged")}):null,g?e.jsx(On,{state:g,canPayGas:l,busy:u,onPayGas:()=>void j(!0),testId:"cancel-gasless-failed"}):null,e.jsx(Ve,{message:$}),e.jsxs(nd,{"data-actions":!0,children:[e.jsx(Je,{variant:"outline",onClick:d,disabled:u,children:i("sellModal.cancel")}),e.jsx(Lc,{onClick:()=>void j(),disabled:u||g==="pending","data-testid":"remove-confirm",children:u?e.jsx(id,{size:"small"}):i("itemDetail.manageRemove")})]})]})})}const wn=a.div`
|
|
983
|
+
position: fixed;
|
|
984
|
+
inset: 0;
|
|
985
|
+
z-index: 10000;
|
|
986
|
+
display: flex;
|
|
987
|
+
align-items: center;
|
|
988
|
+
justify-content: center;
|
|
989
|
+
padding: 16px;
|
|
990
|
+
background: rgba(22, 21, 24, 0.55);
|
|
991
|
+
`,vn=a.div`
|
|
992
|
+
width: 560px;
|
|
993
|
+
max-width: 100%;
|
|
994
|
+
max-height: 92vh;
|
|
995
|
+
overflow-y: auto;
|
|
996
|
+
background: ${n.colors.white};
|
|
997
|
+
border-radius: 16px;
|
|
998
|
+
padding: 12px 16px 16px;
|
|
999
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
1000
|
+
display: flex;
|
|
1001
|
+
flex-direction: column;
|
|
1002
|
+
gap: 24px;
|
|
1003
|
+
`,jn=a.div`
|
|
1004
|
+
display: flex;
|
|
1005
|
+
align-items: center;
|
|
1006
|
+
justify-content: space-between;
|
|
1007
|
+
gap: 8px;
|
|
1008
|
+
padding-bottom: 16px;
|
|
1009
|
+
border-bottom: 1px solid ${n.colors.gray4};
|
|
1010
|
+
`,kn=a.h2`
|
|
1011
|
+
margin: 0;
|
|
1012
|
+
font-family: ${n.font.sans};
|
|
1013
|
+
font-weight: 600;
|
|
1014
|
+
font-size: 20px;
|
|
1015
|
+
line-height: 1.6;
|
|
1016
|
+
color: ${n.colors.text};
|
|
1017
|
+
`,$n=a.button`
|
|
1018
|
+
flex: none;
|
|
1019
|
+
display: grid;
|
|
1020
|
+
place-items: center;
|
|
1021
|
+
width: 24px;
|
|
1022
|
+
height: 24px;
|
|
1023
|
+
border: 0;
|
|
1024
|
+
background: none;
|
|
1025
|
+
cursor: pointer;
|
|
1026
|
+
color: ${n.colors.text};
|
|
1027
|
+
|
|
1028
|
+
.ico {
|
|
1029
|
+
width: 18px;
|
|
1030
|
+
height: 18px;
|
|
1031
|
+
}
|
|
1032
|
+
&:disabled {
|
|
1033
|
+
opacity: 0.4;
|
|
1034
|
+
cursor: default;
|
|
1035
|
+
}
|
|
1036
|
+
&:focus-visible {
|
|
1037
|
+
outline: 2px solid ${n.colors.accent};
|
|
1038
|
+
outline-offset: 2px;
|
|
1039
|
+
}
|
|
1040
|
+
`,Ec=a.p`
|
|
1041
|
+
margin: 0;
|
|
1042
|
+
font-family: ${n.font.sans};
|
|
1043
|
+
font-size: 14px;
|
|
1044
|
+
line-height: 1.57;
|
|
1045
|
+
color: ${n.colors.text};
|
|
1046
|
+
text-align: left;
|
|
1047
|
+
`,Tc=a.div`
|
|
1048
|
+
display: flex;
|
|
1049
|
+
align-items: center;
|
|
1050
|
+
gap: 12px;
|
|
1051
|
+
`,Fc=a.div`
|
|
1052
|
+
flex: none;
|
|
1053
|
+
display: grid;
|
|
1054
|
+
place-items: center;
|
|
1055
|
+
width: 180px;
|
|
1056
|
+
height: 180px;
|
|
1057
|
+
border-radius: 16px;
|
|
1058
|
+
background: ${n.colors.media};
|
|
1059
|
+
border: 1px solid ${n.colors.gray4};
|
|
1060
|
+
overflow: hidden;
|
|
1061
|
+
|
|
1062
|
+
img {
|
|
1063
|
+
width: 150px;
|
|
1064
|
+
height: 150px;
|
|
1065
|
+
object-fit: contain;
|
|
1066
|
+
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
${n.media.maxWidth("mobile")} {
|
|
1070
|
+
width: 120px;
|
|
1071
|
+
height: 120px;
|
|
1072
|
+
|
|
1073
|
+
img {
|
|
1074
|
+
width: 100px;
|
|
1075
|
+
height: 100px;
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
`,Bc=a.div`
|
|
1079
|
+
flex: 1 1 0;
|
|
1080
|
+
min-width: 0;
|
|
1081
|
+
display: flex;
|
|
1082
|
+
flex-direction: column;
|
|
1083
|
+
gap: 4px;
|
|
1084
|
+
padding: 8px;
|
|
1085
|
+
`,Nc=a.p`
|
|
1086
|
+
margin: 0;
|
|
1087
|
+
font-family: ${n.font.sans};
|
|
1088
|
+
font-weight: 600;
|
|
1089
|
+
font-size: 20px;
|
|
1090
|
+
line-height: 1.57;
|
|
1091
|
+
color: ${n.colors.text};
|
|
1092
|
+
`,Wc=a.p`
|
|
1093
|
+
margin: 0;
|
|
1094
|
+
font-family: ${n.font.sans};
|
|
1095
|
+
font-size: 10px;
|
|
1096
|
+
line-height: 1.43;
|
|
1097
|
+
color: ${n.colors.muted};
|
|
1098
|
+
`,Dc=a.label`
|
|
1099
|
+
display: flex;
|
|
1100
|
+
flex-direction: column;
|
|
1101
|
+
gap: 4px;
|
|
1102
|
+
`,Oc=a.span`
|
|
1103
|
+
font-family: ${n.font.sans};
|
|
1104
|
+
font-size: 12px;
|
|
1105
|
+
color: ${n.colors.muted};
|
|
1106
|
+
`,qc=a.div`
|
|
1107
|
+
display: flex;
|
|
1108
|
+
align-items: center;
|
|
1109
|
+
justify-content: space-between;
|
|
1110
|
+
gap: 4px;
|
|
1111
|
+
height: 42px;
|
|
1112
|
+
padding: 0 8px;
|
|
1113
|
+
border: 0.5px solid ${n.colors.text};
|
|
1114
|
+
border-radius: 8px;
|
|
1115
|
+
background: ${n.colors.white};
|
|
1116
|
+
|
|
1117
|
+
&:focus-within {
|
|
1118
|
+
border-color: ${n.colors.magenta};
|
|
1119
|
+
}
|
|
1120
|
+
&[aria-invalid='true'] {
|
|
1121
|
+
border-color: ${n.colors.err};
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
.ccy {
|
|
1125
|
+
flex: none;
|
|
1126
|
+
width: 22px;
|
|
1127
|
+
height: 22px;
|
|
1128
|
+
color: ${n.colors.rarity};
|
|
1129
|
+
}
|
|
1130
|
+
`,Kc=a.input`
|
|
1131
|
+
flex: 1 1 auto;
|
|
1132
|
+
min-width: 0;
|
|
1133
|
+
border: 0;
|
|
1134
|
+
outline: none;
|
|
1135
|
+
background: transparent;
|
|
1136
|
+
font-family: ${n.font.sans};
|
|
1137
|
+
font-size: 13px;
|
|
1138
|
+
color: ${n.colors.text};
|
|
1139
|
+
|
|
1140
|
+
&::placeholder {
|
|
1141
|
+
color: ${n.colors.muted2};
|
|
1142
|
+
}
|
|
1143
|
+
/* Strip the number spinners — the glyph + USD hint carry the affordance. */
|
|
1144
|
+
&::-webkit-outer-spin-button,
|
|
1145
|
+
&::-webkit-inner-spin-button {
|
|
1146
|
+
-webkit-appearance: none;
|
|
1147
|
+
margin: 0;
|
|
1148
|
+
}
|
|
1149
|
+
&[type='number'] {
|
|
1150
|
+
-moz-appearance: textfield;
|
|
1151
|
+
appearance: textfield;
|
|
1152
|
+
}
|
|
1153
|
+
`,Hc=a.span`
|
|
1154
|
+
flex: none;
|
|
1155
|
+
font-family: ${n.font.sans};
|
|
1156
|
+
font-size: 10px;
|
|
1157
|
+
color: ${n.colors.muted2};
|
|
1158
|
+
`,_t=a.p`
|
|
1159
|
+
margin: 0;
|
|
1160
|
+
font-family: ${n.font.sans};
|
|
1161
|
+
font-size: 12px;
|
|
1162
|
+
line-height: 1.5;
|
|
1163
|
+
color: ${n.colors.muted};
|
|
1164
|
+
`,Uc=a.button`
|
|
1165
|
+
width: 100%;
|
|
1166
|
+
height: 48px;
|
|
1167
|
+
border: 0;
|
|
1168
|
+
border-radius: 16px;
|
|
1169
|
+
cursor: pointer;
|
|
1170
|
+
background: ${n.colors.accent};
|
|
1171
|
+
color: ${n.colors.white};
|
|
1172
|
+
font-family: ${n.font.sans};
|
|
1173
|
+
font-weight: 600;
|
|
1174
|
+
font-size: 15px;
|
|
1175
|
+
line-height: 24px;
|
|
1176
|
+
letter-spacing: 0.46px;
|
|
1177
|
+
text-transform: uppercase;
|
|
1178
|
+
|
|
1179
|
+
&:hover:not(:disabled) {
|
|
1180
|
+
background: ${n.colors.accentHover};
|
|
1181
|
+
}
|
|
1182
|
+
&:focus-visible {
|
|
1183
|
+
outline: 2px solid ${n.colors.accent};
|
|
1184
|
+
outline-offset: 2px;
|
|
1185
|
+
}
|
|
1186
|
+
&:disabled {
|
|
1187
|
+
cursor: not-allowed;
|
|
1188
|
+
background: rgba(105, 31, 169, 0.2);
|
|
1189
|
+
color: ${n.colors.white};
|
|
1190
|
+
}
|
|
1191
|
+
`,Qc=a.p`
|
|
1192
|
+
margin: 0;
|
|
1193
|
+
font-family: ${n.font.sans};
|
|
1194
|
+
font-size: 13px;
|
|
1195
|
+
color: ${n.colors.muted};
|
|
1196
|
+
text-align: center;
|
|
1197
|
+
`,Gc=a.div`
|
|
1198
|
+
display: flex;
|
|
1199
|
+
flex-direction: column;
|
|
1200
|
+
align-items: center;
|
|
1201
|
+
gap: 16px;
|
|
1202
|
+
padding: 24px 16px;
|
|
1203
|
+
border-radius: 16px;
|
|
1204
|
+
background: rgba(193, 238, 207, 0.5);
|
|
1205
|
+
text-align: center;
|
|
1206
|
+
`,_c=a.div`
|
|
1207
|
+
display: grid;
|
|
1208
|
+
place-items: center;
|
|
1209
|
+
width: 64px;
|
|
1210
|
+
height: 64px;
|
|
1211
|
+
border-radius: 50%;
|
|
1212
|
+
background: ${n.colors.ok};
|
|
1213
|
+
color: ${n.colors.white};
|
|
1214
|
+
|
|
1215
|
+
.ico {
|
|
1216
|
+
width: 34px;
|
|
1217
|
+
height: 34px;
|
|
1218
|
+
}
|
|
1219
|
+
`,Vc=a.p`
|
|
1220
|
+
margin: 0;
|
|
1221
|
+
font-family: ${n.font.sans};
|
|
1222
|
+
font-size: 20px;
|
|
1223
|
+
line-height: 1.334;
|
|
1224
|
+
color: ${n.colors.text2};
|
|
1225
|
+
|
|
1226
|
+
b {
|
|
1227
|
+
font-weight: 700;
|
|
1228
|
+
}
|
|
1229
|
+
`,Jc=a.p`
|
|
1230
|
+
margin: 0;
|
|
1231
|
+
display: inline-flex;
|
|
1232
|
+
align-items: center;
|
|
1233
|
+
gap: 4px;
|
|
1234
|
+
font-family: ${n.font.sans};
|
|
1235
|
+
font-size: 14px;
|
|
1236
|
+
line-height: 1.43;
|
|
1237
|
+
color: ${n.colors.text2};
|
|
1238
|
+
|
|
1239
|
+
strong {
|
|
1240
|
+
display: inline-flex;
|
|
1241
|
+
align-items: center;
|
|
1242
|
+
gap: 4px;
|
|
1243
|
+
font-weight: 700;
|
|
1244
|
+
}
|
|
1245
|
+
.ccy-mark {
|
|
1246
|
+
width: 18px;
|
|
1247
|
+
height: 18px;
|
|
1248
|
+
color: ${n.colors.rarity};
|
|
1249
|
+
}
|
|
1250
|
+
`,Yc=a.div`
|
|
1251
|
+
display: flex;
|
|
1252
|
+
gap: 12px;
|
|
1253
|
+
|
|
1254
|
+
${n.media.maxWidth("mobile")} {
|
|
1255
|
+
flex-direction: column-reverse;
|
|
1256
|
+
}
|
|
1257
|
+
`,Xc=a.button`
|
|
1258
|
+
flex: 1 1 0;
|
|
1259
|
+
height: 48px;
|
|
1260
|
+
border: 2px solid ${n.colors.accent};
|
|
1261
|
+
border-radius: 12px;
|
|
1262
|
+
background: transparent;
|
|
1263
|
+
color: ${n.colors.accent};
|
|
1264
|
+
cursor: pointer;
|
|
1265
|
+
font-family: ${n.font.sans};
|
|
1266
|
+
font-weight: 600;
|
|
1267
|
+
font-size: 13px;
|
|
1268
|
+
line-height: 24px;
|
|
1269
|
+
letter-spacing: 0.46px;
|
|
1270
|
+
text-transform: uppercase;
|
|
1271
|
+
|
|
1272
|
+
&:hover {
|
|
1273
|
+
background: rgba(105, 31, 169, 0.06);
|
|
1274
|
+
}
|
|
1275
|
+
&:focus-visible {
|
|
1276
|
+
outline: 2px solid ${n.colors.accent};
|
|
1277
|
+
outline-offset: 2px;
|
|
1278
|
+
}
|
|
1279
|
+
`,Zc=a.button`
|
|
1280
|
+
flex: 1 1 0;
|
|
1281
|
+
height: 48px;
|
|
1282
|
+
border: 0;
|
|
1283
|
+
border-radius: 12px;
|
|
1284
|
+
background: ${n.colors.accent};
|
|
1285
|
+
color: ${n.colors.softWhite};
|
|
1286
|
+
cursor: pointer;
|
|
1287
|
+
font-family: ${n.font.sans};
|
|
1288
|
+
font-weight: 600;
|
|
1289
|
+
font-size: 13px;
|
|
1290
|
+
line-height: 24px;
|
|
1291
|
+
letter-spacing: 0.46px;
|
|
1292
|
+
text-transform: uppercase;
|
|
1293
|
+
|
|
1294
|
+
&:hover {
|
|
1295
|
+
background: ${n.colors.accentHover};
|
|
1296
|
+
}
|
|
1297
|
+
&:focus-visible {
|
|
1298
|
+
outline: 2px solid ${n.colors.accent};
|
|
1299
|
+
outline-offset: 2px;
|
|
1300
|
+
}
|
|
1301
|
+
`,eu=1e3*60*60*24*182;function tu({item:t,session:s,edit:l,onListed:o,onClose:d}){const u=ct(),x=dt(),[m,b]=c.useState(l!=null&&l.currentCredits?String(l.currentCredits):"10"),[$,h]=c.useState(null),[g,y]=c.useState(null),[j,I]=c.useState(!1),[C,S]=c.useState(null),[N,f]=c.useState(null),{cancelDone:W,slow:r,cancelFailed:E,setCancelFailed:Y,cancelCurrent:K,signal:A}=zr(l,y),z=ot.chainId,H=nn(s),{data:_}=en(s.address),ne=_!=null&&_.name?tn(_.name):Dn(s.address),de=Number(m),ee=Number.isInteger(de)&&de>0,V=!!l&&!W&&de===l.currentCredits,D=ee?`$${st(de).toFixed(2)}`:"$0";c.useEffect(()=>{let L=!1;return(async()=>{try{const F=await Pl({contractAddress:t.contractAddress,chainId:z});L||S(F)}catch{L||S(!1)}})(),()=>{L=!0}},[t.contractAddress,z]);async function q(L={}){var M,se;y(null);const F=Number(m);if(!Number.isInteger(F)||F<=0){y(i("primaryList.errorWholeNumber"));return}I(!0);try{if(!await K(L.payGas))return;C||(h(i("primaryList.statusEnabling")),await El({signer:s.signer,contractAddress:t.contractAddress,chainId:z}),S(!0)),h(i("primaryList.statusPublishing"));const ie=await Tl({signer:s.signer,item:{contractAddress:t.contractAddress,itemId:t.blockchainItemId,network:Ae.Network.MATIC,chainId:z},usdPrice:st(F),uses:t.remainingSupply,expiresAtMs:Date.now()+eu});h(i("primaryList.statusFinishing"));const xe=await(l?Ir(ie,s.identity,{signal:A()}):or(ie,s.identity));(M=A())==null||M.throwIfAborted(),h(null),f(F),X("Shop Listed Item",{item_id:t.blockchainItemId,contract_address:t.contractAddress,price_credits:F,price_usd:st(F),listing_type:"primary",is_primary:!0}),Rt.success(i(l?"listingEdit.toastUpdated":"primaryList.toastOnSale",{name:t.name})),o==null||o(F,xe.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(ie){if((se=A())!=null&&se.aborted)return;pe(ie,{flow:"list_primary"}),X("Shop Listing Failed",{listing_type:"primary",error_code:Ce(ie)}),y(_e(ie,i(l?"listingEdit.listFailedAfterCancel":"primaryList.errorGeneric"))),h(null)}finally{I(!1)}}function w(){d(),x(Ms(t.contractAddress,t.blockchainItemId))}const fe=C===null?i("primaryList.checking"):l?i(W?"primaryList.putOnSale":"listingEdit.submit"):j?H?i("primaryList.publishing"):i("primaryList.confirmListing"):C===!1?i("primaryList.enableAndPutOnSale"):i("primaryList.putOnSale");return N!==null?e.jsx(wn,{onClick:d,role:"presentation",children:e.jsxs(vn,{onClick:L=>L.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i(l?"listingEdit.successHeader":"primaryList.successTitle"),children:[e.jsxs(jn,{children:[e.jsx(kn,{children:i(l?"listingEdit.successHeader":"primaryList.successTitle")}),e.jsx($n,{onClick:d,"aria-label":i("getCredits.done"),children:e.jsx(R,{name:"close",className:"ico"})})]}),e.jsxs(Gc,{children:[e.jsx(_c,{"aria-hidden":!0,children:e.jsx(R,{name:"check",className:"ico"})}),e.jsx(Vc,{children:e.jsx("b",{children:t.name})}),e.jsxs(Jc,{children:[i("primaryList.listedFor")," ",e.jsxs("strong",{children:[e.jsx(ve,{className:"ccy-mark"})," ",e.jsx(ye,{credits:N})]})," ",i("primaryList.dotAvailable",{count:t.remainingSupply})]})]}),e.jsxs(Yc,{children:[e.jsx(Xc,{onClick:d,children:i("getCredits.done")}),e.jsx(Zc,{onClick:w,children:i("primaryList.viewInShop")})]})]})}):l&&j?e.jsx(wn,{role:"presentation",children:e.jsxs(vn,{onClick:L=>L.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("listingEdit.title"),"data-testid":"modal",children:[e.jsxs(jn,{children:[e.jsx(kn,{children:i("listingEdit.title")}),e.jsx($n,{disabled:!0,"aria-label":i("primaryList.cancel"),children:e.jsx(R,{name:"close",className:"ico"})})]}),e.jsx(Rr,{phase:W?"list":"cancel",managed:H,slow:r})]})}):e.jsx(wn,{onClick:j?void 0:d,role:"presentation",children:e.jsxs(vn,{"data-testid":"modal",onClick:L=>L.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":l?i("listingEdit.title"):i("primaryList.publishTitle",{name:t.name}),children:[e.jsxs(jn,{children:[e.jsx(kn,{children:l?i("listingEdit.title"):i("primaryList.publishTitle",{name:t.name})}),e.jsx($n,{onClick:d,disabled:j,"aria-label":i("primaryList.cancel"),children:e.jsx(R,{name:"close",className:"ico"})})]}),e.jsx(Ec,{children:i("primaryList.fromCollection",{collectionName:t.collectionName,count:t.remainingSupply})}),e.jsxs(Tc,{children:[e.jsx(Fc,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs(Bc,{children:[e.jsx(Nc,{children:t.name}),ne?e.jsx(Wc,{children:i("primaryList.byCreator",{name:ne})}):null]})]}),e.jsxs(Dc,{children:[e.jsx(Oc,{children:i("primaryList.priceShort")}),e.jsxs(qc,{"aria-invalid":m.length>0&&!ee,children:[e.jsx(ve,{className:"ccy"}),e.jsx(Kc,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:m,onChange:L=>b(L.target.value),disabled:j,"aria-label":i("primaryList.priceLabel",{currency:ze.name})}),e.jsx(Hc,{"aria-hidden":!0,children:D})]})]}),e.jsx(_t,{children:i("primaryList.pricedInWhole",{currency:ze.name,currencySingular:ze.nameSingular})}),l?!j&&!W?e.jsx(_t,{children:i("listingEdit.subtitle")}):null:C===!1&&!j?e.jsx(_t,{children:H?i("primaryList.firstTimeManaged",{collectionName:t.collectionName}):i("primaryList.firstTimeConfirm",{collectionName:t.collectionName})}):C===!0&&!j?e.jsx(_t,{children:H?i("primaryList.readyManaged"):i("primaryList.readyConfirm")}):null,E?e.jsx(On,{state:E,canPayGas:!!(l!=null&&l.canPayGas),busy:j,onPayGas:()=>void q({payGas:!0}),onLater:()=>Y(null)}):null,$&&!l?e.jsx(Qc,{children:$}):null,e.jsx(Ve,{message:g}),e.jsx(Uc,{onClick:()=>void q(),disabled:j||V||E==="pending"||C===null||!ee,"data-testid":"list-submit",children:fe})]})})}const Lr=["function issueTokens(address[] _beneficiaries, uint256[] _itemIds)"];function Pr(t){return/^0x[a-fA-F0-9]{40}$/.test(t.trim())}function Er(t){return t.reduce((s,l)=>s+Math.max(0,Math.floor(l.amount||0)),0)}function nu(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(!Pr(d.address)||!Number.isInteger(d.amount)||d.amount<1)return!1;const o=Er(l);return o>=1&&o<=s}function iu(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 m=0;m<x;m++)l.push(u),o.push(s)}return{beneficiaries:l,itemIds:o}}async function au(t){const{contractAddress:s,chainId:l,beneficiaries:o,itemIds:d,signer:u}=t,x={...Rs(Ls.ERC721CollectionV2,l),address:s},m=new Hl(Lr).encodeFunctionData("issueTokens",[o,d]),b=Nl(),$=Wl(u.provider,b),h=await sd($,b,m,x,{serverURL:jr.relayerUrl});return await Dl(h,"the mint"),h}async function ru(t){const{signer:s,contractAddress:l,chainId:o,entries:d,itemId:u}=t,{beneficiaries:x,itemIds:m}=iu(d,u);if(x.length===0)throw new Error("No copies to issue");if(jr.enabled)try{return await au({contractAddress:l,chainId:o,beneficiaries:x,itemIds:m,signer:s})}catch(g){if(g instanceof ad&&g.code===rd.USER_DENIED||g instanceof Fl)throw g;console.warn("[issue] gasless meta-tx failed, falling back to a direct tx:",g)}return await zs(s.provider,o),(await(await new Kl(l,Lr,s).issueTokens(x,m,Bl(o))).wait()).transactionHash}const su=a.div`
|
|
1302
|
+
position: fixed;
|
|
1303
|
+
inset: 0;
|
|
1304
|
+
z-index: 10000;
|
|
1305
|
+
display: flex;
|
|
1306
|
+
align-items: center;
|
|
1307
|
+
justify-content: center;
|
|
1308
|
+
padding: 16px;
|
|
1309
|
+
background: rgba(22, 21, 24, 0.55);
|
|
1310
|
+
`,ou=a.div`
|
|
1311
|
+
width: 560px;
|
|
1312
|
+
max-width: 100%;
|
|
1313
|
+
max-height: 92vh;
|
|
1314
|
+
overflow-y: auto;
|
|
1315
|
+
background: ${n.colors.white};
|
|
1316
|
+
border-radius: 16px;
|
|
1317
|
+
padding: 12px 16px 16px;
|
|
1318
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
1319
|
+
display: flex;
|
|
1320
|
+
flex-direction: column;
|
|
1321
|
+
gap: 20px;
|
|
1322
|
+
`,lu=a.div`
|
|
1323
|
+
display: flex;
|
|
1324
|
+
align-items: center;
|
|
1325
|
+
justify-content: space-between;
|
|
1326
|
+
gap: 8px;
|
|
1327
|
+
padding-bottom: 16px;
|
|
1328
|
+
border-bottom: 1px solid ${n.colors.gray4};
|
|
1329
|
+
`,du=a.h2`
|
|
1330
|
+
margin: 0;
|
|
1331
|
+
font-family: ${n.font.sans};
|
|
1332
|
+
font-weight: 600;
|
|
1333
|
+
font-size: 20px;
|
|
1334
|
+
line-height: 1.6;
|
|
1335
|
+
color: ${n.colors.text};
|
|
1336
|
+
`,cu=a.button`
|
|
1337
|
+
flex: none;
|
|
1338
|
+
display: grid;
|
|
1339
|
+
place-items: center;
|
|
1340
|
+
width: 24px;
|
|
1341
|
+
height: 24px;
|
|
1342
|
+
border: 0;
|
|
1343
|
+
background: none;
|
|
1344
|
+
cursor: pointer;
|
|
1345
|
+
color: ${n.colors.text};
|
|
1346
|
+
|
|
1347
|
+
.ico {
|
|
1348
|
+
width: 18px;
|
|
1349
|
+
height: 18px;
|
|
1350
|
+
}
|
|
1351
|
+
&:disabled {
|
|
1352
|
+
opacity: 0.4;
|
|
1353
|
+
cursor: default;
|
|
1354
|
+
}
|
|
1355
|
+
&:focus-visible {
|
|
1356
|
+
outline: 2px solid ${n.colors.accent};
|
|
1357
|
+
outline-offset: 2px;
|
|
1358
|
+
}
|
|
1359
|
+
`,uu=a.p`
|
|
1360
|
+
margin: 0;
|
|
1361
|
+
font-family: ${n.font.sans};
|
|
1362
|
+
font-size: 14px;
|
|
1363
|
+
line-height: 1.57;
|
|
1364
|
+
color: ${n.colors.text};
|
|
1365
|
+
text-align: left;
|
|
1366
|
+
`,pu=a.div`
|
|
1367
|
+
display: flex;
|
|
1368
|
+
align-items: center;
|
|
1369
|
+
gap: 12px;
|
|
1370
|
+
`,hu=a.div`
|
|
1371
|
+
flex: none;
|
|
1372
|
+
display: grid;
|
|
1373
|
+
place-items: center;
|
|
1374
|
+
width: 56px;
|
|
1375
|
+
height: 56px;
|
|
1376
|
+
border-radius: 12px;
|
|
1377
|
+
background: ${n.colors.media};
|
|
1378
|
+
border: 1px solid ${n.colors.gray4};
|
|
1379
|
+
overflow: hidden;
|
|
1380
|
+
|
|
1381
|
+
img {
|
|
1382
|
+
width: 48px;
|
|
1383
|
+
height: 48px;
|
|
1384
|
+
object-fit: contain;
|
|
1385
|
+
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
|
|
1386
|
+
}
|
|
1387
|
+
`,xu=a.p`
|
|
1388
|
+
margin: 0;
|
|
1389
|
+
font-family: ${n.font.sans};
|
|
1390
|
+
font-weight: 600;
|
|
1391
|
+
font-size: 16px;
|
|
1392
|
+
line-height: 1.4;
|
|
1393
|
+
color: ${n.colors.text};
|
|
1394
|
+
`,fu=a.div`
|
|
1395
|
+
display: flex;
|
|
1396
|
+
flex-direction: column;
|
|
1397
|
+
gap: 10px;
|
|
1398
|
+
`,mu=a.div`
|
|
1399
|
+
display: flex;
|
|
1400
|
+
align-items: flex-start;
|
|
1401
|
+
gap: 8px;
|
|
1402
|
+
`,gu=a.label`
|
|
1403
|
+
flex: 1 1 auto;
|
|
1404
|
+
min-width: 0;
|
|
1405
|
+
display: flex;
|
|
1406
|
+
flex-direction: column;
|
|
1407
|
+
gap: 4px;
|
|
1408
|
+
`,bu=a.label`
|
|
1409
|
+
flex: none;
|
|
1410
|
+
width: 96px;
|
|
1411
|
+
display: flex;
|
|
1412
|
+
flex-direction: column;
|
|
1413
|
+
gap: 4px;
|
|
1414
|
+
`,ha=a.span`
|
|
1415
|
+
font-family: ${n.font.sans};
|
|
1416
|
+
font-size: 12px;
|
|
1417
|
+
color: ${n.colors.muted};
|
|
1418
|
+
`,xa=a.input`
|
|
1419
|
+
height: 42px;
|
|
1420
|
+
padding: 0 10px;
|
|
1421
|
+
border: 0.5px solid ${n.colors.text};
|
|
1422
|
+
border-radius: 8px;
|
|
1423
|
+
background: ${n.colors.white};
|
|
1424
|
+
font-family: ${n.font.sans};
|
|
1425
|
+
font-size: 13px;
|
|
1426
|
+
color: ${n.colors.text};
|
|
1427
|
+
outline: none;
|
|
1428
|
+
|
|
1429
|
+
&::placeholder {
|
|
1430
|
+
color: ${n.colors.muted2};
|
|
1431
|
+
}
|
|
1432
|
+
&:focus {
|
|
1433
|
+
border-color: ${n.colors.magenta};
|
|
1434
|
+
}
|
|
1435
|
+
&[aria-invalid='true'] {
|
|
1436
|
+
border-color: ${n.colors.err};
|
|
1437
|
+
}
|
|
1438
|
+
/* Strip the number spinners on the amount input. */
|
|
1439
|
+
&::-webkit-outer-spin-button,
|
|
1440
|
+
&::-webkit-inner-spin-button {
|
|
1441
|
+
-webkit-appearance: none;
|
|
1442
|
+
margin: 0;
|
|
1443
|
+
}
|
|
1444
|
+
&[type='number'] {
|
|
1445
|
+
-moz-appearance: textfield;
|
|
1446
|
+
appearance: textfield;
|
|
1447
|
+
}
|
|
1448
|
+
`,yu=a.button`
|
|
1449
|
+
flex: none;
|
|
1450
|
+
margin-top: 22px;
|
|
1451
|
+
display: grid;
|
|
1452
|
+
place-items: center;
|
|
1453
|
+
width: 42px;
|
|
1454
|
+
height: 42px;
|
|
1455
|
+
border: 0.5px solid ${n.colors.gray4};
|
|
1456
|
+
border-radius: 8px;
|
|
1457
|
+
background: ${n.colors.white};
|
|
1458
|
+
color: ${n.colors.muted};
|
|
1459
|
+
cursor: pointer;
|
|
1460
|
+
|
|
1461
|
+
.ico {
|
|
1462
|
+
width: 16px;
|
|
1463
|
+
height: 16px;
|
|
1464
|
+
}
|
|
1465
|
+
&:hover:not(:disabled) {
|
|
1466
|
+
color: ${n.colors.err};
|
|
1467
|
+
border-color: ${n.colors.err};
|
|
1468
|
+
}
|
|
1469
|
+
&:disabled {
|
|
1470
|
+
opacity: 0.35;
|
|
1471
|
+
cursor: default;
|
|
1472
|
+
}
|
|
1473
|
+
&:focus-visible {
|
|
1474
|
+
outline: 2px solid ${n.colors.accent};
|
|
1475
|
+
outline-offset: 2px;
|
|
1476
|
+
}
|
|
1477
|
+
`,wu=a.button`
|
|
1478
|
+
align-self: flex-start;
|
|
1479
|
+
display: inline-flex;
|
|
1480
|
+
align-items: center;
|
|
1481
|
+
gap: 6px;
|
|
1482
|
+
border: 0;
|
|
1483
|
+
background: none;
|
|
1484
|
+
padding: 0;
|
|
1485
|
+
cursor: pointer;
|
|
1486
|
+
font-family: ${n.font.sans};
|
|
1487
|
+
font-weight: 600;
|
|
1488
|
+
font-size: 13px;
|
|
1489
|
+
color: ${n.colors.accent};
|
|
1490
|
+
|
|
1491
|
+
.ico {
|
|
1492
|
+
width: 16px;
|
|
1493
|
+
height: 16px;
|
|
1494
|
+
}
|
|
1495
|
+
&:disabled {
|
|
1496
|
+
opacity: 0.4;
|
|
1497
|
+
cursor: default;
|
|
1498
|
+
}
|
|
1499
|
+
&:focus-visible {
|
|
1500
|
+
outline: 2px solid ${n.colors.accent};
|
|
1501
|
+
outline-offset: 2px;
|
|
1502
|
+
}
|
|
1503
|
+
`,vu=a.p`
|
|
1504
|
+
margin: 0;
|
|
1505
|
+
font-family: ${n.font.sans};
|
|
1506
|
+
font-size: 13px;
|
|
1507
|
+
line-height: 1.5;
|
|
1508
|
+
color: ${t=>t.over?n.colors.err:n.colors.text};
|
|
1509
|
+
|
|
1510
|
+
strong {
|
|
1511
|
+
font-weight: 700;
|
|
1512
|
+
}
|
|
1513
|
+
`,ju=a.p`
|
|
1514
|
+
margin: 0;
|
|
1515
|
+
font-family: ${n.font.sans};
|
|
1516
|
+
font-size: 12px;
|
|
1517
|
+
line-height: 1.5;
|
|
1518
|
+
color: ${n.colors.muted};
|
|
1519
|
+
`;a.p`
|
|
1520
|
+
margin: 0;
|
|
1521
|
+
font-family: ${n.font.sans};
|
|
1522
|
+
font-size: 13px;
|
|
1523
|
+
color: ${n.colors.muted};
|
|
1524
|
+
text-align: center;
|
|
1525
|
+
`;const ku=a.p`
|
|
1526
|
+
margin: 0;
|
|
1527
|
+
font-family: ${n.font.sans};
|
|
1528
|
+
font-size: 11px;
|
|
1529
|
+
color: ${n.colors.err};
|
|
1530
|
+
`,fa=a.div`
|
|
1531
|
+
display: flex;
|
|
1532
|
+
gap: 12px;
|
|
1533
|
+
|
|
1534
|
+
${n.media.maxWidth("mobile")} {
|
|
1535
|
+
flex-direction: column-reverse;
|
|
1536
|
+
}
|
|
1537
|
+
`,$u=a.button`
|
|
1538
|
+
flex: 1 1 0;
|
|
1539
|
+
height: 48px;
|
|
1540
|
+
border: 2px solid ${n.colors.accent};
|
|
1541
|
+
border-radius: 12px;
|
|
1542
|
+
background: transparent;
|
|
1543
|
+
color: ${n.colors.accent};
|
|
1544
|
+
cursor: pointer;
|
|
1545
|
+
font-family: ${n.font.sans};
|
|
1546
|
+
font-weight: 600;
|
|
1547
|
+
font-size: 13px;
|
|
1548
|
+
line-height: 24px;
|
|
1549
|
+
letter-spacing: 0.46px;
|
|
1550
|
+
text-transform: uppercase;
|
|
1551
|
+
|
|
1552
|
+
&:hover:not(:disabled) {
|
|
1553
|
+
background: rgba(105, 31, 169, 0.06);
|
|
1554
|
+
}
|
|
1555
|
+
&:disabled {
|
|
1556
|
+
opacity: 0.5;
|
|
1557
|
+
cursor: not-allowed;
|
|
1558
|
+
}
|
|
1559
|
+
&:focus-visible {
|
|
1560
|
+
outline: 2px solid ${n.colors.accent};
|
|
1561
|
+
outline-offset: 2px;
|
|
1562
|
+
}
|
|
1563
|
+
`,ma=a.button`
|
|
1564
|
+
flex: 1 1 0;
|
|
1565
|
+
height: 48px;
|
|
1566
|
+
border: 0;
|
|
1567
|
+
border-radius: 12px;
|
|
1568
|
+
cursor: pointer;
|
|
1569
|
+
background: ${n.colors.accent};
|
|
1570
|
+
color: ${n.colors.white};
|
|
1571
|
+
font-family: ${n.font.sans};
|
|
1572
|
+
font-weight: 600;
|
|
1573
|
+
font-size: 13px;
|
|
1574
|
+
line-height: 24px;
|
|
1575
|
+
letter-spacing: 0.46px;
|
|
1576
|
+
text-transform: uppercase;
|
|
1577
|
+
|
|
1578
|
+
&:hover:not(:disabled) {
|
|
1579
|
+
background: ${n.colors.accentHover};
|
|
1580
|
+
}
|
|
1581
|
+
&:focus-visible {
|
|
1582
|
+
outline: 2px solid ${n.colors.accent};
|
|
1583
|
+
outline-offset: 2px;
|
|
1584
|
+
}
|
|
1585
|
+
&:disabled {
|
|
1586
|
+
cursor: not-allowed;
|
|
1587
|
+
background: rgba(105, 31, 169, 0.2);
|
|
1588
|
+
color: ${n.colors.white};
|
|
1589
|
+
}
|
|
1590
|
+
`,Cu=a.div`
|
|
1591
|
+
display: flex;
|
|
1592
|
+
flex-direction: column;
|
|
1593
|
+
align-items: center;
|
|
1594
|
+
gap: 16px;
|
|
1595
|
+
padding: 24px 16px;
|
|
1596
|
+
border-radius: 16px;
|
|
1597
|
+
background: rgba(193, 238, 207, 0.5);
|
|
1598
|
+
text-align: center;
|
|
1599
|
+
`,Iu=a.div`
|
|
1600
|
+
display: grid;
|
|
1601
|
+
place-items: center;
|
|
1602
|
+
width: 64px;
|
|
1603
|
+
height: 64px;
|
|
1604
|
+
border-radius: 50%;
|
|
1605
|
+
background: ${n.colors.ok};
|
|
1606
|
+
color: ${n.colors.white};
|
|
1607
|
+
|
|
1608
|
+
.ico {
|
|
1609
|
+
width: 34px;
|
|
1610
|
+
height: 34px;
|
|
1611
|
+
}
|
|
1612
|
+
`,Su=a.p`
|
|
1613
|
+
margin: 0;
|
|
1614
|
+
font-family: ${n.font.sans};
|
|
1615
|
+
font-size: 20px;
|
|
1616
|
+
line-height: 1.334;
|
|
1617
|
+
color: ${n.colors.text2};
|
|
1618
|
+
|
|
1619
|
+
b {
|
|
1620
|
+
font-weight: 700;
|
|
1621
|
+
}
|
|
1622
|
+
`;function Au(t){return t.map(s=>({address:s.address,amount:Number(s.amount)}))}function Mu({item:t,session:s,onClose:l,onIssued:o}){const d=ct(),[u,x]=c.useState([{address:"",amount:"1"}]),[m,b]=c.useState(!1),[$,h]=c.useState(null),[g,y]=c.useState(null),j=c.useRef(null),I=nn(s),C=Au(u),S=Er(C),N=nu(C,t.available),f=S>t.available;c.useEffect(()=>{var z;(z=j.current)==null||z.focus();function A(H){H.key==="Escape"&&!m&&l()}return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[m,l]);function W(A,z){x(H=>H.map((_,ne)=>ne===A?{..._,...z}:_))}function r(){x(A=>[...A,{address:"",amount:"1"}])}function E(A){x(z=>z.length<=1?z:z.filter((H,_)=>_!==A))}async function Y(){if(!(!N||m)){h(null),b(!0);try{await ru({signer:s.signer,contractAddress:t.contractAddress,chainId:t.chainId,entries:C,itemId:t.itemId}),X("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),Rt.success(i("issue.toastSuccess",{count:S,name:t.name})),d.invalidateQueries({queryKey:["publishable-item"]}),d.invalidateQueries({queryKey:["publishable-items"]}),o==null||o()}catch(A){yt(A)||pe(A,{flow:"issue-item",itemId:t.itemId}),X("Shop Issue Failed",{error_code:Ce(A)}),h(yt(A)?i("getCredits.errorCanceled"):_e(A,i("issue.errorGeneric")))}finally{b(!1)}}}const K=m?I?i("issue.issuing"):i("issue.confirm"):S>0?i("issue.issueCount",{count:S}):i("issue.issue");return e.jsx(su,{onClick:m?void 0:l,role:"presentation",children:e.jsxs(ou,{ref:j,tabIndex:-1,"data-testid":"issue-modal",onClick:A=>A.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("issue.title"),children:[e.jsxs(lu,{children:[e.jsx(du,{children:i("issue.title")}),e.jsx(cu,{onClick:l,disabled:m,"aria-label":i("sellModal.cancel"),children:e.jsx(R,{name:"close",className:"ico"})})]}),g!==null?e.jsxs(e.Fragment,{children:[e.jsxs(Cu,{children:[e.jsx(Iu,{"aria-hidden":!0,children:e.jsx(R,{name:"check",className:"ico"})}),e.jsx(Su,{children:i("issue.successBody",{count:g,name:t.name})})]}),e.jsx(fa,{children:e.jsx(ma,{onClick:l,children:i("getCredits.done")})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(pu,{children:[e.jsx(hu,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsx(xu,{children:t.name})]}),e.jsx(uu,{children:i("issue.subtitle")}),e.jsx(fu,{children:u.map((A,z)=>{const H=A.address.trim(),_=H.length>0&&!Pr(H),ne=Number(A.amount),de=A.amount.length>0&&(!Number.isInteger(ne)||ne<1);return e.jsxs(mu,{children:[e.jsxs(gu,{children:[e.jsx(ha,{children:i("issue.addressLabel")}),e.jsx(xa,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:A.address,onChange:ee=>W(z,{address:ee.target.value}),disabled:m,"aria-invalid":_,"aria-label":i("issue.addressLabel")}),_?e.jsx(ku,{children:i("issue.invalidAddress")}):null]}),e.jsxs(bu,{children:[e.jsx(ha,{children:i("issue.amountLabel")}),e.jsx(xa,{type:"number",min:"1",step:"1",inputMode:"numeric",value:A.amount,onChange:ee=>W(z,{amount:ee.target.value}),disabled:m,"aria-invalid":de,"aria-label":i("issue.amountLabel")})]}),e.jsx(yu,{onClick:()=>E(z),disabled:m||u.length<=1,"aria-label":i("issue.removeRow"),children:e.jsx(R,{name:"close",className:"ico"})})]},z)})}),e.jsxs(wu,{onClick:r,disabled:m,children:[e.jsx(R,{name:"plus",className:"ico"}),i("issue.addRow")]}),e.jsxs(vu,{over:f,"aria-live":"polite",children:[e.jsx("strong",{children:S})," / ",t.available," ",i("issue.itemsToIssue")]}),f?e.jsx(ju,{children:i("issue.overCap",{available:t.available})}):null,e.jsx(Ve,{message:$}),e.jsxs(fa,{children:[e.jsx($u,{onClick:l,disabled:m,children:i("sellModal.cancel")}),e.jsx(ma,{onClick:()=>void Y(),disabled:!N||m,children:K})]})]})]})})}const zu=a.div`
|
|
1623
|
+
position: fixed;
|
|
1624
|
+
inset: 0;
|
|
1625
|
+
z-index: 10000;
|
|
1626
|
+
display: flex;
|
|
1627
|
+
align-items: center;
|
|
1628
|
+
justify-content: center;
|
|
1629
|
+
padding: 16px;
|
|
1630
|
+
background: rgba(22, 21, 24, 0.55);
|
|
1631
|
+
`,Ru=a.div`
|
|
1632
|
+
width: 760px;
|
|
1633
|
+
max-width: 100%;
|
|
1634
|
+
background: ${n.colors.white};
|
|
1635
|
+
border-radius: 16px;
|
|
1636
|
+
padding: 12px 16px 16px;
|
|
1637
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
1638
|
+
display: flex;
|
|
1639
|
+
flex-direction: column;
|
|
1640
|
+
gap: 16px;
|
|
1641
|
+
`,Lu=a.div`
|
|
1642
|
+
display: flex;
|
|
1643
|
+
align-items: center;
|
|
1644
|
+
justify-content: space-between;
|
|
1645
|
+
gap: 8px;
|
|
1646
|
+
padding-bottom: 16px;
|
|
1647
|
+
border-bottom: 1px solid ${n.colors.gray4};
|
|
1648
|
+
`,Pu=a.h2`
|
|
1649
|
+
margin: 0;
|
|
1650
|
+
font-family: ${n.font.sans};
|
|
1651
|
+
font-weight: 600;
|
|
1652
|
+
font-size: 20px;
|
|
1653
|
+
line-height: 1.6;
|
|
1654
|
+
color: ${n.colors.text};
|
|
1655
|
+
`,Eu=a.button`
|
|
1656
|
+
flex: none;
|
|
1657
|
+
display: grid;
|
|
1658
|
+
place-items: center;
|
|
1659
|
+
width: 24px;
|
|
1660
|
+
height: 24px;
|
|
1661
|
+
border: 0;
|
|
1662
|
+
background: none;
|
|
1663
|
+
cursor: pointer;
|
|
1664
|
+
color: ${n.colors.text};
|
|
1665
|
+
|
|
1666
|
+
.ico {
|
|
1667
|
+
width: 18px;
|
|
1668
|
+
height: 18px;
|
|
1669
|
+
}
|
|
1670
|
+
&:focus-visible {
|
|
1671
|
+
outline: 2px solid ${n.colors.accent};
|
|
1672
|
+
outline-offset: 2px;
|
|
1673
|
+
}
|
|
1674
|
+
`,Tu=a.video`
|
|
1675
|
+
display: block;
|
|
1676
|
+
width: 100%;
|
|
1677
|
+
max-height: 70vh;
|
|
1678
|
+
border-radius: 12px;
|
|
1679
|
+
background: ${n.colors.blackBtn};
|
|
1680
|
+
`;function Fu({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(zu,{onClick:l,role:"presentation",children:e.jsxs(Ru,{ref:o,tabIndex:-1,onClick:d=>d.stopPropagation(),"data-testid":"modal",role:"dialog","aria-modal":"true","aria-label":i("itemDetail.showcaseTitle"),children:[e.jsxs(Lu,{children:[e.jsx(Pu,{children:s||i("itemDetail.showcaseTitle")}),e.jsx(Eu,{onClick:l,"aria-label":i("itemDetail.showcaseClose"),children:e.jsx(R,{name:"close",size:18})})]}),e.jsx(Tu,{src:t,"data-testid":"showcase-video",controls:!0,autoPlay:!0,muted:!0,playsInline:!0,preload:"auto"})]})})}const{colors:Oe,radius:Bu}=n,Nu=a.div`
|
|
1681
|
+
position: fixed;
|
|
1682
|
+
inset: 0;
|
|
1683
|
+
z-index: 60;
|
|
1684
|
+
display: grid;
|
|
1685
|
+
place-items: center;
|
|
1686
|
+
padding: 20px;
|
|
1687
|
+
`,Wu=a.div`
|
|
1688
|
+
position: absolute;
|
|
1689
|
+
inset: 0;
|
|
1690
|
+
background: rgba(22, 21, 24, 0.45);
|
|
1691
|
+
`,Du=a.div`
|
|
1692
|
+
position: relative;
|
|
1693
|
+
z-index: 1;
|
|
1694
|
+
width: 100%;
|
|
1695
|
+
max-width: 420px;
|
|
1696
|
+
background: ${Oe.white};
|
|
1697
|
+
border-radius: ${Bu.banner};
|
|
1698
|
+
padding: 24px;
|
|
1699
|
+
box-shadow: 0 24px 60px rgba(22, 21, 24, 0.28);
|
|
1700
|
+
animation: cart-pop-in 0.16s ease;
|
|
1701
|
+
`,Ou=a.div`
|
|
1702
|
+
display: flex;
|
|
1703
|
+
align-items: center;
|
|
1704
|
+
gap: 14px;
|
|
1705
|
+
margin-bottom: 18px;
|
|
1706
|
+
`,qu=a.div`
|
|
1707
|
+
width: 64px;
|
|
1708
|
+
height: 64px;
|
|
1709
|
+
flex: none;
|
|
1710
|
+
border-radius: 12px;
|
|
1711
|
+
overflow: hidden;
|
|
1712
|
+
background: ${Oe.media};
|
|
1713
|
+
|
|
1714
|
+
& img {
|
|
1715
|
+
width: 100%;
|
|
1716
|
+
height: 100%;
|
|
1717
|
+
object-fit: contain;
|
|
1718
|
+
}
|
|
1719
|
+
`,Ku=a.div`
|
|
1720
|
+
font-weight: 700;
|
|
1721
|
+
font-size: 16px;
|
|
1722
|
+
color: ${Oe.text};
|
|
1723
|
+
margin-bottom: 6px;
|
|
1724
|
+
`,Hu=a.div`
|
|
1725
|
+
background: ${Oe.panel};
|
|
1726
|
+
border-radius: 14px;
|
|
1727
|
+
padding: 16px;
|
|
1728
|
+
margin-bottom: 14px;
|
|
1729
|
+
`,ga=a.div`
|
|
1730
|
+
color: ${Oe.muted};
|
|
1731
|
+
font-size: 13px;
|
|
1732
|
+
font-weight: 600;
|
|
1733
|
+
margin-bottom: 6px;
|
|
1734
|
+
`,ba=a.div`
|
|
1735
|
+
display: flex;
|
|
1736
|
+
align-items: center;
|
|
1737
|
+
gap: 8px;
|
|
1738
|
+
font-weight: 700;
|
|
1739
|
+
font-size: 24px;
|
|
1740
|
+
color: ${Oe.text};
|
|
1741
|
+
|
|
1742
|
+
&[data-approx] {
|
|
1743
|
+
color: ${Oe.text2};
|
|
1744
|
+
}
|
|
1745
|
+
`,Uu=a.span`
|
|
1746
|
+
color: ${Oe.muted};
|
|
1747
|
+
`,ya=a(ve)`
|
|
1748
|
+
width: 20px;
|
|
1749
|
+
height: 20px;
|
|
1750
|
+
color: ${Oe.text};
|
|
1751
|
+
`,wa=a.div`
|
|
1752
|
+
margin-top: 6px;
|
|
1753
|
+
font-size: 13px;
|
|
1754
|
+
`,Qu=a.div`
|
|
1755
|
+
font-size: 13px;
|
|
1756
|
+
margin-bottom: 6px;
|
|
1757
|
+
`,Tr=wt`
|
|
1758
|
+
margin: 6px 0 0;
|
|
1759
|
+
font-size: 13px;
|
|
1760
|
+
`,Cn=a.p`
|
|
1761
|
+
${Tr};
|
|
1762
|
+
`,Gu=a(Ve)`
|
|
1763
|
+
${Tr};
|
|
1764
|
+
`,_u=a.div`
|
|
1765
|
+
display: flex;
|
|
1766
|
+
gap: 10px;
|
|
1767
|
+
margin-top: 18px;
|
|
1768
|
+
`,va=a(Je)`
|
|
1769
|
+
flex: 1;
|
|
1770
|
+
`;function In(t){if(yt(t))return i("errors.rejected");const s=(t.message??"").toLowerCase();return s.includes("insufficient")?i("marketCheckout.error.insufficient",{currency:ze.name}):s.includes("not found")||s.includes("no active listing")||s.includes("404")?i("marketCheckout.error.soldOrRemoved"):s.includes("your own listing")?i("errors.cantBuyOwn"):i("marketCheckout.error.generic")}function Vu(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 Fr({listing:t,rate:s,onClose:l,onSold:o}){const{session:d}=lt(),{data:u,isError:x}=ar(d),m=ct(),b=dt(),[$,h]=c.useState("confirm"),[g,y]=c.useState(i("marketCheckout.checkingListing")),[j,I]=c.useState(null),[C,S]=c.useState(null),[N,f]=c.useState(null),[W,r]=c.useState(!1),E=c.useRef(null),Y=c.useRef(!1),K=c.useRef(Mr());c.useEffect(()=>(Y.current=!1,()=>{Y.current=!0}),[]);const A=Ge(pn(t.manaWei,s));c.useEffect(()=>{let V=!1;if(!d){h("error"),I(i("buyModal.signInToCheckout"));return}return(async()=>{try{const q=await cr(t.tradeId);if(!q)throw new Error("not found");if(Es(q,d.address))throw new Error("You can't buy your own listing.");const w=pn(t.manaWei,s);if(!Number.isFinite(w)||w<=0)throw new Error("price unavailable");if(V)return;S({trade:q,usdCents:w,credits:Ge(w)}),y("")}catch(q){if(V)return;console.error("[market] listing check failed",q),X(we(q)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Ce(q),value_usd:Math.round(pn(t.manaWei,s))/100}),h("error"),I(In(q))}})(),()=>{V=!0,E.current&&d&&(ne([E.current]),E.current=null)}},[]);const z=!!C&&u!=null&&u.credits<C.credits;async function H(){if(!d||!C)return;if(z){X("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))}),E.current&&(await _([E.current])&&f(null),E.current=null),b("/credits");return}h("working"),I(null),r(!1);let V=N;if(!V){y(i("marketCheckout.lockingPrice"));try{const{credit:L,maxCreditedValue:F,usdCents:M}=await Tn(d.identity,C.usdCents,t.tradeId);if(Y.current){_([L.id]);return}E.current=L.id,m.invalidateQueries({queryKey:["usd-balance"]});const se=Ge(M);if(V={trade:C.trade,credit:L,maxCreditedValue:F,usdCents:M,credits:se},f(V),se!==C.credits){S({trade:C.trade,usdCents:M,credits:se}),r(!0),y(""),h("confirm");return}}catch(L){console.error("[market] authorize failed",L),we(L)||pe(L,{flow:"market_buy_now",step:"authorize"}),X(we(L)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Ce(L),value_usd:C.usdCents/100}),y(""),I(In(L)),h("error");return}}if(!V)return;const D=V;let q=!1,w;try{y(i("marketCheckout.confirming"));const L={trade:D.trade,buyer:d.address,signer:d.signer,credits:[D.credit],maxCreditedValue:D.maxCreditedValue,onBroadcast:({txHash:F})=>K.current.broadcast(D.credit.id,F),onReverted:({txHash:F})=>{F&&K.current.reverted(F)}};if(K.current.submitStarted(D.credit.id),wr())try{w=await Ql(L),K.current.broadcast(D.credit.id,w),await kr(w),q=!0}catch(F){if(F instanceof $r)q=!0;else if(F instanceof Cr){if(F.reason==="relayer-unreachable")throw K.current.unobservable(D.credit.id),F;if(!Zt(d.providerType))throw F;w=await Bi(L)}else throw w&&K.current.reverted(w),F}else w=await Bi(L)}catch(L){K.current.submitFinished(D.credit.id),console.error("[market] buy now failed",L),await _([D.credit.id])&&f(null),E.current=null,X(we(L)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Ce(L),value_usd:D.usdCents/100}),m.invalidateQueries({queryKey:["usd-balance"]}),I(In(L)),h("error");const F=(L.message??"").toLowerCase();(F.includes("not found")||F.includes("no active listing")||F.includes("404"))&&o();return}K.current.submitFinished(D.credit.id),E.current=null;try{m.invalidateQueries({queryKey:["usd-balance"]}),X("Shop Completed Purchase",{items:[{item_id:t.itemId??null,contract_address:t.contractAddress,token_id:null,price_usd:D.usdCents/100,category:t.category,is_smart:!1}],value_credits:D.credits,value_usd:D.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:q,transaction_hash:w??null}),m.invalidateQueries({queryKey:["detail-trade"]}),m.invalidateQueries({queryKey:["shop-item"]}),m.invalidateQueries({queryKey:["item-resales",t.contractAddress,t.itemId]}),m.invalidateQueries({queryKey:["shop-items"]}),m.invalidateQueries({queryKey:["catalog-items"]}),m.invalidateQueries({queryKey:["my-assets"]}),m.invalidateQueries({queryKey:["purchases"]})}catch(L){pe(L,{flow:"market_buy_now",step:"post_purchase"})}const fe={items:[Vu(t)],txHash:w};b("/success",{state:fe})}async function _(V){if(!d||V.length===0)return!1;const D=V.filter(q=>!K.current.mayBeConsumed(q));if(D.length===0)return!1;try{return await rr(d.identity,D),!0}catch{return!1}}function ne(V){_(V.filter(D=>!K.current.isInFlight(D)))}function de(){d&&N&&_([N.credit.id]),E.current=null,l()}const ee=$==="working";return e.jsxs(Nu,{role:"dialog","aria-modal":"true","aria-label":i("buyModal.dialogAria",{name:t.name}),children:[e.jsx(Wu,{onClick:ee?void 0:de,"aria-hidden":!0}),e.jsxs(Du,{children:[e.jsxs(Ou,{children:[e.jsx(qu,{children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:""}):null}),e.jsxs("div",{children:[e.jsx(Ku,{title:t.name,children:t.name||i("buyModal.itemFallback")}),e.jsx(dr,{"data-variant":"rarity",children:t.rarity})]})]}),e.jsx(Hu,{children:C?e.jsxs(e.Fragment,{children:[e.jsx(ga,{children:i("marketCheckout.finalPrice")}),e.jsxs(ba,{children:[e.jsx(ya,{}),e.jsx(ye,{credits:C.credits})," ",zi(C.credits)]}),e.jsxs(wa,{className:"muted",children:["$",st(C.credits).toFixed(2)]})]}):e.jsxs(e.Fragment,{children:[e.jsx(ga,{children:i("marketCheckout.todaysPrice")}),e.jsxs(ba,{"data-approx":!0,children:[e.jsx(Uu,{"aria-hidden":!0,children:"≈"}),e.jsx(ya,{}),e.jsx(ye,{credits:A})," ",zi(A)]}),e.jsx(wa,{className:"muted",children:g||i("marketCheckout.checkingListing")})]})}),d?e.jsxs(Qu,{className:"muted",children:[i("marketCheckout.yourBalance")," ",e.jsx(ve,{className:"ccy-mark"})," ",Ps(u,x)]}):null,z?e.jsx(Cn,{className:"muted",children:i("marketCheckout.needMore",{currency:ze.name})}):null,W?e.jsx(Cn,{"data-testid":"price-changed",role:"status",children:i("buyModal.priceChanged")}):null,g&&$==="working"?e.jsx(Cn,{className:"muted",children:g}):null,e.jsx(Gu,{message:j}),e.jsxs(_u,{children:[e.jsx(va,{variant:"ghost",onClick:de,disabled:ee,children:i("buyModal.cancel")}),e.jsx(va,{variant:"purple",onClick:()=>void H(),disabled:ee||!C||z&&mt(),children:ee?i("marketCheckout.buying"):z&&!mt()?i("nav.getCredits",{currency:ze.name}):i("marketCheckout.confirmPurchase")})]})]})]})}function Ju(t,s,{enabled:l=!0,first:o}={}){const{data:d,isFetched:u}=te({queryKey:["related-items",t,s,o],enabled:l&&!!t&&!!s,staleTime:3e5,queryFn:()=>Ts(t,s,{first:o})});return{items:d??[],isFetched:u}}const Br=15;function Yu(t){return`${t.contractAddress}-${t.itemId??t.tokenId??t.id}`.toLowerCase()}function Xu(t,s){return!!(s.id&&t.id===s.id||s.itemId&&t.itemId===s.itemId&&ja(t,s)||s.tokenId&&t.tokenId===s.tokenId&&ja(t,s))}function ja(t,s){var l;return s.contractAddress?((l=t.contractAddress)==null?void 0:l.toLowerCase())===s.contractAddress.toLowerCase():!1}function Sn(t,s,l=Br){const o=new Set,d=[];function u(m,b){for(const $ of m){if(d.length>=b)return;if(Xu($,s))continue;const h=Yu($);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 Zu=20,ep=30,ka=[];function tp(t,s=Br){const{id:l,contractAddress:o,itemId:d,tokenId:u,creator:x}=t,m=c.useMemo(()=>({id:l,contractAddress:o,itemId:d,tokenId:u}),[l,o,d,u]),{data:b=ka,isFetched:$}=te({queryKey:["collection-items",o],enabled:!!o,queryFn:()=>Bs(o,{first:Zu}).then(r=>r.items)}),h=c.useMemo(()=>Sn({collection:b},m,s).items.length,[b,m,s]),g=$&&h<s,y=g&&!!x,j=te({queryKey:["suggestions-creator",x],enabled:y,staleTime:5*6e4,queryFn:()=>Ns({creator:x,isOnSale:!0,first:ep}).then(r=>r.items)}),I=j.data??ka,C=!y||j.isSuccess||j.isError,S=c.useMemo(()=>Sn({collection:b,creator:I},m,s).items.length,[b,I,m,s]),{items:N}=Ju(o,d??null,{enabled:g&&C&&S<s,first:s}),f=c.useMemo(()=>Sn({collection:b,creator:I,related:N},m,s),[b,I,N,m,s]),W=Fs(f.items);return{...f,items:W,siblings:b,siblingsFetched:$}}function np(t){const s=Ws();return!s||!Ds(s.contracts,t)?null:s.label}const{colors:Te,media:qn}=n,ip=Os`
|
|
1771
|
+
to {
|
|
1772
|
+
transform: rotate(360deg);
|
|
1773
|
+
}
|
|
1774
|
+
`,ap=a.div``,rp=a.span`
|
|
1775
|
+
width: 34px;
|
|
1776
|
+
height: 34px;
|
|
1777
|
+
border-radius: 50%;
|
|
1778
|
+
border: 3px solid ${Te.line};
|
|
1779
|
+
border-top-color: ${Te.accent};
|
|
1780
|
+
animation: ${ip} 0.8s linear infinite;
|
|
1781
|
+
|
|
1782
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1783
|
+
animation-duration: 2.4s;
|
|
1784
|
+
}
|
|
1785
|
+
`,sp=a.p``,op=a.div``,$a=a.button`
|
|
1786
|
+
border: 0;
|
|
1787
|
+
background: none;
|
|
1788
|
+
cursor: pointer;
|
|
1789
|
+
padding: 6px 16px;
|
|
1790
|
+
border-radius: 999px;
|
|
1791
|
+
font-weight: 600;
|
|
1792
|
+
font-size: 12px;
|
|
1793
|
+
text-transform: uppercase;
|
|
1794
|
+
letter-spacing: 0.04em;
|
|
1795
|
+
color: ${Te.muted};
|
|
1796
|
+
transition:
|
|
1797
|
+
background 0.12s ease,
|
|
1798
|
+
color 0.12s ease;
|
|
1799
|
+
|
|
1800
|
+
&[data-active] {
|
|
1801
|
+
background: ${Te.text};
|
|
1802
|
+
color: ${Te.white};
|
|
1803
|
+
}
|
|
1804
|
+
&:not([data-active]):hover {
|
|
1805
|
+
color: ${Te.text};
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
${qn.maxWidth("lg")} {
|
|
1809
|
+
padding: 6px 12px;
|
|
1810
|
+
border-radius: 0;
|
|
1811
|
+
background: ${Te.white};
|
|
1812
|
+
color: ${Te.text2};
|
|
1813
|
+
|
|
1814
|
+
&[data-active] {
|
|
1815
|
+
background: ${Te.text};
|
|
1816
|
+
color: ${Te.white};
|
|
1817
|
+
}
|
|
1818
|
+
&:first-of-type {
|
|
1819
|
+
border-top-left-radius: 999px;
|
|
1820
|
+
border-bottom-left-radius: 999px;
|
|
1821
|
+
}
|
|
1822
|
+
&:last-of-type {
|
|
1823
|
+
border-top-right-radius: 999px;
|
|
1824
|
+
border-bottom-right-radius: 999px;
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
`,Ca=a.span`
|
|
1828
|
+
${qn.maxWidth("lg")} {
|
|
1829
|
+
display: none;
|
|
1830
|
+
}
|
|
1831
|
+
`,Ia=a(R)`
|
|
1832
|
+
display: none;
|
|
1833
|
+
|
|
1834
|
+
${qn.maxWidth("lg")} {
|
|
1835
|
+
display: block;
|
|
1836
|
+
}
|
|
1837
|
+
`,Sa="shop-item-preview";function lp({item:t}){const s=lt(z=>{var H;return(H=z.session)==null?void 0:H.address}),{data:l,isLoading:o}=en(s),d=s&&l?s:"default",u=t.category==="emote",[x,m]=c.useState("avatar"),b=!u&&x==="item",$=b||!o,h=zt(z=>z.fittingOpen),{ref:g,active:y}=qs(),j=$&&y&&!h,[I,C]=c.useState(!0);c.useEffect(()=>{C(!0)},[t.id,b]),c.useEffect(()=>{j&&C(!0)},[j]);const S=c.useRef(null);c.useEffect(()=>{if(j)return()=>{ld(S.current),S.current=null}},[j]);const[N,f]=c.useState(Ae.PreviewRenderer.UNITY),W=N===Ae.PreviewRenderer.BABYLON,r=!!s&&!!l,E=r&&Ks(t,Hs(l)),Y=Us(t)[0],K=r&&!E&&!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}),j?e.jsx(Qs,{id:Sa,...A,profile:b?void 0:E?d:"default",bodyShape:b||E?void 0:Y,type:u?void 0:b?Ae.PreviewType.WEARABLE:Ae.PreviewType.AVATAR,emote:u||b?void 0:Ae.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:u?1.5:void 0,wheelStart:u?100:void 0,onRenderer:f,onLoad:()=>{var z;C(!1),S.current=((z=document.getElementById(Sa))==null?void 0:z.contentWindow)??null}}):null,!j||I?e.jsx(ap,{"data-preview-loading":!0,"aria-busy":"true","aria-label":i("itemPreview.loading"),children:e.jsx(rp,{"aria-hidden":!0})}):null,K&&!b?e.jsx(sp,{"data-preview-note":!0,children:i("itemPreview.shownOnBody",{shape:Gs(Y)})}):null,!W||!u?null:e.jsx(od,{previewId:"shop-item-preview"}),!W||u?null:e.jsxs(op,{"data-preview-toggle":!0,role:"group","aria-label":i("itemPreview.previewMode"),children:[e.jsxs($a,{type:"button","data-active":x==="avatar"||void 0,"aria-pressed":x==="avatar","aria-label":i("itemPreview.onAvatar"),onClick:()=>m("avatar"),children:[e.jsx(Ia,{name:"view-avatar",size:18}),e.jsx(Ca,{children:i("itemPreview.onAvatar")})]}),e.jsxs($a,{type:"button","data-active":x==="item"||void 0,"aria-pressed":x==="item","aria-label":i("itemPreview.item"),onClick:()=>m("item"),children:[e.jsx(Ia,{name:"view-item",size:18}),e.jsx(Ca,{children:i("itemPreview.item")})]})]})]})}const dp=a.div`
|
|
1838
|
+
position: fixed;
|
|
1839
|
+
inset: 0;
|
|
1840
|
+
z-index: 10000;
|
|
1841
|
+
display: flex;
|
|
1842
|
+
align-items: center;
|
|
1843
|
+
justify-content: center;
|
|
1844
|
+
padding: 16px;
|
|
1845
|
+
background: rgba(22, 21, 24, 0.55);
|
|
1846
|
+
`,cp=a.div`
|
|
1847
|
+
display: flex;
|
|
1848
|
+
flex-direction: column;
|
|
1849
|
+
gap: 12px;
|
|
1850
|
+
width: 1128px;
|
|
1851
|
+
max-width: 100%;
|
|
1852
|
+
max-height: 92vh;
|
|
1853
|
+
background: ${n.colors.white};
|
|
1854
|
+
border-radius: 16px;
|
|
1855
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
1856
|
+
|
|
1857
|
+
&:focus {
|
|
1858
|
+
outline: none;
|
|
1859
|
+
}
|
|
1860
|
+
`,up=a.div`
|
|
1861
|
+
flex: none;
|
|
1862
|
+
display: flex;
|
|
1863
|
+
align-items: center;
|
|
1864
|
+
gap: 8px;
|
|
1865
|
+
padding: 16px;
|
|
1866
|
+
border-bottom: 1px solid ${n.colors.gray4};
|
|
1867
|
+
`,pp=a.h2`
|
|
1868
|
+
flex: 1 1 auto;
|
|
1869
|
+
min-width: 0;
|
|
1870
|
+
margin: 0;
|
|
1871
|
+
font-family: ${n.font.sans};
|
|
1872
|
+
font-weight: 600;
|
|
1873
|
+
font-size: 20px;
|
|
1874
|
+
line-height: 1.6;
|
|
1875
|
+
color: ${n.colors.text};
|
|
1876
|
+
`,hp=a.button`
|
|
1877
|
+
flex: none;
|
|
1878
|
+
display: grid;
|
|
1879
|
+
place-items: center;
|
|
1880
|
+
width: 18.5px;
|
|
1881
|
+
height: 18.5px;
|
|
1882
|
+
padding: 0;
|
|
1883
|
+
border: 0;
|
|
1884
|
+
background: none;
|
|
1885
|
+
cursor: pointer;
|
|
1886
|
+
color: ${n.colors.text};
|
|
1887
|
+
|
|
1888
|
+
.ico {
|
|
1889
|
+
width: 18.5px;
|
|
1890
|
+
height: 18.5px;
|
|
1891
|
+
}
|
|
1892
|
+
&:focus-visible {
|
|
1893
|
+
outline: 2px solid ${n.colors.accent};
|
|
1894
|
+
outline-offset: 4px;
|
|
1895
|
+
}
|
|
1896
|
+
`,xp=a.div`
|
|
1897
|
+
flex: 1 1 auto;
|
|
1898
|
+
min-height: 0;
|
|
1899
|
+
overflow-y: auto;
|
|
1900
|
+
display: flex;
|
|
1901
|
+
flex-direction: column;
|
|
1902
|
+
gap: 8px;
|
|
1903
|
+
padding: 0 16px 24px;
|
|
1904
|
+
`,fp=a.div`
|
|
1905
|
+
position: sticky;
|
|
1906
|
+
top: 0;
|
|
1907
|
+
z-index: 1;
|
|
1908
|
+
display: flex;
|
|
1909
|
+
align-items: center;
|
|
1910
|
+
justify-content: space-between;
|
|
1911
|
+
gap: 8px;
|
|
1912
|
+
padding-bottom: 8px;
|
|
1913
|
+
background: ${n.colors.white};
|
|
1914
|
+
`,mp=a.p`
|
|
1915
|
+
margin: 0;
|
|
1916
|
+
font-family: ${n.font.sans};
|
|
1917
|
+
font-size: 14px;
|
|
1918
|
+
line-height: 1.43;
|
|
1919
|
+
color: ${n.colors.muted};
|
|
1920
|
+
`,gp=a.div`
|
|
1921
|
+
position: relative;
|
|
1922
|
+
flex: none;
|
|
1923
|
+
display: inline-flex;
|
|
1924
|
+
align-items: center;
|
|
1925
|
+
padding: 4px 4px 4px 12px;
|
|
1926
|
+
border: 0.5px solid ${n.colors.lineStrong};
|
|
1927
|
+
border-radius: 8px;
|
|
1928
|
+
background: ${n.colors.white};
|
|
1929
|
+
|
|
1930
|
+
select {
|
|
1931
|
+
appearance: none;
|
|
1932
|
+
/* 24px design gap + the 24px chevron that sits on top of it. */
|
|
1933
|
+
padding: 0 48px 0 0;
|
|
1934
|
+
border: 0;
|
|
1935
|
+
background: none;
|
|
1936
|
+
font-family: ${n.font.sans};
|
|
1937
|
+
font-weight: 500;
|
|
1938
|
+
font-size: 12px;
|
|
1939
|
+
line-height: 1.43;
|
|
1940
|
+
color: ${n.colors.text2};
|
|
1941
|
+
cursor: pointer;
|
|
1942
|
+
outline: none;
|
|
1943
|
+
}
|
|
1944
|
+
select:focus-visible {
|
|
1945
|
+
outline: 2px solid ${n.colors.accent};
|
|
1946
|
+
outline-offset: 2px;
|
|
1947
|
+
border-radius: 4px;
|
|
1948
|
+
}
|
|
1949
|
+
.chev {
|
|
1950
|
+
position: absolute;
|
|
1951
|
+
right: 4px;
|
|
1952
|
+
width: 24px;
|
|
1953
|
+
height: 24px;
|
|
1954
|
+
color: ${n.colors.text2};
|
|
1955
|
+
pointer-events: none;
|
|
1956
|
+
}
|
|
1957
|
+
`,bp=a.div`
|
|
1958
|
+
flex: none;
|
|
1959
|
+
border: 1px solid ${n.colors.lineStrong};
|
|
1960
|
+
border-radius: 16px;
|
|
1961
|
+
/* The four equal columns need the design width to hold their content, so a narrower modal scrolls
|
|
1962
|
+
the table here rather than letting the page scroll sideways. */
|
|
1963
|
+
overflow-x: auto;
|
|
1964
|
+
overflow-y: hidden;
|
|
1965
|
+
background: ${n.colors.white};
|
|
1966
|
+
`,yp=a.table`
|
|
1967
|
+
width: 100%;
|
|
1968
|
+
min-width: 1096px;
|
|
1969
|
+
table-layout: fixed;
|
|
1970
|
+
border-collapse: collapse;
|
|
1971
|
+
|
|
1972
|
+
th {
|
|
1973
|
+
height: 48px;
|
|
1974
|
+
padding: 8px 8px 8px 16px;
|
|
1975
|
+
text-align: left;
|
|
1976
|
+
vertical-align: middle;
|
|
1977
|
+
background: ${n.colors.media};
|
|
1978
|
+
border-right: 0.5px solid ${n.colors.lineStrong};
|
|
1979
|
+
font-family: ${n.font.sans};
|
|
1980
|
+
font-weight: 600;
|
|
1981
|
+
font-size: 16px;
|
|
1982
|
+
line-height: 1.5;
|
|
1983
|
+
color: ${n.colors.text};
|
|
1984
|
+
text-transform: capitalize;
|
|
1985
|
+
}
|
|
1986
|
+
th:last-of-type {
|
|
1987
|
+
border-right: 0;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
td {
|
|
1991
|
+
height: 56px;
|
|
1992
|
+
padding: 8px 8px 8px 16px;
|
|
1993
|
+
vertical-align: middle;
|
|
1994
|
+
border-right: 0.5px solid ${n.colors.lineStrong};
|
|
1995
|
+
border-bottom: 0.5px solid ${n.colors.lineStrong};
|
|
1996
|
+
font-family: ${n.font.sans};
|
|
1997
|
+
font-size: 14px;
|
|
1998
|
+
line-height: 1.43;
|
|
1999
|
+
color: ${n.colors.text2};
|
|
2000
|
+
}
|
|
2001
|
+
td:last-of-type {
|
|
2002
|
+
border-right: 0;
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
tbody tr:hover,
|
|
2006
|
+
tbody tr:focus-within {
|
|
2007
|
+
background: ${n.colors.media};
|
|
2008
|
+
}
|
|
2009
|
+
tbody tr:hover td,
|
|
2010
|
+
tbody tr:focus-within td {
|
|
2011
|
+
border-bottom-color: ${n.colors.media};
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
/* Stack every cell into a card — a 4-column grid is unusable at phone widths. The column name is
|
|
2015
|
+
carried on each cell's data-label so it survives translation. */
|
|
2016
|
+
${n.media.maxWidth("mobile")} {
|
|
2017
|
+
min-width: 0;
|
|
2018
|
+
|
|
2019
|
+
thead {
|
|
2020
|
+
display: none;
|
|
2021
|
+
}
|
|
2022
|
+
tr {
|
|
2023
|
+
display: block;
|
|
2024
|
+
border-bottom: 0.5px solid ${n.colors.lineStrong};
|
|
2025
|
+
}
|
|
2026
|
+
tr:last-of-type {
|
|
2027
|
+
border-bottom: 0;
|
|
2028
|
+
}
|
|
2029
|
+
td {
|
|
2030
|
+
display: block;
|
|
2031
|
+
height: auto;
|
|
2032
|
+
padding: 8px 16px;
|
|
2033
|
+
border-right: 0;
|
|
2034
|
+
border-bottom: 0;
|
|
2035
|
+
}
|
|
2036
|
+
td:first-of-type {
|
|
2037
|
+
padding-top: 12px;
|
|
2038
|
+
}
|
|
2039
|
+
td:last-of-type {
|
|
2040
|
+
padding-bottom: 12px;
|
|
2041
|
+
}
|
|
2042
|
+
td[data-label]::before {
|
|
2043
|
+
content: attr(data-label);
|
|
2044
|
+
display: block;
|
|
2045
|
+
margin-bottom: 2px;
|
|
2046
|
+
font-size: 12px;
|
|
2047
|
+
line-height: 1.43;
|
|
2048
|
+
color: ${n.colors.muted};
|
|
2049
|
+
text-transform: capitalize;
|
|
2050
|
+
}
|
|
2051
|
+
tbody tr:hover td,
|
|
2052
|
+
tbody tr:focus-within td {
|
|
2053
|
+
border-bottom-color: transparent;
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
`,Nr=`
|
|
2057
|
+
display: flex;
|
|
2058
|
+
align-items: center;
|
|
2059
|
+
gap: 10px;
|
|
2060
|
+
min-width: 0;
|
|
2061
|
+
|
|
2062
|
+
.owner-ava {
|
|
2063
|
+
flex: none;
|
|
2064
|
+
display: inline-grid;
|
|
2065
|
+
place-items: center;
|
|
2066
|
+
width: 32px;
|
|
2067
|
+
height: 32px;
|
|
2068
|
+
border: 2.286px solid rgba(255, 255, 255, 0.5);
|
|
2069
|
+
border-radius: 50%;
|
|
2070
|
+
background: ${n.colors.media};
|
|
2071
|
+
object-fit: cover;
|
|
2072
|
+
overflow: hidden;
|
|
2073
|
+
color: ${n.colors.white};
|
|
2074
|
+
font-weight: 700;
|
|
2075
|
+
font-size: 13px;
|
|
2076
|
+
}
|
|
2077
|
+
.owner-name {
|
|
2078
|
+
min-width: 0;
|
|
2079
|
+
overflow: hidden;
|
|
2080
|
+
text-overflow: ellipsis;
|
|
2081
|
+
white-space: nowrap;
|
|
2082
|
+
font-family: ${n.font.sans};
|
|
2083
|
+
font-size: 14px;
|
|
2084
|
+
line-height: 1.43;
|
|
2085
|
+
color: ${n.colors.text2};
|
|
2086
|
+
}
|
|
2087
|
+
`,wp=a.div`
|
|
2088
|
+
${Nr}
|
|
2089
|
+
`,vp=a.button`
|
|
2090
|
+
${Nr}
|
|
2091
|
+
padding: 0;
|
|
2092
|
+
border: 0;
|
|
2093
|
+
background: none;
|
|
2094
|
+
font: inherit;
|
|
2095
|
+
text-align: left;
|
|
2096
|
+
cursor: pointer;
|
|
2097
|
+
|
|
2098
|
+
&:hover .owner-name {
|
|
2099
|
+
text-decoration: underline;
|
|
2100
|
+
}
|
|
2101
|
+
&:focus-visible {
|
|
2102
|
+
outline: 2px solid ${n.colors.accent};
|
|
2103
|
+
outline-offset: 2px;
|
|
2104
|
+
border-radius: 4px;
|
|
2105
|
+
}
|
|
2106
|
+
`,Aa=a.span`
|
|
2107
|
+
color: ${n.colors.muted};
|
|
2108
|
+
`,jp=a.div`
|
|
2109
|
+
display: flex;
|
|
2110
|
+
align-items: center;
|
|
2111
|
+
justify-content: space-between;
|
|
2112
|
+
gap: 4px;
|
|
2113
|
+
|
|
2114
|
+
.amount {
|
|
2115
|
+
display: inline-flex;
|
|
2116
|
+
align-items: center;
|
|
2117
|
+
gap: 4px;
|
|
2118
|
+
font-family: ${n.font.sans};
|
|
2119
|
+
font-weight: 600;
|
|
2120
|
+
font-size: 16px;
|
|
2121
|
+
line-height: 1.5;
|
|
2122
|
+
color: ${n.colors.text2};
|
|
2123
|
+
}
|
|
2124
|
+
/* The credits mark is always near-black here — never the violet accent. */
|
|
2125
|
+
.amount .ccy {
|
|
2126
|
+
flex: none;
|
|
2127
|
+
width: 22px;
|
|
2128
|
+
height: 22px;
|
|
2129
|
+
color: ${n.colors.text2};
|
|
2130
|
+
}
|
|
2131
|
+
.approx {
|
|
2132
|
+
color: ${n.colors.muted};
|
|
2133
|
+
font-weight: 600;
|
|
2134
|
+
}
|
|
2135
|
+
`,kp=a.div`
|
|
2136
|
+
flex: none;
|
|
2137
|
+
display: flex;
|
|
2138
|
+
align-items: center;
|
|
2139
|
+
gap: 8px;
|
|
2140
|
+
opacity: 0;
|
|
2141
|
+
transition: opacity 0.12s ease;
|
|
2142
|
+
|
|
2143
|
+
tr:hover &,
|
|
2144
|
+
tr:focus-within &,
|
|
2145
|
+
&[data-persistent='true'] {
|
|
2146
|
+
opacity: 1;
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
@media (hover: none) {
|
|
2150
|
+
opacity: 1;
|
|
2151
|
+
}
|
|
2152
|
+
${n.media.maxWidth("mobile")} {
|
|
2153
|
+
opacity: 1;
|
|
2154
|
+
}
|
|
2155
|
+
`,Wr=`
|
|
2156
|
+
display: inline-flex;
|
|
2157
|
+
align-items: center;
|
|
2158
|
+
justify-content: center;
|
|
2159
|
+
gap: 8px;
|
|
2160
|
+
height: 40px;
|
|
2161
|
+
padding: 0 12px;
|
|
2162
|
+
border: 0;
|
|
2163
|
+
border-radius: 12px;
|
|
2164
|
+
cursor: pointer;
|
|
2165
|
+
font-family: ${n.font.sans};
|
|
2166
|
+
font-weight: 600;
|
|
2167
|
+
font-size: 13px;
|
|
2168
|
+
line-height: 24px;
|
|
2169
|
+
letter-spacing: 0.46px;
|
|
2170
|
+
text-transform: uppercase;
|
|
2171
|
+
text-align: center;
|
|
2172
|
+
white-space: nowrap;
|
|
2173
|
+
|
|
2174
|
+
.ico {
|
|
2175
|
+
width: 20px;
|
|
2176
|
+
height: 20px;
|
|
2177
|
+
}
|
|
2178
|
+
&:focus-visible {
|
|
2179
|
+
outline: 2px solid ${n.colors.accent};
|
|
2180
|
+
outline-offset: 2px;
|
|
2181
|
+
}
|
|
2182
|
+
`,$p=a.button`
|
|
2183
|
+
${Wr}
|
|
2184
|
+
min-width: 106px;
|
|
2185
|
+
background: ${n.colors.text2};
|
|
2186
|
+
color: ${n.colors.softWhite};
|
|
2187
|
+
|
|
2188
|
+
&:hover:not(:disabled) {
|
|
2189
|
+
filter: brightness(1.35);
|
|
2190
|
+
}
|
|
2191
|
+
&:disabled {
|
|
2192
|
+
opacity: 0.55;
|
|
2193
|
+
cursor: default;
|
|
2194
|
+
}
|
|
2195
|
+
`,Ma=a.button`
|
|
2196
|
+
${Wr}
|
|
2197
|
+
background: ${n.colors.accent};
|
|
2198
|
+
color: ${n.colors.softWhite};
|
|
2199
|
+
|
|
2200
|
+
&:hover:not(:disabled) {
|
|
2201
|
+
background: ${n.colors.accentHover};
|
|
2202
|
+
}
|
|
2203
|
+
`,Cp=a.span`
|
|
2204
|
+
display: inline-flex;
|
|
2205
|
+
align-items: center;
|
|
2206
|
+
height: 40px;
|
|
2207
|
+
padding: 0 12px;
|
|
2208
|
+
border-radius: 12px;
|
|
2209
|
+
background: ${n.colors.chip};
|
|
2210
|
+
font-family: ${n.font.sans};
|
|
2211
|
+
font-weight: 600;
|
|
2212
|
+
font-size: 13px;
|
|
2213
|
+
line-height: 24px;
|
|
2214
|
+
color: ${n.colors.muted};
|
|
2215
|
+
white-space: nowrap;
|
|
2216
|
+
`,Ip=a.div`
|
|
2217
|
+
flex: none;
|
|
2218
|
+
display: flex;
|
|
2219
|
+
align-items: center;
|
|
2220
|
+
justify-content: flex-end;
|
|
2221
|
+
gap: 8px;
|
|
2222
|
+
`,Sp=a.p`
|
|
2223
|
+
margin: 0;
|
|
2224
|
+
font-family: ${n.font.sans};
|
|
2225
|
+
font-size: 12px;
|
|
2226
|
+
line-height: 1;
|
|
2227
|
+
color: ${n.colors.gray0};
|
|
2228
|
+
`,za=a.button`
|
|
2229
|
+
display: grid;
|
|
2230
|
+
place-items: center;
|
|
2231
|
+
padding: 10px;
|
|
2232
|
+
border: 1px solid ${n.colors.text2};
|
|
2233
|
+
border-radius: 4px;
|
|
2234
|
+
background: ${n.colors.white};
|
|
2235
|
+
color: ${n.colors.text2};
|
|
2236
|
+
cursor: pointer;
|
|
2237
|
+
|
|
2238
|
+
/* One chevron glyph turned into ‹ / › so no extra asset is needed. */
|
|
2239
|
+
.ico {
|
|
2240
|
+
width: 11px;
|
|
2241
|
+
height: 11px;
|
|
2242
|
+
transform: rotate(-90deg);
|
|
2243
|
+
}
|
|
2244
|
+
&[data-dir='prev'] .ico {
|
|
2245
|
+
transform: rotate(90deg);
|
|
2246
|
+
}
|
|
2247
|
+
&:disabled {
|
|
2248
|
+
border-color: ${n.colors.lineStrong};
|
|
2249
|
+
color: ${n.colors.lineStrong};
|
|
2250
|
+
cursor: default;
|
|
2251
|
+
}
|
|
2252
|
+
&:focus-visible {
|
|
2253
|
+
outline: 2px solid ${n.colors.accent};
|
|
2254
|
+
outline-offset: 2px;
|
|
2255
|
+
}
|
|
2256
|
+
`,Ap=a.p`
|
|
2257
|
+
margin: 0;
|
|
2258
|
+
padding: 32px 0;
|
|
2259
|
+
font-family: ${n.font.sans};
|
|
2260
|
+
font-size: 14px;
|
|
2261
|
+
line-height: 1.43;
|
|
2262
|
+
color: ${n.colors.muted};
|
|
2263
|
+
text-align: center;
|
|
2264
|
+
`;a.div`
|
|
2265
|
+
display: flex;
|
|
2266
|
+
flex-direction: column;
|
|
2267
|
+
gap: 8px;
|
|
2268
|
+
margin-top: 16px;
|
|
2269
|
+
|
|
2270
|
+
.classic-title {
|
|
2271
|
+
font-family: ${n.font.sans};
|
|
2272
|
+
font-weight: 600;
|
|
2273
|
+
font-size: 15px;
|
|
2274
|
+
color: ${n.colors.text2};
|
|
2275
|
+
}
|
|
2276
|
+
.classic-note {
|
|
2277
|
+
font-family: ${n.font.sans};
|
|
2278
|
+
font-size: 13px;
|
|
2279
|
+
color: ${n.colors.muted};
|
|
2280
|
+
}
|
|
2281
|
+
`;a.span`
|
|
2282
|
+
display: inline-flex;
|
|
2283
|
+
align-items: center;
|
|
2284
|
+
padding: 2px 8px;
|
|
2285
|
+
border-radius: ${n.radius.chip};
|
|
2286
|
+
background: ${n.colors.chip};
|
|
2287
|
+
font-family: ${n.font.sans};
|
|
2288
|
+
font-size: 11px;
|
|
2289
|
+
letter-spacing: 0.4px;
|
|
2290
|
+
text-transform: uppercase;
|
|
2291
|
+
color: ${n.colors.muted};
|
|
2292
|
+
`;a.a`
|
|
2293
|
+
display: inline-flex;
|
|
2294
|
+
align-items: center;
|
|
2295
|
+
gap: 6px;
|
|
2296
|
+
height: 40px;
|
|
2297
|
+
padding: 0 14px;
|
|
2298
|
+
border: 1px solid ${n.colors.lineStrong};
|
|
2299
|
+
border-radius: 12px;
|
|
2300
|
+
color: ${n.colors.accent};
|
|
2301
|
+
font-family: ${n.font.sans};
|
|
2302
|
+
font-weight: 600;
|
|
2303
|
+
font-size: 13px;
|
|
2304
|
+
text-decoration: none;
|
|
2305
|
+
|
|
2306
|
+
&:hover {
|
|
2307
|
+
background: ${n.colors.chip};
|
|
2308
|
+
}
|
|
2309
|
+
.ico {
|
|
2310
|
+
width: 14px;
|
|
2311
|
+
height: 14px;
|
|
2312
|
+
}
|
|
2313
|
+
`;const Vt=10,Mp=!1;function zp(t){return/^0x[a-fA-F0-9]{40}$/.test(t)?`${t.slice(0,6)}…${t.slice(-4)}`:t}function Rp(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 Lp(t,s){var l;return(((l=t==null?void 0:t.trim())==null?void 0:l[0])||s.replace(/^0x/i,"")[0]||"?").toUpperCase()}function Pp(t){return t%100>=11&&t%100<=13?"th":["th","st","nd","rd"][t%10]??"th"}function Ep(t,s){const l=new Date(t);return Number.isNaN(l.getTime())?"—":s==="en"?`${new Intl.DateTimeFormat("en",{month:"long"}).format(l)} ${l.getDate()}${Pp(l.getDate())}, ${l.getFullYear()}`:new Intl.DateTimeFormat(s,{day:"numeric",month:"long",year:"numeric"}).format(l)}function Tp(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 Fp({r:t,seller:s,issuedId:l,labels:o,locale:d,isOwn:u,isLegacy:x,inCart:m,fallbackImage:b,onAdd:$,onBuyNative:h,onBuyLegacy:g}){var E,Y;const y=dt(),{data:j}=en(s),I=(Y=(E=j==null?void 0:j.avatar)==null?void 0:E.snapshots)==null?void 0:Y.face256,[C,S]=c.useState(!1);c.useEffect(()=>S(!1),[I]);const N=!!I&&!C,f=s?j!=null&&j.name?tn(j.name):zp(s):void 0,W=N?e.jsx("img",{className:"owner-ava",src:I,alt:"",loading:"lazy",onError:()=>S(!0)}):s?e.jsx("span",{className:"owner-ava",style:{backgroundColor:Rp(s)},"aria-hidden":!0,children:Lp(j==null?void 0:j.name,s)}):b?e.jsx("img",{className:"owner-ava",src:b,alt:"","aria-hidden":!0}):e.jsx("span",{className:"owner-ava","aria-hidden":!0}),r=e.jsxs(e.Fragment,{children:[W,f?e.jsx("span",{className:"owner-name","data-testid":"resale-seller",children:f}):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(vp,{type:"button",onClick:()=>y(`/items/creator/${s}`),children:r}):e.jsx(wp,{children:r})}),e.jsx("td",{"data-label":o.itemNumber,children:l?e.jsxs("span",{"data-testid":"resale-issued",children:["#",l]}):e.jsx(Aa,{children:"—"})}),e.jsx("td",{"data-label":o.expiration,children:t.saleEndsAt?Ep(t.saleEndsAt,d):e.jsx(Aa,{children:"—"})}),e.jsx("td",{"data-label":o.price,children:e.jsxs(jp,{children:[e.jsxs("span",{className:"amount",children:[x?e.jsx("span",{className:"approx","aria-hidden":!0,children:"≈"}):null,e.jsx(ve,{className:"ccy"}),e.jsx("span",{children:bt(t.priceCredits)})]}),e.jsx(kp,{"data-persistent":u?"true":void 0,children:u?e.jsx(Cp,{"data-testid":"resale-own",children:i("resales.yourListing")}):x?e.jsx(Ma,{onClick:g,"aria-label":i("assetCard.buyNow"),"data-testid":"resale-buy",children:i("resales.buy")}):e.jsxs(e.Fragment,{children:[e.jsxs($p,{onClick:$,disabled:m,"aria-label":m?i("assetCard.inCart"):i("assetCard.addToCart"),"data-testid":"resale-add",children:[e.jsx(R,{name:"cart",className:"ico"}),e.jsx("span",{children:m?i("assetCard.inCart"):i("resales.add")})]}),e.jsx(Ma,{onClick:h,"aria-label":i("assetCard.buyNow"),"data-testid":"resale-buy",children:i("resales.buy")})]})})]})})]})}function Bp({item:t,onClose:s}){var q;const l=t.contractAddress,o=t.itemId,d=ct(),u=zt(w=>w.add),x=zt(w=>w.items),{session:m}=lt(),b=ur(w=>w.locale),$=(q=m==null?void 0:m.address)==null?void 0:q.toLowerCase(),h=c.useRef(null),[g,y]=c.useState(null),[j,I]=c.useState(null),[C,S]=c.useState("cheapest"),[N,f]=c.useState(0),W=!!g||!!j;c.useEffect(()=>{var w;(w=h.current)==null||w.focus()},[]),c.useEffect(()=>{function w(L){L.key==="Escape"&&!W&&s()}window.addEventListener("keydown",w);const fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",w),document.body.style.overflow=fe}},[W,s]);const{data:r=[],isLoading:E}=te({queryKey:["item-resales",l,o],enabled:!!l&&!!o,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>hr(l,o)}),Y=c.useMemo(()=>C==="cheapest"?r:[...r].sort((w,fe)=>fe.priceCredits-w.priceCredits),[r,C]),K=Math.max(1,Math.ceil(Y.length/Vt)),A=Math.min(N,K-1),z=Y.slice(A*Vt,A*Vt+Vt),H=z.filter(w=>!w.seller||!w.issuedId).map(w=>w.tokenId).filter(w=>!!w),{data:_={}}=te({queryKey:["resale-token-info",l,H.join(",")],enabled:!!l&&H.length>0,staleTime:6e4,queryFn:()=>_s(l,H)}),{data:ne=[]}=te({queryKey:["item-classic-orders",l,o],enabled:Mp,queryFn:()=>Vs(l,o)}),de=r.some(w=>w.source==="legacy"),{data:ee}=pr(de);function V(){d.invalidateQueries({queryKey:["item-resales",l,o]})}const D={owner:i("resales.colOwner"),itemNumber:i("resales.colItemNumber"),expiration:i("resales.colExpiration"),price:i("resales.colPrice")};return e.jsxs(e.Fragment,{children:[e.jsx(dp,{onClick:W?void 0:s,role:"presentation",children:e.jsxs(cp,{ref:h,tabIndex:-1,onClick:w=>w.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i("resales.modalTitle"),"data-testid":"resellers-modal",children:[e.jsxs(up,{children:[e.jsx(pp,{children:i("resales.modalTitle")}),e.jsx(hp,{onClick:s,"aria-label":i("resales.close"),"data-testid":"resellers-close",children:e.jsx(R,{name:"close"})})]}),e.jsxs(xp,{children:[e.jsxs(fp,{children:[e.jsx(mp,{"data-testid":"resales-count",children:i("resales.count",{count:r.length})}),e.jsxs(gp,{children:[e.jsxs("select",{value:C,onChange:w=>{S(w.target.value),f(0)},"aria-label":i("resales.sortLabel"),"data-testid":"resales-sort",children:[e.jsx("option",{value:"cheapest",children:i("resales.sortCheapest")}),e.jsx("option",{value:"most_expensive",children:i("resales.sortExpensive")})]}),e.jsx(R,{name:"chevron-down",className:"chev"})]})]}),E?null:Y.length===0?e.jsx(Ap,{"data-testid":"resales-empty",children:i("resales.empty")}):null,Y.length>0?e.jsxs(e.Fragment,{children:[e.jsx(bp,{children:e.jsxs(yp,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:D.owner}),e.jsx("th",{scope:"col",children:D.itemNumber}),e.jsx("th",{scope:"col",children:D.expiration}),e.jsx("th",{scope:"col",children:D.price})]})}),e.jsx("tbody",{children:z.map(w=>{const fe=w.source==="legacy",L=x.some(U=>U.id===w.id),F=w.tokenId&&_[w.tokenId]||{},M=w.issuedId??F.issuedId,se=w.seller??F.seller,ie={...w,name:w.name||t.name,thumbnail:w.thumbnail||t.thumbnail,rarity:w.rarity||t.rarity,category:w.category||t.category,wearableCategory:w.wearableCategory??t.wearableCategory,gender:w.gender??t.gender},xe=!!se&&!!$&&se.toLowerCase()===$;return e.jsx(Fp,{r:ie,seller:se,issuedId:M,labels:D,locale:b,isOwn:xe,isLegacy:fe,inCart:L,fallbackImage:ie.thumbnail,onAdd:()=>u(ie,"item_detail"),onBuyNative:()=>y(ie),onBuyLegacy:()=>I(Tp(ie))},w.tradeId??w.id)})})]})}),K>1?e.jsxs(Ip,{children:[e.jsx(za,{"data-dir":"prev",onClick:()=>f(w=>Math.max(0,w-1)),disabled:A===0,"aria-label":i("resales.prevPage"),"data-testid":"resale-prev-page",children:e.jsx(R,{name:"chevron-down"})}),e.jsx(Sp,{"data-testid":"resale-page-label",children:i("resales.page",{page:A+1,total:K})}),e.jsx(za,{onClick:()=>f(w=>Math.min(K-1,w+1)),disabled:A>=K-1,"aria-label":i("resales.nextPage"),"data-testid":"resale-next-page",children:e.jsx(R,{name:"chevron-down"})})]}):null]}):null,null]})]})}),g?e.jsx(Fn,{item:g,onClose:()=>{y(null),V()}}):null,j&&ee?e.jsx(Fr,{listing:j,rate:ee,onClose:()=>I(null),onSold:()=>{I(null),V()}}):null]})}const Np="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:ge,font:Dr,radius:Kn,z:Wp}=n,Dp=a.div`
|
|
2314
|
+
position: fixed;
|
|
2315
|
+
inset: 0;
|
|
2316
|
+
z-index: ${Wp.overlay};
|
|
2317
|
+
display: flex;
|
|
2318
|
+
align-items: center;
|
|
2319
|
+
justify-content: center;
|
|
2320
|
+
overflow-y: auto;
|
|
2321
|
+
padding: 16px;
|
|
2322
|
+
background: rgba(22, 21, 24, 0.55);
|
|
2323
|
+
`,Op=a.div`
|
|
2324
|
+
width: 560px;
|
|
2325
|
+
max-width: 100%;
|
|
2326
|
+
max-height: 100%;
|
|
2327
|
+
overflow-y: auto;
|
|
2328
|
+
padding: 12px 16px 16px;
|
|
2329
|
+
border-radius: ${Kn.modal};
|
|
2330
|
+
background: ${ge.white};
|
|
2331
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
2332
|
+
display: flex;
|
|
2333
|
+
flex-direction: column;
|
|
2334
|
+
gap: 24px;
|
|
2335
|
+
font-family: ${Dr.sans};
|
|
2336
|
+
|
|
2337
|
+
/* Focused on mount for screen readers; it is not tab-reachable, so it never needs a visible ring. */
|
|
2338
|
+
&:focus {
|
|
2339
|
+
outline: none;
|
|
2340
|
+
}
|
|
2341
|
+
`,qp=a.div`
|
|
2342
|
+
display: flex;
|
|
2343
|
+
align-items: center;
|
|
2344
|
+
justify-content: space-between;
|
|
2345
|
+
gap: 8px;
|
|
2346
|
+
padding-bottom: 16px;
|
|
2347
|
+
border-bottom: 1px solid ${ge.gray4};
|
|
2348
|
+
`,Kp=a.h2`
|
|
2349
|
+
margin: 0;
|
|
2350
|
+
font-weight: 600;
|
|
2351
|
+
font-size: 20px;
|
|
2352
|
+
line-height: 1.6;
|
|
2353
|
+
color: ${ge.text};
|
|
2354
|
+
`,Hp=a.button`
|
|
2355
|
+
position: relative;
|
|
2356
|
+
flex: none;
|
|
2357
|
+
display: grid;
|
|
2358
|
+
place-items: center;
|
|
2359
|
+
width: 18.535px;
|
|
2360
|
+
height: 18.535px;
|
|
2361
|
+
padding: 0;
|
|
2362
|
+
border: 0;
|
|
2363
|
+
background: none;
|
|
2364
|
+
cursor: pointer;
|
|
2365
|
+
color: ${ge.text};
|
|
2366
|
+
|
|
2367
|
+
.ico {
|
|
2368
|
+
width: 100%;
|
|
2369
|
+
height: 100%;
|
|
2370
|
+
}
|
|
2371
|
+
/* Keeps the glyph exactly where the design puts it while giving it a tappable hit area. */
|
|
2372
|
+
&::after {
|
|
2373
|
+
content: '';
|
|
2374
|
+
position: absolute;
|
|
2375
|
+
inset: -11px;
|
|
2376
|
+
}
|
|
2377
|
+
&:focus-visible {
|
|
2378
|
+
outline: 2px solid ${ge.accent};
|
|
2379
|
+
outline-offset: 2px;
|
|
2380
|
+
}
|
|
2381
|
+
`,Up=a.div`
|
|
2382
|
+
padding: 24px 16px;
|
|
2383
|
+
border-radius: ${Kn.modal};
|
|
2384
|
+
background: ${ge.promptLilac};
|
|
2385
|
+
display: flex;
|
|
2386
|
+
flex-direction: column;
|
|
2387
|
+
align-items: center;
|
|
2388
|
+
gap: 16px;
|
|
2389
|
+
text-align: center;
|
|
2390
|
+
`,Qp=a.img`
|
|
2391
|
+
flex: none;
|
|
2392
|
+
width: 76px;
|
|
2393
|
+
height: 76px;
|
|
2394
|
+
`,Gp=a.h3`
|
|
2395
|
+
margin: 0;
|
|
2396
|
+
font-weight: 700;
|
|
2397
|
+
font-size: 20px;
|
|
2398
|
+
line-height: 1.334;
|
|
2399
|
+
color: ${ge.text2};
|
|
2400
|
+
`,Ra=a.p`
|
|
2401
|
+
margin: 0;
|
|
2402
|
+
font-weight: 400;
|
|
2403
|
+
font-size: 16px;
|
|
2404
|
+
line-height: 1.334;
|
|
2405
|
+
color: ${ge.text2};
|
|
2406
|
+
`,_p=a.div`
|
|
2407
|
+
display: flex;
|
|
2408
|
+
align-items: center;
|
|
2409
|
+
gap: 12px;
|
|
2410
|
+
`,Or=`
|
|
2411
|
+
flex: 1 1 0;
|
|
2412
|
+
min-width: 0;
|
|
2413
|
+
display: inline-flex;
|
|
2414
|
+
align-items: center;
|
|
2415
|
+
justify-content: center;
|
|
2416
|
+
gap: 12px;
|
|
2417
|
+
height: 46px;
|
|
2418
|
+
padding: 0 12px;
|
|
2419
|
+
border-radius: ${Kn.card};
|
|
2420
|
+
font-family: ${Dr.sans};
|
|
2421
|
+
font-weight: 600;
|
|
2422
|
+
font-size: 13px;
|
|
2423
|
+
line-height: 24px;
|
|
2424
|
+
letter-spacing: 0.46px;
|
|
2425
|
+
text-transform: uppercase;
|
|
2426
|
+
cursor: pointer;
|
|
2427
|
+
transition:
|
|
2428
|
+
background 0.15s ease,
|
|
2429
|
+
color 0.15s ease;
|
|
2430
|
+
|
|
2431
|
+
&:focus-visible {
|
|
2432
|
+
outline: 2px solid ${ge.accent};
|
|
2433
|
+
outline-offset: 2px;
|
|
2434
|
+
}
|
|
2435
|
+
`,Vp=a.button`
|
|
2436
|
+
${Or};
|
|
2437
|
+
border: 0.5px solid ${ge.text};
|
|
2438
|
+
background: ${ge.white};
|
|
2439
|
+
color: ${ge.text2};
|
|
2440
|
+
|
|
2441
|
+
&:hover {
|
|
2442
|
+
background: ${ge.panel};
|
|
2443
|
+
}
|
|
2444
|
+
`,Jp=a.a`
|
|
2445
|
+
${Or};
|
|
2446
|
+
border: 0;
|
|
2447
|
+
background: ${ge.dclRed};
|
|
2448
|
+
color: ${ge.softWhite};
|
|
2449
|
+
text-decoration: none;
|
|
2450
|
+
|
|
2451
|
+
&:hover {
|
|
2452
|
+
filter: brightness(1.08);
|
|
2453
|
+
}
|
|
2454
|
+
`,Yp=a.span`
|
|
2455
|
+
flex: none;
|
|
2456
|
+
display: grid;
|
|
2457
|
+
place-items: center;
|
|
2458
|
+
width: 24px;
|
|
2459
|
+
height: 24px;
|
|
2460
|
+
|
|
2461
|
+
.ico {
|
|
2462
|
+
width: 100%;
|
|
2463
|
+
height: 100%;
|
|
2464
|
+
}
|
|
2465
|
+
`;function Xp(t,s){return`${ot.marketplaceUrl}/contracts/${t}/tokens/${s}`}function Zp(t,s){return`${ot.marketplaceUrl}/contracts/${t}/items/${s}`}function La(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"?Zp(s,t.itemId):Xp(s,t.tokenId),m=c.useRef(null),b=c.useRef(l);return b.current=l,c.useEffect(()=>{var h;(h=m.current)==null||h.focus();function $(g){g.key==="Escape"&&b.current()}return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[]),e.jsx(Dp,{role:"presentation",onClick:l,children:e.jsxs(Op,{ref:m,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":i("marketplaceRedirect.title"),"data-testid":"marketplace-redirect-modal",onClick:$=>$.stopPropagation(),children:[e.jsxs(qp,{children:[e.jsx(Kp,{children:i("marketplaceRedirect.title")}),e.jsx(Hp,{onClick:l,"aria-label":i("marketplaceRedirect.close"),children:e.jsx(R,{name:"close",className:"ico"})})]}),e.jsxs(Up,{children:[e.jsx(Qp,{src:Np,alt:"","aria-hidden":!0}),e.jsx(Gp,{children:i("marketplaceRedirect.heading")}),e.jsx(Ra,{children:o?i("marketplaceRedirect.buyBody"):i("marketplaceRedirect.body")}),o?e.jsx(Ra,{children:i("marketplaceRedirect.buyCurrencyNote")}):null]}),e.jsxs(_p,{children:[e.jsx(Vp,{onClick:l,"data-testid":"marketplace-redirect-cancel",children:i("marketplaceRedirect.cancel")}),e.jsxs(Jp,{href:x,target:"_blank",rel:"noreferrer","data-testid":"marketplace-redirect-continue",onClick:()=>X("Shop Redirected To Marketplace",{direction:o?"buy":"resell",contract_address:s,item_id:d,token_id:u}),children:[i("marketplaceRedirect.continue"),e.jsx(Yp,{"aria-hidden":!0,children:e.jsx(R,{name:"view-all-arrow",className:"ico"})})]})]})]})})}function Hn(){return ot.shopServerUrl||null}function qr(){return!!Hn()}async function eh(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 xr(u,{method:"GET",identity:l,metadata:{}});if(!x.ok)throw new Error(`getNotifyRequest ${x.status}`);return nh(x,"getNotifyRequest")}async function th(t,s){const l=Hn();if(!l)throw new Error("createNotifyRequest: no shop-server host configured");const o=`${l}/notify-requests`,d=await xr(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()&&!ih(u))throw new Error("createNotifyRequest: response was not JSON")}async function nh(t,s){try{return await t.json()}catch{throw new Error(`${s}: response was not JSON`)}}function ih(t){try{return JSON.parse(t),!0}catch{return!1}}const{colors:Me,radius:Kr}=n,Hr=wt`
|
|
2466
|
+
display: flex;
|
|
2467
|
+
flex-direction: column;
|
|
2468
|
+
gap: 8px;
|
|
2469
|
+
width: 100%;
|
|
2470
|
+
`,ah=a.form`
|
|
2471
|
+
${Hr};
|
|
2472
|
+
`,Pa=a.div`
|
|
2473
|
+
${Hr};
|
|
2474
|
+
|
|
2475
|
+
&[data-done] {
|
|
2476
|
+
flex-direction: row;
|
|
2477
|
+
align-items: center;
|
|
2478
|
+
gap: 16px;
|
|
2479
|
+
padding: 12px;
|
|
2480
|
+
border-radius: 16px;
|
|
2481
|
+
background: #c1d8c9;
|
|
2482
|
+
}
|
|
2483
|
+
`,rh=a.label`
|
|
2484
|
+
font-size: 14px;
|
|
2485
|
+
color: ${Me.softWhite};
|
|
2486
|
+
`,sh=a.div`
|
|
2487
|
+
display: flex;
|
|
2488
|
+
align-items: stretch;
|
|
2489
|
+
gap: 8px;
|
|
2490
|
+
`,oh=a.input`
|
|
2491
|
+
flex: 1;
|
|
2492
|
+
min-width: 0;
|
|
2493
|
+
height: 42px;
|
|
2494
|
+
padding: 0 16px;
|
|
2495
|
+
border: 1px solid ${Me.fieldBorder};
|
|
2496
|
+
border-radius: ${Kr.btn};
|
|
2497
|
+
background: rgba(255, 255, 255, 0.1);
|
|
2498
|
+
font-size: 16px;
|
|
2499
|
+
color: ${Me.softWhite};
|
|
2500
|
+
|
|
2501
|
+
&::placeholder {
|
|
2502
|
+
color: ${Me.gray4};
|
|
2503
|
+
}
|
|
2504
|
+
&:focus-visible {
|
|
2505
|
+
outline: none;
|
|
2506
|
+
border-color: ${Me.white};
|
|
2507
|
+
box-shadow: 0 0 0 1px ${Me.white};
|
|
2508
|
+
}
|
|
2509
|
+
`,Ea=a.button`
|
|
2510
|
+
flex-shrink: 0;
|
|
2511
|
+
height: 40px;
|
|
2512
|
+
padding: 0 12px;
|
|
2513
|
+
border: 0;
|
|
2514
|
+
border-radius: ${Kr.card};
|
|
2515
|
+
background: ${Me.softWhite};
|
|
2516
|
+
color: ${Me.text};
|
|
2517
|
+
font-weight: 600;
|
|
2518
|
+
font-size: 15px;
|
|
2519
|
+
line-height: 24px;
|
|
2520
|
+
text-transform: uppercase;
|
|
2521
|
+
letter-spacing: 0.46px;
|
|
2522
|
+
cursor: pointer;
|
|
2523
|
+
transition: background 0.15s ease;
|
|
2524
|
+
|
|
2525
|
+
&[data-full] {
|
|
2526
|
+
width: 100%;
|
|
2527
|
+
flex-shrink: 1;
|
|
2528
|
+
}
|
|
2529
|
+
&:hover:not(:disabled) {
|
|
2530
|
+
background: ${Me.white};
|
|
2531
|
+
}
|
|
2532
|
+
&:disabled {
|
|
2533
|
+
opacity: 0.5;
|
|
2534
|
+
cursor: default;
|
|
2535
|
+
}
|
|
2536
|
+
`,lh=a.span`
|
|
2537
|
+
display: inline-flex;
|
|
2538
|
+
align-items: center;
|
|
2539
|
+
justify-content: center;
|
|
2540
|
+
flex-shrink: 0;
|
|
2541
|
+
width: 20px;
|
|
2542
|
+
height: 20px;
|
|
2543
|
+
border-radius: 50%;
|
|
2544
|
+
background: #34ce76;
|
|
2545
|
+
color: ${Me.white};
|
|
2546
|
+
`,dh=a.span`
|
|
2547
|
+
font-size: 16px;
|
|
2548
|
+
line-height: 1.5;
|
|
2549
|
+
color: ${Me.text2};
|
|
2550
|
+
`;function Ta(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.trim())}function ch({item:t}){const s=lt(S=>S.session),l=lt(S=>S.signIn),[o,d]=c.useState(""),[u,x]=c.useState(!1),[m,b]=c.useState(!1),[$,h]=c.useState(null),g=qr(),y=g&&!!s&&!!t.contractAddress&&!!t.itemId,{data:j}=te({queryKey:["notify-request",t.contractAddress,t.itemId,s==null?void 0:s.address],enabled:y,queryFn:()=>eh(t.contractAddress,t.itemId,s.identity)});c.useEffect(()=>{j!=null&&j.email&&d(S=>S||j.email)},[j==null?void 0:j.email]),c.useEffect(()=>{if(!s||!g)return;let S=!1;return Js().then(N=>{!S&&N&&d(f=>f||N)}),()=>{S=!0}},[g,s]);const I=m||!!(j!=null&&j.subscribed);async function C(S){if(S.preventDefault(),!(!s||!t.itemId||!Ta(o)||u)){x(!0),h(null);try{await th({contractAddress:t.contractAddress,itemId:t.itemId,chainId:t.chainId,email:o.trim()},s.identity),b(!0),X("Shop Requested Notify",{item_id:t.itemId,contract_address:t.contractAddress})}catch(N){pe(N,{flow:"notify-me",contractAddress:t.contractAddress,itemId:t.itemId}),h(i("notifyMe.error"))}finally{x(!1)}}}return g?s?I?e.jsxs(Pa,{"data-done":!0,"data-testid":"notify-subscribed",children:[e.jsx(lh,{"aria-hidden":!0,children:e.jsx(R,{name:"check",size:12})}),e.jsx(dh,{children:i("notifyMe.subscribedBody")})]}):e.jsxs(ah,{onSubmit:S=>void C(S),"data-testid":"notify",children:[e.jsx(rh,{htmlFor:"notify-email",children:i("notifyMe.label")}),e.jsxs(sh,{children:[e.jsx(oh,{id:"notify-email",type:"email",inputMode:"email",autoComplete:"email",placeholder:i("notifyMe.placeholder"),value:o,onChange:S=>d(S.target.value),"data-testid":"notify-email"}),e.jsx(Ea,{type:"submit",disabled:!Ta(o)||u,"data-testid":"notify-submit",children:u?i("notifyMe.working"):i("notifyMe.cta")})]}),e.jsx(Ve,{message:$})]}):e.jsx(Pa,{"data-testid":"notify",children:e.jsx(Ea,{type:"button","data-full":!0,onClick:l,"data-testid":"notify-signin",children:i("notifyMe.signInCta")})}):null}const uh=a.div`
|
|
2551
|
+
display: flex;
|
|
2552
|
+
flex-direction: column;
|
|
2553
|
+
gap: 4px;
|
|
2554
|
+
width: 100%;
|
|
2555
|
+
font-family: ${n.font.sans};
|
|
2556
|
+
`,ph=a.div`
|
|
2557
|
+
display: flex;
|
|
2558
|
+
align-items: flex-start;
|
|
2559
|
+
justify-content: space-between;
|
|
2560
|
+
gap: 12px;
|
|
2561
|
+
font-size: 12px;
|
|
2562
|
+
`,hh=a.span`
|
|
2563
|
+
font-weight: 600;
|
|
2564
|
+
line-height: 1.57;
|
|
2565
|
+
color: ${n.colors.muted2};
|
|
2566
|
+
/* Drawn in caps, like the PRICE and STOCK labels beside it. Cased here rather than in the string so a
|
|
2567
|
+
translation is not forced to shout in a language where that reads badly. */
|
|
2568
|
+
text-transform: uppercase;
|
|
2569
|
+
white-space: nowrap;
|
|
2570
|
+
`,Fa=a.span`
|
|
2571
|
+
/* Sized here, not inherited from the head row: the same element also sits UNDER the bar, outside it. */
|
|
2572
|
+
font-size: 12px;
|
|
2573
|
+
font-weight: 400;
|
|
2574
|
+
line-height: 22px;
|
|
2575
|
+
color: ${n.colors.softWhite};
|
|
2576
|
+
text-transform: lowercase;
|
|
2577
|
+
white-space: nowrap;
|
|
2578
|
+
`,xh=a.div`
|
|
2579
|
+
position: relative;
|
|
2580
|
+
width: 100%;
|
|
2581
|
+
height: 10px;
|
|
2582
|
+
border-radius: 100px;
|
|
2583
|
+
background: rgba(255, 255, 255, 0.2);
|
|
2584
|
+
/* The fill is a child with its own radius; clipping here keeps a full bar's ends round. */
|
|
2585
|
+
overflow: hidden;
|
|
2586
|
+
`,fh=a.div`
|
|
2587
|
+
position: absolute;
|
|
2588
|
+
left: 0;
|
|
2589
|
+
top: 0;
|
|
2590
|
+
height: 10px;
|
|
2591
|
+
border-radius: 100px;
|
|
2592
|
+
background: ${n.colors.dclRed};
|
|
2593
|
+
transition: width 0.3s ease;
|
|
2594
|
+
|
|
2595
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2596
|
+
transition: none;
|
|
2597
|
+
}
|
|
2598
|
+
`;function mh({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(uh,{className:l,"data-testid":o,children:[e.jsxs(ph,{children:[e.jsx(hh,{children:i("offerStock.label")}),e.jsx(Fa,{children:i("offerStock.claimed",{claimed:d,total:s})})]}),e.jsx(xh,{role:"progressbar","aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":d,"aria-label":i("offerStock.claimed",{claimed:d,total:s}),children:e.jsx(fh,{style:{width:`${u}%`}})}),e.jsx(Fa,{children:i("offerStock.percent",{pct:u})})]})}const gh=new Map(Object.entries(dd).flatMap(([t,s])=>s.length===1?[[s[0],t]]:[])),gt="/items";function bh(t){return t?`${gt}?rarities=${encodeURIComponent(t.toLowerCase())}`:null}function yh(t){const s=t.wearableCategory;if(s){const l=gh.get(s);return l?`${gt}?category=wearable&subCategory=${encodeURIComponent(l)}`:`${gt}?category=wearable`}return t.category==="emote"?`${gt}?category=emote`:t.category==="wearable"?`${gt}?category=wearable`:null}function wh(){return`${gt}?smart=true`}const vh=a(Ys)`
|
|
2599
|
+
display: flex;
|
|
2600
|
+
flex-direction: column;
|
|
2601
|
+
overflow: hidden;
|
|
2602
|
+
gap: 1px;
|
|
2603
|
+
background: ${n.colors.lineStrong};
|
|
2604
|
+
|
|
2605
|
+
/* Rows stack; each cell (<img>) covers its share. A single row (≤2 thumbnails, data-full) spans the
|
|
2606
|
+
full height. */
|
|
2607
|
+
& [data-collage-row] {
|
|
2608
|
+
display: flex;
|
|
2609
|
+
flex: 1 1 50%;
|
|
2610
|
+
min-height: 0;
|
|
2611
|
+
gap: 1px;
|
|
2612
|
+
}
|
|
2613
|
+
& [data-collage-row][data-full] {
|
|
2614
|
+
flex-basis: 100%;
|
|
2615
|
+
}
|
|
2616
|
+
& [data-collage-row] img {
|
|
2617
|
+
flex: 1 1 0;
|
|
2618
|
+
min-width: 0;
|
|
2619
|
+
width: 100%;
|
|
2620
|
+
height: 100%;
|
|
2621
|
+
object-fit: cover;
|
|
2622
|
+
display: block;
|
|
2623
|
+
}
|
|
2624
|
+
`;function jh({contractAddress:t,name:s,items:l,className:o}){const d=dt();if(!t||!s)return null;const u=(l??[]).map(b=>b.thumbnail).filter(b=>!!b).slice(0,4),x=u.slice(0,2),m=u.slice(2,4);return e.jsxs(Xs,{as:"button","data-link":!0,className:o,"data-testid":"creator",onClick:b=>{b.stopPropagation(),d(`/collection/${t}`)},children:[u.length>0?e.jsxs(vh,{as:"span","data-avatar":!0,"data-testid":"creator-ava","aria-hidden":!0,children:[e.jsx("span",{"data-collage-row":!0,"data-full":m.length===0||void 0,children:x.map((b,$)=>e.jsx("img",{src:b,alt:""},$))}),m.length>0?e.jsx("span",{"data-collage-row":!0,children:m.map((b,$)=>e.jsx("img",{src:b,alt:""},$))}):null]}):null,e.jsx(Zs,{"data-testid":"creator-name",children:tn(s)})]})}const{colors:v,radius:Ye,media:le,font:kh,gradients:$h}=n,Ch=a.div`
|
|
2625
|
+
max-width: 1721px;
|
|
2626
|
+
margin: 0 auto;
|
|
2627
|
+
|
|
2628
|
+
${le.maxWidth("lg")} {
|
|
2629
|
+
padding-bottom: 88px;
|
|
2630
|
+
}
|
|
2631
|
+
`,Ih=a.nav`
|
|
2632
|
+
display: flex;
|
|
2633
|
+
align-items: center;
|
|
2634
|
+
gap: 8px;
|
|
2635
|
+
font-size: 13px;
|
|
2636
|
+
color: ${v.gray4};
|
|
2637
|
+
margin-bottom: 24px;
|
|
2638
|
+
${cd};
|
|
2639
|
+
`,Sh=a.button`
|
|
2640
|
+
background: none;
|
|
2641
|
+
border: 0;
|
|
2642
|
+
padding: 0;
|
|
2643
|
+
font: inherit;
|
|
2644
|
+
color: ${v.gray4};
|
|
2645
|
+
|
|
2646
|
+
&:hover {
|
|
2647
|
+
color: ${v.white};
|
|
2648
|
+
}
|
|
2649
|
+
`,Ah=a.span`
|
|
2650
|
+
color: ${v.muted2};
|
|
2651
|
+
`,Mh=a.span`
|
|
2652
|
+
color: ${v.softWhite};
|
|
2653
|
+
font-weight: 600;
|
|
2654
|
+
`,zh=a.div`
|
|
2655
|
+
position: relative;
|
|
2656
|
+
/* Confines the glow's negative z-index, which would otherwise escape to the root stacking context. */
|
|
2657
|
+
isolation: isolate;
|
|
2658
|
+
display: grid;
|
|
2659
|
+
grid-template-columns: minmax(0, 1045fr) minmax(0, 514fr);
|
|
2660
|
+
gap: 48px;
|
|
2661
|
+
align-items: start;
|
|
2662
|
+
|
|
2663
|
+
/* Preview column width, re-derived from the tracks above so the glow's pivot cannot drift. */
|
|
2664
|
+
--preview-col-w: calc((100% - 48px) * 1045 / 1559);
|
|
2665
|
+
/* Oversized so the glow reaches past the frame while the gradient still finishes fading inside its
|
|
2666
|
+
own box: the radii cannot exceed 50% without ending outside the box and painting a hard rectangle. */
|
|
2667
|
+
--glow-box: 1.76;
|
|
2668
|
+
|
|
2669
|
+
/* Avatar glow, hung off the grid container because the preview frame clips its own overflow. Sits
|
|
2670
|
+
under the frame and, by document order, above the body symbols on the same z-index. */
|
|
2671
|
+
&::before {
|
|
2672
|
+
content: '';
|
|
2673
|
+
position: absolute;
|
|
2674
|
+
z-index: -1;
|
|
2675
|
+
pointer-events: none;
|
|
2676
|
+
top: 0;
|
|
2677
|
+
left: calc(var(--preview-col-w) / 2);
|
|
2678
|
+
width: calc(var(--preview-col-w) * var(--glow-box));
|
|
2679
|
+
aspect-ratio: 1045 / 752;
|
|
2680
|
+
transform: translate(-50%, calc(50% / var(--glow-box) - 50%));
|
|
2681
|
+
background: radial-gradient(
|
|
2682
|
+
50% 50% at 50% 52%,
|
|
2683
|
+
rgb(var(--glow-core, ${v.glowCyanRgb})) 0%,
|
|
2684
|
+
rgb(var(--glow-rgb, ${v.glowCyanRgb}) / 0.9) 20%,
|
|
2685
|
+
45%,
|
|
2686
|
+
rgb(var(--glow-rgb, ${v.glowCyanRgb}) / 0) 100%
|
|
2687
|
+
);
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
${le.maxWidth("lg")} {
|
|
2691
|
+
grid-template-columns: 1fr;
|
|
2692
|
+
gap: 24px;
|
|
2693
|
+
|
|
2694
|
+
/* The track maths is desktop-only; one column puts the pivot nowhere meaningful. */
|
|
2695
|
+
&::before {
|
|
2696
|
+
display: none;
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
2699
|
+
`,Rh=a.div`
|
|
2700
|
+
position: relative;
|
|
2701
|
+
aspect-ratio: 1045 / 752;
|
|
2702
|
+
border-radius: ${Ye.banner};
|
|
2703
|
+
overflow: hidden;
|
|
2704
|
+
|
|
2705
|
+
/* Edge to edge once the page is a single column: the stage is the whole width there, so it cancels the
|
|
2706
|
+
shell's gutter instead of sitting inside it. No transform, which would make this the containing block
|
|
2707
|
+
for the absolutely-positioned controls below. */
|
|
2708
|
+
${le.maxWidth("lg")} {
|
|
2709
|
+
aspect-ratio: 1 / 1;
|
|
2710
|
+
width: 100vw;
|
|
2711
|
+
margin-left: calc(-50vw + 50%);
|
|
2712
|
+
border-radius: 0;
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2715
|
+
& iframe,
|
|
2716
|
+
& > * {
|
|
2717
|
+
width: 100%;
|
|
2718
|
+
height: 100%;
|
|
2719
|
+
border: 0;
|
|
2720
|
+
display: block;
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
/* Soft edges so legs and the cast shadow dissolve instead of being sliced by the overflow clip — on the
|
|
2724
|
+
iframe alone, so the pills and note stay crisp, and intersected linears rather than one radial, which
|
|
2725
|
+
would round the corners. The bands stay clear of the controls aang draws ~40px inside its canvas. */
|
|
2726
|
+
& iframe {
|
|
2727
|
+
-webkit-mask-image:
|
|
2728
|
+
linear-gradient(to bottom, transparent 0%, #000 3%, #000 92%, transparent 100%),
|
|
2729
|
+
linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
|
|
2730
|
+
-webkit-mask-composite: source-in;
|
|
2731
|
+
mask-image:
|
|
2732
|
+
linear-gradient(to bottom, transparent 0%, #000 3%, #000 92%, transparent 100%),
|
|
2733
|
+
linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
|
|
2734
|
+
mask-composite: intersect;
|
|
2735
|
+
}
|
|
2736
|
+
|
|
2737
|
+
/* Invisible viewport sentinel for the IntersectionObserver that pauses the preview off-screen.
|
|
2738
|
+
Absolute + pointer-events:none so it neither takes layout space (undoing the greedy child sizing
|
|
2739
|
+
above) nor blocks the preview controls. */
|
|
2740
|
+
& > [data-preview-viewport] {
|
|
2741
|
+
position: absolute;
|
|
2742
|
+
inset: 0;
|
|
2743
|
+
pointer-events: none;
|
|
2744
|
+
z-index: 0;
|
|
2745
|
+
}
|
|
2746
|
+
|
|
2747
|
+
& > [data-preview-toggle] {
|
|
2748
|
+
position: absolute;
|
|
2749
|
+
top: 16px;
|
|
2750
|
+
left: 16px;
|
|
2751
|
+
z-index: 2;
|
|
2752
|
+
width: auto;
|
|
2753
|
+
height: auto;
|
|
2754
|
+
display: inline-flex;
|
|
2755
|
+
gap: 2px;
|
|
2756
|
+
padding: 3px;
|
|
2757
|
+
background: rgba(255, 255, 255, 0.92);
|
|
2758
|
+
border: 1px solid ${v.line};
|
|
2759
|
+
border-radius: 999px;
|
|
2760
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
|
|
2761
|
+
|
|
2762
|
+
/* Bottom-right on mobile, and the two buttons meet directly: the design draws one clipped group, so the
|
|
2763
|
+
container carries no fill, gap or padding of its own there. */
|
|
2764
|
+
${le.maxWidth("lg")} {
|
|
2765
|
+
top: auto;
|
|
2766
|
+
left: auto;
|
|
2767
|
+
right: 16px;
|
|
2768
|
+
bottom: 16px;
|
|
2769
|
+
gap: 0;
|
|
2770
|
+
padding: 0;
|
|
2771
|
+
background: none;
|
|
2772
|
+
border: 0;
|
|
2773
|
+
box-shadow: none;
|
|
2774
|
+
overflow: hidden;
|
|
2775
|
+
}
|
|
2776
|
+
}
|
|
2777
|
+
|
|
2778
|
+
& > [data-preview-note] {
|
|
2779
|
+
position: absolute;
|
|
2780
|
+
bottom: 14px;
|
|
2781
|
+
left: 50%;
|
|
2782
|
+
transform: translateX(-50%);
|
|
2783
|
+
z-index: 2;
|
|
2784
|
+
width: auto;
|
|
2785
|
+
height: auto;
|
|
2786
|
+
max-width: 88%;
|
|
2787
|
+
margin: 0;
|
|
2788
|
+
text-align: center;
|
|
2789
|
+
background: rgba(22, 21, 24, 0.78);
|
|
2790
|
+
color: ${v.white};
|
|
2791
|
+
font-size: 12px;
|
|
2792
|
+
font-weight: 500;
|
|
2793
|
+
padding: 6px 12px;
|
|
2794
|
+
border-radius: 999px;
|
|
2795
|
+
}
|
|
2796
|
+
|
|
2797
|
+
& > [data-preview-loading] {
|
|
2798
|
+
position: absolute;
|
|
2799
|
+
inset: 0;
|
|
2800
|
+
z-index: 1;
|
|
2801
|
+
display: flex;
|
|
2802
|
+
align-items: center;
|
|
2803
|
+
justify-content: center;
|
|
2804
|
+
width: 100%;
|
|
2805
|
+
height: 100%;
|
|
2806
|
+
background: transparent;
|
|
2807
|
+
}
|
|
2808
|
+
|
|
2809
|
+
& > [data-fav-preview] {
|
|
2810
|
+
display: none;
|
|
2811
|
+
}
|
|
2812
|
+
|
|
2813
|
+
/* Bottom-LEFT: the emote controls and the preview note both own the bottom centre, and the mobile
|
|
2814
|
+
wearable/avatar toggle owns the bottom right, so this is the one free corner on every route. */
|
|
2815
|
+
& > [data-play-showcase] {
|
|
2816
|
+
position: absolute;
|
|
2817
|
+
bottom: 16px;
|
|
2818
|
+
left: 16px;
|
|
2819
|
+
z-index: 2;
|
|
2820
|
+
width: auto;
|
|
2821
|
+
height: auto;
|
|
2822
|
+
}
|
|
2823
|
+
|
|
2824
|
+
${le.maxWidth("lg")} {
|
|
2825
|
+
& > [data-preview-toggle] {
|
|
2826
|
+
top: auto;
|
|
2827
|
+
left: auto;
|
|
2828
|
+
bottom: 12px;
|
|
2829
|
+
right: 12px;
|
|
2830
|
+
gap: 0;
|
|
2831
|
+
padding: 0;
|
|
2832
|
+
background: transparent;
|
|
2833
|
+
border: 0;
|
|
2834
|
+
box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
|
|
2835
|
+
overflow: hidden;
|
|
2836
|
+
}
|
|
2837
|
+
& > [data-fav-preview] {
|
|
2838
|
+
display: inline-flex;
|
|
2839
|
+
position: absolute;
|
|
2840
|
+
top: 12px;
|
|
2841
|
+
right: 12px;
|
|
2842
|
+
z-index: 3;
|
|
2843
|
+
width: auto;
|
|
2844
|
+
min-width: 40px;
|
|
2845
|
+
height: 40px;
|
|
2846
|
+
background: rgba(255, 255, 255, 0.92);
|
|
2847
|
+
box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
|
|
2848
|
+
}
|
|
2849
|
+
& > [data-fav-preview]:hover {
|
|
2850
|
+
background: ${v.white};
|
|
2851
|
+
}
|
|
2852
|
+
}
|
|
2853
|
+
`,Lh=a.div``,Ph=a.span`
|
|
2854
|
+
position: absolute;
|
|
2855
|
+
inset: 0;
|
|
2856
|
+
width: 100%;
|
|
2857
|
+
height: 100%;
|
|
2858
|
+
border-radius: inherit;
|
|
2859
|
+
`,Eh=a.div`
|
|
2860
|
+
display: flex;
|
|
2861
|
+
flex-direction: column;
|
|
2862
|
+
gap: 0;
|
|
2863
|
+
`,Th=a.div`
|
|
2864
|
+
display: flex;
|
|
2865
|
+
align-items: flex-start;
|
|
2866
|
+
justify-content: space-between;
|
|
2867
|
+
gap: 12px;
|
|
2868
|
+
|
|
2869
|
+
${le.maxWidth("lg")} {
|
|
2870
|
+
order: 0;
|
|
2871
|
+
}
|
|
2872
|
+
`,Fh=a.h1`
|
|
2873
|
+
font-size: 28px;
|
|
2874
|
+
font-weight: 600;
|
|
2875
|
+
line-height: 34px;
|
|
2876
|
+
color: ${v.softWhite};
|
|
2877
|
+
|
|
2878
|
+
${le.maxWidth("lg")} {
|
|
2879
|
+
font-size: 20px;
|
|
2880
|
+
line-height: 24px;
|
|
2881
|
+
}
|
|
2882
|
+
`,Ba=a.button`
|
|
2883
|
+
flex: none;
|
|
2884
|
+
min-width: 40px;
|
|
2885
|
+
height: 40px;
|
|
2886
|
+
padding: 0;
|
|
2887
|
+
border-radius: ${Ye.pill};
|
|
2888
|
+
border: 0;
|
|
2889
|
+
background: rgba(255, 255, 255, 0.16);
|
|
2890
|
+
display: inline-flex;
|
|
2891
|
+
align-items: center;
|
|
2892
|
+
justify-content: center;
|
|
2893
|
+
gap: 6px;
|
|
2894
|
+
color: ${v.softWhite};
|
|
2895
|
+
cursor: pointer;
|
|
2896
|
+
transition:
|
|
2897
|
+
color 0.12s ease,
|
|
2898
|
+
background 0.12s ease;
|
|
2899
|
+
|
|
2900
|
+
&[data-count] {
|
|
2901
|
+
padding: 0 14px 0 12px;
|
|
2902
|
+
}
|
|
2903
|
+
&:hover {
|
|
2904
|
+
background: rgba(255, 255, 255, 0.28);
|
|
2905
|
+
}
|
|
2906
|
+
&[data-on] {
|
|
2907
|
+
color: ${v.dclRed};
|
|
2908
|
+
}
|
|
2909
|
+
|
|
2910
|
+
${le.maxWidth("lg")} {
|
|
2911
|
+
color: ${v.text};
|
|
2912
|
+
&[data-fav-title] {
|
|
2913
|
+
display: none;
|
|
2914
|
+
}
|
|
2915
|
+
}
|
|
2916
|
+
`,Na=a.span`
|
|
2917
|
+
font-size: 13px;
|
|
2918
|
+
font-weight: 600;
|
|
2919
|
+
line-height: 1;
|
|
2920
|
+
color: ${v.softWhite};
|
|
2921
|
+
|
|
2922
|
+
${le.maxWidth("lg")} {
|
|
2923
|
+
color: ${v.text};
|
|
2924
|
+
}
|
|
2925
|
+
`,Bh=a.button`
|
|
2926
|
+
display: inline-flex;
|
|
2927
|
+
align-items: center;
|
|
2928
|
+
gap: 8px;
|
|
2929
|
+
padding: 8px 14px;
|
|
2930
|
+
border: 1px solid ${v.line};
|
|
2931
|
+
border-radius: ${Ye.pill};
|
|
2932
|
+
background: rgba(255, 255, 255, 0.94);
|
|
2933
|
+
backdrop-filter: blur(6px);
|
|
2934
|
+
box-shadow: 0 2px 10px rgba(22, 21, 24, 0.12);
|
|
2935
|
+
color: ${v.text};
|
|
2936
|
+
font-size: 13px;
|
|
2937
|
+
font-weight: 600;
|
|
2938
|
+
cursor: pointer;
|
|
2939
|
+
transition: background 0.12s ease;
|
|
2940
|
+
|
|
2941
|
+
&:hover {
|
|
2942
|
+
background: ${v.white};
|
|
2943
|
+
}
|
|
2944
|
+
&:focus-visible {
|
|
2945
|
+
outline: 2px solid ${v.accent};
|
|
2946
|
+
outline-offset: 2px;
|
|
2947
|
+
}
|
|
2948
|
+
`,ft=a.div`
|
|
2949
|
+
display: inline-flex;
|
|
2950
|
+
align-items: center;
|
|
2951
|
+
gap: 5px;
|
|
2952
|
+
font-size: 12px;
|
|
2953
|
+
font-weight: 500;
|
|
2954
|
+
text-transform: uppercase;
|
|
2955
|
+
letter-spacing: 0;
|
|
2956
|
+
color: ${v.gray4};
|
|
2957
|
+
`,Nh=a.div`
|
|
2958
|
+
display: flex;
|
|
2959
|
+
align-items: center;
|
|
2960
|
+
gap: 8px;
|
|
2961
|
+
flex-wrap: wrap;
|
|
2962
|
+
margin-top: 12px;
|
|
2963
|
+
|
|
2964
|
+
${le.maxWidth("lg")} {
|
|
2965
|
+
order: 1;
|
|
2966
|
+
margin-top: 10px;
|
|
2967
|
+
}
|
|
2968
|
+
`,Ee=a(dr)`
|
|
2969
|
+
height: 24px;
|
|
2970
|
+
padding: 0 8px;
|
|
2971
|
+
gap: 3px;
|
|
2972
|
+
font-size: 13px;
|
|
2973
|
+
font-weight: 500;
|
|
2974
|
+
border-radius: 4px;
|
|
2975
|
+
letter-spacing: 0.02em;
|
|
2976
|
+
text-transform: uppercase;
|
|
2977
|
+
background: rgba(255, 255, 255, 0.14);
|
|
2978
|
+
color: ${v.softWhite};
|
|
2979
|
+
|
|
2980
|
+
& .ico {
|
|
2981
|
+
color: ${v.softWhite};
|
|
2982
|
+
}
|
|
2983
|
+
&[data-variant='cat'] {
|
|
2984
|
+
background: rgba(255, 255, 255, 0.14);
|
|
2985
|
+
color: ${v.softWhite};
|
|
2986
|
+
}
|
|
2987
|
+
|
|
2988
|
+
/* The blocked-VRM-export badge. Warning orange, tinted at 20% for the fill — the marketplace's own
|
|
2989
|
+
#ff7439 on #ff743933, kept identical so the same restriction reads the same in both places. It is the
|
|
2990
|
+
one chip in this row that reports a limitation rather than a feature, and it should not blend in. */
|
|
2991
|
+
&[data-variant='blocked'] {
|
|
2992
|
+
background: rgba(255, 116, 57, 0.2);
|
|
2993
|
+
color: #ff7439;
|
|
2994
|
+
cursor: help;
|
|
2995
|
+
}
|
|
2996
|
+
&[data-variant='blocked']:focus-visible {
|
|
2997
|
+
outline: 2px solid #ff7439;
|
|
2998
|
+
outline-offset: 2px;
|
|
2999
|
+
}
|
|
3000
|
+
`,Jt=a(Ee.withComponent(nr))`
|
|
3001
|
+
text-decoration: none;
|
|
3002
|
+
cursor: pointer;
|
|
3003
|
+
transition: background 0.15s ease;
|
|
3004
|
+
|
|
3005
|
+
&:hover,
|
|
3006
|
+
&:focus-visible {
|
|
3007
|
+
background: rgba(255, 255, 255, 0.26);
|
|
3008
|
+
}
|
|
3009
|
+
|
|
3010
|
+
/* The rarity chip carries its own colour inline, so a background hover would be overridden and the
|
|
3011
|
+
chip would look inert. It gets a ring instead, which reads on any fill. */
|
|
3012
|
+
&[data-variant='rarity']:hover,
|
|
3013
|
+
&[data-variant='rarity']:focus-visible {
|
|
3014
|
+
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
|
|
3015
|
+
}
|
|
3016
|
+
`,Wh=a.div`
|
|
3017
|
+
display: flex;
|
|
3018
|
+
flex-direction: column;
|
|
3019
|
+
align-items: flex-start;
|
|
3020
|
+
gap: 8px;
|
|
3021
|
+
`,Bn=a(Wh)`
|
|
3022
|
+
gap: 11px;
|
|
3023
|
+
`,Wa=a.p`
|
|
3024
|
+
margin: 0;
|
|
3025
|
+
color: ${v.softWhite};
|
|
3026
|
+
font-size: 14px;
|
|
3027
|
+
line-height: 30px;
|
|
3028
|
+
display: -webkit-box;
|
|
3029
|
+
-webkit-box-orient: vertical;
|
|
3030
|
+
-webkit-line-clamp: 4;
|
|
3031
|
+
overflow: hidden;
|
|
3032
|
+
|
|
3033
|
+
&[data-expanded] {
|
|
3034
|
+
-webkit-line-clamp: unset;
|
|
3035
|
+
overflow: visible;
|
|
3036
|
+
}
|
|
3037
|
+
`,Dh=a.button`
|
|
3038
|
+
font-size: 13px;
|
|
3039
|
+
align-self: flex-start;
|
|
3040
|
+
`,Ur=wt`
|
|
3041
|
+
display: grid;
|
|
3042
|
+
grid-template-columns: 1fr 1fr;
|
|
3043
|
+
gap: 16px;
|
|
3044
|
+
`,Qr=a.div`
|
|
3045
|
+
${Ur};
|
|
3046
|
+
/* Clears the chips above. The pair below sits at 32px, so this is the tighter of the two steps: the
|
|
3047
|
+
description belongs to the heading block it follows, the creator/collection pair is a new subject. */
|
|
3048
|
+
margin-top: 24px;
|
|
3049
|
+
|
|
3050
|
+
${le.maxWidth("lg")} {
|
|
3051
|
+
order: 3;
|
|
3052
|
+
grid-template-columns: 1fr;
|
|
3053
|
+
/* Stacked, the two blocks need real separation — as one column they would read as one paragraph. */
|
|
3054
|
+
gap: 20px;
|
|
3055
|
+
margin-top: 20px;
|
|
3056
|
+
}
|
|
3057
|
+
`,Nn=a.div`
|
|
3058
|
+
min-width: 0;
|
|
3059
|
+
`,Gr=a.div`
|
|
3060
|
+
${Ur};
|
|
3061
|
+
margin-top: 32px;
|
|
3062
|
+
|
|
3063
|
+
${le.maxWidth("lg")} {
|
|
3064
|
+
order: 2;
|
|
3065
|
+
margin-top: 20px;
|
|
3066
|
+
}
|
|
3067
|
+
`,Mt=a.div`
|
|
3068
|
+
display: flex;
|
|
3069
|
+
flex-direction: column;
|
|
3070
|
+
gap: 15px;
|
|
3071
|
+
min-width: 0;
|
|
3072
|
+
|
|
3073
|
+
&[data-collection] {
|
|
3074
|
+
align-items: flex-start;
|
|
3075
|
+
}
|
|
3076
|
+
`,_r=wt`
|
|
3077
|
+
&[data-testid='creator'] {
|
|
3078
|
+
color: ${v.softWhite};
|
|
3079
|
+
font-size: 14px;
|
|
3080
|
+
gap: 12px;
|
|
3081
|
+
}
|
|
3082
|
+
[data-avatar] {
|
|
3083
|
+
width: 48px;
|
|
3084
|
+
height: 48px;
|
|
3085
|
+
}
|
|
3086
|
+
[data-letter] {
|
|
3087
|
+
font-size: 18px;
|
|
3088
|
+
}
|
|
3089
|
+
[data-testid='creator-name'] {
|
|
3090
|
+
color: ${v.softWhite};
|
|
3091
|
+
font-weight: 500;
|
|
3092
|
+
text-decoration: underline;
|
|
3093
|
+
}
|
|
3094
|
+
&[data-link]:hover [data-testid='creator-name'] {
|
|
3095
|
+
color: ${v.gray4};
|
|
3096
|
+
}
|
|
3097
|
+
`,Oh=a(to)`
|
|
3098
|
+
${_r}
|
|
3099
|
+
`,qh=a(jh)`
|
|
3100
|
+
${_r}
|
|
3101
|
+
`,Vr=a.hr`
|
|
3102
|
+
border: 0;
|
|
3103
|
+
border-top: 1px solid rgba(255, 255, 255, 0.3);
|
|
3104
|
+
margin: 24px 0 0;
|
|
3105
|
+
width: 100%;
|
|
3106
|
+
|
|
3107
|
+
/* Below the price, not above it: the design hangs this off the bottom of the buy section (2090:399782),
|
|
3108
|
+
so it closes the price rather than separating it from the description. */
|
|
3109
|
+
${le.maxWidth("lg")} {
|
|
3110
|
+
order: 5;
|
|
3111
|
+
margin-top: 16px;
|
|
3112
|
+
}
|
|
3113
|
+
`,Kh=a(eo)`
|
|
3114
|
+
margin-bottom: 12px;
|
|
3115
|
+
`,Hh=a.div`
|
|
3116
|
+
margin-top: 16px;
|
|
3117
|
+
/* The design's Pricing frame stacks its rows 16px apart; without it the stock scale sat against the
|
|
3118
|
+
underside of the price and read as part of it. */
|
|
3119
|
+
display: flex;
|
|
3120
|
+
flex-direction: column;
|
|
3121
|
+
gap: 16px;
|
|
3122
|
+
|
|
3123
|
+
${le.maxWidth("lg")} {
|
|
3124
|
+
order: 4;
|
|
3125
|
+
margin-top: 16px;
|
|
3126
|
+
}
|
|
3127
|
+
`,Uh=a.div`
|
|
3128
|
+
display: flex;
|
|
3129
|
+
align-items: flex-start;
|
|
3130
|
+
gap: 16px;
|
|
3131
|
+
width: 100%;
|
|
3132
|
+
`,Qh=a.div`
|
|
3133
|
+
flex: 1 1 auto;
|
|
3134
|
+
min-width: 0;
|
|
3135
|
+
display: flex;
|
|
3136
|
+
flex-direction: column;
|
|
3137
|
+
gap: 8px;
|
|
3138
|
+
`,Da=a.div`
|
|
3139
|
+
flex: 0 0 auto;
|
|
3140
|
+
display: flex;
|
|
3141
|
+
flex-direction: column;
|
|
3142
|
+
align-items: flex-end;
|
|
3143
|
+
gap: 8px;
|
|
3144
|
+
text-align: right;
|
|
3145
|
+
`,An=a.div`
|
|
3146
|
+
font-size: 18px;
|
|
3147
|
+
font-weight: 500;
|
|
3148
|
+
line-height: 1;
|
|
3149
|
+
color: ${v.softWhite};
|
|
3150
|
+
|
|
3151
|
+
&[data-out] {
|
|
3152
|
+
font-size: 14px;
|
|
3153
|
+
font-weight: 600;
|
|
3154
|
+
text-transform: uppercase;
|
|
3155
|
+
letter-spacing: 0.02em;
|
|
3156
|
+
color: ${v.gray4};
|
|
3157
|
+
}
|
|
3158
|
+
`,Mn=a.div`
|
|
3159
|
+
font-size: 14px;
|
|
3160
|
+
font-weight: 600;
|
|
3161
|
+
text-transform: uppercase;
|
|
3162
|
+
letter-spacing: 0;
|
|
3163
|
+
color: ${v.muted2};
|
|
3164
|
+
`,St=a.div`
|
|
3165
|
+
display: flex;
|
|
3166
|
+
align-items: center;
|
|
3167
|
+
gap: 8px;
|
|
3168
|
+
font-weight: 700;
|
|
3169
|
+
color: ${v.softWhite};
|
|
3170
|
+
|
|
3171
|
+
/* Not for sale: "Not for Sale" + an info tooltip, 14px semibold, no PRICE label. */
|
|
3172
|
+
&[data-variant='none'] {
|
|
3173
|
+
display: inline-flex;
|
|
3174
|
+
align-items: center;
|
|
3175
|
+
gap: 6px;
|
|
3176
|
+
font-size: 14px;
|
|
3177
|
+
font-weight: 600;
|
|
3178
|
+
color: ${v.softWhite};
|
|
3179
|
+
}
|
|
3180
|
+
/*
|
|
3181
|
+
* White, not red. The tag above the title is what announces the discount; painting the number red too
|
|
3182
|
+
* said it a second time and left the price itself the least legible thing in its own row.
|
|
3183
|
+
*/
|
|
3184
|
+
&[data-variant='sale'] {
|
|
3185
|
+
flex-wrap: wrap;
|
|
3186
|
+
gap: 4px 8px;
|
|
3187
|
+
color: ${v.white};
|
|
3188
|
+
}
|
|
3189
|
+
`;a.span`
|
|
3190
|
+
display: flex;
|
|
3191
|
+
align-items: center;
|
|
3192
|
+
gap: 10px;
|
|
3193
|
+
font-weight: 700;
|
|
3194
|
+
color: ${v.dclRed};
|
|
3195
|
+
`;const At=a.span`
|
|
3196
|
+
font-size: 30px;
|
|
3197
|
+
line-height: 1;
|
|
3198
|
+
`,Gh=a.span`
|
|
3199
|
+
display: inline-flex;
|
|
3200
|
+
color: ${v.muted2};
|
|
3201
|
+
cursor: help;
|
|
3202
|
+
|
|
3203
|
+
&:focus-visible {
|
|
3204
|
+
outline: 2px solid ${v.accent};
|
|
3205
|
+
outline-offset: 2px;
|
|
3206
|
+
border-radius: ${Ye.chip};
|
|
3207
|
+
}
|
|
3208
|
+
`,_h=a.span`
|
|
3209
|
+
font-size: 24px;
|
|
3210
|
+
font-weight: 700;
|
|
3211
|
+
color: ${v.softWhite};
|
|
3212
|
+
margin-right: -2px;
|
|
3213
|
+
`,Vh=a.div`
|
|
3214
|
+
font-size: 13px;
|
|
3215
|
+
margin-top: 6px;
|
|
3216
|
+
color: ${v.gray4};
|
|
3217
|
+
`;a.div`
|
|
3218
|
+
flex-basis: 100%;
|
|
3219
|
+
display: flex;
|
|
3220
|
+
align-items: center;
|
|
3221
|
+
flex-wrap: wrap;
|
|
3222
|
+
gap: 8px 12px;
|
|
3223
|
+
`;const Jh=a.div`
|
|
3224
|
+
font-size: 13px;
|
|
3225
|
+
font-weight: 600;
|
|
3226
|
+
color: ${v.dclRed};
|
|
3227
|
+
`,Yh=a.span`
|
|
3228
|
+
display: inline-flex;
|
|
3229
|
+
align-items: center;
|
|
3230
|
+
color: ${v.muted2};
|
|
3231
|
+
text-decoration: line-through;
|
|
3232
|
+
font-weight: 400;
|
|
3233
|
+
font-size: 20px;
|
|
3234
|
+
`;a.span`
|
|
3235
|
+
display: inline-flex;
|
|
3236
|
+
align-items: center;
|
|
3237
|
+
background: ${v.dclRed};
|
|
3238
|
+
color: ${v.white};
|
|
3239
|
+
font-weight: 800;
|
|
3240
|
+
font-size: 13px;
|
|
3241
|
+
letter-spacing: 0.03em;
|
|
3242
|
+
text-transform: uppercase;
|
|
3243
|
+
border-radius: 6px;
|
|
3244
|
+
padding: 4px 10px;
|
|
3245
|
+
`;a(Go)`
|
|
3246
|
+
display: inline-flex;
|
|
3247
|
+
align-items: center;
|
|
3248
|
+
gap: 5px;
|
|
3249
|
+
background: ${v.rarityBg};
|
|
3250
|
+
color: ${v.accent};
|
|
3251
|
+
font-size: 13px;
|
|
3252
|
+
font-weight: 700;
|
|
3253
|
+
border-radius: 6px;
|
|
3254
|
+
padding: 4px 10px;
|
|
3255
|
+
white-space: nowrap;
|
|
3256
|
+
`;const Xh=a.div`
|
|
3257
|
+
display: flex;
|
|
3258
|
+
flex-direction: column;
|
|
3259
|
+
gap: 12px;
|
|
3260
|
+
margin-top: 20px;
|
|
3261
|
+
|
|
3262
|
+
${le.maxWidth("lg")} {
|
|
3263
|
+
order: 6;
|
|
3264
|
+
|
|
3265
|
+
&[data-buttons] {
|
|
3266
|
+
position: fixed;
|
|
3267
|
+
left: 0;
|
|
3268
|
+
right: 0;
|
|
3269
|
+
bottom: 0;
|
|
3270
|
+
z-index: 40;
|
|
3271
|
+
margin-top: 0;
|
|
3272
|
+
padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
|
|
3273
|
+
background: #2b0e44;
|
|
3274
|
+
box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
|
|
3275
|
+
}
|
|
3276
|
+
&[data-dual] {
|
|
3277
|
+
flex-direction: row;
|
|
3278
|
+
align-items: stretch;
|
|
3279
|
+
gap: 12px;
|
|
3280
|
+
}
|
|
3281
|
+
}
|
|
3282
|
+
`,an=wt`
|
|
3283
|
+
&& {
|
|
3284
|
+
width: 100%;
|
|
3285
|
+
height: 48px;
|
|
3286
|
+
border-radius: 16px;
|
|
3287
|
+
padding: 0 12px;
|
|
3288
|
+
display: flex;
|
|
3289
|
+
align-items: center;
|
|
3290
|
+
justify-content: center;
|
|
3291
|
+
gap: 8px;
|
|
3292
|
+
font-size: 15px;
|
|
3293
|
+
font-weight: 600;
|
|
3294
|
+
line-height: 24px;
|
|
3295
|
+
letter-spacing: 0.46px;
|
|
3296
|
+
text-transform: uppercase;
|
|
3297
|
+
}
|
|
3298
|
+
`,zn=a(Je)`
|
|
3299
|
+
${an};
|
|
3300
|
+
/* The design system's primary fill (Figma 867:61063 carries the "BUY Button" gradient), same as the
|
|
3301
|
+
cart's CHECKOUT and the credits CTA. This read as a flat #fb5c19 for a while — that colour was
|
|
3302
|
+
sampled off the flattened render rather than the node's fill. */
|
|
3303
|
+
&& {
|
|
3304
|
+
background: ${$h.buyBtn};
|
|
3305
|
+
}
|
|
3306
|
+
&&::before {
|
|
3307
|
+
content: none;
|
|
3308
|
+
}
|
|
3309
|
+
&&:hover:not(:disabled) {
|
|
3310
|
+
background-image: linear-gradient(${v.dclRed}, ${v.dclRed});
|
|
3311
|
+
}
|
|
3312
|
+
|
|
3313
|
+
${le.maxWidth("lg")} {
|
|
3314
|
+
[data-dual] && {
|
|
3315
|
+
flex: 1 1 auto;
|
|
3316
|
+
width: auto;
|
|
3317
|
+
}
|
|
3318
|
+
}
|
|
3319
|
+
`,Zh=a(Je)`
|
|
3320
|
+
${an};
|
|
3321
|
+
&& {
|
|
3322
|
+
background: ${v.blackBtn};
|
|
3323
|
+
color: ${v.softWhite};
|
|
3324
|
+
border: 0;
|
|
3325
|
+
|
|
3326
|
+
.ico {
|
|
3327
|
+
width: 20px;
|
|
3328
|
+
height: 20px;
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3331
|
+
&&:hover:not(:disabled) {
|
|
3332
|
+
background: ${v.blackBtn};
|
|
3333
|
+
filter: brightness(1.35);
|
|
3334
|
+
}
|
|
3335
|
+
`,Oa=a.button`
|
|
3336
|
+
align-self: center;
|
|
3337
|
+
border: 0;
|
|
3338
|
+
background: none;
|
|
3339
|
+
padding: 8px 0;
|
|
3340
|
+
color: ${n.colors.accent};
|
|
3341
|
+
font-weight: 600;
|
|
3342
|
+
font-size: 13px;
|
|
3343
|
+
line-height: 24px;
|
|
3344
|
+
letter-spacing: 0.46px;
|
|
3345
|
+
text-transform: uppercase;
|
|
3346
|
+
text-decoration: underline;
|
|
3347
|
+
cursor: pointer;
|
|
3348
|
+
|
|
3349
|
+
/* Opt-in for the uses that sit directly on the purple field, where the accent purple above is all
|
|
3350
|
+
but invisible against it. Not a change to the shared colour: the other uses live inside
|
|
3351
|
+
GaslessNotice, whose light fill is what that accent was picked for. */
|
|
3352
|
+
&[data-on-purple] {
|
|
3353
|
+
color: ${n.colors.white};
|
|
3354
|
+
}
|
|
3355
|
+
|
|
3356
|
+
&:disabled {
|
|
3357
|
+
opacity: 0.5;
|
|
3358
|
+
cursor: default;
|
|
3359
|
+
}
|
|
3360
|
+
`,ex=a(Je)`
|
|
3361
|
+
${an};
|
|
3362
|
+
&& {
|
|
3363
|
+
background: rgba(255, 255, 255, 0.2);
|
|
3364
|
+
color: ${v.softWhite};
|
|
3365
|
+
border: 0;
|
|
3366
|
+
|
|
3367
|
+
.ico {
|
|
3368
|
+
width: 20px;
|
|
3369
|
+
height: 20px;
|
|
3370
|
+
}
|
|
3371
|
+
}
|
|
3372
|
+
&&:hover:not(:disabled) {
|
|
3373
|
+
background: rgba(255, 255, 255, 0.3);
|
|
3374
|
+
}
|
|
3375
|
+
&&:disabled {
|
|
3376
|
+
opacity: 0.5;
|
|
3377
|
+
}
|
|
3378
|
+
`,qa=a(Je)`
|
|
3379
|
+
${an};
|
|
3380
|
+
&& {
|
|
3381
|
+
background: rgba(0, 0, 0, 0.4);
|
|
3382
|
+
color: ${v.white};
|
|
3383
|
+
border: 0;
|
|
3384
|
+
}
|
|
3385
|
+
&&:hover:not(:disabled) {
|
|
3386
|
+
background: rgba(0, 0, 0, 0.55);
|
|
3387
|
+
}
|
|
3388
|
+
&&:disabled {
|
|
3389
|
+
opacity: 0.5;
|
|
3390
|
+
}
|
|
3391
|
+
`,Rn=a.span`
|
|
3392
|
+
display: none;
|
|
3393
|
+
align-items: center;
|
|
3394
|
+
gap: 6px;
|
|
3395
|
+
|
|
3396
|
+
${le.maxWidth("lg")} {
|
|
3397
|
+
[data-dual] & {
|
|
3398
|
+
display: inline-flex;
|
|
3399
|
+
}
|
|
3400
|
+
}
|
|
3401
|
+
`,Ka=a.button`
|
|
3402
|
+
width: 100%;
|
|
3403
|
+
height: 48px;
|
|
3404
|
+
display: flex;
|
|
3405
|
+
align-items: center;
|
|
3406
|
+
justify-content: center;
|
|
3407
|
+
gap: 8px;
|
|
3408
|
+
/* Dark-theme test: translucent white pill, white label (Figma 867:61064) — same secondary
|
|
3409
|
+
treatment as the card's ADD TO CART. */
|
|
3410
|
+
background: rgba(255, 255, 255, 0.2);
|
|
3411
|
+
color: ${v.softWhite};
|
|
3412
|
+
border: 0;
|
|
3413
|
+
border-radius: 16px;
|
|
3414
|
+
font-weight: 600;
|
|
3415
|
+
font-size: 15px;
|
|
3416
|
+
text-transform: uppercase;
|
|
3417
|
+
letter-spacing: 0.46px;
|
|
3418
|
+
cursor: pointer;
|
|
3419
|
+
transition: background 0.15s ease;
|
|
3420
|
+
|
|
3421
|
+
&:hover:not(:disabled) {
|
|
3422
|
+
background: ${v.softWhite};
|
|
3423
|
+
color: ${v.text2};
|
|
3424
|
+
}
|
|
3425
|
+
&:disabled {
|
|
3426
|
+
background: rgba(255, 255, 255, 0.12);
|
|
3427
|
+
color: rgba(252, 252, 252, 0.7);
|
|
3428
|
+
cursor: default;
|
|
3429
|
+
}
|
|
3430
|
+
|
|
3431
|
+
${le.maxWidth("lg")} {
|
|
3432
|
+
[data-dual] & {
|
|
3433
|
+
flex: 0 0 auto;
|
|
3434
|
+
width: 56px;
|
|
3435
|
+
padding: 0;
|
|
3436
|
+
}
|
|
3437
|
+
[data-dual] & .ico {
|
|
3438
|
+
margin: 0;
|
|
3439
|
+
}
|
|
3440
|
+
}
|
|
3441
|
+
`,Ha=a.span`
|
|
3442
|
+
${le.maxWidth("lg")} {
|
|
3443
|
+
[data-dual] & {
|
|
3444
|
+
display: none;
|
|
3445
|
+
}
|
|
3446
|
+
}
|
|
3447
|
+
`,tx=a.p`
|
|
3448
|
+
margin: 12px 0 0;
|
|
3449
|
+
font-size: 13px;
|
|
3450
|
+
color: ${v.gray4};
|
|
3451
|
+
|
|
3452
|
+
& a {
|
|
3453
|
+
color: ${v.softWhite};
|
|
3454
|
+
font-weight: 600;
|
|
3455
|
+
}
|
|
3456
|
+
`;a.p`
|
|
3457
|
+
margin: 4px 0 0;
|
|
3458
|
+
font-size: 13px;
|
|
3459
|
+
color: ${v.gray4};
|
|
3460
|
+
|
|
3461
|
+
& a {
|
|
3462
|
+
color: ${v.accent};
|
|
3463
|
+
font-weight: 600;
|
|
3464
|
+
}
|
|
3465
|
+
`;const nx=a.div`
|
|
3466
|
+
max-width: 1721px;
|
|
3467
|
+
margin: 0 auto;
|
|
3468
|
+
min-height: 46vh;
|
|
3469
|
+
display: flex;
|
|
3470
|
+
flex-direction: column;
|
|
3471
|
+
align-items: center;
|
|
3472
|
+
justify-content: center;
|
|
3473
|
+
text-align: center;
|
|
3474
|
+
gap: 14px;
|
|
3475
|
+
color: ${v.softWhite};
|
|
3476
|
+
`,ix=a.p`
|
|
3477
|
+
margin: 0;
|
|
3478
|
+
color: ${v.gray4};
|
|
3479
|
+
`,ax=a(Je)`
|
|
3480
|
+
margin-top: 6px;
|
|
3481
|
+
`,rx=a(R)`
|
|
3482
|
+
opacity: 0.4;
|
|
3483
|
+
`,sx=a.h1`
|
|
3484
|
+
font-size: 22px;
|
|
3485
|
+
`,ox=a.div`
|
|
3486
|
+
display: flex;
|
|
3487
|
+
flex-direction: column;
|
|
3488
|
+
`,Ua=a.span`
|
|
3489
|
+
display: block;
|
|
3490
|
+
height: 15px;
|
|
3491
|
+
width: 84px;
|
|
3492
|
+
border-radius: 4px;
|
|
3493
|
+
`,lx=a.div`
|
|
3494
|
+
display: flex;
|
|
3495
|
+
flex-direction: column;
|
|
3496
|
+
align-self: stretch;
|
|
3497
|
+
gap: 16px;
|
|
3498
|
+
padding: 8px 0;
|
|
3499
|
+
`,dx=a.span`
|
|
3500
|
+
display: inline-flex;
|
|
3501
|
+
align-items: center;
|
|
3502
|
+
height: 48px;
|
|
3503
|
+
gap: 10px;
|
|
3504
|
+
background: none !important;
|
|
3505
|
+
|
|
3506
|
+
&::before,
|
|
3507
|
+
&::after {
|
|
3508
|
+
content: '';
|
|
3509
|
+
display: block;
|
|
3510
|
+
}
|
|
3511
|
+
&::before {
|
|
3512
|
+
width: 40px;
|
|
3513
|
+
height: 40px;
|
|
3514
|
+
border-radius: 50%;
|
|
3515
|
+
background: ${v.media};
|
|
3516
|
+
}
|
|
3517
|
+
&::after {
|
|
3518
|
+
width: 96px;
|
|
3519
|
+
height: 14px;
|
|
3520
|
+
border-radius: 6px;
|
|
3521
|
+
background: ${v.media};
|
|
3522
|
+
}
|
|
3523
|
+
`,cx=a.span`
|
|
3524
|
+
height: 34px;
|
|
3525
|
+
width: 70%;
|
|
3526
|
+
margin: 3px 0;
|
|
3527
|
+
border-radius: 8px;
|
|
3528
|
+
`,ux=a.div`
|
|
3529
|
+
display: flex;
|
|
3530
|
+
gap: 8px;
|
|
3531
|
+
/* Same as Chips above, so the row does not move when the real chips arrive. */
|
|
3532
|
+
margin-top: 12px;
|
|
3533
|
+
`,Ln=a.span`
|
|
3534
|
+
height: 24px;
|
|
3535
|
+
width: 88px;
|
|
3536
|
+
border-radius: 6px;
|
|
3537
|
+
`,Pn=a.span`
|
|
3538
|
+
height: 14px;
|
|
3539
|
+
width: 100%;
|
|
3540
|
+
border-radius: 6px;
|
|
3541
|
+
|
|
3542
|
+
&[data-short] {
|
|
3543
|
+
width: 55%;
|
|
3544
|
+
}
|
|
3545
|
+
`,px=a.span`
|
|
3546
|
+
display: block;
|
|
3547
|
+
height: 30px;
|
|
3548
|
+
width: 40%;
|
|
3549
|
+
margin: 16px 0 13px;
|
|
3550
|
+
border-radius: 8px;
|
|
3551
|
+
`,hx=a.span`
|
|
3552
|
+
display: block;
|
|
3553
|
+
height: 42px;
|
|
3554
|
+
width: 100%;
|
|
3555
|
+
border-radius: 8px;
|
|
3556
|
+
margin-top: 20px;
|
|
3557
|
+
`,Yt=a(ve)`
|
|
3558
|
+
width: 30px;
|
|
3559
|
+
height: 30px;
|
|
3560
|
+
color: ${v.softWhite};
|
|
3561
|
+
|
|
3562
|
+
&[data-was] {
|
|
3563
|
+
width: 20px;
|
|
3564
|
+
height: 20px;
|
|
3565
|
+
color: ${v.gray4};
|
|
3566
|
+
}
|
|
3567
|
+
`,En=a(ve)`
|
|
3568
|
+
width: 20px;
|
|
3569
|
+
height: 20px;
|
|
3570
|
+
`,xx=a.div`
|
|
3571
|
+
display: flex;
|
|
3572
|
+
align-items: center;
|
|
3573
|
+
justify-content: space-between;
|
|
3574
|
+
gap: 8px;
|
|
3575
|
+
padding: 8px;
|
|
3576
|
+
margin: 16px 0;
|
|
3577
|
+
border-radius: ${Ye.btn};
|
|
3578
|
+
background: rgba(22, 21, 24, 0.55);
|
|
3579
|
+
`,fx=a.span`
|
|
3580
|
+
display: flex;
|
|
3581
|
+
align-items: center;
|
|
3582
|
+
gap: 8px;
|
|
3583
|
+
font-size: 14px;
|
|
3584
|
+
line-height: 14px;
|
|
3585
|
+
color: ${v.softWhite};
|
|
3586
|
+
`,mx=a(R)`
|
|
3587
|
+
width: 20px;
|
|
3588
|
+
height: 20px;
|
|
3589
|
+
color: ${v.softWhite};
|
|
3590
|
+
`,gx=a(R)`
|
|
3591
|
+
width: 24px;
|
|
3592
|
+
height: 24px;
|
|
3593
|
+
color: ${v.white};
|
|
3594
|
+
`,bx=a.div`
|
|
3595
|
+
display: flex;
|
|
3596
|
+
align-items: center;
|
|
3597
|
+
justify-content: space-between;
|
|
3598
|
+
gap: 8px;
|
|
3599
|
+
width: 100%;
|
|
3600
|
+
margin-top: 16px;
|
|
3601
|
+
|
|
3602
|
+
&[data-centered] {
|
|
3603
|
+
justify-content: center;
|
|
3604
|
+
}
|
|
3605
|
+
`,yx=a.span`
|
|
3606
|
+
display: flex;
|
|
3607
|
+
align-items: center;
|
|
3608
|
+
gap: 2px;
|
|
3609
|
+
font-size: 14px;
|
|
3610
|
+
font-weight: 600;
|
|
3611
|
+
color: ${v.gray4};
|
|
3612
|
+
|
|
3613
|
+
& .ico {
|
|
3614
|
+
width: 20px;
|
|
3615
|
+
height: 20px;
|
|
3616
|
+
color: ${v.gray4};
|
|
3617
|
+
}
|
|
3618
|
+
`,wx=a.span`
|
|
3619
|
+
font-size: 16px;
|
|
3620
|
+
font-weight: 700;
|
|
3621
|
+
padding-left: 2px;
|
|
3622
|
+
`,Wn=a.button`
|
|
3623
|
+
border: 0;
|
|
3624
|
+
background: none;
|
|
3625
|
+
padding: 0;
|
|
3626
|
+
cursor: pointer;
|
|
3627
|
+
font-family: ${kh.sans};
|
|
3628
|
+
font-size: 13px;
|
|
3629
|
+
font-weight: 600;
|
|
3630
|
+
letter-spacing: 0.46px;
|
|
3631
|
+
text-transform: uppercase;
|
|
3632
|
+
text-decoration: underline;
|
|
3633
|
+
color: ${v.softWhite};
|
|
3634
|
+
|
|
3635
|
+
&:hover {
|
|
3636
|
+
color: ${v.gray4};
|
|
3637
|
+
}
|
|
3638
|
+
&:focus-visible {
|
|
3639
|
+
outline: 2px solid ${v.white};
|
|
3640
|
+
outline-offset: 2px;
|
|
3641
|
+
border-radius: ${Ye.chip};
|
|
3642
|
+
}
|
|
3643
|
+
`,vx=a(Wn)`
|
|
3644
|
+
width: 100%;
|
|
3645
|
+
height: 40px;
|
|
3646
|
+
text-align: center;
|
|
3647
|
+
border-radius: ${Ye.card};
|
|
3648
|
+
|
|
3649
|
+
/* Hover is a translucent fill with the label left alone (Figma 868:67246), not the colour shift
|
|
3650
|
+
ResellersLink uses. That one is an inline link sitting beside a price, where dimming the text is the
|
|
3651
|
+
only surface there is; this is a full-width button, so the button itself is what should react. */
|
|
3652
|
+
&:hover {
|
|
3653
|
+
color: ${v.softWhite};
|
|
3654
|
+
background: ${v.glass};
|
|
3655
|
+
}
|
|
3656
|
+
`,jx=a.div`
|
|
3657
|
+
display: flex;
|
|
3658
|
+
flex-direction: column;
|
|
3659
|
+
gap: 16px;
|
|
3660
|
+
width: 100%;
|
|
3661
|
+
padding: 16px 0;
|
|
3662
|
+
`,Qa=a.div`
|
|
3663
|
+
display: flex;
|
|
3664
|
+
align-items: center;
|
|
3665
|
+
justify-content: space-between;
|
|
3666
|
+
gap: 8px;
|
|
3667
|
+
width: 100%;
|
|
3668
|
+
|
|
3669
|
+
&[data-variant='original'] {
|
|
3670
|
+
color: ${v.muted2};
|
|
3671
|
+
}
|
|
3672
|
+
`,Ga=a.span`
|
|
3673
|
+
display: flex;
|
|
3674
|
+
align-items: center;
|
|
3675
|
+
gap: 4px;
|
|
3676
|
+
font-size: 14px;
|
|
3677
|
+
font-weight: 600;
|
|
3678
|
+
|
|
3679
|
+
[data-variant='original'] & {
|
|
3680
|
+
color: ${v.muted2};
|
|
3681
|
+
}
|
|
3682
|
+
[data-variant='resale'] & {
|
|
3683
|
+
color: ${v.text};
|
|
3684
|
+
}
|
|
3685
|
+
`,_a=a.span`
|
|
3686
|
+
display: flex;
|
|
3687
|
+
align-items: center;
|
|
3688
|
+
gap: 2px;
|
|
3689
|
+
padding: 0 2px;
|
|
3690
|
+
|
|
3691
|
+
[data-variant='original'] & .ico {
|
|
3692
|
+
width: 20px;
|
|
3693
|
+
height: 20px;
|
|
3694
|
+
color: ${v.muted2};
|
|
3695
|
+
}
|
|
3696
|
+
[data-variant='resale'] & .ico {
|
|
3697
|
+
width: 24px;
|
|
3698
|
+
height: 24px;
|
|
3699
|
+
color: ${v.rarity};
|
|
3700
|
+
}
|
|
3701
|
+
`,Va=a.span`
|
|
3702
|
+
[data-variant='original'] & {
|
|
3703
|
+
font-size: 16px;
|
|
3704
|
+
font-weight: 700;
|
|
3705
|
+
text-decoration: line-through;
|
|
3706
|
+
}
|
|
3707
|
+
[data-variant='resale'] & {
|
|
3708
|
+
font-size: 25px;
|
|
3709
|
+
font-weight: 700;
|
|
3710
|
+
color: ${v.text};
|
|
3711
|
+
}
|
|
3712
|
+
`,kx=a.span`
|
|
3713
|
+
font-size: 14px;
|
|
3714
|
+
font-weight: 600;
|
|
3715
|
+
|
|
3716
|
+
[data-variant='original'] & {
|
|
3717
|
+
color: ${v.muted2};
|
|
3718
|
+
}
|
|
3719
|
+
`,$x=a.span`
|
|
3720
|
+
font-size: 14px;
|
|
3721
|
+
font-weight: 600;
|
|
3722
|
+
color: ${v.text2};
|
|
3723
|
+
`,Ja=a.span`
|
|
3724
|
+
display: inline-flex;
|
|
3725
|
+
width: 12px;
|
|
3726
|
+
height: 12px;
|
|
3727
|
+
color: ${v.muted2};
|
|
3728
|
+
`,Cx=a.div`
|
|
3729
|
+
display: flex;
|
|
3730
|
+
flex-direction: column;
|
|
3731
|
+
gap: 12px;
|
|
3732
|
+
width: 100%;
|
|
3733
|
+
`,Ix=a.div`
|
|
3734
|
+
display: flex;
|
|
3735
|
+
justify-content: center;
|
|
3736
|
+
`,rn=wt`
|
|
3737
|
+
display: block;
|
|
3738
|
+
background: linear-gradient(100deg, var(--skeleton-lo) 30%, var(--skeleton-hi) 50%, var(--skeleton-lo) 70%);
|
|
3739
|
+
background-size: 200% 100%;
|
|
3740
|
+
animation: shimmer 1.4s infinite linear;
|
|
3741
|
+
|
|
3742
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3743
|
+
animation: none;
|
|
3744
|
+
}
|
|
3745
|
+
`,Sx=a.div`
|
|
3746
|
+
display: flex;
|
|
3747
|
+
flex-direction: column;
|
|
3748
|
+
gap: 12px;
|
|
3749
|
+
width: 100%;
|
|
3750
|
+
/* Reserve the divider→CTA rhythm so the block is the same height loading vs loaded. */
|
|
3751
|
+
padding-top: 4px;
|
|
3752
|
+
`,Ax=a.span`
|
|
3753
|
+
${rn};
|
|
3754
|
+
width: 120px;
|
|
3755
|
+
height: 30px;
|
|
3756
|
+
border-radius: ${Ye.btn};
|
|
3757
|
+
margin-bottom: 4px;
|
|
3758
|
+
`,Ya=a.span`
|
|
3759
|
+
${rn};
|
|
3760
|
+
width: 100%;
|
|
3761
|
+
height: 48px;
|
|
3762
|
+
border-radius: 16px;
|
|
3763
|
+
`,Xa=a.div`
|
|
3764
|
+
display: flex;
|
|
3765
|
+
align-items: center;
|
|
3766
|
+
gap: 12px;
|
|
3767
|
+
`,Za=a.span`
|
|
3768
|
+
${rn};
|
|
3769
|
+
flex: none;
|
|
3770
|
+
width: 48px;
|
|
3771
|
+
height: 48px;
|
|
3772
|
+
border-radius: 50%;
|
|
3773
|
+
`,er=a.span`
|
|
3774
|
+
${rn};
|
|
3775
|
+
width: 96px;
|
|
3776
|
+
height: 16px;
|
|
3777
|
+
border-radius: 6px;
|
|
3778
|
+
`;function Mx(t){return Object.values(Ae.Rarity).includes(t)}function zx(t){return t==="male"?i("itemDetail.genderMale"):t==="female"?i("itemDetail.genderFemale"):t==="unisex"?i("itemDetail.genderUnisex"):null}function Xt(t){return t.wearableCategory?t.wearableCategory.replace(/_/g," "):t.category==="emote"?i("itemDetail.categoryEmote"):i("itemDetail.categoryWearable")}const tr=8;function df(){const{pathname:t}=ir();return e.jsx(Rx,{},t)}function Rx(){var Ci,Ii,Si;const{contractAddress:t,itemId:s,tokenId:l}=hs(),o=hn(t),d=np(o),u=hn(s),x=hn(l),m=!!x,b=u??hd(x)??null,$=ir(),h=$.state,g=dt(),y=!!(h!=null&&h.market),j=(h==null?void 0:h.marketPriceCredits)??null,I=ct(),C=zt(p=>p.add),S=zt(p=>p.items),N=no(p=>p.toggle),{session:f,signIn:W}=lt(),[r,E]=c.useState(()=>{if(h!=null&&h.item){const p={...h.item,tradeId:h.tradeId??h.item.tradeId};return m?{...p,tokenId:x,itemId:p.itemId??b}:{...p,tokenId:void 0,itemId:u??p.itemId}}return{id:`${o}-${x??u}`,name:"",creator:"",contractAddress:o??"",itemId:b,category:"wearable",rarity:"common",network:"MATIC",chainId:ot.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:x??void 0,tradeId:h==null?void 0:h.tradeId}}),[Y,K]=c.useState(!1),[A,z]=c.useState(!!(h!=null&&h.resumeBuy));c.useEffect(()=>{h!=null&&h.resumeBuy&&K(!0)},[h==null?void 0:h.resumeBuy]);function H(){const p=r.priceCredits>0?r.priceCredits:null;X("Shop Started Checkout",{checkout_source:"item_page",cart_size:1,cart_value_credits:p,cart_value_usd:p===null?null:vo(p)}),K(!0)}function _(){if(f){H();return}y||Oo({type:"item-buy",path:$.pathname}),W()}const ne=c.useRef(!1);c.useEffect(()=>{if(!f||ne.current)return;const p=Wo("item-buy");!p||p.path!==$.pathname||(ne.current=!0,z(!0),H())},[f]);const de=c.useMemo(()=>r.contractAddress&&(r.itemId??b)?[`${r.contractAddress.toLowerCase()}-${r.itemId??b}`]:void 0,[r.contractAddress,r.itemId,b]),ee=io(tr,{exclude:de}),V=ao({enabled:ee.enabled,hasSignal:ee.hasSignal,isLoading:ee.isLoading,isError:ee.isError,personalized:(Ci=ee.result)==null?void 0:Ci.personalized,rowCount:((Ii=ee.result)==null?void 0:Ii.data.length)??0}),{items:D,isCollectionOnly:q,siblings:w,siblingsFetched:fe}=tp({id:r.id,contractAddress:r.contractAddress,itemId:r.itemId??b,tokenId:r.tokenId,creator:r.creator}),{data:L,isLoading:F}=te({queryKey:["shop-item",r.contractAddress,b],enabled:!y&&!m&&!!r.contractAddress&&!!b,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>ko(r.contractAddress,b)}),M=m?void 0:L;c.useEffect(()=>{M&&E(p=>p.tradeId?{...p,tradeId:M.tradeId,priceCredits:M.priceCredits,manaWei:M.manaWei,available:M.available??p.available,acquisition:M.acquisition,wearableCategory:p.wearableCategory??M.wearableCategory}:{...p,...M})},[M]);const[se,ie]=c.useState(!1),{data:xe=""}=te({queryKey:["item-desc",r.contractAddress,r.itemId],enabled:!!r.contractAddress&&!!r.itemId,staleTime:5*6e4,queryFn:()=>$o(r.contractAddress,r.itemId)}),{data:U,isLoading:oe}=te({queryKey:["collection-meta",r.contractAddress],enabled:!!r.contractAddress,staleTime:5*6e4,queryFn:()=>lr(r.contractAddress)});c.useEffect(()=>{const p=(M==null?void 0:M.creator)||(U==null?void 0:U.creator);p&&E(re=>re.creator?re:{...re,creator:p})},[M,U]);const Z=c.useMemo(()=>{if(!(m||r.name||M||w.length===0))return(b?w.find(p=>p.itemId===b):void 0)??w.find(p=>p.contractAddress===r.contractAddress)},[m,r.name,r.contractAddress,M,w,b]);c.useEffect(()=>{Z&&E(p=>({...Z,tradeId:p.tradeId??Z.tradeId}))},[Z]);const{data:Ie,isLoading:ce}=te({queryKey:["detail-trade",r.id,r.tradeId,r.contractAddress,r.itemId],enabled:!!r.contractAddress,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:async()=>{if(r.tradeId)return r.tradeId;if(!m&&r.itemId){const p=await Co(r.contractAddress,r.itemId);return(p==null?void 0:p.id)??null}return null}}),{data:J}=te({queryKey:["item-traits",r.contractAddress,b],enabled:!!r.contractAddress&&!!b,staleTime:5*6e4,retry:1,queryFn:()=>Io(r.contractAddress,b)}),Fe=(J==null?void 0:J.isSmart)??r.isSmart,qe=(J==null?void 0:J.utility)??null,be=c.useMemo(()=>({...r,wearableCategory:r.wearableCategory??(J==null?void 0:J.wearableCategory)??void 0,gender:r.gender??(J==null?void 0:J.gender)??null}),[r,J==null?void 0:J.wearableCategory,J==null?void 0:J.gender]),Xe=(J==null?void 0:J.urn)??null,{data:sn}=te({queryKey:["item-vrm",Xe],enabled:!!Xe&&r.category==="wearable",staleTime:30*6e4,retry:!1,queryFn:()=>So(Xe)}),[Lt,Pt]=c.useState(!1),{data:vt}=te({queryKey:["item-video",r.contractAddress,b],enabled:Fe&&!!r.contractAddress&&!!b,staleTime:30*6e4,retry:!1,queryFn:()=>Vo(r.contractAddress,b)}),Ze=c.useMemo(()=>r.emoteLoop!==void 0?r:(b?w.find(re=>re.itemId===b):void 0)??r,[r,w,b]),ke=Ki(I,r.tradeId)??Ki(I,Ie),ut=r.acquisition==="store"&&(r.available??0)>0,me=!!ke||ut,Be=ro(),{data:Ke=[]}=te({queryKey:["item-resales",r.contractAddress,r.itemId],enabled:Be&&!y&&!!r.contractAddress&&!!r.itemId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>hr(r.contractAddress,r.itemId)}),He=Ke.length>0?Ke[0].priceCredits:null,Ne=m&&r.tokenId?Ke.find(p=>p.tokenId===r.tokenId)??null:null,Se=c.useMemo(()=>{const p=Ke[0];return p?{...p,name:p.name||r.name,thumbnail:p.thumbnail||r.thumbnail,rarity:p.rarity||r.rarity,category:p.category||r.category,wearableCategory:p.wearableCategory??r.wearableCategory,gender:p.gender??r.gender}:null},[Ke,r]),[jt,Et]=c.useState(null),[Tt,et]=c.useState(!1),[kt,Ft]=c.useState(!1),[k,P]=c.useState(!1),T=r.manaWei??null,{data:B}=pr(y||!!T),G=T&&B?so(T,B):null;c.useEffect(()=>{G!=null&&E(p=>p.priceCredits===G?p:{...p,priceCredits:G})},[G,r.priceCredits]);const ae=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]),Q=y&&j!=null&&!!B&&!!ae,ue=oo({priceCredits:r.priceCredits,compareAtCredits:r.compareAtCredits,saleEndsAt:r.saleEndsAt}),$e=(()=>{var je,ht,Ai;if(!ue)return null;const p=((je=r.coupon)==null?void 0:je.used)??0,re=Number(((Ai=(ht=r.coupon)==null?void 0:ht.checks)==null?void 0:Ai.uses)??0);return re>0&&p<=re?{claimed:p,total:re}:null})(),We=(()=>{if(!ue||r.saleUnitsLeft==null)return null;const p=$e?$e.total-$e.claimed:1/0;return r.saleUnitsLeft<p?r.saleUnitsLeft:null})(),tt=c.useMemo(()=>({...r,tradeId:ke,id:ke??r.id}),[r,ke]),Ue=S.some(p=>p.id===tt.id),Bt=!tt.tokenId,Jr=((Si=S.find(p=>p.id===tt.id))==null?void 0:Si.quantity)??0,on=Bt&&typeof r.available=="number"&&Jr>=r.available,{key:Un,faved:nt}=lo(r),Qe=co(r),Yr=ur(p=>p.locale),Nt=Qe===void 0?null:Qe.toLocaleString(Yr),Qn=nt?i("assetCard.removeFromFavorites"):i("assetCard.addToFavorites"),Gn=Qe===void 0?Qn:i("itemDetail.favoriteAria",{action:Qn,count:Qe}),_n=c.useRef(null);c.useEffect(()=>{!r.name||ce||_n.current===r.id||(_n.current=r.id,X("Shop Viewed Item",{...uo(r),for_sale:me}),po(r))},[r.id,r.name,ce,me]);const Wt=`${o}/${x??u}`,Vn=c.useRef(Wt);c.useEffect(()=>{if(Vn.current!==Wt){if(Vn.current=Wt,h!=null&&h.item){const p={...h.item,tradeId:h.tradeId??h.item.tradeId};E(m?{...p,tokenId:x,itemId:p.itemId??b}:{...p,tokenId:void 0,itemId:u??p.itemId})}typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}},[Wt]);function Xr(){!me||ln||ce||!Bt&&Ue||on||C(tt,"item_detail")}const it=Mx(r.rarity)?r.rarity:Ae.Rarity.COMMON,Jn=zx(be.gender),Dt=ho(be),Yn=xo(be.gender),Xn=bh(r.rarity),Zn=yh(be),ei=me&&ue,Zr=q?i("itemDetail.moreFromCollection"):i("itemDetail.youMightAlsoLike"),ln=fo(r,f==null?void 0:f.address),[es,ti]=c.useState(!1),[ts,ni]=c.useState(!1),[ns,ii]=c.useState(!1),[is,ai]=c.useState(!1),[$t,Ct]=c.useState(null),[as,ri]=c.useState(!1),[si,oi]=c.useState(!1),li=Zt(f==null?void 0:f.providerType),{data:O,isLoading:Ot}=te({queryKey:["owned-token",r.contractAddress,r.tokenId,f==null?void 0:f.address],enabled:!y&&!!(f!=null&&f.address)&&!!r.contractAddress&&!!r.tokenId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>f?Pi(f.address,r.contractAddress,r.tokenId):null});c.useEffect(()=>{O&&E(p=>p.name?{...p,issuedId:p.issuedId??O.issuedId,priceCredits:O.listingPrice??0,tradeId:O.tradeId}:{id:O.id,name:O.name,creator:"",contractAddress:O.contractAddress,itemId:O.itemId,category:O.category,rarity:O.rarity??"common",network:O.network,chainId:O.chainId,thumbnail:O.image,priceCredits:O.listingPrice??0,gender:null,isSmart:!1,tokenId:O.tokenId,issuedId:O.issuedId,tradeId:O.tradeId})},[O]),c.useEffect(()=>{Ne&&E(p=>p.priceCredits===Ne.priceCredits&&p.tradeId?p:{...p,priceCredits:Ne.priceCredits,tradeId:p.tradeId??Ne.tradeId})},[Ne]),c.useEffect(()=>{$t!=null&&O!=null&&O.isOnSale&&O.listingPrice===$t&&Ct(null)},[O,$t]);const di=!y&&!!r.contractAddress&&!!r.tokenId&&!r.name&&!M&&!Ot&&!O,{data:he,isFetched:rs}=te({queryKey:["public-token",r.contractAddress,r.tokenId],enabled:di,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Ao(r.contractAddress,r.tokenId)});c.useEffect(()=>{he&&E(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:Re}=te({queryKey:["publishable-item",r.contractAddress,r.itemId,f==null?void 0:f.address],enabled:ln&&!!f&&!!r.itemId,queryFn:async()=>f?(await Jo(f.address,f.identity)).find(re=>re.contractAddress.toLowerCase()===r.contractAddress.toLowerCase()&&re.blockchainItemId===r.itemId)??null:null}),Le=m&&!!O,dn=!m&&ln,Pe=!y&&(dn||Le),ci=$t!=null?!0:Le?!!(O!=null&&O.isOnSale):me,qt=Le?O==null?void 0:O.tradeId:ke,ui=Le?!!O:!!Re,pi=dn||Le&&Be,cn=$t??(Le?(O==null?void 0:O.listingPrice)??0:0),{data:hi=0}=te({queryKey:["owned-item-count",r.contractAddress,u,f==null?void 0:f.address],enabled:!m&&!y&&!!(f!=null&&f.address)&&!!r.contractAddress&&!!u,staleTime:3e4,queryFn:()=>f?Mo(f.address,r.contractAddress,u):0});async function at(){await Promise.all([I.invalidateQueries({queryKey:["owned-token",r.contractAddress,r.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",r.contractAddress,r.itemId]}),I.invalidateQueries({queryKey:["item-resales",r.contractAddress,r.itemId]})])}async function ss(p){if(!f||!qt)throw new Error("No listing to take down");const re=await cr(qt);await Ho({trade:re,signer:f.signer,mode:p.payGas?"direct":"gasless-only",watch:{isCancelled:async()=>{try{if(Le){if(!r.tokenId)return!1;const je=await Pi(f.address,r.contractAddress,r.tokenId);return je!==null&&!je.isOnSale}return r.itemId?await jo(r.contractAddress,r.itemId)===null:!1}catch{return!1}},onWaiting:p.onWaiting}}),p.silent||Rt.success(i("myAssets.removedFromSale",{name:r.name})),Ct(null),xd(I,qt),E(je=>je.tradeId===qt?{...je,tradeId:void 0}:je),at(),xn(I,{address:f.address,contractAddress:r.contractAddress,tokenId:r.tokenId},{kind:"removed"})}const xi=p=>async({payGas:re,onWaiting:je})=>{try{return await ss({silent:p,payGas:re,onWaiting:je}),"ok"}catch(ht){if(ht instanceof Ko)return ht.definitive?"relay-reverted":"relay-pending";throw ht}},fi={currentCredits:cn||r.priceCredits||void 0,canPayGas:li,cancelCurrent:xi(!0)};function mi({edit:p=!1}={}){p||X("Shop Started Listing",{listing_type:Le?"secondary":"primary",item_id:r.itemId??r.tokenId??null}),oi(p),Le?ti(!0):ni(!0)}function gi(){ti(!1),ni(!1),oi(!1),at()}const bi=me?ce?i("itemDetail.checking"):on?i("itemDetail.maxInCart"):!Bt&&Ue?i("assetCard.inCart"):i("assetCard.addToCart"):i("itemDetail.notForSale"),It=r.available??(J==null?void 0:J.available)??null,os=typeof It=="number"&&It>0&&!r.tokenId&&!y,yi=!y&&!r.tokenId&&It===0,wi=r.network==="ETHEREUM",pt=yi&&!Pe&&!!Se,Kt=!!Se&&S.some(p=>p.id===Se.id),ls=!Pe&&me&&!y,ds=y||!Pe&&(me||pt&&!!Se||qr()),cs=!r.name&&(!!M||!!O||!!he||!!Z),vi=F||!!r.contractAddress&&!fe||!r.name&&Ot||cs||di&&!rs,ji=!r.name&&!vi,us=!!r.name&&fd({isMarket:y,forSale:me,priceKnown:r.priceCredits>0&&(!T||G!=null)||Pe,stillResolving:vi||!!T&&G==null,manage:Pe,soldOutWithResale:pt,resolvingTrade:ce,isTokenRoute:m,ownedAssetLoading:Ot,deepLinkLoading:F}),ki=!r.creator&&(F||oe||Ot),$i=!(U!=null&&U.name)&&oe,ps=/^https?:\/\//i.test(r.thumbnail);return mo(ji?{title:i("seo.item.notFoundTitle"),noindex:!0}:r.name?{title:r.name,description:xe||i("seo.item.fallbackDescription",{name:r.name,rarity:r.rarity,category:Xt(be),creator:Dn(r.creator)}),image:ps?r.thumbnail:void 0,type:"product"}:{}),ji?e.jsxs(nx,{"data-notfound":!0,children:[e.jsx(rx,{name:"cart"}),e.jsx(sx,{children:i("itemDetail.notAvailableTitle")}),e.jsx(ix,{children:i("itemDetail.notAvailableBody")}),e.jsx(ax,{variant:"white",onClick:()=>g("/items"),children:i("notFound.cta")})]}):e.jsxs(Ch,{children:[e.jsxs(Ih,{"aria-label":i("itemDetail.breadcrumbAria"),children:[e.jsx(Sh,{onClick:()=>g("/items"),children:i("nav.collectibles")}),e.jsx(Ah,{children:"/"}),e.jsx(Mh,{children:r.name||i("itemDetail.itemFallback")})]}),e.jsxs(zh,{style:{"--glow-rgb":yo(it),"--glow-core":bo(it)},children:[e.jsxs(Rh,{"data-testid":"item-preview",children:[r.name?e.jsx(lp,{item:r}):e.jsx(Lh,{"aria-busy":"true","aria-label":i("itemPreview.loading"),children:e.jsx(Ph,{className:"skeleton","aria-hidden":!0})}),Un?e.jsxs(Ba,{"data-fav-preview":!0,"data-on":nt||void 0,"data-count":Nt??void 0,onClick:()=>N(r,"item_detail"),"aria-pressed":nt,"aria-label":Gn,children:[e.jsx(R,{name:nt?"heart-solid":"heart",size:18}),Qe!==void 0?e.jsx(Na,{title:i("itemDetail.savedCount",{count:Qe}),"data-testid":"fav-count-preview",children:Nt}):null]}):null,vt?e.jsxs(Bh,{"data-play-showcase":!0,onClick:()=>Pt(!0),"data-testid":"play-showcase",children:[e.jsx(R,{name:"play",size:18}),i("itemDetail.playShowcase")]}):null]}),e.jsx(Eh,{"data-testid":"item-info",children:r.name?e.jsxs(e.Fragment,{children:[ei&&r.compareAtCredits!=null?e.jsx(Kh,{pct:go(r.compareAtCredits,r.priceCredits),size:"lg",testId:"detail-sale-badge"}):null,e.jsxs(Th,{children:[e.jsxs(Fh,{children:[r.name,m&&r.issuedId?` #${r.issuedId}`:""]}),Un?e.jsxs(Ba,{"data-fav-title":!0,"data-on":nt||void 0,"data-count":Nt??void 0,onClick:()=>N(r,"item_detail"),"aria-pressed":nt,"aria-label":Gn,children:[e.jsx(R,{name:nt?"heart-solid":"heart",size:18}),Qe!==void 0?e.jsx(Na,{title:i("itemDetail.savedCount",{count:Qe}),"data-testid":"fav-count",children:Nt}):null]}):null]}),e.jsxs(Nh,{children:[Xn?e.jsx(Gt,{content:Li(r.rarity),children:e.jsx(Jt,{to:Xn,"data-variant":"rarity","data-testid":"detail-rarity-link",style:{background:Ri(it)},children:r.rarity})}):e.jsx(Gt,{content:Li(r.rarity),children:e.jsx(Ee,{"data-variant":"rarity",style:{background:Ri(it)},children:r.rarity})}),Zn?e.jsxs(Jt,{to:Zn,"data-testid":"detail-category-link",title:i("filter.browseByCategory",{category:Xt(be)}),children:[Dt?e.jsx(R,{name:Dt,size:18}):null,Xt(be)]}):e.jsxs(Ee,{children:[Dt?e.jsx(R,{name:Dt,size:18}):null,Xt(be)]}),Jn?e.jsxs(Ee,{children:[Yn?e.jsx(R,{name:Yn,size:18}):null,Jn]}):null,!m&&r.issuedId?e.jsxs(Ee,{"data-testid":"detail-issued",children:["#",r.issuedId]}):null,d?e.jsxs(Jt,{to:"/event","data-testid":"detail-event",title:d,children:[e.jsx(R,{name:"star-rounded",size:18}),d]}):null,Fe?e.jsxs(Jt,{to:wh(),"data-testid":"detail-smart",title:i("filter.browseBySmart"),children:[e.jsx(R,{name:"smart",size:18}),i("itemDetail.smart")]}):null,Ze.emoteLoop!==void 0?e.jsxs(Ee,{"data-testid":"detail-play-mode",children:[e.jsx(R,{name:Ze.emoteLoop?"play-loop":"play-once",size:18}),Ze.emoteLoop?i("itemDetail.playLoop"):i("itemDetail.playOnce")]}):null,Ze.emoteHasSound?e.jsxs(Ee,{"data-testid":"detail-sound",children:[e.jsx(R,{name:"sound",size:18}),i("itemDetail.emoteSound")]}):null,Ze.emoteHasProps?e.jsxs(Ee,{"data-testid":"detail-props",children:[e.jsx(R,{name:"props",size:18}),i("itemDetail.emoteProps")]}):null,sn?e.jsx(Gt,{content:i("itemDetail.exportBlockedTooltip"),children:e.jsxs(Ee,{"data-variant":"blocked","data-testid":"detail-export-blocked",tabIndex:0,"aria-label":i("itemDetail.exportBlockedTooltip"),children:[e.jsx(R,{name:"ban",size:16}),i("itemDetail.exportBlocked")]})}):null,qe?e.jsxs(Ee,{"data-testid":"detail-utility-chip",children:[e.jsx(R,{name:"utility",size:18}),i("itemDetail.utility")]}):null]}),xe||qe?e.jsxs(Qr,{children:[xe?e.jsx(Nn,{children:e.jsxs(Bn,{children:[e.jsx(ft,{children:i("itemDetail.description")}),e.jsx(Wa,{"data-expanded":se||void 0,children:xe}),xe.length>140?e.jsx(Dh,{className:"link",onClick:()=>ie(p=>!p),children:se?i("itemDetail.showLess"):i("itemDetail.readMore")}):null]})}):null,qe?e.jsx(Nn,{children:e.jsxs(Bn,{"data-testid":"detail-utility",children:[e.jsx(ft,{children:i("itemDetail.utility")}),e.jsx(Wa,{"data-expanded":!0,children:qe})]})}):null]}):null,!wi&&(r.creator||ki)||U!=null&&U.name||$i?e.jsxs(Gr,{children:[wi?null:r.creator?e.jsxs(Mt,{children:[e.jsx(ft,{children:i("itemDetail.creator")}),e.jsx(Oh,{address:r.creator,linkToProfile:!0,hidePrefix:!0})]}):ki?e.jsxs(Mt,{children:[e.jsx(ft,{children:i("itemDetail.creator")}),e.jsxs(Xa,{"aria-hidden":!0,"data-testid":"creator-loading",children:[e.jsx(Za,{}),e.jsx(er,{})]})]}):null,U!=null&&U.name?e.jsxs(Mt,{"data-collection":!0,children:[e.jsx(ft,{children:i("itemDetail.collection")}),e.jsx(qh,{contractAddress:r.contractAddress,name:U.name,items:w})]}):$i?e.jsxs(Mt,{"data-collection":!0,children:[e.jsx(ft,{children:i("itemDetail.collection")}),e.jsxs(Xa,{"aria-hidden":!0,"data-testid":"collection-loading",children:[e.jsx(Za,{}),e.jsx(er,{})]})]}):null]}):null,e.jsx(Vr,{}),us?e.jsxs(Sx,{"aria-hidden":!0,"data-testid":"sale-loading",children:[e.jsx(Ax,{}),e.jsx(Ya,{}),e.jsx(Ya,{})]}):e.jsxs(e.Fragment,{children:[Be&&!Pe&&!y&&me&&!r.tokenId?e.jsxs(xx,{"data-testid":"buy-from-creator",children:[e.jsxs(fx,{children:[e.jsx(mx,{name:"buy-from-creator"}),i("itemDetail.buyFromCreator")]}),e.jsx(gx,{name:"check-rounded"})]}):null,pt?e.jsxs(jx,{"data-testid":"sold-out",children:[e.jsxs(Qa,{"data-variant":"original",children:[e.jsxs(Ga,{children:[i("itemDetail.originalPrice"),e.jsxs(_a,{children:[e.jsx(ve,{className:"ico"}),e.jsx(Va,{children:e.jsx(ye,{credits:r.priceCredits})})]}),e.jsx(Ja,{"aria-hidden":!0,children:e.jsx(R,{name:"info",size:12})})]}),e.jsx(kx,{"data-testid":"out-of-stock",children:i("itemDetail.soldOut")})]}),e.jsxs(Qa,{"data-variant":"resale",children:[e.jsxs(Ga,{children:[i("itemDetail.resalePrice"),e.jsxs(_a,{children:[e.jsx(ve,{className:"ico"}),e.jsx(Va,{children:e.jsx(ye,{credits:He})})]}),e.jsx(Ja,{"aria-hidden":!0,children:e.jsx(R,{name:"info",size:12})})]}),e.jsxs($x,{children:[i("itemDetail.stock")," ",Ke.length,"/",Ae.Rarity.getMaxSupply(it).toLocaleString()]})]})]}):e.jsxs(Hh,{children:[e.jsxs(Uh,{children:[e.jsxs(Qh,{children:[y||me?e.jsx(Mn,{children:i("itemDetail.price")}):null,y?e.jsxs(e.Fragment,{children:[e.jsx(St,{"data-variant":"market","data-testid":"item-price",children:j==null?e.jsx(At,{children:"—"}):e.jsxs(e.Fragment,{children:[e.jsx(_h,{"aria-hidden":!0,children:"≈"}),e.jsx(Yt,{}),e.jsx(At,{children:e.jsx(ye,{credits:j})})]})}),e.jsx(Vh,{children:i("assetCard.marketPrice")})]}):me?ei?e.jsxs(St,{"data-variant":"sale","data-testid":"item-price",children:[e.jsx(Yt,{}),e.jsx(At,{children:e.jsx(ye,{credits:r.priceCredits})}),e.jsx(Yh,{"data-testid":"detail-price-was",children:e.jsx(ye,{credits:r.compareAtCredits})}),e.jsx(_o,{until:r.saleEndsAt,testId:"detail-countdown"})]}):e.jsxs(St,{"data-testid":"item-price",children:[e.jsx(Yt,{}),e.jsx(At,{children:e.jsx(ye,{credits:r.priceCredits})})]}):ci&&cn?e.jsxs(St,{"data-testid":"item-price",children:[e.jsx(Yt,{}),e.jsx(At,{children:e.jsx(ye,{credits:cn})})]}):Pe?null:e.jsxs(St,{"data-variant":"none","data-testid":"item-price",children:[e.jsx("span",{children:i("itemDetail.notForSale")}),e.jsx(Gt,{content:i("itemDetail.notForSaleHint"),children:e.jsx(Gh,{tabIndex:0,role:"img","aria-label":i("itemDetail.notForSaleHint"),children:e.jsx(R,{name:"info",size:14})})})]})]}),os?e.jsxs(Da,{children:[e.jsx(Mn,{children:i("itemDetail.stock")}),e.jsxs(An,{children:[(It??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(it).toLocaleString()]})]}):yi?e.jsxs(Da,{children:[e.jsx(Mn,{children:i("itemDetail.stock")}),e.jsxs(An,{children:[(It??0).toLocaleString(),"/",Ae.Rarity.getMaxSupply(it).toLocaleString()]}),e.jsx(An,{"data-out":!0,"data-testid":"out-of-stock",children:i("itemDetail.outOfStock")})]}):null]}),$e?e.jsx(mh,{claimed:$e.claimed,total:$e.total,testId:"detail-offer-stock"}):null,We!=null?e.jsx(Jh,{"data-testid":"detail-units-left",children:i("assetCard.unitsLeftAtThisPrice",{count:We})}):null]}),e.jsx(Xh,{"data-buttons":ds||void 0,"data-dual":ls||void 0,children:y?e.jsxs(zn,{variant:"purple",onClick:_,disabled:!Q,children:[e.jsx("span",{children:i("assetCard.buyNow")}),j!=null?e.jsxs(Rn,{"aria-hidden":!0,children:[e.jsx(En,{}),e.jsx(ye,{credits:j})]}):null]}):Pe?e.jsxs(Cx,{"data-testid":"manage-actions",children:[ci?e.jsxs(e.Fragment,{children:[pi?e.jsxs(ex,{onClick:()=>mi({edit:!0}),disabled:!ui,"data-testid":"edit-price",children:[e.jsx(R,{name:"pen",className:"ico"}),e.jsx("span",{children:i("itemDetail.manageUpdatePrice")})]}):null,e.jsx(qa,{onClick:()=>ri(!0),"data-testid":"remove-listing",children:e.jsx("span",{children:i("itemDetail.manageRemove")})})]}):e.jsxs(e.Fragment,{children:[pi?e.jsx(Zh,{onClick:()=>mi(),disabled:!ui,children:e.jsx("span",{children:i("itemDetail.manageList")})}):null,Le?e.jsxs(e.Fragment,{children:[e.jsx(qa,{onClick:()=>ii(!0),children:e.jsx("span",{children:i("itemDetail.manageTransfer")})}),e.jsx(Oa,{type:"button","data-on-purple":!0,"data-testid":"resell-item",onClick:()=>Ft(!0),children:i("itemDetail.manageResell")})]}):null]}),dn&&Re?e.jsx(Oa,{type:"button","data-on-purple":!0,onClick:()=>ai(!0),children:i("itemDetail.manageIssue")}):null,He!=null?e.jsx(Ix,{children:e.jsx(Wn,{onClick:()=>et(!0),"data-testid":"view-resellers",children:i("itemDetail.viewAllResellers")})}):null]}):me?e.jsxs(e.Fragment,{children:[e.jsxs(zn,{variant:"purple",onClick:_,disabled:ce,children:[e.jsx("span",{children:i("assetCard.buyNow")}),e.jsxs(Rn,{"aria-hidden":!0,children:[e.jsx(En,{}),e.jsx(ye,{credits:r.priceCredits})]})]}),e.jsxs(Ka,{onClick:Xr,disabled:ce||(Bt?on:Ue),"aria-label":bi,children:[e.jsx(R,{name:"cart"}),e.jsx(Ha,{children:bi})]})]}):pt&&Se?e.jsxs(e.Fragment,{children:[e.jsxs(zn,{variant:"purple",onClick:()=>f?Et(Se):W(),children:[e.jsx("span",{children:i("assetCard.buyNow")}),e.jsxs(Rn,{"aria-hidden":!0,children:[e.jsx(En,{}),e.jsx(ye,{credits:Se.priceCredits})]})]}),e.jsxs(Ka,{onClick:()=>{Kt||C(Se,"item_detail")},disabled:Kt,"aria-label":Kt?i("assetCard.inCart"):i("assetCard.addToCart"),children:[e.jsx(R,{name:"cart"}),e.jsx(Ha,{children:Kt?i("assetCard.inCart"):i("assetCard.addToCart")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(ch,{item:r}),r.itemId?e.jsx(vx,{onClick:()=>{X("Shop Clicked Buy Resale",{item_id:r.itemId,contract_address:r.contractAddress,has_shop_resale:!!Se}),P(!0)},"data-testid":"buy-resale","aria-haspopup":"dialog",children:i("itemDetail.buyResale")}):null]})}),!Pe&&!y&&He!=null?e.jsxs(bx,{"data-testid":"lowest-price","data-centered":pt||void 0,children:[pt?null:e.jsxs(yx,{children:[i("itemDetail.lowestPrice"),e.jsx(ve,{className:"ico"}),e.jsx(wx,{children:e.jsx(ye,{credits:He})})]}),e.jsx(Wn,{onClick:()=>et(!0),"data-testid":"view-resellers",children:i("itemDetail.viewAllResellers")})]}):null,!Pe&&!y&&hi>0?e.jsxs(tx,{"data-testid":"you-own-note",children:[i("itemDetail.youOwnN",{count:hi})," ",e.jsx(nr,{to:"/my-items",children:i("nav.myAssets")})]}):null]})]}):e.jsx(Lx,{})})]}),e.jsx(wo,{exclude:de,title:i("itemDetail.becauseYouOwn"),surface:"pdp",first:tr}),V!==null&&e.jsx(Do,{title:Zr,items:D,onViewAll:q&&r.contractAddress?()=>g(`/collection/${r.contractAddress}`):void 0}),Y&&y&&ae&&B?e.jsx(Fr,{listing:ae,rate:B,onClose:()=>K(!1),onSold:()=>K(!1)}):Y&&!y?e.jsx(Fn,{item:tt,resume:A,onClose:()=>{K(!1),z(!1)}}):null,jt?e.jsx(Fn,{item:jt,onClose:()=>{Et(null),at()}}):null,Be&&Tt&&r.itemId?e.jsx(Bp,{item:r,onClose:()=>et(!1)}):null,kt&&x?e.jsx(La,{contractAddress:o??"",tokenId:x,onClose:()=>Ft(!1)}):null,k&&r.itemId&&o?e.jsx(La,{variant:"buy",contractAddress:o,itemId:r.itemId,onClose:()=>P(!1)}):null,es&&O&&f?e.jsx(uc,{asset:O,session:f,creator:r.creator,edit:si?fi:void 0,onListed:(p,re)=>{Ct(p),at(),xn(I,{address:f.address,contractAddress:r.contractAddress,tokenId:r.tokenId},{kind:"listed",priceCredits:p,tradeId:re})},onClose:gi}):null,as&&f?e.jsx(Pc,{name:r.name,managed:nn(f),canPayGas:li,cancel:xi(!1),onClose:()=>ri(!1)}):null,ns&&f&&r.tokenId?e.jsx(zc,{item:{contractAddress:r.contractAddress,chainId:r.chainId,tokenId:r.tokenId,name:r.name,thumbnail:r.thumbnail},session:f,onClose:()=>{ii(!1),at()},onTransferred:()=>{Ct(null),at(),xn(I,{address:f.address,contractAddress:r.contractAddress,tokenId:r.tokenId},{kind:"gone"})}}):null,ts&&Re&&f?e.jsx(tu,{item:Re,session:f,edit:si?fi:void 0,onListed:(p,re)=>{Ct(p),E(je=>({...je,tradeId:re}))},onClose:gi}):null,is&&Re&&f?e.jsx(Mu,{item:{contractAddress:Re.contractAddress,chainId:ot.chainId,itemId:Re.blockchainItemId,name:Re.name,thumbnail:Re.thumbnail,available:Re.remainingSupply},session:f,onClose:()=>{ai(!1),at()}}):null,Lt&&vt?e.jsx(Fu,{src:vt,itemName:r.name,onClose:()=>Pt(!1)}):null]})}function Lx(){return e.jsxs(ox,{"aria-hidden":!0,children:[e.jsx(cx,{className:"skeleton"}),e.jsxs(ux,{children:[e.jsx(Ln,{className:"skeleton"}),e.jsx(Ln,{className:"skeleton"}),e.jsx(Ln,{className:"skeleton"})]}),e.jsx(Qr,{children:[0,1].map(t=>e.jsx(Nn,{children:e.jsxs(Bn,{children:[e.jsx(Ua,{className:"skeleton"}),e.jsxs(lx,{children:[e.jsx(Pn,{className:"skeleton"}),e.jsx(Pn,{className:"skeleton"}),e.jsx(Pn,{className:"skeleton","data-short":!0})]})]})},t))}),e.jsx(Gr,{children:[0,1].map(t=>e.jsxs(Mt,{...t===1?{"data-collection":!0}:{},children:[e.jsx(Ua,{className:"skeleton"}),e.jsx(dx,{})]},t))}),e.jsx(Vr,{}),e.jsx(px,{className:"skeleton"}),e.jsx(hx,{className:"skeleton"})]})}export{Rx as ItemDetail,df as ItemDetailRoute,Rx as default};
|
|
3779
|
+
//# sourceMappingURL=ItemDetail-BSwm3WSx.js.map
|