@lunora/studio 1.0.0-alpha.10 → 1.0.0-alpha.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +6 -0
- package/dist/index.d.ts +822 -781
- package/dist/index.js +1 -41
- package/dist/mount.d.ts +10 -10
- package/dist/mount.js +1 -26
- package/dist/packem_chunks/AdvisorHealthPanel.js +1 -0
- package/dist/packem_chunks/ApiTab.js +1 -0
- package/dist/packem_chunks/AuditPanel.js +1 -0
- package/dist/packem_chunks/DeploymentHealthPanel.js +1 -0
- package/dist/packem_chunks/ExportImportPanel.js +3 -0
- package/dist/packem_chunks/FileBrowser.js +4 -0
- package/dist/packem_chunks/FunctionRunner.js +1 -0
- package/dist/packem_chunks/FunctionStatsPanel.js +1 -0
- package/dist/packem_chunks/HealthPanel.js +1 -0
- package/dist/packem_chunks/InsightsPanel.js +1 -0
- package/dist/packem_chunks/LogsPanel.js +1 -0
- package/dist/packem_chunks/MailPanel.js +2 -0
- package/dist/packem_chunks/MetricsPanel.js +1 -0
- package/dist/packem_chunks/NotificationsPanel.js +1 -0
- package/dist/packem_chunks/PitrPanel.js +1 -0
- package/dist/packem_chunks/SchemaViewer.js +1 -0
- package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -0
- package/dist/packem_chunks/SettingsPanel.js +1 -0
- package/dist/packem_chunks/SqlEditorPanel.js +6 -0
- package/dist/packem_chunks/TableEditor.js +1 -0
- package/dist/packem_chunks/agents-panel.js +1 -0
- package/dist/packem_chunks/analytics-panel.js +1 -0
- package/dist/packem_chunks/auth-audit-panel.js +1 -0
- package/dist/packem_chunks/auth-config-panel.js +1 -0
- package/dist/packem_chunks/auth-sessions-panel.js +1 -0
- package/dist/packem_chunks/containers-panel.js +1 -0
- package/dist/packem_chunks/dashboards-panel.js +1 -0
- package/dist/packem_chunks/fanout-panel.js +1 -0
- package/dist/packem_chunks/flags-panel.js +1 -0
- package/dist/packem_chunks/issues-panel.js +1 -0
- package/dist/packem_chunks/kv-browser.js +1 -0
- package/dist/packem_chunks/log-drains-panel.js +4 -0
- package/dist/packem_chunks/migrations-route.js +1 -0
- package/dist/packem_chunks/organizations-panel.js +1 -0
- package/dist/packem_chunks/payments-panel.js +1 -0
- package/dist/packem_chunks/permissions-panel.js +1 -0
- package/dist/packem_chunks/queues-panel.js +1 -0
- package/dist/packem_chunks/rls-panel.js +1 -0
- package/dist/packem_chunks/schedule-panel.js +1 -0
- package/dist/packem_chunks/sparkline.js +1 -0
- package/dist/packem_chunks/storage-rules-panel.js +1 -0
- package/dist/packem_chunks/subscriptions-panel.js +1 -0
- package/dist/packem_chunks/sync-client-panel.js +1 -0
- package/dist/packem_chunks/traces-panel.js +1 -0
- package/dist/packem_chunks/users-panel.js +1 -0
- package/dist/packem_chunks/vector-browser.js +1 -0
- package/dist/packem_chunks/workflows-panel.js +1 -0
- package/dist/packem_shared/ADMIN_FUNCTIONS-4aE59aDq.js +1 -0
- package/dist/packem_shared/ApiDocsPanel-Cu_QmzO0.js +2 -0
- package/dist/packem_shared/ApiReferencePanel-DuIU1P8B.js +1 -0
- package/dist/packem_shared/CommandPalette-mPR8-vIm.js +1 -0
- package/dist/packem_shared/ConfirmButton-CTL3f3kr.js +1 -0
- package/dist/packem_shared/ConnectionBadge-DOk0CQWo.js +1 -0
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-BCC8_4BQ.js +1 -0
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-B-hcFVoi.js +1 -0
- package/dist/packem_shared/DEFAULT_LOCALE-BZ4NojpD.js +1 -0
- package/dist/packem_shared/DataBrowser-CPNKM0KZ.js +1 -0
- package/dist/packem_shared/DataFilters-B26ZeqBZ.js +1 -0
- package/dist/packem_shared/ErrorBoundary-DvzYskH7.js +1 -0
- package/dist/packem_shared/GlobalDataBrowser-BSmyOO0n.js +1 -0
- package/dist/packem_shared/HomePanel-BUO6BcYQ.js +1 -0
- package/dist/packem_shared/MigrationsPanel-BAnvY79E.js +1 -0
- package/dist/packem_shared/OpenRpcReferencePanel-DXeffPFr.js +1 -0
- package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.js +1 -0
- package/dist/packem_shared/ScheduledJobs-pHVlh2xU.js +1 -0
- package/dist/packem_shared/ShardInput-BVn2iCU0.js +1 -0
- package/dist/packem_shared/Studio-DG_n-8Pc.js +1 -0
- package/dist/packem_shared/StudioApp-bavavhpe.js +1 -0
- package/dist/packem_shared/StudioI18nProvider-CZ5h4nrV.js +1 -0
- package/dist/packem_shared/advisor-view-CGcwvlMo.js +1 -0
- package/dist/packem_shared/aggregateMetrics-BNfajLa2.js +1 -0
- package/dist/packem_shared/alert-CVcOFuDR.js +1 -0
- package/dist/packem_shared/app.d-D1bPR8FO.d.ts +252 -0
- package/dist/packem_shared/badge-BbuuAio7.js +1 -0
- package/dist/packem_shared/bar-chart-B8oDHgnw.js +6 -0
- package/dist/packem_shared/browser-storage-xjTyMKY0.js +1 -0
- package/dist/packem_shared/button-BkCrNcAs.js +1 -0
- package/dist/packem_shared/card-BMKx5UdA.js +1 -0
- package/dist/packem_shared/cf-links-Dmg86v1D.js +1 -0
- package/dist/packem_shared/checkbox-StT4Gob6.js +1 -0
- package/dist/packem_shared/data-grid-Ci4-tZkk.js +1 -0
- package/dist/packem_shared/data-view-params-ClrV7XgF.js +1 -0
- package/dist/packem_shared/dropdown-menu-BgS2zw1i.js +2 -0
- package/dist/packem_shared/empty-state-Cg7t_8qu.js +1 -0
- package/dist/packem_shared/error-alert-_2q2VtVG.js +1 -0
- package/dist/packem_shared/grid-features-Y2YSjhCf.js +6 -0
- package/dist/packem_shared/home-panel-Ir3YHReO.js +3 -0
- package/dist/packem_shared/input-JHu63lTv.js +1 -0
- package/dist/packem_shared/internal-zkEvTqy8.js +2 -0
- package/dist/packem_shared/label-6uP1obNF.js +1 -0
- package/dist/packem_shared/live-status-CmuRLFKf.js +1 -0
- package/dist/packem_shared/log-fields-CoL3hsIQ.js +1 -0
- package/dist/packem_shared/modal-shell-CUwwWC2o.js +1 -0
- package/dist/packem_shared/operation-console-provider-BMJNtiyB.js +1 -0
- package/dist/packem_shared/recording-client-DtUxwVNY.js +1 -0
- package/dist/packem_shared/reference-view-DncEStdm.js +12 -0
- package/dist/packem_shared/result-chart-0VgP_3FP.js +1 -0
- package/dist/packem_shared/schema-diagram-GVgnLWTf.js +2 -0
- package/dist/packem_shared/scroll-area-DTEq6Jec.js +2 -0
- package/dist/packem_shared/select-BssZMiFY.js +2 -0
- package/dist/packem_shared/shard-history-DMEW5VBE.js +1 -0
- package/dist/packem_shared/skeleton-C1wQ9M5t.js +1 -0
- package/dist/packem_shared/sparkline-BNvxiJj_.js +1 -0
- package/dist/packem_shared/stat-card-BGJdhfm6.js +1 -0
- package/dist/packem_shared/storage-tier-DznqOf-q.js +1 -0
- package/dist/packem_shared/studio-C9Qvg13j.js +2 -0
- package/dist/packem_shared/table-DZAB8cs3.js +2 -0
- package/dist/packem_shared/table-list-sidebar-fz0m_4I4.js +1 -0
- package/dist/packem_shared/textarea-Bu2-jKAs.js +1 -0
- package/dist/packem_shared/trace-handoff-CuZ6WGgo.js +1 -0
- package/dist/packem_shared/use-admin-query-CnnyWJXM.js +1 -0
- package/dist/packem_shared/use-async-submit-B32whHJO.js +1 -0
- package/dist/packem_shared/use-auth-config-0EnNCdLu.js +1 -0
- package/dist/packem_shared/use-shard-key-B2JtNa5m.js +1 -0
- package/dist/packem_shared/use-sql-assistant-Dtw55kKM.js +1 -0
- package/dist/packem_shared/useDebounced-CU-uftxO.js +1 -0
- package/dist/packem_shared/utils-bhneXptQ.js +1 -0
- package/dist/packem_shared/virtual-rect-1o1veP7R.js +1 -0
- package/dist/packem_shared/wire-codec-DkrdsFXO.js +1 -0
- package/dist/standalone/chunk-2OUPA2WJ.js +1 -0
- package/dist/standalone/chunk-2PJNAWB3.js +1 -0
- package/dist/standalone/chunk-2QSHLBCO.js +1 -0
- package/dist/standalone/chunk-322ZP3GW.js +1 -0
- package/dist/standalone/chunk-3C3CG7ZK.js +1 -0
- package/dist/standalone/chunk-3CWGJYBB.js +1 -0
- package/dist/standalone/chunk-3SCGCJYS.js +1 -0
- package/dist/standalone/chunk-3XIESWL4.js +1 -0
- package/dist/standalone/chunk-4HNNNIDW.js +1 -0
- package/dist/standalone/chunk-4KIQ5RLS.js +1 -0
- package/dist/standalone/chunk-4UOFSGUS.js +1 -0
- package/dist/standalone/chunk-54MMVNPT.js +1 -0
- package/dist/standalone/chunk-55PVLIN3.js +1 -0
- package/dist/standalone/chunk-5GQFG6QI.js +6 -0
- package/dist/standalone/chunk-5NCGZJ55.js +8 -0
- package/dist/standalone/chunk-5PQCUZIE.js +1 -0
- package/dist/standalone/chunk-5Y3QLNWX.js +1 -0
- package/dist/standalone/chunk-6ST5ECQA.js +1 -0
- package/dist/standalone/chunk-6UPCJAAI.js +1 -0
- package/dist/standalone/chunk-6UPIWTCN.js +1 -0
- package/dist/standalone/chunk-6V27P65N.js +6 -0
- package/dist/standalone/chunk-7LJL6UC2.js +1 -0
- package/dist/standalone/chunk-7QIFDWQV.js +1 -0
- package/dist/standalone/chunk-7T7UOTYK.js +1 -0
- package/dist/standalone/chunk-AB5WGAX6.js +4 -0
- package/dist/standalone/chunk-APXXEXIX.js +1 -0
- package/dist/standalone/chunk-AREBQI6D.js +1 -0
- package/dist/standalone/chunk-AVAC26HJ.js +1 -0
- package/dist/standalone/chunk-BGBLQ563.js +1 -0
- package/dist/standalone/chunk-BQNVN2OD.js +1 -0
- package/dist/standalone/chunk-BUVIRYQM.js +1 -0
- package/dist/standalone/chunk-C2OHUG2J.js +1 -0
- package/dist/standalone/chunk-CFPZYHPY.js +2 -0
- package/dist/standalone/chunk-CJLOWFCK.js +4 -0
- package/dist/standalone/chunk-CZZWYUTR.js +1 -0
- package/dist/standalone/chunk-DB2D42KJ.js +1 -0
- package/dist/standalone/chunk-DBCMZ4NF.js +1 -0
- package/dist/standalone/chunk-DGRAPESO.js +1 -0
- package/dist/standalone/chunk-EALHAMLB.js +3 -0
- package/dist/standalone/chunk-EIK3BLGV.js +1 -0
- package/dist/standalone/chunk-ESVP44Y3.js +1 -0
- package/dist/standalone/chunk-EV2NKHXP.js +1 -0
- package/dist/standalone/chunk-F6W6WUAJ.js +1 -0
- package/dist/standalone/chunk-F7IRBXWY.js +1 -0
- package/dist/standalone/chunk-FKAUVTSS.js +1 -0
- package/dist/standalone/chunk-FMM3XUZH.js +4 -0
- package/dist/standalone/chunk-FURI47Z2.js +1 -0
- package/dist/standalone/chunk-FXCBF4XT.js +1 -0
- package/dist/standalone/chunk-GGADAESO.js +1 -0
- package/dist/standalone/chunk-GMR677FL.js +1 -0
- package/dist/standalone/chunk-GRL5MG3Z.js +1 -0
- package/dist/standalone/chunk-GRTTHN6U.js +1 -0
- package/dist/standalone/chunk-GVSKCIJR.js +1 -0
- package/dist/standalone/chunk-HGSIVV32.js +59 -0
- package/dist/standalone/chunk-HPFLBYRI.js +1 -0
- package/dist/standalone/chunk-I6A5C46N.js +1 -0
- package/dist/standalone/chunk-IC4L6G56.js +1 -0
- package/dist/standalone/chunk-IGCNMZSB.js +1 -0
- package/dist/standalone/chunk-IUYFXK4X.js +19 -0
- package/dist/standalone/chunk-IVFHIQOT.js +1 -0
- package/dist/standalone/chunk-IVQUDVQV.js +1 -0
- package/dist/standalone/chunk-JN2Y24PY.js +1 -0
- package/dist/standalone/chunk-JXF2J6QZ.js +3 -0
- package/dist/standalone/chunk-JYYXXMLM.js +1 -0
- package/dist/standalone/chunk-K3PSOZXH.js +1 -0
- package/dist/standalone/chunk-KESD5PH6.js +1 -0
- package/dist/standalone/chunk-LEDWUPXM.js +1 -0
- package/dist/standalone/chunk-LUIZB427.js +1 -0
- package/dist/standalone/chunk-M3NGYXDR.js +11 -0
- package/dist/standalone/chunk-M43KO276.js +1 -0
- package/dist/standalone/chunk-MKYEFQCA.js +1 -0
- package/dist/standalone/chunk-MLT5MMMY.js +1 -0
- package/dist/standalone/chunk-MQ2GKKQ6.js +13 -0
- package/dist/standalone/chunk-MZ2JNVMR.js +1 -0
- package/dist/standalone/chunk-NE4N6I57.js +1 -0
- package/dist/standalone/chunk-P4BOVBMR.js +1 -0
- package/dist/standalone/chunk-PKEBAPJY.js +1 -0
- package/dist/standalone/chunk-PKSAWP56.js +1 -0
- package/dist/standalone/chunk-PLFTCTMX.js +1 -0
- package/dist/standalone/chunk-PVF5J5UD.js +1 -0
- package/dist/standalone/chunk-QBWRC5YX.js +1 -0
- package/dist/standalone/chunk-QC2SRHZV.js +1 -0
- package/dist/standalone/chunk-QLQADHFE.js +1 -0
- package/dist/standalone/chunk-QNWJ5Q2O.js +1 -0
- package/dist/standalone/chunk-QWGT25SE.js +1 -0
- package/dist/standalone/chunk-QZFRZEDN.js +1 -0
- package/dist/standalone/chunk-RMN2JN4S.js +1 -0
- package/dist/standalone/chunk-RTMMB3OY.js +1 -0
- package/dist/standalone/chunk-SD4BERSA.js +1 -0
- package/dist/standalone/chunk-SFDOII3B.js +1 -0
- package/dist/standalone/chunk-SMIESS7P.js +1 -0
- package/dist/standalone/chunk-T6VMSOBB.js +1 -0
- package/dist/standalone/chunk-THIXMMZD.js +1 -0
- package/dist/standalone/chunk-TMGHRD6W.js +1 -0
- package/dist/standalone/chunk-UETRSNZI.js +2 -0
- package/dist/standalone/chunk-UF6XZKV3.js +1 -0
- package/dist/standalone/chunk-UF7QFJ65.js +1 -0
- package/dist/standalone/chunk-V53KNYRN.js +1 -0
- package/dist/standalone/chunk-V76WCOMM.js +1 -0
- package/dist/standalone/chunk-VC4WBYE6.js +1 -0
- package/dist/standalone/chunk-VDW32UET.js +1 -0
- package/dist/standalone/chunk-VJHQW5X5.js +1 -0
- package/dist/standalone/chunk-W25EQ7YQ.js +1 -0
- package/dist/standalone/chunk-WGEZGQZ5.js +1 -0
- package/dist/standalone/chunk-WJQLNYGX.js +1 -0
- package/dist/standalone/chunk-WMLKVJUX.js +1 -0
- package/dist/standalone/chunk-WQH3LT2P.js +1 -0
- package/dist/standalone/chunk-XAEG372C.js +1 -0
- package/dist/standalone/chunk-XBDKZZ67.js +1 -0
- package/dist/standalone/chunk-XF2B7P5A.js +1 -0
- package/dist/standalone/chunk-XHMHOSGK.js +1 -0
- package/dist/standalone/chunk-XQCVZAGU.js +1 -0
- package/dist/standalone/chunk-XXQUMVWH.js +1 -0
- package/dist/standalone/chunk-Y7XGNPT6.js +1 -0
- package/dist/standalone/chunk-YC52XCPK.js +14 -0
- package/dist/standalone/chunk-Z6CJGUSL.js +1 -0
- package/dist/standalone/chunk-ZJGP6EKR.js +1 -0
- package/dist/standalone/studio.js +9 -378
- package/dist/styles.css +2 -2
- package/package.json +15 -14
- package/dist/packem_shared/ADMIN_FUNCTIONS-DjXgvJb6.js +0 -46
- package/dist/packem_shared/ApiDocsPanel-yVSGHK3H.js +0 -842
- package/dist/packem_shared/ApiReferencePanel-1vubqG5s.js +0 -229
- package/dist/packem_shared/ApiTab-rwttyQ1-.js +0 -251
- package/dist/packem_shared/AuditPanel-D9Eh7j7E.js +0 -200
- package/dist/packem_shared/CommandPalette-BtgkBzZI.js +0 -373
- package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
- package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
- package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
- package/dist/packem_shared/DataBrowser-CyckZRwj.js +0 -4480
- package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
- package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
- package/dist/packem_shared/ExportImportPanel-BGJqFK9X.js +0 -197
- package/dist/packem_shared/FileBrowser-0pCpdKPE.js +0 -2932
- package/dist/packem_shared/FunctionRunner-7NH3KcTg.js +0 -343
- package/dist/packem_shared/FunctionStatsPanel-CXynSuqT.js +0 -375
- package/dist/packem_shared/GlobalDataBrowser-DAxzB-Br.js +0 -289
- package/dist/packem_shared/HealthPanel-CyLs7qZm.js +0 -648
- package/dist/packem_shared/HomePanel-BOkFRbuj.js +0 -1334
- package/dist/packem_shared/InsightsPanel-CvXMoZuv.js +0 -461
- package/dist/packem_shared/LogsPanel-BrUstOk6.js +0 -827
- package/dist/packem_shared/MailPanel-GnnrNqL6.js +0 -440
- package/dist/packem_shared/MetricsPanel-BN_uUU-_.js +0 -1611
- package/dist/packem_shared/MigrationsPanel-DaZuUHje.js +0 -239
- package/dist/packem_shared/OpenRpcReferencePanel-vbcYbv3V.js +0 -191
- package/dist/packem_shared/PitrPanel-LJGNP_IX.js +0 -252
- package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
- package/dist/packem_shared/ScheduledJobs-UmVaMbJy.js +0 -262
- package/dist/packem_shared/SchemaViewer-Bam6ylvw.js +0 -2512
- package/dist/packem_shared/SecurityAdvisorPanel-DTmjUNqt.js +0 -92
- package/dist/packem_shared/SettingsPanel-C2wDK-8F.js +0 -390
- package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
- package/dist/packem_shared/SqlEditorPanel-D5wMIxcg.js +0 -13
- package/dist/packem_shared/Studio-DpgYe4qt.js +0 -33
- package/dist/packem_shared/StudioApp-C7aaizqc.js +0 -657
- package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
- package/dist/packem_shared/TableEditor-DzK3Z6rL.js +0 -371
- package/dist/packem_shared/advisor-view-CGcfMiPq.js +0 -159
- package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
- package/dist/packem_shared/app.d-Nbhpihxv.d.ts +0 -300
- package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
- package/dist/packem_shared/bar-chart-CzJAgqkp.js +0 -3245
- package/dist/packem_shared/button-BhsN2uZH.js +0 -49
- package/dist/packem_shared/card-DURq3ElK.js +0 -175
- package/dist/packem_shared/cf-links-2cktDedA.js +0 -8
- package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
- package/dist/packem_shared/data-grid-B5CaV3wS.js +0 -183
- package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
- package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
- package/dist/packem_shared/grid-features-CzUfqgsM.js +0 -840
- package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
- package/dist/packem_shared/internal-rXJEAhXS.js +0 -68
- package/dist/packem_shared/label-D8ykjn5J.js +0 -46
- package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
- package/dist/packem_shared/reference-view-B4E49Lip.js +0 -2180
- package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
- package/dist/packem_shared/sparkline-10dG-_f0.js +0 -93
- package/dist/packem_shared/sql-editor-panel-Smfl_FDF.js +0 -2562
- package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
- package/dist/packem_shared/studio-9Mq0PdMi.js +0 -10831
- package/dist/packem_shared/table-_RzNvy3R.js +0 -246
- package/dist/packem_shared/table-list-sidebar-Bg7uzbvC.js +0 -832
- package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
- package/dist/packem_shared/use-admin-query-4JQW2rr1.js +0 -88
- package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
- package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
- package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i,b as un,e as F,f as G,h as mn}from"./chunk-3XIESWL4.js";function zt(t,e){t.indexOf(e)===-1&&t.push(e)}i(zt,"addUniqueItem");function Mt(t,e){let o=t.indexOf(e);o>-1&&t.splice(o,1)}i(Mt,"removeItem");var U=i((t,e,o)=>o>e?e:o<t?t:o,"clamp");var vt=i(()=>{},"warning"),ot=i(()=>{},"invariant");var X={};var Be=i(t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),"isNumericalString");var Ie=i(t=>typeof t=="object"&&t!==null,"isObject");var Fe=i(t=>/^0[^.\s]+$/u.test(t),"isZeroValueString");function Oe(t){let e;return()=>(e===void 0&&(e=t()),e)}i(Oe,"memo");var k=i(t=>t,"noop");var lt=i((...t)=>t.reduce((e,o)=>r=>o(e(r))),"pipe");var ft=i((t,e,o)=>{let r=e-t;return r?(o-t)/r:1},"progress");var Tt=class{static{i(this,"SubscriptionManager")}constructor(){this.subscriptions=[]}add(e){return zt(this.subscriptions,e),()=>Mt(this.subscriptions,e)}notify(e,o,r){let n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](e,o,r);else for(let a=0;a<n;a++){let s=this.subscriptions[a];s&&s(e,o,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var j=i(t=>t*1e3,"secondsToMilliseconds"),H=i(t=>t/1e3,"millisecondsToSeconds");var je=i((t,e)=>e?t*(1e3/e):0,"velocityPerSecond");var fn=i((t,e,o)=>(((1-3*o+3*e)*t+(3*o-6*e))*t+3*e)*t,"calcBezier"),Vl=1e-7,Sl=12;function Pl(t,e,o,r,n){let a,s,l=0;do s=e+(o-e)/2,a=fn(s,r,n)-t,a>0?o=s:e=s;while(Math.abs(a)>Vl&&++l<Sl);return s}i(Pl,"binarySubdivide");function Ct(t,e,o,r){if(t===e&&o===r)return k;let n=i(a=>Pl(a,0,1,t,o),"getTForX");return a=>a===0||a===1?a:fn(n(a),e,r)}i(Ct,"cubicBezier");var bo=i(t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,"mirrorEasing");var wo=i(t=>e=>1-t(1-e),"reverseEasing");var Ao=Ct(.33,1.53,.69,.99),me=wo(Ao),Ne=bo(me);var Ge=i(t=>t>=1?1:(t*=2)<1?.5*me(t):.5*(2-Math.pow(2,-10*(t-1))),"anticipate");var We=i(t=>1-Math.sin(Math.acos(t)),"circIn"),Ue=wo(We),Ke=bo(We);var _r=Ct(.42,0,1,1),Yr=Ct(0,0,.58,1),ze=Ct(.42,0,.58,1);var Xr=i(t=>Array.isArray(t)&&typeof t[0]!="number","isEasingArray");var He=i(t=>Array.isArray(t)&&typeof t[0]=="number","isBezierDefinition");var pn={linear:k,easeIn:_r,easeInOut:ze,easeOut:Yr,circIn:We,circInOut:Ke,circOut:Ue,backIn:me,backInOut:Ne,backOut:Ao,anticipate:Ge},bl=i(t=>typeof t=="string","isValidEasing"),Mo=i(t=>{if(He(t)){ot(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,o,r,n]=t;return Ct(e,o,r,n)}else if(bl(t))return ot(pn[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),pn[t];return t},"easingDefinitionToFunction");var $e=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function hn(t){let e=new Set,o=new Set,r=!1,n=!1,a=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1};function l(c){a.has(c)&&(u.schedule(c),t()),c(s)}i(l,"triggerCallback");let u={schedule:i((c,m=!1,f=!1)=>{let d=f&&r?e:o;return m&&a.add(c),d.add(c),c},"schedule"),cancel:i(c=>{o.delete(c),a.delete(c)},"cancel"),process:i(c=>{if(s=c,r){n=!0;return}r=!0;let m=e;e=o,o=m,e.forEach(l),e.clear(),r=!1,n&&(n=!1,u.process(c))},"process")};return u}i(hn,"createRenderStep");var wl=40;function Co(t,e){let o=!1,r=!0,n={delta:0,timestamp:0,isProcessing:!1},a=i(()=>o=!0,"flagRunNextFrame"),s=$e.reduce((T,S)=>(T[S]=hn(a),T),{}),{setup:l,read:u,resolveKeyframes:c,preUpdate:m,update:f,preRender:p,render:d,postRender:h}=s,g=i(()=>{let T=X.useManualTiming,S=T?n.timestamp:performance.now();o=!1,T||(n.delta=r?1e3/60:Math.max(Math.min(S-n.timestamp,wl),1)),n.timestamp=S,n.isProcessing=!0,l.process(n),u.process(n),c.process(n),m.process(n),f.process(n),p.process(n),d.process(n),h.process(n),n.isProcessing=!1,o&&e&&(r=!1,t(g))},"processBatch"),x=i(()=>{o=!0,r=!0,n.isProcessing||t(g)},"wake");return{schedule:$e.reduce((T,S)=>{let M=s[S];return T[S]=(E,D=!1,b=!1)=>(o||x(),M.schedule(E,D,b)),T},{}),cancel:i(T=>{for(let S=0;S<$e.length;S++)s[$e[S]].cancel(T)},"cancel"),state:n,steps:s}}i(Co,"createRenderBatcher");var{schedule:w,cancel:J,state:O,steps:_e}=Co(typeof requestAnimationFrame<"u"?requestAnimationFrame:k,!0);var Do;function Al(){Do=void 0}i(Al,"clearTime");var B={now:i(()=>(Do===void 0&&B.set(O.isProcessing||X.useManualTiming?O.timestamp:performance.now()),Do),"now"),set:i(t=>{Do=t,queueMicrotask(Al)},"set")};var dn=i(t=>e=>typeof e=="string"&&e.startsWith(t),"checkStringStartsWith"),Eo=dn("--"),Ml=dn("var(--"),fe=i(t=>Ml(t)?Cl.test(t.split("/*")[0].trim()):!1,"isCSSVariableToken"),Cl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qr(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}i(qr,"containsCSSVariable");var pt={test:i(t=>typeof t=="number","test"),parse:parseFloat,transform:i(t=>t,"transform")},Vt={...pt,transform:i(t=>U(0,1,t),"transform")},Ye={...pt,default:1};var Dt=i(t=>Math.round(t*1e5)/1e5,"sanitize");var pe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gn(t){return t==null}i(gn,"isNullish");var xn=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var he=i((t,e)=>o=>!!(typeof o=="string"&&xn.test(o)&&o.startsWith(t)||e&&!gn(o)&&Object.prototype.hasOwnProperty.call(o,e)),"isColorString"),Ro=i((t,e,o)=>r=>{if(typeof r!="string")return r;let[n,a,s,l]=r.match(pe);return{[t]:parseFloat(n),[e]:parseFloat(a),[o]:parseFloat(s),alpha:l!==void 0?parseFloat(l):1}},"splitColor");var Dl=i(t=>U(0,255,t),"clampRgbUnit"),Zr={...pt,transform:i(t=>Math.round(Dl(t)),"transform")},ht={test:he("rgb","red"),parse:Ro("red","green","blue"),transform:i(({red:t,green:e,blue:o,alpha:r=1})=>"rgba("+Zr.transform(t)+", "+Zr.transform(e)+", "+Zr.transform(o)+", "+Dt(Vt.transform(r))+")","transform")};function El(t){let e="",o="",r="",n="";return t.length>5?(e=t.substring(1,3),o=t.substring(3,5),r=t.substring(5,7),n=t.substring(7,9)):(e=t.substring(1,2),o=t.substring(2,3),r=t.substring(3,4),n=t.substring(4,5),e+=e,o+=o,r+=r,n+=n),{red:parseInt(e,16),green:parseInt(o,16),blue:parseInt(r,16),alpha:n?parseInt(n,16)/255:1}}i(El,"parseHex");var Xe={test:he("#"),parse:El,transform:ht.transform};var qe=i(t=>({test:i(e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,"test"),parse:parseFloat,transform:i(e=>`${e}${t}`,"transform")}),"createUnitType"),rt=qe("deg"),Y=qe("%"),v=qe("px"),Jr=qe("vh"),Qr=qe("vw"),Lo={...Y,parse:i(t=>Y.parse(t)/100,"parse"),transform:i(t=>Y.transform(t*100),"transform")};var Et={test:he("hsl","hue"),parse:Ro("hue","saturation","lightness"),transform:i(({hue:t,saturation:e,lightness:o,alpha:r=1})=>"hsla("+Math.round(t)+", "+Y.transform(Dt(e))+", "+Y.transform(Dt(o))+", "+Dt(Vt.transform(r))+")","transform")};var R={test:i(t=>ht.test(t)||Xe.test(t)||Et.test(t),"test"),parse:i(t=>ht.test(t)?ht.parse(t):Et.test(t)?Et.parse(t):Xe.parse(t),"parse"),transform:i(t=>typeof t=="string"?t:t.hasOwnProperty("red")?ht.transform(t):Et.transform(t),"transform"),getAnimatableNone:i(t=>{let e=R.parse(t);return e.alpha=0,R.transform(e)},"getAnimatableNone")};var yn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Rl(t){return isNaN(t)&&typeof t=="string"&&(t.match(pe)?.length||0)+(t.match(yn)?.length||0)>0}i(Rl,"test");var Tn="number",Vn="color",Ll="var",kl="var(",vn="${}",Bl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Rt(t){let e=t.toString(),o=[],r={color:[],number:[],var:[]},n=[],a=0,l=e.replace(Bl,u=>(R.test(u)?(r.color.push(a),n.push(Vn),o.push(R.parse(u))):u.startsWith(kl)?(r.var.push(a),n.push(Ll),o.push(u)):(r.number.push(a),n.push(Tn),o.push(parseFloat(u))),++a,vn)).split(vn);return{values:o,split:l,indexes:r,types:n}}i(Rt,"analyseComplexValue");function Il(t){return Rt(t).values}i(Il,"parseComplexValue");function Sn({split:t,types:e}){let o=t.length;return r=>{let n="";for(let a=0;a<o;a++)if(n+=t[a],r[a]!==void 0){let s=e[a];s===Tn?n+=Dt(r[a]):s===Vn?n+=R.transform(r[a]):n+=r[a]}return n}}i(Sn,"buildTransformer");function Fl(t){return Sn(Rt(t))}i(Fl,"createTransformer");var Ol=i(t=>typeof t=="number"?0:R.test(t)?R.getAnimatableNone(t):t,"convertNumbersToZero"),jl=i((t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:Ol(t),"convertToZero");function Nl(t){let e=Rt(t);return Sn(e)(e.values.map((r,n)=>jl(r,e.split[n])))}i(Nl,"getAnimatableNone");var K={test:Rl,parse:Il,createTransformer:Fl,getAnimatableNone:Nl};function ti(t,e,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+(e-t)*6*o:o<1/2?e:o<2/3?t+(e-t)*(2/3-o)*6:t}i(ti,"hueToRgb");function Pn({hue:t,saturation:e,lightness:o,alpha:r}){t/=360,e/=100,o/=100;let n=0,a=0,s=0;if(!e)n=a=s=o;else{let l=o<.5?o*(1+e):o+e-o*e,u=2*o-l;n=ti(u,l,t+1/3),a=ti(u,l,t),s=ti(u,l,t-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:r}}i(Pn,"hslaToRgba");function de(t,e){return o=>o>0?e:t}i(de,"mixImmediate");var A=i((t,e,o)=>t+(e-t)*o,"mixNumber");var ei=i((t,e,o)=>{let r=t*t,n=o*(e*e-r)+r;return n<0?0:Math.sqrt(n)},"mixLinearColor"),Gl=[Xe,ht,Et],Wl=i(t=>Gl.find(e=>e.test(t)),"getColorType");function bn(t){let e=Wl(t);if(vt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let o=e.parse(t);return e===Et&&(o=Pn(o)),o}i(bn,"asRGBA");var oi=i((t,e)=>{let o=bn(t),r=bn(e);if(!o||!r)return de(t,e);let n={...o};return a=>(n.red=ei(o.red,r.red,a),n.green=ei(o.green,r.green,a),n.blue=ei(o.blue,r.blue,a),n.alpha=A(o.alpha,r.alpha,a),ht.transform(n))},"mixColor");var ko=new Set(["none","hidden"]);function wn(t,e){return ko.has(t)?o=>o<=0?t:e:o=>o>=1?e:t}i(wn,"mixVisibility");function Ul(t,e){return o=>A(t,e,o)}i(Ul,"mixNumber");function Bo(t){return typeof t=="number"?Ul:typeof t=="string"?fe(t)?de:R.test(t)?oi:Hl:Array.isArray(t)?An:typeof t=="object"?R.test(t)?oi:Kl:de}i(Bo,"getMixer");function An(t,e){let o=[...t],r=o.length,n=t.map((a,s)=>Bo(a)(a,e[s]));return a=>{for(let s=0;s<r;s++)o[s]=n[s](a);return o}}i(An,"mixArray");function Kl(t,e){let o={...t,...e},r={};for(let n in o)t[n]!==void 0&&e[n]!==void 0&&(r[n]=Bo(t[n])(t[n],e[n]));return n=>{for(let a in r)o[a]=r[a](n);return o}}i(Kl,"mixObject");function zl(t,e){let o=[],r={color:0,var:0,number:0};for(let n=0;n<e.values.length;n++){let a=e.types[n],s=t.indexes[a][r[a]],l=t.values[s]??0;o[n]=l,r[a]++}return o}i(zl,"matchOrder");var Hl=i((t,e)=>{let o=K.createTransformer(e),r=Rt(t),n=Rt(e);return r.indexes.var.length===n.indexes.var.length&&r.indexes.color.length===n.indexes.color.length&&r.indexes.number.length>=n.indexes.number.length?ko.has(t)&&!n.values.length||ko.has(e)&&!r.values.length?wn(t,e):lt(An(zl(r,n),n.values),o):(vt(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),de(t,e))},"mixComplex");function Io(t,e,o){return typeof t=="number"&&typeof e=="number"&&typeof o=="number"?A(t,e,o):Bo(t)(t,e)}i(Io,"mix");var Mn=i(t=>{let e=i(({timestamp:o})=>t(o),"passTimestamp");return{start:i((o=!0)=>w.update(e,o),"start"),stop:i(()=>J(e),"stop"),now:i(()=>O.isProcessing?O.timestamp:B.now(),"now")}},"frameloopDriver");var Fo=i((t,e,o=10)=>{let r="",n=Math.max(Math.round(e/o),2);for(let a=0;a<n;a++)r+=Math.round(t(a/(n-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},"generateLinearEasing");function ge(t){let e=0,o=50,r=t.next(e);for(;!r.done&&e<2e4;)e+=o,r=t.next(e);return e>=2e4?1/0:e}i(ge,"calcGeneratorDuration");function Cn(t,e=100,o){let r=o({...t,keyframes:[0,e]}),n=Math.min(ge(r),2e4);return{type:"keyframes",ease:i(a=>r.next(n*a).value/e,"ease"),duration:H(n)}}i(Cn,"createGeneratorEasing");var I={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ni(t,e){return t*Math.sqrt(1-e*e)}i(ni,"calcAngularFreq");var $l=12;function _l(t,e,o){let r=o;for(let n=1;n<$l;n++)r=r-t(r)/e(r);return r}i(_l,"approximateRoot");var ii=.001;function Yl({duration:t=I.duration,bounce:e=I.bounce,velocity:o=I.velocity,mass:r=I.mass}){let n,a;vt(t<=j(I.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-e;s=U(I.minDamping,I.maxDamping,s),t=U(I.minDuration,I.maxDuration,H(t)),s<1?(n=i(c=>{let m=c*s,f=m*t,p=m-o,d=ni(c,s),h=Math.exp(-f);return ii-p/d*h},"envelope"),a=i(c=>{let f=c*s*t,p=f*o+o,d=Math.pow(s,2)*Math.pow(c,2)*t,h=Math.exp(-f),g=ni(Math.pow(c,2),s);return(-n(c)+ii>0?-1:1)*((p-d)*h)/g},"derivative")):(n=i(c=>{let m=Math.exp(-c*t),f=(c-o)*t+1;return-ii+m*f},"envelope"),a=i(c=>{let m=Math.exp(-c*t),f=(o-c)*(t*t);return m*f},"derivative"));let l=5/t,u=_l(n,a,l);if(t=j(t),isNaN(u))return{stiffness:I.stiffness,damping:I.damping,duration:t};{let c=Math.pow(u,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:t}}}i(Yl,"findSpring");var Xl=["duration","bounce"],ql=["stiffness","damping","mass"];function Dn(t,e){return e.some(o=>t[o]!==void 0)}i(Dn,"isSpringType");function Zl(t){let e={velocity:I.velocity,stiffness:I.stiffness,damping:I.damping,mass:I.mass,isResolvedFromDuration:!1,...t};if(!Dn(t,ql)&&Dn(t,Xl))if(e.velocity=0,t.visualDuration){let o=t.visualDuration,r=2*Math.PI/(o*1.2),n=r*r,a=2*U(.05,1,1-(t.bounce||0))*Math.sqrt(n);e={...e,mass:I.mass,stiffness:n,damping:a}}else{let o=Yl({...t,velocity:0});e={...e,...o,mass:I.mass},e.isResolvedFromDuration=!0}return e}i(Zl,"getSpringOptions");function xe(t=I.visualDuration,e=I.bounce){let o=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:r,restDelta:n}=o,a=o.keyframes[0],s=o.keyframes[o.keyframes.length-1],l={done:!1,value:a},{stiffness:u,damping:c,mass:m,duration:f,velocity:p,isResolvedFromDuration:d}=Zl({...o,velocity:-H(o.velocity||0)}),h=p||0,g=c/(2*Math.sqrt(u*m)),x=s-a,y=H(Math.sqrt(u/m)),V=Math.abs(x)<5;r||(r=V?I.restSpeed.granular:I.restSpeed.default),n||(n=V?I.restDelta.granular:I.restDelta.default);let T,S,M,E,D,b;if(g<1)M=ni(y,g),E=(h+g*y*x)/M,T=i(P=>{let N=Math.exp(-g*y*P);return s-N*(E*Math.sin(M*P)+x*Math.cos(M*P))},"resolveSpring"),D=g*y*E+x*M,b=g*y*x-E*M,S=i(P=>Math.exp(-g*y*P)*(D*Math.sin(M*P)+b*Math.cos(M*P)),"resolveVelocity");else if(g===1){T=i(N=>s-Math.exp(-y*N)*(x+(h+y*x)*N),"resolveSpring");let P=h+y*x;S=i(N=>Math.exp(-y*N)*(y*P*N-h),"resolveVelocity")}else{let P=y*Math.sqrt(g*g-1);T=i(ut=>{let yt=Math.exp(-g*y*ut),mt=Math.min(P*ut,300);return s-yt*((h+g*y*x)*Math.sinh(mt)+P*x*Math.cosh(mt))/P},"resolveSpring");let N=(h+g*y*x)/P,Z=g*y*N-x*P,Ut=g*y*x-N*P;S=i(ut=>{let yt=Math.exp(-g*y*ut),mt=Math.min(P*ut,300);return yt*(Z*Math.sinh(mt)+Ut*Math.cosh(mt))},"resolveVelocity")}let $={calculatedDuration:d&&f||null,velocity:i(P=>j(S(P)),"velocity"),next:i(P=>{if(!d&&g<1){let Z=Math.exp(-g*y*P),Ut=Math.sin(M*P),ut=Math.cos(M*P),yt=s-Z*(E*Ut+x*ut),mt=j(Z*(D*Ut+b*ut));return l.done=Math.abs(mt)<=r&&Math.abs(s-yt)<=n,l.value=l.done?s:yt,l}let N=T(P);if(d)l.done=P>=f;else{let Z=j(S(P));l.done=Math.abs(Z)<=r&&Math.abs(s-N)<=n}return l.value=l.done?s:N,l},"next"),toString:i(()=>{let P=Math.min(ge($),2e4),N=Fo(Z=>$.next(P*Z).value,P,30);return P+"ms "+N},"toString"),toTransition:i(()=>{},"toTransition")};return $}i(xe,"spring");xe.applyToOptions=t=>{let e=Cn(t,100,xe);return t.ease=e.ease,t.duration=j(e.duration),t.type="keyframes",t};var Jl=5;function Oo(t,e,o){let r=Math.max(e-Jl,0);return je(o-t(r),e-r)}i(Oo,"getGeneratorVelocity");function Ze({keyframes:t,velocity:e=0,power:o=.8,timeConstant:r=325,bounceDamping:n=10,bounceStiffness:a=500,modifyTarget:s,min:l,max:u,restDelta:c=.5,restSpeed:m}){let f=t[0],p={done:!1,value:f},d=i(b=>l!==void 0&&b<l||u!==void 0&&b>u,"isOutOfBounds"),h=i(b=>l===void 0?u:u===void 0||Math.abs(l-b)<Math.abs(u-b)?l:u,"nearestBoundary"),g=o*e,x=f+g,y=s===void 0?x:s(x);y!==x&&(g=y-f);let V=i(b=>-g*Math.exp(-b/r),"calcDelta"),T=i(b=>y+V(b),"calcLatest"),S=i(b=>{let $=V(b),P=T(b);p.done=Math.abs($)<=c,p.value=p.done?y:P},"applyFriction"),M,E,D=i(b=>{d(p.value)&&(M=b,E=xe({keyframes:[p.value,h(p.value)],velocity:Oo(T,b,p.value),damping:n,stiffness:a,restDelta:c,restSpeed:m}))},"checkCatchBoundary");return D(0),{calculatedDuration:null,next:i(b=>{let $=!1;return!E&&M===void 0&&($=!0,S(b),D(b)),M!==void 0&&b>=M?E.next(b-M):(!$&&S(b),p)},"next")}}i(Ze,"inertia");function Ql(t,e,o){let r=[],n=o||X.mix||Io,a=t.length-1;for(let s=0;s<a;s++){let l=n(t[s],t[s+1]);if(e){let u=Array.isArray(e)?e[s]||k:e;l=lt(u,l)}r.push(l)}return r}i(Ql,"createMixers");function En(t,e,{clamp:o=!0,ease:r,mixer:n}={}){let a=t.length;if(ot(a===e.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>e[0];if(a===2&&e[0]===e[1])return()=>e[1];let s=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());let l=Ql(e,r,n),u=l.length,c=i(m=>{if(s&&m<t[0])return e[0];let f=0;if(u>1)for(;f<t.length-2&&!(m<t[f+1]);f++);let p=ft(t[f],t[f+1],m);return l[f](p)},"interpolator");return o?m=>c(U(t[0],t[a-1],m)):c}i(En,"interpolate");function Rn(t,e){let o=t[t.length-1];for(let r=1;r<=e;r++){let n=ft(0,e,r);t.push(A(o,1,n))}}i(Rn,"fillOffset");function Ln(t){let e=[0];return Rn(e,t.length-1),e}i(Ln,"defaultOffset");function kn(t,e){return t.map(o=>o*e)}i(kn,"convertOffsetToTimes");function tc(t,e){return t.map(()=>e||ze).splice(0,t.length-1)}i(tc,"defaultEasing");function Ht({duration:t=300,keyframes:e,times:o,ease:r="easeInOut"}){let n=Xr(r)?r.map(Mo):Mo(r),a={done:!1,value:e[0]},s=kn(o&&o.length===e.length?o:Ln(e),t),l=En(s,e,{ease:Array.isArray(n)?n:tc(e,n)});return{calculatedDuration:t,next:i(u=>(a.value=l(u),a.done=u>=t,a),"next")}}i(Ht,"keyframes");var ec=i(t=>t!==null,"isNotNull");function Lt(t,{repeat:e,repeatType:o="loop"},r,n=1){let a=t.filter(ec),l=n<0||e&&o!=="loop"&&e%2===1?0:a.length-1;return!l||r===void 0?a[l]:r}i(Lt,"getFinalKeyframe");var oc={decay:Ze,inertia:Ze,tween:Ht,keyframes:Ht,spring:xe};function jo(t){typeof t.type=="string"&&(t.type=oc[t.type])}i(jo,"replaceTransitionType");var kt=class{static{i(this,"WithPromise")}constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,o){return this.finished.then(e,o)}};var rc=i(t=>t/100,"percentToProgress"),St=class extends kt{static{i(this,"JSAnimation")}constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:o}=this.options;o&&o.updatedAt!==B.now()&&this.tick(B.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;jo(e);let{type:o=Ht,repeat:r=0,repeatDelay:n=0,repeatType:a,velocity:s=0}=e,{keyframes:l}=e,u=o||Ht;u!==Ht&&typeof l[0]!="number"&&(this.mixKeyframes=lt(rc,Io(l[0],l[1])),l=[0,100]);let c=u({...e,keyframes:l});a==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...l].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=ge(c));let{calculatedDuration:m}=c;this.calculatedDuration=m,this.resolvedDuration=m+n,this.totalDuration=this.resolvedDuration*(r+1)-n,this.generator=c}updateTime(e){let o=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=o}tick(e,o=!1){let{generator:r,totalDuration:n,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:l,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);let{delay:c=0,keyframes:m,repeat:f,repeatType:p,repeatDelay:d,type:h,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),o?this.currentTime=e:this.updateTime(e);let y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),V=this.playbackSpeed>=0?y<0:y>n;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let T=this.currentTime,S=r;if(f){let b=Math.min(this.currentTime,n)/l,$=Math.floor(b),P=b%1;!P&&b>=1&&(P=1),P===1&&$--,$=Math.min($,f+1),$%2&&(p==="reverse"?(P=1-P,d&&(P-=d/l)):p==="mirror"&&(S=s)),T=U(0,1,P)*l}let M;V?(this.delayState.value=m[0],M=this.delayState):M=S.next(T),a&&!V&&(M.value=a(M.value));let{done:E}=M;!V&&u!==null&&(E=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return D&&h!==Ze&&(M.value=Lt(m,this.options,x,this.speed)),g&&g(M.value),D&&this.finish(),M}then(e,o){return this.finished.then(e,o)}get duration(){return H(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+H(e)}get time(){return H(this.currentTime)}set time(e){e=j(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let o=this.generator.next(e).value;return Oo(r=>this.generator.next(r).value,e,o)}get speed(){return this.playbackSpeed}set speed(e){let o=this.playbackSpeed!==e;o&&this.driver&&this.updateTime(B.now()),this.playbackSpeed=e,o&&this.driver&&(this.time=H(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Mn,startTime:o}=this.options;this.driver||(this.driver=e(n=>this.tick(n))),this.options.onPlay?.();let r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=o??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(B.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}};function Bn(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}i(Bn,"fillWildcards");var $t=i(t=>t*180/Math.PI,"radToDeg"),si=i(t=>{let e=$t(Math.atan2(t[1],t[0]));return ai(e)},"rotate"),ic={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:i(t=>(Math.abs(t[0])+Math.abs(t[3]))/2,"scale"),rotate:si,rotateZ:si,skewX:i(t=>$t(Math.atan(t[1])),"skewX"),skewY:i(t=>$t(Math.atan(t[2])),"skewY"),skew:i(t=>(Math.abs(t[1])+Math.abs(t[2]))/2,"skew")},ai=i(t=>(t=t%360,t<0&&(t+=360),t),"rebaseAngle"),In=si,Fn=i(t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),"scaleX"),On=i(t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),"scaleY"),nc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Fn,scaleY:On,scale:i(t=>(Fn(t)+On(t))/2,"scale"),rotateX:i(t=>ai($t(Math.atan2(t[6],t[5]))),"rotateX"),rotateY:i(t=>ai($t(Math.atan2(-t[2],t[0]))),"rotateY"),rotateZ:In,rotate:In,skewX:i(t=>$t(Math.atan(t[4])),"skewX"),skewY:i(t=>$t(Math.atan(t[1])),"skewY"),skew:i(t=>(Math.abs(t[1])+Math.abs(t[4]))/2,"skew")};function No(t){return t.includes("scale")?1:0}i(No,"defaultTransformValue");function Go(t,e){if(!t||t==="none")return No(e);let o=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,n;if(o)r=nc,n=o;else{let l=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ic,n=l}if(!n)return No(e);let a=r[e],s=n[1].split(",").map(sc);return typeof a=="function"?a(s):s[a]}i(Go,"parseValueFromTransform");var jn=i((t,e)=>{let{transform:o="none"}=getComputedStyle(t);return Go(o,e)},"readTransformValue");function sc(t){return parseFloat(t.trim())}i(sc,"convertTransformToNumber");var dt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],it=new Set([...dt,"pathRotation"]);var li=i(t=>t===pt||t===v,"isNumOrPxType"),ac=new Set(["x","y","z"]),lc=dt.filter(t=>!ac.has(t));function Nn(t){let e=[];return lc.forEach(o=>{let r=t.getValue(o);r!==void 0&&(e.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),e}i(Nn,"removeNonTranslationalTransform");var Pt={width:i(({x:t},{paddingLeft:e="0",paddingRight:o="0",boxSizing:r})=>{let n=t.max-t.min;return r==="border-box"?n:n-parseFloat(e)-parseFloat(o)},"width"),height:i(({y:t},{paddingTop:e="0",paddingBottom:o="0",boxSizing:r})=>{let n=t.max-t.min;return r==="border-box"?n:n-parseFloat(e)-parseFloat(o)},"height"),top:i((t,{top:e})=>parseFloat(e),"top"),left:i((t,{left:e})=>parseFloat(e),"left"),bottom:i(({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),"bottom"),right:i(({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),"right"),x:i((t,{transform:e})=>Go(e,"x"),"x"),y:i((t,{transform:e})=>Go(e,"y"),"y")};Pt.translateX=Pt.x;Pt.translateY=Pt.y;var _t=new Set,ci=!1,ui=!1,mi=!1;function Gn(){if(ui){let t=Array.from(_t).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),o=new Map;e.forEach(r=>{let n=Nn(r);n.length&&(o.set(r,n),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();let n=o.get(r);n&&n.forEach(([a,s])=>{r.getValue(a)?.set(s)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ui=!1,ci=!1,_t.forEach(t=>t.complete(mi)),_t.clear()}i(Gn,"measureAllKeyframes");function Wn(){_t.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ui=!0)})}i(Wn,"readAllKeyframes");function Un(){mi=!0,Wn(),Gn(),mi=!1}i(Un,"flushKeyframeResolvers");var Bt=class{static{i(this,"KeyframeResolver")}constructor(e,o,r,n,a,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=o,this.name=r,this.motionValue=n,this.element=a,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(_t.add(this),ci||(ci=!0,w.read(Wn),w.resolveKeyframes(Gn))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:o,element:r,motionValue:n}=this;if(e[0]===null){let a=n?.get(),s=e[e.length-1];if(a!==void 0)e[0]=a;else if(r&&o){let l=r.readValue(o,s);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=s),n&&a===void 0&&n.set(e[0])}Bn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),_t.delete(this)}cancel(){this.state==="scheduled"&&(_t.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var Kn=i(t=>t.startsWith("--"),"isCSSVar");function Wo(t,e,o){Kn(e)?t.style.setProperty(e,o):t.style[e]=o}i(Wo,"setStyle");var zn={};function Uo(t,e){let o=Oe(t);return()=>zn[e]??o()}i(Uo,"memoSupports");var Hn=Uo(()=>window.ScrollTimeline!==void 0,"scrollTimeline");var Ko=Uo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var Yt=i(([t,e,o,r])=>`cubic-bezier(${t}, ${e}, ${o}, ${r})`,"cubicBezierAsString");var fi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Yt([0,.65,.55,1]),circOut:Yt([.55,0,1,.45]),backIn:Yt([.31,.01,.66,-.59]),backOut:Yt([.33,1.53,.69,.99])};function pi(t,e){if(t)return typeof t=="function"?Ko()?Fo(t,e):"ease-out":He(t)?Yt(t):Array.isArray(t)?t.map(o=>pi(o,e)||fi.easeOut):fi[t]}i(pi,"mapEasingToNativeEasing");function $n(t,e,o,{delay:r=0,duration:n=300,repeat:a=0,repeatType:s="loop",ease:l="easeOut",times:u}={},c=void 0){let m={[e]:o};u&&(m.offset=u);let f=pi(l,n);Array.isArray(f)&&(m.easing=f);let p={delay:r,duration:n,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:a+1,direction:s==="reverse"?"alternate":"normal"};return c&&(p.pseudoElement=c),t.animate(m,p)}i($n,"startWaapiAnimation");function zo(t){return typeof t=="function"&&"applyToOptions"in t}i(zo,"isGenerator");function _n({type:t,...e}){return zo(t)&&Ko()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}i(_n,"applyGeneratorOptions");var ye=class extends kt{static{i(this,"NativeAnimation")}constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:o,name:r,keyframes:n,pseudoElement:a,allowFlatten:s=!1,finalKeyframe:l,onComplete:u}=e;this.isPseudoElement=!!a,this.allowFlatten=s,this.options=e,ot(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let c=_n(e);this.animation=$n(o,r,n,c,a),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let m=Lt(n,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(m),Wo(o,r,m),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return H(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+H(e)}get time(){return H(Number(this.animation.currentTime)||0)}set time(e){let o=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=j(e),o&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:o,rangeEnd:r,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Hn()?(this.animation.timeline=e,o&&(this.animation.rangeStart=o),r&&(this.animation.rangeEnd=r),k):n(this)}};var Yn={anticipate:Ge,backInOut:Ne,circInOut:Ke};function cc(t){return t in Yn}i(cc,"isUnsupportedEase");function Xn(t){typeof t.ease=="string"&&cc(t.ease)&&(t.ease=Yn[t.ease])}i(Xn,"replaceStringEasing");var hi=10,Ho=class extends ye{static{i(this,"NativeAnimationExtended")}constructor(e){Xn(e),jo(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:o,onUpdate:r,onComplete:n,element:a,...s}=this.options;if(!o)return;if(e!==void 0){o.set(e);return}let l=new St({...s,autoplay:!1}),u=Math.max(hi,B.now()-this.startTime),c=U(0,hi,u-hi),m=l.sample(u).value,{name:f}=this.options;a&&f&&Wo(a,f,m),o.setWithVelocity(l.sample(Math.max(0,u-c)).value,m,c),l.stop()}};var di=i((t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(K.test(t)||t==="0")&&!t.startsWith("url(")),"isAnimatable");function uc(t){let e=t[0];if(t.length===1)return!0;for(let o=0;o<t.length;o++)if(t[o]!==e)return!0}i(uc,"hasKeyframesChanged");function qn(t,e,o,r){let n=t[0];if(n===null)return!1;if(e==="display"||e==="visibility")return!0;let a=t[t.length-1],s=di(n,e),l=di(a,e);return vt(s===l,`You are trying to animate ${e} from "${n}" to "${a}". "${s?a:n}" is not an animatable value.`,"value-not-animatable"),!s||!l?!1:uc(t)||(o==="spring"||zo(o))&&r}i(qn,"canAnimate");function Je(t){t.duration=0,t.type="keyframes"}i(Je,"makeAnimationInstant");var $o=new Set(["opacity","clipPath","filter","transform"]);var mc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Zn(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&mc.test(t[e]))return!0;return!1}i(Zn,"hasBrowserOnlyColors");var fc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),pc=Oe(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Jn(t){let{motionValue:e,name:o,repeatDelay:r,repeatType:n,damping:a,type:s,keyframes:l}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:m}=e.owner.getProps();return pc()&&o&&($o.has(o)||fc.has(o)&&Zn(l))&&(o!=="transform"||!m)&&!c&&!r&&n!=="mirror"&&a!==0&&s!=="inertia"}i(Jn,"supportsBrowserAnimation");var hc=40,_o=class extends kt{static{i(this,"AsyncMotionValueAnimation")}constructor({autoplay:e=!0,delay:o=0,type:r="keyframes",repeat:n=0,repeatDelay:a=0,repeatType:s="loop",keyframes:l,name:u,motionValue:c,element:m,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=B.now();let p={autoplay:e,delay:o,type:r,repeat:n,repeatDelay:a,repeatType:s,name:u,motionValue:c,element:m,...f},d=m?.KeyframeResolver||Bt;this.keyframeResolver=new d(l,(h,g,x)=>this.onKeyframesResolved(h,g,p,!x),u,c,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,o,r,n){this.keyframeResolver=void 0;let{name:a,type:s,velocity:l,delay:u,isHandoff:c,onUpdate:m}=r;this.resolvedAt=B.now();let f=!0;qn(e,a,s,l)||(f=!1,(X.instantAnimations||!u)&&m?.(Lt(e,r,o)),e[0]=e[e.length-1],Je(r),r.repeat=0);let d={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>hc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:e},h=f&&!c&&Jn(d),g=d.motionValue?.owner?.current,x;if(h)try{x=new Ho({...d,element:g})}catch{x=new St(d)}else x=new St(d);x.finished.then(()=>{this.notifyFinished()}).catch(k),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(e,o){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Un()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Yo(t,e,o,r=0,n=1){let a=Array.from(t).sort((c,m)=>c.sortNodePosition(m)).indexOf(e),s=t.size,l=(s-1)*r;return typeof o=="function"?o(a,s):n===1?a*r:l-a*r}i(Yo,"calcChildStagger");var Qn=30,dc=i(t=>!isNaN(parseFloat(t)),"isFloat"),ts={current:void 0},gi=class{static{i(this,"MotionValue")}constructor(e,o={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{let n=B.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=o.owner}setCurrent(e){this.current=e,this.updatedAt=B.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=dc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,o){this.events[e]||(this.events[e]=new Tt);let r=this.events[e].add(o);return e==="change"?()=>{r(),w.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,o){this.passiveEffect=e,this.stopPassiveEffect=o}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,o,r){this.set(o),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,o=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return ts.current&&ts.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=B.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Qn)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,Qn);return je(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(e){return this.stop(),new Promise(o=>{this.hasAnimated=!0,this.animation=e(o),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function ct(t,e){return new gi(t,e)}i(ct,"motionValue");function Xo(t,e){if(t?.inherit&&e){let{inherit:o,...r}=t;return{...e,...r}}return t}i(Xo,"resolveTransition");function ve(t,e){let o=t?.[e]??t?.default??t;return o!==t?Xo(o,t):o}i(ve,"getValueTransition");var gc={type:"spring",stiffness:500,damping:25,restSpeed:10},xc=i(t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),"criticallyDampedSpring"),yc={type:"keyframes",duration:.8},vc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},es=i((t,{keyframes:e})=>e.length>2?yc:it.has(t)?t.startsWith("scale")?xc(e[1]):gc:vc,"getDefaultTransition");var Tc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function os(t){for(let e in t)if(!Tc.has(e))return!0;return!1}i(os,"isTransitionDefined");var Xt=i((t,e,o,r={},n,a)=>s=>{let l=ve(r,t)||{},u=l.delay||r.delay||0,{elapsed:c=0}=r;c=c-j(u);let m={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,onUpdate:i(p=>{e.set(p),l.onUpdate&&l.onUpdate(p)},"onUpdate"),onComplete:i(()=>{s(),l.onComplete&&l.onComplete()},"onComplete"),name:t,motionValue:e,element:a?void 0:n};os(l)||Object.assign(m,es(t,m)),m.duration&&(m.duration=j(m.duration)),m.repeatDelay&&(m.repeatDelay=j(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let f=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(Je(m),m.delay===0&&(f=!0)),(X.instantAnimations||X.skipAnimations||n?.shouldSkipAnimations||l.skipAnimations)&&(f=!0,Je(m),m.delay=0),m.allowFlatten=!l.type&&!l.ease,f&&!a&&e.get()!==void 0){let p=Lt(m.keyframes,l);if(p!==void 0){w.update(()=>{m.onUpdate(p),m.onComplete()});return}}return l.isSync?new St(m):new _o(m)},"animateMotionValue");var Vc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Sc(t){let e=Vc.exec(t);if(!e)return[,];let[,o,r,n]=e;return[`--${o??r}`,n]}i(Sc,"parseCSSVariable");var Pc=4;function xi(t,e,o=1){ot(o<=Pc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,n]=Sc(t);if(!r)return;let a=window.getComputedStyle(e).getPropertyValue(r);if(a){let s=a.trim();return Be(s)?parseFloat(s):s}return fe(n)?xi(n,e,o+1):n}i(xi,"getVariableValue");function rs(t){let e=[{},{}];return t?.values.forEach((o,r)=>{e[0][r]=o.get(),e[1][r]=o.getVelocity()}),e}i(rs,"getValueState");function qt(t,e,o,r){if(typeof e=="function"){let[n,a]=rs(r);e=e(o!==void 0?o:t.custom,n,a)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){let[n,a]=rs(r);e=e(o!==void 0?o:t.custom,n,a)}return e}i(qt,"resolveVariantFromProps");function Q(t,e,o){let r=t.getProps();return qt(r,e,o!==void 0?o:r.custom,t)}i(Q,"resolveVariant");var qo=new Set(["width","height","top","left","right","bottom",...dt]);var Qe=i(t=>Array.isArray(t),"isKeyframesTarget");function bc(t,e,o){t.hasValue(e)?t.getValue(e).set(o):t.addValue(e,ct(o))}i(bc,"setMotionValue");function wc(t){return Qe(t)?t[t.length-1]||0:t}i(wc,"resolveFinalValueInKeyframes");function is(t,e){let o=Q(t,e),{transitionEnd:r={},transition:n={},...a}=o||{};a={...a,...r};for(let s in a){let l=wc(a[s]);bc(t,s,l)}}i(is,"setTarget");var C=i(t=>!!(t&&t.getVelocity),"isMotionValue");function ns(t){return!!(C(t)&&t.add)}i(ns,"isWillChangeMotionValue");function Te(t,e){let o=t.getValue("willChange");if(ns(o))return o.add(e);if(!o&&X.WillChange){let r=new X.WillChange("auto");t.addValue("willChange",r),r.add(e)}}i(Te,"addValueToWillChange");function Ve(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}i(Ve,"camelToDash");var ss="framerAppearId",to="data-"+Ve(ss);function Zo(t){return t.props[to]}i(Zo,"getOptimisedAppearId");function Ac({protectedKeys:t,needsAnimating:e},o){let r=t.hasOwnProperty(o)&&e[o]!==!0;return e[o]=!1,r}i(Ac,"shouldBlockAnimation");function Jo(t,e,{delay:o=0,transitionOverride:r,type:n}={}){let{transition:a,transitionEnd:s,...l}=e,u=t.getDefaultTransition();a=a?Xo(a,u):u;let c=a?.reduceMotion,m=a?.skipAnimations;r&&(a=r);let f=[],p=n&&t.animationState&&t.animationState.getState()[n],d=a?.path;d&&d.animateVisualElement(t,l,a,o,f);for(let h in l){let g=t.getValue(h,t.latestValues[h]??null),x=l[h];if(x===void 0||p&&Ac(p,h))continue;let y={delay:o,...ve(a||{},h)};m&&(y.skipAnimations=!0);let V=g.get();if(V!==void 0&&!g.isAnimating()&&!Array.isArray(x)&&x===V&&!y.velocity){w.update(()=>g.set(x));continue}let T=!1;if(window.MotionHandoffAnimation){let E=Zo(t);if(E){let D=window.MotionHandoffAnimation(E,h,w);D!==null&&(y.startTime=D,T=!0)}}Te(t,h);let S=c??t.shouldReduceMotion;g.start(Xt(h,g,x,S&&qo.has(h)?{type:!1}:y,t,T));let M=g.animation;M&&f.push(M)}if(s){let h=i(()=>w.update(()=>{s&&is(t,s)}),"applyTransitionEnd");f.length?Promise.all(f).then(h):h()}return f}i(Jo,"animateTarget");function Qo(t,e,o={}){let r=Q(t,e,o.type==="exit"?t.presenceContext?.custom:void 0),{transition:n=t.getDefaultTransition()||{}}=r||{};o.transitionOverride&&(n=o.transitionOverride);let a=r?()=>Promise.all(Jo(t,r,o)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(u=0)=>{let{delayChildren:c=0,staggerChildren:m,staggerDirection:f}=n;return Mc(t,e,u,c,m,f,o)}:()=>Promise.resolve(),{when:l}=n;if(l){let[u,c]=l==="beforeChildren"?[a,s]:[s,a];return u().then(()=>c())}else return Promise.all([a(),s(o.delay)])}i(Qo,"animateVariant");function Mc(t,e,o=0,r=0,n=0,a=1,s){let l=[];for(let u of t.variantChildren)u.notify("AnimationStart",e),l.push(Qo(u,e,{...s,delay:o+(typeof r=="function"?0:r)+Yo(t.variantChildren,u,r,n,a)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(l)}i(Mc,"animateChildren");function as(t,e,o={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){let n=e.map(a=>Qo(t,a,o));r=Promise.all(n)}else if(typeof e=="string")r=Qo(t,e,o);else{let n=typeof e=="function"?Q(t,e,o.custom):e;r=Promise.all(Jo(t,n,o))}return r.then(()=>{t.notify("AnimationComplete",e)})}i(as,"animateVisualElement");var ls={test:i(t=>t==="auto","test"),parse:i(t=>t,"parse")};var tr=i(t=>e=>e.test(t),"testValueType");var yi=[pt,v,Y,rt,Qr,Jr,ls],vi=i(t=>yi.find(tr(t)),"findDimensionValueType");function cs(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Fe(t):!0}i(cs,"isNone");var Cc=new Set(["brightness","contrast","saturate","opacity"]);function Dc(t){let[e,o]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;let[r]=o.match(pe)||[];if(!r)return t;let n=o.replace(r,""),a=Cc.has(e)?1:0;return r!==o&&(a*=100),e+"("+a+n+")"}i(Dc,"applyDefaultFilter");var Ec=/\b([a-z-]*)\(.*?\)/gu,eo={...K,getAnimatableNone:i(t=>{let e=t.match(Ec);return e?e.map(Dc).join(" "):t},"getAnimatableNone")};var oo={...K,getAnimatableNone:i(t=>{let e=K.parse(t);return K.createTransformer(t)(e.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))},"getAnimatableNone")};var Ti={...pt,transform:Math.round};var us={rotate:rt,pathRotation:rt,rotateX:rt,rotateY:rt,rotateZ:rt,scale:Ye,scaleX:Ye,scaleY:Ye,scaleZ:Ye,skew:rt,skewX:rt,skewY:rt,distance:v,translateX:v,translateY:v,translateZ:v,x:v,y:v,z:v,perspective:v,transformPerspective:v,opacity:Vt,originX:Lo,originY:Lo,originZ:v};var Zt={borderWidth:v,borderTopWidth:v,borderRightWidth:v,borderBottomWidth:v,borderLeftWidth:v,borderRadius:v,borderTopLeftRadius:v,borderTopRightRadius:v,borderBottomRightRadius:v,borderBottomLeftRadius:v,width:v,maxWidth:v,height:v,maxHeight:v,top:v,right:v,bottom:v,left:v,inset:v,insetBlock:v,insetBlockStart:v,insetBlockEnd:v,insetInline:v,insetInlineStart:v,insetInlineEnd:v,padding:v,paddingTop:v,paddingRight:v,paddingBottom:v,paddingLeft:v,paddingBlock:v,paddingBlockStart:v,paddingBlockEnd:v,paddingInline:v,paddingInlineStart:v,paddingInlineEnd:v,margin:v,marginTop:v,marginRight:v,marginBottom:v,marginLeft:v,marginBlock:v,marginBlockStart:v,marginBlockEnd:v,marginInline:v,marginInlineStart:v,marginInlineEnd:v,fontSize:v,backgroundPositionX:v,backgroundPositionY:v,...us,zIndex:Ti,fillOpacity:Vt,strokeOpacity:Vt,numOctaves:Ti};var Rc={...Zt,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:eo,WebkitFilter:eo,mask:oo,WebkitMask:oo},er=i(t=>Rc[t],"getDefaultValueType");var Lc=new Set([eo,oo]);function or(t,e){let o=er(t);return Lc.has(o)||(o=K),o.getAnimatableNone?o.getAnimatableNone(e):void 0}i(or,"getAnimatableNone");var kc=new Set(["auto","none","0"]);function ms(t,e,o){let r=0,n;for(;r<t.length&&!n;){let a=t[r];typeof a=="string"&&!kc.has(a)&&Rt(a).values.length&&(n=t[r]),r++}if(n&&o)for(let a of e)t[a]=or(o,n)}i(ms,"makeNoneKeyframesAnimatable");var rr=class extends Bt{static{i(this,"DOMKeyframesResolver")}constructor(e,o,r,n,a){super(e,o,r,n,a,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:o,name:r}=this;if(!o||!o.current)return;super.readKeyframes();for(let m=0;m<e.length;m++){let f=e[m];if(typeof f=="string"&&(f=f.trim(),fe(f))){let p=xi(f,o.current);p!==void 0&&(e[m]=p),m===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!qo.has(r)||e.length!==2)return;let[n,a]=e,s=vi(n),l=vi(a),u=qr(n),c=qr(a);if(u!==c&&Pt[r]){this.needsMeasurement=!0;return}if(s!==l)if(li(s)&&li(l))for(let m=0;m<e.length;m++){let f=e[m];typeof f=="string"&&(e[m]=parseFloat(f))}else Pt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:o}=this,r=[];for(let n=0;n<e.length;n++)(e[n]===null||cs(e[n]))&&r.push(n);r.length&&ms(e,r,o)}measureInitialState(){let{element:e,unresolvedKeyframes:o,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Pt[r](e.measureViewportBox(),window.getComputedStyle(e.current)),o[0]=this.measuredOrigin;let n=o[o.length-1];n!==void 0&&e.getValue(r,n).jump(n,!1)}measureEndState(){let{element:e,name:o,unresolvedKeyframes:r}=this;if(!e||!e.current)return;let n=e.getValue(o);n&&n.jump(this.measuredOrigin,!1);let a=r.length-1,s=r[a];r[a]=Pt[o](e.measureViewportBox(),window.getComputedStyle(e.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}};var ro=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function ir(t,e,o){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let r=document;e&&(r=e.current);let n=o?.[t]??r.querySelectorAll(t);return n?Array.from(n):[]}return Array.from(t).filter(r=>r!=null)}i(ir,"resolveElements");var io=i((t,e)=>e&&typeof t=="number"?e.transform(t):t,"getValueAsType");function fs(t){return Ie(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}i(fs,"isHTMLElement");var{schedule:Jt,cancel:Bc}=Co(queueMicrotask,!1);var nt={x:!1,y:!1};function nr(){return nt.x||nt.y}i(nr,"isDragActive");function Vi(t){return t==="x"||t==="y"?nt[t]?null:(nt[t]=!0,()=>{nt[t]=!1}):nt.x||nt.y?null:(nt.x=nt.y=!0,()=>{nt.x=nt.y=!1})}i(Vi,"setDragLock");function sr(t,e){let o=ir(t),r=new AbortController,n={passive:!0,...e,signal:r.signal};return[o,n,i(()=>r.abort(),"cancel")]}i(sr,"setupGesture");function Ic(t){return!(t.pointerType==="touch"||nr())}i(Ic,"isValidHover");function Si(t,e,o={}){let[r,n,a]=sr(t,o);return r.forEach(s=>{let l=!1,u=!1,c,m=i(()=>{s.removeEventListener("pointerleave",h)},"removePointerLeave"),f=i(x=>{c&&(c(x),c=void 0),m()},"endHover"),p=i(x=>{l=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),u&&(u=!1,f(x))},"onPointerUp"),d=i(()=>{l=!0,window.addEventListener("pointerup",p,n),window.addEventListener("pointercancel",p,n)},"onPointerDown"),h=i(x=>{if(x.pointerType!=="touch"){if(l){u=!0;return}f(x)}},"onPointerLeave"),g=i(x=>{if(!Ic(x))return;u=!1;let y=e(s,x);typeof y=="function"&&(c=y,s.addEventListener("pointerleave",h,n))},"onPointerEnter");s.addEventListener("pointerenter",g,n),s.addEventListener("pointerdown",d,n)}),a}i(Si,"hover");var Pi=i((t,e)=>e?t===e?!0:Pi(t,e.parentElement):!1,"isNodeOrChild");var Qt=i(t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,"isPrimaryPointer");var Fc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function bi(t){return Fc.has(t.tagName)||t.isContentEditable===!0}i(bi,"isElementKeyboardAccessible");var Oc=new Set(["INPUT","SELECT","TEXTAREA"]);function wi(t){return Oc.has(t.tagName)||t.isContentEditable===!0}i(wi,"isElementTextInput");var Se=new WeakSet;function ps(t){return e=>{e.key==="Enter"&&t(e)}}i(ps,"filterEvents");function Ai(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}i(Ai,"firePointerEvent");var hs=i((t,e)=>{let o=t.currentTarget;if(!o)return;let r=ps(()=>{if(Se.has(o))return;Ai(o,"down");let n=ps(()=>{Ai(o,"up")}),a=i(()=>Ai(o,"cancel"),"handleBlur");o.addEventListener("keyup",n,e),o.addEventListener("blur",a,e)});o.addEventListener("keydown",r,e),o.addEventListener("blur",()=>o.removeEventListener("keydown",r),e)},"enableKeyboardPress");function ds(t){return Qt(t)&&!nr()}i(ds,"isValidPressEvent");var gs=new WeakSet;function Mi(t,e,o={}){let[r,n,a]=sr(t,o),s=i(l=>{let u=l.currentTarget;if(!ds(l)||gs.has(l))return;Se.add(u),o.stopPropagation&&gs.add(l);let c=e(u,l),m={...n,capture:!0},f=i((h,g)=>{window.removeEventListener("pointerup",p,m),window.removeEventListener("pointercancel",d,m),Se.has(u)&&Se.delete(u),ds(h)&&typeof c=="function"&&c(h,{success:g})},"onPointerEnd"),p=i(h=>{f(h,u===window||u===document||o.useGlobalTarget||Pi(u,h.target))},"onPointerUp"),d=i(h=>{f(h,!1)},"onPointerCancel");window.addEventListener("pointerup",p,m),window.addEventListener("pointercancel",d,m)},"startPress");return r.forEach(l=>{(o.useGlobalTarget?window:l).addEventListener("pointerdown",s,n),fs(l)&&(l.addEventListener("focus",c=>hs(c,n)),!bi(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}i(Mi,"press");function Pe(t){return Ie(t)&&"ownerSVGElement"in t}i(Pe,"isSVGElement");var ar=new WeakMap,lr,xs=i((t,e,o)=>(r,n)=>n&&n[0]?n[0][t+"Size"]:Pe(r)&&"getBBox"in r?r.getBBox()[e]:r[o],"getSize"),jc=xs("inline","width","offsetWidth"),Nc=xs("block","height","offsetHeight");function Gc({target:t,borderBoxSize:e}){ar.get(t)?.forEach(o=>{o(t,{get width(){return jc(t,e)},get height(){return Nc(t,e)}})})}i(Gc,"notifyTarget");function Wc(t){t.forEach(Gc)}i(Wc,"notifyAll");function Uc(){typeof ResizeObserver>"u"||(lr=new ResizeObserver(Wc))}i(Uc,"createResizeObserver");function ys(t,e){lr||Uc();let o=ir(t);return o.forEach(r=>{let n=ar.get(r);n||(n=new Set,ar.set(r,n)),n.add(e),lr?.observe(r)}),()=>{o.forEach(r=>{let n=ar.get(r);n?.delete(e),n?.size||lr?.unobserve(r)})}}i(ys,"resizeElement");var cr=new Set,be;function Kc(){be=i(()=>{let t={get width(){return window.innerWidth},get height(){return window.innerHeight}};cr.forEach(e=>e(t))},"windowResizeHandler"),window.addEventListener("resize",be)}i(Kc,"createWindowResizeHandler");function vs(t){return cr.add(t),be||Kc(),()=>{cr.delete(t),!cr.size&&typeof be=="function"&&(window.removeEventListener("resize",be),be=void 0)}}i(vs,"resizeWindow");function ur(t,e){return typeof t=="function"?vs(t):ys(t,e)}i(ur,"resize");var te={value:null,addProjectionMetrics:null};function Ts(t){return Pe(t)&&t.tagName==="svg"}i(Ts,"isSVGSVGElement");var zc=[...yi,R,K],Vs=i(t=>zc.find(tr(t)),"findValueType");var Ci=i(()=>({translate:0,scale:1,origin:0,originPoint:0}),"createAxisDelta"),It=i(()=>({x:Ci(),y:Ci()}),"createDelta"),Di=i(()=>({min:0,max:0}),"createAxis"),L=i(()=>({x:Di(),y:Di()}),"createBox");var Ss=new WeakMap;function bt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}i(bt,"isAnimationControls");function gt(t){return typeof t=="string"||Array.isArray(t)}i(gt,"isVariantLabel");var mr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],no=["initial",...mr];function Ft(t){return bt(t.animate)||no.some(e=>gt(t[e]))}i(Ft,"isControllingVariants");function so(t){return!!(Ft(t)||t.variants)}i(so,"isVariantNode");function Ps(t,e,o){for(let r in e){let n=e[r],a=o[r];if(C(n))t.addValue(r,n);else if(C(a))t.addValue(r,ct(n,{owner:t}));else if(a!==n)if(t.hasValue(r)){let s=t.getValue(r);s.liveStyle===!0?s.jump(n):s.hasAnimated||s.set(n)}else{let s=t.getStaticValue(r);t.addValue(r,ct(s!==void 0?s:n,{owner:t}))}}for(let r in o)e[r]===void 0&&t.removeValue(r);return e}i(Ps,"updateMotionValuesFromProps");var Ot={current:null},ee={current:!1};var Hc=typeof window<"u";function ao(){if(ee.current=!0,!!Hc)if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=i(()=>Ot.current=t.matches,"setReducedMotionPreferences");t.addEventListener("change",e),e()}else Ot.current=!1}i(ao,"initPrefersReducedMotion");var bs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],fr={};function co(t){fr=t}i(co,"setFeatureDefinitions");function Ei(){return fr}i(Ei,"getFeatureDefinitions");var lo=class{static{i(this,"VisualElement")}scrapeMotionValuesFromProps(e,o,r){return{}}constructor({parent:e,props:o,presenceContext:r,reducedMotionConfig:n,skipAnimations:a,blockInitialAnimation:s,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Bt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let d=B.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,w.render(this.render,!1,!0))};let{latestValues:c,renderState:m}=l;this.latestValues=c,this.baseTarget={...c},this.initialValues=o.initial?{...c}:{},this.renderState=m,this.parent=e,this.props=o,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=a,this.options=u,this.blockInitialAnimation=!!s,this.isControllingVariants=Ft(o),this.isVariantNode=so(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:f,...p}=this.scrapeMotionValuesFromProps(o,{},this);for(let d in p){let h=p[d];c[d]!==void 0&&C(h)&&h.set(c[d])}}mount(e){if(this.hasBeenMounted)for(let o in this.initialValues)this.values.get(o)?.jump(this.initialValues[o]),this.latestValues[o]=this.initialValues[o];this.current=e,Ss.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,r)=>this.bindToMotionValue(r,o)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ee.current||ao(),this.shouldReduceMotion=Ot.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),J(this.notifyUpdate),J(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let o=this.features[e];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,o){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),o.accelerate&&$o.has(e)&&this.current instanceof HTMLElement){let{factory:s,keyframes:l,times:u,ease:c,duration:m}=o.accelerate,f=new ye({element:this.current,name:e,keyframes:l,times:u,ease:c,duration:j(m)}),p=s(f);this.valueSubscriptions.set(e,()=>{p(),f.cancel()});return}let r=it.has(e);r&&this.onBindTransform&&this.onBindTransform();let n=o.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&w.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,o)),this.valueSubscriptions.set(e,()=>{n(),a&&a()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in fr){let o=fr[e];if(!o)continue;let{isEnabled:r,Feature:n}=o;if(!this.features[e]&&n&&r(this.props)&&(this.features[e]=new n(this)),this.features[e]){let a=this.features[e];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):L()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,o){this.latestValues[e]=o}update(e,o){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let r=0;r<bs.length;r++){let n=bs[r];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let a="on"+n,s=e[a];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=Ps(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let o=this.getClosestVariantNode();if(o)return o.variantChildren&&o.variantChildren.add(e),()=>o.variantChildren.delete(e)}addValue(e,o){let r=this.values.get(e);o!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,o),this.values.set(e,o),this.latestValues[e]=o.get())}removeValue(e){this.values.delete(e);let o=this.valueSubscriptions.get(e);o&&(o(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,o){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&o!==void 0&&(r=ct(o===null?void 0:o,{owner:this}),this.addValue(e,r)),r}readValue(e,o){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(Be(r)||Fe(r))?r=parseFloat(r):!Vs(r)&&K.test(o)&&(r=or(e,o)),this.setBaseTarget(e,C(r)?r.get():r)),C(r)?r.get():r}setBaseTarget(e,o){this.baseTarget[e]=o}getBaseTarget(e){let{initial:o}=this.props,r;if(typeof o=="string"||typeof o=="object"){let a=qt(this.props,o,this.presenceContext?.custom);a&&(r=a[e])}if(o&&r!==void 0)return r;let n=this.getBaseTargetFromProps(this.props,e);return n!==void 0&&!C(n)?n:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,o){return this.events[e]||(this.events[e]=new Tt),this.events[e].add(o)}notify(e,...o){this.events[e]&&this.events[e].notify(...o)}scheduleRenderMicrotask(){Jt.render(this.render)}};var we=class extends lo{static{i(this,"DOMVisualElement")}constructor(){super(...arguments),this.KeyframeResolver=rr}sortInstanceNodePosition(e,o){return e.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(e,o){let r=e.style;return r?r[o]:void 0}removeValueFromRenderState(e,{vars:o,style:r}){delete o[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;C(e)&&(this.childSubscription=e.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}};var z=class{static{i(this,"Feature")}constructor(e){this.isMounted=!1,this.node=e}update(){}};function uo({top:t,left:e,right:o,bottom:r}){return{x:{min:e,max:o},y:{min:t,max:r}}}i(uo,"convertBoundingBoxToBox");function Ri({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}i(Ri,"convertBoxToBoundingBox");function Li(t,e){if(!e)return t;let o=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:o.y,left:o.x,bottom:r.y,right:r.x}}i(Li,"transformBoxPoints");function ki(t){return t===void 0||t===1}i(ki,"isIdentityScale");function pr({scale:t,scaleX:e,scaleY:o}){return!ki(t)||!ki(e)||!ki(o)}i(pr,"hasScale");function wt(t){return pr(t)||Bi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}i(wt,"hasTransform");function Bi(t){return ws(t.x)||ws(t.y)}i(Bi,"has2DTranslate");function ws(t){return t&&t!=="0%"}i(ws,"is2DTranslate");function mo(t,e,o){let r=t-o,n=e*r;return o+n}i(mo,"scalePoint");function As(t,e,o,r,n){return n!==void 0&&(t=mo(t,n,r)),mo(t,o,r)+e}i(As,"applyPointDelta");function Ii(t,e=0,o=1,r,n){t.min=As(t.min,e,o,r,n),t.max=As(t.max,e,o,r,n)}i(Ii,"applyAxisDelta");function Fi(t,{x:e,y:o}){Ii(t.x,e.translate,e.scale,e.originPoint),Ii(t.y,o.translate,o.scale,o.originPoint)}i(Fi,"applyBoxDelta");var Ms=.999999999999,Cs=1.0000000000001;function Rs(t,e,o,r=!1){let n=o.length;if(!n)return;e.x=e.y=1;let a,s;for(let l=0;l<n;l++){a=o[l],s=a.projectionDelta;let{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(st(t.x,-a.scroll.offset.x),st(t.y,-a.scroll.offset.y)),s&&(e.x*=s.x.scale,e.y*=s.y.scale,Fi(t,s)),r&&wt(a.latestValues)&&fo(t,a.latestValues,a.layout?.layoutBox))}e.x<Cs&&e.x>Ms&&(e.x=1),e.y<Cs&&e.y>Ms&&(e.y=1)}i(Rs,"applyTreeDeltas");function st(t,e){t.min+=e,t.max+=e}i(st,"translateAxis");function Ds(t,e,o,r,n=.5){let a=A(t.min,t.max,n);Ii(t,e,o,a,r)}i(Ds,"transformAxis");function Es(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}i(Es,"resolveAxisTranslate");function fo(t,e,o){let r=o??t;Ds(t.x,Es(e.x,r.x),e.scaleX,e.scale,e.originX),Ds(t.y,Es(e.y,r.y),e.scaleY,e.scale,e.originY)}i(fo,"transformBox");function hr(t,e){return uo(Li(t.getBoundingClientRect(),e))}i(hr,"measureViewportBox");function Oi(t,e,o){let r=hr(t,o),{scroll:n}=e;return n&&(st(r.x,n.offset.x),st(r.y,n.offset.y)),r}i(Oi,"measurePageBox");var $c={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},_c=dt.length;function Ls(t,e,o){let r="",n=!0;for(let s=0;s<_c;s++){let l=dt[s],u=t[l];if(u===void 0)continue;let c=!0;if(typeof u=="number")c=u===(l.startsWith("scale")?1:0);else{let m=parseFloat(u);c=l.startsWith("scale")?m===1:m===0}if(!c||o){let m=io(u,Zt[l]);if(!c){n=!1;let f=$c[l]||l;r+=`${f}(${m}) `}o&&(e[l]=m)}}let a=t.pathRotation;return a&&(n=!1,r+=`rotate(${io(a,Zt.pathRotation)}) `),r=r.trim(),o?r=o(e,n?"":r):n&&(r="none"),r}i(Ls,"buildTransform");function oe(t,e,o){let{style:r,vars:n,transformOrigin:a}=t,s=!1,l=!1;for(let u in e){let c=e[u];if(it.has(u)){s=!0;continue}else if(Eo(u)){n[u]=c;continue}else{let m=io(c,Zt[u]);u.startsWith("origin")?(l=!0,a[u]=m):r[u]=m}}if(e.transform||(s||o?r.transform=Ls(e,t.transform,o):r.transform&&(r.transform="none")),l){let{originX:u="50%",originY:c="50%",originZ:m=0}=a;r.transformOrigin=`${u} ${c} ${m}`}}i(oe,"buildHTMLStyles");function dr(t,{style:e,vars:o},r,n){let a=t.style,s;for(s in e)a[s]=e[s];n?.applyProjectionStyles(a,r);for(s in o)a.setProperty(s,o[s])}i(dr,"renderHTML");function ks(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}i(ks,"pixelsToPercent");var Ae={correct:i((t,e)=>{if(!e.target)return t;if(typeof t=="string")if(v.test(t))t=parseFloat(t);else return t;let o=ks(t,e.target.x),r=ks(t,e.target.y);return`${o}% ${r}%`},"correct")};var Bs={correct:i((t,{treeScale:e,projectionDelta:o})=>{let r=t,n=K.parse(t);if(n.length>5)return r;let a=K.createTransformer(t),s=typeof n[0]!="number"?1:0,l=o.x.scale*e.x,u=o.y.scale*e.y;n[0+s]/=l,n[1+s]/=u;let c=A(l,u,.5);return typeof n[2+s]=="number"&&(n[2+s]/=c),typeof n[3+s]=="number"&&(n[3+s]/=c),a(n)},"correct")};var po={borderRadius:{...Ae,applyTo:[...ro]},borderTopLeftRadius:Ae,borderTopRightRadius:Ae,borderBottomLeftRadius:Ae,borderBottomRightRadius:Ae,boxShadow:Bs};function ho(t,{layout:e,layoutId:o}){return it.has(t)||t.startsWith("origin")||(e||o!==void 0)&&(!!po[t]||t==="opacity")}i(ho,"isForcedMotionValue");function re(t,e,o){let r=t.style,n=e?.style,a={};if(!r)return a;for(let s in r)(C(r[s])||n&&C(n[s])||ho(s,t)||o?.getValue(s)?.liveStyle!==void 0)&&(a[s]=r[s]);return a}i(re,"scrapeMotionValuesFromProps");function Yc(t){return window.getComputedStyle(t)}i(Yc,"getComputedStyle");var go=class extends we{static{i(this,"HTMLVisualElement")}constructor(){super(...arguments),this.type="html",this.renderInstance=dr}readValueFromInstance(e,o){if(it.has(o))return this.projection?.isProjecting?No(o):jn(e,o);{let r=Yc(e),n=(Eo(o)?r.getPropertyValue(o):r[o])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:o}){return hr(e,o)}build(e,o,r){oe(e,o,r.transformTemplate)}scrapeMotionValuesFromProps(e,o,r){return re(e,o,r)}};var Xc={offset:"stroke-dashoffset",array:"stroke-dasharray"},qc={offset:"strokeDashoffset",array:"strokeDasharray"};function Is(t,e,o=1,r=0,n=!0){t.pathLength=1;let a=n?Xc:qc;t[a.offset]=`${-r}`,t[a.array]=`${e} ${o}`}i(Is,"buildSVGPath");var Zc=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function xo(t,{attrX:e,attrY:o,attrScale:r,pathLength:n,pathSpacing:a=1,pathOffset:s=0,...l},u,c,m){if(oe(t,l,c),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:f,style:p}=t;f.transform&&(p.transform=f.transform,delete f.transform),(p.transform||f.transformOrigin)&&(p.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),p.transform&&(p.transformBox=m?.transformBox??"fill-box",delete f.transformBox);for(let d of Zc)f[d]!==void 0&&(p[d]=f[d],delete f[d]);e!==void 0&&(f.x=e),o!==void 0&&(f.y=o),r!==void 0&&(f.scale=r),n!==void 0&&Is(f,n,a,s,!1)}i(xo,"buildSVGAttrs");var gr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);var yo=i(t=>typeof t=="string"&&t.toLowerCase()==="svg","isSVGTag");function Fs(t,e,o,r){dr(t,e,void 0,r);for(let n in e.attrs)t.setAttribute(gr.has(n)?n:Ve(n),e.attrs[n])}i(Fs,"renderSVG");function vo(t,e,o){let r=re(t,e,o);for(let n in t)if(C(t[n])||C(e[n])){let a=dt.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[a]=t[n]}return r}i(vo,"scrapeMotionValuesFromProps");var To=class extends we{static{i(this,"SVGVisualElement")}constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=L}getBaseTargetFromProps(e,o){return e[o]}readValueFromInstance(e,o){if(it.has(o)){let r=er(o);return r&&r.default||0}return o=gr.has(o)?o:Ve(o),e.getAttribute(o)}scrapeMotionValuesFromProps(e,o,r){return vo(e,o,r)}build(e,o,r){xo(e,o,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,o,r,n){Fs(e,o,r,n)}mount(e){this.isSVGTag=yo(e.tagName),super.mount(e)}};var Jc=no.length;function ji(t){if(!t)return;if(!t.isControllingVariants){let o=t.parent?ji(t.parent)||{}:{};return t.props.initial!==void 0&&(o.initial=t.props.initial),o}let e={};for(let o=0;o<Jc;o++){let r=no[o],n=t.props[r];(gt(n)||n===!1)&&(e[r]=n)}return e}i(ji,"getVariantContext");function Ni(t,e){if(!Array.isArray(e))return!1;let o=e.length;if(o!==t.length)return!1;for(let r=0;r<o;r++)if(e[r]!==t[r])return!1;return!0}i(Ni,"shallowCompare");var Qc=[...mr].reverse(),tu=mr.length;function eu(t){return e=>Promise.all(e.map(({animation:o,options:r})=>as(t,o,r)))}i(eu,"createAnimateFunction");function Gi(t){let e=eu(t),o=Os(),r=!0,n=!1,a=i(c=>(m,f)=>{let p=Q(t,f,c==="exit"?t.presenceContext?.custom:void 0);if(p){let{transition:d,transitionEnd:h,...g}=p;m={...m,...g,...h}}return m},"buildResolvedTypeValues");function s(c){e=c(t)}i(s,"setAnimateFunction");function l(c){let{props:m}=t,f=ji(t.parent)||{},p=[],d=new Set,h={},g=1/0;for(let y=0;y<tu;y++){let V=Qc[y],T=o[V],S=m[V]!==void 0?m[V]:f[V],M=gt(S),E=V===c?T.isActive:null;E===!1&&(g=y);let D=S===f[V]&&S!==m[V]&&M;if(D&&(r||n)&&t.manuallyAnimateOnMount&&(D=!1),T.protectedKeys={...h},!T.isActive&&E===null||!S&&!T.prevProp||bt(S)||typeof S=="boolean")continue;if(V==="exit"&&T.isActive&&E!==!0){T.prevResolvedValues&&(h={...h,...T.prevResolvedValues});continue}let b=js(T.prevProp,S),$=b||V===c&&T.isActive&&!D&&M||y>g&&M,P=!1,N=Array.isArray(S)?S:[S],Z=N.reduce(a(V),{});E===!1&&(Z={});let{prevResolvedValues:Ut={}}=T,ut={...Ut,...Z},yt=i(_=>{$=!0,d.has(_)&&(P=!0,d.delete(_)),T.needsAnimating[_]=!0;let et=t.getValue(_);et&&(et.liveStyle=!1)},"markToAnimate");for(let _ in ut){let et=Z[_],Kt=Ut[_];if(h.hasOwnProperty(_))continue;let ue=!1;Qe(et)&&Qe(Kt)?ue=!Ni(et,Kt)||b:ue=et!==Kt,ue?et!=null?yt(_):d.add(_):et!==void 0&&d.has(_)?yt(_):T.protectedKeys[_]=!0}T.prevProp=S,T.prevResolvedValues=Z,T.isActive&&(h={...h,...Z}),(r||n)&&t.blockInitialAnimation&&($=!1);let mt=D&&b;$&&(!mt||P)&&p.push(...N.map(_=>{let et={type:V};if(typeof _=="string"&&(r||n)&&!mt&&t.manuallyAnimateOnMount&&t.parent){let{parent:Kt}=t,ue=Q(Kt,_);if(Kt.enteringChildren&&ue){let{delayChildren:Tl}=ue.transition||{};et.delay=Yo(Kt.enteringChildren,t,Tl)}}return{animation:_,options:et}}))}if(d.size){let y={};if(typeof m.initial!="boolean"){let V=Q(t,Array.isArray(m.initial)?m.initial[0]:m.initial);V&&V.transition&&(y.transition=V.transition)}d.forEach(V=>{let T=t.getBaseTarget(V),S=t.getValue(V);S&&(S.liveStyle=!0),y[V]=T??null}),p.push({animation:y})}let x=!!p.length;return r&&(m.initial===!1||m.initial===m.animate)&&!t.manuallyAnimateOnMount&&(x=!1),r=!1,n=!1,x?e(p):Promise.resolve()}i(l,"animateChanges");function u(c,m){if(o[c].isActive===m)return Promise.resolve();t.variantChildren?.forEach(p=>p.animationState?.setActive(c,m)),o[c].isActive=m;let f=l(c);for(let p in o)o[p].protectedKeys={};return f}return i(u,"setActive"),{animateChanges:l,setActive:u,setAnimateFunction:s,getState:i(()=>o,"getState"),reset:i(()=>{o=Os(),n=!0},"reset")}}i(Gi,"createAnimationState");function js(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ni(e,t):!1}i(js,"checkVariantsDidChange");function ie(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}i(ie,"createTypeState");function Os(){return{animate:ie(!0),whileInView:ie(),whileHover:ie(),whileTap:ie(),whileDrag:ie(),whileFocus:ie(),exit:ie()}}i(Os,"createState");function xr(t,e){t.min=e.min,t.max=e.max}i(xr,"copyAxisInto");function at(t,e){xr(t.x,e.x),xr(t.y,e.y)}i(at,"copyBoxInto");function Wi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}i(Wi,"copyAxisDeltaInto");var Ns=1e-4,ou=1-Ns,ru=1+Ns,Gs=.01,iu=0-Gs,nu=0+Gs;function W(t){return t.max-t.min}i(W,"calcLength");function Hi(t,e,o){return Math.abs(t-e)<=o}i(Hi,"isNear");function Ui(t,e,o,r=.5){t.origin=r,t.originPoint=A(e.min,e.max,t.origin),t.scale=W(o)/W(e),t.translate=A(o.min,o.max,t.origin)-t.originPoint,(t.scale>=ou&&t.scale<=ru||isNaN(t.scale))&&(t.scale=1),(t.translate>=iu&&t.translate<=nu||isNaN(t.translate))&&(t.translate=0)}i(Ui,"calcAxisDelta");function ne(t,e,o,r){Ui(t.x,e.x,o.x,r?r.originX:void 0),Ui(t.y,e.y,o.y,r?r.originY:void 0)}i(ne,"calcBoxDelta");function Ki(t,e,o,r=0){let n=r?A(o.min,o.max,r):o.min;t.min=n+e.min,t.max=t.min+W(e)}i(Ki,"calcRelativeAxis");function $i(t,e,o,r){Ki(t.x,e.x,o.x,r?.x),Ki(t.y,e.y,o.y,r?.y)}i($i,"calcRelativeBox");function zi(t,e,o,r=0){let n=r?A(o.min,o.max,r):o.min;t.min=e.min-n,t.max=t.min+W(e)}i(zi,"calcRelativeAxisPosition");function Me(t,e,o,r){zi(t.x,e.x,o.x,r?.x),zi(t.y,e.y,o.y,r?.y)}i(Me,"calcRelativePosition");function Ws(t,e,o,r,n){return t-=e,t=mo(t,1/o,r),n!==void 0&&(t=mo(t,1/n,r)),t}i(Ws,"removePointDelta");function su(t,e=0,o=1,r=.5,n,a=t,s=t){if(Y.test(e)&&(e=parseFloat(e),e=A(s.min,s.max,e/100)-s.min),typeof e!="number")return;let l=A(a.min,a.max,r);t===a&&(l-=e),t.min=Ws(t.min,e,o,l,n),t.max=Ws(t.max,e,o,l,n)}i(su,"removeAxisDelta");function Us(t,e,[o,r,n],a,s){su(t,e[o],e[r],e[n],e.scale,a,s)}i(Us,"removeAxisTransforms");var au=["x","scaleX","originX"],lu=["y","scaleY","originY"];function _i(t,e,o,r){Us(t.x,e,au,o?o.x:void 0,r?r.x:void 0),Us(t.y,e,lu,o?o.y:void 0,r?r.y:void 0)}i(_i,"removeBoxTransforms");function Ks(t){return t.translate===0&&t.scale===1}i(Ks,"isAxisDeltaZero");function Yi(t){return Ks(t.x)&&Ks(t.y)}i(Yi,"isDeltaZero");function zs(t,e){return t.min===e.min&&t.max===e.max}i(zs,"axisEquals");function $s(t,e){return zs(t.x,e.x)&&zs(t.y,e.y)}i($s,"boxEquals");function Hs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}i(Hs,"axisEqualsRounded");function Xi(t,e){return Hs(t.x,e.x)&&Hs(t.y,e.y)}i(Xi,"boxEqualsRounded");function qi(t){return W(t.x)/W(t.y)}i(qi,"aspectRatio");function Zi(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}i(Zi,"axisDeltaEquals");function tt(t){return[t("x"),t("y")]}i(tt,"eachAxis");function _s(t,e,o){let r="",n=t.x.translate/e.x,a=t.y.translate/e.y,s=o?.z||0;if((n||a||s)&&(r=`translate3d(${n}px, ${a}px, ${s}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),o){let{transformPerspective:c,rotate:m,pathRotation:f,rotateX:p,rotateY:d,skewX:h,skewY:g}=o;c&&(r=`perspective(${c}px) ${r}`),m&&(r+=`rotate(${m}deg) `),f&&(r+=`rotate(${f}deg) `),p&&(r+=`rotateX(${p}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),g&&(r+=`skewY(${g}deg) `)}let l=t.x.scale*e.x,u=t.y.scale*e.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}i(_s,"buildProjectionTransform");var cu=ro.length,Ys=i(t=>typeof t=="string"?parseFloat(t):t,"asNumber"),Xs=i(t=>typeof t=="number"||v.test(t),"isPx");function Zs(t,e,o,r,n,a){n?(t.opacity=A(0,o.opacity??1,uu(r)),t.opacityExit=A(e.opacity??1,0,mu(r))):a&&(t.opacity=A(e.opacity??1,o.opacity??1,r));for(let s=0;s<cu;s++){let l=ro[s],u=qs(e,l),c=qs(o,l);if(u===void 0&&c===void 0)continue;u||(u=0),c||(c=0),u===0||c===0||Xs(u)===Xs(c)?(t[l]=Math.max(A(Ys(u),Ys(c),r),0),(Y.test(c)||Y.test(u))&&(t[l]+="%")):t[l]=c}(e.rotate||o.rotate)&&(t.rotate=A(e.rotate||0,o.rotate||0,r))}i(Zs,"mixValues");function qs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}i(qs,"getRadius");var uu=Js(0,.5,Ue),mu=Js(.5,.95,k);function Js(t,e,o){return r=>r<t?0:r>e?1:o(ft(t,e,r))}i(Js,"compress");function Qs(t,e,o){let r=C(t)?t:ct(t);return r.start(Xt("",r,e,o)),r.animation}i(Qs,"animateSingleValue");function xt(t,e,o,r={passive:!0}){return t.addEventListener(e,o,r),()=>t.removeEventListener(e,o,r)}i(xt,"addDomEvent");var ta=i((t,e)=>t.depth-e.depth,"compareByDepth");var yr=class{static{i(this,"FlatTree")}constructor(){this.children=[],this.isDirty=!1}add(e){zt(this.children,e),this.isDirty=!0}remove(e){Mt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ta),this.isDirty=!1,this.children.forEach(e)}};function ea(t,e){let o=B.now(),r=i(({timestamp:n})=>{let a=n-o;a>=e&&(J(r),t(a-e))},"checkElapsed");return w.setup(r,!0),()=>J(r)}i(ea,"delay");function se(t){return C(t)?t.get():t}i(se,"resolveMotionValue");var vr=class{static{i(this,"NodeStack")}constructor(){this.members=[]}add(e){zt(this.members,e);for(let o=this.members.length-1;o>=0;o--){let r=this.members[o];if(r===e||r===this.lead||r===this.prevLead)continue;let n=r.instance;(!n||n.isConnected===!1)&&!r.snapshot&&(Mt(this.members,r),r.unmount())}e.scheduleRender()}remove(e){if(Mt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let o=this.members[this.members.length-1];o&&this.promote(o)}}relegate(e){for(let o=this.members.indexOf(e)-1;o>=0;o--){let r=this.members[o];if(r.isPresent!==!1&&r.instance?.isConnected!==!1)return this.promote(r),!0}return!1}promote(e,o){let r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();let{layoutDependency:n}=r.options,{layoutDependency:a}=e.options;(n===void 0||n!==a)&&(e.resumeFrom=r,o&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};var ae={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var le={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Ji=["","X","Y","Z"],fu=1e3,pu=0;function Qi(t,e,o,r){let{latestValues:n}=e;n[t]&&(o[t]=n[t],e.setStaticValue(t,0),r&&(r[t]=0))}i(Qi,"resetDistortingTransform");function ua(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:e}=t.options;if(!e)return;let o=Zo(e);if(window.MotionHasOptimisedAnimation(o,"transform")){let{layout:n,layoutId:a}=t.options;window.MotionCancelOptimisedAnimation(o,"transform",w,!(n||a))}let{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&ua(r)}i(ua,"cancelTreeOptimisedTransformAnimations");function Tr({attachResizeListener:t,defaultParent:e,measureScroll:o,checkIsScrollRoot:r,resetTransform:n}){return class{static{i(this,"ProjectionNode")}constructor(s={},l=e?.()){this.id=pu++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,te.value&&(le.nodes=le.calculatedTargetDeltas=le.calculatedProjections=0),this.nodes.forEach(gu),this.nodes.forEach(Su),this.nodes.forEach(Pu),this.nodes.forEach(xu),te.addProjectionMetrics&&te.addProjectionMetrics(le)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new yr)}addEventListener(s,l){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Tt),this.eventHandlers.get(s).add(l)}notifyListeners(s,...l){let u=this.eventHandlers.get(s);u&&u.notify(...l)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Pe(s)&&!Ts(s),this.instance=s;let{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||l)&&(this.isLayoutDirty=!0),t){let m,f=0,p=i(()=>this.root.updateBlockedByResize=!1,"resizeUnblockUpdate");w.read(()=>{f=window.innerWidth}),t(s,()=>{let d=window.innerWidth;d!==f&&(f=d,this.root.updateBlockedByResize=!0,m&&m(),m=ea(p,250),ae.hasAnimatedSinceResize&&(ae.hasAnimatedSinceResize=!1,this.nodes.forEach(ia)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let h=this.options.transition||c.getDefaultTransition()||Cu,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=c.getProps(),y=!this.targetLayout||!Xi(this.targetLayout,d),V=!f&&p;if(this.options.layoutRoot||this.resumeFrom||V||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let T={...ve(h,"layout"),onPlay:g,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(m,V,T.path)}else f||ia(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),J(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(bu),this.animationId++)}getTransformTemplate(){let{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ua(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){let f=this.path[m];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}let{layoutId:l,layout:u}=this.options;if(l===void 0&&!u)return;let c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(vu),this.nodes.forEach(oa);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ra);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Tu),this.nodes.forEach(Vu),this.nodes.forEach(hu),this.nodes.forEach(du)):this.nodes.forEach(ra),this.clearAllSnapshots();let l=B.now();O.delta=U(0,1e3/60,l-O.timestamp),O.timestamp=l,O.isProcessing=!0,_e.update.process(O),_e.preRender.process(O),_e.render.process(O),O.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Jt.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yu),this.sharedNodes.forEach(wu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,w.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){w.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!W(this.snapshot.measuredBox.x)&&!W(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();let s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=L()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(l=!1),l&&this.instance){let u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:u,offset:o(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!n)return;let s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Yi(this.projectionDelta),u=this.getTransformTemplate(),c=u?u(this.latestValues,""):void 0,m=c!==this.prevTransformTemplateValue;s&&this.instance&&(l||wt(this.latestValues)||m)&&(n(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){let l=this.measurePageBox(),u=this.removeElementScroll(l);return s&&(u=this.removeTransform(u)),Du(u),{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:s}=this.options;if(!s)return L();let l=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Eu))){let{scroll:c}=this.root;c&&(st(l.x,c.offset.x),st(l.y,c.offset.y))}return l}removeElementScroll(s){let l=L();if(at(l,s),this.scroll?.wasRoot)return l;for(let u=0;u<this.path.length;u++){let c=this.path[u],{scroll:m,options:f}=c;c!==this.root&&m&&f.layoutScroll&&(m.wasRoot&&at(l,s),st(l.x,m.offset.x),st(l.y,m.offset.y))}return l}applyTransform(s,l=!1,u){let c=u||L();at(c,s);for(let m=0;m<this.path.length;m++){let f=this.path[m];!l&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(st(c.x,-f.scroll.offset.x),st(c.y,-f.scroll.offset.y)),wt(f.latestValues)&&fo(c,f.latestValues,f.layout?.layoutBox)}return wt(this.latestValues)&&fo(c,this.latestValues,this.layout?.layoutBox),c}removeTransform(s){let l=L();at(l,s);for(let u=0;u<this.path.length;u++){let c=this.path[u];if(!wt(c.latestValues))continue;let m;c.instance&&(pr(c.latestValues)&&c.updateSnapshot(),m=L(),at(m,c.measurePageBox())),_i(l,c.latestValues,c.snapshot?.layoutBox,m)}return wt(this.latestValues)&&_i(l,this.latestValues),l}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==O.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){let l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);let u=!!this.resumingFrom||this!==l;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:m,layoutId:f}=this.options;if(!this.layout||!(m||f))return;this.resolvedRelativeTargetAt=O.timestamp;let p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=L(),this.targetWithTransforms=L()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),$i(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):at(this.target,this.layout.layoutBox),Fi(this.target,this.targetDelta)):at(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0),te.value&&le.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||pr(this.parent.latestValues)||Bi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,l,u){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),Me(this.relativeTargetOrigin,l,u,this.options.layoutAnchor||void 0),at(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let s=this.getLead(),l=!!this.resumingFrom||this!==s,u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===O.timestamp&&(u=!1),u)return;let{layout:c,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||m))return;at(this.layoutCorrected,this.layout.layoutBox);let f=this.treeScale.x,p=this.treeScale.y;Rs(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=L());let{target:d}=s;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Wi(this.prevProjectionDelta.x,this.projectionDelta.x),Wi(this.prevProjectionDelta.y,this.projectionDelta.y)),ne(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Zi(this.projectionDelta.x,this.prevProjectionDelta.x)||!Zi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d)),te.value&&le.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){let l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=It(),this.projectionDelta=It(),this.projectionDeltaWithTransform=It()}setAnimationOrigin(s,l=!1,u){let c=this.snapshot,m=c?c.latestValues:{},f={...this.latestValues},p=It();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;let d=L(),h=c?c.source:void 0,g=this.layout?this.layout.source:void 0,x=h!==g,y=this.getStack(),V=!y||y.members.length<=1,T=!!(x&&!V&&this.options.crossfade===!0&&!this.path.some(Mu));this.animationProgress=0;let S,M=u?.interpolateProjection(s);this.mixTargetDelta=E=>{let D=E/1e3,b=M?.(D);b?(p.x.translate=b.x,p.x.scale=A(s.x.scale,1,D),p.x.origin=s.x.origin,p.x.originPoint=s.x.originPoint,p.y.translate=b.y,p.y.scale=A(s.y.scale,1,D),p.y.origin=s.y.origin,p.y.originPoint=s.y.originPoint):(na(p.x,s.x,D),na(p.y,s.y,D)),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Me(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Au(this.relativeTarget,this.relativeTargetOrigin,d,D),S&&$s(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=L()),at(S,this.relativeTarget)),x&&(this.animationValues=f,Zs(f,m,this.latestValues,D,T,V)),b&&b.rotate!==void 0&&(this.animationValues||(this.animationValues=f),this.animationValues.pathRotation=b.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=D},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(J(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=w.update(()=>{ae.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ct(0)),this.motionValue.jump(0,!1),this.currentAnimation=Qs(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:i(l=>{this.mixTargetDelta(l),s.onUpdate&&s.onUpdate(l)},"onUpdate"),onComplete:i(()=>{s.onComplete&&s.onComplete(),this.completeAnimation()},"onComplete")}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let s=this.getLead(),{targetWithTransforms:l,target:u,layout:c,latestValues:m}=s;if(!(!l||!u||!c)){if(this!==s&&this.layout&&c&&ma(this.options.animationType,this.layout.layoutBox,c.layoutBox)){u=this.target||L();let f=W(this.layout.layoutBox.x);u.x.min=s.target.x.min,u.x.max=u.x.min+f;let p=W(this.layout.layoutBox.y);u.y.min=s.target.y.min,u.y.max=u.y.min+p}at(l,u),fo(l,m),ne(this.projectionDeltaWithTransform,this.layoutCorrected,l,m)}}registerSharedNode(s,l){this.sharedNodes.has(s)||this.sharedNodes.set(s,new vr),this.sharedNodes.get(s).add(l);let c=l.options.initialPromotionConfig;l.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(l):void 0})}isLead(){let s=this.getStack();return s?s.lead===this:!0}getLead(){let{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:l,preserveFollowOpacity:u}={}){let c=this.getStack();c&&c.promote(this,u),s&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){let s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){let{visualElement:s}=this.options;if(!s)return;let l=!1,{latestValues:u}=s;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=!0),!l)return;let c={};u.z&&Qi("z",s,c,this.animationValues);for(let m=0;m<Ji.length;m++)Qi(`rotate${Ji[m]}`,s,c,this.animationValues),Qi(`skew${Ji[m]}`,s,c,this.animationValues);s.render();for(let m in c)s.setStaticValue(m,c[m]),this.animationValues&&(this.animationValues[m]=c[m]);s.scheduleRender()}applyProjectionStyles(s,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}let u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=se(l?.pointerEvents)||"",s.transform=u?u(this.latestValues,""):"none";return}let c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=se(l?.pointerEvents)||""),this.hasProjected&&!wt(this.latestValues)&&(s.transform=u?u({},""):"none",this.hasProjected=!1);return}s.visibility="";let m=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=_s(this.projectionDeltaWithTransform,this.treeScale,m);u&&(f=u(m,f)),s.transform=f;let{x:p,y:d}=this.projectionDelta;s.transformOrigin=`${p.origin*100}% ${d.origin*100}% 0`,c.animationValues?s.opacity=c===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:s.opacity=c===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(let h in po){if(m[h]===void 0)continue;let{correct:g,applyTo:x,isCSSVariable:y}=po[h],V=f==="none"?m[h]:g(m[h],c);if(x){let T=x.length;for(let S=0;S<T;S++)s[x[S]]=V}else y?this.options.visualElement.renderState.vars[h]=V:s[h]=V}this.options.layoutId&&(s.pointerEvents=c===this?se(l?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(oa),this.root.sharedNodes.clear()}}}i(Tr,"createProjectionNode");function hu(t){t.updateLayout()}i(hu,"updateLayout");function du(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:o,measuredBox:r}=t.layout,{animationType:n}=t.options,a=e.source!==t.layout.source;if(n==="size")tt(m=>{let f=a?e.measuredBox[m]:e.layoutBox[m],p=W(f);f.min=o[m].min,f.max=f.min+p});else if(n==="x"||n==="y"){let m=n==="x"?"y":"x";xr(a?e.measuredBox[m]:e.layoutBox[m],o[m])}else ma(n,e.layoutBox,o)&&tt(m=>{let f=a?e.measuredBox[m]:e.layoutBox[m],p=W(o[m]);f.max=f.min+p,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[m].max=t.relativeTarget[m].min+p)});let s=It();ne(s,o,e.layoutBox);let l=It();a?ne(l,t.applyTransform(r,!0),e.measuredBox):ne(l,o,e.layoutBox);let u=!Yi(s),c=!1;if(!t.resumeFrom){let m=t.getClosestProjectingParent();if(m&&!m.resumeFrom){let{snapshot:f,layout:p}=m;if(f&&p){let d=t.options.layoutAnchor||void 0,h=L();Me(h,e.layoutBox,f.layoutBox,d);let g=L();Me(g,o,p.layoutBox,d),Xi(h,g)||(c=!0),m.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=h,t.relativeParent=m)}}}t.notifyListeners("didUpdate",{layout:o,snapshot:e,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){let{onExitComplete:o}=t.options;o&&o()}t.options.transition=void 0}i(du,"notifyLayoutUpdate");function gu(t){te.value&&le.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}i(gu,"propagateDirtyNodes");function xu(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}i(xu,"cleanDirtyNodes");function yu(t){t.clearSnapshot()}i(yu,"clearSnapshot");function oa(t){t.clearMeasurements()}i(oa,"clearMeasurements");function vu(t){t.isLayoutDirty=!0,t.updateLayout()}i(vu,"forceLayoutMeasure");function ra(t){t.isLayoutDirty=!1}i(ra,"clearIsLayoutDirty");function Tu(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}i(Tu,"ensureDraggedNodesSnapshotted");function Vu(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}i(Vu,"resetTransformStyle");function ia(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}i(ia,"finishAnimation");function Su(t){t.resolveTargetDelta()}i(Su,"resolveTargetDelta");function Pu(t){t.calcProjection()}i(Pu,"calcProjection");function bu(t){t.resetSkewAndRotation()}i(bu,"resetSkewAndRotation");function wu(t){t.removeLeadSnapshot()}i(wu,"removeLeadSnapshots");function na(t,e,o){t.translate=A(e.translate,0,o),t.scale=A(e.scale,1,o),t.origin=e.origin,t.originPoint=e.originPoint}i(na,"mixAxisDeltaLinear");function sa(t,e,o,r){t.min=A(e.min,o.min,r),t.max=A(e.max,o.max,r)}i(sa,"mixAxis");function Au(t,e,o,r){sa(t.x,e.x,o.x,r),sa(t.y,e.y,o.y,r)}i(Au,"mixBox");function Mu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}i(Mu,"hasOpacityCrossfade");var Cu={duration:.45,ease:[.4,0,.1,1]},aa=i(t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),"userAgentContains"),la=aa("applewebkit/")&&!aa("chrome/")?Math.round:k;function ca(t){t.min=la(t.min),t.max=la(t.max)}i(ca,"roundAxis");function Du(t){ca(t.x),ca(t.y)}i(Du,"roundBox");function ma(t,e,o){return t==="position"||t==="preserve-aspect"&&!Hi(qi(e),qi(o),.2)}i(ma,"shouldAnimatePositionOnly");function Eu(t){return t!==t.root&&t.scroll?.wasRoot}i(Eu,"checkNodeWasScrollRoot");var fa=Tr({attachResizeListener:i((t,e)=>xt(t,"resize",e),"attachResizeListener"),measureScroll:i(()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),"measureScroll"),checkIsScrollRoot:i(()=>!0,"checkIsScrollRoot")});var Vr={current:void 0},Vo=Tr({measureScroll:i(t=>({x:t.scrollLeft,y:t.scrollTop}),"measureScroll"),defaultParent:i(()=>{if(!Vr.current){let t=new fa({});t.mount(window),t.setOptions({layoutScroll:!0}),Vr.current=t}return Vr.current},"defaultParent"),resetTransform:i((t,e)=>{t.style.transform=e!==void 0?e:"none"},"resetTransform"),checkIsScrollRoot:i(t=>window.getComputedStyle(t).position==="fixed","checkIsScrollRoot")});var pa=F(G(),1);function Ru(){!ee.current&&ao();let[t]=(0,pa.useState)(Ot.current);return t}i(Ru,"useReducedMotion");var ha=F(G(),1),Sr=(0,ha.createContext)({});var da=F(G(),1);function ga(t){let e=(0,da.useRef)(null);return e.current===null&&(e.current=t()),e.current}i(ga,"useConstant");var Pr=F(G(),1);var xa=typeof window<"u";var ya=xa?Pr.useLayoutEffect:Pr.useEffect;var va=F(G(),1),Ce=(0,va.createContext)(null);var Ta=F(G(),1);var br=(0,Ta.createContext)({transformPagePoint:i(t=>t,"transformPagePoint"),isStatic:!1,reducedMotion:"never"});var jt=F(G(),1);function Va(t=!0){let e=(0,jt.useContext)(Ce);if(e===null)return[!0,null];let{isPresent:o,onExitComplete:r,register:n}=e,a=(0,jt.useId)();(0,jt.useEffect)(()=>{if(t)return n(a)},[t]);let s=(0,jt.useCallback)(()=>t&&r&&r(a),[a,r,t]);return!o&&r?[!1,s]:[!0]}i(Va,"usePresence");var Sa=F(G(),1),wr=(0,Sa.createContext)({strict:!1});var Pa={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ba=!1;function Lu(){if(ba)return;let t={};for(let e in Pa)t[e]={isEnabled:i(o=>Pa[e].some(r=>!!o[r]),"isEnabled")};co(t),ba=!0}i(Lu,"initFeatureDefinitions");function Ar(){return Lu(),Ei()}i(Ar,"getInitializedFeatureDefinitions");function wa(t){let e=Ar();for(let o in t)e[o]={...e[o],...t[o]};co(e)}i(wa,"loadFeatures");var ku=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function So(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ku.has(t)}i(So,"isValidMotionProp");var Aa=i(t=>!So(t),"shouldForward");function Bu(t){typeof t=="function"&&(Aa=i(e=>e.startsWith("on")?!So(e):t(e),"shouldForward"))}i(Bu,"loadExternalIsValidProp");try{Bu(un("@emotion/is-prop-valid").default)}catch{}function Ma(t,e,o){let r={};for(let n in t)n==="values"&&typeof t.values=="object"||C(t[n])||(Aa(n)||o===!0&&So(n)||!e&&!So(n)||t.draggable&&n.startsWith("onDrag"))&&(r[n]=t[n]);return r}i(Ma,"filterProps");var Rr=F(mn(),1);var Le=F(G(),1);var Ca=F(G(),1),Nt=(0,Ca.createContext)({});var Mr=F(G(),1);function Da(t,e){if(Ft(t)){let{initial:o,animate:r}=t;return{initial:o===!1||gt(o)?o:void 0,animate:gt(r)?r:void 0}}return t.inherit!==!1?e:{}}i(Da,"getCurrentTreeVariants");function Ra(t){let{initial:e,animate:o}=Da(t,(0,Mr.useContext)(Nt));return(0,Mr.useMemo)(()=>({initial:e,animate:o}),[Ea(e),Ea(o)])}i(Ra,"useCreateMotionContext");function Ea(t){return Array.isArray(t)?t.join(" "):t}i(Ea,"variantLabelsAsDependency");var Re=F(G(),1);var La=F(G(),1);var De=i(()=>({style:{},transform:{},transformOrigin:{},vars:{}}),"createHtmlRenderState");function tn(t,e,o){for(let r in e)!C(e[r])&&!ho(r,o)&&(t[r]=e[r])}i(tn,"copyRawValuesOnly");function Iu({transformTemplate:t},e){return(0,La.useMemo)(()=>{let o=De();return oe(o,e,t),Object.assign({},o.vars,o.style)},[e])}i(Iu,"useInitialMotionValues");function Fu(t,e){let o=t.style||{},r={};return tn(r,o,t),Object.assign(r,Iu(t,e)),r}i(Fu,"useStyle");function ka(t,e){let o={},r=Fu(t,e);return t.drag&&t.dragListener!==!1&&(o.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(o.tabIndex=0),o.style=r,o}i(ka,"useHTMLProps");var Ba=F(G(),1);var Cr=i(()=>({...De(),attrs:{}}),"createSvgRenderState");function Ia(t,e,o,r){let n=(0,Ba.useMemo)(()=>{let a=Cr();return xo(a,e,yo(r),t.transformTemplate,t.style),{...a.attrs,style:{...a.style}}},[e]);if(t.style){let a={};tn(a,t.style,t),n.style={...a,...n.style}}return n}i(Ia,"useSVGProps");var Fa=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ee(t){return typeof t!="string"||t.includes("-")?!1:!!(Fa.indexOf(t)>-1||/[A-Z]/u.test(t))}i(Ee,"isSVGComponent");function Oa(t,e,o,{latestValues:r},n,a=!1,s){let u=(s??Ee(t)?Ia:ka)(e,r,n,t),c=Ma(e,typeof t=="string",a),m=t!==Re.Fragment?{...c,...u,ref:o}:{},{children:f}=e,p=(0,Re.useMemo)(()=>C(f)?f.get():f,[f]);return(0,Re.createElement)(t,{...m,children:p})}i(Oa,"useRender");var en=F(G(),1);function Ou({scrapeMotionValuesFromProps:t,createRenderState:e},o,r,n){return{latestValues:ju(o,r,n,t),renderState:e()}}i(Ou,"makeState");function ju(t,e,o,r){let n={},a=r(t,{});for(let p in a)n[p]=se(a[p]);let{initial:s,animate:l}=t,u=Ft(t),c=so(t);e&&c&&!u&&t.inherit!==!1&&(s===void 0&&(s=e.initial),l===void 0&&(l=e.animate));let m=o?o.initial===!1:!1;m=m||s===!1;let f=m?l:s;if(f&&typeof f!="boolean"&&!bt(f)){let p=Array.isArray(f)?f:[f];for(let d=0;d<p.length;d++){let h=qt(t,p[d]);if(h){let{transitionEnd:g,transition:x,...y}=h;for(let V in y){let T=y[V];if(Array.isArray(T)){let S=m?T.length-1:0;T=T[S]}T!==null&&(n[V]=T)}for(let V in g)n[V]=g[V]}}}return n}i(ju,"makeLatestValues");var Dr=i(t=>(e,o)=>{let r=(0,en.useContext)(Nt),n=(0,en.useContext)(Ce),a=i(()=>Ou(t,e,r,n),"make");return o?a():ga(a)},"makeUseVisualState");var ja=Dr({scrapeMotionValuesFromProps:re,createRenderState:De});var Na=Dr({scrapeMotionValuesFromProps:vo,createRenderState:Cr});var Ga=Symbol.for("motionComponentSymbol");var ce=F(G(),1);function Wa(t,e,o){let r=(0,ce.useRef)(o);(0,ce.useInsertionEffect)(()=>{r.current=o});let n=(0,ce.useRef)(null);return(0,ce.useCallback)(a=>{a&&t.onMount?.(a),e&&(a?e.mount(a):e.unmount());let s=r.current;if(typeof s=="function")if(a){let l=s(a);typeof l=="function"&&(n.current=l)}else n.current?(n.current(),n.current=null):s(a);else s&&(s.current=a)},[e])}i(Wa,"useMotionRef");var q=F(G(),1);var Ua=F(G(),1),Er=(0,Ua.createContext)({});function Gt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}i(Gt,"isRefObject");function Ka(t,e,o,r,n,a){let{visualElement:s}=(0,q.useContext)(Nt),l=(0,q.useContext)(wr),u=(0,q.useContext)(Ce),c=(0,q.useContext)(br),m=c.reducedMotion,f=c.skipAnimations,p=(0,q.useRef)(null),d=(0,q.useRef)(!1);r=r||l.renderer,!p.current&&r&&(p.current=r(t,{visualState:e,parent:s,props:o,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:m,skipAnimations:f,isSVG:a}),d.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let h=p.current,g=(0,q.useContext)(Er);h&&!h.projection&&n&&(h.type==="html"||h.type==="svg")&&Nu(p.current,o,n,g);let x=(0,q.useRef)(!1);(0,q.useInsertionEffect)(()=>{h&&x.current&&h.update(o,u)});let y=o[to],V=(0,q.useRef)(!!y&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return ya(()=>{d.current=!0,h&&(x.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),V.current&&h.animationState&&h.animationState.animateChanges())}),(0,q.useEffect)(()=>{h&&(!V.current&&h.animationState&&h.animationState.animateChanges(),V.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),V.current=!1),h.enteringChildren=void 0)}),h}i(Ka,"useVisualElement");function Nu(t,e,o,r){let{layoutId:n,layout:a,drag:s,dragConstraints:l,layoutScroll:u,layoutRoot:c,layoutAnchor:m,layoutCrossfade:f}=e;t.projection=new o(t.latestValues,e["data-framer-portal-id"]?void 0:za(t.parent)),t.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!s||l&&Gt(l),visualElement:t,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:u,layoutRoot:c,layoutAnchor:m})}i(Nu,"createProjectionNode");function za(t){if(t)return t.options.allowProjection!==!1?t.projection:za(t.parent)}i(za,"getClosestProjectingNode");function Lr(t,{forwardMotionProps:e=!1,type:o}={},r,n){r&&wa(r);let a=o?o==="svg":Ee(t),s=a?Na:ja;function l(c,m){let f,p={...(0,Le.useContext)(br),...c,layoutId:Gu(c)},{isStatic:d}=p,h=Ra(c),g=s(c,d);if(!d&&typeof window<"u"){Wu(p,r);let x=Uu(p);f=x.MeasureLayout,h.visualElement=Ka(t,g,p,n,x.ProjectionNode,a)}return(0,Rr.jsxs)(Nt.Provider,{value:h,children:[f&&h.visualElement?(0,Rr.jsx)(f,{visualElement:h.visualElement,...p}):null,Oa(t,c,Wa(g,h.visualElement,m),g,d,e,a)]})}i(l,"MotionDOMComponent"),l.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;let u=(0,Le.forwardRef)(l);return u[Ga]=t,u}i(Lr,"createMotionComponent");function Gu({layoutId:t}){let e=(0,Le.useContext)(Sr).id;return e&&t!==void 0?e+"-"+t:t}i(Gu,"useLayoutId");function Wu(t,e){let o=(0,Le.useContext)(wr).strict}i(Wu,"useStrictMode");function Uu(t){let e=Ar(),{drag:o,layout:r}=e;if(!o&&!r)return{};let n={...o,...r};return{MeasureLayout:o?.isEnabled(t)||r?.isEnabled(t)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}i(Uu,"getProjectionFunctionality");function Ha(t,e){if(typeof Proxy>"u")return Lr;let o=new Map,r=i((a,s)=>Lr(a,s,t,e),"factory"),n=i((a,s)=>r(a,s),"deprecatedFactoryFunction");return new Proxy(n,{get:i((a,s)=>s==="create"?r:(o.has(s)||o.set(s,Lr(s,void 0,t,e)),o.get(s)),"get")})}i(Ha,"createMotionProxy");var $a=F(G(),1);var _a=i((t,e)=>e.isSVG??Ee(t)?new To(e):new go(e,{allowProjection:t!==$a.Fragment}),"createDomVisualElement");var kr=class extends z{static{i(this,"AnimationFeature")}constructor(e){super(e),e.animationState||(e.animationState=Gi(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();bt(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:o}=this.node.prevProps||{};e!==o&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};var Ku=0,Br=class extends z{static{i(this,"ExitAnimationFeature")}constructor(){super(...arguments),this.id=Ku++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:o}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;if(e&&r===!1){if(this.isExitComplete){let{initial:a,custom:s}=this.node.getProps();if(typeof a=="string"||typeof a=="object"&&a!==null&&!Array.isArray(a)){let l=Q(this.node,a,s);if(l){let{transition:u,transitionEnd:c,...m}=l;for(let f in m)this.node.getValue(f)?.jump(m[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let n=this.node.animationState.setActive("exit",!e);o&&!e&&n.then(()=>{this.isExitComplete=!0,o(this.id)})}mount(){let{register:e,onExitComplete:o}=this.node.presenceContext||{};o&&o(this.id),e&&(this.unmount=e(this.id))}unmount(){}};var Ya={animation:{Feature:kr},exit:{Feature:Br}};function At(t){return{point:{x:t.pageX,y:t.pageY}}}i(At,"extractEventInfo");var Xa=i(t=>e=>Qt(e)&&t(e,At(e)),"addPointerInfo");function Wt(t,e,o,r){return xt(t,e,Xa(o),r)}i(Wt,"addPointerEvent");var Ir=i(({current:t})=>t?t.ownerDocument.defaultView:null,"getContextWindow");var qa=i((t,e)=>Math.abs(t-e),"distance");function Za(t,e){let o=qa(t.x,e.x),r=qa(t.y,e.y);return Math.sqrt(o**2+r**2)}i(Za,"distance2D");var Ja=new Set(["auto","scroll"]),ke=class{static{i(this,"PanSession")}constructor(e,o,{transformPagePoint:r,contextWindow:n=window,dragSnapToOrigin:a=!1,distanceThreshold:s=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Fr(this.lastRawMoveEventInfo,this.transformPagePoint));let h=on(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,x=Za(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!x)return;let{point:y}=h,{timestamp:V}=O;this.history.push({...y,timestamp:V});let{onStart:T,onMove:S}=this.handlers;g||(T&&T(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,h)},this.handlePointerMove=(h,g)=>{this.lastMoveEvent=h,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Fr(g,this.transformPagePoint),w.update(this.updatePoint,!0)},this.handlePointerUp=(h,g)=>{this.end();let{onEnd:x,onSessionEnd:y,resumeAnimation:V}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&V&&V(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let T=on(h.type==="pointercancel"?this.lastMoveEventInfo:Fr(g,this.transformPagePoint),this.history);this.startEvent&&x&&x(h,T),y&&y(h,T)},!Qt(e))return;this.dragSnapToOrigin=a,this.handlers=o,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=n||window;let u=At(e),c=Fr(u,this.transformPagePoint),{point:m}=c,{timestamp:f}=O;this.history=[{...m,timestamp:f}];let{onSessionStart:p}=o;p&&p(e,on(c,this.history));let d={passive:!0,capture:!0};this.removeListeners=lt(Wt(this.contextWindow,"pointermove",this.handlePointerMove,d),Wt(this.contextWindow,"pointerup",this.handlePointerUp,d),Wt(this.contextWindow,"pointercancel",this.handlePointerUp,d)),l&&this.startScrollTracking(l)}startScrollTracking(e){let o=e.parentElement;for(;o;){let r=getComputedStyle(o);(Ja.has(r.overflowX)||Ja.has(r.overflowY))&&this.scrollPositions.set(o,{x:o.scrollLeft,y:o.scrollTop}),o=o.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){let o=this.scrollPositions.get(e);if(!o)return;let r=e===window,n=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},a={x:n.x-o.x,y:n.y-o.y};a.x===0&&a.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(e,n),w.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),J(this.updatePoint)}};function Fr(t,e){return e?{point:e(t.point)}:t}i(Fr,"transformPoint");function Qa(t,e){return{x:t.x-e.x,y:t.y-e.y}}i(Qa,"subtractPoint");function on({point:t},e){return{point:t,delta:Qa(t,tl(e)),offset:Qa(t,zu(e)),velocity:Hu(e,.1)}}i(on,"getPanInfo");function zu(t){return t[0]}i(zu,"startDevicePoint");function tl(t){return t[t.length-1]}i(tl,"lastDevicePoint");function Hu(t,e){if(t.length<2)return{x:0,y:0};let o=t.length-1,r=null,n=tl(t);for(;o>=0&&(r=t[o],!(n.timestamp-r.timestamp>j(e)));)o--;if(!r)return{x:0,y:0};r===t[0]&&t.length>2&&n.timestamp-r.timestamp>j(e)*2&&(r=t[1]);let a=H(n.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let s={x:(n.x-r.x)/a,y:(n.y-r.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}i(Hu,"getVelocity");function nl(t,{min:e,max:o},r){return e!==void 0&&t<e?t=r?A(e,t,r.min):Math.max(t,e):o!==void 0&&t>o&&(t=r?A(o,t,r.max):Math.min(t,o)),t}i(nl,"applyConstraints");function el(t,e,o){return{min:e!==void 0?t.min+e:void 0,max:o!==void 0?t.max+o-(t.max-t.min):void 0}}i(el,"calcRelativeAxisConstraints");function sl(t,{top:e,left:o,bottom:r,right:n}){return{x:el(t.x,o,n),y:el(t.y,e,r)}}i(sl,"calcRelativeConstraints");function ol(t,e){let o=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([o,r]=[r,o]),{min:o,max:r}}i(ol,"calcViewportAxisConstraints");function al(t,e){return{x:ol(t.x,e.x),y:ol(t.y,e.y)}}i(al,"calcViewportConstraints");function ll(t,e){let o=.5,r=W(t),n=W(e);return n>r?o=ft(e.min,e.max-r,t.min):r>n&&(o=ft(t.min,t.max-n,e.min)),U(0,1,o)}i(ll,"calcOrigin");function cl(t,e){let o={};return e.min!==void 0&&(o.min=e.min-t.min),e.max!==void 0&&(o.max=e.max-t.min),o}i(cl,"rebaseAxisConstraints");var Or=.35;function ul(t=Or){return t===!1?t=0:t===!0&&(t=Or),{x:rl(t,"left","right"),y:rl(t,"top","bottom")}}i(ul,"resolveDragElastic");function rl(t,e,o){return{min:il(t,e),max:il(t,o)}}i(rl,"resolveAxisElastic");function il(t,e){return typeof t=="number"?t:t[e]||0}i(il,"resolvePointElastic");var $u=new WeakMap,Nr=class{static{i(this,"VisualElementDragControls")}constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=L(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:o=!1,distanceThreshold:r}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let a=i(f=>{o&&this.snapToCursor(At(f).point),this.stopAnimation()},"onSessionStart"),s=i((f,p)=>{let{drag:d,dragPropagation:h,onDragStart:g}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Vi(d),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tt(y=>{let V=this.getAxisMotionValue(y).get()||0;if(Y.test(V)){let{projection:T}=this.visualElement;if(T&&T.layout){let S=T.layout.layoutBox[y];S&&(V=W(S)*(parseFloat(V)/100))}}this.originPoint[y]=V}),g&&w.update(()=>g(f,p),!1,!0),Te(this.visualElement,"transform");let{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},"onStart"),l=i((f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p;let{dragPropagation:d,dragDirectionLock:h,onDirectionLock:g,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;let{offset:y}=p;if(h&&this.currentDirection===null){this.currentDirection=Yu(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",p.point,y),this.updateAxis("y",p.point,y),this.visualElement.render(),x&&w.update(()=>x(f,p),!1,!0)},"onMove"),u=i((f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p,this.stop(f,p),this.latestPointerEvent=null,this.latestPanInfo=null},"onSessionEnd"),c=i(()=>{let{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},"resumeAnimation"),{dragSnapToOrigin:m}=this.getProps();this.panSession=new ke(e,{onSessionStart:a,onStart:s,onMove:l,onSessionEnd:u,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:Ir(this.visualElement),element:this.visualElement.current})}stop(e,o){let r=e||this.latestPointerEvent,n=o||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!n||!r)return;let{velocity:s}=n;this.startAnimation(s);let{onDragEnd:l}=this.getProps();l&&w.postRender(()=>l(r,n))}cancel(){this.isDragging=!1;let{projection:e,animationState:o}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,o,r){let{drag:n}=this.getProps();if(!r||!jr(e,n,this.currentDirection))return;let a=this.getAxisMotionValue(e),s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=nl(s,this.constraints[e],this.elastic[e])),a.set(s)}resolveConstraints(){let{dragConstraints:e,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;e&&Gt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=sl(r.layoutBox,e):this.constraints=!1,this.elastic=ul(o),n!==this.constraints&&!Gt(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&tt(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=cl(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:o}=this.getProps();if(!e||!Gt(e))return!1;let r=e.current;ot(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:n}=this.visualElement;if(!n||!n.layout)return!1;n.root&&(n.root.scroll=void 0,n.root.updateScroll());let a=Oi(r,n.root,this.visualElement.getTransformPagePoint()),s=al(n.layout.layoutBox,a);if(o){let l=o(Ri(s));this.hasMutatedConstraints=!!l,l&&(s=uo(l))}return s}startAnimation(e){let{drag:o,dragMomentum:r,dragElastic:n,dragTransition:a,dragSnapToOrigin:s,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},c=tt(m=>{if(!jr(m,o,this.currentDirection))return;let f=u&&u[m]||{};(s===!0||s===m)&&(f={min:0,max:0});let p=n?200:1e6,d=n?40:1e7,h={type:"inertia",velocity:r?e[m]:0,bounceStiffness:p,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...a,...f};return this.startAxisValueAnimation(m,h)});return Promise.all(c).then(l)}startAxisValueAnimation(e,o){let r=this.getAxisMotionValue(e);return Te(this.visualElement,e),r.start(Xt(e,r,0,o,this.visualElement,!1))}stopAnimation(){tt(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let o=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps()[o];return n||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){tt(o=>{let{drag:r}=this.getProps();if(!jr(o,r,this.currentDirection))return;let{projection:n}=this.visualElement,a=this.getAxisMotionValue(o);if(n&&n.layout){let{min:s,max:l}=n.layout.layoutBox[o],u=a.get()||0;a.set(e[o]-A(s,l,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:o}=this.getProps(),{projection:r}=this.visualElement;if(!Gt(o)||!r||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};tt(s=>{let l=this.getAxisMotionValue(s);if(l&&this.constraints!==!1){let u=l.get();n[s]=ll({min:u,max:u},this.constraints[s])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),tt(s=>{if(!jr(s,e,null))return;let l=this.getAxisMotionValue(s),{min:u,max:c}=this.constraints[s];l.set(A(u,c,n[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;$u.set(this.visualElement,this);let e=this.visualElement.current,o=Wt(e,"pointerdown",c=>{let{drag:m,dragListener:f=!0}=this.getProps(),p=c.target,d=p!==e&&wi(p);m&&f&&!d&&this.start(c)}),r,n=i(()=>{let{dragConstraints:c}=this.getProps();Gt(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=_u(e,c.current,()=>this.scalePositionWithinConstraints())))},"measureDragConstraints"),{projection:a}=this.visualElement,s=a.addEventListener("measure",n);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),w.read(n);let l=xt(window,"resize",()=>this.scalePositionWithinConstraints()),u=a.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:m})=>{this.isDragging&&m&&(tt(f=>{let p=this.getAxisMotionValue(f);p&&(this.originPoint[f]+=c[f].translate,p.set(p.get()+c[f].translate))}),this.visualElement.render())}));return()=>{l(),o(),s(),u&&u(),r&&r()}}getProps(){let e=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:a=!1,dragElastic:s=Or,dragMomentum:l=!0}=e;return{...e,drag:o,dragDirectionLock:r,dragPropagation:n,dragConstraints:a,dragElastic:s,dragMomentum:l}}};function ml(t){let e=!0;return()=>{if(e){e=!1;return}t()}}i(ml,"skipFirstCall");function _u(t,e,o){let r=ur(t,ml(o)),n=ur(e,ml(o));return()=>{r(),n()}}i(_u,"startResizeObservers");function jr(t,e,o){return(e===!0||e===t)&&(o===null||o===t)}i(jr,"shouldDrag");function Yu(t,e=10){let o=null;return Math.abs(t.y)>e?o="y":Math.abs(t.x)>e&&(o="x"),o}i(Yu,"getCurrentDirection");var Gr=class extends z{static{i(this,"DragGesture")}constructor(e){super(e),this.removeGroupControls=k,this.removeListeners=k,this.controls=new Nr(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||k}update(){let{dragControls:e}=this.node.getProps(),{dragControls:o}=this.node.prevProps||{};e!==o&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}};var rn=i(t=>(e,o)=>{t&&w.update(()=>t(e,o),!1,!0)},"asyncHandler"),Wr=class extends z{static{i(this,"PanGesture")}constructor(){super(...arguments),this.removePointerDownListener=k}onPointerDown(e){this.session=new ke(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ir(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:o,onPan:r,onPanEnd:n}=this.node.getProps();return{onSessionStart:rn(e),onStart:rn(o),onMove:rn(r),onEnd:i((a,s)=>{delete this.session,n&&w.postRender(()=>n(a,s))},"onEnd")}}mount(){this.removePointerDownListener=Wt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var fl=F(mn(),1);var Po=F(G(),1);var nn=!1,sn=class extends Po.Component{static{i(this,"MeasureLayoutWithContext")}componentDidMount(){let{visualElement:e,layoutGroup:o,switchLayoutGroup:r,layoutId:n}=this.props,{projection:a}=e;a&&(o.group&&o.group.add(a),r&&r.register&&n&&r.register(a),nn&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:i(()=>this.safeToRemove(),"onExitComplete")})),ae.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:o,visualElement:r,drag:n,isPresent:a}=this.props,{projection:s}=r;return s&&(s.isPresent=a,e.layoutDependency!==o&&s.setOptions({...s.options,layoutDependency:o}),nn=!0,n||e.layoutDependency!==o||o===void 0||e.isPresent!==a?s.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?s.promote():s.relegate()||w.postRender(()=>{let l=s.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:o}=this.props,{projection:r}=e;r&&(r.options.layoutAnchor=o,r.root.didUpdate(),Jt.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:o,switchLayoutGroup:r}=this.props,{projection:n}=e;nn=!0,n&&(n.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(n),r&&r.deregister&&r.deregister(n))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Ur(t){let[e,o]=Va(),r=(0,Po.useContext)(Sr);return(0,fl.jsx)(sn,{...t,layoutGroup:r,switchLayoutGroup:(0,Po.useContext)(Er),isPresent:e,safeToRemove:o})}i(Ur,"MeasureLayout");var pl={pan:{Feature:Wr},drag:{Feature:Gr,ProjectionNode:Vo,MeasureLayout:Ur}};function hl(t,e,o){let{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",o==="Start");let n="onHover"+o,a=r[n];a&&w.postRender(()=>a(e,At(e)))}i(hl,"handleHoverEvent");var Kr=class extends z{static{i(this,"HoverGesture")}mount(){let{current:e}=this.node;e&&(this.unmount=Si(e,(o,r)=>(hl(this.node,r,"Start"),n=>hl(this.node,n,"End"))))}unmount(){}};var zr=class extends z{static{i(this,"FocusGesture")}constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=lt(xt(this.node.current,"focus",()=>this.onFocus()),xt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function dl(t,e,o){let{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",o==="Start");let n="onTap"+(o==="End"?"":o),a=r[n];a&&w.postRender(()=>a(e,At(e)))}i(dl,"handlePressEvent");var Hr=class extends z{static{i(this,"PressGesture")}mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:o,propagate:r}=this.node.props;this.unmount=Mi(e,(n,a)=>(dl(this.node,a,"Start"),(s,{success:l})=>dl(this.node,s,l?"End":"Cancel")),{useGlobalTarget:o,stopPropagation:r?.tap===!1})}unmount(){}};var ln=new WeakMap,an=new WeakMap,Xu=i(t=>{let e=ln.get(t.target);e&&e(t)},"fireObserverCallback"),qu=i(t=>{t.forEach(Xu)},"fireAllObserverCallbacks");function Zu({root:t,...e}){let o=t||document;an.has(o)||an.set(o,{});let r=an.get(o),n=JSON.stringify(e);return r[n]||(r[n]=new IntersectionObserver(qu,{root:t,...e})),r[n]}i(Zu,"initIntersectionObserver");function gl(t,e,o){let r=Zu(e);return ln.set(t,o),r.observe(t),()=>{ln.delete(t),r.unobserve(t)}}i(gl,"observeIntersection");var Ju={some:0,all:1},$r=class extends z{static{i(this,"InViewFeature")}constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:o,margin:r,amount:n="some",once:a}=e,s={root:o?o.current:void 0,rootMargin:r,threshold:typeof n=="number"?n:Ju[n]},l=i(u=>{let{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,a&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);let{onViewportEnter:m,onViewportLeave:f}=this.node.getProps(),p=c?m:f;p&&p(u)},"onIntersectionUpdate");this.stopObserver=gl(this.node.current,s,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:e,prevProps:o}=this.node;["amount","margin","root"].some(Qu(e,o))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Qu({viewport:t={}},{viewport:e={}}={}){return o=>t[o]!==e[o]}i(Qu,"hasViewportOptionChanged");var xl={inView:{Feature:$r},tap:{Feature:Hr},focus:{Feature:zr},hover:{Feature:Kr}};var yl={layout:{ProjectionNode:Vo,MeasureLayout:Ur}};var vl={...Ya,...xl,...pl,...yl};var cn=Ha(vl,_a);var CD=cn;export{Ru as a,CD as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as H}from"./chunk-54MMVNPT.js";import{a as G}from"./chunk-AREBQI6D.js";import{c as ee}from"./chunk-FXCBF4XT.js";import"./chunk-2OUPA2WJ.js";import{b as Z}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{b as E}from"./chunk-BQNVN2OD.js";import{f as _}from"./chunk-M3NGYXDR.js";import"./chunk-XBDKZZ67.js";import{a as W}from"./chunk-XQCVZAGU.js";import{a as K,b as V,c as z,d as M,e as u,f}from"./chunk-WJQLNYGX.js";import{a as B,e as D}from"./chunk-WQH3LT2P.js";import{d as A,h as O,o as T,r as X}from"./chunk-IUYFXK4X.js";import"./chunk-YC52XCPK.js";import{a as c,e as R,f as oe,g as re,h as ae}from"./chunk-3XIESWL4.js";var U=R(re(),1),Y=R(oe(),1);var t=R(ae(),1);var se=R(re(),1);var Q=R(oe(),1);var h=R(ae(),1);var ie=c(a=>Number.isFinite(a)?X(a,"\u2014"):"\u2014","Q"),le=c(a=>a.toSorted((e,i)=>e.scheduledFor-i.scheduledFor),"A"),ce=c((a,e,i)=>e!==void 0?e:i===void 0?d=>a.cancelScheduledJob(d):void 0,"U"),de=c(a=>{let e=(0,se.c)(16),{cancelJob:i,loadJobs:d}=a===void 0?{}:a,p=_(),r=A(),l=d===void 0,o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=["lunora-scheduled-jobs"],e[0]=o):o=e[0];let N=E(o,async()=>{let g=await(d??(()=>p.listScheduledJobs()))();return le(g)}),[v,n]=(0,Q.useState)(void 0),[s,m]=(0,Q.useState)(void 0),k,w;e[1]!==p||e[2]!==l?(k=c(()=>{if(l)return p.subscribeScheduledJobs(g=>{m(void 0),n(le(g))})},"v"),w=[l,p],e[1]=p,e[2]=l,e[3]=k,e[4]=w):(k=e[3],w=e[4]),(0,Q.useEffect)(k,w);let x;e[5]!==N?(x=c(()=>{N.refetch()},"j"),e[5]=N,e[6]=x):x=e[6],H(x,!l);let J=ce(p,i,d),b=v??N.data,j=s??N.error,q=c(async g=>{if(J!==void 0){m(void 0);try{await J(g),l||N.refetch()}catch(P){m(O(P))}}},"k"),I="flex flex-col gap-3",F="lunora-scheduled-jobs",C;e[7]!==j?(C=j!==null&&(0,h.jsx)("p",{className:"text-sm text-destructive","data-testid":"sj-error",role:"alert",children:j}),e[7]=j,e[8]=C):C=e[8];let S;e[9]!==b?.length||e[10]!==r?(S=b?.length===0&&(0,h.jsx)(W,{description:r("Jobs queued with runAfter / runAt will appear here."),icon:(0,h.jsxs)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,h.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,h.jsx)("path",{d:"M12 7.5V12l4 2"})]}),testId:"sj-empty",title:r("No scheduled jobs.")}),e[9]=b?.length,e[10]=r,e[11]=S):S=e[11];let $=b!==void 0&&b.length>0&&(0,h.jsx)(B,{className:"overflow-hidden py-0",children:(0,h.jsx)(D,{className:"px-0",children:(0,h.jsxs)(K,{"data-testid":"sj-table",children:[(0,h.jsx)(V,{children:(0,h.jsxs)(M,{children:[(0,h.jsx)(u,{children:r("function")}),(0,h.jsx)(u,{children:r("scheduled for")}),(0,h.jsx)(u,{children:r("pool")}),(0,h.jsx)(u,{children:r("attempts")}),(0,h.jsx)(u,{children:r("shard")}),(0,h.jsx)(u,{children:r("id")}),J!==void 0&&(0,h.jsx)(u,{"aria-label":r("Actions")})]})}),(0,h.jsx)(z,{children:b.map(g=>(0,h.jsxs)(M,{"data-testid":`sj-row-${g.id}`,children:[(0,h.jsx)(f,{className:"font-mono text-xs",children:g.functionPath}),(0,h.jsx)(f,{className:"text-muted-foreground tabular-nums",children:ie(g.scheduledFor)}),(0,h.jsx)(f,{className:"font-mono text-xs",children:g.pool??""}),(0,h.jsx)(f,{className:"tabular-nums",children:g.attempts??0}),(0,h.jsx)(f,{children:g.shardKey??""}),(0,h.jsx)(f,{className:"font-mono text-xs",children:g.id}),J!==void 0&&(0,h.jsx)(f,{className:"text-right",children:(0,h.jsx)(G,{confirmLabel:r("Cancel job?"),onConfirm:c(()=>{T(q(g.id))},"onConfirm"),testId:`sj-cancel-${g.id}`,children:r("Cancel")})})]},g.id))})]})})}),y;return e[12]!==$||e[13]!==C||e[14]!==S?(y=(0,h.jsxs)("div",{className:I,"data-testid":F,children:[C,S,$]}),e[12]=$,e[13]=C,e[14]=S,e[15]=y):y=e[15],y},"me");var he={kind:"idle"},me=c((a,e,i)=>i!==void 0?i:e===void 0?d=>a.runCronJob(d):void 0,"oe"),ue=c(({loadCronJobs:a,runCronJob:e}={})=>{let i=_(),d=A(),[p,r]=(0,Y.useState)({}),l=E(["lunora-cron-jobs",a?"custom":"default"],()=>(a??(()=>i.getCronJobs()))()),{data:o,error:N}=l,v=me(i,a,e),n=c(async s=>{if(v!==void 0){r(m=>({...m,[s]:{kind:"running"}}));try{await v(s),r(m=>({...m,[s]:{kind:"ok"}})),l.refetch()}catch(m){r(k=>({...k,[s]:{kind:"error",message:O(m)}}))}}},"i");return(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"lunora-cron-triggers",children:[N!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"cron-error",role:"alert",children:N}),o?.length===0&&(0,t.jsx)(W,{description:d("Triggers declared with the cronJobs() builder appear here."),icon:(0,t.jsxs)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,t.jsx)("path",{d:"M12 7.5V12l4 2"})]}),testId:"cron-empty",title:d("No cron triggers.")}),o!==void 0&&o.length>0&&(0,t.jsx)(B,{className:"overflow-hidden py-0",children:(0,t.jsx)(D,{className:"px-0",children:(0,t.jsxs)(K,{"data-testid":"cron-table",children:[(0,t.jsx)(V,{children:(0,t.jsxs)(M,{children:[(0,t.jsx)(u,{children:d("name")}),(0,t.jsx)(u,{children:d("schedule")}),(0,t.jsx)(u,{children:d("target")}),(0,t.jsx)(u,{children:d("shard")}),v!==void 0&&(0,t.jsx)(u,{"aria-label":d("Actions")})]})}),(0,t.jsx)(z,{children:o.map(s=>{let m=p[s.name]??he;return(0,t.jsxs)(M,{"data-testid":`cron-row-${s.name}`,children:[(0,t.jsx)(f,{children:s.name}),(0,t.jsx)(f,{className:"font-mono text-xs tabular-nums",children:s.cron}),(0,t.jsx)(f,{children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[s.workflow===void 0?(0,t.jsx)(Z,{variant:"outline",children:d("function")}):(0,t.jsx)(Z,{variant:"secondary",children:d("workflow")}),(0,t.jsx)("span",{className:"font-mono text-xs",children:s.workflow??s.functionPath})]})}),(0,t.jsx)(f,{children:s.shardKey??""}),v!==void 0&&(0,t.jsx)(f,{className:"text-right",children:(0,t.jsxs)("span",{className:"flex items-center justify-end gap-2",children:[m.kind==="ok"&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground","data-testid":`cron-ran-${s.name}`,children:d("ran")}),m.kind==="error"&&(0,t.jsx)("span",{className:"text-xs text-destructive","data-testid":`cron-run-error-${s.name}`,role:"alert",children:m.message}),(0,t.jsx)(G,{confirmLabel:d("Run now?"),disabled:m.kind==="running",onConfirm:c(()=>{T(n(s.name))},"onConfirm"),testId:`cron-run-${s.name}`,children:m.kind==="running"?d("Running\u2026"):d("Run now")})]})})]},`${s.cron}:${s.name}`)})})]})})})]})},"le"),fe=c(a=>Number.isFinite(a)?X(a,"\u2014"):"\u2014","re"),pe=c(a=>{let e=(0,U.c)(34),i;e[0]!==a?(i=a===void 0?{}:a,e[0]=a,e[1]=i):i=e[1];let{loadJobs:d,removeJob:p,retryJob:r}=i,l=_(),o=A(),N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=["lunora-dead-jobs"],e[2]=N):N=e[2];let v;e[3]!==l||e[4]!==d?(v=c(async()=>(await(d??(()=>l.listDeadJobs()))()).toSorted(be),"h"),e[3]=l,e[4]=d,e[5]=v):v=e[5];let n=E(N,v),s=n.data,[m,k]=(0,Y.useState)(void 0),w=n.error??m,x=d===void 0,J;e[6]!==l||e[7]!==x||e[8]!==r?(J=r??(x?L=>l.retryDeadJob(L):void 0),e[6]=l,e[7]=x,e[8]=r,e[9]=J):J=e[9];let b=J,j;e[10]!==l||e[11]!==x||e[12]!==p?(j=p??(x?L=>l.removeDeadJob(L):void 0),e[10]=l,e[11]=x,e[12]=p,e[13]=j):j=e[13];let q=j,I;e[14]!==n?(I=c(()=>{n.refetch()},"J"),e[14]=n,e[15]=I):I=e[15],H(I,!0);let F;e[16]!==n?(F=c(async L=>{k(void 0);try{await L,n.refetch()}catch(ne){k(O(ne))}},"j"),e[16]=n,e[17]=F):F=e[17];let C=F,S=b!==void 0||q!==void 0,$;e[18]!==w?($=w!==void 0&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"dlq-error",role:"alert",children:w}),e[18]=w,e[19]=$):$=e[19];let y;e[20]!==s?.length||e[21]!==o?(y=s?.length===0&&(0,t.jsx)(W,{description:o("Jobs that exhaust their retry budget are parked here instead of being dropped."),icon:(0,t.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14"})}),testId:"dlq-empty",title:o("No dead-letter jobs.")}),e[20]=s?.length,e[21]=o,e[22]=y):y=e[22];let g;e[23]!==C||e[24]!==S||e[25]!==s||e[26]!==q||e[27]!==b||e[28]!==o?(g=s!==void 0&&s.length>0&&(0,t.jsx)(B,{className:"overflow-hidden py-0",children:(0,t.jsx)(D,{className:"px-0",children:(0,t.jsxs)(K,{"data-testid":"dlq-table",children:[(0,t.jsx)(V,{children:(0,t.jsxs)(M,{children:[(0,t.jsx)(u,{children:o("function")}),(0,t.jsx)(u,{children:o("attempts")}),(0,t.jsx)(u,{children:o("last tried")}),(0,t.jsx)(u,{children:o("pool")}),(0,t.jsx)(u,{children:o("shard")}),(0,t.jsx)(u,{children:o("id")}),S&&(0,t.jsx)(u,{"aria-label":o("Actions")})]})}),(0,t.jsx)(z,{children:s.map(L=>(0,t.jsxs)(M,{"data-testid":`dlq-row-${L.id}`,children:[(0,t.jsx)(f,{className:"font-mono text-xs",children:L.functionPath}),(0,t.jsx)(f,{className:"tabular-nums",children:L.attempts??0}),(0,t.jsx)(f,{className:"text-muted-foreground tabular-nums",children:fe(L.scheduledFor)}),(0,t.jsx)(f,{className:"font-mono text-xs",children:L.pool??""}),(0,t.jsx)(f,{children:L.shardKey??""}),(0,t.jsx)(f,{className:"font-mono text-xs",children:L.id}),S&&(0,t.jsx)(f,{className:"text-right",children:(0,t.jsxs)("div",{className:"flex justify-end gap-1.5",children:[b!==void 0&&(0,t.jsx)(ee,{"data-testid":`dlq-retry-${L.id}`,onClick:c(()=>{T(C(b(L.id)))},"onClick"),size:"sm",type:"button",variant:"outline",children:o("Retry")}),q!==void 0&&(0,t.jsx)(G,{confirmLabel:o("Drop job?"),onConfirm:c(()=>{T(C(q(L.id)))},"onConfirm"),testId:`dlq-remove-${L.id}`,children:o("Drop")})]})})]},L.id))})]})})}),e[23]=C,e[24]=S,e[25]=s,e[26]=q,e[27]=b,e[28]=o,e[29]=g):g=e[29];let P;return e[30]!==g||e[31]!==$||e[32]!==y?(P=(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"lunora-dead-letter",children:[$,y,g]}),e[30]=g,e[31]=$,e[32]=y,e[33]=P):P=e[33],P},"ne");function be(a,e){return(e.attempts??0)-(a.attempts??0)}c(be,"ae");var te=c(a=>{let e=(0,U.c)(8),{label:i,testId:d,value:p}=a,r;e[0]!==i?(r=(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:i}),e[0]=i,e[1]=r):r=e[1];let l;e[2]!==d||e[3]!==p?(l=(0,t.jsx)("span",{className:"text-2xl font-semibold tabular-nums","data-testid":d,children:p}),e[2]=d,e[3]=p,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=(0,t.jsx)(B,{className:"flex-1 py-0",children:(0,t.jsxs)(D,{className:"flex flex-col gap-1 p-4",children:[r,l]})}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o},"F"),ve=c(a=>{let e=(0,U.c)(25),i;e[0]!==a?(i=a===void 0?{}:a,e[0]=a,e[1]=i):i=e[1];let{loadStatus:d}=i,p=_(),r=A(),l=d===void 0,o;e[2]!==l?(o=["lunora-scheduler-status",l],e[2]=l,e[3]=o):o=e[3];let N;e[4]!==p||e[5]!==d?(N=c(async()=>{let j=await(d??(()=>p.schedulerStatus()))();return{...j,pools:j.pools.toSorted(xe)}},"k"),e[4]=p,e[5]=d,e[6]=N):N=e[6];let v=E(o,N),{data:n,error:s}=v,m;e[7]!==v?(m=c(()=>{v.refetch()},"s"),e[7]=v,e[8]=m):m=e[8],H(m,!0);let k;e[9]!==s?(k=s!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"pools-error",role:"alert",children:s}),e[9]=s,e[10]=k):k=e[10];let w;e[11]!==n||e[12]!==r?(w=n!==void 0&&(0,t.jsxs)("div",{className:"flex gap-3","data-testid":"pools-totals",children:[(0,t.jsx)(te,{label:r("backlog"),testId:"pools-backlog",value:n.backlog}),(0,t.jsx)(te,{label:r("in flight"),testId:"pools-inflight",value:n.inFlight}),(0,t.jsx)(te,{label:r("pools"),testId:"pools-count",value:n.pools.length})]}),e[11]=n,e[12]=r,e[13]=w):w=e[13];let x;e[14]!==n?.pools.length||e[15]!==r?(x=n?.pools.length===0&&(0,t.jsx)(W,{description:r("Pools created with createWorkpool appear here once they have activity."),icon:(0,t.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M4 7h16M4 12h16M4 17h16"})}),testId:"pools-empty",title:r("No workpools.")}),e[14]=n?.pools.length,e[15]=r,e[16]=x):x=e[16];let J;e[17]!==n||e[18]!==r?(J=n!==void 0&&n.pools.length>0&&(0,t.jsx)(B,{className:"overflow-hidden py-0",children:(0,t.jsx)(D,{className:"px-0",children:(0,t.jsxs)(K,{"data-testid":"pools-table",children:[(0,t.jsx)(V,{children:(0,t.jsxs)(M,{children:[(0,t.jsx)(u,{children:r("pool")}),(0,t.jsx)(u,{children:r("queued")}),(0,t.jsx)(u,{children:r("in flight")}),(0,t.jsx)(u,{children:r("max concurrency")})]})}),(0,t.jsx)(z,{children:n.pools.map(ge)})]})})}),e[17]=n,e[18]=r,e[19]=J):J=e[19];let b;return e[20]!==k||e[21]!==w||e[22]!==x||e[23]!==J?(b=(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"lunora-scheduler-pools",children:[k,w,x,J]}),e[20]=k,e[21]=w,e[22]=x,e[23]=J,e[24]=b):b=e[24],b},"de");function xe(a,e){return e.queued-a.queued}c(xe,"ie");function ge(a){return(0,t.jsxs)(M,{"data-testid":`pools-row-${a.name}`,children:[(0,t.jsx)(f,{className:"font-mono text-xs",children:a.name}),(0,t.jsx)(f,{className:"tabular-nums",children:a.queued}),(0,t.jsxs)(f,{className:"tabular-nums",children:[a.inFlight," / ",a.maxConcurrency]}),(0,t.jsx)(f,{className:"tabular-nums",children:a.maxConcurrency})]},a.name)}c(ge,"se");var Ne=["jobs","dead","pools","cron"],Ve=c(a=>{let e=(0,U.c)(41),i;e[0]!==a?(i=a===void 0?{}:a,e[0]=a,e[1]=i):i=e[1];let{loadCronJobs:d,scheduledCancel:p,scheduledLoad:r}=i,l=A(),[o,N]=(0,Y.useState)("jobs"),v;e[2]!==l?(v=l("Cron triggers"),e[2]=l,e[3]=v):v=e[3];let n;e[4]!==l?(n=l("Dead letter"),e[4]=l,e[5]=n):n=e[5];let s;e[6]!==l?(s=l("Scheduled jobs"),e[6]=l,e[7]=s):s=e[7];let m;e[8]!==l?(m=l("Pools"),e[8]=l,e[9]=m):m=e[9];let k;e[10]!==v||e[11]!==n||e[12]!==s||e[13]!==m?(k={cron:v,dead:n,jobs:s,pools:m},e[10]=v,e[11]=n,e[12]=s,e[13]=m,e[14]=k):k=e[14];let w=k,x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=c(y=>{N(y.currentTarget.dataset.view)},"u"),e[15]=x):x=e[15];let J=x,b;e[16]!==l?(b=l("Schedule view"),e[16]=l,e[17]=b):b=e[17];let j;e[18]!==o||e[19]!==w?(j=Ne.map(y=>(0,t.jsx)(ee,{"aria-selected":o===y,"data-testid":`schedule-view-${y}`,"data-view":y,onClick:J,role:"tab",size:"sm",type:"button",variant:o===y?"default":"outline",children:w[y]},y)),e[18]=o,e[19]=w,e[20]=j):j=e[20];let q;e[21]!==b||e[22]!==j?(q=(0,t.jsx)("div",{"aria-label":b,className:"flex gap-1.5","data-testid":"schedule-view-toggle",role:"tablist",children:j}),e[21]=b,e[22]=j,e[23]=q):q=e[23];let I;e[24]!==p||e[25]!==r||e[26]!==o?(I=o==="jobs"&&(0,t.jsx)(de,{cancelJob:p,loadJobs:r}),e[24]=p,e[25]=r,e[26]=o,e[27]=I):I=e[27];let F;e[28]!==o?(F=o==="dead"&&(0,t.jsx)(pe,{}),e[28]=o,e[29]=F):F=e[29];let C;e[30]!==o?(C=o==="pools"&&(0,t.jsx)(ve,{}),e[30]=o,e[31]=C):C=e[31];let S;e[32]!==d||e[33]!==o?(S=o==="cron"&&(0,t.jsx)(ue,{loadCronJobs:d}),e[32]=d,e[33]=o,e[34]=S):S=e[34];let $;return e[35]!==q||e[36]!==I||e[37]!==F||e[38]!==C||e[39]!==S?($=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-schedule",children:[q,I,F,C,S]}),e[35]=q,e[36]=I,e[37]=F,e[38]=C,e[39]=S,e[40]=$):$=e[40],$},"Je");export{Ve as SchedulePanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as We,b as De,c as Fe,d as Oe,e as we}from"./chunk-MKYEFQCA.js";import"./chunk-2PJNAWB3.js";import"./chunk-SD4BERSA.js";import"./chunk-IC4L6G56.js";import{a as qe}from"./chunk-3SCGCJYS.js";import{a as Ve}from"./chunk-IGCNMZSB.js";import"./chunk-2QSHLBCO.js";import"./chunk-BGBLQ563.js";import"./chunk-IVFHIQOT.js";import"./chunk-QBWRC5YX.js";import{a as ze}from"./chunk-3CWGJYBB.js";import{a as Te}from"./chunk-RMN2JN4S.js";import"./chunk-GRL5MG3Z.js";import"./chunk-7T7UOTYK.js";import{R as ke}from"./chunk-CFPZYHPY.js";import"./chunk-T6VMSOBB.js";import"./chunk-7QIFDWQV.js";import{c as ie}from"./chunk-FXCBF4XT.js";import"./chunk-2OUPA2WJ.js";import{b as me}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import"./chunk-QLQADHFE.js";import{a as D}from"./chunk-VDW32UET.js";import{c as Ee}from"./chunk-BQNVN2OD.js";import{f as Ne}from"./chunk-M3NGYXDR.js";import"./chunk-XBDKZZ67.js";import{a as Ce}from"./chunk-XQCVZAGU.js";import{a as Le,b as je,c as Re,d as pe,e as W,f as L}from"./chunk-WJQLNYGX.js";import{a as Me,e as Ae}from"./chunk-WQH3LT2P.js";import{d as ue,f as le,g as be,h as Ke,o as re,r as _e}from"./chunk-IUYFXK4X.js";import{a as Ie,b as $e}from"./chunk-YC52XCPK.js";import{a as d,e as ye,f as Be,g as Ge,h as He}from"./chunk-3XIESWL4.js";var ge=ye(Ge(),1);var ne=ye(Be(),1);var t=ye(He(),1);var Se="none",Je=["all","open","resolved","ignored"],Pe=["critical","high","medium","low"],Qe=le(D.resolveIssue),Xe=le(D.ignoreIssue),Ue=le(D.assignIssue),Ye=le(D.setIssueSeverity),Ze=le(D.explainIssue),es=d(n=>Array.isArray(n?.issues)?n.issues:[],"Ye"),ss=d(n=>n==="resolved"?"success":n==="ignored"?"secondary":"warning","Ze"),ts=d(n=>n==="critical"?"destructive":n==="high"?"warning":n==="medium"?"info":"secondary","Pe"),as=d(n=>{let e=(0,ge.c)(44),{expanded:u,issue:s,shardKey:$}=n,i=Ne(),r=ue(),[a,o]=(0,ne.useState)(void 0),{busy:T,error:C,run:j}=qe(),K;e[0]!==i||e[1]!==s||e[2]!==j||e[3]!==$?(K=d(()=>{o(void 0),j(async()=>{let g={culprit:s.culprit,sampleMessage:s.sampleMessage,title:s.title},I=await i.query(Ze,g,be($));o(I)})},"K"),e[0]=i,e[1]=s,e[2]=j,e[3]=$,e[4]=K):K=e[4];let z=K;if(!u)return null;let k;if(e[5]!==s.sampleMessage){let g=$e(s.sampleMessage);k=g===void 0?void 0:Ie(g.body),e[5]=s.sampleMessage,e[6]=k}else k=e[6];let _=k,E=`issues-detail-${s.hash}`,h;e[7]!==s.sampleMessage?(h=(0,t.jsx)("p",{className:"whitespace-pre-wrap font-mono text-xs text-muted-foreground",children:s.sampleMessage}),e[7]=s.sampleMessage,e[8]=h):h=e[8];let x;e[9]!==r?(x=r("Suggested fix"),e[9]=r,e[10]=x):x=e[10];let M;e[11]!==x?(M=(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:x}),e[11]=x,e[12]=M):M=e[12];let v;e[13]!==_||e[14]!==s.hash||e[15]!==r?(v=_===void 0?(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground","data-testid":`issues-hint-empty-${s.hash}`,children:r("No known fix for this error yet.")}):(0,t.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm","data-testid":`issues-hint-${s.hash}`,children:_}),e[13]=_,e[14]=s.hash,e[15]=r,e[16]=v):v=e[16];let y;e[17]!==M||e[18]!==v?(y=(0,t.jsxs)("div",{children:[M,v]}),e[17]=M,e[18]=v,e[19]=y):y=e[19];let b=`issues-explain-${s.hash}`,w;e[20]!==T||e[21]!==r?(w=r(T?"Explaining\u2026":"Explain in plain language"),e[20]=T,e[21]=r,e[22]=w):w=e[22];let m;e[23]!==T||e[24]!==z||e[25]!==w||e[26]!==b?(m=(0,t.jsx)("div",{children:(0,t.jsx)(ie,{"data-testid":b,disabled:T,onClick:z,size:"sm",type:"button",variant:"outline",children:w})}),e[23]=T,e[24]=z,e[25]=w,e[26]=b,e[27]=m):m=e[27];let f;e[28]!==C||e[29]!==s.hash?(f=C!==null&&(0,t.jsx)("p",{className:"text-xs text-destructive","data-testid":`issues-explain-error-${s.hash}`,role:"alert",children:C}),e[28]=C,e[29]=s.hash,e[30]=f):f=e[30];let p;e[31]!==a||e[32]!==s.hash||e[33]!==r?(p=a!==void 0&&(a.degraded?(0,t.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":`issues-degraded-${s.hash}`,children:a.reason==="no-ai-binding"?r("No AI binding is configured. Wire an AI binding to enable plain-language explanations \u2014 the suggested fix above is always available."):r("The AI model could not explain this error right now. The suggested fix above still applies.")}):(0,t.jsxs)("div",{"data-testid":`issues-explanation-${s.hash}`,children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:r("AI explanation")}),(0,t.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm",children:a.explanation}),a.groundedId===void 0&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground","data-testid":`issues-ungrounded-${s.hash}`,children:r("No catalog fix matched this error, so this explanation is the model's own reading of the message. Verify before acting on it.")}),(0,t.jsx)("p",{className:"mt-1 text-[0.7rem] text-muted-foreground",children:r("Generated by {model}",{model:a.model})})]})),e[31]=a,e[32]=s.hash,e[33]=r,e[34]=p):p=e[34];let c;e[35]!==m||e[36]!==f||e[37]!==p||e[38]!==h||e[39]!==y?(c=(0,t.jsx)(L,{className:"bg-muted/30",colSpan:7,children:(0,t.jsxs)("div",{className:"flex flex-col gap-3 py-1",children:[h,y,m,f,p]})}),e[35]=m,e[36]=f,e[37]=p,e[38]=h,e[39]=y,e[40]=c):c=e[40];let S;return e[41]!==c||e[42]!==E?(S=(0,t.jsx)(pe,{"data-testid":E,children:c}),e[41]=c,e[42]=E,e[43]=S):S=e[43],S},"et"),is=d(n=>{let e=(0,ge.c)(119),{busy:u,issue:s,rowError:$,runTriage:i,shardKey:r}=n,a=ue(),[o,T]=(0,ne.useState)(!1),C;e[0]===Symbol.for("react.memo_cache_sentinel")?(C=d(()=>{T(ls)},"C"),e[0]=C):C=e[0];let j=C,K;e[1]!==s.hash||e[2]!==i?(K=d(ae=>{let ce=ae===null||ae===Se?null:ae;re(i(s.hash,Ye,{severity:ce}))},"K"),e[1]=s.hash,e[2]=i,e[3]=K):K=e[3];let z=K,k;e[4]!==s.hash||e[5]!==i?(k=d(ae=>{if(ae.key!=="Enter")return;let ce=ae.currentTarget.value.trim();re(i(s.hash,Ue,{assignee:ce===""?null:ce}))},"k"),e[4]=s.hash,e[5]=i,e[6]=k):k=e[6];let _=k,E=`issues-row-${s.hash}`,h;e[7]!==a?(h=a("Toggle issue details"),e[7]=a,e[8]=h):h=e[8];let x=`issues-toggle-${s.hash}`,M=`mt-1 size-3 shrink-0 text-muted-foreground transition-transform ${o?"rotate-90":""}`,v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=(0,t.jsx)("path",{d:"m9 6 6 6-6 6"}),e[9]=v):v=e[9];let y;e[10]!==M?(y=(0,t.jsx)("svg",{"aria-hidden":"true",className:M,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",children:v}),e[10]=M,e[11]=y):y=e[11];let b;e[12]!==s.title?(b=(0,t.jsx)("span",{className:"block truncate font-medium",title:s.title,children:s.title}),e[12]=s.title,e[13]=b):b=e[13];let w;e[14]!==s.culprit?(w=(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",title:s.culprit,children:s.culprit}),e[14]=s.culprit,e[15]=w):w=e[15];let m;e[16]!==b||e[17]!==w?(m=(0,t.jsxs)("span",{className:"min-w-0",children:[b,w]}),e[16]=b,e[17]=w,e[18]=m):m=e[18];let f;e[19]!==o||e[20]!==m||e[21]!==h||e[22]!==x||e[23]!==y?(f=(0,t.jsxs)("button",{"aria-expanded":o,"aria-label":h,className:"flex w-full items-start gap-2 text-left","data-testid":x,onClick:j,type:"button",children:[y,m]}),e[19]=o,e[20]=m,e[21]=h,e[22]=x,e[23]=y,e[24]=f):f=e[24];let p;e[25]!==s.hash||e[26]!==$?(p=$!==void 0&&(0,t.jsx)("p",{className:"mt-1 text-xs text-destructive","data-testid":`issues-action-error-${s.hash}`,role:"alert",children:$}),e[25]=s.hash,e[26]=$,e[27]=p):p=e[27];let c;e[28]!==f||e[29]!==p?(c=(0,t.jsxs)(L,{className:"max-w-80",children:[f,p]}),e[28]=f,e[29]=p,e[30]=c):c=e[30];let S=`issues-status-${s.hash}`,g;e[31]!==s.status?(g=ss(s.status),e[31]=s.status,e[32]=g):g=e[32];let I;e[33]!==s.status||e[34]!==S||e[35]!==g?(I=(0,t.jsx)(L,{children:(0,t.jsx)(me,{"data-testid":S,variant:g,children:s.status})}),e[33]=s.status,e[34]=S,e[35]=g,e[36]=I):I=e[36];let R=s.severity??Se,l;e[37]!==a?(l=a("Set severity"),e[37]=a,e[38]=l):l=e[38];let oe=`issues-severity-${s.hash}`,q;e[39]!==a?(q=a("\u2014"),e[39]=a,e[40]=q):q=e[40];let N;e[41]!==s.severity||e[42]!==a?(N=s.severity===void 0?(0,t.jsx)("span",{className:"text-muted-foreground",children:a("\u2014")}):(0,t.jsx)(me,{variant:ts(s.severity),children:s.severity}),e[41]=s.severity,e[42]=a,e[43]=N):N=e[43];let A;e[44]!==q||e[45]!==N?(A=(0,t.jsx)(De,{placeholder:q,children:N}),e[44]=q,e[45]=N,e[46]=A):A=e[46];let V;e[47]!==l||e[48]!==oe||e[49]!==A?(V=(0,t.jsx)(Fe,{"aria-label":l,className:"h-7 w-[110px]","data-testid":oe,children:A}),e[47]=l,e[48]=oe,e[49]=A,e[50]=V):V=e[50];let de;e[51]===Symbol.for("react.memo_cache_sentinel")?(de=Pe.map(rs),e[51]=de):de=e[51];let F;e[52]!==a?(F=a("Clear"),e[52]=a,e[53]=F):F=e[53];let O;e[54]!==F?(O=(0,t.jsxs)(Oe,{children:[de,(0,t.jsx)(we,{value:Se,children:F})]}),e[54]=F,e[55]=O):O=e[55];let U;e[56]!==u||e[57]!==z||e[58]!==R||e[59]!==V||e[60]!==O?(U=(0,t.jsx)(L,{children:(0,t.jsxs)(We,{disabled:u,onValueChange:z,value:R,children:[V,O]})}),e[56]=u,e[57]=z,e[58]=R,e[59]=V,e[60]=O,e[61]=U):U=e[61];let B;e[62]!==a?(B=a("Assignee"),e[62]=a,e[63]=B):B=e[63];let fe=`issues-assignee-${s.hash}`,xe=s.assignee??"",ve=s.assignee??"",G;e[64]!==a?(G=a("Unassigned"),e[64]=a,e[65]=G):G=e[65];let H;e[66]!==u||e[67]!==_||e[68]!==B||e[69]!==fe||e[70]!==xe||e[71]!==ve||e[72]!==G?(H=(0,t.jsx)(L,{children:(0,t.jsx)(ke,{"aria-label":B,className:"h-7 w-32","data-testid":fe,defaultValue:xe,disabled:u,onKeyDown:_,placeholder:G},ve)}),e[66]=u,e[67]=_,e[68]=B,e[69]=fe,e[70]=xe,e[71]=ve,e[72]=G,e[73]=H):H=e[73];let J;e[74]!==s.count?(J=(0,t.jsx)(L,{className:"text-right",children:(0,t.jsx)(me,{variant:"secondary",children:s.count})}),e[74]=s.count,e[75]=J):J=e[75];let P;e[76]!==s.lastSeen?(P=_e(s.lastSeen),e[76]=s.lastSeen,e[77]=P):P=e[77];let Q;e[78]!==P?(Q=(0,t.jsx)(L,{className:"text-xs tabular-nums text-muted-foreground",children:P}),e[78]=P,e[79]=Q):Q=e[79];let X;e[80]!==u||e[81]!==s.hash||e[82]!==s.status||e[83]!==i||e[84]!==a?(X=s.status!=="resolved"&&(0,t.jsx)(ie,{"data-testid":`issues-resolve-${s.hash}`,disabled:u,onClick:d(()=>{re(i(s.hash,Qe,{}))},"onClick"),size:"xs",variant:"outline",children:a("Resolve")}),e[80]=u,e[81]=s.hash,e[82]=s.status,e[83]=i,e[84]=a,e[85]=X):X=e[85];let Y;e[86]!==u||e[87]!==s.hash||e[88]!==s.status||e[89]!==i||e[90]!==a?(Y=s.status!=="ignored"&&(0,t.jsx)(ie,{"data-testid":`issues-ignore-${s.hash}`,disabled:u,onClick:d(()=>{re(i(s.hash,Xe,{}))},"onClick"),size:"xs",variant:"ghost",children:a("Ignore")}),e[86]=u,e[87]=s.hash,e[88]=s.status,e[89]=i,e[90]=a,e[91]=Y):Y=e[91];let Z;e[92]!==u||e[93]!==s.assignee||e[94]!==s.hash||e[95]!==s.status||e[96]!==i||e[97]!==a?(Z=s.status!=="open"&&(0,t.jsx)(ie,{"data-testid":`issues-reopen-${s.hash}`,disabled:u,onClick:d(()=>{re(i(s.hash,Ue,{assignee:s.assignee??null}))},"onClick"),size:"xs",variant:"ghost",children:a("Reopen")}),e[92]=u,e[93]=s.assignee,e[94]=s.hash,e[95]=s.status,e[96]=i,e[97]=a,e[98]=Z):Z=e[98];let ee;e[99]!==X||e[100]!==Y||e[101]!==Z?(ee=(0,t.jsx)(L,{className:"text-right",children:(0,t.jsxs)("div",{className:"flex justify-end gap-1",children:[X,Y,Z]})}),e[99]=X,e[100]=Y,e[101]=Z,e[102]=ee):ee=e[102];let se;e[103]!==c||e[104]!==I||e[105]!==U||e[106]!==H||e[107]!==J||e[108]!==Q||e[109]!==E||e[110]!==ee?(se=(0,t.jsxs)(pe,{"data-testid":E,children:[c,I,U,H,J,Q,ee]}),e[103]=c,e[104]=I,e[105]=U,e[106]=H,e[107]=J,e[108]=Q,e[109]=E,e[110]=ee,e[111]=se):se=e[111];let te;e[112]!==o||e[113]!==s||e[114]!==r?(te=(0,t.jsx)(as,{expanded:o,issue:s,shardKey:r},s.sampleMessage),e[112]=o,e[113]=s,e[114]=r,e[115]=te):te=e[115];let he;return e[116]!==se||e[117]!==te?(he=(0,t.jsxs)(t.Fragment,{children:[se,te]}),e[116]=se,e[117]=te,e[118]=he):he=e[118],he},"tt"),ks=d(n=>{let e=(0,ge.c)(38),{initialShardKey:u}=n,s=ue(),$=Ne(),{queryShardKey:i,setShardKey:r,shardKey:a}=ze(u),[o,T]=(0,ne.useState)("all"),[C,j]=(0,ne.useState)(ns),[K,z]=(0,ne.useState)(os),k;e[0]!==o?(k=o==="all"?{}:{status:o},e[0]=o,e[1]=k):k=e[1];let _;e[2]!==i?(_={live:!0,shardKey:i},e[2]=i,e[3]=_):_=e[3];let{data:E,error:h,liveError:x}=Ee(D.getIssues,k,_),M=E!==void 0,v;if(e[4]!==K||e[5]!==C||e[6]!==$||e[7]!==E||e[8]!==h||e[9]!==x||e[10]!==M||e[11]!==i||e[12]!==r||e[13]!==a||e[14]!==o||e[15]!==s){let y=es(E),b;e[17]!==$||e[18]!==i?(b=d(async(l,oe,q)=>{z(N=>{if(!N.has(l))return N;let A=new Map(N);return A.delete(l),A}),j(N=>new Set(N).add(l));try{await $.query(oe,{...q,hash:l},be(i))}catch(N){let A=Ke(N);z(V=>new Map(V).set(l,A))}j(N=>{let A=new Set(N);return A.delete(l),A})},"N"),e[17]=$,e[18]=i,e[19]=b):b=e[19];let w=b,m;e[20]!==s?(m=d(l=>s(l==="all"?"All":l==="open"?"Open":l==="resolved"?"Resolved":"Ignored"),"u"),e[20]=s,e[21]=m):m=e[21];let f=m,p;e[22]!==h?(p=h!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"issues-error",role:"alert",children:h}),e[22]=h,e[23]=p):p=e[23];let c;e[24]!==r||e[25]!==a?(c=(0,t.jsx)(Te,{onChange:r,testId:"issues-shard-input",value:a}),e[24]=r,e[25]=a,e[26]=c):c=e[26];let S;e[27]!==x?(S=(0,t.jsx)(Ve,{message:x,prefix:"issues"}),e[27]=x,e[28]=S):S=e[28];let g;e[29]!==o||e[30]!==f?(g=Je.map(l=>(0,t.jsx)(ie,{"data-active":o===l?"":void 0,"data-testid":`issues-filter-${l}`,onClick:d(()=>{T(l)},"onClick"),size:"xs",variant:o===l?"default":"outline",children:f(l)},l)),e[29]=o,e[30]=f,e[31]=g):g=e[31];let I;e[32]!==g?(I=(0,t.jsx)("div",{className:"ms-auto flex items-center gap-1","data-testid":"issues-status-filter",role:"group",children:g}),e[32]=g,e[33]=I):I=e[33];let R;e[34]!==I||e[35]!==c||e[36]!==S?(R=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,S,I]}),e[34]=I,e[35]=c,e[36]=S,e[37]=R):R=e[37],v=(0,t.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-issues-panel",children:[p,R,M&&y.length===0?(0,t.jsx)(Ce,{description:s("No grouped errors yet. When a function throws or a container crashes, matching errors fold into a single issue here."),testId:"issues-empty",title:s("No issues")}):(0,t.jsx)(Me,{className:"overflow-hidden py-0",children:(0,t.jsx)(Ae,{className:"px-0",children:(0,t.jsxs)(Le,{"data-testid":"issues-table",children:[(0,t.jsx)(je,{children:(0,t.jsxs)(pe,{children:[(0,t.jsx)(W,{children:s("Issue")}),(0,t.jsx)(W,{children:s("Status")}),(0,t.jsx)(W,{children:s("Severity")}),(0,t.jsx)(W,{children:s("Assignee")}),(0,t.jsx)(W,{className:"text-right",children:s("Events")}),(0,t.jsx)(W,{children:s("Last seen")}),(0,t.jsx)(W,{className:"text-right",children:s("Actions")})]})}),(0,t.jsx)(Re,{children:y.map(l=>(0,t.jsx)(is,{busy:C.has(l.hash),issue:l,rowError:K.get(l.hash),runTriage:w,shardKey:i},l.hash))})]})})})]}),e[4]=K,e[5]=C,e[6]=$,e[7]=E,e[8]=h,e[9]=x,e[10]=M,e[11]=i,e[12]=r,e[13]=a,e[14]=o,e[15]=s,e[16]=v}else v=e[16];return v},"kt");function ls(n){return!n}d(ls,"st");function rs(n){return(0,t.jsx)(we,{value:n,children:n},n)}d(rs,"at");function ns(){return new Set}d(ns,"it");function os(){return new Map}d(os,"rt");export{ks as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as l}from"./chunk-BQNVN2OD.js";import{f as c}from"./chunk-M3NGYXDR.js";import{a as r,e as f,g}from"./chunk-3XIESWL4.js";var m=f(g(),1);var p={capabilities:{accounts:!0,admin:!0,organization:!1,passkey:!1,twoFactor:!1},emailAndPassword:!1,organization:{enabled:!1,roles:!1,teams:!1},plugins:[],rateLimit:{enabled:!1},session:{},socialProviders:[],userFields:[]},y=r(()=>{let o=(0,m.c)(6),t=c(),a;o[0]===Symbol.for("react.memo_cache_sentinel")?(a=["lunora-auth-config"],o[0]=a):a=o[0];let e;o[1]!==t?(e=r(()=>t.getAuthConfig(),"o"),o[1]=t,o[2]=e):e=o[2];let{data:u,isLoading:d}=l(a,e),i=u??p,n=!d,s;return o[3]!==i||o[4]!==n?(s={config:i,ready:n},o[3]=i,o[4]=n,o[5]=s):s=o[5],s},"A");export{y as a};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as nt}from"./chunk-SFDOII3B.js";import{e as Ee}from"./chunk-SMIESS7P.js";import{c as Ue}from"./chunk-FXCBF4XT.js";import{b as Fe}from"./chunk-THIXMMZD.js";import{a as D}from"./chunk-VDW32UET.js";import{c as ke}from"./chunk-BQNVN2OD.js";import{f as We}from"./chunk-M3NGYXDR.js";import{a as Ye}from"./chunk-XQCVZAGU.js";import{a as T,e as He}from"./chunk-WQH3LT2P.js";import{d as $,f as Qe,g as Xe,l as et,o as Se,p as tt,q as at}from"./chunk-IUYFXK4X.js";import{a as m,e as Ve,f as ct,g as dt,h as mt,j as Be}from"./chunk-3XIESWL4.js";var S=Ve(dt(),1);var L=Ve(ct(),1);var n=Ve(mt(),1);var ut=Qe(D.studioFeatures),it={analytics:!0,auth:!0,containers:!0,flags:!0,kv:!0,mail:!0,notifications:!0,payments:!0,queues:!0,scheduler:!0,storage:!0,vectors:!0,workflows:!0},pt=m(t=>{if(t===null||typeof t!="object")return it;let e=t,s=m(a=>typeof e[a]=="boolean"?e[a]:!0,"a");return{analytics:s("analytics"),auth:s("auth"),containers:s("containers"),flags:s("flags"),kv:s("kv"),mail:s("mail"),notifications:s("notifications"),payments:s("payments"),queues:s("queues"),scheduler:s("scheduler"),storage:s("storage"),vectors:s("vectors"),workflows:s("workflows")}},"ut"),ft=m(()=>{let t=(0,S.c)(3),e=We(),[s,a]=(0,L.useState)(it),r,l;return t[0]!==e?(r=m(()=>{Se((async()=>{try{a(pt(await e.query(ut,{},Xe(""))))}catch{}})())},"s"),l=[e],t[0]=e,t[1]=r,t[2]=l):(r=t[1],l=t[2]),(0,L.useEffect)(r,l),s},"pt"),ht=m(()=>{let t=(0,S.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"})}),t[0]=e):e=t[0],e},"ft"),gt=m(t=>{let e=(0,S.c)(24),{group:s}=t,a=$(),r=Ee(),l;e[0]!==s.tab||e[1]!==r?(l=m(()=>{Se(r({to:`/${s.tab}`}))},"o"),e[0]=s.tab,e[1]=r,e[2]=l):l=e[2];let o=l,i=s.bindings.length,c;e[3]!==s.label?(c=(0,n.jsx)("span",{className:"text-sm font-medium text-foreground",children:s.label}),e[3]=s.label,e[4]=c):c=e[4];let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=(0,n.jsx)(ht,{}),e[5]=p):p=e[5];let d;e[6]!==c?(d=(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[c,p]}),e[6]=c,e[7]=d):d=e[7];let f;e[8]!==i||e[9]!==a?(f=i===1?a("1 binding"):a("{count} bindings",{count:i}),e[8]=i,e[9]=a,e[10]=f):f=e[10];let u;e[11]!==f?(u=(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:f}),e[11]=f,e[12]=u):u=e[12];let h;e[13]!==i||e[14]!==s.bindings?(h=i>0&&(0,n.jsx)("div",{className:"flex flex-wrap gap-1.5",children:s.bindings.map(yt)}),e[13]=i,e[14]=s.bindings,e[15]=h):h=e[15];let g;e[16]!==d||e[17]!==u||e[18]!==h?(g=(0,n.jsxs)(He,{className:"flex flex-col gap-2 py-4",children:[d,u,h]}),e[16]=d,e[17]=u,e[18]=h,e[19]=g):g=e[19];let x;return e[20]!==s.testId||e[21]!==o||e[22]!==g?(x=(0,n.jsx)(T,{className:"cursor-pointer gap-0 py-0 transition-colors hover:bg-muted/40","data-testid":s.testId,onClick:o,children:g}),e[20]=s.testId,e[21]=o,e[22]=g,e[23]=x):x=e[23],x},"ht"),st=["kv","files","vectors"],xt=m((t,e)=>[...t.filter(s=>s.tab!==e.tab),e].toSorted((s,a)=>st.indexOf(s.tab)-st.indexOf(a.tab)),"gt"),bt=m(()=>{let t=(0,S.c)(19),e=We(),s=ft(),a=$(),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=[],t[0]=r):r=t[0];let[l,o]=(0,L.useState)(r),i,c;if(t[1]!==e||t[2]!==s.kv||t[3]!==s.storage||t[4]!==s.vectors||t[5]!==a?(i=m(()=>{let g={cancelled:!1},x=[{enabled:s.kv,label:a("KV Namespaces"),load:m(async()=>(await e.listKvNamespaces()).map(vt),"load"),tab:"kv",testId:"home-binding-kv"},{enabled:s.storage,label:a("R2 Buckets"),load:m(()=>e.listStorageBuckets(),"load"),tab:"files",testId:"home-binding-r2"},{enabled:s.vectors,label:a("Vectorize Indexes"),load:m(async()=>(await e.listVectorIndexes()).map(Nt),"load"),tab:"vectors",testId:"home-binding-vectors"}];for(let b of x)b.enabled&&Se((async()=>{try{let y=await b.load();if(!g.cancelled){let k={bindings:y,label:b.label,tab:b.tab,testId:b.testId};o(A=>xt(A,k))}}catch{}})());return()=>{g.cancelled=!0}},"i"),c=[e,s.kv,s.storage,s.vectors,a],t[1]=e,t[2]=s.kv,t[3]=s.storage,t[4]=s.vectors,t[5]=a,t[6]=i,t[7]=c):(i=t[6],c=t[7]),(0,L.useEffect)(i,c),l.length===0)return null;let p;t[8]!==a?(p=a("Bindings"),t[8]=a,t[9]=p):p=t[9];let d;t[10]!==p?(d=(0,n.jsx)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:p}),t[10]=p,t[11]=d):d=t[11];let f;t[12]!==l?(f=l.map(_t),t[12]=l,t[13]=f):f=t[13];let u;t[14]!==f?(u=(0,n.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:f}),t[14]=f,t[15]=u):u=t[15];let h;return t[16]!==d||t[17]!==u?(h=(0,n.jsxs)("section",{className:"flex flex-col gap-3","data-testid":"home-bindings",children:[d,u]}),t[16]=d,t[17]=u,t[18]=h):h=t[18],h},"xt");function yt(t){return(0,n.jsx)(Fe,{variant:"secondary",children:t},t)}m(yt,"bt");function vt(t){return t.binding}m(vt,"yt");function Nt(t){return t.name}m(Nt,"vt");function _t(t){return(0,n.jsx)(gt,{group:t},t.tab)}m(_t,"Nt");var St=[{name:"lunora_list_functions",summary:"list every query, mutation, and action with its path"},{name:"lunora_list_tables",summary:"list the schema's tables"},{name:"lunora_get_function_schema",summary:"read a function's argument JSON Schema before calling it"},{name:"lunora_run_query",summary:"run a read-only query"},{name:"lunora_run_mutation",summary:"run a mutation \u2014 writes; only when LUNORA_MCP_ALLOW_WRITES is set"},{name:"lunora_run_action",summary:"run an action \u2014 writes/effects; only when LUNORA_MCP_ALLOW_WRITES is set"}],kt=m(t=>JSON.stringify({mcpServers:{lunora:{args:["-y","@lunora/mcp"],command:"npx",env:{LUNORA_ADMIN_TOKEN:"<your-admin-token>",LUNORA_URL:t}}}},null,2),"St"),wt=m(t=>{let e=St.map(s=>`- ${s.name} \u2014 ${s.summary}`).join(`
|
|
2
|
+
`);return[`You have a Lunora MCP server connected to the deployment at ${t}.`,"It exposes this backend's functions and schema so you can inspect and operate it:",e,"",`Start by calling lunora_list_functions and lunora_list_tables to learn what exists, then lunora_get_function_schema before any run call. The full HTTP API is also documented at ${t}/_lunora/admin/openapi (that endpoint needs the same admin token the MCP server is configured with).`].join(`
|
|
3
|
+
`)},"kt"),Mt=1500,It=m(()=>{let t=(0,S.c)(35),e=$(),s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=tt(),t[0]=s):s=t[0];let a=s,[r,l]=(0,L.useState)(null),o,i;t[1]!==r?(o=m(()=>{if(r===null)return;let C=globalThis.setTimeout(()=>{l(null)},Mt);return()=>{globalThis.clearTimeout(C)}},"l"),i=[r],t[1]=r,t[2]=o,t[3]=i):(o=t[2],i=t[3]),(0,L.useEffect)(o,i);let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=m((C,j)=>{at(j)&&l(C)},"c"),t[4]=c):c=t[4];let p=c,d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=m(()=>{p("config",kt(a))},"d"),t[5]=d):d=t[5];let f=d,u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=m(()=>{p("prompt",wt(a))},"m"),t[6]=u):u=t[6];let h=u,g;t[7]!==e?(g=e("Connect an AI agent"),t[7]=e,t[8]=g):g=t[8];let x;t[9]!==g?(x=(0,n.jsx)("span",{className:"text-sm font-medium text-foreground",children:g}),t[9]=g,t[10]=x):x=t[10];let b;t[11]!==e?(b=e("Drive this deployment from an AI agent over the Model Context Protocol \u2014 it can list functions and tables, read schemas, and run read-only queries. Writes stay off unless you opt in."),t[11]=e,t[12]=b):b=t[12];let y;t[13]!==b?(y=(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:b}),t[13]=b,t[14]=y):y=t[14];let k;t[15]!==x||t[16]!==y?(k=(0,n.jsxs)("div",{className:"flex flex-col gap-1.5 p-4",children:[x,y]}),t[15]=x,t[16]=y,t[17]=k):k=t[17];let A;t[18]===Symbol.for("react.memo_cache_sentinel")?(A=(0,n.jsx)("code",{className:"font-mono text-xs text-muted-foreground","data-testid":"home-connect-agent-command",children:"npx -y @lunora/mcp"}),t[18]=A):A=t[18];let w;t[19]!==r||t[20]!==e?(w=e(r==="config"?"Copied":"Copy MCP config"),t[19]=r,t[20]=e,t[21]=w):w=t[21];let v;t[22]!==w?(v=(0,n.jsx)(Ue,{"data-testid":"home-connect-agent-copy-config",onClick:f,size:"xs",variant:"outline",children:w}),t[22]=w,t[23]=v):v=t[23];let M;t[24]!==r||t[25]!==e?(M=e(r==="prompt"?"Copied":"Copy agent prompt"),t[24]=r,t[25]=e,t[26]=M):M=t[26];let I;t[27]!==M?(I=(0,n.jsx)(Ue,{"data-testid":"home-connect-agent-copy-prompt",onClick:h,size:"xs",variant:"outline",children:M}),t[27]=M,t[28]=I):I=t[28];let N;t[29]!==v||t[30]!==I?(N=(0,n.jsxs)("div",{className:"flex flex-col gap-3 border-t border-border bg-muted/50 px-4 py-3",children:[A,(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[v,I]})]}),t[29]=v,t[30]=I,t[31]=N):N=t[31];let _;return t[32]!==k||t[33]!==N?(_=(0,n.jsxs)(T,{className:"gap-0 py-0","data-testid":"home-connect-agent",children:[k,N]}),t[32]=k,t[33]=N,t[34]=_):_=t[34],_},"$t"),Lt=(0,L.lazy)(()=>import("./chunk-V76WCOMM.js")),Ze=m(t=>{if(t<1e3)return`${String(Math.round(t))}ms`;let e=t>=1e4?0:1;return`${(t/1e3).toFixed(e)}s`},"Ee"),At=m((t,e)=>{let s=Math.max(0,Math.round((e-t)/1e3));if(s<60)return`${String(s)}s ago`;let a=Math.round(s/60);if(a<60)return`${String(a)}m ago`;let r=Math.round(a/60);return r<24?`${String(r)}h ago`:`${String(Math.round(r/24))}d ago`},"Mt"),rt=m((t,e)=>{if(t===void 0||t.length===0)return[];let s=new Map;for(let a of t)s.set(a.bucketMs,(s.get(a.bucketMs)??0)+a[e]);return[...s.entries()].toSorted(([a],[r])=>a-r).map(([,a])=>a)},"He"),lt=m((t,e=!0)=>{if(t.length<4)return null;let s=Math.floor(t.length/2),a=t.slice(0,s).reduce((o,i)=>o+i,0),r=t.slice(s).reduce((o,i)=>o+i,0);if(a===0)return null;let l=(r-a)/a*100;return{positive:e?l>=0:l<=0,text:`${l>=0?"+":""}${l.toFixed(1)}%`}},"Je"),qe=m(t=>{let e=(0,S.c)(24),{delta:s,footer:a,label:r,trend:l,unit:o,value:i}=t,c=$(),p;e[0]!==r?(p=(0,n.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:r}),e[0]=r,e[1]=p):p=e[1];let d;e[2]!==i?(d=(0,n.jsx)("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:i}),e[2]=i,e[3]=d):d=e[3];let f;e[4]!==o?(f=o!==void 0&&(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:o}),e[4]=o,e[5]=f):f=e[5];let u;e[6]!==d||e[7]!==f?(u=(0,n.jsxs)("span",{className:"flex items-baseline gap-1.5",children:[d,f]}),e[6]=d,e[7]=f,e[8]=u):u=e[8];let h;e[9]!==l?(h=l!==void 0&&(0,n.jsx)(L.Suspense,{fallback:(0,n.jsx)("div",{"aria-hidden":"true",className:"h-8 w-28"}),children:(0,n.jsx)(Lt,{data:l})}),e[9]=l,e[10]=h):h=e[10];let g;e[11]!==u||e[12]!==h?(g=(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[u,h]}),e[11]=u,e[12]=h,e[13]=g):g=e[13];let x;e[14]!==p||e[15]!==g?(x=(0,n.jsxs)("div",{className:"flex flex-col gap-2.5 p-4",children:[p,g]}),e[14]=p,e[15]=g,e[16]=x):x=e[16];let b;e[17]!==s||e[18]!==a||e[19]!==c?(b=s==null?a!=null&&(0,n.jsx)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:a}):(0,n.jsxs)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px]",children:[(0,n.jsx)("span",{className:Be("font-semibold",s.positive?"text-success":"text-destructive"),children:s.text})," ",(0,n.jsx)("span",{className:"text-muted-foreground",children:c("vs. prev.")})]}),e[17]=s,e[18]=a,e[19]=c,e[20]=b):b=e[20];let y;return e[21]!==x||e[22]!==b?(y=(0,n.jsxs)(T,{className:"justify-between gap-0 py-0",children:[x,b]}),e[21]=x,e[22]=b,e[23]=y):y=e[23],y},"Oe"),Ct=m(()=>{let t=(0,S.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"m9 6 6 6-6 6"})}),t[0]=e):e=t[0],e},"At"),Je=m(t=>{let e=(0,S.c)(7),{command:s,label:a}=t,r;e[0]!==a?(r=(0,n.jsx)("div",{className:"p-4",children:(0,n.jsx)("span",{className:"text-sm font-medium text-foreground",children:a})}),e[0]=a,e[1]=r):r=e[1];let l;e[2]!==s?(l=(0,n.jsx)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5",children:(0,n.jsx)("code",{className:"font-mono text-xs text-muted-foreground",children:s})}),e[2]=s,e[3]=l):l=e[3];let o;return e[4]!==r||e[5]!==l?(o=(0,n.jsxs)(T,{className:"justify-between gap-0 py-0",children:[r,l]}),e[4]=r,e[5]=l,e[6]=o):o=e[6],o},"De"),ot=m(t=>{let e=(0,S.c)(18),{count:s,onView:a,testId:r,title:l}=t,o=$(),i;e[0]!==l?(i=(0,n.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l}),e[0]=l,e[1]=i):i=e[1];let c;e[2]!==s||e[3]!==o?(c=s===null?(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:o("No data yet")}):(0,n.jsx)(Fe,{variant:s>0?"destructive":"success",children:s>0?s:o("All clear")}),e[2]=s,e[3]=o,e[4]=c):c=e[4];let p;e[5]!==i||e[6]!==c?(p=(0,n.jsxs)("div",{className:"flex items-start justify-between gap-2 p-4",children:[i,c]}),e[5]=i,e[6]=c,e[7]=p):p=e[7];let d;e[8]!==o?(d=o("View"),e[8]=o,e[9]=d):d=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=(0,n.jsx)(Ct,{}),e[10]=f):f=e[10];let u;e[11]!==a||e[12]!==d?(u=(0,n.jsxs)("button",{className:"flex items-center gap-1 border-t border-border bg-muted/50 px-4 py-2.5 text-[12px] font-medium text-foreground outline-none transition-colors hover:bg-muted focus-visible:bg-muted",onClick:a,type:"button",children:[d,f]}),e[11]=a,e[12]=d,e[13]=u):u=e[13];let h;return e[14]!==p||e[15]!==u||e[16]!==r?(h=(0,n.jsxs)(T,{className:"justify-between gap-0 py-0","data-testid":r,children:[p,u]}),e[14]=p,e[15]=u,e[16]=r,e[17]=h):h=e[17],h},"Ge"),$t=m(t=>{let e=(0,S.c)(7),{functions:s}=t,a=$(),r;if(e[0]!==s||e[1]!==a){let l=[...s].toSorted(qt).slice(0,5),o;e[3]!==a?(o=a("Top functions"),e[3]=a,e[4]=o):o=e[4];let i;e[5]!==o?(i=(0,n.jsx)("div",{className:"border-b border-border px-4 py-3",children:(0,n.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:o})}),e[5]=o,e[6]=i):i=e[6],r=(0,n.jsxs)(T,{className:"gap-0 py-0","data-testid":"home-top-functions",children:[i,l.length===0?(0,n.jsx)("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:a("No functions called yet.")}):(0,n.jsxs)("div",{className:"divide-y divide-border",children:[(0,n.jsxs)("div",{className:"grid grid-cols-[1fr_auto_auto_auto] gap-4 px-4 py-1.5 font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:[(0,n.jsx)("span",{children:a("Function")}),(0,n.jsx)("span",{className:"text-end",children:a("Calls")}),(0,n.jsx)("span",{className:"w-12 text-end",children:a("Avg")}),(0,n.jsx)("span",{className:"w-8 text-end",children:a("Err")})]}),l.map(Rt)]})]}),e[0]=s,e[1]=a,e[2]=r}else r=e[2];return r},"Ct"),jt=m(t=>{let e=(0,S.c)(26),{subs:s}=t,a=$(),r;e[0]!==a?(r=a("Live connections"),e[0]=a,e[1]=r):r=e[1];let l;e[2]!==r?(l=(0,n.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:r}),e[2]=r,e[3]=l):l=e[3];let o=s?.totalConnections??0,i;e[4]!==o?(i=o.toLocaleString(),e[4]=o,e[5]=i):i=e[5];let c;e[6]!==i?(c=(0,n.jsx)("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:i}),e[6]=i,e[7]=c):c=e[7];let p;e[8]!==a?(p=a("sockets"),e[8]=a,e[9]=p):p=e[9];let d;e[10]!==p?(d=(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:p}),e[10]=p,e[11]=d):d=e[11];let f;e[12]!==c||e[13]!==d?(f=(0,n.jsxs)("span",{className:"flex items-baseline gap-1.5",children:[c,d]}),e[12]=c,e[13]=d,e[14]=f):f=e[14];let u=s?.totalSubscriptions??0,h;e[15]!==u?(h=u.toLocaleString(),e[15]=u,e[16]=h):h=e[16];let g;e[17]!==a?(g=a("active subscriptions"),e[17]=a,e[18]=g):g=e[18];let x;e[19]!==h||e[20]!==g?(x=(0,n.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:[h," ",g]}),e[19]=h,e[20]=g,e[21]=x):x=e[21];let b;return e[22]!==x||e[23]!==l||e[24]!==f?(b=(0,n.jsx)(T,{"data-testid":"home-live-connections",children:(0,n.jsxs)(He,{className:"flex flex-col gap-2.5 py-4",children:[l,f,x]})}),e[22]=x,e[23]=l,e[24]=f,e[25]=b):b=e[25],b},"It"),Tt=m(t=>{let e=(0,S.c)(7),{entries:s}=t,a=$(),r;if(e[0]!==s||e[1]!==a){let l=Date.now(),o;e[3]!==a?(o=a("Recent activity"),e[3]=a,e[4]=o):o=e[4];let i;e[5]!==o?(i=(0,n.jsx)("div",{className:"border-b border-border px-4 py-3",children:(0,n.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:o})}),e[5]=o,e[6]=i):i=e[6],r=(0,n.jsxs)(T,{className:"gap-0 py-0","data-testid":"home-recent-activity",children:[i,s.length===0?(0,n.jsx)("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:a("No recent activity.")}):(0,n.jsx)("ul",{className:"divide-y divide-border",children:s.slice(0,5).map(c=>(0,n.jsxs)("li",{className:"flex items-center justify-between gap-3 px-4 py-2 text-[13px]",children:[(0,n.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,n.jsx)("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-muted-foreground/40"}),(0,n.jsxs)("span",{className:"truncate text-foreground",children:[c.op,c.table!==void 0&&(0,n.jsxs)("span",{className:"text-muted-foreground",children:[" \xB7 ",c.table,c.id===void 0?"":`#${c.id}`]})]})]}),(0,n.jsx)("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:At(c.ts,l)})]},c.seq))})]}),e[0]=s,e[1]=a,e[2]=r}else r=e[2];return r},"Tt"),Ot=m(t=>{let e=t.reduce((s,a)=>s+a.calls,0);return e===0?null:t.reduce((s,a)=>s+a.totalDurationMs,0)/e},"jt"),Gt=m(t=>{let e=(0,S.c)(151),{initialShardKey:s}=t,a=$(),r=Ee(),l=s??"",o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={},e[0]=o):o=e[0];let i;e[1]!==l?(i={shardKey:l},e[1]=l,e[2]=i):i=e[2];let c=ke(D.getMetrics,o,i),p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p={},e[3]=p):p=e[3];let d;e[4]!==l?(d={shardKey:l},e[4]=l,e[5]=d):d=e[5];let f=ke(D.getFunctionStats,p,d),u,h;e[6]===Symbol.for("react.memo_cache_sentinel")?(u={},h={shardKey:""},e[6]=u,e[7]=h):(u=e[6],h=e[7]);let g=ke(D.getSecurityAudit,u,h),x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x={},e[8]=x):x=e[8];let b;e[9]!==l?(b={shardKey:l},e[9]=l,e[10]=b):b=e[10];let y=ke(D.listSubscriptions,x,b),k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k={},e[11]=k):k=e[11];let A;e[12]!==l?(A={shardKey:l},e[12]=l,e[13]=A):A=e[13];let w=ke(D.getAuditLog,k,A),v=c.data??null,M,I,N,_,C,j,P,O,q,V,W,E,R,K,B,F,U,H;if(e[14]!==w.data||e[15]!==g.data||e[16]!==v||e[17]!==c.data||e[18]!==r||e[19]!==f.data||e[20]!==y.data||e[21]!==a){_=Array.isArray(f.data?.functions)?f.data.functions:[],P=y.data??null;let Le;e[40]!==w.data?(Le=Array.isArray(w.data?.entries)?w.data.entries:[],e[40]=w.data,e[41]=Le):Le=e[41],I=Le,C=c.data===void 0||f.data===void 0?null:nt(v,_).length,j=Array.isArray(g.data?.findings)?g.data.findings.length:null;let Ae;e[42]!==r?(Ae=m(()=>{Se(r({to:"/security"}))},"Me"),e[42]=r,e[43]=Ae):Ae=e[43],H=Ae;let Ce;e[44]!==r?(Ce=m(()=>{Se(r({to:"/insights"}))},"Ae"),e[44]=r,e[45]=Ce):Ce=e[45],U=Ce;let $e=rt(v?.history,"calls"),je=rt(v?.history,"errors"),Ge=Ot(_),Te=Math.max(0,..._.map(Kt)),z=v?.cache,Oe;e[46]!==z?(Oe=z!=null&&z.hits+z.misses>0?Math.round(z.hits/(z.hits+z.misses)*100):null,e[46]=z,e[47]=Oe):Oe=e[47],N=Oe,B="flex flex-col gap-6",F="lunora-home",W="grid gap-3 sm:grid-cols-2 xl:grid-cols-4",E="home-health";let Ke=lt($e),ye;e[48]!==a?(ye=a("Requests"),e[48]=a,e[49]=ye):ye=e[49];let ze=v?.requests??0,ve;e[50]!==ze?(ve=ze.toLocaleString(),e[50]=ze,e[51]=ve):ve=e[51],e[52]!==$e||e[53]!==Ke||e[54]!==ye||e[55]!==ve?(R=(0,n.jsx)(qe,{delta:Ke,label:ye,trend:$e,value:ve}),e[52]=$e,e[53]=Ke,e[54]=ye,e[55]=ve,e[56]=R):R=e[56];let De=lt(je,!1),Ne;e[57]!==a?(Ne=a("Errors"),e[57]=a,e[58]=Ne):Ne=e[58];let Pe=v?.errors??0,_e;e[59]!==Pe?(_e=Pe.toLocaleString(),e[59]=Pe,e[60]=_e):_e=e[60],e[61]!==je||e[62]!==De||e[63]!==Ne||e[64]!==_e?(K=(0,n.jsx)(qe,{delta:De,label:Ne,trend:je,value:_e}),e[61]=je,e[62]=De,e[63]=Ne,e[64]=_e,e[65]=K):K=e[65],M=qe,e[66]!==Te||e[67]!==a?(O=Te>0?`${a("max")} ${Ze(Te)}`:void 0,e[66]=Te,e[67]=a,e[68]=O):O=e[68],e[69]!==a?(q=a("Avg latency"),e[69]=a,e[70]=q):q=e[70],V=Ge===null?"\u2014":Ze(Ge),e[14]=w.data,e[15]=g.data,e[16]=v,e[17]=c.data,e[18]=r,e[19]=f.data,e[20]=y.data,e[21]=a,e[22]=M,e[23]=I,e[24]=N,e[25]=_,e[26]=C,e[27]=j,e[28]=P,e[29]=O,e[30]=q,e[31]=V,e[32]=W,e[33]=E,e[34]=R,e[35]=K,e[36]=B,e[37]=F,e[38]=U,e[39]=H}else M=e[22],I=e[23],N=e[24],_=e[25],C=e[26],j=e[27],P=e[28],O=e[29],q=e[30],V=e[31],W=e[32],E=e[33],R=e[34],K=e[35],B=e[36],F=e[37],U=e[38],H=e[39];let J;e[71]!==M||e[72]!==O||e[73]!==q||e[74]!==V?(J=(0,n.jsx)(M,{footer:O,label:q,value:V}),e[71]=M,e[72]=O,e[73]=q,e[74]=V,e[75]=J):J=e[75];let Z;e[76]!==N||e[77]!==a?(Z=N===null?void 0:`${String(N)}% ${a("cache hit")}`,e[76]=N,e[77]=a,e[78]=Z):Z=e[78];let G;e[79]!==a?(G=a("Database size"),e[79]=a,e[80]=G):G=e[80];let Re=v?.databaseSize??null,Y;e[81]!==Re?(Y=et(Re),e[81]=Re,e[82]=Y):Y=e[82];let Q;e[83]!==Z||e[84]!==G||e[85]!==Y?(Q=(0,n.jsx)(qe,{footer:Z,label:G,value:Y}),e[83]=Z,e[84]=G,e[85]=Y,e[86]=Q):Q=e[86];let X;e[87]!==W||e[88]!==E||e[89]!==R||e[90]!==K||e[91]!==J||e[92]!==Q?(X=(0,n.jsxs)("div",{className:W,"data-testid":E,children:[R,K,J,Q]}),e[87]=W,e[88]=E,e[89]=R,e[90]=K,e[91]=J,e[92]=Q,e[93]=X):X=e[93];let we;e[94]===Symbol.for("react.memo_cache_sentinel")?(we=(0,n.jsx)(bt,{}),e[94]=we):we=e[94];let ee;e[95]!==_?(ee=(0,n.jsx)("div",{className:"lg:col-span-2",children:(0,n.jsx)($t,{functions:_})}),e[95]=_,e[96]=ee):ee=e[96];let te;e[97]!==P?(te=(0,n.jsx)(jt,{subs:P}),e[97]=P,e[98]=te):te=e[98];let ae;e[99]!==I?(ae=(0,n.jsx)(Tt,{entries:I}),e[99]=I,e[100]=ae):ae=e[100];let ne;e[101]!==te||e[102]!==ae?(ne=(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[te,ae]}),e[101]=te,e[102]=ae,e[103]=ne):ne=e[103];let se;e[104]!==ee||e[105]!==ne?(se=(0,n.jsxs)("div",{className:"grid gap-3 lg:grid-cols-3",children:[ee,ne]}),e[104]=ee,e[105]=ne,e[106]=se):se=e[106];let re;e[107]!==a?(re=a("Advisors"),e[107]=a,e[108]=re):re=e[108];let le;e[109]!==re?(le=(0,n.jsx)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:re}),e[109]=re,e[110]=le):le=e[110];let oe;e[111]!==C||e[112]!==j||e[113]!==a||e[114]!==U||e[115]!==H?(oe=j===0&&C===0?(0,n.jsx)(Ye,{description:a("No security or performance issues detected."),icon:(0,n.jsxs)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,n.jsx)("path",{d:"M12 3 4 6v5c0 5 3.4 8.5 8 10 4.6-1.5 8-5 8-10V6l-8-3Z"}),(0,n.jsx)("path",{d:"m9 12 2 2 4-4"})]}),testId:"home-advisors-clear",title:a("No issues found")}):(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,n.jsx)(ot,{count:j,onView:H,testId:"home-security",title:a("Security findings")}),(0,n.jsx)(ot,{count:C,onView:U,testId:"home-performance",title:a("Performance issues")})]}),e[111]=C,e[112]=j,e[113]=a,e[114]=U,e[115]=H,e[116]=oe):oe=e[116];let ie;e[117]!==le||e[118]!==oe?(ie=(0,n.jsxs)("section",{className:"flex flex-col gap-3","data-testid":"home-advisors",children:[le,oe]}),e[117]=le,e[118]=oe,e[119]=ie):ie=e[119];let ce;e[120]!==a?(ce=a("Get connected"),e[120]=a,e[121]=ce):ce=e[121];let de;e[122]!==ce?(de=(0,n.jsx)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:ce}),e[122]=ce,e[123]=de):de=e[123];let me;e[124]!==a?(me=a("Client SDK"),e[124]=a,e[125]=me):me=e[125];let ue;e[126]!==me?(ue=(0,n.jsx)(Je,{command:"npm i @lunora/client",label:me}),e[126]=me,e[127]=ue):ue=e[127];let pe;e[128]!==a?(pe=a("React"),e[128]=a,e[129]=pe):pe=e[129];let fe;e[130]!==pe?(fe=(0,n.jsx)(Je,{command:"npm i @lunora/react",label:pe}),e[130]=pe,e[131]=fe):fe=e[131];let he;e[132]!==a?(he=a("CLI"),e[132]=a,e[133]=he):he=e[133];let ge;e[134]!==he?(ge=(0,n.jsx)(Je,{command:"lunora dev",label:he}),e[134]=he,e[135]=ge):ge=e[135];let xe;e[136]!==ue||e[137]!==fe||e[138]!==ge?(xe=(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-3",children:[ue,fe,ge]}),e[136]=ue,e[137]=fe,e[138]=ge,e[139]=xe):xe=e[139];let Me;e[140]===Symbol.for("react.memo_cache_sentinel")?(Me=(0,n.jsx)(It,{}),e[140]=Me):Me=e[140];let be;e[141]!==de||e[142]!==xe?(be=(0,n.jsxs)("section",{className:"flex flex-col gap-3","data-testid":"home-get-connected",children:[de,xe,Me]}),e[141]=de,e[142]=xe,e[143]=be):be=e[143];let Ie;return e[144]!==B||e[145]!==F||e[146]!==X||e[147]!==se||e[148]!==ie||e[149]!==be?(Ie=(0,n.jsxs)("div",{className:B,"data-testid":F,children:[X,we,se,ie,be]}),e[144]=B,e[145]=F,e[146]=X,e[147]=se,e[148]=ie,e[149]=be,e[150]=Ie):Ie=e[150],Ie},"Zt");function qt(t,e){return e.calls-t.calls}m(qt,"Ot");function Rt(t){return(0,n.jsxs)("div",{className:"grid grid-cols-[1fr_auto_auto_auto] items-center gap-4 px-4 py-2 text-[13px]",children:[(0,n.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:t.path}),(0,n.jsx)("span",{className:"text-end tabular-nums",children:t.calls.toLocaleString()}),(0,n.jsx)("span",{className:"w-12 text-end tabular-nums text-muted-foreground",children:Ze(t.calls>0?t.totalDurationMs/t.calls:0)}),(0,n.jsx)("span",{className:Be("w-8 text-end tabular-nums",t.errors>0?"text-destructive":"text-muted-foreground"),children:t.errors})]},t.path)}m(Rt,"Rt");function Kt(t){return t.maxDurationMs}m(Kt,"qt");export{ft as a,Gt as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as w}from"./chunk-FXCBF4XT.js";import"./chunk-2OUPA2WJ.js";import{b}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as S}from"./chunk-322ZP3GW.js";import"./chunk-XXQUMVWH.js";import"./chunk-P4BOVBMR.js";import"./chunk-QLQADHFE.js";import{a as f}from"./chunk-VDW32UET.js";import{c as p}from"./chunk-BQNVN2OD.js";import"./chunk-M3NGYXDR.js";import"./chunk-XBDKZZ67.js";import{a as T}from"./chunk-XQCVZAGU.js";import{a as C,b as j,c as I,d as m,e as n,f as o}from"./chunk-WJQLNYGX.js";import{a as A,e as k}from"./chunk-WQH3LT2P.js";import{d as B,r as M}from"./chunk-IUYFXK4X.js";import"./chunk-YC52XCPK.js";import{a as i,e as z,f as W,h as X}from"./chunk-3XIESWL4.js";var D=z(W(),1);var e=z(X(),1);var F="agent_threads",Y="agent_messages",Z=100,ee=250,te={},ae={filters:[],limit:Z,offset:0,orderBy:{column:"updatedAt",direction:"desc"},skipCount:!0,table:F},l=i((s,t)=>{let a=s[t];return typeof a=="string"?a:void 0},"l"),K=i((s,t)=>{let a=s[t];return typeof a=="number"?a:void 0},"b"),P=i(s=>{let{usage:t}=s;if(t===null||typeof t!="object")return;let{totalTokens:a}=t;return typeof a=="number"?a:void 0},"z"),re=i(s=>{let{toolCalls:t}=s;return Array.isArray(t)?t.map(a=>a!==null&&typeof a=="object"?a.name:void 0).filter(a=>typeof a=="string"):[]},"ee"),se=i(s=>{switch(s){case"awaiting_input":return"warning";case"cancelled":return"warning";case"error":return"destructive";case"running":return"info";default:return"outline"}},"te"),ne=i(s=>{switch(s){case"approved":return"success";case"rejected":return"destructive";default:return"warning"}},"ae"),fe=i(({initialShardKey:s=""})=>{let t=B(),[a,$]=(0,D.useState)(void 0),{data:x}=p(f.listTables,te,{live:!0,shardKey:s}),L=x!==void 0,u=Array.isArray(x)&&x.some(r=>r.name===F),{data:U,error:O,errorSource:R,liveError:G}=p(f.readTablePage,ae,{enabled:u,live:!0,shardKey:s}),H={filters:[{column:"threadKey",operator:"eq",value:a??""}],limit:ee,offset:0,orderBy:{column:"seq",direction:"asc"},skipCount:!0,table:Y},{data:_,error:J,errorSource:Q}=p(f.readTablePage,H,{enabled:u&&a!==void 0,live:!0,shardKey:s}),v=Array.isArray(U?.rows)?U.rows:[],q=Array.isArray(_?.rows)?_.rows:[],E=v.find(r=>l(r,"key")===a),h;return L&&!u?h=(0,e.jsx)(T,{description:t("No @lunora/agent tables found in this deployment. Add lunora/agents.ts with defineAgent(...) and merge the agent schema extension to run durable AI agents."),testId:"agents-unconfigured",title:t("No agents configured")}):u&&v.length===0?h=(0,e.jsx)(T,{description:t("No agent has run yet. Start a run with ctx.agents.<name>.run(...) and its thread appears here."),testId:"agents-empty",title:t("No agent threads yet")}):h=(0,e.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,e.jsx)(A,{className:"overflow-hidden py-0",children:(0,e.jsx)(k,{className:"px-0",children:(0,e.jsxs)(C,{"data-testid":"agents-threads-table",children:[(0,e.jsx)(j,{children:(0,e.jsxs)(m,{children:[(0,e.jsx)(n,{children:t("Agent")}),(0,e.jsx)(n,{children:t("Key")}),(0,e.jsx)(n,{children:t("Status")}),(0,e.jsx)(n,{children:t("Messages")}),(0,e.jsx)(n,{children:t("Tokens")}),(0,e.jsx)(n,{children:t("Updated")}),(0,e.jsx)(n,{"aria-label":t("Actions")})]})}),(0,e.jsx)(I,{children:v.map(r=>{let d=l(r,"key")??"",c=l(r,"status"),g=P(r);return(0,e.jsxs)(m,{"data-active":d===a?"":void 0,"data-testid":`agents-thread-${d}`,children:[(0,e.jsx)(o,{className:"font-mono text-xs",children:l(r,"agent")??"\u2014"}),(0,e.jsx)(o,{className:"font-mono text-xs text-muted-foreground",children:d}),(0,e.jsx)(o,{children:(0,e.jsx)(b,{"data-testid":`agents-thread-status-${d}`,variant:se(c),children:c??"\u2014"})}),(0,e.jsx)(o,{className:"tabular-nums",children:K(r,"messageCount")??"\u2014"}),(0,e.jsx)(o,{className:"tabular-nums text-muted-foreground",children:g??"\u2014"}),(0,e.jsx)(o,{className:"text-muted-foreground tabular-nums",children:M(K(r,"updatedAt"),"\u2014")}),(0,e.jsx)(o,{className:"text-right",children:(0,e.jsx)(w,{"data-testid":`agents-thread-open-${d}`,onClick:i(()=>{$(d)},"onClick"),size:"sm",type:"button",variant:"outline",children:t("Timeline")})})]},d)})})]})})}),J!==null&&(0,e.jsx)(S,{error:Q,testId:"agents-messages-error"}),a!==void 0&&(0,e.jsx)(A,{className:"overflow-hidden py-0","data-testid":"agents-thread-detail",children:(0,e.jsxs)(k,{className:"flex flex-col gap-3 px-4 py-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsxs)("span",{className:"font-mono text-xs",children:[t("Timeline")," \xB7 ",a,E!==void 0&&(0,e.jsxs)("span",{className:"text-muted-foreground",children:[" \xB7 ",t("Usage"),": ",P(E)??0," ",t("Tokens")]})]}),(0,e.jsx)(w,{"data-testid":"agents-thread-detail-close",onClick:i(()=>{$(void 0)},"onClick"),size:"xs",type:"button",variant:"ghost",children:t("Close")})]}),q.length===0?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:t("This thread has no messages yet.")}):(0,e.jsxs)(C,{"data-testid":"agents-messages-table",children:[(0,e.jsx)(j,{children:(0,e.jsxs)(m,{children:[(0,e.jsx)(n,{children:t("Role")}),(0,e.jsx)(n,{children:t("Content")}),(0,e.jsx)(n,{children:t("Tool")}),(0,e.jsx)(n,{children:t("Approval")})]})}),(0,e.jsx)(I,{children:q.map((r,d)=>{let c=l(r,"role")??"\u2014",g=re(r),V=l(r,"toolName"),y=l(r,"status"),N=K(r,"seq")??d;return(0,e.jsxs)(m,{"data-testid":`agents-message-${String(N)}`,children:[(0,e.jsx)(o,{className:"font-mono text-xs align-top text-muted-foreground",children:c}),(0,e.jsx)(o,{className:"max-w-md font-mono text-xs whitespace-pre-wrap break-words",children:l(r,"content")??"\u2014"}),(0,e.jsx)(o,{className:"font-mono text-xs align-top text-muted-foreground",children:V??(g.length>0?g.join(", "):"\u2014")}),(0,e.jsx)(o,{className:"align-top",children:y===void 0?(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:"\u2014"}):(0,e.jsx)(b,{"data-testid":`agents-message-approval-${String(N)}`,variant:ne(y),children:y})})]},l(r,"messageKey")??`${c}:${String(N)}`)})})]})]})})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-agents-panel",children:[O!==null&&(0,e.jsx)(S,{error:R,testId:"agents-error"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:t("Agents run as durable workflows. Each run persists a thread of assistant and tool messages; select a thread to inspect its timeline, tool calls, approvals, and token usage.")}),G!==void 0&&(0,e.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-500","data-testid":"agents-live-error",role:"alert",children:t("Live updates unavailable; showing the last evaluation.")}),h]})},"pe");export{fe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i,e as v,g as j,h as I,j as k}from"./chunk-3XIESWL4.js";var y=v(j(),1);var h=v(I(),1);var z={dialog:"fixed inset-0 z-[1000] flex justify-center bg-black/20 pt-[10vh]",drawer:"fixed inset-0 z-[1000] flex justify-end bg-black/20"},C={dialog:"flex h-fit w-[min(28rem,92vw)] flex-col gap-3 rounded-lg border border-border bg-background p-4 shadow-xl",drawer:"flex h-full w-[min(34rem,100vw)] flex-col gap-4 overflow-auto border-l border-border bg-background p-4 shadow-xl"},D=i(N=>{let e=(0,y.c)(18),{className:n,children:c,label:b,onClose:r,panelTestId:f,testId:g,variant:u}=N,o;e[0]!==r?(o=i(s=>{s.target===s.currentTarget&&r()},"t"),e[0]=r,e[1]=o):o=e[1];let m=o,t;e[2]!==r?(t=i(s=>{s.key==="Escape"&&r()},"a"),e[2]=r,e[3]=t):t=e[3];let p=t,x=z[u],w=C[u],l;e[4]!==n||e[5]!==w?(l=k(w,n),e[4]=n,e[5]=w,e[6]=l):l=e[6];let a;e[7]!==c||e[8]!==b||e[9]!==f||e[10]!==l?(a=(0,h.jsx)("div",{"aria-label":b,className:l,"data-testid":f,role:"dialog",children:c}),e[7]=c,e[8]=b,e[9]=f,e[10]=l,e[11]=a):a=e[11];let d;return e[12]!==m||e[13]!==p||e[14]!==x||e[15]!==a||e[16]!==g?(d=(0,h.jsx)("div",{className:x,"data-testid":g,onClick:m,onKeyDown:p,role:"presentation",children:a}),e[12]=m,e[13]=p,e[14]=x,e[15]=a,e[16]=g,e[17]=d):d=e[17],d},"I");export{D as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{R as Q}from"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import{c as W}from"./chunk-FXCBF4XT.js";import"./chunk-2OUPA2WJ.js";import"./chunk-6ST5ECQA.js";import{f as F}from"./chunk-M3NGYXDR.js";import"./chunk-XBDKZZ67.js";import{a as Z}from"./chunk-XQCVZAGU.js";import{a as q,b as L,c as B,d as f,e as c,f as d}from"./chunk-WJQLNYGX.js";import{a as I,e as j}from"./chunk-WQH3LT2P.js";import{d as K,h as S,m as $,o as V}from"./chunk-IUYFXK4X.js";import"./chunk-YC52XCPK.js";import{a as h,e as C,f as R,g as P,h as U}from"./chunk-3XIESWL4.js";var A=C(P(),1);var n=C(R(),1);var e=C(U(),1);var X=10,b=h(v=>{let l=(0,A.c)(7),{label:m,value:a}=v,r;l[0]!==m?(r=(0,e.jsx)("span",{className:"font-mono text-[11px] uppercase tracking-wide text-muted-foreground",children:m}),l[0]=m,l[1]=r):r=l[1];let p=a??"\u2014",s;l[2]!==p?(s=(0,e.jsx)("span",{className:"font-mono text-sm",children:p}),l[2]=p,l[3]=s):s=l[3];let u;return l[4]!==r||l[5]!==s?(u=(0,e.jsxs)("div",{className:"flex flex-col gap-0.5",children:[r,s]}),l[4]=r,l[5]=s,l[6]=u):u=l[6],u},"g"),se=h(({loadIndexes:v,runQuery:l}={})=>{let m=F(),a=K(),[r,p]=(0,n.useState)(null),[s,u]=(0,n.useState)(null),[N,E]=(0,n.useState)(null),[g,D]=(0,n.useState)(""),[x,y]=(0,n.useState)(null),[M,w]=(0,n.useState)(null),[T,z]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let t={cancelled:!1};return V((async()=>{try{let i=await(v??(()=>m.listVectorIndexes()))();t.cancelled||(p(i),u(null),E(k=>k??i[0]?.name??null))}catch(i){t.cancelled||(p(null),u(S(i)))}})()),()=>{t.cancelled=!0}},[m,v]);let o=r?.find(t=>t.name===N)??null,G=h(t=>{E(t.currentTarget.dataset.index??null),y(null),w(null)},"K"),H=h(t=>{D(t.target.value)},"T"),J=h(async()=>{let t=g.trim();if(!(N===null||t==="")){z(!0),w(null);try{let i=await(l??(k=>m.queryVectorIndex(k)))({name:N,text:t,topK:X});y(i)}catch(i){y(null),w(S(i))}z(!1)}},"Z"),O=h(()=>{V(J())},"z");return(0,e.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-vector-browser",children:[s!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"vector-error",role:"alert",children:s}),r!==null&&r.length===0&&(0,e.jsx)(Z,{description:a("Indexes declared with .vectorize() or defineVectorIndex() appear here."),icon:(0,e.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,e.jsx)("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"})}),testId:"vector-empty",title:a("No vector indexes.")}),r!==null&&r.length>0&&(0,e.jsx)(I,{className:"overflow-hidden py-0",children:(0,e.jsx)(j,{className:"px-0",children:(0,e.jsxs)(q,{"data-testid":"vector-table",children:[(0,e.jsx)(L,{children:(0,e.jsxs)(f,{children:[(0,e.jsx)(c,{children:a("name")}),(0,e.jsx)(c,{children:a("table")}),(0,e.jsx)(c,{children:a("dimensions")}),(0,e.jsx)(c,{children:a("metric")}),(0,e.jsx)(c,{children:a("vectors")})]})}),(0,e.jsx)(B,{children:r.map(t=>(0,e.jsxs)(f,{className:t.name===N?"border-l-2 border-l-royal-amethyst bg-muted/50":"cursor-pointer","data-index":t.name,"data-testid":`vector-row-${t.name}`,onClick:G,children:[(0,e.jsx)(d,{className:"font-mono text-xs",children:t.name}),(0,e.jsx)(d,{className:"font-mono text-xs",children:t.table}),(0,e.jsx)(d,{className:"tabular-nums",children:t.dimensions??"\u2014"}),(0,e.jsx)(d,{children:t.metric??"\u2014"}),(0,e.jsx)(d,{className:"tabular-nums",children:t.vectorsCount??"\u2014"})]},t.name))})]})})}),o!==null&&(0,e.jsxs)("section",{className:"border border-border bg-card p-3","data-testid":"vector-detail",children:[(0,e.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[(0,e.jsx)(b,{label:a("field"),value:o.field}),(0,e.jsx)(b,{label:a("dimensions"),value:o.dimensions}),(0,e.jsx)(b,{label:a("metric"),value:o.metric}),(0,e.jsx)(b,{label:a("vectors"),value:o.vectorsCount})]}),o.metadata!==void 0&&o.metadata.length>0&&(0,e.jsxs)("p",{className:"mt-3 text-xs text-muted-foreground","data-testid":"vector-metadata",children:[a("metadata"),": ",(0,e.jsx)("span",{className:"font-mono",children:o.metadata.join(", ")})]}),(0,e.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[(0,e.jsx)(Q,{className:"min-w-[18rem] flex-1","data-testid":"vector-query-input",onChange:H,placeholder:a("Search by similarity\u2026"),value:g}),(0,e.jsx)(W,{"data-testid":"vector-search",disabled:T||g.trim()==="",onClick:O,children:a(T?"Searching\u2026":"Search")})]}),M!==null&&(0,e.jsx)("p",{className:"mt-2 text-sm text-destructive","data-testid":"vector-query-error",role:"alert",children:M}),x!==null&&x.length===0&&(0,e.jsx)("p",{className:"mt-2 text-sm text-muted-foreground","data-testid":"vector-no-matches",children:a("No matches.")}),x!==null&&x.length>0&&(0,e.jsx)(I,{className:"mt-3 overflow-hidden py-0",children:(0,e.jsx)(j,{className:"px-0",children:(0,e.jsxs)(q,{"data-testid":"vector-matches",children:[(0,e.jsx)(L,{children:(0,e.jsxs)(f,{children:[(0,e.jsx)(c,{children:a("id")}),(0,e.jsx)(c,{children:a("score")}),(0,e.jsx)(c,{children:a("metadata")})]})}),(0,e.jsx)(B,{children:x.map(t=>(0,e.jsxs)(f,{"data-testid":`vector-match-${t.id}`,children:[(0,e.jsx)(d,{className:"font-mono text-xs",children:t.id}),(0,e.jsx)(d,{className:"tabular-nums",children:t.score.toFixed(4)}),(0,e.jsx)(d,{className:"max-w-md truncate font-mono text-xs",children:t.metadata===void 0?"\u2014":$(t.metadata)})]},t.id))})]})})})]})]})},"ce");export{se as VectorBrowser};
|