@lunora/studio 1.0.0-alpha.349 → 1.0.0-alpha.350
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/README.md +3 -3
- package/dist/index.d.mts +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.mjs +1 -1
- package/dist/mount.d.mts +3 -2
- package/dist/mount.d.ts +3 -2
- package/dist/mount.mjs +1 -1
- package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -1
- package/dist/packem_chunks/ApiTab.mjs +1 -1
- package/dist/packem_chunks/AuditPanel.mjs +1 -1
- package/dist/packem_chunks/DeploymentHealthPanel.mjs +1 -1
- package/dist/packem_chunks/ExportImportPanel.mjs +5 -5
- package/dist/packem_chunks/FileBrowser.mjs +3 -3
- package/dist/packem_chunks/FunctionRunner.mjs +1 -1
- package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -1
- package/dist/packem_chunks/HealthPanel.mjs +1 -1
- package/dist/packem_chunks/InsightsPanel.mjs +1 -1
- package/dist/packem_chunks/LogsPanel.mjs +1 -1
- package/dist/packem_chunks/MailPanel.mjs +1 -1
- package/dist/packem_chunks/MetricsPanel.mjs +1 -1
- package/dist/packem_chunks/NotificationsPanel.mjs +1 -1
- package/dist/packem_chunks/PitrPanel.mjs +1 -1
- package/dist/packem_chunks/SchemaViewer.mjs +1 -1
- package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -1
- package/dist/packem_chunks/SettingsPanel.mjs +1 -1
- package/dist/packem_chunks/SqlEditorPanel.mjs +7 -7
- package/dist/packem_chunks/TableEditor.mjs +1 -1
- package/dist/packem_chunks/agents-panel.mjs +1 -1
- package/dist/packem_chunks/ai-usage-panel.mjs +1 -1
- package/dist/packem_chunks/analytics-panel.mjs +1 -1
- package/dist/packem_chunks/architecture-panel.mjs +1 -1
- package/dist/packem_chunks/auth-audit-panel.mjs +1 -1
- package/dist/packem_chunks/auth-config-panel.mjs +1 -1
- package/dist/packem_chunks/auth-sessions-panel.mjs +1 -1
- package/dist/packem_chunks/containers-panel.mjs +1 -1
- package/dist/packem_chunks/dashboards-panel.mjs +1 -1
- package/dist/packem_chunks/evals-panel.mjs +1 -1
- package/dist/packem_chunks/fanout-panel.mjs +1 -1
- package/dist/packem_chunks/flags-panel.mjs +1 -1
- package/dist/packem_chunks/issues-panel.mjs +1 -1
- package/dist/packem_chunks/kv-browser.mjs +1 -1
- package/dist/packem_chunks/log-drains-panel.mjs +1 -1
- package/dist/packem_chunks/migrations-route.mjs +1 -1
- package/dist/packem_chunks/organizations-panel.mjs +1 -1
- package/dist/packem_chunks/payments-panel.mjs +1 -1
- package/dist/packem_chunks/permissions-panel.mjs +1 -1
- package/dist/packem_chunks/privacy-requests-panel.mjs +1 -1
- package/dist/packem_chunks/queues-panel.mjs +1 -1
- package/dist/packem_chunks/reactors-panel.mjs +1 -1
- package/dist/packem_chunks/rls-panel.mjs +1 -1
- package/dist/packem_chunks/schedule-panel.mjs +1 -1
- package/dist/packem_chunks/storage-rules-panel.mjs +1 -1
- package/dist/packem_chunks/subscriptions-panel.mjs +1 -1
- package/dist/packem_chunks/sync-client-panel.mjs +1 -1
- package/dist/packem_chunks/theme-indicator.mjs +1 -0
- package/dist/packem_chunks/traces-panel.mjs +1 -1
- package/dist/packem_chunks/users-panel.mjs +1 -1
- package/dist/packem_chunks/vector-browser.mjs +1 -1
- package/dist/packem_chunks/workflows-panel.mjs +1 -1
- package/dist/packem_shared/{ApiDocsPanel-Py7C4ibM.mjs → ApiDocsPanel-B_RaW7Br.mjs} +2 -2
- package/dist/packem_shared/ApiReferencePanel-u9Rrljdf.mjs +1 -0
- package/dist/packem_shared/{CommandPalette-CM1hqAOD.mjs → CommandPalette-5OsK8PNe.mjs} +1 -1
- package/dist/packem_shared/{ConfirmButton-DU4p72Er.mjs → ConfirmButton-CIXYF6Mg.mjs} +1 -1
- package/dist/packem_shared/{ConnectionBadge-B8Hj5DaE.mjs → ConnectionBadge-BfcoN-VE.mjs} +1 -1
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-CG7Q45ZS.mjs +1 -0
- package/dist/packem_shared/DEFAULT_LOCALE-BQ3jRT74.mjs +1 -0
- package/dist/packem_shared/{DataBrowser-DFjQeYYF.mjs → DataBrowser-Cc1qZX-4.mjs} +1 -1
- package/dist/packem_shared/{DataFilters-faurWYyX.mjs → DataFilters--ocFTVT2.mjs} +1 -1
- package/dist/packem_shared/GlobalDataBrowser-Hq6gTlkb.mjs +1 -0
- package/dist/packem_shared/{HomePanel-C8sb1fFJ.mjs → HomePanel-DeyYLVxc.mjs} +1 -1
- package/dist/packem_shared/MigrationsPanel-CMZYYcQ5.mjs +1 -0
- package/dist/packem_shared/OpenRpcReferencePanel-E9cDfHRv.mjs +1 -0
- package/dist/packem_shared/ScheduledJobs-D4CUj7aX.mjs +1 -0
- package/dist/packem_shared/{ShardInput-C6mjgAh4.mjs → ShardInput-CoySruKZ.mjs} +1 -1
- package/dist/packem_shared/Studio-BhTqTeGb.mjs +1 -0
- package/dist/packem_shared/StudioApp-B1d0beD4.mjs +1 -0
- package/dist/packem_shared/{StudioI18nProvider-fVsCSs5L.mjs → StudioI18nProvider-CGXCPnQn.mjs} +1 -1
- package/dist/packem_shared/{advisor-view-B8oIluyS.mjs → advisor-view-fNcNYW2Q.mjs} +1 -1
- package/dist/packem_shared/{app.d-D45VvUTx.d.mts → app.d-D425h1XO.d.mts} +4 -3
- package/dist/packem_shared/{app.d-D45VvUTx.d.ts → app.d-D425h1XO.d.ts} +4 -3
- package/dist/packem_shared/{auth-pager-DiDnXsfe.mjs → auth-pager-DW77WeZw.mjs} +1 -1
- package/dist/packem_shared/{data-grid-BHTuvSI7.mjs → data-grid-r3isM8Nq.mjs} +1 -1
- package/dist/packem_shared/{diagram-export-panel-BMLzao0Y.mjs → diagram-export-panel-aBDQdX4e.mjs} +1 -1
- package/dist/packem_shared/{error-alert-CNQjdAhi.mjs → error-alert-54TiaMvZ.mjs} +1 -1
- package/dist/packem_shared/{grid-features-8DoaKdS1.mjs → grid-features-2c5SaBtH.mjs} +1 -1
- package/dist/packem_shared/{grid-pagination-DgzyzfBh.mjs → grid-pagination-DY2erU65.mjs} +1 -1
- package/dist/packem_shared/home-panel-0XMGe1hP.mjs +3 -0
- package/dist/packem_shared/{live-status-BuJdUZFU.mjs → live-status-D1GasNsH.mjs} +1 -1
- package/dist/packem_shared/{recording-client-neIRrUNz.mjs → recording-client-MbGZ28I0.mjs} +1 -1
- package/dist/packem_shared/{reference-view-BrsL8UGn.mjs → reference-view-DCEC5kjY.mjs} +4 -4
- package/dist/packem_shared/{schema-diagram-ghsOCED7.mjs → schema-diagram-k7cFl7Wp.mjs} +1 -1
- package/dist/packem_shared/{sql-result-table-COsfUSGc.mjs → sql-result-table-CatgdmMh.mjs} +1 -1
- package/dist/packem_shared/studio-CA3ZKwVK.mjs +2 -0
- package/dist/packem_shared/{table-list-sidebar-B7IOSxLN.mjs → table-list-sidebar-nA7g7uSk.mjs} +1 -1
- package/dist/packem_shared/use-admin-query-BW9IuacC.mjs +1 -0
- package/dist/packem_shared/use-auth-config-KO9tnI39.mjs +1 -0
- package/dist/packem_shared/use-sql-assistant-DXnqbBs-.mjs +1 -0
- package/dist/packem_shared/use-studio-client-DCA50tF2.mjs +1 -0
- package/dist/standalone/chunk-26OKWFLO.js +1 -0
- package/dist/standalone/chunk-2EL4EMYZ.js +1 -0
- package/dist/standalone/chunk-2O6KKVH2.js +1 -0
- package/dist/standalone/{chunk-WX647YQ7.js → chunk-2WNL74MI.js} +3 -3
- package/dist/standalone/chunk-2X6O33OX.js +1 -0
- package/dist/standalone/chunk-2ZO7XY3Z.js +1 -0
- package/dist/standalone/{chunk-Y3AYVFTK.js → chunk-3GXPALXG.js} +1 -1
- package/dist/standalone/chunk-3Y5K3IQO.js +1 -0
- package/dist/standalone/{chunk-BOMPSVRC.js → chunk-4C4THJUD.js} +1 -1
- package/dist/standalone/{chunk-WVWCUB4S.js → chunk-4IEMXFUB.js} +1 -1
- package/dist/standalone/{chunk-5B2RTXBS.js → chunk-4SQBAPY6.js} +1 -1
- package/dist/standalone/{chunk-R6U22RSY.js → chunk-5DNGK3NT.js} +1 -1
- package/dist/standalone/{chunk-WOEHFC4J.js → chunk-5J32EGHF.js} +1 -1
- package/dist/standalone/chunk-5NZWQEEJ.js +1 -0
- package/dist/standalone/chunk-6I42AM75.js +1 -0
- package/dist/standalone/{chunk-RGMVGZV4.js → chunk-6M7FLLMT.js} +1 -1
- package/dist/standalone/{chunk-IWZ7GVQO.js → chunk-6QEXGYWH.js} +1 -1
- package/dist/standalone/chunk-7AZYREIY.js +1 -0
- package/dist/standalone/{chunk-G43F7LYA.js → chunk-7F3S5OQT.js} +1 -1
- package/dist/standalone/chunk-7MN724WR.js +1 -0
- package/dist/standalone/{chunk-Q6IT6ZD7.js → chunk-7RGYCU6F.js} +1 -1
- package/dist/standalone/{chunk-NRP22GKC.js → chunk-A566HCBX.js} +1 -1
- package/dist/standalone/{chunk-253UHWDX.js → chunk-AOHKAKKL.js} +1 -1
- package/dist/standalone/{chunk-OYCUPD3Q.js → chunk-AP4PC2M4.js} +1 -1
- package/dist/standalone/chunk-B3AXFXAD.js +1 -0
- package/dist/standalone/chunk-B7MHW3A5.js +1 -0
- package/dist/standalone/{chunk-CWPBPBWJ.js → chunk-BHOLL76W.js} +6 -6
- package/dist/standalone/{chunk-I57ZVLUB.js → chunk-BTRYFPZH.js} +1 -1
- package/dist/standalone/chunk-BVKQA5OL.js +1 -0
- package/dist/standalone/chunk-CGZVMM3P.js +1 -0
- package/dist/standalone/chunk-CIVMATZK.js +3 -0
- package/dist/standalone/chunk-CLINNLLE.js +1 -0
- package/dist/standalone/chunk-CTE6RPXC.js +1 -0
- package/dist/standalone/chunk-CW57Q264.js +1 -0
- package/dist/standalone/chunk-D7JK65OK.js +1 -0
- package/dist/standalone/{chunk-FUYEZFBP.js → chunk-DBVJ5VLI.js} +1 -1
- package/dist/standalone/{chunk-XCYFP44W.js → chunk-DS7HZKZ2.js} +1 -1
- package/dist/standalone/{chunk-2WDKJ74A.js → chunk-DX55P3KZ.js} +1 -1
- package/dist/standalone/{chunk-55UGUCQ6.js → chunk-E26OT26O.js} +1 -1
- package/dist/standalone/{chunk-YUPEDAX3.js → chunk-E32FS6PE.js} +2 -2
- package/dist/standalone/chunk-E3VSRIQU.js +1 -0
- package/dist/standalone/chunk-EDGOSJXL.js +1 -0
- package/dist/standalone/chunk-EOR73TZZ.js +1 -0
- package/dist/standalone/chunk-F5LTDUMB.js +1 -0
- package/dist/standalone/chunk-FLVDICZL.js +1 -0
- package/dist/standalone/{chunk-5J4FLDJH.js → chunk-FPIUVV7Q.js} +1 -1
- package/dist/standalone/chunk-GMW2DYFU.js +1 -0
- package/dist/standalone/{chunk-VFFW3ANI.js → chunk-GPOSJNMV.js} +5 -5
- package/dist/standalone/chunk-GQYA5W5T.js +1 -0
- package/dist/standalone/chunk-HFYFYNSX.js +1 -0
- package/dist/standalone/chunk-HKLF627N.js +1 -0
- package/dist/standalone/{chunk-PSMQQV6S.js → chunk-HKPDPKXD.js} +1 -1
- package/dist/standalone/chunk-HLAAOW33.js +1 -0
- package/dist/standalone/{chunk-75M6ZLLS.js → chunk-HOPAJ5F6.js} +2 -2
- package/dist/standalone/{chunk-7Y3SY37W.js → chunk-IBJVVHV5.js} +1 -1
- package/dist/standalone/{chunk-VESGIGMQ.js → chunk-IH2CJZF2.js} +1 -1
- package/dist/standalone/chunk-JAHK7RRJ.js +1 -0
- package/dist/standalone/chunk-JG2C7SS2.js +1 -0
- package/dist/standalone/chunk-JGMQQ3S7.js +1 -0
- package/dist/standalone/{chunk-3YXASVTP.js → chunk-JTGGWF7R.js} +1 -1
- package/dist/standalone/chunk-KFNDET5D.js +1 -0
- package/dist/standalone/{chunk-NXQW5E6W.js → chunk-KRPXOSBL.js} +1 -1
- package/dist/standalone/{chunk-7Q256NLI.js → chunk-KYONGQQ4.js} +1 -1
- package/dist/standalone/{chunk-OPM7ESDV.js → chunk-LIGOLZND.js} +1 -1
- package/dist/standalone/{chunk-VQRCJJXS.js → chunk-LKCO3E2B.js} +1 -1
- package/dist/standalone/chunk-LOV52GLG.js +1 -0
- package/dist/standalone/chunk-LPINY2IJ.js +19 -0
- package/dist/standalone/{chunk-XKISL2CG.js → chunk-LRXCL6IA.js} +1 -1
- package/dist/standalone/{chunk-OQ6I6OXT.js → chunk-LUHXNZI4.js} +1 -1
- package/dist/standalone/chunk-MD67S53Z.js +1 -0
- package/dist/standalone/{chunk-HIJGQX6F.js → chunk-MDAXV2XH.js} +1 -1
- package/dist/standalone/{chunk-ZN7TURF4.js → chunk-MFNO5BFR.js} +1 -1
- package/dist/standalone/chunk-MMJTKSHL.js +1 -0
- package/dist/standalone/chunk-NMVFSJM7.js +1 -0
- package/dist/standalone/chunk-NVHHB5EV.js +2 -0
- package/dist/standalone/chunk-O3FDK56W.js +1 -0
- package/dist/standalone/{chunk-C7FJ2JKY.js → chunk-OECMBE6Q.js} +1 -1
- package/dist/standalone/chunk-OSJ7HV7B.js +1 -0
- package/dist/standalone/chunk-OUFWXYEF.js +1 -0
- package/dist/standalone/chunk-OXFKZ4BM.js +1 -0
- package/dist/standalone/{chunk-63QLK2KW.js → chunk-P5GAJKDW.js} +1 -1
- package/dist/standalone/chunk-P6L6ABWO.js +1 -0
- package/dist/standalone/chunk-PZZWUL5U.js +1 -0
- package/dist/standalone/chunk-QAQVT4FS.js +1 -0
- package/dist/standalone/{chunk-VCFEO3RI.js → chunk-R36QXQZX.js} +1 -1
- package/dist/standalone/chunk-R3KLR5EP.js +1 -0
- package/dist/standalone/chunk-RXVXXRYD.js +1 -0
- package/dist/standalone/chunk-S7XAAH7U.js +1 -0
- package/dist/standalone/{chunk-E4PXACVL.js → chunk-SDQH4HR6.js} +1 -1
- package/dist/standalone/chunk-SFY646MC.js +1 -0
- package/dist/standalone/{chunk-VDC6JP4A.js → chunk-SJLEEYCR.js} +1 -1
- package/dist/standalone/{chunk-ZKJS6EBE.js → chunk-SLIDAWNX.js} +1 -1
- package/dist/standalone/chunk-SOO2HXV6.js +1 -0
- package/dist/standalone/chunk-SXD6JQXF.js +1 -0
- package/dist/standalone/{chunk-AUGKHAMQ.js → chunk-SYGCASPT.js} +1 -1
- package/dist/standalone/{chunk-2I4NHEKA.js → chunk-TDVDZ7XQ.js} +1 -1
- package/dist/standalone/chunk-TRZTGE4R.js +1 -0
- package/dist/standalone/chunk-TWMS2TMF.js +1 -0
- package/dist/standalone/chunk-U76DVXTR.js +21 -0
- package/dist/standalone/chunk-UTX6IBA3.js +1 -0
- package/dist/standalone/chunk-UZIBQZ2F.js +1 -0
- package/dist/standalone/chunk-VB6YJKPA.js +1 -0
- package/dist/standalone/{chunk-CVXNHIQW.js → chunk-VEWQWS3J.js} +1 -1
- package/dist/standalone/{chunk-UC7MNI2F.js → chunk-W2BCSK5S.js} +1 -1
- package/dist/standalone/chunk-W2XSKODB.js +1 -0
- package/dist/standalone/{chunk-MVWZMWPD.js → chunk-W7MRISE3.js} +1 -1
- package/dist/standalone/chunk-W7Z35E2E.js +1 -0
- package/dist/standalone/chunk-WIET27J3.js +1 -0
- package/dist/standalone/chunk-WQGT24W6.js +1 -0
- package/dist/standalone/{chunk-GZEWLX7U.js → chunk-WS36BO4R.js} +1 -1
- package/dist/standalone/chunk-WZTY3ZYI.js +1 -0
- package/dist/standalone/chunk-X5KWBDTF.js +1 -0
- package/dist/standalone/chunk-X74GEPSG.js +1 -0
- package/dist/standalone/chunk-XBZUJDHD.js +1 -0
- package/dist/standalone/chunk-XMEVNOCA.js +1 -0
- package/dist/standalone/chunk-XWEDIIIT.js +1 -0
- package/dist/standalone/{chunk-GHQ2VDI2.js → chunk-XYR5NST4.js} +1 -1
- package/dist/standalone/{chunk-XGCIDUJF.js → chunk-YHTHRYP5.js} +1 -1
- package/dist/standalone/{chunk-RX755NMO.js → chunk-YJ2WHOGO.js} +1 -1
- package/dist/standalone/chunk-YJWR6ZWC.js +1 -0
- package/dist/standalone/{chunk-CGQMJYCW.js → chunk-Z5EV64KS.js} +1 -1
- package/dist/standalone/{chunk-LVIL2SFA.js → chunk-ZBFWT34B.js} +1 -1
- package/dist/standalone/{chunk-AUAECCXB.js → chunk-ZBON5T5A.js} +1 -1
- package/dist/standalone/chunk-ZGSL4DPP.js +1 -0
- package/dist/standalone/chunk-ZMQ6PKLN.js +1 -0
- package/dist/standalone/{chunk-SJQERRSZ.js → chunk-ZTOREMGH.js} +1 -1
- package/dist/standalone/chunk-ZTOXQK4V.js +1 -0
- package/dist/standalone/chunk-ZWDORIZY.js +1 -0
- package/dist/standalone/chunk-ZZAJHNZ6.js +1 -0
- package/dist/standalone/studio.js +1 -1
- package/package.json +5 -5
- package/dist/packem_chunks/sparkline.mjs +0 -1
- package/dist/packem_shared/ApiReferencePanel-DlYVADAy.mjs +0 -1
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-DvhNw0BI.mjs +0 -1
- package/dist/packem_shared/DEFAULT_LOCALE-A1Yg5ORA.mjs +0 -1
- package/dist/packem_shared/GlobalDataBrowser-CPfjubP_.mjs +0 -1
- package/dist/packem_shared/MigrationsPanel-Dzjf42y8.mjs +0 -1
- package/dist/packem_shared/OpenRpcReferencePanel-nYyfjjse.mjs +0 -1
- package/dist/packem_shared/ScheduledJobs-BJ1uZW1U.mjs +0 -1
- package/dist/packem_shared/Studio-CgqntIfx.mjs +0 -1
- package/dist/packem_shared/StudioApp-DfFjQPGJ.mjs +0 -1
- package/dist/packem_shared/home-panel-BJXZsAaD.mjs +0 -3
- package/dist/packem_shared/studio-CFSjGWyw.mjs +0 -2
- package/dist/packem_shared/use-admin-query-CLStXJ7v.mjs +0 -1
- package/dist/packem_shared/use-auth-config-DtZeS_qf.mjs +0 -1
- package/dist/packem_shared/use-sql-assistant-DxNeNdCs.mjs +0 -1
- package/dist/standalone/chunk-2IKDEUCX.js +0 -1
- package/dist/standalone/chunk-37WYCOQ2.js +0 -1
- package/dist/standalone/chunk-4H5PBJNF.js +0 -1
- package/dist/standalone/chunk-4UBF7HMZ.js +0 -1
- package/dist/standalone/chunk-533J6WYA.js +0 -1
- package/dist/standalone/chunk-5QR2SQIS.js +0 -1
- package/dist/standalone/chunk-5ZNIQENA.js +0 -1
- package/dist/standalone/chunk-63Z6OJ6G.js +0 -1
- package/dist/standalone/chunk-74IYYDDI.js +0 -19
- package/dist/standalone/chunk-7EHAUFJY.js +0 -2
- package/dist/standalone/chunk-7G4Z6Q7X.js +0 -1
- package/dist/standalone/chunk-7RKB5KS7.js +0 -1
- package/dist/standalone/chunk-7TN6VTTF.js +0 -1
- package/dist/standalone/chunk-AWWECTQT.js +0 -1
- package/dist/standalone/chunk-AXL4YZJR.js +0 -1
- package/dist/standalone/chunk-COK5BCWN.js +0 -1
- package/dist/standalone/chunk-CULVXE3K.js +0 -1
- package/dist/standalone/chunk-E4BAGQ53.js +0 -1
- package/dist/standalone/chunk-EBTYSPZB.js +0 -1
- package/dist/standalone/chunk-EC5PMSQ6.js +0 -1
- package/dist/standalone/chunk-ECY2JC5F.js +0 -1
- package/dist/standalone/chunk-EWMBX5N2.js +0 -1
- package/dist/standalone/chunk-FPI7AMQJ.js +0 -1
- package/dist/standalone/chunk-GC5UHRDR.js +0 -1
- package/dist/standalone/chunk-GRHO2IUN.js +0 -1
- package/dist/standalone/chunk-GUDC24NJ.js +0 -1
- package/dist/standalone/chunk-H467GBSD.js +0 -1
- package/dist/standalone/chunk-HBO4SMAO.js +0 -15
- package/dist/standalone/chunk-HBTGWHTW.js +0 -1
- package/dist/standalone/chunk-HCTJKP5J.js +0 -1
- package/dist/standalone/chunk-HZTJLEIJ.js +0 -1
- package/dist/standalone/chunk-I26MS5PJ.js +0 -1
- package/dist/standalone/chunk-IRKWOUXO.js +0 -1
- package/dist/standalone/chunk-IUSKFS3B.js +0 -1
- package/dist/standalone/chunk-K2EHRNYW.js +0 -1
- package/dist/standalone/chunk-L5MI4PTP.js +0 -1
- package/dist/standalone/chunk-LXCVA5SP.js +0 -1
- package/dist/standalone/chunk-LYQZERWS.js +0 -1
- package/dist/standalone/chunk-MPEIBWCJ.js +0 -1
- package/dist/standalone/chunk-NCFYQR4L.js +0 -1
- package/dist/standalone/chunk-NCPW7WHO.js +0 -1
- package/dist/standalone/chunk-NOS2OC45.js +0 -1
- package/dist/standalone/chunk-NQZALRU3.js +0 -1
- package/dist/standalone/chunk-OQ2ORNN6.js +0 -1
- package/dist/standalone/chunk-OVBYLXPD.js +0 -1
- package/dist/standalone/chunk-OWQHP4KI.js +0 -1
- package/dist/standalone/chunk-PKSRXFSZ.js +0 -1
- package/dist/standalone/chunk-Q6ED4KUL.js +0 -1
- package/dist/standalone/chunk-QAQDMS6R.js +0 -1
- package/dist/standalone/chunk-QC2GLF3I.js +0 -1
- package/dist/standalone/chunk-QFK4UI4Q.js +0 -1
- package/dist/standalone/chunk-QJ4AALXU.js +0 -1
- package/dist/standalone/chunk-QJLHH3ET.js +0 -1
- package/dist/standalone/chunk-R3RBUT32.js +0 -1
- package/dist/standalone/chunk-RNYOBPQA.js +0 -1
- package/dist/standalone/chunk-RWVIV3U7.js +0 -1
- package/dist/standalone/chunk-RYBLB23Z.js +0 -1
- package/dist/standalone/chunk-S3EWTSAN.js +0 -1
- package/dist/standalone/chunk-S4AR74DJ.js +0 -3
- package/dist/standalone/chunk-S4Z7K55A.js +0 -1
- package/dist/standalone/chunk-SA2OGF3F.js +0 -1
- package/dist/standalone/chunk-SFMIR4YV.js +0 -1
- package/dist/standalone/chunk-SROQCZ3P.js +0 -1
- package/dist/standalone/chunk-T4SIZOJG.js +0 -1
- package/dist/standalone/chunk-U37BPX5J.js +0 -1
- package/dist/standalone/chunk-UFZVSXRW.js +0 -1
- package/dist/standalone/chunk-UQWGBWQ3.js +0 -1
- package/dist/standalone/chunk-V6LPISRQ.js +0 -1
- package/dist/standalone/chunk-WEPM5G3R.js +0 -1
- package/dist/standalone/chunk-WGBAHXMK.js +0 -1
- package/dist/standalone/chunk-WGUN4FNJ.js +0 -1
- package/dist/standalone/chunk-WJRYEML4.js +0 -1
- package/dist/standalone/chunk-WNMY5ZKL.js +0 -1
- package/dist/standalone/chunk-YBDF3DET.js +0 -7
- package/dist/standalone/chunk-YJI56OCF.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import{c as M}from"react/compiler-runtime";import{createRootRoute as us,createRoute as $t,createBrowserHistory as fs,createMemoryHistory as ms,createRouter as hs,useNavigate as Ot,useSearch as ps,RouterProvider as gs,useRouterState as bs,Outlet as vs}from"@tanstack/react-router";import*as ft from"react";import{use as Lt,createContext as Zt,useState as mt,useEffect as ht,useSyncExternalStore as xs,Suspense as qt,lazy as R}from"react";import{c as _}from"./utils-bhneXptQ.mjs";import{jsx as o,jsxs as k,Fragment as Ft}from"react/jsx-runtime";import{ErrorBoundary as ys}from"./ErrorBoundary-BWNF98VF.mjs";import{O as ws,u as ks}from"./operation-console-provider-DoloEvon.mjs";import{useT as se}from"./DEFAULT_LOCALE-BQ3jRT74.mjs";import{LunoraError as Wt}from"@lunora/errors";import{B as gt}from"./badge-r_5B4LHP.mjs";import{I as Ut}from"./input-CXhxesPC.mjs";import{Popover as pt}from"@base-ui/react/popover";import{Cancel01Icon as Ms,SidebarLeftIcon as Ns}from"@hugeicons/core-free-icons";import{HugeiconsIcon as jt}from"@hugeicons/react";import{mergeProps as Gt}from"@base-ui/react/merge-props";import{useRender as Kt}from"@base-ui/react/use-render";import{cva as Ss}from"class-variance-authority";import{B as Qt}from"./button-q0UYSmrn.mjs";import{Dialog as oe}from"@base-ui/react/dialog";import{Tooltip as ae}from"@base-ui/react/tooltip";import{S as Ct}from"./skeleton-DX1gfixl.mjs";import{H as Cs,u as Ps}from"./home-panel-0XMGe1hP.mjs";import{g as _s,f as Rt}from"./internal-BXEjuLPN.mjs";import{o as wt}from"./use-admin-query-BW9IuacC.mjs";import{StudioI18nProvider as Ts}from"./StudioI18nProvider-CGXCPnQn.mjs";import{v as Rs,a as As}from"./data-view-params-C-_G-biH.mjs";import{CommandPalette as Ls,openCommandPalette as Is}from"./CommandPalette-5OsK8PNe.mjs";import{E as Es}from"./empty-state-D7jEML_T.mjs";import{u as $s}from"./shortcuts-B9gDaXmw.mjs";const Yt="(prefers-color-scheme: dark)",Jt=()=>{try{return globalThis.localStorage}catch{return}},Hs=t=>t==="system"||t==="light"||t==="dark",Xt=()=>globalThis.matchMedia,es="lunora-studio-theme",Pt=["system","light","dark"],Vs=(t="system")=>{try{const e=Jt()?.getItem(es);return Hs(e)?e:t}catch{return t}},Ht=t=>{const e=Jt();if(e!==void 0)try{e.setItem(es,t)}catch{}},Bs=()=>{try{return Xt()?.(Yt).matches?"dark":"light"}catch{return"light"}},zs=(t,e)=>t==="system"?e:t,Ds=t=>{let e;try{e=Xt()?.(Yt)}catch{e=void 0}if(e===void 0)return()=>{};const s=a=>{t(a.matches?"dark":"light")};return e.addEventListener("change",s),()=>{e.removeEventListener("change",s)}},It=Zt(null),Os=({children:t,defaultTheme:e="system"})=>{const[s,a]=mt(()=>Vs(e)),[r,n]=mt(()=>Bs());ht(()=>Ds(n),[]);const i=u=>{Ht(u),a(u)},c={cycleTheme:()=>{a(u=>{const d=Pt[(Pt.indexOf(u)+1)%Pt.length]??u;return Ht(d),d})},resolvedTheme:zs(s,r),setTheme:i,systemTheme:r,theme:s};return o(It,{value:c,children:t})},Zs=t=>{const e=M(3),{children:s}=t,a=Lt(It);let r;return e[0]!==s||e[1]!==a?(r=a===null?o(Os,{children:s}):s,e[0]=s,e[1]=a,e[2]=r):r=e[2],r},qs=()=>{const t=Lt(It);if(t===null)throw new Wt("INTERNAL","useTheme must be used within a <ThemeProvider>");return t};function Hr({delay:t=0,...e}){return o(ae.Provider,{"data-slot":"tooltip-provider",delay:t,...e})}function Fs(t){const e=M(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(ae.Root,{"data-slot":"tooltip",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ws(t){const e=M(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(ae.Trigger,{"data-slot":"tooltip-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Us({className:t,side:e="top",sideOffset:s=4,align:a="center",alignOffset:r=0,children:n,...i}){return o(ae.Portal,{children:o(ae.Positioner,{align:a,alignOffset:r,side:e,sideOffset:s,className:"isolate z-50",children:k(ae.Popup,{"data-slot":"tooltip-content",className:_("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),...i,children:[n,o(ae.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"})]})})})}const js=t=>{const e=M(5),{className:s}=t;let a;e[0]!==s?(a=_("h-full w-full text-foreground",s),e[0]=s,e[1]=a):a=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=o("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"}),e[2]=r):r=e[2];let n;return e[3]!==a?(n=o("svg",{"aria-hidden":"true",className:a,fill:"currentColor",viewBox:"0 0 543 446",children:r}),e[3]=a,e[4]=n):n=e[4],n},ts="lunora.studio.rulesBannerDismissed",Gs=()=>{try{return globalThis.localStorage.getItem(ts)==="1"}catch{return!1}},Ks=()=>{try{globalThis.localStorage.setItem(ts,"1")}catch{}},Qs=()=>{const t=M(18),e=se(),[s,a]=mt(Ys);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{a(!0),Ks()},t[0]=r):r=t[0];const n=r;if(s)return null;let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=o("span",{"aria-hidden":"true",className:"text-warning",children:"⚠"}),t[1]=i):i=t[1];let l;t[2]!==e?(l=e("Lunora AI rules aren't installed."),t[2]=e,t[3]=l):l=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=o("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[11px]",children:"lunora rules install"}),t[4]=c):c=t[4];let u;t[5]!==e?(u=e("lets your coding agent use Lunora correctly."),t[5]=e,t[6]=u):u=t[6];let d;t[7]!==l||t[8]!==u?(d=k("span",{children:[l," ",c," ",u]}),t[7]=l,t[8]=u,t[9]=d):d=t[9];let g;t[10]!==e?(g=e("Dismiss"),t[10]=e,t[11]=g):g=t[11];let p;t[12]===Symbol.for("react.memo_cache_sentinel")?(p=o("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:o("path",{d:"M18 6 6 18M6 6l12 12"})}),t[12]=p):p=t[12];let f;t[13]!==g?(f=o("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:n,type:"button",children:p}),t[13]=g,t[14]=f):f=t[14];let b;return t[15]!==d||t[16]!==f?(b=k("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:[i,d,f]}),t[15]=d,t[16]=f,t[17]=b):b=t[17],b};function Ys(){return Gs()}function ss(t){const e=M(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(pt.Root,{"data-slot":"popover",...s}),e[2]=s,e[3]=a):a=e[3],a}function as(t){const e=M(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(pt.Trigger,{"data-slot":"popover-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function os({align:t="end",alignOffset:e=0,className:s,keepMounted:a=!1,side:r="bottom",sideOffset:n=6,...i}){return o(pt.Portal,{keepMounted:a,children:o(pt.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:r,sideOffset:n,children:o(pt.Popup,{className:_("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",s),"data-slot":"popover-content",...i})})})}const _t=768;function Js(){const t=M(2),[e,s]=mt(void 0);let a,r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{const n=globalThis.matchMedia(`(max-width: ${_t-1}px)`),i=()=>{s(globalThis.innerWidth<_t)};return n.addEventListener("change",i),s(globalThis.innerWidth<_t),()=>{n.removeEventListener("change",i)}},r=[],t[0]=a,t[1]=r):(a=t[0],r=t[1]),ht(a,r),!!e}function Xs(t){const e=M(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(oe.Root,{"data-slot":"sheet",...s}),e[2]=s,e[3]=a):a=e[3],a}function ea(t){const e=M(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(oe.Portal,{"data-slot":"sheet-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function ta(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("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:",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o(oe.Backdrop,{"data-slot":"sheet-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function sa({className:t,children:e,side:s="right",showCloseButton:a=!0,...r}){return k(ea,{children:[o(ta,{}),k(oe.Popup,{"data-slot":"sheet-content","data-side":s,className:_("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),...r,children:[e,a&&k(oe.Close,{"data-slot":"sheet-close",render:o(Qt,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"}),children:[o(jt,{icon:Ms,strokeWidth:2}),o("span",{className:"sr-only",children:"Close"})]})]})]})}function aa(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("flex flex-col gap-0.5 p-4",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("div",{"data-slot":"sheet-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function oa(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("text-sm font-medium text-foreground",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o(oe.Title,{"data-slot":"sheet-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function ra(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("text-xs/relaxed text-muted-foreground",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o(oe.Description,{"data-slot":"sheet-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}const na="sidebar_state",ia=3600*24*7,la="16rem",ca="18rem",da="3rem",ua="b",rs=ft.createContext(null);function kt(){const t=ft.useContext(rs);if(!t)throw new Wt("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}function fa({defaultOpen:t=!0,open:e,onOpenChange:s,className:a,style:r,children:n,...i}){const l=Js(),[c,u]=ft.useState(!1),[d,g]=ft.useState(t),p=e??d,f=h=>{const m=typeof h=="function"?h(p):h;s?s(m):g(m),document.cookie=`${na}=${m}; path=/; max-age=${ia}`},b=()=>l?u(h=>!h):f(h=>!h),y=ft.useEffectEvent(()=>{b()});ft.useEffect(()=>{const h=m=>{m.key===ua&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),y())};return globalThis.addEventListener("keydown",h),()=>globalThis.removeEventListener("keydown",h)},[]);const v={state:p?"expanded":"collapsed",open:p,setOpen:f,isMobile:l,openMobile:c,setOpenMobile:u,toggleSidebar:b};return o(rs.Provider,{value:v,children:o("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":la,"--sidebar-width-icon":da,...r},className:_("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",a),...i,children:n})})}function ma({side:t="left",variant:e="sidebar",collapsible:s="offcanvas",className:a,children:r,dir:n,...i}){const{isMobile:l,state:c,openMobile:u,setOpenMobile:d}=kt();return s==="none"?o("div",{"data-slot":"sidebar",className:_("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",a),...i,children:r}):l?o(Xs,{open:u,onOpenChange:d,...i,children:k(sa,{dir:n,"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":ca},side:t,children:[k(aa,{className:"sr-only",children:[o(oa,{children:"Sidebar"}),o(ra,{children:"Displays the mobile sidebar."})]}),o("div",{className:"flex h-full w-full flex-col",children:r})]})}):k("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":c,"data-collapsible":c==="collapsed"?s:"","data-variant":e,"data-side":t,"data-slot":"sidebar",children:[o("div",{"data-slot":"sidebar-gap",className:_("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)")}),o("div",{"data-slot":"sidebar-container","data-side":t,className:_("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",a),...i,children:o("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:r})})]})}function ha(t){const e=M(15);let s,a,r;e[0]!==t?({className:s,onClick:a,...r}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=r):(s=e[1],a=e[2],r=e[3]);const{toggleSidebar:n}=kt();let i;e[4]!==s?(i=_(s),e[4]=s,e[5]=i):i=e[5];let l;e[6]!==a||e[7]!==n?(l=g=>{a?.(g),n()},e[6]=a,e[7]=n,e[8]=l):l=e[8];let c,u;e[9]===Symbol.for("react.memo_cache_sentinel")?(c=o(jt,{icon:Ns,strokeWidth:2,className:"rtl:rotate-180"}),u=o("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=c,e[10]=u):(c=e[9],u=e[10]);let d;return e[11]!==r||e[12]!==i||e[13]!==l?(d=k(Qt,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:i,onClick:l,...r,children:[c,u]}),e[11]=r,e[12]=i,e[13]=l,e[14]=d):d=e[14],d}function pa(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("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",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("main",{"data-slot":"sidebar-inset",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function ga(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function ba(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function va(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("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",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function xa(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("relative flex w-full min-w-0 flex-col p-2",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function ya(t){const e=M(10);let s,a,r,n;if(e[0]!==t){const{className:c,render:u,...d}=t;s=u,n=Kt,a="div",r=Gt({className:_("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",c)},d),e[0]=t,e[1]=s,e[2]=a,e[3]=r,e[4]=n}else s=e[1],a=e[2],r=e[3],n=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i={slot:"sidebar-group-label",sidebar:"group-label"},e[5]=i):i=e[5];let l;return e[6]!==s||e[7]!==a||e[8]!==r?(l={defaultTagName:a,props:r,render:s,state:i},e[6]=s,e[7]=a,e[8]=r,e[9]=l):l=e[9],n(l)}function wa(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("w-full text-xs",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function Vt(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("flex w-full min-w-0 flex-col gap-0",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function Bt(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("group/menu-item relative",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}const ka=Ss("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 ns({render:t,isActive:e=!1,variant:s="default",size:a="default",tooltip:r,className:n,...i}){const{isMobile:l,state:c}=kt(),u=Kt({defaultTagName:"button",props:Gt({className:_(ka({variant:s,size:a}),n)},i),render:r?o(Ws,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:a,active:e}});return r?(typeof r=="string"&&(r={children:r}),k(Fs,{children:[u,o(Us,{side:"right",align:"center",hidden:c!=="collapsed"||l,...r})]})):u}const Ma=t=>t.replace("__lunora_admin__:",""),Na=()=>xs(wt.subscribe,wt.getSnapshot,wt.getSnapshot),Sa=t=>t==="error"?"destructive":t==="pending"?"secondary":"default",Ca=t=>{const e=M(56),{entry:s,focused:a}=t,r=se();let n;e[0]!==a?(n=O=>{O!==null&&a&&O.scrollIntoView({block:"nearest"})},e[0]=a,e[1]=n):n=e[1];const i=n;let l;e[2]!==s.functionPath||e[3]!==s.shardKey||e[4]!==s.summary?(l=()=>{_s(`${s.functionPath} ${s.summary}${s.shardKey===""?"":` (shard ${s.shardKey})`}`)},e[2]=s.functionPath,e[3]=s.shardKey,e[4]=s.summary,e[5]=l):l=e[5];const c=l,u=a&&"bg-accent ring-1 ring-inset ring-primary/40";let d;e[6]!==u?(d=_("border-b border-border/60 last:border-b-0",u),e[6]=u,e[7]=d):d=e[7];let g;e[8]!==s.status?(g=Sa(s.status),e[8]=s.status,e[9]=g):g=e[9];const p=s.status==="pending"?"…":s.status;let f;e[10]!==g||e[11]!==p?(f=o(gt,{className:"mt-px shrink-0",variant:g,children:p}),e[10]=g,e[11]=p,e[12]=f):f=e[12];let b;e[13]!==s.functionPath?(b=Ma(s.functionPath),e[13]=s.functionPath,e[14]=b):b=e[14];let y;e[15]!==b?(y=o("span",{className:"shrink-0 font-mono text-[11px] text-foreground",children:b}),e[15]=b,e[16]=y):y=e[16];let x;e[17]!==s.kind||e[18]!==r?(x=s.kind==="subscription"&&o(gt,{className:"shrink-0",variant:"outline",children:r("live")}),e[17]=s.kind,e[18]=r,e[19]=x):x=e[19];let v;e[20]!==s.summary?(v=s.summary!==""&&o("span",{className:"min-w-0 truncate text-muted-foreground",children:s.summary}),e[20]=s.summary,e[21]=v):v=e[21];let h;e[22]!==s.shardKey?(h=s.shardKey!==""&&o("span",{className:"font-mono",children:s.shardKey}),e[22]=s.shardKey,e[23]=h):h=e[23];let m;e[24]!==s.resultCount||e[25]!==r?(m=s.resultCount!==void 0&&o("span",{children:r("{count} rows",{count:s.resultCount})}),e[24]=s.resultCount,e[25]=r,e[26]=m):m=e[26];let w;e[27]!==s.pushes||e[28]!==r?(w=s.pushes!==void 0&&s.pushes>0&&o("span",{children:r("{count} pushes",{count:s.pushes})}),e[27]=s.pushes,e[28]=r,e[29]=w):w=e[29];let P;e[30]!==s.durationMs?(P=s.durationMs!==void 0&&k("span",{children:[s.durationMs,"ms"]}),e[30]=s.durationMs,e[31]=P):P=e[31];let C;e[32]!==r?(C=r("Copy"),e[32]=r,e[33]=C):C=e[33];let S;e[34]!==c||e[35]!==C?(S=o("button",{"aria-label":C,className:"rounded px-1 outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-copy",onClick:c,type:"button",children:"⧉"}),e[34]=c,e[35]=C,e[36]=S):S=e[36];let N;e[37]!==h||e[38]!==m||e[39]!==w||e[40]!==P||e[41]!==S?(N=k("span",{className:"ms-auto flex shrink-0 items-center gap-2 text-[11px] text-muted-foreground",children:[h,m,w,P,S]}),e[37]=h,e[38]=m,e[39]=w,e[40]=P,e[41]=S,e[42]=N):N=e[42];let T;e[43]!==x||e[44]!==v||e[45]!==N||e[46]!==f||e[47]!==y?(T=k("div",{className:"flex items-start gap-2 px-3 py-1.5 text-xs",children:[f,y,x,v,N]}),e[43]=x,e[44]=v,e[45]=N,e[46]=f,e[47]=y,e[48]=T):T=e[48];let A;e[49]!==s.error?(A=s.error!==void 0&&o("p",{className:"px-3 pb-1.5 font-mono text-[11px] text-destructive","data-testid":"oc-error",children:s.error}),e[49]=s.error,e[50]=A):A=e[50];let L;return e[51]!==i||e[52]!==T||e[53]!==A||e[54]!==d?(L=k("li",{className:d,"data-testid":"oc-row",ref:i,children:[T,A]}),e[51]=i,e[52]=T,e[53]=A,e[54]=d,e[55]=L):L=e[55],L},Pa=t=>{const e=M(62),{focusSeq:s,onClose:a,onShownChange:r,shown:n}=t,i=se(),l=Na(),[c,u]=mt("");let d;if(e[0]!==l||e[1]!==s||e[2]!==c||e[3]!==a||e[4]!==r||e[5]!==n||e[6]!==i){const g=c.trim().toLowerCase(),p=l.filter(E=>(n==="errors"?E.status==="error":!0)&&(g===""||`${E.functionPath} ${E.summary} ${E.shardKey}`.toLowerCase().includes(g))).toReversed();let f;e[8]!==l?(f=l.filter(_a),e[8]=l,e[9]=f):f=e[9];const b=f.length;let y;e[10]!==i?(y=i("Operation console"),e[10]=i,e[11]=y):y=e[11];let x;e[12]!==i?(x=i("Operation console"),e[12]=i,e[13]=x):x=e[13];let v;e[14]!==x?(v=o("span",{className:"text-xs font-medium",children:x}),e[14]=x,e[15]=v):v=e[15];let h;e[16]!==l.length||e[17]!==i?(h=i("{count} calls",{count:l.length}),e[16]=l.length,e[17]=i,e[18]=h):h=e[18];let m;e[19]!==h?(m=o(gt,{variant:"secondary",children:h}),e[19]=h,e[20]=m):m=e[20];let w;e[21]!==b||e[22]!==i?(w=b>0&&o(gt,{variant:"destructive",children:i("{count} failed",{count:b})}),e[21]=b,e[22]=i,e[23]=w):w=e[23];const P=n==="errors",C=n==="errors"&&"bg-accent";let S;e[24]!==C?(S=_("rounded px-2 py-0.5 text-xs outline-none hover:bg-accent focus-visible:bg-accent",C),e[24]=C,e[25]=S):S=e[25];let N;e[26]!==r||e[27]!==n?(N=()=>{r(n==="errors"?"all":"errors")},e[26]=r,e[27]=n,e[28]=N):N=e[28];let T;e[29]!==i?(T=i("Errors"),e[29]=i,e[30]=T):T=e[30];let A;e[31]!==S||e[32]!==N||e[33]!==T||e[34]!==P?(A=o("button",{"aria-pressed":P,className:S,"data-testid":"oc-filter-errors",onClick:N,type:"button",children:T}),e[31]=S,e[32]=N,e[33]=T,e[34]=P,e[35]=A):A=e[35];let L;e[36]!==i?(L=i("Filter"),e[36]=i,e[37]=L):L=e[37];let O;e[38]===Symbol.for("react.memo_cache_sentinel")?(O=E=>{u(E.target.value)},e[38]=O):O=e[38];let V;e[39]!==i?(V=i("Filter"),e[39]=i,e[40]=V):V=e[40];let B;e[41]!==c||e[42]!==L||e[43]!==V?(B=o(Ut,{"aria-label":L,className:"h-7 w-40 text-xs","data-testid":"oc-search",onChange:O,placeholder:V,value:c}),e[41]=c,e[42]=L,e[43]=V,e[44]=B):B=e[44];let z;e[45]!==i?(z=i("Clear"),e[45]=i,e[46]=z):z=e[46];let $;e[47]!==z?($=o("button",{className:"ms-auto rounded px-2 py-0.5 text-xs text-muted-foreground outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-clear",onClick:Ta,type:"button",children:z}),e[47]=z,e[48]=$):$=e[48];let H;e[49]!==i?(H=i("Hide"),e[49]=i,e[50]=H):H=e[50];let D;e[51]!==a||e[52]!==H?(D=o("button",{"aria-label":H,className:"rounded px-2 py-0.5 text-xs text-muted-foreground outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-close",onClick:a,type:"button",children:"✕"}),e[51]=a,e[52]=H,e[53]=D):D=e[53];let Z;e[54]!==A||e[55]!==B||e[56]!==$||e[57]!==D||e[58]!==v||e[59]!==m||e[60]!==w?(Z=k("div",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3 py-1.5",children:[v,m,w,A,B,$,D]}),e[54]=A,e[55]=B,e[56]=$,e[57]=D,e[58]=v,e[59]=m,e[60]=w,e[61]=Z):Z=e[61],d=k("section",{"aria-label":y,className:"flex max-h-80 flex-col border-t border-border bg-card","data-testid":"lunora-operation-console",children:[Z,p.length===0?o("p",{className:"p-3 text-xs text-muted-foreground","data-testid":"oc-empty",children:i("Every admin call this studio makes is recorded here.")}):o("ul",{className:"min-h-0 flex-1 overflow-y-auto","data-testid":"oc-rows",children:p.map(E=>o(Ca,{entry:E,focused:E.seq===s},E.seq))})]}),e[0]=l,e[1]=s,e[2]=c,e[3]=a,e[4]=r,e[5]=n,e[6]=i,e[7]=d}else d=e[7];return d};function _a(t){return t.status==="error"}function Ta(){wt.clear()}const Ra=()=>{const t=M(334),e=se();let s;t[0]!==e?(s=e("Health score"),t[0]=e,t[1]=s):s=t[1];let a;t[2]!==e?(a=e("Agents"),t[2]=e,t[3]=a):a=t[3];let r;t[4]!==e?(r=e("Evals"),t[4]=e,t[5]=r):r=t[5];let n;t[6]!==e?(n=e("AI usage"),t[6]=e,t[7]=n):n=t[7];let i;t[8]!==e?(i=e("Analytics"),t[8]=e,t[9]=i):i=t[9];let l;t[10]!==e?(l=e("API"),t[10]=e,t[11]=l):l=t[11];let c;t[12]!==e?(c=e("Architecture"),t[12]=e,t[13]=c):c=t[13];let u;t[14]!==e?(u=e("Audit"),t[14]=e,t[15]=u):u=t[15];let d;t[16]!==e?(d=e("Auth audit"),t[16]=e,t[17]=d):d=t[17];let g;t[18]!==e?(g=e("Configuration"),t[18]=e,t[19]=g):g=t[19];let p;t[20]!==e?(p=e("Sessions"),t[20]=e,t[21]=p):p=t[21];let f;t[22]!==e?(f=e("Containers"),t[22]=e,t[23]=f):f=t[23];let b;t[24]!==e?(b=e("Dashboards"),t[24]=e,t[25]=b):b=t[25];let y;t[26]!==e?(y=e("Data"),t[26]=e,t[27]=y):y=t[27];let x;t[28]!==e?(x=e("Deployment health"),t[28]=e,t[29]=x):x=t[29];let v;t[30]!==e?(v=e("Log drains"),t[30]=e,t[31]=v):v=t[31];let h;t[32]!==e?(h=e("Export / Import"),t[32]=e,t[33]=h):h=t[33];let m;t[34]!==e?(m=e("Fan-out"),t[34]=e,t[35]=m):m=t[35];let w;t[36]!==e?(w=e("Files"),t[36]=e,t[37]=w):w=t[37];let P;t[38]!==e?(P=e("Flags"),t[38]=e,t[39]=P):P=t[39];let C;t[40]!==e?(C=e("Functions"),t[40]=e,t[41]=C):C=t[41];let S;t[42]!==e?(S=e("Health"),t[42]=e,t[43]=S):S=t[43];let N;t[44]!==e?(N=e("Home"),t[44]=e,t[45]=N):N=t[45];let T;t[46]!==e?(T=e("Performance"),t[46]=e,t[47]=T):T=t[47];let A;t[48]!==e?(A=e("Issues"),t[48]=e,t[49]=A):A=t[49];let L;t[50]!==e?(L=e("KV"),t[50]=e,t[51]=L):L=t[51];let O;t[52]!==e?(O=e("Logs"),t[52]=e,t[53]=O):O=t[53];let V;t[54]!==e?(V=e("Metrics"),t[54]=e,t[55]=V):V=t[55];let B;t[56]!==e?(B=e("Migrations"),t[56]=e,t[57]=B):B=t[57];let z;t[58]!==e?(z=e("Notifications"),t[58]=e,t[59]=z):z=t[59];let $;t[60]!==e?($=e("Organizations"),t[60]=e,t[61]=$):$=t[61];let H;t[62]!==e?(H=e("Time Travel"),t[62]=e,t[63]=H):H=t[63];let D;t[64]!==e?(D=e("Privacy requests"),t[64]=e,t[65]=D):D=t[65];let Z;t[66]!==e?(Z=e("Mail"),t[66]=e,t[67]=Z):Z=t[67];let E;t[68]!==e?(E=e("Payments"),t[68]=e,t[69]=E):E=t[69];let q;t[70]!==e?(q=e("Permissions"),t[70]=e,t[71]=q):q=t[71];let ee;t[72]!==e?(ee=e("Queues"),t[72]=e,t[73]=ee):ee=t[73];let F;t[74]!==e?(F=e("Reactors"),t[74]=e,t[75]=F):F=t[75];let Y;t[76]!==e?(Y=e("Realtime"),t[76]=e,t[77]=Y):Y=t[77];let te;t[78]!==e?(te=e("RLS Policies"),t[78]=e,t[79]=te):te=t[79];let W;t[80]!==e?(W=e("Scheduled"),t[80]=e,t[81]=W):W=t[81];let U;t[82]!==e?(U=e("Schema"),t[82]=e,t[83]=U):U=t[83];let j;t[84]!==e?(j=e("Security"),t[84]=e,t[85]=j):j=t[85];let G;t[86]!==e?(G=e("Settings"),t[86]=e,t[87]=G):G=t[87];let K;t[88]!==e?(K=e("SQL editor"),t[88]=e,t[89]=K):K=t[89];let J;t[90]!==e?(J=e("Traces"),t[90]=e,t[91]=J):J=t[91];let Q;t[92]!==e?(Q=e("Access Rules"),t[92]=e,t[93]=Q):Q=t[93];let X;t[94]!==e?(X=e("Users"),t[94]=e,t[95]=X):X=t[95];let re;t[96]!==e?(re=e("Vectors"),t[96]=e,t[97]=re):re=t[97];let ne;t[98]!==e?(ne=e("Workflows"),t[98]=e,t[99]=ne):ne=t[99];let bt;t[100]!==s||t[101]!==a||t[102]!==p||t[103]!==f||t[104]!==b||t[105]!==y||t[106]!==x||t[107]!==v||t[108]!==h||t[109]!==m||t[110]!==w||t[111]!==P||t[112]!==r||t[113]!==C||t[114]!==S||t[115]!==N||t[116]!==T||t[117]!==A||t[118]!==L||t[119]!==O||t[120]!==V||t[121]!==B||t[122]!==z||t[123]!==n||t[124]!==$||t[125]!==H||t[126]!==D||t[127]!==Z||t[128]!==E||t[129]!==q||t[130]!==ee||t[131]!==F||t[132]!==Y||t[133]!==te||t[134]!==i||t[135]!==W||t[136]!==U||t[137]!==j||t[138]!==G||t[139]!==K||t[140]!==J||t[141]!==Q||t[142]!==X||t[143]!==re||t[144]!==ne||t[145]!==l||t[146]!==c||t[147]!==u||t[148]!==d||t[149]!==g?(bt={advisorHealth:s,agents:a,evals:r,aiUsage:n,analytics:i,api:l,architecture:c,audit:u,authAudit:d,authConfig:g,authSessions:p,containers:f,dashboards:b,data:y,deploymentHealth:x,drains:v,export:h,fanout:m,files:w,flags:P,functions:C,health:S,home:N,insights:T,issues:A,kv:L,logs:O,metrics:V,migrations:B,notifications:z,organizations:$,pitr:H,privacyRequests:D,mail:Z,payments:E,permissions:q,queues:ee,reactors:F,realtime:Y,rls:te,schedule:W,schema:U,security:j,settings:G,sql:K,traces:J,storageRules:Q,users:X,vectors:re,workflows:ne},t[100]=s,t[101]=a,t[102]=p,t[103]=f,t[104]=b,t[105]=y,t[106]=x,t[107]=v,t[108]=h,t[109]=m,t[110]=w,t[111]=P,t[112]=r,t[113]=C,t[114]=S,t[115]=N,t[116]=T,t[117]=A,t[118]=L,t[119]=O,t[120]=V,t[121]=B,t[122]=z,t[123]=n,t[124]=$,t[125]=H,t[126]=D,t[127]=Z,t[128]=E,t[129]=q,t[130]=ee,t[131]=F,t[132]=Y,t[133]=te,t[134]=i,t[135]=W,t[136]=U,t[137]=j,t[138]=G,t[139]=K,t[140]=J,t[141]=Q,t[142]=X,t[143]=re,t[144]=ne,t[145]=l,t[146]=c,t[147]=u,t[148]=d,t[149]=g,t[150]=bt):bt=t[150];const Mt=bt;let ie;t[151]!==e?(ie=e("Advisors"),t[151]=e,t[152]=ie):ie=t[152];let le;t[153]!==e?(le=e("Auth"),t[153]=e,t[154]=le):le=t[154];let ce;t[155]!==e?(ce=e("Database"),t[155]=e,t[156]=ce):ce=t[156];let de;t[157]!==e?(de=e("Functions"),t[157]=e,t[158]=de):de=t[158];let ue;t[159]!==e?(ue=e("Observability"),t[159]=e,t[160]=ue):ue=t[160];let fe;t[161]!==e?(fe=e("Operations"),t[161]=e,t[162]=fe):fe=t[162];let me;t[163]!==e?(me=e("Overview"),t[163]=e,t[164]=me):me=t[164];let he;t[165]!==e?(he=e("Settings"),t[165]=e,t[166]=he):he=t[166];let pe;t[167]!==e?(pe=e("Storage"),t[167]=e,t[168]=pe):pe=t[168];let vt;t[169]!==ie||t[170]!==le||t[171]!==ce||t[172]!==de||t[173]!==ue||t[174]!==fe||t[175]!==me||t[176]!==he||t[177]!==pe?(vt={advisors:ie,auth:le,database:ce,functions:de,observability:ue,operations:fe,overview:me,settings:he,storage:pe},t[169]=ie,t[170]=le,t[171]=ce,t[172]=de,t[173]=ue,t[174]=fe,t[175]=me,t[176]=he,t[177]=pe,t[178]=vt):vt=t[178];const Nt=vt;let ge;t[179]!==e?(ge=e("Score your app's advisor findings: a grade, the coverage split, and every procedure ranked worst-first."),t[179]=e,t[180]=ge):ge=t[180];let be;t[181]!==e?(be=e("Inspect agent threads, message timelines, tool calls, and token usage."),t[181]=e,t[182]=be):be=t[182];let ve;t[183]!==e?(ve=e("Scores recorded by recordEvaluation — the latest verdict per eval, its trend, and the graded runs behind it."),t[183]=e,t[184]=ve):ve=t[184];let xe;t[185]!==e?(xe=e("Tokens and spend from ctx.ai.model calls — totals, per function and per model, and the recent calls behind them."),t[185]=e,t[186]=xe):xe=t[186];let ye;t[187]!==e?(ye=e("Usage and latency from Analytics Engine — request volume, p50/p95, and hot shards."),t[187]=e,t[188]=ye):ye=t[188];let we;t[189]!==e?(we=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[189]=e,t[190]=we):we=t[190];let ke;t[191]!==e?(ke=e("A durable log of admin state-changing operations."),t[191]=e,t[192]=ke):ke=t[192];let Me;t[193]!==e?(Me=e("Authentication and security events — sign-ins, MFA, and session changes."),t[193]=e,t[194]=Me):Me=t[194];let Ne;t[195]!==e?(Ne=e("Enabled plugins and session config (read-only)."),t[195]=e,t[196]=Ne):Ne=t[196];let Se;t[197]!==e?(Se=e("Your modules, and the calls, reads, writes and hand-offs between them, from codegen."),t[197]=e,t[198]=Se):Se=t[198];let Ce;t[199]!==e?(Ce=e("Browse and revoke active sessions across all users."),t[199]=e,t[200]=Ce):Ce=t[200];let Pe;t[201]!==e?(Pe=e("Live Cloudflare Containers — current lifecycle state per instance from the log stream."),t[201]=e,t[202]=Pe):Pe=t[202];let _e;t[203]!==e?(_e=e("Chart widgets backed by saved read-only SQL queries."),t[203]=e,t[204]=_e):_e=t[204];let Te;t[205]!==e?(Te=e("Browse and edit rows across your shard and global tables."),t[205]=e,t[206]=Te):Te=t[206];let Re;t[207]!==e?(Re=e("Live liveness, readiness, and per-binding health from the deployment's /_lunora/health endpoint."),t[207]=e,t[208]=Re):Re=t[208];let Ae;t[209]!==e?(Ae=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[209]=e,t[210]=Ae):Ae=t[210];let Le;t[211]!==e?(Le=e("Export a shard to NDJSON, or import rows from it."),t[211]=e,t[212]=Le):Le=t[212];let Ie;t[213]!==e?(Ie=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[213]=e,t[214]=Ie):Ie=t[214];let Ee;t[215]!==e?(Ee=e("Browse objects in your R2 storage buckets."),t[215]=e,t[216]=Ee):Ee=t[216];let $e;t[217]!==e?($e=e("Inspect feature flags and their live evaluation under a targeting context."),t[217]=e,t[218]=$e):$e=t[218];let He;t[219]!==e?(He=e("Run registered queries, mutations, and actions."),t[219]=e,t[220]=He):He=t[220];let Ve;t[221]!==e?(Ve=e("At-a-glance connection, error, and shard signals."),t[221]=e,t[222]=Ve):Ve=t[222];let Be;t[223]!==e?(Be=e("Connection, health, and advisor summary for your deployment."),t[223]=e,t[224]=Be):Be=t[224];let ze;t[225]!==e?(ze=e("Surface slow functions, error spikes, and cache problems."),t[225]=e,t[226]=ze):ze=t[226];let De;t[227]!==e?(De=e("Grouped error triage — Worker throws and container crashes folded by fingerprint."),t[227]=e,t[228]=De):De=t[228];let Oe;t[229]!==e?(Oe=e("A live stream of recent function logs."),t[229]=e,t[230]=Oe):Oe=t[230];let Ze;t[231]!==e?(Ze=e("Per-shard health and aggregate metrics."),t[231]=e,t[232]=Ze):Ze=t[232];let qe;t[233]!==e?(qe=e("Review migration status and run them."),t[233]=e,t[234]=qe):qe=t[234];let Fe;t[235]!==e?(Fe=e("Registered push devices — endpoint, kind, last-send status, and delivery errors."),t[235]=e,t[236]=Fe):Fe=t[236];let We;t[237]!==e?(We=e("Browse and manage organizations, members, and invitations."),t[237]=e,t[238]=We):We=t[238];let Ue;t[239]!==e?(Ue=e("Restore a shard to a point in the last 30 days."),t[239]=e,t[240]=Ue):Ue=t[240];let je;t[241]!==e?(je=e("Open data-subject export and erasure requests, with due dates and failed-run retries."),t[241]=e,t[242]=je):je=t[242];let Ge;t[243]!==e?(Ge=e("Email your app sent, captured in dev."),t[243]=e,t[244]=Ge):Ge=t[244];let Ke;t[245]!==e?(Ke=e("Synced customers, subscriptions, and webhook events."),t[245]=e,t[246]=Ke):Ke=t[246];let Qe;t[247]!==e?(Qe=e("Inspect access policies per table, and probe a function as any identity."),t[247]=e,t[248]=Qe):Qe=t[248];let Ye;t[249]!==e?(Ye=e("Inspect declared Cloudflare Queues — their producer bindings, consumer mode, and dead-letter queue."),t[249]=e,t[250]=Ye):Ye=t[250];let Je;t[251]!==e?(Je=e("Server-side onQueryChange reactors: what has run, what was suppressed, and what is failing."),t[251]=e,t[252]=Je):Je=t[252];let Xe;t[253]!==e?(Xe=e("Active WebSocket subscriptions on this shard."),t[253]=e,t[254]=Xe):Xe=t[254];let et;t[255]!==e?(et=e("Inspect row-level-security policies and roles, per table."),t[255]=e,t[256]=et):et=t[256];let tt;t[257]!==e?(tt=e("Inspect and cancel scheduled jobs."),t[257]=e,t[258]=tt):tt=t[258];let st;t[259]!==e?(st=e("Inspect each table and its columns."),t[259]=e,t[260]=st):st=t[260];let at;t[261]!==e?(at=e("Review admin gates, credentials, and log redaction."),t[261]=e,t[262]=at):at=t[262];let ot;t[263]!==e?(ot=e("Read-only deployment config — vars, secrets, and bindings."),t[263]=e,t[264]=ot):ot=t[264];let rt;t[265]!==e?(rt=e("Run read-only SQL against a shard."),t[265]=e,t[266]=rt):rt=t[266];let nt;t[267]!==e?(nt=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[267]=e,t[268]=nt):nt=t[268];let it;t[269]!==e?(it=e("Inspect storage access rules — per bucket, operation, and key prefix."),t[269]=e,t[270]=it):it=t[270];let lt;t[271]!==e?(lt=e("Recent ctx.trace waterfalls for this shard — the drill-down from a log line."),t[271]=e,t[272]=lt):lt=t[272];let ct;t[273]!==e?(ct=e("Manage auth users — roles, bans, sessions, and identity."),t[273]=e,t[274]=ct):ct=t[274];let dt;t[275]!==e?(dt=e("Browse Vectorize indexes and run similarity searches."),t[275]=e,t[276]=dt):dt=t[276];let ut;t[277]!==e?(ut=e("Inspect declared Cloudflare Workflows and their bindings."),t[277]=e,t[278]=ut):ut=t[278];let xt;t[279]!==tt||t[280]!==st||t[281]!==at||t[282]!==ot||t[283]!==rt||t[284]!==nt||t[285]!==it||t[286]!==lt||t[287]!==ct||t[288]!==dt||t[289]!==ut||t[290]!==ge||t[291]!==be||t[292]!==ve||t[293]!==xe||t[294]!==ye||t[295]!==we||t[296]!==ke||t[297]!==Me||t[298]!==Ne||t[299]!==Se||t[300]!==Ce||t[301]!==Pe||t[302]!==_e||t[303]!==Te||t[304]!==Re||t[305]!==Ae||t[306]!==Le||t[307]!==Ie||t[308]!==Ee||t[309]!==$e||t[310]!==He||t[311]!==Ve||t[312]!==Be||t[313]!==ze||t[314]!==De||t[315]!==Oe||t[316]!==Ze||t[317]!==qe||t[318]!==Fe||t[319]!==We||t[320]!==Ue||t[321]!==je||t[322]!==Ge||t[323]!==Ke||t[324]!==Qe||t[325]!==Ye||t[326]!==Je||t[327]!==Xe||t[328]!==et?(xt={advisorHealth:ge,agents:be,evals:ve,aiUsage:xe,analytics:ye,api:we,audit:ke,authAudit:Me,authConfig:Ne,architecture:Se,authSessions:Ce,containers:Pe,dashboards:_e,data:Te,deploymentHealth:Re,drains:Ae,export:Le,fanout:Ie,files:Ee,flags:$e,functions:He,health:Ve,home:Be,insights:ze,issues:De,logs:Oe,metrics:Ze,migrations:qe,notifications:Fe,organizations:We,pitr:Ue,privacyRequests:je,mail:Ge,payments:Ke,permissions:Qe,queues:Ye,reactors:Je,realtime:Xe,rls:et,schedule:tt,schema:st,security:at,settings:ot,sql:rt,kv:nt,storageRules:it,traces:lt,users:ct,vectors:dt,workflows:ut},t[279]=tt,t[280]=st,t[281]=at,t[282]=ot,t[283]=rt,t[284]=nt,t[285]=it,t[286]=lt,t[287]=ct,t[288]=dt,t[289]=ut,t[290]=ge,t[291]=be,t[292]=ve,t[293]=xe,t[294]=ye,t[295]=we,t[296]=ke,t[297]=Me,t[298]=Ne,t[299]=Se,t[300]=Ce,t[301]=Pe,t[302]=_e,t[303]=Te,t[304]=Re,t[305]=Ae,t[306]=Le,t[307]=Ie,t[308]=Ee,t[309]=$e,t[310]=He,t[311]=Ve,t[312]=Be,t[313]=ze,t[314]=De,t[315]=Oe,t[316]=Ze,t[317]=qe,t[318]=Fe,t[319]=We,t[320]=Ue,t[321]=je,t[322]=Ge,t[323]=Ke,t[324]=Qe,t[325]=Ye,t[326]=Je,t[327]=Xe,t[328]=et,t[329]=xt):xt=t[329];const St=xt;let yt;return t[330]!==Nt||t[331]!==St||t[332]!==Mt?(yt={groupLabel:Nt,tabDescription:St,tabLabel:Mt},t[330]=Nt,t[331]=St,t[332]=Mt,t[333]=yt):yt=t[333],yt},Aa=()=>{const t=M(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=k("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:[o("rect",{height:"14",rx:"2",width:"20",x:"2",y:"3"}),o("path",{d:"M8 21h8M12 17v4"})]}),t[0]=e):e=t[0],e},La=()=>{const t=M(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=k("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:[o("circle",{cx:"12",cy:"12",r:"4"}),o("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"})]}),t[0]=e):e=t[0],e},Ia=()=>{const t=M(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o("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:o("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"})}),t[0]=e):e=t[0],e},Ea=t=>{const e=M(2),{className:s}=t;let a;return e[0]!==s?(a=o("span",{className:s}),e[0]=s,e[1]=a):a=e[1],a},$a=R(()=>import("../packem_chunks/theme-indicator.mjs").catch(()=>({default:Ea}))),Tt="absolute inset-0 rounded-md border border-muted-foreground/40 bg-background/40",Ha=[{Icon:Aa,value:"system"},{Icon:La,value:"light"},{Icon:Ia,value:"dark"}],Va=()=>{const t=M(21),{theme:e,setTheme:s}=qs(),a=se(),[r,n]=mt(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{n(!0)},t[0]=i):i=t[0];const l=i;let c;t[1]!==a?(c=a("Dark theme"),t[1]=a,t[2]=c):c=t[2];let u;t[3]!==a?(u=a("Light theme"),t[3]=a,t[4]=u):u=t[4];let d;t[5]!==a?(d=a("System theme"),t[5]=a,t[6]=d):d=t[6];let g;t[7]!==c||t[8]!==u||t[9]!==d?(g={dark:c,light:u,system:d},t[7]=c,t[8]=u,t[9]=d,t[10]=g):g=t[10];const p=g;let f;t[11]!==a?(f=a("Theme"),t[11]=a,t[12]=f):f=t[12];let b;t[13]!==r||t[14]!==p||t[15]!==s||t[16]!==e?(b=Ha.map(x=>{const{Icon:v,value:h}=x,m=e===h;return k("button",{"aria-checked":m,"aria-label":p[h],className:_("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",m?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${h}`,onClick:()=>{l(),s(h)},role:"radio",title:p[h],type:"button",children:[m&&(r?o(qt,{fallback:o("span",{className:Tt}),children:o($a,{className:Tt})}):o("span",{className:Tt})),o("span",{className:"relative",children:o(v,{})})]},h)}),t[13]=r,t[14]=p,t[15]=s,t[16]=e,t[17]=b):b=t[17];let y;return t[18]!==f||t[19]!==b?(y=o("div",{"aria-label":f,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",onFocus:l,onPointerEnter:l,role:"radiogroup",children:b}),t[18]=f,t[19]=b,t[20]=y):y=t[20],y},Ba=t=>{const e=M(23),{domain:s,onOpenCommandPalette:a,page:r}=t,n=se();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o(ha,{className:"-ms-1"}),e[0]=i):i=e[0];let l;e[1]!==n?(l=n("Breadcrumb"),e[1]=n,e[2]=l):l=e[2];let c;e[3]!==s?(c=o("span",{className:"text-muted-foreground",children:s}),e[3]=s,e[4]=c):c=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=o("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:o("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"})}),e[5]=u):u=e[5];let d;e[6]!==r?(d=o("span",{className:"font-medium text-foreground",children:r}),e[6]=r,e[7]=d):d=e[7];let g;e[8]!==l||e[9]!==c||e[10]!==d?(g=k("nav",{"aria-label":l,className:"flex items-center gap-1.5 text-[13px]",children:[c,u,d]}),e[8]=l,e[9]=c,e[10]=d,e[11]=g):g=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=k("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[o("circle",{cx:"11",cy:"11",r:"7"}),o("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"})]}),e[12]=p):p=e[12];let f;e[13]!==n?(f=n("Search…"),e[13]=n,e[14]=f):f=e[14];let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=o("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"⌘K"}),e[15]=b):b=e[15];let y;e[16]!==a||e[17]!==f?(y=k("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:a,type:"button",children:[p,f,b]}),e[16]=a,e[17]=f,e[18]=y):y=e[18];let x;e[19]===Symbol.for("react.memo_cache_sentinel")?(x=o("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:o(Va,{})}),e[19]=x):x=e[19];let v;return e[20]!==y||e[21]!==g?(v=k("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[i,g,y,x]}),e[20]=y,e[21]=g,e[22]=v):v=e[22],v},za={agents:{capability:"agents"},analytics:{capability:"analytics",feature:"analytics"},authAudit:{feature:"auth"},authConfig:{feature:"auth"},authSessions:{feature:"auth"},containers:{capability:"containers",feature:"containers"},fanout:{capability:"crossShardFanout"},files:{capability:"objectStorage",feature:"storage"},flags:{feature:"flags"},kv:{capability:"keyValueStore",feature:"kv"},mail:{capability:"mail",feature:"mail"},notifications:{feature:"notifications"},organizations:{feature:"auth"},payments:{feature:"payments"},pitr:{capability:"pointInTimeRecovery"},privacyRequests:{feature:"privacy"},queues:{capability:"queues",feature:"queues"},reactors:{capability:"serverReactors"},schedule:{capability:"scheduler",feature:"scheduler"},storageRules:{feature:"storage"},users:{feature:"auth"},vectors:{capability:"vectorStore",feature:"vectors"},workflows:{capability:"workflows",feature:"workflows"}},Da={agents:"Durable agents",analytics:"Analytics",containers:"Containers",crossShardFanout:"Cross-shard fan-out",keyValueStore:"Key-value storage",mail:"Mail delivery",objectStorage:"Object storage",pointInTimeRecovery:"Point-in-time recovery",queues:"Queues",scheduler:"Scheduling",serverReactors:"Server reactors",vectorStore:"Vector search",workflows:"Workflows"},Oa={kind:"hidden"},zt={kind:"ok"},Za={kind:"pending"},is=(t,e,s)=>{const a=za[t];return a?.feature!==void 0&&!e[a.feature]?Oa:a?.capability===void 0?zt:e.settled?e.platform?.unsupported.includes(a.capability)===!0?{kind:"unavailable",reason:s("{capability} is not supported on {platform}.",{capability:s(Da[a.capability]),platform:e.platform.name})}:zt:Za},qa=(t,e,s)=>{const a={},r=[];for(const n of t){const i=[];for(const l of n.tabs){const c=is(l,e,s);c.kind!=="hidden"&&i.push(l),c.kind==="unavailable"&&(a[l]=c.reason)}i.length>0&&r.push({...n,tabs:i})}return{unavailable:a,visibleGroups:r}},Fa=t=>{const e=M(3),{reason:s,title:a}=t;let r;return e[0]!==s||e[1]!==a?(r=o(Es,{description:s,testId:"dash-unsupported",title:a}),e[0]=s,e[1]=a,e[2]=r):r=e[2],r},Wa=t=>{const e=M(4),{console:s}=$s();let a,r;e[0]!==s||e[1]!==t?(a=()=>{if(t===void 0)return;const n=i=>{if(!i.ctrlKey||i.metaKey||i.altKey||i.shiftKey||i.repeat||i.key.toLowerCase()!==s)return;const{target:l}=i;l instanceof HTMLElement&&(l.isContentEditable||["INPUT","SELECT","TEXTAREA"].includes(l.tagName))||(i.preventDefault(),t())};return globalThis.addEventListener("keydown",n),()=>{globalThis.removeEventListener("keydown",n)}},r=[s,t],e[0]=s,e[1]=t,e[2]=a,e[3]=r):(a=e[2],r=e[3]),ht(a,r)},I=(t,e)=>R(()=>t().then(s=>({default:s[e]}))),Ua=I(()=>import("../packem_chunks/InsightsPanel.mjs"),"InsightsPanel"),ja=R(()=>import("../packem_chunks/rls-panel.mjs")),Ga=R(()=>import("../packem_chunks/AdvisorHealthPanel.mjs")),Ka=R(()=>import("../packem_chunks/SecurityAdvisorPanel.mjs")),Qa=R(()=>import("../packem_chunks/agents-panel.mjs")),Ya=I(()=>import("../packem_chunks/analytics-panel.mjs"),"AnalyticsPanel"),Ja=R(()=>import("../packem_chunks/ApiTab.mjs")),Xa=R(()=>import("../packem_chunks/architecture-panel.mjs")),eo=R(()=>import("../packem_chunks/auth-audit-panel.mjs")),to=R(()=>import("../packem_chunks/auth-config-panel.mjs")),so=R(()=>import("../packem_chunks/auth-sessions-panel.mjs")),ao=R(()=>import("../packem_chunks/organizations-panel.mjs")),oo=I(()=>import("../packem_chunks/users-panel.mjs"),"UsersPanel"),ro=R(()=>import("../packem_chunks/containers-panel.mjs")),no=I(()=>import("../packem_chunks/DeploymentHealthPanel.mjs"),"DeploymentHealthPanel"),io=I(()=>import("../packem_chunks/TableEditor.mjs"),"TableEditor"),lo=I(()=>import("../packem_chunks/ExportImportPanel.mjs"),"ExportImportPanel"),co=R(()=>import("../packem_chunks/migrations-route.mjs")),uo={data:As,migrations:Rs},fo=I(()=>import("../packem_chunks/PitrPanel.mjs"),"PitrPanel"),mo=I(()=>import("../packem_chunks/privacy-requests-panel.mjs"),"PrivacyRequestsPanel"),ho=R(()=>import("../packem_chunks/flags-panel.mjs")),po=R(()=>import("../packem_chunks/reactors-panel.mjs")),go=I(()=>import("../packem_chunks/FunctionRunner.mjs"),"FunctionRunner"),bo=I(()=>import("../packem_chunks/FunctionStatsPanel.mjs"),"FunctionStatsPanel"),vo=R(()=>import("../packem_chunks/issues-panel.mjs")),xo=I(()=>import("../packem_chunks/AuditPanel.mjs"),"AuditPanel"),yo=R(()=>import("../packem_chunks/log-drains-panel.mjs")),wo=R(()=>import("../packem_chunks/LogsPanel.mjs").then(t=>({default:t.LogsPanel}))),ko=I(()=>import("../packem_chunks/MailPanel.mjs"),"MailPanel"),Mo=I(()=>import("../packem_chunks/schedule-panel.mjs"),"SchedulePanel"),No=R(()=>import("../packem_chunks/subscriptions-panel.mjs")),So=R(()=>import("../packem_chunks/sync-client-panel.mjs")),Co=I(()=>import("../packem_chunks/kv-browser.mjs"),"KvBrowser"),Po=R(()=>import("../packem_chunks/NotificationsPanel.mjs")),_o=I(()=>import("../packem_chunks/payments-panel.mjs"),"PaymentsPanel"),To=I(()=>import("../packem_chunks/permissions-panel.mjs"),"PermissionsPanel"),Ro=R(()=>import("../packem_chunks/queues-panel.mjs")),Ao=R(()=>import("../packem_chunks/dashboards-panel.mjs")),Lo=R(()=>import("../packem_chunks/fanout-panel.mjs")),Io=I(()=>import("../packem_chunks/HealthPanel.mjs"),"HealthPanel"),Eo=I(()=>import("../packem_chunks/MetricsPanel.mjs"),"MetricsPanel"),$o=I(()=>import("../packem_chunks/SchemaViewer.mjs"),"SchemaViewer"),Ho=I(()=>import("../packem_chunks/SettingsPanel.mjs"),"SettingsPanel"),Vo=I(()=>import("../packem_chunks/SqlEditorPanel.mjs"),"SqlEditorPanel"),Bo=I(()=>import("../packem_chunks/FileBrowser.mjs"),"FileBrowser"),zo=R(()=>import("../packem_chunks/storage-rules-panel.mjs")),Do=R(()=>import("../packem_chunks/traces-panel.mjs")),Oo=R(()=>import("../packem_chunks/evals-panel.mjs")),Zo=R(()=>import("../packem_chunks/ai-usage-panel.mjs")),qo=I(()=>import("../packem_chunks/vector-browser.mjs"),"VectorBrowser"),Fo=R(()=>import("../packem_chunks/workflows-panel.mjs")),ls=Zt(null),Wo={analytics:o("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),api:o("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4M13 5l-2 14"}),architecture:o("path",{d:"M4 4h6v5H4V4Zm10 0h6v5h-6V4ZM9 15h6v5H9v-5ZM7 9v3h10V9M12 12v3"}),audit:o("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"}),authAudit:o("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"}),authConfig:o("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"}),agents:o("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"}),authSessions:o("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),containers:o("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"}),dashboards:o("path",{d:"M4 5h7v6H4V5Zm9 0h7v4h-7V5ZM4 14h7v5H4v-5Zm9-1h7v6h-7v-6Z"}),deploymentHealth:o("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"}),drains:o("path",{d:"M5 5h14M7 5v6a5 5 0 0 0 10 0V5M10 16h4v3h-4zM12 19v2"}),data:o("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"}),export:o("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"}),fanout:o("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"}),files:o("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"}),flags:o("path",{d:"M6 21V4m0 0h11l-2 3 2 3H6"}),functions:o("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4"}),evals:o("path",{d:"M4 19V5m0 14h16M8 15l3-4 3 3 4-6M8 15v.01"}),aiUsage:o("path",{d:"M12 3v3m0 12v3M5.6 5.6l2.1 2.1m8.6 8.6 2.1 2.1M3 12h3m12 0h3M5.6 18.4l2.1-2.1m8.6-8.6 2.1-2.1M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z"}),health:o("path",{d:"M3 12h4l2 6 4-14 2 8h6"}),home:o("path",{d:"M3 11.5 12 4l9 7.5M5 10v9a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1v-9"}),insights:o("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"}),issues:o("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"}),kv:o("path",{d:"M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"}),logs:o("path",{d:"M5 6h14M5 10h14M5 14h9M5 18h11"}),mail:o("path",{d:"M4 5h16v14H4V5Zm0 1.5 8 6 8-6"}),payments:o("path",{d:"M3 7h18v10H3V7Zm0 3h18M7 14h4"}),metrics:o("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),migrations:o("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"}),notifications:o("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"}),organizations:o("path",{d:"M3 21V8l6-4 6 4v13M9 21v-5h2v5M15 11h6v10M18 14v.01M18 17v.01M6 9v.01M6 12v.01M6 15v.01"}),permissions:o("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"}),pitr:o("path",{d:"M12 21a9 9 0 1 0-9-9M12 7.5V12l3 2M3 12l-2-2m2 2 2-2"}),privacyRequests:o("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 3h4"}),queues:o("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"}),reactors:o("path",{d:"M4 4v6h6M20 20v-6h-6M20 9a8 8 0 0 0-14.7-3M4 15a8 8 0 0 0 14.7 3"}),realtime:o("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"}),rls:o("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"}),schedule:o("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),schema:o("path",{d:"M4 5h16v14H4V5Zm0 5h16M10 10v9M4 14.5h16"}),sql:o("path",{d:"M4 5h16v14H4V5Zm3 4 3 3-3 3m6 0h4"}),storageRules:o("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"}),advisorHealth:o("path",{d:"M3 12h4l2-5 3 10 2-5h5"}),security:o("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"}),traces:o("path",{d:"M3 6h9M6 12h12M10 18h7"}),settings:o("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"}),users:o("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"}),vectors:o("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"}),workflows:o("path",{d:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM7.5 10v2a2 2 0 0 0 2 2H14m2.5-4V8a2 2 0 0 0-2-2H10"})},Dt=[{key:"overview",tabs:["home","dashboards"]},{key:"database",tabs:["data","sql","schema","migrations","vectors","pitr","export"]},{key:"functions",tabs:["functions","api","architecture","workflows","agents","queues"]},{key:"auth",tabs:["users","organizations","authSessions","authAudit","authConfig"]},{key:"storage",tabs:["files","storageRules","kv"]},{key:"observability",tabs:["issues","logs","traces","evals","aiUsage","audit","realtime","reactors","fanout","containers","metrics","analytics","health","deploymentHealth"]},{key:"advisors",tabs:["advisorHealth","security","rls","permissions","insights"]},{key:"operations",tabs:["schedule","mail","drains","notifications","payments","flags","privacyRequests"]},{key:"settings",tabs:["settings"]}],At=t=>{const e=M(2),{tab:s}=t,a=Wo[s];let r;return e[0]!==a?(r=o("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:a}),e[0]=a,e[1]=r):r=e[1],r},Uo=t=>t,cs=Uo(["home","data","sql","functions","api","architecture","workflows","agents","queues","containers","schema","migrations","vectors","export","pitr","users","organizations","authSessions","authAudit","authConfig","files","storageRules","kv","dashboards","metrics","analytics","health","deploymentHealth","advisorHealth","security","rls","permissions","insights","issues","logs","traces","evals","aiUsage","reactors","realtime","fanout","mail","notifications","payments","audit","schedule","drains","flags","privacyRequests","settings"]),jo=new Set(["api","data","migrations","sql"]),Go=t=>{const e=t.split("/").findLast(Boolean)??"";return cs.includes(e)?e:"home"},Ko=t=>{const e=M(19),{chrome:s,connected:a}=t,r=se();let n;e[0]!==r?(n=r("admin token"),e[0]=r,e[1]=n):n=e[1];let i;e[2]!==n?(i=o("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:n}),e[2]=n,e[3]=i):i=e[3];let l;e[4]!==s.onTokenChange||e[5]!==s.token?(l=o(Ut,{className:"h-8","data-testid":"dash-app-token",id:"dash-app-token",onChange:s.onTokenChange,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:s.token}),e[4]=s.onTokenChange,e[5]=s.token,e[6]=l):l=e[6];let c;e[7]!==a||e[8]!==r?(c=a&&k("p",{className:"flex items-start gap-1.5 text-[11px] text-muted-foreground","data-testid":"dash-app-token-warning",role:"note",children:[o("span",{"aria-hidden":"true",className:"text-warning",children:"⚠"}),r("Token rides the WebSocket URL — it can surface in browser DevTools and server logs. Use a dev-only token.")]}),e[7]=a,e[8]=r,e[9]=c):c=e[9];let u;e[10]!==s.clearToken||e[11]!==a||e[12]!==r?(u=a&&o("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:s.clearToken,type:"button",children:r("Clear")}),e[10]=s.clearToken,e[11]=a,e[12]=r,e[13]=u):u=e[13];let d;return e[14]!==i||e[15]!==l||e[16]!==c||e[17]!==u?(d=k("div",{className:"flex flex-col gap-2",children:[i,l,c,u]}),e[14]=i,e[15]=l,e[16]=c,e[17]=u,e[18]=d):d=e[18],d},ds="opacity-50",Qo=t=>{const e=M(27),{current:s,group:a,groupLabel:r,selectTab:n,tabDescription:i,tabLabel:l,unavailable:c}=t,u=a.tabs.includes(s)?"page":void 0,d=r[a.key],g=a.tabs[0];let p;e[0]!==g?(p=o(At,{tab:g}),e[0]=g,e[1]=p):p=e[1];let f;e[2]!==u||e[3]!==d||e[4]!==p?(f=o(as,{"aria-current":u,"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:p}),e[2]=u,e[3]=d,e[4]=p,e[5]=f):f=e[5];const b=r[a.key];let y;e[6]!==b?(y=o("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:b}),e[6]=b,e[7]=y):y=e[7];let x;if(e[8]!==s||e[9]!==a.tabs||e[10]!==n||e[11]!==i||e[12]!==l||e[13]!==c){let m;e[15]!==s||e[16]!==n||e[17]!==i||e[18]!==l||e[19]!==c?(m=w=>k("button",{"aria-current":s===w?"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",c[w]!==void 0&&ds),"data-tab":w,"data-testid":`dash-tab-${w}`,"data-unsupported":c[w]===void 0?void 0:"true",onClick:n,title:i[w],type:"button",children:[o(At,{tab:w}),o("span",{children:l[w]})]},w),e[15]=s,e[16]=n,e[17]=i,e[18]=l,e[19]=c,e[20]=m):m=e[20],x=a.tabs.map(m),e[8]=s,e[9]=a.tabs,e[10]=n,e[11]=i,e[12]=l,e[13]=c,e[14]=x}else x=e[14];let v;e[21]!==y||e[22]!==x?(v=k(os,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[y,x]}),e[21]=y,e[22]=x,e[23]=v):v=e[23];let h;return e[24]!==f||e[25]!==v?(h=k(ss,{children:[f,v]}),e[24]=f,e[25]=v,e[26]=h):h=e[26],h},Yo=t=>{const e=M(45),{chrome:s,collapsed:a,connected:r}=t,n=se();if(s===null){let m;e[0]!==n?(m=n("Admin"),e[0]=n,e[1]=m):m=e[1];let w;e[2]===Symbol.for("react.memo_cache_sentinel")?(w=o("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"}),e[2]=w):w=e[2];let P;e[3]!==n?(P=n("Admin"),e[3]=n,e[4]=P):P=e[4];let C;e[5]!==P?(C=o("span",{className:"truncate text-[13px] font-medium",children:P}),e[5]=P,e[6]=C):C=e[6];let S;e[7]!==n?(S=n("Studio"),e[7]=n,e[8]=S):S=e[8];let N;e[9]!==S?(N=o("span",{className:"truncate text-[11px] text-muted-foreground",children:S}),e[9]=S,e[10]=N):N=e[10];let T;e[11]!==C||e[12]!==N?(T=k("span",{className:"grid flex-1 text-start leading-tight",children:[C,N]}),e[11]=C,e[12]=N,e[13]=T):T=e[13];let A;return e[14]!==m||e[15]!==T?(A=k(ns,{className:"data-active:bg-transparent",size:"lg",tooltip:m,children:[w,T]}),e[14]=m,e[15]=T,e[16]=A):A=e[16],A}const i=a?"mx-auto size-8 justify-center":"w-full p-2";let l;e[17]!==i?(l=_("flex items-center gap-2 rounded-md text-start outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent",i),e[17]=i,e[18]=l):l=e[18];let c;e[19]!==r||e[20]!==n?(c=n(r?"Connected":"Not connected"),e[19]=r,e[20]=n,e[21]=c):c=e[21];const u=r?"bg-success":"bg-muted-foreground/50";let d;e[22]!==u?(d=_("absolute -end-0.5 -bottom-0.5 size-2.5 rounded-full border-2 border-sidebar",u),e[22]=u,e[23]=d):d=e[23];let g;e[24]!==d?(g=k("span",{className:"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:["C",o("span",{"aria-hidden":"true",className:d})]}),e[24]=d,e[25]=g):g=e[25];let p;e[26]!==a||e[27]!==r||e[28]!==n?(p=!a&&k(Ft,{children:[k("span",{className:"grid flex-1 text-start leading-tight",children:[o("span",{className:"truncate text-[13px] font-medium",children:n("Admin")}),o("span",{className:"truncate text-[11px] text-muted-foreground",children:n(r?"Connected":"Not connected")})]}),o("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:o("path",{d:"m8 9 4-4 4 4M8 15l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e[26]=a,e[27]=r,e[28]=n,e[29]=p):p=e[29];let f;e[30]!==l||e[31]!==c||e[32]!==g||e[33]!==p?(f=k(as,{className:l,"data-testid":"dash-app-connect",title:c,children:[g,p]}),e[30]=l,e[31]=c,e[32]=g,e[33]=p,e[34]=f):f=e[34];const b=a?"end":"start",y=a?"right":"top";let x;e[35]!==s||e[36]!==r?(x=o(Ko,{chrome:s,connected:r}),e[35]=s,e[36]=r,e[37]=x):x=e[37];let v;e[38]!==y||e[39]!==x||e[40]!==b?(v=o(os,{align:b,keepMounted:!0,side:y,children:x}),e[38]=y,e[39]=x,e[40]=b,e[41]=v):v=e[41];let h;return e[42]!==v||e[43]!==f?(h=k(ss,{children:[f,v]}),e[42]=v,e[43]=f,e[44]=h):h=e[44],h},Jo=t=>{const e=M(29),{chrome:s,connected:a,current:r,groupLabel:n,groups:i,selectTab:l,tabDescription:c,tabLabel:u,unavailable:d}=t,g=se(),{state:p}=kt(),f=p==="collapsed",b=f&&"justify-center px-0";let y;e[0]!==b?(y=_("flex items-center gap-2.5 px-1.5 py-1",b),e[0]=b,e[1]=y):y=e[1];let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=o(js,{className:"size-9 shrink-0 text-foreground"}),e[2]=x):x=e[2];let v;e[3]!==f||e[4]!==a||e[5]!==g?(v=!f&&k(Ft,{children:[k("span",{className:"grid flex-1 leading-tight",children:[o("span",{className:"truncate text-sm font-semibold text-foreground",children:"lunora"}),o("span",{className:"truncate text-[11px] text-muted-foreground",children:g("Studio")})]}),o(gt,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:g(a?"Live":"Local")})]}),e[3]=f,e[4]=a,e[5]=g,e[6]=v):v=e[6];let h;e[7]!==y||e[8]!==v?(h=o(ga,{children:k("div",{className:y,children:[x,v]})}),e[7]=y,e[8]=v,e[9]=h):h=e[9];let m;e[10]!==f||e[11]!==r||e[12]!==n||e[13]!==i||e[14]!==l||e[15]!==c||e[16]!==u||e[17]!==d?(m=f?i.map(S=>o(Qo,{current:r,group:S,groupLabel:n,selectTab:l,tabDescription:c,tabLabel:u,unavailable:d},S.key)):i.map(S=>k(xa,{children:[o(ya,{className:"text-[11px] font-medium tracking-wider uppercase",children:n[S.key]}),o(wa,{children:o(Vt,{children:S.tabs.map(N=>o(Bt,{children:k(ns,{className:_("data-active:text-foreground dark:data-active:text-royal-amethyst data-active:shadow-[inset_2px_0_0_0_var(--royal-amethyst)]",d[N]!==void 0&&ds),"data-tab":N,"data-testid":`dash-tab-${N}`,"data-unsupported":d[N]===void 0?void 0:"true",isActive:r===N,onClick:l,title:c[N],tooltip:c[N],children:[o(At,{tab:N}),o("span",{children:u[N]})]})},N))})})]},S.key)),e[10]=f,e[11]=r,e[12]=n,e[13]=i,e[14]=l,e[15]=c,e[16]=u,e[17]=d,e[18]=m):m=e[18];let w;e[19]!==m?(w=o(va,{children:m}),e[19]=m,e[20]=w):w=e[20];let P;e[21]!==s||e[22]!==f||e[23]!==a?(P=o(ba,{children:o(Vt,{children:o(Bt,{children:o(Yo,{chrome:s,collapsed:f,connected:a})})})}),e[21]=s,e[22]=f,e[23]=a,e[24]=P):P=e[24];let C;return e[25]!==h||e[26]!==w||e[27]!==P?(C=k(ma,{collapsible:"icon",variant:"inset",children:[h,w,P]}),e[25]=h,e[26]=w,e[27]=P,e[28]=C):C=e[28],C},Et=()=>{const t=M(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=k("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[k("div",{className:"flex items-center gap-2",children:[o(Ct,{className:"h-8 w-40"}),o(Ct,{className:"h-8 w-24"})]}),o(Ct,{className:"h-72 w-full"})]}),t[0]=e):e=t[0],e},Xo=t=>{const e=M(5),{title:s,verdict:a}=t;if(a.kind==="pending"){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o(Et,{}),e[0]=n):n=e[0],n}if(a.kind==="unavailable"){let n;return e[1]!==s||e[2]!==a.reason?(n=o(Fa,{reason:a.reason,title:s}),e[1]=s,e[2]=a.reason,e[3]=n):n=e[3],n}let r;return e[4]===Symbol.for("react.memo_cache_sentinel")?(r=o(vs,{}),e[4]=r):r=e[4],r},er=()=>{const t=M(46),e=se(),s=Ot();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:nr},t[0]=a):a=t[0];const r=bs(a),n=Go(r),i=jo.has(n),l=ks(),c=l?.toggle;Wa(c);const u=Ps(),{groupLabel:d,tabDescription:g,tabLabel:p}=Ra(),{unavailable:f,visibleGroups:b}=qa(Dt,u,e),y={...g,...f},x=is(n,u,e),v=x.kind==="hidden";let h,m;t[1]!==v||t[2]!==s?(h=()=>{v&&Rt(s({replace:!0,to:"/home"}))},m=[v,s],t[1]=v,t[2]=s,t[3]=h,t[4]=m):(h=t[3],m=t[4]),ht(h,m);let w;t[5]!==s?(w=Q=>{Rt(s({to:`/${Q.currentTarget.dataset.tab??""}`}))},t[5]=s,t[6]=w):w=t[6];const P=w;let C,S;t[7]!==n||t[8]!==p?(C=()=>{typeof document<"u"&&(document.title=`${p[n]} · lunora`)},S=[n,p],t[7]=n,t[8]=p,t[9]=C,t[10]=S):(C=t[9],S=t[10]),ht(C,S);const N=b.find(Q=>Q.tabs.includes(n))??Dt[0],T=b.flatMap(Q=>Q.tabs.filter(X=>f[X]===void 0).map(X=>({group:d[Q.key],label:p[X],to:`/${X}`}))),A=c===void 0?T:[...T,{group:e("Operations"),label:e("Toggle operation console"),run:c}],L=Lt(ls),O=L!==null&&L.token!=="";let V;t[11]!==A?(V=o(Ls,{items:A}),t[11]=A,t[12]=V):V=t[12];const B=d[N.key],z=p[n];let $;t[13]!==B||t[14]!==z?($=o(Ba,{domain:B,onOpenCommandPalette:Is,page:z}),t[13]=B,t[14]=z,t[15]=$):$=t[15];let H;t[16]!==L?.rulesInstalled?(H=L?.rulesInstalled===!1&&o(Qs,{}),t[16]=L?.rulesInstalled,t[17]=H):H=t[17];const D=`dash-tab-${n}`,Z=i?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",E=p[n];let q;t[18]!==e||t[19]!==E?(q=e("{title} failed",{title:E}),t[18]=e,t[19]=E,t[20]=q):q=t[20];const ee=p[n];let F;t[21]!==e?(F=e("Try again"),t[21]=e,t[22]=F):F=t[22];let Y;t[23]===Symbol.for("react.memo_cache_sentinel")?(Y=o(Et,{}),t[23]=Y):Y=t[23];const te=p[n];let W;t[24]!==te||t[25]!==x?(W=o(qt,{fallback:Y,children:o(Xo,{title:te,verdict:x})}),t[24]=te,t[25]=x,t[26]=W):W=t[26];let U;t[27]!==n||t[28]!==q||t[29]!==ee||t[30]!==F||t[31]!==W?(U=o(ys,{fallbackTitle:q,label:ee,retryLabel:F,children:W},n),t[27]=n,t[28]=q,t[29]=ee,t[30]=F,t[31]=W,t[32]=U):U=t[32];let j;t[33]!==Z||t[34]!==U?(j=o("div",{className:Z,children:U}),t[33]=Z,t[34]=U,t[35]=j):j=t[35];let G;t[36]!==l?(G=l?.open===!0&&o(Pa,{focusSeq:l.focusSeq,onClose:l.close,onShownChange:l.setShown,shown:l.shown}),t[36]=l,t[37]=G):G=t[37];let K;t[38]!==D||t[39]!==j||t[40]!==G?(K=k("div",{"aria-labelledby":D,className:"flex min-w-0 flex-1 flex-col overflow-hidden","data-testid":"dash-panel",id:"dash-panel",role:"tabpanel",children:[j,G]}),t[38]=D,t[39]=j,t[40]=G,t[41]=K):K=t[41];let J;return t[42]!==H||t[43]!==K||t[44]!==$?(J=k(pa,{className:"overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[$,H,K]}),t[42]=H,t[43]=K,t[44]=$,t[45]=J):J=t[45],k(fa,{className:"min-h-0 flex-1","data-platform":u.platform?.id,"data-testid":"lunora-studio",children:[V,o(Jo,{chrome:L,connected:O,current:n,groupLabel:d,groups:b,selectTab:P,tabDescription:y,tabLabel:p,unavailable:f}),J]})},tr=()=>{const t=M(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o(ws,{children:o(er,{})}),t[0]=e):e=t[0],e},sr=t=>{const e=M(5),{initialShardKey:s,schemaEditable:a}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const n=ps(r),{table:i}=n,l=typeof i=="string"?i:void 0;let c;return e[1]!==s||e[2]!==l||e[3]!==a?(c=o($o,{initialShardKey:s,initialTable:l,schemaEditable:a}),e[1]=s,e[2]=l,e[3]=a,e[4]=c):c=e[4],c},ar=()=>{const t=M(3),e=Ot();let s,a;return t[0]!==e?(s=()=>{Rt(e({replace:!0,to:"/home"}))},a=[e],t[0]=e,t[1]=s,t[2]=a):(s=t[1],a=t[2]),ht(s,a),null},or=({analyticsSqlQuery:t,basePath:e,privacyRequests:s,dataEditable:a=!1,functions:r,initialShardKey:n,openApiSpec:i,openRpcSpec:l,runAsIdentity:c=!1,schemaEditable:u=!1,scheduledCancel:d,scheduledCron:g,scheduledLoad:p})=>{const f=us({component:tr}),b={agents:o(Qa,{initialShardKey:n}),analytics:o(Ya,{runQuery:t}),api:o(Ja,{functions:r,initialShardKey:n,openApiSpec:i,openRpcSpec:l}),architecture:o(Xa,{}),audit:o(xo,{initialShardKey:n}),authAudit:o(eo,{}),authConfig:o(to,{}),authSessions:o(so,{}),containers:o(ro,{}),dashboards:o(Ao,{initialShardKey:n}),data:o(io,{canGenerateRows:a&&u,editable:a,initialShardKey:n}),deploymentHealth:o(no,{}),drains:o(yo,{}),export:o(lo,{initialShardKey:n}),fanout:o(Lo,{initialShardKey:n}),files:o(Bo,{}),kv:o(Co,{}),flags:o(ho,{initialShardKey:n}),reactors:o(po,{initialShardKey:n}),functions:k("div",{className:"flex flex-col gap-8",children:[o(bo,{functions:r,initialShardKey:n}),o(go,{functions:r,runAsIdentity:c})]}),health:o(Io,{initialShardKey:n}),home:o(Cs,{initialShardKey:n}),insights:o(Ua,{initialShardKey:n}),issues:o(vo,{initialShardKey:n}),logs:o(wo,{initialShardKey:n}),traces:o(Do,{initialShardKey:n}),evals:o(Oo,{initialShardKey:n}),aiUsage:o(Zo,{initialShardKey:n}),metrics:o(Eo,{initialShardKey:n}),migrations:o(co,{initialShardKey:n}),notifications:o(Po,{}),organizations:o(ao,{}),permissions:o(To,{functions:r,runAsIdentity:c,schemaEditable:u}),pitr:o(fo,{initialShardKey:n}),privacyRequests:o(mo,{source:s}),mail:o(ko,{}),payments:o(_o,{}),queues:o(Ro,{}),realtime:k("div",{className:"flex flex-col gap-8",children:[o(No,{initialShardKey:n}),o(So,{})]}),rls:o(ja,{}),schedule:o(Mo,{loadCronJobs:g,scheduledCancel:d,scheduledLoad:p}),schema:o(sr,{initialShardKey:n,schemaEditable:u}),advisorHealth:o(Ga,{}),security:o(Ka,{}),settings:o(Ho,{initialShardKey:n}),sql:o(Vo,{initialShardKey:n}),storageRules:o(zo,{}),users:o(oo,{}),vectors:o(qo,{}),workflows:o(Fo,{})},y=$t({component:()=>b.home,getParentRoute:()=>f,path:"/"}),x=cs.map(m=>$t({component:()=>b[m],getParentRoute:()=>f,path:`/${m}`,validateSearch:uo[m]})),v=f.addChildren([y,...x]),h="window"in globalThis?fs():ms({initialEntries:["/home"]});return hs({...e===void 0||e==="/"?{}:{basepath:e},defaultNotFoundComponent:ar,defaultPendingComponent:Et,defaultPendingMinMs:0,defaultPendingMs:0,history:h,routeTree:v})},rr=t=>{const e=M(19),{analyticsSqlQuery:s,basePath:a,chrome:r,dataEditable:n,functions:i,initialShardKey:l,openApiSpec:c,openRpcSpec:u,privacyRequests:d,runAsIdentity:g,schemaEditable:p,scheduledCancel:f,scheduledCron:b,scheduledLoad:y}=t;let x;e[0]!==s||e[1]!==a||e[2]!==n||e[3]!==i||e[4]!==l||e[5]!==c||e[6]!==u||e[7]!==d||e[8]!==g||e[9]!==f||e[10]!==b||e[11]!==y||e[12]!==p?(x=or({analyticsSqlQuery:s,basePath:a,privacyRequests:d,dataEditable:n,functions:i,initialShardKey:l,openApiSpec:c,openRpcSpec:u,runAsIdentity:g,schemaEditable:p,scheduledCancel:f,scheduledCron:b,scheduledLoad:y}),e[0]=s,e[1]=a,e[2]=n,e[3]=i,e[4]=l,e[5]=c,e[6]=u,e[7]=d,e[8]=g,e[9]=f,e[10]=b,e[11]=y,e[12]=p,e[13]=x):x=e[13];const v=x,h=r??null;let m;e[14]!==v?(m=o(gs,{router:v}),e[14]=v,e[15]=m):m=e[15];let w;return e[16]!==h||e[17]!==m?(w=o(ls,{value:h,children:m}),e[16]=h,e[17]=m,e[18]=w):w=e[18],w},Vr=t=>{const e=M(10);let s,a,r;e[0]!==t?({i18n:s,locale:a,...r}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=r):(s=e[1],a=e[2],r=e[3]);let n;e[4]!==r?(n=o(Zs,{children:o(rr,{...r})}),e[4]=r,e[5]=n):n=e[5];const i=n;if(s===void 0&&a===void 0)return i;let l;return e[6]!==s||e[7]!==a||e[8]!==i?(l=o(Ts,{i18n:s,locale:a,children:i}),e[6]=s,e[7]=a,e[8]=i,e[9]=l):l=e[9],l};function nr(t){return t.location.pathname}export{js as B,Vr as S,Os as T,Hr as a,Xs as b,sa as c,aa as d,oa as e,qs as u};
|
package/dist/packem_shared/{table-list-sidebar-B7IOSxLN.mjs → table-list-sidebar-nA7g7uSk.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $}from"react/compiler-runtime";import{useT as O}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import{l as q,f as H,b as Q}from"./internal-BXEjuLPN.mjs";import{jsx as p,jsxs as S}from"react/jsx-runtime";import{useState as E,useRef as D,useMemo as Y}from"react";import{settlePolls as G}from"./DEFAULT_AUTO_REFRESH_MS-DvhNw0BI.mjs";import{u as J}from"./use-mirrored-ref-CVDf2z1M.mjs";import{u as K}from"./use-admin-query-CLStXJ7v.mjs";import{ADMIN_FUNCTIONS as Z}from"./ADMIN_FUNCTIONS-B8yyk5BX.mjs";import{useVirtualizer as X}from"@tanstack/react-virtual";import{c as ee}from"./utils-bhneXptQ.mjs";import{f as te}from"./virtual-rect-D_j7aLxX.mjs";const re=2166136261,se=16777619,L=(s,e=re)=>{let t=e;for(let r=0;r<s.length;r+=1)t^=s.charCodeAt(r),t=Math.imul(t,se);return(t>>>0).toString(16).padStart(8,"0")},ne=/([a-z\d])([A-Z])/gu,oe=/[\s_-]+/u,le=new Set(["access_token","api_key","apikey","card_number","client_secret","credit_card","cvv","passwd","password","private_key","pwd","refresh_token","secret","ssn","token"]),ae=s=>{const e=s.replaceAll(ne,"$1 $2").split(oe).map(r=>r.toLowerCase()).filter(r=>r.length>0),t=new Set(e);for(let r=0;r<e.length-1;r+=1){const n=e[r],u=e[r+1];n===void 0||u===void 0||(t.add(`${n}${u}`),t.add(`${n}_${u}`))}return[...t]},I="•••",U=(s,e)=>{try{return e==="redact"?null:e==="hash"?s==null?s:L(typeof s=="bigint"?s.toString():typeof s=="string"?s:JSON.stringify(s)):I}catch{return I}},V=(s,e)=>{const t=new Map;for(const r of s)r.table===e&&t.set(r.column,r.strategy);return t},ce=s=>{for(const e of ae(s))if(le.has(e))return!0;return!1},j=(s,e)=>{const t=e.filter(n=>!s.has(n)&&ce(n));if(t.length===0)return s;const r=new Map(s);for(const n of t)r.set(n,"redact");return r},_e=(s,e,t)=>{if(!t.enabled)return s;const r=t.columns.get(e);return r===void 0?s:U(s,r)},ie=(s,e)=>{if(!e.enabled||e.columns.size===0)return s;const t={...s};for(const[r,n]of e.columns)r in t&&(t[r]=U(t[r],n));return t},Me=(s,e)=>!e.enabled||e.columns.size===0?s:s.map(t=>ie(t,e)),z=s=>s==null?"∅":s===""?"(empty)":q(s),ue=s=>{const e=$(32),{column:t,onFacetFilter:r,state:n}=s,u=O();let x;e[0]!==t||e[1]!==r||e[2]!==n.result?.values?(x=c=>{const m=Number(c.currentTarget.dataset.index),k=n.result?.values[m];k!==void 0&&r(t,k.value)},e[0]=t,e[1]=r,e[2]=n.result?.values,e[3]=x):x=e[3];const g=x,o=`db-facet-${t}`;let d;e[4]!==t?(d=p("span",{className:"font-medium text-foreground",children:t}),e[4]=t,e[5]=d):d=e[5];let a;e[6]!==n.loading||e[7]!==n.result||e[8]!==u?(a=n.loading&&n.result===null&&p("span",{className:"text-muted-foreground",children:u("Loading…")}),e[6]=n.loading,e[7]=n.result,e[8]=u,e[9]=a):a=e[9];let l;e[10]!==n.error?(l=n.error!==null&&p("span",{className:"text-destructive",role:"alert",children:n.error}),e[10]=n.error,e[11]=l):l=e[11];let i;e[12]!==n.result?.values?(i=n.result?.values??[],e[12]=n.result?.values,e[13]=i):i=e[13];let f;if(e[14]!==t||e[15]!==g||e[16]!==i){let c;e[18]!==t||e[19]!==g?(c=(m,k)=>S("button",{className:"flex items-center justify-between gap-2 rounded px-1 py-0.5 text-left text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground","data-index":k,"data-testid":`db-facet-value-${t}`,onClick:g,type:"button",children:[p("span",{className:"truncate",children:z(m.value)}),p("span",{className:"shrink-0 tabular-nums text-foreground/70",children:m.count})]},z(m.value)),e[18]=t,e[19]=g,e[20]=c):c=e[20],f=i.map(c),e[14]=t,e[15]=g,e[16]=i,e[17]=f}else f=e[17];let b;e[21]!==t||e[22]!==n.result||e[23]!==u?(b=n.result?.truncated===!0&&p("span",{className:"text-muted-foreground","data-testid":`db-facet-truncated-${t}`,children:u("Showing the {n} most common values.",{n:n.result.values.length})}),e[21]=t,e[22]=n.result,e[23]=u,e[24]=b):b=e[24];let h;return e[25]!==o||e[26]!==d||e[27]!==a||e[28]!==l||e[29]!==f||e[30]!==b?(h=S("section",{className:"flex flex-col gap-1","data-testid":o,children:[d,a,l,f,b]}),e[25]=o,e[26]=d,e[27]=a,e[28]=l,e[29]=f,e[30]=b,e[31]=h):h=e[31],h},Te=s=>{const e=$(44),{columns:t,facets:r,mask:n,onFacetFilter:u,onToggleFacet:x}=s,g=O();let o;e[0]!==x?(o=y=>{const{column:v}=y.currentTarget.dataset;v!==void 0&&x(v)},e[0]=x,e[1]=o):o=e[1];const d=o;let a;e[2]!==n?(a=y=>n.enabled&&n.columns.has(y),e[2]=n,e[3]=a):a=e[3];const l=a;let i,f,b,h,c,m,k,w;if(e[4]!==t||e[5]!==r||e[6]!==l||e[7]!==g||e[8]!==d){w=Symbol.for("react.early_return_sentinel");e:{let y;e[17]!==l?(y=N=>!l(N),e[17]=l,e[18]=y):y=e[18];const v=t.filter(y);let M;if(e[19]!==r||e[20]!==l?(M=Object.entries(r).filter(N=>{const[W]=N;return!l(W)}),e[19]=r,e[20]=l,e[21]=M):M=e[21],i=M,v.length===0){w=null;break e}m="flex w-56 shrink-0 flex-col gap-3 overflow-auto border-l border-border p-3 text-xs",k="db-facets",h="flex flex-col gap-1.5";let T;e[22]!==g?(T=g("Facets"),e[22]=g,e[23]=T):T=e[23],e[24]!==T?(c=p("span",{className:"font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:T}),e[24]=T,e[25]=c):c=e[25],f="flex flex-wrap gap-1";let A;e[26]!==r||e[27]!==d?(A=N=>p("button",{"aria-pressed":N in r,className:"rounded border border-border px-1.5 py-0.5 text-muted-foreground transition-colors hover:bg-accent aria-pressed:bg-accent aria-pressed:text-accent-foreground","data-column":N,"data-testid":`db-facet-toggle-${N}`,onClick:d,type:"button",children:N},N),e[26]=r,e[27]=d,e[28]=A):A=e[28],b=v.map(A)}e[4]=t,e[5]=r,e[6]=l,e[7]=g,e[8]=d,e[9]=i,e[10]=f,e[11]=b,e[12]=h,e[13]=c,e[14]=m,e[15]=k,e[16]=w}else i=e[9],f=e[10],b=e[11],h=e[12],c=e[13],m=e[14],k=e[15],w=e[16];if(w!==Symbol.for("react.early_return_sentinel"))return w;let C;e[29]!==f||e[30]!==b?(C=p("div",{className:f,children:b}),e[29]=f,e[30]=b,e[31]=C):C=e[31];let F;e[32]!==C||e[33]!==h||e[34]!==c?(F=S("div",{className:h,children:[c,C]}),e[32]=C,e[33]=h,e[34]=c,e[35]=F):F=e[35];let _;e[36]!==u||e[37]!==i?(_=i.map(y=>{const[v,M]=y;return p(ue,{column:v,onFacetFilter:u,state:M},v)}),e[36]=u,e[37]=i,e[38]=_):_=e[38];let R;return e[39]!==F||e[40]!==_||e[41]!==m||e[42]!==k?(R=S("aside",{className:m,"data-testid":k,children:[F,_]}),e[39]=F,e[40]=_,e[41]=m,e[42]=k,e[43]=R):R=e[43],R},$e=()=>{const[s,e]=E({}),t=J(s),r=D({}),n=async(o,d)=>{const a=(r.current[o]??0)+1;r.current[o]=a,e(l=>o in l?{...l,[o]:{error:null,loading:!0,result:l[o]?.result??null}}:l);try{const l=await d(o);if(r.current[o]!==a)return;e(i=>o in i?{...i,[o]:{error:null,loading:!1,result:l}}:i)}catch(l){if(r.current[o]!==a)return;throw e(i=>o in i?{...i,[o]:{error:Q(l),loading:!1,result:null}}:i),l}};return{clearFacets:()=>{e({})},facets:s,facetsRef:t,refetchFacets:o=>G(Object.keys(t.current).map(d=>n(d,o))),toggleFacet:(o,d)=>{if(o in t.current){e(a=>Object.fromEntries(Object.entries(a).filter(([l])=>l!==o)));return}e(a=>({...a,[o]:{error:null,loading:!0,result:null}})),d!==null&&H(n(o,d))}}},de=[],fe=()=>{const s=$(1);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={},s[0]=e):e=s[0];const{data:t}=K(Z.maskPolicies,e);return Array.isArray(t?.columns)?t.columns:de},Re=s=>{const e=$(16),{columns:t,selectedTable:r}=s,n=fe(),[u,x]=E(!0);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{x(me)},e[0]=g):g=e[0];const o=g;let d;if(e[1]!==t||e[2]!==n||e[3]!==r){const h=V(n,r??"");d=j(h,t),e[1]=t,e[2]=n,e[3]=r,e[4]=d}else d=e[4];const a=d;let l;e[5]!==u||e[6]!==n?(l=(h,c)=>({columns:j(V(n,h),c),enabled:u}),e[5]=u,e[6]=n,e[7]=l):l=e[7];const i=l;let f;e[8]!==a||e[9]!==u?(f={columns:a,enabled:u},e[8]=a,e[9]=u,e[10]=f):f=e[10];let b;return e[11]!==a||e[12]!==u||e[13]!==i||e[14]!==f?(b={maskColumns:a,maskOn:u,maskView:f,maskViewFor:i,onToggleMask:o},e[11]=a,e[12]=u,e[13]=i,e[14]=f,e[15]=b):b=e[15],b};function me(s){return!s}const P=34,B=600,ge=s=>{const e=$(21),{item:t,onSelect:r,prefix:n,selected:u,start:x}=s;let g;e[0]!==t.name||e[1]!==r?(g=()=>{r(t.name)},e[0]=t.name,e[1]=r,e[2]=g):g=e[2];const o=g,d=`translateY(${String(x)}px)`;let a;e[3]!==d?(a={insetInline:0,position:"absolute",top:0,transform:d},e[3]=d,e[4]=a):a=e[4];const l=a,i=u?"bg-accent font-medium text-accent-foreground":"text-foreground";let f;e[5]!==i?(f=ee("flex w-full items-center justify-between gap-2 rounded-md px-2 py-1.5 text-start text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent",i),e[5]=i,e[6]=f):f=e[6];const b=`${n}-table-${t.name}`;let h;e[7]!==t.name?(h=p("span",{className:"truncate",children:t.name}),e[7]=t.name,e[8]=h):h=e[8];let c;e[9]!==t.rowCount?(c=p("span",{className:"shrink-0 rounded bg-muted px-1.5 text-xs tabular-nums text-muted-foreground",children:t.rowCount}),e[9]=t.rowCount,e[10]=c):c=e[10];let m;e[11]!==o||e[12]!==u||e[13]!==f||e[14]!==b||e[15]!==h||e[16]!==c?(m=S("button",{"aria-pressed":u,className:f,"data-testid":b,onClick:o,type:"button",children:[h,c]}),e[11]=o,e[12]=u,e[13]=f,e[14]=b,e[15]=h,e[16]=c,e[17]=m):m=e[17];let k;return e[18]!==l||e[19]!==m?(k=p("li",{style:l,children:m}),e[18]=l,e[19]=m,e[20]=k):k=e[20],k},Ae=({header:s,onReload:e,onSelect:t,prefix:r,reloadLabel:n,selected:u,tables:x})=>{const g=O(),[o,d]=E(""),a=D(null),l=c=>{d(c.target.value)},i=Y(()=>{const c=o.trim().toLowerCase();return c===""?x:x.filter(m=>m.name.toLowerCase().includes(c))},[o,x]),b=X({count:i.length,estimateSize:()=>P,getScrollElement:()=>a.current,initialRect:{height:B,width:240},observeElementRect:(c,m)=>te(c,m,B),overscan:12}).getVirtualItems(),h={height:i.length*P};return S("aside",{className:"flex h-full w-60 shrink-0 flex-col border-e border-border bg-sidebar","data-testid":`${r}-table-list`,children:[s,S("div",{className:"flex h-9 shrink-0 items-center justify-between gap-2 border-b border-border px-3",children:[p("span",{className:"font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:g("Tables")}),e!==void 0&&p("button",{"aria-label":n??g("Refresh"),className:"flex size-6 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent","data-testid":`${r}-load-tables`,onClick:e,title:n??g("Refresh"),type:"button",children:p("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:p("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"})})})]}),p("div",{className:"shrink-0 border-b border-border p-2",children:p("input",{className:"h-7 w-full rounded-md border border-border bg-background px-2 text-xs outline-none placeholder:text-muted-foreground focus-visible:border-ring","data-testid":`${r}-table-search`,onChange:l,placeholder:g("search table…"),type:"search",value:o})}),S("ul",{className:"relative flex-1 overflow-y-auto p-1.5","data-testid":`${r}-table-list-rows`,ref:a,children:[p("li",{"aria-hidden":"true",style:h}),b.map(c=>{const m=i[c.index];return m===void 0?null:p(ge,{item:m,onSelect:t,prefix:r,selected:u===m.name,start:c.start},m.name)})]})]})};export{Te as D,Ae as T,Re as a,ie as b,Me as c,_e as m,$e as u};
|
|
1
|
+
import{c as $}from"react/compiler-runtime";import{useT as O}from"./DEFAULT_LOCALE-BQ3jRT74.mjs";import{l as q,f as H,b as Q}from"./internal-BXEjuLPN.mjs";import{jsx as p,jsxs as S}from"react/jsx-runtime";import{useState as E,useRef as D,useMemo as Y}from"react";import{settlePolls as G}from"./DEFAULT_AUTO_REFRESH_MS-CG7Q45ZS.mjs";import{u as J}from"./use-mirrored-ref-CVDf2z1M.mjs";import{u as K}from"./use-admin-query-BW9IuacC.mjs";import{ADMIN_FUNCTIONS as Z}from"./ADMIN_FUNCTIONS-B8yyk5BX.mjs";import{useVirtualizer as X}from"@tanstack/react-virtual";import{c as ee}from"./utils-bhneXptQ.mjs";import{f as te}from"./virtual-rect-D_j7aLxX.mjs";const re=2166136261,se=16777619,L=(s,e=re)=>{let t=e;for(let r=0;r<s.length;r+=1)t^=s.charCodeAt(r),t=Math.imul(t,se);return(t>>>0).toString(16).padStart(8,"0")},ne=/([a-z\d])([A-Z])/gu,oe=/[\s_-]+/u,le=new Set(["access_token","api_key","apikey","card_number","client_secret","credit_card","cvv","passwd","password","private_key","pwd","refresh_token","secret","ssn","token"]),ae=s=>{const e=s.replaceAll(ne,"$1 $2").split(oe).map(r=>r.toLowerCase()).filter(r=>r.length>0),t=new Set(e);for(let r=0;r<e.length-1;r+=1){const n=e[r],u=e[r+1];n===void 0||u===void 0||(t.add(`${n}${u}`),t.add(`${n}_${u}`))}return[...t]},I="•••",U=(s,e)=>{try{return e==="redact"?null:e==="hash"?s==null?s:L(typeof s=="bigint"?s.toString():typeof s=="string"?s:JSON.stringify(s)):I}catch{return I}},V=(s,e)=>{const t=new Map;for(const r of s)r.table===e&&t.set(r.column,r.strategy);return t},ce=s=>{for(const e of ae(s))if(le.has(e))return!0;return!1},j=(s,e)=>{const t=e.filter(n=>!s.has(n)&&ce(n));if(t.length===0)return s;const r=new Map(s);for(const n of t)r.set(n,"redact");return r},_e=(s,e,t)=>{if(!t.enabled)return s;const r=t.columns.get(e);return r===void 0?s:U(s,r)},ie=(s,e)=>{if(!e.enabled||e.columns.size===0)return s;const t={...s};for(const[r,n]of e.columns)r in t&&(t[r]=U(t[r],n));return t},Me=(s,e)=>!e.enabled||e.columns.size===0?s:s.map(t=>ie(t,e)),z=s=>s==null?"∅":s===""?"(empty)":q(s),ue=s=>{const e=$(32),{column:t,onFacetFilter:r,state:n}=s,u=O();let x;e[0]!==t||e[1]!==r||e[2]!==n.result?.values?(x=c=>{const m=Number(c.currentTarget.dataset.index),k=n.result?.values[m];k!==void 0&&r(t,k.value)},e[0]=t,e[1]=r,e[2]=n.result?.values,e[3]=x):x=e[3];const g=x,o=`db-facet-${t}`;let d;e[4]!==t?(d=p("span",{className:"font-medium text-foreground",children:t}),e[4]=t,e[5]=d):d=e[5];let a;e[6]!==n.loading||e[7]!==n.result||e[8]!==u?(a=n.loading&&n.result===null&&p("span",{className:"text-muted-foreground",children:u("Loading…")}),e[6]=n.loading,e[7]=n.result,e[8]=u,e[9]=a):a=e[9];let l;e[10]!==n.error?(l=n.error!==null&&p("span",{className:"text-destructive",role:"alert",children:n.error}),e[10]=n.error,e[11]=l):l=e[11];let i;e[12]!==n.result?.values?(i=n.result?.values??[],e[12]=n.result?.values,e[13]=i):i=e[13];let f;if(e[14]!==t||e[15]!==g||e[16]!==i){let c;e[18]!==t||e[19]!==g?(c=(m,k)=>S("button",{className:"flex items-center justify-between gap-2 rounded px-1 py-0.5 text-left text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground","data-index":k,"data-testid":`db-facet-value-${t}`,onClick:g,type:"button",children:[p("span",{className:"truncate",children:z(m.value)}),p("span",{className:"shrink-0 tabular-nums text-foreground/70",children:m.count})]},z(m.value)),e[18]=t,e[19]=g,e[20]=c):c=e[20],f=i.map(c),e[14]=t,e[15]=g,e[16]=i,e[17]=f}else f=e[17];let b;e[21]!==t||e[22]!==n.result||e[23]!==u?(b=n.result?.truncated===!0&&p("span",{className:"text-muted-foreground","data-testid":`db-facet-truncated-${t}`,children:u("Showing the {n} most common values.",{n:n.result.values.length})}),e[21]=t,e[22]=n.result,e[23]=u,e[24]=b):b=e[24];let h;return e[25]!==o||e[26]!==d||e[27]!==a||e[28]!==l||e[29]!==f||e[30]!==b?(h=S("section",{className:"flex flex-col gap-1","data-testid":o,children:[d,a,l,f,b]}),e[25]=o,e[26]=d,e[27]=a,e[28]=l,e[29]=f,e[30]=b,e[31]=h):h=e[31],h},Te=s=>{const e=$(44),{columns:t,facets:r,mask:n,onFacetFilter:u,onToggleFacet:x}=s,g=O();let o;e[0]!==x?(o=y=>{const{column:v}=y.currentTarget.dataset;v!==void 0&&x(v)},e[0]=x,e[1]=o):o=e[1];const d=o;let a;e[2]!==n?(a=y=>n.enabled&&n.columns.has(y),e[2]=n,e[3]=a):a=e[3];const l=a;let i,f,b,h,c,m,k,w;if(e[4]!==t||e[5]!==r||e[6]!==l||e[7]!==g||e[8]!==d){w=Symbol.for("react.early_return_sentinel");e:{let y;e[17]!==l?(y=N=>!l(N),e[17]=l,e[18]=y):y=e[18];const v=t.filter(y);let M;if(e[19]!==r||e[20]!==l?(M=Object.entries(r).filter(N=>{const[W]=N;return!l(W)}),e[19]=r,e[20]=l,e[21]=M):M=e[21],i=M,v.length===0){w=null;break e}m="flex w-56 shrink-0 flex-col gap-3 overflow-auto border-l border-border p-3 text-xs",k="db-facets",h="flex flex-col gap-1.5";let T;e[22]!==g?(T=g("Facets"),e[22]=g,e[23]=T):T=e[23],e[24]!==T?(c=p("span",{className:"font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:T}),e[24]=T,e[25]=c):c=e[25],f="flex flex-wrap gap-1";let A;e[26]!==r||e[27]!==d?(A=N=>p("button",{"aria-pressed":N in r,className:"rounded border border-border px-1.5 py-0.5 text-muted-foreground transition-colors hover:bg-accent aria-pressed:bg-accent aria-pressed:text-accent-foreground","data-column":N,"data-testid":`db-facet-toggle-${N}`,onClick:d,type:"button",children:N},N),e[26]=r,e[27]=d,e[28]=A):A=e[28],b=v.map(A)}e[4]=t,e[5]=r,e[6]=l,e[7]=g,e[8]=d,e[9]=i,e[10]=f,e[11]=b,e[12]=h,e[13]=c,e[14]=m,e[15]=k,e[16]=w}else i=e[9],f=e[10],b=e[11],h=e[12],c=e[13],m=e[14],k=e[15],w=e[16];if(w!==Symbol.for("react.early_return_sentinel"))return w;let C;e[29]!==f||e[30]!==b?(C=p("div",{className:f,children:b}),e[29]=f,e[30]=b,e[31]=C):C=e[31];let F;e[32]!==C||e[33]!==h||e[34]!==c?(F=S("div",{className:h,children:[c,C]}),e[32]=C,e[33]=h,e[34]=c,e[35]=F):F=e[35];let _;e[36]!==u||e[37]!==i?(_=i.map(y=>{const[v,M]=y;return p(ue,{column:v,onFacetFilter:u,state:M},v)}),e[36]=u,e[37]=i,e[38]=_):_=e[38];let R;return e[39]!==F||e[40]!==_||e[41]!==m||e[42]!==k?(R=S("aside",{className:m,"data-testid":k,children:[F,_]}),e[39]=F,e[40]=_,e[41]=m,e[42]=k,e[43]=R):R=e[43],R},$e=()=>{const[s,e]=E({}),t=J(s),r=D({}),n=async(o,d)=>{const a=(r.current[o]??0)+1;r.current[o]=a,e(l=>o in l?{...l,[o]:{error:null,loading:!0,result:l[o]?.result??null}}:l);try{const l=await d(o);if(r.current[o]!==a)return;e(i=>o in i?{...i,[o]:{error:null,loading:!1,result:l}}:i)}catch(l){if(r.current[o]!==a)return;throw e(i=>o in i?{...i,[o]:{error:Q(l),loading:!1,result:null}}:i),l}};return{clearFacets:()=>{e({})},facets:s,facetsRef:t,refetchFacets:o=>G(Object.keys(t.current).map(d=>n(d,o))),toggleFacet:(o,d)=>{if(o in t.current){e(a=>Object.fromEntries(Object.entries(a).filter(([l])=>l!==o)));return}e(a=>({...a,[o]:{error:null,loading:!0,result:null}})),d!==null&&H(n(o,d))}}},de=[],fe=()=>{const s=$(1);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={},s[0]=e):e=s[0];const{data:t}=K(Z.maskPolicies,e);return Array.isArray(t?.columns)?t.columns:de},Re=s=>{const e=$(16),{columns:t,selectedTable:r}=s,n=fe(),[u,x]=E(!0);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{x(me)},e[0]=g):g=e[0];const o=g;let d;if(e[1]!==t||e[2]!==n||e[3]!==r){const h=V(n,r??"");d=j(h,t),e[1]=t,e[2]=n,e[3]=r,e[4]=d}else d=e[4];const a=d;let l;e[5]!==u||e[6]!==n?(l=(h,c)=>({columns:j(V(n,h),c),enabled:u}),e[5]=u,e[6]=n,e[7]=l):l=e[7];const i=l;let f;e[8]!==a||e[9]!==u?(f={columns:a,enabled:u},e[8]=a,e[9]=u,e[10]=f):f=e[10];let b;return e[11]!==a||e[12]!==u||e[13]!==i||e[14]!==f?(b={maskColumns:a,maskOn:u,maskView:f,maskViewFor:i,onToggleMask:o},e[11]=a,e[12]=u,e[13]=i,e[14]=f,e[15]=b):b=e[15],b};function me(s){return!s}const P=34,B=600,ge=s=>{const e=$(21),{item:t,onSelect:r,prefix:n,selected:u,start:x}=s;let g;e[0]!==t.name||e[1]!==r?(g=()=>{r(t.name)},e[0]=t.name,e[1]=r,e[2]=g):g=e[2];const o=g,d=`translateY(${String(x)}px)`;let a;e[3]!==d?(a={insetInline:0,position:"absolute",top:0,transform:d},e[3]=d,e[4]=a):a=e[4];const l=a,i=u?"bg-accent font-medium text-accent-foreground":"text-foreground";let f;e[5]!==i?(f=ee("flex w-full items-center justify-between gap-2 rounded-md px-2 py-1.5 text-start text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent",i),e[5]=i,e[6]=f):f=e[6];const b=`${n}-table-${t.name}`;let h;e[7]!==t.name?(h=p("span",{className:"truncate",children:t.name}),e[7]=t.name,e[8]=h):h=e[8];let c;e[9]!==t.rowCount?(c=p("span",{className:"shrink-0 rounded bg-muted px-1.5 text-xs tabular-nums text-muted-foreground",children:t.rowCount}),e[9]=t.rowCount,e[10]=c):c=e[10];let m;e[11]!==o||e[12]!==u||e[13]!==f||e[14]!==b||e[15]!==h||e[16]!==c?(m=S("button",{"aria-pressed":u,className:f,"data-testid":b,onClick:o,type:"button",children:[h,c]}),e[11]=o,e[12]=u,e[13]=f,e[14]=b,e[15]=h,e[16]=c,e[17]=m):m=e[17];let k;return e[18]!==l||e[19]!==m?(k=p("li",{style:l,children:m}),e[18]=l,e[19]=m,e[20]=k):k=e[20],k},Ae=({header:s,onReload:e,onSelect:t,prefix:r,reloadLabel:n,selected:u,tables:x})=>{const g=O(),[o,d]=E(""),a=D(null),l=c=>{d(c.target.value)},i=Y(()=>{const c=o.trim().toLowerCase();return c===""?x:x.filter(m=>m.name.toLowerCase().includes(c))},[o,x]),b=X({count:i.length,estimateSize:()=>P,getScrollElement:()=>a.current,initialRect:{height:B,width:240},observeElementRect:(c,m)=>te(c,m,B),overscan:12}).getVirtualItems(),h={height:i.length*P};return S("aside",{className:"flex h-full w-60 shrink-0 flex-col border-e border-border bg-sidebar","data-testid":`${r}-table-list`,children:[s,S("div",{className:"flex h-9 shrink-0 items-center justify-between gap-2 border-b border-border px-3",children:[p("span",{className:"font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:g("Tables")}),e!==void 0&&p("button",{"aria-label":n??g("Refresh"),className:"flex size-6 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent","data-testid":`${r}-load-tables`,onClick:e,title:n??g("Refresh"),type:"button",children:p("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:p("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"})})})]}),p("div",{className:"shrink-0 border-b border-border p-2",children:p("input",{className:"h-7 w-full rounded-md border border-border bg-background px-2 text-xs outline-none placeholder:text-muted-foreground focus-visible:border-ring","data-testid":`${r}-table-search`,onChange:l,placeholder:g("search table…"),type:"search",value:o})}),S("ul",{className:"relative flex-1 overflow-y-auto p-1.5","data-testid":`${r}-table-list-rows`,ref:a,children:[p("li",{"aria-hidden":"true",style:h}),b.map(c=>{const m=i[c.index];return m===void 0?null:p(ge,{item:m,onSelect:t,prefix:r,selected:u===m.name,start:c.start},m.name)})]})]})};export{Te as D,Ae as T,Re as a,ie as b,Me as c,_e as m,$e as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as $}from"react/compiler-runtime";import{useQueryClient as w,useQuery as C,keepPreviousData as P}from"@tanstack/react-query";import{useState as Q,useEffect as T}from"react";import{c as b,d as v,f as k,b as _}from"./internal-BXEjuLPN.mjs";import{u as I}from"./use-studio-client-DCA50tF2.mjs";const S=300,c=e=>typeof e=="string"?e===""?void 0:e:typeof e=="number"||typeof e=="boolean"?String(e):void 0,u=e=>e.filter(t=>t!==void 0).join(" "),q=e=>{const t=Array.isArray(e.filters)?e.filters.length:0,r=typeof e.search=="string"&&e.search!=="";return t===0&&!r?"no predicate":u([t===0?void 0:`${String(t)} filters`,r?"search":void 0])},L={clearTable:e=>u([c(e.table),"whole table"]),deleteRows:e=>u([c(e.table),q(e)]),facetColumn:e=>u([c(e.table),c(e.column)]),importShard:e=>{if(!Array.isArray(e.rows))return"";const t=[...new Set(e.rows.filter(r=>typeof r=="object"&&r!==null).map(r=>r.table).filter(r=>typeof r=="string"))].toSorted((r,i)=>r.localeCompare(i));return u([`${String(e.rows.length)} rows`,t.length===0?void 0:`into ${t.join(", ")}`])},lintSql:()=>"sql",patchRows:e=>u([c(e.table),typeof e.doc=="object"&&e.doc!==null?`set ${Object.keys(e.doc).join(", ")}`:void 0,q(e)]),pitrRestore:e=>u([c(e.time)===void 0?void 0:`to ${String(e.time)}`,typeof e.bookmark=="string"&&e.bookmark!==""?"from bookmark":void 0,e.restart===!0?"restart now":void 0]),readTablePage:e=>u([c(e.table),Array.isArray(e.filters)&&e.filters.length>0?`${String(e.filters.length)} filters`:void 0,typeof e.search=="string"&&e.search!==""?"search":void 0,typeof e.limit=="number"?`limit ${String(e.limit)}`:void 0]),runMigration:e=>u([c(e.id),c(e.direction),e.dryRun===!0?"dry-run":void 0]),runSql:e=>typeof e.sql=="string"?`${String(e.sql.length)} chars`:"",schemaVersion:e=>typeof e.hash=="string"?e.hash.slice(0,8):"",writeRow:e=>u([c(e.table),"1 row"])},A="__lunora_admin__:",M=(e,t)=>{const r=e.startsWith(A)?e.slice(A.length):e,i=L[r];if(i!==void 0)return i(t);const s=Object.keys(t);return s.length===0?"":s.join(", ")},K=e=>{if(Array.isArray(e))return e.length;if(!(typeof e!="object"||e===null)){for(const t of Object.values(e))if(Array.isArray(t))return t.length}};class x{entries=[];listeners=new Set;nextSeq=1;getSnapshot=()=>this.entries;subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});start(t,r,i){return this.append(t,r,i,"call","pending")}startSubscription(t,r,i){return this.append(t,r,i,"subscription","live")}recordPush(t){if(this.listeners.size===0){const r=this.entries.find(i=>i.seq===t);r!==void 0&&(r.pushes=(r.pushes??0)+1);return}this.patch(t,r=>({...r,pushes:(r.pushes??0)+1}))}failSubscription(t,r){this.patch(t,i=>({...i,error:r,status:"error"}))}endSubscription(t){this.patch(t,r=>r.status==="error"?r:{...r,durationMs:Date.now()-r.startedAt,status:"closed"})}lastErrorSeq(){return this.entries.findLast(t=>t.status==="error")?.seq}settle(t,r){this.patch(t,i=>({...i,durationMs:Date.now()-i.startedAt,...r.error===void 0?{resultCount:K(r.result),status:"ok"}:{error:r.error,status:"error"}}))}clear(){this.entries=[],this.emit()}append(t,r,i,s,n){const l=this.nextSeq;this.nextSeq+=1;const d={functionPath:t,kind:s,seq:l,shardKey:i,startedAt:Date.now(),status:n,summary:M(t,r),...s==="subscription"?{pushes:0}:{}},o=[...this.entries,d];return this.entries=o.length>S?o.slice(o.length-S):o,this.emit(),l}patch(t,r){const i=this.entries.findIndex(s=>s.seq===t);i!==-1&&(this.entries=this.entries.with(i,r(this.entries[i])),this.emit())}emit(){for(const t of this.listeners)t()}}const f=new x,E=(e,t,r)=>["lunora-admin",e,t,r.trim()],j=(e,t)=>[...e,t];function F(e,t,r={}){const i=I(),{enabled:s=!0,keepPreviousData:n=!1,staleTime:l=0}=r,d=j(e,i.clientIdentifier()),a=C({enabled:s,queryFn:t,placeholderData:n?P:void 0,queryKey:d,staleTime:l});return{data:a.data,error:a.error?_(a.error):a.error,errorSource:a.error??void 0,isLoading:a.isLoading,liveError:void 0,refetch:()=>{k(a.refetch())},poll:async()=>{await a.refetch({throwOnError:!0})}}}function U(e,t,r={}){const i=I(),s=w(),{enabled:n=!0,keepPreviousData:l=!1,live:d=!1,shardKey:o="",staleTime:a}=r,p=E(e,t,o),O=F(p,()=>i.query(b(e),t,v(o)),{enabled:n,keepPreviousData:l,staleTime:a??(d?Number.POSITIVE_INFINITY:0)}),[R,y]=Q(void 0),g=JSON.stringify(p);return T(()=>{if(!n||!d)return;y(void 0);const m=f.startSubscription(e,t,o),D=i.subscribe(b(e),t,h=>{f.recordPush(m),y(void 0),s.setQueryData(j(p,i.clientIdentifier()),h)},{...v(o),onError:h=>{f.failSubscription(m,h.message),y(h.message)}});return()=>{f.endSubscription(m),D()}},[i,g,n,d]),{...O,liveError:n&&d?R:void 0}}const W=()=>{const e=$(2),t=w();let r;return e[0]!==t?(r=(i,s,n)=>{const l=s===void 0?["lunora-admin",i]:E(i,s,n??"");k(t.invalidateQueries({queryKey:l}))},e[0]=t,e[1]=r):r=e[1],r};export{F as a,W as b,f as o,U as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as f}from"react/compiler-runtime";import{a as c}from"./use-admin-query-BW9IuacC.mjs";import{u}from"./use-studio-client-DCA50tF2.mjs";const m={capabilities:{accounts:!0,admin:!0,inviteOnly:!1,organization:!1,passkey:!1,twoFactor:!1},emailAndPassword:!1,organization:{enabled:!1,roles:!1,teams:!1},plugins:[],rateLimit:{enabled:!1},session:{},socialProviders:[],userFields:[]},y=()=>{const e=f(6),o=u();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=["lunora-auth-config"],e[0]=s):s=e[0];let t;e[1]!==o?(t=()=>o.getAuthConfig(),e[1]=o,e[2]=t):t=e[2];const{data:l,isLoading:r}=c(s,t),i=l??m,n=!r;let a;return e[3]!==i||e[4]!==n?(a={config:i,ready:n},e[3]=i,e[4]=n,e[5]=a):a=e[5],a};export{y as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState as c}from"react";import{u as h}from"./use-admin-query-BW9IuacC.mjs";import{u as S}from"./use-studio-client-DCA50tF2.mjs";import{ADMIN_FUNCTIONS as s}from"./ADMIN_FUNCTIONS-B8yyk5BX.mjs";import{d,c as l}from"./internal-BXEjuLPN.mjs";const T={},C=l(s.aiGenerateSql),_=l(s.aiTableFilter),b=l(s.aiChartConfig),Q=n=>{const o=S(),[v,u]=c({}),[m,g]=c({}),p=h(s.aiAvailable,T,{shardKey:n}),[y,q]=c(!1),A=y||p.data?.available===!1,i=e=>{u(r=>({...r,[e]:!0})),g(r=>({...r,[e]:void 0}))},a=(e,r)=>{u(t=>({...t,[e]:!1})),r!==void 0&&g(t=>({...t,[e]:r})),r==="no-ai-binding"&&q(!0)},f=async e=>{i("sql");try{const{result:r}=await o.query(C,e,d(n));return a("sql",r.degraded?r.reason:void 0),r.degraded?void 0:r.sql}catch{a("sql","ai-error");return}};return{generate:async(e,r)=>f({failedError:r?.error,failedSql:r?.sql,prompt:e}),inferChart:async e=>{i("chart");try{const{result:r}=await o.query(b,e,d(n));return a("chart",r.degraded?r.reason:void 0),r.degraded?void 0:r.chart}catch{a("chart","ai-error");return}},pending:e=>v[e]===!0,reason:e=>m[e],rewrite:async(e,r)=>f({editSql:r,prompt:e}),suggestFilter:async(e,r)=>{i("filter");try{const{result:t}=await o.query(_,{prompt:e,table:r},d(n));return a("filter",t.degraded?t.reason:void 0),t.degraded?void 0:t.clauses}catch{a("filter","ai-error");return}},unavailable:A}};export{Q as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isLunoraAdminClient as o}from"@lunora/client/admin";import{LunoraError as r}from"@lunora/errors";import{useLunora as i}from"@lunora/react";const a=()=>{const n=i();if(!o(n))throw new r("INTERNAL","The Studio needs a LunoraAdminClient (`@lunora/client/admin`), not a plain LunoraClient.");return n};export{a as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Pe,b as Re}from"./chunk-LRXCL6IA.js";import{a as ce}from"./chunk-R36QXQZX.js";import{a as Te}from"./chunk-TRZTGE4R.js";import"./chunk-IH2CJZF2.js";import{a as Se}from"./chunk-X74GEPSG.js";import{c as Le}from"./chunk-4SQBAPY6.js";import{a as de}from"./chunk-UYEZR3BI.js";import{a as ke}from"./chunk-XBZUJDHD.js";import{a as ie}from"./chunk-6QEXGYWH.js";import{a as xe}from"./chunk-5DNGK3NT.js";import{a as be}from"./chunk-KYONGQQ4.js";import{b as ve}from"./chunk-SLIDAWNX.js";import"./chunk-6M7FLLMT.js";import"./chunk-LUHXNZI4.js";import"./chunk-ZTOREMGH.js";import{i as D}from"./chunk-SDQH4HR6.js";import"./chunk-W7MRISE3.js";import"./chunk-IBJVVHV5.js";import{a as ge}from"./chunk-2O6KKVH2.js";import"./chunk-JTGGWF7R.js";import"./chunk-ZBON5T5A.js";import{b as re}from"./chunk-6I42AM75.js";import"./chunk-4C4THJUD.js";import{a as ye}from"./chunk-OECMBE6Q.js";import"./chunk-OSJ7HV7B.js";import"./chunk-7F3S5OQT.js";import"./chunk-E26OT26O.js";import{a as ne}from"./chunk-4ZEL6BYL.js";import{c as oe}from"./chunk-YJ2WHOGO.js";import{p as fe}from"./chunk-U76DVXTR.js";import"./chunk-WZTY3ZYI.js";import{a as J}from"./chunk-3Y5K3IQO.js";import{a as we,b as Ne,c as Ce,d as se,e as j,f as B}from"./chunk-CW57Q264.js";import{b as W,f as z,j as ae,k as pe,s as le}from"./chunk-LPINY2IJ.js";import{a as v,d as te,e as _e,f as Ae,g as Ue}from"./chunk-OXFKZ4BM.js";var K=te(Ae(),1);var I=te(_e(),1);var r=te(Ue(),1);var me=["trace","debug","log","info","warn","error","fatal"],$e="LOG_ARCHIVE_NOT_CONFIGURED",ze={cursor:void 0,error:null,loading:!1,notConfigured:!1,rows:null},De=v((i,e)=>{switch(e.type){case"append":return{...i,cursor:e.cursor,error:null,loading:!1,rows:[...i.rows??[],...e.rows]};case"failed":return{cursor:void 0,error:e.message,loading:!1,notConfigured:!1,rows:null};case"loaded":return{cursor:e.cursor,error:null,loading:!1,notConfigured:!1,rows:e.rows};case"loading":return{...i,error:null,loading:!0,notConfigured:!1};case"notConfigured":return{cursor:void 0,error:null,loading:!1,notConfigured:!0,rows:null};case"pageFailed":return{...i,error:e.message,loading:!1};default:return i}},"De"),je=v(i=>{let e=(0,K.c)(33),{row:t}=i,n;e[0]!==t.fields?(n=ce(t.fields),e[0]=t.fields,e[1]=n):n=e[1];let s=n,o=`lg-archive-row-${String(t.ts)}`,c;e[2]!==t.ts?(c=new Date(t.ts).toLocaleString(),e[2]=t.ts,e[3]=c):c=e[3];let f;e[4]!==c?(f=(0,r.jsx)(B,{className:"tabular-nums whitespace-nowrap text-xs text-muted-foreground",children:c}),e[4]=c,e[5]=f):f=e[5];let m=Pe[t.level],d;e[6]!==t.level||e[7]!==m?(d=(0,r.jsx)(B,{children:(0,r.jsx)(re,{variant:m,children:t.level})}),e[6]=t.level,e[7]=m,e[8]=d):d=e[8];let a;e[9]!==t.functionPath?(a=(0,r.jsx)(B,{className:"font-mono text-xs",children:t.functionPath}),e[9]=t.functionPath,e[10]=a):a=e[10];let h;e[11]!==t.message?(h=(0,r.jsx)("div",{className:"truncate",title:t.message,children:t.message}),e[11]=t.message,e[12]=h):h=e[12];let l;e[13]!==s?(l=s!==""&&(0,r.jsx)("div",{className:"truncate font-mono text-[11px] text-muted-foreground",title:s,children:s}),e[13]=s,e[14]=l):l=e[14];let u;e[15]!==h||e[16]!==l?(u=(0,r.jsxs)(B,{className:"max-w-md",children:[h,l]}),e[15]=h,e[16]=l,e[17]=u):u=e[17];let g=t.traceId??"\u2014",b;e[18]!==g?(b=(0,r.jsx)(B,{className:"font-mono text-[11px] text-muted-foreground",children:g}),e[18]=g,e[19]=b):b=e[19];let x=t.shardKey??"\u2014",w;e[20]!==x?(w=(0,r.jsx)(B,{className:"font-mono text-[11px] text-muted-foreground",children:x}),e[20]=x,e[21]=w):w=e[21];let N=t.userId??"\u2014",y;e[22]!==N?(y=(0,r.jsx)(B,{className:"font-mono text-[11px] text-muted-foreground",children:N}),e[22]=N,e[23]=y):y=e[23];let T;return e[24]!==u||e[25]!==b||e[26]!==w||e[27]!==y||e[28]!==o||e[29]!==f||e[30]!==d||e[31]!==a?(T=(0,r.jsxs)(se,{"data-testid":o,children:[f,d,a,u,b,w,y]}),e[24]=u,e[25]=b,e[26]=w,e[27]=y,e[28]=o,e[29]=f,e[30]=d,e[31]=a,e[32]=T):T=e[32],T},"Qe"),Be=v(({shardKey:i})=>{let e=fe(),t=z(),[n,s]=(0,I.useState)(""),[o,c]=(0,I.useState)(""),[f,m]=(0,I.useState)(""),[{cursor:d,error:a,loading:h,notConfigured:l,rows:u},g]=(0,I.useReducer)(De,ze),b=ie(n.trim(),400),x=ie(o.trim(),400),w={...b===""?{}:{functionPathPrefix:b},...f===""?{}:{minLevel:f},...i===""?{}:{shardKey:i},...x===""?{}:{userId:x}},N=JSON.stringify(w),y=(0,I.useRef)(N);(0,I.useEffect)(()=>{let p={cancelled:!1};return y.current=N,le((async()=>{g({type:"loading"});try{let C=await e.queryLogArchive(w);p.cancelled||g({cursor:C.nextCursor,rows:C.rows,type:"loaded"})}catch(C){p.cancelled||g(pe(C)===$e?{type:"notConfigured"}:{message:ae(C),type:"failed"})}})()),()=>{p.cancelled=!0}},[e,N]);let T=v(async()=>{if(d===void 0)return;let p=N;g({type:"loading"});try{let C=await e.queryLogArchive({...w,cursor:d});y.current===p&&g({cursor:C.nextCursor,rows:C.rows,type:"append"})}catch(C){y.current===p&&g({message:ae(C),type:"pageFailed"})}},"T"),R=v(p=>{s(p.target.value)},"R"),L=v(p=>{c(p.target.value)},"N"),k=v(p=>{m(p.target.value)},"L"),S=v(()=>{le(T())},"S");return l?(0,r.jsx)(J,{action:(0,r.jsx)("a",{className:"text-sm text-primary underline-offset-4 hover:underline",href:de,rel:"noreferrer",target:"_blank",children:t("Open in Cloudflare")}),description:t("Wire pipelineLogSink to a Cloudflare Pipeline \u2192 R2 Data Catalog table and set R2_SQL_ACCOUNT_ID, R2_SQL_TOKEN, R2_SQL_BUCKET to browse the durable log archive here."),testId:"lg-archive-not-configured",title:t("Log archive not configured")}):(0,r.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lg-archive",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)(D,{"aria-label":t("Function path prefix"),className:"h-8 w-48","data-testid":"lg-archive-path",onChange:R,placeholder:t("function path\u2026"),value:n}),(0,r.jsx)(D,{"aria-label":t("User id"),className:"h-8 w-40","data-testid":"lg-archive-user",onChange:L,placeholder:t("user id\u2026"),value:o}),(0,r.jsxs)("select",{"aria-label":t("Minimum level"),className:"h-8 rounded-md border border-border bg-background px-2 text-sm","data-testid":"lg-archive-min-level",onChange:k,value:f,children:[(0,r.jsx)("option",{value:"",children:t("min level")}),me.map(p=>(0,r.jsx)("option",{value:p,children:p},p))]})]}),a!==null&&(0,r.jsx)("p",{className:"text-sm text-destructive","data-testid":"lg-archive-error",role:"alert",children:a}),h&&u===null&&a===null&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"lg-archive-loading",children:t("Loading\u2026")}),u!==null&&u.length===0&&(0,r.jsx)(J,{description:t("No archived logs match these filters. The durable archive fills as pipelineLogSink flushes records to R2."),testId:"lg-archive-empty",title:t("No archived logs.")}),u!==null&&u.length>0&&(0,r.jsx)("div",{className:"overflow-hidden rounded-xl border border-border shadow-xs",children:(0,r.jsxs)(we,{"data-testid":"lg-archive-table",children:[(0,r.jsx)(Ne,{children:(0,r.jsxs)(se,{children:[(0,r.jsx)(j,{children:t("Time")}),(0,r.jsx)(j,{children:t("Level")}),(0,r.jsx)(j,{children:t("Function")}),(0,r.jsx)(j,{children:t("Message")}),(0,r.jsx)(j,{children:t("Trace")}),(0,r.jsx)(j,{children:t("Shard")}),(0,r.jsx)(j,{children:t("User")})]})}),(0,r.jsx)(Ce,{children:u.map((p,C)=>(0,r.jsx)(je,{row:p},`${String(p.ts)}-${String(C)}`))})]})}),d!==void 0&&(0,r.jsx)("div",{children:(0,r.jsx)(ge,{"data-testid":"lg-archive-more",disabled:h,onClick:S,size:"sm",variant:"outline",children:t(h?"Loading\u2026":"Load more")})})]})},"ze"),We=v(i=>{let e=(0,K.c)(11),{level:t,onToggle:n,selected:s}=i,o;e[0]!==t||e[1]!==n?(o=v(()=>{n(t)},"o"),e[0]=t,e[1]=n,e[2]=o):o=e[2];let c=o,f=s?"border-border bg-muted font-medium":"border-input text-muted-foreground",m;e[3]!==f?(m=W("rounded-md border px-2 py-1 text-xs",f),e[3]=f,e[4]=m):m=e[4];let d=`logs-level-${t}`,a;return e[5]!==t||e[6]!==c||e[7]!==s||e[8]!==m||e[9]!==d?(a=(0,r.jsx)("button",{"aria-pressed":s,className:m,"data-testid":d,onClick:c,type:"button",children:t}),e[5]=t,e[6]=c,e[7]=s,e[8]=m,e[9]=d,e[10]=a):a=e[10],a},"Ge"),Ve=v(i=>{let e=(0,K.c)(68),{levelFilter:t,onLogPathChange:n,onSearchChange:s,onTimeRangeChange:o,onToggleLevel:c,onToggleSummary:f,pathFilter:m,search:d,showSummary:a,timeRange:h}=i,l=z(),u;e[0]!==l?(u=l("Search messages"),e[0]=l,e[1]=u):u=e[1];let g;e[2]!==l?(g=l("search message"),e[2]=l,e[3]=g):g=e[3];let b;e[4]!==s||e[5]!==d||e[6]!==u||e[7]!==g?(b=(0,r.jsx)(D,{"aria-label":u,className:"h-8 w-48","data-testid":"lg-search",onChange:s,placeholder:g,value:d}),e[4]=s,e[5]=d,e[6]=u,e[7]=g,e[8]=b):b=e[8];let x;e[9]!==l?(x=l("Function path"),e[9]=l,e[10]=x):x=e[10];let w;e[11]!==l?(w=l("filter path"),e[11]=l,e[12]=w):w=e[12];let N;e[13]!==n||e[14]!==m||e[15]!==x||e[16]!==w?(N=(0,r.jsx)(D,{"aria-label":x,className:"h-8 w-40","data-testid":"logs-path-filter",onChange:n,placeholder:w,value:m}),e[13]=n,e[14]=m,e[15]=x,e[16]=w,e[17]=N):N=e[17];let y;e[18]!==l?(y=l("Level filter"),e[18]=l,e[19]=y):y=e[19];let T;e[20]!==t||e[21]!==c?(T=me.map(Q=>(0,r.jsx)(We,{level:Q,onToggle:c,selected:t.has(Q)},Q)),e[20]=t,e[21]=c,e[22]=T):T=e[22];let R;e[23]!==y||e[24]!==T?(R=(0,r.jsx)("div",{"aria-label":y,className:"inline-flex items-center gap-1","data-testid":"logs-level-filter",role:"group",children:T}),e[23]=y,e[24]=T,e[25]=R):R=e[25];let L;e[26]!==l?(L=l("Time range"),e[26]=l,e[27]=L):L=e[27];let k;e[28]!==l?(k=l("All time"),e[28]=l,e[29]=k):k=e[29];let S;e[30]!==k?(S=(0,r.jsx)("option",{value:"all",children:k}),e[30]=k,e[31]=S):S=e[31];let p;e[32]!==l?(p=l("Last 5m"),e[32]=l,e[33]=p):p=e[33];let C;e[34]!==p?(C=(0,r.jsx)("option",{value:"5m",children:p}),e[34]=p,e[35]=C):C=e[35];let q;e[36]!==l?(q=l("Last 15m"),e[36]=l,e[37]=q):q=e[37];let F;e[38]!==q?(F=(0,r.jsx)("option",{value:"15m",children:q}),e[38]=q,e[39]=F):F=e[39];let O;e[40]!==l?(O=l("Last hour"),e[40]=l,e[41]=O):O=e[41];let E;e[42]!==O?(E=(0,r.jsx)("option",{value:"1h",children:O}),e[42]=O,e[43]=E):E=e[43];let M;e[44]!==o||e[45]!==L||e[46]!==S||e[47]!==C||e[48]!==F||e[49]!==E||e[50]!==h?(M=(0,r.jsxs)("select",{"aria-label":L,className:"h-8 rounded-md border border-input bg-transparent px-2 text-sm shadow-xs focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none","data-testid":"logs-time-range",onChange:o,value:h,children:[S,C,F,E]}),e[44]=o,e[45]=L,e[46]=S,e[47]=C,e[48]=F,e[49]=E,e[50]=h,e[51]=M):M=e[51];let V=a?"border-border bg-muted font-medium":"border-input text-muted-foreground",_;e[52]!==V?(_=W("h-8 rounded-md border px-3 text-sm",V),e[52]=V,e[53]=_):_=e[53];let U;e[54]!==a||e[55]!==l?(U=l(a?"List":"Summary"),e[54]=a,e[55]=l,e[56]=U):U=e[56];let A;e[57]!==f||e[58]!==a||e[59]!==_||e[60]!==U?(A=(0,r.jsx)("button",{"aria-pressed":a,className:_,"data-testid":"logs-summary-toggle",onClick:f,type:"button",children:U}),e[57]=f,e[58]=a,e[59]=_,e[60]=U,e[61]=A):A=e[61];let $;return e[62]!==M||e[63]!==A||e[64]!==b||e[65]!==N||e[66]!==R?($=(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[b,N,R,M,A]}),e[62]=M,e[63]=A,e[64]=b,e[65]=N,e[66]=R,e[67]=$):$=e[67],$},"He"),Qe=v(i=>{let e=(0,K.c)(53),{onOutcomeChange:t,onPathChange:n,onTableChange:s,onUserChange:o,outcomeFilter:c,pathPrefix:f,tableFilter:m,userIdFilter:d}=i,a=z(),h;e[0]!==a?(h=a("Function path"),e[0]=a,e[1]=h):h=e[1];let l;e[2]!==a?(l=a("file:function"),e[2]=a,e[3]=l):l=e[3];let u;e[4]!==n||e[5]!==f||e[6]!==h||e[7]!==l?(u=(0,r.jsx)(D,{"aria-label":h,className:"h-8 w-44","data-testid":"lg-req-path",onChange:n,placeholder:l,value:f}),e[4]=n,e[5]=f,e[6]=h,e[7]=l,e[8]=u):u=e[8];let g;e[9]!==a?(g=a("User id"),e[9]=a,e[10]=g):g=e[10];let b;e[11]!==a?(b=a("userId"),e[11]=a,e[12]=b):b=e[12];let x;e[13]!==o||e[14]!==g||e[15]!==b||e[16]!==d?(x=(0,r.jsx)(D,{"aria-label":g,className:"h-8 w-32","data-testid":"lg-req-user",onChange:o,placeholder:b,value:d}),e[13]=o,e[14]=g,e[15]=b,e[16]=d,e[17]=x):x=e[17];let w;e[18]!==a?(w=a("Table touched"),e[18]=a,e[19]=w):w=e[19];let N;e[20]!==a?(N=a("table"),e[20]=a,e[21]=N):N=e[21];let y;e[22]!==s||e[23]!==w||e[24]!==N||e[25]!==m?(y=(0,r.jsx)(D,{"aria-label":w,className:"h-8 w-32","data-testid":"lg-req-table",onChange:s,placeholder:N,value:m}),e[22]=s,e[23]=w,e[24]=N,e[25]=m,e[26]=y):y=e[26];let T;e[27]!==a?(T=a("Outcome filter"),e[27]=a,e[28]=T):T=e[28];let R;e[29]!==a?(R=a("all"),e[29]=a,e[30]=R):R=e[30];let L;e[31]!==R?(L=(0,r.jsx)("option",{value:"all",children:R}),e[31]=R,e[32]=L):L=e[32];let k;e[33]!==a?(k=a("ok"),e[33]=a,e[34]=k):k=e[34];let S;e[35]!==k?(S=(0,r.jsx)("option",{value:"ok",children:k}),e[35]=k,e[36]=S):S=e[36];let p;e[37]!==a?(p=a("error"),e[37]=a,e[38]=p):p=e[38];let C;e[39]!==p?(C=(0,r.jsx)("option",{value:"error",children:p}),e[39]=p,e[40]=C):C=e[40];let q;e[41]!==t||e[42]!==c||e[43]!==T||e[44]!==L||e[45]!==S||e[46]!==C?(q=(0,r.jsxs)("select",{"aria-label":T,className:"h-8 rounded-md border border-input bg-transparent px-2 text-sm shadow-xs focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none","data-testid":"lg-req-outcome",onChange:t,value:c,children:[L,S,C]}),e[41]=t,e[42]=c,e[43]=T,e[44]=L,e[45]=S,e[46]=C,e[47]=q):q=e[47];let F;return e[48]!==q||e[49]!==u||e[50]!==x||e[51]!==y?(F=(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[u,x,y,q]}),e[48]=q,e[49]=u,e[50]=x,e[51]=y,e[52]=F):F=e[52],F},"We"),Fe=v(i=>{let e=(0,K.c)(7),{bucket:t}=i,n;e[0]!==t.key?(n=(0,r.jsx)("span",{className:"truncate text-muted-foreground",role:"gridcell",children:t.key}),e[0]=t.key,e[1]=n):n=e[1];let s;e[2]!==t.count?(s=(0,r.jsx)("span",{className:"shrink-0 tabular-nums",role:"gridcell",children:t.count}),e[2]=t.count,e[3]=s):s=e[3];let o;return e[4]!==n||e[5]!==s?(o=(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4 px-3 py-1 font-mono text-xs","data-testid":"logs-summary-row",role:"row",children:[n,s]}),e[4]=n,e[5]=s,e[6]=o):o=e[6],o},"ve"),Ye=v(i=>{let e=(0,K.c)(31),{summary:t}=i,n=z(),s;e[0]!==t.total||e[1]!==n?(s=n("{count} entries",{count:t.total}),e[0]=t.total,e[1]=n,e[2]=s):s=e[2];let o;e[3]!==s?(o=(0,r.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"logs-summary-total",children:s}),e[3]=s,e[4]=o):o=e[4];let c;e[5]!==n?(c=n("By level"),e[5]=n,e[6]=c):c=e[6];let f;e[7]!==c?(f=(0,r.jsx)("h4",{className:"mb-1 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:c}),e[7]=c,e[8]=f):f=e[8];let m;e[9]!==t.byLevel?(m=t.byLevel.map(Ge),e[9]=t.byLevel,e[10]=m):m=e[10];let d;e[11]!==m?(d=(0,r.jsx)("div",{className:"overflow-hidden rounded-lg border border-border","data-testid":"logs-summary-levels",role:"grid",children:m}),e[11]=m,e[12]=d):d=e[12];let a;e[13]!==f||e[14]!==d?(a=(0,r.jsxs)("div",{children:[f,d]}),e[13]=f,e[14]=d,e[15]=a):a=e[15];let h;e[16]!==n?(h=n("By function"),e[16]=n,e[17]=h):h=e[17];let l;e[18]!==h?(l=(0,r.jsx)("h4",{className:"mb-1 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:h}),e[18]=h,e[19]=l):l=e[19];let u;e[20]!==t.byPath?(u=t.byPath.map(He),e[20]=t.byPath,e[21]=u):u=e[21];let g;e[22]!==u?(g=(0,r.jsx)("div",{className:"overflow-hidden rounded-lg border border-border","data-testid":"logs-summary-paths",role:"grid",children:u}),e[22]=u,e[23]=g):g=e[23];let b;e[24]!==g||e[25]!==l?(b=(0,r.jsxs)("div",{children:[l,g]}),e[24]=g,e[25]=l,e[26]=b):b=e[26];let x;return e[27]!==b||e[28]!==o||e[29]!==a?(x=(0,r.jsxs)("div",{className:"flex flex-col gap-4 rounded-xl border border-border bg-card p-4 shadow-xs","data-testid":"logs-summary",children:[o,a,b]}),e[27]=b,e[28]=o,e[29]=a,e[30]=x):x=e[30],x},"Ye");function Ge(i){return(0,r.jsx)(Fe,{bucket:i},i.key)}v(Ge,"je");function He(i){return(0,r.jsx)(Fe,{bucket:i},i.key)}v(He,"Je");var Je=v(i=>{let e=(0,K.c)(46),{liveError:t,onShardKeyChange:n,onShowArchive:s,onShowErrors:o,onShowRequests:c,shardKey:f,view:m}=i,d=z(),a=m==="requests",h=m==="requests"?"bg-muted font-medium":"text-muted-foreground",l;e[0]!==h?(l=W("px-3 py-1 text-sm",h),e[0]=h,e[1]=l):l=e[1];let u;e[2]!==d?(u=d("Requests"),e[2]=d,e[3]=u):u=e[3];let g;e[4]!==c||e[5]!==a||e[6]!==l||e[7]!==u?(g=(0,r.jsx)("button",{"aria-selected":a,className:l,"data-testid":"lg-view-requests",onClick:c,role:"tab",type:"button",children:u}),e[4]=c,e[5]=a,e[6]=l,e[7]=u,e[8]=g):g=e[8];let b=m==="errors",x=m==="errors"?"bg-muted font-medium":"text-muted-foreground",w;e[9]!==x?(w=W("px-3 py-1 text-sm",x),e[9]=x,e[10]=w):w=e[10];let N;e[11]!==d?(N=d("Errors"),e[11]=d,e[12]=N):N=e[12];let y;e[13]!==o||e[14]!==b||e[15]!==w||e[16]!==N?(y=(0,r.jsx)("button",{"aria-selected":b,className:w,"data-testid":"lg-view-errors",onClick:o,role:"tab",type:"button",children:N}),e[13]=o,e[14]=b,e[15]=w,e[16]=N,e[17]=y):y=e[17];let T=m==="archive",R=m==="archive"?"bg-muted font-medium":"text-muted-foreground",L;e[18]!==R?(L=W("px-3 py-1 text-sm",R),e[18]=R,e[19]=L):L=e[19];let k;e[20]!==d?(k=d("Archive"),e[20]=d,e[21]=k):k=e[21];let S;e[22]!==s||e[23]!==T||e[24]!==L||e[25]!==k?(S=(0,r.jsx)("button",{"aria-selected":T,className:L,"data-testid":"lg-view-archive",onClick:s,role:"tab",type:"button",children:k}),e[22]=s,e[23]=T,e[24]=L,e[25]=k,e[26]=S):S=e[26];let p;e[27]!==y||e[28]!==S||e[29]!==g?(p=(0,r.jsxs)("div",{className:"inline-flex overflow-hidden rounded-lg border border-border",role:"tablist",children:[g,y,S]}),e[27]=y,e[28]=S,e[29]=g,e[30]=p):p=e[30];let C;e[31]!==n||e[32]!==f?(C=(0,r.jsx)(be,{onChange:n,testId:"lg-shard-input",value:f}),e[31]=n,e[32]=f,e[33]=C):C=e[33];let q;e[34]!==t||e[35]!==m?(q=m!=="archive"&&(0,r.jsx)(ke,{message:t,prefix:"lg"}),e[34]=t,e[35]=m,e[36]=q):q=e[36];let F;e[37]!==d?(F=d("Open in Cloudflare"),e[37]=d,e[38]=F):F=e[38];let O;e[39]!==F?(O=(0,r.jsx)("a",{className:"text-sm text-primary underline-offset-4 hover:underline","data-testid":"lg-cf-link",href:de,rel:"noreferrer",target:"_blank",children:F}),e[39]=F,e[40]=O):O=e[40];let E;return e[41]!==p||e[42]!==C||e[43]!==q||e[44]!==O?(E=(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[p,C,q,O]}),e[41]=p,e[42]=C,e[43]=q,e[44]=O,e[45]=E):E=e[45],E},"Xe"),ue=400,Xe=36,Ze={height:ue,overflow:"auto"},Oe={left:0,position:"absolute",top:0,width:"100%"},et={error:"destructive",ok:"secondary"},Ee=v(i=>{let e=(0,K.c)(6),{onOpenTrace:t,traceId:n}=i,s=z(),o;e[0]!==t||e[1]!==s||e[2]!==n?(o=n===void 0?null:(0,r.jsx)("button",{className:"text-primary underline-offset-2 hover:underline","data-testid":"lg-trace-link",onClick:v(()=>{t(n)},"onClick"),type:"button",children:s("Trace")}),e[0]=t,e[1]=s,e[2]=n,e[3]=o):o=e[3];let c;return e[4]!==o?(c=(0,r.jsx)("span",{className:"w-16 shrink-0 text-right",role:"gridcell",children:o}),e[4]=o,e[5]=c):c=e[5],c},"xe"),tt=v(i=>{let e=(0,K.c)(13),{entry:t,index:n,measureRef:s,onOpenTrace:o,start:c}=i,f=`translateY(${String(c)}px)`,m;e[0]!==f?(m={...Oe,transform:f},e[0]=f,e[1]=m):m=e[1];let d=m,a;e[2]!==t?(a=(0,r.jsx)(Re,{entry:t}),e[2]=t,e[3]=a):a=e[3];let h;e[4]!==t.traceId||e[5]!==o?(h=(0,r.jsx)(Ee,{onOpenTrace:o,traceId:t.traceId}),e[4]=t.traceId,e[5]=o,e[6]=h):h=e[6];let l;return e[7]!==n||e[8]!==s||e[9]!==d||e[10]!==a||e[11]!==h?(l=(0,r.jsxs)("div",{className:"flex items-center border-b border-border px-3 py-1.5 font-mono text-xs hover:bg-muted/50","data-index":n,"data-testid":"lg-row",ref:s,role:"row",style:d,children:[a,h]}),e[7]=n,e[8]=s,e[9]=d,e[10]=a,e[11]=h,e[12]=l):l=e[12],l},"rt"),Ie=v(i=>i.length===0?"\u2014":i.join(", "),"ce"),rt=v(i=>{let e=(0,K.c)(41),{entry:t,index:n,measureRef:s,onOpenTrace:o,start:c}=i,f=`translateY(${String(c)}px)`,m;e[0]!==f?(m={...Oe,transform:f},e[0]=f,e[1]=m):m=e[1];let d=m,a;e[2]!==t.ts?(a=new Date(t.ts).toLocaleString(),e[2]=t.ts,e[3]=a):a=e[3];let h;e[4]!==a?(h=(0,r.jsx)("span",{className:"w-40 shrink-0 tabular-nums text-muted-foreground",role:"gridcell",children:a}),e[4]=a,e[5]=h):h=e[5];let l=et[t.outcome],u;e[6]!==t.outcome||e[7]!==l?(u=(0,r.jsx)("span",{className:"w-16 shrink-0",role:"gridcell",children:(0,r.jsx)(re,{variant:l,children:t.outcome})}),e[6]=t.outcome,e[7]=l,e[8]=u):u=e[8];let g;e[9]!==t.functionPath?(g=(0,r.jsx)("span",{className:"w-44 shrink-0 truncate",role:"gridcell",title:t.functionPath,children:t.functionPath}),e[9]=t.functionPath,e[10]=g):g=e[10];let b=t.shardKey??"\u2014",x;e[11]!==b?(x=(0,r.jsx)("span",{className:"w-24 shrink-0 truncate text-muted-foreground",role:"gridcell",children:b}),e[11]=b,e[12]=x):x=e[12];let w=t.userId??"\u2014",N;e[13]!==w?(N=(0,r.jsx)("span",{className:"w-24 shrink-0 truncate text-muted-foreground",role:"gridcell",children:w}),e[13]=w,e[14]=N):N=e[14];let y;e[15]!==t.durationMs?(y=Math.round(t.durationMs),e[15]=t.durationMs,e[16]=y):y=e[16];let T=`${String(y)}ms`,R;e[17]!==T?(R=(0,r.jsx)("span",{className:"w-16 shrink-0 tabular-nums text-muted-foreground",role:"gridcell",children:T}),e[17]=T,e[18]=R):R=e[18];let L;e[19]!==t.errorMessage||e[20]!==t.outcome||e[21]!==t.tablesRead||e[22]!==t.tablesWritten?(L=t.outcome==="error"&&t.errorMessage!==void 0?t.errorMessage:`r:${Ie(t.tablesRead)} \xB7 w:${Ie(t.tablesWritten)}`,e[19]=t.errorMessage,e[20]=t.outcome,e[21]=t.tablesRead,e[22]=t.tablesWritten,e[23]=L):L=e[23];let k;e[24]!==L?(k=(0,r.jsx)("span",{className:"flex-1 truncate text-muted-foreground",role:"gridcell",children:L}),e[24]=L,e[25]=k):k=e[25];let S;e[26]!==t.traceId||e[27]!==o?(S=(0,r.jsx)(Ee,{onOpenTrace:o,traceId:t.traceId}),e[26]=t.traceId,e[27]=o,e[28]=S):S=e[28];let p;return e[29]!==n||e[30]!==s||e[31]!==d||e[32]!==N||e[33]!==R||e[34]!==k||e[35]!==S||e[36]!==h||e[37]!==u||e[38]!==g||e[39]!==x?(p=(0,r.jsxs)("div",{className:"flex items-center border-b border-border px-3 py-1.5 font-mono text-xs hover:bg-muted/50","data-index":n,"data-testid":"lg-req-row",ref:s,role:"row",style:d,children:[h,u,g,x,N,R,k,S]}),e[29]=n,e[30]=s,e[31]=d,e[32]=N,e[33]=R,e[34]=k,e[35]=S,e[36]=h,e[37]=u,e[38]=g,e[39]=x,e[40]=p):p=e[40],p},"st"),qe=v(i=>{let{entries:e}=i??{};return Array.isArray(e)?e:[]},"de"),at=v(i=>{let e={};return i.functionPathPrefix.trim()!==""&&(e.functionPathPrefix=i.functionPathPrefix.trim()),i.userId.trim()!==""&&(e.userId=i.userId.trim()),i.tableTouched.trim()!==""&&(e.tableTouched=i.tableTouched.trim()),(i.outcome==="ok"||i.outcome==="error")&&(e.outcome=i.outcome),e},"lt"),lt={"5m":300*1e3,"15m":900*1e3,"1h":3600*1e3},ot=v((i,e)=>{let t=e.search.trim().toLowerCase(),n=e.path.trim().toLowerCase(),s=e.range==="all"?Number.NEGATIVE_INFINITY:e.now-lt[e.range];return i.filter(o=>e.levels.size>0&&!e.levels.has(o.level)||o.timestamp<s||n!==""&&!(o.functionPath??"").toLowerCase().includes(n)?!1:t===""||o.message.toLowerCase().includes(t)||ce(o.fields).toLowerCase().includes(t))},"at"),nt="\u2014",st=v(i=>{let e=new Map,t=new Map;for(let o of i){e.set(o.level,(e.get(o.level)??0)+1);let c=o.functionPath??nt;t.set(c,(t.get(c)??0)+1)}let n=me.filter(o=>e.has(o)).map(o=>({count:e.get(o)??0,key:o})),s=[...t.entries()].map(([o,c])=>({count:c,key:o})).toSorted((o,c)=>c.count===o.count?o.key.localeCompare(c.key):c.count-o.count);return{byLevel:n,byPath:s,total:i.length}},"it"),qt=v(({initialShardKey:i})=>{let e=z(),[t,n]=(0,I.useState)("requests"),{queryShardKey:s,setShardKey:o,shardKey:c}=xe(i),[f,m]=(0,I.useState)(""),[d,a]=(0,I.useState)(()=>new Set),[h,l]=(0,I.useState)(""),[u,g]=(0,I.useState)("all"),[b,x]=(0,I.useState)(!1),[w,N]=(0,I.useState)(""),[y,T]=(0,I.useState)(""),[R,L]=(0,I.useState)(""),[k,S]=(0,I.useState)("all"),p=at({functionPathPrefix:w,outcome:k,tableTouched:R,userId:y}),C=oe(ne.getRequestLog,p,{enabled:t==="requests",live:!0,shardKey:s}),q=oe(ne.getLogs,{},{enabled:t==="errors",live:!0,shardKey:s}),F=t==="requests"?C:q,{error:O,errorSource:E,isLoading:M,liveError:V}=F,_=Te(s),U=qe(q.data),A=qe(C.data);(0,I.useEffect)(()=>{F.data!==void 0&&ve(s)},[F.data,s]);let $=ot(U,{levels:d,now:Date.now(),path:h,range:u,search:f}),Q=st($),X=t==="requests"?A.length:$.length,Z=t==="errors"&&b,Y=(0,I.useMemo)(()=>O!==null?"error":X===0?M?Z?"summary":"list":"empty":Z?"summary":"list",[X,M,O,Z]),he=(0,I.useRef)(null),G=Le({count:X,estimateSize:v(()=>Xe,"estimateSize"),getScrollElement:v(()=>he.current,"getScrollElement"),initialRect:{height:ue,width:800},observeElementRect:v((P,ee)=>Se(P,ee,ue),"observeElementRect"),overscan:8}),Ke=G.getVirtualItems(),Me={height:G.getTotalSize(),position:"relative",width:"100%"};return(0,r.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-logs",children:[(0,r.jsx)(Je,{liveError:V,onShardKeyChange:o,onShowArchive:v(()=>{n("archive"),x(!1)},"onShowArchive"),onShowErrors:v(()=>{n("errors"),x(!1)},"onShowErrors"),onShowRequests:v(()=>{n("requests"),x(!1)},"onShowRequests"),shardKey:c,view:t}),t==="errors"&&(0,r.jsx)(Ve,{levelFilter:d,onLogPathChange:v(P=>{l(P.target.value)},"onLogPathChange"),onSearchChange:v(P=>{m(P.target.value)},"onSearchChange"),onTimeRangeChange:v(P=>{g(P.target.value)},"onTimeRangeChange"),onToggleLevel:v(P=>{a(ee=>{let H=new Set(ee);return H.has(P)?H.delete(P):H.add(P),H})},"onToggleLevel"),onToggleSummary:v(()=>{x(P=>!P)},"onToggleSummary"),pathFilter:h,search:f,showSummary:b,timeRange:u}),t==="requests"&&(0,r.jsx)(Qe,{onOutcomeChange:v(P=>{S(P.target.value)},"onOutcomeChange"),onPathChange:v(P=>{N(P.target.value)},"onPathChange"),onTableChange:v(P=>{L(P.target.value)},"onTableChange"),onUserChange:v(P=>{T(P.target.value)},"onUserChange"),outcomeFilter:k,pathPrefix:w,tableFilter:R,userIdFilter:y}),t==="archive"?(0,r.jsx)(Be,{shardKey:s}):(0,r.jsxs)(r.Fragment,{children:[Y==="error"&&(0,r.jsx)(ye,{error:E,testId:"lg-error"}),Y==="empty"&&(0,r.jsx)(J,{description:e("Function and request logs for this shard show up here as your app handles traffic."),icon:(0,r.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M4 5h16M4 12h16M4 19h10"})}),testId:"lg-empty",title:e("No logs.")}),Y==="summary"&&(0,r.jsx)(Ye,{summary:Q}),Y==="list"&&(0,r.jsx)("div",{className:"rounded-xl border border-border shadow-xs","data-testid":"lg-scroll",ref:he,style:Ze,children:(0,r.jsx)("div",{"aria-label":e("Recent logs"),"data-testid":"lg-table",role:"grid",style:Me,children:Ke.map(P=>t==="requests"?(0,r.jsx)(rt,{entry:A[P.index],index:P.index,measureRef:G.measureElement,onOpenTrace:_,start:P.start},P.key):(0,r.jsx)(tt,{entry:$[P.index],index:P.index,measureRef:G.measureElement,onOpenTrace:_,start:P.start},P.key))})})]})]})},"Wt");export{qt as LogsPanel,ot as filterLogs,st as summarizeLogs};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Ze}from"./chunk-5J32EGHF.js";import{a as Me,b as Re}from"./chunk-7RGYCU6F.js";import"./chunk-MFNO5BFR.js";import"./chunk-SYGCASPT.js";import"./chunk-CTE6RPXC.js";import"./chunk-LIGOLZND.js";import"./chunk-3GXPALXG.js";import{a as ke}from"./chunk-OUFWXYEF.js";import"./chunk-AP4PC2M4.js";import"./chunk-KRPXOSBL.js";import"./chunk-W2BCSK5S.js";import"./chunk-NGVP66OH.js";import"./chunk-XYR5NST4.js";import{a as Ye}from"./chunk-5DNGK3NT.js";import{a as Xe}from"./chunk-KYONGQQ4.js";import{b as We}from"./chunk-SLIDAWNX.js";import"./chunk-6M7FLLMT.js";import{i as Ue}from"./chunk-LUHXNZI4.js";import"./chunk-ZTOREMGH.js";import{i as Ae}from"./chunk-SDQH4HR6.js";import"./chunk-W7MRISE3.js";import"./chunk-IBJVVHV5.js";import{a as ge}from"./chunk-2O6KKVH2.js";import"./chunk-JTGGWF7R.js";import"./chunk-ZBON5T5A.js";import{b as Ee}from"./chunk-6I42AM75.js";import"./chunk-4C4THJUD.js";import{a as je}from"./chunk-4ZEL6BYL.js";import{p as Qe}from"./chunk-U76DVXTR.js";import"./chunk-WZTY3ZYI.js";import{a as Je}from"./chunk-3Y5K3IQO.js";import{a as qe,b as Ge,c as Ke,d as Pe,e as Le}from"./chunk-MD67S53Z.js";import{b as De,f as ze,h as Fe,i as $e,j as Oe,s as be}from"./chunk-LPINY2IJ.js";import{a as r,d as Be,e as nt,f as st,g as rt}from"./chunk-OXFKZ4BM.js";var we=Be(st(),1);var x=Be(nt(),1);var t=Be(rt(),1);var ot=Fe(je.listTables),it=Fe(je.listTableIndexes),dt=Fe(je.readTablePage),ct=Fe(je.describeTables),mt={},He=[],ut=r(s=>{let e=(0,we.c)(74),{initialShardKey:u,initialTable:n}=s,l=Qe(),[a,m]=(0,x.useState)("graph"),{queryShardKey:c,setShardKey:d,shardKey:b}=Ye(u),[o,h]=(0,x.useState)(""),[i,y]=(0,x.useState)(null),[p,$]=(0,x.useState)(null),S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={},e[0]=S):S=e[0];let[K,N]=(0,x.useState)(S),O;e[1]===Symbol.for("react.memo_cache_sentinel")?(O={},e[1]=O):O=e[1];let[E,P]=(0,x.useState)(O),[T,C]=(0,x.useState)(null),z;e[2]===Symbol.for("react.memo_cache_sentinel")?(z={},e[2]=z):z=e[2];let[F,fe]=(0,x.useState)(z),te;e[3]===Symbol.for("react.memo_cache_sentinel")?(te={},e[3]=te):te=e[3];let[_,j]=(0,x.useState)(te),[k,xe]=(0,x.useState)(null),[L,ce]=(0,x.useState)(null),le;e[4]===Symbol.for("react.memo_cache_sentinel")?(le={},e[4]=le):le=e[4];let[W,Ce]=(0,x.useState)(le),[X,me]=(0,x.useState)(null),ve=(0,x.useRef)(0),M;e[5]!==l?(M=r(async g=>{ve.current=ve.current+1;let v=ve.current;$(null);try{let w=await l.query(ot,{},$e(g));if(v!==ve.current)return;We(g),y(w),N({}),P({}),C(null),fe(A=>Object.fromEntries(Object.entries(A).filter(I=>{let[pe]=I;return pe!==g}))),j(A=>Object.fromEntries(Object.entries(A).filter(I=>{let[pe]=I;return pe!==g})))}catch(w){let A=w;if(v!==ve.current)return;y(null),$(Oe(A))}},"D"),e[5]=l,e[6]=M):M=e[6];let B=M,ae;e[7]!==l?(ae=r(async()=>{ce(null);try{xe(await l.listGlobalTables())}catch(g){let v=g;xe(null),ce(Oe(v))}},"se"),e[7]=l,e[8]=ae):ae=e[8];let ue=ae,D,ne;e[9]!==c||e[10]!==B||e[11]!==ue?(D=r(()=>{be(B(c)),be(ue())},"R"),ne=[B,ue,c],e[9]=c,e[10]=B,e[11]=ue,e[12]=D,e[13]=ne):(D=e[12],ne=e[13]),(0,x.useEffect)(D,ne);let R;e[14]!==l||e[15]!==K||e[16]!==T||e[17]!==c?(R=r(async g=>{if(T===g){C(null);return}C(g);let v=`${c}:${g}`;if(K[v]!==void 0)return;let[w,A]=await Promise.allSettled([l.query(dt,{limit:1,offset:0,table:g},$e(c)),l.query(it,{table:g},$e(c))]);w.status==="fulfilled"?N(I=>({...I,[v]:w.value.columns})):$(Oe(w.reason)),A.status==="fulfilled"&&P(I=>({...I,[v]:A.value.indexes}))},"K"),e[14]=l,e[15]=K,e[16]=T,e[17]=c,e[18]=R):R=e[18];let se=R,re;e[19]!==l||e[20]!==W||e[21]!==X?(re=r(async g=>{if(X===g){me(null);return}if(me(g),W[g]===void 0)try{let v=await l.readGlobalTablePage({limit:1,offset:0,table:g});Ce(w=>({...w,[g]:v.columns}))}catch(v){ce(Oe(v))}},"oe"),e[19]=l,e[20]=W,e[21]=X,e[22]=re):re=e[22];let he=re,Y=(0,x.useRef)(void 0),Z,V;e[23]!==n||e[24]!==i||e[25]!==se?(Z=r(()=>{n===void 0||i===null||Y.current===n||i.some(g=>g.name===n)&&(Y.current=n,be(se(n)))},"Q"),V=[n,i,se],e[23]=n,e[24]=i,e[25]=se,e[26]=Z,e[27]=V):(Z=e[26],V=e[27]),(0,x.useEffect)(Z,V);let oe;e[28]!==l?(oe=r(async(g,v,w)=>{let[A,I]=await Promise.all([Promise.allSettled([l.query(ct,{tables:[...v,...w]},$e(g))]),Promise.all(w.map(async Q=>{let Se=await Promise.allSettled([l.readGlobalTablePage({limit:1,offset:0,table:Q})]),Ve=Se[0].status==="fulfilled"?Se[0].value:void 0;return{columns:Ve?.columns??[],refs:Ve?.refs??{},table:Q}}))]),pe=A[0].status==="fulfilled"?A[0].value?.columnsByTable??{}:{},_e=A[0].status==="rejected",Ie=new Map(I.map(ht)),G=[...v,...w].map(Q=>{let Se=pe[Q]??[];return[Q,Se.length>0?Se:Ie.get(Q)??[]]});fe(Q=>({...Q,[g]:Object.fromEntries(G)})),j(Q=>({...Q,[g]:_e}))},"ie"),e[28]=l,e[29]=oe):oe=e[29];let U=oe,ie,J;e[30]!==L||e[31]!==k||e[32]!==U||e[33]!==c||e[34]!==F||e[35]!==i||e[36]!==a?(ie=r(()=>{a!=="graph"||i===null||k===null&&L===null||F[c]!==void 0||be(U(c,i.map(pt),(k??[]).map(gt)))},"re"),J=[a,i,k,L,c,F,U],e[30]=L,e[31]=k,e[32]=U,e[33]=c,e[34]=F,e[35]=i,e[36]=a,e[37]=ie,e[38]=J):(ie=e[37],J=e[38]),(0,x.useEffect)(ie,J);let q=F[c]??mt,H;if(e[39]!==q||e[40]!==k||e[41]!==i){let g;e[43]!==q?(g=r(I=>({columns:q[I.name]??He,name:I.name,tier:"shard"}),"h"),e[43]=q,e[44]=g):g=e[44];let v=(i??[]).map(g),w;e[45]!==q?(w=r(I=>({columns:q[I.name]??He,name:I.name,tier:"global"}),"N"),e[45]=q,e[46]=w):w=e[46];let A=(k??[]).map(w);H=[...v,...A],e[39]=q,e[40]=k,e[41]=i,e[42]=H}else H=e[42];let f=H,ee;if(e[47]!==o||e[48]!==i){let g=o.trim().toLowerCase();ee=(i??[]).filter(v=>v.name.toLowerCase().includes(g)),e[47]=o,e[48]=i,e[49]=ee}else ee=e[49];let de=ee,ye;if(e[50]!==k||e[51]!==o){let g=o.trim().toLowerCase();ye=(k??[]).filter(v=>v.name.toLowerCase().includes(g)),e[50]=k,e[51]=o,e[52]=ye}else ye=e[52];let Te=ye,Ne;return e[53]!==K||e[54]!==f||e[55]!==p||e[56]!==T||e[57]!==Te||e[58]!==de||e[59]!==W||e[60]!==L||e[61]!==X||e[62]!==k||e[63]!==E||e[64]!==B||e[65]!==d||e[66]!==_||e[67]!==b||e[68]!==o||e[69]!==i||e[70]!==se||e[71]!==he||e[72]!==a?(Ne={columns:K,diagramTables:f,error:p,expanded:T,filteredGlobalTables:Te,filteredTables:de,globalColumns:W,globalError:L,globalExpanded:X,globalTables:k,indexes:E,refresh:B,setShardKey:d,setTableFilter:h,setView:m,shardColumnsError:_,shardKey:b,tableFilter:o,tables:i,toggle:se,toggleGlobal:he,view:a},e[53]=K,e[54]=f,e[55]=p,e[56]=T,e[57]=Te,e[58]=de,e[59]=W,e[60]=L,e[61]=X,e[62]=k,e[63]=E,e[64]=B,e[65]=d,e[66]=_,e[67]=b,e[68]=o,e[69]=i,e[70]=se,e[71]=he,e[72]=a,e[73]=Ne):Ne=e[73],Ne},"mt");function ht(s){let{columns:e,refs:u,table:n}=s;return[n,e.map(l=>{let a=u[l];return a===void 0?{name:l,optional:!1,type:""}:{name:l,optional:!1,ref:a,type:"id"}})]}r(ht,"ut");function pt(s){return s.name}r(pt,"ft");function gt(s){return s.name}r(gt,"ht");var bt="/__lunora/schema-edit",ft=r(async s=>{let e=await fetch(bt,{body:JSON.stringify(s),headers:{"Content-Type":"application/json"},method:"POST"}),u=await e.json();return u.needsMigration===!0?{kind:"needs-migration",message:u.message??"This edit needs a migration."}:e.ok&&u.tables!==void 0?{diagnostics:u.diagnostics??[],kind:"ok",tables:u.tables}:{kind:"error",message:u.error??`schema edit failed (${String(e.status)})`}},"gt"),xt=r(s=>{let e=(0,we.c)(32),{hasTables:u,mode:n,onAddColumn:l,onAddIndex:a,onAddTable:m,onDestructive:c}=s,d=ze(),b=n==="addTable"?"default":"outline",o;e[0]!==d?(o=d("Add table"),e[0]=d,e[1]=o):o=e[1];let h;e[2]!==m||e[3]!==b||e[4]!==o?(h=(0,t.jsx)(ge,{"data-testid":"sc-editor-add-table",onClick:m,size:"xs",type:"button",variant:b,children:o}),e[2]=m,e[3]=b,e[4]=o,e[5]=h):h=e[5];let i=!u,y=n==="addColumn"?"default":"outline",p;e[6]!==d?(p=d("Add column"),e[6]=d,e[7]=p):p=e[7];let $;e[8]!==l||e[9]!==i||e[10]!==y||e[11]!==p?($=(0,t.jsx)(ge,{"data-testid":"sc-editor-add-column",disabled:i,onClick:l,size:"xs",type:"button",variant:y,children:p}),e[8]=l,e[9]=i,e[10]=y,e[11]=p,e[12]=$):$=e[12];let S=!u,K=n==="addIndex"?"default":"outline",N;e[13]!==d?(N=d("Add index"),e[13]=d,e[14]=N):N=e[14];let O;e[15]!==a||e[16]!==N||e[17]!==S||e[18]!==K?(O=(0,t.jsx)(ge,{"data-testid":"sc-editor-add-index",disabled:S,onClick:a,size:"xs",type:"button",variant:K,children:N}),e[15]=a,e[16]=N,e[17]=S,e[18]=K,e[19]=O):O=e[19];let E=!u,P=n==="destructive"?"default":"ghost",T;e[20]!==d?(T=d("Rename / drop / change type\u2026"),e[20]=d,e[21]=T):T=e[21];let C;e[22]!==c||e[23]!==E||e[24]!==P||e[25]!==T?(C=(0,t.jsx)(ge,{"data-testid":"sc-editor-destructive",disabled:E,onClick:c,size:"xs",type:"button",variant:P,children:T}),e[22]=c,e[23]=E,e[24]=P,e[25]=T,e[26]=C):C=e[26];let z;return e[27]!==O||e[28]!==C||e[29]!==h||e[30]!==$?(z=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[h,$,O,C]}),e[27]=O,e[28]=C,e[29]=h,e[30]=$,e[31]=z):z=e[31],z},"bt"),vt=r(s=>{let e=(0,we.c)(28),{onOpenMigrations:u,result:n}=s,l=ze();if(n===null){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(t.Fragment,{}),e[0]=o):o=e[0],o}if(n.kind==="error"){let o;return e[1]!==n.message?(o=(0,t.jsx)("p",{className:"mt-3 text-sm text-destructive","data-testid":"sc-editor-error",role:"alert",children:n.message}),e[1]=n.message,e[2]=o):o=e[2],o}if(n.kind==="needs-migration"){let o;e[3]!==n.message||e[4]!==l?(o=n.message===""?l("This edit changes stored data and must go through a migration. Review the migration before applying."):n.message,e[3]=n.message,e[4]=l,e[5]=o):o=e[5];let h;e[6]!==o?(h=(0,t.jsx)("p",{className:"text-sm text-warning",role:"alert",children:o}),e[6]=o,e[7]=h):h=e[7];let i;e[8]!==l?(i=l("Open Migrations"),e[8]=l,e[9]=i):i=e[9];let y;e[10]!==u||e[11]!==i?(y=(0,t.jsx)(ge,{className:"self-start","data-testid":"sc-editor-open-migrations",onClick:u,size:"xs",type:"button",variant:"outline",children:i}),e[10]=u,e[11]=i,e[12]=y):y=e[12];let p;return e[13]!==h||e[14]!==y?(p=(0,t.jsxs)("div",{className:"mt-3 flex flex-col gap-2","data-testid":"sc-editor-needs-migration",children:[h,y]}),e[13]=h,e[14]=y,e[15]=p):p=e[15],p}if(n.diagnostics.length===0){let o;return e[16]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(t.Fragment,{}),e[16]=o):o=e[16],o}let a;e[17]!==l?(a=l("Codegen reported diagnostics:"),e[17]=l,e[18]=a):a=e[18];let m;e[19]!==a?(m=(0,t.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:a}),e[19]=a,e[20]=m):m=e[20];let c;e[21]!==n.diagnostics?(c=n.diagnostics.map(yt),e[21]=n.diagnostics,e[22]=c):c=e[22];let d;e[23]!==c?(d=(0,t.jsx)("ul",{className:"flex flex-col gap-0.5",children:c}),e[23]=c,e[24]=d):d=e[24];let b;return e[25]!==m||e[26]!==d?(b=(0,t.jsxs)("div",{className:"mt-3 flex flex-col gap-1","data-testid":"sc-editor-diagnostics",children:[m,d]}),e[25]=m,e[26]=d,e[27]=b):b=e[27],b},"xt");function yt(s){return(0,t.jsx)("li",{className:"font-mono text-[11px] text-destructive",children:s},s)}r(yt,"vt");var Nt=[{label:"string",validator:"v.string()"},{label:"number",validator:"v.number()"},{label:"boolean",validator:"v.boolean()"},{label:"bigint",validator:"v.bigint()"},{label:"bytes",validator:"v.bytes()"},{label:"any",validator:"v.any()"}],Ct="v.string()",Tt=r(s=>s.split(",").map(e=>e.trim()).filter(e=>e!==""),"Nt"),wt=r(s=>{let e=(0,we.c)(83),{onApplied:u,tableNames:n}=s,l=ze(),a=Ue(),[m,c]=(0,x.useState)(null),[d,b]=(0,x.useState)(!1),[o,h]=(0,x.useState)(null),[i,y]=(0,x.useState)(""),[p,$]=(0,x.useState)(""),[S,K]=(0,x.useState)(Ct),[N,O]=(0,x.useState)(n[0]??""),[E,P]=(0,x.useState)(""),[T,C]=(0,x.useState)(""),[z,F]=(0,x.useState)(!1),fe;e[0]===Symbol.for("react.memo_cache_sentinel")?(fe=r(()=>{c(null),y(""),$(""),P(""),C(""),F(!1)},"pe"),e[0]=fe):fe=e[0];let te=fe,_;e[1]!==u?(_=r(async G=>{b(!0),h(null);try{let Q=await ft(G);h(Q),Q.kind==="ok"&&(u(Q.tables),te())}catch(Q){let Se=Q;h({kind:"error",message:Se instanceof Error?Se.message:String(Se)})}b(!1)},"E"),e[1]=u,e[2]=_):_=e[2];let j=_,k;e[3]!==j||e[4]!==i?(k=r(()=>{be(j({kind:"addTable",table:i.trim()}))},"w"),e[3]=j,e[4]=i,e[5]=k):k=e[5];let xe=k,L;e[6]!==p||e[7]!==j||e[8]!==N||e[9]!==S?(L=r(()=>{be(j({column:p.trim(),kind:"addOptionalColumn",table:N,validator:S}))},"B"),e[6]=p,e[7]=j,e[8]=N,e[9]=S,e[10]=L):L=e[10];let ce=L,le;e[11]!==T||e[12]!==E||e[13]!==j||e[14]!==N||e[15]!==z?(le=r(()=>{be(j({fields:Tt(T),kind:"addIndex",name:E.trim(),table:N,unique:z}))},"le"),e[11]=T,e[12]=E,e[13]=j,e[14]=N,e[15]=z,e[16]=le):le=e[16];let W=le,Ce;e[17]===Symbol.for("react.memo_cache_sentinel")?(Ce=r(()=>{h(null),c("addTable")},"Ne"),e[17]=Ce):Ce=e[17];let X=Ce,me;e[18]===Symbol.for("react.memo_cache_sentinel")?(me=r(()=>{h(null),c("addColumn")},"me"),e[18]=me):me=e[18];let ve=me,M;e[19]===Symbol.for("react.memo_cache_sentinel")?(M=r(()=>{h(null),c("addIndex")},"D"),e[19]=M):M=e[19];let B=M,ae;e[20]!==l?(ae=r(()=>{c("destructive"),h({kind:"needs-migration",message:l("This edit changes stored data and must go through a migration. Review the migration before applying.")})},"se"),e[20]=l,e[21]=ae):ae=e[21];let ue=ae,D;e[22]===Symbol.for("react.memo_cache_sentinel")?(D=r(G=>{y(G.target.value)},"R"),e[22]=D):D=e[22];let ne=D,R;e[23]===Symbol.for("react.memo_cache_sentinel")?(R=r(G=>{$(G.target.value)},"K"),e[23]=R):R=e[23];let se=R,re;e[24]===Symbol.for("react.memo_cache_sentinel")?(re=r(G=>{K(G.target.value)},"oe"),e[24]=re):re=e[24];let he=re,Y;e[25]===Symbol.for("react.memo_cache_sentinel")?(Y=r(G=>{O(G.target.value)},"X"),e[25]=Y):Y=e[25];let Z=Y,V;e[26]===Symbol.for("react.memo_cache_sentinel")?(V=r(G=>{P(G.target.value)},"U"),e[26]=V):V=e[26];let oe=V,U;e[27]===Symbol.for("react.memo_cache_sentinel")?(U=r(G=>{C(G.target.value)},"V"),e[27]=U):U=e[27];let ie=U,J;e[28]===Symbol.for("react.memo_cache_sentinel")?(J=r(G=>{F(G.target.checked)},"Y"),e[28]=J):J=e[28];let q=J,H;e[29]!==a?(H=r(()=>{be(a({to:"/migrations"}))},"Z"),e[29]=a,e[30]=H):H=e[30];let f=H,ee;e[31]!==l?(ee=l("Edit schema"),e[31]=l,e[32]=ee):ee=e[32];let de;e[33]!==ee?(de=(0,t.jsx)(Ke,{children:ee}),e[33]=ee,e[34]=de):de=e[34];let ye;e[35]!==l?(ye=l("Adds a table, column, or index to lunora/schema.ts and reruns codegen."),e[35]=l,e[36]=ye):ye=e[36];let Te;e[37]!==ye?(Te=(0,t.jsx)(Pe,{children:ye}),e[37]=ye,e[38]=Te):Te=e[38];let Ne;e[39]!==de||e[40]!==Te?(Ne=(0,t.jsxs)(Ge,{children:[de,Te]}),e[39]=de,e[40]=Te,e[41]=Ne):Ne=e[41];let g=n.length>0,v;e[42]!==m||e[43]!==ue||e[44]!==g?(v=(0,t.jsx)(xt,{hasTables:g,mode:m,onAddColumn:ve,onAddIndex:B,onAddTable:X,onDestructive:ue}),e[42]=m,e[43]=ue,e[44]=g,e[45]=v):v=e[45];let w;e[46]!==d||e[47]!==m||e[48]!==xe||e[49]!==l||e[50]!==i?(w=m==="addTable"&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-end gap-2","data-testid":"sc-editor-table-form",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-table-name",children:l("Table name")}),(0,t.jsx)(Ae,{"data-testid":"sc-editor-table-name",id:"sc-editor-table-name",onChange:ne,value:i})]}),(0,t.jsx)(ge,{"data-testid":"sc-editor-table-apply",disabled:d||i.trim()==="",onClick:xe,size:"xs",type:"button",children:l(d?"Applying\u2026":"Apply")}),(0,t.jsx)(ge,{onClick:te,size:"xs",type:"button",variant:"ghost",children:l("Cancel")})]}),e[46]=d,e[47]=m,e[48]=xe,e[49]=l,e[50]=i,e[51]=w):w=e[51];let A;e[52]!==d||e[53]!==p||e[54]!==m||e[55]!==ce||e[56]!==l||e[57]!==n||e[58]!==N||e[59]!==S?(A=m==="addColumn"&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-end gap-2","data-testid":"sc-editor-column-form",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-column-table",children:l("Table name")}),(0,t.jsx)("select",{className:"h-8 rounded-md border border-input bg-transparent px-2 text-xs","data-testid":"sc-editor-column-table",id:"sc-editor-column-table",onChange:Z,value:N,children:n.map(St)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-column-name",children:l("Column name")}),(0,t.jsx)(Ae,{"data-testid":"sc-editor-column-name",id:"sc-editor-column-name",onChange:se,value:p})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-column-type",children:l("Column type")}),(0,t.jsx)("select",{className:"h-8 rounded-md border border-input bg-transparent px-2 text-xs","data-testid":"sc-editor-column-type",id:"sc-editor-column-type",onChange:he,value:S,children:Nt.map(kt)})]}),(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground",children:l("Optional")}),(0,t.jsx)(ge,{"data-testid":"sc-editor-column-apply",disabled:d||p.trim()===""||N==="",onClick:ce,size:"xs",type:"button",children:l(d?"Applying\u2026":"Apply")}),(0,t.jsx)(ge,{onClick:te,size:"xs",type:"button",variant:"ghost",children:l("Cancel")})]}),e[52]=d,e[53]=p,e[54]=m,e[55]=ce,e[56]=l,e[57]=n,e[58]=N,e[59]=S,e[60]=A):A=e[60];let I;e[61]!==d||e[62]!==T||e[63]!==E||e[64]!==m||e[65]!==W||e[66]!==l||e[67]!==n||e[68]!==N||e[69]!==z?(I=m==="addIndex"&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-end gap-2","data-testid":"sc-editor-index-form",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-index-table",children:l("Table name")}),(0,t.jsx)("select",{className:"h-8 rounded-md border border-input bg-transparent px-2 text-xs","data-testid":"sc-editor-index-table",id:"sc-editor-index-table",onChange:Z,value:N,children:n.map(_t)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-index-name",children:l("Index name")}),(0,t.jsx)(Ae,{"data-testid":"sc-editor-index-name",id:"sc-editor-index-name",onChange:oe,value:E})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-index-fields",children:l("Index fields (comma-separated)")}),(0,t.jsx)(Ae,{"data-testid":"sc-editor-index-fields",id:"sc-editor-index-fields",onChange:ie,value:T})]}),(0,t.jsxs)(ke,{className:"flex items-center gap-1 text-xs",htmlFor:"sc-editor-index-unique",children:[(0,t.jsx)("input",{checked:z,"data-testid":"sc-editor-index-unique",id:"sc-editor-index-unique",onChange:q,type:"checkbox"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:l("Unique")})]}),(0,t.jsx)(ge,{"data-testid":"sc-editor-index-apply",disabled:d||E.trim()===""||T.trim()==="",onClick:W,size:"xs",type:"button",children:l(d?"Applying\u2026":"Apply")}),(0,t.jsx)(ge,{onClick:te,size:"xs",type:"button",variant:"ghost",children:l("Cancel")})]}),e[61]=d,e[62]=T,e[63]=E,e[64]=m,e[65]=W,e[66]=l,e[67]=n,e[68]=N,e[69]=z,e[70]=I):I=e[70];let pe;e[71]!==f||e[72]!==o?(pe=(0,t.jsx)(vt,{onOpenMigrations:f,result:o}),e[71]=f,e[72]=o,e[73]=pe):pe=e[73];let _e;e[74]!==v||e[75]!==w||e[76]!==A||e[77]!==I||e[78]!==pe?(_e=(0,t.jsxs)(Le,{children:[v,w,A,I,pe]}),e[74]=v,e[75]=w,e[76]=A,e[77]=I,e[78]=pe,e[79]=_e):_e=e[79];let Ie;return e[80]!==Ne||e[81]!==_e?(Ie=(0,t.jsxs)(qe,{"data-testid":"sc-editor",size:"sm",children:[Ne,_e]}),e[80]=Ne,e[81]=_e,e[82]=Ie):Ie=e[82],Ie},"Tt");function St(s){return(0,t.jsx)("option",{value:s,children:s},s)}r(St,"St");function kt(s){return(0,t.jsx)("option",{value:s.validator,children:s.label},s.validator)}r(kt,"wt");function _t(s){return(0,t.jsx)("option",{value:s,children:s},s)}r(_t,"_t");var et=[],It=r(s=>{let e=(0,we.c)(5),{open:u}=s,n=u&&"rotate-90",l;e[0]!==n?(l=De("size-3.5 shrink-0 text-muted-foreground transition-transform duration-150",n),e[0]=n,e[1]=l):l=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)("path",{d:"m9 6 6 6-6 6"}),e[2]=a):a=e[2];let m;return e[3]!==l?(m=(0,t.jsx)("svg",{"aria-hidden":"true",className:l,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:a}),e[3]=l,e[4]=m):m=e[4],m},"Et"),tt=r(s=>{let e=(0,we.c)(20),{children:u,expanded:n,name:l,onToggle:a,rowCount:m,rowTestId:c,toggleTestId:d}=s,b;e[0]!==n?(b=(0,t.jsx)(It,{open:n}),e[0]=n,e[1]=b):b=e[1];let o;e[2]!==l?(o=(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:l,children:l}),e[2]=l,e[3]=o):o=e[3];let h;e[4]!==m?(h=(0,t.jsxs)("span",{className:"ms-auto shrink-0 text-xs text-muted-foreground tabular-nums",children:["(",m,")"]}),e[4]=m,e[5]=h):h=e[5];let i;e[6]!==n||e[7]!==a||e[8]!==b||e[9]!==o||e[10]!==h||e[11]!==d?(i=(0,t.jsxs)("button",{"aria-expanded":n,className:"flex w-full items-center gap-2 px-3 py-2 text-start transition-colors hover:bg-muted/50 aria-expanded:bg-muted/40","data-testid":d,onClick:a,type:"button",children:[b,o," ",h]}),e[6]=n,e[7]=a,e[8]=b,e[9]=o,e[10]=h,e[11]=d,e[12]=i):i=e[12];let y;e[13]!==u||e[14]!==n?(y=n&&(0,t.jsx)("div",{className:"px-3 pb-3 ps-8",children:u}),e[13]=u,e[14]=n,e[15]=y):y=e[15];let p;return e[16]!==c||e[17]!==i||e[18]!==y?(p=(0,t.jsxs)("li",{className:"border-t border-border/60 first:border-t-0","data-testid":c,children:[i,y]}),e[16]=c,e[17]=i,e[18]=y,e[19]=p):p=e[19],p},"Je"),lt=r(s=>{let e=(0,we.c)(5),{columns:u,testId:n}=s,l;e[0]!==u?(l=u.map(zt),e[0]=u,e[1]=l):l=e[1];let a;return e[2]!==l||e[3]!==n?(a=(0,t.jsx)("ul",{className:"flex flex-wrap gap-1.5 pt-1","data-testid":n,children:l}),e[2]=l,e[3]=n,e[4]=a):a=e[4],a},"We"),At=r(s=>{let e=(0,we.c)(10),{heading:u,indexes:n,testId:l}=s,a;e[0]!==u?(a=(0,t.jsx)("p",{className:"mb-1.5 font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:u}),e[0]=u,e[1]=a):a=e[1];let m;e[2]!==n?(m=n.map(Et),e[2]=n,e[3]=m):m=e[3];let c;e[4]!==m||e[5]!==l?(c=(0,t.jsx)("ul",{className:"flex flex-col gap-1","data-testid":l,children:m}),e[4]=m,e[5]=l,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==c?(d=(0,t.jsxs)("div",{className:"pt-3",children:[a,c]}),e[7]=a,e[8]=c,e[9]=d):d=e[9],d},"It"),at=r(s=>De("border-b-2 px-3 py-2 font-mono text-[11px] tracking-widest uppercase outline-none transition-colors",s?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),"Xe"),Xt=r(s=>{let e=(0,we.c)(85),{initialShardKey:u,initialTable:n,schemaEditable:l}=s,a=ze(),m;e[0]!==u||e[1]!==n?(m={initialShardKey:u,initialTable:n},e[0]=u,e[1]=n,e[2]=m):m=e[2];let{columns:c,diagramTables:d,error:b,expanded:o,filteredGlobalTables:h,filteredTables:i,globalColumns:y,globalError:p,globalExpanded:$,globalTables:S,indexes:K,refresh:N,setShardKey:O,setTableFilter:E,setView:P,shardColumnsError:T,shardKey:C,tableFilter:z,tables:F,toggle:fe,toggleGlobal:te,view:_}=ut(m),j;e[3]!==P?(j=r(()=>{P("list")},"M"),e[3]=P,e[4]=j):j=e[4];let k=j,xe;e[5]!==P?(xe=r(()=>{P("graph")},"ge"),e[5]=P,e[6]=xe):xe=e[6];let L=xe,ce;e[7]!==E?(ce=r(f=>{E(f.target.value)},"ce"),e[7]=E,e[8]=ce):ce=e[8];let le=ce,W;e[9]!==N||e[10]!==C?(W=r(f=>{be(N(C))},"J"),e[9]=N,e[10]=C,e[11]=W):W=e[11];let Ce=W,X;e[12]!==F?(X=F??[],e[12]=F,e[13]=X):X=e[13];let me;e[14]!==X?(me=X.map(Ft),e[14]=X,e[15]=me):me=e[15];let ve=me,M;e[16]!==O||e[17]!==C?(M=(0,t.jsx)(Xe,{onChange:O,testId:"sc-shard-input",value:C}),e[16]=O,e[17]=C,e[18]=M):M=e[18];let B;e[19]!==a?(B=a("Schema view"),e[19]=a,e[20]=B):B=e[20];let ae=_==="graph",ue=_==="graph",D;e[21]!==ue?(D=at(ue),e[21]=ue,e[22]=D):D=e[22];let ne;e[23]!==a?(ne=a("Graph"),e[23]=a,e[24]=ne):ne=e[24];let R;e[25]!==L||e[26]!==ae||e[27]!==D||e[28]!==ne?(R=(0,t.jsx)("button",{"aria-selected":ae,className:D,"data-testid":"sc-view-graph",onClick:L,role:"tab",type:"button",children:ne}),e[25]=L,e[26]=ae,e[27]=D,e[28]=ne,e[29]=R):R=e[29];let se=_==="list",re=_==="list",he;e[30]!==re?(he=at(re),e[30]=re,e[31]=he):he=e[31];let Y;e[32]!==a?(Y=a("Table list"),e[32]=a,e[33]=Y):Y=e[33];let Z;e[34]!==k||e[35]!==se||e[36]!==he||e[37]!==Y?(Z=(0,t.jsx)("button",{"aria-selected":se,className:he,"data-testid":"sc-view-list",onClick:k,role:"tab",type:"button",children:Y}),e[34]=k,e[35]=se,e[36]=he,e[37]=Y,e[38]=Z):Z=e[38];let V;e[39]!==R||e[40]!==Z||e[41]!==B?(V=(0,t.jsxs)("div",{"aria-label":B,className:"flex items-center gap-1","data-testid":"sc-view-toggle",role:"tablist",children:[R,Z]}),e[39]=R,e[40]=Z,e[41]=B,e[42]=V):V=e[42];let oe;e[43]!==V||e[44]!==M?(oe=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[M,V]}),e[43]=V,e[44]=M,e[45]=oe):oe=e[45];let U;e[46]!==Ce||e[47]!==l||e[48]!==ve?(U=l===!0&&(0,t.jsx)(wt,{onApplied:Ce,tableNames:ve}),e[46]=Ce,e[47]=l,e[48]=ve,e[49]=U):U=e[49];let ie;e[50]!==le||e[51]!==a||e[52]!==z||e[53]!==_?(ie=_==="list"&&(0,t.jsx)(Ae,{"aria-label":a("Filter tables"),className:"h-8 max-w-xs","data-testid":"sc-filter",onChange:le,placeholder:a("Filter tables"),value:z}),e[50]=le,e[51]=a,e[52]=z,e[53]=_,e[54]=ie):ie=e[54];let J;e[55]!==d||e[56]!==b||e[57]!==p||e[58]!==T||e[59]!==C||e[60]!==_?(J=_==="graph"&&(0,t.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"sc-graph-view",children:[b!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"sc-error",role:"alert",children:b}),p!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"sc-global-error",role:"alert",children:p}),(0,t.jsx)(Ze,{columnsError:T[C]===!0,tables:d,testIdPrefix:"sc-graph"})]}),e[55]=d,e[56]=b,e[57]=p,e[58]=T,e[59]=C,e[60]=_,e[61]=J):J=e[61];let q;e[62]!==c||e[63]!==b||e[64]!==o||e[65]!==h||e[66]!==i||e[67]!==y||e[68]!==p||e[69]!==$||e[70]!==S||e[71]!==K||e[72]!==C||e[73]!==a||e[74]!==F||e[75]!==fe||e[76]!==te||e[77]!==_?(q=_==="list"&&(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)(qe,{"data-testid":"sc-shard-section",size:"sm",children:[(0,t.jsxs)(Ge,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(Re,{tier:"shard"}),(0,t.jsx)(Ke,{children:a("Shard tables")}),F!==null&&(0,t.jsx)(Ee,{className:"ms-auto tabular-nums",variant:"outline",children:i.length})]}),(0,t.jsx)(Pe,{children:Me.shard.hint})]}),(0,t.jsxs)(Le,{children:[b!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"sc-error",role:"alert",children:b}),F!==null&&F.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"sc-empty",children:a("No tables in this shard.")}),F!==null&&F.length>0&&i.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"sc-no-match",children:a("No tables match your filter.")}),i.length>0&&(0,t.jsx)("ul",{className:"-mx-3 overflow-hidden border-t border-border","data-testid":"sc-table-list",children:i.map(f=>{let ee=`${C}:${f.name}`,de=K[ee]??[];return(0,t.jsxs)(tt,{expanded:o===f.name,name:f.name,onToggle:r(()=>{be(fe(f.name))},"onToggle"),rowCount:f.rowCount,rowTestId:`sc-table-${f.name}`,toggleTestId:`sc-toggle-${f.name}`,children:[(0,t.jsx)(lt,{columns:c[ee]??et,testId:`sc-columns-${f.name}`}),de.length>0&&(0,t.jsx)(At,{heading:a("Indexes"),indexes:de,testId:`sc-indexes-${f.name}`})]},f.name)})})]})]}),(0,t.jsxs)(qe,{"data-testid":"sc-global-section",size:"sm",children:[(0,t.jsxs)(Ge,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(Re,{tier:"global"}),(0,t.jsx)(Ke,{children:a("Global tables (D1)")}),S!==null&&(0,t.jsx)(Ee,{className:"ms-auto tabular-nums",variant:"outline",children:h.length})]}),(0,t.jsx)(Pe,{children:Me.global.hint})]}),(0,t.jsxs)(Le,{children:[p!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"sc-global-error",role:"alert",children:p}),S!==null&&S.length===0&&(0,t.jsx)(Je,{description:Me.global.hint,testId:"sc-global-empty",title:a("No global tables.")}),S!==null&&S.length>0&&h.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"sc-global-no-match",children:a("No tables match your filter.")}),h.length>0&&(0,t.jsx)("ul",{className:"-mx-3 overflow-hidden border-t border-border","data-testid":"sc-global-table-list",children:h.map(f=>(0,t.jsx)(tt,{expanded:$===f.name,name:f.name,onToggle:r(()=>{be(te(f.name))},"onToggle"),rowCount:f.rowCount,rowTestId:`sc-global-table-${f.name}`,toggleTestId:`sc-global-toggle-${f.name}`,children:(0,t.jsx)(lt,{columns:y[f.name]??et,testId:`sc-global-columns-${f.name}`})},f.name))})]})]})]}),e[62]=c,e[63]=b,e[64]=o,e[65]=h,e[66]=i,e[67]=y,e[68]=p,e[69]=$,e[70]=S,e[71]=K,e[72]=C,e[73]=a,e[74]=F,e[75]=fe,e[76]=te,e[77]=_,e[78]=q):q=e[78];let H;return e[79]!==oe||e[80]!==U||e[81]!==ie||e[82]!==J||e[83]!==q?(H=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-schema",children:[oe,U,ie,J,q]}),e[79]=oe,e[80]=U,e[81]=ie,e[82]=J,e[83]=q,e[84]=H):H=e[84],H},"Qt");function zt(s){return(0,t.jsx)("li",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground",children:s},s)}r(zt,"kt");function Et(s){return(0,t.jsxs)("li",{className:"flex flex-wrap items-center gap-1.5 text-xs",children:[(0,t.jsx)("span",{className:"font-mono",children:s.name}),(0,t.jsx)(Ee,{variant:"outline",children:s.type}),s.unique===!0&&(0,t.jsx)(Ee,{variant:"secondary",children:"unique"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:s.fields.join(", ")})]},`${s.type}:${s.name}`)}r(Et,"At");function Ft(s){return s.name}r(Ft,"$t");export{Xt as SchemaViewer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as l}from"./chunk-JTGGWF7R.js";import{j as u}from"./chunk-4C4THJUD.js";import{a as c}from"./chunk-WZTY3ZYI.js";import{b as d}from"./chunk-LPINY2IJ.js";import{a as t,d as o,e as h,g as z}from"./chunk-OXFKZ4BM.js";var p=o(h(),1);var a=p.forwardRef(t(function(e,r){let{render:n,className:k,disabled:s=!1,focusableWhenDisabled:g=!1,nativeButton:f=!0,style:B,...b}=e,{getButtonProps:m,buttonRef:x}=l({disabled:s,focusableWhenDisabled:g,native:f});return u("button",e,{state:{disabled:s},ref:[r,x],props:[b,m]})},"Button"));var v=o(z(),1);var y=c("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-xs font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",xs:"h-6 gap-1 rounded-md px-2 text-xs has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-md px-2.5 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",icon:"size-8","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-md","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function W({className:i,variant:e="default",size:r="default",...n}){return(0,v.jsx)(a,{"data-slot":"button",className:d(y({variant:e,size:r,className:i})),...n})}t(W,"v");export{W as a};
|