@lunora/studio 1.0.0-alpha.59 → 1.0.0-alpha.60
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/dist/index.d.ts +1 -1
- package/dist/index.js +1 -43
- package/dist/mount.js +1 -27
- package/dist/packem_chunks/ApiTab.js +1 -251
- package/dist/packem_chunks/AuditPanel.js +1 -200
- package/dist/packem_chunks/DeploymentHealthPanel.js +1 -664
- package/dist/packem_chunks/ExportImportPanel.js +3 -198
- package/dist/packem_chunks/FileBrowser.js +4 -2955
- package/dist/packem_chunks/FunctionRunner.js +1 -326
- package/dist/packem_chunks/FunctionStatsPanel.js +1 -377
- package/dist/packem_chunks/HealthPanel.js +1 -648
- package/dist/packem_chunks/InsightsPanel.js +1 -462
- package/dist/packem_chunks/LogsPanel.js +1 -1303
- package/dist/packem_chunks/MailPanel.js +2 -353
- package/dist/packem_chunks/MetricsPanel.js +1 -1960
- package/dist/packem_chunks/MigrationsPanel.js +1 -239
- package/dist/packem_chunks/NotificationsPanel.js +1 -306
- package/dist/packem_chunks/PitrPanel.js +1 -252
- package/dist/packem_chunks/SchemaViewer.js +1 -2512
- package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -95
- package/dist/packem_chunks/SettingsPanel.js +1 -391
- package/dist/packem_chunks/SqlEditorPanel.js +4 -2340
- package/dist/packem_chunks/TableEditor.js +1 -290
- package/dist/packem_chunks/agents-panel.js +1 -326
- package/dist/packem_chunks/analytics-panel.js +1 -261
- package/dist/packem_chunks/auth-audit-panel.js +1 -247
- package/dist/packem_chunks/auth-config-panel.js +1 -365
- package/dist/packem_chunks/auth-sessions-panel.js +1 -175
- package/dist/packem_chunks/containers-panel.js +1 -261
- package/dist/packem_chunks/dashboards-panel.js +1 -781
- package/dist/packem_chunks/fanout-panel.js +1 -482
- package/dist/packem_chunks/flags-panel.js +1 -176
- package/dist/packem_chunks/issues-panel.js +1 -427
- package/dist/packem_chunks/kv-browser.js +1 -1896
- package/dist/packem_chunks/log-drains-panel.js +4 -273
- package/dist/packem_chunks/organizations-panel.js +1 -3209
- package/dist/packem_chunks/payments-panel.js +1 -213
- package/dist/packem_chunks/permissions-panel.js +1 -805
- package/dist/packem_chunks/queues-panel.js +1 -1075
- package/dist/packem_chunks/rls-panel.js +1 -315
- package/dist/packem_chunks/schedule-panel.js +1 -831
- package/dist/packem_chunks/sparkline.js +1 -79
- package/dist/packem_chunks/storage-rules-panel.js +1 -140
- package/dist/packem_chunks/subscriptions-panel.js +1 -238
- package/dist/packem_chunks/sync-client-panel.js +1 -0
- package/dist/packem_chunks/traces-panel.js +1 -747
- package/dist/packem_chunks/users-panel.js +1 -1731
- package/dist/packem_chunks/vector-browser.js +1 -281
- package/dist/packem_chunks/workflows-panel.js +1 -562
- package/dist/packem_shared/ADMIN_FUNCTIONS-BYNSbBVE.js +1 -0
- package/dist/packem_shared/ApiDocsPanel-eJYZlylw.js +2 -0
- package/dist/packem_shared/ApiReferencePanel-C42v1jr6.js +1 -0
- package/dist/packem_shared/CommandPalette-CVIaY3j8.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-B8J5lHjP.js +1 -0
- package/dist/packem_shared/DataFilters-Csb30F0C.js +1 -0
- package/dist/packem_shared/ErrorBoundary-DvzYskH7.js +1 -0
- package/dist/packem_shared/GlobalDataBrowser-RLJ6NvOs.js +1 -0
- package/dist/packem_shared/HomePanel-DL1HupAN.js +1 -0
- package/dist/packem_shared/OpenRpcReferencePanel-sGsIgYWj.js +1 -0
- package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.js +1 -0
- package/dist/packem_shared/ScheduledJobs-DUbo6epc.js +1 -0
- package/dist/packem_shared/ShardInput-BVn2iCU0.js +1 -0
- package/dist/packem_shared/Studio-BWBclm_C.js +1 -0
- package/dist/packem_shared/StudioApp-BFm73yVr.js +1 -0
- package/dist/packem_shared/StudioI18nProvider-CZ5h4nrV.js +1 -0
- package/dist/packem_shared/advisor-view-DaCX9Jy5.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/badge-BbuuAio7.js +1 -0
- package/dist/packem_shared/bar-chart-AryFCeoa.js +9 -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-CIDGUN6K.js +1 -0
- package/dist/packem_shared/cf-links-gbDy51nR.js +1 -0
- package/dist/packem_shared/checkbox-StT4Gob6.js +1 -0
- package/dist/packem_shared/data-grid-BMBKzMEJ.js +1 -0
- package/dist/packem_shared/data-view-params-C8T3bW1z.js +1 -0
- package/dist/packem_shared/dropdown-menu-C3RQ_HlW.js +2 -0
- package/dist/packem_shared/empty-state-Cg7t_8qu.js +1 -0
- package/dist/packem_shared/error-alert-B59DnrDI.js +1 -0
- package/dist/packem_shared/grid-features-uZCUj955.js +6 -0
- package/dist/packem_shared/home-panel-B-8BCffw.js +3 -0
- package/dist/packem_shared/input-JHu63lTv.js +1 -0
- package/dist/packem_shared/internal-AtZ4bTal.js +2 -0
- package/dist/packem_shared/label-6uP1obNF.js +1 -0
- package/dist/packem_shared/live-status-CGW2JHf_.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/reference-view-KvhektwF.js +12 -0
- package/dist/packem_shared/result-chart-CwKhhKM0.js +1 -0
- package/dist/packem_shared/scroll-area-DTEq6Jec.js +2 -0
- package/dist/packem_shared/select-Bul-DeII.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-DtcZoU48.js +1 -0
- package/dist/packem_shared/storage-tier-DznqOf-q.js +1 -0
- package/dist/packem_shared/studio-BHA7hnI3.js +2 -0
- package/dist/packem_shared/table-DdJBrClo.js +2 -0
- package/dist/packem_shared/table-list-sidebar-CMCcNALK.js +1 -0
- package/dist/packem_shared/textarea-Bu2-jKAs.js +1 -0
- package/dist/packem_shared/trace-handoff-Dw7mwjxu.js +1 -0
- package/dist/packem_shared/use-admin-query-Di3fLE8H.js +1 -0
- package/dist/packem_shared/use-async-submit-H68GHPz8.js +1 -0
- package/dist/packem_shared/useDebounced-Ihdiid_k.js +1 -0
- package/dist/packem_shared/utils-bhneXptQ.js +1 -0
- package/dist/packem_shared/virtual-rect-1o1veP7R.js +1 -0
- package/dist/standalone/chunk-23HKRH5H.js +13 -0
- package/dist/standalone/chunk-2A4RKII2.js +1 -0
- package/dist/standalone/chunk-3DTM4GI5.js +1 -0
- package/dist/standalone/chunk-3MHKT76P.js +1 -0
- package/dist/standalone/chunk-46IB4C4Q.js +1 -0
- package/dist/standalone/chunk-4AYEV5UN.js +1 -0
- package/dist/standalone/chunk-4FNHHFWR.js +1 -0
- package/dist/standalone/chunk-6CLVIOCB.js +1 -0
- package/dist/standalone/chunk-6I62RSI5.js +1 -0
- package/dist/standalone/chunk-6OKDCV7J.js +1 -0
- package/dist/standalone/chunk-6P7HIPUE.js +1 -0
- package/dist/standalone/chunk-6UYILUSX.js +1 -0
- package/dist/standalone/chunk-725RLB7D.js +1 -0
- package/dist/standalone/chunk-7AZZ7OJO.js +1 -0
- package/dist/standalone/chunk-7CRLAMGB.js +1 -0
- package/dist/standalone/chunk-7Z5QEFR4.js +2 -0
- package/dist/standalone/chunk-AGVJJQFL.js +1 -0
- package/dist/standalone/chunk-AKTGRZXN.js +1 -0
- package/dist/standalone/chunk-BAIN7UJ4.js +1 -0
- package/dist/standalone/chunk-BHWSIIDT.js +1 -0
- package/dist/standalone/{chunk-L7SK4ZZD.js → chunk-C4O5UR4Y.js} +1 -1
- package/dist/standalone/chunk-C4VURT57.js +1 -0
- package/dist/standalone/chunk-CKO3F55C.js +4 -0
- package/dist/standalone/chunk-CVMRZUF5.js +4 -0
- package/dist/standalone/chunk-CWWGDW4V.js +1 -0
- package/dist/standalone/chunk-CYET4BRZ.js +1 -0
- package/dist/standalone/chunk-CZEUVNCQ.js +1 -0
- package/dist/standalone/chunk-FXFK4M4E.js +1 -0
- package/dist/standalone/chunk-FYAJPWE7.js +1 -0
- package/dist/standalone/chunk-GS7OBQO5.js +1 -0
- package/dist/standalone/chunk-GTXVH7I5.js +1 -0
- package/dist/standalone/chunk-H6SIM4BT.js +1 -0
- package/dist/standalone/chunk-H6WOFY6A.js +8 -0
- package/dist/standalone/chunk-HA34GYEX.js +1 -0
- package/dist/standalone/chunk-HMIOF5GV.js +1 -0
- package/dist/standalone/chunk-HY46NTNW.js +6 -0
- package/dist/standalone/chunk-IBCKC2BO.js +1 -0
- package/dist/standalone/chunk-ICKBVXPP.js +1 -0
- package/dist/standalone/chunk-IE4ROTQD.js +1 -0
- package/dist/standalone/chunk-IYYTWZ2E.js +2 -0
- package/dist/standalone/chunk-J2LMP2A7.js +1 -0
- package/dist/standalone/chunk-JC6WYIHM.js +1 -0
- package/dist/standalone/chunk-JKPK25JO.js +1 -0
- package/dist/standalone/chunk-JLFCXBNQ.js +1 -0
- package/dist/standalone/chunk-JRWBGR5B.js +1 -0
- package/dist/standalone/chunk-K5PFWU5J.js +1 -0
- package/dist/standalone/chunk-KJTLW5W2.js +11 -0
- package/dist/standalone/{chunk-HBGS4SEX.js → chunk-KLLYGWNF.js} +9 -9
- package/dist/standalone/chunk-KNN3ZEQ7.js +1 -0
- package/dist/standalone/{chunk-4QHKBC77.js → chunk-KOC5KV3E.js} +1 -1
- package/dist/standalone/chunk-KSRXMTBV.js +1 -0
- package/dist/standalone/chunk-KYCAYNXM.js +1 -0
- package/dist/standalone/chunk-KZ2YUNMR.js +1 -0
- package/dist/standalone/chunk-LKHUVEHX.js +1 -0
- package/dist/standalone/chunk-LPOKAJT4.js +4 -0
- package/dist/standalone/chunk-MZEK4SGD.js +1 -0
- package/dist/standalone/chunk-NCCUM26H.js +1 -0
- package/dist/standalone/chunk-O62HJZV3.js +1 -0
- package/dist/standalone/chunk-OTJOI23O.js +62 -0
- package/dist/standalone/chunk-P2NBOUGZ.js +1 -0
- package/dist/standalone/chunk-P4J6XNG3.js +1 -0
- package/dist/standalone/chunk-PGDWFWH5.js +1 -0
- package/dist/standalone/chunk-PR2SE2MD.js +1 -0
- package/dist/standalone/chunk-PTTDIYGP.js +1 -0
- package/dist/standalone/chunk-PWDMXMRD.js +1 -0
- package/dist/standalone/chunk-Q34MSC2F.js +1 -0
- package/dist/standalone/chunk-Q5WXTZWX.js +1 -0
- package/dist/standalone/chunk-QC5HCNJZ.js +4 -0
- package/dist/standalone/chunk-QJKRHZYV.js +1 -0
- package/dist/standalone/chunk-R43KHQDA.js +1 -0
- package/dist/standalone/chunk-RC2K5RBE.js +1 -0
- package/dist/standalone/chunk-RE6UWCMG.js +1 -0
- package/dist/standalone/chunk-RUP3M2GF.js +3 -0
- package/dist/standalone/chunk-SA6MBPBL.js +1 -0
- package/dist/standalone/{chunk-BJGBHGK3.js → chunk-SEDZDNQF.js} +1 -1
- package/dist/standalone/chunk-SKHEGARW.js +1 -0
- package/dist/standalone/chunk-SKJZDOHG.js +1 -0
- package/dist/standalone/chunk-SNDYNCAA.js +1 -0
- package/dist/standalone/chunk-SZUHZ2OG.js +1 -0
- package/dist/standalone/chunk-TAE2H7PU.js +1 -0
- package/dist/standalone/chunk-TEIBKU46.js +1 -0
- package/dist/standalone/chunk-TO6NLVFD.js +1 -0
- package/dist/standalone/chunk-TYTJDFX2.js +1 -0
- package/dist/standalone/{chunk-LXULVPEM.js → chunk-UDZY7MKE.js} +3 -3
- package/dist/standalone/chunk-UHHTEBC3.js +1 -0
- package/dist/standalone/chunk-UNDFOYRI.js +1 -0
- package/dist/standalone/chunk-UNN4CESU.js +1 -0
- package/dist/standalone/chunk-UNXX5GQH.js +1 -0
- package/dist/standalone/{chunk-ZHVTQ37P.js → chunk-UREY4GLG.js} +1 -1
- package/dist/standalone/chunk-UWF5DOGV.js +1 -0
- package/dist/standalone/chunk-UY2Y5CXB.js +1 -0
- package/dist/standalone/{chunk-VLXV72QE.js → chunk-UZYGEOWY.js} +1 -1
- package/dist/standalone/chunk-V66TSUKV.js +1 -0
- package/dist/standalone/chunk-VEFNSN7P.js +1 -0
- package/dist/standalone/chunk-VUJGR4PB.js +1 -0
- package/dist/standalone/chunk-VUXJER3D.js +1 -0
- package/dist/standalone/chunk-W572365D.js +1 -0
- package/dist/standalone/chunk-WYFLGXZ3.js +3 -0
- package/dist/standalone/chunk-XDKFPBIL.js +1 -0
- package/dist/standalone/chunk-XRKCGQM2.js +1 -0
- package/dist/standalone/chunk-YNBJ6ICE.js +1 -0
- package/dist/standalone/chunk-YQ5PILIJ.js +1 -0
- package/dist/standalone/chunk-YT7VXQVX.js +1 -0
- package/dist/standalone/chunk-Z7MUQMLE.js +1 -0
- package/dist/standalone/chunk-ZFWEPGWG.js +1 -0
- package/dist/standalone/chunk-ZMFZRGAN.js +1 -0
- package/dist/standalone/studio.js +9 -214
- package/package.json +4 -4
- package/dist/packem_shared/ADMIN_FUNCTIONS-P2UzJscH.js +0 -62
- package/dist/packem_shared/ApiDocsPanel-DNDpeR5O.js +0 -842
- package/dist/packem_shared/ApiReferencePanel-ChlRsAXU.js +0 -230
- package/dist/packem_shared/CommandPalette-BpkopP5f.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-obTn4sKX.js +0 -4493
- package/dist/packem_shared/DataFilters-B1Q7mrt7.js +0 -253
- package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
- package/dist/packem_shared/GlobalDataBrowser-BCaohHZ5.js +0 -293
- package/dist/packem_shared/HomePanel-DCRj3hGB.js +0 -14
- package/dist/packem_shared/OpenRpcReferencePanel-CIeQE1aE.js +0 -192
- package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
- package/dist/packem_shared/ScheduledJobs-BQzQo84k.js +0 -262
- package/dist/packem_shared/ShardInput-CZnpHILL.js +0 -107
- package/dist/packem_shared/Studio-DnlPCbID.js +0 -16
- package/dist/packem_shared/StudioApp-CzqlB4zO.js +0 -708
- package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
- package/dist/packem_shared/advisor-view-D95sN-wO.js +0 -159
- package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
- package/dist/packem_shared/alert-CdAET2K_.js +0 -68
- package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
- package/dist/packem_shared/bar-chart-DSwcWIRy.js +0 -3246
- package/dist/packem_shared/browser-storage-L4gOP5gJ.js +0 -105
- package/dist/packem_shared/button-BhsN2uZH.js +0 -49
- package/dist/packem_shared/card-F2vH_aj2.js +0 -175
- package/dist/packem_shared/cf-links-SIbyi4Y1.js +0 -8
- package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
- package/dist/packem_shared/data-grid-BywzWfek.js +0 -183
- package/dist/packem_shared/data-view-params-Cd6yRVbv.js +0 -96
- 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/error-alert-D9uIFJUS.js +0 -114
- package/dist/packem_shared/grid-features-ZOLhHKrR.js +0 -809
- package/dist/packem_shared/home-panel-BRAA2UlM.js +0 -1889
- package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
- package/dist/packem_shared/internal-DzHCc2Rq.js +0 -131
- package/dist/packem_shared/label-D8ykjn5J.js +0 -46
- package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
- package/dist/packem_shared/log-fields-jEH83H2G.js +0 -18
- package/dist/packem_shared/modal-shell-hyaJvIJ6.js +0 -100
- package/dist/packem_shared/reference-view-DfXN7oWP.js +0 -2127
- package/dist/packem_shared/result-chart-Bf9mbCIo.js +0 -119
- package/dist/packem_shared/scroll-area-DLhcy-ml.js +0 -93
- package/dist/packem_shared/select-D9OwHEch.js +0 -273
- package/dist/packem_shared/shard-history-AxiJ1WPP.js +0 -16
- package/dist/packem_shared/skeleton-CGhL0p20.js +0 -45
- package/dist/packem_shared/sparkline-BnA1kC9X.js +0 -93
- package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
- package/dist/packem_shared/studio-8QSXbZ98.js +0 -4192
- package/dist/packem_shared/table-DsCa9Qp9.js +0 -246
- package/dist/packem_shared/table-list-sidebar-gCE17v9B.js +0 -842
- package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
- package/dist/packem_shared/trace-handoff-CGolF3KS.js +0 -38
- package/dist/packem_shared/use-admin-query-C7JNuQp-.js +0 -106
- package/dist/packem_shared/use-async-submit-rnSk_jXl.js +0 -91
- 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
- package/dist/standalone/chunk-2K47A3P6.js +0 -1
- package/dist/standalone/chunk-2MLA6WFH.js +0 -1
- package/dist/standalone/chunk-2NGUNNGW.js +0 -1
- package/dist/standalone/chunk-2TJVFKD2.js +0 -1
- package/dist/standalone/chunk-2YTF6LJ6.js +0 -1
- package/dist/standalone/chunk-3GXGLNKW.js +0 -1
- package/dist/standalone/chunk-3HGNPZBN.js +0 -1
- package/dist/standalone/chunk-3LJEGSMK.js +0 -11
- package/dist/standalone/chunk-3OA7PECS.js +0 -6
- package/dist/standalone/chunk-4PC7IXNY.js +0 -1
- package/dist/standalone/chunk-56XQYNUJ.js +0 -1
- package/dist/standalone/chunk-5OIBXYZM.js +0 -1
- package/dist/standalone/chunk-5QT5JRXD.js +0 -3
- package/dist/standalone/chunk-6RLPR7PL.js +0 -1
- package/dist/standalone/chunk-6V74EUPK.js +0 -1
- package/dist/standalone/chunk-7EE33WLB.js +0 -1
- package/dist/standalone/chunk-7TJJXVSE.js +0 -1
- package/dist/standalone/chunk-AHILM3ZP.js +0 -1
- package/dist/standalone/chunk-AN4RKMKW.js +0 -1
- package/dist/standalone/chunk-APSSZB6Z.js +0 -1
- package/dist/standalone/chunk-AXNGWSBM.js +0 -1
- package/dist/standalone/chunk-AXZILWRM.js +0 -1
- package/dist/standalone/chunk-C7RHEBOH.js +0 -1
- package/dist/standalone/chunk-CKSHCYGC.js +0 -2
- package/dist/standalone/chunk-CSWIYOB3.js +0 -1
- package/dist/standalone/chunk-D3VAON25.js +0 -1
- package/dist/standalone/chunk-DDLQN67F.js +0 -1
- package/dist/standalone/chunk-DGHW5JG5.js +0 -1
- package/dist/standalone/chunk-DMCSOTAE.js +0 -3
- package/dist/standalone/chunk-E3BKETAS.js +0 -1
- package/dist/standalone/chunk-E3OXNN6O.js +0 -1
- package/dist/standalone/chunk-E6BOGDIS.js +0 -1
- package/dist/standalone/chunk-F2YMCQ6B.js +0 -1
- package/dist/standalone/chunk-F7GE4X2U.js +0 -1
- package/dist/standalone/chunk-FAVUOGJR.js +0 -1
- package/dist/standalone/chunk-FXP6256Q.js +0 -1
- package/dist/standalone/chunk-G6CTAYHJ.js +0 -1
- package/dist/standalone/chunk-GTM65MVX.js +0 -1
- package/dist/standalone/chunk-H42W62SE.js +0 -1
- package/dist/standalone/chunk-HTF5ZX4I.js +0 -8
- package/dist/standalone/chunk-HV7G6DFP.js +0 -5
- package/dist/standalone/chunk-I2PS4L74.js +0 -1
- package/dist/standalone/chunk-IYHPYY4A.js +0 -1
- package/dist/standalone/chunk-J6J54MBP.js +0 -1
- package/dist/standalone/chunk-J7OGP4NN.js +0 -1
- package/dist/standalone/chunk-JSEXCW5Q.js +0 -1
- package/dist/standalone/chunk-JZLGLG4T.js +0 -1
- package/dist/standalone/chunk-KEGAWN6Y.js +0 -1
- package/dist/standalone/chunk-KZ6INM5M.js +0 -1
- package/dist/standalone/chunk-L2LN3MK4.js +0 -4
- package/dist/standalone/chunk-LT3FH6MW.js +0 -1
- package/dist/standalone/chunk-LZUWZBPE.js +0 -1
- package/dist/standalone/chunk-M4JM3TOY.js +0 -1
- package/dist/standalone/chunk-MLA5ZAEB.js +0 -1
- package/dist/standalone/chunk-MRBI5HNQ.js +0 -1
- package/dist/standalone/chunk-N5XX4HOL.js +0 -6
- package/dist/standalone/chunk-N7SVJOHN.js +0 -1
- package/dist/standalone/chunk-NKFXMDOD.js +0 -1
- package/dist/standalone/chunk-NPSNKFHE.js +0 -1
- package/dist/standalone/chunk-O3NAGRTR.js +0 -1
- package/dist/standalone/chunk-O7FVPUCO.js +0 -1
- package/dist/standalone/chunk-OKQXTLFX.js +0 -1
- package/dist/standalone/chunk-OXHHSUXO.js +0 -1
- package/dist/standalone/chunk-QAFAJBAW.js +0 -1
- package/dist/standalone/chunk-QAIM6KWT.js +0 -1
- package/dist/standalone/chunk-QCPMTB6W.js +0 -1
- package/dist/standalone/chunk-QQ2LOSZL.js +0 -1
- package/dist/standalone/chunk-QVIPA6UJ.js +0 -1
- package/dist/standalone/chunk-QVUQXJCT.js +0 -4
- package/dist/standalone/chunk-R2GMHLJY.js +0 -1
- package/dist/standalone/chunk-RD5UG2YL.js +0 -1
- package/dist/standalone/chunk-RJTIP3WF.js +0 -1
- package/dist/standalone/chunk-RRCPZMC2.js +0 -22
- package/dist/standalone/chunk-SHERR7ZP.js +0 -1
- package/dist/standalone/chunk-SOC5CY3F.js +0 -1
- package/dist/standalone/chunk-SS7JLF2I.js +0 -4
- package/dist/standalone/chunk-SWWYUGPL.js +0 -2
- package/dist/standalone/chunk-TAD43CG5.js +0 -1
- package/dist/standalone/chunk-TTXRHJUP.js +0 -4
- package/dist/standalone/chunk-UK64ZSUW.js +0 -1
- package/dist/standalone/chunk-UKDHGVOC.js +0 -1
- package/dist/standalone/chunk-UPNTMJFF.js +0 -1
- package/dist/standalone/chunk-V43BLH4J.js +0 -1
- package/dist/standalone/chunk-VL23Y44O.js +0 -4
- package/dist/standalone/chunk-VXM5H542.js +0 -4
- package/dist/standalone/chunk-WMDH2CIZ.js +0 -1
- package/dist/standalone/chunk-WVTPZ6CM.js +0 -1
- package/dist/standalone/chunk-XN6QYJQ6.js +0 -13
- package/dist/standalone/chunk-XNJNSCLM.js +0 -1
- package/dist/standalone/chunk-Y4U6CC22.js +0 -1
- package/dist/standalone/chunk-Y572GMZE.js +0 -1
- package/dist/standalone/chunk-Y7PD5KP4.js +0 -76
- package/dist/standalone/chunk-YFIPHCEC.js +0 -1
- package/dist/standalone/chunk-YJXOWLFJ.js +0 -1
- package/dist/standalone/chunk-YNN6NFRZ.js +0 -1
- package/dist/standalone/chunk-YUGHRVPD.js +0 -1
- package/dist/standalone/chunk-ZIGWVHCS.js +0 -1
- package/dist/standalone/chunk-ZPP2KOR4.js +0 -1
- package/dist/standalone/chunk-ZPUO7FNI.js +0 -1
- /package/dist/standalone/{chunk-TEWVD66F.js → chunk-GXZAXNZI.js} +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as Xr}from"./chunk-ZPUO7FNI.js";import{a as go,b as ho,c as vo,d as Hr,e as ys}from"./chunk-WVTPZ6CM.js";import{$ as Br,A as ao,C as Or,D as U,E as _r,F as Ir,I as io,L as gt,M as rs,N as lo,P as as,Q as Dr,R as Ar,S as is,T as co,U as po,V as uo,W as fo,X as ls,Y as mo,_ as Vr,aa as ds,b as vr,ba as cs,ea as ps,fa as st,ga as Lr,ha as xo,i as Cr,ia as Fr,j as Rr,ja as me,k as Sr,ka as us,l as ln,m as es,ma as fs,na as ms,o as ts,oa as gs,p as Nr,pa as hs,q as os,qa as vs,ra as xs,s as Er,sa as $r,ta as jr,u as Tr,ua as bs,v as wr,va as Ur,w as kr,x as ss,y as ns,z as Mr}from"./chunk-SHERR7ZP.js";import{f as ur}from"./chunk-ZIGWVHCS.js";import{a as Jr}from"./chunk-7TJJXVSE.js";import{a as tr,b as or,d as sr,e as ft,f as Jo,g as nr,h as rr,i as ar,j as ir,k as lr}from"./chunk-OXHHSUXO.js";import{b as yo}from"./chunk-RD5UG2YL.js";import{a as dt,e as cn}from"./chunk-Y572GMZE.js";import{a as Ps}from"./chunk-KZ6INM5M.js";import{c as zr,h as Wr,k as dn}from"./chunk-4QHKBC77.js";import{B as xr,C as br,I as Le,J as yr,K as ro,O as A,P as Y,R as Pr,e as Ce,p as ko,q as hr}from"./chunk-VL23Y44O.js";import{a as er}from"./chunk-HV7G6DFP.js";import{b as ht,c as bo}from"./chunk-UK64ZSUW.js";import{a as mt,c as mr,h as Xo,i as gr}from"./chunk-O3NAGRTR.js";import{a as an,b as wo}from"./chunk-ZPP2KOR4.js";import{a as lt,i as Rt,j as F}from"./chunk-CKSHCYGC.js";import{a as St}from"./chunk-TEWVD66F.js";import{f as rn}from"./chunk-3LJEGSMK.js";import{a as fr}from"./chunk-ZHVTQ37P.js";import{a as Pe}from"./chunk-3OA7PECS.js";import{a as Zr}from"./chunk-TAD43CG5.js";import{a as dr,b as cr,c as pr,d as re,f as qr,g as Gr,m as Fe,n as Kr,o as Qr,p as Yr}from"./chunk-HBGS4SEX.js";import{b as nn}from"./chunk-LXULVPEM.js";import{a,d as sn,e as S,f as O,g as Yo,h as To,j as W}from"./chunk-RRCPZMC2.js";var B=S(Yo(),1);var ut=S(O(),1),q=S(O(),1);var i=S(To(),1);var ea=S(O(),1),vt=S(To(),1);var ki={border:"1px solid var(--destructive)",color:"var(--destructive)",padding:12},Mi={overflow:"auto",whiteSpace:"pre-wrap"},Cs=class extends ea.Component{static{a(this,"ErrorBoundary")}static getDerivedStateFromError(e){return{error:e}}state={error:null};componentDidCatch(e,o){console.error("[lunora-studio] panel error",e,o.componentStack)}reset=a(()=>{this.setState({error:null})},"reset");render(){let{children:e,fallbackTitle:o,label:s,retryLabel:n}=this.props,{error:r}=this.state;if(r===null)return(0,vt.jsxDEV)(vt.Fragment,{children:e},void 0,!1);let l=o??(s===void 0?"Something went wrong":`${s} failed`);return(0,vt.jsxDEV)("div",{"data-testid":"dash-error-boundary",role:"alert",style:ki,children:[(0,vt.jsxDEV)("strong",{children:l},void 0,!1),(0,vt.jsxDEV)("pre",{"data-testid":"dash-error-message",style:Mi,children:r.message},void 0,!1),(0,vt.jsxDEV)("button",{"data-testid":"dash-error-retry",onClick:this.reset,type:"button",children:n??"Try again"},void 0,!1)]},void 0,!0)}};var Pt={};sn(Pt,{Arrow:()=>xn,Backdrop:()=>bn,Close:()=>Cn,Description:()=>Pn,Handle:()=>Oo,Popup:()=>vn,Portal:()=>fn,Positioner:()=>mn,Root:()=>sa,Title:()=>yn,Trigger:()=>pn,Viewport:()=>Rn,createHandle:()=>va});var ct=S(O(),1);var Rs=S(O(),1);var Ss=Rs.createContext(void 0);Ss.displayName="PopoverRootContext";function oe(t){let e=Rs.useContext(Ss);if(e===void 0&&!t)throw new Error("Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.");return e}a(oe,"usePopoverRootContext");var xt=S(O(),1),ta=S(er(),1);function Oi(){return{...go(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}a(Oi,"createInitialState");var _i={...vo,disabled:U(t=>t.disabled),instantType:U(t=>t.instantType),openMethod:U(t=>t.openMethod),openChangeReason:U(t=>t.openChangeReason),modal:U(t=>t.modal),focusManagerModal:U(t=>t.focusManagerModal),stickIfOpen:U(t=>t.stickIfOpen),titleElementId:U(t=>t.titleElementId),descriptionElementId:U(t=>t.descriptionElementId),openOnHover:U(t=>t.openOnHover),closeDelay:U(t=>t.closeDelay),hasViewport:U(t=>t.hasViewport)},Po=class t extends io{static{a(this,"PopoverStore")}constructor(e,o,s=!1){let n={...Oi(),...e},r=new mo;n.open&&e?.mounted===void 0&&(n.mounted=!0),n.floatingRootContext=ho(r,o,s),super(n,{popupRef:xt.createRef(),backdropRef:xt.createRef(),internalBackdropRef:xt.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:xt.createRef(),beforeContentFocusGuardRef:xt.createRef(),stickIfOpenTimeout:new xr,triggerElements:r},_i)}setOpen=a((e,o)=>{let s=o.reason===A.triggerHover,n=o.reason===A.triggerPress&&o.event.detail===0,r=!e&&(o.reason===A.escapeKey||o.reason==null),l=Dr(o),c=this.select("activeTriggerId");if(!e&&o.reason===A.closePress&&o.trigger==null&&c!=null&&(o.trigger=this.context.triggerElements.getById(c)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);let p=a(()=>{let d={open:e,openChangeReason:o.reason};as(d,e,o.trigger,l()),this.update(d)},"changeState");s?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set("stickIfOpen",!1)}),ta.flushSync(p)):p(),n||r?this.set("instantType",n?"click":"dismiss"):o.reason===A.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)},"setOpen");static useStore(e,o){let{store:s,internalStore:n}=lo(e,(r,l)=>new t(o,r,l));return xt.useEffect(()=>n?.disposeEffect(),[n]),s}disposeEffect=a(()=>this.context.stickIfOpenTimeout.disposeEffect(),"disposeEffect")};var Nt=S(Pe(),1);function oa({props:t}){let{children:e,open:o,defaultOpen:s=!1,onOpenChange:n,onOpenChangeComplete:r,modal:l=!1,handle:c,triggerId:p,defaultTriggerId:d=null}=t,u=Po.useStore(c?.store,{modal:l,open:s,openProp:o,activeTriggerId:d,triggerIdProp:p});is(u,o,s,d),u.useControlledProp("openProp",o),u.useControlledProp("triggerIdProp",p);let g=u.useState("open"),m=u.useState("mounted"),h=u.useState("payload"),f=Er()!=null;u.useContextCallback("onOpenChange",n),u.useContextCallback("onOpenChangeComplete",r),ls(u,g),po(u);let{forceUnmount:v}=uo(g,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});u.useSyncedValues({modal:l,nested:f}),ct.useEffect(()=>{g||u.context.stickIfOpenTimeout.clear()},[u,g]);let x=ct.useCallback(()=>{u.setOpen(!1,Y(A.imperativeAction))},[u]);ct.useImperativeHandle(t.actionsRef,()=>({unmount:v,close:x}),[v,x]);let b=g||m,P=ct.useMemo(()=>({store:u}),[u]);return(0,Nt.jsxs)(Ss.Provider,{value:P,children:[b&&(0,Nt.jsx)(Ii,{store:u,modal:l}),typeof e=="function"?e({payload:h}):e]})}a(oa,"PopoverRootComponent");function sa(t){return oe(!0)?(0,Nt.jsx)(oa,{props:t}):(0,Nt.jsx)(kr,{children:(0,Nt.jsx)(oa,{props:t})})}a(sa,"PopoverRoot");function Ii({store:t,modal:e}){let o=t.useState("floatingRootContext"),s=ao(o,{outsidePressEvent:{mouse:e==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),n=s.reference??Rt,r=s.trigger??Rt,l=ct.useMemo(()=>lt(gt,s.floating),[s.floating]);return fo(t,{activeTriggerProps:n,inactiveTriggerProps:r,popupProps:l}),null}a(Ii,"PopoverInteractions");var bt=S(O(),1);var Et=S(Pe(),1);var pn=bt.forwardRef(a(function(e,o){let{render:s,className:n,style:r,disabled:l=!1,nativeButton:c=!0,handle:p,payload:d,openOnHover:u=!1,delay:g=300,closeDelay:m=0,id:h,...f}=e,v=oe(!0),x=p?.store??v?.store;if(!x)throw new Error("Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle.");let b=Ce(h),P=x.useState("isTriggerActive",b),C=x.useState("floatingRootContext"),N=x.useState("isOpenedByTrigger",b),R=x.useState("triggerPopupId",b),E=bt.useRef(null),{registerTrigger:T,isMountedByThisTrigger:k}=co(b,E,x,{payload:d,disabled:l,openOnHover:u,closeDelay:m}),w=x.useState("openChangeReason"),M=x.useState("stickIfOpen"),V=x.useState("openMethod"),Z=x.useState("focusManagerModal"),D=cs(C,{enabled:!l&&C!=null&&u&&(V!=="touch"||w!==A.triggerPress),mouseOnly:!0,move:!1,handleClose:ps(),restMs:g,delay:{close:m},triggerElementRef:E,isActiveTrigger:P,isClosing:a(()=>x.select("transitionStatus")==="ending","isClosing")}),H=ns(C,{enabled:C!=null,stickIfOpen:M}),j=us(()=>x.select("open"),ee=>{x.set("openMethod",ee)}),G=x.useState("triggerProps",k),{getButtonProps:K,buttonRef:I}=ht({disabled:l,native:c}),_={open(ee){return ee&&w===A.triggerPress?Fr.open(ee):xo.open(ee)}},{preFocusGuardRef:z,handlePreFocusGuardFocus:te,handleFocusTargetFocus:se}=Hr(x,E),J=F("button",e,{state:{disabled:l,open:N},ref:[I,o,T,E],props:[H.reference,D,G,j,{[es]:"",id:b,"aria-haspopup":"dialog","aria-expanded":N,"aria-controls":R},f,K],stateAttributesMapping:_});return k&&!Z?(0,Et.jsxs)(bt.Fragment,{children:[(0,Et.jsx)(ln,{ref:z,onFocus:te}),(0,Et.jsx)(bt.Fragment,{children:J},b),(0,Et.jsx)(ln,{ref:x.context.triggerFocusTargetRef,onFocus:se})]}):(0,Et.jsx)(bt.Fragment,{children:J},b)},"PopoverTrigger"));pn.displayName="PopoverTrigger";var ra=S(O(),1);var Ns=S(O(),1);var Es=Ns.createContext(void 0);Es.displayName="PopoverPortalContext";function na(){let t=Ns.useContext(Es);if(t===void 0)throw new Error("Base UI: <Popover.Portal> is missing.");return t}a(na,"usePopoverPortalContext");var un=S(Pe(),1);var fn=ra.forwardRef(a(function(e,o){let{keepMounted:s=!1,...n}=e,{store:r}=oe();return r.useState("mounted")||s?(0,un.jsx)(Es.Provider,{value:s,children:(0,un.jsx)(os,{ref:o,...n})}):null},"PopoverPortal"));fn.displayName="PopoverPortal";var Ro=S(O(),1);var Ts=S(O(),1);var ws=Ts.createContext(void 0);ws.displayName="PopoverPositionerContext";function Co(){let t=Ts.useContext(ws);if(!t)throw new Error("Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.");return t}a(Co,"usePopoverPositionerContext");var Mo=S(Pe(),1);var mn=Ro.forwardRef(a(function(e,o){let{render:s,className:n,style:r,anchor:l,positionMethod:c="absolute",side:p="bottom",align:d="center",sideOffset:u=0,alignOffset:g=0,collisionBoundary:m="clipping-ancestors",collisionPadding:h=5,arrowPadding:f=5,sticky:v=!1,disableAnchorTracking:x=!1,collisionAvoidance:b=ts,...P}=e,{store:C}=oe(),N=na(),R=Tr(),E=C.useState("floatingRootContext"),T=C.useState("mounted"),k=C.useState("open"),w=C.useState("openChangeReason"),M=C.useState("activeTriggerElement"),V=C.useState("modal"),Z=C.useState("openMethod"),D=C.useState("positionerElement"),H=C.useState("instantType"),j=C.useState("transitionStatus"),G=C.useState("hasViewport"),K=Ro.useRef(null),I=yr(D,!1,!1),_=gs({anchor:l,floatingRootContext:E,positionMethod:c,mounted:T,side:p,sideOffset:u,align:d,alignOffset:g,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:v,disableAnchorTracking:x,keepMounted:N,nodeId:R,collisionAvoidance:b,adaptiveOrigin:G?ms:void 0}),z=E.useState("domReferenceElement");mt(()=>{let J=z,ee=K.current;if(J&&(K.current=J),ee&&J&&J!==ee){C.set("instantType",void 0);let ae=new AbortController;return I(()=>{C.set("instantType","trigger-change")},ae.signal),()=>{ae.abort()}}},[z,I,C]),jr(k&&V===!0&&w!==A.triggerHover,Z==="touch",D,M);let te=Ro.useCallback(J=>{C.set("positionerElement",J)},[C]),se={open:k,side:_.side,align:_.align,anchorHidden:_.anchorHidden,instant:H},ne=xs(e,se,{styles:_.positionerStyles,transitionStatus:j,props:P,refs:[o,te],hidden:!T,inert:!k});return(0,Mo.jsxs)(ws.Provider,{value:_,children:[T&&V===!0&&w!==A.triggerHover&&(0,Mo.jsx)(hs,{ref:C.context.internalBackdropRef,inert:fs(!k),cutout:M}),(0,Mo.jsx)(wr,{id:R,children:ne})]})},"PopoverPositioner"));mn.displayName="PopoverPositioner";var ks=S(O(),1);var yt=S(O(),1);var aa=S(Pe(),1);var gn=yt.createContext(void 0);gn.displayName="ClosePartContext";function ia(){let[t,e]=yt.useState(0),o=mr(()=>(e(n=>n+1),()=>{e(n=>Math.max(0,n-1))}));return{context:yt.useMemo(()=>({register:o}),[o]),hasClosePart:t>0}}a(ia,"useClosePartCount");function la(t){let{value:e,children:o}=t;return(0,aa.jsx)(gn.Provider,{value:e,children:o})}a(la,"ClosePartProvider");function da(){let t=yt.useContext(gn);mt(()=>t?.register(),[t])}a(da,"useClosePartRegistration");var hn=S(Pe(),1);var Di={...me,...Le},vn=ks.forwardRef(a(function(e,o){let{render:s,className:n,style:r,initialFocus:l,finalFocus:c,...p}=e,{store:d}=oe(),u=Co(),g=Ur(!0)!=null,{context:m,hasClosePart:h}=ia(),f=d.useState("open"),v=d.useState("openMethod"),x=d.useState("instantType"),b=d.useState("transitionStatus"),P=d.useState("popupProps"),C=d.useState("titleElementId"),N=d.useState("descriptionElementId"),R=d.useState("modal"),E=d.useState("mounted"),T=d.useState("openChangeReason"),k=d.useState("activeTriggerElement"),w=d.useState("floatingRootContext"),M=w.useState("floatingId"),V=d.useState("disabled"),Z=d.useState("openOnHover"),D=d.useState("closeDelay"),H=p.id??M;ro({open:f,ref:d.context.popupRef,onComplete(){f&&d.context.onOpenChangeComplete?.(!0)}}),ds(w,{enabled:Z&&!V,closeDelay:D});let j=l===void 0?rs(d.context.popupRef):l,G=R!==!1&&h;d.useSyncedValue("focusManagerModal",G);let K=ks.useCallback(z=>{d.set("popupElement",z)},[d]),I={open:f,side:u.side,align:u.align,instant:x,transitionStatus:b},_=F("div",e,{state:I,ref:[o,d.context.popupRef,K],props:[P,{id:H,role:"dialog",...gt,"aria-labelledby":C,"aria-describedby":N,onKeyDown(z){g&&bs.has(z.key)&&z.stopPropagation()}},vs(b),p],stateAttributesMapping:Di});return(0,hn.jsx)(ss,{context:w,openInteractionType:v,modal:G,disabled:!E||T===A.triggerHover,initialFocus:j,returnFocus:c,restoreFocus:"popup",previousFocusableElement:gr(k)?k:void 0,nextFocusableElement:d.context.triggerFocusTargetRef,beforeContentFocusGuardRef:d.context.beforeContentFocusGuardRef,children:(0,hn.jsx)(la,{value:m,children:_})})},"PopoverPopup"));vn.displayName="PopoverPopup";var ca=S(O(),1);var xn=ca.forwardRef(a(function(e,o){let{render:s,className:n,style:r,...l}=e,{store:c}=oe(),p=c.useState("open"),{arrowRef:d,side:u,align:g,arrowUncentered:m,arrowStyles:h}=Co();return F("div",e,{state:{open:p,side:u,align:g,uncentered:m},ref:[o,d],props:[{style:h,"aria-hidden":!0},l],stateAttributesMapping:me})},"PopoverArrow"));xn.displayName="PopoverArrow";var pa=S(O(),1);var Ai={...me,...Le},bn=pa.forwardRef(a(function(e,o){let{render:s,className:n,style:r,...l}=e,{store:c}=oe(),p=c.useState("open"),d=c.useState("mounted"),u=c.useState("transitionStatus"),g=c.useState("openChangeReason");return F("div",e,{state:{open:p,transitionStatus:u},ref:[c.context.backdropRef,o],props:[{role:"presentation",hidden:!d,style:{pointerEvents:g===A.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:Ai})},"PopoverBackdrop"));bn.displayName="PopoverBackdrop";var ua=S(O(),1);var yn=ua.forwardRef(a(function(e,o){let{render:s,className:n,style:r,...l}=e,{store:c}=oe(),p=Ce(l.id);return c.useSyncedValueWithCleanup("titleElementId",p),F("h2",e,{ref:o,props:[{id:p},l]})},"PopoverTitle"));yn.displayName="PopoverTitle";var fa=S(O(),1);var Pn=fa.forwardRef(a(function(e,o){let{render:s,className:n,style:r,...l}=e,{store:c}=oe(),p=Ce(l.id);return c.useSyncedValueWithCleanup("descriptionElementId",p),F("p",e,{ref:o,props:[{id:p},l]})},"PopoverDescription"));Pn.displayName="PopoverDescription";var ma=S(O(),1);var Cn=ma.forwardRef(a(function(e,o){let{render:s,className:n,style:r,disabled:l=!1,nativeButton:c=!0,...p}=e,{buttonRef:d,getButtonProps:u}=ht({disabled:l,focusableWhenDisabled:!1,native:c}),{store:g}=oe();return da(),F("button",e,{ref:[o,d],props:[{onClick(h){g.setOpen(!1,Y(A.closePress,h.nativeEvent))}},p,u]})},"PopoverClose"));Cn.displayName="PopoverClose";var ha=S(O(),1);var ga=(function(t){return t.popupWidth="--popup-width",t.popupHeight="--popup-height",t})({});var Vi={activationDirection:a(t=>t?{"data-activation-direction":t}:null,"activationDirection")},Rn=ha.forwardRef(a(function(e,o){let{render:s,className:n,style:r,children:l,...c}=e,{store:p}=oe(),{side:d}=Co(),u=p.useState("instantType"),{children:g,state:m}=ys({store:p,side:d,cssVars:ga,children:l}),h={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:u};return F("div",e,{state:h,ref:o,props:[c,{children:g}],stateAttributesMapping:Vi})},"PopoverViewport"));Rn.displayName="PopoverViewport";var Oo=class{static{a(this,"PopoverHandle")}constructor(){this.store=new Po}open(e){let o=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!o)throw new Error(`Base UI: PopoverHandle.open: No trigger found with id "${e}".`);this.store.setOpen(!0,Y(A.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Y(A.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function va(){return new Oo}a(va,"createPopoverHandle");var ge={};sn(ge,{Backdrop:()=>Sn,Close:()=>Nn,Description:()=>En,Handle:()=>Vo,Popup:()=>Tn,Portal:()=>wn,Root:()=>Oa,Title:()=>On,Trigger:()=>_n,Viewport:()=>Mn,createHandle:()=>Da});var xa=S(O(),1);var _o=S(O(),1);var Io=_o.createContext(!1);Io.displayName="IsDrawerContext";var Ms=_o.createContext(void 0);Ms.displayName="DialogRootContext";function le(t){let e=_o.useContext(Ms);if(t===!1&&e===void 0)throw new Error("Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");return e}a(le,"useDialogRootContext");var Bi={...me,...Le},Sn=xa.forwardRef(a(function(e,o){let{render:s,className:n,style:r,forceRender:l=!1,...c}=e,{store:p}=le(),d=p.useState("open"),u=p.useState("nested"),g=p.useState("mounted"),m=p.useState("transitionStatus");return F("div",e,{state:{open:d,transitionStatus:m},ref:[p.context.backdropRef,o],stateAttributesMapping:Bi,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},c],enabled:l||!u})},"DialogBackdrop"));Sn.displayName="DialogBackdrop";var ba=S(O(),1);var Nn=ba.forwardRef(a(function(e,o){let{render:s,className:n,style:r,disabled:l=!1,nativeButton:c=!0,...p}=e,{store:d}=le(),u=d.useState("open"),{getButtonProps:g,buttonRef:m}=ht({disabled:l,native:c}),h={disabled:l};function f(v){u&&d.setOpen(!1,Y(A.closePress,v.nativeEvent))}return a(f,"handleClick"),F("button",e,{state:h,ref:[o,m],props:[{onClick:f},p,g]})},"DialogClose"));Nn.displayName="DialogClose";var ya=S(O(),1);var En=ya.forwardRef(a(function(e,o){let{render:s,className:n,style:r,id:l,...c}=e,{store:p}=le(),d=Ce(l);return p.useSyncedValueWithCleanup("descriptionElementId",d),F("p",e,{ref:o,props:[{id:d},c]})},"DialogDescription"));En.displayName="DialogDescription";var Ra=S(O(),1);var Pa=(function(t){return t.nestedDialogs="--nested-dialogs",t})({});var Ca=(function(t){return t[t.open=st.open]="open",t[t.closed=st.closed]="closed",t[t.startingStyle=st.startingStyle]="startingStyle",t[t.endingStyle=st.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});var Os=S(O(),1);var _s=Os.createContext(void 0);_s.displayName="DialogPortalContext";function Is(){let t=Os.useContext(_s);if(t===void 0)throw new Error("Base UI: <Dialog.Portal> is missing.");return t}a(Is,"useDialogPortalContext");var Sa=S(Pe(),1);var Li={...me,...Le,nestedDialogOpen(t){return t?{[Ca.nestedDialogOpen]:""}:null}},Tn=Ra.forwardRef(a(function(e,o){let{render:s,className:n,style:r,finalFocus:l,initialFocus:c,...p}=e,{store:d}=le(),u=d.useState("descriptionElementId"),g=d.useState("disablePointerDismissal"),m=d.useState("floatingRootContext"),h=d.useState("popupProps"),f=d.useState("modal"),v=d.useState("mounted"),x=d.useState("nested"),b=d.useState("nestedOpenDialogCount"),P=d.useState("open"),C=d.useState("openMethod"),N=d.useState("titleElementId"),R=d.useState("transitionStatus"),E=d.useState("role"),T=m.useState("floatingId"),k=p.id??T;Is(),ro({open:P,ref:d.context.popupRef,onComplete(){P&&d.context.onOpenChangeComplete?.(!0)}});let w=c===void 0?rs(d.context.popupRef):c,M=b>0,V=d.useStateSetter("popupElement"),D=F("div",e,{state:{open:P,nested:x,transitionStatus:R,nestedDialogOpen:M},props:[h,{id:k,"aria-labelledby":N??void 0,"aria-describedby":u??void 0,role:E,...gt,hidden:!v,onKeyDown(H){bs.has(H.key)&&H.stopPropagation()},style:{[Pa.nestedDialogs]:b}},p],ref:[o,d.context.popupRef,V],stateAttributesMapping:Li});return(0,Sa.jsx)(ss,{context:m,openInteractionType:C,disabled:!v,closeOnFocusOut:!g,initialFocus:w,returnFocus:l,modal:f!==!1,restoreFocus:"popup",children:D})},"DialogPopup"));Tn.displayName="DialogPopup";var Na=S(O(),1);var Do=S(Pe(),1);var wn=Na.forwardRef(a(function(e,o){let{keepMounted:s=!1,...n}=e,{store:r}=le(),l=r.useState("mounted"),c=r.useState("modal"),p=r.useState("open");return l||s?(0,Do.jsx)(_s.Provider,{value:s,children:(0,Do.jsxs)(os,{ref:o,...n,children:[l&&c===!0&&(0,Do.jsx)(hs,{ref:r.context.internalBackdropRef,inert:fs(!p)}),e.children]})}):null},"DialogPortal"));wn.displayName="DialogPortal";var Ma=S(O(),1);var wa=S(O(),1);var pt=S(O(),1);function Ea(t){let{store:e,actionsRef:o}=t,s=e.useState("open");ls(e,s),po(e);let{forceUnmount:n}=uo(s,e),r=pt.useCallback(()=>{e.setOpen(!1,Y(A.imperativeAction))},[e]);pt.useImperativeHandle(o,()=>({unmount:n,close:r}),[n,r])}a(Ea,"useDialogRoot");function Ta({store:t,parentContext:e,isDrawer:o}){let s=t.useState("open"),n=t.useState("disablePointerDismissal"),r=t.useState("modal"),l=t.useState("popupElement"),c=t.useState("floatingRootContext"),[p,d]=pt.useState(0),[u,g]=pt.useState(0),m=p===0,h=ao(c,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:r==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(b){if(!t.context.outsidePressEnabledRef.current||"button"in b&&b.button!==0||"touches"in b&&b.touches.length!==1)return!1;let P=hr(b);return m&&!n?r&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===P||t.context.backdropRef.current===P||ko(P,l)&&!P?.hasAttribute("data-base-ui-portal"):!0:!1},escapeKey:m});$r(s&&r===!0,l),t.useContextCallback("onNestedDialogOpen",(b,P)=>{d(b),g(P)}),t.useContextCallback("onNestedDialogClose",()=>{d(0),g(0)}),pt.useEffect(()=>(e?.onNestedDialogOpen&&s&&e.onNestedDialogOpen(p+1,u+(o?1:0)),e?.onNestedDialogClose&&!s&&e.onNestedDialogClose(),()=>{e?.onNestedDialogClose&&s&&e.onNestedDialogClose()}),[o,s,p,u,e]);let f=h.reference??Rt,v=h.trigger??Rt,x=h.floating??Rt;return fo(t,{activeTriggerProps:f,inactiveTriggerProps:v,popupProps:x,nestedOpenDialogCount:p,nestedOpenDrawerCount:u}),null}a(Ta,"DialogInteractions");var Ds=S(O(),1);var Fi={...vo,modal:U(t=>t.modal),nested:U(t=>t.nested),nestedOpenDialogCount:U(t=>t.nestedOpenDialogCount),nestedOpenDrawerCount:U(t=>t.nestedOpenDrawerCount),disablePointerDismissal:U(t=>t.disablePointerDismissal),openMethod:U(t=>t.openMethod),descriptionElementId:U(t=>t.descriptionElementId),titleElementId:U(t=>t.titleElementId),viewportElement:U(t=>t.viewportElement),role:U(t=>t.role)},So=class t extends io{static{a(this,"DialogStore")}constructor(e,o,s=!1){let n=new mo,r=Hi(e);r.floatingRootContext=ho(n,o,s),super(r,{popupRef:Ds.createRef(),backdropRef:Ds.createRef(),internalBackdropRef:Ds.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:n,onOpenChange:void 0,onOpenChangeComplete:void 0},Fi)}setOpen=a((e,o)=>{if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!e&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);let s={open:e};as(s,e,o.trigger),this.update(s)},"setOpen");static useStore(e,o){return lo(e,(n,r)=>new t(o,n,r),!0).store}};function Hi(t={}){return{...go(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...t}}a(Hi,"createInitialState");var Ao=S(Pe(),1);function ka(t,e="dialog"){let{children:o,open:s,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:l,disablePointerDismissal:c=!1,modal:p=!0,actionsRef:d,handle:u,triggerId:g,defaultTriggerId:m=null}=t,h=e==="drawer",f=e==="alert-dialog",v=f?!0:p,x=f||c,b=f?"alertdialog":"dialog",P=le(!0),N={modal:v,disablePointerDismissal:x,nested:!!P,role:b},R=So.useStore(u?.store,{open:n,openProp:s,activeTriggerId:m,triggerIdProp:g,...N});Or(()=>{let V=s===void 0&&R.state.open===!1&&n===!0?{open:!0,activeTriggerId:m}:null;f?R.update(V?{...N,...V}:N):V&&R.update(V)}),R.useControlledProp("openProp",s),R.useControlledProp("triggerIdProp",g),R.useSyncedValues(N),R.useContextCallback("onOpenChange",r),R.useContextCallback("onOpenChangeComplete",l);let E=R.useState("open"),T=R.useState("mounted"),k=R.useState("payload");Ea({store:R,actionsRef:d});let w=E||T,M=wa.useMemo(()=>({store:R}),[R]);return(0,Ao.jsx)(Io.Provider,{value:!1,children:(0,Ao.jsxs)(Ms.Provider,{value:M,children:[w&&(0,Ao.jsx)(Ta,{store:R,parentContext:P?.store.context,isDrawer:h}),typeof o=="function"?o({payload:k}):o]})})}a(ka,"useRenderDialogRoot");function Oa(t){let e=Ma.useContext(Io)?"drawer":"dialog";return ka(t,e)}a(Oa,"DialogRoot");var _a=S(O(),1);var kn=(function(t){return t[t.open=st.open]="open",t[t.closed=st.closed]="closed",t[t.startingStyle=st.startingStyle]="startingStyle",t[t.endingStyle=st.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});var $i={...me,...Le,nested(t){return t?{[kn.nested]:""}:null},nestedDialogOpen(t){return t?{[kn.nestedDialogOpen]:""}:null}},Mn=_a.forwardRef(a(function(e,o){let{render:s,className:n,style:r,children:l,...c}=e,p=Is(),{store:d}=le(),u=d.useState("open"),g=d.useState("nested"),m=d.useState("transitionStatus"),h=d.useState("nestedOpenDialogCount"),f=d.useState("mounted"),v=d.useStateSetter("viewportElement"),x=h>0;return F("div",e,{enabled:p||f,state:{open:u,nested:g,transitionStatus:m,nestedDialogOpen:x},ref:[o,v],stateAttributesMapping:$i,props:[{role:"presentation",hidden:!f,style:{pointerEvents:u?void 0:"none"},children:l},c]})},"DialogViewport"));Mn.displayName="DialogViewport";var Ia=S(O(),1);var On=Ia.forwardRef(a(function(e,o){let{render:s,className:n,style:r,id:l,...c}=e,{store:p}=le(),d=Ce(l);return p.useSyncedValueWithCleanup("titleElementId",d),F("h2",e,{ref:o,props:[{id:d},c]})},"DialogTitle"));On.displayName="DialogTitle";var As=S(O(),1);var _n=As.forwardRef(a(function(e,o){let{render:s,className:n,style:r,disabled:l=!1,nativeButton:c=!0,id:p,payload:d,handle:u,...g}=e,m=le(!0),h=u?.store??m?.store;if(!h)throw new Error("Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.");let f=Ce(p),v=h.useState("floatingRootContext"),x=h.useState("isOpenedByTrigger",f),b=h.useState("triggerPopupId",f),P=As.useRef(null),{registerTrigger:C,isMountedByThisTrigger:N}=co(f,P,h,{payload:d}),{getButtonProps:R,buttonRef:E}=ht({disabled:l,native:c}),T=ns(v,{enabled:v!=null}),k=us(()=>h.select("open"),V=>{h.set("openMethod",V)}),w={disabled:l,open:x},M=h.useState("triggerProps",N);return F("button",e,{state:w,ref:[E,o,C,P],props:[T.reference,M,k,{[es]:"",id:f,"aria-haspopup":"dialog","aria-expanded":x,"aria-controls":b},g,R],stateAttributesMapping:xo})},"DialogTrigger"));_n.displayName="DialogTrigger";var Vo=class{static{a(this,"DialogHandle")}constructor(e){this.store=e??new So}open(e){let o=e?this.store.context.triggerElements.getById(e):void 0;e&&!o&&console.warn(`Base UI: DialogHandle.open: No trigger found with id "${e}". The dialog will open, but the trigger will not be associated with the dialog.`),this.store.setOpen(!0,Y(A.imperativeAction,void 0,o))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,Y(A.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,Y(A.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function Da(){return new Vo}a(Da,"createDialogHandle");var rt={};sn(rt,{Arrow:()=>Hn,Handle:()=>Bo,Popup:()=>Fn,Portal:()=>Bn,Positioner:()=>Ln,Provider:()=>Un,Root:()=>In,Trigger:()=>Dn,Viewport:()=>zn,createHandle:()=>Ka});var nt=S(O(),1);var Vs=S(O(),1);var Bs=Vs.createContext(void 0);Bs.displayName="TooltipRootContext";function He(t){let e=Vs.useContext(Bs);if(e===void 0&&!t)throw new Error("Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.");return e}a(He,"useTooltipRootContext");var Aa=S(O(),1);var ji={...vo,disabled:U(t=>t.disabled),instantType:U(t=>t.instantType),isInstantPhase:U(t=>t.isInstantPhase),trackCursorAxis:U(t=>t.trackCursorAxis),disableHoverablePopup:U(t=>t.disableHoverablePopup),lastOpenChangeReason:U(t=>t.openChangeReason),closeOnClick:U(t=>t.closeOnClick),closeDelay:U(t=>t.closeDelay),hasViewport:U(t=>t.hasViewport)},No=class t extends io{static{a(this,"TooltipStore")}constructor(e,o,s=!1){let n=new mo,r={...Ui(),...e};r.floatingRootContext=ho(n,o,s),super(r,{popupRef:Aa.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:n},ji)}setOpen=a((e,o)=>{Ar(this,e,o,{extraState:{openChangeReason:o.reason}})},"setOpen");cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Y(A.triggerPress,e))}static useStore(e,o){return lo(e,(n,r)=>new t(o,n,r)).store}};function Ui(){return{...go(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}a(Ui,"createInitialState");var Ls=S(Pe(),1);var In=_r(a(function(e){let{disabled:o=!1,defaultOpen:s=!1,open:n,disableHoverablePopup:r=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:p,onOpenChangeComplete:d,handle:u,triggerId:g,defaultTriggerId:m=null,children:h}=e,f=No.useStore(u?.store,{open:s,openProp:n,activeTriggerId:m,triggerIdProp:g});is(f,n,s,m),f.useControlledProp("openProp",n),f.useControlledProp("triggerIdProp",g),f.useContextCallback("onOpenChange",p),f.useContextCallback("onOpenChangeComplete",d);let v=f.useState("open"),x=!o&&v,b=f.useState("activeTriggerId"),P=f.useState("mounted"),C=f.useState("payload");f.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:r}),f.useSyncedValue("disabled",o),po(f,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:N,transitionStatus:R}=uo(x,f),E=f.useState("isInstantPhase"),T=f.useState("instantType"),k=f.useState("lastOpenChangeReason"),w=nt.useRef(null);mt(()=>{v&&o&&f.setOpen(!1,Y(A.disabled))},[v,o,f]),mt(()=>{R==="ending"&&k===A.none||R!=="ending"&&E?(T!=="delay"&&(w.current=T),f.set("instantType","delay")):w.current!==null&&(f.set("instantType",w.current),w.current=null)},[R,E,k,T,f]),mt(()=>{x&&b==null&&f.set("payload",void 0)},[f,b,x]);let M=nt.useCallback(()=>{f.setOpen(!1,Y(A.imperativeAction))},[f]);nt.useImperativeHandle(c,()=>({unmount:N,close:M}),[N,M]);let V=x||P||!o&&l!=="none";return(0,Ls.jsxs)(Bs.Provider,{value:f,children:[V&&(0,Ls.jsx)(zi,{store:f,disabled:o,trackCursorAxis:l}),typeof h=="function"?h({payload:C}):h]})},"TooltipRoot"));In.displayName="TooltipRoot";function zi({store:t,disabled:e,trackCursorAxis:o}){let s=t.useState("floatingRootContext"),n=ao(s,{enabled:!e,referencePress:a(()=>t.select("closeOnClick"),"referencePress")}),r=Mr(s,{enabled:!e&&o!=="none",axis:o==="none"?void 0:o}),l=nt.useMemo(()=>lt(r.reference,n.reference),[r.reference,n.reference]),c=nt.useMemo(()=>lt(r.trigger,n.trigger),[r.trigger,n.trigger]),p=nt.useMemo(()=>lt(gt,r.floating,n.floating),[r.floating,n.floating]);return fo(t,{activeTriggerProps:l,inactiveTriggerProps:c,popupProps:p}),null}a(zi,"TooltipInteractions");var $s=S(O(),1);var Fs=S(O(),1);var Hs=Fs.createContext(void 0);Hs.displayName="TooltipProviderContext";function Va(){return Fs.useContext(Hs)}a(Va,"useTooltipProviderContext");var Ba=(function(t){return t[t.popupOpen=Lr.popupOpen]="popupOpen",t.triggerDisabled="data-trigger-disabled",t})({});var Fa="data-base-ui-tooltip-trigger";function La(t){if("composedPath"in t){let o=t.composedPath();for(let s=0;s<o.length;s+=1){let n=o[s];if(Xo(n))return n}}let e=t.target;return Xo(e)?e:null}a(La,"getTargetElement");function Wi(t){let e=t;for(;e;){if(e.hasAttribute(Fa))return e;let o=e.parentElement;if(o){e=o;continue}let s=e.getRootNode();e="host"in s&&Xo(s.host)?s.host:null}return null}a(Wi,"closestEnabledTooltipTrigger");var Dn=Ir(a(function(e,o){let{render:s,className:n,style:r,handle:l,payload:c,disabled:p,delay:d,closeOnClick:u=!0,closeDelay:g,id:m,...h}=e,f=He(!0),v=l?.store??f;if(!v)throw new Error("Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.");let x=Ce(m),b=v.useState("isTriggerActive",x),P=v.useState("isOpenedByTrigger",x),C=v.useState("floatingRootContext"),N=$s.useRef(null),R=d??600,E=g??0,{registerTrigger:T,isMountedByThisTrigger:k}=co(x,N,v,{payload:c,closeOnClick:u,closeDelay:E}),w=Va(),{delayRef:M,isInstantPhase:V,hasProvider:Z}=Rr(C,{open:P}),D=Br(C);v.useSyncedValue("isInstantPhase",V);let H=v.useState("disabled"),j=p??H,G=Sr(j),K=v.useState("trackCursorAxis"),I=v.useState("disableHoverablePopup"),_=$s.useRef(!1),z=br(),te=$s.useRef(void 0);function se(){let L=w?.delay,Q=typeof M.current=="object"?M.current.open:void 0,X=R;return Z&&(Q!==0?X=d??L??R:X=0),X}a(se,"getOpenDelay");function ne(L){let Q=N.current;if(!Q||!L)return!1;let X=Wi(L);return X!==null&&X!==Q&&ko(Q,X)}a(ne,"isEnabledNestedTriggerTarget");function J(L){let Q=ne(L);return _.current=Q,Q&&(D.openChangeTimeout.clear(),D.restTimeout.clear(),D.restTimeoutPending=!1,z.clear()),Q}a(J,"detectNestedTriggerHover");let ee=cs(C,{enabled:!j,mouseOnly:!0,move:!1,handleClose:!I&&K!=="both"?ps():null,restMs:se,delay(){let L=typeof M.current=="object"?M.current.close:void 0,Q=E;return g==null&&Z&&(Q=L),{close:Q}},triggerElementRef:N,isActiveTrigger:b,isClosing:a(()=>v.select("transitionStatus")==="ending","isClosing"),shouldOpen(){return!_.current}}),ae=Vr(C,{enabled:!j}).reference,Ve=a(L=>{let Q=_.current,X=La(L),ce=J(X),ie=N.current,ve=ie&&X&&ko(ie,X);if(ce&&v.select("open")&&v.select("lastOpenChangeReason")===A.triggerHover){v.setOpen(!1,Y(A.triggerHover,L));return}if(Q&&!ce&&ve&&!G.current&&!v.select("open")&&ie&&vr(te.current)){let pe=a(()=>{!_.current&&!G.current&&!v.select("open")&&v.setOpen(!0,Y(A.triggerHover,L,ie))},"open"),ue=se();ue===0?(z.clear(),pe()):z.start(ue,pe)}},"handleNestedTriggerHover"),he=v.useState("triggerProps",k);return F("button",e,{state:{open:P},ref:[o,T,N],props:[ee,ae,k||K!=="none"?he:void 0,{onMouseOver(L){Ve(L.nativeEvent)},onFocus(L){ne(La(L.nativeEvent))&&L.preventBaseUIHandler()},onMouseLeave(){_.current=!1,z.clear(),te.current=void 0},onPointerEnter(L){te.current=L.pointerType},onPointerDown(L){te.current=L.pointerType,v.set("closeOnClick",u),u&&!v.select("open")&&v.cancelPendingOpen(L.nativeEvent)},onClick(L){u&&!v.select("open")&&v.cancelPendingOpen(L.nativeEvent)},id:x,[Ba.triggerDisabled]:j?"":void 0,[Fa]:j?void 0:""},h],stateAttributesMapping:xo})},"TooltipTrigger"));Dn.displayName="TooltipTrigger";var Ua=S(O(),1);var js=S(O(),1);var Us=js.createContext(void 0);Us.displayName="TooltipPortalContext";function Ha(){let t=js.useContext(Us);if(t===void 0)throw new Error("Base UI: <Tooltip.Portal> is missing.");return t}a(Ha,"useTooltipPortalContext");var zs=S(O(),1),$a=S(er(),1);var ja=S(Pe(),1);var An=zs.forwardRef(a(function(e,o){let{children:s,container:n,className:r,render:l,style:c,...p}=e,{portalNode:d,portalSubtree:u}=Nr({container:n,ref:o,componentProps:e,elementProps:p});return!u&&!d?null:(0,ja.jsxs)(zs.Fragment,{children:[u,d&&$a.createPortal(s,d)]})},"FloatingPortalLite"));An.displayName="FloatingPortalLite";var Vn=S(Pe(),1);var Bn=Ua.forwardRef(a(function(e,o){let{keepMounted:s=!1,...n}=e;return He().useState("mounted")||s?(0,Vn.jsx)(Us.Provider,{value:s,children:(0,Vn.jsx)(An,{ref:o,...n})}):null},"TooltipPortal"));Bn.displayName="TooltipPortal";var qs=S(O(),1);var Ws=S(O(),1);var Zs=Ws.createContext(void 0);Zs.displayName="TooltipPositionerContext";function Eo(){let t=Ws.useContext(Zs);if(t===void 0)throw new Error("Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.");return t}a(Eo,"useTooltipPositionerContext");var za=S(Pe(),1);var Ln=qs.forwardRef(a(function(e,o){let{render:s,className:n,anchor:r,positionMethod:l="absolute",side:c="top",align:p="center",sideOffset:d=0,alignOffset:u=0,collisionBoundary:g="clipping-ancestors",collisionPadding:m=5,arrowPadding:h=5,sticky:f=!1,disableAnchorTracking:v=!1,collisionAvoidance:x=ts,style:b,...P}=e,C=He(),N=Ha(),R=C.useState("open"),E=C.useState("mounted"),T=C.useState("trackCursorAxis"),k=C.useState("disableHoverablePopup"),w=C.useState("floatingRootContext"),M=C.useState("instantType"),V=C.useState("transitionStatus"),Z=C.useState("hasViewport"),D=gs({anchor:r,positionMethod:l,floatingRootContext:w,mounted:E,side:c,sideOffset:d,align:p,alignOffset:u,collisionBoundary:g,collisionPadding:m,sticky:f,arrowPadding:h,disableAnchorTracking:v,keepMounted:N,collisionAvoidance:x,adaptiveOrigin:Z?ms:void 0}),H=qs.useMemo(()=>({open:R,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:T!=="none"?"tracking-cursor":M}),[R,D.side,D.align,D.anchorHidden,T,M]),j=xs(e,H,{styles:D.positionerStyles,transitionStatus:V,props:P,refs:[o,C.useStateSetter("positionerElement")],hidden:!E,inert:!R||T==="both"||k});return(0,za.jsx)(Zs.Provider,{value:D,children:j})},"TooltipPositioner"));Ln.displayName="TooltipPositioner";var Wa=S(O(),1);var Zi={...me,...Le},Fn=Wa.forwardRef(a(function(e,o){let{render:s,className:n,style:r,...l}=e,c=He(),{side:p,align:d}=Eo(),u=c.useState("open"),g=c.useState("instantType"),m=c.useState("transitionStatus"),h=c.useState("popupProps"),f=c.useState("floatingRootContext"),v=c.useState("disabled"),x=c.useState("closeDelay");ro({open:u,ref:c.context.popupRef,onComplete(){u&&c.context.onOpenChangeComplete?.(!0)}}),ds(f,{enabled:!v,closeDelay:x});let b=c.useStateSetter("popupElement");return F("div",e,{state:{open:u,side:p,align:d,instant:g,transitionStatus:m},ref:[o,c.context.popupRef,b],props:[h,vs(m),l],stateAttributesMapping:Zi})},"TooltipPopup"));Fn.displayName="TooltipPopup";var Za=S(O(),1);var Hn=Za.forwardRef(a(function(e,o){let{render:s,className:n,style:r,...l}=e,c=He(),{arrowRef:p,side:d,align:u,arrowUncentered:g,arrowStyles:m}=Eo(),h=c.useState("open"),f=c.useState("instantType");return F("div",e,{state:{open:h,side:d,align:u,uncentered:g,instant:f},ref:[o,p],props:[{style:m,"aria-hidden":!0},l],stateAttributesMapping:me})},"TooltipArrow"));Hn.displayName="TooltipArrow";var $n=S(O(),1);var jn=S(Pe(),1);var Un=a(function(e){let{delay:o,closeDelay:s,timeout:n=400}=e,r=$n.useMemo(()=>({delay:o,closeDelay:s}),[o,s]),l=$n.useMemo(()=>({open:o,close:s}),[o,s]);return(0,jn.jsx)(Hs.Provider,{value:r,children:(0,jn.jsx)(Cr,{delay:l,timeoutMs:n,children:e.children})})},"TooltipProvider");Un.displayName="TooltipProvider";var Ga=S(O(),1);var qa=(function(t){return t.popupWidth="--popup-width",t.popupHeight="--popup-height",t})({});var qi={activationDirection:a(t=>t?{"data-activation-direction":t}:null,"activationDirection")},zn=Ga.forwardRef(a(function(e,o){let{render:s,className:n,style:r,children:l,...c}=e,p=He(),d=Eo(),u=p.useState("instantType"),{children:g,state:m}=ys({store:p,side:d.side,cssVars:qa,children:l}),h={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:u};return F("div",e,{state:h,ref:o,props:[c,{children:g}],stateAttributesMapping:qi})},"TooltipViewport"));zn.displayName="TooltipViewport";var Bo=class{static{a(this,"TooltipHandle")}constructor(){this.store=new No}open(e){let o=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!o)throw new Error(`Base UI: TooltipHandle.open: No trigger found with id "${e}".`);this.store.setOpen(!0,Y(A.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Y(A.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function Ka(){return new Bo}a(Ka,"createTooltipHandle");var Re=S(Yo(),1);var $e=S(O(),1);var y=S(To(),1);var Gi=qr(St.studioFeatures),ei={analytics:!0,auth:!0,containers:!0,flags:!0,kv:!0,mail:!0,payments:!0,queues:!0,scheduler:!0,storage:!0,vectors:!0,workflows:!0},Ki=a(t=>{if(t===null||typeof t!="object")return ei;let e=t,o=a(s=>typeof e[s]=="boolean"?e[s]:!0,"flag");return{analytics:o("analytics"),auth:o("auth"),containers:o("containers"),flags:o("flags"),kv:o("kv"),mail:o("mail"),payments:o("payments"),queues:o("queues"),scheduler:o("scheduler"),storage:o("storage"),vectors:o("vectors"),workflows:o("workflows")}},"coerceFeatures"),qn=a(()=>{let t=(0,Re.c)(3),e=rn(),[o,s]=(0,$e.useState)(ei),n,r;return t[0]!==e?(n=a(()=>{Fe((async()=>{try{s(Ki(await e.query(Gi,{},Gr(""))))}catch{}})())},"t0"),r=[e],t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),(0,$e.useEffect)(n,r),o},"useStudioFeatures"),Qi=a(()=>{let t=(0,Re.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,y.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,y.jsxDEV)("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1)},void 0,!1),t[0]=e):e=t[0],e},"ChevronRight$1"),Yi=a(t=>{let e=(0,Re.c)(24),{group:o}=t,s=re(),n=ft(),r;e[0]!==o.tab||e[1]!==n?(r=a(()=>{Fe(n({to:`/${o.tab}`}))},"t1"),e[0]=o.tab,e[1]=n,e[2]=r):r=e[2];let l=r,c=o.bindings.length,p;e[3]!==o.label?(p=(0,y.jsxDEV)("span",{className:"text-sm font-medium text-foreground",children:o.label},void 0,!1),e[3]=o.label,e[4]=p):p=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=(0,y.jsxDEV)(Qi,{},void 0,!1),e[5]=d):d=e[5];let u;e[6]!==p?(u=(0,y.jsxDEV)("div",{className:"flex items-center justify-between",children:[p,d]},void 0,!0),e[6]=p,e[7]=u):u=e[7];let g;e[8]!==c||e[9]!==s?(g=c===1?s("1 binding"):s("{count} bindings",{count:c}),e[8]=c,e[9]=s,e[10]=g):g=e[10];let m;e[11]!==g?(m=(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:g},void 0,!1),e[11]=g,e[12]=m):m=e[12];let h;e[13]!==c||e[14]!==o.bindings?(h=c>0&&(0,y.jsxDEV)("div",{className:"flex flex-wrap gap-1.5",children:o.bindings.map(el)},void 0,!1),e[13]=c,e[14]=o.bindings,e[15]=h):h=e[15];let f;e[16]!==u||e[17]!==m||e[18]!==h?(f=(0,y.jsxDEV)(cn,{className:"flex flex-col gap-2 py-4",children:[u,m,h]},void 0,!0),e[16]=u,e[17]=m,e[18]=h,e[19]=f):f=e[19];let v;return e[20]!==o.testId||e[21]!==l||e[22]!==f?(v=(0,y.jsxDEV)(dt,{className:"cursor-pointer gap-0 py-0 transition-colors hover:bg-muted/40","data-testid":o.testId,onClick:l,children:f},void 0,!1),e[20]=o.testId,e[21]=l,e[22]=f,e[23]=v):v=e[23],v},"BindingCard"),Qa=["kv","files","vectors"],Ji=a((t,e)=>[...t.filter(o=>o.tab!==e.tab),e].toSorted((o,s)=>Qa.indexOf(o.tab)-Qa.indexOf(s.tab)),"upsertCard"),Xi=a(()=>{let t=(0,Re.c)(19),e=rn(),o=qn(),s=re(),n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=[],t[0]=n):n=t[0];let[r,l]=(0,$e.useState)(n),c,p;if(t[1]!==e||t[2]!==o.kv||t[3]!==o.storage||t[4]!==o.vectors||t[5]!==s?(c=a(()=>{let f={cancelled:!1},v=[{enabled:o.kv,label:s("KV Namespaces"),load:a(async()=>(await e.listKvNamespaces()).map(tl),"load"),tab:"kv",testId:"home-binding-kv"},{enabled:o.storage,label:s("R2 Buckets"),load:a(()=>e.listStorageBuckets(),"load"),tab:"files",testId:"home-binding-r2"},{enabled:o.vectors,label:s("Vectorize Indexes"),load:a(async()=>(await e.listVectorIndexes()).map(ol),"load"),tab:"vectors",testId:"home-binding-vectors"}];for(let x of v)x.enabled&&Fe((async()=>{try{let b=await x.load();if(!f.cancelled){let P={bindings:b,label:x.label,tab:x.tab,testId:x.testId};l(C=>Ji(C,P))}}catch{}})());return()=>{f.cancelled=!0}},"t1"),p=[e,o.kv,o.storage,o.vectors,s],t[1]=e,t[2]=o.kv,t[3]=o.storage,t[4]=o.vectors,t[5]=s,t[6]=c,t[7]=p):(c=t[6],p=t[7]),(0,$e.useEffect)(c,p),r.length===0)return null;let d;t[8]!==s?(d=s("Bindings"),t[8]=s,t[9]=d):d=t[9];let u;t[10]!==d?(u=(0,y.jsxDEV)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:d},void 0,!1),t[10]=d,t[11]=u):u=t[11];let g;t[12]!==r?(g=r.map(sl),t[12]=r,t[13]=g):g=t[13];let m;t[14]!==g?(m=(0,y.jsxDEV)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:g},void 0,!1),t[14]=g,t[15]=m):m=t[15];let h;return t[16]!==u||t[17]!==m?(h=(0,y.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"home-bindings",children:[u,m]},void 0,!0),t[16]=u,t[17]=m,t[18]=h):h=t[18],h},"BindingsOverview");function el(t){return(0,y.jsxDEV)(wo,{variant:"secondary",children:t},t,!1)}a(el,"_temp$1");function tl(t){return t.binding}a(tl,"_temp2$1");function ol(t){return t.name}a(ol,"_temp3$1");function sl(t){return(0,y.jsxDEV)(Yi,{group:t},t.tab,!1)}a(sl,"_temp4");var nl=[{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"}],rl=a(t=>JSON.stringify({mcpServers:{lunora:{args:["-y","@lunora/mcp"],command:"npx",env:{LUNORA_ADMIN_TOKEN:"<your-admin-token>",LUNORA_URL:t}}}},null,2),"buildMcpConfig"),al=a(t=>{let e=nl.map(o=>`- ${o.name} \u2014 ${o.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
|
-
`)},"buildAgentPrompt"),il=1500,ll=a(()=>{let t=(0,Re.c)(35),e=re(),o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=Kr(),t[0]=o):o=t[0];let s=o,[n,r]=(0,$e.useState)(null),l,c;t[1]!==n?(l=a(()=>{if(n===null)return;let M=globalThis.setTimeout(()=>{r(null)},il);return()=>{globalThis.clearTimeout(M)}},"t1"),c=[n],t[1]=n,t[2]=l,t[3]=c):(l=t[2],c=t[3]),(0,$e.useEffect)(l,c);let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=a((M,V)=>{Qr(V)&&r(M)},"t3"),t[4]=p):p=t[4];let d=p,u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=a(()=>{d("config",rl(s))},"t4"),t[5]=u):u=t[5];let g=u,m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=a(()=>{d("prompt",al(s))},"t5"),t[6]=m):m=t[6];let h=m,f;t[7]!==e?(f=e("Connect an AI agent"),t[7]=e,t[8]=f):f=t[8];let v;t[9]!==f?(v=(0,y.jsxDEV)("span",{className:"text-sm font-medium text-foreground",children:f},void 0,!1),t[9]=f,t[10]=v):v=t[10];let x;t[11]!==e?(x=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]=x):x=t[12];let b;t[13]!==x?(b=(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:x},void 0,!1),t[13]=x,t[14]=b):b=t[14];let P;t[15]!==v||t[16]!==b?(P=(0,y.jsxDEV)("div",{className:"flex flex-col gap-1.5 p-4",children:[v,b]},void 0,!0),t[15]=v,t[16]=b,t[17]=P):P=t[17];let C;t[18]===Symbol.for("react.memo_cache_sentinel")?(C=(0,y.jsxDEV)("code",{className:"font-mono text-xs text-muted-foreground","data-testid":"home-connect-agent-command",children:"npx -y @lunora/mcp"},void 0,!1),t[18]=C):C=t[18];let N;t[19]!==n||t[20]!==e?(N=e(n==="config"?"Copied":"Copy MCP config"),t[19]=n,t[20]=e,t[21]=N):N=t[21];let R;t[22]!==N?(R=(0,y.jsxDEV)(bo,{"data-testid":"home-connect-agent-copy-config",onClick:g,size:"xs",variant:"outline",children:N},void 0,!1),t[22]=N,t[23]=R):R=t[23];let E;t[24]!==n||t[25]!==e?(E=e(n==="prompt"?"Copied":"Copy agent prompt"),t[24]=n,t[25]=e,t[26]=E):E=t[26];let T;t[27]!==E?(T=(0,y.jsxDEV)(bo,{"data-testid":"home-connect-agent-copy-prompt",onClick:h,size:"xs",variant:"outline",children:E},void 0,!1),t[27]=E,t[28]=T):T=t[28];let k;t[29]!==R||t[30]!==T?(k=(0,y.jsxDEV)("div",{className:"flex flex-col gap-3 border-t border-border bg-muted/50 px-4 py-3",children:[C,(0,y.jsxDEV)("div",{className:"flex flex-wrap gap-2",children:[R,T]},void 0,!0)]},void 0,!0),t[29]=R,t[30]=T,t[31]=k):k=t[31];let w;return t[32]!==P||t[33]!==k?(w=(0,y.jsxDEV)(dt,{className:"gap-0 py-0","data-testid":"home-connect-agent",children:[P,k]},void 0,!0),t[32]=P,t[33]=k,t[34]=w):w=t[34],w},"ConnectAgentCard"),dl=(0,$e.lazy)(()=>import("./chunk-UPNTMJFF.js").then(t=>({default:t.Sparkline}))),Zn=a(t=>{if(t<1e3)return`${String(Math.round(t))}ms`;let e=t>=1e4?0:1;return`${(t/1e3).toFixed(e)}s`},"formatMs"),cl=a((t,e)=>{let o=Math.max(0,Math.round((e-t)/1e3));if(o<60)return`${String(o)}s ago`;let s=Math.round(o/60);if(s<60)return`${String(s)}m ago`;let n=Math.round(s/60);return n<24?`${String(n)}h ago`:`${String(Math.round(n/24))}d ago`},"relativeTime"),Ya=a((t,e)=>{if(t===void 0||t.length===0)return[];let o=new Map;for(let s of t)o.set(s.bucketMs,(o.get(s.bucketMs)??0)+s[e]);return[...o.entries()].toSorted(([s],[n])=>s-n).map(([,s])=>s)},"bucketSeries"),Ja=a((t,e=!0)=>{if(t.length<4)return null;let o=Math.floor(t.length/2),s=t.slice(0,o).reduce((l,c)=>l+c,0),n=t.slice(o).reduce((l,c)=>l+c,0);if(s===0)return null;let r=(n-s)/s*100;return{positive:e?r>=0:r<=0,text:`${r>=0?"+":""}${r.toFixed(1)}%`}},"seriesDelta"),Gs=a(t=>{let e=(0,Re.c)(24),{delta:o,footer:s,label:n,trend:r,unit:l,value:c}=t,p=re(),d;e[0]!==n?(d=(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:n},void 0,!1),e[0]=n,e[1]=d):d=e[1];let u;e[2]!==c?(u=(0,y.jsxDEV)("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:c},void 0,!1),e[2]=c,e[3]=u):u=e[3];let g;e[4]!==l?(g=l!==void 0&&(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:l},void 0,!1),e[4]=l,e[5]=g):g=e[5];let m;e[6]!==u||e[7]!==g?(m=(0,y.jsxDEV)("span",{className:"flex items-baseline gap-1.5",children:[u,g]},void 0,!0),e[6]=u,e[7]=g,e[8]=m):m=e[8];let h;e[9]!==r?(h=r!==void 0&&(0,y.jsxDEV)($e.Suspense,{fallback:(0,y.jsxDEV)("div",{"aria-hidden":"true",className:"h-8 w-28"},void 0,!1),children:(0,y.jsxDEV)(dl,{data:r},void 0,!1)},void 0,!1),e[9]=r,e[10]=h):h=e[10];let f;e[11]!==m||e[12]!==h?(f=(0,y.jsxDEV)("div",{className:"flex items-center justify-between gap-3",children:[m,h]},void 0,!0),e[11]=m,e[12]=h,e[13]=f):f=e[13];let v;e[14]!==d||e[15]!==f?(v=(0,y.jsxDEV)("div",{className:"flex flex-col gap-2.5 p-4",children:[d,f]},void 0,!0),e[14]=d,e[15]=f,e[16]=v):v=e[16];let x;e[17]!==o||e[18]!==s||e[19]!==p?(x=o==null?s!=null&&(0,y.jsxDEV)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:s},void 0,!1):(0,y.jsxDEV)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px]",children:[(0,y.jsxDEV)("span",{className:W("font-semibold",o.positive?"text-success":"text-destructive"),children:o.text},void 0,!1)," ",(0,y.jsxDEV)("span",{className:"text-muted-foreground",children:p("vs. prev.")},void 0,!1)]},void 0,!0),e[17]=o,e[18]=s,e[19]=p,e[20]=x):x=e[20];let b;return e[21]!==v||e[22]!==x?(b=(0,y.jsxDEV)(dt,{className:"justify-between gap-0 py-0",children:[v,x]},void 0,!0),e[21]=v,e[22]=x,e[23]=b):b=e[23],b},"StatCard"),pl=a(()=>{let t=(0,Re.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,y.jsxDEV)("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,y.jsxDEV)("path",{d:"m9 6 6 6-6 6"},void 0,!1)},void 0,!1),t[0]=e):e=t[0],e},"ChevronRight"),Wn=a(t=>{let e=(0,Re.c)(7),{command:o,label:s}=t,n;e[0]!==s?(n=(0,y.jsxDEV)("div",{className:"p-4",children:(0,y.jsxDEV)("span",{className:"text-sm font-medium text-foreground",children:s},void 0,!1)},void 0,!1),e[0]=s,e[1]=n):n=e[1];let r;e[2]!==o?(r=(0,y.jsxDEV)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5",children:(0,y.jsxDEV)("code",{className:"font-mono text-xs text-muted-foreground",children:o},void 0,!1)},void 0,!1),e[2]=o,e[3]=r):r=e[3];let l;return e[4]!==n||e[5]!==r?(l=(0,y.jsxDEV)(dt,{className:"justify-between gap-0 py-0",children:[n,r]},void 0,!0),e[4]=n,e[5]=r,e[6]=l):l=e[6],l},"ConnectCard"),Xa=a(t=>{let e=(0,Re.c)(18),{count:o,onView:s,testId:n,title:r}=t,l=re(),c;e[0]!==r?(c=(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:r},void 0,!1),e[0]=r,e[1]=c):c=e[1];let p;e[2]!==o||e[3]!==l?(p=o===null?(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:l("No data yet")},void 0,!1):(0,y.jsxDEV)(wo,{variant:o>0?"destructive":"success",children:o>0?o:l("All clear")},void 0,!1),e[2]=o,e[3]=l,e[4]=p):p=e[4];let d;e[5]!==c||e[6]!==p?(d=(0,y.jsxDEV)("div",{className:"flex items-start justify-between gap-2 p-4",children:[c,p]},void 0,!0),e[5]=c,e[6]=p,e[7]=d):d=e[7];let u;e[8]!==l?(u=l("View"),e[8]=l,e[9]=u):u=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=(0,y.jsxDEV)(pl,{},void 0,!1),e[10]=g):g=e[10];let m;e[11]!==s||e[12]!==u?(m=(0,y.jsxDEV)("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:s,type:"button",children:[u,g]},void 0,!0),e[11]=s,e[12]=u,e[13]=m):m=e[13];let h;return e[14]!==d||e[15]!==m||e[16]!==n?(h=(0,y.jsxDEV)(dt,{className:"justify-between gap-0 py-0","data-testid":n,children:[d,m]},void 0,!0),e[14]=d,e[15]=m,e[16]=n,e[17]=h):h=e[17],h},"AdvisorCard"),ul=a(t=>{let e=(0,Re.c)(7),{functions:o}=t,s=re(),n;if(e[0]!==o||e[1]!==s){let r=[...o].toSorted(hl).slice(0,5),l;e[3]!==s?(l=s("Top functions"),e[3]=s,e[4]=l):l=e[4];let c;e[5]!==l?(c=(0,y.jsxDEV)("div",{className:"border-b border-border px-4 py-3",children:(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l},void 0,!1)},void 0,!1),e[5]=l,e[6]=c):c=e[6],n=(0,y.jsxDEV)(dt,{className:"gap-0 py-0","data-testid":"home-top-functions",children:[c,r.length===0?(0,y.jsxDEV)("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:s("No functions called yet.")},void 0,!1):(0,y.jsxDEV)("div",{className:"divide-y divide-border",children:[(0,y.jsxDEV)("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,y.jsxDEV)("span",{children:s("Function")},void 0,!1),(0,y.jsxDEV)("span",{className:"text-end",children:s("Calls")},void 0,!1),(0,y.jsxDEV)("span",{className:"w-12 text-end",children:s("Avg")},void 0,!1),(0,y.jsxDEV)("span",{className:"w-8 text-end",children:s("Err")},void 0,!1)]},void 0,!0),r.map(vl)]},void 0,!0)]},void 0,!0),e[0]=o,e[1]=s,e[2]=n}else n=e[2];return n},"TopFunctionsCard"),fl=a(t=>{let e=(0,Re.c)(26),{subs:o}=t,s=re(),n;e[0]!==s?(n=s("Live connections"),e[0]=s,e[1]=n):n=e[1];let r;e[2]!==n?(r=(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:n},void 0,!1),e[2]=n,e[3]=r):r=e[3];let l=o?.totalConnections??0,c;e[4]!==l?(c=l.toLocaleString(),e[4]=l,e[5]=c):c=e[5];let p;e[6]!==c?(p=(0,y.jsxDEV)("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:c},void 0,!1),e[6]=c,e[7]=p):p=e[7];let d;e[8]!==s?(d=s("sockets"),e[8]=s,e[9]=d):d=e[9];let u;e[10]!==d?(u=(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:d},void 0,!1),e[10]=d,e[11]=u):u=e[11];let g;e[12]!==p||e[13]!==u?(g=(0,y.jsxDEV)("span",{className:"flex items-baseline gap-1.5",children:[p,u]},void 0,!0),e[12]=p,e[13]=u,e[14]=g):g=e[14];let m=o?.totalSubscriptions??0,h;e[15]!==m?(h=m.toLocaleString(),e[15]=m,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("active subscriptions"),e[17]=s,e[18]=f):f=e[18];let v;e[19]!==h||e[20]!==f?(v=(0,y.jsxDEV)("span",{className:"text-[11px] text-muted-foreground",children:[h," ",f]},void 0,!0),e[19]=h,e[20]=f,e[21]=v):v=e[21];let x;return e[22]!==v||e[23]!==r||e[24]!==g?(x=(0,y.jsxDEV)(dt,{"data-testid":"home-live-connections",children:(0,y.jsxDEV)(cn,{className:"flex flex-col gap-2.5 py-4",children:[r,g,v]},void 0,!0)},void 0,!1),e[22]=v,e[23]=r,e[24]=g,e[25]=x):x=e[25],x},"LiveConnectionsCard"),ml=a(t=>{let e=(0,Re.c)(7),{entries:o}=t,s=re(),n;if(e[0]!==o||e[1]!==s){let r=Date.now(),l;e[3]!==s?(l=s("Recent activity"),e[3]=s,e[4]=l):l=e[4];let c;e[5]!==l?(c=(0,y.jsxDEV)("div",{className:"border-b border-border px-4 py-3",children:(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l},void 0,!1)},void 0,!1),e[5]=l,e[6]=c):c=e[6],n=(0,y.jsxDEV)(dt,{className:"gap-0 py-0","data-testid":"home-recent-activity",children:[c,o.length===0?(0,y.jsxDEV)("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:s("No recent activity.")},void 0,!1):(0,y.jsxDEV)("ul",{className:"divide-y divide-border",children:o.slice(0,5).map(p=>(0,y.jsxDEV)("li",{className:"flex items-center justify-between gap-3 px-4 py-2 text-[13px]",children:[(0,y.jsxDEV)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,y.jsxDEV)("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-muted-foreground/40"},void 0,!1),(0,y.jsxDEV)("span",{className:"truncate text-foreground",children:[p.op,p.table!==void 0&&(0,y.jsxDEV)("span",{className:"text-muted-foreground",children:[" \xB7 ",p.table,p.id===void 0?"":`#${p.id}`]},void 0,!0)]},void 0,!0)]},void 0,!0),(0,y.jsxDEV)("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:cl(p.ts,r)},void 0,!1)]},p.seq,!0))},void 0,!1)]},void 0,!0),e[0]=o,e[1]=s,e[2]=n}else n=e[2];return n},"RecentActivityCard"),gl=a(t=>{let e=t.reduce((o,s)=>o+s.calls,0);return e===0?null:t.reduce((o,s)=>o+s.totalDurationMs,0)/e},"averageLatencyMs"),ti=a(t=>{let e=(0,Re.c)(151),{initialShardKey:o}=t,s=re(),n=ft(),r=o??"",l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={},e[0]=l):l=e[0];let c;e[1]!==r?(c={shardKey:r},e[1]=r,e[2]=c):c=e[2];let p=yo(St.getMetrics,l,c),d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={},e[3]=d):d=e[3];let u;e[4]!==r?(u={shardKey:r},e[4]=r,e[5]=u):u=e[5];let g=yo(St.getFunctionStats,d,u),m,h;e[6]===Symbol.for("react.memo_cache_sentinel")?(m={},h={shardKey:""},e[6]=m,e[7]=h):(m=e[6],h=e[7]);let f=yo(St.getSecurityAudit,m,h),v;e[8]===Symbol.for("react.memo_cache_sentinel")?(v={},e[8]=v):v=e[8];let x;e[9]!==r?(x={shardKey:r},e[9]=r,e[10]=x):x=e[10];let b=yo(St.listSubscriptions,v,x),P;e[11]===Symbol.for("react.memo_cache_sentinel")?(P={},e[11]=P):P=e[11];let C;e[12]!==r?(C={shardKey:r},e[12]=r,e[13]=C):C=e[13];let N=yo(St.getAuditLog,P,C),R=p.data??null,E,T,k,w,M,V,Z,D,H,j,G,K,I,_,z,te,se,ne;if(e[14]!==N.data||e[15]!==f.data||e[16]!==R||e[17]!==p.data||e[18]!==n||e[19]!==g.data||e[20]!==b.data||e[21]!==s){w=Array.isArray(g.data?.functions)?g.data.functions:[],Z=b.data??null;let We;e[40]!==N.data?(We=Array.isArray(N.data?.entries)?N.data.entries:[],e[40]=N.data,e[41]=We):We=e[41],T=We,M=p.data===void 0||g.data===void 0?null:Jr(R,w).length,V=Array.isArray(f.data?.findings)?f.data.findings.length:null;let Ze;e[42]!==n?(Ze=a(()=>{Fe(n({to:"/security"}))},"t212"),e[42]=n,e[43]=Ze):Ze=e[43],ne=Ze;let qe;e[44]!==n?(qe=a(()=>{Fe(n({to:"/insights"}))},"t222"),e[44]=n,e[45]=qe):qe=e[45],se=qe;let Ge=Ya(R?.history,"calls"),Ke=Ya(R?.history,"errors"),at=gl(w),Qe=Math.max(0,...w.map(xl)),xe=R?.cache,Ye;e[46]!==xe?(Ye=xe!=null&&xe.hits+xe.misses>0?Math.round(xe.hits/(xe.hits+xe.misses)*100):null,e[46]=xe,e[47]=Ye):Ye=e[47],k=Ye,z="flex flex-col gap-6",te="lunora-home",G="grid gap-3 sm:grid-cols-2 xl:grid-cols-4",K="home-health";let Xe=Ja(Ge),_e;e[48]!==s?(_e=s("Requests"),e[48]=s,e[49]=_e):_e=e[49];let et=R?.requests??0,Ie;e[50]!==et?(Ie=et.toLocaleString(),e[50]=et,e[51]=Ie):Ie=e[51],e[52]!==Ge||e[53]!==Xe||e[54]!==_e||e[55]!==Ie?(I=(0,y.jsxDEV)(Gs,{delta:Xe,label:_e,trend:Ge,value:Ie},void 0,!1),e[52]=Ge,e[53]=Xe,e[54]=_e,e[55]=Ie,e[56]=I):I=e[56];let tt=Ja(Ke,!1),De;e[57]!==s?(De=s("Errors"),e[57]=s,e[58]=De):De=e[58];let ot=R?.errors??0,Ae;e[59]!==ot?(Ae=ot.toLocaleString(),e[59]=ot,e[60]=Ae):Ae=e[60],e[61]!==Ke||e[62]!==tt||e[63]!==De||e[64]!==Ae?(_=(0,y.jsxDEV)(Gs,{delta:tt,label:De,trend:Ke,value:Ae},void 0,!1),e[61]=Ke,e[62]=tt,e[63]=De,e[64]=Ae,e[65]=_):_=e[65],E=Gs,e[66]!==Qe||e[67]!==s?(D=Qe>0?`${s("max")} ${Zn(Qe)}`:void 0,e[66]=Qe,e[67]=s,e[68]=D):D=e[68],e[69]!==s?(H=s("Avg latency"),e[69]=s,e[70]=H):H=e[70],j=at===null?"\u2014":Zn(at),e[14]=N.data,e[15]=f.data,e[16]=R,e[17]=p.data,e[18]=n,e[19]=g.data,e[20]=b.data,e[21]=s,e[22]=E,e[23]=T,e[24]=k,e[25]=w,e[26]=M,e[27]=V,e[28]=Z,e[29]=D,e[30]=H,e[31]=j,e[32]=G,e[33]=K,e[34]=I,e[35]=_,e[36]=z,e[37]=te,e[38]=se,e[39]=ne}else E=e[22],T=e[23],k=e[24],w=e[25],M=e[26],V=e[27],Z=e[28],D=e[29],H=e[30],j=e[31],G=e[32],K=e[33],I=e[34],_=e[35],z=e[36],te=e[37],se=e[38],ne=e[39];let J;e[71]!==E||e[72]!==D||e[73]!==H||e[74]!==j?(J=(0,y.jsxDEV)(E,{footer:D,label:H,value:j},void 0,!1),e[71]=E,e[72]=D,e[73]=H,e[74]=j,e[75]=J):J=e[75];let ee;e[76]!==k||e[77]!==s?(ee=k===null?void 0:`${String(k)}% ${s("cache hit")}`,e[76]=k,e[77]=s,e[78]=ee):ee=e[78];let ae;e[79]!==s?(ae=s("Database size"),e[79]=s,e[80]=ae):ae=e[80];let Ve=R?.databaseSize??null,he;e[81]!==Ve?(he=Yr(Ve),e[81]=Ve,e[82]=he):he=e[82];let be;e[83]!==ee||e[84]!==ae||e[85]!==he?(be=(0,y.jsxDEV)(Gs,{footer:ee,label:ae,value:he},void 0,!1),e[83]=ee,e[84]=ae,e[85]=he,e[86]=be):be=e[86];let ye;e[87]!==G||e[88]!==K||e[89]!==I||e[90]!==_||e[91]!==J||e[92]!==be?(ye=(0,y.jsxDEV)("div",{className:G,"data-testid":K,children:[I,_,J,be]},void 0,!0),e[87]=G,e[88]=K,e[89]=I,e[90]=_,e[91]=J,e[92]=be,e[93]=ye):ye=e[93];let Be;e[94]===Symbol.for("react.memo_cache_sentinel")?(Be=(0,y.jsxDEV)(Xi,{},void 0,!1),e[94]=Be):Be=e[94];let L;e[95]!==w?(L=(0,y.jsxDEV)("div",{className:"lg:col-span-2",children:(0,y.jsxDEV)(ul,{functions:w},void 0,!1)},void 0,!1),e[95]=w,e[96]=L):L=e[96];let Q;e[97]!==Z?(Q=(0,y.jsxDEV)(fl,{subs:Z},void 0,!1),e[97]=Z,e[98]=Q):Q=e[98];let X;e[99]!==T?(X=(0,y.jsxDEV)(ml,{entries:T},void 0,!1),e[99]=T,e[100]=X):X=e[100];let ce;e[101]!==Q||e[102]!==X?(ce=(0,y.jsxDEV)("div",{className:"flex flex-col gap-3",children:[Q,X]},void 0,!0),e[101]=Q,e[102]=X,e[103]=ce):ce=e[103];let ie;e[104]!==L||e[105]!==ce?(ie=(0,y.jsxDEV)("div",{className:"grid gap-3 lg:grid-cols-3",children:[L,ce]},void 0,!0),e[104]=L,e[105]=ce,e[106]=ie):ie=e[106];let ve;e[107]!==s?(ve=s("Advisors"),e[107]=s,e[108]=ve):ve=e[108];let pe;e[109]!==ve?(pe=(0,y.jsxDEV)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:ve},void 0,!1),e[109]=ve,e[110]=pe):pe=e[110];let ue;e[111]!==M||e[112]!==V||e[113]!==s||e[114]!==se||e[115]!==ne?(ue=V===0&&M===0?(0,y.jsxDEV)(Zr,{description:s("No security or performance issues detected."),icon:(0,y.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,y.jsxDEV)("path",{d:"M12 3 4 6v5c0 5 3.4 8.5 8 10 4.6-1.5 8-5 8-10V6l-8-3Z"},void 0,!1),(0,y.jsxDEV)("path",{d:"m9 12 2 2 4-4"},void 0,!1)]},void 0,!0),testId:"home-advisors-clear",title:s("No issues found")},void 0,!1):(0,y.jsxDEV)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,y.jsxDEV)(Xa,{count:V,onView:ne,testId:"home-security",title:s("Security findings")},void 0,!1),(0,y.jsxDEV)(Xa,{count:M,onView:se,testId:"home-performance",title:s("Performance issues")},void 0,!1)]},void 0,!0),e[111]=M,e[112]=V,e[113]=s,e[114]=se,e[115]=ne,e[116]=ue):ue=e[116];let Se;e[117]!==pe||e[118]!==ue?(Se=(0,y.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"home-advisors",children:[pe,ue]},void 0,!0),e[117]=pe,e[118]=ue,e[119]=Se):Se=e[119];let je;e[120]!==s?(je=s("Get connected"),e[120]=s,e[121]=je):je=e[121];let fe;e[122]!==je?(fe=(0,y.jsxDEV)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:je},void 0,!1),e[122]=je,e[123]=fe):fe=e[123];let Je;e[124]!==s?(Je=s("Client SDK"),e[124]=s,e[125]=Je):Je=e[125];let Ne;e[126]!==Je?(Ne=(0,y.jsxDEV)(Wn,{command:"npm i @lunora/client",label:Je},void 0,!1),e[126]=Je,e[127]=Ne):Ne=e[127];let Ee;e[128]!==s?(Ee=s("React"),e[128]=s,e[129]=Ee):Ee=e[129];let Te;e[130]!==Ee?(Te=(0,y.jsxDEV)(Wn,{command:"npm i @lunora/react",label:Ee},void 0,!1),e[130]=Ee,e[131]=Te):Te=e[131];let we;e[132]!==s?(we=s("CLI"),e[132]=s,e[133]=we):we=e[133];let ke;e[134]!==we?(ke=(0,y.jsxDEV)(Wn,{command:"lunora dev",label:we},void 0,!1),e[134]=we,e[135]=ke):ke=e[135];let Me;e[136]!==Ne||e[137]!==Te||e[138]!==ke?(Me=(0,y.jsxDEV)("div",{className:"grid gap-3 sm:grid-cols-3",children:[Ne,Te,ke]},void 0,!0),e[136]=Ne,e[137]=Te,e[138]=ke,e[139]=Me):Me=e[139];let Ue;e[140]===Symbol.for("react.memo_cache_sentinel")?(Ue=(0,y.jsxDEV)(ll,{},void 0,!1),e[140]=Ue):Ue=e[140];let Oe;e[141]!==fe||e[142]!==Me?(Oe=(0,y.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"home-get-connected",children:[fe,Me,Ue]},void 0,!0),e[141]=fe,e[142]=Me,e[143]=Oe):Oe=e[143];let ze;return e[144]!==z||e[145]!==te||e[146]!==ye||e[147]!==ie||e[148]!==Se||e[149]!==Oe?(ze=(0,y.jsxDEV)("div",{className:z,"data-testid":te,children:[ye,Be,ie,Se,Oe]},void 0,!0),e[144]=z,e[145]=te,e[146]=ye,e[147]=ie,e[148]=Se,e[149]=Oe,e[150]=ze):ze=e[150],ze},"HomePanel");function hl(t,e){return e.calls-t.calls}a(hl,"_temp");function vl(t){return(0,y.jsxDEV)("div",{className:"grid grid-cols-[1fr_auto_auto_auto] items-center gap-4 px-4 py-2 text-[13px]",children:[(0,y.jsxDEV)("span",{className:"truncate font-mono text-xs text-foreground",children:t.path},void 0,!1),(0,y.jsxDEV)("span",{className:"text-end tabular-nums",children:t.calls.toLocaleString()},void 0,!1),(0,y.jsxDEV)("span",{className:"w-12 text-end tabular-nums text-muted-foreground",children:Zn(t.calls>0?t.totalDurationMs/t.calls:0)},void 0,!1),(0,y.jsxDEV)("span",{className:W("w-8 text-end tabular-nums",t.errors>0?"text-destructive":"text-muted-foreground"),children:t.errors},void 0,!1)]},t.path,!0)}a(vl,"_temp2");function xl(t){return t.maxDurationMs}a(xl,"_temp3");var oi=S(Yo(),1);var si=S(To(),1);var bl=a((t,e,o)=>t!==void 0?t:e===void 0&&o===void 0?cr:dr(e,o),"resolveInstance"),ni=a(t=>{let e=(0,oi.c)(7),{catalogs:o,children:s,i18n:n,locale:r}=t,l;e[0]!==o||e[1]!==n||e[2]!==r?(l=bl(n,r,o),e[0]=o,e[1]=n,e[2]=r,e[3]=l):l=e[3];let c=l,p;return e[4]!==s||e[5]!==c?(p=(0,si.jsxDEV)(pr,{value:c,children:s},void 0,!1),e[4]=s,e[5]=c,e[6]=p):p=e[6],p},"StudioI18nProvider");var Kn=S(Yo(),1);var Ct=S(O(),1);var de=S(To(),1);var Gn="lunora:command-palette",ri=a(()=>{"window"in globalThis&&globalThis.dispatchEvent(new Event(Gn))},"openCommandPalette"),yl=a(t=>{let e=(0,Kn.c)(18),{active:o,index:s,item:n,onActivate:r,onSelect:l}=t,c;e[0]!==n||e[1]!==l?(c=a(()=>{l(n)},"t1"),e[0]=n,e[1]=l,e[2]=c):c=e[2];let p=c,d;e[3]!==s||e[4]!==r?(d=a(()=>{r(s)},"t2"),e[3]=s,e[4]=r,e[5]=d):d=e[5];let u=d,g=o?"bg-accent text-accent-foreground":"text-foreground",m;e[6]!==g?(m=W("flex w-full items-center justify-between gap-3 rounded-md px-3 py-2 text-start text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground",g),e[6]=g,e[7]=m):m=e[7];let h;e[8]!==n.label?(h=(0,de.jsxDEV)("span",{children:n.label},void 0,!1),e[8]=n.label,e[9]=h):h=e[9];let f;e[10]!==n.group?(f=(0,de.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:n.group},void 0,!1),e[10]=n.group,e[11]=f):f=e[11];let v;return e[12]!==p||e[13]!==u||e[14]!==m||e[15]!==h||e[16]!==f?(v=(0,de.jsxDEV)("li",{children:(0,de.jsxDEV)("button",{className:m,onClick:p,onMouseEnter:u,type:"button",children:[h,f]},void 0,!0)},void 0,!1),e[12]=p,e[13]=u,e[14]=m,e[15]=h,e[16]=f,e[17]=v):v=e[17],v},"CommandRow"),ai=a(t=>{let e=(0,Kn.c)(39),{items:o}=t,s=re(),n=ft(),[r,l]=(0,Ct.useState)(!1),[c,p]=(0,Ct.useState)(""),[d,u]=(0,Ct.useState)(0),g=(0,Ct.useRef)(null),m,h;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=a(()=>{let I=a(z=>{(z.metaKey||z.ctrlKey)&&z.key.toLowerCase()==="k"&&(z.preventDefault(),l(!0))},"onKeyDown"),_=a(()=>{l(!0)},"onOpen");return globalThis.addEventListener("keydown",I),globalThis.addEventListener(Gn,_),()=>{globalThis.removeEventListener("keydown",I),globalThis.removeEventListener(Gn,_)}},"t1"),h=[],e[0]=m,e[1]=h):(m=e[0],h=e[1]),(0,Ct.useEffect)(m,h);let f;if(e[2]!==o||e[3]!==c){e:{let I=c.trim().toLowerCase();if(I===""){f=o;break e}f=o.filter(_=>_.label.toLowerCase().includes(I)||_.group.toLowerCase().includes(I))}e[2]=o,e[3]=c,e[4]=f}else f=e[4];let v=f,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=a(I=>{l(I),I||(p(""),u(0))},"t4"),e[5]=x):x=e[5];let b=x,P;e[6]!==n?(P=a(I=>{b(!1),Fe(n({to:I.to}))},"t5"),e[6]=n,e[7]=P):P=e[7];let C=P,N;e[8]===Symbol.for("react.memo_cache_sentinel")?(N=a(I=>{p(I.target.value),u(0)},"t6"),e[8]=N):N=e[8];let R=N,E;e[9]!==d||e[10]!==v||e[11]!==C?(E=a(I=>{e:switch(I.key){case"ArrowDown":{I.preventDefault(),u(_=>v.length===0?0:(_+1)%v.length);break e}case"ArrowUp":{I.preventDefault(),u(_=>v.length===0?0:(_-1+v.length)%v.length);break e}case"Enter":{I.preventDefault();let _=v[d];_!==void 0&&C(_);break e}}},"t7"),e[9]=d,e[10]=v,e[11]=C,e[12]=E):E=e[12];let T=E,k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=(0,de.jsxDEV)(ge.Backdrop,{className:"fixed inset-0 z-50 bg-black/40 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0"},void 0,!1),e[13]=k):k=e[13];let w;e[14]!==s?(w=s("Command palette"),e[14]=s,e[15]=w):w=e[15];let M;e[16]!==w?(M=(0,de.jsxDEV)(ge.Title,{className:"sr-only",children:w},void 0,!1),e[16]=w,e[17]=M):M=e[17];let V;e[18]===Symbol.for("react.memo_cache_sentinel")?(V=(0,de.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,de.jsxDEV)("circle",{cx:"11",cy:"11",r:"7"},void 0,!1),(0,de.jsxDEV)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"},void 0,!1)]},void 0,!0),e[18]=V):V=e[18];let Z;e[19]!==s?(Z=s("Search\u2026"),e[19]=s,e[20]=Z):Z=e[20];let D;e[21]!==T||e[22]!==c||e[23]!==Z?(D=(0,de.jsxDEV)("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[V,(0,de.jsxDEV)("input",{className:"h-11 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground","data-testid":"dash-command-input",onChange:R,onKeyDown:T,placeholder:Z,ref:g,type:"text",value:c},void 0,!1)]},void 0,!0),e[21]=T,e[22]=c,e[23]=Z,e[24]=D):D=e[24];let H;e[25]!==d||e[26]!==v||e[27]!==C||e[28]!==s?(H=v.length===0?(0,de.jsxDEV)("li",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:s("No results.")},void 0,!1):v.map((I,_)=>(0,de.jsxDEV)(yl,{active:_===d,index:_,item:I,onActivate:u,onSelect:C},I.to,!1)),e[25]=d,e[26]=v,e[27]=C,e[28]=s,e[29]=H):H=e[29];let j;e[30]!==H?(j=(0,de.jsxDEV)("ul",{className:"max-h-80 overflow-y-auto p-1.5","data-testid":"dash-command-list",children:H},void 0,!1),e[30]=H,e[31]=j):j=e[31];let G;e[32]!==M||e[33]!==D||e[34]!==j?(G=(0,de.jsxDEV)(ge.Portal,{children:[k,(0,de.jsxDEV)(ge.Popup,{className:"fixed start-1/2 top-24 z-50 w-[36rem] max-w-[90vw] -translate-x-1/2 overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-lg outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95","data-testid":"dash-command-palette",initialFocus:g,children:[M,D,j]},void 0,!0)]},void 0,!0),e[32]=M,e[33]=D,e[34]=j,e[35]=G):G=e[35];let K;return e[36]!==r||e[37]!==G?(K=(0,de.jsxDEV)(ge.Root,{onOpenChange:b,open:r,children:G},void 0,!1),e[36]=r,e[37]=G,e[38]=K):K=e[38],K},"CommandPalette");var ui="(prefers-color-scheme: dark)",fi=a(()=>{try{return globalThis.localStorage}catch{return}},"store"),Pl=a(t=>t==="system"||t==="light"||t==="dark","isPreference"),mi=a(()=>globalThis.matchMedia,"matchMedia"),gi="lunora-studio-theme",Qn=["system","light","dark"],Cl=a((t="system")=>{try{let e=fi()?.getItem(gi);return Pl(e)?e:t}catch{return t}},"loadThemePreference"),ii=a(t=>{let e=fi();if(e!==void 0)try{e.setItem(gi,t)}catch{}},"saveThemePreference"),Rl=a(()=>{try{return mi()?.(ui).matches?"dark":"light"}catch{return"light"}},"getSystemTheme"),Sl=a((t,e)=>t==="system"?e:t,"resolveTheme"),Nl=a(t=>{let e;try{e=mi()?.(ui)}catch{e=void 0}if(e===void 0)return()=>{};let o=a(s=>{t(s.matches?"dark":"light")},"handler");return e.addEventListener("change",o),()=>{e.removeEventListener("change",o)}},"subscribeSystemTheme"),Xn=(0,q.createContext)(null),El=a(({children:t,defaultTheme:e="system"})=>{let[o,s]=(0,q.useState)(()=>Cl(e)),[n,r]=(0,q.useState)(()=>Rl());(0,q.useEffect)(()=>Nl(r),[]);let l=a(d=>{ii(d),s(d)},"setTheme"),p={cycleTheme:a(()=>{s(d=>{let u=Qn[(Qn.indexOf(d)+1)%Qn.length]??d;return ii(u),u})},"cycleTheme"),resolvedTheme:Sl(o,n),setTheme:l,systemTheme:n,theme:o};return(0,i.jsxDEV)(Xn,{value:p,children:t},void 0,!1)},"ThemeProvider"),Tl=a(t=>{let e=(0,B.c)(3),{children:o}=t,s=(0,q.use)(Xn),n;return e[0]!==o||e[1]!==s?(n=s===null?(0,i.jsxDEV)(El,{children:o},void 0,!1):o,e[0]=o,e[1]=s,e[2]=n):n=e[2],n},"EnsureThemeProvider"),wl=a(()=>{let t=(0,q.use)(Xn);if(t===null)throw new nn("INTERNAL","useTheme must be used within a <ThemeProvider>");return t},"useTheme");function z0({delay:t=0,...e}){return(0,i.jsxDEV)(rt.Provider,{"data-slot":"tooltip-provider",delay:t,...e},void 0,!1)}a(z0,"TooltipProvider");function kl(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(rt.Root,{"data-slot":"tooltip",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(kl,"Tooltip");function Ml(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(rt.Trigger,{"data-slot":"tooltip-trigger",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(Ml,"TooltipTrigger");function Ol({className:t,side:e="top",sideOffset:o=4,align:s="center",alignOffset:n=0,children:r,...l}){return(0,i.jsxDEV)(rt.Portal,{children:(0,i.jsxDEV)(rt.Positioner,{align:s,alignOffset:n,side:e,sideOffset:o,className:"isolate z-50",children:(0,i.jsxDEV)(rt.Popup,{"data-slot":"tooltip-content",className:W("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-md data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...l,children:[r,(0,i.jsxDEV)(rt.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-md bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-start-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-end-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1)}a(Ol,"TooltipContent");var _l=a(t=>{let e=(0,B.c)(5),{className:o}=t,s;e[0]!==o?(s=W("h-full w-full text-foreground",o),e[0]=o,e[1]=s):s=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsxDEV)("path",{d:"M 259.500 10.552 C 220.080 15.859, 182.424 32.566, 152.500 58.025 C 110.179 94.031, 85.380 137.183, 77.518 188.500 C 75.410 202.255, 74.569 225.677, 75.796 236.466 C 76.757 244.917, 76.683 245.692, 74.518 249.966 C 63.118 272.466, 53.141 303.876, 51.382 322.799 L 50.718 329.943 71.960 320.471 C 83.643 315.262, 93.326 311, 93.478 311 C 93.630 311, 96.547 316.063, 99.959 322.250 C 103.371 328.438, 107.249 334.850, 108.577 336.500 L 110.990 339.500 110.981 336 C 110.977 334.075, 111.499 324.991, 112.143 315.813 L 113.312 299.127 121.406 293.336 C 132.495 285.403, 149.593 271.554, 161 261.268 C 171.556 251.748, 189.116 235, 188.540 235 C 188.337 235, 183.069 238.648, 176.835 243.106 C 142.318 267.789, 68.537 314, 63.646 314 C 61.843 314, 72.791 281.179, 80.905 262.259 C 92.233 235.845, 107.473 212.389, 132.106 183.453 L 138.451 176 148.268 176 C 176.192 176, 197.512 187.154, 212.868 209.797 C 216.470 215.108, 217.035 216.595, 216.477 219.297 C 211.386 243.968, 202.359 274.496, 193.797 296 C 183.898 320.861, 167.147 352.101, 152.395 373.215 L 147.004 380.930 152.891 385.830 C 161.400 392.911, 165.563 396, 166.594 395.998 C 167.092 395.998, 168.772 391.641, 170.327 386.317 C 176.279 365.934, 188.422 338.749, 200.942 317.778 C 223.060 280.731, 256.432 244.369, 294.500 215.836 C 309.956 204.252, 313.937 201.603, 314.719 202.385 C 315.116 202.783, 315.449 213.096, 315.460 225.304 C 315.474 241.855, 315.021 250.405, 313.680 258.924 C 307.009 301.272, 291.175 336.677, 263.112 372 C 255.259 381.883, 227.182 410.673, 218.516 417.727 L 213.532 421.783 223.439 424.880 C 281.705 443.093, 349.165 436.018, 398.616 406.508 C 446.728 377.797, 483.322 331.466, 497.366 281.481 C 503.381 260.075, 504.480 250.741, 504.491 221 C 504.501 191.997, 503.598 184.047, 497.987 163.732 C 484.768 115.871, 452.505 72.708, 407.718 42.964 C 381.051 25.254, 352.818 14.828, 319.695 10.460 C 305.932 8.645, 273.298 8.695, 259.500 10.552",fillRule:"evenodd"},void 0,!1),e[2]=n):n=e[2];let r;return e[3]!==s?(r=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:s,fill:"currentColor",viewBox:"0 0 543 446",children:n},void 0,!1),e[3]=s,e[4]=r):r=e[4],r},"BrandMark"),hi="lunora.studio.rulesBannerDismissed",Il=a(()=>{try{return globalThis.localStorage.getItem(hi)==="1"}catch{return!1}},"readBannerDismissed"),Dl=a(()=>{try{globalThis.localStorage.setItem(hi,"1")}catch{}},"writeBannerDismissed"),Al=a(()=>{let t=(0,B.c)(18),e=re(),[o,s]=(0,q.useState)(Vl),n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=a(()=>{s(!0),Dl()},"t0"),t[0]=n):n=t[0];let r=n;if(o)return null;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,i.jsxDEV)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"},void 0,!1),t[1]=l):l=t[1];let c;t[2]!==e?(c=e("Lunora AI rules aren't installed."),t[2]=e,t[3]=c):c=t[3];let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=(0,i.jsxDEV)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[11px]",children:"lunora rules install"},void 0,!1),t[4]=p):p=t[4];let d;t[5]!==e?(d=e("lets your coding agent use Lunora correctly."),t[5]=e,t[6]=d):d=t[6];let u;t[7]!==c||t[8]!==d?(u=(0,i.jsxDEV)("span",{children:[c," ",p," ",d]},void 0,!0),t[7]=c,t[8]=d,t[9]=u):u=t[9];let g;t[10]!==e?(g=e("Dismiss"),t[10]=e,t[11]=g):g=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"M18 6 6 18M6 6l12 12"},void 0,!1)},void 0,!1),t[12]=m):m=t[12];let h;t[13]!==g?(h=(0,i.jsxDEV)("button",{"aria-label":g,className:"ms-auto flex size-5 items-center justify-center rounded text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent","data-testid":"dash-app-rules-banner-dismiss",onClick:r,type:"button",children:m},void 0,!1),t[13]=g,t[14]=h):h=t[14];let f;return t[15]!==u||t[16]!==h?(f=(0,i.jsxDEV)("div",{className:"flex shrink-0 items-center gap-2 border-b border-warning/30 bg-warning/10 px-6 py-2 text-[12px] text-foreground","data-testid":"dash-app-rules-banner",role:"note",children:[l,u,h]},void 0,!0),t[15]=u,t[16]=h,t[17]=f):f=t[17],f},"RulesBanner");function Vl(){return Il()}a(Vl,"_temp$1");var Bl=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("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,i.jsxDEV)("rect",{height:"14",rx:"2",width:"20",x:"2",y:"3"},void 0,!1),(0,i.jsxDEV)("path",{d:"M8 21h8M12 17v4"},void 0,!1)]},void 0,!0),t[0]=e):e=t[0],e},"MonitorIcon"),Ll=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("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,i.jsxDEV)("circle",{cx:"12",cy:"12",r:"4"},void 0,!1),(0,i.jsxDEV)("path",{d:"M12 2v2m0 16v2M4.9 4.9l1.4 1.4m11.4 11.4 1.4 1.4M2 12h2m16 0h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"},void 0,!1)]},void 0,!0),t[0]=e):e=t[0],e},"SunIcon"),Fl=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("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,i.jsxDEV)("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"},void 0,!1)},void 0,!1),t[0]=e):e=t[0],e},"MoonIcon"),Hl=[{Icon:Bl,value:"system"},{Icon:Ll,value:"light"},{Icon:Fl,value:"dark"}],$l=a(()=>{let t=(0,B.c)(19),{theme:e,setTheme:o}=wl(),s=re(),n;t[0]!==s?(n=s("Dark theme"),t[0]=s,t[1]=n):n=t[1];let r;t[2]!==s?(r=s("Light theme"),t[2]=s,t[3]=r):r=t[3];let l;t[4]!==s?(l=s("System theme"),t[4]=s,t[5]=l):l=t[5];let c;t[6]!==n||t[7]!==r||t[8]!==l?(c={dark:n,light:r,system:l},t[6]=n,t[7]=r,t[8]=l,t[9]=c):c=t[9];let p=c,d;t[10]!==s?(d=s("Theme"),t[10]=s,t[11]=d):d=t[11];let u;t[12]!==p||t[13]!==o||t[14]!==e?(u=Hl.map(m=>{let{Icon:h,value:f}=m,v=e===f;return(0,i.jsxDEV)("button",{"aria-checked":v,"aria-label":p[f],className:W("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",v?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${f}`,onClick:a(()=>{o(f)},"onClick"),role:"radio",title:p[f],type:"button",children:[v&&(0,i.jsxDEV)(ur.span,{className:"absolute inset-0 rounded-md border border-muted-foreground/40 bg-background/40",layoutId:"studio-theme-active",transition:{bounce:.1,duration:.45,type:"spring"}},void 0,!1),(0,i.jsxDEV)("span",{className:"relative",children:(0,i.jsxDEV)(h,{},void 0,!1)},void 0,!1)]},f,!0)}),t[12]=p,t[13]=o,t[14]=e,t[15]=u):u=t[15];let g;return t[16]!==d||t[17]!==u?(g=(0,i.jsxDEV)("div",{"aria-label":d,className:"inline-flex items-center gap-0.5 overflow-hidden rounded-md border border-border bg-muted/60 p-0.5","data-testid":"dash-app-theme",role:"radiogroup",children:u},void 0,!1),t[16]=d,t[17]=u,t[18]=g):g=t[18],g},"ThemeToggle");function vi(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(Pt.Root,{"data-slot":"popover",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(vi,"Popover");function xi(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(Pt.Trigger,{"data-slot":"popover-trigger",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(xi,"PopoverTrigger");function bi({align:t="end",alignOffset:e=0,className:o,keepMounted:s=!1,side:n="bottom",sideOffset:r=6,...l}){return(0,i.jsxDEV)(Pt.Portal,{keepMounted:s,children:(0,i.jsxDEV)(Pt.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:n,sideOffset:r,children:(0,i.jsxDEV)(Pt.Popup,{className:W("z-50 w-72 origin-(--transform-origin) rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-md outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o),"data-slot":"popover-content",...l},void 0,!1)},void 0,!1)},void 0,!1)}a(bi,"PopoverContent");var Yn=768;function jl(){let t=(0,B.c)(2),[e,o]=(0,q.useState)(void 0),s,n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=a(()=>{let r=globalThis.matchMedia(`(max-width: ${Yn-1}px)`),l=a(()=>{o(globalThis.innerWidth<Yn)},"onChange");return r.addEventListener("change",l),o(globalThis.innerWidth<Yn),()=>{r.removeEventListener("change",l)}},"t0"),n=[],t[0]=s,t[1]=n):(s=t[0],n=t[1]),(0,q.useEffect)(s,n),!!e}a(jl,"useIsMobile");function Ul(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(ge.Root,{"data-slot":"sheet",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(Ul,"Sheet");function zl(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(ge.Portal,{"data-slot":"sheet-portal",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(zl,"SheetPortal");function Wl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let n;e[3]!==o?(n=W("fixed inset-0 z-50 bg-black/10 text-xs/relaxed transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:",o),e[3]=o,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==n?(r=(0,i.jsxDEV)(ge.Backdrop,{"data-slot":"sheet-overlay",className:n,...s},void 0,!1),e[5]=s,e[6]=n,e[7]=r):r=e[7],r}a(Wl,"SheetOverlay");function Zl({className:t,children:e,side:o="right",showCloseButton:s=!0,...n}){return(0,i.jsxDEV)(zl,{children:[(0,i.jsxDEV)(Wl,{},void 0,!1),(0,i.jsxDEV)(ge.Popup,{"data-slot":"sheet-content","data-side":o,className:W("fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=left]:data-ending-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-ending-style:-translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-starting-style:-translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=right]:data-ending-style:translate-x-[2.5rem] rtl:data-[side=right]:data-ending-style:-translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] rtl:data-[side=right]:data-starting-style:-translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",t),...n,children:[e,s&&(0,i.jsxDEV)(ge.Close,{"data-slot":"sheet-close",render:(0,i.jsxDEV)(bo,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"},void 0,!1),children:[(0,i.jsxDEV)(dn,{icon:zr,strokeWidth:2},void 0,!1),(0,i.jsxDEV)("span",{className:"sr-only",children:"Close"},void 0,!1)]},void 0,!0)]},void 0,!0)]},void 0,!0)}a(Zl,"SheetContent");function ql(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let n;e[3]!==o?(n=W("flex flex-col gap-0.5 p-4",o),e[3]=o,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==n?(r=(0,i.jsxDEV)("div",{"data-slot":"sheet-header",className:n,...s},void 0,!1),e[5]=s,e[6]=n,e[7]=r):r=e[7],r}a(ql,"SheetHeader");function Gl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let n;e[3]!==o?(n=W("text-sm font-medium text-foreground",o),e[3]=o,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==n?(r=(0,i.jsxDEV)(ge.Title,{"data-slot":"sheet-title",className:n,...s},void 0,!1),e[5]=s,e[6]=n,e[7]=r):r=e[7],r}a(Gl,"SheetTitle");function Kl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let n;e[3]!==o?(n=W("text-xs/relaxed text-muted-foreground",o),e[3]=o,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==n?(r=(0,i.jsxDEV)(ge.Description,{"data-slot":"sheet-description",className:n,...s},void 0,!1),e[5]=s,e[6]=n,e[7]=r):r=e[7],r}a(Kl,"SheetDescription");var Ql="sidebar_state",Yl=3600*24*7,Jl="16rem",Xl="18rem",ed="3rem",td="b",yi=ut.createContext(null);function Ks(){let t=ut.useContext(yi);if(!t)throw new nn("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}a(Ks,"useSidebar");function od({defaultOpen:t=!0,open:e,onOpenChange:o,className:s,style:n,children:r,...l}){let c=jl(),[p,d]=ut.useState(!1),[u,g]=ut.useState(t),m=e??u,h=a(b=>{let P=typeof b=="function"?b(m):b;o?o(P):g(P),document.cookie=`${Ql}=${P}; path=/; max-age=${Yl}`},"setOpen"),f=a(()=>c?d(b=>!b):h(b=>!b),"toggleSidebar");ut.useEffect(()=>{let b=a(P=>{P.key===td&&(P.metaKey||P.ctrlKey)&&(P.preventDefault(),f())},"handleKeyDown");return globalThis.addEventListener("keydown",b),()=>globalThis.removeEventListener("keydown",b)},[f]);let x={state:m?"expanded":"collapsed",open:m,setOpen:h,isMobile:c,openMobile:p,setOpenMobile:d,toggleSidebar:f};return(0,i.jsxDEV)(yi.Provider,{value:x,children:(0,i.jsxDEV)("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Jl,"--sidebar-width-icon":ed,...n},className:W("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",s),...l,children:r},void 0,!1)},void 0,!1)}a(od,"SidebarProvider");function sd({side:t="left",variant:e="sidebar",collapsible:o="offcanvas",className:s,children:n,dir:r,...l}){let{isMobile:c,state:p,openMobile:d,setOpenMobile:u}=Ks();return o==="none"?(0,i.jsxDEV)("div",{"data-slot":"sidebar",className:W("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",s),...l,children:n},void 0,!1):c?(0,i.jsxDEV)(Ul,{open:d,onOpenChange:u,...l,children:(0,i.jsxDEV)(Zl,{dir:r,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Xl},side:t,children:[(0,i.jsxDEV)(ql,{className:"sr-only",children:[(0,i.jsxDEV)(Gl,{children:"Sidebar"},void 0,!1),(0,i.jsxDEV)(Kl,{children:"Displays the mobile sidebar."},void 0,!1)]},void 0,!0),(0,i.jsxDEV)("div",{className:"flex h-full w-full flex-col",children:n},void 0,!1)]},void 0,!0)},void 0,!1):(0,i.jsxDEV)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":p,"data-collapsible":p==="collapsed"?o:"","data-variant":e,"data-side":t,"data-slot":"sidebar",children:[(0,i.jsxDEV)("div",{"data-slot":"sidebar-gap",className:W("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")},void 0,!1),(0,i.jsxDEV)("div",{"data-slot":"sidebar-container","data-side":t,className:W("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-e group-data-[side=right]:border-s",s),...l,children:(0,i.jsxDEV)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-none group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:n},void 0,!1)},void 0,!1)]},void 0,!0)}a(sd,"Sidebar");function nd(t){let e=(0,B.c)(15),o,s,n;e[0]!==t?({className:o,onClick:s,...n}=t,e[0]=t,e[1]=o,e[2]=s,e[3]=n):(o=e[1],s=e[2],n=e[3]);let{toggleSidebar:r}=Ks(),l;e[4]!==o?(l=W(o),e[4]=o,e[5]=l):l=e[5];let c;e[6]!==s||e[7]!==r?(c=a(g=>{s?.(g),r()},"t2"),e[6]=s,e[7]=r,e[8]=c):c=e[8];let p,d;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=(0,i.jsxDEV)(dn,{icon:Wr,strokeWidth:2,className:"rtl:rotate-180"},void 0,!1),d=(0,i.jsxDEV)("span",{className:"sr-only",children:"Toggle Sidebar"},void 0,!1),e[9]=p,e[10]=d):(p=e[9],d=e[10]);let u;return e[11]!==n||e[12]!==l||e[13]!==c?(u=(0,i.jsxDEV)(bo,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:l,onClick:c,...n,children:[p,d]},void 0,!0),e[11]=n,e[12]=l,e[13]=c,e[14]=u):u=e[14],u}a(nd,"SidebarTrigger");function rd(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let n;e[3]!==o?(n=W("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-none md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2",o),e[3]=o,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==n?(r=(0,i.jsxDEV)("main",{"data-slot":"sidebar-inset",className:n,...s},void 0,!1),e[5]=s,e[6]=n,e[7]=r):r=e[7],r}a(rd,"SidebarInset");function ad(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let n;e[3]!==o?(n=W("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==n?(r=(0,i.jsxDEV)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:n,...s},void 0,!1),e[5]=s,e[6]=n,e[7]=r):r=e[7],r}a(ad,"SidebarHeader");function id(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let n;e[3]!==o?(n=W("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==n?(r=(0,i.jsxDEV)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:n,...s},void 0,!1),e[5]=s,e[6]=n,e[7]=r):r=e[7],r}a(id,"SidebarFooter");function ld(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let n;e[3]!==o?(n=W("flex min-h-0 flex-1 flex-col gap-0 overflow-x-hidden overflow-y-auto [scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_25%,transparent)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/25 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar]:w-1.5 hover:[scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_50%,transparent)_transparent] hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/50",o),e[3]=o,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==n?(r=(0,i.jsxDEV)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n,...s},void 0,!1),e[5]=s,e[6]=n,e[7]=r):r=e[7],r}a(ld,"SidebarContent");function dd(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let n;e[3]!==o?(n=W("relative flex w-full min-w-0 flex-col p-2",o),e[3]=o,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==n?(r=(0,i.jsxDEV)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n,...s},void 0,!1),e[5]=s,e[6]=n,e[7]=r):r=e[7],r}a(dd,"SidebarGroup");function cd(t){let e=(0,B.c)(10),o,s,n,r;if(e[0]!==t){let{className:p,render:d,...u}=t;o=d,r=an,s="div",n=lt({className:W("flex h-8 shrink-0 items-center rounded-none px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",p)},u),e[0]=t,e[1]=o,e[2]=s,e[3]=n,e[4]=r}else o=e[1],s=e[2],n=e[3],r=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},e[5]=l):l=e[5];let c;return e[6]!==o||e[7]!==s||e[8]!==n?(c={defaultTagName:s,props:n,render:o,state:l},e[6]=o,e[7]=s,e[8]=n,e[9]=c):c=e[9],r(c)}a(cd,"SidebarGroupLabel");function pd(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let n;e[3]!==o?(n=W("w-full text-xs",o),e[3]=o,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==n?(r=(0,i.jsxDEV)("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n,...s},void 0,!1),e[5]=s,e[6]=n,e[7]=r):r=e[7],r}a(pd,"SidebarGroupContent");function li(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let n;e[3]!==o?(n=W("flex w-full min-w-0 flex-col gap-0",o),e[3]=o,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==n?(r=(0,i.jsxDEV)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n,...s},void 0,!1),e[5]=s,e[6]=n,e[7]=r):r=e[7],r}a(li,"SidebarMenu");function di(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let n;e[3]!==o?(n=W("group/menu-item relative",o),e[3]=o,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==n?(r=(0,i.jsxDEV)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n,...s},void 0,!1),e[5]=s,e[6]=n,e[7]=r):r=e[7],r}a(di,"SidebarMenuItem");var ud=fr("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-none p-2 text-start text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Pi({render:t,isActive:e=!1,variant:o="default",size:s="default",tooltip:n,className:r,...l}){let{isMobile:c,state:p}=Ks(),d=an({defaultTagName:"button",props:lt({className:W(ud({variant:o,size:s}),r)},l),render:n?(0,i.jsxDEV)(Ml,{render:t},void 0,!1):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:s,active:e}});return n?(typeof n=="string"&&(n={children:n}),(0,i.jsxDEV)(kl,{children:[d,(0,i.jsxDEV)(Ol,{side:"right",align:"center",hidden:p!=="collapsed"||c,...n},void 0,!1)]},void 0,!0)):d}a(Pi,"SidebarMenuButton");var $=a((t,e)=>(0,q.lazy)(()=>t().then(o=>({default:o[e]}))),"lazyNamed"),fd=$(()=>import("./chunk-CSWIYOB3.js"),"InsightsPanel"),md=(0,q.lazy)(()=>import("./chunk-E3BKETAS.js")),gd=(0,q.lazy)(()=>import("./chunk-LZUWZBPE.js")),hd=$(()=>import("./chunk-56XQYNUJ.js"),"AgentsPanel"),vd=$(()=>import("./chunk-NKFXMDOD.js"),"AnalyticsPanel"),xd=(0,q.lazy)(()=>import("./chunk-XN6QYJQ6.js")),bd=$(()=>import("./chunk-Y4U6CC22.js"),"AuthAuditPanel"),yd=$(()=>import("./chunk-FXP6256Q.js"),"AuthConfigPanel"),Pd=$(()=>import("./chunk-6RLPR7PL.js"),"AuthSessionsPanel"),Cd=$(()=>import("./chunk-QAIM6KWT.js"),"OrganizationsPanel"),Rd=$(()=>import("./chunk-E3OXNN6O.js"),"UsersPanel"),Sd=$(()=>import("./chunk-YNN6NFRZ.js"),"ContainersPanel"),Nd=$(()=>import("./chunk-DGHW5JG5.js"),"DeploymentHealthPanel"),Ed=$(()=>import("./chunk-TTXRHJUP.js"),"TableEditor"),Td=$(()=>import("./chunk-DMCSOTAE.js"),"ExportImportPanel"),wd=$(()=>import("./chunk-MLA5ZAEB.js"),"MigrationsPanel"),kd=$(()=>import("./chunk-AXNGWSBM.js"),"PitrPanel"),Md=$(()=>import("./chunk-D3VAON25.js"),"FlagsPanel"),Od=$(()=>import("./chunk-LT3FH6MW.js"),"FunctionRunner"),_d=$(()=>import("./chunk-QQ2LOSZL.js"),"FunctionStatsPanel"),Id=$(()=>import("./chunk-YUGHRVPD.js"),"IssuesPanel"),Dd=$(()=>import("./chunk-AXZILWRM.js"),"AuditPanel"),Ad=$(()=>import("./chunk-QVUQXJCT.js"),"LogDrainsPanel"),Vd=(0,q.lazy)(()=>import("./chunk-SOC5CY3F.js").then(t=>({default:t.LogsPanel}))),Bd=$(()=>import("./chunk-SWWYUGPL.js"),"MailPanel"),Ld=$(()=>import("./chunk-7EE33WLB.js"),"SchedulePanel"),Fd=(0,q.lazy)(()=>import("./chunk-G6CTAYHJ.js")),Hd=$(()=>import("./chunk-C7RHEBOH.js"),"KvBrowser"),$d=$(()=>import("./chunk-YJXOWLFJ.js"),"NotificationsPanel"),jd=$(()=>import("./chunk-H42W62SE.js"),"PaymentsPanel"),Ud=$(()=>import("./chunk-UKDHGVOC.js"),"PermissionsPanel"),zd=(0,q.lazy)(()=>import("./chunk-R2GMHLJY.js")),Wd=(0,q.lazy)(()=>import("./chunk-M4JM3TOY.js")),Zd=(0,q.lazy)(()=>import("./chunk-6V74EUPK.js")),qd=$(()=>import("./chunk-I2PS4L74.js"),"HealthPanel"),Gd=$(()=>import("./chunk-YFIPHCEC.js"),"MetricsPanel"),Kd=$(()=>import("./chunk-HTF5ZX4I.js"),"SchemaViewer"),Qd=$(()=>import("./chunk-NPSNKFHE.js"),"SettingsPanel"),Yd=$(()=>import("./chunk-SS7JLF2I.js"),"SqlEditorPanel"),Jd=$(()=>import("./chunk-L2LN3MK4.js"),"FileBrowser"),Xd=$(()=>import("./chunk-MRBI5HNQ.js"),"StorageRulesPanel"),ec=$(()=>import("./chunk-E6BOGDIS.js"),"TracesPanel"),tc=$(()=>import("./chunk-O7FVPUCO.js"),"VectorBrowser"),oc=(0,q.lazy)(()=>import("./chunk-J7OGP4NN.js")),Ci=(0,q.createContext)(null),sc={analytics:(0,i.jsxDEV)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"},void 0,!1),api:(0,i.jsxDEV)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4M13 5l-2 14"},void 0,!1),audit:(0,i.jsxDEV)("path",{d:"M7 4h7l4 4v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm6 0v5h5M9 13h6M9 16h6M9 10h2"},void 0,!1),authAudit:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8h6m-6 3h6"},void 0,!1),authConfig:(0,i.jsxDEV)("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6h-3.6l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"},void 0,!1),agents:(0,i.jsxDEV)("path",{d:"M12 8V5m0 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM6 8h12a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2Zm3 5h.01M15 13h.01M9 21h6"},void 0,!1),authSessions:(0,i.jsxDEV)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"},void 0,!1),containers:(0,i.jsxDEV)("path",{d:"M3 7.5 12 3l9 4.5v9L12 21l-9-4.5v-9Zm0 0 9 4.5m0 0 9-4.5m-9 4.5V21"},void 0,!1),dashboards:(0,i.jsxDEV)("path",{d:"M4 5h7v6H4V5Zm9 0h7v4h-7V5ZM4 14h7v5H4v-5Zm9-1h7v6h-7v-6Z"},void 0,!1),deploymentHealth:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8 2 3 4-5"},void 0,!1),drains:(0,i.jsxDEV)("path",{d:"M5 5h14M7 5v6a5 5 0 0 0 10 0V5M10 16h4v3h-4zM12 19v2"},void 0,!1),data:(0,i.jsxDEV)("path",{d:"M5 6c0-1.4 3.1-2.5 7-2.5s7 1.1 7 2.5-3.1 2.5-7 2.5S5 7.4 5 6Zm0 0v12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5V6M5 12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5"},void 0,!1),export:(0,i.jsxDEV)("path",{d:"M12 3v11m0 0 4-4m-4 4-4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"},void 0,!1),fanout:(0,i.jsxDEV)("path",{d:"M12 5a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm-7 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm14 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM12 7v3.5M12 10.5 6 17m6-6.5 6 6.5"},void 0,!1),files:(0,i.jsxDEV)("path",{d:"M4 7a2 2 0 0 1 2-2h3l2 2.5h7a2 2 0 0 1 2 2V18a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7Z"},void 0,!1),flags:(0,i.jsxDEV)("path",{d:"M6 21V4m0 0h11l-2 3 2 3H6"},void 0,!1),functions:(0,i.jsxDEV)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4"},void 0,!1),health:(0,i.jsxDEV)("path",{d:"M3 12h4l2 6 4-14 2 8h6"},void 0,!1),home:(0,i.jsxDEV)("path",{d:"M3 11.5 12 4l9 7.5M5 10v9a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1v-9"},void 0,!1),insights:(0,i.jsxDEV)("path",{d:"M12 3a6 6 0 0 0-3.6 10.8c.5.4.8.9.9 1.5l.2 1.2h5l.2-1.2c.1-.6.4-1.1.9-1.5A6 6 0 0 0 12 3ZM9.5 20.5h5M10 18h4"},void 0,!1),issues:(0,i.jsxDEV)("path",{d:"M10.3 4.3 2.5 18a2 2 0 0 0 1.7 3h15.6a2 2 0 0 0 1.7-3L13.7 4.3a2 2 0 0 0-3.4 0ZM12 9v4m0 3v.01"},void 0,!1),kv:(0,i.jsxDEV)("path",{d:"M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"},void 0,!1),logs:(0,i.jsxDEV)("path",{d:"M5 6h14M5 10h14M5 14h9M5 18h11"},void 0,!1),mail:(0,i.jsxDEV)("path",{d:"M4 5h16v14H4V5Zm0 1.5 8 6 8-6"},void 0,!1),payments:(0,i.jsxDEV)("path",{d:"M3 7h18v10H3V7Zm0 3h18M7 14h4"},void 0,!1),metrics:(0,i.jsxDEV)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"},void 0,!1),migrations:(0,i.jsxDEV)("path",{d:"M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.6L4 16m0 4v-4h4"},void 0,!1),notifications:(0,i.jsxDEV)("path",{d:"M15 17h5l-1.4-1.4A2 2 0 0 1 18 14.2V11a6 6 0 0 0-4-5.7V5a2 2 0 1 0-4 0v.3A6 6 0 0 0 6 11v3.2a2 2 0 0 1-.6 1.4L4 17h5m6 0v1a3 3 0 1 1-6 0v-1m6 0H9"},void 0,!1),organizations:(0,i.jsxDEV)("path",{d:"M3 21V8l6-4 6 4v13M9 21v-5h2v5M15 11h6v10M18 14v.01M18 17v.01M6 9v.01M6 12v.01M6 15v.01"},void 0,!1),permissions:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8 2.2 2.2L15 9.5M8.5 16h7"},void 0,!1),pitr:(0,i.jsxDEV)("path",{d:"M12 21a9 9 0 1 0-9-9M12 7.5V12l3 2M3 12l-2-2m2 2 2-2"},void 0,!1),queues:(0,i.jsxDEV)("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"},void 0,!1),realtime:(0,i.jsxDEV)("path",{d:"M5 12a7 7 0 0 1 14 0M8 12a4 4 0 0 1 8 0M12 12v8m0-8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"},void 0,!1),rls:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3ZM8.5 10h7M8.5 13h7"},void 0,!1),schedule:(0,i.jsxDEV)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"},void 0,!1),schema:(0,i.jsxDEV)("path",{d:"M4 5h16v14H4V5Zm0 5h16M10 10v9M4 14.5h16"},void 0,!1),sql:(0,i.jsxDEV)("path",{d:"M4 5h16v14H4V5Zm3 4 3 3-3 3m6 0h4"},void 0,!1),storageRules:(0,i.jsxDEV)("path",{d:"M7 10V7a5 5 0 0 1 10 0v3m-11 0h12a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1Zm6 4v2"},void 0,!1),security:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-2.5 8.5 2 2 4-4"},void 0,!1),traces:(0,i.jsxDEV)("path",{d:"M3 6h9M6 12h12M10 18h7"},void 0,!1),settings:(0,i.jsxDEV)("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6H10.5l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"},void 0,!1),users:(0,i.jsxDEV)("path",{d:"M16 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M9.5 10a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm11.5 10v-2a4 4 0 0 0-3-3.85M16 3.13A4 4 0 0 1 16 11"},void 0,!1),vectors:(0,i.jsxDEV)("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"},void 0,!1),workflows:(0,i.jsxDEV)("path",{d:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM7.5 10v2a2 2 0 0 0 2 2H14m2.5-4V8a2 2 0 0 0-2-2H10"},void 0,!1)},ci=[{key:"overview",tabs:["home","dashboards"]},{key:"database",tabs:["data","sql","schema","migrations","vectors","pitr","export"]},{key:"functions",tabs:["functions","api","workflows","agents","queues"]},{key:"auth",tabs:["users","organizations","authSessions","authAudit","authConfig"]},{key:"storage",tabs:["files","storageRules","kv"]},{key:"observability",tabs:["issues","logs","traces","audit","realtime","fanout","containers","metrics","analytics","health","deploymentHealth"]},{key:"advisors",tabs:["security","rls","permissions","insights"]},{key:"operations",tabs:["schedule","mail","drains","notifications","payments","flags"]},{key:"settings",tabs:["settings"]}],nc={analytics:"analytics",authConfig:"auth",authSessions:"auth",containers:"containers",files:"storage",flags:"flags",kv:"kv",mail:"mail",organizations:"auth",payments:"payments",queues:"queues",schedule:"scheduler",storageRules:"storage",users:"auth",vectors:"vectors",workflows:"workflows"},pi=a((t,e)=>{let o=nc[t];return o===void 0||e[o]},"isTabVisible"),Jn=a(t=>{let e=(0,B.c)(2),{tab:o}=t,s=sc[o],n;return e[0]!==s?(n=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 shrink-0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:s},void 0,!1),e[0]=s,e[1]=n):n=e[1],n},"TabIcon"),rc=a(t=>t,"exhaustiveRouteTabs"),Ri=rc(["home","data","sql","functions","api","workflows","agents","queues","containers","schema","migrations","vectors","export","pitr","users","organizations","authSessions","authAudit","authConfig","files","storageRules","kv","dashboards","metrics","analytics","health","deploymentHealth","security","rls","permissions","insights","issues","logs","traces","realtime","fanout","mail","notifications","payments","audit","schedule","drains","flags","settings"]),ac=new Set(["api","data","sql"]),ic=a(t=>{let e=t.split("/").findLast(Boolean)??"";return Ri.includes(e)?e:"home"},"tabFromPathname"),lc=a(t=>{let e=(0,B.c)(19),{chrome:o,connected:s}=t,n=re(),r;e[0]!==n?(r=n("admin token"),e[0]=n,e[1]=r):r=e[1];let l;e[2]!==r?(l=(0,i.jsxDEV)("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:r},void 0,!1),e[2]=r,e[3]=l):l=e[3];let c;e[4]!==o.onTokenChange||e[5]!==o.token?(c=(0,i.jsxDEV)(Pr,{className:"h-8","data-testid":"dash-app-token",id:"dash-app-token",onChange:o.onTokenChange,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:o.token},void 0,!1),e[4]=o.onTokenChange,e[5]=o.token,e[6]=c):c=e[6];let p;e[7]!==s||e[8]!==n?(p=s&&(0,i.jsxDEV)("p",{className:"flex items-start gap-1.5 text-[11px] text-muted-foreground","data-testid":"dash-app-token-warning",role:"note",children:[(0,i.jsxDEV)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"},void 0,!1),n("Token rides the WebSocket URL \u2014 it can surface in browser DevTools and server logs. Use a dev-only token.")]},void 0,!0),e[7]=s,e[8]=n,e[9]=p):p=e[9];let d;e[10]!==o.clearToken||e[11]!==s||e[12]!==n?(d=s&&(0,i.jsxDEV)("button",{className:"self-start rounded-md border border-border px-2.5 py-1 text-xs font-medium outline-none transition-colors hover:bg-accent focus-visible:bg-accent","data-testid":"dash-app-clear-token",onClick:o.clearToken,type:"button",children:n("Clear")},void 0,!1),e[10]=o.clearToken,e[11]=s,e[12]=n,e[13]=d):d=e[13];let u;return e[14]!==l||e[15]!==c||e[16]!==p||e[17]!==d?(u=(0,i.jsxDEV)("div",{className:"flex flex-col gap-2",children:[l,c,p,d]},void 0,!0),e[14]=l,e[15]=c,e[16]=p,e[17]=d,e[18]=u):u=e[18],u},"ConnectPopoverContent"),dc=a(t=>{let e=(0,B.c)(25),{current:o,group:s,groupLabel:n,selectTab:r,tabDescription:l,tabLabel:c}=t,p=s.tabs.includes(o)?"page":void 0,d=n[s.key],u=s.tabs[0],g;e[0]!==u?(g=(0,i.jsxDEV)(Jn,{tab:u},void 0,!1),e[0]=u,e[1]=g):g=e[1];let m;e[2]!==p||e[3]!==d||e[4]!==g?(m=(0,i.jsxDEV)(xi,{"aria-current":p,"aria-label":d,className:"mx-auto flex size-8 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent data-[popup-open]:bg-sidebar-accent data-[popup-open]:text-sidebar-accent-foreground data-[popup-open]:shadow-xs aria-[current=page]:bg-sidebar-accent aria-[current=page]:text-sidebar-accent-foreground aria-[current=page]:shadow-xs",delay:120,openOnHover:!0,children:g},void 0,!1),e[2]=p,e[3]=d,e[4]=g,e[5]=m):m=e[5];let h=n[s.key],f;e[6]!==h?(f=(0,i.jsxDEV)("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:h},void 0,!1),e[6]=h,e[7]=f):f=e[7];let v;if(e[8]!==o||e[9]!==s.tabs||e[10]!==r||e[11]!==l||e[12]!==c){let P;e[14]!==o||e[15]!==r||e[16]!==l||e[17]!==c?(P=a(C=>(0,i.jsxDEV)("button",{"aria-current":o===C?"page":void 0,className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start text-[13px] text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent aria-[current=page]:bg-accent aria-[current=page]:font-medium [&_svg]:opacity-70 aria-[current=page]:[&_svg]:opacity-100","data-tab":C,"data-testid":`dash-tab-${C}`,onClick:r,title:l[C],type:"button",children:[(0,i.jsxDEV)(Jn,{tab:C},void 0,!1),(0,i.jsxDEV)("span",{children:c[C]},void 0,!1)]},C,!0),"t92"),e[14]=o,e[15]=r,e[16]=l,e[17]=c,e[18]=P):P=e[18],v=s.tabs.map(P),e[8]=o,e[9]=s.tabs,e[10]=r,e[11]=l,e[12]=c,e[13]=v}else v=e[13];let x;e[19]!==f||e[20]!==v?(x=(0,i.jsxDEV)(bi,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[f,v]},void 0,!0),e[19]=f,e[20]=v,e[21]=x):x=e[21];let b;return e[22]!==m||e[23]!==x?(b=(0,i.jsxDEV)(vi,{children:[m,x]},void 0,!0),e[22]=m,e[23]=x,e[24]=b):b=e[24],b},"CollapsedGroupNav"),cc=a(t=>{let e=(0,B.c)(45),{chrome:o,collapsed:s,connected:n}=t,r=re();if(o===null){let C;e[0]!==r?(C=r("Admin"),e[0]=r,e[1]=C):C=e[1];let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=(0,i.jsxDEV)("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"},void 0,!1),e[2]=N):N=e[2];let R;e[3]!==r?(R=r("Admin"),e[3]=r,e[4]=R):R=e[4];let E;e[5]!==R?(E=(0,i.jsxDEV)("span",{className:"truncate text-[13px] font-medium",children:R},void 0,!1),e[5]=R,e[6]=E):E=e[6];let T;e[7]!==r?(T=r("Studio"),e[7]=r,e[8]=T):T=e[8];let k;e[9]!==T?(k=(0,i.jsxDEV)("span",{className:"truncate text-[11px] text-muted-foreground",children:T},void 0,!1),e[9]=T,e[10]=k):k=e[10];let w;e[11]!==E||e[12]!==k?(w=(0,i.jsxDEV)("span",{className:"grid flex-1 text-start leading-tight",children:[E,k]},void 0,!0),e[11]=E,e[12]=k,e[13]=w):w=e[13];let M;return e[14]!==C||e[15]!==w?(M=(0,i.jsxDEV)(Pi,{className:"data-active:bg-transparent",size:"lg",tooltip:C,children:[N,w]},void 0,!0),e[14]=C,e[15]=w,e[16]=M):M=e[16],M}let l=s?"mx-auto size-8 justify-center":"w-full p-2",c;e[17]!==l?(c=W("flex items-center gap-2 rounded-md text-start outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent",l),e[17]=l,e[18]=c):c=e[18];let p;e[19]!==n||e[20]!==r?(p=r(n?"Connected":"Not connected"),e[19]=n,e[20]=r,e[21]=p):p=e[21];let d=n?"bg-success":"bg-muted-foreground/50",u;e[22]!==d?(u=W("absolute -end-0.5 -bottom-0.5 size-2.5 rounded-full border-2 border-sidebar",d),e[22]=d,e[23]=u):u=e[23];let g;e[24]!==u?(g=(0,i.jsxDEV)("span",{className:"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:["C",(0,i.jsxDEV)("span",{"aria-hidden":"true",className:u},void 0,!1)]},void 0,!0),e[24]=u,e[25]=g):g=e[25];let m;e[26]!==s||e[27]!==n||e[28]!==r?(m=!s&&(0,i.jsxDEV)(i.Fragment,{children:[(0,i.jsxDEV)("span",{className:"grid flex-1 text-start leading-tight",children:[(0,i.jsxDEV)("span",{className:"truncate text-[13px] font-medium",children:r("Admin")},void 0,!1),(0,i.jsxDEV)("span",{className:"truncate text-[11px] text-muted-foreground",children:r(n?"Connected":"Not connected")},void 0,!1)]},void 0,!0),(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"m8 9 4-4 4 4M8 15l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1)},void 0,!1)]},void 0,!0),e[26]=s,e[27]=n,e[28]=r,e[29]=m):m=e[29];let h;e[30]!==c||e[31]!==p||e[32]!==g||e[33]!==m?(h=(0,i.jsxDEV)(xi,{className:c,"data-testid":"dash-app-connect",title:p,children:[g,m]},void 0,!0),e[30]=c,e[31]=p,e[32]=g,e[33]=m,e[34]=h):h=e[34];let f=s?"end":"start",v=s?"right":"top",x;e[35]!==o||e[36]!==n?(x=(0,i.jsxDEV)(lc,{chrome:o,connected:n},void 0,!1),e[35]=o,e[36]=n,e[37]=x):x=e[37];let b;e[38]!==v||e[39]!==x||e[40]!==f?(b=(0,i.jsxDEV)(bi,{align:f,keepMounted:!0,side:v,children:x},void 0,!1),e[38]=v,e[39]=x,e[40]=f,e[41]=b):b=e[41];let P;return e[42]!==b||e[43]!==h?(P=(0,i.jsxDEV)(vi,{children:[h,b]},void 0,!0),e[42]=b,e[43]=h,e[44]=P):P=e[44],P},"SidebarFooterProfile"),pc=a(t=>{let e=(0,B.c)(28),{chrome:o,connected:s,current:n,groupLabel:r,groups:l,selectTab:c,tabDescription:p,tabLabel:d}=t,u=re(),{state:g}=Ks(),m=g==="collapsed",h=m&&"justify-center px-0",f;e[0]!==h?(f=W("flex items-center gap-2.5 px-1.5 py-1",h),e[0]=h,e[1]=f):f=e[1];let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=(0,i.jsxDEV)(_l,{className:"size-9 shrink-0 text-foreground"},void 0,!1),e[2]=v):v=e[2];let x;e[3]!==m||e[4]!==s||e[5]!==u?(x=!m&&(0,i.jsxDEV)(i.Fragment,{children:[(0,i.jsxDEV)("span",{className:"grid flex-1 leading-tight",children:[(0,i.jsxDEV)("span",{className:"truncate text-sm font-semibold text-foreground",children:"lunora"},void 0,!1),(0,i.jsxDEV)("span",{className:"truncate text-[11px] text-muted-foreground",children:u("Studio")},void 0,!1)]},void 0,!0),(0,i.jsxDEV)(wo,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:u(s?"Live":"Local")},void 0,!1)]},void 0,!0),e[3]=m,e[4]=s,e[5]=u,e[6]=x):x=e[6];let b;e[7]!==f||e[8]!==x?(b=(0,i.jsxDEV)(ad,{children:(0,i.jsxDEV)("div",{className:f,children:[v,x]},void 0,!0)},void 0,!1),e[7]=f,e[8]=x,e[9]=b):b=e[9];let P;e[10]!==m||e[11]!==n||e[12]!==r||e[13]!==l||e[14]!==c||e[15]!==p||e[16]!==d?(P=m?l.map(E=>(0,i.jsxDEV)(dc,{current:n,group:E,groupLabel:r,selectTab:c,tabDescription:p,tabLabel:d},E.key,!1)):l.map(E=>(0,i.jsxDEV)(dd,{children:[(0,i.jsxDEV)(cd,{className:"text-[11px] font-medium tracking-wider uppercase",children:r[E.key]},void 0,!1),(0,i.jsxDEV)(pd,{children:(0,i.jsxDEV)(li,{children:E.tabs.map(T=>(0,i.jsxDEV)(di,{children:(0,i.jsxDEV)(Pi,{className:"data-active:text-foreground dark:data-active:text-royal-amethyst data-active:shadow-[inset_2px_0_0_0_var(--royal-amethyst)]","data-tab":T,"data-testid":`dash-tab-${T}`,isActive:n===T,onClick:c,title:p[T],tooltip:p[T],children:[(0,i.jsxDEV)(Jn,{tab:T},void 0,!1),(0,i.jsxDEV)("span",{children:d[T]},void 0,!1)]},void 0,!0)},T,!1))},void 0,!1)},void 0,!1)]},E.key,!0)),e[10]=m,e[11]=n,e[12]=r,e[13]=l,e[14]=c,e[15]=p,e[16]=d,e[17]=P):P=e[17];let C;e[18]!==P?(C=(0,i.jsxDEV)(ld,{children:P},void 0,!1),e[18]=P,e[19]=C):C=e[19];let N;e[20]!==o||e[21]!==m||e[22]!==s?(N=(0,i.jsxDEV)(id,{children:(0,i.jsxDEV)(li,{children:(0,i.jsxDEV)(di,{children:(0,i.jsxDEV)(cc,{chrome:o,collapsed:m,connected:s},void 0,!1)},void 0,!1)},void 0,!1)},void 0,!1),e[20]=o,e[21]=m,e[22]=s,e[23]=N):N=e[23];let R;return e[24]!==b||e[25]!==C||e[26]!==N?(R=(0,i.jsxDEV)(sd,{collapsible:"icon",variant:"inset",children:[b,C,N]},void 0,!0),e[24]=b,e[25]=C,e[26]=N,e[27]=R):R=e[27],R},"StudioSidebar"),Si=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[(0,i.jsxDEV)("div",{className:"flex items-center gap-2",children:[(0,i.jsxDEV)(Ps,{className:"h-8 w-40"},void 0,!1),(0,i.jsxDEV)(Ps,{className:"h-8 w-24"},void 0,!1)]},void 0,!0),(0,i.jsxDEV)(Ps,{className:"h-72 w-full"},void 0,!1)]},void 0,!0),t[0]=e):e=t[0],e},"RoutePending"),uc=a(()=>{let t=(0,B.c)(330),e=re(),o=ft(),s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={select:vc},t[0]=s):s=t[0];let n=lr(s),r,l;t[1]!==n?(r=ic(n),l=ac.has(r),t[1]=n,t[2]=r,t[3]=l):(r=t[2],l=t[3]);let c=l,p=qn(),d;t[4]!==p?(d=a(it=>({...it,tabs:it.tabs.filter(Qo=>pi(Qo,p))}),"t2"),t[4]=p,t[5]=d):d=t[5];let u=ci.map(d).filter(xc),g,m;t[6]!==r||t[7]!==p||t[8]!==o?(g=a(()=>{pi(r,p)||Fe(o({replace:!0,to:"/home"}))},"t3"),m=[r,p,o],t[6]=r,t[7]=p,t[8]=o,t[9]=g,t[10]=m):(g=t[9],m=t[10]),(0,q.useEffect)(g,m);let h;t[11]!==e?(h=e("Agents"),t[11]=e,t[12]=h):h=t[12];let f;t[13]!==e?(f=e("Analytics"),t[13]=e,t[14]=f):f=t[14];let v;t[15]!==e?(v=e("API"),t[15]=e,t[16]=v):v=t[16];let x;t[17]!==e?(x=e("Audit"),t[17]=e,t[18]=x):x=t[18];let b;t[19]!==e?(b=e("Auth audit"),t[19]=e,t[20]=b):b=t[20];let P;t[21]!==e?(P=e("Configuration"),t[21]=e,t[22]=P):P=t[22];let C;t[23]!==e?(C=e("Sessions"),t[23]=e,t[24]=C):C=t[24];let N;t[25]!==e?(N=e("Containers"),t[25]=e,t[26]=N):N=t[26];let R;t[27]!==e?(R=e("Dashboards"),t[27]=e,t[28]=R):R=t[28];let E;t[29]!==e?(E=e("Data"),t[29]=e,t[30]=E):E=t[30];let T;t[31]!==e?(T=e("Deployment health"),t[31]=e,t[32]=T):T=t[32];let k;t[33]!==e?(k=e("Log drains"),t[33]=e,t[34]=k):k=t[34];let w;t[35]!==e?(w=e("Export / Import"),t[35]=e,t[36]=w):w=t[36];let M;t[37]!==e?(M=e("Fan-out"),t[37]=e,t[38]=M):M=t[38];let V;t[39]!==e?(V=e("Files"),t[39]=e,t[40]=V):V=t[40];let Z;t[41]!==e?(Z=e("Flags"),t[41]=e,t[42]=Z):Z=t[42];let D;t[43]!==e?(D=e("Functions"),t[43]=e,t[44]=D):D=t[44];let H;t[45]!==e?(H=e("Health"),t[45]=e,t[46]=H):H=t[46];let j;t[47]!==e?(j=e("Home"),t[47]=e,t[48]=j):j=t[48];let G;t[49]!==e?(G=e("Performance"),t[49]=e,t[50]=G):G=t[50];let K;t[51]!==e?(K=e("Issues"),t[51]=e,t[52]=K):K=t[52];let I;t[53]!==e?(I=e("KV"),t[53]=e,t[54]=I):I=t[54];let _;t[55]!==e?(_=e("Logs"),t[55]=e,t[56]=_):_=t[56];let z;t[57]!==e?(z=e("Metrics"),t[57]=e,t[58]=z):z=t[58];let te;t[59]!==e?(te=e("Migrations"),t[59]=e,t[60]=te):te=t[60];let se;t[61]!==e?(se=e("Notifications"),t[61]=e,t[62]=se):se=t[62];let ne;t[63]!==e?(ne=e("Organizations"),t[63]=e,t[64]=ne):ne=t[64];let J;t[65]!==e?(J=e("Time Travel"),t[65]=e,t[66]=J):J=t[66];let ee;t[67]!==e?(ee=e("Mail"),t[67]=e,t[68]=ee):ee=t[68];let ae;t[69]!==e?(ae=e("Payments"),t[69]=e,t[70]=ae):ae=t[70];let Ve;t[71]!==e?(Ve=e("Permissions"),t[71]=e,t[72]=Ve):Ve=t[72];let he;t[73]!==e?(he=e("Queues"),t[73]=e,t[74]=he):he=t[74];let be;t[75]!==e?(be=e("Realtime"),t[75]=e,t[76]=be):be=t[76];let ye;t[77]!==e?(ye=e("RLS Policies"),t[77]=e,t[78]=ye):ye=t[78];let Be;t[79]!==e?(Be=e("Scheduled"),t[79]=e,t[80]=Be):Be=t[80];let L;t[81]!==e?(L=e("Schema"),t[81]=e,t[82]=L):L=t[82];let Q;t[83]!==e?(Q=e("Security"),t[83]=e,t[84]=Q):Q=t[84];let X;t[85]!==e?(X=e("Settings"),t[85]=e,t[86]=X):X=t[86];let ce;t[87]!==e?(ce=e("SQL editor"),t[87]=e,t[88]=ce):ce=t[88];let ie;t[89]!==e?(ie=e("Traces"),t[89]=e,t[90]=ie):ie=t[90];let ve;t[91]!==e?(ve=e("Access Rules"),t[91]=e,t[92]=ve):ve=t[92];let pe;t[93]!==e?(pe=e("Users"),t[93]=e,t[94]=pe):pe=t[94];let ue;t[95]!==e?(ue=e("Vectors"),t[95]=e,t[96]=ue):ue=t[96];let Se;t[97]!==e?(Se=e("Workflows"),t[97]=e,t[98]=Se):Se=t[98];let je;t[99]!==P||t[100]!==C||t[101]!==N||t[102]!==R||t[103]!==E||t[104]!==T||t[105]!==k||t[106]!==w||t[107]!==M||t[108]!==V||t[109]!==Z||t[110]!==D||t[111]!==H||t[112]!==j||t[113]!==G||t[114]!==K||t[115]!==I||t[116]!==_||t[117]!==z||t[118]!==te||t[119]!==se||t[120]!==ne||t[121]!==J||t[122]!==ee||t[123]!==ae||t[124]!==Ve||t[125]!==he||t[126]!==be||t[127]!==ye||t[128]!==Be||t[129]!==L||t[130]!==Q||t[131]!==X||t[132]!==ce||t[133]!==ie||t[134]!==ve||t[135]!==pe||t[136]!==ue||t[137]!==Se||t[138]!==h||t[139]!==f||t[140]!==v||t[141]!==x||t[142]!==b?(je={agents:h,analytics:f,api:v,audit:x,authAudit:b,authConfig:P,authSessions:C,containers:N,dashboards:R,data:E,deploymentHealth:T,drains:k,export:w,fanout:M,files:V,flags:Z,functions:D,health:H,home:j,insights:G,issues:K,kv:I,logs:_,metrics:z,migrations:te,notifications:se,organizations:ne,pitr:J,mail:ee,payments:ae,permissions:Ve,queues:he,realtime:be,rls:ye,schedule:Be,schema:L,security:Q,settings:X,sql:ce,traces:ie,storageRules:ve,users:pe,vectors:ue,workflows:Se},t[99]=P,t[100]=C,t[101]=N,t[102]=R,t[103]=E,t[104]=T,t[105]=k,t[106]=w,t[107]=M,t[108]=V,t[109]=Z,t[110]=D,t[111]=H,t[112]=j,t[113]=G,t[114]=K,t[115]=I,t[116]=_,t[117]=z,t[118]=te,t[119]=se,t[120]=ne,t[121]=J,t[122]=ee,t[123]=ae,t[124]=Ve,t[125]=he,t[126]=be,t[127]=ye,t[128]=Be,t[129]=L,t[130]=Q,t[131]=X,t[132]=ce,t[133]=ie,t[134]=ve,t[135]=pe,t[136]=ue,t[137]=Se,t[138]=h,t[139]=f,t[140]=v,t[141]=x,t[142]=b,t[143]=je):je=t[143];let fe=je,Je={advisors:e("Advisors"),auth:e("Auth"),database:e("Database"),functions:e("Functions"),observability:e("Observability"),operations:e("Operations"),overview:e("Overview"),settings:e("Settings"),storage:e("Storage")},Ne;t[144]!==e?(Ne=e("Inspect agent threads, message timelines, tool calls, and token usage."),t[144]=e,t[145]=Ne):Ne=t[145];let Ee;t[146]!==e?(Ee=e("Usage and latency from Analytics Engine \u2014 request volume, p50/p95, and hot shards."),t[146]=e,t[147]=Ee):Ee=t[147];let Te;t[148]!==e?(Te=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[148]=e,t[149]=Te):Te=t[149];let we;t[150]!==e?(we=e("A durable log of admin state-changing operations."),t[150]=e,t[151]=we):we=t[151];let ke;t[152]!==e?(ke=e("Authentication and security events \u2014 sign-ins, MFA, and session changes."),t[152]=e,t[153]=ke):ke=t[153];let Me;t[154]!==e?(Me=e("Enabled plugins and session config (read-only)."),t[154]=e,t[155]=Me):Me=t[155];let Ue;t[156]!==e?(Ue=e("Browse and revoke active sessions across all users."),t[156]=e,t[157]=Ue):Ue=t[157];let Oe;t[158]!==e?(Oe=e("Live Cloudflare Containers \u2014 current lifecycle state per instance from the log stream."),t[158]=e,t[159]=Oe):Oe=t[159];let ze;t[160]!==e?(ze=e("Chart widgets backed by saved read-only SQL queries."),t[160]=e,t[161]=ze):ze=t[161];let We;t[162]!==e?(We=e("Browse and edit rows across your shard and global tables."),t[162]=e,t[163]=We):We=t[163];let Ze;t[164]!==e?(Ze=e("Live liveness, readiness, and per-binding health from the deployment's /_lunora/health endpoint."),t[164]=e,t[165]=Ze):Ze=t[165];let qe;t[166]!==e?(qe=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[166]=e,t[167]=qe):qe=t[167];let Ge;t[168]!==e?(Ge=e("Export a shard to NDJSON, or import rows from it."),t[168]=e,t[169]=Ge):Ge=t[169];let Ke;t[170]!==e?(Ke=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[170]=e,t[171]=Ke):Ke=t[171];let at;t[172]!==e?(at=e("Browse objects in your R2 storage buckets."),t[172]=e,t[173]=at):at=t[173];let Qe;t[174]!==e?(Qe=e("Inspect feature flags and their live evaluation under a targeting context."),t[174]=e,t[175]=Qe):Qe=t[175];let xe;t[176]!==e?(xe=e("Run registered queries, mutations, and actions."),t[176]=e,t[177]=xe):xe=t[177];let Ye;t[178]!==e?(Ye=e("At-a-glance connection, error, and shard signals."),t[178]=e,t[179]=Ye):Ye=t[179];let Xe;t[180]!==e?(Xe=e("Connection, health, and advisor summary for your deployment."),t[180]=e,t[181]=Xe):Xe=t[181];let _e;t[182]!==e?(_e=e("Surface slow functions, error spikes, and cache problems."),t[182]=e,t[183]=_e):_e=t[183];let et;t[184]!==e?(et=e("Grouped error triage \u2014 Worker throws and container crashes folded by fingerprint."),t[184]=e,t[185]=et):et=t[185];let Ie;t[186]!==e?(Ie=e("A live stream of recent function logs."),t[186]=e,t[187]=Ie):Ie=t[187];let tt;t[188]!==e?(tt=e("Per-shard health and aggregate metrics."),t[188]=e,t[189]=tt):tt=t[189];let De;t[190]!==e?(De=e("Review migration status and run them."),t[190]=e,t[191]=De):De=t[191];let ot;t[192]!==e?(ot=e("Registered push devices \u2014 endpoint, kind, last-send status, and delivery errors."),t[192]=e,t[193]=ot):ot=t[193];let Ae;t[194]!==e?(Ae=e("Browse and manage organizations, members, and invitations."),t[194]=e,t[195]=Ae):Ae=t[195];let Tt;t[196]!==e?(Tt=e("Restore a shard to a point in the last 30 days."),t[196]=e,t[197]=Tt):Tt=t[197];let wt;t[198]!==e?(wt=e("Email your app sent, captured in dev."),t[198]=e,t[199]=wt):wt=t[199];let kt;t[200]!==e?(kt=e("Synced customers, subscriptions, and webhook events."),t[200]=e,t[201]=kt):kt=t[201];let Mt;t[202]!==e?(Mt=e("Inspect access policies per table, and probe a function as any identity."),t[202]=e,t[203]=Mt):Mt=t[203];let Ot;t[204]!==e?(Ot=e("Inspect declared Cloudflare Queues \u2014 their producer bindings, consumer mode, and dead-letter queue."),t[204]=e,t[205]=Ot):Ot=t[205];let _t;t[206]!==e?(_t=e("Active WebSocket subscriptions on this shard."),t[206]=e,t[207]=_t):_t=t[207];let It;t[208]!==e?(It=e("Inspect row-level-security policies and roles, per table."),t[208]=e,t[209]=It):It=t[209];let Dt;t[210]!==e?(Dt=e("Inspect and cancel scheduled jobs."),t[210]=e,t[211]=Dt):Dt=t[211];let At;t[212]!==e?(At=e("Inspect each table and its columns."),t[212]=e,t[213]=At):At=t[213];let Vt;t[214]!==e?(Vt=e("Review admin gates, credentials, and log redaction."),t[214]=e,t[215]=Vt):Vt=t[215];let Bt;t[216]!==e?(Bt=e("Read-only deployment config \u2014 vars, secrets, and bindings."),t[216]=e,t[217]=Bt):Bt=t[217];let Lt;t[218]!==e?(Lt=e("Run read-only SQL against a shard."),t[218]=e,t[219]=Lt):Lt=t[219];let Ft;t[220]!==e?(Ft=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[220]=e,t[221]=Ft):Ft=t[221];let Ht;t[222]!==e?(Ht=e("Inspect storage access rules \u2014 per bucket, operation, and key prefix."),t[222]=e,t[223]=Ht):Ht=t[223];let $t;t[224]!==e?($t=e("Recent ctx.trace waterfalls for this shard \u2014 the drill-down from a log line."),t[224]=e,t[225]=$t):$t=t[225];let jt;t[226]!==e?(jt=e("Manage auth users \u2014 roles, bans, sessions, and identity."),t[226]=e,t[227]=jt):jt=t[227];let Ut;t[228]!==e?(Ut=e("Browse Vectorize indexes and run similarity searches."),t[228]=e,t[229]=Ut):Ut=t[229];let zt;t[230]!==e?(zt=e("Inspect declared Cloudflare Workflows and their bindings."),t[230]=e,t[231]=zt):zt=t[231];let Lo;t[232]!==Ne||t[233]!==Ee||t[234]!==Te||t[235]!==we||t[236]!==ke||t[237]!==Me||t[238]!==Ue||t[239]!==Oe||t[240]!==ze||t[241]!==We||t[242]!==Ze||t[243]!==qe||t[244]!==Ge||t[245]!==Ke||t[246]!==at||t[247]!==Qe||t[248]!==xe||t[249]!==Ye||t[250]!==Xe||t[251]!==_e||t[252]!==et||t[253]!==Ie||t[254]!==tt||t[255]!==De||t[256]!==ot||t[257]!==Ae||t[258]!==Tt||t[259]!==wt||t[260]!==kt||t[261]!==Mt||t[262]!==Ot||t[263]!==_t||t[264]!==It||t[265]!==Dt||t[266]!==At||t[267]!==Vt||t[268]!==Bt||t[269]!==Lt||t[270]!==Ft||t[271]!==Ht||t[272]!==$t||t[273]!==jt||t[274]!==Ut||t[275]!==zt?(Lo={agents:Ne,analytics:Ee,api:Te,audit:we,authAudit:ke,authConfig:Me,authSessions:Ue,containers:Oe,dashboards:ze,data:We,deploymentHealth:Ze,drains:qe,export:Ge,fanout:Ke,files:at,flags:Qe,functions:xe,health:Ye,home:Xe,insights:_e,issues:et,logs:Ie,metrics:tt,migrations:De,notifications:ot,organizations:Ae,pitr:Tt,mail:wt,payments:kt,permissions:Mt,queues:Ot,realtime:_t,rls:It,schedule:Dt,schema:At,security:Vt,settings:Bt,sql:Lt,kv:Ft,storageRules:Ht,traces:$t,users:jt,vectors:Ut,workflows:zt},t[232]=Ne,t[233]=Ee,t[234]=Te,t[235]=we,t[236]=ke,t[237]=Me,t[238]=Ue,t[239]=Oe,t[240]=ze,t[241]=We,t[242]=Ze,t[243]=qe,t[244]=Ge,t[245]=Ke,t[246]=at,t[247]=Qe,t[248]=xe,t[249]=Ye,t[250]=Xe,t[251]=_e,t[252]=et,t[253]=Ie,t[254]=tt,t[255]=De,t[256]=ot,t[257]=Ae,t[258]=Tt,t[259]=wt,t[260]=kt,t[261]=Mt,t[262]=Ot,t[263]=_t,t[264]=It,t[265]=Dt,t[266]=At,t[267]=Vt,t[268]=Bt,t[269]=Lt,t[270]=Ft,t[271]=Ht,t[272]=$t,t[273]=jt,t[274]=Ut,t[275]=zt,t[276]=Lo):Lo=t[276];let Ni=Lo,Fo;t[277]!==o?(Fo=a(it=>{Fe(o({to:`/${it.currentTarget.dataset.tab??""}`}))},"t95"),t[277]=o,t[278]=Fo):Fo=t[278];let Ei=Fo,Ho,$o;t[279]!==r||t[280]!==fe?(Ho=a(()=>{typeof document<"u"&&(document.title=`${fe[r]} \xB7 lunora`)},"t96"),$o=[r,fe],t[279]=r,t[280]=fe,t[281]=Ho,t[282]=$o):(Ho=t[281],$o=t[282]),(0,q.useEffect)(Ho,$o);let Ti=u.find(it=>it.tabs.includes(r))??ci[0],Qs=u.flatMap(it=>it.tabs.map(Qo=>({group:Je[it.key],label:fe[Qo],to:`/${Qo}`}))),Wt=(0,q.use)(Ci),wi=Wt!==null&&Wt.token!=="",jo;t[283]!==Qs?(jo=(0,i.jsxDEV)(ai,{items:Qs},void 0,!1),t[283]=Qs,t[284]=jo):jo=t[284];let Uo;t[285]===Symbol.for("react.memo_cache_sentinel")?(Uo=(0,i.jsxDEV)(nd,{className:"-ms-1"},void 0,!1),t[285]=Uo):Uo=t[285];let Zt;t[286]!==e?(Zt=e("Breadcrumb"),t[286]=e,t[287]=Zt):Zt=t[287];let Ys=Je[Ti.key],qt;t[288]!==Ys?(qt=(0,i.jsxDEV)("span",{className:"text-muted-foreground",children:Ys},void 0,!1),t[288]=Ys,t[289]=qt):qt=t[289];let zo;t[290]===Symbol.for("react.memo_cache_sentinel")?(zo=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5 text-muted-foreground/60",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1)},void 0,!1),t[290]=zo):zo=t[290];let Js=fe[r],Gt;t[291]!==Js?(Gt=(0,i.jsxDEV)("span",{className:"font-medium text-foreground",children:Js},void 0,!1),t[291]=Js,t[292]=Gt):Gt=t[292];let Kt;t[293]!==Zt||t[294]!==qt||t[295]!==Gt?(Kt=(0,i.jsxDEV)("nav",{"aria-label":Zt,className:"flex items-center gap-1.5 text-[13px]",children:[qt,zo,Gt]},void 0,!0),t[293]=Zt,t[294]=qt,t[295]=Gt,t[296]=Kt):Kt=t[296];let Wo;t[297]===Symbol.for("react.memo_cache_sentinel")?(Wo=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,i.jsxDEV)("circle",{cx:"11",cy:"11",r:"7"},void 0,!1),(0,i.jsxDEV)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"},void 0,!1)]},void 0,!0),t[297]=Wo):Wo=t[297];let Qt;t[298]!==e?(Qt=e("Search\u2026"),t[298]=e,t[299]=Qt):Qt=t[299];let Zo;t[300]===Symbol.for("react.memo_cache_sentinel")?(Zo=(0,i.jsxDEV)("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"\u2318K"},void 0,!1),t[300]=Zo):Zo=t[300];let Yt;t[301]!==Qt?(Yt=(0,i.jsxDEV)("button",{className:"mx-auto hidden h-8 w-72 items-center gap-2 rounded-lg border border-border bg-muted/40 px-3 text-xs text-muted-foreground transition-colors hover:bg-muted md:flex","data-testid":"dash-app-search",onClick:ri,type:"button",children:[Wo,Qt,Zo]},void 0,!0),t[301]=Qt,t[302]=Yt):Yt=t[302];let qo;t[303]===Symbol.for("react.memo_cache_sentinel")?(qo=(0,i.jsxDEV)("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:(0,i.jsxDEV)($l,{},void 0,!1)},void 0,!1),t[303]=qo):qo=t[303];let Jt;t[304]!==Kt||t[305]!==Yt?(Jt=(0,i.jsxDEV)("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[Uo,Kt,Yt,qo]},void 0,!0),t[304]=Kt,t[305]=Yt,t[306]=Jt):Jt=t[306];let Xt;t[307]!==Wt?.rulesInstalled?(Xt=Wt?.rulesInstalled===!1&&(0,i.jsxDEV)(Al,{},void 0,!1),t[307]=Wt?.rulesInstalled,t[308]=Xt):Xt=t[308];let Xs=`dash-tab-${r}`,en=c?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",tn=fe[r],eo;t[309]!==e||t[310]!==tn?(eo=e("{title} failed",{title:tn}),t[309]=e,t[310]=tn,t[311]=eo):eo=t[311];let on=fe[r],to;t[312]!==e?(to=e("Try again"),t[312]=e,t[313]=to):to=t[313];let Go;t[314]===Symbol.for("react.memo_cache_sentinel")?(Go=(0,i.jsxDEV)(q.Suspense,{fallback:(0,i.jsxDEV)(Si,{},void 0,!1),children:(0,i.jsxDEV)(rr,{},void 0,!1)},void 0,!1),t[314]=Go):Go=t[314];let oo;t[315]!==r||t[316]!==eo||t[317]!==on||t[318]!==to?(oo=(0,i.jsxDEV)(Cs,{fallbackTitle:eo,label:on,retryLabel:to,children:Go},r,!1),t[315]=r,t[316]=eo,t[317]=on,t[318]=to,t[319]=oo):oo=t[319];let so;t[320]!==en||t[321]!==oo?(so=(0,i.jsxDEV)("div",{className:en,children:oo},void 0,!1),t[320]=en,t[321]=oo,t[322]=so):so=t[322];let no;t[323]!==Xs||t[324]!==so?(no=(0,i.jsxDEV)("div",{"aria-labelledby":Xs,className:"flex min-w-0 flex-1 flex-col overflow-hidden","data-testid":"dash-panel",id:"dash-panel",role:"tabpanel",children:so},void 0,!1),t[323]=Xs,t[324]=so,t[325]=no):no=t[325];let Ko;return t[326]!==Jt||t[327]!==Xt||t[328]!==no?(Ko=(0,i.jsxDEV)(rd,{className:"overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[Jt,Xt,no]},void 0,!0),t[326]=Jt,t[327]=Xt,t[328]=no,t[329]=Ko):Ko=t[329],(0,i.jsxDEV)(od,{className:"min-h-0 flex-1","data-testid":"lunora-studio",children:[jo,(0,i.jsxDEV)(pc,{chrome:Wt,connected:wi,current:r,groupLabel:Je,groups:u,selectTab:Ei,tabDescription:Ni,tabLabel:fe},void 0,!1),Ko]},void 0,!0)},"StudioLayout"),fc=a(t=>{let e=(0,B.c)(5),{initialShardKey:o,schemaEditable:s}=t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];let r=sr(n),{table:l}=r,c=typeof l=="string"?l:void 0,p;return e[1]!==o||e[2]!==c||e[3]!==s?(p=(0,i.jsxDEV)(Kd,{initialShardKey:o,initialTable:c,schemaEditable:s},void 0,!1),e[1]=o,e[2]=c,e[3]=s,e[4]=p):p=e[4],p},"SchemaRoutePanel"),mc=a(()=>{let t=(0,B.c)(3),e=ft(),o,s;return t[0]!==e?(o=a(()=>{Fe(e({replace:!0,to:"/home"}))},"t0"),s=[e],t[0]=e,t[1]=o,t[2]=s):(o=t[1],s=t[2]),(0,q.useEffect)(o,s),null},"NotFoundRedirect"),gc=a(({basePath:t,dataEditable:e=!1,functions:o,initialShardKey:s,openApiSpec:n,openRpcSpec:r,runAsIdentity:l=!1,schemaEditable:c=!1,scheduledCancel:p,scheduledCron:d,scheduledLoad:u})=>{let g=nr({component:uc}),m={agents:(0,i.jsxDEV)(hd,{initialShardKey:s},void 0,!1),analytics:(0,i.jsxDEV)(vd,{},void 0,!1),api:(0,i.jsxDEV)(xd,{functions:o,initialShardKey:s,openApiSpec:n,openRpcSpec:r},void 0,!1),audit:(0,i.jsxDEV)(Dd,{initialShardKey:s},void 0,!1),authAudit:(0,i.jsxDEV)(bd,{},void 0,!1),authConfig:(0,i.jsxDEV)(yd,{},void 0,!1),authSessions:(0,i.jsxDEV)(Pd,{},void 0,!1),containers:(0,i.jsxDEV)(Sd,{},void 0,!1),dashboards:(0,i.jsxDEV)(Wd,{initialShardKey:s},void 0,!1),data:(0,i.jsxDEV)(Ed,{editable:e,initialShardKey:s},void 0,!1),deploymentHealth:(0,i.jsxDEV)(Nd,{},void 0,!1),drains:(0,i.jsxDEV)(Ad,{},void 0,!1),export:(0,i.jsxDEV)(Td,{initialShardKey:s},void 0,!1),fanout:(0,i.jsxDEV)(Zd,{initialShardKey:s},void 0,!1),files:(0,i.jsxDEV)(Jd,{},void 0,!1),kv:(0,i.jsxDEV)(Hd,{},void 0,!1),flags:(0,i.jsxDEV)(Md,{initialShardKey:s},void 0,!1),functions:(0,i.jsxDEV)("div",{className:"flex flex-col gap-8",children:[(0,i.jsxDEV)(_d,{functions:o,initialShardKey:s},void 0,!1),(0,i.jsxDEV)(Od,{functions:o,runAsIdentity:l},void 0,!1)]},void 0,!0),health:(0,i.jsxDEV)(qd,{initialShardKey:s},void 0,!1),home:(0,i.jsxDEV)(ti,{initialShardKey:s},void 0,!1),insights:(0,i.jsxDEV)(fd,{initialShardKey:s},void 0,!1),issues:(0,i.jsxDEV)(Id,{initialShardKey:s},void 0,!1),logs:(0,i.jsxDEV)(Vd,{initialShardKey:s},void 0,!1),traces:(0,i.jsxDEV)(ec,{initialShardKey:s},void 0,!1),metrics:(0,i.jsxDEV)(Gd,{initialShardKey:s},void 0,!1),migrations:(0,i.jsxDEV)(wd,{initialShardKey:s},void 0,!1),notifications:(0,i.jsxDEV)($d,{},void 0,!1),organizations:(0,i.jsxDEV)(Cd,{},void 0,!1),permissions:(0,i.jsxDEV)(Ud,{functions:o,runAsIdentity:l,schemaEditable:c},void 0,!1),pitr:(0,i.jsxDEV)(kd,{initialShardKey:s},void 0,!1),mail:(0,i.jsxDEV)(Bd,{},void 0,!1),payments:(0,i.jsxDEV)(jd,{},void 0,!1),queues:(0,i.jsxDEV)(zd,{},void 0,!1),realtime:(0,i.jsxDEV)(Fd,{initialShardKey:s},void 0,!1),rls:(0,i.jsxDEV)(md,{},void 0,!1),schedule:(0,i.jsxDEV)(Ld,{loadCronJobs:d,scheduledCancel:p,scheduledLoad:u},void 0,!1),schema:(0,i.jsxDEV)(fc,{initialShardKey:s,schemaEditable:c},void 0,!1),security:(0,i.jsxDEV)(gd,{},void 0,!1),settings:(0,i.jsxDEV)(Qd,{initialShardKey:s},void 0,!1),sql:(0,i.jsxDEV)(Yd,{initialShardKey:s},void 0,!1),storageRules:(0,i.jsxDEV)(Xd,{},void 0,!1),users:(0,i.jsxDEV)(Rd,{},void 0,!1),vectors:(0,i.jsxDEV)(tc,{},void 0,!1),workflows:(0,i.jsxDEV)(oc,{},void 0,!1)},h=Jo({component:a(()=>m.home,"component"),getParentRoute:a(()=>g,"getParentRoute"),path:"/"}),f=Ri.map(b=>b==="data"?Jo({component:a(()=>m[b],"component"),getParentRoute:a(()=>g,"getParentRoute"),path:`/${b}`,validateSearch:Xr}):Jo({component:a(()=>m[b],"component"),getParentRoute:a(()=>g,"getParentRoute"),path:`/${b}`})),v=g.addChildren([h,...f]),x="window"in globalThis?tr():or({initialEntries:["/home"]});return ar({...t===void 0||t==="/"?{}:{basepath:t},defaultNotFoundComponent:mc,defaultPendingComponent:Si,defaultPendingMinMs:0,defaultPendingMs:0,history:x,routeTree:v})},"buildRouter"),hc=a(t=>{let e=(0,B.c)(17),{basePath:o,chrome:s,dataEditable:n,functions:r,initialShardKey:l,openApiSpec:c,openRpcSpec:p,runAsIdentity:d,schemaEditable:u,scheduledCancel:g,scheduledCron:m,scheduledLoad:h}=t,f;e[0]!==o||e[1]!==n||e[2]!==r||e[3]!==l||e[4]!==c||e[5]!==p||e[6]!==d||e[7]!==g||e[8]!==m||e[9]!==h||e[10]!==u?(f=gc({basePath:o,dataEditable:n,functions:r,initialShardKey:l,openApiSpec:c,openRpcSpec:p,runAsIdentity:d,schemaEditable:u,scheduledCancel:g,scheduledCron:m,scheduledLoad:h}),e[0]=o,e[1]=n,e[2]=r,e[3]=l,e[4]=c,e[5]=p,e[6]=d,e[7]=g,e[8]=m,e[9]=h,e[10]=u,e[11]=f):f=e[11];let v=f,x=s??null,b;e[12]!==v?(b=(0,i.jsxDEV)(ir,{router:v},void 0,!1),e[12]=v,e[13]=b):b=e[13];let P;return e[14]!==x||e[15]!==b?(P=(0,i.jsxDEV)(Ci,{value:x,children:b},void 0,!1),e[14]=x,e[15]=b,e[16]=P):P=e[16],P},"StudioShell"),W0=a(t=>{let e=(0,B.c)(17),{basePath:o,chrome:s,dataEditable:n,functions:r,i18n:l,initialShardKey:c,locale:p,openApiSpec:d,openRpcSpec:u,runAsIdentity:g,schemaEditable:m,scheduledCancel:h,scheduledCron:f,scheduledLoad:v}=t,x;e[0]!==o||e[1]!==s||e[2]!==n||e[3]!==r||e[4]!==c||e[5]!==d||e[6]!==u||e[7]!==g||e[8]!==h||e[9]!==f||e[10]!==v||e[11]!==m?(x=(0,i.jsxDEV)(Tl,{children:(0,i.jsxDEV)(hc,{basePath:o,chrome:s,dataEditable:n,functions:r,initialShardKey:c,openApiSpec:d,openRpcSpec:u,runAsIdentity:g,scheduledCancel:h,scheduledCron:f,scheduledLoad:v,schemaEditable:m},void 0,!1)},void 0,!1),e[0]=o,e[1]=s,e[2]=n,e[3]=r,e[4]=c,e[5]=d,e[6]=u,e[7]=g,e[8]=h,e[9]=f,e[10]=v,e[11]=m,e[12]=x):x=e[12];let b=x;if(l===void 0&&p===void 0)return b;let P;return e[13]!==l||e[14]!==p||e[15]!==b?(P=(0,i.jsxDEV)(ni,{i18n:l,locale:p,children:b},void 0,!1),e[13]=l,e[14]=p,e[15]=b,e[16]=P):P=e[16],P},"Studio");function vc(t){return t.location.pathname}a(vc,"_temp");function xc(t){return t.tabs.length>0}a(xc,"_temp2");export{Cs as a,ni as b,El as c,wl as d,z0 as e,_l as f,Ul as g,Zl as h,ql as i,Gl as j,W0 as k};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as H}from"./chunk-J6J54MBP.js";import{a as E}from"./chunk-RD5UG2YL.js";import{a as R,b as _,c as $,d as N,e as o,f as r}from"./chunk-GTM65MVX.js";import{a as C,e as k}from"./chunk-Y572GMZE.js";import{c as S}from"./chunk-UK64ZSUW.js";import"./chunk-O3NAGRTR.js";import"./chunk-CKSHCYGC.js";import{f as A}from"./chunk-3LJEGSMK.js";import"./chunk-ZHVTQ37P.js";import"./chunk-3OA7PECS.js";import{a as w}from"./chunk-TAD43CG5.js";import{d as g,m as I,q as B}from"./chunk-HBGS4SEX.js";import"./chunk-LXULVPEM.js";import{a as m,e as T,g as j,h as z}from"./chunk-RRCPZMC2.js";var Q=T(j(),1);var t=T(z(),1);var L=200,K=m(()=>{let e=(0,Q.c)(21),d=A(),s=g(),u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=["lunora-auth-sessions",L],e[0]=u):u=e[0];let h;e[1]!==d?(h=m(()=>d.listAuthSessions({limit:L}),"t1"),e[1]=d,e[2]=h):h=e[2];let l=E(u,h),{error:v}=l,i=l.data?.rows??null,p;e[3]!==l?(p=m(()=>{l.refetch()},"t2"),e[3]=l,e[4]=p):p=e[4],H(p,!0);let x;e[5]!==d||e[6]!==l?(x=m(a=>{I((async()=>{await d.revokeAuthSession({sessionId:a}),l.refetch()})())},"t3"),e[5]=d,e[6]=l,e[7]=x):x=e[7];let y=x,n;e[8]!==v?(n=v!==null&&(0,t.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"auth-sessions-error",role:"alert",children:v},void 0,!1),e[8]=v,e[9]=n):n=e[9];let c;e[10]!==i||e[11]!==s?(c=i!==null&&i.length===0&&(0,t.jsxDEV)(w,{testId:"auth-sessions-empty",title:s("No active sessions.")},void 0,!1),e[10]=i,e[11]=s,e[12]=c):c=e[12];let f;e[13]!==y||e[14]!==i||e[15]!==s?(f=i!==null&&i.length>0&&(0,t.jsxDEV)(C,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(k,{className:"px-0",children:(0,t.jsxDEV)(R,{"data-testid":"auth-sessions-table",children:[(0,t.jsxDEV)(_,{children:(0,t.jsxDEV)(N,{children:[(0,t.jsxDEV)(o,{children:s("user")},void 0,!1),(0,t.jsxDEV)(o,{children:s("expires")},void 0,!1),(0,t.jsxDEV)(o,{children:s("ip")},void 0,!1),(0,t.jsxDEV)(o,{children:s("user agent")},void 0,!1),(0,t.jsxDEV)(o,{children:s("impersonated by")},void 0,!1),(0,t.jsxDEV)(o,{"aria-label":s("Actions")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)($,{children:i.map(a=>(0,t.jsxDEV)(N,{"data-testid":`auth-session-${a.id}`,children:[(0,t.jsxDEV)(r,{className:"font-mono text-xs",children:a.userId},void 0,!1),(0,t.jsxDEV)(r,{className:"text-muted-foreground tabular-nums",children:B(a.expiresAt)},void 0,!1),(0,t.jsxDEV)(r,{children:a.ipAddress??""},void 0,!1),(0,t.jsxDEV)(r,{className:"max-w-40 truncate",children:a.userAgent??""},void 0,!1),(0,t.jsxDEV)(r,{className:"font-mono text-xs",children:a.impersonatedBy??""},void 0,!1),(0,t.jsxDEV)(r,{children:(0,t.jsxDEV)(S,{"data-testid":`auth-session-revoke-${a.id}`,onClick:m(()=>{y(a.id)},"onClick"),size:"xs",type:"button",variant:"ghost",children:s("Revoke")},void 0,!1)},void 0,!1)]},a.id,!0))},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1),e[13]=y,e[14]=i,e[15]=s,e[16]=f):f=e[16];let b;return e[17]!==n||e[18]!==c||e[19]!==f?(b=(0,t.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"auth-sessions",children:[n,c,f]},void 0,!0),e[17]=n,e[18]=c,e[19]=f,e[20]=b):b=e[20],b},"AuthSessionsPanel");export{K as AuthSessionsPanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as V}from"./chunk-J6J54MBP.js";import{a as L}from"./chunk-2K47A3P6.js";import{a as W}from"./chunk-F7GE4X2U.js";import"./chunk-XNJNSCLM.js";import{b as _}from"./chunk-RD5UG2YL.js";import{a as O,b as Q,c as U,d as K,e as R,f as D}from"./chunk-GTM65MVX.js";import{a as E}from"./chunk-Y572GMZE.js";import{a as j}from"./chunk-F2YMCQ6B.js";import"./chunk-4PC7IXNY.js";import"./chunk-2MLA6WFH.js";import"./chunk-VL23Y44O.js";import"./chunk-HV7G6DFP.js";import"./chunk-O3NAGRTR.js";import{b as w}from"./chunk-ZPP2KOR4.js";import"./chunk-CKSHCYGC.js";import{a as H}from"./chunk-TEWVD66F.js";import"./chunk-3LJEGSMK.js";import"./chunk-ZHVTQ37P.js";import"./chunk-3OA7PECS.js";import{a as B}from"./chunk-TAD43CG5.js";import{d as A}from"./chunk-HBGS4SEX.js";import"./chunk-LXULVPEM.js";import{a as C,e as F,f as J,g as X,h as Y}from"./chunk-RRCPZMC2.js";var P=F(X(),1),G=F(J(),1);var t=F(Y(),1);var q=C(r=>`${r.toString()} ms`,"formatMs"),Z=C(r=>r.totalConnections===0&&r.shapePoke.passes===0&&r.whisper.passes===0,"isFanoutIdle"),$=C(r=>{let e=(0,P.c)(8),{label:o,testId:s,value:i}=r,l;e[0]!==o?(l=(0,t.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:o},void 0,!1),e[0]=o,e[1]=l):l=e[1];let d;e[2]!==s||e[3]!==i?(d=(0,t.jsxDEV)("span",{className:"truncate text-2xl font-semibold tabular-nums text-foreground","data-testid":s,children:i},void 0,!1),e[2]=s,e[3]=i,e[4]=d):d=e[4];let v;return e[5]!==l||e[6]!==d?(v=(0,t.jsxDEV)(E,{className:"gap-0 py-0",children:(0,t.jsxDEV)("div",{className:"flex flex-col gap-2.5 p-4",children:[l,d]},void 0,!0)},void 0,!1),e[5]=l,e[6]=d,e[7]=v):v=e[7],v},"StatCard"),z=C(r=>{let e=(0,P.c)(48),{counters:o,includeTiming:s,prefix:i,t:l,title:d}=r,v=`${i}-section`,h;e[0]!==d?(h=(0,t.jsxDEV)("h3",{className:"text-sm font-medium text-foreground",children:d},void 0,!1),e[0]=d,e[1]=h):h=e[1];let k=`${i}-stats`,a;e[2]!==l?(a=l("Passes"),e[2]=l,e[3]=a):a=e[3];let n=`${i}-passes`,g;e[4]!==o.passes||e[5]!==a||e[6]!==n?(g=(0,t.jsxDEV)($,{label:a,testId:n,value:o.passes},void 0,!1),e[4]=o.passes,e[5]=a,e[6]=n,e[7]=g):g=e[7];let N;e[8]!==l?(N=l("Sockets iterated"),e[8]=l,e[9]=N):N=e[9];let I=`${i}-iterated`,c;e[10]!==o.socketsIterated||e[11]!==N||e[12]!==I?(c=(0,t.jsxDEV)($,{label:N,testId:I,value:o.socketsIterated},void 0,!1),e[10]=o.socketsIterated,e[11]=N,e[12]=I,e[13]=c):c=e[13];let f;e[14]!==l?(f=l("Delivered"),e[14]=l,e[15]=f):f=e[15];let y=`${i}-delivered`,u;e[16]!==o.socketsDelivered||e[17]!==f||e[18]!==y?(u=(0,t.jsxDEV)($,{label:f,testId:y,value:o.socketsDelivered},void 0,!1),e[16]=o.socketsDelivered,e[17]=f,e[18]=y,e[19]=u):u=e[19];let m;e[20]!==l?(m=l("Peak width"),e[20]=l,e[21]=m):m=e[21];let b=`${i}-peak`,p;e[22]!==o.peakSocketsIterated||e[23]!==m||e[24]!==b?(p=(0,t.jsxDEV)($,{label:m,testId:b,value:o.peakSocketsIterated},void 0,!1),e[22]=o.peakSocketsIterated,e[23]=m,e[24]=b,e[25]=p):p=e[25];let x;e[26]!==o.totalMs||e[27]!==s||e[28]!==i||e[29]!==l?(x=s&&(0,t.jsxDEV)($,{label:l("Total time"),testId:`${i}-total-ms`,value:q(o.totalMs)},void 0,!1),e[26]=o.totalMs,e[27]=s,e[28]=i,e[29]=l,e[30]=x):x=e[30];let S;e[31]!==o.maxMs||e[32]!==s||e[33]!==i||e[34]!==l?(S=s&&(0,t.jsxDEV)($,{label:l("Max time"),testId:`${i}-max-ms`,value:q(o.maxMs)},void 0,!1),e[31]=o.maxMs,e[32]=s,e[33]=i,e[34]=l,e[35]=S):S=e[35];let T;e[36]!==u||e[37]!==p||e[38]!==x||e[39]!==S||e[40]!==k||e[41]!==g||e[42]!==c?(T=(0,t.jsxDEV)("dl",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3","data-testid":k,children:[g,c,u,p,x,S]},void 0,!0),e[36]=u,e[37]=p,e[38]=x,e[39]=S,e[40]=k,e[41]=g,e[42]=c,e[43]=T):T=e[43];let M;return e[44]!==v||e[45]!==T||e[46]!==h?(M=(0,t.jsxDEV)("section",{className:"flex flex-col gap-2","data-testid":v,children:[h,T]},void 0,!0),e[44]=v,e[45]=T,e[46]=h,e[47]=M):M=e[47],M},"PathCounters"),ue=C(r=>{let e=(0,P.c)(32),{initialShardKey:o}=r,s=A(),[i,l]=(0,G.useState)(o??""),d;e[0]!==i?(d=i.trim(),e[0]=i,e[1]=d):d=e[1];let v=L(d,400),h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={},e[2]=h):h=e[2];let k;e[3]!==v?(k={keepPreviousData:!0,shardKey:v},e[3]=v,e[4]=k):k=e[4];let{data:a,error:n,errorSource:g,refetch:N}=_(H.getFanoutMetrics,h,k);V(N,!0);let I;e[5]!==a?(I=a!==void 0&&Z(a),e[5]=a,e[6]=I):I=e[6];let c=I,f;e[7]!==i?(f=(0,t.jsxDEV)(j,{onChange:l,testId:"fanout-shard-input",value:i},void 0,!1),e[7]=i,e[8]=f):f=e[8];let y;e[9]!==a||e[10]!==s?(y=a!==void 0&&(0,t.jsxDEV)("div",{className:"ml-auto flex items-center gap-2 text-sm text-muted-foreground","data-testid":"fanout-count",children:[a.promoted&&(0,t.jsxDEV)(w,{"data-testid":"fanout-promoted",variant:a.relayCount>=a.maxRelays?"destructive":"default",children:a.relayCount>=a.maxRelays?s("auto-scaled: {relayCount}/{maxRelays} relays (at ceiling)",{maxRelays:a.maxRelays,relayCount:a.relayCount}):s("auto-scaled: {relayCount}/{maxRelays} relays",{maxRelays:a.maxRelays,relayCount:a.relayCount})},void 0,!1),(0,t.jsxDEV)(w,{variant:"secondary",children:s("{count} connections",{count:a.totalConnections})},void 0,!1),(0,t.jsxDEV)(w,{variant:"secondary",children:s("peak {count} subscribers",{count:a.peakSubscribers})},void 0,!1)]},void 0,!0),e[9]=a,e[10]=s,e[11]=y):y=e[11];let u;e[12]!==f||e[13]!==y?(u=(0,t.jsxDEV)("div",{className:"flex flex-wrap items-center gap-2",children:[f,y]},void 0,!0),e[12]=f,e[13]=y,e[14]=u):u=e[14];let m;e[15]!==n||e[16]!==g?(m=n!==null&&(0,t.jsxDEV)(W,{error:g,testId:"fanout-error"},void 0,!1),e[15]=n,e[16]=g,e[17]=m):m=e[17];let b;e[18]!==n||e[19]!==c||e[20]!==s?(b=n===null&&c&&(0,t.jsxDEV)(B,{description:s("Realtime fan-out cost and per-topic subscriber counts for this shard."),icon:(0,t.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsxDEV)("path",{d:"M4 12h4l3 7 4-14 3 7h2"},void 0,!1)},void 0,!1),testId:"fanout-empty",title:s("No fan-out activity yet.")},void 0,!1),e[18]=n,e[19]=c,e[20]=s,e[21]=b):b=e[21];let p;e[22]!==n||e[23]!==c||e[24]!==a||e[25]!==s?(p=n===null&&a!==void 0&&!c&&(0,t.jsxDEV)(t.Fragment,{children:[a.topics.length>0&&(0,t.jsxDEV)("section",{className:"flex flex-col gap-2","data-testid":"fanout-topics-section",children:[(0,t.jsxDEV)("h3",{className:"text-sm font-medium text-foreground",children:s("Hot topics")},void 0,!1),(0,t.jsxDEV)(E,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(O,{"data-testid":"fanout-topics-table",children:[(0,t.jsxDEV)(Q,{children:(0,t.jsxDEV)(K,{children:[(0,t.jsxDEV)(R,{children:s("Topic")},void 0,!1),(0,t.jsxDEV)(R,{children:s("Kind")},void 0,!1),(0,t.jsxDEV)(R,{className:"text-right",children:s("Subscribers")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(U,{children:a.topics.map(ee)},void 0,!1)]},void 0,!0)},void 0,!1)]},void 0,!0),(0,t.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"fanout-cost",children:[(0,t.jsxDEV)("h2",{className:"text-sm font-medium text-muted-foreground",children:s("Fan-out cost since this instance woke")},void 0,!1),(0,t.jsxDEV)(z,{counters:a.shapePoke,includeTiming:!0,prefix:"fanout-poke",t:s,title:s("Shape pokes")},void 0,!1),(0,t.jsxDEV)(z,{counters:a.whisper,includeTiming:!1,prefix:"fanout-whisper",t:s,title:s("Whisper broadcasts")},void 0,!1)]},void 0,!0)]},void 0,!0),e[22]=n,e[23]=c,e[24]=a,e[25]=s,e[26]=p):p=e[26];let x;return e[27]!==p||e[28]!==u||e[29]!==m||e[30]!==b?(x=(0,t.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"fanout-panel",children:[u,m,b,p]},void 0,!0),e[27]=p,e[28]=u,e[29]=m,e[30]=b,e[31]=x):x=e[31],x},"FanoutPanel");function ee(r){return(0,t.jsxDEV)(K,{"data-testid":"fanout-topic-row",children:[(0,t.jsxDEV)(D,{className:"font-mono text-xs",children:r.topic},void 0,!1),(0,t.jsxDEV)(D,{children:(0,t.jsxDEV)(w,{variant:"outline",children:r.kind},void 0,!1)},void 0,!1),(0,t.jsxDEV)(D,{className:"text-right font-medium tabular-nums",children:r.subscribers},void 0,!1)]},`${r.kind}:${r.topic}`,!0)}C(ee,"_temp");export{ue as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as U}from"./chunk-J6J54MBP.js";import{a as G}from"./chunk-2YTF6LJ6.js";import{a as Q}from"./chunk-RD5UG2YL.js";import{a as W,b as H,c as K,d as F,e as p,f as x}from"./chunk-GTM65MVX.js";import{a as A,e as D}from"./chunk-Y572GMZE.js";import{c as te}from"./chunk-UK64ZSUW.js";import"./chunk-O3NAGRTR.js";import{b as ee}from"./chunk-ZPP2KOR4.js";import"./chunk-CKSHCYGC.js";import{f as P}from"./chunk-3LJEGSMK.js";import"./chunk-ZHVTQ37P.js";import"./chunk-3OA7PECS.js";import{a as R}from"./chunk-TAD43CG5.js";import{d as q,h as Y,m as V,q as j}from"./chunk-HBGS4SEX.js";import"./chunk-LXULVPEM.js";import{a as f,e as M,f as oe,g as se,h as re}from"./chunk-RRCPZMC2.js";var Z=M(se(),1),z=M(oe(),1);var t=M(re(),1);var ae=M(se(),1);var X=M(oe(),1);var u=M(re(),1);var ce=f(s=>Number.isFinite(s)?j(s,"\u2014"):"\u2014","formatScheduledFor"),ie=f(s=>s.toSorted((e,c)=>e.scheduledFor-c.scheduledFor),"sortByDue"),de=f(s=>{let e=(0,ae.c)(33),c;e[0]!==s?(c=s===void 0?{}:s,e[0]=s,e[1]=c):c=e[1];let{cancelJob:n,loadJobs:m}=c,r=P(),o=q(),l=m===void 0,k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=["lunora-scheduled-jobs"],e[2]=k):k=e[2];let v;e[3]!==r||e[4]!==m?(v=f(async()=>{let d=await(m??(()=>r.listScheduledJobs()))();return ie(d)},"t3"),e[3]=r,e[4]=m,e[5]=v):v=e[5];let a=Q(k,v),[i,h]=(0,X.useState)(void 0),[S,C]=(0,X.useState)(void 0),g,T;e[6]!==r||e[7]!==l?(g=f(()=>{if(l)return r.subscribeScheduledJobs(d=>{C(void 0),h(ie(d))})},"t4"),T=[l,r],e[6]=r,e[7]=l,e[8]=g,e[9]=T):(g=e[8],T=e[9]),(0,X.useEffect)(g,T);let b;e[10]!==a?(b=f(()=>{a.refetch()},"t6"),e[10]=a,e[11]=b):b=e[11],U(b,!l);let J;e:{if(n!==void 0){J=n;break e}let d;e[12]!==r||e[13]!==m?(d=m===void 0?O=>r.cancelScheduledJob(O):void 0,e[12]=r,e[13]=m,e[14]=d):d=e[14],J=d}let y=J,w=i??a.data,$=S??a.error,I;e[15]!==y||e[16]!==a||e[17]!==l?(I=f(async d=>{if(y!==void 0){C(void 0);try{await y(d),l||a.refetch()}catch(O){C(Y(O))}}},"t8"),e[15]=y,e[16]=a,e[17]=l,e[18]=I):I=e[18];let E=I,L;e[19]!==$?(L=$!==null&&(0,u.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"sj-error",role:"alert",children:$},void 0,!1),e[19]=$,e[20]=L):L=e[20];let N;e[21]!==w?.length||e[22]!==o?(N=w?.length===0&&(0,u.jsxDEV)(R,{description:o("Jobs queued with runAfter / runAt will appear here."),icon:(0,u.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,u.jsxDEV)("circle",{cx:"12",cy:"12",r:"9"},void 0,!1),(0,u.jsxDEV)("path",{d:"M12 7.5V12l4 2"},void 0,!1)]},void 0,!0),testId:"sj-empty",title:o("No scheduled jobs.")},void 0,!1),e[21]=w?.length,e[22]=o,e[23]=N):N=e[23];let B;e[24]!==E||e[25]!==y||e[26]!==w||e[27]!==o?(B=w!==void 0&&w.length>0&&(0,u.jsxDEV)(A,{className:"overflow-hidden py-0",children:(0,u.jsxDEV)(D,{className:"px-0",children:(0,u.jsxDEV)(W,{"data-testid":"sj-table",children:[(0,u.jsxDEV)(H,{children:(0,u.jsxDEV)(F,{children:[(0,u.jsxDEV)(p,{children:o("function")},void 0,!1),(0,u.jsxDEV)(p,{children:o("scheduled for")},void 0,!1),(0,u.jsxDEV)(p,{children:o("pool")},void 0,!1),(0,u.jsxDEV)(p,{children:o("attempts")},void 0,!1),(0,u.jsxDEV)(p,{children:o("shard")},void 0,!1),(0,u.jsxDEV)(p,{children:o("id")},void 0,!1),y!==void 0&&(0,u.jsxDEV)(p,{"aria-label":o("Actions")},void 0,!1)]},void 0,!0)},void 0,!1),(0,u.jsxDEV)(K,{children:w.map(d=>(0,u.jsxDEV)(F,{"data-testid":`sj-row-${d.id}`,children:[(0,u.jsxDEV)(x,{className:"font-mono text-xs",children:d.functionPath},void 0,!1),(0,u.jsxDEV)(x,{className:"text-muted-foreground tabular-nums",children:ce(d.scheduledFor)},void 0,!1),(0,u.jsxDEV)(x,{className:"font-mono text-xs",children:d.pool??""},void 0,!1),(0,u.jsxDEV)(x,{className:"tabular-nums",children:d.attempts??0},void 0,!1),(0,u.jsxDEV)(x,{children:d.shardKey??""},void 0,!1),(0,u.jsxDEV)(x,{className:"font-mono text-xs",children:d.id},void 0,!1),y!==void 0&&(0,u.jsxDEV)(x,{className:"text-right",children:(0,u.jsxDEV)(G,{confirmLabel:o("Cancel job?"),onConfirm:f(()=>{V(E(d.id))},"onConfirm"),testId:`sj-cancel-${d.id}`,children:o("Cancel")},void 0,!1)},void 0,!1)]},d.id,!0))},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1),e[24]=E,e[25]=y,e[26]=w,e[27]=o,e[28]=B):B=e[28];let _;return e[29]!==N||e[30]!==B||e[31]!==L?(_=(0,u.jsxDEV)("div",{className:"flex flex-col gap-3","data-testid":"lunora-scheduled-jobs",children:[L,N,B]},void 0,!0),e[29]=N,e[30]=B,e[31]=L,e[32]=_):_=e[32],_},"ScheduledJobs");var fe={kind:"idle"},ue=f(({loadCronJobs:s,runCronJob:e}={})=>{let c=P(),n=q(),[m,r]=(0,z.useState)({}),o=Q(["lunora-cron-jobs",s?"custom":"default"],()=>(s??(()=>c.getCronJobs()))()),{data:l,error:k}=o,v=(0,z.useMemo)(()=>e!==void 0?e:s===void 0?i=>c.runCronJob(i):void 0,[c,s,e]),a=f(async i=>{if(v!==void 0){r(h=>({...h,[i]:{kind:"running"}}));try{await v(i),r(h=>({...h,[i]:{kind:"ok"}})),o.refetch()}catch(h){r(S=>({...S,[i]:{kind:"error",message:Y(h)}}))}}},"run");return(0,t.jsxDEV)("div",{className:"flex flex-col gap-3","data-testid":"lunora-cron-triggers",children:[k!==null&&(0,t.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"cron-error",role:"alert",children:k},void 0,!1),l?.length===0&&(0,t.jsxDEV)(R,{description:n("Triggers declared with the cronJobs() builder appear here."),icon:(0,t.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,t.jsxDEV)("circle",{cx:"12",cy:"12",r:"9"},void 0,!1),(0,t.jsxDEV)("path",{d:"M12 7.5V12l4 2"},void 0,!1)]},void 0,!0),testId:"cron-empty",title:n("No cron triggers.")},void 0,!1),l!==void 0&&l.length>0&&(0,t.jsxDEV)(A,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(D,{className:"px-0",children:(0,t.jsxDEV)(W,{"data-testid":"cron-table",children:[(0,t.jsxDEV)(H,{children:(0,t.jsxDEV)(F,{children:[(0,t.jsxDEV)(p,{children:n("name")},void 0,!1),(0,t.jsxDEV)(p,{children:n("schedule")},void 0,!1),(0,t.jsxDEV)(p,{children:n("target")},void 0,!1),(0,t.jsxDEV)(p,{children:n("shard")},void 0,!1),v!==void 0&&(0,t.jsxDEV)(p,{"aria-label":n("Actions")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(K,{children:l.map(i=>{let h=m[i.name]??fe;return(0,t.jsxDEV)(F,{"data-testid":`cron-row-${i.name}`,children:[(0,t.jsxDEV)(x,{children:i.name},void 0,!1),(0,t.jsxDEV)(x,{className:"font-mono text-xs tabular-nums",children:i.cron},void 0,!1),(0,t.jsxDEV)(x,{children:(0,t.jsxDEV)("span",{className:"flex items-center gap-2",children:[i.workflow===void 0?(0,t.jsxDEV)(ee,{variant:"outline",children:n("function")},void 0,!1):(0,t.jsxDEV)(ee,{variant:"secondary",children:n("workflow")},void 0,!1),(0,t.jsxDEV)("span",{className:"font-mono text-xs",children:i.workflow??i.functionPath},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(x,{children:i.shardKey??""},void 0,!1),v!==void 0&&(0,t.jsxDEV)(x,{className:"text-right",children:(0,t.jsxDEV)("span",{className:"flex items-center justify-end gap-2",children:[h.kind==="ok"&&(0,t.jsxDEV)("span",{className:"text-xs text-muted-foreground","data-testid":`cron-ran-${i.name}`,children:n("ran")},void 0,!1),h.kind==="error"&&(0,t.jsxDEV)("span",{className:"text-xs text-destructive","data-testid":`cron-run-error-${i.name}`,role:"alert",children:h.message},void 0,!1),(0,t.jsxDEV)(G,{confirmLabel:n("Run now?"),disabled:h.kind==="running",onConfirm:f(()=>{V(a(i.name))},"onConfirm"),testId:`cron-run-${i.name}`,children:h.kind==="running"?n("Running\u2026"):n("Run now")},void 0,!1)]},void 0,!0)},void 0,!1)]},`${i.cron}:${i.name}`,!0)})},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1)]},void 0,!0)},"CronTriggersPanel"),he=f(s=>Number.isFinite(s)?j(s,"\u2014"):"\u2014","formatScheduledFor"),ve=f(s=>{let e=(0,Z.c)(34),c;e[0]!==s?(c=s===void 0?{}:s,e[0]=s,e[1]=c):c=e[1];let{loadJobs:n,removeJob:m,retryJob:r}=c,o=P(),l=q(),k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=["lunora-dead-jobs"],e[2]=k):k=e[2];let v;e[3]!==o||e[4]!==n?(v=f(async()=>(await(n??(()=>o.listDeadJobs()))()).toSorted(me),"t3"),e[3]=o,e[4]=n,e[5]=v):v=e[5];let a=Q(k,v),i=a.data,[h,S]=(0,z.useState)(void 0),C=a.error??h,g=n===void 0,T;e[6]!==o||e[7]!==g||e[8]!==r?(T=r??(g?d=>o.retryDeadJob(d):void 0),e[6]=o,e[7]=g,e[8]=r,e[9]=T):T=e[9];let b=T,J;e[10]!==o||e[11]!==g||e[12]!==m?(J=m??(g?d=>o.removeDeadJob(d):void 0),e[10]=o,e[11]=g,e[12]=m,e[13]=J):J=e[13];let y=J,w;e[14]!==a?(w=f(()=>{a.refetch()},"t6"),e[14]=a,e[15]=w):w=e[15],U(w,!0);let $;e[16]!==a?($=f(async d=>{S(void 0);try{await d,a.refetch()}catch(O){S(Y(O))}},"t7"),e[16]=a,e[17]=$):$=e[17];let I=$,E=b!==void 0||y!==void 0,L;e[18]!==C?(L=C!==void 0&&(0,t.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"dlq-error",role:"alert",children:C},void 0,!1),e[18]=C,e[19]=L):L=e[19];let N;e[20]!==i?.length||e[21]!==l?(N=i?.length===0&&(0,t.jsxDEV)(R,{description:l("Jobs that exhaust their retry budget are parked here instead of being dropped."),icon:(0,t.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsxDEV)("path",{d:"M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14"},void 0,!1)},void 0,!1),testId:"dlq-empty",title:l("No dead-letter jobs.")},void 0,!1),e[20]=i?.length,e[21]=l,e[22]=N):N=e[22];let B;e[23]!==I||e[24]!==E||e[25]!==i||e[26]!==y||e[27]!==b||e[28]!==l?(B=i!==void 0&&i.length>0&&(0,t.jsxDEV)(A,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(D,{className:"px-0",children:(0,t.jsxDEV)(W,{"data-testid":"dlq-table",children:[(0,t.jsxDEV)(H,{children:(0,t.jsxDEV)(F,{children:[(0,t.jsxDEV)(p,{children:l("function")},void 0,!1),(0,t.jsxDEV)(p,{children:l("attempts")},void 0,!1),(0,t.jsxDEV)(p,{children:l("last tried")},void 0,!1),(0,t.jsxDEV)(p,{children:l("pool")},void 0,!1),(0,t.jsxDEV)(p,{children:l("shard")},void 0,!1),(0,t.jsxDEV)(p,{children:l("id")},void 0,!1),E&&(0,t.jsxDEV)(p,{"aria-label":l("Actions")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(K,{children:i.map(d=>(0,t.jsxDEV)(F,{"data-testid":`dlq-row-${d.id}`,children:[(0,t.jsxDEV)(x,{className:"font-mono text-xs",children:d.functionPath},void 0,!1),(0,t.jsxDEV)(x,{className:"tabular-nums",children:d.attempts??0},void 0,!1),(0,t.jsxDEV)(x,{className:"text-muted-foreground tabular-nums",children:he(d.scheduledFor)},void 0,!1),(0,t.jsxDEV)(x,{className:"font-mono text-xs",children:d.pool??""},void 0,!1),(0,t.jsxDEV)(x,{children:d.shardKey??""},void 0,!1),(0,t.jsxDEV)(x,{className:"font-mono text-xs",children:d.id},void 0,!1),E&&(0,t.jsxDEV)(x,{className:"text-right",children:(0,t.jsxDEV)("div",{className:"flex justify-end gap-1.5",children:[b!==void 0&&(0,t.jsxDEV)(te,{"data-testid":`dlq-retry-${d.id}`,onClick:f(()=>{V(I(b(d.id)))},"onClick"),size:"sm",type:"button",variant:"outline",children:l("Retry")},void 0,!1),y!==void 0&&(0,t.jsxDEV)(G,{confirmLabel:l("Drop job?"),onConfirm:f(()=>{V(I(y(d.id)))},"onConfirm"),testId:`dlq-remove-${d.id}`,children:l("Drop")},void 0,!1)]},void 0,!0)},void 0,!1)]},d.id,!0))},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1),e[23]=I,e[24]=E,e[25]=i,e[26]=y,e[27]=b,e[28]=l,e[29]=B):B=e[29];let _;return e[30]!==B||e[31]!==L||e[32]!==N?(_=(0,t.jsxDEV)("div",{className:"flex flex-col gap-3","data-testid":"lunora-dead-letter",children:[L,N,B]},void 0,!0),e[30]=B,e[31]=L,e[32]=N,e[33]=_):_=e[33],_},"DeadLetterJobs");function me(s,e){return(e.attempts??0)-(s.attempts??0)}f(me,"_temp$1");var le=f(s=>{let e=(0,Z.c)(8),{label:c,testId:n,value:m}=s,r;e[0]!==c?(r=(0,t.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:c},void 0,!1),e[0]=c,e[1]=r):r=e[1];let o;e[2]!==n||e[3]!==m?(o=(0,t.jsxDEV)("span",{className:"text-2xl font-semibold tabular-nums","data-testid":n,children:m},void 0,!1),e[2]=n,e[3]=m,e[4]=o):o=e[4];let l;return e[5]!==r||e[6]!==o?(l=(0,t.jsxDEV)(A,{className:"flex-1 py-0",children:(0,t.jsxDEV)(D,{className:"flex flex-col gap-1 p-4",children:[r,o]},void 0,!0)},void 0,!1),e[5]=r,e[6]=o,e[7]=l):l=e[7],l},"StatTile"),pe=f(s=>{let e=(0,Z.c)(25),c;e[0]!==s?(c=s===void 0?{}:s,e[0]=s,e[1]=c):c=e[1];let{loadStatus:n}=c,m=P(),r=q(),o=n===void 0,l;e[2]!==o?(l=["lunora-scheduler-status",o],e[2]=o,e[3]=l):l=e[3];let k;e[4]!==m||e[5]!==n?(k=f(async()=>{let J=await(n??(()=>m.schedulerStatus()))();return{...J,pools:J.pools.toSorted(xe)}},"t4"),e[4]=m,e[5]=n,e[6]=k):k=e[6];let v=Q(l,k),{data:a,error:i}=v,h;e[7]!==v?(h=f(()=>{v.refetch()},"t5"),e[7]=v,e[8]=h):h=e[8],U(h,!0);let S;e[9]!==i?(S=i!==null&&(0,t.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"pools-error",role:"alert",children:i},void 0,!1),e[9]=i,e[10]=S):S=e[10];let C;e[11]!==a||e[12]!==r?(C=a!==void 0&&(0,t.jsxDEV)("div",{className:"flex gap-3","data-testid":"pools-totals",children:[(0,t.jsxDEV)(le,{label:r("backlog"),testId:"pools-backlog",value:a.backlog},void 0,!1),(0,t.jsxDEV)(le,{label:r("in flight"),testId:"pools-inflight",value:a.inFlight},void 0,!1),(0,t.jsxDEV)(le,{label:r("pools"),testId:"pools-count",value:a.pools.length},void 0,!1)]},void 0,!0),e[11]=a,e[12]=r,e[13]=C):C=e[13];let g;e[14]!==a?.pools.length||e[15]!==r?(g=a?.pools.length===0&&(0,t.jsxDEV)(R,{description:r("Pools created with createWorkpool appear here once they have activity."),icon:(0,t.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsxDEV)("path",{d:"M4 7h16M4 12h16M4 17h16"},void 0,!1)},void 0,!1),testId:"pools-empty",title:r("No workpools.")},void 0,!1),e[14]=a?.pools.length,e[15]=r,e[16]=g):g=e[16];let T;e[17]!==a||e[18]!==r?(T=a!==void 0&&a.pools.length>0&&(0,t.jsxDEV)(A,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(D,{className:"px-0",children:(0,t.jsxDEV)(W,{"data-testid":"pools-table",children:[(0,t.jsxDEV)(H,{children:(0,t.jsxDEV)(F,{children:[(0,t.jsxDEV)(p,{children:r("pool")},void 0,!1),(0,t.jsxDEV)(p,{children:r("queued")},void 0,!1),(0,t.jsxDEV)(p,{children:r("in flight")},void 0,!1),(0,t.jsxDEV)(p,{children:r("max concurrency")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(K,{children:a.pools.map(ge)},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1),e[17]=a,e[18]=r,e[19]=T):T=e[19];let b;return e[20]!==S||e[21]!==C||e[22]!==g||e[23]!==T?(b=(0,t.jsxDEV)("div",{className:"flex flex-col gap-3","data-testid":"lunora-scheduler-pools",children:[S,C,g,T]},void 0,!0),e[20]=S,e[21]=C,e[22]=g,e[23]=T,e[24]=b):b=e[24],b},"SchedulerPoolsPanel");function xe(s,e){return e.queued-s.queued}f(xe,"_temp");function ge(s){return(0,t.jsxDEV)(F,{"data-testid":`pools-row-${s.name}`,children:[(0,t.jsxDEV)(x,{className:"font-mono text-xs",children:s.name},void 0,!1),(0,t.jsxDEV)(x,{className:"tabular-nums",children:s.queued},void 0,!1),(0,t.jsxDEV)(x,{className:"tabular-nums",children:[s.inFlight," / ",s.maxConcurrency]},void 0,!0),(0,t.jsxDEV)(x,{className:"tabular-nums",children:s.maxConcurrency},void 0,!1)]},s.name,!0)}f(ge,"_temp2");var be=["jobs","dead","pools","cron"],We=f(s=>{let e=(0,Z.c)(41),c;e[0]!==s?(c=s===void 0?{}:s,e[0]=s,e[1]=c):c=e[1];let{loadCronJobs:n,scheduledCancel:m,scheduledLoad:r}=c,o=q(),[l,k]=(0,z.useState)("jobs"),v;e[2]!==o?(v=o("Cron triggers"),e[2]=o,e[3]=v):v=e[3];let a;e[4]!==o?(a=o("Dead letter"),e[4]=o,e[5]=a):a=e[5];let i;e[6]!==o?(i=o("Scheduled jobs"),e[6]=o,e[7]=i):i=e[7];let h;e[8]!==o?(h=o("Pools"),e[8]=o,e[9]=h):h=e[9];let S;e[10]!==v||e[11]!==a||e[12]!==i||e[13]!==h?(S={cron:v,dead:a,jobs:i,pools:h},e[10]=v,e[11]=a,e[12]=i,e[13]=h,e[14]=S):S=e[14];let C=S,g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=f(N=>{k(N.currentTarget.dataset.view)},"t7"),e[15]=g):g=e[15];let T=g,b;e[16]!==o?(b=o("Schedule view"),e[16]=o,e[17]=b):b=e[17];let J;e[18]!==l||e[19]!==C?(J=be.map(N=>(0,t.jsxDEV)(te,{"aria-selected":l===N,"data-testid":`schedule-view-${N}`,"data-view":N,onClick:T,role:"tab",size:"sm",type:"button",variant:l===N?"default":"outline",children:C[N]},N,!1)),e[18]=l,e[19]=C,e[20]=J):J=e[20];let y;e[21]!==b||e[22]!==J?(y=(0,t.jsxDEV)("div",{"aria-label":b,className:"flex gap-1.5","data-testid":"schedule-view-toggle",role:"tablist",children:J},void 0,!1),e[21]=b,e[22]=J,e[23]=y):y=e[23];let w;e[24]!==m||e[25]!==r||e[26]!==l?(w=l==="jobs"&&(0,t.jsxDEV)(de,{cancelJob:m,loadJobs:r},void 0,!1),e[24]=m,e[25]=r,e[26]=l,e[27]=w):w=e[27];let $;e[28]!==l?($=l==="dead"&&(0,t.jsxDEV)(ve,{},void 0,!1),e[28]=l,e[29]=$):$=e[29];let I;e[30]!==l?(I=l==="pools"&&(0,t.jsxDEV)(pe,{},void 0,!1),e[30]=l,e[31]=I):I=e[31];let E;e[32]!==n||e[33]!==l?(E=l==="cron"&&(0,t.jsxDEV)(ue,{loadCronJobs:n},void 0,!1),e[32]=n,e[33]=l,e[34]=E):E=e[34];let L;return e[35]!==y||e[36]!==w||e[37]!==$||e[38]!==I||e[39]!==E?(L=(0,t.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"lunora-schedule",children:[y,w,$,I,E]},void 0,!0),e[35]=y,e[36]=w,e[37]=$,e[38]=I,e[39]=E,e[40]=L):L=e[40],L},"SchedulePanel");export{We as SchedulePanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-RRCPZMC2.js";var u={highErrorRate:.05,highWriteContention:.1,lowCacheHitRate:.5,minCacheSamples:10,minConflictCalls:5,minErrorCalls:5,slowFunctionMs:1e3},t={error:0,info:2,warning:1},f=a((i,s)=>{let e=[];if(i.maxDurationMs>=s.slowFunctionMs){let n=i.scannedTables??[];n.length>0?e.push({fn:i.path,kind:"missing-index",severity:"warning",tables:n.map(o=>o.table),value:i.maxDurationMs}):e.push({fn:i.path,kind:"slow-function",severity:"info",value:i.maxDurationMs})}i.calls>=s.minErrorCalls&&i.errors/i.calls>=s.highErrorRate&&e.push({fn:i.path,kind:"high-error-rate",message:i.lastErrorMessage??void 0,severity:"error",value:i.errors/i.calls});let r=i.conflicts??0;return r>0&&i.calls>=s.minConflictCalls&&r/i.calls>=s.highWriteContention&&e.push({fn:i.path,kind:"high-write-contention",severity:"warning",value:r/i.calls}),e},"deriveFunctionInsights"),g=a((i,s,e=u)=>{let r=[];if(i?.cache){let{evictions:n,hits:o,misses:h}=i.cache,c=o+h;if(c>=e.minCacheSamples){let l=o/c;l<e.lowCacheHitRate&&r.push({kind:"low-cache-hit-rate",severity:"warning",value:l})}n>0&&n>o&&r.push({kind:"high-evictions",severity:"warning",value:n})}for(let n of s??[])r.push(...f(n,e));return r.toSorted((n,o)=>t[n.severity]-t[o.severity])},"deriveInsights");export{g as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as d,e as h,g as N,h as E,j as k}from"./chunk-RRCPZMC2.js";var y=h(N(),1);var v=h(E(),1);var I={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"},T={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(A=>{let e=(0,y.c)(18),{className:n,children:c,label:f,onClose:l,panelTestId:b,testId:g,variant:u}=A,r;e[0]!==l?(r=d(i=>{i.target===i.currentTarget&&l()},"t1"),e[0]=l,e[1]=r):r=e[1];let m=r,a;e[2]!==l?(a=d(i=>{i.key==="Escape"&&l()},"t2"),e[2]=l,e[3]=a):a=e[3];let p=a,x=I[u],w=T[u],o;e[4]!==n||e[5]!==w?(o=k(w,n),e[4]=n,e[5]=w,e[6]=o):o=e[6];let t;e[7]!==c||e[8]!==f||e[9]!==b||e[10]!==o?(t=(0,v.jsxDEV)("div",{"aria-label":f,className:o,"data-testid":b,role:"dialog",children:c},void 0,!1),e[7]=c,e[8]=f,e[9]=b,e[10]=o,e[11]=t):t=e[11];let s;return e[12]!==m||e[13]!==p||e[14]!==x||e[15]!==t||e[16]!==g?(s=(0,v.jsxDEV)("div",{className:x,"data-testid":g,onClick:m,onKeyDown:p,role:"presentation",children:t},void 0,!1),e[12]=m,e[13]=p,e[14]=x,e[15]=t,e[16]=g,e[17]=s):s=e[17],s},"ModalShell");export{_ as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as N,l as x}from"./chunk-HBGS4SEX.js";import{a as m,e as w,g as y,h as C}from"./chunk-RRCPZMC2.js";var v=w(y(),1);var o=w(C(),1);var T=m(b=>{let e=(0,v.c)(8),{value:l}=b;if(l==null){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,o.jsxDEV)("span",{className:"text-muted-foreground/50 italic",children:"NULL"},void 0,!1),e[0]=a):a=e[0],a}let t;e[1]!==l?(t=x(l),e[1]=l,e[2]=t):t=e[2];let r;e[3]!==l?(r=x(l),e[3]=l,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=(0,o.jsxDEV)("span",{title:t,children:r},void 0,!1),e[5]=t,e[6]=r,e[7]=s):s=e[7],s},"CellValue"),G=m(b=>{let e=(0,v.c)(22),{columns:l,rows:t}=b,r=N(),s;e[0]!==r?(s=r("Field"),e[0]=r,e[1]=s):s=e[1];let a;e[2]!==s?(a=(0,o.jsxDEV)("th",{className:"border-b border-e border-border px-3 py-1.5 text-start font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:s},void 0,!1),e[2]=s,e[3]=a):a=e[3];let i;if(e[4]!==t||e[5]!==r){let d;e[7]!==r?(d=m((u,h)=>(0,o.jsxDEV)("th",{className:"border-b border-border px-3 py-1.5 text-start font-mono text-[11px] tracking-wide uppercase tabular-nums text-muted-foreground",children:r("Row {n}",{n:h+1})},h,!1),"t42"),e[7]=r,e[8]=d):d=e[8],i=t.map(d),e[4]=t,e[5]=r,e[6]=i}else i=e[6];let n;e[9]!==a||e[10]!==i?(n=(0,o.jsxDEV)("thead",{className:"sticky top-0 z-10 bg-muted",children:(0,o.jsxDEV)("tr",{children:[a,i]},void 0,!0)},void 0,!1),e[9]=a,e[10]=i,e[11]=n):n=e[11];let f;if(e[12]!==l||e[13]!==t){let d;e[15]!==t?(d=m(u=>(0,o.jsxDEV)("tr",{className:"hover:bg-muted/40",children:[(0,o.jsxDEV)("th",{className:"border-b border-e border-border px-3 py-1.5 text-start font-mono font-medium whitespace-nowrap",scope:"row",children:u},void 0,!1),t.map((h,g)=>(0,o.jsxDEV)("td",{className:"max-w-md truncate border-b border-border px-3 py-1.5 font-mono",children:(0,o.jsxDEV)(T,{value:h[u]},void 0,!1)},g,!1))]},u,!0),"t62"),e[15]=t,e[16]=d):d=e[16],f=l.map(d),e[12]=l,e[13]=t,e[14]=f}else f=e[14];let c;e[17]!==f?(c=(0,o.jsxDEV)("tbody",{children:f},void 0,!1),e[17]=f,e[18]=c):c=e[18];let p;return e[19]!==n||e[20]!==c?(p=(0,o.jsxDEV)("div",{className:"min-h-0 flex-1 overflow-auto","data-testid":"db-transposed",children:(0,o.jsxDEV)("table",{className:"border-collapse text-xs",children:[n,c]},void 0,!0)},void 0,!1),e[19]=n,e[20]=c,e[21]=p):p=e[21],p},"TransposedTable"),L=m(({children:b,layout:e="card",testId:l})=>(0,o.jsxDEV)("div",{className:e==="fill"?"flex min-h-0 flex-1 flex-col overflow-hidden border-t border-border":"overflow-x-auto border border-border bg-card","data-testid":l,children:b},void 0,!1),"GridContainer");export{T as a,G as b,L as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as y}from"./chunk-VL23Y44O.js";import{a as C,c as M,e as P}from"./chunk-O3NAGRTR.js";import{c as _}from"./chunk-CKSHCYGC.js";import{a as z}from"./chunk-3OA7PECS.js";import{a as o,e as L,f as T}from"./chunk-RRCPZMC2.js";var O=L(T(),1);var w=L(T(),1);var D=w.createContext({register:o(()=>{},"register"),unregister:o(()=>{},"unregister"),subscribeMapChange:o(()=>()=>{},"subscribeMapChange"),elementsRef:{current:[]},nextIndexRef:{current:0}});D.displayName="CompositeListContext";function F(){return w.useContext(D)}o(F,"useCompositeListContext");var W=(function(t){return t[t.None=0]="None",t[t.GuessFromOrder=1]="GuessFromOrder",t})({});function V(t={}){let{label:n,metadata:r,textRef:s,indexGuessBehavior:N,index:m}=t,{register:x,unregister:p,subscribeMapChange:f,elementsRef:d,labelsRef:h,nextIndexRef:c}=F(),g=O.useRef(-1),[a,i]=O.useState(m??(N===W.GuessFromOrder?()=>{if(g.current===-1){let e=c.current;c.current+=1,g.current=e}return g.current}:-1)),E=O.useRef(null),S=O.useCallback(e=>{if(E.current=e,a!==-1&&e!==null&&(d.current[a]=e,h)){let l=n!==void 0;h.current[a]=l?n:s?.current?.textContent??e.textContent}},[a,d,h,n,s]);return C(()=>{if(m!=null)return;let e=E.current;if(e)return x(e,r),()=>{p(e)}},[m,x,p,r]),C(()=>{if(m==null)return f(e=>{let l=E.current?e.get(E.current)?.index:null;l!=null&&i(l)})},[m,f,i]),{ref:S,index:a}}o(V,"useCompositeListItem");var b=L(T(),1);var v=L(z(),1);function Z(t){let{children:n,elementsRef:r,labelsRef:s,onMapChange:N}=t,m=M(N),x=b.useRef(0),p=_(U).current,f=_(k).current,[d,h]=b.useState(0),c=b.useRef(d),g=M((e,l)=>{f.set(e,l??null),c.current+=1,h(c.current)}),a=M(e=>{f.delete(e),c.current+=1,h(c.current)}),i=b.useMemo(()=>{let e=new Map;return Array.from(f.keys()).filter(u=>u.isConnected).sort(A).forEach((u,I)=>{let R=f.get(u)??{};e.set(u,{...R,index:I})}),e},[f,d]);C(()=>{if(typeof MutationObserver!="function"||i.size===0)return;let e=new MutationObserver(l=>{let u=new Set,I=o(R=>u.has(R)?u.delete(R):u.add(R),"updateDiff");l.forEach(R=>{R.removedNodes.forEach(I),R.addedNodes.forEach(I)}),u.size===0&&(c.current+=1,h(c.current))});return i.forEach((l,u)=>{u.parentElement&&e.observe(u.parentElement,{childList:!0})}),()=>{e.disconnect()}},[i]),C(()=>{c.current===d&&(r.current.length!==i.size&&(r.current.length=i.size),s&&s.current.length!==i.size&&(s.current.length=i.size),x.current=i.size),m(i)},[m,i,r,s,d]),C(()=>()=>{r.current=[]},[r]),C(()=>()=>{s&&(s.current=[])},[s]);let E=M(e=>(p.add(e),()=>{p.delete(e)}));C(()=>{p.forEach(e=>e(i))},[p,i]);let S=b.useMemo(()=>({register:g,unregister:a,subscribeMapChange:E,elementsRef:r,labelsRef:s,nextIndexRef:x}),[g,a,E,r,s,x]);return(0,v.jsx)(D.Provider,{value:S,children:n})}o(Z,"CompositeList");function k(){return new Map}o(k,"createMap");function U(){return new Set}o(U,"createListeners");function A(t,n){let r=t.compareDocumentPosition(n);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}o(A,"sortByDocumentPosition");function re(t){let n=t.getBoundingClientRect(),r=P(t);if(y.env.jsdom)return n;let s=r.getComputedStyle(t,"::before"),N=r.getComputedStyle(t,"::after");if(!(s.content!=="none"||N.content!=="none"))return n;let x=parseFloat(s.width)||0,p=parseFloat(s.height)||0,f=parseFloat(N.width)||0,d=parseFloat(N.height)||0,h=Math.max(n.width,x,f),c=Math.max(n.height,p,d),g=h-n.width,a=c-n.height;return{left:n.left-g/2,right:n.right+g/2,top:n.top-a/2,bottom:n.bottom+a/2}}o(re,"getPseudoElementBounds");function ie(t){return t==null||t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true"}o(ie,"isElementDisabled");export{W as a,V as b,Z as c,re as d,ie as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as S}from"./chunk-J6J54MBP.js";import{a as R}from"./chunk-2YTF6LJ6.js";import{a as h}from"./chunk-JSEXCW5Q.js";import{R as y}from"./chunk-VL23Y44O.js";import"./chunk-HV7G6DFP.js";import{c as L}from"./chunk-UK64ZSUW.js";import"./chunk-O3NAGRTR.js";import{b as F}from"./chunk-ZPP2KOR4.js";import"./chunk-CKSHCYGC.js";import{a as w}from"./chunk-TEWVD66F.js";import{f as P}from"./chunk-3LJEGSMK.js";import"./chunk-ZHVTQ37P.js";import"./chunk-3OA7PECS.js";import{d as E,f as N,g as m,h as p,m as u}from"./chunk-HBGS4SEX.js";import"./chunk-LXULVPEM.js";import{a,e as O,f as Q,h as W}from"./chunk-RRCPZMC2.js";var o=O(Q(),1);var e=O(W(),1);var C=N(w.getPitrBookmark),X=N(w.pitrRestore),le=a(({initialShardKey:A})=>{let c=P(),r=E(),i=A??"",[U,v]=(0,o.useState)(null),[n,q]=(0,o.useState)(""),[B,_]=(0,o.useState)(null),[f,K]=(0,o.useState)(""),[x,M]=(0,o.useState)(!1),[s,z]=(0,o.useState)(null),[T,l]=(0,o.useState)(null),[k,d]=(0,o.useState)(!1),b=(0,o.useCallback)(async()=>{d(!0),l(null);try{let t=await c.query(C,{},m(i));v(t.current)}catch(t){l(p(t))}finally{d(!1)}},[c,i]);(0,o.useEffect)(()=>{u(b())},[b]),S(()=>{u((async()=>{try{let t=await c.query(C,{},m(i));v(t.current)}catch{}})())},!0);let D=a(t=>{q(t.target.value)},"onTimeChange"),j=a(t=>{K(t.target.value)},"onBookmarkChange"),G=a(t=>{M(t.target.checked)},"onRestartChange"),V=a(()=>{n.trim()!==""&&u((async()=>{d(!0),l(null);try{let t=await c.query(C,{time:n.trim()},m(i));_(t.forTime??null),v(t.current)}catch(t){_(null),l(p(t))}finally{d(!1)}})())},"onPreview"),I=a(t=>{u((async()=>{d(!0),l(null);try{let g=await c.mutation(X,t,m(i));z(g),await b()}catch(g){l(p(g))}finally{d(!1)}})())},"runRestore"),Z=f.trim()!==""||n.trim()!=="",H=a(()=>{let t=x?{restart:!0}:{};f.trim()===""?t.time=n.trim():t.bookmark=f.trim(),I(t)},"onConfirmRestore"),J=a(()=>{s!==null&&I(x?{bookmark:s.undoBookmark,restart:!0}:{bookmark:s.undoBookmark})},"onUndo");return(0,e.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"lunora-pitr",children:[(0,e.jsxDEV)("div",{className:"flex flex-wrap items-center gap-3",children:(0,e.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:[r("Shard"),": ",(0,e.jsxDEV)("span",{className:"font-mono",children:i===""?r("root"):i},void 0,!1)]},void 0,!0)},void 0,!1),(0,e.jsxDEV)("p",{className:"text-sm text-muted-foreground","data-testid":"pitr-note",children:r("In-place recovery to any moment in the last 30 days. For older or portable recovery, use the snapshot backup tier.")},void 0,!1),T!==null&&(0,e.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"pitr-error",role:"alert",children:T},void 0,!1),(0,e.jsxDEV)("section",{className:"rounded-xl border border-border bg-card p-3 shadow-xs",children:[(0,e.jsxDEV)("h3",{className:"mb-2 text-sm font-semibold",children:r("Current bookmark")},void 0,!1),(0,e.jsxDEV)("p",{className:"font-mono text-xs break-all text-muted-foreground","data-testid":"pitr-current",children:U??(0,e.jsxDEV)("span",{className:"text-muted-foreground",children:"\u2014"},void 0,!1)},void 0,!1)]},void 0,!0),(0,e.jsxDEV)("section",{className:"flex flex-col gap-3 rounded-xl border border-border bg-card p-3 shadow-xs",children:[(0,e.jsxDEV)("h3",{className:"text-sm font-semibold",children:r("Restore")},void 0,!1),(0,e.jsxDEV)("div",{className:"flex flex-col gap-1",children:[(0,e.jsxDEV)(h,{htmlFor:"pitr-time",children:r("Time (ISO or epoch-ms, last 30 days)")},void 0,!1),(0,e.jsxDEV)("div",{className:"flex items-center gap-2",children:[(0,e.jsxDEV)(y,{"data-testid":"pitr-time",id:"pitr-time",onChange:D,placeholder:"2026-06-01T00:00:00.000Z",value:n},void 0,!1),(0,e.jsxDEV)(L,{"data-testid":"pitr-preview",disabled:k||n.trim()==="",onClick:V,size:"sm",type:"button",variant:"outline",children:r("Preview")},void 0,!1)]},void 0,!0),B!==null&&(0,e.jsxDEV)("p",{className:"font-mono text-xs break-all text-muted-foreground","data-testid":"pitr-preview-bookmark",children:[r("Bookmark for that time"),": ",B]},void 0,!0)]},void 0,!0),(0,e.jsxDEV)("div",{className:"flex flex-col gap-1",children:[(0,e.jsxDEV)(h,{htmlFor:"pitr-bookmark",children:r("Or an explicit bookmark (wins over time)")},void 0,!1),(0,e.jsxDEV)(y,{"data-testid":"pitr-bookmark",id:"pitr-bookmark",onChange:j,placeholder:r("bookmark string"),value:f},void 0,!1)]},void 0,!0),(0,e.jsxDEV)(h,{className:"flex items-center gap-2 text-xs font-normal text-muted-foreground",htmlFor:"pitr-restart",children:[(0,e.jsxDEV)("input",{checked:x,className:"size-4 accent-primary","data-testid":"pitr-restart",id:"pitr-restart",onChange:G,type:"checkbox"},void 0,!1),r("Restart the shard now so recovery applies immediately")]},void 0,!0),(0,e.jsxDEV)("div",{children:(0,e.jsxDEV)(R,{confirmLabel:r("Confirm restore"),disabled:k||!Z,onConfirm:H,testId:"pitr-restore",children:r("Restore")},void 0,!1)},void 0,!1)]},void 0,!0),s!==null&&(0,e.jsxDEV)("section",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card p-3 shadow-xs","data-testid":"pitr-result",children:[(0,e.jsxDEV)("div",{className:"flex items-center gap-2",children:[(0,e.jsxDEV)("h3",{className:"text-sm font-semibold",children:r("Restore armed")},void 0,!1),(0,e.jsxDEV)(F,{variant:s.restarted?"destructive":"secondary",children:s.restarted?r("restarted now"):r("on next restart")},void 0,!1)]},void 0,!0),(0,e.jsxDEV)("p",{className:"font-mono text-xs break-all text-muted-foreground",children:[r("Restored to"),": ",s.restoredTo]},void 0,!0),(0,e.jsxDEV)("p",{className:"font-mono text-xs break-all text-muted-foreground","data-testid":"pitr-undo-bookmark",children:[r("Undo bookmark"),": ",s.undoBookmark]},void 0,!0),(0,e.jsxDEV)("div",{children:(0,e.jsxDEV)(R,{confirmLabel:r("Confirm undo"),disabled:k,onConfirm:J,testId:"pitr-undo",children:r("Undo restore")},void 0,!1)},void 0,!1)]},void 0,!0)]},void 0,!0)},"PitrPanel");export{le as PitrPanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as D}from"./chunk-WMDH2CIZ.js";import{a as k,b as j}from"./chunk-VXM5H542.js";import{a as O}from"./chunk-2K47A3P6.js";import{a as V}from"./chunk-F7GE4X2U.js";import"./chunk-XNJNSCLM.js";import{b as A}from"./chunk-RD5UG2YL.js";import{a as _,b as z,c as B,d as f,e as l,f as n}from"./chunk-GTM65MVX.js";import{a as y,e as E}from"./chunk-Y572GMZE.js";import{a as M}from"./chunk-F2YMCQ6B.js";import"./chunk-4PC7IXNY.js";import"./chunk-2MLA6WFH.js";import{R as L}from"./chunk-VL23Y44O.js";import"./chunk-HV7G6DFP.js";import"./chunk-O3NAGRTR.js";import{b as T}from"./chunk-ZPP2KOR4.js";import"./chunk-CKSHCYGC.js";import{a as H}from"./chunk-TEWVD66F.js";import"./chunk-3LJEGSMK.js";import"./chunk-ZHVTQ37P.js";import"./chunk-3OA7PECS.js";import{a as I}from"./chunk-TAD43CG5.js";import{d as C,q as R}from"./chunk-HBGS4SEX.js";import"./chunk-LXULVPEM.js";import{a as i,e as w,f as ee,h as te}from"./chunk-RRCPZMC2.js";var o=w(ee(),1);var e=w(te(),1);var K=80,ae=i(s=>{if(s===void 0)return"";let t=JSON.stringify(s);return t.length>K?`${t.slice(0,K)}\u2026`:t},"formatDetail"),re=41,F=480,U=5,oe=i((s,t)=>k(s,d=>{t(d.height>0?d:{height:F,width:d.width})}),"observeViewportRect"),Se=i(({initialShardKey:s})=>{let t=C(),[d,G]=(0,o.useState)(s??""),[m,W]=(0,o.useState)(""),q=O(d.trim(),400),{data:v,error:p,errorSource:J,isLoading:P,liveError:Q}=A(H.getAuditLog,{},{live:!0,shardKey:q}),u=(0,o.useMemo)(()=>v?.entries??[],[v]),c=(0,o.useMemo)(()=>{let r=m.trim().toLowerCase();return r===""?u:u.filter(a=>a.op.toLowerCase().includes(r)||(a.table??"").toLowerCase().includes(r)||(a.id??"").toLowerCase().includes(r))},[u,m]),g=(0,o.useRef)(null),x=j({count:c.length,estimateSize:i(()=>re,"estimateSize"),getScrollElement:i(()=>g.current,"getScrollElement"),initialRect:{height:F,width:800},observeElementRect:oe,overscan:8}),h=x.getVirtualItems(),X=x.getTotalSize(),S=h[0]?.start??0,b=X-(h.at(-1)?.end??0),Z={height:S},$={height:b},Y=i(r=>{W(r.target.value)},"onSearchChange");return(0,e.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"lunora-audit",children:[(0,e.jsxDEV)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsxDEV)(M,{onChange:G,testId:"au-shard-input",value:d},void 0,!1),(0,e.jsxDEV)(D,{message:Q,prefix:"au"},void 0,!1),(0,e.jsxDEV)(L,{"aria-label":t("Filter audit log"),className:"h-8 w-48","data-testid":"au-search",onChange:Y,placeholder:t("filter op, table, id"),value:m},void 0,!1)]},void 0,!0),p!==null&&(0,e.jsxDEV)(V,{error:J,testId:"au-error"},void 0,!1),p===null&&!P&&c.length===0&&(0,e.jsxDEV)(I,{description:t("State-changing admin operations are recorded here."),icon:(0,e.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,e.jsxDEV)("path",{d:"M8 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-2M9 3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V3Zm-1 9h8m-8 4h5"},void 0,!1)},void 0,!1),testId:"au-empty",title:t("No audit entries.")},void 0,!1),c.length>0&&(0,e.jsxDEV)(y,{className:"overflow-hidden py-0",children:(0,e.jsxDEV)(E,{className:"max-h-[30rem] overflow-auto px-0",ref:g,children:(0,e.jsxDEV)(_,{"data-testid":"au-table",children:[(0,e.jsxDEV)(z,{children:(0,e.jsxDEV)(f,{children:[(0,e.jsxDEV)(l,{children:t("time")},void 0,!1),(0,e.jsxDEV)(l,{children:t("op")},void 0,!1),(0,e.jsxDEV)(l,{children:t("table")},void 0,!1),(0,e.jsxDEV)(l,{children:t("id")},void 0,!1),(0,e.jsxDEV)(l,{children:t("detail")},void 0,!1)]},void 0,!0)},void 0,!1),(0,e.jsxDEV)(B,{children:[S>0&&(0,e.jsxDEV)("tr",{"aria-hidden":"true",children:(0,e.jsxDEV)("td",{colSpan:U,style:Z},void 0,!1)},void 0,!1),h.map(r=>{let a=c[r.index],N=ae(a.detail);return(0,e.jsxDEV)(f,{"data-testid":"au-row",children:[(0,e.jsxDEV)(n,{className:"text-muted-foreground tabular-nums",children:R(a.ts,"\u2014")},void 0,!1),(0,e.jsxDEV)(n,{children:(0,e.jsxDEV)(T,{variant:"secondary",children:a.op},void 0,!1)},void 0,!1),(0,e.jsxDEV)(n,{className:"font-medium",children:a.table??(0,e.jsxDEV)("span",{className:"text-muted-foreground",children:"\u2014"},void 0,!1)},void 0,!1),(0,e.jsxDEV)(n,{className:"max-w-[20ch] truncate font-mono text-xs",children:a.id??(0,e.jsxDEV)("span",{className:"text-muted-foreground",children:"\u2014"},void 0,!1)},void 0,!1),(0,e.jsxDEV)(n,{className:"max-w-[32ch] truncate font-mono text-xs text-muted-foreground",title:N||void 0,children:N||(0,e.jsxDEV)("span",{className:"text-muted-foreground",children:"\u2014"},void 0,!1)},void 0,!1)]},a.seq,!0)}),b>0&&(0,e.jsxDEV)("tr",{"aria-hidden":"true",children:(0,e.jsxDEV)("td",{colSpan:U,style:$},void 0,!1)},void 0,!1)]},void 0,!0)]},void 0,!0)},void 0,!1)},void 0,!1)]},void 0,!0)},"AuditPanel");export{Se as AuditPanel};
|