@dcl/shop 1.13.1-35088015492.commit-25d8a11 → 1.13.1-35095058100.commit-8d694c8
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-Br7TotTg.js → Activity-CjNbjbB8.js} +8 -8
- package/_assets/{AnimatedBackground-mKUTCrsZ.js → AnimatedBackground-DsRNSmF9.js} +2 -2
- package/_assets/{Assets-Bh3kAxON.js → Assets--xiu2hf1.js} +12 -12
- package/_assets/{Authorizations-DPVFuAHg.js → Authorizations-CAq4bDIU.js} +3 -3
- package/_assets/Cart-Dn-yuO7W.js +748 -0
- package/_assets/{Collection-BIm7ajYT.js → Collection-DmkDiPC5.js} +10 -10
- package/_assets/{CollectionCarousel-Dgmy1mBv.js → CollectionCarousel-C2aZMUS6.js} +10 -10
- package/_assets/Confetti-CQ1miyT0.js +18 -0
- package/_assets/{ConstantsUtil-BIW9CVUv.js → ConstantsUtil-DxsGGeAI.js} +2 -2
- package/_assets/{ContentClient-CWLYPXGZ.js → ContentClient-DADL-eWJ.js} +2 -2
- package/_assets/{Creator-Bm286S4l.js → Creator-DZvSnP1W.js} +33 -33
- package/_assets/{DeploymentBuilder-lkKjiabA.js → DeploymentBuilder-DM4wrDOA.js} +3 -3
- package/_assets/{EmotePlaybackBar-CmOnYKyU.js → EmotePlaybackBar-DKUTpuQ1.js} +5 -5
- package/_assets/{ErrorNotice-Dqt3U2vl.js → ErrorNotice-Dhs1BLZ6.js} +2 -2
- package/_assets/{Event-CzoOohtw.js → Event-e3lOCI2G.js} +2 -2
- package/_assets/{ExchangeController-DLt1pr9X.js → ExchangeController-D1BhRLY_.js} +2 -2
- package/_assets/{Faq-C75vztz0.js → Faq-qe1pCR9P.js} +2 -2
- package/_assets/{GetCredits-C4r6Z9Ll.js → GetCredits-B96wMekN.js} +9 -9
- package/_assets/{Grow-C89nQ9vj.js → Grow-pyVWvnNE.js} +2 -2
- package/_assets/{HelpersUtil-BZx2xXkr.js → HelpersUtil-B-VhnmAV.js} +2 -2
- package/_assets/ItemDetail-EQYc-D1i.js +3779 -0
- package/_assets/LoadMore-3LNbX1EU.js +8 -0
- package/_assets/{ManaPricingBanner.styles-DIaSN-0J.js → ManaPricingBanner.styles-Xpaqvszn.js} +2 -2
- package/_assets/MyAssets-Cw8rL4Qm.js +1142 -0
- package/_assets/{MyFavorites-DyG3bnHZ.js → MyFavorites-C-H9WoDf.js} +10 -10
- package/_assets/{NetworkUtil-C2mA-_Ya.js → NetworkUtil-Cp-gtHa0.js} +2 -2
- package/_assets/NotFound-C_hegLMz.js +18 -0
- package/_assets/{NotificationsBell-Bg_tRjZT.js → NotificationsBell-DEOx8fEC.js} +13 -13
- package/_assets/{OutfitDetail-BILkjOT0.js → OutfitDetail-DccboofD.js} +7 -7
- package/_assets/OutfitPreview-BT1g84TM.js +7 -0
- package/_assets/{OutfitStudio-BVxXtmNl.js → OutfitStudio-DVNHreV-.js} +30 -30
- package/_assets/{PhArrowCircleDown-6iRUjaQT.js → PhArrowCircleDown-Bmy0XPqd.js} +5 -5
- package/_assets/{PhArrowClockwise-CIVwCL-l.js → PhArrowClockwise-Bklo7MBV.js} +3 -3
- package/_assets/{PhArrowDown-D3Qpf9aN.js → PhArrowDown-CBjJCstB.js} +3 -3
- package/_assets/{PhArrowLeft--wJbrUzB.js → PhArrowLeft-BCeYPtMx.js} +4 -4
- package/_assets/{PhArrowRight-BTIKUgk-.js → PhArrowRight-Ch61WxZn.js} +4 -4
- package/_assets/{PhArrowSquareOut-DPwbQcP5.js → PhArrowSquareOut-Bk5nSBoz.js} +5 -5
- package/_assets/{PhArrowUp-tbd9Vo3U.js → PhArrowUp-CzPwFe1F.js} +5 -5
- package/_assets/PhArrowUpRight-DF87CEc7.js +15 -0
- package/_assets/{PhArrowsClockwise-BSfkaVhX.js → PhArrowsClockwise-D5XWB216.js} +2 -2
- package/_assets/{PhArrowsDownUp-BizHrerJ.js → PhArrowsDownUp-CVtoWYS-.js} +5 -5
- package/_assets/{PhArrowsLeftRight-wuaUs2S1.js → PhArrowsLeftRight-Cu83Wp7y.js} +3 -3
- package/_assets/{PhBank-BzJNe1lT.js → PhBank-BjB_uqsX.js} +3 -3
- package/_assets/{PhBrowser-DtA3UvKM.js → PhBrowser-CW3ZGiB7.js} +5 -5
- package/_assets/PhCaretDown-PT_hkshh.js +15 -0
- package/_assets/{PhCaretLeft-4kPjHdmT.js → PhCaretLeft-DPSFahQA.js} +3 -3
- package/_assets/PhCaretRight-EEBUAb9H.js +15 -0
- package/_assets/{PhCaretUp-D9YioiHV.js → PhCaretUp-Bit2hvKo.js} +3 -3
- package/_assets/{PhCheck-CHpcW9AR.js → PhCheck-BHmNQJ6P.js} +4 -4
- package/_assets/{PhCircleHalf-YS1UFN0E.js → PhCircleHalf-AD4oTWoj.js} +3 -3
- package/_assets/{PhClock-CSboNJh9.js → PhClock-3t4anT3D.js} +5 -5
- package/_assets/{PhCompass-D_0mucCp.js → PhCompass-DpvhkfDj.js} +5 -5
- package/_assets/{PhCopy-CDCUCR3f.js → PhCopy-We2XYWCm.js} +5 -5
- package/_assets/{PhCreditCard-DRX4uPYj.js → PhCreditCard-BBnTMXbe.js} +4 -4
- package/_assets/{PhCurrencyDollar-DLUjVe8H.js → PhCurrencyDollar-dPV4byY8.js} +2 -2
- package/_assets/{PhDesktop-_u-_n84T.js → PhDesktop-DVuLe5q1.js} +3 -3
- package/_assets/{PhDeviceMobile-BS_c6Vl8.js → PhDeviceMobile-D6knI_PD.js} +5 -5
- package/_assets/{PhDotsThree-CzsXASup.js → PhDotsThree-D_uTiViU.js} +3 -3
- package/_assets/{PhEnvelope-Cw4-Hk4L.js → PhEnvelope-Bkk7fDMT.js} +5 -5
- package/_assets/{PhFunnelSimple-DpBt0vi9.js → PhFunnelSimple-BVx2yoJC.js} +4 -4
- package/_assets/{PhGlobe-rs-o4lxw.js → PhGlobe-BUa1rAnN.js} +2 -2
- package/_assets/{PhIdentificationCard-DuF1gYTt.js → PhIdentificationCard-D7mCEldI.js} +5 -5
- package/_assets/{PhImage-DIhy5LKN.js → PhImage-DN8upEaC.js} +2 -2
- package/_assets/{PhInfo-D_98hoRZ.js → PhInfo-BRv5JqkG.js} +5 -5
- package/_assets/{PhLightbulb-jwjURN0E.js → PhLightbulb-LZ8Bksrw.js} +4 -4
- package/_assets/{PhMagnifyingGlass-Cl9SVL64.js → PhMagnifyingGlass-Nlml1ksU.js} +5 -5
- package/_assets/{PhPaperPlaneRight-CDqjDiqA.js → PhPaperPlaneRight-QfFyGr7O.js} +3 -3
- package/_assets/{PhPlus-Bqy0oPbi.js → PhPlus-C6YKBVJU.js} +4 -4
- package/_assets/{PhPower-BQaWuBX1.js → PhPower-BtHcdIUq.js} +4 -4
- package/_assets/{PhPuzzlePiece-D499-d4h.js → PhPuzzlePiece-D5mYYrHE.js} +3 -3
- package/_assets/{PhQrCode-BQ5rQwnD.js → PhQrCode-MfgEx90-.js} +4 -4
- package/_assets/{PhQuestion-bCmP-feI.js → PhQuestion-BHeGiiUF.js} +3 -3
- package/_assets/{PhQuestionMark-DyfGY3RD.js → PhQuestionMark-DNtDU6-_.js} +4 -4
- package/_assets/{PhSealCheck-H9-Y7aNH.js → PhSealCheck-CDWno5AE.js} +2 -2
- package/_assets/{PhSignOut-BZcBXokG.js → PhSignOut-BWUfOWAY.js} +3 -3
- package/_assets/{PhSpinner-Do01OpHj.js → PhSpinner-Chbk-Rrh.js} +3 -3
- package/_assets/{PhTrash-CuF_XmzC.js → PhTrash-CknzCMhK.js} +2 -2
- package/_assets/{PhUser-DjwKjO5y.js → PhUser-DBmpCM-x.js} +5 -5
- package/_assets/{PhVault-Sk9K_rlP.js → PhVault-B_-lceT6.js} +2 -2
- package/_assets/{PhWallet-Cx-DY6Ai.js → PhWallet-DzHci4bI.js} +3 -3
- package/_assets/{PhWarning-RJrWRAZK.js → PhWarning-DNajgYKH.js} +5 -5
- package/_assets/{PhWarningCircle-BM_6Vsrk.js → PhWarningCircle-DaWHEJd0.js} +4 -4
- package/_assets/{PhX-zfSxrDJY.js → PhX-o_0aqvnZ.js} +2 -2
- package/_assets/SaleCountdown-BCjbqWcU.js +99 -0
- package/_assets/{Spinner-CjR4Zw45.js → Spinner-hLMP163F.js} +2 -2
- package/_assets/{StoreSettings-BI2PxdDc.js → StoreSettings-C4lpIKgV.js} +7 -7
- package/_assets/{Success-BMSTCual.js → Success-DZwN3t4z.js} +5 -5
- package/_assets/{SwapController-MUVg1jDR.js → SwapController-BPiF_Q9x.js} +2 -2
- package/_assets/{TradeService-DSbQ-N2T.js → TradeService-D8Zf_eTM.js} +2 -2
- package/_assets/{W3MFrameProviderSingleton-bGfA1Ldc.js → W3MFrameProviderSingleton-ByxVGL9W.js} +4 -4
- package/_assets/{WebCryptoP256-RyjS14F-.js → WebCryptoP256-BowGpuyg.js} +2 -2
- package/_assets/{add-yuh2coGX.js → add-DMqlCS_5.js} +2 -2
- package/_assets/all-wallets-jltIqTjt.js +7 -0
- package/_assets/{app-store-CjVSQSMw.js → app-store-8U-XnKiq.js} +3 -3
- package/_assets/{apple--Q1_9qVz.js → apple-DqtIUOT7.js} +2 -2
- package/_assets/{arrow-bottom-BDd5zC7G.js → arrow-bottom-PA3nOuzV.js} +2 -2
- package/_assets/{arrow-bottom-circle-DeoWT_5e.js → arrow-bottom-circle-C-CSXtk9.js} +3 -3
- package/_assets/arrow-left-Cddzsk1s.js +9 -0
- package/_assets/{arrow-right-D5rgj1x7.js → arrow-right-FkB0kPcW.js} +3 -3
- package/_assets/{arrow-top-CZJvfHy5.js → arrow-top-BAZtnW6A.js} +3 -3
- package/_assets/async-directive-C0XTxdV5.js +10 -0
- package/_assets/{authorizations-o-LlYXNc.js → authorizations-D_SudRT-.js} +2 -2
- package/_assets/{bank-QdF2JRAj.js → bank-C-8Jh-Iw.js} +2 -2
- package/_assets/{basic-nXP69bkA.js → basic-sN1HnC_u.js} +2 -2
- package/_assets/{biconomy-D6gisxlY.js → biconomy-BijOlHn5.js} +2 -2
- package/_assets/{browseLayout.styles-Bza8FY3N.js → browseLayout.styles-6-W9YjOC.js} +12 -12
- package/_assets/{browser-BTxM9pEM.js → browser-BXKNeaZx.js} +2 -2
- package/_assets/{browser-D53imPjf.js → browser-D9YPKxfl.js} +2 -2
- package/_assets/{browser-DIXts996.js → browser-DynTtmBx.js} +2 -2
- package/_assets/{browser-ponyfill-BaElO0Yy.js → browser-ponyfill-BVvT8_Fp.js} +2 -2
- package/_assets/builder-BCPamKJP.js +2 -0
- package/_assets/{buy-8-Zq_4Fb.js → buy-BkbR80Gf.js} +2 -2
- package/_assets/buy-gasless-CQdgMa0F.js +2 -0
- package/_assets/{card-Eo0szEyd.js → card-Uc0KebvL.js} +2 -2
- package/_assets/{categories-J0dMuNkM.js → categories-Dquh1vbV.js} +2 -2
- package/_assets/{ccip-CNvm_wRE.js → ccip-BQaVTqUi.js} +2 -2
- package/_assets/{ccip-CgSAa6qI.js → ccip-CV07CEfz.js} +2 -2
- package/_assets/{chains-BbZKALwH.js → chains-Bp3h2aaE.js} +2 -2
- package/_assets/{checkmark-B1VwDgk_.js → checkmark-7uWcPB0u.js} +3 -3
- package/_assets/{checkmark-bold-BXR2Uavz.js → checkmark-bold-BwTefyx7.js} +3 -3
- package/_assets/{chevron-bottom-CjUlcMur.js → chevron-bottom-CJ9Wl9Xm.js} +3 -3
- package/_assets/{chevron-left-DypZfS5Y.js → chevron-left-DKH1P9Pf.js} +3 -3
- package/_assets/{chevron-right-CBfGDvpC.js → chevron-right-DeNTJHBI.js} +2 -2
- package/_assets/{chevron-top-ccW9fiNv.js → chevron-top-Dn0py8bk.js} +3 -3
- package/_assets/{chrome-store-CXaVZVMO.js → chrome-store-DUbm69Gl.js} +3 -3
- package/_assets/{class-map-B8fTg_8Q.js → class-map-C7I-HYAi.js} +6 -6
- package/_assets/{clock-CbjAmrVY.js → clock-CMav6VuQ.js} +2 -2
- package/_assets/{close-C44p4Qpf.js → close-Byftwzmc.js} +2 -2
- package/_assets/{coinPlaceholder-9sNtxYvg.js → coinPlaceholder-C0F4r6oU.js} +2 -2
- package/_assets/{collectionPage.styles-C--ki2P9.js → collectionPage.styles-St6jJHia.js} +7 -7
- package/_assets/common-vsCsmUBn.js +2 -0
- package/_assets/{compass-8jFoOhNF.js → compass-CPDOuTyF.js} +3 -3
- package/_assets/{controller-B5adsfCx.js → controller-DIQ9DcOx.js} +3 -3
- package/_assets/{copy-Die0K-07.js → copy-CjXNbdx3.js} +2 -2
- package/_assets/{core-Dz9rfTnP.js → core-Cs979BA0.js} +5 -5
- package/_assets/{createSvgIcon-DSycgKQz.js → createSvgIcon-P53Pfdxl.js} +4 -4
- package/_assets/crumbs.styles-N13K8LJF.js +10 -0
- package/_assets/{cursor-B5zKTXqZ.js → cursor-D-SkqFO5.js} +3 -3
- package/_assets/{cursor-transparent-Dp8bO7rL.js → cursor-transparent-RE6Zec8w.js} +3 -3
- package/_assets/{custom-SA3P34sS.js → custom-DP7Ww2Mp.js} +2 -2
- package/_assets/{data-capture-QCuBCgVo.js → data-capture-r6LhzaPe.js} +2 -2
- package/_assets/{dcl-schemas-BKQ0vYZF.js → dcl-schemas-n1W5glLl.js} +2 -2
- package/_assets/decimals-1-P-OpKN.js +2 -0
- package/_assets/decimals-BW5hR24C.js +2 -0
- package/_assets/{desktop-1vPdJJzq.js → desktop-tp0dY4sR.js} +3 -3
- package/_assets/detectExtension-DQg6wKZQ.js +2 -0
- package/_assets/{disconnect-10T9vPyj.js → disconnect-PN0ATTQe.js} +3 -3
- package/_assets/{discord-BC_Ueh7y.js → discord-ISYEjXZK.js} +3 -3
- package/_assets/{disposePreview-BDCsvWuP.js → disposePreview-D5gU11Se.js} +2 -2
- package/_assets/{email--UGVY4VA.js → email-C4mis8Vg.js} +2 -2
- package/_assets/{embedded-wallet-C0h1UGCI.js → embedded-wallet-CaKg_r8U.js} +2 -2
- package/_assets/{emotion-styled.browser.esm-8Fn_bSaK.js → emotion-styled.browser.esm-BUJmozsy.js} +2 -2
- package/_assets/{engine-CVmNCEKG.js → engine-D07w-XRT.js} +2 -2
- package/_assets/{errors-5abtsF-d.js → errors-DhRbQUQ8.js} +2 -2
- package/_assets/estimate-l1-fee-CVLkkmbZ.js +2 -0
- package/_assets/eth_estimateGas-DcrnZAhD.js +2 -0
- package/_assets/eth_getStorageAt-D55EQvGL.js +2 -0
- package/_assets/eth_getTransactionCount-996c8uw3.js +2 -0
- package/_assets/ethereum-BB2NY3Ze.js +2 -0
- package/_assets/{ethers-CqnE9_Iy.js → ethers-OrSZ5jmz.js} +2 -2
- package/_assets/{etherscan-C2G3o1uJ.js → etherscan-CjB1AtvG.js} +2 -2
- package/_assets/{events-DxeiWjZO.js → events-C-1hKiSc.js} +2 -2
- package/_assets/{exclamation-triangle-DwAzeOp6.js → exclamation-triangle-Vw_jmJIs.js} +2 -2
- package/_assets/{execute-bRHFO9T8.js → execute-DkcTGxdS.js} +3 -3
- package/_assets/{extension-DzOqtmMr.js → extension-p5vqJTq0.js} +3 -3
- package/_assets/{external-link-CJFUahWS.js → external-link-6l8BDrnZ.js} +2 -2
- package/_assets/{extractIPFS-DTbEwfwl.js → extractIPFS-DGBDqkFQ.js} +2 -2
- package/_assets/{facebook-x3bYUdwS.js → facebook-BdpnpvkK.js} +3 -3
- package/_assets/{farcaster-TSNolEe6.js → farcaster-DyedtTLV.js} +3 -3
- package/_assets/{features-DOlQFJIn.js → features-Dgji4xPv.js} +2 -2
- package/_assets/fetchTokenMetadata-CLY3eWo4.js +3 -0
- package/_assets/{field.styles-CGT52_F0.js → field.styles-B66-mhwP.js} +2 -2
- package/_assets/{filters-UiyRH_AA.js → filters-CMt2xly-.js} +3 -3
- package/_assets/{fortmatic-B4F48NpJ.js → fortmatic-CIXGktdE.js} +2 -2
- package/_assets/{get-bytecode-B61L8bJf.js → get-bytecode-B4ah9_Ee.js} +2 -2
- package/_assets/get-ecosystem-wallet-info-BUVR1h_d.js +2 -0
- package/_assets/{getBalance-CgOiBcM_.js → getBalance-DcjxPvBd.js} +3 -3
- package/_assets/getInstalledModules-CVmsNb5W.js +2 -0
- package/_assets/getNFT-CNkldXgA.js +2 -0
- package/_assets/{getNFT-BOhaT1yq.js → getNFT-D6Q2R2w8.js} +3 -3
- package/_assets/{github-DKEnSSaC.js → github-DpuVIU6C.js} +2 -2
- package/_assets/{google-Ct_bf34c.js → google-BwS7c7G5.js} +2 -2
- package/_assets/{grid.styles-iTSFhsyn.js → grid.styles-CbKnaEaH.js} +2 -2
- package/_assets/{hashTypedData-CTf6X_0x.js → hashTypedData-BMQaC5AO.js} +2 -2
- package/_assets/{hashTypedData-BjxqyJnO.js → hashTypedData-BXTiCI6R.js} +2 -2
- package/_assets/{help-circle-CtxTuyd5.js → help-circle-D4e71YxP.js} +3 -3
- package/_assets/{id-CBP3kShs.js → id-CkCU8Jqk.js} +3 -3
- package/_assets/{image-CU2z53Sh.js → image-BgNr9PHW.js} +2 -2
- package/_assets/{import-BFM9mYtD.js → import-nI9C4MLI.js} +2 -2
- package/_assets/{in-app-D-IPfiDb.js → in-app-qH_5BfXH.js} +2 -2
- package/_assets/in-app-wallet-calls-D5QY4WMZ.js +2 -0
- package/_assets/{index-UORXqou9.js → index-2lALaSI0.js} +2 -2
- package/_assets/{index-BgSm7poL.js → index-3xvycxSp.js} +2 -2
- package/_assets/{index-CVfarqKE.js → index-5TanjW1p.js} +4 -4
- package/_assets/{index-9ER2YXLE.js → index-7LiE_2Hn.js} +2 -2
- package/_assets/{index-CWpLrxaY.js → index-7jxYsA5x.js} +2 -2
- package/_assets/{index-D-g6tUrr.js → index-B0eaBbwk.js} +4 -4
- package/_assets/{index-Cj8n6jhR.js → index-B6gpbqHk.js} +3 -3
- package/_assets/{index-_eXXkY79.js → index-B767Ef3o.js} +2 -2
- package/_assets/{index-C1ILo9mK.js → index-B8pq8JLn.js} +2 -2
- package/_assets/{index-CcMloegU.js → index-B9LTXTJ_.js} +3 -3
- package/_assets/{index-CcJ1bQOV.js → index-BBmOO_5v.js} +2 -2
- package/_assets/{index-B0AMIOfY.js → index-BHeP5cAB.js} +2 -2
- package/_assets/{index-BbYwNUDQ.js → index-BIDLTLRs.js} +4 -4
- package/_assets/{index-BMWj60Rz.js → index-BJOeyXU6.js} +2 -2
- package/_assets/{index-D2iQXB_K.js → index-BT2VuKr_.js} +2 -2
- package/_assets/{index-QryiMDf6.js → index-BUJII-te.js} +2 -2
- package/_assets/{index-Bo1Z5mEG.js → index-BYf--6IB.js} +2 -2
- package/_assets/{index-D6OhFIgK.js → index-BbOkb2Lk.js} +2 -2
- package/_assets/{index-Dh747mI9.js → index-BbvUH58s.js} +5 -5
- package/_assets/{index-BgewSO5d.js → index-BlyJ0EeU.js} +2 -2
- package/_assets/{index-TwJnCsCt.js → index-Bt53hnH3.js} +2 -2
- package/_assets/{index-D_b2TfPS.js → index-BymYE2Hq.js} +2 -2
- package/_assets/{index-Ch8ZdFvj.js → index-C11xAGLj.js} +3 -3
- package/_assets/{index-CkhRwzDn.js → index-C3N8gNG5.js} +2 -2
- package/_assets/{index-DHrx45E-.js → index-C9g_L_xU.js} +8 -8
- package/_assets/{index-Bece1vl_.js → index-CBqzQu4b.js} +3 -3
- package/_assets/{index-BIU1Xflg.js → index-CFkA928w.js} +2 -2
- package/_assets/{index-8c2AE2rL.js → index-CKir0NTC.js} +6 -6
- package/_assets/{index-BjvOCOXo.js → index-CLkKFzPp.js} +5 -5
- package/_assets/{index-DSYn1rPz.js → index-CMGA6Ehu.js} +7 -7
- package/_assets/{index-Cg4gI1gY.js → index-CO3xBlL2.js} +4 -4
- package/_assets/{index-EO54jEJz.js → index-CTpgpMEc.js} +9 -9
- package/_assets/index-CZBL8oDN.css +1 -0
- package/_assets/{index-DBjGF5O5.js → index-C_vB1IQd.js} +4 -4
- package/_assets/{index-D3vbPDep.js → index-Cfg8NIxf.js} +4 -4
- package/_assets/{index-BLF43zxA.js → index-Cfiy7F58.js} +2 -2
- package/_assets/{index-DntLKm7o.js → index-ChkZ_3N-.js} +2 -2
- package/_assets/{index-DKNSn9FC.js → index-Ci7OJEKI.js} +4 -4
- package/_assets/{index-BqXgj2c4.js → index-CiVDvcz9.js} +17 -17
- package/_assets/{index-C3ELTXuu.js → index-CqA25hIa.js} +3 -3
- package/_assets/{index-D7KJ3B17.js → index-CspzAmAd.js} +4 -4
- package/_assets/{index-C6WGvNBW.js → index-CulTnm_-.js} +3 -3
- package/_assets/{index-DHmdplW7.js → index-CzONDXJm.js} +3 -3
- package/_assets/{index-Je254H6v.js → index-D2_5jCAk.js} +5 -5
- package/_assets/{index-DhZR3d6F.js → index-DEL0w41-.js} +2 -2
- package/_assets/{index-DB5YO8eU.js → index-DGoH3dH-.js} +9 -9
- package/_assets/{index-C8USgWUh.js → index-DHIc5ihj.js} +6 -6
- package/_assets/{index-jo5IZGw6.js → index-DILi1pU7.js} +2 -2
- package/_assets/{index-DDwh5CzB.js → index-DOE5PvRf.js} +4 -4
- package/_assets/{index-B3cule6M.js → index-DSZlP7vv.js} +2 -2
- package/_assets/{index-kSQR1Rng.js → index-DWpJbdNp.js} +2 -2
- package/_assets/{index-CQyQWevE.js → index-Dbzum1xk.js} +2 -2
- package/_assets/{index-CORj9AA6.js → index-DhxbjStl.js} +3 -3
- package/_assets/{index-BE-bCzXU.js → index-DrYTVtgg.js} +2 -2
- package/_assets/{index-DBkGVGV_.js → index-DsKy4xQX.js} +2 -2
- package/_assets/index-DuuWxLJb.js +2 -0
- package/_assets/{index-BbT8qu_L.js → index-DxPCOmel.js} +3 -3
- package/_assets/{index-BpgGRt4i.js → index-DyXRsRBM.js} +3 -3
- package/_assets/{index-C7RUGLgx.js → index-DzQkIbqv.js} +499 -500
- package/_assets/{index-ApdCRpGh.js → index-FgD-q8nY.js} +2 -2
- package/_assets/index-Q91sfGFW.js +2 -0
- package/_assets/{index-BuUjwDYx.js → index-QEKAtx1e.js} +4 -4
- package/_assets/{index-AH8vZ3-a.js → index-VrmvnTaa.js} +4 -4
- package/_assets/{index-CToeVfXv.js → index-aYru672w.js} +2 -2
- package/_assets/{index-DNZQtb01.js → index-gl06JVkD.js} +3 -3
- package/_assets/{index-D6MOFBZd.js → index-jsed_aC3.js} +2 -2
- package/_assets/{index-BLu7rJtN.js → index-t1CDJb0U.js} +9 -9
- package/_assets/{index-Cw2X26uO.js → index-u3wacysv.js} +2 -2
- package/_assets/{index.es-B-n7bK95.js → index.es-89IU7kpU.js} +2 -2
- package/_assets/{index.es-yT5643Oy.js → index.es-BxUByfMu.js} +2 -2
- package/_assets/{index.es-Dn-oiXGY.js → index.es-CeXL7thu.js} +2 -2
- package/_assets/{index.es-C50Venyf.js → index.es-O2YZpGjD.js} +5 -5
- package/_assets/{info-D8HlAvAX.js → info-CULnZZaj.js} +2 -2
- package/_assets/{info-circle-BhZLPW19.js → info-circle-lLJ-CNp2.js} +3 -3
- package/_assets/{items-empty-CSlmEyZz.js → items-empty-Bo2ok7jY.js} +2 -2
- package/_assets/jsxRuntime.module-gjtb1wYS.js +2 -0
- package/_assets/{jump-BOiqSS4M.js → jump-CfxL77MI.js} +2 -2
- package/_assets/{lightbulb-DzXtr_43.js → lightbulb-4T7s9a-o.js} +2 -2
- package/_assets/linkAccount-CH9thals.js +2 -0
- package/_assets/{localBatchGatewayRequest-MsW7s5by.js → localBatchGatewayRequest-CSeZ4gRB.js} +2 -2
- package/_assets/{mail-OX9dKj1y.js → mail-DhJDk7cH.js} +3 -3
- package/_assets/{mobile-yC6FSqHV.js → mobile-CydJ5WdV.js} +3 -3
- package/_assets/{modal.styles-B7xjPjYV.js → modal.styles-2uQXkegU.js} +2 -2
- package/_assets/{more-DOT52_aN.js → more-Dg2B8rio.js} +3 -3
- package/_assets/{native-UMs_9ER2.js → native-CTjG-6uw.js} +2 -2
- package/_assets/{network-placeholder-CCjuxrNi.js → network-placeholder-h8TrKQkX.js} +2 -2
- package/_assets/{networks-BxL8Ab1j.js → networks-DcWUPxCR.js} +2 -2
- package/_assets/{nftPlaceholder-DKgXm473.js → nftPlaceholder-B4g7qDN6.js} +3 -3
- package/_assets/off-UwuZMWU-.js +9 -0
- package/_assets/{onramp-DxZRTgp3.js → onramp-i_2R0Aty.js} +2 -2
- package/_assets/openzeppelin-CRJGheas.js +2 -0
- package/_assets/ownerOf-Cg4HNQ0Q.js +2 -0
- package/_assets/parseNft-C5TjCi9l.js +3 -0
- package/_assets/{parseSignature-BI_WyMN8.js → parseSignature-BkGllSKb.js} +2 -2
- package/_assets/{parseSignature-B_rheFpA.js → parseSignature-DlxX_eFH.js} +4 -4
- package/_assets/{passkeys-D1ovHh1n.js → passkeys-DHzFFqFt.js} +2 -2
- package/_assets/{pay-with-exchange-CAo2mIu7.js → pay-with-exchange-Da-95QjC.js} +2 -2
- package/_assets/{play-store-bj7y3y5Y.js → play-store-B1ADa5-a.js} +2 -2
- package/_assets/{plus-CfzKaqvY.js → plus-CkIDGwOx.js} +2 -2
- package/_assets/{prepare-contract-call-CC-FfypC.js → prepare-contract-call-DRyZHwAJ.js} +2 -2
- package/_assets/{qr-code-Bn6kdgY5.js → qr-code-DInpw8H9.js} +3 -3
- package/_assets/{qr-overlay-Dqlh9s-P.js → qr-overlay-B5-Cv-4F.js} +4 -4
- package/_assets/{react-D7J-E0MH.js → react-DaBuTM6Q.js} +2 -2
- package/_assets/{receive-Cqln7Zzs.js → receive-BxwWtavl.js} +2 -2
- package/_assets/{recycle-horizontal-Com6QZtq.js → recycle-horizontal-frlUVLoe.js} +2 -2
- package/_assets/{ref-CZIG3V0U.js → ref-BDtPbYkK.js} +3 -3
- package/_assets/{refresh-KnsbHvKc.js → refresh-BJgYdDWe.js} +3 -3
- package/_assets/{reown-logo-BuYZi0Rx.js → reown-logo-CptpO-OK.js} +2 -2
- package/_assets/{resolveImplementation-CbOxSd1Z.js → resolveImplementation-UAeMoslS.js} +2 -2
- package/_assets/{resume-buy-qr8Z1bgQ.js → resume-buy-DshgN9vm.js} +2 -2
- package/_assets/{rpc-6QQor2XU.js → rpc-xoh1bqpg.js} +2 -2
- package/_assets/{sales-empty-B3qcIyi6.js → sales-empty-B0QNGz8U.js} +2 -2
- package/_assets/{search-Ce8CzTDv.js → search-CovtTjFk.js} +3 -3
- package/_assets/{search-empty-B2ikWLFM.js → search-empty-CiaPLxpu.js} +2 -2
- package/_assets/{secp256k1-N7Qrv3ox.js → secp256k1-B6GZ7kat.js} +2 -2
- package/_assets/{secp256k1-DibZRl6e.js → secp256k1-CI4_BdKy.js} +2 -2
- package/_assets/{secp256k1-CQeO8_L9.js → secp256k1-IgPcu2TC.js} +2 -2
- package/_assets/{send-B-AElJGe.js → send-BqmhOSPb.js} +2 -2
- package/_assets/{send-fc370TIG.js → send-CMxH0R30.js} +2 -2
- package/_assets/{send-batch-transaction-UJjMLB2L.js → send-batch-transaction-_47YxVXu.js} +2 -2
- package/_assets/{send-eip712-transaction-DSyJkl_1.js → send-eip712-transaction-dUQPsneg.js} +3 -3
- package/_assets/send-gasless-transaction-C9qimzDD.js +3 -0
- package/_assets/send-transaction-C00epVak.js +3 -0
- package/_assets/{sendMetaTransaction-C6Fbql0T.js → sendMetaTransaction-D_Udygrx.js} +2 -2
- package/_assets/{sendRawTransaction-BapPv41W.js → sendRawTransaction-3Tc8O82f.js} +4 -4
- package/_assets/{sentry-BK5YQzUx.js → sentry-ilLelGl_.js} +3 -3
- package/_assets/{serializeTransaction-vu5gUsgc.js → serializeTransaction-BN5Z150K.js} +2 -2
- package/_assets/session-proposal-DFNQHP37.js +2 -0
- package/_assets/{session-request-BSVWGsvU.js → session-request-D-kuAKOc.js} +3 -3
- package/_assets/{sha256-CEHbBAco.js → sha256-C6I6NkPD.js} +2 -2
- package/_assets/sha3-CcKshJ6_.js +2 -0
- package/_assets/signin-empty-C52WOkGa.js +2 -0
- package/_assets/{signing-BmfCro8S.js → signing-D_eQ6aEY.js} +4 -4
- package/_assets/{skeleton.styles-BN71VInw.js → skeleton.styles-B7ceCvK9.js} +2 -2
- package/_assets/{socials-BHFgLpAJ.js → socials-DCNPHMgt.js} +2 -2
- package/_assets/{styled-Doc5cwwv.js → styled-TsFrVdC0.js} +3 -3
- package/_assets/{swapHorizontal-CVwm3cGO.js → swapHorizontal-BzkqO77h.js} +3 -3
- package/_assets/{swapHorizontalBold-BJtM3bfy.js → swapHorizontalBold-Ci7CW-Ps.js} +2 -2
- package/_assets/{swapHorizontalMedium-Dy-L1gY3.js → swapHorizontalMedium-BIJFHqWY.js} +3 -3
- package/_assets/{swapHorizontalRoundedBold-CISDmUGp.js → swapHorizontalRoundedBold-DgbOKQnq.js} +2 -2
- package/_assets/{swapVertical-DOqonLJ7.js → swapVertical-AbfbZRwH.js} +2 -2
- package/_assets/{swaps-K7u4TcXn.js → swaps-CicFV6pq.js} +2 -2
- package/_assets/{telegram-BgdgHDgu.js → telegram-D7G_eJ_b.js} +2 -2
- package/_assets/{thirdweb-BcMQ69Q0.js → thirdweb-Vp1uscmH.js} +4 -4
- package/_assets/{three-dots-QLVpeBJu.js → three-dots-OoMaedcW.js} +2 -2
- package/_assets/{to-serializable-transaction-BrhQQJr8.js → to-serializable-transaction-BT5px6SS.js} +3 -3
- package/_assets/totalSupply-CkL8_XXt.js +2 -0
- package/_assets/{transaction-HCF_3XYc.js → transaction-sOBP-DPj.js} +2 -2
- package/_assets/transactionReceipt--9bOdV8l.js +2 -0
- package/_assets/transactions-CWkneGU6.js +17 -0
- package/_assets/{twitch-DQ-6J5eN.js → twitch-XFZ_dW-0.js} +2 -2
- package/_assets/{twitterIcon-DqfN9e83.js → twitterIcon-DFIrOz7L.js} +2 -2
- package/_assets/{useCreditPacks-C4goi1v6.js → useCreditPacks-DGUqMJ6U.js} +2 -2
- package/_assets/{useInfiniteGrid-x8-KLPvB.js → useInfiniteGrid-DpNO4hZU.js} +2 -2
- package/_assets/useStore-HIvj56kg.js +3 -0
- package/_assets/useTheme-5m8LACXM.js +2 -0
- package/_assets/{utils-BIDnbzds.js → utils-Ci73E7nx.js} +2 -2
- package/_assets/{verify-B6D4ZoTL.js → verify-CtqWYnsr.js} +3 -3
- package/_assets/{verify-filled-IL97d6Q4.js → verify-filled-db_bDI2X.js} +3 -3
- package/_assets/{verifyHash-zWGUEzxO.js → verifyHash-Bk-B5GPz.js} +2 -2
- package/_assets/{w3m-modal-DieNoy5B.js → w3m-modal-BTUtrhm6.js} +2 -2
- package/_assets/{w3m-modal-npxivmAE.js → w3m-modal-BtyAd8rE.js} +2 -2
- package/_assets/wait-for-tx-receipt-Cbmd9TUG.js +2 -0
- package/_assets/{wallet-CeCbopsa.js → wallet-C7Nkm-1r.js} +3 -3
- package/_assets/{wallet-placeholder-Crzo6d1g.js → wallet-placeholder-BAZfiJ4M.js} +2 -2
- package/_assets/{walletconnect-CeZHyiFa.js → walletconnect-jD4HJXgj.js} +2 -2
- package/_assets/{wallets-BX3reIDg.js → wallets-CUIygOS2.js} +6 -6
- package/_assets/{warning-circle-CYZb1kuW.js → warning-circle-DG9C8ETA.js} +3 -3
- package/_assets/{web-connector-B-Qttl4q.js → web-connector-BIkHBHih.js} +4 -4
- package/_assets/{writeContract-DBB3GCUP.js → writeContract-CEDCT-Ld.js} +2 -2
- package/_assets/{x-EU6Vt-ZK.js → x-B-2M90IQ.js} +2 -2
- package/_assets/{zora-sepolia-4aZYsx8C.js → zora-sepolia-C43Ueozz.js} +2 -2
- package/_assets/{zoraTestnet-k4gEq1qt.js → zoraTestnet-CnMCD5vw.js} +2 -2
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Cart-Cz1_8pDF.js +0 -748
- package/_assets/Confetti-TvBa-8L0.js +0 -18
- package/_assets/ItemDetail-O0E45P4x.js +0 -3778
- package/_assets/LoadMore-DgGHun07.js +0 -8
- package/_assets/MyAssets-B_B3e16w.js +0 -1077
- package/_assets/NotFound-C19ay2J0.js +0 -18
- package/_assets/OutfitPreview-DnePnq6P.js +0 -7
- package/_assets/PhArrowUpRight-8pk20n2b.js +0 -15
- package/_assets/PhCaretDown-CAvzPGfo.js +0 -15
- package/_assets/PhCaretRight-fBgGDQoN.js +0 -15
- package/_assets/all-wallets-BC47z7en.js +0 -7
- package/_assets/arrow-left-ClBN6Qh3.js +0 -9
- package/_assets/async-directive-DRvTtDkq.js +0 -10
- package/_assets/builder-CEDpBFkW.js +0 -2
- package/_assets/buy-gasless-mSBHbIka.js +0 -2
- package/_assets/common-TqxBDIuh.js +0 -2
- package/_assets/crumbs.styles-BqMPTZMi.js +0 -10
- package/_assets/decimals-BlmrI4QX.js +0 -2
- package/_assets/decimals-CZlYYHvF.js +0 -2
- package/_assets/detectExtension-BES_31hM.js +0 -2
- package/_assets/estimate-l1-fee-Dh31wn7V.js +0 -2
- package/_assets/eth_estimateGas-UbaxlGnG.js +0 -2
- package/_assets/eth_getStorageAt-BUvTw4uP.js +0 -2
- package/_assets/eth_getTransactionCount-CGFdAd5L.js +0 -2
- package/_assets/ethereum-TadlwfdZ.js +0 -2
- package/_assets/fetchTokenMetadata-C1uUHgz6.js +0 -3
- package/_assets/get-ecosystem-wallet-info-W6y9v6fC.js +0 -2
- package/_assets/getInstalledModules-DWdNC3R0.js +0 -2
- package/_assets/getNFT-Op6nNTCr.js +0 -2
- package/_assets/in-app-wallet-calls-BivXJ6s-.js +0 -2
- package/_assets/index-Bi7YdA0p.js +0 -2
- package/_assets/index-ByiMU36z.css +0 -1
- package/_assets/index-OxIuflSf.js +0 -2
- package/_assets/jsxRuntime.module-DnBCkw57.js +0 -2
- package/_assets/linkAccount-B6zz4AhU.js +0 -2
- package/_assets/off-B-mPtvC1.js +0 -9
- package/_assets/openzeppelin-Cr4Y9xjf.js +0 -2
- package/_assets/ownerOf-DY8a2-2C.js +0 -2
- package/_assets/parseNft-DPdft2uD.js +0 -3
- package/_assets/send-gasless-transaction-ByJ2YdbP.js +0 -3
- package/_assets/send-transaction-8aUtEDXf.js +0 -3
- package/_assets/session-proposal-DigsDD4x.js +0 -2
- package/_assets/sha3-BShx66Ks.js +0 -2
- package/_assets/signin-empty-K31kGWGu.js +0 -2
- package/_assets/totalSupply-CuA1naxr.js +0 -2
- package/_assets/transactionReceipt-07DpCAC0.js +0 -2
- package/_assets/transactions-a9mQj56V.js +0 -17
- package/_assets/useStore-fPz8-87J.js +0 -3
- package/_assets/useTheme-DQw02uin.js +0 -2
- package/_assets/wait-for-tx-receipt-CLSVYeXT.js +0 -2
- package/_assets/wallet-Bhi-khZu.js +0 -2
- /package/_assets/{ItemDetail-B4Ll03xN.css → SaleCountdown-B4Ll03xN.css} +0 -0
|
@@ -1,3778 +0,0 @@
|
|
|
1
|
-
var Dd=Object.defineProperty;var Cd=(n,a,t)=>a in n?Dd(n,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[a]=t;var W=(n,a,t)=>Cd(n,typeof a!="symbol"?a+"":a,t);import{r as b,e as Sd,j as i,u as mn,l as Il,R as j,h as Md,L as Pl,d as _d,b as El}from"./react-D7J-E0MH.js";import{s as m,d as u,aJ as At,c as f,I as X,au as jd,K as Be,S as Ft,C as Ze,bj as gi,a2 as na,h as cn,F as dn,bm as Tl,bn as Id,L as gn,bv as Pd,bw as Ed,ak as fe,bD as Ue,bC as Ye,bE as ro,x as je,bB as Ca,bA as $l,n as Td,o as $d,R as Mn,bl as Rd,bk as Rl,U as Nd,bx as Od,by as Ad,c_ as Ld,c$ as Fd,d0 as Yd,d1 as Wd,E as ye,aN as Bd,a5 as ra,bf as aa,M as go,bg as rn,p as Nl,N as ar,c2 as Ol,H as zt,av as Fe,d2 as Hd,a3 as zd,v as qd,w as Kd,y as On,aH as Sa,ac as Al,d3 as xi,cI as Qd,f as Ll,aI as Ud,d4 as Vd,c1 as Gd,d5 as Xd,bN as Jd,d6 as Zd,d7 as eu,k as tu,ai as er,b7 as nu,d8 as ru,a8 as au,d9 as ou,b9 as iu,da as su,u as Fl,X as Yl,db as Wl,dc as lu,dd as cu,j as Bl,de as du,df as uu,dg as pu,dh as fu,Q as hu,di as mu,dj as Ma,W as gu,dk as xu,dl as yu,G as bu,m as vu,dm as wu,dn as ku,dp as Du,dq as Cu,dr as Su,ds as Mu,aw as _u,ax as ju,dt as Iu,J as Pu,aA as yi,az as bi,du as vi,dv as Eu,dw as Tu,dx as $u,bu as Ru,dy as wi,dz as Nu,dA as Ou,dB as Au,dC as Lu,dD as Fu,dE as Yu,dF as Wu,dG as Bu}from"./index-C7RUGLgx.js";import{d as ut}from"./dcl-schemas-BKQ0vYZF.js";import{N as ki,a0 as Hu,V as zu,R as Hl,M as qu,S as Ku,C as Qu,H as Uu,a as Vu,T as Gu,X as Xu,b as Ju,B as Zu,c as ep,d as tp,e as np,f as Zt,g as rp,h as ap,i as op,j as ip,k as wn,l as wt,W as wr,o as kr,p as Dr,q as sp,x as lp,y as cp,z as dp,D as up,E as pp,F as fp,G as hp,I as mp,J as gp,K as xp,L as zl,P as ql,m as Kl,n as Ql,a2 as yp,a3 as bp,a4 as Di,A as vp,r as wp,s as kp,t as Dp,u as Cp,v as Sp,w as Mp,a5 as Ci,a6 as _p,a7 as jp,a8 as Ip,a9 as Pp,Y as Ep,O as Tp,Q as $p,U as Rp}from"./CollectionCarousel-Dgmy1mBv.js";import{j as Si,b as Np,d as Op,v as Ap,i as Lp,e as Fp,a as Yp,o as Wp,w as Mi,G as Bp,c as Hp}from"./buy-8-Zq_4Fb.js";import{a as zp,b as qp}from"./builder-CEDpBFkW.js";import{u as Kp,M as Qp,f as Up,b as Vp,c as Gp}from"./useCreditPacks-C4goi1v6.js";import{m as _i}from"./mana-matic-CEqvSwrJ.js";import{m as Xp}from"./mana-matic-light-Bl5duieC.js";import{l as Ul,g as Vl,o as Jp,n as Zp,a as ji,b as Gl,i as ef,r as tf,m as nf,k as rf}from"./authorizations-o-LlYXNc.js";import{J as af,p as of,C as sf,I as lf}from"./ethers-CqnE9_Iy.js";import{a as cf,w as Xl,S as Jl,G as Zl,c as df}from"./buy-gasless-mSBHbIka.js";import{R as Ii}from"./resume-buy-qr8Z1bgQ.js";import{a as uf,f as Wt,i as Pn}from"./errors-5abtsF-d.js";import{C as pf}from"./Confetti-TvBa-8L0.js";import{b as ff,J as hf,a as mf}from"./jump-BOiqSS4M.js";import{p as ec}from"./import-BFM9mYtD.js";import{i as oa}from"./wallet-Bhi-khZu.js";import{E as Bt}from"./ErrorNotice-Dqt3U2vl.js";import{L as Pi,M as gf,B as xf,H as yf,T as bf,A as vf}from"./modal.styles-B7xjPjYV.js";import{S as wf}from"./Spinner-CjR4Zw45.js";import{M as kf,E as Df,s as Cf}from"./sendMetaTransaction-C6Fbql0T.js";import{E as Sf}from"./EmotePlaybackBar-CmOnYKyU.js";import{d as Mf}from"./disposePreview-BDCsvWuP.js";import{S as _f,T as Cr}from"./categories-J0dMuNkM.js";import{c as jf}from"./crumbs.styles-BqMPTZMi.js";import"./sentry-BK5YQzUx.js";import"./intl-AKLEHPeO.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]="cd7cc109-893e-48ea-85e3-3081f855c1da",n._sentryDebugIdIdentifier="sentry-dbid-cd7cc109-893e-48ea-85e3-3081f855c1da")}catch{}})();const En=Math.min,an=Math.max,Br=Math.round,Sr=Math.floor,Dt=n=>({x:n,y:n}),If={left:"right",right:"left",bottom:"top",top:"bottom"};function Pf(n,a,t){return an(n,En(a,t))}function ia(n,a){return typeof n=="function"?n(a):n}function Tn(n){return n.split("-")[0]}function or(n){return n.split("-")[1]}function Ef(n){return n==="x"?"y":"x"}function xo(n){return n==="y"?"height":"width"}function tn(n){const a=n[0];return a==="t"||a==="b"?"y":"x"}function yo(n){return Ef(tn(n))}function Tf(n,a,t){t===void 0&&(t=!1);const e=or(n),r=yo(n),o=xo(r);let s=r==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return a.reference[o]>a.floating[o]&&(s=Hr(s)),[s,Hr(s)]}function $f(n){const a=Hr(n);return[ao(n),a,ao(a)]}function ao(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Ei=["left","right"],Ti=["right","left"],Rf=["top","bottom"],Nf=["bottom","top"];function Of(n,a,t){switch(n){case"top":case"bottom":return t?a?Ti:Ei:a?Ei:Ti;case"left":case"right":return a?Rf:Nf;default:return[]}}function Af(n,a,t,e){const r=or(n);let o=Of(Tn(n),t==="start",e);return r&&(o=o.map(s=>s+"-"+r),a&&(o=o.concat(o.map(ao)))),o}function Hr(n){const a=Tn(n);return If[a]+n.slice(a.length)}function Lf(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 tc(n){return typeof n!="number"?Lf(n):{top:n,right:n,bottom:n,left:n}}function zr(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 $i(n,a,t){let{reference:e,floating:r}=n;const o=tn(a),s=yo(a),l=xo(s),c=Tn(a),p=o==="y",d=e.x+e.width/2-r.width/2,h=e.y+e.height/2-r.height/2,x=e[l]/2-r[l]/2;let y;switch(c){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 v=or(a);return v&&(y[s]+=x*(v==="end"?1:-1)*(t&&p?-1:1)),y}async function Ff(n,a){var t;a===void 0&&(a={});const{x:e,y:r,platform:o,rects:s,elements:l,strategy:c}=n,{boundary:p="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:x=!1,padding:y=0}=ia(a,n),v=tc(y),k=l[x?h==="floating"?"reference":"floating":h],C=zr(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(l.floating)),boundary:p,rootBoundary:d,strategy:c})),D=h==="floating"?{x:e,y:r,width:s.floating.width,height:s.floating.height}:s.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),g=await(o.isElement==null?void 0:o.isElement(E))&&await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1},T=zr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:D,offsetParent:E,strategy:c}):D);return{top:(C.top-T.top+v.top)/g.y,bottom:(T.bottom-C.bottom+v.bottom)/g.y,left:(C.left-T.left+v.left)/g.x,right:(T.right-C.right+v.right)/g.x}}const Yf=50,Wf=async(n,a,t)=>{const{placement:e="bottom",strategy:r="absolute",middleware:o=[],platform:s}=t,l=s.detectOverflow?s:{...s,detectOverflow:Ff},c=await(s.isRTL==null?void 0:s.isRTL(a));let p=await s.getElementRects({reference:n,floating:a,strategy:r}),{x:d,y:h}=$i(p,e,c),x=e,y=0;const v={};for(let w=0;w<o.length;w++){const k=o[w];if(!k)continue;const{name:C,fn:D}=k,{x:E,y:g,data:T,reset:O}=await D({x:d,y:h,initialPlacement:e,placement:x,strategy:r,middlewareData:v,rects:p,platform:l,elements:{reference:n,floating:a}});d=E??d,h=g??h,v[C]={...v[C],...T},O&&y<Yf&&(y++,typeof O=="object"&&(O.placement&&(x=O.placement),O.rects&&(p=O.rects===!0?await s.getElementRects({reference:n,floating:a,strategy:r}):O.rects),{x:d,y:h}=$i(p,x,c)),w=-1)}return{x:d,y:h,placement:x,strategy:r,middlewareData:v}},Bf=n=>({name:"arrow",options:n,async fn(a){const{x:t,y:e,placement:r,rects:o,platform:s,elements:l,middlewareData:c}=a,{element:p,padding:d=0}=ia(n,a)||{};if(p==null)return{};const h=tc(d),x={x:t,y:e},y=yo(r),v=xo(y),w=await s.getDimensions(p),k=y==="y",C=k?"top":"left",D=k?"bottom":"right",E=k?"clientHeight":"clientWidth",g=o.reference[v]+o.reference[y]-x[y]-o.floating[v],T=x[y]-o.reference[y],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(p));let M=O?O[E]:0;(!M||!await(s.isElement==null?void 0:s.isElement(O)))&&(M=l.floating[E]||o.floating[v]);const S=g/2-T/2,P=M/2-w[v]/2-1,A=En(h[C],P),B=En(h[D],P),U=M-w[v]-B,V=M/2-w[v]/2+S,G=Pf(A,V,U),H=!c.arrow&&or(r)!=null&&V!==G&&o.reference[v]/2-(V<A?A:B)-w[v]/2<0,N=H?V<A?V-A:V-U:0;return{[y]:x[y]+N,data:{[y]:G,centerOffset:V-G-N,...H&&{alignmentOffset:N}},reset:H}}}),Hf=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(a){var t,e;const{placement:r,middlewareData:o,rects:s,initialPlacement:l,platform:c,elements:p}=a,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:x,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:w=!0,...k}=ia(n,a);if((t=o.arrow)!=null&&t.alignmentOffset)return{};const C=Tn(r),D=tn(l),E=Tn(l)===l,g=await(c.isRTL==null?void 0:c.isRTL(p.floating)),T=x||(E||!w?[Hr(l)]:$f(l)),O=v!=="none";!x&&O&&T.push(...Af(l,w,v,g));const M=[l,...T],S=await c.detectOverflow(a,k),P=[];let A=((e=o.flip)==null?void 0:e.overflows)||[];if(d&&P.push(S[C]),h){const G=Tf(r,s,g);P.push(S[G[0]],S[G[1]])}if(A=[...A,{placement:r,overflows:P}],!P.every(G=>G<=0)){var B,U;const G=(((B=o.flip)==null?void 0:B.index)||0)+1,H=M[G];if(H&&(!(h==="alignment"?D!==tn(H):!1)||A.every(_=>tn(_.placement)===D?_.overflows[0]>0:!0)))return{data:{index:G,overflows:A},reset:{placement:H}};let N=(U=A.filter(F=>F.overflows[0]<=0).sort((F,_)=>F.overflows[1]-_.overflows[1])[0])==null?void 0:U.placement;if(!N)switch(y){case"bestFit":{var V;const F=(V=A.filter(_=>{if(O){const re=tn(_.placement);return re===D||re==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(re=>re>0).reduce((re,z)=>re+z,0)]).sort((_,re)=>_[1]-re[1])[0])==null?void 0:V[0];F&&(N=F);break}case"initialPlacement":N=l;break}if(r!==N)return{reset:{placement:N}}}return{}}}},zf=new Set(["left","top"]);async function qf(n,a){const{placement:t,platform:e,elements:r}=n,o=await(e.isRTL==null?void 0:e.isRTL(r.floating)),s=Tn(t),l=or(t),c=tn(t)==="y",p=zf.has(s)?-1:1,d=o&&c?-1:1,h=ia(a,n);let{mainAxis:x,crossAxis:y,alignmentAxis:v}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof v=="number"&&(y=l==="end"?v*-1:v),c?{x:y*d,y:x*p}:{x:x*p,y:y*d}}const Kf=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(a){var t,e;const{x:r,y:o,placement:s,middlewareData:l}=a,c=await qf(a,n);return s===((t=l.offset)==null?void 0:t.placement)&&(e=l.arrow)!=null&&e.alignmentOffset?{}:{x:r+c.x,y:o+c.y,data:{...c,placement:s}}}}};function sa(){return typeof window<"u"}function An(n){return nc(n)?(n.nodeName||"").toLowerCase():"#document"}function He(n){var a;return(n==null||(a=n.ownerDocument)==null?void 0:a.defaultView)||window}function Pt(n){var a;return(a=(nc(n)?n.ownerDocument:n.document)||window.document)==null?void 0:a.documentElement}function nc(n){return sa()?n instanceof Node||n instanceof He(n).Node:!1}function We(n){return sa()?n instanceof Element||n instanceof He(n).Element:!1}function qt(n){return sa()?n instanceof HTMLElement||n instanceof He(n).HTMLElement:!1}function Ri(n){return!sa()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof He(n).ShadowRoot}function la(n){const{overflow:a,overflowX:t,overflowY:e,display:r}=tt(n);return/auto|scroll|overlay|hidden|clip/.test(a+e+t)&&r!=="inline"&&r!=="contents"}function Qf(n){return/^(table|td|th)$/.test(An(n))}function ca(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const Uf=/transform|translate|scale|rotate|perspective|filter/,Vf=/paint|layout|strict|content/,Jt=n=>!!n&&n!=="none";let _a;function bo(n){const a=We(n)?tt(n):n;return Jt(a.transform)||Jt(a.translate)||Jt(a.scale)||Jt(a.rotate)||Jt(a.perspective)||!vo()&&(Jt(a.backdropFilter)||Jt(a.filter))||Uf.test(a.willChange||"")||Vf.test(a.contain||"")}function Gf(n){let a=un(n);for(;qt(a)&&!tr(a);){if(bo(a))return a;if(ca(a))return null;a=un(a)}return null}function vo(){return _a==null&&(_a=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_a}function tr(n){return/^(html|body|#document)$/.test(An(n))}function tt(n){return He(n).getComputedStyle(n)}function da(n){return We(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function un(n){if(An(n)==="html")return n;const a=n.assignedSlot||n.parentNode||Ri(n)&&n.host||Pt(n);return Ri(a)?a.host:a}function rc(n){const a=un(n);return tr(a)?(n.ownerDocument||n).body:qt(a)&&la(a)?a:rc(a)}function nr(n,a,t){var e;a===void 0&&(a=[]),t===void 0&&(t=!0);const r=rc(n),o=r===((e=n.ownerDocument)==null?void 0:e.body),s=He(r);if(o){const l=oo(s);return a.concat(s,s.visualViewport||[],la(r)?r:[],l&&t?nr(l):[])}else return a.concat(r,nr(r,[],t))}function oo(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function ac(n){const a=tt(n);let t=parseFloat(a.width)||0,e=parseFloat(a.height)||0;const r=qt(n),o=r?n.offsetWidth:t,s=r?n.offsetHeight:e,l=Br(t)!==o||Br(e)!==s;return l&&(t=o,e=s),{width:t,height:e,$:l}}function wo(n){return We(n)?n:n.contextElement}function jn(n){const a=wo(n);if(!qt(a))return Dt(1);const t=a.getBoundingClientRect(),{width:e,height:r,$:o}=ac(a);let s=(o?Br(t.width):t.width)/e,l=(o?Br(t.height):t.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Xf=Dt(0);function oc(n){const a=He(n);return!vo()||!a.visualViewport?Xf:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function Jf(n,a,t){return a===void 0&&(a=!1),!!t&&a&&t===He(n)}function pn(n,a,t,e){a===void 0&&(a=!1),t===void 0&&(t=!1);const r=n.getBoundingClientRect(),o=wo(n);let s=Dt(1);a&&(e?We(e)&&(s=jn(e)):s=jn(n));const l=Jf(o,t,e)?oc(o):Dt(0);let c=(r.left+l.x)/s.x,p=(r.top+l.y)/s.y,d=r.width/s.x,h=r.height/s.y;if(o&&e){const x=He(o),y=We(e)?He(e):e;let v=x,w=oo(v);for(;w&&y!==v;){const k=jn(w),C=w.getBoundingClientRect(),D=tt(w),E=C.left+(w.clientLeft+parseFloat(D.paddingLeft))*k.x,g=C.top+(w.clientTop+parseFloat(D.paddingTop))*k.y;c*=k.x,p*=k.y,d*=k.x,h*=k.y,c+=E,p+=g,v=He(w),w=oo(v)}}return zr({width:d,height:h,x:c,y:p})}function ua(n,a){const t=da(n).scrollLeft;return a?a.left+t:pn(Pt(n)).left+t}function ic(n,a){const t=n.getBoundingClientRect(),e=t.left+a.scrollLeft-ua(n,t),r=t.top+a.scrollTop;return{x:e,y:r}}function Zf(n){let{elements:a,rect:t,offsetParent:e,strategy:r}=n;const o=r==="fixed",s=Pt(e),l=a?ca(a.floating):!1;if(e===s||l&&o)return t;let c={scrollLeft:0,scrollTop:0},p=Dt(1);const d=Dt(0),h=qt(e);if((h||!o)&&((An(e)!=="body"||la(s))&&(c=da(e)),h)){const y=pn(e);p=jn(e),d.x=y.x+e.clientLeft,d.y=y.y+e.clientTop}const x=s&&!h&&!o?ic(s,c):Dt(0);return{width:t.width*p.x,height:t.height*p.y,x:t.x*p.x-c.scrollLeft*p.x+d.x+x.x,y:t.y*p.y-c.scrollTop*p.y+d.y+x.y}}function eh(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function th(n){const a=da(n),t=n.ownerDocument.body,e=an(n.scrollWidth,n.clientWidth,t.scrollWidth,t.clientWidth),r=an(n.scrollHeight,n.clientHeight,t.scrollHeight,t.clientHeight);let o=-a.scrollLeft+ua(n);const s=-a.scrollTop;return tt(t).direction==="rtl"&&(o+=an(n.clientWidth,t.clientWidth)-e),{width:e,height:r,x:o,y:s}}const nh=25;function rh(n,a,t){t===void 0&&(t="viewport");const e=t==="layoutViewport",r=He(n),o=Pt(n),s=r.visualViewport;let l=o.clientWidth,c=o.clientHeight,p=0,d=0;if(s){const x=!vo()||a==="fixed";e?x||(p=-s.offsetLeft,d=-s.offsetTop):(l=s.width,c=s.height,x&&(p=s.offsetLeft,d=s.offsetTop))}if(ua(o)<=0){const x=o.ownerDocument,y=x.body,v=getComputedStyle(y),w=x.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,k=Math.abs(o.clientWidth-y.clientWidth-w),C=getComputedStyle(o).scrollbarGutter==="stable both-edges"?k/2:k;C<=nh&&(l-=C)}return{width:l,height:c,x:p,y:d}}function ah(n,a){const t=pn(n,!0,a==="fixed"),e=t.top+n.clientTop,r=t.left+n.clientLeft,o=jn(n),s=n.clientWidth*o.x,l=n.clientHeight*o.y,c=r*o.x,p=e*o.y;return{width:s,height:l,x:c,y:p}}function Ni(n,a,t){let e;if(a==="viewport"||a==="layoutViewport")e=rh(n,t,a);else if(a==="document")e=th(Pt(n));else if(We(a))e=ah(a,t);else{const r=oc(n);e={x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}return zr(e)}function oh(n,a){const t=a.get(n);if(t)return t;let e=nr(n,[],!1).filter(l=>We(l)&&An(l)!=="body"),r=null;const o=tt(n).position==="fixed";let s=o?un(n):n;for(;We(s)&&!tr(s);){const l=tt(s),c=bo(s),p=r?r.position:o?"fixed":"";!c&&(p==="fixed"||p==="absolute"&&l.position==="static")?e=e.filter(h=>h!==s):r=l,s=un(s)}return a.set(n,e),e}function ih(n){let{element:a,boundary:t,rootBoundary:e,strategy:r}=n;const s=[...t==="clippingAncestors"?ca(a)?[]:oh(a,this._c):[].concat(t),e],l=Ni(a,s[0],r);let c=l.top,p=l.right,d=l.bottom,h=l.left;for(let x=1;x<s.length;x++){const y=Ni(a,s[x],r);c=an(y.top,c),p=En(y.right,p),d=En(y.bottom,d),h=an(y.left,h)}return{width:p-h,height:d-c,x:h,y:c}}function sh(n){const{width:a,height:t}=ac(n);return{width:a,height:t}}function lh(n,a,t){const e=qt(a),r=Pt(a),o=t==="fixed",s=pn(n,!0,o,a);let l={scrollLeft:0,scrollTop:0};const c=Dt(0);if((e||!o)&&((An(a)!=="body"||la(r))&&(l=da(a)),e)){const x=pn(a,!0,o,a);c.x=x.x+a.clientLeft,c.y=x.y+a.clientTop}!e&&r&&(c.x=ua(r));const p=r&&!e&&!o?ic(r,l):Dt(0),d=s.left+l.scrollLeft-c.x-p.x,h=s.top+l.scrollTop-c.y-p.y;return{x:d,y:h,width:s.width,height:s.height}}function ja(n){return tt(n).position==="static"}function Oi(n,a){if(!qt(n)||tt(n).position==="fixed")return null;if(a)return a(n);let t=n.offsetParent;return Pt(n)===t&&(t=t.ownerDocument.body),t}function sc(n,a){const t=He(n);if(ca(n))return t;if(!qt(n)){let r=un(n);for(;r&&!tr(r);){if(We(r)&&!ja(r))return r;r=un(r)}return t}let e=Oi(n,a);for(;e&&Qf(e)&&ja(e);)e=Oi(e,a);return e&&tr(e)&&ja(e)&&!bo(e)?t:e||Gf(n)||t}const ch=async function(n){const a=this.getOffsetParent||sc,t=this.getDimensions,e=await t(n.floating);return{reference:lh(n.reference,await a(n.floating),n.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function dh(n){return tt(n).direction==="rtl"}const uh={convertOffsetParentRelativeRectToViewportRelativeRect:Zf,getDocumentElement:Pt,getClippingRect:ih,getOffsetParent:sc,getElementRects:ch,getClientRects:eh,getDimensions:sh,getScale:jn,isElement:We,isRTL:dh};function lc(n,a){return n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function ph(n,a,t){let e=null,r;const o=Pt(n);function s(){var d;clearTimeout(r),(d=e)==null||d.disconnect(),e=null}function l(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),s();const x=n.getBoundingClientRect(),{left:y,top:v,width:w,height:k}=x;if(d||a(),!w||!k)return;const C=Sr(v),D=Sr(o.clientWidth-(y+w)),E=Sr(o.clientHeight-(v+k)),g=Sr(y),O={rootMargin:-C+"px "+-D+"px "+-E+"px "+-g+"px",threshold:an(0,En(1,h))||1};let M=!0;function S(P){const A=P[0].intersectionRatio;if(!lc(x,n.getBoundingClientRect()))return l();if(A!==h){if(!M)return l();A?l(!1,A):r=setTimeout(()=>{l(!1,1e-7)},1e3)}M=!1}try{e=new IntersectionObserver(S,{...O,root:o.ownerDocument})}catch{e=new IntersectionObserver(S,O)}e.observe(n)}const c=He(n),p=()=>l(t);return c.addEventListener("resize",p),l(!0),()=>{c.removeEventListener("resize",p),s()}}function fh(n,a,t,e){e===void 0&&(e={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=e,p=wo(n),d=r||o?[...p?nr(p):[],...a?nr(a):[]]:[];d.forEach(C=>{r&&C.addEventListener("scroll",t),o&&C.addEventListener("resize",t)});const h=p&&l?ph(p,t,o):null;let x=-1,y=null;s&&(y=new ResizeObserver(C=>{let[D]=C;D&&D.target===p&&y&&a&&(y.unobserve(a),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var E;(E=y)==null||E.observe(a)})),t()}),p&&!c&&y.observe(p),a&&y.observe(a));let v,w=c?pn(n):null;c&&k();function k(){const C=pn(n);w&&!lc(w,C)&&t(),w=C,v=requestAnimationFrame(k)}return t(),()=>{var C;d.forEach(D=>{r&&D.removeEventListener("scroll",t),o&&D.removeEventListener("resize",t)}),h==null||h(),(C=y)==null||C.disconnect(),y=null,c&&cancelAnimationFrame(v)}}const hh=Kf,mh=Hf,Ai=Bf,gh=(n,a,t)=>{const e=new Map,r=t??{},o={...uh,...r.platform,_c:e};return Wf(n,a,{...r,platform:o})};var xh=typeof document<"u",yh=function(){},Or=xh?b.useLayoutEffect:yh;function qr(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(!qr(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)&&!qr(n[o],a[o]))return!1}return!0}return n!==n&&a!==a}function cc(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Li(n,a){const t=cc(n);return Math.round(a*t)/t}function Ia(n){const a=b.useRef(n);return Or(()=>{a.current=n}),a}function bh(n){n===void 0&&(n={});const{placement:a="bottom",strategy:t="absolute",middleware:e=[],platform:r,elements:{reference:o,floating:s}={},transform:l=!0,whileElementsMounted:c,open:p}=n,[d,h]=b.useState({x:0,y:0,strategy:t,placement:a,middlewareData:{},isPositioned:!1}),[x,y]=b.useState(e);qr(x,e)||y(e);const[v,w]=b.useState(null),[k,C]=b.useState(null),D=b.useCallback(_=>{_!==O.current&&(O.current=_,w(_))},[]),E=b.useCallback(_=>{_!==M.current&&(M.current=_,C(_))},[]),g=o||v,T=s||k,O=b.useRef(null),M=b.useRef(null),S=b.useRef(d),P=c!=null,A=Ia(c),B=Ia(r),U=Ia(p),V=b.useCallback(()=>{if(!O.current||!M.current)return;const _={placement:a,strategy:t,middleware:x};B.current&&(_.platform=B.current),gh(O.current,M.current,_).then(re=>{const z={...re,isPositioned:U.current!==!1};G.current&&!qr(S.current,z)&&(S.current=z,Sd.flushSync(()=>{h(z)}))})},[x,a,t,B,U]);Or(()=>{p===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,h(_=>({..._,isPositioned:!1})))},[p]);const G=b.useRef(!1);Or(()=>(G.current=!0,()=>{G.current=!1}),[]),Or(()=>{if(g&&(O.current=g),T&&(M.current=T),g&&T){if(A.current)return A.current(g,T,V);V()}},[g,T,V,A,P]);const H=b.useMemo(()=>({reference:O,floating:M,setReference:D,setFloating:E}),[D,E]),N=b.useMemo(()=>({reference:g,floating:T}),[g,T]),F=b.useMemo(()=>{const _={position:t,left:0,top:0};if(!N.floating)return _;const re=Li(N.floating,d.x),z=Li(N.floating,d.y);return l?{..._,transform:"translate("+re+"px, "+z+"px)",...cc(N.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:re,top:z}},[t,l,N.floating,d.x,d.y]);return b.useMemo(()=>({...d,update:V,refs:H,elements:N,floatingStyles:F}),[d,V,H,N,F])}const vh=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?Ai({element:e.current,padding:r}).fn(t):{}:e?Ai({element:e,padding:r}).fn(t):{}}}},wh=(n,a)=>{const t=hh(n);return{name:t.name,fn:t.fn,options:[n,a]}},kh=(n,a)=>{const t=mh(n);return{name:t.name,fn:t.fn,options:[n,a]}},Dh=(n,a)=>{const t=vh(n);return{name:t.name,fn:t.fn,options:[n,a]}},dc=216n,Ch=(1n<<dc)-1n;function Sh(n){const a=typeof n=="bigint"?n:BigInt(n.trim());if(a<0n)throw new Error(`Invalid tokenId: ${String(n)}`);return{itemId:(a>>dc).toString(),issuedId:(a&Ch).toString()}}function Mh(n){if(!n)return null;try{return Sh(n).itemId}catch{return null}}const uc=["cancelled-listings"];function _h(n,a){a&&n.setQueryData(uc,t=>t!=null&&t.includes(a)?t:[...t??[],a])}function Fi(n,a){var t;if(a)return(t=n.getQueryData(uc))!=null&&t.includes(a)?void 0:a}function Yi(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 Pa(n,a,t){const{address:e,contractAddress:r,tokenId:o}=a;if(!r||!o)return;const s=`${r}-${o}`;n.cancelQueries({queryKey:["owned-token",r,o]}),n.cancelQueries({queryKey:["secondary-sale-state"]}),e&&n.cancelQueries({queryKey:["my-assets",e]});const l=t.kind==="gone";n.setQueriesData({queryKey:["owned-token",r,o]},p=>p&&(l?null:Yi(p,t)));const c=e?["my-assets",e]:["my-assets"];n.setQueriesData({queryKey:c},p=>p!=null&&p.pages?{...p,pages:p.pages.map(d=>{if(l){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?Yi(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[s]:d[s]={priceCredits:t.priceCredits,tradeId:t.tradeId??((h=d[s])==null?void 0:h.tradeId)??""},d})}function jh(n){return!(n.isMarket||n.forSale&&n.priceKnown||n.manage||n.soldOutWithResale||!n.stillResolving&&!n.resolvingTrade&&(n.isTokenRoute?!n.ownedAssetLoading:!n.deepLinkLoading))}const Ih="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==",Ph="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=",Eh=m.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
|
-
`,Th=m.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
|
-
`,$h=m.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
|
-
`,Rh=m.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
|
-
`,Nh=m.div`
|
|
42
|
-
display: flex;
|
|
43
|
-
align-items: center;
|
|
44
|
-
gap: 12px;
|
|
45
|
-
`,Oh=m.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
|
-
`,Ah=m.div`
|
|
68
|
-
flex: 1 1 0;
|
|
69
|
-
min-width: 0;
|
|
70
|
-
display: flex;
|
|
71
|
-
flex-direction: column;
|
|
72
|
-
gap: 32px;
|
|
73
|
-
padding: 8px;
|
|
74
|
-
`,Lh=m.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
|
-
`,Fh=m.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
|
-
`,Yh=m.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
|
-
`,Wh=m.div`
|
|
112
|
-
display: flex;
|
|
113
|
-
flex-direction: column;
|
|
114
|
-
gap: 12px;
|
|
115
|
-
`,Wi=m.button`
|
|
116
|
-
position: relative;
|
|
117
|
-
display: flex;
|
|
118
|
-
align-items: center;
|
|
119
|
-
justify-content: space-between;
|
|
120
|
-
width: 100%;
|
|
121
|
-
padding: 12px 12px 12px 0;
|
|
122
|
-
border-radius: 12px;
|
|
123
|
-
border: 0;
|
|
124
|
-
background: ${u.colors.white};
|
|
125
|
-
cursor: pointer;
|
|
126
|
-
text-align: left;
|
|
127
|
-
font-family: ${u.font.sans};
|
|
128
|
-
|
|
129
|
-
&::after {
|
|
130
|
-
content: '';
|
|
131
|
-
position: absolute;
|
|
132
|
-
inset: 0;
|
|
133
|
-
border-radius: inherit;
|
|
134
|
-
border: 0.5px solid ${u.colors.muted};
|
|
135
|
-
pointer-events: none;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
&[data-selected='true'] {
|
|
139
|
-
background: ${u.colors.media};
|
|
140
|
-
}
|
|
141
|
-
/* The gradient is masked to the border band alone, so the ring paints over nothing: a padding-box fill
|
|
142
|
-
here would sit on top of the row's content, since this layer is above it. */
|
|
143
|
-
&[data-selected='true']::after {
|
|
144
|
-
border: 3px solid transparent;
|
|
145
|
-
background: ${u.gradients.flare} border-box;
|
|
146
|
-
-webkit-mask:
|
|
147
|
-
linear-gradient(#000 0 0) padding-box,
|
|
148
|
-
linear-gradient(#000 0 0);
|
|
149
|
-
-webkit-mask-composite: xor;
|
|
150
|
-
mask-composite: exclude;
|
|
151
|
-
}
|
|
152
|
-
&[data-disabled='true'] {
|
|
153
|
-
cursor: not-allowed;
|
|
154
|
-
opacity: 0.55;
|
|
155
|
-
}
|
|
156
|
-
&:focus-visible {
|
|
157
|
-
outline: 2px solid ${u.colors.accent};
|
|
158
|
-
outline-offset: 2px;
|
|
159
|
-
}
|
|
160
|
-
`,Bi=m.div`
|
|
161
|
-
flex: none;
|
|
162
|
-
display: flex;
|
|
163
|
-
align-items: center;
|
|
164
|
-
justify-content: center;
|
|
165
|
-
min-width: 36px;
|
|
166
|
-
/* 12px on the left (per review) so the control clears the row's rounded corner; 9px elsewhere. */
|
|
167
|
-
padding: 9px 9px 9px 12px;
|
|
168
|
-
`,Hi=m.span`
|
|
169
|
-
display: grid;
|
|
170
|
-
place-items: center;
|
|
171
|
-
width: 20px;
|
|
172
|
-
height: 20px;
|
|
173
|
-
border-radius: 4px;
|
|
174
|
-
border: 2px solid ${u.colors.muted2};
|
|
175
|
-
background: ${u.colors.white};
|
|
176
|
-
|
|
177
|
-
&[data-checked='true'] {
|
|
178
|
-
border-color: ${u.colors.text};
|
|
179
|
-
background: ${u.colors.text};
|
|
180
|
-
}
|
|
181
|
-
.ico {
|
|
182
|
-
width: 14px;
|
|
183
|
-
height: 14px;
|
|
184
|
-
background: ${u.colors.white};
|
|
185
|
-
}
|
|
186
|
-
`,zi=m.div`
|
|
187
|
-
flex: 1 1 0;
|
|
188
|
-
min-width: 0;
|
|
189
|
-
display: flex;
|
|
190
|
-
align-items: center;
|
|
191
|
-
justify-content: space-between;
|
|
192
|
-
gap: 8px;
|
|
193
|
-
`,qi=m.div`
|
|
194
|
-
display: flex;
|
|
195
|
-
align-items: center;
|
|
196
|
-
gap: 13px;
|
|
197
|
-
min-width: 0;
|
|
198
|
-
`,Ki=m.span`
|
|
199
|
-
flex: none;
|
|
200
|
-
display: grid;
|
|
201
|
-
place-items: center;
|
|
202
|
-
`,Qi=m.img`
|
|
203
|
-
flex: none;
|
|
204
|
-
display: block;
|
|
205
|
-
width: ${({w:n})=>n}px;
|
|
206
|
-
height: ${({h:n})=>n}px;
|
|
207
|
-
object-fit: contain;
|
|
208
|
-
`,Ui=m.div`
|
|
209
|
-
display: flex;
|
|
210
|
-
flex-direction: column;
|
|
211
|
-
min-width: 0;
|
|
212
|
-
`,Vi=m.span`
|
|
213
|
-
text-transform: capitalize;
|
|
214
|
-
font-family: ${u.font.sans};
|
|
215
|
-
font-weight: 700;
|
|
216
|
-
font-size: 15px;
|
|
217
|
-
line-height: 26px;
|
|
218
|
-
letter-spacing: -0.2px;
|
|
219
|
-
color: ${u.colors.text2};
|
|
220
|
-
`,Gi=m.span`
|
|
221
|
-
display: flex;
|
|
222
|
-
align-items: center;
|
|
223
|
-
gap: 4px;
|
|
224
|
-
font-family: ${u.font.sans};
|
|
225
|
-
font-size: 12px;
|
|
226
|
-
line-height: 1;
|
|
227
|
-
color: ${u.colors.muted1};
|
|
228
|
-
|
|
229
|
-
/* A 13px slot holding a 10.4px glyph. */
|
|
230
|
-
.ico {
|
|
231
|
-
width: 13px;
|
|
232
|
-
height: 13px;
|
|
233
|
-
background: ${u.colors.text};
|
|
234
|
-
-webkit-mask-size: 10.4px 10.4px;
|
|
235
|
-
mask-size: 10.4px 10.4px;
|
|
236
|
-
-webkit-mask-position: left center;
|
|
237
|
-
mask-position: left center;
|
|
238
|
-
}
|
|
239
|
-
`,Xi=m.span`
|
|
240
|
-
font-size: 10.4px;
|
|
241
|
-
color: ${u.colors.text};
|
|
242
|
-
`;m.span`
|
|
243
|
-
font-family: ${u.font.sans};
|
|
244
|
-
font-size: 12px;
|
|
245
|
-
font-weight: 600;
|
|
246
|
-
color: ${u.colors.dclRed};
|
|
247
|
-
`;const Ji=m.div`
|
|
248
|
-
flex: none;
|
|
249
|
-
display: flex;
|
|
250
|
-
align-items: center;
|
|
251
|
-
gap: 6px;
|
|
252
|
-
|
|
253
|
-
.ico {
|
|
254
|
-
width: 24px;
|
|
255
|
-
height: 24px;
|
|
256
|
-
background: ${u.colors.text2};
|
|
257
|
-
-webkit-mask-size: 19.855px 19.855px;
|
|
258
|
-
mask-size: 19.855px 19.855px;
|
|
259
|
-
-webkit-mask-position: left center;
|
|
260
|
-
mask-position: left center;
|
|
261
|
-
}
|
|
262
|
-
span {
|
|
263
|
-
font-family: ${u.font.sans};
|
|
264
|
-
font-weight: 600;
|
|
265
|
-
font-size: 20px;
|
|
266
|
-
color: ${u.colors.text2};
|
|
267
|
-
}
|
|
268
|
-
`,Zi=m.div`
|
|
269
|
-
flex: none;
|
|
270
|
-
display: flex;
|
|
271
|
-
flex-direction: column;
|
|
272
|
-
align-items: flex-end;
|
|
273
|
-
gap: 2px;
|
|
274
|
-
`,Bh=m.button`
|
|
275
|
-
width: 100%;
|
|
276
|
-
height: 46px;
|
|
277
|
-
border: 0;
|
|
278
|
-
border-radius: 12px;
|
|
279
|
-
cursor: pointer;
|
|
280
|
-
background: ${u.gradients.amethyst};
|
|
281
|
-
color: ${u.colors.softWhite};
|
|
282
|
-
font-family: ${u.font.sans};
|
|
283
|
-
font-weight: 600;
|
|
284
|
-
font-size: 15px;
|
|
285
|
-
line-height: 24px;
|
|
286
|
-
letter-spacing: 0.46px;
|
|
287
|
-
text-transform: uppercase;
|
|
288
|
-
|
|
289
|
-
&:hover:not(:disabled) {
|
|
290
|
-
filter: brightness(1.05);
|
|
291
|
-
}
|
|
292
|
-
&:focus-visible {
|
|
293
|
-
outline: 2px solid ${u.colors.accent};
|
|
294
|
-
outline-offset: 2px;
|
|
295
|
-
}
|
|
296
|
-
&:disabled {
|
|
297
|
-
opacity: 0.6;
|
|
298
|
-
cursor: default;
|
|
299
|
-
}
|
|
300
|
-
`,Hh=m.img`
|
|
301
|
-
width: 13px;
|
|
302
|
-
height: 13px;
|
|
303
|
-
display: block;
|
|
304
|
-
`,zh=m.img`
|
|
305
|
-
width: 24px;
|
|
306
|
-
height: 24px;
|
|
307
|
-
display: block;
|
|
308
|
-
`;m.span`
|
|
309
|
-
flex: none;
|
|
310
|
-
width: 32px;
|
|
311
|
-
display: grid;
|
|
312
|
-
gap: 2px;
|
|
313
|
-
place-items: center;
|
|
314
|
-
|
|
315
|
-
.ico {
|
|
316
|
-
width: 15px;
|
|
317
|
-
height: 15px;
|
|
318
|
-
background: ${u.colors.text2};
|
|
319
|
-
}
|
|
320
|
-
img {
|
|
321
|
-
width: 15px;
|
|
322
|
-
height: 15px;
|
|
323
|
-
display: block;
|
|
324
|
-
}
|
|
325
|
-
`;m.div`
|
|
326
|
-
flex: none;
|
|
327
|
-
display: flex;
|
|
328
|
-
align-items: center;
|
|
329
|
-
gap: 4px;
|
|
330
|
-
|
|
331
|
-
.ico {
|
|
332
|
-
width: 18px;
|
|
333
|
-
height: 18px;
|
|
334
|
-
background: ${u.colors.text2};
|
|
335
|
-
}
|
|
336
|
-
img {
|
|
337
|
-
width: 18px;
|
|
338
|
-
height: 18px;
|
|
339
|
-
display: block;
|
|
340
|
-
}
|
|
341
|
-
span {
|
|
342
|
-
font-family: ${u.font.sans};
|
|
343
|
-
font-weight: 600;
|
|
344
|
-
font-size: 17px;
|
|
345
|
-
color: ${u.colors.text2};
|
|
346
|
-
}
|
|
347
|
-
`;m.span`
|
|
348
|
-
font-family: ${u.font.sans};
|
|
349
|
-
font-weight: 600;
|
|
350
|
-
font-size: 15px;
|
|
351
|
-
color: ${u.colors.muted};
|
|
352
|
-
`;const qh=m.span`
|
|
353
|
-
font-family: ${u.font.sans};
|
|
354
|
-
font-size: 11px;
|
|
355
|
-
line-height: 1.35;
|
|
356
|
-
color: ${u.colors.muted};
|
|
357
|
-
`,Kh=m.p`
|
|
358
|
-
display: flex;
|
|
359
|
-
align-items: flex-start;
|
|
360
|
-
gap: 12px;
|
|
361
|
-
margin: 0;
|
|
362
|
-
background: rgba(255, 162, 90, 0.3);
|
|
363
|
-
border-radius: ${u.radius.btn};
|
|
364
|
-
padding: 16px;
|
|
365
|
-
font-family: ${u.font.sans};
|
|
366
|
-
font-size: 14px;
|
|
367
|
-
line-height: 1.334;
|
|
368
|
-
color: ${u.colors.text2};
|
|
369
|
-
`;function Qh({item:n,priceCredits:a,priceCents:t,options:e,priceManaWei:r,balanceCredits:o,manaBalanceWei:s,onBuy:l,onClose:c,busy:p=!1,notice:d}){const h=e.find(S=>S.method==="credits")??null,x=e.find(S=>S.method==="mana")??null,y=e.find(S=>S.method==="combined")??null,[v,w]=b.useState(()=>h?new Set(["credits"]):y?new Set(["credits","mana"]):x?new Set(["mana"]):new Set),k=!!h||!!y,C=!!x||!!y;b.useEffect(()=>{w(S=>{const P=new Set(S);return P.has("credits")&&!k&&P.delete("credits"),P.has("mana")&&!C&&P.delete("mana"),P.size===S.size?S:P})},[k,C]);const D=v.has("credits"),E=v.has("mana"),g=D&&E?y?"combined":null:D?h?"credits":null:E&&x?"mana":null,T=g==="combined"&&y?y.credits:(h==null?void 0:h.credits)??At(t),O=g==="combined"&&y?y.manaWei:(x==null?void 0:x.manaWei)??r;function M(S){w(P=>{const A=new Set(P);return A.has(S)?A.delete(S):A.add(S),A})}return i.jsxs(Eh,{children:[i.jsxs(Th,{children:[i.jsx($h,{children:f("buyModal.choosePayment")}),i.jsx(Rh,{onClick:c,disabled:p,"aria-label":f("buyModal.close"),children:i.jsx(X,{name:"close",className:"ico"})})]}),i.jsxs(Nh,{children:[i.jsx(Oh,{children:n.thumbnail?i.jsx("img",{src:n.thumbnail,alt:""}):null}),i.jsxs(Ah,{children:[i.jsxs("div",{children:[i.jsx(Lh,{title:n.name,children:n.name||f("buyModal.itemFallback")}),n.creator?i.jsx(Fh,{children:i.jsx(jd,{address:n.creator})}):null]}),i.jsxs(Yh,{children:[i.jsx(Be,{}),i.jsx("span",{children:Ft(a)})]})]})]}),i.jsxs(Wh,{children:[i.jsxs(Wi,{type:"button","data-testid":"pay-with-credits","data-selected":D,"data-disabled":!k,disabled:p||!k,"aria-pressed":D,onClick:()=>M("credits"),children:[i.jsx(Bi,{children:i.jsx(Hi,{"data-checked":D,children:i.jsx(X,{name:"check",className:"ico"})})}),i.jsxs(zi,{children:[i.jsxs(qi,{children:[i.jsx(Ki,{children:i.jsx(Qi,{src:Ih,w:32.582,h:34.401,alt:"","aria-hidden":!0})}),i.jsxs(Ui,{children:[i.jsx(Vi,{children:Ze.name}),i.jsxs(Gi,{children:[f("buyModal.creditsBalanceLabel"),i.jsx(Be,{}),i.jsx(Xi,{children:Ft(o)})]})]})]}),i.jsx(Zi,{children:i.jsxs(Ji,{children:[i.jsx(Be,{}),i.jsx("span",{children:Ft(T)})]})})]})]}),i.jsxs(Wi,{type:"button","data-testid":"pay-with-mana","data-selected":E,"data-disabled":!C,disabled:p||!C,"aria-pressed":E,onClick:()=>M("mana"),children:[i.jsx(Bi,{children:i.jsx(Hi,{"data-checked":E,children:i.jsx(X,{name:"check",className:"ico"})})}),i.jsxs(zi,{children:[i.jsxs(qi,{children:[i.jsx(Ki,{children:i.jsx(Qi,{src:Ph,w:35.328,h:35.328,alt:"","aria-hidden":!0})}),i.jsxs(Ui,{children:[i.jsx(Vi,{children:f("buyModal.methodMana")}),i.jsxs(Gi,{children:[f("buyModal.manaBalanceLabel"),i.jsx(Hh,{src:_i,alt:"","aria-hidden":!0}),i.jsx(Xi,{children:gi(s)})]})]})]}),i.jsx(Zi,{children:C?i.jsx(i.Fragment,{children:i.jsxs(Ji,{children:[i.jsx(zh,{src:_i,alt:"","aria-hidden":!0}),i.jsx("span",{children:gi(O)})]})}):i.jsx(qh,{"data-testid":"mana-shortfall-note",children:f("buyModal.notEnoughMana")})})]})]})]}),d?i.jsx(Kh,{"data-testid":"price-changed",role:"status",children:d}):null,i.jsx(Bh,{type:"button","data-testid":"confirm-payment",disabled:p||g===null,onClick:()=>g&&l(g),children:f("buyModal.buy")})]})}function pc(){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 s=n.get(r);s?s.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 s of o)if(!a.has(s))return!0;return!1}}}const Uh=of("0.05");async function Vh(n){try{return(await new af(cn.rpcUrl).getBalance(n)).gte(Uh)}catch{return!1}}async function Gh(n,a){return na(n)?Vh(a):!1}function Xh({size:n=64,...a}){return i.jsxs("svg",{viewBox:"0 0 64 64",width:n,height:n,"aria-hidden":!0,...a,children:[i.jsx("circle",{cx:"32",cy:"32",r:"32",fill:"#34ce74"}),i.jsx("path",{d:"M20 33l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const Jh=n=>Ad(n.contractAddress,String(n.itemId));async function es(n,a={}){if(n.kind==="store")return BigInt(n.mint.item.priceWei);try{return Ld(await Fd(n.trade),n.coupon)}catch(t){return a.reportFailure!==!1&&je(t,{flow:"buy",step:"mana_price"}),null}}function ts(n){return n.kind==="trade"?n.trade.id:void 0}function ns(n){return n.contractAddress&&n.itemId!=null?{contractAddress:n.contractAddress,itemId:String(n.itemId)}:void 0}function io({item:n,onClose:a,resume:t=!1}){var fr,Wn;const{session:e}=dn(),{data:r}=Tl(e),{data:o}=Id(e),s=gn(),l=mn();async function c(){try{return await s.fetchQuery(Od())}catch{return}}async function p(){if(o!=null)return o;if(!e)return 0n;try{const $=await s.fetchQuery({queryKey:["mana-balance",e.address],queryFn:()=>Wd(e.address),staleTime:3e4});return G($),$}catch{return 0n}}const d=Kp().packs.slice(0,Qp),[h,x]=b.useState("loading"),[y,v]=b.useState(null),[w,k]=b.useState(null),[C,D]=b.useState(!1),[E,g]=b.useState(0),[T,O]=b.useState(""),[M,S]=b.useState(n.priceCredits),P=Math.max(0,M-((r==null?void 0:r.credits)??0)),A=(()=>{if(P<=0)return d;const $=d.filter(K=>K.credits>=P);return $.length>0?$:d})(),[B,U]=b.useState(null),[V,G]=b.useState(null),H=o??V??0n,[N,F]=b.useState(!1),[_,re]=b.useState(null),[z,q]=b.useState(0),[Q,De]=b.useState(null),[we,Te]=b.useState(!1),ae=b.useRef(null),Ce=b.useRef(!1),he=b.useRef(pc()),Ve=(Q==null?void 0:Q.credits)??M,_e=(r==null?void 0:r.credits)??0;b.useEffect(()=>(Ce.current=!1,()=>{Ce.current=!0}),[]);async function le($,K,J,Z){const ce=await p();if(Z!=null&&Z())return;const Se=ce>0n,ne=Se?await es(K):null;if(Z!=null&&Z())return;ne!=null?U(ne):Se&&F(!0);const vt=ki({priceCents:J,priceManaWei:ne??0n,balanceCents:(r==null?void 0:r.balanceCents)??0,manaBalanceWei:ce}).options.some(Rt=>Rt.method==="mana"||Rt.method==="combined"),Xe=$-((r==null?void 0:r.credits)??0),ba=d.find(Rt=>Rt.credits>=Xe)??d[d.length-1];O(ba.id),vt||fe("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:$,credits_balance:(r==null?void 0:r.credits)??0,shortfall:Math.max(0,Xe)}),x("nofunds")}b.useEffect(()=>{let $=!1;if(!e){x("error"),v(f("buyModal.signInToCheckout"));return}return(async()=>{try{const K=await Up(n,e.address,Pd,await c(),Jh,Ed);if(K.status==="own")throw new Error("You can't buy your own listing.");if(K.status==="no-price")throw new Error("price unavailable");if(K.status!=="buyable")throw new Error("not for sale");const J=Vp(K.line),Z=K.line.usdCents,ce=At(Z);if($)return;if(S(ce),re(J),q(Z),r!=null&&r.credits<ce){await le(ce,J,Z,()=>$);return}t?Et({sale:J,usdCents:Z}):x("ready")}catch(K){if($)return;fe(Ye(K)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Ue(K)}),yt(K)}})(),()=>{$=!0,ae.current&&e&&(ya([ae.current]),ae.current=null)}},[E]),b.useEffect(()=>{const $=(Q==null?void 0:Q.sale)??_;if(!$||h!=="ready"&&h!=="nofunds"||H<=0n||B!==null)return;let K=!1;return es($,{reportFailure:!N}).then(J=>{K||(J!=null?U(J):F(!0))}),()=>{K=!0}},[h,Q,_,H,B,N]);const xt=ki({priceCents:z,priceManaWei:B??0n,balanceCents:(r==null?void 0:r.balanceCents)??0,manaBalanceWei:H});async function Et($){const K=(Q==null?void 0:Q.sale)??($==null?void 0:$.sale)??_,J=(Q==null?void 0:Q.usdCents)??($==null?void 0:$.usdCents)??z;if(!e||!K||J<=0)return;x("processing"),v(null),Te(!1);let Z=Q;if(!Z)try{const{credit:ne,maxCreditedValue:ke,usdCents:vt}=await ro(e.identity,J,ts(K),ns(n));if(Ce.current){Le([ne.id]);return}ae.current=ne.id,s.invalidateQueries({queryKey:["usd-balance"]});const Xe=At(vt);if(Z={sale:K,credit:ne,maxCreditedValue:ke,usdCents:vt,credits:Xe},De(Z),Xe!==At(J)){S(Xe),q(vt),Te(!0),x("ready");return}}catch(ne){if(uf(ne)){s.invalidateQueries({queryKey:["usd-balance"]}),await le(At(J),K,J);return}Ye(ne)||je(ne,{flow:"buy",step:"authorize"}),fe(Ye(ne)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Ue(ne)}),v(Wt(ne,f("buyModal.error.generic"),{sale:!0})),x("error");return}if(!Z)return;let ce=!1,Se;try{const ne={purchase:Hu(Z.sale,[Z.credit],Z.maxCreditedValue),buyer:e.address,signer:e.signer,onBroadcast:({txHash:ke})=>he.current.broadcast(Z.credit.id,ke),onReverted:({txHash:ke})=>{ke&&he.current.reverted(ke)}};if(he.current.submitStarted(Z.credit.id),Ul())try{Se=await cf(ne),he.current.broadcast(Z.credit.id,Se),await Xl(Se),ce=!0}catch(ke){if(ke instanceof Jl)ce=!0;else if(ke instanceof Zl){if(ke.reason==="relayer-unreachable")throw he.current.unobservable(Z.credit.id),ke;if(!na(e.providerType))throw ke;Se=await Si(ne)}else throw Se&&he.current.reverted(Se),ke}else Se=await Si(ne)}catch(ne){he.current.submitFinished(Z.credit.id),Ye(ne)||je(ne,{flow:"buy",step:"submit",gasless:ce}),Qt([Z.credit.id]),ae.current=null,fe(Ye(ne)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Ue(ne)}),s.invalidateQueries({queryKey:["usd-balance"]}),yt(ne);return}he.current.submitFinished(Z.credit.id),ae.current=null;try{zu(s,n),fe("Shop Completed Purchase",{...Ca([n]),payment_type:"credits",no_crypto_step:ce,transaction_hash:Se??null})}catch(ne){je(ne,{flow:"buy",step:"post_purchase"})}x("complete")}function Le($){if(!e||$.length===0)return Promise.resolve(!1);const K=$.filter(J=>!he.current.mayBeConsumed(J));return K.length===0?Promise.resolve(!1):$l(e.identity,K).then(()=>!0,()=>!0)}function Qt($){D(!0),Le($).then(K=>{K||D(!1)})}function ya($){return Le($.filter(K=>!he.current.isInFlight(K)))}function lr(){s.invalidateQueries({queryKey:["mana-balance"]}),s.invalidateQueries({queryKey:["usd-balance"]}),s.invalidateQueries({queryKey:["detail-trade"]}),s.invalidateQueries({queryKey:["shop-item"]}),s.invalidateQueries({queryKey:["owned-token",n.contractAddress,n.tokenId]}),s.invalidateQueries({queryKey:["public-token",n.contractAddress,n.tokenId]}),s.invalidateQueries({queryKey:["item-resales",n.contractAddress,n.itemId]}),s.invalidateQueries({queryKey:["shop-items"]}),s.invalidateQueries({queryKey:["catalog-items"]}),s.invalidateQueries({queryKey:["my-assets"]}),s.invalidateQueries({queryKey:["purchases"]}),s.invalidateQueries({queryKey:["owned-item-count"]}),s.invalidateQueries({queryKey:["overview-listings"]}),s.invalidateQueries({queryKey:["upsell-listings"]})}async function cr(){var K;const $=(Q==null?void 0:Q.sale)??_;if(!(!e||!$)){ae.current&&(Qt([ae.current]),ae.current=null),x("processing"),v(null);try{const J=(K=Ci(xt,"mana"))==null?void 0:K.manaWei,Z=$.kind==="trade"?await _p({trade:$.trade,coupon:$.coupon,buyer:e.address,signer:e.signer,manaWei:J}):await jp({mint:$.mint,buyer:e.address,signer:e.signer,manaWei:J});fe("Shop Completed Purchase",{...Ca([n]),payment_type:"mana",transaction_hash:Z??null}),lr(),x("complete")}catch(J){Ye(J)||je(J,{flow:"buy_mana",step:"submit"}),fe(Ye(J)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Ue(J)}),yt(J)}}}async function Ln(){const $=(Q==null?void 0:Q.sale)??_,K=Ci(xt,"combined");if(!e||!$||!K)return;x("processing"),v(null),ae.current&&(await Le([ae.current])&&D(!0),ae.current=null);let J=null,Z;try{const{credit:ce}=await ro(e.identity,K.creditsCents,ts($),ns(n));J=ce.id,he.current.submitStarted(ce.id);const Se={buyer:e.address,signer:e.signer,credits:[ce],manaGapWei:K.manaWei,providerType:e.providerType,onBroadcast:({txHash:ne})=>he.current.broadcast(ce.id,ne),onReverted:({txHash:ne})=>{ne&&he.current.reverted(ne)},onUnobservable:()=>he.current.unobservable(ce.id)};Z=$.kind==="trade"?await Ip({trade:$.trade,coupon:$.coupon,...Se}):await Pp({mint:$.mint,...Se})}catch(ce){J&&he.current.submitFinished(J),J&&Qt([J]),Ye(ce)||je(ce,{flow:"buy_credits_and_mana",step:"submit"}),fe(Ye(ce)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Ue(ce)}),s.invalidateQueries({queryKey:["usd-balance"]}),yt(ce);return}J&&he.current.submitFinished(J);try{lr(),fe("Shop Completed Purchase",{...Ca([n]),payment_type:"credits_and_mana",transaction_hash:Z??null})}catch(ce){je(ce,{flow:"buy_credits_and_mana",step:"post_purchase"})}x("complete")}async function Ut(){if(!(!T||!e)){try{sessionStorage.setItem(Ii,JSON.stringify(n))}catch{}ae.current&&(Le([ae.current]),ae.current=null),De(null),x("loading");try{const $=await Gp(T,{address:e.address,identity:e.identity});if($.url){window.location.href=$.url;return}l("/credits")}catch($){je($,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(Ii)}catch{}v(f("buyModal.error.creditsCheckout")),x("error")}}}const[qe,yn]=b.useState(null);function Re($,K){const{spender:J,chainId:Z}=Ep($,K);return Zp(Z,J)}function yt($){if(v(Wt($,f("buyModal.error.generic"),{sale:!0})),x("error"),!Td($)||!e)return;const K=$.required;(async()=>{if(await Gh(e.providerType,e.address)){k(K);return}v(f("buyModal.error.relayDownNoRail"))})()}async function Tt($){if(e){k(null);try{await Yd(e.web3Provider,$)}catch(K){Ye(K)||je(K,{flow:"buy",step:"switch_chain"}),k($);return}ur()}}function $t($){$==="mana"?cr():$==="combined"?Ln():Et()}const bt=b.useRef(!1);async function Ge($){var K;if(!bt.current){bt.current=!0;try{const J=(Q==null?void 0:Q.sale)??_;if($==="credits"||!J||!e){$t($);return}const Z=Re($,J),ce=((K=xt.options.find(ne=>ne.method===$))==null?void 0:K.manaWei)??0n,Se=await Vl(Z,e.address,ce).catch(()=>!0);if(Jp(e.providerType,Se)){yn({auth:Z,rail:$});return}$t($)}finally{bt.current=!1}}}const Fn=xt.options.some($=>$.method==="mana"||$.method==="combined"),dr=h==="ready"&&(Fn||xt.manaShortfall!=null)||h==="nofunds"&&Fn;function ur(){v(null),De(null),Te(!1),D(!1),x("loading"),g($=>$+1)}const Vt=h==="error"&&w===null&&(!!ae.current||C),Yn=h==="processing",pr=h==="complete"?f("buyModal.titleComplete"):h==="error"?f("cartCheckout.errorTitle"):h==="nofunds"?f("buyModal.titleNoFunds"):f("buyModal.titleBuy");return qe&&e?i.jsx(Hl,{auth:qe.auth,signer:e.signer,title:f(qe.rail==="mana"?"authorizeStep.manaTitle":"authorizeStep.buyTitle"),name:f(qe.rail==="mana"?"authorizeStep.manaName":"authorizeStep.buyName"),reason:f(qe.rail==="mana"?"authorizeStep.manaReason":"authorizeStep.buyReason"),icon:i.jsx("img",{src:Xp,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{rail:$}=qe;yn(null),$t($)},onCancel:()=>yn(null),onClose:()=>{yn(null),a()}}):i.jsxs(qu,{role:"dialog","aria-modal":"true","aria-label":f("buyModal.dialogAria",{name:n.name}),"data-testid":"buy-modal",children:[i.jsx(Ku,{onClick:Yn?void 0:a,"aria-hidden":!0}),i.jsx(Qu,{"data-tall":h==="processing"||h==="loading"||void 0,children:dr?i.jsx(Qh,{item:n,priceCredits:Ve,priceCents:z,options:xt.options,priceManaWei:B??0n,balanceCredits:_e,manaBalanceWei:H,onBuy:$=>void Ge($),onClose:a,busy:Yn,notice:we?f("buyModal.priceChanged"):r!=null&&r.held?f("buyModal.heldExplainer",{credits:r.held.credits,currency:Ze.name}):null}):i.jsxs(i.Fragment,{children:[i.jsxs(Uu,{children:[i.jsxs(Vu,{children:[i.jsx(Gu,{children:pr}),!Yn&&i.jsx(Xu,{onClick:a,"aria-label":f("buyModal.close"),children:i.jsx(Ju,{})})]}),i.jsxs(Zu,{children:[i.jsx(ep,{children:h==="nofunds"?f("buyModal.dclBalance"):f("buyModal.myCreditsBalance")}),i.jsx(tp,{}),i.jsx(np,{children:Ft(_e)})]})]}),h==="loading"&&i.jsx(Zt,{"data-processing":!0,children:i.jsx("span",{className:"spinner","aria-hidden":!0})}),h==="error"&&i.jsxs(Zt,{children:[i.jsxs(rp,{"data-testid":"buy-error",children:[i.jsx(ap,{src:op,alt:"",width:64,height:80}),i.jsxs(ip,{children:[i.jsx("b",{children:f("cartCheckout.errorHeadline")})," ",y??(Vt?null:f("cartCheckout.errorBody")),Vt?i.jsxs(i.Fragment,{children:[y?" ":"",f("cartCheckout.heldLead",{currency:Ze.name}),i.jsx("b",{children:f("cartCheckout.heldBold")}),f("cartCheckout.heldTail",{currency:Ze.name})]}):null]})]}),w!==null?i.jsxs(wn,{children:[i.jsx(wt,{"data-variant":"outline",onClick:a,children:f("buyModal.cancel")}),i.jsx(wt,{"data-variant":"purple","data-testid":"switch-and-retry",onClick:()=>void Tt(w),children:f("buyModal.error.switchAndRetry",{network:$d(w)})})]}):Vt?i.jsx(wn,{children:i.jsx(wt,{"data-variant":"purple","data-full":!0,onClick:a,children:f("cartCheckout.gotIt")})}):i.jsxs(wn,{children:[i.jsx(wt,{"data-variant":"outline",onClick:a,children:f("buyModal.cancel")}),i.jsx(wt,{"data-variant":"purple",onClick:ur,children:f("cartCheckout.tryAgain")})]})]}),h==="nofunds"&&i.jsxs(Zt,{children:[N&&B===null&&H>0n?i.jsxs(wr,{"data-testid":"mana-price-unavailable",children:[i.jsx(kr,{}),i.jsx(Dr,{children:f("buyModal.manaPriceUnavailable")})]}):null,r!=null&&r.held?i.jsxs(wr,{"data-testid":"nofunds-held",children:[i.jsx(kr,{}),i.jsx(Dr,{children:f("buyModal.heldExplainer",{credits:r.held.credits,currency:Ze.name})})]}):null,i.jsxs(wr,{children:[i.jsx(kr,{}),i.jsxs(Dr,{children:[i.jsx("b",{children:f("buyModal.insufficientFunds")})," ",f("buyModal.warningNeedToBuy")," ",i.jsx("b",{children:f("buyModal.warningCreditsAmount",{count:Math.max(1,Ve-_e)})})," ",f("buyModal.warningToPurchase",{count:1}),Mn()?null:i.jsxs(i.Fragment,{children:[" ",i.jsx(sp,{href:Rd("/credits"),target:"_blank",rel:"noopener noreferrer",children:f("buyModal.warningLearnMore")})]})]})]}),i.jsx(rs,{item:n,priceCredits:Ve}),Mn()?null:i.jsxs(i.Fragment,{children:[i.jsx(lp,{"data-testid":"credit-packs",children:A.map($=>{const K=$.credits,J=$.id===T;return i.jsxs(cp,{"data-on":J||void 0,onClick:()=>O($.id),children:[i.jsx(dp,{src:up,alt:""}),i.jsx(pp,{children:Ft(K)}),i.jsxs(fp,{children:["($",$.usd.toFixed(2),")"]})]},$.id)})}),i.jsxs(hp,{children:[i.jsxs(mp,{children:[i.jsx(gp,{}),i.jsx("span",{children:Ft(((fr=A.find($=>$.id===T))==null?void 0:fr.credits)??0)})]}),i.jsxs(xp,{children:["$",(((Wn=A.find($=>$.id===T))==null?void 0:Wn.usd)??0).toFixed(2)]})]})]}),i.jsxs(wn,{children:[i.jsx(wt,{"data-variant":"outline",onClick:a,children:f("buyModal.cancel")}),Mn()?null:i.jsx(wt,{"data-variant":"gradient",onClick:()=>void Ut(),children:f("buyModal.buy")})]})]}),h==="ready"&&i.jsxs(Zt,{children:[we&&i.jsxs(wr,{"data-testid":"price-changed",role:"status",children:[i.jsx(kr,{}),i.jsx(Dr,{children:f("buyModal.priceChanged")})]}),i.jsx(rs,{item:n,priceCredits:Ve}),i.jsx(wn,{children:i.jsx(wt,{"data-variant":"gradient","data-full":!0,onClick:()=>void Et(),children:f("buyModal.buy")})})]}),h==="processing"&&i.jsxs(Zt,{"data-processing":!0,children:[i.jsx(zl,{src:Rl,alt:"",width:61,height:61}),i.jsx(ql,{children:t?f("buyModal.completingPurchase"):f("buyModal.completingTransaction")}),i.jsx(Kl,{"aria-hidden":!0,children:i.jsx(Ql,{})})]}),h==="complete"&&i.jsxs(Zt,{children:[i.jsx(pf,{}),i.jsxs(yp,{children:[i.jsx(Xh,{}),i.jsxs(bp,{children:[i.jsx("b",{children:f("getCredits.successTitle")})," ",f("buyModal.successBody")]})]}),i.jsxs(wn,{"data-stack":!0,children:[i.jsx(wt,{"data-variant":"outline",onClick:()=>l(Nd([n.category])),children:f("buyModal.myAssets")}),Mn()?i.jsx(Di,{"data-variant":"ruby",href:ff([n]),onClick:a,children:f("success.goToBackpack")}):i.jsxs(Di,{"data-variant":"ruby",href:hf,target:"_blank",rel:"noreferrer",onClick:a,children:[f("buyModal.tryInWorld"),i.jsx(mf,{})]})]})]})]})})]})}function rs({item:n,priceCredits:a}){return i.jsxs(vp,{children:[i.jsx(wp,{children:n.thumbnail?i.jsx("img",{src:n.thumbnail,alt:""}):null}),i.jsxs(kp,{children:[i.jsxs("div",{children:[i.jsx(Dp,{title:n.name,children:n.name||f("buyModal.itemFallback")}),n.creator?i.jsx(Cp,{address:n.creator}):null]}),i.jsxs(Sp,{children:[i.jsx(Mp,{}),i.jsx("span",{children:Ft(a)})]})]})]})}function fc(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=fc(n[a]))&&(e&&(e+=" "),e+=t)}else for(t in n)n[t]&&(e&&(e+=" "),e+=t);return e}function Ee(){for(var n,a,t=0,e="",r=arguments.length;t<r;t++)(n=arguments[t])&&(a=fc(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 ue(n,a){return n instanceof Date?new n.constructor(a):new Date(a)}function et(n,a){const t=Y(n);return isNaN(a)?ue(n,NaN):(a&&t.setDate(t.getDate()+a),t)}function nt(n,a){const t=Y(n);if(isNaN(a))return ue(n,NaN);if(!a)return t;const e=t.getDate(),r=ue(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 ko(n,a){const t=+Y(n);return ue(n,t+a)}const hc=6048e5,Zh=864e5,pa=6e4,fa=36e5,em=1e3;function tm(n,a){return ko(n,a*fa)}let nm={};function xn(){return nm}function jt(n,a){var l,c,p,d;const t=xn(),e=(a==null?void 0:a.weekStartsOn)??((c=(l=a==null?void 0:a.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??t.weekStartsOn??((d=(p=t.locale)==null?void 0:p.options)==null?void 0:d.weekStartsOn)??0,r=Y(n),o=r.getDay(),s=(o<e?7:0)+o-e;return r.setDate(r.getDate()-s),r.setHours(0,0,0,0),r}function $n(n){return jt(n,{weekStartsOn:1})}function mc(n){const a=Y(n),t=a.getFullYear(),e=ue(n,0);e.setFullYear(t+1,0,4),e.setHours(0,0,0,0);const r=$n(e),o=ue(n,0);o.setFullYear(t,0,4),o.setHours(0,0,0,0);const s=$n(o);return a.getTime()>=r.getTime()?t+1:a.getTime()>=s.getTime()?t:t-1}function fn(n){const a=Y(n);return a.setHours(0,0,0,0),a}function Kr(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 Rn(n,a){const t=fn(n),e=fn(a),r=+t-Kr(t),o=+e-Kr(e);return Math.round((r-o)/Zh)}function rm(n){const a=mc(n),t=ue(n,0);return t.setFullYear(a,0,4),t.setHours(0,0,0,0),$n(t)}function so(n,a){return ko(n,a*pa)}function Do(n,a){const t=a*3;return nt(n,t)}function am(n,a){return ko(n,a*1e3)}function Qr(n,a){const t=a*7;return et(n,t)}function Ct(n,a){return nt(n,a*12)}function as(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 os(n){let a;return n.forEach(t=>{const e=Y(t);(!a||a>e||isNaN(+e))&&(a=e)}),a||new Date(NaN)}function om(n,a){const t=fn(n),e=fn(a);return+t==+e}function St(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Ur(n){if(!St(n)&&typeof n!="number")return!1;const a=Y(n);return!isNaN(Number(a))}function Vr(n,a){const t=Y(n),e=Y(a),r=t.getFullYear()-e.getFullYear(),o=t.getMonth()-e.getMonth();return r*12+o}function on(n){const a=Y(n);return Math.trunc(a.getMonth()/3)+1}function Gr(n,a){const t=Y(n),e=Y(a),r=t.getFullYear()-e.getFullYear(),o=on(t)-on(e);return r*4+o}function Xr(n,a){const t=Y(n),e=Y(a);return t.getFullYear()-e.getFullYear()}function im(n,a){const t=Y(n),e=Y(a),r=is(t,e),o=Math.abs(Rn(t,e));t.setDate(t.getDate()-r*o);const s=+(is(t,e)===-r),l=r*(o-s);return l===0?0:l}function is(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 gc(n){const a=Y(n);return a.setHours(23,59,59,999),a}function xc(n){const a=Y(n),t=a.getMonth();return a.setFullYear(a.getFullYear(),t+1,0),a.setHours(23,59,59,999),a}function lo(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 yc(n){const a=Y(n);return a.setDate(1),a.setHours(0,0,0,0),a}function bc(n){const a=Y(n),t=a.getFullYear();return a.setFullYear(t+1,0,0),a.setHours(23,59,59,999),a}function ha(n){const a=Y(n),t=ue(n,0);return t.setFullYear(a.getFullYear(),0,1),t.setHours(0,0,0,0),t}function sm(n,a){var l,c;const t=xn(),e=t.weekStartsOn??((c=(l=t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??0,r=Y(n),o=r.getDay(),s=(o<e?-7:0)+6-(o-e);return r.setDate(r.getDate()+s),r.setHours(23,59,59,999),r}const lm={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"}},cm=(n,a,t)=>{let e;const r=lm[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 Ea(n){return(a={})=>{const t=a.width?String(a.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const dm={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},um={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},pm={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fm={date:Ea({formats:dm,defaultWidth:"full"}),time:Ea({formats:um,defaultWidth:"full"}),dateTime:Ea({formats:pm,defaultWidth:"full"})},hm={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mm=(n,a,t,e)=>hm[n];function zn(n){return(a,t)=>{const e=t!=null&&t.context?String(t.context):"standalone";let r;if(e==="formatting"&&n.formattingValues){const s=n.defaultFormattingWidth||n.defaultWidth,l=t!=null&&t.width?String(t.width):s;r=n.formattingValues[l]||n.formattingValues[s]}else{const s=n.defaultWidth,l=t!=null&&t.width?String(t.width):n.defaultWidth;r=n.values[l]||n.values[s]}const o=n.argumentCallback?n.argumentCallback(a):a;return r[o]}}const gm={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xm={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ym={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"]},bm={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"]},vm={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"}},wm={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"}},km=(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"},Dm={ordinalNumber:km,era:zn({values:gm,defaultWidth:"wide"}),quarter:zn({values:xm,defaultWidth:"wide",argumentCallback:n=>n-1}),month:zn({values:ym,defaultWidth:"wide"}),day:zn({values:bm,defaultWidth:"wide"}),dayPeriod:zn({values:vm,defaultWidth:"wide",formattingValues:wm,defaultFormattingWidth:"wide"})};function qn(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 s=o[0],l=e&&n.parsePatterns[e]||n.parsePatterns[n.defaultParseWidth],c=Array.isArray(l)?Sm(l,h=>h.test(s)):Cm(l,h=>h.test(s));let p;p=n.valueCallback?n.valueCallback(c):c,p=t.valueCallback?t.valueCallback(p):p;const d=a.slice(s.length);return{value:p,rest:d}}}function Cm(n,a){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&a(n[t]))return t}function Sm(n,a){for(let t=0;t<n.length;t++)if(a(n[t]))return t}function Mm(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 s=n.valueCallback?n.valueCallback(o[0]):o[0];s=t.valueCallback?t.valueCallback(s):s;const l=a.slice(r.length);return{value:s,rest:l}}}const _m=/^(\d+)(th|st|nd|rd)?/i,jm=/\d+/i,Im={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},Pm={any:[/^b/i,/^(a|c)/i]},Em={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Tm={any:[/1/i,/2/i,/3/i,/4/i]},$m={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},Rm={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]},Nm={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},Om={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]},Am={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},Lm={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}},Fm={ordinalNumber:Mm({matchPattern:_m,parsePattern:jm,valueCallback:n=>parseInt(n,10)}),era:qn({matchPatterns:Im,defaultMatchWidth:"wide",parsePatterns:Pm,defaultParseWidth:"any"}),quarter:qn({matchPatterns:Em,defaultMatchWidth:"wide",parsePatterns:Tm,defaultParseWidth:"any",valueCallback:n=>n+1}),month:qn({matchPatterns:$m,defaultMatchWidth:"wide",parsePatterns:Rm,defaultParseWidth:"any"}),day:qn({matchPatterns:Nm,defaultMatchWidth:"wide",parsePatterns:Om,defaultParseWidth:"any"}),dayPeriod:qn({matchPatterns:Am,defaultMatchWidth:"any",parsePatterns:Lm,defaultParseWidth:"any"})},vc={code:"en-US",formatDistance:cm,formatLong:fm,formatRelative:mm,localize:Dm,match:Fm,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ym(n){const a=Y(n);return Rn(a,ha(a))+1}function Co(n){const a=Y(n),t=+$n(a)-+rm(a);return Math.round(t/hc)+1}function So(n,a){var d,h,x,y;const t=Y(n),e=t.getFullYear(),r=xn(),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,s=ue(n,0);s.setFullYear(e+1,0,o),s.setHours(0,0,0,0);const l=jt(s,a),c=ue(n,0);c.setFullYear(e,0,o),c.setHours(0,0,0,0);const p=jt(c,a);return t.getTime()>=l.getTime()?e+1:t.getTime()>=p.getTime()?e:e-1}function Wm(n,a){var l,c,p,d;const t=xn(),e=(a==null?void 0:a.firstWeekContainsDate)??((c=(l=a==null?void 0:a.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??t.firstWeekContainsDate??((d=(p=t.locale)==null?void 0:p.options)==null?void 0:d.firstWeekContainsDate)??1,r=So(n,a),o=ue(n,0);return o.setFullYear(r,0,e),o.setHours(0,0,0,0),jt(o,a)}function wc(n,a){const t=Y(n),e=+jt(t,a)-+Wm(t,a);return Math.round(e/hc)+1}function de(n,a){const t=n<0?"-":"",e=Math.abs(n).toString().padStart(a,"0");return t+e}const Ot={y(n,a){const t=n.getFullYear(),e=t>0?t:1-t;return de(a==="yy"?e%100:e,a.length)},M(n,a){const t=n.getMonth();return a==="M"?String(t+1):de(t+1,2)},d(n,a){return de(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 de(n.getHours()%12||12,a.length)},H(n,a){return de(n.getHours(),a.length)},m(n,a){return de(n.getMinutes(),a.length)},s(n,a){return de(n.getSeconds(),a.length)},S(n,a){const t=a.length,e=n.getMilliseconds(),r=Math.trunc(e*Math.pow(10,t-3));return de(r,a.length)}},kn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ss={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 Ot.y(n,a)},Y:function(n,a,t,e){const r=So(n,e),o=r>0?r:1-r;if(a==="YY"){const s=o%100;return de(s,2)}return a==="Yo"?t.ordinalNumber(o,{unit:"year"}):de(o,a.length)},R:function(n,a){const t=mc(n);return de(t,a.length)},u:function(n,a){const t=n.getFullYear();return de(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 de(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 de(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 Ot.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 de(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=wc(n,e);return a==="wo"?t.ordinalNumber(r,{unit:"week"}):de(r,a.length)},I:function(n,a,t){const e=Co(n);return a==="Io"?t.ordinalNumber(e,{unit:"week"}):de(e,a.length)},d:function(n,a,t){return a==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):Ot.d(n,a)},D:function(n,a,t){const e=Ym(n);return a==="Do"?t.ordinalNumber(e,{unit:"dayOfYear"}):de(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 de(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 de(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 de(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=kn.noon:e===0?r=kn.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=kn.evening:e>=12?r=kn.afternoon:e>=4?r=kn.morning:r=kn.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 Ot.h(n,a)},H:function(n,a,t){return a==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):Ot.H(n,a)},K:function(n,a,t){const e=n.getHours()%12;return a==="Ko"?t.ordinalNumber(e,{unit:"hour"}):de(e,a.length)},k:function(n,a,t){let e=n.getHours();return e===0&&(e=24),a==="ko"?t.ordinalNumber(e,{unit:"hour"}):de(e,a.length)},m:function(n,a,t){return a==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):Ot.m(n,a)},s:function(n,a,t){return a==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):Ot.s(n,a)},S:function(n,a){return Ot.S(n,a)},X:function(n,a,t){const e=n.getTimezoneOffset();if(e===0)return"Z";switch(a){case"X":return cs(e);case"XXXX":case"XX":return en(e);case"XXXXX":case"XXX":default:return en(e,":")}},x:function(n,a,t){const e=n.getTimezoneOffset();switch(a){case"x":return cs(e);case"xxxx":case"xx":return en(e);case"xxxxx":case"xxx":default:return en(e,":")}},O:function(n,a,t){const e=n.getTimezoneOffset();switch(a){case"O":case"OO":case"OOO":return"GMT"+ls(e,":");case"OOOO":default:return"GMT"+en(e,":")}},z:function(n,a,t){const e=n.getTimezoneOffset();switch(a){case"z":case"zz":case"zzz":return"GMT"+ls(e,":");case"zzzz":default:return"GMT"+en(e,":")}},t:function(n,a,t){const e=Math.trunc(n.getTime()/1e3);return de(e,a.length)},T:function(n,a,t){const e=n.getTime();return de(e,a.length)}};function ls(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+de(o,2)}function cs(n,a){return n%60===0?(n>0?"-":"+")+de(Math.abs(n)/60,2):en(n,a)}function en(n,a=""){const t=n>0?"-":"+",e=Math.abs(n),r=de(Math.trunc(e/60),2),o=de(e%60,2);return t+r+a+o}const ds=(n,a)=>{switch(n){case"P":return a.date({width:"short"});case"PP":return a.date({width:"medium"});case"PPP":return a.date({width:"long"});case"PPPP":default:return a.date({width:"full"})}},kc=(n,a)=>{switch(n){case"p":return a.time({width:"short"});case"pp":return a.time({width:"medium"});case"ppp":return a.time({width:"long"});case"pppp":default:return a.time({width:"full"})}},Bm=(n,a)=>{const t=n.match(/(P+)(p+)?/)||[],e=t[1],r=t[2];if(!r)return ds(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}}",ds(e,a)).replace("{{time}}",kc(r,a))},Jr={p:kc,P:Bm},Hm=/^D+$/,zm=/^Y+$/,qm=["D","DD","YY","YYYY"];function Dc(n){return Hm.test(n)}function Cc(n){return zm.test(n)}function co(n,a,t){const e=Km(n,a,t);if(console.warn(e),qm.includes(n))throw new RangeError(e)}function Km(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 Qm=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Um=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vm=/^'([^]*?)'?$/,Gm=/''/g,Xm=/[a-zA-Z]/;function us(n,a,t){var d,h,x,y,v,w,k,C;const e=xn(),r=(t==null?void 0:t.locale)??e.locale??vc,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,s=(t==null?void 0:t.weekStartsOn)??((w=(v=t==null?void 0:t.locale)==null?void 0:v.options)==null?void 0:w.weekStartsOn)??e.weekStartsOn??((C=(k=e.locale)==null?void 0:k.options)==null?void 0:C.weekStartsOn)??0,l=Y(n);if(!Ur(l))throw new RangeError("Invalid time value");let c=a.match(Um).map(D=>{const E=D[0];if(E==="p"||E==="P"){const g=Jr[E];return g(D,r.formatLong)}return D}).join("").match(Qm).map(D=>{if(D==="''")return{isToken:!1,value:"'"};const E=D[0];if(E==="'")return{isToken:!1,value:Jm(D)};if(ss[E])return{isToken:!0,value:D};if(E.match(Xm))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:D}});r.localize.preprocessor&&(c=r.localize.preprocessor(l,c));const p={firstWeekContainsDate:o,weekStartsOn:s,locale:r};return c.map(D=>{if(!D.isToken)return D.value;const E=D.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&Cc(E)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&Dc(E))&&co(E,a,String(n));const g=ss[E[0]];return g(l,E,r.localize,p)}).join("")}function Jm(n){const a=n.match(Vm);return a?a[1].replace(Gm,"'"):n}function ps(n){return Y(n).getDate()}function Zm(n){return Y(n).getDay()}function eg(n){const a=Y(n),t=a.getFullYear(),e=a.getMonth(),r=ue(n,0);return r.setFullYear(t,e+1,0),r.setHours(0,0,0,0),r.getDate()}function tg(){return Object.assign({},xn())}function mt(n){return Y(n).getHours()}function ng(n){let t=Y(n).getDay();return t===0&&(t=7),t}function gt(n){return Y(n).getMinutes()}function Oe(n){return Y(n).getMonth()}function Mt(n){return Y(n).getSeconds()}function uo(n){return Y(n).getTime()}function te(n){return Y(n).getFullYear()}function Ht(n,a){const t=Y(n),e=Y(a);return t.getTime()>e.getTime()}function hn(n,a){const t=Y(n),e=Y(a);return+t<+e}function rg(n,a){const t=Y(n),e=Y(a);return+t==+e}function ag(n,a){const t=a instanceof Date?ue(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 og=10;class Sc{constructor(){W(this,"subPriority",0)}validate(a,t){return!0}}class ig extends Sc{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 sg extends Sc{constructor(){super(...arguments);W(this,"priority",og);W(this,"subPriority",-1)}set(t,e){return e.timestampIsSet?t:ue(t,ag(t,Date))}}class se{run(a,t,e,r){const o=this.parse(a,t,e,r);return o?{setter:new ig(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(a,t,e){return!0}}class lg extends se{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 be={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}/},pt={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 ve(n,a){return n&&{value:a(n.value),rest:n.rest}}function ge(n,a){const t=a.match(n);return t?{value:parseInt(t[0],10),rest:a.slice(t[0].length)}:null}function ft(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,s=t[5]?parseInt(t[5],10):0;return{value:e*(r*fa+o*pa+s*em),rest:a.slice(t[0].length)}}function Mc(n){return ge(be.anyDigitsSigned,n)}function xe(n,a){switch(n){case 1:return ge(be.singleDigit,a);case 2:return ge(be.twoDigits,a);case 3:return ge(be.threeDigits,a);case 4:return ge(be.fourDigits,a);default:return ge(new RegExp("^\\d{1,"+n+"}"),a)}}function Zr(n,a){switch(n){case 1:return ge(be.singleDigitSigned,a);case 2:return ge(be.twoDigitsSigned,a);case 3:return ge(be.threeDigitsSigned,a);case 4:return ge(be.fourDigitsSigned,a);default:return ge(new RegExp("^-?\\d{1,"+n+"}"),a)}}function Mo(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 _c(n,a){const t=a>0,e=t?a:1-a;let r;if(e<=50)r=n||100;else{const o=e+50,s=Math.trunc(o/100)*100,l=n>=o%100;r=n+s-(l?100:0)}return t?r:1-r}function jc(n){return n%400===0||n%4===0&&n%100!==0}class cg extends se{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=s=>({year:s,isTwoDigitYear:e==="yy"});switch(e){case"y":return ve(xe(4,t),o);case"yo":return ve(r.ordinalNumber(t,{unit:"year"}),o);default:return ve(xe(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 l=_c(r.year,o);return t.setFullYear(l,0,1),t.setHours(0,0,0,0),t}const s=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}}class dg extends se{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=s=>({year:s,isTwoDigitYear:e==="YY"});switch(e){case"Y":return ve(xe(4,t),o);case"Yo":return ve(r.ordinalNumber(t,{unit:"year"}),o);default:return ve(xe(e.length,t),o)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r,o){const s=So(t,o);if(r.isTwoDigitYear){const c=_c(r.year,s);return t.setFullYear(c,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),jt(t,o)}const l=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(l,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),jt(t,o)}}class ug extends se{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 Zr(e==="R"?4:e.length,t)}set(t,e,r){const o=ue(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),$n(o)}}class pg extends se{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 Zr(e==="u"?4:e.length,t)}set(t,e,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}class fg extends se{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 xe(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 hg extends se{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 xe(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 mg extends se{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=s=>s-1;switch(e){case"M":return ve(ge(be.month,t),o);case"MM":return ve(xe(2,t),o);case"Mo":return ve(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 gg extends se{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=s=>s-1;switch(e){case"L":return ve(ge(be.month,t),o);case"LL":return ve(xe(2,t),o);case"Lo":return ve(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 xg(n,a,t){const e=Y(n),r=wc(e,t)-a;return e.setDate(e.getDate()-r*7),e}class yg extends se{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 ge(be.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return xe(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r,o){return jt(xg(t,r,o),o)}}function bg(n,a){const t=Y(n),e=Co(t)-a;return t.setDate(t.getDate()-e*7),t}class vg extends se{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 ge(be.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return xe(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r){return $n(bg(t,r))}}const wg=[31,28,31,30,31,30,31,31,30,31,30,31],kg=[31,29,31,30,31,30,31,31,30,31,30,31];class Dg extends se{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 ge(be.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return xe(e.length,t)}}validate(t,e){const r=t.getFullYear(),o=jc(r),s=t.getMonth();return o?e>=1&&e<=kg[s]:e>=1&&e<=wg[s]}set(t,e,r){return t.setDate(r),t.setHours(0,0,0,0),t}}class Cg extends se{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 ge(be.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return xe(e.length,t)}}validate(t,e){const r=t.getFullYear();return jc(r)?e>=1&&e<=366:e>=1&&e<=365}set(t,e,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}}function _o(n,a,t){var h,x,y,v;const e=xn(),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??((v=(y=e.locale)==null?void 0:y.options)==null?void 0:v.weekStartsOn)??0,o=Y(n),s=o.getDay(),c=(a%7+7)%7,p=7-r,d=a<0||a>6?a-(s+p)%7:(c+p)%7-(s+p)%7;return et(o,d)}class Sg extends se{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=_o(t,r,o),t.setHours(0,0,0,0),t}}class Mg extends se{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 s=l=>{const c=Math.floor((l-1)/7)*7;return(l+o.weekStartsOn+6)%7+c};switch(e){case"e":case"ee":return ve(xe(e.length,t),s);case"eo":return ve(r.ordinalNumber(t,{unit:"day"}),s);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=_o(t,r,o),t.setHours(0,0,0,0),t}}class _g extends se{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 s=l=>{const c=Math.floor((l-1)/7)*7;return(l+o.weekStartsOn+6)%7+c};switch(e){case"c":case"cc":return ve(xe(e.length,t),s);case"co":return ve(r.ordinalNumber(t,{unit:"day"}),s);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=_o(t,r,o),t.setHours(0,0,0,0),t}}function jg(n,a){const t=Y(n),e=ng(t),r=a-e;return et(t,r)}class Ig extends se{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=s=>s===0?7:s;switch(e){case"i":case"ii":return xe(e.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return ve(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 ve(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return ve(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiii":default:return ve(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=jg(t,r),t.setHours(0,0,0,0),t}}class Pg extends se{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(Mo(r),0,0,0),t}}class Eg extends se{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(Mo(r),0,0,0),t}}class Tg extends se{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(Mo(r),0,0,0),t}}class $g extends se{constructor(){super(...arguments);W(this,"priority",70);W(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,r){switch(e){case"h":return ge(be.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return xe(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 Rg extends se{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 ge(be.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return xe(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,r){return t.setHours(r,0,0,0),t}}class Ng extends se{constructor(){super(...arguments);W(this,"priority",70);W(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,r){switch(e){case"K":return ge(be.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return xe(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 Og extends se{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 ge(be.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return xe(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 Ag extends se{constructor(){super(...arguments);W(this,"priority",60);W(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"m":return ge(be.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return xe(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setMinutes(r,0,0),t}}class Lg extends se{constructor(){super(...arguments);W(this,"priority",50);W(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"s":return ge(be.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return xe(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setSeconds(r,0),t}}class Fg extends se{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 ve(xe(e.length,t),r)}set(t,e,r){return t.setMilliseconds(r),t}}class Yg extends se{constructor(){super(...arguments);W(this,"priority",10);W(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return ft(pt.basicOptionalMinutes,t);case"XX":return ft(pt.basic,t);case"XXXX":return ft(pt.basicOptionalSeconds,t);case"XXXXX":return ft(pt.extendedOptionalSeconds,t);case"XXX":default:return ft(pt.extended,t)}}set(t,e,r){return e.timestampIsSet?t:ue(t,t.getTime()-Kr(t)-r)}}class Wg extends se{constructor(){super(...arguments);W(this,"priority",10);W(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return ft(pt.basicOptionalMinutes,t);case"xx":return ft(pt.basic,t);case"xxxx":return ft(pt.basicOptionalSeconds,t);case"xxxxx":return ft(pt.extendedOptionalSeconds,t);case"xxx":default:return ft(pt.extended,t)}}set(t,e,r){return e.timestampIsSet?t:ue(t,t.getTime()-Kr(t)-r)}}class Bg extends se{constructor(){super(...arguments);W(this,"priority",40);W(this,"incompatibleTokens","*")}parse(t){return Mc(t)}set(t,e,r){return[ue(t,r*1e3),{timestampIsSet:!0}]}}class Hg extends se{constructor(){super(...arguments);W(this,"priority",20);W(this,"incompatibleTokens","*")}parse(t){return Mc(t)}set(t,e,r){return[ue(t,r),{timestampIsSet:!0}]}}const zg={G:new lg,y:new cg,Y:new dg,R:new ug,u:new pg,Q:new fg,q:new hg,M:new mg,L:new gg,w:new yg,I:new vg,d:new Dg,D:new Cg,E:new Sg,e:new Mg,c:new _g,i:new Ig,a:new Pg,b:new Eg,B:new Tg,h:new $g,H:new Rg,K:new Ng,k:new Og,m:new Ag,s:new Lg,S:new Fg,X:new Yg,x:new Wg,t:new Bg,T:new Hg},qg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Kg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Qg=/^'([^]*?)'?$/,Ug=/''/g,Vg=/\S/,Gg=/[a-zA-Z]/;function Ta(n,a,t,e){var w,k,C,D,E,g,T,O;const r=tg(),o=(e==null?void 0:e.locale)??r.locale??vc,s=(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??((D=(C=r.locale)==null?void 0:C.options)==null?void 0:D.firstWeekContainsDate)??1,l=(e==null?void 0:e.weekStartsOn)??((g=(E=e==null?void 0:e.locale)==null?void 0:E.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((O=(T=r.locale)==null?void 0:T.options)==null?void 0:O.weekStartsOn)??0;if(a==="")return n===""?Y(t):ue(t,NaN);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:o},p=[new sg],d=a.match(Kg).map(M=>{const S=M[0];if(S in Jr){const P=Jr[S];return P(M,o.formatLong)}return M}).join("").match(qg),h=[];for(let M of d){!(e!=null&&e.useAdditionalWeekYearTokens)&&Cc(M)&&co(M,a,n),!(e!=null&&e.useAdditionalDayOfYearTokens)&&Dc(M)&&co(M,a,n);const S=M[0],P=zg[S];if(P){const{incompatibleTokens:A}=P;if(Array.isArray(A)){const U=h.find(V=>A.includes(V.token)||V.token===S);if(U)throw new RangeError(`The format string mustn't contain \`${U.fullToken}\` and \`${M}\` at the same time`)}else if(P.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${M}\` and any other token at the same time`);h.push({token:S,fullToken:M});const B=P.run(n,M,o.match,c);if(!B)return ue(t,NaN);p.push(B.setter),n=B.rest}else{if(S.match(Gg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(M==="''"?M="'":S==="'"&&(M=Xg(M)),n.indexOf(M)===0)n=n.slice(M.length);else return ue(t,NaN)}}if(n.length>0&&Vg.test(n))return ue(t,NaN);const x=p.map(M=>M.priority).sort((M,S)=>S-M).filter((M,S,P)=>P.indexOf(M)===S).map(M=>p.filter(S=>S.priority===M).sort((S,P)=>P.subPriority-S.subPriority)).map(M=>M[0]);let y=Y(t);if(isNaN(y.getTime()))return ue(t,NaN);const v={};for(const M of x){if(!M.validate(y,c))return ue(t,NaN);const S=M.set(y,v,c);Array.isArray(S)?(y=S[0],Object.assign(v,S[1])):y=S}return ue(t,y)}function Xg(n){return n.match(Qg)[1].replace(Ug,"'")}function Jg(n,a){const t=Y(n),e=Y(a);return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function Zg(n,a){const t=lo(n),e=lo(a);return+t==+e}function ex(n,a){const t=Y(n),e=Y(a);return t.getFullYear()===e.getFullYear()}function rr(n,a){const t=+Y(n),[e,r]=[+Y(a.start),+Y(a.end)].sort((o,s)=>o-s);return t>=e&&t<=r}function tx(n,a){return et(n,-1)}function nx(n,a){const e=ix(n);let r;if(e.date){const c=sx(e.date,2);r=lx(c.restDateString,c.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);const o=r.getTime();let s=0,l;if(e.time&&(s=cx(e.time),isNaN(s)))return new Date(NaN);if(e.timezone){if(l=dx(e.timezone),isNaN(l))return new Date(NaN)}else{const c=new Date(o+s),p=new Date(0);return p.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),p.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),p}return new Date(o+s+l)}const Mr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},rx=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ax=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ox=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ix(n){const a={},t=n.split(Mr.dateTimeDelimiter);let e;if(t.length>2)return a;if(/:/.test(t[0])?e=t[0]:(a.date=t[0],e=t[1],Mr.timeZoneDelimiter.test(a.date)&&(a.date=n.split(Mr.timeZoneDelimiter)[0],e=n.substr(a.date.length,n.length))),e){const r=Mr.timezone.exec(e);r?(a.time=e.replace(r[1],""),a.timezone=r[1]):a.time=e}return a}function sx(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 lx(n,a){if(a===null)return new Date(NaN);const t=n.match(rx);if(!t)return new Date(NaN);const e=!!t[4],r=Kn(t[1]),o=Kn(t[2])-1,s=Kn(t[3]),l=Kn(t[4]),c=Kn(t[5])-1;if(e)return mx(a,l,c)?ux(a,l,c):new Date(NaN);{const p=new Date(0);return!fx(a,o,s)||!hx(a,r)?new Date(NaN):(p.setUTCFullYear(a,o,Math.max(r,s)),p)}}function Kn(n){return n?parseInt(n):1}function cx(n){const a=n.match(ax);if(!a)return NaN;const t=$a(a[1]),e=$a(a[2]),r=$a(a[3]);return gx(t,e,r)?t*fa+e*pa+r*1e3:NaN}function $a(n){return n&&parseFloat(n.replace(",","."))||0}function dx(n){if(n==="Z")return 0;const a=n.match(ox);if(!a)return 0;const t=a[1]==="+"?-1:1,e=parseInt(a[2]),r=a[3]&&parseInt(a[3])||0;return xx(e,r)?t*(e*fa+r*pa):NaN}function ux(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 px=[31,null,31,30,31,30,31,31,30,31,30,31];function Ic(n){return n%400===0||n%4===0&&n%100!==0}function fx(n,a,t){return a>=0&&a<=11&&t>=1&&t<=(px[a]||(Ic(n)?29:28))}function hx(n,a){return a>=1&&a<=(Ic(n)?366:365)}function mx(n,a,t){return a>=1&&a<=53&&t>=0&&t<=6}function gx(n,a,t){return n===24?a===0&&t===0:t>=0&&t<60&&a>=0&&a<60&&n>=0&&n<25}function xx(n,a){return a>=0&&a<=59}function ze(n,a){const t=Y(n),e=t.getFullYear(),r=t.getDate(),o=ue(n,0);o.setFullYear(e,a,15),o.setHours(0,0,0,0);const s=eg(o);return t.setMonth(a,Math.min(r,s)),t}function yx(n,a){let t=Y(n);return isNaN(+t)?ue(n,NaN):(a.year!=null&&t.setFullYear(a.year),a.month!=null&&(t=ze(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 Ar(n,a){const t=Y(n);return t.setHours(a),t}function Lr(n,a){const t=Y(n);return t.setMinutes(a),t}function Sn(n,a){const t=Y(n),e=Math.trunc(t.getMonth()/3)+1,r=a-e;return ze(t,t.getMonth()+r*3)}function Fr(n,a){const t=Y(n);return t.setSeconds(a),t}function ct(n,a){const t=Y(n);return isNaN(+t)?ue(n,NaN):(t.setFullYear(a),t)}function sn(n,a){return nt(n,-a)}function Pc(n,a){return Do(n,-1)}function fs(n,a){return Qr(n,-1)}function Nn(n,a){return Ct(n,-a)}var bx=typeof document<"u",vx=function(){},ea=bx?b.useLayoutEffect:vx;const wx={...Il},kx=wx.useInsertionEffect,Dx=kx||(n=>n());function Cx(n){const a=b.useRef(()=>{});return Dx(()=>{a.current=n}),b.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 Sx={...Il};let hs=!1,Mx=0;const ms=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Mx++;function _x(){const[n,a]=b.useState(()=>hs?ms():void 0);return ea(()=>{n==null&&a(ms())},[]),b.useEffect(()=>{hs=!0},[]),n}const jx=Sx.useId,Ec=jx||_x,Ix=b.forwardRef(function(a,t){const{context:{placement:e,elements:{floating:r},middlewareData:{arrow:o,shift:s}},width:l=14,height:c=7,tipRadius:p=0,strokeWidth:d=0,staticOffset:h,stroke:x,d:y,style:{transform:v,...w}={},...k}=a,C=Ec(),[D,E]=b.useState(!1);if(ea(()=>{if(!r)return;tt(r).direction==="rtl"&&E(!0)},[r]),!r)return null;const[g,T]=e.split("-"),O=g==="top"||g==="bottom";let M=h;(O&&s!=null&&s.x||!O&&s!=null&&s.y)&&(M=null);const S=d*2,P=S/2,A=l/2*(p/-8+1),B=c/2*p/4,U=!!y,V=M&&T==="end"?"bottom":"top";let G=M&&T==="end"?"right":"left";M&&D&&(G=T==="end"?"left":"right");const H=(o==null?void 0:o.x)!=null?M||o.x:"",N=(o==null?void 0:o.y)!=null?M||o.y:"",F=y||"M0,0"+(" H"+l)+(" L"+(l-A)+","+(c-B))+(" Q"+l/2+","+c+" "+A+","+(c-B))+" Z",_={top:U?"rotate(180deg)":"",left:U?"rotate(90deg)":"rotate(-90deg)",bottom:U?"":"rotate(180deg)",right:U?"rotate(-90deg)":"rotate(90deg)"}[g];return i.jsxs("svg",{...k,"aria-hidden":!0,ref:t,width:U?l:l+S,height:l,viewBox:"0 0 "+l+" "+(c>l?c:l),style:{position:"absolute",pointerEvents:"none",[G]:H,[V]:N,[g]:O||U?"100%":"calc(100% - "+S/2+"px)",transform:[_,v].filter(re=>!!re).join(" "),...w},children:[S>0&&i.jsx("path",{clipPath:"url(#"+C+")",fill:"none",stroke:x,strokeWidth:S+(y?0:1),d:F}),i.jsx("path",{stroke:S&&!y?k.fill:"none",d:F}),i.jsx("clipPath",{id:C,children:i.jsx("rect",{x:-P,y:P*(U?-1:1),width:l+S,height:l})})]})});function Px(){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 Ex=b.createContext(null),Tx=b.createContext(null),$x=()=>{var n;return((n=b.useContext(Ex))==null?void 0:n.id)||null},Rx=()=>b.useContext(Tx);function Nx(n){const{open:a=!1,onOpenChange:t,elements:e}=n,r=Ec(),o=b.useRef({}),[s]=b.useState(()=>Px()),l=$x()!=null,[c,p]=b.useState(e.reference),d=Cx((y,v,w)=>{o.current.openEvent=y?v:void 0,s.emit("openchange",{open:y,event:v,reason:w,nested:l}),t==null||t(y,v,w)}),h=b.useMemo(()=>({setPositionReference:p}),[]),x=b.useMemo(()=>({reference:c||e.reference||null,floating:e.floating||null,domReference:e.reference}),[c,e.reference,e.floating]);return b.useMemo(()=>({dataRef:o,open:a,onOpenChange:d,elements:x,events:s,floatingId:r,refs:h}),[a,d,x,s,r,h])}function Ox(n){var a,t;let{elements:e,...r}=n===void 0?{}:n;const{nodeId:o}=r,s=Nx({...r,elements:{reference:(a=e==null?void 0:e.reference)!=null?a:null,floating:(t=e==null?void 0:e.floating)!=null?t:null}}),l=r.rootContext||s,c=l.elements,[p,d]=b.useState(null),[h,x]=b.useState(null),v=(c==null?void 0:c.domReference)||p,w=b.useRef(null),k=Rx();ea(()=>{v&&(w.current=v)},[v]);const C=bh({...r,elements:{...c,...h&&{reference:h}}}),D=b.useCallback(M=>{const S=We(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),getClientRects:()=>M.getClientRects(),contextElement:M}:M;x(S),C.refs.setReference(S)},[C.refs]),E=b.useCallback(M=>{(We(M)||M===null)&&(w.current=M,d(M)),(We(C.refs.reference.current)||C.refs.reference.current===null||M!==null&&!We(M))&&C.refs.setReference(M)},[C.refs]),g=b.useMemo(()=>({...C.refs,setReference:E,setPositionReference:D,domReference:w}),[C.refs,E,D]),T=b.useMemo(()=>({...C.elements,domReference:v}),[C.elements,v]),O=b.useMemo(()=>({...C,...l,refs:g,elements:T,nodeId:o}),[C,g,T,o,l]);return ea(()=>{l.dataRef.current.floatingContext=O;const M=k==null?void 0:k.nodesRef.current.find(S=>S.id===o);M&&(M.context=O)}),b.useMemo(()=>({...C,context:O,refs:g,elements:T}),[C,g,T,O])}/*!
|
|
370
|
-
react-datepicker v7.6.0
|
|
371
|
-
https://github.com/Hacker0x01/react-datepicker
|
|
372
|
-
Released under the MIT License.
|
|
373
|
-
*/var po=function(a,t){return po=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])},po(a,t)};function Ie(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");po(n,a);function t(){this.constructor=n}n.prototype=a===null?Object.create(a):(t.prototype=a.prototype,new t)}var ie=function(){return ie=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++){e=arguments[r];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},ie.apply(this,arguments)};function ht(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 Ax=function(n){var a=n.showTimeSelectOnly,t=a===void 0?!1:a,e=n.showTime,r=e===void 0?!1:e,o=n.className,s=n.children,l=t?"Choose Time":"Choose Date".concat(r?" and Time":"");return j.createElement("div",{className:o,role:"dialog","aria-label":l,"aria-modal":"true"},s)},Lx=function(n,a){var t=b.useRef(null),e=b.useRef(n);e.current=n;var r=b.useCallback(function(o){var s;t.current&&!t.current.contains(o.target)&&(a&&o.target instanceof HTMLElement&&o.target.classList.contains(a)||(s=e.current)===null||s===void 0||s.call(e,o))},[a]);return b.useEffect(function(){return document.addEventListener("mousedown",r),function(){document.removeEventListener("mousedown",r)}},[r]),t},ma=function(n){var a=n.children,t=n.onClickOutside,e=n.className,r=n.containerRef,o=n.style,s=n.ignoreClass,l=Lx(t,s);return j.createElement("div",{className:e,style:o,ref:function(c){l.current=c,r&&(r.current=c)}},a)},L;(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"})(L||(L={}));function Tc(){var n=typeof window<"u"?window:globalThis;return n}var ir=12,Fx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;function pe(n){if(n==null)return new Date;var a=typeof n=="string"?nx(n):Y(n);return kt(a)?a:new Date}function Ra(n,a,t,e,r){var o,s=null,l=ln(t)||ln(Zn()),c=!0;if(Array.isArray(a))return a.forEach(function(d){var h=Ta(n,d,new Date,{locale:l,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});e&&(c=kt(h,r)&&n===me(h,d,t)),kt(h,r)&&c&&(s=h)}),s;if(s=Ta(n,a,new Date,{locale:l,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0}),e)c=kt(s)&&n===me(s,a,t);else if(!kt(s)){var p=((o=a.match(Fx))!==null&&o!==void 0?o:[]).map(function(d){var h=d[0];if(h==="p"||h==="P"){var x=Jr[h];return l?x(d,l.formatLong):h}return d}).join("");n.length>0&&(s=Ta(n,p.slice(0,n.length),new Date,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})),kt(s)||(s=new Date(n))}return kt(s)&&c?s:null}function kt(n,a){return Ur(n)&&!hn(n,a??new Date("1/1/1800"))}function me(n,a,t){if(t==="en")return us(n,a,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var e=t?ln(t):void 0;return t&&!e&&console.warn('A locale object was not found for the provided string ["'.concat(t,'"].')),!e&&Zn()&&ln(Zn())&&(e=ln(Zn())),us(n,a,{locale:e,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function Ke(n,a){var t=a.dateFormat,e=a.locale,r=Array.isArray(t)&&t.length>0?t[0]:t;return n&&me(n,r,e)||""}function Yx(n,a,t){if(!n)return"";var e=Ke(n,t),r=a?Ke(a,t):"";return"".concat(e," - ").concat(r)}function Wx(n,a){if(!(n!=null&&n.length))return"";var t=n[0]?Ke(n[0],a):"";if(n.length===1)return t;if(n.length===2&&n[1]){var e=Ke(n[1],a);return"".concat(t,", ").concat(e)}var r=n.length-1;return"".concat(t," (+").concat(r,")")}function Na(n,a){var t=a.hour,e=t===void 0?0:t,r=a.minute,o=r===void 0?0:r,s=a.second,l=s===void 0?0:s;return Ar(Lr(Fr(n,l),o),e)}function Bx(n){return Co(n)}function Hx(n,a){return me(n,"ddd",a)}function Yr(n){return fn(n)}function Yt(n,a,t){var e=ln(a||Zn());return jt(n,{locale:e,weekStartsOn:t})}function _t(n){return yc(n)}function Gn(n){return ha(n)}function gs(n){return lo(n)}function xs(){return fn(pe())}function ys(n){return gc(n)}function zx(n){return sm(n)}function qx(n){return xc(n)}function dt(n,a){return n&&a?ex(n,a):!n&&!a}function Ne(n,a){return n&&a?Jg(n,a):!n&&!a}function ta(n,a){return n&&a?Zg(n,a):!n&&!a}function oe(n,a){return n&&a?om(n,a):!n&&!a}function nn(n,a){return n&&a?rg(n,a):!n&&!a}function Xn(n,a,t){var e,r=fn(a),o=gc(t);try{e=rr(n,{start:r,end:o})}catch{e=!1}return e}function Zn(){var n=Tc();return n.__localeId__}function ln(n){if(typeof n=="string"){var a=Tc();return a.__localeData__?a.__localeData__[n]:void 0}else return n}function Kx(n,a,t){return a(me(n,"EEEE",t))}function Qx(n,a){return me(n,"EEEEEE",a)}function Ux(n,a){return me(n,"EEE",a)}function jo(n,a){return me(ze(pe(),n),"LLLL",a)}function $c(n,a){return me(ze(pe(),n),"LLL",a)}function Vx(n,a){return me(Sn(pe(),n),"QQQ",a)}function Qe(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,s=t.excludeDateIntervals,l=t.includeDates,c=t.includeDateIntervals,p=t.filterDate;return sr(n,{minDate:e,maxDate:r})||o&&o.some(function(d){return d instanceof Date?oe(n,d):oe(n,d.date)})||s&&s.some(function(d){var h=d.start,x=d.end;return rr(n,{start:h,end:x})})||l&&!l.some(function(d){return oe(n,d)})||c&&!c.some(function(d){var h=d.start,x=d.end;return rr(n,{start:h,end:x})})||p&&!p(pe(n))||!1}function Io(n,a){var t=a===void 0?{}:a,e=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some(function(o){var s=o.start,l=o.end;return rr(n,{start:s,end:l})}):e&&e.some(function(o){var s;return o instanceof Date?oe(n,o):oe(n,(s=o.date)!==null&&s!==void 0?s:new Date)})||!1}function Rc(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,s=t.includeDates,l=t.filterDate;return sr(n,{minDate:e?yc(e):void 0,maxDate:r?xc(r):void 0})||(o==null?void 0:o.some(function(c){return Ne(n,c instanceof Date?c:c.date)}))||s&&!s.some(function(c){return Ne(n,c)})||l&&!l(pe(n))||!1}function _r(n,a,t,e){var r=te(n),o=Oe(n),s=te(a),l=Oe(a),c=te(e);return r===s&&r===c?o<=t&&t<=l:r<s?c===r&&o<=t||c===s&&l>=t||c<s&&c>r:!1}function Gx(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,s=t.includeDates;return sr(n,{minDate:e,maxDate:r})||o&&o.some(function(l){return Ne(l instanceof Date?l:l.date,n)})||s&&!s.some(function(l){return Ne(l,n)})||!1}function jr(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,s=t.includeDates,l=t.filterDate;return sr(n,{minDate:e,maxDate:r})||(o==null?void 0:o.some(function(c){return ta(n,c instanceof Date?c:c.date)}))||s&&!s.some(function(c){return ta(n,c)})||l&&!l(pe(n))||!1}function Ir(n,a,t){if(!a||!t||!Ur(a)||!Ur(t))return!1;var e=te(a),r=te(t);return e<=n&&r>=n}function Wr(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.maxDate,o=t.excludeDates,s=t.includeDates,l=t.filterDate,c=new Date(n,0,1);return sr(c,{minDate:e?ha(e):void 0,maxDate:r?bc(r):void 0})||(o==null?void 0:o.some(function(p){return dt(c,p instanceof Date?p:p.date)}))||s&&!s.some(function(p){return dt(c,p)})||l&&!l(pe(c))||!1}function Pr(n,a,t,e){var r=te(n),o=on(n),s=te(a),l=on(a),c=te(e);return r===s&&r===c?o<=t&&t<=l:r<s?c===r&&o<=t||c===s&&l>=t||c<s&&c>r:!1}function sr(n,a){var t,e=a===void 0?{}:a,r=e.minDate,o=e.maxDate;return(t=r&&Rn(n,r)<0||o&&Rn(n,o)>0)!==null&&t!==void 0?t:!1}function bs(n,a){return a.some(function(t){return mt(t)===mt(n)&>(t)===gt(n)&&Mt(t)===Mt(n)})}function vs(n,a){var t=a===void 0?{}:a,e=t.excludeTimes,r=t.includeTimes,o=t.filterTime;return e&&bs(n,e)||r&&!bs(n,r)||o&&!o(n)||!1}function ws(n,a){var t=a.minTime,e=a.maxTime;if(!t||!e)throw new Error("Both minTime and maxTime props required");var r=pe();r=Ar(r,mt(n)),r=Lr(r,gt(n)),r=Fr(r,Mt(n));var o=pe();o=Ar(o,mt(t)),o=Lr(o,gt(t)),o=Fr(o,Mt(t));var s=pe();s=Ar(s,mt(e)),s=Lr(s,gt(e)),s=Fr(s,Mt(e));var l;try{l=!rr(r,{start:o,end:s})}catch{l=!1}return l}function ks(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.includeDates,o=sn(n,1);return e&&Vr(e,o)>0||r&&r.every(function(s){return Vr(s,o)>0})||!1}function Ds(n,a){var t=a===void 0?{}:a,e=t.maxDate,r=t.includeDates,o=nt(n,1);return e&&Vr(o,e)>0||r&&r.every(function(s){return Vr(o,s)>0})||!1}function Xx(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.includeDates,o=ha(n),s=Pc(o);return e&&Gr(e,s)>0||r&&r.every(function(l){return Gr(l,s)>0})||!1}function Jx(n,a){var t=a===void 0?{}:a,e=t.maxDate,r=t.includeDates,o=bc(n),s=Do(o,1);return e&&Gr(s,e)>0||r&&r.every(function(l){return Gr(s,l)>0})||!1}function Cs(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.includeDates,o=Nn(n,1);return e&&Xr(e,o)>0||r&&r.every(function(s){return Xr(s,o)>0})||!1}function Zx(n,a){var t=a===void 0?{}:a,e=t.minDate,r=t.yearItemNumber,o=r===void 0?ir:r,s=Gn(Nn(n,o)),l=Lt(s,o).endPeriod,c=e&&te(e);return c&&c>l||!1}function Ss(n,a){var t=a===void 0?{}:a,e=t.maxDate,r=t.includeDates,o=Ct(n,1);return e&&Xr(o,e)>0||r&&r.every(function(s){return Xr(o,s)>0})||!1}function ey(n,a){var t=a===void 0?{}:a,e=t.maxDate,r=t.yearItemNumber,o=r===void 0?ir:r,s=Ct(n,o),l=Lt(s,o).startPeriod,c=e&&te(e);return c&&c<l||!1}function Nc(n){var a=n.minDate,t=n.includeDates;if(t&&a){var e=t.filter(function(r){return Rn(r,a)>=0});return os(e)}else return t?os(t):a}function Oc(n){var a=n.maxDate,t=n.includeDates;if(t&&a){var e=t.filter(function(r){return Rn(r,a)<=0});return as(e)}else return t?as(t):a}function Ms(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 s=n[r];if(St(s)){var l=me(s,"MM.dd.yyyy"),c=e.get(l)||[];c.includes(a)||(c.push(a),e.set(l,c))}else if(typeof s=="object"){var p=Object.keys(s),d=(t=p[0])!==null&&t!==void 0?t:"",h=s[d];if(typeof d=="string"&&Array.isArray(h))for(var x=0,y=h.length;x<y;x++){var v=h[x];if(v){var l=me(v,"MM.dd.yyyy"),c=e.get(l)||[];c.includes(d)||(c.push(d),e.set(l,c))}}}}return e}function ty(n,a){return n.length!==a.length?!1:n.every(function(t,e){return t===a[e]})}function ny(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(St(r)){var s=me(r,"MM.dd.yyyy"),l=t.get(s)||{className:"",holidayNames:[]};if(!("className"in l&&l.className===a&&ty(l.holidayNames,[o]))){l.className=a;var c=l.holidayNames;l.holidayNames=c?ht(ht([],c,!0),[o],!1):[o],t.set(s,l)}}}),t}function ry(n,a,t,e,r){for(var o=r.length,s=[],l=0;l<o;l++){var c=n,p=r[l];p&&(c=tm(c,mt(p)),c=so(c,gt(p)),c=am(c,Mt(p)));var d=so(n,(t+1)*e);Ht(c,a)&&hn(c,d)&&p!=null&&s.push(p)}return s}function _s(n){return n<10?"0".concat(n):"".concat(n)}function Lt(n,a){a===void 0&&(a=ir);var t=Math.ceil(te(n)/a)*a,e=t-(a-1);return{startPeriod:e,endPeriod:t}}function ay(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 js(n){var a=n.getSeconds(),t=n.getMilliseconds();return Y(n.getTime()-a*1e3-t)}function oy(n,a){return js(n).getTime()===js(a).getTime()}function Is(n){if(!St(n))throw new Error("Invalid date");var a=new Date(n);return a.setHours(0,0,0,0),a}function Ps(n,a){if(!St(n)||!St(a))throw new Error("Invalid date received");var t=Is(n),e=Is(a);return hn(t,e)}function Ac(n){return n.key===L.Space}var iy=(function(n){Ie(a,n);function a(t){var e=n.call(this,t)||this;return e.inputRef=j.createRef(),e.onTimeChange=function(r){var o,s;e.setState({time:r});var l=e.props.date,c=l instanceof Date&&!isNaN(+l),p=c?l: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))}(s=(o=e.props).onChange)===null||s===void 0||s.call(o,p)},e.renderTimeInput=function(){var r=e.state.time,o=e.props,s=o.date,l=o.timeString,c=o.customTimeInput;return c?b.cloneElement(c,{date:s,value:r,onChange:e.onTimeChange}):j.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||l)}})},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 j.createElement("div",{className:"react-datepicker__input-time-container"},j.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),j.createElement("div",{className:"react-datepicker-time__input-container"},j.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},a})(b.Component),sy=(function(n){Ie(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.dayEl=b.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,s=e.key;s===L.Space&&(e.preventDefault(),e.key=L.Enter),(o=(r=t.props).handleOnKeyDown)===null||o===void 0||o.call(r,e)},t.isSameDay=function(e){return oe(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(s){return t.isSameDayOrWeek(s)}):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),Qe(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 Io(t.props.day,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.isStartOfWeek=function(){return oe(t.props.day,Yt(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameWeek=function(e){return t.props.showWeekPicker&&oe(e,Yt(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 s=me(r,"MM.dd.yyyy");return o.get(s)},t.getHolidaysClass=function(){var e,r=t.props,o=r.day,s=r.holidays;if(!s)return[void 0];var l=me(o,"MM.dd.yyyy");return s.has(l)?[(e=s.get(l))===null||e===void 0?void 0:e.className]:[void 0]},t.isInRange=function(){var e=t.props,r=e.day,o=e.startDate,s=e.endDate;return!o||!s?!1:Xn(r,o,s)},t.isInSelectingRange=function(){var e,r=t.props,o=r.day,s=r.selectsStart,l=r.selectsEnd,c=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!(s||l||c)||!x||!p&&t.isDisabled()?!1:s&&h&&(hn(x,h)||nn(x,h))?Xn(o,x,h):l&&d&&(Ht(x,d)||nn(x,d))||c&&d&&!h&&(Ht(x,d)||nn(x,d))?Xn(o,d,x):!1},t.isSelectingRangeStart=function(){var e;if(!t.isInSelectingRange())return!1;var r=t.props,o=r.day,s=r.startDate,l=r.selectsStart,c=(e=t.props.selectingDate)!==null&&e!==void 0?e:t.props.preSelection;return l?oe(o,c):oe(o,s)},t.isSelectingRangeEnd=function(){var e;if(!t.isInSelectingRange())return!1;var r=t.props,o=r.day,s=r.endDate,l=r.selectsEnd,c=r.selectsRange,p=(e=t.props.selectingDate)!==null&&e!==void 0?e:t.props.preSelection;return l||c?oe(o,p):oe(o,s)},t.isRangeStart=function(){var e=t.props,r=e.day,o=e.startDate,s=e.endDate;return!o||!s?!1:oe(o,r)},t.isRangeEnd=function(){var e=t.props,r=e.day,o=e.startDate,s=e.endDate;return!o||!s?!1:oe(s,r)},t.isWeekend=function(){var e=Zm(t.props.day);return e===0||e===6},t.isAfterMonth=function(){return t.props.month!==void 0&&(t.props.month+1)%12===Oe(t.props.day)},t.isBeforeMonth=function(){return t.props.month!==void 0&&(Oe(t.props.day)+1)%12===t.props.month},t.isCurrentDay=function(){return t.isSameDay(pe())},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 Ee("react-datepicker__day",r,"react-datepicker__day--"+Hx(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,s=o===void 0?"Choose":o,l=e.ariaLabelPrefixWhenDisabled,c=l===void 0?"Not available":l,p=t.isDisabled()||t.isExcluded()?c:s;return"".concat(p," ").concat(me(r,"PPPP",t.props.locale))},t.getTitle=function(){var e=t.props,r=e.day,o=e.holidays,s=o===void 0?new Map:o,l=e.excludeDates,c=me(r,"MM.dd.yyyy"),p=[];return s.has(c)&&p.push.apply(p,s.get(c).holidayNames),t.isExcluded()&&p.push(l==null?void 0:l.filter(function(d){return d instanceof Date?oe(d,r):oe(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)&&oe(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(ps(t.props.day),t.props.day):ps(t.props.day)},t.render=function(){return j.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()!==""&&j.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})(b.Component),ly=(function(n){Ie(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.weekNumberEl=b.createRef(),t.handleClick=function(e){t.props.onClick&&t.props.onClick(e)},t.handleOnKeyDown=function(e){var r,o,s=e.key;s===L.Space&&(e.preventDefault(),e.key=L.Enter),(o=(r=t.props).handleOnKeyDown)===null||o===void 0||o.call(r,e)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!oe(t.props.date,t.props.selected)&&oe(t.props.date,t.props.preSelection)},t.getTabIndex=function(){return t.props.showWeekPicker&&t.props.showWeekNumber&&(t.isKeyboardSelected()||oe(t.props.date,t.props.selected)&&oe(t.props.preSelection,t.props.selected))?0:-1},t.handleFocusWeekNumber=function(e){var r=!1;t.getTabIndex()===0&&!(e!=null&&e.isInputFocused)&&oe(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,s=o===void 0?a.defaultProps.ariaLabelPrefix:o,l=t.onClick,c={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!l&&!r,"react-datepicker__week-number--selected":!!l&&oe(this.props.date,this.props.selected)};return j.createElement("div",{ref:this.weekNumberEl,className:Ee(c),"aria-label":"".concat(s," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},e)},a})(b.Component),cy=(function(n){Ie(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.isDisabled=function(e){return Qe(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 s,l,c,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),((s=t.props.shouldCloseOnSelect)!==null&&s!==void 0?s:a.defaultProps.shouldCloseOnSelect)&&((c=(l=t.props).setOpen)===null||c===void 0||c.call(l,!1))},t.formatWeekNumber=function(e){return t.props.formatWeekNumber?t.props.formatWeekNumber(e):Bx(e)},t.isWeekDisabled=function(){for(var e=t.startOfWeek(),r=et(e,6),o=new Date(e);o<=r;){if(!t.isDisabled(o))return!1;o=et(o,1)}return!0},t.renderDays=function(){var e=t.startOfWeek(),r=[],o=t.formatWeekNumber(e);if(t.props.showWeekNumber){var s=t.props.onWeekSelect||t.props.showWeekPicker?t.handleWeekClick.bind(t,e,o):void 0;r.push(j.createElement(ly,ie({key:"W"},a.defaultProps,t.props,{weekNumber:o,isWeekDisabled:t.isWeekDisabled(),date:e,onClick:s})))}return r.concat([0,1,2,3,4,5,6].map(function(l){var c=et(e,l);return j.createElement(sy,ie({},a.defaultProps,t.props,{ariaLabelPrefixWhenEnabled:t.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:t.props.disabledDayAriaLabelPrefix,key:c.valueOf(),day:c,onClick:t.handleDayClick.bind(t,c),onMouseEnter:t.handleDayMouseEnter.bind(t,c)}))}))},t.startOfWeek=function(){return Yt(t.props.day,t.props.locale,t.props.calendarStartDay)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!oe(t.startOfWeek(),t.props.selected)&&oe(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":oe(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return j.createElement("div",{className:Ee(t)},this.renderDays())},a})(b.Component),Qn,dy=6,In={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},Oa=(Qn={},Qn[In.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},Qn[In.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},Qn[In.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},Qn),Er=1;function Es(n,a){return n?In.FOUR_COLUMNS:a?In.TWO_COLUMNS:In.THREE_COLUMNS}var uy=(function(n){Ie(a,n);function a(){var t=n!==null&&n.apply(this,arguments)||this;return t.MONTH_REFS=ht([],Array(12),!0).map(function(){return b.createRef()}),t.QUARTER_REFS=ht([],Array(4),!0).map(function(){return b.createRef()}),t.isDisabled=function(e){return Qe(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 Io(e,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.handleDayClick=function(e,r){var o,s;(s=(o=t.props).onDayClick)===null||s===void 0||s.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,s=r.startDate,l=r.endDate;return!s||!l?!1:Ne(ze(o,e),s)},t.isRangeStartQuarter=function(e){var r=t.props,o=r.day,s=r.startDate,l=r.endDate;return!s||!l?!1:ta(Sn(o,e),s)},t.isRangeEndMonth=function(e){var r=t.props,o=r.day,s=r.startDate,l=r.endDate;return!s||!l?!1:Ne(ze(o,e),l)},t.isRangeEndQuarter=function(e){var r=t.props,o=r.day,s=r.startDate,l=r.endDate;return!s||!l?!1:ta(Sn(o,e),l)},t.isInSelectingRangeMonth=function(e){var r,o=t.props,s=o.day,l=o.selectsStart,c=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!(l||c||p)||!x?!1:l&&h?_r(x,h,e,s):c&&d||p&&d&&!h?_r(d,x,e,s):!1},t.isSelectingMonthRangeStart=function(e){var r;if(!t.isInSelectingRangeMonth(e))return!1;var o=t.props,s=o.day,l=o.startDate,c=o.selectsStart,p=ze(s,e),d=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return c?Ne(p,d):Ne(p,l)},t.isSelectingMonthRangeEnd=function(e){var r;if(!t.isInSelectingRangeMonth(e))return!1;var o=t.props,s=o.day,l=o.endDate,c=o.selectsEnd,p=o.selectsRange,d=ze(s,e),h=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return c||p?Ne(d,h):Ne(d,l)},t.isInSelectingRangeQuarter=function(e){var r,o=t.props,s=o.day,l=o.selectsStart,c=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!(l||c||p)||!x?!1:l&&h?Pr(x,h,e,s):c&&d||p&&d&&!h?Pr(d,x,e,s):!1},t.isWeekInMonth=function(e){var r=t.props.day,o=et(e,6);return Ne(e,r)||Ne(o,r)},t.isCurrentMonth=function(e,r){return te(e)===te(pe())&&r===Oe(pe())},t.isCurrentQuarter=function(e,r){return te(e)===te(pe())&&r===on(pe())},t.isSelectedMonth=function(e,r,o){return Oe(o)===r&&te(e)===te(o)},t.isSelectMonthInList=function(e,r,o){return o.some(function(s){return t.isSelectedMonth(e,r,s)})},t.isSelectedQuarter=function(e,r,o){return on(e)===r&&te(e)===te(o)},t.renderWeeks=function(){for(var e=[],r=t.props.fixedHeight,o=0,s=!1,l=Yt(_t(t.props.day),t.props.locale,t.props.calendarStartDay),c=function(v){return t.props.showWeekPicker?Yt(v,t.props.locale,t.props.calendarStartDay):t.props.preSelection},p=function(v){return t.props.showWeekPicker?Yt(v,t.props.locale,t.props.calendarStartDay):t.props.selected},d=t.props.selected?p(t.props.selected):void 0,h=t.props.preSelection?c(t.props.preSelection):void 0;e.push(j.createElement(cy,ie({},t.props,{ariaLabelPrefix:t.props.weekAriaLabelPrefix,key:o,day:l,month:Oe(t.props.day),onDayClick:t.handleDayClick,onDayMouseEnter:t.handleDayMouseEnter,selected:d,preSelection:h,showWeekNumber:t.props.showWeekNumbers}))),!s;){o++,l=Qr(l,1);var x=r&&o>=dy,y=!r&&!t.isWeekInMonth(l);if(x||y)if(t.props.peekNextMonth)s=!0;else break}return e},t.onMonthClick=function(e,r){var o=t.isMonthDisabledForLabelDate(r),s=o.isDisabled,l=o.labelDate;s||t.handleDayClick(_t(l),e)},t.onMonthMouseEnter=function(e){var r=t.isMonthDisabledForLabelDate(e),o=r.isDisabled,s=r.labelDate;o||t.handleDayMouseEnter(_t(s))},t.handleMonthNavigation=function(e,r){var o,s,l,c;(s=(o=t.props).setPreSelection)===null||s===void 0||s.call(o,r),(c=(l=t.MONTH_REFS[e])===null||l===void 0?void 0:l.current)===null||c===void 0||c.focus()},t.handleKeyboardNavigation=function(e,r,o){var s,l=t.props,c=l.selected,p=l.preSelection,d=l.setPreSelection,h=l.minDate,x=l.maxDate,y=l.showFourColumnMonthYearPicker,v=l.showTwoColumnMonthYearPicker;if(p){var w=Es(y,v),k=t.getVerticalOffset(w),C=(s=Oa[w])===null||s===void 0?void 0:s.grid,D=function(M,S,P){var A,B,U=S,V=P;switch(M){case L.ArrowRight:U=nt(S,Er),V=P===11?0:P+Er;break;case L.ArrowLeft:U=sn(S,Er),V=P===0?11:P-Er;break;case L.ArrowUp:U=sn(S,k),V=!((A=C==null?void 0:C[0])===null||A===void 0)&&A.includes(P)?P+12-k:P-k;break;case L.ArrowDown:U=nt(S,k),V=!((B=C==null?void 0:C[C.length-1])===null||B===void 0)&&B.includes(P)?P-12+k:P+k;break}return{newCalculatedDate:U,newCalculatedMonth:V}},E=function(M,S,P){for(var A=40,B=M,U=!1,V=0,G=D(B,S,P),H=G.newCalculatedDate,N=G.newCalculatedMonth;!U;){if(V>=A){H=S,N=P;break}if(h&&H<h){B=L.ArrowRight;var F=D(B,H,N);H=F.newCalculatedDate,N=F.newCalculatedMonth}if(x&&H>x){B=L.ArrowLeft;var F=D(B,H,N);H=F.newCalculatedDate,N=F.newCalculatedMonth}if(Gx(H,t.props)){var F=D(B,H,N);H=F.newCalculatedDate,N=F.newCalculatedMonth}else U=!0;V++}return{newCalculatedDate:H,newCalculatedMonth:N}};if(r===L.Enter){t.isMonthDisabled(o)||(t.onMonthClick(e,o),d==null||d(c));return}var g=E(r,p,o),T=g.newCalculatedDate,O=g.newCalculatedMonth;switch(r){case L.ArrowRight:case L.ArrowLeft:case L.ArrowUp:case L.ArrowDown:t.handleMonthNavigation(O,T);break}}},t.getVerticalOffset=function(e){var r,o;return(o=(r=Oa[e])===null||r===void 0?void 0:r.verticalNavigationOffset)!==null&&o!==void 0?o:0},t.onMonthKeyDown=function(e,r){var o=t.props,s=o.disabledKeyboardNavigation,l=o.handleOnMonthKeyDown,c=e.key;c!==L.Tab&&e.preventDefault(),s||t.handleKeyboardNavigation(e,c,r),l&&l(e)},t.onQuarterClick=function(e,r){var o=Sn(t.props.day,r);jr(o,t.props)||t.handleDayClick(gs(o),e)},t.onQuarterMouseEnter=function(e){var r=Sn(t.props.day,e);jr(r,t.props)||t.handleDayMouseEnter(gs(r))},t.handleQuarterNavigation=function(e,r){var o,s,l,c;t.isDisabled(r)||t.isExcluded(r)||((s=(o=t.props).setPreSelection)===null||s===void 0||s.call(o,r),(c=(l=t.QUARTER_REFS[e-1])===null||l===void 0?void 0:l.current)===null||c===void 0||c.focus())},t.onQuarterKeyDown=function(e,r){var o,s,l=e.key;if(!t.props.disabledKeyboardNavigation)switch(l){case L.Enter:t.onQuarterClick(e,r),(s=(o=t.props).setPreSelection)===null||s===void 0||s.call(o,t.props.selected);break;case L.ArrowRight:if(!t.props.preSelection)break;t.handleQuarterNavigation(r===4?1:r+1,Do(t.props.preSelection,1));break;case L.ArrowLeft:if(!t.props.preSelection)break;t.handleQuarterNavigation(r===1?4:r-1,Pc(t.props.preSelection));break}},t.isMonthDisabledForLabelDate=function(e){var r,o=t.props,s=o.day,l=o.minDate,c=o.maxDate,p=o.excludeDates,d=o.includeDates,h=ze(s,e);return{isDisabled:(r=(l||c||p||d)&&Rc(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,s=r.startDate,l=r.endDate,c=r.preSelection,p=r.monthClassName,d=p?p(ze(o,e)):void 0,h=t.getSelection();return Ee("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&&c&&t.isSelectedMonth(o,e,c)&&!t.isMonthDisabled(e),"react-datepicker__month-text--in-selecting-range":t.isInSelectingRangeMonth(e),"react-datepicker__month-text--in-range":s&&l?_r(s,l,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=Oe(t.props.preSelection),o=t.isMonthDisabledForLabelDate(r).isDisabled,s=e===r&&!(o||t.props.disabledKeyboardNavigation)?"0":"-1";return s},t.getQuarterTabIndex=function(e){if(t.props.preSelection==null)return"-1";var r=on(t.props.preSelection),o=jr(t.props.day,t.props),s=e===r&&!(o||t.props.disabledKeyboardNavigation)?"0":"-1";return s},t.getAriaLabel=function(e){var r=t.props,o=r.chooseDayAriaLabelPrefix,s=o===void 0?"Choose":o,l=r.disabledDayAriaLabelPrefix,c=l===void 0?"Not available":l,p=r.day,d=r.locale,h=ze(p,e),x=t.isDisabled(h)||t.isExcluded(h)?c:s;return"".concat(x," ").concat(me(h,"MMMM yyyy",d))},t.getQuarterClassNames=function(e){var r=t.props,o=r.day,s=r.startDate,l=r.endDate,c=r.selected,p=r.minDate,d=r.maxDate,h=r.excludeDates,x=r.includeDates,y=r.filterDate,v=r.preSelection,w=r.disabledKeyboardNavigation,k=(p||d||h||x||y)&&jr(Sn(o,e),t.props);return Ee("react-datepicker__quarter-text","react-datepicker__quarter-".concat(e),{"react-datepicker__quarter-text--disabled":k,"react-datepicker__quarter-text--selected":c?t.isSelectedQuarter(o,e,c):void 0,"react-datepicker__quarter-text--keyboard-selected":!w&&v&&t.isSelectedQuarter(o,e,v)&&!k,"react-datepicker__quarter-text--in-selecting-range":t.isInSelectingRangeQuarter(e),"react-datepicker__quarter-text--in-range":s&&l?Pr(s,l,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,s=r.renderMonthContent,l=r.locale,c=r.day,p=$c(e,l),d=jo(e,l);return s?s(e,p,d,c):o?d:p},t.getQuarterContent=function(e){var r,o=t.props,s=o.renderQuarterContent,l=o.locale,c=Vx(e,l);return(r=s==null?void 0:s(e,c))!==null&&r!==void 0?r:c},t.renderMonths=function(){var e,r=t.props,o=r.showTwoColumnMonthYearPicker,s=r.showFourColumnMonthYearPicker,l=r.day,c=r.selected,p=(e=Oa[Es(s,o)])===null||e===void 0?void 0:e.grid;return p==null?void 0:p.map(function(d,h){return j.createElement("div",{className:"react-datepicker__month-wrapper",key:h},d.map(function(x,y){return j.createElement("div",{ref:t.MONTH_REFS[x],key:y,onClick:function(v){t.onMonthClick(v,x)},onKeyDown:function(v){Ac(v)&&(v.preventDefault(),v.key=L.Enter),t.onMonthKeyDown(v,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(l,x)?"date":void 0,"aria-selected":c?t.isSelectedMonth(l,x,c):void 0},t.getMonthContent(x))}))})},t.renderQuarters=function(){var e=t.props,r=e.day,o=e.selected,s=[1,2,3,4];return j.createElement("div",{className:"react-datepicker__quarter-wrapper"},s.map(function(l,c){return j.createElement("div",{key:c,ref:t.QUARTER_REFS[c],role:"option",onClick:function(p){t.onQuarterClick(p,l)},onKeyDown:function(p){t.onQuarterKeyDown(p,l)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onQuarterMouseEnter(l)},onPointerEnter:t.props.usePointerEvent?function(){return t.onQuarterMouseEnter(l)}:void 0,className:t.getQuarterClassNames(l),"aria-selected":o?t.isSelectedQuarter(r,l,o):void 0,tabIndex:Number(t.getQuarterTabIndex(l)),"aria-current":t.isCurrentQuarter(r,l)?"date":void 0},t.getQuarterContent(l))}))},t.getClassNames=function(){var e=t.props,r=e.selectingDate,o=e.selectsStart,s=e.selectsEnd,l=e.showMonthYearPicker,c=e.showQuarterYearPicker,p=e.showWeekPicker;return Ee("react-datepicker__month",{"react-datepicker__month--selecting-range":r&&(o||s)},{"react-datepicker__monthPicker":l},{"react-datepicker__quarterPicker":c},{"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,s=t.ariaLabelPrefix,l=s===void 0?"Month ":s,c=l?l.trim()+" ":"";return j.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(c).concat(me(o,"MMMM, yyyy",this.props.locale)),role:"listbox"},e?this.renderMonths():r?this.renderQuarters():this.renderWeeks())},a})(b.Component),py=(function(n){Ie(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 j.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)?j.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 j.createElement(ma,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},a})(b.Component),fy=(function(n){Ie(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 j.createElement("option",{key:r,value:o},r)})},t.renderSelectMode=function(e){return j.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 j.createElement("div",{key:"read",style:{visibility:e?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:t.toggleDropdown},j.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),j.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},r[t.props.month]))},t.renderDropdown=function(e){return j.createElement(py,ie({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 $c(o,t.props.locale)}:function(o){return jo(o,t.props.locale)}),r;switch(this.props.dropdownMode){case"scroll":r=this.renderScrollMode(e);break;case"select":r=this.renderSelectMode(e);break}return j.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},r)},a})(b.Component);function hy(n,a){for(var t=[],e=_t(n),r=_t(a);!Ht(e,r);)t.push(pe(e)),e=nt(e,1);return t}var my=(function(n){Ie(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=uo(r),s=dt(e.props.date,r)&&Ne(e.props.date,r);return j.createElement("div",{className:s?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:o,onClick:e.onChange.bind(e,o),"aria-selected":s?"true":void 0},s?j.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",me(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:hy(e.props.minDate,e.props.maxDate)},e}return a.prototype.render=function(){var t=Ee({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return j.createElement(ma,{className:t,onClickOutside:this.handleClickOutside},this.renderOptions())},a})(b.Component),gy=(function(n){Ie(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(t.props.minDate),r=_t(t.props.maxDate),o=[];!Ht(e,r);){var s=uo(e);o.push(j.createElement("option",{key:s,value:s},me(e,t.props.dateFormat,t.props.locale))),e=nt(e,1)}return o},t.onSelectChange=function(e){t.onChange(parseInt(e.target.value))},t.renderSelectMode=function(){return j.createElement("select",{value:uo(_t(t.props.date)),className:"react-datepicker__month-year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(e){var r=me(t.props.date,t.props.dateFormat,t.props.locale);return j.createElement("div",{key:"read",style:{visibility:e?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:t.toggleDropdown},j.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),j.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},r))},t.renderDropdown=function(){return j.createElement(my,ie({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=pe(e);dt(t.props.date,r)&&Ne(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 j.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},t)},a})(b.Component),xy=(function(n){Ie(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)&&ws(e,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&vs(e,t.props)||(o=(r=t.props).onChange)===null||o===void 0||o.call(r,e)},t.isSelectedTime=function(e){return t.props.selected&&oy(t.props.selected,e)},t.isDisabledTime=function(e){return(t.props.minTime||t.props.maxTime)&&ws(e,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&vs(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&&(mt(e)*3600+gt(e)*60+Mt(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,s;e.key===L.Space&&(e.preventDefault(),e.key=L.Enter),(e.key===L.ArrowUp||e.key===L.ArrowLeft)&&e.target instanceof HTMLElement&&e.target.previousSibling&&(e.preventDefault(),e.target.previousSibling instanceof HTMLElement&&e.target.previousSibling.focus()),(e.key===L.ArrowDown||e.key===L.ArrowRight)&&e.target instanceof HTMLElement&&e.target.nextSibling&&(e.preventDefault(),e.target.nextSibling instanceof HTMLElement&&e.target.nextSibling.focus()),e.key===L.Enter&&t.handleClick(r),(s=(o=t.props).handleOnKeyDown)===null||s===void 0||s.call(o,e)},t.renderTimes=function(){for(var e,r=[],o=typeof t.props.format=="string"?t.props.format:"p",s=(e=t.props.intervals)!==null&&e!==void 0?e:a.defaultProps.intervals,l=t.props.selected||t.props.openToDate||pe(),c=Yr(l),p=t.props.injectTimes&&t.props.injectTimes.sort(function(k,C){return k.getTime()-C.getTime()}),d=60*ay(l),h=d/s,x=0;x<h;x++){var y=so(c,x*s);if(r.push(y),p){var v=ry(c,y,x,s,p);r=r.concat(v)}}var w=r.reduce(function(k,C){return C.getTime()<=l.getTime()?C:k},r[0]);return r.map(function(k){return j.createElement("li",{key:k.valueOf(),onClick:t.handleClick.bind(t,k),className:t.liClasses(k),ref:function(C){k===w&&(t.centerLi=C)},onKeyDown:function(C){t.handleOnKeyDown(C,k)},tabIndex:k===w?0:-1,role:"option","aria-selected":t.isSelectedTime(k)?"true":void 0,"aria-disabled":t.isDisabledTime(k)?"true":void 0},me(k,o,t.props.locale))})},t.renderTimeCaption=function(){return t.props.showTimeCaption===!1?j.createElement(j.Fragment,null):j.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}},j.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 j.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(),j.createElement("div",{className:"react-datepicker__time"},j.createElement("div",{className:"react-datepicker__time-box"},j.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})(b.Component),Ts=3,yy=(function(n){Ie(a,n);function a(t){var e=n.call(this,t)||this;return e.YEAR_REFS=ht([],Array(e.props.yearItemNumber),!0).map(function(){return b.createRef()}),e.isDisabled=function(r){return Qe(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 Io(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 s,l;(l=(s=e.YEAR_REFS[r])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus()};window.requestAnimationFrame(o)},e.handleYearClick=function(r,o){e.props.onDayClick&&e.props.onDayClick(r,o)},e.handleYearNavigation=function(r,o){var s,l,c,p,d=e.props,h=d.date,x=d.yearItemNumber;if(!(h===void 0||x===void 0)){var y=Lt(h,x).startPeriod;e.isDisabled(o)||e.isExcluded(o)||((l=(s=e.props).setPreSelection)===null||l===void 0||l.call(s,o),r-y<0?e.updateFocusOnPaginate(x-(y-r)):r-y>=x?e.updateFocusOnPaginate(Math.abs(x-(r-y))):(p=(c=e.YEAR_REFS[r-y])===null||c===void 0?void 0:c.current)===null||p===void 0||p.focus())}},e.isSameDay=function(r,o){return oe(r,o)},e.isCurrentYear=function(r){return r===te(pe())},e.isRangeStart=function(r){return e.props.startDate&&e.props.endDate&&dt(ct(pe(),r),e.props.startDate)},e.isRangeEnd=function(r){return e.props.startDate&&e.props.endDate&&dt(ct(pe(),r),e.props.endDate)},e.isInRange=function(r){return Ir(r,e.props.startDate,e.props.endDate)},e.isInSelectingRange=function(r){var o=e.props,s=o.selectsStart,l=o.selectsEnd,c=o.selectsRange,p=o.startDate,d=o.endDate;return!(s||l||c)||!e.selectingDate()?!1:s&&d?Ir(r,e.selectingDate(),d):l&&p||c&&p&&!d?Ir(r,p,e.selectingDate()):!1},e.isSelectingRangeStart=function(r){var o;if(!e.isInSelectingRange(r))return!1;var s=e.props,l=s.startDate,c=s.selectsStart,p=ct(pe(),r);return c?dt(p,(o=e.selectingDate())!==null&&o!==void 0?o:null):dt(p,l??null)},e.isSelectingRangeEnd=function(r){var o;if(!e.isInSelectingRange(r))return!1;var s=e.props,l=s.endDate,c=s.selectsEnd,p=s.selectsRange,d=ct(pe(),r);return c||p?dt(d,(o=e.selectingDate())!==null&&o!==void 0?o:null):dt(d,l??null)},e.isKeyboardSelected=function(r){if(!(e.props.date===void 0||e.props.selected==null||e.props.preSelection==null)){var o=e.props,s=o.minDate,l=o.maxDate,c=o.excludeDates,p=o.includeDates,d=o.filterDate,h=Gn(ct(e.props.date,r)),x=(s||l||c||p||d)&&Wr(r,e.props);return!e.props.disabledKeyboardNavigation&&!e.props.inline&&!oe(h,Gn(e.props.selected))&&oe(h,Gn(e.props.preSelection))&&!x}},e.onYearClick=function(r,o){var s=e.props.date;s!==void 0&&e.handleYearClick(Gn(ct(s,o)),r)},e.onYearKeyDown=function(r,o){var s,l,c=r.key,p=e.props,d=p.date,h=p.yearItemNumber,x=p.handleOnKeyDown;if(c!==L.Tab&&r.preventDefault(),!e.props.disabledKeyboardNavigation)switch(c){case L.Enter:if(e.props.selected==null)break;e.onYearClick(r,o),(l=(s=e.props).setPreSelection)===null||l===void 0||l.call(s,e.props.selected);break;case L.ArrowRight:if(e.props.preSelection==null)break;e.handleYearNavigation(o+1,Ct(e.props.preSelection,1));break;case L.ArrowLeft:if(e.props.preSelection==null)break;e.handleYearNavigation(o-1,Nn(e.props.preSelection,1));break;case L.ArrowUp:{if(d===void 0||h===void 0||e.props.preSelection==null)break;var y=Lt(d,h).startPeriod,v=Ts,w=o-v;if(w<y){var k=h%v;o>=y&&o<y+k?v=k:v+=k,w=o-v}e.handleYearNavigation(w,Nn(e.props.preSelection,v));break}case L.ArrowDown:{if(d===void 0||h===void 0||e.props.preSelection==null)break;var C=Lt(d,h).endPeriod,v=Ts,w=o+v;if(w>C){var k=h%v;o<=C&&o>C-k?v=k:v+=k,w=o+v}e.handleYearNavigation(w,Ct(e.props.preSelection,v));break}}x&&x(r)},e.getYearClassNames=function(r){var o=e.props,s=o.date,l=o.minDate,c=o.maxDate,p=o.selected,d=o.excludeDates,h=o.includeDates,x=o.filterDate,y=o.yearClassName;return Ee("react-datepicker__year-text","react-datepicker__year-".concat(r),s?y==null?void 0:y(ct(s,r)):void 0,{"react-datepicker__year-text--selected":p?r===te(p):void 0,"react-datepicker__year-text--disabled":(l||c||d||h||x)&&Wr(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),s=Wr(r,e.props);return r===o&&!s?"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,s=r.yearItemNumber,l=r.onYearMouseEnter,c=r.onYearMouseLeave;if(o===void 0)return null;for(var p=Lt(o,s),d=p.startPeriod,h=p.endPeriod,x=function(w){e.push(j.createElement("div",{ref:y.YEAR_REFS[w-d],onClick:function(k){t.onYearClick(k,w)},onKeyDown:function(k){Ac(k)&&(k.preventDefault(),k.key=L.Enter),t.onYearKeyDown(k,w)},tabIndex:Number(y.getYearTabIndex(w)),className:y.getYearClassNames(w),onMouseEnter:y.props.usePointerEvent?void 0:function(k){return l(k,w)},onPointerEnter:y.props.usePointerEvent?function(k){return l(k,w)}:void 0,onMouseLeave:y.props.usePointerEvent?void 0:function(k){return c(k,w)},onPointerLeave:y.props.usePointerEvent?function(k){return c(k,w)}:void 0,key:w,"aria-current":y.isCurrentYear(w)?"date":void 0},y.getYearContent(w)))},y=this,v=d;v<=h;v++)x(v);return j.createElement("div",{className:"react-datepicker__year"},j.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})(b.Component);function by(n,a,t,e){for(var r=[],o=0;o<2*a+1;o++){var s=n+a-o,l=!0;t&&(l=te(t)<=s),e&&l&&(l=te(e)>=s),l&&r.push(s)}return r}var vy=(function(n){Ie(a,n);function a(t){var e=n.call(this,t)||this;e.renderOptions=function(){var l=e.props.year,c=e.state.yearsList.map(function(h){return j.createElement("div",{className:l===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":l===h?"true":void 0},l===h?j.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}))&&c.unshift(j.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:e.incrementYears},j.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}))&&c.push(j.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:e.decrementYears},j.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c},e.onChange=function(l){e.props.onChange(l)},e.handleClickOutside=function(){e.props.onCancel()},e.shiftYears=function(l){var c=e.state.yearsList.map(function(p){return p+l});e.setState({yearsList:c})},e.incrementYears=function(){return e.shiftYears(1)},e.decrementYears=function(){return e.shiftYears(-1)};var r=t.yearDropdownItemNumber,o=t.scrollableYearDropdown,s=r||(o?10:5);return e.state={yearsList:by(e.props.year,s,e.props.minDate,e.props.maxDate)},e.dropdownRef=b.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=Ee({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return j.createElement(ma,{className:t,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},a})(b.Component),wy=(function(n){Ie(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=[],s=e;s<=r;s++)o.push(j.createElement("option",{key:s,value:s},s));return o},t.onSelectChange=function(e){t.onChange(parseInt(e.target.value))},t.renderSelectMode=function(){return j.createElement("select",{value:t.props.year,className:"react-datepicker__year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(e){return j.createElement("div",{key:"read",style:{visibility:e?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(r){return t.toggleDropdown(r)}},j.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),j.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},t.props.year))},t.renderDropdown=function(){return j.createElement(vy,ie({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,s;(s=(o=t.props).onSelect)===null||s===void 0||s.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 j.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},t)},a})(b.Component),ky=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],Dy=function(n){var a=(n.className||"").split(/\s+/);return ky.some(function(t){return a.indexOf(t)>=0})},Cy=(function(n){Ie(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,s;Dy(r.target)&&((s=(o=e.props).onDropdownFocus)===null||s===void 0||s.call(o,r))},e.getDateInView=function(){var r=e.props,o=r.preSelection,s=r.selected,l=r.openToDate,c=Nc(e.props),p=Oc(e.props),d=pe(),h=l||s||o;return h||(c&&hn(d,c)?c:p&&Ht(d,p)?p:d)},e.increaseMonth=function(){e.setState(function(r){var o=r.date;return{date:nt(o,1)}},function(){return e.handleMonthChange(e.state.date)})},e.decreaseMonth=function(){e.setState(function(r){var o=r.date;return{date:sn(o,1)}},function(){return e.handleMonthChange(e.state.date)})},e.handleDayClick=function(r,o,s){e.props.onSelect(r,o,s),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:ct(pe(),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,s,l,c;(s=(o=e.props).onYearChange)===null||s===void 0||s.call(o,r),e.setState({isRenderAriaLiveMessage:!0}),e.props.adjustDateOnChange&&(e.props.onSelect(r),(c=(l=e.props).setOpen)===null||c===void 0||c.call(l,!0)),e.props.setPreSelection&&e.props.setPreSelection(r)},e.getEnabledPreSelectionDateForMonth=function(r){if(!Qe(r,e.props))return r;for(var o=_t(r),s=qx(r),l=im(s,o),c=null,p=0;p<=l;p++){var d=et(o,p);if(!Qe(d,e.props)){c=d;break}}return c},e.handleMonthChange=function(r){var o,s,l,c=(o=e.getEnabledPreSelectionDateForMonth(r))!==null&&o!==void 0?o:r;e.handleCustomMonthChange(c),e.props.adjustDateOnChange&&(e.props.onSelect(c),(l=(s=e.props).setOpen)===null||l===void 0||l.call(s,!0)),e.props.setPreSelection&&e.props.setPreSelection(c)},e.handleCustomMonthChange=function(r){var o,s;(s=(o=e.props).onMonthChange)===null||s===void 0||s.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 s=o.date;return{date:ct(s,Number(r))}},function(){return e.handleYearChange(e.state.date)})},e.changeMonth=function(r){e.setState(function(o){var s=o.date;return{date:ze(s,Number(r))}},function(){return e.handleMonthChange(e.state.date)})},e.changeMonthYear=function(r){e.setState(function(o){var s=o.date;return{date:ct(ze(s,Oe(r)),te(r))}},function(){return e.handleMonthYearChange(e.state.date)})},e.header=function(r){r===void 0&&(r=e.state.date);var o=Yt(r,e.props.locale,e.props.calendarStartDay),s=[];return e.props.showWeekNumbers&&s.push(j.createElement("div",{key:"W",className:"react-datepicker__day-name"},e.props.weekLabel||"#")),s.concat([0,1,2,3,4,5,6].map(function(l){var c=et(o,l),p=e.formatWeekday(c,e.props.locale),d=e.props.weekDayClassName?e.props.weekDayClassName(c):void 0;return j.createElement("div",{key:l,"aria-label":me(c,"EEEE",e.props.locale),className:Ee("react-datepicker__day-name",d)},p)}))},e.formatWeekday=function(r,o){return e.props.formatWeekDay?Kx(r,e.props.formatWeekDay,o):e.props.useWeekdaysShort?Ux(r,o):Qx(r,o)},e.decreaseYear=function(){e.setState(function(r){var o,s=r.date;return{date:Nn(s,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,s;if(!e.props.renderCustomHeader){var l=(r=e.props.monthsShown)!==null&&r!==void 0?r:a.defaultProps.monthsShown,c=e.props.showPreviousMonths?l-1:0,p=(o=e.props.monthSelectedIn)!==null&&o!==void 0?o:c,d=sn(e.state.date,p),h;switch(!0){case e.props.showMonthYearPicker:h=Cs(e.state.date,e.props);break;case e.props.showYearPicker:h=Zx(e.state.date,e.props);break;case e.props.showQuarterYearPicker:h=Xx(e.state.date,e.props);break;default:h=ks(d,e.props);break}if(!(!((s=e.props.forceShowMonthNavigation)!==null&&s!==void 0?s: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"],v=e.decreaseMonth;(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker)&&(v=e.decreaseYear),h&&e.props.showDisabledMonthNavigation&&(y.push("react-datepicker__navigation--previous--disabled"),v=void 0);var w=e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker,k=e.props,C=k.previousMonthButtonLabel,D=C===void 0?a.defaultProps.previousMonthButtonLabel:C,E=k.previousYearButtonLabel,g=E===void 0?a.defaultProps.previousYearButtonLabel:E,T=e.props,O=T.previousMonthAriaLabel,M=O===void 0?typeof D=="string"?D:"Previous Month":O,S=T.previousYearAriaLabel,P=S===void 0?typeof g=="string"?g:"Previous Year":S;return j.createElement("button",{type:"button",className:y.join(" "),onClick:v,onKeyDown:e.props.handleOnKeyDown,"aria-label":w?P:M},j.createElement("span",{className:x.join(" ")},w?g:D))}}},e.increaseYear=function(){e.setState(function(r){var o,s=r.date;return{date:Ct(s,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=Ss(e.state.date,e.props);break;case e.props.showYearPicker:o=ey(e.state.date,e.props);break;case e.props.showQuarterYearPicker:o=Jx(e.state.date,e.props);break;default:o=Ds(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 s=["react-datepicker__navigation","react-datepicker__navigation--next"],l=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];e.props.showTimeSelect&&s.push("react-datepicker__navigation--next--with-time"),e.props.todayButton&&s.push("react-datepicker__navigation--next--with-today-button");var c=e.increaseMonth;(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker)&&(c=e.increaseYear),o&&e.props.showDisabledMonthNavigation&&(s.push("react-datepicker__navigation--next--disabled"),c=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,v=y===void 0?a.defaultProps.nextYearButtonLabel:y,w=e.props,k=w.nextMonthAriaLabel,C=k===void 0?typeof x=="string"?x:"Next Month":k,D=w.nextYearAriaLabel,E=D===void 0?typeof v=="string"?v:"Next Year":D;return j.createElement("button",{type:"button",className:s.join(" "),onClick:c,onKeyDown:e.props.handleOnKeyDown,"aria-label":p?E:C},j.createElement("span",{className:l.join(" ")},p?v: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"),j.createElement("h2",{className:o.join(" ")},me(r,e.props.dateFormat,e.props.locale))},e.renderYearDropdown=function(r){if(r===void 0&&(r=!1),!(!e.props.showYearDropdown||r))return j.createElement(wy,ie({},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 j.createElement(fy,ie({},a.defaultProps,e.props,{month:Oe(e.state.date),onChange:e.changeMonth}))},e.renderMonthYearDropdown=function(r){if(r===void 0&&(r=!1),!(!e.props.showMonthYearDropdown||r))return j.createElement(gy,ie({},a.defaultProps,e.props,{date:e.state.date,onChange:e.changeMonthYear}))},e.handleTodayButtonClick=function(r){e.props.onSelect(xs(),r),e.props.setPreSelection&&e.props.setPreSelection(xs())},e.renderTodayButton=function(){if(!(!e.props.todayButton||e.props.showTimeSelectOnly))return j.createElement("div",{className:"react-datepicker__today-button",onClick:e.handleTodayButtonClick},e.props.todayButton)},e.renderDefaultHeader=function(r){var o=r.monthDate,s=r.i;return j.createElement("div",{className:"react-datepicker__header ".concat(e.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},e.renderCurrentMonth(o),j.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(e.props.dropdownMode),onFocus:e.handleDropdownFocus},e.renderMonthDropdown(s!==0),e.renderMonthYearDropdown(s!==0),e.renderYearDropdown(s!==0)),j.createElement("div",{className:"react-datepicker__day-names"},e.header(o)))},e.renderCustomHeader=function(r){var o,s,l=r.monthDate,c=r.i;if(e.props.showTimeSelect&&!e.state.monthContainer||e.props.showTimeSelectOnly)return null;var p=ks(e.state.date,e.props),d=Ds(e.state.date,e.props),h=Cs(e.state.date,e.props),x=Ss(e.state.date,e.props),y=!e.props.showMonthYearPicker&&!e.props.showQuarterYearPicker&&!e.props.showYearPicker;return j.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:e.props.onDropdownFocus},(s=(o=e.props).renderCustomHeader)===null||s===void 0?void 0:s.call(o,ie(ie({},e.state),{customHeaderCount:c,monthDate:l,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&&j.createElement("div",{className:"react-datepicker__day-names"},e.header(l)))},e.renderYearHeader=function(r){var o=r.monthDate,s=e.props,l=s.showYearPicker,c=s.yearItemNumber,p=c===void 0?a.defaultProps.yearItemNumber:c,d=Lt(o,p),h=d.startPeriod,x=d.endPeriod;return j.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},l?"".concat(h," - ").concat(x):te(o))},e.renderHeader=function(r){var o=r.monthDate,s=r.i,l=s===void 0?0:s,c={monthDate:o,i:l};switch(!0){case e.props.renderCustomHeader!==void 0:return e.renderCustomHeader(c);case(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker):return e.renderYearHeader(c);default:return e.renderDefaultHeader(c)}},e.renderMonths=function(){var r,o;if(!(e.props.showTimeSelectOnly||e.props.showYearPicker)){for(var s=[],l=(r=e.props.monthsShown)!==null&&r!==void 0?r:a.defaultProps.monthsShown,c=e.props.showPreviousMonths?l-1:0,p=e.props.showMonthYearPicker||e.props.showQuarterYearPicker?Ct(e.state.date,c):sn(e.state.date,c),d=(o=e.props.monthSelectedIn)!==null&&o!==void 0?o:c,h=0;h<l;++h){var x=h-d+c,y=e.props.showMonthYearPicker||e.props.showQuarterYearPicker?Ct(p,x):nt(p,x),v="month-".concat(h),w=h<l-1,k=h>0;s.push(j.createElement("div",{key:v,ref:function(C){e.monthContainer=C??void 0},className:"react-datepicker__month-container"},e.renderHeader({monthDate:y,i:h}),j.createElement(uy,ie({},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 s}},e.renderYears=function(){if(!e.props.showTimeSelectOnly&&e.props.showYearPicker)return j.createElement("div",{className:"react-datepicker__year--container"},e.renderHeader({monthDate:e.state.date}),j.createElement(yy,ie({},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 j.createElement(xy,ie({},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&&kt(r)&&!!e.props.selected,s=o?"".concat(_s(r.getHours()),":").concat(_s(r.getMinutes())):"";if(e.props.showTimeInput)return j.createElement(iy,ie({},a.defaultProps,e.props,{date:r,timeString:s,onChange:e.props.onTimeChange}))},e.renderAriaLiveRegion=function(){var r,o=Lt(e.state.date,(r=e.props.yearItemNumber)!==null&&r!==void 0?r:a.defaultProps.yearItemNumber),s=o.startPeriod,l=o.endPeriod,c;return e.props.showYearPicker?c="".concat(s," - ").concat(l):e.props.showMonthYearPicker||e.props.showQuarterYearPicker?c=te(e.state.date):c="".concat(jo(Oe(e.state.date),e.props.locale)," ").concat(te(e.state.date)),j.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},e.state.isRenderAriaLiveMessage&&c)},e.renderChildren=function(){if(e.props.children)return j.createElement("div",{className:"react-datepicker__children-container"},e.props.children)},e.containerRef=b.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:ir}},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&&(!oe(this.props.preSelection,t.preSelection)||this.props.monthSelectedIn!==t.monthSelectedIn)){var r=!Ne(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return r&&e.handleCustomMonthChange(e.state.date)})}else this.props.openToDate&&!oe(this.props.openToDate,t.openToDate)&&this.setState({date:this.props.openToDate})},a.prototype.render=function(){var t=this.props.container||Ax;return j.createElement(ma,{onClickOutside:this.handleClickOutside,style:{display:"contents"},containerRef:this.containerRef,ignoreClass:this.props.outsideClickIgnoreClass},j.createElement(t,{className:Ee("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})(b.Component),Sy=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"?j.createElement("i",{className:"".concat(o," ").concat(a," ").concat(e),"aria-hidden":"true",onClick:r}):j.isValidElement(a)?j.cloneElement(a,{className:"".concat(a.props.className||""," ").concat(o," ").concat(e),onClick:function(s){typeof a.props.onClick=="function"&&a.props.onClick(s),typeof r=="function"&&r(s)}}):j.createElement("svg",{className:"".concat(o," ").concat(e),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:r},j.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"}))},Lc=(function(n){Ie(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 Md.createPortal(this.props.children,this.el)},a})(b.Component),My="[tabindex], a, button, input, select, textarea",_y=function(n){return(n instanceof HTMLAnchorElement||!n.disabled)&&n.tabIndex!==-1},Fc=(function(n){Ie(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(My),1,-1).filter(_y)},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=b.createRef(),e}return a.prototype.render=function(){var t;return((t=this.props.enableTabLoop)!==null&&t!==void 0?t:a.defaultProps.enableTabLoop)?j.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},j.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,j.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},a.defaultProps={enableTabLoop:!0},a})(b.Component);function jy(n){var a=function(t){var e,r=typeof t.hidePopper=="boolean"?t.hidePopper:!0,o=b.useRef(null),s=Ox(ie({open:!r,whileElementsMounted:fh,placement:t.popperPlacement,middleware:ht([kh({padding:15}),wh(10),Dh({element:o})],(e=t.popperModifiers)!==null&&e!==void 0?e:[],!0)},t.popperProps)),l=ie(ie({},t),{hidePopper:r,popperProps:ie(ie({},s),{arrowRef:o})});return j.createElement(n,ie({},l))};return a}var Iy=(function(n){Ie(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,s=o===void 0?a.defaultProps.hidePopper:o,l=t.popperComponent,c=t.targetComponent,p=t.enableTabLoop,d=t.popperOnKeyDown,h=t.portalId,x=t.portalHost,y=t.popperProps,v=t.showArrow,w=void 0;if(!s){var k=Ee("react-datepicker-popper",e);w=j.createElement(Fc,{enableTabLoop:p},j.createElement("div",{ref:y.refs.setFloating,style:y.floatingStyles,className:k,"data-placement":y.placement,onKeyDown:d},l,v&&j.createElement(Ix,{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=b.createElement(this.props.popperContainer,{},w)),h&&!s&&(w=j.createElement(Lc,{portalId:h,portalHost:x},w));var C=Ee("react-datepicker-wrapper",r);return j.createElement(j.Fragment,null,j.createElement("div",{ref:y.refs.setReference,className:C},c),w)},a})(b.Component),Py=jy(Iy),$s="react-datepicker-ignore-onclickoutside";function Ey(n,a){return n&&a?Oe(n)!==Oe(a)||te(n)!==te(a):n!==a}var Aa="Date input not valid.",Ty=(function(n){Ie(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:pe()},e.modifyHolidays=function(){var r;return(r=e.props.holidays)===null||r===void 0?void 0:r.reduce(function(o,s){var l=new Date(s.date);return kt(l)?ht(ht([],o,!0),[ie(ie({},s),{date:l})],!1):o},[])},e.calcInitialState=function(){var r,o=e.getPreSelection(),s=Nc(e.props),l=Oc(e.props),c=s&&hn(o,Yr(s))?s:l&&Ht(o,ys(l))?l: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:c,highlightDates:Ms(e.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},e.resetHiddenStatus=function(){e.setState(ie(ie({},e.state),{wasHidden:!1}))},e.setHiddenStatus=function(){e.setState(ie(ie({},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:La},function(){r||e.setState(function(s){return{focused:o?s.focused:!1}},function(){!o&&e.setBlur(),e.setState({inputValue:null})})})},e.inputOk=function(){return St(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,s,l=e.state.wasHidden,c=l?e.state.open:!0;l&&e.resetHiddenStatus(),!e.state.preventFocus&&c&&((s=(o=e.props).onFocus)===null||s===void 0||s.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,s;(!e.state.open||e.props.withPortal||e.props.showTimeInput)&&((s=(o=e.props).onBlur)===null||s===void 0||s.call(o,r)),e.setState({focused:!1})},e.handleCalendarClickOutside=function(r){var o,s;e.props.inline||e.setOpen(!1),(s=(o=e.props).onClickOutside)===null||s===void 0||s.call(o,r),e.props.withPortal&&r.preventDefault()},e.handleChange=function(){for(var r,o,s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var c=s[0];if(!(e.props.onChangeRaw&&(e.props.onChangeRaw.apply(e,s),!c||typeof c.isDefaultPrevented!="function"||c.isDefaultPrevented()))){e.setState({inputValue:(c==null?void 0:c.target)instanceof HTMLInputElement?c.target.value:null,lastPreSelectChange:$y});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,v=p.selectsRange,w=p.startDate,k=p.endDate,C=(c==null?void 0:c.target)instanceof HTMLInputElement?c.target.value:"";if(v){var D=C.split("-",2).map(function(A){return A.trim()}),E=D[0],g=D[1],T=Ra(E??"",h,e.props.locale,y),O=Ra(g??"",h,e.props.locale,y),M=(w==null?void 0:w.getTime())!==(T==null?void 0:T.getTime()),S=(k==null?void 0:k.getTime())!==(O==null?void 0:O.getTime());if(!M&&!S||T&&Qe(T,e.props)||O&&Qe(O,e.props))return;(o=(r=e.props).onChange)===null||o===void 0||o.call(r,[T,O],c)}else{var P=Ra(C,h,e.props.locale,y,e.props.minDate);e.props.showTimeSelectOnly&&e.props.selected&&P&&!oe(P,e.props.selected)&&(P=yx(e.props.selected,{hours:mt(P),minutes:gt(P),seconds:Mt(P)})),(P||!C)&&e.setSelected(P,c,!0)}}},e.handleSelect=function(r,o,s){if(e.props.shouldCloseOnSelect&&!e.props.showTimeSelect&&e.sendFocusBackToInput(),e.props.onChangeRaw&&e.props.onChangeRaw(o),e.setSelected(r,o,!1,s),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 l=e.props,c=l.startDate,p=l.endDate;c&&!p&&(e.props.swapRange||!Ps(r,c))&&e.setOpen(!1)}},e.setSelected=function(r,o,s,l){var c,p,d=r;if(e.props.showYearPicker){if(d!==null&&Wr(te(d),e.props))return}else if(e.props.showMonthYearPicker){if(d!==null&&Rc(d,e.props))return}else if(d!==null&&Qe(d,e.props))return;var h=e.props,x=h.onChange,y=h.selectsRange,v=h.startDate,w=h.endDate,k=h.selectsMultiple,C=h.selectedDates,D=h.minTime,E=h.swapRange;if(!nn(e.props.selected,d)||e.props.allowSameDay||y||k)if(d!==null&&(e.props.selected&&(!s||!e.props.showTimeSelect&&!e.props.showTimeSelectOnly&&!e.props.showTimeInput)&&(d=Na(d,{hour:mt(e.props.selected),minute:gt(e.props.selected),second:Mt(e.props.selected)})),!s&&(e.props.showTimeSelect||e.props.showTimeSelectOnly)&&D&&(d=Na(d,{hour:D.getHours(),minute:D.getMinutes(),second:D.getSeconds()})),e.props.inline||e.setState({preSelection:d}),e.props.focusSelectedMonth||e.setState({monthSelectedIn:l})),y){var g=!v&&!w,T=v&&!w,O=v&&w;g?x==null||x([d,null],o):T&&(d===null?x==null||x([null,null],o):Ps(d,v)?E?x==null||x([d,v],o):x==null||x([d,null],o):x==null||x([v,d],o)),O&&(x==null||x([d,null],o))}else if(k){if(d!==null)if(!(C!=null&&C.length))x==null||x([d],o);else{var M=C.some(function(P){return oe(P,d)});if(M){var S=C.filter(function(P){return!oe(P,d)});x==null||x(S,o)}else x==null||x(ht(ht([],C,!0),[d],!1),o)}}else x==null||x(d,o);s||((p=(c=e.props).onSelect)===null||p===void 0||p.call(c,d,o),e.setState({inputValue:null}))},e.setPreSelection=function(r){var o=St(e.props.minDate),s=St(e.props.maxDate),l=!0;if(r){var c=Yr(r);if(o&&s)l=Xn(r,e.props.minDate,e.props.maxDate);else if(o){var p=Yr(e.props.minDate);l=Ht(r,p)||nn(c,p)}else if(s){var d=ys(e.props.maxDate);l=hn(r,d)||nn(c,d)}}l&&e.setState({preSelection:r})},e.toggleCalendar=function(){e.setOpen(!e.state.open)},e.handleTimeChange=function(r){var o,s;if(!(e.props.selectsRange||e.props.selectsMultiple)){var l=e.props.selected?e.props.selected:e.getPreSelection(),c=e.props.selected?r:Na(l,{hour:mt(r),minute:gt(r)});e.setState({preSelection:c}),(s=(o=e.props).onChange)===null||s===void 0||s.call(o,c),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,s,l,c,p,d;(s=(o=e.props).onKeyDown)===null||s===void 0||s.call(o,r);var h=r.key;if(!e.state.open&&!e.props.inline&&!e.props.preventOpenOnFocus){(h===L.ArrowDown||h===L.ArrowUp||h===L.Enter)&&((l=e.onInputClick)===null||l===void 0||l.call(e));return}if(e.state.open){if(h===L.ArrowDown||h===L.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=((c=e.calendar)===null||c===void 0?void 0:c.containerRef.current)instanceof Element&&e.calendar.containerRef.current.querySelector(x);y instanceof HTMLElement&&y.focus({preventScroll:!0});return}var v=pe(e.state.preSelection);h===L.Enter?(r.preventDefault(),r.target.blur(),e.inputOk()&&e.state.lastPreSelectChange===La?(e.handleSelect(v,r),!e.props.shouldCloseOnSelect&&e.setPreSelection(v)):e.setOpen(!1)):h===L.Escape?(r.preventDefault(),r.target.blur(),e.sendFocusBackToInput(),e.setOpen(!1)):h===L.Tab&&e.setOpen(!1),e.inputOk()||(d=(p=e.props).onInputError)===null||d===void 0||d.call(p,{code:1,msg:Aa})}},e.onPortalKeyDown=function(r){var o=r.key;o===L.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,s,l,c,p,d,h=e.props,x=h.minDate,y=h.maxDate,v=h.disabledKeyboardNavigation,w=h.showWeekPicker,k=h.shouldCloseOnSelect,C=h.locale,D=h.calendarStartDay,E=h.adjustDateOnChange,g=h.inline;if((s=(o=e.props).onKeyDown)===null||s===void 0||s.call(o,r),!v){var T=r.key,O=r.shiftKey,M=pe(e.state.preSelection),S=function(H,N){var F=N;switch(H){case L.ArrowRight:F=w?Qr(N,1):et(N,1);break;case L.ArrowLeft:F=w?fs(N):tx(N);break;case L.ArrowUp:F=fs(N);break;case L.ArrowDown:F=Qr(N,1);break;case L.PageUp:F=O?Nn(N,1):sn(N,1);break;case L.PageDown:F=O?Ct(N,1):nt(N,1);break;case L.Home:F=Yt(N,C,D);break;case L.End:F=zx(N);break}return F},P=function(H,N){for(var F=40,_=H,re=!1,z=0,q=S(H,N);!re;){if(z>=F){q=N;break}x&&q<x&&(_=L.ArrowRight,q=Qe(x,e.props)?S(_,q):x),y&&q>y&&(_=L.ArrowLeft,q=Qe(y,e.props)?S(_,q):y),Qe(q,e.props)?((_===L.PageUp||_===L.Home)&&(_=L.ArrowRight),(_===L.PageDown||_===L.End)&&(_=L.ArrowLeft),q=S(_,q)):re=!0,z++}return q};if(T===L.Enter){r.preventDefault(),e.handleSelect(M,r),!k&&e.setPreSelection(M);return}else if(T===L.Escape){r.preventDefault(),e.setOpen(!1),e.inputOk()||(c=(l=e.props).onInputError)===null||c===void 0||c.call(l,{code:1,msg:Aa});return}var A=null;switch(T){case L.ArrowLeft:case L.ArrowRight:case L.ArrowUp:case L.ArrowDown:case L.PageUp:case L.PageDown:case L.Home:case L.End:A=P(T,M);break}if(!A){(d=(p=e.props).onInputError)===null||d===void 0||d.call(p,{code:1,msg:Aa});return}if(r.preventDefault(),e.setState({lastPreSelectChange:La}),E&&e.setSelected(A),e.setPreSelection(A),g){var B=Oe(M),U=Oe(A),V=te(M),G=te(A);B!==U||V!==G?e.setState({shouldFocusDayInline:!0}):e.setState({shouldFocusDayInline:!1})}}},e.onPopperKeyDown=function(r){var o=r.key;o===L.Escape&&(r.preventDefault(),e.sendFocusBackToInput())},e.onClearClick=function(r){r&&r.preventDefault&&r.preventDefault(),e.sendFocusBackToInput();var o=e.props,s=o.selectsRange,l=o.onChange;s?l==null||l([null,null],r):l==null||l(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:j.createElement(Cy,ie({showMonthYearDropdown:void 0,ref:function(s){e.calendar=s}},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:ny(e.modifyHolidays()),outsideClickIgnoreClass:$s,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,s=o===void 0?a.defaultProps.dateFormat:o,l=r.locale,c=e.props.showTimeInput||e.props.showTimeSelect,p=c?"PPPPp":"PPPP",d;return e.props.selectsRange?d="Selected start date: ".concat(Ke(e.props.startDate,{dateFormat:p,locale:l}),". ").concat(e.props.endDate?"End date: "+Ke(e.props.endDate,{dateFormat:p,locale:l}):""):e.props.showTimeSelectOnly?d="Selected time: ".concat(Ke(e.props.selected,{dateFormat:s,locale:l})):e.props.showYearPicker?d="Selected year: ".concat(Ke(e.props.selected,{dateFormat:"yyyy",locale:l})):e.props.showMonthYearPicker?d="Selected month: ".concat(Ke(e.props.selected,{dateFormat:"MMMM yyyy",locale:l})):e.props.showQuarterYearPicker?d="Selected quarter: ".concat(Ke(e.props.selected,{dateFormat:"yyyy, QQQ",locale:l})):d="Selected date: ".concat(Ke(e.props.selected,{dateFormat:p,locale:l})),j.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},d)},e.renderDateInput=function(){var r,o,s,l=Ee(e.props.className,(r={},r[$s]=e.state.open,r)),c=e.props.customInput||j.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,v=typeof e.props.value=="string"?e.props.value:typeof e.state.inputValue=="string"?e.state.inputValue:e.props.selectsRange?Yx(e.props.startDate,e.props.endDate,{dateFormat:x,locale:y}):e.props.selectsMultiple?Wx((s=e.props.selectedDates)!==null&&s!==void 0?s:[],{dateFormat:x,locale:y}):Ke(e.props.selected,{dateFormat:x,locale:y});return b.cloneElement(c,(o={},o[p]=function(w){e.input=w},o.value=v,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=Ee(c.props.className,l),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,s=r.disabled,l=r.selected,c=r.startDate,p=r.endDate,d=r.clearButtonTitle,h=r.clearButtonClassName,x=h===void 0?"":h,y=r.ariaLabelClose,v=y===void 0?"Close":y,w=r.selectedDates;return o&&(l!=null||c!=null||p!=null||w!=null&&w.length)?j.createElement("button",{type:"button",className:Ee("react-datepicker__close-icon",x,{"react-datepicker__close-icon--disabled":s}),disabled:s,"aria-label":v,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:ir,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,s,l;t.inline&&Ey(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:Ms(this.props.highlightDates)}),!e.focused&&!nn(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&&((l=(s=this.props).onCalendarClose)===null||l===void 0||l.call(s)))},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,s=t.calendarIconClassName,l=t.toggleCalendarOnIconClick,c=this.state.open;return o&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),j.createElement("div",{className:"react-datepicker__input-container".concat(e?" react-datepicker__view-calendar-icon":"")},e&&j.createElement(Sy,ie({icon:r,className:Ee(s,!s&&o,c&&"react-datepicker-ignore-onclickoutside")},l?{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?j.createElement(Fc,{enableTabLoop:this.props.enableTabLoop},j.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},t)):null;return this.state.open&&this.props.portalId&&(e=j.createElement(Lc,ie({portalId:this.props.portalId},this.props),e)),j.createElement("div",null,this.renderInputContainer(),e)}return j.createElement(Py,ie({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:t,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},a})(b.Component),$y="input",La="navigate";function Ry(){const{data:n}=ye({queryKey:["feature-flag","proceeds-to-treasury"],queryFn:Bd,staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return n===!0}const Ny=m.div`
|
|
374
|
-
display: flex;
|
|
375
|
-
align-items: center;
|
|
376
|
-
gap: 16px;
|
|
377
|
-
width: 100%;
|
|
378
|
-
max-width: 456px;
|
|
379
|
-
`,Oy=m.span`
|
|
380
|
-
flex: none;
|
|
381
|
-
font-family: ${u.font.sans};
|
|
382
|
-
font-size: 18px;
|
|
383
|
-
color: ${u.colors.muted};
|
|
384
|
-
`,Ay=m.p`
|
|
385
|
-
margin: 0;
|
|
386
|
-
font-family: ${u.font.sans};
|
|
387
|
-
font-size: 13px;
|
|
388
|
-
line-height: 1.5;
|
|
389
|
-
color: ${u.colors.muted};
|
|
390
|
-
text-align: center;
|
|
391
|
-
`,Ly=m.p`
|
|
392
|
-
margin: 0;
|
|
393
|
-
font-family: ${u.font.sans};
|
|
394
|
-
font-size: 13px;
|
|
395
|
-
line-height: 1.5;
|
|
396
|
-
color: ${u.colors.text};
|
|
397
|
-
`;function Yc(n,a){const[t,e]=b.useState(!1),[r,o]=b.useState(!1),[s,l]=b.useState(null),c=b.useRef(null);b.useEffect(()=>{const d=new AbortController;return c.current=d,()=>d.abort(new DOMException("Modal closed","AbortError"))},[]);async function p(d){if(!n||t)return!0;l(null);try{const h=await n.cancelCurrent({payGas:d,onWaiting:x=>o(x>2e4)});return h!=="ok"?(l(h==="relay-reverted"?"reverted":"pending"),!1):(e(!0),!0)}catch(h){return je(h,{flow:"edit_price_cancel"}),a(Wt(h,f("listingEdit.cancelFailed"))),!1}finally{o(!1)}}return{cancelDone:t,slow:r,cancelFailed:s,setCancelFailed:l,cancelCurrent:p,signal:()=>{var d;return(d=c.current)==null?void 0:d.signal}}}function Po({state:n,canPayGas:a,busy:t,onPayGas:e,onLater:r,testId:o="edit-cancel-relay-failed"}){return i.jsxs(Ly,{"data-testid":o,children:[a?n==="reverted"?f("itemDetail.cancelRelayReverted"):f("itemDetail.cancelRelayFailed"):f("itemDetail.cancelRelayRetry"),a?i.jsxs(i.Fragment,{children:[" ",i.jsx(Pi,{type:"button","data-testid":"cancel-pay-gas",onClick:e,disabled:t,children:f("itemDetail.cancelPayGas")}),r?i.jsxs(i.Fragment,{children:[" ",i.jsx(Pi,{type:"button","data-testid":"cancel-later",onClick:r,disabled:t,children:f("itemDetail.cancelLater")})]}):null]}):null]})}function Wc({phase:n,managed:a,slow:t}){const r=n==="list"?2:1,o=`listingEdit.${a?"step":"confirm"}${n==="list"?"New":"Removal"}`;return i.jsxs(Zt,{"data-processing":!0,"data-testid":"listing-steps",role:"status","aria-live":"polite",children:[i.jsx(zl,{src:Rl,alt:"",width:61,height:61}),i.jsx(ql,{children:f(o)}),i.jsxs(Ny,{children:[i.jsx(Kl,{"aria-hidden":!0,children:i.jsx(Ql,{})}),i.jsxs(Oy,{"data-testid":"listing-steps-count",children:[r,"/",2]})]}),t?i.jsx(Ay,{"data-testid":"listing-steps-slow",children:f("listingEdit.slow")}):null]})}const Fa=m.div`
|
|
398
|
-
position: fixed;
|
|
399
|
-
inset: 0;
|
|
400
|
-
z-index: 10000;
|
|
401
|
-
display: flex;
|
|
402
|
-
align-items: center;
|
|
403
|
-
justify-content: center;
|
|
404
|
-
padding: 16px;
|
|
405
|
-
background: rgba(22, 21, 24, 0.55);
|
|
406
|
-
`,Ya=m.div`
|
|
407
|
-
width: 560px;
|
|
408
|
-
max-width: 100%;
|
|
409
|
-
max-height: 92vh;
|
|
410
|
-
overflow-y: auto;
|
|
411
|
-
background: ${u.colors.white};
|
|
412
|
-
border-radius: 16px;
|
|
413
|
-
padding: 12px 16px 16px;
|
|
414
|
-
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
415
|
-
display: flex;
|
|
416
|
-
flex-direction: column;
|
|
417
|
-
gap: 24px;
|
|
418
|
-
`,Wa=m.div`
|
|
419
|
-
display: flex;
|
|
420
|
-
align-items: center;
|
|
421
|
-
justify-content: space-between;
|
|
422
|
-
gap: 8px;
|
|
423
|
-
padding-bottom: 16px;
|
|
424
|
-
border-bottom: 1px solid ${u.colors.gray4};
|
|
425
|
-
`,Ba=m.h2`
|
|
426
|
-
margin: 0;
|
|
427
|
-
font-family: ${u.font.sans};
|
|
428
|
-
font-weight: 600;
|
|
429
|
-
font-size: 20px;
|
|
430
|
-
line-height: 1.6;
|
|
431
|
-
color: ${u.colors.text};
|
|
432
|
-
`,Ha=m.button`
|
|
433
|
-
flex: none;
|
|
434
|
-
display: grid;
|
|
435
|
-
place-items: center;
|
|
436
|
-
width: 24px;
|
|
437
|
-
height: 24px;
|
|
438
|
-
border: 0;
|
|
439
|
-
background: none;
|
|
440
|
-
cursor: pointer;
|
|
441
|
-
color: ${u.colors.text};
|
|
442
|
-
|
|
443
|
-
.ico {
|
|
444
|
-
width: 18px;
|
|
445
|
-
height: 18px;
|
|
446
|
-
}
|
|
447
|
-
&:disabled {
|
|
448
|
-
opacity: 0.4;
|
|
449
|
-
cursor: default;
|
|
450
|
-
}
|
|
451
|
-
&:focus-visible {
|
|
452
|
-
outline: 2px solid ${u.colors.accent};
|
|
453
|
-
outline-offset: 2px;
|
|
454
|
-
}
|
|
455
|
-
`,Fy=m.p`
|
|
456
|
-
margin: 0;
|
|
457
|
-
font-family: ${u.font.sans};
|
|
458
|
-
font-size: 14px;
|
|
459
|
-
line-height: 1.57;
|
|
460
|
-
color: ${u.colors.text};
|
|
461
|
-
text-align: left;
|
|
462
|
-
`,Yy=m.div`
|
|
463
|
-
display: flex;
|
|
464
|
-
align-items: center;
|
|
465
|
-
gap: 12px;
|
|
466
|
-
`,Wy=m.div`
|
|
467
|
-
flex: none;
|
|
468
|
-
display: grid;
|
|
469
|
-
place-items: center;
|
|
470
|
-
width: 180px;
|
|
471
|
-
height: 180px;
|
|
472
|
-
border-radius: 16px;
|
|
473
|
-
background: ${u.colors.media};
|
|
474
|
-
border: 1px solid ${u.colors.gray4};
|
|
475
|
-
overflow: hidden;
|
|
476
|
-
|
|
477
|
-
img {
|
|
478
|
-
width: 150px;
|
|
479
|
-
height: 150px;
|
|
480
|
-
object-fit: contain;
|
|
481
|
-
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
${u.media.maxWidth("mobile")} {
|
|
485
|
-
width: 120px;
|
|
486
|
-
height: 120px;
|
|
487
|
-
|
|
488
|
-
img {
|
|
489
|
-
width: 100px;
|
|
490
|
-
height: 100px;
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
`,By=m.div`
|
|
494
|
-
flex: 1 1 0;
|
|
495
|
-
min-width: 0;
|
|
496
|
-
display: flex;
|
|
497
|
-
flex-direction: column;
|
|
498
|
-
gap: 4px;
|
|
499
|
-
padding: 8px;
|
|
500
|
-
`,Hy=m.p`
|
|
501
|
-
margin: 0;
|
|
502
|
-
font-family: ${u.font.sans};
|
|
503
|
-
font-weight: 600;
|
|
504
|
-
font-size: 20px;
|
|
505
|
-
line-height: 1.57;
|
|
506
|
-
color: ${u.colors.text};
|
|
507
|
-
`,zy=m.p`
|
|
508
|
-
margin: 0;
|
|
509
|
-
font-family: ${u.font.sans};
|
|
510
|
-
font-size: 10px;
|
|
511
|
-
line-height: 1.43;
|
|
512
|
-
color: ${u.colors.muted};
|
|
513
|
-
`,qy=m.div`
|
|
514
|
-
display: flex;
|
|
515
|
-
gap: 12px;
|
|
516
|
-
|
|
517
|
-
${u.media.maxWidth("mobile")} {
|
|
518
|
-
flex-direction: column;
|
|
519
|
-
}
|
|
520
|
-
`,Rs=m.label`
|
|
521
|
-
flex: 1 1 0;
|
|
522
|
-
min-width: 0;
|
|
523
|
-
display: flex;
|
|
524
|
-
flex-direction: column;
|
|
525
|
-
gap: 4px;
|
|
526
|
-
`,Ns=m.span`
|
|
527
|
-
font-family: ${u.font.sans};
|
|
528
|
-
font-size: 12px;
|
|
529
|
-
color: ${u.colors.muted};
|
|
530
|
-
`,Ky=m.div`
|
|
531
|
-
display: flex;
|
|
532
|
-
align-items: center;
|
|
533
|
-
justify-content: space-between;
|
|
534
|
-
gap: 4px;
|
|
535
|
-
height: 42px;
|
|
536
|
-
padding: 0 8px;
|
|
537
|
-
border: 0.5px solid ${u.colors.text};
|
|
538
|
-
border-radius: 8px;
|
|
539
|
-
background: ${u.colors.white};
|
|
540
|
-
|
|
541
|
-
&:focus-within {
|
|
542
|
-
border-color: ${u.colors.magenta};
|
|
543
|
-
}
|
|
544
|
-
&[aria-invalid='true'] {
|
|
545
|
-
border-color: ${u.colors.err};
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
.ccy {
|
|
549
|
-
flex: none;
|
|
550
|
-
width: 22px;
|
|
551
|
-
height: 22px;
|
|
552
|
-
color: ${u.colors.rarity};
|
|
553
|
-
}
|
|
554
|
-
.cal {
|
|
555
|
-
flex: none;
|
|
556
|
-
width: 18px;
|
|
557
|
-
height: 18px;
|
|
558
|
-
color: ${u.colors.text};
|
|
559
|
-
}
|
|
560
|
-
`,Qy=m.input`
|
|
561
|
-
flex: 1 1 auto;
|
|
562
|
-
min-width: 0;
|
|
563
|
-
border: 0;
|
|
564
|
-
outline: none;
|
|
565
|
-
background: transparent;
|
|
566
|
-
font-family: ${u.font.sans};
|
|
567
|
-
font-size: 13px;
|
|
568
|
-
color: ${u.colors.text};
|
|
569
|
-
|
|
570
|
-
&::placeholder {
|
|
571
|
-
color: ${u.colors.muted2};
|
|
572
|
-
}
|
|
573
|
-
/* Strip the number spinners — the glyph + USD hint carry the affordance. */
|
|
574
|
-
&::-webkit-outer-spin-button,
|
|
575
|
-
&::-webkit-inner-spin-button {
|
|
576
|
-
-webkit-appearance: none;
|
|
577
|
-
margin: 0;
|
|
578
|
-
}
|
|
579
|
-
&[type='number'] {
|
|
580
|
-
-moz-appearance: textfield;
|
|
581
|
-
appearance: textfield;
|
|
582
|
-
}
|
|
583
|
-
`,Uy=m.span`
|
|
584
|
-
flex: none;
|
|
585
|
-
font-family: ${u.font.sans};
|
|
586
|
-
font-size: 10px;
|
|
587
|
-
color: ${u.colors.muted2};
|
|
588
|
-
`,Vy=m.div`
|
|
589
|
-
.react-datepicker-wrapper {
|
|
590
|
-
display: block;
|
|
591
|
-
width: 100%;
|
|
592
|
-
}
|
|
593
|
-
.react-datepicker__input-container {
|
|
594
|
-
display: flex;
|
|
595
|
-
align-items: center;
|
|
596
|
-
}
|
|
597
|
-
.react-datepicker__input-container input {
|
|
598
|
-
width: 100%;
|
|
599
|
-
height: 42px;
|
|
600
|
-
padding: 0 8px;
|
|
601
|
-
border: 0.5px solid ${u.colors.text};
|
|
602
|
-
border-radius: 8px;
|
|
603
|
-
background: ${u.colors.white};
|
|
604
|
-
font-family: ${u.font.sans};
|
|
605
|
-
font-size: 13px;
|
|
606
|
-
color: ${u.colors.text};
|
|
607
|
-
outline: none;
|
|
608
|
-
}
|
|
609
|
-
.react-datepicker__input-container input:focus {
|
|
610
|
-
border-color: ${u.colors.magenta};
|
|
611
|
-
}
|
|
612
|
-
&[data-invalid='true'] .react-datepicker__input-container input {
|
|
613
|
-
border-color: ${u.colors.err};
|
|
614
|
-
}
|
|
615
|
-
/* The showIcon calendar glyph inside the field. */
|
|
616
|
-
.react-datepicker__calendar-icon {
|
|
617
|
-
fill: ${u.colors.text};
|
|
618
|
-
opacity: 0.85;
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
/* ---- Calendar popup: white / on-brand (override react-datepicker defaults) ---- */
|
|
622
|
-
.react-datepicker-popper {
|
|
623
|
-
z-index: 40;
|
|
624
|
-
}
|
|
625
|
-
.react-datepicker {
|
|
626
|
-
font-family: ${u.font.sans};
|
|
627
|
-
font-size: 13px;
|
|
628
|
-
color: ${u.colors.text};
|
|
629
|
-
background: ${u.colors.white};
|
|
630
|
-
border: 1px solid rgba(22, 21, 24, 0.1);
|
|
631
|
-
border-radius: 12px;
|
|
632
|
-
box-shadow: 0 12px 32px rgba(22, 21, 24, 0.14);
|
|
633
|
-
overflow: hidden;
|
|
634
|
-
}
|
|
635
|
-
.react-datepicker__triangle {
|
|
636
|
-
display: none;
|
|
637
|
-
}
|
|
638
|
-
.react-datepicker__header {
|
|
639
|
-
background: ${u.colors.white};
|
|
640
|
-
border-bottom: 1px solid rgba(22, 21, 24, 0.1);
|
|
641
|
-
padding-top: 12px;
|
|
642
|
-
}
|
|
643
|
-
.react-datepicker__current-month {
|
|
644
|
-
color: ${u.colors.text};
|
|
645
|
-
font-weight: 600;
|
|
646
|
-
font-size: 14px;
|
|
647
|
-
}
|
|
648
|
-
.react-datepicker__day-name {
|
|
649
|
-
color: ${u.colors.muted2};
|
|
650
|
-
}
|
|
651
|
-
.react-datepicker__day {
|
|
652
|
-
color: ${u.colors.text};
|
|
653
|
-
border-radius: 8px;
|
|
654
|
-
}
|
|
655
|
-
.react-datepicker__day:hover {
|
|
656
|
-
background: rgba(105, 31, 169, 0.1);
|
|
657
|
-
}
|
|
658
|
-
.react-datepicker__day--selected,
|
|
659
|
-
.react-datepicker__day--keyboard-selected {
|
|
660
|
-
background: ${u.colors.accent};
|
|
661
|
-
color: ${u.colors.white};
|
|
662
|
-
}
|
|
663
|
-
.react-datepicker__day--today {
|
|
664
|
-
font-weight: 700;
|
|
665
|
-
}
|
|
666
|
-
.react-datepicker__day--disabled {
|
|
667
|
-
color: ${u.colors.muted2};
|
|
668
|
-
opacity: 0.5;
|
|
669
|
-
}
|
|
670
|
-
.react-datepicker__navigation-icon::before {
|
|
671
|
-
border-color: ${u.colors.accent};
|
|
672
|
-
}
|
|
673
|
-
.react-datepicker__today-button {
|
|
674
|
-
background: ${u.colors.white};
|
|
675
|
-
border-top: 1px solid rgba(22, 21, 24, 0.1);
|
|
676
|
-
color: ${u.colors.accent};
|
|
677
|
-
font-weight: 600;
|
|
678
|
-
padding: 10px;
|
|
679
|
-
}
|
|
680
|
-
`,Gy=m.button`
|
|
681
|
-
width: 100%;
|
|
682
|
-
height: 48px;
|
|
683
|
-
border: 0;
|
|
684
|
-
border-radius: 16px;
|
|
685
|
-
cursor: pointer;
|
|
686
|
-
background: ${u.colors.accent};
|
|
687
|
-
color: ${u.colors.white};
|
|
688
|
-
font-family: ${u.font.sans};
|
|
689
|
-
font-weight: 600;
|
|
690
|
-
font-size: 15px;
|
|
691
|
-
line-height: 24px;
|
|
692
|
-
letter-spacing: 0.46px;
|
|
693
|
-
text-transform: uppercase;
|
|
694
|
-
|
|
695
|
-
&:hover:not(:disabled) {
|
|
696
|
-
background: ${u.colors.accentHover};
|
|
697
|
-
}
|
|
698
|
-
&:focus-visible {
|
|
699
|
-
outline: 2px solid ${u.colors.accent};
|
|
700
|
-
outline-offset: 2px;
|
|
701
|
-
}
|
|
702
|
-
&:disabled {
|
|
703
|
-
cursor: not-allowed;
|
|
704
|
-
background: rgba(105, 31, 169, 0.2);
|
|
705
|
-
color: ${u.colors.white};
|
|
706
|
-
}
|
|
707
|
-
`;m.p`
|
|
708
|
-
margin: 0;
|
|
709
|
-
font-family: ${u.font.sans};
|
|
710
|
-
font-size: 13px;
|
|
711
|
-
color: ${u.colors.muted};
|
|
712
|
-
text-align: center;
|
|
713
|
-
`;const Xy=m.p`
|
|
714
|
-
margin: 0;
|
|
715
|
-
font-family: ${u.font.sans};
|
|
716
|
-
font-size: 12px;
|
|
717
|
-
line-height: 1.5;
|
|
718
|
-
color: ${u.colors.muted};
|
|
719
|
-
`,Jy=m.div`
|
|
720
|
-
display: flex;
|
|
721
|
-
flex-direction: column;
|
|
722
|
-
align-items: center;
|
|
723
|
-
gap: 16px;
|
|
724
|
-
padding: 24px 16px;
|
|
725
|
-
border-radius: 16px;
|
|
726
|
-
background: rgba(193, 238, 207, 0.5);
|
|
727
|
-
text-align: center;
|
|
728
|
-
`,Zy=m.div`
|
|
729
|
-
display: grid;
|
|
730
|
-
place-items: center;
|
|
731
|
-
width: 64px;
|
|
732
|
-
height: 64px;
|
|
733
|
-
border-radius: 50%;
|
|
734
|
-
background: ${u.colors.ok};
|
|
735
|
-
color: ${u.colors.white};
|
|
736
|
-
|
|
737
|
-
.ico {
|
|
738
|
-
width: 34px;
|
|
739
|
-
height: 34px;
|
|
740
|
-
}
|
|
741
|
-
`,eb=m.p`
|
|
742
|
-
margin: 0;
|
|
743
|
-
font-family: ${u.font.sans};
|
|
744
|
-
font-size: 20px;
|
|
745
|
-
line-height: 1.334;
|
|
746
|
-
color: ${u.colors.text2};
|
|
747
|
-
|
|
748
|
-
b {
|
|
749
|
-
font-weight: 700;
|
|
750
|
-
}
|
|
751
|
-
`,tb=m.div`
|
|
752
|
-
display: flex;
|
|
753
|
-
gap: 12px;
|
|
754
|
-
|
|
755
|
-
${u.media.maxWidth("mobile")} {
|
|
756
|
-
flex-direction: column-reverse;
|
|
757
|
-
}
|
|
758
|
-
`,nb=m.button`
|
|
759
|
-
flex: 1 1 0;
|
|
760
|
-
height: 48px;
|
|
761
|
-
border: 2px solid ${u.colors.accent};
|
|
762
|
-
border-radius: 12px;
|
|
763
|
-
background: transparent;
|
|
764
|
-
color: ${u.colors.accent};
|
|
765
|
-
cursor: pointer;
|
|
766
|
-
font-family: ${u.font.sans};
|
|
767
|
-
font-weight: 600;
|
|
768
|
-
font-size: 13px;
|
|
769
|
-
line-height: 24px;
|
|
770
|
-
letter-spacing: 0.46px;
|
|
771
|
-
text-transform: uppercase;
|
|
772
|
-
|
|
773
|
-
&:hover {
|
|
774
|
-
background: rgba(105, 31, 169, 0.06);
|
|
775
|
-
}
|
|
776
|
-
&:focus-visible {
|
|
777
|
-
outline: 2px solid ${u.colors.accent};
|
|
778
|
-
outline-offset: 2px;
|
|
779
|
-
}
|
|
780
|
-
`,rb=m.button`
|
|
781
|
-
flex: 1 1 0;
|
|
782
|
-
height: 48px;
|
|
783
|
-
border: 0;
|
|
784
|
-
border-radius: 12px;
|
|
785
|
-
background: ${u.colors.accent};
|
|
786
|
-
color: ${u.colors.softWhite};
|
|
787
|
-
cursor: pointer;
|
|
788
|
-
font-family: ${u.font.sans};
|
|
789
|
-
font-weight: 600;
|
|
790
|
-
font-size: 13px;
|
|
791
|
-
line-height: 24px;
|
|
792
|
-
letter-spacing: 0.46px;
|
|
793
|
-
text-transform: uppercase;
|
|
794
|
-
|
|
795
|
-
&:hover {
|
|
796
|
-
background: ${u.colors.accentHover};
|
|
797
|
-
}
|
|
798
|
-
&:focus-visible {
|
|
799
|
-
outline: 2px solid ${u.colors.accent};
|
|
800
|
-
outline-offset: 2px;
|
|
801
|
-
}
|
|
802
|
-
`,ab=30;function Os(n){const a=new Date;return a.setHours(0,0,0,0),a.setDate(a.getDate()+n),a}function ob({asset:n,session:a,creator:t,edit:e,onListed:r,onClose:o}){const s=gn(),l=mn(),c=Ry(),{data:p}=ye({queryKey:["collection-meta",n.contractAddress],enabled:!t&&!!n.contractAddress,staleTime:5*6e4,queryFn:()=>Ol(n.contractAddress)}),d=t||(p==null?void 0:p.creator),{data:h}=ra(d),x=d?h!=null&&h.name?aa(h.name):go(d):null,[y,v]=b.useState(e!=null&&e.currentCredits?String(e.currentCredits):"10"),[w,k]=b.useState(()=>Os(ab)),[C,D]=b.useState(null),[E,g]=b.useState(!1),[T,O]=b.useState(null),[M,S]=b.useState("form"),P=b.useRef({}),{cancelDone:A,slow:B,cancelFailed:U,setCancelFailed:V,cancelCurrent:G,signal:H}=Yc(e,D),N=oa(a),F=Number(y),_=Number.isInteger(F)&&F>0,re=!!e&&!A&&F===e.currentCredits,z=w?w.getTime():NaN,q=!!w&&z>Date.now(),Q=Os(1),De=_?`$${rn(F).toFixed(2)}`:"$0";async function we(Ce={}){if(D(null),!_){D(f("sellModal.errorWholeNumber"));return}if(!q){D(f("sellModal.invalidDate"));return}if(!N){g(!0);try{const he=ji(n.contractAddress,n.chainId),Ve=await Vl(he,a.address);if(g(!1),!Ve){P.current=Ce,S("authorize");return}}catch{g(!1)}}await Te(Ce)}async function Te(Ce={}){var he,Ve;if(D(null),!_){D(f("sellModal.errorWholeNumber"));return}if(!q){D(f("sellModal.invalidDate"));return}g(!0);try{if(!await G(Ce.payGas))return;await Np({signer:a.signer,contractAddress:n.contractAddress,chainId:n.chainId});const _e=await Op({signer:a.signer,nft:{contractAddress:n.contractAddress,tokenId:n.tokenId,network:n.network,chainId:n.chainId},usdPrice:rn(F),expiresAtMs:z}),le=await(e?ec(_e,a.identity,{signal:H()}):Nl(_e,a.identity));(he=H())==null||he.throwIfAborted(),O(F),fe("Shop Listed Item",{item_id:n.itemId??n.tokenId??null,contract_address:n.contractAddress,price_credits:F,price_usd:rn(F),listing_type:"secondary",is_primary:!1}),ar.success(f(e?"listingEdit.toastUpdated":"sellModal.toastOnSale",{name:n.name})),s.invalidateQueries({queryKey:["my-assets",a.address]}),r==null||r(F,le.id)}catch(_e){if((Ve=H())!=null&&Ve.aborted)return;je(_e,{flow:"list_secondary"}),fe("Shop Listing Failed",{listing_type:"secondary",error_code:Ue(_e)}),D(Wt(_e,f(e?"listingEdit.listFailedAfterCancel":"sellModal.errorGeneric")))}finally{g(!1)}}function ae(){o(),l("/my-items")}return T!==null?i.jsx(Fa,{onClick:o,role:"presentation",children:i.jsxs(Ya,{onClick:Ce=>Ce.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":f(e?"listingEdit.successHeader":"sellModal.successHeader"),children:[i.jsxs(Wa,{children:[i.jsx(Ba,{children:f(e?"listingEdit.successHeader":"sellModal.successHeader")}),i.jsx(Ha,{onClick:o,"aria-label":f("getCredits.done"),children:i.jsx(X,{name:"close",className:"ico"})})]}),i.jsxs(Jy,{children:[i.jsx(Zy,{"aria-hidden":!0,children:i.jsx(X,{name:"check",className:"ico"})}),i.jsxs(eb,{children:[i.jsx("b",{children:f(e?"listingEdit.successBody":"sellModal.successOnSale")})," ",f("sellModal.successManage")]})]}),i.jsxs(tb,{children:[i.jsx(nb,{onClick:ae,children:f("sellModal.myItems")}),i.jsx(rb,{onClick:o,children:f("getCredits.done")})]})]})}):M==="authorize"?i.jsx(Hl,{auth:ji(n.contractAddress,n.chainId),signer:a.signer,title:f("authorizeStep.sellTitle"),name:n.name,image:n.image,icon:i.jsx(X,{name:"pen",className:"ico"}),reason:f("authorizeStep.sellReason",{name:n.name}),onAuthorized:()=>{S("form"),Te(P.current)},onCancel:()=>S("form"),onClose:o}):e&&E?i.jsx(Fa,{role:"presentation",children:i.jsxs(Ya,{onClick:Ce=>Ce.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":f("listingEdit.title"),"data-testid":"modal",children:[i.jsxs(Wa,{children:[i.jsx(Ba,{children:f("listingEdit.title")}),i.jsx(Ha,{disabled:!0,"aria-label":f("sellModal.cancel"),children:i.jsx(X,{name:"close",className:"ico"})})]}),i.jsx(Wc,{phase:A?"list":"cancel",managed:N,slow:B})]})}):i.jsx(Fa,{onClick:E?void 0:o,role:"presentation",children:i.jsxs(Ya,{"data-testid":"modal",onClick:Ce=>Ce.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":f(e?"listingEdit.title":"sellModal.sellProduct"),children:[i.jsxs(Wa,{children:[i.jsx(Ba,{children:f(e?"listingEdit.title":"sellModal.sellProduct")}),i.jsx(Ha,{onClick:o,disabled:E,"aria-label":f("sellModal.cancel"),children:i.jsx(X,{name:"close",className:"ico"})})]}),i.jsx(Fy,{children:f(e?"listingEdit.subtitle":"sellModal.subtitle")}),i.jsxs(Yy,{children:[i.jsx(Wy,{children:n.image?i.jsx("img",{src:n.image,alt:""}):null}),i.jsxs(By,{children:[i.jsx(Hy,{children:n.name}),x?i.jsx(zy,{children:f("sellModal.byCreator",{name:x})}):null]})]}),i.jsxs(qy,{children:[i.jsxs(Rs,{children:[i.jsx(Ns,{children:f("sellModal.priceShort")}),i.jsxs(Ky,{"aria-invalid":y.length>0&&!_,children:[i.jsx(Be,{className:"ccy"}),i.jsx(Qy,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:y,onChange:Ce=>v(Ce.target.value),disabled:E,"aria-label":f("sellModal.priceLabel",{currency:"credits"})}),i.jsx(Uy,{"aria-hidden":!0,children:De})]})]}),i.jsxs(Rs,{children:[i.jsx(Ns,{children:f("sellModal.expirationLabel")}),i.jsx(Vy,{"data-invalid":!!w&&!q,children:i.jsx(Ty,{selected:w,onChange:k,minDate:Q,dateFormat:"MM/dd/yyyy",placeholderText:"MM/DD/YYYY",disabled:E,showIcon:!0,showPopperArrow:!1,todayButton:f("sellModal.today"),ariaLabelledBy:void 0,"aria-label":f("sellModal.expirationLabel")})})]})]}),c&&_?i.jsx(Xy,{children:f("sellModal.proceedsCredits",{count:F})}):null,U?i.jsx(Po,{state:U,canPayGas:!!(e!=null&&e.canPayGas),busy:E,onPayGas:()=>void we({payGas:!0}),onLater:()=>V(null)}):null,i.jsx(Bt,{message:C}),i.jsx(Gy,{onClick:()=>void we(),disabled:E||re||U==="pending"||!_||!q,"data-testid":"list-submit",children:e?f(A?"sellModal.putUpForSale":"listingEdit.submit"):E?N?f("sellModal.puttingOnSale"):f("sellModal.confirmListing"):f("sellModal.putUpForSale")})]})})}const ib=m.div`
|
|
803
|
-
position: fixed;
|
|
804
|
-
inset: 0;
|
|
805
|
-
z-index: 10000;
|
|
806
|
-
display: flex;
|
|
807
|
-
align-items: center;
|
|
808
|
-
justify-content: center;
|
|
809
|
-
padding: 16px;
|
|
810
|
-
background: rgba(22, 21, 24, 0.55);
|
|
811
|
-
`,sb=m.div`
|
|
812
|
-
width: 560px;
|
|
813
|
-
max-width: 100%;
|
|
814
|
-
max-height: 92vh;
|
|
815
|
-
overflow-y: auto;
|
|
816
|
-
background: ${u.colors.white};
|
|
817
|
-
border-radius: 16px;
|
|
818
|
-
padding: 12px 16px 16px;
|
|
819
|
-
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
820
|
-
display: flex;
|
|
821
|
-
flex-direction: column;
|
|
822
|
-
gap: 24px;
|
|
823
|
-
|
|
824
|
-
${u.media.maxWidth("mobile")} {
|
|
825
|
-
padding: 12px 16px 16px;
|
|
826
|
-
}
|
|
827
|
-
`,lb=m.div`
|
|
828
|
-
display: flex;
|
|
829
|
-
flex-direction: column;
|
|
830
|
-
gap: 4px;
|
|
831
|
-
padding-bottom: 16px;
|
|
832
|
-
border-bottom: 1px solid ${u.colors.gray4};
|
|
833
|
-
`,cb=m.div`
|
|
834
|
-
display: flex;
|
|
835
|
-
align-items: center;
|
|
836
|
-
justify-content: space-between;
|
|
837
|
-
gap: 8px;
|
|
838
|
-
`,db=m.h2`
|
|
839
|
-
margin: 0;
|
|
840
|
-
font-family: ${u.font.sans};
|
|
841
|
-
font-weight: 600;
|
|
842
|
-
font-size: 20px;
|
|
843
|
-
line-height: 1.6;
|
|
844
|
-
color: ${u.colors.text};
|
|
845
|
-
`,ub=m.button`
|
|
846
|
-
flex: none;
|
|
847
|
-
display: grid;
|
|
848
|
-
place-items: center;
|
|
849
|
-
width: 24px;
|
|
850
|
-
height: 24px;
|
|
851
|
-
border: 0;
|
|
852
|
-
background: none;
|
|
853
|
-
cursor: pointer;
|
|
854
|
-
color: ${u.colors.text};
|
|
855
|
-
|
|
856
|
-
.ico {
|
|
857
|
-
width: 18px;
|
|
858
|
-
height: 18px;
|
|
859
|
-
}
|
|
860
|
-
&:disabled {
|
|
861
|
-
opacity: 0.4;
|
|
862
|
-
cursor: default;
|
|
863
|
-
}
|
|
864
|
-
&:focus-visible {
|
|
865
|
-
outline: 2px solid ${u.colors.accent};
|
|
866
|
-
outline-offset: 2px;
|
|
867
|
-
}
|
|
868
|
-
`,pb=m.div`
|
|
869
|
-
display: flex;
|
|
870
|
-
align-items: center;
|
|
871
|
-
gap: 12px;
|
|
872
|
-
`,fb=m.img`
|
|
873
|
-
flex: none;
|
|
874
|
-
width: 72px;
|
|
875
|
-
height: 72px;
|
|
876
|
-
border-radius: 12px;
|
|
877
|
-
object-fit: cover;
|
|
878
|
-
background: ${u.colors.media};
|
|
879
|
-
`,hb=m.p`
|
|
880
|
-
margin: 0;
|
|
881
|
-
font-family: ${u.font.sans};
|
|
882
|
-
font-weight: 600;
|
|
883
|
-
font-size: 18px;
|
|
884
|
-
line-height: 1.4;
|
|
885
|
-
color: ${u.colors.text};
|
|
886
|
-
`,mb=m.label`
|
|
887
|
-
display: flex;
|
|
888
|
-
flex-direction: column;
|
|
889
|
-
gap: 6px;
|
|
890
|
-
`,gb=m.span`
|
|
891
|
-
font-family: ${u.font.sans};
|
|
892
|
-
font-size: 12px;
|
|
893
|
-
color: ${u.colors.muted};
|
|
894
|
-
`,xb=m.input`
|
|
895
|
-
width: 100%;
|
|
896
|
-
height: 44px;
|
|
897
|
-
padding: 0 12px;
|
|
898
|
-
border: 1px solid ${u.colors.text};
|
|
899
|
-
border-radius: 8px;
|
|
900
|
-
background: ${u.colors.white};
|
|
901
|
-
font-family: ${u.font.sans};
|
|
902
|
-
font-size: 14px;
|
|
903
|
-
color: ${u.colors.text};
|
|
904
|
-
|
|
905
|
-
&::placeholder {
|
|
906
|
-
color: ${u.colors.muted2};
|
|
907
|
-
}
|
|
908
|
-
&:focus-visible {
|
|
909
|
-
outline: none;
|
|
910
|
-
border-color: ${u.colors.magenta};
|
|
911
|
-
}
|
|
912
|
-
&[aria-invalid='true'] {
|
|
913
|
-
border-color: ${u.colors.err};
|
|
914
|
-
}
|
|
915
|
-
&:disabled {
|
|
916
|
-
opacity: 0.6;
|
|
917
|
-
}
|
|
918
|
-
`,yb=m.p`
|
|
919
|
-
margin: 0;
|
|
920
|
-
padding: 12px 14px;
|
|
921
|
-
border-radius: 10px;
|
|
922
|
-
background: rgba(255, 45, 85, 0.1);
|
|
923
|
-
font-family: ${u.font.sans};
|
|
924
|
-
font-size: 13px;
|
|
925
|
-
line-height: 1.5;
|
|
926
|
-
color: ${u.colors.text2};
|
|
927
|
-
`,As=m.div`
|
|
928
|
-
display: flex;
|
|
929
|
-
gap: 12px;
|
|
930
|
-
|
|
931
|
-
${u.media.maxWidth("mobile")} {
|
|
932
|
-
flex-direction: column-reverse;
|
|
933
|
-
}
|
|
934
|
-
`,bb=m.button`
|
|
935
|
-
flex: 1;
|
|
936
|
-
height: 48px;
|
|
937
|
-
border: 2px solid ${u.colors.blackBtn};
|
|
938
|
-
border-radius: 16px;
|
|
939
|
-
background: transparent;
|
|
940
|
-
color: ${u.colors.text};
|
|
941
|
-
cursor: pointer;
|
|
942
|
-
font-family: ${u.font.sans};
|
|
943
|
-
font-weight: 600;
|
|
944
|
-
font-size: 15px;
|
|
945
|
-
line-height: 24px;
|
|
946
|
-
letter-spacing: 0.46px;
|
|
947
|
-
text-transform: uppercase;
|
|
948
|
-
|
|
949
|
-
&:hover:not(:disabled) {
|
|
950
|
-
background: rgba(36, 33, 41, 0.06);
|
|
951
|
-
}
|
|
952
|
-
&:focus-visible {
|
|
953
|
-
outline: 2px solid ${u.colors.accent};
|
|
954
|
-
outline-offset: 2px;
|
|
955
|
-
}
|
|
956
|
-
&:disabled {
|
|
957
|
-
opacity: 0.5;
|
|
958
|
-
cursor: default;
|
|
959
|
-
}
|
|
960
|
-
`,Ls=m.button`
|
|
961
|
-
flex: 1;
|
|
962
|
-
display: inline-flex;
|
|
963
|
-
align-items: center;
|
|
964
|
-
justify-content: center;
|
|
965
|
-
gap: 8px;
|
|
966
|
-
height: 48px;
|
|
967
|
-
border: 0;
|
|
968
|
-
border-radius: 16px;
|
|
969
|
-
background: ${u.colors.blackBtn};
|
|
970
|
-
color: ${u.colors.softWhite};
|
|
971
|
-
cursor: pointer;
|
|
972
|
-
font-family: ${u.font.sans};
|
|
973
|
-
font-weight: 600;
|
|
974
|
-
font-size: 15px;
|
|
975
|
-
line-height: 24px;
|
|
976
|
-
letter-spacing: 0.46px;
|
|
977
|
-
text-transform: uppercase;
|
|
978
|
-
|
|
979
|
-
&:hover:not(:disabled) {
|
|
980
|
-
filter: brightness(1.35);
|
|
981
|
-
}
|
|
982
|
-
&:focus-visible {
|
|
983
|
-
outline: 2px solid ${u.colors.accent};
|
|
984
|
-
outline-offset: 2px;
|
|
985
|
-
}
|
|
986
|
-
&:disabled {
|
|
987
|
-
opacity: 0.55;
|
|
988
|
-
cursor: default;
|
|
989
|
-
}
|
|
990
|
-
`,vb=m.div`
|
|
991
|
-
display: flex;
|
|
992
|
-
flex-direction: column;
|
|
993
|
-
align-items: center;
|
|
994
|
-
gap: 16px;
|
|
995
|
-
padding: 24px 16px;
|
|
996
|
-
border-radius: 16px;
|
|
997
|
-
background: rgba(193, 238, 207, 0.5);
|
|
998
|
-
text-align: center;
|
|
999
|
-
`,wb=m.div`
|
|
1000
|
-
display: grid;
|
|
1001
|
-
place-items: center;
|
|
1002
|
-
width: 64px;
|
|
1003
|
-
height: 64px;
|
|
1004
|
-
border-radius: 50%;
|
|
1005
|
-
background: ${u.colors.ok};
|
|
1006
|
-
color: ${u.colors.white};
|
|
1007
|
-
|
|
1008
|
-
.ico {
|
|
1009
|
-
width: 34px;
|
|
1010
|
-
height: 34px;
|
|
1011
|
-
}
|
|
1012
|
-
`,kb=m.p`
|
|
1013
|
-
margin: 0;
|
|
1014
|
-
font-family: ${u.font.sans};
|
|
1015
|
-
font-size: 16px;
|
|
1016
|
-
line-height: 1.34;
|
|
1017
|
-
color: ${u.colors.text2};
|
|
1018
|
-
|
|
1019
|
-
b {
|
|
1020
|
-
font-weight: 700;
|
|
1021
|
-
}
|
|
1022
|
-
`;function Db(n){return/^0x[a-fA-F0-9]{40}$/.test(n.trim())}function Cb({item:n,session:a,onClose:t,onTransferred:e}){const[r,o]=b.useState(""),[s,l]=b.useState(!1),[c,p]=b.useState(null),[d,h]=b.useState(!1),x=r.trim(),y=Db(x),v=y&&x.toLowerCase()===a.address.toLowerCase(),w=x.length===0?null:y?v?f("transfer.selfAddress"):null:f("transfer.invalidAddress"),k=y&&!v&&!s;async function C(){if(k){p(null),l(!0);try{await Ap({contractAddress:n.contractAddress,chainId:n.chainId,tokenId:n.tokenId,to:x,signer:a.signer}),fe("Shop Transferred Item",{contract_address:n.contractAddress,token_id:n.tokenId}),h(!0),ar.success(f("transfer.toastSuccess",{name:n.name})),e==null||e()}catch(D){Pn(D)||je(D,{flow:"transfer-item",tokenId:n.tokenId}),fe("Shop Transfer Failed",{error_code:Ue(D)}),p(Pn(D)?f("getCredits.errorCanceled"):Wt(D,f("transfer.errorGeneric")))}finally{l(!1)}}}return i.jsx(ib,{onClick:s?void 0:t,role:"presentation",children:i.jsxs(sb,{onClick:D=>D.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":f("transfer.title"),children:[i.jsx(lb,{children:i.jsxs(cb,{children:[i.jsx(db,{children:f("transfer.title")}),i.jsx(ub,{onClick:t,disabled:s,"aria-label":f("sellModal.cancel"),children:i.jsx(X,{name:"close",className:"ico"})})]})}),d?i.jsxs(i.Fragment,{children:[i.jsxs(vb,{children:[i.jsx(wb,{"aria-hidden":!0,children:i.jsx(X,{name:"check",className:"ico"})}),i.jsx(kb,{children:f("transfer.successBody",{name:n.name})})]}),i.jsx(As,{children:i.jsx(Ls,{onClick:t,children:f("getCredits.done")})})]}):i.jsxs(i.Fragment,{children:[i.jsxs(pb,{children:[n.thumbnail?i.jsx(fb,{src:n.thumbnail,alt:""}):null,i.jsx(hb,{children:n.name})]}),i.jsxs(mb,{children:[i.jsx(gb,{children:f("transfer.addressLabel")}),i.jsx(xb,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:r,onChange:D=>o(D.target.value),disabled:s,"aria-invalid":!!w,"aria-label":f("transfer.addressLabel")}),w?i.jsx(Bt,{message:w}):null]}),i.jsx(yb,{children:f("transfer.warning")}),i.jsx(Bt,{message:c}),i.jsxs(As,{children:[i.jsx(bb,{onClick:t,disabled:s,children:f("sellModal.cancel")}),i.jsx(Ls,{onClick:()=>void C(),disabled:!k,children:s?f("transfer.transferring"):f("transfer.transfer")})]})]})]})})}const Sb=m(gf)`
|
|
1023
|
-
width: min(500px, 92vw);
|
|
1024
|
-
gap: 20px;
|
|
1025
|
-
|
|
1026
|
-
${u.media.maxWidth("mobile")} {
|
|
1027
|
-
[data-actions] {
|
|
1028
|
-
flex-direction: column-reverse;
|
|
1029
|
-
}
|
|
1030
|
-
[data-actions] > * {
|
|
1031
|
-
width: 100%;
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
`,Mb=m(zt)`
|
|
1035
|
-
background: ${u.colors.accent};
|
|
1036
|
-
color: ${u.colors.white};
|
|
1037
|
-
text-transform: uppercase;
|
|
1038
|
-
letter-spacing: 0.046em;
|
|
1039
|
-
font-size: 13px;
|
|
1040
|
-
|
|
1041
|
-
&:hover:not(:disabled) {
|
|
1042
|
-
background: ${u.colors.accentHover};
|
|
1043
|
-
}
|
|
1044
|
-
`;function _b({name:n,managed:a,canPayGas:t,cancel:e,onClose:r}){const[o,s]=b.useState(!1),[l,c]=b.useState(!1),[p,d]=b.useState(null),[h,x]=b.useState(null);async function y(v){d(null),x(null),s(!0);try{const w=await e({payGas:v,onWaiting:k=>c(k>2e4)});w==="ok"?r():x(w==="relay-reverted"?"reverted":"pending")}catch(w){const k=Pn(w);k||je(w,{flow:"remove-listing"});const C=f("myAssets.removeListingError");d(a?C:k?f("getCredits.errorCanceled"):Wt(w,C))}finally{s(!1),c(!1)}}return i.jsx(xf,{onClick:o?void 0:r,role:"presentation",children:i.jsxs(Sb,{onClick:v=>v.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":f("removeListing.title"),"data-testid":"remove-listing-modal",children:[i.jsx(yf,{children:i.jsx(bf,{children:f("removeListing.title")})}),i.jsx("p",{className:"muted",style:{margin:0},children:f("removeListing.body",{name:n})}),o&&l?i.jsx("p",{className:"muted small",style:{margin:0},"data-testid":"cancel-slow",children:f(t?"itemDetail.cancelSlow":"itemDetail.cancelSlowManaged")}):null,h?i.jsx(Po,{state:h,canPayGas:t,busy:o,onPayGas:()=>void y(!0),testId:"cancel-gasless-failed"}):null,i.jsx(Bt,{message:p}),i.jsxs(vf,{"data-actions":!0,children:[i.jsx(zt,{variant:"outline",onClick:r,disabled:o,children:f("sellModal.cancel")}),i.jsx(Mb,{onClick:()=>void y(),disabled:o||h==="pending","data-testid":"remove-confirm",children:o?i.jsx(wf,{size:"small"}):f("itemDetail.manageRemove")})]})]})})}const za=m.div`
|
|
1045
|
-
position: fixed;
|
|
1046
|
-
inset: 0;
|
|
1047
|
-
z-index: 10000;
|
|
1048
|
-
display: flex;
|
|
1049
|
-
align-items: center;
|
|
1050
|
-
justify-content: center;
|
|
1051
|
-
padding: 16px;
|
|
1052
|
-
background: rgba(22, 21, 24, 0.55);
|
|
1053
|
-
`,qa=m.div`
|
|
1054
|
-
width: 560px;
|
|
1055
|
-
max-width: 100%;
|
|
1056
|
-
max-height: 92vh;
|
|
1057
|
-
overflow-y: auto;
|
|
1058
|
-
background: ${u.colors.white};
|
|
1059
|
-
border-radius: 16px;
|
|
1060
|
-
padding: 12px 16px 16px;
|
|
1061
|
-
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
1062
|
-
display: flex;
|
|
1063
|
-
flex-direction: column;
|
|
1064
|
-
gap: 24px;
|
|
1065
|
-
`,Ka=m.div`
|
|
1066
|
-
display: flex;
|
|
1067
|
-
align-items: center;
|
|
1068
|
-
justify-content: space-between;
|
|
1069
|
-
gap: 8px;
|
|
1070
|
-
padding-bottom: 16px;
|
|
1071
|
-
border-bottom: 1px solid ${u.colors.gray4};
|
|
1072
|
-
`,Qa=m.h2`
|
|
1073
|
-
margin: 0;
|
|
1074
|
-
font-family: ${u.font.sans};
|
|
1075
|
-
font-weight: 600;
|
|
1076
|
-
font-size: 20px;
|
|
1077
|
-
line-height: 1.6;
|
|
1078
|
-
color: ${u.colors.text};
|
|
1079
|
-
`,Ua=m.button`
|
|
1080
|
-
flex: none;
|
|
1081
|
-
display: grid;
|
|
1082
|
-
place-items: center;
|
|
1083
|
-
width: 24px;
|
|
1084
|
-
height: 24px;
|
|
1085
|
-
border: 0;
|
|
1086
|
-
background: none;
|
|
1087
|
-
cursor: pointer;
|
|
1088
|
-
color: ${u.colors.text};
|
|
1089
|
-
|
|
1090
|
-
.ico {
|
|
1091
|
-
width: 18px;
|
|
1092
|
-
height: 18px;
|
|
1093
|
-
}
|
|
1094
|
-
&:disabled {
|
|
1095
|
-
opacity: 0.4;
|
|
1096
|
-
cursor: default;
|
|
1097
|
-
}
|
|
1098
|
-
&:focus-visible {
|
|
1099
|
-
outline: 2px solid ${u.colors.accent};
|
|
1100
|
-
outline-offset: 2px;
|
|
1101
|
-
}
|
|
1102
|
-
`,jb=m.p`
|
|
1103
|
-
margin: 0;
|
|
1104
|
-
font-family: ${u.font.sans};
|
|
1105
|
-
font-size: 14px;
|
|
1106
|
-
line-height: 1.57;
|
|
1107
|
-
color: ${u.colors.text};
|
|
1108
|
-
text-align: left;
|
|
1109
|
-
`,Ib=m.div`
|
|
1110
|
-
display: flex;
|
|
1111
|
-
align-items: center;
|
|
1112
|
-
gap: 12px;
|
|
1113
|
-
`,Pb=m.div`
|
|
1114
|
-
flex: none;
|
|
1115
|
-
display: grid;
|
|
1116
|
-
place-items: center;
|
|
1117
|
-
width: 180px;
|
|
1118
|
-
height: 180px;
|
|
1119
|
-
border-radius: 16px;
|
|
1120
|
-
background: ${u.colors.media};
|
|
1121
|
-
border: 1px solid ${u.colors.gray4};
|
|
1122
|
-
overflow: hidden;
|
|
1123
|
-
|
|
1124
|
-
img {
|
|
1125
|
-
width: 150px;
|
|
1126
|
-
height: 150px;
|
|
1127
|
-
object-fit: contain;
|
|
1128
|
-
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
${u.media.maxWidth("mobile")} {
|
|
1132
|
-
width: 120px;
|
|
1133
|
-
height: 120px;
|
|
1134
|
-
|
|
1135
|
-
img {
|
|
1136
|
-
width: 100px;
|
|
1137
|
-
height: 100px;
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
`,Eb=m.div`
|
|
1141
|
-
flex: 1 1 0;
|
|
1142
|
-
min-width: 0;
|
|
1143
|
-
display: flex;
|
|
1144
|
-
flex-direction: column;
|
|
1145
|
-
gap: 4px;
|
|
1146
|
-
padding: 8px;
|
|
1147
|
-
`,Tb=m.p`
|
|
1148
|
-
margin: 0;
|
|
1149
|
-
font-family: ${u.font.sans};
|
|
1150
|
-
font-weight: 600;
|
|
1151
|
-
font-size: 20px;
|
|
1152
|
-
line-height: 1.57;
|
|
1153
|
-
color: ${u.colors.text};
|
|
1154
|
-
`,$b=m.p`
|
|
1155
|
-
margin: 0;
|
|
1156
|
-
font-family: ${u.font.sans};
|
|
1157
|
-
font-size: 10px;
|
|
1158
|
-
line-height: 1.43;
|
|
1159
|
-
color: ${u.colors.muted};
|
|
1160
|
-
`,Rb=m.label`
|
|
1161
|
-
display: flex;
|
|
1162
|
-
flex-direction: column;
|
|
1163
|
-
gap: 4px;
|
|
1164
|
-
`,Nb=m.span`
|
|
1165
|
-
font-family: ${u.font.sans};
|
|
1166
|
-
font-size: 12px;
|
|
1167
|
-
color: ${u.colors.muted};
|
|
1168
|
-
`,Ob=m.div`
|
|
1169
|
-
display: flex;
|
|
1170
|
-
align-items: center;
|
|
1171
|
-
justify-content: space-between;
|
|
1172
|
-
gap: 4px;
|
|
1173
|
-
height: 42px;
|
|
1174
|
-
padding: 0 8px;
|
|
1175
|
-
border: 0.5px solid ${u.colors.text};
|
|
1176
|
-
border-radius: 8px;
|
|
1177
|
-
background: ${u.colors.white};
|
|
1178
|
-
|
|
1179
|
-
&:focus-within {
|
|
1180
|
-
border-color: ${u.colors.magenta};
|
|
1181
|
-
}
|
|
1182
|
-
&[aria-invalid='true'] {
|
|
1183
|
-
border-color: ${u.colors.err};
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
.ccy {
|
|
1187
|
-
flex: none;
|
|
1188
|
-
width: 22px;
|
|
1189
|
-
height: 22px;
|
|
1190
|
-
color: ${u.colors.rarity};
|
|
1191
|
-
}
|
|
1192
|
-
`,Ab=m.input`
|
|
1193
|
-
flex: 1 1 auto;
|
|
1194
|
-
min-width: 0;
|
|
1195
|
-
border: 0;
|
|
1196
|
-
outline: none;
|
|
1197
|
-
background: transparent;
|
|
1198
|
-
font-family: ${u.font.sans};
|
|
1199
|
-
font-size: 13px;
|
|
1200
|
-
color: ${u.colors.text};
|
|
1201
|
-
|
|
1202
|
-
&::placeholder {
|
|
1203
|
-
color: ${u.colors.muted2};
|
|
1204
|
-
}
|
|
1205
|
-
/* Strip the number spinners — the glyph + USD hint carry the affordance. */
|
|
1206
|
-
&::-webkit-outer-spin-button,
|
|
1207
|
-
&::-webkit-inner-spin-button {
|
|
1208
|
-
-webkit-appearance: none;
|
|
1209
|
-
margin: 0;
|
|
1210
|
-
}
|
|
1211
|
-
&[type='number'] {
|
|
1212
|
-
-moz-appearance: textfield;
|
|
1213
|
-
appearance: textfield;
|
|
1214
|
-
}
|
|
1215
|
-
`,Lb=m.span`
|
|
1216
|
-
flex: none;
|
|
1217
|
-
font-family: ${u.font.sans};
|
|
1218
|
-
font-size: 10px;
|
|
1219
|
-
color: ${u.colors.muted2};
|
|
1220
|
-
`,Tr=m.p`
|
|
1221
|
-
margin: 0;
|
|
1222
|
-
font-family: ${u.font.sans};
|
|
1223
|
-
font-size: 12px;
|
|
1224
|
-
line-height: 1.5;
|
|
1225
|
-
color: ${u.colors.muted};
|
|
1226
|
-
`,Fb=m.button`
|
|
1227
|
-
width: 100%;
|
|
1228
|
-
height: 48px;
|
|
1229
|
-
border: 0;
|
|
1230
|
-
border-radius: 16px;
|
|
1231
|
-
cursor: pointer;
|
|
1232
|
-
background: ${u.colors.accent};
|
|
1233
|
-
color: ${u.colors.white};
|
|
1234
|
-
font-family: ${u.font.sans};
|
|
1235
|
-
font-weight: 600;
|
|
1236
|
-
font-size: 15px;
|
|
1237
|
-
line-height: 24px;
|
|
1238
|
-
letter-spacing: 0.46px;
|
|
1239
|
-
text-transform: uppercase;
|
|
1240
|
-
|
|
1241
|
-
&:hover:not(:disabled) {
|
|
1242
|
-
background: ${u.colors.accentHover};
|
|
1243
|
-
}
|
|
1244
|
-
&:focus-visible {
|
|
1245
|
-
outline: 2px solid ${u.colors.accent};
|
|
1246
|
-
outline-offset: 2px;
|
|
1247
|
-
}
|
|
1248
|
-
&:disabled {
|
|
1249
|
-
cursor: not-allowed;
|
|
1250
|
-
background: rgba(105, 31, 169, 0.2);
|
|
1251
|
-
color: ${u.colors.white};
|
|
1252
|
-
}
|
|
1253
|
-
`,Yb=m.p`
|
|
1254
|
-
margin: 0;
|
|
1255
|
-
font-family: ${u.font.sans};
|
|
1256
|
-
font-size: 13px;
|
|
1257
|
-
color: ${u.colors.muted};
|
|
1258
|
-
text-align: center;
|
|
1259
|
-
`,Wb=m.div`
|
|
1260
|
-
display: flex;
|
|
1261
|
-
flex-direction: column;
|
|
1262
|
-
align-items: center;
|
|
1263
|
-
gap: 16px;
|
|
1264
|
-
padding: 24px 16px;
|
|
1265
|
-
border-radius: 16px;
|
|
1266
|
-
background: rgba(193, 238, 207, 0.5);
|
|
1267
|
-
text-align: center;
|
|
1268
|
-
`,Bb=m.div`
|
|
1269
|
-
display: grid;
|
|
1270
|
-
place-items: center;
|
|
1271
|
-
width: 64px;
|
|
1272
|
-
height: 64px;
|
|
1273
|
-
border-radius: 50%;
|
|
1274
|
-
background: ${u.colors.ok};
|
|
1275
|
-
color: ${u.colors.white};
|
|
1276
|
-
|
|
1277
|
-
.ico {
|
|
1278
|
-
width: 34px;
|
|
1279
|
-
height: 34px;
|
|
1280
|
-
}
|
|
1281
|
-
`,Hb=m.p`
|
|
1282
|
-
margin: 0;
|
|
1283
|
-
font-family: ${u.font.sans};
|
|
1284
|
-
font-size: 20px;
|
|
1285
|
-
line-height: 1.334;
|
|
1286
|
-
color: ${u.colors.text2};
|
|
1287
|
-
|
|
1288
|
-
b {
|
|
1289
|
-
font-weight: 700;
|
|
1290
|
-
}
|
|
1291
|
-
`,zb=m.p`
|
|
1292
|
-
margin: 0;
|
|
1293
|
-
display: inline-flex;
|
|
1294
|
-
align-items: center;
|
|
1295
|
-
gap: 4px;
|
|
1296
|
-
font-family: ${u.font.sans};
|
|
1297
|
-
font-size: 14px;
|
|
1298
|
-
line-height: 1.43;
|
|
1299
|
-
color: ${u.colors.text2};
|
|
1300
|
-
|
|
1301
|
-
strong {
|
|
1302
|
-
display: inline-flex;
|
|
1303
|
-
align-items: center;
|
|
1304
|
-
gap: 4px;
|
|
1305
|
-
font-weight: 700;
|
|
1306
|
-
}
|
|
1307
|
-
.ccy-mark {
|
|
1308
|
-
width: 18px;
|
|
1309
|
-
height: 18px;
|
|
1310
|
-
color: ${u.colors.rarity};
|
|
1311
|
-
}
|
|
1312
|
-
`,qb=m.div`
|
|
1313
|
-
display: flex;
|
|
1314
|
-
gap: 12px;
|
|
1315
|
-
|
|
1316
|
-
${u.media.maxWidth("mobile")} {
|
|
1317
|
-
flex-direction: column-reverse;
|
|
1318
|
-
}
|
|
1319
|
-
`,Kb=m.button`
|
|
1320
|
-
flex: 1 1 0;
|
|
1321
|
-
height: 48px;
|
|
1322
|
-
border: 2px solid ${u.colors.accent};
|
|
1323
|
-
border-radius: 12px;
|
|
1324
|
-
background: transparent;
|
|
1325
|
-
color: ${u.colors.accent};
|
|
1326
|
-
cursor: pointer;
|
|
1327
|
-
font-family: ${u.font.sans};
|
|
1328
|
-
font-weight: 600;
|
|
1329
|
-
font-size: 13px;
|
|
1330
|
-
line-height: 24px;
|
|
1331
|
-
letter-spacing: 0.46px;
|
|
1332
|
-
text-transform: uppercase;
|
|
1333
|
-
|
|
1334
|
-
&:hover {
|
|
1335
|
-
background: rgba(105, 31, 169, 0.06);
|
|
1336
|
-
}
|
|
1337
|
-
&:focus-visible {
|
|
1338
|
-
outline: 2px solid ${u.colors.accent};
|
|
1339
|
-
outline-offset: 2px;
|
|
1340
|
-
}
|
|
1341
|
-
`,Qb=m.button`
|
|
1342
|
-
flex: 1 1 0;
|
|
1343
|
-
height: 48px;
|
|
1344
|
-
border: 0;
|
|
1345
|
-
border-radius: 12px;
|
|
1346
|
-
background: ${u.colors.accent};
|
|
1347
|
-
color: ${u.colors.softWhite};
|
|
1348
|
-
cursor: pointer;
|
|
1349
|
-
font-family: ${u.font.sans};
|
|
1350
|
-
font-weight: 600;
|
|
1351
|
-
font-size: 13px;
|
|
1352
|
-
line-height: 24px;
|
|
1353
|
-
letter-spacing: 0.46px;
|
|
1354
|
-
text-transform: uppercase;
|
|
1355
|
-
|
|
1356
|
-
&:hover {
|
|
1357
|
-
background: ${u.colors.accentHover};
|
|
1358
|
-
}
|
|
1359
|
-
&:focus-visible {
|
|
1360
|
-
outline: 2px solid ${u.colors.accent};
|
|
1361
|
-
outline-offset: 2px;
|
|
1362
|
-
}
|
|
1363
|
-
`,Ub=1e3*60*60*24*182;function Vb({item:n,session:a,edit:t,onListed:e,onClose:r}){const o=gn(),s=mn(),[l,c]=b.useState(t!=null&&t.currentCredits?String(t.currentCredits):"10"),[p,d]=b.useState(null),[h,x]=b.useState(null),[y,v]=b.useState(!1),[w,k]=b.useState(null),[C,D]=b.useState(null),{cancelDone:E,slow:g,cancelFailed:T,setCancelFailed:O,cancelCurrent:M,signal:S}=Yc(t,x),P=cn.chainId,A=oa(a),{data:B}=ra(a.address),U=B!=null&&B.name?aa(B.name):go(a.address),V=Number(l),G=Number.isInteger(V)&&V>0,H=!!t&&!E&&V===t.currentCredits,N=G?`$${rn(V).toFixed(2)}`:"$0";b.useEffect(()=>{let z=!1;return(async()=>{try{const q=await Lp({contractAddress:n.contractAddress,chainId:P});z||k(q)}catch{z||k(!1)}})(),()=>{z=!0}},[n.contractAddress,P]);async function F(z={}){var Q,De;x(null);const q=Number(l);if(!Number.isInteger(q)||q<=0){x(f("primaryList.errorWholeNumber"));return}v(!0);try{if(!await M(z.payGas))return;w||(d(f("primaryList.statusEnabling")),await Fp({signer:a.signer,contractAddress:n.contractAddress,chainId:P}),k(!0)),d(f("primaryList.statusPublishing"));const we=await Yp({signer:a.signer,item:{contractAddress:n.contractAddress,itemId:n.blockchainItemId,network:ut.Network.MATIC,chainId:P},usdPrice:rn(q),uses:n.remainingSupply,expiresAtMs:Date.now()+Ub});d(f("primaryList.statusFinishing"));const Te=await(t?ec(we,a.identity,{signal:S()}):Nl(we,a.identity));(Q=S())==null||Q.throwIfAborted(),d(null),D(q),fe("Shop Listed Item",{item_id:n.blockchainItemId,contract_address:n.contractAddress,price_credits:q,price_usd:rn(q),listing_type:"primary",is_primary:!0}),ar.success(f(t?"listingEdit.toastUpdated":"primaryList.toastOnSale",{name:n.name})),e==null||e(q,Te.id),o.invalidateQueries({queryKey:["publishable-items"]}),o.invalidateQueries({queryKey:["collection-sale-state"]}),o.invalidateQueries({queryKey:["shop-items"]}),o.invalidateQueries({queryKey:["catalog-items"]}),o.invalidateQueries({queryKey:["overview-listings"]}),o.invalidateQueries({queryKey:["upsell-listings"]})}catch(we){if((De=S())!=null&&De.aborted)return;je(we,{flow:"list_primary"}),fe("Shop Listing Failed",{listing_type:"primary",error_code:Ue(we)}),x(Wt(we,f(t?"listingEdit.listFailedAfterCancel":"primaryList.errorGeneric"))),d(null)}finally{v(!1)}}function _(){r(),s(Hd(n.contractAddress,n.blockchainItemId))}const re=w===null?f("primaryList.checking"):t?f(E?"primaryList.putOnSale":"listingEdit.submit"):y?A?f("primaryList.publishing"):f("primaryList.confirmListing"):w===!1?f("primaryList.enableAndPutOnSale"):f("primaryList.putOnSale");return C!==null?i.jsx(za,{onClick:r,role:"presentation",children:i.jsxs(qa,{onClick:z=>z.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":f(t?"listingEdit.successHeader":"primaryList.successTitle"),children:[i.jsxs(Ka,{children:[i.jsx(Qa,{children:f(t?"listingEdit.successHeader":"primaryList.successTitle")}),i.jsx(Ua,{onClick:r,"aria-label":f("getCredits.done"),children:i.jsx(X,{name:"close",className:"ico"})})]}),i.jsxs(Wb,{children:[i.jsx(Bb,{"aria-hidden":!0,children:i.jsx(X,{name:"check",className:"ico"})}),i.jsx(Hb,{children:i.jsx("b",{children:n.name})}),i.jsxs(zb,{children:[f("primaryList.listedFor")," ",i.jsxs("strong",{children:[i.jsx(Be,{className:"ccy-mark"})," ",i.jsx(Fe,{credits:C})]})," ",f("primaryList.dotAvailable",{count:n.remainingSupply})]})]}),i.jsxs(qb,{children:[i.jsx(Kb,{onClick:r,children:f("getCredits.done")}),i.jsx(Qb,{onClick:_,children:f("primaryList.viewInShop")})]})]})}):t&&y?i.jsx(za,{role:"presentation",children:i.jsxs(qa,{onClick:z=>z.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":f("listingEdit.title"),"data-testid":"modal",children:[i.jsxs(Ka,{children:[i.jsx(Qa,{children:f("listingEdit.title")}),i.jsx(Ua,{disabled:!0,"aria-label":f("primaryList.cancel"),children:i.jsx(X,{name:"close",className:"ico"})})]}),i.jsx(Wc,{phase:E?"list":"cancel",managed:A,slow:g})]})}):i.jsx(za,{onClick:y?void 0:r,role:"presentation",children:i.jsxs(qa,{"data-testid":"modal",onClick:z=>z.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":t?f("listingEdit.title"):f("primaryList.publishTitle",{name:n.name}),children:[i.jsxs(Ka,{children:[i.jsx(Qa,{children:t?f("listingEdit.title"):f("primaryList.publishTitle",{name:n.name})}),i.jsx(Ua,{onClick:r,disabled:y,"aria-label":f("primaryList.cancel"),children:i.jsx(X,{name:"close",className:"ico"})})]}),i.jsx(jb,{children:f("primaryList.fromCollection",{collectionName:n.collectionName,count:n.remainingSupply})}),i.jsxs(Ib,{children:[i.jsx(Pb,{children:n.thumbnail?i.jsx("img",{src:n.thumbnail,alt:""}):null}),i.jsxs(Eb,{children:[i.jsx(Tb,{children:n.name}),U?i.jsx($b,{children:f("primaryList.byCreator",{name:U})}):null]})]}),i.jsxs(Rb,{children:[i.jsx(Nb,{children:f("primaryList.priceShort")}),i.jsxs(Ob,{"aria-invalid":l.length>0&&!G,children:[i.jsx(Be,{className:"ccy"}),i.jsx(Ab,{"data-testid":"price-input",type:"number",min:"1",step:"1",inputMode:"numeric",value:l,onChange:z=>c(z.target.value),disabled:y,"aria-label":f("primaryList.priceLabel",{currency:Ze.name})}),i.jsx(Lb,{"aria-hidden":!0,children:N})]})]}),i.jsx(Tr,{children:f("primaryList.pricedInWhole",{currency:Ze.name,currencySingular:Ze.nameSingular})}),t?!y&&!E?i.jsx(Tr,{children:f("listingEdit.subtitle")}):null:w===!1&&!y?i.jsx(Tr,{children:A?f("primaryList.firstTimeManaged",{collectionName:n.collectionName}):f("primaryList.firstTimeConfirm",{collectionName:n.collectionName})}):w===!0&&!y?i.jsx(Tr,{children:A?f("primaryList.readyManaged"):f("primaryList.readyConfirm")}):null,T?i.jsx(Po,{state:T,canPayGas:!!(t!=null&&t.canPayGas),busy:y,onPayGas:()=>void F({payGas:!0}),onLater:()=>O(null)}):null,p&&!t?i.jsx(Yb,{children:p}):null,i.jsx(Bt,{message:h}),i.jsx(Fb,{onClick:()=>void F(),disabled:y||H||T==="pending"||w===null||!G,"data-testid":"list-submit",children:re})]})})}const Bc=["function issueTokens(address[] _beneficiaries, uint256[] _itemIds)"];function Hc(n){return/^0x[a-fA-F0-9]{40}$/.test(n.trim())}function zc(n){return n.reduce((a,t)=>a+Math.max(0,Math.floor(t.amount||0)),0)}function Gb(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(!Hc(r.address)||!Number.isInteger(r.amount)||r.amount<1)return!1;const e=zc(t);return e>=1&&e<=a}function Xb(n,a){const t=[],e=[];for(const r of n){const o=r.address.trim(),s=Math.max(0,Math.floor(r.amount||0));if(!(!o||s===0))for(let l=0;l<s;l++)t.push(o),e.push(a)}return{beneficiaries:t,itemIds:e}}async function Jb(n){const{contractAddress:a,chainId:t,beneficiaries:e,itemIds:r,signer:o}=n,s={...qd(Kd.ERC721CollectionV2,t),address:a},l=new lf(Bc).encodeFunctionData("issueTokens",[e,r]),c=tf(),p=nf(o.provider,c),d=await Cf(p,c,l,s,{serverURL:Gl.relayerUrl});return await rf(d,"the mint"),d}async function Zb(n){const{signer:a,contractAddress:t,chainId:e,entries:r,itemId:o}=n,{beneficiaries:s,itemIds:l}=Xb(r,o);if(s.length===0)throw new Error("No copies to issue");if(Gl.enabled)try{return await Jb({contractAddress:t,chainId:e,beneficiaries:s,itemIds:l,signer:a})}catch(h){if(h instanceof kf&&h.code===Df.USER_DENIED||h instanceof ef)throw h;console.warn("[issue] gasless meta-tx failed, falling back to a direct tx:",h)}return await zd(a.provider,e),(await(await new sf(t,Bc,a).issueTokens(s,l,Wp(e))).wait()).transactionHash}const ev=m.div`
|
|
1364
|
-
position: fixed;
|
|
1365
|
-
inset: 0;
|
|
1366
|
-
z-index: 10000;
|
|
1367
|
-
display: flex;
|
|
1368
|
-
align-items: center;
|
|
1369
|
-
justify-content: center;
|
|
1370
|
-
padding: 16px;
|
|
1371
|
-
background: rgba(22, 21, 24, 0.55);
|
|
1372
|
-
`,tv=m.div`
|
|
1373
|
-
width: 560px;
|
|
1374
|
-
max-width: 100%;
|
|
1375
|
-
max-height: 92vh;
|
|
1376
|
-
overflow-y: auto;
|
|
1377
|
-
background: ${u.colors.white};
|
|
1378
|
-
border-radius: 16px;
|
|
1379
|
-
padding: 12px 16px 16px;
|
|
1380
|
-
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
1381
|
-
display: flex;
|
|
1382
|
-
flex-direction: column;
|
|
1383
|
-
gap: 20px;
|
|
1384
|
-
`,nv=m.div`
|
|
1385
|
-
display: flex;
|
|
1386
|
-
align-items: center;
|
|
1387
|
-
justify-content: space-between;
|
|
1388
|
-
gap: 8px;
|
|
1389
|
-
padding-bottom: 16px;
|
|
1390
|
-
border-bottom: 1px solid ${u.colors.gray4};
|
|
1391
|
-
`,rv=m.h2`
|
|
1392
|
-
margin: 0;
|
|
1393
|
-
font-family: ${u.font.sans};
|
|
1394
|
-
font-weight: 600;
|
|
1395
|
-
font-size: 20px;
|
|
1396
|
-
line-height: 1.6;
|
|
1397
|
-
color: ${u.colors.text};
|
|
1398
|
-
`,av=m.button`
|
|
1399
|
-
flex: none;
|
|
1400
|
-
display: grid;
|
|
1401
|
-
place-items: center;
|
|
1402
|
-
width: 24px;
|
|
1403
|
-
height: 24px;
|
|
1404
|
-
border: 0;
|
|
1405
|
-
background: none;
|
|
1406
|
-
cursor: pointer;
|
|
1407
|
-
color: ${u.colors.text};
|
|
1408
|
-
|
|
1409
|
-
.ico {
|
|
1410
|
-
width: 18px;
|
|
1411
|
-
height: 18px;
|
|
1412
|
-
}
|
|
1413
|
-
&:disabled {
|
|
1414
|
-
opacity: 0.4;
|
|
1415
|
-
cursor: default;
|
|
1416
|
-
}
|
|
1417
|
-
&:focus-visible {
|
|
1418
|
-
outline: 2px solid ${u.colors.accent};
|
|
1419
|
-
outline-offset: 2px;
|
|
1420
|
-
}
|
|
1421
|
-
`,ov=m.p`
|
|
1422
|
-
margin: 0;
|
|
1423
|
-
font-family: ${u.font.sans};
|
|
1424
|
-
font-size: 14px;
|
|
1425
|
-
line-height: 1.57;
|
|
1426
|
-
color: ${u.colors.text};
|
|
1427
|
-
text-align: left;
|
|
1428
|
-
`,iv=m.div`
|
|
1429
|
-
display: flex;
|
|
1430
|
-
align-items: center;
|
|
1431
|
-
gap: 12px;
|
|
1432
|
-
`,sv=m.div`
|
|
1433
|
-
flex: none;
|
|
1434
|
-
display: grid;
|
|
1435
|
-
place-items: center;
|
|
1436
|
-
width: 56px;
|
|
1437
|
-
height: 56px;
|
|
1438
|
-
border-radius: 12px;
|
|
1439
|
-
background: ${u.colors.media};
|
|
1440
|
-
border: 1px solid ${u.colors.gray4};
|
|
1441
|
-
overflow: hidden;
|
|
1442
|
-
|
|
1443
|
-
img {
|
|
1444
|
-
width: 48px;
|
|
1445
|
-
height: 48px;
|
|
1446
|
-
object-fit: contain;
|
|
1447
|
-
filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
|
|
1448
|
-
}
|
|
1449
|
-
`,lv=m.p`
|
|
1450
|
-
margin: 0;
|
|
1451
|
-
font-family: ${u.font.sans};
|
|
1452
|
-
font-weight: 600;
|
|
1453
|
-
font-size: 16px;
|
|
1454
|
-
line-height: 1.4;
|
|
1455
|
-
color: ${u.colors.text};
|
|
1456
|
-
`,cv=m.div`
|
|
1457
|
-
display: flex;
|
|
1458
|
-
flex-direction: column;
|
|
1459
|
-
gap: 10px;
|
|
1460
|
-
`,dv=m.div`
|
|
1461
|
-
display: flex;
|
|
1462
|
-
align-items: flex-start;
|
|
1463
|
-
gap: 8px;
|
|
1464
|
-
`,uv=m.label`
|
|
1465
|
-
flex: 1 1 auto;
|
|
1466
|
-
min-width: 0;
|
|
1467
|
-
display: flex;
|
|
1468
|
-
flex-direction: column;
|
|
1469
|
-
gap: 4px;
|
|
1470
|
-
`,pv=m.label`
|
|
1471
|
-
flex: none;
|
|
1472
|
-
width: 96px;
|
|
1473
|
-
display: flex;
|
|
1474
|
-
flex-direction: column;
|
|
1475
|
-
gap: 4px;
|
|
1476
|
-
`,Fs=m.span`
|
|
1477
|
-
font-family: ${u.font.sans};
|
|
1478
|
-
font-size: 12px;
|
|
1479
|
-
color: ${u.colors.muted};
|
|
1480
|
-
`,Ys=m.input`
|
|
1481
|
-
height: 42px;
|
|
1482
|
-
padding: 0 10px;
|
|
1483
|
-
border: 0.5px solid ${u.colors.text};
|
|
1484
|
-
border-radius: 8px;
|
|
1485
|
-
background: ${u.colors.white};
|
|
1486
|
-
font-family: ${u.font.sans};
|
|
1487
|
-
font-size: 13px;
|
|
1488
|
-
color: ${u.colors.text};
|
|
1489
|
-
outline: none;
|
|
1490
|
-
|
|
1491
|
-
&::placeholder {
|
|
1492
|
-
color: ${u.colors.muted2};
|
|
1493
|
-
}
|
|
1494
|
-
&:focus {
|
|
1495
|
-
border-color: ${u.colors.magenta};
|
|
1496
|
-
}
|
|
1497
|
-
&[aria-invalid='true'] {
|
|
1498
|
-
border-color: ${u.colors.err};
|
|
1499
|
-
}
|
|
1500
|
-
/* Strip the number spinners on the amount input. */
|
|
1501
|
-
&::-webkit-outer-spin-button,
|
|
1502
|
-
&::-webkit-inner-spin-button {
|
|
1503
|
-
-webkit-appearance: none;
|
|
1504
|
-
margin: 0;
|
|
1505
|
-
}
|
|
1506
|
-
&[type='number'] {
|
|
1507
|
-
-moz-appearance: textfield;
|
|
1508
|
-
appearance: textfield;
|
|
1509
|
-
}
|
|
1510
|
-
`,fv=m.button`
|
|
1511
|
-
flex: none;
|
|
1512
|
-
margin-top: 22px;
|
|
1513
|
-
display: grid;
|
|
1514
|
-
place-items: center;
|
|
1515
|
-
width: 42px;
|
|
1516
|
-
height: 42px;
|
|
1517
|
-
border: 0.5px solid ${u.colors.gray4};
|
|
1518
|
-
border-radius: 8px;
|
|
1519
|
-
background: ${u.colors.white};
|
|
1520
|
-
color: ${u.colors.muted};
|
|
1521
|
-
cursor: pointer;
|
|
1522
|
-
|
|
1523
|
-
.ico {
|
|
1524
|
-
width: 16px;
|
|
1525
|
-
height: 16px;
|
|
1526
|
-
}
|
|
1527
|
-
&:hover:not(:disabled) {
|
|
1528
|
-
color: ${u.colors.err};
|
|
1529
|
-
border-color: ${u.colors.err};
|
|
1530
|
-
}
|
|
1531
|
-
&:disabled {
|
|
1532
|
-
opacity: 0.35;
|
|
1533
|
-
cursor: default;
|
|
1534
|
-
}
|
|
1535
|
-
&:focus-visible {
|
|
1536
|
-
outline: 2px solid ${u.colors.accent};
|
|
1537
|
-
outline-offset: 2px;
|
|
1538
|
-
}
|
|
1539
|
-
`,hv=m.button`
|
|
1540
|
-
align-self: flex-start;
|
|
1541
|
-
display: inline-flex;
|
|
1542
|
-
align-items: center;
|
|
1543
|
-
gap: 6px;
|
|
1544
|
-
border: 0;
|
|
1545
|
-
background: none;
|
|
1546
|
-
padding: 0;
|
|
1547
|
-
cursor: pointer;
|
|
1548
|
-
font-family: ${u.font.sans};
|
|
1549
|
-
font-weight: 600;
|
|
1550
|
-
font-size: 13px;
|
|
1551
|
-
color: ${u.colors.accent};
|
|
1552
|
-
|
|
1553
|
-
.ico {
|
|
1554
|
-
width: 16px;
|
|
1555
|
-
height: 16px;
|
|
1556
|
-
}
|
|
1557
|
-
&:disabled {
|
|
1558
|
-
opacity: 0.4;
|
|
1559
|
-
cursor: default;
|
|
1560
|
-
}
|
|
1561
|
-
&:focus-visible {
|
|
1562
|
-
outline: 2px solid ${u.colors.accent};
|
|
1563
|
-
outline-offset: 2px;
|
|
1564
|
-
}
|
|
1565
|
-
`,mv=m.p`
|
|
1566
|
-
margin: 0;
|
|
1567
|
-
font-family: ${u.font.sans};
|
|
1568
|
-
font-size: 13px;
|
|
1569
|
-
line-height: 1.5;
|
|
1570
|
-
color: ${n=>n.over?u.colors.err:u.colors.text};
|
|
1571
|
-
|
|
1572
|
-
strong {
|
|
1573
|
-
font-weight: 700;
|
|
1574
|
-
}
|
|
1575
|
-
`,gv=m.p`
|
|
1576
|
-
margin: 0;
|
|
1577
|
-
font-family: ${u.font.sans};
|
|
1578
|
-
font-size: 12px;
|
|
1579
|
-
line-height: 1.5;
|
|
1580
|
-
color: ${u.colors.muted};
|
|
1581
|
-
`;m.p`
|
|
1582
|
-
margin: 0;
|
|
1583
|
-
font-family: ${u.font.sans};
|
|
1584
|
-
font-size: 13px;
|
|
1585
|
-
color: ${u.colors.muted};
|
|
1586
|
-
text-align: center;
|
|
1587
|
-
`;const xv=m.p`
|
|
1588
|
-
margin: 0;
|
|
1589
|
-
font-family: ${u.font.sans};
|
|
1590
|
-
font-size: 11px;
|
|
1591
|
-
color: ${u.colors.err};
|
|
1592
|
-
`,Ws=m.div`
|
|
1593
|
-
display: flex;
|
|
1594
|
-
gap: 12px;
|
|
1595
|
-
|
|
1596
|
-
${u.media.maxWidth("mobile")} {
|
|
1597
|
-
flex-direction: column-reverse;
|
|
1598
|
-
}
|
|
1599
|
-
`,yv=m.button`
|
|
1600
|
-
flex: 1 1 0;
|
|
1601
|
-
height: 48px;
|
|
1602
|
-
border: 2px solid ${u.colors.accent};
|
|
1603
|
-
border-radius: 12px;
|
|
1604
|
-
background: transparent;
|
|
1605
|
-
color: ${u.colors.accent};
|
|
1606
|
-
cursor: pointer;
|
|
1607
|
-
font-family: ${u.font.sans};
|
|
1608
|
-
font-weight: 600;
|
|
1609
|
-
font-size: 13px;
|
|
1610
|
-
line-height: 24px;
|
|
1611
|
-
letter-spacing: 0.46px;
|
|
1612
|
-
text-transform: uppercase;
|
|
1613
|
-
|
|
1614
|
-
&:hover:not(:disabled) {
|
|
1615
|
-
background: rgba(105, 31, 169, 0.06);
|
|
1616
|
-
}
|
|
1617
|
-
&:disabled {
|
|
1618
|
-
opacity: 0.5;
|
|
1619
|
-
cursor: not-allowed;
|
|
1620
|
-
}
|
|
1621
|
-
&:focus-visible {
|
|
1622
|
-
outline: 2px solid ${u.colors.accent};
|
|
1623
|
-
outline-offset: 2px;
|
|
1624
|
-
}
|
|
1625
|
-
`,Bs=m.button`
|
|
1626
|
-
flex: 1 1 0;
|
|
1627
|
-
height: 48px;
|
|
1628
|
-
border: 0;
|
|
1629
|
-
border-radius: 12px;
|
|
1630
|
-
cursor: pointer;
|
|
1631
|
-
background: ${u.colors.accent};
|
|
1632
|
-
color: ${u.colors.white};
|
|
1633
|
-
font-family: ${u.font.sans};
|
|
1634
|
-
font-weight: 600;
|
|
1635
|
-
font-size: 13px;
|
|
1636
|
-
line-height: 24px;
|
|
1637
|
-
letter-spacing: 0.46px;
|
|
1638
|
-
text-transform: uppercase;
|
|
1639
|
-
|
|
1640
|
-
&:hover:not(:disabled) {
|
|
1641
|
-
background: ${u.colors.accentHover};
|
|
1642
|
-
}
|
|
1643
|
-
&:focus-visible {
|
|
1644
|
-
outline: 2px solid ${u.colors.accent};
|
|
1645
|
-
outline-offset: 2px;
|
|
1646
|
-
}
|
|
1647
|
-
&:disabled {
|
|
1648
|
-
cursor: not-allowed;
|
|
1649
|
-
background: rgba(105, 31, 169, 0.2);
|
|
1650
|
-
color: ${u.colors.white};
|
|
1651
|
-
}
|
|
1652
|
-
`,bv=m.div`
|
|
1653
|
-
display: flex;
|
|
1654
|
-
flex-direction: column;
|
|
1655
|
-
align-items: center;
|
|
1656
|
-
gap: 16px;
|
|
1657
|
-
padding: 24px 16px;
|
|
1658
|
-
border-radius: 16px;
|
|
1659
|
-
background: rgba(193, 238, 207, 0.5);
|
|
1660
|
-
text-align: center;
|
|
1661
|
-
`,vv=m.div`
|
|
1662
|
-
display: grid;
|
|
1663
|
-
place-items: center;
|
|
1664
|
-
width: 64px;
|
|
1665
|
-
height: 64px;
|
|
1666
|
-
border-radius: 50%;
|
|
1667
|
-
background: ${u.colors.ok};
|
|
1668
|
-
color: ${u.colors.white};
|
|
1669
|
-
|
|
1670
|
-
.ico {
|
|
1671
|
-
width: 34px;
|
|
1672
|
-
height: 34px;
|
|
1673
|
-
}
|
|
1674
|
-
`,wv=m.p`
|
|
1675
|
-
margin: 0;
|
|
1676
|
-
font-family: ${u.font.sans};
|
|
1677
|
-
font-size: 20px;
|
|
1678
|
-
line-height: 1.334;
|
|
1679
|
-
color: ${u.colors.text2};
|
|
1680
|
-
|
|
1681
|
-
b {
|
|
1682
|
-
font-weight: 700;
|
|
1683
|
-
}
|
|
1684
|
-
`;function kv(n){return n.map(a=>({address:a.address,amount:Number(a.amount)}))}function Dv({item:n,session:a,onClose:t,onIssued:e}){const r=gn(),[o,s]=b.useState([{address:"",amount:"1"}]),[l,c]=b.useState(!1),[p,d]=b.useState(null),[h,x]=b.useState(null),y=b.useRef(null),v=oa(a),w=kv(o),k=zc(w),C=Gb(w,n.available),D=k>n.available;b.useEffect(()=>{var P;(P=y.current)==null||P.focus();function S(A){A.key==="Escape"&&!l&&t()}return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[l,t]);function E(S,P){s(A=>A.map((B,U)=>U===S?{...B,...P}:B))}function g(){s(S=>[...S,{address:"",amount:"1"}])}function T(S){s(P=>P.length<=1?P:P.filter((A,B)=>B!==S))}async function O(){if(!(!C||l)){d(null),c(!0);try{await Zb({signer:a.signer,contractAddress:n.contractAddress,chainId:n.chainId,entries:w,itemId:n.itemId}),fe("Shop Issued Item",{contract_address:n.contractAddress,item_id:n.itemId,recipients:w.filter(S=>S.address.trim().length>0).length,copies:k}),x(k),ar.success(f("issue.toastSuccess",{count:k,name:n.name})),r.invalidateQueries({queryKey:["publishable-item"]}),r.invalidateQueries({queryKey:["publishable-items"]}),e==null||e()}catch(S){Pn(S)||je(S,{flow:"issue-item",itemId:n.itemId}),fe("Shop Issue Failed",{error_code:Ue(S)}),d(Pn(S)?f("getCredits.errorCanceled"):Wt(S,f("issue.errorGeneric")))}finally{c(!1)}}}const M=l?v?f("issue.issuing"):f("issue.confirm"):k>0?f("issue.issueCount",{count:k}):f("issue.issue");return i.jsx(ev,{onClick:l?void 0:t,role:"presentation",children:i.jsxs(tv,{ref:y,tabIndex:-1,"data-testid":"issue-modal",onClick:S=>S.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":f("issue.title"),children:[i.jsxs(nv,{children:[i.jsx(rv,{children:f("issue.title")}),i.jsx(av,{onClick:t,disabled:l,"aria-label":f("sellModal.cancel"),children:i.jsx(X,{name:"close",className:"ico"})})]}),h!==null?i.jsxs(i.Fragment,{children:[i.jsxs(bv,{children:[i.jsx(vv,{"aria-hidden":!0,children:i.jsx(X,{name:"check",className:"ico"})}),i.jsx(wv,{children:f("issue.successBody",{count:h,name:n.name})})]}),i.jsx(Ws,{children:i.jsx(Bs,{onClick:t,children:f("getCredits.done")})})]}):i.jsxs(i.Fragment,{children:[i.jsxs(iv,{children:[i.jsx(sv,{children:n.thumbnail?i.jsx("img",{src:n.thumbnail,alt:""}):null}),i.jsx(lv,{children:n.name})]}),i.jsx(ov,{children:f("issue.subtitle")}),i.jsx(cv,{children:o.map((S,P)=>{const A=S.address.trim(),B=A.length>0&&!Hc(A),U=Number(S.amount),V=S.amount.length>0&&(!Number.isInteger(U)||U<1);return i.jsxs(dv,{children:[i.jsxs(uv,{children:[i.jsx(Fs,{children:f("issue.addressLabel")}),i.jsx(Ys,{type:"text",spellCheck:!1,autoComplete:"off",placeholder:"0x…",value:S.address,onChange:G=>E(P,{address:G.target.value}),disabled:l,"aria-invalid":B,"aria-label":f("issue.addressLabel")}),B?i.jsx(xv,{children:f("issue.invalidAddress")}):null]}),i.jsxs(pv,{children:[i.jsx(Fs,{children:f("issue.amountLabel")}),i.jsx(Ys,{type:"number",min:"1",step:"1",inputMode:"numeric",value:S.amount,onChange:G=>E(P,{amount:G.target.value}),disabled:l,"aria-invalid":V,"aria-label":f("issue.amountLabel")})]}),i.jsx(fv,{onClick:()=>T(P),disabled:l||o.length<=1,"aria-label":f("issue.removeRow"),children:i.jsx(X,{name:"close",className:"ico"})})]},P)})}),i.jsxs(hv,{onClick:g,disabled:l,children:[i.jsx(X,{name:"plus",className:"ico"}),f("issue.addRow")]}),i.jsxs(mv,{over:D,"aria-live":"polite",children:[i.jsx("strong",{children:k})," / ",n.available," ",f("issue.itemsToIssue")]}),D?i.jsx(gv,{children:f("issue.overCap",{available:n.available})}):null,i.jsx(Bt,{message:p}),i.jsxs(Ws,{children:[i.jsx(yv,{onClick:t,disabled:l,children:f("sellModal.cancel")}),i.jsx(Bs,{onClick:()=>void O(),disabled:!C||l,children:M})]})]})]})})}const Cv=m.div`
|
|
1685
|
-
position: fixed;
|
|
1686
|
-
inset: 0;
|
|
1687
|
-
z-index: 10000;
|
|
1688
|
-
display: flex;
|
|
1689
|
-
align-items: center;
|
|
1690
|
-
justify-content: center;
|
|
1691
|
-
padding: 16px;
|
|
1692
|
-
background: rgba(22, 21, 24, 0.55);
|
|
1693
|
-
`,Sv=m.div`
|
|
1694
|
-
width: 760px;
|
|
1695
|
-
max-width: 100%;
|
|
1696
|
-
background: ${u.colors.white};
|
|
1697
|
-
border-radius: 16px;
|
|
1698
|
-
padding: 12px 16px 16px;
|
|
1699
|
-
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
1700
|
-
display: flex;
|
|
1701
|
-
flex-direction: column;
|
|
1702
|
-
gap: 16px;
|
|
1703
|
-
`,Mv=m.div`
|
|
1704
|
-
display: flex;
|
|
1705
|
-
align-items: center;
|
|
1706
|
-
justify-content: space-between;
|
|
1707
|
-
gap: 8px;
|
|
1708
|
-
padding-bottom: 16px;
|
|
1709
|
-
border-bottom: 1px solid ${u.colors.gray4};
|
|
1710
|
-
`,_v=m.h2`
|
|
1711
|
-
margin: 0;
|
|
1712
|
-
font-family: ${u.font.sans};
|
|
1713
|
-
font-weight: 600;
|
|
1714
|
-
font-size: 20px;
|
|
1715
|
-
line-height: 1.6;
|
|
1716
|
-
color: ${u.colors.text};
|
|
1717
|
-
`,jv=m.button`
|
|
1718
|
-
flex: none;
|
|
1719
|
-
display: grid;
|
|
1720
|
-
place-items: center;
|
|
1721
|
-
width: 24px;
|
|
1722
|
-
height: 24px;
|
|
1723
|
-
border: 0;
|
|
1724
|
-
background: none;
|
|
1725
|
-
cursor: pointer;
|
|
1726
|
-
color: ${u.colors.text};
|
|
1727
|
-
|
|
1728
|
-
.ico {
|
|
1729
|
-
width: 18px;
|
|
1730
|
-
height: 18px;
|
|
1731
|
-
}
|
|
1732
|
-
&:focus-visible {
|
|
1733
|
-
outline: 2px solid ${u.colors.accent};
|
|
1734
|
-
outline-offset: 2px;
|
|
1735
|
-
}
|
|
1736
|
-
`,Iv=m.video`
|
|
1737
|
-
display: block;
|
|
1738
|
-
width: 100%;
|
|
1739
|
-
max-height: 70vh;
|
|
1740
|
-
border-radius: 12px;
|
|
1741
|
-
background: ${u.colors.blackBtn};
|
|
1742
|
-
`;function Pv({src:n,itemName:a,onClose:t}){const e=b.useRef(null);return b.useEffect(()=>{var o;(o=e.current)==null||o.focus();function r(s){s.key==="Escape"&&t()}return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[t]),i.jsx(Cv,{onClick:t,role:"presentation",children:i.jsxs(Sv,{ref:e,tabIndex:-1,onClick:r=>r.stopPropagation(),"data-testid":"modal",role:"dialog","aria-modal":"true","aria-label":f("itemDetail.showcaseTitle"),children:[i.jsxs(Mv,{children:[i.jsx(_v,{children:a||f("itemDetail.showcaseTitle")}),i.jsx(jv,{onClick:t,"aria-label":f("itemDetail.showcaseClose"),children:i.jsx(X,{name:"close",size:18})})]}),i.jsx(Iv,{src:n,"data-testid":"showcase-video",controls:!0,autoPlay:!0,muted:!0,playsInline:!0,preload:"auto"})]})})}const{colors:It,radius:Ev}=u,Tv=m.div`
|
|
1743
|
-
position: fixed;
|
|
1744
|
-
inset: 0;
|
|
1745
|
-
z-index: 60;
|
|
1746
|
-
display: grid;
|
|
1747
|
-
place-items: center;
|
|
1748
|
-
padding: 20px;
|
|
1749
|
-
`,$v=m.div`
|
|
1750
|
-
position: absolute;
|
|
1751
|
-
inset: 0;
|
|
1752
|
-
background: rgba(22, 21, 24, 0.45);
|
|
1753
|
-
`,Rv=m.div`
|
|
1754
|
-
position: relative;
|
|
1755
|
-
z-index: 1;
|
|
1756
|
-
width: 100%;
|
|
1757
|
-
max-width: 420px;
|
|
1758
|
-
background: ${It.white};
|
|
1759
|
-
border-radius: ${Ev.banner};
|
|
1760
|
-
padding: 24px;
|
|
1761
|
-
box-shadow: 0 24px 60px rgba(22, 21, 24, 0.28);
|
|
1762
|
-
animation: cart-pop-in 0.16s ease;
|
|
1763
|
-
`,Nv=m.div`
|
|
1764
|
-
display: flex;
|
|
1765
|
-
align-items: center;
|
|
1766
|
-
gap: 14px;
|
|
1767
|
-
margin-bottom: 18px;
|
|
1768
|
-
`,Ov=m.div`
|
|
1769
|
-
width: 64px;
|
|
1770
|
-
height: 64px;
|
|
1771
|
-
flex: none;
|
|
1772
|
-
border-radius: 12px;
|
|
1773
|
-
overflow: hidden;
|
|
1774
|
-
background: ${It.media};
|
|
1775
|
-
|
|
1776
|
-
& img {
|
|
1777
|
-
width: 100%;
|
|
1778
|
-
height: 100%;
|
|
1779
|
-
object-fit: contain;
|
|
1780
|
-
}
|
|
1781
|
-
`,Av=m.div`
|
|
1782
|
-
font-weight: 700;
|
|
1783
|
-
font-size: 16px;
|
|
1784
|
-
color: ${It.text};
|
|
1785
|
-
margin-bottom: 6px;
|
|
1786
|
-
`,Lv=m.div`
|
|
1787
|
-
background: ${It.panel};
|
|
1788
|
-
border-radius: 14px;
|
|
1789
|
-
padding: 16px;
|
|
1790
|
-
margin-bottom: 14px;
|
|
1791
|
-
`,Hs=m.div`
|
|
1792
|
-
color: ${It.muted};
|
|
1793
|
-
font-size: 13px;
|
|
1794
|
-
font-weight: 600;
|
|
1795
|
-
margin-bottom: 6px;
|
|
1796
|
-
`,zs=m.div`
|
|
1797
|
-
display: flex;
|
|
1798
|
-
align-items: center;
|
|
1799
|
-
gap: 8px;
|
|
1800
|
-
font-weight: 700;
|
|
1801
|
-
font-size: 24px;
|
|
1802
|
-
color: ${It.text};
|
|
1803
|
-
|
|
1804
|
-
&[data-approx] {
|
|
1805
|
-
color: ${It.text2};
|
|
1806
|
-
}
|
|
1807
|
-
`,Fv=m.span`
|
|
1808
|
-
color: ${It.muted};
|
|
1809
|
-
`,qs=m(Be)`
|
|
1810
|
-
width: 20px;
|
|
1811
|
-
height: 20px;
|
|
1812
|
-
color: ${It.text};
|
|
1813
|
-
`,Ks=m.div`
|
|
1814
|
-
margin-top: 6px;
|
|
1815
|
-
font-size: 13px;
|
|
1816
|
-
`,Yv=m.div`
|
|
1817
|
-
font-size: 13px;
|
|
1818
|
-
margin-bottom: 6px;
|
|
1819
|
-
`,qc=On`
|
|
1820
|
-
margin: 6px 0 0;
|
|
1821
|
-
font-size: 13px;
|
|
1822
|
-
`,Va=m.p`
|
|
1823
|
-
${qc};
|
|
1824
|
-
`,Wv=m(Bt)`
|
|
1825
|
-
${qc};
|
|
1826
|
-
`,Bv=m.div`
|
|
1827
|
-
display: flex;
|
|
1828
|
-
gap: 10px;
|
|
1829
|
-
margin-top: 18px;
|
|
1830
|
-
`,Qs=m(zt)`
|
|
1831
|
-
flex: 1;
|
|
1832
|
-
`;function Ga(n){if(Pn(n))return f("errors.rejected");const a=(n.message??"").toLowerCase();return a.includes("insufficient")?f("marketCheckout.error.insufficient",{currency:Ze.name}):a.includes("not found")||a.includes("no active listing")||a.includes("404")?f("marketCheckout.error.soldOrRemoved"):a.includes("your own listing")?f("errors.cantBuyOwn"):f("marketCheckout.error.generic")}function Hv(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 Kc({listing:n,rate:a,onClose:t,onSold:e}){const{session:r}=dn(),{data:o,isError:s}=Tl(r),l=gn(),c=mn(),[p,d]=b.useState("confirm"),[h,x]=b.useState(f("marketCheckout.checkingListing")),[y,v]=b.useState(null),[w,k]=b.useState(null),[C,D]=b.useState(null),[E,g]=b.useState(!1),T=b.useRef(null),O=b.useRef(!1),M=b.useRef(pc());b.useEffect(()=>(O.current=!1,()=>{O.current=!0}),[]);const S=At(Sa(n.manaWei,a));b.useEffect(()=>{let H=!1;if(!r){d("error"),v(f("buyModal.signInToCheckout"));return}return(async()=>{try{const F=await Ll(n.tradeId);if(!F)throw new Error("not found");if(Ud(F,r.address))throw new Error("You can't buy your own listing.");const _=Sa(n.manaWei,a);if(!Number.isFinite(_)||_<=0)throw new Error("price unavailable");if(H)return;k({trade:F,usdCents:_,credits:At(_)}),x("")}catch(F){if(H)return;console.error("[market] listing check failed",F),fe(Ye(F)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"resolve",error_code:Ue(F),value_usd:Math.round(Sa(n.manaWei,a))/100}),d("error"),v(Ga(F))}})(),()=>{H=!0,T.current&&r&&(U([T.current]),T.current=null)}},[]);const P=!!w&&o!=null&&o.credits<w.credits;async function A(){if(!r||!w)return;if(P){fe("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))}),T.current&&(await B([T.current])&&D(null),T.current=null),c("/credits");return}d("working"),v(null),g(!1);let H=C;if(!H){x(f("marketCheckout.lockingPrice"));try{const{credit:z,maxCreditedValue:q,usdCents:Q}=await ro(r.identity,w.usdCents,n.tradeId);if(O.current){B([z.id]);return}T.current=z.id,l.invalidateQueries({queryKey:["usd-balance"]});const De=At(Q);if(H={trade:w.trade,credit:z,maxCreditedValue:q,usdCents:Q,credits:De},D(H),De!==w.credits){k({trade:w.trade,usdCents:Q,credits:De}),g(!0),x(""),d("confirm");return}}catch(z){console.error("[market] authorize failed",z),Ye(z)||je(z,{flow:"market_buy_now",step:"authorize"}),fe(Ye(z)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Ue(z),value_usd:w.usdCents/100}),x(""),v(Ga(z)),d("error");return}}if(!H)return;const N=H;let F=!1,_;try{x(f("marketCheckout.confirming"));const z={trade:N.trade,buyer:r.address,signer:r.signer,credits:[N.credit],maxCreditedValue:N.maxCreditedValue,onBroadcast:({txHash:q})=>M.current.broadcast(N.credit.id,q),onReverted:({txHash:q})=>{q&&M.current.reverted(q)}};if(M.current.submitStarted(N.credit.id),Ul())try{_=await df(z),M.current.broadcast(N.credit.id,_),await Xl(_),F=!0}catch(q){if(q instanceof Jl)F=!0;else if(q instanceof Zl){if(q.reason==="relayer-unreachable")throw M.current.unobservable(N.credit.id),q;if(!na(r.providerType))throw q;_=await Mi(z)}else throw _&&M.current.reverted(_),q}else _=await Mi(z)}catch(z){M.current.submitFinished(N.credit.id),console.error("[market] buy now failed",z),await B([N.credit.id])&&D(null),T.current=null,fe(Ye(z)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Ue(z),value_usd:N.usdCents/100}),l.invalidateQueries({queryKey:["usd-balance"]}),v(Ga(z)),d("error");const q=(z.message??"").toLowerCase();(q.includes("not found")||q.includes("no active listing")||q.includes("404"))&&e();return}M.current.submitFinished(N.credit.id),T.current=null;try{l.invalidateQueries({queryKey:["usd-balance"]}),fe("Shop Completed Purchase",{items:[{item_id:n.itemId??null,contract_address:n.contractAddress,token_id:null,price_usd:N.usdCents/100,category:n.category,is_smart:!1}],value_credits:N.credits,value_usd:N.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:F,transaction_hash:_??null}),l.invalidateQueries({queryKey:["detail-trade"]}),l.invalidateQueries({queryKey:["shop-item"]}),l.invalidateQueries({queryKey:["item-resales",n.contractAddress,n.itemId]}),l.invalidateQueries({queryKey:["shop-items"]}),l.invalidateQueries({queryKey:["catalog-items"]}),l.invalidateQueries({queryKey:["my-assets"]}),l.invalidateQueries({queryKey:["purchases"]})}catch(z){je(z,{flow:"market_buy_now",step:"post_purchase"})}const re={items:[Hv(n)],txHash:_};c("/success",{state:re})}async function B(H){if(!r||H.length===0)return!1;const N=H.filter(F=>!M.current.mayBeConsumed(F));if(N.length===0)return!1;try{return await $l(r.identity,N),!0}catch{return!1}}function U(H){B(H.filter(N=>!M.current.isInFlight(N)))}function V(){r&&C&&B([C.credit.id]),T.current=null,t()}const G=p==="working";return i.jsxs(Tv,{role:"dialog","aria-modal":"true","aria-label":f("buyModal.dialogAria",{name:n.name}),children:[i.jsx($v,{onClick:G?void 0:V,"aria-hidden":!0}),i.jsxs(Rv,{children:[i.jsxs(Nv,{children:[i.jsx(Ov,{children:n.thumbnail?i.jsx("img",{src:n.thumbnail,alt:""}):null}),i.jsxs("div",{children:[i.jsx(Av,{title:n.name,children:n.name||f("buyModal.itemFallback")}),i.jsx(Al,{"data-variant":"rarity",children:n.rarity})]})]}),i.jsx(Lv,{children:w?i.jsxs(i.Fragment,{children:[i.jsx(Hs,{children:f("marketCheckout.finalPrice")}),i.jsxs(zs,{children:[i.jsx(qs,{}),i.jsx(Fe,{credits:w.credits})," ",xi(w.credits)]}),i.jsxs(Ks,{className:"muted",children:["$",rn(w.credits).toFixed(2)]})]}):i.jsxs(i.Fragment,{children:[i.jsx(Hs,{children:f("marketCheckout.todaysPrice")}),i.jsxs(zs,{"data-approx":!0,children:[i.jsx(Fv,{"aria-hidden":!0,children:"≈"}),i.jsx(qs,{}),i.jsx(Fe,{credits:S})," ",xi(S)]}),i.jsx(Ks,{className:"muted",children:h||f("marketCheckout.checkingListing")})]})}),r?i.jsxs(Yv,{className:"muted",children:[f("marketCheckout.yourBalance")," ",i.jsx(Be,{className:"ccy-mark"})," ",Qd(o,s)]}):null,P?i.jsx(Va,{className:"muted",children:f("marketCheckout.needMore",{currency:Ze.name})}):null,E?i.jsx(Va,{"data-testid":"price-changed",role:"status",children:f("buyModal.priceChanged")}):null,h&&p==="working"?i.jsx(Va,{className:"muted",children:h}):null,i.jsx(Wv,{message:y}),i.jsxs(Bv,{children:[i.jsx(Qs,{variant:"ghost",onClick:V,disabled:G,children:f("buyModal.cancel")}),i.jsx(Qs,{variant:"purple",onClick:()=>void A(),disabled:G||!w||P&&Mn(),children:G?f("marketCheckout.buying"):P&&!Mn()?f("nav.getCredits",{currency:Ze.name}):f("marketCheckout.confirmPurchase")})]})]})]})}function zv(n,a,{enabled:t=!0,first:e}={}){const{data:r,isFetched:o}=ye({queryKey:["related-items",n,a,e],enabled:t&&!!n&&!!a,staleTime:3e5,queryFn:()=>Vd(n,a,{first:e})});return{items:r??[],isFetched:o}}const Qc=15;function qv(n){return`${n.contractAddress}-${n.itemId??n.tokenId??n.id}`.toLowerCase()}function Kv(n,a){return!!(a.id&&n.id===a.id||a.itemId&&n.itemId===a.itemId&&Us(n,a)||a.tokenId&&n.tokenId===a.tokenId&&Us(n,a))}function Us(n,a){var t;return a.contractAddress?((t=n.contractAddress)==null?void 0:t.toLowerCase())===a.contractAddress.toLowerCase():!1}function Xa(n,a,t=Qc){const e=new Set,r=[];function o(l,c){for(const p of l){if(r.length>=c)return;if(Kv(p,a))continue;const d=qv(p);e.has(d)||(e.add(d),r.push(p))}}o(n.collection,1/0);const s=r.length;return o(n.creator??[],t),o(n.related??[],t),{items:r,isCollectionOnly:r.length>0&&r.length===s}}const Qv=20,Uv=30,Vs=[];function Vv(n,a=Qc){const{id:t,contractAddress:e,itemId:r,tokenId:o,creator:s}=n,l=b.useMemo(()=>({id:t,contractAddress:e,itemId:r,tokenId:o}),[t,e,r,o]),{data:c=Vs,isFetched:p}=ye({queryKey:["collection-items",e],enabled:!!e,queryFn:()=>Xd(e,{first:Qv}).then(g=>g.items)}),d=b.useMemo(()=>Xa({collection:c},l,a).items.length,[c,l,a]),h=p&&d<a,x=h&&!!s,y=ye({queryKey:["suggestions-creator",s],enabled:x,staleTime:5*6e4,queryFn:()=>Jd({creator:s,isOnSale:!0,first:Uv}).then(g=>g.items)}),v=y.data??Vs,w=!x||y.isSuccess||y.isError,k=b.useMemo(()=>Xa({collection:c,creator:v},l,a).items.length,[c,v,l,a]),{items:C}=zv(e,r??null,{enabled:h&&w&&k<a,first:a}),D=b.useMemo(()=>Xa({collection:c,creator:v,related:C},l,a),[c,v,C,l,a]),E=Gd(D.items);return{...D,items:E,siblings:c,siblingsFetched:p}}function Gv(n){const a=Zd();return!a||!eu(a.contracts,n)?null:a.label}const{colors:lt,media:Eo}=u,Xv=tu`
|
|
1833
|
-
to {
|
|
1834
|
-
transform: rotate(360deg);
|
|
1835
|
-
}
|
|
1836
|
-
`,Jv=m.div``,Zv=m.span`
|
|
1837
|
-
width: 34px;
|
|
1838
|
-
height: 34px;
|
|
1839
|
-
border-radius: 50%;
|
|
1840
|
-
border: 3px solid ${lt.line};
|
|
1841
|
-
border-top-color: ${lt.accent};
|
|
1842
|
-
animation: ${Xv} 0.8s linear infinite;
|
|
1843
|
-
|
|
1844
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1845
|
-
animation-duration: 2.4s;
|
|
1846
|
-
}
|
|
1847
|
-
`,e0=m.p``,t0=m.div``,Gs=m.button`
|
|
1848
|
-
border: 0;
|
|
1849
|
-
background: none;
|
|
1850
|
-
cursor: pointer;
|
|
1851
|
-
padding: 6px 16px;
|
|
1852
|
-
border-radius: 999px;
|
|
1853
|
-
font-weight: 600;
|
|
1854
|
-
font-size: 12px;
|
|
1855
|
-
text-transform: uppercase;
|
|
1856
|
-
letter-spacing: 0.04em;
|
|
1857
|
-
color: ${lt.muted};
|
|
1858
|
-
transition:
|
|
1859
|
-
background 0.12s ease,
|
|
1860
|
-
color 0.12s ease;
|
|
1861
|
-
|
|
1862
|
-
&[data-active] {
|
|
1863
|
-
background: ${lt.text};
|
|
1864
|
-
color: ${lt.white};
|
|
1865
|
-
}
|
|
1866
|
-
&:not([data-active]):hover {
|
|
1867
|
-
color: ${lt.text};
|
|
1868
|
-
}
|
|
1869
|
-
|
|
1870
|
-
${Eo.maxWidth("lg")} {
|
|
1871
|
-
padding: 6px 12px;
|
|
1872
|
-
border-radius: 0;
|
|
1873
|
-
background: ${lt.white};
|
|
1874
|
-
color: ${lt.text2};
|
|
1875
|
-
|
|
1876
|
-
&[data-active] {
|
|
1877
|
-
background: ${lt.text};
|
|
1878
|
-
color: ${lt.white};
|
|
1879
|
-
}
|
|
1880
|
-
&:first-of-type {
|
|
1881
|
-
border-top-left-radius: 999px;
|
|
1882
|
-
border-bottom-left-radius: 999px;
|
|
1883
|
-
}
|
|
1884
|
-
&:last-of-type {
|
|
1885
|
-
border-top-right-radius: 999px;
|
|
1886
|
-
border-bottom-right-radius: 999px;
|
|
1887
|
-
}
|
|
1888
|
-
}
|
|
1889
|
-
`,Xs=m.span`
|
|
1890
|
-
${Eo.maxWidth("lg")} {
|
|
1891
|
-
display: none;
|
|
1892
|
-
}
|
|
1893
|
-
`,Js=m(X)`
|
|
1894
|
-
display: none;
|
|
1895
|
-
|
|
1896
|
-
${Eo.maxWidth("lg")} {
|
|
1897
|
-
display: block;
|
|
1898
|
-
}
|
|
1899
|
-
`,Zs="shop-item-preview";function n0({item:n}){const a=dn(P=>{var A;return(A=P.session)==null?void 0:A.address}),{data:t,isLoading:e}=ra(a),r=a&&t?a:"default",o=n.category==="emote",[s,l]=b.useState("avatar"),c=!o&&s==="item",p=c||!e,d=er(P=>P.fittingOpen),{ref:h,active:x}=nu(),y=p&&x&&!d,[v,w]=b.useState(!0);b.useEffect(()=>{w(!0)},[n.id,c]),b.useEffect(()=>{y&&w(!0)},[y]);const k=b.useRef(null);b.useEffect(()=>{if(y)return()=>{Mf(k.current),k.current=null}},[y]);const[C,D]=b.useState(ut.PreviewRenderer.UNITY),E=C===ut.PreviewRenderer.BABYLON,g=!!a&&!!t,T=g&&ru(n,au(t)),O=ou(n)[0],M=g&&!T&&!o,S=n.urn?{urns:[n.urn]}:{contractAddress:n.contractAddress,tokenId:n.tokenId??void 0,itemId:n.tokenId?void 0:n.itemId??void 0};return i.jsxs(i.Fragment,{children:[i.jsx("div",{ref:h,"data-preview-viewport":!0,"aria-hidden":!0}),y?i.jsx(iu,{id:Zs,...S,profile:c?void 0:T?r:"default",bodyShape:c||T?void 0:O,type:o?void 0:c?ut.PreviewType.WEARABLE:ut.PreviewType.AVATAR,emote:o||c?void 0:ut.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:o?1.5:void 0,wheelStart:o?100:void 0,onRenderer:D,onLoad:()=>{var P;w(!1),k.current=((P=document.getElementById(Zs))==null?void 0:P.contentWindow)??null}}):null,!y||v?i.jsx(Jv,{"data-preview-loading":!0,"aria-busy":"true","aria-label":f("itemPreview.loading"),children:i.jsx(Zv,{"aria-hidden":!0})}):null,M&&!c?i.jsx(e0,{"data-preview-note":!0,children:f("itemPreview.shownOnBody",{shape:su(O)})}):null,!E||!o?null:i.jsx(Sf,{previewId:"shop-item-preview"}),!E||o?null:i.jsxs(t0,{"data-preview-toggle":!0,role:"group","aria-label":f("itemPreview.previewMode"),children:[i.jsxs(Gs,{type:"button","data-active":s==="avatar"||void 0,"aria-pressed":s==="avatar","aria-label":f("itemPreview.onAvatar"),onClick:()=>l("avatar"),children:[i.jsx(Js,{name:"view-avatar",size:18}),i.jsx(Xs,{children:f("itemPreview.onAvatar")})]}),i.jsxs(Gs,{type:"button","data-active":s==="item"||void 0,"aria-pressed":s==="item","aria-label":f("itemPreview.item"),onClick:()=>l("item"),children:[i.jsx(Js,{name:"view-item",size:18}),i.jsx(Xs,{children:f("itemPreview.item")})]})]})]})}const r0=m.div`
|
|
1900
|
-
position: fixed;
|
|
1901
|
-
inset: 0;
|
|
1902
|
-
z-index: 10000;
|
|
1903
|
-
display: flex;
|
|
1904
|
-
align-items: center;
|
|
1905
|
-
justify-content: center;
|
|
1906
|
-
padding: 16px;
|
|
1907
|
-
background: rgba(22, 21, 24, 0.55);
|
|
1908
|
-
`,a0=m.div`
|
|
1909
|
-
display: flex;
|
|
1910
|
-
flex-direction: column;
|
|
1911
|
-
gap: 12px;
|
|
1912
|
-
width: 1128px;
|
|
1913
|
-
max-width: 100%;
|
|
1914
|
-
max-height: 92vh;
|
|
1915
|
-
background: ${u.colors.white};
|
|
1916
|
-
border-radius: 16px;
|
|
1917
|
-
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
1918
|
-
|
|
1919
|
-
&:focus {
|
|
1920
|
-
outline: none;
|
|
1921
|
-
}
|
|
1922
|
-
`,o0=m.div`
|
|
1923
|
-
flex: none;
|
|
1924
|
-
display: flex;
|
|
1925
|
-
align-items: center;
|
|
1926
|
-
gap: 8px;
|
|
1927
|
-
padding: 16px;
|
|
1928
|
-
border-bottom: 1px solid ${u.colors.gray4};
|
|
1929
|
-
`,i0=m.h2`
|
|
1930
|
-
flex: 1 1 auto;
|
|
1931
|
-
min-width: 0;
|
|
1932
|
-
margin: 0;
|
|
1933
|
-
font-family: ${u.font.sans};
|
|
1934
|
-
font-weight: 600;
|
|
1935
|
-
font-size: 20px;
|
|
1936
|
-
line-height: 1.6;
|
|
1937
|
-
color: ${u.colors.text};
|
|
1938
|
-
`,s0=m.button`
|
|
1939
|
-
flex: none;
|
|
1940
|
-
display: grid;
|
|
1941
|
-
place-items: center;
|
|
1942
|
-
width: 18.5px;
|
|
1943
|
-
height: 18.5px;
|
|
1944
|
-
padding: 0;
|
|
1945
|
-
border: 0;
|
|
1946
|
-
background: none;
|
|
1947
|
-
cursor: pointer;
|
|
1948
|
-
color: ${u.colors.text};
|
|
1949
|
-
|
|
1950
|
-
.ico {
|
|
1951
|
-
width: 18.5px;
|
|
1952
|
-
height: 18.5px;
|
|
1953
|
-
}
|
|
1954
|
-
&:focus-visible {
|
|
1955
|
-
outline: 2px solid ${u.colors.accent};
|
|
1956
|
-
outline-offset: 4px;
|
|
1957
|
-
}
|
|
1958
|
-
`,l0=m.div`
|
|
1959
|
-
flex: 1 1 auto;
|
|
1960
|
-
min-height: 0;
|
|
1961
|
-
overflow-y: auto;
|
|
1962
|
-
display: flex;
|
|
1963
|
-
flex-direction: column;
|
|
1964
|
-
gap: 8px;
|
|
1965
|
-
padding: 0 16px 24px;
|
|
1966
|
-
`,c0=m.div`
|
|
1967
|
-
position: sticky;
|
|
1968
|
-
top: 0;
|
|
1969
|
-
z-index: 1;
|
|
1970
|
-
display: flex;
|
|
1971
|
-
align-items: center;
|
|
1972
|
-
justify-content: space-between;
|
|
1973
|
-
gap: 8px;
|
|
1974
|
-
padding-bottom: 8px;
|
|
1975
|
-
background: ${u.colors.white};
|
|
1976
|
-
`,d0=m.p`
|
|
1977
|
-
margin: 0;
|
|
1978
|
-
font-family: ${u.font.sans};
|
|
1979
|
-
font-size: 14px;
|
|
1980
|
-
line-height: 1.43;
|
|
1981
|
-
color: ${u.colors.muted};
|
|
1982
|
-
`,u0=m.div`
|
|
1983
|
-
position: relative;
|
|
1984
|
-
flex: none;
|
|
1985
|
-
display: inline-flex;
|
|
1986
|
-
align-items: center;
|
|
1987
|
-
padding: 4px 4px 4px 12px;
|
|
1988
|
-
border: 0.5px solid ${u.colors.lineStrong};
|
|
1989
|
-
border-radius: 8px;
|
|
1990
|
-
background: ${u.colors.white};
|
|
1991
|
-
|
|
1992
|
-
select {
|
|
1993
|
-
appearance: none;
|
|
1994
|
-
/* 24px design gap + the 24px chevron that sits on top of it. */
|
|
1995
|
-
padding: 0 48px 0 0;
|
|
1996
|
-
border: 0;
|
|
1997
|
-
background: none;
|
|
1998
|
-
font-family: ${u.font.sans};
|
|
1999
|
-
font-weight: 500;
|
|
2000
|
-
font-size: 12px;
|
|
2001
|
-
line-height: 1.43;
|
|
2002
|
-
color: ${u.colors.text2};
|
|
2003
|
-
cursor: pointer;
|
|
2004
|
-
outline: none;
|
|
2005
|
-
}
|
|
2006
|
-
select:focus-visible {
|
|
2007
|
-
outline: 2px solid ${u.colors.accent};
|
|
2008
|
-
outline-offset: 2px;
|
|
2009
|
-
border-radius: 4px;
|
|
2010
|
-
}
|
|
2011
|
-
.chev {
|
|
2012
|
-
position: absolute;
|
|
2013
|
-
right: 4px;
|
|
2014
|
-
width: 24px;
|
|
2015
|
-
height: 24px;
|
|
2016
|
-
color: ${u.colors.text2};
|
|
2017
|
-
pointer-events: none;
|
|
2018
|
-
}
|
|
2019
|
-
`,p0=m.div`
|
|
2020
|
-
flex: none;
|
|
2021
|
-
border: 1px solid ${u.colors.lineStrong};
|
|
2022
|
-
border-radius: 16px;
|
|
2023
|
-
/* The four equal columns need the design width to hold their content, so a narrower modal scrolls
|
|
2024
|
-
the table here rather than letting the page scroll sideways. */
|
|
2025
|
-
overflow-x: auto;
|
|
2026
|
-
overflow-y: hidden;
|
|
2027
|
-
background: ${u.colors.white};
|
|
2028
|
-
`,f0=m.table`
|
|
2029
|
-
width: 100%;
|
|
2030
|
-
min-width: 1096px;
|
|
2031
|
-
table-layout: fixed;
|
|
2032
|
-
border-collapse: collapse;
|
|
2033
|
-
|
|
2034
|
-
th {
|
|
2035
|
-
height: 48px;
|
|
2036
|
-
padding: 8px 8px 8px 16px;
|
|
2037
|
-
text-align: left;
|
|
2038
|
-
vertical-align: middle;
|
|
2039
|
-
background: ${u.colors.media};
|
|
2040
|
-
border-right: 0.5px solid ${u.colors.lineStrong};
|
|
2041
|
-
font-family: ${u.font.sans};
|
|
2042
|
-
font-weight: 600;
|
|
2043
|
-
font-size: 16px;
|
|
2044
|
-
line-height: 1.5;
|
|
2045
|
-
color: ${u.colors.text};
|
|
2046
|
-
text-transform: capitalize;
|
|
2047
|
-
}
|
|
2048
|
-
th:last-of-type {
|
|
2049
|
-
border-right: 0;
|
|
2050
|
-
}
|
|
2051
|
-
|
|
2052
|
-
td {
|
|
2053
|
-
height: 56px;
|
|
2054
|
-
padding: 8px 8px 8px 16px;
|
|
2055
|
-
vertical-align: middle;
|
|
2056
|
-
border-right: 0.5px solid ${u.colors.lineStrong};
|
|
2057
|
-
border-bottom: 0.5px solid ${u.colors.lineStrong};
|
|
2058
|
-
font-family: ${u.font.sans};
|
|
2059
|
-
font-size: 14px;
|
|
2060
|
-
line-height: 1.43;
|
|
2061
|
-
color: ${u.colors.text2};
|
|
2062
|
-
}
|
|
2063
|
-
td:last-of-type {
|
|
2064
|
-
border-right: 0;
|
|
2065
|
-
}
|
|
2066
|
-
|
|
2067
|
-
tbody tr:hover,
|
|
2068
|
-
tbody tr:focus-within {
|
|
2069
|
-
background: ${u.colors.media};
|
|
2070
|
-
}
|
|
2071
|
-
tbody tr:hover td,
|
|
2072
|
-
tbody tr:focus-within td {
|
|
2073
|
-
border-bottom-color: ${u.colors.media};
|
|
2074
|
-
}
|
|
2075
|
-
|
|
2076
|
-
/* Stack every cell into a card — a 4-column grid is unusable at phone widths. The column name is
|
|
2077
|
-
carried on each cell's data-label so it survives translation. */
|
|
2078
|
-
${u.media.maxWidth("mobile")} {
|
|
2079
|
-
min-width: 0;
|
|
2080
|
-
|
|
2081
|
-
thead {
|
|
2082
|
-
display: none;
|
|
2083
|
-
}
|
|
2084
|
-
tr {
|
|
2085
|
-
display: block;
|
|
2086
|
-
border-bottom: 0.5px solid ${u.colors.lineStrong};
|
|
2087
|
-
}
|
|
2088
|
-
tr:last-of-type {
|
|
2089
|
-
border-bottom: 0;
|
|
2090
|
-
}
|
|
2091
|
-
td {
|
|
2092
|
-
display: block;
|
|
2093
|
-
height: auto;
|
|
2094
|
-
padding: 8px 16px;
|
|
2095
|
-
border-right: 0;
|
|
2096
|
-
border-bottom: 0;
|
|
2097
|
-
}
|
|
2098
|
-
td:first-of-type {
|
|
2099
|
-
padding-top: 12px;
|
|
2100
|
-
}
|
|
2101
|
-
td:last-of-type {
|
|
2102
|
-
padding-bottom: 12px;
|
|
2103
|
-
}
|
|
2104
|
-
td[data-label]::before {
|
|
2105
|
-
content: attr(data-label);
|
|
2106
|
-
display: block;
|
|
2107
|
-
margin-bottom: 2px;
|
|
2108
|
-
font-size: 12px;
|
|
2109
|
-
line-height: 1.43;
|
|
2110
|
-
color: ${u.colors.muted};
|
|
2111
|
-
text-transform: capitalize;
|
|
2112
|
-
}
|
|
2113
|
-
tbody tr:hover td,
|
|
2114
|
-
tbody tr:focus-within td {
|
|
2115
|
-
border-bottom-color: transparent;
|
|
2116
|
-
}
|
|
2117
|
-
}
|
|
2118
|
-
`,Uc=`
|
|
2119
|
-
display: flex;
|
|
2120
|
-
align-items: center;
|
|
2121
|
-
gap: 10px;
|
|
2122
|
-
min-width: 0;
|
|
2123
|
-
|
|
2124
|
-
.owner-ava {
|
|
2125
|
-
flex: none;
|
|
2126
|
-
display: inline-grid;
|
|
2127
|
-
place-items: center;
|
|
2128
|
-
width: 32px;
|
|
2129
|
-
height: 32px;
|
|
2130
|
-
border: 2.286px solid rgba(255, 255, 255, 0.5);
|
|
2131
|
-
border-radius: 50%;
|
|
2132
|
-
background: ${u.colors.media};
|
|
2133
|
-
object-fit: cover;
|
|
2134
|
-
overflow: hidden;
|
|
2135
|
-
color: ${u.colors.white};
|
|
2136
|
-
font-weight: 700;
|
|
2137
|
-
font-size: 13px;
|
|
2138
|
-
}
|
|
2139
|
-
.owner-name {
|
|
2140
|
-
min-width: 0;
|
|
2141
|
-
overflow: hidden;
|
|
2142
|
-
text-overflow: ellipsis;
|
|
2143
|
-
white-space: nowrap;
|
|
2144
|
-
font-family: ${u.font.sans};
|
|
2145
|
-
font-size: 14px;
|
|
2146
|
-
line-height: 1.43;
|
|
2147
|
-
color: ${u.colors.text2};
|
|
2148
|
-
}
|
|
2149
|
-
`,h0=m.div`
|
|
2150
|
-
${Uc}
|
|
2151
|
-
`,m0=m.button`
|
|
2152
|
-
${Uc}
|
|
2153
|
-
padding: 0;
|
|
2154
|
-
border: 0;
|
|
2155
|
-
background: none;
|
|
2156
|
-
font: inherit;
|
|
2157
|
-
text-align: left;
|
|
2158
|
-
cursor: pointer;
|
|
2159
|
-
|
|
2160
|
-
&:hover .owner-name {
|
|
2161
|
-
text-decoration: underline;
|
|
2162
|
-
}
|
|
2163
|
-
&:focus-visible {
|
|
2164
|
-
outline: 2px solid ${u.colors.accent};
|
|
2165
|
-
outline-offset: 2px;
|
|
2166
|
-
border-radius: 4px;
|
|
2167
|
-
}
|
|
2168
|
-
`,el=m.span`
|
|
2169
|
-
color: ${u.colors.muted};
|
|
2170
|
-
`,g0=m.div`
|
|
2171
|
-
display: flex;
|
|
2172
|
-
align-items: center;
|
|
2173
|
-
justify-content: space-between;
|
|
2174
|
-
gap: 4px;
|
|
2175
|
-
|
|
2176
|
-
.amount {
|
|
2177
|
-
display: inline-flex;
|
|
2178
|
-
align-items: center;
|
|
2179
|
-
gap: 4px;
|
|
2180
|
-
font-family: ${u.font.sans};
|
|
2181
|
-
font-weight: 600;
|
|
2182
|
-
font-size: 16px;
|
|
2183
|
-
line-height: 1.5;
|
|
2184
|
-
color: ${u.colors.text2};
|
|
2185
|
-
}
|
|
2186
|
-
/* The credits mark is always near-black here — never the violet accent. */
|
|
2187
|
-
.amount .ccy {
|
|
2188
|
-
flex: none;
|
|
2189
|
-
width: 22px;
|
|
2190
|
-
height: 22px;
|
|
2191
|
-
color: ${u.colors.text2};
|
|
2192
|
-
}
|
|
2193
|
-
.approx {
|
|
2194
|
-
color: ${u.colors.muted};
|
|
2195
|
-
font-weight: 600;
|
|
2196
|
-
}
|
|
2197
|
-
`,x0=m.div`
|
|
2198
|
-
flex: none;
|
|
2199
|
-
display: flex;
|
|
2200
|
-
align-items: center;
|
|
2201
|
-
gap: 8px;
|
|
2202
|
-
opacity: 0;
|
|
2203
|
-
transition: opacity 0.12s ease;
|
|
2204
|
-
|
|
2205
|
-
tr:hover &,
|
|
2206
|
-
tr:focus-within &,
|
|
2207
|
-
&[data-persistent='true'] {
|
|
2208
|
-
opacity: 1;
|
|
2209
|
-
}
|
|
2210
|
-
|
|
2211
|
-
@media (hover: none) {
|
|
2212
|
-
opacity: 1;
|
|
2213
|
-
}
|
|
2214
|
-
${u.media.maxWidth("mobile")} {
|
|
2215
|
-
opacity: 1;
|
|
2216
|
-
}
|
|
2217
|
-
`,Vc=`
|
|
2218
|
-
display: inline-flex;
|
|
2219
|
-
align-items: center;
|
|
2220
|
-
justify-content: center;
|
|
2221
|
-
gap: 8px;
|
|
2222
|
-
height: 40px;
|
|
2223
|
-
padding: 0 12px;
|
|
2224
|
-
border: 0;
|
|
2225
|
-
border-radius: 12px;
|
|
2226
|
-
cursor: pointer;
|
|
2227
|
-
font-family: ${u.font.sans};
|
|
2228
|
-
font-weight: 600;
|
|
2229
|
-
font-size: 13px;
|
|
2230
|
-
line-height: 24px;
|
|
2231
|
-
letter-spacing: 0.46px;
|
|
2232
|
-
text-transform: uppercase;
|
|
2233
|
-
text-align: center;
|
|
2234
|
-
white-space: nowrap;
|
|
2235
|
-
|
|
2236
|
-
.ico {
|
|
2237
|
-
width: 20px;
|
|
2238
|
-
height: 20px;
|
|
2239
|
-
}
|
|
2240
|
-
&:focus-visible {
|
|
2241
|
-
outline: 2px solid ${u.colors.accent};
|
|
2242
|
-
outline-offset: 2px;
|
|
2243
|
-
}
|
|
2244
|
-
`,y0=m.button`
|
|
2245
|
-
${Vc}
|
|
2246
|
-
min-width: 106px;
|
|
2247
|
-
background: ${u.colors.text2};
|
|
2248
|
-
color: ${u.colors.softWhite};
|
|
2249
|
-
|
|
2250
|
-
&:hover:not(:disabled) {
|
|
2251
|
-
filter: brightness(1.35);
|
|
2252
|
-
}
|
|
2253
|
-
&:disabled {
|
|
2254
|
-
opacity: 0.55;
|
|
2255
|
-
cursor: default;
|
|
2256
|
-
}
|
|
2257
|
-
`,tl=m.button`
|
|
2258
|
-
${Vc}
|
|
2259
|
-
background: ${u.colors.accent};
|
|
2260
|
-
color: ${u.colors.softWhite};
|
|
2261
|
-
|
|
2262
|
-
&:hover:not(:disabled) {
|
|
2263
|
-
background: ${u.colors.accentHover};
|
|
2264
|
-
}
|
|
2265
|
-
`,b0=m.span`
|
|
2266
|
-
display: inline-flex;
|
|
2267
|
-
align-items: center;
|
|
2268
|
-
height: 40px;
|
|
2269
|
-
padding: 0 12px;
|
|
2270
|
-
border-radius: 12px;
|
|
2271
|
-
background: ${u.colors.chip};
|
|
2272
|
-
font-family: ${u.font.sans};
|
|
2273
|
-
font-weight: 600;
|
|
2274
|
-
font-size: 13px;
|
|
2275
|
-
line-height: 24px;
|
|
2276
|
-
color: ${u.colors.muted};
|
|
2277
|
-
white-space: nowrap;
|
|
2278
|
-
`,v0=m.div`
|
|
2279
|
-
flex: none;
|
|
2280
|
-
display: flex;
|
|
2281
|
-
align-items: center;
|
|
2282
|
-
justify-content: flex-end;
|
|
2283
|
-
gap: 8px;
|
|
2284
|
-
`,w0=m.p`
|
|
2285
|
-
margin: 0;
|
|
2286
|
-
font-family: ${u.font.sans};
|
|
2287
|
-
font-size: 12px;
|
|
2288
|
-
line-height: 1;
|
|
2289
|
-
color: ${u.colors.gray0};
|
|
2290
|
-
`,nl=m.button`
|
|
2291
|
-
display: grid;
|
|
2292
|
-
place-items: center;
|
|
2293
|
-
padding: 10px;
|
|
2294
|
-
border: 1px solid ${u.colors.text2};
|
|
2295
|
-
border-radius: 4px;
|
|
2296
|
-
background: ${u.colors.white};
|
|
2297
|
-
color: ${u.colors.text2};
|
|
2298
|
-
cursor: pointer;
|
|
2299
|
-
|
|
2300
|
-
/* One chevron glyph turned into ‹ / › so no extra asset is needed. */
|
|
2301
|
-
.ico {
|
|
2302
|
-
width: 11px;
|
|
2303
|
-
height: 11px;
|
|
2304
|
-
transform: rotate(-90deg);
|
|
2305
|
-
}
|
|
2306
|
-
&[data-dir='prev'] .ico {
|
|
2307
|
-
transform: rotate(90deg);
|
|
2308
|
-
}
|
|
2309
|
-
&:disabled {
|
|
2310
|
-
border-color: ${u.colors.lineStrong};
|
|
2311
|
-
color: ${u.colors.lineStrong};
|
|
2312
|
-
cursor: default;
|
|
2313
|
-
}
|
|
2314
|
-
&:focus-visible {
|
|
2315
|
-
outline: 2px solid ${u.colors.accent};
|
|
2316
|
-
outline-offset: 2px;
|
|
2317
|
-
}
|
|
2318
|
-
`,k0=m.p`
|
|
2319
|
-
margin: 0;
|
|
2320
|
-
padding: 32px 0;
|
|
2321
|
-
font-family: ${u.font.sans};
|
|
2322
|
-
font-size: 14px;
|
|
2323
|
-
line-height: 1.43;
|
|
2324
|
-
color: ${u.colors.muted};
|
|
2325
|
-
text-align: center;
|
|
2326
|
-
`;m.div`
|
|
2327
|
-
display: flex;
|
|
2328
|
-
flex-direction: column;
|
|
2329
|
-
gap: 8px;
|
|
2330
|
-
margin-top: 16px;
|
|
2331
|
-
|
|
2332
|
-
.classic-title {
|
|
2333
|
-
font-family: ${u.font.sans};
|
|
2334
|
-
font-weight: 600;
|
|
2335
|
-
font-size: 15px;
|
|
2336
|
-
color: ${u.colors.text2};
|
|
2337
|
-
}
|
|
2338
|
-
.classic-note {
|
|
2339
|
-
font-family: ${u.font.sans};
|
|
2340
|
-
font-size: 13px;
|
|
2341
|
-
color: ${u.colors.muted};
|
|
2342
|
-
}
|
|
2343
|
-
`;m.span`
|
|
2344
|
-
display: inline-flex;
|
|
2345
|
-
align-items: center;
|
|
2346
|
-
padding: 2px 8px;
|
|
2347
|
-
border-radius: ${u.radius.chip};
|
|
2348
|
-
background: ${u.colors.chip};
|
|
2349
|
-
font-family: ${u.font.sans};
|
|
2350
|
-
font-size: 11px;
|
|
2351
|
-
letter-spacing: 0.4px;
|
|
2352
|
-
text-transform: uppercase;
|
|
2353
|
-
color: ${u.colors.muted};
|
|
2354
|
-
`;m.a`
|
|
2355
|
-
display: inline-flex;
|
|
2356
|
-
align-items: center;
|
|
2357
|
-
gap: 6px;
|
|
2358
|
-
height: 40px;
|
|
2359
|
-
padding: 0 14px;
|
|
2360
|
-
border: 1px solid ${u.colors.lineStrong};
|
|
2361
|
-
border-radius: 12px;
|
|
2362
|
-
color: ${u.colors.accent};
|
|
2363
|
-
font-family: ${u.font.sans};
|
|
2364
|
-
font-weight: 600;
|
|
2365
|
-
font-size: 13px;
|
|
2366
|
-
text-decoration: none;
|
|
2367
|
-
|
|
2368
|
-
&:hover {
|
|
2369
|
-
background: ${u.colors.chip};
|
|
2370
|
-
}
|
|
2371
|
-
.ico {
|
|
2372
|
-
width: 14px;
|
|
2373
|
-
height: 14px;
|
|
2374
|
-
}
|
|
2375
|
-
`;const $r=10,D0=!1;function C0(n){return/^0x[a-fA-F0-9]{40}$/.test(n)?`${n.slice(0,6)}…${n.slice(-4)}`:n}function S0(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 M0(n,a){var t;return(((t=n==null?void 0:n.trim())==null?void 0:t[0])||a.replace(/^0x/i,"")[0]||"?").toUpperCase()}function _0(n){return n%100>=11&&n%100<=13?"th":["th","st","nd","rd"][n%10]??"th"}function j0(n,a){const t=new Date(n);return Number.isNaN(t.getTime())?"—":a==="en"?`${new Intl.DateTimeFormat("en",{month:"long"}).format(t)} ${t.getDate()}${_0(t.getDate())}, ${t.getFullYear()}`:new Intl.DateTimeFormat(a,{day:"numeric",month:"long",year:"numeric"}).format(t)}function I0(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 P0({r:n,seller:a,issuedId:t,labels:e,locale:r,isOwn:o,isLegacy:s,inCart:l,fallbackImage:c,onAdd:p,onBuyNative:d,onBuyLegacy:h}){var T,O;const x=mn(),{data:y}=ra(a),v=(O=(T=y==null?void 0:y.avatar)==null?void 0:T.snapshots)==null?void 0:O.face256,[w,k]=b.useState(!1);b.useEffect(()=>k(!1),[v]);const C=!!v&&!w,D=a?y!=null&&y.name?aa(y.name):C0(a):void 0,E=C?i.jsx("img",{className:"owner-ava",src:v,alt:"",loading:"lazy",onError:()=>k(!0)}):a?i.jsx("span",{className:"owner-ava",style:{backgroundColor:S0(a)},"aria-hidden":!0,children:M0(y==null?void 0:y.name,a)}):c?i.jsx("img",{className:"owner-ava",src:c,alt:"","aria-hidden":!0}):i.jsx("span",{className:"owner-ava","aria-hidden":!0}),g=i.jsxs(i.Fragment,{children:[E,D?i.jsx("span",{className:"owner-name","data-testid":"resale-seller",children:D}):null]});return i.jsxs("tr",{"data-testid":"resale-row","data-source":n.source,"data-own":o?"true":void 0,children:[i.jsx("td",{"data-label":e.owner,children:a?i.jsx(m0,{type:"button",onClick:()=>x(`/items/creator/${a}`),children:g}):i.jsx(h0,{children:g})}),i.jsx("td",{"data-label":e.itemNumber,children:t?i.jsxs("span",{"data-testid":"resale-issued",children:["#",t]}):i.jsx(el,{children:"—"})}),i.jsx("td",{"data-label":e.expiration,children:n.saleEndsAt?j0(n.saleEndsAt,r):i.jsx(el,{children:"—"})}),i.jsx("td",{"data-label":e.price,children:i.jsxs(g0,{children:[i.jsxs("span",{className:"amount",children:[s?i.jsx("span",{className:"approx","aria-hidden":!0,children:"≈"}):null,i.jsx(Be,{className:"ccy"}),i.jsx("span",{children:Ft(n.priceCredits)})]}),i.jsx(x0,{"data-persistent":o?"true":void 0,children:o?i.jsx(b0,{"data-testid":"resale-own",children:f("resales.yourListing")}):s?i.jsx(tl,{onClick:h,"aria-label":f("assetCard.buyNow"),"data-testid":"resale-buy",children:f("resales.buy")}):i.jsxs(i.Fragment,{children:[i.jsxs(y0,{onClick:p,disabled:l,"aria-label":l?f("assetCard.inCart"):f("assetCard.addToCart"),"data-testid":"resale-add",children:[i.jsx(X,{name:"cart",className:"ico"}),i.jsx("span",{children:l?f("assetCard.inCart"):f("resales.add")})]}),i.jsx(tl,{onClick:d,"aria-label":f("assetCard.buyNow"),"data-testid":"resale-buy",children:f("resales.buy")})]})})]})})]})}function E0({item:n,onClose:a}){var F;const t=n.contractAddress,e=n.itemId,r=gn(),o=er(_=>_.add),s=er(_=>_.items),{session:l}=dn(),c=Fl(_=>_.locale),p=(F=l==null?void 0:l.address)==null?void 0:F.toLowerCase(),d=b.useRef(null),[h,x]=b.useState(null),[y,v]=b.useState(null),[w,k]=b.useState("cheapest"),[C,D]=b.useState(0),E=!!h||!!y;b.useEffect(()=>{var _;(_=d.current)==null||_.focus()},[]),b.useEffect(()=>{function _(z){z.key==="Escape"&&!E&&a()}window.addEventListener("keydown",_);const re=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",_),document.body.style.overflow=re}},[E,a]);const{data:g=[],isLoading:T}=ye({queryKey:["item-resales",t,e],enabled:!!t&&!!e,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Wl(t,e)}),O=b.useMemo(()=>w==="cheapest"?g:[...g].sort((_,re)=>re.priceCredits-_.priceCredits),[g,w]),M=Math.max(1,Math.ceil(O.length/$r)),S=Math.min(C,M-1),P=O.slice(S*$r,S*$r+$r),A=P.filter(_=>!_.seller||!_.issuedId).map(_=>_.tokenId).filter(_=>!!_),{data:B={}}=ye({queryKey:["resale-token-info",t,A.join(",")],enabled:!!t&&A.length>0,staleTime:6e4,queryFn:()=>lu(t,A)}),{data:U=[]}=ye({queryKey:["item-classic-orders",t,e],enabled:D0,queryFn:()=>cu(t,e)}),V=g.some(_=>_.source==="legacy"),{data:G}=Yl(V);function H(){r.invalidateQueries({queryKey:["item-resales",t,e]})}const N={owner:f("resales.colOwner"),itemNumber:f("resales.colItemNumber"),expiration:f("resales.colExpiration"),price:f("resales.colPrice")};return i.jsxs(i.Fragment,{children:[i.jsx(r0,{onClick:E?void 0:a,role:"presentation",children:i.jsxs(a0,{ref:d,tabIndex:-1,onClick:_=>_.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":f("resales.modalTitle"),"data-testid":"resellers-modal",children:[i.jsxs(o0,{children:[i.jsx(i0,{children:f("resales.modalTitle")}),i.jsx(s0,{onClick:a,"aria-label":f("resales.close"),"data-testid":"resellers-close",children:i.jsx(X,{name:"close"})})]}),i.jsxs(l0,{children:[i.jsxs(c0,{children:[i.jsx(d0,{"data-testid":"resales-count",children:f("resales.count",{count:g.length})}),i.jsxs(u0,{children:[i.jsxs("select",{value:w,onChange:_=>{k(_.target.value),D(0)},"aria-label":f("resales.sortLabel"),"data-testid":"resales-sort",children:[i.jsx("option",{value:"cheapest",children:f("resales.sortCheapest")}),i.jsx("option",{value:"most_expensive",children:f("resales.sortExpensive")})]}),i.jsx(X,{name:"chevron-down",className:"chev"})]})]}),T?null:O.length===0?i.jsx(k0,{"data-testid":"resales-empty",children:f("resales.empty")}):null,O.length>0?i.jsxs(i.Fragment,{children:[i.jsx(p0,{children:i.jsxs(f0,{children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{scope:"col",children:N.owner}),i.jsx("th",{scope:"col",children:N.itemNumber}),i.jsx("th",{scope:"col",children:N.expiration}),i.jsx("th",{scope:"col",children:N.price})]})}),i.jsx("tbody",{children:P.map(_=>{const re=_.source==="legacy",z=s.some(ae=>ae.id===_.id),q=_.tokenId&&B[_.tokenId]||{},Q=_.issuedId??q.issuedId,De=_.seller??q.seller,we={..._,name:_.name||n.name,thumbnail:_.thumbnail||n.thumbnail,rarity:_.rarity||n.rarity,category:_.category||n.category,wearableCategory:_.wearableCategory??n.wearableCategory,gender:_.gender??n.gender},Te=!!De&&!!p&&De.toLowerCase()===p;return i.jsx(P0,{r:we,seller:De,issuedId:Q,labels:N,locale:c,isOwn:Te,isLegacy:re,inCart:z,fallbackImage:we.thumbnail,onAdd:()=>o(we,"item_detail"),onBuyNative:()=>x(we),onBuyLegacy:()=>v(I0(we))},_.tradeId??_.id)})})]})}),M>1?i.jsxs(v0,{children:[i.jsx(nl,{"data-dir":"prev",onClick:()=>D(_=>Math.max(0,_-1)),disabled:S===0,"aria-label":f("resales.prevPage"),"data-testid":"resale-prev-page",children:i.jsx(X,{name:"chevron-down"})}),i.jsx(w0,{"data-testid":"resale-page-label",children:f("resales.page",{page:S+1,total:M})}),i.jsx(nl,{onClick:()=>D(_=>Math.min(M-1,_+1)),disabled:S>=M-1,"aria-label":f("resales.nextPage"),"data-testid":"resale-next-page",children:i.jsx(X,{name:"chevron-down"})})]}):null]}):null,null]})]})}),h?i.jsx(io,{item:h,onClose:()=>{x(null),H()}}):null,y&&G?i.jsx(Kc,{listing:y,rate:G,onClose:()=>v(null),onSold:()=>{v(null),H()}}):null]})}const T0="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='76'%20height='76'%20viewBox='0%200%2076%2076'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='weui:shop-outlined'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M25.3333%2022.1667V19C25.3333%2015.6406%2026.6679%2012.4188%2029.0433%2010.0433C31.4188%207.66785%2034.6406%206.33333%2038%206.33333C41.3594%206.33333%2044.5812%207.66785%2046.9567%2010.0433C49.3321%2012.4188%2050.6667%2015.6406%2050.6667%2019V22.1667H60.1667C61.9147%2022.1667%2063.3333%2023.5885%2063.3333%2025.3555V63.3587C63.3333%2066.842%2060.4992%2069.6667%2057.019%2069.6667H18.981C17.3074%2069.6667%2015.7023%2069.0023%2014.5183%2067.8195C13.3343%2066.6367%2012.6683%2065.0322%2012.6667%2063.3587V25.3587C12.6667%2023.5917%2014.0758%2022.1667%2015.8333%2022.1667H25.3333ZM29.1333%2022.1667H46.8667V19C46.8667%2016.6484%2045.9325%2014.3931%2044.2697%2012.7303C42.6069%2011.0675%2040.3516%2010.1333%2038%2010.1333C35.6484%2010.1333%2033.3931%2011.0675%2031.7303%2012.7303C30.0675%2014.3931%2029.1333%2016.6484%2029.1333%2019V22.1667ZM25.3333%2025.9667H16.4667V63.3587C16.4667%2064.7393%2017.594%2065.8667%2018.981%2065.8667H57.019C57.6847%2065.8667%2058.3233%2065.6026%2058.7947%2065.1325C59.266%2064.6623%2059.5317%2064.0244%2059.5333%2063.3587V25.9667H50.6667V34.8333H46.8667V25.9667H29.1333V34.8333H25.3333V25.9667Z'%20fill='url(%23paint0_linear_0_226)'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_0_226'%20x1='36.6705'%20y1='6.33333'%20x2='32.2014'%20y2='69.3597'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF7439'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",{colors:Ae,font:Gc,radius:To,z:$0}=u,R0=m.div`
|
|
2376
|
-
position: fixed;
|
|
2377
|
-
inset: 0;
|
|
2378
|
-
z-index: ${$0.overlay};
|
|
2379
|
-
display: flex;
|
|
2380
|
-
align-items: center;
|
|
2381
|
-
justify-content: center;
|
|
2382
|
-
overflow-y: auto;
|
|
2383
|
-
padding: 16px;
|
|
2384
|
-
background: rgba(22, 21, 24, 0.55);
|
|
2385
|
-
`,N0=m.div`
|
|
2386
|
-
width: 560px;
|
|
2387
|
-
max-width: 100%;
|
|
2388
|
-
max-height: 100%;
|
|
2389
|
-
overflow-y: auto;
|
|
2390
|
-
padding: 12px 16px 16px;
|
|
2391
|
-
border-radius: ${To.modal};
|
|
2392
|
-
background: ${Ae.white};
|
|
2393
|
-
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
|
|
2394
|
-
display: flex;
|
|
2395
|
-
flex-direction: column;
|
|
2396
|
-
gap: 24px;
|
|
2397
|
-
font-family: ${Gc.sans};
|
|
2398
|
-
|
|
2399
|
-
/* Focused on mount for screen readers; it is not tab-reachable, so it never needs a visible ring. */
|
|
2400
|
-
&:focus {
|
|
2401
|
-
outline: none;
|
|
2402
|
-
}
|
|
2403
|
-
`,O0=m.div`
|
|
2404
|
-
display: flex;
|
|
2405
|
-
align-items: center;
|
|
2406
|
-
justify-content: space-between;
|
|
2407
|
-
gap: 8px;
|
|
2408
|
-
padding-bottom: 16px;
|
|
2409
|
-
border-bottom: 1px solid ${Ae.gray4};
|
|
2410
|
-
`,A0=m.h2`
|
|
2411
|
-
margin: 0;
|
|
2412
|
-
font-weight: 600;
|
|
2413
|
-
font-size: 20px;
|
|
2414
|
-
line-height: 1.6;
|
|
2415
|
-
color: ${Ae.text};
|
|
2416
|
-
`,L0=m.button`
|
|
2417
|
-
position: relative;
|
|
2418
|
-
flex: none;
|
|
2419
|
-
display: grid;
|
|
2420
|
-
place-items: center;
|
|
2421
|
-
width: 18.535px;
|
|
2422
|
-
height: 18.535px;
|
|
2423
|
-
padding: 0;
|
|
2424
|
-
border: 0;
|
|
2425
|
-
background: none;
|
|
2426
|
-
cursor: pointer;
|
|
2427
|
-
color: ${Ae.text};
|
|
2428
|
-
|
|
2429
|
-
.ico {
|
|
2430
|
-
width: 100%;
|
|
2431
|
-
height: 100%;
|
|
2432
|
-
}
|
|
2433
|
-
/* Keeps the glyph exactly where the design puts it while giving it a tappable hit area. */
|
|
2434
|
-
&::after {
|
|
2435
|
-
content: '';
|
|
2436
|
-
position: absolute;
|
|
2437
|
-
inset: -11px;
|
|
2438
|
-
}
|
|
2439
|
-
&:focus-visible {
|
|
2440
|
-
outline: 2px solid ${Ae.accent};
|
|
2441
|
-
outline-offset: 2px;
|
|
2442
|
-
}
|
|
2443
|
-
`,F0=m.div`
|
|
2444
|
-
padding: 24px 16px;
|
|
2445
|
-
border-radius: ${To.modal};
|
|
2446
|
-
background: ${Ae.promptLilac};
|
|
2447
|
-
display: flex;
|
|
2448
|
-
flex-direction: column;
|
|
2449
|
-
align-items: center;
|
|
2450
|
-
gap: 16px;
|
|
2451
|
-
text-align: center;
|
|
2452
|
-
`,Y0=m.img`
|
|
2453
|
-
flex: none;
|
|
2454
|
-
width: 76px;
|
|
2455
|
-
height: 76px;
|
|
2456
|
-
`,W0=m.h3`
|
|
2457
|
-
margin: 0;
|
|
2458
|
-
font-weight: 700;
|
|
2459
|
-
font-size: 20px;
|
|
2460
|
-
line-height: 1.334;
|
|
2461
|
-
color: ${Ae.text2};
|
|
2462
|
-
`,rl=m.p`
|
|
2463
|
-
margin: 0;
|
|
2464
|
-
font-weight: 400;
|
|
2465
|
-
font-size: 16px;
|
|
2466
|
-
line-height: 1.334;
|
|
2467
|
-
color: ${Ae.text2};
|
|
2468
|
-
`,B0=m.div`
|
|
2469
|
-
display: flex;
|
|
2470
|
-
align-items: center;
|
|
2471
|
-
gap: 12px;
|
|
2472
|
-
`,Xc=`
|
|
2473
|
-
flex: 1 1 0;
|
|
2474
|
-
min-width: 0;
|
|
2475
|
-
display: inline-flex;
|
|
2476
|
-
align-items: center;
|
|
2477
|
-
justify-content: center;
|
|
2478
|
-
gap: 12px;
|
|
2479
|
-
height: 46px;
|
|
2480
|
-
padding: 0 12px;
|
|
2481
|
-
border-radius: ${To.card};
|
|
2482
|
-
font-family: ${Gc.sans};
|
|
2483
|
-
font-weight: 600;
|
|
2484
|
-
font-size: 13px;
|
|
2485
|
-
line-height: 24px;
|
|
2486
|
-
letter-spacing: 0.46px;
|
|
2487
|
-
text-transform: uppercase;
|
|
2488
|
-
cursor: pointer;
|
|
2489
|
-
transition:
|
|
2490
|
-
background 0.15s ease,
|
|
2491
|
-
color 0.15s ease;
|
|
2492
|
-
|
|
2493
|
-
&:focus-visible {
|
|
2494
|
-
outline: 2px solid ${Ae.accent};
|
|
2495
|
-
outline-offset: 2px;
|
|
2496
|
-
}
|
|
2497
|
-
`,H0=m.button`
|
|
2498
|
-
${Xc};
|
|
2499
|
-
border: 0.5px solid ${Ae.text};
|
|
2500
|
-
background: ${Ae.white};
|
|
2501
|
-
color: ${Ae.text2};
|
|
2502
|
-
|
|
2503
|
-
&:hover {
|
|
2504
|
-
background: ${Ae.panel};
|
|
2505
|
-
}
|
|
2506
|
-
`,z0=m.a`
|
|
2507
|
-
${Xc};
|
|
2508
|
-
border: 0;
|
|
2509
|
-
background: ${Ae.dclRed};
|
|
2510
|
-
color: ${Ae.softWhite};
|
|
2511
|
-
text-decoration: none;
|
|
2512
|
-
|
|
2513
|
-
&:hover {
|
|
2514
|
-
filter: brightness(1.08);
|
|
2515
|
-
}
|
|
2516
|
-
`,q0=m.span`
|
|
2517
|
-
flex: none;
|
|
2518
|
-
display: grid;
|
|
2519
|
-
place-items: center;
|
|
2520
|
-
width: 24px;
|
|
2521
|
-
height: 24px;
|
|
2522
|
-
|
|
2523
|
-
.ico {
|
|
2524
|
-
width: 100%;
|
|
2525
|
-
height: 100%;
|
|
2526
|
-
}
|
|
2527
|
-
`;function K0(n,a){return`${cn.marketplaceUrl}/contracts/${n}/tokens/${a}`}function Q0(n,a){return`${cn.marketplaceUrl}/contracts/${n}/items/${a}`}function al(n){const{contractAddress:a,onClose:t}=n,e=n.variant==="buy",r=n.variant==="buy"?n.itemId:null,o=n.variant==="buy"?null:n.tokenId,s=n.variant==="buy"?Q0(a,n.itemId):K0(a,n.tokenId),l=b.useRef(null),c=b.useRef(t);return c.current=t,b.useEffect(()=>{var d;(d=l.current)==null||d.focus();function p(h){h.key==="Escape"&&c.current()}return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[]),i.jsx(R0,{role:"presentation",onClick:t,children:i.jsxs(N0,{ref:l,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":f("marketplaceRedirect.title"),"data-testid":"marketplace-redirect-modal",onClick:p=>p.stopPropagation(),children:[i.jsxs(O0,{children:[i.jsx(A0,{children:f("marketplaceRedirect.title")}),i.jsx(L0,{onClick:t,"aria-label":f("marketplaceRedirect.close"),children:i.jsx(X,{name:"close",className:"ico"})})]}),i.jsxs(F0,{children:[i.jsx(Y0,{src:T0,alt:"","aria-hidden":!0}),i.jsx(W0,{children:f("marketplaceRedirect.heading")}),i.jsx(rl,{children:e?f("marketplaceRedirect.buyBody"):f("marketplaceRedirect.body")}),e?i.jsx(rl,{children:f("marketplaceRedirect.buyCurrencyNote")}):null]}),i.jsxs(B0,{children:[i.jsx(H0,{onClick:t,"data-testid":"marketplace-redirect-cancel",children:f("marketplaceRedirect.cancel")}),i.jsxs(z0,{href:s,target:"_blank",rel:"noreferrer","data-testid":"marketplace-redirect-continue",onClick:()=>fe("Shop Redirected To Marketplace",{direction:e?"buy":"resell",contract_address:a,item_id:r,token_id:o}),children:[f("marketplaceRedirect.continue"),i.jsx(q0,{"aria-hidden":!0,children:i.jsx(X,{name:"view-all-arrow",className:"ico"})})]})]})]})})}function $o(){return cn.shopServerUrl||null}function Jc(){return!!$o()}async function U0(n,a,t){const e=$o();if(!e)return{subscribed:!1};const r=new URLSearchParams({contractAddress:n,itemId:a}),o=`${e}/notify-requests?${r.toString()}`,s=await Bl(o,{method:"GET",identity:t,metadata:{}});if(!s.ok)throw new Error(`getNotifyRequest ${s.status}`);return G0(s,"getNotifyRequest")}async function V0(n,a){const t=$o();if(!t)throw new Error("createNotifyRequest: no shop-server host configured");const e=`${t}/notify-requests`,r=await Bl(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()&&!X0(o))throw new Error("createNotifyRequest: response was not JSON")}async function G0(n,a){try{return await n.json()}catch{throw new Error(`${a}: response was not JSON`)}}function X0(n){try{return JSON.parse(n),!0}catch{return!1}}const{colors:Je,radius:Zc}=u,ed=On`
|
|
2528
|
-
display: flex;
|
|
2529
|
-
flex-direction: column;
|
|
2530
|
-
gap: 8px;
|
|
2531
|
-
width: 100%;
|
|
2532
|
-
`,J0=m.form`
|
|
2533
|
-
${ed};
|
|
2534
|
-
`,ol=m.div`
|
|
2535
|
-
${ed};
|
|
2536
|
-
|
|
2537
|
-
&[data-done] {
|
|
2538
|
-
flex-direction: row;
|
|
2539
|
-
align-items: center;
|
|
2540
|
-
gap: 16px;
|
|
2541
|
-
padding: 12px;
|
|
2542
|
-
border-radius: 16px;
|
|
2543
|
-
background: #c1d8c9;
|
|
2544
|
-
}
|
|
2545
|
-
`,Z0=m.label`
|
|
2546
|
-
font-size: 14px;
|
|
2547
|
-
color: ${Je.softWhite};
|
|
2548
|
-
`,ew=m.div`
|
|
2549
|
-
display: flex;
|
|
2550
|
-
align-items: stretch;
|
|
2551
|
-
gap: 8px;
|
|
2552
|
-
`,tw=m.input`
|
|
2553
|
-
flex: 1;
|
|
2554
|
-
min-width: 0;
|
|
2555
|
-
height: 42px;
|
|
2556
|
-
padding: 0 16px;
|
|
2557
|
-
border: 1px solid ${Je.fieldBorder};
|
|
2558
|
-
border-radius: ${Zc.btn};
|
|
2559
|
-
background: rgba(255, 255, 255, 0.1);
|
|
2560
|
-
font-size: 16px;
|
|
2561
|
-
color: ${Je.softWhite};
|
|
2562
|
-
|
|
2563
|
-
&::placeholder {
|
|
2564
|
-
color: ${Je.gray4};
|
|
2565
|
-
}
|
|
2566
|
-
&:focus-visible {
|
|
2567
|
-
outline: none;
|
|
2568
|
-
border-color: ${Je.white};
|
|
2569
|
-
box-shadow: 0 0 0 1px ${Je.white};
|
|
2570
|
-
}
|
|
2571
|
-
`,il=m.button`
|
|
2572
|
-
flex-shrink: 0;
|
|
2573
|
-
height: 40px;
|
|
2574
|
-
padding: 0 12px;
|
|
2575
|
-
border: 0;
|
|
2576
|
-
border-radius: ${Zc.card};
|
|
2577
|
-
background: ${Je.softWhite};
|
|
2578
|
-
color: ${Je.text};
|
|
2579
|
-
font-weight: 600;
|
|
2580
|
-
font-size: 15px;
|
|
2581
|
-
line-height: 24px;
|
|
2582
|
-
text-transform: uppercase;
|
|
2583
|
-
letter-spacing: 0.46px;
|
|
2584
|
-
cursor: pointer;
|
|
2585
|
-
transition: background 0.15s ease;
|
|
2586
|
-
|
|
2587
|
-
&[data-full] {
|
|
2588
|
-
width: 100%;
|
|
2589
|
-
flex-shrink: 1;
|
|
2590
|
-
}
|
|
2591
|
-
&:hover:not(:disabled) {
|
|
2592
|
-
background: ${Je.white};
|
|
2593
|
-
}
|
|
2594
|
-
&:disabled {
|
|
2595
|
-
opacity: 0.5;
|
|
2596
|
-
cursor: default;
|
|
2597
|
-
}
|
|
2598
|
-
`,nw=m.span`
|
|
2599
|
-
display: inline-flex;
|
|
2600
|
-
align-items: center;
|
|
2601
|
-
justify-content: center;
|
|
2602
|
-
flex-shrink: 0;
|
|
2603
|
-
width: 20px;
|
|
2604
|
-
height: 20px;
|
|
2605
|
-
border-radius: 50%;
|
|
2606
|
-
background: #34ce76;
|
|
2607
|
-
color: ${Je.white};
|
|
2608
|
-
`,rw=m.span`
|
|
2609
|
-
font-size: 16px;
|
|
2610
|
-
line-height: 1.5;
|
|
2611
|
-
color: ${Je.text2};
|
|
2612
|
-
`;function sl(n){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.trim())}function aw({item:n}){const a=dn(k=>k.session),t=dn(k=>k.signIn),[e,r]=b.useState(""),[o,s]=b.useState(!1),[l,c]=b.useState(!1),[p,d]=b.useState(null),h=Jc(),x=h&&!!a&&!!n.contractAddress&&!!n.itemId,{data:y}=ye({queryKey:["notify-request",n.contractAddress,n.itemId,a==null?void 0:a.address],enabled:x,queryFn:()=>U0(n.contractAddress,n.itemId,a.identity)});b.useEffect(()=>{y!=null&&y.email&&r(k=>k||y.email)},[y==null?void 0:y.email]),b.useEffect(()=>{if(!a||!h)return;let k=!1;return du().then(C=>{!k&&C&&r(D=>D||C)}),()=>{k=!0}},[h,a]);const v=l||!!(y!=null&&y.subscribed);async function w(k){if(k.preventDefault(),!(!a||!n.itemId||!sl(e)||o)){s(!0),d(null);try{await V0({contractAddress:n.contractAddress,itemId:n.itemId,chainId:n.chainId,email:e.trim()},a.identity),c(!0),fe("Shop Requested Notify",{item_id:n.itemId,contract_address:n.contractAddress})}catch(C){je(C,{flow:"notify-me",contractAddress:n.contractAddress,itemId:n.itemId}),d(f("notifyMe.error"))}finally{s(!1)}}}return h?a?v?i.jsxs(ol,{"data-done":!0,"data-testid":"notify-subscribed",children:[i.jsx(nw,{"aria-hidden":!0,children:i.jsx(X,{name:"check",size:12})}),i.jsx(rw,{children:f("notifyMe.subscribedBody")})]}):i.jsxs(J0,{onSubmit:k=>void w(k),"data-testid":"notify",children:[i.jsx(Z0,{htmlFor:"notify-email",children:f("notifyMe.label")}),i.jsxs(ew,{children:[i.jsx(tw,{id:"notify-email",type:"email",inputMode:"email",autoComplete:"email",placeholder:f("notifyMe.placeholder"),value:e,onChange:k=>r(k.target.value),"data-testid":"notify-email"}),i.jsx(il,{type:"submit",disabled:!sl(e)||o,"data-testid":"notify-submit",children:o?f("notifyMe.working"):f("notifyMe.cta")})]}),i.jsx(Bt,{message:p})]}):i.jsx(ol,{"data-testid":"notify",children:i.jsx(il,{type:"button","data-full":!0,onClick:t,"data-testid":"notify-signin",children:f("notifyMe.signInCta")})}):null}const ow=new Map(Object.entries(_f).flatMap(([n,a])=>a.length===1?[[a[0],n]]:[])),_n="/items";function iw(n){return n?`${_n}?rarities=${encodeURIComponent(n.toLowerCase())}`:null}function sw(n){const a=n.wearableCategory;if(a){const t=ow.get(a);return t?`${_n}?category=wearable&subCategory=${encodeURIComponent(t)}`:`${_n}?category=wearable`}return n.category==="emote"?`${_n}?category=emote`:n.category==="wearable"?`${_n}?category=wearable`:null}function lw(){return`${_n}?smart=true`}const cw=m(uu)`
|
|
2613
|
-
display: flex;
|
|
2614
|
-
flex-direction: column;
|
|
2615
|
-
overflow: hidden;
|
|
2616
|
-
gap: 1px;
|
|
2617
|
-
background: ${u.colors.lineStrong};
|
|
2618
|
-
|
|
2619
|
-
/* Rows stack; each cell (<img>) covers its share. A single row (≤2 thumbnails, data-full) spans the
|
|
2620
|
-
full height. */
|
|
2621
|
-
& [data-collage-row] {
|
|
2622
|
-
display: flex;
|
|
2623
|
-
flex: 1 1 50%;
|
|
2624
|
-
min-height: 0;
|
|
2625
|
-
gap: 1px;
|
|
2626
|
-
}
|
|
2627
|
-
& [data-collage-row][data-full] {
|
|
2628
|
-
flex-basis: 100%;
|
|
2629
|
-
}
|
|
2630
|
-
& [data-collage-row] img {
|
|
2631
|
-
flex: 1 1 0;
|
|
2632
|
-
min-width: 0;
|
|
2633
|
-
width: 100%;
|
|
2634
|
-
height: 100%;
|
|
2635
|
-
object-fit: cover;
|
|
2636
|
-
display: block;
|
|
2637
|
-
}
|
|
2638
|
-
`;function dw({contractAddress:n,name:a,items:t,className:e}){const r=mn();if(!n||!a)return null;const o=(t??[]).map(c=>c.thumbnail).filter(c=>!!c).slice(0,4),s=o.slice(0,2),l=o.slice(2,4);return i.jsxs(pu,{as:"button","data-link":!0,className:e,"data-testid":"creator",onClick:c=>{c.stopPropagation(),r(`/collection/${n}`)},children:[o.length>0?i.jsxs(cw,{as:"span","data-avatar":!0,"data-testid":"creator-ava","aria-hidden":!0,children:[i.jsx("span",{"data-collage-row":!0,"data-full":l.length===0||void 0,children:s.map((c,p)=>i.jsx("img",{src:c,alt:""},p))}),l.length>0?i.jsx("span",{"data-collage-row":!0,children:l.map((c,p)=>i.jsx("img",{src:c,alt:""},p))}):null]}):null,i.jsx(fu,{"data-testid":"creator-name",children:aa(a)})]})}const{colors:R,radius:Kt,media:Me,font:uw,gradients:pw}=u,fw=m.div`
|
|
2639
|
-
max-width: 1721px;
|
|
2640
|
-
margin: 0 auto;
|
|
2641
|
-
|
|
2642
|
-
${Me.maxWidth("lg")} {
|
|
2643
|
-
padding-bottom: 88px;
|
|
2644
|
-
}
|
|
2645
|
-
`,hw=m.nav`
|
|
2646
|
-
display: flex;
|
|
2647
|
-
align-items: center;
|
|
2648
|
-
gap: 8px;
|
|
2649
|
-
font-size: 13px;
|
|
2650
|
-
color: ${R.gray4};
|
|
2651
|
-
margin-bottom: 24px;
|
|
2652
|
-
${jf};
|
|
2653
|
-
`,mw=m.button`
|
|
2654
|
-
background: none;
|
|
2655
|
-
border: 0;
|
|
2656
|
-
padding: 0;
|
|
2657
|
-
font: inherit;
|
|
2658
|
-
color: ${R.gray4};
|
|
2659
|
-
|
|
2660
|
-
&:hover {
|
|
2661
|
-
color: ${R.white};
|
|
2662
|
-
}
|
|
2663
|
-
`,gw=m.span`
|
|
2664
|
-
color: ${R.muted2};
|
|
2665
|
-
`,xw=m.span`
|
|
2666
|
-
color: ${R.softWhite};
|
|
2667
|
-
font-weight: 600;
|
|
2668
|
-
`,yw=m.div`
|
|
2669
|
-
position: relative;
|
|
2670
|
-
/* Confines the glow's negative z-index, which would otherwise escape to the root stacking context. */
|
|
2671
|
-
isolation: isolate;
|
|
2672
|
-
display: grid;
|
|
2673
|
-
grid-template-columns: minmax(0, 1045fr) minmax(0, 514fr);
|
|
2674
|
-
gap: 48px;
|
|
2675
|
-
align-items: start;
|
|
2676
|
-
|
|
2677
|
-
/* Preview column width, re-derived from the tracks above so the glow's pivot cannot drift. */
|
|
2678
|
-
--preview-col-w: calc((100% - 48px) * 1045 / 1559);
|
|
2679
|
-
/* Oversized so the glow reaches past the frame while the gradient still finishes fading inside its
|
|
2680
|
-
own box: the radii cannot exceed 50% without ending outside the box and painting a hard rectangle. */
|
|
2681
|
-
--glow-box: 1.76;
|
|
2682
|
-
|
|
2683
|
-
/* Avatar glow, hung off the grid container because the preview frame clips its own overflow. Sits
|
|
2684
|
-
under the frame and, by document order, above the body symbols on the same z-index. */
|
|
2685
|
-
&::before {
|
|
2686
|
-
content: '';
|
|
2687
|
-
position: absolute;
|
|
2688
|
-
z-index: -1;
|
|
2689
|
-
pointer-events: none;
|
|
2690
|
-
top: 0;
|
|
2691
|
-
left: calc(var(--preview-col-w) / 2);
|
|
2692
|
-
width: calc(var(--preview-col-w) * var(--glow-box));
|
|
2693
|
-
aspect-ratio: 1045 / 752;
|
|
2694
|
-
transform: translate(-50%, calc(50% / var(--glow-box) - 50%));
|
|
2695
|
-
background: radial-gradient(
|
|
2696
|
-
50% 50% at 50% 52%,
|
|
2697
|
-
rgb(var(--glow-core, ${R.glowCyanRgb})) 0%,
|
|
2698
|
-
rgb(var(--glow-rgb, ${R.glowCyanRgb}) / 0.9) 20%,
|
|
2699
|
-
45%,
|
|
2700
|
-
rgb(var(--glow-rgb, ${R.glowCyanRgb}) / 0) 100%
|
|
2701
|
-
);
|
|
2702
|
-
}
|
|
2703
|
-
|
|
2704
|
-
${Me.maxWidth("lg")} {
|
|
2705
|
-
grid-template-columns: 1fr;
|
|
2706
|
-
gap: 24px;
|
|
2707
|
-
|
|
2708
|
-
/* The track maths is desktop-only; one column puts the pivot nowhere meaningful. */
|
|
2709
|
-
&::before {
|
|
2710
|
-
display: none;
|
|
2711
|
-
}
|
|
2712
|
-
}
|
|
2713
|
-
`,bw=m.div`
|
|
2714
|
-
position: relative;
|
|
2715
|
-
aspect-ratio: 1045 / 752;
|
|
2716
|
-
border-radius: ${Kt.banner};
|
|
2717
|
-
overflow: hidden;
|
|
2718
|
-
|
|
2719
|
-
/* Edge to edge once the page is a single column: the stage is the whole width there, so it cancels the
|
|
2720
|
-
shell's gutter instead of sitting inside it. No transform, which would make this the containing block
|
|
2721
|
-
for the absolutely-positioned controls below. */
|
|
2722
|
-
${Me.maxWidth("lg")} {
|
|
2723
|
-
aspect-ratio: 1 / 1;
|
|
2724
|
-
width: 100vw;
|
|
2725
|
-
margin-left: calc(-50vw + 50%);
|
|
2726
|
-
border-radius: 0;
|
|
2727
|
-
}
|
|
2728
|
-
|
|
2729
|
-
& iframe,
|
|
2730
|
-
& > * {
|
|
2731
|
-
width: 100%;
|
|
2732
|
-
height: 100%;
|
|
2733
|
-
border: 0;
|
|
2734
|
-
display: block;
|
|
2735
|
-
}
|
|
2736
|
-
|
|
2737
|
-
/* Soft edges so legs and the cast shadow dissolve instead of being sliced by the overflow clip — on the
|
|
2738
|
-
iframe alone, so the pills and note stay crisp, and intersected linears rather than one radial, which
|
|
2739
|
-
would round the corners. The bands stay clear of the controls aang draws ~40px inside its canvas. */
|
|
2740
|
-
& iframe {
|
|
2741
|
-
-webkit-mask-image:
|
|
2742
|
-
linear-gradient(to bottom, transparent 0%, #000 3%, #000 92%, transparent 100%),
|
|
2743
|
-
linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
|
|
2744
|
-
-webkit-mask-composite: source-in;
|
|
2745
|
-
mask-image:
|
|
2746
|
-
linear-gradient(to bottom, transparent 0%, #000 3%, #000 92%, transparent 100%),
|
|
2747
|
-
linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
|
|
2748
|
-
mask-composite: intersect;
|
|
2749
|
-
}
|
|
2750
|
-
|
|
2751
|
-
/* Invisible viewport sentinel for the IntersectionObserver that pauses the preview off-screen.
|
|
2752
|
-
Absolute + pointer-events:none so it neither takes layout space (undoing the greedy child sizing
|
|
2753
|
-
above) nor blocks the preview controls. */
|
|
2754
|
-
& > [data-preview-viewport] {
|
|
2755
|
-
position: absolute;
|
|
2756
|
-
inset: 0;
|
|
2757
|
-
pointer-events: none;
|
|
2758
|
-
z-index: 0;
|
|
2759
|
-
}
|
|
2760
|
-
|
|
2761
|
-
& > [data-preview-toggle] {
|
|
2762
|
-
position: absolute;
|
|
2763
|
-
top: 16px;
|
|
2764
|
-
left: 16px;
|
|
2765
|
-
z-index: 2;
|
|
2766
|
-
width: auto;
|
|
2767
|
-
height: auto;
|
|
2768
|
-
display: inline-flex;
|
|
2769
|
-
gap: 2px;
|
|
2770
|
-
padding: 3px;
|
|
2771
|
-
background: rgba(255, 255, 255, 0.92);
|
|
2772
|
-
border: 1px solid ${R.line};
|
|
2773
|
-
border-radius: 999px;
|
|
2774
|
-
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
|
|
2775
|
-
|
|
2776
|
-
/* Bottom-right on mobile, and the two buttons meet directly: the design draws one clipped group, so the
|
|
2777
|
-
container carries no fill, gap or padding of its own there. */
|
|
2778
|
-
${Me.maxWidth("lg")} {
|
|
2779
|
-
top: auto;
|
|
2780
|
-
left: auto;
|
|
2781
|
-
right: 16px;
|
|
2782
|
-
bottom: 16px;
|
|
2783
|
-
gap: 0;
|
|
2784
|
-
padding: 0;
|
|
2785
|
-
background: none;
|
|
2786
|
-
border: 0;
|
|
2787
|
-
box-shadow: none;
|
|
2788
|
-
overflow: hidden;
|
|
2789
|
-
}
|
|
2790
|
-
}
|
|
2791
|
-
|
|
2792
|
-
& > [data-preview-note] {
|
|
2793
|
-
position: absolute;
|
|
2794
|
-
bottom: 14px;
|
|
2795
|
-
left: 50%;
|
|
2796
|
-
transform: translateX(-50%);
|
|
2797
|
-
z-index: 2;
|
|
2798
|
-
width: auto;
|
|
2799
|
-
height: auto;
|
|
2800
|
-
max-width: 88%;
|
|
2801
|
-
margin: 0;
|
|
2802
|
-
text-align: center;
|
|
2803
|
-
background: rgba(22, 21, 24, 0.78);
|
|
2804
|
-
color: ${R.white};
|
|
2805
|
-
font-size: 12px;
|
|
2806
|
-
font-weight: 500;
|
|
2807
|
-
padding: 6px 12px;
|
|
2808
|
-
border-radius: 999px;
|
|
2809
|
-
}
|
|
2810
|
-
|
|
2811
|
-
& > [data-preview-loading] {
|
|
2812
|
-
position: absolute;
|
|
2813
|
-
inset: 0;
|
|
2814
|
-
z-index: 1;
|
|
2815
|
-
display: flex;
|
|
2816
|
-
align-items: center;
|
|
2817
|
-
justify-content: center;
|
|
2818
|
-
width: 100%;
|
|
2819
|
-
height: 100%;
|
|
2820
|
-
background: transparent;
|
|
2821
|
-
}
|
|
2822
|
-
|
|
2823
|
-
& > [data-fav-preview] {
|
|
2824
|
-
display: none;
|
|
2825
|
-
}
|
|
2826
|
-
|
|
2827
|
-
/* Bottom-LEFT: the emote controls and the preview note both own the bottom centre, and the mobile
|
|
2828
|
-
wearable/avatar toggle owns the bottom right, so this is the one free corner on every route. */
|
|
2829
|
-
& > [data-play-showcase] {
|
|
2830
|
-
position: absolute;
|
|
2831
|
-
bottom: 16px;
|
|
2832
|
-
left: 16px;
|
|
2833
|
-
z-index: 2;
|
|
2834
|
-
width: auto;
|
|
2835
|
-
height: auto;
|
|
2836
|
-
}
|
|
2837
|
-
|
|
2838
|
-
${Me.maxWidth("lg")} {
|
|
2839
|
-
& > [data-preview-toggle] {
|
|
2840
|
-
top: auto;
|
|
2841
|
-
left: auto;
|
|
2842
|
-
bottom: 12px;
|
|
2843
|
-
right: 12px;
|
|
2844
|
-
gap: 0;
|
|
2845
|
-
padding: 0;
|
|
2846
|
-
background: transparent;
|
|
2847
|
-
border: 0;
|
|
2848
|
-
box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
|
|
2849
|
-
overflow: hidden;
|
|
2850
|
-
}
|
|
2851
|
-
& > [data-fav-preview] {
|
|
2852
|
-
display: inline-flex;
|
|
2853
|
-
position: absolute;
|
|
2854
|
-
top: 12px;
|
|
2855
|
-
right: 12px;
|
|
2856
|
-
z-index: 3;
|
|
2857
|
-
width: auto;
|
|
2858
|
-
min-width: 40px;
|
|
2859
|
-
height: 40px;
|
|
2860
|
-
background: rgba(255, 255, 255, 0.92);
|
|
2861
|
-
box-shadow: 0 1px 4px rgba(22, 21, 24, 0.18);
|
|
2862
|
-
}
|
|
2863
|
-
& > [data-fav-preview]:hover {
|
|
2864
|
-
background: ${R.white};
|
|
2865
|
-
}
|
|
2866
|
-
}
|
|
2867
|
-
`,vw=m.div``,ww=m.span`
|
|
2868
|
-
position: absolute;
|
|
2869
|
-
inset: 0;
|
|
2870
|
-
width: 100%;
|
|
2871
|
-
height: 100%;
|
|
2872
|
-
border-radius: inherit;
|
|
2873
|
-
`,kw=m.div`
|
|
2874
|
-
display: flex;
|
|
2875
|
-
flex-direction: column;
|
|
2876
|
-
gap: 0;
|
|
2877
|
-
`,Dw=m.div`
|
|
2878
|
-
display: flex;
|
|
2879
|
-
align-items: flex-start;
|
|
2880
|
-
justify-content: space-between;
|
|
2881
|
-
gap: 12px;
|
|
2882
|
-
|
|
2883
|
-
${Me.maxWidth("lg")} {
|
|
2884
|
-
order: 0;
|
|
2885
|
-
}
|
|
2886
|
-
`,Cw=m.h1`
|
|
2887
|
-
font-size: 28px;
|
|
2888
|
-
font-weight: 600;
|
|
2889
|
-
line-height: 34px;
|
|
2890
|
-
color: ${R.softWhite};
|
|
2891
|
-
|
|
2892
|
-
${Me.maxWidth("lg")} {
|
|
2893
|
-
font-size: 20px;
|
|
2894
|
-
line-height: 24px;
|
|
2895
|
-
}
|
|
2896
|
-
`,ll=m.button`
|
|
2897
|
-
flex: none;
|
|
2898
|
-
min-width: 40px;
|
|
2899
|
-
height: 40px;
|
|
2900
|
-
padding: 0;
|
|
2901
|
-
border-radius: ${Kt.pill};
|
|
2902
|
-
border: 0;
|
|
2903
|
-
background: rgba(255, 255, 255, 0.16);
|
|
2904
|
-
display: inline-flex;
|
|
2905
|
-
align-items: center;
|
|
2906
|
-
justify-content: center;
|
|
2907
|
-
gap: 6px;
|
|
2908
|
-
color: ${R.softWhite};
|
|
2909
|
-
cursor: pointer;
|
|
2910
|
-
transition:
|
|
2911
|
-
color 0.12s ease,
|
|
2912
|
-
background 0.12s ease;
|
|
2913
|
-
|
|
2914
|
-
&[data-count] {
|
|
2915
|
-
padding: 0 14px 0 12px;
|
|
2916
|
-
}
|
|
2917
|
-
&:hover {
|
|
2918
|
-
background: rgba(255, 255, 255, 0.28);
|
|
2919
|
-
}
|
|
2920
|
-
&[data-on] {
|
|
2921
|
-
color: ${R.dclRed};
|
|
2922
|
-
}
|
|
2923
|
-
|
|
2924
|
-
${Me.maxWidth("lg")} {
|
|
2925
|
-
color: ${R.text};
|
|
2926
|
-
&[data-fav-title] {
|
|
2927
|
-
display: none;
|
|
2928
|
-
}
|
|
2929
|
-
}
|
|
2930
|
-
`,cl=m.span`
|
|
2931
|
-
font-size: 13px;
|
|
2932
|
-
font-weight: 600;
|
|
2933
|
-
line-height: 1;
|
|
2934
|
-
color: ${R.softWhite};
|
|
2935
|
-
|
|
2936
|
-
${Me.maxWidth("lg")} {
|
|
2937
|
-
color: ${R.text};
|
|
2938
|
-
}
|
|
2939
|
-
`,Sw=m.button`
|
|
2940
|
-
display: inline-flex;
|
|
2941
|
-
align-items: center;
|
|
2942
|
-
gap: 8px;
|
|
2943
|
-
padding: 8px 14px;
|
|
2944
|
-
border: 1px solid ${R.line};
|
|
2945
|
-
border-radius: ${Kt.pill};
|
|
2946
|
-
background: rgba(255, 255, 255, 0.94);
|
|
2947
|
-
backdrop-filter: blur(6px);
|
|
2948
|
-
box-shadow: 0 2px 10px rgba(22, 21, 24, 0.12);
|
|
2949
|
-
color: ${R.text};
|
|
2950
|
-
font-size: 13px;
|
|
2951
|
-
font-weight: 600;
|
|
2952
|
-
cursor: pointer;
|
|
2953
|
-
transition: background 0.12s ease;
|
|
2954
|
-
|
|
2955
|
-
&:hover {
|
|
2956
|
-
background: ${R.white};
|
|
2957
|
-
}
|
|
2958
|
-
&:focus-visible {
|
|
2959
|
-
outline: 2px solid ${R.accent};
|
|
2960
|
-
outline-offset: 2px;
|
|
2961
|
-
}
|
|
2962
|
-
`,Dn=m.div`
|
|
2963
|
-
display: inline-flex;
|
|
2964
|
-
align-items: center;
|
|
2965
|
-
gap: 5px;
|
|
2966
|
-
font-size: 12px;
|
|
2967
|
-
font-weight: 500;
|
|
2968
|
-
text-transform: uppercase;
|
|
2969
|
-
letter-spacing: 0;
|
|
2970
|
-
color: ${R.gray4};
|
|
2971
|
-
`,Mw=m.div`
|
|
2972
|
-
display: flex;
|
|
2973
|
-
align-items: center;
|
|
2974
|
-
gap: 8px;
|
|
2975
|
-
flex-wrap: wrap;
|
|
2976
|
-
margin-top: 12px;
|
|
2977
|
-
|
|
2978
|
-
${Me.maxWidth("lg")} {
|
|
2979
|
-
order: 1;
|
|
2980
|
-
margin-top: 10px;
|
|
2981
|
-
}
|
|
2982
|
-
`,st=m(Al)`
|
|
2983
|
-
height: 24px;
|
|
2984
|
-
padding: 0 8px;
|
|
2985
|
-
gap: 3px;
|
|
2986
|
-
font-size: 13px;
|
|
2987
|
-
font-weight: 500;
|
|
2988
|
-
border-radius: 4px;
|
|
2989
|
-
letter-spacing: 0.02em;
|
|
2990
|
-
text-transform: uppercase;
|
|
2991
|
-
background: rgba(255, 255, 255, 0.14);
|
|
2992
|
-
color: ${R.softWhite};
|
|
2993
|
-
|
|
2994
|
-
& .ico {
|
|
2995
|
-
color: ${R.softWhite};
|
|
2996
|
-
}
|
|
2997
|
-
&[data-variant='cat'] {
|
|
2998
|
-
background: rgba(255, 255, 255, 0.14);
|
|
2999
|
-
color: ${R.softWhite};
|
|
3000
|
-
}
|
|
3001
|
-
|
|
3002
|
-
/* The blocked-VRM-export badge. Warning orange, tinted at 20% for the fill — the marketplace's own
|
|
3003
|
-
#ff7439 on #ff743933, kept identical so the same restriction reads the same in both places. It is the
|
|
3004
|
-
one chip in this row that reports a limitation rather than a feature, and it should not blend in. */
|
|
3005
|
-
&[data-variant='blocked'] {
|
|
3006
|
-
background: rgba(255, 116, 57, 0.2);
|
|
3007
|
-
color: #ff7439;
|
|
3008
|
-
cursor: help;
|
|
3009
|
-
}
|
|
3010
|
-
&[data-variant='blocked']:focus-visible {
|
|
3011
|
-
outline: 2px solid #ff7439;
|
|
3012
|
-
outline-offset: 2px;
|
|
3013
|
-
}
|
|
3014
|
-
`,Rr=m(st.withComponent(Pl))`
|
|
3015
|
-
text-decoration: none;
|
|
3016
|
-
cursor: pointer;
|
|
3017
|
-
transition: background 0.15s ease;
|
|
3018
|
-
|
|
3019
|
-
&:hover,
|
|
3020
|
-
&:focus-visible {
|
|
3021
|
-
background: rgba(255, 255, 255, 0.26);
|
|
3022
|
-
}
|
|
3023
|
-
|
|
3024
|
-
/* The rarity chip carries its own colour inline, so a background hover would be overridden and the
|
|
3025
|
-
chip would look inert. It gets a ring instead, which reads on any fill. */
|
|
3026
|
-
&[data-variant='rarity']:hover,
|
|
3027
|
-
&[data-variant='rarity']:focus-visible {
|
|
3028
|
-
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
|
|
3029
|
-
}
|
|
3030
|
-
`,_w=m.div`
|
|
3031
|
-
display: flex;
|
|
3032
|
-
flex-direction: column;
|
|
3033
|
-
align-items: flex-start;
|
|
3034
|
-
gap: 8px;
|
|
3035
|
-
`,fo=m(_w)`
|
|
3036
|
-
gap: 11px;
|
|
3037
|
-
`,dl=m.p`
|
|
3038
|
-
margin: 0;
|
|
3039
|
-
color: ${R.softWhite};
|
|
3040
|
-
font-size: 14px;
|
|
3041
|
-
line-height: 30px;
|
|
3042
|
-
display: -webkit-box;
|
|
3043
|
-
-webkit-box-orient: vertical;
|
|
3044
|
-
-webkit-line-clamp: 4;
|
|
3045
|
-
overflow: hidden;
|
|
3046
|
-
|
|
3047
|
-
&[data-expanded] {
|
|
3048
|
-
-webkit-line-clamp: unset;
|
|
3049
|
-
overflow: visible;
|
|
3050
|
-
}
|
|
3051
|
-
`,jw=m.button`
|
|
3052
|
-
font-size: 13px;
|
|
3053
|
-
align-self: flex-start;
|
|
3054
|
-
`,td=On`
|
|
3055
|
-
display: grid;
|
|
3056
|
-
grid-template-columns: 1fr 1fr;
|
|
3057
|
-
gap: 16px;
|
|
3058
|
-
`,nd=m.div`
|
|
3059
|
-
${td};
|
|
3060
|
-
/* Clears the chips above. The pair below sits at 32px, so this is the tighter of the two steps: the
|
|
3061
|
-
description belongs to the heading block it follows, the creator/collection pair is a new subject. */
|
|
3062
|
-
margin-top: 24px;
|
|
3063
|
-
|
|
3064
|
-
${Me.maxWidth("lg")} {
|
|
3065
|
-
order: 3;
|
|
3066
|
-
grid-template-columns: 1fr;
|
|
3067
|
-
/* Stacked, the two blocks need real separation — as one column they would read as one paragraph. */
|
|
3068
|
-
gap: 20px;
|
|
3069
|
-
margin-top: 20px;
|
|
3070
|
-
}
|
|
3071
|
-
`,ho=m.div`
|
|
3072
|
-
min-width: 0;
|
|
3073
|
-
`,rd=m.div`
|
|
3074
|
-
${td};
|
|
3075
|
-
margin-top: 32px;
|
|
3076
|
-
|
|
3077
|
-
${Me.maxWidth("lg")} {
|
|
3078
|
-
order: 2;
|
|
3079
|
-
margin-top: 20px;
|
|
3080
|
-
}
|
|
3081
|
-
`,Jn=m.div`
|
|
3082
|
-
display: flex;
|
|
3083
|
-
flex-direction: column;
|
|
3084
|
-
gap: 15px;
|
|
3085
|
-
min-width: 0;
|
|
3086
|
-
|
|
3087
|
-
&[data-collection] {
|
|
3088
|
-
align-items: flex-start;
|
|
3089
|
-
}
|
|
3090
|
-
`,ad=On`
|
|
3091
|
-
&[data-testid='creator'] {
|
|
3092
|
-
color: ${R.softWhite};
|
|
3093
|
-
font-size: 14px;
|
|
3094
|
-
gap: 12px;
|
|
3095
|
-
}
|
|
3096
|
-
[data-avatar] {
|
|
3097
|
-
width: 48px;
|
|
3098
|
-
height: 48px;
|
|
3099
|
-
}
|
|
3100
|
-
[data-letter] {
|
|
3101
|
-
font-size: 18px;
|
|
3102
|
-
}
|
|
3103
|
-
[data-testid='creator-name'] {
|
|
3104
|
-
color: ${R.softWhite};
|
|
3105
|
-
font-weight: 500;
|
|
3106
|
-
text-decoration: underline;
|
|
3107
|
-
}
|
|
3108
|
-
&[data-link]:hover [data-testid='creator-name'] {
|
|
3109
|
-
color: ${R.gray4};
|
|
3110
|
-
}
|
|
3111
|
-
`,Iw=m(hu)`
|
|
3112
|
-
${ad}
|
|
3113
|
-
`,Pw=m(dw)`
|
|
3114
|
-
${ad}
|
|
3115
|
-
`,od=m.hr`
|
|
3116
|
-
border: 0;
|
|
3117
|
-
border-top: 1px solid rgba(255, 255, 255, 0.3);
|
|
3118
|
-
margin: 24px 0 0;
|
|
3119
|
-
width: 100%;
|
|
3120
|
-
|
|
3121
|
-
/* Below the price, not above it: the design hangs this off the bottom of the buy section (2090:399782),
|
|
3122
|
-
so it closes the price rather than separating it from the description. */
|
|
3123
|
-
${Me.maxWidth("lg")} {
|
|
3124
|
-
order: 5;
|
|
3125
|
-
margin-top: 16px;
|
|
3126
|
-
}
|
|
3127
|
-
`,Ew=m.div`
|
|
3128
|
-
margin-top: 16px;
|
|
3129
|
-
|
|
3130
|
-
${Me.maxWidth("lg")} {
|
|
3131
|
-
order: 4;
|
|
3132
|
-
margin-top: 16px;
|
|
3133
|
-
}
|
|
3134
|
-
`,Tw=m.div`
|
|
3135
|
-
display: flex;
|
|
3136
|
-
align-items: flex-start;
|
|
3137
|
-
gap: 16px;
|
|
3138
|
-
width: 100%;
|
|
3139
|
-
`,$w=m.div`
|
|
3140
|
-
flex: 1 1 auto;
|
|
3141
|
-
min-width: 0;
|
|
3142
|
-
display: flex;
|
|
3143
|
-
flex-direction: column;
|
|
3144
|
-
gap: 8px;
|
|
3145
|
-
`,ul=m.div`
|
|
3146
|
-
flex: 0 0 auto;
|
|
3147
|
-
display: flex;
|
|
3148
|
-
flex-direction: column;
|
|
3149
|
-
align-items: flex-end;
|
|
3150
|
-
gap: 8px;
|
|
3151
|
-
text-align: right;
|
|
3152
|
-
`,pl=m.div`
|
|
3153
|
-
font-size: 18px;
|
|
3154
|
-
font-weight: 500;
|
|
3155
|
-
line-height: 1;
|
|
3156
|
-
color: ${R.softWhite};
|
|
3157
|
-
|
|
3158
|
-
&[data-out] {
|
|
3159
|
-
font-size: 14px;
|
|
3160
|
-
font-weight: 600;
|
|
3161
|
-
text-transform: uppercase;
|
|
3162
|
-
letter-spacing: 0.02em;
|
|
3163
|
-
color: ${R.gray4};
|
|
3164
|
-
}
|
|
3165
|
-
`,fl=m.div`
|
|
3166
|
-
font-size: 14px;
|
|
3167
|
-
font-weight: 600;
|
|
3168
|
-
text-transform: uppercase;
|
|
3169
|
-
letter-spacing: 0;
|
|
3170
|
-
color: ${R.muted2};
|
|
3171
|
-
`,Cn=m.div`
|
|
3172
|
-
display: flex;
|
|
3173
|
-
align-items: center;
|
|
3174
|
-
gap: 10px;
|
|
3175
|
-
font-weight: 700;
|
|
3176
|
-
color: ${R.softWhite};
|
|
3177
|
-
|
|
3178
|
-
/* Not for sale: "Not for Sale" + an info tooltip, 14px semibold, no PRICE label. */
|
|
3179
|
-
&[data-variant='none'] {
|
|
3180
|
-
display: inline-flex;
|
|
3181
|
-
align-items: center;
|
|
3182
|
-
gap: 6px;
|
|
3183
|
-
font-size: 14px;
|
|
3184
|
-
font-weight: 600;
|
|
3185
|
-
color: ${R.softWhite};
|
|
3186
|
-
}
|
|
3187
|
-
&[data-variant='sale'] {
|
|
3188
|
-
flex-wrap: wrap;
|
|
3189
|
-
gap: 10px 14px;
|
|
3190
|
-
color: ${R.dclRed};
|
|
3191
|
-
}
|
|
3192
|
-
`;m.span`
|
|
3193
|
-
display: flex;
|
|
3194
|
-
align-items: center;
|
|
3195
|
-
gap: 10px;
|
|
3196
|
-
font-weight: 700;
|
|
3197
|
-
color: ${R.dclRed};
|
|
3198
|
-
`;const Un=m.span`
|
|
3199
|
-
font-size: 30px;
|
|
3200
|
-
line-height: 1;
|
|
3201
|
-
`,Rw=m.span`
|
|
3202
|
-
display: inline-flex;
|
|
3203
|
-
color: ${R.muted2};
|
|
3204
|
-
cursor: help;
|
|
3205
|
-
|
|
3206
|
-
&:focus-visible {
|
|
3207
|
-
outline: 2px solid ${R.accent};
|
|
3208
|
-
outline-offset: 2px;
|
|
3209
|
-
border-radius: ${Kt.chip};
|
|
3210
|
-
}
|
|
3211
|
-
`,Nw=m.span`
|
|
3212
|
-
font-size: 24px;
|
|
3213
|
-
font-weight: 700;
|
|
3214
|
-
color: ${R.softWhite};
|
|
3215
|
-
margin-right: -2px;
|
|
3216
|
-
`,Ow=m.div`
|
|
3217
|
-
font-size: 13px;
|
|
3218
|
-
margin-top: 6px;
|
|
3219
|
-
color: ${R.gray4};
|
|
3220
|
-
`,Aw=m.div`
|
|
3221
|
-
flex-basis: 100%;
|
|
3222
|
-
font-size: 13px;
|
|
3223
|
-
font-weight: 600;
|
|
3224
|
-
color: ${R.dclRed};
|
|
3225
|
-
`,Lw=m.span`
|
|
3226
|
-
display: inline-flex;
|
|
3227
|
-
align-items: center;
|
|
3228
|
-
gap: 6px;
|
|
3229
|
-
color: ${R.muted};
|
|
3230
|
-
text-decoration: line-through;
|
|
3231
|
-
font-weight: 600;
|
|
3232
|
-
font-size: 20px;
|
|
3233
|
-
`,Fw=m.span`
|
|
3234
|
-
display: inline-flex;
|
|
3235
|
-
align-items: center;
|
|
3236
|
-
background: ${R.dclRed};
|
|
3237
|
-
color: ${R.white};
|
|
3238
|
-
font-weight: 800;
|
|
3239
|
-
font-size: 13px;
|
|
3240
|
-
letter-spacing: 0.03em;
|
|
3241
|
-
text-transform: uppercase;
|
|
3242
|
-
border-radius: 6px;
|
|
3243
|
-
padding: 4px 10px;
|
|
3244
|
-
`,Yw=m(mu)`
|
|
3245
|
-
display: inline-flex;
|
|
3246
|
-
align-items: center;
|
|
3247
|
-
gap: 5px;
|
|
3248
|
-
background: ${R.rarityBg};
|
|
3249
|
-
color: ${R.accent};
|
|
3250
|
-
font-size: 13px;
|
|
3251
|
-
font-weight: 700;
|
|
3252
|
-
border-radius: 6px;
|
|
3253
|
-
padding: 4px 10px;
|
|
3254
|
-
white-space: nowrap;
|
|
3255
|
-
`,Ww=m.div`
|
|
3256
|
-
display: flex;
|
|
3257
|
-
flex-direction: column;
|
|
3258
|
-
gap: 12px;
|
|
3259
|
-
margin-top: 20px;
|
|
3260
|
-
|
|
3261
|
-
${Me.maxWidth("lg")} {
|
|
3262
|
-
order: 6;
|
|
3263
|
-
|
|
3264
|
-
&[data-buttons] {
|
|
3265
|
-
position: fixed;
|
|
3266
|
-
left: 0;
|
|
3267
|
-
right: 0;
|
|
3268
|
-
bottom: 0;
|
|
3269
|
-
z-index: 40;
|
|
3270
|
-
margin-top: 0;
|
|
3271
|
-
padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
|
|
3272
|
-
background: #2b0e44;
|
|
3273
|
-
box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
|
|
3274
|
-
}
|
|
3275
|
-
&[data-dual] {
|
|
3276
|
-
flex-direction: row;
|
|
3277
|
-
align-items: stretch;
|
|
3278
|
-
gap: 12px;
|
|
3279
|
-
}
|
|
3280
|
-
}
|
|
3281
|
-
`,ga=On`
|
|
3282
|
-
&& {
|
|
3283
|
-
width: 100%;
|
|
3284
|
-
height: 48px;
|
|
3285
|
-
border-radius: 16px;
|
|
3286
|
-
padding: 0 12px;
|
|
3287
|
-
display: flex;
|
|
3288
|
-
align-items: center;
|
|
3289
|
-
justify-content: center;
|
|
3290
|
-
gap: 8px;
|
|
3291
|
-
font-size: 15px;
|
|
3292
|
-
font-weight: 600;
|
|
3293
|
-
line-height: 24px;
|
|
3294
|
-
letter-spacing: 0.46px;
|
|
3295
|
-
text-transform: uppercase;
|
|
3296
|
-
}
|
|
3297
|
-
`,Ja=m(zt)`
|
|
3298
|
-
${ga};
|
|
3299
|
-
/* The design system's primary fill (Figma 867:61063 carries the "BUY Button" gradient), same as the
|
|
3300
|
-
cart's CHECKOUT and the credits CTA. This read as a flat #fb5c19 for a while — that colour was
|
|
3301
|
-
sampled off the flattened render rather than the node's fill. */
|
|
3302
|
-
&& {
|
|
3303
|
-
background: ${pw.buyBtn};
|
|
3304
|
-
}
|
|
3305
|
-
&&::before {
|
|
3306
|
-
content: none;
|
|
3307
|
-
}
|
|
3308
|
-
&&:hover:not(:disabled) {
|
|
3309
|
-
background-image: linear-gradient(${R.dclRed}, ${R.dclRed});
|
|
3310
|
-
}
|
|
3311
|
-
|
|
3312
|
-
${Me.maxWidth("lg")} {
|
|
3313
|
-
[data-dual] && {
|
|
3314
|
-
flex: 1 1 auto;
|
|
3315
|
-
width: auto;
|
|
3316
|
-
}
|
|
3317
|
-
}
|
|
3318
|
-
`,Bw=m(zt)`
|
|
3319
|
-
${ga};
|
|
3320
|
-
&& {
|
|
3321
|
-
background: ${R.blackBtn};
|
|
3322
|
-
color: ${R.softWhite};
|
|
3323
|
-
border: 0;
|
|
3324
|
-
|
|
3325
|
-
.ico {
|
|
3326
|
-
width: 20px;
|
|
3327
|
-
height: 20px;
|
|
3328
|
-
}
|
|
3329
|
-
}
|
|
3330
|
-
&&:hover:not(:disabled) {
|
|
3331
|
-
background: ${R.blackBtn};
|
|
3332
|
-
filter: brightness(1.35);
|
|
3333
|
-
}
|
|
3334
|
-
`,hl=m.button`
|
|
3335
|
-
align-self: center;
|
|
3336
|
-
border: 0;
|
|
3337
|
-
background: none;
|
|
3338
|
-
padding: 8px 0;
|
|
3339
|
-
color: ${u.colors.accent};
|
|
3340
|
-
font-weight: 600;
|
|
3341
|
-
font-size: 13px;
|
|
3342
|
-
line-height: 24px;
|
|
3343
|
-
letter-spacing: 0.46px;
|
|
3344
|
-
text-transform: uppercase;
|
|
3345
|
-
text-decoration: underline;
|
|
3346
|
-
cursor: pointer;
|
|
3347
|
-
|
|
3348
|
-
/* Opt-in for the uses that sit directly on the purple field, where the accent purple above is all
|
|
3349
|
-
but invisible against it. Not a change to the shared colour: the other uses live inside
|
|
3350
|
-
GaslessNotice, whose light fill is what that accent was picked for. */
|
|
3351
|
-
&[data-on-purple] {
|
|
3352
|
-
color: ${u.colors.white};
|
|
3353
|
-
}
|
|
3354
|
-
|
|
3355
|
-
&:disabled {
|
|
3356
|
-
opacity: 0.5;
|
|
3357
|
-
cursor: default;
|
|
3358
|
-
}
|
|
3359
|
-
`,Hw=m(zt)`
|
|
3360
|
-
${ga};
|
|
3361
|
-
&& {
|
|
3362
|
-
background: rgba(255, 255, 255, 0.2);
|
|
3363
|
-
color: ${R.softWhite};
|
|
3364
|
-
border: 0;
|
|
3365
|
-
|
|
3366
|
-
.ico {
|
|
3367
|
-
width: 20px;
|
|
3368
|
-
height: 20px;
|
|
3369
|
-
}
|
|
3370
|
-
}
|
|
3371
|
-
&&:hover:not(:disabled) {
|
|
3372
|
-
background: rgba(255, 255, 255, 0.3);
|
|
3373
|
-
}
|
|
3374
|
-
&&:disabled {
|
|
3375
|
-
opacity: 0.5;
|
|
3376
|
-
}
|
|
3377
|
-
`,ml=m(zt)`
|
|
3378
|
-
${ga};
|
|
3379
|
-
&& {
|
|
3380
|
-
background: rgba(0, 0, 0, 0.4);
|
|
3381
|
-
color: ${R.white};
|
|
3382
|
-
border: 0;
|
|
3383
|
-
}
|
|
3384
|
-
&&:hover:not(:disabled) {
|
|
3385
|
-
background: rgba(0, 0, 0, 0.55);
|
|
3386
|
-
}
|
|
3387
|
-
&&:disabled {
|
|
3388
|
-
opacity: 0.5;
|
|
3389
|
-
}
|
|
3390
|
-
`,Za=m.span`
|
|
3391
|
-
display: none;
|
|
3392
|
-
align-items: center;
|
|
3393
|
-
gap: 6px;
|
|
3394
|
-
|
|
3395
|
-
${Me.maxWidth("lg")} {
|
|
3396
|
-
[data-dual] & {
|
|
3397
|
-
display: inline-flex;
|
|
3398
|
-
}
|
|
3399
|
-
}
|
|
3400
|
-
`,gl=m.button`
|
|
3401
|
-
width: 100%;
|
|
3402
|
-
height: 48px;
|
|
3403
|
-
display: flex;
|
|
3404
|
-
align-items: center;
|
|
3405
|
-
justify-content: center;
|
|
3406
|
-
gap: 8px;
|
|
3407
|
-
/* Dark-theme test: translucent white pill, white label (Figma 867:61064) — same secondary
|
|
3408
|
-
treatment as the card's ADD TO CART. */
|
|
3409
|
-
background: rgba(255, 255, 255, 0.2);
|
|
3410
|
-
color: ${R.softWhite};
|
|
3411
|
-
border: 0;
|
|
3412
|
-
border-radius: 16px;
|
|
3413
|
-
font-weight: 600;
|
|
3414
|
-
font-size: 15px;
|
|
3415
|
-
text-transform: uppercase;
|
|
3416
|
-
letter-spacing: 0.46px;
|
|
3417
|
-
cursor: pointer;
|
|
3418
|
-
transition: background 0.15s ease;
|
|
3419
|
-
|
|
3420
|
-
&:hover:not(:disabled) {
|
|
3421
|
-
background: ${R.softWhite};
|
|
3422
|
-
color: ${R.text2};
|
|
3423
|
-
}
|
|
3424
|
-
&:disabled {
|
|
3425
|
-
background: rgba(255, 255, 255, 0.12);
|
|
3426
|
-
color: rgba(252, 252, 252, 0.7);
|
|
3427
|
-
cursor: default;
|
|
3428
|
-
}
|
|
3429
|
-
|
|
3430
|
-
${Me.maxWidth("lg")} {
|
|
3431
|
-
[data-dual] & {
|
|
3432
|
-
flex: 0 0 auto;
|
|
3433
|
-
width: 56px;
|
|
3434
|
-
padding: 0;
|
|
3435
|
-
}
|
|
3436
|
-
[data-dual] & .ico {
|
|
3437
|
-
margin: 0;
|
|
3438
|
-
}
|
|
3439
|
-
}
|
|
3440
|
-
`,xl=m.span`
|
|
3441
|
-
${Me.maxWidth("lg")} {
|
|
3442
|
-
[data-dual] & {
|
|
3443
|
-
display: none;
|
|
3444
|
-
}
|
|
3445
|
-
}
|
|
3446
|
-
`,zw=m.p`
|
|
3447
|
-
margin: 12px 0 0;
|
|
3448
|
-
font-size: 13px;
|
|
3449
|
-
color: ${R.gray4};
|
|
3450
|
-
|
|
3451
|
-
& a {
|
|
3452
|
-
color: ${R.softWhite};
|
|
3453
|
-
font-weight: 600;
|
|
3454
|
-
}
|
|
3455
|
-
`;m.p`
|
|
3456
|
-
margin: 4px 0 0;
|
|
3457
|
-
font-size: 13px;
|
|
3458
|
-
color: ${R.gray4};
|
|
3459
|
-
|
|
3460
|
-
& a {
|
|
3461
|
-
color: ${R.accent};
|
|
3462
|
-
font-weight: 600;
|
|
3463
|
-
}
|
|
3464
|
-
`;const qw=m.div`
|
|
3465
|
-
max-width: 1721px;
|
|
3466
|
-
margin: 0 auto;
|
|
3467
|
-
min-height: 46vh;
|
|
3468
|
-
display: flex;
|
|
3469
|
-
flex-direction: column;
|
|
3470
|
-
align-items: center;
|
|
3471
|
-
justify-content: center;
|
|
3472
|
-
text-align: center;
|
|
3473
|
-
gap: 14px;
|
|
3474
|
-
color: ${R.softWhite};
|
|
3475
|
-
`,Kw=m.p`
|
|
3476
|
-
margin: 0;
|
|
3477
|
-
color: ${R.gray4};
|
|
3478
|
-
`,Qw=m(zt)`
|
|
3479
|
-
margin-top: 6px;
|
|
3480
|
-
`,Uw=m(X)`
|
|
3481
|
-
opacity: 0.4;
|
|
3482
|
-
`,Vw=m.h1`
|
|
3483
|
-
font-size: 22px;
|
|
3484
|
-
`,Gw=m.div`
|
|
3485
|
-
display: flex;
|
|
3486
|
-
flex-direction: column;
|
|
3487
|
-
`,yl=m.span`
|
|
3488
|
-
display: block;
|
|
3489
|
-
height: 15px;
|
|
3490
|
-
width: 84px;
|
|
3491
|
-
border-radius: 4px;
|
|
3492
|
-
`,Xw=m.div`
|
|
3493
|
-
display: flex;
|
|
3494
|
-
flex-direction: column;
|
|
3495
|
-
align-self: stretch;
|
|
3496
|
-
gap: 16px;
|
|
3497
|
-
padding: 8px 0;
|
|
3498
|
-
`,Jw=m.span`
|
|
3499
|
-
display: inline-flex;
|
|
3500
|
-
align-items: center;
|
|
3501
|
-
height: 48px;
|
|
3502
|
-
gap: 10px;
|
|
3503
|
-
background: none !important;
|
|
3504
|
-
|
|
3505
|
-
&::before,
|
|
3506
|
-
&::after {
|
|
3507
|
-
content: '';
|
|
3508
|
-
display: block;
|
|
3509
|
-
}
|
|
3510
|
-
&::before {
|
|
3511
|
-
width: 40px;
|
|
3512
|
-
height: 40px;
|
|
3513
|
-
border-radius: 50%;
|
|
3514
|
-
background: ${R.media};
|
|
3515
|
-
}
|
|
3516
|
-
&::after {
|
|
3517
|
-
width: 96px;
|
|
3518
|
-
height: 14px;
|
|
3519
|
-
border-radius: 6px;
|
|
3520
|
-
background: ${R.media};
|
|
3521
|
-
}
|
|
3522
|
-
`,Zw=m.span`
|
|
3523
|
-
height: 34px;
|
|
3524
|
-
width: 70%;
|
|
3525
|
-
margin: 3px 0;
|
|
3526
|
-
border-radius: 8px;
|
|
3527
|
-
`,ek=m.div`
|
|
3528
|
-
display: flex;
|
|
3529
|
-
gap: 8px;
|
|
3530
|
-
/* Same as Chips above, so the row does not move when the real chips arrive. */
|
|
3531
|
-
margin-top: 12px;
|
|
3532
|
-
`,eo=m.span`
|
|
3533
|
-
height: 24px;
|
|
3534
|
-
width: 88px;
|
|
3535
|
-
border-radius: 6px;
|
|
3536
|
-
`,to=m.span`
|
|
3537
|
-
height: 14px;
|
|
3538
|
-
width: 100%;
|
|
3539
|
-
border-radius: 6px;
|
|
3540
|
-
|
|
3541
|
-
&[data-short] {
|
|
3542
|
-
width: 55%;
|
|
3543
|
-
}
|
|
3544
|
-
`,tk=m.span`
|
|
3545
|
-
display: block;
|
|
3546
|
-
height: 30px;
|
|
3547
|
-
width: 40%;
|
|
3548
|
-
margin: 16px 0 13px;
|
|
3549
|
-
border-radius: 8px;
|
|
3550
|
-
`,nk=m.span`
|
|
3551
|
-
display: block;
|
|
3552
|
-
height: 42px;
|
|
3553
|
-
width: 100%;
|
|
3554
|
-
border-radius: 8px;
|
|
3555
|
-
margin-top: 20px;
|
|
3556
|
-
`,Vn=m(Be)`
|
|
3557
|
-
width: 30px;
|
|
3558
|
-
height: 30px;
|
|
3559
|
-
color: ${R.softWhite};
|
|
3560
|
-
|
|
3561
|
-
&[data-was] {
|
|
3562
|
-
width: 20px;
|
|
3563
|
-
height: 20px;
|
|
3564
|
-
color: ${R.gray4};
|
|
3565
|
-
}
|
|
3566
|
-
`,no=m(Be)`
|
|
3567
|
-
width: 20px;
|
|
3568
|
-
height: 20px;
|
|
3569
|
-
`,rk=m.div`
|
|
3570
|
-
display: flex;
|
|
3571
|
-
align-items: center;
|
|
3572
|
-
justify-content: space-between;
|
|
3573
|
-
gap: 8px;
|
|
3574
|
-
padding: 8px;
|
|
3575
|
-
margin: 16px 0;
|
|
3576
|
-
border-radius: ${Kt.btn};
|
|
3577
|
-
background: rgba(22, 21, 24, 0.55);
|
|
3578
|
-
`,ak=m.span`
|
|
3579
|
-
display: flex;
|
|
3580
|
-
align-items: center;
|
|
3581
|
-
gap: 8px;
|
|
3582
|
-
font-size: 14px;
|
|
3583
|
-
line-height: 14px;
|
|
3584
|
-
color: ${R.softWhite};
|
|
3585
|
-
`,ok=m(X)`
|
|
3586
|
-
width: 20px;
|
|
3587
|
-
height: 20px;
|
|
3588
|
-
color: ${R.softWhite};
|
|
3589
|
-
`,ik=m(X)`
|
|
3590
|
-
width: 24px;
|
|
3591
|
-
height: 24px;
|
|
3592
|
-
color: ${R.white};
|
|
3593
|
-
`,sk=m.div`
|
|
3594
|
-
display: flex;
|
|
3595
|
-
align-items: center;
|
|
3596
|
-
justify-content: space-between;
|
|
3597
|
-
gap: 8px;
|
|
3598
|
-
width: 100%;
|
|
3599
|
-
margin-top: 16px;
|
|
3600
|
-
|
|
3601
|
-
&[data-centered] {
|
|
3602
|
-
justify-content: center;
|
|
3603
|
-
}
|
|
3604
|
-
`,lk=m.span`
|
|
3605
|
-
display: flex;
|
|
3606
|
-
align-items: center;
|
|
3607
|
-
gap: 2px;
|
|
3608
|
-
font-size: 14px;
|
|
3609
|
-
font-weight: 600;
|
|
3610
|
-
color: ${R.gray4};
|
|
3611
|
-
|
|
3612
|
-
& .ico {
|
|
3613
|
-
width: 20px;
|
|
3614
|
-
height: 20px;
|
|
3615
|
-
color: ${R.gray4};
|
|
3616
|
-
}
|
|
3617
|
-
`,ck=m.span`
|
|
3618
|
-
font-size: 16px;
|
|
3619
|
-
font-weight: 700;
|
|
3620
|
-
padding-left: 2px;
|
|
3621
|
-
`,mo=m.button`
|
|
3622
|
-
border: 0;
|
|
3623
|
-
background: none;
|
|
3624
|
-
padding: 0;
|
|
3625
|
-
cursor: pointer;
|
|
3626
|
-
font-family: ${uw.sans};
|
|
3627
|
-
font-size: 13px;
|
|
3628
|
-
font-weight: 600;
|
|
3629
|
-
letter-spacing: 0.46px;
|
|
3630
|
-
text-transform: uppercase;
|
|
3631
|
-
text-decoration: underline;
|
|
3632
|
-
color: ${R.softWhite};
|
|
3633
|
-
|
|
3634
|
-
&:hover {
|
|
3635
|
-
color: ${R.gray4};
|
|
3636
|
-
}
|
|
3637
|
-
&:focus-visible {
|
|
3638
|
-
outline: 2px solid ${R.white};
|
|
3639
|
-
outline-offset: 2px;
|
|
3640
|
-
border-radius: ${Kt.chip};
|
|
3641
|
-
}
|
|
3642
|
-
`,dk=m(mo)`
|
|
3643
|
-
width: 100%;
|
|
3644
|
-
height: 40px;
|
|
3645
|
-
text-align: center;
|
|
3646
|
-
border-radius: ${Kt.card};
|
|
3647
|
-
|
|
3648
|
-
/* Hover is a translucent fill with the label left alone (Figma 868:67246), not the colour shift
|
|
3649
|
-
ResellersLink uses. That one is an inline link sitting beside a price, where dimming the text is the
|
|
3650
|
-
only surface there is; this is a full-width button, so the button itself is what should react. */
|
|
3651
|
-
&:hover {
|
|
3652
|
-
color: ${R.softWhite};
|
|
3653
|
-
background: ${R.glass};
|
|
3654
|
-
}
|
|
3655
|
-
`,uk=m.div`
|
|
3656
|
-
display: flex;
|
|
3657
|
-
flex-direction: column;
|
|
3658
|
-
gap: 16px;
|
|
3659
|
-
width: 100%;
|
|
3660
|
-
padding: 16px 0;
|
|
3661
|
-
`,bl=m.div`
|
|
3662
|
-
display: flex;
|
|
3663
|
-
align-items: center;
|
|
3664
|
-
justify-content: space-between;
|
|
3665
|
-
gap: 8px;
|
|
3666
|
-
width: 100%;
|
|
3667
|
-
|
|
3668
|
-
&[data-variant='original'] {
|
|
3669
|
-
color: ${R.muted2};
|
|
3670
|
-
}
|
|
3671
|
-
`,vl=m.span`
|
|
3672
|
-
display: flex;
|
|
3673
|
-
align-items: center;
|
|
3674
|
-
gap: 4px;
|
|
3675
|
-
font-size: 14px;
|
|
3676
|
-
font-weight: 600;
|
|
3677
|
-
|
|
3678
|
-
[data-variant='original'] & {
|
|
3679
|
-
color: ${R.muted2};
|
|
3680
|
-
}
|
|
3681
|
-
[data-variant='resale'] & {
|
|
3682
|
-
color: ${R.text};
|
|
3683
|
-
}
|
|
3684
|
-
`,wl=m.span`
|
|
3685
|
-
display: flex;
|
|
3686
|
-
align-items: center;
|
|
3687
|
-
gap: 2px;
|
|
3688
|
-
padding: 0 2px;
|
|
3689
|
-
|
|
3690
|
-
[data-variant='original'] & .ico {
|
|
3691
|
-
width: 20px;
|
|
3692
|
-
height: 20px;
|
|
3693
|
-
color: ${R.muted2};
|
|
3694
|
-
}
|
|
3695
|
-
[data-variant='resale'] & .ico {
|
|
3696
|
-
width: 24px;
|
|
3697
|
-
height: 24px;
|
|
3698
|
-
color: ${R.rarity};
|
|
3699
|
-
}
|
|
3700
|
-
`,kl=m.span`
|
|
3701
|
-
[data-variant='original'] & {
|
|
3702
|
-
font-size: 16px;
|
|
3703
|
-
font-weight: 700;
|
|
3704
|
-
text-decoration: line-through;
|
|
3705
|
-
}
|
|
3706
|
-
[data-variant='resale'] & {
|
|
3707
|
-
font-size: 25px;
|
|
3708
|
-
font-weight: 700;
|
|
3709
|
-
color: ${R.text};
|
|
3710
|
-
}
|
|
3711
|
-
`,pk=m.span`
|
|
3712
|
-
font-size: 14px;
|
|
3713
|
-
font-weight: 600;
|
|
3714
|
-
|
|
3715
|
-
[data-variant='original'] & {
|
|
3716
|
-
color: ${R.muted2};
|
|
3717
|
-
}
|
|
3718
|
-
`,fk=m.span`
|
|
3719
|
-
font-size: 14px;
|
|
3720
|
-
font-weight: 600;
|
|
3721
|
-
color: ${R.text2};
|
|
3722
|
-
`,Dl=m.span`
|
|
3723
|
-
display: inline-flex;
|
|
3724
|
-
width: 12px;
|
|
3725
|
-
height: 12px;
|
|
3726
|
-
color: ${R.muted2};
|
|
3727
|
-
`,hk=m.div`
|
|
3728
|
-
display: flex;
|
|
3729
|
-
flex-direction: column;
|
|
3730
|
-
gap: 12px;
|
|
3731
|
-
width: 100%;
|
|
3732
|
-
`,mk=m.div`
|
|
3733
|
-
display: flex;
|
|
3734
|
-
justify-content: center;
|
|
3735
|
-
`,xa=On`
|
|
3736
|
-
display: block;
|
|
3737
|
-
background: linear-gradient(100deg, var(--skeleton-lo) 30%, var(--skeleton-hi) 50%, var(--skeleton-lo) 70%);
|
|
3738
|
-
background-size: 200% 100%;
|
|
3739
|
-
animation: shimmer 1.4s infinite linear;
|
|
3740
|
-
|
|
3741
|
-
@media (prefers-reduced-motion: reduce) {
|
|
3742
|
-
animation: none;
|
|
3743
|
-
}
|
|
3744
|
-
`,gk=m.div`
|
|
3745
|
-
display: flex;
|
|
3746
|
-
flex-direction: column;
|
|
3747
|
-
gap: 12px;
|
|
3748
|
-
width: 100%;
|
|
3749
|
-
/* Reserve the divider→CTA rhythm so the block is the same height loading vs loaded. */
|
|
3750
|
-
padding-top: 4px;
|
|
3751
|
-
`,xk=m.span`
|
|
3752
|
-
${xa};
|
|
3753
|
-
width: 120px;
|
|
3754
|
-
height: 30px;
|
|
3755
|
-
border-radius: ${Kt.btn};
|
|
3756
|
-
margin-bottom: 4px;
|
|
3757
|
-
`,Cl=m.span`
|
|
3758
|
-
${xa};
|
|
3759
|
-
width: 100%;
|
|
3760
|
-
height: 48px;
|
|
3761
|
-
border-radius: 16px;
|
|
3762
|
-
`,Sl=m.div`
|
|
3763
|
-
display: flex;
|
|
3764
|
-
align-items: center;
|
|
3765
|
-
gap: 12px;
|
|
3766
|
-
`,Ml=m.span`
|
|
3767
|
-
${xa};
|
|
3768
|
-
flex: none;
|
|
3769
|
-
width: 48px;
|
|
3770
|
-
height: 48px;
|
|
3771
|
-
border-radius: 50%;
|
|
3772
|
-
`,_l=m.span`
|
|
3773
|
-
${xa};
|
|
3774
|
-
width: 96px;
|
|
3775
|
-
height: 16px;
|
|
3776
|
-
border-radius: 6px;
|
|
3777
|
-
`;function yk(n){return Object.values(ut.Rarity).includes(n)}function bk(n){return n==="male"?f("itemDetail.genderMale"):n==="female"?f("itemDetail.genderFemale"):n==="unisex"?f("itemDetail.genderUnisex"):null}function Nr(n){return n.wearableCategory?n.wearableCategory.replace(/_/g," "):n.category==="emote"?f("itemDetail.categoryEmote"):f("itemDetail.categoryWearable")}const jl=8;function Xk(){const{pathname:n}=El();return i.jsx(vk,{},n)}function vk(){var fi,hi,mi;const{contractAddress:n,itemId:a,tokenId:t}=_d(),e=Ma(n),r=Gv(e),o=Ma(a),s=Ma(t),l=!!s,c=o??Mh(s)??null,p=El(),d=p.state,h=mn(),x=!!(d!=null&&d.market),y=(d==null?void 0:d.marketPriceCredits)??null,v=gn(),w=er(I=>I.add),k=er(I=>I.items),C=gu(I=>I.toggle),{session:D,signIn:E}=dn(),[g,T]=b.useState(()=>{if(d!=null&&d.item){const I={...d.item,tradeId:d.tradeId??d.item.tradeId};return l?{...I,tokenId:s,itemId:I.itemId??c}:{...I,tokenId:void 0,itemId:o??I.itemId}}return{id:`${e}-${s??o}`,name:"",creator:"",contractAddress:e??"",itemId:c,category:"wearable",rarity:"common",network:"MATIC",chainId:cn.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:s??void 0,tradeId:d==null?void 0:d.tradeId}}),[O,M]=b.useState(!1),[S,P]=b.useState(!!(d!=null&&d.resumeBuy));b.useEffect(()=>{d!=null&&d.resumeBuy&&M(!0)},[d==null?void 0:d.resumeBuy]);function A(){const I=g.priceCredits>0?g.priceCredits:null;fe("Shop Started Checkout",{checkout_source:"item_page",cart_size:1,cart_value_credits:I,cart_value_usd:I===null?null:Ru(I)}),M(!0)}function B(){if(D){A();return}x||Rp({type:"item-buy",path:p.pathname}),E()}const U=b.useRef(!1);b.useEffect(()=>{if(!D||U.current)return;const I=Tp("item-buy");!I||I.path!==p.pathname||(U.current=!0,P(!0),A())},[D]);const V=b.useMemo(()=>g.contractAddress&&(g.itemId??c)?[`${g.contractAddress.toLowerCase()}-${g.itemId??c}`]:void 0,[g.contractAddress,g.itemId,c]),G=xu(jl,{exclude:V}),H=yu({enabled:G.enabled,hasSignal:G.hasSignal,isLoading:G.isLoading,isError:G.isError,personalized:(fi=G.result)==null?void 0:fi.personalized,rowCount:((hi=G.result)==null?void 0:hi.data.length)??0}),{items:N,isCollectionOnly:F,siblings:_,siblingsFetched:re}=Vv({id:g.id,contractAddress:g.contractAddress,itemId:g.itemId??c,tokenId:g.tokenId,creator:g.creator}),{data:z,isLoading:q}=ye({queryKey:["shop-item",g.contractAddress,c],enabled:!x&&!l&&!!g.contractAddress&&!!c,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Ou(g.contractAddress,c)}),Q=l?void 0:z;b.useEffect(()=>{Q&&T(I=>I.tradeId?{...I,tradeId:Q.tradeId,priceCredits:Q.priceCredits,manaWei:Q.manaWei,available:Q.available??I.available,acquisition:Q.acquisition,wearableCategory:I.wearableCategory??Q.wearableCategory}:{...I,...Q})},[Q]);const[De,we]=b.useState(!1),{data:Te=""}=ye({queryKey:["item-desc",g.contractAddress,g.itemId],enabled:!!g.contractAddress&&!!g.itemId,staleTime:5*6e4,queryFn:()=>Au(g.contractAddress,g.itemId)}),{data:ae,isLoading:Ce}=ye({queryKey:["collection-meta",g.contractAddress],enabled:!!g.contractAddress,staleTime:5*6e4,queryFn:()=>Ol(g.contractAddress)});b.useEffect(()=>{const I=(Q==null?void 0:Q.creator)||(ae==null?void 0:ae.creator);I&&T($e=>$e.creator?$e:{...$e,creator:I})},[Q,ae]);const he=b.useMemo(()=>{if(!(l||g.name||Q||_.length===0))return(c?_.find(I=>I.itemId===c):void 0)??_.find(I=>I.contractAddress===g.contractAddress)},[l,g.name,g.contractAddress,Q,_,c]);b.useEffect(()=>{he&&T(I=>({...he,tradeId:I.tradeId??he.tradeId}))},[he]);const{data:Ve,isLoading:_e}=ye({queryKey:["detail-trade",g.id,g.tradeId,g.contractAddress,g.itemId],enabled:!!g.contractAddress,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:async()=>{if(g.tradeId)return g.tradeId;if(!l&&g.itemId){const I=await Lu(g.contractAddress,g.itemId);return(I==null?void 0:I.id)??null}return null}}),{data:le}=ye({queryKey:["item-traits",g.contractAddress,c],enabled:!!g.contractAddress&&!!c,staleTime:5*6e4,retry:1,queryFn:()=>Fu(g.contractAddress,c)}),xt=(le==null?void 0:le.isSmart)??g.isSmart,Et=(le==null?void 0:le.utility)??null,Le=b.useMemo(()=>({...g,wearableCategory:g.wearableCategory??(le==null?void 0:le.wearableCategory)??void 0,gender:g.gender??(le==null?void 0:le.gender)??null}),[g,le==null?void 0:le.wearableCategory,le==null?void 0:le.gender]),Qt=(le==null?void 0:le.urn)??null,{data:ya}=ye({queryKey:["item-vrm",Qt],enabled:!!Qt&&g.category==="wearable",staleTime:30*6e4,retry:!1,queryFn:()=>Yu(Qt)}),[lr,cr]=b.useState(!1),{data:Ln}=ye({queryKey:["item-video",g.contractAddress,c],enabled:xt&&!!g.contractAddress&&!!c,staleTime:30*6e4,retry:!1,queryFn:()=>zp(g.contractAddress,c)}),Ut=b.useMemo(()=>g.emoteLoop!==void 0?g:(c?_.find($e=>$e.itemId===c):void 0)??g,[g,_,c]),qe=Fi(v,g.tradeId)??Fi(v,Ve),yn=g.acquisition==="store"&&(g.available??0)>0,Re=!!qe||yn,yt=bu(),{data:Tt=[]}=ye({queryKey:["item-resales",g.contractAddress,g.itemId],enabled:yt&&!x&&!!g.contractAddress&&!!g.itemId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Wl(g.contractAddress,g.itemId)}),$t=Tt.length>0?Tt[0].priceCredits:null,bt=l&&g.tokenId?Tt.find(I=>I.tokenId===g.tokenId)??null:null,Ge=b.useMemo(()=>{const I=Tt[0];return I?{...I,name:I.name||g.name,thumbnail:I.thumbnail||g.thumbnail,rarity:I.rarity||g.rarity,category:I.category||g.category,wearableCategory:I.wearableCategory??g.wearableCategory,gender:I.gender??g.gender}:null},[Tt,g]),[Fn,dr]=b.useState(null),[ur,Vt]=b.useState(!1),[Yn,pr]=b.useState(!1),[fr,Wn]=b.useState(!1),$=g.manaWei??null,{data:K}=Yl(x||!!$),J=$&&K?vu($,K):null;b.useEffect(()=>{J!=null&&T(I=>I.priceCredits===J?I:{...I,priceCredits:J})},[J,g.priceCredits]);const Z=b.useMemo(()=>{if(!x||!(d!=null&&d.item))return null;const I=d.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},[x,d==null?void 0:d.item]),ce=x&&y!=null&&!!K&&!!Z,Se=wu({priceCredits:g.priceCredits,compareAtCredits:g.compareAtCredits,saleEndsAt:g.saleEndsAt}),ne=Se?ku(g.saleUnitsLeft):null,ke=b.useMemo(()=>({...g,tradeId:qe,id:qe??g.id}),[g,qe]),vt=k.some(I=>I.id===ke.id),Xe=!ke.tokenId,ba=((mi=k.find(I=>I.id===ke.id))==null?void 0:mi.quantity)??0,Rt=Xe&&typeof g.available=="number"&&ba>=g.available,{key:Ro,faved:Gt}=Du(g),Nt=Cu(g),id=Fl(I=>I.locale),hr=Nt===void 0?null:Nt.toLocaleString(id),No=Gt?f("assetCard.removeFromFavorites"):f("assetCard.addToFavorites"),Oo=Nt===void 0?No:f("itemDetail.favoriteAria",{action:No,count:Nt}),Ao=b.useRef(null);b.useEffect(()=>{!g.name||_e||Ao.current===g.id||(Ao.current=g.id,fe("Shop Viewed Item",{...Su(g),for_sale:Re}),Mu(g))},[g.id,g.name,_e,Re]);const mr=`${e}/${s??o}`,Lo=b.useRef(mr);b.useEffect(()=>{if(Lo.current!==mr){if(Lo.current=mr,d!=null&&d.item){const I={...d.item,tradeId:d.tradeId??d.item.tradeId};T(l?{...I,tokenId:s,itemId:I.itemId??c}:{...I,tokenId:void 0,itemId:o??I.itemId})}typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}},[mr]);function sd(){!Re||va||_e||!Xe&&vt||Rt||w(ke,"item_detail")}const bn=yk(g.rarity)?g.rarity:ut.Rarity.COMMON,Fo=bk(Le.gender),gr=_u(Le),Yo=ju(Le.gender),Wo=iw(g.rarity),Bo=sw(Le),ld=Re&&Se,cd=F?f("itemDetail.moreFromCollection"):f("itemDetail.youMightAlsoLike"),va=Iu(g,D==null?void 0:D.address),[dd,Ho]=b.useState(!1),[ud,zo]=b.useState(!1),[pd,qo]=b.useState(!1),[fd,Ko]=b.useState(!1),[Bn,Hn]=b.useState(null),[hd,Qo]=b.useState(!1),[Uo,Vo]=b.useState(!1),Go=na(D==null?void 0:D.providerType),{data:ee,isLoading:xr}=ye({queryKey:["owned-token",g.contractAddress,g.tokenId,D==null?void 0:D.address],enabled:!x&&!!(D!=null&&D.address)&&!!g.contractAddress&&!!g.tokenId,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>D?wi(D.address,g.contractAddress,g.tokenId):null});b.useEffect(()=>{ee&&T(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]),b.useEffect(()=>{bt&&T(I=>I.priceCredits===bt.priceCredits&&I.tradeId?I:{...I,priceCredits:bt.priceCredits,tradeId:I.tradeId??bt.tradeId})},[bt]),b.useEffect(()=>{Bn!=null&&ee!=null&&ee.isOnSale&&ee.listingPrice===Bn&&Hn(null)},[ee,Bn]);const Xo=!x&&!!g.contractAddress&&!!g.tokenId&&!g.name&&!Q&&!xr&&!ee,{data:Pe,isFetched:md}=ye({queryKey:["public-token",g.contractAddress,g.tokenId],enabled:Xo,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:()=>Wu(g.contractAddress,g.tokenId)});b.useEffect(()=>{Pe&&T(I=>I.name?I.issuedId?I:{...I,issuedId:Pe.issuedId}:{id:Pe.id,name:Pe.name,creator:"",contractAddress:Pe.contractAddress,itemId:Pe.itemId,category:Pe.category,rarity:Pe.rarity??"common",network:Pe.network,chainId:Pe.chainId,thumbnail:Pe.image,priceCredits:Pe.listingPrice??0,gender:null,isSmart:!1,tokenId:Pe.tokenId,issuedId:Pe.issuedId,tradeId:Pe.tradeId})},[Pe]);const{data:rt}=ye({queryKey:["publishable-item",g.contractAddress,g.itemId,D==null?void 0:D.address],enabled:va&&!!D&&!!g.itemId,queryFn:async()=>D?(await qp(D.address,D.identity)).find($e=>$e.contractAddress.toLowerCase()===g.contractAddress.toLowerCase()&&$e.blockchainItemId===g.itemId)??null:null}),at=l&&!!ee,wa=!l&&va,ot=!x&&(wa||at),Jo=Bn!=null?!0:at?!!(ee!=null&&ee.isOnSale):Re,yr=at?ee==null?void 0:ee.tradeId:qe,Zo=at?!!ee:!!rt,ei=wa||at&&yt,ka=Bn??(at?(ee==null?void 0:ee.listingPrice)??0:0),{data:ti=0}=ye({queryKey:["owned-item-count",g.contractAddress,o,D==null?void 0:D.address],enabled:!l&&!x&&!!(D!=null&&D.address)&&!!g.contractAddress&&!!o,staleTime:3e4,queryFn:()=>D?Bu(D.address,g.contractAddress,o):0});async function Xt(){await Promise.all([v.invalidateQueries({queryKey:["owned-token",g.contractAddress,g.tokenId]}),v.invalidateQueries({queryKey:["detail-trade"]}),v.invalidateQueries({queryKey:["shop-item"]}),v.invalidateQueries({queryKey:["collection-sale-state"]}),v.invalidateQueries({queryKey:["shop-items"]}),v.invalidateQueries({queryKey:["catalog-items"]}),v.invalidateQueries({queryKey:["publishable-items"]}),v.invalidateQueries({queryKey:["publishable-item",g.contractAddress,g.itemId]}),v.invalidateQueries({queryKey:["item-resales",g.contractAddress,g.itemId]})])}async function gd(I){if(!D||!yr)throw new Error("No listing to take down");const $e=await Ll(yr);await Hp({trade:$e,signer:D.signer,mode:I.payGas?"direct":"gasless-only",watch:{isCancelled:async()=>{try{if(at){if(!g.tokenId)return!1;const it=await wi(D.address,g.contractAddress,g.tokenId);return it!==null&&!it.isOnSale}return g.itemId?await Nu(g.contractAddress,g.itemId)===null:!1}catch{return!1}},onWaiting:I.onWaiting}}),I.silent||ar.success(f("myAssets.removedFromSale",{name:g.name})),Hn(null),_h(v,yr),T(it=>it.tradeId===yr?{...it,tradeId:void 0}:it),Xt(),Pa(v,{address:D.address,contractAddress:g.contractAddress,tokenId:g.tokenId},{kind:"removed"})}const ni=I=>async({payGas:$e,onWaiting:it})=>{try{return await gd({silent:I,payGas:$e,onWaiting:it}),"ok"}catch(Da){if(Da instanceof Bp)return Da.definitive?"relay-reverted":"relay-pending";throw Da}},ri={currentCredits:ka||g.priceCredits||void 0,canPayGas:Go,cancelCurrent:ni(!0)};function ai({edit:I=!1}={}){I||fe("Shop Started Listing",{listing_type:at?"secondary":"primary",item_id:g.itemId??g.tokenId??null}),Vo(I),at?Ho(!0):zo(!0)}function oi(){Ho(!1),zo(!1),Vo(!1),Xt()}const ii=Re?_e?f("itemDetail.checking"):Rt?f("itemDetail.maxInCart"):!Xe&&vt?f("assetCard.inCart"):f("assetCard.addToCart"):f("itemDetail.notForSale"),br=g.available??(le==null?void 0:le.available)??null,xd=typeof br=="number"&&br>0&&!g.tokenId&&!x,si=!x&&!g.tokenId&&br===0,li=g.network==="ETHEREUM",vn=si&&!ot&&!!Ge,vr=!!Ge&&k.some(I=>I.id===Ge.id),yd=!ot&&Re&&!x,bd=x||!ot&&(Re||vn&&!!Ge||Jc()),vd=!g.name&&(!!Q||!!ee||!!Pe||!!he),ci=q||!!g.contractAddress&&!re||!g.name&&xr||vd||Xo&&!md,di=!g.name&&!ci,wd=!!g.name&&jh({isMarket:x,forSale:Re,priceKnown:g.priceCredits>0&&(!$||J!=null)||ot,stillResolving:ci||!!$&&J==null,manage:ot,soldOutWithResale:vn,resolvingTrade:_e,isTokenRoute:l,ownedAssetLoading:xr,deepLinkLoading:q}),ui=!g.creator&&(q||Ce||xr),pi=!(ae!=null&&ae.name)&&Ce,kd=/^https?:\/\//i.test(g.thumbnail);return Pu(di?{title:f("seo.item.notFoundTitle"),noindex:!0}:g.name?{title:g.name,description:Te||f("seo.item.fallbackDescription",{name:g.name,rarity:g.rarity,category:Nr(Le),creator:go(g.creator)}),image:kd?g.thumbnail:void 0,type:"product"}:{}),di?i.jsxs(qw,{"data-notfound":!0,children:[i.jsx(Uw,{name:"cart"}),i.jsx(Vw,{children:f("itemDetail.notAvailableTitle")}),i.jsx(Kw,{children:f("itemDetail.notAvailableBody")}),i.jsx(Qw,{variant:"white",onClick:()=>h("/items"),children:f("notFound.cta")})]}):i.jsxs(fw,{children:[i.jsxs(hw,{"aria-label":f("itemDetail.breadcrumbAria"),children:[i.jsx(mw,{onClick:()=>h("/items"),children:f("nav.collectibles")}),i.jsx(gw,{children:"/"}),i.jsx(xw,{children:g.name||f("itemDetail.itemFallback")})]}),i.jsxs(yw,{style:{"--glow-rgb":Tu(bn),"--glow-core":Eu(bn)},children:[i.jsxs(bw,{"data-testid":"item-preview",children:[g.name?i.jsx(n0,{item:g}):i.jsx(vw,{"aria-busy":"true","aria-label":f("itemPreview.loading"),children:i.jsx(ww,{className:"skeleton","aria-hidden":!0})}),Ro?i.jsxs(ll,{"data-fav-preview":!0,"data-on":Gt||void 0,"data-count":hr??void 0,onClick:()=>C(g,"item_detail"),"aria-pressed":Gt,"aria-label":Oo,children:[i.jsx(X,{name:Gt?"heart-solid":"heart",size:18}),Nt!==void 0?i.jsx(cl,{title:f("itemDetail.savedCount",{count:Nt}),"data-testid":"fav-count-preview",children:hr}):null]}):null,Ln?i.jsxs(Sw,{"data-play-showcase":!0,onClick:()=>cr(!0),"data-testid":"play-showcase",children:[i.jsx(X,{name:"play",size:18}),f("itemDetail.playShowcase")]}):null]}),i.jsx(kw,{"data-testid":"item-info",children:g.name?i.jsxs(i.Fragment,{children:[i.jsxs(Dw,{children:[i.jsxs(Cw,{children:[g.name,l&&g.issuedId?` #${g.issuedId}`:""]}),Ro?i.jsxs(ll,{"data-fav-title":!0,"data-on":Gt||void 0,"data-count":hr??void 0,onClick:()=>C(g,"item_detail"),"aria-pressed":Gt,"aria-label":Oo,children:[i.jsx(X,{name:Gt?"heart-solid":"heart",size:18}),Nt!==void 0?i.jsx(cl,{title:f("itemDetail.savedCount",{count:Nt}),"data-testid":"fav-count",children:hr}):null]}):null]}),i.jsxs(Mw,{children:[Wo?i.jsx(Cr,{content:bi(g.rarity),children:i.jsx(Rr,{to:Wo,"data-variant":"rarity","data-testid":"detail-rarity-link",style:{background:yi(bn)},children:g.rarity})}):i.jsx(Cr,{content:bi(g.rarity),children:i.jsx(st,{"data-variant":"rarity",style:{background:yi(bn)},children:g.rarity})}),Bo?i.jsxs(Rr,{to:Bo,"data-testid":"detail-category-link",title:f("filter.browseByCategory",{category:Nr(Le)}),children:[gr?i.jsx(X,{name:gr,size:18}):null,Nr(Le)]}):i.jsxs(st,{children:[gr?i.jsx(X,{name:gr,size:18}):null,Nr(Le)]}),Fo?i.jsxs(st,{children:[Yo?i.jsx(X,{name:Yo,size:18}):null,Fo]}):null,!l&&g.issuedId?i.jsxs(st,{"data-testid":"detail-issued",children:["#",g.issuedId]}):null,r?i.jsxs(Rr,{to:"/event","data-testid":"detail-event",title:r,children:[i.jsx(X,{name:"star-rounded",size:18}),r]}):null,xt?i.jsxs(Rr,{to:lw(),"data-testid":"detail-smart",title:f("filter.browseBySmart"),children:[i.jsx(X,{name:"smart",size:18}),f("itemDetail.smart")]}):null,Ut.emoteLoop!==void 0?i.jsxs(st,{"data-testid":"detail-play-mode",children:[i.jsx(X,{name:Ut.emoteLoop?"play-loop":"play-once",size:18}),Ut.emoteLoop?f("itemDetail.playLoop"):f("itemDetail.playOnce")]}):null,Ut.emoteHasSound?i.jsxs(st,{"data-testid":"detail-sound",children:[i.jsx(X,{name:"sound",size:18}),f("itemDetail.emoteSound")]}):null,Ut.emoteHasProps?i.jsxs(st,{"data-testid":"detail-props",children:[i.jsx(X,{name:"props",size:18}),f("itemDetail.emoteProps")]}):null,ya?i.jsx(Cr,{content:f("itemDetail.exportBlockedTooltip"),children:i.jsxs(st,{"data-variant":"blocked","data-testid":"detail-export-blocked",tabIndex:0,"aria-label":f("itemDetail.exportBlockedTooltip"),children:[i.jsx(X,{name:"ban",size:16}),f("itemDetail.exportBlocked")]})}):null,Et?i.jsxs(st,{"data-testid":"detail-utility-chip",children:[i.jsx(X,{name:"utility",size:18}),f("itemDetail.utility")]}):null]}),Te||Et?i.jsxs(nd,{children:[Te?i.jsx(ho,{children:i.jsxs(fo,{children:[i.jsx(Dn,{children:f("itemDetail.description")}),i.jsx(dl,{"data-expanded":De||void 0,children:Te}),Te.length>140?i.jsx(jw,{className:"link",onClick:()=>we(I=>!I),children:De?f("itemDetail.showLess"):f("itemDetail.readMore")}):null]})}):null,Et?i.jsx(ho,{children:i.jsxs(fo,{"data-testid":"detail-utility",children:[i.jsx(Dn,{children:f("itemDetail.utility")}),i.jsx(dl,{"data-expanded":!0,children:Et})]})}):null]}):null,!li&&(g.creator||ui)||ae!=null&&ae.name||pi?i.jsxs(rd,{children:[li?null:g.creator?i.jsxs(Jn,{children:[i.jsx(Dn,{children:f("itemDetail.creator")}),i.jsx(Iw,{address:g.creator,linkToProfile:!0,hidePrefix:!0})]}):ui?i.jsxs(Jn,{children:[i.jsx(Dn,{children:f("itemDetail.creator")}),i.jsxs(Sl,{"aria-hidden":!0,"data-testid":"creator-loading",children:[i.jsx(Ml,{}),i.jsx(_l,{})]})]}):null,ae!=null&&ae.name?i.jsxs(Jn,{"data-collection":!0,children:[i.jsx(Dn,{children:f("itemDetail.collection")}),i.jsx(Pw,{contractAddress:g.contractAddress,name:ae.name,items:_})]}):pi?i.jsxs(Jn,{"data-collection":!0,children:[i.jsx(Dn,{children:f("itemDetail.collection")}),i.jsxs(Sl,{"aria-hidden":!0,"data-testid":"collection-loading",children:[i.jsx(Ml,{}),i.jsx(_l,{})]})]}):null]}):null,i.jsx(od,{}),wd?i.jsxs(gk,{"aria-hidden":!0,"data-testid":"sale-loading",children:[i.jsx(xk,{}),i.jsx(Cl,{}),i.jsx(Cl,{})]}):i.jsxs(i.Fragment,{children:[yt&&!ot&&!x&&Re&&!g.tokenId?i.jsxs(rk,{"data-testid":"buy-from-creator",children:[i.jsxs(ak,{children:[i.jsx(ok,{name:"buy-from-creator"}),f("itemDetail.buyFromCreator")]}),i.jsx(ik,{name:"check-rounded"})]}):null,vn?i.jsxs(uk,{"data-testid":"sold-out",children:[i.jsxs(bl,{"data-variant":"original",children:[i.jsxs(vl,{children:[f("itemDetail.originalPrice"),i.jsxs(wl,{children:[i.jsx(Be,{className:"ico"}),i.jsx(kl,{children:i.jsx(Fe,{credits:g.priceCredits})})]}),i.jsx(Dl,{"aria-hidden":!0,children:i.jsx(X,{name:"info",size:12})})]}),i.jsx(pk,{"data-testid":"out-of-stock",children:f("itemDetail.soldOut")})]}),i.jsxs(bl,{"data-variant":"resale",children:[i.jsxs(vl,{children:[f("itemDetail.resalePrice"),i.jsxs(wl,{children:[i.jsx(Be,{className:"ico"}),i.jsx(kl,{children:i.jsx(Fe,{credits:$t})})]}),i.jsx(Dl,{"aria-hidden":!0,children:i.jsx(X,{name:"info",size:12})})]}),i.jsxs(fk,{children:[f("itemDetail.stock")," ",Tt.length,"/",ut.Rarity.getMaxSupply(bn).toLocaleString()]})]})]}):i.jsx(Ew,{children:i.jsxs(Tw,{children:[i.jsxs($w,{children:[x||Re?i.jsx(fl,{children:f("itemDetail.price")}):null,x?i.jsxs(i.Fragment,{children:[i.jsx(Cn,{"data-variant":"market","data-testid":"item-price",children:y==null?i.jsx(Un,{children:"—"}):i.jsxs(i.Fragment,{children:[i.jsx(Nw,{"aria-hidden":!0,children:"≈"}),i.jsx(Vn,{}),i.jsx(Un,{children:i.jsx(Fe,{credits:y})})]})}),i.jsx(Ow,{children:f("assetCard.marketPrice")})]}):Re?ld?i.jsxs(Cn,{"data-variant":"sale","data-testid":"item-price",children:[i.jsxs(Cn,{children:[i.jsx(Vn,{}),i.jsx(Un,{children:i.jsx(Fe,{credits:g.priceCredits})})]}),i.jsxs(Lw,{"data-testid":"detail-price-was",children:[i.jsx(Vn,{"data-was":!0}),i.jsx(Fe,{credits:g.compareAtCredits})]}),vi(g.compareAtCredits,g.priceCredits)>0?i.jsx(Fw,{"data-testid":"detail-sale-badge",children:f("assetCard.saleWithDiscount",{pct:vi(g.compareAtCredits,g.priceCredits)})}):null,i.jsx(Yw,{until:g.saleEndsAt}),ne!=null?i.jsx(Aw,{"data-testid":"detail-units-left",children:f("assetCard.unitsLeftAtThisPrice",{count:ne})}):null]}):i.jsxs(Cn,{"data-testid":"item-price",children:[i.jsx(Vn,{}),i.jsx(Un,{children:i.jsx(Fe,{credits:g.priceCredits})})]}):Jo&&ka?i.jsxs(Cn,{"data-testid":"item-price",children:[i.jsx(Vn,{}),i.jsx(Un,{children:i.jsx(Fe,{credits:ka})})]}):ot?null:i.jsxs(Cn,{"data-variant":"none","data-testid":"item-price",children:[i.jsx("span",{children:f("itemDetail.notForSale")}),i.jsx(Cr,{content:f("itemDetail.notForSaleHint"),children:i.jsx(Rw,{tabIndex:0,role:"img","aria-label":f("itemDetail.notForSaleHint"),children:i.jsx(X,{name:"info",size:14})})})]})]}),xd?i.jsxs(ul,{children:[i.jsx(fl,{children:f("itemDetail.stock")}),i.jsxs(pl,{children:[(br??0).toLocaleString(),"/",ut.Rarity.getMaxSupply(bn).toLocaleString()]})]}):si?i.jsx(ul,{children:i.jsx(pl,{"data-out":!0,"data-testid":"out-of-stock",children:f("itemDetail.outOfStock")})}):null]})}),i.jsx(Ww,{"data-buttons":bd||void 0,"data-dual":yd||void 0,children:x?i.jsxs(Ja,{variant:"purple",onClick:B,disabled:!ce,children:[i.jsx("span",{children:f("assetCard.buyNow")}),y!=null?i.jsxs(Za,{"aria-hidden":!0,children:[i.jsx(no,{}),i.jsx(Fe,{credits:y})]}):null]}):ot?i.jsxs(hk,{"data-testid":"manage-actions",children:[Jo?i.jsxs(i.Fragment,{children:[ei?i.jsxs(Hw,{onClick:()=>ai({edit:!0}),disabled:!Zo,"data-testid":"edit-price",children:[i.jsx(X,{name:"pen",className:"ico"}),i.jsx("span",{children:f("itemDetail.manageUpdatePrice")})]}):null,i.jsx(ml,{onClick:()=>Qo(!0),"data-testid":"remove-listing",children:i.jsx("span",{children:f("itemDetail.manageRemove")})})]}):i.jsxs(i.Fragment,{children:[ei?i.jsx(Bw,{onClick:()=>ai(),disabled:!Zo,children:i.jsx("span",{children:f("itemDetail.manageList")})}):null,at?i.jsxs(i.Fragment,{children:[i.jsx(ml,{onClick:()=>qo(!0),children:i.jsx("span",{children:f("itemDetail.manageTransfer")})}),i.jsx(hl,{type:"button","data-on-purple":!0,"data-testid":"resell-item",onClick:()=>pr(!0),children:f("itemDetail.manageResell")})]}):null]}),wa&&rt?i.jsx(hl,{type:"button","data-on-purple":!0,onClick:()=>Ko(!0),children:f("itemDetail.manageIssue")}):null,$t!=null?i.jsx(mk,{children:i.jsx(mo,{onClick:()=>Vt(!0),"data-testid":"view-resellers",children:f("itemDetail.viewAllResellers")})}):null]}):Re?i.jsxs(i.Fragment,{children:[i.jsxs(Ja,{variant:"purple",onClick:B,disabled:_e,children:[i.jsx("span",{children:f("assetCard.buyNow")}),i.jsxs(Za,{"aria-hidden":!0,children:[i.jsx(no,{}),i.jsx(Fe,{credits:g.priceCredits})]})]}),i.jsxs(gl,{onClick:sd,disabled:_e||(Xe?Rt:vt),"aria-label":ii,children:[i.jsx(X,{name:"cart"}),i.jsx(xl,{children:ii})]})]}):vn&&Ge?i.jsxs(i.Fragment,{children:[i.jsxs(Ja,{variant:"purple",onClick:()=>D?dr(Ge):E(),children:[i.jsx("span",{children:f("assetCard.buyNow")}),i.jsxs(Za,{"aria-hidden":!0,children:[i.jsx(no,{}),i.jsx(Fe,{credits:Ge.priceCredits})]})]}),i.jsxs(gl,{onClick:()=>{vr||w(Ge,"item_detail")},disabled:vr,"aria-label":vr?f("assetCard.inCart"):f("assetCard.addToCart"),children:[i.jsx(X,{name:"cart"}),i.jsx(xl,{children:vr?f("assetCard.inCart"):f("assetCard.addToCart")})]})]}):i.jsxs(i.Fragment,{children:[i.jsx(aw,{item:g}),g.itemId?i.jsx(dk,{onClick:()=>{fe("Shop Clicked Buy Resale",{item_id:g.itemId,contract_address:g.contractAddress,has_shop_resale:!!Ge}),Wn(!0)},"data-testid":"buy-resale","aria-haspopup":"dialog",children:f("itemDetail.buyResale")}):null]})}),!ot&&!x&&$t!=null?i.jsxs(sk,{"data-testid":"lowest-price","data-centered":vn||void 0,children:[vn?null:i.jsxs(lk,{children:[f("itemDetail.lowestPrice"),i.jsx(Be,{className:"ico"}),i.jsx(ck,{children:i.jsx(Fe,{credits:$t})})]}),i.jsx(mo,{onClick:()=>Vt(!0),"data-testid":"view-resellers",children:f("itemDetail.viewAllResellers")})]}):null,!ot&&!x&&ti>0?i.jsxs(zw,{"data-testid":"you-own-note",children:[f("itemDetail.youOwnN",{count:ti})," ",i.jsx(Pl,{to:"/my-items",children:f("nav.myAssets")})]}):null]})]}):i.jsx(wk,{})})]}),i.jsx($u,{exclude:V,title:f("itemDetail.becauseYouOwn"),surface:"pdp",first:jl}),H!==null&&i.jsx($p,{title:cd,items:N,onViewAll:F&&g.contractAddress?()=>h(`/collection/${g.contractAddress}`):void 0}),O&&x&&Z&&K?i.jsx(Kc,{listing:Z,rate:K,onClose:()=>M(!1),onSold:()=>M(!1)}):O&&!x?i.jsx(io,{item:ke,resume:S,onClose:()=>{M(!1),P(!1)}}):null,Fn?i.jsx(io,{item:Fn,onClose:()=>{dr(null),Xt()}}):null,yt&&ur&&g.itemId?i.jsx(E0,{item:g,onClose:()=>Vt(!1)}):null,Yn&&s?i.jsx(al,{contractAddress:e??"",tokenId:s,onClose:()=>pr(!1)}):null,fr&&g.itemId&&e?i.jsx(al,{variant:"buy",contractAddress:e,itemId:g.itemId,onClose:()=>Wn(!1)}):null,dd&&ee&&D?i.jsx(ob,{asset:ee,session:D,creator:g.creator,edit:Uo?ri:void 0,onListed:(I,$e)=>{Hn(I),Xt(),Pa(v,{address:D.address,contractAddress:g.contractAddress,tokenId:g.tokenId},{kind:"listed",priceCredits:I,tradeId:$e})},onClose:oi}):null,hd&&D?i.jsx(_b,{name:g.name,managed:oa(D),canPayGas:Go,cancel:ni(!1),onClose:()=>Qo(!1)}):null,pd&&D&&g.tokenId?i.jsx(Cb,{item:{contractAddress:g.contractAddress,chainId:g.chainId,tokenId:g.tokenId,name:g.name,thumbnail:g.thumbnail},session:D,onClose:()=>{qo(!1),Xt()},onTransferred:()=>{Hn(null),Xt(),Pa(v,{address:D.address,contractAddress:g.contractAddress,tokenId:g.tokenId},{kind:"gone"})}}):null,ud&&rt&&D?i.jsx(Vb,{item:rt,session:D,edit:Uo?ri:void 0,onListed:(I,$e)=>{Hn(I),T(it=>({...it,tradeId:$e}))},onClose:oi}):null,fd&&rt&&D?i.jsx(Dv,{item:{contractAddress:rt.contractAddress,chainId:cn.chainId,itemId:rt.blockchainItemId,name:rt.name,thumbnail:rt.thumbnail,available:rt.remainingSupply},session:D,onClose:()=>{Ko(!1),Xt()}}):null,lr&&Ln?i.jsx(Pv,{src:Ln,itemName:g.name,onClose:()=>cr(!1)}):null]})}function wk(){return i.jsxs(Gw,{"aria-hidden":!0,children:[i.jsx(Zw,{className:"skeleton"}),i.jsxs(ek,{children:[i.jsx(eo,{className:"skeleton"}),i.jsx(eo,{className:"skeleton"}),i.jsx(eo,{className:"skeleton"})]}),i.jsx(nd,{children:[0,1].map(n=>i.jsx(ho,{children:i.jsxs(fo,{children:[i.jsx(yl,{className:"skeleton"}),i.jsxs(Xw,{children:[i.jsx(to,{className:"skeleton"}),i.jsx(to,{className:"skeleton"}),i.jsx(to,{className:"skeleton","data-short":!0})]})]})},n))}),i.jsx(rd,{children:[0,1].map(n=>i.jsxs(Jn,{...n===1?{"data-collection":!0}:{},children:[i.jsx(yl,{className:"skeleton"}),i.jsx(Jw,{})]},n))}),i.jsx(od,{}),i.jsx(tk,{className:"skeleton"}),i.jsx(nk,{className:"skeleton"})]})}export{vk as ItemDetail,Xk as ItemDetailRoute,vk as default};
|
|
3778
|
-
//# sourceMappingURL=ItemDetail-O0E45P4x.js.map
|