@lunora/studio 1.0.0-alpha.136 → 1.0.0-alpha.138
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1515 -0
- package/dist/index.d.ts +20 -7
- package/dist/index.mjs +1 -0
- package/dist/mount.d.mts +21 -0
- package/dist/mount.mjs +1 -0
- package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -0
- package/dist/packem_chunks/ApiTab.mjs +1 -0
- package/dist/packem_chunks/AuditPanel.mjs +1 -0
- package/dist/packem_chunks/DeploymentHealthPanel.mjs +1 -0
- package/dist/packem_chunks/{ExportImportPanel.js → ExportImportPanel.mjs} +1 -1
- package/dist/packem_chunks/{FileBrowser.js → FileBrowser.mjs} +1 -1
- package/dist/packem_chunks/FunctionRunner.mjs +1 -0
- package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -0
- package/dist/packem_chunks/HealthPanel.mjs +1 -0
- package/dist/packem_chunks/InsightsPanel.mjs +1 -0
- package/dist/packem_chunks/LogsPanel.mjs +1 -0
- package/dist/packem_chunks/MailPanel.mjs +2 -0
- package/dist/packem_chunks/MetricsPanel.mjs +1 -0
- package/dist/packem_chunks/NotificationsPanel.mjs +1 -0
- package/dist/packem_chunks/PitrPanel.mjs +1 -0
- package/dist/packem_chunks/SchemaViewer.mjs +1 -0
- package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -0
- package/dist/packem_chunks/SettingsPanel.mjs +1 -0
- package/dist/packem_chunks/{SqlEditorPanel.js → SqlEditorPanel.mjs} +1 -1
- package/dist/packem_chunks/TableEditor.mjs +1 -0
- package/dist/packem_chunks/agents-panel.mjs +1 -0
- package/dist/packem_chunks/analytics-panel.mjs +1 -0
- package/dist/packem_chunks/auth-audit-panel.mjs +1 -0
- package/dist/packem_chunks/auth-config-panel.mjs +1 -0
- package/dist/packem_chunks/auth-sessions-panel.mjs +1 -0
- package/dist/packem_chunks/containers-panel.mjs +1 -0
- package/dist/packem_chunks/dashboards-panel.mjs +1 -0
- package/dist/packem_chunks/evals-panel.mjs +1 -0
- package/dist/packem_chunks/fanout-panel.mjs +1 -0
- package/dist/packem_chunks/flags-panel.mjs +1 -0
- package/dist/packem_chunks/issues-panel.mjs +1 -0
- package/dist/packem_chunks/kv-browser.mjs +1 -0
- package/dist/packem_chunks/{log-drains-panel.js → log-drains-panel.mjs} +1 -1
- package/dist/packem_chunks/migrations-route.mjs +1 -0
- package/dist/packem_chunks/organizations-panel.mjs +1 -0
- package/dist/packem_chunks/payments-panel.mjs +1 -0
- package/dist/packem_chunks/permissions-panel.mjs +1 -0
- package/dist/packem_chunks/queues-panel.mjs +1 -0
- package/dist/packem_chunks/reactors-panel.mjs +1 -0
- package/dist/packem_chunks/rls-panel.mjs +1 -0
- package/dist/packem_chunks/schedule-panel.mjs +1 -0
- package/dist/packem_chunks/sparkline.mjs +1 -0
- package/dist/packem_chunks/storage-rules-panel.mjs +1 -0
- package/dist/packem_chunks/subscriptions-panel.mjs +1 -0
- package/dist/packem_chunks/sync-client-panel.mjs +1 -0
- package/dist/packem_chunks/traces-panel.mjs +1 -0
- package/dist/packem_chunks/users-panel.mjs +1 -0
- package/dist/packem_chunks/vector-browser.mjs +1 -0
- package/dist/packem_chunks/workflows-panel.mjs +1 -0
- package/dist/packem_shared/{ApiDocsPanel-Du1L7Ysj.js → ApiDocsPanel-BOxViKDM.mjs} +1 -1
- package/dist/packem_shared/ApiReferencePanel--YThTzHb.mjs +1 -0
- package/dist/packem_shared/CommandPalette-C4UrhLxv.mjs +1 -0
- package/dist/packem_shared/ConfirmButton-DU4p72Er.mjs +1 -0
- package/dist/packem_shared/ConnectionBadge-B_8fcft2.mjs +1 -0
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs +1 -0
- package/dist/packem_shared/{DataBrowser-W5TxvLB8.js → DataBrowser-CDzwqq4b.mjs} +1 -1
- package/dist/packem_shared/GlobalDataBrowser-BKm77TNC.mjs +1 -0
- package/dist/packem_shared/HomePanel-T_fBZTEM.mjs +1 -0
- package/dist/packem_shared/MigrationsPanel-CYe0ygT8.mjs +1 -0
- package/dist/packem_shared/OpenRpcReferencePanel-Bn5UVD7s.mjs +1 -0
- package/dist/packem_shared/ScheduledJobs-DN0yQoo6.mjs +1 -0
- package/dist/packem_shared/ShardInput-C6mjgAh4.mjs +1 -0
- package/dist/packem_shared/Studio-CHCAslfi.mjs +1 -0
- package/dist/packem_shared/StudioApp-DVl_E-VZ.mjs +1 -0
- package/dist/packem_shared/StudioI18nProvider-fVsCSs5L.mjs +1 -0
- package/dist/packem_shared/advisor-view-5mZH6453.mjs +1 -0
- package/dist/packem_shared/alert-PB5W11MM.mjs +1 -0
- package/dist/packem_shared/app.d-D1bPR8FO.d.mts +252 -0
- package/dist/packem_shared/badge-r_5B4LHP.mjs +1 -0
- package/dist/packem_shared/{bar-chart-B6gzp_f9.js → bar-chart-BCsEIQoQ.mjs} +1 -1
- package/dist/packem_shared/button-q0UYSmrn.mjs +1 -0
- package/dist/packem_shared/card--2hKx4L2.mjs +1 -0
- package/dist/packem_shared/checkbox-CnS9cyCz.mjs +1 -0
- package/dist/packem_shared/data-grid-BqNXJ9PF.mjs +1 -0
- package/dist/packem_shared/dropdown-menu-jLZenfWH.mjs +2 -0
- package/dist/packem_shared/empty-state-D7jEML_T.mjs +1 -0
- package/dist/packem_shared/error-alert-CczbAfst.mjs +1 -0
- package/dist/packem_shared/{grid-features-jBzZGauv.js → grid-features-D8w5isjt.mjs} +1 -1
- package/dist/packem_shared/home-panel-CSENDmoB.mjs +3 -0
- package/dist/packem_shared/input-CXhxesPC.mjs +1 -0
- package/dist/packem_shared/label-DKFzyHq6.mjs +1 -0
- package/dist/packem_shared/live-status-BuJdUZFU.mjs +1 -0
- package/dist/packem_shared/log-line-Dzg4YZ-K.mjs +1 -0
- package/dist/packem_shared/modal-shell-CDztwLnv.mjs +1 -0
- package/dist/packem_shared/recording-client-BEZ6tVgo.mjs +1 -0
- package/dist/packem_shared/{reference-view-BU2dNK9Z.js → reference-view-CZxBZSRo.mjs} +1 -1
- package/dist/packem_shared/schema-diagram-DU83ObYH.mjs +2 -0
- package/dist/packem_shared/scroll-area-CXCQH7VT.mjs +2 -0
- package/dist/packem_shared/select-Cx8-CokP.mjs +2 -0
- package/dist/packem_shared/shard-history-CaO3C4KQ.mjs +1 -0
- package/dist/packem_shared/shortcuts-B9gDaXmw.mjs +1 -0
- package/dist/packem_shared/skeleton-DX1gfixl.mjs +1 -0
- package/dist/packem_shared/sparkline-B_sPPO_8.mjs +1 -0
- package/dist/packem_shared/sql-result-table-DysT8h5P.mjs +1 -0
- package/dist/packem_shared/stat-card-D0Fe04cX.mjs +1 -0
- package/dist/packem_shared/studio-DRHuKwbt.mjs +2 -0
- package/dist/packem_shared/table-D0SBiDu-.mjs +2 -0
- package/dist/packem_shared/table-list-sidebar-BxZm3sBJ.mjs +1 -0
- package/dist/packem_shared/textarea--40GKAyz.mjs +1 -0
- package/dist/packem_shared/trace-handoff-BV3EWqy_.mjs +1 -0
- package/dist/packem_shared/use-admin-query-Cbj2GuHu.mjs +1 -0
- package/dist/packem_shared/use-async-submit-DAKymxcP.mjs +1 -0
- package/dist/packem_shared/use-auth-config-gxJL0E1r.mjs +1 -0
- package/dist/packem_shared/use-open-trace-B5LJ96_0.mjs +1 -0
- package/dist/packem_shared/use-sql-assistant-CFRzdA9E.mjs +1 -0
- package/dist/standalone/{chunk-7PIHTTND.js → chunk-25NFR6EB.js} +1 -1
- package/dist/standalone/{chunk-R7S3ICRW.js → chunk-2AFIMJPZ.js} +1 -1
- package/dist/standalone/{chunk-ENLQ6CZE.js → chunk-2DO5EQCU.js} +1 -1
- package/dist/standalone/{chunk-XZBLPJZN.js → chunk-2QSOSRNW.js} +1 -1
- package/dist/standalone/{chunk-F7JOSNAT.js → chunk-35DM4JJG.js} +1 -1
- package/dist/standalone/{chunk-EHQU74ST.js → chunk-3FFEVZUV.js} +1 -1
- package/dist/standalone/{chunk-OE4KGVJW.js → chunk-3ILVYCWG.js} +1 -1
- package/dist/standalone/{chunk-TRS5ABTX.js → chunk-3PKWDMXA.js} +1 -1
- package/dist/standalone/{chunk-2KR32476.js → chunk-3ZKYTFKY.js} +1 -1
- package/dist/standalone/{chunk-XLU6W4LI.js → chunk-43Y54D7O.js} +1 -1
- package/dist/standalone/{chunk-AOAJGSYZ.js → chunk-46ZJ3TM4.js} +1 -1
- package/dist/standalone/{chunk-2SFSTQS4.js → chunk-4GTO7FL5.js} +1 -1
- package/dist/standalone/{chunk-TFMQSCGC.js → chunk-4L4WTGN5.js} +1 -1
- package/dist/standalone/{chunk-HOQ2PFO6.js → chunk-56AFJWER.js} +1 -1
- package/dist/standalone/chunk-5AUOM7FK.js +1 -0
- package/dist/standalone/{chunk-XQS7KSHL.js → chunk-5GFSKIB2.js} +1 -1
- package/dist/standalone/{chunk-JV7KTJPY.js → chunk-5JDWLCSH.js} +1 -1
- package/dist/standalone/{chunk-WSNONR2E.js → chunk-5PCGB55O.js} +1 -1
- package/dist/standalone/{chunk-MCLM2QJI.js → chunk-5WJXVZMZ.js} +1 -1
- package/dist/standalone/{chunk-WUW4ZHRL.js → chunk-66UGPQVC.js} +1 -1
- package/dist/standalone/{chunk-QHQTOESO.js → chunk-7EYQVAUQ.js} +1 -1
- package/dist/standalone/{chunk-AVBOVXQK.js → chunk-7QMV55PO.js} +1 -1
- package/dist/standalone/{chunk-JURAVSE7.js → chunk-7QRRR3K6.js} +1 -1
- package/dist/standalone/{chunk-EDHW2EEG.js → chunk-7RIRJD2P.js} +1 -1
- package/dist/standalone/{chunk-ITNXWR5K.js → chunk-B5FXTB7H.js} +1 -1
- package/dist/standalone/{chunk-NNJW6LZK.js → chunk-BFXBBUU6.js} +1 -1
- package/dist/standalone/{chunk-DBMUPDVJ.js → chunk-BX3F7MXP.js} +1 -1
- package/dist/standalone/{chunk-ZSOLGJFC.js → chunk-C3TOZ4LG.js} +1 -1
- package/dist/standalone/{chunk-54TELYX4.js → chunk-C5L4BSYY.js} +1 -1
- package/dist/standalone/{chunk-U5D3ABAW.js → chunk-CKZQXAZE.js} +1 -1
- package/dist/standalone/{chunk-7SROZWKL.js → chunk-CSUROWL2.js} +1 -1
- package/dist/standalone/{chunk-DUDQV6XJ.js → chunk-D27D4UUI.js} +1 -1
- package/dist/standalone/chunk-DEJLINCJ.js +1 -0
- package/dist/standalone/{chunk-KZ5V7F4W.js → chunk-DQHYNFE4.js} +1 -1
- package/dist/standalone/{chunk-METRMDIQ.js → chunk-EA2JKR5D.js} +1 -1
- package/dist/standalone/{chunk-BWEXJENB.js → chunk-EBWXFG4H.js} +1 -1
- package/dist/standalone/{chunk-4U5PYZLE.js → chunk-ECQTVV2J.js} +1 -1
- package/dist/standalone/{chunk-JUWOEHDD.js → chunk-EG6XHY7N.js} +1 -1
- package/dist/standalone/{chunk-MOVUB3HI.js → chunk-EIKBBMM4.js} +1 -1
- package/dist/standalone/{chunk-5BEXGGHV.js → chunk-EILTQDXX.js} +1 -1
- package/dist/standalone/{chunk-XYD65F6K.js → chunk-ERWZGAOA.js} +1 -1
- package/dist/standalone/{chunk-ZPGNTTQ3.js → chunk-F7UC63UN.js} +1 -1
- package/dist/standalone/{chunk-UANVABQG.js → chunk-FKVZRPV5.js} +1 -1
- package/dist/standalone/{chunk-DKSLOJDQ.js → chunk-FO26ZU7E.js} +1 -1
- package/dist/standalone/{chunk-RCZTUWG3.js → chunk-FSRSK4LY.js} +1 -1
- package/dist/standalone/{chunk-IS2BTYON.js → chunk-GD3ZRVZH.js} +1 -1
- package/dist/standalone/{chunk-L4EZAHCD.js → chunk-HEAQVSNS.js} +1 -1
- package/dist/standalone/{chunk-GD4GUF75.js → chunk-HODZXHVK.js} +1 -1
- package/dist/standalone/chunk-HPUOZHDA.js +1 -0
- package/dist/standalone/{chunk-AFKLFS74.js → chunk-I52I2DJG.js} +1 -1
- package/dist/standalone/{chunk-OG57FC7W.js → chunk-I5OKDKON.js} +1 -1
- package/dist/standalone/{chunk-TB5N24CM.js → chunk-IFLTA2OD.js} +1 -1
- package/dist/standalone/{chunk-NXXGISFB.js → chunk-IMOHEGMV.js} +1 -1
- package/dist/standalone/{chunk-5U6757U7.js → chunk-JAZCU2PP.js} +1 -1
- package/dist/standalone/{chunk-CG5OTGTR.js → chunk-JBIN7W2B.js} +1 -1
- package/dist/standalone/{chunk-BA6TK2PS.js → chunk-JHEUUNXM.js} +1 -1
- package/dist/standalone/chunk-JJA7KHJK.js +1 -0
- package/dist/standalone/{chunk-4YTSKL4R.js → chunk-JVUZEYKQ.js} +1 -1
- package/dist/standalone/{chunk-INFALEU6.js → chunk-JYMXJUJ2.js} +1 -1
- package/dist/standalone/chunk-K7AJEMKE.js +1 -0
- package/dist/standalone/{chunk-ZZBE7O77.js → chunk-KDWJAKFX.js} +1 -1
- package/dist/standalone/{chunk-EQFBG7TB.js → chunk-KEZZGUYY.js} +1 -1
- package/dist/standalone/{chunk-6DAH3SMG.js → chunk-KTTYWH6A.js} +1 -1
- package/dist/standalone/{chunk-LVZKEWNM.js → chunk-LC3XGRNU.js} +1 -1
- package/dist/standalone/{chunk-LJFIXPDF.js → chunk-LJC5BM3X.js} +1 -1
- package/dist/standalone/{chunk-6XME7G3Q.js → chunk-LWYAZ2H7.js} +1 -1
- package/dist/standalone/{chunk-B3QSXX4O.js → chunk-M6MCQSPI.js} +1 -1
- package/dist/standalone/{chunk-AFH3KSFW.js → chunk-MIVYBFY3.js} +1 -1
- package/dist/standalone/{chunk-BQK2C2Z4.js → chunk-MNAASONZ.js} +1 -1
- package/dist/standalone/{chunk-BGOEMFLU.js → chunk-MRJNT4OH.js} +1 -1
- package/dist/standalone/{chunk-OQOBY6X3.js → chunk-N6KHKQJH.js} +1 -1
- package/dist/standalone/{chunk-V6QPVFDL.js → chunk-NBC6NJFJ.js} +1 -1
- package/dist/standalone/{chunk-SPDZUX4P.js → chunk-NCCAMFB6.js} +1 -1
- package/dist/standalone/{chunk-NGQTRDBQ.js → chunk-NE7AR3N3.js} +1 -1
- package/dist/standalone/chunk-NPERN4YF.js +1 -0
- package/dist/standalone/{chunk-YNZQSHFG.js → chunk-O2FV34ZD.js} +1 -1
- package/dist/standalone/{chunk-KVSQKUWD.js → chunk-OGUKYRFM.js} +1 -1
- package/dist/standalone/{chunk-ZHPDAJBM.js → chunk-OKG3HWSJ.js} +1 -1
- package/dist/standalone/{chunk-FUVCG23X.js → chunk-OOESPRIZ.js} +1 -1
- package/dist/standalone/{chunk-443UDYWL.js → chunk-OOKV3V3X.js} +1 -1
- package/dist/standalone/{chunk-ATES7QMQ.js → chunk-PAUQAU23.js} +1 -1
- package/dist/standalone/{chunk-Q7ZPWO67.js → chunk-PKCC4J5W.js} +1 -1
- package/dist/standalone/{chunk-DPNEFSEC.js → chunk-PYT4RZJH.js} +1 -1
- package/dist/standalone/{chunk-W7ETXRN4.js → chunk-Q3HF6P2M.js} +1 -1
- package/dist/standalone/{chunk-TPAZM36C.js → chunk-Q4CAKBWN.js} +1 -1
- package/dist/standalone/{chunk-M3NNNOD5.js → chunk-QKEJLVC5.js} +1 -1
- package/dist/standalone/{chunk-U6RNLNVU.js → chunk-QSOJFV42.js} +1 -1
- package/dist/standalone/{chunk-K6O3UDLX.js → chunk-RK3WWWTT.js} +1 -1
- package/dist/standalone/{chunk-XJSWM47N.js → chunk-RLLKECZT.js} +1 -1
- package/dist/standalone/{chunk-CAOUXOL7.js → chunk-RPQL45FL.js} +1 -1
- package/dist/standalone/{chunk-CKTKI4IY.js → chunk-S3CRZLGS.js} +1 -1
- package/dist/standalone/{chunk-L6DNHL3L.js → chunk-S63ID2FC.js} +1 -1
- package/dist/standalone/{chunk-VZCS5GXZ.js → chunk-SB35BJ7A.js} +1 -1
- package/dist/standalone/{chunk-26VREVWU.js → chunk-SSNHCN4D.js} +1 -1
- package/dist/standalone/{chunk-3KLX63D7.js → chunk-T2IE5GKA.js} +1 -1
- package/dist/standalone/{chunk-74ASA4WU.js → chunk-TGHH7ZFA.js} +1 -1
- package/dist/standalone/{chunk-FJ6G6FNE.js → chunk-TJRQUJFS.js} +1 -1
- package/dist/standalone/{chunk-EYGF6TQS.js → chunk-TQCXJX4I.js} +1 -1
- package/dist/standalone/{chunk-EYENA7HZ.js → chunk-TRL7AHZK.js} +1 -1
- package/dist/standalone/{chunk-CP4ZFBVW.js → chunk-TWTNWOJU.js} +1 -1
- package/dist/standalone/{chunk-UUO257GV.js → chunk-TZI3JW3Q.js} +1 -1
- package/dist/standalone/{chunk-M3PFFLSD.js → chunk-UBVWMMQG.js} +1 -1
- package/dist/standalone/{chunk-CYX3OHJ3.js → chunk-UDCVU3Z5.js} +1 -1
- package/dist/standalone/{chunk-BNNRPK47.js → chunk-UKL4FSKP.js} +1 -1
- package/dist/standalone/{chunk-PZ4QDWTI.js → chunk-ULIQFBZU.js} +1 -1
- package/dist/standalone/{chunk-XVJIEJ5R.js → chunk-USC5APTS.js} +1 -1
- package/dist/standalone/{chunk-QO645HJU.js → chunk-UWDFH35E.js} +1 -1
- package/dist/standalone/{chunk-YN4VXWMW.js → chunk-VPPKG2IW.js} +1 -1
- package/dist/standalone/{chunk-NIX2QSSN.js → chunk-VVOVVU53.js} +1 -1
- package/dist/standalone/{chunk-BSACLUQK.js → chunk-WLGZOFKE.js} +2 -2
- package/dist/standalone/{chunk-CN2AINNY.js → chunk-WQYWA7U6.js} +1 -1
- package/dist/standalone/{chunk-ZJK2XCP3.js → chunk-WR675JUF.js} +1 -1
- package/dist/standalone/{chunk-IYWVSMAY.js → chunk-WUWBZPUK.js} +1 -1
- package/dist/standalone/{chunk-K76OQSTQ.js → chunk-X43AA6RX.js} +1 -1
- package/dist/standalone/{chunk-EGSG64TS.js → chunk-XSLMHPP2.js} +1 -1
- package/dist/standalone/{chunk-5JLIP2HH.js → chunk-XZMOZFE6.js} +1 -1
- package/dist/standalone/{chunk-6ZPTNC34.js → chunk-Y4Q25F6X.js} +1 -1
- package/dist/standalone/{chunk-INQICZYC.js → chunk-Y6CXU7T4.js} +1 -1
- package/dist/standalone/{chunk-VR3UJA7B.js → chunk-YEBHHIAY.js} +1 -1
- package/dist/standalone/{chunk-MSXT3KG5.js → chunk-YFLOZILV.js} +1 -1
- package/dist/standalone/{chunk-MIGH67EO.js → chunk-YFPU55K4.js} +1 -1
- package/dist/standalone/{chunk-2I2F6IEF.js → chunk-ZE2Q22OK.js} +1 -1
- package/dist/standalone/studio.js +1 -1
- package/package.json +11 -9
- package/dist/index.js +0 -1
- package/dist/mount.js +0 -1
- package/dist/packem_chunks/AdvisorHealthPanel.js +0 -1
- package/dist/packem_chunks/ApiTab.js +0 -1
- package/dist/packem_chunks/AuditPanel.js +0 -1
- package/dist/packem_chunks/DeploymentHealthPanel.js +0 -1
- package/dist/packem_chunks/FunctionRunner.js +0 -1
- package/dist/packem_chunks/FunctionStatsPanel.js +0 -1
- package/dist/packem_chunks/HealthPanel.js +0 -1
- package/dist/packem_chunks/InsightsPanel.js +0 -1
- package/dist/packem_chunks/LogsPanel.js +0 -1
- package/dist/packem_chunks/MailPanel.js +0 -2
- package/dist/packem_chunks/MetricsPanel.js +0 -1
- package/dist/packem_chunks/NotificationsPanel.js +0 -1
- package/dist/packem_chunks/PitrPanel.js +0 -1
- package/dist/packem_chunks/SchemaViewer.js +0 -1
- package/dist/packem_chunks/SecurityAdvisorPanel.js +0 -1
- package/dist/packem_chunks/SettingsPanel.js +0 -1
- package/dist/packem_chunks/TableEditor.js +0 -1
- package/dist/packem_chunks/agents-panel.js +0 -1
- package/dist/packem_chunks/analytics-panel.js +0 -1
- package/dist/packem_chunks/auth-audit-panel.js +0 -1
- package/dist/packem_chunks/auth-config-panel.js +0 -1
- package/dist/packem_chunks/auth-sessions-panel.js +0 -1
- package/dist/packem_chunks/containers-panel.js +0 -1
- package/dist/packem_chunks/dashboards-panel.js +0 -1
- package/dist/packem_chunks/evals-panel.js +0 -1
- package/dist/packem_chunks/fanout-panel.js +0 -1
- package/dist/packem_chunks/flags-panel.js +0 -1
- package/dist/packem_chunks/issues-panel.js +0 -1
- package/dist/packem_chunks/kv-browser.js +0 -1
- package/dist/packem_chunks/migrations-route.js +0 -1
- package/dist/packem_chunks/organizations-panel.js +0 -1
- package/dist/packem_chunks/payments-panel.js +0 -1
- package/dist/packem_chunks/permissions-panel.js +0 -1
- package/dist/packem_chunks/queues-panel.js +0 -1
- package/dist/packem_chunks/reactors-panel.js +0 -1
- package/dist/packem_chunks/rls-panel.js +0 -1
- package/dist/packem_chunks/schedule-panel.js +0 -1
- package/dist/packem_chunks/sparkline.js +0 -1
- package/dist/packem_chunks/storage-rules-panel.js +0 -1
- package/dist/packem_chunks/subscriptions-panel.js +0 -1
- package/dist/packem_chunks/sync-client-panel.js +0 -1
- package/dist/packem_chunks/traces-panel.js +0 -1
- package/dist/packem_chunks/users-panel.js +0 -1
- package/dist/packem_chunks/vector-browser.js +0 -1
- package/dist/packem_chunks/workflows-panel.js +0 -1
- package/dist/packem_shared/ApiReferencePanel-uGgGOBYj.js +0 -1
- package/dist/packem_shared/CommandPalette-HqiXrWIm.js +0 -1
- package/dist/packem_shared/ConfirmButton-Cj2SOapE.js +0 -1
- package/dist/packem_shared/ConnectionBadge-Bh16X9-u.js +0 -1
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-1Lrg55IV.js +0 -1
- package/dist/packem_shared/GlobalDataBrowser-LFznuyGe.js +0 -1
- package/dist/packem_shared/HomePanel-DmB0EKjl.js +0 -1
- package/dist/packem_shared/MigrationsPanel-BDNt136v.js +0 -1
- package/dist/packem_shared/OpenRpcReferencePanel-DgrpASYD.js +0 -1
- package/dist/packem_shared/ScheduledJobs-CiO3eXgI.js +0 -1
- package/dist/packem_shared/ShardInput-CdawpUiS.js +0 -1
- package/dist/packem_shared/Studio-CkNE_tEy.js +0 -1
- package/dist/packem_shared/StudioApp-BZP_0E2n.js +0 -1
- package/dist/packem_shared/StudioI18nProvider-Bl547evf.js +0 -1
- package/dist/packem_shared/advisor-view-C1KFTXSH.js +0 -1
- package/dist/packem_shared/alert-C2SEhYS9.js +0 -1
- package/dist/packem_shared/badge-cAk9Di1Q.js +0 -1
- package/dist/packem_shared/button-BOPLD1un.js +0 -1
- package/dist/packem_shared/card-BGlQzQY-.js +0 -1
- package/dist/packem_shared/checkbox-C5w53W-E.js +0 -1
- package/dist/packem_shared/data-grid-BFTQnkXq.js +0 -1
- package/dist/packem_shared/dropdown-menu-U7Tjg1Nb.js +0 -2
- package/dist/packem_shared/empty-state-B939z6K2.js +0 -1
- package/dist/packem_shared/error-alert-TYdKetJd.js +0 -1
- package/dist/packem_shared/home-panel-DHOa3sxt.js +0 -3
- package/dist/packem_shared/input-CY5W3wzv.js +0 -1
- package/dist/packem_shared/label-BOUo-DP0.js +0 -1
- package/dist/packem_shared/live-status-Bf7rR8o8.js +0 -1
- package/dist/packem_shared/log-line-UnE93Ovi.js +0 -1
- package/dist/packem_shared/modal-shell-wGW4CKEW.js +0 -1
- package/dist/packem_shared/recording-client-CKn4-vUx.js +0 -1
- package/dist/packem_shared/schema-diagram-DOaIh1y6.js +0 -2
- package/dist/packem_shared/scroll-area-DSJftwu_.js +0 -2
- package/dist/packem_shared/select-BPISLTcv.js +0 -2
- package/dist/packem_shared/shard-history-DU5b3QDI.js +0 -1
- package/dist/packem_shared/shortcuts-lH4Vaqjc.js +0 -1
- package/dist/packem_shared/skeleton-DFBBaJU6.js +0 -1
- package/dist/packem_shared/sparkline-CYbJzfA1.js +0 -1
- package/dist/packem_shared/sql-result-table-CqlZo2QN.js +0 -1
- package/dist/packem_shared/stat-card-B9uIvAHg.js +0 -1
- package/dist/packem_shared/studio-CXai1O2K.js +0 -2
- package/dist/packem_shared/table-BMsuYFhk.js +0 -2
- package/dist/packem_shared/table-list-sidebar-BWq_-gtu.js +0 -1
- package/dist/packem_shared/textarea-DpO3i-Qo.js +0 -1
- package/dist/packem_shared/trace-handoff-z9sy89Ci.js +0 -1
- package/dist/packem_shared/use-admin-query-P0RJrjsD.js +0 -1
- package/dist/packem_shared/use-async-submit-DdLd0MdK.js +0 -1
- package/dist/packem_shared/use-auth-config-z3KRWAqD.js +0 -1
- package/dist/packem_shared/use-open-trace-4mqqFWrn.js +0 -1
- package/dist/packem_shared/use-sql-assistant-D1K2LqpO.js +0 -1
- package/dist/standalone/chunk-35O3VETX.js +0 -1
- package/dist/standalone/chunk-57VX76PR.js +0 -1
- package/dist/standalone/chunk-76YLMHR3.js +0 -1
- package/dist/standalone/chunk-N5OS5NUG.js +0 -1
- package/dist/standalone/chunk-O5MAFDY2.js +0 -1
- package/dist/standalone/chunk-TNKECJW4.js +0 -1
- /package/dist/packem_shared/{ADMIN_FUNCTIONS-B6z7VLYt.js → ADMIN_FUNCTIONS-B6z7VLYt.mjs} +0 -0
- /package/dist/packem_shared/{DEFAULT_AUTO_REFRESH_MS-DuULO4XM.js → DEFAULT_AUTO_REFRESH_MS-DuULO4XM.mjs} +0 -0
- /package/dist/packem_shared/{DEFAULT_LOCALE-A1Yg5ORA.js → DEFAULT_LOCALE-A1Yg5ORA.mjs} +0 -0
- /package/dist/packem_shared/{DataFilters-3nbW0uax.js → DataFilters-3nbW0uax.mjs} +0 -0
- /package/dist/packem_shared/{ErrorBoundary-BWNF98VF.js → ErrorBoundary-BWNF98VF.mjs} +0 -0
- /package/dist/packem_shared/{STUDIO_ROOT_CLASS-C6MccdVk.js → STUDIO_ROOT_CLASS-C6MccdVk.mjs} +0 -0
- /package/dist/packem_shared/{aggregateMetrics-A-Y7OH6R.js → aggregateMetrics-A-Y7OH6R.mjs} +0 -0
- /package/dist/packem_shared/{browser-storage-BH1MxLZs.js → browser-storage-BH1MxLZs.mjs} +0 -0
- /package/dist/packem_shared/{cf-links-CBJ5SywP.js → cf-links-CBJ5SywP.mjs} +0 -0
- /package/dist/packem_shared/{control-button-BOZ5K-FC.js → control-button-BOZ5K-FC.mjs} +0 -0
- /package/dist/packem_shared/{data-view-params-qoSTqjAj.js → data-view-params-qoSTqjAj.mjs} +0 -0
- /package/dist/packem_shared/{internal-CwaF9YNk.js → internal-CwaF9YNk.mjs} +0 -0
- /package/dist/packem_shared/{log-fields-SBxKyBug.js → log-fields-SBxKyBug.mjs} +0 -0
- /package/dist/packem_shared/{operation-console-provider-DoloEvon.js → operation-console-provider-DoloEvon.mjs} +0 -0
- /package/dist/packem_shared/{quote-identifier-CGiYFBvY.js → quote-identifier-CGiYFBvY.mjs} +0 -0
- /package/dist/packem_shared/{storage-tier-C2mKwYRj.js → storage-tier-C2mKwYRj.mjs} +0 -0
- /package/dist/packem_shared/{use-shard-key-BsP3o5wT.js → use-shard-key-BsP3o5wT.mjs} +0 -0
- /package/dist/packem_shared/{useDebounced-DVeQ5-oW.js → useDebounced-DVeQ5-oW.mjs} +0 -0
- /package/dist/packem_shared/{utils-bhneXptQ.js → utils-bhneXptQ.mjs} +0 -0
- /package/dist/packem_shared/{virtual-rect-D_j7aLxX.js → virtual-rect-D_j7aLxX.mjs} +0 -0
- /package/dist/packem_shared/{wire-codec-Dl3VeNrd.js → wire-codec-Dl3VeNrd.mjs} +0 -0
- /package/dist/standalone/{chunk-DZGOHOOE.js → chunk-CXNZVJ3S.js} +0 -0
- /package/dist/standalone/{chunk-W2JBKQNU.js → chunk-UYEZR3BI.js} +0 -0
- /package/dist/standalone/{chunk-R5ZTCHCE.js → chunk-YKXDMIHQ.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ee}from"./chunk-
|
|
1
|
+
import{a as ee}from"./chunk-5WJXVZMZ.js";import{b as Z}from"./chunk-NCCAMFB6.js";import"./chunk-25NFR6EB.js";import{d as se,f as X}from"./chunk-JBIN7W2B.js";import"./chunk-FSRSK4LY.js";import{a as re}from"./chunk-FKVZRPV5.js";import{a as O}from"./chunk-WUWBZPUK.js";import{d as le,r as ne}from"./chunk-Y4Q25F6X.js";import"./chunk-T2IE5GKA.js";import{a as k,d as ae,f as ce,g as me,i as Y}from"./chunk-YKXDMIHQ.js";var te=ae(ce(),1);var a=ae(me(),1);var pe="/_lunora/health",he="/_lunora/health/ready",ue=k((r,e)=>(r.endsWith("/")?r.slice(0,-1):r)+e,"me"),fe=k(()=>{let r=X();return async e=>{let w=e==="ready"?he:pe,t=r.getAuthToken(),y=ue(r.url,w);try{let i=await fetch(y,{headers:t===null?{}:{authorization:`Bearer ${t}`}}),p=null;try{p=await i.json()}catch{p=null}return{body:p,ok:i.ok,status:i.status}}catch(i){return{body:null,error:i instanceof Error?i.message:String(i),ok:!1,status:0}}}},"pe"),ge={crit:"bg-destructive",ok:"bg-success",warn:"bg-warning"},ye=k(r=>r==="unhealthy"?"crit":r==="degraded"?"warn":"ok","fe"),ie=k(r=>{let e=(0,te.c)(13),{label:w,level:t,testId:y,value:i}=r,p=ge[t],d;e[0]!==p?(d=Y("size-1.5 shrink-0 rounded-full",p),e[0]=p,e[1]=d):d=e[1];let o;e[2]!==d?(o=(0,a.jsx)("span",{"aria-hidden":"true",className:d}),e[2]=d,e[3]=o):o=e[3];let c;e[4]!==w||e[5]!==o?(c=(0,a.jsxs)("span",{className:"flex items-center gap-1.5 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:[o,w]}),e[4]=w,e[5]=o,e[6]=c):c=e[6];let h;e[7]!==y||e[8]!==i?(h=(0,a.jsx)("span",{className:"text-lg font-semibold text-foreground","data-testid":y,children:i}),e[7]=y,e[8]=i,e[9]=h):h=e[9];let C;return e[10]!==c||e[11]!==h?(C=(0,a.jsx)(O,{className:"gap-0 py-0",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2.5 p-4",children:[c,h]})}),e[10]=c,e[11]=h,e[12]=C):C=e[12],C},"Z"),Pe=k(r=>{let e=(0,te.c)(107),{probe:w}=r,t=le(),y=X(),i=fe(),p=w??i,d;e[0]!==p?(d=k(async()=>{let[s,n]=await Promise.all([p("live"),p("ready")]);return{live:s,ready:n}},"o"),e[0]=p,e[1]=d):d=e[1];let o;e[2]!==y?(o=y.clientIdentifier(),e[2]=y,e[3]=o):o=e[3];let c;e[4]!==o?(c=["deployment-health",o],e[4]=o,e[5]=c):c=e[5];let h;e[6]!==d||e[7]!==c?(h={queryFn:d,queryKey:c},e[6]=d,e[7]=c,e[8]=h):h=e[8];let{data:C,isPending:de}=se(h),Q=C?.live??null,oe=C?.ready??null;if(de){let s;return e[9]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"deployment-health-loading",children:[(0,a.jsx)(ee,{className:"h-16 w-full"}),(0,a.jsx)(ee,{className:"h-40 w-full"})]}),e[9]=s):s=e[9],s}let l=Q?.body??null;if(l===null){let s=Q?.status===403,n;e[10]!==s||e[11]!==Q?.error||e[12]!==t?(n=s?t("The health endpoint is in the admin posture. Paste a valid admin token in the connect popover, or set its auth to public."):t("Couldn't reach the health endpoint: {message}",{message:Q?.error??t("no response")}),e[10]=s,e[11]=Q?.error,e[12]=t,e[13]=n):n=e[13];let m;e[14]!==t?(m=t("Health endpoint unavailable"),e[14]=t,e[15]=m):m=e[15];let f;return e[16]!==n||e[17]!==m?(f=(0,a.jsx)(re,{description:n,testId:"deployment-health-error",title:m}),e[16]=n,e[17]=m,e[18]=f):f=e[18],f}let J;e[19]!==l.status?(J=ye(l.status),e[19]=l.status,e[20]=J):J=e[20];let W=J,u;if(l.status==="unhealthy"){let s;e[21]!==t?(s=t("Unhealthy"),e[21]=t,e[22]=s):s=e[22],u=s}else if(l.status==="degraded"){let s;e[23]!==t?(s=t("Degraded"),e[23]=t,e[24]=s):s=e[24],u=s}else{let s;e[25]!==t?(s=t("Healthy"),e[25]=t,e[26]=s):s=e[26],u=s}let j=oe?.ok??!1,G=j?"ok":"crit",H,I,P,x,N,v,S,V,b,_;if(e[27]!==l.appName||e[28]!==l.appVersion||e[29]!==l.checks||e[30]!==l.timestamp||e[31]!==W||e[32]!==G||e[33]!==j||e[34]!==u||e[35]!==t){let s=[...l.checks].toSorted(xe);I="flex flex-col gap-6",P="deployment-health";let n;e[46]!==t?(n=t("Live liveness, readiness, and per-binding health from the deployment's /_lunora/health endpoint \u2014 wire an uptime monitor or a Cloudflare Health Check at it."),e[46]=t,e[47]=n):n=e[47],e[48]!==n?(x=(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:n}),e[48]=n,e[49]=x):x=e[49];let m;e[50]!==u?(m=(0,a.jsx)("span",{className:"text-sm font-semibold text-foreground","data-testid":"dh-status",children:u}),e[50]=u,e[51]=m):m=e[51];let f;e[52]!==l.appName||e[53]!==l.appVersion?(f=(0,a.jsxs)("span",{className:"font-mono text-[13px] text-muted-foreground","data-testid":"dh-app",children:[l.appName," \xB7 ",l.appVersion]}),e[52]=l.appName,e[53]=l.appVersion,e[54]=f):f=e[54];let D;e[55]!==m||e[56]!==f?(D=(0,a.jsx)("div",{className:"flex items-center gap-3",children:(0,a.jsxs)("div",{className:"grid leading-tight",children:[m,f]})}),e[55]=m,e[56]=f,e[57]=D):D=e[57];let L;e[58]!==t?(L=t("Checked"),e[58]=t,e[59]=L):L=e[59];let T;e[60]!==L?(T=(0,a.jsx)("div",{className:"font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:L}),e[60]=L,e[61]=T):T=e[61];let $;e[62]!==l.timestamp?($=ne(l.timestamp),e[62]=l.timestamp,e[63]=$):$=e[63];let q;e[64]!==$?(q=(0,a.jsx)("time",{className:"text-[13px] text-muted-foreground","data-testid":"dh-timestamp",children:$}),e[64]=$,e[65]=q):q=e[65];let B;e[66]!==T||e[67]!==q?(B=(0,a.jsxs)("div",{className:"text-end",children:[T,q]}),e[66]=T,e[67]=q,e[68]=B):B=e[68],e[69]!==D||e[70]!==B?(N=(0,a.jsx)(O,{className:"gap-0 py-0",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4 p-4",children:[D,B]})}),e[69]=D,e[70]=B,e[71]=N):N=e[71];let E;e[72]!==t?(E=t("Liveness"),e[72]=t,e[73]=E):E=e[73];let R;e[74]!==W||e[75]!==u||e[76]!==E?(R=(0,a.jsx)(ie,{label:E,level:W,testId:"dh-liveness",value:u}),e[74]=W,e[75]=u,e[76]=E,e[77]=R):R=e[77];let U;e[78]!==t?(U=t("Readiness"),e[78]=t,e[79]=U):U=e[79];let A;e[80]!==j||e[81]!==t?(A=t(j?"Ready":"Not ready"),e[80]=j,e[81]=t,e[82]=A):A=e[82];let F;e[83]!==G||e[84]!==U||e[85]!==A?(F=(0,a.jsx)(ie,{label:U,level:G,testId:"dh-readiness",value:A}),e[83]=G,e[84]=U,e[85]=A,e[86]=F):F=e[86],e[87]!==R||e[88]!==F?(v=(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2","data-testid":"dh-probes",children:[R,F]}),e[87]=R,e[88]=F,e[89]=v):v=e[89],H=O,S="gap-0 py-0",V="dh-checks";let K;e[90]!==t?(K=t("Subsystem checks"),e[90]=t,e[91]=K):K=e[91],e[92]!==K?(b=(0,a.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,a.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:K})}),e[92]=K,e[93]=b):b=e[93],_=s.length===0?(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"dh-checks-empty",children:t("No checks reported.")}):(0,a.jsx)("ul",{className:"divide-y divide-border",children:s.map(g=>(0,a.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 px-4 py-2.5 text-xs","data-testid":`dh-check-${g.name}`,children:[(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{"aria-hidden":"true",className:Y("size-1.5 shrink-0 rounded-full",g.status==="up"?"bg-success":"bg-destructive")}),(0,a.jsx)("span",{className:"font-mono text-foreground",children:g.name}),g.critical&&(0,a.jsx)(Z,{variant:"outline",children:t("Critical")})]}),(0,a.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[g.message!==void 0&&(0,a.jsx)("span",{className:"text-muted-foreground",children:g.message}),(0,a.jsx)(Z,{"data-testid":`dh-check-status-${g.name}`,variant:g.status==="up"?"secondary":"destructive",children:g.status==="up"?t("Up"):t("Down")})]})]},g.name))}),e[27]=l.appName,e[28]=l.appVersion,e[29]=l.checks,e[30]=l.timestamp,e[31]=W,e[32]=G,e[33]=j,e[34]=u,e[35]=t,e[36]=H,e[37]=I,e[38]=P,e[39]=x,e[40]=N,e[41]=v,e[42]=S,e[43]=V,e[44]=b,e[45]=_}else H=e[36],I=e[37],P=e[38],x=e[39],N=e[40],v=e[41],S=e[42],V=e[43],b=e[44],_=e[45];let z;e[94]!==H||e[95]!==S||e[96]!==V||e[97]!==b||e[98]!==_?(z=(0,a.jsxs)(H,{className:S,"data-testid":V,children:[b,_]}),e[94]=H,e[95]=S,e[96]=V,e[97]=b,e[98]=_,e[99]=z):z=e[99];let M;return e[100]!==I||e[101]!==P||e[102]!==x||e[103]!==N||e[104]!==v||e[105]!==z?(M=(0,a.jsxs)("div",{className:I,"data-testid":P,children:[x,N,v,z]}),e[100]=I,e[101]=P,e[102]=x,e[103]=N,e[104]=v,e[105]=z,e[106]=M):M=e[106],M},"Pe");function xe(r,e){return r.name.localeCompare(e.name)}k(xe,"he");export{Pe as DeploymentHealthPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as p,c as l}from"./chunk-
|
|
1
|
+
import{b as p,c as l}from"./chunk-OKG3HWSJ.js";import{a as t,d as g,e as h}from"./chunk-YKXDMIHQ.js";var u=g(h(),1);var a={console:"`",palette:"k"},c="lunora-studio-shortcuts",r=new Set,w=t(o=>{let n=typeof o?.console=="string"?o.console.toLowerCase():void 0,s=typeof o?.palette=="string"?o.palette.toLowerCase():void 0;return n?.length===1&&s?.length===1&&n!==s?{console:n,palette:s}:a},"p"),e=a,m=t(()=>{e=w(p(c)[0]);for(let o of r)o()},"S");m();var y=t(o=>(r.add(o),()=>{r.delete(o)}),"g"),i=t(()=>e,"a"),S=t(()=>(0,u.useSyncExternalStore)(y,i,i),"w"),L=t((o,n)=>{if(n.length!==1)return;let s=n.toLowerCase(),f=o==="console"?"palette":"console";e=e[f]===s?{...e,[o]:s,[f]:e[o]}:{...e,[o]:s},l(c,[e]);for(let d of r)d()},"y"),v=t(()=>{e=a,l(c,[e]);for(let o of r)o()},"C");export{S as a,L as b,v as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i,d as m,e as v,f as b}from"./chunk-
|
|
1
|
+
import{a as i,d as m,e as v,f as b}from"./chunk-YKXDMIHQ.js";var n=m(b(),1),r=m(v(),1);var x=i(function(t,a,s){let e=(0,n.c)(4),o=a===void 0?300:a,[d,f]=(0,r.useState)(t),[p,l]=(0,r.useState)(s);s!==void 0&&s!==p&&(l(s),f(t));let u,c;return e[0]!==o||e[1]!==t?(u=i(()=>{let T=setTimeout(()=>{f(t)},o);return()=>{clearTimeout(T)}},"c"),c=[t,o],e[0]=o,e[1]=t,e[2]=u,e[3]=c):(u=e[2],c=e[3]),(0,r.useEffect)(u,c),d},"T");export{x as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as G}from"./chunk-
|
|
1
|
+
import{a as G}from"./chunk-EA2JKR5D.js";import{a as x}from"./chunk-IMOHEGMV.js";import{a as U}from"./chunk-IFLTA2OD.js";import{b as M}from"./chunk-OGUKYRFM.js";import"./chunk-OKG3HWSJ.js";import{P as O}from"./chunk-46ZJ3TM4.js";import"./chunk-4L4WTGN5.js";import{a as h}from"./chunk-EBWXFG4H.js";import"./chunk-TGHH7ZFA.js";import"./chunk-5GFSKIB2.js";import{b as w}from"./chunk-NCCAMFB6.js";import"./chunk-25NFR6EB.js";import{a as E}from"./chunk-CXNZVJ3S.js";import{f as D}from"./chunk-JBIN7W2B.js";import"./chunk-FSRSK4LY.js";import{d as K,e as _,f as z,h as B,o as P,r as q}from"./chunk-Y4Q25F6X.js";import"./chunk-T2IE5GKA.js";import{a as s,d as J,e as ie,g as oe}from"./chunk-YKXDMIHQ.js";var i=J(ie(),1);var e=J(oe(),1);var de=s(r=>r.kind==="id"?r.table===void 0?"id":`id<${r.table}>`:r.kind==="array"?r.element===void 0?"array":`${r.element}[]`:r.kind,"oe"),le=s(r=>r===void 0||r.length===0?"()":`(${r.map(o=>`${o.name}${o.optional?"?":""}: ${de(o)}`).join(", ")})`,"ie"),ce=s(r=>{switch(r){case"array":return[];case"bigint":case"number":return 0;case"boolean":return!1;case"object":case"record":return{};default:return""}},"de"),ue=s(r=>{let o={};for(let a of r??[])a.optional||(o[a.name]=ce(a.kind));return JSON.stringify(o,void 0,2)},"le"),me=z(E.runAs),fe=10,pe=s(r=>r===void 0?"undefined":JSON.stringify(r,null,2),"me"),Fe=s(({functions:r,runAsIdentity:o=!1}={})=>{let a=K(),u=D(),[H,Q]=(0,i.useState)(null),[k,V]=(0,i.useState)(null),g=r??H??[],[I,S]=(0,i.useState)(""),[m,b]=(0,i.useState)("{}"),[c,F]=(0,i.useState)(""),[f,W]=(0,i.useState)(""),[v,p]=(0,i.useState)("idle"),[X,y]=(0,i.useState)(void 0),[C,N]=(0,i.useState)(null),[$,Y]=(0,i.useState)([]);(0,i.useEffect)(()=>{if(r!==void 0)return;let t=!1;return u.listFunctions().then(d=>(t||Q(d),d)).catch(d=>{t||V(B(d))}),()=>{t=!0}},[u,r]);let A=I===""?g[0]?.path??"":I,n=g.find(t=>t.path===A),Z=s(async()=>{if(!n)return;let t;try{t=m.trim()===""?{}:JSON.parse(m)}catch(l){p("error"),y(void 0),N(a("Invalid JSON args: {message}",{message:l.message}));return}let d={__lunoraRef:n.path},R=c.trim()===""?{}:{shardKey:c.trim()},j=o?f.trim():"",L=s(l=>{Y(T=>[{argsText:m,at:Date.now(),id:(T[0]?.id??0)+1,kind:n.kind,path:n.path,shardKey:c,status:l},...T].slice(0,fe))},"$");p("running"),N(null);try{let l=j===""?await _(u,n.kind,d,t,R):await u.query(me,{args:t,functionPath:n.path,userId:j},R);M(c),y(l),p("success"),L("success")}catch(l){y(void 0),N(l.message),p("error"),L("error")}},"J"),ee=s(t=>{S(t.path),b(t.argsText),F(t.shardKey)},"M"),te=s(t=>{S(t.target.value)},"P"),re=s(t=>{b(t.target.value)},"z"),ae=s(t=>{W(t.target.value)},"q"),se=s(()=>{P(Z())},"H"),ne=s(()=>{b(ue(n?.args))},"V");return(0,e.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-function-runner",children:[k!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"function-discover-error",role:"alert",children:k}),(0,e.jsxs)("div",{className:"flex flex-col gap-4 rounded-xl border border-border bg-card p-4",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,e.jsx)(x,{htmlFor:"function-select",children:a("Function")}),(0,e.jsx)("select",{"aria-label":a("Function"),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"function-select",id:"function-select",onChange:te,value:A,children:g.map(t=>(0,e.jsxs)("option",{value:t.path,children:[t.path," (",t.kind,")"]},t.path))}),n!==void 0&&(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,e.jsx)("span",{className:"mr-1.5 font-medium",children:a("Signature")}),(0,e.jsx)("code",{className:"font-mono","data-testid":"function-signature",children:le(n.args)})]})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsx)(x,{htmlFor:"args-input",children:a("Arguments")}),(0,e.jsx)(h,{"data-testid":"prefill-button",disabled:n===void 0,onClick:ne,size:"xs",type:"button",variant:"ghost",children:a("Prefill")})]}),(0,e.jsx)(G,{"aria-label":a("Arguments"),className:"font-mono text-xs","data-testid":"args-input",id:"args-input",onChange:re,value:m})]}),(0,e.jsx)(U,{onChange:F,testId:"shard-input",value:c}),o&&(0,e.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"run-as-field",children:[(0,e.jsx)(x,{htmlFor:"run-as-input",children:a("Run as identity (userId)")}),(0,e.jsx)(O,{"aria-label":a("Run as identity (userId)"),className:"font-mono text-xs","data-testid":"run-as-input",id:"run-as-input",onChange:ae,placeholder:a("Leave empty to run as admin"),value:f}),(0,e.jsx)("p",{className:"text-[11px] text-muted-foreground",children:a("Dev only: runs the function as this user so you can test auth and RLS. Forged over the admin gate.")})]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)(h,{"data-testid":"run-button",disabled:v==="running"||n===void 0,onClick:se,type:"button",children:a("Run")}),n!==void 0&&(0,e.jsx)(w,{variant:"outline",children:n.kind}),o&&f.trim()!==""&&(0,e.jsx)(w,{"data-testid":"run-as-badge",variant:"secondary",children:a("as {userId}",{userId:f.trim()})})]})]}),v==="error"&&C!==null&&(0,e.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs text-destructive","data-testid":"error",role:"alert",children:C}),v==="success"&&(0,e.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs","data-testid":"result",children:pe(X)}),$.length>0&&(0,e.jsx)("ul",{className:"flex flex-col overflow-hidden rounded-xl border border-border","data-testid":"fn-history",children:$.map((t,d)=>(0,e.jsxs)("li",{className:"flex flex-wrap items-center gap-2 border-b border-border px-3 py-2 text-sm last:border-b-0","data-testid":"fn-history-row",children:[(0,e.jsx)("span",{className:t.status==="success"?"text-success":"text-destructive","data-testid":`fn-history-status-${d.toString()}`,children:t.status==="success"?"\u2713":"\u2717"})," ",(0,e.jsxs)("span",{className:"font-mono text-xs",children:[t.path," (",t.kind,")"]})," ",(0,e.jsx)("time",{className:"text-xs text-muted-foreground",children:q(t.at)})," ",(0,e.jsx)(h,{className:"ml-auto","data-testid":`fn-history-load-${d.toString()}`,onClick:s(()=>{ee(t)},"onClick"),size:"xs",type:"button",variant:"ghost",children:a("Load")})]},t.id))})]})},"Ae");export{Fe as FunctionRunner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as R}from"./chunk-
|
|
1
|
+
import{b as R}from"./chunk-LJC5BM3X.js";import"./chunk-JAZCU2PP.js";import"./chunk-ULIQFBZU.js";import"./chunk-OOESPRIZ.js";import"./chunk-35DM4JJG.js";import{a as p}from"./chunk-CXNZVJ3S.js";import{c as h}from"./chunk-ECQTVV2J.js";import"./chunk-JBIN7W2B.js";import"./chunk-FSRSK4LY.js";import"./chunk-HEAQVSNS.js";import"./chunk-WUWBZPUK.js";import{d as g}from"./chunk-Y4Q25F6X.js";import"./chunk-T2IE5GKA.js";import{a as i,d as m,f as S,g as _}from"./chunk-YKXDMIHQ.js";var f=m(S(),1);var k=m(_(),1);var A=i((e,s)=>({"admin-token-weak":e("Weak admin token"),"auth-secret-weak":e("Weak auth secret"),"cookies-insecure":e("Session cookies are not Secure"),"cors-wildcard-credentials":e("Wildcard CORS with credentials"),"csrf-disabled":e("CSRF/origin guard is off"),"dev-args-unredacted":e("Request log keeps un-redacted args"),"security-headers-disabled":e("Security headers are off"),"ws-gate-open":e("Live admin subscriptions are ungated")})[s.kind],"f"),w=i(e=>Array.isArray(e.findings)?e.findings:[],"k"),E=i(e=>({"admin-token-weak":"LUNORA_ADMIN_TOKEN","auth-secret-weak":"AUTH_SECRET","cookies-insecure":"BETTER_AUTH_URL","cors-wildcard-credentials":"LUNORA_ALLOWED_ORIGINS","csrf-disabled":"LUNORA_SECURITY_CSRF","dev-args-unredacted":"request log","security-headers-disabled":"LUNORA_SECURITY_HEADERS","ws-gate-open":"LUNORA_WS_BEARER"})[e.kind],"S"),T=i((e,s)=>({"admin-token-weak":e("Your admin token is {length} characters \u2014 use at least {min} for a brute-force-resistant secret.",{length:s.detail?.length,min:s.detail?.min}),"auth-secret-weak":e("Your auth secret is {length} characters \u2014 use at least {min} (e.g. `openssl rand -hex 32`) to sign sessions safely.",{length:s.detail?.length,min:s.detail?.min}),"cookies-insecure":e("BETTER_AUTH_URL is a plaintext http:// origin, so session cookies cannot be Secure and ride in cleartext. Serve auth over https:// in production."),"cors-wildcard-credentials":e("LUNORA_ALLOWED_ORIGINS includes a wildcard while credentials are allowed \u2014 browsers reject this and it defeats the allowlist. Name explicit origins instead of *."),"csrf-disabled":e("LUNORA_SECURITY_CSRF is off, so cross-origin state-changing cookie requests are not blocked. Re-enable it in production to keep mutations un-forgeable."),"dev-args-unredacted":e("This worker reports a development environment, so the request log stores raw args and identity. Confirm it isn't a mislabeled production deploy."),"security-headers-disabled":e("LUNORA_SECURITY_HEADERS is off, so HSTS, CSP, nosniff, and frame-options are not applied. Re-enable the baseline headers in production."),"ws-gate-open":e("LUNORA_WS_BEARER is unset, so the WebSocket upgrade gate is open: live admin subscriptions need no credential. Set it to gate them like the HTTP admin RPCs.")})[s.kind],"A"),L=i(()=>{let e=(0,f.c)(8),s=g(),t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={},e[0]=t):t=e[0];let{data:a,error:d,errorSource:c}=h(p.getSecurityAudit,t),n;if(e[1]!==a||e[2]!==s){let u=a===void 0?null:w(a);n=u===null?null:u.map(r=>({description:T(s,r),entity:E(r),issueType:A(s,r),key:r.kind,level:r.level})),e[1]=a,e[2]=s,e[3]=n}else n=e[3];let l=n,o;return e[4]!==d||e[5]!==c||e[6]!==l?(o=(0,k.jsx)(R,{error:d,errorSource:c,rows:l,testId:"lunora-security-advisor"}),e[4]=d,e[5]=c,e[6]=l,e[7]=o):o=e[7],o},"y");export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-YKXDMIHQ.js";var g=new Set(["contains","eq","gt","gte","lt","lte","ne"]),n=s(r=>{if(typeof r!="string")return;let e=r.trim();return e===""?void 0:e},"s"),v=s(r=>{if(r===null||typeof r!="object")return!1;let e=r;return typeof e.column=="string"&&typeof e.operator=="string"&&g.has(e.operator)},"p"),h=s(r=>{if(typeof r!="string"||r==="")return[];try{let e=JSON.parse(r);return Array.isArray(e)?e.filter(v):[]}catch{return[]}},"c"),f=s(r=>{if(typeof r!="string"||r==="")return;let e=r.lastIndexOf(":");if(e<=0)return;let o=r.slice(0,e),i=r.slice(e+1);if(!(i!=="asc"&&i!=="desc"))return{column:o,direction:i}},"f"),p=/^[\da-f]{16}$/u,u=s(r=>{let e={};if(typeof r.pins=="string"&&r.pins!==""){let l=r.pins.split(",").filter(c=>c!==""&&c.length<=64).slice(0,12);l.length>0&&(e.pins=l.join(","))}r.schema==="global"&&(e.schema="global");let o=n(r.table);o!==void 0&&(e.table=o);let i=n(r.shard);i!==void 0&&(e.shard=i);let d=n(r.search);d!==void 0&&(e.search=d);let a=n(r.order);a!==void 0&&f(a)!==void 0&&(e.order=a);let t=n(r.filters);return t!==void 0&&h(t).length>0&&(e.filters=t),e},"h"),y=s(r=>{let e=h(r.filters),o=f(r.order);return{filters:e.length>0?e:void 0,orderBy:o,search:typeof r.search=="string"&&r.search!==""?r.search:void 0,shard:typeof r.shard=="string"&&r.shard!==""?r.shard:void 0,table:typeof r.table=="string"&&r.table!==""?r.table:void 0,tier:r.schema==="global"?"global":"shard"}},"b"),b=s(r=>{let e=r.filters??[];return{filters:e.length>0?JSON.stringify(e):void 0,order:r.orderBy===void 0?void 0:`${r.orderBy.column}:${r.orderBy.direction}`,schema:r.tier==="global"?"global":void 0,search:r.search!==void 0&&r.search!==""?r.search:void 0,shard:r.shard!==void 0&&r.shard!==""?r.shard:void 0,table:r.table!==void 0&&r.table!==""?r.table:void 0}},"v"),m=s(r=>{let{version:e}=r;return typeof e=="string"&&p.test(e)?{version:e}:{}},"y");export{u as a,y as b,b as c,m as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-YKXDMIHQ.js";var r=n(t=>{if(typeof t=="string")return t;try{return JSON.stringify(t)??String(t)}catch{return String(t)}},"i"),o=n(t=>typeof t!="object"||t===null||Array.isArray(t)?"":Object.entries(t).map(([e,i])=>`${e}=${r(i)}`).join(" "),"o");export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u,d as y,e as d}from"./chunk-
|
|
1
|
+
import{a as u,d as y,e as d}from"./chunk-YKXDMIHQ.js";var t=y(d(),1);var S=u((r,a=400)=>{let e=(r??"").trim(),[o,c]=(0,t.useState)(e),[i,n]=(0,t.useState)(e),m=(0,t.useRef)(r);m.current!==r&&(m.current=r,c(e),n(e));let f=o.trim();return(0,t.useEffect)(()=>{let s=setTimeout(()=>{n(f)},a);return()=>{clearTimeout(s)}},[f,a]),{queryShardKey:i,setShardKey:u(s=>{c(s)},"setShardKey"),shardKey:o}},"f");export{S as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ve}from"./chunk-CYX3OHJ3.js";import"./chunk-AFKLFS74.js";import{a as He}from"./chunk-METRMDIQ.js";import{a as Ke}from"./chunk-WUW4ZHRL.js";import"./chunk-DUDQV6XJ.js";import{a as Ge}from"./chunk-OG57FC7W.js";import{P as je}from"./chunk-AOAJGSYZ.js";import"./chunk-TFMQSCGC.js";import{a as le}from"./chunk-BWEXJENB.js";import"./chunk-74ASA4WU.js";import"./chunk-XQS7KSHL.js";import{b as de}from"./chunk-SPDZUX4P.js";import"./chunk-7PIHTTND.js";import{a as Pe}from"./chunk-5U6757U7.js";import{a as Ue}from"./chunk-PZ4QDWTI.js";import"./chunk-FUVCG23X.js";import"./chunk-F7JOSNAT.js";import{a as F}from"./chunk-DZGOHOOE.js";import{c as Me}from"./chunk-4U5PYZLE.js";import{f as We}from"./chunk-CG5OTGTR.js";import"./chunk-RCZTUWG3.js";import{a as ie}from"./chunk-UANVABQG.js";import{a as _e,b as Be,c as ke,d as G,e as C,f as w}from"./chunk-L4EZAHCD.js";import{a as Te,e as De}from"./chunk-IYWVSMAY.js";import{d as $,f as ue,g as ce,h as me,o as he,r as ze}from"./chunk-6ZPTNC34.js";import"./chunk-3KLX63D7.js";import{a as h,d as Ee,e as rt,f as nt,g as ot}from"./chunk-R5ZTCHCE.js";var W=Ee(nt(),1);var A=Ee(rt(),1);var t=Ee(ot(),1);var dt=h((n,e)=>{let a=new Set(n.map(s=>s.deadLetterQueue).filter(s=>typeof s=="string"&&s!=="")),l=n.filter(s=>(s.deadLetterQueue===void 0||s.deadLetterQueue==="")&&!a.has(s.name)),d=e.filter(s=>s.deadLettered).length;return{deadLetteredCount:d,queuesWithoutDlq:l,showReliabilityWarning:l.length>0||d>0}},"rt"),lt=200,it=ue(F.sendQueueMessage),ut=ue(F.replayQueueMessage),ct=ue(F.clearQueueMessages),Xe=96,mt=h(n=>{if(n===void 0)return"\u2014";try{return JSON.stringify(n)}catch{return"[unserializable]"}},"it"),ht=h(n=>n.length>Xe?`${n.slice(0,Xe)}\u2026`:n,"ct"),pt=h(n=>n==="error"?"destructive":n==="retry"?"outline":"secondary","ut"),gt=h((n,e)=>e(n==="messages"?"Messages":n==="send"?"Send":"Declared"),"mt"),ft=h(n=>{let e=(0,W.c)(11),{loaded:a,queues:l}=n,d=$(),s;e[0]!==d?(s=d("Queues are declared in code with defineQueue. Enqueue from a mutation or action with ctx.queues.<name>.send(...); push consumers process batches in the worker."),e[0]=d,e[1]=s):s=e[1];let o;e[2]!==s?(o=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:s}),e[2]=s,e[3]=o):o=e[3];let r;e[4]!==a||e[5]!==l||e[6]!==d?(r=a&&l.length===0?(0,t.jsx)(ie,{description:d("No defineQueue is declared in lunora/queues.ts in this deployment. Add one to offload async work to a Cloudflare Queue."),testId:"queues-empty",title:d("No queues defined")}):(0,t.jsx)(Te,{className:"overflow-hidden py-0",children:(0,t.jsx)(De,{className:"px-0",children:(0,t.jsxs)(_e,{"data-testid":"queues-table",children:[(0,t.jsx)(Be,{children:(0,t.jsxs)(G,{children:[(0,t.jsx)(C,{children:d("Export")}),(0,t.jsx)(C,{children:d("Queue")}),(0,t.jsx)(C,{children:d("Mode")}),(0,t.jsx)(C,{children:d("Binding")}),(0,t.jsx)(C,{children:d("Dead-letter")})]})}),(0,t.jsx)(ke,{children:l.map(bt)})]})})}),e[4]=a,e[5]=l,e[6]=d,e[7]=r):r=e[7];let p;return e[8]!==o||e[9]!==r?(p=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"queues-declared",children:[o,r]}),e[8]=o,e[9]=r,e[10]=p):p=e[10],p},"ft"),xt=h(n=>{let e=(0,W.c)(67),{message:a,onReplay:l,replayingId:d}=n,s=$(),o,r,p,c,x,N,y,i,m,f;if(e[0]!==a.attempts||e[1]!==a.body||e[2]!==a.deadLettered||e[3]!==a.exportName||e[4]!==a.id||e[5]!==a.messageId||e[6]!==a.outcome||e[7]!==a.queue||e[8]!==s){let j=mt(a.body);r=G,N=`queues-message-${a.id}`;let z=a.exportName??a.queue;e[19]!==z?(y=(0,t.jsx)(w,{className:"font-mono text-xs",children:z}),e[19]=z,e[20]=y):y=e[20],e[21]!==a.messageId?(i=(0,t.jsx)(w,{className:"max-w-[16ch] truncate font-mono text-xs text-muted-foreground",title:a.messageId,children:a.messageId}),e[21]=a.messageId,e[22]=i):i=e[22],e[23]!==a.attempts?(m=(0,t.jsx)(w,{className:"font-mono text-xs tabular-nums",children:a.attempts}),e[23]=a.attempts,e[24]=m):m=e[24];let T=`queues-outcome-${a.id}`,D;e[25]!==a.outcome?(D=pt(a.outcome),e[25]=a.outcome,e[26]=D):D=e[26];let I;e[27]!==a.outcome||e[28]!==T||e[29]!==D?(I=(0,t.jsx)(de,{"data-testid":T,variant:D,children:a.outcome}),e[27]=a.outcome,e[28]=T,e[29]=D,e[30]=I):I=e[30];let M;e[31]!==a.deadLettered||e[32]!==a.id||e[33]!==s?(M=a.deadLettered&&(0,t.jsx)(de,{"data-testid":`queues-dlq-${a.id}`,variant:"destructive",children:s("DLQ")}),e[31]=a.deadLettered,e[32]=a.id,e[33]=s,e[34]=M):M=e[34],e[35]!==I||e[36]!==M?(f=(0,t.jsx)(w,{children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[I,M]})}),e[35]=I,e[36]=M,e[37]=f):f=e[37],o=w,p="max-w-[32ch] truncate font-mono text-xs text-muted-foreground",c=j,x=ht(j),e[0]=a.attempts,e[1]=a.body,e[2]=a.deadLettered,e[3]=a.exportName,e[4]=a.id,e[5]=a.messageId,e[6]=a.outcome,e[7]=a.queue,e[8]=s,e[9]=o,e[10]=r,e[11]=p,e[12]=c,e[13]=x,e[14]=N,e[15]=y,e[16]=i,e[17]=m,e[18]=f}else o=e[9],r=e[10],p=e[11],c=e[12],x=e[13],N=e[14],y=e[15],i=e[16],m=e[17],f=e[18];let g;e[38]!==o||e[39]!==p||e[40]!==c||e[41]!==x?(g=(0,t.jsx)(o,{className:p,title:c,children:x}),e[38]=o,e[39]=p,e[40]=c,e[41]=x,e[42]=g):g=e[42];let q;e[43]!==a.capturedAt?(q=ze(a.capturedAt,"\u2014"),e[43]=a.capturedAt,e[44]=q):q=e[44];let b;e[45]!==q?(b=(0,t.jsx)(w,{className:"text-xs text-muted-foreground tabular-nums",children:q}),e[45]=q,e[46]=b):b=e[46];let S=`queues-replay-${a.id}`,E=d!==null,Q;e[47]!==a.id||e[48]!==d||e[49]!==s?(Q=d===a.id?s("Replaying\u2026"):s("Replay"),e[47]=a.id,e[48]=d,e[49]=s,e[50]=Q):Q=e[50];let L;e[51]!==a.id||e[52]!==l||e[53]!==S||e[54]!==E||e[55]!==Q?(L=(0,t.jsx)(w,{children:(0,t.jsx)(le,{"data-id":a.id,"data-testid":S,disabled:E,onClick:l,size:"xs",type:"button",variant:"outline",children:Q})}),e[51]=a.id,e[52]=l,e[53]=S,e[54]=E,e[55]=Q,e[56]=L):L=e[56];let _;return e[57]!==r||e[58]!==b||e[59]!==L||e[60]!==N||e[61]!==y||e[62]!==i||e[63]!==m||e[64]!==f||e[65]!==g?(_=(0,t.jsxs)(r,{"data-testid":N,children:[y,i,m,f,g,b,L]}),e[57]=r,e[58]=b,e[59]=L,e[60]=N,e[61]=y,e[62]=i,e[63]=m,e[64]=f,e[65]=g,e[66]=_):_=e[66],_},"ht"),yt=h(n=>{let e=(0,W.c)(30),{hasError:a,messages:l,onClear:d,onReplay:s,replayingId:o}=n,r=$(),p;e[0]!==r?(p=r("Cloudflare Queues have no peek API, so this is what push consumers actually processed \u2014 not pending depth."),e[0]=r,e[1]=p):p=e[1];let c;e[2]!==p?(c=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:p}),e[2]=p,e[3]=c):c=e[3];let x;e[4]!==l.length||e[5]!==r?(x=r("Clear {count} messages?",{count:l.length}),e[4]=l.length,e[5]=r,e[6]=x):x=e[6];let N=l.length===0,y;e[7]!==r?(y=r("Clear log"),e[7]=r,e[8]=y):y=e[8];let i;e[9]!==d||e[10]!==x||e[11]!==N||e[12]!==y?(i=(0,t.jsx)("div",{className:"ml-auto",children:(0,t.jsx)(Ge,{confirmLabel:x,disabled:N,onConfirm:d,testId:"queues-clear",children:y})}),e[9]=d,e[10]=x,e[11]=N,e[12]=y,e[13]=i):i=e[13];let m;e[14]!==l.length||e[15]!==r?(m=l.length>0&&(0,t.jsx)(de,{"data-testid":"queues-count",variant:"secondary",children:r("{count} messages",{count:l.length})}),e[14]=l.length,e[15]=r,e[16]=m):m=e[16];let f;e[17]!==c||e[18]!==i||e[19]!==m?(f=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,i,m]}),e[17]=c,e[18]=i,e[19]=m,e[20]=f):f=e[20];let g;e[21]!==a||e[22]!==l||e[23]!==s||e[24]!==o||e[25]!==r?(g=!a&&l.length===0?(0,t.jsx)(ie,{description:r("Consumed messages appear here once a push consumer processes a batch in dev. Send one from the Send tab to see it captured."),testId:"queues-messages-empty",title:r("No consumed messages yet.")}):(0,t.jsx)(Te,{className:"overflow-hidden py-0",children:(0,t.jsx)(De,{className:"px-0",children:(0,t.jsx)(Ve,{className:"max-h-[32rem]","data-testid":"queues-messages-scroll",children:(0,t.jsxs)(_e,{"data-testid":"queues-messages-table",children:[(0,t.jsx)(Be,{children:(0,t.jsxs)(G,{children:[(0,t.jsx)(C,{children:r("Export")}),(0,t.jsx)(C,{children:r("Message")}),(0,t.jsx)(C,{children:r("Attempts")}),(0,t.jsx)(C,{children:r("Outcome")}),(0,t.jsx)(C,{children:r("Body")}),(0,t.jsx)(C,{children:r("Captured")}),(0,t.jsx)(C,{})]})}),(0,t.jsx)(ke,{children:l.map(b=>(0,t.jsx)(xt,{message:b,onReplay:s,replayingId:o},b.id))})]})})})}),e[21]=a,e[22]=l,e[23]=s,e[24]=o,e[25]=r,e[26]=g):g=e[26];let q;return e[27]!==f||e[28]!==g?(q=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"queues-messages",children:[f,g]}),e[27]=f,e[28]=g,e[29]=q):q=e[29],q},"pt"),Nt=h(n=>{let e=(0,W.c)(20),{batchMode:a,bodyText:l,delayText:d,onBatchModeChange:s,onBodyChange:o,onDelayChange:r,onSelectExport:p,onSend:c,queues:x,selectedExportName:N,sending:y}=n,i=$(),m;e[0]!==i?(m=i("Enqueue a JSON message to a declared producer to exercise its consumer. Nothing is captured until the consumer processes it."),e[0]=i,e[1]=m):m=e[1];let f;e[2]!==m?(f=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:m}),e[2]=m,e[3]=f):f=e[3];let g;e[4]!==a||e[5]!==l||e[6]!==d||e[7]!==s||e[8]!==o||e[9]!==r||e[10]!==p||e[11]!==c||e[12]!==x||e[13]!==N||e[14]!==y||e[15]!==i?(g=x.length===0?(0,t.jsx)(ie,{description:i("Declare a queue with defineQueue in lunora/queues.ts to enqueue a test message."),testId:"queues-send-empty",title:i("No queues to send to")}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("select",{"aria-label":i("Queue"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"queues-send-select",onChange:p,value:N,children:x.map(qt)}),(0,t.jsx)(je,{"aria-label":i("Delay (seconds)"),className:"max-w-36","data-testid":"queues-send-delay",min:0,onChange:r,placeholder:i("Delay (s)"),type:"number",value:d}),(0,t.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",htmlFor:"queues-send-batch",children:[(0,t.jsx)("input",{checked:a,"data-testid":"queues-send-batch",id:"queues-send-batch",onChange:s,type:"checkbox"}),i("Send as batch (JSON array)")]}),(0,t.jsx)(le,{className:"ml-auto","data-testid":"queues-send-button",disabled:y||N==="",onClick:c,type:"button",children:i(y?"Sending\u2026":"Send message")})]}),(0,t.jsx)(He,{"aria-label":i("Message body (JSON)"),className:"font-mono","data-testid":"queues-send-body",onChange:o,placeholder:a?'[ { "hello": "world" } ]':'{ "hello": "world" }',value:l})]}),e[4]=a,e[5]=l,e[6]=d,e[7]=s,e[8]=o,e[9]=r,e[10]=p,e[11]=c,e[12]=x,e[13]=N,e[14]=y,e[15]=i,e[16]=g):g=e[16];let q;return e[17]!==f||e[18]!==g?(q=(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"queues-send",children:[f,g]}),e[17]=f,e[18]=g,e[19]=q):q=e[19],q},"gt"),Ft=h(n=>{let e=(0,W.c)(59),{limit:a}=n,l=a??lt,d=We(),s=$(),[o,r]=(0,A.useState)("declared"),[p,c]=(0,A.useState)(null),x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x={},e[0]=x):x=e[0];let{data:N,error:y,errorSource:i}=Me(F.listQueues,x),m;e[1]!==l?(m={limit:l},e[1]=l,e[2]=m):m=e[2];let{data:f,error:g,errorSource:q,refetch:b}=Me(F.getQueueMessages,m),S=Array.isArray(N?.queues)?[...N.queues].toSorted(vt):[],E=f?.entries??[],{deadLetteredCount:Q,queuesWithoutDlq:L,showReliabilityWarning:_}=dt(S,E),[j,z]=(0,A.useState)(""),[T,D]=(0,A.useState)(""),[I,M]=(0,A.useState)(""),[U,Ye]=(0,A.useState)(!1),[pe,Oe]=(0,A.useState)(!1),[ge,Re]=(0,A.useState)(null),H=S.some(u=>u.exportName===j)?j:S[0]?.exportName??"",Je=o==="messages"?g:y,Ze=o==="messages"?q:i,fe=Je??p,xe=Je===null?p:Ze,K;e[3]!==b?(K=h(()=>{b()},"H"),e[3]=b,e[4]=K):K=e[4],Ke(K,o==="messages");let ye=h(async()=>{c(null);let u=H;if(u==="")return;let v=null,$e=T.trim();if($e!=="")try{v=JSON.parse($e)}catch{c(s("Body must be valid JSON."));return}let Ae,Fe=I.trim();if(Fe!==""){let P=Number(Fe);if(!Number.isFinite(P)||P<0){c(s("Delay must be a non-negative number of seconds."));return}Ae=P}if(U&&!Array.isArray(v)){c(s("Batch mode needs a JSON array body \u2014 each element is enqueued as one message."));return}Oe(!0);let st=U?{batch:v,delaySeconds:Ae,exportName:u}:{body:v,delaySeconds:Ae,exportName:u};try{await d.query(it,st,ce("")),b()}catch(P){c(me(P))}Oe(!1)},"ue"),V;e[5]!==d||e[6]!==b?(V=h(async u=>{c(null),Re(u);try{await d.query(ut,{id:u},ce("")),b()}catch(v){c(me(v))}Re(null)},"V"),e[5]=d,e[6]=b,e[7]=V):V=e[7];let Ne=V,X;e[8]!==d||e[9]!==b?(X=h(async()=>{c(null);try{await d.query(ct,{},ce("")),b()}catch(u){c(me(u))}},"Y"),e[8]=d,e[9]=b,e[10]=X):X=e[10];let be=X,Y;e[11]===Symbol.for("react.memo_cache_sentinel")?(Y=h(u=>{let v=u.currentTarget.dataset.tab;(v==="declared"||v==="messages"||v==="send")&&r(v)},"X"),e[11]=Y):Y=e[11];let et=Y,Z;e[12]===Symbol.for("react.memo_cache_sentinel")?(Z=h(u=>{z(u.currentTarget.value)},"K"),e[12]=Z):Z=e[12];let qe=Z,ee;e[13]===Symbol.for("react.memo_cache_sentinel")?(ee=h(u=>{D(u.currentTarget.value)},"Z"),e[13]=ee):ee=e[13];let ve=ee,te;e[14]===Symbol.for("react.memo_cache_sentinel")?(te=h(u=>{M(u.currentTarget.value)},"ee"),e[14]=te):te=e[14];let Se=te,ae;e[15]===Symbol.for("react.memo_cache_sentinel")?(ae=h(u=>{Ye(u.currentTarget.checked)},"te"),e[15]=ae):ae=e[15];let Ce=ae,se;e[16]!==ye?(se=h(()=>{he(ye())},"se"),e[16]=ye,e[17]=se):se=e[17];let we=se,re;e[18]!==Ne?(re=h(u=>{let{id:v}=u.currentTarget.dataset;v!==void 0&&he(Ne(v))},"ae"),e[18]=Ne,e[19]=re):re=e[19];let Ie=re,ne;e[20]!==be?(ne=h(()=>{he(be())},"re"),e[20]=be,e[21]=ne):ne=e[21];let Qe=ne,tt="flex flex-col gap-6",at="lunora-queues-panel",B;e[22]!==s||e[23]!==o?(B=(0,t.jsx)("div",{className:"flex items-center gap-1","data-testid":"queues-tabs",role:"tablist",children:["declared","messages","send"].map(u=>(0,t.jsx)(le,{"aria-selected":o===u,"data-tab":u,"data-testid":`queues-tab-${u}`,onClick:et,role:"tab",size:"sm",type:"button",variant:o===u?"secondary":"ghost",children:gt(u,s)},u))}),e[22]=s,e[23]=o,e[24]=B):B=e[24];let k;e[25]!==fe||e[26]!==xe?(k=fe!==null&&(0,t.jsx)(Pe,{error:xe,testId:"queues-error"}),e[25]=fe,e[26]=xe,e[27]=k):k=e[27];let Le=_&&(0,t.jsx)(Ue,{icon:(0,t.jsx)("span",{"aria-hidden":"true",className:"text-base leading-none",children:"\u26A0"}),testId:"queues-dlq-warning",variant:"warning",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[L.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"font-medium",children:s("No dead-letter queue on {queues}.",{queues:L.map(St).join(", ")})}),(0,t.jsx)("p",{className:"text-muted-foreground",children:s("Exhausted messages are dropped after retries. Add a deadLetterQueue to capture them.")})]}),Q>0&&(0,t.jsx)("p",{className:L.length>0?"text-muted-foreground":"font-medium",children:Q===1?s("1 message was recently dead-lettered."):s("{count} messages were recently dead-lettered.",{count:Q})})]})}),O;e[28]!==S||e[29]!==N||e[30]!==o?(O=o==="declared"&&(0,t.jsx)(ft,{loaded:N!==void 0,queues:S}),e[28]=S,e[29]=N,e[30]=o,e[31]=O):O=e[31];let R;e[32]!==E||e[33]!==g||e[34]!==Qe||e[35]!==Ie||e[36]!==ge||e[37]!==o?(R=o==="messages"&&(0,t.jsx)(yt,{hasError:g!==null,messages:E,onClear:Qe,onReplay:Ie,replayingId:ge}),e[32]=E,e[33]=g,e[34]=Qe,e[35]=Ie,e[36]=ge,e[37]=o,e[38]=R):R=e[38];let J;e[39]!==U||e[40]!==T||e[41]!==I||e[42]!==Ce||e[43]!==ve||e[44]!==Se||e[45]!==qe||e[46]!==we||e[47]!==S||e[48]!==H||e[49]!==pe||e[50]!==o?(J=o==="send"&&(0,t.jsx)(Nt,{batchMode:U,bodyText:T,delayText:I,onBatchModeChange:Ce,onBodyChange:ve,onDelayChange:Se,onSelectExport:qe,onSend:we,queues:S,selectedExportName:H,sending:pe}),e[39]=U,e[40]=T,e[41]=I,e[42]=Ce,e[43]=ve,e[44]=Se,e[45]=qe,e[46]=we,e[47]=S,e[48]=H,e[49]=pe,e[50]=o,e[51]=J):J=e[51];let oe;return e[52]!==B||e[53]!==k||e[54]!==Le||e[55]!==O||e[56]!==R||e[57]!==J?(oe=(0,t.jsxs)("div",{className:tt,"data-testid":at,children:[B,k,Le,O,R,J]}),e[52]=B,e[53]=k,e[54]=Le,e[55]=O,e[56]=R,e[57]=J,e[58]=oe):oe=e[58],oe},"Ft");function bt(n){return(0,t.jsxs)(G,{"data-testid":`queues-row-${n.exportName}`,children:[(0,t.jsx)(w,{className:"font-mono text-xs",children:n.exportName}),(0,t.jsx)(w,{className:"font-mono text-xs text-muted-foreground",children:n.name}),(0,t.jsx)(w,{className:"font-mono text-xs text-muted-foreground",children:n.mode}),(0,t.jsx)(w,{className:"font-mono text-xs text-muted-foreground",children:n.binding}),(0,t.jsx)(w,{className:"font-mono text-xs text-muted-foreground",children:n.deadLetterQueue??"\u2014"})]},n.exportName)}h(bt,"xt");function qt(n){return(0,t.jsx)("option",{value:n.exportName,children:n.exportName},n.exportName)}h(qt,"yt");function vt(n,e){return n.exportName.localeCompare(e.exportName)}h(vt,"bt");function St(n){return n.name}h(St,"Nt");export{Ft as default};
|
|
1
|
+
import{a as Ve}from"./chunk-UDCVU3Z5.js";import"./chunk-I52I2DJG.js";import{a as He}from"./chunk-EA2JKR5D.js";import{a as Ke}from"./chunk-66UGPQVC.js";import"./chunk-D27D4UUI.js";import{a as Ge}from"./chunk-I5OKDKON.js";import{P as je}from"./chunk-46ZJ3TM4.js";import"./chunk-4L4WTGN5.js";import{a as le}from"./chunk-EBWXFG4H.js";import"./chunk-TGHH7ZFA.js";import"./chunk-5GFSKIB2.js";import{b as de}from"./chunk-NCCAMFB6.js";import"./chunk-25NFR6EB.js";import{a as Pe}from"./chunk-JAZCU2PP.js";import{a as Ue}from"./chunk-ULIQFBZU.js";import"./chunk-OOESPRIZ.js";import"./chunk-35DM4JJG.js";import{a as F}from"./chunk-CXNZVJ3S.js";import{c as Me}from"./chunk-ECQTVV2J.js";import{f as We}from"./chunk-JBIN7W2B.js";import"./chunk-FSRSK4LY.js";import{a as ie}from"./chunk-FKVZRPV5.js";import{a as _e,b as Be,c as ke,d as G,e as C,f as w}from"./chunk-HEAQVSNS.js";import{a as Te,e as De}from"./chunk-WUWBZPUK.js";import{d as $,f as ue,g as ce,h as me,o as he,r as ze}from"./chunk-Y4Q25F6X.js";import"./chunk-T2IE5GKA.js";import{a as h,d as Ee,e as rt,f as nt,g as ot}from"./chunk-YKXDMIHQ.js";var W=Ee(nt(),1);var A=Ee(rt(),1);var t=Ee(ot(),1);var dt=h((n,e)=>{let a=new Set(n.map(s=>s.deadLetterQueue).filter(s=>typeof s=="string"&&s!=="")),l=n.filter(s=>(s.deadLetterQueue===void 0||s.deadLetterQueue==="")&&!a.has(s.name)),d=e.filter(s=>s.deadLettered).length;return{deadLetteredCount:d,queuesWithoutDlq:l,showReliabilityWarning:l.length>0||d>0}},"rt"),lt=200,it=ue(F.sendQueueMessage),ut=ue(F.replayQueueMessage),ct=ue(F.clearQueueMessages),Xe=96,mt=h(n=>{if(n===void 0)return"\u2014";try{return JSON.stringify(n)}catch{return"[unserializable]"}},"it"),ht=h(n=>n.length>Xe?`${n.slice(0,Xe)}\u2026`:n,"ct"),pt=h(n=>n==="error"?"destructive":n==="retry"?"outline":"secondary","ut"),gt=h((n,e)=>e(n==="messages"?"Messages":n==="send"?"Send":"Declared"),"mt"),ft=h(n=>{let e=(0,W.c)(11),{loaded:a,queues:l}=n,d=$(),s;e[0]!==d?(s=d("Queues are declared in code with defineQueue. Enqueue from a mutation or action with ctx.queues.<name>.send(...); push consumers process batches in the worker."),e[0]=d,e[1]=s):s=e[1];let o;e[2]!==s?(o=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:s}),e[2]=s,e[3]=o):o=e[3];let r;e[4]!==a||e[5]!==l||e[6]!==d?(r=a&&l.length===0?(0,t.jsx)(ie,{description:d("No defineQueue is declared in lunora/queues.ts in this deployment. Add one to offload async work to a Cloudflare Queue."),testId:"queues-empty",title:d("No queues defined")}):(0,t.jsx)(Te,{className:"overflow-hidden py-0",children:(0,t.jsx)(De,{className:"px-0",children:(0,t.jsxs)(_e,{"data-testid":"queues-table",children:[(0,t.jsx)(Be,{children:(0,t.jsxs)(G,{children:[(0,t.jsx)(C,{children:d("Export")}),(0,t.jsx)(C,{children:d("Queue")}),(0,t.jsx)(C,{children:d("Mode")}),(0,t.jsx)(C,{children:d("Binding")}),(0,t.jsx)(C,{children:d("Dead-letter")})]})}),(0,t.jsx)(ke,{children:l.map(bt)})]})})}),e[4]=a,e[5]=l,e[6]=d,e[7]=r):r=e[7];let p;return e[8]!==o||e[9]!==r?(p=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"queues-declared",children:[o,r]}),e[8]=o,e[9]=r,e[10]=p):p=e[10],p},"ft"),xt=h(n=>{let e=(0,W.c)(67),{message:a,onReplay:l,replayingId:d}=n,s=$(),o,r,p,c,x,N,y,i,m,f;if(e[0]!==a.attempts||e[1]!==a.body||e[2]!==a.deadLettered||e[3]!==a.exportName||e[4]!==a.id||e[5]!==a.messageId||e[6]!==a.outcome||e[7]!==a.queue||e[8]!==s){let j=mt(a.body);r=G,N=`queues-message-${a.id}`;let z=a.exportName??a.queue;e[19]!==z?(y=(0,t.jsx)(w,{className:"font-mono text-xs",children:z}),e[19]=z,e[20]=y):y=e[20],e[21]!==a.messageId?(i=(0,t.jsx)(w,{className:"max-w-[16ch] truncate font-mono text-xs text-muted-foreground",title:a.messageId,children:a.messageId}),e[21]=a.messageId,e[22]=i):i=e[22],e[23]!==a.attempts?(m=(0,t.jsx)(w,{className:"font-mono text-xs tabular-nums",children:a.attempts}),e[23]=a.attempts,e[24]=m):m=e[24];let T=`queues-outcome-${a.id}`,D;e[25]!==a.outcome?(D=pt(a.outcome),e[25]=a.outcome,e[26]=D):D=e[26];let I;e[27]!==a.outcome||e[28]!==T||e[29]!==D?(I=(0,t.jsx)(de,{"data-testid":T,variant:D,children:a.outcome}),e[27]=a.outcome,e[28]=T,e[29]=D,e[30]=I):I=e[30];let M;e[31]!==a.deadLettered||e[32]!==a.id||e[33]!==s?(M=a.deadLettered&&(0,t.jsx)(de,{"data-testid":`queues-dlq-${a.id}`,variant:"destructive",children:s("DLQ")}),e[31]=a.deadLettered,e[32]=a.id,e[33]=s,e[34]=M):M=e[34],e[35]!==I||e[36]!==M?(f=(0,t.jsx)(w,{children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[I,M]})}),e[35]=I,e[36]=M,e[37]=f):f=e[37],o=w,p="max-w-[32ch] truncate font-mono text-xs text-muted-foreground",c=j,x=ht(j),e[0]=a.attempts,e[1]=a.body,e[2]=a.deadLettered,e[3]=a.exportName,e[4]=a.id,e[5]=a.messageId,e[6]=a.outcome,e[7]=a.queue,e[8]=s,e[9]=o,e[10]=r,e[11]=p,e[12]=c,e[13]=x,e[14]=N,e[15]=y,e[16]=i,e[17]=m,e[18]=f}else o=e[9],r=e[10],p=e[11],c=e[12],x=e[13],N=e[14],y=e[15],i=e[16],m=e[17],f=e[18];let g;e[38]!==o||e[39]!==p||e[40]!==c||e[41]!==x?(g=(0,t.jsx)(o,{className:p,title:c,children:x}),e[38]=o,e[39]=p,e[40]=c,e[41]=x,e[42]=g):g=e[42];let q;e[43]!==a.capturedAt?(q=ze(a.capturedAt,"\u2014"),e[43]=a.capturedAt,e[44]=q):q=e[44];let b;e[45]!==q?(b=(0,t.jsx)(w,{className:"text-xs text-muted-foreground tabular-nums",children:q}),e[45]=q,e[46]=b):b=e[46];let S=`queues-replay-${a.id}`,E=d!==null,Q;e[47]!==a.id||e[48]!==d||e[49]!==s?(Q=d===a.id?s("Replaying\u2026"):s("Replay"),e[47]=a.id,e[48]=d,e[49]=s,e[50]=Q):Q=e[50];let L;e[51]!==a.id||e[52]!==l||e[53]!==S||e[54]!==E||e[55]!==Q?(L=(0,t.jsx)(w,{children:(0,t.jsx)(le,{"data-id":a.id,"data-testid":S,disabled:E,onClick:l,size:"xs",type:"button",variant:"outline",children:Q})}),e[51]=a.id,e[52]=l,e[53]=S,e[54]=E,e[55]=Q,e[56]=L):L=e[56];let _;return e[57]!==r||e[58]!==b||e[59]!==L||e[60]!==N||e[61]!==y||e[62]!==i||e[63]!==m||e[64]!==f||e[65]!==g?(_=(0,t.jsxs)(r,{"data-testid":N,children:[y,i,m,f,g,b,L]}),e[57]=r,e[58]=b,e[59]=L,e[60]=N,e[61]=y,e[62]=i,e[63]=m,e[64]=f,e[65]=g,e[66]=_):_=e[66],_},"ht"),yt=h(n=>{let e=(0,W.c)(30),{hasError:a,messages:l,onClear:d,onReplay:s,replayingId:o}=n,r=$(),p;e[0]!==r?(p=r("Cloudflare Queues have no peek API, so this is what push consumers actually processed \u2014 not pending depth."),e[0]=r,e[1]=p):p=e[1];let c;e[2]!==p?(c=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:p}),e[2]=p,e[3]=c):c=e[3];let x;e[4]!==l.length||e[5]!==r?(x=r("Clear {count} messages?",{count:l.length}),e[4]=l.length,e[5]=r,e[6]=x):x=e[6];let N=l.length===0,y;e[7]!==r?(y=r("Clear log"),e[7]=r,e[8]=y):y=e[8];let i;e[9]!==d||e[10]!==x||e[11]!==N||e[12]!==y?(i=(0,t.jsx)("div",{className:"ml-auto",children:(0,t.jsx)(Ge,{confirmLabel:x,disabled:N,onConfirm:d,testId:"queues-clear",children:y})}),e[9]=d,e[10]=x,e[11]=N,e[12]=y,e[13]=i):i=e[13];let m;e[14]!==l.length||e[15]!==r?(m=l.length>0&&(0,t.jsx)(de,{"data-testid":"queues-count",variant:"secondary",children:r("{count} messages",{count:l.length})}),e[14]=l.length,e[15]=r,e[16]=m):m=e[16];let f;e[17]!==c||e[18]!==i||e[19]!==m?(f=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,i,m]}),e[17]=c,e[18]=i,e[19]=m,e[20]=f):f=e[20];let g;e[21]!==a||e[22]!==l||e[23]!==s||e[24]!==o||e[25]!==r?(g=!a&&l.length===0?(0,t.jsx)(ie,{description:r("Consumed messages appear here once a push consumer processes a batch in dev. Send one from the Send tab to see it captured."),testId:"queues-messages-empty",title:r("No consumed messages yet.")}):(0,t.jsx)(Te,{className:"overflow-hidden py-0",children:(0,t.jsx)(De,{className:"px-0",children:(0,t.jsx)(Ve,{className:"max-h-[32rem]","data-testid":"queues-messages-scroll",children:(0,t.jsxs)(_e,{"data-testid":"queues-messages-table",children:[(0,t.jsx)(Be,{children:(0,t.jsxs)(G,{children:[(0,t.jsx)(C,{children:r("Export")}),(0,t.jsx)(C,{children:r("Message")}),(0,t.jsx)(C,{children:r("Attempts")}),(0,t.jsx)(C,{children:r("Outcome")}),(0,t.jsx)(C,{children:r("Body")}),(0,t.jsx)(C,{children:r("Captured")}),(0,t.jsx)(C,{})]})}),(0,t.jsx)(ke,{children:l.map(b=>(0,t.jsx)(xt,{message:b,onReplay:s,replayingId:o},b.id))})]})})})}),e[21]=a,e[22]=l,e[23]=s,e[24]=o,e[25]=r,e[26]=g):g=e[26];let q;return e[27]!==f||e[28]!==g?(q=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"queues-messages",children:[f,g]}),e[27]=f,e[28]=g,e[29]=q):q=e[29],q},"pt"),Nt=h(n=>{let e=(0,W.c)(20),{batchMode:a,bodyText:l,delayText:d,onBatchModeChange:s,onBodyChange:o,onDelayChange:r,onSelectExport:p,onSend:c,queues:x,selectedExportName:N,sending:y}=n,i=$(),m;e[0]!==i?(m=i("Enqueue a JSON message to a declared producer to exercise its consumer. Nothing is captured until the consumer processes it."),e[0]=i,e[1]=m):m=e[1];let f;e[2]!==m?(f=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:m}),e[2]=m,e[3]=f):f=e[3];let g;e[4]!==a||e[5]!==l||e[6]!==d||e[7]!==s||e[8]!==o||e[9]!==r||e[10]!==p||e[11]!==c||e[12]!==x||e[13]!==N||e[14]!==y||e[15]!==i?(g=x.length===0?(0,t.jsx)(ie,{description:i("Declare a queue with defineQueue in lunora/queues.ts to enqueue a test message."),testId:"queues-send-empty",title:i("No queues to send to")}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("select",{"aria-label":i("Queue"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"queues-send-select",onChange:p,value:N,children:x.map(qt)}),(0,t.jsx)(je,{"aria-label":i("Delay (seconds)"),className:"max-w-36","data-testid":"queues-send-delay",min:0,onChange:r,placeholder:i("Delay (s)"),type:"number",value:d}),(0,t.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",htmlFor:"queues-send-batch",children:[(0,t.jsx)("input",{checked:a,"data-testid":"queues-send-batch",id:"queues-send-batch",onChange:s,type:"checkbox"}),i("Send as batch (JSON array)")]}),(0,t.jsx)(le,{className:"ml-auto","data-testid":"queues-send-button",disabled:y||N==="",onClick:c,type:"button",children:i(y?"Sending\u2026":"Send message")})]}),(0,t.jsx)(He,{"aria-label":i("Message body (JSON)"),className:"font-mono","data-testid":"queues-send-body",onChange:o,placeholder:a?'[ { "hello": "world" } ]':'{ "hello": "world" }',value:l})]}),e[4]=a,e[5]=l,e[6]=d,e[7]=s,e[8]=o,e[9]=r,e[10]=p,e[11]=c,e[12]=x,e[13]=N,e[14]=y,e[15]=i,e[16]=g):g=e[16];let q;return e[17]!==f||e[18]!==g?(q=(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"queues-send",children:[f,g]}),e[17]=f,e[18]=g,e[19]=q):q=e[19],q},"gt"),Ft=h(n=>{let e=(0,W.c)(59),{limit:a}=n,l=a??lt,d=We(),s=$(),[o,r]=(0,A.useState)("declared"),[p,c]=(0,A.useState)(null),x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x={},e[0]=x):x=e[0];let{data:N,error:y,errorSource:i}=Me(F.listQueues,x),m;e[1]!==l?(m={limit:l},e[1]=l,e[2]=m):m=e[2];let{data:f,error:g,errorSource:q,refetch:b}=Me(F.getQueueMessages,m),S=Array.isArray(N?.queues)?[...N.queues].toSorted(vt):[],E=f?.entries??[],{deadLetteredCount:Q,queuesWithoutDlq:L,showReliabilityWarning:_}=dt(S,E),[j,z]=(0,A.useState)(""),[T,D]=(0,A.useState)(""),[I,M]=(0,A.useState)(""),[U,Ye]=(0,A.useState)(!1),[pe,Oe]=(0,A.useState)(!1),[ge,Re]=(0,A.useState)(null),H=S.some(u=>u.exportName===j)?j:S[0]?.exportName??"",Je=o==="messages"?g:y,Ze=o==="messages"?q:i,fe=Je??p,xe=Je===null?p:Ze,K;e[3]!==b?(K=h(()=>{b()},"H"),e[3]=b,e[4]=K):K=e[4],Ke(K,o==="messages");let ye=h(async()=>{c(null);let u=H;if(u==="")return;let v=null,$e=T.trim();if($e!=="")try{v=JSON.parse($e)}catch{c(s("Body must be valid JSON."));return}let Ae,Fe=I.trim();if(Fe!==""){let P=Number(Fe);if(!Number.isFinite(P)||P<0){c(s("Delay must be a non-negative number of seconds."));return}Ae=P}if(U&&!Array.isArray(v)){c(s("Batch mode needs a JSON array body \u2014 each element is enqueued as one message."));return}Oe(!0);let st=U?{batch:v,delaySeconds:Ae,exportName:u}:{body:v,delaySeconds:Ae,exportName:u};try{await d.query(it,st,ce("")),b()}catch(P){c(me(P))}Oe(!1)},"ue"),V;e[5]!==d||e[6]!==b?(V=h(async u=>{c(null),Re(u);try{await d.query(ut,{id:u},ce("")),b()}catch(v){c(me(v))}Re(null)},"V"),e[5]=d,e[6]=b,e[7]=V):V=e[7];let Ne=V,X;e[8]!==d||e[9]!==b?(X=h(async()=>{c(null);try{await d.query(ct,{},ce("")),b()}catch(u){c(me(u))}},"Y"),e[8]=d,e[9]=b,e[10]=X):X=e[10];let be=X,Y;e[11]===Symbol.for("react.memo_cache_sentinel")?(Y=h(u=>{let v=u.currentTarget.dataset.tab;(v==="declared"||v==="messages"||v==="send")&&r(v)},"X"),e[11]=Y):Y=e[11];let et=Y,Z;e[12]===Symbol.for("react.memo_cache_sentinel")?(Z=h(u=>{z(u.currentTarget.value)},"K"),e[12]=Z):Z=e[12];let qe=Z,ee;e[13]===Symbol.for("react.memo_cache_sentinel")?(ee=h(u=>{D(u.currentTarget.value)},"Z"),e[13]=ee):ee=e[13];let ve=ee,te;e[14]===Symbol.for("react.memo_cache_sentinel")?(te=h(u=>{M(u.currentTarget.value)},"ee"),e[14]=te):te=e[14];let Se=te,ae;e[15]===Symbol.for("react.memo_cache_sentinel")?(ae=h(u=>{Ye(u.currentTarget.checked)},"te"),e[15]=ae):ae=e[15];let Ce=ae,se;e[16]!==ye?(se=h(()=>{he(ye())},"se"),e[16]=ye,e[17]=se):se=e[17];let we=se,re;e[18]!==Ne?(re=h(u=>{let{id:v}=u.currentTarget.dataset;v!==void 0&&he(Ne(v))},"ae"),e[18]=Ne,e[19]=re):re=e[19];let Ie=re,ne;e[20]!==be?(ne=h(()=>{he(be())},"re"),e[20]=be,e[21]=ne):ne=e[21];let Qe=ne,tt="flex flex-col gap-6",at="lunora-queues-panel",B;e[22]!==s||e[23]!==o?(B=(0,t.jsx)("div",{className:"flex items-center gap-1","data-testid":"queues-tabs",role:"tablist",children:["declared","messages","send"].map(u=>(0,t.jsx)(le,{"aria-selected":o===u,"data-tab":u,"data-testid":`queues-tab-${u}`,onClick:et,role:"tab",size:"sm",type:"button",variant:o===u?"secondary":"ghost",children:gt(u,s)},u))}),e[22]=s,e[23]=o,e[24]=B):B=e[24];let k;e[25]!==fe||e[26]!==xe?(k=fe!==null&&(0,t.jsx)(Pe,{error:xe,testId:"queues-error"}),e[25]=fe,e[26]=xe,e[27]=k):k=e[27];let Le=_&&(0,t.jsx)(Ue,{icon:(0,t.jsx)("span",{"aria-hidden":"true",className:"text-base leading-none",children:"\u26A0"}),testId:"queues-dlq-warning",variant:"warning",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[L.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"font-medium",children:s("No dead-letter queue on {queues}.",{queues:L.map(St).join(", ")})}),(0,t.jsx)("p",{className:"text-muted-foreground",children:s("Exhausted messages are dropped after retries. Add a deadLetterQueue to capture them.")})]}),Q>0&&(0,t.jsx)("p",{className:L.length>0?"text-muted-foreground":"font-medium",children:Q===1?s("1 message was recently dead-lettered."):s("{count} messages were recently dead-lettered.",{count:Q})})]})}),O;e[28]!==S||e[29]!==N||e[30]!==o?(O=o==="declared"&&(0,t.jsx)(ft,{loaded:N!==void 0,queues:S}),e[28]=S,e[29]=N,e[30]=o,e[31]=O):O=e[31];let R;e[32]!==E||e[33]!==g||e[34]!==Qe||e[35]!==Ie||e[36]!==ge||e[37]!==o?(R=o==="messages"&&(0,t.jsx)(yt,{hasError:g!==null,messages:E,onClear:Qe,onReplay:Ie,replayingId:ge}),e[32]=E,e[33]=g,e[34]=Qe,e[35]=Ie,e[36]=ge,e[37]=o,e[38]=R):R=e[38];let J;e[39]!==U||e[40]!==T||e[41]!==I||e[42]!==Ce||e[43]!==ve||e[44]!==Se||e[45]!==qe||e[46]!==we||e[47]!==S||e[48]!==H||e[49]!==pe||e[50]!==o?(J=o==="send"&&(0,t.jsx)(Nt,{batchMode:U,bodyText:T,delayText:I,onBatchModeChange:Ce,onBodyChange:ve,onDelayChange:Se,onSelectExport:qe,onSend:we,queues:S,selectedExportName:H,sending:pe}),e[39]=U,e[40]=T,e[41]=I,e[42]=Ce,e[43]=ve,e[44]=Se,e[45]=qe,e[46]=we,e[47]=S,e[48]=H,e[49]=pe,e[50]=o,e[51]=J):J=e[51];let oe;return e[52]!==B||e[53]!==k||e[54]!==Le||e[55]!==O||e[56]!==R||e[57]!==J?(oe=(0,t.jsxs)("div",{className:tt,"data-testid":at,children:[B,k,Le,O,R,J]}),e[52]=B,e[53]=k,e[54]=Le,e[55]=O,e[56]=R,e[57]=J,e[58]=oe):oe=e[58],oe},"Ft");function bt(n){return(0,t.jsxs)(G,{"data-testid":`queues-row-${n.exportName}`,children:[(0,t.jsx)(w,{className:"font-mono text-xs",children:n.exportName}),(0,t.jsx)(w,{className:"font-mono text-xs text-muted-foreground",children:n.name}),(0,t.jsx)(w,{className:"font-mono text-xs text-muted-foreground",children:n.mode}),(0,t.jsx)(w,{className:"font-mono text-xs text-muted-foreground",children:n.binding}),(0,t.jsx)(w,{className:"font-mono text-xs text-muted-foreground",children:n.deadLetterQueue??"\u2014"})]},n.exportName)}h(bt,"xt");function qt(n){return(0,t.jsx)("option",{value:n.exportName,children:n.exportName},n.exportName)}h(qt,"yt");function vt(n,e){return n.exportName.localeCompare(e.exportName)}h(vt,"bt");function St(n){return n.name}h(St,"Nt");export{Ft as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n,c as a}from"./chunk-
|
|
1
|
+
import{a as n,c as a}from"./chunk-5GFSKIB2.js";import{a as i,d as l,e as d}from"./chunk-YKXDMIHQ.js";var r={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},p={...r,position:"fixed",top:0,left:0},u={...r,position:"absolute"};var s=l(d(),1);function b(e,c){let t=s.useRef(e),o=a(c);n(()=>{t.current!==e&&o(t.current),t.current=e},[e,o])}i(b,"useValueChanged");export{p as a,u as b,b as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as x}from"./chunk-
|
|
1
|
+
import{a as x}from"./chunk-RPQL45FL.js";import{b as h}from"./chunk-NCCAMFB6.js";import{r as v}from"./chunk-Y4Q25F6X.js";import{a as g,d as p,f as k,g as y}from"./chunk-YKXDMIHQ.js";var N=p(k(),1);var l=p(y(),1);var b={debug:"secondary",error:"destructive",fatal:"destructive",info:"outline",log:"outline",trace:"outline",warn:"secondary"},F=g(w=>{let e=(0,N.c)(21),{entry:t}=w,c;e[0]!==t.fields?(c=x(t.fields),e[0]=t.fields,e[1]=c):c=e[1];let m=c,s;e[2]!==t.timestamp?(s=v(t.timestamp),e[2]=t.timestamp,e[3]=s):s=e[3];let r;e[4]!==s?(r=(0,l.jsx)("span",{className:"w-44 shrink-0 tabular-nums text-muted-foreground",role:"gridcell",children:s}),e[4]=s,e[5]=r):r=e[5];let u=b[t.level],a;e[6]!==t.level||e[7]!==u?(a=(0,l.jsx)("span",{className:"w-20 shrink-0",role:"gridcell",children:(0,l.jsx)(h,{variant:u,children:t.level})}),e[6]=t.level,e[7]=u,e[8]=a):a=e[8];let f=t.functionPath??"\u2014",n;e[9]!==f?(n=(0,l.jsx)("span",{className:"w-48 shrink-0 truncate text-muted-foreground",role:"gridcell",children:f}),e[9]=f,e[10]=n):n=e[10];let i;e[11]!==m?(i=m===""?null:(0,l.jsx)("span",{className:"ml-2 text-muted-foreground","data-testid":"lg-fields",children:m}),e[11]=m,e[12]=i):i=e[12];let o;e[13]!==t.message||e[14]!==i?(o=(0,l.jsxs)("span",{className:"flex-1 truncate",role:"gridcell",children:[t.message,i]}),e[13]=t.message,e[14]=i,e[15]=o):o=e[15];let d;return e[16]!==r||e[17]!==a||e[18]!==n||e[19]!==o?(d=(0,l.jsxs)(l.Fragment,{children:[r,a,n,o]}),e[16]=r,e[17]=a,e[18]=n,e[19]=o,e[20]=d):d=e[20],d},"B");export{b as a,F as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a}from"./chunk-R5ZTCHCE.js";var r="https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/",n="https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/",_=/string or blob too big/iu,l={BAD_REQUEST:{status:400,title:"Bad request"},UNAUTHORIZED:{status:401,title:"Unauthorized"},FORBIDDEN:{status:403,title:"Forbidden"},NOT_FOUND:{status:404,title:"Not found"},CONFLICT:{hint:["Another write changed this row while your mutation was running (optimistic concurrency conflict).","","Re-read the row and retry the mutation with the fresh value. Lunora serializes a DO's mutations, so a persistent conflict usually means the handler conflicts **with itself** (e.g. a trigger or cascade touching the same row) \u2014 split that work rather than adding a retry loop."],status:409,title:"Conflict"},NOT_UNIQUE:{hint:["`.unique()` matched more than one document \u2014 it expects the query to identify at most one row.","","- If several matches are legitimate, use `.first()` (take one) or `.collect()` (take all) instead.","- Otherwise tighten the query (e.g. filter on a unique/indexed field) so it can only match one row."],status:400,title:"Query matched more than one document"},VALIDATION_ERROR:{status:400,title:"Validation failed"},TOO_MANY_REQUESTS:{status:429,title:"Too many requests"},UNPROCESSABLE:{status:422,title:"Unprocessable"},NOT_IMPLEMENTED:{status:501,title:"Not implemented"},FUNCTION_NOT_FOUND:{status:404,title:"Function not found"},METHOD_NOT_ALLOWED:{status:405,title:"Method not allowed"},PAYLOAD_TOO_LARGE:{status:413,title:"Payload too large"},INTERNAL:{internal:!0,status:500,title:"Internal error"},INTERNAL_SERVER_ERROR:{internal:!0,status:500,title:"Internal error"},RPC_FAILED:{internal:!0,status:500,title:"Internal error"},COUNT_RLS_UNSUPPORTED:{status:422,title:"count() is unsupported under an RLS policy"},MASK_UNSUPPORTED:{status:422,title:"Aggregation over a masked column is unsupported"},RELATION_PREDICATE_UNSUPPORTED:{status:422,title:"Relation predicate is unsupported in a write policy"},RLS_REQUIRED:{hint:["This table is secure-by-default: it has no `.public()` marker and no RLS policy resolved for the caller, so the read fails closed.","","Add a read policy with `.rls(...)`, or mark the table `.public()` if it is intentionally world-readable."],status:403,title:"RLS policy required"},RUN_DEPTH_EXCEEDED:{internal:!0,status:500,title:"Run depth exceeded"},TRANSACTION_LIMIT_EXCEEDED:{hint:["A single mutation may only read and write a bounded amount before it is stopped.","","Narrow the read with an index (`.withIndex(...)`) instead of scanning the table, or split the write across several mutations \u2014 for a large backfill use `defineMigration` + `lunora migrate up`, which batches and checkpoints for you.","","The ceilings are deliberately conservative \u2014 they exist to stop one request taking down the whole shard. A deployment that genuinely needs bigger transactions can raise them by overriding the `transactionLimits()` seam on its generated shard class."],status:413,title:"Transaction limit exceeded"},MIGRATION_NOT_FOUND:{status:404,title:"Data migration not found"},UNKNOWN_TABLE:{status:404,title:"Unknown table"},GLOBAL_TABLE_NOT_EDITABLE:{status:400,title:"Global table is not editable"},SHARD_ERROR:{status:503,title:"Shard error"},SHARD_UNAVAILABLE:{status:503,title:"Shard unavailable"},OFFLINE_IDENTITY_CHANGED:{status:409,title:"Offline identity changed"},CODEGEN_DIAGNOSTIC:{status:500,title:"Codegen diagnostic"},SCHEMA_SNAPSHOT_PARSE:{status:500,title:"Schema snapshot parse error"},ENV_INVALID:{internal:!0,status:500,title:"Invalid environment"},AUTH_HEADERS_MISSING:{internal:!0,status:500,title:"Auth headers missing"},EMAIL_DOMAIN_BLOCKED:{hint:["This address's domain is on the disposable/throwaway blocklist (or your configured deny-list).","","Sign up with a permanent mailbox. To tune the policy, pass `blockDisposable` / `allowDomains` / `denyDomains` to `emailGate(...)` (`@lunora/auth/email-guard`)."],status:400,title:"Email domain not allowed"},EMAIL_UNDELIVERABLE:{hint:["The address's domain publishes no MX (or fallback A/AAAA) records, so it can't receive mail.","","Check for a typo in the domain. MX verification is opt-in (`mx: true`) and needs DNS \u2014 leave it off on the edge path if DNS is unavailable."],status:400,title:"Email domain cannot receive mail"},ANALYTICS_SQL_ERROR:{status:502,title:"Analytics Engine SQL API error"},R2_SQL_ERROR:{status:502,title:"R2 SQL API error"},WORKFLOWS_REST_ERROR:{status:502,title:"Cloudflare Workflows REST API error"},ADMIN_FORBIDDEN:{status:403,title:"Admin access forbidden"},ADMIN_TOKEN_NOT_CONFIGURED:{status:400,title:"Admin token not configured"},AUTH_NOT_CONFIGURED:{status:400,title:"Auth admin not configured"},AUTH_OP_NOT_SUPPORTED:{status:400,title:"Auth admin operation not supported"},BACKUP_NOT_CONFIGURED:{status:500,title:"Scheduled backup not configured"},BACKUP_RETENTION_NOT_CONFIGURED:{hint:["`lunora backup prune` removes snapshots past the retention window, and this worker has no window: set `backupRetain` (how many to keep) and `backupCron` (which decides whose snapshots retention owns) on `createWorker`.","","Nothing was deleted. A default is deliberately not invented here \u2014 retention deleting on its own is exactly what this command exists to replace."],status:400,title:"Backup retention window not configured"},BACKUP_TOO_LARGE:{hint:["The scheduled backup is assembled inside the Worker isolate, so it caps the snapshot it will build. Nothing was written.","","The cap is on the NDJSON, not on peak memory: the export fan-out resolves every shard's rows before the first row is encoded, so a snapshot under the cap can still exhaust the isolate. It is set well below the isolate's limit for that reason.","","Narrow the snapshot with `backupTables`, or take this backup off-platform with `lunora backup create --bucket`, which runs on a machine rather than in an isolate. Backing up more often does not help \u2014 every run is a full snapshot."],status:507,title:"Backup too large to assemble in a Worker"},CRON_JOBS_NOT_CONFIGURED:{status:400,title:"Cron jobs not configured"},CRON_JOB_NOT_FOUND:{status:404,title:"Cron job not found"},EXPORT_TAP_NOT_CONFIGURED:{status:400,title:"Export tap not configured"},FUNCTIONS_NOT_CONFIGURED:{status:400,title:"Functions registry not configured"},GLOBALS_NOT_CONFIGURED:{status:400,title:"Global-table introspector not configured"},KV_NOT_CONFIGURED:{status:400,title:"KV introspector not configured"},MIGRATION_ID_REQUIRED:{status:400,title:"Migration id required"},PITR_UNAVAILABLE:{status:409,title:"Point-in-time recovery unavailable"},SCHEDULER_NOT_CONFIGURED:{status:400,title:"Scheduler not configured"},STORAGE_CHECKSUM_MISMATCH:{hint:["The upload body did not match the declared `expectedSize` or `expectedSha256`, so nothing was written \u2014 this check fails closed.","","Re-read the bytes from the source export and retry the transfer. A persistent mismatch means the source blob is corrupt or truncated; fix the export rather than bypassing the check."],status:400,title:"Storage checksum mismatch"},STORAGE_DELETE_NOT_CONFIGURED:{status:400,title:"Storage delete not configured"},STORAGE_DOWNLOAD_NOT_CONFIGURED:{hint:["`GET /_lunora/admin/storage/object` needs a `storageDownload` function on the worker. The generated app worker wires it up; a hand-written `createWorker({ ... })` has to pass `(key, opts) => pick(opts?.bucket).download(key)` \u2014 forwarding `opts.bucket` to the right bucket, and wrapping rather than passing `createStorage(...).download` itself, whose second parameter is a byte range.","","Without it a bucket-backed `lunora backup restore --bucket` cannot read the snapshot. The object is still readable out of band with `wrangler r2 object get`."],status:400,title:"Storage download not configured"},STORAGE_NOT_CONFIGURED:{status:400,title:"Storage not configured"},STORAGE_OBJECT_NOT_FOUND:{status:404,title:"Storage object not found"},STORAGE_UPLOAD_NOT_CONFIGURED:{status:400,title:"Storage upload not configured"},STORAGE_URL_NOT_CONFIGURED:{status:400,title:"Storage signed URL not configured"},VECTORS_NOT_CONFIGURED:{status:400,title:"Vector index introspector not configured"},VECTOR_QUERY_UNSUPPORTED:{status:400,title:"Vector index querying not enabled"},WORKFLOWS_NOT_CONFIGURED:{status:501,title:"Workflows not configured"},AUTH_AUDIT_NOT_CONFIGURED:{status:400,title:"Auth audit reader not configured"},AUTH_AUDIT_READ_FAILED:{internal:!0,status:500,title:"Auth audit read failed"},CRON_EXPR_INVALID:{status:500,title:"Invalid cron expression"},CRON_EXPR_NOT_STATIC:{status:500,title:"Cron expression is not statically analyzable"},CRON_JOB_FAILED:{internal:!0,status:500,title:"Cron job failed"},CRON_NAME_NOT_STATIC:{status:500,title:"Cron job name is not statically analyzable"},CRON_NON_STATIC_FN:{status:500,title:"Cron function reference is not statically analyzable"},CRON_NON_STATIC_VALUE:{status:500,title:"Cron value is not statically analyzable"},CRON_SCHEDULE_INVALID:{status:500,title:"Invalid cron schedule"},CRON_SCHEDULE_NOT_STATIC:{status:500,title:"Cron schedule is not statically analyzable"},DUPLICATE_CRON_NAME:{status:500,title:"Duplicate cron job name"},DUPLICATE_AGENT_BINDING:{status:500,title:"Duplicate agent binding"},DUPLICATE_AGENT_CLASS:{status:500,title:"Duplicate agent generated class name"},DUPLICATE_AGENT_NAME:{status:500,title:"Duplicate agent name"},DUPLICATE_MIGRATION_ID:{status:500,title:"Duplicate migration id"},DUPLICATE_QUEUE_BINDING:{status:500,title:"Duplicate queue binding"},DUPLICATE_QUEUE_NAME:{status:500,title:"Duplicate queue name"},DUPLICATE_WORKFLOW_CLASS:{status:500,title:"Duplicate workflow generated class name"},MIGRATION_ID_NOT_STATIC:{status:500,title:"Migration id is not statically analyzable"},NAMESPACE_COLLISION:{status:500,title:"Function namespace collision"},BAD_ROW:{status:400,title:"Malformed import row"},BAD_SUBSCRIPTION_ARGS:{status:400,title:"Invalid subscription arguments"},BATCH_LIMIT_EXCEEDED:{status:400,title:"Batch limit exceeded"},CROSS_SHARD_RANK_UNSUPPORTED:{status:400,title:"Cross-shard rank() is unsupported"},FORBIDDEN_FANOUT:{status:403,title:"Fan-out forbidden"},GLOBAL_SEARCH_SCORES_UNSUPPORTED:{status:400,title:"collectWithScores() is unsupported on a global table"},FORBIDDEN_ORIGIN:{status:403,title:"Origin forbidden"},FORBIDDEN_SHARD:{status:403,title:"Shard access forbidden"},GLOBAL_NOT_CONFIGURED:{status:400,title:"Global table import not configured"},INVALID_INPUT:{status:400,title:"Invalid input"},RATE_LIMITED:{status:429,title:"Rate limited"},REPLICA_NOT_READY:{status:421,title:"Replica not caught up"},REPLICA_READ_ONLY:{status:421,title:"Replica is read-only"},SERVICE_UNAVAILABLE:{status:503,title:"Service unavailable"},SHAPE_CROSS_SHARD_JOIN:{status:400,title:"Shape cross-shard join is unsupported"},UNAUTHENTICATED:{status:401,title:"Unauthenticated"},UNKNOWN_COLUMN:{status:404,title:"Unknown column"},CDC_LOG_TRIMMED:{status:409,title:"CDC log trimmed"},CDC_PAYLOAD_COMPACTED:{status:409,title:"CDC payloads compacted"},EXPIRED:{status:404,title:"Session expired"},NESTED_TRANSACTION:{internal:!0,status:500,title:"Nested transaction"},OUT_OF_ORDER:{status:409,title:"Out-of-order mutation"},SHAPE_GLOBAL_TOO_LARGE:{status:413,title:"Global shape too large"},SHAPE_NOT_FOUND:{status:404,title:"Shape not found"},SHAPE_REQUIRES_CDC:{status:409,title:"Shape requires change-data-capture"},SQL_UNAVAILABLE:{internal:!0,status:500,title:"SQL storage unavailable"},STREAM_INTERRUPTED:{status:503,title:"Durable stream interrupted"},STREAM_TOO_LONG:{status:507,title:"Durable stream exceeded its chunk ceiling"},TOKEN_EXPIRED:{status:401,title:"Authentication token expired"},TOO_MANY_STREAMS:{status:429,title:"Too many streams"},UNKNOWN_ADMIN_OP:{status:404,title:"Unknown admin operation"},SOCKET_TAG_BUDGET_EXCEEDED:{status:400,title:"Socket tag budget exceeded"},RELAY_CANNOT_SEED:{status:500,title:"Relay cannot seed"},RELAY_MISCONFIGURED:{status:500,title:"Relay misconfigured"},RELAY_SEED_FAILED:{status:502,title:"Relay seed failed"},RELAY_SHAPE_UNROUTABLE:{status:500,title:"Relay shape unroutable"},MISCONFIGURED:{internal:!0,status:500,title:"Worker misconfigured"},LUNORA_RUNTIME_UNAVAILABLE:{status:500,title:"Lunora runtime unavailable"},INTERNAL_ERROR:{internal:!0,status:500,title:"Internal error"},BROWSER_TIMEOUT:{status:504,title:"Browser operation timed out"},CLIENT_CLOSED:{status:400,title:"Client is closed"},HTTP_STREAM_BAD_CHUNK:{status:502,title:"Malformed HTTP stream chunk"},HTTP_STREAM_INTERRUPTED:{status:502,title:"HTTP stream interrupted"},HTTP_STREAM_MISSING_PARAM:{status:400,title:"HTTP stream missing path parameter"},HTTP_STREAM_NO_BODY:{status:502,title:"HTTP stream response has no body"},HTTP_STREAM_STATUS:{status:502,title:"HTTP stream request failed"},HTTP_STREAM_TRANSPORT:{status:502,title:"HTTP stream transport error"},STREAM_BACKPRESSURE:{status:429,title:"Stream backpressure"},STREAM_DISCONNECTED:{status:503,title:"Stream disconnected"},STREAM_QUEUE_OVERFLOW:{status:429,title:"Stream queue overflow"},UNKNOWN_MUTATION_FN:{status:404,title:"Unknown mutation function"}},f=a(e=>Object.hasOwn(l,e)?l[e]:void 0,"h");var m=[{body:["A single row exceeded the storage engine's per-row ceiling \u2014 2 MB on a Durable Object's SQLite, and 2,000,000 bytes on D1.","","The limit is on the STORED bytes, which are UTF-8: a document of multi-byte text (CJK, emoji) costs up to 3x its character count. `v.bytes()` and `v.bigint()` columns cost more again on a shard-local table, where the row stores both a SQL-comparable projection and the original.","","Keep the large payload out of the row and store a reference to it:","","```ts","const key = `uploads/${crypto.randomUUID()}`;","await ctx.storage.uploads.put(key, bytes);",'await ctx.db.insert("documents", { storageKey: key, title });',"```","","R2 has no practical object-size ceiling, and the row stays small enough to read, index, and replicate."].join(`
|
|
1
|
+
import{a}from"./chunk-YKXDMIHQ.js";var r="https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/",n="https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/",_=/string or blob too big/iu,l={BAD_REQUEST:{status:400,title:"Bad request"},UNAUTHORIZED:{status:401,title:"Unauthorized"},FORBIDDEN:{status:403,title:"Forbidden"},NOT_FOUND:{status:404,title:"Not found"},CONFLICT:{hint:["Another write changed this row while your mutation was running (optimistic concurrency conflict).","","Re-read the row and retry the mutation with the fresh value. Lunora serializes a DO's mutations, so a persistent conflict usually means the handler conflicts **with itself** (e.g. a trigger or cascade touching the same row) \u2014 split that work rather than adding a retry loop."],status:409,title:"Conflict"},NOT_UNIQUE:{hint:["`.unique()` matched more than one document \u2014 it expects the query to identify at most one row.","","- If several matches are legitimate, use `.first()` (take one) or `.collect()` (take all) instead.","- Otherwise tighten the query (e.g. filter on a unique/indexed field) so it can only match one row."],status:400,title:"Query matched more than one document"},VALIDATION_ERROR:{status:400,title:"Validation failed"},TOO_MANY_REQUESTS:{status:429,title:"Too many requests"},UNPROCESSABLE:{status:422,title:"Unprocessable"},NOT_IMPLEMENTED:{status:501,title:"Not implemented"},FUNCTION_NOT_FOUND:{status:404,title:"Function not found"},METHOD_NOT_ALLOWED:{status:405,title:"Method not allowed"},PAYLOAD_TOO_LARGE:{status:413,title:"Payload too large"},INTERNAL:{internal:!0,status:500,title:"Internal error"},INTERNAL_SERVER_ERROR:{internal:!0,status:500,title:"Internal error"},RPC_FAILED:{internal:!0,status:500,title:"Internal error"},COUNT_RLS_UNSUPPORTED:{status:422,title:"count() is unsupported under an RLS policy"},MASK_UNSUPPORTED:{status:422,title:"Aggregation over a masked column is unsupported"},RELATION_PREDICATE_UNSUPPORTED:{status:422,title:"Relation predicate is unsupported in a write policy"},RLS_REQUIRED:{hint:["This table is secure-by-default: it has no `.public()` marker and no RLS policy resolved for the caller, so the read fails closed.","","Add a read policy with `.rls(...)`, or mark the table `.public()` if it is intentionally world-readable."],status:403,title:"RLS policy required"},RUN_DEPTH_EXCEEDED:{internal:!0,status:500,title:"Run depth exceeded"},TRANSACTION_LIMIT_EXCEEDED:{hint:["A single mutation may only read and write a bounded amount before it is stopped.","","Narrow the read with an index (`.withIndex(...)`) instead of scanning the table, or split the write across several mutations \u2014 for a large backfill use `defineMigration` + `lunora migrate up`, which batches and checkpoints for you.","","The ceilings are deliberately conservative \u2014 they exist to stop one request taking down the whole shard. A deployment that genuinely needs bigger transactions can raise them by overriding the `transactionLimits()` seam on its generated shard class."],status:413,title:"Transaction limit exceeded"},MIGRATION_NOT_FOUND:{status:404,title:"Data migration not found"},UNKNOWN_TABLE:{status:404,title:"Unknown table"},GLOBAL_TABLE_NOT_EDITABLE:{status:400,title:"Global table is not editable"},SHARD_ERROR:{status:503,title:"Shard error"},SHARD_UNAVAILABLE:{status:503,title:"Shard unavailable"},OFFLINE_IDENTITY_CHANGED:{status:409,title:"Offline identity changed"},CODEGEN_DIAGNOSTIC:{status:500,title:"Codegen diagnostic"},SCHEMA_SNAPSHOT_PARSE:{status:500,title:"Schema snapshot parse error"},ENV_INVALID:{internal:!0,status:500,title:"Invalid environment"},AUTH_HEADERS_MISSING:{internal:!0,status:500,title:"Auth headers missing"},EMAIL_DOMAIN_BLOCKED:{hint:["This address's domain is on the disposable/throwaway blocklist (or your configured deny-list).","","Sign up with a permanent mailbox. To tune the policy, pass `blockDisposable` / `allowDomains` / `denyDomains` to `emailGate(...)` (`@lunora/auth/email-guard`)."],status:400,title:"Email domain not allowed"},EMAIL_UNDELIVERABLE:{hint:["The address's domain publishes no MX (or fallback A/AAAA) records, so it can't receive mail.","","Check for a typo in the domain. MX verification is opt-in (`mx: true`) and needs DNS \u2014 leave it off on the edge path if DNS is unavailable."],status:400,title:"Email domain cannot receive mail"},ANALYTICS_SQL_ERROR:{status:502,title:"Analytics Engine SQL API error"},R2_SQL_ERROR:{status:502,title:"R2 SQL API error"},WORKFLOWS_REST_ERROR:{status:502,title:"Cloudflare Workflows REST API error"},ADMIN_FORBIDDEN:{status:403,title:"Admin access forbidden"},ADMIN_TOKEN_NOT_CONFIGURED:{status:400,title:"Admin token not configured"},AUTH_NOT_CONFIGURED:{status:400,title:"Auth admin not configured"},AUTH_OP_NOT_SUPPORTED:{status:400,title:"Auth admin operation not supported"},BACKUP_NOT_CONFIGURED:{status:500,title:"Scheduled backup not configured"},BACKUP_RETENTION_NOT_CONFIGURED:{hint:["`lunora backup prune` removes snapshots past the retention window, and this worker has no window: set `backupRetain` (how many to keep) and `backupCron` (which decides whose snapshots retention owns) on `createWorker`.","","Nothing was deleted. A default is deliberately not invented here \u2014 retention deleting on its own is exactly what this command exists to replace."],status:400,title:"Backup retention window not configured"},BACKUP_TOO_LARGE:{hint:["The scheduled backup is assembled inside the Worker isolate, so it caps the snapshot it will build. Nothing was written.","","The cap is on the NDJSON, not on peak memory: the export fan-out resolves every shard's rows before the first row is encoded, so a snapshot under the cap can still exhaust the isolate. It is set well below the isolate's limit for that reason.","","Narrow the snapshot with `backupTables`, or take this backup off-platform with `lunora backup create --bucket`, which runs on a machine rather than in an isolate. Backing up more often does not help \u2014 every run is a full snapshot."],status:507,title:"Backup too large to assemble in a Worker"},CRON_JOBS_NOT_CONFIGURED:{status:400,title:"Cron jobs not configured"},CRON_JOB_NOT_FOUND:{status:404,title:"Cron job not found"},EXPORT_TAP_NOT_CONFIGURED:{status:400,title:"Export tap not configured"},FUNCTIONS_NOT_CONFIGURED:{status:400,title:"Functions registry not configured"},GLOBALS_NOT_CONFIGURED:{status:400,title:"Global-table introspector not configured"},KV_NOT_CONFIGURED:{status:400,title:"KV introspector not configured"},MIGRATION_ID_REQUIRED:{status:400,title:"Migration id required"},PITR_UNAVAILABLE:{status:409,title:"Point-in-time recovery unavailable"},SCHEDULER_NOT_CONFIGURED:{status:400,title:"Scheduler not configured"},STORAGE_CHECKSUM_MISMATCH:{hint:["The upload body did not match the declared `expectedSize` or `expectedSha256`, so nothing was written \u2014 this check fails closed.","","Re-read the bytes from the source export and retry the transfer. A persistent mismatch means the source blob is corrupt or truncated; fix the export rather than bypassing the check."],status:400,title:"Storage checksum mismatch"},STORAGE_DELETE_NOT_CONFIGURED:{status:400,title:"Storage delete not configured"},STORAGE_DOWNLOAD_NOT_CONFIGURED:{hint:["`GET /_lunora/admin/storage/object` needs a `storageDownload` function on the worker. The generated app worker wires it up; a hand-written `createWorker({ ... })` has to pass `(key, opts) => pick(opts?.bucket).download(key)` \u2014 forwarding `opts.bucket` to the right bucket, and wrapping rather than passing `createStorage(...).download` itself, whose second parameter is a byte range.","","Without it a bucket-backed `lunora backup restore --bucket` cannot read the snapshot. The object is still readable out of band with `wrangler r2 object get`."],status:400,title:"Storage download not configured"},STORAGE_NOT_CONFIGURED:{status:400,title:"Storage not configured"},STORAGE_OBJECT_NOT_FOUND:{status:404,title:"Storage object not found"},STORAGE_UPLOAD_NOT_CONFIGURED:{status:400,title:"Storage upload not configured"},STORAGE_URL_NOT_CONFIGURED:{status:400,title:"Storage signed URL not configured"},VECTORS_NOT_CONFIGURED:{status:400,title:"Vector index introspector not configured"},VECTOR_QUERY_UNSUPPORTED:{status:400,title:"Vector index querying not enabled"},WORKFLOWS_NOT_CONFIGURED:{status:501,title:"Workflows not configured"},AUTH_AUDIT_NOT_CONFIGURED:{status:400,title:"Auth audit reader not configured"},AUTH_AUDIT_READ_FAILED:{internal:!0,status:500,title:"Auth audit read failed"},CRON_EXPR_INVALID:{status:500,title:"Invalid cron expression"},CRON_EXPR_NOT_STATIC:{status:500,title:"Cron expression is not statically analyzable"},CRON_JOB_FAILED:{internal:!0,status:500,title:"Cron job failed"},CRON_NAME_NOT_STATIC:{status:500,title:"Cron job name is not statically analyzable"},CRON_NON_STATIC_FN:{status:500,title:"Cron function reference is not statically analyzable"},CRON_NON_STATIC_VALUE:{status:500,title:"Cron value is not statically analyzable"},CRON_SCHEDULE_INVALID:{status:500,title:"Invalid cron schedule"},CRON_SCHEDULE_NOT_STATIC:{status:500,title:"Cron schedule is not statically analyzable"},DUPLICATE_CRON_NAME:{status:500,title:"Duplicate cron job name"},DUPLICATE_AGENT_BINDING:{status:500,title:"Duplicate agent binding"},DUPLICATE_AGENT_CLASS:{status:500,title:"Duplicate agent generated class name"},DUPLICATE_AGENT_NAME:{status:500,title:"Duplicate agent name"},DUPLICATE_MIGRATION_ID:{status:500,title:"Duplicate migration id"},DUPLICATE_QUEUE_BINDING:{status:500,title:"Duplicate queue binding"},DUPLICATE_QUEUE_NAME:{status:500,title:"Duplicate queue name"},DUPLICATE_WORKFLOW_CLASS:{status:500,title:"Duplicate workflow generated class name"},MIGRATION_ID_NOT_STATIC:{status:500,title:"Migration id is not statically analyzable"},NAMESPACE_COLLISION:{status:500,title:"Function namespace collision"},BAD_ROW:{status:400,title:"Malformed import row"},BAD_SUBSCRIPTION_ARGS:{status:400,title:"Invalid subscription arguments"},BATCH_LIMIT_EXCEEDED:{status:400,title:"Batch limit exceeded"},CROSS_SHARD_RANK_UNSUPPORTED:{status:400,title:"Cross-shard rank() is unsupported"},FORBIDDEN_FANOUT:{status:403,title:"Fan-out forbidden"},GLOBAL_SEARCH_SCORES_UNSUPPORTED:{status:400,title:"collectWithScores() is unsupported on a global table"},FORBIDDEN_ORIGIN:{status:403,title:"Origin forbidden"},FORBIDDEN_SHARD:{status:403,title:"Shard access forbidden"},GLOBAL_NOT_CONFIGURED:{status:400,title:"Global table import not configured"},INVALID_INPUT:{status:400,title:"Invalid input"},RATE_LIMITED:{status:429,title:"Rate limited"},REPLICA_NOT_READY:{status:421,title:"Replica not caught up"},REPLICA_READ_ONLY:{status:421,title:"Replica is read-only"},SERVICE_UNAVAILABLE:{status:503,title:"Service unavailable"},SHAPE_CROSS_SHARD_JOIN:{status:400,title:"Shape cross-shard join is unsupported"},UNAUTHENTICATED:{status:401,title:"Unauthenticated"},UNKNOWN_COLUMN:{status:404,title:"Unknown column"},CDC_LOG_TRIMMED:{status:409,title:"CDC log trimmed"},CDC_PAYLOAD_COMPACTED:{status:409,title:"CDC payloads compacted"},EXPIRED:{status:404,title:"Session expired"},NESTED_TRANSACTION:{internal:!0,status:500,title:"Nested transaction"},OUT_OF_ORDER:{status:409,title:"Out-of-order mutation"},SHAPE_GLOBAL_TOO_LARGE:{status:413,title:"Global shape too large"},SHAPE_NOT_FOUND:{status:404,title:"Shape not found"},SHAPE_REQUIRES_CDC:{status:409,title:"Shape requires change-data-capture"},SQL_UNAVAILABLE:{internal:!0,status:500,title:"SQL storage unavailable"},STREAM_INTERRUPTED:{status:503,title:"Durable stream interrupted"},STREAM_TOO_LONG:{status:507,title:"Durable stream exceeded its chunk ceiling"},TOKEN_EXPIRED:{status:401,title:"Authentication token expired"},TOO_MANY_STREAMS:{status:429,title:"Too many streams"},UNKNOWN_ADMIN_OP:{status:404,title:"Unknown admin operation"},SOCKET_TAG_BUDGET_EXCEEDED:{status:400,title:"Socket tag budget exceeded"},RELAY_CANNOT_SEED:{status:500,title:"Relay cannot seed"},RELAY_MISCONFIGURED:{status:500,title:"Relay misconfigured"},RELAY_SEED_FAILED:{status:502,title:"Relay seed failed"},RELAY_SHAPE_UNROUTABLE:{status:500,title:"Relay shape unroutable"},MISCONFIGURED:{internal:!0,status:500,title:"Worker misconfigured"},LUNORA_RUNTIME_UNAVAILABLE:{status:500,title:"Lunora runtime unavailable"},INTERNAL_ERROR:{internal:!0,status:500,title:"Internal error"},BROWSER_TIMEOUT:{status:504,title:"Browser operation timed out"},CLIENT_CLOSED:{status:400,title:"Client is closed"},HTTP_STREAM_BAD_CHUNK:{status:502,title:"Malformed HTTP stream chunk"},HTTP_STREAM_INTERRUPTED:{status:502,title:"HTTP stream interrupted"},HTTP_STREAM_MISSING_PARAM:{status:400,title:"HTTP stream missing path parameter"},HTTP_STREAM_NO_BODY:{status:502,title:"HTTP stream response has no body"},HTTP_STREAM_STATUS:{status:502,title:"HTTP stream request failed"},HTTP_STREAM_TRANSPORT:{status:502,title:"HTTP stream transport error"},STREAM_BACKPRESSURE:{status:429,title:"Stream backpressure"},STREAM_DISCONNECTED:{status:503,title:"Stream disconnected"},STREAM_QUEUE_OVERFLOW:{status:429,title:"Stream queue overflow"},UNKNOWN_MUTATION_FN:{status:404,title:"Unknown mutation function"}},f=a(e=>Object.hasOwn(l,e)?l[e]:void 0,"h");var m=[{body:["A single row exceeded the storage engine's per-row ceiling \u2014 2 MB on a Durable Object's SQLite, and 2,000,000 bytes on D1.","","The limit is on the STORED bytes, which are UTF-8: a document of multi-byte text (CJK, emoji) costs up to 3x its character count. `v.bytes()` and `v.bigint()` columns cost more again on a shard-local table, where the row stores both a SQL-comparable projection and the original.","","Keep the large payload out of the row and store a reference to it:","","```ts","const key = `uploads/${crypto.randomUUID()}`;","await ctx.storage.uploads.put(key, bytes);",'await ctx.db.insert("documents", { storageKey: key, title });',"```","","R2 has no practical object-size ceiling, and the row stays small enough to read, index, and replicate."].join(`
|
|
2
2
|
`),header:"Row too large for the storage engine",id:"lunora-row-too-big",test:a(e=>_.test(e),"test")},{body:["Lunora codegen couldn't find a schema to generate from.","","Create `lunora/schema.ts` exporting a `defineSchema(...)` call:","","```ts",'import { defineSchema, defineTable, v } from "@lunora/server";',"","export default defineSchema({"," messages: defineTable({ body: v.string() }),","});","```","","Or run `lunora init` to scaffold Lunora (a sample `lunora/schema.ts` included) into your app."].join(`
|
|
3
3
|
`),header:"No Lunora schema found",id:"lunora-schema-missing",test:a(e=>e.includes("defineSchema() not found")||e.includes("schema.ts not found at"),"test")},{body:["`defineSchema(...)` must be called with an **inline object literal** mapping table names to `defineTable(...)`:","","```ts","export default defineSchema({"," todos: defineTable({ title: v.string(), done: v.boolean() }),","});","```","","Codegen reads the schema statically, so it can't follow a variable or a spread \u2014 pass the object literal directly."].join(`
|
|
4
4
|
`),header:"`defineSchema()` needs an inline object literal",id:"lunora-schema-not-object-literal",test:a(e=>e.includes("defineSchema() expects an object literal"),"test")},{body:["This table name collides with a built-in `ctx.db` member, so the generated client can't expose it.","","Rename the table to anything that isn't a reserved name (the error lists them) \u2014 e.g. `userAccounts` instead of `insert`."].join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as M,c as O,e as S,i as E}from"./chunk-
|
|
1
|
+
import{a as M,c as O,e as S,i as E}from"./chunk-5GFSKIB2.js";import{a as I,b as B,c as U}from"./chunk-25NFR6EB.js";import{a as s,d as k,e as w}from"./chunk-YKXDMIHQ.js";var f=k(w(),1);var g=k(w(),1);var z=g.createContext(void 0);function W(o=!1){let t=g.useContext(z);if(t===void 0&&!o)throw new Error(U(16));return t}s(W,"useCompositeRootContext");var H=k(w(),1);function A(o){let{focusableWhenDisabled:t,disabled:r,composite:l=!1,tabIndex:n=0,isNativeButton:u}=o,d=l&&t!==!1,b=l&&t===!1;return{props:H.useMemo(()=>{let a={onKeyDown(p){r&&t&&p.key!=="Tab"&&p.preventDefault()}};return l||(a.tabIndex=n,!u&&r&&(a.tabIndex=t?n:-1)),(u&&(t||d)||!u&&r)&&(a["aria-disabled"]=r),u&&(!t||b)&&(a.disabled=r),a},[l,r,t,d,b,u,n])}}s(A,"useFocusableWhenDisabled");function h(o,t,{detail:r=0}={}){o.dispatchEvent(new(S(o)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}s(h,"dispatchClickWithModifiers");function le(o={}){let{disabled:t=!1,focusableWhenDisabled:r,tabIndex:l=0,native:n=!0,composite:u}=o,d=f.useRef(null),b=W(!0),i=u??b!==void 0,{props:a}=A({focusableWhenDisabled:r,disabled:t,composite:i,tabIndex:l,isNativeButton:n}),p=f.useCallback(()=>{let c=d.current;K(c)&&i&&t&&a.disabled===void 0&&c.disabled&&(c.disabled=!1)},[t,a.disabled,i]);M(p,[p]);let F=f.useCallback((c={})=>{let{onClick:x,onMouseDown:C,onKeyUp:V,onKeyDown:_,onPointerDown:$,...v}=c;return I({onClick(e){if(t){e.preventDefault();return}x?.(e)},onMouseDown(e){t||C?.(e)},onKeyDown(e){if(t||(B(e),_?.(e),e.baseUIHandlerPrevented))return;let R=e.target===e.currentTarget,m=e.currentTarget,P=K(m),N=!n&&G(m),j=R&&(n?P:!N),T=e.key==="Enter",y=e.key===" ",D=m.getAttribute("role"),q=D?.startsWith("menuitem")||D==="option"||D==="gridcell";if(R&&i&&y){if(e.defaultPrevented&&q)return;e.preventDefault(),(!n||P)&&(e.preventBaseUIHandler(),h(m,e));return}if(!j||n||!y&&!T){R&&N&&y&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),T&&(e.preventBaseUIHandler(),h(m,e)))},onKeyUp(e){if(!t){if(B(e),V?.(e),e.target===e.currentTarget&&n&&i&&K(e.currentTarget)&&e.key===" "){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!n&&!i&&!e.defaultPrevented&&e.key===" "&&(e.preventBaseUIHandler(),h(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}$?.(e)}},n?{type:"button"}:{role:"button"},a,v)},[t,a,i,n]),L=O(c=>{d.current=c,p()});return{getButtonProps:F,buttonRef:L}}s(le,"useButton");function K(o){return E(o)&&o.tagName==="BUTTON"}s(K,"isButtonElement");function G(o){return E(o)&&o.tagName==="A"&&!!o.href}s(G,"isValidLinkElement");export{W as a,h as b,le as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ce,b as Zo,c as en}from"./chunk-CP4ZFBVW.js";import{a as tn}from"./chunk-CN2AINNY.js";import{a as lo,b as So,d as No,e as Oo,f as Do,g as Lo,h as Jo,i as Xo}from"./chunk-EDHW2EEG.js";import{$ as ko,A as nt,C as po,E as mo,F as fo,H as go,J as Ro,K as xo,N as Mo,O as ho,P as bo,Q as Co,S as vo,T as Io,U as Eo,V as yo,X as Po,Z as To,aa as rt,ba as wo,ca as _o,da as st,ea as Vo,fa as At,ga as Bo,ha as at,ja as Fo,ka as Go,ma as Ho,n as Dt,na as jo,oa as Yo,p as no,pa as zo,q as ro,ra as Ko,s as so,sa as $o,t as et,ta as Wo,u as tt,v as io,w as ot,x as ao,y as uo,z as co}from"./chunk-ZSOLGJFC.js";import{b as Uo}from"./chunk-DUDQV6XJ.js";import{i as qo,k as Qo}from"./chunk-DKSLOJDQ.js";import{B as ye,G as to,H as Ge,J as oo,K as Qe,L as Ze,N as v,O as se,d as wt,e as te,h as qe,o as _t}from"./chunk-AOAJGSYZ.js";import{a as it,b as Ao,c as Ue}from"./chunk-74ASA4WU.js";import{a as he,c as Fe,i as Qt,q as Zt,t as eo,w as ze}from"./chunk-XQS7KSHL.js";import{a as Me,c as F,d as qt,e as Xe,g as Le,h as Ye,i as ue,j as N}from"./chunk-7PIHTTND.js";import{a as o,c as Zn,d as M,e as C,f as er,g as me,i as Be}from"./chunk-R5ZTCHCE.js";var _e=M(er(),1);var oe={};Zn(oe,{Arrow:()=>nn,Backdrop:()=>sn,CheckboxItem:()=>dn,CheckboxItemIndicator:()=>pn,Group:()=>fn,GroupLabel:()=>Rn,Handle:()=>Je,Item:()=>Mn,LinkItem:()=>hn,Popup:()=>Cn,Portal:()=>En,Positioner:()=>yn,RadioGroup:()=>Sn,RadioItem:()=>Tn,RadioItemIndicator:()=>kn,Root:()=>Ot,Separator:()=>tn,SubmenuRoot:()=>Bn,SubmenuTrigger:()=>zn,Trigger:()=>Hn,Viewport:()=>Yn,createHandle:()=>Kn});var on=M(C(),1);var ut=M(C(),1);var Vt=ut.createContext(void 0);function W(t){let e=ut.useContext(Vt);if(e===void 0&&!t)throw new Error(F(33));return e}o(W,"useMenuPositionerContext");var ct=M(C(),1);var Bt=ct.createContext(void 0);function k(t){let e=ct.useContext(Bt);if(e===void 0&&!t)throw new Error(F(36));return e}o(k,"useMenuRootContext");var nn=on.forwardRef(o(function(e,n){let{render:i,className:u,style:a,...d}=e,{store:p}=k(),{arrowRef:r,side:m,align:g,arrowUncentered:R,arrowStyles:h}=W(),I={open:p.useState("open"),side:m,align:g,uncentered:R};return N("div",e,{ref:[r,n],stateAttributesMapping:Bo,state:I,props:{style:h,"aria-hidden":!0,...d}})},"MenuArrow"));var rn=M(C(),1);var dt=M(C(),1);var tr=dt.createContext(void 0);function Pe(t=!0){let e=dt.useContext(tr);if(e===void 0&&!t)throw new Error(F(25));return e}o(Pe,"useContextMenuRootContext");var sn=rn.forwardRef(o(function(e,n){let{render:i,className:u,style:a,...d}=e,{store:p}=k(),r=p.useState("open"),m=p.useState("mounted"),g=p.useState("transitionStatus"),R=p.useState("lastOpenChangeReason"),h=Pe(),x={open:r,transitionStatus:g};return N("div",e,{ref:h?.backdropRef?[n,h.backdropRef]:n,state:x,stateAttributesMapping:at,props:[{role:"presentation",hidden:!m,style:{pointerEvents:R===v.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},d]})},"MenuBackdrop"));var mt=M(C(),1);var pt=M(C(),1);var Lt=pt.createContext(void 0);function an(){let t=pt.useContext(Lt);if(t===void 0)throw new Error(F(30));return t}o(an,"useMenuCheckboxItemContext");var He=M(C(),1);var un=M(C(),1);function lt(t){let{closeOnClick:e,highlighted:n,id:i,nodeId:u,store:a,typingRef:d,itemRef:p,itemMetadata:r}=t,{events:m}=a.useState("floatingTreeRoot"),g=a.useState("open"),R=Pe(!0),h=R!==void 0;return un.useMemo(()=>({id:i,role:"menuitem",tabIndex:g&&n?0:-1,onKeyDown(x){x.key===" "&&d?.current&&x.preventDefault()},onMouseMove(x){u&&m.emit("itemhover",{nodeId:u,target:x.currentTarget})},onClick(x){e&&m.emit("close",{domEvent:x,reason:v.itemPress})},onMouseUp(x){if(R){let I=R.initialCursorPointRef.current;if(R.initialCursorPointRef.current=null,h&&I&&Math.abs(x.clientX-I.x)<=1&&Math.abs(x.clientY-I.y)<=1||h&&!qe.os.mac&&x.button===2)return}p.current&&a.context.allowMouseUpTriggerRef.current&&(!h||x.button===2)&&r.type==="regular-item"&&Ao(p.current,x,{detail:1})}}),[e,n,i,m,u,g,a,d,p,R,h,r])}o(lt,"useMenuItemCommonProps");var Se={type:"regular-item"};function Ne(t){let{closeOnClick:e,disabled:n,highlighted:i,id:u,store:a,typingRef:d=a.context.typingRef,nativeButton:p,itemMetadata:r,nodeId:m}=t,g=He.useRef(null),{getButtonProps:R,buttonRef:h}=Ue({disabled:n,focusableWhenDisabled:!0,native:p,composite:!0}),x=lt({closeOnClick:e,highlighted:i,id:u,nodeId:m,store:a,typingRef:d,itemRef:g,itemMetadata:r}),I=He.useCallback(_=>Me(x,{onMouseEnter(){r.type==="submenu-trigger"&&r.setActive()}},_,R),[x,R,r]),y=Xe(g,h);return He.useMemo(()=>({getItemProps:I,itemRef:y}),[I,y])}o(Ne,"useMenuItem");var Ft=(function(t){return t.checked="data-checked",t.unchecked="data-unchecked",t.disabled="data-disabled",t.highlighted="data-highlighted",t})({});var Oe={checked(t){return t?{[Ft.checked]:""}:{[Ft.unchecked]:""}},...oo};var cn=M(me(),1);var dn=mt.forwardRef(o(function(e,n){let{render:i,className:u,id:a,label:d,nativeButton:p=!1,disabled:r=!1,closeOnClick:m=!1,checked:g,defaultChecked:R,onCheckedChange:h,style:x,...I}=e,y=ce({guess:!0,label:d}),_=W(!0),c=te(a),{store:f}=k(),l=f.useState("disabled"),D=r||l,E=f.useState("isActive",y.index),s=f.useState("itemProps"),[V,b]=Ze({controlled:g,default:R??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:H,itemRef:A}=Ne({closeOnClick:m,disabled:D,highlighted:E,id:c,store:f,nativeButton:p,nodeId:_?.context.nodeId,itemMetadata:Se}),P=mt.useMemo(()=>({disabled:D,highlighted:E,checked:V}),[D,E,V]);function L(z){let j=se(v.itemPress,z.nativeEvent,void 0,{preventUnmountOnClose:Le});h?.(!V,j),!j.isCanceled&&b(O=>!O)}o(L,"handleClick");let G=N("div",e,{state:P,stateAttributesMapping:Oe,props:[s,{role:"menuitemcheckbox","aria-checked":V,onClick:L},I,H],ref:[A,n,y.ref]});return(0,cn.jsx)(Lt.Provider,{value:P,children:G})},"MenuCheckboxItem"));var ft=M(C(),1);var pn=ft.forwardRef(o(function(e,n){let{render:i,className:u,style:a,keepMounted:d=!1,...p}=e,r=an(),m=ft.useRef(null),{transitionStatus:g,mounted:R,setMounted:h}=Qe(r.checked);Ge({open:r.checked,ref:m,onComplete(){r.checked||h(!1)}});let x={checked:r.checked,disabled:r.disabled,highlighted:r.highlighted,transitionStatus:g};return N("span",e,{state:x,ref:[n,m],stateAttributesMapping:Oe,props:{"aria-hidden":!0,...p},enabled:d||R})},"MenuCheckboxItemIndicator"));var Rt=M(C(),1);var gt=M(C(),1);var Ke=gt.createContext(void 0);function ln(){let t=gt.useContext(Ke);if(t===void 0)throw new Error(F(31));return t}o(ln,"useMenuGroupRootContext");var mn=M(me(),1);var fn=Rt.forwardRef(o(function(e,n){let{render:i,className:u,style:a,...d}=e,[p,r]=Rt.useState(void 0),m=N("div",e,{ref:n,props:{role:"group","aria-labelledby":p,...d}});return(0,mn.jsx)(Ke.Provider,{value:r,children:m})},"MenuGroup"));var gn=M(C(),1);var Rn=gn.forwardRef(o(function(e,n){let{render:i,className:u,style:a,id:d,...p}=e,r=te(d),m=ln();return he(()=>(m(r),()=>{m(g=>g===r?void 0:g)}),[m,r]),N("div",e,{ref:n,props:{id:r,role:"presentation",...p}})},"MenuGroupLabel"));var xn=M(C(),1);var Mn=xn.forwardRef(o(function(e,n){let{render:i,className:u,id:a,label:d,nativeButton:p=!1,disabled:r=!1,closeOnClick:m=!0,style:g,...R}=e,h=ce({guess:!0,label:d}),x=W(!0),I=te(a),{store:y}=k(),_=y.useState("disabled"),c=r||_,f=y.useState("isActive",h.index),l=y.useState("itemProps"),{getItemProps:D,itemRef:E}=Ne({closeOnClick:m,disabled:c,highlighted:f,id:I,store:y,nativeButton:p,nodeId:x?.context.nodeId,itemMetadata:Se});return N("div",e,{state:{disabled:c,highlighted:f},props:[l,R,D],ref:[E,n,h.ref]})},"MenuItem"));var xt=M(C(),1);var hn=xt.forwardRef(o(function(e,n){let{render:i,className:u,id:a,label:d,closeOnClick:p=!1,style:r,...m}=e,g=xt.useRef(null),R=ce({guess:!0,label:d}),x=W(!0)?.context.nodeId,I=te(a),{store:y}=k(),_=y.useState("isActive",R.index),c=y.useState("itemProps"),f=y.context.typingRef,{getButtonProps:l,buttonRef:D}=Ue({native:!1,composite:!0}),E=lt({closeOnClick:p,highlighted:_,id:I,nodeId:x,store:y,typingRef:f,itemRef:g,itemMetadata:Se});function s(b){return Me(E,b,l)}return o(s,"getItemProps"),N("a",e,{state:{highlighted:_},props:[c,m,s],ref:[g,D,n,R.ref]})},"MenuLinkItem"));var Mt=M(C(),1);var bn=M(me(),1);var Cn=Mt.forwardRef(o(function(e,n){let{render:i,className:u,style:a,finalFocus:d,...p}=e,{store:r}=k(),{side:m,align:g}=W(),R=Wo(!0)!=null,h=r.useState("open"),x=r.useState("transitionStatus"),I=r.useState("popupProps"),y=r.useState("mounted"),_=r.useState("instantType"),c=r.useState("activeTriggerElement"),f=r.useState("parent"),l=r.useState("lastOpenChangeReason"),D=r.useState("rootId"),E=r.useState("floatingRootContext"),s=r.useState("floatingTreeRoot"),V=r.useState("closeDelay"),b=r.useState("hoverEnabled"),H=r.useState("disabled"),A=r.useState("openMethod"),P=f.type==="context-menu";Ge({open:h,ref:r.context.popupRef,onComplete(){h&&r.context.onOpenChangeComplete?.(!0)}}),Mt.useEffect(()=>{function O(fe){r.setOpen(!1,se(fe.reason,fe.domEvent))}return o(O,"handleClose"),s.events.on("close",O),()=>{s.events.off("close",O)}},[s.events,r]),ko(E,{enabled:b&&!H&&!P&&f.type!=="menubar",closeDelay:V});let L=r.useStateSetter("popupElement"),G={transitionStatus:x,side:m,align:g,open:h,nested:f.type==="menu",instant:_},z=N("div",e,{state:G,ref:[n,r.context.popupRef,L],stateAttributesMapping:at,props:[I,{onKeyDown(O){R&&$o.has(O.key)&&O.stopPropagation()}},Yo(x),p,{"data-rootownerid":D}]}),j=f.type===void 0||P;return(c||f.type==="menubar"&&l!==v.outsidePress)&&(j=!0),(0,bn.jsx)(co,{context:E,openInteractionType:A,modal:P,disabled:!y,returnFocus:d===void 0?j:d,initialFocus:f.type!=="menu",restoreFocus:!0,externalTree:f.type!=="menubar"?s:void 0,previousFocusableElement:c,nextFocusableElement:f.type===void 0?r.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:f.type===void 0?r.context.beforeContentFocusGuardRef:void 0,children:z})},"MenuPopup"));var In=M(C(),1);var ht=M(C(),1);var Gt=ht.createContext(void 0);function vn(){let t=ht.useContext(Gt);if(t===void 0)throw new Error(F(32));return t}o(vn,"useMenuPortalContext");var Ut=M(me(),1);var En=In.forwardRef(o(function(e,n){let{keepMounted:i=!1,...u}=e,{store:a}=k();return a.useState("mounted")||i?(0,Ut.jsx)(Gt.Provider,{value:i,children:(0,Ut.jsx)(so,{ref:n,...u})}):null},"MenuPortal"));var be=M(C(),1);var je=M(me(),1);var yn=be.forwardRef(o(function(e,n){let{anchor:i,positionMethod:u="absolute",className:a,render:d,side:p,align:r,sideOffset:m=0,alignOffset:g=0,collisionBoundary:R="clipping-ancestors",collisionPadding:h=5,arrowPadding:x=5,sticky:I=!1,disableAnchorTracking:y=!1,collisionAvoidance:_=no,style:c,...f}=e,{store:l}=k(),D=vn(),E=Pe(!0),s=l.useState("parent"),V=l.useState("floatingRootContext"),b=l.useState("floatingTreeRoot"),H=l.useState("mounted"),A=l.useState("open"),P=l.useState("modal"),L=l.useState("openMethod"),G=l.useState("activeTriggerElement"),z=l.useState("transitionStatus"),j=l.useState("positionerElement"),O=l.useState("instantType"),fe=l.useState("adaptiveOrigin"),T=l.useState("lastOpenChangeReason"),X=l.useState("floatingNodeId"),Ee=l.useState("floatingParentNodeId"),ne=V.useState("domReferenceElement"),ge=be.useRef(null),ie=to(j),re=i,Re=m,ve=g,xe=r,de=_;s.type==="context-menu"&&(re=i??s.context?.anchor,xe=xe??"start",!p&&xe!=="center"&&(ve=e.alignOffset??2,Re=e.sideOffset??-5));let q=p,pe=xe;s.type==="menu"?(q=q??"inline-end",pe=pe??"start",de=e.collisionAvoidance??ro):s.type==="menubar"&&(q=q??(s.context.orientation==="vertical"?"inline-end":"bottom"),pe=pe??"start");let Y=s.type==="context-menu",K=Ho({anchor:re,floatingRootContext:V,positionMethod:E?"fixed":u,mounted:H,side:q,sideOffset:Re,align:pe,alignOffset:ve,arrowPadding:Y?0:x,collisionBoundary:R,collisionPadding:h,sticky:I,nodeId:X,keepMounted:D,disableAnchorTracking:y,collisionAvoidance:de,shift:Y?{crossAxis:!("side"in de&&de.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:b,adaptiveOrigin:fe});be.useEffect(()=>{function B(w){w.open&&(w.parentNodeId===X&&l.set("hoverEnabled",!1),w.nodeId!==X&&w.parentNodeId===l.select("floatingParentNodeId")&&l.setOpen(!1,se(v.siblingOpen)))}return o(B,"onMenuOpenChange"),b.events.on("menuopenchange",B),()=>{b.events.off("menuopenchange",B)}},[l,b.events,X]),be.useEffect(()=>{if(l.select("floatingParentNodeId")==null)return;function B(w){if(w.open||w.nodeId!==l.select("floatingParentNodeId"))return;let Ie=w.reason??v.siblingOpen;l.setOpen(!1,se(Ie))}return o(B,"onParentClose"),b.events.on("menuopenchange",B),()=>{b.events.off("menuopenchange",B)}},[b.events,l]);let ae=ye();be.useEffect(()=>{A||ae.clear()},[A,ae]),be.useEffect(()=>{function B(w){if(!(!A||w.nodeId!==l.select("floatingParentNodeId")))if(w.target&&G&&G!==w.target){let Ie=l.select("closeDelay");Ie>0?ae.isStarted()||ae.start(Ie,()=>{l.setOpen(!1,se(v.siblingOpen))}):l.setOpen(!1,se(v.siblingOpen))}else ae.clear()}return o(B,"onItemHover"),b.events.on("itemhover",B),()=>{b.events.off("itemhover",B)}},[b.events,A,G,l,ae]),be.useEffect(()=>{let B={open:A,nodeId:X,parentNodeId:Ee,reason:l.select("lastOpenChangeReason")};b.events.emit("menuopenchange",B)},[b.events,A,l,X,Ee]),he(()=>{let B=ne,w=ge.current;if(B&&(ge.current=B),w&&B&&B!==w){l.set("instantType",void 0);let Ie=new AbortController;return ie(()=>{l.set("instantType","trigger-change")},Ie.signal),()=>{Ie.abort()}}},[ne,ie,l]);let De={open:A,side:K.side,align:K.align,anchorHidden:K.anchorHidden,nested:s.type==="menu",instant:O},we=s.type==="menubar"&&s.context.modal,le=P&&T!==v.triggerHover;Ko(A&&(we||le),L==="touch",j,G);let Ae=zo(e,De,{styles:K.positionerStyles,transitionStatus:z,props:f,refs:[n,l.useStateSetter("positionerElement")],hidden:!H,inert:!A}),Ve=H&&s.type!=="menu"&&(s.type!=="menubar"&&P&&T!==v.triggerHover||s.type==="menubar"&&s.context.modal),Z=null;return s.type==="menubar"?Z=s.context.contentElement:s.type===void 0&&(Z=G),(0,je.jsxs)(Vt.Provider,{value:K,children:[Ve&&(0,je.jsx)(jo,{ref:s.type==="context-menu"||s.type==="nested-context-menu"?s.context.internalBackdropRef:null,inert:Go(!A),cutout:Z}),(0,je.jsx)(ao,{id:X,children:(0,je.jsx)(Zo,{elementsRef:l.context.itemDomElements,labelsRef:l.context.itemLabels,children:Ae})})]})},"MenuPositioner"));var Te=M(C(),1);var bt=M(C(),1);var Ht=bt.createContext(void 0);function Pn(){let t=bt.useContext(Ht);if(t===void 0)throw new Error(F(34));return t}o(Pn,"useMenuRadioGroupContext");var jt=M(me(),1);var Sn=Te.memo(Te.forwardRef(o(function(e,n){let{render:i,className:u,value:a,defaultValue:d,onValueChange:p,disabled:r=!1,style:m,"aria-labelledby":g,...R}=e,[h,x]=Te.useState(void 0),[I,y]=Ze({controlled:a,default:d,name:"MenuRadioGroup"}),_=Fe((D,E)=>{p?.(D,E),!E.isCanceled&&y(D)}),f=N("div",e,{state:{disabled:r},ref:n,props:{role:"group","aria-labelledby":g??h,"aria-disabled":r||void 0,...R}}),l=Te.useMemo(()=>({value:I,setValue:_,disabled:r}),[I,_,r]);return(0,jt.jsx)(Ke.Provider,{value:x,children:(0,jt.jsx)(Ht.Provider,{value:l,children:f})})},"MenuRadioGroup")));var vt=M(C(),1);var Ct=M(C(),1);var Yt=Ct.createContext(void 0);function Nn(){let t=Ct.useContext(Yt);if(t===void 0)throw new Error(F(35));return t}o(Nn,"useMenuRadioItemContext");var On=M(me(),1);var Tn=vt.forwardRef(o(function(e,n){let{render:i,className:u,id:a,label:d,nativeButton:p=!1,disabled:r=!1,closeOnClick:m=!1,value:g,style:R,...h}=e,x=ce({guess:!0,label:d}),I=W(!0),y=te(a),{store:_}=k(),c=_.useState("isActive",x.index),f=_.useState("itemProps"),{value:l,setValue:D,disabled:E}=Pn(),s=_.useState("disabled"),V=r||E||s,b=l===g,{getItemProps:H,itemRef:A}=Ne({closeOnClick:m,disabled:V,highlighted:c,id:y,store:_,nativeButton:p,nodeId:I?.context.nodeId,itemMetadata:Se}),P=vt.useMemo(()=>({disabled:V,highlighted:c,checked:b}),[V,c,b]);function L(z){let j=se(v.itemPress,z.nativeEvent,void 0,{preventUnmountOnClose:Le});D(g,j)}o(L,"handleClick");let G=N("div",e,{state:P,stateAttributesMapping:Oe,props:[f,{role:"menuitemradio","aria-checked":b,onClick:L},h,H],ref:[A,n,x.ref]});return(0,On.jsx)(Yt.Provider,{value:P,children:G})},"MenuRadioItem"));var It=M(C(),1);var kn=It.forwardRef(o(function(e,n){let{render:i,className:u,style:a,keepMounted:d=!1,...p}=e,r=Nn(),m=It.useRef(null),{transitionStatus:g,mounted:R,setMounted:h}=Qe(r.checked);Ge({open:r.checked,ref:m,onComplete(){r.checked||h(!1)}});let x={checked:r.checked,disabled:r.disabled,highlighted:r.highlighted,transitionStatus:g};return N("span",e,{state:x,stateAttributesMapping:Oe,ref:[n,m],props:{"aria-hidden":!0,...p},enabled:d||R})},"MenuRadioItemIndicator"));var U=M(C(),1);var Et=M(C(),1);var or=Et.createContext(null);function yt(t){let e=Et.useContext(or);if(e===null&&!t)throw new Error(F(5));return e}o(yt,"useMenubarContext");var $e=M(C(),1);var wn={...No,disabled:o(t=>t.parent.type==="menubar"&&t.parent.context.disabled||t.disabled,"disabled"),modal:o(t=>(t.parent.type===void 0||t.parent.type==="context-menu")&&(t.modal??!0),"modal"),openMethod:o(t=>t.openMethod,"openMethod"),allowMouseEnter:o(t=>t.allowMouseEnter,"allowMouseEnter"),highlightItemOnHover:o(t=>t.highlightItemOnHover,"highlightItemOnHover"),parent:o(t=>t.parent,"parent"),rootId:o(t=>t.parent.type==="menu"?t.parent.store.select("rootId"):t.parent.type!==void 0?t.parent.context.rootId:t.rootId,"rootId"),activeIndex:o(t=>t.activeIndex,"activeIndex"),isActive:o((t,e)=>t.activeIndex===e,"isActive"),hoverEnabled:o(t=>t.hoverEnabled,"hoverEnabled"),instantType:o(t=>t.instantType,"instantType"),lastOpenChangeReason:o(t=>t.openChangeReason,"lastOpenChangeReason"),floatingTreeRoot:o(t=>t.parent.type==="menu"?t.parent.store.select("floatingTreeRoot"):t.floatingTreeRoot,"floatingTreeRoot"),floatingNodeId:o(t=>t.floatingNodeId,"floatingNodeId"),floatingParentNodeId:o(t=>t.floatingParentNodeId,"floatingParentNodeId"),itemProps:o(t=>t.itemProps,"itemProps"),closeDelay:o(t=>t.closeDelay,"closeDelay"),adaptiveOrigin:o(t=>t.adaptiveOrigin,"adaptiveOrigin"),keyboardEventRelay:o(t=>{if(t.keyboardEventRelay)return t.keyboardEventRelay;if(t.parent.type==="menu")return t.parent.store.select("keyboardEventRelay")},"keyboardEventRelay")},Pt=class extends go{static{o(this,"MenuStore")}constructor(e){super({...An(),...e},Dn(),wn),this.unsubscribeParentListener=this.observe("parent",n=>{if(this.unsubscribeParentListener?.(),n.type==="menu"){let i=n.store.select("rootId"),u=n.store.select("floatingTreeRoot"),a=n.store.select("keyboardEventRelay");this.unsubscribeParentListener=n.store.subscribe(()=>{let d=n.store.select("rootId"),p=n.store.select("floatingTreeRoot"),r=n.store.select("keyboardEventRelay");i===d&&u===p&&a===r||(i=d,u=p,a=r,this.notifyAll())}),this.context.allowMouseUpTriggerRef=n.store.context.allowMouseUpTriggerRef;return}n.type!==void 0&&(this.context.allowMouseUpTriggerRef=n.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,n){this.state.floatingRootContext.context.events.emit("setOpen",{open:e,eventDetails:n})}unsubscribeParentListener=null};function _n(){let t=new Do(Object.freeze(An()),Object.freeze(Dn()),wn);return Object.assign(t,{setOpen:Le})}o(_n,"createNullMenuStore");function Dn(){return{positionerRef:$e.createRef(),popupRef:$e.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:$e.createRef(),beforeContentFocusGuardRef:$e.createRef(),onOpenChangeComplete:void 0,triggerElements:new Po}}o(Dn,"createInitialContext");function An(){return{...So(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new et,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:ue,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0}}o(An,"createInitialState");var St=M(C(),1);var zt=St.createContext(void 0);function Nt(){return St.useContext(zt)}o(Nt,"useMenuSubmenuRootContext");var We=M(me(),1);var Ot=mo(o(function(e){let{children:n,open:i,onOpenChange:u,onOpenChangeComplete:a,defaultOpen:d=!1,disabled:p=!1,modal:r,loopFocus:m=!0,orientation:g="vertical",actionsRef:R,closeParentOnEsc:h=!1,handle:x,triggerId:I,defaultTriggerId:y=null,highlightItemOnHover:_=!0}=e,c=Pe(!0),f=k(!0),l=yt(!0),D=Nt(),E=U.useMemo(()=>D&&f?{type:"menu",store:f.store}:l?{type:"menubar",context:l}:c&&!f?{type:"context-menu",context:c}:{type:void 0},[c,f,l,D]),s=nr({open:d,openProp:i,activeTriggerId:y,triggerIdProp:I,parent:E});s.useControlledProp("openProp",i),s.useControlledProp("triggerIdProp",I),s.useContextCallback("onOpenChangeComplete",a);let V=wt(),b=wt(),H=s.useState("floatingTreeRoot"),A=ot(H),P=tt(),L=s.useState("open"),G=s.useState("activeTriggerElement"),z=s.useState("positionerElement"),j=s.useState("hoverEnabled"),O=s.useState("disabled"),fe=s.useState("lastOpenChangeReason"),T=s.useState("parent"),X=s.useState("activeIndex"),Ee=s.useState("payload"),ne=s.useState("floatingParentNodeId"),ge=U.useRef(null),ie=U.useRef(T.type!=="context-menu"),re=ye(),Re=U.useRef(!0),ve=ye(),xe=ne!=null,{openMethod:de,triggerProps:q}=Fo(L);s.useSyncedValues({disabled:p,highlightItemOnHover:_,modal:T.type===void 0?r:void 0,openMethod:de,rootId:V}),Io(s);let{forceUnmount:pe}=Eo(L,s,()=>{s.set("allowMouseEnter",!1)});he(()=>{c&&!f?s.update({parent:{type:"context-menu",context:c},floatingNodeId:A,floatingParentNodeId:P}):f&&s.update({floatingNodeId:A,floatingParentNodeId:P})},[c,f,A,P,s]),U.useEffect(()=>{if(L||(ge.current=null),T.type==="context-menu"){if(!L){re.clear(),ie.current=!1;return}re.start(500,()=>{ie.current=!0})}},[re,L,T.type]),he(()=>{!L&&!j&&s.set("hoverEnabled",!0)},[L,j,s]);let Y=Fe((S,$)=>{let ee=$.reason;if(!S&&!s.select("open")||L===S&&$.trigger===G&&fe===ee)return;let qn=Co($);if(!S&&$.trigger==null&&($.trigger=G??void 0),u?.(S,$),$.isCanceled)return;s.state.floatingRootContext.dispatchOpenChange(S,$);let kt=$.event;if(S===!1&&kt?.type==="click"&&kt.pointerType==="touch"&&!Re.current)return;S&&ee===v.triggerFocus?(Re.current=!1,ve.start(300,()=>{Re.current=!0})):(Re.current=!0,ve.clear());let Jt=(ee===v.triggerPress||ee===v.itemPress)&&kt.detail===0,Qn=!S&&(ee===v.escapeKey||ee==null),Xt={open:S,openChangeReason:ee};ge.current=$.event,bo(Xt,S,$.trigger,qn()),s.update(Xt),T.type==="menubar"&&(ee===v.triggerFocus||ee===v.focusOut||ee===v.triggerHover||ee===v.listNavigation||ee===v.siblingOpen)?s.set("instantType","group"):Jt||Qn?s.set("instantType",Jt?"click":"dismiss"):s.set("instantType",void 0)}),K=Ro({popupStore:s,floatingId:b,nested:P!=null,onOpenChange:Y}),ae=K.context.events;he(()=>{let S=o(({open:$,eventDetails:ee})=>Y($,ee),"handleSetOpenEvent");return ae.on("setOpen",S),()=>{ae?.off("setOpen",S)}},[ae,Y]);let De=U.useCallback(()=>{s.setOpen(!1,se(v.imperativeAction))},[s]);U.useImperativeHandle(R,()=>({unmount:pe,close:De}),[pe,De]);let we;T.type==="context-menu"&&(we=T.context),U.useImperativeHandle(we?.positionerRef,()=>z,[z]),U.useImperativeHandle(we?.actionsRef,()=>({setOpen:Y}),[Y]);let le=po(K,{enabled:!O,bubbles:{escapeKey:h&&T.type==="menu"},outsidePress(){return T.type!=="context-menu"||ge.current?.type==="contextmenu"?!0:ie.current},externalTree:xe?H:void 0}),Ae=Uo(),Ve=U.useCallback(S=>{s.select("activeIndex")!==S&&s.set("activeIndex",S)},[s]),Z=wo(K,{enabled:!O,listRef:s.context.itemDomElements,activeIndex:X,nested:T.type!==void 0,loopFocus:m,orientation:g,parentOrientation:T.type==="menubar"?T.context.orientation:void 0,rtl:Ae==="rtl",disabledIndices:Ye,onNavigate:Ve,openOnArrowKeyDown:T.type!=="context-menu",externalTree:xe?H:void 0,focusItemOnHover:_}),B=U.useCallback(S=>{s.context.typingRef.current=S},[s]),w=_o(K,{enabled:!O,listRef:s.context.itemLabels,elementsRef:s.context.itemDomElements,activeIndex:X,resetMs:500,onMatch:o(S=>{L&&S!==X&&s.set("activeIndex",S)},"onMatch"),onTyping:B}),Ie=U.useMemo(()=>{let S=Me(w.reference,Z.reference,le.reference,{onMouseMove(){s.set("allowMouseEnter",!0)}},q);return S["aria-haspopup"]="menu",S["aria-expanded"]=L,S},[s,w.reference,Z.reference,le.reference,q,L]),$n=U.useMemo(()=>{let S=Me(Z.trigger,le.trigger,q);return S["aria-haspopup"]="menu",S["aria-expanded"]=!1,S},[Z.trigger,le.trigger,q]),Wn=U.useMemo(()=>Me(xo,{id:b,role:"menu","aria-labelledby":G?.id,onMouseMove(){s.set("allowMouseEnter",!0),T.type==="menu"&&s.set("hoverEnabled",!1)},onClick(){s.select("hoverEnabled")&&s.set("hoverEnabled",!1)},onKeyDown(S){let $=s.select("keyboardEventRelay");$&&!S.isPropagationStopped()&&$(S)}},w.floating,Z.floating,le.floating),[G,b,T.type,s,w.floating,Z.floating,le.floating]),Jn=Z.item??ue;yo(s,{floatingRootContext:K,activeTriggerProps:Ie,inactiveTriggerProps:$n,popupProps:Wn,itemProps:Jn});let Xn=U.useMemo(()=>({store:s,parent:E}),[s,E]),Wt=(0,We.jsxs)(Bt.Provider,{value:Xn,children:[x&&(0,We.jsx)(Mo,{handle:x,store:s}),typeof n=="function"?n({payload:Ee}):n]});return T.type===void 0||T.type==="context-menu"?(0,We.jsx)(uo,{externalTree:H,children:Wt}):Wt},"MenuRoot"));function nr(t){return qt(()=>new Pt(t)).current}o(nr,"useMenuRootStore");var Vn=M(C(),1);var Kt=M(me(),1);function Bn(t){let e=k().store,n=Vn.useMemo(()=>({parentMenu:e}),[e]);return(0,Kt.jsx)(zt.Provider,{value:n,children:(0,Kt.jsx)(Ot,{...t})})}o(Bn,"MenuSubmenuRoot");var J=M(C(),1);var Ln=M(C(),1);function Fn(t={}){let{highlightItemOnHover:e,highlightedIndex:n,onHighlightedIndexChange:i}=it(),{ref:u,index:a}=ce(t),d=n===a,p=Ln.useRef(null),r=Xe(u,p);return{compositeProps:{tabIndex:d?0:-1,onFocus(){i(a)},onMouseMove(){let g=p.current;if(!e||!g)return;let R=g.hasAttribute("disabled")||g.ariaDisabled==="true";!d&&!R&&g.focus()}},compositeRef:r,index:a}}o(Fn,"useCompositeItem");function Gn(t){let{render:e,className:n,style:i,state:u=ue,props:a=Ye,refs:d=Ye,metadata:p,stateAttributesMapping:r,tag:m="div",...g}=t,{compositeProps:R,compositeRef:h}=Fn({metadata:p});return N(m,t,{state:u,ref:[h,...d],props:[R,...a,g],stateAttributesMapping:r})}o(Gn,"CompositeItem");function $t(t){if(Qt(t)&&t.hasAttribute("data-rootownerid"))return t.getAttribute("data-rootownerid");if(!Zt(t))return $t(eo(t))}o($t,"findRootOwnerId");var Tt=M(C(),1);function Un(t){let{enabled:e=!0,mouseDownAction:n,open:i}=t,u=Tt.useRef(!1);return Tt.useMemo(()=>e?{onMouseDown:o(a=>{(n==="open"&&!i||n==="close"&&i)&&(u.current=!0,ze(a.currentTarget).addEventListener("click",()=>{u.current=!1},{once:!0}))},"onMouseDown"),onClick:o(a=>{u.current&&(u.current=!1,a.preventBaseUIHandler())},"onClick")}:ue,[e,n,i])}o(Un,"useMixedToggleClickHandler");var ke=M(me(),1);var Hn=fo(o(function(e,n){let{render:i,className:u,style:a,disabled:d=!1,nativeButton:p=!0,id:r,openOnHover:m,delay:g=100,closeDelay:R=0,handle:h,payload:x,...I}=e,y=k(!0),c=Oo(h)??y?.store;if(!c)throw new Error(F(85));let f=te(r),l=c.useState("isTriggerActive",f),D=c.useState("floatingRootContext"),E=c.useState("isOpenedByTrigger",f),s=c.useState("triggerPopupId",f),V=J.useRef(null),b=sr(),H=it(!0),A=io(),P=J.useMemo(()=>A??new et,[A]),L=ot(P),G=tt(),{registerTrigger:z,isMountedByThisTrigger:j}=vo(f,V,c,{payload:x,closeDelay:R,parent:b,floatingTreeRoot:P,floatingNodeId:L,floatingParentNodeId:G,keyboardEventRelay:H?.relayKeyboardEvent}),O=b.type==="menubar",fe=c.useState("disabled"),T=d||fe||O&&b.context.disabled,{getButtonProps:X,buttonRef:Ee}=Ue({disabled:T,native:p});J.useEffect(()=>{!E&&b.type===void 0&&(c.context.allowMouseUpTriggerRef.current=!1)},[c,E,b.type]);let ne=J.useRef(null),ge=ye(),ie=Fe(B=>{if(!ne.current)return;ge.clear(),c.context.allowMouseUpTriggerRef.current=!1;let w=B.target;_t(ne.current,w)||_t(c.select("positionerElement"),w)||w===ne.current||w!=null&&$t(w)===c.select("rootId")||en(B,ne.current)||P.events.emit("close",{domEvent:B,reason:v.cancelOpen})});J.useEffect(()=>{E&&c.select("lastOpenChangeReason")===v.triggerHover&&ze(ne.current).addEventListener("mouseup",ie,{once:!0})},[E,ie,c]);let re=O&&b.context.hasSubmenuOpen,ve=rt(D,{enabled:(m??re)&&!T&&(!O||re&&!j),handleClose:st({blockPointerEvents:!O}),mouseOnly:!0,move:!1,restMs:b.type===void 0?g:void 0,delay:{close:R},triggerElementRef:V,externalTree:P,isActiveTrigger:l,isClosing:o(()=>c.select("transitionStatus")==="ending","isClosing")}),xe=rr(E,c.select("lastOpenChangeReason")),de=nt(D,{enabled:!T,event:E&&O?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:b.type===void 0?xe:!1}),q=To(D,{enabled:!T&&re}),pe=Un({open:E,enabled:O,mouseDownAction:"open"}),Y=J.useMemo(()=>Me(q.reference,de.reference),[q.reference,de.reference]),K=c.useState("triggerProps",j),{preFocusGuardRef:ae,handlePreFocusGuardFocus:De,handleFocusTargetFocus:we}=Lo(c,V),le={disabled:T,open:E},Ae=[ne,n,Ee,z,V],Ve=[Y,ve??ue,K,{"aria-haspopup":"menu","aria-controls":s,id:f,onMouseDown:o(B=>{if(c.select("open"))return;ge.start(200,()=>{c.context.allowMouseUpTriggerRef.current=!0}),ze(B.currentTarget).addEventListener("mouseup",ie,{once:!0})},"onMouseDown")},O?{role:"menuitem"}:{},pe,I,X],Z=N("button",e,{enabled:!O,stateAttributesMapping:At,state:le,ref:Ae,props:Ve});return O?(0,ke.jsx)(Gn,{tag:"button",render:i,className:u,style:a,state:le,refs:Ae,props:Ve,stateAttributesMapping:At}):E?(0,ke.jsxs)(J.Fragment,{children:[(0,ke.jsx)(Dt,{ref:ae,onFocus:De},`${f}-pre-focus-guard`),(0,ke.jsx)(J.Fragment,{children:Z},f),(0,ke.jsx)(Dt,{ref:c.context.triggerFocusTargetRef,onFocus:we},`${f}-post-focus-guard`)]}):(0,ke.jsx)(J.Fragment,{children:Z},f)},"MenuTrigger"));function rr(t,e){let n=ye(),[i,u]=J.useState(!1);return he(()=>{t&&e===v.triggerHover?(u(!0),n.start(500,()=>{u(!1)})):t||(n.clear(),u(!1))},[t,e,n]),i}o(rr,"useStickIfOpen");function sr(){let t=yt(!0);return J.useMemo(()=>t?{type:"menubar",context:t}:{type:void 0},[t])}o(sr,"useMenuParent");var jn=M(C(),1);var Yn=jn.forwardRef(o(function(e,n){let{render:i,className:u,style:a,children:d,...p}=e,{store:r}=k(),{side:m}=W(),g=r.useState("instantType"),{children:R,state:h}=Xo({store:r,side:m,children:d}),x={activationDirection:h.activationDirection,transitioning:h.transitioning,instant:g};return N("div",e,{state:x,ref:n,props:[p,{children:R}],stateAttributesMapping:Jo})},"MenuViewport"));var Ce=M(C(),1);var ir={"aria-expanded":void 0},zn=Ce.forwardRef(o(function(e,n){let{render:i,className:u,style:a,label:d,id:p,nativeButton:r=!1,openOnHover:m=!0,delay:g=100,closeDelay:R=0,disabled:h=!1,...x}=e,I=Nt();if(!I?.parentMenu)throw new Error(F(37));let y=ce({guess:!0,label:d}),_=W(),{store:c}=k(),f=te(p),l=c.useState("open"),D=c.useState("floatingRootContext"),E=c.useState("floatingTreeRoot"),s=c.useState("triggerPopupId",f),V=ho(f,c),b=Ce.useCallback(Y=>{let K=V(Y);return Y!==null&&c.select("open")&&c.select("activeTriggerId")==null&&c.update({activeTriggerId:f,activeTriggerElement:Y,closeDelay:R}),K},[V,R,c,f]),H=Ce.useRef(null),A=Ce.useCallback(Y=>{H.current=Y,c.set("activeTriggerElement",Y)},[c]);c.useSyncedValue("closeDelay",R);let P=I.parentMenu,L=c.useState("disabled"),G=P.useState("disabled"),z=h||L||G,j=P.useState("itemProps"),O=P.useState("isActive",y.index),fe=Ce.useMemo(()=>({type:"submenu-trigger",setActive(){P.select("highlightItemOnHover")&&P.set("activeIndex",y.index)}}),[P,y.index]),{getItemProps:T,itemRef:X}=Ne({closeOnClick:!1,disabled:z,highlighted:O,id:f,store:c,typingRef:P.context.typingRef,nativeButton:r,itemMetadata:fe,nodeId:_?.context.nodeId}),Ee=c.useState("hoverEnabled"),ne=rt(D,{enabled:Ee&&m&&!z,handleClose:st({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:g,delay:{open:g,close:R},shouldOpen:g>0?()=>P.select("allowMouseEnter"):void 0,triggerElementRef:H,externalTree:E,isClosing:o(()=>c.select("transitionStatus")==="ending","isClosing"),guardStaleOpen:!0}),ie=nt(D,{enabled:!z,event:"mousedown",toggle:!m,ignoreMouse:m,stickIfOpen:!1}).reference??ue,re=c.useState("triggerProps",!0);delete re.id;let Re={disabled:z,highlighted:O,open:l},ve=c.useState("openMethod"),de=c.useState("lastOpenChangeReason")===v.listNavigation||ve==="keyboard",q=l&&de&&qe.screenReader.voiceOver;return N("div",e,{state:Re,stateAttributesMapping:Vo,props:[ie,ne,re,j,q?ir:void 0,{"aria-controls":s,tabIndex:l||O?0:-1,onBlur(){O&&P.set("activeIndex",null)}},x,T],ref:[n,y.ref,X,b,A]})},"MenuSubmenuTrigger"));var Je=class extends lo{static{o(this,"MenuHandle")}constructor(){super(_n(),"Menu")}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function Kn(){return new Je}o(Kn,"createMenuHandle");var Q=M(me(),1);function Hc(t){let e=(0,_e.c)(4),n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=(0,Q.jsx)(oe.Root,{"data-slot":"dropdown-menu",...n}),e[2]=n,e[3]=i):i=e[3],i}o(Hc,"N");function jc(t){let e=(0,_e.c)(4),n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=(0,Q.jsx)(oe.Trigger,{"data-slot":"dropdown-menu-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}o(jc,"z");function Yc({align:t="start",alignOffset:e=0,side:n="bottom",sideOffset:i=4,className:u,...a}){return(0,Q.jsx)(oe.Portal,{children:(0,Q.jsx)(oe.Positioner,{className:"isolate z-50 outline-none",align:t,alignOffset:e,side:n,sideOffset:i,children:(0,Q.jsx)(oe.Popup,{"data-slot":"dropdown-menu-content",className:Be("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none 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-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95 animate-none! relative bg-popover before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!",u),...a})})})}o(Yc,"D");function zc(t){let e=(0,_e.c)(4),n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=(0,Q.jsx)(oe.Group,{"data-slot":"dropdown-menu-group",...n}),e[2]=n,e[3]=i):i=e[3],i}o(zc,"M");function Kc(t){let e=(0,_e.c)(10),n,i,u;e[0]!==t?({className:n,inset:i,...u}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=u):(n=e[1],i=e[2],u=e[3]);let a;e[4]!==n?(a=Be("px-2 py-2 text-xs text-muted-foreground data-inset:ps-7",n),e[4]=n,e[5]=a):a=e[5];let d;return e[6]!==i||e[7]!==u||e[8]!==a?(d=(0,Q.jsx)(oe.GroupLabel,{"data-slot":"dropdown-menu-label","data-inset":i,className:a,...u}),e[6]=i,e[7]=u,e[8]=a,e[9]=d):d=e[9],d}o(Kc,"y");function $c({className:t,inset:e,variant:n="default",...i}){return(0,Q.jsx)(oe.Item,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":n,className:Be("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-md px-2 py-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:ps-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",t),...i})}o($c,"I");function Wc(t){let e=(0,_e.c)(15),n,i,u,a,d;e[0]!==t?({className:u,children:i,checked:n,inset:a,...d}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=u,e[4]=a,e[5]=d):(n=e[1],i=e[2],u=e[3],a=e[4],d=e[5]);let p;e[6]!==u?(p=Be("relative flex cursor-default items-center gap-2 rounded-md py-2 pe-8 ps-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:ps-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",u),e[6]=u,e[7]=p):p=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=(0,Q.jsx)("span",{className:"pointer-events-none absolute end-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:(0,Q.jsx)(oe.CheckboxItemIndicator,{children:(0,Q.jsx)(Qo,{icon:qo,strokeWidth:2})})}),e[8]=r):r=e[8];let m;return e[9]!==n||e[10]!==i||e[11]!==a||e[12]!==d||e[13]!==p?(m=(0,Q.jsxs)(oe.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item","data-inset":a,className:p,checked:n,...d,children:[r,i]}),e[9]=n,e[10]=i,e[11]=a,e[12]=d,e[13]=p,e[14]=m):m=e[14],m}o(Wc,"_");function Jc(t){let e=(0,_e.c)(8),n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let u;e[3]!==n?(u=Be("-mx-1 h-px bg-border",n),e[3]=n,e[4]=u):u=e[4];let a;return e[5]!==i||e[6]!==u?(a=(0,Q.jsx)(oe.Separator,{"data-slot":"dropdown-menu-separator",className:u,...i}),e[5]=i,e[6]=u,e[7]=a):a=e[7],a}o(Jc,"C");export{Hc as a,jc as b,Yc as c,zc as d,Kc as e,$c as f,Wc as g,Jc as h};
|
|
1
|
+
import{a as ce,b as Zo,c as en}from"./chunk-TWTNWOJU.js";import{a as tn}from"./chunk-WQYWA7U6.js";import{a as lo,b as So,d as No,e as Oo,f as Do,g as Lo,h as Jo,i as Xo}from"./chunk-7RIRJD2P.js";import{$ as ko,A as nt,C as po,E as mo,F as fo,H as go,J as Ro,K as xo,N as Mo,O as ho,P as bo,Q as Co,S as vo,T as Io,U as Eo,V as yo,X as Po,Z as To,aa as rt,ba as wo,ca as _o,da as st,ea as Vo,fa as At,ga as Bo,ha as at,ja as Fo,ka as Go,ma as Ho,n as Dt,na as jo,oa as Yo,p as no,pa as zo,q as ro,ra as Ko,s as so,sa as $o,t as et,ta as Wo,u as tt,v as io,w as ot,x as ao,y as uo,z as co}from"./chunk-C3TOZ4LG.js";import{b as Uo}from"./chunk-D27D4UUI.js";import{i as qo,k as Qo}from"./chunk-FO26ZU7E.js";import{B as ye,G as to,H as Ge,J as oo,K as Qe,L as Ze,N as v,O as se,d as wt,e as te,h as qe,o as _t}from"./chunk-46ZJ3TM4.js";import{a as it,b as Ao,c as Ue}from"./chunk-TGHH7ZFA.js";import{a as he,c as Fe,i as Qt,q as Zt,t as eo,w as ze}from"./chunk-5GFSKIB2.js";import{a as Me,c as F,d as qt,e as Xe,g as Le,h as Ye,i as ue,j as N}from"./chunk-25NFR6EB.js";import{a as o,c as Zn,d as M,e as C,f as er,g as me,i as Be}from"./chunk-YKXDMIHQ.js";var _e=M(er(),1);var oe={};Zn(oe,{Arrow:()=>nn,Backdrop:()=>sn,CheckboxItem:()=>dn,CheckboxItemIndicator:()=>pn,Group:()=>fn,GroupLabel:()=>Rn,Handle:()=>Je,Item:()=>Mn,LinkItem:()=>hn,Popup:()=>Cn,Portal:()=>En,Positioner:()=>yn,RadioGroup:()=>Sn,RadioItem:()=>Tn,RadioItemIndicator:()=>kn,Root:()=>Ot,Separator:()=>tn,SubmenuRoot:()=>Bn,SubmenuTrigger:()=>zn,Trigger:()=>Hn,Viewport:()=>Yn,createHandle:()=>Kn});var on=M(C(),1);var ut=M(C(),1);var Vt=ut.createContext(void 0);function W(t){let e=ut.useContext(Vt);if(e===void 0&&!t)throw new Error(F(33));return e}o(W,"useMenuPositionerContext");var ct=M(C(),1);var Bt=ct.createContext(void 0);function k(t){let e=ct.useContext(Bt);if(e===void 0&&!t)throw new Error(F(36));return e}o(k,"useMenuRootContext");var nn=on.forwardRef(o(function(e,n){let{render:i,className:u,style:a,...d}=e,{store:p}=k(),{arrowRef:r,side:m,align:g,arrowUncentered:R,arrowStyles:h}=W(),I={open:p.useState("open"),side:m,align:g,uncentered:R};return N("div",e,{ref:[r,n],stateAttributesMapping:Bo,state:I,props:{style:h,"aria-hidden":!0,...d}})},"MenuArrow"));var rn=M(C(),1);var dt=M(C(),1);var tr=dt.createContext(void 0);function Pe(t=!0){let e=dt.useContext(tr);if(e===void 0&&!t)throw new Error(F(25));return e}o(Pe,"useContextMenuRootContext");var sn=rn.forwardRef(o(function(e,n){let{render:i,className:u,style:a,...d}=e,{store:p}=k(),r=p.useState("open"),m=p.useState("mounted"),g=p.useState("transitionStatus"),R=p.useState("lastOpenChangeReason"),h=Pe(),x={open:r,transitionStatus:g};return N("div",e,{ref:h?.backdropRef?[n,h.backdropRef]:n,state:x,stateAttributesMapping:at,props:[{role:"presentation",hidden:!m,style:{pointerEvents:R===v.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},d]})},"MenuBackdrop"));var mt=M(C(),1);var pt=M(C(),1);var Lt=pt.createContext(void 0);function an(){let t=pt.useContext(Lt);if(t===void 0)throw new Error(F(30));return t}o(an,"useMenuCheckboxItemContext");var He=M(C(),1);var un=M(C(),1);function lt(t){let{closeOnClick:e,highlighted:n,id:i,nodeId:u,store:a,typingRef:d,itemRef:p,itemMetadata:r}=t,{events:m}=a.useState("floatingTreeRoot"),g=a.useState("open"),R=Pe(!0),h=R!==void 0;return un.useMemo(()=>({id:i,role:"menuitem",tabIndex:g&&n?0:-1,onKeyDown(x){x.key===" "&&d?.current&&x.preventDefault()},onMouseMove(x){u&&m.emit("itemhover",{nodeId:u,target:x.currentTarget})},onClick(x){e&&m.emit("close",{domEvent:x,reason:v.itemPress})},onMouseUp(x){if(R){let I=R.initialCursorPointRef.current;if(R.initialCursorPointRef.current=null,h&&I&&Math.abs(x.clientX-I.x)<=1&&Math.abs(x.clientY-I.y)<=1||h&&!qe.os.mac&&x.button===2)return}p.current&&a.context.allowMouseUpTriggerRef.current&&(!h||x.button===2)&&r.type==="regular-item"&&Ao(p.current,x,{detail:1})}}),[e,n,i,m,u,g,a,d,p,R,h,r])}o(lt,"useMenuItemCommonProps");var Se={type:"regular-item"};function Ne(t){let{closeOnClick:e,disabled:n,highlighted:i,id:u,store:a,typingRef:d=a.context.typingRef,nativeButton:p,itemMetadata:r,nodeId:m}=t,g=He.useRef(null),{getButtonProps:R,buttonRef:h}=Ue({disabled:n,focusableWhenDisabled:!0,native:p,composite:!0}),x=lt({closeOnClick:e,highlighted:i,id:u,nodeId:m,store:a,typingRef:d,itemRef:g,itemMetadata:r}),I=He.useCallback(_=>Me(x,{onMouseEnter(){r.type==="submenu-trigger"&&r.setActive()}},_,R),[x,R,r]),y=Xe(g,h);return He.useMemo(()=>({getItemProps:I,itemRef:y}),[I,y])}o(Ne,"useMenuItem");var Ft=(function(t){return t.checked="data-checked",t.unchecked="data-unchecked",t.disabled="data-disabled",t.highlighted="data-highlighted",t})({});var Oe={checked(t){return t?{[Ft.checked]:""}:{[Ft.unchecked]:""}},...oo};var cn=M(me(),1);var dn=mt.forwardRef(o(function(e,n){let{render:i,className:u,id:a,label:d,nativeButton:p=!1,disabled:r=!1,closeOnClick:m=!1,checked:g,defaultChecked:R,onCheckedChange:h,style:x,...I}=e,y=ce({guess:!0,label:d}),_=W(!0),c=te(a),{store:f}=k(),l=f.useState("disabled"),D=r||l,E=f.useState("isActive",y.index),s=f.useState("itemProps"),[V,b]=Ze({controlled:g,default:R??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:H,itemRef:A}=Ne({closeOnClick:m,disabled:D,highlighted:E,id:c,store:f,nativeButton:p,nodeId:_?.context.nodeId,itemMetadata:Se}),P=mt.useMemo(()=>({disabled:D,highlighted:E,checked:V}),[D,E,V]);function L(z){let j=se(v.itemPress,z.nativeEvent,void 0,{preventUnmountOnClose:Le});h?.(!V,j),!j.isCanceled&&b(O=>!O)}o(L,"handleClick");let G=N("div",e,{state:P,stateAttributesMapping:Oe,props:[s,{role:"menuitemcheckbox","aria-checked":V,onClick:L},I,H],ref:[A,n,y.ref]});return(0,cn.jsx)(Lt.Provider,{value:P,children:G})},"MenuCheckboxItem"));var ft=M(C(),1);var pn=ft.forwardRef(o(function(e,n){let{render:i,className:u,style:a,keepMounted:d=!1,...p}=e,r=an(),m=ft.useRef(null),{transitionStatus:g,mounted:R,setMounted:h}=Qe(r.checked);Ge({open:r.checked,ref:m,onComplete(){r.checked||h(!1)}});let x={checked:r.checked,disabled:r.disabled,highlighted:r.highlighted,transitionStatus:g};return N("span",e,{state:x,ref:[n,m],stateAttributesMapping:Oe,props:{"aria-hidden":!0,...p},enabled:d||R})},"MenuCheckboxItemIndicator"));var Rt=M(C(),1);var gt=M(C(),1);var Ke=gt.createContext(void 0);function ln(){let t=gt.useContext(Ke);if(t===void 0)throw new Error(F(31));return t}o(ln,"useMenuGroupRootContext");var mn=M(me(),1);var fn=Rt.forwardRef(o(function(e,n){let{render:i,className:u,style:a,...d}=e,[p,r]=Rt.useState(void 0),m=N("div",e,{ref:n,props:{role:"group","aria-labelledby":p,...d}});return(0,mn.jsx)(Ke.Provider,{value:r,children:m})},"MenuGroup"));var gn=M(C(),1);var Rn=gn.forwardRef(o(function(e,n){let{render:i,className:u,style:a,id:d,...p}=e,r=te(d),m=ln();return he(()=>(m(r),()=>{m(g=>g===r?void 0:g)}),[m,r]),N("div",e,{ref:n,props:{id:r,role:"presentation",...p}})},"MenuGroupLabel"));var xn=M(C(),1);var Mn=xn.forwardRef(o(function(e,n){let{render:i,className:u,id:a,label:d,nativeButton:p=!1,disabled:r=!1,closeOnClick:m=!0,style:g,...R}=e,h=ce({guess:!0,label:d}),x=W(!0),I=te(a),{store:y}=k(),_=y.useState("disabled"),c=r||_,f=y.useState("isActive",h.index),l=y.useState("itemProps"),{getItemProps:D,itemRef:E}=Ne({closeOnClick:m,disabled:c,highlighted:f,id:I,store:y,nativeButton:p,nodeId:x?.context.nodeId,itemMetadata:Se});return N("div",e,{state:{disabled:c,highlighted:f},props:[l,R,D],ref:[E,n,h.ref]})},"MenuItem"));var xt=M(C(),1);var hn=xt.forwardRef(o(function(e,n){let{render:i,className:u,id:a,label:d,closeOnClick:p=!1,style:r,...m}=e,g=xt.useRef(null),R=ce({guess:!0,label:d}),x=W(!0)?.context.nodeId,I=te(a),{store:y}=k(),_=y.useState("isActive",R.index),c=y.useState("itemProps"),f=y.context.typingRef,{getButtonProps:l,buttonRef:D}=Ue({native:!1,composite:!0}),E=lt({closeOnClick:p,highlighted:_,id:I,nodeId:x,store:y,typingRef:f,itemRef:g,itemMetadata:Se});function s(b){return Me(E,b,l)}return o(s,"getItemProps"),N("a",e,{state:{highlighted:_},props:[c,m,s],ref:[g,D,n,R.ref]})},"MenuLinkItem"));var Mt=M(C(),1);var bn=M(me(),1);var Cn=Mt.forwardRef(o(function(e,n){let{render:i,className:u,style:a,finalFocus:d,...p}=e,{store:r}=k(),{side:m,align:g}=W(),R=Wo(!0)!=null,h=r.useState("open"),x=r.useState("transitionStatus"),I=r.useState("popupProps"),y=r.useState("mounted"),_=r.useState("instantType"),c=r.useState("activeTriggerElement"),f=r.useState("parent"),l=r.useState("lastOpenChangeReason"),D=r.useState("rootId"),E=r.useState("floatingRootContext"),s=r.useState("floatingTreeRoot"),V=r.useState("closeDelay"),b=r.useState("hoverEnabled"),H=r.useState("disabled"),A=r.useState("openMethod"),P=f.type==="context-menu";Ge({open:h,ref:r.context.popupRef,onComplete(){h&&r.context.onOpenChangeComplete?.(!0)}}),Mt.useEffect(()=>{function O(fe){r.setOpen(!1,se(fe.reason,fe.domEvent))}return o(O,"handleClose"),s.events.on("close",O),()=>{s.events.off("close",O)}},[s.events,r]),ko(E,{enabled:b&&!H&&!P&&f.type!=="menubar",closeDelay:V});let L=r.useStateSetter("popupElement"),G={transitionStatus:x,side:m,align:g,open:h,nested:f.type==="menu",instant:_},z=N("div",e,{state:G,ref:[n,r.context.popupRef,L],stateAttributesMapping:at,props:[I,{onKeyDown(O){R&&$o.has(O.key)&&O.stopPropagation()}},Yo(x),p,{"data-rootownerid":D}]}),j=f.type===void 0||P;return(c||f.type==="menubar"&&l!==v.outsidePress)&&(j=!0),(0,bn.jsx)(co,{context:E,openInteractionType:A,modal:P,disabled:!y,returnFocus:d===void 0?j:d,initialFocus:f.type!=="menu",restoreFocus:!0,externalTree:f.type!=="menubar"?s:void 0,previousFocusableElement:c,nextFocusableElement:f.type===void 0?r.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:f.type===void 0?r.context.beforeContentFocusGuardRef:void 0,children:z})},"MenuPopup"));var In=M(C(),1);var ht=M(C(),1);var Gt=ht.createContext(void 0);function vn(){let t=ht.useContext(Gt);if(t===void 0)throw new Error(F(32));return t}o(vn,"useMenuPortalContext");var Ut=M(me(),1);var En=In.forwardRef(o(function(e,n){let{keepMounted:i=!1,...u}=e,{store:a}=k();return a.useState("mounted")||i?(0,Ut.jsx)(Gt.Provider,{value:i,children:(0,Ut.jsx)(so,{ref:n,...u})}):null},"MenuPortal"));var be=M(C(),1);var je=M(me(),1);var yn=be.forwardRef(o(function(e,n){let{anchor:i,positionMethod:u="absolute",className:a,render:d,side:p,align:r,sideOffset:m=0,alignOffset:g=0,collisionBoundary:R="clipping-ancestors",collisionPadding:h=5,arrowPadding:x=5,sticky:I=!1,disableAnchorTracking:y=!1,collisionAvoidance:_=no,style:c,...f}=e,{store:l}=k(),D=vn(),E=Pe(!0),s=l.useState("parent"),V=l.useState("floatingRootContext"),b=l.useState("floatingTreeRoot"),H=l.useState("mounted"),A=l.useState("open"),P=l.useState("modal"),L=l.useState("openMethod"),G=l.useState("activeTriggerElement"),z=l.useState("transitionStatus"),j=l.useState("positionerElement"),O=l.useState("instantType"),fe=l.useState("adaptiveOrigin"),T=l.useState("lastOpenChangeReason"),X=l.useState("floatingNodeId"),Ee=l.useState("floatingParentNodeId"),ne=V.useState("domReferenceElement"),ge=be.useRef(null),ie=to(j),re=i,Re=m,ve=g,xe=r,de=_;s.type==="context-menu"&&(re=i??s.context?.anchor,xe=xe??"start",!p&&xe!=="center"&&(ve=e.alignOffset??2,Re=e.sideOffset??-5));let q=p,pe=xe;s.type==="menu"?(q=q??"inline-end",pe=pe??"start",de=e.collisionAvoidance??ro):s.type==="menubar"&&(q=q??(s.context.orientation==="vertical"?"inline-end":"bottom"),pe=pe??"start");let Y=s.type==="context-menu",K=Ho({anchor:re,floatingRootContext:V,positionMethod:E?"fixed":u,mounted:H,side:q,sideOffset:Re,align:pe,alignOffset:ve,arrowPadding:Y?0:x,collisionBoundary:R,collisionPadding:h,sticky:I,nodeId:X,keepMounted:D,disableAnchorTracking:y,collisionAvoidance:de,shift:Y?{crossAxis:!("side"in de&&de.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:b,adaptiveOrigin:fe});be.useEffect(()=>{function B(w){w.open&&(w.parentNodeId===X&&l.set("hoverEnabled",!1),w.nodeId!==X&&w.parentNodeId===l.select("floatingParentNodeId")&&l.setOpen(!1,se(v.siblingOpen)))}return o(B,"onMenuOpenChange"),b.events.on("menuopenchange",B),()=>{b.events.off("menuopenchange",B)}},[l,b.events,X]),be.useEffect(()=>{if(l.select("floatingParentNodeId")==null)return;function B(w){if(w.open||w.nodeId!==l.select("floatingParentNodeId"))return;let Ie=w.reason??v.siblingOpen;l.setOpen(!1,se(Ie))}return o(B,"onParentClose"),b.events.on("menuopenchange",B),()=>{b.events.off("menuopenchange",B)}},[b.events,l]);let ae=ye();be.useEffect(()=>{A||ae.clear()},[A,ae]),be.useEffect(()=>{function B(w){if(!(!A||w.nodeId!==l.select("floatingParentNodeId")))if(w.target&&G&&G!==w.target){let Ie=l.select("closeDelay");Ie>0?ae.isStarted()||ae.start(Ie,()=>{l.setOpen(!1,se(v.siblingOpen))}):l.setOpen(!1,se(v.siblingOpen))}else ae.clear()}return o(B,"onItemHover"),b.events.on("itemhover",B),()=>{b.events.off("itemhover",B)}},[b.events,A,G,l,ae]),be.useEffect(()=>{let B={open:A,nodeId:X,parentNodeId:Ee,reason:l.select("lastOpenChangeReason")};b.events.emit("menuopenchange",B)},[b.events,A,l,X,Ee]),he(()=>{let B=ne,w=ge.current;if(B&&(ge.current=B),w&&B&&B!==w){l.set("instantType",void 0);let Ie=new AbortController;return ie(()=>{l.set("instantType","trigger-change")},Ie.signal),()=>{Ie.abort()}}},[ne,ie,l]);let De={open:A,side:K.side,align:K.align,anchorHidden:K.anchorHidden,nested:s.type==="menu",instant:O},we=s.type==="menubar"&&s.context.modal,le=P&&T!==v.triggerHover;Ko(A&&(we||le),L==="touch",j,G);let Ae=zo(e,De,{styles:K.positionerStyles,transitionStatus:z,props:f,refs:[n,l.useStateSetter("positionerElement")],hidden:!H,inert:!A}),Ve=H&&s.type!=="menu"&&(s.type!=="menubar"&&P&&T!==v.triggerHover||s.type==="menubar"&&s.context.modal),Z=null;return s.type==="menubar"?Z=s.context.contentElement:s.type===void 0&&(Z=G),(0,je.jsxs)(Vt.Provider,{value:K,children:[Ve&&(0,je.jsx)(jo,{ref:s.type==="context-menu"||s.type==="nested-context-menu"?s.context.internalBackdropRef:null,inert:Go(!A),cutout:Z}),(0,je.jsx)(ao,{id:X,children:(0,je.jsx)(Zo,{elementsRef:l.context.itemDomElements,labelsRef:l.context.itemLabels,children:Ae})})]})},"MenuPositioner"));var Te=M(C(),1);var bt=M(C(),1);var Ht=bt.createContext(void 0);function Pn(){let t=bt.useContext(Ht);if(t===void 0)throw new Error(F(34));return t}o(Pn,"useMenuRadioGroupContext");var jt=M(me(),1);var Sn=Te.memo(Te.forwardRef(o(function(e,n){let{render:i,className:u,value:a,defaultValue:d,onValueChange:p,disabled:r=!1,style:m,"aria-labelledby":g,...R}=e,[h,x]=Te.useState(void 0),[I,y]=Ze({controlled:a,default:d,name:"MenuRadioGroup"}),_=Fe((D,E)=>{p?.(D,E),!E.isCanceled&&y(D)}),f=N("div",e,{state:{disabled:r},ref:n,props:{role:"group","aria-labelledby":g??h,"aria-disabled":r||void 0,...R}}),l=Te.useMemo(()=>({value:I,setValue:_,disabled:r}),[I,_,r]);return(0,jt.jsx)(Ke.Provider,{value:x,children:(0,jt.jsx)(Ht.Provider,{value:l,children:f})})},"MenuRadioGroup")));var vt=M(C(),1);var Ct=M(C(),1);var Yt=Ct.createContext(void 0);function Nn(){let t=Ct.useContext(Yt);if(t===void 0)throw new Error(F(35));return t}o(Nn,"useMenuRadioItemContext");var On=M(me(),1);var Tn=vt.forwardRef(o(function(e,n){let{render:i,className:u,id:a,label:d,nativeButton:p=!1,disabled:r=!1,closeOnClick:m=!1,value:g,style:R,...h}=e,x=ce({guess:!0,label:d}),I=W(!0),y=te(a),{store:_}=k(),c=_.useState("isActive",x.index),f=_.useState("itemProps"),{value:l,setValue:D,disabled:E}=Pn(),s=_.useState("disabled"),V=r||E||s,b=l===g,{getItemProps:H,itemRef:A}=Ne({closeOnClick:m,disabled:V,highlighted:c,id:y,store:_,nativeButton:p,nodeId:I?.context.nodeId,itemMetadata:Se}),P=vt.useMemo(()=>({disabled:V,highlighted:c,checked:b}),[V,c,b]);function L(z){let j=se(v.itemPress,z.nativeEvent,void 0,{preventUnmountOnClose:Le});D(g,j)}o(L,"handleClick");let G=N("div",e,{state:P,stateAttributesMapping:Oe,props:[f,{role:"menuitemradio","aria-checked":b,onClick:L},h,H],ref:[A,n,x.ref]});return(0,On.jsx)(Yt.Provider,{value:P,children:G})},"MenuRadioItem"));var It=M(C(),1);var kn=It.forwardRef(o(function(e,n){let{render:i,className:u,style:a,keepMounted:d=!1,...p}=e,r=Nn(),m=It.useRef(null),{transitionStatus:g,mounted:R,setMounted:h}=Qe(r.checked);Ge({open:r.checked,ref:m,onComplete(){r.checked||h(!1)}});let x={checked:r.checked,disabled:r.disabled,highlighted:r.highlighted,transitionStatus:g};return N("span",e,{state:x,stateAttributesMapping:Oe,ref:[n,m],props:{"aria-hidden":!0,...p},enabled:d||R})},"MenuRadioItemIndicator"));var U=M(C(),1);var Et=M(C(),1);var or=Et.createContext(null);function yt(t){let e=Et.useContext(or);if(e===null&&!t)throw new Error(F(5));return e}o(yt,"useMenubarContext");var $e=M(C(),1);var wn={...No,disabled:o(t=>t.parent.type==="menubar"&&t.parent.context.disabled||t.disabled,"disabled"),modal:o(t=>(t.parent.type===void 0||t.parent.type==="context-menu")&&(t.modal??!0),"modal"),openMethod:o(t=>t.openMethod,"openMethod"),allowMouseEnter:o(t=>t.allowMouseEnter,"allowMouseEnter"),highlightItemOnHover:o(t=>t.highlightItemOnHover,"highlightItemOnHover"),parent:o(t=>t.parent,"parent"),rootId:o(t=>t.parent.type==="menu"?t.parent.store.select("rootId"):t.parent.type!==void 0?t.parent.context.rootId:t.rootId,"rootId"),activeIndex:o(t=>t.activeIndex,"activeIndex"),isActive:o((t,e)=>t.activeIndex===e,"isActive"),hoverEnabled:o(t=>t.hoverEnabled,"hoverEnabled"),instantType:o(t=>t.instantType,"instantType"),lastOpenChangeReason:o(t=>t.openChangeReason,"lastOpenChangeReason"),floatingTreeRoot:o(t=>t.parent.type==="menu"?t.parent.store.select("floatingTreeRoot"):t.floatingTreeRoot,"floatingTreeRoot"),floatingNodeId:o(t=>t.floatingNodeId,"floatingNodeId"),floatingParentNodeId:o(t=>t.floatingParentNodeId,"floatingParentNodeId"),itemProps:o(t=>t.itemProps,"itemProps"),closeDelay:o(t=>t.closeDelay,"closeDelay"),adaptiveOrigin:o(t=>t.adaptiveOrigin,"adaptiveOrigin"),keyboardEventRelay:o(t=>{if(t.keyboardEventRelay)return t.keyboardEventRelay;if(t.parent.type==="menu")return t.parent.store.select("keyboardEventRelay")},"keyboardEventRelay")},Pt=class extends go{static{o(this,"MenuStore")}constructor(e){super({...An(),...e},Dn(),wn),this.unsubscribeParentListener=this.observe("parent",n=>{if(this.unsubscribeParentListener?.(),n.type==="menu"){let i=n.store.select("rootId"),u=n.store.select("floatingTreeRoot"),a=n.store.select("keyboardEventRelay");this.unsubscribeParentListener=n.store.subscribe(()=>{let d=n.store.select("rootId"),p=n.store.select("floatingTreeRoot"),r=n.store.select("keyboardEventRelay");i===d&&u===p&&a===r||(i=d,u=p,a=r,this.notifyAll())}),this.context.allowMouseUpTriggerRef=n.store.context.allowMouseUpTriggerRef;return}n.type!==void 0&&(this.context.allowMouseUpTriggerRef=n.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,n){this.state.floatingRootContext.context.events.emit("setOpen",{open:e,eventDetails:n})}unsubscribeParentListener=null};function _n(){let t=new Do(Object.freeze(An()),Object.freeze(Dn()),wn);return Object.assign(t,{setOpen:Le})}o(_n,"createNullMenuStore");function Dn(){return{positionerRef:$e.createRef(),popupRef:$e.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:$e.createRef(),beforeContentFocusGuardRef:$e.createRef(),onOpenChangeComplete:void 0,triggerElements:new Po}}o(Dn,"createInitialContext");function An(){return{...So(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new et,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:ue,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0}}o(An,"createInitialState");var St=M(C(),1);var zt=St.createContext(void 0);function Nt(){return St.useContext(zt)}o(Nt,"useMenuSubmenuRootContext");var We=M(me(),1);var Ot=mo(o(function(e){let{children:n,open:i,onOpenChange:u,onOpenChangeComplete:a,defaultOpen:d=!1,disabled:p=!1,modal:r,loopFocus:m=!0,orientation:g="vertical",actionsRef:R,closeParentOnEsc:h=!1,handle:x,triggerId:I,defaultTriggerId:y=null,highlightItemOnHover:_=!0}=e,c=Pe(!0),f=k(!0),l=yt(!0),D=Nt(),E=U.useMemo(()=>D&&f?{type:"menu",store:f.store}:l?{type:"menubar",context:l}:c&&!f?{type:"context-menu",context:c}:{type:void 0},[c,f,l,D]),s=nr({open:d,openProp:i,activeTriggerId:y,triggerIdProp:I,parent:E});s.useControlledProp("openProp",i),s.useControlledProp("triggerIdProp",I),s.useContextCallback("onOpenChangeComplete",a);let V=wt(),b=wt(),H=s.useState("floatingTreeRoot"),A=ot(H),P=tt(),L=s.useState("open"),G=s.useState("activeTriggerElement"),z=s.useState("positionerElement"),j=s.useState("hoverEnabled"),O=s.useState("disabled"),fe=s.useState("lastOpenChangeReason"),T=s.useState("parent"),X=s.useState("activeIndex"),Ee=s.useState("payload"),ne=s.useState("floatingParentNodeId"),ge=U.useRef(null),ie=U.useRef(T.type!=="context-menu"),re=ye(),Re=U.useRef(!0),ve=ye(),xe=ne!=null,{openMethod:de,triggerProps:q}=Fo(L);s.useSyncedValues({disabled:p,highlightItemOnHover:_,modal:T.type===void 0?r:void 0,openMethod:de,rootId:V}),Io(s);let{forceUnmount:pe}=Eo(L,s,()=>{s.set("allowMouseEnter",!1)});he(()=>{c&&!f?s.update({parent:{type:"context-menu",context:c},floatingNodeId:A,floatingParentNodeId:P}):f&&s.update({floatingNodeId:A,floatingParentNodeId:P})},[c,f,A,P,s]),U.useEffect(()=>{if(L||(ge.current=null),T.type==="context-menu"){if(!L){re.clear(),ie.current=!1;return}re.start(500,()=>{ie.current=!0})}},[re,L,T.type]),he(()=>{!L&&!j&&s.set("hoverEnabled",!0)},[L,j,s]);let Y=Fe((S,$)=>{let ee=$.reason;if(!S&&!s.select("open")||L===S&&$.trigger===G&&fe===ee)return;let qn=Co($);if(!S&&$.trigger==null&&($.trigger=G??void 0),u?.(S,$),$.isCanceled)return;s.state.floatingRootContext.dispatchOpenChange(S,$);let kt=$.event;if(S===!1&&kt?.type==="click"&&kt.pointerType==="touch"&&!Re.current)return;S&&ee===v.triggerFocus?(Re.current=!1,ve.start(300,()=>{Re.current=!0})):(Re.current=!0,ve.clear());let Jt=(ee===v.triggerPress||ee===v.itemPress)&&kt.detail===0,Qn=!S&&(ee===v.escapeKey||ee==null),Xt={open:S,openChangeReason:ee};ge.current=$.event,bo(Xt,S,$.trigger,qn()),s.update(Xt),T.type==="menubar"&&(ee===v.triggerFocus||ee===v.focusOut||ee===v.triggerHover||ee===v.listNavigation||ee===v.siblingOpen)?s.set("instantType","group"):Jt||Qn?s.set("instantType",Jt?"click":"dismiss"):s.set("instantType",void 0)}),K=Ro({popupStore:s,floatingId:b,nested:P!=null,onOpenChange:Y}),ae=K.context.events;he(()=>{let S=o(({open:$,eventDetails:ee})=>Y($,ee),"handleSetOpenEvent");return ae.on("setOpen",S),()=>{ae?.off("setOpen",S)}},[ae,Y]);let De=U.useCallback(()=>{s.setOpen(!1,se(v.imperativeAction))},[s]);U.useImperativeHandle(R,()=>({unmount:pe,close:De}),[pe,De]);let we;T.type==="context-menu"&&(we=T.context),U.useImperativeHandle(we?.positionerRef,()=>z,[z]),U.useImperativeHandle(we?.actionsRef,()=>({setOpen:Y}),[Y]);let le=po(K,{enabled:!O,bubbles:{escapeKey:h&&T.type==="menu"},outsidePress(){return T.type!=="context-menu"||ge.current?.type==="contextmenu"?!0:ie.current},externalTree:xe?H:void 0}),Ae=Uo(),Ve=U.useCallback(S=>{s.select("activeIndex")!==S&&s.set("activeIndex",S)},[s]),Z=wo(K,{enabled:!O,listRef:s.context.itemDomElements,activeIndex:X,nested:T.type!==void 0,loopFocus:m,orientation:g,parentOrientation:T.type==="menubar"?T.context.orientation:void 0,rtl:Ae==="rtl",disabledIndices:Ye,onNavigate:Ve,openOnArrowKeyDown:T.type!=="context-menu",externalTree:xe?H:void 0,focusItemOnHover:_}),B=U.useCallback(S=>{s.context.typingRef.current=S},[s]),w=_o(K,{enabled:!O,listRef:s.context.itemLabels,elementsRef:s.context.itemDomElements,activeIndex:X,resetMs:500,onMatch:o(S=>{L&&S!==X&&s.set("activeIndex",S)},"onMatch"),onTyping:B}),Ie=U.useMemo(()=>{let S=Me(w.reference,Z.reference,le.reference,{onMouseMove(){s.set("allowMouseEnter",!0)}},q);return S["aria-haspopup"]="menu",S["aria-expanded"]=L,S},[s,w.reference,Z.reference,le.reference,q,L]),$n=U.useMemo(()=>{let S=Me(Z.trigger,le.trigger,q);return S["aria-haspopup"]="menu",S["aria-expanded"]=!1,S},[Z.trigger,le.trigger,q]),Wn=U.useMemo(()=>Me(xo,{id:b,role:"menu","aria-labelledby":G?.id,onMouseMove(){s.set("allowMouseEnter",!0),T.type==="menu"&&s.set("hoverEnabled",!1)},onClick(){s.select("hoverEnabled")&&s.set("hoverEnabled",!1)},onKeyDown(S){let $=s.select("keyboardEventRelay");$&&!S.isPropagationStopped()&&$(S)}},w.floating,Z.floating,le.floating),[G,b,T.type,s,w.floating,Z.floating,le.floating]),Jn=Z.item??ue;yo(s,{floatingRootContext:K,activeTriggerProps:Ie,inactiveTriggerProps:$n,popupProps:Wn,itemProps:Jn});let Xn=U.useMemo(()=>({store:s,parent:E}),[s,E]),Wt=(0,We.jsxs)(Bt.Provider,{value:Xn,children:[x&&(0,We.jsx)(Mo,{handle:x,store:s}),typeof n=="function"?n({payload:Ee}):n]});return T.type===void 0||T.type==="context-menu"?(0,We.jsx)(uo,{externalTree:H,children:Wt}):Wt},"MenuRoot"));function nr(t){return qt(()=>new Pt(t)).current}o(nr,"useMenuRootStore");var Vn=M(C(),1);var Kt=M(me(),1);function Bn(t){let e=k().store,n=Vn.useMemo(()=>({parentMenu:e}),[e]);return(0,Kt.jsx)(zt.Provider,{value:n,children:(0,Kt.jsx)(Ot,{...t})})}o(Bn,"MenuSubmenuRoot");var J=M(C(),1);var Ln=M(C(),1);function Fn(t={}){let{highlightItemOnHover:e,highlightedIndex:n,onHighlightedIndexChange:i}=it(),{ref:u,index:a}=ce(t),d=n===a,p=Ln.useRef(null),r=Xe(u,p);return{compositeProps:{tabIndex:d?0:-1,onFocus(){i(a)},onMouseMove(){let g=p.current;if(!e||!g)return;let R=g.hasAttribute("disabled")||g.ariaDisabled==="true";!d&&!R&&g.focus()}},compositeRef:r,index:a}}o(Fn,"useCompositeItem");function Gn(t){let{render:e,className:n,style:i,state:u=ue,props:a=Ye,refs:d=Ye,metadata:p,stateAttributesMapping:r,tag:m="div",...g}=t,{compositeProps:R,compositeRef:h}=Fn({metadata:p});return N(m,t,{state:u,ref:[h,...d],props:[R,...a,g],stateAttributesMapping:r})}o(Gn,"CompositeItem");function $t(t){if(Qt(t)&&t.hasAttribute("data-rootownerid"))return t.getAttribute("data-rootownerid");if(!Zt(t))return $t(eo(t))}o($t,"findRootOwnerId");var Tt=M(C(),1);function Un(t){let{enabled:e=!0,mouseDownAction:n,open:i}=t,u=Tt.useRef(!1);return Tt.useMemo(()=>e?{onMouseDown:o(a=>{(n==="open"&&!i||n==="close"&&i)&&(u.current=!0,ze(a.currentTarget).addEventListener("click",()=>{u.current=!1},{once:!0}))},"onMouseDown"),onClick:o(a=>{u.current&&(u.current=!1,a.preventBaseUIHandler())},"onClick")}:ue,[e,n,i])}o(Un,"useMixedToggleClickHandler");var ke=M(me(),1);var Hn=fo(o(function(e,n){let{render:i,className:u,style:a,disabled:d=!1,nativeButton:p=!0,id:r,openOnHover:m,delay:g=100,closeDelay:R=0,handle:h,payload:x,...I}=e,y=k(!0),c=Oo(h)??y?.store;if(!c)throw new Error(F(85));let f=te(r),l=c.useState("isTriggerActive",f),D=c.useState("floatingRootContext"),E=c.useState("isOpenedByTrigger",f),s=c.useState("triggerPopupId",f),V=J.useRef(null),b=sr(),H=it(!0),A=io(),P=J.useMemo(()=>A??new et,[A]),L=ot(P),G=tt(),{registerTrigger:z,isMountedByThisTrigger:j}=vo(f,V,c,{payload:x,closeDelay:R,parent:b,floatingTreeRoot:P,floatingNodeId:L,floatingParentNodeId:G,keyboardEventRelay:H?.relayKeyboardEvent}),O=b.type==="menubar",fe=c.useState("disabled"),T=d||fe||O&&b.context.disabled,{getButtonProps:X,buttonRef:Ee}=Ue({disabled:T,native:p});J.useEffect(()=>{!E&&b.type===void 0&&(c.context.allowMouseUpTriggerRef.current=!1)},[c,E,b.type]);let ne=J.useRef(null),ge=ye(),ie=Fe(B=>{if(!ne.current)return;ge.clear(),c.context.allowMouseUpTriggerRef.current=!1;let w=B.target;_t(ne.current,w)||_t(c.select("positionerElement"),w)||w===ne.current||w!=null&&$t(w)===c.select("rootId")||en(B,ne.current)||P.events.emit("close",{domEvent:B,reason:v.cancelOpen})});J.useEffect(()=>{E&&c.select("lastOpenChangeReason")===v.triggerHover&&ze(ne.current).addEventListener("mouseup",ie,{once:!0})},[E,ie,c]);let re=O&&b.context.hasSubmenuOpen,ve=rt(D,{enabled:(m??re)&&!T&&(!O||re&&!j),handleClose:st({blockPointerEvents:!O}),mouseOnly:!0,move:!1,restMs:b.type===void 0?g:void 0,delay:{close:R},triggerElementRef:V,externalTree:P,isActiveTrigger:l,isClosing:o(()=>c.select("transitionStatus")==="ending","isClosing")}),xe=rr(E,c.select("lastOpenChangeReason")),de=nt(D,{enabled:!T,event:E&&O?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:b.type===void 0?xe:!1}),q=To(D,{enabled:!T&&re}),pe=Un({open:E,enabled:O,mouseDownAction:"open"}),Y=J.useMemo(()=>Me(q.reference,de.reference),[q.reference,de.reference]),K=c.useState("triggerProps",j),{preFocusGuardRef:ae,handlePreFocusGuardFocus:De,handleFocusTargetFocus:we}=Lo(c,V),le={disabled:T,open:E},Ae=[ne,n,Ee,z,V],Ve=[Y,ve??ue,K,{"aria-haspopup":"menu","aria-controls":s,id:f,onMouseDown:o(B=>{if(c.select("open"))return;ge.start(200,()=>{c.context.allowMouseUpTriggerRef.current=!0}),ze(B.currentTarget).addEventListener("mouseup",ie,{once:!0})},"onMouseDown")},O?{role:"menuitem"}:{},pe,I,X],Z=N("button",e,{enabled:!O,stateAttributesMapping:At,state:le,ref:Ae,props:Ve});return O?(0,ke.jsx)(Gn,{tag:"button",render:i,className:u,style:a,state:le,refs:Ae,props:Ve,stateAttributesMapping:At}):E?(0,ke.jsxs)(J.Fragment,{children:[(0,ke.jsx)(Dt,{ref:ae,onFocus:De},`${f}-pre-focus-guard`),(0,ke.jsx)(J.Fragment,{children:Z},f),(0,ke.jsx)(Dt,{ref:c.context.triggerFocusTargetRef,onFocus:we},`${f}-post-focus-guard`)]}):(0,ke.jsx)(J.Fragment,{children:Z},f)},"MenuTrigger"));function rr(t,e){let n=ye(),[i,u]=J.useState(!1);return he(()=>{t&&e===v.triggerHover?(u(!0),n.start(500,()=>{u(!1)})):t||(n.clear(),u(!1))},[t,e,n]),i}o(rr,"useStickIfOpen");function sr(){let t=yt(!0);return J.useMemo(()=>t?{type:"menubar",context:t}:{type:void 0},[t])}o(sr,"useMenuParent");var jn=M(C(),1);var Yn=jn.forwardRef(o(function(e,n){let{render:i,className:u,style:a,children:d,...p}=e,{store:r}=k(),{side:m}=W(),g=r.useState("instantType"),{children:R,state:h}=Xo({store:r,side:m,children:d}),x={activationDirection:h.activationDirection,transitioning:h.transitioning,instant:g};return N("div",e,{state:x,ref:n,props:[p,{children:R}],stateAttributesMapping:Jo})},"MenuViewport"));var Ce=M(C(),1);var ir={"aria-expanded":void 0},zn=Ce.forwardRef(o(function(e,n){let{render:i,className:u,style:a,label:d,id:p,nativeButton:r=!1,openOnHover:m=!0,delay:g=100,closeDelay:R=0,disabled:h=!1,...x}=e,I=Nt();if(!I?.parentMenu)throw new Error(F(37));let y=ce({guess:!0,label:d}),_=W(),{store:c}=k(),f=te(p),l=c.useState("open"),D=c.useState("floatingRootContext"),E=c.useState("floatingTreeRoot"),s=c.useState("triggerPopupId",f),V=ho(f,c),b=Ce.useCallback(Y=>{let K=V(Y);return Y!==null&&c.select("open")&&c.select("activeTriggerId")==null&&c.update({activeTriggerId:f,activeTriggerElement:Y,closeDelay:R}),K},[V,R,c,f]),H=Ce.useRef(null),A=Ce.useCallback(Y=>{H.current=Y,c.set("activeTriggerElement",Y)},[c]);c.useSyncedValue("closeDelay",R);let P=I.parentMenu,L=c.useState("disabled"),G=P.useState("disabled"),z=h||L||G,j=P.useState("itemProps"),O=P.useState("isActive",y.index),fe=Ce.useMemo(()=>({type:"submenu-trigger",setActive(){P.select("highlightItemOnHover")&&P.set("activeIndex",y.index)}}),[P,y.index]),{getItemProps:T,itemRef:X}=Ne({closeOnClick:!1,disabled:z,highlighted:O,id:f,store:c,typingRef:P.context.typingRef,nativeButton:r,itemMetadata:fe,nodeId:_?.context.nodeId}),Ee=c.useState("hoverEnabled"),ne=rt(D,{enabled:Ee&&m&&!z,handleClose:st({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:g,delay:{open:g,close:R},shouldOpen:g>0?()=>P.select("allowMouseEnter"):void 0,triggerElementRef:H,externalTree:E,isClosing:o(()=>c.select("transitionStatus")==="ending","isClosing"),guardStaleOpen:!0}),ie=nt(D,{enabled:!z,event:"mousedown",toggle:!m,ignoreMouse:m,stickIfOpen:!1}).reference??ue,re=c.useState("triggerProps",!0);delete re.id;let Re={disabled:z,highlighted:O,open:l},ve=c.useState("openMethod"),de=c.useState("lastOpenChangeReason")===v.listNavigation||ve==="keyboard",q=l&&de&&qe.screenReader.voiceOver;return N("div",e,{state:Re,stateAttributesMapping:Vo,props:[ie,ne,re,j,q?ir:void 0,{"aria-controls":s,tabIndex:l||O?0:-1,onBlur(){O&&P.set("activeIndex",null)}},x,T],ref:[n,y.ref,X,b,A]})},"MenuSubmenuTrigger"));var Je=class extends lo{static{o(this,"MenuHandle")}constructor(){super(_n(),"Menu")}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function Kn(){return new Je}o(Kn,"createMenuHandle");var Q=M(me(),1);function Hc(t){let e=(0,_e.c)(4),n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=(0,Q.jsx)(oe.Root,{"data-slot":"dropdown-menu",...n}),e[2]=n,e[3]=i):i=e[3],i}o(Hc,"N");function jc(t){let e=(0,_e.c)(4),n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=(0,Q.jsx)(oe.Trigger,{"data-slot":"dropdown-menu-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}o(jc,"z");function Yc({align:t="start",alignOffset:e=0,side:n="bottom",sideOffset:i=4,className:u,...a}){return(0,Q.jsx)(oe.Portal,{children:(0,Q.jsx)(oe.Positioner,{className:"isolate z-50 outline-none",align:t,alignOffset:e,side:n,sideOffset:i,children:(0,Q.jsx)(oe.Popup,{"data-slot":"dropdown-menu-content",className:Be("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none 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-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95 animate-none! relative bg-popover before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!",u),...a})})})}o(Yc,"D");function zc(t){let e=(0,_e.c)(4),n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=(0,Q.jsx)(oe.Group,{"data-slot":"dropdown-menu-group",...n}),e[2]=n,e[3]=i):i=e[3],i}o(zc,"M");function Kc(t){let e=(0,_e.c)(10),n,i,u;e[0]!==t?({className:n,inset:i,...u}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=u):(n=e[1],i=e[2],u=e[3]);let a;e[4]!==n?(a=Be("px-2 py-2 text-xs text-muted-foreground data-inset:ps-7",n),e[4]=n,e[5]=a):a=e[5];let d;return e[6]!==i||e[7]!==u||e[8]!==a?(d=(0,Q.jsx)(oe.GroupLabel,{"data-slot":"dropdown-menu-label","data-inset":i,className:a,...u}),e[6]=i,e[7]=u,e[8]=a,e[9]=d):d=e[9],d}o(Kc,"y");function $c({className:t,inset:e,variant:n="default",...i}){return(0,Q.jsx)(oe.Item,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":n,className:Be("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-md px-2 py-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:ps-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",t),...i})}o($c,"I");function Wc(t){let e=(0,_e.c)(15),n,i,u,a,d;e[0]!==t?({className:u,children:i,checked:n,inset:a,...d}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=u,e[4]=a,e[5]=d):(n=e[1],i=e[2],u=e[3],a=e[4],d=e[5]);let p;e[6]!==u?(p=Be("relative flex cursor-default items-center gap-2 rounded-md py-2 pe-8 ps-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:ps-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",u),e[6]=u,e[7]=p):p=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=(0,Q.jsx)("span",{className:"pointer-events-none absolute end-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:(0,Q.jsx)(oe.CheckboxItemIndicator,{children:(0,Q.jsx)(Qo,{icon:qo,strokeWidth:2})})}),e[8]=r):r=e[8];let m;return e[9]!==n||e[10]!==i||e[11]!==a||e[12]!==d||e[13]!==p?(m=(0,Q.jsxs)(oe.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item","data-inset":a,className:p,checked:n,...d,children:[r,i]}),e[9]=n,e[10]=i,e[11]=a,e[12]=d,e[13]=p,e[14]=m):m=e[14],m}o(Wc,"_");function Jc(t){let e=(0,_e.c)(8),n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let u;e[3]!==n?(u=Be("-mx-1 h-px bg-border",n),e[3]=n,e[4]=u):u=e[4];let a;return e[5]!==i||e[6]!==u?(a=(0,Q.jsx)(oe.Separator,{"data-slot":"dropdown-menu-separator",className:u,...i}),e[5]=i,e[6]=u,e[7]=a):a=e[7],a}o(Jc,"C");export{Hc as a,jc as b,Yc as c,zc as d,Kc as e,$c as f,Wc as g,Jc as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-YKXDMIHQ.js";var h=o(e=>{let t=0,a=0,s=0,n=0,l=0,i=0,c=0;for(let{metrics:r}of e){if(r===null){l+=1;continue}n+=1,t+=r.requests,a+=r.errors,s+=r.databaseSize??0,r.cache!==null&&(i+=r.cache.hits,c+=r.cache.hits+r.cache.misses)}return{failed:l,hitRate:c===0?null:i/c,reachable:n,totalDatabaseSize:s,totalErrors:a,totalRequests:t}},"u"),f=o((e,t)=>{let a=new Set,s=[];for(let n of["",e.trim(),...t])a.has(n)||(a.add(n),s.push(n));return s},"h"),u=o((e,t)=>{if(e.length===0)return 0;if(e.sort((s,n)=>s-n),t<=0)return e[0]??0;if(t>=100)return e.at(-1)??0;let a=Math.ceil(t/100*e.length)-1;return e[a]??0},"l"),p=o(e=>{let t=e.functions;if(!t||t.length===0)return{p90:0,p95:0};let a=1e3,s=[];for(let n of t){if(n.calls<=0)continue;let l=n.totalDurationMs/n.calls,i=Math.min(n.calls,a);for(let c=0;c<i;c+=1)s.push(l)}return s.length===0?{p90:0,p95:0}:{p90:u([...s],90),p95:u([...s],95)}},"f");var g=o(e=>e.map(t=>({...t,avgDurationMs:t.execCount>0?t.totalDurationMs/t.execCount:0})),"g");export{h as a,f as b,p as c,g as d};
|