const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AboutCompany-AlPLsdQe.js","assets/vendor-react-Br0ZiotI.js","assets/Footer-VHIhVauB.js","assets/SiteFooter-CJ3BLn-3.js","assets/vendor-dayjs-BcsA502E.js","assets/vendor-i18n-C54Hc0CQ.js","assets/mail-_A6AzEM-.js","assets/globe-SYiMVozm.js","assets/vendor-query-9i1Av1pr.js","assets/vendor-antd-core-CbYNMZQB.js","assets/vendor-sentry-Cx26FE6p.js","assets/AboutCompany-aQ2m6ATR.css","assets/ContactsPage-CScl0iTu.js","assets/ContactsPage-B4ouK7NB.css","assets/Blog-BlNXZpxp.js","assets/Blog.module-BNvRm1p-.js","assets/Blog-_I2C7WkB.css","assets/formApi-D1xENmSy.js","assets/Blog-DC2YOgNy.css","assets/FAQPage-DipjWvEu.js","assets/FAQPage-DZLCl4ZW.css","assets/MainPage-CZ34bfkF.js","assets/MainPage-D6XRQa-C.css","assets/MultiModal-BiYc4wZi.js","assets/MultiModal-CjC5AClj.css","assets/routePairApi-mM6by2Lg.js","assets/MarketingHomePage-D3yDpGVH.js","assets/homeCityI18n-D4DZCNWK.js","assets/MarketingShell-byMgDd8J.js","assets/zap-Ca_NrEyM.js","assets/shield-check-BRHQZ8CY.js","assets/users-sM9inbI_.js","assets/file-text-s7xBL7vU.js","assets/building-2-pC_rkZnQ.js","assets/city-autocomplete-BuE2e1o0.js","assets/calculator-2QuttXTN.js","assets/transliteration-kemtKToW.js","assets/calculator-onboarding-CicKmLxc.js","assets/package-search-CxgA1hMB.js","assets/calendar-days-BFCIu-wG.js","assets/boxes-DQp68tuW.js","assets/train-front-CyXhz1w7.js","assets/utensils-crossed-rs0lWx1b.js","assets/wrench-BYT8ADtu.js","assets/hard-hat-D_cy8sHn.js","assets/eye-DA7cXy01.js","assets/circle-check-D4N6yZfF.js","assets/shield-8sDW6zP8.js","assets/sparkles-qoi-G1ss.js","assets/publicReviewsApi-BcndJK2W.js","assets/quote-CnaXgwNC.js","assets/chevron-left-BscW2mLp.js","assets/star-CIEOomZl.js","assets/lock-Cr0Z4zoi.js","assets/award-Bwr7Woj8.js","assets/earth-hdo1-rlL.js","assets/server-BPxy-Ilh.js","assets/package-check-CBvnVLxE.js","assets/MarketingCalculatorPage-DO9jkt3s.js","assets/CalculatorForm-v1Gcuy_0.js","assets/DeferUntilVisible-COLfLfbL.js","assets/skeleton-DFMLqn_S.js","assets/MarketingCustomsCalculatorPage-C0PQQ0in.js","assets/customsApi-CN-LK0wU.js","assets/wallet-DN0jnUIa.js","assets/triangle-alert-DUvxE06r.js","assets/sliders-horizontal-DQYU5OGu.js","assets/minus-hUAbIcy7.js","assets/arrow-up-right-B1IJmGri.js","assets/file-search-BL1y-DgL.js","assets/shield-alert-C0bOSYs0.js","assets/arrow-left-B8ORbrrc.js","assets/MarketingSearchResultsPage-N0YEUgKT.js","assets/transitTime-Bha2FHiQ.js","assets/internationalAuto-D7izpUVe.js","assets/rotate-ccw-9AgQ4N3f.js","assets/incoterms-DvFAAZNy.js","assets/MarketingOrderModal-R4TB55dt.js","assets/external-link-Di6HgJy9.js","assets/schemas-B-PsaFx0.js","assets/contractGateApi-CF2sdhi0.js","assets/types-GoETYW_Q.js","assets/applicationsApi-7Z4dytcr.js","assets/circle-alert-D9N5OCZ7.js","assets/upload-B4t7wfzc.js","assets/calendar-clock-DbnAmrBt.js","assets/layout-grid-BrREZFSB.js","assets/calendar-s2jUsvj_.js","assets/copy-bGIf115k.js","assets/search-x-DePfEUmz.js","assets/MarketingOrderDetailsPage-BRlNwHSN.js","assets/savedCalculationsApi-Byy7lDba.js","assets/snapshotsApi-CZeEW3S3.js","assets/OrderConditionsSection-B2MwYZqM.js","assets/timer-AijOShUW.js","assets/anchor-DwfOvo95.js","assets/package-open-BTHz7Br6.js","assets/scheduleLookupApi-vvNXL904.js","assets/companyProfileApi-dRkDV2_P.js","assets/crossSellApi-CXFgSh6I.js","assets/plus-D_07uQRk.js","assets/pencil-CBjA75Zs.js","assets/shopping-bag-CcO243U0.js","assets/user-a3hBw9K8.js","assets/clock-3-bWYRYJti.js","assets/share-2-CKmi8EHT.js","assets/message-circle-CCatg1Ug.js","assets/message-square-BwPEMauD.js","assets/download-WcmBmPFH.js","assets/MarketingSnapshotViewPage-Cp8VBd4C.js","assets/applicationOfferApi-DOOOkvjQ.js","assets/MarketingMailingViewPage-qysPAH-S.js","assets/inbox-CRt6-tEg.js","assets/MarketingTrackingPage-BmTlXMVM.js","assets/publicTrackingApi-Bim-_YGq.js","assets/map-BMJfoQFy.js","assets/MarketingForgotPasswordPage-CzECGnFj.js","assets/MarketingSettingsPage-BQwHAN7l.js","assets/save-D1qJJzaI.js","assets/sessionsApi-BcQwfFx3.js","assets/key-round-BeFSf8IF.js","assets/monitor-aFv2etA2.js","assets/contactBookApi-BqOyd_Nk.js","assets/badge-check-CFGoNgeJ.js","assets/trash-2-DLUXNcRN.js","assets/key-BFGM8423.js","assets/MarketingOrdersPage-D5BR-FuN.js","assets/data-table-D8NilqrF.js","assets/feature-gate-BvcNW42b.js","assets/csvExport-DM0kDtQb.js","assets/arrow-up-down-rPgp_RCR.js","assets/repeat-CFt6wi5M.js","assets/MarketingMailingsArchivePage-BPUEqrAt.js","assets/mailingsArchiveApi-DdPfsPBh.js","assets/MarketingRouteSubscriptionsPage-D0vRWCmH.js","assets/date-picker-C7jKFkCD.js","assets/routeSubscriptionsApi-GFGWdRcH.js","assets/MarketingNotificationsInboxPage-BQu7Kg07.js","assets/NotificationInboxCard-xbFo56Gc.js","assets/bell-off-Co86z8uk.js","assets/MarketingExchangeAboutPage-DalyP_W5.js","assets/megaphone-CEwrfYpu.js","assets/route-CEPlonEg.js","assets/hammer-BMag27CK.js","assets/MarketingExchangeListPage-CRLbBi0L.js","assets/MarketingExchangeCreatePage-BWVuuPAb.js","assets/MarketingExchangeDetailPage-DYVEUN-m.js","assets/MarketingExchangeManagePage-BPTJOQad.js","assets/circle-x-CTOl6V1J.js","assets/trophy-DgaNifBB.js","assets/MarketingBidEditPage-BbMMbr3p.js","assets/MarketingExchangeChatPage-Dfa2JSAL.js","assets/MarketingCounterOffersPage-BESepJ-F.js","assets/trending-down-Dn6_yqoj.js","assets/MarketingBidAttachmentsPage-BjevGwBT.js","assets/paperclip-Jh2jwPnj.js","assets/MarketingExchangeWatchListPage-BSkXshMA.js","assets/MarketingExchangeClonePage-CtcKN6N2.js","assets/MarketingSupplierPortalPage-k6bmiU_2.js","assets/dollar-sign-Bjr76R9i.js","assets/MarketingSupplierAuctionsPage-B38Tsxbn.js","assets/MarketingSupplierMyBidsPage-C8OzS26e.js","assets/MarketingSupplierReputationPage-xrQG6dLg.js","assets/MarketingAdminExchangeStatsPage-BnFGp58x.js","assets/MarketingAdminChatModerationPage-BOHE4fT6.js","assets/MarketingAdminRequestAuditPage-CsR34M7-.js","assets/MarketingAdminOverviewPage-DMN3Djhx.js","assets/adminApi-opa8MIKk.js","assets/adminDashboardApi-Bqj5tJFL.js","assets/trending-up-FBQY28gu.js","assets/MarketingExchangePublicStatsPage-L6B5b5vB.js","assets/MarketingPreviewTourPage-DuIQXZQ6.js","assets/CookieConsentBanner-CpTKrIAX.js","assets/chart-no-axes-column-NppO3vuI.js","assets/AuthForm-BxKHx2RB.js","assets/SearchResultsPage-58iPEMFQ.js","assets/errorMessage-DJ5LJGxn.js","assets/DownloadOutlined-D2xEwupE.js","assets/PlusOutlined-BhQCgrhy.js","assets/index-D7ET9a57.js","assets/SearchResultsPage-Bq4pFq6i.css","assets/SendOutlined-BXOKiQHv.js","assets/index-BkBV9oYh.js","assets/index-7VrM2tlV.js","assets/index-B6oj4Bcm.js","assets/index-C57jOlLu.js","assets/ReloadOutlined-X4W3UhI6.js","assets/index-BWBn4NZd.js","assets/AuthForm-CKca-QHP.css","assets/DesignSystemShowcase-DNWZP_CM.js","assets/toaster-vQVSHpdk.js","assets/container-CqUKuQQh.js","assets/ServicesIndexPage-BEd-5ctH.js","assets/shuffle-DGPDVqFM.js","assets/file-check-D-Dd5H0J.js","assets/PricingPage-B6dnTN9E.js","assets/crown-Si2ZozvP.js","assets/WebhookDocsPage-BnB49ENT.js","assets/PortalWebhooksPage-BChnEZP0.js","assets/AcceptInvitePage-BYQ7k2hj.js","assets/PortalShipmentDetailPage-BSxrHZYH.js","assets/clientDocumentHubApi-ChlimVLd.js","assets/shipmentMilestonesApi-BA9kGX4H.js","assets/PortalShipmentsPage-CdHqO-Zd.js","assets/portalSummaryApi-1UfNfTcL.js","assets/PortalHomePage-DherzkWw.js","assets/section-onboarding-1vhJOAtr.js","assets/LkOverviewPage-CWvVw_cu.js","assets/LkCalcPage-IMWQGSa_.js","assets/LkApplicationsListPage-B3R2uJJe.js","assets/useCompanyRole-Da5zXOvR.js","assets/LkApplicationPage-oF0JKRNv.js","assets/ban-D6CMKy3S.js","assets/DocumentUploadModal-CaULfM6P.js","assets/documentsApi-O1-ARrf3.js","assets/usePollOnVisible-Bi2NUvdm.js","assets/refresh-cw-C4b2-yPW.js","assets/navigation-4trXS2xq.js","assets/LkDocumentsPage-BNuZ-JA6.js","assets/funnel-CFbWZ2TF.js","assets/LkNotificationsPage-gIEHddpF.js","assets/NotificationPreferencesGrid-Cvhsuh_X.js","assets/LkTeamPage-DCazJcaf.js","assets/LkSavedCalcsPage-NeoAAjCf.js","assets/LkShipmentsPage-FzSvOVtI.js","assets/shipmentsApi-pfttNY1J.js","assets/workflow-3-RslHf9.js","assets/LkShipmentDetailPage-CHNar91O.js","assets/LkCustomsPage-BoG_yFdB.js","assets/LkShipmentTrackerPage--pPNWy6j.js","assets/file-up-3ORcixnd.js","assets/LkHelpPage-Tshpeveq.js","assets/kbArticlesApi-7KWxaBRV.js","assets/LkSalesFastQuotePage-C2EgAySn.js","assets/formAnalytics-B7tJ_keY.js","assets/circle-check-big-s1TBlwoC.js","assets/LkSalesLeadsPage-D6i_1eaA.js","assets/LkReferralPage-D5ddB65j.js","assets/referralsApi-BixrljkS.js","assets/LkPartnerPage-DTRhhA-7.js","assets/ReferralProgramPage-W3ZS43J8.js","assets/LkAdminCustomersPage-BfroEIJX.js","assets/PublicHelpPage-CbS-58uD.js","assets/bot-O89b0140.js","assets/HelpArticlePage-wDs9Vb_f.js","assets/tag-G37l5I4S.js","assets/LkInsuranceClaimPage-QpZI-ke8.js","assets/LkContractWizardPage-B4gGjPqT.js","assets/PublicResearchIndexPage-BoVWKG-W.js","assets/flask-conical-wNAmFrV9.js","assets/PublicResearchSmbCostIndexPage-r8zF_-Sh.js","assets/PublicEnFaqPage--R82N3VY.js","assets/en-faq-data-CPLnGyhw.js","assets/PublicEnFaqArticlePage-DC0Y-vlJ.js","assets/PublicEnGlossaryIndexPage-IAFBQWDc.js","assets/en-glossary-data-BoSnL6Ql.js","assets/arrow-up-lKkymgPk.js","assets/PublicEnGlossaryTermPage-BR7ROQB7.js","assets/PublicEnBlogIndexPage-JAyZwfWh.js","assets/en-blog-data-DxNXQeKP.js","assets/PublicEnBlogArticlePage-B3bah4OK.js","assets/PublicEnAboutPage-be5fp2uB.js","assets/PublicEnServicesPage-BVM1HaT7.js","assets/YdFreightChinaPage-CL3qsSbO.js","assets/YdLandingTemplate-B0IYmKRS.js","assets/YdCustomsBrokerPage-CcEVgXQA.js","assets/clipboard-check-Bapvmewv.js","assets/YdSmbImportPage-DTCpSAT5.js","assets/MultiOriginCalculatorPage-BvkqbFIM.js","assets/PlansPage-B-yYacm8.js","assets/LoginPage-EEFwTu3u.js","assets/SignupLegalEntityPage-ByVu3QqR.js","assets/credit-card-DIb67Ni2.js","assets/PublicTrackPage-CH6_Mjpw.js","assets/SupplierPortalPage-iktL3uyN.js","assets/ToolsHubPage-DgsI_3wD.js","assets/ruler-C2zAirZ5.js","assets/leaf-B-X_zPEb.js","assets/box-DUfms-nK.js","assets/chart-no-axes-column-increasing-BKYxztw-.js","assets/arrow-left-right-DTbGg1wE.js","assets/briefcase-LGn0qLR3.js","assets/file-output-D3Ib9-Ro.js","assets/scale-C5gz6Onr.js","assets/user-check-D8XCf3rF.js","assets/shield-plus-CLPjLzTK.js","assets/thermometer-K_9A3nYV.js","assets/shopping-cart-DNPHn5nA.js","assets/ToolsIncotermsPage-DEd6m2zj.js","assets/ToolPageSEO-BIThC1am.js","assets/toolsMeta-Di9f1g1E.js","assets/ToolsCo2Page-BIEtzxT3.js","assets/ToolsPortsPage-BD16GY7Q.js","assets/ToolsDistancePage-SUQuddYa.js","assets/ToolsCbmPage-DzdB0aGS.js","assets/ToolsAirFreightPage-Uf3V3tGS.js","assets/ToolsPackingListPage-CQaWD3Tz.js","assets/ToolsContainerPage-BepTDJs-.js","assets/weight-CPycujxK.js","assets/ToolsHsCodePage-Dr6lRyGv.js","assets/ToolsCustomsCalcPage-CciQ9kbK.js","assets/ToolsCurrencyPage-BFAMnd9J.js","assets/ToolsDocsCheckPage-Dkeja6PX.js","assets/ToolsSchedulePage-fFfR-_sI.js","assets/ToolsFreightRatesPage-DG0g6rNm.js","assets/ToolsFreightIndexPage-BXOHdZi1.js","assets/ToolsLandedCostPage-BoFj4HC7.js","assets/ToolsComparisonPage-DulvzjlN.js","assets/ToolsChinaCalendarPage-C9Aj4lV4.js","assets/ToolsPreShipmentPage-C9H4xqow.js","assets/ToolsDemurragePage-CcxrqiyD.js","assets/lightbulb-Vk8-o7VX.js","assets/ToolsPaymentTermsPage-DGc_yejx.js","assets/ToolsInsurancePage-BvJys2FS.js","assets/ToolsLeadTimePage-CVFQLedN.js","assets/ToolsContainerTrackingPage-DwcOxSfU.js","assets/ToolsConverterPage-Bw7UyvuU.js","assets/ToolsFreightForwarderPage-BqN3x53R.js","assets/ToolsPackagingPage-B4118665.js","assets/square-check-big-cmzFpwUp.js","assets/ToolsDangerousGoodsPage-B_Gk6Seo.js","assets/ToolsGlossaryPage-IksdFCOu.js","assets/ToolsWarehousePage-DiWZ-wXg.js","assets/ToolsTimelinePage-B5GY6xpX.js","assets/ToolsTradeFinancePage-BlXUUnp_.js","assets/ToolsCargoStandardsPage-DQimrmcm.js","assets/ToolsExportDocsPage-G62m4vwr.js","assets/ToolsSurchargesPage-BKh6EltR.js","assets/ToolsRussiaPortsPage-CsYRtTpR.js","assets/ToolsSupplierCheckPage-D3MmbKgR.js","assets/ToolsAntiDumpingPage-BacfNgzX.js","assets/ToolsVatRefundPage-BMyanFzc.js","assets/ToolsTradeLanesPage-D7OgBkMf.js","assets/ToolsKpiPage-CZO0Vu79.js","assets/ToolsFreightBrokerPage-D9r7iRd0.js","assets/ToolsExchangeRiskPage-B30K6IKV.js","assets/ToolsPortCongestionPage-vbm6RHN9.js","assets/ToolsCargoClaimsPage-n1l0ArOI.js","assets/ToolsChemicalRegPage-D9xL_6F7.js","assets/ToolsSeasonalityPage-Dco4zTy9.js","assets/ToolsTransitTimePage-oqLiYpSD.js","assets/ToolsFreightCostPage-BFN15ox9.js","assets/ToolsExportControlPage-B1aESjhU.js","assets/ToolsCargoInsuranceCalcPage-5YHl5tE0.js","assets/ToolsRussiaRegionsPage-BiwKNqiW.js","assets/ToolsContainerTypesPage-Bdi83_kH.js","assets/wind-NPAAu6PJ.js","assets/ToolsBillOfLadingPage-D7Lc55uT.js","assets/square-DhnEGwcI.js","assets/ToolsWeightDimensionsPage-CxDHH7YH.js","assets/ToolsMultimodalPage-DxVHTyuD.js","assets/ToolsLetterOfCreditPage-0-fB6aFf.js","assets/ToolsFreeZonesPage-CYBt_0An.js","assets/ToolsColdChainPage-DbdGz18e.js","assets/ToolsCargoReadinessPage-DZ54o69q.js","assets/ToolsTariffSchedulePage-Cb4Y-uiV.js","assets/ToolsSupplyChainRiskPage-Dg1eTAE8.js","assets/ToolsFreightNegotiationPage-CHwefpWm.js","assets/ToolsWarehouseCalcPage-NLHxL5H4.js","assets/ToolsOriginCertPage-B690e0Hj.js","assets/ToolsImportLicensePage-C1jLbBEr.js","assets/ToolsShipmentTrackerPage-CNl4TwPQ.js","assets/ToolsChinaSupplierPage-BpxwHc4q.js","assets/factory-CPzQz4Cx.js","assets/ToolsTradeCompliancePage-BeN9gs8t.js","assets/ToolsCustomsBrokerCalcPage-BIbfAuPg.js","assets/ToolsEcommerceImportPage-6EZmNfal.js","assets/ToolsFreightForwarderGuidePage-Bqhjd2wR.js","assets/ToolsIncotermsCalcPage-Cp6ZI-A_.js","assets/ToolsPackagingRequirementsPage-8uk7IPiK.js","assets/ToolsRailwayFreightPage-V7Qoym3c.js","assets/ToolsLetterOfCreditCalcPage-CkM1pJyg.js","assets/ToolsCarbonFootprintPage-IvZtujFz.js","assets/ToolsAirCargoGuidePage-DZbii8pe.js","assets/ToolsChinaHolidaysPage-KqD7qlUP.js","assets/ToolsPortStoragePage-ZYne58aC.js","assets/ToolsContainerSizesPage-DT6WNTaA.js","assets/ToolsImportDocumentsPage-JDpvemTV.js","assets/ToolsLogisticsCostPage-B15v-cWR.js","assets/ToolsShippingTermsPage-CTmrCWCm.js","assets/ToolsSupplyChainFinancePage-1jejN8GB.js","assets/ToolsChineseSuppliersPage-Bv3O1LtH.js","assets/ToolsRailwayCalcPage-PgKdTcV9.js","assets/ToolsMultimodalComparePage-B7Yn3dze.js","assets/ToolsWarrantyClaimsPage-DpdHQwnz.js","assets/ToolsExportDocumentsPage-7FQPjP1w.js","assets/ToolsChinaPaymentsPage-CXikcUpD.js","assets/ToolsLoadingNormsPage-Ca7afzVH.js","assets/ToolsHazmatGuidePage-0mm3uZrd.js","assets/ToolsFreeTradeZonesPage-BruL-wT5.js","assets/ToolsShipmentVisibilityPage-CapRD4Me.js","assets/ToolsImporterInsurancePage-C2t0f70B.js","assets/ToolsCurrencyHedgingPage-CNI9XVUe.js","assets/ToolsHonestSignPage-B8L84jSL.js","assets/ToolsLclCalculatorPage-D_lNmiEK.js","assets/ToolsCarrierComparePage-nlTeJhcq.js","assets/ToolsEaeuRulesPage-BxyL7QUg.js","assets/ToolsHsCodeWizardPage-x-oXUfZ8.js","assets/ToolsInventoryPlanningPage-BMt3MYI0.js","assets/ToolsRouteOptimizationPage-Caxguau1.js","assets/ToolsFreightAuditPage-C9n0YHfI.js","assets/ToolsBolGuidePage-DbbmU8Sp.js","assets/ToolsCustomsBondPage-Do7_DtcJ.js","assets/ToolsCertOriginPage-DlZltEXJ.js","assets/ToolsImportVatPage-BkyXdIR4.js","assets/ToolsLithiumBatteryPage-D82WiWjd.js","assets/ToolsIspm15Page-CeCWKozE.js","assets/ToolsPhytoCertPage-BVQjPBfd.js","assets/ToolsTemperatureCargoPage-CegxUuDi.js","assets/ToolsOversizeCargoPage-hAS68b2K.js","assets/ToolsTradeFinanceCalcPage-B5Ygvb5B.js","assets/ToolsBreakBulkPage-dgncZ-Um.js","assets/ToolsSanctionsCheckPage-Bsj_UG-c.js","assets/ToolsExportLicensePage-DLWmQXVY.js","assets/ToolsFumigationPage-DUXMIyl1.js","assets/ToolsContainerInspectionPage-CQr_yVmG.js","assets/ToolsRoRoGuidePage-DYjzmAsr.js","assets/ToolsVgmCalcPage-DJZnLhWu.js","assets/ToolsBondedWarehousePage-DTw8wG_U.js","assets/ToolsAirWaybillPage-Dc3lwSpW.js","assets/ToolsInvoiceTemplatePage-900IZ5Hv.js","assets/ToolsShippingInstructionsPage-CX93THsU.js","assets/ToolsTruckingCalcPage-BB6WqNvI.js","assets/ToolsSupplyChainKpiPage-Y1wCyvWx.js","assets/ToolsSeaFreightChecklistPage-KK8L1neK.js","assets/ToolsSpotRateCalcPage-SxihTjt7.js","assets/ToolsPoManagementPage-CF0jc9dE.js","assets/ToolsCharterPartyPage-B7qX55Qs.js","assets/ToolsSingleWindowPage-4L8zra3Z.js","assets/ToolsDdpDduCalcPage-DNdNAuF2.js","assets/ToolsCbamGuidePage-BS83Hf2b.js","assets/ToolsImportQuotasPage-CGXLxYHI.js","assets/ToolsLetterOfIndemnityPage-hZrSoKXa.js","assets/ToolsParallelImportPage-Dbo4ugQs.js","assets/ToolsFreightRateIndexPage-QSvunBjv.js","assets/ToolsCargoReleaseOrderPage-BPP8NsMN.js","assets/ToolsTransshipmentGuidePage-MwvKOwNx.js","assets/ToolsCustomsValueCalcPage-e7Nj_iEr.js","assets/ToolsContainerLeasingPage-CokCuLuW.js","assets/ToolsExciseDutyPage-BRGH6poF.js","assets/ToolsChinaExportTaxPage-BcVNGA-X.js","assets/ToolsAirVsSeaCalcPage-x8MXD8hi.js","assets/ToolsEuCustomsClearancePage-C5B8TR7F.js","assets/ToolsPortDwellTimePage-IdC4KDrd.js","assets/ToolsRailwayLogisticsPage-ClEipz7_.js","assets/ToolsCourierVsFreightPage-q83EuaSz.js","assets/ToolsIncotermsQuizPage-BvNINPQQ.js","assets/ToolsFreightPaymentTermsPage-D1kEeEdY.js","assets/ToolsTradeDocPackPage-CKb0pPFT.js","assets/ToolsEaeuTariffPage-B8GXVgGj.js","assets/ToolsColdChainMonitorPage-D9dCYVO4.js","assets/ToolsSupplierAuditPage-C0-Px4u1.js","assets/ToolsLoadPlanPage-BAMSprFJ.js","assets/ToolsEcommerceLogisticsPage-BSxjQF1k.js","assets/ToolsCertificationPage-CC8vHXUC.js","assets/ToolsFclVsLclPage-B_7EBTwr.js","assets/ToolsChinaRegionsPage-BGTv-gC8.js","assets/ToolsTruckFreightCalcPage-DTZMTZmD.js","assets/ToolsPhytosanitaryPage-BNMYSlSq.js","assets/ToolsReExportPage-_l0pPd44.js","assets/ToolsQualityControlPage-DLyoPX0j.js","assets/ToolsGoodsDeclarationPage-DzZGYyWh.js","assets/ToolsConsolidationCalcPage-BwSXFjBg.js","assets/ToolsBankGuaranteePage-Bq39svl3.js","assets/ToolsPortFeesCalcPage-gxKae6SR.js","assets/ToolsImportQuotaPage-BhJMusNF.js","assets/ToolsCarnetAtaPage-n1kVexPd.js","assets/ToolsDutyDrawbackPage-CGX1LC4T.js","assets/ToolsColdStorageCalcPage-B35aElk-.js","assets/ToolsMarineInsuranceTypesPage-CFYw2EVv.js","assets/ToolsPalletCalcPage-CNX6RS-R.js","assets/ToolsImportProcedurePage-DlLdQhkj.js","assets/ToolsLinerTermsPage-D1aJOqs-.js","assets/ToolsFreightTenderPage-DAkZPb56.js","assets/ToolsCustomsRulingPage-DjzD0XF2.js","assets/ToolsBufferStockPage-D6TF1ssA.js","assets/ToolsGreenLogisticsPage-B02Sq0oj.js","assets/ToolsFreightMarkupPage-CCzcznQS.js","assets/ToolsPortProcedurePage-D7HDnuK2.js","assets/ToolsContainerStuffingPage-CJUvfTII.js","assets/ToolsCargoRejectionPage-DIaSqhwf.js","assets/ToolsReverseLogisticsPage-BV_yivEO.js","assets/ToolsBookingChecklistPage-Cmzv1anu.js","assets/ToolsMultimodalDocsPage-B3f8X2tp.js","assets/ToolsExportFinancePage-QJlFiHWo.js","assets/ToolsComplianceCertPage-DZ8UcnFK.js","assets/ToolsShipperLetterPage-2fYZFY_h.js","assets/ToolsPreAdvicePage-ONUAwqKi.js","assets/ToolsCargoSurveyPage-DGhL5qk1.js","assets/ToolsDemurrageClaimPage-dUc6Mdy2.js","assets/ToolsPortAgencyPage-C6admKh7.js","assets/ToolsFreightClaimPage-C7pPVZpL.js","assets/ToolsStorageInTransitPage-BVxI-1-h.js","assets/ToolsLclBookingPage-D6UEWgyj.js","assets/ToolsSpecialCargoPage-DTyA01Nt.js","assets/ToolsHazardousClassPage-HVm43qqj.js","assets/ToolsCargoTempPage-SXNVC4x9.js","assets/ToolsInsuranceClaimPage-7tcp9CHn.js","assets/ToolsContainerDamagePage-Botiv7dt.js","assets/ToolsReeferBookingPage-B3oKHApz.js","assets/ToolsTrackTracePage-Cgl2HEnN.js","assets/PublicFaqPage-DgyegDm-.js","assets/MarketingCasesPage-uVan7IIo.js","assets/casesData-Bd65MZ0p.js","assets/piggy-bank-C-lXPLfd.js","assets/MarketingCaseDetailPage-Dee5lp3r.js","assets/MarketingReviewsPage-wO40LkFY.js","assets/MarketingPartnersPage-B8E8JykY.js","assets/hand-coins-DcGXx9WH.js","assets/network-C4eJI9-K.js","assets/MarketingTrustPage-quExiRWu.js","assets/file-badge-K3l31xuW.js","assets/MarketingDocumentsPage-C1vzRPVE.js","assets/MarketingCooperationPage-IeCq76vq.js","assets/code-xml-BpYF7vVq.js","assets/palette-BcR3EfWk.js","assets/MarketingJoinPage-CSnMM7zj.js","assets/rocket-DWU3Gsol.js","assets/heart-handshake-CB-9Kt4j.js","assets/MarketingHowItWorksPage-u78MVgcG.js","assets/gauge-DRgQKZno.js","assets/MarketingAdvantagesPage-DpyJwOaQ.js","assets/MarketingSupportPage-U8Jm-YNm.js","assets/MarketingCashbackPage-BrQ1111V.js","assets/MarketingNewsPage-AtwIPR8e.js","assets/MarketingAdditionalServicesPage-B1Ko3hSB.js","assets/SolutionsIndexPage-Da6iZRhw.js","assets/SolutionsImporterPage-DAp3EQD4.js","assets/PersonaLandingTemplate-BucxCudP.js","assets/SolutionsExporterPage-C1RVBLJq.js","assets/SolutionsForwarderPage-VN6bD4ai.js","assets/SolutionsCarrierPage-DRO6IzHU.js","assets/compass-CoTRWj_l.js","assets/chart-line-BIY1GljW.js","assets/MarineServicePage-8gwuXtWU.js","assets/ServicePageTemplate-BzPzuemV.js","assets/clock-4-lPvHYtse.js","assets/RailwayServicePage-CcOIfTS1.js","assets/map-pinned-By4CvJpJ.js","assets/AutoServicePage-B3CQnnXB.js","assets/AirServicePage-DlDN_YaI.js","assets/snowflake-CAvIvSFX.js","assets/GroupageServicePage-DDCXnLpl.js","assets/MultimodalServicePage-Dscz_yIF.js","assets/CustomsServicePage-BUVNBvjh.js","assets/ContainerRentalServicePage-CmCU3TNS.js","assets/AboutCompanyPage-CIv4NQvf.js","assets/ContactsPageDS-cZNigDd7.js","assets/VacanciesPage-DKM8kZsq.js","assets/PrivacyPolicyPage-DYSz7jGc.js","assets/RoutePairLandingPage-DC7ZhAl6.js","assets/IndustryLandingPage-CYJEJ2BP.js","assets/CompetitorLandingPage-ChUytT9w.js","assets/DostavkaIndexPage-DaNUeFJg.js","assets/dostavka-C8FDUgjJ.js","assets/DostavkaCountryPage-DK2eRinB.js","assets/DostavkaCityPage-D280152O.js","assets/MarketingNotFoundPage-BqeTlGk3.js","assets/ResourcesHubPage-D8hJdgPa.js","assets/guidesMeta-BBUNJcrY.js","assets/library-gsYoCzf5.js","assets/GlossaryPage-b3Oap2SM.js","assets/GuidesIndexPage-BR321jwQ.js","assets/CustomsChina2026-CgL_0v9L.js","assets/GuideArticleTemplate-a5WAOtoY.js","assets/IncotermsPlain-C0fflrn4.js","assets/HowToReadBL-DmVw4Fud.js","assets/ReduceLogisticsCosts-BaB-FkYm.js","assets/VttGuide-BzgscFj1.js","assets/ChinaContractGuide-DRLBg4ON.js","assets/DemurrageDetentionGuide-C95iRZSm.js","assets/FclVsLclGuide-bJ0qpRkY.js","assets/AirCargoGuide-Ck5nucu7.js","assets/CustomsDutiesGuide-XMgOmtao.js","assets/RailFreightGuide-BW8O0m8u.js","assets/CargoInsuranceGuide-iGiYGt0D.js","assets/MarketingResetPasswordPage-Dsfd9Ehi.js","assets/VerifyEmailPage-BpTBnxbi.js","assets/ResetPasswordPage.module-D3bvwYpW.js","assets/ResetPasswordPage-C64OEGkd.css","assets/ConfirmEmailChangePage-DFvTlU3M.js","assets/AdminGuard-DCmRHWqJ.js","assets/AdminLayout-latTDhr1.js","assets/adminManagersApi-Cu9x-YDc.js","assets/adminBookmarksApi-B5h2JAry.js","assets/adminRemindersApi-DZ7_6kpU.js","assets/adminStuckApi-CzhbDcMu.js","assets/adminExceptionsApi-DRnEKa_0.js","assets/user-plus-h_5mNMIn.js","assets/AdminLayout-zLDHXNxD.css","assets/PublicTrackingPage-CJLVoBeE.js","assets/leaflet-CB1MP_tj.js","assets/leaflet-CIGW-MKW.css","assets/index-BbSXECdN.js","assets/EnvironmentOutlined-goYTsNZm.js","assets/CompassOutlined-BheKDILR.js","assets/index-vV43h-F7.js","assets/AdminOverviewPage-BqzJH7Qu.js","assets/applicationTagsApi-lBPb0hGU.js","assets/adminAnalyticsApi-BNtnCLh-.js","assets/AdminMultiTenantPage-94X2oh5C.js","assets/AdminWbrPage-CDriSBXC.js","assets/AdminTrackingPage-BZuNCNoB.js","assets/AdminOkrQuartersPage-DiutPUAn.js","assets/adminOkrApi-CgjApPJi.js","assets/AdminOkrQuarterDetailPage-CiTJkxbN.js","assets/AdminPostmortemsListPage-vFuyDIDb.js","assets/adminPostmortemApi-vlGjgGS4.js","assets/AdminPostmortemDetailPage-DF7otSCN.js","assets/AdminCompany360Page-DcEki2pl.js","assets/AdminUnknownCitiesPage-coz1e2n4.js","assets/adminCitiesApi-DN2W5B5X.js","assets/AdminCitiesPage-BweMcypR.js","assets/AdminSupplierActionsPage-D0Fj2Y6G.js","assets/supplierActionsApi-aAW4Rn3y.js","assets/AdminPricingProfilesPage-SJBjy6B0.js","assets/adminPricingProfileApi-D0iYyioU.js","assets/AdminInternationalAutoPage-BhU-IdFa.js","assets/AdminInvoicesPage-BzCo3bnk.js","assets/useUrlSyncedFilter-CcNauTyk.js","assets/safeExternalUrl-B6YoezCt.js","assets/SavedViewsBar-Dq8jhAdL.js","assets/EntityAuditDrawer-C_FupHWP.js","assets/AdminContractsPage-BaDLu63f.js","assets/AdminUsersPage-B9JrBsAN.js","assets/AdminCompanyInvitationsPage-B8YV5Tu4.js","assets/AdminOrdersPage-Bw2PZE8J.js","assets/supplierOrdersApi-LrGu6swQ.js","assets/supplierRoutesApi-BgNC8nsf.js","assets/AdminBookmarksPage-D3zQzP1W.js","assets/AdminRemindersPage-BudaA-6x.js","assets/AdminTagsPage-Dd9sYQ_I.js","assets/AdminOrderDetailPage-BRBGwF4A.js","assets/index-BSegNCOU.js","assets/supplierInvoicesApi-huBtLdAV.js","assets/AdminOrderDetailPage-AfCFz5h6.css","assets/AdminNotificationsPage-x3bwy4H3.js","assets/AdminAmoCrmPage-CG7djElh.js","assets/AdminMarketingPage-DrrIh2Hs.js","assets/AdminAnalyticsPage-DCnomMev.js","assets/AdminActivationFunnelPage-DE36eE3O.js","assets/AdminDcsaPage-C0YKAfVn.js","assets/AdminRevenueAnalyticsPage-BJEo3xxf.js","assets/AdminStuckApplicationsPage-s_VDqmQa.js","assets/AdminExceptionsInboxPage-CQz75SZo.js","assets/AdminTelegramPage-DPA-FYKn.js","assets/AdminApiKeysPage-CqeaEd9F.js","assets/AdminSupplierScorecardPage-D5P3ID0U.js","assets/AdminTariffsChangesPage-E6SKans1.js","assets/AdminExternalSchedulesPage-CzemVghp.js","assets/AdminReconciliationPage-Cf5-9GnY.js","assets/SupplierGuard-C57zcJzm.js","assets/SupplierLayout-0LG7x3VW.js","assets/SupplierLayout-CKkG6HQA.css","assets/SupplierProfilePage-DnnHHp8Z.js","assets/supplierApi-MKagm1TI.js","assets/SupplierDashboardPage-C-qOBDBQ.js","assets/SupplierRoutesPage-C4nT1th9.js","assets/SupplierImportModal-dbVVkUK-.js","assets/SupplierResourcePage-CoeZzuD4.js","assets/SupplierAnalyticsPage-CUCsvWtp.js","assets/SupplierAuditPage-CjmlN-Je.js","assets/SupplierTeamPage-CYhxrayu.js","assets/supplierInvitationsApi-BnZjzn_4.js","assets/SupplierInvoicesPage-B_i9OCgx.js","assets/SupplierContractsPage-DR7jJ5Lc.js","assets/SupplierNotificationsPage-LbaEj-z3.js","assets/SupplierBlackoutsPage-BiXlckzg.js","assets/AcceptInvitationPage-uNxTl1Mo.js","assets/About-BnnAt3nZ.js","assets/About-DMi08t_n.css","assets/BlogPost-DKMz1wMy.js","assets/index-BLBKlO8g.js","assets/index-BD1jfbp5.css","assets/SearchResultsPage-DLC3Rmml.js","assets/SearchResultsPage-BRHVbNL0.css","assets/AdminExchangeStatsPage-XqFeRkQr.js","assets/AdminChatModerationPage-DGVbzIn3.js","assets/AdminCalendarPage-DyQrtRzp.js","assets/UpdatePrompt-CAAqP7Ub.js","assets/PwaInstallPromptDS-BSusWSly.js"])))=>i.map(i=>d[i]);
var P$=Object.defineProperty;var R$=(e,t,r)=>t in e?P$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var St=(e,t,r)=>R$(e,typeof t!="symbol"?t+"":t,r);import{_ as C,e as ov,Q as T$,a as I$}from"./vendor-query-9i1Av1pr.js";import{l as Vc,q as a,R as N,n as c,r as $o,w as Wm,L as Ot,v as Xr,O as $$,b as qm,c as fx,u as A$,p as j$,s as O$,k as N$,t as D$,g as k$,m as M$,h as L$,o as z$,a as Ht,e as E,x as mx,B as F$,f as V$,d as B$}from"./vendor-react-Br0ZiotI.js";import{d as hx}from"./vendor-dayjs-BcsA502E.js";import{u as ga,s as H$,b as ea,B as U$,a as W$,i as q$,I as G$}from"./vendor-i18n-C54Hc0CQ.js";import{bN as Bc,b3 as K$,at as tr,b8 as er,bC as we,am as br,bK as Lr,y as Hc,ab as ae,c3 as Gm,bJ as Pr,bO as Qt,ac as va,Q as hn,x as ei,c5 as Ut,bg as ta,K as Xe,aC as Bl,be as gr,bR as gx,bA as Fo,f as Ir,z as X$,G as Y$,bz as Ls,bu as vx,bw as bx,bt as _x,bv as yx,bm as zr,aQ as zs,aP as Hl,bn as xx,al as Km,I as En,t as J$,u as Z$,v as wx,i as Xm,bH as Yr,c0 as Uc,bG as Wc,m as Ex,D as Sx,b_ as ba,j as Cx,bS as cn,aI as Ym,c2 as qc,aK as Px,bE as ti,aD as Rx,ar as Tx,bL as Q$,bY as eA,aR as Jm,aq as Zm,M as tA,aO as rA,az as Ix,aA as $x,ay as Ax,aY as Qm,av as nA,aF as jx,aU as oA,aa as Sn,Z as Ox,ai as Nx,U as sA,p as ro,aX as Mn,b as Dx,aV as jn,aW as ra,aE as eh,by as kx,aT as Mx,bI as Lx,bx as iA,an as Ul,ak as aA,a9 as Rp,F as sv,aN as lA,ao as Tp,a$ as cA,w as Ip,bq as uA,bp as Ro,b0 as iv,bV as dA,aZ as av,e as pA,b2 as lv,B as Wl,ax as fA,au as mA,bQ as zx,b4 as hA,bb as gA,a2 as ql,bf as Fx,aM as vA,ah as bA,bB as Vx,b1 as cv,E as uv,a4 as Bx,g as _A}from"./vendor-antd-core-CbYNMZQB.js";import{c as yA,g as xA}from"./vendor-sentry-Cx26FE6p.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(o){if(o.ep)return;o.ep=!0;const s=r(o);fetch(o.href,s)}})();var Gc={},Hx={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Hx);var th=Hx.exports,Kc={};Object.defineProperty(Kc,"__esModule",{value:!0});Kc.default=void 0;const wA={items_per_page:"/ стр.",jump_to:"Перейти",jump_to_confirm:"подтвердить",page:"Страница",prev_page:"Назад",next_page:"Вперед",prev_5:"Предыдущие 5",next_5:"Следующие 5",prev_3:"Предыдущие 3",next_3:"Следующие 3",page_size:"размер страницы"};Kc.default=wA;var Xc={},_a={},Yc={},Jc={};Object.defineProperty(Jc,"__esModule",{value:!0});Jc.commonLocale=void 0;Jc.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0};Object.defineProperty(Yc,"__esModule",{value:!0});Yc.default=void 0;var EA=Jc;function na(e){"@babel/helpers - typeof";return na=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},na(e)}function dv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function pv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dv(Object(r),!0).forEach(function(n){SA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function SA(e,t,r){return t=CA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CA(e){var t=PA(e,"string");return na(t)=="symbol"?t:String(t)}function PA(e,t){if(na(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(na(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var RA=pv(pv({},EA.commonLocale),{},{locale:"ru_RU",today:"Сегодня",now:"Сейчас",backToToday:"Текущая дата",ok:"РћРљ",clear:"Очистить",week:"Неделя",month:"Месяц",year:"Год",timeSelect:"Выбрать время",dateSelect:"Выбрать дату",monthSelect:"Выбрать месяц",yearSelect:"Выбрать РіРѕРґ",decadeSelect:"Выбрать десятилетие",previousMonth:"Предыдущий месяц (PageUp)",nextMonth:"Следующий месяц (PageDown)",previousYear:"Предыдущий РіРѕРґ (Control + left)",nextYear:"Следующий РіРѕРґ (Control + right)",previousDecade:"Предыдущее десятилетие",nextDecade:"Следущее десятилетие",previousCentury:"Предыдущий век",nextCentury:"Следующий век"});Yc.default=RA;var ya={};Object.defineProperty(ya,"__esModule",{value:!0});ya.default=void 0;const TA={placeholder:"Выберите время",rangePlaceholder:["Время начала","Время окончания"]};ya.default=TA;var Ux=th.default;Object.defineProperty(_a,"__esModule",{value:!0});_a.default=void 0;var IA=Ux(Yc),$A=Ux(ya);const AA={lang:{placeholder:"Выберите дату",yearPlaceholder:"Выберите РіРѕРґ",quarterPlaceholder:"Выберите квартал",monthPlaceholder:"Выберите месяц",weekPlaceholder:"Выберите неделю",rangePlaceholder:["Начальная дата","Конечная дата"],rangeYearPlaceholder:["Начальный РіРѕРґ","Год окончания"],rangeMonthPlaceholder:["Начальный месяц","Конечный месяц"],rangeWeekPlaceholder:["Начальная неделя","Конечная неделя"],shortWeekDays:["Р’СЃ","РџРЅ","Р’С‚","РЎСЂ","Р§С‚","РџС‚","РЎР±"],shortMonths:["РЇРЅРІ","Фев","Мар","РђРїСЂ","Май","РСЋРЅ","РСЋР»","РђРІРі","Сен","РћРєС‚","РќРѕСЏ","Дек"],...IA.default},timePickerLocale:{...$A.default}};_a.default=AA;var jA=th.default;Object.defineProperty(Xc,"__esModule",{value:!0});Xc.default=void 0;var OA=jA(_a);Xc.default=OA.default;var Zc=th.default;Object.defineProperty(Gc,"__esModule",{value:!0});Gc.default=void 0;var NA=Zc(Kc),DA=Zc(Xc),kA=Zc(_a),MA=Zc(ya);const Ar="${label} РЅРµ является типом ${type}",LA={locale:"ru",Pagination:NA.default,DatePicker:kA.default,TimePicker:MA.default,Calendar:DA.default,global:{placeholder:"Пожалуйста выберите",close:"Закрыть"},Table:{filterTitle:"Фильтр",filterConfirm:"OK",filterReset:"Сбросить",filterEmptyText:"Без фильтров",filterCheckAll:"Выбрать РІСЃРµ элементы",filterSearchPlaceholder:"РџРѕРёСЃРє РІ фильтрах",emptyText:"Нет данных",selectAll:"Выбрать РІСЃС‘",selectInvert:"Рнвертировать выбор",selectNone:"Очистить РІСЃРµ данные",selectionAll:"Выбрать РІСЃРµ данные",sortTitle:"Сортировка",expand:"Развернуть строку",collapse:"Свернуть строку",triggerDesc:"Нажмите для сортировки РїРѕ убыванию",triggerAsc:"Нажмите для сортировки РїРѕ возрастанию",cancelSort:"Нажмите, чтобы отменить сортировку"},Tour:{Next:"Далее",Previous:"Назад",Finish:"Завершить"},Modal:{okText:"OK",cancelText:"Отмена",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Отмена"},Transfer:{titles:["",""],searchPlaceholder:"РџРѕРёСЃРє",itemUnit:"элем.",itemsUnit:"элем.",remove:"Удалить",selectAll:"Выбрать РІСЃРµ данные",deselectAll:"Очистить РІСЃРµ данные",selectCurrent:"Выбрать текущую страницу",selectInvert:"Рнвертировать выбор",removeAll:"Удалить РІСЃРµ данные",removeCurrent:"Удалить текущую страницу"},Upload:{uploading:"Загрузка...",removeFile:"Удалить файл",uploadError:"РџСЂРё загрузке произошла ошибка",previewFile:"Предпросмотр файла",downloadFile:"Загрузить файл"},Empty:{description:"Нет данных"},Icon:{icon:"РёРєРѕРЅРєР°"},Text:{edit:"Редактировать",copy:"Копировать",copied:"Скопировано",expand:"Раскрыть",collapse:"Свернуть"},Form:{optional:"(необязательно)",defaultValidateMessages:{default:"Ошибка проверки поля ${label}",required:"Пожалуйста, введите ${label}",enum:"${label} должен быть РѕРґРЅРёРј РёР· [${enum}]",whitespace:"${label} РЅРµ может быть пустым",date:{format:"${label} РЅРµ правильный формат даты",parse:"${label} РЅРµ может быть преобразовано РІ дату",invalid:"${label} РЅРµ является корректной датой"},types:{string:Ar,method:Ar,array:Ar,object:Ar,number:Ar,date:Ar,boolean:Ar,integer:Ar,float:Ar,regexp:Ar,email:Ar,url:Ar,hex:Ar},string:{len:"${label} должна быть ${len} символов",min:"${label} должна быть больше или равна ${min} символов",max:"${label} должна быть меньше или равна ${max} символов",range:"Длина ${label} должна быть между ${min}-${max} символами"},number:{len:"${label} должна быть равна ${len}",min:"${label} должна быть больше или равна ${min}",max:"${label} должна быть меньше или равна ${max}",range:"${label} должна быть между ${min}-${max}"},array:{len:"Количество элементов ${label} должно быть равно ${len}",min:"Количество элементов ${label} должно быть больше или равно ${min}",max:"Количество элементов ${label} должно быть меньше или равно ${max}",range:"Количество элементов ${label} должно быть между ${min} Рё ${max}"},pattern:{mismatch:"${label} РЅРµ соответствует шаблону ${pattern}"}}},QRCode:{expired:"QR-РєРѕРґ устарел",refresh:"Обновить"},ColorPicker:{presetEmpty:"Пустой",transparent:"Прозрачный",singleColor:"РћРґРёРЅ цвет",gradientColor:"Градиент"}};Gc.default=LA;var zA=Gc;const FA=Vc(zA);var VA=typeof Element<"u",BA=typeof Map=="function",HA=typeof Set=="function",UA=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function El(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,o;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!El(e[n],t[n]))return!1;return!0}var s;if(BA&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(s=e.entries();!(n=s.next()).done;)if(!t.has(n.value[0]))return!1;for(s=e.entries();!(n=s.next()).done;)if(!El(n.value[1],t.get(n.value[0])))return!1;return!0}if(HA&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(s=e.entries();!(n=s.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(UA&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;if(VA&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((o[n]==="_owner"||o[n]==="__v"||o[n]==="__o")&&e.$$typeof)&&!El(e[o[n]],t[o[n]]))return!1;return!0}return e!==e&&t!==t}var WA=function(t,r){try{return El(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const qA=Vc(WA);var GA=function(e,t,r,n,o,s,i,l){if(!e){var u;if(t===void 0)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[r,n,o,s,i,l],p=0;u=new Error(t.replace(/%s/g,function(){return d[p++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},KA=GA;const fv=Vc(KA);var XA=function(t,r,n,o){var s=n?n.call(o,t,r):void 0;if(s!==void 0)return!!s;if(t===r)return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var i=Object.keys(t),l=Object.keys(r);if(i.length!==l.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(r),d=0;d<i.length;d++){var p=i[d];if(!u(p))return!1;var f=t[p],m=r[p];if(s=n?n.call(o,f,m,p):void 0,s===!1||s===void 0&&f!==m)return!1}return!0};const YA=Vc(XA);var Wx=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(Wx||{}),ad={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},mv=Object.values(Wx),Qc={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},qx=Object.entries(Qc).reduce((e,[t,r])=>(e[r]=t,e),{}),on="data-rh",$s={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},As=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},JA=e=>{let t=As(e,"title");const r=As(e,$s.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=As(e,$s.DEFAULT_TITLE);return t||n||void 0},ZA=e=>As(e,$s.ON_CHANGE_CLIENT_STATE)||(()=>{}),ld=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),QA=(e,t)=>t.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const o=Object.keys(n);for(let s=0;s<o.length;s+=1){const l=o[s].toLowerCase();if(e.indexOf(l)!==-1&&n[l])return r.concat(n)}}return r},[]),e1=e=>console&&typeof console.warn=="function"&&console.warn(e),fi=(e,t,r)=>{const n={};return r.filter(o=>Array.isArray(o[e])?!0:(typeof o[e]<"u"&&e1(`Helmet: ${e} should be of type "Array". Instead found type "${typeof o[e]}"`),!1)).map(o=>o[e]).reverse().reduce((o,s)=>{const i={};s.filter(u=>{let d;const p=Object.keys(u);for(let m=0;m<p.length;m+=1){const h=p[m],v=h.toLowerCase();t.indexOf(v)!==-1&&!(d==="rel"&&u[d].toLowerCase()==="canonical")&&!(v==="rel"&&u[v].toLowerCase()==="stylesheet")&&(d=v),t.indexOf(h)!==-1&&(h==="innerHTML"||h==="cssText"||h==="itemprop")&&(d=h)}if(!d||!u[d])return!1;const f=u[d].toLowerCase();return n[d]||(n[d]={}),i[d]||(i[d]={}),n[d][f]?!1:(i[d][f]=!0,!0)}).reverse().forEach(u=>o.push(u));const l=Object.keys(i);for(let u=0;u<l.length;u+=1){const d=l[u],p={...n[d],...i[d]};n[d]=p}return o},[]).reverse()},t1=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},r1=e=>({baseTag:QA(["href"],e),bodyAttributes:ld("bodyAttributes",e),defer:As(e,$s.DEFER),encode:As(e,$s.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:ld("htmlAttributes",e),linkTags:fi("link",["rel","href"],e),metaTags:fi("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:fi("noscript",["innerHTML"],e),onChangeClientState:ZA(e),scriptTags:fi("script",["src","innerHTML"],e),styleTags:fi("style",["cssText"],e),title:JA(e),titleAttributes:ld("titleAttributes",e),prioritizeSeoTags:t1(e,$s.PRIORITIZE_SEO_TAGS)}),Gx=e=>Array.isArray(e)?e.join(""):e,n1=(e,t)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(t[r[n]]&&t[r[n]].includes(e[r[n]]))return!0;return!1},cd=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(n1(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},hv=(e,t)=>({...e,[t]:void 0}),o1=["noscript","script","style"],$p=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),Kx=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),s1=(e,t,r,n)=>{const o=Kx(r),s=Gx(t);return o?`<${e} ${on}="true" ${o}>${$p(s,n)}</${e}>`:`<${e} ${on}="true">${$p(s,n)}</${e}>`},i1=(e,t,r=!0)=>t.reduce((n,o)=>{const s=o,i=Object.keys(s).filter(d=>!(d==="innerHTML"||d==="cssText")).reduce((d,p)=>{const f=typeof s[p]>"u"?p:`${p}="${$p(s[p],r)}"`;return d?`${d} ${f}`:f},""),l=s.innerHTML||s.cssText||"",u=o1.indexOf(e)===-1;return`${n}<${e} ${on}="true" ${i}${u?"/>":`>${l}</${e}>`}`},""),Xx=(e,t={})=>Object.keys(e).reduce((r,n)=>{const o=Qc[n];return r[o||n]=e[n],r},t),a1=(e,t,r)=>{const n={key:t,[on]:!0},o=Xx(r,n);return[N.createElement("title",o,t)]},Sl=(e,t)=>t.map((r,n)=>{const o={key:n,[on]:!0};return Object.keys(r).forEach(s=>{const l=Qc[s]||s;if(l==="innerHTML"||l==="cssText"){const u=r.innerHTML||r.cssText;o.dangerouslySetInnerHTML={__html:u}}else o[l]=r[s]}),N.createElement(e,o)}),Ur=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>a1(e,t.title,t.titleAttributes),toString:()=>s1(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>Xx(t),toString:()=>Kx(t)};default:return{toComponent:()=>Sl(e,t),toString:()=>i1(e,t,r)}}},l1=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const o=cd(e,ad.meta),s=cd(t,ad.link),i=cd(r,ad.script);return{priorityMethods:{toComponent:()=>[...Sl("meta",o.priority),...Sl("link",s.priority),...Sl("script",i.priority)],toString:()=>`${Ur("meta",o.priority,n)} ${Ur("link",s.priority,n)} ${Ur("script",i.priority,n)}`},metaTags:o.default,linkTags:s.default,scriptTags:i.default}},c1=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:o,noscriptTags:s,styleTags:i,title:l="",titleAttributes:u,prioritizeSeoTags:d}=e;let{linkTags:p,metaTags:f,scriptTags:m}=e,h={toComponent:()=>[],toString:()=>""};return d&&({priorityMethods:h,linkTags:p,metaTags:f,scriptTags:m}=l1(e)),{priority:h,base:Ur("base",t,n),bodyAttributes:Ur("bodyAttributes",r,n),htmlAttributes:Ur("htmlAttributes",o,n),link:Ur("link",p,n),meta:Ur("meta",f,n),noscript:Ur("noscript",s,n),script:Ur("script",m,n),style:Ur("style",i,n),title:Ur("title",{title:l,titleAttributes:u},n)}},Ap=c1,Ka=[],rh=!!(typeof window<"u"&&window.document&&window.document.createElement),jp=class{constructor(e,t){St(this,"instances",[]);St(this,"canUseDOM",rh);St(this,"context");St(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Ka:this.instances,add:e=>{(this.canUseDOM?Ka:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Ka:this.instances).indexOf(e);(this.canUseDOM?Ka:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Ap({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},u1=parseInt(N.version.split(".")[0],10),Op=u1>=19,d1={},Yx=N.createContext(d1),Po,Jx=(Po=class extends a.Component{constructor(r){super(r);St(this,"helmetData");Op?this.helmetData=null:this.helmetData=new jp(this.props.context||{},Po.canUseDOM)}render(){return Op?N.createElement(N.Fragment,null,this.props.children):N.createElement(Yx.Provider,{value:this.helmetData.value},this.props.children)}},St(Po,"canUseDOM",rh),Po),Yo=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${on}]`),o=[].slice.call(n),s=[];let i;return t&&t.length&&t.forEach(l=>{const u=document.createElement(e);for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d))if(d==="innerHTML")u.innerHTML=l.innerHTML;else if(d==="cssText"){const p=l.cssText;u.appendChild(document.createTextNode(p))}else{const p=d,f=typeof l[p]>"u"?"":l[p];u.setAttribute(d,f)}u.setAttribute(on,"true"),o.some((d,p)=>(i=p,u.isEqualNode(d)))?o.splice(i,1):s.push(u)}),o.forEach(l=>{var u;return(u=l.parentNode)==null?void 0:u.removeChild(l)}),s.forEach(l=>r.appendChild(l)),{oldTags:o,newTags:s}},Np=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(on),o=n?n.split(","):[],s=[...o],i=Object.keys(t);for(const l of i){const u=t[l]||"";r.getAttribute(l)!==u&&r.setAttribute(l,u),o.indexOf(l)===-1&&o.push(l);const d=s.indexOf(l);d!==-1&&s.splice(d,1)}for(let l=s.length-1;l>=0;l-=1)r.removeAttribute(s[l]);o.length===s.length?r.removeAttribute(on):r.getAttribute(on)!==i.join(",")&&r.setAttribute(on,i.join(","))},p1=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=Gx(e)),Np("title",t)},gv=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:o,linkTags:s,metaTags:i,noscriptTags:l,onChangeClientState:u,scriptTags:d,styleTags:p,title:f,titleAttributes:m}=e;Np("body",n),Np("html",o),p1(f,m);const h={baseTag:Yo("base",r),linkTags:Yo("link",s),metaTags:Yo("meta",i),noscriptTags:Yo("noscript",l),scriptTags:Yo("script",d),styleTags:Yo("style",p)},v={},g={};Object.keys(h).forEach(b=>{const{newTags:_,oldTags:y}=h[b];_.length&&(v[b]=_),y.length&&(g[b]=h[b].oldTags)}),t&&t(),u(e,v,g)},mi=null,f1=e=>{mi&&cancelAnimationFrame(mi),e.defer?mi=requestAnimationFrame(()=>{gv(e,()=>{mi=null})}):(gv(e),mi=null)},m1=f1,vv=class extends a.Component{constructor(){super(...arguments);St(this,"rendered",!1)}shouldComponentUpdate(t){return!YA(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const o=r1(t.get().map(s=>{const{context:i,...l}=s.props;return l}));Jx.canUseDOM?m1(o):Ap&&(n=Ap(o)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},Cl=[],bv=e=>{const t={};for(const r of Object.keys(e))t[qx[r]||r]=e[r];return t},fo=e=>{const t={};for(const r of Object.keys(e)){const n=Qc[r];t[n||r]=e[r]}return t},_v=(e,t)=>{if(!rh)return;const r=document.getElementsByTagName(e)[0];if(!r)return;const n="data-rh-managed",o=r.getAttribute(n),s=o?o.split(","):[],i=Object.keys(t);for(const l of s)i.includes(l)||r.removeAttribute(l);for(const l of i){const u=t[l];u==null||u===!1?r.removeAttribute(l):u===!0?r.setAttribute(l,""):r.setAttribute(l,String(u))}i.length>0?r.setAttribute(n,i.join(",")):r.removeAttribute(n)},ud=()=>{const e={},t={};for(const r of Cl){const{htmlAttributes:n,bodyAttributes:o}=r.props;n&&Object.assign(e,bv(n)),o&&Object.assign(t,bv(o))}_v("html",e),_v("body",t)},h1=class extends a.Component{componentDidMount(){Cl.push(this),ud()}componentDidUpdate(){ud()}componentWillUnmount(){const e=Cl.indexOf(this);e!==-1&&Cl.splice(e,1),ud()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:r}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||r||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return N.createElement("title",fo(t),e)}renderBase(){const{base:e}=this.props;return e?N.createElement("base",fo(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>N.createElement("meta",{key:r,...fo(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>N.createElement("link",{key:r,...fo(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{innerHTML:n,...o}=t,s=fo(o);return n&&(s.dangerouslySetInnerHTML={__html:n}),N.createElement("script",{key:r,...s})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{cssText:n,...o}=t,s=fo(o);return n&&(s.dangerouslySetInnerHTML={__html:n}),N.createElement("style",{key:r,...s})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{innerHTML:n,...o}=t,s=fo(o);return n&&(s.dangerouslySetInnerHTML={__html:n}),N.createElement("noscript",{key:r,...s})})}render(){return N.createElement(N.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},Pp,g1=(Pp=class extends a.Component{shouldComponentUpdate(e){return!qA(hv(this.props,"helmetData"),hv(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,r,n){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return{...t,[e.type]:n,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}warnOnInvalidChildren(e,t){return fv(mv.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${mv.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),fv(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let r={};return N.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:o,...s}=n.props,i=Object.keys(s).reduce((u,d)=>(u[qx[d]||d]=s[d],u),{});let{type:l}=n;switch(typeof l=="symbol"?l=l.toString():this.warnOnInvalidChildren(n,o),l){case"Symbol(react.fragment)":t=this.mapChildrenToProps(o,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,i,o);break;default:t=this.mapObjectTypeChildren(n,t,i,o);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof jp)){const o=n;n=new jp(o.context,!0),delete r.helmetData}return Op?N.createElement(h1,{...r}):n?N.createElement(vv,{...r,context:n.value}):N.createElement(Yx.Consumer,null,o=>N.createElement(vv,{...r,context:o}))}},St(Pp,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Pp);const Zx=a.createContext(null),qte=({roles:e,children:t})=>{const r=e.includes("ROLE_SUPER_ADMIN"),n=e.includes("ROLE_ADMIN"),o=e.includes("ROLE_MANAGER");return c.jsx(Zx.Provider,{value:{roles:e,isSuperAdmin:r,isAdmin:n,isManager:o},children:t})},v1=()=>{const e=a.useContext(Zx);return e||{roles:[],isSuperAdmin:!1,isAdmin:!1,isManager:!1}};function yv(e,t=!1){if(K$(e)){const r=e.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(r)||e.isContentEditable||r==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),s=Number(o);let i=null;return o&&!Number.isNaN(s)?i=s:n&&i===null&&(i=0),n&&e.disabled&&(i=null),i!==null&&(i>=0||t&&i<0)}return!1}function nh(e,t=!1){const r=[...e.querySelectorAll("*")].filter(n=>yv(n,t));return yv(e,t)&&r.unshift(e),r}function b1(e,t){if(!e)return;e.focus(t);const{cursor:r}=t||{};if(r&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){const n=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(n,n);break;default:e.setSelectionRange(0,n)}}}let js=null,Gn=[];const Dp=new Map,oh=new Map;function sh(){return Gn[Gn.length-1]}function _1(e){const t=sh();if(e&&t){let r;for(const[o,s]of Dp.entries())if(s===t){r=o;break}const n=oh.get(r);return!!n&&(n===e||n.contains(e))}return!1}function y1(e){const{activeElement:t}=document;return e===t||e.contains(t)}function dd(){const e=sh(),{activeElement:t}=document;if(!_1(t))if(e&&!y1(e)){const r=nh(e),n=r.includes(js)?js:r[0];n==null||n.focus({preventScroll:!0})}else js=t}function xv(e){if(e.key==="Tab"){const{activeElement:t}=document,r=sh(),n=nh(r),o=n[n.length-1];e.shiftKey&&t===n[0]?js=o:!e.shiftKey&&t===o&&(js=n[0])}}function x1(e,t){return e&&(Dp.set(t,e),Gn=Gn.filter(r=>r!==e),Gn.push(e),window.addEventListener("focusin",dd),window.addEventListener("keydown",xv,!0),dd()),()=>{js=null,Gn=Gn.filter(r=>r!==e),Dp.delete(t),oh.delete(t),Gn.length===0&&(window.removeEventListener("focusin",dd),window.removeEventListener("keydown",xv,!0))}}function w1(e,t){const r=a.useRef(0),[n,o]=a.useState(0);a.useEffect(()=>{r.current=0},t),a.useEffect(()=>{const[s,i]=e(r.current);return i||(r.current+=1,o(l=>l+1)),s},[...t,n])}function Gte(e,t){const r=Bc(),n=a.useRef(t);return n.current=t,w1(i=>{if(!e)return[void 0,!0];const l=n.current();return l?[x1(l,r),!0]:[void 0,i>=1]},[r,e]),[i=>{i&&oh.set(r,i)}]}const E1=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},S1=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},C1=(e,t)=>{const{componentCls:r,gridColumns:n,antCls:o}=e,[s,i]=br(o,"grid"),[,l]=br(o,"col"),u={};for(let d=n;d>=0;d--)d===0?(u[`${r}${t}-${d}`]={display:"none"},u[`${r}-push-${d}`]={insetInlineStart:"auto"},u[`${r}-pull-${d}`]={insetInlineEnd:"auto"},u[`${r}${t}-push-${d}`]={insetInlineStart:"auto"},u[`${r}${t}-pull-${d}`]={insetInlineEnd:"auto"},u[`${r}${t}-offset-${d}`]={marginInlineStart:0},u[`${r}${t}-order-${d}`]={order:0}):(u[`${r}${t}-${d}`]=[{[s("display")]:"block",display:"block"},{display:i("display"),flex:`0 0 ${d/n*100}%`,maxWidth:`${d/n*100}%`}],u[`${r}${t}-push-${d}`]={insetInlineStart:`${d/n*100}%`},u[`${r}${t}-pull-${d}`]={insetInlineEnd:`${d/n*100}%`},u[`${r}${t}-offset-${d}`]={marginInlineStart:`${d/n*100}%`},u[`${r}${t}-order-${d}`]={order:d});return u[`${r}${t}-flex`]={flex:l(`${t.replace(/-/,"")}-flex`)},u},kp=(e,t)=>C1(e,t),P1=(e,t,r)=>({[`@media (min-width: ${we(t)})`]:{...kp(e,r)}}),R1=()=>({}),T1=()=>({}),I1=tr("Grid",E1,R1),$1=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin,xxxl:e.screenXXXLMin}),A1=tr("Grid",e=>{const t=er(e,{gridColumns:24}),r=$1(t);return delete r.xs,[S1(t),kp(t,""),kp(t,"-xs"),Object.keys(r).map(n=>P1(t,r[n],`-${n}`)).reduce((n,o)=>({...n,...o}),{})]},T1),j1=(e,t,r,n,o=!1,s,i)=>{const l=a.useMemo(()=>typeof r=="boolean"?{allowClear:r}:r&&typeof r=="object"?r:{allowClear:!1},[r]);return a.useMemo(()=>{const u=!o&&l.allowClear!==!1&&(t.length||s)&&!(i==="combobox"&&s==="");return{allowClear:u,clearIcon:u?l.clearIcon||n||"Г—":null}},[l,n,o,t.length,s,i])},Qx=a.createContext(null);function Vo(){return a.useContext(Qx)}function O1(e=250){const t=a.useRef(null),r=a.useRef(null);a.useEffect(()=>()=>{window.clearTimeout(r.current)},[]);function n(o){(o||t.current===null)&&(t.current=o),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{t.current=null},e)}return[()=>t.current,n]}function e0(e,t){return e.filter(r=>r).some(r=>r.contains(t)||r===t)}function N1(e,t,r,n){const o=Lr(s=>{if(n)return;let i=s.target;i.shadowRoot&&s.composed&&(i=s.composedPath()[0]||i),s._ori_target&&(i=s._ori_target),t&&!e0(e(),i)&&r(!1)});a.useEffect(()=>(window.addEventListener("mousedown",o),()=>window.removeEventListener("mousedown",o)),[o])}function Mp(){return Mp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mp.apply(this,arguments)}const D1=e=>{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}},k1=(e,t)=>{const{prefixCls:r,disabled:n,visible:o,children:s,popupElement:i,animation:l,transitionName:u,popupStyle:d,popupClassName:p,direction:f="ltr",placement:m,builtinPlacements:h,popupMatchSelectWidth:v,popupRender:g,popupAlign:b,getPopupContainer:_,empty:y,onPopupVisibleChange:x,onPopupMouseEnter:S,onPopupMouseDown:w,onPopupBlur:I,...T}=e,R=`${r}-dropdown`;let P=i;g&&(P=g(i));const $=a.useMemo(()=>h||D1(v),[h,v]),A=l?`${R}-${l}`:u,k=typeof v=="number",D=a.useMemo(()=>k?null:v===!1?"minWidth":"width",[v,k]);let z=d;k&&(z={...d,width:v});const X=a.useRef(null);return a.useImperativeHandle(t,()=>({getPopupElement:()=>{var V;return(V=X.current)==null?void 0:V.popupElement}})),a.createElement(Hc,Mp({},T,{showAction:x?["click"]:[],hideAction:x?["click"]:[],popupPlacement:m||(f==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:$,prefixCls:R,popupMotion:{motionName:A},popup:a.createElement("div",{onMouseEnter:S,onMouseDown:w,onBlur:I},P),ref:X,stretch:D,popupAlign:b,popupVisible:o,getPopupContainer:_,popupClassName:ae(p,{[`${R}-empty`]:y}),popupStyle:z,onPopupVisibleChange:x}),s)},M1=a.forwardRef(k1);function wv(e,t){const{key:r}=e;let n;return"value"in e&&({value:n}=e),r??(n!==void 0?n:`rc-index-key-${t}`)}function Lp(e){return typeof e<"u"&&!Number.isNaN(e)}function t0(e,t){const{label:r,value:n,options:o,groupLabel:s}=e||{},i=r||(t?"children":"label");return{label:i,value:n||"value",options:o||"options",groupLabel:s||i}}function L1(e,{fieldNames:t,childrenAsData:r}={}){const n=[],{label:o,value:s,options:i,groupLabel:l}=t0(t,!1);function u(d,p){Array.isArray(d)&&d.forEach(f=>{if(p||!(i in f)){const m=f[s];n.push({key:wv(f,n.length),groupOption:p,data:f,label:f[o],value:m})}else{let m=f[l];m===void 0&&r&&(m=f.label),n.push({key:wv(f,n.length),group:!0,data:f,label:m}),u(f[i],!0)}})}return u(e,!1),n}function zp(e){const t={...e};return"props"in t||Object.defineProperty(t,"props",{get(){return Gm(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}const z1=(e,t,r)=>{if(!t||!t.length)return null;let n=!1;const o=(i,[l,...u])=>{if(!l)return[i];const d=i.split(l);return n=n||d.length>1,d.reduce((p,f)=>[...p,...o(f,u)],[]).filter(Boolean)},s=o(e,t);return n?typeof r<"u"?s.slice(0,r):s:null};function F1(e){const{visible:t,values:r}=e;if(!t)return null;const n=50;return a.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`${r.slice(0,n).map(({label:o,value:s})=>["number","string"].includes(typeof o)?o:s).join(", ")}`,r.length>n?", ...":null)}const V1=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},ih=(e,t=1)=>{if(t<=0){e();return}V1(()=>{ih(e,t-1)})};function B1(e,t,r,n){const[o,s]=a.useState(!1);a.useEffect(()=>{s(!0)},[]);const[i,l]=Pr(e,t),[u,d]=a.useState(!1),p=o?i:!1,f=n(p),m=a.useRef(0),h=Lr(g=>{r&&f!==g&&r(g),l(g)}),v=Lr((g,b={})=>{const{cancelFun:_}=b;m.current+=1;const y=m.current,x=typeof g=="boolean"?g:!f;d(!x);function S(){y===m.current&&!(_!=null&&_())&&(h(x),d(!1))}x?S():ih(()=>{S()})});return[p,f,v,u]}function pd(e){const{children:t,...r}=e;return t?a.createElement("div",r,t):null}const r0=a.createContext(null);function xa(){return a.useContext(r0)}const n0=a.forwardRef((e,t)=>{const{onChange:r,onKeyDown:n,onBlur:o,style:s,syncWidth:i,value:l,className:u,autoComplete:d,...p}=e,{prefixCls:f,mode:m,onSearch:h,onSearchSubmit:v,onInputBlur:g,autoFocus:b,tokenWithEnter:_,placeholder:y,components:{input:x="input"}}=xa(),{id:S,classNames:w,styles:I,open:T,activeDescendantId:R,role:P,disabled:$}=Vo()||{},A=ae(`${f}-input`,w==null?void 0:w.input,u),k=a.useRef(!1),D=a.useRef(null),z=a.useRef(null);a.useImperativeHandle(t,()=>z.current);const X=L=>{let{value:W}=L.target;if(_&&D.current&&/[\r\n]/.test(D.current)){const B=D.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");W=W.replace(B,D.current)}D.current=null,h&&h(W,!0,k.current),r==null||r(L)},V=L=>{const{key:W}=L,{value:B}=L.currentTarget;W==="Enter"&&m==="tags"&&!T&&!k.current&&v&&v(B),n==null||n(L)},Y=L=>{g==null||g(),o==null||o(L)},U=()=>{k.current=!0},F=L=>{if(k.current=!1,m!=="combobox"){const{value:W}=L.currentTarget;h==null||h(W,!0,!1)}},H=L=>{const{clipboardData:W}=L,B=W==null?void 0:W.getData("text");D.current=B||""},[ee,O]=a.useState(void 0);Qt(()=>{const L=z.current;if(i&&L){L.style.width="0px";const W=L.scrollWidth;O(W),L.style.width=""}},[i,l]);const M={id:S,type:m==="combobox"?"text":"search",...p,ref:z,style:{...I==null?void 0:I.input,...s,"--select-input-width":ee},autoFocus:b,autoComplete:d||"off",className:A,disabled:$,value:l||"",onChange:X,onKeyDown:V,onBlur:Y,onPaste:H,onCompositionStart:U,onCompositionEnd:F,role:P||"combobox","aria-expanded":T||!1,"aria-haspopup":"listbox","aria-owns":T?`${S}_list`:void 0,"aria-autocomplete":"list","aria-controls":T?`${S}_list`:void 0,"aria-activedescendant":T?R:void 0};if(a.isValidElement(x)){const L=x.props||{},W={placeholder:e.placeholder||y,...M,...L};return Object.keys(L).forEach(B=>{const J=L[B];typeof J=="function"&&(W[B]=(...K)=>{var re;J(...K),(re=M[B])==null||re.call(M,...K)})}),W.ref=va(x.ref,M.ref),a.cloneElement(x,W)}const G=x;return a.createElement(G,M)});function o0(e){const{prefixCls:t,placeholder:r,displayValues:n}=xa(),{classNames:o,styles:s}=Vo(),{show:i=!0}=e;return n.length?null:a.createElement("div",{className:ae(`${t}-placeholder`,o==null?void 0:o.placeholder),style:{visibility:i?"visible":"hidden",...s==null?void 0:s.placeholder}},r)}const ah=a.createContext(null);function s0(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function H1(e){return e!=null}function U1(e){return!e&&e!==0}function Ev(e){return["string","number"].includes(typeof e)}function Fp(e){let t;return e&&(Ev(e.title)?t=e.title.toString():Ev(e.label)&&(t=e.label.toString())),t}function Vp(){return Vp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vp.apply(this,arguments)}const W1=a.forwardRef(({inputProps:e},t)=>{const{prefixCls:r,searchValue:n,activeValue:o,displayValues:s,maxLength:i,mode:l,components:u}=xa(),{triggerOpen:d,title:p,showSearch:f,classNames:m,styles:h}=Vo(),v=a.useContext(ah),[g,b]=a.useState(!1),_=l==="combobox",y=s[0],x=a.useMemo(()=>_&&o&&!g&&d?o:f?n:"",[_,o,g,d,n,f]),[S,w,I,T]=a.useMemo(()=>{let A,k,D;if(y&&(v!=null&&v.flattenOptions)){const X=v.flattenOptions.find(V=>V.value===y.value);X!=null&&X.data&&(A=X.data.className,k=X.data.style,D=Fp(X.data))}return y&&!D&&(D=Fp(y)),p!==void 0&&(D=p),[A,k,D,!!A||!!k]},[y,v==null?void 0:v.flattenOptions,p]);a.useEffect(()=>{_&&b(!1)},[_,o]);const R=y&&y.label!==null&&y.label!==void 0&&String(y.label).trim()!=="",$=!(_&&(u!=null&&u.input))?y?T?a.createElement("div",{className:ae(`${r}-content-value`,S),style:{...x?{visibility:"hidden"}:{},...w},title:I},y.label):y.label:a.createElement(o0,{show:!x}):null;return a.createElement("div",{className:ae(`${r}-content`,R&&`${r}-content-has-value`,x&&`${r}-content-has-search-value`,T&&`${r}-content-has-option-style`,m==null?void 0:m.content),style:h==null?void 0:h.content,title:T?void 0:I},$,a.createElement(n0,Vp({ref:t},e,{value:x,maxLength:l==="combobox"?i:void 0,onChange:A=>{var k;b(!0),(k=e.onChange)==null||k.call(e,A)}})))}),Jo=void 0;function q1(e,t){const{prefixCls:r,invalidate:n,item:o,renderItem:s,responsive:i,responsiveDisabled:l,registerSize:u,itemKey:d,className:p,style:f,children:m,display:h,order:v,component:g="div",...b}=e,_=i&&!h;function y(T){u(d,T)}a.useEffect(()=>()=>{y(null)},[]);const x=s&&o!==Jo?s(o,{index:v}):m;let S;n||(S={opacity:_?0:1,height:_?0:Jo,overflowY:_?"hidden":Jo,order:i?v:Jo,pointerEvents:_?"none":Jo,position:_?"absolute":Jo});const w={};_&&(w["aria-hidden"]=!0);let I=a.createElement(g,hn({className:ae(!n&&r,p),style:{...S,...f}},w,b,{ref:t}),x);return i&&(I=a.createElement(ei,{onResize:({offsetWidth:T})=>{y(T)},disabled:l},I)),I}const ji=a.forwardRef(q1);function G1(e){if(typeof MessageChannel>"u")Ut(e);else{const t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function K1(){const e=a.useRef(null);return r=>{e.current||(e.current=[],G1(()=>{$o.unstable_batchedUpdates(()=>{e.current.forEach(n=>{n()}),e.current=null})})),e.current.push(r)}}function Zo(e,t){const[r,n]=a.useState(t),o=Lr(s=>{e(()=>{n(s)})});return[r,o]}const Gl=N.createContext(null),X1=(e,t)=>{const r=a.useContext(Gl);if(!r){const{component:l="div",...u}=e;return a.createElement(l,hn({},u,{ref:t}))}const{className:n,...o}=r,{className:s,...i}=e;return a.createElement(Gl.Provider,{value:null},a.createElement(ji,hn({ref:t,className:ae(n,s)},o,i)))},Y1=a.forwardRef(X1),i0="responsive",a0="invalidate";function J1(e){return`+ ${e.length} ...`}function Z1(e,t){const{prefixCls:r="rc-overflow",data:n=[],renderItem:o,renderRawItem:s,itemKey:i,itemWidth:l=10,ssr:u,style:d,className:p,maxCount:f,renderRest:m,renderRawRest:h,prefix:v,suffix:g,component:b="div",itemComponent:_,onVisibleChange:y,...x}=e,S=u==="full",w=K1(),[I,T]=Zo(w,null),R=I||0,[P,$]=Zo(w,new Map),[A,k]=Zo(w,0),[D,z]=Zo(w,0),[X,V]=Zo(w,0),[Y,U]=Zo(w,0),[F,H]=a.useState(null),[ee,O]=a.useState(null),M=a.useMemo(()=>ee===null&&S?Number.MAX_SAFE_INTEGER:ee||0,[ee,I]),[G,L]=a.useState(!1),W=`${r}-item`,B=Math.max(A,D),J=f===i0,K=n.length&&J,re=f===a0,se=K||typeof f=="number"&&n.length>f,Z=a.useMemo(()=>{let ue=n;return K?I===null&&S?ue=n:ue=n.slice(0,Math.min(n.length,R/l)):typeof f=="number"&&(ue=n.slice(0,f)),ue},[n,l,I,f,K]),ne=a.useMemo(()=>K?n.slice(M+1):n.slice(Z.length),[n,Z,K,M]),ie=a.useCallback((ue,ye)=>typeof i=="function"?i(ue):(i&&(ue==null?void 0:ue[i]))??ye,[i]),he=a.useCallback(o||(ue=>ue),[o]);function me(ue,ye,Be){ee===ue&&(ye===void 0||ye===F)||(O(ue),Be||(L(ue<n.length-1),y==null||y(ue)),ye!==void 0&&H(ye))}function Pe(ue,ye){T(ye.clientWidth)}function Se(ue,ye){$(Be=>{const Ae=new Map(Be);return ye===null?Ae.delete(ue):Ae.set(ue,ye),Ae})}function Ce(ue,ye){z(ye),k(D)}function Ze(ue,ye){V(ye)}function Ye(ue,ye){U(ye)}function pe(ue){return P.get(ie(Z[ue],ue))}Qt(()=>{if(R&&typeof B=="number"&&Z){let ue=X+Y;const ye=Z.length,Be=ye-1;if(!ye){me(0,null);return}for(let Ae=0;Ae<ye;Ae+=1){let Ee=pe(Ae);if(S&&(Ee=Ee||0),Ee===void 0){me(Ae-1,void 0,!0);break}if(ue+=Ee,Be===0&&ue<=R||Ae===Be-1&&ue+pe(Be)<=R){me(Be,null);break}else if(ue+B>R){me(Ae-1,ue-Ee-Y+D);break}}g&&pe(0)+Y>R&&H(null)}},[R,P,D,X,Y,ie,Z]);const be=G&&!!ne.length;let j={};F!==null&&K&&(j={position:"absolute",top:0,insetInlineStart:F});const q={prefixCls:W,responsive:K,component:_,invalidate:re},Q=s?(ue,ye)=>{const Be=ie(ue,ye);return a.createElement(Gl.Provider,{key:Be,value:{...q,order:ye,item:ue,itemKey:Be,registerSize:Se,display:ye<=M}},s(ue,ye))}:(ue,ye)=>{const Be=ie(ue,ye);return a.createElement(ji,hn({},q,{order:ye,key:Be,item:ue,renderItem:he,itemKey:Be,registerSize:Se,display:ye<=M}))},le={order:be?M:Number.MAX_SAFE_INTEGER,className:`${W}-rest`,registerSize:Ce,display:be},de=m||J1,ce=h?a.createElement(Gl.Provider,{value:{...q,...le}},h(ne)):a.createElement(ji,hn({},q,le),typeof de=="function"?de(ne):de),fe=a.createElement(b,hn({className:ae(!re&&r,p),style:d,ref:t},x),v&&a.createElement(ji,hn({},q,{responsive:J,responsiveDisabled:!K,order:-1,className:`${W}-prefix`,registerSize:Ze,display:!0}),v),Z.map(Q),se?ce:null,g&&a.createElement(ji,hn({},q,{responsive:J,responsiveDisabled:!K,order:M,className:`${W}-suffix`,registerSize:Ye,display:!0,style:j}),g));return J?a.createElement(ei,{onResize:Pe,disabled:!K},fe):fe}const kn=a.forwardRef(Z1);kn.Item=Y1;kn.RESPONSIVE=i0;kn.INVALIDATE=a0;const l0=e=>{const{className:t,style:r,customizeIcon:n,customizeIconProps:o,children:s,onMouseDown:i,onClick:l}=e,u=typeof n=="function"?n(o):n;return a.createElement("span",{className:t,onMouseDown:d=>{d.preventDefault(),i==null||i(d)},style:{userSelect:"none",WebkitUserSelect:"none",...r},unselectable:"on",onClick:l,"aria-hidden":!0},u!==void 0?u:a.createElement("span",{className:ae(t.split(/\s+/).map(d=>`${d}-icon`))},s))};function Bp(){return Bp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bp.apply(this,arguments)}function Q1(e){return e.key??e.value}const Sv=e=>{e.preventDefault(),e.stopPropagation()},ej=a.forwardRef(function({inputProps:t},r){const{prefixCls:n,displayValues:o,searchValue:s,mode:i,onSelectorRemove:l,removeIcon:u}=xa(),{disabled:d,showSearch:p,triggerOpen:f,rawOpen:m,toggleOpen:h,autoClearSearchValue:v,tagRender:g,maxTagPlaceholder:b,maxTagTextLength:_,maxTagCount:y,classNames:x,styles:S}=Vo(),w=`${n}-selection-item`;let I=s;!m&&i==="multiple"&&v!==!1&&(I="");const T=p&&I||"",R=p&&!d,P=u??"Г—",$=b??(U=>`+ ${U.length} ...`),A=g,k=U=>{h(U)},D=U=>{l==null||l(U)},z=(U,F,H,ee,O)=>a.createElement("span",{title:Fp(U),className:ae(w,{[`${w}-disabled`]:H},x==null?void 0:x.item),style:S==null?void 0:S.item},a.createElement("span",{className:ae(`${w}-content`,x==null?void 0:x.itemContent),style:S==null?void 0:S.itemContent},F),ee&&a.createElement(l0,{className:ae(`${w}-remove`,x==null?void 0:x.itemRemove),style:S==null?void 0:S.itemRemove,onMouseDown:Sv,onClick:O,customizeIcon:P},"Г—")),X=(U,F,H,ee,O,M,G)=>{const L=W=>{Sv(W),k(!f)};return a.createElement("span",{onMouseDown:L},A({label:F,value:U,index:G==null?void 0:G.index,disabled:H,closable:ee,onClose:O,isMaxTag:!!M}))},V=(U,F)=>{const{disabled:H,label:ee,value:O}=U,M=!d&&!H;let G=ee;if(typeof _=="number"&&(typeof ee=="string"||typeof ee=="number")){const W=String(G);W.length>_&&(G=`${W.slice(0,_)}...`)}const L=W=>{W&&W.stopPropagation(),D(U)};return typeof A=="function"?X(O,G,H,M,L,void 0,F):z(U,G,H,M,L)},Y=U=>{if(!o.length)return null;const F=typeof $=="function"?$(U):$;return typeof A=="function"?X(void 0,F,!1,!1,void 0,!0):z({title:F},F,!1)};return a.createElement(kn,{prefixCls:`${n}-content`,className:x==null?void 0:x.content,style:S==null?void 0:S.content,prefix:!o.length&&!T&&a.createElement(o0,null),data:o,renderItem:V,renderRest:Y,suffix:a.createElement(n0,Bp({ref:r,disabled:d,readOnly:!R},t,{value:T||"",syncWidth:!0})),itemKey:Q1,maxCount:y})}),tj=a.forwardRef(function(t,r){const{multiple:n,onInputKeyDown:o,tabIndex:s}=xa(),i=Vo(),{showSearch:l}=i,d={...ta(i,{aria:!0}),onKeyDown:o,readOnly:!l,tabIndex:s};return n?a.createElement(ej,{ref:r,inputProps:d}):a.createElement(W1,{ref:r,inputProps:d})});function rj(e){return e&&![Xe.ESC,Xe.SHIFT,Xe.BACKSPACE,Xe.TAB,Xe.WIN_KEY,Xe.ALT,Xe.META,Xe.WIN_KEY_RIGHT,Xe.CTRL,Xe.SEMICOLON,Xe.EQUALS,Xe.CAPS_LOCK,Xe.CONTEXT_MENU,Xe.UP,Xe.LEFT,Xe.RIGHT,Xe.F1,Xe.F2,Xe.F3,Xe.F4,Xe.F5,Xe.F6,Xe.F7,Xe.F8,Xe.F9,Xe.F10,Xe.F11,Xe.F12].includes(e)}function Kl(){return Kl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kl.apply(this,arguments)}const nj=["value","onChange","removeIcon","placeholder","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex","activeValue","onSelectorRemove","focused"],oj=a.forwardRef(function(t,r){const{prefixCls:n,className:o,style:s,prefix:i,suffix:l,clearIcon:u,children:d,multiple:p,displayValues:f,placeholder:m,mode:h,searchValue:v,onSearch:g,onSearchSubmit:b,onInputBlur:_,maxLength:y,autoFocus:x,onMouseDown:S,onClearMouseDown:w,onInputKeyDown:I,onSelectorRemove:T,tokenWithEnter:R,components:P,...$}=t,{triggerOpen:A,toggleOpen:k,showSearch:D,disabled:z,loading:X,classNames:V,styles:Y}=Vo(),U=a.useRef(null),F=a.useRef(null),H=Lr(B=>{const{which:J}=B,K=F.current instanceof HTMLTextAreaElement;if(!K&&A&&(J===Xe.UP||J===Xe.DOWN)&&B.preventDefault(),I&&I(B),K&&!A&&~[Xe.UP,Xe.DOWN,Xe.LEFT,Xe.RIGHT].indexOf(J))return;!(B.ctrlKey||B.altKey||B.metaKey)&&rj(J)&&k(!0)});a.useImperativeHandle(r,()=>({focus:B=>{var J,K;(K=(J=F.current||U.current).focus)==null||K.call(J,B)},blur:()=>{var B,J;(J=(B=F.current||U.current).blur)==null||J.call(B)},nativeElement:Bl(U.current)}));const ee=Lr(B=>{var J;if(!z){const K=Bl(F.current);B.nativeEvent._ori_target=K;const re=K===B.target||(K==null?void 0:K.contains(B.target));K&&!re&&B.preventDefault();const ne=A&&!p&&(h==="combobox"||D)||A&&p&&re;B.nativeEvent._select_lazy?A&&k(!1):((J=F.current)==null||J.focus(),ne||k())}S==null||S(B)}),{root:O}=P,M=gr($,nj),G=ta(M,{aria:!0}),L=Object.keys(G),W={...t,onInputKeyDown:H};if(O){const B=O.props||{},J={...B,...M};return Object.keys(B).forEach(K=>{const re=B[K],se=M[K];typeof re=="function"&&typeof se=="function"&&(J[K]=(...Z)=>{se(...Z),re(...Z)})}),a.isValidElement(O)?a.cloneElement(O,{...J,ref:va(O.ref,U)}):a.createElement(O,Kl({},J,{ref:U}))}return a.createElement(r0.Provider,{value:W},a.createElement("div",Kl({},gr(M,L),{ref:U,className:o,style:s,onMouseDown:ee}),a.createElement(pd,{className:ae(`${n}-prefix`,V==null?void 0:V.prefix),style:Y==null?void 0:Y.prefix},i),a.createElement(tj,{ref:F}),a.createElement(pd,{className:ae(`${n}-suffix`,{[`${n}-suffix-loading`]:X},V==null?void 0:V.suffix),style:Y==null?void 0:Y.suffix},l),u&&a.createElement(pd,{className:ae(`${n}-clear`,V==null?void 0:V.clear),style:Y==null?void 0:Y.clear,onMouseDown:B=>{B.nativeEvent._select_lazy=!0,w==null||w(B)}},u),d))});function sj(e,t,r){return a.useMemo(()=>{let{root:n,input:o}=e||{};return r&&(n=r()),t&&(o=t()),{root:n,input:o}},[e,t,r])}function Hp(){return Hp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hp.apply(this,arguments)}const Up=e=>e==="tags"||e==="multiple",ij=a.forwardRef((e,t)=>{const{id:r,prefixCls:n,className:o,styles:s,classNames:i,showSearch:l,tagRender:u,showScrollBar:d="optional",direction:p,omitDomProps:f,displayValues:m,onDisplayValuesChange:h,emptyOptions:v,notFoundContent:g="Not Found",onClear:b,maxCount:_,placeholder:y,mode:x,disabled:S,loading:w,getInputElement:I,getRawInputElement:T,open:R,defaultOpen:P,onPopupVisibleChange:$,activeValue:A,onActiveValueChange:k,activeDescendantId:D,searchValue:z,autoClearSearchValue:X,onSearch:V,onSearchSplit:Y,tokenSeparators:U,allowClear:F,prefix:H,suffix:ee,suffixIcon:O,clearIcon:M,OptionList:G,animation:L,transitionName:W,popupStyle:B,popupClassName:J,popupMatchSelectWidth:K,popupRender:re,popupAlign:se,placement:Z,builtinPlacements:ne,getPopupContainer:ie,showAction:he=[],onFocus:me,onBlur:Pe,onKeyUp:Se,onKeyDown:Ce,onMouseDown:Ze,components:Ye,...pe}=e,be=Up(x),j=a.useRef(null),q=a.useRef(null),Q=a.useRef(null),[le,de]=a.useState(!1);a.useImperativeHandle(t,()=>{var Me,st;return{focus:(Me=j.current)==null?void 0:Me.focus,blur:(st=j.current)==null?void 0:st.blur,scrollTo:bt=>{var It;return(It=Q.current)==null?void 0:It.scrollTo(bt)},nativeElement:Bl(j.current)}});const ce=sj(Ye,I,T),fe=a.useMemo(()=>{var st;if(x!=="combobox")return z;const Me=(st=m[0])==null?void 0:st.value;return typeof Me=="string"||typeof Me=="number"?String(Me):""},[z,x,m]),ue=x==="combobox"&&typeof I=="function"&&I()||null,ye=!g&&v,[Be,Ae,Ee,lt]=B1(P||!1,R,$,Me=>S||ye?!1:Me),ht=a.useMemo(()=>(U||[]).some(Me=>[`
`,`\r
`].includes(Me)),[U]),dt=(Me,st,bt)=>{if(be&&Lp(_)&&m.length>=_)return;let It=!0,dr=Me;k==null||k(null);const Pn=z1(Me,U,Lp(_)?_-m.length:void 0),Yt=bt?null:Pn;return x!=="combobox"&&Yt&&(dr="",Y==null||Y(Yt),Ee(!1),It=!1),V&&fe!==dr&&V(dr,{source:st?"typing":"effect"}),Me&&st&&It&&Ee(!0),It},mt=Me=>{!Me||!Me.trim()||V(Me,{source:"submit"})};a.useEffect(()=>{!Be&&!be&&x!=="combobox"&&dt("",!1,!1)},[Be]),a.useEffect(()=>{S&&(Ee(!1),de(!1))},[S,Ae]);const[ft,vt]=O1(),ze=a.useRef(!1),We=Me=>{var Pn;const st=ft(),{key:bt}=Me,It=bt==="Enter",dr=bt===" ";if(It||dr){const Yt=x==="combobox";(dr&&!(Yt||l)||It&&!Yt)&&Me.preventDefault(),Ae||Ee(!0)}if(vt(!!fe),bt==="Backspace"&&!st&&be&&!fe&&m.length){const Yt=[...m];let uo=null;for(let po=Yt.length-1;po>=0;po-=1){const Ga=Yt[po];if(!Ga.disabled){Yt.splice(po,1),uo=Ga;break}}uo&&h(Yt,{type:"remove",values:[uo]})}Ae&&(!It||!ze.current)&&!dr&&(It&&(ze.current=!0),(Pn=Q.current)==null||Pn.onKeyDown(Me)),Ce==null||Ce(Me)},ke=(Me,...st)=>{var bt;Ae&&((bt=Q.current)==null||bt.onKeyUp(Me,...st)),Me.key==="Enter"&&(ze.current=!1),Se==null||Se(Me,...st)},nt=Lr(Me=>{const st=m.filter(bt=>bt!==Me);h(st,{type:"remove",values:[Me]})}),ut=()=>{ze.current=!1},_e=()=>{var Me;return[Bl(j.current),(Me=q.current)==null?void 0:Me.getPopupElement()]};N1(_e,Ae,Ee,!!ce.root);const Qe=a.useRef(!1),ge=Me=>{de(!0),S||(he.includes("focus")&&Ee(!0),me==null||me(Me))},Te=()=>{Ae&&!Qe.current&&Ee(!1,{cancelFun:()=>e0(_e(),document.activeElement)})},et=Me=>{de(!1),fe&&(x==="tags"?V(fe,{source:"submit"}):x==="multiple"&&V("",{source:"blur"})),Te(),S||Pe==null||Pe(Me)},xe=(Me,...st)=>{var dr;const{target:bt}=Me,It=(dr=q.current)==null?void 0:dr.getPopupElement();It!=null&&It.contains(bt)&&Ee&&Ee(!0),Ze==null||Ze(Me,...st),Qe.current=!0,ih(()=>{Qe.current=!1})},[,$e]=a.useState({});function Fe(){$e({})}let Ge;ce.root&&(Ge=Me=>{Ee(Me)});const rt=a.useMemo(()=>({...e,notFoundContent:g,open:Ae,triggerOpen:Ae,rawOpen:Be,id:r,showSearch:l,multiple:be,toggleOpen:Ee,showScrollBar:d,styles:s,classNames:i,lockOptions:lt}),[e,g,Ee,r,l,be,Ae,Be,d,s,i,lt]),qt=a.useMemo(()=>{const Me=ee??O;return typeof Me=="function"?Me({searchValue:fe,open:Ae,focused:le,showSearch:l,loading:w}):Me},[ee,O,fe,Ae,le,l,w]),ur=()=>{var Me;b==null||b(),(Me=j.current)==null||Me.focus(),h([],{type:"clear",values:m}),dt("",!1,!1)},{allowClear:Gt,clearIcon:sd}=j1(n,m,F,M,S,fe,x),id=a.createElement(G,{ref:Q}),qa=ae(n,o,{[`${n}-focused`]:le,[`${n}-multiple`]:be,[`${n}-single`]:!be,[`${n}-allow-clear`]:Gt,[`${n}-show-arrow`]:qt!=null,[`${n}-disabled`]:S,[`${n}-loading`]:w,[`${n}-open`]:Ae,[`${n}-customize-input`]:ue,[`${n}-show-search`]:l});let ct=a.createElement(oj,Hp({},pe,{ref:j,prefixCls:n,className:qa,focused:le,prefix:H,suffix:qt,clearIcon:sd,multiple:be,mode:x,displayValues:m,placeholder:y,searchValue:fe,activeValue:A,onSearch:dt,onSearchSubmit:mt,onInputBlur:ut,onFocus:ge,onBlur:et,onClearMouseDown:ur,onKeyDown:We,onKeyUp:ke,onSelectorRemove:nt,tokenWithEnter:ht,onMouseDown:xe,components:ce}));return ct=a.createElement(M1,{ref:q,disabled:S,prefixCls:n,visible:Ae,popupElement:id,animation:L,transitionName:W,popupStyle:B,popupClassName:J,direction:p,popupMatchSelectWidth:K,popupRender:re,popupAlign:se,placement:Z,builtinPlacements:ne,getPopupContainer:ie,empty:v,onPopupVisibleChange:Ge,onPopupMouseEnter:Fe,onPopupMouseDown:xe,onPopupBlur:Te},ct),a.createElement(Qx.Provider,{value:rt},a.createElement(F1,{visible:le&&!Ae,values:m}),ct)}),lh=()=>null;lh.isSelectOptGroup=!0;const ch=()=>null;ch.isSelectOption=!0;const c0=a.forwardRef(({height:e,offsetY:t,offsetX:r,children:n,prefixCls:o,onInnerResize:s,innerProps:i,rtl:l,extra:u},d)=>{let p={},f={display:"flex",flexDirection:"column"};return t!==void 0&&(p={height:e,position:"relative",overflow:"hidden"},f={...f,transform:`translateY(${t}px)`,[l?"marginRight":"marginLeft"]:-r,position:"absolute",left:0,right:0,top:0}),a.createElement("div",{style:p},a.createElement(ei,{onResize:({offsetHeight:m})=>{m&&s&&s()}},a.createElement("div",hn({style:f,className:ae({[`${o}-holder-inner`]:o}),ref:d},i),n,u)))});c0.displayName="Filler";function aj({children:e,setRef:t}){const r=a.useCallback(n=>{t(n)},[]);return a.cloneElement(e,{ref:r})}function lj(e,t,r,n,o,s,i,{getKey:l}){return e.slice(t,r+1).map((u,d)=>{const p=t+d,f=i(u,p,{style:{width:n},offsetX:o}),m=l(u);return a.createElement(aj,{key:m,setRef:h=>s(u,h)},f)})}function cj(e,t,r){const n=e.length,o=t.length;let s,i;if(n===0&&o===0)return null;n<o?(s=e,i=t):(s=t,i=e);const l={__EMPTY_ITEM__:!0};function u(f){return f!==void 0?r(f):l}let d=null,p=Math.abs(n-o)!==1;for(let f=0;f<i.length;f+=1){const m=u(s[f]),h=u(i[f]);if(m!==h){d=f,p=p||m!==u(i[f+1]);break}}return d===null?null:{index:d,multiple:p}}function uj(e,t,r){const[n,o]=a.useState(e),[s,i]=a.useState(null);return a.useEffect(()=>{const l=cj(n||[],e||[],t);(l==null?void 0:l.index)!==void 0&&i(e[l.index]),o(e)},[e]),[s]}const Cv=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),u0=(e,t,r,n)=>{const o=a.useRef(!1),s=a.useRef(null);function i(){clearTimeout(s.current),o.current=!0,s.current=setTimeout(()=>{o.current=!1},50)}const l=a.useRef({top:e,bottom:t,left:r,right:n});return l.current.top=e,l.current.bottom=t,l.current.left=r,l.current.right=n,(u,d,p=!1)=>{const f=u?d<0&&l.current.left||d>0&&l.current.right:d<0&&l.current.top||d>0&&l.current.bottom;return p&&f?(clearTimeout(s.current),o.current=!1):(!f||o.current)&&i(),!o.current&&f}};function dj(e,t,r,n,o,s,i){const l=a.useRef(0),u=a.useRef(null),d=a.useRef(null),p=a.useRef(!1),f=u0(t,r,n,o);function m(y,x){if(Ut.cancel(u.current),f(!1,x))return;const S=y;if(!S._virtualHandled)S._virtualHandled=!0;else return;l.current+=x,d.current=x,Cv||S.preventDefault(),u.current=Ut(()=>{const w=p.current?10:1;i(l.current*w,!1),l.current=0})}function h(y,x){i(x,!0),Cv||y.preventDefault()}const v=a.useRef(null),g=a.useRef(null);function b(y){if(!e)return;Ut.cancel(g.current),g.current=Ut(()=>{v.current=null},2);const{deltaX:x,deltaY:S,shiftKey:w}=y;let I=x,T=S;(v.current==="sx"||!v.current&&w&&S&&!x)&&(I=S,T=0,v.current="sx");const R=Math.abs(I),P=Math.abs(T);v.current===null&&(v.current=s&&R>P?"x":"y"),v.current==="y"?m(y,T):h(y,I)}function _(y){e&&(p.current=y.detail===d.current)}return[b,_]}function pj(e,t,r,n){const[o,s]=a.useMemo(()=>[new Map,[]],[e,r.id,n]);return(l,u=l)=>{let d=o.get(l),p=o.get(u);if(d===void 0||p===void 0){const f=e.length;for(let m=s.length;m<f;m+=1){const h=e[m],v=t(h);o.set(v,m);const g=r.get(v)??n;if(s[m]=(s[m-1]||0)+g,v===l&&(d=m),v===u&&(p=m),d!==void 0&&p!==void 0)break}}return{top:s[d-1]||0,bottom:s[p]}}}class fj{constructor(){St(this,"maps");St(this,"id",0);St(this,"diffRecords",new Map);this.maps=Object.create(null)}set(t,r){this.diffRecords.set(t,this.maps[t]),this.maps[t]=r,this.id+=1}get(t){return this.maps[t]}resetRecord(){this.diffRecords.clear()}getRecord(){return this.diffRecords}}function Pv(e){const t=parseFloat(e);return isNaN(t)?0:t}function mj(e,t,r){const[n,o]=a.useState(0),s=a.useRef(new Map),i=a.useRef(new fj),l=a.useRef(0);function u(){l.current+=1}function d(f=!1){u();const m=()=>{let h=!1;s.current.forEach((v,g)=>{if(v&&v.offsetParent){const{offsetHeight:b}=v,{marginTop:_,marginBottom:y}=getComputedStyle(v),x=Pv(_),S=Pv(y),w=b+x+S;i.current.get(g)!==w&&(i.current.set(g,w),h=!0)}}),h&&o(v=>v+1)};if(f)m();else{l.current+=1;const h=l.current;Promise.resolve().then(()=>{h===l.current&&m()})}}function p(f,m){const h=e(f);s.current.get(h),m?(s.current.set(h,m),d()):s.current.delete(h)}return a.useEffect(()=>u,[]),[p,d,i.current,n]}const Rv=14/15;function hj(e,t,r){const n=a.useRef(!1),o=a.useRef(0),s=a.useRef(0),i=a.useRef(null),l=a.useRef(null);let u;const d=m=>{if(n.current){const h=Math.ceil(m.touches[0].pageX),v=Math.ceil(m.touches[0].pageY);let g=o.current-h,b=s.current-v;const _=Math.abs(g)>Math.abs(b);_?o.current=h:s.current=v;const y=r(_,_?g:b,!1,m);y&&m.preventDefault(),clearInterval(l.current),y&&(l.current=setInterval(()=>{_?g*=Rv:b*=Rv;const x=Math.floor(_?g:b);(!r(_,x,!0)||Math.abs(x)<=.1)&&clearInterval(l.current)},16))}},p=()=>{n.current=!1,u()},f=m=>{u(),m.touches.length===1&&!n.current&&(n.current=!0,o.current=Math.ceil(m.touches[0].pageX),s.current=Math.ceil(m.touches[0].pageY),i.current=m.target,i.current.addEventListener("touchmove",d,{passive:!1}),i.current.addEventListener("touchend",p,{passive:!0}))};u=()=>{i.current&&(i.current.removeEventListener("touchmove",d),i.current.removeEventListener("touchend",p))},Qt(()=>(e&&t.current.addEventListener("touchstart",f,{passive:!0}),()=>{var m;(m=t.current)==null||m.removeEventListener("touchstart",f),u(),clearInterval(l.current)}),[e])}function Tv(e){return Math.floor(e**.5)}function Wp(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function gj(e,t,r){a.useEffect(()=>{const n=t.current;if(e&&n){let o=!1,s,i;const l=()=>{Ut.cancel(s)},u=()=>{l(),s=Ut(()=>{r(i),u()})},d=()=>{o=!1,l()},p=m=>{if(m.target.draggable||m.button!==0)return;const h=m;h._virtualHandled||(h._virtualHandled=!0,o=!0)},f=m=>{if(o){const h=Wp(m,!1),{top:v,bottom:g}=n.getBoundingClientRect();if(h<=v){const b=v-h;i=-Tv(b),u()}else if(h>=g){const b=h-g;i=Tv(b),u()}else l()}};return n.addEventListener("mousedown",p),n.ownerDocument.addEventListener("mouseup",d),n.ownerDocument.addEventListener("mousemove",f),n.ownerDocument.addEventListener("dragend",d),()=>{n.removeEventListener("mousedown",p),n.ownerDocument.removeEventListener("mouseup",d),n.ownerDocument.removeEventListener("mousemove",f),n.ownerDocument.removeEventListener("dragend",d),l()}}},[e])}const vj=10;function bj(e,t,r,n,o,s,i,l){const u=a.useRef(),[d,p]=a.useState(null);return Qt(()=>{if(d&&d.times<vj){if(!e.current){p(x=>({...x}));return}s();const{targetAlign:f,originAlign:m,index:h,offset:v}=d,g=e.current.clientHeight;let b=!1,_=f,y=null;if(g){const x=f||m;let S=0,w=0,I=0;const T=Math.min(t.length-1,h);for(let P=0;P<=T;P+=1){const $=o(t[P]);w=S;const A=r.get($);I=w+(A===void 0?n:A),S=I}let R=x==="top"?v:g-v;for(let P=T;P>=0;P-=1){const $=o(t[P]),A=r.get($);if(A===void 0){b=!0;break}if(R-=A,R<=0)break}switch(x){case"top":y=w-v;break;case"bottom":y=I-g+v;break;default:{const{scrollTop:P}=e.current,$=P+g;w<P?_="top":I>$&&(_="bottom")}}y!==null&&i(y),y!==d.lastTop&&(b=!0)}b&&p({...d,times:d.times+1,targetAlign:_,lastTop:y})}},[d,e.current]),f=>{if(f==null){l();return}if(Ut.cancel(u.current),typeof f=="number")i(f);else if(f&&typeof f=="object"){let m;const{align:h}=f;"index"in f?{index:m}=f:m=t.findIndex(g=>o(g)===f.key);const{offset:v=0}=f;p({times:0,index:m,offset:v,originAlign:h})}}}const Iv=a.forwardRef((e,t)=>{const{prefixCls:r,rtl:n,scrollOffset:o,scrollRange:s,onStartMove:i,onStopMove:l,onScroll:u,horizontal:d,spinSize:p,containerSize:f,style:m,thumbStyle:h,showScrollBar:v}=e,[g,b]=a.useState(!1),[_,y]=a.useState(null),[x,S]=a.useState(null),w=!n,I=a.useRef(),T=a.useRef(),[R,P]=a.useState(v),$=a.useRef(),A=()=>{v===!0||v===!1||(clearTimeout($.current),P(!0),$.current=setTimeout(()=>{P(!1)},3e3))},k=s-f||0,D=f-p||0,z=a.useMemo(()=>o===0||k===0?0:o/k*D,[o,k,D]),X=M=>{M.stopPropagation(),M.preventDefault()},V=a.useRef({top:z,dragging:g,pageY:_,startTop:x});V.current={top:z,dragging:g,pageY:_,startTop:x};const Y=M=>{b(!0),y(Wp(M,d)),S(V.current.top),i(),M.stopPropagation(),M.preventDefault()};a.useEffect(()=>{const M=W=>{W.preventDefault()},G=I.current,L=T.current;return G.addEventListener("touchstart",M,{passive:!1}),L.addEventListener("touchstart",Y,{passive:!1}),()=>{G.removeEventListener("touchstart",M),L.removeEventListener("touchstart",Y)}},[]);const U=a.useRef();U.current=k;const F=a.useRef();F.current=D,a.useEffect(()=>{if(g){let M;const G=W=>{const{dragging:B,pageY:J,startTop:K}=V.current;Ut.cancel(M);const re=I.current.getBoundingClientRect(),se=f/(d?re.width:re.height);if(B){const Z=(Wp(W,d)-J)*se;let ne=K;!w&&d?ne-=Z:ne+=Z;const ie=U.current,he=F.current,me=he?ne/he:0;let Pe=Math.ceil(me*ie);Pe=Math.max(Pe,0),Pe=Math.min(Pe,ie),M=Ut(()=>{u(Pe,d)})}},L=()=>{b(!1),l()};return window.addEventListener("mousemove",G,{passive:!0}),window.addEventListener("touchmove",G,{passive:!0}),window.addEventListener("mouseup",L,{passive:!0}),window.addEventListener("touchend",L,{passive:!0}),()=>{window.removeEventListener("mousemove",G),window.removeEventListener("touchmove",G),window.removeEventListener("mouseup",L),window.removeEventListener("touchend",L),Ut.cancel(M)}}},[g]),a.useEffect(()=>(A(),()=>{clearTimeout($.current)}),[o]),a.useImperativeHandle(t,()=>({delayHidden:A}));const H=`${r}-scrollbar`,ee={position:"absolute",visibility:R?null:"hidden"},O={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return d?(Object.assign(ee,{height:8,left:0,right:0,bottom:0}),Object.assign(O,{height:"100%",width:p,[w?"left":"right"]:z})):(Object.assign(ee,{width:8,top:0,bottom:0,[w?"right":"left"]:0}),Object.assign(O,{width:"100%",height:p,top:z})),a.createElement("div",{ref:I,className:ae(H,{[`${H}-horizontal`]:d,[`${H}-vertical`]:!d,[`${H}-visible`]:R}),style:{...ee,...m},onMouseDown:X,onMouseMove:A},a.createElement("div",{ref:T,className:ae(`${H}-thumb`,{[`${H}-thumb-moving`]:g}),style:{...O,...h},onMouseDown:Y}))}),_j=20;function $v(e=0,t=0){let r=e/t*e;return isNaN(r)&&(r=0),r=Math.max(r,_j),Math.floor(r)}const yj=[],xj={overflowY:"auto",overflowAnchor:"none"};function wj(e,t){const{prefixCls:r="rc-virtual-list",className:n,height:o,itemHeight:s,fullHeight:i=!0,style:l,data:u,children:d,itemKey:p,virtual:f,direction:m,scrollWidth:h,component:v="div",onScroll:g,onVirtualScroll:b,onVisibleChange:_,innerProps:y,extraRender:x,styles:S,showScrollBar:w="optional",...I}=e,T=a.useCallback(ge=>typeof p=="function"?p(ge):ge==null?void 0:ge[p],[p]),[R,P,$,A]=mj(T),k=!!(f!==!1&&o&&s),D=a.useMemo(()=>Object.values($.maps).reduce((ge,Te)=>ge+Te,0),[$.id,$.maps]),z=k&&u&&(Math.max(s*u.length,D)>o||!!h),X=m==="rtl",V=ae(r,{[`${r}-rtl`]:X},n),Y=u||yj,U=a.useRef(),F=a.useRef(),H=a.useRef(),[ee,O]=a.useState(0),[M,G]=a.useState(0),[L,W]=a.useState(!1),B=()=>{W(!0)},J=()=>{W(!1)},K={getKey:T};function re(ge){O(Te=>{let et;typeof ge=="function"?et=ge(Te):et=ge;const xe=le(et);return U.current.scrollTop=xe,xe})}const se=a.useRef({start:0,end:Y.length}),Z=a.useRef(),[ne]=uj(Y,T);Z.current=ne;const{scrollHeight:ie,start:he,end:me,offset:Pe}=a.useMemo(()=>{var Fe;if(!k)return{scrollHeight:void 0,start:0,end:Y.length-1,offset:void 0};if(!z)return{scrollHeight:((Fe=F.current)==null?void 0:Fe.offsetHeight)||0,start:0,end:Y.length-1,offset:void 0};let ge=0,Te,et,xe;const $e=Y.length;for(let Ge=0;Ge<$e;Ge+=1){const rt=Y[Ge],qt=T(rt),ur=$.get(qt),Gt=ge+(ur===void 0?s:ur);Gt>=ee&&Te===void 0&&(Te=Ge,et=ge),Gt>ee+o&&xe===void 0&&(xe=Ge),ge=Gt}return Te===void 0&&(Te=0,et=0,xe=Math.ceil(o/s)),xe===void 0&&(xe=Y.length-1),xe=Math.min(xe+1,Y.length-1),{scrollHeight:ge,start:Te,end:xe,offset:et}},[z,k,ee,Y,A,o]);se.current.start=he,se.current.end=me,a.useLayoutEffect(()=>{const ge=$.getRecord();if(ge.size===1){const Te=Array.from(ge.keys())[0],et=ge.get(Te),xe=Y[he];if(xe&&et===void 0&&T(xe)===Te){const Ge=$.get(Te)-s;re(rt=>rt+Ge)}}$.resetRecord()},[ie]);const[Se,Ce]=a.useState({width:0,height:o}),Ze=ge=>{Ce({width:ge.offsetWidth,height:ge.offsetHeight})},Ye=a.useRef(),pe=a.useRef(),be=a.useMemo(()=>$v(Se.width,h),[Se.width,h]),j=a.useMemo(()=>$v(Se.height,ie),[Se.height,ie]),q=ie-o,Q=a.useRef(q);Q.current=q;function le(ge){let Te=ge;return Number.isNaN(Q.current)||(Te=Math.min(Te,Q.current)),Te=Math.max(Te,0),Te}const de=ee<=0,ce=ee>=q,fe=M<=0,ue=M>=h,ye=u0(de,ce,fe,ue),Be=()=>({x:X?-M:M,y:ee}),Ae=a.useRef(Be()),Ee=Lr(ge=>{if(b){const Te={...Be(),...ge};(Ae.current.x!==Te.x||Ae.current.y!==Te.y)&&(b(Te),Ae.current=Te)}});function lt(ge,Te){const et=ge;Te?($o.flushSync(()=>{G(et)}),Ee()):re(et)}function ht(ge){const{scrollTop:Te}=ge.currentTarget;Te!==ee&&re(Te),g==null||g(ge),Ee()}const dt=ge=>{let Te=ge;const et=h?h-Se.width:0;return Te=Math.max(Te,0),Te=Math.min(Te,et),Te},mt=Lr((ge,Te)=>{Te?($o.flushSync(()=>{G(et=>{const xe=et+(X?-ge:ge);return dt(xe)})}),Ee()):re(et=>et+ge)}),[ft,vt]=dj(k,de,ce,fe,ue,!!h,mt);hj(k,U,(ge,Te,et,xe)=>{const $e=xe;return ye(ge,Te,et)?!1:!$e||!$e._virtualHandled?($e&&($e._virtualHandled=!0),ft({preventDefault(){},deltaX:ge?Te:0,deltaY:ge?0:Te}),!0):!1}),gj(z,U,ge=>{re(Te=>Te+ge)}),Qt(()=>{function ge(et){const xe=de&&et.detail<0,$e=ce&&et.detail>0;k&&!xe&&!$e&&et.preventDefault()}const Te=U.current;return Te.addEventListener("wheel",ft,{passive:!1}),Te.addEventListener("DOMMouseScroll",vt,{passive:!0}),Te.addEventListener("MozMousePixelScroll",ge,{passive:!1}),()=>{Te.removeEventListener("wheel",ft),Te.removeEventListener("DOMMouseScroll",vt),Te.removeEventListener("MozMousePixelScroll",ge)}},[k,de,ce]),Qt(()=>{if(h){const ge=dt(M);G(ge),Ee({x:ge})}},[Se.width,h]);const ze=()=>{var ge,Te;(ge=Ye.current)==null||ge.delayHidden(),(Te=pe.current)==null||Te.delayHidden()},We=bj(U,Y,$,s,T,()=>P(!0),re,ze);a.useImperativeHandle(t,()=>({nativeElement:H.current,getScrollInfo:Be,scrollTo:ge=>{function Te(et){return et&&typeof et=="object"&&("left"in et||"top"in et)}Te(ge)?(ge.left!==void 0&&G(dt(ge.left)),We(ge.top)):We(ge)}})),Qt(()=>{if(_){const ge=Y.slice(he,me+1);_(ge,Y)}},[he,me,Y]);const ke=pj(Y,T,$,s),nt=x==null?void 0:x({start:he,end:me,virtual:z,offsetX:M,offsetY:Pe,rtl:X,getSize:ke}),ut=lj(Y,he,me,h,M,R,d,K);let _e=null;o&&(_e={[i?"height":"maxHeight"]:o,...xj},k&&(_e.overflowY="hidden",h&&(_e.overflowX="hidden"),L&&(_e.pointerEvents="none")));const Qe={};return X&&(Qe.dir="rtl"),a.createElement("div",hn({ref:H,style:{...l,position:"relative"},className:V},Qe,I),a.createElement(ei,{onResize:Ze},a.createElement(v,{className:`${r}-holder`,style:_e,ref:U,onScroll:ht,onMouseEnter:ze},a.createElement(c0,{prefixCls:r,height:ie,offsetX:M,offsetY:Pe,scrollWidth:h,onInnerResize:P,ref:F,innerProps:y,rtl:X,extra:nt},ut))),z&&ie>o&&a.createElement(Iv,{ref:Ye,prefixCls:r,scrollOffset:ee,scrollRange:ie,rtl:X,onScroll:lt,onStartMove:B,onStopMove:J,spinSize:j,containerSize:Se.height,style:S==null?void 0:S.verticalScrollBar,thumbStyle:S==null?void 0:S.verticalScrollBarThumb,showScrollBar:w}),z&&h>Se.width&&a.createElement(Iv,{ref:pe,prefixCls:r,scrollOffset:M,scrollRange:h,rtl:X,onScroll:lt,onStartMove:B,onStopMove:J,spinSize:be,containerSize:Se.width,horizontal:!0,style:S==null?void 0:S.horizontalScrollBar,thumbStyle:S==null?void 0:S.horizontalScrollBarThumb,showScrollBar:w}))}const d0=a.forwardRef(wj);d0.displayName="List";function Ej(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}function Hi(){return Hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hi.apply(this,arguments)}function Av(e){return typeof e=="string"||typeof e=="number"}const Sj=(e,t)=>{var re,se;const{prefixCls:r,id:n,open:o,multiple:s,mode:i,searchValue:l,toggleOpen:u,notFoundContent:d,onPopupScroll:p,showScrollBar:f,lockOptions:m}=Vo(),{maxCount:h,flattenOptions:v,onActiveValue:g,defaultActiveFirstOption:b,onSelect:_,menuItemSelectedIcon:y,rawValues:x,fieldNames:S,virtual:w,direction:I,listHeight:T,listItemHeight:R,optionRender:P,classNames:$,styles:A}=a.useContext(ah),k=`${r}-item`,D=gx(()=>v,[o,m],(Z,ne)=>ne[0]&&!ne[1]),z=a.useRef(null),X=a.useMemo(()=>s&&Lp(h)&&(x==null?void 0:x.size)>=h,[s,h,x==null?void 0:x.size]),V=Z=>{Z.preventDefault()},Y=Z=>{var ne;(ne=z.current)==null||ne.scrollTo(typeof Z=="number"?{index:Z}:Z)},U=a.useCallback(Z=>i==="combobox"?!1:x.has(Z),[i,[...x].toString(),x.size]),F=(Z,ne=1)=>{const ie=D.length;for(let he=0;he<ie;he+=1){const me=(Z+he*ne+ie)%ie,{group:Pe,data:Se}=D[me]||{};if(!Pe&&!(Se!=null&&Se.disabled)&&(U(Se.value)||!X))return me}return-1},[H,ee]=a.useState(()=>F(0)),O=(Z,ne=!1)=>{ee(Z);const ie={source:ne?"keyboard":"mouse"},he=D[Z];if(!he){g(null,-1,ie);return}g(he.value,Z,ie)};a.useEffect(()=>{O(b!==!1?F(0):-1)},[D.length,l]);const M=a.useCallback(Z=>i==="combobox"?String(Z).toLowerCase()===l.toLowerCase():x.has(Z),[i,l,[...x].toString(),x.size]);a.useEffect(()=>{var ne;let Z;if(!s&&o&&x.size===1){const ie=Array.from(x)[0],he=D.findIndex(({data:me})=>l?String(me.value).startsWith(l):me.value===ie);he!==-1&&(O(he),Z=setTimeout(()=>{Y(he)}))}return o&&((ne=z.current)==null||ne.scrollTo(void 0)),()=>clearTimeout(Z)},[o,l]);const G=Z=>{Z!==void 0&&_(Z,{selected:!x.has(Z)}),s||u(!1)};if(a.useImperativeHandle(t,()=>({onKeyDown:Z=>{const{which:ne,ctrlKey:ie}=Z;switch(ne){case Xe.N:case Xe.P:case Xe.UP:case Xe.DOWN:{let he=0;if(ne===Xe.UP?he=-1:ne===Xe.DOWN?he=1:Ej()&&ie&&(ne===Xe.N?he=1:ne===Xe.P&&(he=-1)),he!==0){const me=F(H+he,he);Y(me),O(me,!0)}break}case Xe.TAB:case Xe.ENTER:{const he=D[H];if(!he||he.data.disabled)return G(void 0);!X||x.has(he.value)?G(he.value):G(void 0),o&&Z.preventDefault();break}case Xe.ESC:u(!1),o&&Z.stopPropagation()}},onKeyUp:()=>{},scrollTo:Z=>{Y(Z)}})),D.length===0)return a.createElement("div",{role:"listbox",id:`${n}_list`,className:`${k}-empty`,onMouseDown:V},d);const L=Object.keys(S).map(Z=>S[Z]),W=Z=>Z.label;function B(Z,ne){const{group:ie}=Z;return{role:ie?"presentation":"option",id:`${n}_list_${ne}`}}const J=Z=>{const ne=D[Z];if(!ne)return null;const ie=ne.data||{},{value:he,disabled:me}=ie,{group:Pe}=ne,Se=ta(ie,!0),Ce=W(ne);return ne?a.createElement("div",Hi({"aria-label":typeof Ce=="string"&&!Pe?Ce:null},Se,{key:Z},B(ne,Z),{"aria-selected":M(he),"aria-disabled":me}),he):null},K={role:"listbox",id:`${n}_list`};return a.createElement(a.Fragment,null,w&&a.createElement("div",Hi({},K,{style:{height:0,width:0,overflow:"hidden"}}),J(H-1),J(H),J(H+1)),a.createElement(d0,{itemKey:"key",ref:z,data:D,height:T,itemHeight:R,fullHeight:!1,onMouseDown:V,onScroll:p,virtual:w,direction:I,innerProps:w?null:K,showScrollBar:f,className:(re=$==null?void 0:$.popup)==null?void 0:re.list,style:(se=A==null?void 0:A.popup)==null?void 0:se.list},(Z,ne)=>{var Ee,lt;const{group:ie,groupOption:he,data:me,label:Pe,value:Se}=Z,{key:Ce}=me;if(ie){const ht=me.title??(Av(Pe)?Pe.toString():void 0);return a.createElement("div",{className:ae(k,`${k}-group`,me.className),title:ht},Pe!==void 0?Pe:Ce)}const{disabled:Ze,title:Ye,children:pe,style:be,className:j,...q}=me,Q=gr(q,L),le=U(Se),de=Ze||!le&&X,ce=`${k}-option`,fe=ae(k,ce,j,(Ee=$==null?void 0:$.popup)==null?void 0:Ee.listItem,{[`${ce}-grouped`]:he,[`${ce}-active`]:H===ne&&!de,[`${ce}-disabled`]:de,[`${ce}-selected`]:le}),ue=W(Z),ye=!y||typeof y=="function"||le,Be=typeof ue=="number"?ue:ue||Se;let Ae=Av(Be)?Be.toString():void 0;return Ye!==void 0&&(Ae=Ye),a.createElement("div",Hi({},ta(Q),w?{}:B(Z,ne),{"aria-selected":w?void 0:M(Se),"aria-disabled":de,className:fe,title:Ae,onMouseMove:()=>{H===ne||de||O(ne)},onClick:()=>{de||G(Se)},style:{...(lt=A==null?void 0:A.popup)==null?void 0:lt.listItem,...be}}),a.createElement("div",{className:`${ce}-content`},typeof P=="function"?P(Z,{index:ne}):Be),a.isValidElement(y)||le,ye&&a.createElement(l0,{className:`${k}-option-state`,customizeIcon:y,customizeIconProps:{value:Se,disabled:de,isSelected:le}},le?"вњ“":null))}))},Cj=a.forwardRef(Sj),Pj=(e,t)=>{const r=a.useRef({values:new Map,options:new Map}),n=a.useMemo(()=>{const{values:s,options:i}=r.current,l=e.map(p=>{var f;return p.label===void 0?{...p,label:(f=s.get(p.value))==null?void 0:f.label}:p}),u=new Map,d=new Map;return l.forEach(p=>{u.set(p.value,p),d.set(p.value,t.get(p.value)||i.get(p.value))}),r.current.values=u,r.current.options=d,l},[e,t]),o=a.useCallback(s=>t.get(s)||r.current.options.get(s),[t]);return[n,o]};function fd(e,t){return s0(e).join("").toUpperCase().includes(t)}const Rj=(e,t,r,n,o)=>a.useMemo(()=>{if(!r||n===!1)return e;const{options:s,label:i,value:l}=t,u=[],d=typeof n=="function",p=r.toUpperCase(),f=d?n:(h,v)=>o&&o.length?o.some(g=>fd(v[g],p)):v[s]?fd(v[i!=="children"?i:"label"],p):fd(v[l],p),m=d?h=>zp(h):h=>h;return e.forEach(h=>{if(h[s]){if(f(r,m(h)))u.push(h);else{const g=h[s].filter(b=>f(r,m(b)));g.length&&u.push({...h,[s]:g})}return}f(r,m(h))&&u.push(h)}),u},[e,n,o,r,t]);function Tj(e){const{key:t,props:{children:r,value:n,...o}}=e;return{key:t,value:n!==void 0?n:t,children:r,...o}}function p0(e,t=!1){return Fo(e).map((r,n)=>{if(!a.isValidElement(r)||!r.type)return null;const{type:{isSelectOptGroup:o},key:s,props:{children:i,...l}}=r;return t||!o?Tj(r):{key:`__RC_SELECT_GRP__${s===null?n:s}__`,label:s,...l,options:p0(i)}}).filter(r=>r)}const Ij=(e,t,r,n,o)=>a.useMemo(()=>{let s=e;!e&&(s=p0(t));const l=new Map,u=new Map,d=(f,m,h)=>{h&&typeof h=="string"&&f.set(m[h],m)},p=(f,m=!1)=>{for(let h=0;h<f.length;h+=1){const v=f[h];!v[r.options]||m?(l.set(v[r.value],v),d(u,v,r.label),n.forEach(g=>{d(u,v,g)}),d(u,v,o)):p(v[r.options],!0)}};return p(s),{options:s,valueOptions:l,labelOptions:u}},[e,t,r,n,o]);function jv(e){const t=a.useRef();return t.current=e,a.useCallback((...n)=>t.current(...n),[])}function $j(e,t,r){const{filterOption:n,searchValue:o,optionFilterProp:s,filterSort:i,onSearch:l,autoClearSearchValue:u}=t;return a.useMemo(()=>{const d=typeof e=="object",p={filterOption:n,searchValue:o,optionFilterProp:s,filterSort:i,onSearch:l,autoClearSearchValue:u,...d?e:{}};return[d||r==="combobox"||r==="tags"||r==="multiple"&&e===void 0?!0:e,p]},[r,e,n,o,s,i,l,u])}function qp(){return qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qp.apply(this,arguments)}const Aj=["inputValue"];function jj(e){return!e||typeof e!="object"}const Oj=a.forwardRef((e,t)=>{const{id:r,mode:n,prefixCls:o="rc-select",backfill:s,fieldNames:i,showSearch:l,searchValue:u,onSearch:d,autoClearSearchValue:p,filterOption:f,optionFilterProp:m,filterSort:h,onSelect:v,onDeselect:g,onActive:b,popupMatchSelectWidth:_=!0,optionLabelProp:y,options:x,optionRender:S,children:w,defaultActiveFirstOption:I,menuItemSelectedIcon:T,virtual:R,direction:P,listHeight:$=200,listItemHeight:A=20,labelRender:k,value:D,defaultValue:z,labelInValue:X,onChange:V,maxCount:Y,classNames:U,styles:F,...H}=e,ee={searchValue:u,onSearch:d,autoClearSearchValue:p,filterOption:f,optionFilterProp:m,filterSort:h},[O,M]=$j(l,ee,n),{filterOption:G,searchValue:L,optionFilterProp:W,filterSort:B,onSearch:J,autoClearSearchValue:K=!0}=M,re=a.useMemo(()=>W?Array.isArray(W)?W:[W]:[],[W]),se=Bc(r),Z=Up(n),ne=!!(!x&&w),ie=a.useMemo(()=>G===void 0&&n==="combobox"?!1:G,[G,n]),he=a.useMemo(()=>t0(i,ne),[JSON.stringify(i),ne]),[me,Pe]=Pr("",L),Se=me||"",Ce=Ij(x,w,he,re,y),{valueOptions:Ze,labelOptions:Ye,options:pe}=Ce,be=a.useCallback(xe=>s0(xe).map(Fe=>{let Ge,rt,qt,ur;jj(Fe)?Ge=Fe:(rt=Fe.label,Ge=Fe.value);const Gt=Ze.get(Ge);return Gt&&(rt===void 0&&(rt=Gt==null?void 0:Gt[y||he.label]),qt=Gt==null?void 0:Gt.disabled,ur=Gt==null?void 0:Gt.title),{label:rt,value:Ge,key:Ge,disabled:qt,title:ur}}),[he,y,Ze]),[j,q]=Pr(z,D),Q=a.useMemo(()=>{var Fe;const $e=be(Z&&j===null?[]:j);return n==="combobox"&&U1((Fe=$e[0])==null?void 0:Fe.value)?[]:$e},[j,be,n,Z]),[le,de]=Pj(Q,Ze),ce=a.useMemo(()=>{if(!n&&le.length===1){const xe=le[0];if(xe.value===null&&(xe.label===null||xe.label===void 0))return[]}return le.map(xe=>({...xe,label:(typeof k=="function"?k(xe):xe.label)??xe.value}))},[n,le,k]),fe=a.useMemo(()=>new Set(le.map(xe=>xe.value)),[le]);a.useEffect(()=>{var xe;if(n==="combobox"){const $e=(xe=le[0])==null?void 0:xe.value;Pe(H1($e)?String($e):"")}},[le]);const ue=jv((xe,$e)=>{const Fe=$e??xe;return{[he.value]:xe,[he.label]:Fe}}),ye=a.useMemo(()=>{if(n!=="tags")return pe;const xe=[...pe],$e=Fe=>Ze.has(Fe);return[...le].sort((Fe,Ge)=>Fe.value<Ge.value?-1:1).forEach(Fe=>{const Ge=Fe.value;$e(Ge)||xe.push(ue(Ge,Fe.label))}),xe},[ue,pe,Ze,le,n]),Be=Rj(ye,he,Se,ie,re),Ae=a.useMemo(()=>{const xe=$e=>re.length?re.some(Fe=>($e==null?void 0:$e[Fe])===Se):($e==null?void 0:$e.value)===Se;return n!=="tags"||!Se||Be.some($e=>xe($e))||Be.some($e=>$e[he.value]===Se)?Be:[ue(Se),...Be]},[ue,re,n,Be,Se,he]),Ee=xe=>[...xe].sort((Fe,Ge)=>B(Fe,Ge,{searchValue:Se})).map(Fe=>Array.isArray(Fe.options)?{...Fe,options:Fe.options.length>0?Ee(Fe.options):Fe.options}:Fe),lt=a.useMemo(()=>B?Ee(Ae):Ae,[Ae,B,Se]),ht=a.useMemo(()=>L1(lt,{fieldNames:he,childrenAsData:ne}),[lt,he,ne]),dt=xe=>{const $e=be(xe);if(q($e),V&&($e.length!==le.length||$e.some((Fe,Ge)=>{var rt;return((rt=le[Ge])==null?void 0:rt.value)!==(Fe==null?void 0:Fe.value)}))){const Fe=X?$e.map(({label:rt,value:qt})=>({label:rt,value:qt})):$e.map(rt=>rt.value),Ge=$e.map(rt=>zp(de(rt.value)));V(Z?Fe:Fe[0],Z?Ge:Ge[0])}},[mt,ft]=a.useState(null),[vt,ze]=a.useState(0),We=I!==void 0?I:n!=="combobox",ke=a.useRef(),nt=a.useCallback((xe,$e,{source:Fe="keyboard"}={})=>{ze($e),s&&n==="combobox"&&xe!==null&&Fe==="keyboard"&&ft(String(xe));const Ge=Promise.resolve().then(()=>{ke.current===Ge&&(b==null||b(xe))});ke.current=Ge},[s,n,b]),ut=(xe,$e,Fe)=>{const Ge=()=>{const rt=de(xe);return[X?{label:rt==null?void 0:rt[he.label],value:xe}:xe,zp(rt)]};if($e&&v){const[rt,qt]=Ge();v(rt,qt)}else if(!$e&&g&&Fe!=="clear"){const[rt,qt]=Ge();g(rt,qt)}},_e=jv((xe,$e)=>{let Fe;const Ge=Z?$e.selected:!0;Ge?Fe=Z?[...le,xe]:[xe]:Fe=le.filter(rt=>rt.value!==xe),dt(Fe),ut(xe,Ge),n==="combobox"?ft(""):(!Up||K)&&(Pe(""),ft(""))}),Qe=(xe,$e)=>{dt(xe);const{type:Fe,values:Ge}=$e;(Fe==="remove"||Fe==="clear")&&Ge.forEach(rt=>{ut(rt.value,!1,Fe)})},ge=(xe,$e)=>{if(Pe(xe),ft(null),$e.source==="submit"){const Fe=(xe||"").trim();if(Fe){const Ge=Array.from(new Set([...fe,Fe]));dt(Ge),ut(Fe,!0),Pe("")}return}$e.source!=="blur"&&(n==="combobox"&&dt(xe),J==null||J(xe))},Te=xe=>{let $e=xe;n!=="tags"&&($e=xe.map(Ge=>{const rt=Ye.get(Ge);return rt==null?void 0:rt.value}).filter(Ge=>Ge!==void 0));const Fe=Array.from(new Set([...fe,...$e]));dt(Fe),Fe.forEach(Ge=>{ut(Ge,!0)})},et=a.useMemo(()=>({...Ce,flattenOptions:ht,onActiveValue:nt,defaultActiveFirstOption:We,onSelect:_e,menuItemSelectedIcon:T,rawValues:fe,fieldNames:he,virtual:R!==!1&&_!==!1,direction:P,listHeight:$,listItemHeight:A,childrenAsData:ne,maxCount:Y,optionRender:S,classNames:U,styles:F}),[Y,Ce,ht,nt,We,_e,T,fe,he,R,_,P,$,A,ne,S,U,F]);return a.createElement(ah.Provider,{value:et},a.createElement(ij,qp({},H,{id:se,prefixCls:o,ref:t,omitDomProps:Aj,mode:n,classNames:U,styles:F,displayValues:ce,onDisplayValuesChange:Qe,maxCount:Y,direction:P,showSearch:O,searchValue:Se,onSearch:ge,autoClearSearchValue:K,onSearchSplit:Te,popupMatchSelectWidth:_,OptionList:Cj,emptyOptions:!ht.length,activeValue:mt,activeDescendantId:`${se}_list_${vt}`})))}),uh=Oj;uh.Option=ch;uh.OptGroup=lh;const f0=(e,t,r)=>{const{variant:n,[e]:o}=a.useContext(Ir),s=a.useContext(X$),i=o==null?void 0:o.variant;let l;typeof t<"u"?l=t:r===!1?l="borderless":l=s??i??n??"outlined";const u=Y$.includes(l);return[l,u]},Nj=e=>{const r={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:{...r,points:["tl","bl"],offset:[0,4]},bottomRight:{...r,points:["tr","br"],offset:[0,4]},topLeft:{...r,points:["bl","tl"],offset:[0,-4]},topRight:{...r,points:["br","tr"],offset:[0,-4]}}};function Dj(e,t){return e||Nj(t)}const Ov=e=>{const{optionHeight:t,optionFontSize:r,optionLineHeight:n,optionPadding:o}=e;return{position:"relative",display:"block",minHeight:t,padding:o,color:e.colorText,fontWeight:"normal",fontSize:r,lineHeight:n,boxSizing:"border-box"}},kj=e=>{const{antCls:t,componentCls:r}=e,n=`${r}-item`,o=`&${t}-slide-up-enter${t}-slide-up-enter-active`,s=`&${t}-slide-up-appear${t}-slide-up-appear-active`,i=`&${t}-slide-up-leave${t}-slide-up-leave-active`,l=`${r}-dropdown-placement-`,u=`${n}-option-selected`;return[{[`${r}-dropdown`]:{...zr(e),position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
${o}${l}bottomLeft,
${s}${l}bottomLeft
`]:{animationName:yx},[`
${o}${l}topLeft,
${s}${l}topLeft,
${o}${l}topRight,
${s}${l}topRight
`]:{animationName:_x},[`${i}${l}bottomLeft`]:{animationName:bx},[`
${i}${l}topLeft,
${i}${l}topRight
`]:{animationName:vx},"&-hidden":{display:"none"},[n]:{...Ov(e),cursor:"pointer",transition:`background-color ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":{flex:"auto",...Ls},"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${n}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${n}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${n}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${n}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":{...Ov(e),color:e.colorTextDisabled}},[`${u}:has(+ ${u})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${u}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}}},zs(e,"slide-up"),zs(e,"slide-down"),Hl(e,"move-up"),Hl(e,"move-down")]},Mj=e=>{const{componentCls:t}=e;return{[`&${t}-customize`]:{border:0,padding:0,fontSize:"inherit",lineHeight:"inherit",[`${t}-placeholder`]:{display:"none"},[`${t}-content`]:{margin:0,padding:0,"&-value":{display:"none"}}}}},Nv=4,Lj=e=>{const{componentCls:t,calc:r,iconCls:n,paddingXS:o,paddingXXS:s,INTERNAL_FIXED_ITEM_MARGIN:i,lineWidth:l,colorIcon:u,colorIconHover:d,inputPaddingHorizontalBase:p,antCls:f}=e,[m,h]=br(f,"select");return{"&-multiple":{[m("multi-item-background")]:e.multipleItemBg,[m("multi-item-border-color")]:"transparent",[m("multi-item-border-radius")]:e.borderRadiusSM,[m("multi-item-height")]:e.multipleItemHeight,[m("multi-padding-base")]:`calc((${h("height")} - ${h("multi-item-height")}) / 2)`,[m("multi-padding-vertical")]:`calc(${h("multi-padding-base")} - ${i} - ${l})`,[m("multi-item-padding-horizontal")]:`calc(${p} - ${h("multi-padding-vertical")} - ${l} * 2)`,paddingBlock:h("multi-padding-vertical"),paddingInlineStart:`calc(${h("multi-padding-base")} - ${l})`,[`${t}-prefix`]:{marginInlineStart:h("multi-item-padding-horizontal")},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:"absolute",lineHeight:h("line-height"),insetInlineStart:h("multi-item-padding-horizontal"),width:`calc(100% - ${h("multi-item-padding-horizontal")})`,top:"50%",transform:"translateY(-50%)"},[`${t}-content`]:{flexWrap:"wrap",alignItems:"center",lineHeight:1,"&-item-prefix":{height:h("font-size")},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${Nv}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix,
${t}-content-item-suffix:first-child`]:{marginInlineStart:h("multi-item-padding-horizontal")},[`${t}-selection-item`]:{lineHeight:`calc(${h("multi-item-height")} - ${l} * 2)`,border:`${l} solid ${h("multi-item-border-color")}`,display:"flex",marginBlock:i,marginInlineEnd:r(i).mul(2).equal(),background:h("multi-item-background"),borderRadius:h("multi-item-border-radius"),paddingInlineStart:o,paddingInlineEnd:s,transition:["height","line-height","padding"].map(v=>`${v} ${e.motionDurationSlow}`).join(","),"&-content":{...Ls,marginInlineEnd:s},"&-remove":{...xx(),display:"inline-flex",alignItems:"center",color:u,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:d}}},[`${t}-input`]:{lineHeight:r(i).mul(2).add(h("multi-item-height")).equal(),width:"calc(var(--select-input-width, 0) * 1px)",minWidth:Nv,maxWidth:"100%",transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{[m("multi-item-height")]:e.multipleItemHeightSM,[m("multi-item-border-radius")]:e.borderRadiusXS},[`&${t}-lg`]:{[m("multi-item-height")]:e.multipleItemHeightLG,[m("multi-item-border-radius")]:e.borderRadius},[`&${t}-filled`]:{[m("multi-item-border-color")]:e.colorSplit,[m("multi-item-background")]:e.colorBgContainer,[`&${t}-disabled`]:{[m("multi-item-border-color")]:"transparent"}}}}},md=(e,t)=>{const{componentCls:r,antCls:n}=e,[o]=br(n,"select"),{border:s,borderHover:i,borderActive:l,borderOutline:u}=t,d=t.background||e.selectorBg||e.colorBgContainer;return{[o("border-color")]:s,[o("background-color")]:d,[o("color")]:t.color||e.colorText,[`&:not(${r}-disabled)`]:{"&:hover":{[o("border-color")]:i,[o("background-color")]:t.backgroundHover||d},[`&${r}-focused`]:{[o("border-color")]:l,[o("background-color")]:t.backgroundActive||d,boxShadow:`0 0 0 ${we(e.controlOutlineWidth)} ${u}`}},[`&${r}-disabled`]:{[o("border-color")]:t.borderDisabled||t.border,[o("background-color")]:t.backgroundDisabled||t.background}}},Xa=(e,t,r,n={},o={},s)=>{const{componentCls:i}=e;return{[`&${i}-${t}`]:[md(e,r),{[`&${i}-status-error`]:md(e,{...r,color:n.color||e.colorError,...n}),[`&${i}-status-warning`]:md(e,{...r,color:o.color||e.colorWarning,...o})},s]}},zj=e=>{const{componentCls:t,fontHeight:r,controlHeight:n,iconCls:o,antCls:s,calc:i}=e,[l,u]=br(s,"select");return{[t]:[{[l("border-radius")]:e.borderRadius,[l("border-color")]:"#000",[l("border-size")]:e.lineWidth,[l("background-color")]:e.colorBgContainer,[l("font-size")]:e.fontSize,[l("line-height")]:e.lineHeight,[l("font-height")]:r,[l("color")]:e.colorText,[l("height")]:n,[l("padding-horizontal")]:i(e.paddingSM).sub(e.lineWidth).equal(),[l("padding-vertical")]:`calc((${u("height")} - ${u("font-height")}) / 2 - ${u("border-size")})`,...zr(e,!0),display:"inline-flex",flexWrap:"nowrap",position:"relative",transition:`all ${e.motionDurationSlow}`,alignItems:"flex-start",outline:0,cursor:"pointer",borderRadius:u("border-radius"),borderWidth:u("border-size"),borderStyle:e.lineType,borderColor:u("border-color"),background:u("background-color"),fontSize:u("font-size"),lineHeight:u("line-height"),color:u("color"),paddingInline:u("padding-horizontal"),paddingBlock:u("padding-vertical"),[`${t}-prefix`]:{flex:"none",lineHeight:1},[`${t}-placeholder`]:{...Ls,color:e.colorTextPlaceholder,pointerEvents:"none",zIndex:1},[`${t}-content`]:{flex:"auto",minWidth:0,position:"relative",display:"flex",marginInlineEnd:i(e.paddingXXS).mul(1.5).equal(),"&:before":{content:'"\\a0"',width:0,overflow:"hidden"},"&-value":{visibility:"inherit"},"input[readonly]":{cursor:"inherit",caretColor:"transparent"}},[`${t}-suffix`]:{flex:"none",color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:"center",[o]:{verticalAlign:"top"}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:"not-allowed",input:{cursor:"not-allowed"}},"&-sm":{[l("height")]:e.controlHeightSM,[l("padding-horizontal")]:i(e.paddingXS).sub(e.lineWidth).equal(),[l("border-radius")]:e.borderRadiusSM,[`${t}-clear`]:{insetInlineEnd:u("padding-horizontal")}},"&-lg":{[l("height")]:e.controlHeightLG,[l("font-size")]:e.fontSizeLG,[l("line-height")]:e.lineHeightLG,[l("font-height")]:e.fontHeightLG,[l("border-radius")]:e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:"none",background:"transparent",appearance:"none",border:0,margin:0,padding:0,color:u("color"),"&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:"absolute",inset:0,lineHeight:`calc(${u("font-height")} + ${u("padding-vertical")} * 2)`},[`${t}-content`]:{...Ls,alignSelf:"center","&-has-value":{display:"block","&:before":{display:"none"}},"&-has-search-value":{color:"transparent"},"&-value":{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1}},[`&${t}-open ${t}-content`]:{color:e.colorTextPlaceholder,"&-has-search-value":{color:"transparent"}}}},{[`&-show-search:not(${t}-customize-input):not(${t}-disabled)`]:{cursor:"text"}},Lj(e),Xa(e,"outlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline}),Xa(e,"filled",{border:"transparent",borderHover:"transparent",borderActive:e.activeBorderColor,borderOutline:"transparent",borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),Xa(e,"borderless",{border:"transparent",borderHover:"transparent",borderActive:"transparent",borderOutline:"transparent",background:"transparent"}),Xa(e,"underlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:"transparent"},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:"transparent",borderInlineColor:"transparent"}),Mj(e)]}},Fj=e=>{const{fontSize:t,lineHeight:r,lineWidth:n,controlHeight:o,controlHeightSM:s,controlHeightLG:i,paddingXXS:l,controlPaddingHorizontal:u,zIndexPopupBase:d,colorText:p,fontWeightStrong:f,controlItemBgActive:m,controlItemBgHover:h,colorBgContainer:v,colorFillSecondary:g,colorBgContainerDisabled:b,colorTextDisabled:_,colorPrimaryHover:y,colorPrimary:x,controlOutline:S}=e,w=l*2,I=n*2,T=Math.min(o-w,o-I),R=Math.min(s-w,s-I),P=Math.min(i-w,i-I);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(l/2),zIndexPopup:d+50,optionSelectedColor:p,optionSelectedFontWeight:f,optionSelectedBg:m,optionActiveBg:h,optionPadding:`${(o-t*r)/2}px ${u}px`,optionFontSize:t,optionLineHeight:r,optionHeight:o,selectorBg:v,clearBg:v,singleItemHeightLG:i,multipleItemBg:g,multipleItemBorderColor:"transparent",multipleItemHeight:T,multipleItemHeightSM:R,multipleItemHeightLG:P,multipleSelectorBgDisabled:b,multipleItemColorDisabled:_,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:y,activeBorderColor:x,activeOutlineColor:S,selectAffixPadding:l}},Vj=e=>{const{antCls:t,componentCls:r,motionDurationMid:n,inputPaddingHorizontalBase:o}=e,s={[`${r}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[r]:{...zr(e),[`${r}-selection-item`]:{flex:1,fontWeight:"normal",position:"relative",userSelect:"none",...Ls,[`> ${t}-typography`]:{display:"inline"}},[`${r}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${r}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:o,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:["color","opacity"].map(i=>`${i} ${n} ease`).join(", "),textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":s,"&:hover":s},[`${r}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${r}-has-feedback`]:{[`${r}-clear`]:{insetInlineEnd:e.calc(o).add(e.fontSize).add(e.paddingXS).equal()}}}}}},Bj=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},Vj(e),kj(e),{[`${t}-rtl`]:{direction:"rtl"}},Km(e,{focusElCls:`${t}-focused`})]},Hj=tr("Select",(e,{rootPrefixCls:t})=>{const r=er(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[Bj(r),zj(r)]},Fj,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var Uj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};function Gp(){return Gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gp.apply(this,arguments)}const Wj=(e,t)=>a.createElement(En,Gp({},e,{ref:t,icon:Uj})),m0=a.forwardRef(Wj);var qj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};function Kp(){return Kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kp.apply(this,arguments)}const Gj=(e,t)=>a.createElement(En,Kp({},e,{ref:t,icon:qj})),Kj=a.forwardRef(Gj);var Xj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};function Xp(){return Xp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xp.apply(this,arguments)}const Yj=(e,t)=>a.createElement(En,Xp({},e,{ref:t,icon:Xj})),Jj=a.forwardRef(Yj);function Zj({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:r,removeIcon:n,loading:o,loadingIcon:s,multiple:i,hasFeedback:l,showSuffixIcon:u,feedbackIcon:d,showArrow:p,componentName:f}){const m=t??a.createElement(J$,null),h=_=>e===null&&!l&&!p?null:a.createElement(a.Fragment,null,u!==!1&&_,l&&d);let v=null;e!==void 0?v=h(e):o?v=h(s??a.createElement(wx,{spin:!0})):v=({open:_,showSearch:y})=>h(_&&y?a.createElement(Jj,null):a.createElement(Kj,null));let g=null;r!==void 0?g=r:i?g=a.createElement(m0,null):g=null;let b=null;return n!==void 0?b=n:b=a.createElement(Z$,null),{clearIcon:m,suffixIcon:v,itemIcon:g,removeIcon:b}}function Qj(e){return N.useMemo(()=>{if(e)return(...t)=>N.createElement(Xm,{space:!0},e.apply(void 0,t))},[e])}function eO(e,t){return t!==void 0?t:e!==null}const h0="SECRET_COMBOBOX_MODE_DO_NOT_USE",tO=(e,t)=>{var $e,Fe,Ge,rt,qt;const{prefixCls:r,bordered:n,className:o,rootClassName:s,getPopupContainer:i,popupClassName:l,dropdownClassName:u,listHeight:d=256,placement:p,listItemHeight:f,size:m,disabled:h,notFoundContent:v,status:g,builtinPlacements:b,dropdownMatchSelectWidth:_,popupMatchSelectWidth:y,direction:x,style:S,allowClear:w,variant:I,popupStyle:T,dropdownStyle:R,transitionName:P,tagRender:$,maxCount:A,prefix:k,dropdownRender:D,popupRender:z,onDropdownVisibleChange:X,onOpenChange:V,styles:Y,classNames:U,...F}=e,{getPopupContainer:H,getPrefixCls:ee,renderEmpty:O,direction:M,virtual:G,popupMatchSelectWidth:L,popupOverflow:W}=a.useContext(Ir),{showSearch:B,style:J,styles:K,className:re,classNames:se}=Yr("select"),[,Z]=Uc(),ne=f??(Z==null?void 0:Z.controlHeight),ie=ee("select",r),he=ee(),me=x??M,{compactSize:Pe,compactItemClassnames:Se}=Wc(ie,me),[Ce,Ze]=f0("select",I,n),Ye=ti(ie),[pe,be]=Hj(ie,Ye),j=a.useMemo(()=>{const{mode:ur}=e;if(ur!=="combobox")return ur===h0?"combobox":ur},[e.mode]),q=j==="multiple"||j==="tags",Q=eO(e.suffixIcon,e.showArrow),le=y??_??L,de=Qj(z||D),ce=V||X,{status:fe,hasFeedback:ue,isFormItemInput:ye,feedbackIcon:Be}=a.useContext(Ex),Ae=Rx(fe,g);let Ee;v!==void 0?Ee=v:j==="combobox"?Ee=null:Ee=(O==null?void 0:O("Select"))||a.createElement(Sx,{componentName:"Select"});const{suffixIcon:lt,itemIcon:ht,removeIcon:dt,clearIcon:mt}=Zj({...F,multiple:q,hasFeedback:ue,feedbackIcon:Be,showSuffixIcon:Q,componentName:"Select"}),ft=w===!0?{clearIcon:mt}:w,vt=gr(F,["suffixIcon","itemIcon"]),ze=ba(ur=>m??Pe??ur),We=a.useContext(Cx),ke=h??We,nt={...e,variant:Ce,status:Ae,disabled:ke,size:ze},[ut,_e]=cn([se,U],[K,Y],{props:nt},{popup:{_default:"root"}}),Qe=ae(($e=ut.popup)==null?void 0:$e.root,l,u,{[`${ie}-dropdown-${me}`]:me==="rtl"},s,be,Ye,pe),ge={...(Fe=_e.popup)==null?void 0:Fe.root,...T??R},Te=ae({[`${ie}-lg`]:ze==="large",[`${ie}-sm`]:ze==="small",[`${ie}-rtl`]:me==="rtl",[`${ie}-${Ce}`]:Ze,[`${ie}-in-form-item`]:ye},Ym(ie,Ae,ue),Se,re,o,ut.root,s,be,Ye,pe),et=a.useMemo(()=>p!==void 0?p:me==="rtl"?"bottomRight":"bottomLeft",[p,me]),[xe]=qc("SelectLike",((rt=(Ge=_e.popup)==null?void 0:Ge.root)==null?void 0:rt.zIndex)??(ge==null?void 0:ge.zIndex));return a.createElement(uh,{ref:t,virtual:G,classNames:ut,styles:_e,showSearch:B,...vt,style:{..._e.root,...J,...S},popupMatchSelectWidth:le,transitionName:Px(he,"slide-up",P),builtinPlacements:Dj(b,W),listHeight:d,listItemHeight:ne,mode:j,prefixCls:ie,placement:et,direction:me,prefix:k,suffixIcon:lt,menuItemSelectedIcon:ht,removeIcon:dt,allowClear:ft,notFoundContent:Ee,className:Te,getPopupContainer:i||H,popupClassName:Qe,disabled:ke,popupStyle:{...(qt=_e.popup)==null?void 0:qt.root,...ge,zIndex:xe},maxCount:q?A:void 0,tagRender:q?$:void 0,popupRender:de,onPopupVisibleChange:ce})},ri=a.forwardRef(tO),rO=Tx(ri,"popupAlign");ri.SECRET_COMBOBOX_MODE_DO_NOT_USE=h0;ri.Option=ch;ri.OptGroup=lh;ri._InternalPanelDoNotUseOrYouWillBeFired=rO;function dh(e=!0,t={}){const r=a.useRef(t),[,n]=Q$(),o=eA();return Qt(()=>{const s=o.subscribe(i=>{r.current=i,e&&n()});return()=>o.unsubscribe(s)},[]),r.current}const g0=e=>{const{children:t,prefixCls:r,id:n,classNames:o,styles:s,className:i,style:l}=e;return a.createElement("div",{id:n,className:ae(`${r}-container`,o==null?void 0:o.container,i),style:{...s==null?void 0:s.container,...l},role:"tooltip"},typeof t=="function"?t():t)},Qo={shiftX:64,adjustY:1},es={adjustX:1,shiftY:!0},Fr=[0,0],nO={left:{points:["cr","cl"],overflow:es,offset:[-4,0],targetOffset:Fr},right:{points:["cl","cr"],overflow:es,offset:[4,0],targetOffset:Fr},top:{points:["bc","tc"],overflow:Qo,offset:[0,-4],targetOffset:Fr},bottom:{points:["tc","bc"],overflow:Qo,offset:[0,4],targetOffset:Fr},topLeft:{points:["bl","tl"],overflow:Qo,offset:[0,-4],targetOffset:Fr},leftTop:{points:["tr","tl"],overflow:es,offset:[-4,0],targetOffset:Fr},topRight:{points:["br","tr"],overflow:Qo,offset:[0,-4],targetOffset:Fr},rightTop:{points:["tl","tr"],overflow:es,offset:[4,0],targetOffset:Fr},bottomRight:{points:["tr","br"],overflow:Qo,offset:[0,4],targetOffset:Fr},rightBottom:{points:["bl","br"],overflow:es,offset:[4,0],targetOffset:Fr},bottomLeft:{points:["tl","bl"],overflow:Qo,offset:[0,4],targetOffset:Fr},leftBottom:{points:["br","bl"],overflow:es,offset:[-4,0],targetOffset:Fr}};function Yp(){return Yp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yp.apply(this,arguments)}const oO=a.forwardRef((e,t)=>{const{trigger:r=["hover"],mouseEnterDelay:n=0,mouseLeaveDelay:o=.1,prefixCls:s="rc-tooltip",children:i,onVisibleChange:l,afterVisibleChange:u,motion:d,placement:p="right",align:f={},destroyOnHidden:m=!1,defaultVisible:h,getTooltipContainer:v,arrowContent:g,overlay:b,id:_,showArrow:y=!0,classNames:x,styles:S,...w}=e,I=Bc(_),T=a.useRef(null);a.useImperativeHandle(t,()=>T.current);const R={...w};"visible"in e&&(R.popupVisible=e.visible);const P=a.useMemo(()=>{if(!y)return!1;const A=y===!0?{}:y;return{...A,className:ae(A.className,x==null?void 0:x.arrow),style:{...A.style,...S==null?void 0:S.arrow},content:A.content??g}},[y,x==null?void 0:x.arrow,S==null?void 0:S.arrow,g]),$=({open:A})=>{const k=a.Children.only(i),D={"aria-describedby":b&&A?I:void 0};return a.cloneElement(k,D)};return a.createElement(Hc,Yp({popupClassName:x==null?void 0:x.root,prefixCls:s,popup:a.createElement(g0,{key:"content",prefixCls:s,id:I,classNames:x,styles:S},b),action:r,builtinPlacements:nO,popupPlacement:p,ref:T,popupAlign:f,getPopupContainer:v,onOpenChange:l,afterOpenChange:u,popupMotion:d,defaultPopupVisible:h,autoDestroy:m,mouseLeaveDelay:o,popupStyle:S==null?void 0:S.root,mouseEnterDelay:n,arrow:P,uniqueContainerClassName:x==null?void 0:x.uniqueContainer,uniqueContainerStyle:S==null?void 0:S.uniqueContainer},R),$)}),sO=N.createContext(!1),iO=(e,t)=>{const r=n=>typeof n=="boolean"?{show:n}:n||{};return N.useMemo(()=>{const n=r(e),o=r(t);return{...o,...n,show:n.show??o.show??!0}},[e,t])},Dv="50%",aO=e=>{const{calc:t,componentCls:r,tooltipMaxWidth:n,tooltipColor:o,tooltipBg:s,tooltipBorderRadius:i,zIndexPopup:l,controlHeight:u,boxShadowSecondary:d,paddingSM:p,paddingXS:f,arrowOffsetHorizontal:m,sizePopupArrow:h,antCls:v}=e,[g,b]=br(v,"tooltip"),_=t(i).add(h).add(m).equal(),x={minWidth:t(i).mul(2).add(h).equal(),minHeight:u,padding:`${we(e.calc(p).div(2).equal())} ${we(f)}`,color:b("overlay-color",o),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:s,borderRadius:i,boxShadow:d,boxSizing:"border-box"},S={[g("valid-offset-x")]:b("arrow-offset-x","var(--arrow-x)"),transformOrigin:[b("valid-offset-x",Dv),`var(--arrow-y, ${Dv})`].join(" ")};return[{[r]:{...zr(e),position:"absolute",zIndex:l,display:"block",width:"max-content",maxWidth:n,visibility:"visible",...S,"&-hidden":{display:"none"},[g("arrow-background-color")]:s,[`${r}-container`]:[x,rA(e,!0)],[`&:has(~ ${r}-unique-container)`]:{[`${r}-container`]:{border:"none",background:"transparent",boxShadow:"none"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:_},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${r}-inner`]:{borderRadius:e.min(i,tA)}},[`${r}-content`]:{position:"relative"},...Zm(e,(w,{darkColor:I})=>({[`&${r}-${w}`]:{[`${r}-container`]:{backgroundColor:I},[`${r}-arrow`]:{[g("arrow-background-color")]:I}}})),"&-rtl":{direction:"rtl"}}},Ix(e,b("arrow-background-color")),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${r}-unique-container`]:{...x,...S,position:"absolute",zIndex:t(l).sub(1).equal(),"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},lO=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...Ax({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...$x(er(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),v0=(e,t,r=!0)=>tr("Tooltip",o=>{const{borderRadius:s,colorTextLightSolid:i,colorBgSpotlight:l,maxWidth:u}=o,d=er(o,{tooltipMaxWidth:u,tooltipColor:i,tooltipBorderRadius:s,tooltipBg:l});return[aO(d),Jm(o,"zoom-big-fast")]},lO,{resetStyle:!1,injectStyle:r})(e,t),b0=(e,t,r)=>{const n=Qm(r),[o]=br(e,"tooltip"),s=ae({[`${t}-${r}`]:r&&n}),i={},l={},u=nA(r).toRgb(),p=(.299*u.r+.587*u.g+.114*u.b)/255<.5?"#FFF":"#000";return r&&!n&&(i.background=r,i[o("overlay-color")]=p,l[o("arrow-background-color")]=r),{className:s,overlayStyle:i,arrowStyle:l}},cO=e=>{const{prefixCls:t,className:r,placement:n="top",title:o,color:s,overlayInnerStyle:i,classNames:l,styles:u}=e,{getPrefixCls:d}=a.useContext(Ir),p=d("tooltip",t),f=d(),m=ti(p),[h,v]=v0(p,m),g=b0(f,p,s),b=g.arrowStyle,_=a.useMemo(()=>({container:{...i,...g.overlayStyle}}),[i,g.overlayStyle]),y={...e,placement:n},[x,S]=cn([l],[_,u],{props:y}),w=ae(m,h,v,p,`${p}-pure`,`${p}-placement-${n}`,r,g.className);return a.createElement("div",{className:w,style:b},a.createElement("div",{className:`${p}-arrow`}),a.createElement(g0,{...e,className:h,prefixCls:p,classNames:x,styles:S},o))},uO=a.forwardRef((e,t)=>{const{prefixCls:r,openClassName:n,getTooltipContainer:o,color:s,children:i,afterOpenChange:l,arrow:u,destroyTooltipOnHide:d,destroyOnHidden:p,title:f,overlay:m,trigger:h,builtinPlacements:v,autoAdjustOverflow:g=!0,motion:b,getPopupContainer:_,placement:y="top",mouseEnterDelay:x=.1,mouseLeaveDelay:S=.1,rootClassName:w,styles:I,classNames:T,onOpenChange:R,overlayInnerStyle:P,overlayStyle:$,overlayClassName:A,...k}=e,[,D]=Uc(),z=e["data-popover-inject"],{getPopupContainer:X,getPrefixCls:V,direction:Y,...U}=Yr("tooltip"),{className:F,style:H,classNames:ee,styles:O,arrow:M,trigger:G}=z?{}:U,L=iO(u,M),W=L.show,B=h||G||"hover",J=_||X,K=p??!!d,re=a.useContext(sO);Nx();const se=a.useRef(null),Z=()=>{var ft;(ft=se.current)==null||ft.forceAlign()};a.useImperativeHandle(t,()=>{var ft,vt;return{forceAlign:Z,nativeElement:(ft=se.current)==null?void 0:ft.nativeElement,popupElement:(vt=se.current)==null?void 0:vt.popupElement}});const[ne,ie]=Pr(e.defaultOpen??!1,e.open),he=!f&&!m&&f!==0,me=ft=>{ie(he?!1:ft),!he&&R&&R(ft)},Pe=a.useMemo(()=>v||jx({arrowPointAtCenter:(L==null?void 0:L.pointAtCenter)??!1,autoAdjustOverflow:g,arrowWidth:W?D.sizePopupArrow:0,borderRadius:D.borderRadius,offset:D.marginXXS,visibleFirst:!0}),[L,v,D,W,g]),Se=a.useMemo(()=>f===0?f:m||f||"",[m,f]),Ce=a.createElement(Xm,{space:!0,form:!0},typeof Se=="function"?Se():Se),Ze={...e,trigger:B,builtinPlacements:Pe,getPopupContainer:J,destroyOnHidden:K},[Ye,pe]=cn([ee,T],[O,I],{props:Ze}),be=V("tooltip",r),j=V();let q=ne;(!("open"in e)&&he||re)&&(q=!1);const Q=a.isValidElement(i)&&!oA(i)?i:a.createElement("span",null,i),le=Q.props,de=!le.className||typeof le.className=="string"?ae(le.className,n||`${be}-open`):le.className,ce=ti(be),[fe,ue]=v0(be,ce,!z),ye=b0(j,be,s),Be=ye.arrowStyle,Ae=ae(ce,fe,ue),Ee=ae(A,{[`${be}-rtl`]:Y==="rtl"},ye.className,w,Ae,F,Ye.root),[lt,ht]=qc("Tooltip",k.zIndex),dt={...pe.container,...P,...ye.overlayStyle},mt=a.createElement(oO,{unique:!0,...k,zIndex:lt,showArrow:W,placement:y,mouseEnterDelay:x,mouseLeaveDelay:S,prefixCls:be,classNames:{root:Ee,container:Ye.container,arrow:Ye.arrow,uniqueContainer:ae(Ae,Ye.container)},styles:{root:{...Be,...pe.root,...H,...$},container:dt,uniqueContainer:dt,arrow:pe.arrow},ref:se,overlay:Ce,visible:q,onVisibleChange:me,afterVisibleChange:l,arrowContent:a.createElement("span",{className:`${be}-arrow-content`}),motion:{motionName:Px(j,"zoom-big-fast",typeof(b==null?void 0:b.motionName)=="string"?b==null?void 0:b.motionName:void 0),motionDeadline:1e3},trigger:B,builtinPlacements:Pe,getTooltipContainer:J,destroyOnHidden:K},q?Sn(Q,{className:de}):Q);return a.createElement(Ox.Provider,{value:ht},mt)}),Bo=uO;Bo._InternalPanelDoNotUseOrYouWillBeFired=cO;Bo.UniqueProvider=sA;const kv=e=>{const{prefixCls:t,value:r,current:n,offset:o=0}=e;let s;return o&&(s={position:"absolute",top:`${o}00%`,left:0}),a.createElement("span",{style:s,className:ae(`${t}-only-unit`,{current:n})},r)};function dO(e,t,r){let n=e,o=0;for(;(n+10)%10!==t;)n+=r,o+=r;return o}const pO=e=>{const{prefixCls:t,count:r,value:n}=e,o=Number(n),s=Math.abs(r),[i,l]=a.useState(o),[u,d]=a.useState(s),p=()=>{l(o),d(s)};a.useEffect(()=>{const h=setTimeout(p,1e3);return()=>clearTimeout(h)},[o]);let f,m;if(i===o||Number.isNaN(o)||Number.isNaN(i))f=[a.createElement(kv,{...e,key:o,current:!0})],m={transition:"none"};else{f=[];const h=o+10,v=[];for(let y=o;y<=h;y+=1)v.push(y);const g=u<s?1:-1,b=v.findIndex(y=>y%10===i);f=(g<0?v.slice(0,b+1):v.slice(b)).map((y,x)=>{const S=y%10;return a.createElement(kv,{...e,key:y,value:S,offset:g<0?x-b:x,current:x===b})}),m={transform:`translateY(${-dO(i,o,g)}00%)`}}return a.createElement("span",{className:`${t}-only`,style:m,onTransitionEnd:p},f)},fO=a.forwardRef((e,t)=>{const{prefixCls:r,count:n,className:o,motionClassName:s,style:i,title:l,show:u,component:d="sup",children:p,...f}=e,{getPrefixCls:m}=a.useContext(Ir),h=m("scroll-number",r),v={...f,"data-show":u,style:i,className:ae(h,o,s),title:l};let g=n;if(n&&Number(n)%1===0){const b=String(n).split("");g=a.createElement("bdi",null,b.map((_,y)=>a.createElement(pO,{prefixCls:h,count:Number(n),value:_,key:b.length-y})))}return i!=null&&i.borderColor&&(v.style={...i,boxShadow:`0 0 0 1px ${i.borderColor} inset`}),p?Sn(p,b=>({className:ae(`${h}-custom-component`,b==null?void 0:b.className,s)})):a.createElement(d,{...v,ref:t},g)}),mO=new ro("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),hO=new ro("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),gO=new ro("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),vO=new ro("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),bO=new ro("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),_O=new ro("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),yO=e=>{const{componentCls:t,iconCls:r,antCls:n,badgeShadowSize:o,textFontSize:s,textFontSizeSM:i,statusSize:l,dotSize:u,textFontWeight:d,indicatorHeight:p,indicatorHeightSM:f,marginXS:m,calc:h}=e,v=`${n}-scroll-number`,g=Zm(e,(b,{darkColor:_})=>({[`&${t} ${t}-color-${b}`]:{background:_,[`&:not(${t}-count)`]:{color:_},"a:hover &":{background:_}}}));return{[t]:{...zr(e),position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:p,height:p,color:e.badgeTextColor,fontWeight:d,fontSize:s,lineHeight:we(p),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:h(p).div(2).equal(),boxShadow:`0 0 0 ${we(o)} ${e.badgeShadowColor}`,transition:`background-color ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:f,height:f,fontSize:i,lineHeight:we(f),borderRadius:h(f).div(2).equal()},[`${t}-multiple-words`]:{padding:`0 ${we(e.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:u,minWidth:u,height:u,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${we(o)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${v}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${r}-spin`]:{animationName:_O,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:l,height:l,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:mO,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:m,color:e.colorText,fontSize:e.fontSize}},...g,[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:hO,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:gO,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:vO,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:bO,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${v}-custom-component, ${t}-count`]:{transform:"none"},[`${v}-custom-component, ${v}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[v]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${v}-only`]:{position:"relative",display:"inline-block",height:p,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${v}-only-unit`]:{height:p,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${v}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${v}-custom-component`]:{transform:"translate(-50%, -50%)"}}}}},_0=e=>{const{fontHeight:t,lineWidth:r,marginXS:n,colorBorderBg:o}=e,s=t,i=r,l=e.colorTextLightSolid,u=e.colorError,d=e.colorErrorHover;return er(e,{badgeFontHeight:s,badgeShadowSize:i,badgeTextColor:l,badgeColor:u,badgeColorHover:d,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:n,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},y0=e=>{const{fontSize:t,lineHeight:r,fontSizeSM:n,lineWidth:o}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*r)-2*o,indicatorHeightSM:t,dotSize:n/2,textFontSize:n,textFontSizeSM:n,textFontWeight:"normal",statusSize:n/2}},xO=tr("Badge",e=>{const t=_0(e);return yO(t)},y0),wO=a.forwardRef((e,t)=>{const{prefixCls:r,scrollNumberPrefixCls:n,children:o,status:s,text:i,color:l,count:u=null,overflowCount:d=99,dot:p=!1,size:f="medium",title:m,offset:h,style:v,className:g,rootClassName:b,classNames:_,styles:y,showZero:x=!1,...S}=e,{getPrefixCls:w,direction:I,className:T,style:R,classNames:P,styles:$}=Yr("badge"),A=w("badge",r),[k,D]=xO(A),z={...e,overflowCount:d,size:f,dot:p,showZero:x},[X,V]=cn([P,_],[$,y],{props:z}),Y=u>d?`${d}+`:u,U=Y==="0"||Y===0||i==="0"||i===0,F=u===null||U&&!x,H=(jn(s)||jn(l))&&F,ee=jn(s)||!U,O=p&&!U,M=O?"":Y,G=a.useMemo(()=>((!jn(M)||M==="")&&(!jn(i)||i==="")||U&&!x)&&!O,[M,U,x,O,i]),L=a.useRef(u);G||(L.current=u);const W=L.current,B=a.useRef(M);G||(B.current=M);const J=B.current,K=a.useRef(O);G||(K.current=O);const re=a.useMemo(()=>{if(!h)return{...R,...v};const Ce=Number.parseInt(h[0],10);return{...{marginTop:h[1],insetInlineEnd:-Ce},...R,...v}},[h,v,R]),se=m??(typeof W=="string"||ra(W)?W:void 0),Z=!G&&(i===0?x:!!i&&i!==!0),ne=Z?a.createElement("span",{className:`${A}-status-text`},i):null,ie=Mn(W)?Sn(W,Ce=>({style:{...re,...Ce.style}})):void 0,he=Qm(l,!1),me=ae(X.indicator,{[`${A}-status-dot`]:H,[`${A}-status-${s}`]:!!s,[`${A}-color-${l}`]:he}),Pe={};l&&!he&&(Pe.color=l,Pe.background=l);const Se=ae(A,{[`${A}-status`]:H,[`${A}-not-a-wrapper`]:!o,[`${A}-rtl`]:I==="rtl"},g,b,T,X.root,k,D);if(!o&&H&&(i||ee||!F)){const Ce=re.color;return a.createElement("span",{ref:t,...S,className:Se,style:{...V.root,...re}},a.createElement("span",{className:me,style:{...V.indicator,...Pe}}),Z&&a.createElement("span",{style:{color:Ce},className:`${A}-status-text`},i))}return a.createElement("span",{ref:t,...S,className:Se,style:V.root},o,a.createElement(Dx,{visible:!G,motionName:`${A}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:Ce})=>{const Ze=w("scroll-number",n),Ye=K.current,pe=ae(X.indicator,{[`${A}-dot`]:Ye,[`${A}-count`]:!Ye,[`${A}-count-sm`]:f==="small",[`${A}-multiple-words`]:!Ye&&J&&J.toString().length>1,[`${A}-status-${s}`]:!!s,[`${A}-color-${l}`]:he});let be={...V.indicator,...re};return l&&!he&&(be=be||{},be.background=l),a.createElement(fO,{prefixCls:Ze,show:!G,motionClassName:Ce,className:pe,count:J,title:se,style:be,key:"scrollNumber"},ie)}),ne)}),EO=e=>{const{antCls:t,badgeFontHeight:r,marginXS:n,badgeRibbonOffset:o,calc:s}=e,i=`${t}-ribbon`,l=`${t}-ribbon-wrapper`,u=Zm(e,(d,{darkColor:p})=>({[`&${i}-color-${d}`]:{background:p,color:p}}));return{[l]:{position:"relative"},[i]:{...zr(e),position:"absolute",top:n,padding:`0 ${we(e.paddingXS)}`,color:e.colorPrimary,lineHeight:we(r),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${i}-content`]:{color:e.badgeTextColor},[`${i}-corner`]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:`${we(s(o).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter},...u,[`&${i}-placement-end`]:{insetInlineEnd:s(o).mul(-1).equal(),borderEndEndRadius:0,[`${i}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${i}-placement-start`]:{insetInlineStart:s(o).mul(-1).equal(),borderEndStartRadius:0,[`${i}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}}}},SO=tr(["Badge","Ribbon"],e=>{const t=_0(e);return EO(t)},y0),CO=e=>{const{className:t,prefixCls:r,style:n,color:o,children:s,text:i,placement:l="end",rootClassName:u,styles:d,classNames:p}=e,{getPrefixCls:f,direction:m,className:h,style:v,classNames:g,styles:b}=Yr("ribbon"),_=f("ribbon",r),y=`${_}-wrapper`,[x,S]=SO(_,y),w={...e,placement:l},[I,T]=cn([g,p],[b,d],{props:w}),R=Qm(o,!1),P=ae(_,`${_}-placement-${l}`,{[`${_}-rtl`]:m==="rtl",[`${_}-color-${o}`]:R},t,h,I.indicator),$={},A={};return o&&!R&&($.background=o,A.color=o),a.createElement("div",{className:ae(y,u,x,S,I.root),style:T.root},s,a.createElement("div",{className:ae(P,x),style:{...$,...T.indicator,...v,...n}},a.createElement("span",{className:ae(`${_}-content`,I.content),style:T.content},i),a.createElement("div",{className:`${_}-corner`,style:A})))},Xl=wO;Xl.Ribbon=CO;var PO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};function Jp(){return Jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jp.apply(this,arguments)}const RO=(e,t)=>a.createElement(En,Jp({},e,{ref:t,icon:PO})),Zp=a.forwardRef(RO),{ESC:TO,TAB:IO}=Xe;function $O({visible:e,triggerRef:t,onVisibleChange:r,autoFocus:n,overlayRef:o}){const s=a.useRef(!1),i=()=>{var d,p;e&&((p=(d=t.current)==null?void 0:d.focus)==null||p.call(d),r==null||r(!1))},l=()=>{var d;return(d=o.current)!=null&&d.focus?(o.current.focus(),s.current=!0,!0):!1},u=d=>{switch(d.keyCode){case TO:i();break;case IO:{let p=!1;s.current||(p=l()),p?d.preventDefault():i();break}}};a.useEffect(()=>e?(window.addEventListener("keydown",u),n&&Ut(l,3),()=>{window.removeEventListener("keydown",u),s.current=!1}):()=>{s.current=!1},[e])}const AO=a.forwardRef((e,t)=>{const{overlay:r,arrow:n,prefixCls:o}=e,s=a.useMemo(()=>{let l;return typeof r=="function"?l=r():l=r,l},[r]),i=va(t,eh(s));return N.createElement(N.Fragment,null,n&&N.createElement("div",{className:`${o}-arrow`}),N.cloneElement(s,{ref:kx(s)?i:void 0}))}),ts={adjustX:1,adjustY:1},rs=[0,0],jO={topLeft:{points:["bl","tl"],overflow:ts,offset:[0,-4],targetOffset:rs},top:{points:["bc","tc"],overflow:ts,offset:[0,-4],targetOffset:rs},topRight:{points:["br","tr"],overflow:ts,offset:[0,-4],targetOffset:rs},bottomLeft:{points:["tl","bl"],overflow:ts,offset:[0,4],targetOffset:rs},bottom:{points:["tc","bc"],overflow:ts,offset:[0,4],targetOffset:rs},bottomRight:{points:["tr","br"],overflow:ts,offset:[0,4],targetOffset:rs}};function Qp(){return Qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qp.apply(this,arguments)}const OO=N.forwardRef((e,t)=>{var H;const{arrow:r=!1,prefixCls:n="rc-dropdown",transitionName:o,animation:s,align:i,placement:l="bottomLeft",placements:u=jO,getPopupContainer:d,showAction:p,hideAction:f,overlayClassName:m,overlayStyle:h,visible:v,trigger:g=["hover"],autoFocus:b,overlay:_,children:y,onVisibleChange:x,...S}=e,[w,I]=N.useState(),T="visible"in e?v:w,R=s?`${n}-${s}`:o,P=N.useRef(null),$=N.useRef(null),A=N.useRef(null);N.useImperativeHandle(t,()=>P.current);const k=ee=>{I(ee),x==null||x(ee)};$O({visible:T,triggerRef:A,onVisibleChange:k,autoFocus:b,overlayRef:$});const D=ee=>{const{onOverlayClick:O}=e;I(!1),O&&O(ee)},z=()=>N.createElement(AO,{ref:$,overlay:_,prefixCls:n,arrow:r}),X=()=>typeof _=="function"?z:z(),V=()=>{const{minOverlayWidthMatchTrigger:ee,alignPoint:O}=e;return"minOverlayWidthMatchTrigger"in e?ee:!O},Y=()=>{const{openClassName:ee}=e;return ee!==void 0?ee:`${n}-open`},U=N.cloneElement(y,{className:ae((H=y.props)==null?void 0:H.className,T&&Y()),ref:kx(y)?va(A,eh(y)):void 0});let F=f;return!F&&g.indexOf("contextMenu")!==-1&&(F=["click"]),N.createElement(Hc,Qp({builtinPlacements:u},S,{prefixCls:n,ref:P,popupClassName:ae(m,{[`${n}-show-arrow`]:r}),popupStyle:h,action:g,showAction:p,hideAction:F,popupPlacement:l,popupAlign:i,popupMotion:{motionName:R},popupVisible:T,stretch:V()?"minWidth":"",popup:X(),onOpenChange:k,onPopupClick:D,getPopupContainer:d}),U)}),x0=a.createContext(null);function w0(e,t){return`${e}-${t}`}function E0(e){const t=a.useContext(x0);return w0(t,e)}const an=a.createContext(null);function NO(e,t){const r={...e};return Object.keys(t).forEach(n=>{const o=t[n];o!==void 0&&(r[n]=o)}),r}function oa({children:e,locked:t,...r}){const n=a.useContext(an),o=gx(()=>NO(n,r),[n,r],(s,i)=>!t&&(s[0]!==i[0]||!Mx(s[1],i[1],!0)));return a.createElement(an.Provider,{value:o},e)}const DO=[],S0=a.createContext(null);function eu(){return a.useContext(S0)}const C0=a.createContext(DO);function ni(e){const t=a.useContext(C0);return a.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}const P0=a.createContext(null),ph=a.createContext({}),{LEFT:ef,RIGHT:tf,UP:rf,DOWN:Pl,ENTER:Rl,ESC:R0,HOME:hi,END:gi}=Xe,Mv=[rf,Pl,ef,tf];function kO(e,t,r,n){var h;const o="prev",s="next",i="children",l="parent";if(e==="inline"&&n===Rl)return{inlineTrigger:!0};const u={[rf]:o,[Pl]:s},d={[ef]:r?s:o,[tf]:r?o:s,[Pl]:i,[Rl]:i},p={[rf]:o,[Pl]:s,[Rl]:i,[R0]:l,[ef]:r?i:l,[tf]:r?l:i};switch((h={inline:u,horizontal:d,vertical:p,inlineSub:u,horizontalSub:p,verticalSub:p}[`${e}${t?"":"Sub"}`])==null?void 0:h[n]){case o:return{offset:-1,sibling:!0};case s:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case i:return{offset:1,sibling:!1};default:return null}}function MO(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function LO(e,t){let r=e||document.activeElement;for(;r;){if(t.has(r))return r;r=r.parentElement}return null}function fh(e,t){return nh(e,!0).filter(n=>t.has(n))}function Lv(e,t,r,n=1){if(!e)return null;const o=fh(e,t),s=o.length;let i=o.findIndex(l=>r===l);return n<0?i===-1?i=s-1:i-=1:n>0&&(i+=1),i=(i+s)%s,o[i]}const Yl=(e,t)=>{const r=new Set,n=new Map,o=new Map;return e.forEach(s=>{const i=document.querySelector(`[data-menu-id='${w0(t,s)}']`);i&&(r.add(i),o.set(i,s),n.set(s,i))}),{elements:r,key2element:n,element2key:o}};function zO(e,t,r,n,o,s,i,l,u,d){const p=a.useRef(),f=a.useRef();f.current=t;const m=()=>{Ut.cancel(p.current)};return a.useEffect(()=>()=>{m()},[]),h=>{const{which:v}=h;if([...Mv,Rl,R0,hi,gi].includes(v)){const g=s();let b=Yl(g,n);const{elements:_,key2element:y,element2key:x}=b,S=y.get(t),w=LO(S,_),I=x.get(w),T=kO(e,i(I,!0).length===1,r,v);if(!T&&v!==hi&&v!==gi)return;(Mv.includes(v)||[hi,gi].includes(v))&&h.preventDefault();const R=P=>{if(P){let $=P;const A=P.querySelector("a");A!=null&&A.getAttribute("href")&&($=A);const k=x.get(P);l(k),m(),p.current=Ut(()=>{f.current===k&&$.focus()})}};if([hi,gi].includes(v)||T.sibling||!w){let P;!w||e==="inline"?P=o.current:P=MO(w);let $;const A=fh(P,_);v===hi?$=A[0]:v===gi?$=A[A.length-1]:$=Lv(P,_,w,T.offset),R($)}else if(T.inlineTrigger)u(I);else if(T.offset>0)u(I,!0),m(),p.current=Ut(()=>{b=Yl(g,n);const P=w.getAttribute("aria-controls"),$=document.getElementById(P),A=Lv($,b.elements);R(A)},5);else if(T.offset<0){const P=i(I,!0),$=P[P.length-2],A=y.get($);u($,!1),R(A)}}d==null||d(h)}}function FO(e){Promise.resolve().then(e)}const mh="__RC_UTIL_PATH_SPLIT__",zv=e=>e.join(mh),VO=e=>e.split(mh),nf="rc-menu-more";function BO(){const[,e]=a.useState({}),t=a.useRef(new Map),r=a.useRef(new Map),[n,o]=a.useState([]),s=a.useRef(0),i=a.useRef(!1),l=()=>{i.current||e({})},u=a.useCallback((g,b)=>{const _=zv(b);r.current.set(_,g),t.current.set(g,_),s.current+=1;const y=s.current;FO(()=>{y===s.current&&l()})},[]),d=a.useCallback((g,b)=>{const _=zv(b);r.current.delete(_),t.current.delete(g)},[]),p=a.useCallback(g=>{o(g)},[]),f=a.useCallback((g,b)=>{const _=t.current.get(g)||"",y=VO(_);return b&&n.includes(y[0])&&y.unshift(nf),y},[n]),m=a.useCallback((g,b)=>g.filter(_=>_!==void 0).some(_=>f(_,!0).includes(b)),[f]),h=()=>{const g=[...t.current.keys()];return n.length&&g.push(nf),g},v=a.useCallback(g=>{const b=`${t.current.get(g)}${mh}`,_=new Set;return[...r.current.keys()].forEach(y=>{y.startsWith(b)&&_.add(r.current.get(y))}),_},[]);return a.useEffect(()=>()=>{i.current=!0},[]),{registerPath:u,unregisterPath:d,refreshOverflowKeys:p,isSubPathKey:m,getKeyPath:f,getKeys:h,getSubPathKeys:v}}function Oi(e){const t=a.useRef(e);t.current=e;const r=a.useCallback((...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[]);return e?r:void 0}function T0(e,t,r,n){const{activeKey:o,onActive:s,onInactive:i}=a.useContext(an),l={active:o===e};return t||(l.onMouseEnter=u=>{r==null||r({key:e,domEvent:u}),s(e)},l.onMouseLeave=u=>{n==null||n({key:e,domEvent:u}),i(e)}),l}function I0(e){const{mode:t,rtl:r,inlineIndent:n}=a.useContext(an);if(t!=="inline")return null;const o=e;return r?{paddingRight:o*n}:{paddingLeft:o*n}}function $0({icon:e,props:t,children:r}){let n;return e===null||e===!1?null:(typeof e=="function"?n=a.createElement(e,{...t}):typeof e!="boolean"&&(n=e),n||r||null)}function Jl({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(Gm(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function sa(){return sa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sa.apply(this,arguments)}class HO extends a.Component{render(){const{title:t,attribute:r,elementRef:n,...o}=this.props,s=gr(o,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Gm(!r,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),a.createElement(kn.Item,sa({},r,{title:typeof t=="string"?t:void 0},s,{ref:n}))}}const UO=a.forwardRef((e,t)=>{const{style:r,className:n,eventKey:o,warnKey:s,disabled:i,itemIcon:l,children:u,role:d,onMouseEnter:p,onMouseLeave:f,onClick:m,onKeyDown:h,onFocus:v,...g}=e,b=E0(o),{prefixCls:_,onItemClick:y,disabled:x,overflowDisabled:S,itemIcon:w,selectedKeys:I,onActive:T}=a.useContext(an),{_internalRenderMenuItem:R}=a.useContext(ph),P=`${_}-item`,$=a.useRef(),A=a.useRef(),k=x||i,D=Lx(t,A),z=ni(o),X=W=>({key:o,keyPath:[...z].reverse(),item:$.current,domEvent:W}),V=l||w,{active:Y,...U}=T0(o,k,p,f),F=I.includes(o),H=I0(z.length),ee=W=>{if(k)return;const B=X(W);m==null||m(Jl(B)),y(B)},O=W=>{if(h==null||h(W),W.which===Xe.ENTER){const B=X(W);m==null||m(Jl(B)),y(B)}},M=W=>{T(o),v==null||v(W)},G={};e.role==="option"&&(G["aria-selected"]=F);let L=a.createElement(HO,sa({ref:$,elementRef:D,role:d===null?"none":d||"menuitem",tabIndex:i?null:-1,"data-menu-id":S&&b?null:b},gr(g,["extra"]),U,G,{component:"li","aria-disabled":i,style:{...H,...r},className:ae(P,{[`${P}-active`]:Y,[`${P}-selected`]:F,[`${P}-disabled`]:k},n),onClick:ee,onKeyDown:O,onFocus:M}),u,a.createElement($0,{props:{...e,isSelected:F},icon:V}));return R&&(L=R(L,e,{selected:F})),L});function WO(e,t){const{eventKey:r}=e,n=eu(),o=ni(r);return a.useEffect(()=>{if(n)return n.registerPath(r,o),()=>{n.unregisterPath(r,o)}},[o]),n?null:a.createElement(UO,sa({},e,{ref:t}))}const tu=a.forwardRef(WO);function of(){return of=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},of.apply(this,arguments)}const qO=({className:e,children:t,...r},n)=>{const{prefixCls:o,mode:s,rtl:i}=a.useContext(an);return a.createElement("ul",of({className:ae(o,i&&`${o}-rtl`,`${o}-sub`,`${o}-${s==="inline"?"inline":"vertical"}`,e),role:"menu"},r,{"data-menu-list":!0,ref:n}),t)},A0=a.forwardRef(qO);function hh(e,t){return Fo(e).map((r,n)=>{var o;if(a.isValidElement(r)){const{key:s}=r;let i=((o=r.props)==null?void 0:o.eventKey)??s;i==null&&(i=`tmp_key-${[...t,n].join("-")}`);const u={key:i,eventKey:i};return a.cloneElement(r,u)}return r})}const sr={adjustX:1,adjustY:1},GO={topLeft:{points:["bl","tl"],overflow:sr},topRight:{points:["br","tr"],overflow:sr},bottomLeft:{points:["tl","bl"],overflow:sr},bottomRight:{points:["tr","br"],overflow:sr},leftTop:{points:["tr","tl"],overflow:sr},leftBottom:{points:["br","bl"],overflow:sr},rightTop:{points:["tl","tr"],overflow:sr},rightBottom:{points:["bl","br"],overflow:sr}},KO={topLeft:{points:["bl","tl"],overflow:sr},topRight:{points:["br","tr"],overflow:sr},bottomLeft:{points:["tl","bl"],overflow:sr},bottomRight:{points:["tr","br"],overflow:sr},rightTop:{points:["tr","tl"],overflow:sr},rightBottom:{points:["br","bl"],overflow:sr},leftTop:{points:["tl","tr"],overflow:sr},leftBottom:{points:["bl","br"],overflow:sr}};function j0(e,t,r){if(t)return t;if(r)return r[e]||r.other}const XO={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function YO({prefixCls:e,visible:t,children:r,popup:n,popupStyle:o,popupClassName:s,popupOffset:i,disabled:l,mode:u,onVisibleChange:d}){const{getPopupContainer:p,rtl:f,subMenuOpenDelay:m,subMenuCloseDelay:h,builtinPlacements:v,triggerSubMenuAction:g,forceSubMenuRender:b,rootClassName:_,motion:y,defaultMotions:x}=a.useContext(an),[S,w]=a.useState(!1),I=f?{...KO,...v}:{...GO,...v},T=XO[u],R=j0(u,y,x),P=a.useRef(R);u!=="inline"&&(P.current=R);const $={...P.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},A=a.useRef();return a.useEffect(()=>(A.current=Ut(()=>{w(t)}),()=>{Ut.cancel(A.current)}),[t]),a.createElement(Hc,{prefixCls:e,popupClassName:ae(`${e}-popup`,{[`${e}-rtl`]:f},s,_),stretch:u==="horizontal"?"minWidth":null,getPopupContainer:p,builtinPlacements:I,popupPlacement:T,popupVisible:S,popup:n,popupStyle:o,popupAlign:i&&{offset:i},action:l?[]:[g],mouseEnterDelay:m,mouseLeaveDelay:h,onPopupVisibleChange:d,forceRender:b,popupMotion:$,fresh:!0},r)}function sf(){return sf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sf.apply(this,arguments)}function JO({id:e,open:t,keyPath:r,children:n}){const o="inline",{prefixCls:s,forceSubMenuRender:i,motion:l,defaultMotions:u,mode:d}=a.useContext(an),p=a.useRef(!1);p.current=d===o;const[f,m]=a.useState(!p.current),h=p.current?t:!1;a.useEffect(()=>{p.current&&m(!1)},[d]);const v={...j0(o,l,u)};r.length>1&&(v.motionAppear=!1);const g=v.onVisibleChanged;return v.onVisibleChanged=b=>(!p.current&&!b&&m(!0),g==null?void 0:g(b)),f?null:a.createElement(oa,{mode:o,locked:!p.current},a.createElement(Dx,sf({visible:h},v,{forceRender:i,removeOnLeave:!1,leavedClassName:`${s}-hidden`}),({className:b,style:_})=>a.createElement(A0,{id:e,className:b,style:_},n)))}function ia(){return ia=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ia.apply(this,arguments)}const ZO=a.forwardRef((e,t)=>{const{style:r,className:n,styles:o,classNames:s,title:i,eventKey:l,warnKey:u,disabled:d,internalPopupClose:p,children:f,itemIcon:m,expandIcon:h,popupClassName:v,popupOffset:g,popupStyle:b,onClick:_,onMouseEnter:y,onMouseLeave:x,onTitleClick:S,onTitleMouseEnter:w,onTitleMouseLeave:I,popupRender:T,...R}=e,P=E0(l),{prefixCls:$,mode:A,openKeys:k,disabled:D,overflowDisabled:z,activeKey:X,selectedKeys:V,itemIcon:Y,expandIcon:U,onItemClick:F,onOpenChange:H,onActive:ee,popupRender:O}=a.useContext(an),{_internalRenderSubMenuItem:M}=a.useContext(ph),{isSubPathKey:G}=a.useContext(P0),L=ni(),W=`${$}-submenu`,B=D||d,J=a.useRef(),K=a.useRef(),re=m??Y,se=h??U,Z=k.includes(l),ne=!z&&Z,ie=G(V,l),{active:he,...me}=T0(l,B,w,I),[Pe,Se]=a.useState(!1),Ce=Ee=>{B||Se(Ee)},Ze=Ee=>{Ce(!0),y==null||y({key:l,domEvent:Ee})},Ye=Ee=>{Ce(!1),x==null||x({key:l,domEvent:Ee})},pe=a.useMemo(()=>he||(A!=="inline"?Pe||G([X],l):!1),[A,he,X,Pe,l,G]),be=I0(L.length),j=Ee=>{B||(S==null||S({key:l,domEvent:Ee}),A==="inline"&&H(l,!Z))},q=Oi(Ee=>{_==null||_(Jl(Ee)),F(Ee)}),Q=Ee=>{A!=="inline"&&H(l,Ee)},le=()=>{ee(l)},de=P&&`${P}-popup`,ce=a.useMemo(()=>a.createElement($0,{icon:A!=="horizontal"?se:void 0,props:{...e,isOpen:ne,isSubMenu:!0}},a.createElement("i",{className:`${W}-arrow`})),[A,se,e,ne,W]);let fe=a.createElement("div",ia({role:"menuitem",style:be,className:`${W}-title`,tabIndex:B?null:-1,ref:J,title:typeof i=="string"?i:null,"data-menu-id":z&&P?null:P,"aria-expanded":ne,"aria-haspopup":!0,"aria-controls":de,"aria-disabled":B,onClick:j,onFocus:le},me),i,ce);const ue=a.useRef(A);A!=="inline"&&L.length>1?ue.current="vertical":ue.current=A;const ye=ue.current,Be=a.useMemo(()=>{const Ee=a.createElement(oa,{classNames:s,styles:o,mode:ye==="horizontal"?"vertical":ye},a.createElement(A0,{id:de,ref:K},f)),lt=T||O;return lt?lt(Ee,{item:e,keys:L}):Ee},[T,O,L,de,f,e,ye]);if(!z){const Ee=ue.current;fe=a.createElement(YO,{mode:Ee,prefixCls:W,visible:!p&&ne&&A!=="inline",popupClassName:v,popupOffset:g,popupStyle:b,popup:Be,disabled:B,onVisibleChange:Q},fe)}let Ae=a.createElement(kn.Item,ia({ref:t,role:"none"},R,{component:"li",style:r,className:ae(W,`${W}-${A}`,n,{[`${W}-open`]:ne,[`${W}-active`]:pe,[`${W}-selected`]:ie,[`${W}-disabled`]:B}),onMouseEnter:Ze,onMouseLeave:Ye}),fe,!z&&a.createElement(JO,{id:de,open:ne,keyPath:L},f));return M&&(Ae=M(Ae,e,{selected:ie,active:pe,open:ne,disabled:B})),a.createElement(oa,{classNames:s,styles:o,onItemClick:q,mode:A==="horizontal"?"vertical":A,itemIcon:re,expandIcon:se},Ae)}),ru=a.forwardRef((e,t)=>{const{eventKey:r,children:n}=e,o=ni(r),s=hh(n,o),i=eu();a.useEffect(()=>{if(i)return i.registerPath(r,o),()=>{i.unregisterPath(r,o)}},[o]);let l;return i?l=s:l=a.createElement(ZO,ia({ref:t},e),s),a.createElement(C0.Provider,{value:o},l)});function gh({className:e,style:t}){const{prefixCls:r}=a.useContext(an);return eu()?null:a.createElement("li",{role:"separator",className:ae(`${r}-item-divider`,e),style:t})}function Zl(){return Zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zl.apply(this,arguments)}const QO=a.forwardRef((e,t)=>{const{className:r,title:n,eventKey:o,children:s,...i}=e,{prefixCls:l,classNames:u,styles:d}=a.useContext(an),p=`${l}-item-group`;return a.createElement("li",Zl({ref:t,role:"presentation"},i,{onClick:f=>f.stopPropagation(),className:ae(p,r)}),a.createElement("div",{role:"presentation",className:ae(`${p}-title`,u==null?void 0:u.listTitle),style:d==null?void 0:d.listTitle,title:typeof n=="string"?n:void 0},n),a.createElement("ul",{role:"group",className:ae(`${p}-list`,u==null?void 0:u.list),style:d==null?void 0:d.list},s))}),vh=a.forwardRef((e,t)=>{const{eventKey:r,children:n}=e,o=ni(r),s=hh(n,o);return eu()?s:a.createElement(QO,Zl({ref:t},gr(e,["warnKey"])),s)});function ws(){return ws=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ws.apply(this,arguments)}function af(e,t,r){const{item:n,group:o,submenu:s,divider:i}=t;return(e||[]).map((l,u)=>{if(l&&typeof l=="object"){const{label:d,children:p,key:f,type:m,extra:h,...v}=l,g=f??`tmp-${u}`;return p||m==="group"?m==="group"?a.createElement(o,ws({key:g},v,{title:d}),af(p,t,r)):a.createElement(s,ws({key:g},v,{title:d}),af(p,t,r)):m==="divider"?a.createElement(i,ws({key:g},v)):a.createElement(n,ws({key:g},v,{extra:h}),d,(!!h||h===0)&&a.createElement("span",{className:`${r}-item-extra`},h))}return null}).filter(l=>l)}function Fv(e,t,r,n,o){let s=e;const i={divider:gh,item:tu,group:vh,submenu:ru,...n};return t&&(s=af(t,i,o)),hh(s,r)}function lf(){return lf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lf.apply(this,arguments)}const mo=[],eN=a.forwardRef((e,t)=>{var qa;const{prefixCls:r="rc-menu",rootClassName:n,style:o,className:s,styles:i,classNames:l,tabIndex:u=0,items:d,children:p,direction:f,id:m,mode:h="vertical",inlineCollapsed:v,disabled:g,disabledOverflow:b,subMenuOpenDelay:_=.1,subMenuCloseDelay:y=.1,forceSubMenuRender:x,defaultOpenKeys:S,openKeys:w,activeKey:I,defaultActiveFirst:T,selectable:R=!0,multiple:P=!1,defaultSelectedKeys:$,selectedKeys:A,onSelect:k,onDeselect:D,inlineIndent:z=24,motion:X,defaultMotions:V,triggerSubMenuAction:Y="hover",builtinPlacements:U,itemIcon:F,expandIcon:H,overflowedIndicator:ee="...",overflowedIndicatorPopupClassName:O,getPopupContainer:M,onClick:G,onOpenChange:L,onKeyDown:W,openAnimation:B,openTransitionName:J,_internalRenderMenuItem:K,_internalRenderSubMenuItem:re,_internalComponents:se,popupRender:Z,...ne}=e,[ie,he]=a.useMemo(()=>[Fv(p,d,mo,se,r),Fv(p,d,mo,{},r)],[p,d,se]),[me,Pe]=a.useState(!1),Se=a.useRef(),Ce=Bc(m?`rc-menu-uuid-${m}`:"rc-menu-uuid"),Ze=f==="rtl",[Ye,pe]=Pr(S,w),be=Ye||mo,j=(ct,Me=!1)=>{function st(){pe(ct),L==null||L(ct)}Me?$o.flushSync(st):st()},[q,Q]=a.useState(be),le=a.useRef(!1),[de,ce]=a.useMemo(()=>(h==="inline"||h==="vertical")&&v?["vertical",v]:[h,!1],[h,v]),fe=de==="inline",[ue,ye]=a.useState(de),[Be,Ae]=a.useState(ce);a.useEffect(()=>{ye(de),Ae(ce),le.current&&(fe?pe(q):j(mo))},[de,ce]);const[Ee,lt]=a.useState(0),ht=Ee>=ie.length-1||ue!=="horizontal"||b;a.useEffect(()=>{fe&&Q(be)},[be]),a.useEffect(()=>(le.current=!0,()=>{le.current=!1}),[]);const{registerPath:dt,unregisterPath:mt,refreshOverflowKeys:ft,isSubPathKey:vt,getKeyPath:ze,getKeys:We,getSubPathKeys:ke}=BO(),nt=a.useMemo(()=>({registerPath:dt,unregisterPath:mt}),[dt,mt]),ut=a.useMemo(()=>({isSubPathKey:vt}),[vt]);a.useEffect(()=>{ft(ht?mo:ie.slice(Ee+1).map(ct=>ct.key))},[Ee,ht]);const[_e,Qe]=Pr(I||T&&((qa=ie[0])==null?void 0:qa.key),I),ge=Oi(ct=>{Qe(ct)}),Te=Oi(()=>{Qe(void 0)});a.useImperativeHandle(t,()=>({list:Se.current,focus:ct=>{var uo,po;const Me=We(),{elements:st,key2element:bt,element2key:It}=Yl(Me,Ce),dr=fh(Se.current,st);let Pn;_e&&Me.includes(_e)?Pn=_e:Pn=dr[0]?It.get(dr[0]):(uo=ie.find(Ga=>!Ga.props.disabled))==null?void 0:uo.key;const Yt=bt.get(Pn);Pn&&Yt&&((po=Yt==null?void 0:Yt.focus)==null||po.call(Yt,ct))},findItem:({key:ct})=>{const Me=We(),{key2element:st}=Yl(Me,Ce);return st.get(ct)||null}}));const[et,xe]=Pr($||[],A),$e=a.useMemo(()=>Array.isArray(et)?et:et==null?mo:[et],[et]),Fe=ct=>{if(R){const{key:Me}=ct,st=$e.includes(Me);let bt;P?st?bt=$e.filter(dr=>dr!==Me):bt=[...$e,Me]:bt=[Me],xe(bt);const It={...ct,selectedKeys:bt};st?D==null||D(It):k==null||k(It)}!P&&be.length&&ue!=="inline"&&j(mo)},Ge=Oi(ct=>{G==null||G(Jl(ct)),Fe(ct)}),rt=Oi((ct,Me)=>{let st=be.filter(bt=>bt!==ct);if(Me)st.push(ct);else if(ue!=="inline"){const bt=ke(ct);st=st.filter(It=>!bt.has(It))}Mx(be,st,!0)||j(st,!0)}),ur=zO(ue,_e,Ze,Ce,Se,We,ze,Qe,(ct,Me)=>{const st=Me??!be.includes(ct);rt(ct,st)},W);a.useEffect(()=>{Pe(!0)},[]);const Gt=a.useMemo(()=>({_internalRenderMenuItem:K,_internalRenderSubMenuItem:re}),[K,re]),sd=ue!=="horizontal"||b?ie:ie.map((ct,Me)=>a.createElement(oa,{key:ct.key,overflowDisabled:Me>Ee,classNames:l,styles:i},ct)),id=a.createElement(kn,lf({id:m,ref:Se,prefixCls:`${r}-overflow`,component:"ul",itemComponent:tu,className:ae(r,`${r}-root`,`${r}-${ue}`,s,{[`${r}-inline-collapsed`]:Be,[`${r}-rtl`]:Ze},n),dir:f,style:o,role:"menu",tabIndex:u,data:sd,renderRawItem:ct=>ct,renderRawRest:ct=>{const Me=ct.length,st=Me?ie.slice(-Me):null;return a.createElement(ru,{eventKey:nf,title:ee,disabled:ht,internalPopupClose:Me===0,popupClassName:O},st)},maxCount:ue!=="horizontal"||b?kn.INVALIDATE:kn.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:ct=>{lt(ct)},onKeyDown:ur},ne));return a.createElement(ph.Provider,{value:Gt},a.createElement(x0.Provider,{value:Ce},a.createElement(oa,{prefixCls:r,rootClassName:n,classNames:l,styles:i,mode:ue,openKeys:be,rtl:Ze,disabled:g,motion:me?X:null,defaultMotions:me?V:null,activeKey:_e,onActive:ge,onInactive:Te,selectedKeys:$e,inlineIndent:z,subMenuOpenDelay:_,subMenuCloseDelay:y,forceSubMenuRender:x,builtinPlacements:U,triggerSubMenuAction:Y,getPopupContainer:M,itemIcon:F,expandIcon:H,onItemClick:Ge,onOpenChange:rt,popupRender:Z},a.createElement(P0.Provider,{value:ut},id),a.createElement("div",{style:{display:"none"},"aria-hidden":!0},a.createElement(S0.Provider,{value:nt},he)))))}),wa=eN;wa.Item=tu;wa.SubMenu=ru;wa.ItemGroup=vh;wa.Divider=gh;const O0=a.createContext({});var tN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};function cf(){return cf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cf.apply(this,arguments)}const rN=(e,t)=>a.createElement(En,cf({},e,{ref:t,icon:tN})),N0=a.forwardRef(rN),Ql=a.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),D0=e=>{const{prefixCls:t,className:r,dashed:n,...o}=e,{getPrefixCls:s}=a.useContext(Ir),i=s("menu",t),l=ae({[`${i}-item-divider-dashed`]:!!n},r);return a.createElement(gh,{className:l,...o})},k0=e=>{var T,R;const{className:t,children:r,icon:n,title:o,danger:s,extra:i}=e,{prefixCls:l,firstLevel:u,direction:d,disableMenuItemTitleTooltip:p,tooltip:f,inlineCollapsed:m,styles:h,classNames:v}=a.useContext(Ql),g=P=>{var k,D;const $=r==null?void 0:r[0],A=a.createElement("span",{className:ae(`${l}-title-content`,u?v==null?void 0:v.itemContent:(k=v==null?void 0:v.subMenu)==null?void 0:k.itemContent,{[`${l}-title-content-with-extra`]:!!i||i===0}),style:u?h==null?void 0:h.itemContent:(D=h==null?void 0:h.subMenu)==null?void 0:D.itemContent},r);return(!n||a.isValidElement(r)&&r.type==="span")&&r&&P&&u&&typeof $=="string"?a.createElement("div",{className:`${l}-inline-collapsed-noicon`},$.charAt(0)):A},{siderCollapsed:b}=a.useContext(O0);let _=o;typeof o>"u"?_=u?r:"":o===!1&&(_="");const y=f===!1?void 0:f,x=y&&y.title!==void 0?y.title:_,S={...y??null,title:x};!b&&!m&&(S.title=null,S.open=!1);const w=Fo(r).length;let I=a.createElement(tu,{...gr(e,["title","icon","danger"]),className:ae(u?v==null?void 0:v.item:(T=v==null?void 0:v.subMenu)==null?void 0:T.item,{[`${l}-item-danger`]:s,[`${l}-item-only-child`]:(n?w+1:w)===1},t),style:{...u?h==null?void 0:h.item:(R=h==null?void 0:h.subMenu)==null?void 0:R.item,...e.style},title:typeof o=="string"?o:void 0},Sn(n,P=>{var $,A;return{className:ae(`${l}-item-icon`,u?v==null?void 0:v.itemIcon:($=v==null?void 0:v.subMenu)==null?void 0:$.itemIcon,P.className),style:{...u?h==null?void 0:h.itemIcon:(A=h==null?void 0:h.subMenu)==null?void 0:A.itemIcon,...P.style}}}),g(m));if(!p&&f!==!1){const P=y&&y.placement?y.placement:d==="rtl"?"left":"right",$=`${l}-inline-collapsed-tooltip`,A=D=>({...D,root:ae($,D==null?void 0:D.root)}),k=y&&typeof y.classNames=="function"?D=>{const z=y.classNames(D);return A(z)}:A(y==null?void 0:y.classNames);I=a.createElement(Bo,{...S,placement:P,classNames:k},I)}return I},ec=a.createContext(null),nN=a.forwardRef((e,t)=>{const{children:r,...n}=e,o=a.useContext(ec),s=a.useMemo(()=>({...o,...n}),[o,n.prefixCls,n.mode,n.selectable,n.rootClassName]),i=iA(r),l=Lx(t,i?eh(r):null);return a.createElement(ec.Provider,{value:s},a.createElement(Xm,{space:!0},i?a.cloneElement(r,{ref:l}):r))}),oN=e=>{const{componentCls:t,motionDurationSlow:r,horizontalLineHeight:n,colorSplit:o,lineWidth:s,lineType:i,itemPaddingInline:l}=e;return{[`${t}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${we(s)} ${i} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:l},[`> ${t}-item:hover,
> ${t}-item-active,
> ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:["border-color","background-color"].map(u=>`${u} ${r}`).join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},sN=({componentCls:e,menuArrowOffset:t,calc:r})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${we(r(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${we(t)})`}}}}),Vv=e=>Ul(e),Bv=(e,t)=>{const{componentCls:r,itemColor:n,itemSelectedColor:o,subMenuItemSelectedColor:s,groupTitleColor:i,itemBg:l,subMenuItemBg:u,itemSelectedBg:d,activeBarHeight:p,activeBarWidth:f,activeBarBorderWidth:m,motionDurationSlow:h,motionEaseInOut:v,motionEaseOut:g,itemPaddingInline:b,motionDurationMid:_,itemHoverColor:y,lineType:x,colorSplit:S,itemDisabledColor:w,dangerItemColor:I,dangerItemHoverColor:T,dangerItemSelectedColor:R,dangerItemActiveBg:P,dangerItemSelectedBg:$,popupBg:A,itemHoverBg:k,itemActiveBg:D,menuSubMenuBg:z,horizontalItemSelectedColor:X,horizontalItemSelectedBg:V,horizontalItemBorderRadius:Y,horizontalItemHoverBg:U}=e;return{[`${r}-${t}, ${r}-${t} > ${r}`]:{color:n,background:l,[`&${r}-root:focus-visible`]:{...Vv(e)},[`${r}-item`]:{"&-group-title, &-extra":{color:i}},[`${r}-submenu-selected > ${r}-submenu-title`]:{color:s},[`${r}-item, ${r}-submenu-title`]:{color:n,[`&:not(${r}-item-disabled):focus-visible`]:{...Vv(e)}},[`${r}-item-disabled, ${r}-submenu-disabled`]:{color:`${w} !important`},[`${r}-item:not(${r}-item-selected):not(${r}-submenu-selected)`]:{[`&:hover, > ${r}-submenu-title:hover`]:{color:y}},[`${r}-submenu:not(${r}-submenu-selected)`]:{[`> ${r}-submenu-title:hover`]:{color:y}},[`&:not(${r}-horizontal)`]:{[`${r}-item:not(${r}-item-selected)`]:{"&:hover":{backgroundColor:k},"&:active":{backgroundColor:D}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:k},"&:active":{backgroundColor:D}}},[`${r}-item-danger`]:{color:I,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:T}},[`&${r}-item:active`]:{background:P}},[`${r}-item a`]:{"&, &:hover":{color:"inherit"}},[`${r}-item-selected`]:{color:o,[`&${r}-item-danger`]:{color:R},"a, a:hover":{color:"inherit"}},[`& ${r}-item-selected`]:{backgroundColor:d,[`&${r}-item-danger`]:{backgroundColor:$}},[`&${r}-submenu > ${r}`]:{backgroundColor:z},[`&${r}-popup > ${r}`]:{backgroundColor:A},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:A},[`&${r}-horizontal`]:{...t==="dark"?{borderBottom:0}:{},[`> ${r}-item, > ${r}-submenu`]:{top:m,marginTop:e.calc(m).mul(-1).equal(),marginBottom:0,borderRadius:Y,"&::after":{position:"absolute",insetInline:b,bottom:0,borderBottom:`${we(p)} solid transparent`,transition:`border-color ${h} ${v}`,content:'""'},"&:hover, &-active, &-open":{background:U,"&::after":{borderBottomWidth:p,borderBottomColor:X}},"&-selected":{color:X,backgroundColor:V,"&:hover":{backgroundColor:V},"&::after":{borderBottomWidth:p,borderBottomColor:X}}}},[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${we(m)} ${x} ${S}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:u},[`${r}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${we(f)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:["transform","opacity"].map(F=>`${F} ${_} ${g}`).join(","),content:'""'},[`&${r}-item-danger`]:{"&::after":{borderInlineEndColor:R}}},[`${r}-selected, ${r}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform","opacity"].map(F=>`${F} ${_} ${v}`).join(",")}}}}}},Hv=e=>{const{componentCls:t,itemHeight:r,itemMarginInline:n,padding:o,menuArrowSize:s,marginXS:i,itemMarginBlock:l,itemWidth:u,itemPaddingInline:d}=e,p=e.calc(s).add(o).add(i).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:r,lineHeight:we(r),paddingInline:d,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:l,width:u},[`> ${t}-item,
> ${t}-submenu > ${t}-submenu-title`]:{height:r,lineHeight:we(r)},[`${t}-item-group-list ${t}-submenu-title,
${t}-submenu-title`]:{paddingInlineEnd:p}}},iN=e=>{const{componentCls:t,iconCls:r,itemHeight:n,colorTextLightSolid:o,dropdownWidth:s,controlHeightLG:i,motionEaseOut:l,paddingXL:u,itemMarginInline:d,fontSizeLG:p,motionDurationFast:f,motionDurationSlow:m,paddingXS:h,boxShadowSecondary:v,collapsedWidth:g,collapsedIconSize:b}=e,_={height:n,lineHeight:we(n),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:"none"},...Hv(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...Hv(e),boxShadow:v}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:s,maxHeight:`calc(100vh - ${we(e.calc(i).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${m}`,`background-color ${m}`,`padding ${f} ${l}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:_,[`& ${t}-item-group-title`]:{paddingInlineStart:u}},[`${t}-item`]:_}},{[`${t}-inline-collapsed`]:{width:g,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:p,textAlign:"center"}}},[`> ${t}-item,
> ${t}-item-group > ${t}-item-group-list > ${t}-item,
> ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
> ${t}-submenu > ${t}-submenu-title`]:{display:"flex",alignItems:"center",justifyContent:"center",insetInlineStart:0,paddingInline:`calc(50% - ${we(e.calc(b).div(2).equal())} - ${we(d)})`,textOverflow:"clip",[`
${t}-submenu-arrow,
${t}-submenu-expand-icon
`]:{opacity:0},[`> ${t}-title-content`]:{width:0,opacity:0,overflow:"hidden"},[`${t}-item-icon, ${r}`]:{margin:0,fontSize:b,lineHeight:we(n),"+ span":{display:"inline-block",width:0,opacity:0,overflow:"hidden",marginInlineStart:0}}},[`${t}-item-icon, ${r}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${r}`]:{display:"none"},"a, a:hover":{color:o}},[`${t}-item-group-title`]:{...Ls,paddingInline:h}}}]},Uv=e=>{const{componentCls:t,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:o,motionEaseOut:s,iconCls:i,iconSize:l,iconMarginInlineEnd:u}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${r}`,`background-color ${r}`,`padding calc(${r} + 0.1s) ${o}`].join(","),[`${t}-item-icon, ${i}`]:{minWidth:l,fontSize:l,transition:[`font-size ${n} ${s}`,`margin ${r} ${o}`,`color ${r}`].join(","),"+ span":{marginInlineStart:u,opacity:1,transition:[`opacity ${r} ${o}`,`margin ${r}`,`color ${r}`].join(",")}},[`${t}-item-icon`]:{...xx()},[`&${t}-item-only-child`]:{[`> ${i}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Wv=e=>{const{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,borderRadius:o,menuArrowSize:s,menuArrowOffset:i}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:s,color:"currentcolor",transform:"translateY(-50%)",transition:["transform","opacity"].map(l=>`${l} ${r}`).join(",")},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(s).mul(.6).equal(),height:e.calc(s).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:["background-color","transform","top","color"].map(l=>`${l} ${r} ${n}`).join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${we(e.calc(i).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${we(i)})`}}}}},aN=e=>{const{antCls:t,componentCls:r,fontSize:n,motionDurationSlow:o,motionDurationMid:s,motionEaseInOut:i,paddingXS:l,padding:u,colorSplit:d,lineWidth:p,zIndexPopup:f,borderRadiusLG:m,subMenuItemBorderRadius:h,menuArrowSize:v,menuArrowOffset:g,lineType:b,groupTitleLineHeight:_,groupTitleFontSize:y}=e;return[{"":{[r]:{...Rp(),"&-hidden":{display:"none"}}},[`${r}-submenu-hidden`]:{display:"none"}},{[r]:{...zr(e),...Rp(),marginBottom:0,paddingInlineStart:0,fontSize:n,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${r}-item`]:{flex:"none"}},[`${r}-item, ${r}-submenu, ${r}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${r}-item-group-title`]:{padding:`${we(l)} ${we(u)}`,fontSize:y,lineHeight:_,transition:`all ${o}`},[`&-horizontal ${r}-submenu`]:{transition:["border-color","background-color"].map(x=>`${x} ${o} ${i}`).join(",")},[`${r}-submenu, ${r}-submenu-inline`]:{transition:[`border-color ${o}`,`background-color ${o}`,`padding ${s}`].map(x=>`${x} ${i}`).join(",")},[`${r}-submenu ${r}-sub`]:{cursor:"initial",transition:["background-color","padding"].map(x=>`${x} ${o} ${i}`).join(",")},[`${r}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${r}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${r}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${r}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:d,borderStyle:b,borderWidth:0,borderTopWidth:p,marginBlock:p,padding:0,"&-dashed":{borderStyle:"dashed"}},...Uv(e),[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${we(e.calc(n).mul(2).equal())} ${we(u)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:f,borderRadius:m,boxShadow:"none",transformOrigin:"0 0",[`&${r}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${r}`]:{borderRadius:m,...Uv(e),...Wv(e),[`${r}-item, ${r}-submenu > ${r}-submenu-title`]:{borderRadius:h},[`${r}-submenu-title::after`]:{transition:`transform ${o} ${i}`}}},"&-placement-leftTop, &-placement-bottomRight":{transformOrigin:"100% 0"},"&-placement-leftBottom, &-placement-topRight":{transformOrigin:"100% 100%"},"&-placement-rightBottom, &-placement-topLeft":{transformOrigin:"0 100%"},"&-placement-bottomLeft, &-placement-rightTop":{transformOrigin:"0 0"},"&-placement-leftTop, &-placement-leftBottom":{paddingInlineEnd:e.paddingXS},"&-placement-rightTop, &-placement-rightBottom":{paddingInlineStart:e.paddingXS},"&-placement-topRight, &-placement-topLeft":{paddingBottom:e.paddingXS},"&-placement-bottomRight, &-placement-bottomLeft":{paddingTop:e.paddingXS}},...Wv(e),[`&-inline-collapsed ${r}-submenu-arrow,
&-inline ${r}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${we(g)})`},"&::after":{transform:`rotate(45deg) translateX(${we(e.calc(g).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${we(e.calc(v).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${we(e.calc(g).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${we(g)})`}}}},{[`${t}-layout-header`]:{[r]:{lineHeight:"inherit"}}}]},lN=e=>{const{colorPrimary:t,colorError:r,colorTextDisabled:n,colorErrorBg:o,colorText:s,colorTextDescription:i,colorBgContainer:l,colorFillAlter:u,colorFillContent:d,lineWidth:p,lineWidthBold:f,controlItemBgActive:m,colorBgTextHover:h,controlHeightLG:v,lineHeight:g,colorBgElevated:b,marginXXS:_,padding:y,fontSize:x,controlHeightSM:S,fontSizeLG:w,colorTextLightSolid:I,colorErrorHover:T}=e,R=e.activeBarWidth??0,P=e.activeBarBorderWidth??p,$=e.itemMarginInline??e.marginXXS,A=new sv(I).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:s,itemColor:s,colorItemTextHover:s,itemHoverColor:s,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:i,groupTitleColor:i,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:l,itemBg:l,colorItemBgHover:h,itemHoverBg:h,colorItemBgActive:d,itemActiveBg:m,colorSubItemBg:u,subMenuItemBg:u,colorItemBgSelected:m,itemSelectedBg:m,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:R,colorActiveBarHeight:f,activeBarHeight:f,colorActiveBarBorderSize:p,activeBarBorderWidth:P,colorItemTextDisabled:n,itemDisabledColor:n,colorDangerItemText:r,dangerItemColor:r,colorDangerItemTextHover:r,dangerItemHoverColor:r,colorDangerItemTextSelected:r,dangerItemSelectedColor:r,colorDangerItemBgActive:o,dangerItemActiveBg:o,colorDangerItemBgSelected:o,dangerItemSelectedBg:o,itemMarginInline:$,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:v,groupTitleLineHeight:g,collapsedWidth:v*2,popupBg:b,itemMarginBlock:_,itemPaddingInline:y,horizontalLineHeight:`${v*1.15}px`,iconSize:x,iconMarginInlineEnd:S-x,collapsedIconSize:w,groupTitleFontSize:x,darkItemDisabledColor:new sv(I).setA(.25).toRgbString(),darkItemColor:A,darkDangerItemColor:r,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:I,darkItemSelectedBg:t,darkDangerItemSelectedBg:r,darkItemHoverBg:"transparent",darkGroupTitleColor:A,darkItemHoverColor:I,darkDangerItemHoverColor:T,darkDangerItemSelectedColor:I,darkDangerItemActiveBg:r,itemWidth:R?`calc(100% + ${P}px)`:`calc(100% - ${$*2}px)`}},cN=(e,t=e,r=!0)=>tr("Menu",o=>{const{colorBgElevated:s,controlHeightLG:i,fontSize:l,darkItemColor:u,darkDangerItemColor:d,darkItemBg:p,darkSubMenuItemBg:f,darkItemSelectedColor:m,darkItemSelectedBg:h,darkDangerItemSelectedBg:v,darkItemHoverBg:g,darkGroupTitleColor:b,darkItemHoverColor:_,darkItemDisabledColor:y,darkDangerItemHoverColor:x,darkDangerItemSelectedColor:S,darkDangerItemActiveBg:w,popupBg:I,darkPopupBg:T}=o,R=o.calc(l).div(7).mul(5).equal(),P=er(o,{menuArrowSize:R,menuHorizontalHeight:o.calc(i).mul(1.15).equal(),menuArrowOffset:o.calc(R).mul(.25).equal(),menuSubMenuBg:s,calc:o.calc,popupBg:I}),$=er(P,{itemColor:u,itemHoverColor:_,groupTitleColor:b,itemSelectedColor:m,subMenuItemSelectedColor:m,itemBg:p,popupBg:T,subMenuItemBg:f,itemActiveBg:"transparent",itemSelectedBg:h,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:g,itemDisabledColor:y,dangerItemColor:d,dangerItemHoverColor:x,dangerItemSelectedColor:S,dangerItemActiveBg:w,dangerItemSelectedBg:v,menuSubMenuBg:f,horizontalItemSelectedColor:m,horizontalItemSelectedBg:h});return[aN(P),oN(P),iN(P),Bv(P,"light"),Bv($,"dark"),sN(P),aA(P),zs(P,"slide-up"),zs(P,"slide-down"),Jm(P,"zoom-big")]},lN,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:r,unitless:{groupTitleLineHeight:!0}})(e,t),M0=e=>{var g,b,_,y,x,S;const{popupClassName:t,icon:r,title:n,theme:o}=e,s=a.useContext(Ql),{prefixCls:i,inlineCollapsed:l,theme:u,classNames:d,styles:p}=s,f=ni();let m;if(!r)m=l&&!f.length&&n&&typeof n=="string"?a.createElement("div",{className:`${i}-inline-collapsed-noicon`},n.charAt(0)):a.createElement("span",{className:`${i}-title-content`},n);else{const w=a.isValidElement(n)&&n.type==="span";m=a.createElement(a.Fragment,null,Sn(r,I=>({className:ae(I.className,`${i}-item-icon`,d==null?void 0:d.itemIcon),style:{...I.style,...p==null?void 0:p.itemIcon}})),w?n:a.createElement("span",{className:`${i}-title-content`},n))}const h=a.useMemo(()=>({...s,firstLevel:!1}),[s]),[v]=qc("Menu");return a.createElement(Ql.Provider,{value:h},a.createElement(ru,{...gr(e,["icon"]),title:m,classNames:{list:(g=d==null?void 0:d.subMenu)==null?void 0:g.list,listTitle:(b=d==null?void 0:d.subMenu)==null?void 0:b.itemTitle},styles:{list:(_=p==null?void 0:p.subMenu)==null?void 0:_.list,listTitle:(y=p==null?void 0:p.subMenu)==null?void 0:y.itemTitle},popupClassName:ae(i,t,(x=d==null?void 0:d.popup)==null?void 0:x.root,`${i}-${o||u}`),popupStyle:{zIndex:v,...e.popupStyle,...(S=p==null?void 0:p.popup)==null?void 0:S.root}}))};function hd(e){return e===null||e===!1}const uN={item:k0,submenu:M0,divider:D0},dN=a.forwardRef((e,t)=>{var re;const r=a.useContext(ec),n=r||{},{prefixCls:o,className:s,style:i,theme:l="light",expandIcon:u,_internalDisableMenuItemTitleTooltip:d,tooltip:p,inlineCollapsed:f,siderCollapsed:m,rootClassName:h,mode:v,selectable:g,onClick:b,overflowedIndicatorPopupClassName:_,classNames:y,styles:x,...S}=e,{menu:w}=a.useContext(Ir),{getPrefixCls:I,getPopupContainer:T,direction:R,className:P,style:$,classNames:A,styles:k}=Yr("menu"),D=I(),z=gr(S,["collapsedWidth"]);(re=n.validator)==null||re.call(n,{mode:v});const X=Lr((...se)=>{var Z;b==null||b(...se),(Z=n.onClick)==null||Z.call(n)}),V=n.mode||v,Y=g??n.selectable,U=f??m,F={...e,mode:V,inlineCollapsed:U,selectable:Y,theme:l},[H,ee]=cn([A,y],[k,x],{props:F},{popup:{_default:"root"},subMenu:{_default:"item"}}),O={horizontal:{motionName:`${D}-slide-up`},inline:lA(D),other:{motionName:`${D}-zoom-big`}},M=I("menu",o||n.prefixCls),G=ti(M),[L,W]=cN(M,G,!r),B=ae(`${M}-${l}`,P,s),J=a.useMemo(()=>{var Z;if(typeof u=="function"||hd(u))return u||null;if(typeof n.expandIcon=="function"||hd(n.expandIcon))return n.expandIcon||null;if(typeof(w==null?void 0:w.expandIcon)=="function"||hd(w==null?void 0:w.expandIcon))return(w==null?void 0:w.expandIcon)||null;const se=u??(n==null?void 0:n.expandIcon)??(w==null?void 0:w.expandIcon);return Sn(se,{className:ae(`${M}-submenu-expand-icon`,a.isValidElement(se)?(Z=se.props)==null?void 0:Z.className:void 0)})},[u,n==null?void 0:n.expandIcon,w==null?void 0:w.expandIcon,M]),K=a.useMemo(()=>({prefixCls:M,inlineCollapsed:U||!1,direction:R,firstLevel:!0,theme:l,mode:V,disableMenuItemTitleTooltip:d,tooltip:p,classNames:H,styles:ee}),[M,U,R,d,l,V,H,ee,p]);return a.createElement(ec.Provider,{value:null},a.createElement(Ql.Provider,{value:K},a.createElement(wa,{getPopupContainer:T,overflowedIndicator:a.createElement(N0,null),overflowedIndicatorPopupClassName:ae(M,`${M}-${l}`,_),classNames:{list:H.list,listTitle:H.itemTitle},styles:{list:ee.list,listTitle:ee.itemTitle},mode:V,selectable:Y,onClick:X,...z,inlineCollapsed:U,style:{...ee.root,...$,...i},className:B,prefixCls:M,direction:R,defaultMotions:O,expandIcon:J,ref:t,rootClassName:ae(h,L,n.rootClassName,W,G,H.root),_internalComponents:uN})))}),Ea=a.forwardRef((e,t)=>{const r=a.useRef(null),n=a.useContext(O0);return a.useImperativeHandle(t,()=>({menu:r.current,focus:o=>{var s;(s=r.current)==null||s.focus(o)}})),a.createElement(dN,{ref:r,...e,...n})});Ea.Item=k0;Ea.SubMenu=M0;Ea.Divider=D0;Ea.ItemGroup=vh;const pN=e=>{const{componentCls:t,menuCls:r,colorError:n,colorTextLightSolid:o}=e,s=`${r}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${r} ${s}`]:{[`&${s}-danger:not(${s}-disabled)`]:{color:n,"&:hover":{color:o,backgroundColor:n}}}}}},fN=e=>{const{componentCls:t,menuCls:r,zIndexPopup:n,dropdownArrowDistance:o,sizePopupArrow:s,antCls:i,iconCls:l,motionDurationMid:u,paddingBlock:d,fontSize:p,dropdownEdgeChildPadding:f,colorTextDisabled:m,fontSizeIcon:h,controlPaddingHorizontal:v,colorBgElevated:g}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:n,display:"block","&::before":{position:"absolute",insetBlock:e.calc(s).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${i}-btn`]:{[`& > ${l}-down, & > ${i}-btn-icon > ${l}-down`]:{fontSize:h}},[`${t}-wrap`]:{position:"relative",[`${i}-btn > ${l}-down`]:{fontSize:h},[`${l}-down::before`]:{transition:`transform ${u}`}},[`${t}-wrap-open`]:{[`${l}-down::before`]:{transform:"rotate(180deg)"}},"&-hidden, &-menu-hidden, &-menu-submenu-hidden":{display:"none"},[`&${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottomLeft,
&${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottomLeft,
&${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottom,
&${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottom,
&${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottomRight,
&${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:yx},[`&${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-topLeft,
&${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-topLeft,
&${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-top,
&${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-top,
&${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-topRight,
&${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-topRight`]:{animationName:_x},[`&${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottomLeft,
&${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottom,
&${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:bx},[`&${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-topLeft,
&${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-top,
&${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-topRight`]:{animationName:vx}}},Ix(e,g,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${r}`]:{position:"relative",margin:0},[`${r}-submenu-popup`]:{position:"absolute",zIndex:n,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:{...zr(e),[r]:{padding:f,listStyleType:"none",backgroundColor:g,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,...Tp(e),"&:empty":{padding:0,boxShadow:"none"},[`${r}-item-group-title`]:{padding:`${we(d)} ${we(v)}`,color:e.colorTextDescription,transition:`all ${u}`},[`${r}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${r}-item-icon`]:{minWidth:p,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${r}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${u}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${r}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${r}-item, ${r}-submenu-title`]:{display:"flex",margin:0,padding:`${we(d)} ${we(v)}`,color:e.colorText,fontWeight:"normal",fontSize:p,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${u}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Tp(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:m,cursor:"not-allowed","&:hover":{color:m,backgroundColor:g,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${we(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:h,fontStyle:"normal"}}},[`${r}-item-group-list`]:{margin:`0 ${we(e.marginXS)}`,padding:0,listStyle:"none"},[`${r}-submenu-title`]:{paddingInlineEnd:e.calc(v).add(e.fontSizeSM).equal()},[`${r}-submenu-vertical`]:{position:"relative"},[`${r}-submenu${r}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:m,backgroundColor:g,cursor:"not-allowed"}},[`${r}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[zs(e,"slide-up"),zs(e,"slide-down"),Hl(e,"move-up"),Hl(e,"move-down"),Jm(e,"zoom-big")]]},mN=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...Ax({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...$x(e)}),hN=tr("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:r,paddingXXS:n,componentCls:o}=e,s=er(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[fN(s),pN(s)]},mN,{resetStyle:!1}),nu=e=>{const{menu:t,arrow:r,prefixCls:n,children:o,trigger:s,disabled:i,dropdownRender:l,popupRender:u,getPopupContainer:d,overlayClassName:p,rootClassName:f,overlayStyle:m,open:h,onOpenChange:v,mouseEnterDelay:g=.15,mouseLeaveDelay:b=.1,autoAdjustOverflow:_=!0,placement:y="",transitionName:x,classNames:S,styles:w,destroyPopupOnHide:I,destroyOnHidden:T}=e,{getPrefixCls:R,direction:P,getPopupContainer:$,className:A,style:k,classNames:D,styles:z}=Yr("dropdown"),X={...e,mouseEnterDelay:g,mouseLeaveDelay:b,autoAdjustOverflow:_},[V,Y]=cn([D,S],[z,w],{props:X}),U={...k,...m,...Y.root},F=u||l;Nx();const H=a.useMemo(()=>{const Ye=R();return x!==void 0?x:y.includes("top")?`${Ye}-slide-down`:`${Ye}-slide-up`},[R,y,x]),ee=a.useMemo(()=>y?y.includes("Center")?y.slice(0,y.indexOf("Center")):y:P==="rtl"?"bottomRight":"bottomLeft",[y,P]),O=R("dropdown",n),M=ti(O),[G,L]=hN(O,M),[,W]=Uc(),B=a.Children.only(cA(o)?a.createElement("span",null,o):o),J=Sn(B,{className:ae(`${O}-trigger`,{[`${O}-rtl`]:P==="rtl"},B.props.className),disabled:B.props.disabled??i}),K=i?[]:s,re=!!(K!=null&&K.includes("contextMenu")),[se,Z]=Pr(!1,h),ne=Lr(Ye=>{v==null||v(Ye,{source:"trigger"}),Z(Ye)}),ie=ae(p,f,G,L,M,A,V.root,{[`${O}-rtl`]:P==="rtl"}),he=jx({arrowPointAtCenter:Mn(r)&&r.pointAtCenter,autoAdjustOverflow:_,offset:W.marginXXS,arrowWidth:r?W.sizePopupArrow:0,borderRadius:W.borderRadius}),me=Lr(()=>{t!=null&&t.selectable&&(t!=null&&t.multiple)||(v==null||v(!1,{source:"menu"}),Z(!1))}),Pe=()=>{const Ye=gr(V,["root"]),pe=gr(Y,["root"]);let be;return t!=null&&t.items&&(be=a.createElement(Ea,{...t,classNames:{...Ye,subMenu:{...Ye}},styles:{...pe,subMenu:{...pe}}})),F&&(be=F(be)),be=a.Children.only(typeof be=="string"?a.createElement("span",null,be):be),a.createElement(nN,{prefixCls:`${O}-menu`,rootClassName:ae(L,M),expandIcon:a.createElement("span",{className:`${O}-menu-submenu-arrow`},P==="rtl"?a.createElement(Zp,{className:`${O}-menu-submenu-arrow-icon`}):a.createElement(Ip,{className:`${O}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:me,validator:({mode:j})=>{}},be)},[Se,Ce]=qc("Dropdown",U.zIndex);let Ze=a.createElement(OO,{alignPoint:re,...gr(e,["rootClassName","onOpenChange"]),mouseEnterDelay:g,mouseLeaveDelay:b,visible:se,builtinPlacements:he,arrow:!!r,overlayClassName:ie,prefixCls:O,getPopupContainer:d||$,transitionName:H,trigger:K,overlay:Pe,placement:ee,onVisibleChange:ne,overlayStyle:{...U,zIndex:Se},autoDestroy:T??I},J);return Se&&(Ze=a.createElement(Ox.Provider,{value:Ce},Ze)),Ze},gN=Tx(nu,"align",void 0,"dropdown",e=>e),vN=e=>a.createElement(gN,{...e},a.createElement("span",null));nu._InternalPanelDoNotUseOrYouWillBeFired=vN;function ou(e){return er(e,{inputAffixPadding:e.paddingXXS})}const su=e=>{const{controlHeight:t,fontSize:r,lineHeight:n,lineWidth:o,controlHeightSM:s,controlHeightLG:i,fontSizeLG:l,lineHeightLG:u,paddingSM:d,controlPaddingHorizontalSM:p,controlPaddingHorizontal:f,colorFillAlter:m,colorPrimaryHover:h,colorPrimary:v,controlOutlineWidth:g,controlOutline:b,colorErrorOutline:_,colorWarningOutline:y,colorBgContainer:x,inputFontSize:S,inputFontSizeLG:w,inputFontSizeSM:I}=e,T=S||r,R=I||T,P=w||l,$=Math.round((t-T*n)/2*10)/10-o,A=Math.round((s-R*n)/2*10)/10-o,k=Math.ceil((i-P*u)/2*10)/10-o;return{paddingBlock:Math.max($,0),paddingBlockSM:Math.max(A,0),paddingBlockLG:Math.max(k,0),paddingInline:d-o,paddingInlineSM:p-o,paddingInlineLG:f-o,addonBg:m,activeBorderColor:v,hoverBorderColor:h,activeShadow:`0 0 0 ${g}px ${b}`,errorActiveShadow:`0 0 0 ${g}px ${_}`,warningActiveShadow:`0 0 0 ${g}px ${y}`,hoverBg:x,activeBg:x,inputFontSize:T,inputFontSizeLG:P,inputFontSizeSM:R}},bN=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),iu=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":{...bN(er(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),bh=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),qv=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...bh(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),_N=(e,t)=>({"&-outlined":{...bh(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...iu(e)},...qv(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...qv(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),Gv=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),yN=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...Gv(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...Gv(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...iu(e)}}}}),xN=(e,t)=>{const{componentCls:r}=e;return{"&-borderless":{background:"transparent",border:"none",paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${r}-sm, &${r}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${r}-lg, &${r}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&:focus, &:focus-within":{outline:"none"},[`&${r}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${r}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${r}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}},...t}}},L0=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(t==null?void 0:t.inputColor)??"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),Kv=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...L0(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),wN=(e,t)=>({"&-filled":{...L0(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...iu(e)},...Kv(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...Kv(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),Xv=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),EN=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...Xv(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...Xv(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),z0=(e,t)=>({background:e.colorBgContainer,borderWidth:`${we(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),Yv=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...z0(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),SN=(e,t)=>({"&-underlined":{...z0(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"},...Yv(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...Yv(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),CN=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),_h=e=>{const{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:o}=e;return{padding:`${we(t)} ${we(o)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},yh=e=>({padding:`${we(e.paddingBlockSM)} ${we(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),xh=(e,t={})=>({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${we(e.paddingBlock)} ${we(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...CN(e.colorTextPlaceholder),"&-lg":{..._h(e),...t.largeStyle},"&-sm":{...yh(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),PN=e=>{const{componentCls:t,antCls:r}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:{..._h(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...yh(e)},[`&-lg ${r}-select-single`]:{height:e.controlHeightLG},[`&-sm ${r}-select-single`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${we(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${we(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${we(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${we(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},[`${r}-cascader-picker`]:{margin:`-9px ${we(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${r}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:"block",...Rp(),[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${t}-affix-wrapper,
& > ${t}-number-affix-wrapper,
& > ${r}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${r}-select,
& > ${r}-select-auto-complete ${t},
& > ${r}-cascader-picker ${t},
& > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${r}-select-focused`]:{zIndex:1},[`& > ${r}-select > ${r}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${r}-select:first-child,
& > ${r}-select-auto-complete:first-child ${t},
& > ${r}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
& > ${r}-select:last-child,
& > ${r}-cascader-picker:last-child ${t},
& > ${r}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${r}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},RN=e=>{const{componentCls:t,controlHeightSM:r,lineWidth:n,calc:o}=e,i=o(r).sub(o(n).mul(2)).sub(16).div(2).equal();return{[t]:{...zr(e),...xh(e),..._N(e),...wN(e),...xN(e),...SN(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:r,paddingTop:i,paddingBottom:i}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}}}},TN=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...Ul(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${we(e.inputAffixPadding)}`}}}},IN=e=>{const{componentCls:t,inputAffixPadding:r,colorTextDescription:n,motionDurationSlow:o,colorIcon:s,colorIconHover:i,iconCls:l}=e,u=`${t}-affix-wrapper`,d=`${t}-affix-wrapper-disabled`;return{[u]:{...xh(e),display:"inline-flex","&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:n,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:r},"&-suffix":{marginInlineStart:r}},...TN(e),[`${l}${t}-password-icon`]:{color:s,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:i}}},[`${t}-underlined`]:{borderRadius:0},[d]:{[`${l}${t}-password-icon`]:{color:s,cursor:"not-allowed","&:hover":{color:s}}}}},$N=e=>{const{componentCls:t,borderRadiusLG:r,borderRadiusSM:n}=e;return{[`${t}-group`]:{...zr(e),...PN(e),"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:r,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:n}},...yN(e),...EN(e),[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},AN=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},jN=tr(["Input","Shared"],e=>{const t=er(e,ou(e));return[RN(t),IN(t)]},su,{resetFont:!1}),Kte=tr(["Input","Component"],e=>{const t=er(e,ou(e));return[$N(t),AN(t),Km(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},su,{resetFont:!1});function ON(e,t,r){var n=r||{},o=n.noTrailing,s=o===void 0?!1:o,i=n.noLeading,l=i===void 0?!1:i,u=n.debounceMode,d=u===void 0?void 0:u,p,f=!1,m=0;function h(){p&&clearTimeout(p)}function v(b){var _=b||{},y=_.upcomingOnly,x=y===void 0?!1:y;h(),f=!x}function g(){for(var b=arguments.length,_=new Array(b),y=0;y<b;y++)_[y]=arguments[y];var x=this,S=Date.now()-m;if(f)return;function w(){m=Date.now(),t.apply(x,_)}function I(){p=void 0}!l&&d&&!p&&w(),h(),d===void 0&&S>e?l?(m=Date.now(),s||(p=setTimeout(d?I:w,e))):w():s!==!0&&(p=setTimeout(d?I:w,d===void 0?e-S:e))}return g.cancel=v,g}function NN(e,t,r){var n={},o=n.atBegin,s=o===void 0?!1:o;return ON(e,t,{debounceMode:s!==!1})}const F0=a.createContext({});function Jv(e){return e==="auto"?"1 1 auto":ra(e)?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}const DN=a.forwardRef((e,t)=>{const{getPrefixCls:r,direction:n}=a.useContext(Ir),{gutter:o,wrap:s}=a.useContext(F0),{prefixCls:i,span:l,order:u,offset:d,push:p,pull:f,className:m,children:h,flex:v,style:g,...b}=e,_=r("col",i),y=r(),[x,S]=A1(_),[w]=br(y,"col"),I={};let T={};uA.forEach($=>{let A={};const k=e[$];ra(k)?A.span=k:Mn(k)&&(A=k||{}),delete b[$],T={...T,[`${_}-${$}-${A.span}`]:jn(A.span),[`${_}-${$}-order-${A.order}`]:A.order||A.order===0,[`${_}-${$}-offset-${A.offset}`]:A.offset||A.offset===0,[`${_}-${$}-push-${A.push}`]:A.push||A.push===0,[`${_}-${$}-pull-${A.pull}`]:A.pull||A.pull===0,[`${_}-rtl`]:n==="rtl"},A.flex&&(T[`${_}-${$}-flex`]=!0,I[w(`${$}-flex`)]=Jv(A.flex))});const R=ae(_,{[`${_}-${l}`]:l!==void 0,[`${_}-order-${u}`]:u,[`${_}-offset-${d}`]:d,[`${_}-push-${p}`]:p,[`${_}-pull-${f}`]:f},m,T,x,S),P={};if(o!=null&&o[0]){const $=ra(o[0])?`${o[0]/2}px`:`calc(${o[0]} / 2)`;P.paddingInline=$}return v&&(P.flex=Jv(v),s===!1&&!P.minWidth&&(P.minWidth=0)),a.createElement("div",{...b,style:{...P,...g,...I},className:R,ref:t},h)});function kN(e,t){const r=[void 0,void 0],n=Array.isArray(e)?e:[e,void 0],o=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0};return n.forEach((s,i)=>{if(Mn(s))for(let l=0;l<Ro.length;l++){const u=Ro[l];if(o[u]&&s[u]!==void 0){r[i]=s[u];break}}else r[i]=s}),r}const Zv=(e,t)=>{const[r,n]=a.useState(()=>iv(e)?e:""),o=()=>{if(iv(e)&&n(e),!!Mn(e))for(let s=0;s<Ro.length;s++){const i=Ro[s];if(!t||!t[i])continue;const l=e[i];if(l!==void 0){n(l);return}}};return a.useEffect(()=>{o()},[JSON.stringify(e),t]),r},MN=a.forwardRef((e,t)=>{const{prefixCls:r,justify:n,align:o,className:s,style:i,children:l,gutter:u=0,wrap:d,...p}=e,{getPrefixCls:f,direction:m}=a.useContext(Ir),h=dh(!0,null),v=Zv(o,h),g=Zv(n,h),b=f("row",r),[_,y]=I1(b),x=kN(u,h),S=ae(b,{[`${b}-no-wrap`]:d===!1,[`${b}-${g}`]:g,[`${b}-${v}`]:v,[`${b}-rtl`]:m==="rtl"},s,_,y),w={};if(x!=null&&x[0]){const P=ra(x[0])?`${x[0]/-2}px`:`calc(${x[0]} / -2)`;w.marginInline=P}const[I,T]=x;w.rowGap=T;const R=a.useMemo(()=>({gutter:[I,T],wrap:d}),[I,T,d]);return a.createElement(F0.Provider,{value:R},a.createElement("div",{...p,className:S,style:{...w,...i},ref:t},l))}),LN=e=>{const{componentCls:t,borderRadius:r,paddingSM:n,colorBorder:o,paddingXS:s,fontSizeLG:i,fontSizeSM:l,borderRadiusLG:u,borderRadiusSM:d,colorBgContainerDisabled:p,lineWidth:f,antCls:m}=e,[h,v]=br(m,"space");return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,whiteSpace:"nowrap",paddingInline:n,margin:0,borderWidth:f,borderStyle:"solid",borderRadius:r,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:i,borderRadius:u},"&-small":{paddingInline:s,borderRadius:d,fontSize:l},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[h("addon-border-color")]:o,[h("addon-background")]:p,[h("addon-border-color-outlined")]:o,[h("addon-background-filled")]:p,borderColor:v("addon-border-color"),background:v("addon-background"),"&-variant-outlined":{[h("addon-border-color")]:v("addon-border-color-outlined")},"&-variant-filled":{[h("addon-border-color")]:"transparent",[h("addon-background")]:v("addon-background-filled"),[`&${t}-disabled`]:{[h("addon-border-color")]:o,[h("addon-background")]:p}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{[h("addon-border-color-outlined")]:e.colorError,[h("addon-background-filled")]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[h("addon-border-color-outlined")]:e.colorWarning,[h("addon-background-filled")]:e.colorWarningBg,color:e.colorWarning}}]}},zN=tr(["Space","Addon"],e=>[LN(e),Km(e,{focus:!1})]),FN=N.forwardRef((e,t)=>{const{className:r,children:n,style:o,prefixCls:s,variant:i="outlined",disabled:l,status:u,...d}=e,{getPrefixCls:p,direction:f}=N.useContext(Ir),m=p("space-addon",s),[h,v]=zN(m),{compactItemClassnames:g,compactSize:b}=Wc(m,f),_=Ym(m,u),y=ae(m,h,g,v,`${m}-variant-${i}`,_,{[`${m}-${b}`]:b,[`${m}-disabled`]:l},r);return N.createElement("div",{ref:t,className:y,style:o,...d},n)});function VN(e){return!!(e.addonBefore||e.addonAfter)}function BN(e){return!!(e.prefix||e.suffix||e.allowClear)}function Qv(e,t,r){const n=t.cloneNode(!0),o=Object.create(e,{target:{value:n},currentTarget:{value:n}});return n.value=r,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(n.selectionStart=t.selectionStart,n.selectionEnd=t.selectionEnd),n.setSelectionRange=(...s)=>{t.setSelectionRange(...s)},o}function eb(e,t,r,n){if(!r)return;let o=t;if(t.type==="click"){o=Qv(t,e,""),r(o);return}if(e.type!=="file"&&n!==void 0){o=Qv(t,e,n),r(o);return}r(o)}function uf(){return uf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},uf.apply(this,arguments)}const HN=N.forwardRef((e,t)=>{var F,H,ee;const{inputElement:r,children:n,prefixCls:o,prefix:s,suffix:i,addonBefore:l,addonAfter:u,className:d,style:p,disabled:f,readOnly:m,focused:h,triggerFocus:v,allowClear:g,value:b,handleReset:_,hidden:y,classes:x,classNames:S,dataAttrs:w,styles:I,components:T,onClear:R}=e,P=n??r,$=(T==null?void 0:T.affixWrapper)||"span",A=(T==null?void 0:T.groupWrapper)||"span",k=(T==null?void 0:T.wrapper)||"span",D=(T==null?void 0:T.groupAddon)||"span",z=a.useRef(null),X=O=>{var M;(M=z.current)!=null&&M.contains(O.target)&&(v==null||v())},V=BN(e);let Y=a.cloneElement(P,{value:b,className:ae((F=P.props)==null?void 0:F.className,!V&&(S==null?void 0:S.variant))||null});const U=a.useRef(null);if(N.useImperativeHandle(t,()=>({nativeElement:U.current||z.current})),V){let O=null;if(g){const W=!f&&!m&&b,B=`${o}-clear-icon`,J=typeof g=="object"&&(g!=null&&g.clearIcon)?g.clearIcon:"вњ–";O=N.createElement("button",{type:"button",tabIndex:-1,onClick:K=>{_==null||_(K),R==null||R()},onMouseDown:K=>K.preventDefault(),className:ae(B,{[`${B}-hidden`]:!W,[`${B}-has-suffix`]:!!i})},J)}const M=`${o}-affix-wrapper`,G=ae(M,{[`${o}-disabled`]:f,[`${M}-disabled`]:f,[`${M}-focused`]:h,[`${M}-readonly`]:m,[`${M}-input-with-clear-btn`]:i&&g&&b},x==null?void 0:x.affixWrapper,S==null?void 0:S.affixWrapper,S==null?void 0:S.variant),L=(i||g)&&N.createElement("span",{className:ae(`${o}-suffix`,S==null?void 0:S.suffix),style:I==null?void 0:I.suffix},O,i);Y=N.createElement($,uf({className:G,style:I==null?void 0:I.affixWrapper,onClick:X},w==null?void 0:w.affixWrapper,{ref:z}),s&&N.createElement("span",{className:ae(`${o}-prefix`,S==null?void 0:S.prefix),style:I==null?void 0:I.prefix},s),Y,L)}if(VN(e)){const O=`${o}-group`,M=`${O}-addon`,G=`${O}-wrapper`,L=ae(`${o}-wrapper`,O,x==null?void 0:x.wrapper,S==null?void 0:S.wrapper),W=ae(G,{[`${G}-disabled`]:f},x==null?void 0:x.group,S==null?void 0:S.groupWrapper);Y=N.createElement(A,{className:W,ref:U},N.createElement(k,{className:L},l&&N.createElement(D,{className:M},l),Y,u&&N.createElement(D,{className:M},u)))}return N.cloneElement(Y,{className:ae((H=Y.props)==null?void 0:H.className,d)||null,style:{...(ee=Y.props)==null?void 0:ee.style,...p},hidden:y})});function UN(e,t){return a.useMemo(()=>{let r={};t&&(r.show=typeof t=="object"&&t.formatter?t.formatter:!!t),r={...r,...e};const{show:n,...o}=r;return{...o,show:!!n,showFormatter:typeof n=="function"?n:void 0,strategy:o.strategy||(s=>s.length)}},[e,t])}const V0=N.createContext({latestIndex:0}),WN=V0.Provider,qN=e=>{const{className:t,prefix:r,index:n,children:o,separator:s,style:i,classNames:l,styles:u}=e,{latestIndex:d}=a.useContext(V0);return jn(o)?a.createElement(a.Fragment,null,a.createElement("div",{className:t,style:i},o),n<d&&s&&a.createElement("span",{className:ae(`${r}-item-separator`,l==null?void 0:l.separator),style:u==null?void 0:u.separator},s)):null},GN=e=>{const{componentCls:t,antCls:r}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},KN=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},XN=tr("Space",e=>{const t=er(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[GN(t),KN(t)]},()=>({}),{resetStyle:!1}),YN=a.forwardRef((e,t)=>{const{getPrefixCls:r,direction:n,size:o,className:s,style:i,classNames:l,styles:u}=Yr("space"),{size:d=o??"small",align:p,className:f,rootClassName:m,children:h,direction:v,orientation:g,prefixCls:b,split:_,separator:y,style:x,vertical:S,wrap:w=!1,classNames:I,styles:T,...R}=e,[P,$]=Array.isArray(d)?d:[d,d],A=av($),k=av(P),D=lv($),z=lv(P),X=Fo(h,{keepEmpty:!0}),[V,Y]=dA(g,S,v),U=p===void 0&&!Y?"center":p,F=y??_,H=r("space",b),[ee,O]=XN(H),M={...e,size:d,orientation:V,align:U},[G,L]=cn([l,I],[u,T],{props:M}),W=ae(H,s,ee,`${H}-${V}`,{[`${H}-rtl`]:n==="rtl",[`${H}-align-${U}`]:U,[`${H}-gap-row-${$}`]:A,[`${H}-gap-col-${P}`]:k},f,m,O,G.root),B=ae(`${H}-item`,G.item),J=X.map((se,Z)=>{const ne=(se==null?void 0:se.key)||`${B}-${Z}`;return a.createElement(qN,{prefix:H,classNames:G,styles:L,className:B,key:ne,index:Z,separator:F,style:L.item},se)}),K=a.useMemo(()=>({latestIndex:X.reduce((Z,ne,ie)=>jn(ne)?ie:Z,0)}),[X]);if(X.length===0)return null;const re={};return w&&(re.flexWrap="wrap"),!k&&z&&(re.columnGap=P),!A&&D&&(re.rowGap=$),a.createElement("div",{ref:t,className:W,style:{...re,...L.root,...i,...x},...R},a.createElement(WN,{value:K},J))}),au=YN;au.Compact=pA;au.Addon=FN;const B0=e=>{const{getPopupContainer:t,getPrefixCls:r,direction:n}=a.useContext(Ir),{prefixCls:o,type:s="default",danger:i,disabled:l,loading:u,onClick:d,htmlType:p,children:f,className:m,menu:h,arrow:v,autoFocus:g,trigger:b,align:_,open:y,onOpenChange:x,placement:S,getPopupContainer:w,href:I,icon:T=a.createElement(N0,null),title:R,buttonsRender:P=re=>re,mouseEnterDelay:$,mouseLeaveDelay:A,overlayClassName:k,overlayStyle:D,destroyOnHidden:z,destroyPopupOnHide:X,dropdownRender:V,popupRender:Y,...U}=e,F=r("dropdown",o),H=`${F}-button`,O={menu:h,arrow:v,autoFocus:g,align:_,disabled:l,trigger:l?[]:b,onOpenChange:x,getPopupContainer:w||t,mouseEnterDelay:$,mouseLeaveDelay:A,classNames:{root:k},styles:{root:D},destroyOnHidden:z,popupRender:Y||V},{compactSize:M,compactItemClassnames:G}=Wc(F,n),L=ae(H,G,m);"destroyPopupOnHide"in e&&(O.destroyPopupOnHide=X),"open"in e&&(O.open=y),"placement"in e?O.placement=S:O.placement=n==="rtl"?"bottomLeft":"bottomRight";const W=a.createElement(Wl,{type:s,danger:i,disabled:l,loading:u,onClick:d,htmlType:p,href:I,title:R},f),B=a.createElement(Wl,{type:s,danger:i,icon:T}),[J,K]=P([W,B]);return a.createElement(au.Compact,{className:L,size:M,block:!0,...U},J,a.createElement(nu,{...O},K))};B0.__ANT_BUTTON=!0;const H0=nu;H0.Button=B0;const JN=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,ZN=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],gd={};let jr;function QN(e,t=!1){const r=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&gd[r])return gd[r];const n=window.getComputedStyle(e),o=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),s=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),i=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),u={sizingStyle:ZN.map(d=>`${d}:${n.getPropertyValue(d)}`).join(";"),paddingSize:s,borderSize:i,boxSizing:o};return t&&r&&(gd[r]=u),u}function eD(e,t=!1,r=null,n=null){jr||(jr=document.createElement("textarea"),jr.setAttribute("tab-index","-1"),jr.setAttribute("aria-hidden","true"),jr.setAttribute("name","hiddenTextarea"),document.body.appendChild(jr)),e.getAttribute("wrap")?jr.setAttribute("wrap",e.getAttribute("wrap")):jr.removeAttribute("wrap");const{paddingSize:o,borderSize:s,boxSizing:i,sizingStyle:l}=QN(e,t);jr.setAttribute("style",`${l};${JN}`),jr.value=e.value||e.placeholder||"";let u,d,p,f=jr.scrollHeight;if(i==="border-box"?f+=s:i==="content-box"&&(f-=o),r!==null||n!==null){jr.value=" ";const h=jr.scrollHeight-o;r!==null&&(u=h*r,i==="border-box"&&(u=u+o+s),f=Math.max(u,f)),n!==null&&(d=h*n,i==="border-box"&&(d=d+o+s),p=f>d?"":"hidden",f=Math.min(d,f))}const m={height:f,overflowY:p,resize:"none"};return u&&(m.minHeight=u),d&&(m.maxHeight=d),m}function df(){return df=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},df.apply(this,arguments)}const vd=0,bd=1,_d=2,tD=a.forwardRef((e,t)=>{const{prefixCls:r,defaultValue:n,value:o,autoSize:s,onResize:i,className:l,style:u,disabled:d,onChange:p,onInternalAutoSize:f,...m}=e,[h,v]=Pr(n,o),g=h??"",b=X=>{v(X.target.value),p==null||p(X)},_=a.useRef();a.useImperativeHandle(t,()=>({textArea:_.current}));const[y,x]=a.useMemo(()=>s&&typeof s=="object"?[s.minRows,s.maxRows]:[],[s]),S=!!s,[w,I]=a.useState(_d),[T,R]=a.useState(),P=()=>{I(vd)};Qt(()=>{S&&P()},[o,y,x,S]),Qt(()=>{if(w===vd)I(bd);else if(w===bd){const X=eD(_.current,!1,y,x);I(_d),R(X)}},[w]);const $=a.useRef(),A=()=>{Ut.cancel($.current)},k=X=>{w===_d&&(i==null||i(X),s&&(A(),$.current=Ut(()=>{P()})))};a.useEffect(()=>A,[]);const z={...u,...S?T:null};return(w===vd||w===bd)&&(z.overflowY="hidden",z.overflowX="hidden"),a.createElement(ei,{onResize:k,disabled:!(s||i)},a.createElement("textarea",df({},m,{ref:_,style:z,className:ae(r,l,{[`${r}-disabled`]:d}),disabled:d,value:g,onChange:b})))});function pf(){return pf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pf.apply(this,arguments)}const rD=N.forwardRef(({defaultValue:e,value:t,onFocus:r,onBlur:n,onChange:o,allowClear:s,maxLength:i,onCompositionStart:l,onCompositionEnd:u,suffix:d,prefixCls:p="rc-textarea",showCount:f,count:m,className:h,style:v,disabled:g,hidden:b,classNames:_,styles:y,onResize:x,onClear:S,onPressEnter:w,readOnly:I,autoSize:T,onKeyDown:R,...P},$)=>{const[A,k]=Pr(e,t),D=A==null?"":String(A),[z,X]=N.useState(!1),V=N.useRef(!1),[Y,U]=N.useState(null),F=a.useRef(null),H=a.useRef(null),ee=()=>{var pe;return(pe=H.current)==null?void 0:pe.textArea},O=()=>{ee().focus()};a.useImperativeHandle($,()=>{var pe;return{resizableTextArea:H.current,focus:O,blur:()=>{ee().blur()},nativeElement:((pe=F.current)==null?void 0:pe.nativeElement)||ee()}}),a.useEffect(()=>{X(pe=>!g&&pe)},[g]);const[M,G]=N.useState(null);N.useEffect(()=>{M&&ee().setSelectionRange(...M)},[M]);const L=UN(m,f),W=L.max??i,B=Number(W)>0,J=L.strategy(D),K=!!W&&J>W,re=(pe,be)=>{let j=be;!V.current&&L.exceedFormatter&&L.max&&L.strategy(be)>L.max&&(j=L.exceedFormatter(be,{max:L.max}),be!==j&&G([ee().selectionStart||0,ee().selectionEnd||0])),k(j),eb(pe.currentTarget,pe,o,j)},se=pe=>{V.current=!0,l==null||l(pe)},Z=pe=>{V.current=!1,re(pe,pe.currentTarget.value),u==null||u(pe)},ne=pe=>{re(pe,pe.target.value)},ie=pe=>{pe.key==="Enter"&&w&&!pe.nativeEvent.isComposing&&w(pe),R==null||R(pe)},he=pe=>{X(!0),r==null||r(pe)},me=pe=>{X(!1),n==null||n(pe)},Pe=pe=>{k(""),O(),eb(ee(),pe,o)};let Se=d,Ce;L.show&&(L.showFormatter?Ce=L.showFormatter({value:D,count:J,maxLength:W}):Ce=`${J}${B?` / ${W}`:""}`,Se=N.createElement(N.Fragment,null,Se,N.createElement("span",{className:ae(`${p}-data-count`,_==null?void 0:_.count),style:y==null?void 0:y.count},Ce)));const Ze=pe=>{var be;x==null||x(pe),(be=ee())!=null&&be.style.height&&U(!0)},Ye=!T&&!f&&!s;return N.createElement(HN,{ref:F,value:D,allowClear:s,handleReset:Pe,suffix:Se,prefixCls:p,classNames:{..._,affixWrapper:ae(_==null?void 0:_.affixWrapper,{[`${p}-show-count`]:f,[`${p}-textarea-allow-clear`]:s})},disabled:g,focused:z,className:ae(h,K&&`${p}-out-of-range`),style:{...v,...Y&&!Ye?{height:"auto"}:{}},dataAttrs:{affixWrapper:{"data-count":typeof Ce=="string"?Ce:void 0}},hidden:b,readOnly:I,onClear:S},N.createElement(tD,pf({},P,{autoSize:T,maxLength:i,onKeyDown:ie,onChange:ne,onFocus:he,onBlur:me,onCompositionStart:se,onCompositionEnd:Z,className:ae(_==null?void 0:_.textarea),style:{resize:v==null?void 0:v.resize,...y==null?void 0:y.textarea},disabled:g,prefixCls:p,onResize:Ze,ref:H,readOnly:I})))}),nD=e=>{const{componentCls:t,paddingLG:r}=e,n=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[n]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
&-allow-clear > ${t},
&-affix-wrapper${n}-has-feedback ${t}
`]:{paddingInlineEnd:r},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${n}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},oD=tr(["Input","TextArea"],e=>{const t=er(e,ou(e));return nD(t)},su,{resetFont:!1}),sD=a.forwardRef((e,t)=>{var he;const{prefixCls:r,bordered:n=!0,size:o,disabled:s,status:i,allowClear:l,classNames:u,rootClassName:d,className:p,style:f,styles:m,variant:h,showCount:v,onMouseDown:g,onResize:b,..._}=e,{getPrefixCls:y,direction:x,allowClear:S,autoComplete:w,className:I,style:T,classNames:R,styles:P}=Yr("textArea"),$=a.useContext(Cx),A=s??$,{status:k,hasFeedback:D,feedbackIcon:z}=a.useContext(Ex),X=Rx(k,i),[V,Y]=cn([R,u],[P,m],{props:e}),U=a.useRef(null);a.useImperativeHandle(t,()=>{var me,Pe;return{resizableTextArea:(me=U.current)==null?void 0:me.resizableTextArea,focus:Se=>{var Ce,Ze;b1((Ze=(Ce=U.current)==null?void 0:Ce.resizableTextArea)==null?void 0:Ze.textArea,Se)},blur:()=>{var Se;return(Se=U.current)==null?void 0:Se.blur()},nativeElement:((Pe=U.current)==null?void 0:Pe.nativeElement)||null}});const F=y("input",r),H=ti(F),[ee,O]=jN(F,d);oD(F,H);const{compactSize:M,compactItemClassnames:G}=Wc(F,x),L=ba(me=>o??M??me),[W,B]=f0("textArea",h,n),J=fA(l??S),[K,re]=a.useState(!1),[se,Z]=a.useState(!1),ne=me=>{re(!0),g==null||g(me);const Pe=()=>{re(!1),document.removeEventListener("mouseup",Pe)};document.addEventListener("mouseup",Pe)},ie=me=>{var Pe,Se;if(b==null||b(me),K&&typeof getComputedStyle=="function"){const Ce=(Se=(Pe=U.current)==null?void 0:Pe.nativeElement)==null?void 0:Se.querySelector("textarea");Ce&&getComputedStyle(Ce).resize==="both"&&Z(!0)}};return a.createElement(rD,{autoComplete:w,..._,style:{...Y.root,...T,...f},styles:Y,disabled:A,allowClear:J,className:ae(O,H,p,d,G,I,V.root,{[`${F}-textarea-affix-wrapper-resize-dirty`]:se}),classNames:{...V,textarea:ae({[`${F}-sm`]:L==="small",[`${F}-lg`]:L==="large"},ee,V.textarea,K&&`${F}-mouse-active`),variant:ae({[`${F}-${W}`]:B},Ym(F,X)),affixWrapper:ae(`${F}-textarea-affix-wrapper`,{[`${F}-affix-wrapper-rtl`]:x==="rtl",[`${F}-affix-wrapper-sm`]:L==="small",[`${F}-affix-wrapper-lg`]:L==="large",[`${F}-textarea-show-count`]:v||((he=e.count)==null?void 0:he.show)},ee)},prefixCls:F,suffix:D&&a.createElement("span",{className:`${F}-textarea-suffix`},z),showCount:v,ref:U,onResize:ie,onMouseDown:ne})});var iD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};function ff(){return ff=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ff.apply(this,arguments)}const aD=(e,t)=>a.createElement(En,ff({},e,{ref:t,icon:iD})),tb=a.forwardRef(aD);var lD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};function mf(){return mf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mf.apply(this,arguments)}const cD=(e,t)=>a.createElement(En,mf({},e,{ref:t,icon:lD})),rb=a.forwardRef(cD),uD={items_per_page:"жќЎ/йЎµ",jump_to:"и·іи‡і",jump_to_confirm:"зЎ®е®љ",page:"йЎµ",prev_page:"дёЉдёЂйЎµ",next_page:"дё‹дёЂйЎµ",prev_5:"еђ‘е‰Ќ 5 йЎµ",next_5:"еђ‘еђЋ 5 йЎµ",prev_3:"еђ‘е‰Ќ 3 йЎµ",next_3:"еђ‘еђЋ 3 йЎµ",page_size:"йЎµз Ѓ"},dD=[10,20,50,100],pD=e=>{const{pageSizeOptions:t=dD,locale:r,changeSize:n,pageSize:o,goButton:s,quickGo:i,rootPrefixCls:l,disabled:u,buildOptionText:d,showSizeChanger:p,sizeChangerRender:f}=e,[m,h]=N.useState(""),v=N.useMemo(()=>!m||Number.isNaN(m)?void 0:Number(m),[m]),g=typeof d=="function"?d:R=>`${R} ${r.items_per_page}`,b=R=>{const P=R.target.value;/^\d*$/.test(P)&&h(P)},_=R=>{s||m===""||(h(""),!(R.relatedTarget&&(R.relatedTarget.className.includes(`${l}-item-link`)||R.relatedTarget.className.includes(`${l}-item`)))&&(i==null||i(v)))},y=R=>{m!==""&&(R.keyCode===Xe.ENTER||R.type==="click")&&(h(""),i==null||i(v))},x=()=>t.some(R=>R.toString()===o.toString())?t:t.concat([o]).sort((R,P)=>{const $=Number.isNaN(Number(R))?0:Number(R),A=Number.isNaN(Number(P))?0:Number(P);return $-A}),S=`${l}-options`;if(!p&&!i)return null;let w=null,I=null,T=null;return p&&f&&(w=f({disabled:u,size:o,onSizeChange:R=>{n==null||n(Number(R))},"aria-label":r.page_size,className:`${S}-size-changer`,options:x().map(R=>({label:g(R),value:R}))})),i&&(s&&(T=typeof s=="boolean"?N.createElement("button",{type:"button",onClick:y,onKeyUp:y,disabled:u,className:`${S}-quick-jumper-button`},r.jump_to_confirm):N.createElement("span",{onClick:y,onKeyUp:y},s)),I=N.createElement("div",{className:`${S}-quick-jumper`},r.jump_to,N.createElement("input",{disabled:u,type:"text",value:m,onChange:b,onKeyUp:y,onBlur:_,"aria-label":r.page}),r.page,T)),N.createElement("li",{className:S},w,I)},vi=e=>{const{rootPrefixCls:t,page:r,active:n,className:o,style:s,showTitle:i,onClick:l,onKeyPress:u,itemRender:d}=e,p=`${t}-item`,f=ae(p,`${p}-${r}`,{[`${p}-active`]:n,[`${p}-disabled`]:!r},o),m=()=>{l(r)},h=g=>{u(g,l,r)},v=d(r,"page",N.createElement("a",{rel:"nofollow"},r));return v?N.createElement("li",{title:i?String(r):null,className:f,style:s,onClick:m,onKeyDown:h,tabIndex:0},v):null};function Kn(){return Kn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kn.apply(this,arguments)}const fD=(e,t,r)=>r;function nb(){}function ob(e){const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function ho(e,t,r){const n=typeof e>"u"?t:e;return Math.floor((r-1)/n)+1}const mD=e=>{const{prefixCls:t="rc-pagination",selectPrefixCls:r="rc-select",className:n,classNames:o,styles:s,current:i,defaultCurrent:l=1,total:u=0,pageSize:d,defaultPageSize:p=10,onChange:f=nb,hideOnSinglePage:m,align:h,showPrevNextJumpers:v=!0,showQuickJumper:g,showLessItems:b,showTitle:_=!0,onShowSizeChange:y=nb,locale:x=uD,style:S,totalBoundaryShowSizeChanger:w=50,disabled:I,simple:T,showTotal:R,showSizeChanger:P=u>w,sizeChangerRender:$,pageSizeOptions:A,itemRender:k=fD,jumpPrevIcon:D,jumpNextIcon:z,prevIcon:X,nextIcon:V}=e,Y=N.useRef(null),[U,F]=Pr(p,d),[H,ee]=Pr(l,i),O=Math.max(1,Math.min(H,ho(void 0,U,u))),[M,G]=N.useState(O);a.useEffect(()=>{G(O)},[O]);const L=Math.max(1,O-(b?3:5)),W=Math.min(ho(void 0,U,u),O+(b?3:5));function B(_e,Qe){let ge=_e||N.createElement("button",{type:"button","aria-label":Qe,className:`${t}-item-link`});return typeof _e=="function"&&(ge=N.createElement(_e,e)),ge}function J(_e){const Qe=_e.target.value,ge=ho(void 0,U,u);let Te;return Qe===""?Te=Qe:Number.isNaN(Number(Qe))?Te=M:Qe>=ge?Te=ge:Te=Number(Qe),Te}function K(_e){return ob(_e)&&_e!==O&&ob(u)&&u>0}const re=u>U?g:!1;function se(_e){(_e.keyCode===Xe.UP||_e.keyCode===Xe.DOWN)&&_e.preventDefault()}function Z(_e){const Qe=J(_e);switch(Qe!==M&&G(Qe),_e.keyCode){case Xe.ENTER:he(Qe);break;case Xe.UP:he(Qe-1);break;case Xe.DOWN:he(Qe+1);break}}function ne(_e){he(J(_e))}function ie(_e){const Qe=ho(_e,U,u),ge=O>Qe&&Qe!==0?Qe:O;F(_e),G(ge),y==null||y(O,_e),ee(ge),f==null||f(ge,_e)}function he(_e){if(K(_e)&&!I){const Qe=ho(void 0,U,u);let ge=_e;return _e>Qe?ge=Qe:_e<1&&(ge=1),ge!==M&&G(ge),ee(ge),f==null||f(ge,U),ge}return O}const me=O>1,Pe=O<ho(void 0,U,u);function Se(){me&&he(O-1)}function Ce(){Pe&&he(O+1)}function Ze(){he(L)}function Ye(){he(W)}function pe(_e,Qe,...ge){(_e.key==="Enter"||_e.charCode===Xe.ENTER||_e.keyCode===Xe.ENTER)&&Qe(...ge)}function be(_e){pe(_e,Se)}function j(_e){pe(_e,Ce)}function q(_e){pe(_e,Ze)}function Q(_e){pe(_e,Ye)}function le(_e){const Qe=k(_e,"prev",B(X,"prev page"));return N.isValidElement(Qe)?N.cloneElement(Qe,{disabled:!me}):Qe}function de(_e){const Qe=k(_e,"next",B(V,"next page"));return N.isValidElement(Qe)?N.cloneElement(Qe,{disabled:!Pe}):Qe}function ce(_e){(_e.type==="click"||_e.keyCode===Xe.ENTER)&&he(M)}let fe=null;const ue=ta(e,{aria:!0,data:!0}),ye=R&&N.createElement("li",{className:`${t}-total-text`},R(u,[u===0?0:(O-1)*U+1,O*U>u?u:O*U]));let Be=null;const Ae=ho(void 0,U,u);if(m&&u<=U)return null;const Ee=[],lt={rootPrefixCls:t,onClick:he,onKeyPress:pe,showTitle:_,itemRender:k,page:-1,className:o==null?void 0:o.item,style:s==null?void 0:s.item},ht=O-1>0?O-1:0,dt=O+1<Ae?O+1:Ae,mt=g&&g.goButton,ft=typeof T=="object"?T.readOnly:!T;let vt=mt,ze=null;T&&(mt&&(typeof mt=="boolean"?vt=N.createElement("button",{type:"button",onClick:ce,onKeyUp:ce},x.jump_to_confirm):vt=N.createElement("span",{onClick:ce,onKeyUp:ce},mt),vt=N.createElement("li",{title:_?`${x.jump_to}${O}/${Ae}`:null,className:`${t}-simple-pager`},vt)),ze=N.createElement("li",{title:_?`${O}/${Ae}`:null,className:ae(`${t}-simple-pager`,o==null?void 0:o.item),style:s==null?void 0:s.item},ft?M:N.createElement("input",{type:"text","aria-label":x.jump_to,value:M,disabled:I,onKeyDown:se,onKeyUp:Z,onChange:Z,onBlur:ne,size:3}),N.createElement("span",{className:`${t}-slash`},"/"),Ae));const We=b?1:2;if(Ae<=3+We*2){Ae||Ee.push(N.createElement(vi,Kn({},lt,{key:"noPager",page:1,className:`${t}-item-disabled`})));for(let _e=1;_e<=Ae;_e+=1)Ee.push(N.createElement(vi,Kn({},lt,{key:_e,page:_e,active:O===_e})))}else{const _e=b?x.prev_3:x.prev_5,Qe=b?x.next_3:x.next_5,ge=k(L,"jump-prev",B(D,"prev page")),Te=k(W,"jump-next",B(z,"next page"));v&&(fe=ge?N.createElement("li",{title:_?_e:null,key:"prev",onClick:Ze,tabIndex:0,onKeyDown:q,className:ae(`${t}-jump-prev`,{[`${t}-jump-prev-custom-icon`]:!!D})},ge):null,Be=Te?N.createElement("li",{title:_?Qe:null,key:"next",onClick:Ye,tabIndex:0,onKeyDown:Q,className:ae(`${t}-jump-next`,{[`${t}-jump-next-custom-icon`]:!!z})},Te):null);let et=Math.max(1,O-We),xe=Math.min(O+We,Ae);O-1<=We&&(xe=1+We*2),Ae-O<=We&&(et=Ae-We*2);for(let $e=et;$e<=xe;$e+=1)Ee.push(N.createElement(vi,Kn({},lt,{key:$e,page:$e,active:O===$e})));if(O-1>=We*2&&O!==3&&(Ee[0]=N.cloneElement(Ee[0],{className:ae(`${t}-item-after-jump-prev`,Ee[0].props.className)}),Ee.unshift(fe)),Ae-O>=We*2&&O!==Ae-2){const $e=Ee[Ee.length-1];Ee[Ee.length-1]=N.cloneElement($e,{className:ae(`${t}-item-before-jump-next`,$e.props.className)}),Ee.push(Be)}et!==1&&Ee.unshift(N.createElement(vi,Kn({},lt,{key:1,page:1}))),xe!==Ae&&Ee.push(N.createElement(vi,Kn({},lt,{key:Ae,page:Ae})))}let ke=le(ht);if(ke){const _e=!me||!Ae;ke=N.createElement("li",{title:_?x.prev_page:null,onClick:Se,tabIndex:_e?null:0,onKeyDown:be,className:ae(`${t}-prev`,o==null?void 0:o.item,{[`${t}-disabled`]:_e}),style:s==null?void 0:s.item,"aria-disabled":_e},ke)}let nt=de(dt);if(nt){let _e,Qe;T?(_e=!Pe,Qe=me?0:null):(_e=!Pe||!Ae,Qe=_e?null:0),nt=N.createElement("li",{title:_?x.next_page:null,onClick:Ce,tabIndex:Qe,onKeyDown:j,className:ae(`${t}-next`,o==null?void 0:o.item,{[`${t}-disabled`]:_e}),style:s==null?void 0:s.item,"aria-disabled":_e},nt)}const ut=ae(t,n,{[`${t}-start`]:h==="start",[`${t}-center`]:h==="center",[`${t}-end`]:h==="end",[`${t}-simple`]:T,[`${t}-disabled`]:I});return N.createElement("ul",Kn({className:ut,style:S,ref:Y},ue),ye,ke,T?ze:Ee,nt,N.createElement(pD,{locale:x,rootPrefixCls:t,disabled:I,selectPrefixCls:r,changeSize:ie,pageSize:U,pageSizeOptions:A,quickGo:re?he:null,goButton:vt,showSizeChanger:P,sizeChangerRender:$}))},hD=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},gD=e=>{const{componentCls:t}=e;return{[`&${t}-small ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-quick-jumper":{input:{...yh(e),width:e.paginationMiniQuickJumperInputWidth}}}}},vD=e=>{const{componentCls:t}=e;return{[`&${t}-large ${t}-options`]:{"&-quick-jumper":{input:{..._h(e)}}}}},bD=e=>{const{componentCls:t,antCls:r}=e,[,n]=br(r,"pagination");return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:n("item-size-actual"),lineHeight:n("item-size-actual"),verticalAlign:"top",[`${t}-item-link`]:{height:n("item-size-actual"),backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:n("item-size-actual"),lineHeight:n("item-size-actual")}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:n("item-size-actual"),marginInlineEnd:n("item-spacing-actual"),input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${we(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${we(e.inputOutlineOffset)} 0 ${we(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},[`&${t}-small`]:{[`${t}-simple-pager`]:{input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},_D=e=>{const{componentCls:t,antCls:r}=e,[,n]=br(r,"pagination");return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[`
${t}-prev,
${t}-jump-prev,
${t}-jump-next
`]:{marginInlineEnd:n("item-spacing-actual")},[`
${t}-prev,
${t}-next,
${t}-jump-prev,
${t}-jump-next
`]:{display:"inline-block",minWidth:n("item-size-actual"),height:n("item-size-actual"),color:e.colorText,fontFamily:e.fontFamily,lineHeight:n("item-size-actual"),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${we(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer":{width:"auto"},"&-quick-jumper":{display:"inline-block",height:n("item-size-actual"),marginInlineStart:e.marginXS,lineHeight:n("item-size-actual"),verticalAlign:"baseline",input:{...xh(e),...bh(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow}),"&[disabled]":{...iu(e)},width:e.quickJumperInputWidth,height:n("item-size-actual"),boxSizing:"border-box",margin:0,marginInlineStart:n("item-spacing-actual"),marginInlineEnd:n("item-spacing-actual")}}}}},yD=e=>{const{componentCls:t,antCls:r}=e,[,n]=br(r,"pagination");return{[`${t}-item`]:{display:"inline-block",minWidth:n("item-size-actual"),height:n("item-size-actual"),marginInlineEnd:n("item-spacing-actual"),fontFamily:e.fontFamily,lineHeight:we(e.calc(n("item-size-actual")).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${we(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${we(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},xD=e=>{const{componentCls:t,antCls:r}=e,[n,o]=br(r,"pagination");return{[t]:{[n("item-size-actual")]:we(e.itemSize),[n("item-spacing-actual")]:we(e.marginXS),"&-small":{[n("item-size-actual")]:we(e.itemSizeSM),[n("item-spacing-actual")]:we(e.marginXXS)},"&-large":{[n("item-size-actual")]:we(e.itemSizeLG),[n("item-spacing-actual")]:we(e.marginSM)},...zr(e),display:"flex",alignItems:"center","&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:o("item-size-actual"),marginInlineEnd:o("item-spacing-actual"),lineHeight:we(e.calc(o("item-size-actual")).sub(2).equal()),verticalAlign:"middle"},...yD(e),..._D(e),...bD(e),...gD(e),...vD(e),...hD(e),[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},wD=e=>{const{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:{...Tp(e)},[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0},...Ul(e)}},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:Ul(e)}}}},U0=e=>({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemSizeLG:e.controlHeightLG,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0,...su(e)}),W0=e=>er(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},ou(e)),ED=tr("Pagination",e=>{const t=W0(e);return[xD(t),wD(t)]},U0),SD=e=>{const{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},CD=mA(["Pagination","bordered"],e=>{const t=W0(e);return SD(t)},U0);function sb(e){return a.useMemo(()=>typeof e=="boolean"?[e,{}]:Mn(e)?[!0,e]:[void 0,void 0],[e])}const PD=e=>{const{align:t,prefixCls:r,selectPrefixCls:n,className:o,rootClassName:s,style:i,size:l,locale:u,responsive:d,showSizeChanger:p,selectComponentClass:f,pageSizeOptions:m,styles:h,classNames:v,...g}=e,{xs:b}=dh(d),[,_]=Uc(),{getPrefixCls:y,direction:x,showSizeChanger:S,className:w,style:I,classNames:T,styles:R,totalBoundaryShowSizeChanger:P}=Yr("pagination"),$=y("pagination",r),[A,k]=ED($),D=ba(l),z=D==="small"||!!(b&&!D&&d),X={...e,size:D},[V,Y]=cn([T,v],[R,h],{props:X}),[U]=zx("Pagination",hA),F={...U,...u},[H,ee]=sb(p),[O,M]=sb(S),G=H??O,L=ee??M,W=f||ri,B=a.useMemo(()=>m?m.map(Number):void 0,[m]),J=ne=>{var be;const{disabled:ie,size:he,onSizeChange:me,"aria-label":Pe,className:Se,options:Ce}=ne,{className:Ze,onChange:Ye}=L||{},pe=(be=Ce.find(j=>String(j.value)===String(he)))==null?void 0:be.value;return a.createElement(W,{disabled:ie,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:j=>j.parentNode,"aria-label":Pe,options:Ce,...L,value:pe,onChange:(j,q)=>{me==null||me(j),Ye==null||Ye(j,q)},size:D,className:ae(Se,Ze)})},K=a.useMemo(()=>{const ne=a.createElement("span",{className:`${$}-item-ellipsis`},"•••"),ie=a.createElement("button",{className:`${$}-item-link`,type:"button",tabIndex:-1},x==="rtl"?a.createElement(Ip,null):a.createElement(Zp,null)),he=a.createElement("button",{className:`${$}-item-link`,type:"button",tabIndex:-1},x==="rtl"?a.createElement(Zp,null):a.createElement(Ip,null)),me=a.createElement("a",{className:`${$}-item-link`},a.createElement("div",{className:`${$}-item-container`},x==="rtl"?a.createElement(rb,{className:`${$}-item-link-icon`}):a.createElement(tb,{className:`${$}-item-link-icon`}),ne)),Pe=a.createElement("a",{className:`${$}-item-link`},a.createElement("div",{className:`${$}-item-container`},x==="rtl"?a.createElement(tb,{className:`${$}-item-link-icon`}):a.createElement(rb,{className:`${$}-item-link-icon`}),ne));return{prevIcon:ie,nextIcon:he,jumpPrevIcon:me,jumpNextIcon:Pe}},[x,$]),re=y("select",n),se=ae({[`${$}-${t}`]:!!t,[`${$}-${D}`]:D,[`${$}-mini`]:z,[`${$}-rtl`]:x==="rtl",[`${$}-bordered`]:_.wireframe},w,o,s,V.root,A,k),Z={...Y.root,...I,...i};return a.createElement(a.Fragment,null,_.wireframe&&a.createElement(CD,{prefixCls:$}),a.createElement(mD,{...K,...g,styles:Y,classNames:V,style:Z,prefixCls:$,selectPrefixCls:re,className:se,locale:F,pageSizeOptions:B,showSizeChanger:G,totalBoundaryShowSizeChanger:g.totalBoundaryShowSizeChanger??P,sizeChangerRender:J}))},tc=100,q0=tc/5,G0=tc/2-q0/2,yd=G0*2*Math.PI,ib=50,ab=e=>{const{dotClassName:t,style:r,hasCircleCls:n}=e;return a.createElement("circle",{className:ae(`${t}-circle`,{[`${t}-circle-bg`]:n}),r:G0,cx:ib,cy:ib,strokeWidth:q0,style:r})},RD=({percent:e,prefixCls:t})=>{const r=`${t}-dot`,n=`${r}-holder`,o=`${n}-hidden`,[s,i]=a.useState(!1);Qt(()=>{e!==0&&i(!0)},[e!==0]);const l=Math.max(Math.min(e,100),0);if(!s)return null;const u={strokeDashoffset:`${yd/4}`,strokeDasharray:`${yd*l/100} ${yd*(100-l)/100}`};return a.createElement("span",{className:ae(n,`${r}-progress`,{[o]:l<=0})},a.createElement("svg",{viewBox:`0 0 ${tc} ${tc}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":l},a.createElement(ab,{dotClassName:r,hasCircleCls:!0}),a.createElement(ab,{dotClassName:r,style:u})))};function TD(e){const{prefixCls:t,percent:r=0,className:n,style:o}=e,s=`${t}-dot`,i=`${s}-holder`,l=`${i}-hidden`;return a.createElement(a.Fragment,null,a.createElement("span",{className:ae(i,n,r>0&&l),style:o},a.createElement("span",{className:ae(s,`${t}-dot-spin`)},[1,2,3,4].map(u=>a.createElement("i",{className:`${t}-dot-item`,key:u})))),a.createElement(RD,{prefixCls:t,percent:r}))}function ID(e){const{prefixCls:t,indicator:r,percent:n,className:o,style:s}=e,i=`${t}-dot`;return r&&a.isValidElement(r)?Sn(r,l=>({className:ae(l.className,i,o),style:{...l.style,...s},percent:n})):a.createElement(TD,{prefixCls:t,percent:n,className:o,style:s})}const $D=new ro("antSpinMove",{to:{opacity:1}}),AD=new ro("antRotate",{to:{transform:"rotate(405deg)"}}),jD=e=>{const{componentCls:t}=e,r=`${t}-section`;return{[t]:{...zr(e),position:"relative","&-rtl":{direction:"rtl"},[`&${r}, ${r}`]:{display:"flex",alignItems:"center",flexDirection:"column",gap:e.paddingSM,color:e.colorPrimary},[`&${r}`]:{display:"inline-flex"},[r]:{position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)",zIndex:1},[`${t}-description`]:{fontSize:e.fontSize,lineHeight:1},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},"&-spinning":{[`${t}-description`]:{textShadow:`0 0px 5px ${e.colorBgContainer}`},[`${t}-container`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-fullscreen":{position:"fixed",inset:0,backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,opacity:0,pointerEvents:"none",transition:`all ${e.motionDurationMid}`,[`&${t}-spinning`]:{opacity:1,pointerEvents:"auto"},[r]:{color:e.colorWhite,[`${t}-description`]:{color:e.colorTextLightSolid}}}}}},OD=e=>{const{componentCls:t,antCls:r,motionDurationSlow:n}=e,[o,s]=br(r,"spin");return{[t]:{[o("dot-holder-size")]:e.dotSize,[o("dot-item-size")]:`calc((${s("dot-holder-size")} - ${e.marginXXS} / 2) / 2)`,[`${t}-dot`]:{"&-holder":{width:"1em",height:"1em",fontSize:s("dot-holder-size"),display:"inline-block",transition:["transform","opacity"].map(i=>`${i} ${n} ease`).join(", "),transformOrigin:"50% 50%",lineHeight:1,"&-hidden":{transform:"scale(0.3)",opacity:0}},position:"relative",display:"inline-block",fontSize:s("dot-holder-size"),width:"1em",height:"1em","&-spin":{transform:"rotate(45deg)",animationName:AD,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-item":{position:"absolute",display:"block",width:s("dot-item-size"),height:s("dot-item-size"),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:$D,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-progress":{position:"absolute",left:"50%",top:0,transform:"translateX(-50%)"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(i=>`${i} ${n} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}}}}},ND=e=>{const{componentCls:t}=e,[r]=br(e.antCls,"spin");return{[t]:{"&-sm":{[r("dot-holder-size")]:e.dotSizeSM},"&-lg":{[r("dot-holder-size")]:e.dotSizeLG}}}},DD=e=>{const{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:r}},kD=tr("Spin",e=>{const t=er(e,{spinDotDefault:e.colorTextDescription});return[jD(t),OD(t),ND(t)]},DD),MD=200,lb=[[30,.05],[70,.03],[96,.01]];function LD(e,t){const[r,n]=a.useState(0),o=a.useRef(null),s=t==="auto";return a.useEffect(()=>(s&&e&&(n(0),o.current=setInterval(()=>{n(i=>{const l=100-i;for(let u=0;u<lb.length;u+=1){const[d,p]=lb[u];if(i<=d)return i+l*p}return i})},MD)),()=>{o.current&&(clearInterval(o.current),o.current=null)}),[s,e]),s?r:t}let K0;function zD(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}const wh=e=>{const{prefixCls:t,spinning:r=!0,delay:n=0,className:o,rootClassName:s,size:i,tip:l,description:u,wrapperClassName:d,style:p,children:f,fullscreen:m=!1,indicator:h,percent:v,classNames:g,styles:b,..._}=e,{getPrefixCls:y,direction:x,indicator:S,className:w,style:I,classNames:T,styles:R}=Yr("spin"),P=y("spin",t),[$,A]=kD(P),[k,D]=a.useState(()=>r&&!zD(r,n)),z=LD(k,v);a.useEffect(()=>{if(r){const G=NN(n,()=>{D(!0)});return G(),()=>{var L;(L=G==null?void 0:G.cancel)==null||L.call(G)}}D(!1)},[n,r]);const X=ba(G=>i??G),V=u??l,Y={...e,size:X,spinning:k,tip:V,description:V,fullscreen:m,children:f,percent:z},[U,F]=cn([T,g],[R,b],{props:Y}),H=h??S??K0,ee=typeof f<"u",O=ee||m,M=a.createElement(a.Fragment,null,a.createElement(ID,{className:ae(U.indicator),style:F.indicator,prefixCls:P,indicator:H,percent:z}),V&&a.createElement("div",{className:ae(`${P}-description`,U.tip,U.description),style:{...F.tip,...F.description}},V));return a.createElement("div",{className:ae(P,{[`${P}-sm`]:X==="small",[`${P}-lg`]:X==="large",[`${P}-spinning`]:k,[`${P}-rtl`]:x==="rtl",[`${P}-fullscreen`]:m},s,U.root,m&&U.mask,O?d:[`${P}-section`,U.section],w,o,$,A),style:{...F.root,...O?{}:F.section,...m?F.mask:{},...I,...p},"aria-live":"polite","aria-busy":k,..._},k&&(O?a.createElement("div",{className:ae(`${P}-section`,U.section),style:F.section},M):M),ee&&a.createElement("div",{className:ae(`${P}-container`,U.container),style:F.container},f))};wh.setDefaultIndicator=e=>{K0=e};const Eh=N.createContext({});Eh.Consumer;const FD=({prefixCls:e,className:t,avatar:r,title:n,description:o,...s})=>{const{getPrefixCls:i}=a.useContext(Ir),l=i("list",e),u=ae(`${l}-item-meta`,t),d=N.createElement("div",{className:`${l}-item-meta-content`},n&&N.createElement("h4",{className:`${l}-item-meta-title`},n),o&&N.createElement("div",{className:`${l}-item-meta-description`},o));return N.createElement("div",{...s,className:u},r&&N.createElement("div",{className:`${l}-item-meta-avatar`},r),(n||o)&&d)},VD=N.forwardRef((e,t)=>{const{prefixCls:r,children:n,actions:o,extra:s,styles:i,className:l,classNames:u,colStyle:d,...p}=e,{grid:f,itemLayout:m}=a.useContext(Eh),{getPrefixCls:h,list:v}=a.useContext(Ir),g=T=>{var R,P;return ae((P=(R=v==null?void 0:v.item)==null?void 0:R.classNames)==null?void 0:P[T],u==null?void 0:u[T])},b=T=>{var R,P;return{...(P=(R=v==null?void 0:v.item)==null?void 0:R.styles)==null?void 0:P[T],...i==null?void 0:i[T]}},_=()=>{const T=Fo(n);return T.some(P=>typeof P=="string")&&T.length>1},y=()=>m==="vertical"?!!s:!_(),x=h("list",r),S=o&&o.length>0&&N.createElement("ul",{className:ae(`${x}-item-action`,g("actions")),key:"actions",style:b("actions")},o.map((T,R)=>N.createElement("li",{key:`${x}-item-action-${R}`},T,R!==o.length-1&&N.createElement("em",{className:`${x}-item-action-split`})))),w=f?"div":"li",I=N.createElement(w,{...p,...f?{}:{ref:t},className:ae(`${x}-item`,{[`${x}-item-no-flex`]:!y()},l)},m==="vertical"&&s?[N.createElement("div",{className:`${x}-item-main`,key:"content"},n,S),N.createElement("div",{className:ae(`${x}-item-extra`,g("extra")),key:"extra",style:b("extra")},s)]:[n,S,Sn(s,{key:"extra"})]);return f?N.createElement(DN,{ref:t,flex:1,style:d},I):I}),X0=VD;X0.Meta=FD;const BD=e=>{const{listBorderedCls:t,componentCls:r,paddingLG:n,margin:o,itemPaddingSM:s,itemPaddingLG:i,marginLG:l,borderRadiusLG:u}=e,d=we(e.calc(u).sub(e.lineWidth).equal());return{[t]:{border:`${we(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:u,[`${r}-header`]:{borderRadius:`${d} ${d} 0 0`},[`${r}-footer`]:{borderRadius:`0 0 ${d} ${d}`},[`${r}-header,${r}-footer,${r}-item`]:{paddingInline:n},[`${r}-pagination`]:{margin:`${we(o)} ${we(l)}`}},[`${t}${r}-sm`]:{[`${r}-item,${r}-header,${r}-footer`]:{padding:s}},[`${t}${r}-lg`]:{[`${r}-item,${r}-header,${r}-footer`]:{padding:i}}}},HD=e=>{const{componentCls:t,screenSM:r,screenMD:n,marginLG:o,marginSM:s,margin:i}=e;return{[`@media screen and (max-width:${n}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:o}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:o}}}},[`@media screen and (max-width: ${r}px)`]:{[t]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:s}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${we(i)}`}}}}}},UD=e=>{const{componentCls:t,antCls:r,controlHeight:n,minHeight:o,paddingSM:s,marginLG:i,padding:l,itemPadding:u,colorPrimary:d,itemPaddingSM:p,itemPaddingLG:f,paddingXS:m,margin:h,colorText:v,colorTextDescription:g,motionDurationSlow:b,lineWidth:_,headerBg:y,footerBg:x,emptyTextPadding:S,metaMarginBottom:w,avatarMarginRight:I,titleMarginBottom:T,descriptionFontSize:R}=e;return{[t]:{...zr(e),position:"relative","--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:"none"},[`${t}-header`]:{background:y},[`${t}-footer`]:{background:x},[`${t}-header, ${t}-footer`]:{paddingBlock:s},[`${t}-pagination`]:{marginBlockStart:i,[`${r}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:o,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:u,color:v,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:I},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:v},[`${t}-item-meta-title`]:{margin:`0 0 ${we(e.marginXXS)} 0`,color:v,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:v,transition:`all ${b}`,"&:hover":{color:d}}},[`${t}-item-meta-description`]:{color:g,fontSize:R,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${we(m)}`,color:g,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:_,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${we(l)} 0`,color:g,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:S,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}},[`${t}-grid ${r}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:h,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:i},[`${t}-item-meta`]:{marginBlockEnd:w,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:T,color:v,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:l,marginInlineStart:"auto","> li":{padding:`0 ${we(l)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${we(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${we(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${we(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:n},[`${t}-split${t}-something-after-last-item ${r}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${we(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:f},[`${t}-sm ${t}-item`]:{padding:p},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}},WD=e=>({contentWidth:220,itemPadding:`${we(e.paddingContentVertical)} 0`,itemPaddingSM:`${we(e.paddingContentVerticalSM)} ${we(e.paddingContentHorizontal)}`,itemPaddingLG:`${we(e.paddingContentVerticalLG)} ${we(e.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}),qD=tr("List",e=>{const t=er(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[UD(t),BD(t),HD(t)]},WD,{extraCssVarPrefixCls:({prefixCls:e})=>[`${e}-container`]}),GD=(e,t)=>{const{pagination:r=!1,prefixCls:n,bordered:o=!1,split:s=!0,className:i,rootClassName:l,style:u,children:d,itemLayout:p,loadMore:f,grid:m,dataSource:h=[],size:v,header:g,footer:b,loading:_=!1,rowKey:y,renderItem:x,locale:S,...w}=e,I=Mn(r)?r:{},[T,R]=a.useState(I.defaultCurrent||1),[P,$]=a.useState(I.defaultPageSize||10),{getPrefixCls:A,direction:k,className:D,style:z}=Yr("list"),{renderEmpty:X}=a.useContext(Ir),V={current:1,total:0,position:"bottom"},Y=pe=>(be,j)=>{var q;R(be),$(j),r&&((q=r==null?void 0:r[pe])==null||q.call(r,be,j))},U=Y("onChange"),F=Y("onShowSizeChange"),H=(pe,be)=>{if(!x)return null;let j;return typeof y=="function"?j=y(pe):y?j=pe[y]:j=pe.key,j||(j=`list-item-${be}`),a.createElement(a.Fragment,{key:j},x(pe,be))},ee=!!(f||r||b),O=A("list",n),[M,G]=qD(O);let L=_;typeof L=="boolean"&&(L={spinning:L});const W=!!(L!=null&&L.spinning),B=ba(v);let J="";switch(B){case"large":J="lg";break;case"small":J="sm";break}const K=ae(O,{[`${O}-vertical`]:p==="vertical",[`${O}-${J}`]:J,[`${O}-split`]:s,[`${O}-bordered`]:o,[`${O}-loading`]:W,[`${O}-grid`]:!!m,[`${O}-something-after-last-item`]:ee,[`${O}-rtl`]:k==="rtl"},D,i,l,M,G),re=`${O}-container`,se=gA(V,{total:h.length,current:T,pageSize:P},r||{}),Z=Math.ceil(se.total/se.pageSize);se.current=Math.min(se.current,Z);const ne=r&&a.createElement("div",{className:ae(`${O}-pagination`)},a.createElement(PD,{align:"end",...se,onChange:U,onShowSizeChange:F}));let ie=ql(h);r&&h.length>(se.current-1)*se.pageSize&&(ie=ql(h).splice((se.current-1)*se.pageSize,se.pageSize));const he=Object.keys(m||{}).some(pe=>Ro.includes(pe)),me=dh(he),Pe=a.useMemo(()=>{for(let pe=0;pe<Ro.length;pe+=1){const be=Ro[pe];if(me[be])return be}},[me]),Se=a.useMemo(()=>{if(!m)return;const pe=Pe&&m[Pe]?m[Pe]:m.column;if(pe)return{width:`${100/pe}%`,maxWidth:`${100/pe}%`}},[JSON.stringify(m),Pe]);let Ce=W&&a.createElement("div",{style:{minHeight:53}});if(ie.length>0){const pe=ie.map(H);Ce=m?a.createElement(MN,{className:ae(re,G),gutter:m.gutter},a.Children.map(pe,be=>a.createElement("div",{key:be==null?void 0:be.key,style:Se},be))):a.createElement("ul",{className:ae(`${O}-items`,re,G)},pe)}else!d&&!W&&(Ce=a.createElement("div",{className:`${O}-empty-text`},(S==null?void 0:S.emptyText)||(X==null?void 0:X("List"))||a.createElement(Sx,{componentName:"List"})));const Ze=se.position,Ye=a.useMemo(()=>({grid:m,itemLayout:p}),[JSON.stringify(m),p]);return a.createElement(Eh.Provider,{value:Ye},a.createElement("div",{ref:t,style:{...z,...u},className:K,...w},(Ze==="top"||Ze==="both")&&ne,g&&a.createElement("div",{className:`${O}-header`},g),a.createElement(wh,{...L},Ce,d),b&&a.createElement("div",{className:`${O}-footer`},b),f||(Ze==="bottom"||Ze==="both")&&ne))},KD=a.forwardRef(GD),hf=KD;hf.Item=X0;var XD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};function gf(){return gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gf.apply(this,arguments)}const YD=(e,t)=>a.createElement(En,gf({},e,{ref:t,icon:XD})),JD=a.forwardRef(YD);var ZD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};function vf(){return vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vf.apply(this,arguments)}const QD=(e,t)=>a.createElement(En,vf({},e,{ref:t,icon:ZD})),ek=a.forwardRef(QD),tk=(e,t,r,n)=>{const{titleMarginBottom:o,fontWeightStrong:s}=n;return{marginBottom:o,color:r,fontWeight:s,fontSize:e,lineHeight:t}},rk=e=>{const t=[1,2,3,4,5],r={};return t.forEach(n=>{r[`
h${n}&,
div&-h${n},
div&-h${n} > textarea,
h${n}
`]=tk(e[`fontSizeHeading${n}`],e[`lineHeightHeading${n}`],e.colorTextHeading,e)}),r},nk=e=>{const{componentCls:t}=e;return{[`&${`${t}-link`}`]:{...Fx(e),userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none",[`${t}-actions`]:{pointerEvents:"auto"}}}}}},ok=e=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:vA[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),sk=e=>{const{componentCls:t,paddingSM:r}=e,n=r;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(n).div(-2).add(1).equal(),marginBottom:e.calc(n).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},ik=e=>({[`${e.componentCls}-copy-success`]:{"&, &:hover, &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),ak=()=>({"a&-ellipsis, span&-ellipsis":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),lk=e=>{const{componentCls:t,titleMarginTop:r}=e;return{[t]:{color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary, &${t}-link${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success, &${t}-link${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning, &${t}-link${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger, &${t}-link${t}-danger`]:{color:e.colorErrorText,[`&${t}-link:active, &${t}-link:focus`]:{color:e.colorErrorTextActive},[`&${t}-link:hover`]:{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"div&, p":{marginBottom:"1em"},...rk(e),[`& + h1${t}, & + h2${t}, & + h3${t}, & + h4${t}, & + h5${t}`]:{marginTop:r},"div, ul, li, p, h1, h2, h3, h4, h5":{"+ h1, + h2, + h3, + h4, + h5":{marginTop:r}},...ok(e),...nk(e),[`${t}-actions`]:{display:"inline"},[`
${t}-expand,
${t}-collapse,
${t}-edit,
${t}-copy
`]:{...Fx(e),marginInlineStart:e.marginXXS},...sk(e),...ik(e),...ak(),"&-rtl":{direction:"rtl"}}}},ck=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),Y0=tr("Typography",lk,ck),uk=e=>{const{prefixCls:t,"aria-label":r,className:n,style:o,direction:s,maxLength:i,autoSize:l=!0,value:u,onSave:d,onCancel:p,onEnd:f,component:m,enterIcon:h=a.createElement(ek,null)}=e,v=a.useRef(null),g=a.useRef(!1),b=a.useRef(null),[_,y]=a.useState(u);a.useEffect(()=>{y(u)},[u]),a.useEffect(()=>{var D;if((D=v.current)!=null&&D.resizableTextArea){const{textArea:z}=v.current.resizableTextArea;z.focus();const{length:X}=z.value;z.setSelectionRange(X,X)}},[]);const x=({target:D})=>{y(D.value.replace(/[\n\r]/g,""))},S=()=>{g.current=!0},w=()=>{g.current=!1},I=({keyCode:D})=>{g.current||(b.current=D)},T=()=>{d(_.trim())},R=({keyCode:D,ctrlKey:z,altKey:X,metaKey:V,shiftKey:Y})=>{b.current!==D||g.current||z||X||V||Y||(D===Xe.ENTER?(T(),f==null||f()):D===Xe.ESC&&p())},P=()=>{T()},[$,A]=Y0(t),k=ae(t,`${t}-edit-content`,{[`${t}-rtl`]:s==="rtl",[`${t}-${m}`]:!!m},n,$,A);return a.createElement("div",{className:k,style:o},a.createElement(sD,{ref:v,maxLength:i,value:_,onChange:x,onKeyDown:I,onKeyUp:R,onCompositionStart:S,onCompositionEnd:w,onBlur:P,"aria-label":r,rows:1,autoSize:l}),h!==null?Sn(h,{className:`${t}-edit-content-confirm`}):null)},dk=({copyConfig:e,children:t})=>{const[r,n]=a.useState(!1),[o,s]=a.useState(!1),i=a.useRef(null),l=()=>{i.current&&clearTimeout(i.current)},u={};e.format&&(u.format=e.format),a.useEffect(()=>l,[]);const d=Lr(async p=>{var f;p==null||p.preventDefault(),p==null||p.stopPropagation(),s(!0);try{const m=typeof e.text=="function"?await e.text():e.text;await bA(m||Vx(t,{skipEmpty:!0}).join("")||"",u),s(!1),n(!0),l(),i.current=setTimeout(()=>{n(!1)},3e3),(f=e.onCopy)==null||f.call(e,p)}catch(m){throw s(!1),m}});return{copied:r,copyLoading:o,onClick:d}};function xd(e,t){return a.useMemo(()=>{const r=!!e;return[r,{...t,...r&&typeof e=="object"?e:null}]},[e])}const pk=e=>{const t=a.useRef(void 0);return a.useEffect(()=>{t.current=e}),t.current},fk=(e,t,r)=>a.useMemo(()=>e===!0?{title:t??r}:a.isValidElement(e)?{title:e}:Mn(e)?{title:t??r,...e}:{title:e},[e,t,r]),J0=a.forwardRef((e,t)=>{const{prefixCls:r,component:n="article",className:o,rootClassName:s,children:i,direction:l,style:u,...d}=e,{getPrefixCls:p,direction:f,className:m,style:h}=Yr("typography"),v=l??f,g=p("typography",r),[b,_]=Y0(g),y=ae(g,m,{[`${g}-rtl`]:v==="rtl"},o,s,b,_),x={...h,...u};return a.createElement(n,{className:y,style:x,ref:t,...d},i)});var mk={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};function bf(){return bf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bf.apply(this,arguments)}const hk=(e,t)=>a.createElement(En,bf({},e,{ref:t,icon:mk})),gk=a.forwardRef(hk),cb=e=>e===!1?[!1,!1]:Vx(e);function wd(e,t,r){return e===!0||e===void 0?t:e||r&&t}function vk(e){const t=document.createElement("em");e.appendChild(t);const r=e.getBoundingClientRect(),n=t.getBoundingClientRect();return e.removeChild(t),r.left>n.left||n.right>r.right||r.top>n.top||n.bottom>r.bottom}const Sh=e=>["string","number"].includes(typeof e),bk=e=>{const{prefixCls:t,copied:r,locale:n,iconOnly:o,tooltips:s,icon:i,tabIndex:l,onCopy:u,loading:d}=e,p=cb(s),f=cb(i),{copied:m,copy:h}=n??{},v=r?m:h,g=wd(p[r?1:0],v),b=typeof g=="string"?g:v;return a.createElement(Bo,{title:g},a.createElement("button",{type:"button",className:ae(`${t}-copy`,{[`${t}-copy-success`]:r,[`${t}-copy-icon-only`]:o}),onClick:u,"aria-label":b,tabIndex:l},r?wd(f[1],a.createElement(m0,null),!0):wd(f[0],d?a.createElement(wx,null):a.createElement(gk,null),!0)))},Ya=a.forwardRef(({style:e,children:t},r)=>{const n=a.useRef(null);return a.useImperativeHandle(r,()=>({isExceed:()=>{const o=n.current;return o.scrollHeight>o.clientHeight},getHeight:()=>n.current.clientHeight})),a.createElement("span",{"aria-hidden":!0,ref:n,style:{position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)",...e}},t)}),_k=e=>e.reduce((t,r)=>t+(Sh(r)?String(r).length:1),0);function ub(e,t){let r=0;const n=[];for(let o=0;o<e.length;o+=1){if(r===t)return n;const s=e[o],l=Sh(s)?String(s).length:1,u=r+l;if(u>t){const d=t-r;return n.push(String(s).slice(0,d)),n}n.push(s),r=u}return e}const Ed=0,Sd=1,Cd=2,Pd=3,db=4,Ja={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function yk(e){const{enableMeasure:t,width:r,text:n,children:o,rows:s,expanded:i,miscDeps:l,onEllipsis:u}=e,d=a.useMemo(()=>Fo(n),[n]),p=a.useMemo(()=>_k(d),[n]),f=a.useMemo(()=>o(d,!1),[n]),[m,h]=a.useState(null),v=a.useRef(null),g=a.useRef(null),b=a.useRef(null),_=a.useRef(null),y=a.useRef(null),[x,S]=a.useState(!1),[w,I]=a.useState(Ed),[T,R]=a.useState(0),[P,$]=a.useState(null);Qt(()=>{I(t&&r&&p?Sd:Ed)},[r,n,s,t,d]),Qt(()=>{var z,X,V,Y;if(w===Sd){I(Cd);const U=g.current&&getComputedStyle(g.current).whiteSpace;$(U)}else if(w===Cd){const U=!!((z=b.current)!=null&&z.isExceed());I(U?Pd:db),h(U?[0,p]:null),S(U);const F=((X=b.current)==null?void 0:X.getHeight())||0,H=s===1?0:((V=_.current)==null?void 0:V.getHeight())||0,ee=((Y=y.current)==null?void 0:Y.getHeight())||0,O=Math.max(F,H+ee);R(O+1),u(U)}},[w]);const A=m?Math.ceil((m[0]+m[1])/2):0;Qt(()=>{var V;const[z,X]=m||[0,0];if(z!==X){const U=(((V=v.current)==null?void 0:V.getHeight())||0)>T;let F=A;X-z===1&&(F=U?z:X),h(U?[z,F]:[F,X])}},[m,A]);const k=a.useMemo(()=>{if(!t)return o(d,!1);if(w!==Pd||!m||m[0]!==m[1]){const z=o(d,!1);return[db,Ed].includes(w)?z:a.createElement("span",{style:{...Ja,WebkitLineClamp:s}},z)}return o(i?d:ub(d,m[0]),x)},[i,w,m,d].concat(ql(l))),D={width:r,margin:0,padding:0,whiteSpace:P==="nowrap"?"normal":"inherit"};return a.createElement(a.Fragment,null,k,w===Cd&&a.createElement(a.Fragment,null,a.createElement(Ya,{style:{...D,...Ja,WebkitLineClamp:s},ref:b},f),a.createElement(Ya,{style:{...D,...Ja,WebkitLineClamp:s-1},ref:_},f),a.createElement(Ya,{style:{...D,...Ja,WebkitLineClamp:1},ref:y},o([],!0))),w===Pd&&m&&m[0]!==m[1]&&a.createElement(Ya,{style:{...D,top:400},ref:v},o(ub(d,A),!0)),w===Sd&&a.createElement("span",{style:{whiteSpace:"inherit"},ref:g}))}const xk=({enableEllipsis:e,isEllipsis:t,open:r,children:n,tooltipProps:o})=>{if(!(o!=null&&o.title)||!e)return n;const s=r&&t;return a.createElement(Bo,{open:s,...o},n)};function wk({mark:e,code:t,underline:r,delete:n,strong:o,keyboard:s,italic:i},l){let u=l;function d(p,f){f&&(u=a.createElement(p,{},u))}return d("strong",o),d("u",r),d("del",n),d("code",t),d("mark",e),d("kbd",s),d("i",i),u}const Ek="...",pb=["delete","mark","code","underline","strong","keyboard","italic"],lu=a.forwardRef((e,t)=>{const{prefixCls:r,className:n,style:o,type:s,disabled:i,children:l,ellipsis:u,editable:d,copyable:p,component:f,title:m,onMouseEnter:h,onMouseLeave:v,...g}=e,{getPrefixCls:b,direction:_}=a.useContext(Ir),[y]=zx("Text"),x=a.useRef(null),S=a.useRef(null),w=b("typography",r),I=gr(g,pb),[T,R]=xd(d),[P,$]=Pr(!1,R.editing),{triggerType:A=["icon"]}=R,k=ze=>{var We;ze&&((We=R.onStart)==null||We.call(R)),$(ze)},D=pk(P);Qt(()=>{var ze;!P&&D&&((ze=S.current)==null||ze.focus())},[P]);const z=ze=>{ze==null||ze.preventDefault(),k(!0)},X=ze=>{var We;(We=R.onChange)==null||We.call(R,ze),k(!1)},V=()=>{var ze;(ze=R.onCancel)==null||ze.call(R),k(!1)},[Y,U]=xd(p),{copied:F,copyLoading:H,onClick:ee}=dk({copyConfig:U,children:l}),[O,M]=a.useState(!1),[G,L]=a.useState(!1),[W,B]=a.useState(!1),[J,K]=a.useState(!1),[re,se]=a.useState(!0),[Z,ne]=xd(u,{expandable:!1,symbol:ze=>ze?y==null?void 0:y.collapse:y==null?void 0:y.expand}),[ie,he]=Pr(ne.defaultExpanded||!1,ne.expanded),me=Z&&(!ie||ne.expandable==="collapsible"),{rows:Pe=1}=ne,Se=a.useMemo(()=>me&&(ne.suffix!==void 0||ne.onEllipsis||ne.expandable||T||Y),[me,ne,T,Y]);Qt(()=>{Z&&!Se&&(M(cv("webkitLineClamp")),L(cv("textOverflow")))},[Se,Z]);const[Ce,Ze]=a.useState(me),Ye=a.useMemo(()=>Se?!1:Pe===1?G:O,[Se,G,O]);Qt(()=>{Ze(Ye&&me)},[Ye,me]);const pe=fk(ne.tooltip,R.text,l),be=Ce&&!!pe.title,j=me&&(Ce?be&&J:W),q=me&&Pe===1&&Ce,Q=me&&Pe>1&&Ce,le=(ze,We)=>{var ke;he(We.expanded),(ke=ne.onExpand)==null||ke.call(ne,ze,We)},[de,ce]=a.useState(0),[fe,ue]=a.useState(!1),[ye,Be]=a.useState(!1),Ae=({offsetWidth:ze})=>{ce(ze)},Ee=ze=>{var We;B(ze),W!==ze&&((We=ne.onEllipsis)==null||We.call(ne,ze))};a.useEffect(()=>{const ze=x.current;if(Z&&be&&ze){const We=vk(ze);J!==We&&K(We)}},[Z,be,l,Q,re,de]),a.useEffect(()=>{const ze=x.current;if(typeof IntersectionObserver>"u"||!ze||!be||!me)return;const We=new IntersectionObserver(()=>{se(!!ze.offsetParent)});return We.observe(ze),()=>{We.disconnect()}},[be,me]);const lt=a.useMemo(()=>{if(!(!Z||Ce))return[R.text,l,m,pe.title].find(Sh)},[Z,Ce,m,pe.title,j]);if(P)return a.createElement(uk,{value:R.text??(typeof l=="string"?l:""),onSave:X,onCancel:V,onEnd:R.onEnd,prefixCls:w,className:n,style:o,direction:_,component:f,maxLength:R.maxLength,autoSize:R.autoSize,enterIcon:R.enterIcon});const ht=()=>{const{expandable:ze,symbol:We}=ne;return ze?a.createElement("button",{type:"button",key:"expand",className:`${w}-${ie?"collapse":"expand"}`,onClick:ke=>le(ke,{expanded:!ie}),"aria-label":ie?y.collapse:y==null?void 0:y.expand},typeof We=="function"?We(ie):We):null},dt=()=>{if(!T)return;const{icon:ze,tooltip:We,tabIndex:ke}=R,nt=Fo(We)[0]||(y==null?void 0:y.edit),ut=typeof nt=="string"?nt:"";return A.includes("icon")?a.createElement(Bo,{key:"edit",title:We===!1?"":nt},a.createElement("button",{type:"button",ref:S,className:`${w}-edit`,onClick:z,"aria-label":ut,tabIndex:ke},ze||a.createElement(JD,{role:"button"}))):null},mt=()=>Y?a.createElement(bk,{key:"copy",...U,prefixCls:w,copied:F,locale:y,onCopy:ee,loading:H,iconOnly:!jn(l)}):null,ft=ze=>{const We=ze&&ht(),ke=dt(),nt=mt();return!We&&!ke&&!nt?null:a.createElement("span",{key:"operations",className:`${w}-actions`,onMouseEnter:()=>ue(!0),onMouseLeave:()=>ue(!1)},We,ke,nt)},vt=ze=>[ze&&!ie&&a.createElement("span",{"aria-hidden":!0,key:"ellipsis"},Ek),ne.suffix,ft(ze)];return a.createElement(ei,{onResize:Ae,disabled:!me},ze=>a.createElement(xk,{tooltipProps:pe,enableEllipsis:me,isEllipsis:j,open:ye&&!fe},a.createElement(J0,{onMouseEnter:We=>{Be(!0),h==null||h(We)},onMouseLeave:We=>{Be(!1),v==null||v(We)},className:ae({[`${w}-${s}`]:s,[`${w}-disabled`]:i,[`${w}-ellipsis`]:Z,[`${w}-ellipsis-single-line`]:q,[`${w}-ellipsis-multiple-line`]:Q,[`${w}-link`]:f==="a"},n),prefixCls:r,style:{...o,WebkitLineClamp:Q?Pe:void 0},component:f,ref:va(ze,x,t),direction:_,onClick:A.includes("text")?z:void 0,"aria-label":lt==null?void 0:lt.toString(),title:m,...I},a.createElement(yk,{enableMeasure:me&&!Ce,text:l,rows:Pe,width:de,onEllipsis:Ee,expanded:ie,miscDeps:[F,ie,H,T,Y,y].concat(ql(pb.map(We=>e[We])))},(We,ke)=>wk(e,a.createElement(a.Fragment,null,We.length>0&&ke&&!ie&<?a.createElement("span",{key:"show-content","aria-hidden":!0},We):We,vt(ke)))))))}),Sk=a.forwardRef((e,t)=>{const{ellipsis:r,rel:n,children:o,navigate:s,...i}=e,l={...i,rel:n===void 0&&i.target==="_blank"?"noopener noreferrer":n};return a.createElement(lu,{...l,ref:t,ellipsis:!!r,component:"a"},o)}),Ck=a.forwardRef((e,t)=>{const{children:r,...n}=e;return a.createElement(lu,{ref:t,...n,component:"div"},r)}),Pk=a.forwardRef((e,t)=>{const{ellipsis:r,children:n,...o}=e,s=a.useMemo(()=>Mn(r)?gr(r,["expandable","rows"]):r,[r]);return a.createElement(lu,{ref:t,...o,ellipsis:s,component:"span"},n)}),Rk=[1,2,3,4,5],Tk=a.forwardRef((e,t)=>{const{level:r=1,children:n,...o}=e,s=Rk.includes(r)?`h${r}`:"h1";return a.createElement(lu,{ref:t,...o,component:s},n)}),Jn=J0;Jn.Text=Pk;Jn.Link=Sk;Jn.Title=Tk;Jn.Paragraph=Ck;function Z0(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ik}=Object.prototype,{getPrototypeOf:cu}=Object,{iterator:uu,toStringTag:Q0}=Symbol,du=(e=>t=>{const r=Ik.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),un=e=>(e=e.toLowerCase(),t=>du(t)===e),pu=e=>t=>typeof t===e,{isArray:oi}=Array,Fs=pu("undefined");function Sa(e){return e!==null&&!Fs(e)&&e.constructor!==null&&!Fs(e.constructor)&&Rr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ew=un("ArrayBuffer");function $k(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ew(e.buffer),t}const Ak=pu("string"),Rr=pu("function"),tw=pu("number"),Ca=e=>e!==null&&typeof e=="object",jk=e=>e===!0||e===!1,Tl=e=>{if(du(e)!=="object")return!1;const t=cu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Q0 in e)&&!(uu in e)},Ok=e=>{if(!Ca(e)||Sa(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Nk=un("Date"),Dk=un("File"),kk=e=>!!(e&&typeof e.uri<"u"),Mk=e=>e&&typeof e.getParts<"u",Lk=un("Blob"),zk=un("FileList"),Fk=e=>Ca(e)&&Rr(e.pipe);function Vk(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const fb=Vk(),mb=typeof fb.FormData<"u"?fb.FormData:void 0,Bk=e=>{if(!e)return!1;if(mb&&e instanceof mb)return!0;const t=cu(e);if(!t||t===Object.prototype||!Rr(e.append))return!1;const r=du(e);return r==="formdata"||r==="object"&&Rr(e.toString)&&e.toString()==="[object FormData]"},Hk=un("URLSearchParams"),[Uk,Wk,qk,Gk]=["ReadableStream","Request","Response","Headers"].map(un),Kk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Pa(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),oi(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(Sa(e))return;const s=r?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let l;for(n=0;n<i;n++)l=s[n],t.call(null,e[l],l,e)}}function rw(e,t){if(Sa(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const So=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,nw=e=>!Fs(e)&&e!==So;function _f(...e){const{caseless:t,skipUndefined:r}=nw(this)&&this||{},n={},o=(s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const l=t&&rw(n,i)||i,u=yf(n,l)?n[l]:void 0;Tl(u)&&Tl(s)?n[l]=_f(u,s):Tl(s)?n[l]=_f({},s):oi(s)?n[l]=s.slice():(!r||!Fs(s))&&(n[l]=s)};for(let s=0,i=e.length;s<i;s++)e[s]&&Pa(e[s],o);return n}const Xk=(e,t,r,{allOwnKeys:n}={})=>(Pa(t,(o,s)=>{r&&Rr(o)?Object.defineProperty(e,s,{__proto__:null,value:Z0(o,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),Yk=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Jk=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},Zk=(e,t,r,n)=>{let o,s,i;const l={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!n||n(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=r!==!1&&cu(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Qk=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},eM=e=>{if(!e)return null;if(oi(e))return e;let t=e.length;if(!tw(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},tM=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&cu(Uint8Array)),rM=(e,t)=>{const n=(e&&e[uu]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},nM=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},oM=un("HTMLFormElement"),sM=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),yf=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),iM=un("RegExp"),ow=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Pa(r,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(n[s]=i||o)}),Object.defineProperties(e,n)},aM=e=>{ow(e,(t,r)=>{if(Rr(e)&&["arguments","caller","callee"].includes(r))return!1;const n=e[r];if(Rr(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},lM=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return oi(e)?n(e):n(String(e).split(t)),r},cM=()=>{},uM=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function dM(e){return!!(e&&Rr(e.append)&&e[Q0]==="FormData"&&e[uu])}const pM=e=>{const t=new Array(10),r=(n,o)=>{if(Ca(n)){if(t.indexOf(n)>=0)return;if(Sa(n))return n;if(!("toJSON"in n)){t[o]=n;const s=oi(n)?[]:{};return Pa(n,(i,l)=>{const u=r(i,o+1);!Fs(u)&&(s[l]=u)}),t[o]=void 0,s}}return n};return r(e,0)},fM=un("AsyncFunction"),mM=e=>e&&(Ca(e)||Rr(e))&&Rr(e.then)&&Rr(e.catch),sw=((e,t)=>e?setImmediate:t?((r,n)=>(So.addEventListener("message",({source:o,data:s})=>{o===So&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),So.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Rr(So.postMessage)),hM=typeof queueMicrotask<"u"?queueMicrotask.bind(So):typeof process<"u"&&process.nextTick||sw,gM=e=>e!=null&&Rr(e[uu]),te={isArray:oi,isArrayBuffer:ew,isBuffer:Sa,isFormData:Bk,isArrayBufferView:$k,isString:Ak,isNumber:tw,isBoolean:jk,isObject:Ca,isPlainObject:Tl,isEmptyObject:Ok,isReadableStream:Uk,isRequest:Wk,isResponse:qk,isHeaders:Gk,isUndefined:Fs,isDate:Nk,isFile:Dk,isReactNativeBlob:kk,isReactNative:Mk,isBlob:Lk,isRegExp:iM,isFunction:Rr,isStream:Fk,isURLSearchParams:Hk,isTypedArray:tM,isFileList:zk,forEach:Pa,merge:_f,extend:Xk,trim:Kk,stripBOM:Yk,inherits:Jk,toFlatObject:Zk,kindOf:du,kindOfTest:un,endsWith:Qk,toArray:eM,forEachEntry:rM,matchAll:nM,isHTMLForm:oM,hasOwnProperty:yf,hasOwnProp:yf,reduceDescriptors:ow,freezeMethods:aM,toObjectSet:lM,toCamelCase:sM,noop:cM,toFiniteNumber:uM,findKey:rw,global:So,isContextDefined:nw,isSpecCompliantForm:dM,toJSONObject:pM,isAsyncFn:fM,isThenable:mM,setImmediate:sw,asap:hM,isIterable:gM},vM=te.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),bM=e=>{const t={};let r,n,o;return e&&e.split(`
`).forEach(function(i){o=i.indexOf(":"),r=i.substring(0,o).trim().toLowerCase(),n=i.substring(o+1).trim(),!(!r||t[r]&&vM[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},hb=Symbol("internals"),_M=/[^\x09\x20-\x7E\x80-\xFF]/g;function yM(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}function bi(e){return e&&String(e).trim().toLowerCase()}function xM(e){return yM(e.replace(_M,""))}function Il(e){return e===!1||e==null?e:te.isArray(e)?e.map(Il):xM(String(e))}function wM(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const EM=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Rd(e,t,r,n,o){if(te.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!te.isString(t)){if(te.isString(n))return t.indexOf(n)!==-1;if(te.isRegExp(n))return n.test(t)}}function SM(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function CM(e,t){const r=te.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{__proto__:null,value:function(o,s,i){return this[n].call(this,t,o,s,i)},configurable:!0})})}let vr=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function s(l,u,d){const p=bi(u);if(!p)throw new Error("header name must be a non-empty string");const f=te.findKey(o,p);(!f||o[f]===void 0||d===!0||d===void 0&&o[f]!==!1)&&(o[f||u]=Il(l))}const i=(l,u)=>te.forEach(l,(d,p)=>s(d,p,u));if(te.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(te.isString(t)&&(t=t.trim())&&!EM(t))i(bM(t),r);else if(te.isObject(t)&&te.isIterable(t)){let l={},u,d;for(const p of t){if(!te.isArray(p))throw TypeError("Object iterator must return a key-value pair");l[d=p[0]]=(u=l[d])?te.isArray(u)?[...u,p[1]]:[u,p[1]]:p[1]}i(l,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=bi(t),t){const n=te.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return wM(o);if(te.isFunction(r))return r.call(this,o,n);if(te.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=bi(t),t){const n=te.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Rd(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function s(i){if(i=bi(i),i){const l=te.findKey(n,i);l&&(!r||Rd(n,n[l],l,r))&&(delete n[l],o=!0)}}return te.isArray(t)?t.forEach(s):s(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const s=r[n];(!t||Rd(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const r=this,n={};return te.forEach(this,(o,s)=>{const i=te.findKey(n,s);if(i){r[i]=Il(o),delete r[s];return}const l=t?SM(s):String(s).trim();l!==s&&delete r[s],r[l]=Il(o),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return te.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&te.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[hb]=this[hb]={accessors:{}}).accessors,o=this.prototype;function s(i){const l=bi(i);n[l]||(CM(o,i),n[l]=!0)}return te.isArray(t)?t.forEach(s):s(t),this}};vr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);te.reduceDescriptors(vr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});te.freezeMethods(vr);const PM="[REDACTED ****]";function RM(e){if(te.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(te.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function TM(e,t){const r=new Set(t.map(s=>String(s).toLowerCase())),n=[],o=s=>{if(s===null||typeof s!="object"||te.isBuffer(s))return s;if(n.indexOf(s)!==-1)return;s instanceof vr&&(s=s.toJSON()),n.push(s);let i;if(te.isArray(s))i=[],s.forEach((l,u)=>{const d=o(l);te.isUndefined(d)||(i[u]=d)});else{if(!te.isPlainObject(s)&&RM(s))return n.pop(),s;i=Object.create(null);for(const[l,u]of Object.entries(s)){const d=r.has(l.toLowerCase())?PM:o(u);te.isUndefined(d)||(i[l]=d)}}return n.pop(),i};return o(e)}let qe=class iw extends Error{static from(t,r,n,o,s,i){const l=new iw(t.message,r||t.code,n,o,s);return l.cause=t,l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),i&&Object.assign(l,i),l}constructor(t,r,n,o,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),o&&(this.request=o),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,r=t&&te.hasOwnProp(t,"redact")?t.redact:void 0,n=te.isArray(r)&&r.length>0?TM(t,r):te.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};qe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";qe.ERR_BAD_OPTION="ERR_BAD_OPTION";qe.ECONNABORTED="ECONNABORTED";qe.ETIMEDOUT="ETIMEDOUT";qe.ECONNREFUSED="ECONNREFUSED";qe.ERR_NETWORK="ERR_NETWORK";qe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";qe.ERR_DEPRECATED="ERR_DEPRECATED";qe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";qe.ERR_BAD_REQUEST="ERR_BAD_REQUEST";qe.ERR_CANCELED="ERR_CANCELED";qe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";qe.ERR_INVALID_URL="ERR_INVALID_URL";qe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const IM=null;function xf(e){return te.isPlainObject(e)||te.isArray(e)}function aw(e){return te.endsWith(e,"[]")?e.slice(0,-2):e}function Td(e,t,r){return e?e.concat(t).map(function(o,s){return o=aw(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function $M(e){return te.isArray(e)&&!e.some(xf)}const AM=te.toFlatObject(te,{},null,function(t){return/^is[A-Z]/.test(t)});function fu(e,t,r){if(!te.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=te.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,_){return!te.isUndefined(_[b])});const n=r.metaTokens,o=r.visitor||f,s=r.dots,i=r.indexes,l=r.Blob||typeof Blob<"u"&&Blob,u=r.maxDepth===void 0?100:r.maxDepth,d=l&&te.isSpecCompliantForm(t);if(!te.isFunction(o))throw new TypeError("visitor must be a function");function p(g){if(g===null)return"";if(te.isDate(g))return g.toISOString();if(te.isBoolean(g))return g.toString();if(!d&&te.isBlob(g))throw new qe("Blob is not supported. Use a Buffer instead.");return te.isArrayBuffer(g)||te.isTypedArray(g)?d&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function f(g,b,_){let y=g;if(te.isReactNative(t)&&te.isReactNativeBlob(g))return t.append(Td(_,b,s),p(g)),!1;if(g&&!_&&typeof g=="object"){if(te.endsWith(b,"{}"))b=n?b:b.slice(0,-2),g=JSON.stringify(g);else if(te.isArray(g)&&$M(g)||(te.isFileList(g)||te.endsWith(b,"[]"))&&(y=te.toArray(g)))return b=aw(b),y.forEach(function(S,w){!(te.isUndefined(S)||S===null)&&t.append(i===!0?Td([b],w,s):i===null?b:b+"[]",p(S))}),!1}return xf(g)?!0:(t.append(Td(_,b,s),p(g)),!1)}const m=[],h=Object.assign(AM,{defaultVisitor:f,convertValue:p,isVisitable:xf});function v(g,b,_=0){if(!te.isUndefined(g)){if(_>u)throw new qe("Object is too deeply nested ("+_+" levels). Max depth: "+u,qe.ERR_FORM_DATA_DEPTH_EXCEEDED);if(m.indexOf(g)!==-1)throw Error("Circular reference detected in "+b.join("."));m.push(g),te.forEach(g,function(x,S){(!(te.isUndefined(x)||x===null)&&o.call(t,x,te.isString(S)?S.trim():S,b,h))===!0&&v(x,b?b.concat(S):[S],_+1)}),m.pop()}}if(!te.isObject(e))throw new TypeError("data must be an object");return v(e),t}function gb(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return t[n]})}function Ch(e,t){this._pairs=[],e&&fu(e,this,t)}const lw=Ch.prototype;lw.append=function(t,r){this._pairs.push([t,r])};lw.toString=function(t){const r=t?function(n){return t.call(this,n,gb)}:gb;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function jM(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function cw(e,t,r){if(!t)return e;const n=r&&r.encode||jM,o=te.isFunction(r)?{serialize:r}:r,s=o&&o.serialize;let i;if(s?i=s(t,o):i=te.isURLSearchParams(t)?t.toString():new Ch(t,o).toString(n),i){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class vb{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){te.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Ph={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},OM=typeof URLSearchParams<"u"?URLSearchParams:Ch,NM=typeof FormData<"u"?FormData:null,DM=typeof Blob<"u"?Blob:null,kM={isBrowser:!0,classes:{URLSearchParams:OM,FormData:NM,Blob:DM},protocols:["http","https","file","blob","url","data"]},Rh=typeof window<"u"&&typeof document<"u",wf=typeof navigator=="object"&&navigator||void 0,MM=Rh&&(!wf||["ReactNative","NativeScript","NS"].indexOf(wf.product)<0),LM=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",zM=Rh&&window.location.href||"http://localhost",FM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Rh,hasStandardBrowserEnv:MM,hasStandardBrowserWebWorkerEnv:LM,navigator:wf,origin:zM},Symbol.toStringTag,{value:"Module"})),ar={...FM,...kM};function VM(e,t){return fu(e,new ar.classes.URLSearchParams,{visitor:function(r,n,o,s){return ar.isNode&&te.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function BM(e){return te.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function HM(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}function uw(e){function t(r,n,o,s){let i=r[s++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),u=s>=r.length;return i=!i&&te.isArray(o)?o.length:i,u?(te.hasOwnProp(o,i)?o[i]=te.isArray(o[i])?o[i].concat(n):[o[i],n]:o[i]=n,!l):((!o[i]||!te.isObject(o[i]))&&(o[i]=[]),t(r,n,o[i],s)&&te.isArray(o[i])&&(o[i]=HM(o[i])),!l)}if(te.isFormData(e)&&te.isFunction(e.entries)){const r={};return te.forEachEntry(e,(n,o)=>{t(BM(n),o,r,0)}),r}return null}const ns=(e,t)=>e!=null&&te.hasOwnProp(e,t)?e[t]:void 0;function UM(e,t,r){if(te.isString(e))try{return(t||JSON.parse)(e),te.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Ra={transitional:Ph,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=te.isObject(t);if(s&&te.isHTMLForm(t)&&(t=new FormData(t)),te.isFormData(t))return o?JSON.stringify(uw(t)):t;if(te.isArrayBuffer(t)||te.isBuffer(t)||te.isStream(t)||te.isFile(t)||te.isBlob(t)||te.isReadableStream(t))return t;if(te.isArrayBufferView(t))return t.buffer;if(te.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){const u=ns(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return VM(t,u).toString();if((l=te.isFileList(t))||n.indexOf("multipart/form-data")>-1){const d=ns(this,"env"),p=d&&d.FormData;return fu(l?{"files[]":t}:t,p&&new p,u)}}return s||o?(r.setContentType("application/json",!1),UM(t)):t}],transformResponse:[function(t){const r=ns(this,"transitional")||Ra.transitional,n=r&&r.forcedJSONParsing,o=ns(this,"responseType"),s=o==="json";if(te.isResponse(t)||te.isReadableStream(t))return t;if(t&&te.isString(t)&&(n&&!o||s)){const l=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t,ns(this,"parseReviver"))}catch(u){if(l)throw u.name==="SyntaxError"?qe.from(u,qe.ERR_BAD_RESPONSE,this,null,ns(this,"response")):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ar.classes.FormData,Blob:ar.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};te.forEach(["delete","get","head","post","put","patch","query"],e=>{Ra.headers[e]={}});function Id(e,t){const r=this||Ra,n=t||r,o=vr.from(n.headers);let s=n.data;return te.forEach(e,function(l){s=l.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function dw(e){return!!(e&&e.__CANCEL__)}let Ta=class extends qe{constructor(t,r,n){super(t??"canceled",qe.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function pw(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new qe("Request failed with status code "+r.status,r.status>=400&&r.status<500?qe.ERR_BAD_REQUEST:qe.ERR_BAD_RESPONSE,r.config,r.request,r))}function WM(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function qM(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(u){const d=Date.now(),p=n[s];i||(i=d),r[o]=u,n[o]=d;let f=s,m=0;for(;f!==o;)m+=r[f++],f=f%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),d-i<t)return;const h=p&&d-p;return h?Math.round(m*1e3/h):void 0}}function GM(e,t){let r=0,n=1e3/t,o,s;const i=(d,p=Date.now())=>{r=p,o=null,s&&(clearTimeout(s),s=null),e(...d)};return[(...d)=>{const p=Date.now(),f=p-r;f>=n?i(d,p):(o=d,s||(s=setTimeout(()=>{s=null,i(o)},n-f)))},()=>o&&i(o)]}const rc=(e,t,r=3)=>{let n=0;const o=qM(50,250);return GM(s=>{const i=s.loaded,l=s.lengthComputable?s.total:void 0,u=l!=null?Math.min(i,l):i,d=Math.max(0,u-n),p=o(d);n=Math.max(n,u);const f={loaded:u,total:l,progress:l?u/l:void 0,bytes:d,rate:p||void 0,estimated:p&&l?(l-u)/p:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},r)},bb=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},_b=e=>(...t)=>te.asap(()=>e(...t)),KM=ar.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ar.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ar.origin),ar.navigator&&/(msie|trident)/i.test(ar.navigator.userAgent)):()=>!0,XM=ar.hasStandardBrowserEnv?{write(e,t,r,n,o,s,i){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];te.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),te.isString(n)&&l.push(`path=${n}`),te.isString(o)&&l.push(`domain=${o}`),s===!0&&l.push("secure"),te.isString(i)&&l.push(`SameSite=${i}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const n=t[r].replace(/^\s+/,""),o=n.indexOf("=");if(o!==-1&&n.slice(0,o)===e)return decodeURIComponent(n.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function YM(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function JM(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function fw(e,t,r){let n=!YM(t);return e&&(n||r===!1)?JM(e,t):t}const yb=e=>e instanceof vr?{...e}:e;function Ao(e,t){t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(d,p,f,m){return te.isPlainObject(d)&&te.isPlainObject(p)?te.merge.call({caseless:m},d,p):te.isPlainObject(p)?te.merge({},p):te.isArray(p)?p.slice():p}function o(d,p,f,m){if(te.isUndefined(p)){if(!te.isUndefined(d))return n(void 0,d,f,m)}else return n(d,p,f,m)}function s(d,p){if(!te.isUndefined(p))return n(void 0,p)}function i(d,p){if(te.isUndefined(p)){if(!te.isUndefined(d))return n(void 0,d)}else return n(void 0,p)}function l(d,p,f){if(te.hasOwnProp(t,f))return n(d,p);if(te.hasOwnProp(e,f))return n(void 0,d)}const u={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:l,headers:(d,p,f)=>o(yb(d),yb(p),f,!0)};return te.forEach(Object.keys({...e,...t}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const f=te.hasOwnProp(u,p)?u[p]:o,m=te.hasOwnProp(e,p)?e[p]:void 0,h=te.hasOwnProp(t,p)?t[p]:void 0,v=f(m,h,p);te.isUndefined(v)&&f!==l||(r[p]=v)}),r}const ZM=["content-type","content-length"];function QM(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t).forEach(([n,o])=>{ZM.includes(n.toLowerCase())&&e.set(n,o)})}const eL=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),mw=e=>{const t=Ao({},e),r=m=>te.hasOwnProp(t,m)?t[m]:void 0,n=r("data");let o=r("withXSRFToken");const s=r("xsrfHeaderName"),i=r("xsrfCookieName");let l=r("headers");const u=r("auth"),d=r("baseURL"),p=r("allowAbsoluteUrls"),f=r("url");if(t.headers=l=vr.from(l),t.url=cw(fw(d,f,p),e.params,e.paramsSerializer),u&&l.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?eL(u.password):""))),te.isFormData(n)&&(ar.hasStandardBrowserEnv||ar.hasStandardBrowserWebWorkerEnv?l.setContentType(void 0):te.isFunction(n.getHeaders)&&QM(l,n.getHeaders(),r("formDataHeaderPolicy"))),ar.hasStandardBrowserEnv&&(te.isFunction(o)&&(o=o(t)),o===!0||o==null&&KM(t.url))){const h=s&&i&&XM.read(i);h&&l.set(s,h)}return t},tL=typeof XMLHttpRequest<"u",rL=tL&&function(e){return new Promise(function(r,n){const o=mw(e);let s=o.data;const i=vr.from(o.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:d}=o,p,f,m,h,v;function g(){h&&h(),v&&v(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function _(){if(!b)return;const x=vr.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),w={data:!l||l==="text"||l==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:x,config:e,request:b};pw(function(T){r(T),g()},function(T){n(T),g()},w),b=null}"onloadend"in b?b.onloadend=_:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))||setTimeout(_)},b.onabort=function(){b&&(n(new qe("Request aborted",qe.ECONNABORTED,e,b)),g(),b=null)},b.onerror=function(S){const w=S&&S.message?S.message:"Network Error",I=new qe(w,qe.ERR_NETWORK,e,b);I.event=S||null,n(I),g(),b=null},b.ontimeout=function(){let S=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const w=o.transitional||Ph;o.timeoutErrorMessage&&(S=o.timeoutErrorMessage),n(new qe(S,w.clarifyTimeoutError?qe.ETIMEDOUT:qe.ECONNABORTED,e,b)),g(),b=null},s===void 0&&i.setContentType(null),"setRequestHeader"in b&&te.forEach(i.toJSON(),function(S,w){b.setRequestHeader(w,S)}),te.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),l&&l!=="json"&&(b.responseType=o.responseType),d&&([m,v]=rc(d,!0),b.addEventListener("progress",m)),u&&b.upload&&([f,h]=rc(u),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(p=x=>{b&&(n(!x||x.type?new Ta(null,e,b):x),b.abort(),g(),b=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const y=WM(o.url);if(y&&!ar.protocols.includes(y)){n(new qe("Unsupported protocol "+y+":",qe.ERR_BAD_REQUEST,e));return}b.send(s||null)})},nL=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const s=function(d){if(!o){o=!0,l();const p=d instanceof Error?d:this.reason;n.abort(p instanceof qe?p:new Ta(p instanceof Error?p.message:p))}};let i=t&&setTimeout(()=>{i=null,s(new qe(`timeout of ${t}ms exceeded`,qe.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s));const{signal:u}=n;return u.unsubscribe=()=>te.asap(l),u}},oL=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},sL=async function*(e,t){for await(const r of iL(e))yield*oL(r,t)},iL=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},xb=(e,t,r,n)=>{const o=sL(e,t);let s=0,i,l=u=>{i||(i=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:d,value:p}=await o.next();if(d){l(),u.close();return}let f=p.byteLength;if(r){let m=s+=f;r(m)}u.enqueue(new Uint8Array(p))}catch(d){throw l(d),d}},cancel(u){return l(u),o.return()}},{highWaterMark:2})};function aL(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),n=e.slice(t+1);if(/;base64/i.test(r)){let i=n.length;const l=n.length;for(let h=0;h<l;h++)if(n.charCodeAt(h)===37&&h+2<l){const v=n.charCodeAt(h+1),g=n.charCodeAt(h+2);(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(i-=2,h+=2)}let u=0,d=l-1;const p=h=>h>=2&&n.charCodeAt(h-2)===37&&n.charCodeAt(h-1)===51&&(n.charCodeAt(h)===68||n.charCodeAt(h)===100);d>=0&&(n.charCodeAt(d)===61?(u++,d--):p(d)&&(u++,d-=3)),u===1&&d>=0&&(n.charCodeAt(d)===61||p(d))&&u++;const m=Math.floor(i/4)*3-(u||0);return m>0?m:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(n,"utf8");let s=0;for(let i=0,l=n.length;i<l;i++){const u=n.charCodeAt(i);if(u<128)s+=1;else if(u<2048)s+=2;else if(u>=55296&&u<=56319&&i+1<l){const d=n.charCodeAt(i+1);d>=56320&&d<=57343?(s+=4,i++):s+=3}else s+=3}return s}const Th="1.16.0",wb=64*1024,{isFunction:Za}=te,Eb=(e,...t)=>{try{return!!e(...t)}catch{return!1}},lL=e=>{const t=te.global??globalThis,{ReadableStream:r,TextEncoder:n}=t;e=te.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:s,Response:i}=e,l=o?Za(o):typeof fetch=="function",u=Za(s),d=Za(i);if(!l)return!1;const p=l&&Za(r),f=l&&(typeof n=="function"?(_=>y=>_.encode(y))(new n):async _=>new Uint8Array(await new s(_).arrayBuffer())),m=u&&p&&Eb(()=>{let _=!1;const y=new s(ar.origin,{body:new r,method:"POST",get duplex(){return _=!0,"half"}}),x=y.headers.has("Content-Type");return y.body!=null&&y.body.cancel(),_&&!x}),h=d&&p&&Eb(()=>te.isReadableStream(new i("").body)),v={stream:h&&(_=>_.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!v[_]&&(v[_]=(y,x)=>{let S=y&&y[_];if(S)return S.call(y);throw new qe(`Response type '${_}' is not supported`,qe.ERR_NOT_SUPPORT,x)})});const g=async _=>{if(_==null)return 0;if(te.isBlob(_))return _.size;if(te.isSpecCompliantForm(_))return(await new s(ar.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(te.isArrayBufferView(_)||te.isArrayBuffer(_))return _.byteLength;if(te.isURLSearchParams(_)&&(_=_+""),te.isString(_))return(await f(_)).byteLength},b=async(_,y)=>{const x=te.toFiniteNumber(_.getContentLength());return x??g(y)};return async _=>{let{url:y,method:x,data:S,signal:w,cancelToken:I,timeout:T,onDownloadProgress:R,onUploadProgress:P,responseType:$,headers:A,withCredentials:k="same-origin",fetchOptions:D,maxContentLength:z,maxBodyLength:X}=mw(_);const V=te.isNumber(z)&&z>-1,Y=te.isNumber(X)&&X>-1;let U=o||fetch;$=$?($+"").toLowerCase():"text";let F=nL([w,I&&I.toAbortSignal()],T),H=null;const ee=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let O;try{if(V&&typeof y=="string"&&y.startsWith("data:")&&aL(y)>z)throw new qe("maxContentLength size of "+z+" exceeded",qe.ERR_BAD_RESPONSE,_,H);if(Y&&x!=="get"&&x!=="head"){const J=await b(A,S);if(typeof J=="number"&&isFinite(J)&&J>X)throw new qe("Request body larger than maxBodyLength limit",qe.ERR_BAD_REQUEST,_,H)}if(P&&m&&x!=="get"&&x!=="head"&&(O=await b(A,S))!==0){let J=new s(y,{method:"POST",body:S,duplex:"half"}),K;if(te.isFormData(S)&&(K=J.headers.get("content-type"))&&A.setContentType(K),J.body){const[re,se]=bb(O,rc(_b(P)));S=xb(J.body,wb,re,se)}}te.isString(k)||(k=k?"include":"omit");const M=u&&"credentials"in s.prototype;if(te.isFormData(S)){const J=A.getContentType();J&&/^multipart\/form-data/i.test(J)&&!/boundary=/i.test(J)&&A.delete("content-type")}A.set("User-Agent","axios/"+Th,!1);const G={...D,signal:F,method:x.toUpperCase(),headers:A.normalize().toJSON(),body:S,duplex:"half",credentials:M?k:void 0};H=u&&new s(y,G);let L=await(u?U(H,D):U(y,G));if(V){const J=te.toFiniteNumber(L.headers.get("content-length"));if(J!=null&&J>z)throw new qe("maxContentLength size of "+z+" exceeded",qe.ERR_BAD_RESPONSE,_,H)}const W=h&&($==="stream"||$==="response");if(h&&L.body&&(R||V||W&&ee)){const J={};["status","statusText","headers"].forEach(ie=>{J[ie]=L[ie]});const K=te.toFiniteNumber(L.headers.get("content-length")),[re,se]=R&&bb(K,rc(_b(R),!0))||[];let Z=0;const ne=ie=>{if(V&&(Z=ie,Z>z))throw new qe("maxContentLength size of "+z+" exceeded",qe.ERR_BAD_RESPONSE,_,H);re&&re(ie)};L=new i(xb(L.body,wb,ne,()=>{se&&se(),ee&&ee()}),J)}$=$||"text";let B=await v[te.findKey(v,$)||"text"](L,_);if(V&&!h&&!W){let J;if(B!=null&&(typeof B.byteLength=="number"?J=B.byteLength:typeof B.size=="number"?J=B.size:typeof B=="string"&&(J=typeof n=="function"?new n().encode(B).byteLength:B.length)),typeof J=="number"&&J>z)throw new qe("maxContentLength size of "+z+" exceeded",qe.ERR_BAD_RESPONSE,_,H)}return!W&&ee&&ee(),await new Promise((J,K)=>{pw(J,K,{data:B,headers:vr.from(L.headers),status:L.status,statusText:L.statusText,config:_,request:H})})}catch(M){if(ee&&ee(),F&&F.aborted&&F.reason instanceof qe){const G=F.reason;throw G.config=_,H&&(G.request=H),M!==G&&(G.cause=M),G}throw M&&M.name==="TypeError"&&/Load failed|fetch/i.test(M.message)?Object.assign(new qe("Network Error",qe.ERR_NETWORK,_,H,M&&M.response),{cause:M.cause||M}):qe.from(M,M&&M.code,_,H,M&&M.response)}}},cL=new Map,hw=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:o}=t,s=[n,o,r];let i=s.length,l=i,u,d,p=cL;for(;l--;)u=s[l],d=p.get(u),d===void 0&&p.set(u,d=l?new Map:lL(t)),p=d;return d};hw();const Ih={http:IM,xhr:rL,fetch:{get:hw}};te.forEach(Ih,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Sb=e=>`- ${e}`,uL=e=>te.isFunction(e)||e===null||e===!1;function dL(e,t){e=te.isArray(e)?e:[e];const{length:r}=e;let n,o;const s={};for(let i=0;i<r;i++){n=e[i];let l;if(o=n,!uL(n)&&(o=Ih[(l=String(n)).toLowerCase()],o===void 0))throw new qe(`Unknown adapter '${l}'`);if(o&&(te.isFunction(o)||(o=o.get(t))))break;s[l||"#"+i]=o}if(!o){const i=Object.entries(s).map(([u,d])=>`adapter ${u} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=r?i.length>1?`since :
`+i.map(Sb).join(`
`):" "+Sb(i[0]):"as no adapter specified";throw new qe("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return o}const gw={getAdapter:dL,adapters:Ih};function $d(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ta(null,e)}function Cb(e){return $d(e),e.headers=vr.from(e.headers),e.data=Id.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),gw.getAdapter(e.adapter||Ra.adapter,e)(e).then(function(n){$d(e),e.response=n;try{n.data=Id.call(e,e.transformResponse,n)}finally{delete e.response}return n.headers=vr.from(n.headers),n},function(n){if(!dw(n)&&($d(e),n&&n.response)){e.response=n.response;try{n.response.data=Id.call(e,e.transformResponse,n.response)}finally{delete e.response}n.response.headers=vr.from(n.response.headers)}return Promise.reject(n)})}const mu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{mu[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Pb={};mu.transitional=function(t,r,n){function o(s,i){return"[Axios v"+Th+"] Transitional option '"+s+"'"+i+(n?". "+n:"")}return(s,i,l)=>{if(t===!1)throw new qe(o(i," has been removed"+(r?" in "+r:"")),qe.ERR_DEPRECATED);return r&&!Pb[i]&&(Pb[i]=!0,console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,i,l):!0}};mu.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function pL(e,t,r){if(typeof e!="object")throw new qe("options must be an object",qe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],i=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(i){const l=e[s],u=l===void 0||i(l,s,e);if(u!==!0)throw new qe("option "+s+" must be "+u,qe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new qe("Unknown option "+s,qe.ERR_BAD_OPTION)}}const $l={assertOptions:pL,validators:mu},Vr=$l.validators;let To=class{constructor(t){this.defaults=t||{},this.interceptors={request:new vb,response:new vb}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=(()=>{if(!o.stack)return"";const i=o.stack.indexOf(`
`);return i===-1?"":o.stack.slice(i+1)})();try{if(!n.stack)n.stack=s;else if(s){const i=s.indexOf(`
`),l=i===-1?-1:s.indexOf(`
`,i+1),u=l===-1?"":s.slice(l+1);String(n.stack).endsWith(u)||(n.stack+=`
`+s)}}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ao(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&$l.assertOptions(n,{silentJSONParsing:Vr.transitional(Vr.boolean),forcedJSONParsing:Vr.transitional(Vr.boolean),clarifyTimeoutError:Vr.transitional(Vr.boolean),legacyInterceptorReqResOrdering:Vr.transitional(Vr.boolean)},!1),o!=null&&(te.isFunction(o)?r.paramsSerializer={serialize:o}:$l.assertOptions(o,{encode:Vr.function,serialize:Vr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),$l.assertOptions(r,{baseUrl:Vr.spelling("baseURL"),withXsrfToken:Vr.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=s&&te.merge(s.common,s[r.method]);s&&te.forEach(["delete","get","head","post","put","patch","query","common"],v=>{delete s[v]}),r.headers=vr.concat(i,s);const l=[];let u=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(r)===!1)return;u=u&&g.synchronous;const b=r.transitional||Ph;b&&b.legacyInterceptorReqResOrdering?l.unshift(g.fulfilled,g.rejected):l.push(g.fulfilled,g.rejected)});const d=[];this.interceptors.response.forEach(function(g){d.push(g.fulfilled,g.rejected)});let p,f=0,m;if(!u){const v=[Cb.bind(this),void 0];for(v.unshift(...l),v.push(...d),m=v.length,p=Promise.resolve(r);f<m;)p=p.then(v[f++],v[f++]);return p}m=l.length;let h=r;for(;f<m;){const v=l[f++],g=l[f++];try{h=v(h)}catch(b){g.call(this,b);break}}try{p=Cb.call(this,h)}catch(v){return Promise.reject(v)}for(f=0,m=d.length;f<m;)p=p.then(d[f++],d[f++]);return p}getUri(t){t=Ao(this.defaults,t);const r=fw(t.baseURL,t.url,t.allowAbsoluteUrls);return cw(r,t.params,t.paramsSerializer)}};te.forEach(["delete","get","head","options"],function(t){To.prototype[t]=function(r,n){return this.request(Ao(n||{},{method:t,url:r,data:(n||{}).data}))}});te.forEach(["post","put","patch","query"],function(t){function r(n){return function(s,i,l){return this.request(Ao(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}To.prototype[t]=r(),t!=="query"&&(To.prototype[t+"Form"]=r(!0))});let fL=class vw{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(l=>{n.subscribe(l),s=l}).then(o);return i.cancel=function(){n.unsubscribe(s)},i},t(function(s,i,l){n.reason||(n.reason=new Ta(s,i,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new vw(function(o){t=o}),cancel:t}}};function mL(e){return function(r){return e.apply(null,r)}}function hL(e){return te.isObject(e)&&e.isAxiosError===!0}const Ef={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ef).forEach(([e,t])=>{Ef[t]=e});function bw(e){const t=new To(e),r=Z0(To.prototype.request,t);return te.extend(r,To.prototype,t,{allOwnKeys:!0}),te.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return bw(Ao(e,o))},r}const Dt=bw(Ra);Dt.Axios=To;Dt.CanceledError=Ta;Dt.CancelToken=fL;Dt.isCancel=dw;Dt.VERSION=Th;Dt.toFormData=fu;Dt.AxiosError=qe;Dt.Cancel=Dt.CanceledError;Dt.all=function(t){return Promise.all(t)};Dt.spread=mL;Dt.isAxiosError=hL;Dt.mergeConfig=Ao;Dt.AxiosHeaders=vr;Dt.formToJSON=e=>uw(te.isHTMLForm(e)?new FormData(e):e);Dt.getAdapter=gw.getAdapter;Dt.HttpStatusCode=Ef;Dt.default=Dt;const{Axios:Zte,AxiosError:Sf,CanceledError:Qte,isCancel:ere,CancelToken:tre,VERSION:rre,all:nre,Cancel:ore,isAxiosError:sre,spread:ire,toFormData:are,AxiosHeaders:nc,HttpStatusCode:lre,formToJSON:cre,getAdapter:ure,mergeConfig:dre,create:pre}=Dt,Rb="avalog_visitor_id",Tb=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)});let go=null;const Ib=()=>{if(go)return go;try{const e=localStorage.getItem(Rb);if(e)return go=e,e;const t=Tb();return localStorage.setItem(Rb,t),go=t,t}catch{return go||(go=Tb()),go}},gL=e=>"/api",vL=gL(),bL=["/license","/city","/mailing-view","/port-services","/additional-service-at-the-port","/carrier","/container-type","/form","/chat/widget","/rent-calculator","/international-auto"],_L=e=>{if(!e)return"";try{return new URL(e,window.location.origin).pathname.replace(/^\/api/,"")}catch{return e.replace(/^https?:\/\/[^/]+/i,"").replace(/^\/api/,"")}},_w=e=>{const t=_L(e);return bL.some(r=>t===r||t.startsWith(`${r}/`))},yL=e=>{if(e){if(e instanceof nc){e.delete("Authorization"),e.delete("authorization");return}delete e.Authorization,delete e.authorization}},yw=(e,t)=>{if(e){if(e instanceof nc){e.set("Authorization",t);return}e.Authorization=t}},je=Dt.create({baseURL:vL,headers:{"Content-Type":"application/json"}});je.interceptors.request.use(async e=>{const t=e,r=_w(t.url),n=t.skipAuth===!0||r,o=Sr.getAccessToken();return r&&yL(t.headers),!n&&o&&o.trim()!==""&&yw(t.headers,`Bearer ${o}`),t.headers instanceof nc?t.headers.set("X-Visitor-Id",Ib()):t.headers&&(t.headers["X-Visitor-Id"]=Ib()),t.data instanceof FormData&&(t.headers instanceof nc?t.headers.delete("Content-Type"):t.headers&&delete t.headers["Content-Type"]),t},e=>Promise.reject(e));let Qa=null;const xL=()=>(Qa||(Qa=Ui.refreshToken().finally(()=>{Qa=null})),Qa);je.interceptors.response.use(e=>e,async e=>{var l,u,d,p,f,m;const t=e.config,r=_w(t==null?void 0:t.url),n=(t==null?void 0:t.skipAuth)===!0||r,o=(l=e.response)==null?void 0:l.status,s=o===401&&!n,i=!!Sr.getRefreshToken()||!!localStorage.getItem("user");if(s&&!(t!=null&&t._retry)&&t&&i&&(t._retry=!0,await xL())){const v=Sr.getAccessToken();return v&&yw(t.headers,`Bearer ${v}`),je(t)}return s&&Sr.getAccessToken()&&(Sr.clearTokens(),typeof window<"u"&&window.dispatchEvent(new CustomEvent("auth:session-expired"))),console.error("вќЊ API Error:",(d=(u=e.config)==null?void 0:u.method)==null?void 0:d.toUpperCase(),(p=e.config)==null?void 0:p.url,"в†’",o??"network"),o===404&&((m=(f=e.config)==null?void 0:f.url)!=null&&m.includes("/port-services/")),Promise.reject(e)});const fre=Object.freeze(Object.defineProperty({__proto__:null,default:je},Symbol.toStringTag,{value:"Module"})),Sr={setTokens(e,t){localStorage.setItem("access_token",e),t&&localStorage.setItem("refresh_token",t)},getAccessToken(){return localStorage.getItem("access_token")},getRefreshToken(){return localStorage.getItem("refresh_token")},clearTokens(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token"),localStorage.removeItem("verification_token"),localStorage.removeItem("isAuthenticated"),localStorage.removeItem("user_email")}},xw=e=>{var t;if(e instanceof Sf){const r=(t=e.response)==null?void 0:t.data;return r&&(r.message||r.error||r.detail||(Array.isArray(r.errors)?r.errors.join(", "):""))||""}return e instanceof Error&&e.message||""},wL=(e,t)=>{const r=e.trim();return r?/already\s*exist|email.*tak|СѓР¶Рµ\s*(зарегистрирован|существует|занят)/i.test(r)?"Ртот email СѓР¶Рµ зарегистрирован. Войдите РІ существующий аккаунт или восстановите пароль через «Забыли пароль?В».":/unauthorized|bad\s*credentials|invalid\s*credentials|authentication\s*failed|user\s*not\s*found/i.test(r)?"Неверный email или пароль.":/access\s*denied|forbidden/i.test(r)?"Недостаточно прав для этого действия.":/captcha|turnstile/i.test(r)?"РќРµ удалось пройти проверку «я РЅРµ робот». Обновите страницу Рё попробуйте СЃРЅРѕРІР°.":/token.*(expired|invalid)|invalid.*token|РїСЂРѕСЃСЂРѕС‡/i.test(r)?"Ссылка недействительна или просрочена.":/[Р°-СЏС‘]/i.test(r)?r:t:t},Fn=(e,t)=>wL(xw(e),t),Ui={async login(e,t,r=!1){var o;const n=btoa(`${e}:${t}`);try{const s=await je.post("/sign-in",null,{headers:{Authorization:`Basic ${n}`},params:{rememberMe:r},skipAuth:!0});return Sr.setTokens(s.data.access_token,s.data.refresh_token),localStorage.setItem("user_email",s.data.user_name||e),localStorage.setItem("isAuthenticated","true"),{success:!0,data:s.data}}catch(s){const i=s instanceof Sf?(o=s.response)==null?void 0:o.status:void 0;return i===423?{success:!1,message:Fn(s,"Аккаунт временно заблокирован после нескольких неудачных попыток РІС…РѕРґР°. Попробуйте через 15 РјРёРЅСѓС‚ или восстановите пароль.")}:{success:!1,message:Fn(s,i===401?"Неверный email или пароль":"Ошибка РїСЂРё авторизации")}}},async register(e,t,r,n){var o;try{const s=await je.post("/sign-up",{username:e,userPassword:t,phoneNumber:r,fullName:n},{skipAuth:!0});return s.data.access_token&&Sr.setTokens(s.data.access_token,s.data.refresh_token),localStorage.setItem("user_email",s.data.user_name||e),localStorage.setItem("isAuthenticated","true"),{success:!0,data:s.data}}catch(s){const i=s instanceof Sf,l=i?(o=s.response)==null?void 0:o.status:void 0;if(i&&!s.response)return{success:!1,message:"РќРµ удалось связаться СЃ сервером. Проверьте интернет-соединение Рё попробуйте ещё раз."};const u=xw(s);if(l===409||/already\s*exist/i.test(u))return{success:!1,field:"email",message:"Ртот email СѓР¶Рµ зарегистрирован. Войдите РІ существующий аккаунт или восстановите пароль через «Забыли пароль?В»."};switch(l){case 400:case 422:return{success:!1,message:Fn(s,"Проверьте правильность полей: email РІ формате name@domain.ru, пароль РЅРµ короче 8 символов, телефон СЃ РєРѕРґРѕРј страны (+7…), Р¤РРћ полностью.")};case 429:return{success:!1,message:"Слишком РјРЅРѕРіРѕ попыток регистрации РїРѕРґСЂСЏРґ. Подождите минуту Рё попробуйте СЃРЅРѕРІР°."};case 500:case 502:case 503:case 504:return{success:!1,message:"Сервис временно недоступен. Повторите попытку через несколько РјРёРЅСѓС‚ — если ошибка РЅРµ исчезнет, напишите нам РЅР° hello@avalog.ru."};default:return{success:!1,message:Fn(s,"РќРµ удалось завершить регистрацию. Проверьте введённые данные Рё попробуйте СЃРЅРѕРІР°.")}}}},async refreshToken(){const e=Sr.getRefreshToken();try{const t=await je.post("/refresh-token",null,{headers:e?{Authorization:`Bearer ${e}`}:void 0,withCredentials:!0,skipAuth:!0});return Sr.setTokens(t.data.access_token,t.data.refresh_token),!0}catch{return!1}},async passwordResetRequest(e){return{message:(await je.post("/auth/password-reset/request",{username:e},{skipAuth:!0})).data.message||"Если пользователь существует, РїРёСЃСЊРјРѕ отправлено"}},async passwordResetConfirm(e,t){try{return{success:!0,message:(await je.post("/auth/password-reset/confirm",{token:e,newPassword:t},{skipAuth:!0})).data.message||"Пароль успешно обновлён"}}catch(r){return{success:!1,message:Fn(r,"Токен неверен или просрочен")}}},async verifyEmailConfirm(e){try{return await je.post("/auth/verify-email/confirm",{token:e},{skipAuth:!0}),{success:!0}}catch(t){return{success:!1,message:Fn(t,"Ссылка недействительна или просрочена.")}}},async verifyEmailResend(){return(await je.post("/auth/verify-email/resend")).data},async requestEmailChange(e,t){var r;try{return await je.post("/user/email/change-request",{newEmail:e,currentPassword:t}),{success:!0}}catch(n){const o=n==null?void 0:n.response,s=(r=o==null?void 0:o.data)==null?void 0:r.detail;return s==="NEW_EMAIL_TAKEN"?{success:!1,message:"Ртот email СѓР¶Рµ занят РґСЂСѓРіРёРј аккаунтом."}:s==="NEW_EMAIL_SAME_AS_CURRENT"?{success:!1,message:"Новый email совпадает СЃ текущим."}:(o==null?void 0:o.status)===401?{success:!1,message:"Текущий пароль введён неверно."}:{success:!1,message:Fn(n,"РќРµ удалось запросить смену email.")}}},async confirmEmailChange(e){try{return await je.post("/user/email/change-confirm",{token:e},{skipAuth:!0}),{success:!0}}catch(t){return{success:!1,message:Fn(t,"Ссылка недействительна или просрочена.")}}},async revokeAllSessions(){return(await je.post("/auth/sessions/revoke-all")).data},async logout(){const e=Sr.getRefreshToken();if(!e){Sr.clearTokens();return}try{await je.post("/logout",null,{headers:{Authorization:`Bearer ${e}`},skipAuth:!0})}catch{}finally{Sr.clearTokens()}}},EL={merge(){return je.post("/statistics/merge-anonymous").then(e=>e.data)}};let ln=null,eo=!1;async function ww(){if(eo)return;const e="phc_ALJZbeach8myJ85TGKZ8xReLnvb6KCWGcVzJTLTMY8Av",{default:t}=await C(async()=>{const{default:r}=await Promise.resolve().then(()=>C7);return{default:r}},void 0);ln=t,t.init(e,{api_host:"https://eu.i.posthog.com",capture_pageview:!1,capture_pageleave:!0,session_recording:{maskAllInputs:!0,maskTextSelector:"[data-ph-mask]",blockSelector:"[data-ph-block]",sampleRate:.01},loaded:r=>{},ip:!1,autocapture:!1}),eo=!0,CL()}function Ew(){return eo}function jo(e,t){eo&&ln&&ln.capture(e,t)}function Sw(e,t){!eo||!ln||ln.identify(e,t)}function Cw(){!eo||!ln||ln.reset()}const SL={"perplexity.ai":"Perplexity","chat.openai.com":"ChatGPT","chatgpt.com":"ChatGPT","claude.ai":"Claude","gemini.google.com":"Gemini","bard.google.com":"Gemini","ya.ru":"Yandex AI","yandex.ru/ai":"Yandex AI","gigachat.sber.ru":"GigaChat","gigachat.ru":"GigaChat","you.com":"You.com","phind.com":"Phind","bing.com":"Bing Copilot","copilot.microsoft.com":"Bing Copilot","poe.com":"Poe"};function CL(){if(!eo)return;const e=typeof document<"u"?document.referrer:"";if(!e)return;let t=null;for(const[r,n]of Object.entries(SL))if(e.includes(r)){t=n;break}!t||!ln||ln.capture("ai_referrer_visit",{ai_engine:t,landing_page:typeof window<"u"?window.location.pathname:"",referrer:e})}function Pw(e){eo&&ln&&ln.capture("$pageview",{$current_url:window.location.origin+e})}const PL=Object.freeze(Object.defineProperty({__proto__:null,capturePageview:Pw,capturePostHog:jo,identifyPostHog:Sw,initPostHog:ww,isPostHogActive:Ew,resetPostHog:Cw},Symbol.toStringTag,{value:"Module"})),Rw=a.createContext(void 0),RL=()=>{const e=localStorage.getItem("user");if(!e)return null;try{return JSON.parse(e)}catch{return localStorage.removeItem("user"),null}},TL=({children:e})=>{const[t,r]=a.useState(RL),[n,o]=a.useState(()=>localStorage.getItem("isAuthenticated")==="true"),s=(u,d)=>{const p={email:d.email,fullName:d.fullName||d.user_name||d.email,phone:d.phoneNumber||""};r(p),o(!0),localStorage.setItem("user",JSON.stringify(p)),localStorage.setItem("access_token",u),localStorage.setItem("isAuthenticated","true"),typeof window<"u"&&window.dispatchEvent(new CustomEvent("auth:logged-in")),EL.merge().catch(()=>{}),Sw(p.email,{fullName:p.fullName}),jo("auth_login")},i=()=>{jo("auth_logout"),Cw(),r(null),o(!1),Ui.logout().catch(()=>{}),Sr.clearTokens(),localStorage.removeItem("user")},l=async()=>{try{const u=await je.get("/user"),d=u.data.roles??[],p=u.data.tier??null;r(f=>f&&{...f,roles:d,tier:p});try{const f=localStorage.getItem("user");if(f){const m=JSON.parse(f);localStorage.setItem("user",JSON.stringify({...m,roles:d,tier:p}))}}catch{}return d}catch{return[]}};return a.useEffect(()=>{n&&(!(t!=null&&t.roles)||(t==null?void 0:t.tier)===void 0)&&l()},[n]),c.jsx(Rw.Provider,{value:{user:t,login:s,logout:i,isAuthenticated:n,refreshProfile:l},children:e})},IL={user:null,isAuthenticated:!1,login:()=>{},logout:()=>{},refreshProfile:()=>Promise.resolve([])},Ia=()=>a.useContext(Rw)??IL,$L="_authPopup_19voi_1",AL="_authPopup__content_19voi_13",jL="_authPopup__closeButton_19voi_25",OL="_authPopup__title_19voi_43",NL="_authPopup__tabs_19voi_50",DL="_authPopup__tab_19voi_50",kL="_authPopup__tabActive_19voi_70",ML="_authPopup__error_19voi_82",LL="_authPopup__success_19voi_91",zL="_authPopup__link_19voi_100",FL="_authPopup__hint_19voi_114",VL="_authPopup__fieldError_19voi_120",BL="_authPopup__inputError_19voi_128",HL="_authPopup__form_19voi_154",UL="_authPopup__formGroup_19voi_158",WL="_authPopup__input_19voi_128",qL="_authPopup__buttonsContainer_19voi_180",GL="_authPopup__rememberRow_19voi_188",KL="_authPopup__rememberLabel_19voi_192",XL="_authPopup__rememberCheckbox_19voi_204",YL="_authPopup__submitButton_19voi_224",JL="_authPopup__registerButton_19voi_224",ZL="_passwordInput_19voi_254",QL="_togglePassword_19voi_257",Ue={authPopup:$L,authPopup__content:AL,authPopup__closeButton:jL,authPopup__title:OL,authPopup__tabs:NL,authPopup__tab:DL,authPopup__tabActive:kL,authPopup__error:ML,authPopup__success:LL,authPopup__link:zL,authPopup__hint:FL,authPopup__fieldError:VL,authPopup__inputError:BL,authPopup__form:HL,authPopup__formGroup:UL,authPopup__input:WL,authPopup__buttonsContainer:qL,authPopup__rememberRow:GL,authPopup__rememberLabel:KL,authPopup__rememberCheckbox:XL,authPopup__submitButton:YL,authPopup__registerButton:JL,passwordInput:ZL,togglePassword:QL},$b={0:{label:"",color:"transparent"},1:{label:"Слабый",color:"#ff4d4f"},2:{label:"Средний",color:"#faad14"},3:{label:"Хороший",color:"#52c41a"},4:{label:"Сильный",color:"#13a10e"}},ez=e=>{let t=0;return/[a-z]/.test(e)&&t++,/[A-Z]/.test(e)&&t++,/[0-9]/.test(e)&&t++,/[^a-zA-Z0-9]/.test(e)&&t++,t},tz=e=>{if(!e)return{score:0,...$b[0]};const t=e.length,r=ez(e);let n=1;return t>=16||t>=12&&r>=3?n=4:t>=12||t>=10&&r>=3?n=3:t>=8&&r>=2?n=2:(t>=8,n=1),{score:n,...$b[n]}},rz="_strength_1iugs_1",nz="_bar_1iugs_9",oz="_segment_1iugs_15",sz="_label_1iugs_22",el={strength:rz,bar:nz,segment:oz,label:sz},iz=({password:e,theme:t="light"})=>{const{score:r,label:n,color:o}=a.useMemo(()=>tz(e),[e]),s=t==="dark"?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.08)";return c.jsxs("div",{className:el.strength,"aria-live":"polite",children:[c.jsx("div",{className:el.bar,children:[1,2,3,4].map(i=>c.jsx("div",{className:el.segment,style:{background:r>=i?o:s}},i))}),c.jsx("span",{className:el.label,style:{color:r===0?"transparent":o},children:n||"—"})]})},Ad=8,jd=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Tw=({isOpen:e,onClose:t,onSuccess:r})=>{const[n,o]=a.useState("login"),[s,i]=a.useState("login"),[l,u]=a.useState(""),[d,p]=a.useState(""),[f,m]=a.useState(""),[h,v]=a.useState(""),[g,b]=a.useState({}),[_,y]=a.useState(!1),{login:x,refreshProfile:S}=Ia(),{t:w}=ga(),I=Wm(),[T,R]=a.useState(!1),[P,$]=a.useState(!1),[A,k]=a.useState(""),[D,z]=a.useState(null),[X,V]=a.useState(!1),[Y,U]=a.useState(!1),[F,H]=a.useState(!1);a.useEffect(()=>{e&&i(n)},[e,n]);const ee=K=>{g[K]&&b(re=>({...re,[K]:void 0,_form:void 0}))},O=async K=>{K.preventDefault();const re={};if(l.trim()?jd.test(l.trim())||(re.email=w("authPopup.err.emailInvalid","Некорректный формат email")):re.email=w("authPopup.err.emailRequired","Введите email"),d||(re.password=w("authPopup.err.passwordRequired","Введите пароль")),b(re),!(Object.keys(re).length>0)){y(!0);try{const se=await Ui.login(l.trim(),d,F);if(se.success&&se.data){x(se.data.access_token,{email:l.trim(),user_name:se.data.user_name||l.trim()}),r(),t();try{const Z=await S();Z.includes("ROLE_SUPPLIER")||Z.includes("ROLE_SUPPLIER_VIEWER")?I("/supplier"):Z.includes("ROLE_ADMIN")&&I("/admin")}catch{}}else b({_form:se.message||w("authPopup.err.loginFailed","Неверный email или пароль")})}catch(se){console.error("Ошибка авторизации:",se),b({_form:(se==null?void 0:se.message)||w("authPopup.err.loginGeneric","Произошла ошибка РїСЂРё авторизации")})}finally{y(!1)}}},M=async K=>{K.preventDefault();const re={};f.trim()||(re.fullName=w("authPopup.err.fullNameRequired","Укажите Р¤РРћ")),l.trim()?jd.test(l.trim())||(re.email=w("authPopup.err.emailInvalid","Некорректный формат email")):re.email=w("authPopup.err.emailRequired","Введите email");const se=h.replace(/\D/g,"");if(h.trim()?se.length<10&&(re.phoneNumber=w("authPopup.err.phoneMin","РњРёРЅРёРјСѓРј 10 цифр")):re.phoneNumber=w("authPopup.err.phoneRequired","Укажите телефон"),d?d.length<Ad&&(re.password=w("authPopup.err.passwordMin",`РњРёРЅРёРјСѓРј ${Ad} символов`)):re.password=w("authPopup.err.passwordRequired","Введите пароль"),A?d&&d!==A&&(re.confirmPassword=w("authPopup.err.passwordMismatch","Пароли РЅРµ совпадают")):re.confirmPassword=w("authPopup.err.confirmRequired","Подтвердите пароль"),b(re),Object.keys(re).length>0)return;const Z=h.replace(/^8/,"7").replace(/^7/,"+7");y(!0);try{const ne=await Ui.register(l.trim(),d,Z,f.trim());if(ne.success&&ne.data)x(ne.data.access_token,{email:l.trim(),user_name:ne.data.user_name||l.trim(),fullName:f.trim(),phoneNumber:Z}),r(),t();else{const ie=ne.message||w("authPopup.err.registerFailed","Ошибка РїСЂРё регистрации");ne.field?b({[ne.field]:ie,_form:ie}):b({_form:ie})}}catch(ne){console.error("Ошибка регистрации:",ne),b({_form:(ne==null?void 0:ne.message)||w("authPopup.err.registerGeneric","Произошла ошибка РїСЂРё регистрации")})}finally{y(!1)}},G=()=>{u(""),p(""),m(""),v(""),k(""),b({}),R(!1),$(!1),V(!1),z(null),y(!1)},L=K=>{o(K),i(K),G()},W=async K=>{K.preventDefault();const re={};if(l.trim()?jd.test(l.trim())||(re.email=w("authPopup.err.emailInvalid","Некорректный формат email")):re.email=w("authPopup.err.emailRequired","Введите email"),b(re),!(Object.keys(re).length>0)){U(!0);try{const{message:se}=await Ui.passwordResetRequest(l.trim());V(!0),z({message:se||w("authPopup.forgot.sent","Если пользователь существует, РЅР° указанный email отправлена ссылка для СЃР±СЂРѕСЃР° пароля."),type:"success"})}catch(se){b({_form:(se==null?void 0:se.message)||w("authPopup.err.forgotFailed","РќРµ удалось отправить РїРёСЃСЊРјРѕ. Попробуйте РїРѕР·Р¶Рµ.")})}finally{U(!1)}}},B=()=>c.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:c.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})}),J=()=>c.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:c.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})});return e?c.jsx("div",{className:Ue.authPopup,children:c.jsxs("div",{className:Ue.authPopup__content,children:[c.jsx("button",{className:Ue.authPopup__closeButton,onClick:t,children:"Г—"}),s!=="forgot"&&c.jsxs("div",{className:Ue.authPopup__tabs,children:[c.jsx("button",{type:"button",className:`${Ue.authPopup__tab} ${n==="login"?Ue.authPopup__tabActive:""}`,onClick:()=>L("login"),children:w("authPopup.tab.login","Авторизация")}),c.jsx("button",{type:"button",className:`${Ue.authPopup__tab} ${n==="register"?Ue.authPopup__tabActive:""}`,onClick:()=>L("register"),children:w("authPopup.tab.register","Регистрация")})]}),s==="forgot"&&c.jsx("h2",{className:Ue.authPopup__title,children:w("authPopup.forgot.title","Восстановление пароля")}),g._form&&c.jsx("div",{className:Ue.authPopup__error,children:g._form}),D&&s==="forgot"&&c.jsx("div",{className:D.type==="success"?Ue.authPopup__success:Ue.authPopup__error,children:D.message}),s==="forgot"&&c.jsxs("form",{onSubmit:W,className:Ue.authPopup__form,children:[c.jsxs("div",{className:Ue.authPopup__formGroup,children:[c.jsx("input",{type:"email",name:"email",id:"auth-forgot-email",autoComplete:"email",inputMode:"email",spellCheck:!1,value:l,onChange:K=>{u(K.target.value),ee("email")},className:`${Ue.authPopup__input} ${g.email?Ue.authPopup__inputError:""}`,placeholder:w("authPopup.placeholder.email","Email"),disabled:Y,"aria-invalid":!!g.email}),g.email&&c.jsx("span",{className:Ue.authPopup__fieldError,children:g.email})]}),c.jsx("p",{className:Ue.authPopup__hint,children:X?w("authPopup.forgot.hintSent","РџРёСЃСЊРјРѕ СЃ ссылкой РЅР° СЃР±СЂРѕСЃ пароля отправлено. Проверьте папку «Входящие» Рё «Спам» — обычно РїСЂРёС…РѕРґРёС‚ РІ течение 1–2 РјРёРЅСѓС‚. Ссылка действительна 30 РјРёРЅСѓС‚."):w("authPopup.forgot.hint","Введите email, указанный РїСЂРё регистрации. РњС‹ отправим ссылку для СЃР±СЂРѕСЃР° пароля.")}),c.jsxs("div",{className:Ue.authPopup__buttonsContainer,children:[c.jsx("button",{type:"button",className:Ue.authPopup__registerButton,onClick:()=>{i("login"),b({}),V(!1),z(null)},disabled:Y,children:w("authPopup.back","Назад")}),c.jsx("button",{type:"submit",className:Ue.authPopup__submitButton,disabled:Y,children:Y?w("authPopup.forgot.sending","Отправка..."):X?w("authPopup.forgot.resend","Отправить ещё раз"):w("authPopup.forgot.submit","Отправить ссылку")})]})]}),s==="login"&&n==="login"&&c.jsxs("form",{onSubmit:O,className:Ue.authPopup__form,noValidate:!0,children:[c.jsxs("div",{className:Ue.authPopup__formGroup,children:[c.jsx("input",{type:"email",name:"username",id:"auth-login-email",autoComplete:"username",inputMode:"email",spellCheck:!1,value:l,onChange:K=>{u(K.target.value),ee("email")},className:`${Ue.authPopup__input} ${g.email?Ue.authPopup__inputError:""}`,placeholder:w("authPopup.placeholder.email","Email"),"aria-invalid":!!g.email,disabled:_}),g.email&&c.jsx("span",{className:Ue.authPopup__fieldError,children:g.email})]}),c.jsxs("div",{className:Ue.authPopup__formGroup,children:[c.jsxs("div",{className:Ue.passwordInput,children:[c.jsx("input",{type:T?"text":"password",name:"password",id:"auth-login-password",autoComplete:"current-password",spellCheck:!1,value:d,onChange:K=>{p(K.target.value),ee("password")},className:`${Ue.authPopup__input} ${g.password?Ue.authPopup__inputError:""}`,placeholder:w("authPopup.placeholder.password","Пароль"),"aria-invalid":!!g.password,disabled:_}),c.jsx("button",{type:"button",className:Ue.togglePassword,onClick:()=>R(!T),tabIndex:-1,children:T?c.jsx(B,{}):c.jsx(J,{})})]}),g.password&&c.jsx("span",{className:Ue.authPopup__fieldError,children:g.password}),c.jsx("button",{type:"button",className:Ue.authPopup__link,onClick:()=>{i("forgot"),b({}),z(null)},children:w("authPopup.forgotLink","Забыли пароль?")})]}),c.jsx("div",{className:Ue.authPopup__rememberRow,children:c.jsxs("label",{className:Ue.authPopup__rememberLabel,children:[c.jsx("input",{type:"checkbox",checked:F,onChange:K=>H(K.target.checked),className:Ue.authPopup__rememberCheckbox}),c.jsx("span",{children:w("authPopup.rememberMe","Запомнить меня РЅР° 90 дней")})]})}),c.jsx("div",{className:Ue.authPopup__buttonsContainer,children:c.jsx("button",{type:"submit",className:Ue.authPopup__submitButton,disabled:_,children:_?w("authPopup.signingIn","Р’С…РѕРґ..."):w("authPopup.signIn","Войти")})})]}),s==="register"&&c.jsxs("form",{onSubmit:M,className:Ue.authPopup__form,noValidate:!0,children:[c.jsxs("div",{className:Ue.authPopup__formGroup,children:[c.jsx("input",{type:"text",name:"fullName",id:"auth-register-fullname",autoComplete:"name",value:f,onChange:K=>{m(K.target.value),ee("fullName")},className:`${Ue.authPopup__input} ${g.fullName?Ue.authPopup__inputError:""}`,placeholder:w("authPopup.placeholder.fullName","Р¤РРћ"),"aria-invalid":!!g.fullName,disabled:_}),g.fullName&&c.jsx("span",{className:Ue.authPopup__fieldError,children:g.fullName})]}),c.jsxs("div",{className:Ue.authPopup__formGroup,children:[c.jsx("input",{type:"email",name:"email",id:"auth-register-email",autoComplete:"email",inputMode:"email",spellCheck:!1,value:l,onChange:K=>{u(K.target.value),ee("email")},className:`${Ue.authPopup__input} ${g.email?Ue.authPopup__inputError:""}`,placeholder:w("authPopup.placeholder.email","Email"),"aria-invalid":!!g.email,disabled:_}),g.email&&c.jsx("span",{className:Ue.authPopup__fieldError,children:g.email})]}),c.jsxs("div",{className:Ue.authPopup__formGroup,children:[c.jsx("input",{type:"tel",name:"phone",id:"auth-register-phone",autoComplete:"tel",inputMode:"tel",value:h,onChange:K=>{v(K.target.value),ee("phoneNumber")},className:`${Ue.authPopup__input} ${g.phoneNumber?Ue.authPopup__inputError:""}`,placeholder:w("authPopup.placeholder.phone","Телефон (+7 900 123 45 67)"),"aria-invalid":!!g.phoneNumber,disabled:_}),g.phoneNumber&&c.jsx("span",{className:Ue.authPopup__fieldError,children:g.phoneNumber})]}),c.jsxs("div",{className:Ue.authPopup__formGroup,children:[c.jsxs("div",{className:Ue.passwordInput,children:[c.jsx("input",{type:T?"text":"password",name:"new-password",id:"auth-register-password",autoComplete:"new-password",spellCheck:!1,value:d,onChange:K=>{p(K.target.value),ee("password")},className:`${Ue.authPopup__input} ${g.password?Ue.authPopup__inputError:""}`,placeholder:w("authPopup.placeholder.newPassword",`Пароль (РјРёРЅ. ${Ad} символов)`),"aria-invalid":!!g.password,disabled:_}),c.jsx("button",{type:"button",className:Ue.togglePassword,onClick:()=>R(!T),tabIndex:-1,children:T?c.jsx(B,{}):c.jsx(J,{})})]}),g.password&&c.jsx("span",{className:Ue.authPopup__fieldError,children:g.password}),d&&c.jsx(iz,{password:d,theme:"dark"})]}),c.jsxs("div",{className:Ue.authPopup__formGroup,children:[c.jsxs("div",{className:Ue.passwordInput,children:[c.jsx("input",{type:P?"text":"password",name:"confirm-password",id:"auth-register-confirm-password",autoComplete:"new-password",spellCheck:!1,value:A,onChange:K=>{k(K.target.value),ee("confirmPassword")},className:`${Ue.authPopup__input} ${g.confirmPassword?Ue.authPopup__inputError:""}`,placeholder:w("authPopup.placeholder.confirmPassword","Подтвердите пароль"),"aria-invalid":!!g.confirmPassword,disabled:_}),c.jsx("button",{type:"button",className:Ue.togglePassword,onClick:()=>$(!P),tabIndex:-1,children:P?c.jsx(B,{}):c.jsx(J,{})})]}),g.confirmPassword&&c.jsx("span",{className:Ue.authPopup__fieldError,children:g.confirmPassword})]}),c.jsx("div",{className:Ue.authPopup__buttonsContainer,children:c.jsx("button",{type:"submit",className:Ue.authPopup__submitButton,disabled:_,children:_?w("authPopup.registering","Регистрация..."):w("authPopup.register","Зарегистрироваться")})})]})]})}):null},mre=Object.freeze(Object.defineProperty({__proto__:null,default:Tw},Symbol.toStringTag,{value:"Module"})),hre={list(e={}){var r,n,o;const t={page:e.page??0,size:e.size??20,sort:"publishedAt,desc"};return(r=e.cityFrom)!=null&&r.trim()&&(t.cityFrom=e.cityFrom.trim()),(n=e.cityTo)!=null&&n.trim()&&(t.cityTo=e.cityTo.trim()),(o=e.cargoType)!=null&&o.trim()&&(t.cargoType=e.cargoType.trim()),je.get("/exchange/requests",{params:t}).then(s=>s.data)},get(e){return je.get(`/exchange/requests/${e}`).then(t=>t.data)},create(e){return je.post("/exchange/requests",e).then(t=>t.data)},update(e,t){return je.put(`/exchange/requests/${e}`,t).then(r=>r.data)},delete(e){return je.delete(`/exchange/requests/${e}`).then(()=>{})},publish(e){return je.post(`/exchange/requests/${e}/publish`,{}).then(t=>t.data)},cancel(e){return je.post(`/exchange/requests/${e}/cancel`,{}).then(t=>t.data)},award(e,t){return je.post(`/exchange/requests/${e}/award/${t}`,{}).then(r=>r.data)},listMine(e=0,t=20){return je.get("/exchange/my-requests",{params:{page:e,size:t,sort:"createdAt,desc"}}).then(r=>r.data)},placeBid(e,t){return je.post(`/exchange/requests/${e}/bids`,t).then(r=>r.data)},updateBid(e,t){return je.put(`/exchange/bids/${e}`,t).then(r=>r.data)},withdrawBid(e){return je.post(`/exchange/bids/${e}/withdraw`,{}).then(t=>t.data)},extendBid(e,t){return je.post(`/exchange/bids/${e}/extend`,{validUntil:t}).then(r=>r.data)},listBids(e){return je.get(`/exchange/requests/${e}/bids`).then(t=>t.data)},listMyBids(e=0,t=20){return je.get("/exchange/my-bids",{params:{page:e,size:t,sort:"createdAt,desc"}}).then(r=>r.data)},listQuestions(e){return je.get(`/exchange/requests/${e}/questions`).then(t=>t.data)},askQuestion(e,t){return je.post(`/exchange/requests/${e}/questions`,{text:t}).then(r=>r.data)},answerQuestion(e,t){return je.post(`/exchange/questions/${e}/answer`,{text:t}).then(r=>r.data)},deleteQuestion(e){return je.delete(`/exchange/questions/${e}`).then(()=>{})},getReputation(e){return je.get(`/exchange/suppliers/${e}/reputation`).then(t=>t.data)},watch(e){return je.post(`/exchange/requests/${e}/watch`,{}).then(t=>t.data)},unwatch(e){return je.delete(`/exchange/requests/${e}/watch`).then(t=>t.data)},isWatching(e){return je.get(`/exchange/requests/${e}/watch`).then(t=>t.data)},listWatching(e=0,t=20){return je.get("/exchange/watching",{params:{page:e,size:t,sort:"createdAt,desc"}}).then(r=>r.data)},clone(e){return je.post(`/exchange/requests/${e}/clone`,{}).then(t=>t.data)},proposeCounterOffer(e,t,r){return je.post(`/exchange/bids/${e}/counter`,{requestedPriceUsd:t,message:r}).then(n=>n.data)},acceptCounterOffer(e){return je.post(`/exchange/counter-offers/${e}/accept`,{}).then(t=>t.data)},rejectCounterOffer(e){return je.post(`/exchange/counter-offers/${e}/reject`,{}).then(t=>t.data)},listCounterOffers(e){return je.get(`/exchange/bids/${e}/counter-offers`).then(t=>t.data)}},gre={stats(e,t){const r={};return e&&(r.since=e),t&&(r.until=t),je.get("/admin/exchange/stats",{params:r}).then(n=>n.data)}},vre={stats(e,t=10){const r={topLimit:t};return e&&(r.since=e),je.get("/admin/exchange/chat/moderation/stats",{params:r}).then(n=>n.data)},messages(e,t=!0,r=0,n=20){const o={onlySanitized:t,page:r,size:n};return e&&(o.since=e),je.get("/admin/exchange/chat/moderation/messages",{params:o}).then(s=>s.data)}},az={send(e,t){return je.post(`/exchange/requests/${e}/messages`,{text:t}).then(r=>r.data)},list(e){return je.get(`/exchange/requests/${e}/messages`).then(t=>t.data)},markRead(e){return je.post(`/exchange/requests/${e}/messages/mark-read`).then(()=>{})},unreadCounts(){return je.get("/exchange/chat/unread-counts").then(e=>e.data)}},bre={upload(e,t){const r=new FormData;return r.append("file",t),je.post(`/exchange/bids/${e}/attachments`,r,{headers:{"Content-Type":"multipart/form-data"}}).then(n=>n.data)},list(e){return je.get(`/exchange/bids/${e}/attachments`).then(t=>t.data)},async download(e){const t=await je.get(`/exchange/attachments/${e}/download`,{responseType:"blob"}),r=t.headers["content-disposition"]??"",n=/filename="?([^";]+)"?/i.exec(r);return{blob:t.data,filename:(n==null?void 0:n[1])??`attachment-${e}`}},delete(e){return je.delete(`/exchange/attachments/${e}`).then(()=>{})}},_re={stats(){return je.get("/exchange/public-stats").then(e=>e.data)}},Es={list(e={}){const t={page:e.page??0,size:e.size??30,unreadOnly:e.unreadOnly??!1};return je.get("/me/notifications",{params:t}).then(r=>r.data)},unreadCount(){return je.get("/me/notifications/unread-count").then(e=>e.data)},markRead(e){return je.post(`/me/notifications/${e}/read`).then(()=>{})},markAllRead(){return je.post("/me/notifications/read-all").then(e=>e.data)}};function lz(e){if(e.relatedEntityType&&e.relatedEntityId!=null)switch(e.relatedEntityType){case"Application":return`/personal-account?applicationId=${e.relatedEntityId}`;case"InvoiceDocument":case"Invoice":return`/personal-account?invoiceId=${e.relatedEntityId}`;case"Contract":return`/personal-account?contractId=${e.relatedEntityId}`;case"CustomsShipment":return`/lk/customs?shipmentId=${e.relatedEntityId}`;default:return null}return null}const cz=6e4,uz=()=>{const e=Wm(),[t,r]=a.useState(0),[n,o]=a.useState([]),[s,i]=a.useState(!1),[l,u]=a.useState(!1),d=a.useCallback(()=>{Es.unreadCount().then(g=>r(g.unread)).catch(()=>{})},[]),p=a.useCallback(()=>{i(!0),Es.list({page:0,size:5}).then(o).catch(()=>{}).finally(()=>i(!1))},[]);a.useEffect(()=>{d();const g=setInterval(()=>{typeof document<"u"&&document.visibilityState!=="visible"||d()},cz),b=()=>{document.visibilityState==="visible"&&d()};return document.addEventListener("visibilitychange",b),()=>{clearInterval(g),document.removeEventListener("visibilitychange",b)}},[d]),a.useEffect(()=>{if(typeof document>"u")return;const g=_=>_.replace(/^\(\d+\)\s*/,""),b=g(document.title||"Avalog");return document.title=t>0?`(${t}) ${b}`:b,()=>{typeof document<"u"&&(document.title=g(document.title))}},[t]);const f=g=>{u(g),g&&p()},m=async g=>{if(!g.readAt)try{await Es.markRead(g.id),r(_=>Math.max(0,_-1)),o(_=>_.map(y=>y.id===g.id?{...y,readAt:new Date().toISOString()}:y))}catch{}const b=lz(g);b&&(u(!1),e(b))},h=async()=>{try{await Es.markAllRead(),r(0),o(g=>g.map(b=>({...b,readAt:new Date().toISOString()})))}catch{}},v=c.jsxs("div",{style:{width:360,maxHeight:480,overflow:"hidden",display:"flex",flexDirection:"column",background:"#fff",borderRadius:8,boxShadow:"0 6px 20px rgba(0,0,0,0.16)"},children:[c.jsxs("div",{style:{padding:"10px 14px",borderBottom:"1px solid #f0f0f0",display:"flex",justifyContent:"space-between",alignItems:"center",gap:8},children:[c.jsx(Jn.Text,{strong:!0,children:"Уведомления"}),t>0&&c.jsx(Wl,{size:"small",type:"link",onClick:h,style:{padding:0},children:"Прочитать РІСЃРµ"})]}),c.jsx("div",{style:{flex:1,overflowY:"auto",padding:4},children:s?c.jsx("div",{style:{textAlign:"center",padding:24},children:c.jsx(wh,{})}):n.length===0?c.jsx(uv,{image:uv.PRESENTED_IMAGE_SIMPLE,description:"Нет уведомлений",style:{padding:16}}):c.jsx(hf,{size:"small",dataSource:n,renderItem:g=>c.jsx(hf.Item,{onClick:()=>m(g),style:{cursor:"pointer",background:g.readAt?"transparent":"rgba(24,144,255,0.06)",padding:"10px 14px",borderBottom:"1px solid #fafafa"},children:c.jsxs(au,{direction:"vertical",size:2,style:{width:"100%"},children:[c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:8},children:[c.jsx(Jn.Text,{strong:!0,style:{fontSize:13},children:g.subject||g.eventCode}),c.jsx(Jn.Text,{type:"secondary",style:{fontSize:11},children:hx(g.sentAt).format("DD.MM HH:mm")})]}),g.body&&c.jsx(Jn.Text,{type:"secondary",style:{fontSize:12,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:g.body})]})},g.id)})}),c.jsx("div",{style:{padding:"8px 14px",borderTop:"1px solid #f0f0f0",textAlign:"center"},children:c.jsx(Wl,{type:"link",size:"small",onClick:()=>{u(!1),e("/notifications")},children:"Р’СЃРµ уведомления в†’"})})]});return c.jsx(H0,{open:l,onOpenChange:f,trigger:["click"],placement:"bottomRight",popupRender:()=>v,children:c.jsx(Bo,{title:"Уведомления",children:c.jsx("span",{style:{display:"inline-flex",cursor:"pointer",padding:"0 6px"},children:c.jsx(Xl,{count:t,size:"small",offset:[-2,4],children:c.jsx("span",{style:{fontSize:20,lineHeight:1},children:"рџ””"})})})})})},Iw='"Inter Variable", "Manrope Variable", system-ui, sans-serif',dz={algorithm:[Bx.defaultAlgorithm],token:{colorPrimary:"#047857",colorLink:"#047857",colorLinkHover:"#065F46",colorTextBase:"#0F172A",colorBgBase:"#FFFFFF",borderRadius:10,controlHeight:44,fontFamily:Iw}},pz={algorithm:[Bx.darkAlgorithm],token:{colorPrimary:"#10B981",colorLink:"#34D399",colorLinkHover:"#6EE7B7",colorTextBase:"#E8EDEA",colorBgBase:"#07120D",colorBgContainer:"#0D1F17",colorTextPlaceholder:"#5F756B",borderRadius:10,controlHeight:44,fontFamily:Iw},components:{Input:{colorText:"#E8EDEA"},Select:{colorText:"#E8EDEA"}}},fz=e=>e==="dark"?pz:dz,$w="avalog-theme",Aw=a.createContext(null);function mz(){if(typeof window>"u")return"light";try{const e=window.localStorage.getItem($w);if(e==="light"||e==="dark")return e}catch{}return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function hz({children:e,locale:t}){const[r,n]=a.useState(mz);a.useEffect(()=>{const l=document.documentElement;l.classList.toggle("dark",r==="dark"),l.setAttribute("data-theme",r);try{window.localStorage.setItem($w,r)}catch{}},[r]);const o=a.useCallback(l=>n(l),[]),s=a.useCallback(()=>n(l=>l==="dark"?"light":"dark"),[]),i=a.useMemo(()=>({mode:r,setMode:o,toggle:s}),[r,o,s]);return c.jsx(Aw.Provider,{value:i,children:c.jsx(_A,{theme:fz(r),locale:t,children:e})})}function gz(){const e=a.useContext(Aw);if(!e)throw new Error("useTheme must be used within <ThemeProvider>");return e}function Ab({className:e}){const{mode:t,toggle:r}=gz(),n=t==="dark";return c.jsx("button",{type:"button",onClick:r,"aria-label":n?"Светлая тема":"Тёмная тема",title:n?"Светлая тема":"Тёмная тема",className:e,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:36,height:36,borderRadius:"var(--radius-md, 10px)",border:"1px solid var(--color-border, #e2e8f0)",background:"var(--color-bg-elevated, #fff)",color:"var(--color-text-muted, #475569)",cursor:"pointer"},children:n?c.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("circle",{cx:"12",cy:"12",r:"4"}),c.jsx("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"})]}):c.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:c.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})})}const vz=[{code:"ru",label:"RU"},{code:"en",label:"EN"},{code:"zho",label:"ZH"},{code:"tr",label:"TR"},{code:"hi",label:"HI"}],jb=(e,t)=>{const r=((e==null?void 0:e.trim())||(t==null?void 0:t.trim())||"Профиль").trim();return r.length>20?r.slice(0,19)+"…":r};function bz(){var I,T,R;const{i18n:e}=ga(),[t,r]=a.useState(!1),[n,o]=a.useState(()=>e.resolvedLanguage??e.language??"ru"),[s,i]=a.useState(!1),[l,u]=a.useState(!1),{isAuthenticated:d,user:p}=Ia(),f=((I=p==null?void 0:p.roles)==null?void 0:I.some(P=>P==="ROLE_SUPPLIER"||P==="ROLE_SUPPLIER_VIEWER"))??!1,m=((T=p==null?void 0:p.roles)==null?void 0:T.includes("ROLE_ADMIN"))??!1,h=((R=p==null?void 0:p.roles)==null?void 0:R.includes("ROLE_SALES_STAFF"))??!1,v=Wm(),[g,b]=a.useState(0);a.useEffect(()=>{if(!d){b(0);return}let P=!1;const $=()=>{az.unreadCounts().then(k=>{P||b(Object.values(k).reduce((D,z)=>D+z,0))}).catch(()=>{P||b(0)})};$();const A=window.setInterval($,6e4);return()=>{P=!0,window.clearInterval(A)}},[d]);const _=a.useRef(null),y=P=>{e.changeLanguage(P),o(P),r(!1),typeof document<"u"&&(document.documentElement.lang=P)},x=()=>{r(!t)};a.useEffect(()=>{if(!t)return;const P=A=>{_.current&&!_.current.contains(A.target)&&r(!1)},$=A=>{A.key==="Escape"&&r(!1)};return document.addEventListener("mousedown",P),document.addEventListener("keydown",$),()=>{document.removeEventListener("mousedown",P),document.removeEventListener("keydown",$)}},[t]),a.useEffect(()=>{const P=()=>i(!0);return window.addEventListener("auth:session-expired",P),()=>window.removeEventListener("auth:session-expired",P)},[]);const S=P=>{P.preventDefault(),d?v("/Profile",{state:{section:"profile"}}):i(!0)},w=()=>{i(!1),v("/Profile")};return c.jsxs(a.Fragment,{children:[c.jsx("div",{className:"header",children:c.jsxs("div",{className:"header_wrapper",children:[c.jsxs("div",{className:"main_container",children:[c.jsxs("div",{className:"header_left",children:[c.jsx(Ot,{to:"/",className:"logo_link",children:c.jsx("div",{className:"logo"})}),c.jsxs("div",{className:"header_nav-left",children:[c.jsx(Ot,{to:"/",className:"nav-link calculator-link header-nav-link",children:"Калькулятор"}),c.jsx(Ot,{to:d?"/exchange":"/exchange/about",className:"nav-link header-nav-link",children:c.jsx(Xl,{count:g,size:"small",offset:[6,-2],style:{backgroundColor:"#f5222d"},children:c.jsx("span",{children:"Биржа"})})}),d&&c.jsx(Ot,{to:"/exchange/watching",className:"nav-link header-nav-link",children:"в… Рзбранное"})]})]}),c.jsxs("div",{className:"header_right",children:[c.jsxs("div",{className:"header_nav-right",children:[d&&c.jsx(uz,{}),c.jsx(Ot,{to:"/plans",className:"nav-link header-nav-link",children:"Тарифы"}),c.jsx(Ot,{to:"/contacts",className:"nav-link header-nav-link",children:"Контакты"}),f&&c.jsx(Ot,{to:"/supplier",className:"nav-link header-nav-link",children:"Кабинет поставщика"}),m&&c.jsx(Ot,{to:"/admin",className:"nav-link header-nav-link",children:"РђРґРјРёРЅ-панель"}),h&&c.jsx(Ot,{to:"/lk/sales/leads",className:"nav-link header-nav-link",children:"Лиды"}),d?c.jsxs("button",{className:"login-button header-nav-login header-nav-login--authed",onClick:P=>{P.preventDefault(),v("/Profile",{state:{section:"profile"}})},title:(p==null?void 0:p.email)??void 0,children:[c.jsx("span",{className:"user-icon user-icon--authed","aria-hidden":!0}),c.jsx("span",{className:"header-user-name",children:jb(p==null?void 0:p.fullName,p==null?void 0:p.email)})]}):c.jsxs("button",{className:"login-button header-nav-login",onClick:S,children:[c.jsx("span",{className:"user-icon"}),"Войти"]})]}),c.jsxs("div",{className:"contact_item",children:[c.jsx("div",{className:"contact_icon phone_icon"}),c.jsx("a",{href:"tel:+74999488801",className:"contact_text",children:"+7 499 948-88-01"})]}),c.jsxs("div",{className:"contact_item",children:[c.jsx("div",{className:"contact_icon email_icon"}),c.jsx("a",{href:"mailto:info@avalog.ru",className:"contact_text",children:"info@avalog.ru"})]}),c.jsx(Ab,{className:"header-theme-toggle"}),c.jsxs("div",{className:"language_selector",ref:_,children:[c.jsxs("button",{type:"button",className:"language_selector__trigger",onClick:x,"aria-haspopup":"listbox","aria-expanded":t,"aria-controls":"header-language-listbox","aria-label":`Текущий язык: ${n.toUpperCase()}. Открыть выбор языка`,style:{background:"transparent",border:0,padding:0,color:"inherit",font:"inherit",cursor:"pointer",display:"flex",alignItems:"center",gap:8},children:[c.jsx("span",{className:"language_icon","aria-hidden":"true"}),c.jsx("span",{className:"language_text",children:n.toUpperCase()})]}),t&&c.jsx("ul",{id:"header-language-listbox",className:"language_dropdown",role:"listbox","aria-label":"Выберите язык",style:{listStyle:"none",margin:0,padding:0},children:vz.map(P=>c.jsx("li",{role:"option","aria-selected":n===P.code,className:"language_option",onClick:()=>y(P.code),onKeyDown:$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),y(P.code))},tabIndex:0,children:P.label},P.code))})]}),c.jsxs("button",{className:"mobile-menu-toggle",onClick:()=>u(!l),"aria-label":"Меню",children:[c.jsx("span",{className:`burger-line ${l?"active":""}`}),c.jsx("span",{className:`burger-line ${l?"active":""}`}),c.jsx("span",{className:`burger-line ${l?"active":""}`})]})]})]}),c.jsxs("div",{className:`navigation-container ${l?"mobile-open":""}`,children:[c.jsx("div",{className:"nav-item nav-item--theme",children:c.jsx(Ab,{className:"header-theme-toggle"})}),c.jsx(Ot,{to:"/contacts",className:"nav-item",onClick:()=>u(!1),children:c.jsx("span",{className:"nav-link",children:"Контакты"})}),c.jsx(Ot,{to:"/plans",className:"nav-item",onClick:()=>u(!1),children:c.jsx("span",{className:"nav-link",children:"Тарифы"})}),c.jsx(Ot,{to:"/",className:"nav-item",onClick:()=>u(!1),children:c.jsx("span",{className:"nav-link calculator-link",children:"Калькулятор"})}),c.jsx(Ot,{to:d?"/exchange":"/exchange/about",className:"nav-item",onClick:()=>u(!1),children:c.jsx("span",{className:"nav-link",children:c.jsx(Xl,{count:g,size:"small",offset:[6,-2],style:{backgroundColor:"#f5222d"},children:c.jsx("span",{children:"Биржа"})})})}),f&&c.jsx(Ot,{to:"/supplier",className:"nav-item",onClick:()=>u(!1),children:c.jsx("span",{className:"nav-link",children:"Кабинет поставщика"})}),m&&c.jsx(Ot,{to:"/admin",className:"nav-item",onClick:()=>u(!1),children:c.jsx("span",{className:"nav-link",children:"РђРґРјРёРЅ-панель"})}),h&&c.jsx(Ot,{to:"/lk/sales/leads",className:"nav-item",onClick:()=>u(!1),children:c.jsx("span",{className:"nav-link",children:"Лиды"})}),d?c.jsx("div",{className:"nav-item",children:c.jsxs("button",{className:"login-button login-button--authed",onClick:P=>{P.preventDefault(),u(!1),v("/Profile",{state:{section:"profile"}})},title:(p==null?void 0:p.email)??void 0,children:[c.jsx("span",{className:"user-icon user-icon--authed","aria-hidden":!0}),c.jsx("span",{className:"header-user-name",children:jb(p==null?void 0:p.fullName,p==null?void 0:p.email)})]})}):c.jsx("div",{className:"nav-item",children:c.jsxs("button",{className:"login-button",onClick:P=>{P.preventDefault(),u(!1),S(P)},children:[c.jsx("span",{className:"user-icon"}),"Войти"]})})]})]})}),c.jsx(Tw,{isOpen:s,onClose:()=>i(!1),onSuccess:w})]})}const Ob={async getWelcomeMessage(){const e=await je.get("/welcome-message",{responseType:"text"});return typeof e.data=="string"?e.data:""},async getManagerMessage(){const e=await je.get("/manager-message",{responseType:"text"});return typeof e.data=="string"?e.data:""}},jw="avalog_attribution",_z=30,yz=_z*24*60*60*1e3,xz=e=>{const t=new URLSearchParams(e);return{utmSource:t.get("utm_source"),utmMedium:t.get("utm_medium"),utmCampaign:t.get("utm_campaign"),utmTerm:t.get("utm_term"),utmContent:t.get("utm_content")}},Ow=()=>{try{const e=localStorage.getItem(jw)??sessionStorage.getItem(Nw);if(!e)return null;const t=JSON.parse(e);return typeof(t==null?void 0:t._capturedAtEpoch)!="number"||Date.now()-t._capturedAtEpoch>yz?null:t}catch{return null}},Nw="avalog_attribution_session",wz=e=>{const t=JSON.stringify(e);try{localStorage.setItem(jw,t)}catch{}try{sessionStorage.setItem(Nw,t)}catch{}},Ez=()=>{if(typeof window>"u"||typeof localStorage>"u"||Ow())return;const r={...xz(window.location.search),referrer:document.referrer||null,landingUrl:window.location.href,capturedAt:new Date().toISOString(),_capturedAtEpoch:Date.now()};wz(r)},Dw=()=>{const e=Ow();return e?{utmSource:e.utmSource,utmMedium:e.utmMedium,utmCampaign:e.utmCampaign,utmTerm:e.utmTerm,utmContent:e.utmContent,referrer:e.referrer,landingUrl:e.landingUrl,capturedAt:e.capturedAt}:null},yre=e=>{const t=Dw();if(!t)return;const r=(t.utmSource??"").toLowerCase(),n=(t.utmMedium??"").toLowerCase();(r==="yandex"||r==="ya")&&n==="cpc"&&C(async()=>{const{capturePostHog:s}=await Promise.resolve().then(()=>PL);return{capturePostHog:s}},void 0).then(({capturePostHog:s})=>{s("yd_conversion",{campaign_id:t.utmCampaign??null,ad_group:t.utmContent??null,keyword:t.utmTerm??null,form_name:e})}).catch(()=>{})},Sz={async createSession(){const t=(await je.post("/chat/session",{},{skipAuth:!0})).data,r=String((t==null?void 0:t.id)??(t==null?void 0:t.sessionId)??""),n=String((t==null?void 0:t.sessionKey)??"");return{id:r,sessionKey:n}},async sendMessage(e,t,r){const o=(await je.post(`/chat/${e}/message`,{text:r,sender:"client"},{params:{key:t},skipAuth:!0})).data;return(o==null?void 0:o.text)??(o==null?void 0:o.message)??(o==null?void 0:o.response)??""},async widgetReply(e){const t={...e,attribution:e.attribution??Dw()};return(await je.post("/chat/widget/reply",t,{skipAuth:!0})).data},getLkThreads(e=50){return je.get("/chat/lk/threads",{params:{limit:e}}).then(t=>t.data??[])},getLkMessages(e,t=100){return je.get(`/chat/lk/${e}/messages`,{params:{limit:t}}).then(r=>r.data??[])},postLkMessage(e,t){return je.post(`/chat/lk/${e}/message`,{text:t.text,sender:t.sender}).then(r=>r.data)}},Cz="_fab_15u6a_1",Pz="_panel_15u6a_29",Rz="_panelHeader_15u6a_57",Tz="_closeBtn_15u6a_67",Iz="_messages_15u6a_81",$z="_loading_15u6a_88",Az="_error_15u6a_89",jz="_empty_15u6a_90",Oz="_messageUser_15u6a_107",Nz="_messageBot_15u6a_108",Dz="_messageText_15u6a_132",kz="_inputRow_15u6a_138",Mz="_input_15u6a_138",Lz="_sendBtn_15u6a_171",xr={fab:Cz,panel:Pz,panelHeader:Rz,closeBtn:Tz,messages:Iz,loading:$z,error:Az,empty:jz,messageUser:Oz,messageBot:Nz,messageText:Dz,inputRow:kz,input:Mz,sendBtn:Lz},Od="Добро пожаловать! Задайте РІРѕРїСЂРѕСЃ — РјС‹ ответим РІ чате.",zz=()=>{const[e,t]=a.useState(!1),[r,n]=a.useState([]),[o,s]=a.useState(null),[i,l]=a.useState(""),[u,d]=a.useState(!1),[p,f]=a.useState(!1),[m,h]=a.useState(null),v=a.useRef(null),g=()=>{var y;return(y=v.current)==null?void 0:y.scrollIntoView({behavior:"smooth"})};a.useEffect(()=>{g()},[r]),a.useEffect(()=>{if(!e)return;d(!0),h(null),n([]),s(null),(async()=>{var S;if(!!!((S=Sr.getAccessToken())!=null&&S.trim())){n([{role:"system",text:Od}]),d(!1);return}try{const[w,I]=await Promise.allSettled([Ob.getWelcomeMessage(),Ob.getManagerMessage()]),T=w.status==="fulfilled"?w.value:"",R=I.status==="fulfilled"?I.value:"",P=[];T&&P.push({role:"system",text:T}),R&&P.push({role:"system",text:R}),P.length===0&&P.push({role:"system",text:Od}),n(P)}catch{n([{role:"system",text:Od}])}finally{d(!1)}})()},[e]);const b=async()=>{const y=i.trim();if(!(!y||p)){l(""),n(x=>[...x,{role:"user",text:y}]),f(!0);try{const x=r.filter(w=>w.role==="user"||w.role==="bot").map(w=>({role:w.role==="user"?"user":"assistant",content:w.text})),S=await Sz.widgetReply({message:y,sessionId:o??void 0,history:x.length?x:void 0});S.sessionId&&s(S.sessionId),n(w=>[...w,{role:"bot",text:S.reply||"(нет ответа)"}])}catch{n(x=>[...x,{role:"bot",text:"Ошибка отправки. Попробуйте РїРѕР·Р¶Рµ."}])}finally{f(!1)}}},_=y=>{y.key==="Enter"&&!y.shiftKey&&(y.preventDefault(),b())};return c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",className:xr.fab,onClick:()=>t(y=>!y),"aria-label":"Открыть чат",children:c.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),e&&c.jsxs("div",{className:xr.panel,children:[c.jsxs("div",{className:xr.panelHeader,children:[c.jsx("span",{children:"Чат"}),c.jsx("button",{type:"button",className:xr.closeBtn,onClick:()=>t(!1),"aria-label":"Закрыть",children:"Г—"})]}),c.jsxs("div",{className:xr.messages,children:[u&&c.jsx("div",{className:xr.loading,children:"Загрузка..."}),m&&c.jsx("div",{className:xr.error,children:m}),!u&&!m&&c.jsxs(c.Fragment,{children:[r.map((y,x)=>c.jsx("div",{className:y.role==="user"?xr.messageUser:xr.messageBot,children:c.jsx("div",{className:xr.messageText,children:y.text})},x)),r.length===0&&c.jsx("div",{className:xr.empty,children:"Нет сообщений"}),c.jsx("div",{ref:v})]})]}),!u&&!m&&c.jsxs("div",{className:xr.inputRow,children:[c.jsx("input",{type:"text",className:xr.input,placeholder:"Введите сообщение...",value:i,onChange:y=>l(y.target.value),onKeyDown:_,disabled:p}),c.jsx("button",{type:"button",className:xr.sendBtn,onClick:b,disabled:p||!i.trim(),"aria-label":"Отправить",children:"Отправить"})]})]})]})},Cf="Avalog",Al="Avalog — онлайн-расчёт стоимости международной доставки РіСЂСѓР·РѕРІ: РјРѕСЂСЃРєРёРµ, Р¶/Рґ, авто, авиа Рё мультимодальные перевозки.",Zn="https://avalog.ru",Fz=`${Zn}/og-image.jpg`,Zr=(e,t,r,n)=>({"@context":"https://schema.org","@type":"Service",name:t,serviceType:e,description:r,provider:{"@type":"Organization",name:"Avalog",url:Zn},areaServed:[{"@type":"Country",name:"Р РѕСЃСЃРёСЏ"},{"@type":"Country",name:"Китай"},{"@type":"Country",name:"Корея"},{"@type":"Country",name:"Вьетнам"}],availableLanguage:["ru","en","zh"],url:`${Zn}${n}`}),Nb={"/":{title:"Калькулятор стоимости доставки РіСЂСѓР·РѕРІ | Avalog",description:"Рассчитайте стоимость международной доставки Р·Р° минуту: РјРѕСЂСЃРєРёРµ, Р¶/Рґ, авто, авиа, мультимодальные маршруты. Прозрачные тарифы перевозчиков.",jsonLd:{"@context":"https://schema.org","@type":"WebApplication",name:"Avalog — калькулятор тарифов",description:"Онлайн-калькулятор стоимости международной перевозки РіСЂСѓР·РѕРІ: морем, РїРѕ Р¶/Рґ, авто Рё авиа. Расчёт занимает менее минуты.",url:Zn,applicationCategory:"BusinessApplication",operatingSystem:"All",offers:{"@type":"Offer",price:"0",priceCurrency:"RUB"},provider:{"@type":"Organization",name:"Avalog",url:Zn}}},"/about":{title:"Транспортные услуги Avalog — РѕР±Р·РѕСЂ направлений",description:"Полный спектр транспортных услуг: РјРѕСЂСЃРєРёРµ контейнерные перевозки, Р¶/Рґ, авто, авиа, мультимодальная логистика, аренда контейнеров, таможенное оформление."},"/o-kompanii":{title:"Рћ компании Avalog — международная логистика",description:"Avalog — международный логистический оператор СЃ собственным IT-калькулятором тарифов перевозчиков. Рстория, команда, география работы."},"/Main":{title:"Avalog — главная страница",description:Al},"/railway":{title:"Железнодорожные перевозки РіСЂСѓР·РѕРІ | Avalog",description:"Контейнерные Р¶/Рґ перевозки РёР· Китая, Кореи, Юго-Восточной РђР·РёРё РІ Р РѕСЃСЃРёСЋ Рё РЎРќР“. Прямые поезда Рё комбинированные маршруты.",jsonLd:Zr("Железнодорожные перевозки","Железнодорожные перевозки РіСЂСѓР·РѕРІ — Avalog","Контейнерные Р¶/Рґ перевозки РёР· Китая, Кореи, Юго-Восточной РђР·РёРё РІ Р РѕСЃСЃРёСЋ Рё РЎРќР“. Прямые поезда Рё комбинированные маршруты.","/railway")},"/marineservice":{title:"РњРѕСЂСЃРєРёРµ контейнерные перевозки РіСЂСѓР·РѕРІ | Avalog",description:"РњРѕСЂСЃРєРёРµ перевозки FCL Рё LCL РёР· портов Китая, Кореи, Вьетнама, РРЅРґРёРё. Расчёт фрахта, Р±СѓРєРёРЅРі, экспедирование РІ порту.",jsonLd:Zr("РњРѕСЂСЃРєРёРµ контейнерные перевозки","РњРѕСЂСЃРєРёРµ перевозки FCL/LCL — Avalog","РњРѕСЂСЃРєРёРµ перевозки FCL Рё LCL РёР· портов Китая, Кореи, Вьетнама, РРЅРґРёРё. Расчёт фрахта, Р±СѓРєРёРЅРі, экспедирование РІ порту.","/marineservice")},"/reviews":{title:"Отзывы клиентов Avalog — реальные оценки доставок",description:"Реальные отзывы клиентов Рѕ доставке РіСЂСѓР·РѕРІ через Avalog. Только подтверждённые заявки, оценки 4в… Рё выше, открытые комментарии Рё ответы перевозчиков.",jsonLd:Zr("Отзывы клиентов","Отзывы клиентов Avalog","Реальные отзывы клиентов Рѕ доставке РіСЂСѓР·РѕРІ через Avalog: РјРѕСЂСЃРєРёРµ, Р¶/Рґ, авто, авиа маршруты СЃ открытыми комментариями.","/reviews")},"/exchange/about":{title:"Биржа грузоперевозок Avalog — открытые маршруты Рё аукционы",description:"Открытая Р±РёСЂР¶Р° логистических заявок Рё предложений. Клиенты публикуют маршруты, поставщики делают ставки. Прозрачные цены, без скрытых наценок.",jsonLd:Zr("Биржа грузоперевозок","Биржа грузоперевозок — Avalog","Открытая площадка тендеров РЅР° грузоперевозки. Sealed-bid между клиентами Рё проверенными поставщиками.","/exchange/about")},"/exchange":{title:"Биржа заявок — открытые тендеры РЅР° грузоперевозки | Avalog",description:"Живая лента тендеров РЅР° грузоперевозки. Sealed-bid Рё open аукционы между клиентами Рё проверенными поставщиками. Прозрачные цены, без скрытых наценок.",jsonLd:Zr("Биржа тендеров","Биржа тендеров РЅР° грузоперевозки — Avalog","Живая лента тендеров: фильтр РїРѕ РіРѕСЂРѕРґСѓ отправления Рё назначения, типу РіСЂСѓР·Р°. Подача ставок поставщиками, выбор победителя клиентом.","/exchange")},"/autotransport":{title:"Автоперевозки РіСЂСѓР·РѕРІ | Avalog",description:"Международные Рё внутренние автоперевозки: тенты, рефрижераторы, контейнеровозы. Прямая Рё сборная доставка РїРѕ Р РѕСЃСЃРёРё Рё РЎРќР“.",jsonLd:Zr("Автоперевозки","Автоперевозки РіСЂСѓР·РѕРІ — Avalog","Международные Рё внутренние автоперевозки: тенты, рефрижераторы, контейнеровозы. Прямая Рё сборная доставка РїРѕ Р РѕСЃСЃРёРё Рё РЎРќР“.","/autotransport")},"/airtransportations":{title:"Авиаперевозки РіСЂСѓР·РѕРІ | Avalog",description:"Грузовые авиаперевозки: срочная доставка, ценные Рё С…СЂСѓРїРєРёРµ РіСЂСѓР·С‹, негабарит. Расчёт стоимости Рё таможенное оформление.",jsonLd:Zr("Авиаперевозки","Грузовые авиаперевозки — Avalog","Грузовые авиаперевозки: срочная доставка, ценные Рё С…СЂСѓРїРєРёРµ РіСЂСѓР·С‹, негабарит. Расчёт стоимости Рё таможенное оформление.","/airtransportations")},"/groupagecargo":{title:"Сборные РіСЂСѓР·С‹ (LCL) — международная доставка | Avalog",description:"Сборные РіСЂСѓР·С‹ РёР· Китая Рё Юго-Восточной РђР·РёРё: морем, поездом, автомобилем. Расчёт стоимости РїРѕ весу Рё объёму, консолидация РЅР° складе отправителя.",jsonLd:Zr("Сборные РіСЂСѓР·С‹ LCL","Сборные РіСЂСѓР·С‹ (LCL) — Avalog","Сборные РіСЂСѓР·С‹ РёР· Китая Рё Юго-Восточной РђР·РёРё: морем, поездом, автомобилем. Расчёт стоимости РїРѕ весу Рё объёму, консолидация РЅР° складе отправителя.","/groupagecargo")},"/successstories":{title:"Кейсы Avalog — реальные истории доставки",description:"Реальные кейсы доставки наших клиентов: сложные маршруты, негабарит, рефрижераторные Рё опасные РіСЂСѓР·С‹, taможенные нестандарт-кейсы."},"/contacts":{title:"Контакты Avalog — офис РІ РњРѕСЃРєРІРµ, телефон, email",description:"Свяжитесь СЃ Avalog: +7 499 948-88-01, info@avalog.ru. Офис: 117105, Рі. РњРѕСЃРєРІР°, С€. Варшавское, Рґ. 1Рђ, РїРѕРј. Р—Рљ/IРџ.",jsonLd:{"@context":"https://schema.org","@type":"LocalBusiness",name:"Avalog",image:`${Zn}/og-image.jpg`,url:`${Zn}/contacts`,telephone:"+7-499-948-88-01",email:"info@avalog.ru",priceRange:"$$",address:{"@type":"PostalAddress",streetAddress:"Варшавское шоссе, 1Рђ, РїРѕРј. Р—Рљ/IРџ",addressLocality:"РњРѕСЃРєРІР°",postalCode:"117105",addressCountry:"RU"},geo:{"@type":"GeoCoordinates",latitude:55.6371,longitude:37.6178},openingHours:"Mo-Fr 09:00-18:00",areaServed:[{"@type":"Country",name:"Р РѕСЃСЃРёСЏ"},{"@type":"Country",name:"Китай"},{"@type":"Country",name:"Корея"},{"@type":"Country",name:"Вьетнам"},{"@type":"Country",name:"Беларусь"},{"@type":"Country",name:"Казахстан"}]}},"/vacancies":{title:"Вакансии Avalog — работа РІ международной логистике",description:"Открытые вакансии Avalog: логисты, менеджеры РїРѕ продажам, операторы, разработчики. Работа РІ международной логистической компании."},"/privacy-policy":{title:"Политика конфиденциальности | Avalog",description:"Политика обработки персональных данных пользователей сайта Avalog."},"/multimodal":{title:"Мультимодальные перевозки — РјРѕСЂРµ + Р¶/Рґ + авто | Avalog",description:"Мультимодальные маршруты: комбинация РјРѕСЂСЃРєРёС…, Р¶/Рґ Рё автомобильных плеч РІ РѕРґРЅРѕР№ поставке. Оптимальная стоимость Рё СЃСЂРѕРє.",jsonLd:Zr("Мультимодальные перевозки","Мультимодальные перевозки — Avalog","Мультимодальные маршруты: комбинация РјРѕСЂСЃРєРёС…, Р¶/Рґ Рё автомобильных плеч РІ РѕРґРЅРѕР№ поставке.","/multimodal")},"/faq":{title:"Часто задаваемые РІРѕРїСЂРѕСЃС‹ | Avalog",description:"Ответы РЅР° частые РІРѕРїСЂРѕСЃС‹ Рѕ международной доставке РіСЂСѓР·РѕРІ: документы, таможня, СЃСЂРѕРєРё, расчёт стоимости, страхование.",jsonLd:{"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"Сколько идёт контейнер 40HQ РёР· Шанхая РІ РњРѕСЃРєРІСѓ?",acceptedAnswer:{"@type":"Answer",text:"Обычно 30–45 дней (морем РґРѕ Дальневосточного порта + Р¶/Рґ РґРѕ РњРѕСЃРєРІС‹). Точный СЃСЂРѕРє зависит РѕС‚ линии перевозки Рё расписания."}},{"@type":"Question",name:"Какие документы РЅСѓР¶РЅС‹ для импорта РіСЂСѓР·Р° РёР· Китая?",acceptedAnswer:{"@type":"Answer",text:"Внешнеторговый контракт, РёРЅРІРѕР№СЃ, упаковочный лист, коносамент/CMR/Р¶/Рґ накладная, сертификаты соответствия Рё декларация РЅР° товары."}},{"@type":"Question",name:"РњРѕР¶РЅРѕ ли застраховать РіСЂСѓР·?",acceptedAnswer:{"@type":"Answer",text:"Да — страховка оформляется дополнительно Рє перевозке. Стоимость зависит РѕС‚ заявленной стоимости РіСЂСѓР·Р° Рё маршрута."}},{"@type":"Question",name:"Avalog работает СЃ физическими лицами?",acceptedAnswer:{"@type":"Answer",text:"Преимущественно B2B: импортёры, оптовики, продавцы маркетплейсов. Запросы РѕС‚ физических лиц рассматриваем индивидуально."}}]}},"/customsservices":{title:"Таможенное оформление Рё брокерские услуги | Avalog",description:"Таможенное оформление импорта Рё экспорта, классификация РўРќ Р’РР”, РїРѕРґР±РѕСЂ РєРѕРґРѕРІ, сертификация, брокерское сопровождение.",jsonLd:Zr("Таможенное оформление","Таможенное оформление Рё брокерские услуги — Avalog","Таможенное оформление импорта Рё экспорта, классификация РўРќ Р’РР”, сертификация, брокерское сопровождение.","/customsservices")},"/containerrental":{title:"Аренда контейнеров — 20DV, 40HC, рефрижераторы | Avalog",description:"Аренда РјРѕСЂСЃРєРёС… контейнеров для перевозки Рё хранения: стандартные, high-cube, рефрижераторы, open-top, flat-rack.",jsonLd:Zr("Аренда контейнеров","Аренда РјРѕСЂСЃРєРёС… контейнеров — Avalog","Аренда контейнеров для перевозки Рё хранения: стандартные, high-cube, рефрижераторы, open-top, flat-rack.","/containerrental")},"/blog":{title:"Блог Avalog — статьи Рѕ международной логистике",description:"Статьи Рѕ логистике: тарифы, маршруты, таможенные правила, новости рынка контейнерных перевозок Рё международной торговли."}},Vz=new Set(["/Profile","/Dashboard","/reset-password","/order-details/:id","/search-results","/mailing-view/:token","/ktk"]),Bz=e=>{if(e in Nb)return{...Nb[e],pathForCanonical:e};if(e.startsWith("/blog/"))return{title:"Статья блога | Avalog",description:Al,pathForCanonical:e};const t=Vz.has(e),r=e.startsWith("/order-details/")||e.startsWith("/mailing-view/");return t||r?{title:`${Cf}`,description:Al,pathForCanonical:e,noindex:!0}:{title:`${Cf}`,description:Al,pathForCanonical:e,noindex:!0}},Nd={SITE_NAME:Cf,SITE_URL:Zn,OG_IMAGE_DEFAULT:Fz},Hz=()=>{const{pathname:e}=Xr(),t=Bz(e),r=`${Nd.SITE_URL}${t.pathForCanonical}`,n=t.ogImage??Nd.OG_IMAGE_DEFAULT,o=!t.noindex;return c.jsxs(g1,{children:[c.jsx("title",{children:t.title}),c.jsx("meta",{name:"description",content:t.description}),c.jsx("link",{rel:"canonical",href:r}),t.noindex&&c.jsx("meta",{name:"robots",content:"noindex,nofollow"}),o&&c.jsx("link",{rel:"alternate",hrefLang:"ru",href:r}),o&&c.jsx("link",{rel:"alternate",hrefLang:"en",href:`${r}?lng=en`}),o&&c.jsx("link",{rel:"alternate",hrefLang:"zh",href:`${r}?lng=zho`}),o&&c.jsx("link",{rel:"alternate",hrefLang:"x-default",href:r}),c.jsx("meta",{property:"og:type",content:"website"}),c.jsx("meta",{property:"og:site_name",content:Nd.SITE_NAME}),c.jsx("meta",{property:"og:title",content:t.title}),c.jsx("meta",{property:"og:description",content:t.description}),c.jsx("meta",{property:"og:url",content:r}),c.jsx("meta",{property:"og:image",content:n}),c.jsx("meta",{property:"og:locale",content:"ru_RU"}),c.jsx("meta",{property:"og:locale:alternate",content:"en_US"}),c.jsx("meta",{property:"og:locale:alternate",content:"zh_CN"}),c.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),c.jsx("meta",{name:"twitter:title",content:t.title}),c.jsx("meta",{name:"twitter:description",content:t.description}),c.jsx("meta",{name:"twitter:image",content:n}),o&&t.jsonLd&&c.jsx("script",{type:"application/ld+json",children:JSON.stringify(t.jsonLd)})]})},Uz=["shanghai-moskva","guangzhou-moskva","shenzhen-moskva","beijing-moskva","tianjin-moskva","istanbul-moskva","shanghai-sankt-peterburg","guangzhou-sankt-peterburg","mumbai-moskva","busan-vladivostok"];function kw(){if(typeof window>"u"||!("requestIdleCallback"in window))return!1;const t=navigator.connection;return!(t!=null&&t.saveData||(t==null?void 0:t.effectiveType)==="2g"||(t==null?void 0:t.effectiveType)==="slow-2g")}function Wz(){if(!kw())return;const e=[()=>C(()=>import("./AboutCompany-AlPLsdQe.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),()=>C(()=>import("./ContactsPage-CScl0iTu.js"),__vite__mapDeps([12,1,2,3,4,5,6,7,8,9,10,13])),()=>C(()=>import("./Blog-BlNXZpxp.js"),__vite__mapDeps([14,1,15,16,17,5,2,3,4,6,7,8,9,10,18])),()=>C(()=>import("./FAQPage-DipjWvEu.js"),__vite__mapDeps([19,1,2,3,4,5,6,7,8,9,10,20])),()=>C(()=>import("./MainPage-CZ34bfkF.js"),__vite__mapDeps([21,1,17,5,8,4,9,10,22])),()=>C(()=>import("./MultiModal-BiYc4wZi.js"),__vite__mapDeps([23,1,5,17,8,4,9,10,24]))];let t=0;const r=n=>{if(t>=e.length)return;const o=e[t++];if(o().catch(()=>{}),n&&n.timeRemaining()>50&&t<e.length){r(n);return}t<e.length&&window.requestIdleCallback(r,{timeout:5e3})};window.requestIdleCallback(r,{timeout:5e3})}function qz(){kw()&&window.requestIdleCallback(()=>{Promise.all([C(()=>Promise.resolve().then(()=>yte),void 0),C(()=>import("./routePairApi-mM6by2Lg.js"),__vite__mapDeps([25,8,1,4,5,9,10]))]).then(([{queryClient:e},{routePairApi:t}])=>{for(const r of Uz)e.prefetchQuery({queryKey:["routePairDetail",r],queryFn:()=>t.detail(r),staleTime:5*6e4})}).catch(()=>{})},{timeout:8e3})}const Gz=()=>{const{pathname:e}=Xr();return a.useEffect(()=>{window.scrollTo(0,0)},[e]),a.useEffect(()=>{Wz(),qz()},[]),a.useLayoutEffect(()=>{const t=()=>{const r=document.querySelector(".header"),n=r?Math.ceil(r.getBoundingClientRect().height):80;document.documentElement.style.setProperty("--header-offset",`${n}px`)};return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e]),c.jsxs(c.Fragment,{children:[c.jsx(Hz,{}),c.jsx("div",{className:"background-image"}),c.jsxs("div",{className:"w-full",children:[c.jsx(bz,{}),c.jsx("div",{className:"content-wrapper",children:c.jsx("div",{className:"content",children:c.jsx($$,{})})})]}),c.jsx(zz,{})]})};/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mw=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Kz=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Xz=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase());/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Db=e=>{const t=Xz(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var Dd={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Yz=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Jz=a.createContext({}),Zz=()=>a.useContext(Jz),Qz=a.forwardRef(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:n,className:o="",children:s,iconNode:i,...l},u)=>{const{size:d=24,strokeWidth:p=2,absoluteStrokeWidth:f=!1,color:m="currentColor",className:h=""}=Zz()??{},v=n??f?Number(r??p)*24/Number(t??d):r??p;return a.createElement("svg",{ref:u,...Dd,width:t??d??Dd.width,height:t??d??Dd.height,stroke:e??m,strokeWidth:v,className:Mw("lucide",h,o),...!s&&!Yz(l)&&{"aria-hidden":"true"},...l},[...i.map(([g,b])=>a.createElement(g,b)),...Array.isArray(s)?s:[s]])});/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ft=(e,t)=>{const r=a.forwardRef(({className:n,...o},s)=>a.createElement(Qz,{ref:s,iconNode:t,className:Mw(`lucide-${Kz(Db(e))}`,`lucide-${e}`,n),...o}));return r.displayName=Db(e),r};/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const e2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Lw=Ft("arrow-right",e2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const t2=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],r2=Ft("bell-ring",t2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const n2=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],kb=Ft("bell",n2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const o2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],$h=Ft("check",o2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const s2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ah=Ft("chevron-down",s2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const i2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],a2=Ft("chevron-right",i2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const l2=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],c2=Ft("chevron-up",l2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const u2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],d2=Ft("circle-question-mark",u2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const p2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],zw=Ft("circle",p2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const f2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Mb=Ft("clock",f2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const m2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],h2=Ft("info",m2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const g2=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],v2=Ft("layers",g2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const b2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Lb=Ft("loader-circle",b2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _2=[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]],y2=Ft("log-in",_2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const x2=[["path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z",key:"1v9wt8"}]],w2=Ft("plane",x2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const E2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],S2=Ft("search",E2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const C2=[["path",{d:"M12 10.189V14",key:"1p8cqu"}],["path",{d:"M12 2v3",key:"qbqxhf"}],["path",{d:"M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6",key:"qpkstq"}],["path",{d:"M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76",key:"7tigtc"}],["path",{d:"M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1924j5"}]],P2=Ft("ship",C2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const R2=[["rect",{width:"16",height:"16",x:"4",y:"3",rx:"2",key:"1wxw4b"}],["path",{d:"M4 11h16",key:"mpoxn0"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"m8 19-2 3",key:"13i0xs"}],["path",{d:"m18 22-2-3",key:"1p0ohu"}],["path",{d:"M8 15h.01",key:"a7atzg"}],["path",{d:"M16 15h.01",key:"rnfrdf"}]],T2=Ft("tram-front",R2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const I2=[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]],$2=Ft("truck",I2);/**
* @license lucide-react v1.16.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const A2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],jh=Ft("x",A2),j2=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},O2=(e,t)=>({classGroupId:e,validator:t}),Fw=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),oc="-",zb=[],N2="arbitrary..",D2=e=>{const t=M2(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return k2(i);const l=i.split(oc),u=l[0]===""&&l.length>1?1:0;return Vw(l,u,t)},getConflictingClassGroupIds:(i,l)=>{if(l){const u=n[i],d=r[i];return u?d?j2(d,u):u:d||zb}return r[i]||zb}}},Vw=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],s=r.nextPart.get(o);if(s){const d=Vw(e,t+1,s);if(d)return d}const i=r.validators;if(i===null)return;const l=t===0?e.join(oc):e.slice(t).join(oc),u=i.length;for(let d=0;d<u;d++){const p=i[d];if(p.validator(l))return p.classGroupId}},k2=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?N2+n:void 0})(),M2=e=>{const{theme:t,classGroups:r}=e;return L2(r,t)},L2=(e,t)=>{const r=Fw();for(const n in e){const o=e[n];Oh(o,r,n,t)}return r},Oh=(e,t,r,n)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];z2(i,t,r,n)}},z2=(e,t,r,n)=>{if(typeof e=="string"){F2(e,t,r);return}if(typeof e=="function"){V2(e,t,r,n);return}B2(e,t,r,n)},F2=(e,t,r)=>{const n=e===""?t:Bw(t,e);n.classGroupId=r},V2=(e,t,r,n)=>{if(H2(e)){Oh(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(O2(r,e))},B2=(e,t,r,n)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[l,u]=o[i];Oh(u,Bw(t,l),r,n)}},Bw=(e,t)=>{let r=e;const n=t.split(oc),o=n.length;for(let s=0;s<o;s++){const i=n[s];let l=r.nextPart.get(i);l||(l=Fw(),r.nextPart.set(i,l)),r=l}return r},H2=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,U2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(s,i)=>{r[s]=i,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let i=r[s];if(i!==void 0)return i;if((i=n[s])!==void 0)return o(s,i),i},set(s,i){s in r?r[s]=i:o(s,i)}}},Pf="!",Fb=":",W2=[],Vb=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),q2=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let i=0,l=0,u=0,d;const p=o.length;for(let g=0;g<p;g++){const b=o[g];if(i===0&&l===0){if(b===Fb){s.push(o.slice(u,g)),u=g+1;continue}if(b==="/"){d=g;continue}}b==="["?i++:b==="]"?i--:b==="("?l++:b===")"&&l--}const f=s.length===0?o:o.slice(u);let m=f,h=!1;f.endsWith(Pf)?(m=f.slice(0,-1),h=!0):f.startsWith(Pf)&&(m=f.slice(1),h=!0);const v=d&&d>u?d-u:void 0;return Vb(s,h,m,v)};if(t){const o=t+Fb,s=n;n=i=>i.startsWith(o)?s(i.slice(o.length)):Vb(W2,!1,i,void 0,!0)}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},G2=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let s=0;s<r.length;s++){const i=r[s],l=i[0]==="[",u=t.has(i);l||u?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(i)):o.push(i)}return o.length>0&&(o.sort(),n.push(...o)),n}},K2=e=>({cache:U2(e.cacheSize),parseClassName:q2(e),sortModifiers:G2(e),postfixLookupClassGroupIds:X2(e),...D2(e)}),X2=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let n=0;n<r.length;n++)t[r[n]]=!0;return t},Y2=/\s+/,J2=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s,postfixLookupClassGroupIds:i}=t,l=[],u=e.trim().split(Y2);let d="";for(let p=u.length-1;p>=0;p-=1){const f=u[p],{isExternal:m,modifiers:h,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:b}=r(f);if(m){d=f+(d.length>0?" "+d:d);continue}let _=!!b,y;if(_){const T=g.substring(0,b);y=n(T);const R=y&&i[y]?n(g):void 0;R&&R!==y&&(y=R,_=!1)}else y=n(g);if(!y){if(!_){d=f+(d.length>0?" "+d:d);continue}if(y=n(g),!y){d=f+(d.length>0?" "+d:d);continue}_=!1}const x=h.length===0?"":h.length===1?h[0]:s(h).join(":"),S=v?x+Pf:x,w=S+y;if(l.indexOf(w)>-1)continue;l.push(w);const I=o(y,_);for(let T=0;T<I.length;++T){const R=I[T];l.push(S+R)}d=f+(d.length>0?" "+d:d)}return d},Z2=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Hw(r))&&(o&&(o+=" "),o+=n);return o},Hw=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Hw(e[n]))&&(r&&(r+=" "),r+=t);return r},Q2=(e,...t)=>{let r,n,o,s;const i=u=>{const d=t.reduce((p,f)=>f(p),e());return r=K2(d),n=r.cache.get,o=r.cache.set,s=l,l(u)},l=u=>{const d=n(u);if(d)return d;const p=J2(u,r);return o(u,p),p};return s=i,(...u)=>s(Z2(...u))},eF=[],Bt=e=>{const t=r=>r[e]||eF;return t.isThemeGetter=!0,t},Uw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ww=/^\((?:(\w[\w-]*):)?(.+)\)$/i,tF=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,rF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nF=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,oF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,sF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vn=e=>tF.test(e),ot=e=>!!e&&!Number.isNaN(Number(e)),fn=e=>!!e&&Number.isInteger(Number(e)),kd=e=>e.endsWith("%")&&ot(e.slice(0,-1)),Rn=e=>rF.test(e),qw=()=>!0,aF=e=>nF.test(e)&&!oF.test(e),Nh=()=>!1,lF=e=>sF.test(e),cF=e=>iF.test(e),uF=e=>!Ve(e)&&!He(e),dF=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),pF=e=>no(e,Xw,Nh),Ve=e=>Uw.test(e),vo=e=>no(e,Yw,aF),Bb=e=>no(e,yF,ot),fF=e=>no(e,Zw,qw),mF=e=>no(e,Jw,Nh),Hb=e=>no(e,Gw,Nh),hF=e=>no(e,Kw,cF),tl=e=>no(e,Qw,lF),He=e=>Ww.test(e),_i=e=>Ho(e,Yw),gF=e=>Ho(e,Jw),Ub=e=>Ho(e,Gw),vF=e=>Ho(e,Xw),bF=e=>Ho(e,Kw),rl=e=>Ho(e,Qw,!0),_F=e=>Ho(e,Zw,!0),no=(e,t,r)=>{const n=Uw.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Ho=(e,t,r=!1)=>{const n=Ww.exec(e);return n?n[1]?t(n[1]):r:!1},Gw=e=>e==="position"||e==="percentage",Kw=e=>e==="image"||e==="url",Xw=e=>e==="length"||e==="size"||e==="bg-size",Yw=e=>e==="length",yF=e=>e==="number",Jw=e=>e==="family-name",Zw=e=>e==="number"||e==="weight",Qw=e=>e==="shadow",xF=()=>{const e=Bt("color"),t=Bt("font"),r=Bt("text"),n=Bt("font-weight"),o=Bt("tracking"),s=Bt("leading"),i=Bt("breakpoint"),l=Bt("container"),u=Bt("spacing"),d=Bt("radius"),p=Bt("shadow"),f=Bt("inset-shadow"),m=Bt("text-shadow"),h=Bt("drop-shadow"),v=Bt("blur"),g=Bt("perspective"),b=Bt("aspect"),_=Bt("ease"),y=Bt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...S(),He,Ve],I=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],R=()=>[He,Ve,u],P=()=>[Vn,"full","auto",...R()],$=()=>[fn,"none","subgrid",He,Ve],A=()=>["auto",{span:["full",fn,He,Ve]},fn,He,Ve],k=()=>[fn,"auto",He,Ve],D=()=>["auto","min","max","fr",He,Ve],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...R()],Y=()=>[Vn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],U=()=>[Vn,"screen","full","dvw","lvw","svw","min","max","fit",...R()],F=()=>[Vn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],H=()=>[e,He,Ve],ee=()=>[...S(),Ub,Hb,{position:[He,Ve]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",vF,pF,{size:[He,Ve]}],G=()=>[kd,_i,vo],L=()=>["","none","full",d,He,Ve],W=()=>["",ot,_i,vo],B=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[ot,kd,Ub,Hb],re=()=>["","none",v,He,Ve],se=()=>["none",ot,He,Ve],Z=()=>["none",ot,He,Ve],ne=()=>[ot,He,Ve],ie=()=>[Vn,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Rn],breakpoint:[Rn],color:[qw],container:[Rn],"drop-shadow":[Rn],ease:["in","out","in-out"],font:[uF],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Rn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Rn],shadow:[Rn],spacing:["px",ot],text:[Rn],"text-shadow":[Rn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Vn,Ve,He,b]}],container:["container"],"container-type":[{"@container":["","normal","size",He,Ve]}],"container-named":[dF],columns:[{columns:[ot,Ve,He,l]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[fn,"auto",He,Ve]}],basis:[{basis:[Vn,"full","auto",l,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ot,Vn,"auto","initial","none",Ve]}],grow:[{grow:["",ot,He,Ve]}],shrink:[{shrink:["",ot,He,Ve]}],order:[{order:[fn,"first","last","none",He,Ve]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mbs:[{mbs:V()}],mbe:[{mbe:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...F()]}],"min-block-size":[{"min-block":["auto",...F()]}],"max-block-size":[{"max-block":["none",...F()]}],w:[{w:[l,"screen",...Y()]}],"min-w":[{"min-w":[l,"screen","none",...Y()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",r,_i,vo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,_F,fF]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kd,Ve]}],"font-family":[{font:[gF,mF,t]}],"font-features":[{"font-features":[Ve]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,He,Ve]}],"line-clamp":[{"line-clamp":[ot,"none",He,Bb]}],leading:[{leading:[s,...R()]}],"list-image":[{"list-image":["none",He,Ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",He,Ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:[ot,"from-font","auto",He,vo]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[ot,"auto",He,Ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"tab-size":[{tab:[fn,He,Ve]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",He,Ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",He,Ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},fn,He,Ve],radial:["",He,Ve],conic:[fn,He,Ve]},bF,hF]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-bs":[{"border-bs":W()}],"border-w-be":[{"border-be":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...B(),"hidden","none"]}],"divide-style":[{divide:[...B(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-bs":[{"border-bs":H()}],"border-color-be":[{"border-be":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...B(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ot,He,Ve]}],"outline-w":[{outline:["",ot,_i,vo]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",p,rl,tl]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",f,rl,tl]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[ot,vo]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",m,rl,tl]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[ot,He,Ve]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ot]}],"mask-image-linear-from-pos":[{"mask-linear-from":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[He,Ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[ot]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",He,Ve]}],filter:[{filter:["","none",He,Ve]}],blur:[{blur:re()}],brightness:[{brightness:[ot,He,Ve]}],contrast:[{contrast:[ot,He,Ve]}],"drop-shadow":[{"drop-shadow":["","none",h,rl,tl]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",ot,He,Ve]}],"hue-rotate":[{"hue-rotate":[ot,He,Ve]}],invert:[{invert:["",ot,He,Ve]}],saturate:[{saturate:[ot,He,Ve]}],sepia:[{sepia:["",ot,He,Ve]}],"backdrop-filter":[{"backdrop-filter":["","none",He,Ve]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[ot,He,Ve]}],"backdrop-contrast":[{"backdrop-contrast":[ot,He,Ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ot,He,Ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ot,He,Ve]}],"backdrop-invert":[{"backdrop-invert":["",ot,He,Ve]}],"backdrop-opacity":[{"backdrop-opacity":[ot,He,Ve]}],"backdrop-saturate":[{"backdrop-saturate":[ot,He,Ve]}],"backdrop-sepia":[{"backdrop-sepia":["",ot,He,Ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",He,Ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ot,"initial",He,Ve]}],ease:[{ease:["linear","initial",_,He,Ve]}],delay:[{delay:[ot,He,Ve]}],animate:[{animate:["none",y,He,Ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,He,Ve]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:ne()}],"skew-x":[{"skew-x":ne()}],"skew-y":[{"skew-y":ne()}],transform:[{transform:[He,Ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],zoom:[{zoom:[fn,He,Ve]}],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",He,Ve]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":H()}],"scrollbar-track-color":[{"scrollbar-track":H()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",He,Ve]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[ot,_i,vo,Bb]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},wF=Q2(xF);function ve(...e){return wF(ae(e))}function EF(e,t){const r=a.createContext(t),n=s=>{const{children:i,...l}=s,u=a.useMemo(()=>l,Object.values(l));return c.jsx(r.Provider,{value:u,children:i})};n.displayName=e+"Provider";function o(s){const i=a.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function Xt(e,t=[]){let r=[];function n(s,i){const l=a.createContext(i),u=r.length;r=[...r,i];const d=f=>{var _;const{scope:m,children:h,...v}=f,g=((_=m==null?void 0:m[e])==null?void 0:_[u])||l,b=a.useMemo(()=>v,Object.values(v));return c.jsx(g.Provider,{value:b,children:h})};d.displayName=s+"Provider";function p(f,m){var g;const h=((g=m==null?void 0:m[e])==null?void 0:g[u])||l,v=a.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[d,p]}const o=()=>{const s=r.map(i=>a.createContext(i));return function(l){const u=(l==null?void 0:l[e])||s;return a.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[n,SF(o,...t)]}function SF(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=n.reduce((l,{useScope:u,scopeName:d})=>{const f=u(s)[`__scope${d}`];return{...l,...f}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Wb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _r(...e){return t=>{let r=!1;const n=e.map(o=>{const s=Wb(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():Wb(e[o],null)}}}}function tt(...e){return a.useCallback(_r(...e),e)}function qb(e){const t=CF(e),r=a.forwardRef((n,o)=>{const{children:s,...i}=n,l=a.Children.toArray(s),u=l.find(RF);if(u){const d=u.props.children,p=l.map(f=>f===u?a.Children.count(d)>1?a.Children.only(null):a.isValidElement(d)?d.props.children:null:f);return c.jsx(t,{...i,ref:o,children:a.isValidElement(d)?a.cloneElement(d,void 0,p):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function CF(e){const t=a.forwardRef((r,n)=>{const{children:o,...s}=r;if(a.isValidElement(o)){const i=IF(o),l=TF(s,o.props);return o.type!==a.Fragment&&(l.ref=n?_r(n,i):i),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var PF=Symbol("radix.slottable");function RF(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===PF}function TF(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...l)=>{const u=s(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function IF(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function hu(e){const t=e+"CollectionProvider",[r,n]=Xt(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:b,children:_}=g,y=N.useRef(null),x=N.useRef(new Map).current;return c.jsx(o,{scope:b,itemMap:x,collectionRef:y,children:_})};i.displayName=t;const l=e+"CollectionSlot",u=qb(l),d=N.forwardRef((g,b)=>{const{scope:_,children:y}=g,x=s(l,_),S=tt(b,x.collectionRef);return c.jsx(u,{ref:S,children:y})});d.displayName=l;const p=e+"CollectionItemSlot",f="data-radix-collection-item",m=qb(p),h=N.forwardRef((g,b)=>{const{scope:_,children:y,...x}=g,S=N.useRef(null),w=tt(b,S),I=s(p,_);return N.useEffect(()=>(I.itemMap.set(S,{ref:S,...x}),()=>void I.itemMap.delete(S))),c.jsx(m,{[f]:"",ref:w,children:y})});h.displayName=p;function v(g){const b=s(e+"CollectionConsumer",g);return N.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((I,T)=>x.indexOf(I.ref.current)-x.indexOf(T.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:d,ItemSlot:h},v,n]}function Ie(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var kt=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},$F=qm[" useInsertionEffect ".trim().toString()]||kt;function Tr({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,i]=AF({defaultProp:t,onChange:r}),l=e!==void 0,u=l?e:o;{const p=a.useRef(e!==void 0);a.useEffect(()=>{const f=p.current;f!==l&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=l},[l,n])}const d=a.useCallback(p=>{var f;if(l){const m=jF(p)?p(e):p;m!==e&&((f=i.current)==null||f.call(i,m))}else s(p)},[l,e,s,i]);return[u,d]}function AF({defaultProp:e,onChange:t}){const[r,n]=a.useState(e),o=a.useRef(r),s=a.useRef(t);return $F(()=>{s.current=t},[t]),a.useEffect(()=>{var i;o.current!==r&&((i=s.current)==null||i.call(s,r),o.current=r)},[r,o]),[r,n,s]}function jF(e){return typeof e=="function"}function OF(e){const t=NF(e),r=a.forwardRef((n,o)=>{const{children:s,...i}=n,l=a.Children.toArray(s),u=l.find(kF);if(u){const d=u.props.children,p=l.map(f=>f===u?a.Children.count(d)>1?a.Children.only(null):a.isValidElement(d)?d.props.children:null:f);return c.jsx(t,{...i,ref:o,children:a.isValidElement(d)?a.cloneElement(d,void 0,p):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function NF(e){const t=a.forwardRef((r,n)=>{const{children:o,...s}=r;if(a.isValidElement(o)){const i=LF(o),l=MF(s,o.props);return o.type!==a.Fragment&&(l.ref=n?_r(n,i):i),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var DF=Symbol("radix.slottable");function kF(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===DF}function MF(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...l)=>{const u=s(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function LF(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var zF=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ke=zF.reduce((e,t)=>{const r=OF(`Primitive.${t}`),n=a.forwardRef((o,s)=>{const{asChild:i,...l}=o,u=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...l,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function eE(e,t){e&&$o.flushSync(()=>e.dispatchEvent(t))}function FF(e,t){return a.useReducer((r,n)=>t[r][n]??r,e)}var Vt=e=>{const{present:t,children:r}=e,n=VF(t),o=typeof r=="function"?r({present:n.isPresent}):a.Children.only(r),s=tt(n.ref,BF(o));return typeof r=="function"||n.isPresent?a.cloneElement(o,{ref:s}):null};Vt.displayName="Presence";function VF(e){const[t,r]=a.useState(),n=a.useRef(null),o=a.useRef(e),s=a.useRef("none"),i=e?"mounted":"unmounted",[l,u]=FF(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const d=nl(n.current);s.current=l==="mounted"?d:"none"},[l]),kt(()=>{const d=n.current,p=o.current;if(p!==e){const m=s.current,h=nl(d);e?u("MOUNT"):h==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(p&&m!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),kt(()=>{if(t){let d;const p=t.ownerDocument.defaultView??window,f=h=>{const g=nl(n.current).includes(CSS.escape(h.animationName));if(h.target===t&&g&&(u("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=h=>{h.target===t&&(s.current=nl(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:a.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function nl(e){return(e==null?void 0:e.animationName)||"none"}function BF(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var HF=qm[" useId ".trim().toString()]||(()=>{}),UF=0;function zt(e){const[t,r]=a.useState(HF());return kt(()=>{r(n=>n??String(UF++))},[e]),t?`radix-${t}`:""}var gu="Collapsible",[WF,tE]=Xt(gu),[qF,Dh]=WF(gu),rE=a.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:s,onOpenChange:i,...l}=e,[u,d]=Tr({prop:n,defaultProp:o??!1,onChange:i,caller:gu});return c.jsx(qF,{scope:r,disabled:s,contentId:zt(),open:u,onOpenToggle:a.useCallback(()=>d(p=>!p),[d]),children:c.jsx(Ke.div,{"data-state":Mh(u),"data-disabled":s?"":void 0,...l,ref:t})})});rE.displayName=gu;var nE="CollapsibleTrigger",oE=a.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=Dh(nE,r);return c.jsx(Ke.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Mh(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:Ie(e.onClick,o.onOpenToggle)})});oE.displayName=nE;var kh="CollapsibleContent",sE=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Dh(kh,e.__scopeCollapsible);return c.jsx(Vt,{present:r||o.open,children:({present:s})=>c.jsx(GF,{...n,ref:t,present:s})})});sE.displayName=kh;var GF=a.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...s}=e,i=Dh(kh,r),[l,u]=a.useState(n),d=a.useRef(null),p=tt(t,d),f=a.useRef(0),m=f.current,h=a.useRef(0),v=h.current,g=i.open||l,b=a.useRef(g),_=a.useRef(void 0);return a.useEffect(()=>{const y=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(y)},[]),kt(()=>{const y=d.current;if(y){_.current=_.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const x=y.getBoundingClientRect();f.current=x.height,h.current=x.width,b.current||(y.style.transitionDuration=_.current.transitionDuration,y.style.animationName=_.current.animationName),u(n)}},[i.open,n]),c.jsx(Ke.div,{"data-state":Mh(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...s,ref:p,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:g&&o})});function Mh(e){return e?"open":"closed"}var KF=rE,XF=oE,YF=sE,JF=a.createContext(void 0);function Uo(e){const t=a.useContext(JF);return e||t||"ltr"}var dn="Accordion",ZF=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Lh,QF,eV]=hu(dn),[vu]=Xt(dn,[eV,tE]),zh=tE(),iE=N.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,s=n;return c.jsx(Lh.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?c.jsx(oV,{...s,ref:t}):c.jsx(nV,{...o,ref:t})})});iE.displayName=dn;var[aE,tV]=vu(dn),[lE,rV]=vu(dn,{collapsible:!1}),nV=N.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:s=!1,...i}=e,[l,u]=Tr({prop:r,defaultProp:n??"",onChange:o,caller:dn});return c.jsx(aE,{scope:e.__scopeAccordion,value:N.useMemo(()=>l?[l]:[],[l]),onItemOpen:u,onItemClose:N.useCallback(()=>s&&u(""),[s,u]),children:c.jsx(lE,{scope:e.__scopeAccordion,collapsible:s,children:c.jsx(cE,{...i,ref:t})})})}),oV=N.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=e,[i,l]=Tr({prop:r,defaultProp:n??[],onChange:o,caller:dn}),u=N.useCallback(p=>l((f=[])=>[...f,p]),[l]),d=N.useCallback(p=>l((f=[])=>f.filter(m=>m!==p)),[l]);return c.jsx(aE,{scope:e.__scopeAccordion,value:i,onItemOpen:u,onItemClose:d,children:c.jsx(lE,{scope:e.__scopeAccordion,collapsible:!0,children:c.jsx(cE,{...s,ref:t})})})}),[sV,bu]=vu(dn),cE=N.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:s="vertical",...i}=e,l=N.useRef(null),u=tt(l,t),d=QF(r),f=Uo(o)==="ltr",m=Ie(e.onKeyDown,h=>{var R;if(!ZF.includes(h.key))return;const v=h.target,g=d().filter(P=>{var $;return!(($=P.ref.current)!=null&&$.disabled)}),b=g.findIndex(P=>P.ref.current===v),_=g.length;if(b===-1)return;h.preventDefault();let y=b;const x=0,S=_-1,w=()=>{y=b+1,y>S&&(y=x)},I=()=>{y=b-1,y<x&&(y=S)};switch(h.key){case"Home":y=x;break;case"End":y=S;break;case"ArrowRight":s==="horizontal"&&(f?w():I());break;case"ArrowDown":s==="vertical"&&w();break;case"ArrowLeft":s==="horizontal"&&(f?I():w());break;case"ArrowUp":s==="vertical"&&I();break}const T=y%_;(R=g[T].ref.current)==null||R.focus()});return c.jsx(sV,{scope:r,disabled:n,direction:o,orientation:s,children:c.jsx(Lh.Slot,{scope:r,children:c.jsx(Ke.div,{...i,"data-orientation":s,ref:u,onKeyDown:n?void 0:m})})})}),sc="AccordionItem",[iV,Fh]=vu(sc),uE=N.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,s=bu(sc,r),i=tV(sc,r),l=zh(r),u=zt(),d=n&&i.value.includes(n)||!1,p=s.disabled||e.disabled;return c.jsx(iV,{scope:r,open:d,disabled:p,triggerId:u,children:c.jsx(KF,{"data-orientation":s.orientation,"data-state":gE(d),...l,...o,ref:t,disabled:p,open:d,onOpenChange:f=>{f?i.onItemOpen(n):i.onItemClose(n)}})})});uE.displayName=sc;var dE="AccordionHeader",pE=N.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=bu(dn,r),s=Fh(dE,r);return c.jsx(Ke.h3,{"data-orientation":o.orientation,"data-state":gE(s.open),"data-disabled":s.disabled?"":void 0,...n,ref:t})});pE.displayName=dE;var Rf="AccordionTrigger",fE=N.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=bu(dn,r),s=Fh(Rf,r),i=rV(Rf,r),l=zh(r);return c.jsx(Lh.ItemSlot,{scope:r,children:c.jsx(XF,{"aria-disabled":s.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...l,...n,ref:t})})});fE.displayName=Rf;var mE="AccordionContent",hE=N.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=bu(dn,r),s=Fh(mE,r),i=zh(r);return c.jsx(YF,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});hE.displayName=mE;function gE(e){return e?"open":"closed"}var aV=iE,lV=uE,cV=pE,vE=fE,bE=hE;const xre=aV,uV=a.forwardRef(({className:e,...t},r)=>c.jsx(lV,{ref:r,className:ve("border-b border-border",e),...t}));uV.displayName="AccordionItem";const dV=a.forwardRef(({className:e,children:t,...r},n)=>c.jsx(cV,{className:"flex",children:c.jsxs(vE,{ref:n,className:ve("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all","hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,c.jsx(Ah,{className:"h-4 w-4 shrink-0 text-text-muted transition-transform duration-normal"})]})}));dV.displayName=vE.displayName;const pV=a.forwardRef(({className:e,children:t,...r},n)=>c.jsx(bE,{ref:n,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:c.jsx("div",{className:ve("pb-4 pt-0",e),children:t})}));pV.displayName=bE.displayName;const Gb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Kb=ae,rr=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Kb(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(d=>{const p=r==null?void 0:r[d],f=s==null?void 0:s[d];if(p===null)return null;const m=Gb(p)||Gb(f);return o[d][m]}),l=r&&Object.entries(r).reduce((d,p)=>{let[f,m]=p;return m===void 0||(d[f]=m),d},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,p)=>{let{class:f,className:m,...h}=p;return Object.entries(h).every(v=>{let[g,b]=v;return Array.isArray(b)?b.includes({...s,...l}[g]):{...s,...l}[g]===b})?[...d,f,m]:d},[]);return Kb(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},fV=rr("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",{variants:{variant:{default:"bg-bg-base border-border text-text [&>svg]:text-text-muted",info:"bg-info-light/40 border-info/30 text-text [&>svg]:text-info",success:"bg-success-light/40 border-primary/30 text-text [&>svg]:text-primary",warning:"bg-warning-light/50 border-warning/30 text-text [&>svg]:text-warning",destructive:"bg-error-light/40 border-error/30 text-text [&>svg]:text-error"}},defaultVariants:{variant:"default"}}),mV=a.forwardRef(({className:e,variant:t,...r},n)=>c.jsx("div",{ref:n,role:"alert",className:ve(fV({variant:t}),e),...r}));mV.displayName="Alert";const hV=a.forwardRef(({className:e,...t},r)=>c.jsx("h5",{ref:r,className:ve("mb-1 font-semibold leading-none tracking-tight",e),...t}));hV.displayName="AlertTitle";const gV=a.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:ve("text-sm text-text-muted [&_p]:leading-relaxed",e),...t}));gV.displayName="AlertDescription";function Kt(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function vV(e,t=globalThis==null?void 0:globalThis.document){const r=Kt(e);a.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var bV="DismissableLayer",Tf="dismissableLayer.update",_V="dismissableLayer.pointerDownOutside",yV="dismissableLayer.focusOutside",Xb,_E=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),si=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...u}=e,d=a.useContext(_E),[p,f]=a.useState(null),m=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=a.useState({}),v=tt(t,T=>f(T)),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),_=g.indexOf(b),y=p?g.indexOf(p):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=y>=_,w=EV(T=>{const R=T.target,P=[...d.branches].some($=>$.contains(R));!S||P||(o==null||o(T),i==null||i(T),T.defaultPrevented||l==null||l())},m),I=SV(T=>{const R=T.target;[...d.branches].some($=>$.contains(R))||(s==null||s(T),i==null||i(T),T.defaultPrevented||l==null||l())},m);return vV(T=>{y===d.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},m),a.useEffect(()=>{if(p)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Xb=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),Yb(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Xb)}},[p,m,r,d]),a.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),Yb())},[p,d]),a.useEffect(()=>{const T=()=>h({});return document.addEventListener(Tf,T),()=>document.removeEventListener(Tf,T)},[]),c.jsx(Ke.div,{...u,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Ie(e.onFocusCapture,I.onFocusCapture),onBlurCapture:Ie(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Ie(e.onPointerDownCapture,w.onPointerDownCapture)})});si.displayName=bV;var xV="DismissableLayerBranch",wV=a.forwardRef((e,t)=>{const r=a.useContext(_E),n=a.useRef(null),o=tt(t,n);return a.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),c.jsx(Ke.div,{...e,ref:o})});wV.displayName=xV;function EV(e,t=globalThis==null?void 0:globalThis.document){const r=Kt(e),n=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const s=l=>{if(l.target&&!n.current){let u=function(){yE(_V,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function SV(e,t=globalThis==null?void 0:globalThis.document){const r=Kt(e),n=a.useRef(!1);return a.useEffect(()=>{const o=s=>{s.target&&!n.current&&yE(yV,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Yb(){const e=new CustomEvent(Tf);document.dispatchEvent(e)}function yE(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?eE(o,s):o.dispatchEvent(s)}var Md="focusScope.autoFocusOnMount",Ld="focusScope.autoFocusOnUnmount",Jb={bubbles:!1,cancelable:!0},CV="FocusScope",$a=a.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[l,u]=a.useState(null),d=Kt(o),p=Kt(s),f=a.useRef(null),m=tt(t,g=>u(g)),h=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(n){let g=function(x){if(h.paused||!l)return;const S=x.target;l.contains(S)?f.current=S:qn(f.current,{select:!0})},b=function(x){if(h.paused||!l)return;const S=x.relatedTarget;S!==null&&(l.contains(S)||qn(f.current,{select:!0}))},_=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&qn(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const y=new MutationObserver(_);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),y.disconnect()}}},[n,l,h.paused]),a.useEffect(()=>{if(l){Qb.add(h);const g=document.activeElement;if(!l.contains(g)){const _=new CustomEvent(Md,Jb);l.addEventListener(Md,d),l.dispatchEvent(_),_.defaultPrevented||(PV(AV(xE(l)),{select:!0}),document.activeElement===g&&qn(l))}return()=>{l.removeEventListener(Md,d),setTimeout(()=>{const _=new CustomEvent(Ld,Jb);l.addEventListener(Ld,p),l.dispatchEvent(_),_.defaultPrevented||qn(g??document.body,{select:!0}),l.removeEventListener(Ld,p),Qb.remove(h)},0)}}},[l,d,p,h]);const v=a.useCallback(g=>{if(!r&&!n||h.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,_=document.activeElement;if(b&&_){const y=g.currentTarget,[x,S]=RV(y);x&&S?!g.shiftKey&&_===S?(g.preventDefault(),r&&qn(x,{select:!0})):g.shiftKey&&_===x&&(g.preventDefault(),r&&qn(S,{select:!0})):_===y&&g.preventDefault()}},[r,n,h.paused]);return c.jsx(Ke.div,{tabIndex:-1,...i,ref:m,onKeyDown:v})});$a.displayName=CV;function PV(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(qn(n,{select:t}),document.activeElement!==r)return}function RV(e){const t=xE(e),r=Zb(t,e),n=Zb(t.reverse(),e);return[r,n]}function xE(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Zb(e,t){for(const r of e)if(!TV(r,{upTo:t}))return r}function TV(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function IV(e){return e instanceof HTMLInputElement&&"select"in e}function qn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&IV(e)&&t&&e.select()}}var Qb=$V();function $V(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=e_(e,t),e.unshift(t)},remove(t){var r;e=e_(e,t),(r=e[0])==null||r.resume()}}}function e_(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function AV(e){return e.filter(t=>t.tagName!=="A")}var jV="Portal",ii=a.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,s]=a.useState(!1);kt(()=>s(!0),[]);const i=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?fx.createPortal(c.jsx(Ke.div,{...n,ref:t}),i):null});ii.displayName=jV;var zd=0;function _u(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??t_()),document.body.insertAdjacentElement("beforeend",e[1]??t_()),zd++,()=>{zd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),zd--}},[])}function t_(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var gn=function(){return gn=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},gn.apply(this,arguments)};function wE(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function OV(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}var jl="right-scroll-bar-position",Ol="width-before-scroll-bar",NV="with-scroll-bars-hidden",DV="--removed-body-scroll-bar-size";function Fd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function kV(e,t){var r=a.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var MV=typeof window<"u"?a.useLayoutEffect:a.useEffect,r_=new WeakMap;function LV(e,t){var r=kV(null,function(n){return e.forEach(function(o){return Fd(o,n)})});return MV(function(){var n=r_.get(r);if(n){var o=new Set(n),s=new Set(e),i=r.current;o.forEach(function(l){s.has(l)||Fd(l,null)}),s.forEach(function(l){o.has(l)||Fd(l,i)})}r_.set(r,e)},[e]),r}function zV(e){return e}function FV(e,t){t===void 0&&(t=zV);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var i=t(s,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(s){for(n=!0;r.length;){var i=r;r=[],i.forEach(s)}r={push:function(l){return s(l)},filter:function(){return r}}},assignMedium:function(s){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(s),i=r}var u=function(){var p=i;i=[],p.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),r={push:function(p){i.push(p),d()},filter:function(p){return i=i.filter(p),r}}}};return o}function VV(e){e===void 0&&(e={});var t=FV(null);return t.options=gn({async:!0,ssr:!1},e),t}var EE=function(e){var t=e.sideCar,r=wE(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return a.createElement(n,gn({},r))};EE.isSideCarExport=!0;function BV(e,t){return e.useMedium(t),EE}var SE=VV(),Vd=function(){},yu=a.forwardRef(function(e,t){var r=a.useRef(null),n=a.useState({onScrollCapture:Vd,onWheelCapture:Vd,onTouchMoveCapture:Vd}),o=n[0],s=n[1],i=e.forwardProps,l=e.children,u=e.className,d=e.removeScrollBar,p=e.enabled,f=e.shards,m=e.sideCar,h=e.noRelative,v=e.noIsolation,g=e.inert,b=e.allowPinchZoom,_=e.as,y=_===void 0?"div":_,x=e.gapMode,S=wE(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=m,I=LV([r,t]),T=gn(gn({},S),o);return a.createElement(a.Fragment,null,p&&a.createElement(w,{sideCar:SE,removeScrollBar:d,shards:f,noRelative:h,noIsolation:v,inert:g,setCallbacks:s,allowPinchZoom:!!b,lockRef:r,gapMode:x}),i?a.cloneElement(a.Children.only(l),gn(gn({},T),{ref:I})):a.createElement(y,gn({},T,{className:u,ref:I}),l))});yu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yu.classNames={fullWidth:Ol,zeroRight:jl};var HV=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function UV(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=HV();return t&&e.setAttribute("nonce",t),e}function WV(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function qV(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var GV=function(){var e=0,t=null;return{add:function(r){e==0&&(t=UV())&&(WV(t,r),qV(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},KV=function(){var e=GV();return function(t,r){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},CE=function(){var e=KV(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},XV={left:0,top:0,right:0,gap:0},Bd=function(e){return parseInt(e||"",10)||0},YV=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Bd(r),Bd(n),Bd(o)]},JV=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return XV;var t=YV(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},ZV=CE(),Os="data-scroll-locked",QV=function(e,t,r,n){var o=e.left,s=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
.`.concat(NV,` {
overflow: hidden `).concat(n,`;
padding-right: `).concat(l,"px ").concat(n,`;
}
body[`).concat(Os,`] {
overflow: hidden `).concat(n,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
padding-left: `.concat(o,`px;
padding-top: `).concat(s,`px;
padding-right: `).concat(i,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(l,"px ").concat(n,`;
`),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
}
.`).concat(jl,` {
right: `).concat(l,"px ").concat(n,`;
}
.`).concat(Ol,` {
margin-right: `).concat(l,"px ").concat(n,`;
}
.`).concat(jl," .").concat(jl,` {
right: 0 `).concat(n,`;
}
.`).concat(Ol," .").concat(Ol,` {
margin-right: 0 `).concat(n,`;
}
body[`).concat(Os,`] {
`).concat(DV,": ").concat(l,`px;
}
`)},n_=function(){var e=parseInt(document.body.getAttribute(Os)||"0",10);return isFinite(e)?e:0},eB=function(){a.useEffect(function(){return document.body.setAttribute(Os,(n_()+1).toString()),function(){var e=n_()-1;e<=0?document.body.removeAttribute(Os):document.body.setAttribute(Os,e.toString())}},[])},tB=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;eB();var s=a.useMemo(function(){return JV(o)},[o]);return a.createElement(ZV,{styles:QV(s,!t,o,r?"":"!important")})},If=!1;if(typeof window<"u")try{var ol=Object.defineProperty({},"passive",{get:function(){return If=!0,!0}});window.addEventListener("test",ol,ol),window.removeEventListener("test",ol,ol)}catch{If=!1}var os=If?{passive:!1}:!1,rB=function(e){return e.tagName==="TEXTAREA"},PE=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!rB(e)&&r[t]==="visible")},nB=function(e){return PE(e,"overflowY")},oB=function(e){return PE(e,"overflowX")},o_=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=RE(e,n);if(o){var s=TE(e,n),i=s[1],l=s[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},sB=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},iB=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},RE=function(e,t){return e==="v"?nB(t):oB(t)},TE=function(e,t){return e==="v"?sB(t):iB(t)},aB=function(e,t){return e==="h"&&t==="rtl"?-1:1},lB=function(e,t,r,n,o){var s=aB(e,window.getComputedStyle(t).direction),i=s*n,l=r.target,u=t.contains(l),d=!1,p=i>0,f=0,m=0;do{if(!l)break;var h=TE(e,l),v=h[0],g=h[1],b=h[2],_=g-b-s*v;(v||_)&&RE(e,l)&&(f+=_,m+=v);var y=l.parentNode;l=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(p&&Math.abs(f)<1||!p&&Math.abs(m)<1)&&(d=!0),d},sl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},s_=function(e){return[e.deltaX,e.deltaY]},i_=function(e){return e&&"current"in e?e.current:e},cB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},uB=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},dB=0,ss=[];function pB(e){var t=a.useRef([]),r=a.useRef([0,0]),n=a.useRef(),o=a.useState(dB++)[0],s=a.useState(CE)[0],i=a.useRef(e);a.useEffect(function(){i.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=OV([e.lockRef.current],(e.shards||[]).map(i_),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=a.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var _=sl(g),y=r.current,x="deltaX"in g?g.deltaX:y[0]-_[0],S="deltaY"in g?g.deltaY:y[1]-_[1],w,I=g.target,T=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in g&&T==="h"&&I.type==="range")return!1;var R=window.getSelection(),P=R&&R.anchorNode,$=P?P===I||P.contains(I):!1;if($)return!1;var A=o_(T,I);if(!A)return!0;if(A?w=T:(w=T==="v"?"h":"v",A=o_(T,I)),!A)return!1;if(!n.current&&"changedTouches"in g&&(x||S)&&(n.current=w),!w)return!0;var k=n.current||w;return lB(k,b,g,k==="h"?x:S)},[]),u=a.useCallback(function(g){var b=g;if(!(!ss.length||ss[ss.length-1]!==s)){var _="deltaY"in b?s_(b):sl(b),y=t.current.filter(function(w){return w.name===b.type&&(w.target===b.target||b.target===w.shadowParent)&&cB(w.delta,_)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var x=(i.current.shards||[]).map(i_).filter(Boolean).filter(function(w){return w.contains(b.target)}),S=x.length>0?l(b,x[0]):!i.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),d=a.useCallback(function(g,b,_,y){var x={name:g,delta:b,target:_,should:y,shadowParent:fB(_)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),p=a.useCallback(function(g){r.current=sl(g),n.current=void 0},[]),f=a.useCallback(function(g){d(g.type,s_(g),g.target,l(g,e.lockRef.current))},[]),m=a.useCallback(function(g){d(g.type,sl(g),g.target,l(g,e.lockRef.current))},[]);a.useEffect(function(){return ss.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",u,os),document.addEventListener("touchmove",u,os),document.addEventListener("touchstart",p,os),function(){ss=ss.filter(function(g){return g!==s}),document.removeEventListener("wheel",u,os),document.removeEventListener("touchmove",u,os),document.removeEventListener("touchstart",p,os)}},[]);var h=e.removeScrollBar,v=e.inert;return a.createElement(a.Fragment,null,v?a.createElement(s,{styles:uB(o)}):null,h?a.createElement(tB,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function fB(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const mB=BV(SE,pB);var Aa=a.forwardRef(function(e,t){return a.createElement(yu,gn({},e,{ref:t,sideCar:mB}))});Aa.classNames=yu.classNames;var hB=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},is=new WeakMap,il=new WeakMap,al={},Hd=0,IE=function(e){return e&&(e.host||IE(e.parentNode))},gB=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=IE(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},vB=function(e,t,r,n){var o=gB(t,Array.isArray(e)?e:[e]);al[r]||(al[r]=new WeakMap);var s=al[r],i=[],l=new Set,u=new Set(o),d=function(f){!f||l.has(f)||(l.add(f),d(f.parentNode))};o.forEach(d);var p=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(m){if(l.has(m))p(m);else try{var h=m.getAttribute(n),v=h!==null&&h!=="false",g=(is.get(m)||0)+1,b=(s.get(m)||0)+1;is.set(m,g),s.set(m,b),i.push(m),g===1&&v&&il.set(m,!0),b===1&&m.setAttribute(r,"true"),v||m.setAttribute(n,"true")}catch(_){console.error("aria-hidden: cannot operate on ",m,_)}})};return p(t),l.clear(),Hd++,function(){i.forEach(function(f){var m=is.get(f)-1,h=s.get(f)-1;is.set(f,m),s.set(f,h),m||(il.has(f)||f.removeAttribute(n),il.delete(f)),h||f.removeAttribute(r)}),Hd--,Hd||(is=new WeakMap,is=new WeakMap,il=new WeakMap,al={})}},xu=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=hB(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),vB(n,o,r,"aria-hidden")):function(){return null}};function bB(e){const t=_B(e),r=a.forwardRef((n,o)=>{const{children:s,...i}=n,l=a.Children.toArray(s),u=l.find(xB);if(u){const d=u.props.children,p=l.map(f=>f===u?a.Children.count(d)>1?a.Children.only(null):a.isValidElement(d)?d.props.children:null:f);return c.jsx(t,{...i,ref:o,children:a.isValidElement(d)?a.cloneElement(d,void 0,p):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function _B(e){const t=a.forwardRef((r,n)=>{const{children:o,...s}=r;if(a.isValidElement(o)){const i=EB(o),l=wB(s,o.props);return o.type!==a.Fragment&&(l.ref=n?_r(n,i):i),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var yB=Symbol("radix.slottable");function xB(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yB}function wB(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...l)=>{const u=s(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function EB(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var wu="Dialog",[$E,AE]=Xt(wu),[SB,pn]=$E(wu),jE=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,l=a.useRef(null),u=a.useRef(null),[d,p]=Tr({prop:n,defaultProp:o??!1,onChange:s,caller:wu});return c.jsx(SB,{scope:t,triggerRef:l,contentRef:u,contentId:zt(),titleId:zt(),descriptionId:zt(),open:d,onOpenChange:p,onOpenToggle:a.useCallback(()=>p(f=>!f),[p]),modal:i,children:r})};jE.displayName=wu;var OE="DialogTrigger",NE=a.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=pn(OE,r),s=tt(t,o.triggerRef);return c.jsx(Ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Hh(o.open),...n,ref:s,onClick:Ie(e.onClick,o.onOpenToggle)})});NE.displayName=OE;var Vh="DialogPortal",[CB,DE]=$E(Vh,{forceMount:void 0}),kE=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,s=pn(Vh,t);return c.jsx(CB,{scope:t,forceMount:r,children:a.Children.map(n,i=>c.jsx(Vt,{present:r||s.open,children:c.jsx(ii,{asChild:!0,container:o,children:i})}))})};kE.displayName=Vh;var ic="DialogOverlay",ME=a.forwardRef((e,t)=>{const r=DE(ic,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=pn(ic,e.__scopeDialog);return s.modal?c.jsx(Vt,{present:n||s.open,children:c.jsx(RB,{...o,ref:t})}):null});ME.displayName=ic;var PB=bB("DialogOverlay.RemoveScroll"),RB=a.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=pn(ic,r);return c.jsx(Aa,{as:PB,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsx(Ke.div,{"data-state":Hh(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Oo="DialogContent",LE=a.forwardRef((e,t)=>{const r=DE(Oo,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=pn(Oo,e.__scopeDialog);return c.jsx(Vt,{present:n||s.open,children:s.modal?c.jsx(TB,{...o,ref:t}):c.jsx(IB,{...o,ref:t})})});LE.displayName=Oo;var TB=a.forwardRef((e,t)=>{const r=pn(Oo,e.__scopeDialog),n=a.useRef(null),o=tt(t,r.contentRef,n);return a.useEffect(()=>{const s=n.current;if(s)return xu(s)},[]),c.jsx(zE,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ie(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:Ie(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&s.preventDefault()}),onFocusOutside:Ie(e.onFocusOutside,s=>s.preventDefault())})}),IB=a.forwardRef((e,t)=>{const r=pn(Oo,e.__scopeDialog),n=a.useRef(!1),o=a.useRef(!1);return c.jsx(zE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),zE=a.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,l=pn(Oo,r),u=a.useRef(null),d=tt(t,u);return _u(),c.jsxs(c.Fragment,{children:[c.jsx($a,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsx(si,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Hh(l.open),...i,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(AB,{titleId:l.titleId}),c.jsx(OB,{contentRef:u,descriptionId:l.descriptionId})]})]})}),Bh="DialogTitle",FE=a.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=pn(Bh,r);return c.jsx(Ke.h2,{id:o.titleId,...n,ref:t})});FE.displayName=Bh;var VE="DialogDescription",BE=a.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=pn(VE,r);return c.jsx(Ke.p,{id:o.descriptionId,...n,ref:t})});BE.displayName=VE;var HE="DialogClose",UE=a.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=pn(HE,r);return c.jsx(Ke.button,{type:"button",...n,ref:t,onClick:Ie(e.onClick,()=>o.onOpenChange(!1))})});UE.displayName=HE;function Hh(e){return e?"open":"closed"}var WE="DialogTitleWarning",[$B,qE]=EF(WE,{contentName:Oo,titleName:Bh,docsSlug:"dialog"}),AB=({titleId:e})=>{const t=qE(WE),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},jB="DialogDescriptionWarning",OB=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qE(jB).contentName}}.`;return a.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Eu=jE,Uh=NE,ja=kE,Wo=ME,qo=LE,ai=FE,li=BE,Oa=UE,NB=Symbol("radix.slottable");function DB(e){const t=({children:r})=>c.jsx(c.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=NB,t}var GE="AlertDialog",[kB]=Xt(GE,[AE]),Ln=AE(),KE=e=>{const{__scopeAlertDialog:t,...r}=e,n=Ln(t);return c.jsx(Eu,{...n,...r,modal:!0})};KE.displayName=GE;var MB="AlertDialogTrigger",XE=a.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Ln(r);return c.jsx(Uh,{...o,...n,ref:t})});XE.displayName=MB;var LB="AlertDialogPortal",YE=e=>{const{__scopeAlertDialog:t,...r}=e,n=Ln(t);return c.jsx(ja,{...n,...r})};YE.displayName=LB;var zB="AlertDialogOverlay",JE=a.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Ln(r);return c.jsx(Wo,{...o,...n,ref:t})});JE.displayName=zB;var Ns="AlertDialogContent",[FB,VB]=kB(Ns),BB=DB("AlertDialogContent"),ZE=a.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...o}=e,s=Ln(r),i=a.useRef(null),l=tt(t,i),u=a.useRef(null);return c.jsx($B,{contentName:Ns,titleName:QE,docsSlug:"alert-dialog",children:c.jsx(FB,{scope:r,cancelRef:u,children:c.jsxs(qo,{role:"alertdialog",...s,...o,ref:l,onOpenAutoFocus:Ie(o.onOpenAutoFocus,d=>{var p;d.preventDefault(),(p=u.current)==null||p.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[c.jsx(BB,{children:n}),c.jsx(UB,{contentRef:i})]})})})});ZE.displayName=Ns;var QE="AlertDialogTitle",eS=a.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Ln(r);return c.jsx(ai,{...o,...n,ref:t})});eS.displayName=QE;var tS="AlertDialogDescription",rS=a.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Ln(r);return c.jsx(li,{...o,...n,ref:t})});rS.displayName=tS;var HB="AlertDialogAction",nS=a.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Ln(r);return c.jsx(Oa,{...o,...n,ref:t})});nS.displayName=HB;var oS="AlertDialogCancel",sS=a.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=VB(oS,r),s=Ln(r),i=tt(t,o);return c.jsx(Oa,{...s,...n,ref:i})});sS.displayName=oS;var UB=({contentRef:e})=>{const t=`\`${Ns}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${Ns}\` by passing a \`${tS}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ns}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return a.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},WB=KE,qB=XE,GB=YE,iS=JE,aS=ZE,lS=nS,cS=sS,uS=eS,dS=rS,KB=Symbol.for("react.lazy"),ac=qm[" use ".trim().toString()];function XB(e){return typeof e=="object"&&e!==null&&"then"in e}function pS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===KB&&"_payload"in e&&XB(e._payload)}function ci(e){const t=YB(e),r=a.forwardRef((n,o)=>{let{children:s,...i}=n;pS(s)&&typeof ac=="function"&&(s=ac(s._payload));const l=a.Children.toArray(s),u=l.find(ZB);if(u){const d=u.props.children,p=l.map(f=>f===u?a.Children.count(d)>1?a.Children.only(null):a.isValidElement(d)?d.props.children:null:f);return c.jsx(t,{...i,ref:o,children:a.isValidElement(d)?a.cloneElement(d,void 0,p):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var fS=ci("Slot");function YB(e){const t=a.forwardRef((r,n)=>{let{children:o,...s}=r;if(pS(o)&&typeof ac=="function"&&(o=ac(o._payload)),a.isValidElement(o)){const i=eH(o),l=QB(s,o.props);return o.type!==a.Fragment&&(l.ref=n?_r(n,i):i),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var JB=Symbol("radix.slottable");function ZB(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===JB}function QB(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...l)=>{const u=s(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function eH(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const Wh=rr("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary-dark active:bg-primary-dark",secondary:"bg-bg-surface text-text shadow-sm hover:bg-border",outline:"border border-border-strong bg-bg-base text-text shadow-xs hover:bg-bg-surface",ghost:"text-text hover:bg-bg-surface hover:text-text",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",link:"text-primary underline-offset-4 hover:underline"},size:{sm:"h-8 px-3 text-xs",md:"h-10 px-4 py-2",lg:"h-12 px-6 text-base",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),Vs=a.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,loading:o=!1,children:s,disabled:i,...l},u)=>{const d=n?fS:"button",p=n?a.isValidElement(s)?a.cloneElement(s,void 0,c.jsxs(c.Fragment,{children:[o?c.jsx(Lb,{className:"h-4 w-4 animate-spin","aria-hidden":!0}):null,s.props.children]})):s:c.jsxs(c.Fragment,{children:[o?c.jsx(Lb,{className:"h-4 w-4 animate-spin","aria-hidden":!0}):null,s]});return c.jsx(d,{className:ve(Wh({variant:t,size:r}),e),ref:u,disabled:i||o,...l,children:p})});Vs.displayName="Button";const wre=WB,Ere=qB,tH=GB,mS=a.forwardRef(({className:e,...t},r)=>c.jsx(iS,{ref:r,className:ve("fixed inset-0 z-[1200] bg-slate-900/60 backdrop-blur-sm","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));mS.displayName=iS.displayName;const rH=a.forwardRef(({className:e,...t},r)=>c.jsxs(tH,{children:[c.jsx(mS,{}),c.jsx(aS,{ref:r,className:ve("fixed left-[50%] top-[50%] z-[1300] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-bg-elevated p-6 shadow-lg sm:rounded-lg","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",e),...t})]}));rH.displayName=aS.displayName;const nH=({className:e,...t})=>c.jsx("div",{className:ve("flex flex-col space-y-2 text-center sm:text-left",e),...t});nH.displayName="AlertDialogHeader";const oH=({className:e,...t})=>c.jsx("div",{className:ve("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});oH.displayName="AlertDialogFooter";const sH=a.forwardRef(({className:e,...t},r)=>c.jsx(uS,{ref:r,className:ve("text-lg font-semibold",e),...t}));sH.displayName=uS.displayName;const iH=a.forwardRef(({className:e,...t},r)=>c.jsx(dS,{ref:r,className:ve("text-sm text-text-muted",e),...t}));iH.displayName=dS.displayName;const aH=a.forwardRef(({className:e,...t},r)=>c.jsx(lS,{ref:r,className:ve(Wh(),e),...t}));aH.displayName=lS.displayName;const lH=a.forwardRef(({className:e,...t},r)=>c.jsx(cS,{ref:r,className:ve(Wh({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));lH.displayName=cS.displayName;function cH(e,t=[]){let r=[];function n(s,i){const l=a.createContext(i);l.displayName=s+"Context";const u=r.length;r=[...r,i];const d=f=>{var _;const{scope:m,children:h,...v}=f,g=((_=m==null?void 0:m[e])==null?void 0:_[u])||l,b=a.useMemo(()=>v,Object.values(v));return c.jsx(g.Provider,{value:b,children:h})};d.displayName=s+"Provider";function p(f,m){var g;const h=((g=m==null?void 0:m[e])==null?void 0:g[u])||l,v=a.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[d,p]}const o=()=>{const s=r.map(i=>a.createContext(i));return function(l){const u=(l==null?void 0:l[e])||s;return a.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[n,uH(o,...t)]}function uH(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=n.reduce((l,{useScope:u,scopeName:d})=>{const f=u(s)[`__scope${d}`];return{...l,...f}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var dH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qh=dH.reduce((e,t)=>{const r=ci(`Primitive.${t}`),n=a.forwardRef((o,s)=>{const{asChild:i,...l}=o,u=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...l,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function pH(){return H$.useSyncExternalStore(fH,()=>!0,()=>!1)}function fH(){return()=>{}}var Gh="Avatar",[mH]=cH(Gh),[hH,hS]=mH(Gh),gS=a.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,s]=a.useState("idle");return c.jsx(hH,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:c.jsx(qh.span,{...n,ref:t})})});gS.displayName=Gh;var vS="AvatarImage",bS=a.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...s}=e,i=hS(vS,r),l=gH(n,s),u=Kt(d=>{o(d),i.onImageLoadingStatusChange(d)});return kt(()=>{l!=="idle"&&u(l)},[l,u]),l==="loaded"?c.jsx(qh.img,{...s,ref:t,src:n}):null});bS.displayName=vS;var _S="AvatarFallback",yS=a.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,s=hS(_S,r),[i,l]=a.useState(n===void 0);return a.useEffect(()=>{if(n!==void 0){const u=window.setTimeout(()=>l(!0),n);return()=>window.clearTimeout(u)}},[n]),i&&s.imageLoadingStatus!=="loaded"?c.jsx(qh.span,{...o,ref:t}):null});yS.displayName=_S;function a_(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function gH(e,{referrerPolicy:t,crossOrigin:r}){const n=pH(),o=a.useRef(null),s=n?(o.current||(o.current=new window.Image),o.current):null,[i,l]=a.useState(()=>a_(s,e));return kt(()=>{l(a_(s,e))},[s,e]),kt(()=>{const u=f=>()=>{l(f)};if(!s)return;const d=u("loaded"),p=u("error");return s.addEventListener("load",d),s.addEventListener("error",p),t&&(s.referrerPolicy=t),typeof r=="string"&&(s.crossOrigin=r),()=>{s.removeEventListener("load",d),s.removeEventListener("error",p)}},[s,r,t]),i}var xS=gS,wS=bS,ES=yS;const vH=a.forwardRef(({className:e,...t},r)=>c.jsx(xS,{ref:r,className:ve("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));vH.displayName=xS.displayName;const bH=a.forwardRef(({className:e,...t},r)=>c.jsx(wS,{ref:r,className:ve("aspect-square h-full w-full",e),...t}));bH.displayName=wS.displayName;const _H=a.forwardRef(({className:e,...t},r)=>c.jsx(ES,{ref:r,className:ve("flex h-full w-full items-center justify-center rounded-full bg-bg-surface text-sm font-medium text-text-muted",e),...t}));_H.displayName=ES.displayName;const yH=rr("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{variant:{default:"bg-primary-light text-primary-dark",neutral:"bg-bg-surface text-text",success:"bg-success-light text-primary-dark",warning:"bg-warning-light text-warning",error:"bg-error-light text-error",info:"bg-info-light text-info",outline:"border border-border text-text"}},defaultVariants:{variant:"default"}});function SS({className:e,variant:t,...r}){return c.jsx("span",{className:ve(yH({variant:t}),e),...r})}const CS=a.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:ve("rounded-lg border border-border bg-bg-elevated text-text shadow-sm",e),...t}));CS.displayName="Card";const xH=a.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:ve("flex flex-col space-y-1.5 p-6",e),...t}));xH.displayName="CardHeader";const wH=a.forwardRef(({className:e,...t},r)=>c.jsx("h3",{ref:r,className:ve("text-lg font-semibold leading-snug tracking-tight",e),...t}));wH.displayName="CardTitle";const EH=a.forwardRef(({className:e,...t},r)=>c.jsx("p",{ref:r,className:ve("text-sm text-text-muted",e),...t}));EH.displayName="CardDescription";const PS=a.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:ve("p-6 pt-0",e),...t}));PS.displayName="CardContent";const SH=a.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:ve("flex items-center p-6 pt-0",e),...t}));SH.displayName="CardFooter";function Su(e){const t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Cu(e){const[t,r]=a.useState(void 0);return kt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,l;if("borderBoxSize"in s){const u=s.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,l=d.blockSize}else i=e.offsetWidth,l=e.offsetHeight;r({width:i,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Pu="Checkbox",[CH]=Xt(Pu),[PH,Kh]=CH(Pu);function RH(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:s,form:i,name:l,onCheckedChange:u,required:d,value:p="on",internal_do_not_use_render:f}=e,[m,h]=Tr({prop:r,defaultProp:o??!1,onChange:u,caller:Pu}),[v,g]=a.useState(null),[b,_]=a.useState(null),y=a.useRef(!1),x=v?!!i||!!v.closest("form"):!0,S={checked:m,disabled:s,setChecked:h,control:v,setControl:g,name:l,form:i,value:p,hasConsumerStoppedPropagationRef:y,required:d,defaultChecked:Qn(o)?!1:o,isFormControl:x,bubbleInput:b,setBubbleInput:_};return c.jsx(PH,{scope:t,...S,children:TH(f)?f(S):n})}var RS="CheckboxTrigger",TS=a.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:s,value:i,disabled:l,checked:u,required:d,setControl:p,setChecked:f,hasConsumerStoppedPropagationRef:m,isFormControl:h,bubbleInput:v}=Kh(RS,e),g=tt(o,p),b=a.useRef(u);return a.useEffect(()=>{const _=s==null?void 0:s.form;if(_){const y=()=>f(b.current);return _.addEventListener("reset",y),()=>_.removeEventListener("reset",y)}},[s,f]),c.jsx(Ke.button,{type:"button",role:"checkbox","aria-checked":Qn(u)?"mixed":u,"aria-required":d,"data-state":OS(u),"data-disabled":l?"":void 0,disabled:l,value:i,...n,ref:g,onKeyDown:Ie(t,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:Ie(r,_=>{f(y=>Qn(y)?!0:!y),v&&h&&(m.current=_.isPropagationStopped(),m.current||_.stopPropagation())})})});TS.displayName=RS;var Xh=a.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:s,required:i,disabled:l,value:u,onCheckedChange:d,form:p,...f}=e;return c.jsx(RH,{__scopeCheckbox:r,checked:o,defaultChecked:s,disabled:l,required:i,onCheckedChange:d,name:n,form:p,value:u,internal_do_not_use_render:({isFormControl:m})=>c.jsxs(c.Fragment,{children:[c.jsx(TS,{...f,ref:t,__scopeCheckbox:r}),m&&c.jsx(jS,{__scopeCheckbox:r})]})})});Xh.displayName=Pu;var IS="CheckboxIndicator",$S=a.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,s=Kh(IS,r);return c.jsx(Vt,{present:n||Qn(s.checked)||s.checked===!0,children:c.jsx(Ke.span,{"data-state":OS(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});$S.displayName=IS;var AS="CheckboxBubbleInput",jS=a.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:l,disabled:u,name:d,value:p,form:f,bubbleInput:m,setBubbleInput:h}=Kh(AS,e),v=tt(r,h),g=Su(s),b=Cu(n);a.useEffect(()=>{const y=m;if(!y)return;const x=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(x,"checked").set,I=!o.current;if(g!==s&&w){const T=new Event("click",{bubbles:I});y.indeterminate=Qn(s),w.call(y,Qn(s)?!1:s),y.dispatchEvent(T)}},[m,g,s,o]);const _=a.useRef(Qn(s)?!1:s);return c.jsx(Ke.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??_.current,required:l,disabled:u,name:d,value:p,form:f,...t,tabIndex:-1,ref:v,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});jS.displayName=AS;function TH(e){return typeof e=="function"}function Qn(e){return e==="indeterminate"}function OS(e){return Qn(e)?"indeterminate":e?"checked":"unchecked"}const IH=a.forwardRef(({className:e,...t},r)=>c.jsx(Xh,{ref:r,className:ve("peer h-4 w-4 shrink-0 rounded-sm border border-border-strong","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground",e),...t,children:c.jsx($S,{className:ve("flex items-center justify-center text-current"),children:c.jsx($h,{className:"h-4 w-4"})})}));IH.displayName=Xh.displayName;var l_=1,$H=.9,AH=.8,jH=.17,Ud=.1,Wd=.999,OH=.9999,NH=.99,DH=/[\\\/_+.#"@\[\(\{&]/,kH=/[\\\/_+.#"@\[\(\{&]/g,MH=/[\s-]/,NS=/[\s-]/g;function $f(e,t,r,n,o,s,i){if(s===t.length)return o===e.length?l_:NH;var l=`${o},${s}`;if(i[l]!==void 0)return i[l];for(var u=n.charAt(s),d=r.indexOf(u,o),p=0,f,m,h,v;d>=0;)f=$f(e,t,r,n,d+1,s+1,i),f>p&&(d===o?f*=l_:DH.test(e.charAt(d-1))?(f*=AH,h=e.slice(o,d-1).match(kH),h&&o>0&&(f*=Math.pow(Wd,h.length))):MH.test(e.charAt(d-1))?(f*=$H,v=e.slice(o,d-1).match(NS),v&&o>0&&(f*=Math.pow(Wd,v.length))):(f*=jH,o>0&&(f*=Math.pow(Wd,d-o))),e.charAt(d)!==t.charAt(s)&&(f*=OH)),(f<Ud&&r.charAt(d-1)===n.charAt(s+1)||n.charAt(s+1)===n.charAt(s)&&r.charAt(d-1)!==n.charAt(s))&&(m=$f(e,t,r,n,d+1,s+2,i),m*Ud>f&&(f=m*Ud)),f>p&&(p=f),d=r.indexOf(u,d+1);return i[l]=p,p}function c_(e){return e.toLowerCase().replace(NS," ")}function LH(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,$f(e,t,c_(e),c_(t),0,0,{})}var zH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],oo=zH.reduce((e,t)=>{const r=ci(`Primitive.${t}`),n=a.forwardRef((o,s)=>{const{asChild:i,...l}=o,u=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...l,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),yi='[cmdk-group=""]',qd='[cmdk-group-items=""]',FH='[cmdk-group-heading=""]',DS='[cmdk-item=""]',u_=`${DS}:not([aria-disabled="true"])`,Af="cmdk-item-select",hs="data-value",VH=(e,t,r)=>LH(e,t,r),kS=a.createContext(void 0),Na=()=>a.useContext(kS),MS=a.createContext(void 0),Yh=()=>a.useContext(MS),LS=a.createContext(void 0),zS=a.forwardRef((e,t)=>{let r=gs(()=>{var O,M;return{search:"",value:(M=(O=e.value)!=null?O:e.defaultValue)!=null?M:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=gs(()=>new Set),o=gs(()=>new Map),s=gs(()=>new Map),i=gs(()=>new Set),l=FS(e),{label:u,children:d,value:p,onValueChange:f,filter:m,shouldFilter:h,loop:v,disablePointerSelection:g=!1,vimBindings:b=!0,..._}=e,y=zt(),x=zt(),S=zt(),w=a.useRef(null),I=ZH();No(()=>{if(p!==void 0){let O=p.trim();r.current.value=O,T.emit()}},[p]),No(()=>{I(6,D)},[]);let T=a.useMemo(()=>({subscribe:O=>(i.current.add(O),()=>i.current.delete(O)),snapshot:()=>r.current,setState:(O,M,G)=>{var L,W,B,J;if(!Object.is(r.current[O],M)){if(r.current[O]=M,O==="search")k(),$(),I(1,A);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(S);K?K.focus():(L=document.getElementById(y))==null||L.focus()}if(I(7,()=>{var K;r.current.selectedItemId=(K=z())==null?void 0:K.id,T.emit()}),G||I(5,D),((W=l.current)==null?void 0:W.value)!==void 0){let K=M??"";(J=(B=l.current).onValueChange)==null||J.call(B,K);return}}T.emit()}},emit:()=>{i.current.forEach(O=>O())}}),[]),R=a.useMemo(()=>({value:(O,M,G)=>{var L;M!==((L=s.current.get(O))==null?void 0:L.value)&&(s.current.set(O,{value:M,keywords:G}),r.current.filtered.items.set(O,P(M,G)),I(2,()=>{$(),T.emit()}))},item:(O,M)=>(n.current.add(O),M&&(o.current.has(M)?o.current.get(M).add(O):o.current.set(M,new Set([O]))),I(3,()=>{k(),$(),r.current.value||A(),T.emit()}),()=>{s.current.delete(O),n.current.delete(O),r.current.filtered.items.delete(O);let G=z();I(4,()=>{k(),(G==null?void 0:G.getAttribute("id"))===O&&A(),T.emit()})}),group:O=>(o.current.has(O)||o.current.set(O,new Set),()=>{s.current.delete(O),o.current.delete(O)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:y,inputId:S,labelId:x,listInnerRef:w}),[]);function P(O,M){var G,L;let W=(L=(G=l.current)==null?void 0:G.filter)!=null?L:VH;return O?W(O,r.current.search,M):0}function $(){if(!r.current.search||l.current.shouldFilter===!1)return;let O=r.current.filtered.items,M=[];r.current.filtered.groups.forEach(L=>{let W=o.current.get(L),B=0;W.forEach(J=>{let K=O.get(J);B=Math.max(K,B)}),M.push([L,B])});let G=w.current;X().sort((L,W)=>{var B,J;let K=L.getAttribute("id"),re=W.getAttribute("id");return((B=O.get(re))!=null?B:0)-((J=O.get(K))!=null?J:0)}).forEach(L=>{let W=L.closest(qd);W?W.appendChild(L.parentElement===W?L:L.closest(`${qd} > *`)):G.appendChild(L.parentElement===G?L:L.closest(`${qd} > *`))}),M.sort((L,W)=>W[1]-L[1]).forEach(L=>{var W;let B=(W=w.current)==null?void 0:W.querySelector(`${yi}[${hs}="${encodeURIComponent(L[0])}"]`);B==null||B.parentElement.appendChild(B)})}function A(){let O=X().find(G=>G.getAttribute("aria-disabled")!=="true"),M=O==null?void 0:O.getAttribute(hs);T.setState("value",M||void 0)}function k(){var O,M,G,L;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let W=0;for(let B of n.current){let J=(M=(O=s.current.get(B))==null?void 0:O.value)!=null?M:"",K=(L=(G=s.current.get(B))==null?void 0:G.keywords)!=null?L:[],re=P(J,K);r.current.filtered.items.set(B,re),re>0&&W++}for(let[B,J]of o.current)for(let K of J)if(r.current.filtered.items.get(K)>0){r.current.filtered.groups.add(B);break}r.current.filtered.count=W}function D(){var O,M,G;let L=z();L&&(((O=L.parentElement)==null?void 0:O.firstChild)===L&&((G=(M=L.closest(yi))==null?void 0:M.querySelector(FH))==null||G.scrollIntoView({block:"nearest"})),L.scrollIntoView({block:"nearest"}))}function z(){var O;return(O=w.current)==null?void 0:O.querySelector(`${DS}[aria-selected="true"]`)}function X(){var O;return Array.from(((O=w.current)==null?void 0:O.querySelectorAll(u_))||[])}function V(O){let M=X()[O];M&&T.setState("value",M.getAttribute(hs))}function Y(O){var M;let G=z(),L=X(),W=L.findIndex(J=>J===G),B=L[W+O];(M=l.current)!=null&&M.loop&&(B=W+O<0?L[L.length-1]:W+O===L.length?L[0]:L[W+O]),B&&T.setState("value",B.getAttribute(hs))}function U(O){let M=z(),G=M==null?void 0:M.closest(yi),L;for(;G&&!L;)G=O>0?YH(G,yi):JH(G,yi),L=G==null?void 0:G.querySelector(u_);L?T.setState("value",L.getAttribute(hs)):Y(O)}let F=()=>V(X().length-1),H=O=>{O.preventDefault(),O.metaKey?F():O.altKey?U(1):Y(1)},ee=O=>{O.preventDefault(),O.metaKey?V(0):O.altKey?U(-1):Y(-1)};return a.createElement(oo.div,{ref:t,tabIndex:-1,..._,"cmdk-root":"",onKeyDown:O=>{var M;(M=_.onKeyDown)==null||M.call(_,O);let G=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||G))switch(O.key){case"n":case"j":{b&&O.ctrlKey&&H(O);break}case"ArrowDown":{H(O);break}case"p":case"k":{b&&O.ctrlKey&&ee(O);break}case"ArrowUp":{ee(O);break}case"Home":{O.preventDefault(),V(0);break}case"End":{O.preventDefault(),F();break}case"Enter":{O.preventDefault();let L=z();if(L){let W=new Event(Af);L.dispatchEvent(W)}}}}},a.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:e5},u),Ru(e,O=>a.createElement(MS.Provider,{value:T},a.createElement(kS.Provider,{value:R},O))))}),BH=a.forwardRef((e,t)=>{var r,n;let o=zt(),s=a.useRef(null),i=a.useContext(LS),l=Na(),u=FS(e),d=(n=(r=u.current)==null?void 0:r.forceMount)!=null?n:i==null?void 0:i.forceMount;No(()=>{if(!d)return l.item(o,i==null?void 0:i.id)},[d]);let p=VS(o,s,[e.value,e.children,s],e.keywords),f=Yh(),m=to(I=>I.value&&I.value===p.current),h=to(I=>d||l.filter()===!1?!0:I.search?I.filtered.items.get(o)>0:!0);a.useEffect(()=>{let I=s.current;if(!(!I||e.disabled))return I.addEventListener(Af,v),()=>I.removeEventListener(Af,v)},[h,e.onSelect,e.disabled]);function v(){var I,T;g(),(T=(I=u.current).onSelect)==null||T.call(I,p.current)}function g(){f.setState("value",p.current,!0)}if(!h)return null;let{disabled:b,value:_,onSelect:y,forceMount:x,keywords:S,...w}=e;return a.createElement(oo.div,{ref:_r(s,t),...w,id:o,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!m,"data-disabled":!!b,"data-selected":!!m,onPointerMove:b||l.getDisablePointerSelection()?void 0:g,onClick:b?void 0:v},e.children)}),HH=a.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...s}=e,i=zt(),l=a.useRef(null),u=a.useRef(null),d=zt(),p=Na(),f=to(h=>o||p.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);No(()=>p.group(i),[]),VS(i,l,[e.value,e.heading,u]);let m=a.useMemo(()=>({id:i,forceMount:o}),[o]);return a.createElement(oo.div,{ref:_r(l,t),...s,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},r&&a.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:d},r),Ru(e,h=>a.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?d:void 0},a.createElement(LS.Provider,{value:m},h))))}),UH=a.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=a.useRef(null),s=to(i=>!i.search);return!r&&!s?null:a.createElement(oo.div,{ref:_r(o,t),...n,"cmdk-separator":"",role:"separator"})}),WH=a.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=e.value!=null,s=Yh(),i=to(d=>d.search),l=to(d=>d.selectedItemId),u=Na();return a.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),a.createElement(oo.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:o?e.value:i,onChange:d=>{o||s.setState("search",d.target.value),r==null||r(d.target.value)}})}),qH=a.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...o}=e,s=a.useRef(null),i=a.useRef(null),l=to(d=>d.selectedItemId),u=Na();return a.useEffect(()=>{if(i.current&&s.current){let d=i.current,p=s.current,f,m=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let h=d.offsetHeight;p.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return m.observe(d),()=>{cancelAnimationFrame(f),m.unobserve(d)}}},[]),a.createElement(oo.div,{ref:_r(s,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:u.listId},Ru(e,d=>a.createElement("div",{ref:_r(i,u.listInnerRef),"cmdk-list-sizer":""},d)))}),GH=a.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:s,container:i,...l}=e;return a.createElement(Eu,{open:r,onOpenChange:n},a.createElement(ja,{container:i},a.createElement(Wo,{"cmdk-overlay":"",className:o}),a.createElement(qo,{"aria-label":e.label,"cmdk-dialog":"",className:s},a.createElement(zS,{ref:t,...l}))))}),KH=a.forwardRef((e,t)=>to(r=>r.filtered.count===0)?a.createElement(oo.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),XH=a.forwardRef((e,t)=>{let{progress:r,children:n,label:o="Loading...",...s}=e;return a.createElement(oo.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Ru(e,i=>a.createElement("div",{"aria-hidden":!0},i)))}),$r=Object.assign(zS,{List:qH,Item:BH,Input:WH,Group:HH,Separator:UH,Dialog:GH,Empty:KH,Loading:XH});function YH(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function JH(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function FS(e){let t=a.useRef(e);return No(()=>{t.current=e}),t}var No=typeof window>"u"?a.useEffect:a.useLayoutEffect;function gs(e){let t=a.useRef();return t.current===void 0&&(t.current=e()),t}function to(e){let t=Yh(),r=()=>e(t.snapshot());return a.useSyncExternalStore(t.subscribe,r,r)}function VS(e,t,r,n=[]){let o=a.useRef(),s=Na();return No(()=>{var i;let l=(()=>{var d;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(d=p.current.textContent)==null?void 0:d.trim():o.current}})(),u=n.map(d=>d.trim());s.value(e,l,u),(i=t.current)==null||i.setAttribute(hs,l),o.current=l}),o}var ZH=()=>{let[e,t]=a.useState(),r=gs(()=>new Map);return No(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,o)=>{r.current.set(n,o),t({})}};function QH(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Ru({asChild:e,children:t},r){return e&&a.isValidElement(t)?a.cloneElement(QH(t),{ref:t.ref},r(t.props.children)):r(t)}var e5={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const t5=Eu,Sre=Uh,r5=ja,BS=a.forwardRef(({className:e,...t},r)=>c.jsx(Wo,{ref:r,className:ve("fixed inset-0 z-[1200] bg-slate-900/60 backdrop-blur-sm","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));BS.displayName=Wo.displayName;const HS=a.forwardRef(({className:e,children:t,...r},n)=>{const{t:o}=ga();return c.jsxs(r5,{children:[c.jsx(BS,{}),c.jsxs(qo,{ref:n,className:ve("fixed left-[50%] top-[50%] z-[1300] grid max-h-[85vh] w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 overflow-y-auto border border-border bg-bg-elevated p-6 shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","sm:rounded-lg",e),...r,children:[t,c.jsxs(Oa,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-bg-base transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[c.jsx(jh,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:o("ui.dialog.close","Закрыть")})]})]})]})});HS.displayName=qo.displayName;const n5=({className:e,...t})=>c.jsx("div",{className:ve("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});n5.displayName="DialogHeader";const o5=({className:e,...t})=>c.jsx("div",{className:ve("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});o5.displayName="DialogFooter";const s5=a.forwardRef(({className:e,...t},r)=>c.jsx(ai,{ref:r,className:ve("text-lg font-semibold leading-snug tracking-tight",e),...t}));s5.displayName=ai.displayName;const i5=a.forwardRef(({className:e,...t},r)=>c.jsx(li,{ref:r,className:ve("text-sm text-text-muted",e),...t}));i5.displayName=li.displayName;const US=a.forwardRef(({className:e,...t},r)=>c.jsx($r,{ref:r,className:ve("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));US.displayName=$r.displayName;function Cre({children:e,...t}){return c.jsx(t5,{...t,children:c.jsx(HS,{className:"overflow-hidden p-0 shadow-lg",children:c.jsx(US,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})})}const a5=a.forwardRef(({className:e,...t},r)=>c.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[c.jsx(S2,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),c.jsx($r.Input,{ref:r,className:ve("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));a5.displayName=$r.Input.displayName;const l5=a.forwardRef(({className:e,...t},r)=>c.jsx($r.List,{ref:r,className:ve("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));l5.displayName=$r.List.displayName;const c5=a.forwardRef((e,t)=>c.jsx($r.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));c5.displayName=$r.Empty.displayName;const u5=a.forwardRef(({className:e,...t},r)=>c.jsx($r.Group,{ref:r,className:ve("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));u5.displayName=$r.Group.displayName;const d5=a.forwardRef(({className:e,...t},r)=>c.jsx($r.Separator,{ref:r,className:ve("-mx-1 h-px bg-border",e),...t}));d5.displayName=$r.Separator.displayName;const p5=a.forwardRef(({className:e,...t},r)=>c.jsx($r.Item,{ref:r,className:ve("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...t}));p5.displayName=$r.Item.displayName;var f5="Arrow",WS=a.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return c.jsx(Ke.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});WS.displayName=f5;var m5=WS,Jh="Popper",[qS,so]=Xt(Jh),[h5,GS]=qS(Jh),KS=e=>{const{__scopePopper:t,children:r}=e,[n,o]=a.useState(null);return c.jsx(h5,{scope:t,anchor:n,onAnchorChange:o,children:r})};KS.displayName=Jh;var XS="PopperAnchor",YS=a.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=GS(XS,r),i=a.useRef(null),l=tt(t,i),u=a.useRef(null);return a.useEffect(()=>{const d=u.current;u.current=(n==null?void 0:n.current)||i.current,d!==u.current&&s.onAnchorChange(u.current)}),n?null:c.jsx(Ke.div,{...o,ref:l})});YS.displayName=XS;var Zh="PopperContent",[g5,v5]=qS(Zh),JS=a.forwardRef((e,t)=>{var B,J,K,re,se,Z;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:h="optimized",onPlaced:v,...g}=e,b=GS(Zh,r),[_,y]=a.useState(null),x=tt(t,ne=>y(ne)),[S,w]=a.useState(null),I=Cu(S),T=(I==null?void 0:I.width)??0,R=(I==null?void 0:I.height)??0,P=n+(s!=="center"?"-"+s:""),$=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},A=Array.isArray(d)?d:[d],k=A.length>0,D={padding:$,boundary:A.filter(_5),altBoundary:k},{refs:z,floatingStyles:X,placement:V,isPositioned:Y,middlewareData:U}=A$({strategy:"fixed",placement:P,whileElementsMounted:(...ne)=>L$(...ne,{animationFrame:h==="always"}),elements:{reference:b.anchor},middleware:[j$({mainAxis:o+R,alignmentAxis:i}),u&&O$({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?z$():void 0,...D}),u&&N$({...D}),D$({...D,apply:({elements:ne,rects:ie,availableWidth:he,availableHeight:me})=>{const{width:Pe,height:Se}=ie.reference,Ce=ne.floating.style;Ce.setProperty("--radix-popper-available-width",`${he}px`),Ce.setProperty("--radix-popper-available-height",`${me}px`),Ce.setProperty("--radix-popper-anchor-width",`${Pe}px`),Ce.setProperty("--radix-popper-anchor-height",`${Se}px`)}}),S&&k$({element:S,padding:l}),y5({arrowWidth:T,arrowHeight:R}),m&&M$({strategy:"referenceHidden",...D})]}),[F,H]=eC(V),ee=Kt(v);kt(()=>{Y&&(ee==null||ee())},[Y,ee]);const O=(B=U.arrow)==null?void 0:B.x,M=(J=U.arrow)==null?void 0:J.y,G=((K=U.arrow)==null?void 0:K.centerOffset)!==0,[L,W]=a.useState();return kt(()=>{_&&W(window.getComputedStyle(_).zIndex)},[_]),c.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:Y?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[(re=U.transformOrigin)==null?void 0:re.x,(se=U.transformOrigin)==null?void 0:se.y].join(" "),...((Z=U.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(g5,{scope:r,placedSide:F,onArrowChange:w,arrowX:O,arrowY:M,shouldHideArrow:G,children:c.jsx(Ke.div,{"data-side":F,"data-align":H,...g,ref:x,style:{...g.style,animation:Y?void 0:"none"}})})})});JS.displayName=Zh;var ZS="PopperArrow",b5={top:"bottom",right:"left",bottom:"top",left:"right"},QS=a.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=v5(ZS,n),i=b5[s.placedSide];return c.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsx(m5,{...o,ref:r,style:{...o.style,display:"block"}})})});QS.displayName=ZS;function _5(e){return e!==null}var y5=e=>({name:"transformOrigin",options:e,fn(t){var b,_,y;const{placement:r,rects:n,middlewareData:o}=t,i=((b=o.arrow)==null?void 0:b.centerOffset)!==0,l=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,p]=eC(r),f={start:"0%",center:"50%",end:"100%"}[p],m=(((_=o.arrow)==null?void 0:_.x)??0)+l/2,h=(((y=o.arrow)==null?void 0:y.y)??0)+u/2;let v="",g="";return d==="bottom"?(v=i?f:`${m}px`,g=`${-u}px`):d==="top"?(v=i?f:`${m}px`,g=`${n.floating.height+u}px`):d==="right"?(v=`${-u}px`,g=i?f:`${h}px`):d==="left"&&(v=`${n.floating.width+u}px`,g=i?f:`${h}px`),{data:{x:v,y:g}}}});function eC(e){const[t,r="center"]=e.split("-");return[t,r]}var Tu=KS,Da=YS,Iu=JS,$u=QS;function x5(e){const t=w5(e),r=a.forwardRef((n,o)=>{const{children:s,...i}=n,l=a.Children.toArray(s),u=l.find(S5);if(u){const d=u.props.children,p=l.map(f=>f===u?a.Children.count(d)>1?a.Children.only(null):a.isValidElement(d)?d.props.children:null:f);return c.jsx(t,{...i,ref:o,children:a.isValidElement(d)?a.cloneElement(d,void 0,p):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function w5(e){const t=a.forwardRef((r,n)=>{const{children:o,...s}=r;if(a.isValidElement(o)){const i=P5(o),l=C5(s,o.props);return o.type!==a.Fragment&&(l.ref=n?_r(n,i):i),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var E5=Symbol("radix.slottable");function S5(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===E5}function C5(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...l)=>{const u=s(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function P5(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Au="Popover",[tC]=Xt(Au,[so]),ka=so(),[R5,io]=tC(Au),rC=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,l=ka(t),u=a.useRef(null),[d,p]=a.useState(!1),[f,m]=Tr({prop:n,defaultProp:o??!1,onChange:s,caller:Au});return c.jsx(Tu,{...l,children:c.jsx(R5,{scope:t,contentId:zt(),triggerRef:u,open:f,onOpenChange:m,onOpenToggle:a.useCallback(()=>m(h=>!h),[m]),hasCustomAnchor:d,onCustomAnchorAdd:a.useCallback(()=>p(!0),[]),onCustomAnchorRemove:a.useCallback(()=>p(!1),[]),modal:i,children:r})})};rC.displayName=Au;var nC="PopoverAnchor",T5=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=io(nC,r),s=ka(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return a.useEffect(()=>(i(),()=>l()),[i,l]),c.jsx(Da,{...s,...n,ref:t})});T5.displayName=nC;var oC="PopoverTrigger",sC=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=io(oC,r),s=ka(r),i=tt(t,o.triggerRef),l=c.jsx(Ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":uC(o.open),...n,ref:i,onClick:Ie(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:c.jsx(Da,{asChild:!0,...s,children:l})});sC.displayName=oC;var Qh="PopoverPortal",[I5,$5]=tC(Qh,{forceMount:void 0}),iC=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,s=io(Qh,t);return c.jsx(I5,{scope:t,forceMount:r,children:c.jsx(Vt,{present:r||s.open,children:c.jsx(ii,{asChild:!0,container:o,children:n})})})};iC.displayName=Qh;var Bs="PopoverContent",aC=a.forwardRef((e,t)=>{const r=$5(Bs,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,s=io(Bs,e.__scopePopover);return c.jsx(Vt,{present:n||s.open,children:s.modal?c.jsx(j5,{...o,ref:t}):c.jsx(O5,{...o,ref:t})})});aC.displayName=Bs;var A5=x5("PopoverContent.RemoveScroll"),j5=a.forwardRef((e,t)=>{const r=io(Bs,e.__scopePopover),n=a.useRef(null),o=tt(t,n),s=a.useRef(!1);return a.useEffect(()=>{const i=n.current;if(i)return xu(i)},[]),c.jsx(Aa,{as:A5,allowPinchZoom:!0,children:c.jsx(lC,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ie(e.onCloseAutoFocus,i=>{var l;i.preventDefault(),s.current||(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Ie(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Ie(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),O5=a.forwardRef((e,t)=>{const r=io(Bs,e.__scopePopover),n=a.useRef(!1),o=a.useRef(!1);return c.jsx(lC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),lC=a.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:p,...f}=e,m=io(Bs,r),h=ka(r);return _u(),c.jsx($a,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsx(si,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:p,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>m.onOpenChange(!1),children:c.jsx(Iu,{"data-state":uC(m.open),role:"dialog",id:m.contentId,...h,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),cC="PopoverClose",N5=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=io(cC,r);return c.jsx(Ke.button,{type:"button",...n,ref:t,onClick:Ie(e.onClick,()=>o.onOpenChange(!1))})});N5.displayName=cC;var D5="PopoverArrow",k5=a.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=ka(r);return c.jsx($u,{...o,...n,ref:t})});k5.displayName=D5;function uC(e){return e?"open":"closed"}var M5=rC,L5=sC,z5=iC,dC=aC;const pC=M5,fC=L5,eg=a.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>c.jsx(z5,{children:c.jsx(dC,{ref:o,align:t,sideOffset:r,className:ve("z-[1400] w-72 rounded-md border border-border bg-bg-elevated p-4 text-text shadow-md outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",e),...n})}));eg.displayName=dC.displayName;function F5(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const V5=N.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Ma=()=>{const e=N.useContext(V5);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};F5(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
[data-state=closed]
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function B5(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function H5(...e){return t=>e.forEach(r=>B5(r,t))}function mC(...e){return a.useCallback(H5(...e),e)}const d_=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Gd(e,t){if(!e)return()=>{};const r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}function U5(...e){return(...t)=>{for(const r of e)typeof r=="function"&&r(...t)}}const Kd={DURATION:.5,EASE:[.32,.72,0,1]},W5=8,q5=26,G5=()=>()=>{};function K5(){const{direction:e,isOpen:t,shouldScaleBackground:r,setBackgroundColorOnScale:n,noBodyStyles:o}=Ma(),s=N.useRef(null),i=a.useMemo(()=>document.body.style.backgroundColor,[]);function l(){return(window.innerWidth-q5)/window.innerWidth}N.useEffect(()=>{if(t&&r){s.current&&clearTimeout(s.current);const u=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!u)return;U5(n&&!o?Gd(document.body,{background:"black"}):G5,Gd(u,{transformOrigin:d_(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Kd.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Kd.EASE.join(",")})`}));const d=Gd(u,{borderRadius:`${W5}px`,overflow:"hidden",...d_(e)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{d(),s.current=window.setTimeout(()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")},Kd.DURATION*1e3)}}},[t,r,i])}const hC=N.forwardRef(function({...e},t){const{overlayRef:r,snapPoints:n,onRelease:o,shouldFade:s,isOpen:i,modal:l,shouldAnimate:u}=Ma(),d=mC(t,r),p=n&&n.length>0;if(!l)return null;const f=N.useCallback(m=>o(m),[o]);return N.createElement(Wo,{onMouseUp:f,ref:d,"data-vaul-overlay":"","data-vaul-snap-points":i&&p?"true":"false","data-vaul-snap-points-overlay":i&&s?"true":"false","data-vaul-animate":u!=null&&u.current?"true":"false",...e})});hC.displayName="Drawer.Overlay";const gC=N.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:r,...n},o){const{drawerRef:s,onPress:i,onRelease:l,onDrag:u,keyboardIsOpen:d,snapPointsOffset:p,activeSnapPointIndex:f,modal:m,isOpen:h,direction:v,snapPoints:g,container:b,handleOnly:_,shouldAnimate:y,autoFocus:x}=Ma(),[S,w]=N.useState(!1),I=mC(o,s),T=N.useRef(null),R=N.useRef(null),P=N.useRef(!1),$=g&&g.length>0;K5();const A=(D,z,X=0)=>{if(P.current)return!0;const V=Math.abs(D.y),Y=Math.abs(D.x),U=Y>V,F=["bottom","right"].includes(z)?1:-1;if(z==="left"||z==="right"){if(!(D.x*F<0)&&Y>=0&&Y<=X)return U}else if(!(D.y*F<0)&&V>=0&&V<=X)return!U;return P.current=!0,!0};N.useEffect(()=>{$&&window.requestAnimationFrame(()=>{w(!0)})},[]);function k(D){T.current=null,P.current=!1,l(D)}return N.createElement(qo,{"data-vaul-drawer-direction":v,"data-vaul-drawer":"","data-vaul-delayed-snap-points":S?"true":"false","data-vaul-snap-points":h&&$?"true":"false","data-vaul-custom-container":b?"true":"false","data-vaul-animate":y!=null&&y.current?"true":"false",...n,ref:I,style:p&&p.length>0?{"--snap-point-height":`${p[f??0]}px`,...t}:t,onPointerDown:D=>{_||(n.onPointerDown==null||n.onPointerDown.call(n,D),T.current={x:D.pageX,y:D.pageY},i(D))},onOpenAutoFocus:D=>{r==null||r(D),x||D.preventDefault()},onPointerDownOutside:D=>{if(e==null||e(D),!m||D.defaultPrevented){D.preventDefault();return}d.current&&(d.current=!1)},onFocusOutside:D=>{if(!m){D.preventDefault();return}},onPointerMove:D=>{if(R.current=D,_||(n.onPointerMove==null||n.onPointerMove.call(n,D),!T.current))return;const z=D.pageY-T.current.y,X=D.pageX-T.current.x,V=D.pointerType==="touch"?10:2;A({x:X,y:z},v,V)?u(D):(Math.abs(X)>V||Math.abs(z)>V)&&(T.current=null)},onPointerUp:D=>{n.onPointerUp==null||n.onPointerUp.call(n,D),T.current=null,P.current=!1,l(D)},onPointerOut:D=>{n.onPointerOut==null||n.onPointerOut.call(n,D),k(R.current)},onContextMenu:D=>{n.onContextMenu==null||n.onContextMenu.call(n,D),R.current&&k(R.current)}})});gC.displayName="Drawer.Content";const X5=250,Y5=120,J5=N.forwardRef(function({preventCycle:e=!1,children:t,...r},n){const{closeDrawer:o,isDragging:s,snapPoints:i,activeSnapPoint:l,setActiveSnapPoint:u,dismissible:d,handleOnly:p,isOpen:f,onPress:m,onDrag:h}=Ma(),v=N.useRef(null),g=N.useRef(!1);function b(){if(g.current){x();return}window.setTimeout(()=>{_()},Y5)}function _(){if(s||e||g.current){x();return}if(x(),!i||i.length===0){d||o();return}if(l===i[i.length-1]&&d){o();return}const w=i.findIndex(T=>T===l);if(w===-1)return;const I=i[w+1];u(I)}function y(){v.current=window.setTimeout(()=>{g.current=!0},X5)}function x(){v.current&&window.clearTimeout(v.current),g.current=!1}return N.createElement("div",{onClick:b,onPointerCancel:x,onPointerDown:S=>{p&&m(S),y()},onPointerMove:S=>{p&&h(S)},ref:n,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...r},N.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});J5.displayName="Drawer.Handle";function Z5(e){const t=Ma(),{container:r=t.container,...n}=e;return N.createElement(ja,{container:r,...n})}const ao={Content:gC,Overlay:hC,Portal:Z5,Title:ai,Description:li},Q5=ao.Portal,vC=a.forwardRef(({className:e,...t},r)=>c.jsx(ao.Overlay,{ref:r,className:ve("fixed inset-0 z-50 bg-black/80",e),...t}));vC.displayName=ao.Overlay.displayName;const e3=a.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(Q5,{children:[c.jsx(vC,{}),c.jsxs(ao.Content,{ref:n,className:ve("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border border-border bg-background",e),...r,children:[c.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));e3.displayName="DrawerContent";const t3=a.forwardRef(({className:e,...t},r)=>c.jsx(ao.Title,{ref:r,className:ve("text-lg font-semibold leading-none tracking-tight",e),...t}));t3.displayName=ao.Title.displayName;const r3=a.forwardRef(({className:e,...t},r)=>c.jsx(ao.Description,{ref:r,className:ve("text-sm text-muted-foreground",e),...t}));r3.displayName=ao.Description.displayName;var Xd="rovingFocusGroup.onEntryFocus",n3={bubbles:!1,cancelable:!0},La="RovingFocusGroup",[jf,bC,o3]=hu(La),[s3,ui]=Xt(La,[o3]),[i3,a3]=s3(La),_C=a.forwardRef((e,t)=>c.jsx(jf.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(jf.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(l3,{...e,ref:t})})}));_C.displayName=La;var l3=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:p=!1,...f}=e,m=a.useRef(null),h=tt(t,m),v=Uo(s),[g,b]=Tr({prop:i,defaultProp:l??null,onChange:u,caller:La}),[_,y]=a.useState(!1),x=Kt(d),S=bC(r),w=a.useRef(!1),[I,T]=a.useState(0);return a.useEffect(()=>{const R=m.current;if(R)return R.addEventListener(Xd,x),()=>R.removeEventListener(Xd,x)},[x]),c.jsx(i3,{scope:r,orientation:n,dir:v,loop:o,currentTabStopId:g,onItemFocus:a.useCallback(R=>b(R),[b]),onItemShiftTab:a.useCallback(()=>y(!0),[]),onFocusableItemAdd:a.useCallback(()=>T(R=>R+1),[]),onFocusableItemRemove:a.useCallback(()=>T(R=>R-1),[]),children:c.jsx(Ke.div,{tabIndex:_||I===0?-1:0,"data-orientation":n,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:Ie(e.onMouseDown,()=>{w.current=!0}),onFocus:Ie(e.onFocus,R=>{const P=!w.current;if(R.target===R.currentTarget&&P&&!_){const $=new CustomEvent(Xd,n3);if(R.currentTarget.dispatchEvent($),!$.defaultPrevented){const A=S().filter(V=>V.focusable),k=A.find(V=>V.active),D=A.find(V=>V.id===g),X=[k,D,...A].filter(Boolean).map(V=>V.ref.current);wC(X,p)}}w.current=!1}),onBlur:Ie(e.onBlur,()=>y(!1))})})}),yC="RovingFocusGroupItem",xC=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,children:i,...l}=e,u=zt(),d=s||u,p=a3(yC,r),f=p.currentTabStopId===d,m=bC(r),{onFocusableItemAdd:h,onFocusableItemRemove:v,currentTabStopId:g}=p;return a.useEffect(()=>{if(n)return h(),()=>v()},[n,h,v]),c.jsx(jf.ItemSlot,{scope:r,id:d,focusable:n,active:o,children:c.jsx(Ke.span,{tabIndex:f?0:-1,"data-orientation":p.orientation,...l,ref:t,onMouseDown:Ie(e.onMouseDown,b=>{n?p.onItemFocus(d):b.preventDefault()}),onFocus:Ie(e.onFocus,()=>p.onItemFocus(d)),onKeyDown:Ie(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){p.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const _=d3(b,p.orientation,p.dir);if(_!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let x=m().filter(S=>S.focusable).map(S=>S.ref.current);if(_==="last")x.reverse();else if(_==="prev"||_==="next"){_==="prev"&&x.reverse();const S=x.indexOf(b.currentTarget);x=p.loop?p3(x,S+1):x.slice(S+1)}setTimeout(()=>wC(x))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:g!=null}):i})})});xC.displayName=yC;var c3={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function u3(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function d3(e,t,r){const n=u3(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return c3[n]}function wC(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function p3(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var tg=_C,rg=xC;function f3(e){const t=m3(e),r=a.forwardRef((n,o)=>{const{children:s,...i}=n,l=a.Children.toArray(s),u=l.find(g3);if(u){const d=u.props.children,p=l.map(f=>f===u?a.Children.count(d)>1?a.Children.only(null):a.isValidElement(d)?d.props.children:null:f);return c.jsx(t,{...i,ref:o,children:a.isValidElement(d)?a.cloneElement(d,void 0,p):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function m3(e){const t=a.forwardRef((r,n)=>{const{children:o,...s}=r;if(a.isValidElement(o)){const i=b3(o),l=v3(s,o.props);return o.type!==a.Fragment&&(l.ref=n?_r(n,i):i),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var h3=Symbol("radix.slottable");function g3(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===h3}function v3(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...l)=>{const u=s(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function b3(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Of=["Enter"," "],_3=["ArrowDown","PageUp","Home"],EC=["ArrowUp","PageDown","End"],y3=[..._3,...EC],x3={ltr:[...Of,"ArrowRight"],rtl:[...Of,"ArrowLeft"]},w3={ltr:["ArrowLeft"],rtl:["ArrowRight"]},za="Menu",[aa,E3,S3]=hu(za),[Go,SC]=Xt(za,[S3,so,ui]),ju=so(),CC=ui(),[C3,Ko]=Go(za),[P3,Fa]=Go(za),PC=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:s,modal:i=!0}=e,l=ju(t),[u,d]=a.useState(null),p=a.useRef(!1),f=Kt(s),m=Uo(o);return a.useEffect(()=>{const h=()=>{p.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>p.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),c.jsx(Tu,{...l,children:c.jsx(C3,{scope:t,open:r,onOpenChange:f,content:u,onContentChange:d,children:c.jsx(P3,{scope:t,onClose:a.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:p,dir:m,modal:i,children:n})})})};PC.displayName=za;var R3="MenuAnchor",ng=a.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=ju(r);return c.jsx(Da,{...o,...n,ref:t})});ng.displayName=R3;var og="MenuPortal",[T3,RC]=Go(og,{forceMount:void 0}),TC=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,s=Ko(og,t);return c.jsx(T3,{scope:t,forceMount:r,children:c.jsx(Vt,{present:r||s.open,children:c.jsx(ii,{asChild:!0,container:o,children:n})})})};TC.displayName=og;var qr="MenuContent",[I3,sg]=Go(qr),IC=a.forwardRef((e,t)=>{const r=RC(qr,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,s=Ko(qr,e.__scopeMenu),i=Fa(qr,e.__scopeMenu);return c.jsx(aa.Provider,{scope:e.__scopeMenu,children:c.jsx(Vt,{present:n||s.open,children:c.jsx(aa.Slot,{scope:e.__scopeMenu,children:i.modal?c.jsx($3,{...o,ref:t}):c.jsx(A3,{...o,ref:t})})})})}),$3=a.forwardRef((e,t)=>{const r=Ko(qr,e.__scopeMenu),n=a.useRef(null),o=tt(t,n);return a.useEffect(()=>{const s=n.current;if(s)return xu(s)},[]),c.jsx(ig,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Ie(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),A3=a.forwardRef((e,t)=>{const r=Ko(qr,e.__scopeMenu);return c.jsx(ig,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),j3=f3("MenuContent.ScrollLock"),ig=a.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:m,onDismiss:h,disableOutsideScroll:v,...g}=e,b=Ko(qr,r),_=Fa(qr,r),y=ju(r),x=CC(r),S=E3(r),[w,I]=a.useState(null),T=a.useRef(null),R=tt(t,T,b.onContentChange),P=a.useRef(0),$=a.useRef(""),A=a.useRef(0),k=a.useRef(null),D=a.useRef("right"),z=a.useRef(0),X=v?Aa:a.Fragment,V=v?{as:j3,allowPinchZoom:!0}:void 0,Y=F=>{var B,J;const H=$.current+F,ee=S().filter(K=>!K.disabled),O=document.activeElement,M=(B=ee.find(K=>K.ref.current===O))==null?void 0:B.textValue,G=ee.map(K=>K.textValue),L=U3(G,H,M),W=(J=ee.find(K=>K.textValue===L))==null?void 0:J.ref.current;(function K(re){$.current=re,window.clearTimeout(P.current),re!==""&&(P.current=window.setTimeout(()=>K(""),1e3))})(H),W&&setTimeout(()=>W.focus())};a.useEffect(()=>()=>window.clearTimeout(P.current),[]),_u();const U=a.useCallback(F=>{var ee,O;return D.current===((ee=k.current)==null?void 0:ee.side)&&q3(F,(O=k.current)==null?void 0:O.area)},[]);return c.jsx(I3,{scope:r,searchRef:$,onItemEnter:a.useCallback(F=>{U(F)&&F.preventDefault()},[U]),onItemLeave:a.useCallback(F=>{var H;U(F)||((H=T.current)==null||H.focus(),I(null))},[U]),onTriggerLeave:a.useCallback(F=>{U(F)&&F.preventDefault()},[U]),pointerGraceTimerRef:A,onPointerGraceIntentChange:a.useCallback(F=>{k.current=F},[]),children:c.jsx(X,{...V,children:c.jsx($a,{asChild:!0,trapped:o,onMountAutoFocus:Ie(s,F=>{var H;F.preventDefault(),(H=T.current)==null||H.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:c.jsx(si,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:m,onDismiss:h,children:c.jsx(tg,{asChild:!0,...x,dir:_.dir,orientation:"vertical",loop:n,currentTabStopId:w,onCurrentTabStopIdChange:I,onEntryFocus:Ie(u,F=>{_.isUsingKeyboardRef.current||F.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(Iu,{role:"menu","aria-orientation":"vertical","data-state":WC(b.open),"data-radix-menu-content":"",dir:_.dir,...y,...g,ref:R,style:{outline:"none",...g.style},onKeyDown:Ie(g.onKeyDown,F=>{const ee=F.target.closest("[data-radix-menu-content]")===F.currentTarget,O=F.ctrlKey||F.altKey||F.metaKey,M=F.key.length===1;ee&&(F.key==="Tab"&&F.preventDefault(),!O&&M&&Y(F.key));const G=T.current;if(F.target!==G||!y3.includes(F.key))return;F.preventDefault();const W=S().filter(B=>!B.disabled).map(B=>B.ref.current);EC.includes(F.key)&&W.reverse(),B3(W)}),onBlur:Ie(e.onBlur,F=>{F.currentTarget.contains(F.target)||(window.clearTimeout(P.current),$.current="")}),onPointerMove:Ie(e.onPointerMove,la(F=>{const H=F.target,ee=z.current!==F.clientX;if(F.currentTarget.contains(H)&&ee){const O=F.clientX>z.current?"right":"left";D.current=O,z.current=F.clientX}}))})})})})})})});IC.displayName=qr;var O3="MenuGroup",ag=a.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Ke.div,{role:"group",...n,ref:t})});ag.displayName=O3;var N3="MenuLabel",$C=a.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Ke.div,{...n,ref:t})});$C.displayName=N3;var lc="MenuItem",p_="menu.itemSelect",Ou=a.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,s=a.useRef(null),i=Fa(lc,e.__scopeMenu),l=sg(lc,e.__scopeMenu),u=tt(t,s),d=a.useRef(!1),p=()=>{const f=s.current;if(!r&&f){const m=new CustomEvent(p_,{bubbles:!0,cancelable:!0});f.addEventListener(p_,h=>n==null?void 0:n(h),{once:!0}),eE(f,m),m.defaultPrevented?d.current=!1:i.onClose()}};return c.jsx(AC,{...o,ref:u,disabled:r,onClick:Ie(e.onClick,p),onPointerDown:f=>{var m;(m=e.onPointerDown)==null||m.call(e,f),d.current=!0},onPointerUp:Ie(e.onPointerUp,f=>{var m;d.current||(m=f.currentTarget)==null||m.click()}),onKeyDown:Ie(e.onKeyDown,f=>{const m=l.searchRef.current!=="";r||m&&f.key===" "||Of.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Ou.displayName=lc;var AC=a.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...s}=e,i=sg(lc,r),l=CC(r),u=a.useRef(null),d=tt(t,u),[p,f]=a.useState(!1),[m,h]=a.useState("");return a.useEffect(()=>{const v=u.current;v&&h((v.textContent??"").trim())},[s.children]),c.jsx(aa.ItemSlot,{scope:r,disabled:n,textValue:o??m,children:c.jsx(rg,{asChild:!0,...l,focusable:!n,children:c.jsx(Ke.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...s,ref:d,onPointerMove:Ie(e.onPointerMove,la(v=>{n?i.onItemLeave(v):(i.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ie(e.onPointerLeave,la(v=>i.onItemLeave(v))),onFocus:Ie(e.onFocus,()=>f(!0)),onBlur:Ie(e.onBlur,()=>f(!1))})})})}),D3="MenuCheckboxItem",jC=a.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return c.jsx(MC,{scope:e.__scopeMenu,checked:r,children:c.jsx(Ou,{role:"menuitemcheckbox","aria-checked":cc(r)?"mixed":r,...o,ref:t,"data-state":cg(r),onSelect:Ie(o.onSelect,()=>n==null?void 0:n(cc(r)?!0:!r),{checkForDefaultPrevented:!1})})})});jC.displayName=D3;var OC="MenuRadioGroup",[k3,M3]=Go(OC,{value:void 0,onValueChange:()=>{}}),NC=a.forwardRef((e,t)=>{const{value:r,onValueChange:n,...o}=e,s=Kt(n);return c.jsx(k3,{scope:e.__scopeMenu,value:r,onValueChange:s,children:c.jsx(ag,{...o,ref:t})})});NC.displayName=OC;var DC="MenuRadioItem",kC=a.forwardRef((e,t)=>{const{value:r,...n}=e,o=M3(DC,e.__scopeMenu),s=r===o.value;return c.jsx(MC,{scope:e.__scopeMenu,checked:s,children:c.jsx(Ou,{role:"menuitemradio","aria-checked":s,...n,ref:t,"data-state":cg(s),onSelect:Ie(n.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,r)},{checkForDefaultPrevented:!1})})})});kC.displayName=DC;var lg="MenuItemIndicator",[MC,L3]=Go(lg,{checked:!1}),LC=a.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,s=L3(lg,r);return c.jsx(Vt,{present:n||cc(s.checked)||s.checked===!0,children:c.jsx(Ke.span,{...o,ref:t,"data-state":cg(s.checked)})})});LC.displayName=lg;var z3="MenuSeparator",zC=a.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Ke.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});zC.displayName=z3;var F3="MenuArrow",FC=a.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=ju(r);return c.jsx($u,{...o,...n,ref:t})});FC.displayName=F3;var V3="MenuSub",[Pre,VC]=Go(V3),Ni="MenuSubTrigger",BC=a.forwardRef((e,t)=>{const r=Ko(Ni,e.__scopeMenu),n=Fa(Ni,e.__scopeMenu),o=VC(Ni,e.__scopeMenu),s=sg(Ni,e.__scopeMenu),i=a.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=s,d={__scopeMenu:e.__scopeMenu},p=a.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return a.useEffect(()=>p,[p]),a.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),u(null)}},[l,u]),c.jsx(ng,{asChild:!0,...d,children:c.jsx(AC,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":WC(r.open),...e,ref:_r(t,o.onTriggerChange),onClick:f=>{var m;(m=e.onClick)==null||m.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Ie(e.onPointerMove,la(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),p()},100))})),onPointerLeave:Ie(e.onPointerLeave,la(f=>{var h,v;p();const m=(h=r.content)==null?void 0:h.getBoundingClientRect();if(m){const g=(v=r.content)==null?void 0:v.dataset.side,b=g==="right",_=b?-5:5,y=m[b?"left":"right"],x=m[b?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+_,y:f.clientY},{x:y,y:m.top},{x,y:m.top},{x,y:m.bottom},{x:y,y:m.bottom}],side:g}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:Ie(e.onKeyDown,f=>{var h;const m=s.searchRef.current!=="";e.disabled||m&&f.key===" "||x3[n.dir].includes(f.key)&&(r.onOpenChange(!0),(h=r.content)==null||h.focus(),f.preventDefault())})})})});BC.displayName=Ni;var HC="MenuSubContent",UC=a.forwardRef((e,t)=>{const r=RC(qr,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,s=Ko(qr,e.__scopeMenu),i=Fa(qr,e.__scopeMenu),l=VC(HC,e.__scopeMenu),u=a.useRef(null),d=tt(t,u);return c.jsx(aa.Provider,{scope:e.__scopeMenu,children:c.jsx(Vt,{present:n||s.open,children:c.jsx(aa.Slot,{scope:e.__scopeMenu,children:c.jsx(ig,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var f;i.isUsingKeyboardRef.current&&((f=u.current)==null||f.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:Ie(e.onFocusOutside,p=>{p.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:Ie(e.onEscapeKeyDown,p=>{i.onClose(),p.preventDefault()}),onKeyDown:Ie(e.onKeyDown,p=>{var h;const f=p.currentTarget.contains(p.target),m=w3[i.dir].includes(p.key);f&&m&&(s.onOpenChange(!1),(h=l.trigger)==null||h.focus(),p.preventDefault())})})})})})});UC.displayName=HC;function WC(e){return e?"open":"closed"}function cc(e){return e==="indeterminate"}function cg(e){return cc(e)?"indeterminate":e?"checked":"unchecked"}function B3(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function H3(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function U3(e,t,r){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let i=H3(e,Math.max(s,0));o.length===1&&(i=i.filter(d=>d!==r));const u=i.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return u!==r?u:void 0}function W3(e,t){const{x:r,y:n}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const l=t[s],u=t[i],d=l.x,p=l.y,f=u.x,m=u.y;p>n!=m>n&&r<(f-d)*(n-p)/(m-p)+d&&(o=!o)}return o}function q3(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return W3(r,t)}function la(e){return t=>t.pointerType==="mouse"?e(t):void 0}var G3=PC,K3=ng,X3=TC,Y3=IC,J3=ag,Z3=$C,Q3=Ou,e4=jC,t4=NC,r4=kC,n4=LC,o4=zC,s4=FC,i4=BC,a4=UC,Nu="DropdownMenu",[l4]=Xt(Nu,[SC]),yr=SC(),[c4,qC]=l4(Nu),GC=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:s,onOpenChange:i,modal:l=!0}=e,u=yr(t),d=a.useRef(null),[p,f]=Tr({prop:o,defaultProp:s??!1,onChange:i,caller:Nu});return c.jsx(c4,{scope:t,triggerId:zt(),triggerRef:d,contentId:zt(),open:p,onOpenChange:f,onOpenToggle:a.useCallback(()=>f(m=>!m),[f]),modal:l,children:c.jsx(G3,{...u,open:p,onOpenChange:f,dir:n,modal:l,children:r})})};GC.displayName=Nu;var KC="DropdownMenuTrigger",XC=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,s=qC(KC,r),i=yr(r);return c.jsx(K3,{asChild:!0,...i,children:c.jsx(Ke.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...o,ref:_r(t,s.triggerRef),onPointerDown:Ie(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:Ie(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});XC.displayName=KC;var u4="DropdownMenuPortal",YC=e=>{const{__scopeDropdownMenu:t,...r}=e,n=yr(t);return c.jsx(X3,{...n,...r})};YC.displayName=u4;var JC="DropdownMenuContent",ZC=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=qC(JC,r),s=yr(r),i=a.useRef(!1);return c.jsx(Y3,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...n,ref:t,onCloseAutoFocus:Ie(e.onCloseAutoFocus,l=>{var u;i.current||(u=o.triggerRef.current)==null||u.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:Ie(e.onInteractOutside,l=>{const u=l.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,p=u.button===2||d;(!o.modal||p)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ZC.displayName=JC;var d4="DropdownMenuGroup",p4=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.jsx(J3,{...o,...n,ref:t})});p4.displayName=d4;var f4="DropdownMenuLabel",QC=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.jsx(Z3,{...o,...n,ref:t})});QC.displayName=f4;var m4="DropdownMenuItem",eP=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.jsx(Q3,{...o,...n,ref:t})});eP.displayName=m4;var h4="DropdownMenuCheckboxItem",tP=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.jsx(e4,{...o,...n,ref:t})});tP.displayName=h4;var g4="DropdownMenuRadioGroup",v4=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.jsx(t4,{...o,...n,ref:t})});v4.displayName=g4;var b4="DropdownMenuRadioItem",rP=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.jsx(r4,{...o,...n,ref:t})});rP.displayName=b4;var _4="DropdownMenuItemIndicator",nP=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.jsx(n4,{...o,...n,ref:t})});nP.displayName=_4;var y4="DropdownMenuSeparator",oP=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.jsx(o4,{...o,...n,ref:t})});oP.displayName=y4;var x4="DropdownMenuArrow",w4=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.jsx(s4,{...o,...n,ref:t})});w4.displayName=x4;var E4="DropdownMenuSubTrigger",sP=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.jsx(i4,{...o,...n,ref:t})});sP.displayName=E4;var S4="DropdownMenuSubContent",iP=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.jsx(a4,{...o,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});iP.displayName=S4;var C4=GC,P4=XC,R4=YC,aP=ZC,lP=QC,cP=eP,uP=tP,dP=rP,pP=nP,fP=oP,mP=sP,hP=iP;const Rre=C4,Tre=P4,T4=a.forwardRef(({className:e,inset:t,children:r,...n},o)=>c.jsxs(mP,{ref:o,className:ve("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","focus:bg-bg-surface data-[state=open]:bg-bg-surface",t&&"pl-8",e),...n,children:[r,c.jsx(a2,{className:"ml-auto h-4 w-4"})]}));T4.displayName=mP.displayName;const I4=a.forwardRef(({className:e,...t},r)=>c.jsx(hP,{ref:r,className:ve("z-[1400] min-w-[8rem] overflow-hidden rounded-md border border-border bg-bg-elevated p-1 text-text shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));I4.displayName=hP.displayName;const $4=a.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(R4,{children:c.jsx(aP,{ref:n,sideOffset:t,className:ve("z-[1400] min-w-[8rem] overflow-hidden rounded-md border border-border bg-bg-elevated p-1 text-text shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r})}));$4.displayName=aP.displayName;const A4=a.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(cP,{ref:n,className:ve("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-bg-surface focus:text-text","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));A4.displayName=cP.displayName;const j4=a.forwardRef(({className:e,children:t,checked:r,...n},o)=>c.jsxs(uP,{ref:o,className:ve("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none","focus:bg-bg-surface focus:text-text","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(pP,{children:c.jsx($h,{className:"h-4 w-4"})})}),t]}));j4.displayName=uP.displayName;const O4=a.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(dP,{ref:n,className:ve("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none","focus:bg-bg-surface focus:text-text","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(pP,{children:c.jsx(zw,{className:"h-2 w-2 fill-current"})})}),t]}));O4.displayName=dP.displayName;const N4=a.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(lP,{ref:n,className:ve("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));N4.displayName=lP.displayName;const D4=a.forwardRef(({className:e,...t},r)=>c.jsx(fP,{ref:r,className:ve("-mx-1 my-1 h-px bg-border",e),...t}));D4.displayName=fP.displayName;var k4=Symbol("radix.slottable");function M4(e){const t=({children:r})=>c.jsx(c.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=k4,t}var gP=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),L4="VisuallyHidden",vP=a.forwardRef((e,t)=>c.jsx(Ke.span,{...e,ref:t,style:{...gP,...e.style}}));vP.displayName=L4;var z4=vP,[Du]=Xt("Tooltip",[so]),ku=so(),bP="TooltipProvider",F4=700,Nf="tooltip.open",[V4,ug]=Du(bP),_P=e=>{const{__scopeTooltip:t,delayDuration:r=F4,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:s}=e,i=a.useRef(!0),l=a.useRef(!1),u=a.useRef(0);return a.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),c.jsx(V4,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:a.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:a.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:s})};_P.displayName=bP;var ca="Tooltip",[B4,Va]=Du(ca),yP=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:l}=e,u=ug(ca,e.__scopeTooltip),d=ku(t),[p,f]=a.useState(null),m=zt(),h=a.useRef(0),v=i??u.disableHoverableContent,g=l??u.delayDuration,b=a.useRef(!1),[_,y]=Tr({prop:n,defaultProp:o??!1,onChange:T=>{T?(u.onOpen(),document.dispatchEvent(new CustomEvent(Nf))):u.onClose(),s==null||s(T)},caller:ca}),x=a.useMemo(()=>_?b.current?"delayed-open":"instant-open":"closed",[_]),S=a.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b.current=!1,y(!0)},[y]),w=a.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y(!1)},[y]),I=a.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,y(!0),h.current=0},g)},[g,y]);return a.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),c.jsx(Tu,{...d,children:c.jsx(B4,{scope:t,contentId:m,open:_,stateAttribute:x,trigger:p,onTriggerChange:f,onTriggerEnter:a.useCallback(()=>{u.isOpenDelayedRef.current?I():S()},[u.isOpenDelayedRef,I,S]),onTriggerLeave:a.useCallback(()=>{v?w():(window.clearTimeout(h.current),h.current=0)},[w,v]),onOpen:S,onClose:w,disableHoverableContent:v,children:r})})};yP.displayName=ca;var Df="TooltipTrigger",xP=a.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Va(Df,r),s=ug(Df,r),i=ku(r),l=a.useRef(null),u=tt(t,l,o.onTriggerChange),d=a.useRef(!1),p=a.useRef(!1),f=a.useCallback(()=>d.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),c.jsx(Da,{asChild:!0,...i,children:c.jsx(Ke.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:u,onPointerMove:Ie(e.onPointerMove,m=>{m.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:Ie(e.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:Ie(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ie(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:Ie(e.onBlur,o.onClose),onClick:Ie(e.onClick,o.onClose)})})});xP.displayName=Df;var dg="TooltipPortal",[H4,U4]=Du(dg,{forceMount:void 0}),wP=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,s=Va(dg,t);return c.jsx(H4,{scope:t,forceMount:r,children:c.jsx(Vt,{present:r||s.open,children:c.jsx(ii,{asChild:!0,container:o,children:n})})})};wP.displayName=dg;var Hs="TooltipContent",EP=a.forwardRef((e,t)=>{const r=U4(Hs,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...s}=e,i=Va(Hs,e.__scopeTooltip);return c.jsx(Vt,{present:n||i.open,children:i.disableHoverableContent?c.jsx(SP,{side:o,...s,ref:t}):c.jsx(W4,{side:o,...s,ref:t})})}),W4=a.forwardRef((e,t)=>{const r=Va(Hs,e.__scopeTooltip),n=ug(Hs,e.__scopeTooltip),o=a.useRef(null),s=tt(t,o),[i,l]=a.useState(null),{trigger:u,onClose:d}=r,p=o.current,{onPointerInTransitChange:f}=n,m=a.useCallback(()=>{l(null),f(!1)},[f]),h=a.useCallback((v,g)=>{const b=v.currentTarget,_={x:v.clientX,y:v.clientY},y=Y4(_,b.getBoundingClientRect()),x=J4(_,y),S=Z4(g.getBoundingClientRect()),w=eU([...x,...S]);l(w),f(!0)},[f]);return a.useEffect(()=>()=>m(),[m]),a.useEffect(()=>{if(u&&p){const v=b=>h(b,p),g=b=>h(b,u);return u.addEventListener("pointerleave",v),p.addEventListener("pointerleave",g),()=>{u.removeEventListener("pointerleave",v),p.removeEventListener("pointerleave",g)}}},[u,p,h,m]),a.useEffect(()=>{if(i){const v=g=>{const b=g.target,_={x:g.clientX,y:g.clientY},y=(u==null?void 0:u.contains(b))||(p==null?void 0:p.contains(b)),x=!Q4(_,i);y?m():x&&(m(),d())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,p,i,d,m]),c.jsx(SP,{...e,ref:s})}),[q4,G4]=Du(ca,{isInside:!1}),K4=M4("TooltipContent"),SP=a.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...l}=e,u=Va(Hs,r),d=ku(r),{onClose:p}=u;return a.useEffect(()=>(document.addEventListener(Nf,p),()=>document.removeEventListener(Nf,p)),[p]),a.useEffect(()=>{if(u.trigger){const f=m=>{const h=m.target;h!=null&&h.contains(u.trigger)&&p()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,p]),c.jsx(si,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:p,children:c.jsxs(Iu,{"data-state":u.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(K4,{children:n}),c.jsx(q4,{scope:r,isInside:!0,children:c.jsx(z4,{id:u.contentId,role:"tooltip",children:o||n})})]})})});EP.displayName=Hs;var CP="TooltipArrow",X4=a.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=ku(r);return G4(CP,r).isInside?null:c.jsx($u,{...o,...n,ref:t})});X4.displayName=CP;function Y4(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,o,s)){case s:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function J4(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Z4(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Q4(e,t){const{x:r,y:n}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const l=t[s],u=t[i],d=l.x,p=l.y,f=u.x,m=u.y;p>n!=m>n&&r<(f-d)*(n-p)/(m-p)+d&&(o=!o)}return o}function eU(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),tU(t)}function tU(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const s=r[r.length-1],i=r[r.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var rU=_P,nU=yP,oU=xP,sU=wP,PP=EP;const RP=rU,TP=nU,IP=oU,pg=a.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(sU,{children:c.jsx(PP,{ref:n,sideOffset:t,className:ve("z-[1600] overflow-hidden rounded-md bg-accent-navy px-3 py-1.5 text-xs text-accent-navy-foreground shadow-md","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));pg.displayName=PP.displayName;const iU={VERY_LOW:{ru:"Очень низкая",en:"Very low",level:1,toneClass:"text-text-muted",barColorClass:"bg-text-subtle"},LOW:{ru:"Низкая",en:"Low",level:2,toneClass:"text-text-muted",barColorClass:"bg-warning"},MEDIUM:{ru:"Средняя",en:"Medium",level:3,toneClass:"text-text",barColorClass:"bg-info"},HIGH:{ru:"Высокая",en:"High",level:4,toneClass:"text-text",barColorClass:"bg-success"},VERY_HIGH:{ru:"Очень высокая",en:"Very high",level:5,toneClass:"text-text",barColorClass:"bg-success"}},f_=rr("inline-flex items-center gap-1.5 tabular-nums whitespace-nowrap",{variants:{variant:{compact:"text-sm",full:"text-base"},emphasis:{default:"",muted:"text-text-muted italic"}},defaultVariants:{variant:"compact",emphasis:"default"}});function aU(e,t){try{return(typeof e=="string"?new Date(e):e).toLocaleDateString(t==="ru"?"ru-RU":"en-GB",{day:"2-digit",month:"short",year:"numeric"})}catch{return typeof e=="string"?e:"—"}}function lU({level:e,barColorClass:t}){return c.jsx("span",{className:"inline-flex items-end gap-px ml-0.5","aria-hidden":!0,children:[1,2,3,4,5].map(r=>c.jsx("span",{className:ve("w-1 rounded-sm transition-colors",r<=e?t:"bg-border",r===1?"h-1.5":r===2?"h-2":r===3?"h-2.5":r===4?"h-3":"h-3.5")},r))})}const cU=a.forwardRef(({className:e,date:t,confidence:r,rationale:n,locale:o="ru",variant:s="compact",testId:i,...l},u)=>{if(t==null||r==null){const b=o==="ru"?"ETA скоро":"ETA pending";return c.jsxs("span",{ref:u,className:ve(f_({variant:s,emphasis:"muted"}),e),"aria-label":b,"data-testid":i,...l,children:[c.jsx(Mb,{className:"h-3.5 w-3.5"}),b]})}const d=iU[r],p=aU(t,o),f=o==="ru"?d.ru:d.en,m=o==="ru"?"Уверенность":"Confidence",h=`${p} · ${m}: ${f}`,v=n??`${m}: ${f}`,g=c.jsxs("span",{className:ve(f_({variant:s,emphasis:"default"}),d.toneClass,e),"aria-label":h,"data-testid":i,...l,children:[c.jsx(Mb,{className:"h-3.5 w-3.5"}),p,c.jsx(lU,{level:d.level,barColorClass:d.barColorClass}),s==="full"?c.jsxs("span",{className:"text-sm text-text-muted ml-1",children:["· ",f]}):null]});return s==="full"?c.jsx(RP,{children:c.jsxs(TP,{children:[c.jsx(IP,{asChild:!0,children:c.jsx("span",{ref:u,children:g})}),c.jsx(pg,{children:v})]})}):a.cloneElement(g,{ref:u})});cU.displayName="EtaBadge";const m_={free:0,starter:1,pro:2,enterprise:3},uU={webhooks:"pro","ocr.document-verification":"pro","ai.operator-review":"pro","data-table.saved-views":"starter","data-table.excel-export":"starter","billing.api-keys":"pro","branding.custom-logo":"enterprise","sso.saml":"enterprise","audit-log.export":"enterprise"},$P=a.createContext({tier:"free",isAuthenticated:!1});function dU(){return a.useContext($P)}function pU(e,t){return m_[e]>=m_[t]}function fU(e){return uU[e]??null}let kf=null;function mU(e){kf=e}function hU(e){if(typeof window>"u")return null;try{const t=window.localStorage.getItem(`ff:${e}`);if(t==="on")return!0;if(t==="off")return!1}catch{}return null}function Ire(e){const{tier:t}=dU();if(!e)return!0;const r=hU(e);if(r!==null)return r;if(kf)try{return kf.isOn(e)}catch{}const n=fU(e);return n?pU(t,n):!1}const gU={sea:{label:"Море",labelEn:"Sea",icon:P2,bg:"bg-transport-sea-light",text:"text-transport-sea"},rail:{label:"Ж/Д",labelEn:"Rail",icon:T2,bg:"bg-transport-rail-light",text:"text-transport-rail"},road:{label:"Авто",labelEn:"Road",icon:$2,bg:"bg-transport-road-light",text:"text-transport-road"},air:{label:"Авиа",labelEn:"Air",icon:w2,bg:"bg-transport-air-light",text:"text-transport-air"},multimodal:{label:"Мультимодаль",labelEn:"Multimodal",icon:v2,bg:"bg-transport-multimodal-light",text:"text-transport-multimodal"}},vU=rr("inline-flex items-center gap-1 rounded-full font-medium whitespace-nowrap",{variants:{size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm"}},defaultVariants:{size:"sm"}}),bU=a.forwardRef(({mode:e,size:t,iconOnly:r=!1,locale:n="ru",label:o,className:s,...i},l)=>{const u=gU[e],d=u.icon,p=o??(n==="en"?u.labelEn:u.label),f=t==="md"?"h-3.5 w-3.5":"h-3 w-3";return c.jsxs("span",{ref:l,className:ve(vU({size:t}),u.bg,u.text,s),...i,children:[c.jsx(d,{className:f,"aria-hidden":!0}),r?c.jsx("span",{className:"sr-only",children:p}):p]})});bU.displayName="TransportBadge";const _U=a.forwardRef(({className:e,type:t,...r},n)=>c.jsx("input",{type:t,ref:n,className:ve("flex h-10 w-full rounded-md border border-input bg-bg-base px-3 py-2 text-sm","ring-offset-bg-base placeholder:text-text-subtle","file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-text","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","aria-invalid:border-error aria-invalid:focus-visible:ring-error",e),...r}));_U.displayName="Input";var yU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xU=yU.reduce((e,t)=>{const r=ci(`Primitive.${t}`),n=a.forwardRef((o,s)=>{const{asChild:i,...l}=o,u=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...l,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),wU="Label",AP=a.forwardRef((e,t)=>c.jsx(xU.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));AP.displayName=wU;var Mf=AP;const EU=({text:e,label:t="Подсказка",className:r})=>c.jsxs(pC,{children:[c.jsx(fC,{asChild:!0,children:c.jsx("button",{type:"button","aria-label":t,className:ve("inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-text-muted outline-none transition-colors hover:text-text focus-visible:ring-2 focus-visible:ring-border",r),onClick:n=>n.stopPropagation(),children:c.jsx(d2,{className:"h-3.5 w-3.5"})})}),c.jsx(eg,{side:"top",align:"start",className:"w-64 p-3 text-xs font-normal leading-snug text-text-muted",children:e})]}),h_=rr("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),jP=a.forwardRef(({className:e,hint:t,children:r,...n},o)=>t?c.jsxs("span",{className:"inline-flex items-center gap-1",children:[c.jsx(Mf,{ref:o,className:ve(h_(),e),...n,children:r}),c.jsx(EU,{text:t})]}):c.jsx(Mf,{ref:o,className:ve(h_(),e),...n,children:r}));jP.displayName=Mf.displayName;const g_=rr("tabular-nums whitespace-nowrap",{variants:{size:{xs:"text-sm leading-tight",sm:"text-sm leading-snug",md:"text-lg leading-snug font-medium",lg:"text-3xl leading-tight font-semibold",xl:"font-mono text-6xl leading-none font-bold"},emphasis:{default:"text-text",positive:"text-success",negative:"text-destructive",muted:"text-text-muted",danger:"text-destructive font-semibold"},align:{left:"text-left",right:"text-right tabular-nums"}},defaultVariants:{size:"md",emphasis:"default",align:"left"}}),SU={month:{ru:"/мес",en:"/month",zh:"/月"},year:{ru:"/год",en:"/year",zh:"/年"},day:{ru:"/день",en:"/day",zh:"/日"}},v_=new Map,OP={ru:"ru-RU",en:"en-US",zh:"zh-CN"};function b_(e,t,r){const n=`${e}|${t}|${JSON.stringify(r)}`;let o=v_.get(n);return o||(o=new Intl.NumberFormat(OP[e],r),v_.set(n,o)),o}function CU(e,t){return e==="RUB"&&t>=100?0:2}function PU(e){return e==="RUB"?2:4}function RU(e,t,r){try{return new Intl.NumberFormat(OP[r],{style:"currency",currency:t,currencyDisplay:"name",maximumFractionDigits:2}).format(e)}catch{return`${e} ${t}`}}function TU(e,t,r){return t===0?e.replace(/^[+\-−]/,""):r==="never"?e.replace(/^[+\-−]/,""):r==="always"&&t>0&&!/^[+−-]/.test(e)?`+${e}`:e.replace(/^-/,"−")}const NP=a.forwardRef(({value:e,currency:t,locale:r="ru",size:n,emphasis:o,align:s,variant:i="default",sign:l="auto",period:u,prefix:d,unit:p,showCurrency:f=!0,conversionFrom:m,className:h,...v},g)=>{var T;const b=a.useMemo(()=>{const R=Math.abs(e),P={style:f?"currency":"decimal",currency:t,currencyDisplay:"symbol"};if(i==="compact")P.notation="compact",P.maximumFractionDigits=1;else if(i==="precise"){const A=PU(t);P.minimumFractionDigits=A,P.maximumFractionDigits=A}else{const A=CU(t,R);P.minimumFractionDigits=A,P.maximumFractionDigits=A}const $=b_(r,t,P).format(e);return TU($,e,l)},[e,t,r,i,l,f]),_=u&&(((T=SU[u])==null?void 0:T[r])??` /${u}`),y=a.useMemo(()=>{const R=RU(e,t,r);return _?`${R} ${_.replace(/^\//,"")}`.trim():R},[e,t,r,_]),x=c.jsxs(c.Fragment,{children:[d?c.jsx("span",{className:"mr-1 text-text-muted text-[0.7em] font-medium align-baseline",children:d}):null,m?c.jsx("span",{"aria-hidden":!0,children:"≈ "}):null,b,_?c.jsx("span",{className:"ml-0.5 text-text-muted text-[0.85em] font-normal",children:_}):null,p?c.jsx("span",{className:"ml-0.5 text-text-muted text-[0.7em] font-normal",children:p}):null]});if(!m)return c.jsx("span",{ref:g,className:ve(g_({size:n,emphasis:o,align:s}),h),"aria-label":y,...v,children:x});const w=b_(r,m.currency,{style:"currency",currency:m.currency,currencyDisplay:"symbol",maximumFractionDigits:2}).format(e/m.rate),I=r==="ru"?`Курс ${m.source??"ЦБ"} ${m.rate.toFixed(2)} от ${m.rateDate}`:`Rate ${m.source??"CB"} ${m.rate.toFixed(2)} on ${m.rateDate}`;return c.jsx(RP,{delayDuration:200,children:c.jsxs(TP,{children:[c.jsx(IP,{asChild:!0,children:c.jsxs("span",{ref:g,className:ve(g_({size:n,emphasis:o,align:s}),"inline-flex items-baseline gap-0.5 cursor-help",h),"aria-label":y,...v,children:[x,c.jsx(h2,{className:"ml-0.5 inline h-3 w-3 self-center text-text-muted","aria-hidden":!0})]})}),c.jsx(pg,{children:c.jsxs("div",{className:"space-y-0.5 text-left",children:[c.jsxs("div",{className:"font-medium",children:[w," → ",b.replace(/^[−]/,"−")]}),c.jsx("div",{className:"text-[0.75rem] opacity-80",children:I})]})})]})})});NP.displayName="MoneyDisplay";function IU(e,t=[]){let r=[];function n(s,i){const l=a.createContext(i);l.displayName=s+"Context";const u=r.length;r=[...r,i];const d=f=>{var _;const{scope:m,children:h,...v}=f,g=((_=m==null?void 0:m[e])==null?void 0:_[u])||l,b=a.useMemo(()=>v,Object.values(v));return c.jsx(g.Provider,{value:b,children:h})};d.displayName=s+"Provider";function p(f,m){var g;const h=((g=m==null?void 0:m[e])==null?void 0:g[u])||l,v=a.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[d,p]}const o=()=>{const s=r.map(i=>a.createContext(i));return function(l){const u=(l==null?void 0:l[e])||s;return a.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[n,$U(o,...t)]}function $U(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=n.reduce((l,{useScope:u,scopeName:d})=>{const f=u(s)[`__scope${d}`];return{...l,...f}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var AU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],DP=AU.reduce((e,t)=>{const r=ci(`Primitive.${t}`),n=a.forwardRef((o,s)=>{const{asChild:i,...l}=o,u=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...l,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),fg="Progress",mg=100,[jU]=IU(fg),[OU,NU]=jU(fg),kP=a.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:s=DU,...i}=e;(o||o===0)&&!__(o)&&console.error(kU(`${o}`,"Progress"));const l=__(o)?o:mg;n!==null&&!y_(n,l)&&console.error(MU(`${n}`,"Progress"));const u=y_(n,l)?n:null,d=uc(u)?s(u,l):void 0;return c.jsx(OU,{scope:r,value:u,max:l,children:c.jsx(DP.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":uc(u)?u:void 0,"aria-valuetext":d,role:"progressbar","data-state":zP(u,l),"data-value":u??void 0,"data-max":l,...i,ref:t})})});kP.displayName=fg;var MP="ProgressIndicator",LP=a.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=NU(MP,r);return c.jsx(DP.div,{"data-state":zP(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});LP.displayName=MP;function DU(e,t){return`${Math.round(e/t*100)}%`}function zP(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function uc(e){return typeof e=="number"}function __(e){return uc(e)&&!isNaN(e)&&e>0}function y_(e,t){return uc(e)&&!isNaN(e)&&e<=t&&e>=0}function kU(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${mg}\`.`}function MU(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
- a positive number
- less than the value passed to \`max\` (or ${mg} if no \`max\` prop is set)
- \`null\` or \`undefined\` if the progress is indeterminate.
Defaulting to \`null\`.`}var FP=kP,LU=LP;const zU=a.forwardRef(({className:e,value:t,...r},n)=>c.jsx(FP,{ref:n,className:ve("relative h-2 w-full overflow-hidden rounded-full bg-bg-surface",e),...r,children:c.jsx(LU,{className:"h-full w-full flex-1 bg-primary transition-transform duration-normal",style:{transform:`translateX(-${100-(t||0)}%)`}})}));zU.displayName=FP.displayName;var hg="Radio",[FU,VP]=Xt(hg),[VU,BU]=FU(hg),BP=a.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:s,disabled:i,value:l="on",onCheck:u,form:d,...p}=e,[f,m]=a.useState(null),h=tt(t,b=>m(b)),v=a.useRef(!1),g=f?d||!!f.closest("form"):!0;return c.jsxs(VU,{scope:r,checked:o,disabled:i,children:[c.jsx(Ke.button,{type:"button",role:"radio","aria-checked":o,"data-state":qP(o),"data-disabled":i?"":void 0,disabled:i,value:l,...p,ref:h,onClick:Ie(e.onClick,b=>{o||u==null||u(),g&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),g&&c.jsx(WP,{control:f,bubbles:!v.current,name:n,value:l,checked:o,required:s,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});BP.displayName=hg;var HP="RadioIndicator",UP=a.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,s=BU(HP,r);return c.jsx(Vt,{present:n||s.checked,children:c.jsx(Ke.span,{"data-state":qP(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});UP.displayName=HP;var HU="RadioBubbleInput",WP=a.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},s)=>{const i=a.useRef(null),l=tt(i,s),u=Su(r),d=Cu(t);return a.useEffect(()=>{const p=i.current;if(!p)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==r&&h){const v=new Event("click",{bubbles:n});h.call(p,r),p.dispatchEvent(v)}},[u,r,n]),c.jsx(Ke.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});WP.displayName=HU;function qP(e){return e?"checked":"unchecked"}var UU=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Mu="RadioGroup",[WU]=Xt(Mu,[ui,VP]),GP=ui(),KP=VP(),[qU,GU]=WU(Mu),XP=a.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:s,required:i=!1,disabled:l=!1,orientation:u,dir:d,loop:p=!0,onValueChange:f,...m}=e,h=GP(r),v=Uo(d),[g,b]=Tr({prop:s,defaultProp:o??null,onChange:f,caller:Mu});return c.jsx(qU,{scope:r,name:n,required:i,disabled:l,value:g,onValueChange:b,children:c.jsx(tg,{asChild:!0,...h,orientation:u,dir:v,loop:p,children:c.jsx(Ke.div,{role:"radiogroup","aria-required":i,"aria-orientation":u,"data-disabled":l?"":void 0,dir:v,...m,ref:t})})})});XP.displayName=Mu;var YP="RadioGroupItem",JP=a.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,s=GU(YP,r),i=s.disabled||n,l=GP(r),u=KP(r),d=a.useRef(null),p=tt(t,d),f=s.value===o.value,m=a.useRef(!1);return a.useEffect(()=>{const h=g=>{UU.includes(g.key)&&(m.current=!0)},v=()=>m.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),c.jsx(rg,{asChild:!0,...l,focusable:!i,active:f,children:c.jsx(BP,{disabled:i,required:s.required,checked:f,...u,...o,name:s.name,ref:p,onCheck:()=>s.onValueChange(o.value),onKeyDown:Ie(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Ie(o.onFocus,()=>{var h;m.current&&((h=d.current)==null||h.click())})})})});JP.displayName=YP;var KU="RadioGroupIndicator",ZP=a.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=KP(r);return c.jsx(UP,{...o,...n,ref:t})});ZP.displayName=KU;var QP=XP,eR=JP,XU=ZP;const YU=a.forwardRef(({className:e,...t},r)=>c.jsx(QP,{className:ve("grid gap-2",e),...t,ref:r}));YU.displayName=QP.displayName;const JU=a.forwardRef(({className:e,...t},r)=>c.jsx(eR,{ref:r,className:ve("aspect-square h-4 w-4 rounded-full border border-border-strong text-primary","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:border-primary",e),...t,children:c.jsx(XU,{className:"flex items-center justify-center",children:c.jsx(zw,{className:"h-2.5 w-2.5 fill-primary text-primary"})})}));JU.displayName=eR.displayName;function Lf(e,[t,r]){return Math.min(r,Math.max(t,e))}function ZU(e,t){return a.useReducer((r,n)=>t[r][n]??r,e)}var gg="ScrollArea",[tR]=Xt(gg),[QU,Jr]=tR(gg),rR=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:s=600,...i}=e,[l,u]=a.useState(null),[d,p]=a.useState(null),[f,m]=a.useState(null),[h,v]=a.useState(null),[g,b]=a.useState(null),[_,y]=a.useState(0),[x,S]=a.useState(0),[w,I]=a.useState(!1),[T,R]=a.useState(!1),P=tt(t,A=>u(A)),$=Uo(o);return c.jsx(QU,{scope:r,type:n,dir:$,scrollHideDelay:s,scrollArea:l,viewport:d,onViewportChange:p,content:f,onContentChange:m,scrollbarX:h,onScrollbarXChange:v,scrollbarXEnabled:w,onScrollbarXEnabledChange:I,scrollbarY:g,onScrollbarYChange:b,scrollbarYEnabled:T,onScrollbarYEnabledChange:R,onCornerWidthChange:y,onCornerHeightChange:S,children:c.jsx(Ke.div,{dir:$,...i,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":_+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});rR.displayName=gg;var nR="ScrollAreaViewport",oR=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:o,...s}=e,i=Jr(nR,r),l=a.useRef(null),u=tt(t,l,i.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),c.jsx(Ke.div,{"data-radix-scroll-area-viewport":"",...s,ref:u,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});oR.displayName=nR;var Cn="ScrollAreaScrollbar",vg=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Jr(Cn,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,l=e.orientation==="horizontal";return a.useEffect(()=>(l?s(!0):i(!0),()=>{l?s(!1):i(!1)}),[l,s,i]),o.type==="hover"?c.jsx(eW,{...n,ref:t,forceMount:r}):o.type==="scroll"?c.jsx(tW,{...n,ref:t,forceMount:r}):o.type==="auto"?c.jsx(sR,{...n,ref:t,forceMount:r}):o.type==="always"?c.jsx(bg,{...n,ref:t}):null});vg.displayName=Cn;var eW=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Jr(Cn,e.__scopeScrollArea),[s,i]=a.useState(!1);return a.useEffect(()=>{const l=o.scrollArea;let u=0;if(l){const d=()=>{window.clearTimeout(u),i(!0)},p=()=>{u=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return l.addEventListener("pointerenter",d),l.addEventListener("pointerleave",p),()=>{window.clearTimeout(u),l.removeEventListener("pointerenter",d),l.removeEventListener("pointerleave",p)}}},[o.scrollArea,o.scrollHideDelay]),c.jsx(Vt,{present:r||s,children:c.jsx(sR,{"data-state":s?"visible":"hidden",...n,ref:t})})}),tW=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Jr(Cn,e.__scopeScrollArea),s=e.orientation==="horizontal",i=zu(()=>u("SCROLL_END"),100),[l,u]=ZU("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return a.useEffect(()=>{if(l==="idle"){const d=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[l,o.scrollHideDelay,u]),a.useEffect(()=>{const d=o.viewport,p=s?"scrollLeft":"scrollTop";if(d){let f=d[p];const m=()=>{const h=d[p];f!==h&&(u("SCROLL"),i()),f=h};return d.addEventListener("scroll",m),()=>d.removeEventListener("scroll",m)}},[o.viewport,s,u,i]),c.jsx(Vt,{present:r||l!=="hidden",children:c.jsx(bg,{"data-state":l==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:Ie(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:Ie(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),sR=a.forwardRef((e,t)=>{const r=Jr(Cn,e.__scopeScrollArea),{forceMount:n,...o}=e,[s,i]=a.useState(!1),l=e.orientation==="horizontal",u=zu(()=>{if(r.viewport){const d=r.viewport.offsetWidth<r.viewport.scrollWidth,p=r.viewport.offsetHeight<r.viewport.scrollHeight;i(l?d:p)}},10);return Us(r.viewport,u),Us(r.content,u),c.jsx(Vt,{present:n||s,children:c.jsx(bg,{"data-state":s?"visible":"hidden",...o,ref:t})})}),bg=a.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=Jr(Cn,e.__scopeScrollArea),s=a.useRef(null),i=a.useRef(0),[l,u]=a.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=uR(l.viewport,l.content),p={...n,sizes:l,onSizesChange:u,hasThumb:d>0&&d<1,onThumbChange:m=>s.current=m,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:m=>i.current=m};function f(m,h){return aW(m,i.current,l,h)}return r==="horizontal"?c.jsx(rW,{...p,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const m=o.viewport.scrollLeft,h=x_(m,l,o.dir);s.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollLeft=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollLeft=f(m,o.dir))}}):r==="vertical"?c.jsx(nW,{...p,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const m=o.viewport.scrollTop,h=x_(m,l);s.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollTop=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollTop=f(m))}}):null}),rW=a.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,s=Jr(Cn,e.__scopeScrollArea),[i,l]=a.useState(),u=a.useRef(null),d=tt(t,u,s.onScrollbarXChange);return a.useEffect(()=>{u.current&&l(getComputedStyle(u.current))},[u]),c.jsx(aR,{"data-orientation":"horizontal",...o,ref:d,sizes:r,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Lu(r)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,f)=>{if(s.viewport){const m=s.viewport.scrollLeft+p.deltaX;e.onWheelScroll(m),pR(m,f)&&p.preventDefault()}},onResize:()=>{u.current&&s.viewport&&i&&n({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:pc(i.paddingLeft),paddingEnd:pc(i.paddingRight)}})}})}),nW=a.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,s=Jr(Cn,e.__scopeScrollArea),[i,l]=a.useState(),u=a.useRef(null),d=tt(t,u,s.onScrollbarYChange);return a.useEffect(()=>{u.current&&l(getComputedStyle(u.current))},[u]),c.jsx(aR,{"data-orientation":"vertical",...o,ref:d,sizes:r,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Lu(r)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,f)=>{if(s.viewport){const m=s.viewport.scrollTop+p.deltaY;e.onWheelScroll(m),pR(m,f)&&p.preventDefault()}},onResize:()=>{u.current&&s.viewport&&i&&n({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:pc(i.paddingTop),paddingEnd:pc(i.paddingBottom)}})}})}),[oW,iR]=tR(Cn),aR=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:l,onThumbPositionChange:u,onDragScroll:d,onWheelScroll:p,onResize:f,...m}=e,h=Jr(Cn,r),[v,g]=a.useState(null),b=tt(t,P=>g(P)),_=a.useRef(null),y=a.useRef(""),x=h.viewport,S=n.content-n.viewport,w=Kt(p),I=Kt(u),T=zu(f,10);function R(P){if(_.current){const $=P.clientX-_.current.left,A=P.clientY-_.current.top;d({x:$,y:A})}}return a.useEffect(()=>{const P=$=>{const A=$.target;(v==null?void 0:v.contains(A))&&w($,S)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[x,v,S,w]),a.useEffect(I,[n,I]),Us(v,T),Us(h.content,T),c.jsx(oW,{scope:r,scrollbar:v,hasThumb:o,onThumbChange:Kt(s),onThumbPointerUp:Kt(i),onThumbPositionChange:I,onThumbPointerDown:Kt(l),children:c.jsx(Ke.div,{...m,ref:b,style:{position:"absolute",...m.style},onPointerDown:Ie(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),_.current=v.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),R(P))}),onPointerMove:Ie(e.onPointerMove,R),onPointerUp:Ie(e.onPointerUp,P=>{const $=P.target;$.hasPointerCapture(P.pointerId)&&$.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=y.current,h.viewport&&(h.viewport.style.scrollBehavior=""),_.current=null})})})}),dc="ScrollAreaThumb",lR=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=iR(dc,e.__scopeScrollArea);return c.jsx(Vt,{present:r||o.hasThumb,children:c.jsx(sW,{ref:t,...n})})}),sW=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,s=Jr(dc,r),i=iR(dc,r),{onThumbPositionChange:l}=i,u=tt(t,f=>i.onThumbChange(f)),d=a.useRef(void 0),p=zu(()=>{d.current&&(d.current(),d.current=void 0)},100);return a.useEffect(()=>{const f=s.viewport;if(f){const m=()=>{if(p(),!d.current){const h=lW(f,l);d.current=h,l()}};return l(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[s.viewport,p,l]),c.jsx(Ke.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Ie(e.onPointerDownCapture,f=>{const h=f.target.getBoundingClientRect(),v=f.clientX-h.left,g=f.clientY-h.top;i.onThumbPointerDown({x:v,y:g})}),onPointerUp:Ie(e.onPointerUp,i.onThumbPointerUp)})});lR.displayName=dc;var _g="ScrollAreaCorner",cR=a.forwardRef((e,t)=>{const r=Jr(_g,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?c.jsx(iW,{...e,ref:t}):null});cR.displayName=_g;var iW=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=Jr(_g,r),[s,i]=a.useState(0),[l,u]=a.useState(0),d=!!(s&&l);return Us(o.scrollbarX,()=>{var f;const p=((f=o.scrollbarX)==null?void 0:f.offsetHeight)||0;o.onCornerHeightChange(p),u(p)}),Us(o.scrollbarY,()=>{var f;const p=((f=o.scrollbarY)==null?void 0:f.offsetWidth)||0;o.onCornerWidthChange(p),i(p)}),d?c.jsx(Ke.div,{...n,ref:t,style:{width:s,height:l,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function pc(e){return e?parseInt(e,10):0}function uR(e,t){const r=e/t;return isNaN(r)?0:r}function Lu(e){const t=uR(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function aW(e,t,r,n="ltr"){const o=Lu(r),s=o/2,i=t||s,l=o-i,u=r.scrollbar.paddingStart+i,d=r.scrollbar.size-r.scrollbar.paddingEnd-l,p=r.content-r.viewport,f=n==="ltr"?[0,p]:[p*-1,0];return dR([u,d],f)(e)}function x_(e,t,r="ltr"){const n=Lu(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,i=t.content-t.viewport,l=s-n,u=r==="ltr"?[0,i]:[i*-1,0],d=Lf(e,u);return dR([0,i],[0,l])(d)}function dR(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function pR(e,t){return e>0&&e<t}var lW=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const s={left:e.scrollLeft,top:e.scrollTop},i=r.left!==s.left,l=r.top!==s.top;(i||l)&&t(),r=s,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function zu(e,t){const r=Kt(e),n=a.useRef(0);return a.useEffect(()=>()=>window.clearTimeout(n.current),[]),a.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function Us(e,t){const r=Kt(t);kt(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var fR=rR,cW=oR,uW=cR;const dW=a.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(fR,{ref:n,className:ve("relative overflow-hidden",e),...r,children:[c.jsx(cW,{className:"h-full w-full rounded-[inherit]",children:t}),c.jsx(mR,{}),c.jsx(uW,{})]}));dW.displayName=fR.displayName;const mR=a.forwardRef(({className:e,orientation:t="vertical",...r},n)=>c.jsx(vg,{ref:n,orientation:t,className:ve("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:c.jsx(lR,{className:"relative flex-1 rounded-full bg-border-strong"})}));mR.displayName=vg.displayName;function pW(e){const t=fW(e),r=a.forwardRef((n,o)=>{const{children:s,...i}=n,l=a.Children.toArray(s),u=l.find(hW);if(u){const d=u.props.children,p=l.map(f=>f===u?a.Children.count(d)>1?a.Children.only(null):a.isValidElement(d)?d.props.children:null:f);return c.jsx(t,{...i,ref:o,children:a.isValidElement(d)?a.cloneElement(d,void 0,p):null})}return c.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function fW(e){const t=a.forwardRef((r,n)=>{const{children:o,...s}=r;if(a.isValidElement(o)){const i=vW(o),l=gW(s,o.props);return o.type!==a.Fragment&&(l.ref=n?_r(n,i):i),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mW=Symbol("radix.slottable");function hW(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mW}function gW(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...l)=>{const u=s(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function vW(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var bW=[" ","Enter","ArrowUp","ArrowDown"],_W=[" ","Enter"],Do="Select",[Fu,Vu,yW]=hu(Do),[di]=Xt(Do,[yW,so]),Bu=so(),[xW,lo]=di(Do),[wW,EW]=di(Do),hR=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:s,value:i,defaultValue:l,onValueChange:u,dir:d,name:p,autoComplete:f,disabled:m,required:h,form:v}=e,g=Bu(t),[b,_]=a.useState(null),[y,x]=a.useState(null),[S,w]=a.useState(!1),I=Uo(d),[T,R]=Tr({prop:n,defaultProp:o??!1,onChange:s,caller:Do}),[P,$]=Tr({prop:i,defaultProp:l,onChange:u,caller:Do}),A=a.useRef(null),k=b?v||!!b.closest("form"):!0,[D,z]=a.useState(new Set),X=Array.from(D).map(V=>V.props.value).join(";");return c.jsx(Tu,{...g,children:c.jsxs(xW,{required:h,scope:t,trigger:b,onTriggerChange:_,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:w,contentId:zt(),value:P,onValueChange:$,open:T,onOpenChange:R,dir:I,triggerPointerDownPosRef:A,disabled:m,children:[c.jsx(Fu.Provider,{scope:t,children:c.jsx(wW,{scope:e.__scopeSelect,onNativeOptionAdd:a.useCallback(V=>{z(Y=>new Set(Y).add(V))},[]),onNativeOptionRemove:a.useCallback(V=>{z(Y=>{const U=new Set(Y);return U.delete(V),U})},[]),children:r})}),k?c.jsxs(FR,{"aria-hidden":!0,required:h,tabIndex:-1,name:p,autoComplete:f,value:P,onChange:V=>$(V.target.value),disabled:m,form:v,children:[P===void 0?c.jsx("option",{value:""}):null,Array.from(D)]},X):null]})})};hR.displayName=Do;var gR="SelectTrigger",vR=a.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,s=Bu(r),i=lo(gR,r),l=i.disabled||n,u=tt(t,i.onTriggerChange),d=Vu(r),p=a.useRef("touch"),[f,m,h]=BR(g=>{const b=d().filter(x=>!x.disabled),_=b.find(x=>x.value===i.value),y=HR(b,g,_);y!==void 0&&i.onValueChange(y.value)}),v=g=>{l||(i.onOpenChange(!0),h()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return c.jsx(Da,{asChild:!0,...s,children:c.jsx(Ke.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":VR(i.value)?"":void 0,...o,ref:u,onClick:Ie(o.onClick,g=>{g.currentTarget.focus(),p.current!=="mouse"&&v(g)}),onPointerDown:Ie(o.onPointerDown,g=>{p.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:Ie(o.onKeyDown,g=>{const b=f.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&m(g.key),!(b&&g.key===" ")&&bW.includes(g.key)&&(v(),g.preventDefault())})})})});vR.displayName=gR;var bR="SelectValue",_R=a.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:s,placeholder:i="",...l}=e,u=lo(bR,r),{onValueNodeHasChildrenChange:d}=u,p=s!==void 0,f=tt(t,u.onValueNodeChange);return kt(()=>{d(p)},[d,p]),c.jsx(Ke.span,{...l,ref:f,style:{pointerEvents:"none"},children:VR(u.value)?c.jsx(c.Fragment,{children:i}):s})});_R.displayName=bR;var SW="SelectIcon",yR=a.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return c.jsx(Ke.span,{"aria-hidden":!0,...o,ref:t,children:n||"в–ј"})});yR.displayName=SW;var CW="SelectPortal",xR=e=>c.jsx(ii,{asChild:!0,...e});xR.displayName=CW;var ko="SelectContent",wR=a.forwardRef((e,t)=>{const r=lo(ko,e.__scopeSelect),[n,o]=a.useState();if(kt(()=>{o(new DocumentFragment)},[]),!r.open){const s=n;return s?$o.createPortal(c.jsx(ER,{scope:e.__scopeSelect,children:c.jsx(Fu.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),s):null}return c.jsx(SR,{...e,ref:t})});wR.displayName=ko;var Qr=10,[ER,co]=di(ko),PW="SelectContentImpl",RW=pW("SelectContent.RemoveScroll"),SR=a.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:l,sideOffset:u,align:d,alignOffset:p,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:v,hideWhenDetached:g,avoidCollisions:b,..._}=e,y=lo(ko,r),[x,S]=a.useState(null),[w,I]=a.useState(null),T=tt(t,B=>S(B)),[R,P]=a.useState(null),[$,A]=a.useState(null),k=Vu(r),[D,z]=a.useState(!1),X=a.useRef(!1);a.useEffect(()=>{if(x)return xu(x)},[x]),_u();const V=a.useCallback(B=>{const[J,...K]=k().map(Z=>Z.ref.current),[re]=K.slice(-1),se=document.activeElement;for(const Z of B)if(Z===se||(Z==null||Z.scrollIntoView({block:"nearest"}),Z===J&&w&&(w.scrollTop=0),Z===re&&w&&(w.scrollTop=w.scrollHeight),Z==null||Z.focus(),document.activeElement!==se))return},[k,w]),Y=a.useCallback(()=>V([R,x]),[V,R,x]);a.useEffect(()=>{D&&Y()},[D,Y]);const{onOpenChange:U,triggerPointerDownPosRef:F}=y;a.useEffect(()=>{if(x){let B={x:0,y:0};const J=re=>{var se,Z;B={x:Math.abs(Math.round(re.pageX)-(((se=F.current)==null?void 0:se.x)??0)),y:Math.abs(Math.round(re.pageY)-(((Z=F.current)==null?void 0:Z.y)??0))}},K=re=>{B.x<=10&&B.y<=10?re.preventDefault():x.contains(re.target)||U(!1),document.removeEventListener("pointermove",J),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",J),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",K,{capture:!0})}}},[x,U,F]),a.useEffect(()=>{const B=()=>U(!1);return window.addEventListener("blur",B),window.addEventListener("resize",B),()=>{window.removeEventListener("blur",B),window.removeEventListener("resize",B)}},[U]);const[H,ee]=BR(B=>{const J=k().filter(se=>!se.disabled),K=J.find(se=>se.ref.current===document.activeElement),re=HR(J,B,K);re&&setTimeout(()=>re.ref.current.focus())}),O=a.useCallback((B,J,K)=>{const re=!X.current&&!K;(y.value!==void 0&&y.value===J||re)&&(P(B),re&&(X.current=!0))},[y.value]),M=a.useCallback(()=>x==null?void 0:x.focus(),[x]),G=a.useCallback((B,J,K)=>{const re=!X.current&&!K;(y.value!==void 0&&y.value===J||re)&&A(B)},[y.value]),L=n==="popper"?zf:CR,W=L===zf?{side:l,sideOffset:u,align:d,alignOffset:p,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:v,hideWhenDetached:g,avoidCollisions:b}:{};return c.jsx(ER,{scope:r,content:x,viewport:w,onViewportChange:I,itemRefCallback:O,selectedItem:R,onItemLeave:M,itemTextRefCallback:G,focusSelectedItem:Y,selectedItemText:$,position:n,isPositioned:D,searchRef:H,children:c.jsx(Aa,{as:RW,allowPinchZoom:!0,children:c.jsx($a,{asChild:!0,trapped:y.open,onMountAutoFocus:B=>{B.preventDefault()},onUnmountAutoFocus:Ie(o,B=>{var J;(J=y.trigger)==null||J.focus({preventScroll:!0}),B.preventDefault()}),children:c.jsx(si,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:B=>B.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:c.jsx(L,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:B=>B.preventDefault(),..._,...W,onPlaced:()=>z(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:Ie(_.onKeyDown,B=>{const J=B.ctrlKey||B.altKey||B.metaKey;if(B.key==="Tab"&&B.preventDefault(),!J&&B.key.length===1&&ee(B.key),["ArrowUp","ArrowDown","Home","End"].includes(B.key)){let re=k().filter(se=>!se.disabled).map(se=>se.ref.current);if(["ArrowUp","End"].includes(B.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(B.key)){const se=B.target,Z=re.indexOf(se);re=re.slice(Z+1)}setTimeout(()=>V(re)),B.preventDefault()}})})})})})})});SR.displayName=PW;var TW="SelectItemAlignedPosition",CR=a.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,s=lo(ko,r),i=co(ko,r),[l,u]=a.useState(null),[d,p]=a.useState(null),f=tt(t,T=>p(T)),m=Vu(r),h=a.useRef(!1),v=a.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:_,focusSelectedItem:y}=i,x=a.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&d&&g&&b&&_){const T=s.trigger.getBoundingClientRect(),R=d.getBoundingClientRect(),P=s.valueNode.getBoundingClientRect(),$=_.getBoundingClientRect();if(s.dir!=="rtl"){const se=$.left-R.left,Z=P.left-se,ne=T.left-Z,ie=T.width+ne,he=Math.max(ie,R.width),me=window.innerWidth-Qr,Pe=Lf(Z,[Qr,Math.max(Qr,me-he)]);l.style.minWidth=ie+"px",l.style.left=Pe+"px"}else{const se=R.right-$.right,Z=window.innerWidth-P.right-se,ne=window.innerWidth-T.right-Z,ie=T.width+ne,he=Math.max(ie,R.width),me=window.innerWidth-Qr,Pe=Lf(Z,[Qr,Math.max(Qr,me-he)]);l.style.minWidth=ie+"px",l.style.right=Pe+"px"}const A=m(),k=window.innerHeight-Qr*2,D=g.scrollHeight,z=window.getComputedStyle(d),X=parseInt(z.borderTopWidth,10),V=parseInt(z.paddingTop,10),Y=parseInt(z.borderBottomWidth,10),U=parseInt(z.paddingBottom,10),F=X+V+D+U+Y,H=Math.min(b.offsetHeight*5,F),ee=window.getComputedStyle(g),O=parseInt(ee.paddingTop,10),M=parseInt(ee.paddingBottom,10),G=T.top+T.height/2-Qr,L=k-G,W=b.offsetHeight/2,B=b.offsetTop+W,J=X+V+B,K=F-J;if(J<=G){const se=A.length>0&&b===A[A.length-1].ref.current;l.style.bottom="0px";const Z=d.clientHeight-g.offsetTop-g.offsetHeight,ne=Math.max(L,W+(se?M:0)+Z+Y),ie=J+ne;l.style.height=ie+"px"}else{const se=A.length>0&&b===A[0].ref.current;l.style.top="0px";const ne=Math.max(G,X+g.offsetTop+(se?O:0)+W)+K;l.style.height=ne+"px",g.scrollTop=J-G+g.offsetTop}l.style.margin=`${Qr}px 0`,l.style.minHeight=H+"px",l.style.maxHeight=k+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[m,s.trigger,s.valueNode,l,d,g,b,_,s.dir,n]);kt(()=>x(),[x]);const[S,w]=a.useState();kt(()=>{d&&w(window.getComputedStyle(d).zIndex)},[d]);const I=a.useCallback(T=>{T&&v.current===!0&&(x(),y==null||y(),v.current=!1)},[x,y]);return c.jsx($W,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:h,onScrollButtonChange:I,children:c.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:c.jsx(Ke.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});CR.displayName=TW;var IW="SelectPopperPosition",zf=a.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Qr,...s}=e,i=Bu(r);return c.jsx(Iu,{...i,...s,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});zf.displayName=IW;var[$W,yg]=di(ko,{}),Ff="SelectViewport",PR=a.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,s=co(Ff,r),i=yg(Ff,r),l=tt(t,s.onViewportChange),u=a.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),c.jsx(Fu.Slot,{scope:r,children:c.jsx(Ke.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Ie(o.onScroll,d=>{const p=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=i;if(m!=null&&m.current&&f){const h=Math.abs(u.current-p.scrollTop);if(h>0){const v=window.innerHeight-Qr*2,g=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),_=Math.max(g,b);if(_<v){const y=_+h,x=Math.min(v,y),S=y-x;f.style.height=x+"px",f.style.bottom==="0px"&&(p.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}u.current=p.scrollTop})})})]})});PR.displayName=Ff;var RR="SelectGroup",[AW,jW]=di(RR),TR=a.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=zt();return c.jsx(AW,{scope:r,id:o,children:c.jsx(Ke.div,{role:"group","aria-labelledby":o,...n,ref:t})})});TR.displayName=RR;var IR="SelectLabel",$R=a.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=jW(IR,r);return c.jsx(Ke.div,{id:o.id,...n,ref:t})});$R.displayName=IR;var fc="SelectItem",[OW,AR]=di(fc),jR=a.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:s,...i}=e,l=lo(fc,r),u=co(fc,r),d=l.value===n,[p,f]=a.useState(s??""),[m,h]=a.useState(!1),v=tt(t,y=>{var x;return(x=u.itemRefCallback)==null?void 0:x.call(u,y,n,o)}),g=zt(),b=a.useRef("touch"),_=()=>{o||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(OW,{scope:r,value:n,disabled:o,textId:g,isSelected:d,onItemTextChange:a.useCallback(y=>{f(x=>x||((y==null?void 0:y.textContent)??"").trim())},[]),children:c.jsx(Fu.ItemSlot,{scope:r,value:n,disabled:o,textValue:p,children:c.jsx(Ke.div,{role:"option","aria-labelledby":g,"data-highlighted":m?"":void 0,"aria-selected":d&&m,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:v,onFocus:Ie(i.onFocus,()=>h(!0)),onBlur:Ie(i.onBlur,()=>h(!1)),onClick:Ie(i.onClick,()=>{b.current!=="mouse"&&_()}),onPointerUp:Ie(i.onPointerUp,()=>{b.current==="mouse"&&_()}),onPointerDown:Ie(i.onPointerDown,y=>{b.current=y.pointerType}),onPointerMove:Ie(i.onPointerMove,y=>{var x;b.current=y.pointerType,o?(x=u.onItemLeave)==null||x.call(u):b.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ie(i.onPointerLeave,y=>{var x;y.currentTarget===document.activeElement&&((x=u.onItemLeave)==null||x.call(u))}),onKeyDown:Ie(i.onKeyDown,y=>{var S;((S=u.searchRef)==null?void 0:S.current)!==""&&y.key===" "||(_W.includes(y.key)&&_(),y.key===" "&&y.preventDefault())})})})})});jR.displayName=fc;var Di="SelectItemText",OR=a.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...s}=e,i=lo(Di,r),l=co(Di,r),u=AR(Di,r),d=EW(Di,r),[p,f]=a.useState(null),m=tt(t,_=>f(_),u.onItemTextChange,_=>{var y;return(y=l.itemTextRefCallback)==null?void 0:y.call(l,_,u.value,u.disabled)}),h=p==null?void 0:p.textContent,v=a.useMemo(()=>c.jsx("option",{value:u.value,disabled:u.disabled,children:h},u.value),[u.disabled,u.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=d;return kt(()=>(g(v),()=>b(v)),[g,b,v]),c.jsxs(c.Fragment,{children:[c.jsx(Ke.span,{id:u.textId,...s,ref:m}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?$o.createPortal(s.children,i.valueNode):null]})});OR.displayName=Di;var NR="SelectItemIndicator",DR=a.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return AR(NR,r).isSelected?c.jsx(Ke.span,{"aria-hidden":!0,...n,ref:t}):null});DR.displayName=NR;var Vf="SelectScrollUpButton",kR=a.forwardRef((e,t)=>{const r=co(Vf,e.__scopeSelect),n=yg(Vf,e.__scopeSelect),[o,s]=a.useState(!1),i=tt(t,n.onScrollButtonChange);return kt(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=u.scrollTop>0;s(d)};const u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?c.jsx(LR,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=r;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});kR.displayName=Vf;var Bf="SelectScrollDownButton",MR=a.forwardRef((e,t)=>{const r=co(Bf,e.__scopeSelect),n=yg(Bf,e.__scopeSelect),[o,s]=a.useState(!1),i=tt(t,n.onScrollButtonChange);return kt(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=u.scrollHeight-u.clientHeight,p=Math.ceil(u.scrollTop)<d;s(p)};const u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?c.jsx(LR,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=r;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});MR.displayName=Bf;var LR=a.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,s=co("SelectScrollButton",r),i=a.useRef(null),l=Vu(r),u=a.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return a.useEffect(()=>()=>u(),[u]),kt(()=>{var p;const d=l().find(f=>f.ref.current===document.activeElement);(p=d==null?void 0:d.ref.current)==null||p.scrollIntoView({block:"nearest"})},[l]),c.jsx(Ke.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Ie(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:Ie(o.onPointerMove,()=>{var d;(d=s.onItemLeave)==null||d.call(s),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:Ie(o.onPointerLeave,()=>{u()})})}),NW="SelectSeparator",zR=a.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return c.jsx(Ke.div,{"aria-hidden":!0,...n,ref:t})});zR.displayName=NW;var Hf="SelectArrow",DW=a.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Bu(r),s=lo(Hf,r),i=co(Hf,r);return s.open&&i.position==="popper"?c.jsx($u,{...o,...n,ref:t}):null});DW.displayName=Hf;var kW="SelectBubbleInput",FR=a.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=a.useRef(null),s=tt(n,o),i=Su(t);return a.useEffect(()=>{const l=o.current;if(!l)return;const u=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==t&&p){const f=new Event("change",{bubbles:!0});p.call(l,t),l.dispatchEvent(f)}},[i,t]),c.jsx(Ke.select,{...r,style:{...gP,...r.style},ref:s,defaultValue:t})});FR.displayName=kW;function VR(e){return e===""||e===void 0}function BR(e){const t=Kt(e),r=a.useRef(""),n=a.useRef(0),o=a.useCallback(i=>{const l=r.current+i;t(l),function u(d){r.current=d,window.clearTimeout(n.current),d!==""&&(n.current=window.setTimeout(()=>u(""),1e3))}(l)},[t]),s=a.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,s]}function HR(e,t,r){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let i=MW(e,Math.max(s,0));o.length===1&&(i=i.filter(d=>d!==r));const u=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==r?u:void 0}function MW(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var LW=hR,UR=vR,zW=_R,FW=yR,VW=xR,WR=wR,BW=PR,HW=TR,qR=$R,GR=jR,UW=OR,WW=DR,KR=kR,XR=MR,YR=zR;const $re=LW,Are=HW,jre=zW,qW=a.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(UR,{ref:n,className:ve("flex h-10 w-full items-center justify-between rounded-md border border-input bg-bg-base px-3 py-2 text-sm","placeholder:text-text-subtle","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","aria-invalid:border-error","[&>span]:line-clamp-1",e),...r,children:[t,c.jsx(FW,{asChild:!0,children:c.jsx(Ah,{className:"h-4 w-4 opacity-50"})})]}));qW.displayName=UR.displayName;const JR=a.forwardRef(({className:e,...t},r)=>c.jsx(KR,{ref:r,className:ve("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(c2,{className:"h-4 w-4"})}));JR.displayName=KR.displayName;const ZR=a.forwardRef(({className:e,...t},r)=>c.jsx(XR,{ref:r,className:ve("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Ah,{className:"h-4 w-4"})}));ZR.displayName=XR.displayName;const GW=a.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>c.jsx(VW,{children:c.jsxs(WR,{ref:o,className:ve("relative z-[1400] max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-bg-elevated text-text shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[c.jsx(JR,{}),c.jsx(BW,{className:ve("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(ZR,{})]})}));GW.displayName=WR.displayName;const KW=a.forwardRef(({className:e,...t},r)=>c.jsx(qR,{ref:r,className:ve("px-2 py-1.5 text-sm font-semibold text-text-muted",e),...t}));KW.displayName=qR.displayName;const XW=a.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(GR,{ref:n,className:ve("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none","focus:bg-bg-surface focus:text-text","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(WW,{children:c.jsx($h,{className:"h-4 w-4 text-primary"})})}),c.jsx(UW,{children:t})]}));XW.displayName=GR.displayName;const YW=a.forwardRef(({className:e,...t},r)=>c.jsx(YR,{ref:r,className:ve("-mx-1 my-1 h-px bg-border",e),...t}));YW.displayName=YR.displayName;var JW=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ZW=JW.reduce((e,t)=>{const r=ci(`Primitive.${t}`),n=a.forwardRef((o,s)=>{const{asChild:i,...l}=o,u=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...l,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),QW="Separator",w_="horizontal",e6=["horizontal","vertical"],QR=a.forwardRef((e,t)=>{const{decorative:r,orientation:n=w_,...o}=e,s=t6(n)?n:w_,l=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return c.jsx(ZW.div,{"data-orientation":s,...l,...o,ref:t})});QR.displayName=QW;function t6(e){return e6.includes(e)}var eT=QR;const tT=a.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},o)=>c.jsx(eT,{ref:o,decorative:r,orientation:t,className:ve("shrink-0 bg-border",t==="horizontal"?"h-px w-full":"h-full w-px",e),...n}));tT.displayName=eT.displayName;const Ore=Eu,Nre=Uh,Dre=Oa,r6=ja,rT=a.forwardRef(({className:e,...t},r)=>c.jsx(Wo,{ref:r,className:ve("fixed inset-0 z-[1200] bg-slate-900/60 backdrop-blur-sm","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));rT.displayName=Wo.displayName;const n6=rr("fixed z-[1300] gap-4 bg-bg-elevated p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b border-border data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t border-border data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r border-border data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l border-border data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),o6=a.forwardRef(({side:e="right",className:t,children:r,...n},o)=>{const{t:s}=ga();return c.jsxs(r6,{children:[c.jsx(rT,{}),c.jsxs(qo,{ref:o,className:ve(n6({side:e}),t),...n,children:[r,c.jsxs(Oa,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-bg-base transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[c.jsx(jh,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:s("ui.sheet.close","Закрыть")})]})]})]})});o6.displayName=qo.displayName;const s6=({className:e,...t})=>c.jsx("div",{className:ve("flex flex-col space-y-2 text-center sm:text-left",e),...t});s6.displayName="SheetHeader";const i6=({className:e,...t})=>c.jsx("div",{className:ve("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});i6.displayName="SheetFooter";const a6=a.forwardRef(({className:e,...t},r)=>c.jsx(ai,{ref:r,className:ve("text-lg font-semibold text-text",e),...t}));a6.displayName=ai.displayName;const l6=a.forwardRef(({className:e,...t},r)=>c.jsx(li,{ref:r,className:ve("text-sm text-text-muted",e),...t}));l6.displayName=li.displayName;var Hu="Switch",[c6]=Xt(Hu),[u6,d6]=c6(Hu),nT=a.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:s,required:i,disabled:l,value:u="on",onCheckedChange:d,form:p,...f}=e,[m,h]=a.useState(null),v=tt(t,x=>h(x)),g=a.useRef(!1),b=m?p||!!m.closest("form"):!0,[_,y]=Tr({prop:o,defaultProp:s??!1,onChange:d,caller:Hu});return c.jsxs(u6,{scope:r,checked:_,disabled:l,children:[c.jsx(Ke.button,{type:"button",role:"switch","aria-checked":_,"aria-required":i,"data-state":aT(_),"data-disabled":l?"":void 0,disabled:l,value:u,...f,ref:v,onClick:Ie(e.onClick,x=>{y(S=>!S),b&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),b&&c.jsx(iT,{control:m,bubbles:!g.current,name:n,value:u,checked:_,required:i,disabled:l,form:p,style:{transform:"translateX(-100%)"}})]})});nT.displayName=Hu;var oT="SwitchThumb",sT=a.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=d6(oT,r);return c.jsx(Ke.span,{"data-state":aT(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});sT.displayName=oT;var p6="SwitchBubbleInput",iT=a.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},s)=>{const i=a.useRef(null),l=tt(i,s),u=Su(r),d=Cu(t);return a.useEffect(()=>{const p=i.current;if(!p)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==r&&h){const v=new Event("click",{bubbles:n});h.call(p,r),p.dispatchEvent(v)}},[u,r,n]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});iT.displayName=p6;function aT(e){return e?"checked":"unchecked"}var lT=nT,f6=sT;const m6=a.forwardRef(({className:e,...t},r)=>c.jsx(lT,{ref:r,className:ve("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-primary data-[state=unchecked]:bg-border-strong",e),...t,children:c.jsx(f6,{className:ve("pointer-events-none block h-5 w-5 rounded-full bg-bg-base shadow-sm ring-0 transition-transform","data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));m6.displayName=lT.displayName;var Uu="Tabs",[h6]=Xt(Uu,[ui]),cT=ui(),[g6,xg]=h6(Uu),uT=a.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:l,activationMode:u="automatic",...d}=e,p=Uo(l),[f,m]=Tr({prop:n,onChange:o,defaultProp:s??"",caller:Uu});return c.jsx(g6,{scope:r,baseId:zt(),value:f,onValueChange:m,orientation:i,dir:p,activationMode:u,children:c.jsx(Ke.div,{dir:p,"data-orientation":i,...d,ref:t})})});uT.displayName=Uu;var dT="TabsList",pT=a.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...o}=e,s=xg(dT,r),i=cT(r);return c.jsx(tg,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:n,children:c.jsx(Ke.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});pT.displayName=dT;var fT="TabsTrigger",mT=a.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:o=!1,...s}=e,i=xg(fT,r),l=cT(r),u=vT(i.baseId,n),d=bT(i.baseId,n),p=n===i.value;return c.jsx(rg,{asChild:!0,...l,focusable:!o,active:p,children:c.jsx(Ke.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":d,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...s,ref:t,onMouseDown:Ie(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(n):f.preventDefault()}),onKeyDown:Ie(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(n)}),onFocus:Ie(e.onFocus,()=>{const f=i.activationMode!=="manual";!p&&!o&&f&&i.onValueChange(n)})})})});mT.displayName=fT;var hT="TabsContent",gT=a.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:o,children:s,...i}=e,l=xg(hT,r),u=vT(l.baseId,n),d=bT(l.baseId,n),p=n===l.value,f=a.useRef(p);return a.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),c.jsx(Vt,{present:o||p,children:({present:m})=>c.jsx(Ke.div,{"data-state":p?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!m,id:d,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&s})})});gT.displayName=hT;function vT(e,t){return`${e}-trigger-${t}`}function bT(e,t){return`${e}-content-${t}`}var v6=uT,_T=pT,yT=mT,xT=gT;const kre=v6,b6=a.forwardRef(({className:e,...t},r)=>c.jsx(_T,{ref:r,className:ve("inline-flex h-10 items-center justify-center rounded-md bg-bg-surface p-1 text-text-muted",e),...t}));b6.displayName=_T.displayName;const _6=a.forwardRef(({className:e,...t},r)=>c.jsx(yT,{ref:r,className:ve("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all","ring-offset-bg-base focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","data-[state=active]:bg-bg-base data-[state=active]:text-text data-[state=active]:shadow-sm",e),...t}));_6.displayName=yT.displayName;const y6=a.forwardRef(({className:e,...t},r)=>c.jsx(xT,{ref:r,className:ve("mt-2 ring-offset-bg-base focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));y6.displayName=xT.displayName;const x6=a.forwardRef(({className:e,...t},r)=>c.jsx("textarea",{ref:r,className:ve("flex min-h-[80px] w-full rounded-md border border-input bg-bg-base px-3 py-2 text-sm","ring-offset-bg-base placeholder:text-text-subtle","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","aria-invalid:border-error aria-invalid:focus-visible:ring-error",e),...t}));x6.displayName="Textarea";function w6(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const E6=e=>{switch(e){case"success":return P6;case"info":return T6;case"warning":return R6;case"error":return I6;default:return null}},S6=Array(12).fill(0),C6=({visible:e,className:t})=>N.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},N.createElement("div",{className:"sonner-spinner"},S6.map((r,n)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),P6=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),R6=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),T6=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),I6=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),$6=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},N.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),N.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),A6=()=>{const[e,t]=N.useState(document.hidden);return N.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let Uf=1;class j6{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:n,...o}=t,s=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:Uf++,i=this.toasts.find(u=>u.id===s),l=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(u=>u.id===s?(this.publish({...u,...t,id:s,title:n}),{...u,...t,id:s,dismissible:l,title:n}):u):this.addToast({title:n,...o,dismissible:l,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let s=n!==void 0,i;const l=o.then(async d=>{if(i=["resolve",d],N.isValidElement(d))s=!1,this.create({id:n,type:"default",message:d});else if(N6(d)&&!d.ok){s=!1;const f=typeof r.error=="function"?await r.error(`HTTP error! status: ${d.status}`):r.error,m=typeof r.description=="function"?await r.description(`HTTP error! status: ${d.status}`):r.description,v=typeof f=="object"&&!N.isValidElement(f)?f:{message:f};this.create({id:n,type:"error",description:m,...v})}else if(d instanceof Error){s=!1;const f=typeof r.error=="function"?await r.error(d):r.error,m=typeof r.description=="function"?await r.description(d):r.description,v=typeof f=="object"&&!N.isValidElement(f)?f:{message:f};this.create({id:n,type:"error",description:m,...v})}else if(r.success!==void 0){s=!1;const f=typeof r.success=="function"?await r.success(d):r.success,m=typeof r.description=="function"?await r.description(d):r.description,v=typeof f=="object"&&!N.isValidElement(f)?f:{message:f};this.create({id:n,type:"success",description:m,...v})}}).catch(async d=>{if(i=["reject",d],r.error!==void 0){s=!1;const p=typeof r.error=="function"?await r.error(d):r.error,f=typeof r.description=="function"?await r.description(d):r.description,h=typeof p=="object"&&!N.isValidElement(p)?p:{message:p};this.create({id:n,type:"error",description:f,...h})}}).finally(()=>{s&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),u=()=>new Promise((d,p)=>l.then(()=>i[0]==="reject"?p(i[1]):d(i[1])).catch(p));return typeof n!="string"&&typeof n!="number"?{unwrap:u}:Object.assign(n,{unwrap:u})},this.custom=(t,r)=>{const n=(r==null?void 0:r.id)||Uf++;return this.create({jsx:t(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Er=new j6,O6=(e,t)=>{const r=(t==null?void 0:t.id)||Uf++;return Er.addToast({title:e,...t,id:r}),r},N6=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",D6=O6,k6=()=>Er.toasts,M6=()=>Er.getActiveToasts(),L6=Object.assign(D6,{success:Er.success,info:Er.info,warning:Er.warning,error:Er.error,custom:Er.custom,message:Er.message,promise:Er.promise,dismiss:Er.dismiss,loading:Er.loading},{getHistory:k6,getToasts:M6});w6("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ll(e){return e.label!==void 0}const z6=3,F6="24px",V6="16px",E_=4e3,B6=356,H6=14,U6=45,W6=200;function mn(...e){return e.filter(Boolean).join(" ")}function q6(e){const[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}const G6=e=>{var t,r,n,o,s,i,l,u,d;const{invert:p,toast:f,unstyled:m,interacting:h,setHeights:v,visibleToasts:g,heights:b,index:_,toasts:y,expanded:x,removeToast:S,defaultRichColors:w,closeButton:I,style:T,cancelButtonStyle:R,actionButtonStyle:P,className:$="",descriptionClassName:A="",duration:k,position:D,gap:z,expandByDefault:X,classNames:V,icons:Y,closeButtonAriaLabel:U="Close toast"}=e,[F,H]=N.useState(null),[ee,O]=N.useState(null),[M,G]=N.useState(!1),[L,W]=N.useState(!1),[B,J]=N.useState(!1),[K,re]=N.useState(!1),[se,Z]=N.useState(!1),[ne,ie]=N.useState(0),[he,me]=N.useState(0),Pe=N.useRef(f.duration||k||E_),Se=N.useRef(null),Ce=N.useRef(null),Ze=_===0,Ye=_+1<=g,pe=f.type,be=f.dismissible!==!1,j=f.className||"",q=f.descriptionClassName||"",Q=N.useMemo(()=>b.findIndex(ke=>ke.toastId===f.id)||0,[b,f.id]),le=N.useMemo(()=>{var ke;return(ke=f.closeButton)!=null?ke:I},[f.closeButton,I]),de=N.useMemo(()=>f.duration||k||E_,[f.duration,k]),ce=N.useRef(0),fe=N.useRef(0),ue=N.useRef(0),ye=N.useRef(null),[Be,Ae]=D.split("-"),Ee=N.useMemo(()=>b.reduce((ke,nt,ut)=>ut>=Q?ke:ke+nt.height,0),[b,Q]),lt=A6(),ht=f.invert||p,dt=pe==="loading";fe.current=N.useMemo(()=>Q*z+Ee,[Q,Ee]),N.useEffect(()=>{Pe.current=de},[de]),N.useEffect(()=>{G(!0)},[]),N.useEffect(()=>{const ke=Ce.current;if(ke){const nt=ke.getBoundingClientRect().height;return me(nt),v(ut=>[{toastId:f.id,height:nt,position:f.position},...ut]),()=>v(ut=>ut.filter(_e=>_e.toastId!==f.id))}},[v,f.id]),N.useLayoutEffect(()=>{if(!M)return;const ke=Ce.current,nt=ke.style.height;ke.style.height="auto";const ut=ke.getBoundingClientRect().height;ke.style.height=nt,me(ut),v(_e=>_e.find(ge=>ge.toastId===f.id)?_e.map(ge=>ge.toastId===f.id?{...ge,height:ut}:ge):[{toastId:f.id,height:ut,position:f.position},..._e])},[M,f.title,f.description,v,f.id,f.jsx,f.action,f.cancel]);const mt=N.useCallback(()=>{W(!0),ie(fe.current),v(ke=>ke.filter(nt=>nt.toastId!==f.id)),setTimeout(()=>{S(f)},W6)},[f,S,v,fe]);N.useEffect(()=>{if(f.promise&&pe==="loading"||f.duration===1/0||f.type==="loading")return;let ke;return x||h||lt?(()=>{if(ue.current<ce.current){const _e=new Date().getTime()-ce.current;Pe.current=Pe.current-_e}ue.current=new Date().getTime()})():(()=>{Pe.current!==1/0&&(ce.current=new Date().getTime(),ke=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),mt()},Pe.current))})(),()=>clearTimeout(ke)},[x,h,f,pe,lt,mt]),N.useEffect(()=>{f.delete&&(mt(),f.onDismiss==null||f.onDismiss.call(f,f))},[mt,f.delete]);function ft(){var ke;if(Y!=null&&Y.loading){var nt;return N.createElement("div",{className:mn(V==null?void 0:V.loader,f==null||(nt=f.classNames)==null?void 0:nt.loader,"sonner-loader"),"data-visible":pe==="loading"},Y.loading)}return N.createElement(C6,{className:mn(V==null?void 0:V.loader,f==null||(ke=f.classNames)==null?void 0:ke.loader),visible:pe==="loading"})}const vt=f.icon||(Y==null?void 0:Y[pe])||E6(pe);var ze,We;return N.createElement("li",{tabIndex:0,ref:Ce,className:mn($,j,V==null?void 0:V.toast,f==null||(t=f.classNames)==null?void 0:t.toast,V==null?void 0:V.default,V==null?void 0:V[pe],f==null||(r=f.classNames)==null?void 0:r[pe]),"data-sonner-toast":"","data-rich-colors":(ze=f.richColors)!=null?ze:w,"data-styled":!(f.jsx||f.unstyled||m),"data-mounted":M,"data-promise":!!f.promise,"data-swiped":se,"data-removed":L,"data-visible":Ye,"data-y-position":Be,"data-x-position":Ae,"data-index":_,"data-front":Ze,"data-swiping":B,"data-dismissible":be,"data-type":pe,"data-invert":ht,"data-swipe-out":K,"data-swipe-direction":ee,"data-expanded":!!(x||X&&M),"data-testid":f.testId,style:{"--index":_,"--toasts-before":_,"--z-index":y.length-_,"--offset":`${L?ne:fe.current}px`,"--initial-height":X?"auto":`${he}px`,...T,...f.style},onDragEnd:()=>{J(!1),H(null),ye.current=null},onPointerDown:ke=>{ke.button!==2&&(dt||!be||(Se.current=new Date,ie(fe.current),ke.target.setPointerCapture(ke.pointerId),ke.target.tagName!=="BUTTON"&&(J(!0),ye.current={x:ke.clientX,y:ke.clientY})))},onPointerUp:()=>{var ke,nt,ut;if(K||!be)return;ye.current=null;const _e=Number(((ke=Ce.current)==null?void 0:ke.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Qe=Number(((nt=Ce.current)==null?void 0:nt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ge=new Date().getTime()-((ut=Se.current)==null?void 0:ut.getTime()),Te=F==="x"?_e:Qe,et=Math.abs(Te)/ge;if(Math.abs(Te)>=U6||et>.11){ie(fe.current),f.onDismiss==null||f.onDismiss.call(f,f),O(F==="x"?_e>0?"right":"left":Qe>0?"down":"up"),mt(),re(!0);return}else{var xe,$e;(xe=Ce.current)==null||xe.style.setProperty("--swipe-amount-x","0px"),($e=Ce.current)==null||$e.style.setProperty("--swipe-amount-y","0px")}Z(!1),J(!1),H(null)},onPointerMove:ke=>{var nt,ut,_e;if(!ye.current||!be||((nt=window.getSelection())==null?void 0:nt.toString().length)>0)return;const ge=ke.clientY-ye.current.y,Te=ke.clientX-ye.current.x;var et;const xe=(et=e.swipeDirections)!=null?et:q6(D);!F&&(Math.abs(Te)>1||Math.abs(ge)>1)&&H(Math.abs(Te)>Math.abs(ge)?"x":"y");let $e={x:0,y:0};const Fe=Ge=>1/(1.5+Math.abs(Ge)/20);if(F==="y"){if(xe.includes("top")||xe.includes("bottom"))if(xe.includes("top")&&ge<0||xe.includes("bottom")&&ge>0)$e.y=ge;else{const Ge=ge*Fe(ge);$e.y=Math.abs(Ge)<Math.abs(ge)?Ge:ge}}else if(F==="x"&&(xe.includes("left")||xe.includes("right")))if(xe.includes("left")&&Te<0||xe.includes("right")&&Te>0)$e.x=Te;else{const Ge=Te*Fe(Te);$e.x=Math.abs(Ge)<Math.abs(Te)?Ge:Te}(Math.abs($e.x)>0||Math.abs($e.y)>0)&&Z(!0),(ut=Ce.current)==null||ut.style.setProperty("--swipe-amount-x",`${$e.x}px`),(_e=Ce.current)==null||_e.style.setProperty("--swipe-amount-y",`${$e.y}px`)}},le&&!f.jsx&&pe!=="loading"?N.createElement("button",{"aria-label":U,"data-disabled":dt,"data-close-button":!0,onClick:dt||!be?()=>{}:()=>{mt(),f.onDismiss==null||f.onDismiss.call(f,f)},className:mn(V==null?void 0:V.closeButton,f==null||(n=f.classNames)==null?void 0:n.closeButton)},(We=Y==null?void 0:Y.close)!=null?We:$6):null,(pe||f.icon||f.promise)&&f.icon!==null&&((Y==null?void 0:Y[pe])!==null||f.icon)?N.createElement("div",{"data-icon":"",className:mn(V==null?void 0:V.icon,f==null||(o=f.classNames)==null?void 0:o.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||ft():null,f.type!=="loading"?vt:null):null,N.createElement("div",{"data-content":"",className:mn(V==null?void 0:V.content,f==null||(s=f.classNames)==null?void 0:s.content)},N.createElement("div",{"data-title":"",className:mn(V==null?void 0:V.title,f==null||(i=f.classNames)==null?void 0:i.title)},f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title),f.description?N.createElement("div",{"data-description":"",className:mn(A,q,V==null?void 0:V.description,f==null||(l=f.classNames)==null?void 0:l.description)},typeof f.description=="function"?f.description():f.description):null),N.isValidElement(f.cancel)?f.cancel:f.cancel&&ll(f.cancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||R,onClick:ke=>{ll(f.cancel)&&be&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,ke),mt())},className:mn(V==null?void 0:V.cancelButton,f==null||(u=f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,N.isValidElement(f.action)?f.action:f.action&&ll(f.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||P,onClick:ke=>{ll(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,ke),!ke.defaultPrevented&&mt())},className:mn(V==null?void 0:V.actionButton,f==null||(d=f.classNames)==null?void 0:d.actionButton)},f.action.label):null)};function S_(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function K6(e,t){const r={};return[e,t].forEach((n,o)=>{const s=o===1,i=s?"--mobile-offset":"--offset",l=s?V6:F6;function u(d){["top","right","bottom","left"].forEach(p=>{r[`${i}-${p}`]=typeof d=="number"?`${d}px`:d})}typeof n=="number"||typeof n=="string"?u(n):typeof n=="object"?["top","right","bottom","left"].forEach(d=>{n[d]===void 0?r[`${i}-${d}`]=l:r[`${i}-${d}`]=typeof n[d]=="number"?`${n[d]}px`:n[d]}):u(l)}),r}const Mre=N.forwardRef(function(t,r){const{id:n,invert:o,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:l,closeButton:u,className:d,offset:p,mobileOffset:f,theme:m="light",richColors:h,duration:v,style:g,visibleToasts:b=z6,toastOptions:_,dir:y=S_(),gap:x=H6,icons:S,containerAriaLabel:w="Notifications"}=t,[I,T]=N.useState([]),R=N.useMemo(()=>n?I.filter(M=>M.toasterId===n):I.filter(M=>!M.toasterId),[I,n]),P=N.useMemo(()=>Array.from(new Set([s].concat(R.filter(M=>M.position).map(M=>M.position)))),[R,s]),[$,A]=N.useState([]),[k,D]=N.useState(!1),[z,X]=N.useState(!1),[V,Y]=N.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),U=N.useRef(null),F=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),H=N.useRef(null),ee=N.useRef(!1),O=N.useCallback(M=>{T(G=>{var L;return(L=G.find(W=>W.id===M.id))!=null&&L.delete||Er.dismiss(M.id),G.filter(({id:W})=>W!==M.id)})},[]);return N.useEffect(()=>Er.subscribe(M=>{if(M.dismiss){requestAnimationFrame(()=>{T(G=>G.map(L=>L.id===M.id?{...L,delete:!0}:L))});return}setTimeout(()=>{fx.flushSync(()=>{T(G=>{const L=G.findIndex(W=>W.id===M.id);return L!==-1?[...G.slice(0,L),{...G[L],...M},...G.slice(L+1)]:[M,...G]})})})}),[I]),N.useEffect(()=>{if(m!=="system"){Y(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;const M=window.matchMedia("(prefers-color-scheme: dark)");try{M.addEventListener("change",({matches:G})=>{Y(G?"dark":"light")})}catch{M.addListener(({matches:L})=>{try{Y(L?"dark":"light")}catch(W){console.error(W)}})}},[m]),N.useEffect(()=>{I.length<=1&&D(!1)},[I]),N.useEffect(()=>{const M=G=>{var L;if(i.every(J=>G[J]||G.code===J)){var B;D(!0),(B=U.current)==null||B.focus()}G.code==="Escape"&&(document.activeElement===U.current||(L=U.current)!=null&&L.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[i]),N.useEffect(()=>{if(U.current)return()=>{H.current&&(H.current.focus({preventScroll:!0}),H.current=null,ee.current=!1)}},[U.current]),N.createElement("section",{ref:r,"aria-label":`${w} ${F}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((M,G)=>{var L;const[W,B]=M.split("-");return R.length?N.createElement("ol",{key:M,dir:y==="auto"?S_():y,tabIndex:-1,ref:U,className:d,"data-sonner-toaster":!0,"data-sonner-theme":V,"data-y-position":W,"data-x-position":B,style:{"--front-toast-height":`${((L=$[0])==null?void 0:L.height)||0}px`,"--width":`${B6}px`,"--gap":`${x}px`,...g,...K6(p,f)},onBlur:J=>{ee.current&&!J.currentTarget.contains(J.relatedTarget)&&(ee.current=!1,H.current&&(H.current.focus({preventScroll:!0}),H.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||ee.current||(ee.current=!0,H.current=J.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{z||D(!1)},onDragEnd:()=>D(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||X(!0)},onPointerUp:()=>X(!1)},R.filter(J=>!J.position&&G===0||J.position===M).map((J,K)=>{var re,se;return N.createElement(G6,{key:J.id,icons:S,index:K,toast:J,defaultRichColors:h,duration:(re=_==null?void 0:_.duration)!=null?re:v,className:_==null?void 0:_.className,descriptionClassName:_==null?void 0:_.descriptionClassName,invert:o,visibleToasts:b,closeButton:(se=_==null?void 0:_.closeButton)!=null?se:u,interacting:z,position:M,style:_==null?void 0:_.style,unstyled:_==null?void 0:_.unstyled,classNames:_==null?void 0:_.classNames,cancelButtonStyle:_==null?void 0:_.cancelButtonStyle,actionButtonStyle:_==null?void 0:_.actionButtonStyle,closeButtonAriaLabel:_==null?void 0:_.closeButtonAriaLabel,removeToast:O,toasts:R.filter(Z=>Z.position==J.position),heights:$.filter(Z=>Z.position==J.position),setHeights:A,expandByDefault:l,gap:x,expanded:k,swipeDirections:t.swipeDirections})})):null}))}),X6=rr("mx-auto w-full px-4 sm:px-6 lg:px-8",{variants:{size:{narrow:"max-w-[720px]",base:"max-w-[1200px]",wide:"max-w-[1440px]",sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-none"}},defaultVariants:{size:"base"}}),Y6=a.forwardRef(({className:e,size:t,as:r="div",...n},o)=>{const s=r;return c.jsx(s,{ref:o,className:ve(X6({size:t}),e),...n})});Y6.displayName="Container";const J6=rr("flex flex-col",{variants:{gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12",16:"gap-16"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}},defaultVariants:{gap:4,align:"stretch",justify:"start"}}),Ss=a.forwardRef(({className:e,gap:t,align:r,justify:n,as:o="div",...s},i)=>{const l=o;return c.jsx(l,{ref:i,className:ve(J6({gap:t,align:r,justify:n}),e),...s})});Ss.displayName="Stack";const Z6=rr("flex flex-row",{variants:{gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline",stretch:"items-stretch"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{true:"flex-wrap",false:"flex-nowrap"}},defaultVariants:{gap:4,align:"center",justify:"start",wrap:!0}}),wT=a.forwardRef(({className:e,gap:t,align:r,justify:n,wrap:o,as:s="div",...i},l)=>{const u=s;return c.jsx(u,{ref:l,className:ve(Z6({gap:t,align:r,justify:n,wrap:o}),e),...i})});wT.displayName="Cluster";const Q6=rr("grid",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",6:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-6",12:"grid-cols-12"},gap:{0:"gap-0",2:"gap-2",4:"gap-4",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"}},defaultVariants:{cols:3,gap:6}}),eq=a.forwardRef(({className:e,cols:t,gap:r,as:n="div",...o},s)=>{const i=n;return c.jsx(i,{ref:s,className:ve(Q6({cols:t,gap:r}),e),...o})});eq.displayName="Grid";const tq=rr("w-full",{variants:{py:{none:"py-0",sm:"py-8 sm:py-12",md:"py-12 sm:py-16 lg:py-20",lg:"py-16 sm:py-24 lg:py-32",xl:"py-24 sm:py-32 lg:py-40"},bg:{base:"bg-bg-base",surface:"bg-bg-surface",primary:"bg-primary text-primary-foreground","primary-light":"bg-primary-light",navy:"bg-accent-navy text-accent-navy-foreground"}},defaultVariants:{py:"md",bg:"base"}}),rq=a.forwardRef(({className:e,py:t,bg:r,...n},o)=>c.jsx("section",{ref:o,className:ve(tq({py:t,bg:r}),e),...n}));rq.displayName="Section";const nq=rr("font-display font-bold tracking-tight text-text",{variants:{size:{sm:"text-4xl leading-tight",md:"text-5xl leading-tight",lg:"text-6xl leading-[1.05]",xl:"text-7xl leading-[1.02]"}},defaultVariants:{size:"lg"}}),oq=a.forwardRef(({className:e,size:t,as:r="h1",...n},o)=>{const s=r;return c.jsx(s,{ref:o,className:ve(nq({size:t}),e),...n})});oq.displayName="Display";const sq=rr("font-display font-semibold tracking-tight text-text",{variants:{size:{h1:"text-4xl leading-tight",h2:"text-3xl leading-snug",h3:"text-2xl leading-snug",h4:"text-xl leading-snug",h5:"text-lg leading-normal"}},defaultVariants:{size:"h2"}}),iq=a.forwardRef(({className:e,size:t,as:r,level:n,...o},s)=>{const i=r??(n?`h${n}`:"h2"),l=n?`h${n>5?5:n}`:void 0,u=i;return c.jsx(u,{ref:s,className:ve(sq({size:t??l}),e),...o})});iq.displayName="Heading";const aq=rr("font-body text-text",{variants:{variant:{body:"text-base leading-relaxed",lead:"text-lg leading-relaxed text-text-muted",muted:"text-sm text-text-muted",caption:"text-xs text-text-muted uppercase tracking-wider",small:"text-sm"},weight:{regular:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"body",weight:"regular"}}),Eo=a.forwardRef(({className:e,variant:t,weight:r,as:n="p",...o},s)=>{const i=n;return c.jsx(i,{ref:s,className:ve(aq({variant:t,weight:r}),e),...o})});Eo.displayName="Text";const lq=a.forwardRef(({className:e,block:t=!1,...r},n)=>t?c.jsx("pre",{ref:n,className:ve("rounded-md bg-bg-surface p-4 font-mono text-sm text-text overflow-x-auto",e),...r}):c.jsx("code",{ref:n,className:ve("rounded bg-bg-surface px-1.5 py-0.5 font-mono text-[0.875em] text-text",e),...r}));lq.displayName="Code";const cq=rr("font-display tabular-nums tracking-tight text-text",{variants:{size:{sm:"text-base font-semibold",md:"text-xl font-bold",lg:"text-3xl font-bold",xl:"text-4xl font-bold"}},defaultVariants:{size:"md"}}),uq=a.forwardRef(({className:e,size:t,prefix:r,currency:n="в‚Ѕ",children:o,...s},i)=>c.jsxs("span",{ref:i,className:ve(cq({size:t}),e),...s,children:[r?c.jsx("span",{className:"text-text-muted font-medium pr-1.5",children:r}):null,o,n?c.jsx("span",{className:"text-text-muted font-medium pl-1.5",children:n}):null]}));uq.displayName="Price";var Ba=e=>e.type==="checkbox",Co=e=>e instanceof Date,hr=e=>e==null;const ET=e=>typeof e=="object";var At=e=>!hr(e)&&!Array.isArray(e)&&ET(e)&&!Co(e),ST=e=>At(e)&&e.target?Ba(e.target)?e.target.checked:e.target.value:e,CT=(e,t)=>t.split(".").some((r,n,o)=>!isNaN(Number(r))&&e.has(o.slice(0,n).join("."))),dq=e=>{const t=e.constructor&&e.constructor.prototype;return At(t)&&t.hasOwnProperty("isPrototypeOf")},wg=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function jt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(wg&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(At(e)&&dq(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=jt(e[o]));return n}var Wu=e=>/^\w*$/.test(e),yt=e=>e===void 0,Eg=e=>Array.isArray(e)?e.filter(Boolean):[],Sg=e=>Eg(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ne=(e,t,r)=>{if(!t||!At(e))return r;const o=(Wu(t)?[t]:Sg(t)).reduce((s,i)=>hr(s)?void 0:s[i],e);return yt(o)||o===e?yt(e[t])?r:e[t]:o},Or=e=>typeof e=="boolean",ir=e=>typeof e=="function",_t=(e,t,r)=>{let n=-1;const o=Wu(t)?[t]:Sg(t),s=o.length,i=s-1;for(;++n<s;){const l=o[n];let u=r;if(n!==i){const d=e[l];u=At(d)||Array.isArray(d)?d:isNaN(+o[n+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=u,e=e[l]}};const Xn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},nn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},en={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Yd="form",PT="root",Cg=N.createContext(null);Cg.displayName="HookFormControlContext";const Pg=()=>N.useContext(Cg);var RT=(e,t,r,n=!0)=>{const o={};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==nn.all&&(t._proxyFormState[i]=!n||nn.all),r&&(r[i]=!0),e[i]}});return o};const Rg=typeof window<"u"?N.useLayoutEffect:N.useEffect;function pq(e){const t=Pg(),{control:r=t,disabled:n,name:o,exact:s}=e||{},[i,l]=N.useState(()=>({...r._formState,defaultValues:r._defaultValues})),u=N.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Rg(()=>r._subscribe({name:o,formState:u.current,exact:s,callback:d=>{!n&&l({...r._formState,...d,defaultValues:r._defaultValues})}}),[o,n,s]),N.useEffect(()=>{u.current.isValid&&r._setValid(!0)},[r]),N.useMemo(()=>RT(i,r,u.current,!1),[i,r])}var lr=e=>typeof e=="string",Wf=(e,t,r,n,o)=>lr(e)?(n&&t.watch.add(e),Ne(r,e,o)):Array.isArray(e)?e.map(s=>(n&&t.watch.add(s),Ne(r,s))):(n&&(t.watchAll=!0),r),qf=e=>hr(e)||!ET(e);function Nr(e,t,r=new WeakSet){if(e===t)return!0;if(qf(e)||qf(t))return Object.is(e,t);if(Co(e)&&Co(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const i=e[s];if(!(s in t))return!1;if(s!=="ref"){const l=t[s];if(Co(i)&&Co(l)||(At(i)||Array.isArray(i))&&(At(l)||Array.isArray(l))?!Nr(i,l,r):!Object.is(i,l))return!1}}return!0}function fq(e){const t=Pg(),{control:r=t,name:n,defaultValue:o,disabled:s,exact:i,compute:l}=e||{},u=N.useRef(o),d=N.useRef(l),p=N.useRef(void 0),f=N.useRef(r),m=N.useRef(n);d.current=l;const[h,v]=N.useState(()=>{const S=r._getWatch(n,u.current);return d.current?d.current(S):S}),g=N.useCallback(S=>{const w=Wf(n,r._names,S||r._formValues,!1,u.current);return d.current?d.current(w):w},[r._formValues,r._names,n]),b=N.useCallback(S=>{if(!s){const w=Wf(n,r._names,S||r._formValues,!1,u.current);if(d.current){const I=d.current(w);Nr(I,p.current)||(v(I),p.current=I)}else v(w)}},[r._formValues,r._names,s,n]);Rg(()=>((f.current!==r||!Nr(m.current,n))&&(f.current=r,m.current=n,b()),r._subscribe({name:n,formState:{values:!0},exact:i,callback:S=>{b(S.values)}})),[r,i,n,b]),N.useEffect(()=>r._removeUnmounted());const _=f.current!==r,y=m.current,x=N.useMemo(()=>{if(s)return null;const S=!_&&!Nr(y,n);return _||S?g():null},[s,_,n,y,g]);return x!==null?x:h}function mq(e){const t=Pg(),{name:r,disabled:n,control:o=t,shouldUnregister:s,defaultValue:i,exact:l=!0}=e,u=CT(o._names.array,r),d=N.useMemo(()=>Ne(o._formValues,r,Ne(o._defaultValues,r,i)),[o,r,i]),p=fq({control:o,name:r,defaultValue:d,exact:l}),f=pq({control:o,name:r,exact:l}),m=N.useRef(e),h=N.useRef(o.register(r,{...e.rules,value:p,...Or(e.disabled)?{disabled:e.disabled}:{}}));m.current=e;const v=N.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ne(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!Ne(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Ne(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Ne(f.validatingFields,r)},error:{enumerable:!0,get:()=>Ne(f.errors,r)}}),[f,r]),g=N.useCallback(x=>h.current.onChange({target:{value:ST(x),name:r},type:Xn.CHANGE}),[r]),b=N.useCallback(()=>h.current.onBlur({target:{value:Ne(o._formValues,r),name:r},type:Xn.BLUR}),[r,o._formValues]),_=N.useCallback(x=>{const S=Ne(o._fields,r);S&&S._f&&x&&(S._f.ref={focus:()=>ir(x.focus)&&x.focus(),select:()=>ir(x.select)&&x.select(),setCustomValidity:w=>ir(x.setCustomValidity)&&x.setCustomValidity(w),reportValidity:()=>ir(x.reportValidity)&&x.reportValidity()})},[o._fields,r]),y=N.useMemo(()=>({name:r,value:p,...Or(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:g,onBlur:b,ref:_}),[r,n,f.disabled,g,b,_,p]);return N.useEffect(()=>{const x=o._options.shouldUnregister||s;o.register(r,{...m.current.rules,...Or(m.current.disabled)?{disabled:m.current.disabled}:{}});const S=(w,I)=>{const T=Ne(o._fields,w);T&&T._f&&(T._f.mount=I)};if(S(r,!0),x){const w=jt(Ne(o._options.defaultValues,r,m.current.defaultValue));_t(o._defaultValues,r,w),yt(Ne(o._formValues,r))&&_t(o._formValues,r,w)}return!u&&o.register(r),()=>{(u?x&&!o._state.action:x)?o.unregister(r):S(r,!1)}},[r,o,u,s]),N.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),N.useMemo(()=>({field:y,formState:f,fieldState:v}),[y,f,v])}const hq=e=>e.render(mq(e)),Tg=N.createContext(null);Tg.displayName="HookFormContext";const gq=()=>N.useContext(Tg),vq=e=>{const{children:t,watch:r,getValues:n,getFieldState:o,setError:s,clearErrors:i,setValue:l,setValues:u,trigger:d,formState:p,resetField:f,reset:m,handleSubmit:h,unregister:v,control:g,register:b,setFocus:_,subscribe:y}=e,x=N.useMemo(()=>({watch:r,getValues:n,getFieldState:o,setError:s,clearErrors:i,setValue:l,setValues:u,trigger:d,formState:p,resetField:f,reset:m,handleSubmit:h,unregister:v,control:g,register:b,setFocus:_,subscribe:y}),[i,g,p,o,n,h,b,m,f,s,_,l,u,y,d,v,r]);return N.createElement(Tg.Provider,{value:x},N.createElement(Cg.Provider,{value:x.control},t))};var bq=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},Wi=e=>Array.isArray(e)?e:[e],C_=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}};function TT(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const o=e[n],s=t[n];if(o&&At(o)&&s){const i=TT(o,s);At(i)&&(r[n]=i)}else e[n]&&(r[n]=s)}return r}var or=e=>At(e)&&!Object.keys(e).length,Ig=e=>e.type==="file",mc=e=>{if(!wg)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},IT=e=>e.type==="select-multiple",$g=e=>e.type==="radio",_q=e=>$g(e)||Ba(e),Jd=e=>mc(e)&&e.isConnected;function yq(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;){if(hr(e)){e=void 0;break}e=e[t[n]],n++}return e}function xq(e){for(const t in e)if(e.hasOwnProperty(t)&&!yt(e[t]))return!1;return!0}function Mt(e,t){if(lr(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const r=Array.isArray(t)?t:Wu(t)?[t]:Sg(t),n=r.length===1?e:yq(e,r),o=r.length-1,s=r[o];return n&&delete n[s],o!==0&&(At(n)&&or(n)||Array.isArray(n)&&xq(n))&&Mt(e,r.slice(0,-1)),e}var wq=e=>{for(const t in e)if(ir(e[t]))return!0;return!1};function $T(e){return Array.isArray(e)||At(e)&&!wq(e)}function Gf(e,t={}){for(const r in e){const n=e[r];$T(n)?(t[r]=Array.isArray(n)?[]:{},Gf(n,t[r])):yt(n)||(t[r]=!0)}return t}function Kf(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){const t=e.map(r=>Kf(r));return t.some(r=>r!==void 0)?t:void 0}if(At(e)){const t={};for(const r in e){const n=Kf(e[r]);yt(n)||(t[r]=n)}return Object.keys(t).length?t:void 0}}}function ki(e,t,r){r||(r=Gf(t));for(const n in e){const o=e[n];if($T(o))yt(t)||qf(r[n])?r[n]=Gf(o,Array.isArray(o)?[]:{}):ki(o,hr(t)?{}:t[n],r[n]);else{const s=t[n];r[n]=!Nr(o,s)}}return Kf(r)||{}}const P_={value:!1,isValid:!1},R_={value:!0,isValid:!0};var AT=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!yt(e[0].attributes.value)?yt(e[0].value)||e[0].value===""?R_:{value:e[0].value,isValid:!0}:R_:P_}return P_},jT=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>yt(e)?e:t?e===""?NaN:e&&+e:r&&lr(e)?new Date(e):n?n(e):e;const T_={isValid:!1,value:null};var OT=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,T_):T_;function I_(e){const t=e.ref;return Ig(t)?t.files:$g(t)?OT(e.refs).value:IT(t)?[...t.selectedOptions].map(({value:r})=>r):Ba(t)?AT(e.refs).value:jT(yt(t.value)?e.ref.value:t.value,e)}var Eq=(e,t,r,n)=>{const o={};for(const s of e){const i=Ne(t,s);i&&_t(o,s,i._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},hc=e=>e instanceof RegExp,xi=e=>yt(e)?e:hc(e)?e.source:At(e)?hc(e.value)?e.value.source:e.value:e,$_=e=>({isOnSubmit:!e||e===nn.onSubmit,isOnBlur:e===nn.onBlur,isOnChange:e===nn.onChange,isOnAll:e===nn.all,isOnTouch:e===nn.onTouched});const A_="AsyncFunction";var Sq=e=>!!e&&!!e.validate&&!!(ir(e.validate)&&e.validate.constructor.name===A_||At(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===A_)),Cq=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),j_=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const qi=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const s=Ne(e,o);if(s){const{_f:i,...l}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!n)return!0;if(i.ref&&t(i.ref,i.name)&&!n)return!0;if(qi(l,t))break}else if(At(l)&&qi(l,t))break}}};function O_(e,t,r){const n=Ne(e,r);if(n||Wu(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const s=o.join("."),i=Ne(t,s),l=Ne(e,s);if(i&&!Array.isArray(i)&&r!==s)return{name:r};if(l&&l.type)return{name:s,error:l};if(l&&l.root&&l.root.type)return{name:`${s}.root`,error:l.root};o.pop()}return{name:r}}var Pq=(e,t,r,n)=>{r(e);const{name:o,...s}=e;return or(s)||n&&Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!n||nn.all))},Rq=(e,t,r)=>!e||!t||e===t||Wi(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Tq=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,Iq=(e,t)=>!Eg(Ne(e,t)).length&&Mt(e,t),$q=(e,t,r)=>{const n=Wi(Ne(e,r));return _t(n,PT,t[r]),_t(e,r,n),e};function N_(e,t,r="validate"){if(lr(e)||Array.isArray(e)&&e.every(lr)||Or(e)&&!e)return{type:r,message:lr(e)?e:"",ref:t}}var as=e=>At(e)&&!hc(e)?e:{value:e,message:""},D_=async(e,t,r,n,o,s)=>{const{ref:i,refs:l,required:u,maxLength:d,minLength:p,min:f,max:m,pattern:h,validate:v,name:g,valueAsNumber:b,mount:_}=e._f,y=Ne(r,g);if(!_||t.has(g))return{};const x=l?l[0]:i,S=k=>{o&&x.reportValidity&&(x.setCustomValidity(Or(k)?"":k||""),x.reportValidity())},w={},I=$g(i),T=Ba(i),R=I||T,P=(b||Ig(i))&&yt(i.value)&&yt(y)||mc(i)&&i.value===""||y===""||Array.isArray(y)&&!y.length||b&&typeof y=="number"&&isNaN(y),$=bq.bind(null,g,n,w),A=(k,D,z,X=en.maxLength,V=en.minLength)=>{const Y=k?D:z;w[g]={type:k?X:V,message:Y,ref:i,...$(k?X:V,Y)}};if(s?!Array.isArray(y)||!y.length:u&&(!R&&(P||hr(y))||Or(y)&&!y||T&&!AT(l).isValid||I&&!OT(l).isValid)){const{value:k,message:D}=lr(u)?{value:!!u,message:u}:as(u);if(k&&(w[g]={type:en.required,message:D,ref:x,...$(en.required,D)},!n))return S(D),w}if(!P&&(!hr(f)||!hr(m))){let k,D;const z=as(m),X=as(f);if(!hr(y)&&!isNaN(y)){const V=i.valueAsNumber||y&&+y;hr(z.value)||(k=V>z.value),hr(X.value)||(D=V<X.value)}else{const V=i.valueAsDate||new Date(y),Y=H=>new Date(new Date().toDateString()+" "+H),U=i.type=="time",F=i.type=="week";lr(z.value)&&y&&(k=U?Y(y)>Y(z.value):F?y>z.value:V>new Date(z.value)),lr(X.value)&&y&&(D=U?Y(y)<Y(X.value):F?y<X.value:V<new Date(X.value))}if((k||D)&&(A(!!k,z.message,X.message,en.max,en.min),!n))return S(w[g].message),w}if((d||p)&&!P&&(lr(y)||s&&Array.isArray(y))){const k=as(d),D=as(p),z=!hr(k.value)&&y.length>+k.value,X=!hr(D.value)&&y.length<+D.value;if((z||X)&&(A(z,k.message,D.message),!n))return S(w[g].message),w}if(h&&!P&&lr(y)){const{value:k,message:D}=as(h);if(hc(k)&&!y.match(k)&&(w[g]={type:en.pattern,message:D,ref:i,...$(en.pattern,D)},!n))return S(D),w}if(v){if(ir(v)){const k=await v(y,r),D=N_(k,x);if(D&&(w[g]={...D,...$(en.validate,D.message)},!n))return S(D.message),w}else if(At(v)){let k={};for(const D in v){if(!or(k)&&!n)break;const z=N_(await v[D](y,r),x,D);z&&(k={...z,...$(D,z.message)},S(z.message),n&&(w[g]=k))}if(!or(k)&&(w[g]={ref:x,...k},!n))return w}}return S(!0),w};const Aq={mode:nn.onSubmit,reValidateMode:nn.onChange,shouldFocusError:!0},NT={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function jq(e={}){let t={...Aq,...e},r={...jt(NT),isLoading:ir(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},n={},o=At(t.defaultValues)||At(t.values)?jt(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:jt(o),i={action:!1,mount:!1,watch:!1,keepIsValid:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},u,d=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={...p};let m={...f};const h={array:C_(),state:C_()},v=t.criteriaMode===nn.all,g=j=>q=>{clearTimeout(d),d=setTimeout(j,q)},b=async j=>{if(!i.keepIsValid&&!t.disabled&&(f.isValid||m.isValid||j)){let q;t.resolver?(q=or((await P()).errors),_()):q=await k({fields:n,onlyCheckValid:!0,eventType:Xn.VALID}),q!==r.isValid&&h.state.next({isValid:q})}},_=(j,q)=>{!t.disabled&&(f.isValidating||f.validatingFields||m.isValidating||m.validatingFields)&&((j||Array.from(l.mount)).forEach(Q=>{Q&&(q?_t(r.validatingFields,Q,q):Mt(r.validatingFields,Q))}),h.state.next({validatingFields:r.validatingFields,isValidating:!or(r.validatingFields)}))},y=()=>{r.dirtyFields=ki(o,s)},x=(j,q=[],Q,le,de=!0,ce=!0)=>{if(le&&Q&&!t.disabled){if(i.action=!0,ce&&Array.isArray(Ne(n,j))){const fe=Q(Ne(n,j),le.argA,le.argB);de&&_t(n,j,fe)}if(ce&&Array.isArray(Ne(r.errors,j))){const fe=Q(Ne(r.errors,j),le.argA,le.argB);de&&_t(r.errors,j,fe),Iq(r.errors,j)}if((f.touchedFields||m.touchedFields)&&ce&&Array.isArray(Ne(r.touchedFields,j))){const fe=Q(Ne(r.touchedFields,j),le.argA,le.argB);de&&_t(r.touchedFields,j,fe)}(f.dirtyFields||m.dirtyFields)&&y(),h.state.next({name:j,isDirty:z(j,q),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else _t(s,j,q)},S=(j,q)=>{_t(r.errors,j,q),h.state.next({errors:r.errors})},w=j=>{r.errors=j,h.state.next({errors:r.errors,isValid:!1})},I=(j,q,Q,le)=>{const de=Ne(n,j);if(de){const ce=yt(Ne(s,j)),fe=Ne(s,j,yt(Q)?Ne(o,j):Q);yt(fe)||le&&le.defaultChecked||q?_t(s,j,q?fe:I_(de._f)):Y(j,fe),i.mount&&!i.action&&(b(),ce&&r.isDirty&&(f.isDirty||m.isDirty)&&(z()||(r.isDirty=!1,h.state.next({...r}))))}},T=(j,q,Q,le,de)=>{let ce=!1,fe=!1;const ue={name:j};if(!t.disabled){if(!Q||le){(f.isDirty||m.isDirty)&&(fe=r.isDirty,r.isDirty=ue.isDirty=z(),ce=fe!==ue.isDirty);const ye=Nr(Ne(o,j),q);fe=!!Ne(r.dirtyFields,j),ye?Mt(r.dirtyFields,j):_t(r.dirtyFields,j,!0),ue.dirtyFields=r.dirtyFields,ce=ce||(f.dirtyFields||m.dirtyFields)&&fe!==!ye}if(Q){const ye=Ne(r.touchedFields,j);ye||(_t(r.touchedFields,j,Q),ue.touchedFields=r.touchedFields,ce=ce||(f.touchedFields||m.touchedFields)&&ye!==Q)}ce&&de&&h.state.next(ue)}return ce?ue:{}},R=(j,q,Q,le)=>{const de=Ne(r.errors,j),ce=(f.isValid||m.isValid)&&Or(q)&&r.isValid!==q;if(t.delayError&&Q?(u=g(()=>S(j,Q)),u(t.delayError)):(clearTimeout(d),u=null,Q?_t(r.errors,j,Q):Mt(r.errors,j)),(Q?!Nr(de,Q):de)||!or(le)||ce){const fe={...le,...ce&&Or(q)?{isValid:q}:{},errors:r.errors,name:j};r={...r,...fe},h.state.next(fe)}},P=async j=>(_(j,!0),await t.resolver(s,t.context,Eq(j||l.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),$=async j=>{const{errors:q}=await P(j);if(_(j),j)for(const Q of j){const le=Ne(q,Q);le?_t(r.errors,Q,le):Mt(r.errors,Q)}else r.errors=q;return q},A=async({name:j,eventType:q})=>{if(e.validate){const Q=await e.validate({formValues:s,formState:r,name:j,eventType:q});if(At(Q))for(const le in Q)Q[le]&&B(`${Yd}.${le}`,{message:lr(Q.message)?Q.message:"",type:en.validate});else lr(Q)||!Q?B(Yd,{message:Q||"",type:en.validate}):W(Yd);return Q}return!0},k=async({fields:j,onlyCheckValid:q,name:Q,eventType:le,context:de={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(de.runRootValidation=!0,!await A({name:Q,eventType:le})&&(de.valid=!1,q)))return de.valid;for(const ce in j){const fe=j[ce];if(fe){const{_f:ue,...ye}=fe;if(ue){const Be=l.array.has(ue.name),Ae=fe._f&&Sq(fe._f);Ae&&f.validatingFields&&_([ue.name],!0);const Ee=await D_(fe,l.disabled,s,v,t.shouldUseNativeValidation&&!q,Be);if(Ae&&f.validatingFields&&_([ue.name]),Ee[ue.name]&&(de.valid=!1,q)||(!q&&(Ne(Ee,ue.name)?Be?$q(r.errors,Ee,ue.name):_t(r.errors,ue.name,Ee[ue.name]):Mt(r.errors,ue.name)),e.shouldUseNativeValidation&&Ee[ue.name]))break}!or(ye)&&await k({context:de,onlyCheckValid:q,fields:ye,name:ce,eventType:le})}}return de.valid},D=()=>{for(const j of l.unMount){const q=Ne(n,j);q&&(q._f.refs?q._f.refs.every(Q=>!Jd(Q)):!Jd(q._f.ref))&&se(j)}l.unMount=new Set},z=(j,q)=>!t.disabled&&(j&&q&&_t(s,j,q),!Nr(G(),o)),X=(j,q,Q)=>Wf(j,l,{...i.mount?s:yt(q)?o:lr(j)?{[j]:q}:q},Q,q),V=j=>Eg(Ne(i.mount?s:o,j,t.shouldUnregister?Ne(o,j,[]):[])),Y=(j,q,Q={})=>{const le=Ne(n,j);let de=q;if(le){const ce=le._f;ce&&(!ce.disabled&&_t(s,j,jT(q,ce)),de=mc(ce.ref)&&hr(q)?"":q,IT(ce.ref)?[...ce.ref.options].forEach(fe=>fe.selected=de.includes(fe.value)):ce.refs?Ba(ce.ref)?ce.refs.forEach(fe=>{(!fe.defaultChecked||!fe.disabled)&&(Array.isArray(de)?fe.checked=!!de.find(ue=>ue===fe.value):fe.checked=de===fe.value||!!de)}):ce.refs.forEach(fe=>fe.checked=fe.value===de):Ig(ce.ref)?ce.ref.value="":(ce.ref.value=de,ce.ref.type||h.state.next({name:j,values:jt(s)})))}(Q.shouldDirty||Q.shouldTouch)&&T(j,de,Q.shouldTouch,Q.shouldDirty,!0),Q.shouldValidate&&M(j)},U=(j,q,Q)=>{for(const le in q){if(!q.hasOwnProperty(le))return;const de=q[le],ce=j+"."+le,fe=Ne(n,ce);(l.array.has(j)||At(de)||fe&&!fe._f)&&!Co(de)?U(ce,de,Q):Y(ce,de,Q)}},F=(j,q,Q={})=>{const le=Ne(n,j),de=l.array.has(j),ce=jt(q),fe=Ne(s,j),ue=Nr(fe,ce);if(_t(s,j,ce),de)h.array.next({name:j,values:jt(s)}),(f.isDirty||f.dirtyFields||m.isDirty||m.dirtyFields)&&Q.shouldDirty&&(y(),h.state.next({name:j,dirtyFields:r.dirtyFields,isDirty:z(j,ce)}));else{const ye=Array.isArray(ce)&&!ce.length||or(ce);!le||le._f||hr(ce)||ye?Y(j,ce,Q):U(j,ce,Q)}if(!ue){const ye=j_(j,l);h.state.next({...ye&&r,name:i.mount||ye?j:void 0,values:jt(s)})}},H=j=>{const q=ir(j)?j(s):j;Nr(s,q)||(s={...s,...q},h.state.next({...r,values:s}))},ee=async j=>{i.mount=!0;const q=j.target;let Q=q.name,le=!0;const de=Ne(n,Q),ce=ye=>{le=Number.isNaN(ye)||Co(ye)&&isNaN(ye.getTime())||Nr(ye,Ne(s,Q,ye))},fe=$_(t.mode),ue=$_(t.reValidateMode);if(de){let ye,Be;const Ae=q.type?I_(de._f):ST(j),Ee=j.type===Xn.BLUR||j.type===Xn.FOCUS_OUT,lt=!Cq(de._f)&&!e.validate&&!t.resolver&&!Ne(r.errors,Q)&&!de._f.deps||Tq(Ee,Ne(r.touchedFields,Q),r.isSubmitted,ue,fe),ht=j_(Q,l,Ee);_t(s,Q,Ae),Ee?(!q||!q.readOnly)&&(de._f.onBlur&&de._f.onBlur(j),u&&u(0)):de._f.onChange&&de._f.onChange(j);const dt=T(Q,Ae,Ee),mt=!or(dt)||ht;if(!Ee&&h.state.next({name:Q,type:j.type,values:jt(s)}),lt)return(f.isValid||m.isValid)&&(t.mode==="onBlur"?Ee&&b():Ee||b()),mt&&h.state.next({name:Q,...ht?{}:dt});if(!t.resolver&&e.validate&&await A({name:Q,eventType:j.type}),!Ee&&ht&&h.state.next({...r}),t.resolver){const{errors:ft}=await P([Q]);if(_([Q]),ce(Ae),le){const vt=O_(r.errors,n,Q),ze=O_(ft,n,vt.name||Q);ye=ze.error,Q=ze.name,Be=or(ft)}}else _([Q],!0),ye=(await D_(de,l.disabled,s,v,t.shouldUseNativeValidation))[Q],_([Q]),ce(Ae),le&&(ye?Be=!1:(f.isValid||m.isValid)&&(Be=await k({fields:n,onlyCheckValid:!0,name:Q,eventType:j.type})));le&&(de._f.deps&&(!Array.isArray(de._f.deps)||de._f.deps.length>0)&&M(de._f.deps),R(Q,Be,ye,dt))}},O=(j,q)=>{if(Ne(r.errors,q)&&j.focus)return j.focus(),1},M=async(j,q={})=>{let Q,le;const de=Wi(j);if(t.resolver){const ce=await $(yt(j)?j:de);Q=or(ce),le=j?!de.some(fe=>Ne(ce,fe)):Q}else j?(le=(await Promise.all(de.map(async ce=>{const fe=Ne(n,ce);return await k({fields:fe&&fe._f?{[ce]:fe}:fe,eventType:Xn.TRIGGER})}))).every(Boolean),!(!le&&!r.isValid)&&b()):le=Q=await k({fields:n,name:j,eventType:Xn.TRIGGER});return h.state.next({...!lr(j)||(f.isValid||m.isValid)&&Q!==r.isValid?{}:{name:j},...t.resolver||!j?{isValid:Q}:{},errors:r.errors}),q.shouldFocus&&!le&&qi(n,O,j?de:l.mount),le},G=(j,q)=>{let Q={...i.mount?s:o};return q&&(Q=TT(q.dirtyFields?r.dirtyFields:r.touchedFields,Q)),yt(j)?Q:lr(j)?Ne(Q,j):j.map(le=>Ne(Q,le))},L=(j,q)=>({invalid:!!Ne((q||r).errors,j),isDirty:!!Ne((q||r).dirtyFields,j),error:Ne((q||r).errors,j),isValidating:!!Ne(r.validatingFields,j),isTouched:!!Ne((q||r).touchedFields,j)}),W=j=>{const q=j?Wi(j):void 0;q==null||q.forEach(Q=>Mt(r.errors,Q)),q?q.forEach(Q=>{h.state.next({name:Q,errors:r.errors})}):h.state.next({errors:{}})},B=(j,q,Q)=>{const le=(Ne(n,j,{_f:{}})._f||{}).ref,de=Ne(r.errors,j)||{},{ref:ce,message:fe,type:ue,...ye}=de;_t(r.errors,j,{...ye,...q,ref:le}),h.state.next({name:j,errors:r.errors,isValid:!1}),Q&&Q.shouldFocus&&le&&le.focus&&le.focus()},J=(j,q)=>ir(j)?h.state.subscribe({next:Q=>"values"in Q&&j(Q.values||X(void 0,q),Q)}):X(j,q,!0),K=j=>h.state.subscribe({next:q=>{if(Rq(j.name,q.name,j.exact)&&Pq(q,j.formState||f,Ye,j.reRenderRoot)){const Q={...s};j.callback({values:Q,...r,...q,defaultValues:o})}}}).unsubscribe,re=j=>(i.mount=!0,m={...m,...j.formState},K({...j,formState:{...p,...j.formState}})),se=(j,q={})=>{for(const Q of j?Wi(j):l.mount)l.mount.delete(Q),l.array.delete(Q),q.keepValue||(Mt(n,Q),Mt(s,Q)),!q.keepError&&Mt(r.errors,Q),!q.keepDirty&&Mt(r.dirtyFields,Q),!q.keepTouched&&Mt(r.touchedFields,Q),!q.keepIsValidating&&Mt(r.validatingFields,Q),!t.shouldUnregister&&!q.keepDefaultValue&&Mt(o,Q);h.state.next({values:jt(s)}),h.state.next({...r,...q.keepDirty?{isDirty:z()}:{}}),!q.keepIsValid&&b()},Z=({disabled:j,name:q})=>{if(Or(j)&&i.mount||j||l.disabled.has(q)){const de=l.disabled.has(q)!==!!j;j?l.disabled.add(q):l.disabled.delete(q),de&&i.mount&&!i.action&&b()}},ne=(j,q={})=>{let Q=Ne(n,j);const le=Or(q.disabled)||Or(t.disabled),de=!l.registerName.has(j)&&Q&&Q._f&&!Q._f.mount;return _t(n,j,{...Q||{},_f:{...Q&&Q._f?Q._f:{ref:{name:j}},name:j,mount:!0,...q}}),l.mount.add(j),Q&&!de?Z({disabled:Or(q.disabled)?q.disabled:t.disabled,name:j}):I(j,!0,q.value),{...le?{disabled:q.disabled||t.disabled}:{},...t.progressive?{required:!!q.required,min:xi(q.min),max:xi(q.max),minLength:xi(q.minLength),maxLength:xi(q.maxLength),pattern:xi(q.pattern)}:{},name:j,onChange:ee,onBlur:ee,ref:ce=>{if(ce){l.registerName.add(j),ne(j,q),l.registerName.delete(j),Q=Ne(n,j);const fe=yt(ce.value)&&ce.querySelectorAll&&ce.querySelectorAll("input,select,textarea")[0]||ce,ue=_q(fe),ye=Q._f.refs||[];if(ue?ye.find(Be=>Be===fe):fe===Q._f.ref)return;_t(n,j,{_f:{...Q._f,...ue?{refs:[...ye.filter(Jd),fe,...Array.isArray(Ne(o,j))?[{}]:[]],ref:{type:fe.type,name:j}}:{ref:fe}}}),I(j,!1,void 0,fe)}else Q=Ne(n,j,{}),Q._f&&(Q._f.mount=!1),(t.shouldUnregister||q.shouldUnregister)&&!(CT(l.array,j)&&i.action)&&l.unMount.add(j)}}},ie=()=>t.shouldFocusError&&qi(n,O,l.mount),he=j=>{Or(j)&&(h.state.next({disabled:j}),qi(n,(q,Q)=>{const le=Ne(n,Q);le&&(q.disabled=le._f.disabled||j,Array.isArray(le._f.refs)&&le._f.refs.forEach(de=>{de.disabled=le._f.disabled||j}))},0,!1))},me=(j,q)=>async Q=>{let le;Q&&(Q.preventDefault&&Q.preventDefault(),Q.persist&&Q.persist());let de=jt(s);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:ce,values:fe}=await P();_(),r.errors=ce,de=jt(fe)}else await k({fields:n,eventType:Xn.SUBMIT});if(l.disabled.size)for(const ce of l.disabled)Mt(de,ce);if(Mt(r.errors,PT),or(r.errors)){h.state.next({errors:{}});try{await j(de,Q)}catch(ce){le=ce}}else q&&await q({...r.errors},Q),ie(),setTimeout(ie);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:or(r.errors)&&!le,submitCount:r.submitCount+1,errors:r.errors}),le)throw le},Pe=(j,q={})=>{Ne(n,j)&&(yt(q.defaultValue)?F(j,jt(Ne(o,j))):(F(j,q.defaultValue),_t(o,j,jt(q.defaultValue))),q.keepTouched||Mt(r.touchedFields,j),q.keepDirty||(Mt(r.dirtyFields,j),r.isDirty=q.defaultValue?z(j,jt(Ne(o,j))):z()),q.keepError||(Mt(r.errors,j),f.isValid&&b()),h.state.next({...r}))},Se=(j,q={})=>{const Q=j?jt(j):o,le=jt(Q),de=or(j),ce=de?o:le;if(q.keepDefaultValues||(o=Q),!q.keepValues){if(q.keepDirtyValues){const fe=new Set([...l.mount,...Object.keys(ki(o,s))]);for(const ue of Array.from(fe)){const ye=Ne(r.dirtyFields,ue),Be=Ne(s,ue),Ae=Ne(ce,ue);ye&&!yt(Be)?_t(ce,ue,Be):!ye&&!yt(Ae)&&F(ue,Ae)}}else{if(wg&&yt(j))for(const fe of l.mount){const ue=Ne(n,fe);if(ue&&ue._f){const ye=Array.isArray(ue._f.refs)?ue._f.refs[0]:ue._f.ref;if(mc(ye)){const Be=ye.closest("form");if(Be){Be.reset();break}}}}if(q.keepFieldsRef)for(const fe of l.mount)F(fe,Ne(ce,fe));else n={}}s=t.shouldUnregister?q.keepDefaultValues?jt(o):{}:jt(ce),h.array.next({values:{...ce}}),h.state.next({values:{...ce}})}l={mount:q.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!q.keepIsValid||!!q.keepDirtyValues||!t.shouldUnregister&&!or(ce),i.watch=!!t.shouldUnregister,i.keepIsValid=!!q.keepIsValid,i.action=!1,q.keepErrors||(r.errors={}),h.state.next({submitCount:q.keepSubmitCount?r.submitCount:0,isDirty:de?!1:q.keepDirty?r.isDirty:!!(q.keepDefaultValues&&!Nr(j,o)),isSubmitted:q.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:de?{}:q.keepDirtyValues?q.keepDefaultValues&&s?ki(o,s):r.dirtyFields:q.keepDefaultValues&&j?ki(o,j):q.keepDirty?r.dirtyFields:{},touchedFields:q.keepTouched?r.touchedFields:{},errors:q.keepErrors?r.errors:{},isSubmitSuccessful:q.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ce=(j,q)=>Se(ir(j)?j(s):j,{...t.resetOptions,...q}),Ze=(j,q={})=>{const Q=Ne(n,j),le=Q&&Q._f;if(le){const de=le.refs?le.refs[0]:le.ref;de.focus&&setTimeout(()=>{de.focus(),q.shouldSelect&&ir(de.select)&&de.select()})}},Ye=j=>{r={...r,...j}},be={control:{register:ne,unregister:se,getFieldState:L,handleSubmit:me,setError:B,_subscribe:K,_runSchema:P,_updateIsValidating:_,_focusError:ie,_getWatch:X,_getDirty:z,_setValid:b,_setFieldArray:x,_setDisabledField:Z,_setErrors:w,_getFieldArray:V,_reset:Se,_resetDefaultValues:()=>ir(t.defaultValues)&&t.defaultValues().then(j=>{Ce(j,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:D,_disableForm:he,_subjects:h,_proxyFormState:f,get _fields(){return n},get _formValues(){return s},get _state(){return i},set _state(j){i=j},get _defaultValues(){return o},get _names(){return l},set _names(j){l=j},get _formState(){return r},get _options(){return t},set _options(j){t={...t,...j}}},subscribe:re,trigger:M,register:ne,handleSubmit:me,watch:J,setValue:F,setValues:H,getValues:G,reset:Ce,resetField:Pe,clearErrors:W,unregister:se,setError:B,setFocus:Ze,getFieldState:L};return{...be,formControl:be}}function Lre(e={}){const t=N.useRef(void 0),r=N.useRef(void 0),[n,o]=N.useState(()=>({...jt(NT),isLoading:ir(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ir(e.defaultValues)?void 0:e.defaultValues}));if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!ir(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...l}=jq(e);t.current={...l,formState:n}}const s=t.current.control;return s._options=e,Rg(()=>{const i=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState}),reRenderRoot:!0});return o(l=>({...l,isReady:!0})),s._formState.isReady=!0,i},[s]),N.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),N.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),N.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),N.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),N.useEffect(()=>{if(s._proxyFormState.isDirty){const i=s._getDirty();i!==n.isDirty&&s._subjects.state.next({isDirty:i})}},[s,n.isDirty]),N.useEffect(()=>{var i;e.values&&!Nr(e.values,r.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((i=s._options.resetOptions)===null||i===void 0)&&i.keepIsValid||s._setValid(),r.current=e.values,o(l=>({...l}))):s._resetDefaultValues()},[s,e.values]),N.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=N.useMemo(()=>RT(n,s),[s,n]),t.current}const zre=vq,DT=a.createContext({});function Fre({...e}){return c.jsx(DT.Provider,{value:{name:e.name},children:c.jsx(hq,{...e})})}const kT=a.createContext({}),qu=()=>{const e=a.useContext(DT),t=a.useContext(kT),{getFieldState:r,formState:n}=gq(),o=r(e.name,n);if(!e)throw new Error("useFormField must be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...o}},Oq=a.forwardRef(({className:e,...t},r)=>{const n=a.useId();return c.jsx(kT.Provider,{value:{id:n},children:c.jsx("div",{ref:r,className:ve("space-y-2",e),...t})})});Oq.displayName="FormItem";const Nq=a.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:o}=qu();return c.jsx(jP,{ref:r,className:ve(n&&"text-error",e),htmlFor:o,...t})});Nq.displayName="FormLabel";const Dq=a.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:o,formMessageId:s}=qu();return c.jsx(fS,{ref:t,id:n,"aria-describedby":r?`${o} ${s}`:`${o}`,"aria-invalid":!!r,...e})});Dq.displayName="FormControl";const kq=a.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=qu();return c.jsx("p",{ref:r,id:n,className:ve("text-sm text-text-muted",e),...t})});kq.displayName="FormDescription";const Mq=a.forwardRef(({className:e,children:t,...r},n)=>{const{error:o,formMessageId:s}=qu(),i=o?String((o==null?void 0:o.message)??""):t;return i?c.jsx("p",{ref:n,id:s,className:ve("text-sm font-medium text-error",e),...r,children:i}):null});Mq.displayName="FormMessage";const Lq=a.forwardRef(({option:e,onDetailsClick:t,onOrderClick:r,className:n},o)=>{var u,d;const{t:s}=ga(),i=((u=e.destination)==null?void 0:u.trim())||"—",l=(d=e.routeLabel)==null?void 0:d.trim();return c.jsx(CS,{ref:o,className:ve("h-full hover:shadow-md hover:border-primary/40 transition-all",n),children:c.jsx(PS,{className:"pt-5",children:c.jsxs(Ss,{gap:3,children:[l?c.jsx(SS,{variant:"neutral",className:"self-start",children:l}):null,c.jsx(Eo,{weight:"semibold",className:"text-lg leading-tight",children:i}),c.jsx(NP,{value:e.totalCost??0,currency:"RUB",size:"lg",emphasis:"default"}),c.jsxs(wT,{gap:2,wrap:!0,children:[c.jsxs(Vs,{type:"button",size:"sm",variant:"outline",onClick:()=>t(e),children:[s("bestOffers.details","Подробнее"),c.jsx(Lw,{className:"h-3.5 w-3.5"})]}),r?c.jsx(Vs,{type:"button",size:"sm",onClick:()=>r(e),children:s("bestOffers.order","Оформить")}):null]})]})})})});Lq.displayName="BestOffersCard";const Vre=["APPLICATION_STATUS_CHANGED","SHIPMENT_MILESTONE_CREATED","APPLICATION_FILE_UPLOADED","INVOICE_ISSUED","INVOICE_PAID","INVOICE_OVERDUE","INVOICE_DOCUMENT_UPLOADED","CONTRACT_SENT"],Bre=["EMAIL","TELEGRAM","WEB_PUSH"],zq={APPLICATION_STATUS_CHANGED:"Рзменение статуса заявки",SHIPMENT_MILESTONE_CREATED:"РќРѕРІРѕРµ событие трекинга",APPLICATION_FILE_UPLOADED:"Новый файл РїРѕ заявке",INVOICE_ISSUED:"Выставлен счёт",INVOICE_PAID:"Подтверждена оплата",INVOICE_OVERDUE:"Просроченный счёт",INVOICE_DOCUMENT_UPLOADED:"PDF документ счёта",CONTRACT_SENT:"Договор РЅР° подписание"},Fq={APPLICATION_STATUS_CHANGED:"РљРѕРіРґР° менеджер меняет статус заявки РІ работе (NEW в†’ IN_PROGRESS в†’ COMPLETED Рё С‚.Рґ.)",SHIPMENT_MILESTONE_CREATED:"РљРѕРіРґР° менеджер добавляет РЅРѕРІРѕРµ событие РЅР° пути РіСЂСѓР·Р° (забран, прибыл РІ РїРѕСЂС‚, Рё С‚.Рґ.)",APPLICATION_FILE_UPLOADED:"РљРѕРіРґР° Рє заявке прикрепляют документ (CMR, накладная, фото отгрузки)",INVOICE_ISSUED:"РљРѕРіРґР° выставлен счёт РЅР° оплату",INVOICE_PAID:"Подтверждение получения оплаты",INVOICE_OVERDUE:"РљРѕРіРґР° СЃСЂРѕРє оплаты счёта прошёл",INVOICE_DOCUMENT_UPLOADED:"РљРѕРіРґР° Рє счёту прикреплён или заменён PDF",CONTRACT_SENT:"РљРѕРіРґР° РґРѕРіРѕРІРѕСЂ готов Рё отправлен РЅР° подписание"},Hre=["CUSTOMS_STATUS_CHANGED","CUSTOMS_DOCUMENT_REQUESTED","CUSTOMS_DOCUMENT_RECEIVED"],Vq={CUSTOMS_STATUS_CHANGED:"Смена статуса поставки",CUSTOMS_DOCUMENT_REQUESTED:"Запрос документа поставщику",CUSTOMS_DOCUMENT_RECEIVED:"Документ получен РѕС‚ поставщика"},Bq={CUSTOMS_STATUS_CHANGED:"РљРѕРіРґР° поставка меняет этап: РІ пути в†’ РїРѕСЂС‚ в†’ РЎР’РҐ в†’ оформление ДТ в†’ выпуск",CUSTOMS_DOCUMENT_REQUESTED:"РљРѕРіРґР° система запрашивает Сѓ поставщика недостающий документ (РёРЅРІРѕР№СЃ, упаковочный Рё С‚.Рґ.)",CUSTOMS_DOCUMENT_RECEIVED:"РљРѕРіРґР° поставщик загрузил запрошенный документ РІ источнике через СЃРІРѕР№ портал"},Hq={...zq,...Vq},Ure={...Fq,...Bq},Wre={EMAIL:"Email",TELEGRAM:"Telegram",WEB_PUSH:"Браузер"},qre={list(){return je.get("/me/notification-preferences").then(e=>e.data)},set(e,t,r){return je.put("/me/notification-preferences",{eventCode:e,channel:t,enabled:r}).then(n=>n.data)},getDigestMode(){return je.get("/me/notification-preferences/digest-mode").then(e=>e.data)},setDigestMode(e){return je.put("/me/notification-preferences/digest-mode",{mode:e}).then(t=>t.data)},testSend(e){return je.post(`/me/notification-preferences/test-send?channel=${e}`).then(t=>t.data)}};function k_(e){return Hq[e]??e}function Uq(e,t=Date.now()){const r=new Date(e).getTime();if(Number.isNaN(r))return"";const n=Math.floor((t-r)/6e4);if(n<1)return"только что";if(n<60)return`${n} РјРёРЅ назад`;const o=Math.floor(n/60);if(o<24)return`${o} С‡ назад`;const s=Math.floor(o/24);return s===1?"вчера":`${s} РґРЅ назад`}const M_=[{id:1,eventCode:"APPLICATION_STATUS_CHANGED",subject:"Заявка APP-12345 — статус «В работе»",body:null,relatedEntityType:"Application",relatedEntityId:12345,sentAt:new Date(Date.now()-30*6e4).toISOString(),readAt:null},{id:2,eventCode:"SHIPMENT_MILESTONE_CREATED",subject:"APP-12340 — РїРѕРґРЅСЏС‚ РЅР° Р±РѕСЂС‚",body:null,relatedEntityType:"Application",relatedEntityId:12340,sentAt:new Date(Date.now()-4*36e5).toISOString(),readAt:null}];function Gre({inboxHref:e="/notifications",prefsHref:t="/dashboard/notifications",className:r}){var d;const{isAuthenticated:n}=Ia(),o=ov({queryKey:["m-bell-unread"],queryFn:()=>Es.unreadCount(),enabled:n,staleTime:3e4}),s=ov({queryKey:["m-bell-preview"],queryFn:()=>Es.list({page:0,size:5}),enabled:n,staleTime:6e4}),i=n?((d=o.data)==null?void 0:d.unread)??0:M_.filter(p=>p.readAt==null).length,l=a.useMemo(()=>n?s.data??[]:M_,[n,s.data]),u=i>0;return c.jsxs(pC,{children:[c.jsx(fC,{asChild:!0,children:c.jsxs(Vs,{variant:"ghost",size:"sm",className:`relative ${r??""}`.trim(),"aria-label":u?`Уведомления: ${i} непрочитанных`:"Уведомления","data-testid":"m-bell-trigger","data-unread":u?"true":"false",children:[u?c.jsx(r2,{className:"h-4 w-4"}):c.jsx(kb,{className:"h-4 w-4"}),u?c.jsx("span",{className:"absolute -top-0.5 -right-0.5 min-w-[1rem] h-4 px-1 rounded-full bg-primary text-primary-foreground text-[10px] font-semibold leading-none flex items-center justify-center","data-testid":"m-bell-unread-count",children:i>9?"9+":i}):null]})}),c.jsx(eg,{align:"end",className:"w-80 p-0","data-testid":"m-bell-popover",children:c.jsxs(Ss,{gap:0,children:[c.jsx("div",{className:"px-4 py-3 border-b border-border",children:c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsx(Eo,{weight:"medium",className:"text-sm",children:"Уведомления"}),u?c.jsxs(SS,{variant:"info",className:"text-xs",children:[i," новых"]}):null]})}),n?l.length===0?c.jsxs(Ss,{gap:2,align:"center",className:"px-4 py-6","data-testid":"m-bell-empty",children:[c.jsx(kb,{className:"h-6 w-6 text-text-muted opacity-50"}),c.jsx(Eo,{variant:"muted",className:"text-xs",children:"Уведомлений РїРѕРєР° нет."})]}):c.jsx("div",{className:"max-h-80 overflow-y-auto","data-testid":"m-bell-list",children:l.map(p=>{const f=p.readAt==null;return c.jsx(Ot,{to:e,className:`block px-4 py-3 text-sm border-b border-border last:border-b-0 hover:bg-bg-surface transition-colors ${f?"bg-primary/5":""}`,"data-testid":"m-bell-item","data-notif-id":p.id,"data-unread":f?"true":"false",children:c.jsxs(Ss,{gap:1,children:[c.jsx(Eo,{weight:f?"semibold":"medium",className:"text-xs",children:p.subject||k_(p.eventCode)}),c.jsxs(Eo,{variant:"muted",className:"text-xs",children:[k_(p.eventCode)," В· ",Uq(p.sentAt)]})]})},p.id)})}):c.jsxs(Ss,{gap:2,align:"center",className:"px-4 py-6","data-testid":"m-bell-anon-state",children:[c.jsx(y2,{className:"h-6 w-6 text-text-muted"}),c.jsx(Eo,{variant:"muted",className:"text-xs text-center",children:"Войдите чтобы видеть СЃРІРѕРё уведомления."}),c.jsx(Vs,{asChild:!0,variant:"default",size:"sm",children:c.jsx(Ot,{to:"/login",children:"Войти"})})]}),c.jsx(tT,{}),c.jsxs("div",{className:"flex items-center justify-between px-4 py-2",children:[c.jsx(Ot,{to:t,className:"text-xs text-text-muted hover:text-text underline","data-testid":"m-bell-prefs-link",children:"Настроить"}),c.jsxs(Ot,{to:e,className:"text-xs font-medium text-text inline-flex items-center gap-1","data-testid":"m-bell-inbox-link",children:["Р’СЃРµ уведомления",c.jsx(Lw,{className:"h-3 w-3"})]})]})]})})]})}const L_="exit_intent_shown",Wq=["/","/search-results","/dostavka"],qq=["/landing/","/marshrut/","/industry/","/vs/","/dostavka/"];function z_(e){return Wq.includes(e)?!0:qq.some(t=>e.startsWith(t))}function Gq(){const{pathname:e}=Xr(),[t,r]=a.useState(!1);function n(){z_(e)&&(sessionStorage.getItem(L_)||(sessionStorage.setItem(L_,"1"),r(!0)))}return a.useEffect(()=>{if(!z_(e))return;function o(s){s.clientY<=20&&n()}return document.addEventListener("mouseleave",o),()=>document.removeEventListener("mouseleave",o)},[e]),t?c.jsx("div",{role:"dialog","aria-modal":"true","aria-label":"РќРµ уходите",className:ve("fixed inset-0 z-[9999] flex items-center justify-center p-4","bg-black/50 backdrop-blur-sm"),onClick:o=>{o.target===o.currentTarget&&r(!1)},children:c.jsxs("div",{className:"relative w-full max-w-md rounded-2xl bg-white dark:bg-gray-900 shadow-2xl p-8 text-center",children:[c.jsx("button",{onClick:()=>r(!1),className:"absolute top-3 right-3 p-1 rounded-full text-gray-400 hover:text-gray-700 hover:bg-gray-100 transition-colors","aria-label":"Закрыть",children:c.jsx(jh,{className:"w-5 h-5"})}),c.jsx("div",{className:"text-4xl mb-3",children:"рџљў"}),c.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white mb-2",children:"РќРµ уходите!"}),c.jsxs("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:["Бесплатный расчёт стоимости доставки за 30 секунд —",c.jsx("br",{}),"без регистрации РёВ Р·РІРѕРЅРєРѕРІ менеджера."]}),c.jsx(Vs,{asChild:!0,size:"lg",className:"w-full",children:c.jsx(Ot,{to:"/calculator",onClick:()=>r(!1),children:"Рассчитать бесплатно в†’"})}),c.jsx("p",{className:"mt-3 text-xs text-gray-400",children:"60+ перевозчиков В· Китай, РРЅРґРёСЏ, Турция В· Р·Р° 5 секунд"})]})}):null}function F_({children:e}){const{isAuthenticated:t}=Ia(),r=Xr();if(!t){const n=`${r.pathname}${r.search}`;return c.jsx(Ht,{to:`/login?redirect=${encodeURIComponent(n)}`,replace:!0})}return c.jsx(c.Fragment,{children:e})}const MT={fetch:globalThis.fetch?globalThis.fetch.bind(globalThis):void 0,SubtleCrypto:globalThis.crypto?globalThis.crypto.subtle:void 0,EventSource:globalThis.EventSource};function Kq(){return MT}function Zd(e){let t=2166136261;const r=e.length;for(let n=0;n<r;n++)t^=e.charCodeAt(n),t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24);return t>>>0}function Gu(e,t,r){return r===2?Zd(Zd(e+t)+"")%1e4/1e4:r===1?Zd(t+e)%1e3/1e3:null}function Xq(e){return e<=0?[]:new Array(e).fill(1/e)}function Ag(e,t){return e>=t[0]&&e<t[1]}function Yq(e,t){const r=Gu("__"+t[0],e,1);return r===null?!1:r>=t[1]&&r<t[2]}function Jq(e,t){for(let r=0;r<t.length;r++)if(Ag(e,t[r]))return r;return-1}function LT(e){try{const t=e.replace(/([^\\])\//g,"$1\\/");return new RegExp(t)}catch(t){console.error(t);return}}function zT(e,t){if(!t.length)return!1;let r=!1,n=!1;for(let o=0;o<t.length;o++){const s=e8(e,t[o].type,t[o].pattern);if(t[o].include===!1){if(s)return!1}else r=!0,s&&(n=!0)}return n||!r}function Zq(e,t,r){try{let n=t.replace(/[*.+?^${}()|[\]\\]/g,"\\$&").replace(/_____/g,".*");return r&&(n="\\/?"+n.replace(/(^\/|\/$)/g,"")+"\\/?"),new RegExp("^"+n+"$","i").test(e)}catch{return!1}}function Qq(e,t){try{const r=new URL(t.replace(/^([^:/?]*)\./i,"https://$1.").replace(/\*/g,"_____"),"https://_____"),n=[[e.host,r.host,!1],[e.pathname,r.pathname,!0]];return r.hash&&n.push([e.hash,r.hash,!1]),r.searchParams.forEach((o,s)=>{n.push([e.searchParams.get(s)||"",o,!1])}),!n.some(o=>!Zq(o[0],o[1],o[2]))}catch{return!1}}function e8(e,t,r){try{const n=new URL(e,"https://_");if(t==="regex"){const o=LT(r);return o?o.test(n.href)||o.test(n.href.substring(n.origin.length)):!1}else if(t==="simple")return Qq(n,r);return!1}catch{return!1}}function t8(e,t,r){t=t===void 0?1:t,t<0?t=0:t>1&&(t=1);const n=Xq(e);r=r||n,r.length!==e&&(r=n);const o=r.reduce((i,l)=>l+i,0);(o<.99||o>1.01)&&(r=n);let s=0;return r.map(i=>{const l=s;return s+=i,[l,l+t*i]})}function r8(e,t,r){if(!t)return null;const n=t.split("?")[1];if(!n)return null;const o=n.replace(/#.*/,"").split("&").map(s=>s.split("=",2)).filter(([s])=>s===e).map(([,s])=>parseInt(s));return o.length>0&&o[0]>=0&&o[0]<r?o[0]:null}function n8(e){try{return e()}catch(t){return console.error(t),!1}}const Qd=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0));async function Gi(e,t,r){if(t=t||"",r=r||globalThis.crypto&&globalThis.crypto.subtle||MT.SubtleCrypto,!r)throw new Error("No SubtleCrypto implementation found");try{const n=await r.importKey("raw",Qd(t),{name:"AES-CBC",length:128},!0,["encrypt","decrypt"]),[o,s]=e.split("."),i=await r.decrypt({name:"AES-CBC",iv:Qd(o)},n,Qd(s));return new TextDecoder().decode(i)}catch{throw new Error("Failed to decrypt")}}function gc(e){return typeof e=="string"?e:JSON.stringify(e)}function Br(e){typeof e=="number"&&(e=e+""),(!e||typeof e!="string")&&(e="0");const t=e.replace(/(^v|\+.*$)/g,"").split(/[-.]/);return t.length===3&&t.push("~"),t.map(r=>r.match(/^[0-9]+$/)?r.padStart(5," "):r).join("-")}function o8(){let e;try{e="1.6.5"}catch{e=""}return e}function s8(e,t){let r,n;try{r=new URL(e),n=new URL(t)}catch(o){return console.error(`Unable to merge query strings: ${o}`),t}return r.searchParams.forEach((o,s)=>{n.searchParams.has(s)||n.searchParams.set(s,o)}),n.toString()}function V_(e){return typeof e=="object"&&e!==null}function ep(e){return e.urlPatterns&&e.variations.some(t=>V_(t)&&"urlRedirect"in t)?"redirect":e.variations.some(t=>V_(t)&&(t.domMutations||"js"in t||"css"in t))?"visual":"unknown"}async function FT(e,t){return new Promise(r=>{let n=!1,o;const s=i=>{n||(n=!0,o&&clearTimeout(o),r(i||null))};t&&(o=setTimeout(()=>s(),t)),e.then(i=>s(i)).catch(()=>s())})}const cr={staleTTL:1e3*60,maxAge:1e3*60*60*4,cacheKey:"gbFeaturesCache",backgroundSync:!0,maxEntries:10,disableIdleStreams:!1,idleStreamInterval:2e4,disableCache:!1},bn=Kq(),Ws={fetchFeaturesCall:({host:e,clientKey:t,headers:r})=>bn.fetch(`${e}/api/features/${t}`,{headers:r}),fetchRemoteEvalCall:({host:e,clientKey:t,payload:r,headers:n})=>{const o={method:"POST",headers:{"Content-Type":"application/json",...n},body:JSON.stringify(r)};return bn.fetch(`${e}/api/eval/${t}`,o)},eventSourceCall:({host:e,clientKey:t,headers:r})=>r?new bn.EventSource(`${e}/sub/${t}`,{headers:r}):new bn.EventSource(`${e}/sub/${t}`),startIdleListener:()=>{let e;if(!(typeof window<"u"&&typeof document<"u"))return;const r=()=>{document.visibilityState==="visible"?(window.clearTimeout(e),d8()):document.visibilityState==="hidden"&&(e=window.setTimeout(u8,cr.idleStreamInterval))};return document.addEventListener("visibilitychange",r),()=>document.removeEventListener("visibilitychange",r)},stopIdleListener:()=>{}};try{globalThis.localStorage&&(bn.localStorage=globalThis.localStorage)}catch{}const qs=new Map;let B_=!1;const Nn=new Map,cl=new Map,Gs=new Map,Ks=new Set;function i8(e){Object.assign(cr,e),cr.backgroundSync||UT()}async function a8({instance:e,timeout:t,skipCache:r,allowStale:n,backgroundSync:o}){return o||(cr.backgroundSync=!1),p8({instance:e,allowStale:n,timeout:t,skipCache:r})}function l8(e){const t=Ha(e),r=qs.get(t)||new Set;r.add(e),qs.set(t,r)}function c8(e){qs.forEach(t=>t.delete(e))}function u8(){Gs.forEach(e=>{e&&(e.state="idle",Ng(e))})}function d8(){Gs.forEach(e=>{e&&e.state==="idle"&&Dg(e)})}async function H_(){try{if(!bn.localStorage)return;await bn.localStorage.setItem(cr.cacheKey,JSON.stringify(Array.from(Nn.entries())))}catch{}}async function p8({instance:e,allowStale:t,timeout:r,skipCache:n}){const o=Ha(e),s=jg(e),i=new Date,l=new Date(i.getTime()-cr.maxAge+cr.staleTTL);await f8();const u=!cr.disableCache&&!n?Nn.get(s):void 0;return u&&(t||u.staleAt>i)&&u.staleAt>l?(u.sse&&Ks.add(o),u.staleAt<i?Xf(e):Og(e),{data:u.data,success:!0,source:"cache"}):await FT(Xf(e),r)||{data:null,success:!1,source:"timeout",error:new Error("Timeout")}}function Ha(e){const[t,r]=e.getApiInfo();return`${t}||${r}`}function jg(e){const t=Ha(e);if(!("isRemoteEval"in e)||!e.isRemoteEval())return t;const r=e.getAttributes(),n=e.getCacheKeyAttributes()||Object.keys(e.getAttributes()),o={};n.forEach(l=>{o[l]=r[l]});const s=e.getForcedVariations(),i=e.getUrl();return`${t}||${JSON.stringify({ca:o,fv:s,url:i})}`}async function f8(){if(!B_){B_=!0;try{if(bn.localStorage){const e=await bn.localStorage.getItem(cr.cacheKey);if(!cr.disableCache&&e){const t=JSON.parse(e);t&&Array.isArray(t)&&t.forEach(([r,n])=>{Nn.set(r,{...n,staleAt:new Date(n.staleAt)})}),VT()}}}catch{}if(!cr.disableIdleStreams){const e=Ws.startIdleListener();e&&(Ws.stopIdleListener=e)}}}function VT(){const e=Array.from(Nn.entries()).map(([r,n])=>({key:r,staleAt:n.staleAt.getTime()})).sort((r,n)=>r.staleAt-n.staleAt),t=Math.min(Math.max(0,Nn.size-cr.maxEntries),Nn.size);for(let r=0;r<t;r++)Nn.delete(e[r].key)}function BT(e,t,r){const n=r.dateUpdated||"",o=new Date(Date.now()+cr.staleTTL),s=cr.disableCache?void 0:Nn.get(t);if(s&&n&&s.version===n){s.staleAt=o,H_();return}cr.disableCache||(Nn.set(t,{data:r,version:n,staleAt:o,sse:Ks.has(e)}),VT()),H_();const i=qs.get(e);i&&i.forEach(l=>m8(l,r))}async function m8(e,t){await e.setPayload(t||e.getPayload())}async function Xf(e){const{apiHost:t,apiRequestHeaders:r}=e.getApiHosts(),n=e.getClientKey(),o="isRemoteEval"in e&&e.isRemoteEval(),s=Ha(e),i=jg(e);let l=cl.get(i);return l||(l=(o?Ws.fetchRemoteEvalCall({host:t,clientKey:n,payload:{attributes:e.getAttributes(),forcedVariations:e.getForcedVariations(),forcedFeatures:Array.from(e.getForcedFeatures().entries()),url:e.getUrl()},headers:r}):Ws.fetchFeaturesCall({host:t,clientKey:n,headers:r})).then(d=>{if(!d.ok)throw new Error(`HTTP error: ${d.status}`);return d.headers.get("x-sse-support")==="enabled"&&Ks.add(s),d.json()}).then(d=>(BT(s,i,d),Og(e),cl.delete(i),{data:d,success:!0,source:"network"})).catch(d=>(cl.delete(i),{data:null,source:"error",success:!1,error:d})),cl.set(i,l)),l}function Og(e,t=!1){const r=Ha(e),n=jg(e),{streamingHost:o,streamingHostRequestHeaders:s}=e.getApiHosts(),i=e.getClientKey();if(t&&Ks.add(r),cr.backgroundSync&&Ks.has(r)&&bn.EventSource){if(Gs.has(r))return;const l={src:null,host:o,clientKey:i,headers:s,cb:u=>{try{if(u.type==="features-updated"){const d=qs.get(r);d&&d.forEach(p=>{Xf(p)})}else if(u.type==="features"){const d=JSON.parse(u.data);BT(r,n,d)}l.errors=0}catch{HT(l)}},errors:0,state:"active"};Gs.set(r,l),Dg(l)}}function HT(e){if(e.state!=="idle"&&(e.errors++,e.errors>3||e.src&&e.src.readyState===2)){const t=Math.pow(3,e.errors-3)*(1e3+Math.random()*1e3);Ng(e),setTimeout(()=>{["idle","active"].includes(e.state)||Dg(e)},Math.min(t,3e5))}}function Ng(e){e.src&&(e.src.onopen=null,e.src.onerror=null,e.src.close(),e.src=null,e.state==="active"&&(e.state="disabled"))}function Dg(e){e.src=Ws.eventSourceCall({host:e.host,clientKey:e.clientKey,headers:e.headers}),e.state="active",e.src.addEventListener("features",e.cb),e.src.addEventListener("features-updated",e.cb),e.src.onerror=()=>HT(e),e.src.onopen=()=>{e.errors=0}}function h8(e,t){Ng(e),Gs.delete(t)}function UT(){Ks.clear(),Gs.forEach(h8),qs.clear(),Ws.stopIdleListener()}function tp(e,t){if(t.streaming){if(!e.getClientKey())throw new Error("Must specify clientKey to enable streaming");t.payload&&Og(e,!0),l8(e)}}var g8=/^[a-zA-Z:_][a-zA-Z0-9:_.-]*$/,kg={revert:function(){}},vc=new Map,Mg=new Set;function v8(e){return e==="html"?{childList:!0,subtree:!0,attributes:!0,characterData:!0}:{childList:!1,subtree:!1,attributes:!0,attributeFilter:[e]}}function Ku(e){var t=vc.get(e);return t||(t={element:e,attributes:{}},vc.set(e,t)),t}function Xu(e,t,r,n,o){var s=r(e),i={isDirty:!1,originalValue:s,virtualValue:s,mutations:[],el:e,_positionTimeout:null,observer:new MutationObserver(function(){if(!(t==="position"&&i._positionTimeout)){t==="position"&&(i._positionTimeout=setTimeout(function(){i._positionTimeout=null},1e3));var l=r(e);t==="position"&&l.parentNode===i.virtualValue.parentNode&&l.insertBeforeNode===i.virtualValue.insertBeforeNode||l!==i.virtualValue&&(i.originalValue=l,o(i))}}),mutationRunner:o,setValue:n,getCurrentValue:r};return t==="position"&&e.parentNode?i.observer.observe(e.parentNode,{childList:!0,subtree:!0,attributes:!1,characterData:!1}):i.observer.observe(e,v8(t)),i}function Yu(e,t){var r=t.getCurrentValue(t.el);t.virtualValue=e,e&&typeof e!="string"?(!r||e.parentNode!==r.parentNode||e.insertBeforeNode!==r.insertBeforeNode)&&(t.isDirty=!0,U_()):e!==r&&(t.isDirty=!0,U_())}function b8(e){var t=e.originalValue;e.mutations.forEach(function(r){return t=r.mutate(t)}),Yu(j8(t),e)}function _8(e){var t=new Set(e.originalValue.split(/\s+/).filter(Boolean));e.mutations.forEach(function(r){return r.mutate(t)}),Yu(Array.from(t).filter(Boolean).join(" "),e)}function y8(e){var t=e.originalValue;e.mutations.forEach(function(r){return t=r.mutate(t)}),Yu(t,e)}function x8(e){var t=e.parentSelector,r=e.insertBeforeSelector,n=document.querySelector(t);if(!n)return null;var o=r?document.querySelector(r):null;return r&&!o?null:{parentNode:n,insertBeforeNode:o}}function w8(e){var t=e.originalValue;e.mutations.forEach(function(r){var n=r.mutate(),o=x8(n);t=o||t}),Yu(t,e)}var E8=function(t){return t.innerHTML},S8=function(t,r){return t.innerHTML=r};function WT(e){var t=Ku(e);return t.html||(t.html=Xu(e,"html",E8,S8,b8)),t.html}var C8=function(t){return{parentNode:t.parentElement,insertBeforeNode:t.nextElementSibling}},P8=function(t,r){r.insertBeforeNode&&!r.parentNode.contains(r.insertBeforeNode)||r.parentNode.insertBefore(t,r.insertBeforeNode)};function qT(e){var t=Ku(e);return t.position||(t.position=Xu(e,"position",C8,P8,w8)),t.position}var R8=function(t,r){return r?t.className=r:t.removeAttribute("class")},T8=function(t){return t.className};function GT(e){var t=Ku(e);return t.classes||(t.classes=Xu(e,"class",T8,R8,_8)),t.classes}var I8=function(t){return function(r){var n;return(n=r.getAttribute(t))!=null?n:null}},$8=function(t){return function(r,n){return n!==null?r.setAttribute(t,n):r.removeAttribute(t)}};function KT(e,t){var r=Ku(e);return r.attributes[t]||(r.attributes[t]=Xu(e,t,I8(t),$8(t),y8)),r.attributes[t]}function A8(e,t){var r=vc.get(e);if(r)if(t==="html"){var n,o;(n=r.html)==null||(o=n.observer)==null||o.disconnect(),delete r.html}else if(t==="class"){var s,i;(s=r.classes)==null||(i=s.observer)==null||i.disconnect(),delete r.classes}else if(t==="position"){var l,u;(l=r.position)==null||(u=l.observer)==null||u.disconnect(),delete r.position}else{var d,p,f;(d=r.attributes)==null||(p=d[t])==null||(f=p.observer)==null||f.disconnect(),delete r.attributes[t]}}var ul;function j8(e){return ul||(ul=document.createElement("div")),ul.innerHTML=e,ul.innerHTML}function dl(e,t,r){if(r.isDirty){r.isDirty=!1;var n=r.virtualValue;r.mutations.length||A8(e,t),r.setValue(e,n)}}function O8(e,t){e.html&&dl(t,"html",e.html),e.classes&&dl(t,"class",e.classes),e.position&&dl(t,"position",e.position),Object.keys(e.attributes).forEach(function(r){dl(t,r,e.attributes[r])})}function U_(){vc.forEach(O8)}function N8(e,t){var r=null;e.kind==="html"?r=WT(t):e.kind==="class"?r=GT(t):e.kind==="attribute"?r=KT(t,e.attribute):e.kind==="position"&&(r=qT(t)),r&&(r.mutations.push(e),r.mutationRunner(r))}function D8(e,t){var r=null;if(e.kind==="html"?r=WT(t):e.kind==="class"?r=GT(t):e.kind==="attribute"?r=KT(t,e.attribute):e.kind==="position"&&(r=qT(t)),!!r){var n=r.mutations.indexOf(e);n!==-1&&r.mutations.splice(n,1),r.mutationRunner(r)}}function XT(e){if(!(e.kind==="position"&&e.elements.size===1)){var t=new Set(e.elements),r=document.querySelectorAll(e.selector);r.forEach(function(n){t.has(n)||(e.elements.add(n),N8(e,n))})}}function k8(e){e.elements.forEach(function(t){return D8(e,t)}),e.elements.clear(),Mg.delete(e)}function W_(){Mg.forEach(XT)}var rp;function M8(){typeof document>"u"||(rp||(rp=new MutationObserver(function(){W_()})),W_(),rp.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!1,characterData:!1}))}M8();function Ju(e){return typeof document>"u"?kg:(Mg.add(e),XT(e),{revert:function(){k8(e)}})}function Yf(e,t){return Ju({kind:"html",elements:new Set,mutate:t,selector:e})}function YT(e,t){return Ju({kind:"position",elements:new Set,mutate:t,selector:e})}function Ki(e,t){return Ju({kind:"class",elements:new Set,mutate:t,selector:e})}function Nl(e,t,r){return g8.test(t)?t==="class"||t==="className"?Ki(e,function(n){var o=r(Array.from(n).join(" "));n.clear(),o&&o.split(/\s+/g).filter(Boolean).forEach(function(s){return n.add(s)})}):Ju({kind:"attribute",attribute:t,elements:new Set,mutate:r,selector:e}):kg}function L8(e){var t=e.selector,r=e.action,n=e.value,o=e.attribute,s=e.parentSelector,i=e.insertBeforeSelector;if(o==="html"){if(r==="append")return Yf(t,function(l){return l+(n??"")});if(r==="set")return Yf(t,function(){return n??""})}else if(o==="class"){if(r==="append")return Ki(t,function(l){n&&l.add(n)});if(r==="remove")return Ki(t,function(l){n&&l.delete(n)});if(r==="set")return Ki(t,function(l){l.clear(),n&&l.add(n)})}else if(o==="position"){if(r==="set"&&s)return YT(t,function(){return{insertBeforeSelector:i,parentSelector:s}})}else{if(r==="append")return Nl(t,o,function(l){return l!==null?l+(n??""):n??""});if(r==="set")return Nl(t,o,function(){return n??""});if(r==="remove")return Nl(t,o,function(){return null})}return kg}var z8={html:Yf,classes:Ki,attribute:Nl,position:YT,declarative:L8};const np={};function Xo(e,t,r){r=r||{};for(const[n,o]of Object.entries(t))switch(n){case"$or":if(!K_(e,o,r))return!1;break;case"$nor":if(K_(e,o,r))return!1;break;case"$and":if(!U8(e,o,r))return!1;break;case"$not":if(Xo(e,o,r))return!1;break;default:if(!ua(o,F8(e,n),r))return!1}return!0}function F8(e,t){const r=t.split(".");let n=e;for(let o=0;o<r.length;o++)if(n&&typeof n=="object"&&r[o]in n)n=n[r[o]];else return null;return n}function q_(e,t=!1){const r=`${e}${t?"/i":""}`;return np[r]||(np[r]=new RegExp(e.replace(/([^\\])\//g,"$1\\/"),t?"i":void 0)),np[r]}function ua(e,t,r,n=!1){if(typeof e=="string")return n?String(t).toLowerCase()===e.toLowerCase():t+""===e;if(typeof e=="number")return t*1===e;if(typeof e=="boolean")return t!==null&&!!t===e;if(e===null)return t===null;if(Array.isArray(e)||!JT(e))return JSON.stringify(t)===JSON.stringify(e);for(const o in e)if(!H8(o,t,e[o],r))return!1;return!0}function JT(e){const t=Object.keys(e);return t.length>0&&t.filter(r=>r[0]==="$").length===t.length}function V8(e){if(e===null)return"null";if(Array.isArray(e))return"array";const t=typeof e;return["string","number","boolean","object","undefined"].includes(t)?t:"unknown"}function B8(e,t,r){if(!Array.isArray(e))return!1;const n=JT(t)?o=>ua(t,o,r):o=>Xo(o,t,r);for(let o=0;o<e.length;o++)if(e[o]&&n(e[o]))return!0;return!1}function ls(e,t,r=!1){if(r){const n=o=>typeof o=="string"?o.toLowerCase():o;return Array.isArray(e)?e.some(o=>t.some(s=>n(o)===n(s))):t.some(o=>n(e)===n(o))}return Array.isArray(e)?e.some(n=>t.includes(n)):t.includes(e)}function G_(e,t,r,n=!1){if(!Array.isArray(e))return!1;for(let o=0;o<t.length;o++){let s=!1;for(let i=0;i<e.length;i++)if(ua(t[o],e[i],r,n)){s=!0;break}if(!s)return!1}return!0}function H8(e,t,r,n){switch(e){case"$veq":return Br(t)===Br(r);case"$vne":return Br(t)!==Br(r);case"$vgt":return Br(t)>Br(r);case"$vgte":return Br(t)>=Br(r);case"$vlt":return Br(t)<Br(r);case"$vlte":return Br(t)<=Br(r);case"$eq":return t===r;case"$ne":return t!==r;case"$lt":return t<r;case"$lte":return t<=r;case"$gt":return t>r;case"$gte":return t>=r;case"$exists":return r?t!=null:t==null;case"$in":return Array.isArray(r)?ls(t,r):!1;case"$ini":return Array.isArray(r)?ls(t,r,!0):!1;case"$inGroup":return ls(t,n[r]||[]);case"$notInGroup":return!ls(t,n[r]||[]);case"$nin":return Array.isArray(r)?!ls(t,r):!1;case"$nini":return Array.isArray(r)?!ls(t,r,!0):!1;case"$not":return!ua(r,t,n);case"$size":return Array.isArray(t)?ua(r,t.length,n):!1;case"$elemMatch":return B8(t,r,n);case"$all":return Array.isArray(r)?G_(t,r,n):!1;case"$alli":return Array.isArray(r)?G_(t,r,n,!0):!1;case"$regex":try{return q_(r).test(t)}catch{return!1}case"$regexi":try{return q_(r,!0).test(t)}catch{return!1}case"$type":return V8(t)===r;default:return console.error("Unknown operator: "+e),!1}}function K_(e,t,r){if(!t.length)return!0;for(let n=0;n<t.length;n++)if(Xo(e,t[n],r))return!0;return!1}function U8(e,t,r){for(let n=0;n<t.length;n++)if(!Xo(e,t[n],r))return!1;return!0}const W8="Feature Evaluated",q8="Experiment Viewed";function G8(e){const t=new Map;return e.global.forcedFeatureValues&&e.global.forcedFeatureValues.forEach((r,n)=>t.set(n,r)),e.user.forcedFeatureValues&&e.user.forcedFeatureValues.forEach((r,n)=>t.set(n,r)),t}function K8(e){return e.global.forcedVariations&&e.user.forcedVariations?{...e.global.forcedVariations,...e.user.forcedVariations}:e.global.forcedVariations?e.global.forcedVariations:e.user.forcedVariations?e.user.forcedVariations:{}}async function Ds(e){try{await e()}catch{}}function ZT(e,t,r){if(e.user.trackedExperiments){const o=em(t,r);if(e.user.trackedExperiments.has(o))return[];e.user.trackedExperiments.add(o)}e.user.enableDevMode&&e.user.devLogs&&e.user.devLogs.push({experiment:t,result:r,timestamp:Date.now().toString(),logType:"experiment"});const n=[];if(e.global.trackingCallback){const o=e.global.trackingCallback;n.push(Ds(()=>o(t,r,e.user)))}if(e.user.trackingCallback){const o=e.user.trackingCallback;n.push(Ds(()=>o(t,r)))}if(e.global.eventLogger){const o=e.global.eventLogger;n.push(Ds(()=>o(q8,{experimentId:t.key,variationId:r.key,hashAttribute:r.hashAttribute,hashValue:r.hashValue},e.user)))}return n}function X8(e,t,r){if(e.user.trackedFeatureUsage){const n=JSON.stringify(r.value);if(e.user.trackedFeatureUsage[t]===n)return;e.user.trackedFeatureUsage[t]=n,e.user.enableDevMode&&e.user.devLogs&&e.user.devLogs.push({featureKey:t,result:r,timestamp:Date.now().toString(),logType:"feature"})}if(e.global.onFeatureUsage){const n=e.global.onFeatureUsage;Ds(()=>n(t,r,e.user))}if(e.user.onFeatureUsage){const n=e.user.onFeatureUsage;Ds(()=>n(t,r))}if(e.global.eventLogger){const n=e.global.eventLogger;Ds(()=>n(W8,{feature:t,source:r.source,value:r.value,ruleId:r.source==="defaultValue"?"$default":r.ruleId||"",variationId:r.experimentResult?r.experimentResult.key:""},e.user))}}function Lg(e,t){if(t.stack.evaluatedFeatures.has(e))return Bn(t,e,null,"cyclicPrerequisite");t.stack.evaluatedFeatures.add(e),t.stack.id=e;const r=G8(t);if(r.has(e))return Bn(t,e,r.get(e),"override");if(!t.global.features||!t.global.features[e])return Bn(t,e,null,"unknownFeature");const n=t.global.features[e];if(n.rules){const o=new Set(t.stack.evaluatedFeatures);e:for(const s of n.rules){if(s.parentConditions)for(const u of s.parentConditions){t.stack.evaluatedFeatures=new Set(o);const d=Lg(u.id,t);if(d.source==="cyclicPrerequisite")return Bn(t,e,null,"cyclicPrerequisite");const p={value:d.value};if(!Xo(p,u.condition||{})){if(u.gate)return Bn(t,e,null,"prerequisite");continue e}}if(s.filters&&tI(s.filters,t))continue;if("force"in s){if(s.condition&&!eI(s.condition,t)||!Y8(t,s.seed||e,s.hashAttribute,t.user.saveStickyBucketAssignmentDoc&&!s.disableStickyBucketing?s.fallbackAttribute:void 0,s.range,s.coverage,s.hashVersion))continue;return s.tracks&&s.tracks.forEach(u=>{!ZT(t,u.experiment,u.result).length&&t.global.saveDeferredTrack&&t.global.saveDeferredTrack({experiment:u.experiment,result:u.result})}),Bn(t,e,s.force,"force",s.id)}if(!s.variations)continue;const i={variations:s.variations,key:s.key||e};"coverage"in s&&(i.coverage=s.coverage),s.weights&&(i.weights=s.weights),s.hashAttribute&&(i.hashAttribute=s.hashAttribute),s.fallbackAttribute&&(i.fallbackAttribute=s.fallbackAttribute),s.disableStickyBucketing&&(i.disableStickyBucketing=s.disableStickyBucketing),s.bucketVersion!==void 0&&(i.bucketVersion=s.bucketVersion),s.minBucketVersion!==void 0&&(i.minBucketVersion=s.minBucketVersion),s.namespace&&(i.namespace=s.namespace),s.meta&&(i.meta=s.meta),s.ranges&&(i.ranges=s.ranges),s.name&&(i.name=s.name),s.phase&&(i.phase=s.phase),s.seed&&(i.seed=s.seed),s.hashVersion&&(i.hashVersion=s.hashVersion),s.filters&&(i.filters=s.filters),s.condition&&(i.condition=s.condition);const{result:l}=Jf(i,e,t);if(t.global.onExperimentEval&&t.global.onExperimentEval(i,l),l.inExperiment&&!l.passthrough)return Bn(t,e,l.value,"experiment",s.id,i,l)}}return Bn(t,e,n.defaultValue===void 0?null:n.defaultValue,"defaultValue")}function Jf(e,t,r){const n=e.key,o=e.variations.length;if(o<2)return{result:Pt(r,e,-1,!1,t)};if(r.global.enabled===!1||r.user.enabled===!1)return{result:Pt(r,e,-1,!1,t)};if(e=J8(e,r),e.urlPatterns&&!zT(r.user.url||"",e.urlPatterns))return{result:Pt(r,e,-1,!1,t)};const s=r8(n,r.user.url||"",o);if(s!==null)return{result:Pt(r,e,s,!1,t)};const i=K8(r);if(n in i){const b=i[n];return{result:Pt(r,e,b,!1,t)}}if(e.status==="draft"||e.active===!1)return{result:Pt(r,e,-1,!1,t)};const{hashAttribute:l,hashValue:u}=Mo(r,e.hashAttribute,r.user.saveStickyBucketAssignmentDoc&&!e.disableStickyBucketing?e.fallbackAttribute:void 0);if(!u)return{result:Pt(r,e,-1,!1,t)};let d=-1,p=!1,f=!1;if(r.user.saveStickyBucketAssignmentDoc&&!e.disableStickyBucketing){const{variation:b,versionIsBlocked:_}=eG({ctx:r,expKey:e.key,expBucketVersion:e.bucketVersion,expHashAttribute:e.hashAttribute,expFallbackAttribute:e.fallbackAttribute,expMinBucketVersion:e.minBucketVersion,expMeta:e.meta});p=b>=0,d=b,f=!!_}if(!p){if(e.filters){if(tI(e.filters,r))return{result:Pt(r,e,-1,!1,t)}}else if(e.namespace&&!Yq(u,e.namespace))return{result:Pt(r,e,-1,!1,t)};if(e.include&&!n8(e.include))return{result:Pt(r,e,-1,!1,t)};if(e.condition&&!eI(e.condition,r))return{result:Pt(r,e,-1,!1,t)};if(e.parentConditions){const b=new Set(r.stack.evaluatedFeatures);for(const _ of e.parentConditions){r.stack.evaluatedFeatures=new Set(b);const y=Lg(_.id,r);if(y.source==="cyclicPrerequisite")return{result:Pt(r,e,-1,!1,t)};const x={value:y.value};if(!Xo(x,_.condition||{}))return{result:Pt(r,e,-1,!1,t)}}}if(e.groups&&!Q8(e.groups,r))return{result:Pt(r,e,-1,!1,t)}}if(e.url&&!Z8(e.url,r))return{result:Pt(r,e,-1,!1,t)};const m=Gu(e.seed||n,u,e.hashVersion||1);if(m===null)return{result:Pt(r,e,-1,!1,t)};if(!p){const b=e.ranges||t8(o,e.coverage===void 0?1:e.coverage,e.weights);d=Jq(m,b)}if(f)return{result:Pt(r,e,-1,!1,t,void 0,!0)};if(d<0)return{result:Pt(r,e,-1,!1,t)};if("force"in e)return{result:Pt(r,e,e.force===void 0?-1:e.force,!1,t)};if(r.global.qaMode||r.user.qaMode)return{result:Pt(r,e,-1,!1,t)};if(e.status==="stopped")return{result:Pt(r,e,-1,!1,t)};const h=Pt(r,e,d,!0,t,m,p);if(r.user.saveStickyBucketAssignmentDoc&&!e.disableStickyBucketing){const{changed:b,key:_,doc:y}=rG(r,l,gc(u),{[Zf(e.key,e.bucketVersion)]:h.key});b&&(r.user.stickyBucketAssignmentDocs=r.user.stickyBucketAssignmentDocs||{},r.user.stickyBucketAssignmentDocs[_]=y,r.user.saveStickyBucketAssignmentDoc(y))}const v=ZT(r,e,h);v.length===0&&r.global.saveDeferredTrack&&r.global.saveDeferredTrack({experiment:e,result:h});const g=v.length?v.length===1?v[0]:Promise.all(v).then(()=>{}):void 0;return"changeId"in e&&e.changeId&&r.global.recordChangeId&&r.global.recordChangeId(e.changeId),{result:h,trackingCall:g}}function Bn(e,t,r,n,o,s,i){const l={value:r,on:!!r,off:!r,source:n,ruleId:o||""};return s&&(l.experiment=s),i&&(l.experimentResult=i),n!=="override"&&X8(e,t,l),l}function QT(e){return{...e.user.attributes,...e.user.attributeOverrides}}function eI(e,t){return Xo(QT(t),e,t.global.savedGroups||{})}function tI(e,t){return e.some(r=>{const{hashValue:n}=Mo(t,r.attribute);if(!n)return!0;const o=Gu(r.seed,n,r.hashVersion||2);return o===null?!0:!r.ranges.some(s=>Ag(o,s))})}function Y8(e,t,r,n,o,s,i){if(!o&&s===void 0)return!0;if(!o&&s===0)return!1;const{hashValue:l}=Mo(e,r,n);if(!l)return!1;const u=Gu(t,l,i||1);return u===null?!1:o?Ag(u,o):s!==void 0?u<=s:!0}function Pt(e,t,r,n,o,s,i){let l=!0;(r<0||r>=t.variations.length)&&(r=0,l=!1);const{hashAttribute:u,hashValue:d}=Mo(e,t.hashAttribute,e.user.saveStickyBucketAssignmentDoc&&!t.disableStickyBucketing?t.fallbackAttribute:void 0),p=t.meta?t.meta[r]:{},f={key:p.key||""+r,featureId:o,inExperiment:l,hashUsed:n,variationId:r,value:t.variations[r],hashAttribute:u,hashValue:d,stickyBucketUsed:!!i};return p.name&&(f.name=p.name),s!==void 0&&(f.bucket=s),p.passthrough&&(f.passthrough=p.passthrough),f}function J8(e,t){const r=e.key,n=t.global.overrides;return n&&n[r]&&(e=Object.assign({},e,n[r]),typeof e.url=="string"&&(e.url=LT(e.url))),e}function Mo(e,t,r){let n=t||"id",o="";const s=QT(e);return s[n]&&(o=s[n]),!o&&r&&(s[r]&&(o=s[r]),o&&(n=r)),{hashAttribute:n,hashValue:o}}function Z8(e,t){const r=t.user.url;if(!r)return!1;const n=r.replace(/^https?:\/\//,"").replace(/^[^/]*\//,"/");return!!(e.test(r)||e.test(n))}function Q8(e,t){const r=t.global.groups||{};for(let n=0;n<e.length;n++)if(r[e[n]])return!0;return!1}function eG({ctx:e,expKey:t,expBucketVersion:r,expHashAttribute:n,expFallbackAttribute:o,expMinBucketVersion:s,expMeta:i}){r=r||0,s=s||0,n=n||"id",i=i||[];const l=Zf(t,r),u=tG(e,n,o);if(s>0)for(let f=0;f<s;f++){const m=Zf(t,f);if(u[m]!==void 0)return{variation:-1,versionIsBlocked:!0}}const d=u[l];if(d===void 0)return{variation:-1};const p=i.findIndex(f=>f.key===d);return p<0?{variation:-1}:{variation:p}}function Zf(e,t){return t=t||0,`${e}__${t}`}function Qf(e,t){return`${e}||${t}`}function tG(e,t,r){if(!e.user.stickyBucketAssignmentDocs)return{};const{hashAttribute:n,hashValue:o}=Mo(e,t),s=Qf(n,gc(o)),{hashAttribute:i,hashValue:l}=Mo(e,r),u=l?Qf(i,gc(l)):null,d={};return u&&e.user.stickyBucketAssignmentDocs[u]&&Object.assign(d,e.user.stickyBucketAssignmentDocs[u].assignments||{}),e.user.stickyBucketAssignmentDocs[s]&&Object.assign(d,e.user.stickyBucketAssignmentDocs[s].assignments||{}),d}function rG(e,t,r,n){const o=Qf(t,r),s=e.user.stickyBucketAssignmentDocs&&e.user.stickyBucketAssignmentDocs[o]?e.user.stickyBucketAssignmentDocs[o].assignments||{}:{},i={...s,...n},l=JSON.stringify(s)!==JSON.stringify(i);return{key:o,doc:{attributeName:t,attributeValue:r,assignments:i},changed:l}}function nG(e,t){const r=new Set,n=t&&t.features?t.features:e.global.features||{},o=t&&t.experiments?t.experiments:e.global.experiments||[];return Object.keys(n).forEach(s=>{const i=n[s];if(i.rules)for(const l of i.rules)l.variations&&(r.add(l.hashAttribute||"id"),l.fallbackAttribute&&r.add(l.fallbackAttribute))}),o.map(s=>{r.add(s.hashAttribute||"id"),s.fallbackAttribute&&r.add(s.fallbackAttribute)}),Array.from(r)}async function oG(e,t,r){const n=rI(e,r);return t.getAllAssignments(n)}function rI(e,t){const r={};return nG(e,t).forEach(o=>{const{hashValue:s}=Mo(e,o);r[o]=gc(s)}),r}async function sG(e,t,r){if(e={...e},e.encryptedFeatures){try{e.features=JSON.parse(await Gi(e.encryptedFeatures,t,r))}catch(n){console.error(n)}delete e.encryptedFeatures}if(e.encryptedExperiments){try{e.experiments=JSON.parse(await Gi(e.encryptedExperiments,t,r))}catch(n){console.error(n)}delete e.encryptedExperiments}if(e.encryptedSavedGroups){try{e.savedGroups=JSON.parse(await Gi(e.encryptedSavedGroups,t,r))}catch(n){console.error(n)}delete e.encryptedSavedGroups}return e}function iG(e){const t=e.apiHost||"https://cdn.growthbook.io";return{apiHost:t.replace(/\/*$/,""),streamingHost:(e.streamingHost||t).replace(/\/*$/,""),apiRequestHeaders:e.apiHostRequestHeaders,streamingHostRequestHeaders:e.streamingHostRequestHeaders}}function em(e,t){return t.hashAttribute+t.hashValue+e.key+t.variationId}const cs=typeof window<"u"&&typeof document<"u",aG=o8();class lG{constructor(t){if(t=t||{},this.version=aG,this._options=this.context=t,this._renderer=t.renderer||null,this._trackedExperiments=new Set,this._completedChangeIds=new Set,this._trackedFeatures={},this.debug=!!t.debug,this._subscriptions=new Set,this.ready=!1,this._assigned=new Map,this._activeAutoExperiments=new Map,this._triggeredExpKeys=new Set,this._initialized=!1,this._redirectedUrl="",this._deferredTrackingCalls=new Map,this._autoExperimentsAllowed=!t.disableExperimentsOnLoad,this._destroyCallbacks=[],this.logs=[],this.log=this.log.bind(this),this._saveDeferredTrack=this._saveDeferredTrack.bind(this),this._onExperimentEval=this._onExperimentEval.bind(this),this._fireSubscriptions=this._fireSubscriptions.bind(this),this._recordChangedId=this._recordChangedId.bind(this),t.remoteEval){if(t.decryptionKey)throw new Error("Encryption is not available for remoteEval");if(!t.clientKey)throw new Error("Missing clientKey");let r=!1;try{r=!!new URL(t.apiHost||"").hostname.match(/growthbook\.io$/i)}catch{}if(r)throw new Error("Cannot use remoteEval on GrowthBook Cloud")}else if(t.cacheKeyAttributes)throw new Error("cacheKeyAttributes are only used for remoteEval");if(t.stickyBucketService){const r=t.stickyBucketService;this._saveStickyBucketAssignmentDoc=n=>r.saveAssignments(n)}if(t.plugins)for(const r of t.plugins)r(this);if(t.features&&(this.ready=!0),cs&&t.enableDevMode&&(window._growthbook=this,document.dispatchEvent(new Event("gbloaded"))),t.experiments&&(this.ready=!0,this._updateAllAutoExperiments()),this._options.stickyBucketService&&this._options.stickyBucketAssignmentDocs)for(const r in this._options.stickyBucketAssignmentDocs){const n=this._options.stickyBucketAssignmentDocs[r];n&&this._options.stickyBucketService.saveAssignments(n).catch(()=>{})}this.ready&&this.refreshStickyBuckets(this.getPayload())}async setPayload(t){this._payload=t;const r=await sG(t,this._options.decryptionKey);this._decryptedPayload=r,await this.refreshStickyBuckets(r),r.features&&(this._options.features=r.features),r.savedGroups&&(this._options.savedGroups=r.savedGroups),r.experiments&&(this._options.experiments=r.experiments,this._updateAllAutoExperiments()),this.ready=!0,this._render()}initSync(t){this._initialized=!0;const r=t.payload;if(r.encryptedExperiments||r.encryptedFeatures)throw new Error("initSync does not support encrypted payloads");return this._options.stickyBucketService&&!this._options.stickyBucketAssignmentDocs&&(this._options.stickyBucketAssignmentDocs=this.generateStickyBucketAssignmentDocsSync(this._options.stickyBucketService,r)),this._payload=r,this._decryptedPayload=r,r.features&&(this._options.features=r.features),r.experiments&&(this._options.experiments=r.experiments,this._updateAllAutoExperiments()),this.ready=!0,tp(this,t),this}async init(t){if(this._initialized=!0,t=t||{},t.cacheSettings&&i8(t.cacheSettings),t.payload)return await this.setPayload(t.payload),tp(this,t),{success:!0,source:"init"};{const{data:r,...n}=await this._refresh({...t,allowStale:!0});return tp(this,t),await this.setPayload(r||{}),n}}async loadFeatures(t){t=t||{},await this.init({skipCache:t.skipCache,timeout:t.timeout,streaming:(this._options.backgroundSync??!0)&&(t.autoRefresh||this._options.subscribeToChanges)})}async refreshFeatures(t){const r=await this._refresh({...t||{},allowStale:!1});r.data&&await this.setPayload(r.data)}getApiInfo(){return[this.getApiHosts().apiHost,this.getClientKey()]}getApiHosts(){return iG(this._options)}getClientKey(){return this._options.clientKey||""}getPayload(){return this._payload||{features:this.getFeatures(),experiments:this.getExperiments()}}getDecryptedPayload(){return this._decryptedPayload||this.getPayload()}isRemoteEval(){return this._options.remoteEval||!1}getCacheKeyAttributes(){return this._options.cacheKeyAttributes}async _refresh({timeout:t,skipCache:r,allowStale:n,streaming:o}){if(!this._options.clientKey)throw new Error("Missing clientKey");return a8({instance:this,timeout:t,skipCache:r||this._options.disableCache,allowStale:n,backgroundSync:o??this._options.backgroundSync??!0})}_render(){if(this._renderer)try{this._renderer()}catch(t){console.error("Failed to render",t)}}setFeatures(t){this._options.features=t,this.ready=!0,this._render()}async setEncryptedFeatures(t,r,n){const o=await Gi(t,r||this._options.decryptionKey,n);this.setFeatures(JSON.parse(o))}setExperiments(t){this._options.experiments=t,this.ready=!0,this._updateAllAutoExperiments()}async setEncryptedExperiments(t,r,n){const o=await Gi(t,r||this._options.decryptionKey,n);this.setExperiments(JSON.parse(o))}async setAttributes(t){if(this._options.attributes=t,this._options.stickyBucketService&&await this.refreshStickyBuckets(),this._options.remoteEval){await this._refreshForRemoteEval();return}this._render(),this._updateAllAutoExperiments()}async updateAttributes(t){return this.setAttributes({...this._options.attributes,...t})}async setAttributeOverrides(t){if(this._options.attributeOverrides=t,this._options.stickyBucketService&&await this.refreshStickyBuckets(),this._options.remoteEval){await this._refreshForRemoteEval();return}this._render(),this._updateAllAutoExperiments()}async setForcedVariations(t){if(this._options.forcedVariations=t||{},this._options.remoteEval){await this._refreshForRemoteEval();return}this._render(),this._updateAllAutoExperiments()}setForcedFeatures(t){this._options.forcedFeatureValues=t,this._render()}async setURL(t){if(t!==this._options.url){if(this._options.url=t,this._redirectedUrl="",this._options.remoteEval){await this._refreshForRemoteEval(),this._updateAllAutoExperiments(!0);return}this._updateAllAutoExperiments(!0)}}getAttributes(){return{...this._options.attributes,...this._options.attributeOverrides}}getForcedVariations(){return this._options.forcedVariations||{}}getForcedFeatures(){return this._options.forcedFeatureValues||new Map}getStickyBucketAssignmentDocs(){return this._options.stickyBucketAssignmentDocs||{}}getUrl(){return this._options.url||""}getFeatures(){return this._options.features||{}}getExperiments(){return this._options.experiments||[]}getCompletedChangeIds(){return Array.from(this._completedChangeIds)}subscribe(t){return this._subscriptions.add(t),()=>{this._subscriptions.delete(t)}}async _refreshForRemoteEval(){if(!this._options.remoteEval||!this._initialized)return;const t=await this._refresh({allowStale:!1});t.data&&await this.setPayload(t.data)}getAllResults(){return new Map(this._assigned)}onDestroy(t){this._destroyCallbacks.push(t)}isDestroyed(){return!!this._destroyed}destroy(t){t=t||{},this._destroyed=!0,this._destroyCallbacks.forEach(r=>{try{r()}catch(n){console.error(n)}}),this._subscriptions.clear(),this._assigned.clear(),this._trackedExperiments.clear(),this._completedChangeIds.clear(),this._deferredTrackingCalls.clear(),this._trackedFeatures={},this._destroyCallbacks=[],this._payload=void 0,this._saveStickyBucketAssignmentDoc=void 0,c8(this),t.destroyAllStreams&&UT(),this.logs=[],cs&&window._growthbook===this&&delete window._growthbook,this._activeAutoExperiments.forEach(r=>{r.undo()}),this._activeAutoExperiments.clear(),this._triggeredExpKeys.clear()}setRenderer(t){this._renderer=t}forceVariation(t,r){if(this._options.forcedVariations=this._options.forcedVariations||{},this._options.forcedVariations[t]=r,this._options.remoteEval){this._refreshForRemoteEval();return}this._updateAllAutoExperiments(),this._render()}run(t){const{result:r}=Jf(t,null,this._getEvalContext());return this._onExperimentEval(t,r),r}triggerExperiment(t){return this._triggeredExpKeys.add(t),this._options.experiments?this._options.experiments.filter(n=>n.key===t).map(n=>this._runAutoExperiment(n)).filter(n=>n!==null):null}triggerAutoExperiments(){this._autoExperimentsAllowed=!0,this._updateAllAutoExperiments(!0)}_getEvalContext(){return{user:this._getUserContext(),global:this._getGlobalContext(),stack:{evaluatedFeatures:new Set}}}_getUserContext(){return{attributes:this._options.user?{...this._options.user,...this._options.attributes}:this._options.attributes,enableDevMode:this._options.enableDevMode,blockedChangeIds:this._options.blockedChangeIds,stickyBucketAssignmentDocs:this._options.stickyBucketAssignmentDocs,url:this._getContextUrl(),forcedVariations:this._options.forcedVariations,forcedFeatureValues:this._options.forcedFeatureValues,attributeOverrides:this._options.attributeOverrides,saveStickyBucketAssignmentDoc:this._saveStickyBucketAssignmentDoc,trackingCallback:this._options.trackingCallback,onFeatureUsage:this._options.onFeatureUsage,devLogs:this.logs,trackedExperiments:this._trackedExperiments,trackedFeatureUsage:this._trackedFeatures}}_getGlobalContext(){return{features:this._options.features,experiments:this._options.experiments,log:this.log,enabled:this._options.enabled,qaMode:this._options.qaMode,savedGroups:this._options.savedGroups,groups:this._options.groups,overrides:this._options.overrides,onExperimentEval:this._onExperimentEval,recordChangeId:this._recordChangedId,saveDeferredTrack:this._saveDeferredTrack,eventLogger:this._options.eventLogger}}_runAutoExperiment(t,r){const n=this._activeAutoExperiments.get(t);if(t.manual&&!this._triggeredExpKeys.has(t.key)&&!n)return null;const o=this._isAutoExperimentBlockedByContext(t);let s,i;o?s=Pt(this._getEvalContext(),t,-1,!1,""):({result:s,trackingCall:i}=Jf(t,null,this._getEvalContext()),this._onExperimentEval(t,s));const l=JSON.stringify(s.value);if(!r&&s.inExperiment&&n&&n.valueHash===l)return s;if(n&&this._undoActiveAutoExperiment(t),s.inExperiment){const u=ep(t);if(u==="redirect"&&s.value.urlRedirect&&t.urlPatterns){const d=t.persistQueryString?s8(this._getContextUrl(),s.value.urlRedirect):s.value.urlRedirect;if(zT(d,t.urlPatterns))return this.log("Skipping redirect because original URL matches redirect URL",{id:t.key}),s;this._redirectedUrl=d;const{navigate:p,delay:f}=this._getNavigateFunction();if(p)if(cs)Promise.all([...i?[FT(i,this._options.maxNavigateDelay??1e3)]:[],new Promise(m=>window.setTimeout(m,this._options.navigateDelay??f))]).then(()=>{try{p(d)}catch(m){console.error(m)}});else try{p(d)}catch(m){console.error(m)}}else if(u==="visual"){const d=this._options.applyDomChangesCallback?this._options.applyDomChangesCallback(s.value):this._applyDOMChanges(s.value);d&&this._activeAutoExperiments.set(t,{undo:d,valueHash:l})}}return s}_undoActiveAutoExperiment(t){const r=this._activeAutoExperiments.get(t);r&&(r.undo(),this._activeAutoExperiments.delete(t))}_updateAllAutoExperiments(t){if(!this._autoExperimentsAllowed)return;const r=this._options.experiments||[],n=new Set(r);this._activeAutoExperiments.forEach((o,s)=>{n.has(s)||(o.undo(),this._activeAutoExperiments.delete(s))});for(const o of r){const s=this._runAutoExperiment(o,t);if(s&&s.inExperiment&&ep(o)==="redirect")break}}_onExperimentEval(t,r){const n=this._assigned.get(t.key);this._assigned.set(t.key,{experiment:t,result:r}),this._subscriptions.size>0&&this._fireSubscriptions(t,r,n)}_fireSubscriptions(t,r,n){(!n||n.result.inExperiment!==r.inExperiment||n.result.variationId!==r.variationId)&&this._subscriptions.forEach(o=>{try{o(t,r)}catch(s){console.error(s)}})}_recordChangedId(t){this._completedChangeIds.add(t)}isOn(t){return this.evalFeature(t).on}isOff(t){return this.evalFeature(t).off}getFeatureValue(t,r){const n=this.evalFeature(t).value;return n===null?r:n}feature(t){return this.evalFeature(t)}evalFeature(t){return Lg(t,this._getEvalContext())}log(t,r){this.debug&&(this._options.log?this._options.log(t,r):console.log(t,r))}getDeferredTrackingCalls(){return Array.from(this._deferredTrackingCalls.values())}setDeferredTrackingCalls(t){this._deferredTrackingCalls=new Map(t.filter(r=>r&&r.experiment&&r.result).map(r=>[em(r.experiment,r.result),r]))}async fireDeferredTrackingCalls(){if(!this._options.trackingCallback)return;const t=[];this._deferredTrackingCalls.forEach(r=>{!r||!r.experiment||!r.result?console.error("Invalid deferred tracking call",{call:r}):t.push(this._options.trackingCallback(r.experiment,r.result))}),this._deferredTrackingCalls.clear(),await Promise.all(t)}setTrackingCallback(t){this._options.trackingCallback=t,this.fireDeferredTrackingCalls()}setFeatureUsageCallback(t){this._options.onFeatureUsage=t}setEventLogger(t){this._options.eventLogger=t}async logEvent(t,r){if(this._destroyed){console.error("Cannot log event to destroyed GrowthBook instance");return}if(this._options.enableDevMode&&this.logs.push({eventName:t,properties:r,timestamp:Date.now().toString(),logType:"event"}),this._options.eventLogger)try{await this._options.eventLogger(t,r||{},this._getUserContext())}catch(n){console.error(n)}else console.error("No event logger configured")}_saveDeferredTrack(t){this._deferredTrackingCalls.set(em(t.experiment,t.result),t)}_getContextUrl(){return this._options.url||(cs?window.location.href:"")}_isAutoExperimentBlockedByContext(t){const r=ep(t);if(r==="visual"){if(this._options.disableVisualExperiments||this._options.disableJsInjection&&t.variations.some(n=>n.js))return!0}else if(r==="redirect"){if(this._options.disableUrlRedirectExperiments)return!0;try{const n=new URL(this._getContextUrl());for(const o of t.variations){if(!o||!o.urlRedirect)continue;const s=new URL(o.urlRedirect);if(this._options.disableCrossOriginUrlRedirectExperiments&&(s.protocol!==n.protocol||s.host!==n.host))return!0}}catch(n){return this.log("Error parsing current or redirect URL",{id:t.key,error:n}),!0}}else return!0;return!!(t.changeId&&(this._options.blockedChangeIds||[]).includes(t.changeId))}getRedirectUrl(){return this._redirectedUrl}_getNavigateFunction(){return this._options.navigate?{navigate:this._options.navigate,delay:0}:cs?{navigate:t=>{window.location.replace(t)},delay:100}:{navigate:null,delay:0}}_applyDOMChanges(t){if(!cs)return;const r=[];if(t.css){const n=document.createElement("style");n.innerHTML=t.css,document.head.appendChild(n),r.push(()=>n.remove())}if(t.js){const n=document.createElement("script");n.innerHTML=t.js,this._options.jsInjectionNonce&&(n.nonce=this._options.jsInjectionNonce),document.head.appendChild(n),r.push(()=>n.remove())}return t.domMutations&&t.domMutations.forEach(n=>{r.push(z8.declarative(n).revert)}),()=>{r.forEach(n=>n())}}async refreshStickyBuckets(t){if(this._options.stickyBucketService){const r=this._getEvalContext(),n=await oG(r,this._options.stickyBucketService,t);this._options.stickyBucketAssignmentDocs=n}}generateStickyBucketAssignmentDocsSync(t,r){if(!("getAllAssignmentsSync"in t)){console.error("generating StickyBucketAssignmentDocs docs requires StickyBucketServiceSync");return}const n=this._getEvalContext(),o=rI(n,r);return t.getAllAssignmentsSync(o)}inDevMode(){return!!this._options.enableDevMode}}const cG="https://cdn.growthbook.io",bc=new lG({apiHost:cG,clientKey:"",enableDevMode:!1,trackingCallback:(e,t)=>{jo("experiment_exposure",{experiment_id:e.key,variation_id:t.variationId,variant:String(t.value),in_experiment:t.inExperiment})}}),X_="avalog.ab.anon_id",uG=()=>nI();function nI(){if(typeof window>"u")return;let e;try{e=localStorage.getItem(X_)??"",e||(e=dG(),localStorage.setItem(X_,e))}catch{e="no-storage"}bc.setAttributes({id:e})}function dG(){try{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();if(typeof crypto<"u"&&crypto.getRandomValues){const e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,t=>t.toString(16).padStart(2,"0")).join("")}}catch{}return Math.random().toString(36).slice(2)+Date.now().toString(36)}const Kre={HERO_CTA_COPY:"hero_cta_copy",PRICING_DISPLAY:"pricing_display",TRUST_SIGNAL:"trust_signal"},Y_=new Set;function Xre(e,t){const[r,n]=a.useState(t[0]),o=a.useRef(!1),s=a.useCallback(i=>{const l=`${e}:${i}`;Y_.has(l)||o.current||(o.current=!0,Y_.add(l),jo("experiment_exposure",{experiment_id:e,variant:i}))},[e]);return a.useEffect(()=>{if(typeof window>"u")return;const l=bc.run({key:e,variations:t}).value;n(l),s(l)},[e]),r}const pG=({children:e})=>{var s;const{user:t,isAuthenticated:r}=Ia(),n=((s=t==null?void 0:t.tier)==null?void 0:s.toLowerCase())??"free",o=["free","starter","pro","enterprise"].includes(n)?n:"free";return a.useEffect(()=>{uG(),mU({isOn:i=>bc.isOn(i)})},[]),a.useEffect(()=>{bc.setAttributes({id:(t==null?void 0:t.email)??"",loggedIn:r,tier:o})},[t==null?void 0:t.email,r,o]),a.useEffect(()=>{},[o]),c.jsx($P.Provider,{value:{tier:o,isAuthenticated:r},children:e})},fG={selectedShippingOption:void 0,setSelectedShippingOption:()=>{}},oI=a.createContext(fG),mG=({children:e})=>{const[t,r]=a.useState();return c.jsx(oI.Provider,{value:{selectedShippingOption:t,setSelectedShippingOption:r},children:e})},Yre=()=>a.useContext(oI),hG={async getStatus(){return(await je.get("/license/status",{skipAuth:!0})).data},async activate(e){return(await je.post("/license/activate",{token:e},{skipAuth:!0})).data},async deactivate(e){return(await je.post("/license/deactivate",{token:e},{skipAuth:!0})).data}},J_=5e3,wi=new Map;function gG(e){const t=Date.now(),r=wi.get(e);if(r&&t-r<J_)return!1;if(wi.set(e,t),wi.size>50)for(const[n,o]of wi)t-o>J_&&wi.delete(n);return!0}function tm(e,t){const r=e instanceof Error?e.message:typeof e=="string"?e:"Unknown error",n=e instanceof Error?e.stack:void 0,o=`${t}::${r}`;if(!gG(o))return;const s={message:r,stack:n,source:t,url:typeof window<"u"?window.location.href:"",userAgent:typeof navigator<"u"?navigator.userAgent:"",timestamp:new Date().toISOString()};console.error(`[errorLogger:${t}]`,s)}function vG(){typeof window>"u"||(window.addEventListener("error",e=>{tm(e.error??e.message,"window-error")}),window.addEventListener("unhandledrejection",e=>{tm(e.reason,"unhandled-rejection")}))}class rm extends a.Component{constructor(){super(...arguments);St(this,"state",{hasError:!1,error:null});St(this,"handleReload",()=>{window.location.reload()});St(this,"handleHome",()=>{window.location.assign("/")})}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,n){const o=this.props.label?`[${this.props.label}] `:"",s=new Error(`${o}${r.message}
Component stack:${n.componentStack??""}`);s.stack=r.stack,tm(s,"react-boundary")}render(){return this.state.hasError?this.props.fallback?this.props.fallback:c.jsxs("div",{role:"alert",style:{maxWidth:640,margin:"80px auto",padding:"32px 24px",fontFamily:"Montserrat, system-ui, sans-serif",textAlign:"center"},children:[c.jsx("h1",{style:{fontSize:28,marginBottom:16},children:"Что-то пошло не так"}),c.jsx("p",{style:{fontSize:16,color:"#666",marginBottom:24},children:"Произошла непредвиденная ошибка. Мы получили уведомление и уже разбираемся."}),c.jsxs("div",{style:{display:"flex",gap:12,justifyContent:"center"},children:[c.jsx("button",{type:"button",onClick:this.handleReload,style:{padding:"10px 20px",border:"1px solid #1a1a1a",background:"#1a1a1a",color:"#fff",borderRadius:6,cursor:"pointer"},children:"Обновить страницу"}),c.jsx("button",{type:"button",onClick:this.handleHome,style:{padding:"10px 20px",border:"1px solid #1a1a1a",background:"transparent",color:"#1a1a1a",borderRadius:6,cursor:"pointer"},children:"На главную"})]}),!1]}):this.props.children}}function bG(){const e=Xr();return a.useEffect(()=>{Pw(e.pathname+e.search)},[e.pathname,e.search]),null}var oe=typeof window<"u"?window:void 0,Wt=typeof globalThis<"u"?globalThis:oe;typeof self>"u"&&(Wt.self=Wt),typeof File>"u"&&(Wt.File=function(){});var kr=Wt==null?void 0:Wt.navigator,Oe=Wt==null?void 0:Wt.document,Jt=Wt==null?void 0:Wt.location,nm=Wt==null?void 0:Wt.fetch,om=Wt!=null&&Wt.XMLHttpRequest&&"withCredentials"in new Wt.XMLHttpRequest?Wt.XMLHttpRequest:void 0,Z_=Wt==null?void 0:Wt.AbortController,_G=Wt==null?void 0:Wt.CompressionStream,wr=kr==null?void 0:kr.userAgent,Je=oe??{},Q_="1.372.10",mr={DEBUG:!1,LIB_VERSION:Q_,LIB_NAME:"web",JS_SDK_VERSION:Q_};function ey(e,t,r,n,o,s,i){try{var l=e[s](i),u=l.value}catch(d){return void r(d)}l.done?t(u):Promise.resolve(u).then(n,o)}function Wr(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var s=e.apply(t,r);function i(u){ey(s,n,o,i,l,"next",u)}function l(u){ey(s,n,o,i,l,"throw",u)}i(void 0)})}}function Re(){return Re=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Re.apply(null,arguments)}function sI(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function sm(){return sm=Wr(function*(e,t,r){t===void 0&&(t=!0);try{var n=new CompressionStream("gzip"),o=n.writable.getWriter(),s=o.write(new TextEncoder().encode(e)).then(()=>o.close()).catch(function(){var u=Wr(function*(d){try{yield o.abort(d)}catch{}throw d});return function(d){return u.apply(this,arguments)}}()),i=new Response(n.readable).blob(),[l]=yield Promise.all([i,s]);return l}catch(u){if(r!=null&&r.rethrow)throw u;return t&&console.error("Failed to gzip compress data",u),null}}),sm.apply(this,arguments)}var yG=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],ty=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var r=e.toLowerCase();return yG.concat(t).some(n=>{var o=n.toLowerCase();return r.indexOf(o)!==-1})},xG=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function it(e,t){return e.indexOf(t)!==-1}var Zu=function(e){return e.trim()},im=function(e){return e.replace(/^\$/,"")},iI=Object.prototype,aI=iI.hasOwnProperty,Qu=iI.toString,pt=Array.isArray||function(e){return Qu.call(e)==="[object Array]"},An=e=>typeof e=="function",Nt=e=>e===Object(e)&&!pt(e),Cs=e=>{if(Nt(e)){for(var t in e)if(aI.call(e,t))return!1;return!0}return!1},Le=e=>e===void 0,Tt=e=>Qu.call(e)=="[object String]",Dl=e=>Tt(e)&&e.trim().length===0,zn=e=>e===null,at=e=>Le(e)||zn(e),Kr=e=>Qu.call(e)=="[object Number]"&&e==e,vs=e=>Kr(e)&&e>0,_n=e=>Qu.call(e)==="[object Boolean]",wG=e=>e instanceof FormData,EG=e=>it(xG,e);function lI(e){return e===null||typeof e!="object"}function _c(e,t){return{}.toString.call(e)==="[object "+t+"]"}function zg(e){return typeof Event<"u"&&function(t,r){try{return t instanceof r}catch{return!1}}(e,Event)}var SG=[!0,"true",1,"1","yes"],op=e=>it(SG,e),CG=[!1,"false",0,"0","no"];function yn(e,t,r,n,o){return t>r&&(n.warn("min cannot be greater than max."),t=r),Kr(e)?e>r?(n.warn(" cannot be greater than max: "+r+". Using max value instead."),r):t>e?(n.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(n.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+o),yn(o||r,t,r,n))}class PG{constructor(t){this.$t={},this.zt=t.zt,this.Zt=yn(t.bucketSize,0,100,t.Gt),this.Qt=yn(t.refillRate,0,this.Zt,t.Gt),this.Jt=yn(t.refillInterval,0,864e5,t.Gt)}Kt(t,r){var n=Math.floor((r-t.lastAccess)/this.Jt);n>0&&(t.tokens=Math.min(t.tokens+n*this.Qt,this.Zt),t.lastAccess=t.lastAccess+n*this.Jt)}consumeRateLimit(t){var r,n=Date.now(),o=String(t),s=this.$t[o];return s?this.Kt(s,n):this.$t[o]=s={tokens:this.Zt,lastAccess:n},s.tokens===0||(s.tokens--,s.tokens===0&&((r=this.zt)==null||r.call(this,t)),s.tokens===0)}stop(){this.$t={}}}var pl,ry,sp,Mr="Mobile",yc="iOS",Dn="Android",Xs="Tablet",cI=Dn+" "+Xs,uI="iPad",dI="Apple",pI=dI+" Watch",Xi="Safari",Ys="BlackBerry",fI="Samsung",mI=fI+"Browser",hI=fI+" Internet",Io="Chrome",RG=Io+" OS",gI=Io+" "+yc,Fg="Internet Explorer",vI=Fg+" "+Mr,Vg="Opera",TG=Vg+" Mini",Bg="Edge",bI="Microsoft "+Bg,ks="Firefox",_I=ks+" "+yc,da="Nintendo",pa="PlayStation",Ms="Xbox",yI=Dn+" "+Mr,xI=Mr+" "+Xi,Mi="Windows",am=Mi+" Phone",ny="Nokia",lm="Ouya",wI="Generic",IG=wI+" "+Mr.toLowerCase(),EI=wI+" "+Xs.toLowerCase(),cm="Konqueror",fr="(\\d+(\\.\\d+)?)",ip=new RegExp("Version/"+fr),$G=new RegExp(Ms,"i"),AG=new RegExp(pa+" \\w+","i"),jG=new RegExp(da+" \\w+","i"),Hg=new RegExp(Ys+"|PlayBook|BB10","i"),OG={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},SI=function(e,t){return t=t||"",it(e," OPR/")&&it(e,"Mini")?TG:it(e," OPR/")?Vg:Hg.test(e)?Ys:it(e,"IE"+Mr)||it(e,"WPDesktop")?vI:it(e,mI)?hI:it(e,Bg)||it(e,"Edg/")?bI:it(e,"FBIOS")?"Facebook "+Mr:it(e,"UCWEB")||it(e,"UCBrowser")?"UC Browser":it(e,"CriOS")?gI:it(e,"CrMo")||it(e,Io)?Io:it(e,Dn)&&it(e,Xi)?yI:it(e,"FxiOS")?_I:it(e.toLowerCase(),cm.toLowerCase())?cm:((r,n)=>n&&it(n,dI)||function(o){return it(o,Xi)&&!it(o,Io)&&!it(o,Dn)}(r))(e,t)?it(e,Mr)?xI:Xi:it(e,ks)?ks:it(e,"MSIE")||it(e,"Trident/")?Fg:it(e,"Gecko")?ks:""},NG={[vI]:[new RegExp("rv:"+fr)],[bI]:[new RegExp(Bg+"?\\/"+fr)],[Io]:[new RegExp("("+Io+"|CrMo)\\/"+fr)],[gI]:[new RegExp("CriOS\\/"+fr)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+fr)],[Xi]:[ip],[xI]:[ip],[Vg]:[new RegExp("(Opera|OPR)\\/"+fr)],[ks]:[new RegExp(ks+"\\/"+fr)],[_I]:[new RegExp("FxiOS\\/"+fr)],[cm]:[new RegExp("Konqueror[:/]?"+fr,"i")],[Ys]:[new RegExp(Ys+" "+fr),ip],[yI]:[new RegExp("android\\s"+fr,"i")],[hI]:[new RegExp(mI+"\\/"+fr)],[Fg]:[new RegExp("(rv:|MSIE )"+fr)],Mozilla:[new RegExp("rv:"+fr)]},DG=function(e,t){var r=SI(e,t),n=NG[r];if(Le(n))return null;for(var o=0;n.length>o;o++){var s=e.match(n[o]);if(s)return parseFloat(s[s.length-2])}return null},oy=[[new RegExp(Ms+"; "+Ms+" (.*?)[);]","i"),e=>[Ms,e&&e[1]||""]],[new RegExp(da,"i"),[da,""]],[new RegExp(pa,"i"),[pa,""]],[Hg,[Ys,""]],[new RegExp(Mi,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[am,""];if(new RegExp(Mr).test(t)&&!/IEMobile\b/.test(t))return[Mi+" "+Mr,""];var r=/Windows NT ([0-9.]+)/i.exec(t);if(r&&r[1]){var n=OG[r[1]]||"";return/arm/i.test(t)&&(n="RT"),[Mi,n]}return[Mi,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[yc,[e[3],e[4],e[5]||"0"].join(".")]:[yc,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=Le(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+Dn+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Dn+")","i"),e=>e&&e[2]?[Dn,[e[2],e[3],e[4]||"0"].join(".")]:[Dn,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[RG,""]],[/Linux|debian/i,["Linux",""]]],sy=function(e){return jG.test(e)?da:AG.test(e)?pa:$G.test(e)?Ms:new RegExp(lm,"i").test(e)?lm:new RegExp("("+am+"|WPDesktop)","i").test(e)?am:/iPad/.test(e)?uI:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?pI:Hg.test(e)?Ys:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(ny,"i").test(e)?ny:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(Mr).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?Dn:cI:new RegExp("(pda|"+Mr+")","i").test(e)?IG:new RegExp(Xs,"i").test(e)&&!new RegExp(Xs+" pc","i").test(e)?EI:""},kG=e=>e instanceof Error,CI={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},MG=CI.info;function PI(e){if(_n(e))return{boolValue:e};if(typeof e=="number")return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if(typeof e=="string")return{stringValue:e};if(pt(e))return{arrayValue:{values:e.map(t=>PI(t))}};try{return{stringValue:JSON.stringify(e)}}catch{return{stringValue:String(e)}}}function iy(e){var t=[];for(var r in e){var n=e[r];zn(n)||Le(n)||t.push({key:r,value:PI(n)})}return t}function LG(e){var t=globalThis._posthogChunkIds;if(t){var r=Object.keys(t);return sp&&r.length===ry||(ry=r.length,sp=r.reduce((n,o)=>{pl||(pl={});var s=pl[o];if(s)n[s[0]]=s[1];else for(var i=e(o),l=i.length-1;l>=0;l--){var u=i[l],d=u==null?void 0:u.filename,p=t[o];if(d&&p){n[d]=p,pl[o]=[d,p];break}}return n},{})),sp}}class zG{constructor(t,r,n){n===void 0&&(n=[]),this.coercers=t,this.stackParser=r,this.modifiers=n}buildFromUnknown(t,r){r===void 0&&(r={});var n=r&&r.mechanism||{handled:!0,type:"generic"},o=this.buildCoercingContext(n,r,0).apply(t),s=this.buildParsingContext(r),i=this.parseStacktrace(o,s);return{$exception_list:this.convertToExceptionList(i,n),$exception_level:"error"}}modifyFrames(t){var r=this;return Wr(function*(){for(var n of t)n.stacktrace&&n.stacktrace.frames&&pt(n.stacktrace.frames)&&(n.stacktrace.frames=yield r.applyModifiers(n.stacktrace.frames));return t})()}coerceFallback(t){var r;return{type:"Error",value:"Unknown error",stack:(r=t.syntheticException)==null?void 0:r.stack,synthetic:!0}}parseStacktrace(t,r){var n,o;return t.cause!=null&&(n=this.parseStacktrace(t.cause,r)),t.stack!=""&&t.stack!=null&&(o=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?r.skipFirstLines:0),r.chunkIdMap)),Re({},t,{cause:n,stack:o})}applyChunkIds(t,r){return t.map(n=>(n.filename&&r&&(n.chunk_id=r[n.filename]),n))}applyCoercers(t,r){for(var n of this.coercers)if(n.match(t))return n.coerce(t,r);return this.coerceFallback(r)}applyModifiers(t){var r=this;return Wr(function*(){var n=t;for(var o of r.modifiers)n=yield o(n);return n})()}convertToExceptionList(t,r){var n,o,s,i={type:t.type,value:t.value,mechanism:{type:(n=r.type)!==null&&n!==void 0?n:"generic",handled:(o=r.handled)===null||o===void 0||o,synthetic:(s=t.synthetic)!==null&&s!==void 0&&s}};t.stack&&(i.stacktrace={type:"raw",frames:t.stack});var l=[i];return t.cause!=null&&l.push(...this.convertToExceptionList(t.cause,Re({},r,{handled:!0}))),l}buildParsingContext(t){var r;return{chunkIdMap:LG(this.stackParser),skipFirstLines:(r=t.skipFirstLines)!==null&&r!==void 0?r:1}}buildCoercingContext(t,r,n){n===void 0&&(n=0);var o=(s,i)=>{if(4>=i){var l=this.buildCoercingContext(t,r,i);return this.applyCoercers(s,l)}};return Re({},r,{syntheticException:n==0?r.syntheticException:void 0,mechanism:t,apply:s=>o(s,n),next:s=>o(s,n+1)})}}var Js="?";function um(e,t,r,n,o){var s={platform:e,filename:t,function:r==="<anonymous>"?Js:r,in_app:!0};return Le(n)||(s.lineno=n),Le(o)||(s.colno=o),s}var RI=(e,t)=>{var r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:Js,r?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},FG=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,VG=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,BG=/\((\S*)(?::(\d+))(?::(\d+))\)/,HG=(e,t)=>{var r=FG.exec(e);if(r){var[,n,o,s]=r;return um(t,n,Js,+o,+s)}var i=VG.exec(e);if(i){if(i[2]&&i[2].indexOf("eval")===0){var l=BG.exec(i[2]);l&&(i[2]=l[1],i[3]=l[2],i[4]=l[3])}var[u,d]=RI(i[1]||Js,i[2]);return um(t,d,u,i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}},UG=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,WG=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,qG=(e,t)=>{var r=UG.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){var n=WG.exec(r[3]);n&&(r[1]=r[1]||"eval",r[3]=n[1],r[4]=n[2],r[5]="")}var o=r[3],s=r[1]||Js;return[s,o]=RI(s,o),um(t,o,s,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}},ay=/\(error: (.*)\)/;class GG{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,r){var n=Tt(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:n?t.stack:void 0,cause:t.cause?r.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var r=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?r+": "+t.message:r}isDOMException(t){return _c(t,"DOMException")}isDOMError(t){return _c(t,"DOMError")}}class KG{match(t){return(r=>r instanceof Error)(t)}coerce(t,r){return{type:this.getType(t),value:this.getMessage(t,r),stack:this.getStack(t),cause:t.cause?r.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,r){var n=t.message;return String(n.error&&typeof n.error.message=="string"?n.error.message:n)}getStack(t){return t.stacktrace||t.stack||void 0}}class XG{constructor(){}match(t){return _c(t,"ErrorEvent")&&t.error!=null}coerce(t,r){var n;return r.apply(t.error)||{type:"ErrorEvent",value:t.message,stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}}var YG=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class JG{match(t){return typeof t=="string"}coerce(t,r){var n,[o,s]=this.getInfos(t);return{type:o??"Error",value:s??t,stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}getInfos(t){var r="Error",n=t,o=t.match(YG);return o&&(r=o[1],n=o[2]),[r,n]}}var ZG=["fatal","error","warning","log","info","debug"];function TI(e,t){t===void 0&&(t=40);var r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(var n=r.length;n>0;n--){var o=r.slice(0,n).join(", ");if(t>=o.length)return n===r.length?o:o.length>t?o.slice(0,t)+"...":o}return""}class QG{match(t){return typeof t=="object"&&t!==null}coerce(t,r){var n,o=this.getErrorPropertyFromObject(t);return o?r.apply(o):{type:this.getType(t),value:this.getValue(t),stack:(n=r.syntheticException)==null?void 0:n.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return zg(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var r="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(r+=" with message: '"+t.message+"'"),r}if("message"in t&&typeof t.message=="string")return t.message;var n=this.getObjectClassName(t);return(n&&n!=="Object"?"'"+n+"'":"Object")+" captured as exception with keys: "+TI(t)}isSeverityLevel(t){return Tt(t)&&!Dl(t)&&ZG.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var r in t)if({}.hasOwnProperty.call(t,r)){var n=t[r];if(kG(n))return n}}getObjectClassName(t){try{var r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch{return}}}class e9{match(t){return zg(t)}coerce(t,r){var n,o=t.constructor.name;return{type:o,value:o+" captured as exception with keys: "+TI(t),stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}}class t9{match(t){return lI(t)}coerce(t,r){var n;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}}class r9{match(t){return _c(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!zg(t))return!1;try{var r=t.detail;return r!=null&&typeof r=="object"&&"reason"in r}catch{return!1}}coerce(t,r){var n,o=this.getUnhandledRejectionReason(t);return lI(o)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(o),stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}:r.apply(o)}getUnhandledRejectionReason(t){try{if("reason"in t)return t.reason;if("detail"in t&&t.detail!=null&&typeof t.detail=="object"&&"reason"in t.detail)return t.detail.reason}catch{}return t}}var xc="$message",wc="$timestamp",n9=new Set([xc,wc]),ap={enabled:!0,max_bytes:32768};function Ec(e){var t;return e?{enabled:(t=e.enabled)!==null&&t!==void 0?t:ap.enabled,max_bytes:s9(e.max_bytes,ap.max_bytes)}:Re({},ap)}class o9{constructor(t){this.Yt=[],this.Xt=0,this.qt=Ec(t)}setConfig(t){this.qt=Ec(t),this.er()}add(t){var r=function(o){var s=function(p){var f=new WeakSet;try{return JSON.stringify(p,(m,h)=>{if(typeof h=="bigint")return h.toString();if(typeof h!="function"&&typeof h!="symbol"){if(h instanceof Date)return h.toISOString();if(h instanceof Error)return{name:h.name,message:h.message,stack:h.stack};if(h&&typeof h=="object"){if(f.has(h))return"[Circular]";f.add(h)}return h}})}catch{return}}(o);if(s)try{var i=JSON.parse(s);if(!Nt(i))return;var l=i,u=l[xc],d=l[wc];return!Tt(u)||u.trim().length===0||!Tt(d)&&!Kr(d)?void 0:{step:l,json:s}}catch{return}}(t);if(r){var n=function(o){if(typeof TextEncoder<"u")return new TextEncoder().encode(o).length;for(var s=encodeURIComponent(o),i=0,l=0;s.length>l;l++)s[l]==="%"?(i+=1,l+=2):i+=1;return i}(r.json);n>this.qt.max_bytes||(this.Yt.push({step:r.step,bytes:n}),this.Xt+=n,this.er())}}getAttachable(){return this.Yt.map(t=>t.step)}clear(){this.Yt=[],this.Xt=0}size(){return this.Yt.length}er(){for(;this.Xt>this.qt.max_bytes&&this.Yt.length>0;){var t=this.Yt.shift();t&&(this.Xt-=t.bytes)}}}function s9(e,t){if(!Kr(e)||e===1/0||e===-1/0)return t;var r=Math.floor(e);return 0>r?t:r}var II=function(e,t){var{debugEnabled:r}=t===void 0?{}:t,n={k(o){if(oe&&(mr.DEBUG||Je.POSTHOG_DEBUG||r)&&!Le(oe.console)&&oe.console){for(var s=("__rrweb_original__"in oe.console[o])?oe.console[o].__rrweb_original__:oe.console[o],i=arguments.length,l=new Array(i>1?i-1:0),u=1;i>u;u++)l[u-1]=arguments[u];s(e,...l)}},debug(){for(var o=arguments.length,s=new Array(o),i=0;o>i;i++)s[i]=arguments[i];n.k("debug",...s)},info(){for(var o=arguments.length,s=new Array(o),i=0;o>i;i++)s[i]=arguments[i];n.k("log",...s)},warn(){for(var o=arguments.length,s=new Array(o),i=0;o>i;i++)s[i]=arguments[i];n.k("warn",...s)},error(){for(var o=arguments.length,s=new Array(o),i=0;o>i;i++)s[i]=arguments[i];n.k("error",...s)},critical(){for(var o=arguments.length,s=new Array(o),i=0;o>i;i++)s[i]=arguments[i];console.error(e,...s)},uninitializedWarning(o){n.error("You must initialize PostHog before calling "+o)},createLogger:(o,s)=>II(e+" "+o,s)};return n},De=II("[PostHog.js]"),Et=De.createLogger,i9=Et("[ExternalScriptsLoader]"),lp=(e,t,r)=>{if(e.config.disable_external_dependency_loading)return i9.warn(t+" was requested but loading of external scripts is disabled."),r("Loading of external scripts is disabled");var n=Oe==null?void 0:Oe.querySelectorAll("script");if(n){for(var o,s=function(){if(n[i].src===t){var u=n[i];return u.__posthog_loading_callback_fired?{v:r()}:(u.addEventListener("load",d=>{u.__posthog_loading_callback_fired=!0,r(void 0,d)}),u.onerror=d=>r(d),{v:void 0})}},i=0;n.length>i;i++)if(o=s())return o.v}var l=()=>{if(!Oe)return r("document not found");var u=Oe.createElement("script");if(u.type="text/javascript",u.crossOrigin="anonymous",u.src=t,u.onload=f=>{u.__posthog_loading_callback_fired=!0,r(void 0,f)},u.onerror=f=>r(f),e.config.prepare_external_dependency_script&&(u=e.config.prepare_external_dependency_script(u)),!u)return r("prepare_external_dependency_script returned null");if(e.config.external_scripts_inject_target==="head")Oe.head.appendChild(u);else{var d,p=Oe.querySelectorAll("body > script");p.length>0?(d=p[0].parentNode)==null||d.insertBefore(u,p[0]):Oe.body.appendChild(u)}};Oe!=null&&Oe.body?l():Oe==null||Oe.addEventListener("DOMContentLoaded",l)};Je.__PosthogExtensions__=Je.__PosthogExtensions__||{},Je.__PosthogExtensions__.loadExternalDependency=(e,t,r)=>{if(t!=="remote-config"){var n;if(e.config.__preview_external_dependency_versioned_paths)n=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var o="/static/"+t+".js?v="+e.version;if(t==="toolbar"){var s=3e5;o=o+"&t="+Math.floor(Date.now()/s)*s}n=e.requestRouter.endpointFor("assets",o)}lp(e,n,r)}else{var i=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");lp(e,i,r)}},Je.__PosthogExtensions__.loadSiteApp=(e,t,r)=>{var n=e.requestRouter.endpointFor("api",t);lp(e,n,r)};var $I="$people_distinct_id",Sc="$device_id",Li="__alias",zi="__timers",dm="$autocapture_disabled_server_side",pm="$heatmaps_enabled_server_side",fm="$exception_capture_enabled_server_side",mm="$error_tracking_suppression_rules",hm="$error_tracking_capture_extension_exceptions",gm="$web_vitals_enabled_server_side",Ug="$dead_clicks_enabled_server_side",vm="$product_tours_enabled_server_side",bm="$web_vitals_allowed_metrics",Fi="$session_recording_remote_config",AI="$replay_override_sampling",jI="$replay_override_linked_flag",OI="$replay_override_url_trigger",NI="$replay_override_event_trigger",Cc="$sesid",Wg="$session_is_sampled",Ps="$enabled_feature_flags",kl="$active_feature_flags",Vi="$early_access_features",_m="$feature_flag_details",ym="$feature_flag_payloads",xm="$feature_flag_request_id",$n="$override_feature_flags",bs="$override_feature_flag_payloads",Bi="$stored_person_properties",xo="$stored_group_properties",wm="$surveys",Em="$surveys_activated",Ml="ph_product_tours",Yi="$flag_call_reported",Sm="$flag_call_reported_session_id",Cm="$feature_flag_errors",Pc="$feature_flag_evaluated_at",tn="$user_state",Pm="$client_session_props",Rm="$capture_rate_limit",Tm="$initial_campaign_params",Im="$initial_referrer_info",Rc="$initial_person_info",Tc="$epp",DI="__POSTHOG_TOOLBAR__",fl="$posthog_cookieless",kI="$sdk_debug_extensions_init_method",MI="$sdk_debug_extensions_init_time_ms",LI="$sdk_debug_recording_script_not_loaded",qg="PostHog loadExternalDependency extension not found.",wo="on_reject",On="always",us="anonymous",ds="identified",$m="identified_only",Ic="visibilitychange",$c="beforeunload",_s="$pageview",cp="$pageleave",up="$identify",ly="$groupidentify";function ml(e,t){pt(e)&&e.forEach(t)}function xt(e,t){if(!at(e))if(pt(e))e.forEach(t);else if(wG(e))e.forEach((n,o)=>t(n,o));else for(var r in e)aI.call(e,r)&&t(e[r],r)}var $t=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];for(var o of r)for(var s in o)o[s]!==void 0&&(e[s]=o[s]);return e};function Ll(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n}var cy=function(e){try{return e()}catch{return}},a9=function(e){return function(){try{for(var t=arguments.length,r=new Array(t),n=0;t>n;n++)r[n]=arguments[n];return e.apply(this,r)}catch(o){De.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),De.critical(o)}}},Gg=function(e){var t={};return xt(e,function(r,n){(Tt(r)&&r.length>0||Kr(r))&&(t[n]=r)}),t},l9=["herokuapp.com","vercel.app","netlify.app"];function c9(e){var t=e==null?void 0:e.hostname;if(!Tt(t))return!1;var r=t.split(".").slice(-2).join(".");for(var n of l9)if(r===n)return!1;return!0}function Lt(e,t,r,n){var{capture:o=!1,passive:s=!0}=n??{};e==null||e.addEventListener(t,r,{capture:o,passive:s})}function zI(e){return e.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Kr(e)&&isFinite(e)&&Math.floor(e)===e});class Ac{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,r,n,o){if(!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(n)||!Number.isInteger(o)||0>t||0>r||0>n||0>o||t>0xffffffffffff||r>4095||n>1073741823||o>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=t/Math.pow(2,40),s[1]=t/Math.pow(2,32),s[2]=t/Math.pow(2,24),s[3]=t/Math.pow(2,16),s[4]=t/Math.pow(2,8),s[5]=t,s[6]=112|r>>>8,s[7]=r,s[8]=128|n>>>24,s[9]=n>>>16,s[10]=n>>>8,s[11]=n,s[12]=o>>>24,s[13]=o>>>16,s[14]=o>>>8,s[15]=o,new Ac(s)}toString(){for(var t="",r=0;this.bytes.length>r;r++)t=t+(this.bytes[r]>>>4).toString(16)+(15&this.bytes[r]).toString(16),r!==3&&r!==5&&r!==7&&r!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new Ac(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var r=0;16>r;r++){var n=this.bytes[r]-t.bytes[r];if(n!==0)return Math.sign(n)}return 0}}class u9{constructor(){this.S=0,this.C=0,this.I=new d9}generate(){var t=this.generateOrAbort();if(Le(t)){this.S=0;var r=this.generateOrAbort();if(Le(r))throw new Error("Could not generate UUID after timestamp reset");return r}return t}generateOrAbort(){var t=Date.now();if(t>this.S)this.S=t,this.T();else{if(this.S>=t+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.T())}return Ac.fromFieldsV7(this.S,Math.trunc(this.C/Math.pow(2,30)),this.C&Math.pow(2,30)-1,this.I.nextUint32())}T(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var uy,FI=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};oe&&!Le(oe.crypto)&&crypto.getRandomValues&&(FI=e=>crypto.getRandomValues(e));class d9{constructor(){this.M=new Uint32Array(8),this.O=1/0}nextUint32(){return this.M.length>this.O||(FI(this.M),this.O=0),this.M[this.O++]}}var Yn=()=>p9().toString(),p9=()=>(uy||(uy=new u9)).generate(),Ei="",f9=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,vn={R:()=>!!Oe,D(e){De.error("cookieStore error: "+e)},A(e){if(Oe){try{for(var t=e+"=",r=Oe.cookie.split(";").filter(s=>s.length),n=0;r.length>n;n++){for(var o=r[n];o.charAt(0)==" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return decodeURIComponent(o.substring(t.length,o.length))}}catch{}return null}},F(e){var t;try{t=JSON.parse(vn.A(e))||{}}catch{}return t},N(e,t,r,n,o){if(Oe)try{var s="",i="",l=function(p,f){if(f){var m=function(v,g){if(g===void 0&&(g=Oe),Ei)return Ei;if(!g||["localhost","127.0.0.1"].includes(v))return"";for(var b=v.split("."),_=Math.min(b.length,8),y="dmn_chk_"+Yn();!Ei&&_--;){var x=b.slice(_).join("."),S=y+"=1;domain=."+x+";path=/";g.cookie=S+";max-age=3",g.cookie.includes(y)&&(g.cookie=S+";max-age=0",Ei=x)}return Ei}(p);if(!m){var h=(v=>{var g=v.match(f9);return g?g[0]:""})(p);h!==m&&De.info("Warning: cookie subdomain discovery mismatch",h,m),m=h}return m?"; domain=."+m:""}return""}(Oe.location.hostname,n);if(r){var u=new Date;u.setTime(u.getTime()+864e5*r),s="; expires="+u.toUTCString()}o&&(i="; secure");var d=e+"="+encodeURIComponent(JSON.stringify(t))+s+"; SameSite=Lax; path=/"+l+i;return d.length>3686.4&&De.warn("cookieStore warning: large cookie, len="+d.length),Oe.cookie=d,d}catch{return}},q(e,t){if(Oe!=null&&Oe.cookie)try{vn.N(e,"",-1,t)}catch{return}}},dp=null,Rt={R(){if(!zn(dp))return dp;var e=!0;if(Le(oe))e=!1;else try{var t="__mplssupport__";Rt.N(t,"xyz"),Rt.A(t)!=='"xyz"'&&(e=!1),Rt.q(t)}catch{e=!1}return e||De.error("localStorage unsupported; falling back to cookie store"),dp=e,e},D(e){De.error("localStorage error: "+e)},A(e){try{return oe==null?void 0:oe.localStorage.getItem(e)}catch(t){Rt.D(t)}return null},F(e){try{return JSON.parse(Rt.A(e))||{}}catch{}return null},N(e,t){try{oe==null||oe.localStorage.setItem(e,JSON.stringify(t))}catch(r){Rt.D(r)}},q(e){try{oe==null||oe.localStorage.removeItem(e)}catch(t){Rt.D(t)}}},m9=[Sc,"distinct_id",Cc,Wg,Tc,Rc,tn],hl={},h9={R:()=>!0,D(e){De.error("memoryStorage error: "+e)},A:e=>hl[e]||null,F:e=>hl[e]||null,N(e,t){hl[e]=t},q(e){delete hl[e]}},bo=null,Zt={R(){if(!zn(bo))return bo;if(bo=!0,Le(oe))bo=!1;else try{var e="__support__";Zt.N(e,"xyz"),Zt.A(e)!=='"xyz"'&&(bo=!1),Zt.q(e)}catch{bo=!1}return bo},D(e){De.error("sessionStorage error: ",e)},A(e){try{return oe==null?void 0:oe.sessionStorage.getItem(e)}catch(t){Zt.D(t)}return null},F(e){try{return JSON.parse(Zt.A(e))||null}catch{}return null},N(e,t){try{oe==null||oe.sessionStorage.setItem(e,JSON.stringify(t))}catch(r){Zt.D(r)}},q(e){try{oe==null||oe.sessionStorage.removeItem(e)}catch(t){Zt.D(t)}}};class g9{constructor(t){this._instance=t}get qt(){return this._instance.config}get consent(){return this.rr()?0:this.ir}isOptedOut(){return this.qt.cookieless_mode===On||this.isRejected()||this.consent===-1&&this.qt.cookieless_mode===wo}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.qt.opt_out_capturing_by_default}optInOut(t){this.nr.N(this.sr,t?1:0,this.qt.cookie_expiration,this.qt.cross_subdomain_cookie,this.qt.secure_cookie)}reset(){this.nr.q(this.sr,this.qt.cross_subdomain_cookie)}get sr(){var{token:t,opt_out_capturing_cookie_prefix:r,consent_persistence_name:n}=this._instance.config;return n||(r?r+t:"__ph_opt_in_out_"+t)}get ir(){var t=this.nr.A(this.sr);return op(t)?1:it(CG,t)?0:-1}get nr(){var t=this.qt.opt_out_capturing_persistence_type,r=t==="localStorage"?Rt:vn;if(!this.ar||this.ar!==r){this.ar=r;var n=t==="localStorage"?vn:Rt;n.A(this.sr)&&(this.ar.A(this.sr)||this.optInOut(op(n.A(this.sr))),n.q(this.sr,this.qt.cross_subdomain_cookie))}return this.ar}rr(){return!!this.qt.respect_dnt&&[kr==null?void 0:kr.doNotTrack,kr==null?void 0:kr.msDoNotTrack,Je.doNotTrack].some(t=>op(t))}}var gl=Et("[Dead Clicks]"),v9=()=>!0,b9=e=>{var t,r=!((t=e.instance.persistence)==null||!t.get_property(Ug)),n=e.instance.config.capture_dead_clicks;return _n(n)?n:!!Nt(n)||r};class dy{get lazyLoadedDeadClicksAutocapture(){return this.ur}constructor(t,r,n){this.instance=t,this.isEnabled=r,this.onCapture=n,this.startIfEnabledOrStop()}onRemoteConfig(t){"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[Ug]:t.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.lr(()=>{this.hr()}):this.stop()}lr(t){var r,n;(r=Je.__PosthogExtensions__)!=null&&r.initDeadClicksAutocapture&&t(),(n=Je.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this.instance,"dead-clicks-autocapture",o=>{o?gl.error("failed to load script",o):t()})}hr(){var t;if(Oe){if(!this.ur&&(t=Je.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var r=Nt(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};r.__onCapture=this.onCapture,this.ur=Je.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,r),this.ur.start(Oe),gl.info("starting...")}}else gl.error("`document` not found. Cannot start.")}stop(){this.ur&&(this.ur.stop(),this.ur=void 0,gl.info("stopping..."))}}var pp=Et("[SegmentIntegration]"),VI="posthog-js";function BI(e,t){var{organization:r,projectId:n,prefix:o,severityAllowList:s=["error"],sendExceptionsToPostHog:i=!0}=t===void 0?{}:t;return l=>{var u,d,p,f,m;if(s!=="*"&&!s.includes(l.level)||!e.__loaded)return l;l.tags||(l.tags={});var h=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());l.tags["PostHog Person URL"]=h,e.sessionRecordingStarted()&&(l.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var v,g=((u=l.exception)==null?void 0:u.values)||[],b=g.map(y=>Re({},y,{stacktrace:y.stacktrace?Re({},y.stacktrace,{type:"raw",frames:(y.stacktrace.frames||[]).map(x=>Re({},x,{platform:"web:javascript"}))}):void 0})),_={$exception_message:((d=g[0])==null?void 0:d.value)||l.message,$exception_type:(p=g[0])==null?void 0:p.type,$exception_level:l.level,$exception_list:b,$sentry_event_id:l.event_id,$sentry_exception:l.exception,$sentry_exception_message:((f=g[0])==null?void 0:f.value)||l.message,$sentry_exception_type:(m=g[0])==null?void 0:m.type,$sentry_tags:l.tags};return r&&n&&(_.$sentry_url=(o||"https://sentry.io/organizations/")+r+"/issues/?project="+n+"&query="+l.event_id),i&&((v=e.exceptions)==null||v.sendExceptionEvent(_)),l}}class _9{constructor(t,r,n,o,s,i){this.name=VI,this.setupOnce=function(l){l(BI(t,{organization:r,projectId:n,prefix:o,severityAllowList:s,sendExceptionsToPostHog:i==null||i}))}}}class py{constructor(t){this.cr=(r,n,o)=>{o&&(o.noSessionId||o.activityTimeout||o.sessionPastMaximumLength)&&(De.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:r,changeReason:o}),this.dr=void 0,this._instance.scrollManager.resetContext())},this._instance=t,this.vr()}vr(){var t;this.pr=(t=this._instance.sessionManager)==null?void 0:t.onSessionId(this.cr)}destroy(){var t;(t=this.pr)==null||t.call(this),this.pr=void 0}doPageView(t,r){var n,o=this.gr(t,r);return this.dr={pathname:(n=oe==null?void 0:oe.location.pathname)!==null&&n!==void 0?n:"",pageViewId:r,timestamp:t},this._instance.scrollManager.resetContext(),o}doPageLeave(t){var r;return this.gr(t,(r=this.dr)==null?void 0:r.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.dr)==null?void 0:t.pageViewId}}gr(t,r){var n=this.dr;if(!n)return{$pageview_id:r};var o={$pageview_id:r,$prev_pageview_id:n.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:i,lastScrollY:l,maxScrollY:u,maxContentHeight:d,lastContentY:p,maxContentY:f}=s;if(!(Le(i)||Le(l)||Le(u)||Le(d)||Le(p)||Le(f))){i=Math.ceil(i),l=Math.ceil(l),u=Math.ceil(u),d=Math.ceil(d),p=Math.ceil(p),f=Math.ceil(f);var m=i>1?yn(l/i,0,1,De):1,h=i>1?yn(u/i,0,1,De):1,v=d>1?yn(p/d,0,1,De):1,g=d>1?yn(f/d,0,1,De):1;o=$t(o,{$prev_pageview_last_scroll:l,$prev_pageview_last_scroll_percentage:m,$prev_pageview_max_scroll:u,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:p,$prev_pageview_last_content_percentage:v,$prev_pageview_max_content:f,$prev_pageview_max_content_percentage:g})}}return n.pathname&&(o.$prev_pageview_pathname=n.pathname),n.timestamp&&(o.$prev_pageview_duration=(t.getTime()-n.timestamp.getTime())/1e3),o}}var y9={[$I]:{exposure:"hidden"},[Li]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[zi]:{exposure:"hidden"},[dm]:{exposure:"event"},[pm]:{exposure:"hidden"},[fm]:{exposure:"event"},[mm]:{exposure:"hidden"},[hm]:{exposure:"event"},[gm]:{exposure:"event"},[Ug]:{exposure:"event"},[vm]:{exposure:"hidden"},[bm]:{exposure:"event"},[Fi]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[Cc]:{exposure:"hidden"},[Wg]:{exposure:"event"},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},[Ps]:{exposure:"derived",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!Nt(e))return{};for(var t={},r=Object.keys(e),n=0;r.length>n;n++)t["$feature/"+r[n]]=e[r[n]];return t}},[kl]:{exposure:"event"},[Vi]:{exposure:"hidden"},[_m]:{exposure:"hidden"},[ym]:{exposure:"event"},[xm]:{exposure:"event"},[$n]:{exposure:"event"},[bs]:{exposure:"hidden"},[Bi]:{exposure:"hidden"},[xo]:{exposure:"hidden"},[wm]:{exposure:"hidden"},[Em]:{exposure:"event"},[Ml]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[Yi]:{exposure:"hidden"},[Sm]:{exposure:"hidden"},[Cm]:{exposure:"hidden"},[Pc]:{exposure:"hidden"},[tn]:{exposure:"hidden"},[Pm]:{exposure:"hidden"},[Rm]:{exposure:"hidden"},[Tm]:{exposure:"hidden"},[Im]:{exposure:"hidden"},[Rc]:{exposure:"hidden"},[Tc]:{exposure:"hidden"},[AI]:{exposure:"event"},[jI]:{exposure:"event"},[OI]:{exposure:"event"},[NI]:{exposure:"event"},[kI]:{exposure:"event"},[MI]:{exposure:"event"},[LI]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},x9=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],jc=e=>{var t=Oe==null?void 0:Oe.createElement("a");return Le(t)?null:(t.href=e,t)},Oc=function(e,t){for(var r,n=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),o=0;n.length>o;o++){var s=n[o].split("=");if(s[0]===t){r=s;break}}if(!pt(r)||2>r.length)return"";var i=r[1];try{i=decodeURIComponent(i)}catch{De.error("Skipping decoding for malformed query param: "+i)}return i.replace(/\+/g," ")},fa=function(e,t,r){if(!e||!t||!t.length)return e;for(var n=e.split("#"),o=n[1],s=(n[0]||"").split("?"),i=s[1],l=s[0],u=(i||"").split("&"),d=[],p=0;u.length>p;p++){var f=u[p].split("=");pt(f)&&(t.includes(f[0])?d.push(f[0]+"="+r):d.push(u[p]))}var m=l;return i!=null&&(m+="?"+d.join("&")),o!=null&&(m+="#"+o),m},Nc=function(e,t){var r=e.match(new RegExp(t+"=([^&]*)"));return r?r[1]:null},vl="https?://(.*)",Zs=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],w9=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...Zs],ma="<masked>",E9=["li_fat_id"];function HI(e,t,r){if(!Oe)return{};var n,o=t?[...Zs,...r||[]]:[],s=UI(fa(Oe.URL,o,ma),e),i=(n={},xt(E9,function(l){var u=vn.A(l);n[l]=u||null}),n);return $t(i,s)}function UI(e,t){var r=w9.concat(t||[]),n={};return xt(r,function(o){var s=Oc(e,o);n[o]=s||null}),n}function WI(e){var t=function(s){return s?s.search(vl+"google.([^/?]*)")===0?"google":s.search(vl+"bing.com")===0?"bing":s.search(vl+"yahoo.com")===0?"yahoo":s.search(vl+"duckduckgo.com")===0?"duckduckgo":null:null}(e),r=t!="yahoo"?"q":"p",n={};if(!zn(t)){n.$search_engine=t;var o=Oe?Oc(Oe.referrer,r):"";o.length&&(n.ph_keyword=o)}return n}function fy(){return navigator.language||navigator.userLanguage}var Dc="$direct";function qI(){return(Oe==null?void 0:Oe.referrer)||Dc}function GI(e,t){var r=e?[...Zs,...t||[]]:[],n=Jt==null?void 0:Jt.href.substring(0,1e3);return{r:qI().substring(0,1e3),u:n?fa(n,r,ma):void 0}}function KI(e){var t,{r,u:n}=e,o={$referrer:r,$referring_domain:r==null?void 0:r==Dc?Dc:(t=jc(r))==null?void 0:t.host};if(n){o.$current_url=n;var s=jc(n);o.$host=s==null?void 0:s.host,o.$pathname=s==null?void 0:s.pathname;var i=UI(n);$t(o,i)}if(r){var l=WI(r);$t(o,l)}return o}function XI(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function S9(){try{return new Date().getTimezoneOffset()}catch{return}}var C9=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class fp{constructor(t,r){this.qt=t,this.props={},this.mr=!1,this.yr=(n=>{var o="";return n.token&&(o=n.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),n.persistence_name?"ph_"+n.persistence_name:"ph_"+o+"_posthog"})(t),this.nr=this.br(t),this.load(),t.debug&&De.info("Persistence loaded",t.persistence,Re({},this.props)),this.update_config(t,t,r),this.save()}isDisabled(){return!!this._r}br(t){C9.indexOf(t.persistence.toLowerCase())===-1&&(De.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var r=function(o){o===void 0&&(o=[]);var s=[...m9,...o];return Re({},Rt,{F(i){try{var l={};try{l=vn.F(i)||{}}catch{}var u=$t(l,JSON.parse(Rt.A(i)||"{}"));return Rt.N(i,u),u}catch{}return null},N(i,l,u,d,p,f){try{Rt.N(i,l,void 0,void 0,f);var m={};s.forEach(h=>{l[h]&&(m[h]=l[h])}),Object.keys(m).length&&vn.N(i,m,u,d,p,f)}catch(h){Rt.D(h)}},q(i,l){try{oe==null||oe.localStorage.removeItem(i),vn.q(i,l)}catch(u){Rt.D(u)}}})}(t.cookie_persisted_properties||[]),n=t.persistence.toLowerCase();return n==="localstorage"&&Rt.R()?Rt:n==="localstorage+cookie"&&r.R()?r:n==="sessionstorage"&&Zt.R()?Zt:n==="memory"?h9:n==="cookie"?vn:r.R()?r:vn}wr(t){var r=t??this.qt.feature_flag_cache_ttl_ms;if(!r||0>=r)return!1;var n=this.props[Pc];return!n||typeof n!="number"||Date.now()-n>r}properties(){var t={};return xt(this.props,(r,n)=>{var o=(s=>{var i=y9[s];if(i)return i;for(var[l,u]of x9)if(s.indexOf(l)===0)return u})(n);if((o==null?void 0:o.exposure)==="derived"){if(o.shouldSkipFromEventProperties!=null&&o.shouldSkipFromEventProperties(r,n===Ps?()=>this.wr():()=>!1))return;o.transformToEventProperties&&$t(t,o.transformToEventProperties(r))}else o&&o.exposure!=="event"||(t[n]=r)}),t}load(){if(!this._r){var t=this.nr.F(this.yr);t&&(this.props=$t({},t))}}save(){this._r||this.nr.N(this.yr,this.props,this.Sr,this.kr,this.Cr,this.qt.debug)}remove(){this.nr.q(this.yr,!1),this.nr.q(this.yr,!0)}clear(){this.remove(),this.props={}}register_once(t,r,n){if(Nt(t)){Le(r)&&(r="None"),this.Sr=Le(n)?this.Ir:n;var o=!1;if(xt(t,(s,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==r||(this.Tr(i,s),o=!0)}),o)return this.save(),!0}return!1}register(t,r){if(Nt(t)){this.Sr=Le(r)?this.Ir:r;var n=!1;if(xt(t,(o,s)=>{t.hasOwnProperty(s)&&this.props[s]!==o&&(this.Tr(s,o),n=!0)}),n)return this.save(),!0}return!1}unregister(t){t in this.props&&(this.Er(t),this.save())}update_campaign_params(){if(!this.mr){var t=HI(this.qt.custom_campaign_params,this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties);Cs(Gg(t))||this.register(t),this.mr=!0}}update_search_keyword(){var t;this.register((t=Oe==null?void 0:Oe.referrer)?WI(t):{})}update_referrer_info(){var t;this.register_once({$referrer:qI(),$referring_domain:Oe!=null&&Oe.referrer&&((t=jc(Oe.referrer))==null?void 0:t.host)||Dc},void 0)}set_initial_person_info(){this.props[Tm]||this.props[Im]||this.register_once({[Rc]:GI(this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};xt([Im,Tm],i=>{var l=this.props[i];l&&xt(l,function(u,d){t["$initial_"+im(d)]=u})});var r,n,o=this.props[Rc];if(o){var s=(r=KI(o),n={},xt(r,function(i,l){n["$initial_"+im(l)]=i}),n);$t(t,s)}return t}safe_merge(t){return xt(this.props,function(r,n){n in t||(t[n]=r)}),t}update_config(t,r,n){if(this.Ir=this.Sr=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!n),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie),t.persistence!==r.persistence||!((i,l)=>{if(i.length!==l.length)return!1;var u=[...i].sort(),d=[...l].sort();return u.every((p,f)=>p===d[f])})(t.cookie_persisted_properties||[],r.cookie_persisted_properties||[])){var o=this.br(t),s=this.props;this.clear(),this.nr=o,this.props=s,this.save()}}set_disabled(t){this._r=t,this._r?this.remove():this.save()}set_cross_subdomain(t){t!==this.kr&&(this.kr=t,this.remove(),this.save())}set_secure(t){t!==this.Cr&&(this.Cr=t,this.remove(),this.save())}set_event_timer(t,r){var n=this.props[zi]||{};n[t]=r,this.Tr(zi,n),this.save()}remove_event_timer(t){var r=this.props[zi]||{},n=r[t];return Le(n)||(delete r[t],this.Tr(zi,r),this.save()),n}get_property(t){return this.props[t]}set_property(t,r){this.Tr(t,r),this.save()}Tr(t,r){this.props[t]=r}Er(t){delete this.props[t]}}var ys={Activation:"events",Cancellation:"cancelEvents"},zl={Popover:"popover",API:"api",Widget:"widget"},Rs={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},Fl={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},kc={Popover:"popover",Inline:"inline"},YI={SHOWN:"product tour shown"},Am={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},my=Et("[RateLimiter]");class P9{constructor(t){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=r=>{var n=r.text;if(n&&n.length)try{(JSON.parse(n).quota_limited||[]).forEach(o=>{my.info((o||"events")+" is quota limited."),this.serverLimits[o]=new Date().getTime()+6e4})}catch(o){return void my.warn('could not rate limit - continuing. Error: "'+(o==null?void 0:o.message)+'"',{text:n})}},this.instance=t,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var t;return((t=this.instance.config.rate_limiting)==null?void 0:t.events_per_second)||10}get captureEventsBurstLimit(){var t;return Math.max(((t=this.instance.config.rate_limiting)==null?void 0:t.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(t){var r,n,o;t===void 0&&(t=!1);var{captureEventsBurstLimit:s,captureEventsPerSecond:i}=this,l=new Date().getTime(),u=(r=(n=this.instance.persistence)==null?void 0:n.get_property(Rm))!==null&&r!==void 0?r:{tokens:s,last:l};u.tokens+=(l-u.last)/1e3*i,u.last=l,u.tokens>s&&(u.tokens=s);var d=1>u.tokens;return d||t||(u.tokens=Math.max(0,u.tokens-1)),!d||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+i+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=d,(o=this.instance.persistence)==null||o.set_property(Rm,u),{isRateLimited:d,remainingTokens:u.tokens}}isServerRateLimited(t){var r=this.serverLimits[t||"events"]||!1;return r!==!1&&new Date().getTime()<r}}var Si=Et("[RemoteConfig]");class JI{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=Je._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}Mr(t){var r,n;(r=Je.__PosthogExtensions__)!=null&&r.loadExternalDependency?(n=Je.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"remote-config",()=>t(this.remoteConfig)):t()}Pr(t){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(r){t(r.json)}})}load(){try{if(this.remoteConfig)return Si.info("Using preloaded remote config",this.remoteConfig),this.Rr(this.remoteConfig),void this.Or();if(this._instance.Lr())return void Si.warn("Remote config is disabled. Falling back to local config.");this.Mr(t=>{if(!t)return Si.info("No config found after loading remote JS config. Falling back to JSON."),void this.Pr(r=>{this.Rr(r),this.Or()});this.Rr(t),this.Or()})}catch(t){Si.error("Error loading remote config",t)}}stop(){this.Fr&&(clearInterval(this.Fr),this.Fr=void 0)}refresh(){this._instance.Lr()||(Oe==null?void 0:Oe.visibilityState)==="hidden"||this._instance.reloadFeatureFlags()}Or(){var t;if(!this.Fr){var r=(t=this._instance.config.remote_config_refresh_interval_ms)!==null&&t!==void 0?t:3e5;r!==0&&(this.Fr=setInterval(()=>{this.refresh()},r))}}Rr(t){var r;t||Si.error("Failed to fetch remote config from PostHog."),this._instance.Rr(t??{}),(t==null?void 0:t.hasFeatureFlags)!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(r=this._instance.featureFlags)==null||r.ensureFlagsLoaded())}}var rn={GZipJS:"gzip-js",Base64:"base64"},Gr=Uint8Array,Cr=Uint16Array,Qs=Uint32Array,Kg=new Gr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Xg=new Gr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),hy=new Gr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ZI=function(e,t){for(var r=new Cr(31),n=0;31>n;++n)r[n]=t+=1<<e[n-1];var o=new Qs(r[30]);for(n=1;30>n;++n)for(var s=r[n];r[n+1]>s;++s)o[s]=s-r[n]<<5|n;return[r,o]},QI=ZI(Kg,2),jm=QI[1];QI[0][28]=258,jm[258]=28;for(var gy=ZI(Xg,0)[1],e$=new Cr(32768),wt=0;32768>wt;++wt){var ps=(43690&wt)>>>1|(21845&wt)<<1;e$[wt]=((65280&(ps=(61680&(ps=(52428&ps)>>>2|(13107&ps)<<2))>>>4|(3855&ps)<<4))>>>8|(255&ps)<<8)>>>1}var Ji=function(e,t,r){for(var n=e.length,o=0,s=new Cr(t);n>o;++o)++s[e[o]-1];var i,l=new Cr(t);for(o=0;t>o;++o)l[o]=l[o-1]+s[o-1]<<1;for(i=new Cr(n),o=0;n>o;++o)i[o]=e$[l[e[o]-1]++]>>>15-e[o];return i},Lo=new Gr(288);for(wt=0;144>wt;++wt)Lo[wt]=8;for(wt=144;256>wt;++wt)Lo[wt]=9;for(wt=256;280>wt;++wt)Lo[wt]=7;for(wt=280;288>wt;++wt)Lo[wt]=8;var Mc=new Gr(32);for(wt=0;32>wt;++wt)Mc[wt]=5;var R9=Ji(Lo,9),T9=Ji(Mc,5),t$=function(e){return(e/8>>0)+(7&e&&1)},r$=function(e,t,r){(r==null||r>e.length)&&(r=e.length);var n=new(e instanceof Cr?Cr:e instanceof Qs?Qs:Gr)(r-t);return n.set(e.subarray(t,r)),n},Tn=function(e,t,r){var n=t/8>>0;e[n]|=r<<=7&t,e[n+1]|=r>>>8},Ci=function(e,t,r){var n=t/8>>0;e[n]|=r<<=7&t,e[n+1]|=r>>>8,e[n+2]|=r>>>16},mp=function(e,t){for(var r=[],n=0;e.length>n;++n)e[n]&&r.push({s:n,f:e[n]});var o=r.length,s=r.slice();if(!o)return[new Gr(0),0];if(o==1){var i=new Gr(r[0].s+1);return i[r[0].s]=1,[i,1]}r.sort(function(w,I){return w.f-I.f}),r.push({s:-1,f:25001});var l=r[0],u=r[1],d=0,p=1,f=2;for(r[0]={s:-1,f:l.f+u.f,l,r:u};p!=o-1;)l=r[r[f].f>r[d].f?d++:f++],u=r[d!=p&&r[f].f>r[d].f?d++:f++],r[p++]={s:-1,f:l.f+u.f,l,r:u};var m=s[0].s;for(n=1;o>n;++n)s[n].s>m&&(m=s[n].s);var h=new Cr(m+1),v=Om(r[p-1],h,0);if(v>t){n=0;var g=0,b=v-t,_=1<<b;for(s.sort(function(w,I){return h[I.s]-h[w.s]||w.f-I.f});o>n;++n){var y=s[n].s;if(t>=h[y])break;g+=_-(1<<v-h[y]),h[y]=t}for(g>>>=b;g>0;){var x=s[n].s;t>h[x]?g-=1<<t-h[x]++-1:++n}for(;n>=0&&g;--n){var S=s[n].s;h[S]==t&&(--h[S],++g)}v=t}return[new Gr(h),v]},Om=function(e,t,r){return e.s==-1?Math.max(Om(e.l,t,r+1),Om(e.r,t,r+1)):t[e.s]=r},vy=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Cr(++t),n=0,o=e[0],s=1,i=function(u){r[n++]=u},l=1;t>=l;++l)if(e[l]==o&&l!=t)++s;else{if(!o&&s>2){for(;s>138;s-=138)i(32754);s>2&&(i(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(i(o),--s;s>6;s-=6)i(8304);s>2&&(i(s-3<<5|8208),s=0)}for(;s--;)i(o);s=1,o=e[l]}return[r.subarray(0,n),t]},Pi=function(e,t){for(var r=0,n=0;t.length>n;++n)r+=e[n]*t[n];return r},Nm=function(e,t,r){var n=r.length,o=t$(t+2);e[o]=255&n,e[o+1]=n>>>8,e[o+2]=255^e[o],e[o+3]=255^e[o+1];for(var s=0;n>s;++s)e[o+s+4]=r[s];return 8*(o+4+n)},by=function(e,t,r,n,o,s,i,l,u,d,p){Tn(t,p++,r),++o[256];for(var f=mp(o,15),m=f[0],h=f[1],v=mp(s,15),g=v[0],b=v[1],_=vy(m),y=_[0],x=_[1],S=vy(g),w=S[0],I=S[1],T=new Cr(19),R=0;y.length>R;++R)T[31&y[R]]++;for(R=0;w.length>R;++R)T[31&w[R]]++;for(var P=mp(T,7),$=P[0],A=P[1],k=19;k>4&&!$[hy[k-1]];--k);var D,z,X,V,Y=d+5<<3,U=Pi(o,Lo)+Pi(s,Mc)+i,F=Pi(o,m)+Pi(s,g)+i+14+3*k+Pi(T,$)+(2*T[16]+3*T[17]+7*T[18]);if(U>=Y&&F>=Y)return Nm(t,p,e.subarray(u,u+d));if(Tn(t,p,1+(U>F)),p+=2,U>F){D=Ji(m,h),z=m,X=Ji(g,b),V=g;var H=Ji($,A);for(Tn(t,p,x-257),Tn(t,p+5,I-1),Tn(t,p+10,k-4),p+=14,R=0;k>R;++R)Tn(t,p+3*R,$[hy[R]]);p+=3*k;for(var ee=[y,w],O=0;2>O;++O){var M=ee[O];for(R=0;M.length>R;++R)Tn(t,p,H[G=31&M[R]]),p+=$[G],G>15&&(Tn(t,p,M[R]>>>5&127),p+=M[R]>>>12)}}else D=R9,z=Lo,X=T9,V=Mc;for(R=0;l>R;++R)if(n[R]>255){var G;Ci(t,p,D[257+(G=n[R]>>>18&31)]),p+=z[G+257],G>7&&(Tn(t,p,n[R]>>>23&31),p+=Kg[G]);var L=31&n[R];Ci(t,p,X[L]),p+=V[L],L>3&&(Ci(t,p,n[R]>>>5&8191),p+=Xg[L])}else Ci(t,p,D[n[R]]),p+=z[n[R]];return Ci(t,p,D[256]),p+z[256]},I9=new Qs([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),$9=function(){for(var e=new Qs(256),t=0;256>t;++t){for(var r=t,n=9;--n;)r=(1&r&&3988292384)^r>>>1;e[t]=r}return e}(),hp=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8};function A9(e,t){t===void 0&&(t={});var r=function(){var f=4294967295;return{p(m){for(var h=f,v=0;m.length>v;++v)h=$9[255&h^m[v]]^h>>>8;f=h},d(){return 4294967295^f}}}(),n=e.length;r.p(e);var o,s,i,l,u,d=(l=10+((o=t).filename&&o.filename.length+1||0),u=8,function(f,m,h,v,g,b){var _=f.length,y=new Gr(v+_+5*(1+Math.floor(_/7e3))+g),x=y.subarray(v,y.length-g),S=0;if(!m||8>_)for(var w=0;_>=w;w+=65535){var I=w+65535;_>I?S=Nm(x,S,f.subarray(w,I)):(x[w]=!0,S=Nm(x,S,f.subarray(w,_)))}else{for(var T=I9[m-1],R=T>>>13,P=8191&T,$=(1<<h)-1,A=new Cr(32768),k=new Cr($+1),D=Math.ceil(h/3),z=2*D,X=function(be){return(f[be]^f[be+1]<<D^f[be+2]<<z)&$},V=new Qs(25e3),Y=new Cr(288),U=new Cr(32),F=0,H=0,ee=(w=0,0),O=0,M=0;_>w;++w){var G=X(w),L=32767&w,W=k[G];if(A[L]=W,k[G]=L,w>=O){var B=_-w;if((F>7e3||ee>24576)&&B>423){S=by(f,x,0,V,Y,U,H,ee,M,w-M,S),ee=F=H=0,M=w;for(var J=0;286>J;++J)Y[J]=0;for(J=0;30>J;++J)U[J]=0}var K=2,re=0,se=P,Z=L-W&32767;if(B>2&&G==X(w-Z))for(var ne=Math.min(R,B)-1,ie=Math.min(32767,w),he=Math.min(258,B);ie>=Z&&--se&&L!=W;){if(f[w+K]==f[w+K-Z]){for(var me=0;he>me&&f[w+me]==f[w+me-Z];++me);if(me>K){if(K=me,re=Z,me>ne)break;var Pe=Math.min(Z,me-2),Se=0;for(J=0;Pe>J;++J){var Ce=w-Z+J+32768&32767,Ze=Ce-A[Ce]+32768&32767;Ze>Se&&(Se=Ze,W=Ce)}}}Z+=(L=W)-(W=A[L])+32768&32767}if(re){V[ee++]=268435456|jm[K]<<18|gy[re];var Ye=31&jm[K],pe=31&gy[re];H+=Kg[Ye]+Xg[pe],++Y[257+Ye],++U[pe],O=w+K,++F}else V[ee++]=f[w],++Y[f[w]]}}S=by(f,x,!0,V,Y,U,H,ee,M,w-M,S)}return r$(y,0,v+t$(S)+g)}(s=e,(i=t).level==null?6:i.level,i.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+i.mem,l,u)),p=d.length;return function(f,m){var h=m.filename;if(f[0]=31,f[1]=139,f[2]=8,f[8]=2>m.level?4:m.level==9?2:0,f[9]=3,m.mtime!=0&&hp(f,4,Math.floor(new Date(m.mtime||Date.now())/1e3)),h){f[3]=8;for(var v=0;h.length>=v;++v)f[v+10]=h.charCodeAt(v)}}(d,t),hp(d,p-8,r.d()),hp(d,p-4,n),d}var j9=!!om||!!nm,n$="text/plain",_y=!1,ed=function(e,t,r){var n;r===void 0&&(r=!0);var[o,s]=e.split("?"),i=Re({},t),l=(n=s==null?void 0:s.split("&").map(d=>{var p,[f,m]=d.split("="),h=r&&(p=i[f])!==null&&p!==void 0?p:m;return delete i[f],f+"="+h}))!==null&&n!==void 0?n:[],u=function(d,p){var f,m;p===void 0&&(p="&");var h=[];return xt(d,function(v,g){Le(v)||Le(g)||g==="undefined"||(f=encodeURIComponent((b=>b instanceof File)(v)?v.name:v.toString()),m=encodeURIComponent(g),h[h.length]=m+"="+f)}),h.join(p)}(i);return u&&l.push(u),o+"?"+l.join("&")},Ts=(e,t)=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString():n,t),gp=e=>{if(e.tr)return e.tr;var{data:t,compression:r}=e;if(t){if(r===rn.GZipJS){var n=A9(function(l,u){var d=l.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(l);for(var p=new Gr(l.length+(l.length>>>1)),f=0,m=function(b){p[f++]=b},h=0;d>h;++h){if(f+5>p.length){var v=new Gr(f+8+(d-h<<1));v.set(p),p=v}var g=l.charCodeAt(h);128>g?m(g):2048>g?(m(192|g>>>6),m(128|63&g)):g>55295&&57344>g?(m(240|(g=65536+(1047552&g)|1023&l.charCodeAt(++h))>>>18),m(128|g>>>12&63),m(128|g>>>6&63),m(128|63&g)):(m(224|g>>>12),m(128|g>>>6&63),m(128|63&g))}return r$(p,0,f)}(Ts(t)),{mtime:0});return{contentType:n$,body:n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength),estimatedSize:n.byteLength}}if(r===rn.Base64){var o=function(l){return l&&btoa(encodeURIComponent(l).replace(/%([0-9A-F]{2})/g,(u,d)=>String.fromCharCode(parseInt(d,16))))}(Ts(t)),s=(l=>"data="+encodeURIComponent(typeof l=="string"?l:Ts(l)))(o);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var i=Ts(t);return{contentType:"application/json",body:i,estimatedSize:new Blob([i]).size}}},O9=function(){var e=Wr(function*(t){var r=Ts(t.data),n=yield function(s,i,l){return sm.apply(this,arguments)}(r,mr.DEBUG,{rethrow:!0});if(!n)return t;var o=yield n.arrayBuffer();return Re({},t,{tr:{contentType:n$,body:o,estimatedSize:o.byteLength}})});return function(t){return e.apply(this,arguments)}}(),yy=(e,t)=>ed(e,{_:new Date().getTime().toString(),ver:mr.JS_SDK_VERSION,compression:t}),Vl=[];nm&&Vl.push({transport:"fetch",method(e){var t,r,{contentType:n,body:o,estimatedSize:s}=(t=gp(e))!==null&&t!==void 0?t:{},i=new Headers;xt(e.headers,function(p,f){i.append(f,p)}),n&&i.append("Content-Type",n);var l=e.url,u=null;if(Z_){var d=new Z_;u={signal:d.signal,timeout:setTimeout(()=>d.abort(),e.timeout)}}nm(l,Re({method:(e==null?void 0:e.method)||"GET",headers:i,keepalive:e.method==="POST"&&52428.8>(s||0),body:o,signal:(r=u)==null?void 0:r.signal},e.fetchOptions)).then(p=>p.text().then(f=>{var m={statusCode:p.status,text:f};if(p.status===200)try{m.json=JSON.parse(f)}catch(h){De.error(h)}e.callback==null||e.callback(m)})).catch(p=>{De.error(p),e.callback==null||e.callback({statusCode:0,error:p})}).finally(()=>u?clearTimeout(u.timeout):null)}}),om&&Vl.push({transport:"XHR",method(e){var t,r=new om;r.open(e.method||"GET",e.url,!0);var{contentType:n,body:o}=(t=gp(e))!==null&&t!==void 0?t:{};xt(e.headers,function(s,i){r.setRequestHeader(i,s)}),n&&r.setRequestHeader("Content-Type",n),e.timeout&&(r.timeout=e.timeout),e.disableXHRCredentials||(r.withCredentials=!0),r.onreadystatechange=()=>{if(r.readyState===4){var s={statusCode:r.status,text:r.responseText};if(r.status===200)try{s.json=JSON.parse(r.responseText)}catch{}e.callback==null||e.callback(s)}},r.send(o)}}),kr!=null&&kr.sendBeacon&&Vl.push({transport:"sendBeacon",method(e){var t=ed(e.url,{beacon:"1"});try{var r,{contentType:n,body:o}=(r=gp(e))!==null&&r!==void 0?r:{};if(!o)return;var s=o instanceof Blob?o:new Blob([o],{type:n});kr.sendBeacon(t,s)}catch{}}});var Dm=3e3;class N9{constructor(t,r){this.Ar=!0,this.Nr=[],this.$r=yn((r==null?void 0:r.flush_interval_ms)||Dm,250,5e3,De.createLogger("flush interval"),Dm),this.Dr=t}enqueue(t){this.Nr.push(t),this.qr||this.jr()}unload(){this.Hr();var t=this.Nr.length>0?this.Ur():{},r=Object.values(t);[...r.filter(n=>n.url.indexOf("/e")===0),...r.filter(n=>n.url.indexOf("/e")!==0)].map(n=>{this.Dr(Re({},n,{transport:"sendBeacon"}))})}enable(){this.Ar=!1,this.jr()}jr(){var t=this;this.Ar||(this.qr=setTimeout(()=>{if(this.Hr(),this.Nr.length>0){var r=this.Ur(),n=function(){var s=r[o],i=new Date().getTime();s.data&&pt(s.data)&&xt(s.data,l=>{l.offset=Math.abs(l.timestamp-i),delete l.timestamp}),t.Dr(s)};for(var o in r)n()}},this.$r))}Hr(){clearTimeout(this.qr),this.qr=void 0}Ur(){var t={};return xt(this.Nr,r=>{var n,o=r,s=(o?o.batchKey:null)||o.url;Le(t[s])&&(t[s]=Re({},o,{data:[]})),(n=t[s].data)==null||n.push(o.data)}),this.Nr=[],t}}var D9=["retriesPerformedSoFar"];class k9{constructor(t){this.Br=!1,this.zr=3e3,this.Nr=[],this._instance=t,this.Nr=[],this.Vr=!0,!Le(oe)&&"onLine"in oe.navigator&&(this.Vr=oe.navigator.onLine,this.Wr=()=>{this.Vr=!0,this.Zr()},this.Gr=()=>{this.Vr=!1},Lt(oe,"online",this.Wr),Lt(oe,"offline",this.Gr))}get length(){return this.Nr.length}retriableRequest(t){var{retriesPerformedSoFar:r}=t,n=sI(t,D9);vs(r)&&(n.url=ed(n.url,{retry_count:r})),this._instance._send_request(Re({},n,{callback:o=>{o.statusCode===200||o.statusCode>=400&&500>o.statusCode||(r??0)>=10?n.callback==null||n.callback(o):this.Qr(Re({retriesPerformedSoFar:r},n))}}))}Qr(t){var r=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=r+1;var n=function(i){var l=3e3*Math.pow(2,i),u=l/2,d=Math.min(18e5,l),p=Math.random()-.5;return Math.ceil(d+p*(d-u))}(r),o=Date.now()+n;this.Nr.push({retryAt:o,requestOptions:t});var s="Enqueued failed request for retry in "+n;navigator.onLine||(s+=" (Browser is offline)"),De.warn(s),this.Br||(this.Br=!0,this.Jr())}Jr(){if(this.Kr&&clearTimeout(this.Kr),this.Nr.length===0)return this.Br=!1,void(this.Kr=void 0);this.Kr=setTimeout(()=>{this.Vr&&this.Nr.length>0&&this.Zr(),this.Jr()},this.zr)}Zr(){var t=Date.now(),r=[],n=this.Nr.filter(s=>t>s.retryAt||(r.push(s),!1));if(this.Nr=r,n.length>0)for(var{requestOptions:o}of n)this.retriableRequest(o)}unload(){for(var{requestOptions:t}of(this.Kr&&(clearTimeout(this.Kr),this.Kr=void 0),this.Br=!1,Le(oe)||(this.Wr&&(oe.removeEventListener("online",this.Wr),this.Wr=void 0),this.Gr&&(oe.removeEventListener("offline",this.Gr),this.Gr=void 0)),this.Nr))try{this._instance._send_request(Re({},t,{transport:"sendBeacon"}))}catch(r){De.error(r)}this.Nr=[]}}class M9{constructor(t){this.Yr=()=>{var r,n,o,s;this.Xr||(this.Xr={});var i=this.scrollElement(),l=this.scrollY(),u=i?Math.max(0,i.scrollHeight-i.clientHeight):0,d=l+((i==null?void 0:i.clientHeight)||0),p=(i==null?void 0:i.scrollHeight)||0;this.Xr.lastScrollY=Math.ceil(l),this.Xr.maxScrollY=Math.max(l,(r=this.Xr.maxScrollY)!==null&&r!==void 0?r:0),this.Xr.maxScrollHeight=Math.max(u,(n=this.Xr.maxScrollHeight)!==null&&n!==void 0?n:0),this.Xr.lastContentY=d,this.Xr.maxContentY=Math.max(d,(o=this.Xr.maxContentY)!==null&&o!==void 0?o:0),this.Xr.maxContentHeight=Math.max(p,(s=this.Xr.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=t}get ei(){return this._instance.config.scroll_root_selector}getContext(){return this.Xr}resetContext(){var t=this.Xr;return setTimeout(this.Yr,0),t}startMeasuringScrollPosition(){Lt(oe,"scroll",this.Yr,{capture:!0}),Lt(oe,"scrollend",this.Yr,{capture:!0}),Lt(oe,"resize",this.Yr)}scrollElement(){if(!this.ei)return oe==null?void 0:oe.document.documentElement;var t=pt(this.ei)?this.ei:[this.ei];for(var r of t){var n=oe==null?void 0:oe.document.querySelector(r);if(n)return n}}scrollY(){if(this.ei){var t=this.scrollElement();return t&&t.scrollTop||0}return oe&&(oe.scrollY||oe.pageYOffset||oe.document.documentElement.scrollTop)||0}scrollX(){if(this.ei){var t=this.scrollElement();return t&&t.scrollLeft||0}return oe&&(oe.scrollX||oe.pageXOffset||oe.document.documentElement.scrollLeft)||0}}var L9=e=>GI(e==null?void 0:e.config.mask_personal_data_properties,e==null?void 0:e.config.custom_personal_data_properties);class xy{constructor(t,r,n,o){this.ti=s=>{var i=this.ri();if(!i||i.sessionId!==s){var l={sessionId:s,props:this.ii(this._instance)};this.ni.register({[Pm]:l})}},this._instance=t,this.si=r,this.ni=n,this.ii=o||L9,this.si.onSessionId(this.ti)}ri(){return this.ni.props[Pm]}getSetOnceProps(){var t,r=(t=this.ri())==null?void 0:t.props;return r?"r"in r?KI(r):{$referring_domain:r.referringDomain,$pathname:r.initialPathName,utm_source:r.utm_source,utm_campaign:r.utm_campaign,utm_medium:r.utm_medium,utm_content:r.utm_content,utm_term:r.utm_term}:{}}getSessionProps(){var t={};return xt(Gg(this.getSetOnceProps()),(r,n)=>{n==="$current_url"&&(n="url"),t["$session_entry_"+im(n)]=r}),t}}class Yg{constructor(){this.oi={}}on(t,r){return this.oi[t]||(this.oi[t]=[]),this.oi[t].push(r),()=>{this.oi[t]=this.oi[t].filter(n=>n!==r)}}emit(t,r){for(var n of this.oi[t]||[])n(r);for(var o of this.oi["*"]||[])o(t,r)}}var vp=Et("[SessionId]");class wy{on(t,r){return this.ai.on(t,r)}constructor(t,r,n){var o;if(this.ui=[],this.li=void 0,this.ai=new Yg,this.hi=(d,p)=>!(!vs(d)||!vs(p))&&Math.abs(d-p)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode===On)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.qt=t.config,this.ni=t.persistence,this.ci=void 0,this.di=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.vi=r||Yn,this.fi=n||Yn;var s=this.qt.persistence_name||this.qt.token;if(this._sessionTimeoutMs=1e3*yn(this.qt.session_idle_timeout_seconds||1800,60,36e3,vp.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.pi(),this.gi="ph_"+s+"_window_id",this.mi="ph_"+s+"_primary_window_exists",this.yi()){var i=Zt.F(this.gi),l=Zt.F(this.mi);i&&!l?this.ci=i:Zt.q(this.gi),Zt.N(this.mi,!0)}if((o=this.qt.bootstrap)!=null&&o.sessionID)try{var u=(d=>{var p=this.qt.bootstrap.sessionID.replace(/-/g,"");if(p.length!==32)throw new Error("Not a valid UUID");if(p[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(p.substring(0,12),16)})();this.bi(this.qt.bootstrap.sessionID,new Date().getTime(),u)}catch(d){vp.error("Invalid sessionID in bootstrap",d)}this.wi()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return Le(this.ui)&&(this.ui=[]),this.ui.push(t),this.di&&t(this.di,this.ci),()=>{this.ui=this.ui.filter(r=>r!==t)}}yi(){return this.qt.persistence!=="memory"&&!this.ni._r&&Zt.R()}xi(t){t!==this.ci&&(this.ci=t,this.yi()&&Zt.N(this.gi,t))}Si(){return this.ci?this.ci:this.yi()?Zt.F(this.gi):null}bi(t,r,n){t===this.di&&r===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=r,this.di=t,this.ni.register({[Cc]:[r,t,n]}))}ki(){var t=this.ni.props[Cc];return pt(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.bi(null,null,null)}destroy(){clearTimeout(this.Ci),this.Ci=void 0,this.li&&oe&&(oe.removeEventListener($c,this.li,{capture:!1}),this.li=void 0),this.ui=[]}wi(){this.li=()=>{this.yi()&&Zt.q(this.mi)},Lt(oe,$c,this.li,{capture:!1})}checkAndGetSessionAndWindowId(t,r){if(t===void 0&&(t=!1),r===void 0&&(r=null),this.qt.cookieless_mode===On)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var n=r||new Date().getTime(),[o,s,i]=this.ki(),l=this.Si(),u=vs(i)&&Math.abs(n-i)>864e5,d=!1,p=!s,f=!p&&!t&&this.hi(n,o);p||f||u?(s=this.vi(),l=this.fi(),vp.info("new session ID generated",{sessionId:s,windowId:l,changeReason:{noSessionId:p,activityTimeout:f,sessionPastMaximumLength:u}}),i=n,d=!0):l||(l=this.fi(),d=!0);var m=vs(o)&&t&&!u?o:n,h=vs(i)?i:new Date().getTime();return this.xi(l),this.bi(s,m,h),t||this.pi(),d&&this.ui.forEach(v=>v(s,l,d?{noSessionId:p,activityTimeout:f,sessionPastMaximumLength:u}:void 0)),{sessionId:s,windowId:l,sessionStartTimestamp:h,changeReason:d?{noSessionId:p,activityTimeout:f,sessionPastMaximumLength:u}:void 0,lastActivityTimestamp:o}}pi(){clearTimeout(this.Ci),this.Ci=setTimeout(()=>{var[t]=this.ki();if(this.hi(new Date().getTime(),t)){var r=this.di;this.resetSessionId(),this.ai.emit("forcedIdleReset",{idleSessionId:r})}},1.1*this.sessionTimeoutMs)}}var o$=function(e,t){if(!e)return!1;var r=e.userAgent;if(r&&ty(r,t))return!0;try{var n=e==null?void 0:e.userAgentData;if(n!=null&&n.brands&&n.brands.some(o=>ty(o==null?void 0:o.brand,t)))return!0}catch{}return!!e.webdriver},Lc=function(e,t){if(!function(r){try{new RegExp(r)}catch{return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function Ey(e,t,r){return Ts({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:r})}var s$={exact:(e,t)=>t.some(r=>e.some(n=>r===n)),is_not:(e,t)=>t.every(r=>e.every(n=>r!==n)),regex:(e,t)=>t.some(r=>e.some(n=>Lc(r,n))),not_regex:(e,t)=>t.every(r=>e.every(n=>!Lc(r,n))),icontains:(e,t)=>t.map(bl).some(r=>e.map(bl).some(n=>r.includes(n))),not_icontains:(e,t)=>t.map(bl).every(r=>e.map(bl).every(n=>!r.includes(n))),gt:(e,t)=>t.some(r=>{var n=parseFloat(r);return!isNaN(n)&&e.some(o=>n>parseFloat(o))}),lt:(e,t)=>t.some(r=>{var n=parseFloat(r);return!isNaN(n)&&e.some(o=>n<parseFloat(o))})},bl=e=>e.toLowerCase();function i$(e,t){return!e||Object.entries(e).every(r=>{var[n,o]=r,s=t==null?void 0:t[n];if(Le(s)||zn(s))return!1;var i=[String(s)],l=s$[o.operator];return!!l&&l(o.values,i)})}var km="custom",Sy="i.posthog.com",z9=/^\/static\//;class F9{constructor(t){this.Ii={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get flagsApiHost(){var t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t,r=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return r||(r=this.apiHost.replace("."+Sy,".posthog.com")),r==="https://app.posthog.com"?"https://us.posthog.com":r}get region(){return this.Ii[this.apiHost]||(this.Ii[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":km),this.Ii[this.apiHost]}Ti(t){var r=this.instance.config.__preview_external_dependency_versioned_paths;if(typeof r=="string"&&z9.test(t))return r.trim().replace(/\/$/,"")||void 0}endpointFor(t,r){if(r===void 0&&(r=""),r&&(r=r[0]==="/"?r:"/"+r),t==="ui")return this.uiHost+r;if(t==="flags")return this.flagsApiHost+r;if(t==="assets"){var n=this.Ti(r);if(n)return""+n+r}if(this.region===km)return this.apiHost+r;var o=Sy+r;switch(t){case"assets":return"https://"+this.region+"-assets."+o;case"api":return"https://"+this.region+"."+o}}}var gt=Et("[Surveys]"),Mm="seenSurvey_",V9=[zl.Popover,zl.Widget,zl.API],B9={ignoreConditions:!1,ignoreDelay:!1,displayType:kc.Popover},H9=Et("[PostHog ExternalIntegrations]"),U9={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class W9{constructor(t){this._instance=t}lr(t,r){var n;(n=Je.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,t,o=>{if(o)return H9.error("failed to load script",o);r()})}startIfEnabledOrStop(){var t=this,r=function(i){var l,u,d;!o||(l=Je.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[i]||t.lr(U9[i],()=>{var p;(p=Je.__PosthogExtensions__)==null||(p=p.integrations)==null||(p=p[i])==null||p.start(t._instance)}),!o&&(u=Je.__PosthogExtensions__)!=null&&(u=u.integrations)!=null&&u[i]&&((d=Je.__PosthogExtensions__)==null||(d=d.integrations)==null||(d=d[i])==null||d.stop())};for(var[n,o]of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;r(n)}}}var fs,Zi={},bp=0,Lm=()=>{},Cy='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',Ri="Surveys module not available",Py="sanitize_properties is deprecated. Use before_send instead",a$="Invalid value for property_denylist config: ",xs="posthog",l$=!j9&&(wr==null?void 0:wr.indexOf("MSIE"))===-1&&(wr==null?void 0:wr.indexOf("Mozilla"))===-1,Ry=e=>{var t;return Re({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:c9(Oe==null?void 0:Oe.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:Lm,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:e??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,debug:Jt&&Tt(Jt==null?void 0:Jt.search)&&Jt.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(oe==null||(t=oe.location)==null?void 0:t.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(r){De.error("Bad HTTP status: "+r.statusCode+" "+r.text)},get_device_id:r=>r,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:$m,before_send:void 0,request_queue_config:{flush_interval_ms:Dm},error_tracking:{},_onCapture:Lm,__preview_eager_load_replay:!1},(r=>({rageclick:!r||"2025-11-30">r||{content_ignorelist:!0},capture_pageview:!r||"2025-05-24">r||"history_change",session_recording:r&&r>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:r&&r>="2026-01-30"?"head":"body",internal_or_test_user_hostname:r&&r>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(e))},q9=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],Ty=e=>{var t={};for(var[r,n]of q9)Le(e[r])||(t[n]=e[r]);var o=$t({},t,e);return pt(e.property_blacklist)&&(Le(e.property_denylist)?o.property_denylist=e.property_blacklist:pt(e.property_denylist)?o.property_denylist=[...e.property_blacklist,...e.property_denylist]:De.error(a$+e.property_denylist)),o};class G9{constructor(){this.__forceAllowLocalhost=!1}get Ei(){return this.__forceAllowLocalhost}set Ei(t){De.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class Dr{Mi(t,r){if(t){var n=this.Pi.indexOf(t);n!==-1&&this.Pi.splice(n,1)}return this.Pi.push(r),r.initialize==null||r.initialize(),r}Ri(){return this.config.cookieless_mode===On||this.config.cookieless_mode===wo&&this.consent.isRejected()}get decideEndpointWasHit(){var t,r;return(t=(r=this.featureFlags)==null?void 0:r.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,r;return(t=(r=this.featureFlags)==null?void 0:r.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){var t;this.webPerformance=new G9,this.Oi=!1,this.version=mr.LIB_VERSION,this.Li=new Yg,this.Pi=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Ry(),this.SentryIntegration=_9,this.sentryIntegration=n=>function(o,s){var i=BI(o,s);return{name:VI,processEvent:l=>i(l)}}(this,n),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Fi=!1,this.Ai=null,this.Ni=null,this.$i=null,this.scrollManager=new M9(this),this.pageViewManager=new py(this),this.rateLimiter=new P9(this),this.requestRouter=new F9(this),this.consent=new g9(this),this.externalIntegrations=new W9(this);var r=(t=Dr.__defaultExtensionClasses)!==null&&t!==void 0?t:{};this.featureFlags=r.featureFlags&&new r.featureFlags(this),this.toolbar=r.toolbar&&new r.toolbar(this),this.surveys=r.surveys&&new r.surveys(this),this.conversations=r.conversations&&new r.conversations(this),this.logs=r.logs&&new r.logs(this),this.experiments=r.experiments&&new r.experiments(this),this.exceptions=r.exceptions&&new r.exceptions(this),this.people={set:(n,o,s)=>{var i=Tt(n)?{[n]:o}:n;this.setPersonProperties(i),s==null||s({})},set_once:(n,o,s)=>{var i=Tt(n)?{[n]:o}:n;this.setPersonProperties(void 0,i),s==null||s({})}},this.on("eventCaptured",n=>De.info('send "'+(n==null?void 0:n.event)+'"',n))}init(t,r,n){if(n&&n!==xs){var o,s=(o=Zi[n])!==null&&o!==void 0?o:new Dr;return s._init(t,r,n),Zi[n]=s,Zi[xs][n]=s,s}return this._init(t,r,n)}_init(t,r,n){var o,s;if(r===void 0&&(r={}),Le(t)||Dl(t))return De.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},r.debug=this.Di(r.debug),this.qi=r,this.ji=[],r.person_profiles?this.Ni=r.person_profiles:r.process_person&&(this.Ni=r.process_person),this.set_config($t({},Ry(r.defaults),Ty(r),{name:n,token:t})),this.config.on_xhr_error&&De.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=r.disable_compression?void 0:rn.GZipJS;var i=this.Hi();this.persistence=new fp(this.config,i),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new fp(Re({},this.config,{persistence:"sessionStorage"}),i);var l=Re({},this.persistence.props),u=Re({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Ui=new N9(b=>this.Bi(b),this.config.request_queue_config),this.zi=new k9(this),this.__request_queue=[];var d=this.Ri();if(d||(this.sessionManager=new wy(this),this.sessionPropsManager=new xy(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(De.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.Vi(d)},0)):(De.info("Initializing extensions synchronously"),this.Vi(d)),mr.DEBUG=mr.DEBUG||this.config.debug,mr.DEBUG&&De.info("Starting in debug mode",{this:this,config:r,thisC:Re({},this.config),p:l,s:u}),!this.config.identity_distinct_id||(o=r.bootstrap)!=null&&o.distinctID||(r.bootstrap=Re({},r.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((s=r.bootstrap)==null?void 0:s.distinctID)!==void 0){var p=r.bootstrap.distinctID,f=this.get_distinct_id(),m=this.persistence.get_property(tn);if(r.bootstrap.isIdentifiedID&&f!=null&&f!==p&&m===us)this.identify(p);else if(r.bootstrap.isIdentifiedID&&f!=null&&f!==p&&m===ds)De.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var h=this.config.get_device_id(Yn()),v=r.bootstrap.isIdentifiedID?h:p;this.persistence.set_property(tn,r.bootstrap.isIdentifiedID?ds:us),this.register({distinct_id:p,$device_id:v})}}if(d)this.register_once({distinct_id:fl,$device_id:null},"");else if(!this.get_distinct_id()){var g=this.config.get_device_id(Yn());this.register_once({distinct_id:g,$device_id:g},""),this.persistence.set_property(tn,us)}return Lt(oe,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),r.segment?function(b,_){var y=b.config.segment;if(!y)return _();(function(x,S){var w=x.config.segment;if(!w)return S();var I=R=>{var P=()=>R.anonymousId()||Yn();x.config.get_device_id=P,R.id()&&(x.register({distinct_id:R.id(),$device_id:P()}),x.persistence.set_property(tn,ds)),S()},T=w.user();"then"in T&&An(T.then)?T.then(I):I(T)})(b,()=>{y.register((x=>{Promise&&Promise.resolve||pp.warn("This browser does not have Promise support, and can not use the segment integration");var S=(w,I)=>{if(!I)return w;w.event.userId||w.event.anonymousId===x.get_distinct_id()||(pp.info("No userId set, resetting PostHog"),x.reset()),w.event.userId&&w.event.userId!==x.get_distinct_id()&&(pp.info("UserId set, identifying with PostHog"),x.identify(w.event.userId));var T=x.calculateEventProperties(I,w.event.properties);return w.event.properties=Object.assign({},T,w.event.properties),w};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:w=>S(w,w.event.event),page:w=>S(w,_s),identify:w=>S(w,up),screen:w=>S(w,"$screen")}})(b)).then(()=>{_()})})}(this,()=>this.Wi()):this.Wi(),An(this.config._onCapture)&&this.config._onCapture!==Lm&&(De.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",b=>this.config._onCapture(b.event,b))),this.config.ip&&De.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Vi(t){var r,n,o,s,i,l,u,d=performance.now(),p=Re({},Dr.__defaultExtensionClasses,this.config.__extensionClasses),f=[];p.featureFlags&&this.Pi.push(this.featureFlags=(r=this.featureFlags)!==null&&r!==void 0?r:new p.featureFlags(this)),p.exceptions&&this.Pi.push(this.exceptions=(n=this.exceptions)!==null&&n!==void 0?n:new p.exceptions(this)),p.historyAutocapture&&this.Pi.push(this.historyAutocapture=new p.historyAutocapture(this)),p.tracingHeaders&&this.Pi.push(new p.tracingHeaders(this)),p.siteApps&&this.Pi.push(this.siteApps=new p.siteApps(this)),p.sessionRecording&&!t&&this.Pi.push(this.sessionRecording=new p.sessionRecording(this)),this.config.disable_scroll_properties||f.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),p.autocapture&&this.Pi.push(this.autocapture=new p.autocapture(this)),p.surveys&&this.Pi.push(this.surveys=(o=this.surveys)!==null&&o!==void 0?o:new p.surveys(this)),p.logs&&this.Pi.push(this.logs=(s=this.logs)!==null&&s!==void 0?s:new p.logs(this)),p.conversations&&this.Pi.push(this.conversations=(i=this.conversations)!==null&&i!==void 0?i:new p.conversations(this)),p.productTours&&this.Pi.push(this.productTours=new p.productTours(this)),p.heatmaps&&this.Pi.push(this.heatmaps=new p.heatmaps(this)),p.webVitalsAutocapture&&this.Pi.push(this.webVitalsAutocapture=new p.webVitalsAutocapture(this)),p.exceptionObserver&&this.Pi.push(this.exceptionObserver=new p.exceptionObserver(this)),p.deadClicksAutocapture&&this.Pi.push(this.deadClicksAutocapture=new p.deadClicksAutocapture(this,b9)),p.toolbar&&this.Pi.push(this.toolbar=(l=this.toolbar)!==null&&l!==void 0?l:new p.toolbar(this)),p.experiments&&this.Pi.push(this.experiments=(u=this.experiments)!==null&&u!==void 0?u:new p.experiments(this)),this.Pi.forEach(m=>{m.initialize&&f.push(()=>{m.initialize==null||m.initialize()})}),f.push(()=>{if(this.Zi){var m=this.Zi;this.Zi=void 0,this.Rr(m)}}),this.Gi(f,d)}Gi(t,r){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-r>=30&&t.length>0)return void setTimeout(()=>{this.Gi(t,r)},0);var n=t.shift();if(n)try{n()}catch(s){De.error("Error initializing extension:",s)}}var o=Math.round(performance.now()-r);this.register_for_session({[kI]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[MI]:o}),this.config.__preview_deferred_init_extensions&&De.info("PostHog extensions initialized ("+o+"ms)")}Rr(t){var r;if(!Oe||!Oe.body)return De.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.Rr(t)},500);this.config.__preview_deferred_init_extensions&&(this.Zi=t),this.Qi=t,this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=it(t.supportedCompression,rn.GZipJS)?rn.GZipJS:it(t.supportedCompression,rn.Base64)?rn.Base64:void 0),(r=t.analytics)!=null&&r.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.Ni?this.Ni:$m}),this.Pi.forEach(n=>n.onRemoteConfig==null?void 0:n.onRemoteConfig(t))}Wi(){try{this.config.loaded(this)}catch(n){De.critical("`loaded` function failed",n)}if(this.Ji(),this.config.internal_or_test_user_hostname&&Jt!=null&&Jt.hostname){var t=Jt.hostname,r=this.config.internal_or_test_user_hostname;(typeof r=="string"?t===r:r.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.Ri())&&this.Ki()},1),this.Yi=new JI(this),this.Yi.load()}Ji(){var t;this.is_capturing()&&this.config.request_batching&&((t=this.Ui)==null||t.enable())}_dom_loaded(){this.is_capturing()&&ml(this.__request_queue,t=>this.Bi(t)),this.__request_queue=[],this.Ji()}_handle_unload(){var t,r,n,o;(t=this.surveys)==null||t.handlePageUnload(),this.config.request_batching?(this.Xi()&&this.capture(cp),(r=this.logs)==null||r.flushLogs("sendBeacon"),(n=this.Ui)==null||n.unload(),(o=this.zi)==null||o.unload()):this.Xi()&&this.capture(cp,null,{transport:"sendBeacon"})}_send_request(t){this.__loaded&&(l$?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.url=ed(t.url,{ip:this.config.ip?1:0}),t.headers=Re({},this.config.request_headers,t.headers),t.compression=t.compression==="best-available"?this.compression:t.compression,t.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(t.disableTransport=["sendBeacon"]),t.fetchOptions=t.fetchOptions||this.config.fetch_options,(r=>{var n,o,s,i=Re({},r);i.timeout=i.timeout||6e4,i.url=yy(i.url,i.compression);var l=(n=i.transport)!==null&&n!==void 0?n:"fetch",u=Vl.filter(p=>!i.disableTransport||!p.transport||!i.disableTransport.includes(p.transport)),d=(o=(s=function(p,f){for(var m=0;p.length>m;m++)if(p[m].transport===l)return p[m]}(u))==null?void 0:s.method)!==null&&o!==void 0?o:u[0].method;if(!d)throw new Error("No available transport method");l!=="sendBeacon"&&i.data&&i.compression===rn.GZipJS&&_G&&!_y?O9(i).then(p=>{d(p)}).catch(p=>{if((f=>!(!f||typeof f!="object")&&("name"in f?String(f.name):"")==="NotReadableError")(p))return _y=!0,void d(Re({},i,{compression:void 0,url:yy(r.url,void 0)}));d(i)}):d(i)})(Re({},t,{callback:r=>{var n,o;this.rateLimiter.checkForLimiting(r),400>r.statusCode||(n=(o=this.config).on_request_error)==null||n.call(o,r),t.callback==null||t.callback(r)}}))))}Bi(t){this.zi?this.zi.retriableRequest(t):this._send_request(t)}_execute_array(t){bp++;try{var r,n=[],o=[],s=[];ml(t,l=>{l&&(pt(r=l[0])?s.push(l):An(l)?l.call(this):pt(l)&&r==="alias"?n.push(l):pt(l)&&r.indexOf("capture")!==-1&&An(this[r])?s.push(l):o.push(l))});var i=function(l,u){ml(l,function(d){if(pt(d[0])){var p=u;xt(d,function(f){p=p[f[0]].apply(p,f.slice(1))})}else u[d[0]].apply(u,d.slice(1))})};i(n,this),i(o,this),i(s,this)}finally{bp--}}push(t){if(bp>0&&pt(t)&&Tt(t[0])){var r=Dr.prototype[t[0]];An(r)&&r.apply(this,t.slice(1))}else this._execute_array([t])}capture(t,r,n){var o,s,i,l,u;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Ui){if(this.is_capturing())if(!Le(t)&&Tt(t)){var d=!this.config.opt_out_useragent_filter&&this._is_bot();if(!d||this.config.__preview_capture_bot_pageviews){var p=n!=null&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(p==null||!p.isRateLimited){r!=null&&r.$current_url&&!Tt(r==null?void 0:r.$current_url)&&(De.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),r==null||delete r.$current_url),t!=="$exception"||n!=null&&n.en||De.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var f=new Date,m=(n==null?void 0:n.timestamp)||f,h=Yn(),v={uuid:h,event:t,properties:this.calculateEventProperties(t,r||{},m,h)};t===_s&&this.config.__preview_capture_bot_pageviews&&d&&(v.event="$bot_pageview",v.properties.$browser_type="bot"),p&&(v.properties.$lib_rate_limit_remaining_tokens=p.remainingTokens),n!=null&&n.$set&&(v.$set=n==null?void 0:n.$set);var g,b,_,y=this.tn(n==null?void 0:n.$set_once,t!==ly,t===up);if(y&&(v.$set_once=y),n!=null&&n._noTruncate||(s=this.config.properties_string_max_length,i=v,l=P=>Tt(P)?P.slice(0,s):P,u=new Set,v=function P($,A){return $!==Object($)?l?l($):$:u.has($)?void 0:(u.add($),pt($)?(k=[],ml($,D=>{k.push(P(D))})):(k={},xt($,(D,z)=>{u.has(D)||(k[z]=P(D))})),k);var k}(i)),v.timestamp=m,Le(n==null?void 0:n.timestamp)||(v.properties.$event_time_override_provided=!0,v.properties.$event_time_override_system_time=f),t===Rs.DISMISSED||t===Rs.SENT){var x=r==null?void 0:r[Fl.SURVEY_ID],S=r==null?void 0:r[Fl.SURVEY_ITERATION];(P=>{try{var $=(A=>((k,D)=>{var z=""+Mm+D.id;return D.current_iteration&&D.current_iteration>0&&(z=""+Mm+D.id+"_"+D.current_iteration),z})(0,A))(P);if(localStorage.getItem($))return;localStorage.setItem($,"true")}catch(A){gt.error("Failed to persist survey seen state",A)}})({id:x,current_iteration:S}),v.$set=Re({},v.$set,{[(g={id:x,current_iteration:S},b=t===Rs.SENT?"responded":"dismissed",_="$survey_"+b+"/"+g.id,g.current_iteration&&g.current_iteration>0&&(_="$survey_"+b+"/"+g.id+"/"+g.current_iteration),_)]:!0})}else t===Rs.SHOWN&&(v.$set=Re({},v.$set,{[Fl.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(t===YI.SHOWN){var w=r==null?void 0:r[Am.TOUR_TYPE];w&&(v.$set=Re({},v.$set,{[Am.TOUR_LAST_SEEN_DATE+"/"+w]:new Date().toISOString()}))}var I=Re({},v.properties.$set,v.$set);if(Cs(I)||this.setPersonPropertiesForFlags(I),!at(this.config.before_send)){var T=this.rn(v);if(!T)return;v=T}this.Li.emit("eventCaptured",v);var R={method:"POST",url:(o=n==null?void 0:n._url)!==null&&o!==void 0?o:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:v,compression:"best-available",batchKey:n==null?void 0:n._batchKey};return!this.config.request_batching||n&&(n==null||!n._batchKey)||n!=null&&n.send_instantly?this.Bi(R):this.Ui.enqueue(R),v}De.critical("This capture call is ignored due to client rate limiting.")}}else De.error("No event name provided to posthog.capture")}else De.uninitializedWarning("posthog.capture")}_addCaptureHook(t){return this.on("eventCaptured",r=>t(r.event,r))}calculateEventProperties(t,r,n,o,s){if(n=n||new Date,!this.persistence||!this.sessionPersistence)return r;var i=s?void 0:this.persistence.remove_event_timer(t),l=Re({},r);if(l.token=this.config.token,l.$config_defaults=this.config.defaults,this.Ri()&&(l.$cookieless_mode=!0),t==="$snapshot"){var u=Re({},this.persistence.properties(),this.sessionPersistence.properties());return l.distinct_id=u.distinct_id,(!Tt(l.distinct_id)&&!Kr(l.distinct_id)||Dl(l.distinct_id))&&De.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),l}var d,p=function(_,y){var x,S,w,I;if(!wr)return{};var T,R,P,$,A,k,D,z,X=_?[...Zs,...y||[]]:[],[V,Y]=function(U){for(var F=0;oy.length>F;F++){var[H,ee]=oy[F],O=H.exec(U),M=O&&(An(ee)?ee(O,U):ee);if(M)return M}return["",""]}(wr);return $t(Gg({$os:V,$os_version:Y,$browser:SI(wr,navigator.vendor),$device:sy(wr),$device_type:(R=wr,P={userAgentDataPlatform:(x=navigator)==null||(x=x.userAgentData)==null?void 0:x.platform,maxTouchPoints:(S=navigator)==null?void 0:S.maxTouchPoints,screenWidth:oe==null||(w=oe.screen)==null?void 0:w.width,screenHeight:oe==null||(I=oe.screen)==null?void 0:I.height,devicePixelRatio:oe==null?void 0:oe.devicePixelRatio},z=sy(R),z===uI||z===cI||z==="Kobo"||z==="Kindle Fire"||z===EI?Xs:z===da||z===Ms||z===pa||z===lm?"Console":z===pI?"Wearable":z?Mr:(P==null?void 0:P.userAgentDataPlatform)==="Android"&&(($=P==null?void 0:P.maxTouchPoints)!==null&&$!==void 0?$:0)>0?600>Math.min((A=P==null?void 0:P.screenWidth)!==null&&A!==void 0?A:0,(k=P==null?void 0:P.screenHeight)!==null&&k!==void 0?k:0)/((D=P==null?void 0:P.devicePixelRatio)!==null&&D!==void 0?D:1)?Mr:Xs:"Desktop"),$timezone:XI(),$timezone_offset:S9()}),{$current_url:fa(Jt==null?void 0:Jt.href,X,ma),$host:Jt==null?void 0:Jt.host,$pathname:Jt==null?void 0:Jt.pathname,$raw_user_agent:wr.length>1e3?wr.substring(0,997)+"...":wr,$browser_version:DG(wr,navigator.vendor),$browser_language:fy(),$browser_language_prefix:(T=fy(),typeof T=="string"?T.split("-")[0]:void 0),$screen_height:oe==null?void 0:oe.screen.height,$screen_width:oe==null?void 0:oe.screen.width,$viewport_height:oe==null?void 0:oe.innerHeight,$viewport_width:oe==null?void 0:oe.innerWidth,$lib:mr.LIB_NAME,$lib_version:mr.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:f,windowId:m}=this.sessionManager.checkAndGetSessionAndWindowId(s,n.getTime());l.$session_id=f,l.$window_id=m}this.sessionPropsManager&&$t(l,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&$t(l,this.sessionRecording.sdkDebugProperties),l.$sdk_debug_retry_queue_size=(h=this.zi)==null?void 0:h.length}catch(_){l.$sdk_debug_error_capturing_properties=String(_)}if(this.requestRouter.region===km&&(l.$lib_custom_api_host=this.config.api_host),d=t!==_s||s?t!==cp||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,o),l=$t(l,d),t===_s&&Oe&&(l.title=Oe.title),!Le(i)){var v=n.getTime()-i;l.$duration=parseFloat((v/1e3).toFixed(3))}wr&&this.config.opt_out_useragent_filter&&(l.$browser_type=this._is_bot()?"bot":"browser"),(l=$t({},p,this.persistence.properties(),this.sessionPersistence.properties(),l)).$is_identified=this._isIdentified(),pt(this.config.property_denylist)?xt(this.config.property_denylist,function(_){delete l[_]}):De.error(a$+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var g=this.config.sanitize_properties;g&&(De.error(Py),l=g(l,t));var b=this.nn();return l.$process_person_profile=b,b&&!s&&this.sn("_calculate_event_properties"),l}tn(t,r,n){var o;if(r===void 0&&(r=!0),n===void 0&&(n=!1),!this.persistence||!this.nn()||this.Oi&&!n)return t;var s=this.persistence.get_initial_props(),i=(o=this.sessionPropsManager)==null?void 0:o.getSetOnceProps(),l=$t({},s,i||{},t||{}),u=this.config.sanitize_properties;return u&&(De.error(Py),l=u(l,"$set_once")),r&&(this.Oi=!0),Cs(l)?void 0:l}register(t,r){var n;(n=this.persistence)==null||n.register(t,r)}register_once(t,r,n){var o;(o=this.persistence)==null||o.register_once(t,r,n)}register_for_session(t){var r;(r=this.sessionPersistence)==null||r.register(t)}unregister(t){var r;(r=this.persistence)==null||r.unregister(t)}unregister_for_session(t){var r;(r=this.sessionPersistence)==null||r.unregister(t)}an(t,r){this.register({[t]:r})}getFeatureFlag(t,r){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlag(t,r)}getFeatureFlagPayload(t){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlagPayload(t)}getFeatureFlagResult(t,r){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagResult(t,r)}isFeatureEnabled(t,r){var n;return(n=this.featureFlags)==null?void 0:n.isFeatureEnabled(t,r)}reloadFeatureFlags(){var t;(t=this.featureFlags)==null||t.reloadFeatureFlags()}updateFlags(t,r,n){var o;(o=this.featureFlags)==null||o.updateFlags(t,r,n)}updateEarlyAccessFeatureEnrollment(t,r,n){var o;(o=this.featureFlags)==null||o.updateEarlyAccessFeatureEnrollment(t,r,n)}getEarlyAccessFeatures(t,r,n){var o;return r===void 0&&(r=!1),(o=this.featureFlags)==null?void 0:o.getEarlyAccessFeatures(t,r,n)}on(t,r){return this.Li.on(t,r)}onFeatureFlags(t){return this.featureFlags?this.featureFlags.onFeatureFlags(t):(t([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(t){return this.surveys?this.surveys.onSurveysLoaded(t):(t([],{isLoaded:!1,error:Ri}),()=>{})}onSessionId(t){var r,n;return(r=(n=this.sessionManager)==null?void 0:n.onSessionId(t))!==null&&r!==void 0?r:()=>{}}getSurveys(t,r){r===void 0&&(r=!1),this.surveys?this.surveys.getSurveys(t,r):t([],{isLoaded:!1,error:Ri})}getActiveMatchingSurveys(t,r){r===void 0&&(r=!1),this.surveys?this.surveys.getActiveMatchingSurveys(t,r):t([],{isLoaded:!1,error:Ri})}renderSurvey(t,r){var n;(n=this.surveys)==null||n.renderSurvey(t,r)}displaySurvey(t,r){var n;r===void 0&&(r=B9),(n=this.surveys)==null||n.displaySurvey(t,r)}cancelPendingSurvey(t){var r;(r=this.surveys)==null||r.cancelPendingSurvey(t)}canRenderSurvey(t){var r,n;return(r=(n=this.surveys)==null?void 0:n.canRenderSurvey(t))!==null&&r!==void 0?r:{visible:!1,disabledReason:Ri}}canRenderSurveyAsync(t,r){var n,o;return r===void 0&&(r=!1),(n=(o=this.surveys)==null?void 0:o.canRenderSurveyAsync(t,r))!==null&&n!==void 0?n:Promise.resolve({visible:!1,disabledReason:Ri})}un(t){return!t||Dl(t)?(De.critical("Unique user id has not been set in posthog.identify"),!1):t===fl?(De.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(t.toLowerCase())&&!["undefined","null"].includes(t.toLowerCase())||(De.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(t,r,n){if(!this.__loaded||!this.persistence)return De.uninitializedWarning("posthog.identify");if(Kr(t)&&(t=t.toString(),De.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.un(t)&&this.sn("posthog.identify")){var o=this.get_distinct_id();this.register({$user_id:t}),this.get_property(Sc)||this.register_once({$had_persisted_distinct_id:!0,$device_id:o},""),t!==o&&t!==this.get_property(Li)&&(this.unregister(Li),this.register({distinct_id:t}));var s,i=(this.persistence.get_property(tn)||us)===us;t!==o&&i?(this.persistence.set_property(tn,ds),this.setPersonPropertiesForFlags({$set:r||{},$set_once:n||{}},!1),this.capture(up,{distinct_id:t,$anon_distinct_id:o},{$set:r||{},$set_once:n||{}}),this.$i=Ey(t,r,n),(s=this.featureFlags)==null||s.setAnonymousDistinctId(o)):(r||n)&&this.setPersonProperties(r,n),t!==o&&(this.reloadFeatureFlags(),this.unregister(Yi))}}setPersonProperties(t,r){if((t||r)&&this.sn("posthog.setPersonProperties")){var n=Ey(this.get_distinct_id(),t,r);this.$i!==n?(this.setPersonPropertiesForFlags({$set:t||{},$set_once:r||{}},!0),this.capture("$set",{$set:t||{},$set_once:r||{}}),this.$i=n):De.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(t,r,n){if(t&&r){var o=this.getGroups(),s=o[t]!==r;if(s&&this.resetGroupPropertiesForFlags(t),this.register({$groups:Re({},o,{[t]:r})}),s||n){var i={$group_type:t,$group_key:r};n&&(i.$group_set=n),this.capture(ly,i)}n&&this.setGroupPropertiesForFlags({[t]:n}),s&&!n&&this.reloadFeatureFlags()}else De.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,r){var n;r===void 0&&(r=!0),(n=this.featureFlags)==null||n.setPersonPropertiesForFlags(t,r)}resetPersonPropertiesForFlags(){var t;(t=this.featureFlags)==null||t.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(t,r){var n;r===void 0&&(r=!0),this.sn("posthog.setGroupPropertiesForFlags")&&((n=this.featureFlags)==null||n.setGroupPropertiesForFlags(t,r))}resetGroupPropertiesForFlags(t){var r;(r=this.featureFlags)==null||r.resetGroupPropertiesForFlags(t)}reset(t){var r,n,o,s,i,l,u,d;if(De.info("reset"),!this.__loaded)return De.uninitializedWarning("posthog.reset");var p=this.get_property(Sc);if(this.consent.reset(),(r=this.persistence)==null||r.clear(),(n=this.sessionPersistence)==null||n.clear(),(o=this.surveys)==null||o.reset(),(s=this.Yi)==null||s.stop(),(i=this.featureFlags)==null||i.reset(),(l=this.conversations)==null||l.reset(),(u=this.persistence)==null||u.set_property(tn,us),(d=this.sessionManager)==null||d.resetSessionId(),this.$i=null,this.config.cookieless_mode===On)this.register_once({distinct_id:fl,$device_id:null},"");else{var f=this.config.get_device_id(Yn());this.register_once({distinct_id:f,$device_id:t?f:p},"")}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(t,r){var n;this.config.identity_distinct_id=t,this.config.identity_hash=r,this.alias(t),(n=this.conversations)==null||n.ln()}clearIdentity(){var t;delete this.config.identity_distinct_id,delete this.config.identity_hash,(t=this.conversations)==null||t.hn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,r;return(t=(r=this.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var{sessionId:r,sessionStartTimestamp:n}=this.sessionManager.checkAndGetSessionAndWindowId(!0),o=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+r);if(t!=null&&t.withTimestamp&&n){var s,i=(s=t.timestampLookBack)!==null&&s!==void 0?s:10;if(!n)return o;o+="?t="+Math.max(Math.floor((new Date().getTime()-n)/1e3)-i,0)}return o}alias(t,r){return t===this.get_property($I)?(De.critical("Attempting to create alias for existing People user - aborting."),-2):this.sn("posthog.alias")?(Le(r)&&(r=this.get_distinct_id()),t!==r?(this.an(Li,t),this.capture("$create_alias",{alias:t,distinct_id:r})):(De.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var r=Re({},this.config);if(Nt(t)){var n,o,s,i,l,u,d,p,f,m;$t(this.config,Ty(t));var h=this.Hi();(n=this.persistence)==null||n.update_config(this.config,r,h),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new fp(Re({},this.config,{persistence:"sessionStorage"}),h);var v=this.Di(this.config.debug);_n(v)&&(this.config.debug=v),_n(this.config.debug)&&(this.config.debug?(mr.DEBUG=!0,Rt.R()&&Rt.N("ph_debug",!0),De.info("set_config",{config:t,oldConfig:r,newConfig:Re({},this.config)})):(mr.DEBUG=!1,Rt.R()&&Rt.q("ph_debug"))),(o=this.exceptionObserver)==null||o.onConfigChange(),(s=this.exceptions)==null||s.onConfigChange(),(i=this.sessionRecording)==null||i.startIfEnabledOrStop(),(l=this.autocapture)==null||l.startIfEnabled(),(u=this.heatmaps)==null||u.startIfEnabled(),(d=this.exceptionObserver)==null||d.startIfEnabledOrStop(),(p=this.deadClicksAutocapture)==null||p.startIfEnabledOrStop(),(f=this.surveys)==null||f.loadIfEnabled(),this.cn(),(m=this.externalIntegrations)==null||m.startIfEnabledOrStop()}}_overrideSDKInfo(t,r){mr.LIB_NAME=t,mr.LIB_VERSION=r}startSessionRecording(t){var r,n,o,s,i,l=t===!0,u={sampling:l||!(t==null||!t.sampling),linked_flag:l||!(t==null||!t.linked_flag),url_trigger:l||!(t==null||!t.url_trigger),event_trigger:l||!(t==null||!t.event_trigger)};Object.values(u).some(Boolean)&&((r=this.sessionManager)==null||r.checkAndGetSessionAndWindowId(),u.sampling&&((n=this.sessionRecording)==null||n.overrideSampling()),u.linked_flag&&((o=this.sessionRecording)==null||o.overrideLinkedFlag()),u.url_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger("url")),u.event_trigger&&((i=this.sessionRecording)==null||i.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,r){if(this.exceptions){var n=new Error("PostHog syntheticException"),o=this.exceptions.buildProperties(t,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(Re({},o,r))}}addExceptionStep(t,r){var n;(n=this.exceptions)==null||n.addExceptionStep(t,r)}captureLog(t){var r;(r=this.logs)==null||r.captureLog(t)}get logger(){var t,r;return(t=(r=this.logs)==null?void 0:r.logger)!==null&&t!==void 0?t:Dr.dn}startExceptionAutocapture(t){this.set_config({capture_exceptions:t==null||t})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(t){var r,n;return(r=(n=this.toolbar)==null?void 0:n.loadToolbar(t))!==null&&r!==void 0&&r}get_property(t){var r;return(r=this.persistence)==null?void 0:r.props[t]}getSessionProperty(t){var r;return(r=this.sessionPersistence)==null?void 0:r.props[t]}toString(){var t,r=(t=this.config.name)!==null&&t!==void 0?t:xs;return r!==xs&&(r=xs+"."+r),r}_isIdentified(){var t,r;return((t=this.persistence)==null?void 0:t.get_property(tn))===ds||((r=this.sessionPersistence)==null?void 0:r.get_property(tn))===ds}nn(){var t,r;return!(this.config.person_profiles==="never"||this.config.person_profiles===$m&&!this._isIdentified()&&Cs(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[Li])&&((r=this.persistence)==null||(r=r.props)==null||!r[Tc]))}Xi(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.nn()||this.sn("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.sn("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}sn(t){return this.config.person_profiles==="never"?(De.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.an(Tc,!0),!0)}Hi(){if(this.config.cookieless_mode==="always")return!0;var t=this.consent.isOptedOut();return this.config.disable_persistence||t&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==wo)}cn(){var t,r,n,o,s=this.Hi();return((t=this.persistence)==null?void 0:t._r)!==s&&((n=this.persistence)==null||n.set_disabled(s)),((r=this.sessionPersistence)==null?void 0:r._r)!==s&&((o=this.sessionPersistence)==null||o.set_disabled(s)),s}opt_in_capturing(t){var r;if(this.config.cookieless_mode!==On){if(this.Ri()){var n,o,s,i,l;this.reset(!0),(n=this.sessionManager)==null||n.destroy(),(o=this.pageViewManager)==null||o.destroy(),this.sessionManager=new wy(this),this.pageViewManager=new py(this),this.persistence&&(this.sessionPropsManager=new xy(this,this.sessionManager,this.persistence));var u,d=(s=(i=this.config.__extensionClasses)==null?void 0:i.sessionRecording)!==null&&s!==void 0?s:(l=Dr.__defaultExtensionClasses)==null?void 0:l.sessionRecording;d&&(this.sessionRecording=this.Mi(this.sessionRecording,new d(this)),this.Qi&&((u=this.sessionRecording)==null||u.onRemoteConfig==null||u.onRemoteConfig(this.Qi)))}var p,f;this.consent.optInOut(!0),this.cn(),this.Ji(),(r=this.sessionRecording)==null||r.startIfEnabledOrStop(),this.config.cookieless_mode==wo&&((p=this.surveys)==null||p.loadIfEnabled()),(Le(t==null?void 0:t.captureEventName)||t!=null&&t.captureEventName)&&this.capture((f=t==null?void 0:t.captureEventName)!==null&&f!==void 0?f:"$opt_in",t==null?void 0:t.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ki()}else De.warn(Cy)}opt_out_capturing(){var t,r,n;this.config.cookieless_mode!==On?(this.config.cookieless_mode===wo&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.cn(),this.config.cookieless_mode===wo&&(this.register({distinct_id:fl,$device_id:null}),(t=this.sessionRecording)==null||t.stopRecording(),this.sessionRecording=void 0,(r=this.sessionManager)==null||r.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.Ki())):De.warn(Cy)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return t===1?"granted":t===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===On||(this.config.cookieless_mode===wo?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.cn()}_is_bot(){return kr?o$(kr,this.config.custom_blocked_useragents):void 0}Ki(){Oe&&(Oe.visibilityState==="visible"?this.Fi||(this.Fi=!0,this.capture(_s,{title:Oe.title},{send_instantly:!0}),this.Ai&&(Oe.removeEventListener(Ic,this.Ai),this.Ai=null)):this.Ai||(this.Ai=this.Ki.bind(this),Lt(Oe,Ic,this.Ai)))}debug(t){t===!1?(oe==null||oe.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(oe==null||oe.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Lr(){var t,r,n,o,s,i,l=this.qi||{};return"advanced_disable_flags"in l?!!l.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(De.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(n="advanced_disable_decide",o=De,s=(r="advanced_disable_flags")in(t=l)&&!at(t[r]),i=n in t&&!at(t[n]),s?t[r]:!!i&&(o&&o.warn("Config field '"+n+"' is deprecated. Please use '"+r+"' instead. The old field will be removed in a future major version."),t[n]))}rn(t){if(at(this.config.before_send))return t;var r=pt(this.config.before_send)?this.config.before_send:[this.config.before_send],n=t;for(var o of r){if(n=o(n),at(n)){var s="Event '"+t.event+"' was rejected in beforeSend function";return EG(t.event)?De.warn(s+". This can cause unexpected behavior."):De.info(s),null}n.properties&&!Cs(n.properties)||De.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}return n}getPageViewId(){var t;return(t=this.pageViewManager.dr)==null?void 0:t.pageViewId}captureTraceFeedback(t,r){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:r})}captureTraceMetric(t,r,n){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:r,$ai_metric_value:String(n)})}Di(t){var r=_n(t)&&!t,n=Rt.R()&&Rt.A("ph_debug")==="true";return!r&&(!!n||t)}}Dr.__defaultExtensionClasses={},Dr.dn={trace:fs=()=>{},debug:fs,info:fs,warn:fs,error:fs,fatal:fs},function(e,t){for(var r=0;t.length>r;r++)e.prototype[t[r]]=a9(e.prototype[t[r]])}(Dr,["identify"]);var K9=1,X9=3,Y9=11;function Iy(e){return e instanceof Element&&(e.id===DI||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function zo(e){return!!e&&e.nodeType===K9}function sn(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function c$(e){return!!e&&e.nodeType===X9}function u$(e){return!!e&&e.nodeType===Y9&&zo(e.host)}function Jg(e){return e?Zu(e).split(/\s+/):[]}function $y(e){var t=oe==null?void 0:oe.location.href;return!!(t&&e&&e.some(r=>t.match(r)))}function zc(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return Jg(t)}function d$(e){return at(e)?null:Zu(e).split(/(\s+)/).filter(t=>Qi(t)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function ha(e){var t="";return Fm(e)&&!f$(e)&&e.childNodes&&e.childNodes.length&&xt(e.childNodes,function(r){var n;c$(r)&&r.textContent&&(t+=(n=d$(r.textContent))!==null&&n!==void 0?n:"")}),Zu(t)}function Ay(e){return Le(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var Zg=["a","button","form","input","select","textarea","label"];function jy(e,t){if(Le(t))return!0;var r,n=function(s){if(t.some(i=>s.matches(i)))return{v:!0}};for(var o of e)if(r=n(o))return r.v;return!1}function p$(e){var t=e.parentNode;return!(!t||!zo(t))&&t}var J9=["next","previous","prev",">","<"],Oy=[".ph-no-rageclick",".ph-no-capture"],zm=e=>!e||sn(e,"html")||!zo(e),Ny=(e,t)=>{if(!oe||zm(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var r=!1,n=[e],o=e;o.parentNode&&!sn(o,"body");)if(u$(o.parentNode))n.push(o.parentNode.host),o=o.parentNode.host;else{var s=p$(o);if(!s)break;if(t||Zg.indexOf(s.tagName.toLowerCase())>-1)r=!0;else{var i=oe.getComputedStyle(s);i&&i.getPropertyValue("cursor")==="pointer"&&(r=!0)}n.push(s),o=s}return{parentIsUsefulElement:r,targetElementList:n}};function Fm(e){for(var t=e;t.parentNode&&!sn(t,"body");t=t.parentNode){var r=zc(t);if(it(r,"ph-sensitive")||it(r,"ph-no-capture"))return!1}if(it(zc(e),"ph-include"))return!0;var n=e.type||"";if(Tt(n))switch(n.toLowerCase()){case"hidden":case"password":return!1}var o=e.name||e.id||"";return!Tt(o)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(o.replace(/[^a-zA-Z0-9]/g,""))}function f$(e){return!!(sn(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||sn(e,"select")||sn(e,"textarea")||e.getAttribute("contenteditable")==="true")}var m$="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Z9=new RegExp("^(?:"+m$+")$"),Q9=new RegExp(m$),h$="\\d{3}-?\\d{2}-?\\d{4}",e7=new RegExp("^("+h$+")$"),t7=new RegExp("("+h$+")");function Qi(e,t){return t===void 0&&(t=!0),!(at(e)||Tt(e)&&(e=Zu(e),(t?Z9:Q9).test((e||"").replace(/[- ]/g,""))||(t?e7:t7).test(e)))}function Dy(e){var t=ha(e);return Qi(t=(t+" "+g$(e)).trim())?t:""}function g$(e){var t="";return e&&e.childNodes&&e.childNodes.length&&xt(e.childNodes,function(r){var n;if(r&&((n=r.tagName)==null?void 0:n.toLowerCase())==="span")try{var o=ha(r);t=(t+" "+o).trim(),r.childNodes&&r.childNodes.length&&(t=(t+" "+g$(r)).trim())}catch(s){De.error("[AutoCapture]",s)}}),t}function ky(e){return e.replace(/"|\\"/g,'\\"')}function r7(e){var t=e.attr__class;return t?pt(t)?t:Jg(t):void 0}class My{constructor(t){this.disabled=t===!1;var r=Nt(t)?t:{};this.thresholdPx=r.threshold_px||30,this.timeoutMs=r.timeout_ms||1e3,this.clickCount=r.click_count||3,this.clicks=[]}isRageClick(t,r,n){if(this.disabled)return!1;var o=this.clicks[this.clicks.length-1];if(o&&Math.abs(t-o.x)+Math.abs(r-o.y)<this.thresholdPx&&this.timeoutMs>n-o.timestamp){if(this.clicks.push({x:t,y:r,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:r,timestamp:n}];return!1}}var _p="$copy_autocapture",yp=Et("[AutoCapture]");function xp(e,t){return t.length>e?t.slice(0,e)+"...":t}function n7(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!zo(t));return t}function o7(e,t){var r,n,{e:o,maskAllElementAttributes:s,maskAllText:i,elementAttributeIgnoreList:l,elementsChainAsString:u}=t;if(!zo(e))return{props:{}};for(var d=[e],p=e;p.parentNode&&!sn(p,"body");)if(u$(p.parentNode))d.push(p.parentNode.host),p=p.parentNode.host;else{if(!zo(p.parentNode))break;d.push(p.parentNode),p=p.parentNode}var f,m,h=[],v={},g=!1,b=!1;if(xt(d,w=>{var I=Fm(w);if(sn(w,"a")){var T=w.getAttribute("href");g=I&&!!T&&Qi(T)&&T}it(zc(w),"ph-no-capture")&&(b=!0),h.push(function(P,$,A,k){var D=P.tagName.toLowerCase(),z={tag_name:D};Zg.indexOf(D)>-1&&!A&&(z.$el_text=D.toLowerCase()==="a"||D.toLowerCase()==="button"?xp(1024,Dy(P)):xp(1024,ha(P)));var X=zc(P);X.length>0&&(z.classes=X.filter(function(F){return F!==""})),xt(P.attributes,function(F){var H;if((!f$(P)||["name","id","class","aria-label"].indexOf(F.name)!==-1)&&(k==null||!k.includes(F.name))&&!$&&Qi(F.value)&&(!Tt(H=F.name)||H.substring(0,10)!=="_ngcontent"&&H.substring(0,7)!=="_nghost")){var ee=F.value;F.name==="class"&&(ee=Jg(ee).join(" ")),z["attr__"+F.name]=xp(1024,ee)}});for(var V=1,Y=1,U=P;U=n7(U);)V++,U.tagName===P.tagName&&Y++;return z.nth_child=V,z.nth_of_type=Y,z}(w,s,i,l));var R=function(P){if(!Fm(P))return{};var $={};return xt(P.attributes,function(A){if(A.name&&A.name.indexOf("data-ph-capture-attribute")===0){var k=A.name.replace("data-ph-capture-attribute-",""),D=A.value;k&&D&&Qi(D)&&($[k]=D)}}),$}(w);$t(v,R)}),b)return{props:{},explicitNoCapture:b};if(i||(h[0].$el_text=sn(e,"a")||sn(e,"button")?Dy(e):ha(e)),g){var _,y;h[0].attr__href=g;var x=(_=jc(g))==null?void 0:_.host,S=oe==null||(y=oe.location)==null?void 0:y.host;x&&S&&x!==S&&(f=g)}return{props:$t({$event_type:o.type,$ce_version:1},u?{}:{$elements:h},{$elements_chain:(m=h,function(w){return w.map(I=>{var T,R,P="";if(I.tag_name&&(P+=I.tag_name),I.attr_class)for(var $ of(I.attr_class.sort(),I.attr_class))P+="."+$.replace(/"/g,"");var A=Re({},I.text?{text:I.text}:{},{"nth-child":(T=I.nth_child)!==null&&T!==void 0?T:0,"nth-of-type":(R=I.nth_of_type)!==null&&R!==void 0?R:0},I.href?{href:I.href}:{},I.attr_id?{attr_id:I.attr_id}:{},I.attributes),k={};return Ll(A).sort((D,z)=>{var[X]=D,[V]=z;return X.localeCompare(V)}).forEach(D=>{var[z,X]=D;return k[ky(z.toString())]=ky(X.toString())}),(P+=":")+Ll(k).map(D=>{var[z,X]=D;return z+'="'+X+'"'}).join("")}).join(";")}(function(w){return w.map(I=>{var T,R,P={text:(T=I.$el_text)==null?void 0:T.slice(0,400),tag_name:I.tag_name,href:(R=I.attr__href)==null?void 0:R.slice(0,2048),attr_class:r7(I),attr_id:I.attr__id,nth_child:I.nth_child,nth_of_type:I.nth_of_type,attributes:{}};return Ll(I).filter($=>{var[A]=$;return A.indexOf("attr__")===0}).forEach($=>{var[A,k]=$;return P.attributes[A]=k}),P})}(m)))},(r=h[0])!=null&&r.$el_text?{$el_text:(n=h[0])==null?void 0:n.$el_text}:{},f&&o.type==="click"?{$external_click_url:f}:{},v)}}var Ti=Et("[ExceptionAutocapture]");function Ly(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],o=r(n);return An(o)&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=o,()=>{e[t]=n}}catch{return()=>{}}}var s7=Et("[TracingHeaders]"),Hn=Et("[Web Vitals]"),zy=9e5,Fy="disabled",Vy="lazy_loading",Ii="awaiting_config",_l="missing_config";Et("[SessionRecording]"),Et("[SessionRecording]");var Vm="[SessionRecording]",Un=Et(Vm),i7=Et("[Heatmaps]");function By(e){return Nt(e)&&"clientX"in e&&"clientY"in e&&Kr(e.clientX)&&Kr(e.clientY)}var Hy=Et("[Product Tours]"),a7=["$set_once","$set"],Wn=Et("[SiteApps]"),Uy="Error while initializing PostHog app with config id ";function ms(e,t,r){if(at(e))return!1;switch(r){case"exact":return e===t;case"contains":var n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(n,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}class l7{constructor(t){this.vn=new Yg,this.fn=(r,n)=>this.pn(r,n)&&this.gn(r,n)&&this.mn(r,n)&&this.yn(r,n),this.pn=(r,n)=>n==null||!n.event||(r==null?void 0:r.event)===(n==null?void 0:n.event),this._instance=t,this.bn=new Set,this._n=new Set}init(){var t,r;Le((t=this._instance)==null?void 0:t._addCaptureHook)||(r=this._instance)==null||r._addCaptureHook((n,o)=>{this.on(n,o)})}register(t){var r,n;if(!Le((r=this._instance)==null?void 0:r._addCaptureHook)&&(t.forEach(i=>{var l,u;(l=this._n)==null||l.add(i),(u=i.steps)==null||u.forEach(d=>{var p;(p=this.bn)==null||p.add((d==null?void 0:d.event)||"")})}),(n=this._instance)!=null&&n.autocapture)){var o,s=new Set;t.forEach(i=>{var l;(l=i.steps)==null||l.forEach(u=>{u!=null&&u.selector&&s.add(u==null?void 0:u.selector)})}),(o=this._instance)==null||o.autocapture.setElementSelectors(s)}}on(t,r){var n;r!=null&&t.length!=0&&(this.bn.has(t)||this.bn.has(r==null?void 0:r.event))&&this._n&&((n=this._n)==null?void 0:n.size)>0&&this._n.forEach(o=>{this.wn(r,o)&&this.vn.emit("actionCaptured",o.name)})}xn(t){this.onAction("actionCaptured",r=>t(r))}wn(t,r){if((r==null?void 0:r.steps)==null)return!1;for(var n of r.steps)if(this.fn(t,n))return!0;return!1}onAction(t,r){return this.vn.on(t,r)}gn(t,r){if(r!=null&&r.url){var n,o=t==null||(n=t.properties)==null?void 0:n.$current_url;if(!o||typeof o!="string"||!ms(o,r.url,r.url_matching||"contains"))return!1}return!0}mn(t,r){return!!this.Sn(t,r)&&!!this.kn(t,r)&&!!this.Cn(t,r)}Sn(t,r){var n;if(r==null||!r.href)return!0;var o=this.In(t);if(o.length>0)return o.some(l=>ms(l.href,r.href,r.href_matching||"exact"));var s,i=(t==null||(n=t.properties)==null?void 0:n.$elements_chain)||"";return!!i&&ms((s=i.match(/(?::|")href="(.*?)"/))?s[1]:"",r.href,r.href_matching||"exact")}kn(t,r){var n;if(r==null||!r.text)return!0;var o=this.In(t);if(o.length>0)return o.some(d=>ms(d.text,r.text,r.text_matching||"exact")||ms(d.$el_text,r.text,r.text_matching||"exact"));var s,i,l,u=(t==null||(n=t.properties)==null?void 0:n.$elements_chain)||"";return!!u&&(s=function(d){for(var p,f=[],m=/(?::|")text="(.*?)"/g;!at(p=m.exec(d));)f.includes(p[1])||f.push(p[1]);return f}(u),i=r.text,l=r.text_matching||"exact",s.some(d=>ms(d,i,l)))}Cn(t,r){var n,o;if(r==null||!r.selector)return!0;var s=t==null||(n=t.properties)==null?void 0:n.$element_selectors;if(s!=null&&s.includes(r.selector))return!0;var i=(t==null||(o=t.properties)==null?void 0:o.$elements_chain)||"";if(r.selector_regex&&i)try{return new RegExp(r.selector_regex).test(i)}catch{return!1}return!1}In(t){var r;return(t==null||(r=t.properties)==null?void 0:r.$elements)==null?[]:t==null?void 0:t.properties.$elements}yn(t,r){return r==null||!r.properties||r.properties.length===0||i$(r.properties.reduce((n,o)=>{var s=pt(o.value)?o.value.map(String):o.value!=null?[String(o.value)]:[];return n[o.key]={values:s,operator:o.operator||"exact"},n},{}),t==null?void 0:t.properties)}}class c7{constructor(t){this._instance=t,this.Tn=new Map,this.En=new Map,this.Mn=new Map}Pn(t,r){return!!t&&i$(t.propertyFilters,r==null?void 0:r.properties)}Rn(t,r){var n=new Map;return t.forEach(o=>{var s;(s=o.conditions)==null||(s=s[r])==null||(s=s.values)==null||s.forEach(i=>{if(i!=null&&i.name){var l=n.get(i.name)||[];l.push(o.id),n.set(i.name,l)}})}),n}On(t,r,n){var o=(n===ys.Activation?this.Tn:this.En).get(t),s=[];return this.Ln(i=>{s=i.filter(l=>o==null?void 0:o.includes(l.id))}),s.filter(i=>{var l,u=(l=i.conditions)==null||(l=l[n])==null||(l=l.values)==null?void 0:l.find(d=>d.name===t);return this.Pn(u,r)})}register(t){var r;Le((r=this._instance)==null?void 0:r._addCaptureHook)||(this.Fn(t),this.An(t))}An(t){var r=t.filter(n=>{var o,s;return((o=n.conditions)==null?void 0:o.actions)&&((s=n.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0});r.length!==0&&(this.Nn==null&&(this.Nn=new l7(this._instance),this.Nn.init(),this.Nn.xn(n=>{this.onAction(n)})),r.forEach(n=>{var o,s,i,l,u;n.conditions&&(o=n.conditions)!=null&&o.actions&&(s=n.conditions)!=null&&(s=s.actions)!=null&&s.values&&((i=n.conditions)==null||(i=i.actions)==null||(i=i.values)==null?void 0:i.length)>0&&((l=this.Nn)==null||l.register(n.conditions.actions.values),(u=n.conditions)==null||(u=u.actions)==null||(u=u.values)==null||u.forEach(d=>{if(d&&d.name){var p=this.Mn.get(d.name);p&&p.push(n.id),this.Mn.set(d.name,p||[n.id])}}))}))}Fn(t){var r,n=t.filter(s=>{var i,l;return((i=s.conditions)==null?void 0:i.events)&&((l=s.conditions)==null||(l=l.events)==null||(l=l.values)==null?void 0:l.length)>0}),o=t.filter(s=>{var i,l;return((i=s.conditions)==null?void 0:i.cancelEvents)&&((l=s.conditions)==null||(l=l.cancelEvents)==null||(l=l.values)==null?void 0:l.length)>0});n.length===0&&o.length===0||((r=this._instance)==null||r._addCaptureHook((s,i)=>{this.onEvent(s,i)}),this.Tn=this.Rn(t,ys.Activation),this.En=this.Rn(t,ys.Cancellation))}onEvent(t,r){var n,o=this.le(),s=this.$n(),i=this.Dn(),l=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[s])||[];if(i===t&&r&&l.length>0){var u,d;o.info("event matched, removing item from activated items",{event:t,eventPayload:r,existingActivatedItems:l});var p=(r==null||(u=r.properties)==null?void 0:u.$survey_id)||(r==null||(d=r.properties)==null?void 0:d.$product_tour_id);if(p){var f=l.indexOf(p);0>f||(l.splice(f,1),this.qn(l))}}else{if(this.En.has(t)){var m=this.On(t,r,ys.Cancellation);m.length>0&&(o.info("cancel event matched, cancelling items",{event:t,itemsToCancel:m.map(v=>v.id)}),m.forEach(v=>{var g=l.indexOf(v.id);0>g||l.splice(g,1),this.jn(v.id)}),this.qn(l))}if(this.Tn.has(t)){o.info("event name matched",{event:t,eventPayload:r,items:this.Tn.get(t)});var h=this.On(t,r,ys.Activation);this.qn(l.concat(h.map(v=>v.id)||[]))}}}onAction(t){var r,n=this.$n(),o=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[n])||[];this.Mn.has(t)&&this.qn(o.concat(this.Mn.get(t)||[]))}qn(t){var r=this.le(),n=[...new Set(t)].filter(o=>!this.Hn(o));r.info("updating activated items",{activatedItems:n}),this.Un(n)}getActivatedIds(){var t,r=this.$n();return((t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[r])||[]}getEventToItemsMap(){return this.Tn}Bn(){return this.Nn}}class u7 extends c7{constructor(t){super(t)}$n(){return Em}Dn(){return Rs.SHOWN}Ln(t){var r;(r=this._instance)==null||r.getSurveys(t)}jn(t){var r;(r=this._instance)==null||r.cancelPendingSurvey(t)}le(){return gt}Un(t){var r;(r=this._instance)==null||(r=r.persistence)==null||r.register({[Em]:t})}Hn(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var wp="SDK is not enabled or survey functionality is not yet loaded",Wy="Disabled. Not loading surveys.",d7=oe!=null&&oe.location?Nc(oe.location.hash,"__posthog")||Nc(location.hash,"state"):null,qy="_postHogToolbarParams",Gy=Et("[Toolbar]"),pr=Et("[FeatureFlags]"),_o=Et("[FeatureFlags]",{debugEnabled:!0}),Ep=`" failed. Feature flags didn't load in time.`,Ky=e=>{for(var t={},r=0;e.length>r;r++)t[e[r]]=!0;return t},Xy=e=>{var t={};for(var[r,n]of Ll(e||{}))n&&(t[r]=n);return t},In=Et("[Error tracking]"),Yy="Refusing to render web experiment since the viewer is a likely bot",p7={icontains:(e,t)=>!!oe&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!oe&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!oe&&Lc(t.href,e),not_regex:(e,t)=>!!oe&&!Lc(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class nr{get qt(){return this._instance.config}constructor(t){var r=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(n){n===void 0&&(n=!1),r.getWebExperiments(o=>{nr.zn("retrieved web experiments from the server"),r.Vn=new Map,o.forEach(s=>{if(s.feature_flag_key){var i;r.Vn&&(nr.zn("setting flag key ",s.feature_flag_key," to web experiment ",s),(i=r.Vn)==null||i.set(s.feature_flag_key,s));var l=r._instance.getFeatureFlag(s.feature_flag_key);Tt(l)&&s.variants[l]&&r.Wn(s.name,l,s.variants[l].transforms)}else if(s.variants)for(var u in s.variants){var d=s.variants[u];nr.Zn(d)&&r.Wn(s.name,u,d.transforms)}})},n)},this._instance=t,this._instance.onFeatureFlags(n=>{this.onFeatureFlags(n)})}initialize(){}onFeatureFlags(t){if(this._is_bot())nr.zn(Yy);else if(!this.qt.disable_web_experiments){if(at(this.Vn))return this.Vn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();nr.zn("applying feature flags",t),t.forEach(r=>{var n;if(this.Vn&&(n=this.Vn)!=null&&n.has(r)){var o,s=this._instance.getFeatureFlag(r),i=(o=this.Vn)==null?void 0:o.get(r);s&&i!=null&&i.variants[s]&&this.Wn(i.name,s,i.variants[s].transforms)}})}}previewWebExperiment(){var t=nr.getWindowLocation();if(t!=null&&t.search){var r=Oc(t==null?void 0:t.search,"__experiment_id"),n=Oc(t==null?void 0:t.search,"__experiment_variant");r&&n&&(nr.zn("previewing web experiments "+r+" && "+n),this.getWebExperiments(o=>{this.Gn(parseInt(r),n,o)},!1,!0))}}loadIfEnabled(){this.qt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,r,n){if(this.qt.disable_web_experiments&&!n)return t([]);var o=this._instance.get_property("$web_experiments");if(o&&!r)return t(o);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.qt.token),method:"GET",callback:s=>t(s.statusCode===200&&s.json&&s.json.experiments||[])})}Gn(t,r,n){var o=n.filter(s=>s.id===t);o&&o.length>0&&(nr.zn("Previewing web experiment ["+o[0].name+"] with variant ["+r+"]"),this.Wn(o[0].name,r,o[0].variants[r].transforms))}static Zn(t){return!at(t.conditions)&&nr.Qn(t)&&nr.Jn(t)}static Qn(t){var r;if(at(t.conditions)||at((r=t.conditions)==null?void 0:r.url))return!0;var n,o,s,i=nr.getWindowLocation();return!!i&&((n=t.conditions)==null||!n.url||p7[(o=(s=t.conditions)==null?void 0:s.urlMatchType)!==null&&o!==void 0?o:"icontains"](t.conditions.url,i))}static getWindowLocation(){return oe==null?void 0:oe.location}static Jn(t){var r;if(at(t.conditions)||at((r=t.conditions)==null?void 0:r.utm))return!0;var n=HI();if(n.utm_source){var o,s,i,l,u,d,p,f,m=(o=t.conditions)==null||(o=o.utm)==null||!o.utm_campaign||((s=t.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==n.utm_campaign,h=(i=t.conditions)==null||(i=i.utm)==null||!i.utm_source||((l=t.conditions)==null||(l=l.utm)==null?void 0:l.utm_source)==n.utm_source,v=(u=t.conditions)==null||(u=u.utm)==null||!u.utm_medium||((d=t.conditions)==null||(d=d.utm)==null?void 0:d.utm_medium)==n.utm_medium,g=(p=t.conditions)==null||(p=p.utm)==null||!p.utm_term||((f=t.conditions)==null||(f=f.utm)==null?void 0:f.utm_term)==n.utm_term;return m&&v&&g&&h}return!1}static zn(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];De.info("[WebExperiments] "+t,n)}Wn(t,r,n){this._is_bot()?nr.zn(Yy):r!=="control"?n.forEach(o=>{if(o.selector){var s;nr.zn("applying transform of variant "+r+" for experiment "+t+" ",o);var i=(s=document)==null?void 0:s.querySelectorAll(o.selector);i==null||i.forEach(l=>{var u=l;o.html&&(u.innerHTML=o.html),o.css&&u.setAttribute("style",o.css)})}}):nr.zn("Control variants leave the page unmodified.")}_is_bot(){return kr&&this._instance?o$(kr,this.qt.custom_blocked_useragents):void 0}}var Hr=Et("[Conversations]"),yo="Conversations not available yet.",td={featureFlags:class{constructor(e){this.Kn=!1,this.Yn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this.ss=!1,this._instance=e,this.featureFlagEventHandlers=[]}get qt(){return this._instance.config}get ni(){return this._instance.persistence}os(e){return this._instance.get_property(e)}us(){var e,t;return(e=(t=this.ni)==null?void 0:t.wr(this.qt.feature_flag_cache_ttl_ms))!==null&&e!==void 0&&e}ls(){return!!this.us()&&(this.ss||this.Xn||(this.ss=!0,pr.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}hs(){var e,t=(e=this.qt.evaluation_contexts)!==null&&e!==void 0?e:this.qt.evaluation_environments;return!this.qt.evaluation_environments||this.qt.evaluation_contexts||this.ns||(pr.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.ns=!0),t!=null&&t.length?t.filter(r=>{var n=r&&typeof r=="string"&&r.trim().length>0;return n||pr.error("Invalid evaluation context found:",r,"Expected non-empty string"),n}):[]}cs(){return this.hs().length>0}initialize(){var e,t,{config:r}=this._instance,n=(e=(t=r.bootstrap)==null?void 0:t.featureFlags)!==null&&e!==void 0?e:{};if(Object.keys(n).length){var o,s,i=(o=(s=r.bootstrap)==null?void 0:s.featureFlagPayloads)!==null&&o!==void 0?o:{},l=Object.keys(n).filter(d=>!!n[d]).reduce((d,p)=>(d[p]=n[p]||!1,d),{}),u=Object.keys(i).filter(d=>l[d]).reduce((d,p)=>(i[p]&&(d[p]=i[p]),d),{});this.receivedFeatureFlags({featureFlags:l,featureFlagPayloads:u})}}updateFlags(e,t,r){var n=r!=null&&r.merge?this.getFlagVariants():{},o=r!=null&&r.merge?this.getFlagPayloads():{},s=Re({},n,e),i=Re({},o,t),l={};for(var[u,d]of Object.entries(s)){var p=typeof d=="string";l[u]={key:u,enabled:!!p||!!d,variant:p?d:void 0,reason:void 0,metadata:Le(i==null?void 0:i[u])?void 0:{id:0,version:void 0,description:void 0,payload:i[u]}}}this.receivedFeatureFlags({flags:l})}get hasLoadedFlags(){return this.Yn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.os(_m),t=this.os($n),r=this.os(bs);if(!r&&!t)return e||{};var n=$t({},e||{}),o=[...new Set([...Object.keys(r||{}),...Object.keys(t||{})])];for(var s of o){var i,l,u=n[s],d=t==null?void 0:t[s],p=Le(d)?(i=u==null?void 0:u.enabled)!==null&&i!==void 0&&i:!!d,f=Le(d)?u.variant:typeof d=="string"?d:void 0,m=r==null?void 0:r[s],h=Re({},u,{enabled:p,variant:p?f??(u==null?void 0:u.variant):void 0});p!==(u==null?void 0:u.enabled)&&(h.original_enabled=u==null?void 0:u.enabled),f!==(u==null?void 0:u.variant)&&(h.original_variant=u==null?void 0:u.variant),m&&(h.metadata=Re({},u==null?void 0:u.metadata,{payload:m,original_payload:u==null||(l=u.metadata)==null?void 0:l.payload})),n[s]=h}return this.Kn||(pr.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:r,finalDetails:n}),this.Kn=!0),n}getFlagVariants(){var e=this.os(Ps),t=this.os($n);if(!t)return e||{};for(var r=$t({},e),n=Object.keys(t),o=0;n.length>o;o++)r[n[o]]=t[n[o]];return this.Kn||(pr.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:r}),this.Kn=!0),r}getFlagPayloads(){var e=this.os(ym),t=this.os(bs);if(!t)return e||{};for(var r=$t({},e||{}),n=Object.keys(t),o=0;n.length>o;o++)r[n[o]]=t[n[o]];return this.Kn||(pr.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:r}),this.Kn=!0),r}reloadFeatureFlags(){this.es||this.qt.advanced_disable_feature_flags||this.ds||(this._instance.Li.emit("featureFlagsReloading",!0),this.ds=setTimeout(()=>{this.vs()},5))}fs(){clearTimeout(this.ds),this.ds=void 0}ensureFlagsLoaded(){this.Yn||this.Xn||this.ds||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.es=e}vs(e){var t;if(this.fs(),!this._instance.Lr())if(this.Xn)this.ts=!0;else{var r=this.qt.token,n=this.os(Sc),o={token:r,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Re({},((t=this.ni)==null?void 0:t.get_initial_props())||{},this.os(Bi)||{}),group_properties:this.os(xo),timezone:XI()};zn(n)||Le(n)||(o.$device_id=n),(e!=null&&e.disableFlags||this.qt.advanced_disable_feature_flags)&&(o.disable_flags=!0),this.cs()&&(o.evaluation_contexts=this.hs());var s=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.qt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Xn=!0,this._instance._send_request({method:"POST",url:s,data:o,compression:this.qt.disable_compression?void 0:rn.Base64,timeout:this.qt.feature_flag_request_timeout_ms,callback:i=>{var l,u,d,p=!0;if(i.statusCode===200&&(this.ts||(this.$anon_distinct_id=void 0),p=!1),this.Xn=!1,!o.disable_flags||this.ts){this.rs=!p;var f=[];i.error?i.error instanceof Error?f.push(i.error.name==="AbortError"?"timeout":"connection_error"):f.push("unknown_error"):i.statusCode!==200&&f.push("api_error_"+i.statusCode),(l=i.json)!=null&&l.errorsWhileComputingFlags&&f.push("errors_while_computing_flags");var m,h=!((u=i.json)==null||(u=u.quotaLimited)==null||!u.includes("feature_flags"));h&&f.push("quota_limited"),(d=this.ni)==null||d.register({[Cm]:f}),h?pr.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(o.disable_flags||this.receivedFeatureFlags((m=i.json)!==null&&m!==void 0?m:{},p,{partialResponse:!!this.qt.advanced_only_evaluate_survey_feature_flags}),this.ts&&(this.ts=!1,this.vs()))}}})}}getFeatureFlag(e,t){var r;if(t===void 0&&(t={}),!t.fresh||this.rs)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var n=this.getFeatureFlagResult(e,t);return(r=n==null?void 0:n.variant)!==null&&r!==void 0?r:n==null?void 0:n.enabled}}else pr.warn('getFeatureFlag for key "'+e+Ep)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return t==null?void 0:t.payload}getFeatureFlagResult(e,t){if(t===void 0&&(t={}),!t.fresh||this.rs)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var r=this.getFlagVariants(),n=e in r,o=r[e],s=this.getFlagPayloads()[e],i=String(o),l=this.os(xm)||void 0,u=this.os(Pc)||void 0,d=this.os(Yi)||{};if(this.qt.advanced_feature_flags_dedup_per_session){var p,f=this._instance.get_session_id(),m=this.os(Sm);f&&f!==m&&(d={},(p=this.ni)==null||p.register({[Yi]:d,[Sm]:f}))}if((t.send_event||!("send_event"in t))&&(!(e in d)||!d[e].includes(i))){var h,v,g,b,_,y,x,S,w,I;pt(d[e])?d[e].push(i):d[e]=[i],(h=this.ni)==null||h.register({[Yi]:d});var T=this.getFeatureFlagDetails(e),R=[...(v=this.os(Cm))!==null&&v!==void 0?v:[]];Le(o)&&R.push("flag_missing");var P={$feature_flag:e,$feature_flag_response:o,$feature_flag_payload:s||null,$feature_flag_request_id:l,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:((g=this.qt.bootstrap)==null||(g=g.featureFlags)==null?void 0:g[e])||null,$feature_flag_bootstrapped_payload:((b=this.qt.bootstrap)==null||(b=b.featureFlagPayloads)==null?void 0:b[e])||null,$used_bootstrap_value:!this.rs};Le(T==null||(_=T.metadata)==null?void 0:_.version)||(P.$feature_flag_version=T.metadata.version);var $,A=(y=T==null||(x=T.reason)==null?void 0:x.description)!==null&&y!==void 0?y:T==null||(S=T.reason)==null?void 0:S.code;A&&(P.$feature_flag_reason=A),T!=null&&(w=T.metadata)!=null&&w.id&&(P.$feature_flag_id=T.metadata.id),Le(T==null?void 0:T.original_variant)&&Le(T==null?void 0:T.original_enabled)||(P.$feature_flag_original_response=Le(T.original_variant)?T.original_enabled:T.original_variant),T!=null&&(I=T.metadata)!=null&&I.original_payload&&(P.$feature_flag_original_payload=T==null||($=T.metadata)==null?void 0:$.original_payload),R.length&&(P.$feature_flag_error=R.join(",")),this._instance.capture("$feature_flag_called",P)}if(n){var k=s;if(!Le(s))try{k=JSON.parse(s)}catch{}return{key:e,enabled:!!o,variant:typeof o=="string"?o:void 0,payload:k}}}}else pr.warn('getFeatureFlagResult for key "'+e+Ep)}getRemoteConfigPayload(e,t){var r=this.qt.token,n={distinct_id:this._instance.get_distinct_id(),token:r};this.cs()&&(n.evaluation_contexts=this.hs()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:n,compression:this.qt.disable_compression?void 0:rn.Base64,timeout:this.qt.feature_flag_request_timeout_ms,callback(o){var s,i=(s=o.json)==null?void 0:s.featureFlagPayloads;t((i==null?void 0:i[e])||void 0)}})}isFeatureEnabled(e,t){if(t===void 0&&(t={}),!t.fresh||this.rs){if(this.Yn||this.getFlags()&&this.getFlags().length>0){var r=this.getFeatureFlag(e,t);return Le(r)?void 0:!!r}pr.warn('isFeatureEnabled for key "'+e+Ep)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t,r){if(this.ni){this.Yn=!0;var n=this.getFlagVariants(),o=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(i,l,u,d,p,f){u===void 0&&(u={}),d===void 0&&(d={}),p===void 0&&(p={});var m=(R=>{var P=R.flags;return P?(R.featureFlags=Object.fromEntries(Object.keys(P).map($=>{var A;return[$,(A=P[$].variant)!==null&&A!==void 0?A:P[$].enabled]})),R.featureFlagPayloads=Object.fromEntries(Object.keys(P).filter($=>P[$].enabled).filter($=>{var A;return(A=P[$].metadata)==null?void 0:A.payload}).map($=>{var A;return[$,(A=P[$].metadata)==null?void 0:A.payload]}))):pr.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),R})(i),h=m.flags,v=m.featureFlags,g=m.featureFlagPayloads;if(v){var b=i.requestId,_=i.evaluatedAt;if(pt(v)){pr.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var y={};if(v)for(var x=0;v.length>x;x++)y[v[x]]=!0;l&&l.register({[kl]:v,[Ps]:y})}else{var S=v,w=g,I=h;if(f!=null&&f.partialResponse)S=Re({},u,S),w=Re({},d,w),I=Re({},p,I);else if(i.errorsWhileComputingFlags)if(h){var T=new Set(Object.keys(h).filter(R=>{var P;return!((P=h[R])!=null&&P.failed)}));S=Re({},u,Object.fromEntries(Object.entries(S).filter(R=>{var[P]=R;return T.has(P)}))),w=Re({},d,Object.fromEntries(Object.entries(w||{}).filter(R=>{var[P]=R;return T.has(P)}))),I=Re({},p,Object.fromEntries(Object.entries(I||{}).filter(R=>{var[P]=R;return T.has(P)})))}else S=Re({},u,S),w=Re({},d,w),I=Re({},p,I);l&&l.register(Re({[kl]:Object.keys(Xy(S)),[Ps]:S||{},[ym]:w||{},[_m]:I||{}},b?{[xm]:b}:{},_?{[Pc]:_}:{}))}}})(e,this.ni,n,o,s,r),t||(this.ss=!1),this.ps(t)}}override(e,t){t===void 0&&(t=!1),pr.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.ni)return pr.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this.ni.unregister($n),this.ni.unregister(bs),this.ps(),_o.info("All overrides cleared");if(pt(e)){var t=Ky(e);return this.ni.register({[$n]:t}),this.ps(),_o.info("Flag overrides set",{flags:e})}if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var r,n=e;if(this.Kn=!!((r=n.suppressWarning)!==null&&r!==void 0&&r),"flags"in n){if(n.flags===!1)this.ni.unregister($n),_o.info("Flag overrides cleared");else if(n.flags){if(pt(n.flags)){var o=Ky(n.flags);this.ni.register({[$n]:o})}else this.ni.register({[$n]:n.flags});_o.info("Flag overrides set",{flags:n.flags})}}return"payloads"in n&&(n.payloads===!1?(this.ni.unregister(bs),_o.info("Payload overrides cleared")):n.payloads&&(this.ni.register({[bs]:n.payloads}),_o.info("Payload overrides set",{payloads:n.payloads}))),void this.ps()}if(e&&typeof e=="object")return this.ni.register({[$n]:e}),this.ps(),_o.info("Flag overrides set",{flags:e});pr.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Yn){var{flags:t,flagVariants:r}=this.gs();e(t,r)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,r){var n,o=(this.os(Vi)||[]).find(u=>u.flagKey===e),s={["$feature_enrollment/"+e]:t},i={$feature_flag:e,$feature_enrollment:t,$set:s};o&&(i.$early_access_feature_name=o.name),r&&(i.$feature_enrollment_stage=r),this._instance.capture("$feature_enrollment_update",i),this.setPersonPropertiesForFlags(s,!1);var l=Re({},this.getFlagVariants(),{[e]:t});(n=this.ni)==null||n.register({[kl]:Object.keys(Xy(l)),[Ps]:l}),this.ps()}getEarlyAccessFeatures(e,t,r){t===void 0&&(t=!1);var n=this.os(Vi),o=r?"&"+r.map(s=>"stage="+s).join("&"):"";if(n&&!t)return e(n);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.qt.token+o),method:"GET",callback:s=>{var i,l;if(s.json){var u=s.json.earlyAccessFeatures;return(i=this.ni)==null||i.unregister(Vi),(l=this.ni)==null||l.register({[Vi]:u}),e(u)}}})}gs(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(r=>t[r]),flagVariants:Object.keys(t).filter(r=>t[r]).reduce((r,n)=>(r[n]=t[n],r),{})}}ps(e){var{flags:t,flagVariants:r}=this.gs();this.featureFlagEventHandlers.forEach(n=>n(t,r,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var r=this.os(Bi)||{},n=(e==null?void 0:e.$set)||(e!=null&&e.$set_once?{}:e),o=e==null?void 0:e.$set_once,s={};if(o)for(var i in o)({}).hasOwnProperty.call(o,i)&&(i in r||(s[i]=o[i]));this._instance.register({[Bi]:Re({},r,s,n)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(Bi)}setGroupPropertiesForFlags(e,t){t===void 0&&(t=!0);var r=this.os(xo)||{};Object.keys(r).length!==0&&Object.keys(r).forEach(n=>{r[n]=Re({},r[n],e[n]),delete e[n]}),this._instance.register({[xo]:Re({},r,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.os(xo)||{};this._instance.register({[xo]:Re({},t,{[e]:{}})})}else this._instance.unregister(xo)}reset(){this.Yn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.$anon_distinct_id=void 0,this.fs(),this.Kn=!1}}},f7={sessionRecording:class{get qt(){return this._instance.config}get ni(){return this._instance.persistence}get started(){var e;return!((e=this.ys)==null||!e.isStarted)}get status(){var e,t;return this.bs===Ii||this.bs===_l?this.bs:(e=(t=this.ys)==null?void 0:t.status)!==null&&e!==void 0?e:this.bs}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.bs=Fy,this._s=void 0,this._instance=e,!this._instance.sessionManager)throw Un.error("started without valid sessionManager"),new Error(Vm+" started without valid sessionManager. This is a bug.");if(this.qt.cookieless_mode===On)throw new Error(Vm+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get ws(){var e,t=!((e=this._instance.get_property(Fi))==null||!e.enabled),r=!this.qt.disable_session_recording,n=this.qt.disable_session_recording||this._instance.consent.isOptedOut();return oe&&t&&r&&!n}startIfEnabledOrStop(e){var t;if(!this.ws||(t=this.ys)==null||!t.isStarted){var r=!Le(Object.assign)&&!Le(Array.from);this.ws&&r?(this.xs(e),Un.info("starting")):(this.bs=Fy,this.stopRecording())}}xs(e){var t,r,n;this.ws&&(this.bs!==Ii&&this.bs!==_l&&(this.bs=Vy),Je!=null&&(t=Je.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(r=Je.__PosthogExtensions__)!=null&&r.initSessionRecording?this.Ss(e):(n=Je.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.ks,o=>{if(o)return Un.error("could not load recorder",o);this.Ss(e)}))}stopRecording(){var e,t;(e=this._s)==null||e.call(this),this._s=void 0,(t=this.ys)==null||t.stop()}Cs(){var e,t;(e=this._s)==null||e.call(this),this._s=void 0,(t=this.ys)==null||t.discard()}Is(){var e;(e=this.ni)==null||e.unregister(Wg)}Ts(e,t){if(at(e))return null;var r,n=Kr(e)?e:parseFloat(e);return typeof(r=n)!="number"||!Number.isFinite(r)||0>r||r>1?(Un.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):n}Es(e){if(this.ni){var t,r,n=this.ni,o=()=>{var s,i=e.sessionRecording===!1?void 0:e.sessionRecording,l=this.Ts((s=this.qt.session_recording)==null?void 0:s.sampleRate,"session_recording.sampleRate"),u=this.Ts(i==null?void 0:i.sampleRate,"remote config sampleRate"),d=l??u;at(d)&&this.Is();var p=i==null?void 0:i.minimumDurationMilliseconds;n.register({[Fi]:Re({cache_timestamp:Date.now(),enabled:!!i},i,{networkPayloadCapture:Re({capturePerformance:e.capturePerformance},i==null?void 0:i.networkPayloadCapture),canvasRecording:{enabled:i==null?void 0:i.recordCanvas,fps:i==null?void 0:i.canvasFps,quality:i==null?void 0:i.canvasQuality},sampleRate:d,minimumDurationMilliseconds:Le(p)?null:p,endpoint:i==null?void 0:i.endpoint,triggerMatchType:i==null?void 0:i.triggerMatchType,masking:i==null?void 0:i.masking,urlTriggers:i==null?void 0:i.urlTriggers,version:i==null?void 0:i.version,triggerGroups:i==null?void 0:i.triggerGroups})})};o(),(t=this._s)==null||t.call(this),this._s=(r=this._instance.sessionManager)==null?void 0:r.onSessionId(o)}}onRemoteConfig(e){return"sessionRecording"in e?e.sessionRecording===!1?(this.Es(e),void this.Cs()):(this.Es(e),void this.startIfEnabledOrStop()):(this.bs===Ii&&(this.bs=_l,Un.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var r;t===void 0&&(t="log"),(r=this.ys)!=null&&r.log?this.ys.log(e,t):Un.warn("log called before recorder was ready")}get ks(){var e,t,r=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(Fi);return(r==null||(t=r.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}Ms(){var e,t=this._instance.get_property(Fi);if(!t)return!1;var r=(e=(typeof t=="object"?t:JSON.parse(t)).cache_timestamp)!==null&&e!==void 0?e:Date.now();return 36e5>=Date.now()-r}Ss(e){var t,r;if((t=Je.__PosthogExtensions__)==null||!t.initSessionRecording)return Un.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[LI]:!0});if(this.ys||(this.ys=(r=Je.__PosthogExtensions__)==null?void 0:r.initSessionRecording(this._instance),this.ys._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Ms())return this.bs===_l||this.bs===Ii?void 0:(this.bs=Ii,Un.info("persisted remote config is stale, requesting fresh config before starting"),void new JI(this._instance).load());this.bs=Vy,this.ys.start(e)}onRRwebEmit(e){var t;(t=this.ys)==null||t.onRRwebEmit==null||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.ys||(t=this.ni)==null||t.register({[jI]:!0}),(e=this.ys)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.ys||(t=this.ni)==null||t.register({[AI]:!0}),(e=this.ys)==null||e.overrideSampling()}overrideTrigger(e){var t,r;this.ys||(r=this.ni)==null||r.register({[e==="url"?OI:NI]:!0}),(t=this.ys)==null||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.ys)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var r;return!((r=this.ys)==null||!r.tryAddCustomEvent(e,t))}}},m7={autocapture:class{constructor(e){this.Ps=!1,this.Rs=null,this.Os=!1,this.instance=e,this.rageclicks=new My(e.config.rageclick),this.Ls=null}initialize(){this.startIfEnabled()}get qt(){var e,t,r=Nt(this.instance.config.autocapture)?this.instance.config.autocapture:{};return r.url_allowlist=(e=r.url_allowlist)==null?void 0:e.map(n=>new RegExp(n)),r.url_ignorelist=(t=r.url_ignorelist)==null?void 0:t.map(n=>new RegExp(n)),r}Fs(){if(this.isBrowserSupported()){if(oe&&Oe){var e=r=>{r=r||(oe==null?void 0:oe.event);try{this.As(r)}catch(n){yp.error("Failed to capture event",n)}};if(Lt(Oe,"submit",e,{capture:!0}),Lt(Oe,"change",e,{capture:!0}),Lt(Oe,"click",e,{capture:!0}),this.qt.capture_copied_text){var t=r=>{r=r||(oe==null?void 0:oe.event);try{this.As(r,_p)}catch(n){yp.error("Failed to capture copy/cut event",n)}};Lt(Oe,"copy",t,{capture:!0}),Lt(Oe,"cut",t,{capture:!0})}}}else yp.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Ps&&(this.Fs(),this.Ps=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Os=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[dm]:!!e.autocapture_opt_out}),this.Rs=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Ls=e}getElementSelectors(e){var t,r=[];return(t=this.Ls)==null||t.forEach(n=>{var o=Oe==null?void 0:Oe.querySelectorAll(n);o==null||o.forEach(s=>{e===s&&r.push(n)})}),r}get isEnabled(){var e,t,r=(e=this.instance.persistence)==null?void 0:e.props[dm];if(zn(this.Rs)&&!_n(r)&&!this.instance.Lr())return!1;var n=(t=this.Rs)!==null&&t!==void 0?t:!!r;return!!this.instance.config.autocapture&&!n}As(e,t){if(t===void 0&&(t="$autocapture"),this.isEnabled){var r,n=Ay(e);c$(n)&&(n=n.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(r=this.rageclicks)!=null&&r.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&function(f,m){if(!oe||zm(f))return!1;var h,v,g;if(_n(m)?(h=!!m&&Oy,v=void 0):(h=(g=m==null?void 0:m.css_selector_ignorelist)!==null&&g!==void 0?g:Oy,v=m==null?void 0:m.content_ignorelist),h===!1)return!1;var{targetElementList:b}=Ny(f,!1);return!function(_,y){if(_===!1||Le(_))return!1;var x;if(_===!0)x=J9;else{if(!pt(_))return!1;if(_.length>10)return De.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;x=_.map(S=>S.toLowerCase())}return y.some(S=>{var{safeText:w,ariaLabel:I}=S;return x.some(T=>w.includes(T)||I.includes(T))})}(v,b.map(_=>{var y;return{safeText:ha(_).toLowerCase(),ariaLabel:((y=_.getAttribute("aria-label"))==null?void 0:y.toLowerCase().trim())||""}}))&&!jy(b,h)}(n,this.instance.config.rageclick)&&this.As(e,"$rageclick");var o=t===_p;if(n&&function(f,m,h,v,g){var b,_,y,x;if(h===void 0&&(h=void 0),!oe||zm(f)||(b=h)!=null&&b.url_allowlist&&!$y(h.url_allowlist)||(_=h)!=null&&_.url_ignorelist&&$y(h.url_ignorelist))return!1;if((y=h)!=null&&y.dom_event_allowlist){var S=h.dom_event_allowlist;if(S&&!S.some(P=>m.type===P))return!1}var{parentIsUsefulElement:w,targetElementList:I}=Ny(f,v);if(!function(P,$){var A=$==null?void 0:$.element_allowlist;if(Le(A))return!0;var k,D=function(X){if(A.some(V=>X.tagName.toLowerCase()===V))return{v:!0}};for(var z of P)if(k=D(z))return k.v;return!1}(I,h)||!jy(I,(x=h)==null?void 0:x.css_selector_allowlist))return!1;var T=oe.getComputedStyle(f);if(T&&T.getPropertyValue("cursor")==="pointer"&&m.type==="click")return!0;var R=f.tagName.toLowerCase();switch(R){case"html":return!1;case"form":return(g||["submit"]).indexOf(m.type)>=0;case"input":case"select":case"textarea":return(g||["change","click"]).indexOf(m.type)>=0;default:return w?(g||["click"]).indexOf(m.type)>=0:(g||["click"]).indexOf(m.type)>=0&&(Zg.indexOf(R)>-1||f.getAttribute("contenteditable")==="true")}}(n,e,this.qt,o,o?["copy","cut"]:void 0)){var{props:s,explicitNoCapture:i}=o7(n,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.qt.element_attribute_ignorelist,elementsChainAsString:this.Os});if(i)return!1;var l=this.getElementSelectors(n);if(l&&l.length>0&&(s.$element_selectors=l),t===_p){var u,d=d$(oe==null||(u=oe.getSelection())==null?void 0:u.toString()),p=e.type||"clipboard";if(!d)return!1;s.$selected_content=d,s.$copy_type=p}return this.instance.capture(t,s),!0}}}isBrowserSupported(){return An(Oe==null?void 0:Oe.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.Ns=(oe==null||(t=oe.location)==null?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(De.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.$s&&this.$s(),this.$s=void 0,De.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(oe&&oe.history){var r=this;(e=oe.history.pushState)!=null&&e.__posthog_wrapped__||Ly(oe.history,"pushState",n=>function(o,s,i){n.call(this,o,s,i),r.Ds("pushState")}),(t=oe.history.replaceState)!=null&&t.__posthog_wrapped__||Ly(oe.history,"replaceState",n=>function(o,s,i){n.call(this,o,s,i),r.Ds("replaceState")}),this.qs()}}Ds(e){try{var t,r=oe==null||(t=oe.location)==null?void 0:t.pathname;if(!r)return;r!==this.Ns&&this.isEnabled&&this._instance.capture(_s,{navigation_type:e}),this.Ns=r}catch(n){De.error("Error capturing "+e+" pageview",n)}}qs(){if(!this.$s){var e=()=>{this.Ds("popstate")};Lt(oe,"popstate",e),this.$s=()=>{oe&&oe.removeEventListener("popstate",e)}}}},heatmaps:class{get qt(){return this.instance.config}constructor(e){var t;this.js=!1,this.Ps=!1,this.Hs=null,this.instance=e,this.js=!((t=this.instance.persistence)==null||!t.props[pm]),this.rageclicks=new My(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return Nt(this.qt.capture_heatmaps)&&this.qt.capture_heatmaps.flush_interval_milliseconds&&(e=this.qt.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return at(this.qt.capture_heatmaps)?at(this.qt.enable_heatmaps)?this.js:this.qt.enable_heatmaps:this.qt.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Ps)return;i7.info("starting..."),this.Us(),this.At()}else{var e;clearInterval((e=this.Hs)!==null&&e!==void 0?e:void 0),this.Bs(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[pm]:t}),this.js=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.M;return this.M=void 0,e}zs(e){this.Mt(e.originalEvent,"deadclick")}At(){this.Hs&&clearInterval(this.Hs),this.Hs=(Oe==null?void 0:Oe.visibilityState)==="visible"?setInterval(this.Zr.bind(this),this.flushIntervalMilliseconds):null}Us(){oe&&Oe&&(this.Vs=this.Zr.bind(this),Lt(oe,$c,this.Vs),this.Ws=e=>this.Mt(e||(oe==null?void 0:oe.event)),Lt(Oe,"click",this.Ws,{capture:!0}),this.Zs=e=>this.Gs(e||(oe==null?void 0:oe.event)),Lt(Oe,"mousemove",this.Zs,{capture:!0}),this.Qs=new dy(this.instance,v9,this.zs.bind(this)),this.Qs.startIfEnabledOrStop(),this.Js=this.At.bind(this),Lt(Oe,Ic,this.Js),this.Ps=!0)}Bs(){var e;oe&&Oe&&(this.Vs&&oe.removeEventListener($c,this.Vs),this.Ws&&Oe.removeEventListener("click",this.Ws,{capture:!0}),this.Zs&&Oe.removeEventListener("mousemove",this.Zs,{capture:!0}),this.Js&&Oe.removeEventListener(Ic,this.Js),clearTimeout(this.Ks),(e=this.Qs)==null||e.stop(),this.Ps=!1)}Ys(e,t){var r=this.instance.scrollManager.scrollY(),n=this.instance.scrollManager.scrollX(),o=this.instance.scrollManager.scrollElement(),s=function(i,l,u){for(var d=i;d&&zo(d)&&!sn(d,"body");){if(d===u)return!1;if(it(l,oe==null?void 0:oe.getComputedStyle(d).position))return!0;d=p$(d)}return!1}(Ay(e),["fixed","sticky"],o);return{x:e.clientX+(s?0:n),y:e.clientY+(s?0:r),target_fixed:s,type:t}}Mt(e,t){var r;if(t===void 0&&(t="click"),!Iy(e.target)&&By(e)){var n=this.Ys(e,t);(r=this.rageclicks)!=null&&r.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.Xs(Re({},n,{type:"rageclick"})),this.Xs(n)}}Gs(e){!Iy(e.target)&&By(e)&&(clearTimeout(this.Ks),this.Ks=setTimeout(()=>{this.Xs(this.Ys(e,"mousemove"))},500))}Xs(e){if(oe){var t=oe.location.href,r=this.qt.custom_personal_data_properties,n=this.qt.mask_personal_data_properties?[...Zs,...r||[]]:[],o=fa(t,n,ma);this.M=this.M||{},this.M[o]||(this.M[o]=[]),this.M[o].push(e)}}Zr(){this.M&&!Cs(this.M)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:dy,webVitalsAutocapture:class{constructor(e){var t;this.js=!1,this.Ps=!1,this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.eo=()=>{clearTimeout(this.ro),this.M.metrics.length!==0&&(this._instance.capture("$web_vitals",this.M.metrics.reduce((r,n)=>Re({},r,{["$web_vitals_"+n.name+"_event"]:Re({},n),["$web_vitals_"+n.name+"_value"]:n.value}),{})),this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ht=r=>{var n,o=(n=this._instance.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0);if(Le(o))Hn.error("Could not read session ID. Dropping metrics!");else{this.M=this.M||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var s=this.io();Le(s)||(at(r==null?void 0:r.name)||at(r==null?void 0:r.value)?Hn.error("Invalid metric received",r):!this.no||this.no>r.value?(this.M.url!==s&&(this.eo(),this.ro=setTimeout(this.eo,this.flushToCaptureTimeoutMs)),Le(this.M.url)&&(this.M.url=s),this.M.firstMetricTimestamp=Le(this.M.firstMetricTimestamp)?Date.now():this.M.firstMetricTimestamp,r.attribution&&r.attribution.interactionTargetElement&&(r.attribution.interactionTargetElement=void 0),this.M.metrics.push(Re({},r,{$current_url:s,$session_id:o.sessionId,$window_id:o.windowId,timestamp:Date.now()})),this.M.metrics.length===this.allowedMetrics.length&&this.eo()):Hn.error("Ignoring metric with value >= "+this.no,r))}},this.so=()=>{if(!this.Ps){var r,n,o,s,i=Je.__PosthogExtensions__;Le(i)||Le(i.postHogWebVitalsCallbacks)||({onLCP:r,onCLS:n,onFCP:o,onINP:s}=i.postHogWebVitalsCallbacks),r&&n&&o&&s?(this.allowedMetrics.indexOf("LCP")>-1&&r(this.ht.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&n(this.ht.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&o(this.ht.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.ht.bind(this)),this.Ps=!0):Hn.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.js=!((t=this._instance.persistence)==null||!t.props[gm]),this.startIfEnabled()}get oo(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,r=Nt(this.oo)?(e=this.oo)==null?void 0:e.web_vitals_allowed_metrics:void 0;return at(r)?((t=this._instance.persistence)==null?void 0:t.props[bm])||["CLS","FCP","INP","LCP"]:r}get flushToCaptureTimeoutMs(){return(Nt(this.oo)?this.oo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=Nt(this.oo)?this.oo.web_vitals_attribution:void 0;return e!=null&&e}get no(){var e=Nt(this.oo)&&Kr(this.oo.__web_vitals_max_value)?this.oo.__web_vitals_max_value:zy;return e>0&&6e4>=e?zy:e}get isEnabled(){var e=Jt==null?void 0:Jt.protocol;if(e!=="http:"&&e!=="https:")return Hn.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=Nt(this.oo)?this.oo.web_vitals:_n(this.oo)?this.oo:void 0;return _n(t)?t:this.js}startIfEnabled(){this.isEnabled&&!this.Ps&&(Hn.info("enabled, starting..."),this.lr(this.so))}onRemoteConfig(e){if("capturePerformance"in e){var t=Nt(e.capturePerformance)&&!!e.capturePerformance.web_vitals,r=Nt(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[gm]:t}),this._instance.persistence.register({[bm]:r})),this.js=t,this.startIfEnabled()}}lr(e){var t,r;(t=Je.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks?e():(r=Je.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",n=>{n?Hn.error("failed to load script",n):e()})}io(){var e=oe?oe.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties,r=this._instance.config.mask_personal_data_properties?[...Zs,...t||[]]:[];return fa(e,r,ma)}Hn.error("Could not determine current URL")}}},h7={exceptionObserver:class{constructor(e){var t,r,n;this.so=()=>{var o;if(oe&&this.isEnabled&&(o=Je.__PosthogExtensions__)!=null&&o.errorWrappingFunctions){var s=Je.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=Je.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,l=Je.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ao&&this.qt.capture_unhandled_errors&&(this.ao=s(this.captureException.bind(this))),!this.uo&&this.qt.capture_unhandled_rejections&&(this.uo=i(this.captureException.bind(this))),!this.lo&&this.qt.capture_console_errors&&(this.lo=l(this.captureException.bind(this)))}catch(u){Ti.error("failed to start",u),this.ho()}}},this._instance=e,this.co=!((t=this._instance.persistence)==null||!t.props[fm]),this.do=new PG({refillRate:(r=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&r!==void 0?r:1,bucketSize:(n=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&n!==void 0?n:10,refillInterval:1e4,Gt:Ti}),this.qt=this.vo(),this.startIfEnabledOrStop()}vo(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return Nt(e)?t=Re({},t,e):(Le(e)?this.co:e)&&(t=Re({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.qt.capture_console_errors||this.qt.capture_unhandled_errors||this.qt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(Ti.info("enabled"),this.ho(),this.lr(this.so)):this.ho()}lr(e){var t,r;(t=Je.__PosthogExtensions__)!=null&&t.errorWrappingFunctions&&e(),(r=Je.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"exception-autocapture",n=>{if(n)return Ti.error("failed to load script",n);e()})}ho(){var e,t,r;(e=this.ao)==null||e.call(this),this.ao=void 0,(t=this.uo)==null||t.call(this),this.uo=void 0,(r=this.lo)==null||r.call(this),this.lo=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.co=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[fm]:this.co}),this.qt=this.vo(),this.startIfEnabledOrStop())}onConfigChange(){this.qt=this.vo()}captureException(e){var t,r,n,o=(t=e==null||(r=e.$exception_list)==null||(r=r[0])==null?void 0:r.type)!==null&&t!==void 0?t:"Exception";this.do.consumeRateLimit(o)?Ti.info("Skipping exception capture because of client rate limiting.",{exception:o}):(n=this._instance.exceptions)==null||n.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,r;this.fo=[],this.po=new zG([new GG,new r9,new XG,new KG,new e9,new QG,new JG,new t9],function(n){for(var o=arguments.length,s=new Array(o>1?o-1:0),i=1;o>i;i++)s[i-1]=arguments[i];return function(l,u){u===void 0&&(u=0);for(var d=[],p=l.split(`
`),f=u;p.length>f;f++){var m=p[f];if(1024>=m.length){var h=ay.test(m)?m.replace(ay,"$1"):m;if(!h.match(/\S*Error: /)){for(var v of s){var g=v(h,n);if(g){d.push(g);break}}if(d.length>=50)break}}}return function(b){if(!b.length)return[];var _=Array.from(b);return _.reverse(),_.slice(0,50).map(y=>{return Re({},y,{filename:y.filename||(x=_,x[x.length-1]||{}).filename,function:y.function||Js});var x})}(d)}}("web:javascript",HG,qG)),this._instance=e,this.fo=(t=(r=this._instance.persistence)==null?void 0:r.get_property(mm))!==null&&t!==void 0?t:[],this.mo=Ec(this.yo()),this.bo=new o9(this.mo)}onConfigChange(){this.mo=Ec(this.yo()),this.bo.setConfig(this.mo)}onRemoteConfig(e){var t,r,n;if("errorTracking"in e){var o=(t=(r=e.errorTracking)==null?void 0:r.suppressionRules)!==null&&t!==void 0?t:[],s=(n=e.errorTracking)==null?void 0:n.captureExtensionExceptions;this.fo=o,this._instance.persistence&&this._instance.persistence.register({[mm]:this.fo,[hm]:s})}}get _o(){var e,t=!!this._instance.get_property(hm),r=this._instance.config.error_tracking.captureExtensionExceptions;return(e=r??t)!==null&&e!==void 0&&e}buildProperties(e,t){return this.po.buildFromUnknown(e,{syntheticException:t==null?void 0:t.syntheticException,mechanism:{handled:t==null?void 0:t.handled}})}addExceptionStep(e,t){if(this.mo.enabled)try{if(!Tt(e)||e.trim().length===0)return void In.warn("Ignoring exception step because message must be a non-empty string");var r=this.wo(t),{sanitizedProperties:n,droppedKeys:o}=function(s){if(!s)return{sanitizedProperties:{},droppedKeys:[]};var i=[];return{sanitizedProperties:Object.keys(s).reduce((l,u)=>n9.has(u)?(i.push(u),l):(l[u]=s[u],l),{}),droppedKeys:i}}(r);o.length>0&&In.warn("Ignoring reserved exception step fields",{droppedKeys:o}),this.bo.add(Re({[xc]:e,[wc]:new Date().toISOString()},n))}catch(s){In.error("Failed to add exception step. Ignoring breadcrumb.",s)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.xo(t)){if(this.So(t))return this.ko("Exception dropped: matched a suppression rule"),void In.info("Skipping exception capture because a suppression rule matched");if(!this._o&&this.Co(t))return this.ko("Exception dropped: thrown by a browser extension"),void In.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.Io(t))return this.ko("Exception dropped: thrown by the PostHog SDK"),void In.info("Skipping exception capture because it was thrown by the PostHog SDK")}var r=this.mo.enabled&&at(e.$exception_steps)?this.To(e):e;try{var n=this._instance.capture("$exception",r,{_noTruncate:!0,_batchKey:"exceptionEvent",en:!0});return n&&this.bo.clear(),n}catch(o){return In.error("Failed to capture exception event. Dropping this exception.",o),void this.bo.clear()}}catch(o){return void In.error("Failed to process exception event. Ignoring this exception.",o)}}To(e){try{var t=this.bo.getAttachable();return t.length===0?e:Re({},e,{$exception_steps:t})}catch(r){return In.error("Failed to read buffered exception steps. Capturing exception without steps.",r),e}}ko(e){this.mo.enabled&&this.bo.add({[xc]:e,[wc]:new Date().toISOString()})}wo(e){return Nt(e)?Re({},e):{}}yo(){var e,t;return(e=(t=this._instance.config.error_tracking)==null?void 0:t.exception_steps)!==null&&e!==void 0?e:{}}So(e){if(e.length===0)return!1;var t=e.reduce((r,n)=>{var{type:o,value:s}=n;return Tt(o)&&o.length>0&&r.$exception_types.push(o),Tt(s)&&s.length>0&&r.$exception_values.push(s),r},{$exception_types:[],$exception_values:[]});return this.fo.some(r=>{var n=r.values.map(o=>{var s,i=s$[o.operator],l=pt(o.value)?o.value:[o.value],u=(s=t[o.key])!==null&&s!==void 0?s:[];return l.length>0&&i(l,u)});return r.type==="OR"?n.some(Boolean):n.every(Boolean)})}Co(e){return e.flatMap(t=>{var r,n;return(r=(n=t.stacktrace)==null?void 0:n.frames)!==null&&r!==void 0?r:[]}).some(t=>t.filename&&t.filename.startsWith("chrome-extension://"))}Io(e){if(e.length>0){var t,r,n,o,s=(t=(r=e[0].stacktrace)==null?void 0:r.frames)!==null&&t!==void 0?t:[],i=s[s.length-1];return(n=i==null||(o=i.filename)==null?void 0:o.includes("posthog.com/static"))!==null&&n!==void 0&&n}return!1}xo(e){return!at(e)&&pt(e)}}},g7=Re({productTours:class{get ni(){return this._instance.persistence}constructor(e){this.Eo=null,this.Mo=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){"productTours"in e&&(this.ni&&this.ni.register({[vm]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.Eo||(e=this._instance).config.disable_product_tours||(t=e.persistence)==null||!t.get_property(vm)||this.lr(()=>this.Po())}lr(e){var t,r;(t=Je.__PosthogExtensions__)!=null&&t.generateProductTours?e():(r=Je.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"product-tours",n=>{n?Hy.error("Could not load product tours script",n):e()})}Po(){var e;!this.Eo&&(e=Je.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.Eo=Je.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!pt(this.Mo)||t){var r=this.ni;if(r){var n=r.props[Ml];if(pt(n)&&!t)return this.Mo=n,void e(n,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:o=>{var s=o.statusCode;if(s!==200||!o.json){var i="Product Tours API could not be loaded, status: "+s;return Hy.error(i),void e([],{isLoaded:!1,error:i})}var l=pt(o.json.product_tours)?o.json.product_tours:[];this.Mo=l,r&&r.register({[Ml]:l}),e(l,{isLoaded:!0})}})}else e(this.Mo,{isLoaded:!0})}getActiveProductTours(e){at(this.Eo)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Eo.getActiveProductTours(e)}showProductTour(e){var t;(t=this.Eo)==null||t.showTourById(e)}previewTour(e){this.Eo?this.Eo.previewTour(e):this.lr(()=>{var t;this.Po(),(t=this.Eo)==null||t.previewTour(e)})}dismissProductTour(){var e;(e=this.Eo)==null||e.dismissTour("user_clicked_skip")}nextStep(){var e;(e=this.Eo)==null||e.nextStep()}previousStep(){var e;(e=this.Eo)==null||e.previousStep()}clearCache(){var e;this.Mo=null,(e=this.ni)==null||e.unregister(Ml)}resetTour(e){var t;(t=this.Eo)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.Eo)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.Eo)==null||t.cancelPendingTour(e)}}},td),v7={siteApps:class{constructor(e){this._instance=e,this.Ro=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Oo(e,t){if(t){var r=this.globalsForEvent(t);this.Ro.push(r),this.Ro.length>1e3&&(this.Ro=this.Ro.slice(10))}}get siteAppLoaders(){var e;return(e=Je._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.Oo.bind(this));this.Lo=()=>{e(),this.Ro=[],this.Lo=void 0}}}globalsForEvent(e){var t,r,n,o,s,i,l;if(!e)throw new Error("Event payload is required");var u={},d=this._instance.get_property("$groups")||[],p=this._instance.get_property("$stored_group_properties")||{};for(var[f,m]of Object.entries(p))u[f]={id:d[f],type:f,properties:m};var{$set_once:h,$set:v}=e;return{event:Re({},sI(e,a7),{properties:Re({},e.properties,v?{$set:Re({},(t=(r=e.properties)==null?void 0:r.$set)!==null&&t!==void 0?t:{},v)}:{},h?{$set_once:Re({},(n=(o=e.properties)==null?void 0:o.$set_once)!==null&&n!==void 0?n:{},h)}:{}),elements_chain:(s=(i=e.properties)==null?void 0:i.$elements_chain)!==null&&s!==void 0?s:"",distinct_id:(l=e.properties)==null?void 0:l.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}}setupSiteApp(e){var t=this.apps[e.id],r=()=>{var i;!t.errored&&this.Ro.length&&(Wn.info("Processing "+this.Ro.length+" events for site app with id "+e.id),this.Ro.forEach(l=>t.processEvent==null?void 0:t.processEvent(l)),t.processedBuffer=!0),Object.values(this.apps).every(l=>l.processedBuffer||l.errored)&&((i=this.Lo)==null||i.call(this))},n=!1,o=i=>{t.errored=!i,t.loaded=!0,Wn.info("Site app with id "+e.id+" "+(i?"loaded":"errored")),n&&r()};try{var{processEvent:s}=e.init({posthog:this._instance,callback(i){o(i)}});s&&(t.processEvent=s),n=!0}catch(i){Wn.error(Uy+e.id,i),o(!1)}if(n&&t.loaded)try{r()}catch(i){Wn.error("Error while processing buffered events PostHog app with config id "+e.id,i),t.errored=!0}}Fo(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var r of e)this.setupSiteApp(r)}Ao(e){if(Object.keys(this.apps).length!==0){var t=this.globalsForEvent(e);for(var r of Object.values(this.apps))try{r.processEvent==null||r.processEvent(t)}catch(n){Wn.error("Error while processing event "+e.event+" for site app "+r.id,n)}}}onRemoteConfig(e){var t,r,n,o=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.Fo(),void this._instance.on("eventCaptured",u=>this.Ao(u))):void Wn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((r=this.Lo)==null||r.call(this),(n=e.siteApps)!=null&&n.length)if(this.isEnabled){var s=function(u){var d;Je["__$$ph_site_app_"+u]=o._instance,(d=Je.__PosthogExtensions__)==null||d.loadSiteApp==null||d.loadSiteApp(o._instance,l,p=>{if(p)return Wn.error(Uy+u,p)})};for(var{id:i,url:l}of e.siteApps)s(i)}else Wn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},b7={tracingHeaders:class{constructor(e){this.No=void 0,this.$o=void 0,this.so=()=>{var t,r,n=this.Do()||[];Le(this.No)&&((t=Je.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null||t._patchXHR(n,this._instance.get_distinct_id(),this._instance.sessionManager)),Le(this.$o)&&((r=Je.__PosthogExtensions__)==null||(r=r.tracingHeadersPatchFns)==null||r._patchFetch(n,this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}initialize(){this.startIfEnabledOrStop()}lr(e){var t,r;(t=Je.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns&&e(),(r=Je.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"tracing-headers",n=>{if(n)return s7.error("failed to load script",n);e()})}Do(){var e;return(e=this._instance.config.addTracingHeaders)!==null&&e!==void 0?e:this._instance.config.__add_tracing_headers}startIfEnabledOrStop(){var e,t;this.Do()?this.lr(this.so):((e=this.No)==null||e.call(this),(t=this.$o)==null||t.call(this),this.No=void 0,this.$o=void 0)}}},_7=Re({surveys:class{get qt(){return this._instance.config}constructor(e){this.qo=void 0,this._surveyManager=null,this.jo=!1,this.Ho=[],this.Uo=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.qt.disable_surveys){var t=e.surveys;if(at(t))return gt.warn("Flags not loaded yet. Not loading surveys.");var r=pt(t);this.qo=r?t.length>0:t,gt.info("flags response received, isSurveysEnabled: "+this.qo),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var r=localStorage.key(t);(r!=null&&r.startsWith(Mm)||r!=null&&r.startsWith("inProgressSurvey_"))&&e.push(r)}e.forEach(n=>localStorage.removeItem(n))}loadIfEnabled(){if(!this._surveyManager)if(this.jo)gt.info("Already initializing surveys, skipping...");else if(this.qt.disable_surveys)gt.info(Wy);else if(this.qt.cookieless_mode&&this._instance.consent.isOptedOut())gt.info("Not loading surveys in cookieless mode without consent.");else{var e=Je==null?void 0:Je.__PosthogExtensions__;if(e){if(!Le(this.qo)||this.qt.advanced_enable_surveys){var t=this.qo||this.qt.advanced_enable_surveys;this.jo=!0;try{var r=e.generateSurveys;if(r)return void this.Bo(r,t);var n=e.loadExternalDependency;if(!n)return void this.zo(qg);n(this._instance,"surveys",o=>{o||!e.generateSurveys?this.zo("Could not load surveys script",o):this.Bo(e.generateSurveys,t)})}catch(o){throw this.zo("Error initializing surveys",o),o}finally{this.jo=!1}}}else gt.error("PostHog Extensions not found.")}}Bo(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new u7(this._instance),gt.info("Surveys loaded successfully"),this.Vo({isLoaded:!0})}zo(e,t){gt.error(e,t),this.Vo({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Ho.push(e),this._surveyManager&&this.Vo({isLoaded:!0}),()=>{this.Ho=this.Ho.filter(t=>t!==e)}}getSurveys(e,t){if(t===void 0&&(t=!1),this.qt.disable_surveys)return gt.info(Wy),e([]);var r,n=this._instance.get_property(wm);if(n&&!t)return e(n,{isLoaded:!0});typeof Promise<"u"&&this.Uo?this.Uo.then(o=>{var{surveys:s,context:i}=o;return e(s,i)}):(typeof Promise<"u"&&(this.Uo=new Promise(o=>{r=o})),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.qt.token),method:"GET",timeout:this.qt.surveys_request_timeout_ms,callback:o=>{var s;this.Uo=null;var i=o.statusCode;if(i!==200||!o.json){var l="Surveys API could not be loaded, status: "+i;gt.error(l);var u={isLoaded:!1,error:l};return e([],u),void(r==null||r({surveys:[],context:u}))}var d,p=o.json.surveys||[],f=p.filter(h=>function(v){return!(!v.start_date||v.end_date)}(h)&&(function(v){var g;return!((g=v.conditions)==null||(g=g.events)==null||(g=g.values)==null||!g.length)}(h)||function(v){var g;return!((g=v.conditions)==null||(g=g.actions)==null||(g=g.values)==null||!g.length)}(h)));f.length>0&&((d=this._surveyEventReceiver)==null||d.register(f)),(s=this._instance.persistence)==null||s.register({[wm]:p});var m={isLoaded:!0};e(p,m),r==null||r({surveys:p,context:m})}}))}Vo(e){for(var t of this.Ho)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(r){gt.error("Error in survey callback",r)}}getActiveMatchingSurveys(e,t){if(t===void 0&&(t=!1),!at(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);gt.warn("init was not called")}Wo(e){var t=null;return this.getSurveys(r=>{var n;t=(n=r.find(o=>o.id===e))!==null&&n!==void 0?n:null}),t}Zo(e){if(at(this._surveyManager))return{eligible:!1,reason:wp};var t=typeof e=="string"?this.Wo(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(at(this._surveyManager))return gt.warn("init was not called"),{visible:!1,disabledReason:wp};var t=this.Zo(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return at(this._surveyManager)?(gt.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:wp})):new Promise(r=>{this.getSurveys(n=>{var o,s=(o=n.find(l=>l.id===e))!==null&&o!==void 0?o:null;if(s){var i=this.Zo(s);r({visible:i.eligible,disabledReason:i.reason})}else r({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t,r){var n;if(at(this._surveyManager))gt.warn("init was not called");else{var o=typeof e=="string"?this.Wo(e):e;if(o!=null&&o.id)if(V9.includes(o.type)){var s=Oe==null?void 0:Oe.querySelector(t);if(s)return(n=o.appearance)!=null&&n.surveyPopupDelaySeconds?(gt.info("Rendering survey "+o.id+" with delay of "+o.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var i,l;gt.info("Rendering survey "+o.id+" with delay of "+((i=o.appearance)==null?void 0:i.surveyPopupDelaySeconds)+" seconds"),(l=this._surveyManager)==null||l.renderSurvey(o,s,r),gt.info("Survey "+o.id+" rendered")},1e3*o.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(o,s,r);gt.warn("Survey element not found")}else gt.warn("Surveys of type "+o.type+" cannot be rendered in the app");else gt.warn("Survey not found")}}displaySurvey(e,t){var r;if(at(this._surveyManager))gt.warn("init was not called");else{var n=this.Wo(e);if(n){var o=n;if((r=n.appearance)!=null&&r.surveyPopupDelaySeconds&&t.ignoreDelay&&(o=Re({},n,{appearance:Re({},n.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==kc.Popover&&t.initialResponses&>.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),t.ignoreConditions===!1){var s=this.canRenderSurvey(n);if(!s.visible)return void gt.warn("Survey is not eligible to be displayed: ",s.disabledReason)}t.displayType!==kc.Inline?this._surveyManager.handlePopoverSurvey(o,t):this.renderSurvey(o,t.selector,t.properties)}else gt.warn("Survey not found")}}cancelPendingSurvey(e){at(this._surveyManager)?gt.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload()}}},td),y7={toolbar:class{constructor(e){this.instance=e}Go(e){Je.ph_toolbar_state=e}Qo(){var e;return(e=Je.ph_toolbar_state)!==null&&e!==void 0?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,r){if(e===void 0&&(e=void 0),t===void 0&&(t=void 0),r===void 0&&(r=void 0),zI(this.instance.config)||!oe||!Oe)return!1;e=e??oe.location,r=r??oe.history;try{if(!t){try{oe.localStorage.setItem("test","test"),oe.localStorage.removeItem("test")}catch{return!1}t=oe==null?void 0:oe.localStorage}var n,o=d7||Nc(e.hash,"__posthog")||Nc(e.hash,"state"),s=o?cy(()=>JSON.parse(atob(decodeURIComponent(o))))||cy(()=>JSON.parse(decodeURIComponent(o))):null;return s&&s.action==="ph_authorize"?((n=s).source="url",n&&Object.keys(n).length>0&&(s.desiredHash?e.hash=s.desiredHash:r?r.replaceState(r.state,"",e.pathname+e.search):e.hash="")):((n=JSON.parse(t.getItem(qy)||"{}")).source="localstorage",delete n.userIntent),!(!n.token||this.instance.config.token!==n.token||(this.loadToolbar(n),0))}catch{return!1}}Jo(e){var t=Je.ph_load_toolbar||Je.ph_load_editor;!at(t)&&An(t)?t(e,this.instance):Gy.warn("No toolbar load function found")}loadToolbar(e){var t=!(Oe==null||!Oe.getElementById(DI));if(!oe||t)return!1;var r=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,n=Re({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(oe.localStorage.setItem(qy,JSON.stringify(Re({},n,{source:void 0}))),this.Qo()===2)this.Jo(n);else if(this.Qo()===0){var o;this.Go(1),(o=Je.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this.instance,"toolbar",s=>{if(s)return Gy.error("[Toolbar] Failed to load",s),void this.Go(0);this.Go(2),this.Jo(n)}),Lt(oe,"turbolinks:load",()=>{this.Go(0),this.loadToolbar(n)})}return!0}Ko(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,r){return e===void 0&&(e=void 0),t===void 0&&(t=void 0),r===void 0&&(r=void 0),this.maybeLoadToolbar(e,t,r)}}},x7=Re({experiments:nr},td),w7={conversations:class{constructor(e){this.Yo=void 0,this._conversationsManager=null,this.Xo=!1,this.ea=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;at(t)||(_n(t)?this.Yo=t:(this.Yo=t.enabled,this.ea=t),this.loadIfEnabled())}}reset(){var e;(e=this._conversationsManager)==null||e.reset(),this._conversationsManager=null,this.Yo=void 0,this.ea=null}loadIfEnabled(){if(!(this._conversationsManager||this.Xo||this._instance.config.disable_conversations||zI(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=Je==null?void 0:Je.__PosthogExtensions__;if(e&&!Le(this.Yo)&&this.Yo)if(this.ea&&this.ea.token){this.Xo=!0;try{var t=e.initConversations;if(t)return this.ta(t),void(this.Xo=!1);var r=e.loadExternalDependency;if(!r)return void this.ra(qg);r(this._instance,"conversations",n=>{n||!e.initConversations?this.ra("Could not load conversations script",n):this.ta(e.initConversations),this.Xo=!1})}catch(n){this.ra("Error initializing conversations",n),this.Xo=!1}}else Hr.error("Conversations enabled but missing token in remote config.")}}ta(e){if(this.ea)try{this._conversationsManager=e(this.ea,this._instance),Hr.info("Conversations loaded successfully")}catch(t){this.ra("Error completing conversations initialization",t)}else Hr.error("Cannot complete initialization: remote config is null")}ra(e,t){Hr.error(e,t),this._conversationsManager=null,this.Xo=!1}show(){this._conversationsManager?this._conversationsManager.show():Hr.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Yo===!0&&!zn(this._conversationsManager)}isVisible(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.isVisible())!==null&&e!==void 0&&e}sendMessage(e,t,r){var n=this;return Wr(function*(){return n._conversationsManager?n._conversationsManager.sendMessage(e,t,r):(Hr.warn(yo),null)})()}getMessages(e,t){var r=this;return Wr(function*(){return r._conversationsManager?r._conversationsManager.getMessages(e,t):(Hr.warn(yo),null)})()}markAsRead(e){var t=this;return Wr(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(Hr.warn(yo),null)})()}getTickets(e){var t=this;return Wr(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(Hr.warn(yo),null)})()}requestRestoreLink(e){var t=this;return Wr(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(Hr.warn(yo),null)})()}restoreFromToken(e){var t=this;return Wr(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(Hr.warn(yo),null)})()}restoreFromUrlToken(){var e=this;return Wr(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(Hr.warn(yo),null)})()}getCurrentTicketId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getCurrentTicketId())!==null&&e!==void 0?e:null}getWidgetSessionId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getWidgetSessionId())!==null&&e!==void 0?e:null}ln(){var e;(e=this._conversationsManager)==null||e.setIdentity()}hn(){var e;(e=this._conversationsManager)==null||e.clearIdentity()}}},E7={logs:class{constructor(e){var t;this.ia=!1,this.na=!1,this.Gt=Et("[logs]"),this.sa=[],this.oa=0,this.aa=0,this.ua=!1,this._instance=e,this._instance&&(t=this._instance.config.logs)!=null&&t.captureConsoleLogs&&(this.ia=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,r=(t=e.logs)==null?void 0:t.captureConsoleLogs;!at(r)&&r&&(this.ia=!0,this.loadIfEnabled())}reset(){this.sa=[],this.qr&&(clearTimeout(this.qr),this.qr=void 0),this.oa=0,this.aa=0,this.ua=!1}loadIfEnabled(){if(this.ia&&!this.na){var e=Je==null?void 0:Je.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",r=>{var n;r||(n=e.logs)==null||!n.initializeLogs?this.Gt.error("Could not load logs script",r):(e.logs.initializeLogs(this._instance),this.na=!0)}):this.Gt.error(qg)}else this.Gt.error("PostHog Extensions not found.")}}captureLog(e){var t,r,n,o,s,i;if(this._instance.is_capturing())if(e&&e.body){var l=(t=(r=this._instance.config.logs)==null?void 0:r.flushIntervalMs)!==null&&t!==void 0?t:3e3,u=(n=(o=this._instance.config.logs)==null?void 0:o.maxLogsPerInterval)!==null&&n!==void 0?n:1e3,d=Date.now();if(l>d-this.aa||(this.aa=d,this.oa=0,this.ua=!1),u>this.oa){this.oa++;var p=function(f,m){var h=f.level||"info",{text:v,number:g}=CI[h]||MG,b=String(Date.now())+"000000",_={};m.distinctId&&(_.posthogDistinctId=m.distinctId),m.sessionId&&(_.sessionId=m.sessionId),m.currentUrl&&(_["url.full"]=m.currentUrl),m.screenName&&(_["screen.name"]=m.screenName),m.appState&&(_["app.state"]=m.appState),m.activeFeatureFlags&&m.activeFeatureFlags.length>0&&(_.feature_flags=m.activeFeatureFlags);var y=Re({},_,f.attributes||{}),x={timeUnixNano:b,observedTimeUnixNano:b,severityNumber:g,severityText:v,body:{stringValue:f.body},attributes:iy(y)};return f.trace_id&&(x.traceId=f.trace_id),f.span_id&&(x.spanId=f.span_id),Le(f.trace_flags)||(x.flags=f.trace_flags),x}(e,this.la());this.sa.push({record:p}),((s=(i=this._instance.config.logs)==null?void 0:i.maxBufferSize)!==null&&s!==void 0?s:100)>this.sa.length?this.ha():this.flushLogs()}else this.ua||(this.Gt.warn("captureLog dropping logs: exceeded "+u+" logs per "+l+"ms"),this.ua=!0)}else this.Gt.warn("captureLog requires a body")}get logger(){return this.ca||(this.ca={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.ca}flushLogs(e){if(this.qr&&(clearTimeout(this.qr),this.qr=void 0),this.sa.length!==0){var t=this.sa;this.sa=[];var r=this._instance.config.logs,n=Re({"service.name":(r==null?void 0:r.serviceName)||"unknown_service"},(r==null?void 0:r.environment)&&{"deployment.environment":r.environment},(r==null?void 0:r.serviceVersion)&&{"service.version":r.serviceVersion},r==null?void 0:r.resourceAttributes),o=function(i,l,u,d){return{resourceLogs:[{resource:{attributes:iy(l)},scopeLogs:[{scope:{name:u,version:d},logRecords:i}]}]}}(t.map(i=>i.record),n,mr.LIB_NAME,mr.LIB_VERSION),s=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Bi({method:"POST",url:s,data:o,compression:"best-available",batchKey:"logs",transport:e})}}ha(){var e,t;this.qr||(this.qr=setTimeout(()=>{this.qr=void 0,this.flushLogs()},(e=(t=this._instance.config.logs)==null?void 0:t.flushIntervalMs)!==null&&e!==void 0?e:3e3))}la(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:r}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=r}if(Je!=null&&(e=Je.location)!=null&&e.href&&(t.currentUrl=Je.location.href),this._instance.featureFlags){var n=this._instance.featureFlags.getFlags();n&&n.length>0&&(t.activeFeatureFlags=n)}return t}}},S7=Re({},td,f7,m7,h7,g7,v7,_7,b7,y7,x7,w7,E7);Dr.__defaultExtensionClasses=Re({},S7);var Jy,Fc=(Jy=Zi[xs]=new Dr,function(){function e(){e.done||(e.done=!0,l$=!1,xt(Zi,function(t){t._dom_loaded()}))}Oe!=null&&Oe.addEventListener?Oe.readyState==="complete"?e():Lt(Oe,"DOMContentLoaded",e,{capture:!1}):oe&&De.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),Jy);const C7=Object.freeze(Object.defineProperty({__proto__:null,Compression:rn,DisplaySurveyType:kc,PostHog:Dr,ProductTourEventName:YI,ProductTourEventProperties:Am,SurveyEventName:Rs,SurveyEventProperties:Fl,SurveyEventType:ys,SurveyType:zl,default:Fc,posthog:Fc},Symbol.toStringTag,{value:"Module"})),P7=["/m/","/faq","/glossary","/blog","/compare","/vs/","/help"];function R7(e){return P7.some(t=>e.startsWith(t))}function T7(){const{pathname:e}=Xr();return a.useEffect(()=>{Ew()&&(R7(e)?Fc.startSessionRecording():Fc.stopSessionRecording())},[e]),null}const I7=()=>{if(typeof window>"u")return null;const e=window.location.hostname;return e==="test.avalog.ru"||e.startsWith("staging.")?c.jsxs("div",{className:"staging-badge",role:"status","aria-label":"staging environment",children:[c.jsx("span",{className:"staging-badge__dot","aria-hidden":"true",children:"●"}),"STAGING"]}):null};function Ct({to:e}){const{search:t,hash:r}=Xr();return c.jsx(Ht,{to:`${e}${t}${r}`,replace:!0})}function $7(){const{id:e}=mx(),{search:t,hash:r}=Xr();return c.jsx(Ht,{to:`/order/${e??""}${t}${r}`,replace:!0})}function yl({from:e,to:t}){const{pathname:r,search:n,hash:o}=Xr(),s=r.startsWith(e)?r.slice(e.length):"";return c.jsx(Ht,{to:`${t}${s}${n}${o}`,replace:!0})}const A7=a.lazy(()=>C(()=>import("./MarketingHomePage-D3yDpGVH.js"),__vite__mapDeps([26,1,8,25,4,5,9,10,27,28,29,7,30,31,32,3,6,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57]))),j7=a.lazy(()=>C(()=>import("./MarketingCalculatorPage-DO9jkt3s.js"),__vite__mapDeps([58,1,59,34,8,35,36,5,37,38,28,4,29,7,30,31,32,3,6,33,39,40,41,60,61,46,48,55,9,10]))),O7=a.lazy(()=>C(()=>import("./MarketingCustomsCalculatorPage-C0PQQ0in.js"),__vite__mapDeps([62,1,4,28,8,29,7,30,31,32,3,5,6,33,63,64,65,66,67,68,38,69,70,46,71,9,10]))),N7=a.lazy(()=>C(()=>import("./MarketingSearchResultsPage-N0YEUgKT.js"),__vite__mapDeps([72,1,8,4,61,60,35,34,36,5,28,29,7,30,31,32,3,6,33,73,74,75,41,76,77,78,79,80,81,82,68,83,71,46,84,52,64,48,85,66,86,17,40,87,88,89,9,10]))),D7=a.lazy(()=>C(()=>import("./MarketingOrderDetailsPage-BRlNwHSN.js"),__vite__mapDeps([90,1,4,61,35,28,8,29,7,30,31,32,3,5,6,33,91,92,73,93,41,94,95,96,97,87,98,80,99,100,79,101,46,68,102,103,71,83,89,104,105,88,106,107,78,108,9,10]))),Zy=a.lazy(()=>C(()=>import("./MarketingSnapshotViewPage-Cp8VBd4C.js"),__vite__mapDeps([109,1,4,61,28,8,29,7,30,31,32,3,5,6,33,92,110,73,93,41,104,89,83,9,10]))),k7=a.lazy(()=>C(()=>import("./MarketingMailingViewPage-qysPAH-S.js"),__vite__mapDeps([111,1,4,61,28,8,29,7,30,31,32,3,5,6,33,77,73,41,78,79,80,81,82,68,83,71,46,84,112,38,9,10]))),M7=a.lazy(()=>C(()=>import("./MarketingTrackingPage-BmTlXMVM.js"),__vite__mapDeps([113,1,4,61,28,8,29,7,30,31,32,3,5,6,33,114,41,53,83,89,115,9,10]))),L7=a.lazy(()=>C(()=>import("./MarketingForgotPasswordPage-CzECGnFj.js"),__vite__mapDeps([116,1,79,4,28,8,29,7,30,31,32,3,5,6,33,71,9,10]))),z7=a.lazy(()=>C(()=>import("./MarketingSettingsPage-BQwHAN7l.js"),__vite__mapDeps([117,1,4,28,8,29,7,30,31,32,3,5,6,33,79,118,61,98,83,48,119,120,121,122,100,123,124,103,125,47,9,10]))),F7=a.lazy(()=>C(()=>import("./MarketingOrdersPage-D5BR-FuN.js"),__vite__mapDeps([126,1,8,4,127,128,129,108,53,130,51,28,29,7,30,31,32,3,5,6,33,82,45,131,9,10]))),V7=a.lazy(()=>C(()=>import("./MarketingMailingsArchivePage-BPUEqrAt.js"),__vite__mapDeps([132,1,8,4,61,129,28,29,7,30,31,32,3,5,6,33,133,112,83,108,45,51,9,10]))),B7=a.lazy(()=>C(()=>import("./MarketingRouteSubscriptionsPage-D0vRWCmH.js"),__vite__mapDeps([134,1,8,135,4,87,61,129,28,29,7,30,31,32,3,5,6,33,136,83,108,101,124,9,10]))),H7=a.lazy(()=>C(()=>import("./MarketingNotificationsInboxPage-BQu7Kg07.js"),__vite__mapDeps([137,1,4,28,8,29,7,30,31,32,3,5,6,33,138,61,83,139,9,10]))),U7=a.lazy(()=>C(()=>import("./MarketingExchangeAboutPage-DalyP_W5.js"),__vite__mapDeps([140,1,4,28,8,29,7,30,31,32,3,5,6,33,141,142,46,143,123,55,53,9,10]))),W7=a.lazy(()=>C(()=>import("./MarketingExchangeListPage-CRLbBi0L.js"),__vite__mapDeps([144,1,8,4,61,28,29,7,30,31,32,3,5,6,33,27,141,100,83,104,9,10]))),q7=a.lazy(()=>C(()=>import("./MarketingExchangeCreatePage-BWVuuPAb.js"),__vite__mapDeps([145,1,79,4,28,8,29,7,30,31,32,3,5,6,33,71,141,83,9,10]))),G7=a.lazy(()=>C(()=>import("./MarketingExchangeDetailPage-DYVEUN-m.js"),__vite__mapDeps([146,1,8,4,61,79,83,143,28,29,7,30,31,32,3,5,6,33,71,89,87,106,123,9,10]))),K7=a.lazy(()=>C(()=>import("./MarketingExchangeManagePage-BPTJOQad.js"),__vite__mapDeps([147,1,8,4,61,28,29,7,30,31,32,3,5,6,33,71,83,123,148,143,149,9,10]))),X7=a.lazy(()=>C(()=>import("./MarketingBidEditPage-BbMMbr3p.js"),__vite__mapDeps([150,1,79,8,4,61,28,29,7,30,31,32,3,5,6,33,71,143,83,118,87,124,9,10]))),Y7=a.lazy(()=>C(()=>import("./MarketingExchangeChatPage-Dfa2JSAL.js"),__vite__mapDeps([151,1,8,4,61,28,29,7,30,31,32,3,5,6,33,71,149,83,65,9,10]))),J7=a.lazy(()=>C(()=>import("./MarketingCounterOffersPage-BESepJ-F.js"),__vite__mapDeps([152,1,8,4,61,28,29,7,30,31,32,3,5,6,33,71,153,83,106,123,9,10]))),Z7=a.lazy(()=>C(()=>import("./MarketingBidAttachmentsPage-BjevGwBT.js"),__vite__mapDeps([154,1,8,4,61,28,29,7,30,31,32,3,5,6,33,71,155,83,84,108,124,9,10]))),Q7=a.lazy(()=>C(()=>import("./MarketingExchangeWatchListPage-BSkXshMA.js"),__vite__mapDeps([156,1,8,4,61,28,29,7,30,31,32,3,5,6,33,83,104,9,10]))),eK=a.lazy(()=>C(()=>import("./MarketingExchangeClonePage-CtcKN6N2.js"),__vite__mapDeps([157,1,8,4,61,28,29,7,30,31,32,3,5,6,33,71,88,83,9,10]))),tK=a.lazy(()=>C(()=>import("./MarketingSupplierPortalPage-k6bmiU_2.js"),__vite__mapDeps([158,1,4,28,8,29,7,30,31,32,3,5,6,33,143,123,45,159,9,10]))),rK=a.lazy(()=>C(()=>import("./MarketingSupplierAuctionsPage-B38Tsxbn.js"),__vite__mapDeps([160,1,8,4,61,28,29,7,30,31,32,3,5,6,33,143,83,104,9,10]))),nK=a.lazy(()=>C(()=>import("./MarketingSupplierMyBidsPage-C8OzS26e.js"),__vite__mapDeps([161,1,8,4,61,28,29,7,30,31,32,3,5,6,33,83,143,9,10]))),Qy=a.lazy(()=>C(()=>import("./MarketingSupplierReputationPage-xrQG6dLg.js"),__vite__mapDeps([162,1,8,4,61,28,29,7,30,31,32,3,5,6,33,71,83,103,123,149,143,9,10]))),oK=a.lazy(()=>C(()=>import("./MarketingAdminExchangeStatsPage-BnFGp58x.js"),__vite__mapDeps([163,1,8,4,61,28,29,7,30,31,32,3,5,6,33,71,70,83,87,143,123,149,9,10]))),sK=a.lazy(()=>C(()=>import("./MarketingAdminChatModerationPage-BOHE4fT6.js"),__vite__mapDeps([164,1,8,4,61,28,29,7,30,31,32,3,5,6,33,71,70,83,87,65,106,9,10]))),iK=a.lazy(()=>C(()=>import("./MarketingAdminRequestAuditPage-CsR34M7-.js"),__vite__mapDeps([165,1,8,4,61,28,29,7,30,31,32,3,5,6,33,71,70,83,45,143,149,106,9,10]))),aK=a.lazy(()=>C(()=>import("./MarketingAdminOverviewPage-DMN3Djhx.js"),__vite__mapDeps([166,1,8,4,61,28,29,7,30,31,32,3,5,6,33,167,168,83,65,9,46,169,153,10]))),lK=a.lazy(()=>C(()=>import("./MarketingExchangePublicStatsPage-L6B5b5vB.js"),__vite__mapDeps([170,1,8,4,61,28,29,7,30,31,32,3,5,6,33,83,169,143,9,10]))),cK=a.lazy(()=>C(()=>import("./MarketingPreviewTourPage-DuIQXZQ6.js"),__vite__mapDeps([171,1,4,28,8,29,7,30,31,32,3,5,6,33,106,48,100,143,149,153,155,88,70,103,87,123,9,10])));function uK(){return[c.jsx(E,{path:"/m",element:c.jsx(A7,{})},"m-home"),c.jsx(E,{path:"/m/preview",element:c.jsx(cK,{})},"m-preview"),c.jsx(E,{path:"/calculator/customs",element:c.jsx(O7,{})},"m-calc-customs"),c.jsx(E,{path:"/calculator",element:c.jsx(j7,{})},"m-calc"),c.jsx(E,{path:"/search",element:c.jsx(N7,{})},"m-results"),c.jsx(E,{path:"/order/:id",element:c.jsx(D7,{})},"m-order"),c.jsx(E,{path:"/q/:token",element:c.jsx(Zy,{})},"m-q"),c.jsx(E,{path:"/p/:token",element:c.jsx(Zy,{})},"m-p"),c.jsx(E,{path:"/mailing-view/:token",element:c.jsx(k7,{})},"m-mailing-view"),c.jsx(E,{path:"/m/tracking/:applicationNumber",element:c.jsx(M7,{})},"m-tracking"),c.jsx(E,{path:"/m/auth",element:c.jsx(Ct,{to:"/login"})},"m-auth"),c.jsx(E,{path:"/forgot-password",element:c.jsx(L7,{})},"m-forgot"),c.jsx(E,{path:"/lk/settings",element:c.jsx(z7,{})},"lk-settings"),c.jsx(E,{path:"/lk/orders",element:c.jsx(F7,{})},"lk-orders"),c.jsx(E,{path:"/lk/mailings",element:c.jsx(V7,{})},"lk-mailings"),c.jsx(E,{path:"/lk/subscriptions",element:c.jsx(B7,{})},"lk-subscriptions"),c.jsx(E,{path:"/dashboard",element:c.jsx(Ct,{to:"/lk"})},"m-dashboard"),c.jsx(E,{path:"/dashboard/settings",element:c.jsx(Ct,{to:"/lk/settings"})},"m-settings"),c.jsx(E,{path:"/dashboard/orders",element:c.jsx(Ct,{to:"/lk/orders"})},"m-orders"),c.jsx(E,{path:"/dashboard/saved",element:c.jsx(Ct,{to:"/lk/saved-calcs"})},"m-saved"),c.jsx(E,{path:"/dashboard/mailings",element:c.jsx(Ct,{to:"/lk/mailings"})},"m-mailings"),c.jsx(E,{path:"/dashboard/subscriptions",element:c.jsx(Ct,{to:"/lk/subscriptions"})},"m-subscriptions"),c.jsx(E,{path:"/dashboard/notifications",element:c.jsx(Ct,{to:"/lk/notifications"})},"m-notifications-prefs"),c.jsx(E,{path:"/notifications",element:c.jsx(H7,{})},"m-notifications-inbox"),c.jsx(E,{path:"/exchange/about",element:c.jsx(U7,{})},"m-exchange-about"),c.jsx(E,{path:"/exchange/new",element:c.jsx(q7,{})},"m-exchange-new"),c.jsx(E,{path:"/exchange/watching",element:c.jsx(Q7,{})},"m-exchange-watching"),c.jsx(E,{path:"/exchange/stats",element:c.jsx(lK,{})},"m-exchange-stats"),c.jsx(E,{path:"/exchange/bids/:bidId/attachments",element:c.jsx(Z7,{})},"m-bid-attachments"),c.jsx(E,{path:"/exchange/bids/:bidId/edit",element:c.jsx(X7,{})},"m-bid-edit"),c.jsx(E,{path:"/exchange/bids/:bidId/counter-offers",element:c.jsx(J7,{})},"m-counter-offers"),c.jsx(E,{path:"/exchange/:id/chat",element:c.jsx(Y7,{})},"m-exchange-chat"),c.jsx(E,{path:"/exchange/:id/manage",element:c.jsx(K7,{})},"m-exchange-manage"),c.jsx(E,{path:"/exchange/:id/clone",element:c.jsx(eK,{})},"m-exchange-clone"),c.jsx(E,{path:"/exchange/:id",element:c.jsx(G7,{})},"m-exchange-detail"),c.jsx(E,{path:"/exchange",element:c.jsx(W7,{})},"m-exchange-list"),c.jsx(E,{path:"/m/supplier",element:c.jsx(tK,{})},"m-supplier"),c.jsx(E,{path:"/m/supplier/auctions",element:c.jsx(rK,{})},"m-supplier-auctions"),c.jsx(E,{path:"/m/supplier/bids",element:c.jsx(nK,{})},"m-supplier-bids"),c.jsx(E,{path:"/m/supplier/reputation",element:c.jsx(Qy,{})},"m-supplier-reputation"),c.jsx(E,{path:"/m/supplier/reputation/:userId",element:c.jsx(Qy,{})},"m-supplier-reputation-id"),c.jsx(E,{path:"/m/admin",element:c.jsx(aK,{})},"m-admin-overview"),c.jsx(E,{path:"/m/admin/exchange/stats",element:c.jsx(oK,{})},"m-admin-stats"),c.jsx(E,{path:"/m/admin/exchange/chat-moderation",element:c.jsx(sK,{})},"m-admin-chat-mod"),c.jsx(E,{path:"/m/admin/exchange/requests/:id",element:c.jsx(iK,{})},"m-admin-audit"),c.jsx(E,{path:"/m/reviews",element:c.jsx(Ht,{to:"/reviews",replace:!0})},"m-reviews"),c.jsx(E,{path:"/m/calc",element:c.jsx(Ct,{to:"/calculator"})},"m-calc-redirect"),c.jsx(E,{path:"/m/results",element:c.jsx(Ct,{to:"/search"})},"m-results-redirect"),c.jsx(E,{path:"/m/order/:id",element:c.jsx($7,{})},"m-order-redirect"),c.jsx(E,{path:"/m/forgot-password",element:c.jsx(Ct,{to:"/forgot-password"})},"m-forgot-redirect"),c.jsx(E,{path:"/m/dashboard/settings",element:c.jsx(Ct,{to:"/lk/settings"})},"m-dashboard-settings-redirect"),c.jsx(E,{path:"/m/dashboard/orders",element:c.jsx(Ct,{to:"/lk/orders"})},"m-dashboard-orders-redirect"),c.jsx(E,{path:"/m/dashboard/saved",element:c.jsx(Ct,{to:"/lk/saved-calcs"})},"m-dashboard-saved-redirect"),c.jsx(E,{path:"/m/dashboard/mailings",element:c.jsx(Ct,{to:"/lk/mailings"})},"m-dashboard-mailings-redirect"),c.jsx(E,{path:"/m/dashboard/subscriptions",element:c.jsx(Ct,{to:"/lk/subscriptions"})},"m-dashboard-subscriptions-redirect"),c.jsx(E,{path:"/m/dashboard/notifications",element:c.jsx(Ct,{to:"/lk/notifications"})},"m-dashboard-notifications-redirect"),c.jsx(E,{path:"/m/dashboard",element:c.jsx(Ct,{to:"/lk"})},"m-dashboard-redirect"),c.jsx(E,{path:"/m/profile/settings",element:c.jsx(Ct,{to:"/lk/settings"})},"m-profile-settings-redirect"),c.jsx(E,{path:"/m/profile/orders",element:c.jsx(Ct,{to:"/lk/orders"})},"m-profile-orders-redirect"),c.jsx(E,{path:"/m/profile/saved",element:c.jsx(Ct,{to:"/lk/saved-calcs"})},"m-profile-saved-redirect"),c.jsx(E,{path:"/m/profile",element:c.jsx(Ct,{to:"/lk"})},"m-profile-redirect"),c.jsx(E,{path:"/m/exchange/*",element:c.jsx(yl,{from:"/m/exchange",to:"/exchange"})},"m-exchange-redirect"),c.jsx(E,{path:"/m/notifications",element:c.jsx(Ct,{to:"/notifications"})},"m-notifications-redirect"),c.jsx(E,{path:"/m/q/*",element:c.jsx(yl,{from:"/m/q",to:"/q"})},"m-q-redirect"),c.jsx(E,{path:"/m/p/*",element:c.jsx(yl,{from:"/m/p",to:"/p"})},"m-p-redirect"),c.jsx(E,{path:"/m/mailing-view/*",element:c.jsx(yl,{from:"/m/mailing-view",to:"/mailing-view"})},"m-mailing-view-redirect")]}const dK=({children:e})=>c.jsx(c.Fragment,{children:e}),pK=a.lazy(()=>C(()=>import("./CookieConsentBanner-CpTKrIAX.js"),__vite__mapDeps([172,1,5,47,173,141,8,4,9,10]))),fK=a.lazy(()=>C(()=>import("./AuthForm-BxKHx2RB.js"),__vite__mapDeps([174,1,175,4,35,74,176,36,5,177,9,178,179,180,91,181,182,183,184,136,185,129,186,187,133,128,119,8,10,188]))),mK=a.lazy(()=>C(()=>import("./DesignSystemShowcase-DNWZP_CM.js"),__vite__mapDeps([189,1,4,61,190,8,5,9,10,48,7,95,46,83,41,191]))),hK=a.lazy(()=>C(()=>import("./ServicesIndexPage-BEd-5ctH.js"),__vite__mapDeps([192,1,4,28,8,29,7,30,31,32,3,5,6,33,41,193,194,191,9,10]))),gK=a.lazy(()=>C(()=>import("./PricingPage-B6dnTN9E.js"),__vite__mapDeps([195,1,4,28,8,29,7,30,31,32,3,5,6,33,64,48,196,67,9,10]))),vK=a.lazy(()=>C(()=>import("./WebhookDocsPage-BnB49ENT.js"),__vite__mapDeps([197,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),bK=a.lazy(()=>C(()=>import("./PortalWebhooksPage-BChnEZP0.js"),__vite__mapDeps([198,1,4,61,28,8,29,7,30,31,32,3,5,6,33,100,83,120,88,124,9,10]))),_K=a.lazy(()=>C(()=>import("./AcceptInvitePage-BYQ7k2hj.js"),__vite__mapDeps([199,1,4,28,8,29,7,30,31,32,3,5,6,33,83,46,9,10]))),yK=a.lazy(()=>C(()=>import("./PortalShipmentDetailPage-BSxrHZYH.js"),__vite__mapDeps([200,1,201,8,4,5,9,10,202,61,28,29,7,30,31,32,3,6,33,83,71]))),xK=a.lazy(()=>C(()=>import("./PortalShipmentsPage-CdHqO-Zd.js"),__vite__mapDeps([203,1,204,4,61,28,8,29,7,30,31,32,3,5,6,33,83,9,10]))),wK=a.lazy(()=>C(()=>import("./PortalHomePage-DherzkWw.js"),__vite__mapDeps([205,1,204,4,61,28,8,29,7,30,31,32,3,5,6,33,206,191,169,9,10]))),EK=a.lazy(()=>C(()=>import("./LkOverviewPage-CWvVw_cu.js"),__vite__mapDeps([207,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),SK=a.lazy(()=>C(()=>import("./LkCalcPage-IMWQGSa_.js"),__vite__mapDeps([208,1,4,28,8,29,7,30,31,32,3,5,6,33,59,34,35,36,37,38,39,40,41,71,9,10]))),ex=a.lazy(()=>C(()=>import("./LkApplicationsListPage-B3R2uJJe.js"),__vite__mapDeps([209,1,4,61,28,8,29,7,30,31,32,3,5,6,33,210,82,83,9,10]))),CK=a.lazy(()=>C(()=>import("./LkApplicationPage-oF0JKRNv.js"),__vite__mapDeps([211,1,4,32,46,108,61,30,47,99,176,212,65,213,214,84,83,124,215,28,8,29,7,31,3,5,6,33,148,78,88,216,217,194,71,9,10]))),PK=a.lazy(()=>C(()=>import("./LkDocumentsPage-BNuZ-JA6.js"),__vite__mapDeps([218,1,8,213,4,214,84,32,46,83,124,61,28,29,7,30,31,3,5,6,33,219,75,108,78,9,10]))),RK=a.lazy(()=>C(()=>import("./LkNotificationsPage-gIEHddpF.js"),__vite__mapDeps([220,1,4,28,8,29,7,30,31,32,3,5,6,33,221,61,83,46,139,121,106,9,10]))),TK=a.lazy(()=>C(()=>import("./LkTeamPage-DCazJcaf.js"),__vite__mapDeps([222,1,4,127,8,128,129,108,53,130,51,28,29,7,30,31,32,3,5,6,33,210,176,83,9,10]))),IK=a.lazy(()=>C(()=>import("./LkSavedCalcsPage-NeoAAjCf.js"),__vite__mapDeps([223,1,4,61,28,8,29,7,30,31,32,3,5,6,33,91,83,51,101,105,124,9,10]))),$K=a.lazy(()=>C(()=>import("./LkShipmentsPage-FzSvOVtI.js"),__vite__mapDeps([224,1,4,46,28,8,29,7,30,31,32,3,5,6,33,61,225,130,83,226,9,10]))),AK=a.lazy(()=>C(()=>import("./LkShipmentDetailPage-CHNar91O.js"),__vite__mapDeps([227,8,1,4,61,28,29,7,30,31,32,3,5,6,33,225,71,83,226,78,46,9,10]))),jK=a.lazy(()=>C(()=>import("./LkCustomsPage-BoG_yFdB.js"),__vite__mapDeps([228,1,4,61,28,8,29,7,30,31,32,3,5,6,33,63,38,83,40,46,9,10]))),OK=a.lazy(()=>C(()=>import("./LkShipmentTrackerPage--pPNWy6j.js"),__vite__mapDeps([229,8,1,4,61,28,29,7,30,31,32,3,5,6,33,46,71,216,83,230,105,88,78,9,10]))),NK=a.lazy(()=>C(()=>import("./LkHelpPage-Tshpeveq.js"),__vite__mapDeps([231,1,4,28,8,29,7,30,31,32,3,5,6,33,232,9,10]))),DK=a.lazy(()=>C(()=>import("./LkSalesFastQuotePage-C2EgAySn.js"),__vite__mapDeps([233,1,4,28,8,29,7,30,31,32,3,5,6,33,234,88,235,9,10]))),kK=a.lazy(()=>C(()=>import("./LkSalesLeadsPage-D6i_1eaA.js"),__vite__mapDeps([236,1,4,61,28,8,29,7,30,31,32,3,5,6,33,216,89,88,65,9,10]))),MK=a.lazy(()=>C(()=>import("./LkReferralPage-D5ddB65j.js"),__vite__mapDeps([237,1,4,61,28,8,29,7,30,31,32,3,5,6,33,238,105,83,46,169,88,106,9,10])));a.lazy(()=>C(()=>import("./LkPartnerPage-DTRhhA-7.js"),__vite__mapDeps([239,1,4,61,28,8,29,7,30,31,32,3,5,6,33,238,83,169,46,108,9,10])));const LK=a.lazy(()=>C(()=>import("./ReferralProgramPage-W3ZS43J8.js"),__vite__mapDeps([240,1,4,28,8,29,7,30,31,32,3,5,6,33,149,52,46,105,9,10]))),zK=a.lazy(()=>C(()=>import("./LkAdminCustomersPage-BfroEIJX.js"),__vite__mapDeps([241,1,4,61,28,8,29,7,30,31,32,3,5,6,33,216,130,65,169,153,9,10]))),FK=a.lazy(()=>C(()=>import("./PublicHelpPage-CbS-58uD.js"),__vite__mapDeps([242,1,4,28,8,29,7,30,31,32,3,5,6,33,232,243,48,9,10]))),VK=a.lazy(()=>C(()=>import("./HelpArticlePage-wDs9Vb_f.js"),__vite__mapDeps([244,1,4,61,28,8,29,7,30,31,32,3,5,6,33,232,71,245,9,10]))),tx=a.lazy(()=>C(()=>import("./LkInsuranceClaimPage-QpZI-ke8.js"),__vite__mapDeps([246,1,4,28,8,29,7,30,31,32,3,5,6,33,71,46,230,83,9,10]))),BK=a.lazy(()=>C(()=>import("./LkContractWizardPage-B4gGjPqT.js"),__vite__mapDeps([247,1,4,28,8,29,7,30,31,32,3,5,6,33,210,98,80,214,71,46,230,83,124,9,10]))),HK=a.lazy(()=>C(()=>import("./PublicResearchIndexPage-BoVWKG-W.js"),__vite__mapDeps([248,1,4,28,8,29,7,30,31,32,3,5,6,33,249,173,108,87,9,10]))),UK=a.lazy(()=>C(()=>import("./PublicResearchSmbCostIndexPage-r8zF_-Sh.js"),__vite__mapDeps([250,1,4,28,8,29,7,30,31,32,3,5,6,33,71,48,87,169,108,249,55,47,53,78,173,9,10]))),WK=a.lazy(()=>C(()=>import("./PublicEnFaqPage--R82N3VY.js"),__vite__mapDeps([251,1,4,28,8,29,7,30,31,32,3,5,6,33,252,9,10]))),qK=a.lazy(()=>C(()=>import("./PublicEnFaqArticlePage-DC0Y-vlJ.js"),__vite__mapDeps([253,1,4,28,8,29,7,30,31,32,3,5,6,33,252,9,10]))),GK=a.lazy(()=>C(()=>import("./PublicEnGlossaryIndexPage-IAFBQWDc.js"),__vite__mapDeps([254,1,4,28,8,29,7,30,31,32,3,5,6,33,255,256,9,10]))),KK=a.lazy(()=>C(()=>import("./PublicEnGlossaryTermPage-BR7ROQB7.js"),__vite__mapDeps([257,1,4,28,8,29,7,30,31,32,3,5,6,33,255,9,10]))),XK=a.lazy(()=>C(()=>import("./PublicEnBlogIndexPage-JAyZwfWh.js"),__vite__mapDeps([258,1,4,28,8,29,7,30,31,32,3,5,6,33,259,9,10]))),YK=a.lazy(()=>C(()=>import("./PublicEnBlogArticlePage-B3bah4OK.js"),__vite__mapDeps([260,1,4,28,8,29,7,30,31,32,3,5,6,33,259,9,10]))),JK=a.lazy(()=>C(()=>import("./PublicEnAboutPage-be5fp2uB.js"),__vite__mapDeps([261,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),ZK=a.lazy(()=>C(()=>import("./PublicEnServicesPage-BVM1HaT7.js"),__vite__mapDeps([262,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),QK=a.lazy(()=>C(()=>import("./YdFreightChinaPage-CL3qsSbO.js"),__vite__mapDeps([263,1,264,4,28,8,29,7,30,31,32,3,5,6,33,46,52,9,10]))),eX=a.lazy(()=>C(()=>import("./YdCustomsBrokerPage-CcEVgXQA.js"),__vite__mapDeps([265,1,264,4,28,8,29,7,30,31,32,3,5,6,33,46,52,47,266,9,10]))),tX=a.lazy(()=>C(()=>import("./YdSmbImportPage-DTCpSAT5.js"),__vite__mapDeps([267,1,264,4,28,8,29,7,30,31,32,3,5,6,33,46,52,153,96,9,10]))),rX=a.lazy(()=>C(()=>import("./MultiOriginCalculatorPage-BvkqbFIM.js"),__vite__mapDeps([268,1,4,61,28,8,29,7,30,31,32,3,5,6,33,234,87,95,105,83,9,10]))),nX=a.lazy(()=>C(()=>import("./PlansPage-B-yYacm8.js"),__vite__mapDeps([269,1,4,28,8,29,7,30,31,32,3,5,6,33,64,48,196,9,10]))),oX=a.lazy(()=>C(()=>import("./LoginPage-EEFwTu3u.js"),__vite__mapDeps([270,8,1,4,61,28,29,7,30,31,32,3,5,6,33,9,10]))),sX=a.lazy(()=>C(()=>import("./SignupLegalEntityPage-ByVu3QqR.js"),__vite__mapDeps([271,1,234,8,4,28,29,7,30,31,32,3,5,6,33,103,272,235,83,71,9,10]))),iX=a.lazy(()=>C(()=>import("./PublicTrackPage-CH6_Mjpw.js"),__vite__mapDeps([273,1,4,61,28,8,29,7,30,31,32,3,5,6,33,105,191,9,10]))),aX=a.lazy(()=>C(()=>import("./SupplierPortalPage-iktL3uyN.js"),__vite__mapDeps([274,1,4,5,57,83,30,230,84,46,8,9,10]))),lX=a.lazy(()=>C(()=>import("./ToolsHubPage-DgsI_3wD.js"),__vite__mapDeps([275,1,4,28,8,29,7,30,31,32,3,5,6,33,48,276,277,95,278,191,194,216,85,169,279,64,86,39,57,94,272,47,280,281,65,282,159,54,283,115,142,284,153,83,249,53,285,286,287,9,10]))),cX=a.lazy(()=>C(()=>import("./ToolsIncotermsPage-DEd6m2zj.js"),__vite__mapDeps([288,1,289,290,4,28,8,29,7,30,31,32,3,5,6,33,71,95,83,46,148,9,10]))),uX=a.lazy(()=>C(()=>import("./ToolsCo2Page-BIEtzxT3.js"),__vite__mapDeps([291,1,4,28,8,29,7,30,31,32,3,5,6,33,71,277,9,10]))),dX=a.lazy(()=>C(()=>import("./ToolsPortsPage-BD16GY7Q.js"),__vite__mapDeps([292,1,4,28,8,29,7,30,31,32,3,5,6,33,71,95,55,219,9,10]))),pX=a.lazy(()=>C(()=>import("./ToolsDistancePage-SUQuddYa.js"),__vite__mapDeps([293,1,289,290,4,28,8,29,7,30,31,32,3,5,6,33,71,276,95,75,9,10]))),fX=a.lazy(()=>C(()=>import("./ToolsCbmPage-DzdB0aGS.js"),__vite__mapDeps([294,1,4,28,8,29,7,30,31,32,3,5,6,33,289,290,71,100,283,124,9,10]))),mX=a.lazy(()=>C(()=>import("./ToolsAirFreightPage-Uf3V3tGS.js"),__vite__mapDeps([295,1,4,28,8,29,7,30,31,32,3,5,6,33,71,283,148,65,169,9,10]))),hX=a.lazy(()=>C(()=>import("./ToolsPackingListPage-CQaWD3Tz.js"),__vite__mapDeps([296,1,289,290,4,28,8,29,7,30,31,32,3,5,6,33,124,100,46,9,10]))),gX=a.lazy(()=>C(()=>import("./ToolsContainerPage-BepTDJs-.js"),__vite__mapDeps([297,1,289,290,4,28,8,29,7,30,31,32,3,5,6,33,71,124,278,298,100,9,10]))),vX=a.lazy(()=>C(()=>import("./ToolsHsCodePage-Dr6lRyGv.js"),__vite__mapDeps([299,1,289,290,4,28,8,29,7,30,31,32,3,5,6,33,71,83,9,10]))),bX=a.lazy(()=>C(()=>import("./ToolsCustomsCalcPage-CciQ9kbK.js"),__vite__mapDeps([300,1,289,290,4,28,8,29,7,30,31,32,3,5,6,33,17,71,83,9,10]))),_X=a.lazy(()=>C(()=>import("./ToolsCurrencyPage-BFAMnd9J.js"),__vite__mapDeps([301,1,4,28,8,29,7,30,31,32,3,5,6,33,71,280,216,169,153,67,9,10]))),yX=a.lazy(()=>C(()=>import("./ToolsDocsCheckPage-Dkeja6PX.js"),__vite__mapDeps([302,1,4,28,8,29,7,30,31,32,3,5,6,33,71,46,83,108,9,10]))),xX=a.lazy(()=>C(()=>import("./ToolsSchedulePage-fFfR-_sI.js"),__vite__mapDeps([303,1,289,290,4,28,8,29,7,30,31,32,3,5,6,33,71,83,9,10]))),wX=a.lazy(()=>C(()=>import("./ToolsFreightRatesPage-DG0g6rNm.js"),__vite__mapDeps([304,1,4,28,8,29,7,30,31,32,3,5,6,33,153,65,9,10]))),EX=a.lazy(()=>C(()=>import("./ToolsFreightIndexPage-BXOHdZi1.js"),__vite__mapDeps([305,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),SX=a.lazy(()=>C(()=>import("./ToolsLandedCostPage-BoFj4HC7.js"),__vite__mapDeps([306,1,289,290,4,28,8,29,7,30,31,32,3,5,6,33,71,83,9,10]))),CX=a.lazy(()=>C(()=>import("./ToolsComparisonPage-DulvzjlN.js"),__vite__mapDeps([307,1,289,290,4,28,8,29,7,30,31,32,3,5,6,33,71,277,46,148,65,9,10]))),PX=a.lazy(()=>C(()=>import("./ToolsChinaCalendarPage-C9Aj4lV4.js"),__vite__mapDeps([308,1,289,290,4,28,8,29,7,30,31,32,3,5,6,33,71,65,87,9,10]))),RX=a.lazy(()=>C(()=>import("./ToolsPreShipmentPage-C9H4xqow.js"),__vite__mapDeps([309,1,4,28,8,29,7,30,31,32,3,5,6,33,71,266,75,46,65,9,10]))),TX=a.lazy(()=>C(()=>import("./ToolsDemurragePage-CcxrqiyD.js"),__vite__mapDeps([310,1,289,290,4,28,8,29,7,30,31,32,3,5,6,33,71,311,46,65,9,10]))),IX=a.lazy(()=>C(()=>import("./ToolsPaymentTermsPage-DGc_yejx.js"),__vite__mapDeps([312,1,289,290,4,28,8,29,7,30,31,32,3,5,6,33,71,83,46,148,9,10]))),$X=a.lazy(()=>C(()=>import("./ToolsInsurancePage-BvJys2FS.js"),__vite__mapDeps([313,1,289,290,4,28,8,29,7,30,31,32,3,5,6,33,71,47,65,9,10]))),AX=a.lazy(()=>C(()=>import("./ToolsLeadTimePage-CVFQLedN.js"),__vite__mapDeps([314,1,289,290,4,28,8,29,7,30,31,32,3,5,6,33,95,87,65,194,9,10]))),jX=a.lazy(()=>C(()=>import("./ToolsContainerTrackingPage-DwcOxSfU.js"),__vite__mapDeps([315,1,4,28,8,29,7,30,31,32,3,5,6,33,71,78,95,9,10]))),OX=a.lazy(()=>C(()=>import("./ToolsConverterPage-Bw7UyvuU.js"),__vite__mapDeps([316,1,4,28,8,29,7,30,31,32,3,5,6,33,71,280,9,10]))),NX=a.lazy(()=>C(()=>import("./ToolsFreightForwarderPage-BqN3x53R.js"),__vite__mapDeps([317,1,4,28,8,29,7,30,31,32,3,5,6,33,71,281,235,148,9,10]))),DX=a.lazy(()=>C(()=>import("./ToolsPackagingPage-B4118665.js"),__vite__mapDeps([318,1,4,28,8,29,7,30,31,32,3,5,6,33,71,235,65,319,9,10]))),kX=a.lazy(()=>C(()=>import("./ToolsDangerousGoodsPage-B_Gk6Seo.js"),__vite__mapDeps([320,1,289,290,4,28,8,29,7,30,31,32,3,5,6,33,71,65,46,249,70,9,10]))),MX=a.lazy(()=>C(()=>import("./ToolsGlossaryPage-IksdFCOu.js"),__vite__mapDeps([321,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),LX=a.lazy(()=>C(()=>import("./ToolsWarehousePage-DiWZ-wXg.js"),__vite__mapDeps([322,1,4,28,8,29,7,30,31,32,3,5,6,33,71,46,153,65,311,9,10]))),zX=a.lazy(()=>C(()=>import("./ToolsTimelinePage-B5GY6xpX.js"),__vite__mapDeps([323,1,4,28,8,29,7,30,31,32,3,5,6,33,87,95,194,9,10]))),FX=a.lazy(()=>C(()=>import("./ToolsTradeFinancePage-BlXUUnp_.js"),__vite__mapDeps([324,1,4,28,8,29,7,30,31,32,3,5,6,33,47,159,235,148,169,65,272,9,10]))),VX=a.lazy(()=>C(()=>import("./ToolsCargoStandardsPage-DQimrmcm.js"),__vite__mapDeps([325,1,4,28,8,29,7,30,31,32,3,5,6,33,276,298,9,10]))),BX=a.lazy(()=>C(()=>import("./ToolsExportDocsPage-G62m4vwr.js"),__vite__mapDeps([326,1,4,28,8,29,7,30,31,32,3,5,6,33,235,108,83,9,10]))),HX=a.lazy(()=>C(()=>import("./ToolsSurchargesPage-BKh6EltR.js"),__vite__mapDeps([327,1,4,28,8,29,7,30,31,32,3,5,6,33,65,159,169,9,10]))),UX=a.lazy(()=>C(()=>import("./ToolsRussiaPortsPage-CsYRtTpR.js"),__vite__mapDeps([328,1,4,28,8,29,7,30,31,32,3,5,6,33,95,9,10]))),WX=a.lazy(()=>C(()=>import("./ToolsSupplierCheckPage-D3MmbKgR.js"),__vite__mapDeps([329,1,4,28,8,29,7,30,31,32,3,5,6,33,47,235,148,65,9,10]))),qX=a.lazy(()=>C(()=>import("./ToolsAntiDumpingPage-BacfNgzX.js"),__vite__mapDeps([330,1,4,28,8,29,7,30,31,32,3,5,6,33,47,169,65,9,10]))),GX=a.lazy(()=>C(()=>import("./ToolsVatRefundPage-BMyanFzc.js"),__vite__mapDeps([331,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),KX=a.lazy(()=>C(()=>import("./ToolsTradeLanesPage-D7OgBkMf.js"),__vite__mapDeps([332,1,4,28,8,29,7,30,31,32,3,5,6,33,71,142,9,10]))),XX=a.lazy(()=>C(()=>import("./ToolsKpiPage-CZO0Vu79.js"),__vite__mapDeps([333,1,4,28,8,29,7,30,31,32,3,5,6,33,65,279,169,235,9,10]))),YX=a.lazy(()=>C(()=>import("./ToolsFreightBrokerPage-D9r7iRd0.js"),__vite__mapDeps([334,1,4,28,8,29,7,30,31,32,3,5,6,33,71,65,148,9,10]))),JX=a.lazy(()=>C(()=>import("./ToolsExchangeRiskPage-B30K6IKV.js"),__vite__mapDeps([335,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),ZX=a.lazy(()=>C(()=>import("./ToolsPortCongestionPage-vbm6RHN9.js"),__vite__mapDeps([336,1,4,28,8,29,7,30,31,32,3,5,6,33,65,95,169,153,67,9,10]))),QX=a.lazy(()=>C(()=>import("./ToolsCargoClaimsPage-n1l0ArOI.js"),__vite__mapDeps([337,1,4,28,8,29,7,30,31,32,3,5,6,33,71,46,70,65,9,10]))),eY=a.lazy(()=>C(()=>import("./ToolsChemicalRegPage-D9xL_6F7.js"),__vite__mapDeps([338,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),tY=a.lazy(()=>C(()=>import("./ToolsSeasonalityPage-Dco4zTy9.js"),__vite__mapDeps([339,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),rY=a.lazy(()=>C(()=>import("./ToolsTransitTimePage-oqLiYpSD.js"),__vite__mapDeps([340,1,4,28,8,29,7,30,31,32,3,5,6,33,65,85,95,277,46,9,10]))),nY=a.lazy(()=>C(()=>import("./ToolsFreightCostPage-BFN15ox9.js"),__vite__mapDeps([341,1,4,28,8,29,7,30,31,32,3,5,6,33,71,65,159,70,148,46,9,10]))),oY=a.lazy(()=>C(()=>import("./ToolsExportControlPage-B1aESjhU.js"),__vite__mapDeps([342,1,4,28,8,29,7,30,31,32,3,5,6,33,70,235,65,47,283,9,10]))),sY=a.lazy(()=>C(()=>import("./ToolsCargoInsuranceCalcPage-5YHl5tE0.js"),__vite__mapDeps([343,1,4,28,8,29,7,30,31,32,3,5,6,33,71,83,9,10]))),iY=a.lazy(()=>C(()=>import("./ToolsRussiaRegionsPage-BiwKNqiW.js"),__vite__mapDeps([344,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),aY=a.lazy(()=>C(()=>import("./ToolsContainerTypesPage-Bdi83_kH.js"),__vite__mapDeps([345,1,4,28,8,29,7,30,31,32,3,5,6,33,46,286,278,346,65,148,9,10]))),lY=a.lazy(()=>C(()=>import("./ToolsBillOfLadingPage-D7Lc55uT.js"),__vite__mapDeps([347,1,4,28,8,29,7,30,31,32,3,5,6,33,71,83,46,319,348,65,47,148,9,10]))),cY=a.lazy(()=>C(()=>import("./ToolsWeightDimensionsPage-CxDHH7YH.js"),__vite__mapDeps([349,1,4,28,8,29,7,30,31,32,3,5,6,33,71,298,276,283,278,46,280,9,10]))),uY=a.lazy(()=>C(()=>import("./ToolsMultimodalPage-DxVHTyuD.js"),__vite__mapDeps([350,1,4,28,8,29,7,30,31,32,3,5,6,33,65,159,46,148,9,10]))),dY=a.lazy(()=>C(()=>import("./ToolsLetterOfCreditPage-0-fB6aFf.js"),__vite__mapDeps([351,1,28,4,8,29,7,30,31,32,3,5,6,33,272,47,83,46,9,10]))),pY=a.lazy(()=>C(()=>import("./ToolsFreeZonesPage-CYBt_0An.js"),__vite__mapDeps([352,1,4,28,8,29,7,30,31,32,3,5,6,33,71,46,148,9,10]))),fY=a.lazy(()=>C(()=>import("./ToolsColdChainPage-DbdGz18e.js"),__vite__mapDeps([353,1,4,28,8,29,7,30,31,32,3,5,6,33,71,286,169,65,46,148,9,10]))),mY=a.lazy(()=>C(()=>import("./ToolsCargoReadinessPage-DZ54o69q.js"),__vite__mapDeps([354,1,4,28,8,29,7,30,31,32,3,5,6,33,71,46,65,108,9,10]))),hY=a.lazy(()=>C(()=>import("./ToolsTariffSchedulePage-Cb4Y-uiV.js"),__vite__mapDeps([355,1,4,28,8,29,7,30,31,32,3,5,6,33,71,83,69,148,46,9,10]))),gY=a.lazy(()=>C(()=>import("./ToolsSupplyChainRiskPage-Dg1eTAE8.js"),__vite__mapDeps([356,1,4,28,8,29,7,30,31,32,3,5,6,33,71,65,173,153,235,9,10]))),vY=a.lazy(()=>C(()=>import("./ToolsFreightNegotiationPage-CHwefpWm.js"),__vite__mapDeps([357,1,4,28,8,29,7,30,31,32,3,5,6,33,71,153,107,173,65,46,9,10]))),bY=a.lazy(()=>C(()=>import("./ToolsWarehouseCalcPage-NLHxL5H4.js"),__vite__mapDeps([358,1,4,28,8,29,7,30,31,32,3,5,6,33,71,153,286,83,9,10]))),_Y=a.lazy(()=>C(()=>import("./ToolsOriginCertPage-B690e0Hj.js"),__vite__mapDeps([359,1,4,28,8,29,7,30,31,32,3,5,6,33,54,235,65,148,245,319,348,9,10]))),yY=a.lazy(()=>C(()=>import("./ToolsImportLicensePage-C1jLbBEr.js"),__vite__mapDeps([360,1,4,28,8,29,7,30,31,32,3,5,6,33,65,70,148,83,46,9,10]))),xY=a.lazy(()=>C(()=>import("./ToolsShipmentTrackerPage-CNl4TwPQ.js"),__vite__mapDeps([361,1,4,28,8,29,7,30,31,32,3,5,6,33,65,46,9,10]))),wY=a.lazy(()=>C(()=>import("./ToolsChinaSupplierPage-BpxwHc4q.js"),__vite__mapDeps([362,1,4,28,8,29,7,30,31,32,3,5,6,33,46,148,272,65,363,69,52,123,9,10]))),EY=a.lazy(()=>C(()=>import("./ToolsTradeCompliancePage-BeN9gs8t.js"),__vite__mapDeps([364,1,4,28,8,29,7,30,31,32,3,5,6,33,47,70,283,235,65,9,10]))),SY=a.lazy(()=>C(()=>import("./ToolsCustomsBrokerCalcPage-BIbfAuPg.js"),__vite__mapDeps([365,1,4,28,8,29,7,30,31,32,3,5,6,33,71,281,283,46,83,9,10]))),CY=a.lazy(()=>C(()=>import("./ToolsEcommerceImportPage-6EZmNfal.js"),__vite__mapDeps([366,1,4,28,8,29,7,30,31,32,3,5,6,33,287,123,65,235,245,148,9,10]))),PY=a.lazy(()=>C(()=>import("./ToolsFreightForwarderGuidePage-Bqhjd2wR.js"),__vite__mapDeps([367,1,4,28,8,29,7,30,31,32,3,5,6,33,47,235,65,169,194,52,54,9,10]))),RY=a.lazy(()=>C(()=>import("./ToolsIncotermsCalcPage-Cp6ZI-A_.js"),__vite__mapDeps([368,1,4,28,8,29,7,30,31,32,3,5,6,33,17,280,159,47,235,65,9,10]))),TY=a.lazy(()=>C(()=>import("./ToolsPackagingRequirementsPage-8uk7IPiK.js"),__vite__mapDeps([369,1,4,28,8,29,7,30,31,32,3,5,6,33,65,286,278,287,235,9,10]))),IY=a.lazy(()=>C(()=>import("./ToolsRailwayFreightPage-V7Qoym3c.js"),__vite__mapDeps([370,1,4,28,8,29,7,30,31,32,3,5,6,33,159,235,115,65,9,10]))),$Y=a.lazy(()=>C(()=>import("./ToolsLetterOfCreditCalcPage-CkM1pJyg.js"),__vite__mapDeps([371,1,4,28,8,29,7,30,31,32,3,5,6,33,272,159,65,235,47,9,10]))),AY=a.lazy(()=>C(()=>import("./ToolsCarbonFootprintPage-IvZtujFz.js"),__vite__mapDeps([372,1,4,28,8,29,7,30,31,32,3,5,6,33,277,153,279,235,65,159,9,10]))),jY=a.lazy(()=>C(()=>import("./ToolsAirCargoGuidePage-DZbii8pe.js"),__vite__mapDeps([373,1,4,28,8,29,7,30,31,32,3,5,6,33,65,235,9,10]))),OY=a.lazy(()=>C(()=>import("./ToolsChinaHolidaysPage-KqD7qlUP.js"),__vite__mapDeps([374,1,4,28,8,29,7,30,31,32,3,5,6,33,39,153,235,65,9,10]))),NY=a.lazy(()=>C(()=>import("./ToolsPortStoragePage-ZYne58aC.js"),__vite__mapDeps([375,1,4,28,8,29,7,30,31,32,3,5,6,33,95,159,65,235,153,9,10]))),DY=a.lazy(()=>C(()=>import("./ToolsContainerSizesPage-DT6WNTaA.js"),__vite__mapDeps([376,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),kY=a.lazy(()=>C(()=>import("./ToolsImportDocumentsPage-JDpvemTV.js"),__vite__mapDeps([377,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),MY=a.lazy(()=>C(()=>import("./ToolsLogisticsCostPage-B15v-cWR.js"),__vite__mapDeps([378,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),LY=a.lazy(()=>C(()=>import("./ToolsShippingTermsPage-CTmrCWCm.js"),__vite__mapDeps([379,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),zY=a.lazy(()=>C(()=>import("./ToolsSupplyChainFinancePage-1jejN8GB.js"),__vite__mapDeps([380,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),FY=a.lazy(()=>C(()=>import("./ToolsChineseSuppliersPage-Bv3O1LtH.js"),__vite__mapDeps([381,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),VY=a.lazy(()=>C(()=>import("./ToolsRailwayCalcPage-PgKdTcV9.js"),__vite__mapDeps([382,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),BY=a.lazy(()=>C(()=>import("./ToolsMultimodalComparePage-B7Yn3dze.js"),__vite__mapDeps([383,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),HY=a.lazy(()=>C(()=>import("./ToolsWarrantyClaimsPage-DpdHQwnz.js"),__vite__mapDeps([384,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),UY=a.lazy(()=>C(()=>import("./ToolsExportDocumentsPage-7FQPjP1w.js"),__vite__mapDeps([385,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),WY=a.lazy(()=>C(()=>import("./ToolsChinaPaymentsPage-CXikcUpD.js"),__vite__mapDeps([386,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),qY=a.lazy(()=>C(()=>import("./ToolsLoadingNormsPage-Ca7afzVH.js"),__vite__mapDeps([387,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),GY=a.lazy(()=>C(()=>import("./ToolsHazmatGuidePage-0mm3uZrd.js"),__vite__mapDeps([388,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),KY=a.lazy(()=>C(()=>import("./ToolsFreeTradeZonesPage-BruL-wT5.js"),__vite__mapDeps([389,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),XY=a.lazy(()=>C(()=>import("./ToolsShipmentVisibilityPage-CapRD4Me.js"),__vite__mapDeps([390,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),YY=a.lazy(()=>C(()=>import("./ToolsImporterInsurancePage-C2t0f70B.js"),__vite__mapDeps([391,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),JY=a.lazy(()=>C(()=>import("./ToolsCurrencyHedgingPage-CNI9XVUe.js"),__vite__mapDeps([392,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),ZY=a.lazy(()=>C(()=>import("./ToolsHonestSignPage-B8L84jSL.js"),__vite__mapDeps([393,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),QY=a.lazy(()=>C(()=>import("./ToolsLclCalculatorPage-D_lNmiEK.js"),__vite__mapDeps([394,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),eJ=a.lazy(()=>C(()=>import("./ToolsCarrierComparePage-nlTeJhcq.js"),__vite__mapDeps([395,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),tJ=a.lazy(()=>C(()=>import("./ToolsEaeuRulesPage-BxyL7QUg.js"),__vite__mapDeps([396,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),rJ=a.lazy(()=>C(()=>import("./ToolsHsCodeWizardPage-x-oXUfZ8.js"),__vite__mapDeps([397,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),nJ=a.lazy(()=>C(()=>import("./ToolsInventoryPlanningPage-BMt3MYI0.js"),__vite__mapDeps([398,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),oJ=a.lazy(()=>C(()=>import("./ToolsRouteOptimizationPage-Caxguau1.js"),__vite__mapDeps([399,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),sJ=a.lazy(()=>C(()=>import("./ToolsFreightAuditPage-C9n0YHfI.js"),__vite__mapDeps([400,1,4,28,8,29,7,30,31,32,3,5,6,33,159,83,46,9,10]))),iJ=a.lazy(()=>C(()=>import("./ToolsBolGuidePage-DbbmU8Sp.js"),__vite__mapDeps([401,1,4,28,8,29,7,30,31,32,3,5,6,33,95,65,46,9,10]))),aJ=a.lazy(()=>C(()=>import("./ToolsCustomsBondPage-Do7_DtcJ.js"),__vite__mapDeps([402,1,4,28,8,29,7,30,31,32,3,5,6,33,71,83,47,53,46,148,159,9,10]))),lJ=a.lazy(()=>C(()=>import("./ToolsCertOriginPage-DlZltEXJ.js"),__vite__mapDeps([403,1,4,28,8,29,7,30,31,32,3,5,6,33,194,115,83,46,9,10]))),cJ=a.lazy(()=>C(()=>import("./ToolsImportVatPage-BkyXdIR4.js"),__vite__mapDeps([404,1,28,4,8,29,7,30,31,32,3,5,6,33,64,46,83,9,10]))),uJ=a.lazy(()=>C(()=>import("./ToolsLithiumBatteryPage-D82WiWjd.js"),__vite__mapDeps([405,1,4,28,8,29,7,30,31,32,3,5,6,33,65,95,46,9,10]))),dJ=a.lazy(()=>C(()=>import("./ToolsIspm15Page-CeCWKozE.js"),__vite__mapDeps([406,1,4,28,8,29,7,30,31,32,3,5,6,33,277,46,65,9,10]))),pJ=a.lazy(()=>C(()=>import("./ToolsPhytoCertPage-BVQjPBfd.js"),__vite__mapDeps([407,1,4,28,8,29,7,30,31,32,3,5,6,33,277,194,148,46,65,9,10]))),fJ=a.lazy(()=>C(()=>import("./ToolsTemperatureCargoPage-CegxUuDi.js"),__vite__mapDeps([408,1,4,28,8,29,7,30,31,32,3,5,6,33,71,286,46,346,65,9,10]))),mJ=a.lazy(()=>C(()=>import("./ToolsOversizeCargoPage-hAS68b2K.js"),__vite__mapDeps([409,1,4,28,8,29,7,30,31,32,3,5,6,33,289,71,65,46,319,348,9,10]))),hJ=a.lazy(()=>C(()=>import("./ToolsTradeFinanceCalcPage-B5Ygvb5B.js"),__vite__mapDeps([410,1,4,28,8,29,7,30,31,32,3,5,6,33,169,235,272,65,159,47,9,10]))),gJ=a.lazy(()=>C(()=>import("./ToolsBreakBulkPage-dgncZ-Um.js"),__vite__mapDeps([411,1,4,28,8,29,7,30,31,32,3,5,6,33,71,83,46,43,9,10]))),vJ=a.lazy(()=>C(()=>import("./ToolsSanctionsCheckPage-Bsj_UG-c.js"),__vite__mapDeps([412,1,4,28,8,29,7,30,31,32,3,5,6,33,69,65,70,47,148,235,78,283,9,10]))),bJ=a.lazy(()=>C(()=>import("./ToolsExportLicensePage-DLWmQXVY.js"),__vite__mapDeps([413,1,4,28,8,29,7,30,31,32,3,5,6,33,65,46,9,10]))),_J=a.lazy(()=>C(()=>import("./ToolsFumigationPage-DUXMIyl1.js"),__vite__mapDeps([414,1,4,28,8,29,7,30,31,32,3,5,6,33,65,277,46,148,9,10]))),yJ=a.lazy(()=>C(()=>import("./ToolsContainerInspectionPage-CQr_yVmG.js"),__vite__mapDeps([415,1,289,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),xJ=a.lazy(()=>C(()=>import("./ToolsRoRoGuidePage-DYjzmAsr.js"),__vite__mapDeps([416,1,4,28,8,29,7,30,31,32,3,5,6,33,71,46,83,44,95,9,10]))),wJ=a.lazy(()=>C(()=>import("./ToolsVgmCalcPage-DJZnLhWu.js"),__vite__mapDeps([417,1,4,28,8,29,7,30,31,32,3,5,6,33,283,65,235,9,10]))),EJ=a.lazy(()=>C(()=>import("./ToolsBondedWarehousePage-DTw8wG_U.js"),__vite__mapDeps([418,1,4,28,8,29,7,30,31,32,3,5,6,33,71,75,46,83,9,10]))),SJ=a.lazy(()=>C(()=>import("./ToolsAirWaybillPage-Dc3lwSpW.js"),__vite__mapDeps([419,1,4,28,8,29,7,30,31,32,3,5,6,33,46,65,47,9,10]))),CJ=a.lazy(()=>C(()=>import("./ToolsInvoiceTemplatePage-900IZ5Hv.js"),__vite__mapDeps([420,1,4,28,8,29,7,30,31,32,3,5,6,33,46,148,83,9,10]))),PJ=a.lazy(()=>C(()=>import("./ToolsShippingInstructionsPage-CX93THsU.js"),__vite__mapDeps([421,1,4,28,8,29,7,30,31,32,3,5,6,33,71,83,85,46,65,9,10]))),RJ=a.lazy(()=>C(()=>import("./ToolsTruckingCalcPage-BB6WqNvI.js"),__vite__mapDeps([422,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),TJ=a.lazy(()=>C(()=>import("./ToolsSupplyChainKpiPage-Y1wCyvWx.js"),__vite__mapDeps([423,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),IJ=a.lazy(()=>C(()=>import("./ToolsSeaFreightChecklistPage-KK8L1neK.js"),__vite__mapDeps([424,1,4,28,8,29,7,30,31,32,3,5,6,33,75,46,65,9,10]))),$J=a.lazy(()=>C(()=>import("./ToolsSpotRateCalcPage-SxihTjt7.js"),__vite__mapDeps([425,1,4,28,8,29,7,30,31,32,3,5,6,33,173,153,169,46,65,9,10]))),AJ=a.lazy(()=>C(()=>import("./ToolsPoManagementPage-CF0jc9dE.js"),__vite__mapDeps([426,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),jJ=a.lazy(()=>C(()=>import("./ToolsCharterPartyPage-B7qX55Qs.js"),__vite__mapDeps([427,1,4,28,8,29,7,30,31,32,3,5,6,33,71,95,65,47,9,10]))),OJ=a.lazy(()=>C(()=>import("./ToolsSingleWindowPage-4L8zra3Z.js"),__vite__mapDeps([428,1,289,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),NJ=a.lazy(()=>C(()=>import("./ToolsDdpDduCalcPage-DNdNAuF2.js"),__vite__mapDeps([429,1,4,28,8,29,7,30,31,32,3,5,6,33,71,235,148,65,9,10]))),DJ=a.lazy(()=>C(()=>import("./ToolsCbamGuidePage-BS83Hf2b.js"),__vite__mapDeps([430,1,4,28,8,29,7,30,31,32,3,5,6,33,363,277,65,173,46,9,10]))),kJ=a.lazy(()=>C(()=>import("./ToolsImportQuotasPage-CGXLxYHI.js"),__vite__mapDeps([431,1,4,28,8,29,7,30,31,32,3,5,6,33,46,65,9,10]))),MJ=a.lazy(()=>C(()=>import("./ToolsLetterOfIndemnityPage-hZrSoKXa.js"),__vite__mapDeps([432,1,4,28,8,29,7,30,31,32,3,5,6,33,283,46,65,47,9,10]))),LJ=a.lazy(()=>C(()=>import("./ToolsParallelImportPage-Dbo4ugQs.js"),__vite__mapDeps([433,1,4,28,8,29,7,30,31,32,3,5,6,33,47,65,235,70,148,9,10]))),zJ=a.lazy(()=>C(()=>import("./ToolsFreightRateIndexPage-QSvunBjv.js"),__vite__mapDeps([434,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),FJ=a.lazy(()=>C(()=>import("./ToolsCargoReleaseOrderPage-BPP8NsMN.js"),__vite__mapDeps([435,1,4,28,8,29,7,30,31,32,3,5,6,33,71,65,46,284,9,10]))),VJ=a.lazy(()=>C(()=>import("./ToolsTransshipmentGuidePage-MwvKOwNx.js"),__vite__mapDeps([436,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),BJ=a.lazy(()=>C(()=>import("./ToolsCustomsValueCalcPage-e7Nj_iEr.js"),__vite__mapDeps([437,1,4,28,8,29,7,30,31,32,3,5,6,33,83,88,9,10]))),HJ=a.lazy(()=>C(()=>import("./ToolsContainerLeasingPage-CokCuLuW.js"),__vite__mapDeps([438,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),UJ=a.lazy(()=>C(()=>import("./ToolsExciseDutyPage-BRGH6poF.js"),__vite__mapDeps([439,1,28,4,8,29,7,30,31,32,3,5,6,33,83,46,9,10]))),WJ=a.lazy(()=>C(()=>import("./ToolsChinaExportTaxPage-BcVNGA-X.js"),__vite__mapDeps([440,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),qJ=a.lazy(()=>C(()=>import("./ToolsAirVsSeaCalcPage-x8MXD8hi.js"),__vite__mapDeps([441,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),GJ=a.lazy(()=>C(()=>import("./ToolsEuCustomsClearancePage-C5B8TR7F.js"),__vite__mapDeps([442,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),KJ=a.lazy(()=>C(()=>import("./ToolsPortDwellTimePage-IdC4KDrd.js"),__vite__mapDeps([443,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),XJ=a.lazy(()=>C(()=>import("./ToolsRailwayLogisticsPage-ClEipz7_.js"),__vite__mapDeps([444,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),YJ=a.lazy(()=>C(()=>import("./ToolsCourierVsFreightPage-q83EuaSz.js"),__vite__mapDeps([445,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),JJ=a.lazy(()=>C(()=>import("./ToolsIncotermsQuizPage-BvNINPQQ.js"),__vite__mapDeps([446,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),ZJ=a.lazy(()=>C(()=>import("./ToolsFreightPaymentTermsPage-D1kEeEdY.js"),__vite__mapDeps([447,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),QJ=a.lazy(()=>C(()=>import("./ToolsTradeDocPackPage-CKb0pPFT.js"),__vite__mapDeps([448,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),eZ=a.lazy(()=>C(()=>import("./ToolsEaeuTariffPage-B8GXVgGj.js"),__vite__mapDeps([449,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),tZ=a.lazy(()=>C(()=>import("./ToolsColdChainMonitorPage-D9dCYVO4.js"),__vite__mapDeps([450,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),rZ=a.lazy(()=>C(()=>import("./ToolsSupplierAuditPage-C0-Px4u1.js"),__vite__mapDeps([451,1,4,28,8,29,7,30,31,32,3,5,6,33,65,123,54,46,148,363,159,55,107,9,10]))),nZ=a.lazy(()=>C(()=>import("./ToolsLoadPlanPage-BAMSprFJ.js"),__vite__mapDeps([452,1,4,28,8,29,7,30,31,32,3,5,6,33,71,169,100,65,235,124,9,10]))),oZ=a.lazy(()=>C(()=>import("./ToolsEcommerceLogisticsPage-BSxjQF1k.js"),__vite__mapDeps([453,1,4,28,8,29,7,30,31,32,3,5,6,33,71,46,65,287,9,10]))),sZ=a.lazy(()=>C(()=>import("./ToolsCertificationPage-CC8vHXUC.js"),__vite__mapDeps([454,1,4,28,8,29,7,30,31,32,3,5,6,33,47,65,235,159,9,10]))),iZ=a.lazy(()=>C(()=>import("./ToolsFclVsLclPage-B_7EBTwr.js"),__vite__mapDeps([455,1,4,28,8,29,7,30,31,32,3,5,6,33,191,283,159,169,9,10]))),aZ=a.lazy(()=>C(()=>import("./ToolsChinaRegionsPage-BGTv-gC8.js"),__vite__mapDeps([456,1,4,28,8,29,7,30,31,32,3,5,6,33,363,9,10]))),lZ=a.lazy(()=>C(()=>import("./ToolsTruckFreightCalcPage-DTZMTZmD.js"),__vite__mapDeps([457,1,28,4,8,29,7,30,31,32,3,5,6,33,9,10]))),cZ=a.lazy(()=>C(()=>import("./ToolsPhytosanitaryPage-BNMYSlSq.js"),__vite__mapDeps([458,1,28,4,8,29,7,30,31,32,3,5,6,33,277,9,10]))),uZ=a.lazy(()=>C(()=>import("./ToolsReExportPage-_l0pPd44.js"),__vite__mapDeps([459,1,28,4,8,29,7,30,31,32,3,5,6,33,216,9,10]))),dZ=a.lazy(()=>C(()=>import("./ToolsQualityControlPage-DLyoPX0j.js"),__vite__mapDeps([460,1,28,4,8,29,7,30,31,32,3,5,6,33,9,10]))),pZ=a.lazy(()=>C(()=>import("./ToolsGoodsDeclarationPage-DzZGYyWh.js"),__vite__mapDeps([461,1,28,4,8,29,7,30,31,32,3,5,6,33,9,10]))),fZ=a.lazy(()=>C(()=>import("./ToolsConsolidationCalcPage-BwSXFjBg.js"),__vite__mapDeps([462,1,28,4,8,29,7,30,31,32,3,5,6,33,9,10]))),mZ=a.lazy(()=>C(()=>import("./ToolsBankGuaranteePage-Bq39svl3.js"),__vite__mapDeps([463,1,28,4,8,29,7,30,31,32,3,5,6,33,47,9,10]))),hZ=a.lazy(()=>C(()=>import("./ToolsPortFeesCalcPage-gxKae6SR.js"),__vite__mapDeps([464,1,28,4,8,29,7,30,31,32,3,5,6,33,95,9,10]))),gZ=a.lazy(()=>C(()=>import("./ToolsImportQuotaPage-BhJMusNF.js"),__vite__mapDeps([465,1,28,4,8,29,7,30,31,32,3,5,6,33,53,9,10]))),vZ=a.lazy(()=>C(()=>import("./ToolsCarnetAtaPage-n1kVexPd.js"),__vite__mapDeps([466,1,28,4,8,29,7,30,31,32,3,5,6,33,194,9,10]))),bZ=a.lazy(()=>C(()=>import("./ToolsDutyDrawbackPage-CGX1LC4T.js"),__vite__mapDeps([467,1,28,4,8,29,7,30,31,32,3,5,6,33,153,9,10]))),_Z=a.lazy(()=>C(()=>import("./ToolsColdStorageCalcPage-B35aElk-.js"),__vite__mapDeps([468,1,28,4,8,29,7,30,31,32,3,5,6,33,286,9,10]))),yZ=a.lazy(()=>C(()=>import("./ToolsMarineInsuranceTypesPage-CFYw2EVv.js"),__vite__mapDeps([469,1,28,4,8,29,7,30,31,32,3,5,6,33,285,9,10]))),xZ=a.lazy(()=>C(()=>import("./ToolsPalletCalcPage-CNX6RS-R.js"),__vite__mapDeps([470,1,28,4,8,29,7,30,31,32,3,5,6,33,9,10]))),wZ=a.lazy(()=>C(()=>import("./ToolsImportProcedurePage-DlLdQhkj.js"),__vite__mapDeps([471,1,28,4,8,29,7,30,31,32,3,5,6,33,9,10]))),EZ=a.lazy(()=>C(()=>import("./ToolsLinerTermsPage-D1aJOqs-.js"),__vite__mapDeps([472,1,28,4,8,29,7,30,31,32,3,5,6,33,282,9,10]))),SZ=a.lazy(()=>C(()=>import("./ToolsFreightTenderPage-DAkZPb56.js"),__vite__mapDeps([473,1,4,28,8,29,7,30,31,32,3,5,6,33,71,281,54,153,88,46,100,124,65,9,10]))),CZ=a.lazy(()=>C(()=>import("./ToolsCustomsRulingPage-DjzD0XF2.js"),__vite__mapDeps([474,1,28,4,8,29,7,30,31,32,3,5,6,33,9,10]))),PZ=a.lazy(()=>C(()=>import("./ToolsBufferStockPage-D6TF1ssA.js"),__vite__mapDeps([475,1,4,28,8,29,7,30,31,32,3,5,6,33,65,9,10]))),RZ=a.lazy(()=>C(()=>import("./ToolsGreenLogisticsPage-B02Sq0oj.js"),__vite__mapDeps([476,1,4,28,8,29,7,30,31,32,3,5,6,33,277,319,348,9,10]))),TZ=a.lazy(()=>C(()=>import("./ToolsFreightMarkupPage-CCzcznQS.js"),__vite__mapDeps([477,1,4,28,8,29,7,30,31,32,3,5,6,33,17,159,169,46,9,10]))),IZ=a.lazy(()=>C(()=>import("./ToolsPortProcedurePage-D7HDnuK2.js"),__vite__mapDeps([478,1,4,28,8,29,7,30,31,32,3,5,6,33,235,65,9,10]))),$Z=a.lazy(()=>C(()=>import("./ToolsContainerStuffingPage-CJUvfTII.js"),__vite__mapDeps([479,1,4,28,8,29,7,30,31,32,3,5,6,33,283,235,65,9,10]))),AZ=a.lazy(()=>C(()=>import("./ToolsCargoRejectionPage-DIaSqhwf.js"),__vite__mapDeps([480,1,4,28,8,29,7,30,31,32,3,5,6,33,65,235,88,9,10]))),jZ=a.lazy(()=>C(()=>import("./ToolsReverseLogisticsPage-BV_yivEO.js"),__vite__mapDeps([481,1,4,28,8,29,7,30,31,32,3,5,6,33,75,280,159,65,9,10]))),OZ=a.lazy(()=>C(()=>import("./ToolsBookingChecklistPage-Cmzv1anu.js"),__vite__mapDeps([482,1,4,28,8,29,7,30,31,32,3,5,6,33,65,286,216,319,348,9,10]))),NZ=a.lazy(()=>C(()=>import("./ToolsMultimodalDocsPage-B3f8X2tp.js"),__vite__mapDeps([483,1,4,28,8,29,7,30,31,32,3,5,6,33,235,9,10]))),DZ=a.lazy(()=>C(()=>import("./ToolsExportFinancePage-QJlFiHWo.js"),__vite__mapDeps([484,1,4,28,8,29,7,30,31,32,3,5,6,33,272,47,169,159,235,65,9,10]))),kZ=a.lazy(()=>C(()=>import("./ToolsComplianceCertPage-DZ8UcnFK.js"),__vite__mapDeps([485,1,4,28,8,29,7,30,31,32,3,5,6,33,47,245,159,65,9,10]))),MZ=a.lazy(()=>C(()=>import("./ToolsShipperLetterPage-2fYZFY_h.js"),__vite__mapDeps([486,1,4,28,8,29,7,30,31,32,3,5,6,33,65,235,9,10]))),LZ=a.lazy(()=>C(()=>import("./ToolsPreAdvicePage-ONUAwqKi.js"),__vite__mapDeps([487,1,4,28,8,29,7,30,31,32,3,5,6,33,153,47,235,148,65,9,10]))),zZ=a.lazy(()=>C(()=>import("./ToolsCargoSurveyPage-DGhL5qk1.js"),__vite__mapDeps([488,1,4,28,8,29,7,30,31,32,3,5,6,33,45,283,235,65,9,10]))),FZ=a.lazy(()=>C(()=>import("./ToolsDemurrageClaimPage-dUc6Mdy2.js"),__vite__mapDeps([489,1,4,28,8,29,7,30,31,32,3,5,6,33,283,47,159,235,65,9,10]))),VZ=a.lazy(()=>C(()=>import("./ToolsPortAgencyPage-C6admKh7.js"),__vite__mapDeps([490,1,4,28,8,29,7,30,31,32,3,5,6,33,159,95,235,65,9,10]))),BZ=a.lazy(()=>C(()=>import("./ToolsFreightClaimPage-C7pPVZpL.js"),__vite__mapDeps([491,1,4,28,8,29,7,30,31,32,3,5,6,33,283,235,159,65,47,9,10]))),HZ=a.lazy(()=>C(()=>import("./ToolsStorageInTransitPage-BVxI-1-h.js"),__vite__mapDeps([492,1,4,28,8,29,7,30,31,32,3,5,6,33,153,235,65,159,9,10]))),UZ=a.lazy(()=>C(()=>import("./ToolsLclBookingPage-D6UEWgyj.js"),__vite__mapDeps([493,1,4,28,8,29,7,30,31,32,3,5,6,33,124,100,65,46,9,10]))),WZ=a.lazy(()=>C(()=>import("./ToolsSpecialCargoPage-DTyA01Nt.js"),__vite__mapDeps([494,1,4,28,8,29,7,30,31,32,3,5,6,33,65,276,46,9,10]))),qZ=a.lazy(()=>C(()=>import("./ToolsHazardousClassPage-HVm43qqj.js"),__vite__mapDeps([495,1,4,28,8,29,7,30,31,32,3,5,6,33,46,65,148,9,10]))),GZ=a.lazy(()=>C(()=>import("./ToolsCargoTempPage-SXNVC4x9.js"),__vite__mapDeps([496,1,4,28,8,29,7,30,31,32,3,5,6,33,286,65,9,10]))),KZ=a.lazy(()=>C(()=>import("./ToolsInsuranceClaimPage-7tcp9CHn.js"),__vite__mapDeps([497,1,4,28,8,29,7,30,31,32,3,5,6,33,65,46,148,9,10]))),XZ=a.lazy(()=>C(()=>import("./ToolsContainerDamagePage-Botiv7dt.js"),__vite__mapDeps([498,1,4,28,8,29,7,30,31,32,3,5,6,33,65,46,148,9,10]))),YZ=a.lazy(()=>C(()=>import("./ToolsReeferBookingPage-B3oKHApz.js"),__vite__mapDeps([499,1,4,28,8,29,7,30,31,32,3,5,6,33,46,286,65,9,10]))),JZ=a.lazy(()=>C(()=>import("./ToolsTrackTracePage-Cgl2HEnN.js"),__vite__mapDeps([500,1,4,28,8,29,7,30,31,32,3,5,6,33,46,65,9,10]))),ZZ=a.lazy(()=>C(()=>import("./MarketingHomePage-D3yDpGVH.js"),__vite__mapDeps([26,1,8,25,4,5,9,10,27,28,29,7,30,31,32,3,6,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57]))),QZ=a.lazy(()=>C(()=>import("./PublicFaqPage-DgyegDm-.js"),__vite__mapDeps([501,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),eQ=a.lazy(()=>C(()=>import("./MarketingCasesPage-uVan7IIo.js"),__vite__mapDeps([502,1,4,28,8,29,7,30,31,32,3,5,6,33,503,52,219,46,504,50,9,10]))),tQ=a.lazy(()=>C(()=>import("./MarketingCaseDetailPage-Dee5lp3r.js"),__vite__mapDeps([505,1,4,28,8,29,7,30,31,32,3,5,6,33,503,71,194,504,50,48,46,9,10]))),rQ=a.lazy(()=>C(()=>import("./MarketingReviewsPage-wO40LkFY.js"),__vite__mapDeps([506,1,4,28,8,29,7,30,31,32,3,5,6,33,49,52,219,50,107,53,9,10]))),nQ=a.lazy(()=>C(()=>import("./MarketingPartnersPage-B8E8JykY.js"),__vite__mapDeps([507,1,4,28,8,29,7,30,31,32,3,5,6,33,219,53,508,509,54,55,9,10]))),oQ=a.lazy(()=>C(()=>import("./MarketingTrustPage-quExiRWu.js"),__vite__mapDeps([510,1,4,28,8,29,7,30,31,32,3,5,6,33,53,120,94,55,56,511,54,46,9,10]))),sQ=a.lazy(()=>C(()=>import("./MarketingDocumentsPage-C1vzRPVE.js"),__vite__mapDeps([512,1,4,28,8,29,7,30,31,32,3,5,6,33,219,53,78,9,10]))),iQ=a.lazy(()=>C(()=>import("./MarketingCooperationPage-IeCq76vq.js"),__vite__mapDeps([513,1,4,28,8,29,7,30,31,32,3,5,6,33,514,515,46,508,9,10]))),aQ=a.lazy(()=>C(()=>import("./MarketingJoinPage-CSnMM7zj.js"),__vite__mapDeps([516,1,4,28,8,29,7,30,31,32,3,5,6,33,281,517,518,514,509,169,515,9,10]))),lQ=a.lazy(()=>C(()=>import("./MarketingHowItWorksPage-u78MVgcG.js"),__vite__mapDeps([519,1,4,28,8,29,7,30,31,32,3,5,6,33,46,57,520,266,115,41,55,9,10]))),cQ=a.lazy(()=>C(()=>import("./MarketingAdvantagesPage-DpyJwOaQ.js"),__vite__mapDeps([521,1,4,28,8,29,7,30,31,32,3,5,6,33,52,45,94,64,509,514,508,193,83,46,69,9,10]))),uQ=a.lazy(()=>C(()=>import("./MarketingSupportPage-U8Jm-YNm.js"),__vite__mapDeps([522,1,4,28,8,29,7,30,31,32,3,5,6,33,17,107,106,94,219,46,9,10]))),dQ=a.lazy(()=>C(()=>import("./MarketingCashbackPage-BrQ1111V.js"),__vite__mapDeps([523,1,4,28,8,29,7,30,31,32,3,5,6,33,504,47,54,196,64,46,169,48,508,9,10]))),pQ=a.lazy(()=>C(()=>import("./MarketingNewsPage-AtwIPR8e.js"),__vite__mapDeps([524,1,4,28,8,29,7,30,31,32,3,5,6,33,517,87,219,169,9,10]))),fQ=a.lazy(()=>C(()=>import("./MarketingAdditionalServicesPage-B1Ko3hSB.js"),__vite__mapDeps([525,1,4,28,8,29,7,30,31,32,3,5,6,33,511,96,43,46,9,10]))),mQ=a.lazy(()=>C(()=>import("./SolutionsIndexPage-Da6iZRhw.js"),__vite__mapDeps([526,1,4,28,8,29,7,30,31,32,3,5,6,33,57,509,9,10]))),hQ=a.lazy(()=>C(()=>import("./SolutionsImporterPage-DAp3EQD4.js"),__vite__mapDeps([527,1,528,4,28,8,29,7,30,31,32,3,5,6,33,43,78,46,64,509,40,226,9,10]))),gQ=a.lazy(()=>C(()=>import("./SolutionsExporterPage-C1RVBLJq.js"),__vite__mapDeps([529,1,528,4,28,8,29,7,30,31,32,3,5,6,33,43,78,46,55,194,508,115,9,10]))),vQ=a.lazy(()=>C(()=>import("./SolutionsForwarderPage-VN6bD4ai.js"),__vite__mapDeps([530,1,528,4,28,8,29,7,30,31,32,3,5,6,33,43,78,46,514,508,9,10]))),bQ=a.lazy(()=>C(()=>import("./SolutionsCarrierPage-DRO6IzHU.js"),__vite__mapDeps([531,1,528,4,28,8,29,7,30,31,32,3,5,6,33,43,78,46,532,193,520,533,266,9,10]))),_Q=a.lazy(()=>C(()=>import("./MarineServicePage-8gwuXtWU.js"),__vite__mapDeps([534,1,535,4,28,8,29,7,30,31,32,3,5,6,33,46,55,40,64,95,536,9,10]))),yQ=a.lazy(()=>C(()=>import("./RailwayServicePage-CcOIfTS1.js"),__vite__mapDeps([537,1,535,4,28,8,29,7,30,31,32,3,5,6,33,46,41,536,64,538,40,9,10]))),xQ=a.lazy(()=>C(()=>import("./AutoServicePage-B3CQnnXB.js"),__vite__mapDeps([539,1,535,4,28,8,29,7,30,31,32,3,5,6,33,46,536,40,55,142,9,10]))),wQ=a.lazy(()=>C(()=>import("./AirServicePage-DlDN_YaI.js"),__vite__mapDeps([540,1,535,4,28,8,29,7,30,31,32,3,5,6,33,46,536,64,541,48,9,10]))),EQ=a.lazy(()=>C(()=>import("./GroupageServicePage-DDCXnLpl.js"),__vite__mapDeps([542,1,535,4,28,8,29,7,30,31,32,3,5,6,33,46,96,509,87,40,538,9,10]))),SQ=a.lazy(()=>C(()=>import("./MultimodalServicePage-Dscz_yIF.js"),__vite__mapDeps([543,1,535,4,28,8,29,7,30,31,32,3,5,6,33,46,193,532,64,538,131,9,10]))),CQ=a.lazy(()=>C(()=>import("./CustomsServicePage-BUVNBvjh.js"),__vite__mapDeps([544,1,535,4,28,8,29,7,30,31,32,3,5,6,33,46,194,266,226,9,10]))),PQ=a.lazy(()=>C(()=>import("./ContainerRentalServicePage-CmCU3TNS.js"),__vite__mapDeps([545,1,535,4,28,8,29,7,30,31,32,3,5,6,33,46,191,87,64,278,9,10]))),RQ=a.lazy(()=>C(()=>import("./AboutCompanyPage-CIv4NQvf.js"),__vite__mapDeps([546,1,4,28,8,29,7,30,31,32,3,5,6,33,50,48,532,55,9,10]))),TQ=a.lazy(()=>C(()=>import("./ContactsPageDS-cZNigDd7.js"),__vite__mapDeps([547,1,4,28,8,29,7,30,31,32,3,5,6,33,536,55,46,106,9,10]))),IQ=a.lazy(()=>C(()=>import("./VacanciesPage-DKM8kZsq.js"),__vite__mapDeps([548,1,4,28,8,29,7,30,31,32,3,5,6,33,284,518,48,9,10]))),$Q=a.lazy(()=>C(()=>import("./PrivacyPolicyPage-DYSz7jGc.js"),__vite__mapDeps([549,1,4,28,8,29,7,30,31,32,3,5,6,33,9,10]))),AQ=a.lazy(()=>C(()=>import("./RoutePairLandingPage-DC7ZhAl6.js"),__vite__mapDeps([550,1,8,4,61,28,29,7,30,31,32,3,5,6,33,25,9,10,536,95,41]))),jQ=a.lazy(()=>C(()=>import("./IndustryLandingPage-CYJEJ2BP.js"),__vite__mapDeps([551,1,44,31,28,4,8,29,7,30,32,3,5,6,33,276,249,541,42,43,520,55,533,102,40,528,78,46,9,10]))),OQ=a.lazy(()=>C(()=>import("./CompetitorLandingPage-ChUytT9w.js"),__vite__mapDeps([552,1,4,28,8,29,7,30,31,32,3,5,6,33,46,148,9,10]))),NQ=a.lazy(()=>C(()=>import("./DostavkaIndexPage-DaNUeFJg.js"),__vite__mapDeps([553,1,4,28,8,29,7,30,31,32,3,5,6,33,554,55,9,10]))),DQ=a.lazy(()=>C(()=>import("./DostavkaCountryPage-DK2eRinB.js"),__vite__mapDeps([555,1,4,28,8,29,7,30,31,32,3,5,6,33,554,17,55,46,9,10]))),kQ=a.lazy(()=>C(()=>import("./DostavkaCityPage-D280152O.js"),__vite__mapDeps([556,1,4,28,8,29,7,30,31,32,3,5,6,33,554,17,234,55,46,9,10]))),MQ=a.lazy(()=>C(()=>import("./MarketingNotFoundPage-BqeTlGk3.js"),__vite__mapDeps([557,1,4,28,8,29,7,30,31,32,3,5,6,33,532,9,10]))),LQ=a.lazy(()=>C(()=>import("./ResourcesHubPage-D8hJdgPa.js"),__vite__mapDeps([558,1,4,28,8,29,7,30,31,32,3,5,6,33,559,560,48,281,169,43,9,10]))),zQ=a.lazy(()=>C(()=>import("./GlossaryPage-b3Oap2SM.js"),__vite__mapDeps([561,1,4,28,8,29,7,30,31,32,3,5,6,33,256,560,9,10]))),FQ=a.lazy(()=>C(()=>import("./GuidesIndexPage-BR321jwQ.js"),__vite__mapDeps([562,1,4,28,8,29,7,30,31,32,3,5,6,33,559,87,9,10]))),VQ=a.lazy(()=>C(()=>import("./CustomsChina2026-CgL_0v9L.js"),__vite__mapDeps([563,1,564,4,28,8,29,7,30,31,32,3,5,6,33,87,71,559,9,10]))),BQ=a.lazy(()=>C(()=>import("./IncotermsPlain-C0fflrn4.js"),__vite__mapDeps([565,1,564,4,28,8,29,7,30,31,32,3,5,6,33,87,71,559,9,10]))),HQ=a.lazy(()=>C(()=>import("./HowToReadBL-DmVw4Fud.js"),__vite__mapDeps([566,1,564,4,28,8,29,7,30,31,32,3,5,6,33,87,71,559,9,10]))),UQ=a.lazy(()=>C(()=>import("./ReduceLogisticsCosts-BaB-FkYm.js"),__vite__mapDeps([567,1,564,4,28,8,29,7,30,31,32,3,5,6,33,87,71,559,9,10]))),WQ=a.lazy(()=>C(()=>import("./VttGuide-BzgscFj1.js"),__vite__mapDeps([568,1,564,4,28,8,29,7,30,31,32,3,5,6,33,87,71,559,9,10]))),qQ=a.lazy(()=>C(()=>import("./ChinaContractGuide-DRLBg4ON.js"),__vite__mapDeps([569,1,564,4,28,8,29,7,30,31,32,3,5,6,33,87,71,559,9,10]))),GQ=a.lazy(()=>C(()=>import("./DemurrageDetentionGuide-C95iRZSm.js"),__vite__mapDeps([570,1,564,4,28,8,29,7,30,31,32,3,5,6,33,87,71,559,9,10]))),KQ=a.lazy(()=>C(()=>import("./FclVsLclGuide-bJ0qpRkY.js"),__vite__mapDeps([571,1,564,4,28,8,29,7,30,31,32,3,5,6,33,87,71,559,9,10]))),XQ=a.lazy(()=>C(()=>import("./AirCargoGuide-Ck5nucu7.js"),__vite__mapDeps([572,1,564,4,28,8,29,7,30,31,32,3,5,6,33,87,71,559,9,10]))),YQ=a.lazy(()=>C(()=>import("./CustomsDutiesGuide-XMgOmtao.js"),__vite__mapDeps([573,1,564,4,28,8,29,7,30,31,32,3,5,6,33,87,71,559,9,10]))),JQ=a.lazy(()=>C(()=>import("./RailFreightGuide-BW8O0m8u.js"),__vite__mapDeps([574,1,564,4,28,8,29,7,30,31,32,3,5,6,33,87,71,559,9,10]))),ZQ=a.lazy(()=>C(()=>import("./CargoInsuranceGuide-iGiYGt0D.js"),__vite__mapDeps([575,1,564,4,28,8,29,7,30,31,32,3,5,6,33,87,71,559,9,10]))),QQ=a.lazy(()=>C(()=>import("./MarketingResetPasswordPage-Dsfd9Ehi.js"),__vite__mapDeps([576,1,79,4,46,45,8,5,9,10]))),eee=a.lazy(()=>C(()=>import("./VerifyEmailPage-BpTBnxbi.js"),__vite__mapDeps([577,1,578,579,8,4,5,9,10]))),tee=a.lazy(()=>C(()=>import("./ConfirmEmailChangePage-DFvTlU3M.js"),__vite__mapDeps([580,1,578,579,8,4,5,9,10]))),ree=a.lazy(()=>C(()=>import("./AdminGuard-DCmRHWqJ.js"),__vite__mapDeps([581,1,4,61,8,5,9,10]))),nee=a.lazy(()=>C(()=>import("./AdminLayout-latTDhr1.js"),__vite__mapDeps([582,1,4,583,5,584,168,585,586,587,206,112,31,87,52,245,33,115,32,54,219,588,169,30,216,106,125,8,9,10,589]))),oee=a.lazy(()=>C(()=>import("./PublicTrackingPage-CJLVoBeE.js"),__vite__mapDeps([590,1,114,591,592,179,9,178,186,593,594,595,596,185,8,4,5,10]))),see=a.lazy(()=>C(()=>import("./AdminOverviewPage-BqzJH7Qu.js"),__vite__mapDeps([597,1,167,4,127,8,128,129,108,53,130,51,61,168,598,5,599,176,243,216,83,9,10]))),iee=a.lazy(()=>C(()=>import("./AdminMultiTenantPage-94X2oh5C.js"),__vite__mapDeps([600,1,4,61,127,8,128,129,108,53,130,51,5,216,83,9,10]))),aee=a.lazy(()=>C(()=>import("./AdminWbrPage-CDriSBXC.js"),__vite__mapDeps([601,1,4,61,5,216,83,8,9,10]))),lee=a.lazy(()=>C(()=>import("./AdminTrackingPage-BZuNCNoB.js"),__vite__mapDeps([602,1,4,61,127,8,128,129,108,53,130,51,5,29,216,83,9,10]))),cee=a.lazy(()=>C(()=>import("./AdminOkrQuartersPage-DiutPUAn.js"),__vite__mapDeps([603,1,604,4,61,5,216,100,83,8,9,10]))),uee=a.lazy(()=>C(()=>import("./AdminOkrQuarterDetailPage-CiTJkxbN.js"),__vite__mapDeps([605,1,604,4,61,5,83,71,100,8,9,10]))),dee=a.lazy(()=>C(()=>import("./AdminPostmortemsListPage-vFuyDIDb.js"),__vite__mapDeps([606,1,607,4,127,8,128,129,108,53,130,51,5,216,83,9,10]))),pee=a.lazy(()=>C(()=>import("./AdminPostmortemDetailPage-DF7otSCN.js"),__vite__mapDeps([608,1,607,4,61,5,83,71,100,8,9,10]))),rx=a.lazy(()=>C(()=>import("./AdminCompany360Page-DcEki2pl.js"),__vite__mapDeps([609,1,4,61,5,33,83,71,8,9,10]))),fee=a.lazy(()=>C(()=>import("./AdminUnknownCitiesPage-coz1e2n4.js"),__vite__mapDeps([610,1,4,127,8,128,129,108,53,130,51,167,611,5,9,10]))),mee=a.lazy(()=>C(()=>import("./AdminCitiesPage-BweMcypR.js"),__vite__mapDeps([612,1,4,127,8,128,129,108,53,130,51,611,5,83,9,10]))),hee=a.lazy(()=>C(()=>import("./AdminSupplierActionsPage-D0Fj2Y6G.js"),__vite__mapDeps([613,1,4,127,8,128,129,108,53,130,51,614,5,83,9,10]))),gee=a.lazy(()=>C(()=>import("./AdminPricingProfilesPage-SJBjy6B0.js"),__vite__mapDeps([615,1,4,127,8,128,129,108,53,130,51,616,5,83,9,10]))),vee=a.lazy(()=>C(()=>import("./AdminInternationalAutoPage-BhU-IdFa.js"),__vite__mapDeps([617,1,4,135,87,127,8,128,129,108,53,130,51,5,83,100,9,10]))),bee=a.lazy(()=>C(()=>import("./AdminInvoicesPage-BzCo3bnk.js"),__vite__mapDeps([618,1,4,135,87,127,8,128,129,108,53,130,51,619,620,98,5,621,176,622,61,83,32,84,9,10]))),_ee=a.lazy(()=>C(()=>import("./AdminContractsPage-BaDLu63f.js"),__vite__mapDeps([623,1,4,135,87,61,127,8,128,129,108,53,130,51,619,621,176,5,622,83,84,9,10]))),yee=a.lazy(()=>C(()=>import("./AdminUsersPage-B9JrBsAN.js"),__vite__mapDeps([624,1,4,127,8,128,129,108,53,130,51,616,61,5,83,47,65,9,10]))),xee=a.lazy(()=>C(()=>import("./AdminCompanyInvitationsPage-B8YV5Tu4.js"),__vite__mapDeps([625,1,4,127,8,128,129,108,53,130,51,5,83,9,10]))),wee=a.lazy(()=>C(()=>import("./AdminOrdersPage-Bw2PZE8J.js"),__vite__mapDeps([626,1,4,127,8,128,129,108,53,130,51,584,583,585,598,627,628,619,176,593,9,178,185,5,621,52,83,10]))),Eee=a.lazy(()=>C(()=>import("./AdminBookmarksPage-D3zQzP1W.js"),__vite__mapDeps([629,1,4,127,8,128,129,108,53,130,51,584,176,5,9,10]))),See=a.lazy(()=>C(()=>import("./AdminRemindersPage-BudaA-6x.js"),__vite__mapDeps([630,1,4,127,8,128,129,108,53,130,51,585,176,5,83,9,10]))),Cee=a.lazy(()=>C(()=>import("./AdminTagsPage-Dd9sYQ_I.js"),__vite__mapDeps([631,1,4,127,8,128,129,108,53,130,51,598,176,5,9,10]))),Pee=a.lazy(()=>C(()=>import("./AdminOrderDetailPage-BRBGwF4A.js").then(e=>e.A),__vite__mapDeps([632,8,1,4,61,584,110,627,176,215,185,178,9,181,182,183,184,179,583,593,202,5,177,633,594,620,83,52,585,598,114,88,216,249,65,127,128,129,108,53,130,51,46,112,45,124,634,635]))),Ree=a.lazy(()=>C(()=>import("./AdminNotificationsPage-x3bwy4H3.js"),__vite__mapDeps([636,1,4,127,8,128,129,108,53,130,51,619,176,621,5,84,216,9,10]))),Tee=a.lazy(()=>C(()=>import("./AdminAmoCrmPage-CG7djElh.js"),__vite__mapDeps([637,1,4,61,127,8,128,129,108,53,130,51,176,5,101,216,100,46,88,9,10]))),Iee=a.lazy(()=>C(()=>import("./AdminMarketingPage-DrrIh2Hs.js"),__vite__mapDeps([638,1,4,61,176,5,83,112,84,8,9,10]))),$ee=a.lazy(()=>C(()=>import("./AdminAnalyticsPage-DCnomMev.js"),__vite__mapDeps([639,1,135,4,87,61,127,8,128,129,108,53,130,51,599,176,5,219,216,83,9,10]))),Aee=a.lazy(()=>C(()=>import("./AdminActivationFunnelPage-DE36eE3O.js"),__vite__mapDeps([640,1,135,4,87,61,127,8,128,129,108,53,130,51,599,176,5,588,216,83,9,10]))),jee=a.lazy(()=>C(()=>import("./AdminDcsaPage-C0YKAfVn.js"),__vite__mapDeps([641,1,4,61,127,8,128,129,108,53,130,51,176,5,216,83,46,88,148,45,9,10]))),Oee=a.lazy(()=>C(()=>import("./AdminRevenueAnalyticsPage-BJEo3xxf.js"),__vite__mapDeps([642,1,4,135,87,61,127,8,128,129,108,53,130,51,599,176,5,159,216,83,9,10]))),Nee=a.lazy(()=>C(()=>import("./AdminStuckApplicationsPage-s_VDqmQa.js"),__vite__mapDeps([643,1,4,127,8,128,129,108,53,130,51,586,583,176,5,216,588,212,83,9,10]))),Dee=a.lazy(()=>C(()=>import("./AdminExceptionsInboxPage-CQz75SZo.js"),__vite__mapDeps([644,1,4,127,8,128,129,108,53,130,51,587,176,5,78,94,46,112,216,83,9,10]))),kee=a.lazy(()=>C(()=>import("./AdminTelegramPage-DPA-FYKn.js"),__vite__mapDeps([645,1,4,61,5,8,9,10]))),Mee=a.lazy(()=>C(()=>import("./AdminApiKeysPage-CqeaEd9F.js"),__vite__mapDeps([646,1,4,127,8,128,129,108,53,130,51,176,5,216,83,9,10]))),Lee=a.lazy(()=>C(()=>import("./AdminSupplierScorecardPage-D5P3ID0U.js"),__vite__mapDeps([647,1,4,127,8,128,129,108,53,130,51,176,5,83,52,9,10]))),zee=a.lazy(()=>C(()=>import("./AdminTariffsChangesPage-E6SKans1.js"),__vite__mapDeps([648,1,4,127,8,128,129,108,53,130,51,619,621,176,5,216,83,9,10]))),Fee=a.lazy(()=>C(()=>import("./AdminExternalSchedulesPage-CzemVghp.js"),__vite__mapDeps([649,1,4,176,5,216,8,9,10]))),Vee=a.lazy(()=>C(()=>import("./AdminReconciliationPage-Cf5-9GnY.js"),__vite__mapDeps([650,1,4,61,127,8,128,129,108,53,130,51,5,46,83,112,9,10]))),Bee=a.lazy(()=>C(()=>import("./SupplierGuard-C57zcJzm.js"),__vite__mapDeps([651,1,4,61,8,5,9,10]))),Hee=a.lazy(()=>C(()=>import("./SupplierLayout-0LG7x3VW.js"),__vite__mapDeps([652,1,206,5,8,4,9,10,653]))),Uee=a.lazy(()=>C(()=>import("./SupplierProfilePage-DnnHHp8Z.js"),__vite__mapDeps([654,1,4,61,655,5,83,8,9,10]))),Wee=a.lazy(()=>C(()=>import("./SupplierDashboardPage-C-qOBDBQ.js"),__vite__mapDeps([656,1,4,61,655,176,5,52,83,65,8,9,10]))),$i=a.lazy(()=>C(()=>import("./SupplierRoutesPage-C4nT1th9.js"),__vite__mapDeps([657,1,135,4,87,127,8,128,129,108,53,130,51,628,658,176,5,112,83,65,35,9,10]))),xl=a.lazy(()=>C(()=>import("./SupplierResourcePage-CoeZzuD4.js"),__vite__mapDeps([659,1,135,4,87,127,8,128,129,108,53,130,51,658,628,176,5,112,83,65,9,10]))),qee=a.lazy(()=>C(()=>import("./SupplierAnalyticsPage-CUCsvWtp.js"),__vite__mapDeps([660,1,4,127,8,128,129,108,53,130,51,176,5,83,9,10]))),Gee=a.lazy(()=>C(()=>import("./SupplierAuditPage-CjmlN-Je.js"),__vite__mapDeps([661,1,4,127,8,128,129,108,53,130,51,614,5,83,9,10]))),Kee=a.lazy(()=>C(()=>import("./SupplierTeamPage-CYhxrayu.js"),__vite__mapDeps([662,1,4,127,8,128,129,108,53,130,51,663,176,5,83,9,10]))),Xee=a.lazy(()=>C(()=>import("./SupplierInvoicesPage-B_i9OCgx.js"),__vite__mapDeps([664,1,4,135,87,127,8,128,129,108,53,130,51,634,620,5,32,84,83,9,10]))),Yee=a.lazy(()=>C(()=>import("./SupplierContractsPage-DR7jJ5Lc.js"),__vite__mapDeps([665,1,4,135,87,127,8,128,129,108,53,130,51,5,83,112,9,10]))),Jee=a.lazy(()=>C(()=>import("./SupplierNotificationsPage-LbaEj-z3.js"),__vite__mapDeps([666,1,4,138,8,61,83,139,221,46,121,106,6,5,9,10]))),Zee=a.lazy(()=>C(()=>import("./SupplierBlackoutsPage-BiXlckzg.js"),__vite__mapDeps([667,1,135,4,87,127,8,128,129,108,53,130,51,176,5,9,10]))),Qee=a.lazy(()=>C(()=>import("./AcceptInvitationPage-uNxTl1Mo.js"),__vite__mapDeps([668,1,663,176,593,9,178,185,184,8,4,5,10]))),ete=a.lazy(()=>C(()=>import("./About-BnnAt3nZ.js"),__vite__mapDeps([669,1,5,670]))),tte=a.lazy(()=>C(()=>import("./Blog-BlNXZpxp.js"),__vite__mapDeps([14,1,15,16,17,5,2,3,4,6,7,8,9,10,18]))),rte=a.lazy(()=>C(()=>import("./BlogPost-DKMz1wMy.js"),__vite__mapDeps([671,1,15,16]))),nte=a.lazy(()=>C(()=>import("./index-BLBKlO8g.js"),__vite__mapDeps([672,1,17,5,2,3,4,6,7,8,9,10,673]))),ote=a.lazy(()=>C(()=>import("./SearchResultsPage-DLC3Rmml.js"),__vite__mapDeps([674,8,1,17,175,4,35,74,176,36,5,177,9,178,179,180,73,97,595,76,184,92,633,10,675]))),ste=a.lazy(()=>C(()=>import("./AboutCompany-AlPLsdQe.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]))),ite=a.lazy(()=>C(()=>import("./AdminExchangeStatsPage-XqFeRkQr.js"),__vite__mapDeps([676,1,4,135,87,61,127,8,128,129,108,53,130,51,5,83,9,10]))),ate=a.lazy(()=>C(()=>import("./AdminChatModerationPage-DGVbzIn3.js"),__vite__mapDeps([677,1,4,135,87,61,127,8,128,129,108,53,130,51,5,83,9,10]))),lte=a.lazy(()=>C(()=>import("./AdminCalendarPage-DyQrtRzp.js"),__vite__mapDeps([678,1,4,61,619,176,5,83,8,9,10]))),cte={enabled:!0,active:!1,validUntil:null,defaultValidityDays:3},ute=5e3,dte=()=>c.jsx("div",{className:"route-loading",children:c.jsx("img",{src:"/loading-loader.gif",alt:"Загрузка..."})}),pte=(e,t)=>Promise.race([e,new Promise((r,n)=>setTimeout(()=>n(new Error(`Timeout after ${t}ms`)),t))]);function fte(){const{pathname:e}=Xr();return e.startsWith("/admin")||e.startsWith("/supplier")?null:c.jsx(a.Suspense,{fallback:null,children:c.jsx(pK,{})})}function mte(){const{isManager:e,isAdmin:t,isSuperAdmin:r}=v1();return e&&!t&&!r?c.jsx(Ht,{to:"/admin/agenda",replace:!0}):c.jsx(see,{})}function hte(){const{id:e}=mx(),{search:t,hash:r}=Xr();return c.jsx(Ht,{to:`/order/${e??""}${t}${r}`,replace:!0})}function gte({to:e}){const{search:t,hash:r}=Xr();return c.jsx(Ht,{to:`${e}${t}${r}`,replace:!0})}function vte(){const[e,t]=a.useState(null),[r,n]=a.useState(!0);return a.useEffect(()=>{Ez()},[]),a.useEffect(()=>{(async()=>{try{const s=await pte(hG.getStatus(),ute);t(s)}catch{t(cte)}finally{n(!1)}})()},[]),r?c.jsx("div",{className:"lease-black-screen"}):e!=null&&e.enabled&&!e.active?c.jsx("div",{className:"lease-black-screen"}):c.jsx(dK,{children:c.jsx(mG,{children:c.jsx(TL,{children:c.jsx(pG,{children:c.jsxs(F$,{children:[c.jsx(bG,{}),c.jsx(T7,{}),c.jsx(Gq,{}),c.jsx(I7,{}),c.jsx(fte,{}),c.jsx(a.Suspense,{fallback:c.jsx(dte,{}),children:c.jsxs(V$,{children:[c.jsxs(E,{element:c.jsx(Gz,{}),children:[c.jsx(E,{path:"/search-results",element:c.jsx(ote,{})}),c.jsx(E,{path:"/tracking/:applicationNumber",element:c.jsx(oee,{})}),c.jsx(E,{path:"/track/:token",element:c.jsx(iX,{})}),c.jsx(E,{path:"/supplier-portal/:token",element:c.jsx(aX,{})}),c.jsx(E,{path:"/ktk",element:c.jsx(Ht,{to:"/?tab=ktk",replace:!0})}),c.jsx(E,{path:"/Profile",element:c.jsx(rm,{label:"Route:Profile",children:c.jsx(fK,{})})}),c.jsx(E,{path:"/reset-password",element:c.jsx(QQ,{})}),c.jsx(E,{path:"/verify-email",element:c.jsx(eee,{})}),c.jsx(E,{path:"/confirm-email-change",element:c.jsx(tee,{})}),c.jsx(E,{path:"/accept-invitation",element:c.jsx(Qee,{})}),c.jsx(E,{path:"/Dashboard",element:c.jsx(gte,{to:"/lk"})}),c.jsx(E,{path:"/order-details/:id",element:c.jsx(hte,{})}),c.jsx(E,{path:"/about",element:c.jsx(Ht,{to:"/about-company",replace:!0})}),c.jsx(E,{path:"/o-kompanii",element:c.jsx(ste,{})}),c.jsx(E,{path:"/Main",element:c.jsx(ete,{})}),c.jsx(E,{path:"/railway",element:c.jsx(Ht,{to:"/services/railway",replace:!0})}),c.jsx(E,{path:"/marineservice",element:c.jsx(Ht,{to:"/services/marine",replace:!0})}),c.jsx(E,{path:"/autotransport",element:c.jsx(Ht,{to:"/services/auto",replace:!0})}),c.jsx(E,{path:"/airtransportations",element:c.jsx(Ht,{to:"/services/air",replace:!0})}),c.jsx(E,{path:"/groupagecargo",element:c.jsx(Ht,{to:"/services/groupage",replace:!0})}),c.jsx(E,{path:"/multimodal",element:c.jsx(Ht,{to:"/services/multimodal",replace:!0})}),c.jsx(E,{path:"/customsservices",element:c.jsx(Ht,{to:"/services/customs",replace:!0})}),c.jsx(E,{path:"/containerrental",element:c.jsx(Ht,{to:"/services/container-rental",replace:!0})}),c.jsx(E,{path:"/successstories",element:c.jsx(nte,{})}),c.jsx(E,{path:"/blog",element:c.jsx(tte,{})}),c.jsx(E,{path:"/blog/:id",element:c.jsx(rm,{label:"Route:BlogPost",children:c.jsx(rte,{})})})]}),c.jsxs(E,{path:"/admin",element:c.jsx(ree,{children:c.jsx(nee,{})}),children:[c.jsx(E,{index:!0,element:c.jsx(mte,{})}),c.jsx(E,{path:"wbr",element:c.jsx(aee,{})}),c.jsx(E,{path:"multi-tenant",element:c.jsx(iee,{})}),c.jsx(E,{path:"tracking",element:c.jsx(lee,{})}),c.jsx(E,{path:"okr",element:c.jsx(cee,{})}),c.jsx(E,{path:"okr/quarters/:id",element:c.jsx(uee,{})}),c.jsx(E,{path:"postmortems",element:c.jsx(dee,{})}),c.jsx(E,{path:"postmortems/:id",element:c.jsx(pee,{})}),c.jsx(E,{path:"cities",element:c.jsx(mee,{})}),c.jsx(E,{path:"unknown-cities",element:c.jsx(fee,{})}),c.jsx(E,{path:"supplier-actions",element:c.jsx(hee,{})}),c.jsx(E,{path:"pricing-profiles",element:c.jsx(gee,{})}),c.jsx(E,{path:"international-auto",element:c.jsx(vee,{})}),c.jsx(E,{path:"invoices",element:c.jsx(bee,{})}),c.jsx(E,{path:"contracts",element:c.jsx(_ee,{})}),c.jsx(E,{path:"users",element:c.jsx(yee,{})}),c.jsx(E,{path:"companies/:companyId/invitations",element:c.jsx(xee,{})}),c.jsx(E,{path:"companies",element:c.jsx(rx,{})}),c.jsx(E,{path:"companies/:id",element:c.jsx(rx,{})}),c.jsx(E,{path:"orders",element:c.jsx(wee,{})}),c.jsx(E,{path:"orders/:id",element:c.jsx(Pee,{})}),c.jsx(E,{path:"bookmarks",element:c.jsx(Eee,{})}),c.jsx(E,{path:"reminders",element:c.jsx(See,{})}),c.jsx(E,{path:"tags",element:c.jsx(Cee,{})}),c.jsx(E,{path:"notifications",element:c.jsx(Ree,{})}),c.jsx(E,{path:"amocrm",element:c.jsx(Tee,{})}),c.jsx(E,{path:"marketing",element:c.jsx(Iee,{})}),c.jsx(E,{path:"analytics",element:c.jsx($ee,{})}),c.jsx(E,{path:"analytics/revenue",element:c.jsx(Oee,{})}),c.jsx(E,{path:"activation",element:c.jsx(Aee,{})}),c.jsx(E,{path:"dcsa",element:c.jsx(jee,{})}),c.jsx(E,{path:"applications/stuck",element:c.jsx(Nee,{})}),c.jsx(E,{path:"exceptions",element:c.jsx(Dee,{})}),c.jsx(E,{path:"telegram",element:c.jsx(kee,{})}),c.jsx(E,{path:"api-keys",element:c.jsx(Mee,{})}),c.jsx(E,{path:"tariffs/changes",element:c.jsx(zee,{})}),c.jsx(E,{path:"external-schedules",element:c.jsx(Fee,{})}),c.jsx(E,{path:"supplier-scorecard",element:c.jsx(Lee,{})}),c.jsx(E,{path:"exchange-stats",element:c.jsx(ite,{})}),c.jsx(E,{path:"exchange-chat-moderation",element:c.jsx(ate,{})}),c.jsx(E,{path:"calendar",element:c.jsx(lte,{})}),c.jsx(E,{path:"reconciliation",element:c.jsx(Vee,{})})]}),c.jsxs(E,{path:"/supplier",element:c.jsx(Bee,{children:c.jsx(Hee,{})}),children:[c.jsx(E,{index:!0,element:c.jsx(Wee,{})}),c.jsx(E,{path:"profile",element:c.jsx(Uee,{})}),c.jsx(E,{path:"routes/sea",element:c.jsx($i,{kind:"SEA",title:"Морские тарифы"})}),c.jsx(E,{path:"routes/auto",element:c.jsx($i,{kind:"AUTO",title:"Автомобильные тарифы"})}),c.jsx(E,{path:"routes/railway",element:c.jsx($i,{kind:"RAILWAY",title:"Железнодорожные тарифы"})}),c.jsx(E,{path:"routes/air",element:c.jsx($i,{kind:"AIR",title:"Авиа тарифы"})}),c.jsx(E,{path:"routes/local",element:c.jsx($i,{kind:"LOCAL",title:"Локальная доставка (door-to-door сегменты)"})}),c.jsx(E,{path:"schedules",element:c.jsx(xl,{path:"schedules",title:"Расписания (Schedules)",info:"Рейсы и расписания судов. POL/POD по портам, dateFrom/dateTo — окно действия.",fields:[{key:"pol",label:"POL",inTable:!0,required:!0,placeholder:"Shanghai"},{key:"pod",label:"POD",inTable:!0,required:!0,placeholder:"Vladivostok"},{key:"dateFrom",label:"Дата с",inTable:!0,width:120,type:"date"},{key:"dateTo",label:"Дата по",inTable:!0,width:120,type:"date"},{key:"nameOfTheVessel",label:"Судно",inTable:!0,placeholder:"MAERSK SEMARANG"},{key:"eqpt",label:"Equipment",placeholder:"40HC"},{key:"teuSpace",label:"TEU space",placeholder:"50"},{key:"routeLimit",label:"Route limit (текст)"}]})}),c.jsx(E,{path:"drop-offs",element:c.jsx(xl,{path:"drop-offs",title:"Drop-off",info:"Условия сдачи контейнера на портах. Prices — Map<CargoSize, RUB>.",fields:[{key:"portFrom",label:"Порт отправления",inTable:!0,required:!0,placeholder:"Shanghai"},{key:"portTo",label:"Порт назначения",inTable:!0,required:!0,placeholder:"Vladivostok"},{key:"validFrom",label:"С",inTable:!0,width:120,type:"date"},{key:"validTo",label:"До",inTable:!0,width:120,type:"date"},{key:"currency",label:"Валюта",type:"select",options:["RUB","USD","EUR","CNY"]},{key:"prices",label:"Цены (JSON)",type:"json",placeholder:'{"FILO20": 5000, "FILO40": 7500}'}]})}),c.jsx(E,{path:"rents",element:c.jsx(xl,{path:"rents",title:"Аренда контейнеров",info:"Стоимость аренды по маршрутам. Тот же формат что Drop-off — Map<CargoSize, RUB>.",fields:[{key:"portFrom",label:"Порт отправления",inTable:!0,required:!0,placeholder:"Shanghai"},{key:"portTo",label:"Порт назначения",inTable:!0,required:!0,placeholder:"Vladivostok"},{key:"validFrom",label:"С",inTable:!0,width:120,type:"date"},{key:"validTo",label:"До",inTable:!0,width:120,type:"date"},{key:"currency",label:"Валюта",type:"select",options:["RUB","USD","EUR","CNY"]},{key:"prices",label:"Цены (JSON)",type:"json",placeholder:'{"FILO20": 5000, "FILO40": 7500}'}]})}),c.jsx(E,{path:"additional-services",element:c.jsx(xl,{path:"additional-services",title:"Дополнительные услуги",info:"Сервисы поставщика: оформление документов, страхование, supercharges и т.п.",importResource:"ADDITIONAL_SERVICE",fields:[{key:"name",label:"Название",inTable:!0,required:!0,placeholder:"BAF surcharge"},{key:"prices",label:"Цены (JSON)",type:"json",placeholder:'{"FILO20": 50, "FILO40": 80}'}]})}),c.jsx(E,{path:"analytics",element:c.jsx(qee,{})}),c.jsx(E,{path:"audit",element:c.jsx(Gee,{})}),c.jsx(E,{path:"team",element:c.jsx(Kee,{})}),c.jsx(E,{path:"invoices",element:c.jsx(Xee,{})}),c.jsx(E,{path:"contracts",element:c.jsx(Yee,{})}),c.jsx(E,{path:"notifications",element:c.jsx(Jee,{})}),c.jsx(E,{path:"blackouts",element:c.jsx(Zee,{})})]}),c.jsx(E,{path:"/design-system",element:c.jsx(mK,{})}),c.jsx(E,{path:"/",element:c.jsx(ZZ,{})}),c.jsx(E,{path:"/services",element:c.jsx(hK,{})}),c.jsx(E,{path:"/pricing",element:c.jsx(gK,{})}),c.jsx(E,{path:"/docs/webhooks",element:c.jsx(vK,{})}),c.jsx(E,{path:"/portal/webhooks",element:c.jsx(bK,{})}),c.jsx(E,{path:"/accept-invite",element:c.jsx(_K,{})}),c.jsx(E,{path:"/lk",element:c.jsx(EK,{})}),c.jsx(E,{path:"/lk/calc",element:c.jsx(F_,{children:c.jsx(SK,{})})}),c.jsx(E,{path:"/lk/applications",element:c.jsx(ex,{})}),c.jsx(E,{path:"/lk/contracts",element:c.jsx(ex,{mode:"contracts"})}),c.jsx(E,{path:"/lk/applications/:id",element:c.jsx(CK,{})}),c.jsx(E,{path:"/lk/documents",element:c.jsx(PK,{})}),c.jsx(E,{path:"/lk/saved-calcs",element:c.jsx(IK,{})}),c.jsx(E,{path:"/lk/notifications",element:c.jsx(RK,{})}),c.jsx(E,{path:"/lk/team",element:c.jsx(TK,{})}),c.jsx(E,{path:"/lk/shipments",element:c.jsx($K,{})}),c.jsx(E,{path:"/lk/shipments/:id/tracker",element:c.jsx(OK,{})}),c.jsx(E,{path:"/lk/shipments/:id",element:c.jsx(AK,{})}),c.jsx(E,{path:"/lk/customs",element:c.jsx(F_,{children:c.jsx(jK,{})})}),c.jsx(E,{path:"/lk/help",element:c.jsx(NK,{})}),c.jsx(E,{path:"/lk/referral",element:c.jsx(MK,{})}),c.jsx(E,{path:"/lk/partner",element:c.jsx(Ht,{to:"/portal",replace:!0})}),c.jsx(E,{path:"/lk/sales/fast-quote",element:c.jsx(DK,{})}),c.jsx(E,{path:"/lk/sales/leads",element:c.jsx(kK,{})}),c.jsx(E,{path:"/lk/admin/customers",element:c.jsx(zK,{})}),c.jsx(E,{path:"/lk/insurance/claim",element:c.jsx(tx,{})}),c.jsx(E,{path:"/lk/claims/new",element:c.jsx(tx,{})}),c.jsx(E,{path:"/lk/contract",element:c.jsx(BK,{})}),c.jsx(E,{path:"/m/calculator",element:c.jsx(rX,{})}),c.jsx(E,{path:"/portal/shipments/:id",element:c.jsx(yK,{})}),c.jsx(E,{path:"/portal/shipments",element:c.jsx(xK,{})}),c.jsx(E,{path:"/portal",element:c.jsx(wK,{})}),c.jsx(E,{path:"/plans",element:c.jsx(nX,{})}),c.jsx(E,{path:"/login",element:c.jsx(oX,{})}),c.jsx(E,{path:"/signup/legal-entity",element:c.jsx(sX,{})}),c.jsx(E,{path:"/tools",element:c.jsx(lX,{})}),c.jsx(E,{path:"/tools/incoterms",element:c.jsx(cX,{})}),c.jsx(E,{path:"/tools/co2",element:c.jsx(uX,{})}),c.jsx(E,{path:"/tools/ports",element:c.jsx(dX,{})}),c.jsx(E,{path:"/tools/distance",element:c.jsx(pX,{})}),c.jsx(E,{path:"/tools/cbm",element:c.jsx(fX,{})}),c.jsx(E,{path:"/tools/packing-list",element:c.jsx(hX,{})}),c.jsx(E,{path:"/tools/container",element:c.jsx(gX,{})}),c.jsx(E,{path:"/tools/hs-code",element:c.jsx(vX,{})}),c.jsx(E,{path:"/tools/customs-calc",element:c.jsx(bX,{})}),c.jsx(E,{path:"/tools/currency",element:c.jsx(_X,{})}),c.jsx(E,{path:"/tools/docs-check",element:c.jsx(yX,{})}),c.jsx(E,{path:"/tools/schedule",element:c.jsx(xX,{})}),c.jsx(E,{path:"/tools/freight-rates",element:c.jsx(wX,{})}),c.jsx(E,{path:"/tools/freight-index",element:c.jsx(EX,{})}),c.jsx(E,{path:"/tools/landed-cost",element:c.jsx(SX,{})}),c.jsx(E,{path:"/tools/comparison",element:c.jsx(CX,{})}),c.jsx(E,{path:"/tools/china-calendar",element:c.jsx(PX,{})}),c.jsx(E,{path:"/tools/pre-shipment",element:c.jsx(RX,{})}),c.jsx(E,{path:"/tools/demurrage",element:c.jsx(TX,{})}),c.jsx(E,{path:"/tools/payment-terms",element:c.jsx(IX,{})}),c.jsx(E,{path:"/tools/insurance",element:c.jsx($X,{})}),c.jsx(E,{path:"/tools/lead-time",element:c.jsx(AX,{})}),c.jsx(E,{path:"/tools/tracking",element:c.jsx(jX,{})}),c.jsx(E,{path:"/tools/converter",element:c.jsx(OX,{})}),c.jsx(E,{path:"/tools/forwarder",element:c.jsx(NX,{})}),c.jsx(E,{path:"/tools/packaging",element:c.jsx(DX,{})}),c.jsx(E,{path:"/tools/dangerous-goods",element:c.jsx(kX,{})}),c.jsx(E,{path:"/tools/glossary",element:c.jsx(MX,{})}),c.jsx(E,{path:"/tools/warehouse",element:c.jsx(LX,{})}),c.jsx(E,{path:"/tools/timeline",element:c.jsx(zX,{})}),c.jsx(E,{path:"/tools/trade-finance",element:c.jsx(FX,{})}),c.jsx(E,{path:"/tools/cargo-standards",element:c.jsx(VX,{})}),c.jsx(E,{path:"/tools/export-docs",element:c.jsx(BX,{})}),c.jsx(E,{path:"/tools/surcharges",element:c.jsx(HX,{})}),c.jsx(E,{path:"/tools/russia-ports",element:c.jsx(UX,{})}),c.jsx(E,{path:"/tools/supplier-check",element:c.jsx(WX,{})}),c.jsx(E,{path:"/tools/anti-dumping",element:c.jsx(qX,{})}),c.jsx(E,{path:"/tools/vat-refund",element:c.jsx(GX,{})}),c.jsx(E,{path:"/tools/trade-lanes",element:c.jsx(KX,{})}),c.jsx(E,{path:"/tools/kpi",element:c.jsx(XX,{})}),c.jsx(E,{path:"/tools/customs-broker",element:c.jsx(YX,{})}),c.jsx(E,{path:"/tools/exchange-risk",element:c.jsx(JX,{})}),c.jsx(E,{path:"/tools/port-congestion",element:c.jsx(ZX,{})}),c.jsx(E,{path:"/tools/cargo-claims",element:c.jsx(QX,{})}),c.jsx(E,{path:"/tools/chemical-reg",element:c.jsx(eY,{})}),c.jsx(E,{path:"/tools/load-plan",element:c.jsx(nZ,{})}),c.jsx(E,{path:"/tools/ecommerce-logistics",element:c.jsx(oZ,{})}),c.jsx(E,{path:"/tools/certification",element:c.jsx(sZ,{})}),c.jsx(E,{path:"/tools/fcl-vs-lcl",element:c.jsx(iZ,{})}),c.jsx(E,{path:"/tools/china-regions",element:c.jsx(aZ,{})}),c.jsx(E,{path:"/tools/air-freight",element:c.jsx(mX,{})}),c.jsx(E,{path:"/tools/seasonality",element:c.jsx(tY,{})}),c.jsx(E,{path:"/tools/transit-time",element:c.jsx(rY,{})}),c.jsx(E,{path:"/tools/freight-cost",element:c.jsx(nY,{})}),c.jsx(E,{path:"/tools/export-control",element:c.jsx(oY,{})}),c.jsx(E,{path:"/tools/cargo-insurance-calc",element:c.jsx(sY,{})}),c.jsx(E,{path:"/tools/russia-regions",element:c.jsx(iY,{})}),c.jsx(E,{path:"/tools/container-types",element:c.jsx(aY,{})}),c.jsx(E,{path:"/tools/bill-of-lading",element:c.jsx(lY,{})}),c.jsx(E,{path:"/tools/weight-dimensions",element:c.jsx(cY,{})}),c.jsx(E,{path:"/tools/multimodal",element:c.jsx(uY,{})}),c.jsx(E,{path:"/tools/letter-of-credit",element:c.jsx(dY,{})}),c.jsx(E,{path:"/tools/free-zones",element:c.jsx(pY,{})}),c.jsx(E,{path:"/tools/cold-chain",element:c.jsx(fY,{})}),c.jsx(E,{path:"/tools/cargo-readiness",element:c.jsx(mY,{})}),c.jsx(E,{path:"/tools/tariff-schedule",element:c.jsx(hY,{})}),c.jsx(E,{path:"/tools/supply-chain-risk",element:c.jsx(gY,{})}),c.jsx(E,{path:"/tools/freight-negotiation",element:c.jsx(vY,{})}),c.jsx(E,{path:"/tools/warehouse-calc",element:c.jsx(bY,{})}),c.jsx(E,{path:"/tools/origin-cert",element:c.jsx(_Y,{})}),c.jsx(E,{path:"/tools/import-license",element:c.jsx(yY,{})}),c.jsx(E,{path:"/tools/shipment-tracker",element:c.jsx(xY,{})}),c.jsx(E,{path:"/tools/china-supplier",element:c.jsx(wY,{})}),c.jsx(E,{path:"/tools/trade-compliance",element:c.jsx(EY,{})}),c.jsx(E,{path:"/tools/customs-broker-calc",element:c.jsx(SY,{})}),c.jsx(E,{path:"/tools/ecommerce-import",element:c.jsx(CY,{})}),c.jsx(E,{path:"/tools/forwarder-guide",element:c.jsx(PY,{})}),c.jsx(E,{path:"/tools/incoterms-calc",element:c.jsx(RY,{})}),c.jsx(E,{path:"/tools/packaging-req",element:c.jsx(TY,{})}),c.jsx(E,{path:"/tools/railway-freight",element:c.jsx(IY,{})}),c.jsx(E,{path:"/tools/lc-calc",element:c.jsx($Y,{})}),c.jsx(E,{path:"/tools/carbon-footprint",element:c.jsx(AY,{})}),c.jsx(E,{path:"/tools/air-cargo-guide",element:c.jsx(jY,{})}),c.jsx(E,{path:"/tools/china-holidays",element:c.jsx(OY,{})}),c.jsx(E,{path:"/tools/port-storage",element:c.jsx(NY,{})}),c.jsx(E,{path:"/tools/container-sizes",element:c.jsx(DY,{})}),c.jsx(E,{path:"/tools/import-documents",element:c.jsx(kY,{})}),c.jsx(E,{path:"/tools/logistics-cost",element:c.jsx(MY,{})}),c.jsx(E,{path:"/tools/shipping-terms",element:c.jsx(LY,{})}),c.jsx(E,{path:"/tools/supply-chain-finance",element:c.jsx(zY,{})}),c.jsx(E,{path:"/tools/chinese-suppliers",element:c.jsx(FY,{})}),c.jsx(E,{path:"/tools/railway-calc",element:c.jsx(VY,{})}),c.jsx(E,{path:"/tools/multimodal-compare",element:c.jsx(BY,{})}),c.jsx(E,{path:"/tools/warranty-claims",element:c.jsx(HY,{})}),c.jsx(E,{path:"/tools/export-documents",element:c.jsx(UY,{})}),c.jsx(E,{path:"/tools/china-payments",element:c.jsx(WY,{})}),c.jsx(E,{path:"/tools/loading-norms",element:c.jsx(qY,{})}),c.jsx(E,{path:"/tools/hazmat-guide",element:c.jsx(GY,{})}),c.jsx(E,{path:"/tools/free-trade-zones",element:c.jsx(KY,{})}),c.jsx(E,{path:"/tools/shipment-visibility",element:c.jsx(XY,{})}),c.jsx(E,{path:"/tools/importer-insurance",element:c.jsx(YY,{})}),c.jsx(E,{path:"/tools/currency-hedging",element:c.jsx(JY,{})}),c.jsx(E,{path:"/tools/honest-sign",element:c.jsx(ZY,{})}),c.jsx(E,{path:"/tools/lcl-calculator",element:c.jsx(QY,{})}),c.jsx(E,{path:"/tools/carrier-compare",element:c.jsx(eJ,{})}),c.jsx(E,{path:"/tools/eaeu-rules",element:c.jsx(tJ,{})}),c.jsx(E,{path:"/tools/hs-code-wizard",element:c.jsx(rJ,{})}),c.jsx(E,{path:"/tools/inventory-planning",element:c.jsx(nJ,{})}),c.jsx(E,{path:"/tools/route-optimization",element:c.jsx(oJ,{})}),c.jsx(E,{path:"/tools/freight-audit",element:c.jsx(sJ,{})}),c.jsx(E,{path:"/tools/bol-guide",element:c.jsx(iJ,{})}),c.jsx(E,{path:"/tools/customs-bond",element:c.jsx(aJ,{})}),c.jsx(E,{path:"/tools/cert-of-origin",element:c.jsx(lJ,{})}),c.jsx(E,{path:"/tools/import-vat",element:c.jsx(cJ,{})}),c.jsx(E,{path:"/tools/lithium-battery",element:c.jsx(uJ,{})}),c.jsx(E,{path:"/tools/ispm15",element:c.jsx(dJ,{})}),c.jsx(E,{path:"/tools/phyto-cert",element:c.jsx(pJ,{})}),c.jsx(E,{path:"/tools/temperature-cargo",element:c.jsx(fJ,{})}),c.jsx(E,{path:"/tools/oversize-cargo",element:c.jsx(mJ,{})}),c.jsx(E,{path:"/tools/trade-finance-calc",element:c.jsx(hJ,{})}),c.jsx(E,{path:"/tools/break-bulk",element:c.jsx(gJ,{})}),c.jsx(E,{path:"/tools/sanctions-check",element:c.jsx(vJ,{})}),c.jsx(E,{path:"/tools/export-license",element:c.jsx(bJ,{})}),c.jsx(E,{path:"/tools/fumigation",element:c.jsx(_J,{})}),c.jsx(E,{path:"/tools/container-inspection",element:c.jsx(yJ,{})}),c.jsx(E,{path:"/tools/roro-guide",element:c.jsx(xJ,{})}),c.jsx(E,{path:"/tools/vgm-calc",element:c.jsx(wJ,{})}),c.jsx(E,{path:"/tools/bonded-warehouse",element:c.jsx(EJ,{})}),c.jsx(E,{path:"/tools/air-waybill",element:c.jsx(SJ,{})}),c.jsx(E,{path:"/tools/invoice-template",element:c.jsx(CJ,{})}),c.jsx(E,{path:"/tools/shipping-instructions",element:c.jsx(PJ,{})}),c.jsx(E,{path:"/tools/trucking-calc",element:c.jsx(RJ,{})}),c.jsx(E,{path:"/tools/supply-chain-kpi",element:c.jsx(TJ,{})}),c.jsx(E,{path:"/tools/sea-freight-checklist",element:c.jsx(IJ,{})}),c.jsx(E,{path:"/tools/spot-rate",element:c.jsx($J,{})}),c.jsx(E,{path:"/tools/po-management",element:c.jsx(AJ,{})}),c.jsx(E,{path:"/tools/charter-party",element:c.jsx(jJ,{})}),c.jsx(E,{path:"/tools/single-window",element:c.jsx(OJ,{})}),c.jsx(E,{path:"/tools/ddp-ddu-calc",element:c.jsx(NJ,{})}),c.jsx(E,{path:"/tools/cbam-guide",element:c.jsx(DJ,{})}),c.jsx(E,{path:"/tools/import-quotas",element:c.jsx(kJ,{})}),c.jsx(E,{path:"/tools/letter-of-indemnity",element:c.jsx(MJ,{})}),c.jsx(E,{path:"/tools/parallel-import",element:c.jsx(LJ,{})}),c.jsx(E,{path:"/tools/freight-rate-index",element:c.jsx(zJ,{})}),c.jsx(E,{path:"/tools/cargo-release-order",element:c.jsx(FJ,{})}),c.jsx(E,{path:"/tools/transshipment-guide",element:c.jsx(VJ,{})}),c.jsx(E,{path:"/tools/customs-value-calc",element:c.jsx(BJ,{})}),c.jsx(E,{path:"/tools/container-leasing",element:c.jsx(HJ,{})}),c.jsx(E,{path:"/tools/excise-duty",element:c.jsx(UJ,{})}),c.jsx(E,{path:"/tools/china-export-tax",element:c.jsx(WJ,{})}),c.jsx(E,{path:"/tools/air-vs-sea-calc",element:c.jsx(qJ,{})}),c.jsx(E,{path:"/tools/eu-customs-clearance",element:c.jsx(GJ,{})}),c.jsx(E,{path:"/tools/port-dwell-time",element:c.jsx(KJ,{})}),c.jsx(E,{path:"/tools/railway-logistics",element:c.jsx(XJ,{})}),c.jsx(E,{path:"/tools/courier-vs-freight",element:c.jsx(YJ,{})}),c.jsx(E,{path:"/tools/incoterms-quiz",element:c.jsx(JJ,{})}),c.jsx(E,{path:"/tools/freight-payment-terms",element:c.jsx(ZJ,{})}),c.jsx(E,{path:"/tools/trade-doc-pack",element:c.jsx(QJ,{})}),c.jsx(E,{path:"/tools/eaeu-tariff",element:c.jsx(eZ,{})}),c.jsx(E,{path:"/tools/cold-chain-monitor",element:c.jsx(tZ,{})}),c.jsx(E,{path:"/tools/supplier-audit",element:c.jsx(rZ,{})}),c.jsx(E,{path:"/tools/truck-freight-calc",element:c.jsx(lZ,{})}),c.jsx(E,{path:"/tools/phytosanitary",element:c.jsx(cZ,{})}),c.jsx(E,{path:"/tools/re-export",element:c.jsx(uZ,{})}),c.jsx(E,{path:"/tools/quality-control",element:c.jsx(dZ,{})}),c.jsx(E,{path:"/tools/goods-declaration",element:c.jsx(pZ,{})}),c.jsx(E,{path:"/tools/consolidation-calc",element:c.jsx(fZ,{})}),c.jsx(E,{path:"/tools/bank-guarantee",element:c.jsx(mZ,{})}),c.jsx(E,{path:"/tools/port-fees-calc",element:c.jsx(hZ,{})}),c.jsx(E,{path:"/tools/import-quota",element:c.jsx(gZ,{})}),c.jsx(E,{path:"/tools/carnet-ata",element:c.jsx(vZ,{})}),c.jsx(E,{path:"/tools/duty-drawback",element:c.jsx(bZ,{})}),c.jsx(E,{path:"/tools/cold-storage-calc",element:c.jsx(_Z,{})}),c.jsx(E,{path:"/tools/marine-insurance-types",element:c.jsx(yZ,{})}),c.jsx(E,{path:"/tools/pallet-calc",element:c.jsx(xZ,{})}),c.jsx(E,{path:"/tools/import-procedure",element:c.jsx(wZ,{})}),c.jsx(E,{path:"/tools/liner-terms",element:c.jsx(EZ,{})}),c.jsx(E,{path:"/tools/freight-tender",element:c.jsx(SZ,{})}),c.jsx(E,{path:"/tools/customs-ruling",element:c.jsx(CZ,{})}),c.jsx(E,{path:"/tools/buffer-stock",element:c.jsx(PZ,{})}),c.jsx(E,{path:"/tools/green-logistics",element:c.jsx(RZ,{})}),c.jsx(E,{path:"/tools/freight-markup",element:c.jsx(TZ,{})}),c.jsx(E,{path:"/tools/port-procedure",element:c.jsx(IZ,{})}),c.jsx(E,{path:"/tools/container-stuffing",element:c.jsx($Z,{})}),c.jsx(E,{path:"/tools/cargo-rejection",element:c.jsx(AZ,{})}),c.jsx(E,{path:"/tools/reverse-logistics",element:c.jsx(jZ,{})}),c.jsx(E,{path:"/tools/booking-checklist",element:c.jsx(OZ,{})}),c.jsx(E,{path:"/tools/multimodal-docs",element:c.jsx(NZ,{})}),c.jsx(E,{path:"/tools/export-finance",element:c.jsx(DZ,{})}),c.jsx(E,{path:"/tools/compliance-cert",element:c.jsx(kZ,{})}),c.jsx(E,{path:"/tools/shipper-letter",element:c.jsx(MZ,{})}),c.jsx(E,{path:"/tools/pre-advice",element:c.jsx(LZ,{})}),c.jsx(E,{path:"/tools/cargo-survey",element:c.jsx(zZ,{})}),c.jsx(E,{path:"/tools/demurrage-claim",element:c.jsx(FZ,{})}),c.jsx(E,{path:"/tools/port-agency",element:c.jsx(VZ,{})}),c.jsx(E,{path:"/tools/freight-claim",element:c.jsx(BZ,{})}),c.jsx(E,{path:"/tools/storage-in-transit",element:c.jsx(HZ,{})}),c.jsx(E,{path:"/tools/lcl-booking",element:c.jsx(UZ,{})}),c.jsx(E,{path:"/tools/special-cargo",element:c.jsx(WZ,{})}),c.jsx(E,{path:"/tools/hazardous-class",element:c.jsx(qZ,{})}),c.jsx(E,{path:"/tools/cargo-temp",element:c.jsx(GZ,{})}),c.jsx(E,{path:"/tools/insurance-claim",element:c.jsx(KZ,{})}),c.jsx(E,{path:"/tools/container-damage",element:c.jsx(XZ,{})}),c.jsx(E,{path:"/tools/reefer-booking",element:c.jsx(YZ,{})}),c.jsx(E,{path:"/tools/track-trace",element:c.jsx(JZ,{})}),c.jsx(E,{path:"/faq",element:c.jsx(QZ,{})}),uK(),c.jsx(E,{path:"/solutions",element:c.jsx(mQ,{})}),c.jsx(E,{path:"/solutions/importer",element:c.jsx(hQ,{})}),c.jsx(E,{path:"/solutions/exporter",element:c.jsx(gQ,{})}),c.jsx(E,{path:"/solutions/forwarder",element:c.jsx(vQ,{})}),c.jsx(E,{path:"/solutions/carrier",element:c.jsx(bQ,{})}),c.jsx(E,{path:"/cases",element:c.jsx(eQ,{})}),c.jsx(E,{path:"/cases/:slug",element:c.jsx(tQ,{})}),c.jsx(E,{path:"/reviews",element:c.jsx(rQ,{})}),c.jsx(E,{path:"/partners",element:c.jsx(nQ,{})}),c.jsx(E,{path:"/trust",element:c.jsx(oQ,{})}),c.jsx(E,{path:"/documents",element:c.jsx(sQ,{})}),c.jsx(E,{path:"/cooperation",element:c.jsx(iQ,{})}),c.jsx(E,{path:"/join",element:c.jsx(aQ,{})}),c.jsx(E,{path:"/how-it-works",element:c.jsx(lQ,{})}),c.jsx(E,{path:"/advantages",element:c.jsx(cQ,{})}),c.jsx(E,{path:"/support",element:c.jsx(uQ,{})}),c.jsx(E,{path:"/referral-program",element:c.jsx(LK,{})}),c.jsx(E,{path:"/help",element:c.jsx(FK,{})}),c.jsx(E,{path:"/help/article/:id",element:c.jsx(VK,{})}),c.jsx(E,{path:"/research",element:c.jsx(HK,{})}),c.jsx(E,{path:"/research/smb-import-cost-index-q2-2026",element:c.jsx(UK,{})}),c.jsx(E,{path:"/en/faq",element:c.jsx(WK,{})}),c.jsx(E,{path:"/en/faq/:slug",element:c.jsx(qK,{})}),c.jsx(E,{path:"/en/glossary",element:c.jsx(GK,{})}),c.jsx(E,{path:"/en/glossary/:slug",element:c.jsx(KK,{})}),c.jsx(E,{path:"/en/blog",element:c.jsx(XK,{})}),c.jsx(E,{path:"/en/blog/:slug",element:c.jsx(YK,{})}),c.jsx(E,{path:"/en/about",element:c.jsx(JK,{})}),c.jsx(E,{path:"/en/services",element:c.jsx(ZK,{})}),c.jsx(E,{path:"/landing/yd/freight-china",element:c.jsx(QK,{})}),c.jsx(E,{path:"/landing/yd/customs-broker",element:c.jsx(eX,{})}),c.jsx(E,{path:"/landing/yd/smb-import",element:c.jsx(tX,{})}),c.jsx(E,{path:"/cashback",element:c.jsx(dQ,{})}),c.jsx(E,{path:"/news",element:c.jsx(pQ,{})}),c.jsx(E,{path:"/additional-services",element:c.jsx(fQ,{})}),c.jsx(E,{path:"/services/marine",element:c.jsx(_Q,{})}),c.jsx(E,{path:"/services/railway",element:c.jsx(yQ,{})}),c.jsx(E,{path:"/services/auto",element:c.jsx(xQ,{})}),c.jsx(E,{path:"/services/air",element:c.jsx(wQ,{})}),c.jsx(E,{path:"/services/groupage",element:c.jsx(EQ,{})}),c.jsx(E,{path:"/services/multimodal",element:c.jsx(SQ,{})}),c.jsx(E,{path:"/services/customs",element:c.jsx(CQ,{})}),c.jsx(E,{path:"/services/container-rental",element:c.jsx(PQ,{})}),c.jsx(E,{path:"/about-company",element:c.jsx(RQ,{})}),c.jsx(E,{path:"/contacts",element:c.jsx(TQ,{})}),c.jsx(E,{path:"/vacancies",element:c.jsx(IQ,{})}),c.jsx(E,{path:"/privacy-policy",element:c.jsx($Q,{})}),c.jsx(E,{path:"/marshrut/:slug",element:c.jsx(AQ,{})}),c.jsx(E,{path:"/industry/:slug",element:c.jsx(jQ,{})}),c.jsx(E,{path:"/vs/:slug",element:c.jsx(OQ,{})}),c.jsx(E,{path:"/dostavka",element:c.jsx(NQ,{})}),c.jsx(E,{path:"/dostavka/:country",element:c.jsx(DQ,{})}),c.jsx(E,{path:"/dostavka/:country/:city",element:c.jsx(kQ,{})}),c.jsx(E,{path:"/resources",element:c.jsx(LQ,{})}),c.jsx(E,{path:"/resources/glossary",element:c.jsx(zQ,{})}),c.jsx(E,{path:"/resources/guides",element:c.jsx(FQ,{})}),c.jsx(E,{path:"/resources/guides/customs-china-2026",element:c.jsx(VQ,{})}),c.jsx(E,{path:"/resources/guides/incoterms-plain",element:c.jsx(BQ,{})}),c.jsx(E,{path:"/resources/guides/how-to-read-bl",element:c.jsx(HQ,{})}),c.jsx(E,{path:"/resources/guides/reduce-logistics-costs",element:c.jsx(UQ,{})}),c.jsx(E,{path:"/resources/guides/vtt-guide",element:c.jsx(WQ,{})}),c.jsx(E,{path:"/resources/guides/china-contract-guide",element:c.jsx(qQ,{})}),c.jsx(E,{path:"/resources/guides/demurrage-detention-guide",element:c.jsx(GQ,{})}),c.jsx(E,{path:"/resources/guides/fcl-vs-lcl-guide",element:c.jsx(KQ,{})}),c.jsx(E,{path:"/resources/guides/air-cargo-guide",element:c.jsx(XQ,{})}),c.jsx(E,{path:"/resources/guides/customs-duties-guide",element:c.jsx(YQ,{})}),c.jsx(E,{path:"/resources/guides/rail-freight-guide",element:c.jsx(JQ,{})}),c.jsx(E,{path:"/resources/guides/cargo-insurance-guide",element:c.jsx(ZQ,{})}),c.jsx(E,{path:"*",element:c.jsx(MQ,{})})]})})]})})})})})}const bte=new Set(["fa","ar","he","ur"]);function v$(e){return(e||"").toLowerCase().split("-")[0]}function _te(e){return bte.has(v$(e))}function b$(e){if(typeof document>"u")return;const t=document.documentElement;t.setAttribute("dir",_te(e)?"rtl":"ltr"),e&&t.setAttribute("lang",v$(e))}ea.use(U$).use(W$).use(q$).init({supportedLngs:["ru","en","zho","tr","hi"],ns:["translation","common"],defaultNS:"translation",fallbackLng:{default:["en","ru"]},load:"languageOnly",nonExplicitSupportedLngs:!0,debug:!1,detection:{order:["localStorage","queryString","cookie","navigator"],caches:["localStorage"],lookupLocalStorage:"avalog.i18n.language",lookupQuerystring:"lang"},interpolation:{escapeValue:!1}});b$(ea.resolvedLanguage??ea.language);ea.on("languageChanged",b$);const _$=new T$({defaultOptions:{queries:{staleTime:6e4,gcTime:5*6e4,retry:1,refetchOnWindowFocus:!1},mutations:{retry:0}}}),yte=Object.freeze(Object.defineProperty({__proto__:null,queryClient:_$},Symbol.toStringTag,{value:"Module"})),Qg="avalog.cookieConsent",rd=1;function Jre(){if(typeof window>"u")return"unknown";try{const e=localStorage.getItem(Qg);if(!e)return"unknown";const t=JSON.parse(e);return t.version!==rd?"unknown":t.decision}catch{return"unknown"}}function xte(){if(typeof window>"u")return null;try{const e=localStorage.getItem(Qg);if(!e)return null;const t=JSON.parse(e);return t.version!==rd?null:t}catch{return null}}function wte(){const e=xte();return(e==null?void 0:e.decision)==="accepted"&&e.analytics===!0}function Zre(e={}){const t={version:rd,decision:"accepted",decidedAt:new Date().toISOString(),analytics:e.analytics??!0,marketing:e.marketing??!0,functional:!0};return y$(t),t}function Qre(){const e={version:rd,decision:"rejected",decidedAt:new Date().toISOString(),analytics:!1,marketing:!1,functional:!0};return y$(e),e}function y$(e){if(!(typeof window>"u"))try{localStorage.setItem(Qg,JSON.stringify(e))}catch{}}let x$=-1;const pi=e=>{addEventListener("pageshow",t=>{t.persisted&&(x$=t.timeStamp,e(t))},!0)},xn=(e,t,r,n)=>{let o,s;return i=>{t.value>=0&&(i||n)&&(s=t.value-(o??0),(s||o===void 0)&&(o=t.value,t.delta=s,t.rating=((l,u)=>l>u[1]?"poor":l>u[0]?"needs-improvement":"good")(t.value,r),e(t)))}},ev=e=>{requestAnimationFrame(()=>requestAnimationFrame(e))},tv=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Ua=()=>{var e;return((e=tv())==null?void 0:e.activationStart)??0},wn=(e,t=-1)=>{const r=tv();let n="navigate";return x$>=0?n="back-forward-cache":r&&(document.prerendering||Ua()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:n}},Sp=new WeakMap;function rv(e,t){return Sp.get(e)||Sp.set(e,new t),Sp.get(e)}class Ete{constructor(){St(this,"t");St(this,"i",0);St(this,"o",[])}h(t){var o;if(t.hadRecentInput)return;const r=this.o[0],n=this.o.at(-1);this.i&&r&&n&&t.startTime-n.startTime<1e3&&t.startTime-r.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),(o=this.t)==null||o.call(this,t)}}const Wa=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const n=new PerformanceObserver(o=>{queueMicrotask(()=>{t(o.getEntries())})});return n.observe({type:e,buffered:!0,...r}),n}}catch{}},nv=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Is=-1;const w$=new Set,nx=()=>document.visibilityState!=="hidden"||document.prerendering?1/0:0,Bm=e=>{if(document.visibilityState==="hidden"){if(e.type==="visibilitychange")for(const t of w$)t();isFinite(Is)||(Is=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("prerenderingchange",Bm,!0))}},nd=()=>{var e;if(Is<0){const t=Ua();Is=(document.prerendering||(e=globalThis.performance.getEntriesByType("visibility-state").find(n=>n.name==="hidden"&&n.startTime>=t))==null?void 0:e.startTime)??nx(),addEventListener("visibilitychange",Bm,!0),addEventListener("prerenderingchange",Bm,!0),pi(()=>{setTimeout(()=>{Is=nx()})})}return{get firstHiddenTime(){return Is},onHidden(t){w$.add(t)}}},od=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},ox=[1800,3e3],E$=(e,t={})=>{od(()=>{const r=nd();let n,o=wn("FCP");const s=Wa("paint",i=>{for(const l of i)l.name==="first-contentful-paint"&&(s.disconnect(),l.startTime<r.firstHiddenTime&&(o.value=Math.max(l.startTime-Ua(),0),o.entries.push(l),n(!0)))});s&&(n=xn(e,o,ox,t.reportAllChanges),pi(i=>{o=wn("FCP"),n=xn(e,o,ox,t.reportAllChanges),ev(()=>{o.value=performance.now()-i.timeStamp,n(!0)})}))})},sx=[.1,.25],Ste=(e,t={})=>{const r=nd();E$(nv(()=>{let n,o=wn("CLS",0);const s=rv(t,Ete),i=u=>{for(const d of u)s.h(d);s.i>o.value&&(o.value=s.i,o.entries=s.o,n())},l=Wa("layout-shift",i);l&&(n=xn(e,o,sx,t.reportAllChanges),r.onHidden(()=>{i(l.takeRecords()),n(!0)}),pi(()=>{s.i=0,o=wn("CLS",0),n=xn(e,o,sx,t.reportAllChanges),ev(n)}),setTimeout(n))}))};let S$=0,Cp=1/0,wl=0;const Cte=e=>{for(const t of e)t.interactionId&&(Cp=Math.min(Cp,t.interactionId),wl=Math.max(wl,t.interactionId),S$=wl?(wl-Cp)/7+1:0)};let Hm;const ix=()=>Hm?S$:performance.interactionCount??0,Pte=()=>{"interactionCount"in performance||Hm||(Hm=Wa("event",Cte,{durationThreshold:0}))};let ax=0;class Rte{constructor(){St(this,"l",[]);St(this,"u",new Map);St(this,"m");St(this,"p")}v(){ax=ix(),this.l.length=0,this.u.clear()}T(){const t=Math.min(this.l.length-1,Math.floor((ix()-ax)/50));return this.l[t]}h(t){var o,s;if((o=this.m)==null||o.call(this,t),!t.interactionId&&t.entryType!=="first-input")return;const r=this.l.at(-1);let n=this.u.get(t.interactionId);if(n||this.l.length<10||t.duration>r.L){if(n?t.duration>n.L?(n.entries=[t],n.L=t.duration):t.duration===n.L&&t.startTime===n.entries[0].startTime&&n.entries.push(t):(n={id:t.interactionId,entries:[t],L:t.duration},this.u.set(n.id,n),this.l.push(n)),this.l.sort((i,l)=>l.L-i.L),this.l.length>10){const i=this.l.splice(10);for(const l of i)this.u.delete(l.id)}(s=this.p)==null||s.call(this,n)}}}const C$=e=>{const t=globalThis.requestIdleCallback||setTimeout,r=globalThis.cancelIdleCallback||clearTimeout;if(document.visibilityState==="hidden")e();else{const n=nv(e);let o=-1;const s=()=>{r(o),n()};addEventListener("visibilitychange",s,{once:!0,capture:!0}),o=t(()=>{removeEventListener("visibilitychange",s,{capture:!0}),n()})}},lx=[200,500],Tte=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const r=nd();od(()=>{Pte();let n,o=wn("INP");const s=rv(t,Rte),i=u=>{C$(()=>{for(const p of u)s.h(p);const d=s.T();d&&d.L!==o.value&&(o.value=d.L,o.entries=d.entries,n())})},l=Wa("event",i,{durationThreshold:t.durationThreshold??40});n=xn(e,o,lx,t.reportAllChanges),l&&(l.observe({type:"first-input",buffered:!0}),r.onHidden(()=>{i(l.takeRecords()),n(!0)}),pi(()=>{s.v(),o=wn("INP"),n=xn(e,o,lx,t.reportAllChanges)}))})};class Ite{constructor(){St(this,"m")}h(t){var r;(r=this.m)==null||r.call(this,t)}}const cx=[2500,4e3],$te=(e,t={})=>{od(()=>{const r=nd();let n,o=wn("LCP");const s=rv(t,Ite),i=u=>{t.reportAllChanges||(u=u.slice(-1));for(const d of u)s.h(d),d.startTime<r.firstHiddenTime&&(o.value=Math.max(d.startTime-Ua(),0),o.entries=[d],n())},l=Wa("largest-contentful-paint",i);if(l){n=xn(e,o,cx,t.reportAllChanges);const u=nv(()=>{i(l.takeRecords()),l.disconnect(),n(!0)}),d=p=>{p.isTrusted&&(C$(u),removeEventListener(p.type,d,{capture:!0}))};for(const p of["keydown","click","visibilitychange"])addEventListener(p,d,{capture:!0});pi(p=>{o=wn("LCP"),n=xn(e,o,cx,t.reportAllChanges),ev(()=>{o.value=performance.now()-p.timeStamp,n(!0)})})}})},ux=[800,1800],Um=e=>{document.prerendering?od(()=>Um(e)):document.readyState!=="complete"?addEventListener("load",()=>Um(e),!0):setTimeout(e)},Ate=(e,t={})=>{let r=wn("TTFB"),n=xn(e,r,ux,t.reportAllChanges);Um(()=>{const o=tv();o&&(r.value=Math.max(o.responseStart-Ua(),0),r.entries=[o],n(!0),pi(()=>{r=wn("TTFB",0),n=xn(e,r,ux,t.reportAllChanges),n(!0)}))})};function jte(){return typeof xA=="function"}function Ai(e){const{name:t,value:r,rating:n,id:o,navigationType:s}=e,i=Math.round(r),l=n??"needs-improvement";jte()&&yA(`web-vital ${t} ${l}`,{level:l==="poor"?"warning":"info",tags:{web_vital:t,rating:l,navigation_type:s},contexts:{web_vitals:{metric:t,value:i,rating:l,id:o,navigationType:s}}})}let dx=!1;function Ote(){dx||(dx=!0,$te(Ai),Ste(Ai),Tte(Ai),E$(Ai),Ate(Ai))}let px=!1;function Nte(e){return typeof e=="object"&&e!==null&&e.source==="avalog-push"}function Dte(){px||typeof navigator>"u"||!("serviceWorker"in navigator)||(px=!0,navigator.serviceWorker.addEventListener("message",e=>{if(!Nte(e.data))return;const{title:t,body:r,url:n,eventCode:o,type:s}=e.data;jo("push_foreground_toast_shown",{type:s,eventCode:o}),L6(t||r||"Новое уведомление",{description:t&&r?r:void 0,action:n?{label:"Открыть",onClick:()=>{jo("push_foreground_toast_clicked",{type:s,eventCode:o});try{window.location.assign(n)}catch{}}}:void 0})}))}const kte=a.lazy(()=>C(()=>import("./UpdatePrompt-CAAqP7Ub.js"),__vite__mapDeps([679,8,1])).then(e=>({default:e.UpdatePrompt}))),Mte=a.lazy(()=>C(()=>import("./PwaInstallPromptDS-BSusWSly.js"),__vite__mapDeps([680,1,4,108,29,8,5,9,10])).then(e=>({default:e.PwaInstallPromptDS}))),Lte=a.lazy(()=>C(()=>import("./toaster-vQVSHpdk.js"),__vite__mapDeps([190,1,8,4,5,9,10])).then(e=>({default:e.Toaster})));wte()&&(typeof requestIdleCallback<"u"?requestIdleCallback:t=>setTimeout(t,200))(()=>{ww()});nI();vG();Ote();Dte();window.addEventListener("vite:preloadError",e=>{const t=Number(sessionStorage.getItem("vite-preload-reload-at")||0);Date.now()-t<1e4||(sessionStorage.setItem("vite-preload-reload-at",String(Date.now())),e.preventDefault(),window.location.reload())});hx.locale("ru");B$.createRoot(document.getElementById("root")).render(c.jsx(rm,{label:"Root",children:c.jsx(Jx,{children:c.jsx(G$,{i18n:ea,children:c.jsx(a.Suspense,{fallback:c.jsx("img",{src:"/loading-loader.gif",alt:"load"}),children:c.jsxs(I$,{client:_$,children:[c.jsxs(hz,{locale:FA,children:[c.jsx(vte,{}),c.jsxs(a.Suspense,{fallback:null,children:[c.jsx(kte,{}),c.jsx(Mte,{}),c.jsx(Lte,{})]})]}),!1]})})})})}));export{u5 as $,Ure as A,SS as B,r2 as C,Lq as D,Vs as E,Wre as F,Hre as G,CS as H,PS as I,EH as J,SH as K,xH as L,wH as M,$h as N,IH as O,Ah as P,a2 as Q,c2 as R,zw as S,d2 as T,Mb as U,wT as V,lq as W,DN as X,US as Y,Cre as Z,c5 as _,Hq as a,JD as a$,a5 as a0,p5 as a1,l5 as a2,Y6 as a3,t5 as a4,HS as a5,i5 as a6,o5 as a7,n5 as a8,s5 as a9,g1 as aA,h2 as aB,_U as aC,jP as aD,v2 as aE,d0 as aF,hf as aG,Lb as aH,y2 as aI,Ea as aJ,tu as aK,NP as aL,Bre as aM,Vre as aN,Gre as aO,nN as aP,PD as aQ,iz as aR,w2 as aS,pC as aT,eg as aU,fC as aV,g0 as aW,uq as aX,zU as aY,YU as aZ,JU as a_,Sre as aa,oq as ab,H0 as ac,OO as ad,Rre as ae,j4 as af,$4 as ag,A4 as ah,N4 as ai,D4 as aj,Tre as ak,Kre as al,cU as am,Gq as an,wa as ao,EU as ap,zre as aq,Dq as ar,kq as as,Fre as at,Oq as au,Nq as av,Mq as aw,kn as ax,eq as ay,iq as az,xre as b,Ft as b$,Jj as b0,Kj as b1,N0 as b2,m0 as b3,MN as b4,S2 as b5,rq as b6,ri as b7,$re as b8,GW as b9,sD as bA,x6 as bB,Ab as bC,Mre as bD,Sr as bE,Bo as bF,TP as bG,pg as bH,RP as bI,IP as bJ,T2 as bK,$2 as bL,Jn as bM,jh as bN,$r as bO,Zre as bP,vre as bQ,gre as bR,je as bS,fre as bT,bq as bU,Ui as bV,bre as bW,Wh as bX,jo as bY,Sz as bZ,ve as b_,Are as ba,XW as bb,KW as bc,qW as bd,jre as be,tT as bf,Ore as bg,Dre as bh,o6 as bi,l6 as bj,i6 as bk,s6 as bl,a6 as bm,Nre as bn,P2 as bo,au as bp,FN as bq,wh as br,Ss as bs,m6 as bt,sO as bu,kre as bv,y6 as bw,b6 as bx,_6 as by,Eo as bz,pV as c,hre as c0,az as c1,_re as c2,fU as c3,xh as c4,xN as c5,wN as c6,_N as c7,CN as c8,SN as c9,Gte as cA,iO as cB,jN as cC,Kte as cD,dU as cE,f0 as cF,Es as cG,Ne as ca,Dw as cb,Jre as cc,$1 as cd,su as ce,ou as cf,sre as cg,lz as ch,qre as ci,tz as cj,Qre as ck,eb as cl,_t as cm,pU as cn,L6 as co,yre as cp,b1 as cq,v1 as cr,Ia as cs,dh as ct,UN as cu,Xre as cv,Ire as cw,Lre as cx,Yre as cy,Zj as cz,uV as d,dV as e,qte as f,mV as g,gV as h,wre as i,aH as j,lH as k,rH as l,iH as m,oH as n,nH as o,sH as p,Ere as q,hV as r,Lw as s,Rw as t,mre as u,vH as v,_H as w,Sf as x,HN as y,kb as z};