@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
|
@@ -1,3490 +0,0 @@
|
|
|
1
|
-
var Fl=Object.defineProperty;var Yl=(n,a,t)=>a in n?Fl(n,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[a]=t;var W=(n,a,t)=>Yl(n,typeof a!="symbol"?a+"":a,t);import{r as v,e as Wl,j as s,b as an,l as nc,R as _,h as Bl,L as rc,d as Hl,a as zl}from"./react-Cb20DwfT.js";import{s as g,t as u,aY as _t,b as m,I as X,ap as ql,q as Ne,E as It,C as Ke,c1 as Lo,aR as zr,c as Xt,o as Jt,aE as ac,aF as Kl,r as on,aN as Ql,af as de,aU as He,aT as Te,aP as Fa,h as Me,aS as fa,aQ as oc,i as Ul,d as Vl,D as qn,aD as Gl,aC as Xl,F as Jl,X as Zl,aO as ed,cM as td,cN as nd,p as rd,l as me,b0 as ad,a0 as qr,bB as Kr,v as Ga,bC as Kt,W as ic,w as Xn,bZ as sc,aq as Ee,cO as od,$ as id,g as sd,f as cd,B as Jn,A as jn,aW as ha,a7 as cc,cP as Fo,cr as ld,U as lc,aX as dd,cQ as ud,cR as pd,bM as fd,m as hd,ad as Qn,bl as md,cS as gd,a3 as xd,cT as yd,bn as bd,cU as vd,cV as wd,N as dc,cW as uc,cX as kd,cY as Dd,a as pc,cZ as Cd,c_ as Sd,c$ as Md,d0 as _d,z as jd,d1 as Id,M as Pd,Z as Ed,Y as Td,d2 as $d,d3 as Nd,d4 as Od,ar as Rd,as as Ad,d5 as Ld,n as Fd,av as Yo,au as Yd,d6 as Wo,aM as Wd,d7 as Bo,d8 as Bd,d9 as Hd,da as zd,db as qd,dc as Kd,dd as Qd,de as Ud}from"./index-Bct_bRJL.js";import{d as rt}from"./dcl-schemas-D_0AvjMb.js";import{O as Ho,a2 as Vd,Z as Gd,U as fc,V as Xd,M as Jd,S as Zd,C as eu,H as tu,a as nu,T as ru,X as au,b as ou,B as iu,c as su,d as cu,e as lu,f as fn,g as du,h as uu,i as pu,j as fu,k as hn,l as ft,W as pr,p as fr,q as hr,r as hu,P as mu,y as gu,z as xu,D as yu,E as bu,F as vu,G as wu,I as ku,J as Du,K as Cu,N as Su,L as Mu,m as _u,n as ju,o as Iu,a4 as Pu,a5 as Eu,a6 as Tu,A as $u,s as Nu,t as Ou,u as Ru,v as Au,w as Lu,x as Fu,a7 as zo,a8 as Yu,a9 as Wu,aa as Bu,ab as Hu,_ as zu,Q as qu,R as Ku,Y as Qu}from"./CollectionCarousel-DRvnaHVZ.js";import{k as qo,d as Uu,f as Vu,t as Gu,i as Xu,e as Ju,a as Zu,m as ep,q as Ko,c as tp,G as np}from"./buy-CA6rPe25.js";import{b as rp,a as ap}from"./builder-BX572rOw.js";import{u as op,M as ip,e as sp,a as cp,c as lp}from"./useCreditPacks-DBLf5Vx6.js";import{m as Qo}from"./mana-matic-CEqvSwrJ.js";import{f as hc,e as mc,n as dp,h as up,c as Uo,g as gc,l as pp,r as fp,m as hp,k as mp}from"./authorizations-D1ZMIs2H.js";import{J as gp,p as xp,C as yp,I as bp}from"./ethers-DJyLt7ov.js";import{a as vp,w as xc,S as yc,G as bc,c as wp}from"./buy-gasless-CK3HV-x0.js";import{R as Vo}from"./resume-buy-DsKEHLCS.js";import{a as kp,f as Zt,i as kn}from"./errors-kVIEXzVQ.js";import{C as Dp}from"./Confetti-CfzeiH3X.js";import{J as Cp,a as Sp}from"./jump-D5bqZjn-.js";import{C as Mp}from"./CircularProgress-C3bSCAL8.js";import{E as Et}from"./ErrorNotice-BidBLYce.js";import{M as _p,E as jp,s as Ip}from"./sendMetaTransaction-Czj3ikgH.js";import{E as Pp}from"./EmotePlaybackBar-hGXyvmBg.js";import{d as Ep}from"./disposePreview-vScx20Eh.js";import{S as Tp,T as Go}from"./categories-CppViVHu.js";import"./sentry-Bj5QbebD.js";import"./intl-AKLEHPeO.js";import"./clsx-BEtG4eYu.js";import"./styled-Cu6FogSR.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]="74e0c9b8-e993-42bc-8e3b-fec236ca00bf",n._sentryDebugIdIdentifier="sentry-dbid-74e0c9b8-e993-42bc-8e3b-fec236ca00bf")}catch{}})();const Dn=Math.min,Qt=Math.max,Pr=Math.round,mr=Math.floor,mt=n=>({x:n,y:n}),$p={left:"right",right:"left",bottom:"top",top:"bottom"};function Np(n,a,t){return Qt(n,Dn(a,t))}function Qr(n,a){return typeof n=="function"?n(a):n}function Cn(n){return n.split("-")[0]}function Zn(n){return n.split("-")[1]}function Op(n){return n==="x"?"y":"x"}function Xa(n){return n==="y"?"height":"width"}function zt(n){const a=n[0];return a==="t"||a==="b"?"y":"x"}function Ja(n){return Op(zt(n))}function Rp(n,a,t){t===void 0&&(t=!1);const e=Zn(n),r=Ja(n),o=Xa(r);let i=r==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return a.reference[o]>a.floating[o]&&(i=Er(i)),[i,Er(i)]}function Ap(n){const a=Er(n);return[Ya(n),a,Ya(a)]}function Ya(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Xo=["left","right"],Jo=["right","left"],Lp=["top","bottom"],Fp=["bottom","top"];function Yp(n,a,t){switch(n){case"top":case"bottom":return t?a?Jo:Xo:a?Xo:Jo;case"left":case"right":return a?Lp:Fp;default:return[]}}function Wp(n,a,t,e){const r=Zn(n);let o=Yp(Cn(n),t==="start",e);return r&&(o=o.map(i=>i+"-"+r),a&&(o=o.concat(o.map(Ya)))),o}function Er(n){const a=Cn(n);return $p[a]+n.slice(a.length)}function Bp(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 vc(n){return typeof n!="number"?Bp(n):{top:n,right:n,bottom:n,left:n}}function Tr(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 Zo(n,a,t){let{reference:e,floating:r}=n;const o=zt(a),i=Ja(a),c=Xa(i),l=Cn(a),p=o==="y",d=e.x+e.width/2-r.width/2,h=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:h};break;case"left":y={x:e.x-r.width,y:h};break;default:y={x:e.x,y:e.y}}const b=Zn(a);return b&&(y[i]+=x*(b==="end"?1:-1)*(t&&p?-1:1)),y}async function Hp(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:h="floating",altBoundary:x=!1,padding:y=0}=Qr(a,n),b=vc(y),k=c[x?h==="floating"?"reference":"floating":h],f=Tr(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=h==="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},$=Tr(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 zp=50,qp=async(n,a,t)=>{const{placement:e="bottom",strategy:r="absolute",middleware:o=[],platform:i}=t,c=i.detectOverflow?i:{...i,detectOverflow:Hp},l=await(i.isRTL==null?void 0:i.isRTL(a));let p=await i.getElementRects({reference:n,floating:a,strategy:r}),{x:d,y:h}=Zo(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:h,initialPlacement:e,placement:x,strategy:r,middlewareData:b,rects:p,platform:c,elements:{reference:n,floating:a}});d=E??d,h=T??h,b[f]={...b[f],...$},O&&y<zp&&(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:h}=Zo(p,x,l)),w=-1)}return{x:d,y:h,placement:x,strategy:r,middlewareData:b}},Kp=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}=Qr(n,a)||{};if(p==null)return{};const h=vc(d),x={x:t,y:e},y=Ja(r),b=Xa(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,j=C/2-w[b]/2-1,L=Dn(h[f],j),q=Dn(h[S],j),A=C-w[b]-q,Q=C/2-w[b]/2+D,B=Np(L,Q,A),K=!l.arrow&&Zn(r)!=null&&Q!==B&&o.reference[b]/2-(Q<L?L:q)-w[b]/2<0,P=K?Q<L?Q-L:Q-A:0;return{[y]:x[y]+P,data:{[y]:B,centerOffset:Q-B-P,...K&&{alignmentOffset:P}},reset:K}}}),Qp=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:h=!0,fallbackPlacements:x,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0,...k}=Qr(n,a);if((t=o.arrow)!=null&&t.alignmentOffset)return{};const f=Cn(r),S=zt(c),E=Cn(c)===c,T=await(l.isRTL==null?void 0:l.isRTL(p.floating)),$=x||(E||!w?[Er(c)]:Ap(c)),O=b!=="none";!x&&O&&$.push(...Wp(c,w,b,T));const C=[c,...$],D=await l.detectOverflow(a,k),j=[];let L=((e=o.flip)==null?void 0:e.overflows)||[];if(d&&j.push(D[f]),h){const B=Rp(r,i,T);j.push(D[B[0]],D[B[1]])}if(L=[...L,{placement:r,overflows:j}],!j.every(B=>B<=0)){var q,A;const B=(((q=o.flip)==null?void 0:q.index)||0)+1,K=C[B];if(K&&(!(h==="alignment"?S!==zt(K):!1)||L.every(M=>zt(M.placement)===S?M.overflows[0]>0:!0)))return{data:{index:B,overflows:L},reset:{placement:K}};let P=(A=L.filter(H=>H.overflows[0]<=0).sort((H,M)=>H.overflows[1]-M.overflows[1])[0])==null?void 0:A.placement;if(!P)switch(y){case"bestFit":{var Q;const H=(Q=L.filter(M=>{if(O){const U=zt(M.placement);return U===S||U==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(U=>U>0).reduce((U,z)=>U+z,0)]).sort((M,U)=>M[1]-U[1])[0])==null?void 0:Q[0];H&&(P=H);break}case"initialPlacement":P=c;break}if(r!==P)return{reset:{placement:P}}}return{}}}},Up=new Set(["left","top"]);async function Vp(n,a){const{placement:t,platform:e,elements:r}=n,o=await(e.isRTL==null?void 0:e.isRTL(r.floating)),i=Cn(t),c=Zn(t),l=zt(t)==="y",p=Up.has(i)?-1:1,d=o&&l?-1:1,h=Qr(a,n);let{mainAxis:x,crossAxis:y,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.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 Gp=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 Vp(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 Ur(){return typeof window<"u"}function In(n){return wc(n)?(n.nodeName||"").toLowerCase():"#document"}function Oe(n){var a;return(n==null||(a=n.ownerDocument)==null?void 0:a.defaultView)||window}function kt(n){var a;return(a=(wc(n)?n.ownerDocument:n.document)||window.document)==null?void 0:a.documentElement}function wc(n){return Ur()?n instanceof Node||n instanceof Oe(n).Node:!1}function $e(n){return Ur()?n instanceof Element||n instanceof Oe(n).Element:!1}function $t(n){return Ur()?n instanceof HTMLElement||n instanceof Oe(n).HTMLElement:!1}function ei(n){return!Ur()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Oe(n).ShadowRoot}function Vr(n){const{overflow:a,overflowX:t,overflowY:e,display:r}=Ue(n);return/auto|scroll|overlay|hidden|clip/.test(a+e+t)&&r!=="inline"&&r!=="contents"}function Xp(n){return/^(table|td|th)$/.test(In(n))}function Gr(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const Jp=/transform|translate|scale|rotate|perspective|filter/,Zp=/paint|layout|strict|content/,Bt=n=>!!n&&n!=="none";let ma;function Za(n){const a=$e(n)?Ue(n):n;return Bt(a.transform)||Bt(a.translate)||Bt(a.scale)||Bt(a.rotate)||Bt(a.perspective)||!eo()&&(Bt(a.backdropFilter)||Bt(a.filter))||Jp.test(a.willChange||"")||Zp.test(a.contain||"")}function ef(n){let a=en(n);for(;$t(a)&&!Un(a);){if(Za(a))return a;if(Gr(a))return null;a=en(a)}return null}function eo(){return ma==null&&(ma=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ma}function Un(n){return/^(html|body|#document)$/.test(In(n))}function Ue(n){return Oe(n).getComputedStyle(n)}function Xr(n){return $e(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function en(n){if(In(n)==="html")return n;const a=n.assignedSlot||n.parentNode||ei(n)&&n.host||kt(n);return ei(a)?a.host:a}function kc(n){const a=en(n);return Un(a)?(n.ownerDocument||n).body:$t(a)&&Vr(a)?a:kc(a)}function Vn(n,a,t){var e;a===void 0&&(a=[]),t===void 0&&(t=!0);const r=kc(n),o=r===((e=n.ownerDocument)==null?void 0:e.body),i=Oe(r);if(o){const c=Wa(i);return a.concat(i,i.visualViewport||[],Vr(r)?r:[],c&&t?Vn(c):[])}else return a.concat(r,Vn(r,[],t))}function Wa(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Dc(n){const a=Ue(n);let t=parseFloat(a.width)||0,e=parseFloat(a.height)||0;const r=$t(n),o=r?n.offsetWidth:t,i=r?n.offsetHeight:e,c=Pr(t)!==o||Pr(e)!==i;return c&&(t=o,e=i),{width:t,height:e,$:c}}function to(n){return $e(n)?n:n.contextElement}function vn(n){const a=to(n);if(!$t(a))return mt(1);const t=a.getBoundingClientRect(),{width:e,height:r,$:o}=Dc(a);let i=(o?Pr(t.width):t.width)/e,c=(o?Pr(t.height):t.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const tf=mt(0);function Cc(n){const a=Oe(n);return!eo()||!a.visualViewport?tf:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function nf(n,a,t){return a===void 0&&(a=!1),!!t&&a&&t===Oe(n)}function tn(n,a,t,e){a===void 0&&(a=!1),t===void 0&&(t=!1);const r=n.getBoundingClientRect(),o=to(n);let i=mt(1);a&&(e?$e(e)&&(i=vn(e)):i=vn(n));const c=nf(o,t,e)?Cc(o):mt(0);let l=(r.left+c.x)/i.x,p=(r.top+c.y)/i.y,d=r.width/i.x,h=r.height/i.y;if(o&&e){const x=Oe(o),y=$e(e)?Oe(e):e;let b=x,w=Wa(b);for(;w&&y!==b;){const k=vn(w),f=w.getBoundingClientRect(),S=Ue(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,h*=k.y,l+=E,p+=T,b=Oe(w),w=Wa(b)}}return Tr({width:d,height:h,x:l,y:p})}function Jr(n,a){const t=Xr(n).scrollLeft;return a?a.left+t:tn(kt(n)).left+t}function Sc(n,a){const t=n.getBoundingClientRect(),e=t.left+a.scrollLeft-Jr(n,t),r=t.top+a.scrollTop;return{x:e,y:r}}function rf(n){let{elements:a,rect:t,offsetParent:e,strategy:r}=n;const o=r==="fixed",i=kt(e),c=a?Gr(a.floating):!1;if(e===i||c&&o)return t;let l={scrollLeft:0,scrollTop:0},p=mt(1);const d=mt(0),h=$t(e);if((h||!o)&&((In(e)!=="body"||Vr(i))&&(l=Xr(e)),h)){const y=tn(e);p=vn(e),d.x=y.x+e.clientLeft,d.y=y.y+e.clientTop}const x=i&&!h&&!o?Sc(i,l):mt(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 af(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function of(n){const a=Xr(n),t=n.ownerDocument.body,e=Qt(n.scrollWidth,n.clientWidth,t.scrollWidth,t.clientWidth),r=Qt(n.scrollHeight,n.clientHeight,t.scrollHeight,t.clientHeight);let o=-a.scrollLeft+Jr(n);const i=-a.scrollTop;return Ue(t).direction==="rtl"&&(o+=Qt(n.clientWidth,t.clientWidth)-e),{width:e,height:r,x:o,y:i}}const sf=25;function cf(n,a,t){t===void 0&&(t="viewport");const e=t==="layoutViewport",r=Oe(n),o=kt(n),i=r.visualViewport;let c=o.clientWidth,l=o.clientHeight,p=0,d=0;if(i){const x=!eo()||a==="fixed";e?x||(p=-i.offsetLeft,d=-i.offsetTop):(c=i.width,l=i.height,x&&(p=i.offsetLeft,d=i.offsetTop))}if(Jr(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<=sf&&(c-=f)}return{width:c,height:l,x:p,y:d}}function lf(n,a){const t=tn(n,!0,a==="fixed"),e=t.top+n.clientTop,r=t.left+n.clientLeft,o=vn(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 ti(n,a,t){let e;if(a==="viewport"||a==="layoutViewport")e=cf(n,t,a);else if(a==="document")e=of(kt(n));else if($e(a))e=lf(a,t);else{const r=Cc(n);e={x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}return Tr(e)}function df(n,a){const t=a.get(n);if(t)return t;let e=Vn(n,[],!1).filter(c=>$e(c)&&In(c)!=="body"),r=null;const o=Ue(n).position==="fixed";let i=o?en(n):n;for(;$e(i)&&!Un(i);){const c=Ue(i),l=Za(i),p=r?r.position:o?"fixed":"";!l&&(p==="fixed"||p==="absolute"&&c.position==="static")?e=e.filter(h=>h!==i):r=c,i=en(i)}return a.set(n,e),e}function uf(n){let{element:a,boundary:t,rootBoundary:e,strategy:r}=n;const i=[...t==="clippingAncestors"?Gr(a)?[]:df(a,this._c):[].concat(t),e],c=ti(a,i[0],r);let l=c.top,p=c.right,d=c.bottom,h=c.left;for(let x=1;x<i.length;x++){const y=ti(a,i[x],r);l=Qt(y.top,l),p=Dn(y.right,p),d=Dn(y.bottom,d),h=Qt(y.left,h)}return{width:p-h,height:d-l,x:h,y:l}}function pf(n){const{width:a,height:t}=Dc(n);return{width:a,height:t}}function ff(n,a,t){const e=$t(a),r=kt(a),o=t==="fixed",i=tn(n,!0,o,a);let c={scrollLeft:0,scrollTop:0};const l=mt(0);if((e||!o)&&((In(a)!=="body"||Vr(r))&&(c=Xr(a)),e)){const x=tn(a,!0,o,a);l.x=x.x+a.clientLeft,l.y=x.y+a.clientTop}!e&&r&&(l.x=Jr(r));const p=r&&!e&&!o?Sc(r,c):mt(0),d=i.left+c.scrollLeft-l.x-p.x,h=i.top+c.scrollTop-l.y-p.y;return{x:d,y:h,width:i.width,height:i.height}}function ga(n){return Ue(n).position==="static"}function ni(n,a){if(!$t(n)||Ue(n).position==="fixed")return null;if(a)return a(n);let t=n.offsetParent;return kt(n)===t&&(t=t.ownerDocument.body),t}function Mc(n,a){const t=Oe(n);if(Gr(n))return t;if(!$t(n)){let r=en(n);for(;r&&!Un(r);){if($e(r)&&!ga(r))return r;r=en(r)}return t}let e=ni(n,a);for(;e&&Xp(e)&&ga(e);)e=ni(e,a);return e&&Un(e)&&ga(e)&&!Za(e)?t:e||ef(n)||t}const hf=async function(n){const a=this.getOffsetParent||Mc,t=this.getDimensions,e=await t(n.floating);return{reference:ff(n.reference,await a(n.floating),n.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function mf(n){return Ue(n).direction==="rtl"}const gf={convertOffsetParentRelativeRectToViewportRelativeRect:rf,getDocumentElement:kt,getClippingRect:uf,getOffsetParent:Mc,getElementRects:hf,getClientRects:af,getDimensions:pf,getScale:vn,isElement:$e,isRTL:mf};function _c(n,a){return n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function xf(n,a,t){let e=null,r;const o=kt(n);function i(){var d;clearTimeout(r),(d=e)==null||d.disconnect(),e=null}function c(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),i();const x=n.getBoundingClientRect(),{left:y,top:b,width:w,height:k}=x;if(d||a(),!w||!k)return;const f=mr(b),S=mr(o.clientWidth-(y+w)),E=mr(o.clientHeight-(b+k)),T=mr(y),O={rootMargin:-f+"px "+-S+"px "+-E+"px "+-T+"px",threshold:Qt(0,Dn(1,h))||1};let C=!0;function D(j){const L=j[0].intersectionRatio;if(!_c(x,n.getBoundingClientRect()))return c();if(L!==h){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=Oe(n),p=()=>c(t);return l.addEventListener("resize",p),c(!0),()=>{l.removeEventListener("resize",p),i()}}function yf(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=to(n),d=r||o?[...p?Vn(p):[],...a?Vn(a):[]]:[];d.forEach(f=>{r&&f.addEventListener("scroll",t),o&&f.addEventListener("resize",t)});const h=p&&c?xf(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?tn(n):null;l&&k();function k(){const f=tn(n);w&&!_c(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)}),h==null||h(),(f=y)==null||f.disconnect(),y=null,l&&cancelAnimationFrame(b)}}const bf=Gp,vf=Qp,ri=Kp,wf=(n,a,t)=>{const e=new Map,r=t??{},o={...gf,...r.platform,_c:e};return qp(n,a,{...r,platform:o})};var kf=typeof document<"u",Df=function(){},Cr=kf?v.useLayoutEffect:Df;function $r(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(!$r(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)&&!$r(n[o],a[o]))return!1}return!0}return n!==n&&a!==a}function jc(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function ai(n,a){const t=jc(n);return Math.round(a*t)/t}function xa(n){const a=v.useRef(n);return Cr(()=>{a.current=n}),a}function Cf(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,h]=v.useState({x:0,y:0,strategy:t,placement:a,middlewareData:{},isPositioned:!1}),[x,y]=v.useState(e);$r(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),j=l!=null,L=xa(l),q=xa(r),A=xa(p),Q=v.useCallback(()=>{if(!O.current||!C.current)return;const M={placement:a,strategy:t,middleware:x};q.current&&(M.platform=q.current),wf(O.current,C.current,M).then(U=>{const z={...U,isPositioned:A.current!==!1};B.current&&!$r(D.current,z)&&(D.current=z,Wl.flushSync(()=>{h(z)}))})},[x,a,t,q,A]);Cr(()=>{p===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,h(M=>({...M,isPositioned:!1})))},[p]);const B=v.useRef(!1);Cr(()=>(B.current=!0,()=>{B.current=!1}),[]),Cr(()=>{if(T&&(O.current=T),$&&(C.current=$),T&&$){if(L.current)return L.current(T,$,Q);Q()}},[T,$,Q,L,j]);const K=v.useMemo(()=>({reference:O,floating:C,setReference:S,setFloating:E}),[S,E]),P=v.useMemo(()=>({reference:T,floating:$}),[T,$]),H=v.useMemo(()=>{const M={position:t,left:0,top:0};if(!P.floating)return M;const U=ai(P.floating,d.x),z=ai(P.floating,d.y);return c?{...M,transform:"translate("+U+"px, "+z+"px)",...jc(P.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:U,top:z}},[t,c,P.floating,d.x,d.y]);return v.useMemo(()=>({...d,update:Q,refs:K,elements:P,floatingStyles:H}),[d,Q,K,P,H])}const Sf=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?ri({element:e.current,padding:r}).fn(t):{}:e?ri({element:e,padding:r}).fn(t):{}}}},Mf=(n,a)=>{const t=bf(n);return{name:t.name,fn:t.fn,options:[n,a]}},_f=(n,a)=>{const t=vf(n);return{name:t.name,fn:t.fn,options:[n,a]}},jf=(n,a)=>{const t=Sf(n);return{name:t.name,fn:t.fn,options:[n,a]}},Ic=216n,If=(1n<<Ic)-1n;function Pf(n){const a=typeof n=="bigint"?n:BigInt(n.trim());if(a<0n)throw new Error(`Invalid tokenId: ${String(n)}`);return{itemId:(a>>Ic).toString(),issuedId:(a&If).toString()}}function Ef(n){if(!n)return null;try{return Pf(n).itemId}catch{return null}}const Pc=["cancelled-listings"];function Tf(n,a){a&&n.setQueryData(Pc,t=>t!=null&&t.includes(a)?t:[...t??[],a])}function oi(n,a){var t;if(a)return(t=n.getQueryData(Pc))!=null&&t.includes(a)?void 0:a}function ii(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 ya(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:ii(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 h=d.items.filter(x=>!(x.contractAddress===r&&x.tokenId===o));return{...d,items:h,total:Math.max(0,d.total-(d.items.length-h.length))}}return{...d,items:d.items.map(h=>h.contractAddress===r&&h.tokenId===o?ii(h,t):h)}})}:p),n.setQueriesData({queryKey:["secondary-sale-state"]},p=>{var h;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??((h=d[i])==null?void 0:h.tradeId)??""},d})}function $f(n){return!(n.isMarket||n.forSale&&n.priceKnown||n.manage||n.soldOutWithResale||!n.stillResolving&&!n.resolvingTrade&&(n.isTokenRoute?!n.ownedAssetLoading:!n.deepLinkLoading))}const Nf="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==",Of="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=",Rf=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
|
-
`,Af=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
|
-
`,Lf=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
|
-
`,Ff=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
|
-
`,Yf=g.div`
|
|
42
|
-
display: flex;
|
|
43
|
-
align-items: center;
|
|
44
|
-
gap: 12px;
|
|
45
|
-
`,Wf=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
|
-
`,Bf=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
|
-
`,Hf=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
|
-
`,zf=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
|
-
`,qf=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
|
-
`,Kf=g.div`
|
|
112
|
-
display: flex;
|
|
113
|
-
flex-direction: column;
|
|
114
|
-
gap: 12px;
|
|
115
|
-
`,si=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
|
-
`,ci=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
|
-
`,li=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
|
-
`,di=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
|
-
`,ui=g.div`
|
|
178
|
-
display: flex;
|
|
179
|
-
align-items: center;
|
|
180
|
-
gap: 13px;
|
|
181
|
-
min-width: 0;
|
|
182
|
-
`,pi=g.span`
|
|
183
|
-
flex: none;
|
|
184
|
-
display: grid;
|
|
185
|
-
place-items: center;
|
|
186
|
-
`,fi=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
|
-
`,hi=g.div`
|
|
193
|
-
display: flex;
|
|
194
|
-
flex-direction: column;
|
|
195
|
-
min-width: 0;
|
|
196
|
-
`,mi=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
|
-
`,gi=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
|
-
`,xi=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 yi=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
|
-
`,bi=g.div`
|
|
253
|
-
flex: none;
|
|
254
|
-
display: flex;
|
|
255
|
-
flex-direction: column;
|
|
256
|
-
align-items: flex-end;
|
|
257
|
-
gap: 2px;
|
|
258
|
-
`,Qf=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
|
-
`,Uf=g.img`
|
|
285
|
-
width: 13px;
|
|
286
|
-
height: 13px;
|
|
287
|
-
display: block;
|
|
288
|
-
`,Vf=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 Gf=g.span`
|
|
337
|
-
font-family: ${u.font.sans};
|
|
338
|
-
font-size: 11px;
|
|
339
|
-
line-height: 1.35;
|
|
340
|
-
color: ${u.colors.muted};
|
|
341
|
-
`,Xf=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 Jf({item:n,priceCredits:a,priceCents:t,options:e,priceManaWei:r,balanceCredits:o,manaBalanceWei:i,onBuy:c,onClose:l,busy:p=!1,notice:d}){const h=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(()=>h?new Set(["credits"]):y?new Set(["credits","mana"]):x?new Set(["mana"]):new Set),k=!!h||!!y,f=!!x||!!y;v.useEffect(()=>{w(D=>{const j=new Set(D);return j.has("credits")&&!k&&j.delete("credits"),j.has("mana")&&!f&&j.delete("mana"),j.size===D.size?D:j})},[k,f]);const S=b.has("credits"),E=b.has("mana"),T=S&&E?y?"combined":null:S?h?"credits":null:E&&x?"mana":null,$=T==="combined"&&y?y.credits:(h==null?void 0:h.credits)??_t(t),O=T==="combined"&&y?y.manaWei:(x==null?void 0:x.manaWei)??r;function C(D){w(j=>{const L=new Set(j);return L.has(D)?L.delete(D):L.add(D),L})}return s.jsxs(Rf,{children:[s.jsxs(Af,{children:[s.jsx(Lf,{children:m("buyModal.choosePayment")}),s.jsx(Ff,{onClick:l,disabled:p,"aria-label":m("buyModal.close"),children:s.jsx(X,{name:"close",className:"ico"})})]}),s.jsxs(Yf,{children:[s.jsx(Wf,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsxs(Bf,{children:[s.jsxs("div",{children:[s.jsx(Hf,{title:n.name,children:n.name||m("buyModal.itemFallback")}),n.creator?s.jsx(zf,{children:s.jsx(ql,{address:n.creator})}):null]}),s.jsxs(qf,{children:[s.jsx(Ne,{}),s.jsx("span",{children:It(a)})]})]})]}),s.jsxs(Kf,{children:[s.jsxs(si,{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(ci,{children:s.jsx(li,{"data-checked":S,children:s.jsx(X,{name:"check",className:"ico"})})}),s.jsxs(di,{children:[s.jsxs(ui,{children:[s.jsx(pi,{children:s.jsx(fi,{src:Nf,w:32.582,h:34.401,alt:"","aria-hidden":!0})}),s.jsxs(hi,{children:[s.jsx(mi,{children:Ke.name}),s.jsxs(gi,{children:[m("buyModal.creditsBalanceLabel"),s.jsx(Ne,{}),s.jsx(xi,{children:It(o)})]})]})]}),s.jsx(bi,{children:s.jsxs(yi,{children:[s.jsx(Ne,{}),s.jsx("span",{children:It($)})]})})]})]}),s.jsxs(si,{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(ci,{children:s.jsx(li,{"data-checked":E,children:s.jsx(X,{name:"check",className:"ico"})})}),s.jsxs(di,{children:[s.jsxs(ui,{children:[s.jsx(pi,{children:s.jsx(fi,{src:Of,w:35.328,h:35.328,alt:"","aria-hidden":!0})}),s.jsxs(hi,{children:[s.jsx(mi,{children:m("buyModal.methodMana")}),s.jsxs(gi,{children:[m("buyModal.manaBalanceLabel"),s.jsx(Uf,{src:Qo,alt:"","aria-hidden":!0}),s.jsx(xi,{children:Lo(i)})]})]})]}),s.jsx(bi,{children:f?s.jsx(s.Fragment,{children:s.jsxs(yi,{children:[s.jsx(Vf,{src:Qo,alt:"","aria-hidden":!0}),s.jsx("span",{children:Lo(O)})]})}):s.jsx(Gf,{"data-testid":"mana-shortfall-note",children:m("buyModal.notEnoughMana")})})]})]})]}),d?s.jsx(Xf,{"data-testid":"price-changed",role:"status",children:d}):null,s.jsx(Qf,{type:"button","data-testid":"confirm-payment",disabled:p||T===null,onClick:()=>T&&c(T),children:m("buyModal.buy")})]})}function Ec(){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 Zf=xp("0.05");async function eh(n){try{return(await new gp(Xt.rpcUrl).getBalance(n)).gte(Zf)}catch{return!1}}async function th(n,a){return zr(n)?eh(a):!1}function nh({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 rh=n=>ed(n.contractAddress,String(n.itemId));async function vi(n,a={}){if(n.kind==="store")return BigInt(n.mint.item.priceWei);try{return await td(n.trade)}catch(t){return a.reportFailure!==!1&&Me(t,{flow:"buy",step:"mana_price"}),null}}function wi(n){return n.kind==="trade"?n.trade.id:void 0}function ki(n){return n.contractAddress&&n.itemId!=null?{contractAddress:n.contractAddress,itemId:String(n.itemId)}:void 0}function Ba({item:n,onClose:a,resume:t=!1}){var or,ir;const{session:e}=Jt(),{data:r}=ac(e),{data:o}=Kl(e),i=on(),c=an();async function l(){try{return await i.fetchQuery({queryKey:["mana-rate",Xt.chainId],queryFn:()=>Zl(Xt.chainId),staleTime:6e4})}catch{return}}const p=op().packs.slice(0,ip),[d,h]=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,j]=v.useState(null),[L,q]=v.useState(!1),[A,Q]=v.useState(null),[B,K]=v.useState(0),[P,H]=v.useState(null),[M,U]=v.useState(!1),z=v.useRef(null),J=v.useRef(!1),pe=v.useRef(Ec()),ye=(P==null?void 0:P.credits)??O,we=(r==null?void 0:r.credits)??0;v.useEffect(()=>(J.current=!1,()=>{J.current=!0}),[]);async function Nt(N,V,G,ne){const ie=(o??0n)>0n,ve=ie?await vi(V):null;if(ne!=null&&ne())return;ve!=null?j(ve):ie&&q(!0);const ke=Ho({priceCents:G,priceManaWei:ve??0n,balanceCents:(r==null?void 0:r.balanceCents)??0,manaBalanceWei:o??0n}).options.some(dn=>dn.method==="mana"||dn.method==="combined"),ze=N-((r==null?void 0:r.credits)??0),St=p.find(dn=>dn.credits>=ze)??p[p.length-1];$(St.id),ke||de("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:N,credits_balance:(r==null?void 0:r.credits)??0,shortfall:Math.max(0,ze)}),h("nofunds")}v.useEffect(()=>{let N=!1;if(!e){h("error"),y(m("buyModal.signInToCheckout"));return}return(async()=>{try{const V=await sp(n,e.address,Ql,await l(),rh);if(V.status==="own")throw new Error("You can't buy your own listing.");if(V.status==="no-price")throw new Error("price unavailable");if(V.status!=="buyable")throw new Error("not for sale");const G=cp(V.line),ne=V.line.usdCents,ie=_t(ne);if(N)return;if(C(ie),Q(G),K(ne),r!=null&&r.credits<ie){await Nt(ie,G,ne,()=>N);return}t?Ot({sale:G,usdCents:ne}):h("ready")}catch(V){if(N)return;de(Te(V)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:He(V)}),dt(V)}})(),()=>{N=!0,z.current&&e&&(nr([z.current]),z.current=null)}},[S]),v.useEffect(()=>{const N=(P==null?void 0:P.sale)??A;if(!N||d!=="ready"&&d!=="nofunds"||o==null||o<=0n||D!==null)return;let V=!1;return vi(N,{reportFailure:!L}).then(G=>{V||(G!=null?j(G):q(!0))}),()=>{V=!0}},[d,P,A,o,D,L]);const je=Ho({priceCents:B,priceManaWei:D??0n,balanceCents:(r==null?void 0:r.balanceCents)??0,manaBalanceWei:o??0n});async function Ot(N){const V=(P==null?void 0:P.sale)??(N==null?void 0:N.sale)??A,G=(P==null?void 0:P.usdCents)??(N==null?void 0:N.usdCents)??B;if(!e||!V||G<=0)return;h("processing"),y(null),U(!1);let ne=P;if(!ne)try{const{credit:Z,maxCreditedValue:ke,usdCents:ze}=await Fa(e.identity,G,wi(V),ki(n));if(J.current){Rt([Z.id]);return}z.current=Z.id,i.invalidateQueries({queryKey:["usd-balance"]});const St=_t(ze);if(ne={sale:V,credit:Z,maxCreditedValue:ke,usdCents:ze,credits:St},H(ne),St!==_t(G)){C(St),K(ze),U(!0),h("ready");return}}catch(Z){if(kp(Z)){i.invalidateQueries({queryKey:["usd-balance"]}),await Nt(_t(G),V,G);return}Te(Z)||Me(Z,{flow:"buy",step:"authorize"}),de(Te(Z)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:He(Z)}),y(Zt(Z,m("buyModal.error.generic"),{sale:!0})),h("error");return}if(!ne)return;let ie=!1,ve;try{const Z={purchase:Vd(ne.sale,[ne.credit],ne.maxCreditedValue),buyer:e.address,signer:e.signer,onBroadcast:({txHash:ke})=>pe.current.broadcast(ne.credit.id,ke),onReverted:({txHash:ke})=>{ke&&pe.current.reverted(ke)}};if(pe.current.submitStarted(ne.credit.id),hc())try{ve=await vp(Z),pe.current.broadcast(ne.credit.id,ve),await xc(ve),ie=!0}catch(ke){if(ke instanceof yc)ie=!0;else if(ke instanceof bc){if(ke.reason==="relayer-unreachable")throw pe.current.unobservable(ne.credit.id),ke;if(!zr(e.providerType))throw ke;ve=await qo(Z)}else throw ve&&pe.current.reverted(ve),ke}else ve=await qo(Z)}catch(Z){pe.current.submitFinished(ne.credit.id),Te(Z)||Me(Z,{flow:"buy",step:"submit",gasless:ie}),En([ne.credit.id]),z.current=null,de(Te(Z)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:He(Z)}),i.invalidateQueries({queryKey:["usd-balance"]}),dt(Z);return}pe.current.submitFinished(ne.credit.id),z.current=null;try{Gd(i,n),de("Shop Completed Purchase",{...fa([n]),payment_type:"credits",no_crypto_step:ie,transaction_hash:ve??null})}catch(Z){Me(Z,{flow:"buy",step:"post_purchase"})}h("complete")}function Rt(N){if(!e||N.length===0)return Promise.resolve(!1);const V=N.filter(G=>!pe.current.mayBeConsumed(G));return V.length===0?Promise.resolve(!1):oc(e.identity,V).then(()=>!0,()=>!0)}function En(N){f(!0),Rt(N).then(V=>{V||f(!1)})}function nr(N){return Rt(N.filter(V=>!pe.current.isInFlight(V)))}function cn(){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 At(){var V;const N=(P==null?void 0:P.sale)??A;if(!(!e||!N)){z.current&&(En([z.current]),z.current=null),h("processing"),y(null);try{const G=(V=zo(je,"mana"))==null?void 0:V.manaWei,ne=N.kind==="trade"?await Yu({trade:N.trade,buyer:e.address,signer:e.signer,manaWei:G}):await Wu({mint:N.mint,buyer:e.address,signer:e.signer,manaWei:G});de("Shop Completed Purchase",{...fa([n]),payment_type:"mana",transaction_hash:ne??null}),cn(),h("complete")}catch(G){Te(G)||Me(G,{flow:"buy_mana",step:"submit"}),de(Te(G)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:He(G)}),dt(G)}}}async function Lt(){const N=(P==null?void 0:P.sale)??A,V=zo(je,"combined");if(!e||!N||!V)return;h("processing"),y(null),z.current&&(await Rt([z.current])&&f(!0),z.current=null);let G=null,ne;try{const{credit:ie}=await Fa(e.identity,V.creditsCents,wi(N),ki(n));G=ie.id,pe.current.submitStarted(ie.id);const ve={buyer:e.address,signer:e.signer,credits:[ie],manaGapWei:V.manaWei,onBroadcast:({txHash:Z})=>pe.current.broadcast(ie.id,Z),onReverted:({txHash:Z})=>{Z&&pe.current.reverted(Z)}};ne=N.kind==="trade"?await Bu({trade:N.trade,...ve}):await Hu({mint:N.mint,...ve})}catch(ie){G&&pe.current.submitFinished(G),G&&En([G]),Te(ie)||Me(ie,{flow:"buy_credits_and_mana",step:"submit"}),de(Te(ie)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:He(ie)}),i.invalidateQueries({queryKey:["usd-balance"]}),dt(ie);return}G&&pe.current.submitFinished(G);try{cn(),de("Shop Completed Purchase",{...fa([n]),payment_type:"credits_and_mana",transaction_hash:ne??null})}catch(ie){Me(ie,{flow:"buy_credits_and_mana",step:"post_purchase"})}h("complete")}async function oa(){if(!(!T||!e)){try{sessionStorage.setItem(Vo,JSON.stringify(n))}catch{}z.current&&(Rt([z.current]),z.current=null),H(null),h("loading");try{const N=await lp(T,{address:e.address,identity:e.identity});if(N.url){window.location.href=N.url;return}c("/credits")}catch(N){Me(N,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(Vo)}catch{}y(m("buyModal.error.creditsCheckout")),h("error")}}}const[be,lt]=v.useState(null);function Dt(N,V){const{spender:G,chainId:ne}=zu(N,V);return up(ne,G)}function dt(N){if(y(Zt(N,m("buyModal.error.generic"),{sale:!0})),h("error"),!Ul(N)||!e)return;const V=N.required;(async()=>{if(await th(e.providerType,e.address)){w(V);return}y(m("buyModal.error.relayDownNoRail"))})()}async function Ft(N){if(e){w(null);try{await nd(e.web3Provider,N)}catch(V){Te(V)||Me(V,{flow:"buy",step:"switch_chain"}),w(N);return}Ct()}}function Fe(N){N==="mana"?At():N==="combined"?Lt():Ot()}const ln=v.useRef(!1);async function rr(N){var V;if(!ln.current){ln.current=!0;try{const G=(P==null?void 0:P.sale)??A;if(N==="credits"||!G||!e){Fe(N);return}const ne=Dt(N,G),ie=((V=je.options.find(Z=>Z.method===N))==null?void 0:V.manaWei)??0n,ve=await mc(ne,e.address,ie).catch(()=>!0);if(dp(e.providerType,ve)){lt({auth:ne,rail:N});return}Fe(N)}finally{ln.current=!1}}}const ar=je.options.some(N=>N.method==="mana"||N.method==="combined"),Tn=d==="ready"&&(ar||je.manaShortfall!=null)||d==="nofunds"&&ar;function Ct(){y(null),H(null),U(!1),f(!1),h("loading"),E(N=>N+1)}const ut=d==="error"&&b===null&&(!!z.current||k),Ge=d==="processing",$n=d==="complete"?m("buyModal.titleComplete"):d==="error"?m("cartCheckout.errorTitle"):d==="nofunds"?m("buyModal.titleNoFunds"):m("buyModal.titleBuy");return be&&e?s.jsx(fc,{auth:be.auth,signer:e.signer,title:m(be.rail==="mana"?"authorizeStep.manaTitle":"authorizeStep.buyTitle"),name:m(be.rail==="mana"?"authorizeStep.manaName":"authorizeStep.buyName"),reason:m(be.rail==="mana"?"authorizeStep.manaReason":"authorizeStep.buyReason"),icon:s.jsx("img",{src:Xd,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{rail:N}=be;lt(null),Fe(N)},onCancel:()=>lt(null),onClose:()=>{lt(null),a()}}):s.jsxs(Jd,{role:"dialog","aria-modal":"true","aria-label":m("buyModal.dialogAria",{name:n.name}),"data-testid":"buy-modal",children:[s.jsx(Zd,{onClick:Ge?void 0:a,"aria-hidden":!0}),s.jsx(eu,{"data-tall":d==="processing"||d==="loading"||void 0,children:Tn?s.jsx(Jf,{item:n,priceCredits:ye,priceCents:B,options:je.options,priceManaWei:D??0n,balanceCredits:we,manaBalanceWei:o??0n,onBuy:N=>void rr(N),onClose:a,busy:Ge,notice:M?m("buyModal.priceChanged"):r!=null&&r.held?m("buyModal.heldExplainer",{credits:r.held.credits,currency:Ke.name}):null}):s.jsxs(s.Fragment,{children:[s.jsxs(tu,{children:[s.jsxs(nu,{children:[s.jsx(ru,{children:$n}),!Ge&&s.jsx(au,{onClick:a,"aria-label":m("buyModal.close"),children:s.jsx(ou,{})})]}),s.jsxs(iu,{children:[s.jsx(su,{children:d==="nofunds"?m("buyModal.dclBalance"):m("buyModal.myCreditsBalance")}),s.jsx(cu,{}),s.jsx(lu,{children:It(we)})]})]}),d==="loading"&&s.jsx(fn,{"data-processing":!0,children:s.jsx(Mp,{size:44})}),d==="error"&&s.jsxs(fn,{children:[s.jsxs(du,{"data-testid":"buy-error",children:[s.jsx(uu,{src:pu,alt:"",width:64,height:80}),s.jsxs(fu,{children:[s.jsx("b",{children:m("cartCheckout.errorHeadline")})," ",x??(ut?null:m("cartCheckout.errorBody")),ut?s.jsxs(s.Fragment,{children:[x?" ":"",m("cartCheckout.heldLead",{currency:Ke.name}),s.jsx("b",{children:m("cartCheckout.heldBold")}),m("cartCheckout.heldTail",{currency:Ke.name})]}):null]})]}),b!==null?s.jsxs(hn,{children:[s.jsx(ft,{"data-variant":"outline",onClick:a,children:m("buyModal.cancel")}),s.jsx(ft,{"data-variant":"purple","data-testid":"switch-and-retry",onClick:()=>void Ft(b),children:m("buyModal.error.switchAndRetry",{network:Vl(b)})})]}):ut?s.jsx(hn,{children:s.jsx(ft,{"data-variant":"purple","data-full":!0,onClick:a,children:m("cartCheckout.gotIt")})}):s.jsxs(hn,{children:[s.jsx(ft,{"data-variant":"outline",onClick:a,children:m("buyModal.cancel")}),s.jsx(ft,{"data-variant":"purple",onClick:Ct,children:m("cartCheckout.tryAgain")})]})]}),d==="nofunds"&&s.jsxs(fn,{children:[L&&D===null&&(o??0n)>0n?s.jsxs(pr,{"data-testid":"mana-price-unavailable",children:[s.jsx(fr,{}),s.jsx(hr,{children:m("buyModal.manaPriceUnavailable")})]}):null,r!=null&&r.held?s.jsxs(pr,{"data-testid":"nofunds-held",children:[s.jsx(fr,{}),s.jsx(hr,{children:m("buyModal.heldExplainer",{credits:r.held.credits,currency:Ke.name})})]}):null,s.jsxs(pr,{children:[s.jsx(fr,{}),s.jsxs(hr,{children:[s.jsx("b",{children:m("buyModal.insufficientFunds")})," ",m("buyModal.warningNeedToBuy")," ",s.jsx("b",{children:m("buyModal.warningCreditsAmount",{count:Math.max(1,ye-we)})})," ",m("buyModal.warningToPurchase",{count:1}),qn()?null:s.jsxs(s.Fragment,{children:[" ",s.jsx(hu,{href:Gl("/credits"),target:"_blank",rel:"noopener noreferrer",children:m("buyModal.warningLearnMore")})]})]})]}),s.jsx(Di,{item:n,priceCredits:ye}),je.manaShortfall?s.jsx(mu,{options:[],totalCents:B,shortfall:je.manaShortfall,onPay:()=>{}}):null,qn()?null:s.jsxs(s.Fragment,{children:[s.jsx(gu,{"data-testid":"credit-packs",children:p.map(N=>{const V=N.credits,G=N.id===T;return s.jsxs(xu,{"data-on":G||void 0,onClick:()=>$(N.id),children:[s.jsx(yu,{src:bu,alt:""}),s.jsx(vu,{children:It(V)}),s.jsxs(wu,{children:["($",N.usd.toFixed(2),")"]})]},N.id)})}),s.jsxs(ku,{children:[s.jsxs(Du,{children:[s.jsx(Cu,{}),s.jsx("span",{children:It(((or=p.find(N=>N.id===T))==null?void 0:or.credits)??0)})]}),s.jsxs(Su,{children:["$",(((ir=p.find(N=>N.id===T))==null?void 0:ir.usd)??0).toFixed(2)]})]})]}),s.jsxs(hn,{children:[s.jsx(ft,{"data-variant":"outline",onClick:a,children:m("buyModal.cancel")}),qn()?null:s.jsx(ft,{"data-variant":"gradient",onClick:()=>void oa(),children:m("buyModal.buy")})]})]}),d==="ready"&&s.jsxs(fn,{children:[M&&s.jsxs(pr,{"data-testid":"price-changed",role:"status",children:[s.jsx(fr,{}),s.jsx(hr,{children:m("buyModal.priceChanged")})]}),s.jsx(Di,{item:n,priceCredits:ye}),s.jsx(hn,{children:s.jsx(ft,{"data-variant":"gradient","data-full":!0,onClick:()=>void Ot(),children:m("buyModal.buy")})})]}),d==="processing"&&s.jsxs(fn,{"data-processing":!0,children:[s.jsx(Mu,{src:Xl,alt:"",width:61,height:61}),s.jsx(_u,{children:t?m("buyModal.completingPurchase"):m("buyModal.completingTransaction")}),s.jsx(ju,{"aria-hidden":!0,children:s.jsx(Iu,{})})]}),d==="complete"&&s.jsxs(fn,{children:[s.jsx(Dp,{}),s.jsxs(Pu,{children:[s.jsx(nh,{}),s.jsxs(Eu,{children:[s.jsx("b",{children:m("getCredits.successTitle")})," ",m("buyModal.successBody")]})]}),s.jsxs(hn,{"data-stack":!0,children:[s.jsx(ft,{"data-variant":"outline",onClick:()=>c(Jl([n.category])),children:m("buyModal.myAssets")}),s.jsxs(Tu,{"data-variant":"ruby",href:Cp,target:"_blank",rel:"noreferrer",onClick:a,children:[m("buyModal.tryInWorld"),s.jsx(Sp,{})]})]})]})]})})]})}function Di({item:n,priceCredits:a}){return s.jsxs($u,{children:[s.jsx(Nu,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsxs(Ou,{children:[s.jsxs("div",{children:[s.jsx(Ru,{title:n.name,children:n.name||m("buyModal.itemFallback")}),n.creator?s.jsx(Au,{address:n.creator}):null]}),s.jsxs(Lu,{children:[s.jsx(Fu,{}),s.jsx("span",{children:It(a)})]})]})]})}function Tc(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=Tc(n[a]))&&(e&&(e+=" "),e+=t)}else for(t in n)n[t]&&(e&&(e+=" "),e+=t);return e}function _e(){for(var n,a,t=0,e="",r=arguments.length;t<r;t++)(n=arguments[t])&&(a=Tc(n))&&(e&&(e+=" "),e+=a);return e}function Y(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 Qe(n,a){const t=Y(n);return isNaN(a)?ce(n,NaN):(a&&t.setDate(t.getDate()+a),t)}function Ve(n,a){const t=Y(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 no(n,a){const t=+Y(n);return ce(n,t+a)}const $c=6048e5,ah=864e5,Zr=6e4,ea=36e5,oh=1e3;function ih(n,a){return no(n,a*ea)}let sh={};function sn(){return sh}function vt(n,a){var c,l,p,d;const t=sn(),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=Y(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 Sn(n){return vt(n,{weekStartsOn:1})}function Nc(n){const a=Y(n),t=a.getFullYear(),e=ce(n,0);e.setFullYear(t+1,0,4),e.setHours(0,0,0,0);const r=Sn(e),o=ce(n,0);o.setFullYear(t,0,4),o.setHours(0,0,0,0);const i=Sn(o);return a.getTime()>=r.getTime()?t+1:a.getTime()>=i.getTime()?t:t-1}function nn(n){const a=Y(n);return a.setHours(0,0,0,0),a}function Nr(n){const a=Y(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 Mn(n,a){const t=nn(n),e=nn(a),r=+t-Nr(t),o=+e-Nr(e);return Math.round((r-o)/ah)}function ch(n){const a=Nc(n),t=ce(n,0);return t.setFullYear(a,0,4),t.setHours(0,0,0,0),Sn(t)}function Ha(n,a){return no(n,a*Zr)}function ro(n,a){const t=a*3;return Ve(n,t)}function lh(n,a){return no(n,a*1e3)}function Or(n,a){const t=a*7;return Qe(n,t)}function gt(n,a){return Ve(n,a*12)}function Ci(n){let a;return n.forEach(function(t){const e=Y(t);(a===void 0||a<e||isNaN(Number(e)))&&(a=e)}),a||new Date(NaN)}function Si(n){let a;return n.forEach(t=>{const e=Y(t);(!a||a>e||isNaN(+e))&&(a=e)}),a||new Date(NaN)}function dh(n,a){const t=nn(n),e=nn(a);return+t==+e}function xt(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Rr(n){if(!xt(n)&&typeof n!="number")return!1;const a=Y(n);return!isNaN(Number(a))}function Ar(n,a){const t=Y(n),e=Y(a),r=t.getFullYear()-e.getFullYear(),o=t.getMonth()-e.getMonth();return r*12+o}function Ut(n){const a=Y(n);return Math.trunc(a.getMonth()/3)+1}function Lr(n,a){const t=Y(n),e=Y(a),r=t.getFullYear()-e.getFullYear(),o=Ut(t)-Ut(e);return r*4+o}function Fr(n,a){const t=Y(n),e=Y(a);return t.getFullYear()-e.getFullYear()}function uh(n,a){const t=Y(n),e=Y(a),r=Mi(t,e),o=Math.abs(Mn(t,e));t.setDate(t.getDate()-r*o);const i=+(Mi(t,e)===-r),c=r*(o-i);return c===0?0:c}function Mi(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 Oc(n){const a=Y(n);return a.setHours(23,59,59,999),a}function Rc(n){const a=Y(n),t=a.getMonth();return a.setFullYear(a.getFullYear(),t+1,0),a.setHours(23,59,59,999),a}function za(n){const a=Y(n),t=a.getMonth(),e=t-t%3;return a.setMonth(e,1),a.setHours(0,0,0,0),a}function Ac(n){const a=Y(n);return a.setDate(1),a.setHours(0,0,0,0),a}function Lc(n){const a=Y(n),t=a.getFullYear();return a.setFullYear(t+1,0,0),a.setHours(23,59,59,999),a}function ta(n){const a=Y(n),t=ce(n,0);return t.setFullYear(a.getFullYear(),0,1),t.setHours(0,0,0,0),t}function ph(n,a){var c,l;const t=sn(),e=t.weekStartsOn??((l=(c=t.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??0,r=Y(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 fh={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"}},hh=(n,a,t)=>{let e;const r=fh[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 ba(n){return(a={})=>{const t=a.width?String(a.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const mh={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},gh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},xh={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yh={date:ba({formats:mh,defaultWidth:"full"}),time:ba({formats:gh,defaultWidth:"full"}),dateTime:ba({formats:xh,defaultWidth:"full"})},bh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},vh=(n,a,t,e)=>bh[n];function Rn(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 wh={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},kh={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Dh={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"]},Ch={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"]},Sh={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"}},Mh={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"}},_h=(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"},jh={ordinalNumber:_h,era:Rn({values:wh,defaultWidth:"wide"}),quarter:Rn({values:kh,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Rn({values:Dh,defaultWidth:"wide"}),day:Rn({values:Ch,defaultWidth:"wide"}),dayPeriod:Rn({values:Sh,defaultWidth:"wide",formattingValues:Mh,defaultFormattingWidth:"wide"})};function An(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)?Ph(c,h=>h.test(i)):Ih(c,h=>h.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 Ih(n,a){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&a(n[t]))return t}function Ph(n,a){for(let t=0;t<n.length;t++)if(a(n[t]))return t}function Eh(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 Th=/^(\d+)(th|st|nd|rd)?/i,$h=/\d+/i,Nh={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},Oh={any:[/^b/i,/^(a|c)/i]},Rh={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ah={any:[/1/i,/2/i,/3/i,/4/i]},Lh={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},Fh={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]},Yh={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},Wh={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]},Bh={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},Hh={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}},zh={ordinalNumber:Eh({matchPattern:Th,parsePattern:$h,valueCallback:n=>parseInt(n,10)}),era:An({matchPatterns:Nh,defaultMatchWidth:"wide",parsePatterns:Oh,defaultParseWidth:"any"}),quarter:An({matchPatterns:Rh,defaultMatchWidth:"wide",parsePatterns:Ah,defaultParseWidth:"any",valueCallback:n=>n+1}),month:An({matchPatterns:Lh,defaultMatchWidth:"wide",parsePatterns:Fh,defaultParseWidth:"any"}),day:An({matchPatterns:Yh,defaultMatchWidth:"wide",parsePatterns:Wh,defaultParseWidth:"any"}),dayPeriod:An({matchPatterns:Bh,defaultMatchWidth:"any",parsePatterns:Hh,defaultParseWidth:"any"})},Fc={code:"en-US",formatDistance:hh,formatLong:yh,formatRelative:vh,localize:jh,match:zh,options:{weekStartsOn:0,firstWeekContainsDate:1}};function qh(n){const a=Y(n);return Mn(a,ta(a))+1}function ao(n){const a=Y(n),t=+Sn(a)-+ch(a);return Math.round(t/$c)+1}function oo(n,a){var d,h,x,y;const t=Y(n),e=t.getFullYear(),r=sn(),o=(a==null?void 0:a.firstWeekContainsDate)??((h=(d=a==null?void 0:a.locale)==null?void 0:d.options)==null?void 0:h.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=vt(i,a),l=ce(n,0);l.setFullYear(e,0,o),l.setHours(0,0,0,0);const p=vt(l,a);return t.getTime()>=c.getTime()?e+1:t.getTime()>=p.getTime()?e:e-1}function Kh(n,a){var c,l,p,d;const t=sn(),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=oo(n,a),o=ce(n,0);return o.setFullYear(r,0,e),o.setHours(0,0,0,0),vt(o,a)}function Yc(n,a){const t=Y(n),e=+vt(t,a)-+Kh(t,a);return Math.round(e/$c)+1}function se(n,a){const t=n<0?"-":"",e=Math.abs(n).toString().padStart(a,"0");return t+e}const Mt={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)}},mn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},_i={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 Mt.y(n,a)},Y:function(n,a,t,e){const r=oo(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=Nc(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 Mt.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=Yc(n,e);return a==="wo"?t.ordinalNumber(r,{unit:"week"}):se(r,a.length)},I:function(n,a,t){const e=ao(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"}):Mt.d(n,a)},D:function(n,a,t){const e=qh(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=mn.noon:e===0?r=mn.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=mn.evening:e>=12?r=mn.afternoon:e>=4?r=mn.morning:r=mn.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 Mt.h(n,a)},H:function(n,a,t){return a==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):Mt.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"}):Mt.m(n,a)},s:function(n,a,t){return a==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):Mt.s(n,a)},S:function(n,a){return Mt.S(n,a)},X:function(n,a,t){const e=n.getTimezoneOffset();if(e===0)return"Z";switch(a){case"X":return Ii(e);case"XXXX":case"XX":return Ht(e);case"XXXXX":case"XXX":default:return Ht(e,":")}},x:function(n,a,t){const e=n.getTimezoneOffset();switch(a){case"x":return Ii(e);case"xxxx":case"xx":return Ht(e);case"xxxxx":case"xxx":default:return Ht(e,":")}},O:function(n,a,t){const e=n.getTimezoneOffset();switch(a){case"O":case"OO":case"OOO":return"GMT"+ji(e,":");case"OOOO":default:return"GMT"+Ht(e,":")}},z:function(n,a,t){const e=n.getTimezoneOffset();switch(a){case"z":case"zz":case"zzz":return"GMT"+ji(e,":");case"zzzz":default:return"GMT"+Ht(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 ji(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 Ii(n,a){return n%60===0?(n>0?"-":"+")+se(Math.abs(n)/60,2):Ht(n,a)}function Ht(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 Pi=(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"})}},Wc=(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"})}},Qh=(n,a)=>{const t=n.match(/(P+)(p+)?/)||[],e=t[1],r=t[2];if(!r)return Pi(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}}",Pi(e,a)).replace("{{time}}",Wc(r,a))},Yr={p:Wc,P:Qh},Uh=/^D+$/,Vh=/^Y+$/,Gh=["D","DD","YY","YYYY"];function Bc(n){return Uh.test(n)}function Hc(n){return Vh.test(n)}function qa(n,a,t){const e=Xh(n,a,t);if(console.warn(e),Gh.includes(n))throw new RangeError(e)}function Xh(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 Jh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Zh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,em=/^'([^]*?)'?$/,tm=/''/g,nm=/[a-zA-Z]/;function Ei(n,a,t){var d,h,x,y,b,w,k,f;const e=sn(),r=(t==null?void 0:t.locale)??e.locale??Fc,o=(t==null?void 0:t.firstWeekContainsDate)??((h=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:h.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=Y(n);if(!Rr(c))throw new RangeError("Invalid time value");let l=a.match(Zh).map(S=>{const E=S[0];if(E==="p"||E==="P"){const T=Yr[E];return T(S,r.formatLong)}return S}).join("").match(Jh).map(S=>{if(S==="''")return{isToken:!1,value:"'"};const E=S[0];if(E==="'")return{isToken:!1,value:rm(S)};if(_i[E])return{isToken:!0,value:S};if(E.match(nm))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)&&Hc(E)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&Bc(E))&&qa(E,a,String(n));const T=_i[E[0]];return T(c,E,r.localize,p)}).join("")}function rm(n){const a=n.match(em);return a?a[1].replace(tm,"'"):n}function Ti(n){return Y(n).getDate()}function am(n){return Y(n).getDay()}function om(n){const a=Y(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 im(){return Object.assign({},sn())}function st(n){return Y(n).getHours()}function sm(n){let t=Y(n).getDay();return t===0&&(t=7),t}function ct(n){return Y(n).getMinutes()}function Pe(n){return Y(n).getMonth()}function yt(n){return Y(n).getSeconds()}function Ka(n){return Y(n).getTime()}function te(n){return Y(n).getFullYear()}function Tt(n,a){const t=Y(n),e=Y(a);return t.getTime()>e.getTime()}function rn(n,a){const t=Y(n),e=Y(a);return+t<+e}function cm(n,a){const t=Y(n),e=Y(a);return+t==+e}function lm(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 dm=10;class zc{constructor(){W(this,"subPriority",0)}validate(a,t){return!0}}class um extends zc{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 pm extends zc{constructor(){super(...arguments);W(this,"priority",dm);W(this,"subPriority",-1)}set(t,e){return e.timestampIsSet?t:ce(t,lm(t,Date))}}class oe{run(a,t,e,r){const o=this.parse(a,t,e,r);return o?{setter:new um(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(a,t,e){return!0}}class fm extends oe{constructor(){super(...arguments);W(this,"priority",140);W(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 ge={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}/},at={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 xe(n,a){return n&&{value:a(n.value),rest:n.rest}}function fe(n,a){const t=a.match(n);return t?{value:parseInt(t[0],10),rest:a.slice(t[0].length)}:null}function ot(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*ea+o*Zr+i*oh),rest:a.slice(t[0].length)}}function qc(n){return fe(ge.anyDigitsSigned,n)}function he(n,a){switch(n){case 1:return fe(ge.singleDigit,a);case 2:return fe(ge.twoDigits,a);case 3:return fe(ge.threeDigits,a);case 4:return fe(ge.fourDigits,a);default:return fe(new RegExp("^\\d{1,"+n+"}"),a)}}function Wr(n,a){switch(n){case 1:return fe(ge.singleDigitSigned,a);case 2:return fe(ge.twoDigitsSigned,a);case 3:return fe(ge.threeDigitsSigned,a);case 4:return fe(ge.fourDigitsSigned,a);default:return fe(new RegExp("^-?\\d{1,"+n+"}"),a)}}function io(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 Kc(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 Qc(n){return n%400===0||n%4===0&&n%100!==0}class hm extends oe{constructor(){super(...arguments);W(this,"priority",130);W(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 xe(he(4,t),o);case"yo":return xe(r.ordinalNumber(t,{unit:"year"}),o);default:return xe(he(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=Kc(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 mm extends oe{constructor(){super(...arguments);W(this,"priority",130);W(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 xe(he(4,t),o);case"Yo":return xe(r.ordinalNumber(t,{unit:"year"}),o);default:return xe(he(e.length,t),o)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r,o){const i=oo(t,o);if(r.isTwoDigitYear){const l=Kc(r.year,i);return t.setFullYear(l,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),vt(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),vt(t,o)}}class gm extends oe{constructor(){super(...arguments);W(this,"priority",130);W(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return Wr(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),Sn(o)}}class xm extends oe{constructor(){super(...arguments);W(this,"priority",130);W(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return Wr(e==="u"?4:e.length,t)}set(t,e,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}class ym extends oe{constructor(){super(...arguments);W(this,"priority",120);W(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 he(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 bm extends oe{constructor(){super(...arguments);W(this,"priority",120);W(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 he(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 vm extends oe{constructor(){super(...arguments);W(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);W(this,"priority",110)}parse(t,e,r){const o=i=>i-1;switch(e){case"M":return xe(fe(ge.month,t),o);case"MM":return xe(he(2,t),o);case"Mo":return xe(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 wm extends oe{constructor(){super(...arguments);W(this,"priority",110);W(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 xe(fe(ge.month,t),o);case"LL":return xe(he(2,t),o);case"Lo":return xe(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 km(n,a,t){const e=Y(n),r=Yc(e,t)-a;return e.setDate(e.getDate()-r*7),e}class Dm extends oe{constructor(){super(...arguments);W(this,"priority",100);W(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,r){switch(e){case"w":return fe(ge.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return he(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r,o){return vt(km(t,r,o),o)}}function Cm(n,a){const t=Y(n),e=ao(t)-a;return t.setDate(t.getDate()-e*7),t}class Sm extends oe{constructor(){super(...arguments);W(this,"priority",100);W(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 fe(ge.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return he(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r){return Sn(Cm(t,r))}}const Mm=[31,28,31,30,31,30,31,31,30,31,30,31],_m=[31,29,31,30,31,30,31,31,30,31,30,31];class jm extends oe{constructor(){super(...arguments);W(this,"priority",90);W(this,"subPriority",1);W(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"d":return fe(ge.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return he(e.length,t)}}validate(t,e){const r=t.getFullYear(),o=Qc(r),i=t.getMonth();return o?e>=1&&e<=_m[i]:e>=1&&e<=Mm[i]}set(t,e,r){return t.setDate(r),t.setHours(0,0,0,0),t}}class Im extends oe{constructor(){super(...arguments);W(this,"priority",90);W(this,"subpriority",1);W(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 fe(ge.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return he(e.length,t)}}validate(t,e){const r=t.getFullYear();return Qc(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 so(n,a,t){var h,x,y,b;const e=sn(),r=(t==null?void 0:t.weekStartsOn)??((x=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:x.weekStartsOn)??e.weekStartsOn??((b=(y=e.locale)==null?void 0:y.options)==null?void 0:b.weekStartsOn)??0,o=Y(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 Qe(o,d)}class Pm extends oe{constructor(){super(...arguments);W(this,"priority",90);W(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=so(t,r,o),t.setHours(0,0,0,0),t}}class Em extends oe{constructor(){super(...arguments);W(this,"priority",90);W(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 xe(he(e.length,t),i);case"eo":return xe(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=so(t,r,o),t.setHours(0,0,0,0),t}}class Tm extends oe{constructor(){super(...arguments);W(this,"priority",90);W(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 xe(he(e.length,t),i);case"co":return xe(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=so(t,r,o),t.setHours(0,0,0,0),t}}function $m(n,a){const t=Y(n),e=sm(t),r=a-e;return Qe(t,r)}class Nm extends oe{constructor(){super(...arguments);W(this,"priority",90);W(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 he(e.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return xe(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 xe(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return xe(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiii":default:return xe(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=$m(t,r),t.setHours(0,0,0,0),t}}class Om extends oe{constructor(){super(...arguments);W(this,"priority",80);W(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(io(r),0,0,0),t}}class Rm extends oe{constructor(){super(...arguments);W(this,"priority",80);W(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(io(r),0,0,0),t}}class Am extends oe{constructor(){super(...arguments);W(this,"priority",80);W(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(io(r),0,0,0),t}}class Lm extends oe{constructor(){super(...arguments);W(this,"priority",70);W(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,r){switch(e){case"h":return fe(ge.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return he(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 Fm extends oe{constructor(){super(...arguments);W(this,"priority",70);W(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,r){switch(e){case"H":return fe(ge.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return he(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,r){return t.setHours(r,0,0,0),t}}class Ym extends oe{constructor(){super(...arguments);W(this,"priority",70);W(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,r){switch(e){case"K":return fe(ge.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return he(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 Wm extends oe{constructor(){super(...arguments);W(this,"priority",70);W(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,r){switch(e){case"k":return fe(ge.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return he(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 Bm extends oe{constructor(){super(...arguments);W(this,"priority",60);W(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"m":return fe(ge.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return he(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setMinutes(r,0,0),t}}class Hm extends oe{constructor(){super(...arguments);W(this,"priority",50);W(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"s":return fe(ge.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return he(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setSeconds(r,0),t}}class zm extends oe{constructor(){super(...arguments);W(this,"priority",30);W(this,"incompatibleTokens",["t","T"])}parse(t,e){const r=o=>Math.trunc(o*Math.pow(10,-e.length+3));return xe(he(e.length,t),r)}set(t,e,r){return t.setMilliseconds(r),t}}class qm extends oe{constructor(){super(...arguments);W(this,"priority",10);W(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return ot(at.basicOptionalMinutes,t);case"XX":return ot(at.basic,t);case"XXXX":return ot(at.basicOptionalSeconds,t);case"XXXXX":return ot(at.extendedOptionalSeconds,t);case"XXX":default:return ot(at.extended,t)}}set(t,e,r){return e.timestampIsSet?t:ce(t,t.getTime()-Nr(t)-r)}}class Km extends oe{constructor(){super(...arguments);W(this,"priority",10);W(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return ot(at.basicOptionalMinutes,t);case"xx":return ot(at.basic,t);case"xxxx":return ot(at.basicOptionalSeconds,t);case"xxxxx":return ot(at.extendedOptionalSeconds,t);case"xxx":default:return ot(at.extended,t)}}set(t,e,r){return e.timestampIsSet?t:ce(t,t.getTime()-Nr(t)-r)}}class Qm extends oe{constructor(){super(...arguments);W(this,"priority",40);W(this,"incompatibleTokens","*")}parse(t){return qc(t)}set(t,e,r){return[ce(t,r*1e3),{timestampIsSet:!0}]}}class Um extends oe{constructor(){super(...arguments);W(this,"priority",20);W(this,"incompatibleTokens","*")}parse(t){return qc(t)}set(t,e,r){return[ce(t,r),{timestampIsSet:!0}]}}const Vm={G:new fm,y:new hm,Y:new mm,R:new gm,u:new xm,Q:new ym,q:new bm,M:new vm,L:new wm,w:new Dm,I:new Sm,d:new jm,D:new Im,E:new Pm,e:new Em,c:new Tm,i:new Nm,a:new Om,b:new Rm,B:new Am,h:new Lm,H:new Fm,K:new Ym,k:new Wm,m:new Bm,s:new Hm,S:new zm,X:new qm,x:new Km,t:new Qm,T:new Um},Gm=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Xm=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Jm=/^'([^]*?)'?$/,Zm=/''/g,eg=/\S/,tg=/[a-zA-Z]/;function va(n,a,t,e){var w,k,f,S,E,T,$,O;const r=im(),o=(e==null?void 0:e.locale)??r.locale??Fc,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===""?Y(t):ce(t,NaN);const l={firstWeekContainsDate:i,weekStartsOn:c,locale:o},p=[new pm],d=a.match(Xm).map(C=>{const D=C[0];if(D in Yr){const j=Yr[D];return j(C,o.formatLong)}return C}).join("").match(Gm),h=[];for(let C of d){!(e!=null&&e.useAdditionalWeekYearTokens)&&Hc(C)&&qa(C,a,n),!(e!=null&&e.useAdditionalDayOfYearTokens)&&Bc(C)&&qa(C,a,n);const D=C[0],j=Vm[D];if(j){const{incompatibleTokens:L}=j;if(Array.isArray(L)){const A=h.find(Q=>L.includes(Q.token)||Q.token===D);if(A)throw new RangeError(`The format string mustn't contain \`${A.fullToken}\` and \`${C}\` at the same time`)}else if(j.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${C}\` and any other token at the same time`);h.push({token:D,fullToken:C});const q=j.run(n,C,o.match,l);if(!q)return ce(t,NaN);p.push(q.setter),n=q.rest}else{if(D.match(tg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+D+"`");if(C==="''"?C="'":D==="'"&&(C=ng(C)),n.indexOf(C)===0)n=n.slice(C.length);else return ce(t,NaN)}}if(n.length>0&&eg.test(n))return ce(t,NaN);const x=p.map(C=>C.priority).sort((C,D)=>D-C).filter((C,D,j)=>j.indexOf(C)===D).map(C=>p.filter(D=>D.priority===C).sort((D,j)=>j.subPriority-D.subPriority)).map(C=>C[0]);let y=Y(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 ng(n){return n.match(Jm)[1].replace(Zm,"'")}function rg(n,a){const t=Y(n),e=Y(a);return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function ag(n,a){const t=za(n),e=za(a);return+t==+e}function og(n,a){const t=Y(n),e=Y(a);return t.getFullYear()===e.getFullYear()}function Gn(n,a){const t=+Y(n),[e,r]=[+Y(a.start),+Y(a.end)].sort((o,i)=>o-i);return t>=e&&t<=r}function ig(n,a){return Qe(n,-1)}function sg(n,a){const e=ug(n);let r;if(e.date){const l=pg(e.date,2);r=fg(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=hg(e.time),isNaN(i)))return new Date(NaN);if(e.timezone){if(c=mg(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 gr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},cg=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,lg=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,dg=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ug(n){const a={},t=n.split(gr.dateTimeDelimiter);let e;if(t.length>2)return a;if(/:/.test(t[0])?e=t[0]:(a.date=t[0],e=t[1],gr.timeZoneDelimiter.test(a.date)&&(a.date=n.split(gr.timeZoneDelimiter)[0],e=n.substr(a.date.length,n.length))),e){const r=gr.timezone.exec(e);r?(a.time=e.replace(r[1],""),a.timezone=r[1]):a.time=e}return a}function pg(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 fg(n,a){if(a===null)return new Date(NaN);const t=n.match(cg);if(!t)return new Date(NaN);const e=!!t[4],r=Ln(t[1]),o=Ln(t[2])-1,i=Ln(t[3]),c=Ln(t[4]),l=Ln(t[5])-1;if(e)return vg(a,c,l)?gg(a,c,l):new Date(NaN);{const p=new Date(0);return!yg(a,o,i)||!bg(a,r)?new Date(NaN):(p.setUTCFullYear(a,o,Math.max(r,i)),p)}}function Ln(n){return n?parseInt(n):1}function hg(n){const a=n.match(lg);if(!a)return NaN;const t=wa(a[1]),e=wa(a[2]),r=wa(a[3]);return wg(t,e,r)?t*ea+e*Zr+r*1e3:NaN}function wa(n){return n&&parseFloat(n.replace(",","."))||0}function mg(n){if(n==="Z")return 0;const a=n.match(dg);if(!a)return 0;const t=a[1]==="+"?-1:1,e=parseInt(a[2]),r=a[3]&&parseInt(a[3])||0;return kg(e,r)?t*(e*ea+r*Zr):NaN}function gg(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 xg=[31,null,31,30,31,30,31,31,30,31,30,31];function Uc(n){return n%400===0||n%4===0&&n%100!==0}function yg(n,a,t){return a>=0&&a<=11&&t>=1&&t<=(xg[a]||(Uc(n)?29:28))}function bg(n,a){return a>=1&&a<=(Uc(n)?366:365)}function vg(n,a,t){return a>=1&&a<=53&&t>=0&&t<=6}function wg(n,a,t){return n===24?a===0&&t===0:t>=0&&t<60&&a>=0&&a<60&&n>=0&&n<25}function kg(n,a){return a>=0&&a<=59}function Le(n,a){const t=Y(n),e=t.getFullYear(),r=t.getDate(),o=ce(n,0);o.setFullYear(e,a,15),o.setHours(0,0,0,0);const i=om(o);return t.setMonth(a,Math.min(r,i)),t}function Dg(n,a){let t=Y(n);return isNaN(+t)?ce(n,NaN):(a.year!=null&&t.setFullYear(a.year),a.month!=null&&(t=Le(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 Sr(n,a){const t=Y(n);return t.setHours(a),t}function Mr(n,a){const t=Y(n);return t.setMinutes(a),t}function yn(n,a){const t=Y(n),e=Math.trunc(t.getMonth()/3)+1,r=a-e;return Le(t,t.getMonth()+r*3)}function _r(n,a){const t=Y(n);return t.setSeconds(a),t}function tt(n,a){const t=Y(n);return isNaN(+t)?ce(n,NaN):(t.setFullYear(a),t)}function Vt(n,a){return Ve(n,-a)}function Vc(n,a){return ro(n,-1)}function $i(n,a){return Or(n,-1)}function _n(n,a){return gt(n,-a)}var Cg=typeof document<"u",Sg=function(){},Br=Cg?v.useLayoutEffect:Sg;const Mg={...nc},_g=Mg.useInsertionEffect,jg=_g||(n=>n());function Ig(n){const a=v.useRef(()=>{});return jg(()=>{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 Pg={...nc};let Ni=!1,Eg=0;const Oi=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Eg++;function Tg(){const[n,a]=v.useState(()=>Ni?Oi():void 0);return Br(()=>{n==null&&a(Oi())},[]),v.useEffect(()=>{Ni=!0},[]),n}const $g=Pg.useId,Gc=$g||Tg,Ng=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:h,stroke:x,d:y,style:{transform:b,...w}={},...k}=a,f=Gc(),[S,E]=v.useState(!1);if(Br(()=>{if(!r)return;Ue(r).direction==="rtl"&&E(!0)},[r]),!r)return null;const[T,$]=e.split("-"),O=T==="top"||T==="bottom";let C=h;(O&&i!=null&&i.x||!O&&i!=null&&i.y)&&(C=null);const D=d*2,j=D/2,L=c/2*(p/-8+1),q=l/2*p/4,A=!!y,Q=C&&$==="end"?"bottom":"top";let B=C&&$==="end"?"right":"left";C&&S&&(B=$==="end"?"left":"right");const K=(o==null?void 0:o.x)!=null?C||o.x:"",P=(o==null?void 0:o.y)!=null?C||o.y:"",H=y||"M0,0"+(" H"+c)+(" L"+(c-L)+","+(l-q))+(" Q"+c/2+","+l+" "+L+","+(l-q))+" 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",[B]:K,[Q]:P,[T]:O||A?"100%":"calc(100% - "+D/2+"px)",transform:[M,b].filter(U=>!!U).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:-j,y:j*(A?-1:1),width:c+D,height:c})})]})});function Og(){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 Rg=v.createContext(null),Ag=v.createContext(null),Lg=()=>{var n;return((n=v.useContext(Rg))==null?void 0:n.id)||null},Fg=()=>v.useContext(Ag);function Yg(n){const{open:a=!1,onOpenChange:t,elements:e}=n,r=Gc(),o=v.useRef({}),[i]=v.useState(()=>Og()),c=Lg()!=null,[l,p]=v.useState(e.reference),d=Ig((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)}),h=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:h}),[a,d,x,i,r,h])}function Wg(n){var a,t;let{elements:e,...r}=n===void 0?{}:n;const{nodeId:o}=r,i=Yg({...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),[h,x]=v.useState(null),b=(l==null?void 0:l.domReference)||p,w=v.useRef(null),k=Fg();Br(()=>{b&&(w.current=b)},[b]);const f=Cf({...r,elements:{...l,...h&&{reference:h}}}),S=v.useCallback(C=>{const D=$e(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),getClientRects:()=>C.getClientRects(),contextElement:C}:C;x(D),f.refs.setReference(D)},[f.refs]),E=v.useCallback(C=>{($e(C)||C===null)&&(w.current=C,d(C)),($e(f.refs.reference.current)||f.refs.reference.current===null||C!==null&&!$e(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 Br(()=>{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 Qa=function(a,t){return Qa=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])},Qa(a,t)};function Ce(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");Qa(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 it(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 Bg=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)},Hg=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},na=function(n){var a=n.children,t=n.onClickOutside,e=n.className,r=n.containerRef,o=n.style,i=n.ignoreClass,c=Hg(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 Xc(){var n=typeof window<"u"?window:globalThis;return n}var er=12,zg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;function le(n){if(n==null)return new Date;var a=typeof n=="string"?sg(n):Y(n);return ht(a)?a:new Date}function ka(n,a,t,e,r){var o,i=null,c=Gt(t)||Gt(Kn()),l=!0;if(Array.isArray(a))return a.forEach(function(d){var h=va(n,d,new Date,{locale:c,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});e&&(l=ht(h,r)&&n===ue(h,d,t)),ht(h,r)&&l&&(i=h)}),i;if(i=va(n,a,new Date,{locale:c,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0}),e)l=ht(i)&&n===ue(i,a,t);else if(!ht(i)){var p=((o=a.match(zg))!==null&&o!==void 0?o:[]).map(function(d){var h=d[0];if(h==="p"||h==="P"){var x=Yr[h];return c?x(d,c.formatLong):h}return d}).join("");n.length>0&&(i=va(n,p.slice(0,n.length),new Date,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})),ht(i)||(i=new Date(n))}return ht(i)&&l?i:null}function ht(n,a){return Rr(n)&&!rn(n,a??new Date("1/1/1800"))}function ue(n,a,t){if(t==="en")return Ei(n,a,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var e=t?Gt(t):void 0;return t&&!e&&console.warn('A locale object was not found for the provided string ["'.concat(t,'"].')),!e&&Kn()&&Gt(Kn())&&(e=Gt(Kn())),Ei(n,a,{locale:e,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function We(n,a){var t=a.dateFormat,e=a.locale,r=Array.isArray(t)&&t.length>0?t[0]:t;return n&&ue(n,r,e)||""}function qg(n,a,t){if(!n)return"";var e=We(n,t),r=a?We(a,t):"";return"".concat(e," - ").concat(r)}function Kg(n,a){if(!(n!=null&&n.length))return"";var t=n[0]?We(n[0],a):"";if(n.length===1)return t;if(n.length===2&&n[1]){var e=We(n[1],a);return"".concat(t,", ").concat(e)}var r=n.length-1;return"".concat(t," (+").concat(r,")")}function Da(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 Sr(Mr(_r(n,c),o),e)}function Qg(n){return ao(n)}function Ug(n,a){return ue(n,"ddd",a)}function jr(n){return nn(n)}function Pt(n,a,t){var e=Gt(a||Kn());return vt(n,{locale:e,weekStartsOn:t})}function bt(n){return Ac(n)}function Bn(n){return ta(n)}function Ri(n){return za(n)}function Ai(){return nn(le())}function Li(n){return Oc(n)}function Vg(n){return ph(n)}function Gg(n){return Rc(n)}function nt(n,a){return n&&a?og(n,a):!n&&!a}function Ie(n,a){return n&&a?rg(n,a):!n&&!a}function Hr(n,a){return n&&a?ag(n,a):!n&&!a}function re(n,a){return n&&a?dh(n,a):!n&&!a}function qt(n,a){return n&&a?cm(n,a):!n&&!a}function Hn(n,a,t){var e,r=nn(a),o=Oc(t);try{e=Gn(n,{start:r,end:o})}catch{e=!1}return e}function Kn(){var n=Xc();return n.__localeId__}function Gt(n){if(typeof n=="string"){var a=Xc();return a.__localeData__?a.__localeData__[n]:void 0}else return n}function Xg(n,a,t){return a(ue(n,"EEEE",t))}function Jg(n,a){return ue(n,"EEEEEE",a)}function Zg(n,a){return ue(n,"EEE",a)}function co(n,a){return ue(Le(le(),n),"LLLL",a)}function Jc(n,a){return ue(Le(le(),n),"LLL",a)}function ex(n,a){return ue(yn(le(),n),"QQQ",a)}function Be(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 tr(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 h=d.start,x=d.end;return Gn(n,{start:h,end:x})})||c&&!c.some(function(d){return re(n,d)})||l&&!l.some(function(d){var h=d.start,x=d.end;return Gn(n,{start:h,end:x})})||p&&!p(le(n))||!1}function lo(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 Gn(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 Zc(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,i=t.includeDates,c=t.filterDate;return tr(n,{minDate:e?Ac(e):void 0,maxDate:r?Rc(r):void 0})||(o==null?void 0:o.some(function(l){return Ie(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Ie(n,l)})||c&&!c(le(n))||!1}function xr(n,a,t,e){var r=te(n),o=Pe(n),i=te(a),c=Pe(a),l=te(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 tx(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,i=t.includeDates;return tr(n,{minDate:e,maxDate:r})||o&&o.some(function(c){return Ie(c instanceof Date?c:c.date,n)})||i&&!i.some(function(c){return Ie(c,n)})||!1}function yr(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,i=t.includeDates,c=t.filterDate;return tr(n,{minDate:e,maxDate:r})||(o==null?void 0:o.some(function(l){return Hr(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Hr(n,l)})||c&&!c(le(n))||!1}function br(n,a,t){if(!a||!t||!Rr(a)||!Rr(t))return!1;var e=te(a),r=te(t);return e<=n&&r>=n}function Ir(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 tr(l,{minDate:e?ta(e):void 0,maxDate:r?Lc(r):void 0})||(o==null?void 0:o.some(function(p){return nt(l,p instanceof Date?p:p.date)}))||i&&!i.some(function(p){return nt(l,p)})||c&&!c(le(l))||!1}function vr(n,a,t,e){var r=te(n),o=Ut(n),i=te(a),c=Ut(a),l=te(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 tr(n,a){var t,e=a===void 0?{}:a,r=e.minDate,o=e.maxDate;return(t=r&&Mn(n,r)<0||o&&Mn(n,o)>0)!==null&&t!==void 0?t:!1}function Fi(n,a){return a.some(function(t){return st(t)===st(n)&&ct(t)===ct(n)&&yt(t)===yt(n)})}function Yi(n,a){var t=a===void 0?{}:a,e=t.excludeTimes,r=t.includeTimes,o=t.filterTime;return e&&Fi(n,e)||r&&!Fi(n,r)||o&&!o(n)||!1}function Wi(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=Sr(r,st(n)),r=Mr(r,ct(n)),r=_r(r,yt(n));var o=le();o=Sr(o,st(t)),o=Mr(o,ct(t)),o=_r(o,yt(t));var i=le();i=Sr(i,st(e)),i=Mr(i,ct(e)),i=_r(i,yt(e));var c;try{c=!Gn(r,{start:o,end:i})}catch{c=!1}return c}function Bi(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.includeDates,o=Vt(n,1);return e&&Ar(e,o)>0||r&&r.every(function(i){return Ar(i,o)>0})||!1}function Hi(n,a){var t=a===void 0?{}:a,e=t.maxDate,r=t.includeDates,o=Ve(n,1);return e&&Ar(o,e)>0||r&&r.every(function(i){return Ar(o,i)>0})||!1}function nx(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.includeDates,o=ta(n),i=Vc(o);return e&&Lr(e,i)>0||r&&r.every(function(c){return Lr(c,i)>0})||!1}function rx(n,a){var t=a===void 0?{}:a,e=t.maxDate,r=t.includeDates,o=Lc(n),i=ro(o,1);return e&&Lr(i,e)>0||r&&r.every(function(c){return Lr(i,c)>0})||!1}function zi(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.includeDates,o=_n(n,1);return e&&Fr(e,o)>0||r&&r.every(function(i){return Fr(i,o)>0})||!1}function ax(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.yearItemNumber,o=r===void 0?er:r,i=Bn(_n(n,o)),c=jt(i,o).endPeriod,l=e&&te(e);return l&&l>c||!1}function qi(n,a){var t=a===void 0?{}:a,e=t.maxDate,r=t.includeDates,o=gt(n,1);return e&&Fr(o,e)>0||r&&r.every(function(i){return Fr(o,i)>0})||!1}function ox(n,a){var t=a===void 0?{}:a,e=t.maxDate,r=t.yearItemNumber,o=r===void 0?er:r,i=gt(n,o),c=jt(i,o).startPeriod,l=e&&te(e);return l&&l<c||!1}function el(n){var a=n.minDate,t=n.includeDates;if(t&&a){var e=t.filter(function(r){return Mn(r,a)>=0});return Si(e)}else return t?Si(t):a}function tl(n){var a=n.maxDate,t=n.includeDates;if(t&&a){var e=t.filter(function(r){return Mn(r,a)<=0});return Ci(e)}else return t?Ci(t):a}function Ki(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(xt(i)){var c=ue(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:"",h=i[d];if(typeof d=="string"&&Array.isArray(h))for(var x=0,y=h.length;x<y;x++){var b=h[x];if(b){var c=ue(b,"MM.dd.yyyy"),l=e.get(c)||[];l.includes(d)||(l.push(d),e.set(c,l))}}}}return e}function ix(n,a){return n.length!==a.length?!1:n.every(function(t,e){return t===a[e]})}function sx(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(xt(r)){var i=ue(r,"MM.dd.yyyy"),c=t.get(i)||{className:"",holidayNames:[]};if(!("className"in c&&c.className===a&&ix(c.holidayNames,[o]))){c.className=a;var l=c.holidayNames;c.holidayNames=l?it(it([],l,!0),[o],!1):[o],t.set(i,c)}}}),t}function cx(n,a,t,e,r){for(var o=r.length,i=[],c=0;c<o;c++){var l=n,p=r[c];p&&(l=ih(l,st(p)),l=Ha(l,ct(p)),l=lh(l,yt(p)));var d=Ha(n,(t+1)*e);Tt(l,a)&&rn(l,d)&&p!=null&&i.push(p)}return i}function Qi(n){return n<10?"0".concat(n):"".concat(n)}function jt(n,a){a===void 0&&(a=er);var t=Math.ceil(te(n)/a)*a,e=t-(a-1);return{startPeriod:e,endPeriod:t}}function lx(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 Ui(n){var a=n.getSeconds(),t=n.getMilliseconds();return Y(n.getTime()-a*1e3-t)}function dx(n,a){return Ui(n).getTime()===Ui(a).getTime()}function Vi(n){if(!xt(n))throw new Error("Invalid date");var a=new Date(n);return a.setHours(0,0,0,0),a}function Gi(n,a){if(!xt(n)||!xt(a))throw new Error("Invalid date received");var t=Vi(n),e=Vi(a);return rn(t,e)}function nl(n){return n.key===F.Space}var ux=(function(n){Ce(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(":"),h=d[0],x=d[1];p.setHours(Number(h)),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),px=(function(n){Ce(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),Be(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 lo(t.props.day,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.isStartOfWeek=function(){return re(t.props.day,Pt(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameWeek=function(e){return t.props.showWeekPicker&&re(e,Pt(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=ue(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=ue(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:Hn(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,h=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&&h&&(rn(x,h)||qt(x,h))?Hn(o,x,h):c&&d&&(Tt(x,d)||qt(x,d))||l&&d&&!h&&(Tt(x,d)||qt(x,d))?Hn(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=am(t.props.day);return e===0||e===6},t.isAfterMonth=function(){return t.props.month!==void 0&&(t.props.month+1)%12===Pe(t.props.day)},t.isBeforeMonth=function(){return t.props.month!==void 0&&(Pe(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 _e("react-datepicker__day",r,"react-datepicker__day--"+Ug(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(ue(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=ue(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(Ti(t.props.day),t.props.day):Ti(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),fx=(function(n){Ce(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:_e(l),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},e)},a})(v.Component),hx=(function(n){Ce(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.isDisabled=function(e){return Be(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 h=new Date(e);h.setDate(h.getDate()+d);var x=!t.isDisabled(h);if(x){p=h;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):Qg(e)},t.isWeekDisabled=function(){for(var e=t.startOfWeek(),r=Qe(e,6),o=new Date(e);o<=r;){if(!t.isDisabled(o))return!1;o=Qe(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(fx,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=Qe(e,c);return _.createElement(px,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 Pt(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:_e(t)},this.renderDays())},a})(v.Component),Fn,mx=6,wn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},Ca=(Fn={},Fn[wn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},Fn[wn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},Fn[wn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},Fn),wr=1;function Xi(n,a){return n?wn.FOUR_COLUMNS:a?wn.TWO_COLUMNS:wn.THREE_COLUMNS}var gx=(function(n){Ce(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.MONTH_REFS=it([],Array(12),!0).map(function(){return v.createRef()}),t.QUARTER_REFS=it([],Array(4),!0).map(function(){return v.createRef()}),t.isDisabled=function(e){return Be(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 lo(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:Ie(Le(o,e),i)},t.isRangeStartQuarter=function(e){var r=t.props,o=r.day,i=r.startDate,c=r.endDate;return!i||!c?!1:Hr(yn(o,e),i)},t.isRangeEndMonth=function(e){var r=t.props,o=r.day,i=r.startDate,c=r.endDate;return!i||!c?!1:Ie(Le(o,e),c)},t.isRangeEndQuarter=function(e){var r=t.props,o=r.day,i=r.startDate,c=r.endDate;return!i||!c?!1:Hr(yn(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,h=o.endDate,x=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return!(c||l||p)||!x?!1:c&&h?xr(x,h,e,i):l&&d||p&&d&&!h?xr(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=Le(i,e),d=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return l?Ie(p,d):Ie(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=Le(i,e),h=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return l||p?Ie(d,h):Ie(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,h=o.endDate,x=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return!(c||l||p)||!x?!1:c&&h?vr(x,h,e,i):l&&d||p&&d&&!h?vr(d,x,e,i):!1},t.isWeekInMonth=function(e){var r=t.props.day,o=Qe(e,6);return Ie(e,r)||Ie(o,r)},t.isCurrentMonth=function(e,r){return te(e)===te(le())&&r===Pe(le())},t.isCurrentQuarter=function(e,r){return te(e)===te(le())&&r===Ut(le())},t.isSelectedMonth=function(e,r,o){return Pe(o)===r&&te(e)===te(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 Ut(e)===r&&te(e)===te(o)},t.renderWeeks=function(){for(var e=[],r=t.props.fixedHeight,o=0,i=!1,c=Pt(bt(t.props.day),t.props.locale,t.props.calendarStartDay),l=function(b){return t.props.showWeekPicker?Pt(b,t.props.locale,t.props.calendarStartDay):t.props.preSelection},p=function(b){return t.props.showWeekPicker?Pt(b,t.props.locale,t.props.calendarStartDay):t.props.selected},d=t.props.selected?p(t.props.selected):void 0,h=t.props.preSelection?l(t.props.preSelection):void 0;e.push(_.createElement(hx,ae({},t.props,{ariaLabelPrefix:t.props.weekAriaLabelPrefix,key:o,day:c,month:Pe(t.props.day),onDayClick:t.handleDayClick,onDayMouseEnter:t.handleDayMouseEnter,selected:d,preSelection:h,showWeekNumber:t.props.showWeekNumbers}))),!i;){o++,c=Or(c,1);var x=r&&o>=mx,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(bt(c),e)},t.onMonthMouseEnter=function(e){var r=t.isMonthDisabledForLabelDate(e),o=r.isDisabled,i=r.labelDate;o||t.handleDayMouseEnter(bt(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,h=c.minDate,x=c.maxDate,y=c.showFourColumnMonthYearPicker,b=c.showTwoColumnMonthYearPicker;if(p){var w=Xi(y,b),k=t.getVerticalOffset(w),f=(i=Ca[w])===null||i===void 0?void 0:i.grid,S=function(C,D,j){var L,q,A=D,Q=j;switch(C){case F.ArrowRight:A=Ve(D,wr),Q=j===11?0:j+wr;break;case F.ArrowLeft:A=Vt(D,wr),Q=j===0?11:j-wr;break;case F.ArrowUp:A=Vt(D,k),Q=!((L=f==null?void 0:f[0])===null||L===void 0)&&L.includes(j)?j+12-k:j-k;break;case F.ArrowDown:A=Ve(D,k),Q=!((q=f==null?void 0:f[f.length-1])===null||q===void 0)&&q.includes(j)?j-12+k:j+k;break}return{newCalculatedDate:A,newCalculatedMonth:Q}},E=function(C,D,j){for(var L=40,q=C,A=!1,Q=0,B=S(q,D,j),K=B.newCalculatedDate,P=B.newCalculatedMonth;!A;){if(Q>=L){K=D,P=j;break}if(h&&K<h){q=F.ArrowRight;var H=S(q,K,P);K=H.newCalculatedDate,P=H.newCalculatedMonth}if(x&&K>x){q=F.ArrowLeft;var H=S(q,K,P);K=H.newCalculatedDate,P=H.newCalculatedMonth}if(tx(K,t.props)){var H=S(q,K,P);K=H.newCalculatedDate,P=H.newCalculatedMonth}else A=!0;Q++}return{newCalculatedDate:K,newCalculatedMonth:P}};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=Ca[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=yn(t.props.day,r);yr(o,t.props)||t.handleDayClick(Ri(o),e)},t.onQuarterMouseEnter=function(e){var r=yn(t.props.day,e);yr(r,t.props)||t.handleDayMouseEnter(Ri(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,ro(t.props.preSelection,1));break;case F.ArrowLeft:if(!t.props.preSelection)break;t.handleQuarterNavigation(r===1?4:r-1,Vc(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,h=Le(i,e);return{isDisabled:(r=(c||l||p||d)&&Zc(h,t.props))!==null&&r!==void 0?r:!1,labelDate:h}},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(Le(o,e)):void 0,h=t.getSelection();return _e("react-datepicker__month-text","react-datepicker__month-".concat(e),d,{"react-datepicker__month-text--disabled":t.isMonthDisabled(e),"react-datepicker__month-text--selected":h?t.isSelectMonthInList(o,e,h):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?xr(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=Pe(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=Ut(t.props.preSelection),o=yr(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,h=Le(p,e),x=t.isDisabled(h)||t.isExcluded(h)?l:i;return"".concat(x," ").concat(ue(h,"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,h=r.excludeDates,x=r.includeDates,y=r.filterDate,b=r.preSelection,w=r.disabledKeyboardNavigation,k=(p||d||h||x||y)&&yr(yn(o,e),t.props);return _e("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?vr(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=Jc(e,c),d=co(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=ex(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=Ca[Xi(i,o)])===null||e===void 0?void 0:e.grid;return p==null?void 0:p.map(function(d,h){return _.createElement("div",{className:"react-datepicker__month-wrapper",key:h},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){nl(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 _e("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(ue(o,"MMMM, yyyy",this.props.locale)),role:"listbox"},e?this.renderMonths():r?this.renderQuarters():this.renderWeeks())},a})(v.Component),xx=(function(n){Ce(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(na,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},a})(v.Component),yx=(function(n){Ce(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(xx,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 Jc(o,t.props.locale)}:function(o){return co(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 bx(n,a){for(var t=[],e=bt(n),r=bt(a);!Tt(e,r);)t.push(le(e)),e=Ve(e,1);return t}var vx=(function(n){Ce(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=Ka(r),i=nt(e.props.date,r)&&Ie(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"},"✓"):"",ue(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:bx(e.props.minDate,e.props.maxDate)},e}return a.prototype.render=function(){var t=_e({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return _.createElement(na,{className:t,onClickOutside:this.handleClickOutside},this.renderOptions())},a})(v.Component),wx=(function(n){Ce(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var e=bt(t.props.minDate),r=bt(t.props.maxDate),o=[];!Tt(e,r);){var i=Ka(e);o.push(_.createElement("option",{key:i,value:i},ue(e,t.props.dateFormat,t.props.locale))),e=Ve(e,1)}return o},t.onSelectChange=function(e){t.onChange(parseInt(e.target.value))},t.renderSelectMode=function(){return _.createElement("select",{value:Ka(bt(t.props.date)),className:"react-datepicker__month-year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(e){var r=ue(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(vx,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);nt(t.props.date,r)&&Ie(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),kx=(function(n){Ce(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)&&Wi(e,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&Yi(e,t.props)||(o=(r=t.props).onChange)===null||o===void 0||o.call(r,e)},t.isSelectedTime=function(e){return t.props.selected&&dx(t.props.selected,e)},t.isDisabledTime=function(e){return(t.props.minTime||t.props.maxTime)&&Wi(e,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&Yi(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&&(st(e)*3600+ct(e)*60+yt(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=jr(c),p=t.props.injectTimes&&t.props.injectTimes.sort(function(k,f){return k.getTime()-f.getTime()}),d=60*lx(c),h=d/i,x=0;x<h;x++){var y=Ha(l,x*i);if(r.push(y),p){var b=cx(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},ue(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),Ji=3,Dx=(function(n){Ce(a,n);function a(t){var e=n.call(this,t)||this;return e.YEAR_REFS=it([],Array(e.props.yearItemNumber),!0).map(function(){return v.createRef()}),e.isDisabled=function(r){return Be(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 lo(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,h=d.date,x=d.yearItemNumber;if(!(h===void 0||x===void 0)){var y=jt(h,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===te(le())},e.isRangeStart=function(r){return e.props.startDate&&e.props.endDate&&nt(tt(le(),r),e.props.startDate)},e.isRangeEnd=function(r){return e.props.startDate&&e.props.endDate&&nt(tt(le(),r),e.props.endDate)},e.isInRange=function(r){return br(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?br(r,e.selectingDate(),d):c&&p||l&&p&&!d?br(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=tt(le(),r);return l?nt(p,(o=e.selectingDate())!==null&&o!==void 0?o:null):nt(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=tt(le(),r);return l||p?nt(d,(o=e.selectingDate())!==null&&o!==void 0?o:null):nt(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,h=Bn(tt(e.props.date,r)),x=(i||c||l||p||d)&&Ir(r,e.props);return!e.props.disabledKeyboardNavigation&&!e.props.inline&&!re(h,Bn(e.props.selected))&&re(h,Bn(e.props.preSelection))&&!x}},e.onYearClick=function(r,o){var i=e.props.date;i!==void 0&&e.handleYearClick(Bn(tt(i,o)),r)},e.onYearKeyDown=function(r,o){var i,c,l=r.key,p=e.props,d=p.date,h=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,gt(e.props.preSelection,1));break;case F.ArrowLeft:if(e.props.preSelection==null)break;e.handleYearNavigation(o-1,_n(e.props.preSelection,1));break;case F.ArrowUp:{if(d===void 0||h===void 0||e.props.preSelection==null)break;var y=jt(d,h).startPeriod,b=Ji,w=o-b;if(w<y){var k=h%b;o>=y&&o<y+k?b=k:b+=k,w=o-b}e.handleYearNavigation(w,_n(e.props.preSelection,b));break}case F.ArrowDown:{if(d===void 0||h===void 0||e.props.preSelection==null)break;var f=jt(d,h).endPeriod,b=Ji,w=o+b;if(w>f){var k=h%b;o<=f&&o>f-k?b=k:b+=k,w=o+b}e.handleYearNavigation(w,gt(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,h=o.includeDates,x=o.filterDate,y=o.yearClassName;return _e("react-datepicker__year-text","react-datepicker__year-".concat(r),i?y==null?void 0:y(tt(i,r)):void 0,{"react-datepicker__year-text--selected":p?r===te(p):void 0,"react-datepicker__year-text--disabled":(c||l||d||h||x)&&Ir(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=te(e.props.preSelection),i=Ir(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=jt(o,i),d=p.startPeriod,h=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){nl(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<=h;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 Cx(n,a,t,e){for(var r=[],o=0;o<2*a+1;o++){var i=n+a-o,c=!0;t&&(c=te(t)<=i),e&&c&&(c=te(e)>=i),c&&r.push(i)}return r}var Sx=(function(n){Ce(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(h){return _.createElement("div",{className:c===h?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:h,onClick:e.onChange.bind(e,h),"aria-selected":c===h?"true":void 0},c===h?_.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",h)}),p=e.props.minDate?te(e.props.minDate):null,d=e.props.maxDate?te(e.props.maxDate):null;return(!d||!e.state.yearsList.find(function(h){return h===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(h){return h===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:Cx(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=_e({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return _.createElement(na,{className:t,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},a})(v.Component),Mx=(function(n){Ce(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?te(t.props.minDate):1900,r=t.props.maxDate?te(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(Sx,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),_x=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],jx=function(n){var a=(n.className||"").split(/\s+/);return _x.some(function(t){return a.indexOf(t)>=0})},Ix=(function(n){Ce(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;jx(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=el(e.props),p=tl(e.props),d=le(),h=c||i||o;return h||(l&&rn(d,l)?l:p&&Tt(d,p)?p:d)},e.increaseMonth=function(){e.setState(function(r){var o=r.date;return{date:Ve(o,1)}},function(){return e.handleMonthChange(e.state.date)})},e.decreaseMonth=function(){e.setState(function(r){var o=r.date;return{date:Vt(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:tt(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(!Be(r,e.props))return r;for(var o=bt(r),i=Gg(r),c=uh(i,o),l=null,p=0;p<=c;p++){var d=Qe(o,p);if(!Be(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:tt(i,Number(r))}},function(){return e.handleYearChange(e.state.date)})},e.changeMonth=function(r){e.setState(function(o){var i=o.date;return{date:Le(i,Number(r))}},function(){return e.handleMonthChange(e.state.date)})},e.changeMonthYear=function(r){e.setState(function(o){var i=o.date;return{date:tt(Le(i,Pe(r)),te(r))}},function(){return e.handleMonthYearChange(e.state.date)})},e.header=function(r){r===void 0&&(r=e.state.date);var o=Pt(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=Qe(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":ue(l,"EEEE",e.props.locale),className:_e("react-datepicker__day-name",d)},p)}))},e.formatWeekday=function(r,o){return e.props.formatWeekDay?Xg(r,e.props.formatWeekDay,o):e.props.useWeekdaysShort?Zg(r,o):Jg(r,o)},e.decreaseYear=function(){e.setState(function(r){var o,i=r.date;return{date:_n(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=Vt(e.state.date,p),h;switch(!0){case e.props.showMonthYearPicker:h=zi(e.state.date,e.props);break;case e.props.showYearPicker:h=ax(e.state.date,e.props);break;case e.props.showQuarterYearPicker:h=nx(e.state.date,e.props);break;default:h=Bi(d,e.props);break}if(!(!((i=e.props.forceShowMonthNavigation)!==null&&i!==void 0?i:a.defaultProps.forceShowMonthNavigation)&&!e.props.showDisabledMonthNavigation&&h||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),h&&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,j=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?j:C},_.createElement("span",{className:x.join(" ")},w?T:S))}}},e.increaseYear=function(){e.setState(function(r){var o,i=r.date;return{date:gt(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=qi(e.state.date,e.props);break;case e.props.showYearPicker:o=ox(e.state.date,e.props);break;case e.props.showQuarterYearPicker:o=rx(e.state.date,e.props);break;default:o=Hi(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,h=d.nextMonthButtonLabel,x=h===void 0?a.defaultProps.nextMonthButtonLabel:h,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(" ")},ue(r,e.props.dateFormat,e.props.locale))},e.renderYearDropdown=function(r){if(r===void 0&&(r=!1),!(!e.props.showYearDropdown||r))return _.createElement(Mx,ae({},a.defaultProps,e.props,{date:e.state.date,onChange:e.changeYear,year:te(e.state.date)}))},e.renderMonthDropdown=function(r){if(r===void 0&&(r=!1),!(!e.props.showMonthDropdown||r))return _.createElement(yx,ae({},a.defaultProps,e.props,{month:Pe(e.state.date),onChange:e.changeMonth}))},e.renderMonthYearDropdown=function(r){if(r===void 0&&(r=!1),!(!e.props.showMonthYearDropdown||r))return _.createElement(wx,ae({},a.defaultProps,e.props,{date:e.state.date,onChange:e.changeMonthYear}))},e.handleTodayButtonClick=function(r){e.props.onSelect(Ai(),r),e.props.setPreSelection&&e.props.setPreSelection(Ai())},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=Bi(e.state.date,e.props),d=Hi(e.state.date,e.props),h=zi(e.state.date,e.props),x=qi(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:h,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=jt(o,p),h=d.startPeriod,x=d.endPeriod;return _.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},c?"".concat(h," - ").concat(x):te(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?gt(e.state.date,l):Vt(e.state.date,l),d=(o=e.props.monthSelectedIn)!==null&&o!==void 0?o:l,h=0;h<c;++h){var x=h-d+l,y=e.props.showMonthYearPicker||e.props.showQuarterYearPicker?gt(p,x):Ve(p,x),b="month-".concat(h),w=h<c-1,k=h>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:h}),_.createElement(gx,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:h,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(Dx,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(kx,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&&ht(r)&&!!e.props.selected,i=o?"".concat(Qi(r.getHours()),":").concat(Qi(r.getMinutes())):"";if(e.props.showTimeInput)return _.createElement(ux,ae({},a.defaultProps,e.props,{date:r,timeString:i,onChange:e.props.onTimeChange}))},e.renderAriaLiveRegion=function(){var r,o=jt(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=te(e.state.date):l="".concat(co(Pe(e.state.date),e.props.locale)," ").concat(te(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:er}},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=!Ie(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||Bg;return _.createElement(na,{onClickOutside:this.handleClickOutside,style:{display:"contents"},containerRef:this.containerRef,ignoreClass:this.props.outsideClickIgnoreClass},_.createElement(t,{className:_e("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),Px=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"}))},rl=(function(n){Ce(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 Bl.createPortal(this.props.children,this.el)},a})(v.Component),Ex="[tabindex], a, button, input, select, textarea",Tx=function(n){return(n instanceof HTMLAnchorElement||!n.disabled)&&n.tabIndex!==-1},al=(function(n){Ce(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(Ex),1,-1).filter(Tx)},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 $x(n){var a=function(t){var e,r=typeof t.hidePopper=="boolean"?t.hidePopper:!0,o=v.useRef(null),i=Wg(ae({open:!r,whileElementsMounted:yf,placement:t.popperPlacement,middleware:it([_f({padding:15}),Mf(10),jf({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 Nx=(function(n){Ce(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,h=t.portalId,x=t.portalHost,y=t.popperProps,b=t.showArrow,w=void 0;if(!i){var k=_e("react-datepicker-popper",e);w=_.createElement(al,{enableTabLoop:p},_.createElement("div",{ref:y.refs.setFloating,style:y.floatingStyles,className:k,"data-placement":y.placement,onKeyDown:d},c,b&&_.createElement(Ng,{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)),h&&!i&&(w=_.createElement(rl,{portalId:h,portalHost:x},w));var f=_e("react-datepicker-wrapper",r);return _.createElement(_.Fragment,null,_.createElement("div",{ref:y.refs.setReference,className:f},l),w)},a})(v.Component),Ox=$x(Nx),Zi="react-datepicker-ignore-onclickoutside";function Rx(n,a){return n&&a?Pe(n)!==Pe(a)||te(n)!==te(a):n!==a}var Sa="Date input not valid.",Ax=(function(n){Ce(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 ht(c)?it(it([],o,!0),[ae(ae({},i),{date:c})],!1):o},[])},e.calcInitialState=function(){var r,o=e.getPreSelection(),i=el(e.props),c=tl(e.props),l=i&&rn(o,jr(i))?i:c&&Tt(o,Li(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:Ki(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:Ma},function(){r||e.setState(function(i){return{focused:o?i.focused:!1}},function(){!o&&e.setBlur(),e.setState({inputValue:null})})})},e.inputOk=function(){return xt(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:Lx});var p=e.props,d=p.dateFormat,h=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],$=ka(E??"",h,e.props.locale,y),O=ka(T??"",h,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||$&&Be($,e.props)||O&&Be(O,e.props))return;(o=(r=e.props).onChange)===null||o===void 0||o.call(r,[$,O],l)}else{var j=ka(f,h,e.props.locale,y,e.props.minDate);e.props.showTimeSelectOnly&&e.props.selected&&j&&!re(j,e.props.selected)&&(j=Dg(e.props.selected,{hours:st(j),minutes:ct(j),seconds:yt(j)})),(j||!f)&&e.setSelected(j,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||!Gi(r,l))&&e.setOpen(!1)}},e.setSelected=function(r,o,i,c){var l,p,d=r;if(e.props.showYearPicker){if(d!==null&&Ir(te(d),e.props))return}else if(e.props.showMonthYearPicker){if(d!==null&&Zc(d,e.props))return}else if(d!==null&&Be(d,e.props))return;var h=e.props,x=h.onChange,y=h.selectsRange,b=h.startDate,w=h.endDate,k=h.selectsMultiple,f=h.selectedDates,S=h.minTime,E=h.swapRange;if(!qt(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=Da(d,{hour:st(e.props.selected),minute:ct(e.props.selected),second:yt(e.props.selected)})),!i&&(e.props.showTimeSelect||e.props.showTimeSelectOnly)&&S&&(d=Da(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):Gi(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(j){return re(j,d)});if(C){var D=f.filter(function(j){return!re(j,d)});x==null||x(D,o)}else x==null||x(it(it([],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=xt(e.props.minDate),i=xt(e.props.maxDate),c=!0;if(r){var l=jr(r);if(o&&i)c=Hn(r,e.props.minDate,e.props.maxDate);else if(o){var p=jr(e.props.minDate);c=Tt(r,p)||qt(l,p)}else if(i){var d=Li(e.props.maxDate);c=rn(r,d)||qt(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:Da(c,{hour:st(r),minute:ct(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 h=r.key;if(!e.state.open&&!e.props.inline&&!e.props.preventOpenOnFocus){(h===F.ArrowDown||h===F.ArrowUp||h===F.Enter)&&((c=e.onInputClick)===null||c===void 0||c.call(e));return}if(e.state.open){if(h===F.ArrowDown||h===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);h===F.Enter?(r.preventDefault(),r.target.blur(),e.inputOk()&&e.state.lastPreSelectChange===Ma?(e.handleSelect(b,r),!e.props.shouldCloseOnSelect&&e.setPreSelection(b)):e.setOpen(!1)):h===F.Escape?(r.preventDefault(),r.target.blur(),e.sendFocusBackToInput(),e.setOpen(!1)):h===F.Tab&&e.setOpen(!1),e.inputOk()||(d=(p=e.props).onInputError)===null||d===void 0||d.call(p,{code:1,msg:Sa})}},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,h=e.props,x=h.minDate,y=h.maxDate,b=h.disabledKeyboardNavigation,w=h.showWeekPicker,k=h.shouldCloseOnSelect,f=h.locale,S=h.calendarStartDay,E=h.adjustDateOnChange,T=h.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(K,P){var H=P;switch(K){case F.ArrowRight:H=w?Or(P,1):Qe(P,1);break;case F.ArrowLeft:H=w?$i(P):ig(P);break;case F.ArrowUp:H=$i(P);break;case F.ArrowDown:H=Or(P,1);break;case F.PageUp:H=O?_n(P,1):Vt(P,1);break;case F.PageDown:H=O?gt(P,1):Ve(P,1);break;case F.Home:H=Pt(P,f,S);break;case F.End:H=Vg(P);break}return H},j=function(K,P){for(var H=40,M=K,U=!1,z=0,J=D(K,P);!U;){if(z>=H){J=P;break}x&&J<x&&(M=F.ArrowRight,J=Be(x,e.props)?D(M,J):x),y&&J>y&&(M=F.ArrowLeft,J=Be(y,e.props)?D(M,J):y),Be(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)):U=!0,z++}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:Sa});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=j($,C);break}if(!L){(d=(p=e.props).onInputError)===null||d===void 0||d.call(p,{code:1,msg:Sa});return}if(r.preventDefault(),e.setState({lastPreSelectChange:Ma}),E&&e.setSelected(L),e.setPreSelection(L),T){var q=Pe(C),A=Pe(L),Q=te(C),B=te(L);q!==A||Q!==B?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(Ix,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:sx(e.modifyHolidays()),outsideClickIgnoreClass:Zi,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(We(e.props.startDate,{dateFormat:p,locale:c}),". ").concat(e.props.endDate?"End date: "+We(e.props.endDate,{dateFormat:p,locale:c}):""):e.props.showTimeSelectOnly?d="Selected time: ".concat(We(e.props.selected,{dateFormat:i,locale:c})):e.props.showYearPicker?d="Selected year: ".concat(We(e.props.selected,{dateFormat:"yyyy",locale:c})):e.props.showMonthYearPicker?d="Selected month: ".concat(We(e.props.selected,{dateFormat:"MMMM yyyy",locale:c})):e.props.showQuarterYearPicker?d="Selected quarter: ".concat(We(e.props.selected,{dateFormat:"yyyy, QQQ",locale:c})):d="Selected date: ".concat(We(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=_e(e.props.className,(r={},r[Zi]=e.state.open,r)),l=e.props.customInput||_.createElement("input",{type:"text"}),p=e.props.customInputRef||"ref",d=e.props,h=d.dateFormat,x=h===void 0?a.defaultProps.dateFormat:h,y=d.locale,b=typeof e.props.value=="string"?e.props.value:typeof e.state.inputValue=="string"?e.state.inputValue:e.props.selectsRange?qg(e.props.startDate,e.props.endDate,{dateFormat:x,locale:y}):e.props.selectsMultiple?Kg((i=e.props.selectedDates)!==null&&i!==void 0?i:[],{dateFormat:x,locale:y}):We(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=_e(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,h=r.clearButtonClassName,x=h===void 0?"":h,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:_e("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:er,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&&Rx(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:Ki(this.props.highlightDates)}),!e.focused&&!qt(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(Px,ae({icon:r,className:_e(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(al,{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(rl,ae({portalId:this.props.portalId},this.props),e)),_.createElement("div",null,this.renderInputContainer(),e)}return _.createElement(Ox,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),Lx="input",Ma="navigate";function ra(n){return!!n&&!rd(n.providerType)}function Fx(){const{data:n}=me({queryKey:["feature-flag","proceeds-to-treasury"],queryFn:ad,staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return n===!0}const es=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
|
-
`,ts=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
|
-
`,ns=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
|
-
`,rs=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
|
-
`,as=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
|
-
`,Yx=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
|
-
`,Wx=g.div`
|
|
423
|
-
display: flex;
|
|
424
|
-
align-items: center;
|
|
425
|
-
gap: 12px;
|
|
426
|
-
`,Bx=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
|
-
`,Hx=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
|
-
`,zx=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
|
-
`,qx=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
|
-
`,Kx=g.div`
|
|
474
|
-
display: flex;
|
|
475
|
-
gap: 12px;
|
|
476
|
-
|
|
477
|
-
${u.media.maxWidth("mobile")} {
|
|
478
|
-
flex-direction: column;
|
|
479
|
-
}
|
|
480
|
-
`,os=g.label`
|
|
481
|
-
flex: 1 1 0;
|
|
482
|
-
min-width: 0;
|
|
483
|
-
display: flex;
|
|
484
|
-
flex-direction: column;
|
|
485
|
-
gap: 4px;
|
|
486
|
-
`,is=g.span`
|
|
487
|
-
font-family: ${u.font.sans};
|
|
488
|
-
font-size: 12px;
|
|
489
|
-
color: ${u.colors.muted};
|
|
490
|
-
`,Qx=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
|
-
`,Ux=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
|
-
`,Vx=g.span`
|
|
544
|
-
flex: none;
|
|
545
|
-
font-family: ${u.font.sans};
|
|
546
|
-
font-size: 10px;
|
|
547
|
-
color: ${u.colors.muted2};
|
|
548
|
-
`,Gx=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
|
-
`,Xx=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 Jx=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
|
-
`,Zx=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
|
-
`,ey=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
|
-
`,ty=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
|
-
`,ny=g.div`
|
|
712
|
-
display: flex;
|
|
713
|
-
gap: 12px;
|
|
714
|
-
|
|
715
|
-
${u.media.maxWidth("mobile")} {
|
|
716
|
-
flex-direction: column-reverse;
|
|
717
|
-
}
|
|
718
|
-
`,ry=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
|
-
`,ay=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
|
-
`,oy=30;function ss(n){const a=new Date;return a.setHours(0,0,0,0),a.setDate(a.getDate()+n),a}function iy({asset:n,session:a,creator:t,onListed:e,onClose:r}){const o=on(),i=an(),c=Fx(),{data:l}=me({queryKey:["collection-meta",n.contractAddress],enabled:!t&&!!n.contractAddress,staleTime:5*6e4,queryFn:()=>sc(n.contractAddress)}),p=t||(l==null?void 0:l.creator),{data:d}=qr(p),h=p?d!=null&&d.name?Kr(d.name):Ga(p):null,[x,y]=v.useState("10"),[b,w]=v.useState(()=>ss(oy)),[k,f]=v.useState(null),[S,E]=v.useState(!1),[T,$]=v.useState(null),[O,C]=v.useState("form"),D=ra(a),j=Number(x),L=Number.isInteger(j)&&j>0,q=b?b.getTime():NaN,A=!!b&&q>Date.now(),Q=ss(1),B=L?`$${Kt(j).toFixed(2)}`:"$0";async function K(){if(f(null),!L){f(m("sellModal.errorWholeNumber"));return}if(!A){f(m("sellModal.invalidDate"));return}if(!D){E(!0);try{const M=Uo(n.contractAddress,n.chainId),U=await mc(M,a.address);if(E(!1),!U){C("authorize");return}}catch{E(!1)}}await P()}async function P(){if(f(null),!L){f(m("sellModal.errorWholeNumber"));return}if(!A){f(m("sellModal.invalidDate"));return}E(!0);try{await Uu({signer:a.signer,contractAddress:n.contractAddress,chainId:n.chainId});const M=await Vu({signer:a.signer,nft:{contractAddress:n.contractAddress,tokenId:n.tokenId,network:n.network,chainId:n.chainId},usdPrice:Kt(j),expiresAtMs:q}),U=await ic(M,a.identity);$(j),de("Shop Listed Item",{item_id:n.itemId??n.tokenId??null,contract_address:n.contractAddress,price_credits:j,price_usd:Kt(j),listing_type:"secondary",is_primary:!1}),Xn.success(m("sellModal.toastOnSale",{name:n.name})),o.invalidateQueries({queryKey:["my-assets",a.address]}),e==null||e(j,U==null?void 0:U.id)}catch(M){Me(M,{flow:"list_secondary"}),de("Shop Listing Failed",{listing_type:"secondary",error_code:He(M)}),f(Zt(M,m("sellModal.errorGeneric")))}finally{E(!1)}}function H(){r(),i("/my-items")}return T!==null?s.jsx(es,{onClick:r,role:"presentation",children:s.jsxs(ts,{onClick:M=>M.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":m("sellModal.successHeader"),children:[s.jsxs(ns,{children:[s.jsx(rs,{children:m("sellModal.successHeader")}),s.jsx(as,{onClick:r,"aria-label":m("getCredits.done"),children:s.jsx(X,{name:"close",className:"ico"})})]}),s.jsxs(Zx,{children:[s.jsx(ey,{"aria-hidden":!0,children:s.jsx(X,{name:"check",className:"ico"})}),s.jsxs(ty,{children:[s.jsx("b",{children:m("sellModal.successOnSale")})," ",m("sellModal.successManage")]})]}),s.jsxs(ny,{children:[s.jsx(ry,{onClick:H,children:m("sellModal.myItems")}),s.jsx(ay,{onClick:r,children:m("getCredits.done")})]})]})}):O==="authorize"?s.jsx(fc,{auth:Uo(n.contractAddress,n.chainId),signer:a.signer,title:m("authorizeStep.sellTitle"),name:n.name,image:n.image,icon:s.jsx(X,{name:"pen",className:"ico"}),reason:m("authorizeStep.sellReason",{name:n.name}),onAuthorized:()=>{C("form"),P()},onCancel:()=>C("form"),onClose:r}):s.jsx(es,{onClick:S?void 0:r,role:"presentation",children:s.jsxs(ts,{"data-testid":"modal",onClick:M=>M.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":m("sellModal.sellProduct"),children:[s.jsxs(ns,{children:[s.jsx(rs,{children:m("sellModal.sellProduct")}),s.jsx(as,{onClick:r,disabled:S,"aria-label":m("sellModal.cancel"),children:s.jsx(X,{name:"close",className:"ico"})})]}),s.jsx(Yx,{children:m("sellModal.subtitle")}),s.jsxs(Wx,{children:[s.jsx(Bx,{children:n.image?s.jsx("img",{src:n.image,alt:""}):null}),s.jsxs(Hx,{children:[s.jsx(zx,{children:n.name}),h?s.jsx(qx,{children:m("sellModal.byCreator",{name:h})}):null]})]}),s.jsxs(Kx,{children:[s.jsxs(os,{children:[s.jsx(is,{children:m("sellModal.priceShort")}),s.jsxs(Qx,{"aria-invalid":x.length>0&&!L,children:[s.jsx(Ne,{className:"ccy"}),s.jsx(Ux,{type:"number",min:"1",step:"1",inputMode:"numeric",value:x,onChange:M=>y(M.target.value),disabled:S,"aria-label":m("sellModal.priceLabel",{currency:"credits"})}),s.jsx(Vx,{"aria-hidden":!0,children:B})]})]}),s.jsxs(os,{children:[s.jsx(is,{children:m("sellModal.expirationLabel")}),s.jsx(Gx,{"data-invalid":!!b&&!A,children:s.jsx(Ax,{selected:b,onChange:w,minDate:Q,dateFormat:"MM/dd/yyyy",placeholderText:"MM/DD/YYYY",disabled:S,showIcon:!0,showPopperArrow:!1,todayButton:m("sellModal.today"),ariaLabelledBy:void 0,"aria-label":m("sellModal.expirationLabel")})})]})]}),c&&L?s.jsx(Jx,{children:m("sellModal.proceedsCredits",{count:j})}):null,s.jsx(Et,{message:k}),s.jsx(Xx,{onClick:()=>void K(),disabled:S||!L||!A,children:S?D?m("sellModal.puttingOnSale"):m("sellModal.confirmListing"):m("sellModal.putUpForSale")})]})})}const sy=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
|
-
`,cy=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
|
-
`,ly=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
|
-
`,dy=g.div`
|
|
794
|
-
display: flex;
|
|
795
|
-
align-items: center;
|
|
796
|
-
justify-content: space-between;
|
|
797
|
-
gap: 8px;
|
|
798
|
-
`,uy=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
|
-
`,py=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
|
-
`,fy=g.div`
|
|
829
|
-
display: flex;
|
|
830
|
-
align-items: center;
|
|
831
|
-
gap: 12px;
|
|
832
|
-
`,hy=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
|
-
`,my=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
|
-
`,gy=g.label`
|
|
847
|
-
display: flex;
|
|
848
|
-
flex-direction: column;
|
|
849
|
-
gap: 6px;
|
|
850
|
-
`,xy=g.span`
|
|
851
|
-
font-family: ${u.font.sans};
|
|
852
|
-
font-size: 12px;
|
|
853
|
-
color: ${u.colors.muted};
|
|
854
|
-
`,yy=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
|
-
`,by=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
|
-
`,cs=g.div`
|
|
888
|
-
display: flex;
|
|
889
|
-
gap: 12px;
|
|
890
|
-
|
|
891
|
-
${u.media.maxWidth("mobile")} {
|
|
892
|
-
flex-direction: column-reverse;
|
|
893
|
-
}
|
|
894
|
-
`,vy=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
|
-
`,ls=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
|
-
`,wy=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
|
-
`,ky=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
|
-
`,Dy=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 Cy(n){return/^0x[a-fA-F0-9]{40}$/.test(n.trim())}function Sy({item:n,session:a,onClose:t,onTransferred:e}){const[r,o]=v.useState(""),[i,c]=v.useState(!1),[l,p]=v.useState(null),[d,h]=v.useState(!1),x=r.trim(),y=Cy(x),b=y&&x.toLowerCase()===a.address.toLowerCase(),w=x.length===0?null:y?b?m("transfer.selfAddress"):null:m("transfer.invalidAddress"),k=y&&!b&&!i;async function f(){if(k){p(null),c(!0);try{await Gu({contractAddress:n.contractAddress,chainId:n.chainId,tokenId:n.tokenId,to:x,signer:a.signer}),de("Shop Transferred Item",{contract_address:n.contractAddress,token_id:n.tokenId}),h(!0),Xn.success(m("transfer.toastSuccess",{name:n.name})),e==null||e()}catch(S){kn(S)||Me(S,{flow:"transfer-item",tokenId:n.tokenId}),de("Shop Transfer Failed",{error_code:He(S)}),p(kn(S)?m("getCredits.errorCanceled"):Zt(S,m("transfer.errorGeneric")))}finally{c(!1)}}}return s.jsx(sy,{onClick:i?void 0:t,role:"presentation",children:s.jsxs(cy,{onClick:S=>S.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":m("transfer.title"),children:[s.jsx(ly,{children:s.jsxs(dy,{children:[s.jsx(uy,{children:m("transfer.title")}),s.jsx(py,{onClick:t,disabled:i,"aria-label":m("sellModal.cancel"),children:s.jsx(X,{name:"close",className:"ico"})})]})}),d?s.jsxs(s.Fragment,{children:[s.jsxs(wy,{children:[s.jsx(ky,{"aria-hidden":!0,children:s.jsx(X,{name:"check",className:"ico"})}),s.jsx(Dy,{children:m("transfer.successBody",{name:n.name})})]}),s.jsx(cs,{children:s.jsx(ls,{onClick:t,children:m("getCredits.done")})})]}):s.jsxs(s.Fragment,{children:[s.jsxs(fy,{children:[n.thumbnail?s.jsx(hy,{src:n.thumbnail,alt:""}):null,s.jsx(my,{children:n.name})]}),s.jsxs(gy,{children:[s.jsx(xy,{children:m("transfer.addressLabel")}),s.jsx(yy,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:r,onChange:S=>o(S.target.value),disabled:i,"aria-invalid":!!w,"aria-label":m("transfer.addressLabel")}),w?s.jsx(Et,{message:w}):null]}),s.jsx(by,{children:m("transfer.warning")}),s.jsx(Et,{message:l}),s.jsxs(cs,{children:[s.jsx(vy,{onClick:t,disabled:i,children:m("sellModal.cancel")}),s.jsx(ls,{onClick:()=>void f(),disabled:!k,children:i?m("transfer.transferring"):m("transfer.transfer")})]})]})]})})}const ds=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
|
-
`,us=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
|
-
`,ps=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
|
-
`,fs=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
|
-
`,hs=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
|
-
`,My=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
|
-
`,_y=g.div`
|
|
1048
|
-
display: flex;
|
|
1049
|
-
align-items: center;
|
|
1050
|
-
gap: 12px;
|
|
1051
|
-
`,jy=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
|
-
`,Iy=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
|
-
`,Py=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
|
-
`,Ey=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
|
-
`,Ty=g.label`
|
|
1099
|
-
display: flex;
|
|
1100
|
-
flex-direction: column;
|
|
1101
|
-
gap: 4px;
|
|
1102
|
-
`,$y=g.span`
|
|
1103
|
-
font-family: ${u.font.sans};
|
|
1104
|
-
font-size: 12px;
|
|
1105
|
-
color: ${u.colors.muted};
|
|
1106
|
-
`,Ny=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
|
-
`,Oy=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
|
-
`,Ry=g.span`
|
|
1154
|
-
flex: none;
|
|
1155
|
-
font-family: ${u.font.sans};
|
|
1156
|
-
font-size: 10px;
|
|
1157
|
-
color: ${u.colors.muted2};
|
|
1158
|
-
`,_a=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
|
-
`,Ay=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
|
-
`,Ly=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
|
-
`,Fy=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
|
-
`,Yy=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
|
-
`,Wy=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
|
-
`,By=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
|
-
`,Hy=g.div`
|
|
1251
|
-
display: flex;
|
|
1252
|
-
gap: 12px;
|
|
1253
|
-
|
|
1254
|
-
${u.media.maxWidth("mobile")} {
|
|
1255
|
-
flex-direction: column-reverse;
|
|
1256
|
-
}
|
|
1257
|
-
`,zy=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
|
-
`,qy=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
|
-
`,Ky=1e3*60*60*24*182;function Qy({item:n,session:a,onListed:t,onClose:e}){const r=on(),o=an(),[i,c]=v.useState("10"),[l,p]=v.useState(null),[d,h]=v.useState(null),[x,y]=v.useState(!1),[b,w]=v.useState(null),[k,f]=v.useState(null),S=Xt.chainId,E=ra(a),{data:T}=qr(a.address),$=T!=null&&T.name?Kr(T.name):Ga(a.address),O=Number(i),C=Number.isInteger(O)&&O>0,D=C?`$${Kt(O).toFixed(2)}`:"$0";v.useEffect(()=>{let A=!1;return(async()=>{try{const Q=await Xu({contractAddress:n.contractAddress,chainId:S});A||w(Q)}catch{A||w(!1)}})(),()=>{A=!0}},[n.contractAddress,S]);async function j(){h(null);const A=Number(i);if(!Number.isInteger(A)||A<=0){h(m("primaryList.errorWholeNumber"));return}y(!0);try{b||(p(m("primaryList.statusEnabling")),await Ju({signer:a.signer,contractAddress:n.contractAddress,chainId:S}),w(!0)),p(m("primaryList.statusPublishing"));const Q=await Zu({signer:a.signer,item:{contractAddress:n.contractAddress,itemId:n.blockchainItemId,network:rt.Network.MATIC,chainId:S},usdPrice:Kt(A),uses:n.remainingSupply,expiresAtMs:Date.now()+Ky});p(m("primaryList.statusFinishing")),await ic(Q,a.identity),p(null),f(A),de("Shop Listed Item",{item_id:n.blockchainItemId,contract_address:n.contractAddress,price_credits:A,price_usd:Kt(A),listing_type:"primary",is_primary:!0}),Xn.success(m("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(Q){Me(Q,{flow:"list_primary"}),de("Shop Listing Failed",{listing_type:"primary",error_code:He(Q)}),h(Zt(Q,m("primaryList.errorGeneric"))),p(null)}finally{y(!1)}}function L(){e(),o(od(n.contractAddress,n.blockchainItemId))}const q=b===null?m("primaryList.checking"):x?E?m("primaryList.publishing"):m("primaryList.confirmListing"):b===!1?m("primaryList.enableAndPutOnSale"):m("primaryList.putOnSale");return k!==null?s.jsx(ds,{onClick:e,role:"presentation",children:s.jsxs(us,{onClick:A=>A.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":m("primaryList.successTitle"),children:[s.jsxs(ps,{children:[s.jsx(fs,{children:m("primaryList.successTitle")}),s.jsx(hs,{onClick:e,"aria-label":m("getCredits.done"),children:s.jsx(X,{name:"close",className:"ico"})})]}),s.jsxs(Fy,{children:[s.jsx(Yy,{"aria-hidden":!0,children:s.jsx(X,{name:"check",className:"ico"})}),s.jsx(Wy,{children:s.jsx("b",{children:n.name})}),s.jsxs(By,{children:[m("primaryList.listedFor")," ",s.jsxs("strong",{children:[s.jsx(Ne,{className:"ccy-mark"})," ",s.jsx(Ee,{credits:k})]})," ",m("primaryList.dotAvailable",{count:n.remainingSupply})]})]}),s.jsxs(Hy,{children:[s.jsx(zy,{onClick:e,children:m("getCredits.done")}),s.jsx(qy,{onClick:L,children:m("primaryList.viewInShop")})]})]})}):s.jsx(ds,{onClick:x?void 0:e,role:"presentation",children:s.jsxs(us,{"data-testid":"modal",onClick:A=>A.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":m("primaryList.publishTitle",{name:n.name}),children:[s.jsxs(ps,{children:[s.jsx(fs,{children:m("primaryList.publishTitle",{name:n.name})}),s.jsx(hs,{onClick:e,disabled:x,"aria-label":m("primaryList.cancel"),children:s.jsx(X,{name:"close",className:"ico"})})]}),s.jsx(My,{children:m("primaryList.fromCollection",{collectionName:n.collectionName,count:n.remainingSupply})}),s.jsxs(_y,{children:[s.jsx(jy,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsxs(Iy,{children:[s.jsx(Py,{children:n.name}),$?s.jsx(Ey,{children:m("primaryList.byCreator",{name:$})}):null]})]}),s.jsxs(Ty,{children:[s.jsx($y,{children:m("primaryList.priceShort")}),s.jsxs(Ny,{"aria-invalid":i.length>0&&!C,children:[s.jsx(Ne,{className:"ccy"}),s.jsx(Oy,{type:"number",min:"1",step:"1",inputMode:"numeric",value:i,onChange:A=>c(A.target.value),disabled:x,"aria-label":m("primaryList.priceLabel",{currency:Ke.name})}),s.jsx(Ry,{"aria-hidden":!0,children:D})]})]}),s.jsx(_a,{children:m("primaryList.pricedInWhole",{currency:Ke.name,currencySingular:Ke.nameSingular})}),b===!1&&!x?s.jsx(_a,{children:E?m("primaryList.firstTimeManaged",{collectionName:n.collectionName}):m("primaryList.firstTimeConfirm",{collectionName:n.collectionName})}):b===!0&&!x?s.jsx(_a,{children:E?m("primaryList.readyManaged"):m("primaryList.readyConfirm")}):null,l?s.jsx(Ly,{children:l}):null,s.jsx(Et,{message:d}),s.jsx(Ay,{onClick:()=>void j(),disabled:x||b===null||!C,children:q})]})})}const ol=["function issueTokens(address[] _beneficiaries, uint256[] _itemIds)"];function il(n){return/^0x[a-fA-F0-9]{40}$/.test(n.trim())}function sl(n){return n.reduce((a,t)=>a+Math.max(0,Math.floor(t.amount||0)),0)}function Uy(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(!il(r.address)||!Number.isInteger(r.amount)||r.amount<1)return!1;const e=sl(t);return e>=1&&e<=a}function Vy(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 Gy(n){const{contractAddress:a,chainId:t,beneficiaries:e,itemIds:r,signer:o}=n,i={...sd(cd.ERC721CollectionV2,t),address:a},c=new bp(ol).encodeFunctionData("issueTokens",[e,r]),l=fp(),p=hp(o.provider,l),d=await Ip(p,l,c,i,{serverURL:gc.relayerUrl});return await mp(d,"the mint"),d}async function Xy(n){const{signer:a,contractAddress:t,chainId:e,entries:r,itemId:o}=n,{beneficiaries:i,itemIds:c}=Vy(r,o);if(i.length===0)throw new Error("No copies to issue");if(gc.enabled)try{return await Gy({contractAddress:t,chainId:e,beneficiaries:i,itemIds:c,signer:a})}catch(h){if(h instanceof _p&&h.code===jp.USER_DENIED||h instanceof pp)throw h;console.warn("[issue] gasless meta-tx failed, falling back to a direct tx:",h)}return await id(a.provider,e),(await(await new yp(t,ol,a).issueTokens(i,c,ep(e))).wait()).transactionHash}const Jy=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
|
-
`,Zy=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
|
-
`,eb=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
|
-
`,tb=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
|
-
`,nb=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
|
-
`,rb=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
|
-
`,ab=g.div`
|
|
1367
|
-
display: flex;
|
|
1368
|
-
align-items: center;
|
|
1369
|
-
gap: 12px;
|
|
1370
|
-
`,ob=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
|
-
`,ib=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
|
-
`,sb=g.div`
|
|
1395
|
-
display: flex;
|
|
1396
|
-
flex-direction: column;
|
|
1397
|
-
gap: 10px;
|
|
1398
|
-
`,cb=g.div`
|
|
1399
|
-
display: flex;
|
|
1400
|
-
align-items: flex-start;
|
|
1401
|
-
gap: 8px;
|
|
1402
|
-
`,lb=g.label`
|
|
1403
|
-
flex: 1 1 auto;
|
|
1404
|
-
min-width: 0;
|
|
1405
|
-
display: flex;
|
|
1406
|
-
flex-direction: column;
|
|
1407
|
-
gap: 4px;
|
|
1408
|
-
`,db=g.label`
|
|
1409
|
-
flex: none;
|
|
1410
|
-
width: 96px;
|
|
1411
|
-
display: flex;
|
|
1412
|
-
flex-direction: column;
|
|
1413
|
-
gap: 4px;
|
|
1414
|
-
`,ms=g.span`
|
|
1415
|
-
font-family: ${u.font.sans};
|
|
1416
|
-
font-size: 12px;
|
|
1417
|
-
color: ${u.colors.muted};
|
|
1418
|
-
`,gs=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
|
-
`,ub=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
|
-
`,pb=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
|
-
`,fb=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
|
-
`,hb=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 mb=g.p`
|
|
1526
|
-
margin: 0;
|
|
1527
|
-
font-family: ${u.font.sans};
|
|
1528
|
-
font-size: 11px;
|
|
1529
|
-
color: ${u.colors.err};
|
|
1530
|
-
`,xs=g.div`
|
|
1531
|
-
display: flex;
|
|
1532
|
-
gap: 12px;
|
|
1533
|
-
|
|
1534
|
-
${u.media.maxWidth("mobile")} {
|
|
1535
|
-
flex-direction: column-reverse;
|
|
1536
|
-
}
|
|
1537
|
-
`,gb=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
|
-
`,ys=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
|
-
`,xb=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
|
-
`,yb=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
|
-
`,bb=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 vb(n){return n.map(a=>({address:a.address,amount:Number(a.amount)}))}function wb({item:n,session:a,onClose:t,onIssued:e}){const r=on(),[o,i]=v.useState([{address:"",amount:"1"}]),[c,l]=v.useState(!1),[p,d]=v.useState(null),[h,x]=v.useState(null),y=v.useRef(null),b=ra(a),w=vb(o),k=sl(w),f=Uy(w,n.available),S=k>n.available;v.useEffect(()=>{var j;(j=y.current)==null||j.focus();function D(L){L.key==="Escape"&&!c&&t()}return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[c,t]);function E(D,j){i(L=>L.map((q,A)=>A===D?{...q,...j}:q))}function T(){i(D=>[...D,{address:"",amount:"1"}])}function $(D){i(j=>j.length<=1?j:j.filter((L,q)=>q!==D))}async function O(){if(!(!f||c)){d(null),l(!0);try{await Xy({signer:a.signer,contractAddress:n.contractAddress,chainId:n.chainId,entries:w,itemId:n.itemId}),de("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),Xn.success(m("issue.toastSuccess",{count:k,name:n.name})),r.invalidateQueries({queryKey:["publishable-item"]}),r.invalidateQueries({queryKey:["publishable-items"]}),e==null||e()}catch(D){kn(D)||Me(D,{flow:"issue-item",itemId:n.itemId}),de("Shop Issue Failed",{error_code:He(D)}),d(kn(D)?m("getCredits.errorCanceled"):Zt(D,m("issue.errorGeneric")))}finally{l(!1)}}}const C=c?b?m("issue.issuing"):m("issue.confirm"):k>0?m("issue.issueCount",{count:k}):m("issue.issue");return s.jsx(Jy,{onClick:c?void 0:t,role:"presentation",children:s.jsxs(Zy,{ref:y,tabIndex:-1,"data-testid":"issue-modal",onClick:D=>D.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":m("issue.title"),children:[s.jsxs(eb,{children:[s.jsx(tb,{children:m("issue.title")}),s.jsx(nb,{onClick:t,disabled:c,"aria-label":m("sellModal.cancel"),children:s.jsx(X,{name:"close",className:"ico"})})]}),h!==null?s.jsxs(s.Fragment,{children:[s.jsxs(xb,{children:[s.jsx(yb,{"aria-hidden":!0,children:s.jsx(X,{name:"check",className:"ico"})}),s.jsx(bb,{children:m("issue.successBody",{count:h,name:n.name})})]}),s.jsx(xs,{children:s.jsx(ys,{onClick:t,children:m("getCredits.done")})})]}):s.jsxs(s.Fragment,{children:[s.jsxs(ab,{children:[s.jsx(ob,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsx(ib,{children:n.name})]}),s.jsx(rb,{children:m("issue.subtitle")}),s.jsx(sb,{children:o.map((D,j)=>{const L=D.address.trim(),q=L.length>0&&!il(L),A=Number(D.amount),Q=D.amount.length>0&&(!Number.isInteger(A)||A<1);return s.jsxs(cb,{children:[s.jsxs(lb,{children:[s.jsx(ms,{children:m("issue.addressLabel")}),s.jsx(gs,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:D.address,onChange:B=>E(j,{address:B.target.value}),disabled:c,"aria-invalid":q,"aria-label":m("issue.addressLabel")}),q?s.jsx(mb,{children:m("issue.invalidAddress")}):null]}),s.jsxs(db,{children:[s.jsx(ms,{children:m("issue.amountLabel")}),s.jsx(gs,{type:"number",min:"1",step:"1",inputMode:"numeric",value:D.amount,onChange:B=>E(j,{amount:B.target.value}),disabled:c,"aria-invalid":Q,"aria-label":m("issue.amountLabel")})]}),s.jsx(ub,{onClick:()=>$(j),disabled:c||o.length<=1,"aria-label":m("issue.removeRow"),children:s.jsx(X,{name:"close",className:"ico"})})]},j)})}),s.jsxs(pb,{onClick:T,disabled:c,children:[s.jsx(X,{name:"plus",className:"ico"}),m("issue.addRow")]}),s.jsxs(fb,{over:S,"aria-live":"polite",children:[s.jsx("strong",{children:k})," / ",n.available," ",m("issue.itemsToIssue")]}),S?s.jsx(hb,{children:m("issue.overCap",{available:n.available})}):null,s.jsx(Et,{message:p}),s.jsxs(xs,{children:[s.jsx(gb,{onClick:t,disabled:c,children:m("sellModal.cancel")}),s.jsx(ys,{onClick:()=>void O(),disabled:!f||c,children:C})]})]})]})})}const kb=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
|
-
`,Db=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
|
-
`,Cb=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
|
-
`,Sb=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
|
-
`,Mb=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
|
-
`,_b=g.video`
|
|
1675
|
-
display: block;
|
|
1676
|
-
width: 100%;
|
|
1677
|
-
max-height: 70vh;
|
|
1678
|
-
border-radius: 12px;
|
|
1679
|
-
background: ${u.colors.blackBtn};
|
|
1680
|
-
`;function jb({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(kb,{onClick:t,role:"presentation",children:s.jsxs(Db,{ref:e,tabIndex:-1,onClick:r=>r.stopPropagation(),"data-testid":"modal",role:"dialog","aria-modal":"true","aria-label":m("itemDetail.showcaseTitle"),children:[s.jsxs(Cb,{children:[s.jsx(Sb,{children:a||m("itemDetail.showcaseTitle")}),s.jsx(Mb,{onClick:t,"aria-label":m("itemDetail.showcaseClose"),children:s.jsx(X,{name:"close",size:18})})]}),s.jsx(_b,{src:n,"data-testid":"showcase-video",controls:!0,autoPlay:!0,muted:!0,playsInline:!0,preload:"auto"})]})})}const{colors:wt,radius:Ib}=u,Pb=g.div`
|
|
1681
|
-
position: fixed;
|
|
1682
|
-
inset: 0;
|
|
1683
|
-
z-index: 60;
|
|
1684
|
-
display: grid;
|
|
1685
|
-
place-items: center;
|
|
1686
|
-
padding: 20px;
|
|
1687
|
-
`,Eb=g.div`
|
|
1688
|
-
position: absolute;
|
|
1689
|
-
inset: 0;
|
|
1690
|
-
background: rgba(22, 21, 24, 0.45);
|
|
1691
|
-
`,Tb=g.div`
|
|
1692
|
-
position: relative;
|
|
1693
|
-
z-index: 1;
|
|
1694
|
-
width: 100%;
|
|
1695
|
-
max-width: 420px;
|
|
1696
|
-
background: ${wt.white};
|
|
1697
|
-
border-radius: ${Ib.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
|
-
`,$b=g.div`
|
|
1702
|
-
display: flex;
|
|
1703
|
-
align-items: center;
|
|
1704
|
-
gap: 14px;
|
|
1705
|
-
margin-bottom: 18px;
|
|
1706
|
-
`,Nb=g.div`
|
|
1707
|
-
width: 64px;
|
|
1708
|
-
height: 64px;
|
|
1709
|
-
flex: none;
|
|
1710
|
-
border-radius: 12px;
|
|
1711
|
-
overflow: hidden;
|
|
1712
|
-
background: ${wt.media};
|
|
1713
|
-
|
|
1714
|
-
& img {
|
|
1715
|
-
width: 100%;
|
|
1716
|
-
height: 100%;
|
|
1717
|
-
object-fit: contain;
|
|
1718
|
-
}
|
|
1719
|
-
`,Ob=g.div`
|
|
1720
|
-
font-weight: 700;
|
|
1721
|
-
font-size: 16px;
|
|
1722
|
-
color: ${wt.text};
|
|
1723
|
-
margin-bottom: 6px;
|
|
1724
|
-
`,Rb=g.div`
|
|
1725
|
-
background: ${wt.panel};
|
|
1726
|
-
border-radius: 14px;
|
|
1727
|
-
padding: 16px;
|
|
1728
|
-
margin-bottom: 14px;
|
|
1729
|
-
`,bs=g.div`
|
|
1730
|
-
color: ${wt.muted};
|
|
1731
|
-
font-size: 13px;
|
|
1732
|
-
font-weight: 600;
|
|
1733
|
-
margin-bottom: 6px;
|
|
1734
|
-
`,vs=g.div`
|
|
1735
|
-
display: flex;
|
|
1736
|
-
align-items: center;
|
|
1737
|
-
gap: 8px;
|
|
1738
|
-
font-weight: 700;
|
|
1739
|
-
font-size: 24px;
|
|
1740
|
-
color: ${wt.text};
|
|
1741
|
-
|
|
1742
|
-
&[data-approx] {
|
|
1743
|
-
color: ${wt.text2};
|
|
1744
|
-
}
|
|
1745
|
-
`,Ab=g.span`
|
|
1746
|
-
color: ${wt.muted};
|
|
1747
|
-
`,ws=g(Ne)`
|
|
1748
|
-
width: 20px;
|
|
1749
|
-
height: 20px;
|
|
1750
|
-
color: ${wt.text};
|
|
1751
|
-
`,ks=g.div`
|
|
1752
|
-
margin-top: 6px;
|
|
1753
|
-
font-size: 13px;
|
|
1754
|
-
`,Lb=g.div`
|
|
1755
|
-
font-size: 13px;
|
|
1756
|
-
margin-bottom: 6px;
|
|
1757
|
-
`,cl=jn`
|
|
1758
|
-
margin: 6px 0 0;
|
|
1759
|
-
font-size: 13px;
|
|
1760
|
-
`,ja=g.p`
|
|
1761
|
-
${cl};
|
|
1762
|
-
`,Fb=g(Et)`
|
|
1763
|
-
${cl};
|
|
1764
|
-
`,Yb=g.div`
|
|
1765
|
-
display: flex;
|
|
1766
|
-
gap: 10px;
|
|
1767
|
-
margin-top: 18px;
|
|
1768
|
-
`,Ds=g(Jn)`
|
|
1769
|
-
flex: 1;
|
|
1770
|
-
`;function Ia(n){if(kn(n))return m("errors.rejected");const a=(n.message??"").toLowerCase();return a.includes("insufficient")?m("marketCheckout.error.insufficient",{currency:Ke.name}):a.includes("not found")||a.includes("no active listing")||a.includes("404")?m("marketCheckout.error.soldOrRemoved"):a.includes("your own listing")?m("errors.cantBuyOwn"):m("marketCheckout.error.generic")}function Wb(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 ll({listing:n,rate:a,onClose:t,onSold:e}){const{session:r}=Jt(),{data:o,isError:i}=ac(r),c=on(),l=an(),[p,d]=v.useState("confirm"),[h,x]=v.useState(m("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(Ec());v.useEffect(()=>(O.current=!1,()=>{O.current=!0}),[]);const D=_t(ha(n.manaWei,a));v.useEffect(()=>{let K=!1;if(!r){d("error"),b(m("buyModal.signInToCheckout"));return}return(async()=>{try{const H=await lc(n.tradeId);if(!H)throw new Error("not found");if(dd(H,r.address))throw new Error("You can't buy your own listing.");const M=ha(n.manaWei,a);if(!Number.isFinite(M)||M<=0)throw new Error("price unavailable");if(K)return;k({trade:H,usdCents:M,credits:_t(M)}),x("")}catch(H){if(K)return;console.error("[market] listing check failed",H),de(Te(H)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:He(H),value_usd:Math.round(ha(n.manaWei,a))/100}),d("error"),b(Ia(H))}})(),()=>{K=!0,$.current&&r&&(A([$.current]),$.current=null)}},[]);const j=!!w&&o!=null&&o.credits<w.credits;async function L(){if(!r||!w)return;if(j){de("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 q([$.current])&&S(null),$.current=null),l("/credits");return}d("working"),b(null),T(!1);let K=f;if(!K){x(m("marketCheckout.lockingPrice"));try{const{credit:z,maxCreditedValue:J,usdCents:pe}=await Fa(r.identity,w.usdCents,n.tradeId);if(O.current){q([z.id]);return}$.current=z.id,c.invalidateQueries({queryKey:["usd-balance"]});const ye=_t(pe);if(K={trade:w.trade,credit:z,maxCreditedValue:J,usdCents:pe,credits:ye},S(K),ye!==w.credits){k({trade:w.trade,usdCents:pe,credits:ye}),T(!0),x(""),d("confirm");return}}catch(z){console.error("[market] authorize failed",z),Te(z)||Me(z,{flow:"market_buy_now",step:"authorize"}),de(Te(z)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:He(z),value_usd:w.usdCents/100}),x(""),b(Ia(z)),d("error");return}}if(!K)return;const P=K;let H=!1,M;try{x(m("marketCheckout.confirming"));const z={trade:P.trade,buyer:r.address,signer:r.signer,credits:[P.credit],maxCreditedValue:P.maxCreditedValue,onBroadcast:({txHash:J})=>C.current.broadcast(P.credit.id,J),onReverted:({txHash:J})=>{J&&C.current.reverted(J)}};if(C.current.submitStarted(P.credit.id),hc())try{M=await wp(z),C.current.broadcast(P.credit.id,M),await xc(M),H=!0}catch(J){if(J instanceof yc)H=!0;else if(J instanceof bc){if(J.reason==="relayer-unreachable")throw C.current.unobservable(P.credit.id),J;if(!zr(r.providerType))throw J;M=await Ko(z)}else throw M&&C.current.reverted(M),J}else M=await Ko(z)}catch(z){C.current.submitFinished(P.credit.id),console.error("[market] buy now failed",z),await q([P.credit.id])&&S(null),$.current=null,de(Te(z)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:He(z),value_usd:P.usdCents/100}),c.invalidateQueries({queryKey:["usd-balance"]}),b(Ia(z)),d("error");const J=(z.message??"").toLowerCase();(J.includes("not found")||J.includes("no active listing")||J.includes("404"))&&e();return}C.current.submitFinished(P.credit.id),$.current=null;try{c.invalidateQueries({queryKey:["usd-balance"]}),de("Shop Completed Purchase",{items:[{item_id:n.itemId??null,contract_address:n.contractAddress,token_id:null,price_usd:P.usdCents/100,category:n.category,is_smart:!1}],value_credits:P.credits,value_usd:P.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(z){Me(z,{flow:"market_buy_now",step:"post_purchase"})}const U={items:[Wb(n)],txHash:M};l("/success",{state:U})}async function q(K){if(!r||K.length===0)return!1;const P=K.filter(H=>!C.current.mayBeConsumed(H));if(P.length===0)return!1;try{return await oc(r.identity,P),!0}catch{return!1}}function A(K){q(K.filter(P=>!C.current.isInFlight(P)))}function Q(){r&&f&&q([f.credit.id]),$.current=null,t()}const B=p==="working";return s.jsxs(Pb,{role:"dialog","aria-modal":"true","aria-label":m("buyModal.dialogAria",{name:n.name}),children:[s.jsx(Eb,{onClick:B?void 0:Q,"aria-hidden":!0}),s.jsxs(Tb,{children:[s.jsxs($b,{children:[s.jsx(Nb,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsxs("div",{children:[s.jsx(Ob,{title:n.name,children:n.name||m("buyModal.itemFallback")}),s.jsx(cc,{"data-variant":"rarity",children:n.rarity})]})]}),s.jsx(Rb,{children:w?s.jsxs(s.Fragment,{children:[s.jsx(bs,{children:m("marketCheckout.finalPrice")}),s.jsxs(vs,{children:[s.jsx(ws,{}),s.jsx(Ee,{credits:w.credits})," ",Fo(w.credits)]}),s.jsxs(ks,{className:"muted",children:["$",Kt(w.credits).toFixed(2)]})]}):s.jsxs(s.Fragment,{children:[s.jsx(bs,{children:m("marketCheckout.todaysPrice")}),s.jsxs(vs,{"data-approx":!0,children:[s.jsx(Ab,{"aria-hidden":!0,children:"≈"}),s.jsx(ws,{}),s.jsx(Ee,{credits:D})," ",Fo(D)]}),s.jsx(ks,{className:"muted",children:h||m("marketCheckout.checkingListing")})]})}),r?s.jsxs(Lb,{className:"muted",children:[m("marketCheckout.yourBalance")," ",s.jsx(Ne,{className:"ccy-mark"})," ",ld(o,i)]}):null,j?s.jsx(ja,{className:"muted",children:m("marketCheckout.needMore",{currency:Ke.name})}):null,E?s.jsx(ja,{"data-testid":"price-changed",role:"status",children:m("buyModal.priceChanged")}):null,h&&p==="working"?s.jsx(ja,{className:"muted",children:h}):null,s.jsx(Fb,{message:y}),s.jsxs(Yb,{children:[s.jsx(Ds,{variant:"ghost",onClick:Q,disabled:B,children:m("buyModal.cancel")}),s.jsx(Ds,{variant:"purple",onClick:()=>void L(),disabled:B||!w||j&&qn(),children:B?m("marketCheckout.buying"):j&&!qn()?m("nav.getCredits",{currency:Ke.name}):m("marketCheckout.confirmPurchase")})]})]})]})}function Bb(n,a,{enabled:t=!0,first:e}={}){const{data:r,isFetched:o}=me({queryKey:["related-items",n,a,e],enabled:t&&!!n&&!!a,staleTime:3e5,queryFn:()=>ud(n,a,{first:e})});return{items:r??[],isFetched:o}}const dl=15;function Hb(n){return`${n.contractAddress}-${n.itemId??n.tokenId??n.id}`.toLowerCase()}function zb(n,a){return!!(a.id&&n.id===a.id||a.itemId&&n.itemId===a.itemId&&Cs(n,a)||a.tokenId&&n.tokenId===a.tokenId&&Cs(n,a))}function Cs(n,a){var t;return a.contractAddress?((t=n.contractAddress)==null?void 0:t.toLowerCase())===a.contractAddress.toLowerCase():!1}function Pa(n,a,t=dl){const e=new Set,r=[];function o(c,l){for(const p of c){if(r.length>=l)return;if(zb(p,a))continue;const d=Hb(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 qb=20,Kb=30,Ss=[];function Qb(n,a=dl){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=Ss,isFetched:p}=me({queryKey:["collection-items",e],enabled:!!e,queryFn:()=>pd(e,{first:qb}).then(E=>E.items)}),d=v.useMemo(()=>Pa({collection:l},c,a).items.length,[l,c,a]),h=p&&d<a,x=h&&!!i,y=me({queryKey:["suggestions-creator",i],enabled:x,staleTime:5*6e4,queryFn:()=>fd({creator:i,isOnSale:!0,first:Kb}).then(E=>E.items)}),b=y.data??Ss,w=!x||y.isSuccess||y.isError,k=v.useMemo(()=>Pa({collection:l,creator:b},c,a).items.length,[l,b,c,a]),{items:f}=Bb(e,r??null,{enabled:h&&w&&k<a,first:a});return{...v.useMemo(()=>Pa({collection:l,creator:b,related:f},c,a),[l,b,f,c,a]),siblings:l,siblingsFetched:p}}const{colors:et,media:uo}=u,Ub=hd`
|
|
1771
|
-
to {
|
|
1772
|
-
transform: rotate(360deg);
|
|
1773
|
-
}
|
|
1774
|
-
`,Vb=g.div``,Gb=g.span`
|
|
1775
|
-
width: 34px;
|
|
1776
|
-
height: 34px;
|
|
1777
|
-
border-radius: 50%;
|
|
1778
|
-
border: 3px solid ${et.line};
|
|
1779
|
-
border-top-color: ${et.accent};
|
|
1780
|
-
animation: ${Ub} 0.8s linear infinite;
|
|
1781
|
-
|
|
1782
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1783
|
-
animation-duration: 2.4s;
|
|
1784
|
-
}
|
|
1785
|
-
`,Xb=g.p``,Jb=g.div``,Ms=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: ${et.muted};
|
|
1796
|
-
transition:
|
|
1797
|
-
background 0.12s ease,
|
|
1798
|
-
color 0.12s ease;
|
|
1799
|
-
|
|
1800
|
-
&[data-active] {
|
|
1801
|
-
background: ${et.text};
|
|
1802
|
-
color: ${et.white};
|
|
1803
|
-
}
|
|
1804
|
-
&:not([data-active]):hover {
|
|
1805
|
-
color: ${et.text};
|
|
1806
|
-
}
|
|
1807
|
-
|
|
1808
|
-
${uo.maxWidth("lg")} {
|
|
1809
|
-
padding: 6px 12px;
|
|
1810
|
-
border-radius: 0;
|
|
1811
|
-
background: ${et.white};
|
|
1812
|
-
color: ${et.text2};
|
|
1813
|
-
|
|
1814
|
-
&[data-active] {
|
|
1815
|
-
background: ${et.text};
|
|
1816
|
-
color: ${et.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
|
-
`,_s=g.span`
|
|
1828
|
-
${uo.maxWidth("lg")} {
|
|
1829
|
-
display: none;
|
|
1830
|
-
}
|
|
1831
|
-
`,js=g(X)`
|
|
1832
|
-
display: none;
|
|
1833
|
-
|
|
1834
|
-
${uo.maxWidth("lg")} {
|
|
1835
|
-
display: block;
|
|
1836
|
-
}
|
|
1837
|
-
`,Is="shop-item-preview";function Zb({item:n}){const a=Jt(D=>{var j;return(j=D.session)==null?void 0:j.address}),{data:t,isLoading:e}=qr(a),r=a&&t?a:"default",o=n.category==="emote",[i,c]=v.useState("avatar"),l=!o&&i==="item",p=l||!e,d=Qn(D=>D.fittingOpen),{ref:h,active:x}=md(),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()=>{Ep(k.current),k.current=null}},[y]);const[f,S]=v.useState(rt.PreviewRenderer.UNITY),E=f===rt.PreviewRenderer.BABYLON,T=!!a&&!!t,$=T&&gd(n,xd(t)),O=yd(n)[0],C=T&&!$&&!o;return s.jsxs(s.Fragment,{children:[s.jsx("div",{ref:h,"data-preview-viewport":!0,"aria-hidden":!0}),y?s.jsx(bd,{id:Is,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?rt.PreviewType.WEARABLE:rt.PreviewType.AVATAR,emote:o||l?void 0:rt.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(Is))==null?void 0:D.contentWindow)??null}}):null,!y||b?s.jsx(Vb,{"data-preview-loading":!0,"aria-busy":"true","aria-label":m("itemPreview.loading"),children:s.jsx(Gb,{"aria-hidden":!0})}):null,C&&!l?s.jsx(Xb,{"data-preview-note":!0,children:m("itemPreview.shownOnBody",{shape:vd(O)})}):null,!E||!o?null:s.jsx(Pp,{previewId:"shop-item-preview"}),!E||o?null:s.jsxs(Jb,{"data-preview-toggle":!0,role:"group","aria-label":m("itemPreview.previewMode"),children:[s.jsxs(Ms,{type:"button","data-active":i==="avatar"||void 0,"aria-pressed":i==="avatar","aria-label":m("itemPreview.onAvatar"),onClick:()=>c("avatar"),children:[s.jsx(js,{name:"view-avatar",size:18}),s.jsx(_s,{children:m("itemPreview.onAvatar")})]}),s.jsxs(Ms,{type:"button","data-active":i==="item"||void 0,"aria-pressed":i==="item","aria-label":m("itemPreview.item"),onClick:()=>c("item"),children:[s.jsx(js,{name:"view-item",size:18}),s.jsx(_s,{children:m("itemPreview.item")})]})]})]})}const ev=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
|
-
`,tv=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
|
-
`,nv=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
|
-
`,rv=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
|
-
`,av=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
|
-
`,ov=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
|
-
`,iv=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
|
-
`,sv=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
|
-
`,cv=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
|
-
`,lv=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
|
-
`,dv=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
|
-
`,ul=`
|
|
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
|
-
`,uv=g.div`
|
|
2088
|
-
${ul}
|
|
2089
|
-
`,pv=g.button`
|
|
2090
|
-
${ul}
|
|
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
|
-
`,Ps=g.span`
|
|
2107
|
-
color: ${u.colors.muted};
|
|
2108
|
-
`,fv=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
|
-
`,hv=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
|
-
`,pl=`
|
|
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
|
-
`,mv=g.button`
|
|
2183
|
-
${pl}
|
|
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
|
-
`,Es=g.button`
|
|
2196
|
-
${pl}
|
|
2197
|
-
background: ${u.colors.accent};
|
|
2198
|
-
color: ${u.colors.softWhite};
|
|
2199
|
-
|
|
2200
|
-
&:hover:not(:disabled) {
|
|
2201
|
-
background: ${u.colors.accentHover};
|
|
2202
|
-
}
|
|
2203
|
-
`,gv=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
|
-
`,xv=g.div`
|
|
2217
|
-
flex: none;
|
|
2218
|
-
display: flex;
|
|
2219
|
-
align-items: center;
|
|
2220
|
-
justify-content: flex-end;
|
|
2221
|
-
gap: 8px;
|
|
2222
|
-
`,yv=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
|
-
`,Ts=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
|
-
`,bv=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 kr=10,vv=!1;function wv(n){return/^0x[a-fA-F0-9]{40}$/.test(n)?`${n.slice(0,6)}…${n.slice(-4)}`:n}function kv(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 Dv(n,a){var t;return(((t=n==null?void 0:n.trim())==null?void 0:t[0])||a.replace(/^0x/i,"")[0]||"?").toUpperCase()}function Cv(n){return n%100>=11&&n%100<=13?"th":["th","st","nd","rd"][n%10]??"th"}function Sv(n,a){const t=new Date(n);return Number.isNaN(t.getTime())?"—":a==="en"?`${new Intl.DateTimeFormat("en",{month:"long"}).format(t)} ${t.getDate()}${Cv(t.getDate())}, ${t.getFullYear()}`:new Intl.DateTimeFormat(a,{day:"numeric",month:"long",year:"numeric"}).format(t)}function Mv(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 _v({r:n,seller:a,issuedId:t,labels:e,locale:r,isOwn:o,isLegacy:i,inCart:c,fallbackImage:l,onAdd:p,onBuyNative:d,onBuyLegacy:h}){var $,O;const x=an(),{data:y}=qr(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?Kr(y.name):wv(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:kv(a)},"aria-hidden":!0,children:Dv(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(pv,{type:"button",onClick:()=>x(`/items/creator/${a}`),children:T}):s.jsx(uv,{children:T})}),s.jsx("td",{"data-label":e.itemNumber,children:t?s.jsxs("span",{"data-testid":"resale-issued",children:["#",t]}):s.jsx(Ps,{children:"—"})}),s.jsx("td",{"data-label":e.expiration,children:n.saleEndsAt?Sv(n.saleEndsAt,r):s.jsx(Ps,{children:"—"})}),s.jsx("td",{"data-label":e.price,children:s.jsxs(fv,{children:[s.jsxs("span",{className:"amount",children:[i?s.jsx("span",{className:"approx","aria-hidden":!0,children:"≈"}):null,s.jsx(Ne,{className:"ccy"}),s.jsx("span",{children:It(n.priceCredits)})]}),s.jsx(hv,{"data-persistent":o?"true":void 0,children:o?s.jsx(gv,{"data-testid":"resale-own",children:m("resales.yourListing")}):i?s.jsx(Es,{onClick:h,"aria-label":m("assetCard.buyNow"),"data-testid":"resale-buy",children:m("resales.buy")}):s.jsxs(s.Fragment,{children:[s.jsxs(mv,{onClick:p,disabled:c,"aria-label":c?m("assetCard.inCart"):m("assetCard.addToCart"),"data-testid":"resale-add",children:[s.jsx(X,{name:"cart",className:"ico"}),s.jsx("span",{children:c?m("assetCard.inCart"):m("resales.add")})]}),s.jsx(Es,{onClick:d,"aria-label":m("assetCard.buyNow"),"data-testid":"resale-buy",children:m("resales.buy")})]})})]})})]})}function jv({item:n,onClose:a}){var H;const t=n.contractAddress,e=n.itemId,r=on(),o=Qn(M=>M.add),i=Qn(M=>M.items),{session:c}=Jt(),l=wd(M=>M.locale),p=(H=c==null?void 0:c.address)==null?void 0:H.toLowerCase(),d=v.useRef(null),[h,x]=v.useState(null),[y,b]=v.useState(null),[w,k]=v.useState("cheapest"),[f,S]=v.useState(0),E=!!h||!!y;v.useEffect(()=>{var M;(M=d.current)==null||M.focus()},[]),v.useEffect(()=>{function M(z){z.key==="Escape"&&!E&&a()}window.addEventListener("keydown",M);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",M),document.body.style.overflow=U}},[E,a]);const{data:T=[],isLoading:$}=me({queryKey:["item-resales",t,e],enabled:!!t&&!!e,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>uc(t,e)}),O=v.useMemo(()=>w==="cheapest"?T:[...T].sort((M,U)=>U.priceCredits-M.priceCredits),[T,w]),C=Math.max(1,Math.ceil(O.length/kr)),D=Math.min(f,C-1),j=O.slice(D*kr,D*kr+kr),L=j.filter(M=>!M.seller||!M.issuedId).map(M=>M.tokenId).filter(M=>!!M),{data:q={}}=me({queryKey:["resale-token-info",t,L.join(",")],enabled:!!t&&L.length>0,staleTime:6e4,queryFn:()=>kd(t,L)}),{data:A=[]}=me({queryKey:["item-classic-orders",t,e],enabled:vv,queryFn:()=>Dd(t,e)}),Q=T.some(M=>M.source==="legacy"),{data:B}=dc(Q);function K(){r.invalidateQueries({queryKey:["item-resales",t,e]})}const P={owner:m("resales.colOwner"),itemNumber:m("resales.colItemNumber"),expiration:m("resales.colExpiration"),price:m("resales.colPrice")};return s.jsxs(s.Fragment,{children:[s.jsx(ev,{onClick:E?void 0:a,role:"presentation",children:s.jsxs(tv,{ref:d,tabIndex:-1,onClick:M=>M.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":m("resales.modalTitle"),"data-testid":"resellers-modal",children:[s.jsxs(nv,{children:[s.jsx(rv,{children:m("resales.modalTitle")}),s.jsx(av,{onClick:a,"aria-label":m("resales.close"),"data-testid":"resellers-close",children:s.jsx(X,{name:"close"})})]}),s.jsxs(ov,{children:[s.jsxs(iv,{children:[s.jsx(sv,{"data-testid":"resales-count",children:m("resales.count",{count:T.length})}),s.jsxs(cv,{children:[s.jsxs("select",{value:w,onChange:M=>{k(M.target.value),S(0)},"aria-label":m("resales.sortLabel"),"data-testid":"resales-sort",children:[s.jsx("option",{value:"cheapest",children:m("resales.sortCheapest")}),s.jsx("option",{value:"most_expensive",children:m("resales.sortExpensive")})]}),s.jsx(X,{name:"chevron-down",className:"chev"})]})]}),$?null:O.length===0?s.jsx(bv,{"data-testid":"resales-empty",children:m("resales.empty")}):null,O.length>0?s.jsxs(s.Fragment,{children:[s.jsx(lv,{children:s.jsxs(dv,{children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",children:P.owner}),s.jsx("th",{scope:"col",children:P.itemNumber}),s.jsx("th",{scope:"col",children:P.expiration}),s.jsx("th",{scope:"col",children:P.price})]})}),s.jsx("tbody",{children:j.map(M=>{const U=M.source==="legacy",z=i.some(je=>je.id===M.id),J=M.tokenId&&q[M.tokenId]||{},pe=M.issuedId??J.issuedId,ye=M.seller??J.seller,we={...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},Nt=!!ye&&!!p&&ye.toLowerCase()===p;return s.jsx(_v,{r:we,seller:ye,issuedId:pe,labels:P,locale:l,isOwn:Nt,isLegacy:U,inCart:z,fallbackImage:we.thumbnail,onAdd:()=>o(we,"item_detail"),onBuyNative:()=>x(we),onBuyLegacy:()=>b(Mv(we))},M.tradeId??M.id)})})]})}),C>1?s.jsxs(xv,{children:[s.jsx(Ts,{"data-dir":"prev",onClick:()=>S(M=>Math.max(0,M-1)),disabled:D===0,"aria-label":m("resales.prevPage"),"data-testid":"resale-prev-page",children:s.jsx(X,{name:"chevron-down"})}),s.jsx(yv,{"data-testid":"resale-page-label",children:m("resales.page",{page:D+1,total:C})}),s.jsx(Ts,{onClick:()=>S(M=>Math.min(C-1,M+1)),disabled:D>=C-1,"aria-label":m("resales.nextPage"),"data-testid":"resale-next-page",children:s.jsx(X,{name:"chevron-down"})})]}):null]}):null,null]})]})}),h?s.jsx(Ba,{item:h,onClose:()=>{x(null),K()}}):null,y&&B?s.jsx(ll,{listing:y,rate:B,onClose:()=>b(null),onSold:()=>{b(null),K()}}):null]})}function po(){return Xt.shopServerUrl||null}function fl(){return!!po()}async function Iv(n,a,t){const e=po();if(!e)return{subscribed:!1};const r=new URLSearchParams({contractAddress:n,itemId:a}),o=`${e}/notify-requests?${r.toString()}`,i=await pc(o,{method:"GET",identity:t,metadata:{}});if(!i.ok)throw new Error(`getNotifyRequest ${i.status}`);return Ev(i,"getNotifyRequest")}async function Pv(n,a){const t=po();if(!t)throw new Error("createNotifyRequest: no shop-server host configured");const e=`${t}/notify-requests`,r=await pc(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()&&!Tv(o))throw new Error("createNotifyRequest: response was not JSON")}async function Ev(n,a){try{return await n.json()}catch{throw new Error(`${a}: response was not JSON`)}}function Tv(n){try{return JSON.parse(n),!0}catch{return!1}}const{colors:qe,radius:hl}=u,ml=jn`
|
|
2314
|
-
display: flex;
|
|
2315
|
-
flex-direction: column;
|
|
2316
|
-
gap: 8px;
|
|
2317
|
-
width: 100%;
|
|
2318
|
-
`,$v=g.form`
|
|
2319
|
-
${ml};
|
|
2320
|
-
`,$s=g.div`
|
|
2321
|
-
${ml};
|
|
2322
|
-
|
|
2323
|
-
&[data-done] {
|
|
2324
|
-
flex-direction: row;
|
|
2325
|
-
align-items: center;
|
|
2326
|
-
gap: 16px;
|
|
2327
|
-
padding: 12px;
|
|
2328
|
-
border-radius: 16px;
|
|
2329
|
-
background: #c1d8c9;
|
|
2330
|
-
}
|
|
2331
|
-
`,Nv=g.label`
|
|
2332
|
-
font-size: 14px;
|
|
2333
|
-
color: ${qe.softWhite};
|
|
2334
|
-
`,Ov=g.div`
|
|
2335
|
-
display: flex;
|
|
2336
|
-
align-items: stretch;
|
|
2337
|
-
gap: 8px;
|
|
2338
|
-
`,Rv=g.input`
|
|
2339
|
-
flex: 1;
|
|
2340
|
-
min-width: 0;
|
|
2341
|
-
height: 42px;
|
|
2342
|
-
padding: 0 16px;
|
|
2343
|
-
border: 1px solid ${qe.fieldBorder};
|
|
2344
|
-
border-radius: ${hl.btn};
|
|
2345
|
-
background: rgba(255, 255, 255, 0.1);
|
|
2346
|
-
font-size: 16px;
|
|
2347
|
-
color: ${qe.softWhite};
|
|
2348
|
-
|
|
2349
|
-
&::placeholder {
|
|
2350
|
-
color: ${qe.gray4};
|
|
2351
|
-
}
|
|
2352
|
-
&:focus-visible {
|
|
2353
|
-
outline: none;
|
|
2354
|
-
border-color: ${qe.white};
|
|
2355
|
-
box-shadow: 0 0 0 1px ${qe.white};
|
|
2356
|
-
}
|
|
2357
|
-
`,Ns=g.button`
|
|
2358
|
-
flex-shrink: 0;
|
|
2359
|
-
height: 40px;
|
|
2360
|
-
padding: 0 12px;
|
|
2361
|
-
border: 0;
|
|
2362
|
-
border-radius: ${hl.card};
|
|
2363
|
-
background: ${qe.softWhite};
|
|
2364
|
-
color: ${qe.text};
|
|
2365
|
-
font-weight: 600;
|
|
2366
|
-
font-size: 15px;
|
|
2367
|
-
line-height: 24px;
|
|
2368
|
-
text-transform: uppercase;
|
|
2369
|
-
letter-spacing: 0.46px;
|
|
2370
|
-
cursor: pointer;
|
|
2371
|
-
transition: background 0.15s ease;
|
|
2372
|
-
|
|
2373
|
-
&[data-full] {
|
|
2374
|
-
width: 100%;
|
|
2375
|
-
flex-shrink: 1;
|
|
2376
|
-
}
|
|
2377
|
-
&:hover:not(:disabled) {
|
|
2378
|
-
background: ${qe.white};
|
|
2379
|
-
}
|
|
2380
|
-
&:disabled {
|
|
2381
|
-
opacity: 0.5;
|
|
2382
|
-
cursor: default;
|
|
2383
|
-
}
|
|
2384
|
-
`,Av=g.span`
|
|
2385
|
-
display: inline-flex;
|
|
2386
|
-
align-items: center;
|
|
2387
|
-
justify-content: center;
|
|
2388
|
-
flex-shrink: 0;
|
|
2389
|
-
width: 20px;
|
|
2390
|
-
height: 20px;
|
|
2391
|
-
border-radius: 50%;
|
|
2392
|
-
background: #34ce76;
|
|
2393
|
-
color: ${qe.white};
|
|
2394
|
-
`,Lv=g.span`
|
|
2395
|
-
font-size: 16px;
|
|
2396
|
-
line-height: 1.5;
|
|
2397
|
-
color: ${qe.text2};
|
|
2398
|
-
`;function Os(n){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.trim())}function Fv({item:n}){const a=Jt(k=>k.session),t=Jt(k=>k.signIn),[e,r]=v.useState(""),[o,i]=v.useState(!1),[c,l]=v.useState(!1),[p,d]=v.useState(null),h=fl(),x=h&&!!a&&!!n.contractAddress&&!!n.itemId,{data:y}=me({queryKey:["notify-request",n.contractAddress,n.itemId,a==null?void 0:a.address],enabled:x,queryFn:()=>Iv(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||!h)return;let k=!1;return Cd().then(f=>{!k&&f&&r(S=>S||f)}),()=>{k=!0}},[h,a]);const b=c||!!(y!=null&&y.subscribed);async function w(k){if(k.preventDefault(),!(!a||!n.itemId||!Os(e)||o)){i(!0),d(null);try{await Pv({contractAddress:n.contractAddress,itemId:n.itemId,chainId:n.chainId,email:e.trim()},a.identity),l(!0)}catch(f){Me(f,{flow:"notify-me",contractAddress:n.contractAddress,itemId:n.itemId}),d(m("notifyMe.error"))}finally{i(!1)}}}return h?a?b?s.jsxs($s,{"data-done":!0,"data-testid":"notify-subscribed",children:[s.jsx(Av,{"aria-hidden":!0,children:s.jsx(X,{name:"check",size:12})}),s.jsx(Lv,{children:m("notifyMe.subscribedBody")})]}):s.jsxs($v,{onSubmit:k=>void w(k),"data-testid":"notify",children:[s.jsx(Nv,{htmlFor:"notify-email",children:m("notifyMe.label")}),s.jsxs(Ov,{children:[s.jsx(Rv,{id:"notify-email",type:"email",inputMode:"email",autoComplete:"email",placeholder:m("notifyMe.placeholder"),value:e,onChange:k=>r(k.target.value),"data-testid":"notify-email"}),s.jsx(Ns,{type:"submit",disabled:!Os(e)||o,"data-testid":"notify-submit",children:o?m("notifyMe.working"):m("notifyMe.cta")})]}),s.jsx(Et,{message:p})]}):s.jsx($s,{"data-testid":"notify",children:s.jsx(Ns,{type:"button","data-full":!0,onClick:t,"data-testid":"notify-signin",children:m("notifyMe.signInCta")})}):null}const Yv=new Map(Object.entries(Tp).flatMap(([n,a])=>a.length===1?[[a[0],n]]:[])),bn="/items";function Wv(n){return n?`${bn}?rarities=${encodeURIComponent(n.toLowerCase())}`:null}function Bv(n){const a=n.wearableCategory;if(a){const t=Yv.get(a);return t?`${bn}?category=wearable&subCategory=${encodeURIComponent(t)}`:`${bn}?category=wearable`}return n.category==="emote"?`${bn}?category=emote`:n.category==="wearable"?`${bn}?category=wearable`:null}function Hv(){return`${bn}?smart=true`}const gl="shop:recently-viewed",xl=12;function zv(){try{const n=localStorage.getItem(gl);if(!n)return[];const a=JSON.parse(n);return Array.isArray(a)?a.slice(0,xl):[]}catch{return[]}}function qv(n){if(n!=null&&n.id)try{const a=[n,...zv().filter(t=>t.id!==n.id)].slice(0,xl);localStorage.setItem(gl,JSON.stringify(a))}catch{}}const Kv=g(Sd)`
|
|
2399
|
-
display: flex;
|
|
2400
|
-
flex-direction: column;
|
|
2401
|
-
overflow: hidden;
|
|
2402
|
-
gap: 1px;
|
|
2403
|
-
background: ${u.colors.lineStrong};
|
|
2404
|
-
|
|
2405
|
-
/* Rows stack; each cell (<img>) covers its share. A single row (≤2 thumbnails, data-full) spans the
|
|
2406
|
-
full height. */
|
|
2407
|
-
& [data-collage-row] {
|
|
2408
|
-
display: flex;
|
|
2409
|
-
flex: 1 1 50%;
|
|
2410
|
-
min-height: 0;
|
|
2411
|
-
gap: 1px;
|
|
2412
|
-
}
|
|
2413
|
-
& [data-collage-row][data-full] {
|
|
2414
|
-
flex-basis: 100%;
|
|
2415
|
-
}
|
|
2416
|
-
& [data-collage-row] img {
|
|
2417
|
-
flex: 1 1 0;
|
|
2418
|
-
min-width: 0;
|
|
2419
|
-
width: 100%;
|
|
2420
|
-
height: 100%;
|
|
2421
|
-
object-fit: cover;
|
|
2422
|
-
display: block;
|
|
2423
|
-
}
|
|
2424
|
-
`;function Qv({contractAddress:n,name:a,items:t,className:e}){const r=an();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(Md,{as:"button","data-link":!0,className:e,"data-testid":"creator",onClick:l=>{l.stopPropagation(),r(`/collection/${n}`)},children:[o.length>0?s.jsxs(Kv,{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(_d,{"data-testid":"creator-name",children:Kr(a)})]})}const{colors:R,radius:Pn,media:De,font:Uv,gradients:Vv}=u,Gv=g.div`
|
|
2425
|
-
max-width: 1721px;
|
|
2426
|
-
margin: 0 auto;
|
|
2427
|
-
|
|
2428
|
-
${De.maxWidth("lg")} {
|
|
2429
|
-
padding-bottom: 88px;
|
|
2430
|
-
}
|
|
2431
|
-
`,Xv=g.nav`
|
|
2432
|
-
display: flex;
|
|
2433
|
-
align-items: center;
|
|
2434
|
-
gap: 8px;
|
|
2435
|
-
font-size: 13px;
|
|
2436
|
-
color: ${R.gray4};
|
|
2437
|
-
margin-bottom: 24px;
|
|
2438
|
-
`,Jv=g.button`
|
|
2439
|
-
background: none;
|
|
2440
|
-
border: 0;
|
|
2441
|
-
padding: 0;
|
|
2442
|
-
font: inherit;
|
|
2443
|
-
color: ${R.gray4};
|
|
2444
|
-
|
|
2445
|
-
&:hover {
|
|
2446
|
-
color: ${R.white};
|
|
2447
|
-
}
|
|
2448
|
-
`,Zv=g.span`
|
|
2449
|
-
color: ${R.muted2};
|
|
2450
|
-
`,ew=g.span`
|
|
2451
|
-
color: ${R.softWhite};
|
|
2452
|
-
font-weight: 600;
|
|
2453
|
-
`,tw=g.div`
|
|
2454
|
-
display: grid;
|
|
2455
|
-
grid-template-columns: minmax(0, 1045fr) minmax(0, 514fr);
|
|
2456
|
-
gap: 48px;
|
|
2457
|
-
align-items: start;
|
|
2458
|
-
|
|
2459
|
-
${De.maxWidth("lg")} {
|
|
2460
|
-
grid-template-columns: 1fr;
|
|
2461
|
-
gap: 24px;
|
|
2462
|
-
}
|
|
2463
|
-
`,nw=g.div`
|
|
2464
|
-
position: relative;
|
|
2465
|
-
aspect-ratio: 1045 / 752;
|
|
2466
|
-
border-radius: ${Pn.banner};
|
|
2467
|
-
overflow: hidden;
|
|
2468
|
-
/* Light surface, deliberately AGAINST the Figma's translucent black (1052:151284): the dark violet
|
|
2469
|
-
backdrop muted every item, so the preview keeps the light stage. The iframe is transparent — this
|
|
2470
|
-
is the scene's backdrop. */
|
|
2471
|
-
background: ${R.media};
|
|
2472
|
-
|
|
2473
|
-
/* Edge to edge once the page is a single column: the stage is the whole width there, so it cancels the
|
|
2474
|
-
shell's gutter instead of sitting inside it. No transform, which would make this the containing block
|
|
2475
|
-
for the absolutely-positioned controls below. */
|
|
2476
|
-
${De.maxWidth("lg")} {
|
|
2477
|
-
aspect-ratio: 1 / 1;
|
|
2478
|
-
width: 100vw;
|
|
2479
|
-
margin-left: calc(-50vw + 50%);
|
|
2480
|
-
border-radius: 0;
|
|
2481
|
-
}
|
|
2482
|
-
|
|
2483
|
-
& iframe,
|
|
2484
|
-
& > * {
|
|
2485
|
-
width: 100%;
|
|
2486
|
-
height: 100%;
|
|
2487
|
-
border: 0;
|
|
2488
|
-
display: block;
|
|
2489
|
-
}
|
|
2490
|
-
|
|
2491
|
-
/* Invisible viewport sentinel for the IntersectionObserver that pauses the preview off-screen.
|
|
2492
|
-
Absolute + pointer-events:none so it neither takes layout space (undoing the greedy child sizing
|
|
2493
|
-
above) nor blocks the preview controls. */
|
|
2494
|
-
& > [data-preview-viewport] {
|
|
2495
|
-
position: absolute;
|
|
2496
|
-
inset: 0;
|
|
2497
|
-
pointer-events: none;
|
|
2498
|
-
z-index: 0;
|
|
2499
|
-
}
|
|
2500
|
-
|
|
2501
|
-
& > [data-preview-toggle] {
|
|
2502
|
-
position: absolute;
|
|
2503
|
-
top: 16px;
|
|
2504
|
-
left: 16px;
|
|
2505
|
-
z-index: 2;
|
|
2506
|
-
width: auto;
|
|
2507
|
-
height: auto;
|
|
2508
|
-
display: inline-flex;
|
|
2509
|
-
gap: 2px;
|
|
2510
|
-
padding: 3px;
|
|
2511
|
-
background: rgba(255, 255, 255, 0.92);
|
|
2512
|
-
border: 1px solid ${R.line};
|
|
2513
|
-
border-radius: 999px;
|
|
2514
|
-
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
|
|
2515
|
-
|
|
2516
|
-
/* Bottom-right on mobile, and the two buttons meet directly: the design draws one clipped group, so the
|
|
2517
|
-
container carries no fill, gap or padding of its own there. */
|
|
2518
|
-
${De.maxWidth("lg")} {
|
|
2519
|
-
top: auto;
|
|
2520
|
-
left: auto;
|
|
2521
|
-
right: 16px;
|
|
2522
|
-
bottom: 16px;
|
|
2523
|
-
gap: 0;
|
|
2524
|
-
padding: 0;
|
|
2525
|
-
background: none;
|
|
2526
|
-
border: 0;
|
|
2527
|
-
box-shadow: none;
|
|
2528
|
-
overflow: hidden;
|
|
2529
|
-
}
|
|
2530
|
-
}
|
|
2531
|
-
|
|
2532
|
-
& > [data-preview-note] {
|
|
2533
|
-
position: absolute;
|
|
2534
|
-
bottom: 14px;
|
|
2535
|
-
left: 50%;
|
|
2536
|
-
transform: translateX(-50%);
|
|
2537
|
-
z-index: 2;
|
|
2538
|
-
width: auto;
|
|
2539
|
-
height: auto;
|
|
2540
|
-
max-width: 88%;
|
|
2541
|
-
margin: 0;
|
|
2542
|
-
text-align: center;
|
|
2543
|
-
background: rgba(22, 21, 24, 0.78);
|
|
2544
|
-
color: ${R.white};
|
|
2545
|
-
font-size: 12px;
|
|
2546
|
-
font-weight: 500;
|
|
2547
|
-
padding: 6px 12px;
|
|
2548
|
-
border-radius: 999px;
|
|
2549
|
-
}
|
|
2550
|
-
|
|
2551
|
-
& > [data-preview-loading] {
|
|
2552
|
-
position: absolute;
|
|
2553
|
-
inset: 0;
|
|
2554
|
-
z-index: 1;
|
|
2555
|
-
display: flex;
|
|
2556
|
-
align-items: center;
|
|
2557
|
-
justify-content: center;
|
|
2558
|
-
width: 100%;
|
|
2559
|
-
height: 100%;
|
|
2560
|
-
background: transparent;
|
|
2561
|
-
}
|
|
2562
|
-
|
|
2563
|
-
& > [data-fav-preview] {
|
|
2564
|
-
display: none;
|
|
2565
|
-
}
|
|
2566
|
-
|
|
2567
|
-
/* Bottom-LEFT: the emote controls and the preview note both own the bottom centre, and the mobile
|
|
2568
|
-
wearable/avatar toggle owns the bottom right, so this is the one free corner on every route. */
|
|
2569
|
-
& > [data-play-showcase] {
|
|
2570
|
-
position: absolute;
|
|
2571
|
-
bottom: 16px;
|
|
2572
|
-
left: 16px;
|
|
2573
|
-
z-index: 2;
|
|
2574
|
-
width: auto;
|
|
2575
|
-
height: auto;
|
|
2576
|
-
}
|
|
2577
|
-
|
|
2578
|
-
${De.maxWidth("lg")} {
|
|
2579
|
-
& > [data-preview-toggle] {
|
|
2580
|
-
top: auto;
|
|
2581
|
-
left: auto;
|
|
2582
|
-
bottom: 12px;
|
|
2583
|
-
right: 12px;
|
|
2584
|
-
gap: 0;
|
|
2585
|
-
padding: 0;
|
|
2586
|
-
background: transparent;
|
|
2587
|
-
border: 0;
|
|
2588
|
-
box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
|
|
2589
|
-
overflow: hidden;
|
|
2590
|
-
}
|
|
2591
|
-
& > [data-fav-preview] {
|
|
2592
|
-
display: grid;
|
|
2593
|
-
position: absolute;
|
|
2594
|
-
top: 12px;
|
|
2595
|
-
right: 12px;
|
|
2596
|
-
z-index: 3;
|
|
2597
|
-
width: 40px;
|
|
2598
|
-
height: 40px;
|
|
2599
|
-
background: rgba(255, 255, 255, 0.92);
|
|
2600
|
-
box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
|
|
2601
|
-
}
|
|
2602
|
-
& > [data-fav-preview]:hover {
|
|
2603
|
-
background: ${R.white};
|
|
2604
|
-
}
|
|
2605
|
-
}
|
|
2606
|
-
`,rw=g.div``;g.span`
|
|
2607
|
-
position: absolute;
|
|
2608
|
-
inset: 0;
|
|
2609
|
-
width: 100%;
|
|
2610
|
-
height: 100%;
|
|
2611
|
-
border-radius: inherit;
|
|
2612
|
-
`;const aw=g.div`
|
|
2613
|
-
display: flex;
|
|
2614
|
-
flex-direction: column;
|
|
2615
|
-
gap: 0;
|
|
2616
|
-
`,ow=g.div`
|
|
2617
|
-
display: flex;
|
|
2618
|
-
align-items: flex-start;
|
|
2619
|
-
justify-content: space-between;
|
|
2620
|
-
gap: 12px;
|
|
2621
|
-
|
|
2622
|
-
${De.maxWidth("lg")} {
|
|
2623
|
-
order: 0;
|
|
2624
|
-
}
|
|
2625
|
-
`,iw=g.h1`
|
|
2626
|
-
font-size: 28px;
|
|
2627
|
-
font-weight: 600;
|
|
2628
|
-
line-height: 34px;
|
|
2629
|
-
color: ${R.softWhite};
|
|
2630
|
-
|
|
2631
|
-
${De.maxWidth("lg")} {
|
|
2632
|
-
font-size: 20px;
|
|
2633
|
-
line-height: 24px;
|
|
2634
|
-
}
|
|
2635
|
-
`,Rs=g.button`
|
|
2636
|
-
flex: none;
|
|
2637
|
-
width: 40px;
|
|
2638
|
-
height: 40px;
|
|
2639
|
-
border-radius: 50%;
|
|
2640
|
-
border: 0;
|
|
2641
|
-
background: rgba(255, 255, 255, 0.16);
|
|
2642
|
-
display: grid;
|
|
2643
|
-
place-items: center;
|
|
2644
|
-
color: ${R.softWhite};
|
|
2645
|
-
cursor: pointer;
|
|
2646
|
-
transition:
|
|
2647
|
-
color 0.12s ease,
|
|
2648
|
-
background 0.12s ease;
|
|
2649
|
-
|
|
2650
|
-
&:hover {
|
|
2651
|
-
background: rgba(255, 255, 255, 0.28);
|
|
2652
|
-
}
|
|
2653
|
-
&[data-on] {
|
|
2654
|
-
color: ${R.dclRed};
|
|
2655
|
-
}
|
|
2656
|
-
|
|
2657
|
-
${De.maxWidth("lg")} {
|
|
2658
|
-
color: ${R.text};
|
|
2659
|
-
&[data-fav-title] {
|
|
2660
|
-
display: none;
|
|
2661
|
-
}
|
|
2662
|
-
}
|
|
2663
|
-
`,sw=g.button`
|
|
2664
|
-
display: inline-flex;
|
|
2665
|
-
align-items: center;
|
|
2666
|
-
gap: 8px;
|
|
2667
|
-
padding: 8px 14px;
|
|
2668
|
-
border: 1px solid ${R.line};
|
|
2669
|
-
border-radius: ${Pn.pill};
|
|
2670
|
-
background: rgba(255, 255, 255, 0.94);
|
|
2671
|
-
backdrop-filter: blur(6px);
|
|
2672
|
-
box-shadow: 0 2px 10px rgba(22, 21, 24, 0.12);
|
|
2673
|
-
color: ${R.text};
|
|
2674
|
-
font-size: 13px;
|
|
2675
|
-
font-weight: 600;
|
|
2676
|
-
cursor: pointer;
|
|
2677
|
-
transition: background 0.12s ease;
|
|
2678
|
-
|
|
2679
|
-
&:hover {
|
|
2680
|
-
background: ${R.white};
|
|
2681
|
-
}
|
|
2682
|
-
&:focus-visible {
|
|
2683
|
-
outline: 2px solid ${R.accent};
|
|
2684
|
-
outline-offset: 2px;
|
|
2685
|
-
}
|
|
2686
|
-
`,gn=g.div`
|
|
2687
|
-
display: inline-flex;
|
|
2688
|
-
align-items: center;
|
|
2689
|
-
gap: 5px;
|
|
2690
|
-
font-size: 12px;
|
|
2691
|
-
font-weight: 500;
|
|
2692
|
-
text-transform: uppercase;
|
|
2693
|
-
letter-spacing: 0;
|
|
2694
|
-
color: ${R.gray4};
|
|
2695
|
-
`,cw=g.div`
|
|
2696
|
-
display: flex;
|
|
2697
|
-
align-items: center;
|
|
2698
|
-
gap: 8px;
|
|
2699
|
-
flex-wrap: wrap;
|
|
2700
|
-
margin-top: 12px;
|
|
2701
|
-
|
|
2702
|
-
${De.maxWidth("lg")} {
|
|
2703
|
-
order: 1;
|
|
2704
|
-
margin-top: 10px;
|
|
2705
|
-
}
|
|
2706
|
-
`,Ze=g(cc)`
|
|
2707
|
-
height: 24px;
|
|
2708
|
-
padding: 0 8px;
|
|
2709
|
-
gap: 3px;
|
|
2710
|
-
font-size: 13px;
|
|
2711
|
-
font-weight: 500;
|
|
2712
|
-
border-radius: 4px;
|
|
2713
|
-
letter-spacing: 0.02em;
|
|
2714
|
-
text-transform: uppercase;
|
|
2715
|
-
background: rgba(255, 255, 255, 0.14);
|
|
2716
|
-
color: ${R.softWhite};
|
|
2717
|
-
|
|
2718
|
-
& .ico {
|
|
2719
|
-
color: ${R.softWhite};
|
|
2720
|
-
}
|
|
2721
|
-
&[data-variant='cat'] {
|
|
2722
|
-
background: rgba(255, 255, 255, 0.14);
|
|
2723
|
-
color: ${R.softWhite};
|
|
2724
|
-
}
|
|
2725
|
-
|
|
2726
|
-
/* The blocked-VRM-export badge. Warning orange, tinted at 20% for the fill — the marketplace's own
|
|
2727
|
-
#ff7439 on #ff743933, kept identical so the same restriction reads the same in both places. It is the
|
|
2728
|
-
one chip in this row that reports a limitation rather than a feature, and it should not blend in. */
|
|
2729
|
-
&[data-variant='blocked'] {
|
|
2730
|
-
background: rgba(255, 116, 57, 0.2);
|
|
2731
|
-
color: #ff7439;
|
|
2732
|
-
cursor: help;
|
|
2733
|
-
}
|
|
2734
|
-
&[data-variant='blocked']:focus-visible {
|
|
2735
|
-
outline: 2px solid #ff7439;
|
|
2736
|
-
outline-offset: 2px;
|
|
2737
|
-
}
|
|
2738
|
-
`,Ea=g(Ze.withComponent(rc))`
|
|
2739
|
-
text-decoration: none;
|
|
2740
|
-
cursor: pointer;
|
|
2741
|
-
transition: background 0.15s ease;
|
|
2742
|
-
|
|
2743
|
-
&:hover,
|
|
2744
|
-
&:focus-visible {
|
|
2745
|
-
background: rgba(255, 255, 255, 0.26);
|
|
2746
|
-
}
|
|
2747
|
-
|
|
2748
|
-
/* The rarity chip carries its own colour inline, so a background hover would be overridden and the
|
|
2749
|
-
chip would look inert. It gets a ring instead, which reads on any fill. */
|
|
2750
|
-
&[data-variant='rarity']:hover,
|
|
2751
|
-
&[data-variant='rarity']:focus-visible {
|
|
2752
|
-
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
|
|
2753
|
-
}
|
|
2754
|
-
`,lw=g.div`
|
|
2755
|
-
display: flex;
|
|
2756
|
-
flex-direction: column;
|
|
2757
|
-
align-items: flex-start;
|
|
2758
|
-
gap: 8px;
|
|
2759
|
-
`,Ua=g(lw)`
|
|
2760
|
-
gap: 11px;
|
|
2761
|
-
`,As=g.p`
|
|
2762
|
-
margin: 0;
|
|
2763
|
-
color: ${R.softWhite};
|
|
2764
|
-
font-size: 14px;
|
|
2765
|
-
line-height: 30px;
|
|
2766
|
-
display: -webkit-box;
|
|
2767
|
-
-webkit-box-orient: vertical;
|
|
2768
|
-
-webkit-line-clamp: 4;
|
|
2769
|
-
overflow: hidden;
|
|
2770
|
-
|
|
2771
|
-
&[data-expanded] {
|
|
2772
|
-
-webkit-line-clamp: unset;
|
|
2773
|
-
overflow: visible;
|
|
2774
|
-
}
|
|
2775
|
-
`,dw=g.button`
|
|
2776
|
-
font-size: 13px;
|
|
2777
|
-
align-self: flex-start;
|
|
2778
|
-
`,yl=jn`
|
|
2779
|
-
display: grid;
|
|
2780
|
-
grid-template-columns: 1fr 1fr;
|
|
2781
|
-
gap: 16px;
|
|
2782
|
-
`,bl=g.div`
|
|
2783
|
-
${yl};
|
|
2784
|
-
/* Clears the chips above. The pair below sits at 32px, so this is the tighter of the two steps: the
|
|
2785
|
-
description belongs to the heading block it follows, the creator/collection pair is a new subject. */
|
|
2786
|
-
margin-top: 24px;
|
|
2787
|
-
|
|
2788
|
-
${De.maxWidth("lg")} {
|
|
2789
|
-
order: 3;
|
|
2790
|
-
grid-template-columns: 1fr;
|
|
2791
|
-
/* Stacked, the two blocks need real separation — as one column they would read as one paragraph. */
|
|
2792
|
-
gap: 20px;
|
|
2793
|
-
margin-top: 20px;
|
|
2794
|
-
}
|
|
2795
|
-
`,Va=g.div`
|
|
2796
|
-
min-width: 0;
|
|
2797
|
-
`,vl=g.div`
|
|
2798
|
-
${yl};
|
|
2799
|
-
margin-top: 32px;
|
|
2800
|
-
|
|
2801
|
-
${De.maxWidth("lg")} {
|
|
2802
|
-
order: 2;
|
|
2803
|
-
margin-top: 20px;
|
|
2804
|
-
}
|
|
2805
|
-
`,zn=g.div`
|
|
2806
|
-
display: flex;
|
|
2807
|
-
flex-direction: column;
|
|
2808
|
-
gap: 15px;
|
|
2809
|
-
min-width: 0;
|
|
2810
|
-
|
|
2811
|
-
&[data-collection] {
|
|
2812
|
-
align-items: flex-start;
|
|
2813
|
-
}
|
|
2814
|
-
`,wl=jn`
|
|
2815
|
-
&[data-testid='creator'] {
|
|
2816
|
-
color: ${R.softWhite};
|
|
2817
|
-
font-size: 14px;
|
|
2818
|
-
gap: 12px;
|
|
2819
|
-
}
|
|
2820
|
-
[data-avatar] {
|
|
2821
|
-
width: 48px;
|
|
2822
|
-
height: 48px;
|
|
2823
|
-
}
|
|
2824
|
-
[data-letter] {
|
|
2825
|
-
font-size: 18px;
|
|
2826
|
-
}
|
|
2827
|
-
[data-testid='creator-name'] {
|
|
2828
|
-
color: ${R.softWhite};
|
|
2829
|
-
font-weight: 500;
|
|
2830
|
-
text-decoration: underline;
|
|
2831
|
-
}
|
|
2832
|
-
&[data-link]:hover [data-testid='creator-name'] {
|
|
2833
|
-
color: ${R.gray4};
|
|
2834
|
-
}
|
|
2835
|
-
`,uw=g(jd)`
|
|
2836
|
-
${wl}
|
|
2837
|
-
`,pw=g(Qv)`
|
|
2838
|
-
${wl}
|
|
2839
|
-
`,kl=g.hr`
|
|
2840
|
-
border: 0;
|
|
2841
|
-
border-top: 1px solid rgba(255, 255, 255, 0.3);
|
|
2842
|
-
margin: 24px 0 0;
|
|
2843
|
-
width: 100%;
|
|
2844
|
-
|
|
2845
|
-
/* Below the price, not above it: the design hangs this off the bottom of the buy section (2090:399782),
|
|
2846
|
-
so it closes the price rather than separating it from the description. */
|
|
2847
|
-
${De.maxWidth("lg")} {
|
|
2848
|
-
order: 5;
|
|
2849
|
-
margin-top: 16px;
|
|
2850
|
-
}
|
|
2851
|
-
`,fw=g.div`
|
|
2852
|
-
margin-top: 16px;
|
|
2853
|
-
|
|
2854
|
-
${De.maxWidth("lg")} {
|
|
2855
|
-
order: 4;
|
|
2856
|
-
margin-top: 16px;
|
|
2857
|
-
}
|
|
2858
|
-
`,hw=g.div`
|
|
2859
|
-
display: flex;
|
|
2860
|
-
align-items: flex-start;
|
|
2861
|
-
gap: 16px;
|
|
2862
|
-
width: 100%;
|
|
2863
|
-
`,mw=g.div`
|
|
2864
|
-
flex: 1 1 auto;
|
|
2865
|
-
min-width: 0;
|
|
2866
|
-
display: flex;
|
|
2867
|
-
flex-direction: column;
|
|
2868
|
-
gap: 8px;
|
|
2869
|
-
`,Ls=g.div`
|
|
2870
|
-
flex: 0 0 auto;
|
|
2871
|
-
display: flex;
|
|
2872
|
-
flex-direction: column;
|
|
2873
|
-
align-items: flex-end;
|
|
2874
|
-
gap: 8px;
|
|
2875
|
-
text-align: right;
|
|
2876
|
-
`,Fs=g.div`
|
|
2877
|
-
font-size: 18px;
|
|
2878
|
-
font-weight: 500;
|
|
2879
|
-
line-height: 1;
|
|
2880
|
-
color: ${R.softWhite};
|
|
2881
|
-
|
|
2882
|
-
&[data-out] {
|
|
2883
|
-
font-size: 14px;
|
|
2884
|
-
font-weight: 600;
|
|
2885
|
-
text-transform: uppercase;
|
|
2886
|
-
letter-spacing: 0.02em;
|
|
2887
|
-
color: ${R.gray4};
|
|
2888
|
-
}
|
|
2889
|
-
`,Ys=g.div`
|
|
2890
|
-
font-size: 14px;
|
|
2891
|
-
font-weight: 600;
|
|
2892
|
-
text-transform: uppercase;
|
|
2893
|
-
letter-spacing: 0;
|
|
2894
|
-
color: ${R.muted2};
|
|
2895
|
-
`,xn=g.div`
|
|
2896
|
-
display: flex;
|
|
2897
|
-
align-items: center;
|
|
2898
|
-
gap: 10px;
|
|
2899
|
-
font-weight: 700;
|
|
2900
|
-
color: ${R.softWhite};
|
|
2901
|
-
|
|
2902
|
-
/* Not for sale: "Not for Sale" + an info tooltip, 14px semibold, no PRICE label. */
|
|
2903
|
-
&[data-variant='none'] {
|
|
2904
|
-
display: inline-flex;
|
|
2905
|
-
align-items: center;
|
|
2906
|
-
gap: 6px;
|
|
2907
|
-
font-size: 14px;
|
|
2908
|
-
font-weight: 600;
|
|
2909
|
-
color: ${R.softWhite};
|
|
2910
|
-
}
|
|
2911
|
-
&[data-variant='sale'] {
|
|
2912
|
-
flex-wrap: wrap;
|
|
2913
|
-
gap: 10px 14px;
|
|
2914
|
-
color: ${R.dclRed};
|
|
2915
|
-
}
|
|
2916
|
-
`;g.span`
|
|
2917
|
-
display: flex;
|
|
2918
|
-
align-items: center;
|
|
2919
|
-
gap: 10px;
|
|
2920
|
-
font-weight: 700;
|
|
2921
|
-
color: ${R.dclRed};
|
|
2922
|
-
`;const Yn=g.span`
|
|
2923
|
-
font-size: 30px;
|
|
2924
|
-
line-height: 1;
|
|
2925
|
-
`,gw=g.span`
|
|
2926
|
-
display: inline-flex;
|
|
2927
|
-
color: ${R.muted2};
|
|
2928
|
-
cursor: help;
|
|
2929
|
-
|
|
2930
|
-
&:focus-visible {
|
|
2931
|
-
outline: 2px solid ${R.accent};
|
|
2932
|
-
outline-offset: 2px;
|
|
2933
|
-
border-radius: ${Pn.chip};
|
|
2934
|
-
}
|
|
2935
|
-
`,xw=g.span`
|
|
2936
|
-
font-size: 24px;
|
|
2937
|
-
font-weight: 700;
|
|
2938
|
-
color: ${R.softWhite};
|
|
2939
|
-
margin-right: -2px;
|
|
2940
|
-
`,yw=g.div`
|
|
2941
|
-
font-size: 13px;
|
|
2942
|
-
margin-top: 6px;
|
|
2943
|
-
color: ${R.gray4};
|
|
2944
|
-
`,bw=g.span`
|
|
2945
|
-
display: inline-flex;
|
|
2946
|
-
align-items: center;
|
|
2947
|
-
gap: 6px;
|
|
2948
|
-
color: ${R.muted};
|
|
2949
|
-
text-decoration: line-through;
|
|
2950
|
-
font-weight: 600;
|
|
2951
|
-
font-size: 20px;
|
|
2952
|
-
`,vw=g.span`
|
|
2953
|
-
display: inline-flex;
|
|
2954
|
-
align-items: center;
|
|
2955
|
-
background: ${R.dclRed};
|
|
2956
|
-
color: ${R.white};
|
|
2957
|
-
font-weight: 800;
|
|
2958
|
-
font-size: 13px;
|
|
2959
|
-
letter-spacing: 0.03em;
|
|
2960
|
-
text-transform: uppercase;
|
|
2961
|
-
border-radius: 6px;
|
|
2962
|
-
padding: 4px 10px;
|
|
2963
|
-
`,ww=g(Id)`
|
|
2964
|
-
display: inline-flex;
|
|
2965
|
-
align-items: center;
|
|
2966
|
-
gap: 5px;
|
|
2967
|
-
background: ${R.rarityBg};
|
|
2968
|
-
color: ${R.accent};
|
|
2969
|
-
font-size: 13px;
|
|
2970
|
-
font-weight: 700;
|
|
2971
|
-
border-radius: 6px;
|
|
2972
|
-
padding: 4px 10px;
|
|
2973
|
-
white-space: nowrap;
|
|
2974
|
-
`,kw=g.div`
|
|
2975
|
-
display: flex;
|
|
2976
|
-
flex-direction: column;
|
|
2977
|
-
gap: 12px;
|
|
2978
|
-
margin-top: 20px;
|
|
2979
|
-
|
|
2980
|
-
${De.maxWidth("lg")} {
|
|
2981
|
-
order: 6;
|
|
2982
|
-
|
|
2983
|
-
&[data-buttons] {
|
|
2984
|
-
position: fixed;
|
|
2985
|
-
left: 0;
|
|
2986
|
-
right: 0;
|
|
2987
|
-
bottom: 0;
|
|
2988
|
-
z-index: 40;
|
|
2989
|
-
margin-top: 0;
|
|
2990
|
-
padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
|
|
2991
|
-
background: #2b0e44;
|
|
2992
|
-
box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
|
|
2993
|
-
}
|
|
2994
|
-
&[data-dual] {
|
|
2995
|
-
flex-direction: row;
|
|
2996
|
-
align-items: stretch;
|
|
2997
|
-
gap: 12px;
|
|
2998
|
-
}
|
|
2999
|
-
}
|
|
3000
|
-
`,fo=jn`
|
|
3001
|
-
&& {
|
|
3002
|
-
width: 100%;
|
|
3003
|
-
height: 48px;
|
|
3004
|
-
border-radius: 16px;
|
|
3005
|
-
padding: 0 12px;
|
|
3006
|
-
display: flex;
|
|
3007
|
-
align-items: center;
|
|
3008
|
-
justify-content: center;
|
|
3009
|
-
gap: 8px;
|
|
3010
|
-
font-size: 15px;
|
|
3011
|
-
font-weight: 600;
|
|
3012
|
-
line-height: 24px;
|
|
3013
|
-
letter-spacing: 0.46px;
|
|
3014
|
-
text-transform: uppercase;
|
|
3015
|
-
}
|
|
3016
|
-
`,Ta=g(Jn)`
|
|
3017
|
-
${fo};
|
|
3018
|
-
/* The design system's primary fill (Figma 867:61063 carries the "BUY Button" gradient), same as the
|
|
3019
|
-
cart's CHECKOUT and the credits CTA. This read as a flat #fb5c19 for a while — that colour was
|
|
3020
|
-
sampled off the flattened render rather than the node's fill. */
|
|
3021
|
-
&& {
|
|
3022
|
-
background: ${Vv.buyBtn};
|
|
3023
|
-
}
|
|
3024
|
-
&&::before {
|
|
3025
|
-
content: none;
|
|
3026
|
-
}
|
|
3027
|
-
&&:hover:not(:disabled) {
|
|
3028
|
-
background-image: linear-gradient(${R.dclRed}, ${R.dclRed});
|
|
3029
|
-
}
|
|
3030
|
-
|
|
3031
|
-
${De.maxWidth("lg")} {
|
|
3032
|
-
[data-dual] && {
|
|
3033
|
-
flex: 1 1 auto;
|
|
3034
|
-
width: auto;
|
|
3035
|
-
}
|
|
3036
|
-
}
|
|
3037
|
-
`,Ws=g(Jn)`
|
|
3038
|
-
${fo};
|
|
3039
|
-
&& {
|
|
3040
|
-
background: ${R.blackBtn};
|
|
3041
|
-
color: ${R.softWhite};
|
|
3042
|
-
border: 0;
|
|
3043
|
-
|
|
3044
|
-
.ico {
|
|
3045
|
-
width: 20px;
|
|
3046
|
-
height: 20px;
|
|
3047
|
-
}
|
|
3048
|
-
}
|
|
3049
|
-
&&:hover:not(:disabled) {
|
|
3050
|
-
background: ${R.blackBtn};
|
|
3051
|
-
filter: brightness(1.35);
|
|
3052
|
-
}
|
|
3053
|
-
`,$a=g.button`
|
|
3054
|
-
align-self: center;
|
|
3055
|
-
border: 0;
|
|
3056
|
-
background: none;
|
|
3057
|
-
padding: 8px 0;
|
|
3058
|
-
color: ${u.colors.accent};
|
|
3059
|
-
font-weight: 600;
|
|
3060
|
-
font-size: 13px;
|
|
3061
|
-
line-height: 24px;
|
|
3062
|
-
letter-spacing: 0.46px;
|
|
3063
|
-
text-transform: uppercase;
|
|
3064
|
-
text-decoration: underline;
|
|
3065
|
-
cursor: pointer;
|
|
3066
|
-
|
|
3067
|
-
/* Opt-in for the uses that sit directly on the purple field, where the accent purple above is all
|
|
3068
|
-
but invisible against it. Not a change to the shared colour: the other uses live inside
|
|
3069
|
-
GaslessNotice, whose light fill is what that accent was picked for. */
|
|
3070
|
-
&[data-on-purple] {
|
|
3071
|
-
color: ${u.colors.white};
|
|
3072
|
-
}
|
|
3073
|
-
|
|
3074
|
-
&:disabled {
|
|
3075
|
-
opacity: 0.5;
|
|
3076
|
-
cursor: default;
|
|
3077
|
-
}
|
|
3078
|
-
`,Bs=g(Jn)`
|
|
3079
|
-
${fo};
|
|
3080
|
-
&& {
|
|
3081
|
-
background: transparent;
|
|
3082
|
-
border: 0.5px solid ${R.white};
|
|
3083
|
-
color: ${R.softWhite};
|
|
3084
|
-
transition:
|
|
3085
|
-
background 0.15s ease,
|
|
3086
|
-
color 0.15s ease;
|
|
3087
|
-
}
|
|
3088
|
-
&&:hover:not(:disabled),
|
|
3089
|
-
&&:active:not(:disabled) {
|
|
3090
|
-
background: ${R.softWhite};
|
|
3091
|
-
color: ${R.text};
|
|
3092
|
-
}
|
|
3093
|
-
&&:disabled {
|
|
3094
|
-
opacity: 0.3;
|
|
3095
|
-
}
|
|
3096
|
-
`,Na=g.span`
|
|
3097
|
-
display: none;
|
|
3098
|
-
align-items: center;
|
|
3099
|
-
gap: 6px;
|
|
3100
|
-
|
|
3101
|
-
${De.maxWidth("lg")} {
|
|
3102
|
-
[data-dual] & {
|
|
3103
|
-
display: inline-flex;
|
|
3104
|
-
}
|
|
3105
|
-
}
|
|
3106
|
-
`,Hs=g.button`
|
|
3107
|
-
width: 100%;
|
|
3108
|
-
height: 48px;
|
|
3109
|
-
display: flex;
|
|
3110
|
-
align-items: center;
|
|
3111
|
-
justify-content: center;
|
|
3112
|
-
gap: 8px;
|
|
3113
|
-
/* Dark-theme test: translucent white pill, white label (Figma 867:61064) — same secondary
|
|
3114
|
-
treatment as the card's ADD TO CART. */
|
|
3115
|
-
background: rgba(255, 255, 255, 0.2);
|
|
3116
|
-
color: ${R.softWhite};
|
|
3117
|
-
border: 0;
|
|
3118
|
-
border-radius: 16px;
|
|
3119
|
-
font-weight: 600;
|
|
3120
|
-
font-size: 15px;
|
|
3121
|
-
text-transform: uppercase;
|
|
3122
|
-
letter-spacing: 0.46px;
|
|
3123
|
-
cursor: pointer;
|
|
3124
|
-
transition: background 0.15s ease;
|
|
3125
|
-
|
|
3126
|
-
&:hover:not(:disabled) {
|
|
3127
|
-
background: ${R.softWhite};
|
|
3128
|
-
color: ${R.text2};
|
|
3129
|
-
}
|
|
3130
|
-
&:disabled {
|
|
3131
|
-
background: rgba(255, 255, 255, 0.12);
|
|
3132
|
-
color: rgba(252, 252, 252, 0.7);
|
|
3133
|
-
cursor: default;
|
|
3134
|
-
}
|
|
3135
|
-
|
|
3136
|
-
${De.maxWidth("lg")} {
|
|
3137
|
-
[data-dual] & {
|
|
3138
|
-
flex: 0 0 auto;
|
|
3139
|
-
width: 56px;
|
|
3140
|
-
padding: 0;
|
|
3141
|
-
}
|
|
3142
|
-
[data-dual] & .ico {
|
|
3143
|
-
margin: 0;
|
|
3144
|
-
}
|
|
3145
|
-
}
|
|
3146
|
-
`,zs=g.span`
|
|
3147
|
-
${De.maxWidth("lg")} {
|
|
3148
|
-
[data-dual] & {
|
|
3149
|
-
display: none;
|
|
3150
|
-
}
|
|
3151
|
-
}
|
|
3152
|
-
`,Dw=g.p`
|
|
3153
|
-
margin: 12px 0 0;
|
|
3154
|
-
font-size: 13px;
|
|
3155
|
-
color: ${R.gray4};
|
|
3156
|
-
|
|
3157
|
-
& a {
|
|
3158
|
-
color: ${R.softWhite};
|
|
3159
|
-
font-weight: 600;
|
|
3160
|
-
}
|
|
3161
|
-
`,Cw=g.p`
|
|
3162
|
-
margin: 4px 0 0;
|
|
3163
|
-
font-size: 13px;
|
|
3164
|
-
color: ${R.gray4};
|
|
3165
|
-
|
|
3166
|
-
& a {
|
|
3167
|
-
color: ${R.accent};
|
|
3168
|
-
font-weight: 600;
|
|
3169
|
-
}
|
|
3170
|
-
`,Sw=g.div`
|
|
3171
|
-
max-width: 1721px;
|
|
3172
|
-
margin: 0 auto;
|
|
3173
|
-
min-height: 46vh;
|
|
3174
|
-
display: flex;
|
|
3175
|
-
flex-direction: column;
|
|
3176
|
-
align-items: center;
|
|
3177
|
-
justify-content: center;
|
|
3178
|
-
text-align: center;
|
|
3179
|
-
gap: 14px;
|
|
3180
|
-
color: ${R.softWhite};
|
|
3181
|
-
`,Mw=g.p`
|
|
3182
|
-
margin: 0;
|
|
3183
|
-
color: ${R.gray4};
|
|
3184
|
-
`,_w=g(Jn)`
|
|
3185
|
-
margin-top: 6px;
|
|
3186
|
-
`,jw=g(X)`
|
|
3187
|
-
opacity: 0.4;
|
|
3188
|
-
`,Iw=g.h1`
|
|
3189
|
-
font-size: 22px;
|
|
3190
|
-
`,Pw=g.div`
|
|
3191
|
-
display: flex;
|
|
3192
|
-
flex-direction: column;
|
|
3193
|
-
`,qs=g.span`
|
|
3194
|
-
display: block;
|
|
3195
|
-
height: 15px;
|
|
3196
|
-
width: 84px;
|
|
3197
|
-
border-radius: 4px;
|
|
3198
|
-
`,Ew=g.div`
|
|
3199
|
-
display: flex;
|
|
3200
|
-
flex-direction: column;
|
|
3201
|
-
align-self: stretch;
|
|
3202
|
-
gap: 16px;
|
|
3203
|
-
padding: 8px 0;
|
|
3204
|
-
`,Tw=g.span`
|
|
3205
|
-
display: inline-flex;
|
|
3206
|
-
align-items: center;
|
|
3207
|
-
height: 48px;
|
|
3208
|
-
gap: 10px;
|
|
3209
|
-
background: none !important;
|
|
3210
|
-
|
|
3211
|
-
&::before,
|
|
3212
|
-
&::after {
|
|
3213
|
-
content: '';
|
|
3214
|
-
display: block;
|
|
3215
|
-
}
|
|
3216
|
-
&::before {
|
|
3217
|
-
width: 40px;
|
|
3218
|
-
height: 40px;
|
|
3219
|
-
border-radius: 50%;
|
|
3220
|
-
background: ${R.media};
|
|
3221
|
-
}
|
|
3222
|
-
&::after {
|
|
3223
|
-
width: 96px;
|
|
3224
|
-
height: 14px;
|
|
3225
|
-
border-radius: 6px;
|
|
3226
|
-
background: ${R.media};
|
|
3227
|
-
}
|
|
3228
|
-
`,$w=g.span`
|
|
3229
|
-
height: 34px;
|
|
3230
|
-
width: 70%;
|
|
3231
|
-
margin: 3px 0;
|
|
3232
|
-
border-radius: 8px;
|
|
3233
|
-
`,Nw=g.div`
|
|
3234
|
-
display: flex;
|
|
3235
|
-
gap: 8px;
|
|
3236
|
-
/* Same as Chips above, so the row does not move when the real chips arrive. */
|
|
3237
|
-
margin-top: 12px;
|
|
3238
|
-
`,Oa=g.span`
|
|
3239
|
-
height: 24px;
|
|
3240
|
-
width: 88px;
|
|
3241
|
-
border-radius: 6px;
|
|
3242
|
-
`,Ra=g.span`
|
|
3243
|
-
height: 14px;
|
|
3244
|
-
width: 100%;
|
|
3245
|
-
border-radius: 6px;
|
|
3246
|
-
|
|
3247
|
-
&[data-short] {
|
|
3248
|
-
width: 55%;
|
|
3249
|
-
}
|
|
3250
|
-
`,Ow=g.span`
|
|
3251
|
-
display: block;
|
|
3252
|
-
height: 30px;
|
|
3253
|
-
width: 40%;
|
|
3254
|
-
margin: 16px 0 13px;
|
|
3255
|
-
border-radius: 8px;
|
|
3256
|
-
`,Rw=g.span`
|
|
3257
|
-
display: block;
|
|
3258
|
-
height: 42px;
|
|
3259
|
-
width: 100%;
|
|
3260
|
-
border-radius: 8px;
|
|
3261
|
-
margin-top: 20px;
|
|
3262
|
-
`,Wn=g(Ne)`
|
|
3263
|
-
width: 30px;
|
|
3264
|
-
height: 30px;
|
|
3265
|
-
color: ${R.softWhite};
|
|
3266
|
-
|
|
3267
|
-
&[data-was] {
|
|
3268
|
-
width: 20px;
|
|
3269
|
-
height: 20px;
|
|
3270
|
-
color: ${R.gray4};
|
|
3271
|
-
}
|
|
3272
|
-
`,Aa=g(Ne)`
|
|
3273
|
-
width: 20px;
|
|
3274
|
-
height: 20px;
|
|
3275
|
-
`,Aw=g.div`
|
|
3276
|
-
display: flex;
|
|
3277
|
-
align-items: center;
|
|
3278
|
-
justify-content: space-between;
|
|
3279
|
-
gap: 8px;
|
|
3280
|
-
padding: 8px;
|
|
3281
|
-
margin: 16px 0;
|
|
3282
|
-
border-radius: ${Pn.btn};
|
|
3283
|
-
background: rgba(22, 21, 24, 0.55);
|
|
3284
|
-
`,Lw=g.span`
|
|
3285
|
-
display: flex;
|
|
3286
|
-
align-items: center;
|
|
3287
|
-
gap: 8px;
|
|
3288
|
-
font-size: 14px;
|
|
3289
|
-
line-height: 14px;
|
|
3290
|
-
color: ${R.softWhite};
|
|
3291
|
-
`,Fw=g(X)`
|
|
3292
|
-
width: 20px;
|
|
3293
|
-
height: 20px;
|
|
3294
|
-
color: ${R.softWhite};
|
|
3295
|
-
`,Yw=g(X)`
|
|
3296
|
-
width: 24px;
|
|
3297
|
-
height: 24px;
|
|
3298
|
-
color: ${R.white};
|
|
3299
|
-
`,Ww=g.div`
|
|
3300
|
-
display: flex;
|
|
3301
|
-
align-items: center;
|
|
3302
|
-
justify-content: space-between;
|
|
3303
|
-
gap: 8px;
|
|
3304
|
-
width: 100%;
|
|
3305
|
-
margin-top: 16px;
|
|
3306
|
-
|
|
3307
|
-
&[data-centered] {
|
|
3308
|
-
justify-content: center;
|
|
3309
|
-
}
|
|
3310
|
-
`,Bw=g.span`
|
|
3311
|
-
display: flex;
|
|
3312
|
-
align-items: center;
|
|
3313
|
-
gap: 2px;
|
|
3314
|
-
font-size: 14px;
|
|
3315
|
-
font-weight: 600;
|
|
3316
|
-
color: ${R.gray4};
|
|
3317
|
-
|
|
3318
|
-
& .ico {
|
|
3319
|
-
width: 20px;
|
|
3320
|
-
height: 20px;
|
|
3321
|
-
color: ${R.gray4};
|
|
3322
|
-
}
|
|
3323
|
-
`,Hw=g.span`
|
|
3324
|
-
font-size: 16px;
|
|
3325
|
-
font-weight: 700;
|
|
3326
|
-
padding-left: 2px;
|
|
3327
|
-
`,Ks=g.button`
|
|
3328
|
-
border: 0;
|
|
3329
|
-
background: none;
|
|
3330
|
-
padding: 0;
|
|
3331
|
-
cursor: pointer;
|
|
3332
|
-
font-family: ${Uv.sans};
|
|
3333
|
-
font-size: 13px;
|
|
3334
|
-
font-weight: 600;
|
|
3335
|
-
letter-spacing: 0.46px;
|
|
3336
|
-
text-transform: uppercase;
|
|
3337
|
-
text-decoration: underline;
|
|
3338
|
-
color: ${R.softWhite};
|
|
3339
|
-
|
|
3340
|
-
&:hover {
|
|
3341
|
-
color: ${R.gray4};
|
|
3342
|
-
}
|
|
3343
|
-
&:focus-visible {
|
|
3344
|
-
outline: 2px solid ${R.white};
|
|
3345
|
-
outline-offset: 2px;
|
|
3346
|
-
border-radius: ${Pn.chip};
|
|
3347
|
-
}
|
|
3348
|
-
`,zw=g.div`
|
|
3349
|
-
display: flex;
|
|
3350
|
-
flex-direction: column;
|
|
3351
|
-
gap: 16px;
|
|
3352
|
-
width: 100%;
|
|
3353
|
-
padding: 16px 0;
|
|
3354
|
-
`,Qs=g.div`
|
|
3355
|
-
display: flex;
|
|
3356
|
-
align-items: center;
|
|
3357
|
-
justify-content: space-between;
|
|
3358
|
-
gap: 8px;
|
|
3359
|
-
width: 100%;
|
|
3360
|
-
|
|
3361
|
-
&[data-variant='original'] {
|
|
3362
|
-
color: ${R.muted2};
|
|
3363
|
-
}
|
|
3364
|
-
`,Us=g.span`
|
|
3365
|
-
display: flex;
|
|
3366
|
-
align-items: center;
|
|
3367
|
-
gap: 4px;
|
|
3368
|
-
font-size: 14px;
|
|
3369
|
-
font-weight: 600;
|
|
3370
|
-
|
|
3371
|
-
[data-variant='original'] & {
|
|
3372
|
-
color: ${R.muted2};
|
|
3373
|
-
}
|
|
3374
|
-
[data-variant='resale'] & {
|
|
3375
|
-
color: ${R.text};
|
|
3376
|
-
}
|
|
3377
|
-
`,Vs=g.span`
|
|
3378
|
-
display: flex;
|
|
3379
|
-
align-items: center;
|
|
3380
|
-
gap: 2px;
|
|
3381
|
-
padding: 0 2px;
|
|
3382
|
-
|
|
3383
|
-
[data-variant='original'] & .ico {
|
|
3384
|
-
width: 20px;
|
|
3385
|
-
height: 20px;
|
|
3386
|
-
color: ${R.muted2};
|
|
3387
|
-
}
|
|
3388
|
-
[data-variant='resale'] & .ico {
|
|
3389
|
-
width: 24px;
|
|
3390
|
-
height: 24px;
|
|
3391
|
-
color: ${R.rarity};
|
|
3392
|
-
}
|
|
3393
|
-
`,Gs=g.span`
|
|
3394
|
-
[data-variant='original'] & {
|
|
3395
|
-
font-size: 16px;
|
|
3396
|
-
font-weight: 700;
|
|
3397
|
-
text-decoration: line-through;
|
|
3398
|
-
}
|
|
3399
|
-
[data-variant='resale'] & {
|
|
3400
|
-
font-size: 25px;
|
|
3401
|
-
font-weight: 700;
|
|
3402
|
-
color: ${R.text};
|
|
3403
|
-
}
|
|
3404
|
-
`,qw=g.span`
|
|
3405
|
-
font-size: 14px;
|
|
3406
|
-
font-weight: 600;
|
|
3407
|
-
|
|
3408
|
-
[data-variant='original'] & {
|
|
3409
|
-
color: ${R.muted2};
|
|
3410
|
-
}
|
|
3411
|
-
`,Kw=g.span`
|
|
3412
|
-
font-size: 14px;
|
|
3413
|
-
font-weight: 600;
|
|
3414
|
-
color: ${R.text2};
|
|
3415
|
-
`,Xs=g.span`
|
|
3416
|
-
display: inline-flex;
|
|
3417
|
-
width: 12px;
|
|
3418
|
-
height: 12px;
|
|
3419
|
-
color: ${R.muted2};
|
|
3420
|
-
`,Qw=g.div`
|
|
3421
|
-
display: flex;
|
|
3422
|
-
flex-direction: column;
|
|
3423
|
-
gap: 12px;
|
|
3424
|
-
width: 100%;
|
|
3425
|
-
`,Uw=g.div`
|
|
3426
|
-
display: flex;
|
|
3427
|
-
justify-content: center;
|
|
3428
|
-
`,aa=jn`
|
|
3429
|
-
display: block;
|
|
3430
|
-
background: linear-gradient(100deg, #efeef2 30%, #e2e0e7 50%, #efeef2 70%);
|
|
3431
|
-
background-size: 200% 100%;
|
|
3432
|
-
animation: shimmer 1.4s infinite linear;
|
|
3433
|
-
|
|
3434
|
-
@media (prefers-reduced-motion: reduce) {
|
|
3435
|
-
animation: none;
|
|
3436
|
-
}
|
|
3437
|
-
`,Vw=g.div`
|
|
3438
|
-
display: flex;
|
|
3439
|
-
flex-direction: column;
|
|
3440
|
-
gap: 12px;
|
|
3441
|
-
width: 100%;
|
|
3442
|
-
/* Reserve the divider→CTA rhythm so the block is the same height loading vs loaded. */
|
|
3443
|
-
padding-top: 4px;
|
|
3444
|
-
`,Gw=g.span`
|
|
3445
|
-
${aa};
|
|
3446
|
-
width: 120px;
|
|
3447
|
-
height: 30px;
|
|
3448
|
-
border-radius: ${Pn.btn};
|
|
3449
|
-
margin-bottom: 4px;
|
|
3450
|
-
`,Js=g.span`
|
|
3451
|
-
${aa};
|
|
3452
|
-
width: 100%;
|
|
3453
|
-
height: 48px;
|
|
3454
|
-
border-radius: 16px;
|
|
3455
|
-
`,Zs=g.div`
|
|
3456
|
-
display: flex;
|
|
3457
|
-
align-items: center;
|
|
3458
|
-
gap: 12px;
|
|
3459
|
-
`,ec=g.span`
|
|
3460
|
-
${aa};
|
|
3461
|
-
flex: none;
|
|
3462
|
-
width: 48px;
|
|
3463
|
-
height: 48px;
|
|
3464
|
-
border-radius: 50%;
|
|
3465
|
-
`,tc=g.span`
|
|
3466
|
-
${aa};
|
|
3467
|
-
width: 96px;
|
|
3468
|
-
height: 16px;
|
|
3469
|
-
border-radius: 6px;
|
|
3470
|
-
`,La=g.div`
|
|
3471
|
-
display: flex;
|
|
3472
|
-
flex-direction: column;
|
|
3473
|
-
gap: 8px;
|
|
3474
|
-
padding: 12px 14px;
|
|
3475
|
-
border: 1px solid ${R.line};
|
|
3476
|
-
border-radius: 12px;
|
|
3477
|
-
background: ${R.media};
|
|
3478
|
-
|
|
3479
|
-
p {
|
|
3480
|
-
margin: 0;
|
|
3481
|
-
font-size: 13px;
|
|
3482
|
-
line-height: 1.5;
|
|
3483
|
-
color: ${R.text2};
|
|
3484
|
-
}
|
|
3485
|
-
`,Xw=g.div`
|
|
3486
|
-
display: flex;
|
|
3487
|
-
align-items: center;
|
|
3488
|
-
gap: 16px;
|
|
3489
|
-
`;function Jw(n){return Object.values(rt.Rarity).includes(n)}function Zw(n){return n==="male"?m("itemDetail.genderMale"):n==="female"?m("itemDetail.genderFemale"):n==="unisex"?m("itemDetail.genderUnisex"):null}function Dr(n){return n.wearableCategory?n.wearableCategory.replace(/_/g," "):n.category==="emote"?m("itemDetail.categoryEmote"):m("itemDetail.categoryWearable")}function _0(){var Ao;const{contractAddress:n,itemId:a,tokenId:t}=Hl(),e=!!t,r=a??Ef(t)??null,o=zl(),i=o.state,c=an(),l=!!(i!=null&&i.market),p=(i==null?void 0:i.marketPriceCredits)??null,d=on(),h=Qn(I=>I.add),x=Qn(I=>I.items),y=Pd(I=>I.toggle),{session:b,signIn:w}=Jt(),k=ra(b),[f,S]=v.useState(()=>{if(i!=null&&i.item){const I={...i.item,tradeId:i.tradeId??i.item.tradeId};return e?{...I,tokenId:t,itemId:I.itemId??r}:{...I,tokenId:void 0,itemId:a??I.itemId}}return{id:`${n}-${t??a}`,name:"",creator:"",contractAddress:n??"",itemId:r,category:"wearable",rarity:"common",network:"MATIC",chainId:Xt.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 I=f.priceCredits>0?f.priceCredits:null;de("Shop Started Checkout",{checkout_source:"item_page",cart_size:1,cart_value_credits:I,cart_value_usd:I===null?null:Wd(I)}),T(!0)}function D(){if(b){C();return}l||Qu({type:"item-buy",path:o.pathname}),w()}const j=v.useRef(!1);v.useEffect(()=>{if(!b||j.current)return;const I=qu("item-buy");!I||I.path!==o.pathname||(j.current=!0,O(!0),C())},[b]);const{items:L,isCollectionOnly:q,siblings:A,siblingsFetched:Q}=Qb({id:f.id,contractAddress:f.contractAddress,itemId:f.itemId??r,tokenId:f.tokenId,creator:f.creator}),{data:B,isLoading:K}=me({queryKey:["shop-item",f.contractAddress,r],enabled:!l&&!e&&!!f.contractAddress&&!!r,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Bd(f.contractAddress,r)});v.useEffect(()=>{B&&S(I=>I.tradeId?{...I,tradeId:B.tradeId,priceCredits:B.priceCredits,manaWei:B.manaWei,available:B.available??I.available,acquisition:B.acquisition,wearableCategory:I.wearableCategory??B.wearableCategory}:{...I,...B})},[B]);const[P,H]=v.useState(!1),{data:M=""}=me({queryKey:["item-desc",f.contractAddress,f.itemId],enabled:!!f.contractAddress&&!!f.itemId,staleTime:5*6e4,queryFn:()=>Hd(f.contractAddress,f.itemId)}),{data:U,isLoading:z}=me({queryKey:["collection-meta",f.contractAddress],enabled:!!f.contractAddress,staleTime:5*6e4,queryFn:()=>sc(f.contractAddress)});v.useEffect(()=>{const I=(B==null?void 0:B.creator)||(U==null?void 0:U.creator);I&&S(Re=>Re.creator?Re:{...Re,creator:I})},[B,U]);const J=v.useMemo(()=>{if(!(e||f.name||B||A.length===0))return(r?A.find(I=>I.itemId===r):void 0)??A.find(I=>I.contractAddress===f.contractAddress)},[e,f.name,f.contractAddress,B,A,r]);v.useEffect(()=>{J&&S(I=>({...J,tradeId:I.tradeId??J.tradeId}))},[J]);const{data:pe,isLoading:ye}=me({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 I=await Bo(f.contractAddress,f.itemId);return(I==null?void 0:I.id)??null}return null}}),{data:we}=me({queryKey:["item-traits",f.contractAddress,r],enabled:!!f.contractAddress&&!!r,staleTime:5*6e4,retry:1,queryFn:()=>zd(f.contractAddress,r)}),Nt=(we==null?void 0:we.isSmart)??f.isSmart,je=(we==null?void 0:we.utility)??null,Ot=(we==null?void 0:we.urn)??null,{data:Rt}=me({queryKey:["item-vrm",Ot],enabled:!!Ot&&f.category==="wearable",staleTime:30*6e4,retry:!1,queryFn:()=>qd(Ot)}),[En,nr]=v.useState(!1),{data:cn}=me({queryKey:["item-video",f.contractAddress,r],enabled:Nt&&!!f.contractAddress&&!!r,staleTime:30*6e4,retry:!1,queryFn:()=>rp(f.contractAddress,r)}),At=v.useMemo(()=>f.emoteLoop!==void 0?f:(r?A.find(Re=>Re.itemId===r):void 0)??f,[f,A,r]),Lt=oi(d,f.tradeId)??oi(d,pe),oa=f.acquisition==="store"&&(f.available??0)>0,be=!!Lt||oa,lt=Ed(),{data:Dt=[]}=me({queryKey:["item-resales",f.contractAddress,f.itemId],enabled:lt&&!l&&!!f.contractAddress&&!!f.itemId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>uc(f.contractAddress,f.itemId)}),dt=Dt.length>0?Dt[0].priceCredits:null,Ft=e&&f.tokenId?Dt.find(I=>I.tokenId===f.tokenId)??null:null,Fe=v.useMemo(()=>{const I=Dt[0];return I?{...I,name:I.name||f.name,thumbnail:I.thumbnail||f.thumbnail,rarity:I.rarity||f.rarity,category:I.category||f.category,wearableCategory:I.wearableCategory??f.wearableCategory,gender:I.gender??f.gender}:null},[Dt,f]),[ln,rr]=v.useState(null),[ar,Tn]=v.useState(!1),Ct=f.manaWei??null,{data:ut}=dc(l||!!Ct),Ge=Ct&&ut?Td(Ct,ut):null;v.useEffect(()=>{Ge!=null&&S(I=>I.priceCredits===Ge?I:{...I,priceCredits:Ge})},[Ge,f.priceCredits]);const $n=v.useMemo(()=>{if(!l||!(i!=null&&i.item))return null;const I=i.item;return I.manaWei?{tradeId:I.tradeId??I.id,listingType:"primary",contractAddress:I.contractAddress,itemId:I.itemId??"",name:I.name,thumbnail:I.thumbnail,rarity:I.rarity,category:I.category,wearableCategory:I.wearableCategory??null,creator:I.creator,manaWei:I.manaWei,available:1,network:I.network,chainId:I.chainId,createdAt:0}:null},[l,i==null?void 0:i.item]),or=l&&p!=null&&!!ut&&!!$n,ir=$d({priceCredits:f.priceCredits,compareAtCredits:f.compareAtCredits,saleEndsAt:f.saleEndsAt}),N=v.useMemo(()=>({...f,tradeId:Lt,id:Lt??f.id}),[f,Lt]),V=x.some(I=>I.id===N.id),G=!N.tokenId,ne=((Ao=x.find(I=>I.id===N.id))==null?void 0:Ao.quantity)??0,ie=G&&typeof f.available=="number"&&ne>=f.available,{key:ve,faved:Z}=Nd(f),ke=v.useRef(null);v.useEffect(()=>{!f.name||ye||ke.current===f.id||(ke.current=f.id,de("Shop Viewed Item",{...Od(f),for_sale:be}),qv(f))},[f.id,f.name,ye,be]);const ze=`${n}/${t??a}`,St=v.useRef(ze);v.useEffect(()=>{if(St.current!==ze){if(St.current=ze,i!=null&&i.item){const I={...i.item,tradeId:i.tradeId??i.item.tradeId};S(e?{...I,tokenId:t,itemId:I.itemId??r}:{...I,tokenId:void 0,itemId:a??I.itemId})}typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}},[ze]);function dn(){!be||ia||ye||!G&&V||ie||h(N,"item_detail")}const sr=Jw(f.rarity)?f.rarity:rt.Rarity.COMMON,ho=Zw(f.gender),cr=Rd(f),mo=Ad(f.gender),go=Wv(f.rarity),xo=Bv(f),Dl=be&&ir,Cl=q?m("itemDetail.moreFromCollection"):m("itemDetail.youMightAlsoLike"),ia=Ld(f,b==null?void 0:b.address),[Sl,yo]=v.useState(!1),[Ml,bo]=v.useState(!1),[_l,vo]=v.useState(!1),[jl,wo]=v.useState(!1),[Nn,On]=v.useState(null),[Ye,lr]=v.useState(null),[Il,ko]=v.useState(null),[sa,ca]=v.useState(null),la=zr(b==null?void 0:b.providerType),[Pl,da]=v.useState(!1),{data:ee,isLoading:dr}=me({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?Kd(b.address,f.contractAddress,f.tokenId):null});v.useEffect(()=>{ee&&S(I=>I.name?{...I,issuedId:I.issuedId??ee.issuedId,priceCredits:ee.listingPrice??0,tradeId:ee.tradeId}:{id:ee.id,name:ee.name,creator:"",contractAddress:ee.contractAddress,itemId:ee.itemId,category:ee.category,rarity:ee.rarity??"common",network:ee.network,chainId:ee.chainId,thumbnail:ee.image,priceCredits:ee.listingPrice??0,gender:null,isSmart:!1,tokenId:ee.tokenId,issuedId:ee.issuedId,tradeId:ee.tradeId})},[ee]),v.useEffect(()=>{Ft&&S(I=>I.priceCredits===Ft.priceCredits&&I.tradeId?I:{...I,priceCredits:Ft.priceCredits,tradeId:I.tradeId??Ft.tradeId})},[Ft]),v.useEffect(()=>{Nn!=null&&ee!=null&&ee.isOnSale&&ee.listingPrice===Nn&&On(null)},[ee,Nn]);const Do=!l&&!!f.contractAddress&&!!f.tokenId&&!f.name&&!B&&!dr&&!ee,{data:Se,isFetched:El}=me({queryKey:["public-token",f.contractAddress,f.tokenId],enabled:Do,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Qd(f.contractAddress,f.tokenId)});v.useEffect(()=>{Se&&S(I=>I.name?I.issuedId?I:{...I,issuedId:Se.issuedId}:{id:Se.id,name:Se.name,creator:"",contractAddress:Se.contractAddress,itemId:Se.itemId,category:Se.category,rarity:Se.rarity??"common",network:Se.network,chainId:Se.chainId,thumbnail:Se.image,priceCredits:Se.listingPrice??0,gender:null,isSmart:!1,tokenId:Se.tokenId,issuedId:Se.issuedId,tradeId:Se.tradeId})},[Se]);const{data:Xe}=me({queryKey:["publishable-item",f.contractAddress,f.itemId,b==null?void 0:b.address],enabled:ia&&!!b&&!!f.itemId,queryFn:async()=>b?(await ap(b.address,b.identity)).find(Re=>Re.contractAddress.toLowerCase()===f.contractAddress.toLowerCase()&&Re.blockchainItemId===f.itemId)??null:null}),pt=e&&!!ee,ua=!e&&ia,Je=!l&&(ua||pt),Co=Nn!=null?!0:pt?!!(ee!=null&&ee.isOnSale):be,un=pt?ee==null?void 0:ee.tradeId:Lt,So=pt?!!ee:!!Xe,Mo=ua||pt&<,_o=Nn??(pt?(ee==null?void 0:ee.listingPrice)??0:0),{data:jo=0}=me({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?Ud(b.address,f.contractAddress,a):0});async function Yt(){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 pa(I={}){const Re=I.own!==!1;if(!b||!un)return!1;ko(null),ca(null),da(!1),Re&&lr("remove");try{const Wt=await lc(un);return await tp({trade:Wt,signer:b.signer,mode:I.payGas?"direct":"gasless-only",watch:{isCancelled:async()=>{if(!f.itemId)return!1;const Ae=await Bo(f.contractAddress,f.itemId).catch(()=>{});return Ae!==void 0&&(Ae==null?void 0:Ae.id)!==un},onWaiting:Ae=>da(Ae>2e4)}}),I.silent||Xn.success(m("myAssets.removedFromSale",{name:f.name})),On(null),Tf(d,un),S(Ae=>Ae.tradeId===un?{...Ae,tradeId:void 0}:Ae),Yt(),ya(d,{address:b.address,contractAddress:f.contractAddress,tokenId:f.tokenId},{kind:"removed"}),!0}catch(Wt){const Ae=kn(Wt);return Ae||Me(Wt,{flow:"remove-listing",tradeId:un}),Wt instanceof np?(ca(Wt.definitive?"reverted":"pending"),!1):(ko(Ae?m("getCredits.errorCanceled"):Zt(Wt,m("myAssets.removeListingError"))),!1)}finally{Re&&lr(null),da(!1)}}function Io({relist:I=!1}={}){I||de("Shop Started Listing",{listing_type:pt?"secondary":"primary",item_id:f.itemId??f.tokenId??null}),pt?yo(!0):bo(!0)}async function Tl(){lr("update");try{await pa({silent:!0,own:!1})&&Io({relist:!0})}finally{lr(null)}}function Po(){yo(!1),bo(!1),Yt()}const Eo=be?ye?m("itemDetail.checking"):ie?m("itemDetail.maxInCart"):!G&&V?m("assetCard.inCart"):m("assetCard.addToCart"):m("itemDetail.notForSale"),$l=typeof f.available=="number"&&f.available>0&&!f.tokenId&&!l,To=!l&&!f.tokenId&&f.available===0,pn=To&&!Je&&!!Fe,ur=!!Fe&&x.some(I=>I.id===Fe.id),Nl=!Je&&be&&!l,Ol=l||!Je&&(be||pn&&!!Fe||fl()),Rl=!f.name&&(!!B||!!ee||!!Se||!!J),$o=K||!!f.contractAddress&&!Q||!f.name&&dr||Rl||Do&&!El,No=!f.name&&!$o,Al=!!f.name&&$f({isMarket:l,forSale:be,priceKnown:f.priceCredits>0&&(!Ct||Ge!=null)||Je,stillResolving:$o||!!Ct&&Ge==null,manage:Je,soldOutWithResale:pn,resolvingTrade:ye,isTokenRoute:e,ownedAssetLoading:dr,deepLinkLoading:K}),Oo=!f.creator&&(K||z||dr),Ro=!(U!=null&&U.name)&&z,Ll=/^https?:\/\//i.test(f.thumbnail);return Fd(No?{title:m("seo.item.notFoundTitle"),noindex:!0}:f.name?{title:f.name,description:M||m("seo.item.fallbackDescription",{name:f.name,rarity:f.rarity,category:Dr(f),creator:Ga(f.creator)}),image:Ll?f.thumbnail:void 0,type:"product"}:{}),No?s.jsxs(Sw,{"data-notfound":!0,children:[s.jsx(jw,{name:"cart"}),s.jsx(Iw,{children:m("itemDetail.notAvailableTitle")}),s.jsx(Mw,{children:m("itemDetail.notAvailableBody")}),s.jsx(_w,{variant:"white",onClick:()=>c("/items"),children:m("notFound.cta")})]}):s.jsxs(Gv,{children:[s.jsxs(Xv,{"aria-label":m("itemDetail.breadcrumbAria"),children:[s.jsx(Jv,{onClick:()=>c("/items"),children:m("nav.collectibles")}),s.jsx(Zv,{children:"/"}),s.jsx(ew,{children:f.name||m("itemDetail.itemFallback")})]}),s.jsxs(tw,{children:[s.jsxs(nw,{"data-testid":"item-preview",children:[f.name?s.jsx(Zb,{item:f}):s.jsx(rw,{"aria-busy":"true","aria-label":m("itemPreview.loading"),children:s.jsx("span",{className:"skeleton","aria-hidden":!0})}),ve?s.jsx(Rs,{"data-fav-preview":!0,"data-on":Z||void 0,onClick:()=>y(f),"aria-pressed":Z,"aria-label":Z?m("assetCard.removeFromFavorites"):m("assetCard.addToFavorites"),children:s.jsx(X,{name:Z?"heart-solid":"heart",size:18})}):null,cn?s.jsxs(sw,{"data-play-showcase":!0,onClick:()=>nr(!0),"data-testid":"play-showcase",children:[s.jsx(X,{name:"play",size:18}),m("itemDetail.playShowcase")]}):null]}),s.jsx(aw,{"data-testid":"item-info",children:f.name?s.jsxs(s.Fragment,{children:[s.jsxs(ow,{children:[s.jsxs(iw,{children:[f.name,e&&f.issuedId?` #${f.issuedId}`:""]}),ve?s.jsx(Rs,{"data-fav-title":!0,"data-on":Z||void 0,onClick:()=>y(f),"aria-pressed":Z,"aria-label":Z?m("assetCard.removeFromFavorites"):m("assetCard.addToFavorites"),children:s.jsx(X,{name:Z?"heart-solid":"heart",size:18})}):null]}),s.jsxs(cw,{children:[go?s.jsx(Ea,{to:go,"data-variant":"rarity","data-testid":"detail-rarity-link",style:{background:Yo(sr)},title:m("itemDetail.browseByRarity",{rarity:f.rarity}),children:f.rarity}):s.jsx(Ze,{"data-variant":"rarity",style:{background:Yo(sr)},title:Yd(f.rarity),children:f.rarity}),xo?s.jsxs(Ea,{to:xo,"data-testid":"detail-category-link",title:m("itemDetail.browseByCategory",{category:Dr(f)}),children:[cr?s.jsx(X,{name:cr,size:18}):null,Dr(f)]}):s.jsxs(Ze,{children:[cr?s.jsx(X,{name:cr,size:18}):null,Dr(f)]}),ho?s.jsxs(Ze,{children:[mo?s.jsx(X,{name:mo,size:18}):null,ho]}):null,!e&&f.issuedId?s.jsxs(Ze,{"data-testid":"detail-issued",children:["#",f.issuedId]}):null,Nt?s.jsxs(Ea,{to:Hv(),"data-testid":"detail-smart",title:m("itemDetail.browseBySmart"),children:[s.jsx(X,{name:"smart",size:18}),m("itemDetail.smart")]}):null,At.emoteLoop!==void 0?s.jsxs(Ze,{"data-testid":"detail-play-mode",children:[s.jsx(X,{name:At.emoteLoop?"play-loop":"play-once",size:18}),At.emoteLoop?m("itemDetail.playLoop"):m("itemDetail.playOnce")]}):null,At.emoteHasSound?s.jsxs(Ze,{"data-testid":"detail-sound",children:[s.jsx(X,{name:"sound",size:18}),m("itemDetail.emoteSound")]}):null,At.emoteHasProps?s.jsxs(Ze,{"data-testid":"detail-props",children:[s.jsx(X,{name:"props",size:18}),m("itemDetail.emoteProps")]}):null,Rt?s.jsx(Go,{content:m("itemDetail.exportBlockedTooltip"),children:s.jsxs(Ze,{"data-variant":"blocked","data-testid":"detail-export-blocked",tabIndex:0,"aria-label":m("itemDetail.exportBlockedTooltip"),children:[s.jsx(X,{name:"ban",size:16}),m("itemDetail.exportBlocked")]})}):null,je?s.jsxs(Ze,{"data-testid":"detail-utility-chip",children:[s.jsx(X,{name:"utility",size:18}),m("itemDetail.utility")]}):null]}),M||je?s.jsxs(bl,{children:[M?s.jsx(Va,{children:s.jsxs(Ua,{children:[s.jsx(gn,{children:m("itemDetail.description")}),s.jsx(As,{"data-expanded":P||void 0,children:M}),M.length>140?s.jsx(dw,{className:"link",onClick:()=>H(I=>!I),children:P?m("itemDetail.showLess"):m("itemDetail.readMore")}):null]})}):null,je?s.jsx(Va,{children:s.jsxs(Ua,{"data-testid":"detail-utility",children:[s.jsx(gn,{children:m("itemDetail.utility")}),s.jsx(As,{"data-expanded":!0,children:je})]})}):null]}):null,f.creator||U!=null&&U.name||Oo||Ro?s.jsxs(vl,{children:[f.creator?s.jsxs(zn,{children:[s.jsx(gn,{children:m("itemDetail.creator")}),s.jsx(uw,{address:f.creator,linkToProfile:!0,hidePrefix:!0})]}):Oo?s.jsxs(zn,{children:[s.jsx(gn,{children:m("itemDetail.creator")}),s.jsxs(Zs,{"aria-hidden":!0,"data-testid":"creator-loading",children:[s.jsx(ec,{}),s.jsx(tc,{})]})]}):null,U!=null&&U.name?s.jsxs(zn,{"data-collection":!0,children:[s.jsx(gn,{children:m("itemDetail.collection")}),s.jsx(pw,{contractAddress:f.contractAddress,name:U.name,items:A})]}):Ro?s.jsxs(zn,{"data-collection":!0,children:[s.jsx(gn,{children:m("itemDetail.collection")}),s.jsxs(Zs,{"aria-hidden":!0,"data-testid":"collection-loading",children:[s.jsx(ec,{}),s.jsx(tc,{})]})]}):null]}):null,s.jsx(kl,{}),Al?s.jsxs(Vw,{"aria-hidden":!0,"data-testid":"sale-loading",children:[s.jsx(Gw,{}),s.jsx(Js,{}),s.jsx(Js,{})]}):s.jsxs(s.Fragment,{children:[lt&&!Je&&!l&&be&&!f.tokenId?s.jsxs(Aw,{"data-testid":"buy-from-creator",children:[s.jsxs(Lw,{children:[s.jsx(Fw,{name:"buy-from-creator"}),m("itemDetail.buyFromCreator")]}),s.jsx(Yw,{name:"check-rounded"})]}):null,pn?s.jsxs(zw,{"data-testid":"sold-out",children:[s.jsxs(Qs,{"data-variant":"original",children:[s.jsxs(Us,{children:[m("itemDetail.originalPrice"),s.jsxs(Vs,{children:[s.jsx(Ne,{className:"ico"}),s.jsx(Gs,{children:s.jsx(Ee,{credits:f.priceCredits})})]}),s.jsx(Xs,{"aria-hidden":!0,children:s.jsx(X,{name:"info",size:12})})]}),s.jsx(qw,{"data-testid":"out-of-stock",children:m("itemDetail.soldOut")})]}),s.jsxs(Qs,{"data-variant":"resale",children:[s.jsxs(Us,{children:[m("itemDetail.resalePrice"),s.jsxs(Vs,{children:[s.jsx(Ne,{className:"ico"}),s.jsx(Gs,{children:s.jsx(Ee,{credits:dt})})]}),s.jsx(Xs,{"aria-hidden":!0,children:s.jsx(X,{name:"info",size:12})})]}),s.jsxs(Kw,{children:[m("itemDetail.stock")," ",Dt.length,"/",rt.Rarity.getMaxSupply(sr).toLocaleString()]})]})]}):s.jsx(fw,{children:s.jsxs(hw,{children:[s.jsxs(mw,{children:[l||be?s.jsx(Ys,{children:m("itemDetail.price")}):null,l?s.jsxs(s.Fragment,{children:[s.jsx(xn,{"data-variant":"market","data-testid":"item-price",children:p==null?s.jsx(Yn,{children:"—"}):s.jsxs(s.Fragment,{children:[s.jsx(xw,{"aria-hidden":!0,children:"≈"}),s.jsx(Wn,{}),s.jsx(Yn,{children:s.jsx(Ee,{credits:p})})]})}),s.jsx(yw,{children:m("assetCard.marketPrice")})]}):be?Dl?s.jsxs(xn,{"data-variant":"sale","data-testid":"item-price",children:[s.jsxs(xn,{children:[s.jsx(Wn,{}),s.jsx(Yn,{children:s.jsx(Ee,{credits:f.priceCredits})})]}),s.jsxs(bw,{children:[s.jsx(Wn,{"data-was":!0}),s.jsx(Ee,{credits:f.compareAtCredits})]}),Wo(f.compareAtCredits,f.priceCredits)>0?s.jsx(vw,{children:m("assetCard.saleWithDiscount",{pct:Wo(f.compareAtCredits,f.priceCredits)})}):null,s.jsx(ww,{endsAt:f.saleEndsAt})]}):s.jsxs(xn,{"data-testid":"item-price",children:[s.jsx(Wn,{}),s.jsx(Yn,{children:s.jsx(Ee,{credits:f.priceCredits})})]}):Co&&_o?s.jsxs(xn,{"data-testid":"item-price",children:[s.jsx(Wn,{}),s.jsx(Yn,{children:s.jsx(Ee,{credits:_o})})]}):Je?null:s.jsxs(xn,{"data-variant":"none","data-testid":"item-price",children:[s.jsx("span",{children:m("itemDetail.notForSale")}),s.jsx(Go,{content:m("itemDetail.notForSaleHint"),children:s.jsx(gw,{tabIndex:0,role:"img","aria-label":m("itemDetail.notForSaleHint"),children:s.jsx(X,{name:"info",size:14})})})]})]}),$l?s.jsxs(Ls,{children:[s.jsx(Ys,{children:m("itemDetail.stock")}),s.jsxs(Fs,{children:[(f.available??0).toLocaleString(),"/",rt.Rarity.getMaxSupply(sr).toLocaleString()]})]}):To?s.jsx(Ls,{children:s.jsx(Fs,{"data-out":!0,"data-testid":"out-of-stock",children:m("itemDetail.outOfStock")})}):null]})}),s.jsx(kw,{"data-buttons":Ol||void 0,"data-dual":Nl||void 0,children:l?s.jsxs(Ta,{variant:"purple",onClick:D,disabled:!or,children:[s.jsx("span",{children:m("assetCard.buyNow")}),p!=null?s.jsxs(Na,{"aria-hidden":!0,children:[s.jsx(Aa,{}),s.jsx(Ee,{credits:p})]}):null]}):Je?s.jsxs(Qw,{"data-testid":"manage-actions",children:[s.jsx(Et,{message:Il}),sa&&!la?s.jsx(La,{"data-testid":"cancel-gasless-failed",children:s.jsx("p",{children:m("itemDetail.cancelRelayRetry")})}):null,sa&&la?s.jsxs(La,{"data-testid":"cancel-gasless-failed",children:[s.jsx("p",{children:sa==="reverted"?m("itemDetail.cancelRelayReverted"):m("itemDetail.cancelRelayFailed")}),s.jsxs(Xw,{children:[s.jsx($a,{type:"button","data-testid":"cancel-pay-gas",onClick:()=>void pa({payGas:!0}),disabled:Ye!==null,children:m("itemDetail.cancelPayGas")}),s.jsx($a,{type:"button","data-testid":"cancel-later",onClick:()=>ca(null),disabled:Ye!==null,children:m("itemDetail.cancelLater")})]})]}):null,Ye==="remove"&&Pl?s.jsx(La,{"data-testid":"cancel-slow",children:s.jsx("p",{children:m(la?"itemDetail.cancelSlow":"itemDetail.cancelSlowManaged")})}):null,Co?s.jsxs(s.Fragment,{children:[Mo?s.jsxs(Ws,{onClick:()=>void Tl(),disabled:Ye!==null||!So,children:[Ye!=="update"?s.jsx(X,{name:"pen",className:"ico"}):null,s.jsx("span",{children:Ye==="update"?k?m("itemDetail.updateCanceling"):m("itemDetail.updateConfirmCancel"):m("itemDetail.manageUpdatePrice")})]}):null,s.jsx(Bs,{onClick:()=>void pa(),disabled:Ye!==null,children:s.jsx("span",{children:Ye==="remove"?m("myAssets.removing"):m("itemDetail.manageRemove")})})]}):s.jsxs(s.Fragment,{children:[Mo?s.jsx(Ws,{onClick:()=>Io(),disabled:Ye!==null||!So,children:s.jsx("span",{children:m("itemDetail.manageList")})}):null,pt?s.jsx(Bs,{onClick:()=>vo(!0),disabled:Ye!==null,children:s.jsx("span",{children:m("itemDetail.manageTransfer")})}):null]}),ua&&Xe?s.jsx($a,{type:"button","data-on-purple":!0,onClick:()=>wo(!0),disabled:Ye!==null,children:m("itemDetail.manageIssue")}):null,Ye==="update"?s.jsx(Cw,{children:m("itemDetail.updateHelper")}):null,dt!=null?s.jsx(Uw,{children:s.jsx(Ks,{onClick:()=>Tn(!0),"data-testid":"view-resellers",children:m("itemDetail.viewAllResellers")})}):null]}):be?s.jsxs(s.Fragment,{children:[s.jsxs(Ta,{variant:"purple",onClick:D,disabled:ye,children:[s.jsx("span",{children:m("assetCard.buyNow")}),s.jsxs(Na,{"aria-hidden":!0,children:[s.jsx(Aa,{}),s.jsx(Ee,{credits:f.priceCredits})]})]}),s.jsxs(Hs,{onClick:dn,disabled:ye||(G?ie:V),"aria-label":Eo,children:[s.jsx(X,{name:"cart"}),s.jsx(zs,{children:Eo})]})]}):pn&&Fe?s.jsxs(s.Fragment,{children:[s.jsxs(Ta,{variant:"purple",onClick:()=>b?rr(Fe):w(),children:[s.jsx("span",{children:m("assetCard.buyNow")}),s.jsxs(Na,{"aria-hidden":!0,children:[s.jsx(Aa,{}),s.jsx(Ee,{credits:Fe.priceCredits})]})]}),s.jsxs(Hs,{onClick:()=>{ur||h(Fe,"item_detail")},disabled:ur,"aria-label":ur?m("assetCard.inCart"):m("assetCard.addToCart"),children:[s.jsx(X,{name:"cart"}),s.jsx(zs,{children:ur?m("assetCard.inCart"):m("assetCard.addToCart")})]})]}):s.jsx(s.Fragment,{children:s.jsx(Fv,{item:f})})}),!Je&&!l&&dt!=null?s.jsxs(Ww,{"data-testid":"lowest-price","data-centered":pn||void 0,children:[pn?null:s.jsxs(Bw,{children:[m("itemDetail.lowestPrice"),s.jsx(Ne,{className:"ico"}),s.jsx(Hw,{children:s.jsx(Ee,{credits:dt})})]}),s.jsx(Ks,{onClick:()=>Tn(!0),"data-testid":"view-resellers",children:m("itemDetail.viewAllResellers")})]}):null,!Je&&!l&&jo>0?s.jsxs(Dw,{"data-testid":"you-own-note",children:[m("itemDetail.youOwnN",{count:jo})," ",s.jsx(rc,{to:"/my-items",children:m("nav.myAssets")})]}):null]})]}):s.jsx(e0,{})})]}),s.jsx(Ku,{title:Cl,items:L,onViewAll:q&&f.contractAddress?()=>c(`/collection/${f.contractAddress}`):void 0}),E&&l&&$n&&ut?s.jsx(ll,{listing:$n,rate:ut,onClose:()=>T(!1),onSold:()=>T(!1)}):E&&!l?s.jsx(Ba,{item:N,resume:$,onClose:()=>{T(!1),O(!1)}}):null,ln?s.jsx(Ba,{item:ln,onClose:()=>{rr(null),Yt()}}):null,lt&&ar&&f.itemId?s.jsx(jv,{item:f,onClose:()=>Tn(!1)}):null,Sl&&ee&&b?s.jsx(iy,{asset:ee,session:b,creator:f.creator,onListed:(I,Re)=>{On(I),Yt(),ya(d,{address:b.address,contractAddress:f.contractAddress,tokenId:f.tokenId},{kind:"listed",priceCredits:I,tradeId:Re})},onClose:Po}):null,_l&&b&&f.tokenId?s.jsx(Sy,{item:{contractAddress:f.contractAddress,chainId:f.chainId,tokenId:f.tokenId,name:f.name,thumbnail:f.thumbnail},session:b,onClose:()=>{vo(!1),Yt()},onTransferred:()=>{On(null),Yt(),ya(d,{address:b.address,contractAddress:f.contractAddress,tokenId:f.tokenId},{kind:"gone"})}}):null,Ml&&Xe&&b?s.jsx(Qy,{item:Xe,session:b,onListed:I=>On(I),onClose:Po}):null,jl&&Xe&&b?s.jsx(wb,{item:{contractAddress:Xe.contractAddress,chainId:Xt.chainId,itemId:Xe.blockchainItemId,name:Xe.name,thumbnail:Xe.thumbnail,available:Xe.remainingSupply},session:b,onClose:()=>{wo(!1),Yt()}}):null,En&&cn?s.jsx(jb,{src:cn,itemName:f.name,onClose:()=>nr(!1)}):null]})}function e0(){return s.jsxs(Pw,{"aria-hidden":!0,children:[s.jsx($w,{className:"skeleton"}),s.jsxs(Nw,{children:[s.jsx(Oa,{className:"skeleton"}),s.jsx(Oa,{className:"skeleton"}),s.jsx(Oa,{className:"skeleton"})]}),s.jsx(bl,{children:[0,1].map(n=>s.jsx(Va,{children:s.jsxs(Ua,{children:[s.jsx(qs,{className:"skeleton"}),s.jsxs(Ew,{children:[s.jsx(Ra,{className:"skeleton"}),s.jsx(Ra,{className:"skeleton"}),s.jsx(Ra,{className:"skeleton","data-short":!0})]})]})},n))}),s.jsx(vl,{children:[0,1].map(n=>s.jsxs(zn,{...n===1?{"data-collection":!0}:{},children:[s.jsx(qs,{className:"skeleton"}),s.jsx(Tw,{})]},n))}),s.jsx(kl,{}),s.jsx(Ow,{className:"skeleton"}),s.jsx(Rw,{className:"skeleton"})]})}export{_0 as ItemDetail,_0 as default};
|
|
3490
|
-
//# sourceMappingURL=ItemDetail-Bm2RrQUD.js.map
|