@lunora/studio 1.0.0-alpha.13 → 1.0.0-alpha.131

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.
Files changed (329) hide show
  1. package/LICENSE.md +6 -0
  2. package/dist/index.d.ts +881 -786
  3. package/dist/index.js +1 -41
  4. package/dist/mount.d.ts +10 -10
  5. package/dist/mount.js +1 -26
  6. package/dist/packem_chunks/AdvisorHealthPanel.js +1 -0
  7. package/dist/packem_chunks/ApiTab.js +1 -0
  8. package/dist/packem_chunks/AuditPanel.js +1 -0
  9. package/dist/packem_chunks/DeploymentHealthPanel.js +1 -0
  10. package/dist/packem_chunks/ExportImportPanel.js +3 -0
  11. package/dist/packem_chunks/FileBrowser.js +4 -0
  12. package/dist/packem_chunks/FunctionRunner.js +1 -0
  13. package/dist/packem_chunks/FunctionStatsPanel.js +1 -0
  14. package/dist/packem_chunks/HealthPanel.js +1 -0
  15. package/dist/packem_chunks/InsightsPanel.js +1 -0
  16. package/dist/packem_chunks/LogsPanel.js +1 -0
  17. package/dist/packem_chunks/MailPanel.js +2 -0
  18. package/dist/packem_chunks/MetricsPanel.js +1 -0
  19. package/dist/packem_chunks/NotificationsPanel.js +1 -0
  20. package/dist/packem_chunks/PitrPanel.js +1 -0
  21. package/dist/packem_chunks/SchemaViewer.js +1 -0
  22. package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -0
  23. package/dist/packem_chunks/SettingsPanel.js +1 -0
  24. package/dist/packem_chunks/SqlEditorPanel.js +9 -0
  25. package/dist/packem_chunks/TableEditor.js +1 -0
  26. package/dist/packem_chunks/agents-panel.js +1 -0
  27. package/dist/packem_chunks/analytics-panel.js +1 -0
  28. package/dist/packem_chunks/auth-audit-panel.js +1 -0
  29. package/dist/packem_chunks/auth-config-panel.js +1 -0
  30. package/dist/packem_chunks/auth-sessions-panel.js +1 -0
  31. package/dist/packem_chunks/containers-panel.js +1 -0
  32. package/dist/packem_chunks/dashboards-panel.js +1 -0
  33. package/dist/packem_chunks/evals-panel.js +1 -0
  34. package/dist/packem_chunks/fanout-panel.js +1 -0
  35. package/dist/packem_chunks/flags-panel.js +1 -0
  36. package/dist/packem_chunks/issues-panel.js +1 -0
  37. package/dist/packem_chunks/kv-browser.js +1 -0
  38. package/dist/packem_chunks/log-drains-panel.js +4 -0
  39. package/dist/packem_chunks/migrations-route.js +1 -0
  40. package/dist/packem_chunks/organizations-panel.js +1 -0
  41. package/dist/packem_chunks/payments-panel.js +1 -0
  42. package/dist/packem_chunks/permissions-panel.js +1 -0
  43. package/dist/packem_chunks/queues-panel.js +1 -0
  44. package/dist/packem_chunks/reactors-panel.js +1 -0
  45. package/dist/packem_chunks/rls-panel.js +1 -0
  46. package/dist/packem_chunks/schedule-panel.js +1 -0
  47. package/dist/packem_chunks/sparkline.js +1 -0
  48. package/dist/packem_chunks/storage-rules-panel.js +1 -0
  49. package/dist/packem_chunks/subscriptions-panel.js +1 -0
  50. package/dist/packem_chunks/sync-client-panel.js +1 -0
  51. package/dist/packem_chunks/traces-panel.js +1 -0
  52. package/dist/packem_chunks/users-panel.js +1 -0
  53. package/dist/packem_chunks/vector-browser.js +1 -0
  54. package/dist/packem_chunks/workflows-panel.js +1 -0
  55. package/dist/packem_shared/ADMIN_FUNCTIONS-B6z7VLYt.js +1 -0
  56. package/dist/packem_shared/ApiDocsPanel-Du1L7Ysj.js +2 -0
  57. package/dist/packem_shared/ApiReferencePanel-uGgGOBYj.js +1 -0
  58. package/dist/packem_shared/CommandPalette-HqiXrWIm.js +1 -0
  59. package/dist/packem_shared/ConfirmButton-Cj2SOapE.js +1 -0
  60. package/dist/packem_shared/ConnectionBadge-Bh16X9-u.js +1 -0
  61. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-DuULO4XM.js +1 -0
  62. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-1Lrg55IV.js +1 -0
  63. package/dist/packem_shared/DEFAULT_LOCALE-A1Yg5ORA.js +1 -0
  64. package/dist/packem_shared/DataBrowser-W5TxvLB8.js +4 -0
  65. package/dist/packem_shared/DataFilters-3nbW0uax.js +1 -0
  66. package/dist/packem_shared/ErrorBoundary-BWNF98VF.js +1 -0
  67. package/dist/packem_shared/GlobalDataBrowser-LFznuyGe.js +1 -0
  68. package/dist/packem_shared/HomePanel-DmB0EKjl.js +1 -0
  69. package/dist/packem_shared/MigrationsPanel-BDNt136v.js +1 -0
  70. package/dist/packem_shared/OpenRpcReferencePanel-DgrpASYD.js +1 -0
  71. package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.js +1 -0
  72. package/dist/packem_shared/ScheduledJobs-CiO3eXgI.js +1 -0
  73. package/dist/packem_shared/ShardInput-CdawpUiS.js +1 -0
  74. package/dist/packem_shared/Studio-CkNE_tEy.js +1 -0
  75. package/dist/packem_shared/StudioApp-BZP_0E2n.js +1 -0
  76. package/dist/packem_shared/StudioI18nProvider-Bl547evf.js +1 -0
  77. package/dist/packem_shared/advisor-view-C1KFTXSH.js +1 -0
  78. package/dist/packem_shared/aggregateMetrics-A-Y7OH6R.js +1 -0
  79. package/dist/packem_shared/alert-C2SEhYS9.js +1 -0
  80. package/dist/packem_shared/app.d-D1bPR8FO.d.ts +252 -0
  81. package/dist/packem_shared/badge-cAk9Di1Q.js +1 -0
  82. package/dist/packem_shared/bar-chart-B6gzp_f9.js +6 -0
  83. package/dist/packem_shared/browser-storage-BH1MxLZs.js +1 -0
  84. package/dist/packem_shared/button-BOPLD1un.js +1 -0
  85. package/dist/packem_shared/card-BGlQzQY-.js +1 -0
  86. package/dist/packem_shared/cf-links-CBJ5SywP.js +1 -0
  87. package/dist/packem_shared/checkbox-C5w53W-E.js +1 -0
  88. package/dist/packem_shared/control-button-BOZ5K-FC.js +1 -0
  89. package/dist/packem_shared/data-grid-BFTQnkXq.js +1 -0
  90. package/dist/packem_shared/data-view-params-qoSTqjAj.js +1 -0
  91. package/dist/packem_shared/dropdown-menu-U7Tjg1Nb.js +2 -0
  92. package/dist/packem_shared/empty-state-B939z6K2.js +1 -0
  93. package/dist/packem_shared/error-alert-TYdKetJd.js +1 -0
  94. package/dist/packem_shared/grid-features-jBzZGauv.js +6 -0
  95. package/dist/packem_shared/home-panel-DHOa3sxt.js +3 -0
  96. package/dist/packem_shared/input-CY5W3wzv.js +1 -0
  97. package/dist/packem_shared/internal-CwaF9YNk.js +2 -0
  98. package/dist/packem_shared/label-BOUo-DP0.js +1 -0
  99. package/dist/packem_shared/live-status-Bf7rR8o8.js +1 -0
  100. package/dist/packem_shared/log-fields-SBxKyBug.js +1 -0
  101. package/dist/packem_shared/log-line-UnE93Ovi.js +1 -0
  102. package/dist/packem_shared/modal-shell-wGW4CKEW.js +1 -0
  103. package/dist/packem_shared/operation-console-provider-DoloEvon.js +1 -0
  104. package/dist/packem_shared/quote-identifier-CGiYFBvY.js +1 -0
  105. package/dist/packem_shared/recording-client-CKn4-vUx.js +1 -0
  106. package/dist/packem_shared/reference-view-BU2dNK9Z.js +13 -0
  107. package/dist/packem_shared/schema-diagram-DOaIh1y6.js +2 -0
  108. package/dist/packem_shared/scroll-area-DSJftwu_.js +2 -0
  109. package/dist/packem_shared/select-BPISLTcv.js +2 -0
  110. package/dist/packem_shared/shard-history-DU5b3QDI.js +1 -0
  111. package/dist/packem_shared/shortcuts-lH4Vaqjc.js +1 -0
  112. package/dist/packem_shared/skeleton-DFBBaJU6.js +1 -0
  113. package/dist/packem_shared/sparkline-CYbJzfA1.js +1 -0
  114. package/dist/packem_shared/sql-result-table-CqlZo2QN.js +1 -0
  115. package/dist/packem_shared/stat-card-B9uIvAHg.js +1 -0
  116. package/dist/packem_shared/storage-tier-C2mKwYRj.js +1 -0
  117. package/dist/packem_shared/studio-CXai1O2K.js +2 -0
  118. package/dist/packem_shared/table-BMsuYFhk.js +2 -0
  119. package/dist/packem_shared/table-list-sidebar-BWq_-gtu.js +1 -0
  120. package/dist/packem_shared/textarea-DpO3i-Qo.js +1 -0
  121. package/dist/packem_shared/trace-handoff-z9sy89Ci.js +1 -0
  122. package/dist/packem_shared/use-admin-query-P0RJrjsD.js +1 -0
  123. package/dist/packem_shared/use-async-submit-DdLd0MdK.js +1 -0
  124. package/dist/packem_shared/use-auth-config-z3KRWAqD.js +1 -0
  125. package/dist/packem_shared/use-open-trace-4mqqFWrn.js +1 -0
  126. package/dist/packem_shared/use-shard-key-BsP3o5wT.js +1 -0
  127. package/dist/packem_shared/use-sql-assistant-D1K2LqpO.js +1 -0
  128. package/dist/packem_shared/useDebounced-DVeQ5-oW.js +1 -0
  129. package/dist/packem_shared/utils-bhneXptQ.js +1 -0
  130. package/dist/packem_shared/virtual-rect-D_j7aLxX.js +1 -0
  131. package/dist/packem_shared/wire-codec-Dl3VeNrd.js +1 -0
  132. package/dist/standalone/chunk-26VREVWU.js +1 -0
  133. package/dist/standalone/chunk-2SFSTQS4.js +1 -0
  134. package/dist/standalone/chunk-2VGV6RPS.js +1 -0
  135. package/dist/standalone/chunk-2XOGZAF4.js +3 -0
  136. package/dist/standalone/chunk-333WFRWG.js +1 -0
  137. package/dist/standalone/chunk-362AVHNC.js +1 -0
  138. package/dist/standalone/chunk-3NXFFXQ2.js +1 -0
  139. package/dist/standalone/chunk-3S4VZ2ZM.js +1 -0
  140. package/dist/standalone/chunk-443UDYWL.js +6 -0
  141. package/dist/standalone/chunk-4PZEPCO7.js +1 -0
  142. package/dist/standalone/chunk-4YTSKL4R.js +1 -0
  143. package/dist/standalone/chunk-4ZCENYC3.js +1 -0
  144. package/dist/standalone/chunk-57VX76PR.js +1 -0
  145. package/dist/standalone/chunk-5EW733RQ.js +1 -0
  146. package/dist/standalone/chunk-5JLIP2HH.js +1 -0
  147. package/dist/standalone/chunk-6CBLYGXJ.js +1 -0
  148. package/dist/standalone/chunk-6UPO6ELN.js +1 -0
  149. package/dist/standalone/chunk-6ZPTNC34.js +19 -0
  150. package/dist/standalone/chunk-74ASA4WU.js +1 -0
  151. package/dist/standalone/chunk-76YLMHR3.js +1 -0
  152. package/dist/standalone/chunk-77JLGJ7V.js +1 -0
  153. package/dist/standalone/chunk-7PIHTTND.js +1 -0
  154. package/dist/standalone/chunk-7SROZWKL.js +1 -0
  155. package/dist/standalone/chunk-AFKLFS74.js +1 -0
  156. package/dist/standalone/chunk-AOAJGSYZ.js +2 -0
  157. package/dist/standalone/chunk-AXXNMZQ4.js +1 -0
  158. package/dist/standalone/chunk-BFCUKERU.js +8 -0
  159. package/dist/standalone/chunk-BQK2C2Z4.js +1 -0
  160. package/dist/standalone/chunk-BUIAZFSC.js +1 -0
  161. package/dist/standalone/chunk-BWEXJENB.js +1 -0
  162. package/dist/standalone/chunk-CA5ILAW2.js +14 -0
  163. package/dist/standalone/chunk-CAOUXOL7.js +1 -0
  164. package/dist/standalone/chunk-CKTKI4IY.js +1 -0
  165. package/dist/standalone/chunk-CL76PTLM.js +2 -0
  166. package/dist/standalone/chunk-CN2AINNY.js +1 -0
  167. package/dist/standalone/chunk-CP4ZFBVW.js +1 -0
  168. package/dist/standalone/chunk-CSYDKCNQ.js +1 -0
  169. package/dist/standalone/chunk-CYX3OHJ3.js +1 -0
  170. package/dist/standalone/chunk-DKSLOJDQ.js +1 -0
  171. package/dist/standalone/chunk-DPNEFSEC.js +1 -0
  172. package/dist/standalone/chunk-DUDQV6XJ.js +1 -0
  173. package/dist/standalone/chunk-DZGOHOOE.js +1 -0
  174. package/dist/standalone/chunk-EBI7CCQQ.js +1 -0
  175. package/dist/standalone/chunk-EDHW2EEG.js +1 -0
  176. package/dist/standalone/chunk-EE63P4VX.js +1 -0
  177. package/dist/standalone/chunk-ELO3V35K.js +1 -0
  178. package/dist/standalone/chunk-EVQ6LHI6.js +1 -0
  179. package/dist/standalone/chunk-EYGF6TQS.js +1 -0
  180. package/dist/standalone/chunk-F7JOSNAT.js +1 -0
  181. package/dist/standalone/chunk-FB5DOMZF.js +4 -0
  182. package/dist/standalone/chunk-FDLSPDIC.js +15 -0
  183. package/dist/standalone/chunk-FJ6G6FNE.js +1 -0
  184. package/dist/standalone/chunk-GIQDEWC4.js +1 -0
  185. package/dist/standalone/chunk-GSQURGCT.js +1 -0
  186. package/dist/standalone/chunk-H3BH6X3G.js +1 -0
  187. package/dist/standalone/chunk-H7YVFLA5.js +7 -0
  188. package/dist/standalone/chunk-HAIBZTXF.js +1 -0
  189. package/dist/standalone/chunk-HRD2DVIW.js +1 -0
  190. package/dist/standalone/chunk-IE5S3JMD.js +1 -0
  191. package/dist/standalone/chunk-INQICZYC.js +1 -0
  192. package/dist/standalone/chunk-IYWVSMAY.js +1 -0
  193. package/dist/standalone/chunk-IZXGBTPE.js +1 -0
  194. package/dist/standalone/chunk-JHXEEPRG.js +1 -0
  195. package/dist/standalone/chunk-JURAVSE7.js +1 -0
  196. package/dist/standalone/chunk-JUWOEHDD.js +1 -0
  197. package/dist/standalone/chunk-JV7KTJPY.js +1 -0
  198. package/dist/standalone/chunk-KTXD2N6F.js +1 -0
  199. package/dist/standalone/chunk-KVSQKUWD.js +1 -0
  200. package/dist/standalone/chunk-L4EZAHCD.js +1 -0
  201. package/dist/standalone/chunk-M3NNNOD5.js +1 -0
  202. package/dist/standalone/chunk-MCLM2QJI.js +1 -0
  203. package/dist/standalone/chunk-METRMDIQ.js +1 -0
  204. package/dist/standalone/chunk-MPYVZLYP.js +1 -0
  205. package/dist/standalone/chunk-MSCK3V6U.js +1 -0
  206. package/dist/standalone/chunk-MVZARXDR.js +1 -0
  207. package/dist/standalone/chunk-MYFFCV2R.js +1 -0
  208. package/dist/standalone/chunk-NIX2QSSN.js +1 -0
  209. package/dist/standalone/chunk-NNLNQKT7.js +59 -0
  210. package/dist/standalone/chunk-NSOLPNU7.js +1 -0
  211. package/dist/standalone/chunk-NXXGISFB.js +1 -0
  212. package/dist/standalone/chunk-O5MAFDY2.js +1 -0
  213. package/dist/standalone/chunk-OE4KGVJW.js +4 -0
  214. package/dist/standalone/chunk-OEGE3YDK.js +11 -0
  215. package/dist/standalone/chunk-OG57FC7W.js +1 -0
  216. package/dist/standalone/chunk-PQICDSPP.js +1 -0
  217. package/dist/standalone/chunk-PSPJORP6.js +1 -0
  218. package/dist/standalone/chunk-PZ4QDWTI.js +1 -0
  219. package/dist/standalone/chunk-QHQTOESO.js +1 -0
  220. package/dist/standalone/chunk-QO4SZ4WH.js +1 -0
  221. package/dist/standalone/chunk-R5ZTCHCE.js +1 -0
  222. package/dist/standalone/chunk-RCZTUWG3.js +1 -0
  223. package/dist/standalone/chunk-RJINX3H6.js +1 -0
  224. package/dist/standalone/chunk-RLRTQOFQ.js +1 -0
  225. package/dist/standalone/chunk-RPCMQE4A.js +1 -0
  226. package/dist/standalone/chunk-SJ4CA7QG.js +1 -0
  227. package/dist/standalone/chunk-SPDZUX4P.js +1 -0
  228. package/dist/standalone/chunk-SQMJUXBA.js +1 -0
  229. package/dist/standalone/chunk-SRQP7SLQ.js +1 -0
  230. package/dist/standalone/chunk-TB5N24CM.js +1 -0
  231. package/dist/standalone/chunk-TFMQSCGC.js +1 -0
  232. package/dist/standalone/chunk-TIANWRSD.js +1 -0
  233. package/dist/standalone/chunk-TNKECJW4.js +1 -0
  234. package/dist/standalone/chunk-TPAZM36C.js +1 -0
  235. package/dist/standalone/chunk-TV2M3PHL.js +1 -0
  236. package/dist/standalone/chunk-TVGQ7K5I.js +1 -0
  237. package/dist/standalone/chunk-U7LNRJHZ.js +1 -0
  238. package/dist/standalone/chunk-UANVABQG.js +1 -0
  239. package/dist/standalone/chunk-V6QPVFDL.js +1 -0
  240. package/dist/standalone/chunk-VHXQGKA7.js +1 -0
  241. package/dist/standalone/chunk-VLW547U6.js +1 -0
  242. package/dist/standalone/chunk-VR3UJA7B.js +1 -0
  243. package/dist/standalone/chunk-VZCS5GXZ.js +1 -0
  244. package/dist/standalone/chunk-W2FXNIVC.js +1 -0
  245. package/dist/standalone/chunk-W2JBKQNU.js +1 -0
  246. package/dist/standalone/chunk-WUW4ZHRL.js +1 -0
  247. package/dist/standalone/chunk-WXBTOI6T.js +1 -0
  248. package/dist/standalone/chunk-WY33QRLH.js +9 -0
  249. package/dist/standalone/chunk-XJSWM47N.js +1 -0
  250. package/dist/standalone/chunk-XNBAJ6XA.js +1 -0
  251. package/dist/standalone/chunk-XQS7KSHL.js +1 -0
  252. package/dist/standalone/chunk-Y2YQITGI.js +1 -0
  253. package/dist/standalone/chunk-Z6SECRFO.js +3 -0
  254. package/dist/standalone/chunk-ZHPDAJBM.js +1 -0
  255. package/dist/standalone/chunk-ZPGNTTQ3.js +1 -0
  256. package/dist/standalone/chunk-ZSOLGJFC.js +1 -0
  257. package/dist/standalone/studio.js +9 -378
  258. package/dist/styles.css +2 -2
  259. package/package.json +16 -15
  260. package/dist/packem_shared/ADMIN_FUNCTIONS-CZJCZ4c7.js +0 -47
  261. package/dist/packem_shared/ApiDocsPanel-yEz0fiof.js +0 -842
  262. package/dist/packem_shared/ApiReferencePanel-1vubqG5s.js +0 -229
  263. package/dist/packem_shared/ApiTab-DdubReQI.js +0 -251
  264. package/dist/packem_shared/AuditPanel-CE5ofjCc.js +0 -200
  265. package/dist/packem_shared/CommandPalette-BtgkBzZI.js +0 -373
  266. package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
  267. package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
  268. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
  269. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
  270. package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
  271. package/dist/packem_shared/DataBrowser-DpL8U-Nf.js +0 -4475
  272. package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
  273. package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
  274. package/dist/packem_shared/ExportImportPanel-ChsSUCYZ.js +0 -197
  275. package/dist/packem_shared/FileBrowser-DsRBnVhZ.js +0 -2932
  276. package/dist/packem_shared/FunctionRunner-D4cZ6fuA.js +0 -343
  277. package/dist/packem_shared/FunctionStatsPanel-BVelWgNv.js +0 -375
  278. package/dist/packem_shared/GlobalDataBrowser-3X9uRfdO.js +0 -289
  279. package/dist/packem_shared/HealthPanel-CxUVKfvo.js +0 -648
  280. package/dist/packem_shared/HomePanel-tfqpZxuu.js +0 -1334
  281. package/dist/packem_shared/InsightsPanel-DNg3K9XN.js +0 -461
  282. package/dist/packem_shared/LogsPanel-B4LoSRj0.js +0 -827
  283. package/dist/packem_shared/MailPanel-CcpdyWYs.js +0 -440
  284. package/dist/packem_shared/MetricsPanel-CxoyWbNb.js +0 -1611
  285. package/dist/packem_shared/MigrationsPanel-DGwJGWDA.js +0 -239
  286. package/dist/packem_shared/OpenRpcReferencePanel-vbcYbv3V.js +0 -191
  287. package/dist/packem_shared/PitrPanel-CKUzyyHi.js +0 -252
  288. package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
  289. package/dist/packem_shared/ScheduledJobs-BWNwIN3I.js +0 -262
  290. package/dist/packem_shared/SchemaViewer-RclXFo9Q.js +0 -2512
  291. package/dist/packem_shared/SecurityAdvisorPanel-Dqql1Z5O.js +0 -92
  292. package/dist/packem_shared/SettingsPanel-D5iTY0YE.js +0 -390
  293. package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
  294. package/dist/packem_shared/SqlEditorPanel-Dj-In-B3.js +0 -13
  295. package/dist/packem_shared/Studio-VWvKNOw4.js +0 -33
  296. package/dist/packem_shared/StudioApp-BhQ6T2pn.js +0 -657
  297. package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
  298. package/dist/packem_shared/TableEditor-BY8bTpCl.js +0 -11
  299. package/dist/packem_shared/advisor-view-CGcfMiPq.js +0 -159
  300. package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
  301. package/dist/packem_shared/app.d-BVJFkXyj.d.ts +0 -300
  302. package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
  303. package/dist/packem_shared/bar-chart-CzJAgqkp.js +0 -3245
  304. package/dist/packem_shared/button-BhsN2uZH.js +0 -49
  305. package/dist/packem_shared/card-DURq3ElK.js +0 -175
  306. package/dist/packem_shared/cf-links-2cktDedA.js +0 -8
  307. package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
  308. package/dist/packem_shared/data-grid-B5CaV3wS.js +0 -183
  309. package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
  310. package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
  311. package/dist/packem_shared/grid-features-CzUfqgsM.js +0 -840
  312. package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
  313. package/dist/packem_shared/internal-rXJEAhXS.js +0 -68
  314. package/dist/packem_shared/label-D8ykjn5J.js +0 -46
  315. package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
  316. package/dist/packem_shared/reference-view-B4E49Lip.js +0 -2180
  317. package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
  318. package/dist/packem_shared/sparkline-10dG-_f0.js +0 -93
  319. package/dist/packem_shared/sql-editor-panel-CMdxstu5.js +0 -2562
  320. package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
  321. package/dist/packem_shared/studio-D8ry3tJR.js +0 -11043
  322. package/dist/packem_shared/table-_RzNvy3R.js +0 -246
  323. package/dist/packem_shared/table-editor-CWx68ZCg.js +0 -407
  324. package/dist/packem_shared/table-list-sidebar-Bg7uzbvC.js +0 -832
  325. package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
  326. package/dist/packem_shared/use-admin-query-BkbdNFNz.js +0 -105
  327. package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
  328. package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
  329. package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
@@ -0,0 +1,252 @@
1
+ import { CronJobInfo, ScheduleRecord, LunoraClient } from '@lunora/client';
2
+ import { ReactElement } from 'react';
3
+ import { I18n } from '@lingui/core';
4
+ interface CronTriggersPanelProps {
5
+ /**
6
+ * Load the code-defined cron triggers. Defaults to `client.getCronJobs`,
7
+ * which hits the worker's admin-gated `/_lunora/admin/cron-jobs` endpoint —
8
+ * so the panel works out of the box under `<LunoraProvider>`, provided the
9
+ * worker is built with a `cronJobs` map and `adminToken`. Override it to
10
+ * source triggers from elsewhere (e.g. tests).
11
+ */
12
+ readonly loadCronJobs?: () => Promise<CronJobInfo[]>;
13
+ /**
14
+ * Manually fire one cron job by name. Defaults to `client.runCronJob`, which
15
+ * hits the admin-gated `POST /_lunora/admin/cron-jobs/run` endpoint (the same
16
+ * dispatch the scheduled trigger runs). When a custom {@link CronTriggersPanelProps.loadCronJobs}
17
+ * is supplied without a `runCronJob`, the "Run now" control is hidden — useful
18
+ * for a read-only view.
19
+ */
20
+ readonly runCronJob?: (name: string) => Promise<{
21
+ name: string;
22
+ ran: boolean;
23
+ }>;
24
+ }
25
+ interface ScheduledJobsProps {
26
+ /**
27
+ * Cancel a pending job by id. Defaults to `client.cancelScheduledJob` when
28
+ * {@link ScheduledJobsProps.loadJobs} is also left to the client. When a
29
+ * custom `loadJobs` is supplied without a `cancelJob`, the cancel control is
30
+ * hidden — useful for a read-only view.
31
+ */
32
+ readonly cancelJob?: (id: string) => Promise<{
33
+ cancelled: boolean;
34
+ }>;
35
+ /**
36
+ * Load the pending scheduled jobs. Defaults to `client.listScheduledJobs`,
37
+ * which hits the worker's admin-gated `/_lunora/admin/scheduled` endpoint —
38
+ * so the panel works out of the box under `<LunoraProvider>`, provided the
39
+ * worker is built with a `schedulerDO` namespace and `adminToken`. Override
40
+ * it to source jobs from elsewhere.
41
+ */
42
+ readonly loadJobs?: () => Promise<ScheduleRecord[]>;
43
+ }
44
+ /**
45
+ * View — and cancel — the functions queued via `runAfter` / `runAt` on the
46
+ * scheduler. Cron *triggers* are static wrangler config and don't appear here;
47
+ * this lists the dynamic, in-flight schedule only.
48
+ *
49
+ * Works out of the box under `<LunoraProvider>` via the client's scheduler
50
+ * admin methods; pass {@link ScheduledJobsProps.loadJobs} /
51
+ * {@link ScheduledJobsProps.cancelJob} to override the transport.
52
+ */
53
+ declare const ScheduledJobs: ({ cancelJob, loadJobs }?: ScheduledJobsProps) => ReactElement;
54
+ interface SchedulePanelProps {
55
+ /** Override how the Cron triggers sub-view loads triggers; see {@link CronTriggersPanel}. */
56
+ readonly loadCronJobs?: CronTriggersPanelProps["loadCronJobs"];
57
+ /** Override how the Scheduled jobs sub-view cancels a job; see {@link ScheduledJobs}. */
58
+ readonly scheduledCancel?: ScheduledJobsProps["cancelJob"];
59
+ /** Override how the Scheduled jobs sub-view loads jobs; see {@link ScheduledJobs}. */
60
+ readonly scheduledLoad?: ScheduledJobsProps["loadJobs"];
61
+ }
62
+ /** Which client method a {@link FunctionDescriptor} is invoked through. */
63
+ type FunctionKind = "action" | "mutation" | "query";
64
+ /**
65
+ * One argument of a registered function, derived from its `v.*` validator by the
66
+ * worker's `/_lunora/admin/functions` endpoint. A compact signature shape.
67
+ */
68
+ interface FunctionArgumentDescriptor {
69
+ /** Element validator kind for an `array` arg (one level), e.g. `string`. */
70
+ element?: string;
71
+ /** The (optional-unwrapped) validator kind, e.g. `string`, `id`, `object`. */
72
+ kind: string;
73
+ /** The argument name. */
74
+ name: string;
75
+ /** True when the arg is wrapped in `v.optional(...)`. */
76
+ optional: boolean;
77
+ /** Target table for an `id` arg (`v.id("table")`). */
78
+ table?: string;
79
+ }
80
+ /**
81
+ * Runtime descriptor for a registered Lunora function. The function's `kind` is
82
+ * a compile-time-only phantom on `FunctionReference`, so the runner needs it
83
+ * spelled out here to know which client method to call. `args` carries the
84
+ * function's argument signature (absent on responses from an older worker).
85
+ */
86
+ interface FunctionDescriptor {
87
+ args?: FunctionArgumentDescriptor[];
88
+ kind: FunctionKind;
89
+ /** The `<file>:<function>` identifier, e.g. `messages:list`. */
90
+ path: string;
91
+ }
92
+ /** Outcome of a single `FunctionRunner` invocation. */
93
+ type RunStatus = "error" | "idle" | "running" | "success";
94
+ interface StudioProps {
95
+ /**
96
+ * URL path prefix the studio is mounted under, passed to the router as its
97
+ * `basepath`. Defaults to `/` (mounted at the origin root). The `@lunora/vite`
98
+ * dev route serves the studio under `/__lunora`, so it sets this — without
99
+ * it the router treats `/__lunora` as unknown and bounces to `/data`, escaping
100
+ * the mount.
101
+ */
102
+ readonly basePath?: string;
103
+ /**
104
+ * App-owned top-bar + sidebar-footer chrome (theme toggle, admin-token
105
+ * popover, rules banner). The batteries-included `StudioApp` supplies
106
+ * this; composing `<Studio>` bare omits those affordances. See {@link StudioChrome}.
107
+ */
108
+ readonly chrome?: StudioChrome;
109
+ /**
110
+ * Make the data tab editable (insert/edit/delete rows). Off by default so
111
+ * the studio is read-only unless the host opts in; see {@link TableEditor}.
112
+ */
113
+ readonly dataEditable?: boolean;
114
+ /**
115
+ * Functions exposed in the runner tab. The runner tab only appears when at
116
+ * least one descriptor is supplied (a query/mutation/action's `kind` is
117
+ * compile-time-only, so it must be named here).
118
+ */
119
+ readonly functions?: FunctionDescriptor[];
120
+ /** Reuse an existing Lingui instance (wins over `locale`). */
121
+ readonly i18n?: I18n;
122
+ /** Shard key every shard-scoped panel targets on first load. */
123
+ readonly initialShardKey?: string;
124
+ /** Active locale for the studio's own UI strings. Defaults to `en`. */
125
+ readonly locale?: string;
126
+ /**
127
+ * Inline OpenAPI 3.1 document rendered by the API tab's reference sub-view.
128
+ * Thread the generated `_generated/openapi.json` here to render it
129
+ * without a round-trip. When omitted the reference fetches the worker's
130
+ * admin-gated `GET /_lunora/admin/openapi` endpoint via the client.
131
+ */
132
+ readonly openApiSpec?: unknown;
133
+ /**
134
+ * Inline OpenRPC 1.x document rendered by the API tab's reference sub-view
135
+ * when the OpenRPC format is selected. Thread the generated
136
+ * `_generated/openrpc.json` here to render it without a round-trip. When
137
+ * omitted the OpenRPC view fetches the worker's admin-gated
138
+ * `GET /_lunora/admin/openrpc` endpoint via the client.
139
+ */
140
+ readonly openRpcSpec?: unknown;
141
+ /**
142
+ * Allow the function runner to execute a function AS a chosen authenticated
143
+ * identity (the "Run as identity" tool), so an operator can test auth + RLS
144
+ * behavior. Security-sensitive: it forges identity on an admin-gated RPC, so
145
+ * the host MUST set this only on a trusted loopback-dev gate (the same gate
146
+ * as `dataEditable`) — never in a production/static deploy. Off by default;
147
+ * see {@link FunctionRunner}.
148
+ */
149
+ readonly runAsIdentity?: boolean;
150
+ /**
151
+ * Override how the schedule tab cancels a job. Defaults to the client's
152
+ * scheduler admin endpoint; see {@link SchedulePanel}.
153
+ */
154
+ readonly scheduledCancel?: SchedulePanelProps["scheduledCancel"];
155
+ /**
156
+ * Override how the schedule tab's Cron triggers sub-view loads triggers.
157
+ * Defaults to the client's `/_lunora/admin/cron-jobs` endpoint; see
158
+ * {@link SchedulePanel}.
159
+ */
160
+ readonly scheduledCron?: SchedulePanelProps["loadCronJobs"];
161
+ /**
162
+ * Override how the schedule tab loads jobs. Defaults to the client's
163
+ * scheduler admin endpoint, so the tab works without extra wiring.
164
+ */
165
+ readonly scheduledLoad?: SchedulePanelProps["scheduledLoad"];
166
+ /**
167
+ * Enable the visual schema editor overlay on the schema diagram (add table /
168
+ * column / index, written back to `lunora/schema.ts` + codegen). Off by default
169
+ * so the diagram stays read-only unless a host opts in. Like {@link
170
+ * StudioProps.dataEditable}, only the loopback-only dev hosts set this — the
171
+ * write path needs the project's filesystem + toolchain, so a static deploy
172
+ * leaves it off.
173
+ */
174
+ readonly schemaEditable?: boolean;
175
+ }
176
+ /**
177
+ * Top-bar + sidebar-footer chrome the `StudioApp` owns (theme + admin
178
+ * token state, the rules banner) but which renders *inside* the router-owned
179
+ * {@link StudioLayout} (the header and sidebar footer). The layout is a route
180
+ * component with no props, so it reads this from context rather than threading
181
+ * it through the router. Absent (composing `<Studio>` bare) the layout simply
182
+ * omits those affordances.
183
+ */
184
+ interface StudioChrome {
185
+ readonly clearToken: () => void;
186
+ readonly onTokenChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
187
+ readonly rulesInstalled?: boolean;
188
+ readonly token: string;
189
+ }
190
+ /**
191
+ * The composable studio. {@link StudioShell} reads its strings from `useT`,
192
+ * which needs a `StudioI18nProvider` above it.
193
+ *
194
+ * When an `i18n` instance or a `locale` is supplied, this owns a provider so the
195
+ * studio localises itself standalone. When neither is given it renders the
196
+ * shell bare and inherits whatever provider is already in scope — the host app's
197
+ * (`StudioApp` owns one for the top bar too) or the shared default — instead
198
+ * of nesting a second, redundant provider.
199
+ */
200
+ declare const Studio: ({ basePath, chrome, dataEditable, functions, i18n, initialShardKey, locale, openApiSpec, openRpcSpec, runAsIdentity, schemaEditable, scheduledCancel, scheduledCron, scheduledLoad }: StudioProps) => ReactElement;
201
+ interface StudioAppProps {
202
+ /**
203
+ * Admin bearer token to send with every admin request. When omitted the app
204
+ * renders a small prompt so an operator can paste it at runtime — handy in
205
+ * dev where you don't want to bake the token into a bundle.
206
+ */
207
+ readonly adminToken?: string;
208
+ /**
209
+ * URL path prefix the studio is mounted under (router `basepath`). Defaults
210
+ * to `/`. The `@lunora/vite` dev route sets `/__lunora`. Forwarded to the
211
+ * composed {@link Studio}.
212
+ */
213
+ readonly basePath?: string;
214
+ /**
215
+ * Base URL of the Lunora worker the studio talks to. Defaults to the
216
+ * current origin, which is correct when the studio is served from the
217
+ * same worker (the `@lunora/vite` dev route) or proxied to it.
218
+ */
219
+ readonly baseUrl?: string;
220
+ /**
221
+ * Inject a pre-built client instead of constructing one from `baseUrl` +
222
+ * the admin token. Used by the dev mock harness (and embeddings that own
223
+ * the client) so the chrome renders against a supplied client; when set,
224
+ * `baseUrl`/`adminToken` are ignored and this client is never closed here.
225
+ */
226
+ readonly client?: LunoraClient;
227
+ /** UI language for the studio's own strings. Defaults to `en`. */
228
+ readonly locale?: string;
229
+ /**
230
+ * Whether the project's Lunora agent skills ("rules") are installed. When
231
+ * explicitly `false`, the studio shows a one-line banner pointing at
232
+ * `lunora rules install`. The loopback dev hosts inject this; a static deploy
233
+ * leaves it unset (no banner).
234
+ */
235
+ readonly rulesInstalled?: boolean;
236
+ /** Forwarded to the composed {@link Studio} (functions, initialShardKey, scheduled overrides). */
237
+ readonly studio?: Omit<StudioProps, "children" | "chrome" | "i18n" | "locale">;
238
+ }
239
+ /**
240
+ * A fully self-contained studio page: it constructs a {@link LunoraClient}
241
+ * pointed at the worker, wires it through a `<LunoraProvider>`, manages the
242
+ * admin token + theme, and renders the composed {@link Studio} — handing it the
243
+ * top-bar/sidebar {@link StudioChrome} (theme toggle, admin-token popover, rules
244
+ * banner) so those affordances render inside the sidebar shell.
245
+ *
246
+ * Mount this directly (the standalone app and the `@lunora/vite` dev route both
247
+ * do) when you want the batteries-included page rather than composing panels
248
+ * yourself. For embedding into an existing admin UI, use the individual panels
249
+ * or `<Studio>` under your own provider instead.
250
+ */
251
+ declare const StudioApp: ({ adminToken, basePath, baseUrl, client: injectedClient, rulesInstalled, studio, locale }?: StudioAppProps) => ReactElement;
252
+ export { FunctionDescriptor as F, RunStatus as R, StudioAppProps as S, FunctionKind as a, ScheduledJobs as b, ScheduledJobsProps as c, Studio as d, StudioApp as e, StudioProps as f };
@@ -0,0 +1 @@
1
+ import{mergeProps as n}from"@base-ui/react/merge-props";import{useRender as a}from"@base-ui/react/use-render";import{cva as o}from"class-variance-authority";import{c as s}from"./utils-bhneXptQ.js";const d=o("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-none border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive font-mono text-[11px] tracking-wide uppercase focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline",success:"bg-success/10 text-success font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-success/15 dark:bg-success/15",warning:"bg-warning/10 text-warning font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-warning/15 dark:bg-warning/15",info:"bg-info/10 text-info font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-info/15 dark:bg-info/15"}},defaultVariants:{variant:"default"}});function f({className:r,variant:e="default",render:t,...i}){return a({defaultTagName:"span",props:n({className:s(d({variant:e}),r)},i),render:t,state:{slot:"badge",variant:e}})}export{f as B};
@@ -0,0 +1,6 @@
1
+ 'use client';
2
+ import{c as k}from"react/compiler-runtime";import{LunoraError as B}from"@lunora/errors";import{useReducedMotion as V,motion as K}from"motion/react";import*as w from"react";import{useId as j,useState as X,use as Y,createContext as H}from"react";import*as I from"recharts";import{BarChart as U,ReferenceLine as F,XAxis as q,Bar as z,Rectangle as R}from"recharts";import{c as A}from"./utils-bhneXptQ.js";import{jsx as l,jsxs as b,Fragment as E}from"react/jsx-runtime";const L={light:"",dark:".dark"},T=Object.keys(L);function W(r){for(const[t,e]of Object.entries(r))if(e.colors&&!T.some(o=>e.colors?.[o]!==void 0))throw new B("INTERNAL",`[EvilCharts] Invalid chart config for "${t}": colors object must have at least one theme key (${T.join(", ")}). Received empty object or invalid keys.`)}const D=w.createContext(null);function J(){const r=w.useContext(D);if(!r)throw new B("INTERNAL","useChart must be used within a <ChartContainer />");return r}const Q=({id:r,config:t,initialDimension:e={width:320,height:200},className:n,children:o,...s})=>{const a=w.useId(),i=`chart-${r??a.replaceAll(":","")}`;return W(t),l(D.Provider,{value:{config:t},children:b("div",{className:A("min-h-0 w-full flex-1","[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-axis-tick_text]:font-mono [&_.recharts-cartesian-axis-tick_text]:text-[11px] [&_.recharts-cartesian-axis-tick_text]:tracking-wide [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border relative flex flex-col justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden","aspect-video",n),"data-chart":i,"data-slot":"chart",...s,children:[l(tt,{config:t,id:i}),l(I.ResponsiveContainer,{className:"min-h-0 w-full flex-1",initialDimension:e,children:o})]})})};function Z(r,t){const e=r.length;if(e>=t)return r.slice(0,t);const n=[],o=Math.floor(t/e),s=t%e;for(let a=0;a<e;a++){const i=a>=e-s,d=o+(i?1:0);for(let u=0;u<d;u++)n.push(r[a])}return n}const tt=r=>{const t=k(6),{id:e,config:n}=r;let o,s;if(t[0]!==n||t[1]!==e){s=Symbol.for("react.early_return_sentinel");t:{const d=Object.entries(n).filter(et);if(d.length===0){s=null;break t}const u=g=>d.flatMap(f=>{const[m,v]=f,h=v.colors?.[g];if(!h||!Array.isArray(h)||h.length===0)return[];const y=N(v);return Z(h,y).map((c,p)=>` --color-${m}-${p}: ${c};`)}).filter(Boolean).join(`
3
+ `);o=Object.entries(L).map(g=>{const[f,m]=g;return`${m} [data-chart=${e}] {
4
+ ${u(f)}
5
+ }`})}t[0]=n,t[1]=e,t[2]=o,t[3]=s}else o=t[2],s=t[3];if(s!==Symbol.for("react.early_return_sentinel"))return s;const a=o.join(`
6
+ `);let i;return t[4]!==a?(i=l("style",{dangerouslySetInnerHTML:{__html:a}}),t[4]=a,t[5]=i):i=t[5],i};function M(r,t,e){if(typeof t!="object"||t===null)return;const n="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let o=e;return e in t&&typeof t[e]=="string"?o=t[e]:n&&e in n&&typeof n[e]=="string"&&(o=n[e]),o in r?r[o]:r[e]}function N(r){if(!r.colors)return 1;const t=T.map(e=>r.colors?.[e]?.length??0);return Math.max(...t,1)}function et(r){const[,t]=r;return t.colors}const rt={sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},nt={default:"bg-background","frosted-glass":"bg-background"},ot=({active:r,payload:t,className:e,indicator:n="dot",hideLabel:o=!1,hideIndicator:s=!1,label:a,labelFormatter:i,labelClassName:d,formatter:u,nameKey:g,labelKey:f,roundness:m="lg",variant:v="default"})=>{const{config:h}=J(),y=w.useMemo(()=>{if(o||!t?.length)return null;const[c]=t,p=`${f??c?.dataKey??c?.name??"value"}`,$=M(h,c,p),C=!f&&typeof a=="string"?h[a]?.label??a:$?.label;return i?l("div",{className:A("font-medium",d),children:i(C,t)}):C?l("div",{className:A("font-medium",d),children:C}):null},[a,i,t,o,d,h,f]);if(!r||!t?.length)return l("span",{className:"p-4"});const x=t.length===1&&n!=="dot";return b("div",{className:A("border-border/50 grid min-w-32 items-start gap-1.5 border px-2.5 py-1.5 text-xs",rt[m],nt[v],e),children:[x?null:y,l("div",{className:"grid gap-1.5",children:t.filter(c=>c.type!=="none").map((c,p)=>{const C=`${(g&&c.payload?c.payload[g]:void 0)??c.name??c.dataKey??"value"}`,_=M(h,c,C),P=_?N(_):1;return l("div",{className:A("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",n==="dot"&&"items-center"),children:u&&c?.value!==void 0&&c.name?u(c.value,c.name,c,p,c.payload):b(E,{children:[_?.icon?l(_.icon,{}):!s&&l("div",{className:A("shrink-0 rounded-[2px]",{"h-2.5 w-2.5":n==="dot","w-1":n==="line","w-0 border-[1.5px] border-dashed bg-transparent!":n==="dashed","my-0.5":x&&n==="dashed"}),style:st(C,P)}),b("div",{className:A("flex flex-1 justify-between gap-4 leading-none",x?"items-end":"items-center"),children:[b("div",{className:"grid gap-1.5",children:[x?y:null,l("span",{className:"text-muted-foreground",children:_?.label??c.name})]}),c.value!=null&&l("span",{className:"text-foreground font-mono font-medium tabular-nums",children:typeof c.value=="number"?c.value.toLocaleString():String(c.value)})]})]})},p)})})]})};function st(r,t){return t<=1?{background:`var(--color-${r}-0)`}:{background:`linear-gradient(to right, ${Array.from({length:t},(n,o)=>{const s=o/(t-1)*100;return`var(--color-${r}-${o}) ${s}%`}).join(", ")})`}}const at=({animationDuration:r=200,...t})=>l(I.Tooltip,{animationDuration:r,...t}),G=2,it=.5,lt=.05,ct=[0,.7,.5,1],O=H(null);function dt(){const r=Y(O);if(!r)throw new B("INTERNAL","Bar chart parts (<Bar />, <XAxis />, …) must be used within <EvilBarChart />");return r}const Ct=({config:r,data:t,children:e,className:n,animationType:o="left-to-right",barCategoryGap:s})=>{const a=j().replaceAll(":",""),[i]=X(()=>Date.now()),d={animationType:o,config:r,dataLength:t.length,introStartedAt:i};return l(O,{value:d,children:l(Q,{className:n,config:r,children:b(U,{accessibilityLayer:!0,barCategoryGap:s,data:t,id:a,layout:"horizontal",children:[l(F,{stroke:"var(--border)"}),e]})})})},bt=r=>{const t=k(24),{dataKey:e}=r,{animationType:n,config:o,dataLength:s,introStartedAt:a}=dt(),i=j();let d;t[0]!==i?(d=i.replaceAll(":",""),t[0]=i,t[1]=d):d=t[1];const u=d,f=V()?"none":n;let m;t[2]!==e||t[3]!==s||t[4]!==u||t[5]!==a?(m={dataKey:e,dataLength:s,id:u,introStartedAt:a},t[2]=e,t[3]=s,t[4]=u,t[5]=a,t[6]=m):m=t[6];const v=m;let h;t[7]!==v?(h=C=>l(S,{...C,...v,animationType:"none"}),t[7]=v,t[8]=h):h=t[8];const y=`url(#${u}-colors-${e})`;let x;t[9]!==v||t[10]!==f?(x=C=>l(S,{...C,...v,animationType:f}),t[9]=v,t[10]=f,t[11]=x):x=t[11];let c;t[12]!==e||t[13]!==h||t[14]!==y||t[15]!==x?(c=l(z,{activeBar:h,dataKey:e,fill:y,isAnimationActive:!1,radius:G,shape:x}),t[12]=e,t[13]=h,t[14]=y,t[15]=x,t[16]=c):c=t[16];let p;t[17]!==o||t[18]!==e||t[19]!==u?(p=l("defs",{children:l(ft,{config:o,dataKey:e,id:u})}),t[17]=o,t[18]=e,t[19]=u,t[20]=p):p=t[20];let $;return t[21]!==c||t[22]!==p?($=b(E,{children:[c,p]}),t[21]=c,t[22]=p,t[23]=$):$=t[23],$},$t=({tickLine:r=!1,axisLine:t=!1,tickMargin:e=8,minTickGap:n=8,...o})=>l(q,{axisLine:t,minTickGap:n,tickLine:r,tickMargin:e,type:"category",...o}),At=r=>{const t=k(6),{variant:e,roundness:n,defaultIndex:o}=r;let s;t[0]!==n||t[1]!==e?(s=l(ot,{roundness:n,variant:e}),t[0]=n,t[1]=e,t[2]=s):s=t[2];let a;return t[3]!==o||t[4]!==s?(a=l(at,{content:s,cursor:!1,defaultIndex:o}),t[3]=o,t[4]=s,t[5]=a):a=t[5],a},S=r=>{const{x:t=0,y:e=0,width:n=0,height:o=0,id:s,dataKey:a,animationType:i="none",introStartedAt:d=0,dataLength:u=0}=r,g=typeof r.index=="number"?r.index:-1,f=ut(i,g,u,d),m=l(R,{fill:`url(#${s}-colors-${a})`,height:Math.max(0,o-3),radius:G,width:n,x:t,y:e});return b("g",{children:[l(R,{...r,fill:"transparent"}),f?l(K.g,{animate:f.animate,initial:f.initial,style:f.style,transition:f.transition,children:m}):m]})},ut=(r,t,e,n)=>{if(r==="none"||t<0||e<=0)return null;const o=t*lt*1e3,s=it*1e3,a=o+s,i=Date.now()-n;if(i>=a)return null;const d=i<=o?0:(i-o)/s,u={delay:Math.max(0,o-i)/1e3,duration:(a-Math.max(i,o))/1e3,ease:ct};return{animate:{scaleY:1},initial:{scaleY:d},style:{originY:1},transition:u}},ft=r=>{const t=k(16),{id:e,dataKey:n,config:o}=r;let s,a,i,d,u,g;if(t[0]!==o||t[1]!==n||t[2]!==e){const m=N(o[n]??{});s=`${e}-colors-${n}`,a="0",i="0",d="0",u="1",g=m===1?b(E,{children:[l("stop",{offset:"0%",stopColor:`var(--color-${n}-0)`}),l("stop",{offset:"100%",stopColor:`var(--color-${n}-0)`})]}):Array.from({length:m},(v,h)=>{const y=`${h/(m-1)*100}%`;return l("stop",{offset:y,stopColor:`var(--color-${n}-${h}, var(--color-${n}-0))`},y)}),t[0]=o,t[1]=n,t[2]=e,t[3]=s,t[4]=a,t[5]=i,t[6]=d,t[7]=u,t[8]=g}else s=t[3],a=t[4],i=t[5],d=t[6],u=t[7],g=t[8];let f;return t[9]!==s||t[10]!==a||t[11]!==i||t[12]!==d||t[13]!==u||t[14]!==g?(f=l("linearGradient",{id:s,x1:a,x2:i,y1:d,y2:u,children:g}),t[9]=s,t[10]=a,t[11]=i,t[12]=d,t[13]=u,t[14]=g,t[15]=f):f=t[15],f};export{bt as B,Q as C,Ct as E,At as T,$t as X,at as a,ot as b};
@@ -0,0 +1 @@
1
+ import{c as m}from"react/compiler-runtime";import{useState as h,useRef as $,useEffect as S}from"react";const d=(o="local")=>{try{return o==="local"?globalThis.localStorage:globalThis.sessionStorage}catch{return}},g=function(o,e="local"){try{const s=d(e)?.getItem(o)??void 0,t=s===void 0?[]:JSON.parse(s);return Array.isArray(t)?t:[]}catch{return[]}},I=(o,e,s="local")=>{const t=d(s);if(t!==void 0)try{t.setItem(o,JSON.stringify(e))}catch{}},A=(o,e="local")=>{try{d(e)?.removeItem(o)}catch{}},J=function(o,e){const s=m(10),t=e===void 0?"local":e;let i;s[0]!==o||s[1]!==t?(i=()=>g(o,t),s[0]=o,s[1]=t,s[2]=i):i=s[2];const[r,u]=h(i),a=$(`${t}:${o}`);let c,l;s[3]!==o||s[4]!==t||s[5]!==r?(c=()=>{const f=`${t}:${o}`;if(a.current!==f){a.current=f,u(g(o,t));return}I(o,r,t)},l=[o,t,r],s[3]=o,s[4]=t,s[5]=r,s[6]=c,s[7]=l):(c=s[6],l=s[7]),S(c,l);let n;return s[8]!==r?(n=[r,u],s[8]=r,s[9]=n):n=s[9],n},O=function(o,e,s){const t=m(6),i="local",[r,u]=J(o,i);let a;t[0]!==e||t[1]!==u?(a=f=>{u(v=>{const p=v[0]??e;return[typeof f=="function"?f(p):f]})},t[0]=e,t[1]=u,t[2]=a):a=t[2];const c=a,l=r[0]??e;let n;return t[3]!==c||t[4]!==l?(n=[l,c],t[3]=c,t[4]=l,t[5]=n):n=t[5],n},V=o=>globalThis.crypto?.randomUUID?.()??`${o}-${globalThis.performance.now().toString(36)}`;export{d as a,O as b,g as l,V as n,A as r,I as s,J as u};
@@ -0,0 +1 @@
1
+ import{Button as a}from"@base-ui/react/button";import{cva as n}from"class-variance-authority";import{c as d}from"./utils-bhneXptQ.js";import{jsx as o}from"react/jsx-runtime";const s=n("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-xs font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",xs:"h-6 gap-1 rounded-md px-2 text-xs has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-md px-2.5 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",icon:"size-8","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-md","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function v({className:e,variant:r="default",size:i="default",...t}){return o(a,{"data-slot":"button",className:d(s({variant:r,size:i,className:e})),...t})}export{v as B};
@@ -0,0 +1 @@
1
+ import{c as i}from"react/compiler-runtime";import{c as o}from"./utils-bhneXptQ.js";import{jsx as l}from"react/jsx-runtime";function p({className:d,size:e="default",...a}){return l("div",{"data-slot":"card","data-size":e,className:o("group/card flex flex-col gap-4 overflow-hidden rounded-xl border border-border bg-card py-4 text-xs/relaxed text-card-foreground shadow-xs has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-2 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-md *:[img:last-child]:rounded-md",d),...a})}function f(d){const e=i(8);let a,t;e[0]!==d?({className:a,...t}=d,e[0]=d,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=o("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-md px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",a),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=l("div",{"data-slot":"card-header",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}function u(d){const e=i(8);let a,t;e[0]!==d?({className:a,...t}=d,e[0]=d,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=o("font-heading text-sm font-medium group-data-[size=sm]/card:text-sm",a),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=l("div",{"data-slot":"card-title",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}function x(d){const e=i(8);let a,t;e[0]!==d?({className:a,...t}=d,e[0]=d,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=o("text-xs/relaxed text-muted-foreground",a),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=l("div",{"data-slot":"card-description",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}function g(d){const e=i(8);let a,t;e[0]!==d?({className:a,...t}=d,e[0]=d,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=o("px-4 group-data-[size=sm]/card:px-3",a),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=l("div",{"data-slot":"card-content",className:s,...t}),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}export{p as C,g as a,u as b,f as c,x as d};
@@ -0,0 +1 @@
1
+ const s="https://dash.cloudflare.com/?to=/:account",L=`${s}/workers-and-pages/observability`,o=`${s}/workers-and-pages`,R=`${s}/r2`,a=`${s}/workers/d1`,r=`${s}/workers/durable-objects`;export{o as C,L as a,a as b,r as c,R as d};
@@ -0,0 +1 @@
1
+ import{c as s}from"react/compiler-runtime";import{Checkbox as d}from"@base-ui/react/checkbox";import{c as l}from"./utils-bhneXptQ.js";import{HugeiconsIcon as m}from"@hugeicons/react";import{Tick02Icon as b}from"@hugeicons/core-free-icons";import{jsx as n}from"react/jsx-runtime";function v(c){const e=s(9);let r,i;e[0]!==c?({className:r,...i}=c,e[0]=c,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=l("peer relative flex size-4 shrink-0 items-center justify-center rounded-md border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=n(d.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:n(m,{icon:b,strokeWidth:2})}),e[5]=t):t=e[5];let o;return e[6]!==i||e[7]!==a?(o=n(d.Root,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=o):o=e[8],o}export{v as C};
@@ -0,0 +1 @@
1
+ const e="inline-flex items-center gap-1 rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",n=`${e} aria-pressed:bg-accent aria-pressed:text-accent-foreground`;export{e as C,n as a};
@@ -0,0 +1 @@
1
+ import{c as x}from"react/compiler-runtime";import{useT as w}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{h as y}from"./internal-CwaF9YNk.js";import{jsx as i,jsxs as u}from"react/jsx-runtime";const N=(l,e)=>{if(e==="")return[{match:!1,offset:0,text:l}];const a=[],s=l.toLowerCase(),o=e.toLowerCase();let t=0;for(let r=s.indexOf(o);r!==-1;r=s.indexOf(o,t))r>t&&a.push({match:!1,offset:t,text:l.slice(t,r)}),a.push({match:!0,offset:r,text:l.slice(r,r+e.length)}),t=r+e.length;return t<l.length&&a.push({match:!1,offset:t,text:l.slice(t)}),a},v=l=>{const e=x(9),{highlight:a,value:s}=l;if(s==null){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=i("span",{className:"text-muted-foreground/50 italic",children:"NULL"}),e[0]=n):n=e[0],n}let o,t,r;if(e[1]!==a||e[2]!==s){r=Symbol.for("react.early_return_sentinel");e:{const n=y(s);if(a===void 0||a===""){r=i("span",{title:n,children:n});break e}o=n,t=N(n,a).map(_)}e[1]=a,e[2]=s,e[3]=o,e[4]=t,e[5]=r}else o=e[3],t=e[4],r=e[5];if(r!==Symbol.for("react.early_return_sentinel"))return r;let d;return e[6]!==o||e[7]!==t?(d=i("span",{title:o,children:t}),e[6]=o,e[7]=t,e[8]=d):d=e[8],d},T=l=>{const e=x(22),{columns:a,rows:s}=l,o=w();let t;e[0]!==o?(t=o("Field"),e[0]=o,e[1]=t):t=e[1];let r;e[2]!==t?(r=i("th",{className:"border-b border-e border-border px-3 py-1.5 text-start font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:t}),e[2]=t,e[3]=r):r=e[3];let d;if(e[4]!==s||e[5]!==o){let c;e[7]!==o?(c=(b,p)=>i("th",{className:"border-b border-border px-3 py-1.5 text-start font-mono text-[11px] tracking-wide uppercase tabular-nums text-muted-foreground",children:o("Row {n}",{n:p+1})},p),e[7]=o,e[8]=c):c=e[8],d=s.map(c),e[4]=s,e[5]=o,e[6]=d}else d=e[6];let n;e[9]!==r||e[10]!==d?(n=i("thead",{className:"sticky top-0 z-10 bg-muted",children:u("tr",{children:[r,d]})}),e[9]=r,e[10]=d,e[11]=n):n=e[11];let f;if(e[12]!==a||e[13]!==s){let c;e[15]!==s?(c=b=>u("tr",{className:"hover:bg-muted/40",children:[i("th",{className:"border-b border-e border-border px-3 py-1.5 text-start font-mono font-medium whitespace-nowrap",scope:"row",children:b}),s.map((p,g)=>i("td",{className:"max-w-md truncate border-b border-border px-3 py-1.5 font-mono",children:i(v,{value:p[b]})},g))]},b),e[15]=s,e[16]=c):c=e[16],f=a.map(c),e[12]=a,e[13]=s,e[14]=f}else f=e[14];let m;e[17]!==f?(m=i("tbody",{children:f}),e[17]=f,e[18]=m):m=e[18];let h;return e[19]!==n||e[20]!==m?(h=i("div",{className:"min-h-0 flex-1 overflow-auto","data-testid":"db-transposed",children:u("table",{className:"border-collapse text-xs",children:[n,m]})}),e[19]=n,e[20]=m,e[21]=h):h=e[21],h},j=({children:l,layout:e="card",testId:a})=>i("div",{className:e==="fill"?"flex min-h-0 flex-1 flex-col overflow-hidden border-t border-border":"overflow-x-auto border border-border bg-card","data-testid":a,children:l});function _(l){return i("mark",{className:l.match?"rounded-sm bg-warning/40 text-foreground":"bg-transparent text-inherit",children:l.text},l.offset)}export{v as C,j as G,T};
@@ -0,0 +1 @@
1
+ const g=new Set(["contains","eq","gt","gte","lt","lte","ne"]),s=t=>{if(typeof t!="string")return;const r=t.trim();return r===""?void 0:r},p=t=>{if(t===null||typeof t!="object")return!1;const r=t;return typeof r.column=="string"&&typeof r.operator=="string"&&g.has(r.operator)},c=t=>{if(typeof t!="string"||t==="")return[];try{const r=JSON.parse(t);return Array.isArray(r)?r.filter(p):[]}catch{return[]}},f=t=>{if(typeof t!="string"||t==="")return;const r=t.lastIndexOf(":");if(r<=0)return;const o=t.slice(0,r),e=t.slice(r+1);if(!(e!=="asc"&&e!=="desc"))return{column:o,direction:e}},u=/^[\da-f]{16}$/u,h=t=>{const r={};if(typeof t.pins=="string"&&t.pins!==""){const d=t.pins.split(",").filter(l=>l!==""&&l.length<=64).slice(0,12);d.length>0&&(r.pins=d.join(","))}t.schema==="global"&&(r.schema="global");const o=s(t.table);o!==void 0&&(r.table=o);const e=s(t.shard);e!==void 0&&(r.shard=e);const a=s(t.search);a!==void 0&&(r.search=a);const i=s(t.order);i!==void 0&&f(i)!==void 0&&(r.order=i);const n=s(t.filters);return n!==void 0&&c(n).length>0&&(r.filters=n),r},b=t=>{const r=c(t.filters),o=f(t.order);return{filters:r.length>0?r:void 0,orderBy:o,search:typeof t.search=="string"&&t.search!==""?t.search:void 0,shard:typeof t.shard=="string"&&t.shard!==""?t.shard:void 0,table:typeof t.table=="string"&&t.table!==""?t.table:void 0,tier:t.schema==="global"?"global":"shard"}},v=t=>{const r=t.filters??[];return{filters:r.length>0?JSON.stringify(r):void 0,order:t.orderBy===void 0?void 0:`${t.orderBy.column}:${t.orderBy.direction}`,schema:t.tier==="global"?"global":void 0,search:t.search!==void 0&&t.search!==""?t.search:void 0,shard:t.shard!==void 0&&t.shard!==""?t.shard:void 0,table:t.table!==void 0&&t.table!==""?t.table:void 0}},y=t=>{const{version:r}=t;return typeof r=="string"&&u.test(r)?{version:r}:{}};export{h as a,v as d,b as s,y as v};
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import{c}from"react/compiler-runtime";import{Menu as i}from"@base-ui/react/menu";import{c as u}from"./utils-bhneXptQ.js";import{HugeiconsIcon as m}from"@hugeicons/react";import{Tick02Icon as g}from"@hugeicons/core-free-icons";import{jsx as s,jsxs as v}from"react/jsx-runtime";function N(n){const e=c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=s(i.Root,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=o):o=e[3],o}function z(n){const e=c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=s(i.Trigger,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=o):o=e[3],o}function D({align:n="start",alignOffset:e=0,side:t="bottom",sideOffset:o=4,className:a,...r}){return s(i.Portal,{children:s(i.Positioner,{className:"isolate z-50 outline-none",align:n,alignOffset:e,side:t,sideOffset:o,children:s(i.Popup,{"data-slot":"dropdown-menu-content",className:u("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!",a),...r})})})}function M(n){const e=c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=s(i.Group,{"data-slot":"dropdown-menu-group",...t}),e[2]=t,e[3]=o):o=e[3],o}function y(n){const e=c(10);let t,o,a;e[0]!==n?({className:t,inset:o,...a}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=a):(t=e[1],o=e[2],a=e[3]);let r;e[4]!==t?(r=u("px-2 py-2 text-xs text-muted-foreground data-inset:ps-7",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==o||e[7]!==a||e[8]!==r?(d=s(i.GroupLabel,{"data-slot":"dropdown-menu-label","data-inset":o,className:r,...a}),e[6]=o,e[7]=a,e[8]=r,e[9]=d):d=e[9],d}function I({className:n,inset:e,variant:t="default",...o}){return s(i.Item,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":t,className:u("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",n),...o})}function _(n){const e=c(15);let t,o,a,r,d;e[0]!==n?({className:a,children:o,checked:t,inset:r,...d}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=a,e[4]=r,e[5]=d):(t=e[1],o=e[2],a=e[3],r=e[4],d=e[5]);let l;e[6]!==a?(l=u("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",a),e[6]=a,e[7]=l):l=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=s("span",{className:"pointer-events-none absolute end-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:s(i.CheckboxItemIndicator,{children:s(m,{icon:g,strokeWidth:2})})}),e[8]=f):f=e[8];let p;return e[9]!==t||e[10]!==o||e[11]!==r||e[12]!==d||e[13]!==l?(p=v(i.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item","data-inset":r,className:l,checked:t,...d,children:[f,o]}),e[9]=t,e[10]=o,e[11]=r,e[12]=d,e[13]=l,e[14]=p):p=e[14],p}function C(n){const e=c(8);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=u("-mx-1 h-px bg-border",t),e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==o||e[6]!==a?(r=s(i.Separator,{"data-slot":"dropdown-menu-separator",className:a,...o}),e[5]=o,e[6]=a,e[7]=r):r=e[7],r}export{z as D,y as a,I as b,D as c,N as d,M as e,_ as f,C as g};
@@ -0,0 +1 @@
1
+ import{c as h}from"react/compiler-runtime";import{c as v}from"./utils-bhneXptQ.js";import{jsx as a,jsxs as u}from"react/jsx-runtime";const y=g=>{const e=h(19),{action:o,className:f,description:c,icon:m,testId:x,title:p}=g;let t;e[0]!==f?(t=v("flex flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border px-6 py-14 text-center",f),e[0]=f,e[1]=t):t=e[1];let s;e[2]!==m?(s=m!==void 0&&a("span",{className:"flex size-10 items-center justify-center rounded-lg bg-muted text-muted-foreground [&_svg]:size-5",children:m}),e[2]=m,e[3]=s):s=e[3];let l;e[4]!==p?(l=a("p",{className:"text-sm font-medium text-foreground",children:p}),e[4]=p,e[5]=l):l=e[5];let r;e[6]!==c?(r=c!==void 0&&a("p",{className:"max-w-sm text-sm text-muted-foreground",children:c}),e[6]=c,e[7]=r):r=e[7];let i;e[8]!==l||e[9]!==r?(i=u("div",{className:"flex flex-col gap-1",children:[l,r]}),e[8]=l,e[9]=r,e[10]=i):i=e[10];let d;e[11]!==o?(d=o!==void 0&&a("div",{className:"mt-1 flex items-center gap-2",children:o}),e[11]=o,e[12]=d):d=e[12];let n;return e[13]!==t||e[14]!==s||e[15]!==i||e[16]!==d||e[17]!==x?(n=u("div",{className:t,"data-testid":x,children:[s,i,d]}),e[13]=t,e[14]=s,e[15]=i,e[16]=d,e[17]=x,e[18]=n):n=e[18],n};export{y as E};
@@ -0,0 +1 @@
1
+ import{c as A}from"react/compiler-runtime";import{flattenHint as I}from"@lunora/errors";import{useT as O}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{e as j,a as q,b as E}from"./internal-CwaF9YNk.js";import{o as H}from"./recording-client-CKn4-vUx.js";import{u as S}from"./operation-console-provider-DoloEvon.js";import{A as T}from"./alert-C2SEhYS9.js";import{jsx as v,jsxs as U}from"react/jsx-runtime";const G=y=>{const e=A(38),{className:w,error:t,testId:N}=y,g=O(),o=S();let s,l,i,n,a,c,r,m;if(e[0]!==w||e[1]!==t||e[2]!==o||e[3]!==N){const k=j(t);let h;e[12]!==t?(h=q(t),e[12]=t,e[13]=h):h=e[13],l=h;let b;e[14]!==t?(b=H(t),e[14]=t,e[15]=b):b=e[15];const C=b;let x;e[16]!==o||e[17]!==C?(x=()=>{o?.openConsole({errorsOnly:!0,seq:C})},e[16]=o,e[17]=C,e[18]=x):x=e[18],i=x,s=T,n=w,a=N,c="destructive";let u;e[19]!==t?(u=E(t),e[19]=t,e[20]=u):u=e[20],e[21]!==u?(r=v("p",{className:"font-medium",children:u}),e[21]=u,e[22]=r):r=e[22],m=k===void 0?null:v("p",{className:"mt-1 whitespace-pre-wrap text-xs opacity-90",children:I(k)}),e[0]=w,e[1]=t,e[2]=o,e[3]=N,e[4]=s,e[5]=l,e[6]=i,e[7]=n,e[8]=a,e[9]=c,e[10]=r,e[11]=m}else s=e[4],l=e[5],i=e[6],n=e[7],a=e[8],c=e[9],r=e[10],m=e[11];let f;e[23]!==l?(f=l===void 0?null:v("a",{"aria-label":"View documentation for this error",className:"mt-1 inline-block text-xs underline",href:l,rel:"noreferrer",target:"_blank",children:"View error docs"}),e[23]=l,e[24]=f):f=e[24];let p;e[25]!==o||e[26]!==i||e[27]!==g?(p=o===void 0?null:v("button",{className:"mt-1 block text-xs underline outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":"error-show-in-console",onClick:i,type:"button",children:g("Show in console")}),e[25]=o,e[26]=i,e[27]=g,e[28]=p):p=e[28];let d;return e[29]!==s||e[30]!==n||e[31]!==a||e[32]!==c||e[33]!==r||e[34]!==m||e[35]!==f||e[36]!==p?(d=U(s,{className:n,testId:a,variant:c,children:[r,m,f,p]}),e[29]=s,e[30]=n,e[31]=a,e[32]=c,e[33]=r,e[34]=m,e[35]=f,e[36]=p,e[37]=d):d=e[37],d};export{G as E};
@@ -0,0 +1,6 @@
1
+ import{c as R}from"react/compiler-runtime";import{useState as M,useEffect as K}from"react";import{ConfirmButton as Q}from"./ConfirmButton-Cj2SOapE.js";import{D as J,a as A,b as D,c as F,d as G,e as I,f as v,g as U}from"./dropdown-menu-U7Tjg1Nb.js";import{M as H}from"./modal-shell-wGW4CKEW.js";import{useT as _}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{h as P,g as W,j as Y,f as z}from"./internal-CwaF9YNk.js";import{C as L}from"./control-button-BOZ5K-FC.js";import{jsx as d,jsxs as $}from"react/jsx-runtime";import{q as B}from"./quote-identifier-CGiYFBvY.js";const X=/["\n,]/u,Z=/^[=+\-@\t\r]/u,V=l=>{if(l==null)return"";let e;return typeof l=="string"?e=Z.test(l)?` ${l}`:l:typeof l=="number"||typeof l=="boolean"||typeof l=="bigint"?e=String(l):e=JSON.stringify(l),X.test(e)?`"${e.replaceAll('"','""')}"`:e},ee=(l,e)=>{const o=l.map(t=>V(t)).join(","),s=e.map(t=>l.map(n=>V(t[n])).join(","));return[o,...s].join(`
2
+ `)},te=l=>JSON.stringify(l,Y,2),q=500,le=l=>l==null?"NULL":typeof l=="number"?Number.isFinite(l)?String(l):"NULL":typeof l=="bigint"?String(l):typeof l=="boolean"?l?"1":"0":`'${(typeof l=="string"?l:JSON.stringify(l)).replaceAll("'","''")}'`,oe=(l,e,o)=>{if(e.length===0||o.length===0)return"";const s=e.map(n=>B(n)).join(", "),t=[];for(let n=0;n<o.length;n+=q){const r=o.slice(n,n+q).map(i=>` (${e.map(a=>le(i[a])).join(", ")})`).join(`,
3
+ `);t.push(`INSERT INTO ${B(l)} (${s}) VALUES
4
+ ${r};`)}return t.join(`
5
+
6
+ `)},O=(l,e,o)=>{if(!("document"in globalThis))return;const s=globalThis.URL.createObjectURL(new globalThis.Blob([e],{type:o})),t=globalThis.document.createElement("a");t.href=s,t.download=l,globalThis.document.body.append(t),t.click(),t.remove(),globalThis.URL.revokeObjectURL(s)},ne=l=>{const e=R(36),{columns:o,name:s,rows:t}=l,n=_();let r;e[0]!==o||e[1]!==s||e[2]!==t?(r=()=>{O(`${s}.csv`,ee(o,t),"text/csv;charset=utf-8")},e[0]=o,e[1]=s,e[2]=t,e[3]=r):r=e[3];const i=r;let a;e[4]!==s||e[5]!==t?(a=()=>{O(`${s}.json`,te(t),"application/json")},e[4]=s,e[5]=t,e[6]=a):a=e[6];const u=a;let f;e[7]!==o||e[8]!==s||e[9]!==t?(f=()=>{O(`${s}.sql`,oe(s,o,t),"application/sql;charset=utf-8")},e[7]=o,e[8]=s,e[9]=t,e[10]=f):f=e[10];const c=f,C=t.length===0;let p;e[11]!==C?(p=d(J,{className:L,"data-testid":"grid-export",disabled:C,title:"Exports only the rows loaded on the current page, not the whole table",children:"Export page"}),e[11]=C,e[12]=p):p=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=d(A,{children:"Export loaded rows"}),e[13]=g):g=e[13];let m;e[14]!==n?(m=n("CSV"),e[14]=n,e[15]=m):m=e[15];let y;e[16]!==i||e[17]!==m?(y=d(D,{"data-testid":"grid-export-csv",onClick:i,children:m}),e[16]=i,e[17]=m,e[18]=y):y=e[18];let N;e[19]!==n?(N=n("JSON"),e[19]=n,e[20]=N):N=e[20];let w;e[21]!==u||e[22]!==N?(w=d(D,{"data-testid":"grid-export-json",onClick:u,children:N}),e[21]=u,e[22]=N,e[23]=w):w=e[23];let S;e[24]!==n?(S=n("SQL"),e[24]=n,e[25]=S):S=e[25];let h;e[26]!==c||e[27]!==S?(h=d(D,{"data-testid":"grid-export-sql",onClick:c,children:S}),e[26]=c,e[27]=S,e[28]=h):h=e[28];let b;e[29]!==w||e[30]!==h||e[31]!==y?(b=$(F,{align:"end",children:[g,y,w,h]}),e[29]=w,e[30]=h,e[31]=y,e[32]=b):b=e[32];let x;return e[33]!==b||e[34]!==p?(x=$(G,{children:[p,b]}),e[33]=b,e[34]=p,e[35]=x):x=e[35],x},se=l=>{const e=R(9),{column:o}=l;let s;e[0]!==o?(s=()=>{o.toggleVisibility()},e[0]=o,e[1]=s):s=e[1];const t=s;let n;e[2]!==o?(n=o.getIsVisible(),e[2]=o,e[3]=n):n=e[3];const r=`grid-column-${o.id}`;let i;return e[4]!==o.id||e[5]!==t||e[6]!==n||e[7]!==r?(i=d(v,{checked:n,closeOnClick:!1,"data-testid":r,onCheckedChange:t,children:o.id}),e[4]=o.id,e[5]=t,e[6]=n,e[7]=r,e[8]=i):i=e[8],i},ie=[],re=({backRelations:l=ie,enabledBackRelations:e,onToggleBackRelation:o,table:s})=>{const t=_(),n=s.getIsAllColumnsVisible(),r=()=>{s.toggleAllColumnsVisible(!n)};return $(G,{children:[d(J,{className:L,"data-testid":"grid-columns",children:t("Columns")}),$(F,{align:"end",className:"max-h-80 overflow-y-auto",children:[$(I,{children:[d(A,{children:t("Columns")}),d(v,{checked:n,closeOnClick:!1,"data-testid":"grid-columns-all",onCheckedChange:r,children:t(n?"Hide all":"Show all")}),d(U,{}),s.getAllLeafColumns().filter(i=>!i.id.startsWith("__back__:")).map(i=>d(se,{column:i},i.id))]}),l.length>0&&o!==void 0&&$(I,{children:[d(U,{}),d(A,{children:t("Related")}),l.map(i=>{const a=`${i.table}.${i.column}`;return d(v,{checked:e?.has(a)===!0,closeOnClick:!1,"data-testid":`grid-back-relation-${a}`,onCheckedChange:()=>{o(a)},children:`← ${i.table}.${i.column}`},a)})]})]})]})},ce=l=>{const e=R(19),{count:o,editable:s,onClear:t,onDelete:n}=l,r=_();let i;e[0]!==o||e[1]!==r?(i=r("{count} selected",{count:o}),e[0]=o,e[1]=r,e[2]=i):i=e[2];let a;e[3]!==i?(a=d("span",{className:"font-medium tabular-nums","data-testid":"grid-selection-count",children:i}),e[3]=i,e[4]=a):a=e[4];let u;e[5]!==r?(u=r("Clear"),e[5]=r,e[6]=u):u=e[6];let f;e[7]!==t||e[8]!==u?(f=d("button",{className:L,"data-testid":"grid-selection-clear",onClick:t,type:"button",children:u}),e[7]=t,e[8]=u,e[9]=f):f=e[9];let c;e[10]!==o||e[11]!==s||e[12]!==n||e[13]!==r?(c=s&&d(Q,{confirmLabel:r("Delete {count} rows?",{count:o}),onConfirm:n,testId:"grid-selection-delete",children:r("Delete {count}",{count:o})}),e[10]=o,e[11]=s,e[12]=n,e[13]=r,e[14]=c):c=e[14];let C;return e[15]!==a||e[16]!==f||e[17]!==c?(C=$("div",{className:"flex items-center gap-2 rounded-md border border-border bg-accent/40 px-3 py-1.5 text-xs","data-testid":"grid-selection-bar",children:[a,f,c]}),e[15]=a,e[16]=f,e[17]=c,e[18]=C):C=e[18],C},ae=/\.(?:avif|bmp|gif|ico|jpe?g|png|svg|webp)$/iu,de=l=>{const e=R(9),{bucket:o,objectKey:s,resolveUrl:t}=l,[n,r]=M(null),[i,a]=M(!1);let u,f;e[0]!==o||e[1]!==s||e[2]!==t?(u=()=>{const g={cancelled:!1};return z((async()=>{try{const m=await t(s,o);g.cancelled||r(m)}catch{g.cancelled||a(!0)}})()),()=>{g.cancelled=!0}},f=[o,s,t],e[0]=o,e[1]=s,e[2]=t,e[3]=u,e[4]=f):(u=e[3],f=e[4]),K(u,f);let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{a(!0)},e[5]=c):c=e[5];const C=c;if(n===null||i)return null;let p;return e[6]!==s||e[7]!==n?(p=d("div",{className:"flex max-h-64 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted/30",children:d("img",{alt:s,className:"max-h-64 object-contain","data-testid":"grid-cell-image",onError:C,src:n})}),e[6]=s,e[7]=n,e[8]=p):p=e[8],p},Ne=l=>{const e=R(37),{bucket:o,column:s,onClose:t,resolveUrl:n,value:r}=l,i=_(),[a,u]=M(!1);let f;e[0]!==r?(f=P(r),e[0]=r,e[1]=f):f=e[1];const c=f;let C;e[2]!==c?(C=()=>{W(c)&&u(!0)},e[2]=c,e[3]=C):C=e[3];const p=C;let g;e[4]!==i?(g=i("Cell value"),e[4]=i,e[5]=g):g=e[5];let m;e[6]!==s?(m=d("h2",{className:"truncate font-mono text-sm font-semibold text-foreground",children:s}),e[6]=s,e[7]=m):m=e[7];let y;e[8]!==a||e[9]!==i?(y=i(a?"Copied":"Copy"),e[8]=a,e[9]=i,e[10]=y):y=e[10];let N;e[11]!==p||e[12]!==y?(N=d("button",{className:L,"data-testid":"grid-cell-copy",onClick:p,type:"button",children:y}),e[11]=p,e[12]=y,e[13]=N):N=e[13];let w;e[14]!==i?(w=i("Close"),e[14]=i,e[15]=w):w=e[15];let S;e[16]!==t||e[17]!==w?(S=d("button",{className:L,"data-testid":"grid-cell-close",onClick:t,type:"button",children:w}),e[16]=t,e[17]=w,e[18]=S):S=e[18];let h;e[19]!==N||e[20]!==S?(h=$("div",{className:"flex items-center gap-1.5",children:[N,S]}),e[19]=N,e[20]=S,e[21]=h):h=e[21];let b;e[22]!==m||e[23]!==h?(b=$("div",{className:"flex items-center justify-between",children:[m,h]}),e[22]=m,e[23]=h,e[24]=b):b=e[24];let x;e[25]!==o||e[26]!==n||e[27]!==r?(x=n!==void 0&&typeof r=="string"&&ae.test(r)&&d(de,{bucket:o,objectKey:r,resolveUrl:n}),e[25]=o,e[26]=n,e[27]=r,e[28]=x):x=e[28];let k;e[29]!==c?(k=d("pre",{className:"min-h-0 flex-1 overflow-auto rounded-md border border-border bg-muted/30 p-3 font-mono text-xs whitespace-pre-wrap","data-testid":"grid-cell-value",children:c}),e[29]=c,e[30]=k):k=e[30];let T;return e[31]!==t||e[32]!==b||e[33]!==x||e[34]!==k||e[35]!==g?(T=$(H,{className:"max-h-[70vh] w-[min(40rem,90vw)]",label:g,onClose:t,panelTestId:"grid-cell-dialog",testId:"grid-cell-dialog-overlay",variant:"dialog",children:[b,x,k]}),e[31]=t,e[32]=b,e[33]=x,e[34]=k,e[35]=g,e[36]=T):T=e[36],T},Se=l=>{const e=R(36),{backRelations:o,enabledBackRelations:s,onToggleBackRelation:t,columns:n,editable:r,name:i,onBulkDelete:a,onToggleTranspose:u,rows:f,table:c,transposed:C}=l,p=_();let g;e[0]!==c?(g=c.getSelectedRowModel(),e[0]=c,e[1]=g):g=e[1];const m=g.rows;let y;e[2]!==c?(y=()=>{c.resetRowSelection()},e[2]=c,e[3]=y):y=e[3];const N=y;let w;e[4]!==a||e[5]!==m||e[6]!==c?(w=()=>{a(m.map(fe)),c.resetRowSelection()},e[4]=a,e[5]=m,e[6]=c,e[7]=w):w=e[7];const S=w;let h;e[8]!==n||e[9]!==i||e[10]!==f?(h=d(ne,{columns:n,name:i,rows:f}),e[8]=n,e[9]=i,e[10]=f,e[11]=h):h=e[11];let b;e[12]!==o||e[13]!==s||e[14]!==t||e[15]!==c?(b=d(re,{backRelations:o,enabledBackRelations:s,onToggleBackRelation:t,table:c}),e[12]=o,e[13]=s,e[14]=t,e[15]=c,e[16]=b):b=e[16];let x;e[17]!==p?(x=p("Swap rows and columns"),e[17]=p,e[18]=x):x=e[18];let k;e[19]!==p?(k=p("Transpose"),e[19]=p,e[20]=k):k=e[20];let T;e[21]!==u||e[22]!==x||e[23]!==k||e[24]!==C?(T=d("button",{"aria-pressed":C,className:L,"data-testid":"grid-transpose",onClick:u,title:x,type:"button",children:k}),e[21]=u,e[22]=x,e[23]=k,e[24]=C,e[25]=T):T=e[25];let j;e[26]!==r||e[27]!==N||e[28]!==S||e[29]!==m.length?(j=m.length>0&&d(ce,{count:m.length,editable:r,onClear:N,onDelete:S}),e[26]=r,e[27]=N,e[28]=S,e[29]=m.length,e[30]=j):j=e[30];let E;return e[31]!==h||e[32]!==b||e[33]!==T||e[34]!==j?(E=$("div",{className:"flex flex-wrap items-center gap-1.5","data-testid":"grid-actions",children:[h,b,T,j]}),e[31]=h,e[32]=b,e[33]=T,e[34]=j,e[35]=E):E=e[35],E};function fe(l){return l.id}export{Ne as C,ne as E,Se as G,ce as S};
@@ -0,0 +1,3 @@
1
+ import{c as $}from"react/compiler-runtime";import{useNavigate as Je}from"@tanstack/react-router";import{useState as Ue,useEffect as Ke,Suspense as st,lazy as nt}from"react";import{B as Ye}from"./badge-cAk9Di1Q.js";import{C as B,a as Ze}from"./card-BGlQzQY-.js";import{E as lt}from"./empty-state-B939z6K2.js";import{u as _e}from"./use-admin-query-P0RJrjsD.js";import{useT as I}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{ADMIN_FUNCTIONS as Ne}from"./ADMIN_FUNCTIONS-B6z7VLYt.js";import{c as at,f as Se,d as rt,r as ot,g as it,l as ct}from"./internal-CwaF9YNk.js";import{c as Xe}from"./utils-bhneXptQ.js";import{deriveInsights as dt}from"./DEFAULT_INSIGHT_THRESHOLDS-1Lrg55IV.js";import{useLunora as et}from"@lunora/react";import{jsx as l,jsxs as h}from"react/jsx-runtime";import{B as Ve}from"./button-BOPLD1un.js";const ut=at(Ne.studioFeatures),tt={analytics:!0,auth:!0,containers:!0,flags:!0,kv:!0,mail:!0,notifications:!0,payments:!0,queues:!0,scheduler:!0,storage:!0,vectors:!0,workflows:!0},mt=t=>{if(t===null||typeof t!="object")return tt;const e=t,n=s=>typeof e[s]=="boolean"?e[s]:!0;return{analytics:n("analytics"),auth:n("auth"),containers:n("containers"),flags:n("flags"),kv:n("kv"),mail:n("mail"),notifications:n("notifications"),payments:n("payments"),queues:n("queues"),scheduler:n("scheduler"),storage:n("storage"),vectors:n("vectors"),workflows:n("workflows")}},ft=()=>{const t=$(3),e=et(),[n,s]=Ue(tt);let a,r;return t[0]!==e?(a=()=>{Se((async()=>{try{s(mt(await e.query(ut,{},rt(""))))}catch{}})())},r=[e],t[0]=e,t[1]=a,t[2]=r):(a=t[1],r=t[2]),Ke(a,r),n},pt=()=>{const t=$(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=l("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.6,viewBox:"0 0 24 24",children:l("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"})}),t[0]=e):e=t[0],e},ht=t=>{const e=$(24),{group:n}=t,s=I(),a=Je();let r;e[0]!==n.tab||e[1]!==a?(r=()=>{Se(a({to:`/${n.tab}`}))},e[0]=n.tab,e[1]=a,e[2]=r):r=e[2];const o=r,i=n.bindings.length;let c;e[3]!==n.label?(c=l("span",{className:"text-sm font-medium text-foreground",children:n.label}),e[3]=n.label,e[4]=c):c=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=l(pt,{}),e[5]=m):m=e[5];let d;e[6]!==c?(d=h("div",{className:"flex items-center justify-between",children:[c,m]}),e[6]=c,e[7]=d):d=e[7];let f;e[8]!==i||e[9]!==s?(f=i===1?s("1 binding"):s("{count} bindings",{count:i}),e[8]=i,e[9]=s,e[10]=f):f=e[10];let u;e[11]!==f?(u=l("span",{className:"text-xs text-muted-foreground",children:f}),e[11]=f,e[12]=u):u=e[12];let p;e[13]!==i||e[14]!==n.bindings?(p=i>0&&l("div",{className:"flex flex-wrap gap-1.5",children:n.bindings.map(bt)}),e[13]=i,e[14]=n.bindings,e[15]=p):p=e[15];let g;e[16]!==d||e[17]!==u||e[18]!==p?(g=h(Ze,{className:"flex flex-col gap-2 py-4",children:[d,u,p]}),e[16]=d,e[17]=u,e[18]=p,e[19]=g):g=e[19];let x;return e[20]!==n.testId||e[21]!==o||e[22]!==g?(x=l(B,{className:"cursor-pointer gap-0 py-0 transition-colors hover:bg-muted/40","data-testid":n.testId,onClick:o,children:g}),e[20]=n.testId,e[21]=o,e[22]=g,e[23]=x):x=e[23],x},We=["kv","files","vectors"],gt=(t,e)=>[...t.filter(n=>n.tab!==e.tab),e].toSorted((n,s)=>We.indexOf(n.tab)-We.indexOf(s.tab)),xt=()=>{const t=$(19),e=et(),n=ft(),s=I();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],t[0]=a):a=t[0];const[r,o]=Ue(a);let i,c;if(t[1]!==e||t[2]!==n.kv||t[3]!==n.storage||t[4]!==n.vectors||t[5]!==s?(i=()=>{const g={cancelled:!1},x=[{enabled:n.kv,label:s("KV Namespaces"),load:async()=>(await e.listKvNamespaces()).map(yt),tab:"kv",testId:"home-binding-kv"},{enabled:n.storage,label:s("R2 Buckets"),load:()=>e.listStorageBuckets(),tab:"files",testId:"home-binding-r2"},{enabled:n.vectors,label:s("Vectorize Indexes"),load:async()=>(await e.listVectorIndexes()).map(vt),tab:"vectors",testId:"home-binding-vectors"}];for(const b of x)b.enabled&&Se((async()=>{try{const y=await b.load();if(!g.cancelled){const S={bindings:y,label:b.label,tab:b.tab,testId:b.testId};o(A=>gt(A,S))}}catch{}})());return()=>{g.cancelled=!0}},c=[e,n.kv,n.storage,n.vectors,s],t[1]=e,t[2]=n.kv,t[3]=n.storage,t[4]=n.vectors,t[5]=s,t[6]=i,t[7]=c):(i=t[6],c=t[7]),Ke(i,c),r.length===0)return null;let m;t[8]!==s?(m=s("Bindings"),t[8]=s,t[9]=m):m=t[9];let d;t[10]!==m?(d=l("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:m}),t[10]=m,t[11]=d):d=t[11];let f;t[12]!==r?(f=r.map(Nt),t[12]=r,t[13]=f):f=t[13];let u;t[14]!==f?(u=l("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:f}),t[14]=f,t[15]=u):u=t[15];let p;return t[16]!==d||t[17]!==u?(p=h("section",{className:"flex flex-col gap-3","data-testid":"home-bindings",children:[d,u]}),t[16]=d,t[17]=u,t[18]=p):p=t[18],p};function bt(t){return l(Ye,{variant:"secondary",children:t},t)}function yt(t){return t.binding}function vt(t){return t.name}function Nt(t){return l(ht,{group:t},t.tab)}const _t=[{name:"lunora_list_functions",summary:"list every query, mutation, and action with its path"},{name:"lunora_list_tables",summary:"list the schema's tables"},{name:"lunora_get_function_schema",summary:"read a function's argument JSON Schema before calling it"},{name:"lunora_run_query",summary:"run a read-only query"},{name:"lunora_run_mutation",summary:"run a mutation — writes; only when LUNORA_MCP_ALLOW_WRITES is set"},{name:"lunora_run_action",summary:"run an action — writes/effects; only when LUNORA_MCP_ALLOW_WRITES is set"}],St=t=>JSON.stringify({mcpServers:{lunora:{args:["-y","@lunora/mcp"],command:"npx",env:{LUNORA_ADMIN_TOKEN:"<your-admin-token>",LUNORA_URL:t}}}},null,2),kt=t=>{const e=_t.map(n=>`- ${n.name} — ${n.summary}`).join(`
2
+ `);return[`You have a Lunora MCP server connected to the deployment at ${t}.`,"It exposes this backend's functions and schema so you can inspect and operate it:",e,"",`Start by calling lunora_list_functions and lunora_list_tables to learn what exists, then lunora_get_function_schema before any run call. The full HTTP API is also documented at ${t}/_lunora/admin/openapi (that endpoint needs the same admin token the MCP server is configured with).`].join(`
3
+ `)},Ct=1500,wt=()=>{const t=$(35),e=I();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=ot(),t[0]=n):n=t[0];const s=n,[a,r]=Ue(null);let o,i;t[1]!==a?(o=()=>{if(a===null)return;const L=globalThis.setTimeout(()=>{r(null)},Ct);return()=>{globalThis.clearTimeout(L)}},i=[a],t[1]=a,t[2]=o,t[3]=i):(o=t[2],i=t[3]),Ke(o,i);let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=(L,M)=>{it(M)&&r(L)},t[4]=c):c=t[4];const m=c;let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{m("config",St(s))},t[5]=d):d=t[5];const f=d;let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{m("prompt",kt(s))},t[6]=u):u=t[6];const p=u;let g;t[7]!==e?(g=e("Connect an AI agent"),t[7]=e,t[8]=g):g=t[8];let x;t[9]!==g?(x=l("span",{className:"text-sm font-medium text-foreground",children:g}),t[9]=g,t[10]=x):x=t[10];let b;t[11]!==e?(b=e("Drive this deployment from an AI agent over the Model Context Protocol — it can list functions and tables, read schemas, and run read-only queries. Writes stay off unless you opt in."),t[11]=e,t[12]=b):b=t[12];let y;t[13]!==b?(y=l("span",{className:"text-xs text-muted-foreground",children:b}),t[13]=b,t[14]=y):y=t[14];let S;t[15]!==x||t[16]!==y?(S=h("div",{className:"flex flex-col gap-1.5 p-4",children:[x,y]}),t[15]=x,t[16]=y,t[17]=S):S=t[17];let A;t[18]===Symbol.for("react.memo_cache_sentinel")?(A=l("code",{className:"font-mono text-xs text-muted-foreground","data-testid":"home-connect-agent-command",children:"npx -y @lunora/mcp"}),t[18]=A):A=t[18];let k;t[19]!==a||t[20]!==e?(k=e(a==="config"?"Copied":"Copy MCP config"),t[19]=a,t[20]=e,t[21]=k):k=t[21];let v;t[22]!==k?(v=l(Ve,{"data-testid":"home-connect-agent-copy-config",onClick:f,size:"xs",variant:"outline",children:k}),t[22]=k,t[23]=v):v=t[23];let C;t[24]!==a||t[25]!==e?(C=e(a==="prompt"?"Copied":"Copy agent prompt"),t[24]=a,t[25]=e,t[26]=C):C=t[26];let w;t[27]!==C?(w=l(Ve,{"data-testid":"home-connect-agent-copy-prompt",onClick:p,size:"xs",variant:"outline",children:C}),t[27]=C,t[28]=w):w=t[28];let N;t[29]!==v||t[30]!==w?(N=h("div",{className:"flex flex-col gap-3 border-t border-border bg-muted/50 px-4 py-3",children:[A,h("div",{className:"flex flex-wrap gap-2",children:[v,w]})]}),t[29]=v,t[30]=w,t[31]=N):N=t[31];let _;return t[32]!==S||t[33]!==N?(_=h(B,{className:"gap-0 py-0","data-testid":"home-connect-agent",children:[S,N]}),t[32]=S,t[33]=N,t[34]=_):_=t[34],_},$t=nt(()=>import("../packem_chunks/sparkline.js")),qe=t=>{if(t<1e3)return`${String(Math.round(t))}ms`;const e=t>=1e4?0:1;return`${(t/1e3).toFixed(e)}s`},At=(t,e)=>{const n=Math.max(0,Math.round((e-t)/1e3));if(n<60)return`${String(n)}s ago`;const s=Math.round(n/60);if(s<60)return`${String(s)}m ago`;const a=Math.round(s/60);return a<24?`${String(a)}h ago`:`${String(Math.round(a/24))}d ago`},Qe=(t,e)=>{if(t===void 0||t.length===0)return[];const n=new Map;for(const s of t)n.set(s.bucketMs,(n.get(s.bucketMs)??0)+s[e]);return[...n.entries()].toSorted(([s],[a])=>s-a).map(([,s])=>s)},He=(t,e=!0)=>{if(t.length<4)return null;const n=Math.floor(t.length/2),s=t.slice(0,n).reduce((o,i)=>o+i,0),a=t.slice(n).reduce((o,i)=>o+i,0);if(s===0)return null;const r=(a-s)/s*100;return{positive:e?r>=0:r<=0,text:`${r>=0?"+":""}${r.toFixed(1)}%`}},Re=t=>{const e=$(24),{delta:n,footer:s,label:a,trend:r,unit:o,value:i}=t,c=I();let m;e[0]!==a?(m=l("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:a}),e[0]=a,e[1]=m):m=e[1];let d;e[2]!==i?(d=l("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:i}),e[2]=i,e[3]=d):d=e[3];let f;e[4]!==o?(f=o!==void 0&&l("span",{className:"text-xs text-muted-foreground",children:o}),e[4]=o,e[5]=f):f=e[5];let u;e[6]!==d||e[7]!==f?(u=h("span",{className:"flex items-baseline gap-1.5",children:[d,f]}),e[6]=d,e[7]=f,e[8]=u):u=e[8];let p;e[9]!==r?(p=r!==void 0&&l(st,{fallback:l("div",{"aria-hidden":"true",className:"h-8 w-28"}),children:l($t,{data:r})}),e[9]=r,e[10]=p):p=e[10];let g;e[11]!==u||e[12]!==p?(g=h("div",{className:"flex items-center justify-between gap-3",children:[u,p]}),e[11]=u,e[12]=p,e[13]=g):g=e[13];let x;e[14]!==m||e[15]!==g?(x=h("div",{className:"flex flex-col gap-2.5 p-4",children:[m,g]}),e[14]=m,e[15]=g,e[16]=x):x=e[16];let b;e[17]!==n||e[18]!==s||e[19]!==c?(b=n==null?s!=null&&l("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:s}):h("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px]",children:[l("span",{className:Xe("font-semibold",n.positive?"text-success":"text-destructive"),children:n.text})," ",l("span",{className:"text-muted-foreground",children:c("vs. prev.")})]}),e[17]=n,e[18]=s,e[19]=c,e[20]=b):b=e[20];let y;return e[21]!==x||e[22]!==b?(y=h(B,{className:"justify-between gap-0 py-0",children:[x,b]}),e[21]=x,e[22]=b,e[23]=y):y=e[23],y},Lt=()=>{const t=$(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=l("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:l("path",{d:"m9 6 6 6-6 6"})}),t[0]=e):e=t[0],e},Fe=t=>{const e=$(7),{command:n,label:s}=t;let a;e[0]!==s?(a=l("div",{className:"p-4",children:l("span",{className:"text-sm font-medium text-foreground",children:s})}),e[0]=s,e[1]=a):a=e[1];let r;e[2]!==n?(r=l("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5",children:l("code",{className:"font-mono text-xs text-muted-foreground",children:n})}),e[2]=n,e[3]=r):r=e[3];let o;return e[4]!==a||e[5]!==r?(o=h(B,{className:"justify-between gap-0 py-0",children:[a,r]}),e[4]=a,e[5]=r,e[6]=o):o=e[6],o},Ge=t=>{const e=$(18),{count:n,onView:s,testId:a,title:r}=t,o=I();let i;e[0]!==r?(i=l("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:r}),e[0]=r,e[1]=i):i=e[1];let c;e[2]!==n||e[3]!==o?(c=n===null?l("span",{className:"text-xs text-muted-foreground",children:o("No data yet")}):l(Ye,{variant:n>0?"destructive":"success",children:n>0?n:o("All clear")}),e[2]=n,e[3]=o,e[4]=c):c=e[4];let m;e[5]!==i||e[6]!==c?(m=h("div",{className:"flex items-start justify-between gap-2 p-4",children:[i,c]}),e[5]=i,e[6]=c,e[7]=m):m=e[7];let d;e[8]!==o?(d=o("View"),e[8]=o,e[9]=d):d=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=l(Lt,{}),e[10]=f):f=e[10];let u;e[11]!==s||e[12]!==d?(u=h("button",{className:"flex items-center gap-1 border-t border-border bg-muted/50 px-4 py-2.5 text-[12px] font-medium text-foreground outline-none transition-colors hover:bg-muted focus-visible:bg-muted",onClick:s,type:"button",children:[d,f]}),e[11]=s,e[12]=d,e[13]=u):u=e[13];let p;return e[14]!==m||e[15]!==u||e[16]!==a?(p=h(B,{className:"justify-between gap-0 py-0","data-testid":a,children:[m,u]}),e[14]=m,e[15]=u,e[16]=a,e[17]=p):p=e[17],p},Mt=t=>{const e=$(7),{functions:n}=t,s=I();let a;if(e[0]!==n||e[1]!==s){const r=[...n].toSorted(Rt).slice(0,5);let o;e[3]!==s?(o=s("Top functions"),e[3]=s,e[4]=o):o=e[4];let i;e[5]!==o?(i=l("div",{className:"border-b border-border px-4 py-3",children:l("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:o})}),e[5]=o,e[6]=i):i=e[6],a=h(B,{className:"gap-0 py-0","data-testid":"home-top-functions",children:[i,r.length===0?l("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:s("No functions called yet.")}):h("div",{className:"divide-y divide-border",children:[h("div",{className:"grid grid-cols-[1fr_auto_auto_auto] gap-4 px-4 py-1.5 font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:[l("span",{children:s("Function")}),l("span",{className:"text-end",children:s("Calls")}),l("span",{className:"w-12 text-end",children:s("Avg")}),l("span",{className:"w-8 text-end",children:s("Err")})]}),r.map(Et)]})]}),e[0]=n,e[1]=s,e[2]=a}else a=e[2];return a},It=t=>{const e=$(26),{subs:n}=t,s=I();let a;e[0]!==s?(a=s("Live connections"),e[0]=s,e[1]=a):a=e[1];let r;e[2]!==a?(r=l("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:a}),e[2]=a,e[3]=r):r=e[3];const o=n?.totalConnections??0;let i;e[4]!==o?(i=o.toLocaleString(),e[4]=o,e[5]=i):i=e[5];let c;e[6]!==i?(c=l("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:i}),e[6]=i,e[7]=c):c=e[7];let m;e[8]!==s?(m=s("sockets"),e[8]=s,e[9]=m):m=e[9];let d;e[10]!==m?(d=l("span",{className:"text-xs text-muted-foreground",children:m}),e[10]=m,e[11]=d):d=e[11];let f;e[12]!==c||e[13]!==d?(f=h("span",{className:"flex items-baseline gap-1.5",children:[c,d]}),e[12]=c,e[13]=d,e[14]=f):f=e[14];const u=n?.totalSubscriptions??0;let p;e[15]!==u?(p=u.toLocaleString(),e[15]=u,e[16]=p):p=e[16];let g;e[17]!==s?(g=s("active subscriptions"),e[17]=s,e[18]=g):g=e[18];let x;e[19]!==p||e[20]!==g?(x=h("span",{className:"text-[11px] text-muted-foreground",children:[p," ",g]}),e[19]=p,e[20]=g,e[21]=x):x=e[21];let b;return e[22]!==x||e[23]!==r||e[24]!==f?(b=l(B,{"data-testid":"home-live-connections",children:h(Ze,{className:"flex flex-col gap-2.5 py-4",children:[r,f,x]})}),e[22]=x,e[23]=r,e[24]=f,e[25]=b):b=e[25],b},Tt=t=>{const e=$(7),{entries:n}=t,s=I();let a;if(e[0]!==n||e[1]!==s){const r=Date.now();let o;e[3]!==s?(o=s("Recent activity"),e[3]=s,e[4]=o):o=e[4];let i;e[5]!==o?(i=l("div",{className:"border-b border-border px-4 py-3",children:l("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:o})}),e[5]=o,e[6]=i):i=e[6],a=h(B,{className:"gap-0 py-0","data-testid":"home-recent-activity",children:[i,n.length===0?l("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:s("No recent activity.")}):l("ul",{className:"divide-y divide-border",children:n.slice(0,5).map(c=>h("li",{className:"flex items-center justify-between gap-3 px-4 py-2 text-[13px]",children:[h("span",{className:"flex min-w-0 items-center gap-2",children:[l("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-muted-foreground/40"}),h("span",{className:"truncate text-foreground",children:[c.op,c.table!==void 0&&h("span",{className:"text-muted-foreground",children:[" · ",c.table,c.id===void 0?"":`#${c.id}`]})]})]}),l("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:At(c.ts,r)})]},c.seq))})]}),e[0]=n,e[1]=s,e[2]=a}else a=e[2];return a},Ot=t=>{const e=t.reduce((n,s)=>n+s.calls,0);return e===0?null:t.reduce((n,s)=>n+s.totalDurationMs,0)/e},Zt=t=>{const e=$(151),{initialShardKey:n}=t,s=I(),a=Je(),r=n??"";let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={},e[0]=o):o=e[0];let i;e[1]!==r?(i={shardKey:r},e[1]=r,e[2]=i):i=e[2];const c=_e(Ne.getMetrics,o,i);let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m={},e[3]=m):m=e[3];let d;e[4]!==r?(d={shardKey:r},e[4]=r,e[5]=d):d=e[5];const f=_e(Ne.getFunctionStats,m,d);let u,p;e[6]===Symbol.for("react.memo_cache_sentinel")?(u={},p={shardKey:""},e[6]=u,e[7]=p):(u=e[6],p=e[7]);const g=_e(Ne.getSecurityAudit,u,p);let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x={},e[8]=x):x=e[8];let b;e[9]!==r?(b={shardKey:r},e[9]=r,e[10]=b):b=e[10];const y=_e(Ne.listSubscriptions,x,b);let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S={},e[11]=S):S=e[11];let A;e[12]!==r?(A={shardKey:r},e[12]=r,e[13]=A):A=e[13];const k=_e(Ne.getAuditLog,S,A),v=c.data??null;let C,w,N,_,L,M,D,T,O,P,F,q,R,E,U,K,z,V;if(e[14]!==k.data||e[15]!==g.data||e[16]!==v||e[17]!==c.data||e[18]!==a||e[19]!==f.data||e[20]!==y.data||e[21]!==s){_=Array.isArray(f.data?.functions)?f.data.functions:[],D=y.data??null;let $e;e[40]!==k.data?($e=Array.isArray(k.data?.entries)?k.data.entries:[],e[40]=k.data,e[41]=$e):$e=e[41],w=$e,L=c.data===void 0||f.data===void 0?null:dt(v,_).length,M=Array.isArray(g.data?.findings)?g.data.findings.length:null;let Ae;e[42]!==a?(Ae=()=>{Se(a({to:"/security"}))},e[42]=a,e[43]=Ae):Ae=e[43],V=Ae;let Le;e[44]!==a?(Le=()=>{Se(a({to:"/insights"}))},e[44]=a,e[45]=Le):Le=e[45],z=Le;const Me=Qe(v?.history,"calls"),Ie=Qe(v?.history,"errors"),ze=Ot(_),Te=Math.max(0,..._.map(jt)),j=v?.cache;let Oe;e[46]!==j?(Oe=j!=null&&j.hits+j.misses>0?Math.round(j.hits/(j.hits+j.misses)*100):null,e[46]=j,e[47]=Oe):Oe=e[47],N=Oe,U="flex flex-col gap-6",K="lunora-home",F="grid gap-3 sm:grid-cols-2 xl:grid-cols-4",q="home-health";const je=He(Me);let xe;e[48]!==s?(xe=s("Requests"),e[48]=s,e[49]=xe):xe=e[49];const Be=v?.requests??0;let be;e[50]!==Be?(be=Be.toLocaleString(),e[50]=Be,e[51]=be):be=e[51],e[52]!==Me||e[53]!==je||e[54]!==xe||e[55]!==be?(R=l(Re,{delta:je,label:xe,trend:Me,value:be}),e[52]=Me,e[53]=je,e[54]=xe,e[55]=be,e[56]=R):R=e[56];const De=He(Ie,!1);let ye;e[57]!==s?(ye=s("Errors"),e[57]=s,e[58]=ye):ye=e[58];const Pe=v?.errors??0;let ve;e[59]!==Pe?(ve=Pe.toLocaleString(),e[59]=Pe,e[60]=ve):ve=e[60],e[61]!==Ie||e[62]!==De||e[63]!==ye||e[64]!==ve?(E=l(Re,{delta:De,label:ye,trend:Ie,value:ve}),e[61]=Ie,e[62]=De,e[63]=ye,e[64]=ve,e[65]=E):E=e[65],C=Re,e[66]!==Te||e[67]!==s?(T=Te>0?`${s("max")} ${qe(Te)}`:void 0,e[66]=Te,e[67]=s,e[68]=T):T=e[68],e[69]!==s?(O=s("Avg latency"),e[69]=s,e[70]=O):O=e[70],P=ze===null?"—":qe(ze),e[14]=k.data,e[15]=g.data,e[16]=v,e[17]=c.data,e[18]=a,e[19]=f.data,e[20]=y.data,e[21]=s,e[22]=C,e[23]=w,e[24]=N,e[25]=_,e[26]=L,e[27]=M,e[28]=D,e[29]=T,e[30]=O,e[31]=P,e[32]=F,e[33]=q,e[34]=R,e[35]=E,e[36]=U,e[37]=K,e[38]=z,e[39]=V}else C=e[22],w=e[23],N=e[24],_=e[25],L=e[26],M=e[27],D=e[28],T=e[29],O=e[30],P=e[31],F=e[32],q=e[33],R=e[34],E=e[35],U=e[36],K=e[37],z=e[38],V=e[39];let W;e[71]!==C||e[72]!==T||e[73]!==O||e[74]!==P?(W=l(C,{footer:T,label:O,value:P}),e[71]=C,e[72]=T,e[73]=O,e[74]=P,e[75]=W):W=e[75];let Q;e[76]!==N||e[77]!==s?(Q=N===null?void 0:`${String(N)}% ${s("cache hit")}`,e[76]=N,e[77]=s,e[78]=Q):Q=e[78];let H;e[79]!==s?(H=s("Database size"),e[79]=s,e[80]=H):H=e[80];const Ee=v?.databaseSize??null;let G;e[81]!==Ee?(G=ct(Ee),e[81]=Ee,e[82]=G):G=e[82];let J;e[83]!==Q||e[84]!==H||e[85]!==G?(J=l(Re,{footer:Q,label:H,value:G}),e[83]=Q,e[84]=H,e[85]=G,e[86]=J):J=e[86];let Y;e[87]!==F||e[88]!==q||e[89]!==R||e[90]!==E||e[91]!==W||e[92]!==J?(Y=h("div",{className:F,"data-testid":q,children:[R,E,W,J]}),e[87]=F,e[88]=q,e[89]=R,e[90]=E,e[91]=W,e[92]=J,e[93]=Y):Y=e[93];let ke;e[94]===Symbol.for("react.memo_cache_sentinel")?(ke=l(xt,{}),e[94]=ke):ke=e[94];let Z;e[95]!==_?(Z=l("div",{className:"lg:col-span-2",children:l(Mt,{functions:_})}),e[95]=_,e[96]=Z):Z=e[96];let X;e[97]!==D?(X=l(It,{subs:D}),e[97]=D,e[98]=X):X=e[98];let ee;e[99]!==w?(ee=l(Tt,{entries:w}),e[99]=w,e[100]=ee):ee=e[100];let te;e[101]!==X||e[102]!==ee?(te=h("div",{className:"flex flex-col gap-3",children:[X,ee]}),e[101]=X,e[102]=ee,e[103]=te):te=e[103];let se;e[104]!==Z||e[105]!==te?(se=h("div",{className:"grid gap-3 lg:grid-cols-3",children:[Z,te]}),e[104]=Z,e[105]=te,e[106]=se):se=e[106];let ne;e[107]!==s?(ne=s("Advisors"),e[107]=s,e[108]=ne):ne=e[108];let le;e[109]!==ne?(le=l("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:ne}),e[109]=ne,e[110]=le):le=e[110];let ae;e[111]!==L||e[112]!==M||e[113]!==s||e[114]!==z||e[115]!==V?(ae=M===0&&L===0?l(lt,{description:s("No security or performance issues detected."),icon:h("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[l("path",{d:"M12 3 4 6v5c0 5 3.4 8.5 8 10 4.6-1.5 8-5 8-10V6l-8-3Z"}),l("path",{d:"m9 12 2 2 4-4"})]}),testId:"home-advisors-clear",title:s("No issues found")}):h("div",{className:"grid gap-3 sm:grid-cols-2",children:[l(Ge,{count:M,onView:V,testId:"home-security",title:s("Security findings")}),l(Ge,{count:L,onView:z,testId:"home-performance",title:s("Performance issues")})]}),e[111]=L,e[112]=M,e[113]=s,e[114]=z,e[115]=V,e[116]=ae):ae=e[116];let re;e[117]!==le||e[118]!==ae?(re=h("section",{className:"flex flex-col gap-3","data-testid":"home-advisors",children:[le,ae]}),e[117]=le,e[118]=ae,e[119]=re):re=e[119];let oe;e[120]!==s?(oe=s("Get connected"),e[120]=s,e[121]=oe):oe=e[121];let ie;e[122]!==oe?(ie=l("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:oe}),e[122]=oe,e[123]=ie):ie=e[123];let ce;e[124]!==s?(ce=s("Client SDK"),e[124]=s,e[125]=ce):ce=e[125];let de;e[126]!==ce?(de=l(Fe,{command:"npm i @lunora/client",label:ce}),e[126]=ce,e[127]=de):de=e[127];let ue;e[128]!==s?(ue=s("React"),e[128]=s,e[129]=ue):ue=e[129];let me;e[130]!==ue?(me=l(Fe,{command:"npm i @lunora/react",label:ue}),e[130]=ue,e[131]=me):me=e[131];let fe;e[132]!==s?(fe=s("CLI"),e[132]=s,e[133]=fe):fe=e[133];let pe;e[134]!==fe?(pe=l(Fe,{command:"lunora dev",label:fe}),e[134]=fe,e[135]=pe):pe=e[135];let he;e[136]!==de||e[137]!==me||e[138]!==pe?(he=h("div",{className:"grid gap-3 sm:grid-cols-3",children:[de,me,pe]}),e[136]=de,e[137]=me,e[138]=pe,e[139]=he):he=e[139];let Ce;e[140]===Symbol.for("react.memo_cache_sentinel")?(Ce=l(wt,{}),e[140]=Ce):Ce=e[140];let ge;e[141]!==ie||e[142]!==he?(ge=h("section",{className:"flex flex-col gap-3","data-testid":"home-get-connected",children:[ie,he,Ce]}),e[141]=ie,e[142]=he,e[143]=ge):ge=e[143];let we;return e[144]!==U||e[145]!==K||e[146]!==Y||e[147]!==se||e[148]!==re||e[149]!==ge?(we=h("div",{className:U,"data-testid":K,children:[Y,ke,se,re,ge]}),e[144]=U,e[145]=K,e[146]=Y,e[147]=se,e[148]=re,e[149]=ge,e[150]=we):we=e[150],we};function Rt(t,e){return e.calls-t.calls}function Et(t){return h("div",{className:"grid grid-cols-[1fr_auto_auto_auto] items-center gap-4 px-4 py-2 text-[13px]",children:[l("span",{className:"truncate font-mono text-xs text-foreground",children:t.path}),l("span",{className:"text-end tabular-nums",children:t.calls.toLocaleString()}),l("span",{className:"w-12 text-end tabular-nums text-muted-foreground",children:qe(t.calls>0?t.totalDurationMs/t.calls:0)}),l("span",{className:Xe("w-8 text-end tabular-nums",t.errors>0?"text-destructive":"text-muted-foreground"),children:t.errors})]},t.path)}function jt(t){return t.maxDurationMs}export{Zt as H,ft as u};
@@ -0,0 +1 @@
1
+ import{c as d}from"react/compiler-runtime";import{Input as o}from"@base-ui/react/input";import{c as s}from"./utils-bhneXptQ.js";import{jsx as u}from"react/jsx-runtime";function m(l){const e=d(10);let i,r,t;e[0]!==l?({className:i,type:t,...r}=l,e[0]=l,e[1]=i,e[2]=r,e[3]=t):(i=e[1],r=e[2],t=e[3]);let n;e[4]!==i?(n=s("h-8 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-xs dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",i),e[4]=i,e[5]=n):n=e[5];let a;return e[6]!==r||e[7]!==n||e[8]!==t?(a=u(o,{type:t,"data-slot":"input",className:n,...r}),e[6]=r,e[7]=n,e[8]=t,e[9]=a):a=e[9],a}export{m as I};
@@ -0,0 +1,2 @@
1
+ const a=(t,n,r,o,i)=>{switch(n){case"action":return t.action(r,o,i);case"mutation":return t.mutation(r,o,i);default:return t.query(r,o,i)}},f=t=>({__lunoraRef:t}),u=t=>{const n=t.trim();return n===""?{}:{shardKey:n}},d=t=>t instanceof Error?t.message:String(t),l=t=>{if(t===null||typeof t!="object"||!("code"in t))return;const{code:n}=t;return typeof n=="string"?n:void 0},g=t=>{if(t===null||typeof t!="object"||!("hint"in t))return;const{hint:n}=t;return typeof n=="string"?n:Array.isArray(n)?n.filter(r=>typeof r=="string").join(`
2
+ `):void 0},y=t=>{if(t===null||typeof t!="object"||!("docsUrl"in t))return;const n=t.docsUrl;if(typeof n=="string")try{const{protocol:r}=new URL(n);return r==="http:"||r==="https:"?n:void 0}catch{return}},s=t=>{if(t==null)return"—";if(t<1024)return`${t.toString()} B`;const n=["KB","MB","GB","TB"];let r=t/1024,o=0;for(;r>=1024&&o<n.length-1;)r/=1024,o+=1;return`${r.toFixed(1)} ${n[o]??"TB"}`},e=t=>{if(t==null)return"";switch(typeof t){case"bigint":case"boolean":case"number":return t.toString();case"string":return t;case"symbol":return t.toString();default:return t instanceof ArrayBuffer||ArrayBuffer.isView(t)?`<bytes: ${s(t.byteLength)}>`:JSON.stringify(t)}},h=(t,n)=>typeof n=="bigint"||n instanceof ArrayBuffer||ArrayBuffer.isView(n)?e(n):n,c=(t,n)=>{t.catch(r=>{})},m=t=>{if(t!==void 0&&t!=="")return t;const n=globalThis.location;return n?.origin!==void 0&&n.origin!==""?n.origin:"http://localhost:5173"},p=t=>{const n="navigator"in globalThis?globalThis.navigator.clipboard:void 0;return n===void 0?!1:(c(n.writeText(t)),!0)},b=(t,n="")=>{if(t==null||t==="")return n;const r=new Date(t);return Number.isNaN(r.getTime())?String(t):r.toLocaleString()};export{y as a,d as b,f as c,u as d,g as e,c as f,p as g,e as h,b as i,h as j,a as k,s as l,l as m,m as r};
@@ -0,0 +1 @@
1
+ import{c as r}from"react/compiler-runtime";import{c as i}from"./utils-bhneXptQ.js";import{jsx as n}from"react/jsx-runtime";function m(s){const e=r(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=i("flex items-center gap-2 text-xs leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=n("label",{"data-slot":"label",className:l,...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}export{m as L};
@@ -0,0 +1 @@
1
+ import{c as m}from"react/compiler-runtime";import{useT as p}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{u as v}from"./operation-console-provider-DoloEvon.js";import{jsx as d,jsxs as x}from"react/jsx-runtime";const E=f=>{const e=m(14),{message:n,prefix:i}=f,o=p(),t=v();let l;e[0]!==t?(l=()=>{t?.openConsole({errorsOnly:!0})},e[0]=t,e[1]=l):l=e[1];const c=l;if(n===void 0)return null;const u=`${i}-live-error`;let r;e[2]!==n||e[3]!==o?(r=o("Live unavailable: {liveError}",{liveError:n}),e[2]=n,e[3]=o,e[4]=r):r=e[4];let s;e[5]!==t||e[6]!==i||e[7]!==c||e[8]!==o?(s=t===void 0?null:d("button",{className:"underline outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":`${i}-live-error-console`,onClick:c,type:"button",children:o("Show in console")}),e[5]=t,e[6]=i,e[7]=c,e[8]=o,e[9]=s):s=e[9];let a;return e[10]!==u||e[11]!==r||e[12]!==s?(a=x("span",{className:"flex items-center gap-1.5 text-xs text-destructive","data-testid":u,role:"status",children:[r,s]}),e[10]=u,e[11]=r,e[12]=s,e[13]=a):a=e[13],a};export{E as L};
@@ -0,0 +1 @@
1
+ const i=r=>{if(typeof r=="string")return r;try{return JSON.stringify(r)??String(r)}catch{return String(r)}},o=r=>typeof r!="object"||r===null||Array.isArray(r)?"":Object.entries(r).map(([t,n])=>`${t}=${i(n)}`).join(" ");export{o as f};
@@ -0,0 +1 @@
1
+ import{c as h}from"react/compiler-runtime";import{f as v}from"./log-fields-SBxKyBug.js";import{B as x}from"./badge-cAk9Di1Q.js";import{i as L}from"./internal-CwaF9YNk.js";import{jsx as o,jsxs as g,Fragment as N}from"react/jsx-runtime";const w={debug:"secondary",error:"destructive",fatal:"destructive",info:"outline",log:"outline",trace:"outline",warn:"secondary"},B=p=>{const e=h(21),{entry:t}=p;let m;e[0]!==t.fields?(m=v(t.fields),e[0]=t.fields,e[1]=m):m=e[1];const c=m;let l;e[2]!==t.timestamp?(l=L(t.timestamp),e[2]=t.timestamp,e[3]=l):l=e[3];let s;e[4]!==l?(s=o("span",{className:"w-44 shrink-0 tabular-nums text-muted-foreground",role:"gridcell",children:l}),e[4]=l,e[5]=s):s=e[5];const f=w[t.level];let r;e[6]!==t.level||e[7]!==f?(r=o("span",{className:"w-20 shrink-0",role:"gridcell",children:o(x,{variant:f,children:t.level})}),e[6]=t.level,e[7]=f,e[8]=r):r=e[8];const u=t.functionPath??"—";let i;e[9]!==u?(i=o("span",{className:"w-48 shrink-0 truncate text-muted-foreground",role:"gridcell",children:u}),e[9]=u,e[10]=i):i=e[10];let a;e[11]!==c?(a=c===""?null:o("span",{className:"ml-2 text-muted-foreground","data-testid":"lg-fields",children:c}),e[11]=c,e[12]=a):a=e[12];let n;e[13]!==t.message||e[14]!==a?(n=g("span",{className:"flex-1 truncate",role:"gridcell",children:[t.message,a]}),e[13]=t.message,e[14]=a,e[15]=n):n=e[15];let d;return e[16]!==s||e[17]!==r||e[18]!==i||e[19]!==n?(d=g(N,{children:[s,r,i,n]}),e[16]=s,e[17]=r,e[18]=i,e[19]=n,e[20]=d):d=e[20],d};export{B as L,w as a};
@@ -0,0 +1 @@
1
+ import{c as v}from"react/compiler-runtime";import{c as k}from"./utils-bhneXptQ.js";import{jsx as u}from"react/jsx-runtime";const y={dialog:"fixed inset-0 z-[1000] flex justify-center bg-black/20 pt-[10vh]",drawer:"fixed inset-0 z-[1000] flex justify-end bg-black/20"},A={dialog:"flex h-fit w-[min(28rem,92vw)] flex-col gap-3 rounded-lg border border-border bg-background p-4 shadow-xl",drawer:"flex h-full w-[min(34rem,100vw)] flex-col gap-4 overflow-auto border-l border-border bg-background p-4 shadow-xl"},_=h=>{const e=v(18),{className:n,children:d,label:c,onClose:l,panelTestId:f,testId:b,variant:w}=h;let r;e[0]!==l?(r=i=>{i.target===i.currentTarget&&l()},e[0]=l,e[1]=r):r=e[1];const g=r;let a;e[2]!==l?(a=i=>{i.key==="Escape"&&l()},e[2]=l,e[3]=a):a=e[3];const m=a,p=y[w],x=A[w];let t;e[4]!==n||e[5]!==x?(t=k(x,n),e[4]=n,e[5]=x,e[6]=t):t=e[6];let o;e[7]!==d||e[8]!==c||e[9]!==f||e[10]!==t?(o=u("div",{"aria-label":c,className:t,"data-testid":f,role:"dialog",children:d}),e[7]=d,e[8]=c,e[9]=f,e[10]=t,e[11]=o):o=e[11];let s;return e[12]!==g||e[13]!==m||e[14]!==p||e[15]!==o||e[16]!==b?(s=u("div",{className:p,"data-testid":b,onClick:g,onKeyDown:m,role:"presentation",children:o}),e[12]=g,e[13]=m,e[14]=p,e[15]=o,e[16]=b,e[17]=s):s=e[17],s};export{_ as M};
@@ -0,0 +1 @@
1
+ import{c as h}from"react/compiler-runtime";import{use as q,createContext as w,useState as p}from"react";import{jsx as C}from"react/jsx-runtime";const m=w(void 0),y=t=>{const e=h(10),{children:f}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={focusSeq:void 0,open:!1,shown:"all"},e[0]=n):n=e[0];const[o,s]=p(n);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=()=>({close:()=>{s(_)},openConsole:a=>{s({focusSeq:a?.seq,open:!0,shown:a?.errorsOnly===!0?"errors":"all"})},setShown:a=>{s(S=>({...S,shown:a}))},toggle:()=>{s(d)}}),e[1]=r):r=e[1];const[i]=p(r);let l;e[2]!==i||e[3]!==o.focusSeq||e[4]!==o.open||e[5]!==o.shown?(l={...i,focusSeq:o.focusSeq,open:o.open,shown:o.shown},e[2]=i,e[3]=o.focusSeq,e[4]=o.open,e[5]=o.shown,e[6]=l):l=e[6];const u=l;let c;return e[7]!==f||e[8]!==u?(c=C(m,{value:u,children:f}),e[7]=f,e[8]=u,e[9]=c):c=e[9],c},b=()=>q(m);function _(t){return{...t,open:!1}}function d(t){return{focusSeq:void 0,open:!t.open,shown:"all"}}export{y as O,b as u};
@@ -0,0 +1 @@
1
+ const t=e=>`"${e.replaceAll('"','""')}"`;export{t as q};
@@ -0,0 +1 @@
1
+ import{o as u}from"./use-admin-query-P0RJrjsD.js";const b="__lunora_admin__:",d=new Set(["action","mutation","query"]),r=Symbol("lunora.operationSeq"),g=t=>{if(typeof t!="object"||t===null)return;const n=t[r];return typeof n=="number"?n:void 0},h=(t,n)=>{if(!(typeof t!="object"||t===null||!Object.isExtensible(t)))try{Object.defineProperty(t,r,{configurable:!0,enumerable:!1,value:n,writable:!0})}catch{}},p=t=>{if(typeof t!="object"||t===null)return;const n=t.__lunoraRef;return typeof n=="string"&&n.startsWith(b)?n:void 0},O=t=>{if(typeof t!="object"||t===null)return"";const{shardKey:n}=t;return typeof n=="string"?n:""},E=t=>new Proxy(t,{get(n,c,a){const i=Reflect.get(n,c,a);if(typeof i!="function"||typeof c!="string"||!d.has(c))return typeof i=="function"?i.bind(n):i;const f=i;return async(...e)=>{const l=p(e[0]);if(l===void 0)return f.apply(n,e);const y=typeof e[1]=="object"&&e[1]!==null?e[1]:{},s=u.start(l,y,O(e[2]));try{const o=await f.apply(n,e);return u.settle(s,{result:o}),o}catch(o){throw u.settle(s,{error:o instanceof Error?o.message:String(o)}),h(o,s),o}}}});export{g as o,E as w};