@dcl/shop 1.9.1 → 1.9.2-32493339792.commit-9dd6f23
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-v2ysdkZp.js → Activity-BOBru6F-.js} +60 -60
- package/_assets/{AnimatedBackground-i_Oi5flU.js → AnimatedBackground-ChPsWRtA.js} +2 -2
- package/_assets/{Assets-CS74e4fX.js → Assets-DWI4NaVr.js} +7 -7
- package/_assets/{Authorizations-AzgQbxUI.js → Authorizations-xVmNfbFf.js} +4 -4
- package/_assets/{Cart-DJ9-HKnr.js → Cart-BGUrce5E.js} +2 -2
- package/_assets/{CircularProgress-C3bSCAL8.js → CircularProgress-DO_ZwmA1.js} +2 -2
- package/_assets/{Collection-B83Lsi9t.js → Collection-CHpDQHJq.js} +11 -11
- package/_assets/{CollectionCarousel-DRvnaHVZ.js → CollectionCarousel-BRzHQV17.js} +3 -3
- package/_assets/{Confetti-CfzeiH3X.js → Confetti-BB86KAAN.js} +4 -4
- package/_assets/{ConstantsUtil-BZZXkl0f.js → ConstantsUtil-jo9GWluc.js} +2 -2
- package/_assets/{ContentClient-BDPHco79.js → ContentClient-DxrhRvzn.js} +2 -2
- package/_assets/{Creator-Dj5bE00y.js → Creator-CjNMUbTO.js} +2 -2
- package/_assets/{DeploymentBuilder-BfG5A0g6.js → DeploymentBuilder-83ix5TQu.js} +2 -2
- package/_assets/{EmotePlaybackBar-hGXyvmBg.js → EmotePlaybackBar-19e05uCD.js} +5 -5
- package/_assets/{ErrorNotice-BidBLYce.js → ErrorNotice-BbDJ7oSM.js} +2 -2
- package/_assets/{ExchangeController-Br8UNiZB.js → ExchangeController-DQz0ozwB.js} +2 -2
- package/_assets/{Faq-9_8_Fvgc.js → Faq-RFP04LeF.js} +2 -2
- package/_assets/{GetCredits-pAGa_1mG.js → GetCredits-C4q9KCPa.js} +8 -8
- package/_assets/{Grow-9A5Y1Jf6.js → Grow-DbyGwris.js} +2 -2
- package/_assets/{HelpersUtil-CDv4dF_c.js → HelpersUtil-sn-EX4sD.js} +2 -2
- package/_assets/ItemDetail-BT1EJeg9.js +3655 -0
- package/_assets/{LoadMore-BVjh7_fu.js → LoadMore-DWB-tGRB.js} +2 -2
- package/_assets/{ManaPricingBanner.styles-B76dWybp.js → ManaPricingBanner.styles-C9kR0xkR.js} +28 -24
- package/_assets/{MyAssets-gfhr5k6p.js → MyAssets-BcVgG-ED.js} +45 -45
- package/_assets/{MyFavorites-D1vydQX_.js → MyFavorites-CJwXz0t5.js} +2 -2
- package/_assets/{NetworkUtil-XLq8TFRp.js → NetworkUtil-BdwtOd1-.js} +2 -2
- package/_assets/{NotFound-CWAK9Xz4.js → NotFound-B-UIb9Nr.js} +2 -2
- package/_assets/{NotificationsBell-tCoZsE_a.js → NotificationsBell-DaKv2283.js} +2 -2
- package/_assets/{OutfitDetail-CksVFLes.js → OutfitDetail-Dabdj6Zq.js} +2 -2
- package/_assets/{OutfitPreview-Dj1Sn2r-.js → OutfitPreview-CLNkogeE.js} +2 -2
- package/_assets/{OutfitStudio-WAU1vdRX.js → OutfitStudio-DxgrYDdK.js} +2 -2
- package/_assets/{StoreSettings-VjbE-CPw.js → StoreSettings-DpMAQomJ.js} +22 -22
- package/_assets/{Success-B8mWooag.js → Success-D4YczCOw.js} +2 -2
- package/_assets/{SwapController-uSgh3Faq.js → SwapController-BTOBBLzw.js} +2 -2
- package/_assets/{TradeService-BC26Syas.js → TradeService-h-QSpBV6.js} +2 -2
- package/_assets/{W3MFrameProviderSingleton-CdPGjmXY.js → W3MFrameProviderSingleton-DNYBXqcl.js} +4 -4
- package/_assets/{WebCryptoP256-BzRyJn5s.js → WebCryptoP256-42HMh_PV.js} +2 -2
- package/_assets/{authorizations-D1ZMIs2H.js → authorizations-DkRdd-1d.js} +2 -2
- package/_assets/{basic-JhmwlUL4.js → basic-xgd_UIZp.js} +2 -2
- package/_assets/{biconomy-qUXUAKc2.js → biconomy-LnVXJyVN.js} +2 -2
- package/_assets/{browseLayout.styles-Cdvdeu36.js → browseLayout.styles-B8_UmpYi.js} +2 -2
- package/_assets/{browser-v2FzdDJg.js → browser-DCf3IQS1.js} +2 -2
- package/_assets/{browser-ponyfill-B6AAM9EE.js → browser-ponyfill-Dqmkl3JZ.js} +2 -2
- package/_assets/{builder-BX572rOw.js → builder-lLfr3elt.js} +2 -2
- package/_assets/{buy-CA6rPe25.js → buy-B_nE_K_L.js} +2 -2
- package/_assets/{buy-gasless-CK3HV-x0.js → buy-gasless-DK9YnK5W.js} +2 -2
- package/_assets/{categories-CppViVHu.js → categories-CUsrLJsQ.js} +2 -2
- package/_assets/{ccip-BTRXdf6a.js → ccip-B2FezZBB.js} +2 -2
- package/_assets/{ccip-BcU_Heae.js → ccip-Bumbcuu6.js} +2 -2
- package/_assets/{chains-nBjolbwq.js → chains-DAwnzJtp.js} +2 -2
- package/_assets/collectionPage.styles-CMg9-nBi.js +40 -0
- package/_assets/{common-4KcHAwA7.js → common-CZ2_t92X.js} +2 -2
- package/_assets/{controller-CJ7e20Gw.js → controller-C_Z7GwZl.js} +3 -3
- package/_assets/{core-B4CIHx0f.js → core-C0V9LYxl.js} +5 -5
- package/_assets/{createSvgIcon-D6wdVRX4.js → createSvgIcon-BDETCLue.js} +3 -3
- package/_assets/{custom-CHfuF_NV.js → custom-Bpch6eDt.js} +2 -2
- package/_assets/{data-capture-Hq1vlKz4.js → data-capture-CgzhJSuI.js} +2 -2
- package/_assets/{dcl-schemas-D_0AvjMb.js → dcl-schemas-D-HY5c5S.js} +2 -2
- package/_assets/{decimals-DcDODb9g.js → decimals-CMPrx8H9.js} +2 -2
- package/_assets/{decimals-CSrhOWju.js → decimals-CvLYuks1.js} +2 -2
- package/_assets/{detectExtension-noSlp4xk.js → detectExtension-eKsK5_7N.js} +2 -2
- package/_assets/{disposePreview-vScx20Eh.js → disposePreview-7gQAmFWx.js} +2 -2
- package/_assets/{email-Csyyf6Z4.js → email-CzUruI1B.js} +2 -2
- package/_assets/{embedded-wallet-BTwJxa4B.js → embedded-wallet-Dzt0EALS.js} +2 -2
- package/_assets/{emotion-styled.browser.esm-Bx9PHpi_.js → emotion-styled.browser.esm-CKkXZGM0.js} +2 -2
- package/_assets/{engine-CCCiMDEh.js → engine-BdqWc7md.js} +2 -2
- package/_assets/{errors-kVIEXzVQ.js → errors-gm41DtjH.js} +2 -2
- package/_assets/{estimate-l1-fee-Wbxg435T.js → estimate-l1-fee-CNM3A5EY.js} +2 -2
- package/_assets/{eth_estimateGas-BbsWIkPg.js → eth_estimateGas-C51fArBf.js} +2 -2
- package/_assets/{eth_getStorageAt-DL0XLL1P.js → eth_getStorageAt-Cpp_9_JB.js} +2 -2
- package/_assets/{eth_getTransactionCount-BLU8e3cb.js → eth_getTransactionCount-DwpZpPfN.js} +2 -2
- package/_assets/{ethereum-Gp_6QZpS.js → ethereum-CWRHwHnG.js} +2 -2
- package/_assets/{ethers-DJyLt7ov.js → ethers-D5UuIc_H.js} +2 -2
- package/_assets/{events-CWjZ5HrG.js → events-BgG191wB.js} +2 -2
- package/_assets/{execute-hjCDYzF9.js → execute-C13MuCL-.js} +3 -3
- package/_assets/{extractIPFS-thAiEssw.js → extractIPFS-C0y057MY.js} +2 -2
- package/_assets/{features-lP9QyOdB.js → features-DhJBxZ00.js} +2 -2
- package/_assets/{fetchTokenMetadata-Dfqm4UIJ.js → fetchTokenMetadata-oE-PbhMg.js} +3 -3
- package/_assets/{field.styles-B8MaBY_W.js → field.styles-CAUTIJXl.js} +2 -2
- package/_assets/{fortmatic-ZQRwd2Im.js → fortmatic-2c1nSnhu.js} +2 -2
- package/_assets/{get-bytecode-DggwH8oO.js → get-bytecode-LEW7S20n.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-CVwfo0p8.js → get-ecosystem-wallet-info-GQiNBhTt.js} +2 -2
- package/_assets/{getBalance-BUKMiyBi.js → getBalance-Wt9rkI1m.js} +3 -3
- package/_assets/{getInstalledModules-3nyyTBxx.js → getInstalledModules-CCjhRkB7.js} +2 -2
- package/_assets/{getNFT-B-Et8vjO.js → getNFT-BIVMfh86.js} +2 -2
- package/_assets/{getNFT-BcWbcqeK.js → getNFT-DX_76hyk.js} +3 -3
- package/_assets/{grid.styles-8-c3xJ52.js → grid.styles-B7j4ZE-1.js} +2 -2
- package/_assets/{hashTypedData-aLZdRBOS.js → hashTypedData-C2S6ISWi.js} +2 -2
- package/_assets/{hashTypedData-Cgw8rx9J.js → hashTypedData-OVmkM126.js} +2 -2
- package/_assets/{in-app-Im1w8vqf.js → in-app-Baurkd2s.js} +2 -2
- package/_assets/{in-app-wallet-calls-DWV9WOd6.js → in-app-wallet-calls-DYr60akb.js} +2 -2
- package/_assets/{index-FU3FeYUY.js → index-72qrJRLP.js} +2 -2
- package/_assets/{index-CBNmRWcc.js → index-B9CqKPcy.js} +2 -2
- package/_assets/{index-DGPdGf68.js → index-BAZW_9En.js} +2 -2
- package/_assets/{index-Of1WNlJj.js → index-BAyQKXeX.js} +3 -3
- package/_assets/{index-C1pPamEq.js → index-BCTIVQ38.js} +2 -2
- package/_assets/{index-BaIwSc0i.js → index-BKwSv05S.js} +3 -3
- package/_assets/{index-DiO2SSq_.js → index-BM1Is6f3.js} +2 -2
- package/_assets/{index-DS6MGxS1.js → index-BQ7twFQE.js} +2 -2
- package/_assets/{index-COgh3iV7.js → index-BRQHDmfJ.js} +2 -2
- package/_assets/{index-0iF6q7Dc.js → index-Bk5SRPIO.js} +17 -17
- package/_assets/{index-BEM0E5i4.js → index-Bk62vTwq.js} +2 -2
- package/_assets/{index-Dd6GvTnZ.js → index-BksLSPkQ.js} +2 -2
- package/_assets/{index-BwKHWCzU.js → index-BoJu_Nfn.js} +2 -2
- package/_assets/{index-CVvtM95L.js → index-BoLVFQhU.js} +2 -2
- package/_assets/{index-BkySuyVA.js → index-BpwQPG2r.js} +2 -2
- package/_assets/{index-DPXmfk7P.js → index-BqRCIJLW.js} +2 -2
- package/_assets/{index-CNJs9qv5.js → index-Bs1IwEFK.js} +2 -2
- package/_assets/{index-B5yY6WlA.js → index-Bth6O8wI.js} +2 -2
- package/_assets/{index-Bmsf8Air.js → index-C1roXIZW.js} +2 -2
- package/_assets/index-C6i7o4u4.js +4090 -0
- package/_assets/{index-D8OSaTYC.js → index-C8MVNekM.js} +3 -3
- package/_assets/{index-DgNHClA7.js → index-CBSi566e.js} +2 -2
- package/_assets/{index-DhxD_VOZ.js → index-CEpjUJOV.js} +2 -2
- package/_assets/index-CKGO8NWe.css +1 -0
- package/_assets/{index-B9wGuFCX.js → index-CMb63NTm.js} +2 -2
- package/_assets/{index-DJWZ68WJ.js → index-CNPhraPm.js} +2 -2
- package/_assets/{index-BZUiAv8d.js → index-COAnC5q2.js} +2 -2
- package/_assets/{index-pza-rrtX.js → index-CPRN9-ev.js} +2 -2
- package/_assets/{index-CNpAdiWU.js → index-CSh0mTD_.js} +3 -3
- package/_assets/{index-lUKvD9kJ.js → index-CU7TM-NA.js} +2 -2
- package/_assets/{index-W92HuH2P.js → index-CYBANRcc.js} +2 -2
- package/_assets/{index-BkVMpeCx.js → index-C_c-NZp-.js} +2 -2
- package/_assets/{index-CujecoyA.js → index-Cg7UsMUc.js} +2 -2
- package/_assets/{index-DogtWwu9.js → index-CieO3ayk.js} +2 -2
- package/_assets/{index-DIR01LdD.js → index-ClNVZsZJ.js} +2 -2
- package/_assets/{index-DeNA-UiF.js → index-Cq6EUh9o.js} +2 -2
- package/_assets/{index-DQTxSPzt.js → index-CwLlEfsN.js} +2 -2
- package/_assets/{index-BmIKTd2K.js → index-CyOZb_GG.js} +4 -4
- package/_assets/{index-DJ7edWLi.js → index-D-XFph9c.js} +2 -2
- package/_assets/{index-CnWTyHMl.js → index-D5UBGQRC.js} +2 -2
- package/_assets/{index-q_GoA-UL.js → index-D90e8KfQ.js} +2 -2
- package/_assets/{index-CZH27yv_.js → index-D9i93oWe.js} +2 -2
- package/_assets/{index-CtS7tk1M.js → index-DJCj-1zL.js} +2 -2
- package/_assets/{index-Qy9PPBCs.js → index-DRvURtEA.js} +2 -2
- package/_assets/{index-hLCjdp6z.js → index-DaAnU2xP.js} +2 -2
- package/_assets/index-Db70RtN9.js +2 -0
- package/_assets/{index-CdpXWmGt.js → index-Dfsi8IW9.js} +2 -2
- package/_assets/{index-DasQRw2k.js → index-DgewcXtQ.js} +4 -4
- package/_assets/{index-FS0EdtgY.js → index-Dm14m91b.js} +2 -2
- package/_assets/{index-BRvBOji7.js → index-Do0EDxo0.js} +2 -2
- package/_assets/{index-BxjrggJW.js → index-Dqfr2bvx.js} +2 -2
- package/_assets/{index-DtaMzCo4.js → index-Du4TWaea.js} +3 -3
- package/_assets/{index-BqCIJgLW.js → index-DzcRYNtx.js} +2 -2
- package/_assets/{index-rsvuMulW.js → index-Lmp-vKwx.js} +2 -2
- package/_assets/{index-mGxb4_sf.js → index-M6WjC5UC.js} +2 -2
- package/_assets/{index-Da_gr_24.js → index-McQPTb3I.js} +2 -2
- package/_assets/{index-Bgp63VLv.js → index-Mdjd149J.js} +2 -2
- package/_assets/{index-Djw57uLN.js → index-at-KdJKv.js} +2 -2
- package/_assets/{index-dyqTVTCl.js → index-c8Ld0DY9.js} +2 -2
- package/_assets/{index-CXzM7606.js → index-i8480yQ2.js} +2 -2
- package/_assets/{index-BF9JVUOa.js → index-lgfAposA.js} +2 -2
- package/_assets/{index-DKWNCfgA.js → index-mtunB8HD.js} +2 -2
- package/_assets/{index-BTPbwm6G.js → index-nfljjUsr.js} +6 -6
- package/_assets/{index-Dm0i0BHe.js → index-rd-W7f1j.js} +4 -4
- package/_assets/{index-BBgGvogq.js → index-sKrDbJHW.js} +2 -2
- package/_assets/{index-DDFmcZCl.js → index-uKWDNSAp.js} +2 -2
- package/_assets/{index-7TuYfydT.js → index-wQXlFsU6.js} +2 -2
- package/_assets/{index-CMk7qdhJ.js → index-yMykCGD4.js} +2 -2
- package/_assets/{index.es-DbAH76rg.js → index.es-BjOWM-FW.js} +2 -2
- package/_assets/{index.es-DQGHZFdq.js → index.es-BmdpcFeJ.js} +2 -2
- package/_assets/{index.es-CA3_D2SU.js → index.es-DAAXIk2h.js} +2 -2
- package/_assets/{index.es-DeHqqp7L.js → index.es-m3UaQXcT.js} +5 -5
- package/_assets/items-empty-BKfeE0c0.js +2 -0
- package/_assets/{jump-D5bqZjn-.js → jump-DnjeXKXd.js} +2 -2
- package/_assets/{linkAccount-CJuVyM61.js → linkAccount-BWENOnOz.js} +2 -2
- package/_assets/{localBatchGatewayRequest-D4MOUz-d.js → localBatchGatewayRequest-DM1HFidU.js} +2 -2
- package/_assets/{native-Cr2hK3Pq.js → native-mzGBZPh4.js} +2 -2
- package/_assets/{networks-DCf-8f0i.js → networks-z8EeFSod.js} +2 -2
- package/_assets/{onramp-ycs94Dix.js → onramp-BBvFzwFo.js} +2 -2
- package/_assets/{openzeppelin-CDQyKj-1.js → openzeppelin-Bxko_dSX.js} +2 -2
- package/_assets/{ownerOf-DDrVLihH.js → ownerOf-sdNRPM2v.js} +2 -2
- package/_assets/{parseNft-jgelbzFl.js → parseNft-CjIpSfSz.js} +3 -3
- package/_assets/{parseSignature-Du3c0XxO.js → parseSignature-BOKtx4yn.js} +4 -4
- package/_assets/{parseSignature-m5ctRnL2.js → parseSignature-Mth-LmNb.js} +2 -2
- package/_assets/{passkeys-CxeDxdrI.js → passkeys-Cpm0QB1F.js} +2 -2
- package/_assets/{pay-with-exchange-DpQHY-py.js → pay-with-exchange-rU1x0moE.js} +2 -2
- package/_assets/{prepare-contract-call-CGRTBLkI.js → prepare-contract-call-DtjN716O.js} +2 -2
- package/_assets/{qr-overlay-gsJo9t_r.js → qr-overlay-BImQqiJI.js} +4 -4
- package/_assets/{react-Cb20DwfT.js → react-SYhE92K6.js} +2 -2
- package/_assets/{receive-ImsHqYro.js → receive-DFIcjnfC.js} +2 -2
- package/_assets/{resolveImplementation-B5ta9SnG.js → resolveImplementation-CSCILjga.js} +2 -2
- package/_assets/{resume-buy-DsKEHLCS.js → resume-buy-BNBLokSW.js} +2 -2
- package/_assets/{rpc-CtdTpIUn.js → rpc-jefUZ4Bj.js} +2 -2
- package/_assets/{sales-empty-DHzQRdN2.js → sales-empty-Ce36ffdP.js} +2 -2
- package/_assets/{search-empty-CiCjoeCH.js → search-empty-BJh8_Eyt.js} +2 -2
- package/_assets/{secp256k1-Do9ROGum.js → secp256k1-CTWVG6WG.js} +2 -2
- package/_assets/{secp256k1-R0yoFZNq.js → secp256k1-CbAignr4.js} +2 -2
- package/_assets/{secp256k1-B7dO-0ut.js → secp256k1-DO42QIx6.js} +2 -2
- package/_assets/{send-CCLRyFK3.js → send-DJzyFf15.js} +2 -2
- package/_assets/{send-batch-transaction-f0S6TgZe.js → send-batch-transaction-BOFIpnOE.js} +2 -2
- package/_assets/{send-eip712-transaction-dHyKJ4Ak.js → send-eip712-transaction-DuoqHyKY.js} +3 -3
- package/_assets/{send-gasless-transaction-DxOlBiHo.js → send-gasless-transaction-YBxtKwo3.js} +3 -3
- package/_assets/{send-transaction-DBwvCmPn.js → send-transaction-Byed_Cu-.js} +3 -3
- package/_assets/{sendMetaTransaction-Czj3ikgH.js → sendMetaTransaction-CXtHI3NS.js} +2 -2
- package/_assets/{sendRawTransaction-DBwAFKzV.js → sendRawTransaction-DQMs5ieU.js} +4 -4
- package/_assets/{sentry-Bj5QbebD.js → sentry-flvYKJxM.js} +3 -3
- package/_assets/{serializeTransaction-DpTwLFhn.js → serializeTransaction-DqFhIpxY.js} +2 -2
- package/_assets/{session-proposal-CaxSPT5V.js → session-proposal-C-GXMZMY.js} +2 -2
- package/_assets/{session-request-gJuMMJxv.js → session-request-CsCmwm0y.js} +3 -3
- package/_assets/{sha256-CBt_G5au.js → sha256-C5W5i7rt.js} +2 -2
- package/_assets/{signing-BFdLyhTz.js → signing-Dpz11FOI.js} +4 -4
- package/_assets/{skeleton.styles-Czp52uMO.js → skeleton.styles-Dv2nMvXK.js} +2 -2
- package/_assets/{socials-CLWH57G5.js → socials-B5INsQgB.js} +2 -2
- package/_assets/{styled-Cu6FogSR.js → styled-DrFcx2PN.js} +3 -3
- package/_assets/{swaps-BnXYuxie.js → swaps-CkTo6sG3.js} +2 -2
- package/_assets/{thirdweb-DTID1Z_P.js → thirdweb-C9Ryt_0k.js} +4 -4
- package/_assets/{to-serializable-transaction-CjM3sf2t.js → to-serializable-transaction-mjCZOK9T.js} +3 -3
- package/_assets/{totalSupply-BAW1cezV.js → totalSupply-C3Y3dVY2.js} +2 -2
- package/_assets/{transaction-Di96EDLI.js → transaction-Cc9XNVmp.js} +2 -2
- package/_assets/{transactionReceipt-CMhqt28r.js → transactionReceipt-BAc8T_v0.js} +2 -2
- package/_assets/{transactions-DZEc2b0U.js → transactions-0LjvD8Sd.js} +2 -2
- package/_assets/{useCreditPacks-DBLf5Vx6.js → useCreditPacks-FF3y6iFZ.js} +2 -2
- package/_assets/{useInfiniteGrid-CaJ8N7_j.js → useInfiniteGrid-9swTZj8O.js} +2 -2
- package/_assets/{useStore-1M9N96ol.js → useStore-Cxw9Sr5l.js} +3 -3
- package/_assets/{useTheme-D_6mMwzB.js → useTheme-DdSZ7F1l.js} +2 -2
- package/_assets/{utils-BbvKQjvK.js → utils-CZTvMbsX.js} +2 -2
- package/_assets/{verifyHash-Bro5sc72.js → verifyHash-CtlkCupL.js} +2 -2
- package/_assets/{w3m-modal-C4Ujbh8p.js → w3m-modal-BGxKEkzq.js} +2 -2
- package/_assets/{w3m-modal-DPSxouW3.js → w3m-modal-CcPo41nd.js} +2 -2
- package/_assets/{wait-for-tx-receipt-DY88_DTN.js → wait-for-tx-receipt-D9z3OJAO.js} +2 -2
- package/_assets/{wallets-D0SBUl4B.js → wallets-D0M1sVP6.js} +6 -6
- package/_assets/{web-connector-vZA2oyu8.js → web-connector-CVpQzhWi.js} +4 -4
- package/_assets/{writeContract-G_uImvlH.js → writeContract-nXAVqaHU.js} +2 -2
- package/_assets/{zora-sepolia-DiU6-Iz5.js → zora-sepolia--H9g3TEn.js} +2 -2
- package/_assets/{zoraTestnet-B7-C6axr.js → zoraTestnet-B8r51b6X.js} +2 -2
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/ItemDetail-Bm2RrQUD.js +0 -3490
- package/_assets/collectionPage.styles-5lnK1hcJ.js +0 -40
- package/_assets/index-Bct_bRJL.js +0 -4090
- package/_assets/index-W8NDj1_K.js +0 -2
- package/_assets/index-l2QjlKjX.css +0 -1
- package/_assets/items-empty-DP4sOVHQ.js +0 -2
|
@@ -0,0 +1,3655 @@
|
|
|
1
|
+
var Ql=Object.defineProperty;var Vl=(n,a,t)=>a in n?Ql(n,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[a]=t;var B=(n,a,t)=>Vl(n,typeof a!="symbol"?a+"":a,t);import{r as v,e as Ul,j as s,b as cn,l as ic,R as _,h as Gl,L as sc,d as Xl,a as cc}from"./react-SYhE92K6.js";import{s as g,t as u,aY as $t,b as h,I as V,ap as Jl,q as Re,E as Ot,C as Ue,c2 as Ho,aR as Qr,c as At,o as tn,aE as lc,aF as Zl,r as ln,aN as ed,af as pe,aU as Qe,aT as Ne,aP as Ba,h as Se,aS as xa,aQ as dc,i as td,d as nd,D as Qn,aD as rd,aC as ad,F as od,X as id,aO as sd,cN as cd,cO as ld,p as dd,l as xe,b0 as ud,a0 as Vr,bB as Ur,v as Za,bC as Gt,W as uc,w as Zn,b_ as pc,aq as $e,cP as pd,$ as fd,g as hd,f as md,B as In,A as Pn,aW as ya,a7 as fc,cQ as zo,cs as gd,U as hc,aX as xd,cR as yd,cS as bd,bN as vd,m as wd,ad as Un,bl as kd,cT as Dd,a3 as Cd,cU as Sd,bn as Md,cV as _d,cW as jd,N as mc,cX as gc,cY as Id,cZ as Pd,a as xc,c_ as Ed,c$ as Td,d0 as $d,d1 as Nd,z as Od,d2 as Rd,M as Ad,Z as Ld,Y as Fd,d3 as Yd,d4 as Wd,d5 as Bd,ar as Hd,as as zd,d6 as qd,n as Kd,av as qo,au as Qd,d7 as Ko,aM as Vd,d8 as Qo,d9 as Ud,da as Gd,db as Xd,dc as Jd,dd as Zd,de as eu,df as tu}from"./index-C6i7o4u4.js";import{d as st}from"./dcl-schemas-D-HY5c5S.js";import{O as Vo,a2 as nu,Z as ru,U as yc,V as au,M as ou,S as iu,C as su,H as cu,a as lu,T as du,X as uu,b as pu,B as fu,c as hu,d as mu,e as gu,f as hn,g as xu,h as yu,i as bu,j as vu,k as mn,l as gt,W as hr,p as mr,q as gr,r as wu,P as ku,y as Du,z as Cu,D as Su,E as Mu,F as _u,G as ju,I as Iu,J as Pu,K as Eu,N as Tu,L as $u,m as Nu,n as Ou,o as Ru,a4 as Au,a5 as Lu,a6 as Fu,A as Yu,s as Wu,t as Bu,u as Hu,v as zu,w as qu,x as Ku,a7 as Uo,a8 as Qu,a9 as Vu,aa as Uu,ab as Gu,_ as Xu,Q as Ju,R as Zu,Y as ep}from"./CollectionCarousel-BRzHQV17.js";import{k as Go,d as tp,f as np,t as rp,i as ap,e as op,a as ip,m as sp,q as Xo,c as cp,G as lp}from"./buy-B_nE_K_L.js";import{b as dp,a as up}from"./builder-lLfr3elt.js";import{u as pp,M as fp,e as hp,a as mp,c as gp}from"./useCreditPacks-FF3y6iFZ.js";import{m as Jo}from"./mana-matic-CEqvSwrJ.js";import{f as bc,e as vc,n as xp,h as yp,c as Zo,g as wc,l as bp,r as vp,m as wp,k as kp}from"./authorizations-DkRdd-1d.js";import{J as Dp,p as Cp,C as Sp,I as Mp}from"./ethers-D5UuIc_H.js";import{a as _p,w as kc,S as Dc,G as Cc,c as jp}from"./buy-gasless-DK9YnK5W.js";import{R as ei}from"./resume-buy-BNBLokSW.js";import{a as Ip,f as nn,i as Dn}from"./errors-gm41DtjH.js";import{C as Pp}from"./Confetti-BB86KAAN.js";import{J as Ep,a as Tp}from"./jump-DnjeXKXd.js";import{C as $p}from"./CircularProgress-DO_ZwmA1.js";import{E as Lt}from"./ErrorNotice-BbDJ7oSM.js";import{M as Np,E as Op,s as Rp}from"./sendMetaTransaction-CXtHI3NS.js";import{E as Ap}from"./EmotePlaybackBar-19e05uCD.js";import{d as Lp}from"./disposePreview-7gQAmFWx.js";import{S as Fp,T as ti}from"./categories-CUsrLJsQ.js";import"./sentry-flvYKJxM.js";import"./intl-AKLEHPeO.js";import"./clsx-BEtG4eYu.js";import"./styled-DrFcx2PN.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="1d86f796-ec19-491e-817b-2f5d56e9102f",n._sentryDebugIdIdentifier="sentry-dbid-1d86f796-ec19-491e-817b-2f5d56e9102f")}catch{}})();const Cn=Math.min,Xt=Math.max,$r=Math.round,xr=Math.floor,yt=n=>({x:n,y:n}),Yp={left:"right",right:"left",bottom:"top",top:"bottom"};function Wp(n,a,t){return Xt(n,Cn(a,t))}function Gr(n,a){return typeof n=="function"?n(a):n}function Sn(n){return n.split("-")[0]}function er(n){return n.split("-")[1]}function Bp(n){return n==="x"?"y":"x"}function eo(n){return n==="y"?"height":"width"}function Vt(n){const a=n[0];return a==="t"||a==="b"?"y":"x"}function to(n){return Bp(Vt(n))}function Hp(n,a,t){t===void 0&&(t=!1);const e=er(n),r=to(n),o=eo(r);let i=r==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return a.reference[o]>a.floating[o]&&(i=Nr(i)),[i,Nr(i)]}function zp(n){const a=Nr(n);return[Ha(n),a,Ha(a)]}function Ha(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const ni=["left","right"],ri=["right","left"],qp=["top","bottom"],Kp=["bottom","top"];function Qp(n,a,t){switch(n){case"top":case"bottom":return t?a?ri:ni:a?ni:ri;case"left":case"right":return a?qp:Kp;default:return[]}}function Vp(n,a,t,e){const r=er(n);let o=Qp(Sn(n),t==="start",e);return r&&(o=o.map(i=>i+"-"+r),a&&(o=o.concat(o.map(Ha)))),o}function Nr(n){const a=Sn(n);return Yp[a]+n.slice(a.length)}function Up(n){var a,t,e,r;return{top:(a=n.top)!=null?a:0,right:(t=n.right)!=null?t:0,bottom:(e=n.bottom)!=null?e:0,left:(r=n.left)!=null?r:0}}function Sc(n){return typeof n!="number"?Up(n):{top:n,right:n,bottom:n,left:n}}function Or(n){const{x:a,y:t,width:e,height:r}=n;return{width:e,height:r,top:t,left:a,right:a+e,bottom:t+r,x:a,y:t}}function ai(n,a,t){let{reference:e,floating:r}=n;const o=Vt(a),i=to(a),c=eo(i),l=Sn(a),p=o==="y",d=e.x+e.width/2-r.width/2,m=e.y+e.height/2-r.height/2,x=e[c]/2-r[c]/2;let y;switch(l){case"top":y={x:d,y:e.y-r.height};break;case"bottom":y={x:d,y:e.y+e.height};break;case"right":y={x:e.x+e.width,y:m};break;case"left":y={x:e.x-r.width,y:m};break;default:y={x:e.x,y:e.y}}const b=er(a);return b&&(y[i]+=x*(b==="end"?1:-1)*(t&&p?-1:1)),y}async function Gp(n,a){var t;a===void 0&&(a={});const{x:e,y:r,platform:o,rects:i,elements:c,strategy:l}=n,{boundary:p="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:x=!1,padding:y=0}=Gr(a,n),b=Sc(y),k=c[x?m==="floating"?"reference":"floating":m],f=Or(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(k)))==null||t?k:k.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:p,rootBoundary:d,strategy:l})),S=m==="floating"?{x:e,y:r,width:i.floating.width,height:i.floating.height}:i.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),T=await(o.isElement==null?void 0:o.isElement(E))&&await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1},$=Or(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:S,offsetParent:E,strategy:l}):S);return{top:(f.top-$.top+b.top)/T.y,bottom:($.bottom-f.bottom+b.bottom)/T.y,left:(f.left-$.left+b.left)/T.x,right:($.right-f.right+b.right)/T.x}}const Xp=50,Jp=async(n,a,t)=>{const{placement:e="bottom",strategy:r="absolute",middleware:o=[],platform:i}=t,c=i.detectOverflow?i:{...i,detectOverflow:Gp},l=await(i.isRTL==null?void 0:i.isRTL(a));let p=await i.getElementRects({reference:n,floating:a,strategy:r}),{x:d,y:m}=ai(p,e,l),x=e,y=0;const b={};for(let w=0;w<o.length;w++){const k=o[w];if(!k)continue;const{name:f,fn:S}=k,{x:E,y:T,data:$,reset:O}=await S({x:d,y:m,initialPlacement:e,placement:x,strategy:r,middlewareData:b,rects:p,platform:c,elements:{reference:n,floating:a}});d=E??d,m=T??m,b[f]={...b[f],...$},O&&y<Xp&&(y++,typeof O=="object"&&(O.placement&&(x=O.placement),O.rects&&(p=O.rects===!0?await i.getElementRects({reference:n,floating:a,strategy:r}):O.rects),{x:d,y:m}=ai(p,x,l)),w=-1)}return{x:d,y:m,placement:x,strategy:r,middlewareData:b}},Zp=n=>({name:"arrow",options:n,async fn(a){const{x:t,y:e,placement:r,rects:o,platform:i,elements:c,middlewareData:l}=a,{element:p,padding:d=0}=Gr(n,a)||{};if(p==null)return{};const m=Sc(d),x={x:t,y:e},y=to(r),b=eo(y),w=await i.getDimensions(p),k=y==="y",f=k?"top":"left",S=k?"bottom":"right",E=k?"clientHeight":"clientWidth",T=o.reference[b]+o.reference[y]-x[y]-o.floating[b],$=x[y]-o.reference[y],O=await(i.getOffsetParent==null?void 0:i.getOffsetParent(p));let C=O?O[E]:0;(!C||!await(i.isElement==null?void 0:i.isElement(O)))&&(C=c.floating[E]||o.floating[b]);const D=T/2-$/2,I=C/2-w[b]/2-1,L=Cn(m[f],I),z=Cn(m[S],I),A=C-w[b]-z,K=C/2-w[b]/2+D,U=Wp(L,K,A),q=!l.arrow&&er(r)!=null&&K!==U&&o.reference[b]/2-(K<L?L:z)-w[b]/2<0,j=q?K<L?K-L:K-A:0;return{[y]:x[y]+j,data:{[y]:U,centerOffset:K-U-j,...q&&{alignmentOffset:j}},reset:q}}}),ef=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(a){var t,e;const{placement:r,middlewareData:o,rects:i,initialPlacement:c,platform:l,elements:p}=a,{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:x,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0,...k}=Gr(n,a);if((t=o.arrow)!=null&&t.alignmentOffset)return{};const f=Sn(r),S=Vt(c),E=Sn(c)===c,T=await(l.isRTL==null?void 0:l.isRTL(p.floating)),$=x||(E||!w?[Nr(c)]:zp(c)),O=b!=="none";!x&&O&&$.push(...Vp(c,w,b,T));const C=[c,...$],D=await l.detectOverflow(a,k),I=[];let L=((e=o.flip)==null?void 0:e.overflows)||[];if(d&&I.push(D[f]),m){const U=Hp(r,i,T);I.push(D[U[0]],D[U[1]])}if(L=[...L,{placement:r,overflows:I}],!I.every(U=>U<=0)){var z,A;const U=(((z=o.flip)==null?void 0:z.index)||0)+1,q=C[U];if(q&&(!(m==="alignment"?S!==Vt(q):!1)||L.every(M=>Vt(M.placement)===S?M.overflows[0]>0:!0)))return{data:{index:U,overflows:L},reset:{placement:q}};let j=(A=L.filter(H=>H.overflows[0]<=0).sort((H,M)=>H.overflows[1]-M.overflows[1])[0])==null?void 0:A.placement;if(!j)switch(y){case"bestFit":{var K;const H=(K=L.filter(M=>{if(O){const G=Vt(M.placement);return G===S||G==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(G=>G>0).reduce((G,Y)=>G+Y,0)]).sort((M,G)=>M[1]-G[1])[0])==null?void 0:K[0];H&&(j=H);break}case"initialPlacement":j=c;break}if(r!==j)return{reset:{placement:j}}}return{}}}},tf=new Set(["left","top"]);async function nf(n,a){const{placement:t,platform:e,elements:r}=n,o=await(e.isRTL==null?void 0:e.isRTL(r.floating)),i=Sn(t),c=er(t),l=Vt(t)==="y",p=tf.has(i)?-1:1,d=o&&l?-1:1,m=Gr(a,n);let{mainAxis:x,crossAxis:y,alignmentAxis:b}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof b=="number"&&(y=c==="end"?b*-1:b),l?{x:y*d,y:x*p}:{x:x*p,y:y*d}}const rf=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(a){var t,e;const{x:r,y:o,placement:i,middlewareData:c}=a,l=await nf(a,n);return i===((t=c.offset)==null?void 0:t.placement)&&(e=c.arrow)!=null&&e.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:i}}}}};function Xr(){return typeof window<"u"}function En(n){return Mc(n)?(n.nodeName||"").toLowerCase():"#document"}function Ae(n){var a;return(n==null||(a=n.ownerDocument)==null?void 0:a.defaultView)||window}function St(n){var a;return(a=(Mc(n)?n.ownerDocument:n.document)||window.document)==null?void 0:a.documentElement}function Mc(n){return Xr()?n instanceof Node||n instanceof Ae(n).Node:!1}function Oe(n){return Xr()?n instanceof Element||n instanceof Ae(n).Element:!1}function Yt(n){return Xr()?n instanceof HTMLElement||n instanceof Ae(n).HTMLElement:!1}function oi(n){return!Xr()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Ae(n).ShadowRoot}function Jr(n){const{overflow:a,overflowX:t,overflowY:e,display:r}=Xe(n);return/auto|scroll|overlay|hidden|clip/.test(a+e+t)&&r!=="inline"&&r!=="contents"}function af(n){return/^(table|td|th)$/.test(En(n))}function Zr(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const of=/transform|translate|scale|rotate|perspective|filter/,sf=/paint|layout|strict|content/,Kt=n=>!!n&&n!=="none";let ba;function no(n){const a=Oe(n)?Xe(n):n;return Kt(a.transform)||Kt(a.translate)||Kt(a.scale)||Kt(a.rotate)||Kt(a.perspective)||!ro()&&(Kt(a.backdropFilter)||Kt(a.filter))||of.test(a.willChange||"")||sf.test(a.contain||"")}function cf(n){let a=rn(n);for(;Yt(a)&&!Gn(a);){if(no(a))return a;if(Zr(a))return null;a=rn(a)}return null}function ro(){return ba==null&&(ba=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ba}function Gn(n){return/^(html|body|#document)$/.test(En(n))}function Xe(n){return Ae(n).getComputedStyle(n)}function ea(n){return Oe(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function rn(n){if(En(n)==="html")return n;const a=n.assignedSlot||n.parentNode||oi(n)&&n.host||St(n);return oi(a)?a.host:a}function _c(n){const a=rn(n);return Gn(a)?(n.ownerDocument||n).body:Yt(a)&&Jr(a)?a:_c(a)}function Xn(n,a,t){var e;a===void 0&&(a=[]),t===void 0&&(t=!0);const r=_c(n),o=r===((e=n.ownerDocument)==null?void 0:e.body),i=Ae(r);if(o){const c=za(i);return a.concat(i,i.visualViewport||[],Jr(r)?r:[],c&&t?Xn(c):[])}else return a.concat(r,Xn(r,[],t))}function za(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function jc(n){const a=Xe(n);let t=parseFloat(a.width)||0,e=parseFloat(a.height)||0;const r=Yt(n),o=r?n.offsetWidth:t,i=r?n.offsetHeight:e,c=$r(t)!==o||$r(e)!==i;return c&&(t=o,e=i),{width:t,height:e,$:c}}function ao(n){return Oe(n)?n:n.contextElement}function wn(n){const a=ao(n);if(!Yt(a))return yt(1);const t=a.getBoundingClientRect(),{width:e,height:r,$:o}=jc(a);let i=(o?$r(t.width):t.width)/e,c=(o?$r(t.height):t.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const lf=yt(0);function Ic(n){const a=Ae(n);return!ro()||!a.visualViewport?lf:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function df(n,a,t){return a===void 0&&(a=!1),!!t&&a&&t===Ae(n)}function an(n,a,t,e){a===void 0&&(a=!1),t===void 0&&(t=!1);const r=n.getBoundingClientRect(),o=ao(n);let i=yt(1);a&&(e?Oe(e)&&(i=wn(e)):i=wn(n));const c=df(o,t,e)?Ic(o):yt(0);let l=(r.left+c.x)/i.x,p=(r.top+c.y)/i.y,d=r.width/i.x,m=r.height/i.y;if(o&&e){const x=Ae(o),y=Oe(e)?Ae(e):e;let b=x,w=za(b);for(;w&&y!==b;){const k=wn(w),f=w.getBoundingClientRect(),S=Xe(w),E=f.left+(w.clientLeft+parseFloat(S.paddingLeft))*k.x,T=f.top+(w.clientTop+parseFloat(S.paddingTop))*k.y;l*=k.x,p*=k.y,d*=k.x,m*=k.y,l+=E,p+=T,b=Ae(w),w=za(b)}}return Or({width:d,height:m,x:l,y:p})}function ta(n,a){const t=ea(n).scrollLeft;return a?a.left+t:an(St(n)).left+t}function Pc(n,a){const t=n.getBoundingClientRect(),e=t.left+a.scrollLeft-ta(n,t),r=t.top+a.scrollTop;return{x:e,y:r}}function uf(n){let{elements:a,rect:t,offsetParent:e,strategy:r}=n;const o=r==="fixed",i=St(e),c=a?Zr(a.floating):!1;if(e===i||c&&o)return t;let l={scrollLeft:0,scrollTop:0},p=yt(1);const d=yt(0),m=Yt(e);if((m||!o)&&((En(e)!=="body"||Jr(i))&&(l=ea(e)),m)){const y=an(e);p=wn(e),d.x=y.x+e.clientLeft,d.y=y.y+e.clientTop}const x=i&&!m&&!o?Pc(i,l):yt(0);return{width:t.width*p.x,height:t.height*p.y,x:t.x*p.x-l.scrollLeft*p.x+d.x+x.x,y:t.y*p.y-l.scrollTop*p.y+d.y+x.y}}function pf(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function ff(n){const a=ea(n),t=n.ownerDocument.body,e=Xt(n.scrollWidth,n.clientWidth,t.scrollWidth,t.clientWidth),r=Xt(n.scrollHeight,n.clientHeight,t.scrollHeight,t.clientHeight);let o=-a.scrollLeft+ta(n);const i=-a.scrollTop;return Xe(t).direction==="rtl"&&(o+=Xt(n.clientWidth,t.clientWidth)-e),{width:e,height:r,x:o,y:i}}const hf=25;function mf(n,a,t){t===void 0&&(t="viewport");const e=t==="layoutViewport",r=Ae(n),o=St(n),i=r.visualViewport;let c=o.clientWidth,l=o.clientHeight,p=0,d=0;if(i){const x=!ro()||a==="fixed";e?x||(p=-i.offsetLeft,d=-i.offsetTop):(c=i.width,l=i.height,x&&(p=i.offsetLeft,d=i.offsetTop))}if(ta(o)<=0){const x=o.ownerDocument,y=x.body,b=getComputedStyle(y),w=x.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,k=Math.abs(o.clientWidth-y.clientWidth-w),f=getComputedStyle(o).scrollbarGutter==="stable both-edges"?k/2:k;f<=hf&&(c-=f)}return{width:c,height:l,x:p,y:d}}function gf(n,a){const t=an(n,!0,a==="fixed"),e=t.top+n.clientTop,r=t.left+n.clientLeft,o=wn(n),i=n.clientWidth*o.x,c=n.clientHeight*o.y,l=r*o.x,p=e*o.y;return{width:i,height:c,x:l,y:p}}function ii(n,a,t){let e;if(a==="viewport"||a==="layoutViewport")e=mf(n,t,a);else if(a==="document")e=ff(St(n));else if(Oe(a))e=gf(a,t);else{const r=Ic(n);e={x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}return Or(e)}function xf(n,a){const t=a.get(n);if(t)return t;let e=Xn(n,[],!1).filter(c=>Oe(c)&&En(c)!=="body"),r=null;const o=Xe(n).position==="fixed";let i=o?rn(n):n;for(;Oe(i)&&!Gn(i);){const c=Xe(i),l=no(i),p=r?r.position:o?"fixed":"";!l&&(p==="fixed"||p==="absolute"&&c.position==="static")?e=e.filter(m=>m!==i):r=c,i=rn(i)}return a.set(n,e),e}function yf(n){let{element:a,boundary:t,rootBoundary:e,strategy:r}=n;const i=[...t==="clippingAncestors"?Zr(a)?[]:xf(a,this._c):[].concat(t),e],c=ii(a,i[0],r);let l=c.top,p=c.right,d=c.bottom,m=c.left;for(let x=1;x<i.length;x++){const y=ii(a,i[x],r);l=Xt(y.top,l),p=Cn(y.right,p),d=Cn(y.bottom,d),m=Xt(y.left,m)}return{width:p-m,height:d-l,x:m,y:l}}function bf(n){const{width:a,height:t}=jc(n);return{width:a,height:t}}function vf(n,a,t){const e=Yt(a),r=St(a),o=t==="fixed",i=an(n,!0,o,a);let c={scrollLeft:0,scrollTop:0};const l=yt(0);if((e||!o)&&((En(a)!=="body"||Jr(r))&&(c=ea(a)),e)){const x=an(a,!0,o,a);l.x=x.x+a.clientLeft,l.y=x.y+a.clientTop}!e&&r&&(l.x=ta(r));const p=r&&!e&&!o?Pc(r,c):yt(0),d=i.left+c.scrollLeft-l.x-p.x,m=i.top+c.scrollTop-l.y-p.y;return{x:d,y:m,width:i.width,height:i.height}}function va(n){return Xe(n).position==="static"}function si(n,a){if(!Yt(n)||Xe(n).position==="fixed")return null;if(a)return a(n);let t=n.offsetParent;return St(n)===t&&(t=t.ownerDocument.body),t}function Ec(n,a){const t=Ae(n);if(Zr(n))return t;if(!Yt(n)){let r=rn(n);for(;r&&!Gn(r);){if(Oe(r)&&!va(r))return r;r=rn(r)}return t}let e=si(n,a);for(;e&&af(e)&&va(e);)e=si(e,a);return e&&Gn(e)&&va(e)&&!no(e)?t:e||cf(n)||t}const wf=async function(n){const a=this.getOffsetParent||Ec,t=this.getDimensions,e=await t(n.floating);return{reference:vf(n.reference,await a(n.floating),n.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function kf(n){return Xe(n).direction==="rtl"}const Df={convertOffsetParentRelativeRectToViewportRelativeRect:uf,getDocumentElement:St,getClippingRect:yf,getOffsetParent:Ec,getElementRects:wf,getClientRects:pf,getDimensions:bf,getScale:wn,isElement:Oe,isRTL:kf};function Tc(n,a){return n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function Cf(n,a,t){let e=null,r;const o=St(n);function i(){var d;clearTimeout(r),(d=e)==null||d.disconnect(),e=null}function c(d,m){d===void 0&&(d=!1),m===void 0&&(m=1),i();const x=n.getBoundingClientRect(),{left:y,top:b,width:w,height:k}=x;if(d||a(),!w||!k)return;const f=xr(b),S=xr(o.clientWidth-(y+w)),E=xr(o.clientHeight-(b+k)),T=xr(y),O={rootMargin:-f+"px "+-S+"px "+-E+"px "+-T+"px",threshold:Xt(0,Cn(1,m))||1};let C=!0;function D(I){const L=I[0].intersectionRatio;if(!Tc(x,n.getBoundingClientRect()))return c();if(L!==m){if(!C)return c();L?c(!1,L):r=setTimeout(()=>{c(!1,1e-7)},1e3)}C=!1}try{e=new IntersectionObserver(D,{...O,root:o.ownerDocument})}catch{e=new IntersectionObserver(D,O)}e.observe(n)}const l=Ae(n),p=()=>c(t);return l.addEventListener("resize",p),c(!0),()=>{l.removeEventListener("resize",p),i()}}function Sf(n,a,t,e){e===void 0&&(e={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=e,p=ao(n),d=r||o?[...p?Xn(p):[],...a?Xn(a):[]]:[];d.forEach(f=>{r&&f.addEventListener("scroll",t),o&&f.addEventListener("resize",t)});const m=p&&c?Cf(p,t,o):null;let x=-1,y=null;i&&(y=new ResizeObserver(f=>{let[S]=f;S&&S.target===p&&y&&a&&(y.unobserve(a),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var E;(E=y)==null||E.observe(a)})),t()}),p&&!l&&y.observe(p),a&&y.observe(a));let b,w=l?an(n):null;l&&k();function k(){const f=an(n);w&&!Tc(w,f)&&t(),w=f,b=requestAnimationFrame(k)}return t(),()=>{var f;d.forEach(S=>{r&&S.removeEventListener("scroll",t),o&&S.removeEventListener("resize",t)}),m==null||m(),(f=y)==null||f.disconnect(),y=null,l&&cancelAnimationFrame(b)}}const Mf=rf,_f=ef,ci=Zp,jf=(n,a,t)=>{const e=new Map,r=t??{},o={...Df,...r.platform,_c:e};return Jp(n,a,{...r,platform:o})};var If=typeof document<"u",Pf=function(){},_r=If?v.useLayoutEffect:Pf;function Rr(n,a){if(n===a)return!0;if(typeof n!=typeof a)return!1;if(typeof n=="function"&&n.toString()===a.toString())return!0;let t,e,r;if(n&&a&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==a.length)return!1;for(e=t;e--!==0;)if(!Rr(n[e],a[e]))return!1;return!0}if(r=Object.keys(n),t=r.length,t!==Object.keys(a).length)return!1;for(e=t;e--!==0;)if(!{}.hasOwnProperty.call(a,r[e]))return!1;for(e=t;e--!==0;){const o=r[e];if(!(o==="_owner"&&n.$$typeof)&&!Rr(n[o],a[o]))return!1}return!0}return n!==n&&a!==a}function $c(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function li(n,a){const t=$c(n);return Math.round(a*t)/t}function wa(n){const a=v.useRef(n);return _r(()=>{a.current=n}),a}function Ef(n){n===void 0&&(n={});const{placement:a="bottom",strategy:t="absolute",middleware:e=[],platform:r,elements:{reference:o,floating:i}={},transform:c=!0,whileElementsMounted:l,open:p}=n,[d,m]=v.useState({x:0,y:0,strategy:t,placement:a,middlewareData:{},isPositioned:!1}),[x,y]=v.useState(e);Rr(x,e)||y(e);const[b,w]=v.useState(null),[k,f]=v.useState(null),S=v.useCallback(M=>{M!==O.current&&(O.current=M,w(M))},[]),E=v.useCallback(M=>{M!==C.current&&(C.current=M,f(M))},[]),T=o||b,$=i||k,O=v.useRef(null),C=v.useRef(null),D=v.useRef(d),I=l!=null,L=wa(l),z=wa(r),A=wa(p),K=v.useCallback(()=>{if(!O.current||!C.current)return;const M={placement:a,strategy:t,middleware:x};z.current&&(M.platform=z.current),jf(O.current,C.current,M).then(G=>{const Y={...G,isPositioned:A.current!==!1};U.current&&!Rr(D.current,Y)&&(D.current=Y,Ul.flushSync(()=>{m(Y)}))})},[x,a,t,z,A]);_r(()=>{p===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,m(M=>({...M,isPositioned:!1})))},[p]);const U=v.useRef(!1);_r(()=>(U.current=!0,()=>{U.current=!1}),[]),_r(()=>{if(T&&(O.current=T),$&&(C.current=$),T&&$){if(L.current)return L.current(T,$,K);K()}},[T,$,K,L,I]);const q=v.useMemo(()=>({reference:O,floating:C,setReference:S,setFloating:E}),[S,E]),j=v.useMemo(()=>({reference:T,floating:$}),[T,$]),H=v.useMemo(()=>{const M={position:t,left:0,top:0};if(!j.floating)return M;const G=li(j.floating,d.x),Y=li(j.floating,d.y);return c?{...M,transform:"translate("+G+"px, "+Y+"px)",...$c(j.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:G,top:Y}},[t,c,j.floating,d.x,d.y]);return v.useMemo(()=>({...d,update:K,refs:q,elements:j,floatingStyles:H}),[d,K,q,j,H])}const Tf=n=>{function a(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:e,padding:r}=typeof n=="function"?n(t):n;return e&&a(e)?e.current!=null?ci({element:e.current,padding:r}).fn(t):{}:e?ci({element:e,padding:r}).fn(t):{}}}},$f=(n,a)=>{const t=Mf(n);return{name:t.name,fn:t.fn,options:[n,a]}},Nf=(n,a)=>{const t=_f(n);return{name:t.name,fn:t.fn,options:[n,a]}},Of=(n,a)=>{const t=Tf(n);return{name:t.name,fn:t.fn,options:[n,a]}},Nc=216n,Rf=(1n<<Nc)-1n;function Af(n){const a=typeof n=="bigint"?n:BigInt(n.trim());if(a<0n)throw new Error(`Invalid tokenId: ${String(n)}`);return{itemId:(a>>Nc).toString(),issuedId:(a&Rf).toString()}}function Lf(n){if(!n)return null;try{return Af(n).itemId}catch{return null}}const Oc=["cancelled-listings"];function Ff(n,a){a&&n.setQueryData(Oc,t=>t!=null&&t.includes(a)?t:[...t??[],a])}function di(n,a){var t;if(a)return(t=n.getQueryData(Oc))!=null&&t.includes(a)?void 0:a}function ui(n,a){return a.kind==="listed"?{...n,isOnSale:!0,listingPrice:a.priceCredits,tradeId:a.tradeId??n.tradeId}:{...n,isOnSale:!1,listingPrice:void 0,tradeId:void 0}}function ka(n,a,t){const{address:e,contractAddress:r,tokenId:o}=a;if(!r||!o)return;const i=`${r}-${o}`;n.cancelQueries({queryKey:["owned-token",r,o]}),n.cancelQueries({queryKey:["secondary-sale-state"]}),e&&n.cancelQueries({queryKey:["my-assets",e]});const c=t.kind==="gone";n.setQueriesData({queryKey:["owned-token",r,o]},p=>p&&(c?null:ui(p,t)));const l=e?["my-assets",e]:["my-assets"];n.setQueriesData({queryKey:l},p=>p!=null&&p.pages?{...p,pages:p.pages.map(d=>{if(c){const m=d.items.filter(x=>!(x.contractAddress===r&&x.tokenId===o));return{...d,items:m,total:Math.max(0,d.total-(d.items.length-m.length))}}return{...d,items:d.items.map(m=>m.contractAddress===r&&m.tokenId===o?ui(m,t):m)}})}:p),n.setQueriesData({queryKey:["secondary-sale-state"]},p=>{var m;if(!p)return p;const d={...p};return t.kind==="removed"||t.kind==="gone"?delete d[i]:d[i]={priceCredits:t.priceCredits,tradeId:t.tradeId??((m=d[i])==null?void 0:m.tradeId)??""},d})}function Yf(n){return!(n.isMarket||n.forSale&&n.priceKnown||n.manage||n.soldOutWithResale||!n.stillResolving&&!n.resolvingTrade&&(n.isTokenRoute?!n.ownedAssetLoading:!n.deepLinkLoading))}const Wf="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==",Bf="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=",Hf=g.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
|
+
`,zf=g.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 ${u.colors.gray4};
|
|
15
|
+
`,qf=g.h2`
|
|
16
|
+
margin: 0;
|
|
17
|
+
font-family: ${u.font.sans};
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
font-size: 20px;
|
|
20
|
+
line-height: 1.6;
|
|
21
|
+
color: ${u.colors.text};
|
|
22
|
+
`,Kf=g.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: ${u.colors.text};
|
|
32
|
+
|
|
33
|
+
&:disabled {
|
|
34
|
+
opacity: 0.4;
|
|
35
|
+
cursor: default;
|
|
36
|
+
}
|
|
37
|
+
&:focus-visible {
|
|
38
|
+
outline: 2px solid ${u.colors.accent};
|
|
39
|
+
outline-offset: 2px;
|
|
40
|
+
}
|
|
41
|
+
`,Qf=g.div`
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 12px;
|
|
45
|
+
`,Vf=g.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: ${u.colors.media};
|
|
53
|
+
border: 0.176px solid ${u.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
|
+
${u.media.maxWidth("mobile")} {
|
|
64
|
+
width: 120px;
|
|
65
|
+
height: 120px;
|
|
66
|
+
}
|
|
67
|
+
`,Uf=g.div`
|
|
68
|
+
flex: 1 1 0;
|
|
69
|
+
min-width: 0;
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
gap: 32px;
|
|
73
|
+
padding: 8px;
|
|
74
|
+
`,Gf=g.p`
|
|
75
|
+
margin: 0;
|
|
76
|
+
font-family: ${u.font.sans};
|
|
77
|
+
font-weight: 600;
|
|
78
|
+
font-size: 20px;
|
|
79
|
+
line-height: 1.57;
|
|
80
|
+
color: ${u.colors.text};
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
text-overflow: ellipsis;
|
|
83
|
+
`,Xf=g.div`
|
|
84
|
+
> div {
|
|
85
|
+
font-family: ${u.font.sans};
|
|
86
|
+
font-size: 10px;
|
|
87
|
+
line-height: 1.43;
|
|
88
|
+
color: ${u.colors.muted};
|
|
89
|
+
}
|
|
90
|
+
`,Jf=g.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: ${u.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: ${u.font.sans};
|
|
107
|
+
font-weight: 600;
|
|
108
|
+
font-size: 24px;
|
|
109
|
+
color: ${u.colors.text2};
|
|
110
|
+
}
|
|
111
|
+
`,Zf=g.div`
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
gap: 12px;
|
|
115
|
+
`,pi=g.button`
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: space-between;
|
|
119
|
+
width: 100%;
|
|
120
|
+
padding: 12px 12px 12px 0;
|
|
121
|
+
border-radius: 12px;
|
|
122
|
+
border: 0.5px solid ${u.colors.muted};
|
|
123
|
+
background: ${u.colors.white};
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
text-align: left;
|
|
126
|
+
font-family: ${u.font.sans};
|
|
127
|
+
|
|
128
|
+
&[data-selected='true'] {
|
|
129
|
+
/* Flare gradient border (melon → ruby) painted over the row fill via the border-box trick, so the
|
|
130
|
+
12px corners stay rounded (border-image can't clip them). Fill is gray-5 when selected. */
|
|
131
|
+
background:
|
|
132
|
+
linear-gradient(${u.colors.media}, ${u.colors.media}) padding-box,
|
|
133
|
+
${u.gradients.flare} border-box;
|
|
134
|
+
border: 3px solid transparent;
|
|
135
|
+
}
|
|
136
|
+
&[data-disabled='true'] {
|
|
137
|
+
cursor: not-allowed;
|
|
138
|
+
opacity: 0.55;
|
|
139
|
+
}
|
|
140
|
+
&:focus-visible {
|
|
141
|
+
outline: 2px solid ${u.colors.accent};
|
|
142
|
+
outline-offset: 2px;
|
|
143
|
+
}
|
|
144
|
+
`,fi=g.div`
|
|
145
|
+
flex: none;
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
justify-content: center;
|
|
149
|
+
min-width: 36px;
|
|
150
|
+
/* 12px on the left (per review) so the control clears the row's rounded corner; 9px elsewhere. */
|
|
151
|
+
padding: 9px 9px 9px 12px;
|
|
152
|
+
`,hi=g.span`
|
|
153
|
+
display: grid;
|
|
154
|
+
place-items: center;
|
|
155
|
+
width: 20px;
|
|
156
|
+
height: 20px;
|
|
157
|
+
border-radius: 4px;
|
|
158
|
+
border: 2px solid ${u.colors.muted2};
|
|
159
|
+
background: ${u.colors.white};
|
|
160
|
+
|
|
161
|
+
&[data-checked='true'] {
|
|
162
|
+
border-color: ${u.colors.text};
|
|
163
|
+
background: ${u.colors.text};
|
|
164
|
+
}
|
|
165
|
+
.ico {
|
|
166
|
+
width: 14px;
|
|
167
|
+
height: 14px;
|
|
168
|
+
background: ${u.colors.white};
|
|
169
|
+
}
|
|
170
|
+
`,mi=g.div`
|
|
171
|
+
flex: 1 1 0;
|
|
172
|
+
min-width: 0;
|
|
173
|
+
display: flex;
|
|
174
|
+
align-items: center;
|
|
175
|
+
justify-content: space-between;
|
|
176
|
+
gap: 8px;
|
|
177
|
+
`,gi=g.div`
|
|
178
|
+
display: flex;
|
|
179
|
+
align-items: center;
|
|
180
|
+
gap: 13px;
|
|
181
|
+
min-width: 0;
|
|
182
|
+
`,xi=g.span`
|
|
183
|
+
flex: none;
|
|
184
|
+
display: grid;
|
|
185
|
+
place-items: center;
|
|
186
|
+
`,yi=g.img`
|
|
187
|
+
flex: none;
|
|
188
|
+
display: block;
|
|
189
|
+
width: ${({w:n})=>n}px;
|
|
190
|
+
height: ${({h:n})=>n}px;
|
|
191
|
+
object-fit: contain;
|
|
192
|
+
`,bi=g.div`
|
|
193
|
+
display: flex;
|
|
194
|
+
flex-direction: column;
|
|
195
|
+
min-width: 0;
|
|
196
|
+
`,vi=g.span`
|
|
197
|
+
text-transform: capitalize;
|
|
198
|
+
font-family: ${u.font.sans};
|
|
199
|
+
font-weight: 700;
|
|
200
|
+
font-size: 15px;
|
|
201
|
+
line-height: 26px;
|
|
202
|
+
letter-spacing: -0.2px;
|
|
203
|
+
color: ${u.colors.text2};
|
|
204
|
+
`,wi=g.span`
|
|
205
|
+
display: flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
gap: 4px;
|
|
208
|
+
font-family: ${u.font.sans};
|
|
209
|
+
font-size: 12px;
|
|
210
|
+
line-height: 1;
|
|
211
|
+
color: ${u.colors.muted1};
|
|
212
|
+
|
|
213
|
+
/* A 13px slot holding a 10.4px glyph. */
|
|
214
|
+
.ico {
|
|
215
|
+
width: 13px;
|
|
216
|
+
height: 13px;
|
|
217
|
+
background: ${u.colors.text};
|
|
218
|
+
-webkit-mask-size: 10.4px 10.4px;
|
|
219
|
+
mask-size: 10.4px 10.4px;
|
|
220
|
+
-webkit-mask-position: left center;
|
|
221
|
+
mask-position: left center;
|
|
222
|
+
}
|
|
223
|
+
`,ki=g.span`
|
|
224
|
+
font-size: 10.4px;
|
|
225
|
+
color: ${u.colors.text};
|
|
226
|
+
`;g.span`
|
|
227
|
+
font-family: ${u.font.sans};
|
|
228
|
+
font-size: 12px;
|
|
229
|
+
font-weight: 600;
|
|
230
|
+
color: ${u.colors.dclRed};
|
|
231
|
+
`;const Di=g.div`
|
|
232
|
+
flex: none;
|
|
233
|
+
display: flex;
|
|
234
|
+
align-items: center;
|
|
235
|
+
gap: 6px;
|
|
236
|
+
|
|
237
|
+
.ico {
|
|
238
|
+
width: 24px;
|
|
239
|
+
height: 24px;
|
|
240
|
+
background: ${u.colors.text2};
|
|
241
|
+
-webkit-mask-size: 19.855px 19.855px;
|
|
242
|
+
mask-size: 19.855px 19.855px;
|
|
243
|
+
-webkit-mask-position: left center;
|
|
244
|
+
mask-position: left center;
|
|
245
|
+
}
|
|
246
|
+
span {
|
|
247
|
+
font-family: ${u.font.sans};
|
|
248
|
+
font-weight: 600;
|
|
249
|
+
font-size: 20px;
|
|
250
|
+
color: ${u.colors.text2};
|
|
251
|
+
}
|
|
252
|
+
`,Ci=g.div`
|
|
253
|
+
flex: none;
|
|
254
|
+
display: flex;
|
|
255
|
+
flex-direction: column;
|
|
256
|
+
align-items: flex-end;
|
|
257
|
+
gap: 2px;
|
|
258
|
+
`,eh=g.button`
|
|
259
|
+
width: 100%;
|
|
260
|
+
height: 46px;
|
|
261
|
+
border: 0;
|
|
262
|
+
border-radius: 12px;
|
|
263
|
+
cursor: pointer;
|
|
264
|
+
background: ${u.gradients.amethyst};
|
|
265
|
+
color: ${u.colors.softWhite};
|
|
266
|
+
font-family: ${u.font.sans};
|
|
267
|
+
font-weight: 600;
|
|
268
|
+
font-size: 15px;
|
|
269
|
+
line-height: 24px;
|
|
270
|
+
letter-spacing: 0.46px;
|
|
271
|
+
text-transform: uppercase;
|
|
272
|
+
|
|
273
|
+
&:hover:not(:disabled) {
|
|
274
|
+
filter: brightness(1.05);
|
|
275
|
+
}
|
|
276
|
+
&:focus-visible {
|
|
277
|
+
outline: 2px solid ${u.colors.accent};
|
|
278
|
+
outline-offset: 2px;
|
|
279
|
+
}
|
|
280
|
+
&:disabled {
|
|
281
|
+
opacity: 0.6;
|
|
282
|
+
cursor: default;
|
|
283
|
+
}
|
|
284
|
+
`,th=g.img`
|
|
285
|
+
width: 13px;
|
|
286
|
+
height: 13px;
|
|
287
|
+
display: block;
|
|
288
|
+
`,nh=g.img`
|
|
289
|
+
width: 24px;
|
|
290
|
+
height: 24px;
|
|
291
|
+
display: block;
|
|
292
|
+
`;g.span`
|
|
293
|
+
flex: none;
|
|
294
|
+
width: 32px;
|
|
295
|
+
display: grid;
|
|
296
|
+
gap: 2px;
|
|
297
|
+
place-items: center;
|
|
298
|
+
|
|
299
|
+
.ico {
|
|
300
|
+
width: 15px;
|
|
301
|
+
height: 15px;
|
|
302
|
+
background: ${u.colors.text2};
|
|
303
|
+
}
|
|
304
|
+
img {
|
|
305
|
+
width: 15px;
|
|
306
|
+
height: 15px;
|
|
307
|
+
display: block;
|
|
308
|
+
}
|
|
309
|
+
`;g.div`
|
|
310
|
+
flex: none;
|
|
311
|
+
display: flex;
|
|
312
|
+
align-items: center;
|
|
313
|
+
gap: 4px;
|
|
314
|
+
|
|
315
|
+
.ico {
|
|
316
|
+
width: 18px;
|
|
317
|
+
height: 18px;
|
|
318
|
+
background: ${u.colors.text2};
|
|
319
|
+
}
|
|
320
|
+
img {
|
|
321
|
+
width: 18px;
|
|
322
|
+
height: 18px;
|
|
323
|
+
display: block;
|
|
324
|
+
}
|
|
325
|
+
span {
|
|
326
|
+
font-family: ${u.font.sans};
|
|
327
|
+
font-weight: 600;
|
|
328
|
+
font-size: 17px;
|
|
329
|
+
color: ${u.colors.text2};
|
|
330
|
+
}
|
|
331
|
+
`;g.span`
|
|
332
|
+
font-family: ${u.font.sans};
|
|
333
|
+
font-weight: 600;
|
|
334
|
+
font-size: 15px;
|
|
335
|
+
color: ${u.colors.muted};
|
|
336
|
+
`;const rh=g.span`
|
|
337
|
+
font-family: ${u.font.sans};
|
|
338
|
+
font-size: 11px;
|
|
339
|
+
line-height: 1.35;
|
|
340
|
+
color: ${u.colors.muted};
|
|
341
|
+
`,ah=g.p`
|
|
342
|
+
display: flex;
|
|
343
|
+
align-items: flex-start;
|
|
344
|
+
gap: 12px;
|
|
345
|
+
margin: 0;
|
|
346
|
+
background: rgba(255, 162, 90, 0.3);
|
|
347
|
+
border-radius: ${u.radius.btn};
|
|
348
|
+
padding: 16px;
|
|
349
|
+
font-family: ${u.font.sans};
|
|
350
|
+
font-size: 14px;
|
|
351
|
+
line-height: 1.334;
|
|
352
|
+
color: ${u.colors.text2};
|
|
353
|
+
`;function oh({item:n,priceCredits:a,priceCents:t,options:e,priceManaWei:r,balanceCredits:o,manaBalanceWei:i,onBuy:c,onClose:l,busy:p=!1,notice:d}){const m=e.find(D=>D.method==="credits")??null,x=e.find(D=>D.method==="mana")??null,y=e.find(D=>D.method==="combined")??null,[b,w]=v.useState(()=>m?new Set(["credits"]):y?new Set(["credits","mana"]):x?new Set(["mana"]):new Set),k=!!m||!!y,f=!!x||!!y;v.useEffect(()=>{w(D=>{const I=new Set(D);return I.has("credits")&&!k&&I.delete("credits"),I.has("mana")&&!f&&I.delete("mana"),I.size===D.size?D:I})},[k,f]);const S=b.has("credits"),E=b.has("mana"),T=S&&E?y?"combined":null:S?m?"credits":null:E&&x?"mana":null,$=T==="combined"&&y?y.credits:(m==null?void 0:m.credits)??$t(t),O=T==="combined"&&y?y.manaWei:(x==null?void 0:x.manaWei)??r;function C(D){w(I=>{const L=new Set(I);return L.has(D)?L.delete(D):L.add(D),L})}return s.jsxs(Hf,{children:[s.jsxs(zf,{children:[s.jsx(qf,{children:h("buyModal.choosePayment")}),s.jsx(Kf,{onClick:l,disabled:p,"aria-label":h("buyModal.close"),children:s.jsx(V,{name:"close",className:"ico"})})]}),s.jsxs(Qf,{children:[s.jsx(Vf,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsxs(Uf,{children:[s.jsxs("div",{children:[s.jsx(Gf,{title:n.name,children:n.name||h("buyModal.itemFallback")}),n.creator?s.jsx(Xf,{children:s.jsx(Jl,{address:n.creator})}):null]}),s.jsxs(Jf,{children:[s.jsx(Re,{}),s.jsx("span",{children:Ot(a)})]})]})]}),s.jsxs(Zf,{children:[s.jsxs(pi,{type:"button","data-testid":"pay-with-credits","data-selected":S,"data-disabled":!k,disabled:p||!k,"aria-pressed":S,onClick:()=>C("credits"),children:[s.jsx(fi,{children:s.jsx(hi,{"data-checked":S,children:s.jsx(V,{name:"check",className:"ico"})})}),s.jsxs(mi,{children:[s.jsxs(gi,{children:[s.jsx(xi,{children:s.jsx(yi,{src:Wf,w:32.582,h:34.401,alt:"","aria-hidden":!0})}),s.jsxs(bi,{children:[s.jsx(vi,{children:Ue.name}),s.jsxs(wi,{children:[h("buyModal.creditsBalanceLabel"),s.jsx(Re,{}),s.jsx(ki,{children:Ot(o)})]})]})]}),s.jsx(Ci,{children:s.jsxs(Di,{children:[s.jsx(Re,{}),s.jsx("span",{children:Ot($)})]})})]})]}),s.jsxs(pi,{type:"button","data-testid":"pay-with-mana","data-selected":E,"data-disabled":!f,disabled:p||!f,"aria-pressed":E,onClick:()=>C("mana"),children:[s.jsx(fi,{children:s.jsx(hi,{"data-checked":E,children:s.jsx(V,{name:"check",className:"ico"})})}),s.jsxs(mi,{children:[s.jsxs(gi,{children:[s.jsx(xi,{children:s.jsx(yi,{src:Bf,w:35.328,h:35.328,alt:"","aria-hidden":!0})}),s.jsxs(bi,{children:[s.jsx(vi,{children:h("buyModal.methodMana")}),s.jsxs(wi,{children:[h("buyModal.manaBalanceLabel"),s.jsx(th,{src:Jo,alt:"","aria-hidden":!0}),s.jsx(ki,{children:Ho(i)})]})]})]}),s.jsx(Ci,{children:f?s.jsx(s.Fragment,{children:s.jsxs(Di,{children:[s.jsx(nh,{src:Jo,alt:"","aria-hidden":!0}),s.jsx("span",{children:Ho(O)})]})}):s.jsx(rh,{"data-testid":"mana-shortfall-note",children:h("buyModal.notEnoughMana")})})]})]})]}),d?s.jsx(ah,{"data-testid":"price-changed",role:"status",children:d}):null,s.jsx(eh,{type:"button","data-testid":"confirm-payment",disabled:p||T===null,onClick:()=>T&&c(T),children:h("buyModal.buy")})]})}function Rc(){const n=new Map,a=new Set,t=new Set,e=new Set;return{submitStarted:r=>{e.add(r)},submitFinished:r=>{e.delete(r)},broadcast:(r,o)=>{const i=n.get(r);i?i.add(o):n.set(r,new Set([o]))},reverted:r=>{a.add(r)},unobservable:r=>{t.add(r)},isInFlight:r=>e.has(r),mayBeConsumed:r=>{if(t.has(r))return!0;const o=n.get(r);if(!o)return!1;for(const i of o)if(!a.has(i))return!0;return!1}}}const ih=Cp("0.05");async function sh(n){try{return(await new Dp(At.rpcUrl).getBalance(n)).gte(ih)}catch{return!1}}async function ch(n,a){return Qr(n)?sh(a):!1}function lh({size:n=64,...a}){return s.jsxs("svg",{viewBox:"0 0 64 64",width:n,height:n,"aria-hidden":!0,...a,children:[s.jsx("circle",{cx:"32",cy:"32",r:"32",fill:"#34ce74"}),s.jsx("path",{d:"M20 33l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const dh=n=>sd(n.contractAddress,String(n.itemId));async function Si(n,a={}){if(n.kind==="store")return BigInt(n.mint.item.priceWei);try{return await cd(n.trade)}catch(t){return a.reportFailure!==!1&&Se(t,{flow:"buy",step:"mana_price"}),null}}function Mi(n){return n.kind==="trade"?n.trade.id:void 0}function _i(n){return n.contractAddress&&n.itemId!=null?{contractAddress:n.contractAddress,itemId:String(n.itemId)}:void 0}function qa({item:n,onClose:a,resume:t=!1}){var It,Pt;const{session:e}=tn(),{data:r}=lc(e),{data:o}=Zl(e),i=ln(),c=cn();async function l(){try{return await i.fetchQuery({queryKey:["mana-rate",At.chainId],queryFn:()=>id(At.chainId),staleTime:6e4})}catch{return}}const p=pp().packs.slice(0,fp),[d,m]=v.useState("loading"),[x,y]=v.useState(null),[b,w]=v.useState(null),[k,f]=v.useState(!1),[S,E]=v.useState(0),[T,$]=v.useState(""),[O,C]=v.useState(n.priceCredits),[D,I]=v.useState(null),[L,z]=v.useState(!1),[A,K]=v.useState(null),[U,q]=v.useState(0),[j,H]=v.useState(null),[M,G]=v.useState(!1),Y=v.useRef(null),J=v.useRef(!1),de=v.useRef(Rc()),Ee=(j==null?void 0:j.credits)??O,ke=(r==null?void 0:r.credits)??0;v.useEffect(()=>(J.current=!1,()=>{J.current=!0}),[]);async function ue(N,Q,X,te){const oe=(o??0n)>0n,ge=oe?await Si(Q):null;if(te!=null&&te())return;ge!=null?I(ge):oe&&z(!0);const De=Vo({priceCents:X,priceManaWei:ge??0n,balanceCents:(r==null?void 0:r.balanceCents)??0,manaBalanceWei:o??0n}).options.some(Fe=>Fe.method==="mana"||Fe.method==="combined"),et=N-((r==null?void 0:r.credits)??0),Et=p.find(Fe=>Fe.credits>=et)??p[p.length-1];$(Et.id),De||pe("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:N,credits_balance:(r==null?void 0:r.credits)??0,shortfall:Math.max(0,et)}),m("nofunds")}v.useEffect(()=>{let N=!1;if(!e){m("error"),y(h("buyModal.signInToCheckout"));return}return(async()=>{try{const Q=await hp(n,e.address,ed,await l(),dh);if(Q.status==="own")throw new Error("You can't buy your own listing.");if(Q.status==="no-price")throw new Error("price unavailable");if(Q.status!=="buyable")throw new Error("not for sale");const X=mp(Q.line),te=Q.line.usdCents,oe=$t(te);if(N)return;if(C(oe),K(X),q(te),r!=null&&r.credits<oe){await ue(oe,X,te,()=>N);return}t?Mt({sale:X,usdCents:te}):m("ready")}catch(Q){if(N)return;pe(Ne(Q)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Qe(Q)}),ft(Q)}})(),()=>{N=!0,Y.current&&e&&(la([Y.current]),Y.current=null)}},[S]),v.useEffect(()=>{const N=(j==null?void 0:j.sale)??A;if(!N||d!=="ready"&&d!=="nofunds"||o==null||o<=0n||D!==null)return;let Q=!1;return Si(N,{reportFailure:!L}).then(X=>{Q||(X!=null?I(X):z(!0))}),()=>{Q=!0}},[d,j,A,o,D,L]);const Le=Vo({priceCents:U,priceManaWei:D??0n,balanceCents:(r==null?void 0:r.balanceCents)??0,manaBalanceWei:o??0n});async function Mt(N){const Q=(j==null?void 0:j.sale)??(N==null?void 0:N.sale)??A,X=(j==null?void 0:j.usdCents)??(N==null?void 0:N.usdCents)??U;if(!e||!Q||X<=0)return;m("processing"),y(null),G(!1);let te=j;if(!te)try{const{credit:ne,maxCreditedValue:De,usdCents:et}=await Ba(e.identity,X,Mi(Q),_i(n));if(J.current){Te([ne.id]);return}Y.current=ne.id,i.invalidateQueries({queryKey:["usd-balance"]});const Et=$t(et);if(te={sale:Q,credit:ne,maxCreditedValue:De,usdCents:et,credits:Et},H(te),Et!==$t(X)){C(Et),q(et),G(!0),m("ready");return}}catch(ne){if(Ip(ne)){i.invalidateQueries({queryKey:["usd-balance"]}),await ue($t(X),Q,X);return}Ne(ne)||Se(ne,{flow:"buy",step:"authorize"}),pe(Ne(ne)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Qe(ne)}),y(nn(ne,h("buyModal.error.generic"),{sale:!0})),m("error");return}if(!te)return;let oe=!1,ge;try{const ne={purchase:nu(te.sale,[te.credit],te.maxCreditedValue),buyer:e.address,signer:e.signer,onBroadcast:({txHash:De})=>de.current.broadcast(te.credit.id,De),onReverted:({txHash:De})=>{De&&de.current.reverted(De)}};if(de.current.submitStarted(te.credit.id),bc())try{ge=await _p(ne),de.current.broadcast(te.credit.id,ge),await kc(ge),oe=!0}catch(De){if(De instanceof Dc)oe=!0;else if(De instanceof Cc){if(De.reason==="relayer-unreachable")throw de.current.unobservable(te.credit.id),De;if(!Qr(e.providerType))throw De;ge=await Go(ne)}else throw ge&&de.current.reverted(ge),De}else ge=await Go(ne)}catch(ne){de.current.submitFinished(te.credit.id),Ne(ne)||Se(ne,{flow:"buy",step:"submit",gasless:oe}),Wt([te.credit.id]),Y.current=null,pe(Ne(ne)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Qe(ne)}),i.invalidateQueries({queryKey:["usd-balance"]}),ft(ne);return}de.current.submitFinished(te.credit.id),Y.current=null;try{ru(i,n),pe("Shop Completed Purchase",{...xa([n]),payment_type:"credits",no_crypto_step:oe,transaction_hash:ge??null})}catch(ne){Se(ne,{flow:"buy",step:"post_purchase"})}m("complete")}function Te(N){if(!e||N.length===0)return Promise.resolve(!1);const Q=N.filter(X=>!de.current.mayBeConsumed(X));return Q.length===0?Promise.resolve(!1):dc(e.identity,Q).then(()=>!0,()=>!0)}function Wt(N){f(!0),Te(N).then(Q=>{Q||f(!1)})}function la(N){return Te(N.filter(Q=>!de.current.isInFlight(Q)))}function rr(){i.invalidateQueries({queryKey:["mana-balance"]}),i.invalidateQueries({queryKey:["usd-balance"]}),i.invalidateQueries({queryKey:["detail-trade"]}),i.invalidateQueries({queryKey:["shop-item"]}),i.invalidateQueries({queryKey:["owned-token",n.contractAddress,n.tokenId]}),i.invalidateQueries({queryKey:["public-token",n.contractAddress,n.tokenId]}),i.invalidateQueries({queryKey:["item-resales",n.contractAddress,n.itemId]}),i.invalidateQueries({queryKey:["shop-items"]}),i.invalidateQueries({queryKey:["catalog-items"]}),i.invalidateQueries({queryKey:["my-assets"]}),i.invalidateQueries({queryKey:["purchases"]}),i.invalidateQueries({queryKey:["owned-item-count"]}),i.invalidateQueries({queryKey:["overview-listings"]}),i.invalidateQueries({queryKey:["upsell-listings"]})}async function ar(){var Q;const N=(j==null?void 0:j.sale)??A;if(!(!e||!N)){Y.current&&(Wt([Y.current]),Y.current=null),m("processing"),y(null);try{const X=(Q=Uo(Le,"mana"))==null?void 0:Q.manaWei,te=N.kind==="trade"?await Qu({trade:N.trade,buyer:e.address,signer:e.signer,manaWei:X}):await Vu({mint:N.mint,buyer:e.address,signer:e.signer,manaWei:X});pe("Shop Completed Purchase",{...xa([n]),payment_type:"mana",transaction_hash:te??null}),rr(),m("complete")}catch(X){Ne(X)||Se(X,{flow:"buy_mana",step:"submit"}),pe(Ne(X)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Qe(X)}),ft(X)}}}async function $n(){const N=(j==null?void 0:j.sale)??A,Q=Uo(Le,"combined");if(!e||!N||!Q)return;m("processing"),y(null),Y.current&&(await Te([Y.current])&&f(!0),Y.current=null);let X=null,te;try{const{credit:oe}=await Ba(e.identity,Q.creditsCents,Mi(N),_i(n));X=oe.id,de.current.submitStarted(oe.id);const ge={buyer:e.address,signer:e.signer,credits:[oe],manaGapWei:Q.manaWei,onBroadcast:({txHash:ne})=>de.current.broadcast(oe.id,ne),onReverted:({txHash:ne})=>{ne&&de.current.reverted(ne)}};te=N.kind==="trade"?await Uu({trade:N.trade,...ge}):await Gu({mint:N.mint,...ge})}catch(oe){X&&de.current.submitFinished(X),X&&Wt([X]),Ne(oe)||Se(oe,{flow:"buy_credits_and_mana",step:"submit"}),pe(Ne(oe)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Qe(oe)}),i.invalidateQueries({queryKey:["usd-balance"]}),ft(oe);return}X&&de.current.submitFinished(X);try{rr(),pe("Shop Completed Purchase",{...xa([n]),payment_type:"credits_and_mana",transaction_hash:te??null})}catch(oe){Se(oe,{flow:"buy_credits_and_mana",step:"post_purchase"})}m("complete")}async function Bt(){if(!(!T||!e)){try{sessionStorage.setItem(ei,JSON.stringify(n))}catch{}Y.current&&(Te([Y.current]),Y.current=null),H(null),m("loading");try{const N=await gp(T,{address:e.address,identity:e.identity});if(N.url){window.location.href=N.url;return}c("/credits")}catch(N){Se(N,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(ei)}catch{}y(h("buyModal.error.creditsCheckout")),m("error")}}}const[ze,un]=v.useState(null);function _e(N,Q){const{spender:X,chainId:te}=Xu(N,Q);return yp(te,X)}function ft(N){if(y(nn(N,h("buyModal.error.generic"),{sale:!0})),m("error"),!td(N)||!e)return;const Q=N.required;(async()=>{if(await ch(e.providerType,e.address)){w(Q);return}y(h("buyModal.error.relayDownNoRail"))})()}async function _t(N){if(e){w(null);try{await ld(e.web3Provider,N)}catch(Q){Ne(Q)||Se(Q,{flow:"buy",step:"switch_chain"}),w(N);return}ir()}}function jt(N){N==="mana"?ar():N==="combined"?$n():Mt()}const ht=v.useRef(!1);async function Ze(N){var Q;if(!ht.current){ht.current=!0;try{const X=(j==null?void 0:j.sale)??A;if(N==="credits"||!X||!e){jt(N);return}const te=_e(N,X),oe=((Q=Le.options.find(ne=>ne.method===N))==null?void 0:Q.manaWei)??0n,ge=await vc(te,e.address,oe).catch(()=>!0);if(xp(e.providerType,ge)){un({auth:te,rail:N});return}jt(N)}finally{ht.current=!1}}}const Nn=Le.options.some(N=>N.method==="mana"||N.method==="combined"),or=d==="ready"&&(Nn||Le.manaShortfall!=null)||d==="nofunds"&&Nn;function ir(){y(null),H(null),G(!1),f(!1),m("loading"),E(N=>N+1)}const Ht=d==="error"&&b===null&&(!!Y.current||k),On=d==="processing",sr=d==="complete"?h("buyModal.titleComplete"):d==="error"?h("cartCheckout.errorTitle"):d==="nofunds"?h("buyModal.titleNoFunds"):h("buyModal.titleBuy");return ze&&e?s.jsx(yc,{auth:ze.auth,signer:e.signer,title:h(ze.rail==="mana"?"authorizeStep.manaTitle":"authorizeStep.buyTitle"),name:h(ze.rail==="mana"?"authorizeStep.manaName":"authorizeStep.buyName"),reason:h(ze.rail==="mana"?"authorizeStep.manaReason":"authorizeStep.buyReason"),icon:s.jsx("img",{src:au,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{rail:N}=ze;un(null),jt(N)},onCancel:()=>un(null),onClose:()=>{un(null),a()}}):s.jsxs(ou,{role:"dialog","aria-modal":"true","aria-label":h("buyModal.dialogAria",{name:n.name}),"data-testid":"buy-modal",children:[s.jsx(iu,{onClick:On?void 0:a,"aria-hidden":!0}),s.jsx(su,{"data-tall":d==="processing"||d==="loading"||void 0,children:or?s.jsx(oh,{item:n,priceCredits:Ee,priceCents:U,options:Le.options,priceManaWei:D??0n,balanceCredits:ke,manaBalanceWei:o??0n,onBuy:N=>void Ze(N),onClose:a,busy:On,notice:M?h("buyModal.priceChanged"):r!=null&&r.held?h("buyModal.heldExplainer",{credits:r.held.credits,currency:Ue.name}):null}):s.jsxs(s.Fragment,{children:[s.jsxs(cu,{children:[s.jsxs(lu,{children:[s.jsx(du,{children:sr}),!On&&s.jsx(uu,{onClick:a,"aria-label":h("buyModal.close"),children:s.jsx(pu,{})})]}),s.jsxs(fu,{children:[s.jsx(hu,{children:d==="nofunds"?h("buyModal.dclBalance"):h("buyModal.myCreditsBalance")}),s.jsx(mu,{}),s.jsx(gu,{children:Ot(ke)})]})]}),d==="loading"&&s.jsx(hn,{"data-processing":!0,children:s.jsx($p,{size:44})}),d==="error"&&s.jsxs(hn,{children:[s.jsxs(xu,{"data-testid":"buy-error",children:[s.jsx(yu,{src:bu,alt:"",width:64,height:80}),s.jsxs(vu,{children:[s.jsx("b",{children:h("cartCheckout.errorHeadline")})," ",x??(Ht?null:h("cartCheckout.errorBody")),Ht?s.jsxs(s.Fragment,{children:[x?" ":"",h("cartCheckout.heldLead",{currency:Ue.name}),s.jsx("b",{children:h("cartCheckout.heldBold")}),h("cartCheckout.heldTail",{currency:Ue.name})]}):null]})]}),b!==null?s.jsxs(mn,{children:[s.jsx(gt,{"data-variant":"outline",onClick:a,children:h("buyModal.cancel")}),s.jsx(gt,{"data-variant":"purple","data-testid":"switch-and-retry",onClick:()=>void _t(b),children:h("buyModal.error.switchAndRetry",{network:nd(b)})})]}):Ht?s.jsx(mn,{children:s.jsx(gt,{"data-variant":"purple","data-full":!0,onClick:a,children:h("cartCheckout.gotIt")})}):s.jsxs(mn,{children:[s.jsx(gt,{"data-variant":"outline",onClick:a,children:h("buyModal.cancel")}),s.jsx(gt,{"data-variant":"purple",onClick:ir,children:h("cartCheckout.tryAgain")})]})]}),d==="nofunds"&&s.jsxs(hn,{children:[L&&D===null&&(o??0n)>0n?s.jsxs(hr,{"data-testid":"mana-price-unavailable",children:[s.jsx(mr,{}),s.jsx(gr,{children:h("buyModal.manaPriceUnavailable")})]}):null,r!=null&&r.held?s.jsxs(hr,{"data-testid":"nofunds-held",children:[s.jsx(mr,{}),s.jsx(gr,{children:h("buyModal.heldExplainer",{credits:r.held.credits,currency:Ue.name})})]}):null,s.jsxs(hr,{children:[s.jsx(mr,{}),s.jsxs(gr,{children:[s.jsx("b",{children:h("buyModal.insufficientFunds")})," ",h("buyModal.warningNeedToBuy")," ",s.jsx("b",{children:h("buyModal.warningCreditsAmount",{count:Math.max(1,Ee-ke)})})," ",h("buyModal.warningToPurchase",{count:1}),Qn()?null:s.jsxs(s.Fragment,{children:[" ",s.jsx(wu,{href:rd("/credits"),target:"_blank",rel:"noopener noreferrer",children:h("buyModal.warningLearnMore")})]})]})]}),s.jsx(ji,{item:n,priceCredits:Ee}),Le.manaShortfall?s.jsx(ku,{options:[],totalCents:U,shortfall:Le.manaShortfall,onPay:()=>{}}):null,Qn()?null:s.jsxs(s.Fragment,{children:[s.jsx(Du,{"data-testid":"credit-packs",children:p.map(N=>{const Q=N.credits,X=N.id===T;return s.jsxs(Cu,{"data-on":X||void 0,onClick:()=>$(N.id),children:[s.jsx(Su,{src:Mu,alt:""}),s.jsx(_u,{children:Ot(Q)}),s.jsxs(ju,{children:["($",N.usd.toFixed(2),")"]})]},N.id)})}),s.jsxs(Iu,{children:[s.jsxs(Pu,{children:[s.jsx(Eu,{}),s.jsx("span",{children:Ot(((It=p.find(N=>N.id===T))==null?void 0:It.credits)??0)})]}),s.jsxs(Tu,{children:["$",(((Pt=p.find(N=>N.id===T))==null?void 0:Pt.usd)??0).toFixed(2)]})]})]}),s.jsxs(mn,{children:[s.jsx(gt,{"data-variant":"outline",onClick:a,children:h("buyModal.cancel")}),Qn()?null:s.jsx(gt,{"data-variant":"gradient",onClick:()=>void Bt(),children:h("buyModal.buy")})]})]}),d==="ready"&&s.jsxs(hn,{children:[M&&s.jsxs(hr,{"data-testid":"price-changed",role:"status",children:[s.jsx(mr,{}),s.jsx(gr,{children:h("buyModal.priceChanged")})]}),s.jsx(ji,{item:n,priceCredits:Ee}),s.jsx(mn,{children:s.jsx(gt,{"data-variant":"gradient","data-full":!0,onClick:()=>void Mt(),children:h("buyModal.buy")})})]}),d==="processing"&&s.jsxs(hn,{"data-processing":!0,children:[s.jsx($u,{src:ad,alt:"",width:61,height:61}),s.jsx(Nu,{children:t?h("buyModal.completingPurchase"):h("buyModal.completingTransaction")}),s.jsx(Ou,{"aria-hidden":!0,children:s.jsx(Ru,{})})]}),d==="complete"&&s.jsxs(hn,{children:[s.jsx(Pp,{}),s.jsxs(Au,{children:[s.jsx(lh,{}),s.jsxs(Lu,{children:[s.jsx("b",{children:h("getCredits.successTitle")})," ",h("buyModal.successBody")]})]}),s.jsxs(mn,{"data-stack":!0,children:[s.jsx(gt,{"data-variant":"outline",onClick:()=>c(od([n.category])),children:h("buyModal.myAssets")}),s.jsxs(Fu,{"data-variant":"ruby",href:Ep,target:"_blank",rel:"noreferrer",onClick:a,children:[h("buyModal.tryInWorld"),s.jsx(Tp,{})]})]})]})]})})]})}function ji({item:n,priceCredits:a}){return s.jsxs(Yu,{children:[s.jsx(Wu,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsxs(Bu,{children:[s.jsxs("div",{children:[s.jsx(Hu,{title:n.name,children:n.name||h("buyModal.itemFallback")}),n.creator?s.jsx(zu,{address:n.creator}):null]}),s.jsxs(qu,{children:[s.jsx(Ku,{}),s.jsx("span",{children:Ot(a)})]})]})]})}function Ac(n){var a,t,e="";if(typeof n=="string"||typeof n=="number")e+=n;else if(typeof n=="object")if(Array.isArray(n)){var r=n.length;for(a=0;a<r;a++)n[a]&&(t=Ac(n[a]))&&(e&&(e+=" "),e+=t)}else for(t in n)n[t]&&(e&&(e+=" "),e+=t);return e}function Me(){for(var n,a,t=0,e="",r=arguments.length;t<r;t++)(n=arguments[t])&&(a=Ac(n))&&(e&&(e+=" "),e+=a);return e}function W(n){const a=Object.prototype.toString.call(n);return n instanceof Date||typeof n=="object"&&a==="[object Date]"?new n.constructor(+n):typeof n=="number"||a==="[object Number]"||typeof n=="string"||a==="[object String]"?new Date(n):new Date(NaN)}function ce(n,a){return n instanceof Date?new n.constructor(a):new Date(a)}function Ge(n,a){const t=W(n);return isNaN(a)?ce(n,NaN):(a&&t.setDate(t.getDate()+a),t)}function Je(n,a){const t=W(n);if(isNaN(a))return ce(n,NaN);if(!a)return t;const e=t.getDate(),r=ce(n,t.getTime());r.setMonth(t.getMonth()+a+1,0);const o=r.getDate();return e>=o?r:(t.setFullYear(r.getFullYear(),r.getMonth(),e),t)}function oo(n,a){const t=+W(n);return ce(n,t+a)}const Lc=6048e5,uh=864e5,na=6e4,ra=36e5,ph=1e3;function fh(n,a){return oo(n,a*ra)}let hh={};function dn(){return hh}function Dt(n,a){var c,l,p,d;const t=dn(),e=(a==null?void 0:a.weekStartsOn)??((l=(c=a==null?void 0:a.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??t.weekStartsOn??((d=(p=t.locale)==null?void 0:p.options)==null?void 0:d.weekStartsOn)??0,r=W(n),o=r.getDay(),i=(o<e?7:0)+o-e;return r.setDate(r.getDate()-i),r.setHours(0,0,0,0),r}function Mn(n){return Dt(n,{weekStartsOn:1})}function Fc(n){const a=W(n),t=a.getFullYear(),e=ce(n,0);e.setFullYear(t+1,0,4),e.setHours(0,0,0,0);const r=Mn(e),o=ce(n,0);o.setFullYear(t,0,4),o.setHours(0,0,0,0);const i=Mn(o);return a.getTime()>=r.getTime()?t+1:a.getTime()>=i.getTime()?t:t-1}function on(n){const a=W(n);return a.setHours(0,0,0,0),a}function Ar(n){const a=W(n),t=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return t.setUTCFullYear(a.getFullYear()),+n-+t}function _n(n,a){const t=on(n),e=on(a),r=+t-Ar(t),o=+e-Ar(e);return Math.round((r-o)/uh)}function mh(n){const a=Fc(n),t=ce(n,0);return t.setFullYear(a,0,4),t.setHours(0,0,0,0),Mn(t)}function Ka(n,a){return oo(n,a*na)}function io(n,a){const t=a*3;return Je(n,t)}function gh(n,a){return oo(n,a*1e3)}function Lr(n,a){const t=a*7;return Ge(n,t)}function bt(n,a){return Je(n,a*12)}function Ii(n){let a;return n.forEach(function(t){const e=W(t);(a===void 0||a<e||isNaN(Number(e)))&&(a=e)}),a||new Date(NaN)}function Pi(n){let a;return n.forEach(t=>{const e=W(t);(!a||a>e||isNaN(+e))&&(a=e)}),a||new Date(NaN)}function xh(n,a){const t=on(n),e=on(a);return+t==+e}function vt(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Fr(n){if(!vt(n)&&typeof n!="number")return!1;const a=W(n);return!isNaN(Number(a))}function Yr(n,a){const t=W(n),e=W(a),r=t.getFullYear()-e.getFullYear(),o=t.getMonth()-e.getMonth();return r*12+o}function Jt(n){const a=W(n);return Math.trunc(a.getMonth()/3)+1}function Wr(n,a){const t=W(n),e=W(a),r=t.getFullYear()-e.getFullYear(),o=Jt(t)-Jt(e);return r*4+o}function Br(n,a){const t=W(n),e=W(a);return t.getFullYear()-e.getFullYear()}function yh(n,a){const t=W(n),e=W(a),r=Ei(t,e),o=Math.abs(_n(t,e));t.setDate(t.getDate()-r*o);const i=+(Ei(t,e)===-r),c=r*(o-i);return c===0?0:c}function Ei(n,a){const t=n.getFullYear()-a.getFullYear()||n.getMonth()-a.getMonth()||n.getDate()-a.getDate()||n.getHours()-a.getHours()||n.getMinutes()-a.getMinutes()||n.getSeconds()-a.getSeconds()||n.getMilliseconds()-a.getMilliseconds();return t<0?-1:t>0?1:t}function Yc(n){const a=W(n);return a.setHours(23,59,59,999),a}function Wc(n){const a=W(n),t=a.getMonth();return a.setFullYear(a.getFullYear(),t+1,0),a.setHours(23,59,59,999),a}function Qa(n){const a=W(n),t=a.getMonth(),e=t-t%3;return a.setMonth(e,1),a.setHours(0,0,0,0),a}function Bc(n){const a=W(n);return a.setDate(1),a.setHours(0,0,0,0),a}function Hc(n){const a=W(n),t=a.getFullYear();return a.setFullYear(t+1,0,0),a.setHours(23,59,59,999),a}function aa(n){const a=W(n),t=ce(n,0);return t.setFullYear(a.getFullYear(),0,1),t.setHours(0,0,0,0),t}function bh(n,a){var c,l;const t=dn(),e=t.weekStartsOn??((l=(c=t.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??0,r=W(n),o=r.getDay(),i=(o<e?-7:0)+6-(o-e);return r.setDate(r.getDate()+i),r.setHours(23,59,59,999),r}const vh={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},wh=(n,a,t)=>{let e;const r=vh[n];return typeof r=="string"?e=r:a===1?e=r.one:e=r.other.replace("{{count}}",a.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+e:e+" ago":e};function Da(n){return(a={})=>{const t=a.width?String(a.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const kh={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Dh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ch={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Sh={date:Da({formats:kh,defaultWidth:"full"}),time:Da({formats:Dh,defaultWidth:"full"}),dateTime:Da({formats:Ch,defaultWidth:"full"})},Mh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},_h=(n,a,t,e)=>Mh[n];function Ln(n){return(a,t)=>{const e=t!=null&&t.context?String(t.context):"standalone";let r;if(e==="formatting"&&n.formattingValues){const i=n.defaultFormattingWidth||n.defaultWidth,c=t!=null&&t.width?String(t.width):i;r=n.formattingValues[c]||n.formattingValues[i]}else{const i=n.defaultWidth,c=t!=null&&t.width?String(t.width):n.defaultWidth;r=n.values[c]||n.values[i]}const o=n.argumentCallback?n.argumentCallback(a):a;return r[o]}}const jh={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ih={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ph={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Eh={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Th={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},$h={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Nh=(n,a)=>{const t=Number(n),e=t%100;if(e>20||e<10)switch(e%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},Oh={ordinalNumber:Nh,era:Ln({values:jh,defaultWidth:"wide"}),quarter:Ln({values:Ih,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Ln({values:Ph,defaultWidth:"wide"}),day:Ln({values:Eh,defaultWidth:"wide"}),dayPeriod:Ln({values:Th,defaultWidth:"wide",formattingValues:$h,defaultFormattingWidth:"wide"})};function Fn(n){return(a,t={})=>{const e=t.width,r=e&&n.matchPatterns[e]||n.matchPatterns[n.defaultMatchWidth],o=a.match(r);if(!o)return null;const i=o[0],c=e&&n.parsePatterns[e]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(c)?Ah(c,m=>m.test(i)):Rh(c,m=>m.test(i));let p;p=n.valueCallback?n.valueCallback(l):l,p=t.valueCallback?t.valueCallback(p):p;const d=a.slice(i.length);return{value:p,rest:d}}}function Rh(n,a){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&a(n[t]))return t}function Ah(n,a){for(let t=0;t<n.length;t++)if(a(n[t]))return t}function Lh(n){return(a,t={})=>{const e=a.match(n.matchPattern);if(!e)return null;const r=e[0],o=a.match(n.parsePattern);if(!o)return null;let i=n.valueCallback?n.valueCallback(o[0]):o[0];i=t.valueCallback?t.valueCallback(i):i;const c=a.slice(r.length);return{value:i,rest:c}}}const Fh=/^(\d+)(th|st|nd|rd)?/i,Yh=/\d+/i,Wh={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Bh={any:[/^b/i,/^(a|c)/i]},Hh={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},zh={any:[/1/i,/2/i,/3/i,/4/i]},qh={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Kh={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Qh={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Vh={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Uh={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Gh={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Xh={ordinalNumber:Lh({matchPattern:Fh,parsePattern:Yh,valueCallback:n=>parseInt(n,10)}),era:Fn({matchPatterns:Wh,defaultMatchWidth:"wide",parsePatterns:Bh,defaultParseWidth:"any"}),quarter:Fn({matchPatterns:Hh,defaultMatchWidth:"wide",parsePatterns:zh,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Fn({matchPatterns:qh,defaultMatchWidth:"wide",parsePatterns:Kh,defaultParseWidth:"any"}),day:Fn({matchPatterns:Qh,defaultMatchWidth:"wide",parsePatterns:Vh,defaultParseWidth:"any"}),dayPeriod:Fn({matchPatterns:Uh,defaultMatchWidth:"any",parsePatterns:Gh,defaultParseWidth:"any"})},zc={code:"en-US",formatDistance:wh,formatLong:Sh,formatRelative:_h,localize:Oh,match:Xh,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Jh(n){const a=W(n);return _n(a,aa(a))+1}function so(n){const a=W(n),t=+Mn(a)-+mh(a);return Math.round(t/Lc)+1}function co(n,a){var d,m,x,y;const t=W(n),e=t.getFullYear(),r=dn(),o=(a==null?void 0:a.firstWeekContainsDate)??((m=(d=a==null?void 0:a.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??r.firstWeekContainsDate??((y=(x=r.locale)==null?void 0:x.options)==null?void 0:y.firstWeekContainsDate)??1,i=ce(n,0);i.setFullYear(e+1,0,o),i.setHours(0,0,0,0);const c=Dt(i,a),l=ce(n,0);l.setFullYear(e,0,o),l.setHours(0,0,0,0);const p=Dt(l,a);return t.getTime()>=c.getTime()?e+1:t.getTime()>=p.getTime()?e:e-1}function Zh(n,a){var c,l,p,d;const t=dn(),e=(a==null?void 0:a.firstWeekContainsDate)??((l=(c=a==null?void 0:a.locale)==null?void 0:c.options)==null?void 0:l.firstWeekContainsDate)??t.firstWeekContainsDate??((d=(p=t.locale)==null?void 0:p.options)==null?void 0:d.firstWeekContainsDate)??1,r=co(n,a),o=ce(n,0);return o.setFullYear(r,0,e),o.setHours(0,0,0,0),Dt(o,a)}function qc(n,a){const t=W(n),e=+Dt(t,a)-+Zh(t,a);return Math.round(e/Lc)+1}function se(n,a){const t=n<0?"-":"",e=Math.abs(n).toString().padStart(a,"0");return t+e}const Tt={y(n,a){const t=n.getFullYear(),e=t>0?t:1-t;return se(a==="yy"?e%100:e,a.length)},M(n,a){const t=n.getMonth();return a==="M"?String(t+1):se(t+1,2)},d(n,a){return se(n.getDate(),a.length)},a(n,a){const t=n.getHours()/12>=1?"pm":"am";switch(a){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,a){return se(n.getHours()%12||12,a.length)},H(n,a){return se(n.getHours(),a.length)},m(n,a){return se(n.getMinutes(),a.length)},s(n,a){return se(n.getSeconds(),a.length)},S(n,a){const t=a.length,e=n.getMilliseconds(),r=Math.trunc(e*Math.pow(10,t-3));return se(r,a.length)}},gn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ti={G:function(n,a,t){const e=n.getFullYear()>0?1:0;switch(a){case"G":case"GG":case"GGG":return t.era(e,{width:"abbreviated"});case"GGGGG":return t.era(e,{width:"narrow"});case"GGGG":default:return t.era(e,{width:"wide"})}},y:function(n,a,t){if(a==="yo"){const e=n.getFullYear(),r=e>0?e:1-e;return t.ordinalNumber(r,{unit:"year"})}return Tt.y(n,a)},Y:function(n,a,t,e){const r=co(n,e),o=r>0?r:1-r;if(a==="YY"){const i=o%100;return se(i,2)}return a==="Yo"?t.ordinalNumber(o,{unit:"year"}):se(o,a.length)},R:function(n,a){const t=Fc(n);return se(t,a.length)},u:function(n,a){const t=n.getFullYear();return se(t,a.length)},Q:function(n,a,t){const e=Math.ceil((n.getMonth()+1)/3);switch(a){case"Q":return String(e);case"QQ":return se(e,2);case"Qo":return t.ordinalNumber(e,{unit:"quarter"});case"QQQ":return t.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(e,{width:"wide",context:"formatting"})}},q:function(n,a,t){const e=Math.ceil((n.getMonth()+1)/3);switch(a){case"q":return String(e);case"qq":return se(e,2);case"qo":return t.ordinalNumber(e,{unit:"quarter"});case"qqq":return t.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(e,{width:"wide",context:"standalone"})}},M:function(n,a,t){const e=n.getMonth();switch(a){case"M":case"MM":return Tt.M(n,a);case"Mo":return t.ordinalNumber(e+1,{unit:"month"});case"MMM":return t.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(e,{width:"wide",context:"formatting"})}},L:function(n,a,t){const e=n.getMonth();switch(a){case"L":return String(e+1);case"LL":return se(e+1,2);case"Lo":return t.ordinalNumber(e+1,{unit:"month"});case"LLL":return t.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(e,{width:"wide",context:"standalone"})}},w:function(n,a,t,e){const r=qc(n,e);return a==="wo"?t.ordinalNumber(r,{unit:"week"}):se(r,a.length)},I:function(n,a,t){const e=so(n);return a==="Io"?t.ordinalNumber(e,{unit:"week"}):se(e,a.length)},d:function(n,a,t){return a==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):Tt.d(n,a)},D:function(n,a,t){const e=Jh(n);return a==="Do"?t.ordinalNumber(e,{unit:"dayOfYear"}):se(e,a.length)},E:function(n,a,t){const e=n.getDay();switch(a){case"E":case"EE":case"EEE":return t.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(e,{width:"short",context:"formatting"});case"EEEE":default:return t.day(e,{width:"wide",context:"formatting"})}},e:function(n,a,t,e){const r=n.getDay(),o=(r-e.weekStartsOn+8)%7||7;switch(a){case"e":return String(o);case"ee":return se(o,2);case"eo":return t.ordinalNumber(o,{unit:"day"});case"eee":return t.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(r,{width:"short",context:"formatting"});case"eeee":default:return t.day(r,{width:"wide",context:"formatting"})}},c:function(n,a,t,e){const r=n.getDay(),o=(r-e.weekStartsOn+8)%7||7;switch(a){case"c":return String(o);case"cc":return se(o,a.length);case"co":return t.ordinalNumber(o,{unit:"day"});case"ccc":return t.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(r,{width:"narrow",context:"standalone"});case"cccccc":return t.day(r,{width:"short",context:"standalone"});case"cccc":default:return t.day(r,{width:"wide",context:"standalone"})}},i:function(n,a,t){const e=n.getDay(),r=e===0?7:e;switch(a){case"i":return String(r);case"ii":return se(r,a.length);case"io":return t.ordinalNumber(r,{unit:"day"});case"iii":return t.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(e,{width:"short",context:"formatting"});case"iiii":default:return t.day(e,{width:"wide",context:"formatting"})}},a:function(n,a,t){const r=n.getHours()/12>=1?"pm":"am";switch(a){case"a":case"aa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,a,t){const e=n.getHours();let r;switch(e===12?r=gn.noon:e===0?r=gn.midnight:r=e/12>=1?"pm":"am",a){case"b":case"bb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(n,a,t){const e=n.getHours();let r;switch(e>=17?r=gn.evening:e>=12?r=gn.afternoon:e>=4?r=gn.morning:r=gn.night,a){case"B":case"BB":case"BBB":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(n,a,t){if(a==="ho"){let e=n.getHours()%12;return e===0&&(e=12),t.ordinalNumber(e,{unit:"hour"})}return Tt.h(n,a)},H:function(n,a,t){return a==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):Tt.H(n,a)},K:function(n,a,t){const e=n.getHours()%12;return a==="Ko"?t.ordinalNumber(e,{unit:"hour"}):se(e,a.length)},k:function(n,a,t){let e=n.getHours();return e===0&&(e=24),a==="ko"?t.ordinalNumber(e,{unit:"hour"}):se(e,a.length)},m:function(n,a,t){return a==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):Tt.m(n,a)},s:function(n,a,t){return a==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):Tt.s(n,a)},S:function(n,a){return Tt.S(n,a)},X:function(n,a,t){const e=n.getTimezoneOffset();if(e===0)return"Z";switch(a){case"X":return Ni(e);case"XXXX":case"XX":return Qt(e);case"XXXXX":case"XXX":default:return Qt(e,":")}},x:function(n,a,t){const e=n.getTimezoneOffset();switch(a){case"x":return Ni(e);case"xxxx":case"xx":return Qt(e);case"xxxxx":case"xxx":default:return Qt(e,":")}},O:function(n,a,t){const e=n.getTimezoneOffset();switch(a){case"O":case"OO":case"OOO":return"GMT"+$i(e,":");case"OOOO":default:return"GMT"+Qt(e,":")}},z:function(n,a,t){const e=n.getTimezoneOffset();switch(a){case"z":case"zz":case"zzz":return"GMT"+$i(e,":");case"zzzz":default:return"GMT"+Qt(e,":")}},t:function(n,a,t){const e=Math.trunc(n.getTime()/1e3);return se(e,a.length)},T:function(n,a,t){const e=n.getTime();return se(e,a.length)}};function $i(n,a=""){const t=n>0?"-":"+",e=Math.abs(n),r=Math.trunc(e/60),o=e%60;return o===0?t+String(r):t+String(r)+a+se(o,2)}function Ni(n,a){return n%60===0?(n>0?"-":"+")+se(Math.abs(n)/60,2):Qt(n,a)}function Qt(n,a=""){const t=n>0?"-":"+",e=Math.abs(n),r=se(Math.trunc(e/60),2),o=se(e%60,2);return t+r+a+o}const Oi=(n,a)=>{switch(n){case"P":return a.date({width:"short"});case"PP":return a.date({width:"medium"});case"PPP":return a.date({width:"long"});case"PPPP":default:return a.date({width:"full"})}},Kc=(n,a)=>{switch(n){case"p":return a.time({width:"short"});case"pp":return a.time({width:"medium"});case"ppp":return a.time({width:"long"});case"pppp":default:return a.time({width:"full"})}},em=(n,a)=>{const t=n.match(/(P+)(p+)?/)||[],e=t[1],r=t[2];if(!r)return Oi(n,a);let o;switch(e){case"P":o=a.dateTime({width:"short"});break;case"PP":o=a.dateTime({width:"medium"});break;case"PPP":o=a.dateTime({width:"long"});break;case"PPPP":default:o=a.dateTime({width:"full"});break}return o.replace("{{date}}",Oi(e,a)).replace("{{time}}",Kc(r,a))},Hr={p:Kc,P:em},tm=/^D+$/,nm=/^Y+$/,rm=["D","DD","YY","YYYY"];function Qc(n){return tm.test(n)}function Vc(n){return nm.test(n)}function Va(n,a,t){const e=am(n,a,t);if(console.warn(e),rm.includes(n))throw new RangeError(e)}function am(n,a,t){const e=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${a}\`) for formatting ${e} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const om=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,im=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,sm=/^'([^]*?)'?$/,cm=/''/g,lm=/[a-zA-Z]/;function Ri(n,a,t){var d,m,x,y,b,w,k,f;const e=dn(),r=(t==null?void 0:t.locale)??e.locale??zc,o=(t==null?void 0:t.firstWeekContainsDate)??((m=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??e.firstWeekContainsDate??((y=(x=e.locale)==null?void 0:x.options)==null?void 0:y.firstWeekContainsDate)??1,i=(t==null?void 0:t.weekStartsOn)??((w=(b=t==null?void 0:t.locale)==null?void 0:b.options)==null?void 0:w.weekStartsOn)??e.weekStartsOn??((f=(k=e.locale)==null?void 0:k.options)==null?void 0:f.weekStartsOn)??0,c=W(n);if(!Fr(c))throw new RangeError("Invalid time value");let l=a.match(im).map(S=>{const E=S[0];if(E==="p"||E==="P"){const T=Hr[E];return T(S,r.formatLong)}return S}).join("").match(om).map(S=>{if(S==="''")return{isToken:!1,value:"'"};const E=S[0];if(E==="'")return{isToken:!1,value:dm(S)};if(Ti[E])return{isToken:!0,value:S};if(E.match(lm))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:S}});r.localize.preprocessor&&(l=r.localize.preprocessor(c,l));const p={firstWeekContainsDate:o,weekStartsOn:i,locale:r};return l.map(S=>{if(!S.isToken)return S.value;const E=S.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&Vc(E)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&Qc(E))&&Va(E,a,String(n));const T=Ti[E[0]];return T(c,E,r.localize,p)}).join("")}function dm(n){const a=n.match(sm);return a?a[1].replace(cm,"'"):n}function Ai(n){return W(n).getDate()}function um(n){return W(n).getDay()}function pm(n){const a=W(n),t=a.getFullYear(),e=a.getMonth(),r=ce(n,0);return r.setFullYear(t,e+1,0),r.setHours(0,0,0,0),r.getDate()}function fm(){return Object.assign({},dn())}function ut(n){return W(n).getHours()}function hm(n){let t=W(n).getDay();return t===0&&(t=7),t}function pt(n){return W(n).getMinutes()}function Ie(n){return W(n).getMonth()}function wt(n){return W(n).getSeconds()}function Ua(n){return W(n).getTime()}function ee(n){return W(n).getFullYear()}function Ft(n,a){const t=W(n),e=W(a);return t.getTime()>e.getTime()}function sn(n,a){const t=W(n),e=W(a);return+t<+e}function mm(n,a){const t=W(n),e=W(a);return+t==+e}function gm(n,a){const t=a instanceof Date?ce(a,0):new a(0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),t}const xm=10;class Uc{constructor(){B(this,"subPriority",0)}validate(a,t){return!0}}class ym extends Uc{constructor(a,t,e,r,o){super(),this.value=a,this.validateValue=t,this.setValue=e,this.priority=r,o&&(this.subPriority=o)}validate(a,t){return this.validateValue(a,this.value,t)}set(a,t,e){return this.setValue(a,t,this.value,e)}}class bm extends Uc{constructor(){super(...arguments);B(this,"priority",xm);B(this,"subPriority",-1)}set(t,e){return e.timestampIsSet?t:ce(t,gm(t,Date))}}class ie{run(a,t,e,r){const o=this.parse(a,t,e,r);return o?{setter:new ym(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(a,t,e){return!0}}class vm extends ie{constructor(){super(...arguments);B(this,"priority",140);B(this,"incompatibleTokens",["R","u","t","T"])}parse(t,e,r){switch(e){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});case"GGGG":default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,e,r){return e.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}const ye={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ct={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function be(n,a){return n&&{value:a(n.value),rest:n.rest}}function he(n,a){const t=a.match(n);return t?{value:parseInt(t[0],10),rest:a.slice(t[0].length)}:null}function lt(n,a){const t=a.match(n);if(!t)return null;if(t[0]==="Z")return{value:0,rest:a.slice(1)};const e=t[1]==="+"?1:-1,r=t[2]?parseInt(t[2],10):0,o=t[3]?parseInt(t[3],10):0,i=t[5]?parseInt(t[5],10):0;return{value:e*(r*ra+o*na+i*ph),rest:a.slice(t[0].length)}}function Gc(n){return he(ye.anyDigitsSigned,n)}function me(n,a){switch(n){case 1:return he(ye.singleDigit,a);case 2:return he(ye.twoDigits,a);case 3:return he(ye.threeDigits,a);case 4:return he(ye.fourDigits,a);default:return he(new RegExp("^\\d{1,"+n+"}"),a)}}function zr(n,a){switch(n){case 1:return he(ye.singleDigitSigned,a);case 2:return he(ye.twoDigitsSigned,a);case 3:return he(ye.threeDigitsSigned,a);case 4:return he(ye.fourDigitsSigned,a);default:return he(new RegExp("^-?\\d{1,"+n+"}"),a)}}function lo(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Xc(n,a){const t=a>0,e=t?a:1-a;let r;if(e<=50)r=n||100;else{const o=e+50,i=Math.trunc(o/100)*100,c=n>=o%100;r=n+i-(c?100:0)}return t?r:1-r}function Jc(n){return n%400===0||n%4===0&&n%100!==0}class wm extends ie{constructor(){super(...arguments);B(this,"priority",130);B(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,e,r){const o=i=>({year:i,isTwoDigitYear:e==="yy"});switch(e){case"y":return be(me(4,t),o);case"yo":return be(r.ordinalNumber(t,{unit:"year"}),o);default:return be(me(e.length,t),o)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r){const o=t.getFullYear();if(r.isTwoDigitYear){const c=Xc(r.year,o);return t.setFullYear(c,0,1),t.setHours(0,0,0,0),t}const i=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class km extends ie{constructor(){super(...arguments);B(this,"priority",130);B(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,e,r){const o=i=>({year:i,isTwoDigitYear:e==="YY"});switch(e){case"Y":return be(me(4,t),o);case"Yo":return be(r.ordinalNumber(t,{unit:"year"}),o);default:return be(me(e.length,t),o)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r,o){const i=co(t,o);if(r.isTwoDigitYear){const l=Xc(r.year,i);return t.setFullYear(l,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Dt(t,o)}const c=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(c,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Dt(t,o)}}class Dm extends ie{constructor(){super(...arguments);B(this,"priority",130);B(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return zr(e==="R"?4:e.length,t)}set(t,e,r){const o=ce(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Mn(o)}}class Cm extends ie{constructor(){super(...arguments);B(this,"priority",130);B(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return zr(e==="u"?4:e.length,t)}set(t,e,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}class Sm extends ie{constructor(){super(...arguments);B(this,"priority",120);B(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"Q":case"QQ":return me(e.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}}class Mm extends ie{constructor(){super(...arguments);B(this,"priority",120);B(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"q":case"qq":return me(e.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}}class _m extends ie{constructor(){super(...arguments);B(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);B(this,"priority",110)}parse(t,e,r){const o=i=>i-1;switch(e){case"M":return be(he(ye.month,t),o);case"MM":return be(me(2,t),o);case"Mo":return be(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class jm extends ie{constructor(){super(...arguments);B(this,"priority",110);B(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,e,r){const o=i=>i-1;switch(e){case"L":return be(he(ye.month,t),o);case"LL":return be(me(2,t),o);case"Lo":return be(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}function Im(n,a,t){const e=W(n),r=qc(e,t)-a;return e.setDate(e.getDate()-r*7),e}class Pm extends ie{constructor(){super(...arguments);B(this,"priority",100);B(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,r){switch(e){case"w":return he(ye.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return me(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r,o){return Dt(Im(t,r,o),o)}}function Em(n,a){const t=W(n),e=so(t)-a;return t.setDate(t.getDate()-e*7),t}class Tm extends ie{constructor(){super(...arguments);B(this,"priority",100);B(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,e,r){switch(e){case"I":return he(ye.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return me(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r){return Mn(Em(t,r))}}const $m=[31,28,31,30,31,30,31,31,30,31,30,31],Nm=[31,29,31,30,31,30,31,31,30,31,30,31];class Om extends ie{constructor(){super(...arguments);B(this,"priority",90);B(this,"subPriority",1);B(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"d":return he(ye.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return me(e.length,t)}}validate(t,e){const r=t.getFullYear(),o=Jc(r),i=t.getMonth();return o?e>=1&&e<=Nm[i]:e>=1&&e<=$m[i]}set(t,e,r){return t.setDate(r),t.setHours(0,0,0,0),t}}class Rm extends ie{constructor(){super(...arguments);B(this,"priority",90);B(this,"subpriority",1);B(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,e,r){switch(e){case"D":case"DD":return he(ye.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return me(e.length,t)}}validate(t,e){const r=t.getFullYear();return Jc(r)?e>=1&&e<=366:e>=1&&e<=365}set(t,e,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}}function uo(n,a,t){var m,x,y,b;const e=dn(),r=(t==null?void 0:t.weekStartsOn)??((x=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:x.weekStartsOn)??e.weekStartsOn??((b=(y=e.locale)==null?void 0:y.options)==null?void 0:b.weekStartsOn)??0,o=W(n),i=o.getDay(),l=(a%7+7)%7,p=7-r,d=a<0||a>6?a-(i+p)%7:(l+p)%7-(i+p)%7;return Ge(o,d)}class Am extends ie{constructor(){super(...arguments);B(this,"priority",90);B(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,o){return t=uo(t,r,o),t.setHours(0,0,0,0),t}}class Lm extends ie{constructor(){super(...arguments);B(this,"priority",90);B(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,e,r,o){const i=c=>{const l=Math.floor((c-1)/7)*7;return(c+o.weekStartsOn+6)%7+l};switch(e){case"e":case"ee":return be(me(e.length,t),i);case"eo":return be(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,o){return t=uo(t,r,o),t.setHours(0,0,0,0),t}}class Fm extends ie{constructor(){super(...arguments);B(this,"priority",90);B(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,e,r,o){const i=c=>{const l=Math.floor((c-1)/7)*7;return(c+o.weekStartsOn+6)%7+l};switch(e){case"c":case"cc":return be(me(e.length,t),i);case"co":return be(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,o){return t=uo(t,r,o),t.setHours(0,0,0,0),t}}function Ym(n,a){const t=W(n),e=hm(t),r=a-e;return Ge(t,r)}class Wm extends ie{constructor(){super(...arguments);B(this,"priority",90);B(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,e,r){const o=i=>i===0?7:i;switch(e){case"i":case"ii":return me(e.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return be(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return be(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return be(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiii":default:return be(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,e){return e>=1&&e<=7}set(t,e,r){return t=Ym(t,r),t.setHours(0,0,0,0),t}}class Bm extends ie{constructor(){super(...arguments);B(this,"priority",80);B(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,e,r){switch(e){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(lo(r),0,0,0),t}}class Hm extends ie{constructor(){super(...arguments);B(this,"priority",80);B(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,e,r){switch(e){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(lo(r),0,0,0),t}}class zm extends ie{constructor(){super(...arguments);B(this,"priority",80);B(this,"incompatibleTokens",["a","b","t","T"])}parse(t,e,r){switch(e){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(lo(r),0,0,0),t}}class qm extends ie{constructor(){super(...arguments);B(this,"priority",70);B(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,r){switch(e){case"h":return he(ye.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return me(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}}class Km extends ie{constructor(){super(...arguments);B(this,"priority",70);B(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,r){switch(e){case"H":return he(ye.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return me(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,r){return t.setHours(r,0,0,0),t}}class Qm extends ie{constructor(){super(...arguments);B(this,"priority",70);B(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,r){switch(e){case"K":return he(ye.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return me(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}}class Vm extends ie{constructor(){super(...arguments);B(this,"priority",70);B(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,r){switch(e){case"k":return he(ye.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return me(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}}class Um extends ie{constructor(){super(...arguments);B(this,"priority",60);B(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"m":return he(ye.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return me(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setMinutes(r,0,0),t}}class Gm extends ie{constructor(){super(...arguments);B(this,"priority",50);B(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"s":return he(ye.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return me(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setSeconds(r,0),t}}class Xm extends ie{constructor(){super(...arguments);B(this,"priority",30);B(this,"incompatibleTokens",["t","T"])}parse(t,e){const r=o=>Math.trunc(o*Math.pow(10,-e.length+3));return be(me(e.length,t),r)}set(t,e,r){return t.setMilliseconds(r),t}}class Jm extends ie{constructor(){super(...arguments);B(this,"priority",10);B(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return lt(ct.basicOptionalMinutes,t);case"XX":return lt(ct.basic,t);case"XXXX":return lt(ct.basicOptionalSeconds,t);case"XXXXX":return lt(ct.extendedOptionalSeconds,t);case"XXX":default:return lt(ct.extended,t)}}set(t,e,r){return e.timestampIsSet?t:ce(t,t.getTime()-Ar(t)-r)}}class Zm extends ie{constructor(){super(...arguments);B(this,"priority",10);B(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return lt(ct.basicOptionalMinutes,t);case"xx":return lt(ct.basic,t);case"xxxx":return lt(ct.basicOptionalSeconds,t);case"xxxxx":return lt(ct.extendedOptionalSeconds,t);case"xxx":default:return lt(ct.extended,t)}}set(t,e,r){return e.timestampIsSet?t:ce(t,t.getTime()-Ar(t)-r)}}class eg extends ie{constructor(){super(...arguments);B(this,"priority",40);B(this,"incompatibleTokens","*")}parse(t){return Gc(t)}set(t,e,r){return[ce(t,r*1e3),{timestampIsSet:!0}]}}class tg extends ie{constructor(){super(...arguments);B(this,"priority",20);B(this,"incompatibleTokens","*")}parse(t){return Gc(t)}set(t,e,r){return[ce(t,r),{timestampIsSet:!0}]}}const ng={G:new vm,y:new wm,Y:new km,R:new Dm,u:new Cm,Q:new Sm,q:new Mm,M:new _m,L:new jm,w:new Pm,I:new Tm,d:new Om,D:new Rm,E:new Am,e:new Lm,c:new Fm,i:new Wm,a:new Bm,b:new Hm,B:new zm,h:new qm,H:new Km,K:new Qm,k:new Vm,m:new Um,s:new Gm,S:new Xm,X:new Jm,x:new Zm,t:new eg,T:new tg},rg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ag=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,og=/^'([^]*?)'?$/,ig=/''/g,sg=/\S/,cg=/[a-zA-Z]/;function Ca(n,a,t,e){var w,k,f,S,E,T,$,O;const r=fm(),o=(e==null?void 0:e.locale)??r.locale??zc,i=(e==null?void 0:e.firstWeekContainsDate)??((k=(w=e==null?void 0:e.locale)==null?void 0:w.options)==null?void 0:k.firstWeekContainsDate)??r.firstWeekContainsDate??((S=(f=r.locale)==null?void 0:f.options)==null?void 0:S.firstWeekContainsDate)??1,c=(e==null?void 0:e.weekStartsOn)??((T=(E=e==null?void 0:e.locale)==null?void 0:E.options)==null?void 0:T.weekStartsOn)??r.weekStartsOn??((O=($=r.locale)==null?void 0:$.options)==null?void 0:O.weekStartsOn)??0;if(a==="")return n===""?W(t):ce(t,NaN);const l={firstWeekContainsDate:i,weekStartsOn:c,locale:o},p=[new bm],d=a.match(ag).map(C=>{const D=C[0];if(D in Hr){const I=Hr[D];return I(C,o.formatLong)}return C}).join("").match(rg),m=[];for(let C of d){!(e!=null&&e.useAdditionalWeekYearTokens)&&Vc(C)&&Va(C,a,n),!(e!=null&&e.useAdditionalDayOfYearTokens)&&Qc(C)&&Va(C,a,n);const D=C[0],I=ng[D];if(I){const{incompatibleTokens:L}=I;if(Array.isArray(L)){const A=m.find(K=>L.includes(K.token)||K.token===D);if(A)throw new RangeError(`The format string mustn't contain \`${A.fullToken}\` and \`${C}\` at the same time`)}else if(I.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${C}\` and any other token at the same time`);m.push({token:D,fullToken:C});const z=I.run(n,C,o.match,l);if(!z)return ce(t,NaN);p.push(z.setter),n=z.rest}else{if(D.match(cg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+D+"`");if(C==="''"?C="'":D==="'"&&(C=lg(C)),n.indexOf(C)===0)n=n.slice(C.length);else return ce(t,NaN)}}if(n.length>0&&sg.test(n))return ce(t,NaN);const x=p.map(C=>C.priority).sort((C,D)=>D-C).filter((C,D,I)=>I.indexOf(C)===D).map(C=>p.filter(D=>D.priority===C).sort((D,I)=>I.subPriority-D.subPriority)).map(C=>C[0]);let y=W(t);if(isNaN(y.getTime()))return ce(t,NaN);const b={};for(const C of x){if(!C.validate(y,l))return ce(t,NaN);const D=C.set(y,b,l);Array.isArray(D)?(y=D[0],Object.assign(b,D[1])):y=D}return ce(t,y)}function lg(n){return n.match(og)[1].replace(ig,"'")}function dg(n,a){const t=W(n),e=W(a);return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function ug(n,a){const t=Qa(n),e=Qa(a);return+t==+e}function pg(n,a){const t=W(n),e=W(a);return t.getFullYear()===e.getFullYear()}function Jn(n,a){const t=+W(n),[e,r]=[+W(a.start),+W(a.end)].sort((o,i)=>o-i);return t>=e&&t<=r}function fg(n,a){return Ge(n,-1)}function hg(n,a){const e=yg(n);let r;if(e.date){const l=bg(e.date,2);r=vg(l.restDateString,l.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);const o=r.getTime();let i=0,c;if(e.time&&(i=wg(e.time),isNaN(i)))return new Date(NaN);if(e.timezone){if(c=kg(e.timezone),isNaN(c))return new Date(NaN)}else{const l=new Date(o+i),p=new Date(0);return p.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),p.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),p}return new Date(o+i+c)}const yr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},mg=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,gg=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,xg=/^([+-])(\d{2})(?::?(\d{2}))?$/;function yg(n){const a={},t=n.split(yr.dateTimeDelimiter);let e;if(t.length>2)return a;if(/:/.test(t[0])?e=t[0]:(a.date=t[0],e=t[1],yr.timeZoneDelimiter.test(a.date)&&(a.date=n.split(yr.timeZoneDelimiter)[0],e=n.substr(a.date.length,n.length))),e){const r=yr.timezone.exec(e);r?(a.time=e.replace(r[1],""),a.timezone=r[1]):a.time=e}return a}function bg(n,a){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+a)+"})|(\\d{2}|[+-]\\d{"+(2+a)+"})$)"),e=n.match(t);if(!e)return{year:NaN,restDateString:""};const r=e[1]?parseInt(e[1]):null,o=e[2]?parseInt(e[2]):null;return{year:o===null?r:o*100,restDateString:n.slice((e[1]||e[2]).length)}}function vg(n,a){if(a===null)return new Date(NaN);const t=n.match(mg);if(!t)return new Date(NaN);const e=!!t[4],r=Yn(t[1]),o=Yn(t[2])-1,i=Yn(t[3]),c=Yn(t[4]),l=Yn(t[5])-1;if(e)return _g(a,c,l)?Dg(a,c,l):new Date(NaN);{const p=new Date(0);return!Sg(a,o,i)||!Mg(a,r)?new Date(NaN):(p.setUTCFullYear(a,o,Math.max(r,i)),p)}}function Yn(n){return n?parseInt(n):1}function wg(n){const a=n.match(gg);if(!a)return NaN;const t=Sa(a[1]),e=Sa(a[2]),r=Sa(a[3]);return jg(t,e,r)?t*ra+e*na+r*1e3:NaN}function Sa(n){return n&&parseFloat(n.replace(",","."))||0}function kg(n){if(n==="Z")return 0;const a=n.match(xg);if(!a)return 0;const t=a[1]==="+"?-1:1,e=parseInt(a[2]),r=a[3]&&parseInt(a[3])||0;return Ig(e,r)?t*(e*ra+r*na):NaN}function Dg(n,a,t){const e=new Date(0);e.setUTCFullYear(n,0,4);const r=e.getUTCDay()||7,o=(a-1)*7+t+1-r;return e.setUTCDate(e.getUTCDate()+o),e}const Cg=[31,null,31,30,31,30,31,31,30,31,30,31];function Zc(n){return n%400===0||n%4===0&&n%100!==0}function Sg(n,a,t){return a>=0&&a<=11&&t>=1&&t<=(Cg[a]||(Zc(n)?29:28))}function Mg(n,a){return a>=1&&a<=(Zc(n)?366:365)}function _g(n,a,t){return a>=1&&a<=53&&t>=0&&t<=6}function jg(n,a,t){return n===24?a===0&&t===0:t>=0&&t<60&&a>=0&&a<60&&n>=0&&n<25}function Ig(n,a){return a>=0&&a<=59}function He(n,a){const t=W(n),e=t.getFullYear(),r=t.getDate(),o=ce(n,0);o.setFullYear(e,a,15),o.setHours(0,0,0,0);const i=pm(o);return t.setMonth(a,Math.min(r,i)),t}function Pg(n,a){let t=W(n);return isNaN(+t)?ce(n,NaN):(a.year!=null&&t.setFullYear(a.year),a.month!=null&&(t=He(t,a.month)),a.date!=null&&t.setDate(a.date),a.hours!=null&&t.setHours(a.hours),a.minutes!=null&&t.setMinutes(a.minutes),a.seconds!=null&&t.setSeconds(a.seconds),a.milliseconds!=null&&t.setMilliseconds(a.milliseconds),t)}function jr(n,a){const t=W(n);return t.setHours(a),t}function Ir(n,a){const t=W(n);return t.setMinutes(a),t}function bn(n,a){const t=W(n),e=Math.trunc(t.getMonth()/3)+1,r=a-e;return He(t,t.getMonth()+r*3)}function Pr(n,a){const t=W(n);return t.setSeconds(a),t}function ot(n,a){const t=W(n);return isNaN(+t)?ce(n,NaN):(t.setFullYear(a),t)}function Zt(n,a){return Je(n,-a)}function el(n,a){return io(n,-1)}function Li(n,a){return Lr(n,-1)}function jn(n,a){return bt(n,-a)}var Eg=typeof document<"u",Tg=function(){},qr=Eg?v.useLayoutEffect:Tg;const $g={...ic},Ng=$g.useInsertionEffect,Og=Ng||(n=>n());function Rg(n){const a=v.useRef(()=>{});return Og(()=>{a.current=n}),v.useCallback(function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return a.current==null?void 0:a.current(...e)},[])}const Ag={...ic};let Fi=!1,Lg=0;const Yi=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Lg++;function Fg(){const[n,a]=v.useState(()=>Fi?Yi():void 0);return qr(()=>{n==null&&a(Yi())},[]),v.useEffect(()=>{Fi=!0},[]),n}const Yg=Ag.useId,tl=Yg||Fg,Wg=v.forwardRef(function(a,t){const{context:{placement:e,elements:{floating:r},middlewareData:{arrow:o,shift:i}},width:c=14,height:l=7,tipRadius:p=0,strokeWidth:d=0,staticOffset:m,stroke:x,d:y,style:{transform:b,...w}={},...k}=a,f=tl(),[S,E]=v.useState(!1);if(qr(()=>{if(!r)return;Xe(r).direction==="rtl"&&E(!0)},[r]),!r)return null;const[T,$]=e.split("-"),O=T==="top"||T==="bottom";let C=m;(O&&i!=null&&i.x||!O&&i!=null&&i.y)&&(C=null);const D=d*2,I=D/2,L=c/2*(p/-8+1),z=l/2*p/4,A=!!y,K=C&&$==="end"?"bottom":"top";let U=C&&$==="end"?"right":"left";C&&S&&(U=$==="end"?"left":"right");const q=(o==null?void 0:o.x)!=null?C||o.x:"",j=(o==null?void 0:o.y)!=null?C||o.y:"",H=y||"M0,0"+(" H"+c)+(" L"+(c-L)+","+(l-z))+(" Q"+c/2+","+l+" "+L+","+(l-z))+" Z",M={top:A?"rotate(180deg)":"",left:A?"rotate(90deg)":"rotate(-90deg)",bottom:A?"":"rotate(180deg)",right:A?"rotate(-90deg)":"rotate(90deg)"}[T];return s.jsxs("svg",{...k,"aria-hidden":!0,ref:t,width:A?c:c+D,height:c,viewBox:"0 0 "+c+" "+(l>c?l:c),style:{position:"absolute",pointerEvents:"none",[U]:q,[K]:j,[T]:O||A?"100%":"calc(100% - "+D/2+"px)",transform:[M,b].filter(G=>!!G).join(" "),...w},children:[D>0&&s.jsx("path",{clipPath:"url(#"+f+")",fill:"none",stroke:x,strokeWidth:D+(y?0:1),d:H}),s.jsx("path",{stroke:D&&!y?k.fill:"none",d:H}),s.jsx("clipPath",{id:f,children:s.jsx("rect",{x:-I,y:I*(A?-1:1),width:c+D,height:c})})]})});function Bg(){const n=new Map;return{emit(a,t){var e;(e=n.get(a))==null||e.forEach(r=>r(t))},on(a,t){n.has(a)||n.set(a,new Set),n.get(a).add(t)},off(a,t){var e;(e=n.get(a))==null||e.delete(t)}}}const Hg=v.createContext(null),zg=v.createContext(null),qg=()=>{var n;return((n=v.useContext(Hg))==null?void 0:n.id)||null},Kg=()=>v.useContext(zg);function Qg(n){const{open:a=!1,onOpenChange:t,elements:e}=n,r=tl(),o=v.useRef({}),[i]=v.useState(()=>Bg()),c=qg()!=null,[l,p]=v.useState(e.reference),d=Rg((y,b,w)=>{o.current.openEvent=y?b:void 0,i.emit("openchange",{open:y,event:b,reason:w,nested:c}),t==null||t(y,b,w)}),m=v.useMemo(()=>({setPositionReference:p}),[]),x=v.useMemo(()=>({reference:l||e.reference||null,floating:e.floating||null,domReference:e.reference}),[l,e.reference,e.floating]);return v.useMemo(()=>({dataRef:o,open:a,onOpenChange:d,elements:x,events:i,floatingId:r,refs:m}),[a,d,x,i,r,m])}function Vg(n){var a,t;let{elements:e,...r}=n===void 0?{}:n;const{nodeId:o}=r,i=Qg({...r,elements:{reference:(a=e==null?void 0:e.reference)!=null?a:null,floating:(t=e==null?void 0:e.floating)!=null?t:null}}),c=r.rootContext||i,l=c.elements,[p,d]=v.useState(null),[m,x]=v.useState(null),b=(l==null?void 0:l.domReference)||p,w=v.useRef(null),k=Kg();qr(()=>{b&&(w.current=b)},[b]);const f=Ef({...r,elements:{...l,...m&&{reference:m}}}),S=v.useCallback(C=>{const D=Oe(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),getClientRects:()=>C.getClientRects(),contextElement:C}:C;x(D),f.refs.setReference(D)},[f.refs]),E=v.useCallback(C=>{(Oe(C)||C===null)&&(w.current=C,d(C)),(Oe(f.refs.reference.current)||f.refs.reference.current===null||C!==null&&!Oe(C))&&f.refs.setReference(C)},[f.refs]),T=v.useMemo(()=>({...f.refs,setReference:E,setPositionReference:S,domReference:w}),[f.refs,E,S]),$=v.useMemo(()=>({...f.elements,domReference:b}),[f.elements,b]),O=v.useMemo(()=>({...f,...c,refs:T,elements:$,nodeId:o}),[f,T,$,o,c]);return qr(()=>{c.dataRef.current.floatingContext=O;const C=k==null?void 0:k.nodesRef.current.find(D=>D.id===o);C&&(C.context=O)}),v.useMemo(()=>({...f,context:O,refs:T,elements:$}),[f,T,$,O])}/*!
|
|
354
|
+
react-datepicker v7.6.0
|
|
355
|
+
https://github.com/Hacker0x01/react-datepicker
|
|
356
|
+
Released under the MIT License.
|
|
357
|
+
*/var Ga=function(a,t){return Ga=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},Ga(a,t)};function we(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");Ga(n,a);function t(){this.constructor=n}n.prototype=a===null?Object.create(a):(t.prototype=a.prototype,new t)}var ae=function(){return ae=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ae.apply(this,arguments)};function dt(n,a,t){if(t||arguments.length===2)for(var e=0,r=a.length,o;e<r;e++)(o||!(e in a))&&(o||(o=Array.prototype.slice.call(a,0,e)),o[e]=a[e]);return n.concat(o||Array.prototype.slice.call(a))}var Ug=function(n){var a=n.showTimeSelectOnly,t=a===void 0?!1:a,e=n.showTime,r=e===void 0?!1:e,o=n.className,i=n.children,c=t?"Choose Time":"Choose Date".concat(r?" and Time":"");return _.createElement("div",{className:o,role:"dialog","aria-label":c,"aria-modal":"true"},i)},Gg=function(n,a){var t=v.useRef(null),e=v.useRef(n);e.current=n;var r=v.useCallback(function(o){var i;t.current&&!t.current.contains(o.target)&&(a&&o.target instanceof HTMLElement&&o.target.classList.contains(a)||(i=e.current)===null||i===void 0||i.call(e,o))},[a]);return v.useEffect(function(){return document.addEventListener("mousedown",r),function(){document.removeEventListener("mousedown",r)}},[r]),t},oa=function(n){var a=n.children,t=n.onClickOutside,e=n.className,r=n.containerRef,o=n.style,i=n.ignoreClass,c=Gg(t,i);return _.createElement("div",{className:e,style:o,ref:function(l){c.current=l,r&&(r.current=l)}},a)},F;(function(n){n.ArrowUp="ArrowUp",n.ArrowDown="ArrowDown",n.ArrowLeft="ArrowLeft",n.ArrowRight="ArrowRight",n.PageUp="PageUp",n.PageDown="PageDown",n.Home="Home",n.End="End",n.Enter="Enter",n.Space=" ",n.Tab="Tab",n.Escape="Escape",n.Backspace="Backspace",n.X="x"})(F||(F={}));function nl(){var n=typeof window<"u"?window:globalThis;return n}var tr=12,Xg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;function le(n){if(n==null)return new Date;var a=typeof n=="string"?hg(n):W(n);return xt(a)?a:new Date}function Ma(n,a,t,e,r){var o,i=null,c=en(t)||en(Vn()),l=!0;if(Array.isArray(a))return a.forEach(function(d){var m=Ca(n,d,new Date,{locale:c,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});e&&(l=xt(m,r)&&n===fe(m,d,t)),xt(m,r)&&l&&(i=m)}),i;if(i=Ca(n,a,new Date,{locale:c,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0}),e)l=xt(i)&&n===fe(i,a,t);else if(!xt(i)){var p=((o=a.match(Xg))!==null&&o!==void 0?o:[]).map(function(d){var m=d[0];if(m==="p"||m==="P"){var x=Hr[m];return c?x(d,c.formatLong):m}return d}).join("");n.length>0&&(i=Ca(n,p.slice(0,n.length),new Date,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})),xt(i)||(i=new Date(n))}return xt(i)&&l?i:null}function xt(n,a){return Fr(n)&&!sn(n,a??new Date("1/1/1800"))}function fe(n,a,t){if(t==="en")return Ri(n,a,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var e=t?en(t):void 0;return t&&!e&&console.warn('A locale object was not found for the provided string ["'.concat(t,'"].')),!e&&Vn()&&en(Vn())&&(e=en(Vn())),Ri(n,a,{locale:e,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function qe(n,a){var t=a.dateFormat,e=a.locale,r=Array.isArray(t)&&t.length>0?t[0]:t;return n&&fe(n,r,e)||""}function Jg(n,a,t){if(!n)return"";var e=qe(n,t),r=a?qe(a,t):"";return"".concat(e," - ").concat(r)}function Zg(n,a){if(!(n!=null&&n.length))return"";var t=n[0]?qe(n[0],a):"";if(n.length===1)return t;if(n.length===2&&n[1]){var e=qe(n[1],a);return"".concat(t,", ").concat(e)}var r=n.length-1;return"".concat(t," (+").concat(r,")")}function _a(n,a){var t=a.hour,e=t===void 0?0:t,r=a.minute,o=r===void 0?0:r,i=a.second,c=i===void 0?0:i;return jr(Ir(Pr(n,c),o),e)}function ex(n){return so(n)}function tx(n,a){return fe(n,"ddd",a)}function Er(n){return on(n)}function Rt(n,a,t){var e=en(a||Vn());return Dt(n,{locale:e,weekStartsOn:t})}function kt(n){return Bc(n)}function zn(n){return aa(n)}function Wi(n){return Qa(n)}function Bi(){return on(le())}function Hi(n){return Yc(n)}function nx(n){return bh(n)}function rx(n){return Wc(n)}function it(n,a){return n&&a?pg(n,a):!n&&!a}function je(n,a){return n&&a?dg(n,a):!n&&!a}function Kr(n,a){return n&&a?ug(n,a):!n&&!a}function re(n,a){return n&&a?xh(n,a):!n&&!a}function Ut(n,a){return n&&a?mm(n,a):!n&&!a}function qn(n,a,t){var e,r=on(a),o=Yc(t);try{e=Jn(n,{start:r,end:o})}catch{e=!1}return e}function Vn(){var n=nl();return n.__localeId__}function en(n){if(typeof n=="string"){var a=nl();return a.__localeData__?a.__localeData__[n]:void 0}else return n}function ax(n,a,t){return a(fe(n,"EEEE",t))}function ox(n,a){return fe(n,"EEEEEE",a)}function ix(n,a){return fe(n,"EEE",a)}function po(n,a){return fe(He(le(),n),"LLLL",a)}function rl(n,a){return fe(He(le(),n),"LLL",a)}function sx(n,a){return fe(bn(le(),n),"QQQ",a)}function Ke(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,i=t.excludeDateIntervals,c=t.includeDates,l=t.includeDateIntervals,p=t.filterDate;return nr(n,{minDate:e,maxDate:r})||o&&o.some(function(d){return d instanceof Date?re(n,d):re(n,d.date)})||i&&i.some(function(d){var m=d.start,x=d.end;return Jn(n,{start:m,end:x})})||c&&!c.some(function(d){return re(n,d)})||l&&!l.some(function(d){var m=d.start,x=d.end;return Jn(n,{start:m,end:x})})||p&&!p(le(n))||!1}function fo(n,a){var t=a===void 0?{}:a,e=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some(function(o){var i=o.start,c=o.end;return Jn(n,{start:i,end:c})}):e&&e.some(function(o){var i;return o instanceof Date?re(n,o):re(n,(i=o.date)!==null&&i!==void 0?i:new Date)})||!1}function al(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,i=t.includeDates,c=t.filterDate;return nr(n,{minDate:e?Bc(e):void 0,maxDate:r?Wc(r):void 0})||(o==null?void 0:o.some(function(l){return je(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return je(n,l)})||c&&!c(le(n))||!1}function br(n,a,t,e){var r=ee(n),o=Ie(n),i=ee(a),c=Ie(a),l=ee(e);return r===i&&r===l?o<=t&&t<=c:r<i?l===r&&o<=t||l===i&&c>=t||l<i&&l>r:!1}function cx(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,i=t.includeDates;return nr(n,{minDate:e,maxDate:r})||o&&o.some(function(c){return je(c instanceof Date?c:c.date,n)})||i&&!i.some(function(c){return je(c,n)})||!1}function vr(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,i=t.includeDates,c=t.filterDate;return nr(n,{minDate:e,maxDate:r})||(o==null?void 0:o.some(function(l){return Kr(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Kr(n,l)})||c&&!c(le(n))||!1}function wr(n,a,t){if(!a||!t||!Fr(a)||!Fr(t))return!1;var e=ee(a),r=ee(t);return e<=n&&r>=n}function Tr(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,i=t.includeDates,c=t.filterDate,l=new Date(n,0,1);return nr(l,{minDate:e?aa(e):void 0,maxDate:r?Hc(r):void 0})||(o==null?void 0:o.some(function(p){return it(l,p instanceof Date?p:p.date)}))||i&&!i.some(function(p){return it(l,p)})||c&&!c(le(l))||!1}function kr(n,a,t,e){var r=ee(n),o=Jt(n),i=ee(a),c=Jt(a),l=ee(e);return r===i&&r===l?o<=t&&t<=c:r<i?l===r&&o<=t||l===i&&c>=t||l<i&&l>r:!1}function nr(n,a){var t,e=a===void 0?{}:a,r=e.minDate,o=e.maxDate;return(t=r&&_n(n,r)<0||o&&_n(n,o)>0)!==null&&t!==void 0?t:!1}function zi(n,a){return a.some(function(t){return ut(t)===ut(n)&&pt(t)===pt(n)&&wt(t)===wt(n)})}function qi(n,a){var t=a===void 0?{}:a,e=t.excludeTimes,r=t.includeTimes,o=t.filterTime;return e&&zi(n,e)||r&&!zi(n,r)||o&&!o(n)||!1}function Ki(n,a){var t=a.minTime,e=a.maxTime;if(!t||!e)throw new Error("Both minTime and maxTime props required");var r=le();r=jr(r,ut(n)),r=Ir(r,pt(n)),r=Pr(r,wt(n));var o=le();o=jr(o,ut(t)),o=Ir(o,pt(t)),o=Pr(o,wt(t));var i=le();i=jr(i,ut(e)),i=Ir(i,pt(e)),i=Pr(i,wt(e));var c;try{c=!Jn(r,{start:o,end:i})}catch{c=!1}return c}function Qi(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.includeDates,o=Zt(n,1);return e&&Yr(e,o)>0||r&&r.every(function(i){return Yr(i,o)>0})||!1}function Vi(n,a){var t=a===void 0?{}:a,e=t.maxDate,r=t.includeDates,o=Je(n,1);return e&&Yr(o,e)>0||r&&r.every(function(i){return Yr(o,i)>0})||!1}function lx(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.includeDates,o=aa(n),i=el(o);return e&&Wr(e,i)>0||r&&r.every(function(c){return Wr(c,i)>0})||!1}function dx(n,a){var t=a===void 0?{}:a,e=t.maxDate,r=t.includeDates,o=Hc(n),i=io(o,1);return e&&Wr(i,e)>0||r&&r.every(function(c){return Wr(i,c)>0})||!1}function Ui(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.includeDates,o=jn(n,1);return e&&Br(e,o)>0||r&&r.every(function(i){return Br(i,o)>0})||!1}function ux(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.yearItemNumber,o=r===void 0?tr:r,i=zn(jn(n,o)),c=Nt(i,o).endPeriod,l=e&&ee(e);return l&&l>c||!1}function Gi(n,a){var t=a===void 0?{}:a,e=t.maxDate,r=t.includeDates,o=bt(n,1);return e&&Br(o,e)>0||r&&r.every(function(i){return Br(o,i)>0})||!1}function px(n,a){var t=a===void 0?{}:a,e=t.maxDate,r=t.yearItemNumber,o=r===void 0?tr:r,i=bt(n,o),c=Nt(i,o).startPeriod,l=e&&ee(e);return l&&l<c||!1}function ol(n){var a=n.minDate,t=n.includeDates;if(t&&a){var e=t.filter(function(r){return _n(r,a)>=0});return Pi(e)}else return t?Pi(t):a}function il(n){var a=n.maxDate,t=n.includeDates;if(t&&a){var e=t.filter(function(r){return _n(r,a)<=0});return Ii(e)}else return t?Ii(t):a}function Xi(n,a){var t;n===void 0&&(n=[]),a===void 0&&(a="react-datepicker__day--highlighted");for(var e=new Map,r=0,o=n.length;r<o;r++){var i=n[r];if(vt(i)){var c=fe(i,"MM.dd.yyyy"),l=e.get(c)||[];l.includes(a)||(l.push(a),e.set(c,l))}else if(typeof i=="object"){var p=Object.keys(i),d=(t=p[0])!==null&&t!==void 0?t:"",m=i[d];if(typeof d=="string"&&Array.isArray(m))for(var x=0,y=m.length;x<y;x++){var b=m[x];if(b){var c=fe(b,"MM.dd.yyyy"),l=e.get(c)||[];l.includes(d)||(l.push(d),e.set(c,l))}}}}return e}function fx(n,a){return n.length!==a.length?!1:n.every(function(t,e){return t===a[e]})}function hx(n,a){n===void 0&&(n=[]),a===void 0&&(a="react-datepicker__day--holidays");var t=new Map;return n.forEach(function(e){var r=e.date,o=e.holidayName;if(vt(r)){var i=fe(r,"MM.dd.yyyy"),c=t.get(i)||{className:"",holidayNames:[]};if(!("className"in c&&c.className===a&&fx(c.holidayNames,[o]))){c.className=a;var l=c.holidayNames;c.holidayNames=l?dt(dt([],l,!0),[o],!1):[o],t.set(i,c)}}}),t}function mx(n,a,t,e,r){for(var o=r.length,i=[],c=0;c<o;c++){var l=n,p=r[c];p&&(l=fh(l,ut(p)),l=Ka(l,pt(p)),l=gh(l,wt(p)));var d=Ka(n,(t+1)*e);Ft(l,a)&&sn(l,d)&&p!=null&&i.push(p)}return i}function Ji(n){return n<10?"0".concat(n):"".concat(n)}function Nt(n,a){a===void 0&&(a=tr);var t=Math.ceil(ee(n)/a)*a,e=t-(a-1);return{startPeriod:e,endPeriod:t}}function gx(n){var a=new Date(n.getFullYear(),n.getMonth(),n.getDate()),t=new Date(n.getFullYear(),n.getMonth(),n.getDate(),24);return Math.round((+t-+a)/36e5)}function Zi(n){var a=n.getSeconds(),t=n.getMilliseconds();return W(n.getTime()-a*1e3-t)}function xx(n,a){return Zi(n).getTime()===Zi(a).getTime()}function es(n){if(!vt(n))throw new Error("Invalid date");var a=new Date(n);return a.setHours(0,0,0,0),a}function ts(n,a){if(!vt(n)||!vt(a))throw new Error("Invalid date received");var t=es(n),e=es(a);return sn(t,e)}function sl(n){return n.key===F.Space}var yx=(function(n){we(a,n);function a(t){var e=n.call(this,t)||this;return e.inputRef=_.createRef(),e.onTimeChange=function(r){var o,i;e.setState({time:r});var c=e.props.date,l=c instanceof Date&&!isNaN(+c),p=l?c:new Date;if(r!=null&&r.includes(":")){var d=r.split(":"),m=d[0],x=d[1];p.setHours(Number(m)),p.setMinutes(Number(x))}(i=(o=e.props).onChange)===null||i===void 0||i.call(o,p)},e.renderTimeInput=function(){var r=e.state.time,o=e.props,i=o.date,c=o.timeString,l=o.customTimeInput;return l?v.cloneElement(l,{date:i,value:r,onChange:e.onTimeChange}):_.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:e.inputRef,onClick:function(){var p;(p=e.inputRef.current)===null||p===void 0||p.focus()},required:!0,value:r,onChange:function(p){e.onTimeChange(p.target.value||c)}})},e.state={time:e.props.timeString},e}return a.getDerivedStateFromProps=function(t,e){return t.timeString!==e.time?{time:t.timeString}:null},a.prototype.render=function(){return _.createElement("div",{className:"react-datepicker__input-time-container"},_.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),_.createElement("div",{className:"react-datepicker-time__input-container"},_.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},a})(v.Component),bx=(function(n){we(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.dayEl=v.createRef(),t.handleClick=function(e){!t.isDisabled()&&t.props.onClick&&t.props.onClick(e)},t.handleMouseEnter=function(e){!t.isDisabled()&&t.props.onMouseEnter&&t.props.onMouseEnter(e)},t.handleOnKeyDown=function(e){var r,o,i=e.key;i===F.Space&&(e.preventDefault(),e.key=F.Enter),(o=(r=t.props).handleOnKeyDown)===null||o===void 0||o.call(r,e)},t.isSameDay=function(e){return re(t.props.day,e)},t.isKeyboardSelected=function(){var e;if(t.props.disabledKeyboardNavigation)return!1;var r=t.props.selectsMultiple?(e=t.props.selectedDates)===null||e===void 0?void 0:e.some(function(i){return t.isSameDayOrWeek(i)}):t.isSameDayOrWeek(t.props.selected),o=t.props.preSelection&&t.isDisabled(t.props.preSelection);return!r&&t.isSameDayOrWeek(t.props.preSelection)&&!o},t.isDisabled=function(e){return e===void 0&&(e=t.props.day),Ke(e,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(){return fo(t.props.day,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.isStartOfWeek=function(){return re(t.props.day,Rt(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameWeek=function(e){return t.props.showWeekPicker&&re(e,Rt(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameDayOrWeek=function(e){return t.isSameDay(e)||t.isSameWeek(e)},t.getHighLightedClass=function(){var e=t.props,r=e.day,o=e.highlightDates;if(!o)return!1;var i=fe(r,"MM.dd.yyyy");return o.get(i)},t.getHolidaysClass=function(){var e,r=t.props,o=r.day,i=r.holidays;if(!i)return[void 0];var c=fe(o,"MM.dd.yyyy");return i.has(c)?[(e=i.get(c))===null||e===void 0?void 0:e.className]:[void 0]},t.isInRange=function(){var e=t.props,r=e.day,o=e.startDate,i=e.endDate;return!o||!i?!1:qn(r,o,i)},t.isInSelectingRange=function(){var e,r=t.props,o=r.day,i=r.selectsStart,c=r.selectsEnd,l=r.selectsRange,p=r.selectsDisabledDaysInRange,d=r.startDate,m=r.endDate,x=(e=t.props.selectingDate)!==null&&e!==void 0?e:t.props.preSelection;return!(i||c||l)||!x||!p&&t.isDisabled()?!1:i&&m&&(sn(x,m)||Ut(x,m))?qn(o,x,m):c&&d&&(Ft(x,d)||Ut(x,d))||l&&d&&!m&&(Ft(x,d)||Ut(x,d))?qn(o,d,x):!1},t.isSelectingRangeStart=function(){var e;if(!t.isInSelectingRange())return!1;var r=t.props,o=r.day,i=r.startDate,c=r.selectsStart,l=(e=t.props.selectingDate)!==null&&e!==void 0?e:t.props.preSelection;return c?re(o,l):re(o,i)},t.isSelectingRangeEnd=function(){var e;if(!t.isInSelectingRange())return!1;var r=t.props,o=r.day,i=r.endDate,c=r.selectsEnd,l=r.selectsRange,p=(e=t.props.selectingDate)!==null&&e!==void 0?e:t.props.preSelection;return c||l?re(o,p):re(o,i)},t.isRangeStart=function(){var e=t.props,r=e.day,o=e.startDate,i=e.endDate;return!o||!i?!1:re(o,r)},t.isRangeEnd=function(){var e=t.props,r=e.day,o=e.startDate,i=e.endDate;return!o||!i?!1:re(i,r)},t.isWeekend=function(){var e=um(t.props.day);return e===0||e===6},t.isAfterMonth=function(){return t.props.month!==void 0&&(t.props.month+1)%12===Ie(t.props.day)},t.isBeforeMonth=function(){return t.props.month!==void 0&&(Ie(t.props.day)+1)%12===t.props.month},t.isCurrentDay=function(){return t.isSameDay(le())},t.isSelected=function(){var e;return t.props.selectsMultiple?(e=t.props.selectedDates)===null||e===void 0?void 0:e.some(function(r){return t.isSameDayOrWeek(r)}):t.isSameDayOrWeek(t.props.selected)},t.getClassNames=function(e){var r=t.props.dayClassName?t.props.dayClassName(e):void 0;return Me("react-datepicker__day",r,"react-datepicker__day--"+tx(t.props.day),{"react-datepicker__day--disabled":t.isDisabled(),"react-datepicker__day--excluded":t.isExcluded(),"react-datepicker__day--selected":t.isSelected(),"react-datepicker__day--keyboard-selected":t.isKeyboardSelected(),"react-datepicker__day--range-start":t.isRangeStart(),"react-datepicker__day--range-end":t.isRangeEnd(),"react-datepicker__day--in-range":t.isInRange(),"react-datepicker__day--in-selecting-range":t.isInSelectingRange(),"react-datepicker__day--selecting-range-start":t.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":t.isSelectingRangeEnd(),"react-datepicker__day--today":t.isCurrentDay(),"react-datepicker__day--weekend":t.isWeekend(),"react-datepicker__day--outside-month":t.isAfterMonth()||t.isBeforeMonth()},t.getHighLightedClass(),t.getHolidaysClass())},t.getAriaLabel=function(){var e=t.props,r=e.day,o=e.ariaLabelPrefixWhenEnabled,i=o===void 0?"Choose":o,c=e.ariaLabelPrefixWhenDisabled,l=c===void 0?"Not available":c,p=t.isDisabled()||t.isExcluded()?l:i;return"".concat(p," ").concat(fe(r,"PPPP",t.props.locale))},t.getTitle=function(){var e=t.props,r=e.day,o=e.holidays,i=o===void 0?new Map:o,c=e.excludeDates,l=fe(r,"MM.dd.yyyy"),p=[];return i.has(l)&&p.push.apply(p,i.get(l).holidayNames),t.isExcluded()&&p.push(c==null?void 0:c.filter(function(d){return d instanceof Date?re(d,r):re(d==null?void 0:d.date,r)}).map(function(d){if(!(d instanceof Date))return d==null?void 0:d.message})),p.join(", ")},t.getTabIndex=function(){var e=t.props.selected,r=t.props.preSelection,o=!(t.props.showWeekPicker&&(t.props.showWeekNumber||!t.isStartOfWeek()))&&(t.isKeyboardSelected()||t.isSameDay(e)&&re(r,e))?0:-1;return o},t.handleFocusDay=function(){var e;t.shouldFocusDay()&&((e=t.dayEl.current)===null||e===void 0||e.focus({preventScroll:!0}))},t.renderDayContents=function(){return t.props.monthShowsDuplicateDaysEnd&&t.isAfterMonth()||t.props.monthShowsDuplicateDaysStart&&t.isBeforeMonth()?null:t.props.renderDayContents?t.props.renderDayContents(Ai(t.props.day),t.props.day):Ai(t.props.day)},t.render=function(){return _.createElement("div",{ref:t.dayEl,className:t.getClassNames(t.props.day),onKeyDown:t.handleOnKeyDown,onClick:t.handleClick,onMouseEnter:t.props.usePointerEvent?void 0:t.handleMouseEnter,onPointerEnter:t.props.usePointerEvent?t.handleMouseEnter:void 0,tabIndex:t.getTabIndex(),"aria-label":t.getAriaLabel(),role:"option",title:t.getTitle(),"aria-disabled":t.isDisabled(),"aria-current":t.isCurrentDay()?"date":void 0,"aria-selected":t.isSelected()||t.isInRange()},t.renderDayContents(),t.getTitle()!==""&&_.createElement("span",{className:"overlay"},t.getTitle()))},t}return a.prototype.componentDidMount=function(){this.handleFocusDay()},a.prototype.componentDidUpdate=function(){this.handleFocusDay()},a.prototype.shouldFocusDay=function(){var t=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(t=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(t=!1),this.isDayActiveElement()&&(t=!0),this.isDuplicateDay()&&(t=!1)),t},a.prototype.isDayActiveElement=function(){var t,e,r;return((e=(t=this.props.containerRef)===null||t===void 0?void 0:t.current)===null||e===void 0?void 0:e.contains(document.activeElement))&&((r=document.activeElement)===null||r===void 0?void 0:r.classList.contains("react-datepicker__day"))},a.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},a})(v.Component),vx=(function(n){we(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.weekNumberEl=v.createRef(),t.handleClick=function(e){t.props.onClick&&t.props.onClick(e)},t.handleOnKeyDown=function(e){var r,o,i=e.key;i===F.Space&&(e.preventDefault(),e.key=F.Enter),(o=(r=t.props).handleOnKeyDown)===null||o===void 0||o.call(r,e)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!re(t.props.date,t.props.selected)&&re(t.props.date,t.props.preSelection)},t.getTabIndex=function(){return t.props.showWeekPicker&&t.props.showWeekNumber&&(t.isKeyboardSelected()||re(t.props.date,t.props.selected)&&re(t.props.preSelection,t.props.selected))?0:-1},t.handleFocusWeekNumber=function(e){var r=!1;t.getTabIndex()===0&&!(e!=null&&e.isInputFocused)&&re(t.props.date,t.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(r=!0),t.props.inline&&!t.props.shouldFocusDayInline&&(r=!1),t.props.containerRef&&t.props.containerRef.current&&t.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(r=!0)),r&&t.weekNumberEl.current&&t.weekNumberEl.current.focus({preventScroll:!0})},t}return Object.defineProperty(a,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),a.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},a.prototype.componentDidUpdate=function(t){this.handleFocusWeekNumber(t)},a.prototype.render=function(){var t=this.props,e=t.weekNumber,r=t.isWeekDisabled,o=t.ariaLabelPrefix,i=o===void 0?a.defaultProps.ariaLabelPrefix:o,c=t.onClick,l={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!c&&!r,"react-datepicker__week-number--selected":!!c&&re(this.props.date,this.props.selected)};return _.createElement("div",{ref:this.weekNumberEl,className:Me(l),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},e)},a})(v.Component),wx=(function(n){we(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.isDisabled=function(e){return Ke(e,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.handleDayClick=function(e,r){t.props.onDayClick&&t.props.onDayClick(e,r)},t.handleDayMouseEnter=function(e){t.props.onDayMouseEnter&&t.props.onDayMouseEnter(e)},t.handleWeekClick=function(e,r,o){for(var i,c,l,p=new Date(e),d=0;d<7;d++){var m=new Date(e);m.setDate(m.getDate()+d);var x=!t.isDisabled(m);if(x){p=m;break}}typeof t.props.onWeekSelect=="function"&&t.props.onWeekSelect(p,r,o),t.props.showWeekPicker&&t.handleDayClick(p,o),((i=t.props.shouldCloseOnSelect)!==null&&i!==void 0?i:a.defaultProps.shouldCloseOnSelect)&&((l=(c=t.props).setOpen)===null||l===void 0||l.call(c,!1))},t.formatWeekNumber=function(e){return t.props.formatWeekNumber?t.props.formatWeekNumber(e):ex(e)},t.isWeekDisabled=function(){for(var e=t.startOfWeek(),r=Ge(e,6),o=new Date(e);o<=r;){if(!t.isDisabled(o))return!1;o=Ge(o,1)}return!0},t.renderDays=function(){var e=t.startOfWeek(),r=[],o=t.formatWeekNumber(e);if(t.props.showWeekNumber){var i=t.props.onWeekSelect||t.props.showWeekPicker?t.handleWeekClick.bind(t,e,o):void 0;r.push(_.createElement(vx,ae({key:"W"},a.defaultProps,t.props,{weekNumber:o,isWeekDisabled:t.isWeekDisabled(),date:e,onClick:i})))}return r.concat([0,1,2,3,4,5,6].map(function(c){var l=Ge(e,c);return _.createElement(bx,ae({},a.defaultProps,t.props,{ariaLabelPrefixWhenEnabled:t.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:t.props.disabledDayAriaLabelPrefix,key:l.valueOf(),day:l,onClick:t.handleDayClick.bind(t,l),onMouseEnter:t.handleDayMouseEnter.bind(t,l)}))}))},t.startOfWeek=function(){return Rt(t.props.day,t.props.locale,t.props.calendarStartDay)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!re(t.startOfWeek(),t.props.selected)&&re(t.startOfWeek(),t.props.preSelection)},t}return Object.defineProperty(a,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),a.prototype.render=function(){var t={"react-datepicker__week":!0,"react-datepicker__week--selected":re(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return _.createElement("div",{className:Me(t)},this.renderDays())},a})(v.Component),Wn,kx=6,kn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},ja=(Wn={},Wn[kn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},Wn[kn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},Wn[kn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},Wn),Dr=1;function ns(n,a){return n?kn.FOUR_COLUMNS:a?kn.TWO_COLUMNS:kn.THREE_COLUMNS}var Dx=(function(n){we(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.MONTH_REFS=dt([],Array(12),!0).map(function(){return v.createRef()}),t.QUARTER_REFS=dt([],Array(4),!0).map(function(){return v.createRef()}),t.isDisabled=function(e){return Ke(e,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(e){return fo(e,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.handleDayClick=function(e,r){var o,i;(i=(o=t.props).onDayClick)===null||i===void 0||i.call(o,e,r,t.props.orderInDisplay)},t.handleDayMouseEnter=function(e){var r,o;(o=(r=t.props).onDayMouseEnter)===null||o===void 0||o.call(r,e)},t.handleMouseLeave=function(){var e,r;(r=(e=t.props).onMouseLeave)===null||r===void 0||r.call(e)},t.isRangeStartMonth=function(e){var r=t.props,o=r.day,i=r.startDate,c=r.endDate;return!i||!c?!1:je(He(o,e),i)},t.isRangeStartQuarter=function(e){var r=t.props,o=r.day,i=r.startDate,c=r.endDate;return!i||!c?!1:Kr(bn(o,e),i)},t.isRangeEndMonth=function(e){var r=t.props,o=r.day,i=r.startDate,c=r.endDate;return!i||!c?!1:je(He(o,e),c)},t.isRangeEndQuarter=function(e){var r=t.props,o=r.day,i=r.startDate,c=r.endDate;return!i||!c?!1:Kr(bn(o,e),c)},t.isInSelectingRangeMonth=function(e){var r,o=t.props,i=o.day,c=o.selectsStart,l=o.selectsEnd,p=o.selectsRange,d=o.startDate,m=o.endDate,x=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return!(c||l||p)||!x?!1:c&&m?br(x,m,e,i):l&&d||p&&d&&!m?br(d,x,e,i):!1},t.isSelectingMonthRangeStart=function(e){var r;if(!t.isInSelectingRangeMonth(e))return!1;var o=t.props,i=o.day,c=o.startDate,l=o.selectsStart,p=He(i,e),d=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return l?je(p,d):je(p,c)},t.isSelectingMonthRangeEnd=function(e){var r;if(!t.isInSelectingRangeMonth(e))return!1;var o=t.props,i=o.day,c=o.endDate,l=o.selectsEnd,p=o.selectsRange,d=He(i,e),m=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return l||p?je(d,m):je(d,c)},t.isInSelectingRangeQuarter=function(e){var r,o=t.props,i=o.day,c=o.selectsStart,l=o.selectsEnd,p=o.selectsRange,d=o.startDate,m=o.endDate,x=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return!(c||l||p)||!x?!1:c&&m?kr(x,m,e,i):l&&d||p&&d&&!m?kr(d,x,e,i):!1},t.isWeekInMonth=function(e){var r=t.props.day,o=Ge(e,6);return je(e,r)||je(o,r)},t.isCurrentMonth=function(e,r){return ee(e)===ee(le())&&r===Ie(le())},t.isCurrentQuarter=function(e,r){return ee(e)===ee(le())&&r===Jt(le())},t.isSelectedMonth=function(e,r,o){return Ie(o)===r&&ee(e)===ee(o)},t.isSelectMonthInList=function(e,r,o){return o.some(function(i){return t.isSelectedMonth(e,r,i)})},t.isSelectedQuarter=function(e,r,o){return Jt(e)===r&&ee(e)===ee(o)},t.renderWeeks=function(){for(var e=[],r=t.props.fixedHeight,o=0,i=!1,c=Rt(kt(t.props.day),t.props.locale,t.props.calendarStartDay),l=function(b){return t.props.showWeekPicker?Rt(b,t.props.locale,t.props.calendarStartDay):t.props.preSelection},p=function(b){return t.props.showWeekPicker?Rt(b,t.props.locale,t.props.calendarStartDay):t.props.selected},d=t.props.selected?p(t.props.selected):void 0,m=t.props.preSelection?l(t.props.preSelection):void 0;e.push(_.createElement(wx,ae({},t.props,{ariaLabelPrefix:t.props.weekAriaLabelPrefix,key:o,day:c,month:Ie(t.props.day),onDayClick:t.handleDayClick,onDayMouseEnter:t.handleDayMouseEnter,selected:d,preSelection:m,showWeekNumber:t.props.showWeekNumbers}))),!i;){o++,c=Lr(c,1);var x=r&&o>=kx,y=!r&&!t.isWeekInMonth(c);if(x||y)if(t.props.peekNextMonth)i=!0;else break}return e},t.onMonthClick=function(e,r){var o=t.isMonthDisabledForLabelDate(r),i=o.isDisabled,c=o.labelDate;i||t.handleDayClick(kt(c),e)},t.onMonthMouseEnter=function(e){var r=t.isMonthDisabledForLabelDate(e),o=r.isDisabled,i=r.labelDate;o||t.handleDayMouseEnter(kt(i))},t.handleMonthNavigation=function(e,r){var o,i,c,l;(i=(o=t.props).setPreSelection)===null||i===void 0||i.call(o,r),(l=(c=t.MONTH_REFS[e])===null||c===void 0?void 0:c.current)===null||l===void 0||l.focus()},t.handleKeyboardNavigation=function(e,r,o){var i,c=t.props,l=c.selected,p=c.preSelection,d=c.setPreSelection,m=c.minDate,x=c.maxDate,y=c.showFourColumnMonthYearPicker,b=c.showTwoColumnMonthYearPicker;if(p){var w=ns(y,b),k=t.getVerticalOffset(w),f=(i=ja[w])===null||i===void 0?void 0:i.grid,S=function(C,D,I){var L,z,A=D,K=I;switch(C){case F.ArrowRight:A=Je(D,Dr),K=I===11?0:I+Dr;break;case F.ArrowLeft:A=Zt(D,Dr),K=I===0?11:I-Dr;break;case F.ArrowUp:A=Zt(D,k),K=!((L=f==null?void 0:f[0])===null||L===void 0)&&L.includes(I)?I+12-k:I-k;break;case F.ArrowDown:A=Je(D,k),K=!((z=f==null?void 0:f[f.length-1])===null||z===void 0)&&z.includes(I)?I-12+k:I+k;break}return{newCalculatedDate:A,newCalculatedMonth:K}},E=function(C,D,I){for(var L=40,z=C,A=!1,K=0,U=S(z,D,I),q=U.newCalculatedDate,j=U.newCalculatedMonth;!A;){if(K>=L){q=D,j=I;break}if(m&&q<m){z=F.ArrowRight;var H=S(z,q,j);q=H.newCalculatedDate,j=H.newCalculatedMonth}if(x&&q>x){z=F.ArrowLeft;var H=S(z,q,j);q=H.newCalculatedDate,j=H.newCalculatedMonth}if(cx(q,t.props)){var H=S(z,q,j);q=H.newCalculatedDate,j=H.newCalculatedMonth}else A=!0;K++}return{newCalculatedDate:q,newCalculatedMonth:j}};if(r===F.Enter){t.isMonthDisabled(o)||(t.onMonthClick(e,o),d==null||d(l));return}var T=E(r,p,o),$=T.newCalculatedDate,O=T.newCalculatedMonth;switch(r){case F.ArrowRight:case F.ArrowLeft:case F.ArrowUp:case F.ArrowDown:t.handleMonthNavigation(O,$);break}}},t.getVerticalOffset=function(e){var r,o;return(o=(r=ja[e])===null||r===void 0?void 0:r.verticalNavigationOffset)!==null&&o!==void 0?o:0},t.onMonthKeyDown=function(e,r){var o=t.props,i=o.disabledKeyboardNavigation,c=o.handleOnMonthKeyDown,l=e.key;l!==F.Tab&&e.preventDefault(),i||t.handleKeyboardNavigation(e,l,r),c&&c(e)},t.onQuarterClick=function(e,r){var o=bn(t.props.day,r);vr(o,t.props)||t.handleDayClick(Wi(o),e)},t.onQuarterMouseEnter=function(e){var r=bn(t.props.day,e);vr(r,t.props)||t.handleDayMouseEnter(Wi(r))},t.handleQuarterNavigation=function(e,r){var o,i,c,l;t.isDisabled(r)||t.isExcluded(r)||((i=(o=t.props).setPreSelection)===null||i===void 0||i.call(o,r),(l=(c=t.QUARTER_REFS[e-1])===null||c===void 0?void 0:c.current)===null||l===void 0||l.focus())},t.onQuarterKeyDown=function(e,r){var o,i,c=e.key;if(!t.props.disabledKeyboardNavigation)switch(c){case F.Enter:t.onQuarterClick(e,r),(i=(o=t.props).setPreSelection)===null||i===void 0||i.call(o,t.props.selected);break;case F.ArrowRight:if(!t.props.preSelection)break;t.handleQuarterNavigation(r===4?1:r+1,io(t.props.preSelection,1));break;case F.ArrowLeft:if(!t.props.preSelection)break;t.handleQuarterNavigation(r===1?4:r-1,el(t.props.preSelection));break}},t.isMonthDisabledForLabelDate=function(e){var r,o=t.props,i=o.day,c=o.minDate,l=o.maxDate,p=o.excludeDates,d=o.includeDates,m=He(i,e);return{isDisabled:(r=(c||l||p||d)&&al(m,t.props))!==null&&r!==void 0?r:!1,labelDate:m}},t.isMonthDisabled=function(e){var r=t.isMonthDisabledForLabelDate(e).isDisabled;return r},t.getMonthClassNames=function(e){var r=t.props,o=r.day,i=r.startDate,c=r.endDate,l=r.preSelection,p=r.monthClassName,d=p?p(He(o,e)):void 0,m=t.getSelection();return Me("react-datepicker__month-text","react-datepicker__month-".concat(e),d,{"react-datepicker__month-text--disabled":t.isMonthDisabled(e),"react-datepicker__month-text--selected":m?t.isSelectMonthInList(o,e,m):void 0,"react-datepicker__month-text--keyboard-selected":!t.props.disabledKeyboardNavigation&&l&&t.isSelectedMonth(o,e,l)&&!t.isMonthDisabled(e),"react-datepicker__month-text--in-selecting-range":t.isInSelectingRangeMonth(e),"react-datepicker__month-text--in-range":i&&c?br(i,c,e,o):void 0,"react-datepicker__month-text--range-start":t.isRangeStartMonth(e),"react-datepicker__month-text--range-end":t.isRangeEndMonth(e),"react-datepicker__month-text--selecting-range-start":t.isSelectingMonthRangeStart(e),"react-datepicker__month-text--selecting-range-end":t.isSelectingMonthRangeEnd(e),"react-datepicker__month-text--today":t.isCurrentMonth(o,e)})},t.getTabIndex=function(e){if(t.props.preSelection==null)return"-1";var r=Ie(t.props.preSelection),o=t.isMonthDisabledForLabelDate(r).isDisabled,i=e===r&&!(o||t.props.disabledKeyboardNavigation)?"0":"-1";return i},t.getQuarterTabIndex=function(e){if(t.props.preSelection==null)return"-1";var r=Jt(t.props.preSelection),o=vr(t.props.day,t.props),i=e===r&&!(o||t.props.disabledKeyboardNavigation)?"0":"-1";return i},t.getAriaLabel=function(e){var r=t.props,o=r.chooseDayAriaLabelPrefix,i=o===void 0?"Choose":o,c=r.disabledDayAriaLabelPrefix,l=c===void 0?"Not available":c,p=r.day,d=r.locale,m=He(p,e),x=t.isDisabled(m)||t.isExcluded(m)?l:i;return"".concat(x," ").concat(fe(m,"MMMM yyyy",d))},t.getQuarterClassNames=function(e){var r=t.props,o=r.day,i=r.startDate,c=r.endDate,l=r.selected,p=r.minDate,d=r.maxDate,m=r.excludeDates,x=r.includeDates,y=r.filterDate,b=r.preSelection,w=r.disabledKeyboardNavigation,k=(p||d||m||x||y)&&vr(bn(o,e),t.props);return Me("react-datepicker__quarter-text","react-datepicker__quarter-".concat(e),{"react-datepicker__quarter-text--disabled":k,"react-datepicker__quarter-text--selected":l?t.isSelectedQuarter(o,e,l):void 0,"react-datepicker__quarter-text--keyboard-selected":!w&&b&&t.isSelectedQuarter(o,e,b)&&!k,"react-datepicker__quarter-text--in-selecting-range":t.isInSelectingRangeQuarter(e),"react-datepicker__quarter-text--in-range":i&&c?kr(i,c,e,o):void 0,"react-datepicker__quarter-text--range-start":t.isRangeStartQuarter(e),"react-datepicker__quarter-text--range-end":t.isRangeEndQuarter(e)})},t.getMonthContent=function(e){var r=t.props,o=r.showFullMonthYearPicker,i=r.renderMonthContent,c=r.locale,l=r.day,p=rl(e,c),d=po(e,c);return i?i(e,p,d,l):o?d:p},t.getQuarterContent=function(e){var r,o=t.props,i=o.renderQuarterContent,c=o.locale,l=sx(e,c);return(r=i==null?void 0:i(e,l))!==null&&r!==void 0?r:l},t.renderMonths=function(){var e,r=t.props,o=r.showTwoColumnMonthYearPicker,i=r.showFourColumnMonthYearPicker,c=r.day,l=r.selected,p=(e=ja[ns(i,o)])===null||e===void 0?void 0:e.grid;return p==null?void 0:p.map(function(d,m){return _.createElement("div",{className:"react-datepicker__month-wrapper",key:m},d.map(function(x,y){return _.createElement("div",{ref:t.MONTH_REFS[x],key:y,onClick:function(b){t.onMonthClick(b,x)},onKeyDown:function(b){sl(b)&&(b.preventDefault(),b.key=F.Enter),t.onMonthKeyDown(b,x)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onMonthMouseEnter(x)},onPointerEnter:t.props.usePointerEvent?function(){return t.onMonthMouseEnter(x)}:void 0,tabIndex:Number(t.getTabIndex(x)),className:t.getMonthClassNames(x),"aria-disabled":t.isMonthDisabled(x),role:"option","aria-label":t.getAriaLabel(x),"aria-current":t.isCurrentMonth(c,x)?"date":void 0,"aria-selected":l?t.isSelectedMonth(c,x,l):void 0},t.getMonthContent(x))}))})},t.renderQuarters=function(){var e=t.props,r=e.day,o=e.selected,i=[1,2,3,4];return _.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(c,l){return _.createElement("div",{key:l,ref:t.QUARTER_REFS[l],role:"option",onClick:function(p){t.onQuarterClick(p,c)},onKeyDown:function(p){t.onQuarterKeyDown(p,c)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onQuarterMouseEnter(c)},onPointerEnter:t.props.usePointerEvent?function(){return t.onQuarterMouseEnter(c)}:void 0,className:t.getQuarterClassNames(c),"aria-selected":o?t.isSelectedQuarter(r,c,o):void 0,tabIndex:Number(t.getQuarterTabIndex(c)),"aria-current":t.isCurrentQuarter(r,c)?"date":void 0},t.getQuarterContent(c))}))},t.getClassNames=function(){var e=t.props,r=e.selectingDate,o=e.selectsStart,i=e.selectsEnd,c=e.showMonthYearPicker,l=e.showQuarterYearPicker,p=e.showWeekPicker;return Me("react-datepicker__month",{"react-datepicker__month--selecting-range":r&&(o||i)},{"react-datepicker__monthPicker":c},{"react-datepicker__quarterPicker":l},{"react-datepicker__weekPicker":p})},t}return a.prototype.getSelection=function(){var t=this.props,e=t.selected,r=t.selectedDates,o=t.selectsMultiple;if(o)return r;if(e)return[e]},a.prototype.render=function(){var t=this.props,e=t.showMonthYearPicker,r=t.showQuarterYearPicker,o=t.day,i=t.ariaLabelPrefix,c=i===void 0?"Month ":i,l=c?c.trim()+" ":"";return _.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(l).concat(fe(o,"MMMM, yyyy",this.props.locale)),role:"listbox"},e?this.renderMonths():r?this.renderQuarters():this.renderWeeks())},a})(v.Component),Cx=(function(n){we(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.isSelectedMonth=function(e){return t.props.month===e},t.renderOptions=function(){return t.props.monthNames.map(function(e,r){return _.createElement("div",{className:t.isSelectedMonth(r)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:e,onClick:t.onChange.bind(t,r),"aria-selected":t.isSelectedMonth(r)?"true":void 0},t.isSelectedMonth(r)?_.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",e)})},t.onChange=function(e){return t.props.onChange(e)},t.handleClickOutside=function(){return t.props.onCancel()},t}return a.prototype.render=function(){return _.createElement(oa,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},a})(v.Component),Sx=(function(n){we(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(e){return e.map(function(r,o){return _.createElement("option",{key:r,value:o},r)})},t.renderSelectMode=function(e){return _.createElement("select",{value:t.props.month,className:"react-datepicker__month-select",onChange:function(r){return t.onChange(parseInt(r.target.value))}},t.renderSelectOptions(e))},t.renderReadView=function(e,r){return _.createElement("div",{key:"read",style:{visibility:e?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:t.toggleDropdown},_.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),_.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},r[t.props.month]))},t.renderDropdown=function(e){return _.createElement(Cx,ae({key:"dropdown"},t.props,{monthNames:e,onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(e){var r=t.state.dropdownVisible,o=[t.renderReadView(!r,e)];return r&&o.unshift(t.renderDropdown(e)),o},t.onChange=function(e){t.toggleDropdown(),e!==t.props.month&&t.props.onChange(e)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return a.prototype.render=function(){var t=this,e=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(o){return rl(o,t.props.locale)}:function(o){return po(o,t.props.locale)}),r;switch(this.props.dropdownMode){case"scroll":r=this.renderScrollMode(e);break;case"select":r=this.renderSelectMode(e);break}return _.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},r)},a})(v.Component);function Mx(n,a){for(var t=[],e=kt(n),r=kt(a);!Ft(e,r);)t.push(le(e)),e=Je(e,1);return t}var _x=(function(n){we(a,n);function a(t){var e=n.call(this,t)||this;return e.renderOptions=function(){return e.state.monthYearsList.map(function(r){var o=Ua(r),i=it(e.props.date,r)&&je(e.props.date,r);return _.createElement("div",{className:i?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:o,onClick:e.onChange.bind(e,o),"aria-selected":i?"true":void 0},i?_.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",fe(r,e.props.dateFormat,e.props.locale))})},e.onChange=function(r){return e.props.onChange(r)},e.handleClickOutside=function(){e.props.onCancel()},e.state={monthYearsList:Mx(e.props.minDate,e.props.maxDate)},e}return a.prototype.render=function(){var t=Me({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return _.createElement(oa,{className:t,onClickOutside:this.handleClickOutside},this.renderOptions())},a})(v.Component),jx=(function(n){we(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var e=kt(t.props.minDate),r=kt(t.props.maxDate),o=[];!Ft(e,r);){var i=Ua(e);o.push(_.createElement("option",{key:i,value:i},fe(e,t.props.dateFormat,t.props.locale))),e=Je(e,1)}return o},t.onSelectChange=function(e){t.onChange(parseInt(e.target.value))},t.renderSelectMode=function(){return _.createElement("select",{value:Ua(kt(t.props.date)),className:"react-datepicker__month-year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(e){var r=fe(t.props.date,t.props.dateFormat,t.props.locale);return _.createElement("div",{key:"read",style:{visibility:e?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:t.toggleDropdown},_.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),_.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},r))},t.renderDropdown=function(){return _.createElement(_x,ae({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var e=t.state.dropdownVisible,r=[t.renderReadView(!e)];return e&&r.unshift(t.renderDropdown()),r},t.onChange=function(e){t.toggleDropdown();var r=le(e);it(t.props.date,r)&&je(t.props.date,r)||t.props.onChange(r)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return a.prototype.render=function(){var t;switch(this.props.dropdownMode){case"scroll":t=this.renderScrollMode();break;case"select":t=this.renderSelectMode();break}return _.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},t)},a})(v.Component),Ix=(function(n){we(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={height:null},t.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var e,r,o;t.list&&(t.list.scrollTop=(o=t.centerLi&&a.calcCenterPosition(t.props.monthRef?t.props.monthRef.clientHeight-((r=(e=t.header)===null||e===void 0?void 0:e.clientHeight)!==null&&r!==void 0?r:0):t.list.clientHeight,t.centerLi))!==null&&o!==void 0?o:0)})},t.handleClick=function(e){var r,o;(t.props.minTime||t.props.maxTime)&&Ki(e,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&qi(e,t.props)||(o=(r=t.props).onChange)===null||o===void 0||o.call(r,e)},t.isSelectedTime=function(e){return t.props.selected&&xx(t.props.selected,e)},t.isDisabledTime=function(e){return(t.props.minTime||t.props.maxTime)&&Ki(e,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&qi(e,t.props)},t.liClasses=function(e){var r,o=["react-datepicker__time-list-item",t.props.timeClassName?t.props.timeClassName(e):void 0];return t.isSelectedTime(e)&&o.push("react-datepicker__time-list-item--selected"),t.isDisabledTime(e)&&o.push("react-datepicker__time-list-item--disabled"),t.props.injectTimes&&(ut(e)*3600+pt(e)*60+wt(e))%(((r=t.props.intervals)!==null&&r!==void 0?r:a.defaultProps.intervals)*60)!==0&&o.push("react-datepicker__time-list-item--injected"),o.join(" ")},t.handleOnKeyDown=function(e,r){var o,i;e.key===F.Space&&(e.preventDefault(),e.key=F.Enter),(e.key===F.ArrowUp||e.key===F.ArrowLeft)&&e.target instanceof HTMLElement&&e.target.previousSibling&&(e.preventDefault(),e.target.previousSibling instanceof HTMLElement&&e.target.previousSibling.focus()),(e.key===F.ArrowDown||e.key===F.ArrowRight)&&e.target instanceof HTMLElement&&e.target.nextSibling&&(e.preventDefault(),e.target.nextSibling instanceof HTMLElement&&e.target.nextSibling.focus()),e.key===F.Enter&&t.handleClick(r),(i=(o=t.props).handleOnKeyDown)===null||i===void 0||i.call(o,e)},t.renderTimes=function(){for(var e,r=[],o=typeof t.props.format=="string"?t.props.format:"p",i=(e=t.props.intervals)!==null&&e!==void 0?e:a.defaultProps.intervals,c=t.props.selected||t.props.openToDate||le(),l=Er(c),p=t.props.injectTimes&&t.props.injectTimes.sort(function(k,f){return k.getTime()-f.getTime()}),d=60*gx(c),m=d/i,x=0;x<m;x++){var y=Ka(l,x*i);if(r.push(y),p){var b=mx(l,y,x,i,p);r=r.concat(b)}}var w=r.reduce(function(k,f){return f.getTime()<=c.getTime()?f:k},r[0]);return r.map(function(k){return _.createElement("li",{key:k.valueOf(),onClick:t.handleClick.bind(t,k),className:t.liClasses(k),ref:function(f){k===w&&(t.centerLi=f)},onKeyDown:function(f){t.handleOnKeyDown(f,k)},tabIndex:k===w?0:-1,role:"option","aria-selected":t.isSelectedTime(k)?"true":void 0,"aria-disabled":t.isDisabledTime(k)?"true":void 0},fe(k,o,t.props.locale))})},t.renderTimeCaption=function(){return t.props.showTimeCaption===!1?_.createElement(_.Fragment,null):_.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(t.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(e){t.header=e}},_.createElement("div",{className:"react-datepicker-time__header"},t.props.timeCaption))},t}return Object.defineProperty(a,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),a.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},a.prototype.render=function(){var t=this,e,r=this.state.height;return _.createElement("div",{className:"react-datepicker__time-container ".concat(((e=this.props.todayButton)!==null&&e!==void 0?e:a.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),_.createElement("div",{className:"react-datepicker__time"},_.createElement("div",{className:"react-datepicker__time-box"},_.createElement("ul",{className:"react-datepicker__time-list",ref:function(o){t.list=o},style:r?{height:r}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},a.calcCenterPosition=function(t,e){return e.offsetTop-(t/2-e.clientHeight/2)},a})(v.Component),rs=3,Px=(function(n){we(a,n);function a(t){var e=n.call(this,t)||this;return e.YEAR_REFS=dt([],Array(e.props.yearItemNumber),!0).map(function(){return v.createRef()}),e.isDisabled=function(r){return Ke(r,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.isExcluded=function(r){return fo(r,{excludeDates:e.props.excludeDates})},e.selectingDate=function(){var r;return(r=e.props.selectingDate)!==null&&r!==void 0?r:e.props.preSelection},e.updateFocusOnPaginate=function(r){var o=function(){var i,c;(c=(i=e.YEAR_REFS[r])===null||i===void 0?void 0:i.current)===null||c===void 0||c.focus()};window.requestAnimationFrame(o)},e.handleYearClick=function(r,o){e.props.onDayClick&&e.props.onDayClick(r,o)},e.handleYearNavigation=function(r,o){var i,c,l,p,d=e.props,m=d.date,x=d.yearItemNumber;if(!(m===void 0||x===void 0)){var y=Nt(m,x).startPeriod;e.isDisabled(o)||e.isExcluded(o)||((c=(i=e.props).setPreSelection)===null||c===void 0||c.call(i,o),r-y<0?e.updateFocusOnPaginate(x-(y-r)):r-y>=x?e.updateFocusOnPaginate(Math.abs(x-(r-y))):(p=(l=e.YEAR_REFS[r-y])===null||l===void 0?void 0:l.current)===null||p===void 0||p.focus())}},e.isSameDay=function(r,o){return re(r,o)},e.isCurrentYear=function(r){return r===ee(le())},e.isRangeStart=function(r){return e.props.startDate&&e.props.endDate&&it(ot(le(),r),e.props.startDate)},e.isRangeEnd=function(r){return e.props.startDate&&e.props.endDate&&it(ot(le(),r),e.props.endDate)},e.isInRange=function(r){return wr(r,e.props.startDate,e.props.endDate)},e.isInSelectingRange=function(r){var o=e.props,i=o.selectsStart,c=o.selectsEnd,l=o.selectsRange,p=o.startDate,d=o.endDate;return!(i||c||l)||!e.selectingDate()?!1:i&&d?wr(r,e.selectingDate(),d):c&&p||l&&p&&!d?wr(r,p,e.selectingDate()):!1},e.isSelectingRangeStart=function(r){var o;if(!e.isInSelectingRange(r))return!1;var i=e.props,c=i.startDate,l=i.selectsStart,p=ot(le(),r);return l?it(p,(o=e.selectingDate())!==null&&o!==void 0?o:null):it(p,c??null)},e.isSelectingRangeEnd=function(r){var o;if(!e.isInSelectingRange(r))return!1;var i=e.props,c=i.endDate,l=i.selectsEnd,p=i.selectsRange,d=ot(le(),r);return l||p?it(d,(o=e.selectingDate())!==null&&o!==void 0?o:null):it(d,c??null)},e.isKeyboardSelected=function(r){if(!(e.props.date===void 0||e.props.selected==null||e.props.preSelection==null)){var o=e.props,i=o.minDate,c=o.maxDate,l=o.excludeDates,p=o.includeDates,d=o.filterDate,m=zn(ot(e.props.date,r)),x=(i||c||l||p||d)&&Tr(r,e.props);return!e.props.disabledKeyboardNavigation&&!e.props.inline&&!re(m,zn(e.props.selected))&&re(m,zn(e.props.preSelection))&&!x}},e.onYearClick=function(r,o){var i=e.props.date;i!==void 0&&e.handleYearClick(zn(ot(i,o)),r)},e.onYearKeyDown=function(r,o){var i,c,l=r.key,p=e.props,d=p.date,m=p.yearItemNumber,x=p.handleOnKeyDown;if(l!==F.Tab&&r.preventDefault(),!e.props.disabledKeyboardNavigation)switch(l){case F.Enter:if(e.props.selected==null)break;e.onYearClick(r,o),(c=(i=e.props).setPreSelection)===null||c===void 0||c.call(i,e.props.selected);break;case F.ArrowRight:if(e.props.preSelection==null)break;e.handleYearNavigation(o+1,bt(e.props.preSelection,1));break;case F.ArrowLeft:if(e.props.preSelection==null)break;e.handleYearNavigation(o-1,jn(e.props.preSelection,1));break;case F.ArrowUp:{if(d===void 0||m===void 0||e.props.preSelection==null)break;var y=Nt(d,m).startPeriod,b=rs,w=o-b;if(w<y){var k=m%b;o>=y&&o<y+k?b=k:b+=k,w=o-b}e.handleYearNavigation(w,jn(e.props.preSelection,b));break}case F.ArrowDown:{if(d===void 0||m===void 0||e.props.preSelection==null)break;var f=Nt(d,m).endPeriod,b=rs,w=o+b;if(w>f){var k=m%b;o<=f&&o>f-k?b=k:b+=k,w=o+b}e.handleYearNavigation(w,bt(e.props.preSelection,b));break}}x&&x(r)},e.getYearClassNames=function(r){var o=e.props,i=o.date,c=o.minDate,l=o.maxDate,p=o.selected,d=o.excludeDates,m=o.includeDates,x=o.filterDate,y=o.yearClassName;return Me("react-datepicker__year-text","react-datepicker__year-".concat(r),i?y==null?void 0:y(ot(i,r)):void 0,{"react-datepicker__year-text--selected":p?r===ee(p):void 0,"react-datepicker__year-text--disabled":(c||l||d||m||x)&&Tr(r,e.props),"react-datepicker__year-text--keyboard-selected":e.isKeyboardSelected(r),"react-datepicker__year-text--range-start":e.isRangeStart(r),"react-datepicker__year-text--range-end":e.isRangeEnd(r),"react-datepicker__year-text--in-range":e.isInRange(r),"react-datepicker__year-text--in-selecting-range":e.isInSelectingRange(r),"react-datepicker__year-text--selecting-range-start":e.isSelectingRangeStart(r),"react-datepicker__year-text--selecting-range-end":e.isSelectingRangeEnd(r),"react-datepicker__year-text--today":e.isCurrentYear(r)})},e.getYearTabIndex=function(r){if(e.props.disabledKeyboardNavigation||e.props.preSelection==null)return"-1";var o=ee(e.props.preSelection),i=Tr(r,e.props);return r===o&&!i?"0":"-1"},e.getYearContent=function(r){return e.props.renderYearContent?e.props.renderYearContent(r):r},e}return a.prototype.render=function(){var t=this,e=[],r=this.props,o=r.date,i=r.yearItemNumber,c=r.onYearMouseEnter,l=r.onYearMouseLeave;if(o===void 0)return null;for(var p=Nt(o,i),d=p.startPeriod,m=p.endPeriod,x=function(w){e.push(_.createElement("div",{ref:y.YEAR_REFS[w-d],onClick:function(k){t.onYearClick(k,w)},onKeyDown:function(k){sl(k)&&(k.preventDefault(),k.key=F.Enter),t.onYearKeyDown(k,w)},tabIndex:Number(y.getYearTabIndex(w)),className:y.getYearClassNames(w),onMouseEnter:y.props.usePointerEvent?void 0:function(k){return c(k,w)},onPointerEnter:y.props.usePointerEvent?function(k){return c(k,w)}:void 0,onMouseLeave:y.props.usePointerEvent?void 0:function(k){return l(k,w)},onPointerLeave:y.props.usePointerEvent?function(k){return l(k,w)}:void 0,key:w,"aria-current":y.isCurrentYear(w)?"date":void 0},y.getYearContent(w)))},y=this,b=d;b<=m;b++)x(b);return _.createElement("div",{className:"react-datepicker__year"},_.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},e))},a})(v.Component);function Ex(n,a,t,e){for(var r=[],o=0;o<2*a+1;o++){var i=n+a-o,c=!0;t&&(c=ee(t)<=i),e&&c&&(c=ee(e)>=i),c&&r.push(i)}return r}var Tx=(function(n){we(a,n);function a(t){var e=n.call(this,t)||this;e.renderOptions=function(){var c=e.props.year,l=e.state.yearsList.map(function(m){return _.createElement("div",{className:c===m?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:m,onClick:e.onChange.bind(e,m),"aria-selected":c===m?"true":void 0},c===m?_.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",m)}),p=e.props.minDate?ee(e.props.minDate):null,d=e.props.maxDate?ee(e.props.maxDate):null;return(!d||!e.state.yearsList.find(function(m){return m===d}))&&l.unshift(_.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:e.incrementYears},_.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!p||!e.state.yearsList.find(function(m){return m===p}))&&l.push(_.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:e.decrementYears},_.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),l},e.onChange=function(c){e.props.onChange(c)},e.handleClickOutside=function(){e.props.onCancel()},e.shiftYears=function(c){var l=e.state.yearsList.map(function(p){return p+c});e.setState({yearsList:l})},e.incrementYears=function(){return e.shiftYears(1)},e.decrementYears=function(){return e.shiftYears(-1)};var r=t.yearDropdownItemNumber,o=t.scrollableYearDropdown,i=r||(o?10:5);return e.state={yearsList:Ex(e.props.year,i,e.props.minDate,e.props.maxDate)},e.dropdownRef=v.createRef(),e}return a.prototype.componentDidMount=function(){var t=this.dropdownRef.current;if(t){var e=t.children?Array.from(t.children):null,r=e?e.find(function(o){return o.ariaSelected}):null;t.scrollTop=r&&r instanceof HTMLElement?r.offsetTop+(r.clientHeight-t.clientHeight)/2:(t.scrollHeight-t.clientHeight)/2}},a.prototype.render=function(){var t=Me({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return _.createElement(oa,{className:t,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},a})(v.Component),$x=(function(n){we(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var e=t.props.minDate?ee(t.props.minDate):1900,r=t.props.maxDate?ee(t.props.maxDate):2100,o=[],i=e;i<=r;i++)o.push(_.createElement("option",{key:i,value:i},i));return o},t.onSelectChange=function(e){t.onChange(parseInt(e.target.value))},t.renderSelectMode=function(){return _.createElement("select",{value:t.props.year,className:"react-datepicker__year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(e){return _.createElement("div",{key:"read",style:{visibility:e?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(r){return t.toggleDropdown(r)}},_.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),_.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},t.props.year))},t.renderDropdown=function(){return _.createElement(Tx,ae({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var e=t.state.dropdownVisible,r=[t.renderReadView(!e)];return e&&r.unshift(t.renderDropdown()),r},t.onChange=function(e){t.toggleDropdown(),e!==t.props.year&&t.props.onChange(e)},t.toggleDropdown=function(e){t.setState({dropdownVisible:!t.state.dropdownVisible},function(){t.props.adjustDateOnChange&&t.handleYearChange(t.props.date,e)})},t.handleYearChange=function(e,r){var o;(o=t.onSelect)===null||o===void 0||o.call(t,e,r),t.setOpen()},t.onSelect=function(e,r){var o,i;(i=(o=t.props).onSelect)===null||i===void 0||i.call(o,e,r)},t.setOpen=function(){var e,r;(r=(e=t.props).setOpen)===null||r===void 0||r.call(e,!0)},t}return a.prototype.render=function(){var t;switch(this.props.dropdownMode){case"scroll":t=this.renderScrollMode();break;case"select":t=this.renderSelectMode();break}return _.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},t)},a})(v.Component),Nx=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],Ox=function(n){var a=(n.className||"").split(/\s+/);return Nx.some(function(t){return a.indexOf(t)>=0})},Rx=(function(n){we(a,n);function a(t){var e=n.call(this,t)||this;return e.monthContainer=void 0,e.handleClickOutside=function(r){e.props.onClickOutside(r)},e.setClickOutsideRef=function(){return e.containerRef.current},e.handleDropdownFocus=function(r){var o,i;Ox(r.target)&&((i=(o=e.props).onDropdownFocus)===null||i===void 0||i.call(o,r))},e.getDateInView=function(){var r=e.props,o=r.preSelection,i=r.selected,c=r.openToDate,l=ol(e.props),p=il(e.props),d=le(),m=c||i||o;return m||(l&&sn(d,l)?l:p&&Ft(d,p)?p:d)},e.increaseMonth=function(){e.setState(function(r){var o=r.date;return{date:Je(o,1)}},function(){return e.handleMonthChange(e.state.date)})},e.decreaseMonth=function(){e.setState(function(r){var o=r.date;return{date:Zt(o,1)}},function(){return e.handleMonthChange(e.state.date)})},e.handleDayClick=function(r,o,i){e.props.onSelect(r,o,i),e.props.setPreSelection&&e.props.setPreSelection(r)},e.handleDayMouseEnter=function(r){e.setState({selectingDate:r}),e.props.onDayMouseEnter&&e.props.onDayMouseEnter(r)},e.handleMonthMouseLeave=function(){e.setState({selectingDate:void 0}),e.props.onMonthMouseLeave&&e.props.onMonthMouseLeave()},e.handleYearMouseEnter=function(r,o){e.setState({selectingDate:ot(le(),o)}),e.props.onYearMouseEnter&&e.props.onYearMouseEnter(r,o)},e.handleYearMouseLeave=function(r,o){e.props.onYearMouseLeave&&e.props.onYearMouseLeave(r,o)},e.handleYearChange=function(r){var o,i,c,l;(i=(o=e.props).onYearChange)===null||i===void 0||i.call(o,r),e.setState({isRenderAriaLiveMessage:!0}),e.props.adjustDateOnChange&&(e.props.onSelect(r),(l=(c=e.props).setOpen)===null||l===void 0||l.call(c,!0)),e.props.setPreSelection&&e.props.setPreSelection(r)},e.getEnabledPreSelectionDateForMonth=function(r){if(!Ke(r,e.props))return r;for(var o=kt(r),i=rx(r),c=yh(i,o),l=null,p=0;p<=c;p++){var d=Ge(o,p);if(!Ke(d,e.props)){l=d;break}}return l},e.handleMonthChange=function(r){var o,i,c,l=(o=e.getEnabledPreSelectionDateForMonth(r))!==null&&o!==void 0?o:r;e.handleCustomMonthChange(l),e.props.adjustDateOnChange&&(e.props.onSelect(l),(c=(i=e.props).setOpen)===null||c===void 0||c.call(i,!0)),e.props.setPreSelection&&e.props.setPreSelection(l)},e.handleCustomMonthChange=function(r){var o,i;(i=(o=e.props).onMonthChange)===null||i===void 0||i.call(o,r),e.setState({isRenderAriaLiveMessage:!0})},e.handleMonthYearChange=function(r){e.handleYearChange(r),e.handleMonthChange(r)},e.changeYear=function(r){e.setState(function(o){var i=o.date;return{date:ot(i,Number(r))}},function(){return e.handleYearChange(e.state.date)})},e.changeMonth=function(r){e.setState(function(o){var i=o.date;return{date:He(i,Number(r))}},function(){return e.handleMonthChange(e.state.date)})},e.changeMonthYear=function(r){e.setState(function(o){var i=o.date;return{date:ot(He(i,Ie(r)),ee(r))}},function(){return e.handleMonthYearChange(e.state.date)})},e.header=function(r){r===void 0&&(r=e.state.date);var o=Rt(r,e.props.locale,e.props.calendarStartDay),i=[];return e.props.showWeekNumbers&&i.push(_.createElement("div",{key:"W",className:"react-datepicker__day-name"},e.props.weekLabel||"#")),i.concat([0,1,2,3,4,5,6].map(function(c){var l=Ge(o,c),p=e.formatWeekday(l,e.props.locale),d=e.props.weekDayClassName?e.props.weekDayClassName(l):void 0;return _.createElement("div",{key:c,"aria-label":fe(l,"EEEE",e.props.locale),className:Me("react-datepicker__day-name",d)},p)}))},e.formatWeekday=function(r,o){return e.props.formatWeekDay?ax(r,e.props.formatWeekDay,o):e.props.useWeekdaysShort?ix(r,o):ox(r,o)},e.decreaseYear=function(){e.setState(function(r){var o,i=r.date;return{date:jn(i,e.props.showYearPicker?(o=e.props.yearItemNumber)!==null&&o!==void 0?o:a.defaultProps.yearItemNumber:1)}},function(){return e.handleYearChange(e.state.date)})},e.clearSelectingDate=function(){e.setState({selectingDate:void 0})},e.renderPreviousButton=function(){var r,o,i;if(!e.props.renderCustomHeader){var c=(r=e.props.monthsShown)!==null&&r!==void 0?r:a.defaultProps.monthsShown,l=e.props.showPreviousMonths?c-1:0,p=(o=e.props.monthSelectedIn)!==null&&o!==void 0?o:l,d=Zt(e.state.date,p),m;switch(!0){case e.props.showMonthYearPicker:m=Ui(e.state.date,e.props);break;case e.props.showYearPicker:m=ux(e.state.date,e.props);break;case e.props.showQuarterYearPicker:m=lx(e.state.date,e.props);break;default:m=Qi(d,e.props);break}if(!(!((i=e.props.forceShowMonthNavigation)!==null&&i!==void 0?i:a.defaultProps.forceShowMonthNavigation)&&!e.props.showDisabledMonthNavigation&&m||e.props.showTimeSelectOnly)){var x=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],y=["react-datepicker__navigation","react-datepicker__navigation--previous"],b=e.decreaseMonth;(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker)&&(b=e.decreaseYear),m&&e.props.showDisabledMonthNavigation&&(y.push("react-datepicker__navigation--previous--disabled"),b=void 0);var w=e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker,k=e.props,f=k.previousMonthButtonLabel,S=f===void 0?a.defaultProps.previousMonthButtonLabel:f,E=k.previousYearButtonLabel,T=E===void 0?a.defaultProps.previousYearButtonLabel:E,$=e.props,O=$.previousMonthAriaLabel,C=O===void 0?typeof S=="string"?S:"Previous Month":O,D=$.previousYearAriaLabel,I=D===void 0?typeof T=="string"?T:"Previous Year":D;return _.createElement("button",{type:"button",className:y.join(" "),onClick:b,onKeyDown:e.props.handleOnKeyDown,"aria-label":w?I:C},_.createElement("span",{className:x.join(" ")},w?T:S))}}},e.increaseYear=function(){e.setState(function(r){var o,i=r.date;return{date:bt(i,e.props.showYearPicker?(o=e.props.yearItemNumber)!==null&&o!==void 0?o:a.defaultProps.yearItemNumber:1)}},function(){return e.handleYearChange(e.state.date)})},e.renderNextButton=function(){var r;if(!e.props.renderCustomHeader){var o;switch(!0){case e.props.showMonthYearPicker:o=Gi(e.state.date,e.props);break;case e.props.showYearPicker:o=px(e.state.date,e.props);break;case e.props.showQuarterYearPicker:o=dx(e.state.date,e.props);break;default:o=Vi(e.state.date,e.props);break}if(!(!((r=e.props.forceShowMonthNavigation)!==null&&r!==void 0?r:a.defaultProps.forceShowMonthNavigation)&&!e.props.showDisabledMonthNavigation&&o||e.props.showTimeSelectOnly)){var i=["react-datepicker__navigation","react-datepicker__navigation--next"],c=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];e.props.showTimeSelect&&i.push("react-datepicker__navigation--next--with-time"),e.props.todayButton&&i.push("react-datepicker__navigation--next--with-today-button");var l=e.increaseMonth;(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker)&&(l=e.increaseYear),o&&e.props.showDisabledMonthNavigation&&(i.push("react-datepicker__navigation--next--disabled"),l=void 0);var p=e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker,d=e.props,m=d.nextMonthButtonLabel,x=m===void 0?a.defaultProps.nextMonthButtonLabel:m,y=d.nextYearButtonLabel,b=y===void 0?a.defaultProps.nextYearButtonLabel:y,w=e.props,k=w.nextMonthAriaLabel,f=k===void 0?typeof x=="string"?x:"Next Month":k,S=w.nextYearAriaLabel,E=S===void 0?typeof b=="string"?b:"Next Year":S;return _.createElement("button",{type:"button",className:i.join(" "),onClick:l,onKeyDown:e.props.handleOnKeyDown,"aria-label":p?E:f},_.createElement("span",{className:c.join(" ")},p?b:x))}}},e.renderCurrentMonth=function(r){r===void 0&&(r=e.state.date);var o=["react-datepicker__current-month"];return e.props.showYearDropdown&&o.push("react-datepicker__current-month--hasYearDropdown"),e.props.showMonthDropdown&&o.push("react-datepicker__current-month--hasMonthDropdown"),e.props.showMonthYearDropdown&&o.push("react-datepicker__current-month--hasMonthYearDropdown"),_.createElement("h2",{className:o.join(" ")},fe(r,e.props.dateFormat,e.props.locale))},e.renderYearDropdown=function(r){if(r===void 0&&(r=!1),!(!e.props.showYearDropdown||r))return _.createElement($x,ae({},a.defaultProps,e.props,{date:e.state.date,onChange:e.changeYear,year:ee(e.state.date)}))},e.renderMonthDropdown=function(r){if(r===void 0&&(r=!1),!(!e.props.showMonthDropdown||r))return _.createElement(Sx,ae({},a.defaultProps,e.props,{month:Ie(e.state.date),onChange:e.changeMonth}))},e.renderMonthYearDropdown=function(r){if(r===void 0&&(r=!1),!(!e.props.showMonthYearDropdown||r))return _.createElement(jx,ae({},a.defaultProps,e.props,{date:e.state.date,onChange:e.changeMonthYear}))},e.handleTodayButtonClick=function(r){e.props.onSelect(Bi(),r),e.props.setPreSelection&&e.props.setPreSelection(Bi())},e.renderTodayButton=function(){if(!(!e.props.todayButton||e.props.showTimeSelectOnly))return _.createElement("div",{className:"react-datepicker__today-button",onClick:e.handleTodayButtonClick},e.props.todayButton)},e.renderDefaultHeader=function(r){var o=r.monthDate,i=r.i;return _.createElement("div",{className:"react-datepicker__header ".concat(e.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},e.renderCurrentMonth(o),_.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(e.props.dropdownMode),onFocus:e.handleDropdownFocus},e.renderMonthDropdown(i!==0),e.renderMonthYearDropdown(i!==0),e.renderYearDropdown(i!==0)),_.createElement("div",{className:"react-datepicker__day-names"},e.header(o)))},e.renderCustomHeader=function(r){var o,i,c=r.monthDate,l=r.i;if(e.props.showTimeSelect&&!e.state.monthContainer||e.props.showTimeSelectOnly)return null;var p=Qi(e.state.date,e.props),d=Vi(e.state.date,e.props),m=Ui(e.state.date,e.props),x=Gi(e.state.date,e.props),y=!e.props.showMonthYearPicker&&!e.props.showQuarterYearPicker&&!e.props.showYearPicker;return _.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:e.props.onDropdownFocus},(i=(o=e.props).renderCustomHeader)===null||i===void 0?void 0:i.call(o,ae(ae({},e.state),{customHeaderCount:l,monthDate:c,changeMonth:e.changeMonth,changeYear:e.changeYear,decreaseMonth:e.decreaseMonth,increaseMonth:e.increaseMonth,decreaseYear:e.decreaseYear,increaseYear:e.increaseYear,prevMonthButtonDisabled:p,nextMonthButtonDisabled:d,prevYearButtonDisabled:m,nextYearButtonDisabled:x})),y&&_.createElement("div",{className:"react-datepicker__day-names"},e.header(c)))},e.renderYearHeader=function(r){var o=r.monthDate,i=e.props,c=i.showYearPicker,l=i.yearItemNumber,p=l===void 0?a.defaultProps.yearItemNumber:l,d=Nt(o,p),m=d.startPeriod,x=d.endPeriod;return _.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},c?"".concat(m," - ").concat(x):ee(o))},e.renderHeader=function(r){var o=r.monthDate,i=r.i,c=i===void 0?0:i,l={monthDate:o,i:c};switch(!0){case e.props.renderCustomHeader!==void 0:return e.renderCustomHeader(l);case(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker):return e.renderYearHeader(l);default:return e.renderDefaultHeader(l)}},e.renderMonths=function(){var r,o;if(!(e.props.showTimeSelectOnly||e.props.showYearPicker)){for(var i=[],c=(r=e.props.monthsShown)!==null&&r!==void 0?r:a.defaultProps.monthsShown,l=e.props.showPreviousMonths?c-1:0,p=e.props.showMonthYearPicker||e.props.showQuarterYearPicker?bt(e.state.date,l):Zt(e.state.date,l),d=(o=e.props.monthSelectedIn)!==null&&o!==void 0?o:l,m=0;m<c;++m){var x=m-d+l,y=e.props.showMonthYearPicker||e.props.showQuarterYearPicker?bt(p,x):Je(p,x),b="month-".concat(m),w=m<c-1,k=m>0;i.push(_.createElement("div",{key:b,ref:function(f){e.monthContainer=f??void 0},className:"react-datepicker__month-container"},e.renderHeader({monthDate:y,i:m}),_.createElement(Dx,ae({},a.defaultProps,e.props,{ariaLabelPrefix:e.props.monthAriaLabelPrefix,day:y,onDayClick:e.handleDayClick,handleOnKeyDown:e.props.handleOnDayKeyDown,handleOnMonthKeyDown:e.props.handleOnKeyDown,onDayMouseEnter:e.handleDayMouseEnter,onMouseLeave:e.handleMonthMouseLeave,orderInDisplay:m,selectingDate:e.state.selectingDate,monthShowsDuplicateDaysEnd:w,monthShowsDuplicateDaysStart:k}))))}return i}},e.renderYears=function(){if(!e.props.showTimeSelectOnly&&e.props.showYearPicker)return _.createElement("div",{className:"react-datepicker__year--container"},e.renderHeader({monthDate:e.state.date}),_.createElement(Px,ae({},a.defaultProps,e.props,{selectingDate:e.state.selectingDate,date:e.state.date,onDayClick:e.handleDayClick,clearSelectingDate:e.clearSelectingDate,onYearMouseEnter:e.handleYearMouseEnter,onYearMouseLeave:e.handleYearMouseLeave})))},e.renderTimeSection=function(){if(e.props.showTimeSelect&&(e.state.monthContainer||e.props.showTimeSelectOnly))return _.createElement(Ix,ae({},a.defaultProps,e.props,{onChange:e.props.onTimeChange,format:e.props.timeFormat,intervals:e.props.timeIntervals,monthRef:e.state.monthContainer}))},e.renderInputTimeSection=function(){var r=e.props.selected?new Date(e.props.selected):void 0,o=r&&xt(r)&&!!e.props.selected,i=o?"".concat(Ji(r.getHours()),":").concat(Ji(r.getMinutes())):"";if(e.props.showTimeInput)return _.createElement(yx,ae({},a.defaultProps,e.props,{date:r,timeString:i,onChange:e.props.onTimeChange}))},e.renderAriaLiveRegion=function(){var r,o=Nt(e.state.date,(r=e.props.yearItemNumber)!==null&&r!==void 0?r:a.defaultProps.yearItemNumber),i=o.startPeriod,c=o.endPeriod,l;return e.props.showYearPicker?l="".concat(i," - ").concat(c):e.props.showMonthYearPicker||e.props.showQuarterYearPicker?l=ee(e.state.date):l="".concat(po(Ie(e.state.date),e.props.locale)," ").concat(ee(e.state.date)),_.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},e.state.isRenderAriaLiveMessage&&l)},e.renderChildren=function(){if(e.props.children)return _.createElement("div",{className:"react-datepicker__children-container"},e.props.children)},e.containerRef=v.createRef(),e.state={date:e.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},e}return Object.defineProperty(a,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:tr}},enumerable:!1,configurable:!0}),a.prototype.componentDidMount=function(){var t=this;this.props.showTimeSelect&&(this.assignMonthContainer=(function(){t.setState({monthContainer:t.monthContainer})})())},a.prototype.componentDidUpdate=function(t){var e=this;if(this.props.preSelection&&(!re(this.props.preSelection,t.preSelection)||this.props.monthSelectedIn!==t.monthSelectedIn)){var r=!je(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return r&&e.handleCustomMonthChange(e.state.date)})}else this.props.openToDate&&!re(this.props.openToDate,t.openToDate)&&this.setState({date:this.props.openToDate})},a.prototype.render=function(){var t=this.props.container||Ug;return _.createElement(oa,{onClickOutside:this.handleClickOutside,style:{display:"contents"},containerRef:this.containerRef,ignoreClass:this.props.outsideClickIgnoreClass},_.createElement(t,{className:Me("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))},a})(v.Component),Ax=function(n){var a=n.icon,t=n.className,e=t===void 0?"":t,r=n.onClick,o="react-datepicker__calendar-icon";return typeof a=="string"?_.createElement("i",{className:"".concat(o," ").concat(a," ").concat(e),"aria-hidden":"true",onClick:r}):_.isValidElement(a)?_.cloneElement(a,{className:"".concat(a.props.className||""," ").concat(o," ").concat(e),onClick:function(i){typeof a.props.onClick=="function"&&a.props.onClick(i),typeof r=="function"&&r(i)}}):_.createElement("svg",{className:"".concat(o," ").concat(e),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:r},_.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},cl=(function(n){we(a,n);function a(t){var e=n.call(this,t)||this;return e.portalRoot=null,e.el=document.createElement("div"),e}return a.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},a.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},a.prototype.render=function(){return Gl.createPortal(this.props.children,this.el)},a})(v.Component),Lx="[tabindex], a, button, input, select, textarea",Fx=function(n){return(n instanceof HTMLAnchorElement||!n.disabled)&&n.tabIndex!==-1},ll=(function(n){we(a,n);function a(t){var e=n.call(this,t)||this;return e.getTabChildren=function(){var r;return Array.prototype.slice.call((r=e.tabLoopRef.current)===null||r===void 0?void 0:r.querySelectorAll(Lx),1,-1).filter(Fx)},e.handleFocusStart=function(){var r=e.getTabChildren();r&&r.length>1&&r[r.length-1].focus()},e.handleFocusEnd=function(){var r=e.getTabChildren();r&&r.length>1&&r[0].focus()},e.tabLoopRef=v.createRef(),e}return a.prototype.render=function(){var t;return((t=this.props.enableTabLoop)!==null&&t!==void 0?t:a.defaultProps.enableTabLoop)?_.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},_.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,_.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},a.defaultProps={enableTabLoop:!0},a})(v.Component);function Yx(n){var a=function(t){var e,r=typeof t.hidePopper=="boolean"?t.hidePopper:!0,o=v.useRef(null),i=Vg(ae({open:!r,whileElementsMounted:Sf,placement:t.popperPlacement,middleware:dt([Nf({padding:15}),$f(10),Of({element:o})],(e=t.popperModifiers)!==null&&e!==void 0?e:[],!0)},t.popperProps)),c=ae(ae({},t),{hidePopper:r,popperProps:ae(ae({},i),{arrowRef:o})});return _.createElement(n,ae({},c))};return a}var Wx=(function(n){we(a,n);function a(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(a,"defaultProps",{get:function(){return{hidePopper:!0}},enumerable:!1,configurable:!0}),a.prototype.render=function(){var t=this.props,e=t.className,r=t.wrapperClassName,o=t.hidePopper,i=o===void 0?a.defaultProps.hidePopper:o,c=t.popperComponent,l=t.targetComponent,p=t.enableTabLoop,d=t.popperOnKeyDown,m=t.portalId,x=t.portalHost,y=t.popperProps,b=t.showArrow,w=void 0;if(!i){var k=Me("react-datepicker-popper",e);w=_.createElement(ll,{enableTabLoop:p},_.createElement("div",{ref:y.refs.setFloating,style:y.floatingStyles,className:k,"data-placement":y.placement,onKeyDown:d},c,b&&_.createElement(Wg,{ref:y.arrowRef,context:y.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}this.props.popperContainer&&(w=v.createElement(this.props.popperContainer,{},w)),m&&!i&&(w=_.createElement(cl,{portalId:m,portalHost:x},w));var f=Me("react-datepicker-wrapper",r);return _.createElement(_.Fragment,null,_.createElement("div",{ref:y.refs.setReference,className:f},l),w)},a})(v.Component),Bx=Yx(Wx),as="react-datepicker-ignore-onclickoutside";function Hx(n,a){return n&&a?Ie(n)!==Ie(a)||ee(n)!==ee(a):n!==a}var Ia="Date input not valid.",zx=(function(n){we(a,n);function a(t){var e=n.call(this,t)||this;return e.calendar=null,e.input=null,e.getPreSelection=function(){return e.props.openToDate?e.props.openToDate:e.props.selectsEnd&&e.props.startDate?e.props.startDate:e.props.selectsStart&&e.props.endDate?e.props.endDate:le()},e.modifyHolidays=function(){var r;return(r=e.props.holidays)===null||r===void 0?void 0:r.reduce(function(o,i){var c=new Date(i.date);return xt(c)?dt(dt([],o,!0),[ae(ae({},i),{date:c})],!1):o},[])},e.calcInitialState=function(){var r,o=e.getPreSelection(),i=ol(e.props),c=il(e.props),l=i&&sn(o,Er(i))?i:c&&Ft(o,Hi(c))?c:o;return{open:e.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(r=e.props.selectsRange?e.props.startDate:e.props.selected)!==null&&r!==void 0?r:l,highlightDates:Xi(e.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},e.resetHiddenStatus=function(){e.setState(ae(ae({},e.state),{wasHidden:!1}))},e.setHiddenStatus=function(){e.setState(ae(ae({},e.state),{wasHidden:!0}))},e.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&e.setHiddenStatus()},e.clearPreventFocusTimeout=function(){e.preventFocusTimeout&&clearTimeout(e.preventFocusTimeout)},e.safeFocus=function(){setTimeout(function(){var r,o;(o=(r=e.input)===null||r===void 0?void 0:r.focus)===null||o===void 0||o.call(r,{preventScroll:!0})},0)},e.safeBlur=function(){setTimeout(function(){var r,o;(o=(r=e.input)===null||r===void 0?void 0:r.blur)===null||o===void 0||o.call(r)},0)},e.setFocus=function(){e.safeFocus()},e.setBlur=function(){e.safeBlur(),e.cancelFocusInput()},e.setOpen=function(r,o){o===void 0&&(o=!1),e.setState({open:r,preSelection:r&&e.state.open?e.state.preSelection:e.calcInitialState().preSelection,lastPreSelectChange:Pa},function(){r||e.setState(function(i){return{focused:o?i.focused:!1}},function(){!o&&e.setBlur(),e.setState({inputValue:null})})})},e.inputOk=function(){return vt(e.state.preSelection)},e.isCalendarOpen=function(){return e.props.open===void 0?e.state.open&&!e.props.disabled&&!e.props.readOnly:e.props.open},e.handleFocus=function(r){var o,i,c=e.state.wasHidden,l=c?e.state.open:!0;c&&e.resetHiddenStatus(),!e.state.preventFocus&&l&&((i=(o=e.props).onFocus)===null||i===void 0||i.call(o,r),!e.props.preventOpenOnFocus&&!e.props.readOnly&&e.setOpen(!0)),e.setState({focused:!0})},e.sendFocusBackToInput=function(){e.preventFocusTimeout&&e.clearPreventFocusTimeout(),e.setState({preventFocus:!0},function(){e.preventFocusTimeout=setTimeout(function(){e.setFocus(),e.setState({preventFocus:!1})})})},e.cancelFocusInput=function(){clearTimeout(e.inputFocusTimeout),e.inputFocusTimeout=void 0},e.deferFocusInput=function(){e.cancelFocusInput(),e.inputFocusTimeout=setTimeout(function(){return e.setFocus()},1)},e.handleDropdownFocus=function(){e.cancelFocusInput()},e.handleBlur=function(r){var o,i;(!e.state.open||e.props.withPortal||e.props.showTimeInput)&&((i=(o=e.props).onBlur)===null||i===void 0||i.call(o,r)),e.setState({focused:!1})},e.handleCalendarClickOutside=function(r){var o,i;e.props.inline||e.setOpen(!1),(i=(o=e.props).onClickOutside)===null||i===void 0||i.call(o,r),e.props.withPortal&&r.preventDefault()},e.handleChange=function(){for(var r,o,i=[],c=0;c<arguments.length;c++)i[c]=arguments[c];var l=i[0];if(!(e.props.onChangeRaw&&(e.props.onChangeRaw.apply(e,i),!l||typeof l.isDefaultPrevented!="function"||l.isDefaultPrevented()))){e.setState({inputValue:(l==null?void 0:l.target)instanceof HTMLInputElement?l.target.value:null,lastPreSelectChange:qx});var p=e.props,d=p.dateFormat,m=d===void 0?a.defaultProps.dateFormat:d,x=p.strictParsing,y=x===void 0?a.defaultProps.strictParsing:x,b=p.selectsRange,w=p.startDate,k=p.endDate,f=(l==null?void 0:l.target)instanceof HTMLInputElement?l.target.value:"";if(b){var S=f.split("-",2).map(function(L){return L.trim()}),E=S[0],T=S[1],$=Ma(E??"",m,e.props.locale,y),O=Ma(T??"",m,e.props.locale,y),C=(w==null?void 0:w.getTime())!==($==null?void 0:$.getTime()),D=(k==null?void 0:k.getTime())!==(O==null?void 0:O.getTime());if(!C&&!D||$&&Ke($,e.props)||O&&Ke(O,e.props))return;(o=(r=e.props).onChange)===null||o===void 0||o.call(r,[$,O],l)}else{var I=Ma(f,m,e.props.locale,y,e.props.minDate);e.props.showTimeSelectOnly&&e.props.selected&&I&&!re(I,e.props.selected)&&(I=Pg(e.props.selected,{hours:ut(I),minutes:pt(I),seconds:wt(I)})),(I||!f)&&e.setSelected(I,l,!0)}}},e.handleSelect=function(r,o,i){if(e.props.shouldCloseOnSelect&&!e.props.showTimeSelect&&e.sendFocusBackToInput(),e.props.onChangeRaw&&e.props.onChangeRaw(o),e.setSelected(r,o,!1,i),e.props.showDateSelect&&e.setState({isRenderAriaLiveMessage:!0}),!e.props.shouldCloseOnSelect||e.props.showTimeSelect)e.setPreSelection(r);else if(!e.props.inline){e.props.selectsRange||e.setOpen(!1);var c=e.props,l=c.startDate,p=c.endDate;l&&!p&&(e.props.swapRange||!ts(r,l))&&e.setOpen(!1)}},e.setSelected=function(r,o,i,c){var l,p,d=r;if(e.props.showYearPicker){if(d!==null&&Tr(ee(d),e.props))return}else if(e.props.showMonthYearPicker){if(d!==null&&al(d,e.props))return}else if(d!==null&&Ke(d,e.props))return;var m=e.props,x=m.onChange,y=m.selectsRange,b=m.startDate,w=m.endDate,k=m.selectsMultiple,f=m.selectedDates,S=m.minTime,E=m.swapRange;if(!Ut(e.props.selected,d)||e.props.allowSameDay||y||k)if(d!==null&&(e.props.selected&&(!i||!e.props.showTimeSelect&&!e.props.showTimeSelectOnly&&!e.props.showTimeInput)&&(d=_a(d,{hour:ut(e.props.selected),minute:pt(e.props.selected),second:wt(e.props.selected)})),!i&&(e.props.showTimeSelect||e.props.showTimeSelectOnly)&&S&&(d=_a(d,{hour:S.getHours(),minute:S.getMinutes(),second:S.getSeconds()})),e.props.inline||e.setState({preSelection:d}),e.props.focusSelectedMonth||e.setState({monthSelectedIn:c})),y){var T=!b&&!w,$=b&&!w,O=b&&w;T?x==null||x([d,null],o):$&&(d===null?x==null||x([null,null],o):ts(d,b)?E?x==null||x([d,b],o):x==null||x([d,null],o):x==null||x([b,d],o)),O&&(x==null||x([d,null],o))}else if(k){if(d!==null)if(!(f!=null&&f.length))x==null||x([d],o);else{var C=f.some(function(I){return re(I,d)});if(C){var D=f.filter(function(I){return!re(I,d)});x==null||x(D,o)}else x==null||x(dt(dt([],f,!0),[d],!1),o)}}else x==null||x(d,o);i||((p=(l=e.props).onSelect)===null||p===void 0||p.call(l,d,o),e.setState({inputValue:null}))},e.setPreSelection=function(r){var o=vt(e.props.minDate),i=vt(e.props.maxDate),c=!0;if(r){var l=Er(r);if(o&&i)c=qn(r,e.props.minDate,e.props.maxDate);else if(o){var p=Er(e.props.minDate);c=Ft(r,p)||Ut(l,p)}else if(i){var d=Hi(e.props.maxDate);c=sn(r,d)||Ut(l,d)}}c&&e.setState({preSelection:r})},e.toggleCalendar=function(){e.setOpen(!e.state.open)},e.handleTimeChange=function(r){var o,i;if(!(e.props.selectsRange||e.props.selectsMultiple)){var c=e.props.selected?e.props.selected:e.getPreSelection(),l=e.props.selected?r:_a(c,{hour:ut(r),minute:pt(r)});e.setState({preSelection:l}),(i=(o=e.props).onChange)===null||i===void 0||i.call(o,l),e.props.shouldCloseOnSelect&&!e.props.showTimeInput&&(e.sendFocusBackToInput(),e.setOpen(!1)),e.props.showTimeInput&&e.setOpen(!0),(e.props.showTimeSelectOnly||e.props.showTimeSelect)&&e.setState({isRenderAriaLiveMessage:!0}),e.setState({inputValue:null})}},e.onInputClick=function(){var r,o;!e.props.disabled&&!e.props.readOnly&&e.setOpen(!0),(o=(r=e.props).onInputClick)===null||o===void 0||o.call(r)},e.onInputKeyDown=function(r){var o,i,c,l,p,d;(i=(o=e.props).onKeyDown)===null||i===void 0||i.call(o,r);var m=r.key;if(!e.state.open&&!e.props.inline&&!e.props.preventOpenOnFocus){(m===F.ArrowDown||m===F.ArrowUp||m===F.Enter)&&((c=e.onInputClick)===null||c===void 0||c.call(e));return}if(e.state.open){if(m===F.ArrowDown||m===F.ArrowUp){r.preventDefault();var x=e.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":e.props.showWeekPicker&&e.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':e.props.showFullMonthYearPicker||e.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',y=((l=e.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&e.calendar.containerRef.current.querySelector(x);y instanceof HTMLElement&&y.focus({preventScroll:!0});return}var b=le(e.state.preSelection);m===F.Enter?(r.preventDefault(),r.target.blur(),e.inputOk()&&e.state.lastPreSelectChange===Pa?(e.handleSelect(b,r),!e.props.shouldCloseOnSelect&&e.setPreSelection(b)):e.setOpen(!1)):m===F.Escape?(r.preventDefault(),r.target.blur(),e.sendFocusBackToInput(),e.setOpen(!1)):m===F.Tab&&e.setOpen(!1),e.inputOk()||(d=(p=e.props).onInputError)===null||d===void 0||d.call(p,{code:1,msg:Ia})}},e.onPortalKeyDown=function(r){var o=r.key;o===F.Escape&&(r.preventDefault(),e.setState({preventFocus:!0},function(){e.setOpen(!1),setTimeout(function(){e.setFocus(),e.setState({preventFocus:!1})})}))},e.onDayKeyDown=function(r){var o,i,c,l,p,d,m=e.props,x=m.minDate,y=m.maxDate,b=m.disabledKeyboardNavigation,w=m.showWeekPicker,k=m.shouldCloseOnSelect,f=m.locale,S=m.calendarStartDay,E=m.adjustDateOnChange,T=m.inline;if((i=(o=e.props).onKeyDown)===null||i===void 0||i.call(o,r),!b){var $=r.key,O=r.shiftKey,C=le(e.state.preSelection),D=function(q,j){var H=j;switch(q){case F.ArrowRight:H=w?Lr(j,1):Ge(j,1);break;case F.ArrowLeft:H=w?Li(j):fg(j);break;case F.ArrowUp:H=Li(j);break;case F.ArrowDown:H=Lr(j,1);break;case F.PageUp:H=O?jn(j,1):Zt(j,1);break;case F.PageDown:H=O?bt(j,1):Je(j,1);break;case F.Home:H=Rt(j,f,S);break;case F.End:H=nx(j);break}return H},I=function(q,j){for(var H=40,M=q,G=!1,Y=0,J=D(q,j);!G;){if(Y>=H){J=j;break}x&&J<x&&(M=F.ArrowRight,J=Ke(x,e.props)?D(M,J):x),y&&J>y&&(M=F.ArrowLeft,J=Ke(y,e.props)?D(M,J):y),Ke(J,e.props)?((M===F.PageUp||M===F.Home)&&(M=F.ArrowRight),(M===F.PageDown||M===F.End)&&(M=F.ArrowLeft),J=D(M,J)):G=!0,Y++}return J};if($===F.Enter){r.preventDefault(),e.handleSelect(C,r),!k&&e.setPreSelection(C);return}else if($===F.Escape){r.preventDefault(),e.setOpen(!1),e.inputOk()||(l=(c=e.props).onInputError)===null||l===void 0||l.call(c,{code:1,msg:Ia});return}var L=null;switch($){case F.ArrowLeft:case F.ArrowRight:case F.ArrowUp:case F.ArrowDown:case F.PageUp:case F.PageDown:case F.Home:case F.End:L=I($,C);break}if(!L){(d=(p=e.props).onInputError)===null||d===void 0||d.call(p,{code:1,msg:Ia});return}if(r.preventDefault(),e.setState({lastPreSelectChange:Pa}),E&&e.setSelected(L),e.setPreSelection(L),T){var z=Ie(C),A=Ie(L),K=ee(C),U=ee(L);z!==A||K!==U?e.setState({shouldFocusDayInline:!0}):e.setState({shouldFocusDayInline:!1})}}},e.onPopperKeyDown=function(r){var o=r.key;o===F.Escape&&(r.preventDefault(),e.sendFocusBackToInput())},e.onClearClick=function(r){r&&r.preventDefault&&r.preventDefault(),e.sendFocusBackToInput();var o=e.props,i=o.selectsRange,c=o.onChange;i?c==null||c([null,null],r):c==null||c(null,r),e.setState({inputValue:null})},e.clear=function(){e.onClearClick()},e.onScroll=function(r){typeof e.props.closeOnScroll=="boolean"&&e.props.closeOnScroll?(r.target===document||r.target===document.documentElement||r.target===document.body)&&e.setOpen(!1):typeof e.props.closeOnScroll=="function"&&e.props.closeOnScroll(r)&&e.setOpen(!1)},e.renderCalendar=function(){var r,o;return!e.props.inline&&!e.isCalendarOpen()?null:_.createElement(Rx,ae({showMonthYearDropdown:void 0,ref:function(i){e.calendar=i}},e.props,e.state,{setOpen:e.setOpen,dateFormat:(r=e.props.dateFormatCalendar)!==null&&r!==void 0?r:a.defaultProps.dateFormatCalendar,onSelect:e.handleSelect,onClickOutside:e.handleCalendarClickOutside,holidays:hx(e.modifyHolidays()),outsideClickIgnoreClass:as,onDropdownFocus:e.handleDropdownFocus,onTimeChange:e.handleTimeChange,className:e.props.calendarClassName,container:e.props.calendarContainer,handleOnKeyDown:e.props.onKeyDown,handleOnDayKeyDown:e.onDayKeyDown,setPreSelection:e.setPreSelection,dropdownMode:(o=e.props.dropdownMode)!==null&&o!==void 0?o:a.defaultProps.dropdownMode}),e.props.children)},e.renderAriaLiveRegion=function(){var r=e.props,o=r.dateFormat,i=o===void 0?a.defaultProps.dateFormat:o,c=r.locale,l=e.props.showTimeInput||e.props.showTimeSelect,p=l?"PPPPp":"PPPP",d;return e.props.selectsRange?d="Selected start date: ".concat(qe(e.props.startDate,{dateFormat:p,locale:c}),". ").concat(e.props.endDate?"End date: "+qe(e.props.endDate,{dateFormat:p,locale:c}):""):e.props.showTimeSelectOnly?d="Selected time: ".concat(qe(e.props.selected,{dateFormat:i,locale:c})):e.props.showYearPicker?d="Selected year: ".concat(qe(e.props.selected,{dateFormat:"yyyy",locale:c})):e.props.showMonthYearPicker?d="Selected month: ".concat(qe(e.props.selected,{dateFormat:"MMMM yyyy",locale:c})):e.props.showQuarterYearPicker?d="Selected quarter: ".concat(qe(e.props.selected,{dateFormat:"yyyy, QQQ",locale:c})):d="Selected date: ".concat(qe(e.props.selected,{dateFormat:p,locale:c})),_.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},d)},e.renderDateInput=function(){var r,o,i,c=Me(e.props.className,(r={},r[as]=e.state.open,r)),l=e.props.customInput||_.createElement("input",{type:"text"}),p=e.props.customInputRef||"ref",d=e.props,m=d.dateFormat,x=m===void 0?a.defaultProps.dateFormat:m,y=d.locale,b=typeof e.props.value=="string"?e.props.value:typeof e.state.inputValue=="string"?e.state.inputValue:e.props.selectsRange?Jg(e.props.startDate,e.props.endDate,{dateFormat:x,locale:y}):e.props.selectsMultiple?Zg((i=e.props.selectedDates)!==null&&i!==void 0?i:[],{dateFormat:x,locale:y}):qe(e.props.selected,{dateFormat:x,locale:y});return v.cloneElement(l,(o={},o[p]=function(w){e.input=w},o.value=b,o.onBlur=e.handleBlur,o.onChange=e.handleChange,o.onClick=e.onInputClick,o.onFocus=e.handleFocus,o.onKeyDown=e.onInputKeyDown,o.id=e.props.id,o.name=e.props.name,o.form=e.props.form,o.autoFocus=e.props.autoFocus,o.placeholder=e.props.placeholderText,o.disabled=e.props.disabled,o.autoComplete=e.props.autoComplete,o.className=Me(l.props.className,c),o.title=e.props.title,o.readOnly=e.props.readOnly,o.required=e.props.required,o.tabIndex=e.props.tabIndex,o["aria-describedby"]=e.props.ariaDescribedBy,o["aria-invalid"]=e.props.ariaInvalid,o["aria-labelledby"]=e.props.ariaLabelledBy,o["aria-required"]=e.props.ariaRequired,o))},e.renderClearButton=function(){var r=e.props,o=r.isClearable,i=r.disabled,c=r.selected,l=r.startDate,p=r.endDate,d=r.clearButtonTitle,m=r.clearButtonClassName,x=m===void 0?"":m,y=r.ariaLabelClose,b=y===void 0?"Close":y,w=r.selectedDates;return o&&(c!=null||l!=null||p!=null||w!=null&&w.length)?_.createElement("button",{type:"button",className:Me("react-datepicker__close-icon",x,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":b,onClick:e.onClearClick,title:d,tabIndex:-1}):null},e.state=e.calcInitialState(),e.preventFocusTimeout=void 0,e}return Object.defineProperty(a,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:tr,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),a.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},a.prototype.componentDidUpdate=function(t,e){var r,o,i,c;t.inline&&Hx(t.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&t.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),t.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Xi(this.props.highlightDates)}),!e.focused&&!Ut(t.selected,this.props.selected)&&this.setState({inputValue:null}),e.open!==this.state.open&&(e.open===!1&&this.state.open===!0&&((o=(r=this.props).onCalendarOpen)===null||o===void 0||o.call(r)),e.open===!0&&this.state.open===!1&&((c=(i=this.props).onCalendarClose)===null||c===void 0||c.call(i)))},a.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},a.prototype.renderInputContainer=function(){var t=this.props,e=t.showIcon,r=t.icon,o=t.calendarIconClassname,i=t.calendarIconClassName,c=t.toggleCalendarOnIconClick,l=this.state.open;return o&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),_.createElement("div",{className:"react-datepicker__input-container".concat(e?" react-datepicker__view-calendar-icon":"")},e&&_.createElement(Ax,ae({icon:r,className:Me(i,!i&&o,l&&"react-datepicker-ignore-onclickoutside")},c?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},a.prototype.render=function(){var t=this.renderCalendar();if(this.props.inline)return t;if(this.props.withPortal){var e=this.state.open?_.createElement(ll,{enableTabLoop:this.props.enableTabLoop},_.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},t)):null;return this.state.open&&this.props.portalId&&(e=_.createElement(cl,ae({portalId:this.props.portalId},this.props),e)),_.createElement("div",null,this.renderInputContainer(),e)}return _.createElement(Bx,ae({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:t,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},a})(v.Component),qx="input",Pa="navigate";function ia(n){return!!n&&!dd(n.providerType)}function Kx(){const{data:n}=xe({queryKey:["feature-flag","proceeds-to-treasury"],queryFn:ud,staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return n===!0}const os=g.div`
|
|
358
|
+
position: fixed;
|
|
359
|
+
inset: 0;
|
|
360
|
+
z-index: 10000;
|
|
361
|
+
display: flex;
|
|
362
|
+
align-items: center;
|
|
363
|
+
justify-content: center;
|
|
364
|
+
padding: 16px;
|
|
365
|
+
background: rgba(22, 21, 24, 0.55);
|
|
366
|
+
`,is=g.div`
|
|
367
|
+
width: 560px;
|
|
368
|
+
max-width: 100%;
|
|
369
|
+
max-height: 92vh;
|
|
370
|
+
overflow-y: auto;
|
|
371
|
+
background: ${u.colors.white};
|
|
372
|
+
border-radius: 16px;
|
|
373
|
+
padding: 12px 16px 16px;
|
|
374
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
375
|
+
display: flex;
|
|
376
|
+
flex-direction: column;
|
|
377
|
+
gap: 24px;
|
|
378
|
+
`,ss=g.div`
|
|
379
|
+
display: flex;
|
|
380
|
+
align-items: center;
|
|
381
|
+
justify-content: space-between;
|
|
382
|
+
gap: 8px;
|
|
383
|
+
padding-bottom: 16px;
|
|
384
|
+
border-bottom: 1px solid ${u.colors.gray4};
|
|
385
|
+
`,cs=g.h2`
|
|
386
|
+
margin: 0;
|
|
387
|
+
font-family: ${u.font.sans};
|
|
388
|
+
font-weight: 600;
|
|
389
|
+
font-size: 20px;
|
|
390
|
+
line-height: 1.6;
|
|
391
|
+
color: ${u.colors.text};
|
|
392
|
+
`,ls=g.button`
|
|
393
|
+
flex: none;
|
|
394
|
+
display: grid;
|
|
395
|
+
place-items: center;
|
|
396
|
+
width: 24px;
|
|
397
|
+
height: 24px;
|
|
398
|
+
border: 0;
|
|
399
|
+
background: none;
|
|
400
|
+
cursor: pointer;
|
|
401
|
+
color: ${u.colors.text};
|
|
402
|
+
|
|
403
|
+
.ico {
|
|
404
|
+
width: 18px;
|
|
405
|
+
height: 18px;
|
|
406
|
+
}
|
|
407
|
+
&:disabled {
|
|
408
|
+
opacity: 0.4;
|
|
409
|
+
cursor: default;
|
|
410
|
+
}
|
|
411
|
+
&:focus-visible {
|
|
412
|
+
outline: 2px solid ${u.colors.accent};
|
|
413
|
+
outline-offset: 2px;
|
|
414
|
+
}
|
|
415
|
+
`,Qx=g.p`
|
|
416
|
+
margin: 0;
|
|
417
|
+
font-family: ${u.font.sans};
|
|
418
|
+
font-size: 14px;
|
|
419
|
+
line-height: 1.57;
|
|
420
|
+
color: ${u.colors.text};
|
|
421
|
+
text-align: left;
|
|
422
|
+
`,Vx=g.div`
|
|
423
|
+
display: flex;
|
|
424
|
+
align-items: center;
|
|
425
|
+
gap: 12px;
|
|
426
|
+
`,Ux=g.div`
|
|
427
|
+
flex: none;
|
|
428
|
+
display: grid;
|
|
429
|
+
place-items: center;
|
|
430
|
+
width: 180px;
|
|
431
|
+
height: 180px;
|
|
432
|
+
border-radius: 16px;
|
|
433
|
+
background: ${u.colors.media};
|
|
434
|
+
border: 1px solid ${u.colors.gray4};
|
|
435
|
+
overflow: hidden;
|
|
436
|
+
|
|
437
|
+
img {
|
|
438
|
+
width: 150px;
|
|
439
|
+
height: 150px;
|
|
440
|
+
object-fit: contain;
|
|
441
|
+
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
${u.media.maxWidth("mobile")} {
|
|
445
|
+
width: 120px;
|
|
446
|
+
height: 120px;
|
|
447
|
+
|
|
448
|
+
img {
|
|
449
|
+
width: 100px;
|
|
450
|
+
height: 100px;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
`,Gx=g.div`
|
|
454
|
+
flex: 1 1 0;
|
|
455
|
+
min-width: 0;
|
|
456
|
+
display: flex;
|
|
457
|
+
flex-direction: column;
|
|
458
|
+
gap: 4px;
|
|
459
|
+
padding: 8px;
|
|
460
|
+
`,Xx=g.p`
|
|
461
|
+
margin: 0;
|
|
462
|
+
font-family: ${u.font.sans};
|
|
463
|
+
font-weight: 600;
|
|
464
|
+
font-size: 20px;
|
|
465
|
+
line-height: 1.57;
|
|
466
|
+
color: ${u.colors.text};
|
|
467
|
+
`,Jx=g.p`
|
|
468
|
+
margin: 0;
|
|
469
|
+
font-family: ${u.font.sans};
|
|
470
|
+
font-size: 10px;
|
|
471
|
+
line-height: 1.43;
|
|
472
|
+
color: ${u.colors.muted};
|
|
473
|
+
`,Zx=g.div`
|
|
474
|
+
display: flex;
|
|
475
|
+
gap: 12px;
|
|
476
|
+
|
|
477
|
+
${u.media.maxWidth("mobile")} {
|
|
478
|
+
flex-direction: column;
|
|
479
|
+
}
|
|
480
|
+
`,ds=g.label`
|
|
481
|
+
flex: 1 1 0;
|
|
482
|
+
min-width: 0;
|
|
483
|
+
display: flex;
|
|
484
|
+
flex-direction: column;
|
|
485
|
+
gap: 4px;
|
|
486
|
+
`,us=g.span`
|
|
487
|
+
font-family: ${u.font.sans};
|
|
488
|
+
font-size: 12px;
|
|
489
|
+
color: ${u.colors.muted};
|
|
490
|
+
`,ey=g.div`
|
|
491
|
+
display: flex;
|
|
492
|
+
align-items: center;
|
|
493
|
+
justify-content: space-between;
|
|
494
|
+
gap: 4px;
|
|
495
|
+
height: 42px;
|
|
496
|
+
padding: 0 8px;
|
|
497
|
+
border: 0.5px solid ${u.colors.text};
|
|
498
|
+
border-radius: 8px;
|
|
499
|
+
background: ${u.colors.white};
|
|
500
|
+
|
|
501
|
+
&:focus-within {
|
|
502
|
+
border-color: ${u.colors.magenta};
|
|
503
|
+
}
|
|
504
|
+
&[aria-invalid='true'] {
|
|
505
|
+
border-color: ${u.colors.err};
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.ccy {
|
|
509
|
+
flex: none;
|
|
510
|
+
width: 22px;
|
|
511
|
+
height: 22px;
|
|
512
|
+
color: ${u.colors.rarity};
|
|
513
|
+
}
|
|
514
|
+
.cal {
|
|
515
|
+
flex: none;
|
|
516
|
+
width: 18px;
|
|
517
|
+
height: 18px;
|
|
518
|
+
color: ${u.colors.text};
|
|
519
|
+
}
|
|
520
|
+
`,ty=g.input`
|
|
521
|
+
flex: 1 1 auto;
|
|
522
|
+
min-width: 0;
|
|
523
|
+
border: 0;
|
|
524
|
+
outline: none;
|
|
525
|
+
background: transparent;
|
|
526
|
+
font-family: ${u.font.sans};
|
|
527
|
+
font-size: 13px;
|
|
528
|
+
color: ${u.colors.text};
|
|
529
|
+
|
|
530
|
+
&::placeholder {
|
|
531
|
+
color: ${u.colors.muted2};
|
|
532
|
+
}
|
|
533
|
+
/* Strip the number spinners — the glyph + USD hint carry the affordance. */
|
|
534
|
+
&::-webkit-outer-spin-button,
|
|
535
|
+
&::-webkit-inner-spin-button {
|
|
536
|
+
-webkit-appearance: none;
|
|
537
|
+
margin: 0;
|
|
538
|
+
}
|
|
539
|
+
&[type='number'] {
|
|
540
|
+
-moz-appearance: textfield;
|
|
541
|
+
appearance: textfield;
|
|
542
|
+
}
|
|
543
|
+
`,ny=g.span`
|
|
544
|
+
flex: none;
|
|
545
|
+
font-family: ${u.font.sans};
|
|
546
|
+
font-size: 10px;
|
|
547
|
+
color: ${u.colors.muted2};
|
|
548
|
+
`,ry=g.div`
|
|
549
|
+
.react-datepicker-wrapper {
|
|
550
|
+
display: block;
|
|
551
|
+
width: 100%;
|
|
552
|
+
}
|
|
553
|
+
.react-datepicker__input-container {
|
|
554
|
+
display: flex;
|
|
555
|
+
align-items: center;
|
|
556
|
+
}
|
|
557
|
+
.react-datepicker__input-container input {
|
|
558
|
+
width: 100%;
|
|
559
|
+
height: 42px;
|
|
560
|
+
padding: 0 8px;
|
|
561
|
+
border: 0.5px solid ${u.colors.text};
|
|
562
|
+
border-radius: 8px;
|
|
563
|
+
background: ${u.colors.white};
|
|
564
|
+
font-family: ${u.font.sans};
|
|
565
|
+
font-size: 13px;
|
|
566
|
+
color: ${u.colors.text};
|
|
567
|
+
outline: none;
|
|
568
|
+
}
|
|
569
|
+
.react-datepicker__input-container input:focus {
|
|
570
|
+
border-color: ${u.colors.magenta};
|
|
571
|
+
}
|
|
572
|
+
&[data-invalid='true'] .react-datepicker__input-container input {
|
|
573
|
+
border-color: ${u.colors.err};
|
|
574
|
+
}
|
|
575
|
+
/* The showIcon calendar glyph inside the field. */
|
|
576
|
+
.react-datepicker__calendar-icon {
|
|
577
|
+
fill: ${u.colors.text};
|
|
578
|
+
opacity: 0.85;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/* ---- Calendar popup: white / on-brand (override react-datepicker defaults) ---- */
|
|
582
|
+
.react-datepicker-popper {
|
|
583
|
+
z-index: 40;
|
|
584
|
+
}
|
|
585
|
+
.react-datepicker {
|
|
586
|
+
font-family: ${u.font.sans};
|
|
587
|
+
font-size: 13px;
|
|
588
|
+
color: ${u.colors.text};
|
|
589
|
+
background: ${u.colors.white};
|
|
590
|
+
border: 1px solid rgba(22, 21, 24, 0.1);
|
|
591
|
+
border-radius: 12px;
|
|
592
|
+
box-shadow: 0 12px 32px rgba(22, 21, 24, 0.14);
|
|
593
|
+
overflow: hidden;
|
|
594
|
+
}
|
|
595
|
+
.react-datepicker__triangle {
|
|
596
|
+
display: none;
|
|
597
|
+
}
|
|
598
|
+
.react-datepicker__header {
|
|
599
|
+
background: ${u.colors.white};
|
|
600
|
+
border-bottom: 1px solid rgba(22, 21, 24, 0.1);
|
|
601
|
+
padding-top: 12px;
|
|
602
|
+
}
|
|
603
|
+
.react-datepicker__current-month {
|
|
604
|
+
color: ${u.colors.text};
|
|
605
|
+
font-weight: 600;
|
|
606
|
+
font-size: 14px;
|
|
607
|
+
}
|
|
608
|
+
.react-datepicker__day-name {
|
|
609
|
+
color: ${u.colors.muted2};
|
|
610
|
+
}
|
|
611
|
+
.react-datepicker__day {
|
|
612
|
+
color: ${u.colors.text};
|
|
613
|
+
border-radius: 8px;
|
|
614
|
+
}
|
|
615
|
+
.react-datepicker__day:hover {
|
|
616
|
+
background: rgba(105, 31, 169, 0.1);
|
|
617
|
+
}
|
|
618
|
+
.react-datepicker__day--selected,
|
|
619
|
+
.react-datepicker__day--keyboard-selected {
|
|
620
|
+
background: ${u.colors.accent};
|
|
621
|
+
color: ${u.colors.white};
|
|
622
|
+
}
|
|
623
|
+
.react-datepicker__day--today {
|
|
624
|
+
font-weight: 700;
|
|
625
|
+
}
|
|
626
|
+
.react-datepicker__day--disabled {
|
|
627
|
+
color: ${u.colors.muted2};
|
|
628
|
+
opacity: 0.5;
|
|
629
|
+
}
|
|
630
|
+
.react-datepicker__navigation-icon::before {
|
|
631
|
+
border-color: ${u.colors.accent};
|
|
632
|
+
}
|
|
633
|
+
.react-datepicker__today-button {
|
|
634
|
+
background: ${u.colors.white};
|
|
635
|
+
border-top: 1px solid rgba(22, 21, 24, 0.1);
|
|
636
|
+
color: ${u.colors.accent};
|
|
637
|
+
font-weight: 600;
|
|
638
|
+
padding: 10px;
|
|
639
|
+
}
|
|
640
|
+
`,ay=g.button`
|
|
641
|
+
width: 100%;
|
|
642
|
+
height: 48px;
|
|
643
|
+
border: 0;
|
|
644
|
+
border-radius: 16px;
|
|
645
|
+
cursor: pointer;
|
|
646
|
+
background: ${u.colors.accent};
|
|
647
|
+
color: ${u.colors.white};
|
|
648
|
+
font-family: ${u.font.sans};
|
|
649
|
+
font-weight: 600;
|
|
650
|
+
font-size: 15px;
|
|
651
|
+
line-height: 24px;
|
|
652
|
+
letter-spacing: 0.46px;
|
|
653
|
+
text-transform: uppercase;
|
|
654
|
+
|
|
655
|
+
&:hover:not(:disabled) {
|
|
656
|
+
background: ${u.colors.accentHover};
|
|
657
|
+
}
|
|
658
|
+
&:focus-visible {
|
|
659
|
+
outline: 2px solid ${u.colors.accent};
|
|
660
|
+
outline-offset: 2px;
|
|
661
|
+
}
|
|
662
|
+
&:disabled {
|
|
663
|
+
cursor: not-allowed;
|
|
664
|
+
background: rgba(105, 31, 169, 0.2);
|
|
665
|
+
color: ${u.colors.white};
|
|
666
|
+
}
|
|
667
|
+
`;g.p`
|
|
668
|
+
margin: 0;
|
|
669
|
+
font-family: ${u.font.sans};
|
|
670
|
+
font-size: 13px;
|
|
671
|
+
color: ${u.colors.muted};
|
|
672
|
+
text-align: center;
|
|
673
|
+
`;const oy=g.p`
|
|
674
|
+
margin: 0;
|
|
675
|
+
font-family: ${u.font.sans};
|
|
676
|
+
font-size: 12px;
|
|
677
|
+
line-height: 1.5;
|
|
678
|
+
color: ${u.colors.muted};
|
|
679
|
+
`,iy=g.div`
|
|
680
|
+
display: flex;
|
|
681
|
+
flex-direction: column;
|
|
682
|
+
align-items: center;
|
|
683
|
+
gap: 16px;
|
|
684
|
+
padding: 24px 16px;
|
|
685
|
+
border-radius: 16px;
|
|
686
|
+
background: rgba(193, 238, 207, 0.5);
|
|
687
|
+
text-align: center;
|
|
688
|
+
`,sy=g.div`
|
|
689
|
+
display: grid;
|
|
690
|
+
place-items: center;
|
|
691
|
+
width: 64px;
|
|
692
|
+
height: 64px;
|
|
693
|
+
border-radius: 50%;
|
|
694
|
+
background: ${u.colors.ok};
|
|
695
|
+
color: ${u.colors.white};
|
|
696
|
+
|
|
697
|
+
.ico {
|
|
698
|
+
width: 34px;
|
|
699
|
+
height: 34px;
|
|
700
|
+
}
|
|
701
|
+
`,cy=g.p`
|
|
702
|
+
margin: 0;
|
|
703
|
+
font-family: ${u.font.sans};
|
|
704
|
+
font-size: 20px;
|
|
705
|
+
line-height: 1.334;
|
|
706
|
+
color: ${u.colors.text2};
|
|
707
|
+
|
|
708
|
+
b {
|
|
709
|
+
font-weight: 700;
|
|
710
|
+
}
|
|
711
|
+
`,ly=g.div`
|
|
712
|
+
display: flex;
|
|
713
|
+
gap: 12px;
|
|
714
|
+
|
|
715
|
+
${u.media.maxWidth("mobile")} {
|
|
716
|
+
flex-direction: column-reverse;
|
|
717
|
+
}
|
|
718
|
+
`,dy=g.button`
|
|
719
|
+
flex: 1 1 0;
|
|
720
|
+
height: 48px;
|
|
721
|
+
border: 2px solid ${u.colors.accent};
|
|
722
|
+
border-radius: 12px;
|
|
723
|
+
background: transparent;
|
|
724
|
+
color: ${u.colors.accent};
|
|
725
|
+
cursor: pointer;
|
|
726
|
+
font-family: ${u.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: rgba(105, 31, 169, 0.06);
|
|
735
|
+
}
|
|
736
|
+
&:focus-visible {
|
|
737
|
+
outline: 2px solid ${u.colors.accent};
|
|
738
|
+
outline-offset: 2px;
|
|
739
|
+
}
|
|
740
|
+
`,uy=g.button`
|
|
741
|
+
flex: 1 1 0;
|
|
742
|
+
height: 48px;
|
|
743
|
+
border: 0;
|
|
744
|
+
border-radius: 12px;
|
|
745
|
+
background: ${u.colors.accent};
|
|
746
|
+
color: ${u.colors.softWhite};
|
|
747
|
+
cursor: pointer;
|
|
748
|
+
font-family: ${u.font.sans};
|
|
749
|
+
font-weight: 600;
|
|
750
|
+
font-size: 13px;
|
|
751
|
+
line-height: 24px;
|
|
752
|
+
letter-spacing: 0.46px;
|
|
753
|
+
text-transform: uppercase;
|
|
754
|
+
|
|
755
|
+
&:hover {
|
|
756
|
+
background: ${u.colors.accentHover};
|
|
757
|
+
}
|
|
758
|
+
&:focus-visible {
|
|
759
|
+
outline: 2px solid ${u.colors.accent};
|
|
760
|
+
outline-offset: 2px;
|
|
761
|
+
}
|
|
762
|
+
`,py=30;function ps(n){const a=new Date;return a.setHours(0,0,0,0),a.setDate(a.getDate()+n),a}function fy({asset:n,session:a,creator:t,onListed:e,onClose:r}){const o=ln(),i=cn(),c=Kx(),{data:l}=xe({queryKey:["collection-meta",n.contractAddress],enabled:!t&&!!n.contractAddress,staleTime:5*6e4,queryFn:()=>pc(n.contractAddress)}),p=t||(l==null?void 0:l.creator),{data:d}=Vr(p),m=p?d!=null&&d.name?Ur(d.name):Za(p):null,[x,y]=v.useState("10"),[b,w]=v.useState(()=>ps(py)),[k,f]=v.useState(null),[S,E]=v.useState(!1),[T,$]=v.useState(null),[O,C]=v.useState("form"),D=ia(a),I=Number(x),L=Number.isInteger(I)&&I>0,z=b?b.getTime():NaN,A=!!b&&z>Date.now(),K=ps(1),U=L?`$${Gt(I).toFixed(2)}`:"$0";async function q(){if(f(null),!L){f(h("sellModal.errorWholeNumber"));return}if(!A){f(h("sellModal.invalidDate"));return}if(!D){E(!0);try{const M=Zo(n.contractAddress,n.chainId),G=await vc(M,a.address);if(E(!1),!G){C("authorize");return}}catch{E(!1)}}await j()}async function j(){if(f(null),!L){f(h("sellModal.errorWholeNumber"));return}if(!A){f(h("sellModal.invalidDate"));return}E(!0);try{await tp({signer:a.signer,contractAddress:n.contractAddress,chainId:n.chainId});const M=await np({signer:a.signer,nft:{contractAddress:n.contractAddress,tokenId:n.tokenId,network:n.network,chainId:n.chainId},usdPrice:Gt(I),expiresAtMs:z}),G=await uc(M,a.identity);$(I),pe("Shop Listed Item",{item_id:n.itemId??n.tokenId??null,contract_address:n.contractAddress,price_credits:I,price_usd:Gt(I),listing_type:"secondary",is_primary:!1}),Zn.success(h("sellModal.toastOnSale",{name:n.name})),o.invalidateQueries({queryKey:["my-assets",a.address]}),e==null||e(I,G==null?void 0:G.id)}catch(M){Se(M,{flow:"list_secondary"}),pe("Shop Listing Failed",{listing_type:"secondary",error_code:Qe(M)}),f(nn(M,h("sellModal.errorGeneric")))}finally{E(!1)}}function H(){r(),i("/my-items")}return T!==null?s.jsx(os,{onClick:r,role:"presentation",children:s.jsxs(is,{onClick:M=>M.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":h("sellModal.successHeader"),children:[s.jsxs(ss,{children:[s.jsx(cs,{children:h("sellModal.successHeader")}),s.jsx(ls,{onClick:r,"aria-label":h("getCredits.done"),children:s.jsx(V,{name:"close",className:"ico"})})]}),s.jsxs(iy,{children:[s.jsx(sy,{"aria-hidden":!0,children:s.jsx(V,{name:"check",className:"ico"})}),s.jsxs(cy,{children:[s.jsx("b",{children:h("sellModal.successOnSale")})," ",h("sellModal.successManage")]})]}),s.jsxs(ly,{children:[s.jsx(dy,{onClick:H,children:h("sellModal.myItems")}),s.jsx(uy,{onClick:r,children:h("getCredits.done")})]})]})}):O==="authorize"?s.jsx(yc,{auth:Zo(n.contractAddress,n.chainId),signer:a.signer,title:h("authorizeStep.sellTitle"),name:n.name,image:n.image,icon:s.jsx(V,{name:"pen",className:"ico"}),reason:h("authorizeStep.sellReason",{name:n.name}),onAuthorized:()=>{C("form"),j()},onCancel:()=>C("form"),onClose:r}):s.jsx(os,{onClick:S?void 0:r,role:"presentation",children:s.jsxs(is,{"data-testid":"modal",onClick:M=>M.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":h("sellModal.sellProduct"),children:[s.jsxs(ss,{children:[s.jsx(cs,{children:h("sellModal.sellProduct")}),s.jsx(ls,{onClick:r,disabled:S,"aria-label":h("sellModal.cancel"),children:s.jsx(V,{name:"close",className:"ico"})})]}),s.jsx(Qx,{children:h("sellModal.subtitle")}),s.jsxs(Vx,{children:[s.jsx(Ux,{children:n.image?s.jsx("img",{src:n.image,alt:""}):null}),s.jsxs(Gx,{children:[s.jsx(Xx,{children:n.name}),m?s.jsx(Jx,{children:h("sellModal.byCreator",{name:m})}):null]})]}),s.jsxs(Zx,{children:[s.jsxs(ds,{children:[s.jsx(us,{children:h("sellModal.priceShort")}),s.jsxs(ey,{"aria-invalid":x.length>0&&!L,children:[s.jsx(Re,{className:"ccy"}),s.jsx(ty,{type:"number",min:"1",step:"1",inputMode:"numeric",value:x,onChange:M=>y(M.target.value),disabled:S,"aria-label":h("sellModal.priceLabel",{currency:"credits"})}),s.jsx(ny,{"aria-hidden":!0,children:U})]})]}),s.jsxs(ds,{children:[s.jsx(us,{children:h("sellModal.expirationLabel")}),s.jsx(ry,{"data-invalid":!!b&&!A,children:s.jsx(zx,{selected:b,onChange:w,minDate:K,dateFormat:"MM/dd/yyyy",placeholderText:"MM/DD/YYYY",disabled:S,showIcon:!0,showPopperArrow:!1,todayButton:h("sellModal.today"),ariaLabelledBy:void 0,"aria-label":h("sellModal.expirationLabel")})})]})]}),c&&L?s.jsx(oy,{children:h("sellModal.proceedsCredits",{count:I})}):null,s.jsx(Lt,{message:k}),s.jsx(ay,{onClick:()=>void q(),disabled:S||!L||!A,children:S?D?h("sellModal.puttingOnSale"):h("sellModal.confirmListing"):h("sellModal.putUpForSale")})]})})}const hy=g.div`
|
|
763
|
+
position: fixed;
|
|
764
|
+
inset: 0;
|
|
765
|
+
z-index: 10000;
|
|
766
|
+
display: flex;
|
|
767
|
+
align-items: center;
|
|
768
|
+
justify-content: center;
|
|
769
|
+
padding: 16px;
|
|
770
|
+
background: rgba(22, 21, 24, 0.55);
|
|
771
|
+
`,my=g.div`
|
|
772
|
+
width: 560px;
|
|
773
|
+
max-width: 100%;
|
|
774
|
+
max-height: 92vh;
|
|
775
|
+
overflow-y: auto;
|
|
776
|
+
background: ${u.colors.white};
|
|
777
|
+
border-radius: 16px;
|
|
778
|
+
padding: 12px 16px 16px;
|
|
779
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
780
|
+
display: flex;
|
|
781
|
+
flex-direction: column;
|
|
782
|
+
gap: 24px;
|
|
783
|
+
|
|
784
|
+
${u.media.maxWidth("mobile")} {
|
|
785
|
+
padding: 12px 16px 16px;
|
|
786
|
+
}
|
|
787
|
+
`,gy=g.div`
|
|
788
|
+
display: flex;
|
|
789
|
+
flex-direction: column;
|
|
790
|
+
gap: 4px;
|
|
791
|
+
padding-bottom: 16px;
|
|
792
|
+
border-bottom: 1px solid ${u.colors.gray4};
|
|
793
|
+
`,xy=g.div`
|
|
794
|
+
display: flex;
|
|
795
|
+
align-items: center;
|
|
796
|
+
justify-content: space-between;
|
|
797
|
+
gap: 8px;
|
|
798
|
+
`,yy=g.h2`
|
|
799
|
+
margin: 0;
|
|
800
|
+
font-family: ${u.font.sans};
|
|
801
|
+
font-weight: 600;
|
|
802
|
+
font-size: 20px;
|
|
803
|
+
line-height: 1.6;
|
|
804
|
+
color: ${u.colors.text};
|
|
805
|
+
`,by=g.button`
|
|
806
|
+
flex: none;
|
|
807
|
+
display: grid;
|
|
808
|
+
place-items: center;
|
|
809
|
+
width: 24px;
|
|
810
|
+
height: 24px;
|
|
811
|
+
border: 0;
|
|
812
|
+
background: none;
|
|
813
|
+
cursor: pointer;
|
|
814
|
+
color: ${u.colors.text};
|
|
815
|
+
|
|
816
|
+
.ico {
|
|
817
|
+
width: 18px;
|
|
818
|
+
height: 18px;
|
|
819
|
+
}
|
|
820
|
+
&:disabled {
|
|
821
|
+
opacity: 0.4;
|
|
822
|
+
cursor: default;
|
|
823
|
+
}
|
|
824
|
+
&:focus-visible {
|
|
825
|
+
outline: 2px solid ${u.colors.accent};
|
|
826
|
+
outline-offset: 2px;
|
|
827
|
+
}
|
|
828
|
+
`,vy=g.div`
|
|
829
|
+
display: flex;
|
|
830
|
+
align-items: center;
|
|
831
|
+
gap: 12px;
|
|
832
|
+
`,wy=g.img`
|
|
833
|
+
flex: none;
|
|
834
|
+
width: 72px;
|
|
835
|
+
height: 72px;
|
|
836
|
+
border-radius: 12px;
|
|
837
|
+
object-fit: cover;
|
|
838
|
+
background: ${u.colors.media};
|
|
839
|
+
`,ky=g.p`
|
|
840
|
+
margin: 0;
|
|
841
|
+
font-family: ${u.font.sans};
|
|
842
|
+
font-weight: 600;
|
|
843
|
+
font-size: 18px;
|
|
844
|
+
line-height: 1.4;
|
|
845
|
+
color: ${u.colors.text};
|
|
846
|
+
`,Dy=g.label`
|
|
847
|
+
display: flex;
|
|
848
|
+
flex-direction: column;
|
|
849
|
+
gap: 6px;
|
|
850
|
+
`,Cy=g.span`
|
|
851
|
+
font-family: ${u.font.sans};
|
|
852
|
+
font-size: 12px;
|
|
853
|
+
color: ${u.colors.muted};
|
|
854
|
+
`,Sy=g.input`
|
|
855
|
+
width: 100%;
|
|
856
|
+
height: 44px;
|
|
857
|
+
padding: 0 12px;
|
|
858
|
+
border: 1px solid ${u.colors.text};
|
|
859
|
+
border-radius: 8px;
|
|
860
|
+
background: ${u.colors.white};
|
|
861
|
+
font-family: ${u.font.sans};
|
|
862
|
+
font-size: 14px;
|
|
863
|
+
color: ${u.colors.text};
|
|
864
|
+
|
|
865
|
+
&::placeholder {
|
|
866
|
+
color: ${u.colors.muted2};
|
|
867
|
+
}
|
|
868
|
+
&:focus-visible {
|
|
869
|
+
outline: none;
|
|
870
|
+
border-color: ${u.colors.magenta};
|
|
871
|
+
}
|
|
872
|
+
&[aria-invalid='true'] {
|
|
873
|
+
border-color: ${u.colors.err};
|
|
874
|
+
}
|
|
875
|
+
&:disabled {
|
|
876
|
+
opacity: 0.6;
|
|
877
|
+
}
|
|
878
|
+
`,My=g.p`
|
|
879
|
+
margin: 0;
|
|
880
|
+
padding: 12px 14px;
|
|
881
|
+
border-radius: 10px;
|
|
882
|
+
background: rgba(255, 45, 85, 0.1);
|
|
883
|
+
font-family: ${u.font.sans};
|
|
884
|
+
font-size: 13px;
|
|
885
|
+
line-height: 1.5;
|
|
886
|
+
color: ${u.colors.text2};
|
|
887
|
+
`,fs=g.div`
|
|
888
|
+
display: flex;
|
|
889
|
+
gap: 12px;
|
|
890
|
+
|
|
891
|
+
${u.media.maxWidth("mobile")} {
|
|
892
|
+
flex-direction: column-reverse;
|
|
893
|
+
}
|
|
894
|
+
`,_y=g.button`
|
|
895
|
+
flex: 1;
|
|
896
|
+
height: 48px;
|
|
897
|
+
border: 2px solid ${u.colors.blackBtn};
|
|
898
|
+
border-radius: 16px;
|
|
899
|
+
background: transparent;
|
|
900
|
+
color: ${u.colors.text};
|
|
901
|
+
cursor: pointer;
|
|
902
|
+
font-family: ${u.font.sans};
|
|
903
|
+
font-weight: 600;
|
|
904
|
+
font-size: 15px;
|
|
905
|
+
line-height: 24px;
|
|
906
|
+
letter-spacing: 0.46px;
|
|
907
|
+
text-transform: uppercase;
|
|
908
|
+
|
|
909
|
+
&:hover:not(:disabled) {
|
|
910
|
+
background: rgba(36, 33, 41, 0.06);
|
|
911
|
+
}
|
|
912
|
+
&:focus-visible {
|
|
913
|
+
outline: 2px solid ${u.colors.accent};
|
|
914
|
+
outline-offset: 2px;
|
|
915
|
+
}
|
|
916
|
+
&:disabled {
|
|
917
|
+
opacity: 0.5;
|
|
918
|
+
cursor: default;
|
|
919
|
+
}
|
|
920
|
+
`,hs=g.button`
|
|
921
|
+
flex: 1;
|
|
922
|
+
display: inline-flex;
|
|
923
|
+
align-items: center;
|
|
924
|
+
justify-content: center;
|
|
925
|
+
gap: 8px;
|
|
926
|
+
height: 48px;
|
|
927
|
+
border: 0;
|
|
928
|
+
border-radius: 16px;
|
|
929
|
+
background: ${u.colors.blackBtn};
|
|
930
|
+
color: ${u.colors.softWhite};
|
|
931
|
+
cursor: pointer;
|
|
932
|
+
font-family: ${u.font.sans};
|
|
933
|
+
font-weight: 600;
|
|
934
|
+
font-size: 15px;
|
|
935
|
+
line-height: 24px;
|
|
936
|
+
letter-spacing: 0.46px;
|
|
937
|
+
text-transform: uppercase;
|
|
938
|
+
|
|
939
|
+
&:hover:not(:disabled) {
|
|
940
|
+
filter: brightness(1.35);
|
|
941
|
+
}
|
|
942
|
+
&:focus-visible {
|
|
943
|
+
outline: 2px solid ${u.colors.accent};
|
|
944
|
+
outline-offset: 2px;
|
|
945
|
+
}
|
|
946
|
+
&:disabled {
|
|
947
|
+
opacity: 0.55;
|
|
948
|
+
cursor: default;
|
|
949
|
+
}
|
|
950
|
+
`,jy=g.div`
|
|
951
|
+
display: flex;
|
|
952
|
+
flex-direction: column;
|
|
953
|
+
align-items: center;
|
|
954
|
+
gap: 16px;
|
|
955
|
+
padding: 24px 16px;
|
|
956
|
+
border-radius: 16px;
|
|
957
|
+
background: rgba(193, 238, 207, 0.5);
|
|
958
|
+
text-align: center;
|
|
959
|
+
`,Iy=g.div`
|
|
960
|
+
display: grid;
|
|
961
|
+
place-items: center;
|
|
962
|
+
width: 64px;
|
|
963
|
+
height: 64px;
|
|
964
|
+
border-radius: 50%;
|
|
965
|
+
background: ${u.colors.ok};
|
|
966
|
+
color: ${u.colors.white};
|
|
967
|
+
|
|
968
|
+
.ico {
|
|
969
|
+
width: 34px;
|
|
970
|
+
height: 34px;
|
|
971
|
+
}
|
|
972
|
+
`,Py=g.p`
|
|
973
|
+
margin: 0;
|
|
974
|
+
font-family: ${u.font.sans};
|
|
975
|
+
font-size: 16px;
|
|
976
|
+
line-height: 1.34;
|
|
977
|
+
color: ${u.colors.text2};
|
|
978
|
+
|
|
979
|
+
b {
|
|
980
|
+
font-weight: 700;
|
|
981
|
+
}
|
|
982
|
+
`;function Ey(n){return/^0x[a-fA-F0-9]{40}$/.test(n.trim())}function Ty({item:n,session:a,onClose:t,onTransferred:e}){const[r,o]=v.useState(""),[i,c]=v.useState(!1),[l,p]=v.useState(null),[d,m]=v.useState(!1),x=r.trim(),y=Ey(x),b=y&&x.toLowerCase()===a.address.toLowerCase(),w=x.length===0?null:y?b?h("transfer.selfAddress"):null:h("transfer.invalidAddress"),k=y&&!b&&!i;async function f(){if(k){p(null),c(!0);try{await rp({contractAddress:n.contractAddress,chainId:n.chainId,tokenId:n.tokenId,to:x,signer:a.signer}),pe("Shop Transferred Item",{contract_address:n.contractAddress,token_id:n.tokenId}),m(!0),Zn.success(h("transfer.toastSuccess",{name:n.name})),e==null||e()}catch(S){Dn(S)||Se(S,{flow:"transfer-item",tokenId:n.tokenId}),pe("Shop Transfer Failed",{error_code:Qe(S)}),p(Dn(S)?h("getCredits.errorCanceled"):nn(S,h("transfer.errorGeneric")))}finally{c(!1)}}}return s.jsx(hy,{onClick:i?void 0:t,role:"presentation",children:s.jsxs(my,{onClick:S=>S.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":h("transfer.title"),children:[s.jsx(gy,{children:s.jsxs(xy,{children:[s.jsx(yy,{children:h("transfer.title")}),s.jsx(by,{onClick:t,disabled:i,"aria-label":h("sellModal.cancel"),children:s.jsx(V,{name:"close",className:"ico"})})]})}),d?s.jsxs(s.Fragment,{children:[s.jsxs(jy,{children:[s.jsx(Iy,{"aria-hidden":!0,children:s.jsx(V,{name:"check",className:"ico"})}),s.jsx(Py,{children:h("transfer.successBody",{name:n.name})})]}),s.jsx(fs,{children:s.jsx(hs,{onClick:t,children:h("getCredits.done")})})]}):s.jsxs(s.Fragment,{children:[s.jsxs(vy,{children:[n.thumbnail?s.jsx(wy,{src:n.thumbnail,alt:""}):null,s.jsx(ky,{children:n.name})]}),s.jsxs(Dy,{children:[s.jsx(Cy,{children:h("transfer.addressLabel")}),s.jsx(Sy,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:r,onChange:S=>o(S.target.value),disabled:i,"aria-invalid":!!w,"aria-label":h("transfer.addressLabel")}),w?s.jsx(Lt,{message:w}):null]}),s.jsx(My,{children:h("transfer.warning")}),s.jsx(Lt,{message:l}),s.jsxs(fs,{children:[s.jsx(_y,{onClick:t,disabled:i,children:h("sellModal.cancel")}),s.jsx(hs,{onClick:()=>void f(),disabled:!k,children:i?h("transfer.transferring"):h("transfer.transfer")})]})]})]})})}const ms=g.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
|
+
`,gs=g.div`
|
|
992
|
+
width: 560px;
|
|
993
|
+
max-width: 100%;
|
|
994
|
+
max-height: 92vh;
|
|
995
|
+
overflow-y: auto;
|
|
996
|
+
background: ${u.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
|
+
`,xs=g.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 ${u.colors.gray4};
|
|
1010
|
+
`,ys=g.h2`
|
|
1011
|
+
margin: 0;
|
|
1012
|
+
font-family: ${u.font.sans};
|
|
1013
|
+
font-weight: 600;
|
|
1014
|
+
font-size: 20px;
|
|
1015
|
+
line-height: 1.6;
|
|
1016
|
+
color: ${u.colors.text};
|
|
1017
|
+
`,bs=g.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: ${u.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 ${u.colors.accent};
|
|
1038
|
+
outline-offset: 2px;
|
|
1039
|
+
}
|
|
1040
|
+
`,$y=g.p`
|
|
1041
|
+
margin: 0;
|
|
1042
|
+
font-family: ${u.font.sans};
|
|
1043
|
+
font-size: 14px;
|
|
1044
|
+
line-height: 1.57;
|
|
1045
|
+
color: ${u.colors.text};
|
|
1046
|
+
text-align: left;
|
|
1047
|
+
`,Ny=g.div`
|
|
1048
|
+
display: flex;
|
|
1049
|
+
align-items: center;
|
|
1050
|
+
gap: 12px;
|
|
1051
|
+
`,Oy=g.div`
|
|
1052
|
+
flex: none;
|
|
1053
|
+
display: grid;
|
|
1054
|
+
place-items: center;
|
|
1055
|
+
width: 180px;
|
|
1056
|
+
height: 180px;
|
|
1057
|
+
border-radius: 16px;
|
|
1058
|
+
background: ${u.colors.media};
|
|
1059
|
+
border: 1px solid ${u.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
|
+
${u.media.maxWidth("mobile")} {
|
|
1070
|
+
width: 120px;
|
|
1071
|
+
height: 120px;
|
|
1072
|
+
|
|
1073
|
+
img {
|
|
1074
|
+
width: 100px;
|
|
1075
|
+
height: 100px;
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
`,Ry=g.div`
|
|
1079
|
+
flex: 1 1 0;
|
|
1080
|
+
min-width: 0;
|
|
1081
|
+
display: flex;
|
|
1082
|
+
flex-direction: column;
|
|
1083
|
+
gap: 4px;
|
|
1084
|
+
padding: 8px;
|
|
1085
|
+
`,Ay=g.p`
|
|
1086
|
+
margin: 0;
|
|
1087
|
+
font-family: ${u.font.sans};
|
|
1088
|
+
font-weight: 600;
|
|
1089
|
+
font-size: 20px;
|
|
1090
|
+
line-height: 1.57;
|
|
1091
|
+
color: ${u.colors.text};
|
|
1092
|
+
`,Ly=g.p`
|
|
1093
|
+
margin: 0;
|
|
1094
|
+
font-family: ${u.font.sans};
|
|
1095
|
+
font-size: 10px;
|
|
1096
|
+
line-height: 1.43;
|
|
1097
|
+
color: ${u.colors.muted};
|
|
1098
|
+
`,Fy=g.label`
|
|
1099
|
+
display: flex;
|
|
1100
|
+
flex-direction: column;
|
|
1101
|
+
gap: 4px;
|
|
1102
|
+
`,Yy=g.span`
|
|
1103
|
+
font-family: ${u.font.sans};
|
|
1104
|
+
font-size: 12px;
|
|
1105
|
+
color: ${u.colors.muted};
|
|
1106
|
+
`,Wy=g.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 ${u.colors.text};
|
|
1114
|
+
border-radius: 8px;
|
|
1115
|
+
background: ${u.colors.white};
|
|
1116
|
+
|
|
1117
|
+
&:focus-within {
|
|
1118
|
+
border-color: ${u.colors.magenta};
|
|
1119
|
+
}
|
|
1120
|
+
&[aria-invalid='true'] {
|
|
1121
|
+
border-color: ${u.colors.err};
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
.ccy {
|
|
1125
|
+
flex: none;
|
|
1126
|
+
width: 22px;
|
|
1127
|
+
height: 22px;
|
|
1128
|
+
color: ${u.colors.rarity};
|
|
1129
|
+
}
|
|
1130
|
+
`,By=g.input`
|
|
1131
|
+
flex: 1 1 auto;
|
|
1132
|
+
min-width: 0;
|
|
1133
|
+
border: 0;
|
|
1134
|
+
outline: none;
|
|
1135
|
+
background: transparent;
|
|
1136
|
+
font-family: ${u.font.sans};
|
|
1137
|
+
font-size: 13px;
|
|
1138
|
+
color: ${u.colors.text};
|
|
1139
|
+
|
|
1140
|
+
&::placeholder {
|
|
1141
|
+
color: ${u.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
|
+
`,Hy=g.span`
|
|
1154
|
+
flex: none;
|
|
1155
|
+
font-family: ${u.font.sans};
|
|
1156
|
+
font-size: 10px;
|
|
1157
|
+
color: ${u.colors.muted2};
|
|
1158
|
+
`,Ea=g.p`
|
|
1159
|
+
margin: 0;
|
|
1160
|
+
font-family: ${u.font.sans};
|
|
1161
|
+
font-size: 12px;
|
|
1162
|
+
line-height: 1.5;
|
|
1163
|
+
color: ${u.colors.muted};
|
|
1164
|
+
`,zy=g.button`
|
|
1165
|
+
width: 100%;
|
|
1166
|
+
height: 48px;
|
|
1167
|
+
border: 0;
|
|
1168
|
+
border-radius: 16px;
|
|
1169
|
+
cursor: pointer;
|
|
1170
|
+
background: ${u.colors.accent};
|
|
1171
|
+
color: ${u.colors.white};
|
|
1172
|
+
font-family: ${u.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: ${u.colors.accentHover};
|
|
1181
|
+
}
|
|
1182
|
+
&:focus-visible {
|
|
1183
|
+
outline: 2px solid ${u.colors.accent};
|
|
1184
|
+
outline-offset: 2px;
|
|
1185
|
+
}
|
|
1186
|
+
&:disabled {
|
|
1187
|
+
cursor: not-allowed;
|
|
1188
|
+
background: rgba(105, 31, 169, 0.2);
|
|
1189
|
+
color: ${u.colors.white};
|
|
1190
|
+
}
|
|
1191
|
+
`,qy=g.p`
|
|
1192
|
+
margin: 0;
|
|
1193
|
+
font-family: ${u.font.sans};
|
|
1194
|
+
font-size: 13px;
|
|
1195
|
+
color: ${u.colors.muted};
|
|
1196
|
+
text-align: center;
|
|
1197
|
+
`,Ky=g.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
|
+
`,Qy=g.div`
|
|
1207
|
+
display: grid;
|
|
1208
|
+
place-items: center;
|
|
1209
|
+
width: 64px;
|
|
1210
|
+
height: 64px;
|
|
1211
|
+
border-radius: 50%;
|
|
1212
|
+
background: ${u.colors.ok};
|
|
1213
|
+
color: ${u.colors.white};
|
|
1214
|
+
|
|
1215
|
+
.ico {
|
|
1216
|
+
width: 34px;
|
|
1217
|
+
height: 34px;
|
|
1218
|
+
}
|
|
1219
|
+
`,Vy=g.p`
|
|
1220
|
+
margin: 0;
|
|
1221
|
+
font-family: ${u.font.sans};
|
|
1222
|
+
font-size: 20px;
|
|
1223
|
+
line-height: 1.334;
|
|
1224
|
+
color: ${u.colors.text2};
|
|
1225
|
+
|
|
1226
|
+
b {
|
|
1227
|
+
font-weight: 700;
|
|
1228
|
+
}
|
|
1229
|
+
`,Uy=g.p`
|
|
1230
|
+
margin: 0;
|
|
1231
|
+
display: inline-flex;
|
|
1232
|
+
align-items: center;
|
|
1233
|
+
gap: 4px;
|
|
1234
|
+
font-family: ${u.font.sans};
|
|
1235
|
+
font-size: 14px;
|
|
1236
|
+
line-height: 1.43;
|
|
1237
|
+
color: ${u.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: ${u.colors.rarity};
|
|
1249
|
+
}
|
|
1250
|
+
`,Gy=g.div`
|
|
1251
|
+
display: flex;
|
|
1252
|
+
gap: 12px;
|
|
1253
|
+
|
|
1254
|
+
${u.media.maxWidth("mobile")} {
|
|
1255
|
+
flex-direction: column-reverse;
|
|
1256
|
+
}
|
|
1257
|
+
`,Xy=g.button`
|
|
1258
|
+
flex: 1 1 0;
|
|
1259
|
+
height: 48px;
|
|
1260
|
+
border: 2px solid ${u.colors.accent};
|
|
1261
|
+
border-radius: 12px;
|
|
1262
|
+
background: transparent;
|
|
1263
|
+
color: ${u.colors.accent};
|
|
1264
|
+
cursor: pointer;
|
|
1265
|
+
font-family: ${u.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 ${u.colors.accent};
|
|
1277
|
+
outline-offset: 2px;
|
|
1278
|
+
}
|
|
1279
|
+
`,Jy=g.button`
|
|
1280
|
+
flex: 1 1 0;
|
|
1281
|
+
height: 48px;
|
|
1282
|
+
border: 0;
|
|
1283
|
+
border-radius: 12px;
|
|
1284
|
+
background: ${u.colors.accent};
|
|
1285
|
+
color: ${u.colors.softWhite};
|
|
1286
|
+
cursor: pointer;
|
|
1287
|
+
font-family: ${u.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: ${u.colors.accentHover};
|
|
1296
|
+
}
|
|
1297
|
+
&:focus-visible {
|
|
1298
|
+
outline: 2px solid ${u.colors.accent};
|
|
1299
|
+
outline-offset: 2px;
|
|
1300
|
+
}
|
|
1301
|
+
`,Zy=1e3*60*60*24*182;function eb({item:n,session:a,onListed:t,onClose:e}){const r=ln(),o=cn(),[i,c]=v.useState("10"),[l,p]=v.useState(null),[d,m]=v.useState(null),[x,y]=v.useState(!1),[b,w]=v.useState(null),[k,f]=v.useState(null),S=At.chainId,E=ia(a),{data:T}=Vr(a.address),$=T!=null&&T.name?Ur(T.name):Za(a.address),O=Number(i),C=Number.isInteger(O)&&O>0,D=C?`$${Gt(O).toFixed(2)}`:"$0";v.useEffect(()=>{let A=!1;return(async()=>{try{const K=await ap({contractAddress:n.contractAddress,chainId:S});A||w(K)}catch{A||w(!1)}})(),()=>{A=!0}},[n.contractAddress,S]);async function I(){m(null);const A=Number(i);if(!Number.isInteger(A)||A<=0){m(h("primaryList.errorWholeNumber"));return}y(!0);try{b||(p(h("primaryList.statusEnabling")),await op({signer:a.signer,contractAddress:n.contractAddress,chainId:S}),w(!0)),p(h("primaryList.statusPublishing"));const K=await ip({signer:a.signer,item:{contractAddress:n.contractAddress,itemId:n.blockchainItemId,network:st.Network.MATIC,chainId:S},usdPrice:Gt(A),uses:n.remainingSupply,expiresAtMs:Date.now()+Zy});p(h("primaryList.statusFinishing")),await uc(K,a.identity),p(null),f(A),pe("Shop Listed Item",{item_id:n.blockchainItemId,contract_address:n.contractAddress,price_credits:A,price_usd:Gt(A),listing_type:"primary",is_primary:!0}),Zn.success(h("primaryList.toastOnSale",{name:n.name})),t==null||t(A),r.invalidateQueries({queryKey:["publishable-items"]}),r.invalidateQueries({queryKey:["collection-sale-state"]}),r.invalidateQueries({queryKey:["shop-items"]}),r.invalidateQueries({queryKey:["catalog-items"]}),r.invalidateQueries({queryKey:["overview-listings"]}),r.invalidateQueries({queryKey:["upsell-listings"]})}catch(K){Se(K,{flow:"list_primary"}),pe("Shop Listing Failed",{listing_type:"primary",error_code:Qe(K)}),m(nn(K,h("primaryList.errorGeneric"))),p(null)}finally{y(!1)}}function L(){e(),o(pd(n.contractAddress,n.blockchainItemId))}const z=b===null?h("primaryList.checking"):x?E?h("primaryList.publishing"):h("primaryList.confirmListing"):b===!1?h("primaryList.enableAndPutOnSale"):h("primaryList.putOnSale");return k!==null?s.jsx(ms,{onClick:e,role:"presentation",children:s.jsxs(gs,{onClick:A=>A.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":h("primaryList.successTitle"),children:[s.jsxs(xs,{children:[s.jsx(ys,{children:h("primaryList.successTitle")}),s.jsx(bs,{onClick:e,"aria-label":h("getCredits.done"),children:s.jsx(V,{name:"close",className:"ico"})})]}),s.jsxs(Ky,{children:[s.jsx(Qy,{"aria-hidden":!0,children:s.jsx(V,{name:"check",className:"ico"})}),s.jsx(Vy,{children:s.jsx("b",{children:n.name})}),s.jsxs(Uy,{children:[h("primaryList.listedFor")," ",s.jsxs("strong",{children:[s.jsx(Re,{className:"ccy-mark"})," ",s.jsx($e,{credits:k})]})," ",h("primaryList.dotAvailable",{count:n.remainingSupply})]})]}),s.jsxs(Gy,{children:[s.jsx(Xy,{onClick:e,children:h("getCredits.done")}),s.jsx(Jy,{onClick:L,children:h("primaryList.viewInShop")})]})]})}):s.jsx(ms,{onClick:x?void 0:e,role:"presentation",children:s.jsxs(gs,{"data-testid":"modal",onClick:A=>A.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":h("primaryList.publishTitle",{name:n.name}),children:[s.jsxs(xs,{children:[s.jsx(ys,{children:h("primaryList.publishTitle",{name:n.name})}),s.jsx(bs,{onClick:e,disabled:x,"aria-label":h("primaryList.cancel"),children:s.jsx(V,{name:"close",className:"ico"})})]}),s.jsx($y,{children:h("primaryList.fromCollection",{collectionName:n.collectionName,count:n.remainingSupply})}),s.jsxs(Ny,{children:[s.jsx(Oy,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsxs(Ry,{children:[s.jsx(Ay,{children:n.name}),$?s.jsx(Ly,{children:h("primaryList.byCreator",{name:$})}):null]})]}),s.jsxs(Fy,{children:[s.jsx(Yy,{children:h("primaryList.priceShort")}),s.jsxs(Wy,{"aria-invalid":i.length>0&&!C,children:[s.jsx(Re,{className:"ccy"}),s.jsx(By,{type:"number",min:"1",step:"1",inputMode:"numeric",value:i,onChange:A=>c(A.target.value),disabled:x,"aria-label":h("primaryList.priceLabel",{currency:Ue.name})}),s.jsx(Hy,{"aria-hidden":!0,children:D})]})]}),s.jsx(Ea,{children:h("primaryList.pricedInWhole",{currency:Ue.name,currencySingular:Ue.nameSingular})}),b===!1&&!x?s.jsx(Ea,{children:E?h("primaryList.firstTimeManaged",{collectionName:n.collectionName}):h("primaryList.firstTimeConfirm",{collectionName:n.collectionName})}):b===!0&&!x?s.jsx(Ea,{children:E?h("primaryList.readyManaged"):h("primaryList.readyConfirm")}):null,l?s.jsx(qy,{children:l}):null,s.jsx(Lt,{message:d}),s.jsx(zy,{onClick:()=>void I(),disabled:x||b===null||!C,children:z})]})})}const dl=["function issueTokens(address[] _beneficiaries, uint256[] _itemIds)"];function ul(n){return/^0x[a-fA-F0-9]{40}$/.test(n.trim())}function pl(n){return n.reduce((a,t)=>a+Math.max(0,Math.floor(t.amount||0)),0)}function tb(n,a){const t=n.filter(r=>r.address.trim().length>0||(r.amount||0)>0);if(t.length===0)return!1;for(const r of t)if(!ul(r.address)||!Number.isInteger(r.amount)||r.amount<1)return!1;const e=pl(t);return e>=1&&e<=a}function nb(n,a){const t=[],e=[];for(const r of n){const o=r.address.trim(),i=Math.max(0,Math.floor(r.amount||0));if(!(!o||i===0))for(let c=0;c<i;c++)t.push(o),e.push(a)}return{beneficiaries:t,itemIds:e}}async function rb(n){const{contractAddress:a,chainId:t,beneficiaries:e,itemIds:r,signer:o}=n,i={...hd(md.ERC721CollectionV2,t),address:a},c=new Mp(dl).encodeFunctionData("issueTokens",[e,r]),l=vp(),p=wp(o.provider,l),d=await Rp(p,l,c,i,{serverURL:wc.relayerUrl});return await kp(d,"the mint"),d}async function ab(n){const{signer:a,contractAddress:t,chainId:e,entries:r,itemId:o}=n,{beneficiaries:i,itemIds:c}=nb(r,o);if(i.length===0)throw new Error("No copies to issue");if(wc.enabled)try{return await rb({contractAddress:t,chainId:e,beneficiaries:i,itemIds:c,signer:a})}catch(m){if(m instanceof Np&&m.code===Op.USER_DENIED||m instanceof bp)throw m;console.warn("[issue] gasless meta-tx failed, falling back to a direct tx:",m)}return await fd(a.provider,e),(await(await new Sp(t,dl,a).issueTokens(i,c,sp(e))).wait()).transactionHash}const ob=g.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
|
+
`,ib=g.div`
|
|
1311
|
+
width: 560px;
|
|
1312
|
+
max-width: 100%;
|
|
1313
|
+
max-height: 92vh;
|
|
1314
|
+
overflow-y: auto;
|
|
1315
|
+
background: ${u.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
|
+
`,sb=g.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 ${u.colors.gray4};
|
|
1329
|
+
`,cb=g.h2`
|
|
1330
|
+
margin: 0;
|
|
1331
|
+
font-family: ${u.font.sans};
|
|
1332
|
+
font-weight: 600;
|
|
1333
|
+
font-size: 20px;
|
|
1334
|
+
line-height: 1.6;
|
|
1335
|
+
color: ${u.colors.text};
|
|
1336
|
+
`,lb=g.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: ${u.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 ${u.colors.accent};
|
|
1357
|
+
outline-offset: 2px;
|
|
1358
|
+
}
|
|
1359
|
+
`,db=g.p`
|
|
1360
|
+
margin: 0;
|
|
1361
|
+
font-family: ${u.font.sans};
|
|
1362
|
+
font-size: 14px;
|
|
1363
|
+
line-height: 1.57;
|
|
1364
|
+
color: ${u.colors.text};
|
|
1365
|
+
text-align: left;
|
|
1366
|
+
`,ub=g.div`
|
|
1367
|
+
display: flex;
|
|
1368
|
+
align-items: center;
|
|
1369
|
+
gap: 12px;
|
|
1370
|
+
`,pb=g.div`
|
|
1371
|
+
flex: none;
|
|
1372
|
+
display: grid;
|
|
1373
|
+
place-items: center;
|
|
1374
|
+
width: 56px;
|
|
1375
|
+
height: 56px;
|
|
1376
|
+
border-radius: 12px;
|
|
1377
|
+
background: ${u.colors.media};
|
|
1378
|
+
border: 1px solid ${u.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
|
+
`,fb=g.p`
|
|
1388
|
+
margin: 0;
|
|
1389
|
+
font-family: ${u.font.sans};
|
|
1390
|
+
font-weight: 600;
|
|
1391
|
+
font-size: 16px;
|
|
1392
|
+
line-height: 1.4;
|
|
1393
|
+
color: ${u.colors.text};
|
|
1394
|
+
`,hb=g.div`
|
|
1395
|
+
display: flex;
|
|
1396
|
+
flex-direction: column;
|
|
1397
|
+
gap: 10px;
|
|
1398
|
+
`,mb=g.div`
|
|
1399
|
+
display: flex;
|
|
1400
|
+
align-items: flex-start;
|
|
1401
|
+
gap: 8px;
|
|
1402
|
+
`,gb=g.label`
|
|
1403
|
+
flex: 1 1 auto;
|
|
1404
|
+
min-width: 0;
|
|
1405
|
+
display: flex;
|
|
1406
|
+
flex-direction: column;
|
|
1407
|
+
gap: 4px;
|
|
1408
|
+
`,xb=g.label`
|
|
1409
|
+
flex: none;
|
|
1410
|
+
width: 96px;
|
|
1411
|
+
display: flex;
|
|
1412
|
+
flex-direction: column;
|
|
1413
|
+
gap: 4px;
|
|
1414
|
+
`,vs=g.span`
|
|
1415
|
+
font-family: ${u.font.sans};
|
|
1416
|
+
font-size: 12px;
|
|
1417
|
+
color: ${u.colors.muted};
|
|
1418
|
+
`,ws=g.input`
|
|
1419
|
+
height: 42px;
|
|
1420
|
+
padding: 0 10px;
|
|
1421
|
+
border: 0.5px solid ${u.colors.text};
|
|
1422
|
+
border-radius: 8px;
|
|
1423
|
+
background: ${u.colors.white};
|
|
1424
|
+
font-family: ${u.font.sans};
|
|
1425
|
+
font-size: 13px;
|
|
1426
|
+
color: ${u.colors.text};
|
|
1427
|
+
outline: none;
|
|
1428
|
+
|
|
1429
|
+
&::placeholder {
|
|
1430
|
+
color: ${u.colors.muted2};
|
|
1431
|
+
}
|
|
1432
|
+
&:focus {
|
|
1433
|
+
border-color: ${u.colors.magenta};
|
|
1434
|
+
}
|
|
1435
|
+
&[aria-invalid='true'] {
|
|
1436
|
+
border-color: ${u.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
|
+
`,yb=g.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 ${u.colors.gray4};
|
|
1456
|
+
border-radius: 8px;
|
|
1457
|
+
background: ${u.colors.white};
|
|
1458
|
+
color: ${u.colors.muted};
|
|
1459
|
+
cursor: pointer;
|
|
1460
|
+
|
|
1461
|
+
.ico {
|
|
1462
|
+
width: 16px;
|
|
1463
|
+
height: 16px;
|
|
1464
|
+
}
|
|
1465
|
+
&:hover:not(:disabled) {
|
|
1466
|
+
color: ${u.colors.err};
|
|
1467
|
+
border-color: ${u.colors.err};
|
|
1468
|
+
}
|
|
1469
|
+
&:disabled {
|
|
1470
|
+
opacity: 0.35;
|
|
1471
|
+
cursor: default;
|
|
1472
|
+
}
|
|
1473
|
+
&:focus-visible {
|
|
1474
|
+
outline: 2px solid ${u.colors.accent};
|
|
1475
|
+
outline-offset: 2px;
|
|
1476
|
+
}
|
|
1477
|
+
`,bb=g.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: ${u.font.sans};
|
|
1487
|
+
font-weight: 600;
|
|
1488
|
+
font-size: 13px;
|
|
1489
|
+
color: ${u.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 ${u.colors.accent};
|
|
1501
|
+
outline-offset: 2px;
|
|
1502
|
+
}
|
|
1503
|
+
`,vb=g.p`
|
|
1504
|
+
margin: 0;
|
|
1505
|
+
font-family: ${u.font.sans};
|
|
1506
|
+
font-size: 13px;
|
|
1507
|
+
line-height: 1.5;
|
|
1508
|
+
color: ${n=>n.over?u.colors.err:u.colors.text};
|
|
1509
|
+
|
|
1510
|
+
strong {
|
|
1511
|
+
font-weight: 700;
|
|
1512
|
+
}
|
|
1513
|
+
`,wb=g.p`
|
|
1514
|
+
margin: 0;
|
|
1515
|
+
font-family: ${u.font.sans};
|
|
1516
|
+
font-size: 12px;
|
|
1517
|
+
line-height: 1.5;
|
|
1518
|
+
color: ${u.colors.muted};
|
|
1519
|
+
`;g.p`
|
|
1520
|
+
margin: 0;
|
|
1521
|
+
font-family: ${u.font.sans};
|
|
1522
|
+
font-size: 13px;
|
|
1523
|
+
color: ${u.colors.muted};
|
|
1524
|
+
text-align: center;
|
|
1525
|
+
`;const kb=g.p`
|
|
1526
|
+
margin: 0;
|
|
1527
|
+
font-family: ${u.font.sans};
|
|
1528
|
+
font-size: 11px;
|
|
1529
|
+
color: ${u.colors.err};
|
|
1530
|
+
`,ks=g.div`
|
|
1531
|
+
display: flex;
|
|
1532
|
+
gap: 12px;
|
|
1533
|
+
|
|
1534
|
+
${u.media.maxWidth("mobile")} {
|
|
1535
|
+
flex-direction: column-reverse;
|
|
1536
|
+
}
|
|
1537
|
+
`,Db=g.button`
|
|
1538
|
+
flex: 1 1 0;
|
|
1539
|
+
height: 48px;
|
|
1540
|
+
border: 2px solid ${u.colors.accent};
|
|
1541
|
+
border-radius: 12px;
|
|
1542
|
+
background: transparent;
|
|
1543
|
+
color: ${u.colors.accent};
|
|
1544
|
+
cursor: pointer;
|
|
1545
|
+
font-family: ${u.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 ${u.colors.accent};
|
|
1561
|
+
outline-offset: 2px;
|
|
1562
|
+
}
|
|
1563
|
+
`,Ds=g.button`
|
|
1564
|
+
flex: 1 1 0;
|
|
1565
|
+
height: 48px;
|
|
1566
|
+
border: 0;
|
|
1567
|
+
border-radius: 12px;
|
|
1568
|
+
cursor: pointer;
|
|
1569
|
+
background: ${u.colors.accent};
|
|
1570
|
+
color: ${u.colors.white};
|
|
1571
|
+
font-family: ${u.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: ${u.colors.accentHover};
|
|
1580
|
+
}
|
|
1581
|
+
&:focus-visible {
|
|
1582
|
+
outline: 2px solid ${u.colors.accent};
|
|
1583
|
+
outline-offset: 2px;
|
|
1584
|
+
}
|
|
1585
|
+
&:disabled {
|
|
1586
|
+
cursor: not-allowed;
|
|
1587
|
+
background: rgba(105, 31, 169, 0.2);
|
|
1588
|
+
color: ${u.colors.white};
|
|
1589
|
+
}
|
|
1590
|
+
`,Cb=g.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
|
+
`,Sb=g.div`
|
|
1600
|
+
display: grid;
|
|
1601
|
+
place-items: center;
|
|
1602
|
+
width: 64px;
|
|
1603
|
+
height: 64px;
|
|
1604
|
+
border-radius: 50%;
|
|
1605
|
+
background: ${u.colors.ok};
|
|
1606
|
+
color: ${u.colors.white};
|
|
1607
|
+
|
|
1608
|
+
.ico {
|
|
1609
|
+
width: 34px;
|
|
1610
|
+
height: 34px;
|
|
1611
|
+
}
|
|
1612
|
+
`,Mb=g.p`
|
|
1613
|
+
margin: 0;
|
|
1614
|
+
font-family: ${u.font.sans};
|
|
1615
|
+
font-size: 20px;
|
|
1616
|
+
line-height: 1.334;
|
|
1617
|
+
color: ${u.colors.text2};
|
|
1618
|
+
|
|
1619
|
+
b {
|
|
1620
|
+
font-weight: 700;
|
|
1621
|
+
}
|
|
1622
|
+
`;function _b(n){return n.map(a=>({address:a.address,amount:Number(a.amount)}))}function jb({item:n,session:a,onClose:t,onIssued:e}){const r=ln(),[o,i]=v.useState([{address:"",amount:"1"}]),[c,l]=v.useState(!1),[p,d]=v.useState(null),[m,x]=v.useState(null),y=v.useRef(null),b=ia(a),w=_b(o),k=pl(w),f=tb(w,n.available),S=k>n.available;v.useEffect(()=>{var I;(I=y.current)==null||I.focus();function D(L){L.key==="Escape"&&!c&&t()}return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[c,t]);function E(D,I){i(L=>L.map((z,A)=>A===D?{...z,...I}:z))}function T(){i(D=>[...D,{address:"",amount:"1"}])}function $(D){i(I=>I.length<=1?I:I.filter((L,z)=>z!==D))}async function O(){if(!(!f||c)){d(null),l(!0);try{await ab({signer:a.signer,contractAddress:n.contractAddress,chainId:n.chainId,entries:w,itemId:n.itemId}),pe("Shop Issued Item",{contract_address:n.contractAddress,item_id:n.itemId,recipients:w.filter(D=>D.address.trim().length>0).length,copies:k}),x(k),Zn.success(h("issue.toastSuccess",{count:k,name:n.name})),r.invalidateQueries({queryKey:["publishable-item"]}),r.invalidateQueries({queryKey:["publishable-items"]}),e==null||e()}catch(D){Dn(D)||Se(D,{flow:"issue-item",itemId:n.itemId}),pe("Shop Issue Failed",{error_code:Qe(D)}),d(Dn(D)?h("getCredits.errorCanceled"):nn(D,h("issue.errorGeneric")))}finally{l(!1)}}}const C=c?b?h("issue.issuing"):h("issue.confirm"):k>0?h("issue.issueCount",{count:k}):h("issue.issue");return s.jsx(ob,{onClick:c?void 0:t,role:"presentation",children:s.jsxs(ib,{ref:y,tabIndex:-1,"data-testid":"issue-modal",onClick:D=>D.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":h("issue.title"),children:[s.jsxs(sb,{children:[s.jsx(cb,{children:h("issue.title")}),s.jsx(lb,{onClick:t,disabled:c,"aria-label":h("sellModal.cancel"),children:s.jsx(V,{name:"close",className:"ico"})})]}),m!==null?s.jsxs(s.Fragment,{children:[s.jsxs(Cb,{children:[s.jsx(Sb,{"aria-hidden":!0,children:s.jsx(V,{name:"check",className:"ico"})}),s.jsx(Mb,{children:h("issue.successBody",{count:m,name:n.name})})]}),s.jsx(ks,{children:s.jsx(Ds,{onClick:t,children:h("getCredits.done")})})]}):s.jsxs(s.Fragment,{children:[s.jsxs(ub,{children:[s.jsx(pb,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsx(fb,{children:n.name})]}),s.jsx(db,{children:h("issue.subtitle")}),s.jsx(hb,{children:o.map((D,I)=>{const L=D.address.trim(),z=L.length>0&&!ul(L),A=Number(D.amount),K=D.amount.length>0&&(!Number.isInteger(A)||A<1);return s.jsxs(mb,{children:[s.jsxs(gb,{children:[s.jsx(vs,{children:h("issue.addressLabel")}),s.jsx(ws,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:D.address,onChange:U=>E(I,{address:U.target.value}),disabled:c,"aria-invalid":z,"aria-label":h("issue.addressLabel")}),z?s.jsx(kb,{children:h("issue.invalidAddress")}):null]}),s.jsxs(xb,{children:[s.jsx(vs,{children:h("issue.amountLabel")}),s.jsx(ws,{type:"number",min:"1",step:"1",inputMode:"numeric",value:D.amount,onChange:U=>E(I,{amount:U.target.value}),disabled:c,"aria-invalid":K,"aria-label":h("issue.amountLabel")})]}),s.jsx(yb,{onClick:()=>$(I),disabled:c||o.length<=1,"aria-label":h("issue.removeRow"),children:s.jsx(V,{name:"close",className:"ico"})})]},I)})}),s.jsxs(bb,{onClick:T,disabled:c,children:[s.jsx(V,{name:"plus",className:"ico"}),h("issue.addRow")]}),s.jsxs(vb,{over:S,"aria-live":"polite",children:[s.jsx("strong",{children:k})," / ",n.available," ",h("issue.itemsToIssue")]}),S?s.jsx(wb,{children:h("issue.overCap",{available:n.available})}):null,s.jsx(Lt,{message:p}),s.jsxs(ks,{children:[s.jsx(Db,{onClick:t,disabled:c,children:h("sellModal.cancel")}),s.jsx(Ds,{onClick:()=>void O(),disabled:!f||c,children:C})]})]})]})})}const Ib=g.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
|
+
`,Pb=g.div`
|
|
1632
|
+
width: 760px;
|
|
1633
|
+
max-width: 100%;
|
|
1634
|
+
background: ${u.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
|
+
`,Eb=g.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 ${u.colors.gray4};
|
|
1648
|
+
`,Tb=g.h2`
|
|
1649
|
+
margin: 0;
|
|
1650
|
+
font-family: ${u.font.sans};
|
|
1651
|
+
font-weight: 600;
|
|
1652
|
+
font-size: 20px;
|
|
1653
|
+
line-height: 1.6;
|
|
1654
|
+
color: ${u.colors.text};
|
|
1655
|
+
`,$b=g.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: ${u.colors.text};
|
|
1665
|
+
|
|
1666
|
+
.ico {
|
|
1667
|
+
width: 18px;
|
|
1668
|
+
height: 18px;
|
|
1669
|
+
}
|
|
1670
|
+
&:focus-visible {
|
|
1671
|
+
outline: 2px solid ${u.colors.accent};
|
|
1672
|
+
outline-offset: 2px;
|
|
1673
|
+
}
|
|
1674
|
+
`,Nb=g.video`
|
|
1675
|
+
display: block;
|
|
1676
|
+
width: 100%;
|
|
1677
|
+
max-height: 70vh;
|
|
1678
|
+
border-radius: 12px;
|
|
1679
|
+
background: ${u.colors.blackBtn};
|
|
1680
|
+
`;function Ob({src:n,itemName:a,onClose:t}){const e=v.useRef(null);return v.useEffect(()=>{var o;(o=e.current)==null||o.focus();function r(i){i.key==="Escape"&&t()}return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[t]),s.jsx(Ib,{onClick:t,role:"presentation",children:s.jsxs(Pb,{ref:e,tabIndex:-1,onClick:r=>r.stopPropagation(),"data-testid":"modal",role:"dialog","aria-modal":"true","aria-label":h("itemDetail.showcaseTitle"),children:[s.jsxs(Eb,{children:[s.jsx(Tb,{children:a||h("itemDetail.showcaseTitle")}),s.jsx($b,{onClick:t,"aria-label":h("itemDetail.showcaseClose"),children:s.jsx(V,{name:"close",size:18})})]}),s.jsx(Nb,{src:n,"data-testid":"showcase-video",controls:!0,autoPlay:!0,muted:!0,playsInline:!0,preload:"auto"})]})})}const{colors:Ct,radius:Rb}=u,Ab=g.div`
|
|
1681
|
+
position: fixed;
|
|
1682
|
+
inset: 0;
|
|
1683
|
+
z-index: 60;
|
|
1684
|
+
display: grid;
|
|
1685
|
+
place-items: center;
|
|
1686
|
+
padding: 20px;
|
|
1687
|
+
`,Lb=g.div`
|
|
1688
|
+
position: absolute;
|
|
1689
|
+
inset: 0;
|
|
1690
|
+
background: rgba(22, 21, 24, 0.45);
|
|
1691
|
+
`,Fb=g.div`
|
|
1692
|
+
position: relative;
|
|
1693
|
+
z-index: 1;
|
|
1694
|
+
width: 100%;
|
|
1695
|
+
max-width: 420px;
|
|
1696
|
+
background: ${Ct.white};
|
|
1697
|
+
border-radius: ${Rb.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
|
+
`,Yb=g.div`
|
|
1702
|
+
display: flex;
|
|
1703
|
+
align-items: center;
|
|
1704
|
+
gap: 14px;
|
|
1705
|
+
margin-bottom: 18px;
|
|
1706
|
+
`,Wb=g.div`
|
|
1707
|
+
width: 64px;
|
|
1708
|
+
height: 64px;
|
|
1709
|
+
flex: none;
|
|
1710
|
+
border-radius: 12px;
|
|
1711
|
+
overflow: hidden;
|
|
1712
|
+
background: ${Ct.media};
|
|
1713
|
+
|
|
1714
|
+
& img {
|
|
1715
|
+
width: 100%;
|
|
1716
|
+
height: 100%;
|
|
1717
|
+
object-fit: contain;
|
|
1718
|
+
}
|
|
1719
|
+
`,Bb=g.div`
|
|
1720
|
+
font-weight: 700;
|
|
1721
|
+
font-size: 16px;
|
|
1722
|
+
color: ${Ct.text};
|
|
1723
|
+
margin-bottom: 6px;
|
|
1724
|
+
`,Hb=g.div`
|
|
1725
|
+
background: ${Ct.panel};
|
|
1726
|
+
border-radius: 14px;
|
|
1727
|
+
padding: 16px;
|
|
1728
|
+
margin-bottom: 14px;
|
|
1729
|
+
`,Cs=g.div`
|
|
1730
|
+
color: ${Ct.muted};
|
|
1731
|
+
font-size: 13px;
|
|
1732
|
+
font-weight: 600;
|
|
1733
|
+
margin-bottom: 6px;
|
|
1734
|
+
`,Ss=g.div`
|
|
1735
|
+
display: flex;
|
|
1736
|
+
align-items: center;
|
|
1737
|
+
gap: 8px;
|
|
1738
|
+
font-weight: 700;
|
|
1739
|
+
font-size: 24px;
|
|
1740
|
+
color: ${Ct.text};
|
|
1741
|
+
|
|
1742
|
+
&[data-approx] {
|
|
1743
|
+
color: ${Ct.text2};
|
|
1744
|
+
}
|
|
1745
|
+
`,zb=g.span`
|
|
1746
|
+
color: ${Ct.muted};
|
|
1747
|
+
`,Ms=g(Re)`
|
|
1748
|
+
width: 20px;
|
|
1749
|
+
height: 20px;
|
|
1750
|
+
color: ${Ct.text};
|
|
1751
|
+
`,_s=g.div`
|
|
1752
|
+
margin-top: 6px;
|
|
1753
|
+
font-size: 13px;
|
|
1754
|
+
`,qb=g.div`
|
|
1755
|
+
font-size: 13px;
|
|
1756
|
+
margin-bottom: 6px;
|
|
1757
|
+
`,fl=Pn`
|
|
1758
|
+
margin: 6px 0 0;
|
|
1759
|
+
font-size: 13px;
|
|
1760
|
+
`,Ta=g.p`
|
|
1761
|
+
${fl};
|
|
1762
|
+
`,Kb=g(Lt)`
|
|
1763
|
+
${fl};
|
|
1764
|
+
`,Qb=g.div`
|
|
1765
|
+
display: flex;
|
|
1766
|
+
gap: 10px;
|
|
1767
|
+
margin-top: 18px;
|
|
1768
|
+
`,js=g(In)`
|
|
1769
|
+
flex: 1;
|
|
1770
|
+
`;function $a(n){if(Dn(n))return h("errors.rejected");const a=(n.message??"").toLowerCase();return a.includes("insufficient")?h("marketCheckout.error.insufficient",{currency:Ue.name}):a.includes("not found")||a.includes("no active listing")||a.includes("404")?h("marketCheckout.error.soldOrRemoved"):a.includes("your own listing")?h("errors.cantBuyOwn"):h("marketCheckout.error.generic")}function Vb(n){return{id:n.tradeId,tradeId:n.tradeId,name:n.name,creator:n.creator,contractAddress:n.contractAddress,itemId:n.itemId,category:n.category,wearableCategory:n.wearableCategory??void 0,rarity:n.rarity,network:n.network,chainId:n.chainId,thumbnail:n.thumbnail,priceCredits:0,gender:null,isSmart:!1}}function hl({listing:n,rate:a,onClose:t,onSold:e}){const{session:r}=tn(),{data:o,isError:i}=lc(r),c=ln(),l=cn(),[p,d]=v.useState("confirm"),[m,x]=v.useState(h("marketCheckout.checkingListing")),[y,b]=v.useState(null),[w,k]=v.useState(null),[f,S]=v.useState(null),[E,T]=v.useState(!1),$=v.useRef(null),O=v.useRef(!1),C=v.useRef(Rc());v.useEffect(()=>(O.current=!1,()=>{O.current=!0}),[]);const D=$t(ya(n.manaWei,a));v.useEffect(()=>{let q=!1;if(!r){d("error"),b(h("buyModal.signInToCheckout"));return}return(async()=>{try{const H=await hc(n.tradeId);if(!H)throw new Error("not found");if(xd(H,r.address))throw new Error("You can't buy your own listing.");const M=ya(n.manaWei,a);if(!Number.isFinite(M)||M<=0)throw new Error("price unavailable");if(q)return;k({trade:H,usdCents:M,credits:$t(M)}),x("")}catch(H){if(q)return;console.error("[market] listing check failed",H),pe(Ne(H)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Qe(H),value_usd:Math.round(ya(n.manaWei,a))/100}),d("error"),b($a(H))}})(),()=>{q=!0,$.current&&r&&(A([$.current]),$.current=null)}},[]);const I=!!w&&o!=null&&o.credits<w.credits;async function L(){if(!r||!w)return;if(I){pe("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:w.credits,credits_balance:(o==null?void 0:o.credits)??0,shortfall:Math.max(0,w.credits-((o==null?void 0:o.credits)??0))}),$.current&&(await z([$.current])&&S(null),$.current=null),l("/credits");return}d("working"),b(null),T(!1);let q=f;if(!q){x(h("marketCheckout.lockingPrice"));try{const{credit:Y,maxCreditedValue:J,usdCents:de}=await Ba(r.identity,w.usdCents,n.tradeId);if(O.current){z([Y.id]);return}$.current=Y.id,c.invalidateQueries({queryKey:["usd-balance"]});const Ee=$t(de);if(q={trade:w.trade,credit:Y,maxCreditedValue:J,usdCents:de,credits:Ee},S(q),Ee!==w.credits){k({trade:w.trade,usdCents:de,credits:Ee}),T(!0),x(""),d("confirm");return}}catch(Y){console.error("[market] authorize failed",Y),Ne(Y)||Se(Y,{flow:"market_buy_now",step:"authorize"}),pe(Ne(Y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Qe(Y),value_usd:w.usdCents/100}),x(""),b($a(Y)),d("error");return}}if(!q)return;const j=q;let H=!1,M;try{x(h("marketCheckout.confirming"));const Y={trade:j.trade,buyer:r.address,signer:r.signer,credits:[j.credit],maxCreditedValue:j.maxCreditedValue,onBroadcast:({txHash:J})=>C.current.broadcast(j.credit.id,J),onReverted:({txHash:J})=>{J&&C.current.reverted(J)}};if(C.current.submitStarted(j.credit.id),bc())try{M=await jp(Y),C.current.broadcast(j.credit.id,M),await kc(M),H=!0}catch(J){if(J instanceof Dc)H=!0;else if(J instanceof Cc){if(J.reason==="relayer-unreachable")throw C.current.unobservable(j.credit.id),J;if(!Qr(r.providerType))throw J;M=await Xo(Y)}else throw M&&C.current.reverted(M),J}else M=await Xo(Y)}catch(Y){C.current.submitFinished(j.credit.id),console.error("[market] buy now failed",Y),await z([j.credit.id])&&S(null),$.current=null,pe(Ne(Y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Qe(Y),value_usd:j.usdCents/100}),c.invalidateQueries({queryKey:["usd-balance"]}),b($a(Y)),d("error");const J=(Y.message??"").toLowerCase();(J.includes("not found")||J.includes("no active listing")||J.includes("404"))&&e();return}C.current.submitFinished(j.credit.id),$.current=null;try{c.invalidateQueries({queryKey:["usd-balance"]}),pe("Shop Completed Purchase",{items:[{item_id:n.itemId??null,contract_address:n.contractAddress,token_id:null,price_usd:j.usdCents/100,category:n.category,is_smart:!1}],value_credits:j.credits,value_usd:j.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:H,transaction_hash:M??null}),c.invalidateQueries({queryKey:["detail-trade"]}),c.invalidateQueries({queryKey:["shop-item"]}),c.invalidateQueries({queryKey:["item-resales",n.contractAddress,n.itemId]}),c.invalidateQueries({queryKey:["shop-items"]}),c.invalidateQueries({queryKey:["catalog-items"]}),c.invalidateQueries({queryKey:["my-assets"]}),c.invalidateQueries({queryKey:["purchases"]})}catch(Y){Se(Y,{flow:"market_buy_now",step:"post_purchase"})}const G={items:[Vb(n)],txHash:M};l("/success",{state:G})}async function z(q){if(!r||q.length===0)return!1;const j=q.filter(H=>!C.current.mayBeConsumed(H));if(j.length===0)return!1;try{return await dc(r.identity,j),!0}catch{return!1}}function A(q){z(q.filter(j=>!C.current.isInFlight(j)))}function K(){r&&f&&z([f.credit.id]),$.current=null,t()}const U=p==="working";return s.jsxs(Ab,{role:"dialog","aria-modal":"true","aria-label":h("buyModal.dialogAria",{name:n.name}),children:[s.jsx(Lb,{onClick:U?void 0:K,"aria-hidden":!0}),s.jsxs(Fb,{children:[s.jsxs(Yb,{children:[s.jsx(Wb,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsxs("div",{children:[s.jsx(Bb,{title:n.name,children:n.name||h("buyModal.itemFallback")}),s.jsx(fc,{"data-variant":"rarity",children:n.rarity})]})]}),s.jsx(Hb,{children:w?s.jsxs(s.Fragment,{children:[s.jsx(Cs,{children:h("marketCheckout.finalPrice")}),s.jsxs(Ss,{children:[s.jsx(Ms,{}),s.jsx($e,{credits:w.credits})," ",zo(w.credits)]}),s.jsxs(_s,{className:"muted",children:["$",Gt(w.credits).toFixed(2)]})]}):s.jsxs(s.Fragment,{children:[s.jsx(Cs,{children:h("marketCheckout.todaysPrice")}),s.jsxs(Ss,{"data-approx":!0,children:[s.jsx(zb,{"aria-hidden":!0,children:"≈"}),s.jsx(Ms,{}),s.jsx($e,{credits:D})," ",zo(D)]}),s.jsx(_s,{className:"muted",children:m||h("marketCheckout.checkingListing")})]})}),r?s.jsxs(qb,{className:"muted",children:[h("marketCheckout.yourBalance")," ",s.jsx(Re,{className:"ccy-mark"})," ",gd(o,i)]}):null,I?s.jsx(Ta,{className:"muted",children:h("marketCheckout.needMore",{currency:Ue.name})}):null,E?s.jsx(Ta,{"data-testid":"price-changed",role:"status",children:h("buyModal.priceChanged")}):null,m&&p==="working"?s.jsx(Ta,{className:"muted",children:m}):null,s.jsx(Kb,{message:y}),s.jsxs(Qb,{children:[s.jsx(js,{variant:"ghost",onClick:K,disabled:U,children:h("buyModal.cancel")}),s.jsx(js,{variant:"purple",onClick:()=>void L(),disabled:U||!w||I&&Qn(),children:U?h("marketCheckout.buying"):I&&!Qn()?h("nav.getCredits",{currency:Ue.name}):h("marketCheckout.confirmPurchase")})]})]})]})}function Ub(n,a,{enabled:t=!0,first:e}={}){const{data:r,isFetched:o}=xe({queryKey:["related-items",n,a,e],enabled:t&&!!n&&!!a,staleTime:3e5,queryFn:()=>yd(n,a,{first:e})});return{items:r??[],isFetched:o}}const ml=15;function Gb(n){return`${n.contractAddress}-${n.itemId??n.tokenId??n.id}`.toLowerCase()}function Xb(n,a){return!!(a.id&&n.id===a.id||a.itemId&&n.itemId===a.itemId&&Is(n,a)||a.tokenId&&n.tokenId===a.tokenId&&Is(n,a))}function Is(n,a){var t;return a.contractAddress?((t=n.contractAddress)==null?void 0:t.toLowerCase())===a.contractAddress.toLowerCase():!1}function Na(n,a,t=ml){const e=new Set,r=[];function o(c,l){for(const p of c){if(r.length>=l)return;if(Xb(p,a))continue;const d=Gb(p);e.has(d)||(e.add(d),r.push(p))}}o(n.collection,1/0);const i=r.length;return o(n.creator??[],t),o(n.related??[],t),{items:r,isCollectionOnly:r.length>0&&r.length===i}}const Jb=20,Zb=30,Ps=[];function ev(n,a=ml){const{id:t,contractAddress:e,itemId:r,tokenId:o,creator:i}=n,c=v.useMemo(()=>({id:t,contractAddress:e,itemId:r,tokenId:o}),[t,e,r,o]),{data:l=Ps,isFetched:p}=xe({queryKey:["collection-items",e],enabled:!!e,queryFn:()=>bd(e,{first:Jb}).then(E=>E.items)}),d=v.useMemo(()=>Na({collection:l},c,a).items.length,[l,c,a]),m=p&&d<a,x=m&&!!i,y=xe({queryKey:["suggestions-creator",i],enabled:x,staleTime:5*6e4,queryFn:()=>vd({creator:i,isOnSale:!0,first:Zb}).then(E=>E.items)}),b=y.data??Ps,w=!x||y.isSuccess||y.isError,k=v.useMemo(()=>Na({collection:l,creator:b},c,a).items.length,[l,b,c,a]),{items:f}=Ub(e,r??null,{enabled:m&&w&&k<a,first:a});return{...v.useMemo(()=>Na({collection:l,creator:b,related:f},c,a),[l,b,f,c,a]),siblings:l,siblingsFetched:p}}const{colors:at,media:ho}=u,tv=wd`
|
|
1771
|
+
to {
|
|
1772
|
+
transform: rotate(360deg);
|
|
1773
|
+
}
|
|
1774
|
+
`,nv=g.div``,rv=g.span`
|
|
1775
|
+
width: 34px;
|
|
1776
|
+
height: 34px;
|
|
1777
|
+
border-radius: 50%;
|
|
1778
|
+
border: 3px solid ${at.line};
|
|
1779
|
+
border-top-color: ${at.accent};
|
|
1780
|
+
animation: ${tv} 0.8s linear infinite;
|
|
1781
|
+
|
|
1782
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1783
|
+
animation-duration: 2.4s;
|
|
1784
|
+
}
|
|
1785
|
+
`,av=g.p``,ov=g.div``,Es=g.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: ${at.muted};
|
|
1796
|
+
transition:
|
|
1797
|
+
background 0.12s ease,
|
|
1798
|
+
color 0.12s ease;
|
|
1799
|
+
|
|
1800
|
+
&[data-active] {
|
|
1801
|
+
background: ${at.text};
|
|
1802
|
+
color: ${at.white};
|
|
1803
|
+
}
|
|
1804
|
+
&:not([data-active]):hover {
|
|
1805
|
+
color: ${at.text};
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
${ho.maxWidth("lg")} {
|
|
1809
|
+
padding: 6px 12px;
|
|
1810
|
+
border-radius: 0;
|
|
1811
|
+
background: ${at.white};
|
|
1812
|
+
color: ${at.text2};
|
|
1813
|
+
|
|
1814
|
+
&[data-active] {
|
|
1815
|
+
background: ${at.text};
|
|
1816
|
+
color: ${at.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
|
+
`,Ts=g.span`
|
|
1828
|
+
${ho.maxWidth("lg")} {
|
|
1829
|
+
display: none;
|
|
1830
|
+
}
|
|
1831
|
+
`,$s=g(V)`
|
|
1832
|
+
display: none;
|
|
1833
|
+
|
|
1834
|
+
${ho.maxWidth("lg")} {
|
|
1835
|
+
display: block;
|
|
1836
|
+
}
|
|
1837
|
+
`,Ns="shop-item-preview";function iv({item:n}){const a=tn(D=>{var I;return(I=D.session)==null?void 0:I.address}),{data:t,isLoading:e}=Vr(a),r=a&&t?a:"default",o=n.category==="emote",[i,c]=v.useState("avatar"),l=!o&&i==="item",p=l||!e,d=Un(D=>D.fittingOpen),{ref:m,active:x}=kd(),y=p&&x&&!d,[b,w]=v.useState(!0);v.useEffect(()=>{w(!0)},[n.id,l]),v.useEffect(()=>{y&&w(!0)},[y]);const k=v.useRef(null);v.useEffect(()=>{if(y)return()=>{Lp(k.current),k.current=null}},[y]);const[f,S]=v.useState(st.PreviewRenderer.UNITY),E=f===st.PreviewRenderer.BABYLON,T=!!a&&!!t,$=T&&Dd(n,Cd(t)),O=Sd(n)[0],C=T&&!$&&!o;return s.jsxs(s.Fragment,{children:[s.jsx("div",{ref:m,"data-preview-viewport":!0,"aria-hidden":!0}),y?s.jsx(Md,{id:Ns,contractAddress:n.contractAddress,tokenId:n.tokenId??void 0,itemId:n.tokenId?void 0:n.itemId??void 0,profile:l?void 0:$?r:"default",bodyShape:l||$?void 0:O,type:o?void 0:l?st.PreviewType.WEARABLE:st.PreviewType.AVATAR,emote:o||l?void 0:st.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:o?1.5:void 0,wheelStart:o?100:void 0,onRenderer:S,onLoad:()=>{var D;w(!1),k.current=((D=document.getElementById(Ns))==null?void 0:D.contentWindow)??null}}):null,!y||b?s.jsx(nv,{"data-preview-loading":!0,"aria-busy":"true","aria-label":h("itemPreview.loading"),children:s.jsx(rv,{"aria-hidden":!0})}):null,C&&!l?s.jsx(av,{"data-preview-note":!0,children:h("itemPreview.shownOnBody",{shape:_d(O)})}):null,!E||!o?null:s.jsx(Ap,{previewId:"shop-item-preview"}),!E||o?null:s.jsxs(ov,{"data-preview-toggle":!0,role:"group","aria-label":h("itemPreview.previewMode"),children:[s.jsxs(Es,{type:"button","data-active":i==="avatar"||void 0,"aria-pressed":i==="avatar","aria-label":h("itemPreview.onAvatar"),onClick:()=>c("avatar"),children:[s.jsx($s,{name:"view-avatar",size:18}),s.jsx(Ts,{children:h("itemPreview.onAvatar")})]}),s.jsxs(Es,{type:"button","data-active":i==="item"||void 0,"aria-pressed":i==="item","aria-label":h("itemPreview.item"),onClick:()=>c("item"),children:[s.jsx($s,{name:"view-item",size:18}),s.jsx(Ts,{children:h("itemPreview.item")})]})]})]})}const sv=g.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
|
+
`,cv=g.div`
|
|
1847
|
+
display: flex;
|
|
1848
|
+
flex-direction: column;
|
|
1849
|
+
gap: 12px;
|
|
1850
|
+
width: 1128px;
|
|
1851
|
+
max-width: 100%;
|
|
1852
|
+
max-height: 92vh;
|
|
1853
|
+
background: ${u.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
|
+
`,lv=g.div`
|
|
1861
|
+
flex: none;
|
|
1862
|
+
display: flex;
|
|
1863
|
+
align-items: center;
|
|
1864
|
+
gap: 8px;
|
|
1865
|
+
padding: 16px;
|
|
1866
|
+
border-bottom: 1px solid ${u.colors.gray4};
|
|
1867
|
+
`,dv=g.h2`
|
|
1868
|
+
flex: 1 1 auto;
|
|
1869
|
+
min-width: 0;
|
|
1870
|
+
margin: 0;
|
|
1871
|
+
font-family: ${u.font.sans};
|
|
1872
|
+
font-weight: 600;
|
|
1873
|
+
font-size: 20px;
|
|
1874
|
+
line-height: 1.6;
|
|
1875
|
+
color: ${u.colors.text};
|
|
1876
|
+
`,uv=g.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: ${u.colors.text};
|
|
1887
|
+
|
|
1888
|
+
.ico {
|
|
1889
|
+
width: 18.5px;
|
|
1890
|
+
height: 18.5px;
|
|
1891
|
+
}
|
|
1892
|
+
&:focus-visible {
|
|
1893
|
+
outline: 2px solid ${u.colors.accent};
|
|
1894
|
+
outline-offset: 4px;
|
|
1895
|
+
}
|
|
1896
|
+
`,pv=g.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
|
+
`,fv=g.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: ${u.colors.white};
|
|
1914
|
+
`,hv=g.p`
|
|
1915
|
+
margin: 0;
|
|
1916
|
+
font-family: ${u.font.sans};
|
|
1917
|
+
font-size: 14px;
|
|
1918
|
+
line-height: 1.43;
|
|
1919
|
+
color: ${u.colors.muted};
|
|
1920
|
+
`,mv=g.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 ${u.colors.lineStrong};
|
|
1927
|
+
border-radius: 8px;
|
|
1928
|
+
background: ${u.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: ${u.font.sans};
|
|
1937
|
+
font-weight: 500;
|
|
1938
|
+
font-size: 12px;
|
|
1939
|
+
line-height: 1.43;
|
|
1940
|
+
color: ${u.colors.text2};
|
|
1941
|
+
cursor: pointer;
|
|
1942
|
+
outline: none;
|
|
1943
|
+
}
|
|
1944
|
+
select:focus-visible {
|
|
1945
|
+
outline: 2px solid ${u.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: ${u.colors.text2};
|
|
1955
|
+
pointer-events: none;
|
|
1956
|
+
}
|
|
1957
|
+
`,gv=g.div`
|
|
1958
|
+
flex: none;
|
|
1959
|
+
border: 1px solid ${u.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: ${u.colors.white};
|
|
1966
|
+
`,xv=g.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: ${u.colors.media};
|
|
1978
|
+
border-right: 0.5px solid ${u.colors.lineStrong};
|
|
1979
|
+
font-family: ${u.font.sans};
|
|
1980
|
+
font-weight: 600;
|
|
1981
|
+
font-size: 16px;
|
|
1982
|
+
line-height: 1.5;
|
|
1983
|
+
color: ${u.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 ${u.colors.lineStrong};
|
|
1995
|
+
border-bottom: 0.5px solid ${u.colors.lineStrong};
|
|
1996
|
+
font-family: ${u.font.sans};
|
|
1997
|
+
font-size: 14px;
|
|
1998
|
+
line-height: 1.43;
|
|
1999
|
+
color: ${u.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: ${u.colors.media};
|
|
2008
|
+
}
|
|
2009
|
+
tbody tr:hover td,
|
|
2010
|
+
tbody tr:focus-within td {
|
|
2011
|
+
border-bottom-color: ${u.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
|
+
${u.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 ${u.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: ${u.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
|
+
`,gl=`
|
|
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: ${u.colors.media};
|
|
2071
|
+
object-fit: cover;
|
|
2072
|
+
overflow: hidden;
|
|
2073
|
+
color: ${u.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: ${u.font.sans};
|
|
2083
|
+
font-size: 14px;
|
|
2084
|
+
line-height: 1.43;
|
|
2085
|
+
color: ${u.colors.text2};
|
|
2086
|
+
}
|
|
2087
|
+
`,yv=g.div`
|
|
2088
|
+
${gl}
|
|
2089
|
+
`,bv=g.button`
|
|
2090
|
+
${gl}
|
|
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 ${u.colors.accent};
|
|
2103
|
+
outline-offset: 2px;
|
|
2104
|
+
border-radius: 4px;
|
|
2105
|
+
}
|
|
2106
|
+
`,Os=g.span`
|
|
2107
|
+
color: ${u.colors.muted};
|
|
2108
|
+
`,vv=g.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: ${u.font.sans};
|
|
2119
|
+
font-weight: 600;
|
|
2120
|
+
font-size: 16px;
|
|
2121
|
+
line-height: 1.5;
|
|
2122
|
+
color: ${u.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: ${u.colors.text2};
|
|
2130
|
+
}
|
|
2131
|
+
.approx {
|
|
2132
|
+
color: ${u.colors.muted};
|
|
2133
|
+
font-weight: 600;
|
|
2134
|
+
}
|
|
2135
|
+
`,wv=g.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
|
+
${u.media.maxWidth("mobile")} {
|
|
2153
|
+
opacity: 1;
|
|
2154
|
+
}
|
|
2155
|
+
`,xl=`
|
|
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: ${u.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 ${u.colors.accent};
|
|
2180
|
+
outline-offset: 2px;
|
|
2181
|
+
}
|
|
2182
|
+
`,kv=g.button`
|
|
2183
|
+
${xl}
|
|
2184
|
+
min-width: 106px;
|
|
2185
|
+
background: ${u.colors.text2};
|
|
2186
|
+
color: ${u.colors.softWhite};
|
|
2187
|
+
|
|
2188
|
+
&:hover:not(:disabled) {
|
|
2189
|
+
filter: brightness(1.35);
|
|
2190
|
+
}
|
|
2191
|
+
&:disabled {
|
|
2192
|
+
opacity: 0.55;
|
|
2193
|
+
cursor: default;
|
|
2194
|
+
}
|
|
2195
|
+
`,Rs=g.button`
|
|
2196
|
+
${xl}
|
|
2197
|
+
background: ${u.colors.accent};
|
|
2198
|
+
color: ${u.colors.softWhite};
|
|
2199
|
+
|
|
2200
|
+
&:hover:not(:disabled) {
|
|
2201
|
+
background: ${u.colors.accentHover};
|
|
2202
|
+
}
|
|
2203
|
+
`,Dv=g.span`
|
|
2204
|
+
display: inline-flex;
|
|
2205
|
+
align-items: center;
|
|
2206
|
+
height: 40px;
|
|
2207
|
+
padding: 0 12px;
|
|
2208
|
+
border-radius: 12px;
|
|
2209
|
+
background: ${u.colors.chip};
|
|
2210
|
+
font-family: ${u.font.sans};
|
|
2211
|
+
font-weight: 600;
|
|
2212
|
+
font-size: 13px;
|
|
2213
|
+
line-height: 24px;
|
|
2214
|
+
color: ${u.colors.muted};
|
|
2215
|
+
white-space: nowrap;
|
|
2216
|
+
`,Cv=g.div`
|
|
2217
|
+
flex: none;
|
|
2218
|
+
display: flex;
|
|
2219
|
+
align-items: center;
|
|
2220
|
+
justify-content: flex-end;
|
|
2221
|
+
gap: 8px;
|
|
2222
|
+
`,Sv=g.p`
|
|
2223
|
+
margin: 0;
|
|
2224
|
+
font-family: ${u.font.sans};
|
|
2225
|
+
font-size: 12px;
|
|
2226
|
+
line-height: 1;
|
|
2227
|
+
color: ${u.colors.gray0};
|
|
2228
|
+
`,As=g.button`
|
|
2229
|
+
display: grid;
|
|
2230
|
+
place-items: center;
|
|
2231
|
+
padding: 10px;
|
|
2232
|
+
border: 1px solid ${u.colors.text2};
|
|
2233
|
+
border-radius: 4px;
|
|
2234
|
+
background: ${u.colors.white};
|
|
2235
|
+
color: ${u.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: ${u.colors.lineStrong};
|
|
2249
|
+
color: ${u.colors.lineStrong};
|
|
2250
|
+
cursor: default;
|
|
2251
|
+
}
|
|
2252
|
+
&:focus-visible {
|
|
2253
|
+
outline: 2px solid ${u.colors.accent};
|
|
2254
|
+
outline-offset: 2px;
|
|
2255
|
+
}
|
|
2256
|
+
`,Mv=g.p`
|
|
2257
|
+
margin: 0;
|
|
2258
|
+
padding: 32px 0;
|
|
2259
|
+
font-family: ${u.font.sans};
|
|
2260
|
+
font-size: 14px;
|
|
2261
|
+
line-height: 1.43;
|
|
2262
|
+
color: ${u.colors.muted};
|
|
2263
|
+
text-align: center;
|
|
2264
|
+
`;g.div`
|
|
2265
|
+
display: flex;
|
|
2266
|
+
flex-direction: column;
|
|
2267
|
+
gap: 8px;
|
|
2268
|
+
margin-top: 16px;
|
|
2269
|
+
|
|
2270
|
+
.classic-title {
|
|
2271
|
+
font-family: ${u.font.sans};
|
|
2272
|
+
font-weight: 600;
|
|
2273
|
+
font-size: 15px;
|
|
2274
|
+
color: ${u.colors.text2};
|
|
2275
|
+
}
|
|
2276
|
+
.classic-note {
|
|
2277
|
+
font-family: ${u.font.sans};
|
|
2278
|
+
font-size: 13px;
|
|
2279
|
+
color: ${u.colors.muted};
|
|
2280
|
+
}
|
|
2281
|
+
`;g.span`
|
|
2282
|
+
display: inline-flex;
|
|
2283
|
+
align-items: center;
|
|
2284
|
+
padding: 2px 8px;
|
|
2285
|
+
border-radius: ${u.radius.chip};
|
|
2286
|
+
background: ${u.colors.chip};
|
|
2287
|
+
font-family: ${u.font.sans};
|
|
2288
|
+
font-size: 11px;
|
|
2289
|
+
letter-spacing: 0.4px;
|
|
2290
|
+
text-transform: uppercase;
|
|
2291
|
+
color: ${u.colors.muted};
|
|
2292
|
+
`;g.a`
|
|
2293
|
+
display: inline-flex;
|
|
2294
|
+
align-items: center;
|
|
2295
|
+
gap: 6px;
|
|
2296
|
+
height: 40px;
|
|
2297
|
+
padding: 0 14px;
|
|
2298
|
+
border: 1px solid ${u.colors.lineStrong};
|
|
2299
|
+
border-radius: 12px;
|
|
2300
|
+
color: ${u.colors.accent};
|
|
2301
|
+
font-family: ${u.font.sans};
|
|
2302
|
+
font-weight: 600;
|
|
2303
|
+
font-size: 13px;
|
|
2304
|
+
text-decoration: none;
|
|
2305
|
+
|
|
2306
|
+
&:hover {
|
|
2307
|
+
background: ${u.colors.chip};
|
|
2308
|
+
}
|
|
2309
|
+
.ico {
|
|
2310
|
+
width: 14px;
|
|
2311
|
+
height: 14px;
|
|
2312
|
+
}
|
|
2313
|
+
`;const Cr=10,_v=!1;function jv(n){return/^0x[a-fA-F0-9]{40}$/.test(n)?`${n.slice(0,6)}…${n.slice(-4)}`:n}function Iv(n){let a=0;for(let t=0;t<n.length;t++)a=a*31+n.charCodeAt(t)>>>0;return`hsl(${a%360}, 52%, 45%)`}function Pv(n,a){var t;return(((t=n==null?void 0:n.trim())==null?void 0:t[0])||a.replace(/^0x/i,"")[0]||"?").toUpperCase()}function Ev(n){return n%100>=11&&n%100<=13?"th":["th","st","nd","rd"][n%10]??"th"}function Tv(n,a){const t=new Date(n);return Number.isNaN(t.getTime())?"—":a==="en"?`${new Intl.DateTimeFormat("en",{month:"long"}).format(t)} ${t.getDate()}${Ev(t.getDate())}, ${t.getFullYear()}`:new Intl.DateTimeFormat(a,{day:"numeric",month:"long",year:"numeric"}).format(t)}function $v(n){return{tradeId:n.tradeId??n.id,listingType:"primary",contractAddress:n.contractAddress,itemId:n.itemId??"",name:n.name,thumbnail:n.thumbnail,rarity:n.rarity,category:n.category,wearableCategory:n.wearableCategory??null,creator:n.creator,manaWei:n.manaWei??"0",available:1,network:n.network,chainId:n.chainId,createdAt:0}}function Nv({r:n,seller:a,issuedId:t,labels:e,locale:r,isOwn:o,isLegacy:i,inCart:c,fallbackImage:l,onAdd:p,onBuyNative:d,onBuyLegacy:m}){var $,O;const x=cn(),{data:y}=Vr(a),b=(O=($=y==null?void 0:y.avatar)==null?void 0:$.snapshots)==null?void 0:O.face256,[w,k]=v.useState(!1);v.useEffect(()=>k(!1),[b]);const f=!!b&&!w,S=a?y!=null&&y.name?Ur(y.name):jv(a):void 0,E=f?s.jsx("img",{className:"owner-ava",src:b,alt:"",loading:"lazy",onError:()=>k(!0)}):a?s.jsx("span",{className:"owner-ava",style:{backgroundColor:Iv(a)},"aria-hidden":!0,children:Pv(y==null?void 0:y.name,a)}):l?s.jsx("img",{className:"owner-ava",src:l,alt:"","aria-hidden":!0}):s.jsx("span",{className:"owner-ava","aria-hidden":!0}),T=s.jsxs(s.Fragment,{children:[E,S?s.jsx("span",{className:"owner-name","data-testid":"resale-seller",children:S}):null]});return s.jsxs("tr",{"data-testid":"resale-row","data-source":n.source,"data-own":o?"true":void 0,children:[s.jsx("td",{"data-label":e.owner,children:a?s.jsx(bv,{type:"button",onClick:()=>x(`/items/creator/${a}`),children:T}):s.jsx(yv,{children:T})}),s.jsx("td",{"data-label":e.itemNumber,children:t?s.jsxs("span",{"data-testid":"resale-issued",children:["#",t]}):s.jsx(Os,{children:"—"})}),s.jsx("td",{"data-label":e.expiration,children:n.saleEndsAt?Tv(n.saleEndsAt,r):s.jsx(Os,{children:"—"})}),s.jsx("td",{"data-label":e.price,children:s.jsxs(vv,{children:[s.jsxs("span",{className:"amount",children:[i?s.jsx("span",{className:"approx","aria-hidden":!0,children:"≈"}):null,s.jsx(Re,{className:"ccy"}),s.jsx("span",{children:Ot(n.priceCredits)})]}),s.jsx(wv,{"data-persistent":o?"true":void 0,children:o?s.jsx(Dv,{"data-testid":"resale-own",children:h("resales.yourListing")}):i?s.jsx(Rs,{onClick:m,"aria-label":h("assetCard.buyNow"),"data-testid":"resale-buy",children:h("resales.buy")}):s.jsxs(s.Fragment,{children:[s.jsxs(kv,{onClick:p,disabled:c,"aria-label":c?h("assetCard.inCart"):h("assetCard.addToCart"),"data-testid":"resale-add",children:[s.jsx(V,{name:"cart",className:"ico"}),s.jsx("span",{children:c?h("assetCard.inCart"):h("resales.add")})]}),s.jsx(Rs,{onClick:d,"aria-label":h("assetCard.buyNow"),"data-testid":"resale-buy",children:h("resales.buy")})]})})]})})]})}function Ov({item:n,onClose:a}){var H;const t=n.contractAddress,e=n.itemId,r=ln(),o=Un(M=>M.add),i=Un(M=>M.items),{session:c}=tn(),l=jd(M=>M.locale),p=(H=c==null?void 0:c.address)==null?void 0:H.toLowerCase(),d=v.useRef(null),[m,x]=v.useState(null),[y,b]=v.useState(null),[w,k]=v.useState("cheapest"),[f,S]=v.useState(0),E=!!m||!!y;v.useEffect(()=>{var M;(M=d.current)==null||M.focus()},[]),v.useEffect(()=>{function M(Y){Y.key==="Escape"&&!E&&a()}window.addEventListener("keydown",M);const G=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",M),document.body.style.overflow=G}},[E,a]);const{data:T=[],isLoading:$}=xe({queryKey:["item-resales",t,e],enabled:!!t&&!!e,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>gc(t,e)}),O=v.useMemo(()=>w==="cheapest"?T:[...T].sort((M,G)=>G.priceCredits-M.priceCredits),[T,w]),C=Math.max(1,Math.ceil(O.length/Cr)),D=Math.min(f,C-1),I=O.slice(D*Cr,D*Cr+Cr),L=I.filter(M=>!M.seller||!M.issuedId).map(M=>M.tokenId).filter(M=>!!M),{data:z={}}=xe({queryKey:["resale-token-info",t,L.join(",")],enabled:!!t&&L.length>0,staleTime:6e4,queryFn:()=>Id(t,L)}),{data:A=[]}=xe({queryKey:["item-classic-orders",t,e],enabled:_v,queryFn:()=>Pd(t,e)}),K=T.some(M=>M.source==="legacy"),{data:U}=mc(K);function q(){r.invalidateQueries({queryKey:["item-resales",t,e]})}const j={owner:h("resales.colOwner"),itemNumber:h("resales.colItemNumber"),expiration:h("resales.colExpiration"),price:h("resales.colPrice")};return s.jsxs(s.Fragment,{children:[s.jsx(sv,{onClick:E?void 0:a,role:"presentation",children:s.jsxs(cv,{ref:d,tabIndex:-1,onClick:M=>M.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":h("resales.modalTitle"),"data-testid":"resellers-modal",children:[s.jsxs(lv,{children:[s.jsx(dv,{children:h("resales.modalTitle")}),s.jsx(uv,{onClick:a,"aria-label":h("resales.close"),"data-testid":"resellers-close",children:s.jsx(V,{name:"close"})})]}),s.jsxs(pv,{children:[s.jsxs(fv,{children:[s.jsx(hv,{"data-testid":"resales-count",children:h("resales.count",{count:T.length})}),s.jsxs(mv,{children:[s.jsxs("select",{value:w,onChange:M=>{k(M.target.value),S(0)},"aria-label":h("resales.sortLabel"),"data-testid":"resales-sort",children:[s.jsx("option",{value:"cheapest",children:h("resales.sortCheapest")}),s.jsx("option",{value:"most_expensive",children:h("resales.sortExpensive")})]}),s.jsx(V,{name:"chevron-down",className:"chev"})]})]}),$?null:O.length===0?s.jsx(Mv,{"data-testid":"resales-empty",children:h("resales.empty")}):null,O.length>0?s.jsxs(s.Fragment,{children:[s.jsx(gv,{children:s.jsxs(xv,{children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",children:j.owner}),s.jsx("th",{scope:"col",children:j.itemNumber}),s.jsx("th",{scope:"col",children:j.expiration}),s.jsx("th",{scope:"col",children:j.price})]})}),s.jsx("tbody",{children:I.map(M=>{const G=M.source==="legacy",Y=i.some(Le=>Le.id===M.id),J=M.tokenId&&z[M.tokenId]||{},de=M.issuedId??J.issuedId,Ee=M.seller??J.seller,ke={...M,name:M.name||n.name,thumbnail:M.thumbnail||n.thumbnail,rarity:M.rarity||n.rarity,category:M.category||n.category,wearableCategory:M.wearableCategory??n.wearableCategory,gender:M.gender??n.gender},ue=!!Ee&&!!p&&Ee.toLowerCase()===p;return s.jsx(Nv,{r:ke,seller:Ee,issuedId:de,labels:j,locale:l,isOwn:ue,isLegacy:G,inCart:Y,fallbackImage:ke.thumbnail,onAdd:()=>o(ke,"item_detail"),onBuyNative:()=>x(ke),onBuyLegacy:()=>b($v(ke))},M.tradeId??M.id)})})]})}),C>1?s.jsxs(Cv,{children:[s.jsx(As,{"data-dir":"prev",onClick:()=>S(M=>Math.max(0,M-1)),disabled:D===0,"aria-label":h("resales.prevPage"),"data-testid":"resale-prev-page",children:s.jsx(V,{name:"chevron-down"})}),s.jsx(Sv,{"data-testid":"resale-page-label",children:h("resales.page",{page:D+1,total:C})}),s.jsx(As,{onClick:()=>S(M=>Math.min(C-1,M+1)),disabled:D>=C-1,"aria-label":h("resales.nextPage"),"data-testid":"resale-next-page",children:s.jsx(V,{name:"chevron-down"})})]}):null]}):null,null]})]})}),m?s.jsx(qa,{item:m,onClose:()=>{x(null),q()}}):null,y&&U?s.jsx(hl,{listing:y,rate:U,onClose:()=>b(null),onSold:()=>{b(null),q()}}):null]})}const Rv="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:Pe,font:yl,radius:mo,z:Av}=u,Lv=g.div`
|
|
2314
|
+
position: fixed;
|
|
2315
|
+
inset: 0;
|
|
2316
|
+
z-index: ${Av.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
|
+
`,Fv=g.div`
|
|
2324
|
+
width: 560px;
|
|
2325
|
+
max-width: 100%;
|
|
2326
|
+
max-height: 100%;
|
|
2327
|
+
overflow-y: auto;
|
|
2328
|
+
padding: 12px 16px 16px;
|
|
2329
|
+
border-radius: ${mo.modal};
|
|
2330
|
+
background: ${Pe.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: ${yl.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
|
+
`,Yv=g.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 ${Pe.gray4};
|
|
2348
|
+
`,Wv=g.h2`
|
|
2349
|
+
margin: 0;
|
|
2350
|
+
font-weight: 600;
|
|
2351
|
+
font-size: 20px;
|
|
2352
|
+
line-height: 1.6;
|
|
2353
|
+
color: ${Pe.text};
|
|
2354
|
+
`,Bv=g.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: ${Pe.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 ${Pe.accent};
|
|
2379
|
+
outline-offset: 2px;
|
|
2380
|
+
}
|
|
2381
|
+
`,Hv=g.div`
|
|
2382
|
+
padding: 24px 16px;
|
|
2383
|
+
border-radius: ${mo.modal};
|
|
2384
|
+
background: ${Pe.promptLilac};
|
|
2385
|
+
display: flex;
|
|
2386
|
+
flex-direction: column;
|
|
2387
|
+
align-items: center;
|
|
2388
|
+
gap: 16px;
|
|
2389
|
+
text-align: center;
|
|
2390
|
+
`,zv=g.img`
|
|
2391
|
+
flex: none;
|
|
2392
|
+
width: 76px;
|
|
2393
|
+
height: 76px;
|
|
2394
|
+
`,qv=g.h3`
|
|
2395
|
+
margin: 0;
|
|
2396
|
+
font-weight: 700;
|
|
2397
|
+
font-size: 20px;
|
|
2398
|
+
line-height: 1.334;
|
|
2399
|
+
color: ${Pe.text2};
|
|
2400
|
+
`,Kv=g.p`
|
|
2401
|
+
margin: 0;
|
|
2402
|
+
font-weight: 400;
|
|
2403
|
+
font-size: 16px;
|
|
2404
|
+
line-height: 1.334;
|
|
2405
|
+
color: ${Pe.text2};
|
|
2406
|
+
`,Qv=g.div`
|
|
2407
|
+
display: flex;
|
|
2408
|
+
align-items: center;
|
|
2409
|
+
gap: 12px;
|
|
2410
|
+
`,bl=`
|
|
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: ${mo.card};
|
|
2420
|
+
font-family: ${yl.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 ${Pe.accent};
|
|
2433
|
+
outline-offset: 2px;
|
|
2434
|
+
}
|
|
2435
|
+
`,Vv=g.button`
|
|
2436
|
+
${bl};
|
|
2437
|
+
border: 0.5px solid ${Pe.text};
|
|
2438
|
+
background: ${Pe.white};
|
|
2439
|
+
color: ${Pe.text2};
|
|
2440
|
+
|
|
2441
|
+
&:hover {
|
|
2442
|
+
background: ${Pe.panel};
|
|
2443
|
+
}
|
|
2444
|
+
`,Uv=g.a`
|
|
2445
|
+
${bl};
|
|
2446
|
+
border: 0;
|
|
2447
|
+
background: ${Pe.dclRed};
|
|
2448
|
+
color: ${Pe.softWhite};
|
|
2449
|
+
text-decoration: none;
|
|
2450
|
+
|
|
2451
|
+
&:hover {
|
|
2452
|
+
filter: brightness(1.08);
|
|
2453
|
+
}
|
|
2454
|
+
`,Gv=g.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 Xv(n,a){return`${At.marketplaceUrl}/contracts/${n}/tokens/${a}`}function Jv({contractAddress:n,tokenId:a,onClose:t}){const e=v.useRef(null),r=v.useRef(t);return r.current=t,v.useEffect(()=>{var i;(i=e.current)==null||i.focus();function o(c){c.key==="Escape"&&r.current()}return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[]),s.jsx(Lv,{role:"presentation",onClick:t,children:s.jsxs(Fv,{ref:e,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":h("marketplaceRedirect.title"),"data-testid":"marketplace-redirect-modal",onClick:o=>o.stopPropagation(),children:[s.jsxs(Yv,{children:[s.jsx(Wv,{children:h("marketplaceRedirect.title")}),s.jsx(Bv,{onClick:t,"aria-label":h("marketplaceRedirect.close"),children:s.jsx(V,{name:"close",className:"ico"})})]}),s.jsxs(Hv,{children:[s.jsx(zv,{src:Rv,alt:"","aria-hidden":!0}),s.jsx(qv,{children:h("marketplaceRedirect.heading")}),s.jsx(Kv,{children:h("marketplaceRedirect.body")})]}),s.jsxs(Qv,{children:[s.jsx(Vv,{onClick:t,"data-testid":"marketplace-redirect-cancel",children:h("marketplaceRedirect.cancel")}),s.jsxs(Uv,{href:Xv(n,a),target:"_blank",rel:"noreferrer","data-testid":"marketplace-redirect-continue",children:[h("marketplaceRedirect.continue"),s.jsx(Gv,{"aria-hidden":!0,children:s.jsx(V,{name:"view-all-arrow",className:"ico"})})]})]})]})})}function go(){return At.shopServerUrl||null}function vl(){return!!go()}async function Zv(n,a,t){const e=go();if(!e)return{subscribed:!1};const r=new URLSearchParams({contractAddress:n,itemId:a}),o=`${e}/notify-requests?${r.toString()}`,i=await xc(o,{method:"GET",identity:t,metadata:{}});if(!i.ok)throw new Error(`getNotifyRequest ${i.status}`);return t0(i,"getNotifyRequest")}async function e0(n,a){const t=go();if(!t)throw new Error("createNotifyRequest: no shop-server host configured");const e=`${t}/notify-requests`,r=await xc(e,{method:"POST",identity:a,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok)throw new Error(`createNotifyRequest ${r.status}: ${await r.text()}`);const o=await r.text();if(o.trim()&&!n0(o))throw new Error("createNotifyRequest: response was not JSON")}async function t0(n,a){try{return await n.json()}catch{throw new Error(`${a}: response was not JSON`)}}function n0(n){try{return JSON.parse(n),!0}catch{return!1}}const{colors:Ve,radius:wl}=u,kl=Pn`
|
|
2466
|
+
display: flex;
|
|
2467
|
+
flex-direction: column;
|
|
2468
|
+
gap: 8px;
|
|
2469
|
+
width: 100%;
|
|
2470
|
+
`,r0=g.form`
|
|
2471
|
+
${kl};
|
|
2472
|
+
`,Ls=g.div`
|
|
2473
|
+
${kl};
|
|
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
|
+
`,a0=g.label`
|
|
2484
|
+
font-size: 14px;
|
|
2485
|
+
color: ${Ve.softWhite};
|
|
2486
|
+
`,o0=g.div`
|
|
2487
|
+
display: flex;
|
|
2488
|
+
align-items: stretch;
|
|
2489
|
+
gap: 8px;
|
|
2490
|
+
`,i0=g.input`
|
|
2491
|
+
flex: 1;
|
|
2492
|
+
min-width: 0;
|
|
2493
|
+
height: 42px;
|
|
2494
|
+
padding: 0 16px;
|
|
2495
|
+
border: 1px solid ${Ve.fieldBorder};
|
|
2496
|
+
border-radius: ${wl.btn};
|
|
2497
|
+
background: rgba(255, 255, 255, 0.1);
|
|
2498
|
+
font-size: 16px;
|
|
2499
|
+
color: ${Ve.softWhite};
|
|
2500
|
+
|
|
2501
|
+
&::placeholder {
|
|
2502
|
+
color: ${Ve.gray4};
|
|
2503
|
+
}
|
|
2504
|
+
&:focus-visible {
|
|
2505
|
+
outline: none;
|
|
2506
|
+
border-color: ${Ve.white};
|
|
2507
|
+
box-shadow: 0 0 0 1px ${Ve.white};
|
|
2508
|
+
}
|
|
2509
|
+
`,Fs=g.button`
|
|
2510
|
+
flex-shrink: 0;
|
|
2511
|
+
height: 40px;
|
|
2512
|
+
padding: 0 12px;
|
|
2513
|
+
border: 0;
|
|
2514
|
+
border-radius: ${wl.card};
|
|
2515
|
+
background: ${Ve.softWhite};
|
|
2516
|
+
color: ${Ve.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: ${Ve.white};
|
|
2531
|
+
}
|
|
2532
|
+
&:disabled {
|
|
2533
|
+
opacity: 0.5;
|
|
2534
|
+
cursor: default;
|
|
2535
|
+
}
|
|
2536
|
+
`,s0=g.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: ${Ve.white};
|
|
2546
|
+
`,c0=g.span`
|
|
2547
|
+
font-size: 16px;
|
|
2548
|
+
line-height: 1.5;
|
|
2549
|
+
color: ${Ve.text2};
|
|
2550
|
+
`;function Ys(n){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.trim())}function l0({item:n}){const a=tn(k=>k.session),t=tn(k=>k.signIn),[e,r]=v.useState(""),[o,i]=v.useState(!1),[c,l]=v.useState(!1),[p,d]=v.useState(null),m=vl(),x=m&&!!a&&!!n.contractAddress&&!!n.itemId,{data:y}=xe({queryKey:["notify-request",n.contractAddress,n.itemId,a==null?void 0:a.address],enabled:x,queryFn:()=>Zv(n.contractAddress,n.itemId,a.identity)});v.useEffect(()=>{y!=null&&y.email&&r(k=>k||y.email)},[y==null?void 0:y.email]),v.useEffect(()=>{if(!a||!m)return;let k=!1;return Ed().then(f=>{!k&&f&&r(S=>S||f)}),()=>{k=!0}},[m,a]);const b=c||!!(y!=null&&y.subscribed);async function w(k){if(k.preventDefault(),!(!a||!n.itemId||!Ys(e)||o)){i(!0),d(null);try{await e0({contractAddress:n.contractAddress,itemId:n.itemId,chainId:n.chainId,email:e.trim()},a.identity),l(!0)}catch(f){Se(f,{flow:"notify-me",contractAddress:n.contractAddress,itemId:n.itemId}),d(h("notifyMe.error"))}finally{i(!1)}}}return m?a?b?s.jsxs(Ls,{"data-done":!0,"data-testid":"notify-subscribed",children:[s.jsx(s0,{"aria-hidden":!0,children:s.jsx(V,{name:"check",size:12})}),s.jsx(c0,{children:h("notifyMe.subscribedBody")})]}):s.jsxs(r0,{onSubmit:k=>void w(k),"data-testid":"notify",children:[s.jsx(a0,{htmlFor:"notify-email",children:h("notifyMe.label")}),s.jsxs(o0,{children:[s.jsx(i0,{id:"notify-email",type:"email",inputMode:"email",autoComplete:"email",placeholder:h("notifyMe.placeholder"),value:e,onChange:k=>r(k.target.value),"data-testid":"notify-email"}),s.jsx(Fs,{type:"submit",disabled:!Ys(e)||o,"data-testid":"notify-submit",children:o?h("notifyMe.working"):h("notifyMe.cta")})]}),s.jsx(Lt,{message:p})]}):s.jsx(Ls,{"data-testid":"notify",children:s.jsx(Fs,{type:"button","data-full":!0,onClick:t,"data-testid":"notify-signin",children:h("notifyMe.signInCta")})}):null}const d0=new Map(Object.entries(Fp).flatMap(([n,a])=>a.length===1?[[a[0],n]]:[])),vn="/items";function u0(n){return n?`${vn}?rarities=${encodeURIComponent(n.toLowerCase())}`:null}function p0(n){const a=n.wearableCategory;if(a){const t=d0.get(a);return t?`${vn}?category=wearable&subCategory=${encodeURIComponent(t)}`:`${vn}?category=wearable`}return n.category==="emote"?`${vn}?category=emote`:n.category==="wearable"?`${vn}?category=wearable`:null}function f0(){return`${vn}?smart=true`}const Dl="shop:recently-viewed",Cl=12;function h0(){try{const n=localStorage.getItem(Dl);if(!n)return[];const a=JSON.parse(n);return Array.isArray(a)?a.slice(0,Cl):[]}catch{return[]}}function m0(n){if(n!=null&&n.id)try{const a=[n,...h0().filter(t=>t.id!==n.id)].slice(0,Cl);localStorage.setItem(Dl,JSON.stringify(a))}catch{}}const g0=g(Td)`
|
|
2551
|
+
display: flex;
|
|
2552
|
+
flex-direction: column;
|
|
2553
|
+
overflow: hidden;
|
|
2554
|
+
gap: 1px;
|
|
2555
|
+
background: ${u.colors.lineStrong};
|
|
2556
|
+
|
|
2557
|
+
/* Rows stack; each cell (<img>) covers its share. A single row (≤2 thumbnails, data-full) spans the
|
|
2558
|
+
full height. */
|
|
2559
|
+
& [data-collage-row] {
|
|
2560
|
+
display: flex;
|
|
2561
|
+
flex: 1 1 50%;
|
|
2562
|
+
min-height: 0;
|
|
2563
|
+
gap: 1px;
|
|
2564
|
+
}
|
|
2565
|
+
& [data-collage-row][data-full] {
|
|
2566
|
+
flex-basis: 100%;
|
|
2567
|
+
}
|
|
2568
|
+
& [data-collage-row] img {
|
|
2569
|
+
flex: 1 1 0;
|
|
2570
|
+
min-width: 0;
|
|
2571
|
+
width: 100%;
|
|
2572
|
+
height: 100%;
|
|
2573
|
+
object-fit: cover;
|
|
2574
|
+
display: block;
|
|
2575
|
+
}
|
|
2576
|
+
`;function x0({contractAddress:n,name:a,items:t,className:e}){const r=cn();if(!n||!a)return null;const o=(t??[]).map(l=>l.thumbnail).filter(l=>!!l).slice(0,4),i=o.slice(0,2),c=o.slice(2,4);return s.jsxs($d,{as:"button","data-link":!0,className:e,"data-testid":"creator",onClick:l=>{l.stopPropagation(),r(`/collection/${n}`)},children:[o.length>0?s.jsxs(g0,{as:"span","data-avatar":!0,"data-testid":"creator-ava","aria-hidden":!0,children:[s.jsx("span",{"data-collage-row":!0,"data-full":c.length===0||void 0,children:i.map((l,p)=>s.jsx("img",{src:l,alt:""},p))}),c.length>0?s.jsx("span",{"data-collage-row":!0,children:c.map((l,p)=>s.jsx("img",{src:l,alt:""},p))}):null]}):null,s.jsx(Nd,{"data-testid":"creator-name",children:Ur(a)})]})}const{colors:R,radius:Tn,media:ve,font:y0,gradients:b0}=u,v0=g.div`
|
|
2577
|
+
max-width: 1721px;
|
|
2578
|
+
margin: 0 auto;
|
|
2579
|
+
|
|
2580
|
+
${ve.maxWidth("lg")} {
|
|
2581
|
+
padding-bottom: 88px;
|
|
2582
|
+
}
|
|
2583
|
+
`,w0=g.nav`
|
|
2584
|
+
display: flex;
|
|
2585
|
+
align-items: center;
|
|
2586
|
+
gap: 8px;
|
|
2587
|
+
font-size: 13px;
|
|
2588
|
+
color: ${R.gray4};
|
|
2589
|
+
margin-bottom: 24px;
|
|
2590
|
+
`,k0=g.button`
|
|
2591
|
+
background: none;
|
|
2592
|
+
border: 0;
|
|
2593
|
+
padding: 0;
|
|
2594
|
+
font: inherit;
|
|
2595
|
+
color: ${R.gray4};
|
|
2596
|
+
|
|
2597
|
+
&:hover {
|
|
2598
|
+
color: ${R.white};
|
|
2599
|
+
}
|
|
2600
|
+
`,D0=g.span`
|
|
2601
|
+
color: ${R.muted2};
|
|
2602
|
+
`,C0=g.span`
|
|
2603
|
+
color: ${R.softWhite};
|
|
2604
|
+
font-weight: 600;
|
|
2605
|
+
`,S0=g.div`
|
|
2606
|
+
display: grid;
|
|
2607
|
+
grid-template-columns: minmax(0, 1045fr) minmax(0, 514fr);
|
|
2608
|
+
gap: 48px;
|
|
2609
|
+
align-items: start;
|
|
2610
|
+
|
|
2611
|
+
${ve.maxWidth("lg")} {
|
|
2612
|
+
grid-template-columns: 1fr;
|
|
2613
|
+
gap: 24px;
|
|
2614
|
+
}
|
|
2615
|
+
`,M0=g.div`
|
|
2616
|
+
position: relative;
|
|
2617
|
+
aspect-ratio: 1045 / 752;
|
|
2618
|
+
border-radius: ${Tn.banner};
|
|
2619
|
+
overflow: hidden;
|
|
2620
|
+
/* Light surface, deliberately AGAINST the Figma's translucent black (1052:151284): the dark violet
|
|
2621
|
+
backdrop muted every item, so the preview keeps the light stage. The iframe is transparent — this
|
|
2622
|
+
is the scene's backdrop. */
|
|
2623
|
+
background: ${R.media};
|
|
2624
|
+
|
|
2625
|
+
/* Edge to edge once the page is a single column: the stage is the whole width there, so it cancels the
|
|
2626
|
+
shell's gutter instead of sitting inside it. No transform, which would make this the containing block
|
|
2627
|
+
for the absolutely-positioned controls below. */
|
|
2628
|
+
${ve.maxWidth("lg")} {
|
|
2629
|
+
aspect-ratio: 1 / 1;
|
|
2630
|
+
width: 100vw;
|
|
2631
|
+
margin-left: calc(-50vw + 50%);
|
|
2632
|
+
border-radius: 0;
|
|
2633
|
+
}
|
|
2634
|
+
|
|
2635
|
+
& iframe,
|
|
2636
|
+
& > * {
|
|
2637
|
+
width: 100%;
|
|
2638
|
+
height: 100%;
|
|
2639
|
+
border: 0;
|
|
2640
|
+
display: block;
|
|
2641
|
+
}
|
|
2642
|
+
|
|
2643
|
+
/* Invisible viewport sentinel for the IntersectionObserver that pauses the preview off-screen.
|
|
2644
|
+
Absolute + pointer-events:none so it neither takes layout space (undoing the greedy child sizing
|
|
2645
|
+
above) nor blocks the preview controls. */
|
|
2646
|
+
& > [data-preview-viewport] {
|
|
2647
|
+
position: absolute;
|
|
2648
|
+
inset: 0;
|
|
2649
|
+
pointer-events: none;
|
|
2650
|
+
z-index: 0;
|
|
2651
|
+
}
|
|
2652
|
+
|
|
2653
|
+
& > [data-preview-toggle] {
|
|
2654
|
+
position: absolute;
|
|
2655
|
+
top: 16px;
|
|
2656
|
+
left: 16px;
|
|
2657
|
+
z-index: 2;
|
|
2658
|
+
width: auto;
|
|
2659
|
+
height: auto;
|
|
2660
|
+
display: inline-flex;
|
|
2661
|
+
gap: 2px;
|
|
2662
|
+
padding: 3px;
|
|
2663
|
+
background: rgba(255, 255, 255, 0.92);
|
|
2664
|
+
border: 1px solid ${R.line};
|
|
2665
|
+
border-radius: 999px;
|
|
2666
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
|
|
2667
|
+
|
|
2668
|
+
/* Bottom-right on mobile, and the two buttons meet directly: the design draws one clipped group, so the
|
|
2669
|
+
container carries no fill, gap or padding of its own there. */
|
|
2670
|
+
${ve.maxWidth("lg")} {
|
|
2671
|
+
top: auto;
|
|
2672
|
+
left: auto;
|
|
2673
|
+
right: 16px;
|
|
2674
|
+
bottom: 16px;
|
|
2675
|
+
gap: 0;
|
|
2676
|
+
padding: 0;
|
|
2677
|
+
background: none;
|
|
2678
|
+
border: 0;
|
|
2679
|
+
box-shadow: none;
|
|
2680
|
+
overflow: hidden;
|
|
2681
|
+
}
|
|
2682
|
+
}
|
|
2683
|
+
|
|
2684
|
+
& > [data-preview-note] {
|
|
2685
|
+
position: absolute;
|
|
2686
|
+
bottom: 14px;
|
|
2687
|
+
left: 50%;
|
|
2688
|
+
transform: translateX(-50%);
|
|
2689
|
+
z-index: 2;
|
|
2690
|
+
width: auto;
|
|
2691
|
+
height: auto;
|
|
2692
|
+
max-width: 88%;
|
|
2693
|
+
margin: 0;
|
|
2694
|
+
text-align: center;
|
|
2695
|
+
background: rgba(22, 21, 24, 0.78);
|
|
2696
|
+
color: ${R.white};
|
|
2697
|
+
font-size: 12px;
|
|
2698
|
+
font-weight: 500;
|
|
2699
|
+
padding: 6px 12px;
|
|
2700
|
+
border-radius: 999px;
|
|
2701
|
+
}
|
|
2702
|
+
|
|
2703
|
+
& > [data-preview-loading] {
|
|
2704
|
+
position: absolute;
|
|
2705
|
+
inset: 0;
|
|
2706
|
+
z-index: 1;
|
|
2707
|
+
display: flex;
|
|
2708
|
+
align-items: center;
|
|
2709
|
+
justify-content: center;
|
|
2710
|
+
width: 100%;
|
|
2711
|
+
height: 100%;
|
|
2712
|
+
background: transparent;
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2715
|
+
& > [data-fav-preview] {
|
|
2716
|
+
display: none;
|
|
2717
|
+
}
|
|
2718
|
+
|
|
2719
|
+
/* Bottom-LEFT: the emote controls and the preview note both own the bottom centre, and the mobile
|
|
2720
|
+
wearable/avatar toggle owns the bottom right, so this is the one free corner on every route. */
|
|
2721
|
+
& > [data-play-showcase] {
|
|
2722
|
+
position: absolute;
|
|
2723
|
+
bottom: 16px;
|
|
2724
|
+
left: 16px;
|
|
2725
|
+
z-index: 2;
|
|
2726
|
+
width: auto;
|
|
2727
|
+
height: auto;
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2730
|
+
${ve.maxWidth("lg")} {
|
|
2731
|
+
& > [data-preview-toggle] {
|
|
2732
|
+
top: auto;
|
|
2733
|
+
left: auto;
|
|
2734
|
+
bottom: 12px;
|
|
2735
|
+
right: 12px;
|
|
2736
|
+
gap: 0;
|
|
2737
|
+
padding: 0;
|
|
2738
|
+
background: transparent;
|
|
2739
|
+
border: 0;
|
|
2740
|
+
box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
|
|
2741
|
+
overflow: hidden;
|
|
2742
|
+
}
|
|
2743
|
+
& > [data-fav-preview] {
|
|
2744
|
+
display: grid;
|
|
2745
|
+
position: absolute;
|
|
2746
|
+
top: 12px;
|
|
2747
|
+
right: 12px;
|
|
2748
|
+
z-index: 3;
|
|
2749
|
+
width: 40px;
|
|
2750
|
+
height: 40px;
|
|
2751
|
+
background: rgba(255, 255, 255, 0.92);
|
|
2752
|
+
box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
|
|
2753
|
+
}
|
|
2754
|
+
& > [data-fav-preview]:hover {
|
|
2755
|
+
background: ${R.white};
|
|
2756
|
+
}
|
|
2757
|
+
}
|
|
2758
|
+
`,_0=g.div``;g.span`
|
|
2759
|
+
position: absolute;
|
|
2760
|
+
inset: 0;
|
|
2761
|
+
width: 100%;
|
|
2762
|
+
height: 100%;
|
|
2763
|
+
border-radius: inherit;
|
|
2764
|
+
`;const j0=g.div`
|
|
2765
|
+
display: flex;
|
|
2766
|
+
flex-direction: column;
|
|
2767
|
+
gap: 0;
|
|
2768
|
+
`,I0=g.div`
|
|
2769
|
+
display: flex;
|
|
2770
|
+
align-items: flex-start;
|
|
2771
|
+
justify-content: space-between;
|
|
2772
|
+
gap: 12px;
|
|
2773
|
+
|
|
2774
|
+
${ve.maxWidth("lg")} {
|
|
2775
|
+
order: 0;
|
|
2776
|
+
}
|
|
2777
|
+
`,P0=g.h1`
|
|
2778
|
+
font-size: 28px;
|
|
2779
|
+
font-weight: 600;
|
|
2780
|
+
line-height: 34px;
|
|
2781
|
+
color: ${R.softWhite};
|
|
2782
|
+
|
|
2783
|
+
${ve.maxWidth("lg")} {
|
|
2784
|
+
font-size: 20px;
|
|
2785
|
+
line-height: 24px;
|
|
2786
|
+
}
|
|
2787
|
+
`,Ws=g.button`
|
|
2788
|
+
flex: none;
|
|
2789
|
+
width: 40px;
|
|
2790
|
+
height: 40px;
|
|
2791
|
+
border-radius: 50%;
|
|
2792
|
+
border: 0;
|
|
2793
|
+
background: rgba(255, 255, 255, 0.16);
|
|
2794
|
+
display: grid;
|
|
2795
|
+
place-items: center;
|
|
2796
|
+
color: ${R.softWhite};
|
|
2797
|
+
cursor: pointer;
|
|
2798
|
+
transition:
|
|
2799
|
+
color 0.12s ease,
|
|
2800
|
+
background 0.12s ease;
|
|
2801
|
+
|
|
2802
|
+
&:hover {
|
|
2803
|
+
background: rgba(255, 255, 255, 0.28);
|
|
2804
|
+
}
|
|
2805
|
+
&[data-on] {
|
|
2806
|
+
color: ${R.dclRed};
|
|
2807
|
+
}
|
|
2808
|
+
|
|
2809
|
+
${ve.maxWidth("lg")} {
|
|
2810
|
+
color: ${R.text};
|
|
2811
|
+
&[data-fav-title] {
|
|
2812
|
+
display: none;
|
|
2813
|
+
}
|
|
2814
|
+
}
|
|
2815
|
+
`,E0=g.button`
|
|
2816
|
+
display: inline-flex;
|
|
2817
|
+
align-items: center;
|
|
2818
|
+
gap: 8px;
|
|
2819
|
+
padding: 8px 14px;
|
|
2820
|
+
border: 1px solid ${R.line};
|
|
2821
|
+
border-radius: ${Tn.pill};
|
|
2822
|
+
background: rgba(255, 255, 255, 0.94);
|
|
2823
|
+
backdrop-filter: blur(6px);
|
|
2824
|
+
box-shadow: 0 2px 10px rgba(22, 21, 24, 0.12);
|
|
2825
|
+
color: ${R.text};
|
|
2826
|
+
font-size: 13px;
|
|
2827
|
+
font-weight: 600;
|
|
2828
|
+
cursor: pointer;
|
|
2829
|
+
transition: background 0.12s ease;
|
|
2830
|
+
|
|
2831
|
+
&:hover {
|
|
2832
|
+
background: ${R.white};
|
|
2833
|
+
}
|
|
2834
|
+
&:focus-visible {
|
|
2835
|
+
outline: 2px solid ${R.accent};
|
|
2836
|
+
outline-offset: 2px;
|
|
2837
|
+
}
|
|
2838
|
+
`,xn=g.div`
|
|
2839
|
+
display: inline-flex;
|
|
2840
|
+
align-items: center;
|
|
2841
|
+
gap: 5px;
|
|
2842
|
+
font-size: 12px;
|
|
2843
|
+
font-weight: 500;
|
|
2844
|
+
text-transform: uppercase;
|
|
2845
|
+
letter-spacing: 0;
|
|
2846
|
+
color: ${R.gray4};
|
|
2847
|
+
`,T0=g.div`
|
|
2848
|
+
display: flex;
|
|
2849
|
+
align-items: center;
|
|
2850
|
+
gap: 8px;
|
|
2851
|
+
flex-wrap: wrap;
|
|
2852
|
+
margin-top: 12px;
|
|
2853
|
+
|
|
2854
|
+
${ve.maxWidth("lg")} {
|
|
2855
|
+
order: 1;
|
|
2856
|
+
margin-top: 10px;
|
|
2857
|
+
}
|
|
2858
|
+
`,rt=g(fc)`
|
|
2859
|
+
height: 24px;
|
|
2860
|
+
padding: 0 8px;
|
|
2861
|
+
gap: 3px;
|
|
2862
|
+
font-size: 13px;
|
|
2863
|
+
font-weight: 500;
|
|
2864
|
+
border-radius: 4px;
|
|
2865
|
+
letter-spacing: 0.02em;
|
|
2866
|
+
text-transform: uppercase;
|
|
2867
|
+
background: rgba(255, 255, 255, 0.14);
|
|
2868
|
+
color: ${R.softWhite};
|
|
2869
|
+
|
|
2870
|
+
& .ico {
|
|
2871
|
+
color: ${R.softWhite};
|
|
2872
|
+
}
|
|
2873
|
+
&[data-variant='cat'] {
|
|
2874
|
+
background: rgba(255, 255, 255, 0.14);
|
|
2875
|
+
color: ${R.softWhite};
|
|
2876
|
+
}
|
|
2877
|
+
|
|
2878
|
+
/* The blocked-VRM-export badge. Warning orange, tinted at 20% for the fill — the marketplace's own
|
|
2879
|
+
#ff7439 on #ff743933, kept identical so the same restriction reads the same in both places. It is the
|
|
2880
|
+
one chip in this row that reports a limitation rather than a feature, and it should not blend in. */
|
|
2881
|
+
&[data-variant='blocked'] {
|
|
2882
|
+
background: rgba(255, 116, 57, 0.2);
|
|
2883
|
+
color: #ff7439;
|
|
2884
|
+
cursor: help;
|
|
2885
|
+
}
|
|
2886
|
+
&[data-variant='blocked']:focus-visible {
|
|
2887
|
+
outline: 2px solid #ff7439;
|
|
2888
|
+
outline-offset: 2px;
|
|
2889
|
+
}
|
|
2890
|
+
`,Oa=g(rt.withComponent(sc))`
|
|
2891
|
+
text-decoration: none;
|
|
2892
|
+
cursor: pointer;
|
|
2893
|
+
transition: background 0.15s ease;
|
|
2894
|
+
|
|
2895
|
+
&:hover,
|
|
2896
|
+
&:focus-visible {
|
|
2897
|
+
background: rgba(255, 255, 255, 0.26);
|
|
2898
|
+
}
|
|
2899
|
+
|
|
2900
|
+
/* The rarity chip carries its own colour inline, so a background hover would be overridden and the
|
|
2901
|
+
chip would look inert. It gets a ring instead, which reads on any fill. */
|
|
2902
|
+
&[data-variant='rarity']:hover,
|
|
2903
|
+
&[data-variant='rarity']:focus-visible {
|
|
2904
|
+
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
|
|
2905
|
+
}
|
|
2906
|
+
`,$0=g.div`
|
|
2907
|
+
display: flex;
|
|
2908
|
+
flex-direction: column;
|
|
2909
|
+
align-items: flex-start;
|
|
2910
|
+
gap: 8px;
|
|
2911
|
+
`,Xa=g($0)`
|
|
2912
|
+
gap: 11px;
|
|
2913
|
+
`,Bs=g.p`
|
|
2914
|
+
margin: 0;
|
|
2915
|
+
color: ${R.softWhite};
|
|
2916
|
+
font-size: 14px;
|
|
2917
|
+
line-height: 30px;
|
|
2918
|
+
display: -webkit-box;
|
|
2919
|
+
-webkit-box-orient: vertical;
|
|
2920
|
+
-webkit-line-clamp: 4;
|
|
2921
|
+
overflow: hidden;
|
|
2922
|
+
|
|
2923
|
+
&[data-expanded] {
|
|
2924
|
+
-webkit-line-clamp: unset;
|
|
2925
|
+
overflow: visible;
|
|
2926
|
+
}
|
|
2927
|
+
`,N0=g.button`
|
|
2928
|
+
font-size: 13px;
|
|
2929
|
+
align-self: flex-start;
|
|
2930
|
+
`,Sl=Pn`
|
|
2931
|
+
display: grid;
|
|
2932
|
+
grid-template-columns: 1fr 1fr;
|
|
2933
|
+
gap: 16px;
|
|
2934
|
+
`,Ml=g.div`
|
|
2935
|
+
${Sl};
|
|
2936
|
+
/* Clears the chips above. The pair below sits at 32px, so this is the tighter of the two steps: the
|
|
2937
|
+
description belongs to the heading block it follows, the creator/collection pair is a new subject. */
|
|
2938
|
+
margin-top: 24px;
|
|
2939
|
+
|
|
2940
|
+
${ve.maxWidth("lg")} {
|
|
2941
|
+
order: 3;
|
|
2942
|
+
grid-template-columns: 1fr;
|
|
2943
|
+
/* Stacked, the two blocks need real separation — as one column they would read as one paragraph. */
|
|
2944
|
+
gap: 20px;
|
|
2945
|
+
margin-top: 20px;
|
|
2946
|
+
}
|
|
2947
|
+
`,Ja=g.div`
|
|
2948
|
+
min-width: 0;
|
|
2949
|
+
`,_l=g.div`
|
|
2950
|
+
${Sl};
|
|
2951
|
+
margin-top: 32px;
|
|
2952
|
+
|
|
2953
|
+
${ve.maxWidth("lg")} {
|
|
2954
|
+
order: 2;
|
|
2955
|
+
margin-top: 20px;
|
|
2956
|
+
}
|
|
2957
|
+
`,Kn=g.div`
|
|
2958
|
+
display: flex;
|
|
2959
|
+
flex-direction: column;
|
|
2960
|
+
gap: 15px;
|
|
2961
|
+
min-width: 0;
|
|
2962
|
+
|
|
2963
|
+
&[data-collection] {
|
|
2964
|
+
align-items: flex-start;
|
|
2965
|
+
}
|
|
2966
|
+
`,jl=Pn`
|
|
2967
|
+
&[data-testid='creator'] {
|
|
2968
|
+
color: ${R.softWhite};
|
|
2969
|
+
font-size: 14px;
|
|
2970
|
+
gap: 12px;
|
|
2971
|
+
}
|
|
2972
|
+
[data-avatar] {
|
|
2973
|
+
width: 48px;
|
|
2974
|
+
height: 48px;
|
|
2975
|
+
}
|
|
2976
|
+
[data-letter] {
|
|
2977
|
+
font-size: 18px;
|
|
2978
|
+
}
|
|
2979
|
+
[data-testid='creator-name'] {
|
|
2980
|
+
color: ${R.softWhite};
|
|
2981
|
+
font-weight: 500;
|
|
2982
|
+
text-decoration: underline;
|
|
2983
|
+
}
|
|
2984
|
+
&[data-link]:hover [data-testid='creator-name'] {
|
|
2985
|
+
color: ${R.gray4};
|
|
2986
|
+
}
|
|
2987
|
+
`,O0=g(Od)`
|
|
2988
|
+
${jl}
|
|
2989
|
+
`,R0=g(x0)`
|
|
2990
|
+
${jl}
|
|
2991
|
+
`,Il=g.hr`
|
|
2992
|
+
border: 0;
|
|
2993
|
+
border-top: 1px solid rgba(255, 255, 255, 0.3);
|
|
2994
|
+
margin: 24px 0 0;
|
|
2995
|
+
width: 100%;
|
|
2996
|
+
|
|
2997
|
+
/* Below the price, not above it: the design hangs this off the bottom of the buy section (2090:399782),
|
|
2998
|
+
so it closes the price rather than separating it from the description. */
|
|
2999
|
+
${ve.maxWidth("lg")} {
|
|
3000
|
+
order: 5;
|
|
3001
|
+
margin-top: 16px;
|
|
3002
|
+
}
|
|
3003
|
+
`,A0=g.div`
|
|
3004
|
+
margin-top: 16px;
|
|
3005
|
+
|
|
3006
|
+
${ve.maxWidth("lg")} {
|
|
3007
|
+
order: 4;
|
|
3008
|
+
margin-top: 16px;
|
|
3009
|
+
}
|
|
3010
|
+
`,L0=g.div`
|
|
3011
|
+
display: flex;
|
|
3012
|
+
align-items: flex-start;
|
|
3013
|
+
gap: 16px;
|
|
3014
|
+
width: 100%;
|
|
3015
|
+
`,F0=g.div`
|
|
3016
|
+
flex: 1 1 auto;
|
|
3017
|
+
min-width: 0;
|
|
3018
|
+
display: flex;
|
|
3019
|
+
flex-direction: column;
|
|
3020
|
+
gap: 8px;
|
|
3021
|
+
`,Hs=g.div`
|
|
3022
|
+
flex: 0 0 auto;
|
|
3023
|
+
display: flex;
|
|
3024
|
+
flex-direction: column;
|
|
3025
|
+
align-items: flex-end;
|
|
3026
|
+
gap: 8px;
|
|
3027
|
+
text-align: right;
|
|
3028
|
+
`,zs=g.div`
|
|
3029
|
+
font-size: 18px;
|
|
3030
|
+
font-weight: 500;
|
|
3031
|
+
line-height: 1;
|
|
3032
|
+
color: ${R.softWhite};
|
|
3033
|
+
|
|
3034
|
+
&[data-out] {
|
|
3035
|
+
font-size: 14px;
|
|
3036
|
+
font-weight: 600;
|
|
3037
|
+
text-transform: uppercase;
|
|
3038
|
+
letter-spacing: 0.02em;
|
|
3039
|
+
color: ${R.gray4};
|
|
3040
|
+
}
|
|
3041
|
+
`,qs=g.div`
|
|
3042
|
+
font-size: 14px;
|
|
3043
|
+
font-weight: 600;
|
|
3044
|
+
text-transform: uppercase;
|
|
3045
|
+
letter-spacing: 0;
|
|
3046
|
+
color: ${R.muted2};
|
|
3047
|
+
`,yn=g.div`
|
|
3048
|
+
display: flex;
|
|
3049
|
+
align-items: center;
|
|
3050
|
+
gap: 10px;
|
|
3051
|
+
font-weight: 700;
|
|
3052
|
+
color: ${R.softWhite};
|
|
3053
|
+
|
|
3054
|
+
/* Not for sale: "Not for Sale" + an info tooltip, 14px semibold, no PRICE label. */
|
|
3055
|
+
&[data-variant='none'] {
|
|
3056
|
+
display: inline-flex;
|
|
3057
|
+
align-items: center;
|
|
3058
|
+
gap: 6px;
|
|
3059
|
+
font-size: 14px;
|
|
3060
|
+
font-weight: 600;
|
|
3061
|
+
color: ${R.softWhite};
|
|
3062
|
+
}
|
|
3063
|
+
&[data-variant='sale'] {
|
|
3064
|
+
flex-wrap: wrap;
|
|
3065
|
+
gap: 10px 14px;
|
|
3066
|
+
color: ${R.dclRed};
|
|
3067
|
+
}
|
|
3068
|
+
`;g.span`
|
|
3069
|
+
display: flex;
|
|
3070
|
+
align-items: center;
|
|
3071
|
+
gap: 10px;
|
|
3072
|
+
font-weight: 700;
|
|
3073
|
+
color: ${R.dclRed};
|
|
3074
|
+
`;const Bn=g.span`
|
|
3075
|
+
font-size: 30px;
|
|
3076
|
+
line-height: 1;
|
|
3077
|
+
`,Y0=g.span`
|
|
3078
|
+
display: inline-flex;
|
|
3079
|
+
color: ${R.muted2};
|
|
3080
|
+
cursor: help;
|
|
3081
|
+
|
|
3082
|
+
&:focus-visible {
|
|
3083
|
+
outline: 2px solid ${R.accent};
|
|
3084
|
+
outline-offset: 2px;
|
|
3085
|
+
border-radius: ${Tn.chip};
|
|
3086
|
+
}
|
|
3087
|
+
`,W0=g.span`
|
|
3088
|
+
font-size: 24px;
|
|
3089
|
+
font-weight: 700;
|
|
3090
|
+
color: ${R.softWhite};
|
|
3091
|
+
margin-right: -2px;
|
|
3092
|
+
`,B0=g.div`
|
|
3093
|
+
font-size: 13px;
|
|
3094
|
+
margin-top: 6px;
|
|
3095
|
+
color: ${R.gray4};
|
|
3096
|
+
`,H0=g.span`
|
|
3097
|
+
display: inline-flex;
|
|
3098
|
+
align-items: center;
|
|
3099
|
+
gap: 6px;
|
|
3100
|
+
color: ${R.muted};
|
|
3101
|
+
text-decoration: line-through;
|
|
3102
|
+
font-weight: 600;
|
|
3103
|
+
font-size: 20px;
|
|
3104
|
+
`,z0=g.span`
|
|
3105
|
+
display: inline-flex;
|
|
3106
|
+
align-items: center;
|
|
3107
|
+
background: ${R.dclRed};
|
|
3108
|
+
color: ${R.white};
|
|
3109
|
+
font-weight: 800;
|
|
3110
|
+
font-size: 13px;
|
|
3111
|
+
letter-spacing: 0.03em;
|
|
3112
|
+
text-transform: uppercase;
|
|
3113
|
+
border-radius: 6px;
|
|
3114
|
+
padding: 4px 10px;
|
|
3115
|
+
`,q0=g(Rd)`
|
|
3116
|
+
display: inline-flex;
|
|
3117
|
+
align-items: center;
|
|
3118
|
+
gap: 5px;
|
|
3119
|
+
background: ${R.rarityBg};
|
|
3120
|
+
color: ${R.accent};
|
|
3121
|
+
font-size: 13px;
|
|
3122
|
+
font-weight: 700;
|
|
3123
|
+
border-radius: 6px;
|
|
3124
|
+
padding: 4px 10px;
|
|
3125
|
+
white-space: nowrap;
|
|
3126
|
+
`,K0=g.div`
|
|
3127
|
+
display: flex;
|
|
3128
|
+
flex-direction: column;
|
|
3129
|
+
gap: 12px;
|
|
3130
|
+
margin-top: 20px;
|
|
3131
|
+
|
|
3132
|
+
${ve.maxWidth("lg")} {
|
|
3133
|
+
order: 6;
|
|
3134
|
+
|
|
3135
|
+
&[data-buttons] {
|
|
3136
|
+
position: fixed;
|
|
3137
|
+
left: 0;
|
|
3138
|
+
right: 0;
|
|
3139
|
+
bottom: 0;
|
|
3140
|
+
z-index: 40;
|
|
3141
|
+
margin-top: 0;
|
|
3142
|
+
padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
|
|
3143
|
+
background: #2b0e44;
|
|
3144
|
+
box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
|
|
3145
|
+
}
|
|
3146
|
+
&[data-dual] {
|
|
3147
|
+
flex-direction: row;
|
|
3148
|
+
align-items: stretch;
|
|
3149
|
+
gap: 12px;
|
|
3150
|
+
}
|
|
3151
|
+
}
|
|
3152
|
+
`,sa=Pn`
|
|
3153
|
+
&& {
|
|
3154
|
+
width: 100%;
|
|
3155
|
+
height: 48px;
|
|
3156
|
+
border-radius: 16px;
|
|
3157
|
+
padding: 0 12px;
|
|
3158
|
+
display: flex;
|
|
3159
|
+
align-items: center;
|
|
3160
|
+
justify-content: center;
|
|
3161
|
+
gap: 8px;
|
|
3162
|
+
font-size: 15px;
|
|
3163
|
+
font-weight: 600;
|
|
3164
|
+
line-height: 24px;
|
|
3165
|
+
letter-spacing: 0.46px;
|
|
3166
|
+
text-transform: uppercase;
|
|
3167
|
+
}
|
|
3168
|
+
`,Ra=g(In)`
|
|
3169
|
+
${sa};
|
|
3170
|
+
/* The design system's primary fill (Figma 867:61063 carries the "BUY Button" gradient), same as the
|
|
3171
|
+
cart's CHECKOUT and the credits CTA. This read as a flat #fb5c19 for a while — that colour was
|
|
3172
|
+
sampled off the flattened render rather than the node's fill. */
|
|
3173
|
+
&& {
|
|
3174
|
+
background: ${b0.buyBtn};
|
|
3175
|
+
}
|
|
3176
|
+
&&::before {
|
|
3177
|
+
content: none;
|
|
3178
|
+
}
|
|
3179
|
+
&&:hover:not(:disabled) {
|
|
3180
|
+
background-image: linear-gradient(${R.dclRed}, ${R.dclRed});
|
|
3181
|
+
}
|
|
3182
|
+
|
|
3183
|
+
${ve.maxWidth("lg")} {
|
|
3184
|
+
[data-dual] && {
|
|
3185
|
+
flex: 1 1 auto;
|
|
3186
|
+
width: auto;
|
|
3187
|
+
}
|
|
3188
|
+
}
|
|
3189
|
+
`,Q0=g(In)`
|
|
3190
|
+
${sa};
|
|
3191
|
+
&& {
|
|
3192
|
+
background: ${R.blackBtn};
|
|
3193
|
+
color: ${R.softWhite};
|
|
3194
|
+
border: 0;
|
|
3195
|
+
|
|
3196
|
+
.ico {
|
|
3197
|
+
width: 20px;
|
|
3198
|
+
height: 20px;
|
|
3199
|
+
}
|
|
3200
|
+
}
|
|
3201
|
+
&&:hover:not(:disabled) {
|
|
3202
|
+
background: ${R.blackBtn};
|
|
3203
|
+
filter: brightness(1.35);
|
|
3204
|
+
}
|
|
3205
|
+
`,Sr=g.button`
|
|
3206
|
+
align-self: center;
|
|
3207
|
+
border: 0;
|
|
3208
|
+
background: none;
|
|
3209
|
+
padding: 8px 0;
|
|
3210
|
+
color: ${u.colors.accent};
|
|
3211
|
+
font-weight: 600;
|
|
3212
|
+
font-size: 13px;
|
|
3213
|
+
line-height: 24px;
|
|
3214
|
+
letter-spacing: 0.46px;
|
|
3215
|
+
text-transform: uppercase;
|
|
3216
|
+
text-decoration: underline;
|
|
3217
|
+
cursor: pointer;
|
|
3218
|
+
|
|
3219
|
+
/* Opt-in for the uses that sit directly on the purple field, where the accent purple above is all
|
|
3220
|
+
but invisible against it. Not a change to the shared colour: the other uses live inside
|
|
3221
|
+
GaslessNotice, whose light fill is what that accent was picked for. */
|
|
3222
|
+
&[data-on-purple] {
|
|
3223
|
+
color: ${u.colors.white};
|
|
3224
|
+
}
|
|
3225
|
+
|
|
3226
|
+
&:disabled {
|
|
3227
|
+
opacity: 0.5;
|
|
3228
|
+
cursor: default;
|
|
3229
|
+
}
|
|
3230
|
+
`,V0=g(In)`
|
|
3231
|
+
${sa};
|
|
3232
|
+
&& {
|
|
3233
|
+
background: rgba(255, 255, 255, 0.2);
|
|
3234
|
+
color: ${R.softWhite};
|
|
3235
|
+
border: 0;
|
|
3236
|
+
|
|
3237
|
+
.ico {
|
|
3238
|
+
width: 20px;
|
|
3239
|
+
height: 20px;
|
|
3240
|
+
}
|
|
3241
|
+
}
|
|
3242
|
+
&&:hover:not(:disabled) {
|
|
3243
|
+
background: rgba(255, 255, 255, 0.3);
|
|
3244
|
+
}
|
|
3245
|
+
&&:disabled {
|
|
3246
|
+
opacity: 0.5;
|
|
3247
|
+
}
|
|
3248
|
+
`,Ks=g(In)`
|
|
3249
|
+
${sa};
|
|
3250
|
+
&& {
|
|
3251
|
+
background: rgba(0, 0, 0, 0.4);
|
|
3252
|
+
color: ${R.white};
|
|
3253
|
+
border: 0;
|
|
3254
|
+
}
|
|
3255
|
+
&&:hover:not(:disabled) {
|
|
3256
|
+
background: rgba(0, 0, 0, 0.55);
|
|
3257
|
+
}
|
|
3258
|
+
&&:disabled {
|
|
3259
|
+
opacity: 0.5;
|
|
3260
|
+
}
|
|
3261
|
+
`,Aa=g.span`
|
|
3262
|
+
display: none;
|
|
3263
|
+
align-items: center;
|
|
3264
|
+
gap: 6px;
|
|
3265
|
+
|
|
3266
|
+
${ve.maxWidth("lg")} {
|
|
3267
|
+
[data-dual] & {
|
|
3268
|
+
display: inline-flex;
|
|
3269
|
+
}
|
|
3270
|
+
}
|
|
3271
|
+
`,Qs=g.button`
|
|
3272
|
+
width: 100%;
|
|
3273
|
+
height: 48px;
|
|
3274
|
+
display: flex;
|
|
3275
|
+
align-items: center;
|
|
3276
|
+
justify-content: center;
|
|
3277
|
+
gap: 8px;
|
|
3278
|
+
/* Dark-theme test: translucent white pill, white label (Figma 867:61064) — same secondary
|
|
3279
|
+
treatment as the card's ADD TO CART. */
|
|
3280
|
+
background: rgba(255, 255, 255, 0.2);
|
|
3281
|
+
color: ${R.softWhite};
|
|
3282
|
+
border: 0;
|
|
3283
|
+
border-radius: 16px;
|
|
3284
|
+
font-weight: 600;
|
|
3285
|
+
font-size: 15px;
|
|
3286
|
+
text-transform: uppercase;
|
|
3287
|
+
letter-spacing: 0.46px;
|
|
3288
|
+
cursor: pointer;
|
|
3289
|
+
transition: background 0.15s ease;
|
|
3290
|
+
|
|
3291
|
+
&:hover:not(:disabled) {
|
|
3292
|
+
background: ${R.softWhite};
|
|
3293
|
+
color: ${R.text2};
|
|
3294
|
+
}
|
|
3295
|
+
&:disabled {
|
|
3296
|
+
background: rgba(255, 255, 255, 0.12);
|
|
3297
|
+
color: rgba(252, 252, 252, 0.7);
|
|
3298
|
+
cursor: default;
|
|
3299
|
+
}
|
|
3300
|
+
|
|
3301
|
+
${ve.maxWidth("lg")} {
|
|
3302
|
+
[data-dual] & {
|
|
3303
|
+
flex: 0 0 auto;
|
|
3304
|
+
width: 56px;
|
|
3305
|
+
padding: 0;
|
|
3306
|
+
}
|
|
3307
|
+
[data-dual] & .ico {
|
|
3308
|
+
margin: 0;
|
|
3309
|
+
}
|
|
3310
|
+
}
|
|
3311
|
+
`,Vs=g.span`
|
|
3312
|
+
${ve.maxWidth("lg")} {
|
|
3313
|
+
[data-dual] & {
|
|
3314
|
+
display: none;
|
|
3315
|
+
}
|
|
3316
|
+
}
|
|
3317
|
+
`,U0=g.p`
|
|
3318
|
+
margin: 12px 0 0;
|
|
3319
|
+
font-size: 13px;
|
|
3320
|
+
color: ${R.gray4};
|
|
3321
|
+
|
|
3322
|
+
& a {
|
|
3323
|
+
color: ${R.softWhite};
|
|
3324
|
+
font-weight: 600;
|
|
3325
|
+
}
|
|
3326
|
+
`,G0=g.p`
|
|
3327
|
+
margin: 4px 0 0;
|
|
3328
|
+
font-size: 13px;
|
|
3329
|
+
color: ${R.gray4};
|
|
3330
|
+
|
|
3331
|
+
& a {
|
|
3332
|
+
color: ${R.accent};
|
|
3333
|
+
font-weight: 600;
|
|
3334
|
+
}
|
|
3335
|
+
`,X0=g.div`
|
|
3336
|
+
max-width: 1721px;
|
|
3337
|
+
margin: 0 auto;
|
|
3338
|
+
min-height: 46vh;
|
|
3339
|
+
display: flex;
|
|
3340
|
+
flex-direction: column;
|
|
3341
|
+
align-items: center;
|
|
3342
|
+
justify-content: center;
|
|
3343
|
+
text-align: center;
|
|
3344
|
+
gap: 14px;
|
|
3345
|
+
color: ${R.softWhite};
|
|
3346
|
+
`,J0=g.p`
|
|
3347
|
+
margin: 0;
|
|
3348
|
+
color: ${R.gray4};
|
|
3349
|
+
`,Z0=g(In)`
|
|
3350
|
+
margin-top: 6px;
|
|
3351
|
+
`,ew=g(V)`
|
|
3352
|
+
opacity: 0.4;
|
|
3353
|
+
`,tw=g.h1`
|
|
3354
|
+
font-size: 22px;
|
|
3355
|
+
`,nw=g.div`
|
|
3356
|
+
display: flex;
|
|
3357
|
+
flex-direction: column;
|
|
3358
|
+
`,Us=g.span`
|
|
3359
|
+
display: block;
|
|
3360
|
+
height: 15px;
|
|
3361
|
+
width: 84px;
|
|
3362
|
+
border-radius: 4px;
|
|
3363
|
+
`,rw=g.div`
|
|
3364
|
+
display: flex;
|
|
3365
|
+
flex-direction: column;
|
|
3366
|
+
align-self: stretch;
|
|
3367
|
+
gap: 16px;
|
|
3368
|
+
padding: 8px 0;
|
|
3369
|
+
`,aw=g.span`
|
|
3370
|
+
display: inline-flex;
|
|
3371
|
+
align-items: center;
|
|
3372
|
+
height: 48px;
|
|
3373
|
+
gap: 10px;
|
|
3374
|
+
background: none !important;
|
|
3375
|
+
|
|
3376
|
+
&::before,
|
|
3377
|
+
&::after {
|
|
3378
|
+
content: '';
|
|
3379
|
+
display: block;
|
|
3380
|
+
}
|
|
3381
|
+
&::before {
|
|
3382
|
+
width: 40px;
|
|
3383
|
+
height: 40px;
|
|
3384
|
+
border-radius: 50%;
|
|
3385
|
+
background: ${R.media};
|
|
3386
|
+
}
|
|
3387
|
+
&::after {
|
|
3388
|
+
width: 96px;
|
|
3389
|
+
height: 14px;
|
|
3390
|
+
border-radius: 6px;
|
|
3391
|
+
background: ${R.media};
|
|
3392
|
+
}
|
|
3393
|
+
`,ow=g.span`
|
|
3394
|
+
height: 34px;
|
|
3395
|
+
width: 70%;
|
|
3396
|
+
margin: 3px 0;
|
|
3397
|
+
border-radius: 8px;
|
|
3398
|
+
`,iw=g.div`
|
|
3399
|
+
display: flex;
|
|
3400
|
+
gap: 8px;
|
|
3401
|
+
/* Same as Chips above, so the row does not move when the real chips arrive. */
|
|
3402
|
+
margin-top: 12px;
|
|
3403
|
+
`,La=g.span`
|
|
3404
|
+
height: 24px;
|
|
3405
|
+
width: 88px;
|
|
3406
|
+
border-radius: 6px;
|
|
3407
|
+
`,Fa=g.span`
|
|
3408
|
+
height: 14px;
|
|
3409
|
+
width: 100%;
|
|
3410
|
+
border-radius: 6px;
|
|
3411
|
+
|
|
3412
|
+
&[data-short] {
|
|
3413
|
+
width: 55%;
|
|
3414
|
+
}
|
|
3415
|
+
`,sw=g.span`
|
|
3416
|
+
display: block;
|
|
3417
|
+
height: 30px;
|
|
3418
|
+
width: 40%;
|
|
3419
|
+
margin: 16px 0 13px;
|
|
3420
|
+
border-radius: 8px;
|
|
3421
|
+
`,cw=g.span`
|
|
3422
|
+
display: block;
|
|
3423
|
+
height: 42px;
|
|
3424
|
+
width: 100%;
|
|
3425
|
+
border-radius: 8px;
|
|
3426
|
+
margin-top: 20px;
|
|
3427
|
+
`,Hn=g(Re)`
|
|
3428
|
+
width: 30px;
|
|
3429
|
+
height: 30px;
|
|
3430
|
+
color: ${R.softWhite};
|
|
3431
|
+
|
|
3432
|
+
&[data-was] {
|
|
3433
|
+
width: 20px;
|
|
3434
|
+
height: 20px;
|
|
3435
|
+
color: ${R.gray4};
|
|
3436
|
+
}
|
|
3437
|
+
`,Ya=g(Re)`
|
|
3438
|
+
width: 20px;
|
|
3439
|
+
height: 20px;
|
|
3440
|
+
`,lw=g.div`
|
|
3441
|
+
display: flex;
|
|
3442
|
+
align-items: center;
|
|
3443
|
+
justify-content: space-between;
|
|
3444
|
+
gap: 8px;
|
|
3445
|
+
padding: 8px;
|
|
3446
|
+
margin: 16px 0;
|
|
3447
|
+
border-radius: ${Tn.btn};
|
|
3448
|
+
background: rgba(22, 21, 24, 0.55);
|
|
3449
|
+
`,dw=g.span`
|
|
3450
|
+
display: flex;
|
|
3451
|
+
align-items: center;
|
|
3452
|
+
gap: 8px;
|
|
3453
|
+
font-size: 14px;
|
|
3454
|
+
line-height: 14px;
|
|
3455
|
+
color: ${R.softWhite};
|
|
3456
|
+
`,uw=g(V)`
|
|
3457
|
+
width: 20px;
|
|
3458
|
+
height: 20px;
|
|
3459
|
+
color: ${R.softWhite};
|
|
3460
|
+
`,pw=g(V)`
|
|
3461
|
+
width: 24px;
|
|
3462
|
+
height: 24px;
|
|
3463
|
+
color: ${R.white};
|
|
3464
|
+
`,fw=g.div`
|
|
3465
|
+
display: flex;
|
|
3466
|
+
align-items: center;
|
|
3467
|
+
justify-content: space-between;
|
|
3468
|
+
gap: 8px;
|
|
3469
|
+
width: 100%;
|
|
3470
|
+
margin-top: 16px;
|
|
3471
|
+
|
|
3472
|
+
&[data-centered] {
|
|
3473
|
+
justify-content: center;
|
|
3474
|
+
}
|
|
3475
|
+
`,hw=g.span`
|
|
3476
|
+
display: flex;
|
|
3477
|
+
align-items: center;
|
|
3478
|
+
gap: 2px;
|
|
3479
|
+
font-size: 14px;
|
|
3480
|
+
font-weight: 600;
|
|
3481
|
+
color: ${R.gray4};
|
|
3482
|
+
|
|
3483
|
+
& .ico {
|
|
3484
|
+
width: 20px;
|
|
3485
|
+
height: 20px;
|
|
3486
|
+
color: ${R.gray4};
|
|
3487
|
+
}
|
|
3488
|
+
`,mw=g.span`
|
|
3489
|
+
font-size: 16px;
|
|
3490
|
+
font-weight: 700;
|
|
3491
|
+
padding-left: 2px;
|
|
3492
|
+
`,Gs=g.button`
|
|
3493
|
+
border: 0;
|
|
3494
|
+
background: none;
|
|
3495
|
+
padding: 0;
|
|
3496
|
+
cursor: pointer;
|
|
3497
|
+
font-family: ${y0.sans};
|
|
3498
|
+
font-size: 13px;
|
|
3499
|
+
font-weight: 600;
|
|
3500
|
+
letter-spacing: 0.46px;
|
|
3501
|
+
text-transform: uppercase;
|
|
3502
|
+
text-decoration: underline;
|
|
3503
|
+
color: ${R.softWhite};
|
|
3504
|
+
|
|
3505
|
+
&:hover {
|
|
3506
|
+
color: ${R.gray4};
|
|
3507
|
+
}
|
|
3508
|
+
&:focus-visible {
|
|
3509
|
+
outline: 2px solid ${R.white};
|
|
3510
|
+
outline-offset: 2px;
|
|
3511
|
+
border-radius: ${Tn.chip};
|
|
3512
|
+
}
|
|
3513
|
+
`,gw=g.div`
|
|
3514
|
+
display: flex;
|
|
3515
|
+
flex-direction: column;
|
|
3516
|
+
gap: 16px;
|
|
3517
|
+
width: 100%;
|
|
3518
|
+
padding: 16px 0;
|
|
3519
|
+
`,Xs=g.div`
|
|
3520
|
+
display: flex;
|
|
3521
|
+
align-items: center;
|
|
3522
|
+
justify-content: space-between;
|
|
3523
|
+
gap: 8px;
|
|
3524
|
+
width: 100%;
|
|
3525
|
+
|
|
3526
|
+
&[data-variant='original'] {
|
|
3527
|
+
color: ${R.muted2};
|
|
3528
|
+
}
|
|
3529
|
+
`,Js=g.span`
|
|
3530
|
+
display: flex;
|
|
3531
|
+
align-items: center;
|
|
3532
|
+
gap: 4px;
|
|
3533
|
+
font-size: 14px;
|
|
3534
|
+
font-weight: 600;
|
|
3535
|
+
|
|
3536
|
+
[data-variant='original'] & {
|
|
3537
|
+
color: ${R.muted2};
|
|
3538
|
+
}
|
|
3539
|
+
[data-variant='resale'] & {
|
|
3540
|
+
color: ${R.text};
|
|
3541
|
+
}
|
|
3542
|
+
`,Zs=g.span`
|
|
3543
|
+
display: flex;
|
|
3544
|
+
align-items: center;
|
|
3545
|
+
gap: 2px;
|
|
3546
|
+
padding: 0 2px;
|
|
3547
|
+
|
|
3548
|
+
[data-variant='original'] & .ico {
|
|
3549
|
+
width: 20px;
|
|
3550
|
+
height: 20px;
|
|
3551
|
+
color: ${R.muted2};
|
|
3552
|
+
}
|
|
3553
|
+
[data-variant='resale'] & .ico {
|
|
3554
|
+
width: 24px;
|
|
3555
|
+
height: 24px;
|
|
3556
|
+
color: ${R.rarity};
|
|
3557
|
+
}
|
|
3558
|
+
`,ec=g.span`
|
|
3559
|
+
[data-variant='original'] & {
|
|
3560
|
+
font-size: 16px;
|
|
3561
|
+
font-weight: 700;
|
|
3562
|
+
text-decoration: line-through;
|
|
3563
|
+
}
|
|
3564
|
+
[data-variant='resale'] & {
|
|
3565
|
+
font-size: 25px;
|
|
3566
|
+
font-weight: 700;
|
|
3567
|
+
color: ${R.text};
|
|
3568
|
+
}
|
|
3569
|
+
`,xw=g.span`
|
|
3570
|
+
font-size: 14px;
|
|
3571
|
+
font-weight: 600;
|
|
3572
|
+
|
|
3573
|
+
[data-variant='original'] & {
|
|
3574
|
+
color: ${R.muted2};
|
|
3575
|
+
}
|
|
3576
|
+
`,yw=g.span`
|
|
3577
|
+
font-size: 14px;
|
|
3578
|
+
font-weight: 600;
|
|
3579
|
+
color: ${R.text2};
|
|
3580
|
+
`,tc=g.span`
|
|
3581
|
+
display: inline-flex;
|
|
3582
|
+
width: 12px;
|
|
3583
|
+
height: 12px;
|
|
3584
|
+
color: ${R.muted2};
|
|
3585
|
+
`,bw=g.div`
|
|
3586
|
+
display: flex;
|
|
3587
|
+
flex-direction: column;
|
|
3588
|
+
gap: 12px;
|
|
3589
|
+
width: 100%;
|
|
3590
|
+
`,vw=g.div`
|
|
3591
|
+
display: flex;
|
|
3592
|
+
justify-content: center;
|
|
3593
|
+
`,ca=Pn`
|
|
3594
|
+
display: block;
|
|
3595
|
+
background: linear-gradient(100deg, var(--skeleton-lo) 30%, var(--skeleton-hi) 50%, var(--skeleton-lo) 70%);
|
|
3596
|
+
background-size: 200% 100%;
|
|
3597
|
+
animation: shimmer 1.4s infinite linear;
|
|
3598
|
+
|
|
3599
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3600
|
+
animation: none;
|
|
3601
|
+
}
|
|
3602
|
+
`,ww=g.div`
|
|
3603
|
+
display: flex;
|
|
3604
|
+
flex-direction: column;
|
|
3605
|
+
gap: 12px;
|
|
3606
|
+
width: 100%;
|
|
3607
|
+
/* Reserve the divider→CTA rhythm so the block is the same height loading vs loaded. */
|
|
3608
|
+
padding-top: 4px;
|
|
3609
|
+
`,kw=g.span`
|
|
3610
|
+
${ca};
|
|
3611
|
+
width: 120px;
|
|
3612
|
+
height: 30px;
|
|
3613
|
+
border-radius: ${Tn.btn};
|
|
3614
|
+
margin-bottom: 4px;
|
|
3615
|
+
`,nc=g.span`
|
|
3616
|
+
${ca};
|
|
3617
|
+
width: 100%;
|
|
3618
|
+
height: 48px;
|
|
3619
|
+
border-radius: 16px;
|
|
3620
|
+
`,rc=g.div`
|
|
3621
|
+
display: flex;
|
|
3622
|
+
align-items: center;
|
|
3623
|
+
gap: 12px;
|
|
3624
|
+
`,ac=g.span`
|
|
3625
|
+
${ca};
|
|
3626
|
+
flex: none;
|
|
3627
|
+
width: 48px;
|
|
3628
|
+
height: 48px;
|
|
3629
|
+
border-radius: 50%;
|
|
3630
|
+
`,oc=g.span`
|
|
3631
|
+
${ca};
|
|
3632
|
+
width: 96px;
|
|
3633
|
+
height: 16px;
|
|
3634
|
+
border-radius: 6px;
|
|
3635
|
+
`,Wa=g.div`
|
|
3636
|
+
display: flex;
|
|
3637
|
+
flex-direction: column;
|
|
3638
|
+
gap: 8px;
|
|
3639
|
+
padding: 12px 14px;
|
|
3640
|
+
border: 1px solid ${R.line};
|
|
3641
|
+
border-radius: 12px;
|
|
3642
|
+
background: ${R.media};
|
|
3643
|
+
|
|
3644
|
+
p {
|
|
3645
|
+
margin: 0;
|
|
3646
|
+
font-size: 13px;
|
|
3647
|
+
line-height: 1.5;
|
|
3648
|
+
color: ${R.text2};
|
|
3649
|
+
}
|
|
3650
|
+
`,Dw=g.div`
|
|
3651
|
+
display: flex;
|
|
3652
|
+
align-items: center;
|
|
3653
|
+
gap: 16px;
|
|
3654
|
+
`;function Cw(n){return Object.values(st.Rarity).includes(n)}function Sw(n){return n==="male"?h("itemDetail.genderMale"):n==="female"?h("itemDetail.genderFemale"):n==="unisex"?h("itemDetail.genderUnisex"):null}function Mr(n){return n.wearableCategory?n.wearableCategory.replace(/_/g," "):n.category==="emote"?h("itemDetail.categoryEmote"):h("itemDetail.categoryWearable")}function ek(){const{pathname:n}=cc();return s.jsx(Mw,{},n)}function Mw(){var Bo;const{contractAddress:n,itemId:a,tokenId:t}=Xl(),e=!!t,r=a??Lf(t)??null,o=cc(),i=o.state,c=cn(),l=!!(i!=null&&i.market),p=(i==null?void 0:i.marketPriceCredits)??null,d=ln(),m=Un(P=>P.add),x=Un(P=>P.items),y=Ad(P=>P.toggle),{session:b,signIn:w}=tn(),k=ia(b),[f,S]=v.useState(()=>{if(i!=null&&i.item){const P={...i.item,tradeId:i.tradeId??i.item.tradeId};return e?{...P,tokenId:t,itemId:P.itemId??r}:{...P,tokenId:void 0,itemId:a??P.itemId}}return{id:`${n}-${t??a}`,name:"",creator:"",contractAddress:n??"",itemId:r,category:"wearable",rarity:"common",network:"MATIC",chainId:At.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:t??void 0,tradeId:i==null?void 0:i.tradeId}}),[E,T]=v.useState(!1),[$,O]=v.useState(!!(i!=null&&i.resumeBuy));v.useEffect(()=>{i!=null&&i.resumeBuy&&T(!0)},[i==null?void 0:i.resumeBuy]);function C(){const P=f.priceCredits>0?f.priceCredits:null;pe("Shop Started Checkout",{checkout_source:"item_page",cart_size:1,cart_value_credits:P,cart_value_usd:P===null?null:Vd(P)}),T(!0)}function D(){if(b){C();return}l||ep({type:"item-buy",path:o.pathname}),w()}const I=v.useRef(!1);v.useEffect(()=>{if(!b||I.current)return;const P=Ju("item-buy");!P||P.path!==o.pathname||(I.current=!0,O(!0),C())},[b]);const{items:L,isCollectionOnly:z,siblings:A,siblingsFetched:K}=ev({id:f.id,contractAddress:f.contractAddress,itemId:f.itemId??r,tokenId:f.tokenId,creator:f.creator}),{data:U,isLoading:q}=xe({queryKey:["shop-item",f.contractAddress,r],enabled:!l&&!e&&!!f.contractAddress&&!!r,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Ud(f.contractAddress,r)}),j=e?void 0:U;v.useEffect(()=>{j&&S(P=>P.tradeId?{...P,tradeId:j.tradeId,priceCredits:j.priceCredits,manaWei:j.manaWei,available:j.available??P.available,acquisition:j.acquisition,wearableCategory:P.wearableCategory??j.wearableCategory}:{...P,...j})},[j]);const[H,M]=v.useState(!1),{data:G=""}=xe({queryKey:["item-desc",f.contractAddress,f.itemId],enabled:!!f.contractAddress&&!!f.itemId,staleTime:5*6e4,queryFn:()=>Gd(f.contractAddress,f.itemId)}),{data:Y,isLoading:J}=xe({queryKey:["collection-meta",f.contractAddress],enabled:!!f.contractAddress,staleTime:5*6e4,queryFn:()=>pc(f.contractAddress)});v.useEffect(()=>{const P=(j==null?void 0:j.creator)||(Y==null?void 0:Y.creator);P&&S(We=>We.creator?We:{...We,creator:P})},[j,Y]);const de=v.useMemo(()=>{if(!(e||f.name||j||A.length===0))return(r?A.find(P=>P.itemId===r):void 0)??A.find(P=>P.contractAddress===f.contractAddress)},[e,f.name,f.contractAddress,j,A,r]);v.useEffect(()=>{de&&S(P=>({...de,tradeId:P.tradeId??de.tradeId}))},[de]);const{data:Ee,isLoading:ke}=xe({queryKey:["detail-trade",f.id,f.tradeId,f.contractAddress,f.itemId],enabled:!!f.contractAddress,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:async()=>{if(f.tradeId)return f.tradeId;if(!e&&f.itemId){const P=await Qo(f.contractAddress,f.itemId);return(P==null?void 0:P.id)??null}return null}}),{data:ue}=xe({queryKey:["item-traits",f.contractAddress,r],enabled:!!f.contractAddress&&!!r,staleTime:5*6e4,retry:1,queryFn:()=>Xd(f.contractAddress,r)}),Le=(ue==null?void 0:ue.isSmart)??f.isSmart,Mt=(ue==null?void 0:ue.utility)??null,Te=v.useMemo(()=>({...f,wearableCategory:f.wearableCategory??(ue==null?void 0:ue.wearableCategory)??void 0,gender:f.gender??(ue==null?void 0:ue.gender)??null}),[f,ue==null?void 0:ue.wearableCategory,ue==null?void 0:ue.gender]),Wt=(ue==null?void 0:ue.urn)??null,{data:la}=xe({queryKey:["item-vrm",Wt],enabled:!!Wt&&f.category==="wearable",staleTime:30*6e4,retry:!1,queryFn:()=>Jd(Wt)}),[rr,ar]=v.useState(!1),{data:$n}=xe({queryKey:["item-video",f.contractAddress,r],enabled:Le&&!!f.contractAddress&&!!r,staleTime:30*6e4,retry:!1,queryFn:()=>dp(f.contractAddress,r)}),Bt=v.useMemo(()=>f.emoteLoop!==void 0?f:(r?A.find(We=>We.itemId===r):void 0)??f,[f,A,r]),ze=di(d,f.tradeId)??di(d,Ee),un=f.acquisition==="store"&&(f.available??0)>0,_e=!!ze||un,ft=Ld(),{data:_t=[]}=xe({queryKey:["item-resales",f.contractAddress,f.itemId],enabled:ft&&!l&&!!f.contractAddress&&!!f.itemId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>gc(f.contractAddress,f.itemId)}),jt=_t.length>0?_t[0].priceCredits:null,ht=e&&f.tokenId?_t.find(P=>P.tokenId===f.tokenId)??null:null,Ze=v.useMemo(()=>{const P=_t[0];return P?{...P,name:P.name||f.name,thumbnail:P.thumbnail||f.thumbnail,rarity:P.rarity||f.rarity,category:P.category||f.category,wearableCategory:P.wearableCategory??f.wearableCategory,gender:P.gender??f.gender}:null},[_t,f]),[Nn,or]=v.useState(null),[ir,Ht]=v.useState(!1),[On,sr]=v.useState(!1),It=f.manaWei??null,{data:Pt}=mc(l||!!It),N=It&&Pt?Fd(It,Pt):null;v.useEffect(()=>{N!=null&&S(P=>P.priceCredits===N?P:{...P,priceCredits:N})},[N,f.priceCredits]);const Q=v.useMemo(()=>{if(!l||!(i!=null&&i.item))return null;const P=i.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},[l,i==null?void 0:i.item]),X=l&&p!=null&&!!Pt&&!!Q,te=Yd({priceCredits:f.priceCredits,compareAtCredits:f.compareAtCredits,saleEndsAt:f.saleEndsAt}),oe=v.useMemo(()=>({...f,tradeId:ze,id:ze??f.id}),[f,ze]),ge=x.some(P=>P.id===oe.id),ne=!oe.tokenId,De=((Bo=x.find(P=>P.id===oe.id))==null?void 0:Bo.quantity)??0,et=ne&&typeof f.available=="number"&&De>=f.available,{key:Et,faved:Fe}=Wd(f),xo=v.useRef(null);v.useEffect(()=>{!f.name||ke||xo.current===f.id||(xo.current=f.id,pe("Shop Viewed Item",{...Bd(f),for_sale:_e}),m0(f))},[f.id,f.name,ke,_e]);const cr=`${n}/${t??a}`,yo=v.useRef(cr);v.useEffect(()=>{if(yo.current!==cr){if(yo.current=cr,i!=null&&i.item){const P={...i.item,tradeId:i.tradeId??i.item.tradeId};S(e?{...P,tokenId:t,itemId:P.itemId??r}:{...P,tokenId:void 0,itemId:a??P.itemId})}typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}},[cr]);function Pl(){!_e||da||ke||!ne&&ge||et||m(oe,"item_detail")}const lr=Cw(f.rarity)?f.rarity:st.Rarity.COMMON,bo=Sw(Te.gender),dr=Hd(Te),vo=zd(Te.gender),wo=u0(f.rarity),ko=p0(Te),El=_e&&te,Tl=z?h("itemDetail.moreFromCollection"):h("itemDetail.youMightAlsoLike"),da=qd(f,b==null?void 0:b.address),[$l,Do]=v.useState(!1),[Nl,Co]=v.useState(!1),[Ol,So]=v.useState(!1),[Rl,Mo]=v.useState(!1),[Rn,An]=v.useState(null),[Ye,ur]=v.useState(null),[Al,_o]=v.useState(null),[ua,pa]=v.useState(null),fa=Qr(b==null?void 0:b.providerType),[Ll,ha]=v.useState(!1),{data:Z,isLoading:pr}=xe({queryKey:["owned-token",f.contractAddress,f.tokenId,b==null?void 0:b.address],enabled:!l&&!!(b!=null&&b.address)&&!!f.contractAddress&&!!f.tokenId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>b?Zd(b.address,f.contractAddress,f.tokenId):null});v.useEffect(()=>{Z&&S(P=>P.name?{...P,issuedId:P.issuedId??Z.issuedId,priceCredits:Z.listingPrice??0,tradeId:Z.tradeId}:{id:Z.id,name:Z.name,creator:"",contractAddress:Z.contractAddress,itemId:Z.itemId,category:Z.category,rarity:Z.rarity??"common",network:Z.network,chainId:Z.chainId,thumbnail:Z.image,priceCredits:Z.listingPrice??0,gender:null,isSmart:!1,tokenId:Z.tokenId,issuedId:Z.issuedId,tradeId:Z.tradeId})},[Z]),v.useEffect(()=>{ht&&S(P=>P.priceCredits===ht.priceCredits&&P.tradeId?P:{...P,priceCredits:ht.priceCredits,tradeId:P.tradeId??ht.tradeId})},[ht]),v.useEffect(()=>{Rn!=null&&Z!=null&&Z.isOnSale&&Z.listingPrice===Rn&&An(null)},[Z,Rn]);const jo=!l&&!!f.contractAddress&&!!f.tokenId&&!f.name&&!j&&!pr&&!Z,{data:Ce,isFetched:Fl}=xe({queryKey:["public-token",f.contractAddress,f.tokenId],enabled:jo,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>eu(f.contractAddress,f.tokenId)});v.useEffect(()=>{Ce&&S(P=>P.name?P.issuedId?P:{...P,issuedId:Ce.issuedId}:{id:Ce.id,name:Ce.name,creator:"",contractAddress:Ce.contractAddress,itemId:Ce.itemId,category:Ce.category,rarity:Ce.rarity??"common",network:Ce.network,chainId:Ce.chainId,thumbnail:Ce.image,priceCredits:Ce.listingPrice??0,gender:null,isSmart:!1,tokenId:Ce.tokenId,issuedId:Ce.issuedId,tradeId:Ce.tradeId})},[Ce]);const{data:tt}=xe({queryKey:["publishable-item",f.contractAddress,f.itemId,b==null?void 0:b.address],enabled:da&&!!b&&!!f.itemId,queryFn:async()=>b?(await up(b.address,b.identity)).find(We=>We.contractAddress.toLowerCase()===f.contractAddress.toLowerCase()&&We.blockchainItemId===f.itemId)??null:null}),mt=e&&!!Z,ma=!e&&da,nt=!l&&(ma||mt),Io=Rn!=null?!0:mt?!!(Z!=null&&Z.isOnSale):_e,pn=mt?Z==null?void 0:Z.tradeId:ze,Po=mt?!!Z:!!tt,Eo=ma||mt&&ft,To=Rn??(mt?(Z==null?void 0:Z.listingPrice)??0:0),{data:$o=0}=xe({queryKey:["owned-item-count",f.contractAddress,a,b==null?void 0:b.address],enabled:!e&&!l&&!!(b!=null&&b.address)&&!!f.contractAddress&&!!a,staleTime:3e4,queryFn:()=>b?tu(b.address,f.contractAddress,a):0});async function zt(){await Promise.all([d.invalidateQueries({queryKey:["owned-token",f.contractAddress,f.tokenId]}),d.invalidateQueries({queryKey:["detail-trade"]}),d.invalidateQueries({queryKey:["shop-item"]}),d.invalidateQueries({queryKey:["collection-sale-state"]}),d.invalidateQueries({queryKey:["shop-items"]}),d.invalidateQueries({queryKey:["catalog-items"]}),d.invalidateQueries({queryKey:["publishable-items"]}),d.invalidateQueries({queryKey:["publishable-item",f.contractAddress,f.itemId]}),d.invalidateQueries({queryKey:["item-resales",f.contractAddress,f.itemId]})])}async function ga(P={}){const We=P.own!==!1;if(!b||!pn)return!1;_o(null),pa(null),ha(!1),We&&ur("remove");try{const qt=await hc(pn);return await cp({trade:qt,signer:b.signer,mode:P.payGas?"direct":"gasless-only",watch:{isCancelled:async()=>{if(!f.itemId)return!1;const Be=await Qo(f.contractAddress,f.itemId).catch(()=>{});return Be!==void 0&&(Be==null?void 0:Be.id)!==pn},onWaiting:Be=>ha(Be>2e4)}}),P.silent||Zn.success(h("myAssets.removedFromSale",{name:f.name})),An(null),Ff(d,pn),S(Be=>Be.tradeId===pn?{...Be,tradeId:void 0}:Be),zt(),ka(d,{address:b.address,contractAddress:f.contractAddress,tokenId:f.tokenId},{kind:"removed"}),!0}catch(qt){const Be=Dn(qt);return Be||Se(qt,{flow:"remove-listing",tradeId:pn}),qt instanceof lp?(pa(qt.definitive?"reverted":"pending"),!1):(_o(Be?h("getCredits.errorCanceled"):nn(qt,h("myAssets.removeListingError"))),!1)}finally{We&&ur(null),ha(!1)}}function No({relist:P=!1}={}){P||pe("Shop Started Listing",{listing_type:mt?"secondary":"primary",item_id:f.itemId??f.tokenId??null}),mt?Do(!0):Co(!0)}async function Yl(){ur("update");try{await ga({silent:!0,own:!1})&&No({relist:!0})}finally{ur(null)}}function Oo(){Do(!1),Co(!1),zt()}const Ro=_e?ke?h("itemDetail.checking"):et?h("itemDetail.maxInCart"):!ne&&ge?h("assetCard.inCart"):h("assetCard.addToCart"):h("itemDetail.notForSale"),Wl=typeof f.available=="number"&&f.available>0&&!f.tokenId&&!l,Ao=!l&&!f.tokenId&&f.available===0,fn=Ao&&!nt&&!!Ze,fr=!!Ze&&x.some(P=>P.id===Ze.id),Bl=!nt&&_e&&!l,Hl=l||!nt&&(_e||fn&&!!Ze||vl()),zl=!f.name&&(!!j||!!Z||!!Ce||!!de),Lo=q||!!f.contractAddress&&!K||!f.name&&pr||zl||jo&&!Fl,Fo=!f.name&&!Lo,ql=!!f.name&&Yf({isMarket:l,forSale:_e,priceKnown:f.priceCredits>0&&(!It||N!=null)||nt,stillResolving:Lo||!!It&&N==null,manage:nt,soldOutWithResale:fn,resolvingTrade:ke,isTokenRoute:e,ownedAssetLoading:pr,deepLinkLoading:q}),Yo=!f.creator&&(q||J||pr),Wo=!(Y!=null&&Y.name)&&J,Kl=/^https?:\/\//i.test(f.thumbnail);return Kd(Fo?{title:h("seo.item.notFoundTitle"),noindex:!0}:f.name?{title:f.name,description:G||h("seo.item.fallbackDescription",{name:f.name,rarity:f.rarity,category:Mr(Te),creator:Za(f.creator)}),image:Kl?f.thumbnail:void 0,type:"product"}:{}),Fo?s.jsxs(X0,{"data-notfound":!0,children:[s.jsx(ew,{name:"cart"}),s.jsx(tw,{children:h("itemDetail.notAvailableTitle")}),s.jsx(J0,{children:h("itemDetail.notAvailableBody")}),s.jsx(Z0,{variant:"white",onClick:()=>c("/items"),children:h("notFound.cta")})]}):s.jsxs(v0,{children:[s.jsxs(w0,{"aria-label":h("itemDetail.breadcrumbAria"),children:[s.jsx(k0,{onClick:()=>c("/items"),children:h("nav.collectibles")}),s.jsx(D0,{children:"/"}),s.jsx(C0,{children:f.name||h("itemDetail.itemFallback")})]}),s.jsxs(S0,{children:[s.jsxs(M0,{"data-testid":"item-preview",children:[f.name?s.jsx(iv,{item:f}):s.jsx(_0,{"aria-busy":"true","aria-label":h("itemPreview.loading"),children:s.jsx("span",{className:"skeleton","aria-hidden":!0})}),Et?s.jsx(Ws,{"data-fav-preview":!0,"data-on":Fe||void 0,onClick:()=>y(f),"aria-pressed":Fe,"aria-label":Fe?h("assetCard.removeFromFavorites"):h("assetCard.addToFavorites"),children:s.jsx(V,{name:Fe?"heart-solid":"heart",size:18})}):null,$n?s.jsxs(E0,{"data-play-showcase":!0,onClick:()=>ar(!0),"data-testid":"play-showcase",children:[s.jsx(V,{name:"play",size:18}),h("itemDetail.playShowcase")]}):null]}),s.jsx(j0,{"data-testid":"item-info",children:f.name?s.jsxs(s.Fragment,{children:[s.jsxs(I0,{children:[s.jsxs(P0,{children:[f.name,e&&f.issuedId?` #${f.issuedId}`:""]}),Et?s.jsx(Ws,{"data-fav-title":!0,"data-on":Fe||void 0,onClick:()=>y(f),"aria-pressed":Fe,"aria-label":Fe?h("assetCard.removeFromFavorites"):h("assetCard.addToFavorites"),children:s.jsx(V,{name:Fe?"heart-solid":"heart",size:18})}):null]}),s.jsxs(T0,{children:[wo?s.jsx(Oa,{to:wo,"data-variant":"rarity","data-testid":"detail-rarity-link",style:{background:qo(lr)},title:h("itemDetail.browseByRarity",{rarity:f.rarity}),children:f.rarity}):s.jsx(rt,{"data-variant":"rarity",style:{background:qo(lr)},title:Qd(f.rarity),children:f.rarity}),ko?s.jsxs(Oa,{to:ko,"data-testid":"detail-category-link",title:h("itemDetail.browseByCategory",{category:Mr(Te)}),children:[dr?s.jsx(V,{name:dr,size:18}):null,Mr(Te)]}):s.jsxs(rt,{children:[dr?s.jsx(V,{name:dr,size:18}):null,Mr(Te)]}),bo?s.jsxs(rt,{children:[vo?s.jsx(V,{name:vo,size:18}):null,bo]}):null,!e&&f.issuedId?s.jsxs(rt,{"data-testid":"detail-issued",children:["#",f.issuedId]}):null,Le?s.jsxs(Oa,{to:f0(),"data-testid":"detail-smart",title:h("itemDetail.browseBySmart"),children:[s.jsx(V,{name:"smart",size:18}),h("itemDetail.smart")]}):null,Bt.emoteLoop!==void 0?s.jsxs(rt,{"data-testid":"detail-play-mode",children:[s.jsx(V,{name:Bt.emoteLoop?"play-loop":"play-once",size:18}),Bt.emoteLoop?h("itemDetail.playLoop"):h("itemDetail.playOnce")]}):null,Bt.emoteHasSound?s.jsxs(rt,{"data-testid":"detail-sound",children:[s.jsx(V,{name:"sound",size:18}),h("itemDetail.emoteSound")]}):null,Bt.emoteHasProps?s.jsxs(rt,{"data-testid":"detail-props",children:[s.jsx(V,{name:"props",size:18}),h("itemDetail.emoteProps")]}):null,la?s.jsx(ti,{content:h("itemDetail.exportBlockedTooltip"),children:s.jsxs(rt,{"data-variant":"blocked","data-testid":"detail-export-blocked",tabIndex:0,"aria-label":h("itemDetail.exportBlockedTooltip"),children:[s.jsx(V,{name:"ban",size:16}),h("itemDetail.exportBlocked")]})}):null,Mt?s.jsxs(rt,{"data-testid":"detail-utility-chip",children:[s.jsx(V,{name:"utility",size:18}),h("itemDetail.utility")]}):null]}),G||Mt?s.jsxs(Ml,{children:[G?s.jsx(Ja,{children:s.jsxs(Xa,{children:[s.jsx(xn,{children:h("itemDetail.description")}),s.jsx(Bs,{"data-expanded":H||void 0,children:G}),G.length>140?s.jsx(N0,{className:"link",onClick:()=>M(P=>!P),children:H?h("itemDetail.showLess"):h("itemDetail.readMore")}):null]})}):null,Mt?s.jsx(Ja,{children:s.jsxs(Xa,{"data-testid":"detail-utility",children:[s.jsx(xn,{children:h("itemDetail.utility")}),s.jsx(Bs,{"data-expanded":!0,children:Mt})]})}):null]}):null,f.creator||Y!=null&&Y.name||Yo||Wo?s.jsxs(_l,{children:[f.creator?s.jsxs(Kn,{children:[s.jsx(xn,{children:h("itemDetail.creator")}),s.jsx(O0,{address:f.creator,linkToProfile:!0,hidePrefix:!0})]}):Yo?s.jsxs(Kn,{children:[s.jsx(xn,{children:h("itemDetail.creator")}),s.jsxs(rc,{"aria-hidden":!0,"data-testid":"creator-loading",children:[s.jsx(ac,{}),s.jsx(oc,{})]})]}):null,Y!=null&&Y.name?s.jsxs(Kn,{"data-collection":!0,children:[s.jsx(xn,{children:h("itemDetail.collection")}),s.jsx(R0,{contractAddress:f.contractAddress,name:Y.name,items:A})]}):Wo?s.jsxs(Kn,{"data-collection":!0,children:[s.jsx(xn,{children:h("itemDetail.collection")}),s.jsxs(rc,{"aria-hidden":!0,"data-testid":"collection-loading",children:[s.jsx(ac,{}),s.jsx(oc,{})]})]}):null]}):null,s.jsx(Il,{}),ql?s.jsxs(ww,{"aria-hidden":!0,"data-testid":"sale-loading",children:[s.jsx(kw,{}),s.jsx(nc,{}),s.jsx(nc,{})]}):s.jsxs(s.Fragment,{children:[ft&&!nt&&!l&&_e&&!f.tokenId?s.jsxs(lw,{"data-testid":"buy-from-creator",children:[s.jsxs(dw,{children:[s.jsx(uw,{name:"buy-from-creator"}),h("itemDetail.buyFromCreator")]}),s.jsx(pw,{name:"check-rounded"})]}):null,fn?s.jsxs(gw,{"data-testid":"sold-out",children:[s.jsxs(Xs,{"data-variant":"original",children:[s.jsxs(Js,{children:[h("itemDetail.originalPrice"),s.jsxs(Zs,{children:[s.jsx(Re,{className:"ico"}),s.jsx(ec,{children:s.jsx($e,{credits:f.priceCredits})})]}),s.jsx(tc,{"aria-hidden":!0,children:s.jsx(V,{name:"info",size:12})})]}),s.jsx(xw,{"data-testid":"out-of-stock",children:h("itemDetail.soldOut")})]}),s.jsxs(Xs,{"data-variant":"resale",children:[s.jsxs(Js,{children:[h("itemDetail.resalePrice"),s.jsxs(Zs,{children:[s.jsx(Re,{className:"ico"}),s.jsx(ec,{children:s.jsx($e,{credits:jt})})]}),s.jsx(tc,{"aria-hidden":!0,children:s.jsx(V,{name:"info",size:12})})]}),s.jsxs(yw,{children:[h("itemDetail.stock")," ",_t.length,"/",st.Rarity.getMaxSupply(lr).toLocaleString()]})]})]}):s.jsx(A0,{children:s.jsxs(L0,{children:[s.jsxs(F0,{children:[l||_e?s.jsx(qs,{children:h("itemDetail.price")}):null,l?s.jsxs(s.Fragment,{children:[s.jsx(yn,{"data-variant":"market","data-testid":"item-price",children:p==null?s.jsx(Bn,{children:"—"}):s.jsxs(s.Fragment,{children:[s.jsx(W0,{"aria-hidden":!0,children:"≈"}),s.jsx(Hn,{}),s.jsx(Bn,{children:s.jsx($e,{credits:p})})]})}),s.jsx(B0,{children:h("assetCard.marketPrice")})]}):_e?El?s.jsxs(yn,{"data-variant":"sale","data-testid":"item-price",children:[s.jsxs(yn,{children:[s.jsx(Hn,{}),s.jsx(Bn,{children:s.jsx($e,{credits:f.priceCredits})})]}),s.jsxs(H0,{children:[s.jsx(Hn,{"data-was":!0}),s.jsx($e,{credits:f.compareAtCredits})]}),Ko(f.compareAtCredits,f.priceCredits)>0?s.jsx(z0,{children:h("assetCard.saleWithDiscount",{pct:Ko(f.compareAtCredits,f.priceCredits)})}):null,s.jsx(q0,{endsAt:f.saleEndsAt})]}):s.jsxs(yn,{"data-testid":"item-price",children:[s.jsx(Hn,{}),s.jsx(Bn,{children:s.jsx($e,{credits:f.priceCredits})})]}):Io&&To?s.jsxs(yn,{"data-testid":"item-price",children:[s.jsx(Hn,{}),s.jsx(Bn,{children:s.jsx($e,{credits:To})})]}):nt?null:s.jsxs(yn,{"data-variant":"none","data-testid":"item-price",children:[s.jsx("span",{children:h("itemDetail.notForSale")}),s.jsx(ti,{content:h("itemDetail.notForSaleHint"),children:s.jsx(Y0,{tabIndex:0,role:"img","aria-label":h("itemDetail.notForSaleHint"),children:s.jsx(V,{name:"info",size:14})})})]})]}),Wl?s.jsxs(Hs,{children:[s.jsx(qs,{children:h("itemDetail.stock")}),s.jsxs(zs,{children:[(f.available??0).toLocaleString(),"/",st.Rarity.getMaxSupply(lr).toLocaleString()]})]}):Ao?s.jsx(Hs,{children:s.jsx(zs,{"data-out":!0,"data-testid":"out-of-stock",children:h("itemDetail.outOfStock")})}):null]})}),s.jsx(K0,{"data-buttons":Hl||void 0,"data-dual":Bl||void 0,children:l?s.jsxs(Ra,{variant:"purple",onClick:D,disabled:!X,children:[s.jsx("span",{children:h("assetCard.buyNow")}),p!=null?s.jsxs(Aa,{"aria-hidden":!0,children:[s.jsx(Ya,{}),s.jsx($e,{credits:p})]}):null]}):nt?s.jsxs(bw,{"data-testid":"manage-actions",children:[s.jsx(Lt,{message:Al}),ua&&!fa?s.jsx(Wa,{"data-testid":"cancel-gasless-failed",children:s.jsx("p",{children:h("itemDetail.cancelRelayRetry")})}):null,ua&&fa?s.jsxs(Wa,{"data-testid":"cancel-gasless-failed",children:[s.jsx("p",{children:ua==="reverted"?h("itemDetail.cancelRelayReverted"):h("itemDetail.cancelRelayFailed")}),s.jsxs(Dw,{children:[s.jsx(Sr,{type:"button","data-testid":"cancel-pay-gas",onClick:()=>void ga({payGas:!0}),disabled:Ye!==null,children:h("itemDetail.cancelPayGas")}),s.jsx(Sr,{type:"button","data-testid":"cancel-later",onClick:()=>pa(null),disabled:Ye!==null,children:h("itemDetail.cancelLater")})]})]}):null,Ye==="remove"&&Ll?s.jsx(Wa,{"data-testid":"cancel-slow",children:s.jsx("p",{children:h(fa?"itemDetail.cancelSlow":"itemDetail.cancelSlowManaged")})}):null,Io?s.jsxs(s.Fragment,{children:[Eo?s.jsxs(V0,{onClick:()=>void Yl(),disabled:Ye!==null||!Po,children:[Ye!=="update"?s.jsx(V,{name:"pen",className:"ico"}):null,s.jsx("span",{children:Ye==="update"?k?h("itemDetail.updateCanceling"):h("itemDetail.updateConfirmCancel"):h("itemDetail.manageUpdatePrice")})]}):null,s.jsx(Ks,{onClick:()=>void ga(),disabled:Ye!==null,children:s.jsx("span",{children:Ye==="remove"?h("myAssets.removing"):h("itemDetail.manageRemove")})})]}):s.jsxs(s.Fragment,{children:[Eo?s.jsx(Q0,{onClick:()=>No(),disabled:Ye!==null||!Po,children:s.jsx("span",{children:h("itemDetail.manageList")})}):null,mt?s.jsxs(s.Fragment,{children:[s.jsx(Ks,{onClick:()=>So(!0),disabled:Ye!==null,children:s.jsx("span",{children:h("itemDetail.manageTransfer")})}),s.jsx(Sr,{type:"button","data-on-purple":!0,"data-testid":"resell-item",onClick:()=>sr(!0),disabled:Ye!==null,children:h("itemDetail.manageResell")})]}):null]}),ma&&tt?s.jsx(Sr,{type:"button","data-on-purple":!0,onClick:()=>Mo(!0),disabled:Ye!==null,children:h("itemDetail.manageIssue")}):null,Ye==="update"?s.jsx(G0,{children:h("itemDetail.updateHelper")}):null,jt!=null?s.jsx(vw,{children:s.jsx(Gs,{onClick:()=>Ht(!0),"data-testid":"view-resellers",children:h("itemDetail.viewAllResellers")})}):null]}):_e?s.jsxs(s.Fragment,{children:[s.jsxs(Ra,{variant:"purple",onClick:D,disabled:ke,children:[s.jsx("span",{children:h("assetCard.buyNow")}),s.jsxs(Aa,{"aria-hidden":!0,children:[s.jsx(Ya,{}),s.jsx($e,{credits:f.priceCredits})]})]}),s.jsxs(Qs,{onClick:Pl,disabled:ke||(ne?et:ge),"aria-label":Ro,children:[s.jsx(V,{name:"cart"}),s.jsx(Vs,{children:Ro})]})]}):fn&&Ze?s.jsxs(s.Fragment,{children:[s.jsxs(Ra,{variant:"purple",onClick:()=>b?or(Ze):w(),children:[s.jsx("span",{children:h("assetCard.buyNow")}),s.jsxs(Aa,{"aria-hidden":!0,children:[s.jsx(Ya,{}),s.jsx($e,{credits:Ze.priceCredits})]})]}),s.jsxs(Qs,{onClick:()=>{fr||m(Ze,"item_detail")},disabled:fr,"aria-label":fr?h("assetCard.inCart"):h("assetCard.addToCart"),children:[s.jsx(V,{name:"cart"}),s.jsx(Vs,{children:fr?h("assetCard.inCart"):h("assetCard.addToCart")})]})]}):s.jsx(s.Fragment,{children:s.jsx(l0,{item:f})})}),!nt&&!l&&jt!=null?s.jsxs(fw,{"data-testid":"lowest-price","data-centered":fn||void 0,children:[fn?null:s.jsxs(hw,{children:[h("itemDetail.lowestPrice"),s.jsx(Re,{className:"ico"}),s.jsx(mw,{children:s.jsx($e,{credits:jt})})]}),s.jsx(Gs,{onClick:()=>Ht(!0),"data-testid":"view-resellers",children:h("itemDetail.viewAllResellers")})]}):null,!nt&&!l&&$o>0?s.jsxs(U0,{"data-testid":"you-own-note",children:[h("itemDetail.youOwnN",{count:$o})," ",s.jsx(sc,{to:"/my-items",children:h("nav.myAssets")})]}):null]})]}):s.jsx(_w,{})})]}),s.jsx(Zu,{title:Tl,items:L,onViewAll:z&&f.contractAddress?()=>c(`/collection/${f.contractAddress}`):void 0}),E&&l&&Q&&Pt?s.jsx(hl,{listing:Q,rate:Pt,onClose:()=>T(!1),onSold:()=>T(!1)}):E&&!l?s.jsx(qa,{item:oe,resume:$,onClose:()=>{T(!1),O(!1)}}):null,Nn?s.jsx(qa,{item:Nn,onClose:()=>{or(null),zt()}}):null,ft&&ir&&f.itemId?s.jsx(Ov,{item:f,onClose:()=>Ht(!1)}):null,On&&t?s.jsx(Jv,{contractAddress:n??"",tokenId:t,onClose:()=>sr(!1)}):null,$l&&Z&&b?s.jsx(fy,{asset:Z,session:b,creator:f.creator,onListed:(P,We)=>{An(P),zt(),ka(d,{address:b.address,contractAddress:f.contractAddress,tokenId:f.tokenId},{kind:"listed",priceCredits:P,tradeId:We})},onClose:Oo}):null,Ol&&b&&f.tokenId?s.jsx(Ty,{item:{contractAddress:f.contractAddress,chainId:f.chainId,tokenId:f.tokenId,name:f.name,thumbnail:f.thumbnail},session:b,onClose:()=>{So(!1),zt()},onTransferred:()=>{An(null),zt(),ka(d,{address:b.address,contractAddress:f.contractAddress,tokenId:f.tokenId},{kind:"gone"})}}):null,Nl&&tt&&b?s.jsx(eb,{item:tt,session:b,onListed:P=>An(P),onClose:Oo}):null,Rl&&tt&&b?s.jsx(jb,{item:{contractAddress:tt.contractAddress,chainId:At.chainId,itemId:tt.blockchainItemId,name:tt.name,thumbnail:tt.thumbnail,available:tt.remainingSupply},session:b,onClose:()=>{Mo(!1),zt()}}):null,rr&&$n?s.jsx(Ob,{src:$n,itemName:f.name,onClose:()=>ar(!1)}):null]})}function _w(){return s.jsxs(nw,{"aria-hidden":!0,children:[s.jsx(ow,{className:"skeleton"}),s.jsxs(iw,{children:[s.jsx(La,{className:"skeleton"}),s.jsx(La,{className:"skeleton"}),s.jsx(La,{className:"skeleton"})]}),s.jsx(Ml,{children:[0,1].map(n=>s.jsx(Ja,{children:s.jsxs(Xa,{children:[s.jsx(Us,{className:"skeleton"}),s.jsxs(rw,{children:[s.jsx(Fa,{className:"skeleton"}),s.jsx(Fa,{className:"skeleton"}),s.jsx(Fa,{className:"skeleton","data-short":!0})]})]})},n))}),s.jsx(_l,{children:[0,1].map(n=>s.jsxs(Kn,{...n===1?{"data-collection":!0}:{},children:[s.jsx(Us,{className:"skeleton"}),s.jsx(aw,{})]},n))}),s.jsx(Il,{}),s.jsx(sw,{className:"skeleton"}),s.jsx(cw,{className:"skeleton"})]})}export{Mw as ItemDetail,ek as ItemDetailRoute,Mw as default};
|
|
3655
|
+
//# sourceMappingURL=ItemDetail-BT1EJeg9.js.map
|