@lunora/studio 1.0.0-alpha.106 → 1.0.0-alpha.108

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 (387) hide show
  1. package/dist/index.d.ts +15 -2
  2. package/dist/index.js +1 -1
  3. package/dist/mount.js +1 -1
  4. package/dist/packem_chunks/AdvisorHealthPanel.js +1 -1
  5. package/dist/packem_chunks/ApiTab.js +1 -1
  6. package/dist/packem_chunks/AuditPanel.js +1 -1
  7. package/dist/packem_chunks/DeploymentHealthPanel.js +1 -1
  8. package/dist/packem_chunks/ExportImportPanel.js +3 -3
  9. package/dist/packem_chunks/FileBrowser.js +4 -4
  10. package/dist/packem_chunks/FunctionRunner.js +1 -1
  11. package/dist/packem_chunks/FunctionStatsPanel.js +1 -1
  12. package/dist/packem_chunks/HealthPanel.js +1 -1
  13. package/dist/packem_chunks/InsightsPanel.js +1 -1
  14. package/dist/packem_chunks/LogsPanel.js +1 -1
  15. package/dist/packem_chunks/MailPanel.js +1 -1
  16. package/dist/packem_chunks/MetricsPanel.js +1 -1
  17. package/dist/packem_chunks/NotificationsPanel.js +1 -1
  18. package/dist/packem_chunks/PitrPanel.js +1 -1
  19. package/dist/packem_chunks/SchemaViewer.js +1 -1
  20. package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -1
  21. package/dist/packem_chunks/SettingsPanel.js +1 -1
  22. package/dist/packem_chunks/SqlEditorPanel.js +6 -6
  23. package/dist/packem_chunks/TableEditor.js +1 -1
  24. package/dist/packem_chunks/agents-panel.js +1 -1
  25. package/dist/packem_chunks/analytics-panel.js +1 -1
  26. package/dist/packem_chunks/auth-audit-panel.js +1 -1
  27. package/dist/packem_chunks/auth-config-panel.js +1 -1
  28. package/dist/packem_chunks/auth-sessions-panel.js +1 -1
  29. package/dist/packem_chunks/containers-panel.js +1 -1
  30. package/dist/packem_chunks/dashboards-panel.js +1 -1
  31. package/dist/packem_chunks/evals-panel.js +1 -1
  32. package/dist/packem_chunks/fanout-panel.js +1 -1
  33. package/dist/packem_chunks/flags-panel.js +1 -1
  34. package/dist/packem_chunks/issues-panel.js +1 -1
  35. package/dist/packem_chunks/kv-browser.js +1 -1
  36. package/dist/packem_chunks/log-drains-panel.js +4 -4
  37. package/dist/packem_chunks/migrations-route.js +1 -1
  38. package/dist/packem_chunks/organizations-panel.js +1 -1
  39. package/dist/packem_chunks/payments-panel.js +1 -1
  40. package/dist/packem_chunks/permissions-panel.js +1 -1
  41. package/dist/packem_chunks/queues-panel.js +1 -1
  42. package/dist/packem_chunks/rls-panel.js +1 -1
  43. package/dist/packem_chunks/schedule-panel.js +1 -1
  44. package/dist/packem_chunks/sparkline.js +1 -1
  45. package/dist/packem_chunks/storage-rules-panel.js +1 -1
  46. package/dist/packem_chunks/subscriptions-panel.js +1 -1
  47. package/dist/packem_chunks/sync-client-panel.js +1 -1
  48. package/dist/packem_chunks/traces-panel.js +1 -1
  49. package/dist/packem_chunks/users-panel.js +1 -1
  50. package/dist/packem_chunks/vector-browser.js +1 -1
  51. package/dist/packem_chunks/workflows-panel.js +1 -1
  52. package/dist/packem_shared/ApiDocsPanel-BQ79UVEg.js +2 -0
  53. package/dist/packem_shared/ApiReferencePanel-CkCFMCBb.js +1 -0
  54. package/dist/packem_shared/CommandPalette-B5yLEABs.js +1 -0
  55. package/dist/packem_shared/ConfirmButton-Cj2SOapE.js +1 -0
  56. package/dist/packem_shared/ConnectionBadge-Bh16X9-u.js +1 -0
  57. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-DuULO4XM.js +1 -0
  58. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-1Lrg55IV.js +1 -0
  59. package/dist/packem_shared/DEFAULT_LOCALE-A1Yg5ORA.js +1 -0
  60. package/dist/packem_shared/DataBrowser-BnDIFN-S.js +1 -0
  61. package/dist/packem_shared/DataFilters-3nbW0uax.js +1 -0
  62. package/dist/packem_shared/ErrorBoundary-BWNF98VF.js +1 -0
  63. package/dist/packem_shared/GlobalDataBrowser-DusjXzRF.js +1 -0
  64. package/dist/packem_shared/HomePanel-BcaHVBJh.js +1 -0
  65. package/dist/packem_shared/MigrationsPanel-CCOENX4X.js +1 -0
  66. package/dist/packem_shared/OpenRpcReferencePanel-21OWMH45.js +1 -0
  67. package/dist/packem_shared/ScheduledJobs-CiO3eXgI.js +1 -0
  68. package/dist/packem_shared/ShardInput-XumEzeT0.js +1 -0
  69. package/dist/packem_shared/Studio-CHmLCjBR.js +1 -0
  70. package/dist/packem_shared/StudioApp-DCdbsciH.js +1 -0
  71. package/dist/packem_shared/StudioI18nProvider-Bl547evf.js +1 -0
  72. package/dist/packem_shared/advisor-view-C1KFTXSH.js +1 -0
  73. package/dist/packem_shared/aggregateMetrics-A-Y7OH6R.js +1 -0
  74. package/dist/packem_shared/alert-C2SEhYS9.js +1 -0
  75. package/dist/packem_shared/{badge-BbuuAio7.js → badge-cAk9Di1Q.js} +1 -1
  76. package/dist/packem_shared/bar-chart-CCyO67Uf.js +6 -0
  77. package/dist/packem_shared/browser-storage-Br_bLeBt.js +1 -0
  78. package/dist/packem_shared/{button-BkCrNcAs.js → button-BOPLD1un.js} +1 -1
  79. package/dist/packem_shared/card-BGlQzQY-.js +1 -0
  80. package/dist/packem_shared/cf-links-CBJ5SywP.js +1 -0
  81. package/dist/packem_shared/{checkbox-StT4Gob6.js → checkbox-C5w53W-E.js} +1 -1
  82. package/dist/packem_shared/data-grid-BFTQnkXq.js +1 -0
  83. package/dist/packem_shared/data-view-params-qoSTqjAj.js +1 -0
  84. package/dist/packem_shared/dropdown-menu-D_ewqsUU.js +2 -0
  85. package/dist/packem_shared/empty-state-B939z6K2.js +1 -0
  86. package/dist/packem_shared/error-alert-TYdKetJd.js +1 -0
  87. package/dist/packem_shared/grid-features-C_yXlMc_.js +6 -0
  88. package/dist/packem_shared/home-panel-BiJHXeDC.js +3 -0
  89. package/dist/packem_shared/input-CY5W3wzv.js +1 -0
  90. package/dist/packem_shared/internal-CwaF9YNk.js +2 -0
  91. package/dist/packem_shared/label-BOUo-DP0.js +1 -0
  92. package/dist/packem_shared/live-status-Bf7rR8o8.js +1 -0
  93. package/dist/packem_shared/{log-fields-CoL3hsIQ.js → log-fields-SBxKyBug.js} +1 -1
  94. package/dist/packem_shared/log-line-UnE93Ovi.js +1 -0
  95. package/dist/packem_shared/modal-shell-wGW4CKEW.js +1 -0
  96. package/dist/packem_shared/operation-console-provider-DoloEvon.js +1 -0
  97. package/dist/packem_shared/recording-client-CKn4-vUx.js +1 -0
  98. package/dist/packem_shared/reference-view-CUIDzLf0.js +12 -0
  99. package/dist/packem_shared/result-chart-Ca3YLzt8.js +1 -0
  100. package/dist/packem_shared/schema-diagram-DHD13TjS.js +2 -0
  101. package/dist/packem_shared/scroll-area-DSJftwu_.js +2 -0
  102. package/dist/packem_shared/select-BPISLTcv.js +2 -0
  103. package/dist/packem_shared/shard-history-QcjcMnCA.js +1 -0
  104. package/dist/packem_shared/skeleton-DFBBaJU6.js +1 -0
  105. package/dist/packem_shared/sparkline-BreIqzDO.js +1 -0
  106. package/dist/packem_shared/stat-card-B9uIvAHg.js +1 -0
  107. package/dist/packem_shared/{storage-tier-DznqOf-q.js → storage-tier-C2mKwYRj.js} +1 -1
  108. package/dist/packem_shared/studio-B3eEcBK0.js +2 -0
  109. package/dist/packem_shared/table-BMsuYFhk.js +2 -0
  110. package/dist/packem_shared/table-list-sidebar-Bluzd1_2.js +1 -0
  111. package/dist/packem_shared/textarea-DpO3i-Qo.js +1 -0
  112. package/dist/packem_shared/{trace-handoff-Dw7mwjxu.js → trace-handoff-C0CFV2ix.js} +1 -1
  113. package/dist/packem_shared/use-admin-query-P0RJrjsD.js +1 -0
  114. package/dist/packem_shared/use-async-submit-DdLd0MdK.js +1 -0
  115. package/dist/packem_shared/use-auth-config-z3KRWAqD.js +1 -0
  116. package/dist/packem_shared/use-open-trace-4tIa0SXZ.js +1 -0
  117. package/dist/packem_shared/use-shard-key-BsP3o5wT.js +1 -0
  118. package/dist/packem_shared/use-sql-assistant-CP90nLLh.js +1 -0
  119. package/dist/packem_shared/useDebounced-DVeQ5-oW.js +1 -0
  120. package/dist/packem_shared/virtual-rect-D_j7aLxX.js +1 -0
  121. package/dist/packem_shared/wire-codec-Dl3VeNrd.js +1 -0
  122. package/dist/standalone/chunk-25OIGX2A.js +1 -0
  123. package/dist/standalone/{chunk-OBMNLQWG.js → chunk-26VREVWU.js} +1 -1
  124. package/dist/standalone/chunk-2BDM6HNL.js +1 -0
  125. package/dist/standalone/{chunk-6WB63KTN.js → chunk-2DC6F7NH.js} +1 -1
  126. package/dist/standalone/chunk-3F5I435D.js +1 -0
  127. package/dist/standalone/{chunk-RJS7UD5U.js → chunk-3QB5JI32.js} +1 -1
  128. package/dist/standalone/chunk-3RYEUXY2.js +1 -0
  129. package/dist/standalone/chunk-44WNSIGQ.js +1 -0
  130. package/dist/standalone/chunk-45YWYMD5.js +1 -0
  131. package/dist/standalone/chunk-4MAJFNON.js +1 -0
  132. package/dist/standalone/chunk-4YTSKL4R.js +1 -0
  133. package/dist/standalone/chunk-57VX76PR.js +1 -0
  134. package/dist/standalone/chunk-5JLIP2HH.js +1 -0
  135. package/dist/standalone/chunk-5NRQIDQA.js +1 -0
  136. package/dist/standalone/{chunk-2ZG23BA5.js → chunk-5T7KRUPX.js} +1 -1
  137. package/dist/standalone/chunk-6FWN26RH.js +1 -0
  138. package/dist/standalone/chunk-6JGXSMKV.js +1 -0
  139. package/dist/standalone/{chunk-HX7IXD7I.js → chunk-6NJAHOGO.js} +1 -1
  140. package/dist/standalone/chunk-6SAAMM4S.js +1 -0
  141. package/dist/standalone/{chunk-IUYFXK4X.js → chunk-6ZPTNC34.js} +6 -6
  142. package/dist/standalone/chunk-74ASA4WU.js +1 -0
  143. package/dist/standalone/{chunk-6ST5ECQA.js → chunk-7PIHTTND.js} +1 -1
  144. package/dist/standalone/{chunk-GMR677FL.js → chunk-7SROZWKL.js} +1 -1
  145. package/dist/standalone/chunk-AECDJKXB.js +1 -0
  146. package/dist/standalone/{chunk-2PJNAWB3.js → chunk-AFKLFS74.js} +1 -1
  147. package/dist/standalone/chunk-AOAJGSYZ.js +2 -0
  148. package/dist/standalone/chunk-AOE75NAT.js +1 -0
  149. package/dist/standalone/{chunk-HFRJMPXJ.js → chunk-APRVSWBH.js} +27 -27
  150. package/dist/standalone/{chunk-LWE6NWQX.js → chunk-BELLXCN7.js} +1 -1
  151. package/dist/standalone/chunk-BORG7WUC.js +1 -0
  152. package/dist/standalone/{chunk-AVAC26HJ.js → chunk-BQK2C2Z4.js} +1 -1
  153. package/dist/standalone/chunk-BRHTM6FU.js +1 -0
  154. package/dist/standalone/{chunk-MWIKAR7F.js → chunk-BWEXJENB.js} +1 -1
  155. package/dist/standalone/chunk-C5E5PLJT.js +4 -0
  156. package/dist/standalone/chunk-C7E4I7JZ.js +1 -0
  157. package/dist/standalone/{chunk-QWGT25SE.js → chunk-CAOUXOL7.js} +1 -1
  158. package/dist/standalone/chunk-CEPMQS24.js +6 -0
  159. package/dist/standalone/chunk-CKTKI4IY.js +1 -0
  160. package/dist/standalone/{chunk-IC4L6G56.js → chunk-CN2AINNY.js} +1 -1
  161. package/dist/standalone/chunk-CP4ZFBVW.js +1 -0
  162. package/dist/standalone/chunk-CYX3OHJ3.js +1 -0
  163. package/dist/standalone/{chunk-7P7NURTD.js → chunk-D7DUQS2Y.js} +1 -1
  164. package/dist/standalone/{chunk-QBWRC5YX.js → chunk-DKSLOJDQ.js} +1 -1
  165. package/dist/standalone/chunk-DL3UOEWN.js +1 -0
  166. package/dist/standalone/chunk-DPNEFSEC.js +1 -0
  167. package/dist/standalone/{chunk-BGBLQ563.js → chunk-DUDQV6XJ.js} +1 -1
  168. package/dist/standalone/chunk-EDHW2EEG.js +1 -0
  169. package/dist/standalone/chunk-EYGF6TQS.js +1 -0
  170. package/dist/standalone/chunk-F7JOSNAT.js +1 -0
  171. package/dist/standalone/{chunk-7QOXFLZB.js → chunk-FBAZHG35.js} +1 -1
  172. package/dist/standalone/chunk-FLCK2WWQ.js +1 -0
  173. package/dist/standalone/chunk-FSWPREH3.js +1 -0
  174. package/dist/standalone/{chunk-ZCNMXKF2.js → chunk-GIRZD3UB.js} +2 -2
  175. package/dist/standalone/chunk-GZMBMNL3.js +6 -0
  176. package/dist/standalone/chunk-HPX3IM45.js +13 -0
  177. package/dist/standalone/{chunk-KUVMORDQ.js → chunk-INBA3473.js} +1 -1
  178. package/dist/standalone/{chunk-T6VMSOBB.js → chunk-INQICZYC.js} +1 -1
  179. package/dist/standalone/chunk-IWNVQHF7.js +1 -0
  180. package/dist/standalone/chunk-IWOZGUI2.js +1 -0
  181. package/dist/standalone/chunk-IYWVSMAY.js +1 -0
  182. package/dist/standalone/chunk-JURAVSE7.js +1 -0
  183. package/dist/standalone/chunk-JUWOEHDD.js +1 -0
  184. package/dist/standalone/{chunk-4UOFSGUS.js → chunk-JV7KTJPY.js} +1 -1
  185. package/dist/standalone/{chunk-XVD7HWY7.js → chunk-JVAYDDMK.js} +1 -1
  186. package/dist/standalone/chunk-KEKIGANB.js +1 -0
  187. package/dist/standalone/chunk-KFZ37KQP.js +1 -0
  188. package/dist/standalone/chunk-KQIHXYE6.js +1 -0
  189. package/dist/standalone/chunk-L4EZAHCD.js +1 -0
  190. package/dist/standalone/chunk-L7CJ5PGH.js +1 -0
  191. package/dist/standalone/{chunk-5MJ3G4DY.js → chunk-LT4XQDD2.js} +1 -1
  192. package/dist/standalone/chunk-M3NNNOD5.js +1 -0
  193. package/dist/standalone/chunk-MBEIKVJH.js +1 -0
  194. package/dist/standalone/chunk-MCLM2QJI.js +1 -0
  195. package/dist/standalone/chunk-METRMDIQ.js +1 -0
  196. package/dist/standalone/{chunk-OKQ3NJOW.js → chunk-MGC6PRMV.js} +1 -1
  197. package/dist/standalone/chunk-MOUI44OT.js +1 -0
  198. package/dist/standalone/{chunk-DRR3KV5L.js → chunk-MSFUDXBA.js} +1 -1
  199. package/dist/standalone/chunk-NIX2QSSN.js +1 -0
  200. package/dist/standalone/chunk-NXXGISFB.js +1 -0
  201. package/dist/standalone/{chunk-SBZXUGZ7.js → chunk-OE4KGVJW.js} +4 -4
  202. package/dist/standalone/chunk-OG57FC7W.js +1 -0
  203. package/dist/standalone/chunk-OLQWBGKT.js +1 -0
  204. package/dist/standalone/{chunk-F2I4JLFR.js → chunk-OOBJFXYB.js} +1 -1
  205. package/dist/standalone/chunk-P52BY657.js +1 -0
  206. package/dist/standalone/chunk-PHHMPYEP.js +1 -0
  207. package/dist/standalone/{chunk-6KWKX3RH.js → chunk-PJDKRUWT.js} +1 -1
  208. package/dist/standalone/chunk-PZ4QDWTI.js +1 -0
  209. package/dist/standalone/chunk-QZ55OWAB.js +4 -0
  210. package/dist/standalone/chunk-R5ZTCHCE.js +1 -0
  211. package/dist/standalone/chunk-RBUVNO22.js +1 -0
  212. package/dist/standalone/{chunk-XBDKZZ67.js → chunk-RCZTUWG3.js} +1 -1
  213. package/dist/standalone/chunk-S77D4SHR.js +1 -0
  214. package/dist/standalone/chunk-SL5R7WBN.js +1 -0
  215. package/dist/standalone/chunk-SMKRXJUC.js +1 -0
  216. package/dist/standalone/{chunk-THIXMMZD.js → chunk-SPDZUX4P.js} +1 -1
  217. package/dist/standalone/chunk-T2LDA6WP.js +1 -0
  218. package/dist/standalone/{chunk-5UY7MLRC.js → chunk-T6HLABZW.js} +1 -1
  219. package/dist/standalone/{chunk-BDHAGUAY.js → chunk-TBXK3FKP.js} +4 -4
  220. package/dist/standalone/{chunk-7QIFDWQV.js → chunk-TFMQSCGC.js} +1 -1
  221. package/dist/standalone/chunk-TLPWZ5NI.js +3 -0
  222. package/dist/standalone/chunk-TNKECJW4.js +1 -0
  223. package/dist/standalone/{chunk-XQCVZAGU.js → chunk-UANVABQG.js} +1 -1
  224. package/dist/standalone/chunk-UIF57LBO.js +1 -0
  225. package/dist/standalone/chunk-V6QPVFDL.js +1 -0
  226. package/dist/standalone/chunk-VNTEQQPP.js +1 -0
  227. package/dist/standalone/chunk-VR3UJA7B.js +1 -0
  228. package/dist/standalone/{chunk-5DVJR52Z.js → chunk-VYW2PAWC.js} +3 -3
  229. package/dist/standalone/chunk-VZCS5GXZ.js +1 -0
  230. package/dist/standalone/{chunk-XYV7TMYI.js → chunk-WHRG6S5P.js} +1 -1
  231. package/dist/standalone/{chunk-CKG2DTZ2.js → chunk-WIG3HCUJ.js} +1 -1
  232. package/dist/standalone/chunk-WUW4ZHRL.js +1 -0
  233. package/dist/standalone/chunk-X6Q5DWLZ.js +1 -0
  234. package/dist/standalone/{chunk-Z2IF3TEX.js → chunk-XGIG4EDG.js} +4 -4
  235. package/dist/standalone/chunk-XJSWM47N.js +1 -0
  236. package/dist/standalone/chunk-XQS7KSHL.js +1 -0
  237. package/dist/standalone/chunk-YS7HEZC2.js +1 -0
  238. package/dist/standalone/chunk-YUWMB6EV.js +1 -0
  239. package/dist/standalone/{chunk-TMGHRD6W.js → chunk-ZPGNTTQ3.js} +1 -1
  240. package/dist/standalone/chunk-ZQLIKKIY.js +1 -0
  241. package/dist/standalone/chunk-ZSOLGJFC.js +1 -0
  242. package/dist/standalone/studio.js +6 -6
  243. package/package.json +9 -9
  244. package/dist/packem_shared/ApiDocsPanel-Cu_QmzO0.js +0 -2
  245. package/dist/packem_shared/ApiReferencePanel-DuIU1P8B.js +0 -1
  246. package/dist/packem_shared/CommandPalette-mPR8-vIm.js +0 -1
  247. package/dist/packem_shared/ConfirmButton-CTL3f3kr.js +0 -1
  248. package/dist/packem_shared/ConnectionBadge-DOk0CQWo.js +0 -1
  249. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-BCC8_4BQ.js +0 -1
  250. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-B-hcFVoi.js +0 -1
  251. package/dist/packem_shared/DEFAULT_LOCALE-BZ4NojpD.js +0 -1
  252. package/dist/packem_shared/DataBrowser-CPNKM0KZ.js +0 -1
  253. package/dist/packem_shared/DataFilters-B26ZeqBZ.js +0 -1
  254. package/dist/packem_shared/ErrorBoundary-DvzYskH7.js +0 -1
  255. package/dist/packem_shared/GlobalDataBrowser-BSmyOO0n.js +0 -1
  256. package/dist/packem_shared/HomePanel-BUO6BcYQ.js +0 -1
  257. package/dist/packem_shared/MigrationsPanel-BAnvY79E.js +0 -1
  258. package/dist/packem_shared/OpenRpcReferencePanel-DXeffPFr.js +0 -1
  259. package/dist/packem_shared/ScheduledJobs-pHVlh2xU.js +0 -1
  260. package/dist/packem_shared/ShardInput-BVn2iCU0.js +0 -1
  261. package/dist/packem_shared/Studio-CD66AkL1.js +0 -1
  262. package/dist/packem_shared/StudioApp-0Vaayv2I.js +0 -1
  263. package/dist/packem_shared/StudioI18nProvider-CZ5h4nrV.js +0 -1
  264. package/dist/packem_shared/advisor-view-CGcwvlMo.js +0 -1
  265. package/dist/packem_shared/aggregateMetrics-BNfajLa2.js +0 -1
  266. package/dist/packem_shared/alert-CVcOFuDR.js +0 -1
  267. package/dist/packem_shared/bar-chart-B8oDHgnw.js +0 -6
  268. package/dist/packem_shared/browser-storage-xjTyMKY0.js +0 -1
  269. package/dist/packem_shared/card-BMKx5UdA.js +0 -1
  270. package/dist/packem_shared/cf-links-Dmg86v1D.js +0 -1
  271. package/dist/packem_shared/data-grid-Ci4-tZkk.js +0 -1
  272. package/dist/packem_shared/data-view-params-ClrV7XgF.js +0 -1
  273. package/dist/packem_shared/dropdown-menu-BgS2zw1i.js +0 -2
  274. package/dist/packem_shared/empty-state-Cg7t_8qu.js +0 -1
  275. package/dist/packem_shared/error-alert-_2q2VtVG.js +0 -1
  276. package/dist/packem_shared/grid-features-Y2YSjhCf.js +0 -6
  277. package/dist/packem_shared/home-panel-Ir3YHReO.js +0 -3
  278. package/dist/packem_shared/input-JHu63lTv.js +0 -1
  279. package/dist/packem_shared/internal-zkEvTqy8.js +0 -2
  280. package/dist/packem_shared/label-6uP1obNF.js +0 -1
  281. package/dist/packem_shared/live-status-CmuRLFKf.js +0 -1
  282. package/dist/packem_shared/log-line-BDI826X-.js +0 -1
  283. package/dist/packem_shared/modal-shell-CUwwWC2o.js +0 -1
  284. package/dist/packem_shared/operation-console-provider-BMJNtiyB.js +0 -1
  285. package/dist/packem_shared/recording-client-DtUxwVNY.js +0 -1
  286. package/dist/packem_shared/reference-view-DncEStdm.js +0 -12
  287. package/dist/packem_shared/result-chart-0VgP_3FP.js +0 -1
  288. package/dist/packem_shared/schema-diagram-GVgnLWTf.js +0 -2
  289. package/dist/packem_shared/scroll-area-DTEq6Jec.js +0 -2
  290. package/dist/packem_shared/select-BssZMiFY.js +0 -2
  291. package/dist/packem_shared/shard-history-DMEW5VBE.js +0 -1
  292. package/dist/packem_shared/skeleton-C1wQ9M5t.js +0 -1
  293. package/dist/packem_shared/sparkline-BNvxiJj_.js +0 -1
  294. package/dist/packem_shared/stat-card-BGJdhfm6.js +0 -1
  295. package/dist/packem_shared/studio-CUXq5VSB.js +0 -2
  296. package/dist/packem_shared/table-DZAB8cs3.js +0 -2
  297. package/dist/packem_shared/table-list-sidebar-fz0m_4I4.js +0 -1
  298. package/dist/packem_shared/textarea-Bu2-jKAs.js +0 -1
  299. package/dist/packem_shared/use-admin-query-CnnyWJXM.js +0 -1
  300. package/dist/packem_shared/use-async-submit-B32whHJO.js +0 -1
  301. package/dist/packem_shared/use-auth-config-0EnNCdLu.js +0 -1
  302. package/dist/packem_shared/use-open-trace-CniEgUdp.js +0 -1
  303. package/dist/packem_shared/use-shard-key-B2JtNa5m.js +0 -1
  304. package/dist/packem_shared/use-sql-assistant-Dtw55kKM.js +0 -1
  305. package/dist/packem_shared/useDebounced-CU-uftxO.js +0 -1
  306. package/dist/packem_shared/virtual-rect-1o1veP7R.js +0 -1
  307. package/dist/packem_shared/wire-codec-DkrdsFXO.js +0 -1
  308. package/dist/standalone/chunk-25IDU7IW.js +0 -1
  309. package/dist/standalone/chunk-2OUPA2WJ.js +0 -1
  310. package/dist/standalone/chunk-2QSHLBCO.js +0 -1
  311. package/dist/standalone/chunk-3C3CG7ZK.js +0 -1
  312. package/dist/standalone/chunk-3CWGJYBB.js +0 -1
  313. package/dist/standalone/chunk-3DH35OZ5.js +0 -1
  314. package/dist/standalone/chunk-3SCGCJYS.js +0 -1
  315. package/dist/standalone/chunk-3XIESWL4.js +0 -1
  316. package/dist/standalone/chunk-54MMVNPT.js +0 -1
  317. package/dist/standalone/chunk-5RIKPDDA.js +0 -1
  318. package/dist/standalone/chunk-5Y3QLNWX.js +0 -1
  319. package/dist/standalone/chunk-63D4ABMW.js +0 -1
  320. package/dist/standalone/chunk-6QBOXH2I.js +0 -1
  321. package/dist/standalone/chunk-7CZI2HNL.js +0 -1
  322. package/dist/standalone/chunk-7T7UOTYK.js +0 -1
  323. package/dist/standalone/chunk-7UP7OQJG.js +0 -1
  324. package/dist/standalone/chunk-AXQU7ULF.js +0 -1
  325. package/dist/standalone/chunk-BCOT3QRZ.js +0 -1
  326. package/dist/standalone/chunk-BG5ELOW6.js +0 -1
  327. package/dist/standalone/chunk-BXJPPINU.js +0 -1
  328. package/dist/standalone/chunk-BZDIRP7L.js +0 -1
  329. package/dist/standalone/chunk-C3YACIEE.js +0 -1
  330. package/dist/standalone/chunk-CAOA5AM4.js +0 -1
  331. package/dist/standalone/chunk-CFPZYHPY.js +0 -2
  332. package/dist/standalone/chunk-CZZWYUTR.js +0 -1
  333. package/dist/standalone/chunk-DJZYD5I5.js +0 -1
  334. package/dist/standalone/chunk-DNEIBTLL.js +0 -1
  335. package/dist/standalone/chunk-EF5J67J3.js +0 -1
  336. package/dist/standalone/chunk-EJWTF334.js +0 -1
  337. package/dist/standalone/chunk-EP4JQH5X.js +0 -1
  338. package/dist/standalone/chunk-ESVP44Y3.js +0 -1
  339. package/dist/standalone/chunk-EXL35M7T.js +0 -1
  340. package/dist/standalone/chunk-F3J6ER2V.js +0 -13
  341. package/dist/standalone/chunk-FURI47Z2.js +0 -1
  342. package/dist/standalone/chunk-FZ2N52BV.js +0 -1
  343. package/dist/standalone/chunk-GG6PIGQO.js +0 -1
  344. package/dist/standalone/chunk-GRL5MG3Z.js +0 -1
  345. package/dist/standalone/chunk-HBSEWNIR.js +0 -1
  346. package/dist/standalone/chunk-HLENOQDN.js +0 -1
  347. package/dist/standalone/chunk-HPFLBYRI.js +0 -1
  348. package/dist/standalone/chunk-HUF7RMS3.js +0 -1
  349. package/dist/standalone/chunk-I6A5C46N.js +0 -1
  350. package/dist/standalone/chunk-IBPWTHHW.js +0 -1
  351. package/dist/standalone/chunk-IGCNMZSB.js +0 -1
  352. package/dist/standalone/chunk-IVFHIQOT.js +0 -1
  353. package/dist/standalone/chunk-KZRWBSYQ.js +0 -1
  354. package/dist/standalone/chunk-LEDWUPXM.js +0 -1
  355. package/dist/standalone/chunk-MLT5MMMY.js +0 -1
  356. package/dist/standalone/chunk-OENUM3OW.js +0 -1
  357. package/dist/standalone/chunk-QLQADHFE.js +0 -1
  358. package/dist/standalone/chunk-RA5DW5MU.js +0 -1
  359. package/dist/standalone/chunk-RFSPHFKM.js +0 -1
  360. package/dist/standalone/chunk-RMN2JN4S.js +0 -1
  361. package/dist/standalone/chunk-S23KCFVU.js +0 -1
  362. package/dist/standalone/chunk-S4665UG5.js +0 -4
  363. package/dist/standalone/chunk-SD4BERSA.js +0 -1
  364. package/dist/standalone/chunk-SFDOII3B.js +0 -1
  365. package/dist/standalone/chunk-SMIESS7P.js +0 -1
  366. package/dist/standalone/chunk-SY6ANTKE.js +0 -1
  367. package/dist/standalone/chunk-TCV7MMYR.js +0 -1
  368. package/dist/standalone/chunk-UFESYXCE.js +0 -6
  369. package/dist/standalone/chunk-UKI2ZYB2.js +0 -1
  370. package/dist/standalone/chunk-UTK6JUTY.js +0 -1
  371. package/dist/standalone/chunk-V53KNYRN.js +0 -1
  372. package/dist/standalone/chunk-VIJLMIC3.js +0 -1
  373. package/dist/standalone/chunk-VOY5EALQ.js +0 -1
  374. package/dist/standalone/chunk-VR3OBMGZ.js +0 -1
  375. package/dist/standalone/chunk-WJCKVELA.js +0 -1
  376. package/dist/standalone/chunk-WJQLNYGX.js +0 -1
  377. package/dist/standalone/chunk-WPK2Q33V.js +0 -6
  378. package/dist/standalone/chunk-WQH3LT2P.js +0 -1
  379. package/dist/standalone/chunk-WZ65AZKA.js +0 -1
  380. package/dist/standalone/chunk-XEGWCG5S.js +0 -1
  381. package/dist/standalone/chunk-XFGE43TZ.js +0 -1
  382. package/dist/standalone/chunk-XNSCEAHM.js +0 -4
  383. package/dist/standalone/chunk-XXQUMVWH.js +0 -1
  384. package/dist/standalone/chunk-Y32QIKBS.js +0 -1
  385. package/dist/standalone/chunk-YJ25NVR2.js +0 -3
  386. package/dist/standalone/chunk-ZJGP6EKR.js +0 -1
  387. /package/dist/standalone/{chunk-XF2B7P5A.js → chunk-W2JBKQNU.js} +0 -0
@@ -0,0 +1 @@
1
+ import{c as m}from"react/compiler-runtime";import{useState as a}from"react";import{f as i,b as y}from"./internal-CwaF9YNk.js";const g=()=>{const r=m(4),[s,n]=a(!1),[o,c]=a(null);let e;r[0]===Symbol.for("react.memo_cache_sentinel")?(e=u=>{i((async()=>{n(!0),c(null);try{await u()}catch(f){c(y(f))}n(!1)})())},r[0]=e):e=r[0];const l=e;let t;return r[1]!==s||r[2]!==o?(t={busy:s,error:o,run:l},r[1]=s,r[2]=o,r[3]=t):t=r[3],t};export{g as u};
@@ -0,0 +1 @@
1
+ import{c}from"react/compiler-runtime";import{useLunora as f}from"@lunora/react";import{b as u}from"./use-admin-query-P0RJrjsD.js";const m={capabilities:{accounts:!0,admin:!0,organization:!1,passkey:!1,twoFactor:!1},emailAndPassword:!1,organization:{enabled:!1,roles:!1,teams:!1},plugins:[],rateLimit:{enabled:!1},session:{},socialProviders:[],userFields:[]},b=()=>{const e=c(6),o=f();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=["lunora-auth-config"],e[0]=s):s=e[0];let t;e[1]!==o?(t=()=>o.getAuthConfig(),e[1]=o,e[2]=t):t=e[2];const{data:l,isLoading:r}=u(s,t),i=l??m,n=!r;let a;return e[3]!==i||e[4]!==n?(a={config:i,ready:n},e[3]=i,e[4]=n,e[5]=a):a=e[5],a};export{m as D,b as u};
@@ -0,0 +1 @@
1
+ import{c as n}from"react/compiler-runtime";import{useNavigate as a}from"@tanstack/react-router";import{f as m}from"./internal-CwaF9YNk.js";import{w as s}from"./trace-handoff-C0CFV2ix.js";const u=r=>{const t=n(3),o=a();let e;return t[0]!==o||t[1]!==r?(e=i=>{s({shardKey:r,traceId:i}),m(o({to:"/traces"}))},t[0]=o,t[1]=r,t[2]=e):e=t[2],e};export{u};
@@ -0,0 +1 @@
1
+ import{useState as n,useRef as S,useEffect as a}from"react";const f=(e,s=400)=>{const t=(e??"").trim(),[o,u]=n(t),[y,c]=n(t),d=S(e);d.current!==e&&(d.current=e,u(t),c(t));const m=o.trim();return a(()=>{const r=setTimeout(()=>{c(m)},s);return()=>{clearTimeout(r)}},[m,s]),{queryShardKey:y,setShardKey:r=>{u(r)},shardKey:o}};export{f as u};
@@ -0,0 +1 @@
1
+ import{useLunora as A}from"@lunora/react";import{useState as c}from"react";import{u as h}from"./use-admin-query-P0RJrjsD.js";import{ADMIN_FUNCTIONS as s}from"./ADMIN_FUNCTIONS-4aE59aDq.js";import{d,c as l}from"./internal-CwaF9YNk.js";const T={},_=l(s.aiGenerateSql),b=l(s.aiTableFilter),C=l(s.aiChartConfig),w=n=>{const o=A(),[f,u]=c({}),[v,g]=c({}),m=h(s.aiAvailable,T,{shardKey:n}),[p,y]=c(!1),q=p||m.data?.available===!1,i=e=>{u(r=>({...r,[e]:!0})),g(r=>({...r,[e]:void 0}))},a=(e,r)=>{u(t=>({...t,[e]:!1})),r!==void 0&&g(t=>({...t,[e]:r})),r==="no-ai-binding"&&y(!0)};return{generate:async(e,r)=>{i("sql");try{const{result:t}=await o.query(_,{failedError:r?.error,failedSql:r?.sql,prompt:e},d(n));return a("sql",t.degraded?t.reason:void 0),t.degraded?void 0:t.sql}catch{a("sql","ai-error");return}},inferChart:async e=>{i("chart");try{const{result:r}=await o.query(C,e,d(n));return a("chart",r.degraded?r.reason:void 0),r.degraded?void 0:r.chart}catch{a("chart","ai-error");return}},pending:e=>f[e]===!0,reason:e=>v[e],suggestFilter:async(e,r)=>{i("filter");try{const{result:t}=await o.query(b,{prompt:e,table:r},d(n));return a("filter",t.degraded?t.reason:void 0),t.degraded?void 0:t.clauses}catch{a("filter","ai-error");return}},unavailable:q}};export{w as u};
@@ -0,0 +1 @@
1
+ import{c as p}from"react/compiler-runtime";import{useState as f,useEffect as D}from"react";const T=function(t,n,o){const e=p(4),s=n===void 0?300:n,[r,i]=f(t),[u,m]=f(o);o!==void 0&&o!==u&&(m(o),i(t));let c,d;return e[0]!==s||e[1]!==t?(c=()=>{const b=setTimeout(()=>{i(t)},s);return()=>{clearTimeout(b)}},d=[t,s],e[0]=s,e[1]=t,e[2]=c,e[3]=d):(c=e[2],d=e[3]),D(c,d),r};export{T as default};
@@ -0,0 +1 @@
1
+ import{observeElementRect as i}from"@tanstack/react-virtual";const s=(t,o,h)=>i(t,e=>{o(e.height>0?e:{height:h,width:e.width})});export{s as f};
@@ -0,0 +1 @@
1
+ const g=e=>{let t="";for(let o=0;o<e.length;o+=32768)t+=String.fromCharCode(...e.subarray(o,o+32768));return btoa(t)},p=e=>{const t=atob(e),a=new Uint8Array(t.length);for(let o=0;o<t.length;o+=1)a[o]=t.codePointAt(o)??0;return a},i="$lunora.wire$";const A="__proto__",m={BigInt64Array,BigUint64Array,Float32Array,Float64Array,Int8Array,Int16Array,Int32Array,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array},w={Error,EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError},E=e=>{if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype},u=(e,t=0)=>{if(t>64)throw new RangeError("wire-codec: value nesting exceeds the 64-level limit");if(e===void 0)return[i,"undefined"];if(e===null)return null;const a=typeof e;if(a==="bigint")return[i,"bigint",e.toString()];if(a==="number"){const r=e;return Number.isNaN(r)?[i,"nan"]:r===1/0?[i,"inf"]:r===-1/0?[i,"-inf"]:r}if(a!=="object")return e;if(e instanceof Date)return[i,"date",u(e.getTime(),t+1)];if(e instanceof Error){const r=e,n={};for(const y of Object.keys(r))r[y]!==void 0&&(n[y]=u(r[y],t+1));const c=[i,"error",r.name,r.message,n];return r.cause!==void 0&&c.push(u(r.cause,t+1)),c}if(e instanceof URL)return[i,"url",e.href];if(e instanceof Map)return[i,"map",[...e.entries()].map(([r,n])=>[u(r,t+1),u(n,t+1)])];if(e instanceof Set)return[i,"set",[...e].map(r=>u(r,t+1))];if(e instanceof ArrayBuffer)return[i,"bytes",g(new Uint8Array(e)),"ArrayBuffer"];if(ArrayBuffer.isView(e)){const r=e,n=r.constructor.name,c=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);return n==="Uint8Array"?[i,"bytes",g(c)]:[i,"bytes",g(c),n]}if(Array.isArray(e)){const r=e.map(n=>u(n,t+1));return r.length>0&&r[0]===i?[i,"arr",r]:r}if(!E(e)){const r=e.constructor?.name??"value";throw new TypeError(`wire-codec: cannot encode a ${r} over the Lunora wire — only plain objects, arrays, and the supported built-ins (Date, Error, URL, Map, Set, ArrayBuffer/typed arrays, bigint) round-trip`)}const o=e,s={};for(const r of Object.keys(o)){const n=o[r];if(n===void 0)continue;const c=u(n,t+1);r===A?Object.defineProperty(s,r,{configurable:!0,enumerable:!0,value:c,writable:!0}):s[r]=c}return s},f=(e,t=0)=>{if(t>64)throw new RangeError("wire-codec: value nesting exceeds the 64-level limit");if(e===null||typeof e!="object")return e;if(Array.isArray(e)){if(e[0]===i)switch(e[1]){case"-inf":return-1/0;case"arr":return e[2].map(r=>f(r,t+1));case"bigint":{const r=e[2];if(typeof r!="string"||r.length>1024||!/^-?\d+$/.test(r))throw new RangeError("wire-codec: invalid or over-long bigint (max 1024 digits)");return BigInt(r)}case"date":return new Date(f(e[2],t+1));case"map":return new Map(e[2].map(([r,n])=>[f(r,t+1),f(n,t+1)]));case"set":return new Set(e[2].map(r=>f(r,t+1)));case"url":return new URL(e[2]);case"error":{const r=e[2],n=e[3],c=(Object.hasOwn(w,r)?w[r]:void 0)??Error,y=new c(n);y.name!==r&&Object.defineProperty(y,"name",{configurable:!0,value:r,writable:!0});const d=f(e[4],t+1);for(const b of Object.keys(d))b===A?Object.defineProperty(y,b,{configurable:!0,enumerable:!0,value:d[b],writable:!0}):y[b]=d[b];return e.length>5&&Object.defineProperty(y,"cause",{configurable:!0,value:f(e[5],t+1),writable:!0}),y}case"bytes":{const r=p(e[2]),n=e[3]??"Uint8Array";if(n==="ArrayBuffer")return r.buffer.byteLength===r.byteLength?r.buffer:r.slice().buffer;const c=Object.hasOwn(m,n)?m[n]:void 0;return c?new c(r.slice().buffer):r}case"inf":return 1/0;case"nan":return Number.NaN;case"undefined":return;default:return e.map(r=>f(r,t+1))}return e.map(s=>f(s,t+1))}const a=e,o={};for(const s of Object.keys(a)){const r=f(a[s],t+1);s===A?Object.defineProperty(o,s,{configurable:!0,enumerable:!0,value:r,writable:!0}):o[s]=r}return o},l=e=>{try{const t=f(JSON.parse(e));return E(t)?t:void 0}catch{return}};export{f as a,l as d,u as e,E as i};
@@ -0,0 +1 @@
1
+ import{a as O}from"./chunk-WUW4ZHRL.js";import{a as H}from"./chunk-OG57FC7W.js";import{a as ee}from"./chunk-BWEXJENB.js";import"./chunk-74ASA4WU.js";import"./chunk-XQS7KSHL.js";import{b as Z}from"./chunk-SPDZUX4P.js";import"./chunk-7PIHTTND.js";import{b as E}from"./chunk-YUWMB6EV.js";import{f as R}from"./chunk-TBXK3FKP.js";import"./chunk-RCZTUWG3.js";import{a as _}from"./chunk-UANVABQG.js";import{a as K,b as V,c as z,d as F,e as u,f as p}from"./chunk-L4EZAHCD.js";import{a as A,e as T}from"./chunk-IYWVSMAY.js";import{d as M,h as G,o as W,r as X}from"./chunk-6ZPTNC34.js";import"./chunk-VYW2PAWC.js";import{a as c,d as P,e as oe,f as re,g as ae}from"./chunk-R5ZTCHCE.js";var U=P(re(),1),Y=P(oe(),1);var t=P(ae(),1);var se=P(re(),1);var Q=P(oe(),1);var h=P(ae(),1);var ie=c(a=>Number.isFinite(a)?X(a,"\u2014"):"\u2014","X"),le=c(a=>a.toSorted((e,i)=>e.scheduledFor-i.scheduledFor),"j"),ce=c((a,e,i)=>e!==void 0?e:i===void 0?d=>a.cancelScheduledJob(d):void 0,"Y"),de=c(a=>{let e=(0,se.c)(16),{cancelJob:i,loadJobs:d}=a===void 0?{}:a,f=R(),r=M(),l=d===void 0,o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=["lunora-scheduled-jobs"],e[0]=o):o=e[0];let N=E(o,async()=>{let g=await(d??(()=>f.listScheduledJobs()))();return le(g)}),[v,n]=(0,Q.useState)(void 0),[s,m]=(0,Q.useState)(void 0),y,k;e[1]!==f||e[2]!==l?(y=c(()=>{if(l)return f.subscribeScheduledJobs(g=>{m(void 0),n(le(g))})},"v"),k=[l,f],e[1]=f,e[2]=l,e[3]=y,e[4]=k):(y=e[3],k=e[4]),(0,Q.useEffect)(y,k);let x;e[5]!==N?(x=c(()=>{N.refetch()},"y"),e[5]=N,e[6]=x):x=e[6],O(x,!l);let C=ce(f,i,d),b=v??N.data,j=s??N.error,I=c(async g=>{if(C!==void 0){m(void 0);try{await C(g),l||N.refetch()}catch(D){m(G(D))}}},"E"),q="flex flex-col gap-3",B="lunora-scheduled-jobs",J;e[7]!==j?(J=j!==null&&(0,h.jsx)("p",{className:"text-sm text-destructive","data-testid":"sj-error",role:"alert",children:j}),e[7]=j,e[8]=J):J=e[8];let S;e[9]!==b?.length||e[10]!==r?(S=b?.length===0&&(0,h.jsx)(_,{description:r("Jobs queued with runAfter / runAt will appear here."),icon:(0,h.jsxs)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,h.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,h.jsx)("path",{d:"M12 7.5V12l4 2"})]}),testId:"sj-empty",title:r("No scheduled jobs.")}),e[9]=b?.length,e[10]=r,e[11]=S):S=e[11];let $=b!==void 0&&b.length>0&&(0,h.jsx)(A,{className:"overflow-hidden py-0",children:(0,h.jsx)(T,{className:"px-0",children:(0,h.jsxs)(K,{"data-testid":"sj-table",children:[(0,h.jsx)(V,{children:(0,h.jsxs)(F,{children:[(0,h.jsx)(u,{children:r("function")}),(0,h.jsx)(u,{children:r("scheduled for")}),(0,h.jsx)(u,{children:r("pool")}),(0,h.jsx)(u,{children:r("attempts")}),(0,h.jsx)(u,{children:r("shard")}),(0,h.jsx)(u,{children:r("id")}),C!==void 0&&(0,h.jsx)(u,{"aria-label":r("Actions")})]})}),(0,h.jsx)(z,{children:b.map(g=>(0,h.jsxs)(F,{"data-testid":`sj-row-${g.id}`,children:[(0,h.jsx)(p,{className:"font-mono text-xs",children:g.functionPath}),(0,h.jsx)(p,{className:"text-muted-foreground tabular-nums",children:ie(g.scheduledFor)}),(0,h.jsx)(p,{className:"font-mono text-xs",children:g.pool??""}),(0,h.jsx)(p,{className:"tabular-nums",children:g.attempts??0}),(0,h.jsx)(p,{children:g.shardKey??""}),(0,h.jsx)(p,{className:"font-mono text-xs",children:g.id}),C!==void 0&&(0,h.jsx)(p,{className:"text-right",children:(0,h.jsx)(H,{confirmLabel:r("Cancel job?"),onConfirm:c(()=>{W(I(g.id))},"onConfirm"),testId:`sj-cancel-${g.id}`,children:r("Cancel")})})]},g.id))})]})})}),w;return e[12]!==$||e[13]!==J||e[14]!==S?(w=(0,h.jsxs)("div",{className:q,"data-testid":B,children:[J,S,$]}),e[12]=$,e[13]=J,e[14]=S,e[15]=w):w=e[15],w},"he");var he={kind:"idle"},me=c((a,e,i)=>i!==void 0?i:e===void 0?d=>a.runCronJob(d):void 0,"re"),ue=c(({loadCronJobs:a,runCronJob:e}={})=>{let i=R(),d=M(),[f,r]=(0,Y.useState)({}),l=E(["lunora-cron-jobs",a?"custom":"default"],()=>(a??(()=>i.getCronJobs()))()),{data:o,error:N}=l,v=me(i,a,e),n=c(async s=>{if(v!==void 0){r(m=>({...m,[s]:{kind:"running"}}));try{await v(s),r(m=>({...m,[s]:{kind:"ok"}})),l.refetch()}catch(m){r(y=>({...y,[s]:{kind:"error",message:G(m)}}))}}},"i");return(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"lunora-cron-triggers",children:[N!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"cron-error",role:"alert",children:N}),o?.length===0&&(0,t.jsx)(_,{description:d("Triggers declared with the cronJobs() builder appear here."),icon:(0,t.jsxs)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,t.jsx)("path",{d:"M12 7.5V12l4 2"})]}),testId:"cron-empty",title:d("No cron triggers.")}),o!==void 0&&o.length>0&&(0,t.jsx)(A,{className:"overflow-hidden py-0",children:(0,t.jsx)(T,{className:"px-0",children:(0,t.jsxs)(K,{"data-testid":"cron-table",children:[(0,t.jsx)(V,{children:(0,t.jsxs)(F,{children:[(0,t.jsx)(u,{children:d("name")}),(0,t.jsx)(u,{children:d("schedule")}),(0,t.jsx)(u,{children:d("target")}),(0,t.jsx)(u,{children:d("shard")}),v!==void 0&&(0,t.jsx)(u,{"aria-label":d("Actions")})]})}),(0,t.jsx)(z,{children:o.map(s=>{let m=f[s.name]??he;return(0,t.jsxs)(F,{"data-testid":`cron-row-${s.name}`,children:[(0,t.jsx)(p,{children:s.name}),(0,t.jsx)(p,{className:"font-mono text-xs tabular-nums",children:s.cron}),(0,t.jsx)(p,{children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[s.workflow===void 0?(0,t.jsx)(Z,{variant:"outline",children:d("function")}):(0,t.jsx)(Z,{variant:"secondary",children:d("workflow")}),(0,t.jsx)("span",{className:"font-mono text-xs",children:s.workflow??s.functionPath})]})}),(0,t.jsx)(p,{children:s.shardKey??""}),v!==void 0&&(0,t.jsx)(p,{className:"text-right",children:(0,t.jsxs)("span",{className:"flex items-center justify-end gap-2",children:[m.kind==="ok"&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground","data-testid":`cron-ran-${s.name}`,children:d("ran")}),m.kind==="error"&&(0,t.jsx)("span",{className:"text-xs text-destructive","data-testid":`cron-run-error-${s.name}`,role:"alert",children:m.message}),(0,t.jsx)(H,{confirmLabel:d("Run now?"),disabled:m.kind==="running",onConfirm:c(()=>{W(n(s.name))},"onConfirm"),testId:`cron-run-${s.name}`,children:m.kind==="running"?d("Running\u2026"):d("Run now")})]})})]},`${s.cron}:${s.name}`)})})]})})})]})},"le"),pe=c(a=>Number.isFinite(a)?X(a,"\u2014"):"\u2014","se"),fe=c(a=>{let e=(0,U.c)(34),i;e[0]!==a?(i=a===void 0?{}:a,e[0]=a,e[1]=i):i=e[1];let{loadJobs:d,removeJob:f,retryJob:r}=i,l=R(),o=M(),N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=["lunora-dead-jobs"],e[2]=N):N=e[2];let v;e[3]!==l||e[4]!==d?(v=c(async()=>(await(d??(()=>l.listDeadJobs()))()).toSorted(be),"h"),e[3]=l,e[4]=d,e[5]=v):v=e[5];let n=E(N,v),s=n.data,[m,y]=(0,Y.useState)(void 0),k=n.error??m,x=d===void 0,C;e[6]!==l||e[7]!==x||e[8]!==r?(C=r??(x?L=>l.retryDeadJob(L):void 0),e[6]=l,e[7]=x,e[8]=r,e[9]=C):C=e[9];let b=C,j;e[10]!==l||e[11]!==x||e[12]!==f?(j=f??(x?L=>l.removeDeadJob(L):void 0),e[10]=l,e[11]=x,e[12]=f,e[13]=j):j=e[13];let I=j,q;e[14]!==n?(q=c(()=>{n.refetch()},"$"),e[14]=n,e[15]=q):q=e[15],O(q,!0);let B;e[16]!==n?(B=c(async L=>{y(void 0);try{await L,n.refetch()}catch(ne){y(G(ne))}},"I"),e[16]=n,e[17]=B):B=e[17];let J=B,S=b!==void 0||I!==void 0,$;e[18]!==k?($=k!==void 0&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"dlq-error",role:"alert",children:k}),e[18]=k,e[19]=$):$=e[19];let w;e[20]!==s?.length||e[21]!==o?(w=s?.length===0&&(0,t.jsx)(_,{description:o("Jobs that exhaust their retry budget are parked here instead of being dropped."),icon:(0,t.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14"})}),testId:"dlq-empty",title:o("No dead-letter jobs.")}),e[20]=s?.length,e[21]=o,e[22]=w):w=e[22];let g;e[23]!==J||e[24]!==S||e[25]!==s||e[26]!==I||e[27]!==b||e[28]!==o?(g=s!==void 0&&s.length>0&&(0,t.jsx)(A,{className:"overflow-hidden py-0",children:(0,t.jsx)(T,{className:"px-0",children:(0,t.jsxs)(K,{"data-testid":"dlq-table",children:[(0,t.jsx)(V,{children:(0,t.jsxs)(F,{children:[(0,t.jsx)(u,{children:o("function")}),(0,t.jsx)(u,{children:o("attempts")}),(0,t.jsx)(u,{children:o("last tried")}),(0,t.jsx)(u,{children:o("pool")}),(0,t.jsx)(u,{children:o("shard")}),(0,t.jsx)(u,{children:o("id")}),S&&(0,t.jsx)(u,{"aria-label":o("Actions")})]})}),(0,t.jsx)(z,{children:s.map(L=>(0,t.jsxs)(F,{"data-testid":`dlq-row-${L.id}`,children:[(0,t.jsx)(p,{className:"font-mono text-xs",children:L.functionPath}),(0,t.jsx)(p,{className:"tabular-nums",children:L.attempts??0}),(0,t.jsx)(p,{className:"text-muted-foreground tabular-nums",children:pe(L.scheduledFor)}),(0,t.jsx)(p,{className:"font-mono text-xs",children:L.pool??""}),(0,t.jsx)(p,{children:L.shardKey??""}),(0,t.jsx)(p,{className:"font-mono text-xs",children:L.id}),S&&(0,t.jsx)(p,{className:"text-right",children:(0,t.jsxs)("div",{className:"flex justify-end gap-1.5",children:[b!==void 0&&(0,t.jsx)(ee,{"data-testid":`dlq-retry-${L.id}`,onClick:c(()=>{W(J(b(L.id)))},"onClick"),size:"sm",type:"button",variant:"outline",children:o("Retry")}),I!==void 0&&(0,t.jsx)(H,{confirmLabel:o("Drop job?"),onConfirm:c(()=>{W(J(I(L.id)))},"onConfirm"),testId:`dlq-remove-${L.id}`,children:o("Drop")})]})})]},L.id))})]})})}),e[23]=J,e[24]=S,e[25]=s,e[26]=I,e[27]=b,e[28]=o,e[29]=g):g=e[29];let D;return e[30]!==g||e[31]!==$||e[32]!==w?(D=(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"lunora-dead-letter",children:[$,w,g]}),e[30]=g,e[31]=$,e[32]=w,e[33]=D):D=e[33],D},"ne");function be(a,e){return(e.attempts??0)-(a.attempts??0)}c(be,"oe");var te=c(a=>{let e=(0,U.c)(8),{label:i,testId:d,value:f}=a,r;e[0]!==i?(r=(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:i}),e[0]=i,e[1]=r):r=e[1];let l;e[2]!==d||e[3]!==f?(l=(0,t.jsx)("span",{className:"text-2xl font-semibold tabular-nums","data-testid":d,children:f}),e[2]=d,e[3]=f,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=(0,t.jsx)(A,{className:"flex-1 py-0",children:(0,t.jsxs)(T,{className:"flex flex-col gap-1 p-4",children:[r,l]})}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o},"E"),ve=c(a=>{let e=(0,U.c)(25),i;e[0]!==a?(i=a===void 0?{}:a,e[0]=a,e[1]=i):i=e[1];let{loadStatus:d}=i,f=R(),r=M(),l=d===void 0,o;e[2]!==l?(o=["lunora-scheduler-status",l],e[2]=l,e[3]=o):o=e[3];let N;e[4]!==f||e[5]!==d?(N=c(async()=>{let j=await(d??(()=>f.schedulerStatus()))();return{...j,pools:j.pools.toSorted(xe)}},"y"),e[4]=f,e[5]=d,e[6]=N):N=e[6];let v=E(o,N),{data:n,error:s}=v,m;e[7]!==v?(m=c(()=>{v.refetch()},"d"),e[7]=v,e[8]=m):m=e[8],O(m,!0);let y;e[9]!==s?(y=s!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"pools-error",role:"alert",children:s}),e[9]=s,e[10]=y):y=e[10];let k;e[11]!==n||e[12]!==r?(k=n!==void 0&&(0,t.jsxs)("div",{className:"flex gap-3","data-testid":"pools-totals",children:[(0,t.jsx)(te,{label:r("backlog"),testId:"pools-backlog",value:n.backlog}),(0,t.jsx)(te,{label:r("in flight"),testId:"pools-inflight",value:n.inFlight}),(0,t.jsx)(te,{label:r("pools"),testId:"pools-count",value:n.pools.length})]}),e[11]=n,e[12]=r,e[13]=k):k=e[13];let x;e[14]!==n?.pools.length||e[15]!==r?(x=n?.pools.length===0&&(0,t.jsx)(_,{description:r("Pools created with createWorkpool appear here once they have activity."),icon:(0,t.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M4 7h16M4 12h16M4 17h16"})}),testId:"pools-empty",title:r("No workpools.")}),e[14]=n?.pools.length,e[15]=r,e[16]=x):x=e[16];let C;e[17]!==n||e[18]!==r?(C=n!==void 0&&n.pools.length>0&&(0,t.jsx)(A,{className:"overflow-hidden py-0",children:(0,t.jsx)(T,{className:"px-0",children:(0,t.jsxs)(K,{"data-testid":"pools-table",children:[(0,t.jsx)(V,{children:(0,t.jsxs)(F,{children:[(0,t.jsx)(u,{children:r("pool")}),(0,t.jsx)(u,{children:r("queued")}),(0,t.jsx)(u,{children:r("in flight")}),(0,t.jsx)(u,{children:r("max concurrency")})]})}),(0,t.jsx)(z,{children:n.pools.map(ge)})]})})}),e[17]=n,e[18]=r,e[19]=C):C=e[19];let b;return e[20]!==y||e[21]!==k||e[22]!==x||e[23]!==C?(b=(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"lunora-scheduler-pools",children:[y,k,x,C]}),e[20]=y,e[21]=k,e[22]=x,e[23]=C,e[24]=b):b=e[24],b},"ae");function xe(a,e){return e.queued-a.queued}c(xe,"ie");function ge(a){return(0,t.jsxs)(F,{"data-testid":`pools-row-${a.name}`,children:[(0,t.jsx)(p,{className:"font-mono text-xs",children:a.name}),(0,t.jsx)(p,{className:"tabular-nums",children:a.queued}),(0,t.jsxs)(p,{className:"tabular-nums",children:[a.inFlight," / ",a.maxConcurrency]}),(0,t.jsx)(p,{className:"tabular-nums",children:a.maxConcurrency})]},a.name)}c(ge,"de");var Ne=["jobs","dead","pools","cron"],Ve=c(a=>{let e=(0,U.c)(41),i;e[0]!==a?(i=a===void 0?{}:a,e[0]=a,e[1]=i):i=e[1];let{loadCronJobs:d,scheduledCancel:f,scheduledLoad:r}=i,l=M(),[o,N]=(0,Y.useState)("jobs"),v;e[2]!==l?(v=l("Cron triggers"),e[2]=l,e[3]=v):v=e[3];let n;e[4]!==l?(n=l("Dead letter"),e[4]=l,e[5]=n):n=e[5];let s;e[6]!==l?(s=l("Scheduled jobs"),e[6]=l,e[7]=s):s=e[7];let m;e[8]!==l?(m=l("Pools"),e[8]=l,e[9]=m):m=e[9];let y;e[10]!==v||e[11]!==n||e[12]!==s||e[13]!==m?(y={cron:v,dead:n,jobs:s,pools:m},e[10]=v,e[11]=n,e[12]=s,e[13]=m,e[14]=y):y=e[14];let k=y,x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=c(w=>{N(w.currentTarget.dataset.view)},"f"),e[15]=x):x=e[15];let C=x,b;e[16]!==l?(b=l("Schedule view"),e[16]=l,e[17]=b):b=e[17];let j;e[18]!==o||e[19]!==k?(j=Ne.map(w=>(0,t.jsx)(ee,{"aria-selected":o===w,"data-testid":`schedule-view-${w}`,"data-view":w,onClick:C,role:"tab",size:"sm",type:"button",variant:o===w?"default":"outline",children:k[w]},w)),e[18]=o,e[19]=k,e[20]=j):j=e[20];let I;e[21]!==b||e[22]!==j?(I=(0,t.jsx)("div",{"aria-label":b,className:"flex gap-1.5","data-testid":"schedule-view-toggle",role:"tablist",children:j}),e[21]=b,e[22]=j,e[23]=I):I=e[23];let q;e[24]!==f||e[25]!==r||e[26]!==o?(q=o==="jobs"&&(0,t.jsx)(de,{cancelJob:f,loadJobs:r}),e[24]=f,e[25]=r,e[26]=o,e[27]=q):q=e[27];let B;e[28]!==o?(B=o==="dead"&&(0,t.jsx)(fe,{}),e[28]=o,e[29]=B):B=e[29];let J;e[30]!==o?(J=o==="pools"&&(0,t.jsx)(ve,{}),e[30]=o,e[31]=J):J=e[31];let S;e[32]!==d||e[33]!==o?(S=o==="cron"&&(0,t.jsx)(ue,{loadCronJobs:d}),e[32]=d,e[33]=o,e[34]=S):S=e[34];let $;return e[35]!==I||e[36]!==q||e[37]!==B||e[38]!==J||e[39]!==S?($=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-schedule",children:[I,q,B,J,S]}),e[35]=I,e[36]=q,e[37]=B,e[38]=J,e[39]=S,e[40]=$):$=e[40],$},"Ie");export{Ve as SchedulePanel};
@@ -1 +1 @@
1
- import{a as x}from"./chunk-QWGT25SE.js";import{b as h}from"./chunk-THIXMMZD.js";import{r as v}from"./chunk-IUYFXK4X.js";import{a as g,e as p,g as k,h as y}from"./chunk-3XIESWL4.js";var N=p(k(),1);var l=p(y(),1);var b={debug:"secondary",error:"destructive",fatal:"destructive",info:"outline",log:"outline",trace:"outline",warn:"secondary"},F=g(w=>{let e=(0,N.c)(21),{entry:t}=w,c;e[0]!==t.fields?(c=x(t.fields),e[0]=t.fields,e[1]=c):c=e[1];let m=c,s;e[2]!==t.timestamp?(s=v(t.timestamp),e[2]=t.timestamp,e[3]=s):s=e[3];let r;e[4]!==s?(r=(0,l.jsx)("span",{className:"w-44 shrink-0 tabular-nums text-muted-foreground",role:"gridcell",children:s}),e[4]=s,e[5]=r):r=e[5];let u=b[t.level],a;e[6]!==t.level||e[7]!==u?(a=(0,l.jsx)("span",{className:"w-20 shrink-0",role:"gridcell",children:(0,l.jsx)(h,{variant:u,children:t.level})}),e[6]=t.level,e[7]=u,e[8]=a):a=e[8];let f=t.functionPath??"\u2014",n;e[9]!==f?(n=(0,l.jsx)("span",{className:"w-48 shrink-0 truncate text-muted-foreground",role:"gridcell",children:f}),e[9]=f,e[10]=n):n=e[10];let i;e[11]!==m?(i=m===""?null:(0,l.jsx)("span",{className:"ml-2 text-muted-foreground","data-testid":"lg-fields",children:m}),e[11]=m,e[12]=i):i=e[12];let o;e[13]!==t.message||e[14]!==i?(o=(0,l.jsxs)("span",{className:"flex-1 truncate",role:"gridcell",children:[t.message,i]}),e[13]=t.message,e[14]=i,e[15]=o):o=e[15];let d;return e[16]!==r||e[17]!==a||e[18]!==n||e[19]!==o?(d=(0,l.jsxs)(l.Fragment,{children:[r,a,n,o]}),e[16]=r,e[17]=a,e[18]=n,e[19]=o,e[20]=d):d=e[20],d},"A");export{b as a,F as b};
1
+ import{a as x}from"./chunk-CAOUXOL7.js";import{b as h}from"./chunk-SPDZUX4P.js";import{r as v}from"./chunk-6ZPTNC34.js";import{a as g,d as p,f as k,g as y}from"./chunk-R5ZTCHCE.js";var N=p(k(),1);var l=p(y(),1);var b={debug:"secondary",error:"destructive",fatal:"destructive",info:"outline",log:"outline",trace:"outline",warn:"secondary"},F=g(w=>{let e=(0,N.c)(21),{entry:t}=w,c;e[0]!==t.fields?(c=x(t.fields),e[0]=t.fields,e[1]=c):c=e[1];let m=c,s;e[2]!==t.timestamp?(s=v(t.timestamp),e[2]=t.timestamp,e[3]=s):s=e[3];let r;e[4]!==s?(r=(0,l.jsx)("span",{className:"w-44 shrink-0 tabular-nums text-muted-foreground",role:"gridcell",children:s}),e[4]=s,e[5]=r):r=e[5];let u=b[t.level],a;e[6]!==t.level||e[7]!==u?(a=(0,l.jsx)("span",{className:"w-20 shrink-0",role:"gridcell",children:(0,l.jsx)(h,{variant:u,children:t.level})}),e[6]=t.level,e[7]=u,e[8]=a):a=e[8];let f=t.functionPath??"\u2014",n;e[9]!==f?(n=(0,l.jsx)("span",{className:"w-48 shrink-0 truncate text-muted-foreground",role:"gridcell",children:f}),e[9]=f,e[10]=n):n=e[10];let i;e[11]!==m?(i=m===""?null:(0,l.jsx)("span",{className:"ml-2 text-muted-foreground","data-testid":"lg-fields",children:m}),e[11]=m,e[12]=i):i=e[12];let o;e[13]!==t.message||e[14]!==i?(o=(0,l.jsxs)("span",{className:"flex-1 truncate",role:"gridcell",children:[t.message,i]}),e[13]=t.message,e[14]=i,e[15]=o):o=e[15];let d;return e[16]!==r||e[17]!==a||e[18]!==n||e[19]!==o?(d=(0,l.jsxs)(l.Fragment,{children:[r,a,n,o]}),e[16]=r,e[17]=a,e[18]=n,e[19]=o,e[20]=d):d=e[20],d},"B");export{b as a,F as b};
@@ -0,0 +1 @@
1
+ import{a as O}from"./chunk-METRMDIQ.js";import{a as C}from"./chunk-NXXGISFB.js";import{b as v}from"./chunk-SPDZUX4P.js";import"./chunk-7PIHTTND.js";import{a as k}from"./chunk-UIF57LBO.js";import"./chunk-PZ4QDWTI.js";import"./chunk-FLCK2WWQ.js";import"./chunk-F7JOSNAT.js";import{a as S}from"./chunk-VDW32UET.js";import{c as b}from"./chunk-YUWMB6EV.js";import"./chunk-TBXK3FKP.js";import"./chunk-RCZTUWG3.js";import{a as c}from"./chunk-UANVABQG.js";import{a as w,b as T,c as A,d as f,e as s,f as l}from"./chunk-L4EZAHCD.js";import{a as y,e as N}from"./chunk-IYWVSMAY.js";import{d as p}from"./chunk-6ZPTNC34.js";import"./chunk-VYW2PAWC.js";import{a as n,d as x,e as R,g as V}from"./chunk-R5ZTCHCE.js";var F=x(R(),1);var e=x(V(),1);var $=n(a=>{let t=a.trim();if(t.length===0)return{context:void 0,error:null};try{let o=JSON.parse(t);return o===null||typeof o!="object"||Array.isArray(o)?{context:void 0,error:"Targeting context must be a JSON object."}:{context:o,error:null}}catch{return{context:void 0,error:"Targeting context is not valid JSON."}}},"H"),q='{ "targetingKey": "user-123", "plan": "premium" }',D=n(a=>a.type==="object"?JSON.stringify(a.value):String(a.value),"R"),Y=n(({initialShardKey:a=""})=>{let t=p(),[o,j]=(0,F.useState)(""),{context:g,error:m}=$(o),I=g===void 0?{}:{context:g},{data:i,error:J,errorSource:K,liveError:E}=b(S.listFlags,I,{live:!0,shardKey:a}),u=i!==void 0,L=i?.configured??!1,h=Array.isArray(i?.flags)?[...i.flags].toSorted((r,B)=>r.key.localeCompare(B.key)):[],d;return u&&!L?d=(0,e.jsx)(c,{description:t("No @lunora/flags provider is wired in this deployment. Add lunora/flags.ts with defineFlags({ provider }) to gate code paths on feature flags."),testId:"flags-unconfigured",title:t("No flags provider configured")}):u&&h.length===0?d=(0,e.jsx)(c,{description:t('A flags provider is configured, but no handler reads a flag yet. Call ctx.flags.boolean("key", false) in a query, mutation, or action.'),testId:"flags-empty",title:t("No flags read")}):d=(0,e.jsx)(y,{className:"overflow-hidden py-0",children:(0,e.jsx)(N,{className:"px-0",children:(0,e.jsxs)(w,{"data-testid":"flags-table",children:[(0,e.jsx)(T,{children:(0,e.jsxs)(f,{children:[(0,e.jsx)(s,{children:t("Key")}),(0,e.jsx)(s,{children:t("Type")}),(0,e.jsx)(s,{children:t("Value")}),(0,e.jsx)(s,{children:t("Reason")}),(0,e.jsx)(s,{children:t("Variant")})]})}),(0,e.jsx)(A,{children:h.map(r=>(0,e.jsxs)(f,{"data-testid":`flags-row-${r.key}`,children:[(0,e.jsx)(l,{className:"font-mono text-xs",children:r.key}),(0,e.jsx)(l,{className:"font-mono text-xs text-muted-foreground",children:r.type}),(0,e.jsx)(l,{className:"font-mono text-xs",children:D(r)}),(0,e.jsx)(l,{children:r.errorCode===void 0?(0,e.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:r.reason??"\u2014"}):(0,e.jsx)(v,{"data-testid":`flags-error-${r.key}`,variant:"destructive",children:r.errorCode})}),(0,e.jsx)(l,{className:"font-mono text-xs text-muted-foreground",children:r.variant??"\u2014"})]},r.key))})]})})}),(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-flags-panel",children:[J!==null&&(0,e.jsx)(k,{error:K,testId:"flags-error"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:t('Feature flags are read in code with ctx.flags.<type>("key", default). They evaluate through the OpenFeature provider configured in lunora/flags.ts; edit the targeting context below to see how each flag resolves for a given audience.')}),(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsx)(C,{htmlFor:"flags-targeting-context",children:t("Targeting context (JSON)")}),(0,e.jsx)(O,{className:"font-mono text-xs","data-testid":"flags-context-input",id:"flags-targeting-context",onChange:n(r=>{j(r.target.value)},"onChange"),placeholder:q,rows:3,value:o}),m!==null&&(0,e.jsx)("p",{className:"text-xs text-destructive","data-testid":"flags-context-error",role:"alert",children:t(m)}),E!==void 0&&(0,e.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-500","data-testid":"flags-live-error",role:"alert",children:t("Live updates unavailable; showing the last evaluation.")})]}),d]})},"W");export{Y as default};
@@ -1 +1 @@
1
- import{a as te}from"./chunk-V53KNYRN.js";import{R as Z}from"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import{a as I}from"./chunk-MWIKAR7F.js";import"./chunk-DJZYD5I5.js";import"./chunk-2OUPA2WJ.js";import"./chunk-6ST5ECQA.js";import{a as K}from"./chunk-VDW32UET.js";import{c as ee}from"./chunk-FZ2N52BV.js";import{f as M}from"./chunk-BDHAGUAY.js";import"./chunk-XBDKZZ67.js";import{a as q}from"./chunk-XQCVZAGU.js";import{a as z,b as D,c as F,d as h,e as o,f as i}from"./chunk-WJQLNYGX.js";import{a as T,e as j}from"./chunk-WQH3LT2P.js";import{d as H,f as Q,g as V,h as W,o as $}from"./chunk-IUYFXK4X.js";import"./chunk-5DVJR52Z.js";import{a as n,e as Y,f as ne,h as le}from"./chunk-3XIESWL4.js";var c=Y(ne(),1);var e=Y(le(),1);var oe=["queued","running","paused","waiting","complete","errored","terminated"],ie=["pause","resume","terminate"],de="WORKFLOWS_NOT_CONFIGURED",ce=n(l=>typeof l=="object"&&l!==null&&l.code===de,"ie"),me=n(l=>{let r=l.error??l.output;if(r===void 0)return"\u2014";try{return JSON.stringify(r)}catch{return"(unserializable)"}},"de"),ue=n(({loadDetail:l,loadInstances:r,readOnly:N,runAction:R,workflowName:g})=>{let A=M(),s=H(),[p,k]=(0,c.useState)(null),[S,O]=(0,c.useState)(null),[v,_]=(0,c.useState)(""),[b,f]=(0,c.useState)(null),[J,C]=(0,c.useState)(!1),[L,P]=(0,c.useState)(null),w=l??(a=>A.getWorkflowInstance(a)),x=N?void 0:R??(r===void 0?a=>A.setWorkflowInstanceStatus(a):void 0),E=n(async()=>{f(null),C(!1);let a=v===""?void 0:v;try{if(r===void 0){let d=await A.listWorkflowInstances({name:g,status:a});if(d.configured===!1){k(null),C(!0);return}k(d.instances);return}k(await r({name:g,status:a}))}catch(d){k(null),ce(d)?C(!0):f(W(d))}},"O");(0,c.useEffect)(()=>{O(null),$(E())},[g,v]);let U=n(async a=>{f(null);try{O(await w({id:a,name:g}))}catch(d){f(W(d))}},"D"),B=n(async(a,d)=>{if(x!==void 0){P(a),f(null);try{await x({action:d,id:a,name:g}),await E()}catch(G){f(W(G))}P(null)}},"K");return(0,e.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"lunora-workflow-instances",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsx)("h3",{className:"text-sm font-medium",children:s("Instance history")}),(0,e.jsxs)("select",{"aria-label":s("Filter by status"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"workflow-instances-filter",onChange:n(a=>{_(a.target.value)},"onChange"),value:v,children:[(0,e.jsx)("option",{value:"",children:s("All statuses")}),oe.map(a=>(0,e.jsx)("option",{value:a,children:a},a))]})]}),b!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"workflow-instances-error",role:"alert",children:b}),J&&(0,e.jsx)(q,{description:s("Set CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN in your .dev.vars to enable workflow instance history."),testId:"workflow-instances-unconfigured",title:s("Workflow inspection not configured")}),!J&&p!==null&&p.length===0&&(0,e.jsx)(q,{description:s("No instances match this filter for the selected workflow."),testId:"workflow-instances-empty",title:s("No instances")}),p!==null&&p.length>0&&(0,e.jsx)(T,{className:"overflow-hidden py-0",children:(0,e.jsx)(j,{className:"px-0",children:(0,e.jsxs)(z,{"data-testid":"workflow-instances-table",children:[(0,e.jsx)(D,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(o,{children:s("Instance id")}),(0,e.jsx)(o,{children:s("Status")}),(0,e.jsx)(o,{children:s("Created")}),(0,e.jsx)(o,{children:s("Ended")}),(0,e.jsx)(o,{"aria-label":s("Actions")})]})}),(0,e.jsx)(F,{children:p.map(a=>(0,e.jsxs)(h,{"data-testid":`workflow-instance-${a.id}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:a.id}),(0,e.jsx)(i,{className:"font-mono text-xs",children:a.status}),(0,e.jsx)(i,{className:"text-muted-foreground tabular-nums",children:a.createdOn??"\u2014"}),(0,e.jsx)(i,{className:"text-muted-foreground tabular-nums",children:a.endedOn??"\u2014"}),(0,e.jsx)(i,{className:"text-right",children:(0,e.jsxs)("div",{className:"flex justify-end gap-1.5",children:[(0,e.jsx)(I,{"data-testid":`workflow-instance-steps-${a.id}`,onClick:n(()=>{$(U(a.id))},"onClick"),size:"sm",type:"button",variant:"outline",children:s("Steps")}),x!==void 0&&ie.map(d=>(0,e.jsx)(I,{"data-testid":`workflow-instance-${d}-${a.id}`,disabled:L===a.id,onClick:n(()=>{$(B(a.id,d))},"onClick"),size:"sm",type:"button",variant:"ghost",children:s(d)},d))]})})]},a.id))})]})})}),S!==null&&(0,e.jsx)(T,{className:"overflow-hidden py-0","data-testid":"workflow-instance-detail",children:(0,e.jsxs)(j,{className:"flex flex-col gap-2 px-4 py-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("span",{className:"font-mono text-xs",children:[s("Steps")," \xB7 ",S.id]}),(0,e.jsx)(I,{"data-testid":"workflow-instance-detail-close",onClick:n(()=>{O(null)},"onClick"),size:"xs",type:"button",variant:"ghost",children:s("Close")})]}),S.steps.length===0?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:s("This instance has no recorded steps yet.")}):(0,e.jsxs)(z,{"data-testid":"workflow-instance-steps",children:[(0,e.jsx)(D,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(o,{children:s("Step")}),(0,e.jsx)(o,{children:s("Type")}),(0,e.jsx)(o,{children:s("Attempts")}),(0,e.jsx)(o,{children:s("Started")}),(0,e.jsx)(o,{children:s("Output")})]})}),(0,e.jsx)(F,{children:S.steps.map((a,d)=>(0,e.jsxs)(h,{"data-testid":`workflow-step-${String(d)}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:a.name}),(0,e.jsx)(i,{className:"text-xs text-muted-foreground",children:a.type??"\u2014"}),(0,e.jsx)(i,{className:"tabular-nums",children:a.attempts??"\u2014"}),(0,e.jsx)(i,{className:"text-muted-foreground tabular-nums",children:a.start??"\u2014"}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:me(a)})]},`${a.name}:${String(d)}`))})]})]})})]})},"ce"),fe=Q(K.createWorkflowInstance),he=Q(K.getWorkflowInstanceStatus),pe=n(l=>{if(l.error)return`${l.error.name}: ${l.error.message}`;if(l.output===void 0)return"\u2014";try{return JSON.stringify(l.output)}catch{return"(unserializable)"}},"fe"),we=n((l,r)=>l.some(N=>N.exportName===r)?r:l[0]?.exportName??"","he"),We=n(()=>{let l=M(),r=H(),{data:N,error:R}=ee(K.listWorkflows,{}),[g,A]=(0,c.useState)(""),[s,p]=(0,c.useState)(""),[k,S]=(0,c.useState)(""),[O,v]=(0,c.useState)(!1),[_,b]=(0,c.useState)(null),[f,J]=(0,c.useState)([]),[C,L]=(0,c.useState)(null),P=N!==void 0,w=Array.isArray(N?.workflows)?[...N.workflows].toSorted((t,u)=>t.exportName.localeCompare(u.exportName)):[],x=we(w,g),E=w.find(t=>t.exportName===x),U=n(t=>{J(u=>{let m=u.filter(y=>!(y.exportName===t.exportName&&y.id===t.id));return[t,...m]})},"D"),B=n(async()=>{let t=x;if(t==="")return;let u,m=k.trim();if(m!=="")try{u=JSON.parse(m)}catch{b(r("Params must be valid JSON"));return}v(!0),b(null);try{let y=s.trim(),X=await l.query(fe,{exportName:t,id:y===""?void 0:y,params:u},V(""));U({exportName:t,id:X.id,status:X.status}),p("")}catch(y){b(W(y))}v(!1)},"K"),a=n(()=>{$(B())},"a"),d=n(async(t,u)=>{L(u);try{let m=await l.query(he,{exportName:t,id:u},V(""));U({error:m.error,exportName:t,id:m.id,output:m.output,status:m.status})}catch(m){b(W(m))}L(null)},"l"),G=n(t=>{A(t.target.value)},"P"),ae=n(t=>{p(t.target.value)},"Y"),re=n(t=>{S(t.target.value)},"Z"),se=n(t=>{let{export:u,id:m}=t.currentTarget.dataset;u!==void 0&&m!==void 0&&$(d(u,m))},"ee");return(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-workflows-panel",children:[R!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"workflows-error",role:"alert",children:R}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:r("Workflows are declared in code with defineWorkflow and run as durable Cloudflare Workflows. Start an instance and observe its status below.")}),P&&w.length===0?(0,e.jsx)(q,{description:r("No defineWorkflow is declared in lunora/workflows.ts in this deployment. Add one to run a durable, multi-step workflow."),testId:"workflows-empty",title:r("No workflows defined")}):(0,e.jsx)(T,{className:"overflow-hidden py-0",children:(0,e.jsx)(j,{className:"px-0",children:(0,e.jsxs)(z,{"data-testid":"workflows-table",children:[(0,e.jsx)(D,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(o,{children:r("Export")}),(0,e.jsx)(o,{children:r("Name")}),(0,e.jsx)(o,{children:r("Class")}),(0,e.jsx)(o,{children:r("Binding")})]})}),(0,e.jsx)(F,{children:w.map(t=>(0,e.jsxs)(h,{"data-testid":`workflows-row-${t.exportName}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:t.exportName}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.name}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.className}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.binding})]},t.exportName))})]})})}),w.length>0&&(0,e.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"workflows-start",children:[(0,e.jsx)("h3",{className:"text-sm font-medium",children:r("Start instance")}),_!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"workflows-start-error",role:"alert",children:_}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)("select",{"aria-label":r("Workflow"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"workflows-start-select",onChange:G,value:x,children:w.map(t=>(0,e.jsx)("option",{value:t.exportName,children:t.exportName},t.exportName))}),(0,e.jsx)(Z,{"aria-label":r("Instance id (optional)"),className:"max-w-48","data-testid":"workflows-start-id",onChange:ae,placeholder:r("Instance id (optional)"),value:s}),(0,e.jsx)(I,{"data-testid":"workflows-start-button",disabled:O||x==="",onClick:a,children:r(O?"Starting\u2026":"Start instance")})]}),(0,e.jsx)(te,{"aria-label":r("Params (JSON)"),className:"font-mono","data-testid":"workflows-start-params",onChange:re,placeholder:r("Params (JSON, optional)"),value:k})]}),f.length>0&&(0,e.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"workflows-instances",children:[(0,e.jsx)("h3",{className:"text-sm font-medium",children:r("Instances")}),(0,e.jsx)(T,{className:"overflow-hidden py-0",children:(0,e.jsx)(j,{className:"px-0",children:(0,e.jsxs)(z,{"data-testid":"workflows-instances-table",children:[(0,e.jsx)(D,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(o,{children:r("Workflow")}),(0,e.jsx)(o,{children:r("Instance id")}),(0,e.jsx)(o,{children:r("Status")}),(0,e.jsx)(o,{children:r("Output")}),(0,e.jsx)(o,{})]})}),(0,e.jsx)(F,{children:f.map(t=>(0,e.jsxs)(h,{"data-testid":`workflows-instance-${t.id}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:t.exportName}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.id}),(0,e.jsx)(i,{className:"font-mono text-xs",children:t.status}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:pe(t)}),(0,e.jsx)(i,{children:(0,e.jsx)(I,{"data-export":t.exportName,"data-id":t.id,"data-testid":`workflows-instance-refresh-${t.id}`,disabled:C===t.id,onClick:se,size:"xs",variant:"outline",children:C===t.id?r("Refreshing\u2026"):r("Refresh")})})]},`${t.exportName}:${t.id}`))})]})})})]}),E!==void 0&&(0,e.jsx)(ue,{workflowName:E.name})]})},"Oe");export{We as default};
1
+ import{a as te}from"./chunk-METRMDIQ.js";import{P as Z}from"./chunk-AOAJGSYZ.js";import"./chunk-TFMQSCGC.js";import{a as O}from"./chunk-BWEXJENB.js";import"./chunk-74ASA4WU.js";import"./chunk-XQS7KSHL.js";import"./chunk-7PIHTTND.js";import{a as K}from"./chunk-VDW32UET.js";import{c as ee}from"./chunk-YUWMB6EV.js";import{f as M}from"./chunk-TBXK3FKP.js";import"./chunk-RCZTUWG3.js";import{a as P}from"./chunk-UANVABQG.js";import{a as D,b as F,c as L,d as h,e as o,f as i}from"./chunk-L4EZAHCD.js";import{a as E,e as _}from"./chunk-IYWVSMAY.js";import{d as H,f as Q,g as V,h as W,o as $}from"./chunk-6ZPTNC34.js";import"./chunk-VYW2PAWC.js";import{a as n,d as Y,e as ne,g as le}from"./chunk-R5ZTCHCE.js";var c=Y(ne(),1);var e=Y(le(),1);var oe=["queued","running","paused","waiting","complete","errored","terminated"],ie=["pause","resume","terminate"],de="WORKFLOWS_NOT_CONFIGURED",ce=n(l=>typeof l=="object"&&l!==null&&l.code===de,"ie"),me=n(l=>{let r=l.error??l.output;if(r===void 0)return"\u2014";try{return JSON.stringify(r)}catch{return"(unserializable)"}},"de"),ue=n(({loadDetail:l,loadInstances:r,readOnly:N,runAction:j,workflowName:g})=>{let A=M(),s=H(),[p,k]=(0,c.useState)(null),[S,C]=(0,c.useState)(null),[v,z]=(0,c.useState)(""),[b,f]=(0,c.useState)(null),[J,I]=(0,c.useState)(!1),[R,U]=(0,c.useState)(null),x=l??(a=>A.getWorkflowInstance(a)),w=N?void 0:j??(r===void 0?a=>A.setWorkflowInstanceStatus(a):void 0),T=n(async()=>{f(null),I(!1);let a=v===""?void 0:v;try{if(r===void 0){let d=await A.listWorkflowInstances({name:g,status:a});if(d.configured===!1){k(null),I(!0);return}k(d.instances);return}k(await r({name:g,status:a}))}catch(d){k(null),ce(d)?I(!0):f(W(d))}},"L");(0,c.useEffect)(()=>{C(null),$(T())},[g,v]);let q=n(async a=>{f(null);try{C(await x({id:a,name:g}))}catch(d){f(W(d))}},"K"),B=n(async(a,d)=>{if(w!==void 0){U(a),f(null);try{await w({action:d,id:a,name:g}),await T()}catch(G){f(W(G))}U(null)}},"q");return(0,e.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"lunora-workflow-instances",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsx)("h3",{className:"text-sm font-medium",children:s("Instance history")}),(0,e.jsxs)("select",{"aria-label":s("Filter by status"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"workflow-instances-filter",onChange:n(a=>{z(a.target.value)},"onChange"),value:v,children:[(0,e.jsx)("option",{value:"",children:s("All statuses")}),oe.map(a=>(0,e.jsx)("option",{value:a,children:a},a))]})]}),b!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"workflow-instances-error",role:"alert",children:b}),J&&(0,e.jsx)(P,{description:s("Set CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN in your .dev.vars to enable workflow instance history."),testId:"workflow-instances-unconfigured",title:s("Workflow inspection not configured")}),!J&&p!==null&&p.length===0&&(0,e.jsx)(P,{description:s("No instances match this filter for the selected workflow."),testId:"workflow-instances-empty",title:s("No instances")}),p!==null&&p.length>0&&(0,e.jsx)(E,{className:"overflow-hidden py-0",children:(0,e.jsx)(_,{className:"px-0",children:(0,e.jsxs)(D,{"data-testid":"workflow-instances-table",children:[(0,e.jsx)(F,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(o,{children:s("Instance id")}),(0,e.jsx)(o,{children:s("Status")}),(0,e.jsx)(o,{children:s("Created")}),(0,e.jsx)(o,{children:s("Ended")}),(0,e.jsx)(o,{"aria-label":s("Actions")})]})}),(0,e.jsx)(L,{children:p.map(a=>(0,e.jsxs)(h,{"data-testid":`workflow-instance-${a.id}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:a.id}),(0,e.jsx)(i,{className:"font-mono text-xs",children:a.status}),(0,e.jsx)(i,{className:"text-muted-foreground tabular-nums",children:a.createdOn??"\u2014"}),(0,e.jsx)(i,{className:"text-muted-foreground tabular-nums",children:a.endedOn??"\u2014"}),(0,e.jsx)(i,{className:"text-right",children:(0,e.jsxs)("div",{className:"flex justify-end gap-1.5",children:[(0,e.jsx)(O,{"data-testid":`workflow-instance-steps-${a.id}`,onClick:n(()=>{$(q(a.id))},"onClick"),size:"sm",type:"button",variant:"outline",children:s("Steps")}),w!==void 0&&ie.map(d=>(0,e.jsx)(O,{"data-testid":`workflow-instance-${d}-${a.id}`,disabled:R===a.id,onClick:n(()=>{$(B(a.id,d))},"onClick"),size:"sm",type:"button",variant:"ghost",children:s(d)},d))]})})]},a.id))})]})})}),S!==null&&(0,e.jsx)(E,{className:"overflow-hidden py-0","data-testid":"workflow-instance-detail",children:(0,e.jsxs)(_,{className:"flex flex-col gap-2 px-4 py-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("span",{className:"font-mono text-xs",children:[s("Steps")," \xB7 ",S.id]}),(0,e.jsx)(O,{"data-testid":"workflow-instance-detail-close",onClick:n(()=>{C(null)},"onClick"),size:"xs",type:"button",variant:"ghost",children:s("Close")})]}),S.steps.length===0?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:s("This instance has no recorded steps yet.")}):(0,e.jsxs)(D,{"data-testid":"workflow-instance-steps",children:[(0,e.jsx)(F,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(o,{children:s("Step")}),(0,e.jsx)(o,{children:s("Type")}),(0,e.jsx)(o,{children:s("Attempts")}),(0,e.jsx)(o,{children:s("Started")}),(0,e.jsx)(o,{children:s("Output")})]})}),(0,e.jsx)(L,{children:S.steps.map((a,d)=>(0,e.jsxs)(h,{"data-testid":`workflow-step-${String(d)}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:a.name}),(0,e.jsx)(i,{className:"text-xs text-muted-foreground",children:a.type??"\u2014"}),(0,e.jsx)(i,{className:"tabular-nums",children:a.attempts??"\u2014"}),(0,e.jsx)(i,{className:"text-muted-foreground tabular-nums",children:a.start??"\u2014"}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:me(a)})]},`${a.name}:${String(d)}`))})]})]})})]})},"ce"),fe=Q(K.createWorkflowInstance),he=Q(K.getWorkflowInstanceStatus),pe=n(l=>{if(l.error)return`${l.error.name}: ${l.error.message}`;if(l.output===void 0)return"\u2014";try{return JSON.stringify(l.output)}catch{return"(unserializable)"}},"fe"),xe=n((l,r)=>l.some(N=>N.exportName===r)?r:l[0]?.exportName??"","he"),We=n(()=>{let l=M(),r=H(),{data:N,error:j}=ee(K.listWorkflows,{}),[g,A]=(0,c.useState)(""),[s,p]=(0,c.useState)(""),[k,S]=(0,c.useState)(""),[C,v]=(0,c.useState)(!1),[z,b]=(0,c.useState)(null),[f,J]=(0,c.useState)([]),[I,R]=(0,c.useState)(null),U=N!==void 0,x=Array.isArray(N?.workflows)?[...N.workflows].toSorted((t,u)=>t.exportName.localeCompare(u.exportName)):[],w=xe(x,g),T=x.find(t=>t.exportName===w),q=n(t=>{J(u=>{let m=u.filter(y=>!(y.exportName===t.exportName&&y.id===t.id));return[t,...m]})},"C"),B=n(async()=>{let t=w;if(t==="")return;let u,m=k.trim();if(m!=="")try{u=JSON.parse(m)}catch{b(r("Params must be valid JSON"));return}v(!0),b(null);try{let y=s.trim(),X=await l.query(fe,{exportName:t,id:y===""?void 0:y,params:u},V(""));q({exportName:t,id:X.id,status:X.status}),p("")}catch(y){b(W(y))}v(!1)},"L"),a=n(()=>{$(B())},"K"),d=n(async(t,u)=>{R(u);try{let m=await l.query(he,{exportName:t,id:u},V(""));q({error:m.error,exportName:t,id:m.id,output:m.output,status:m.status})}catch(m){b(W(m))}R(null)},"q"),G=n(t=>{A(t.target.value)},"r"),ae=n(t=>{p(t.target.value)},"l"),re=n(t=>{S(t.target.value)},"G"),se=n(t=>{let{export:u,id:m}=t.currentTarget.dataset;u!==void 0&&m!==void 0&&$(d(u,m))},"ee");return(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-workflows-panel",children:[j!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"workflows-error",role:"alert",children:j}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:r("Workflows are declared in code with defineWorkflow and run as durable Cloudflare Workflows. Start an instance and observe its status below.")}),U&&x.length===0?(0,e.jsx)(P,{description:r("No defineWorkflow is declared in lunora/workflows.ts in this deployment. Add one to run a durable, multi-step workflow."),testId:"workflows-empty",title:r("No workflows defined")}):(0,e.jsx)(E,{className:"overflow-hidden py-0",children:(0,e.jsx)(_,{className:"px-0",children:(0,e.jsxs)(D,{"data-testid":"workflows-table",children:[(0,e.jsx)(F,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(o,{children:r("Export")}),(0,e.jsx)(o,{children:r("Name")}),(0,e.jsx)(o,{children:r("Class")}),(0,e.jsx)(o,{children:r("Binding")})]})}),(0,e.jsx)(L,{children:x.map(t=>(0,e.jsxs)(h,{"data-testid":`workflows-row-${t.exportName}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:t.exportName}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.name}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.className}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.binding})]},t.exportName))})]})})}),x.length>0&&(0,e.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"workflows-start",children:[(0,e.jsx)("h3",{className:"text-sm font-medium",children:r("Start instance")}),z!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"workflows-start-error",role:"alert",children:z}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)("select",{"aria-label":r("Workflow"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"workflows-start-select",onChange:G,value:w,children:x.map(t=>(0,e.jsx)("option",{value:t.exportName,children:t.exportName},t.exportName))}),(0,e.jsx)(Z,{"aria-label":r("Instance id (optional)"),className:"max-w-48","data-testid":"workflows-start-id",onChange:ae,placeholder:r("Instance id (optional)"),value:s}),(0,e.jsx)(O,{"data-testid":"workflows-start-button",disabled:C||w==="",onClick:a,children:r(C?"Starting\u2026":"Start instance")})]}),(0,e.jsx)(te,{"aria-label":r("Params (JSON)"),className:"font-mono","data-testid":"workflows-start-params",onChange:re,placeholder:r("Params (JSON, optional)"),value:k})]}),f.length>0&&(0,e.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"workflows-instances",children:[(0,e.jsx)("h3",{className:"text-sm font-medium",children:r("Instances")}),(0,e.jsx)(E,{className:"overflow-hidden py-0",children:(0,e.jsx)(_,{className:"px-0",children:(0,e.jsxs)(D,{"data-testid":"workflows-instances-table",children:[(0,e.jsx)(F,{children:(0,e.jsxs)(h,{children:[(0,e.jsx)(o,{children:r("Workflow")}),(0,e.jsx)(o,{children:r("Instance id")}),(0,e.jsx)(o,{children:r("Status")}),(0,e.jsx)(o,{children:r("Output")}),(0,e.jsx)(o,{})]})}),(0,e.jsx)(L,{children:f.map(t=>(0,e.jsxs)(h,{"data-testid":`workflows-instance-${t.id}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:t.exportName}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.id}),(0,e.jsx)(i,{className:"font-mono text-xs",children:t.status}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:pe(t)}),(0,e.jsx)(i,{children:(0,e.jsx)(O,{"data-export":t.exportName,"data-id":t.id,"data-testid":`workflows-instance-refresh-${t.id}`,disabled:I===t.id,onClick:se,size:"xs",variant:"outline",children:I===t.id?r("Refreshing\u2026"):r("Refresh")})})]},`${t.exportName}:${t.id}`))})]})})})]}),T!==void 0&&(0,e.jsx)(ue,{workflowName:T.name})]})},"Te");export{We as default};
@@ -0,0 +1 @@
1
+ import{b as y}from"./chunk-SPDZUX4P.js";import"./chunk-7PIHTTND.js";import{a as R}from"./chunk-UIF57LBO.js";import"./chunk-PZ4QDWTI.js";import"./chunk-FLCK2WWQ.js";import"./chunk-F7JOSNAT.js";import{a as v}from"./chunk-VDW32UET.js";import{c as $}from"./chunk-YUWMB6EV.js";import"./chunk-TBXK3FKP.js";import"./chunk-RCZTUWG3.js";import{a as S}from"./chunk-UANVABQG.js";import{a as A,b as C,c as I,d as x,e as c,f as n}from"./chunk-L4EZAHCD.js";import{a as k,e as w}from"./chunk-IYWVSMAY.js";import{d as N}from"./chunk-6ZPTNC34.js";import"./chunk-VYW2PAWC.js";import{a as f,d as b,f as E,g as O}from"./chunk-R5ZTCHCE.js";var j=b(E(),1);var r=b(O(),1);var _=f((e,t)=>({delete:e("Delete"),list:e("List"),read:e("Read"),write:e("Write")})[t],"I"),T={delete:2,list:3,read:0,write:1},B=f(e=>[...e].toSorted((t,a)=>t.bucket.localeCompare(a.bucket)||T[t.on]-T[a.on]||(t.prefix??"").localeCompare(a.prefix??"")),"O"),q=f(()=>{let e=(0,j.c)(14),t=N(),a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={},e[0]=a):a=e[0];let{data:l,error:i,errorSource:d}=$(v.storageRules,a),h=l!==void 0,m;if(e[1]!==l||e[2]!==i||e[3]!==d||e[4]!==h||e[5]!==t){let g=B(Array.isArray(l?.rules)?l.rules:[]),u;e[7]!==i||e[8]!==d?(u=i!==null&&(0,r.jsx)(R,{error:d,testId:"storage-rules-error"}),e[7]=i,e[8]=d,e[9]=u):u=e[9];let o;e[10]!==t?(o=t("Storage rules are declared in code with defineStorageRule and gate ctx.storage access per bucket. This view is read-only."),e[10]=t,e[11]=o):o=e[11];let p;e[12]!==o?(p=(0,r.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"storage-rules-note",children:o}),e[12]=o,e[13]=p):p=e[13],m=(0,r.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-storage-rules-panel",children:[u,p,h&&g.length===0?(0,r.jsx)(S,{description:t("No defineStorageRule is wired through .use(storageRules(...)) in this deployment. Add one to gate object access by key prefix."),testId:"storage-rules-empty",title:t("No storage rules defined")}):(0,r.jsx)(k,{className:"overflow-hidden py-0",children:(0,r.jsx)(w,{className:"px-0",children:(0,r.jsxs)(A,{"data-testid":"storage-rules-table",children:[(0,r.jsx)(C,{children:(0,r.jsxs)(x,{children:[(0,r.jsx)(c,{children:t("Bucket")}),(0,r.jsx)(c,{children:t("Operation")}),(0,r.jsx)(c,{children:t("Key prefix")}),(0,r.jsx)(c,{children:t("Guarded by")})]})}),(0,r.jsx)(I,{children:g.map(s=>(0,r.jsxs)(x,{"data-testid":`storage-rule-${s.bucket}-${s.on}-${s.prefix??""}`,children:[(0,r.jsx)(n,{className:"font-mono text-xs",children:s.bucket}),(0,r.jsx)(n,{children:(0,r.jsx)(y,{variant:"secondary",children:_(t,s.on)})}),(0,r.jsx)(n,{className:"font-mono text-xs",children:s.prefix??(0,r.jsx)("span",{className:"text-muted-foreground",children:t("(whole bucket)")})}),(0,r.jsx)(n,{className:"font-mono text-xs text-muted-foreground",children:s.procedure})]},`${s.bucket}:${s.on}:${s.prefix??""}:${s.procedure}`))})]})})})]}),e[1]=l,e[2]=i,e[3]=d,e[4]=h,e[5]=t,e[6]=m}else m=e[6];return m},"M");export{q as default};
@@ -1 +1 @@
1
- import{a as w}from"./chunk-MWIKAR7F.js";import"./chunk-DJZYD5I5.js";import"./chunk-2OUPA2WJ.js";import{b as y}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as C}from"./chunk-CAOA5AM4.js";import"./chunk-XXQUMVWH.js";import"./chunk-VR3OBMGZ.js";import"./chunk-QLQADHFE.js";import{a as h}from"./chunk-VDW32UET.js";import{c as u}from"./chunk-FZ2N52BV.js";import"./chunk-BDHAGUAY.js";import"./chunk-XBDKZZ67.js";import{a as T}from"./chunk-XQCVZAGU.js";import{a as S,b as K,c as $,d as g,e as i,f as o}from"./chunk-WJQLNYGX.js";import{a as A,e as k}from"./chunk-WQH3LT2P.js";import{d as M,r as D}from"./chunk-IUYFXK4X.js";import"./chunk-5DVJR52Z.js";import{a as d,e as z,f as ae,h as re}from"./chunk-3XIESWL4.js";var O=z(ae(),1);var e=z(re(),1);var Q="agent_threads",se="agent_messages",F="agent_run_queue",R=100,ne=250,ie={},oe={filters:[],limit:R,offset:0,orderBy:{column:"updatedAt",direction:"desc"},skipCount:!0,table:Q},l=d((s,t)=>{let r=s[t];return typeof r=="string"?r:void 0},"l"),j=d((s,t)=>{let r=s[t];return typeof r=="number"?r:void 0},"w"),L=d(s=>{let{usage:t}=s;if(t===null||typeof t!="object")return;let{totalTokens:r}=t;return typeof r=="number"?r:void 0},"M"),de=d(s=>{let{toolCalls:t}=s;return Array.isArray(t)?t.map(r=>r!==null&&typeof r=="object"?r.name:void 0).filter(r=>typeof r=="string"):[]},"ne"),le=d(s=>{switch(s){case"awaiting_input":return"warning";case"cancelled":return"warning";case"error":return"destructive";case"running":return"info";default:return"outline"}},"ie"),ce=d(s=>{switch(s){case"approved":return"success";case"rejected":return"destructive";default:return"warning"}},"oe"),be=d(({initialShardKey:s=""})=>{let t=M(),[r,I]=(0,O.useState)(void 0),{data:c}=u(h.listTables,ie,{live:!0,shardKey:s}),G=c!==void 0,p=Array.isArray(c)&&c.some(a=>a.name===Q),H=Array.isArray(c)&&c.some(a=>a.name===F),{data:_,error:J,errorSource:V,liveError:W}=u(h.readTablePage,oe,{enabled:p,live:!0,shardKey:s}),X={filters:[{column:"threadKey",operator:"eq",value:r??""}],limit:ne,offset:0,orderBy:{column:"seq",direction:"asc"},skipCount:!0,table:se},{data:q}=u(h.readTablePage,{limit:R,offset:0,orderBy:{column:"position",direction:"asc"},skipCount:!0,table:F},{enabled:H,live:!0,shardKey:s}),{data:U,error:Y,errorSource:Z}=u(h.readTablePage,X,{enabled:p&&r!==void 0,live:!0,shardKey:s}),v=Array.isArray(_?.rows)?_.rows:[],ee=Array.isArray(q?.rows)?q.rows:[],B=d(a=>ee.filter(n=>l(n,"threadKey")===a).length,"S"),E=Array.isArray(U?.rows)?U.rows:[],P=v.find(a=>l(a,"key")===r),f;return G&&!p?f=(0,e.jsx)(T,{description:t("No @lunora/agent tables found in this deployment. Add lunora/agents.ts with defineAgent(...) and merge the agent schema extension to run durable AI agents."),testId:"agents-unconfigured",title:t("No agents configured")}):p&&v.length===0?f=(0,e.jsx)(T,{description:t("No agent has run yet. Start a run with ctx.agents.<name>.run(...) and its thread appears here."),testId:"agents-empty",title:t("No agent threads yet")}):f=(0,e.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,e.jsx)(A,{className:"overflow-hidden py-0",children:(0,e.jsx)(k,{className:"px-0",children:(0,e.jsxs)(S,{"data-testid":"agents-threads-table",children:[(0,e.jsx)(K,{children:(0,e.jsxs)(g,{children:[(0,e.jsx)(i,{children:t("Agent")}),(0,e.jsx)(i,{children:t("Key")}),(0,e.jsx)(i,{children:t("Status")}),(0,e.jsx)(i,{children:t("Queued")}),(0,e.jsx)(i,{children:t("Messages")}),(0,e.jsx)(i,{children:t("Tokens")}),(0,e.jsx)(i,{children:t("Updated")}),(0,e.jsx)(i,{"aria-label":t("Actions")})]})}),(0,e.jsx)($,{children:v.map(a=>{let n=l(a,"key")??"",m=l(a,"status"),x=L(a);return(0,e.jsxs)(g,{"data-active":n===r?"":void 0,"data-testid":`agents-thread-${n}`,children:[(0,e.jsx)(o,{className:"font-mono text-xs",children:l(a,"agent")??"\u2014"}),(0,e.jsx)(o,{className:"font-mono text-xs text-muted-foreground",children:n}),(0,e.jsx)(o,{children:(0,e.jsx)(y,{"data-testid":`agents-thread-status-${n}`,variant:le(m),children:m??"\u2014"})}),(0,e.jsx)(o,{className:"tabular-nums",children:B(n)===0?(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"}):(0,e.jsx)(y,{"data-testid":`agents-thread-queued-${n}`,variant:"warning",children:B(n)})}),(0,e.jsx)(o,{className:"tabular-nums",children:j(a,"messageCount")??"\u2014"}),(0,e.jsx)(o,{className:"tabular-nums text-muted-foreground",children:x??"\u2014"}),(0,e.jsx)(o,{className:"text-muted-foreground tabular-nums",children:D(j(a,"updatedAt"),"\u2014")}),(0,e.jsx)(o,{className:"text-right",children:(0,e.jsx)(w,{"data-testid":`agents-thread-open-${n}`,onClick:d(()=>{I(n)},"onClick"),size:"sm",type:"button",variant:"outline",children:t("Timeline")})})]},n)})})]})})}),Y!==null&&(0,e.jsx)(C,{error:Z,testId:"agents-messages-error"}),r!==void 0&&(0,e.jsx)(A,{className:"overflow-hidden py-0","data-testid":"agents-thread-detail",children:(0,e.jsxs)(k,{className:"flex flex-col gap-3 px-4 py-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsxs)("span",{className:"font-mono text-xs",children:[t("Timeline")," \xB7 ",r,P!==void 0&&(0,e.jsxs)("span",{className:"text-muted-foreground",children:[" \xB7 ",t("Usage"),": ",L(P)??0," ",t("Tokens")]})]}),(0,e.jsx)(w,{"data-testid":"agents-thread-detail-close",onClick:d(()=>{I(void 0)},"onClick"),size:"xs",type:"button",variant:"ghost",children:t("Close")})]}),E.length===0?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:t("This thread has no messages yet.")}):(0,e.jsxs)(S,{"data-testid":"agents-messages-table",children:[(0,e.jsx)(K,{children:(0,e.jsxs)(g,{children:[(0,e.jsx)(i,{children:t("Role")}),(0,e.jsx)(i,{children:t("Content")}),(0,e.jsx)(i,{children:t("Tool")}),(0,e.jsx)(i,{children:t("Approval")})]})}),(0,e.jsx)($,{children:E.map((a,n)=>{let m=l(a,"role")??"\u2014",x=de(a),te=l(a,"toolName"),N=l(a,"status"),b=j(a,"seq")??n;return(0,e.jsxs)(g,{"data-testid":`agents-message-${String(b)}`,children:[(0,e.jsx)(o,{className:"font-mono text-xs align-top text-muted-foreground",children:m}),(0,e.jsx)(o,{className:"max-w-md font-mono text-xs whitespace-pre-wrap break-words",children:l(a,"content")??"\u2014"}),(0,e.jsx)(o,{className:"font-mono text-xs align-top text-muted-foreground",children:te??(x.length>0?x.join(", "):"\u2014")}),(0,e.jsx)(o,{className:"align-top",children:N===void 0?(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:"\u2014"}):(0,e.jsx)(y,{"data-testid":`agents-message-approval-${String(b)}`,variant:ce(N),children:N})})]},l(a,"messageKey")??`${m}:${String(b)}`)})})]})]})})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-agents-panel",children:[J!==null&&(0,e.jsx)(C,{error:V,testId:"agents-error"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:t("Agents run as durable workflows. Each run persists a thread of assistant and tool messages; select a thread to inspect its timeline, tool calls, approvals, and token usage.")}),W!==void 0&&(0,e.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-500","data-testid":"agents-live-error",role:"alert",children:t("Live updates unavailable; showing the last evaluation.")}),f]})},"Ne");export{be as default};
1
+ import{a as w}from"./chunk-BWEXJENB.js";import"./chunk-74ASA4WU.js";import"./chunk-XQS7KSHL.js";import{b as y}from"./chunk-SPDZUX4P.js";import"./chunk-7PIHTTND.js";import{a as C}from"./chunk-UIF57LBO.js";import"./chunk-PZ4QDWTI.js";import"./chunk-FLCK2WWQ.js";import"./chunk-F7JOSNAT.js";import{a as h}from"./chunk-VDW32UET.js";import{c as u}from"./chunk-YUWMB6EV.js";import"./chunk-TBXK3FKP.js";import"./chunk-RCZTUWG3.js";import{a as T}from"./chunk-UANVABQG.js";import{a as S,b as K,c as $,d as g,e as i,f as o}from"./chunk-L4EZAHCD.js";import{a as A,e as k}from"./chunk-IYWVSMAY.js";import{d as M,r as D}from"./chunk-6ZPTNC34.js";import"./chunk-VYW2PAWC.js";import{a as d,d as z,e as ae,g as re}from"./chunk-R5ZTCHCE.js";var O=z(ae(),1);var e=z(re(),1);var Q="agent_threads",se="agent_messages",F="agent_run_queue",R=100,ne=250,ie={},oe={filters:[],limit:R,offset:0,orderBy:{column:"updatedAt",direction:"desc"},skipCount:!0,table:Q},l=d((s,t)=>{let r=s[t];return typeof r=="string"?r:void 0},"i"),j=d((s,t)=>{let r=s[t];return typeof r=="number"?r:void 0},"A"),L=d(s=>{let{usage:t}=s;if(t===null||typeof t!="object")return;let{totalTokens:r}=t;return typeof r=="number"?r:void 0},"U"),de=d(s=>{let{toolCalls:t}=s;return Array.isArray(t)?t.map(r=>r!==null&&typeof r=="object"?r.name:void 0).filter(r=>typeof r=="string"):[]},"ne"),le=d(s=>{switch(s){case"awaiting_input":return"warning";case"cancelled":return"warning";case"error":return"destructive";case"running":return"info";default:return"outline"}},"oe"),ce=d(s=>{switch(s){case"approved":return"success";case"rejected":return"destructive";default:return"warning"}},"de"),Ne=d(({initialShardKey:s=""})=>{let t=M(),[r,I]=(0,O.useState)(void 0),{data:c}=u(h.listTables,ie,{live:!0,shardKey:s}),G=c!==void 0,p=Array.isArray(c)&&c.some(a=>a.name===Q),H=Array.isArray(c)&&c.some(a=>a.name===F),{data:_,error:J,errorSource:V,liveError:W}=u(h.readTablePage,oe,{enabled:p,live:!0,shardKey:s}),X={filters:[{column:"threadKey",operator:"eq",value:r??""}],limit:ne,offset:0,orderBy:{column:"seq",direction:"asc"},skipCount:!0,table:se},{data:q}=u(h.readTablePage,{limit:R,offset:0,orderBy:{column:"position",direction:"asc"},skipCount:!0,table:F},{enabled:H,live:!0,shardKey:s}),{data:B,error:Y,errorSource:Z}=u(h.readTablePage,X,{enabled:p&&r!==void 0,live:!0,shardKey:s}),v=Array.isArray(_?.rows)?_.rows:[],ee=Array.isArray(q?.rows)?q.rows:[],E=d(a=>ee.filter(n=>l(n,"threadKey")===a).length,"w"),P=Array.isArray(B?.rows)?B.rows:[],U=v.find(a=>l(a,"key")===r),f;return G&&!p?f=(0,e.jsx)(T,{description:t("No @lunora/agent tables found in this deployment. Add lunora/agents.ts with defineAgent(...) and merge the agent schema extension to run durable AI agents."),testId:"agents-unconfigured",title:t("No agents configured")}):p&&v.length===0?f=(0,e.jsx)(T,{description:t("No agent has run yet. Start a run with ctx.agents.<name>.run(...) and its thread appears here."),testId:"agents-empty",title:t("No agent threads yet")}):f=(0,e.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,e.jsx)(A,{className:"overflow-hidden py-0",children:(0,e.jsx)(k,{className:"px-0",children:(0,e.jsxs)(S,{"data-testid":"agents-threads-table",children:[(0,e.jsx)(K,{children:(0,e.jsxs)(g,{children:[(0,e.jsx)(i,{children:t("Agent")}),(0,e.jsx)(i,{children:t("Key")}),(0,e.jsx)(i,{children:t("Status")}),(0,e.jsx)(i,{children:t("Queued")}),(0,e.jsx)(i,{children:t("Messages")}),(0,e.jsx)(i,{children:t("Tokens")}),(0,e.jsx)(i,{children:t("Updated")}),(0,e.jsx)(i,{"aria-label":t("Actions")})]})}),(0,e.jsx)($,{children:v.map(a=>{let n=l(a,"key")??"",m=l(a,"status"),x=L(a);return(0,e.jsxs)(g,{"data-active":n===r?"":void 0,"data-testid":`agents-thread-${n}`,children:[(0,e.jsx)(o,{className:"font-mono text-xs",children:l(a,"agent")??"\u2014"}),(0,e.jsx)(o,{className:"font-mono text-xs text-muted-foreground",children:n}),(0,e.jsx)(o,{children:(0,e.jsx)(y,{"data-testid":`agents-thread-status-${n}`,variant:le(m),children:m??"\u2014"})}),(0,e.jsx)(o,{className:"tabular-nums",children:E(n)===0?(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"}):(0,e.jsx)(y,{"data-testid":`agents-thread-queued-${n}`,variant:"warning",children:E(n)})}),(0,e.jsx)(o,{className:"tabular-nums",children:j(a,"messageCount")??"\u2014"}),(0,e.jsx)(o,{className:"tabular-nums text-muted-foreground",children:x??"\u2014"}),(0,e.jsx)(o,{className:"text-muted-foreground tabular-nums",children:D(j(a,"updatedAt"),"\u2014")}),(0,e.jsx)(o,{className:"text-right",children:(0,e.jsx)(w,{"data-testid":`agents-thread-open-${n}`,onClick:d(()=>{I(n)},"onClick"),size:"sm",type:"button",variant:"outline",children:t("Timeline")})})]},n)})})]})})}),Y!==null&&(0,e.jsx)(C,{error:Z,testId:"agents-messages-error"}),r!==void 0&&(0,e.jsx)(A,{className:"overflow-hidden py-0","data-testid":"agents-thread-detail",children:(0,e.jsxs)(k,{className:"flex flex-col gap-3 px-4 py-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsxs)("span",{className:"font-mono text-xs",children:[t("Timeline")," \xB7 ",r,U!==void 0&&(0,e.jsxs)("span",{className:"text-muted-foreground",children:[" \xB7 ",t("Usage"),": ",L(U)??0," ",t("Tokens")]})]}),(0,e.jsx)(w,{"data-testid":"agents-thread-detail-close",onClick:d(()=>{I(void 0)},"onClick"),size:"xs",type:"button",variant:"ghost",children:t("Close")})]}),P.length===0?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:t("This thread has no messages yet.")}):(0,e.jsxs)(S,{"data-testid":"agents-messages-table",children:[(0,e.jsx)(K,{children:(0,e.jsxs)(g,{children:[(0,e.jsx)(i,{children:t("Role")}),(0,e.jsx)(i,{children:t("Content")}),(0,e.jsx)(i,{children:t("Tool")}),(0,e.jsx)(i,{children:t("Approval")})]})}),(0,e.jsx)($,{children:P.map((a,n)=>{let m=l(a,"role")??"\u2014",x=de(a),te=l(a,"toolName"),b=l(a,"status"),N=j(a,"seq")??n;return(0,e.jsxs)(g,{"data-testid":`agents-message-${String(N)}`,children:[(0,e.jsx)(o,{className:"font-mono text-xs align-top text-muted-foreground",children:m}),(0,e.jsx)(o,{className:"max-w-md font-mono text-xs whitespace-pre-wrap break-words",children:l(a,"content")??"\u2014"}),(0,e.jsx)(o,{className:"font-mono text-xs align-top text-muted-foreground",children:te??(x.length>0?x.join(", "):"\u2014")}),(0,e.jsx)(o,{className:"align-top",children:b===void 0?(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:"\u2014"}):(0,e.jsx)(y,{"data-testid":`agents-message-approval-${String(N)}`,variant:ce(b),children:b})})]},l(a,"messageKey")??`${m}:${String(N)}`)})})]})]})})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-agents-panel",children:[J!==null&&(0,e.jsx)(C,{error:V,testId:"agents-error"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:t("Agents run as durable workflows. Each run persists a thread of assistant and tool messages; select a thread to inspect its timeline, tool calls, approvals, and token usage.")}),W!==void 0&&(0,e.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-500","data-testid":"agents-live-error",role:"alert",children:t("Live updates unavailable; showing the last evaluation.")}),f]})},"be");export{Ne as default};
@@ -0,0 +1 @@
1
+ import{a as E}from"./chunk-WUW4ZHRL.js";import{a as w}from"./chunk-BWEXJENB.js";import"./chunk-74ASA4WU.js";import"./chunk-XQS7KSHL.js";import"./chunk-7PIHTTND.js";import{b as T}from"./chunk-YUWMB6EV.js";import{f as A}from"./chunk-TBXK3FKP.js";import"./chunk-RCZTUWG3.js";import{a as j}from"./chunk-UANVABQG.js";import{a as _,b as $,c as C,d as g,e as o,f as l}from"./chunk-L4EZAHCD.js";import{a as I,e as S}from"./chunk-IYWVSMAY.js";import{d as k,o as B,r as R}from"./chunk-6ZPTNC34.js";import"./chunk-VYW2PAWC.js";import{a as h,d as y,f as K,g as L}from"./chunk-R5ZTCHCE.js";var H=y(K(),1);var s=y(L(),1);var z=200,U=h(()=>{let e=(0,H.c)(21),n=A(),t=k(),u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=["lunora-auth-sessions",z],e[0]=u):u=e[0];let p;e[1]!==n?(p=h(()=>n.listAuthSessions({limit:z}),"u"),e[1]=n,e[2]=p):p=e[2];let a=T(u,p),{error:f}=a,i=a.data?.rows??null,x;e[3]!==a?(x=h(()=>{a.refetch()},"p"),e[3]=a,e[4]=x):x=e[4],E(x,!0);let N;e[5]!==n||e[6]!==a?(N=h(r=>{B((async()=>{await n.revokeAuthSession({sessionId:r}),a.refetch()})())},"x"),e[5]=n,e[6]=a,e[7]=N):N=e[7];let v=N,d;e[8]!==f?(d=f!==null&&(0,s.jsx)("p",{className:"text-sm text-destructive","data-testid":"auth-sessions-error",role:"alert",children:f}),e[8]=f,e[9]=d):d=e[9];let c;e[10]!==i||e[11]!==t?(c=i!==null&&i.length===0&&(0,s.jsx)(j,{testId:"auth-sessions-empty",title:t("No active sessions.")}),e[10]=i,e[11]=t,e[12]=c):c=e[12];let m;e[13]!==v||e[14]!==i||e[15]!==t?(m=i!==null&&i.length>0&&(0,s.jsx)(I,{className:"overflow-hidden py-0",children:(0,s.jsx)(S,{className:"px-0",children:(0,s.jsxs)(_,{"data-testid":"auth-sessions-table",children:[(0,s.jsx)($,{children:(0,s.jsxs)(g,{children:[(0,s.jsx)(o,{children:t("user")}),(0,s.jsx)(o,{children:t("expires")}),(0,s.jsx)(o,{children:t("ip")}),(0,s.jsx)(o,{children:t("user agent")}),(0,s.jsx)(o,{children:t("impersonated by")}),(0,s.jsx)(o,{"aria-label":t("Actions")})]})}),(0,s.jsx)(C,{children:i.map(r=>(0,s.jsxs)(g,{"data-testid":`auth-session-${r.id}`,children:[(0,s.jsx)(l,{className:"font-mono text-xs",children:r.userId}),(0,s.jsx)(l,{className:"text-muted-foreground tabular-nums",children:R(r.expiresAt)}),(0,s.jsx)(l,{children:r.ipAddress??""}),(0,s.jsx)(l,{className:"max-w-40 truncate",children:r.userAgent??""}),(0,s.jsx)(l,{className:"font-mono text-xs",children:r.impersonatedBy??""}),(0,s.jsx)(l,{children:(0,s.jsx)(w,{"data-testid":`auth-session-revoke-${r.id}`,onClick:h(()=>{v(r.id)},"onClick"),size:"xs",type:"button",variant:"ghost",children:t("Revoke")})})]},r.id))})]})})}),e[13]=v,e[14]=i,e[15]=t,e[16]=m):m=e[16];let b;return e[17]!==d||e[18]!==c||e[19]!==m?(b=(0,s.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"auth-sessions",children:[d,c,m]}),e[17]=d,e[18]=c,e[19]=m,e[20]=b):b=e[20],b},"K");export{U as default};
@@ -0,0 +1 @@
1
+ import{a as Be,b as Ue,c as We,d as De,e as we}from"./chunk-VR3UJA7B.js";import"./chunk-AFKLFS74.js";import"./chunk-CP4ZFBVW.js";import{a as Ve}from"./chunk-V6QPVFDL.js";import{a as qe}from"./chunk-JURAVSE7.js";import"./chunk-ZSOLGJFC.js";import"./chunk-DUDQV6XJ.js";import"./chunk-VZCS5GXZ.js";import"./chunk-DKSLOJDQ.js";import{a as Le}from"./chunk-CKTKI4IY.js";import{a as _e}from"./chunk-6FWN26RH.js";import"./chunk-P52BY657.js";import"./chunk-VNTEQQPP.js";import{P as ke}from"./chunk-AOAJGSYZ.js";import"./chunk-INQICZYC.js";import"./chunk-TFMQSCGC.js";import{a as ie}from"./chunk-BWEXJENB.js";import"./chunk-74ASA4WU.js";import"./chunk-XQS7KSHL.js";import{b as me}from"./chunk-SPDZUX4P.js";import"./chunk-7PIHTTND.js";import"./chunk-F7JOSNAT.js";import{a as U}from"./chunk-VDW32UET.js";import{c as Ee}from"./chunk-YUWMB6EV.js";import{f as Ne}from"./chunk-TBXK3FKP.js";import"./chunk-RCZTUWG3.js";import{a as Ae}from"./chunk-UANVABQG.js";import{a as ze,b as Re,c as je,d as pe,e as B,f as z}from"./chunk-L4EZAHCD.js";import{a as Me,e as Ce}from"./chunk-IYWVSMAY.js";import{d as ue,f as re,g as be,h as Ke,o as le,r as Te}from"./chunk-6ZPTNC34.js";import{a as Ie,b as $e}from"./chunk-VYW2PAWC.js";import{a as d,d as ye,e as Oe,f as Ge,g as He}from"./chunk-R5ZTCHCE.js";var ge=ye(Ge(),1);var ne=ye(Oe(),1);var t=ye(He(),1);var Se="none",Je=["all","open","resolved","ignored"],Pe=["critical","high","medium","low"],Qe=re(U.resolveIssue),Xe=re(U.ignoreIssue),Fe=re(U.assignIssue),Ye=re(U.setIssueSeverity),Ze=re(U.explainIssue),es=d(n=>Array.isArray(n?.issues)?n.issues:[],"Xe"),ss=d(n=>n==="resolved"?"success":n==="ignored"?"secondary":"warning","Je"),ts=d(n=>n==="critical"?"destructive":n==="high"?"warning":n==="medium"?"info":"secondary","Ze"),as=d(n=>{let e=(0,ge.c)(44),{expanded:u,issue:s,shardKey:$}=n,i=Ne(),l=ue(),[a,o]=(0,ne.useState)(void 0),{busy:_,error:A,run:R}=Ve(),K;e[0]!==i||e[1]!==s||e[2]!==R||e[3]!==$?(K=d(()=>{o(void 0),R(async()=>{let g={culprit:s.culprit,sampleMessage:s.sampleMessage,title:s.title},I=await i.query(Ze,g,be($));o(I)})},"C"),e[0]=i,e[1]=s,e[2]=R,e[3]=$,e[4]=K):K=e[4];let L=K;if(!u)return null;let k;if(e[5]!==s.sampleMessage){let g=$e(s.sampleMessage);k=g===void 0?void 0:Ie(g.body),e[5]=s.sampleMessage,e[6]=k}else k=e[6];let T=k,E=`issues-detail-${s.hash}`,h;e[7]!==s.sampleMessage?(h=(0,t.jsx)("p",{className:"whitespace-pre-wrap font-mono text-xs text-muted-foreground",children:s.sampleMessage}),e[7]=s.sampleMessage,e[8]=h):h=e[8];let x;e[9]!==l?(x=l("Suggested fix"),e[9]=l,e[10]=x):x=e[10];let M;e[11]!==x?(M=(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:x}),e[11]=x,e[12]=M):M=e[12];let v;e[13]!==T||e[14]!==s.hash||e[15]!==l?(v=T===void 0?(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground","data-testid":`issues-hint-empty-${s.hash}`,children:l("No known fix for this error yet.")}):(0,t.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm","data-testid":`issues-hint-${s.hash}`,children:T}),e[13]=T,e[14]=s.hash,e[15]=l,e[16]=v):v=e[16];let y;e[17]!==M||e[18]!==v?(y=(0,t.jsxs)("div",{children:[M,v]}),e[17]=M,e[18]=v,e[19]=y):y=e[19];let b=`issues-explain-${s.hash}`,w;e[20]!==_||e[21]!==l?(w=l(_?"Explaining\u2026":"Explain in plain language"),e[20]=_,e[21]=l,e[22]=w):w=e[22];let m;e[23]!==_||e[24]!==L||e[25]!==w||e[26]!==b?(m=(0,t.jsx)("div",{children:(0,t.jsx)(ie,{"data-testid":b,disabled:_,onClick:L,size:"sm",type:"button",variant:"outline",children:w})}),e[23]=_,e[24]=L,e[25]=w,e[26]=b,e[27]=m):m=e[27];let f;e[28]!==A||e[29]!==s.hash?(f=A!==null&&(0,t.jsx)("p",{className:"text-xs text-destructive","data-testid":`issues-explain-error-${s.hash}`,role:"alert",children:A}),e[28]=A,e[29]=s.hash,e[30]=f):f=e[30];let p;e[31]!==a||e[32]!==s.hash||e[33]!==l?(p=a!==void 0&&(a.degraded?(0,t.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":`issues-degraded-${s.hash}`,children:a.reason==="no-ai-binding"?l("No AI binding is configured. Wire an AI binding to enable plain-language explanations \u2014 the suggested fix above is always available."):l("The AI model could not explain this error right now. The suggested fix above still applies.")}):(0,t.jsxs)("div",{"data-testid":`issues-explanation-${s.hash}`,children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:l("AI explanation")}),(0,t.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm",children:a.explanation}),a.groundedId===void 0&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground","data-testid":`issues-ungrounded-${s.hash}`,children:l("No catalog fix matched this error, so this explanation is the model's own reading of the message. Verify before acting on it.")}),(0,t.jsx)("p",{className:"mt-1 text-[0.7rem] text-muted-foreground",children:l("Generated by {model}",{model:a.model})})]})),e[31]=a,e[32]=s.hash,e[33]=l,e[34]=p):p=e[34];let c;e[35]!==m||e[36]!==f||e[37]!==p||e[38]!==h||e[39]!==y?(c=(0,t.jsx)(z,{className:"bg-muted/30",colSpan:7,children:(0,t.jsxs)("div",{className:"flex flex-col gap-3 py-1",children:[h,y,m,f,p]})}),e[35]=m,e[36]=f,e[37]=p,e[38]=h,e[39]=y,e[40]=c):c=e[40];let S;return e[41]!==c||e[42]!==E?(S=(0,t.jsx)(pe,{"data-testid":E,children:c}),e[41]=c,e[42]=E,e[43]=S):S=e[43],S},"et"),is=d(n=>{let e=(0,ge.c)(119),{busy:u,issue:s,rowError:$,runTriage:i,shardKey:l}=n,a=ue(),[o,_]=(0,ne.useState)(!1),A;e[0]===Symbol.for("react.memo_cache_sentinel")?(A=d(()=>{_(rs)},"A"),e[0]=A):A=e[0];let R=A,K;e[1]!==s.hash||e[2]!==i?(K=d(ae=>{let ce=ae===null||ae===Se?null:ae;le(i(s.hash,Ye,{severity:ce}))},"C"),e[1]=s.hash,e[2]=i,e[3]=K):K=e[3];let L=K,k;e[4]!==s.hash||e[5]!==i?(k=d(ae=>{if(ae.key!=="Enter")return;let ce=ae.currentTarget.value.trim();le(i(s.hash,Fe,{assignee:ce===""?null:ce}))},"T"),e[4]=s.hash,e[5]=i,e[6]=k):k=e[6];let T=k,E=`issues-row-${s.hash}`,h;e[7]!==a?(h=a("Toggle issue details"),e[7]=a,e[8]=h):h=e[8];let x=`issues-toggle-${s.hash}`,M=`mt-1 size-3 shrink-0 text-muted-foreground transition-transform ${o?"rotate-90":""}`,v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=(0,t.jsx)("path",{d:"m9 6 6 6-6 6"}),e[9]=v):v=e[9];let y;e[10]!==M?(y=(0,t.jsx)("svg",{"aria-hidden":"true",className:M,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",children:v}),e[10]=M,e[11]=y):y=e[11];let b;e[12]!==s.title?(b=(0,t.jsx)("span",{className:"block truncate font-medium",title:s.title,children:s.title}),e[12]=s.title,e[13]=b):b=e[13];let w;e[14]!==s.culprit?(w=(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",title:s.culprit,children:s.culprit}),e[14]=s.culprit,e[15]=w):w=e[15];let m;e[16]!==b||e[17]!==w?(m=(0,t.jsxs)("span",{className:"min-w-0",children:[b,w]}),e[16]=b,e[17]=w,e[18]=m):m=e[18];let f;e[19]!==o||e[20]!==m||e[21]!==h||e[22]!==x||e[23]!==y?(f=(0,t.jsxs)("button",{"aria-expanded":o,"aria-label":h,className:"flex w-full items-start gap-2 text-left","data-testid":x,onClick:R,type:"button",children:[y,m]}),e[19]=o,e[20]=m,e[21]=h,e[22]=x,e[23]=y,e[24]=f):f=e[24];let p;e[25]!==s.hash||e[26]!==$?(p=$!==void 0&&(0,t.jsx)("p",{className:"mt-1 text-xs text-destructive","data-testid":`issues-action-error-${s.hash}`,role:"alert",children:$}),e[25]=s.hash,e[26]=$,e[27]=p):p=e[27];let c;e[28]!==f||e[29]!==p?(c=(0,t.jsxs)(z,{className:"max-w-80",children:[f,p]}),e[28]=f,e[29]=p,e[30]=c):c=e[30];let S=`issues-status-${s.hash}`,g;e[31]!==s.status?(g=ss(s.status),e[31]=s.status,e[32]=g):g=e[32];let I;e[33]!==s.status||e[34]!==S||e[35]!==g?(I=(0,t.jsx)(z,{children:(0,t.jsx)(me,{"data-testid":S,variant:g,children:s.status})}),e[33]=s.status,e[34]=S,e[35]=g,e[36]=I):I=e[36];let j=s.severity??Se,r;e[37]!==a?(r=a("Set severity"),e[37]=a,e[38]=r):r=e[38];let oe=`issues-severity-${s.hash}`,V;e[39]!==a?(V=a("\u2014"),e[39]=a,e[40]=V):V=e[40];let N;e[41]!==s.severity||e[42]!==a?(N=s.severity===void 0?(0,t.jsx)("span",{className:"text-muted-foreground",children:a("\u2014")}):(0,t.jsx)(me,{variant:ts(s.severity),children:s.severity}),e[41]=s.severity,e[42]=a,e[43]=N):N=e[43];let C;e[44]!==V||e[45]!==N?(C=(0,t.jsx)(Ue,{placeholder:V,children:N}),e[44]=V,e[45]=N,e[46]=C):C=e[46];let q;e[47]!==r||e[48]!==oe||e[49]!==C?(q=(0,t.jsx)(We,{"aria-label":r,className:"h-7 w-[110px]","data-testid":oe,children:C}),e[47]=r,e[48]=oe,e[49]=C,e[50]=q):q=e[50];let de;e[51]===Symbol.for("react.memo_cache_sentinel")?(de=Pe.map(ls),e[51]=de):de=e[51];let W;e[52]!==a?(W=a("Clear"),e[52]=a,e[53]=W):W=e[53];let D;e[54]!==W?(D=(0,t.jsxs)(De,{children:[de,(0,t.jsx)(we,{value:Se,children:W})]}),e[54]=W,e[55]=D):D=e[55];let F;e[56]!==u||e[57]!==L||e[58]!==j||e[59]!==q||e[60]!==D?(F=(0,t.jsx)(z,{children:(0,t.jsxs)(Be,{disabled:u,onValueChange:L,value:j,children:[q,D]})}),e[56]=u,e[57]=L,e[58]=j,e[59]=q,e[60]=D,e[61]=F):F=e[61];let O;e[62]!==a?(O=a("Assignee"),e[62]=a,e[63]=O):O=e[63];let fe=`issues-assignee-${s.hash}`,xe=s.assignee??"",ve=s.assignee??"",G;e[64]!==a?(G=a("Unassigned"),e[64]=a,e[65]=G):G=e[65];let H;e[66]!==u||e[67]!==T||e[68]!==O||e[69]!==fe||e[70]!==xe||e[71]!==ve||e[72]!==G?(H=(0,t.jsx)(z,{children:(0,t.jsx)(ke,{"aria-label":O,className:"h-7 w-32","data-testid":fe,defaultValue:xe,disabled:u,onKeyDown:T,placeholder:G},ve)}),e[66]=u,e[67]=T,e[68]=O,e[69]=fe,e[70]=xe,e[71]=ve,e[72]=G,e[73]=H):H=e[73];let J;e[74]!==s.count?(J=(0,t.jsx)(z,{className:"text-right",children:(0,t.jsx)(me,{variant:"secondary",children:s.count})}),e[74]=s.count,e[75]=J):J=e[75];let P;e[76]!==s.lastSeen?(P=Te(s.lastSeen),e[76]=s.lastSeen,e[77]=P):P=e[77];let Q;e[78]!==P?(Q=(0,t.jsx)(z,{className:"text-xs tabular-nums text-muted-foreground",children:P}),e[78]=P,e[79]=Q):Q=e[79];let X;e[80]!==u||e[81]!==s.hash||e[82]!==s.status||e[83]!==i||e[84]!==a?(X=s.status!=="resolved"&&(0,t.jsx)(ie,{"data-testid":`issues-resolve-${s.hash}`,disabled:u,onClick:d(()=>{le(i(s.hash,Qe,{}))},"onClick"),size:"xs",variant:"outline",children:a("Resolve")}),e[80]=u,e[81]=s.hash,e[82]=s.status,e[83]=i,e[84]=a,e[85]=X):X=e[85];let Y;e[86]!==u||e[87]!==s.hash||e[88]!==s.status||e[89]!==i||e[90]!==a?(Y=s.status!=="ignored"&&(0,t.jsx)(ie,{"data-testid":`issues-ignore-${s.hash}`,disabled:u,onClick:d(()=>{le(i(s.hash,Xe,{}))},"onClick"),size:"xs",variant:"ghost",children:a("Ignore")}),e[86]=u,e[87]=s.hash,e[88]=s.status,e[89]=i,e[90]=a,e[91]=Y):Y=e[91];let Z;e[92]!==u||e[93]!==s.assignee||e[94]!==s.hash||e[95]!==s.status||e[96]!==i||e[97]!==a?(Z=s.status!=="open"&&(0,t.jsx)(ie,{"data-testid":`issues-reopen-${s.hash}`,disabled:u,onClick:d(()=>{le(i(s.hash,Fe,{assignee:s.assignee??null}))},"onClick"),size:"xs",variant:"ghost",children:a("Reopen")}),e[92]=u,e[93]=s.assignee,e[94]=s.hash,e[95]=s.status,e[96]=i,e[97]=a,e[98]=Z):Z=e[98];let ee;e[99]!==X||e[100]!==Y||e[101]!==Z?(ee=(0,t.jsx)(z,{className:"text-right",children:(0,t.jsxs)("div",{className:"flex justify-end gap-1",children:[X,Y,Z]})}),e[99]=X,e[100]=Y,e[101]=Z,e[102]=ee):ee=e[102];let se;e[103]!==c||e[104]!==I||e[105]!==F||e[106]!==H||e[107]!==J||e[108]!==Q||e[109]!==E||e[110]!==ee?(se=(0,t.jsxs)(pe,{"data-testid":E,children:[c,I,F,H,J,Q,ee]}),e[103]=c,e[104]=I,e[105]=F,e[106]=H,e[107]=J,e[108]=Q,e[109]=E,e[110]=ee,e[111]=se):se=e[111];let te;e[112]!==o||e[113]!==s||e[114]!==l?(te=(0,t.jsx)(as,{expanded:o,issue:s,shardKey:l},s.sampleMessage),e[112]=o,e[113]=s,e[114]=l,e[115]=te):te=e[115];let he;return e[116]!==se||e[117]!==te?(he=(0,t.jsxs)(t.Fragment,{children:[se,te]}),e[116]=se,e[117]=te,e[118]=he):he=e[118],he},"tt"),ks=d(n=>{let e=(0,ge.c)(38),{initialShardKey:u}=n,s=ue(),$=Ne(),{queryShardKey:i,setShardKey:l,shardKey:a}=Le(u),[o,_]=(0,ne.useState)("all"),[A,R]=(0,ne.useState)(ns),[K,L]=(0,ne.useState)(os),k;e[0]!==o?(k=o==="all"?{}:{status:o},e[0]=o,e[1]=k):k=e[1];let T;e[2]!==i?(T={live:!0,shardKey:i},e[2]=i,e[3]=T):T=e[3];let{data:E,error:h,liveError:x}=Ee(U.getIssues,k,T),M=E!==void 0,v;if(e[4]!==K||e[5]!==A||e[6]!==$||e[7]!==E||e[8]!==h||e[9]!==x||e[10]!==M||e[11]!==i||e[12]!==l||e[13]!==a||e[14]!==o||e[15]!==s){let y=es(E),b;e[17]!==$||e[18]!==i?(b=d(async(r,oe,V)=>{L(N=>{if(!N.has(r))return N;let C=new Map(N);return C.delete(r),C}),R(N=>new Set(N).add(r));try{await $.query(oe,{...V,hash:r},be(i))}catch(N){let C=Ke(N);L(q=>new Map(q).set(r,C))}R(N=>{let C=new Set(N);return C.delete(r),C})},"S"),e[17]=$,e[18]=i,e[19]=b):b=e[19];let w=b,m;e[20]!==s?(m=d(r=>s(r==="all"?"All":r==="open"?"Open":r==="resolved"?"Resolved":"Ignored"),"u"),e[20]=s,e[21]=m):m=e[21];let f=m,p;e[22]!==h?(p=h!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"issues-error",role:"alert",children:h}),e[22]=h,e[23]=p):p=e[23];let c;e[24]!==l||e[25]!==a?(c=(0,t.jsx)(_e,{onChange:l,testId:"issues-shard-input",value:a}),e[24]=l,e[25]=a,e[26]=c):c=e[26];let S;e[27]!==x?(S=(0,t.jsx)(qe,{message:x,prefix:"issues"}),e[27]=x,e[28]=S):S=e[28];let g;e[29]!==o||e[30]!==f?(g=Je.map(r=>(0,t.jsx)(ie,{"data-active":o===r?"":void 0,"data-testid":`issues-filter-${r}`,onClick:d(()=>{_(r)},"onClick"),size:"xs",variant:o===r?"default":"outline",children:f(r)},r)),e[29]=o,e[30]=f,e[31]=g):g=e[31];let I;e[32]!==g?(I=(0,t.jsx)("div",{className:"ms-auto flex items-center gap-1","data-testid":"issues-status-filter",role:"group",children:g}),e[32]=g,e[33]=I):I=e[33];let j;e[34]!==I||e[35]!==c||e[36]!==S?(j=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,S,I]}),e[34]=I,e[35]=c,e[36]=S,e[37]=j):j=e[37],v=(0,t.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-issues-panel",children:[p,j,M&&y.length===0?(0,t.jsx)(Ae,{description:s("No grouped errors yet. When a function throws or a container crashes, matching errors fold into a single issue here."),testId:"issues-empty",title:s("No issues")}):(0,t.jsx)(Me,{className:"overflow-hidden py-0",children:(0,t.jsx)(Ce,{className:"px-0",children:(0,t.jsxs)(ze,{"data-testid":"issues-table",children:[(0,t.jsx)(Re,{children:(0,t.jsxs)(pe,{children:[(0,t.jsx)(B,{children:s("Issue")}),(0,t.jsx)(B,{children:s("Status")}),(0,t.jsx)(B,{children:s("Severity")}),(0,t.jsx)(B,{children:s("Assignee")}),(0,t.jsx)(B,{className:"text-right",children:s("Events")}),(0,t.jsx)(B,{children:s("Last seen")}),(0,t.jsx)(B,{className:"text-right",children:s("Actions")})]})}),(0,t.jsx)(je,{children:y.map(r=>(0,t.jsx)(is,{busy:A.has(r.hash),issue:r,rowError:K.get(r.hash),runTriage:w,shardKey:i},r.hash))})]})})})]}),e[4]=K,e[5]=A,e[6]=$,e[7]=E,e[8]=h,e[9]=x,e[10]=M,e[11]=i,e[12]=l,e[13]=a,e[14]=o,e[15]=s,e[16]=v}else v=e[16];return v},"Tt");function rs(n){return!n}d(rs,"st");function ls(n){return(0,t.jsx)(we,{value:n,children:n},n)}d(ls,"at");function ns(){return new Set}d(ns,"it");function os(){return new Map}d(os,"lt");export{ks as default};
@@ -0,0 +1 @@
1
+ import{b as c}from"./chunk-YUWMB6EV.js";import{f as l}from"./chunk-TBXK3FKP.js";import{a as r,d as f,f as g}from"./chunk-R5ZTCHCE.js";var m=f(g(),1);var p={capabilities:{accounts:!0,admin:!0,organization:!1,passkey:!1,twoFactor:!1},emailAndPassword:!1,organization:{enabled:!1,roles:!1,teams:!1},plugins:[],rateLimit:{enabled:!1},session:{},socialProviders:[],userFields:[]},y=r(()=>{let o=(0,m.c)(6),t=l(),a;o[0]===Symbol.for("react.memo_cache_sentinel")?(a=["lunora-auth-config"],o[0]=a):a=o[0];let e;o[1]!==t?(e=r(()=>t.getAuthConfig(),"t"),o[1]=t,o[2]=e):e=o[2];let{data:u,isLoading:d}=c(a,e),i=u??p,n=!d,s;return o[3]!==i||o[4]!==n?(s={config:i,ready:n},o[3]=i,o[4]=n,o[5]=s):s=o[5],s},"b");export{p as a,y as b};
@@ -0,0 +1 @@
1
+ import{a as D}from"./chunk-JURAVSE7.js";import{b as C}from"./chunk-SPDZUX4P.js";import"./chunk-7PIHTTND.js";import"./chunk-F7JOSNAT.js";import{a as L}from"./chunk-VDW32UET.js";import{c as $}from"./chunk-YUWMB6EV.js";import"./chunk-TBXK3FKP.js";import"./chunk-RCZTUWG3.js";import{a as I}from"./chunk-UANVABQG.js";import{a as T,b as k,c as A,d as g,e as c,f as l}from"./chunk-L4EZAHCD.js";import{a as b,e as S}from"./chunk-IYWVSMAY.js";import{d as w}from"./chunk-6ZPTNC34.js";import"./chunk-VYW2PAWC.js";import{a as f,d as y,f as _,g as j}from"./chunk-R5ZTCHCE.js";var O=y(_(),1);var t=y(j(),1);var E="container:",M={error:"error",sleep:"sleeping",start:"running",stop:"stopped"},B=f(e=>{let n=e.indexOf(":");if(n===-1)return{event:e.trim()};let r=e.slice(n+1).trim(),a=e.slice(0,n).trim();return r===""?{event:a}:{detail:r,event:a}},"B"),P=f(e=>{let n=new Map;for(let r of e){let a=r.functionPath??"";if(!a.startsWith(E))continue;let i=a.slice(E.length);if(i==="")continue;let s=JSON.stringify([i,r.instance??""]),o=n.get(s);if(o!==void 0&&o.timestamp>=r.timestamp)continue;let{detail:p,event:d}=B(r.message);n.set(s,{detail:p,event:d,exitCode:r.exitCode,instance:r.instance,level:r.level,name:i,state:M[d]??"unknown",timestamp:r.timestamp})}return[...n.values()].toSorted((r,a)=>r.name.localeCompare(a.name)||(r.instance??"").localeCompare(a.instance??""))},"D"),W={error:"destructive",running:"success",sleeping:"info",stopped:"outline",unknown:"secondary"},q=f(e=>{let{entries:n}=e??{};return Array.isArray(n)?n:[]},"P"),V=f(()=>{let e=(0,O.c)(19),n=w(),r,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={},a={live:!0,shardKey:""},e[0]=r,e[1]=a):(r=e[0],a=e[1]);let{data:i,error:s,liveError:o}=$(L.getLogs,r,a),p=i!==void 0,d;if(e[2]!==i||e[3]!==s||e[4]!==o||e[5]!==p||e[6]!==n){let N=P(q(i)),x;e[8]!==s?(x=s!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"containers-error",role:"alert",children:s}),e[8]=s,e[9]=x):x=e[9];let m;e[10]!==n?(m=n("Cloudflare Containers are observed from their lifecycle log stream. This shows the current state per instance \u2014 ports and health checks aren't carried in that stream."),e[10]=n,e[11]=m):m=e[11];let u;e[12]!==m?(u=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:m}),e[12]=m,e[13]=u):u=e[13];let h;e[14]!==o?(h=(0,t.jsx)(D,{message:o,prefix:"containers"}),e[14]=o,e[15]=h):h=e[15];let v;e[16]!==u||e[17]!==h?(v=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[u,h]}),e[16]=u,e[17]=h,e[18]=v):v=e[18],d=(0,t.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-containers-panel",children:[x,v,p&&N.length===0?(0,t.jsx)(I,{description:n("No container lifecycle activity yet. Instances declared with defineContainer show up here once they start, sleep, stop, or error."),testId:"containers-empty",title:n("No container activity")}):(0,t.jsx)(b,{className:"overflow-hidden py-0",children:(0,t.jsx)(S,{className:"px-0",children:(0,t.jsxs)(T,{"data-testid":"containers-table",children:[(0,t.jsx)(k,{children:(0,t.jsxs)(g,{children:[(0,t.jsx)(c,{children:n("Container")}),(0,t.jsx)(c,{children:n("Instance")}),(0,t.jsx)(c,{children:n("State")}),(0,t.jsx)(c,{children:n("Last event")}),(0,t.jsx)(c,{children:n("Detail")}),(0,t.jsx)(c,{children:n("Exit")}),(0,t.jsx)(c,{children:n("When")})]})}),(0,t.jsx)(A,{children:N.map(F)})]})})})]}),e[2]=i,e[3]=s,e[4]=o,e[5]=p,e[6]=n,e[7]=d}else d=e[7];return d},"q");function F(e){return(0,t.jsxs)(g,{"data-testid":`containers-row-${e.name}${e.instance===void 0?"":`-${e.instance}`}`,children:[(0,t.jsx)(l,{className:"font-mono text-xs",children:e.name}),(0,t.jsx)(l,{className:"max-w-40 truncate font-mono text-xs text-muted-foreground",title:e.instance,children:e.instance??"\u2014"}),(0,t.jsx)(l,{children:(0,t.jsx)(C,{variant:W[e.state],children:e.state})}),(0,t.jsx)(l,{className:"font-mono text-xs text-muted-foreground",children:e.event}),(0,t.jsx)(l,{className:"max-w-64 truncate text-xs text-muted-foreground",title:e.detail,children:e.detail??"\u2014"}),(0,t.jsx)(l,{className:"font-mono text-xs tabular-nums text-muted-foreground",children:e.exitCode??"\u2014"}),(0,t.jsx)(l,{className:"text-xs tabular-nums text-muted-foreground",children:new Date(e.timestamp).toLocaleString()})]},`${e.name}/${e.instance??""}`)}f(F,"j");export{V as default};
@@ -0,0 +1 @@
1
+ import{b as Nr}from"./chunk-INQICZYC.js";import{a as Or}from"./chunk-TFMQSCGC.js";import{a,d as k,e as B,g as Z}from"./chunk-R5ZTCHCE.js";var zo=k(B(),1),ae=zo.createContext(null);var Ho=k(B(),1);function N(t){return Ho.useContext(ae)}a(N,"useRouter");var Ue=k(B(),1),bt=Ue.createContext(void 0),jo=Ue.createContext(void 0);function dt(t){return t[t.length-1]}a(dt,"last");function Dr(t){return typeof t=="function"}a(Dr,"isFunction");function J(t,e){return Dr(t)?t(e):t}a(J,"functionalUpdate");var Jo=Object.prototype.hasOwnProperty,Fr=Object.prototype.propertyIsEnumerable;function ht(t){for(let e in t)if(Jo.call(t,e))return!0;return!1}a(ht,"hasKeys");var Ar=a(()=>Object.create(null),"createNull"),pt=a((t,e)=>st(t,e,Ar),"nullReplaceEqualDeep");function st(t,e,o=()=>({}),r=0){if(!1)return e;if(t===e)return t;if(r>500)return e;let n=e,s=Ve(t)&&Ve(n);if(!s&&!(jt(t)&&jt(n)))return n;let u=s?t:Ko(t);if(!u)return n;let i=s?n:Ko(n);if(!i)return n;let l=u.length,c=i.length,f=s?new Array(c):o(),d=0;for(let h=0;h<c;h++){let m=s?h:i[h],g=t[m],p=n[m];if(g===p){f[m]=g,(s?h<l:Jo.call(t,m))&&d++;continue}if(g===null||p===null||typeof g!="object"||typeof p!="object"){f[m]=p;continue}let v=st(g,p,o,r+1);f[m]=v,v===g&&d++}return l===c&&d===l?t:f}a(st,"replaceEqualDeep");function Ko(t){let e=Object.keys(t);if(e.length!==Object.getOwnPropertyNames(t).length)return!1;let o=Object.getOwnPropertySymbols(t);if(o.length===0)return e;for(let r of o){if(!Fr.call(t,r))return!1;e.push(r)}return e}a(Ko,"getEnumerableOwnKeys");function jt(t){if(!qo(t))return!1;let e=t.constructor;if(typeof e>"u")return!0;let o=e.prototype;return!(!qo(o)||!o.hasOwnProperty("isPrototypeOf"))}a(jt,"isPlainObject");function qo(t){return Object.prototype.toString.call(t)==="[object Object]"}a(qo,"hasObjectPrototype");function Ve(t){return Array.isArray(t)&&t.length===Object.keys(t).length}a(Ve,"isPlainArray");function Q(t,e,o){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0,n=t.length;r<n;r++)if(!Q(t[r],e[r],o))return!1;return!0}if(jt(t)&&jt(e)){let r=o?.ignoreUndefined??!0;if(o?.partial){for(let u in e)if((!r||e[u]!==void 0)&&!Q(t[u],e[u],o))return!1;return!0}let n=0;if(!r)n=Object.keys(t).length;else for(let u in t)t[u]!==void 0&&n++;let s=0;for(let u in e)if((!r||e[u]!==void 0)&&(s++,s>n||!Q(t[u],e[u],o)))return!1;return n===s}return!1}a(Q,"deepEqual");var $r=/[\x00-\x1f\x7f"<>`{}]/g;function Br(t){return t.replace($r,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}a(Br,"sanitizePathSegment");function Go(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,o=>{try{return decodeURI(o)}catch{return o}})}return Br(e)}a(Go,"decodeSegment");var We=["http:","https:","mailto:","tel:"];function it(t,e){if(!t)return!1;try{let o=new URL(t);return!e.has(o.protocol)}catch{return!1}}a(it,"isDangerousProtocol");function Nt(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};let e=/%25|%5C/gi,o=0,r="",n;for(;(n=e.exec(t))!==null;)r+=Go(t.slice(o,n.index))+n[0],o=e.lastIndex;r=r+Go(o?t.slice(o):t);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}a(Nt,"decodePath");function Yo(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}a(Yo,"encodePathLikeUrl");function Xo(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}a(Xo,"arraysEqual");function mt(){throw new Error("Invariant failed")}a(mt,"invariant");function Dt(t){let e=new Map,o,r,n=a(s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,o=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)},"touch");return{get(s){let u=e.get(s);if(u)return n(u),u.value},set(s,u){if(e.size>=t&&o){let l=o;e.delete(l.key),l.next&&(o=l.next,l.next.prev=void 0),l===r&&(r=void 0)}let i=e.get(s);if(i)i.value=u,n(i);else{let l={key:s,value:u,prev:r};r&&(r.next=l),r=l,o||(o=l),e.set(s,l)}},clear(){e.clear(),o=void 0,r=void 0}}}a(Dt,"createLRUCache");var gt=4,Qo=5;function Ur(t){let e=t.indexOf("{");if(e===-1)return null;let o=t.indexOf("}",e);return o===-1||e+1>=t.length?null:[e,o]}a(Ur,"getOpenAndCloseBraces");function ze(t,e,o=new Uint16Array(6)){let r=t.indexOf("/",e),n=r===-1?t.length:r,s=t.substring(e,n);if(!s||!s.includes("$"))return o[0]=0,o[1]=e,o[2]=e,o[3]=n,o[4]=n,o[5]=n,o;if(s==="$"){let i=t.length;return o[0]=2,o[1]=e,o[2]=e,o[3]=i,o[4]=i,o[5]=i,o}if(s.charCodeAt(0)===36)return o[0]=1,o[1]=e,o[2]=e+1,o[3]=n,o[4]=n,o[5]=n,o;let u=Ur(s);if(u){let[i,l]=u,c=s.charCodeAt(i+1);if(c===45){if(i+2<s.length&&s.charCodeAt(i+2)===36){let f=i+3,d=l;if(f<d)return o[0]=3,o[1]=e+i,o[2]=e+f,o[3]=e+d,o[4]=e+l+1,o[5]=n,o}}else if(c===36){let f=i+1,d=i+2;return d===l?(o[0]=2,o[1]=e+i,o[2]=e+f,o[3]=e+d,o[4]=e+l+1,o[5]=t.length,o):(o[0]=1,o[1]=e+i,o[2]=e+d,o[3]=e+l,o[4]=e+l+1,o[5]=n,o)}}return o[0]=0,o[1]=e,o[2]=e,o[3]=n,o[4]=n,o[5]=n,o}a(ze,"parseSegment");function ue(t,e,o,r,n,s,u,i){i?.(o);let l=r;{let c=o.fullPath??o.from,f=o.options,d=c.length,h=f?.caseSensitive??t,m=f?.params?.parse??f?.parseParams;for(;l<d;){let p=ze(c,l,e),v,S=l,y=p[5];l=y+1,s++;let w=p[0];switch(w){case 0:{let R=c.substring(p[2],p[3]),L=R,x;h?x=n.static??=new Map:(L=R.toLowerCase(),x=n.staticInsensitive??=new Map);let _=x.get(L);if(_)v=_;else{let b=Ft(c);b.parent=n,b.depth=s,v=b,x.set(L,b)}break}case 1:case 3:case 2:{let R=c.substring(S,p[1]),L=c.substring(p[4],y),x=h&&!!(R||L),_=R?x?R:R.toLowerCase():void 0,b=L?x?L:L.toLowerCase():void 0,P=w===1?n.dynamic:w===3?n.optional:n.wildcard,E=w!==2&&!m&&P?.find(C=>!C.parse&&C.caseSensitive===x&&C.prefix===_&&C.suffix===b);if(E)v=E;else{let C=Vr(w,c,x,_,b);v=C,C.parent=n,C.depth=s;let T;w===1?T=n.dynamic??=[]:w===3?T=n.optional??=[]:T=n.wildcard??=[],T.push(C),T.length===2&&u?.push(T)}break}}n=v}if(m&&o.children&&!o.isRoot&&o.id&&o.id.charCodeAt(o.id.lastIndexOf("/")+1)===95){let p=Ft(c);p.kind=Qo,p.parent=n,s++,p.depth=s,n.pathless??=[],n.pathless.push(p),n=p}let g=(o.path||!o.children)&&!o.isRoot;if(g&&c.endsWith("/")){let p=Ft(c);p.kind=gt,p.parent=n,s++,p.depth=s,n.index=p,n=p}n.parse=m??null,n.priority=f?.params?.priority??0,g&&!n.route&&(n.route=o,n.fullPath=c)}if(o.children)for(let c of o.children)ue(t,e,c,l,n,s,u,i)}a(ue,"parseSegments");function tn(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}a(tn,"sortDynamic");function Ft(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0}}a(Ft,"createStaticNode");function Vr(t,e,o,r,n){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0,caseSensitive:o,prefix:r,suffix:n}}a(Vr,"createDynamicNode");function en(t,e){let o=Ft("/"),r=new Uint16Array(6),n=[];for(let s of t)ue(!1,r,s,1,o,0,n);for(let s of n)s.sort(tn);e.masksTree=o,e.flatCache=Dt(1e3)}a(en,"processRouteMasks");function on(t,e){t||="/";let o=e.flatCache.get(t);if(o)return o;let r=He(t,e.masksTree);return e.flatCache.set(t,r),r}a(on,"findFlatMatch");function nn(t,e,o,r,n){t||="/",r||="/";let s=e?`case\0${t}`:t,u=n.singleCache.get(s);return u||(u=Ft("/"),ue(e,new Uint16Array(6),{from:t},1,u,0),n.singleCache.set(s,u)),He(r,u,o)}a(nn,"findSingleMatch");function rn(t,e,o=!1){let r=o?t:`nofuzz\0${t}`,n=e.matchCache.get(r);if(n!==void 0)return n;t||="/";let s;try{s=He(t,e.segmentTree,o)}catch(u){if(u instanceof URIError)s=null;else throw u}return s&&(s.branch=je(s.route)),e.matchCache.set(r,s),s}a(rn,"findRouteMatch");function Wr(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}a(Wr,"trimPathRight");function sn(t,e=!1,o){let r=Ft(t.fullPath),n=new Uint16Array(6),s=[],u={},i={},l=0;ue(e,n,t,1,r,0,s,c=>{if(o?.(c,l),c.id in u&&mt(),u[c.id]=c,l!==0&&c.path){let f=Wr(c.fullPath);(!i[f]||c.fullPath.endsWith("/"))&&(i[f]=c)}l++});for(let c of s)c.sort(tn);return{processedTree:{segmentTree:r,singleCache:Dt(1e3),matchCache:Dt(1e3),flatCache:null,masksTree:null},routesById:u,routesByPath:i}}a(sn,"processRouteTree");function He(t,e,o=!1){let r=t.split("/"),n=Hr(t,r,e,o);if(!n)return null;let[s]=an(t,r,n);return{route:n.node.route,rawParams:s}}a(He,"findMatch");function an(t,e,o){let r=zr(o.node),n=null,s=Object.create(null),u=o.extract?.part??0,i=o.extract?.node??0,l=o.extract?.path??0,c=o.extract?.segment??0;for(;i<r.length;u++,i++,l++,c++){let f=r[i];if(f.kind===gt)break;if(f.kind===Qo){c--,u--,l--;continue}let d=e[u],h=l;if(d&&(l+=d.length),f.kind===1){n??=o.node.fullPath.split("/");let m=n[c],g=f.prefix?.length??0;if(m.charCodeAt(g)===123){let p=f.suffix?.length??0,v=m.substring(g+2,m.length-p-1),S=d.substring(g,d.length-p);s[v]=decodeURIComponent(S)}else{let p=m.substring(1);s[p]=decodeURIComponent(d)}}else if(f.kind===3){if(o.skipped&1<<i){u--,l=h-1;continue}n??=o.node.fullPath.split("/");let m=n[c],g=f.prefix?.length??0,p=f.suffix?.length??0,v=m.substring(g+3,m.length-p-1),S=f.suffix||f.prefix?d.substring(g,d.length-p):d;S&&(s[v]=decodeURIComponent(S))}else if(f.kind===2){let m=f,g=t.substring(h+(m.prefix?.length??0),t.length-(m.suffix?.length??0)),p=decodeURIComponent(g);s["*"]=p,s._splat=p;break}}return o.rawParams&&Object.assign(s,o.rawParams),[s,{part:u,node:i,path:l,segment:c}]}a(an,"extractParams");function je(t){let e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}a(je,"buildRouteBranch");function zr(t){let e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}a(zr,"buildBranch");function Hr(t,e,o,r){if(t==="/"&&o.index)return{node:o.index,skipped:0};let n=!dt(e),s=n&&t!=="/",u=e.length-(n?1:0),i=[{node:o,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],l=null,c=null;for(;i.length;){let f=i.pop(),{node:d,index:h,skipped:m,statics:g,dynamics:p,optionals:v}=f,{extract:S,rawParams:y}=f;if(d.kind===2&&d.route&&!le(c,f))continue;if(d.parse){if(!Zo(t,e,f))continue;y=f.rawParams,S=f.extract}r&&d.route&&d.kind!==gt&&le(l,f)&&(l=f);let w=h===u;if(w&&(d.route&&(!s||d.kind===gt||d.kind===2)&&le(c,f)&&(c=f),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;let R=w?void 0:e[h],L;if(w&&d.index){let x={node:d.index,index:h,skipped:m,statics:g,dynamics:p,optionals:v,extract:S,rawParams:y},_=!0;if(d.index.parse&&(Zo(t,e,x)||(_=!1)),_){if(!p&&!v&&!m&&jr(g,u))return x;le(c,x)&&(c=x)}}if(d.wildcard)for(let x=d.wildcard.length-1;x>=0;x--){let _=d.wildcard[x],{prefix:b,suffix:P}=_;if(!(b&&(w||!(_.caseSensitive?R:L??=R.toLowerCase()).startsWith(b)))){if(P){if(w)continue;let E=e.slice(h).join("/").slice(-P.length);if((_.caseSensitive?E:E.toLowerCase())!==P)continue}i.push({node:_,index:u,skipped:m,statics:g,dynamics:p,optionals:v,extract:S,rawParams:y})}}if(d.optional){let x=m|1<<d.depth+1;for(let _=d.optional.length-1;_>=0;_--){let b=d.optional[_];i.push({node:b,index:h,skipped:x,statics:g,dynamics:p,optionals:v,extract:S,rawParams:y})}if(!w)for(let _=d.optional.length-1;_>=0;_--){let b=d.optional[_],{prefix:P,suffix:E}=b;if(P||E){let C=b.caseSensitive?R:L??=R.toLowerCase();if(P&&!C.startsWith(P)||E&&!C.endsWith(E))continue}i.push({node:b,index:h+1,skipped:m,statics:g,dynamics:p,optionals:v+ce(u,h),extract:S,rawParams:y})}}if(!w&&d.dynamic&&R)for(let x=d.dynamic.length-1;x>=0;x--){let _=d.dynamic[x],{prefix:b,suffix:P}=_;if(b||P){let E=_.caseSensitive?R:L??=R.toLowerCase();if(b&&!E.startsWith(b)||P&&!E.endsWith(P))continue}i.push({node:_,index:h+1,skipped:m,statics:g,dynamics:p+ce(u,h),optionals:v,extract:S,rawParams:y})}if(!w&&d.staticInsensitive){let x=d.staticInsensitive.get(L??=R.toLowerCase());x&&i.push({node:x,index:h+1,skipped:m,statics:g+ce(u,h),dynamics:p,optionals:v,extract:S,rawParams:y})}if(!w&&d.static){let x=d.static.get(R);x&&i.push({node:x,index:h+1,skipped:m,statics:g+ce(u,h),dynamics:p,optionals:v,extract:S,rawParams:y})}if(d.pathless)for(let x=d.pathless.length-1;x>=0;x--){let _=d.pathless[x];i.push({node:_,index:h,skipped:m,statics:g,dynamics:p,optionals:v,extract:S,rawParams:y})}}if(c)return c;if(r&&l){let f=l.index;for(let h=0;h<l.index;h++)f+=e[h].length;let d=f===t.length?"/":t.slice(f);return l.rawParams??=Object.create(null),l.rawParams["**"]=decodeURIComponent(d),l}return null}a(Hr,"getNodeMatch");function ce(t,e){return 2**(t-e-1)}a(ce,"segmentScore");function jr(t,e){return t===2**(e-1)-1}a(jr,"isPerfectStaticMatch");function Zo(t,e,o){let r,n;try{[r,n]=an(t,e,o)}catch{return null}if(o.rawParams=r,o.extract=n,!o.node.parse)return!0;try{if(o.node.parse(r)===!1)return null}catch{}return!0}a(Zo,"validateParseParams");function le(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===gt)>(t.node.kind===gt)||e.node.kind===gt==(t.node.kind===gt)&&e.node.depth>t.node.depth))):!0}a(le,"isFrameMoreSpecific");function Pt(t){return qt(t.filter(e=>e!==void 0).join("/"))}a(Pt,"joinPaths");function qt(t){return t.replace(/\/{2,}/g,"/")}a(qt,"cleanPath");function fe(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}a(fe,"trimPathLeft");function Y(t){let e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}a(Y,"trimPathRight");function Gt(t){return Y(fe(t))}a(Gt,"trimPath");function vt(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}a(vt,"removeTrailingSlash");function de(t,e,o){return vt(t,o)===vt(e,o)}a(de,"exactPathTest");function Ke({base:t,to:e,trailingSlash:o="never",cache:r}){let n=e===".",s=e.startsWith("/"),u;if(r){u=s?e:n?t:t+"\0"+e;let c=r.get(u);if(c)return c}let i;if(n)i=t.split("/");else if(s)i=e.split("/");else{for(i=t.split("/");i.length>1&&dt(i)==="";)i.pop();let c=e.split("/");for(let f=0,d=c.length;f<d;f++){let h=c[f];h===""?f?f===d-1&&i.push(h):i=[h]:h===".."?i.length>1?i.pop():i=[""]:h==="."||i.push(h)}}i.length>1&&(dt(i)===""?o==="never"&&i.pop():o==="always"&&i.push(""));let l=qt(i.join("/"))||"/";return u&&r&&r.set(u,l),l}a(Ke,"resolvePath");function ln(t){let e=new Map(t.map(n=>[encodeURIComponent(n),n])),o=Array.from(e.keys()).map(n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(o,"g");return n=>n.replace(r,s=>e.get(s)??s)}a(ln,"compileDecodeCharMap");function Kt(t,e,o){let r=e[t];return typeof r!="string"?r:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(n=>cn(n,o)).join("/"):cn(r,o)}a(Kt,"encodeParam");function he({path:t,params:e,decoder:o,...r}){let n=!1,s=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:n};if(!t.includes("$"))return{interpolatedPath:t,usedParams:s,isMissingParams:n};if(!1){let f=t.length,d=0,h="";for(;d<f;){for(;d<f&&t.charCodeAt(d)===47;)d++;if(d>=f)break;let m=d,g=t.indexOf("/",d);g===-1&&(g=f),d=g;let p=t.substring(m,g);if(p)if(p.charCodeAt(0)===36)if(p.length===1){let v=e._splat;if(s._splat=v,s["*"]=v,!v){n=!0;continue}let S=Kt("_splat",e,o);h+="/"+S}else{let v=p.substring(1);!n&&!(v in e)&&(n=!0),s[v]=e[v];let S=Kt(v,e,o)??"undefined";h+="/"+S}else h+="/"+p}return t.endsWith("/")&&(h+="/"),{usedParams:s,interpolatedPath:h||"/",isMissingParams:n}}let u=t.length,i=0,l,c="";for(;i<u;){let f=i;l=ze(t,f,l);let d=l[5];if(i=d+1,f===d)continue;let h=l[0];if(h===0){c+="/"+t.substring(f,d);continue}if(h===2){let m=e._splat;s._splat=m,s["*"]=m;let g=t.substring(f,l[1]),p=t.substring(l[4],d);if(!m){n=!0,(g||p)&&(c+="/"+g+p);continue}let v=Kt("_splat",e,o);c+="/"+g+v+p;continue}if(h===1){let m=t.substring(l[2],l[3]);!n&&!(m in e)&&(n=!0),s[m]=e[m];let g=t.substring(f,l[1]),p=t.substring(l[4],d),v=Kt(m,e,o)??"undefined";c+="/"+g+v+p;continue}if(h===3){let m=t.substring(l[2],l[3]),g=e[m];if(g==null)continue;s[m]=g;let p=t.substring(f,l[1]),v=t.substring(l[4],d),S=Kt(m,e,o)??"";c+="/"+p+S+v;continue}}return t.endsWith("/")&&(c+="/"),{usedParams:s,interpolatedPath:c||"/",isMissingParams:n}}a(he,"interpolatePath");function cn(t,e){let o=encodeURIComponent(t);return e?.(o)??o}a(cn,"encodePathParam");function K(t){return t?.isNotFound===!0}a(K,"isNotFound");function Kr(){try{return sessionStorage}catch{return}}a(Kr,"getSafeSessionStorage");var qr="tsr-scroll-restoration-v1_3",dn=Kr();function Gr(){try{return JSON.parse(dn?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}a(Gr,"createScrollRestorationCache");function Jr(){try{dn?.setItem(qr,JSON.stringify(At))}catch{}}a(Jr,"persistScrollRestorationCache");var At=Gr(),un="data-scroll-restoration-id",Yr=a(t=>t.state.__TSR_key||t.href,"defaultGetScrollRestorationKey");function Xr(t){let e=t.getAttribute(un);if(e)return`[${un}="${e}"]`;let o="",r=t,n;for(;n=r.parentNode;){let s=1,u=r;for(;u=u.previousElementSibling;)s++;let i=`${r.localName}:nth-child(${s})`;o=o?`${i} > ${o}`:i,r=n}return o}a(Xr,"getScrollRestorationSelector");var pe=!1,me="window";function qe(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}a(qe,"getElement");function fn(t){let e=new Set;for(let o of t){if(o===me)continue;let r=qe(o);r&&e.add(r)}return e}a(fn,"getScrollToTopElements");function hn(t,e){let o=e??t.options.scrollRestoration,r=t._scroll;if(o&&(r.restoring=!0),!1)return;let n=t.options.getScrollRestorationKey||Yr,s=new Set,u=a(i=>{let l=At[i]||={};for(let c of s)c===document?l[me]={scrollX,scrollY}:c.isConnected&&(l[Xr(c)]={scrollX:c.scrollLeft,scrollY:c.scrollTop})},"snapshotCurrentScrollTargets");o&&!r.restoration&&(r.restoration=!0,pe=!1,history.scrollRestoration="manual",document.addEventListener("scroll",i=>{pe||s.add(i.target)},!0),t.subscribe("onBeforeLoad",i=>{i.fromLocation&&u(n(i.fromLocation)),s.clear()}),addEventListener("pagehide",()=>{u(n(t.stores.resolvedLocation.get()??t.stores.location.get())),Jr()})),!r.reset&&(r.reset=!0,t.subscribe("onRendered",i=>{let l=t.options.scrollRestorationBehavior,c=t.options.scrollToTopSelectors,f=r.next,d=r.hash,h;if(s.clear(),r.next=!0,r.hash=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;let m=n(i.toLocation),g=i.fromLocation&&n(i.fromLocation);if(r.restoring&&g&&g!==m){let p=At[g];if(p){let v=At[m];for(let S in p){if(S===me){if(f)continue}else{let y=qe(S);if(!y||f&&c&&(h??=fn(c),h.has(y)))continue}v||(v=At[m]={}),v[S]??=p[S]}}}pe=!0;try{let p=i.toLocation.hash,v=i.toLocation.state.__hashScrollIntoViewOptions??!0,S=!1;if(f){!p&&c&&(h??=fn(c));let y=p&&v&&d,w=r.restoring?At[m]:void 0;if(w)for(let R in w){let{scrollX:L,scrollY:x}=w[R];if(R===me){if(y)continue;scrollTo({top:x,left:L,behavior:l}),S=!0}else{let _=qe(R);_&&(_.scrollLeft=L,_.scrollTop=x,h?.delete(_))}}if(!p){let R={top:0,left:0,behavior:l};if(S||scrollTo(R),h)for(let L of h)L.scrollTo(R)}}!S&&p&&v&&document.getElementById(p)?.scrollIntoView(v)}finally{pe=!1}}))}a(hn,"setupScrollRestoration");function pn(t,e=String){let o=new URLSearchParams;for(let r in t){let n=t[r];n!==void 0&&o.set(r,e(n))}return o.toString()}a(pn,"encode");function Ge(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}a(Ge,"toValue");function mn(t){let e=new URLSearchParams(t),o=Object.create(null);for(let[r,n]of e.entries()){let s=o[r];s==null?o[r]=Ge(n):Array.isArray(s)?s.push(Ge(n)):o[r]=[s,Ge(n)]}return o}a(mn,"decode");var Zr=/^(?:\s|["[{\d-]|fa|nu|tr)/,gn=Qr(JSON.parse),vn=ts(JSON.stringify,JSON.parse);function Qr(t){return e=>{e[0]==="?"&&(e=e.substring(1));let o=mn(e);for(let r in o){let n=o[r];if(typeof n=="string")try{o[r]=t(n)}catch{}}return o}}a(Qr,"parseSearchWith");function ts(t,e){let o=e===JSON.parse;function r(n){if(n&&typeof n=="object")try{return t(n)}catch{}else if(e&&typeof n=="string"){if(o&&!Zr.test(n))return n;try{return e(n),t(n)}catch{}}return n}return a(r,"stringifyValue"),n=>{let s=pn(n,r);return s?`?${s}`:""}}a(ts,"stringifySearchWith");var tt="__root__";function yn(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}let e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);let o=new Response(null,{status:t.statusCode,headers:e});if(o.options=t,t.throw)throw o;return o}a(yn,"redirect");function Jt(t){return t instanceof Response&&!!t.options}a(Jt,"isRedirect");function _n(t){return{input:a(({url:e})=>{for(let o of t)e=ge(o,e);return e},"input"),output:a(({url:e})=>{for(let o=t.length-1;o>=0;o--)e=Je(t[o],e);return e},"output")}}a(_n,"composeRewrites");function Sn(t){let e=Gt(t.basepath),o=`/${e}`,r=t.caseSensitive?o:o.toLowerCase(),n=`${r}/`;return{input:a(({url:s})=>{let u=t.caseSensitive?s.pathname:s.pathname.toLowerCase();return u===r?s.pathname="/":u.startsWith(n)&&(s.pathname=s.pathname.slice(o.length)),s},"input"),output:a(({url:s})=>(s.pathname=Pt(["/",e,s.pathname]),s),"output")}}a(Sn,"rewriteBasepath");function ge(t,e){let o=t?.input?.({url:e});if(o){if(typeof o=="string")return new URL(o);if(o instanceof URL)return o}return e}a(ge,"executeRewriteInput");function Je(t,e){let o=t?.output?.({url:e});if(o){if(typeof o=="string")return new URL(o);if(o instanceof URL)return o}return e}a(Je,"executeRewriteOutput");function Ye(t){let e=t;return{get(){return e},set(o){e=J(o,e)}}}a(Ye,"createNonReactiveMutableStore");function Xe(t){return{get(){return t()}}}a(Xe,"createNonReactiveReadonlyStore");function Rn(t,e){let{createMutableStore:o,createReadonlyStore:r,batch:n}=e,s=new Map,u=o("idle"),i=o(t),l=o(void 0),c=o([]),f=r(()=>c.get().map(p=>s.get(p).get())),d=r(()=>({status:u.get(),isLoading:u.get()==="pending",matches:f.get(),location:i.get(),resolvedLocation:l.get()}));function h(p){let v=s.get(p);return v||(v=o(void 0),s.set(p,v)),v}a(h,"getMatchStore");let m={status:u,location:i,resolvedLocation:l,ids:c,matches:f,byRoute:s,__store:d,getMatchStore:h,setMatches:g};function g(p){let v=c.get(),S=p.map(y=>y.routeId);n(()=>{Xo(v,S)||c.set(S);for(let y of v)S.includes(y)||s.get(y).set(()=>{});for(let y of p){let w=h(y.routeId);w.get()!==y&&w.set(y)}})}return a(g,"setMatches"),m}a(Rn,"createRouterStores");var yt="__TSR_index",wn="popstate",xn="beforeunload";function Qe(t){let e=t.getLocation(),o=new Set,r=a(u=>{e=t.getLocation(),o.forEach(i=>i({location:e,action:u}))},"notify"),n=a(u=>{t.notifyOnIndexChange??!0?r(u):e=t.getLocation()},"handleIndexChange"),s=a(async({task:u,navigateOpts:i,...l})=>{if(i?.ignoreBlocker??!1){u();return}let c=t.getBlockers?.()??[],f=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&c.length&&f)for(let d of c){let h=$t(l.path,l.state);if(await d.blockerFn({currentLocation:e,nextLocation:h,action:l.type})){t.onBlocked?.();return}}u()},"tryNavigation");return{get location(){return e},get length(){return t.getLength()},subscribers:o,subscribe:a(u=>(o.add(u),()=>{o.delete(u)}),"subscribe"),push:a((u,i,l)=>{let c=e.state[yt];i=Ze(c+1,i),s({task:a(()=>{t.pushState(u,i),r({type:"PUSH"})},"task"),navigateOpts:l,type:"PUSH",path:u,state:i})},"push"),replace:a((u,i,l)=>{let c=e.state[yt];i=Ze(c,i),s({task:a(()=>{t.replaceState(u,i),r({type:"REPLACE"})},"task"),navigateOpts:l,type:"REPLACE",path:u,state:i})},"replace"),go:a((u,i)=>{s({task:a(()=>{t.go(u),n({type:"GO",index:u})},"task"),navigateOpts:i,type:"GO"})},"go"),back:a(u=>{s({task:a(()=>{t.back(u?.ignoreBlocker??!1),n({type:"BACK"})},"task"),navigateOpts:u,type:"BACK"})},"back"),forward:a(u=>{s({task:a(()=>{t.forward(u?.ignoreBlocker??!1),n({type:"FORWARD"})},"task"),navigateOpts:u,type:"FORWARD"})},"forward"),canGoBack:a(()=>e.state[yt]!==0,"canGoBack"),createHref:a(u=>t.createHref(u),"createHref"),block:a(u=>{if(!t.setBlockers)return()=>{};let i=t.getBlockers?.()??[];return t.setBlockers([...i,u]),()=>{let l=t.getBlockers?.()??[];t.setBlockers?.(l.filter(c=>c!==u))}},"block"),flush:a(()=>t.flush?.(),"flush"),destroy:a(()=>t.destroy?.(),"destroy"),notify:r}}a(Qe,"createHistory");function Ze(t,e){e||(e={});let o=eo();return{...e,key:o,__TSR_key:o,[yt]:t}}a(Ze,"assignKeyAndIndex");function to(t){let e=t?.window??(typeof document<"u"?window:void 0),o=e.history.pushState,r=e.history.replaceState,n=[],s=a(()=>n,"_getBlockers"),u=a(_=>n=_,"_setBlockers"),i=t?.createHref??(_=>_),l=t?.parseLocation??(()=>$t(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){let _=eo();e.history.replaceState({[yt]:0,key:_,__TSR_key:_},"")}let c=l(),f,d=!1,h=!1,m=!1,g=!1,p=a(()=>c,"getLocation"),v,S=a(()=>{v&&(x._ignoreSubscribers=!0,(v[2]?e.history.pushState:e.history.replaceState)(v[1],"",v[0]),x._ignoreSubscribers=!1,v=void 0,f=void 0)},"flush"),y=a((_,b,P)=>{let E=i(b),C=!!v;C||(f=c),c=$t(b,P),v=[E,P,v?.[2]||_],C||queueMicrotask(()=>S())},"queueHistoryAction"),w=a(_=>{c=l(),x.notify({type:_})},"onPushPop"),R=a(async()=>{if(h){h=!1;return}let _=l(),b=_.state[yt]-c.state[yt],P=b===1,E=b===-1,C=!P&&!E||d;d=!1;let T=C?"GO":E?"BACK":"FORWARD",D=C?{type:"GO",index:b}:{type:E?"BACK":"FORWARD"};if(m)m=!1;else{let wt=s();if(typeof document<"u"&&wt.length){for(let rt of wt)if(await rt.blockerFn({currentLocation:c,nextLocation:_,action:T})){h=!0,e.history.go(1),x.notify(D);return}}}c=l(),x.notify(D)},"onPushPopEvent"),L=a(_=>{if(g){g=!1;return}let b=!1,P=s();if(typeof document<"u"&&P.length)for(let E of P){let C=E.enableBeforeUnload??!0;if(C===!0){b=!0;break}if(typeof C=="function"&&C()===!0){b=!0;break}}if(b)return _.preventDefault(),_.returnValue=""},"onBeforeUnload"),x=Qe({getLocation:p,getLength:a(()=>e.history.length,"getLength"),pushState:a((_,b)=>y(!0,_,b),"pushState"),replaceState:a((_,b)=>y(!1,_,b),"replaceState"),back:a(_=>(_&&(m=!0),g=!0,e.history.back()),"back"),forward:a(_=>{_&&(m=!0),g=!0,e.history.forward()},"forward"),go:a(_=>{d=!0,e.history.go(_)},"go"),createHref:a(_=>i(_),"createHref"),flush:S,destroy:a(()=>{e.history.pushState=o,e.history.replaceState=r,e.removeEventListener(xn,L,{capture:!0}),e.removeEventListener(wn,R)},"destroy"),onBlocked:a(()=>{f&&c!==f&&(c=f)},"onBlocked"),getBlockers:s,setBlockers:u,notifyOnIndexChange:!1});return e.addEventListener(xn,L,{capture:!0}),e.addEventListener(wn,R),e.history.pushState=function(..._){let b=o.apply(e.history,_);return x._ignoreSubscribers||w("PUSH"),b},e.history.replaceState=function(..._){let b=r.apply(e.history,_);return x._ignoreSubscribers||w("REPLACE"),b},x}a(to,"createBrowserHistory");function es(t={initialEntries:["/"]}){let e=t.initialEntries,o=t.initialIndex?Math.min(Math.max(t.initialIndex,0),e.length-1):e.length-1,r=e.map((l,c)=>Ze(c,void 0)),n=a(()=>$t(e[o],r[o]),"getLocation"),s=[];return Qe({getLocation:n,getLength:a(()=>e.length,"getLength"),pushState:a((l,c)=>{o<e.length-1&&(e.splice(o+1),r.splice(o+1)),r.push(c),e.push(l),o=Math.max(e.length-1,0)},"pushState"),replaceState:a((l,c)=>{r[o]=c,e[o]=l},"replaceState"),back:a(()=>{o=Math.max(o-1,0)},"back"),forward:a(()=>{o=Math.min(o+1,e.length-1)},"forward"),go:a(l=>{o=Math.min(Math.max(o+l,0),e.length-1)},"go"),createHref:a(l=>l,"createHref"),getBlockers:a(()=>s,"_getBlockers"),setBlockers:a(l=>s=l,"_setBlockers")})}a(es,"createMemoryHistory");function os(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}a(os,"sanitizePath");function $t(t,e){let o=os(t),r=o.indexOf("#"),n=o.indexOf("?"),s=eo();return{href:o,pathname:o.substring(0,r>0?n>0?Math.min(r,n):r:n>0?n:o.length),hash:r>-1?o.substring(r):"",search:n>-1?o.slice(n,r===-1?void 0:r):"",state:e||{[yt]:0,key:s,__TSR_key:s}}}a($t,"parseHref");function eo(){return(Math.random()+1).toString(36).substring(7)}a(eo,"createRandomKey");function bn(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}a(bn,"routeNeedsLoad");function Ct(t,e){return{fromLocation:e,toLocation:t,pathChanged:e?.pathname!==t.pathname,hrefChanged:e?.href!==t.href,hashChanged:e?.hash!==t.hash}}a(Ct,"getLocationChangeInfo");function Pn({key:t,__TSR_key:e,__TSR_index:o,__hashScrollIntoViewOptions:r,...n}){return n}a(Pn,"_getUserHistoryState");function En(t,e,o,r){for(let n of e){if(r?.()===!1)return;o.some(s=>s.routeId===n.routeId)||t.routesById[n.routeId].options.onLeave?.(n)}for(let n of o){if(r?.()===!1)return;t.routesById[n.routeId].options[e.some(s=>s.routeId===n.routeId)?"onStay":"onEnter"]?.(n)}}a(En,"runRouteLifecycle");var oo=class{static{a(this,"RouterCore")}constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async o=>(o(),!1),this.update=o=>{let r=this.options,n=this.basepath??r?.basepath??"/",s=this.basepath===void 0,u=r?.rewrite;if(this.options={...r,...o},this.isServer=this.options.isServer??!1??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=ln(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=to()),this.origin=this.options.origin,this.origin||(!!1&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let c;if(!1){let f=globalThis.__TSR_CACHE__;this.resolvePathCache=f.resolvePathCache,c=f.processRouteTreeResult}else this.resolvePathCache=Dt(1e3),c=this.buildRouteTree(),!1;this.setRoutes(c)}if(!this.stores&&this.latestLocation){let c=this.getStoreConfig(this);this.batch=c.batch,this.stores=Rn(this.latestLocation,c),hn(this)}let i=this.options.basepath??"/",l=this.options.rewrite;if(s||n!==i||u!==l){this.basepath=i;let c=[],f=Gt(i);f&&f!=="/"&&c.push(Sn({basepath:i})),l&&c.push(l),this.rewrite=c.length===0?void 0:c.length===1?c[0]:_n(c),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let o=sn(this.routeTree,this.options.caseSensitive,(r,n)=>{r.init({originalIndex:n})});return this.options.routeMasks&&en(this.options.routeMasks,o.processedTree),o},this.subscribe=(o,r)=>{let n={eventType:o,fn:r};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=o=>{for(let r of this.subscribers)if(r.eventType===o.type)try{r.fn(o)}catch(n){console.error(n)}},this.parseLocation=(o,r)=>{let n=a(({pathname:l,search:c,hash:f,href:d,state:h})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){let S=this.options.parseSearch(c),y=this.options.stringifySearch(S);return{href:l+y+f,publicHref:l+y+f,pathname:Nt(l).path,external:!1,searchStr:y,search:pt(r?.search,S),hash:Nt(f.slice(1)).path,state:st(r?.state,h)}}let m=new URL(d,this.origin),g=ge(this.rewrite,m),p=this.options.parseSearch(g.search),v=this.options.stringifySearch(p);return g.search=v,{href:g.href.replace(g.origin,""),publicHref:d,pathname:Nt(g.pathname).path,external:!!this.rewrite&&g.origin!==this.origin,searchStr:v,search:pt(r?.search,p),hash:Nt(g.hash.slice(1)).path,state:st(r?.state,h)}},"parse"),s=n(o),{__tempLocation:u,__tempKey:i}=s.state;if(u&&(!i||i===this.tempLocationKey)){let l=n(u);return l.state.key=s.state.key,l.state.__TSR_key=s.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:s}}return s},this.resolvePathWithBase=(o,r)=>Ke({base:o,to:r.includes("//")?qt(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(o,r,n)=>typeof o=="string"?this.matchRoutesInternal({pathname:o,search:r},n):this.matchRoutesInternal(o,r),this.getMatchedRoutes=o=>{let r=Object.create(null),n=rn(Y(o),this.processedTree,!0);return n&&Object.assign(r,n.rawParams),[n?.branch||[this.routesById.__root__],r,n?.route]},this.buildLocation=o=>{let r=a((s={})=>{let u=s._fromLocation||this._pendingLocation||this.latestLocation,i=this.matchRoutesLightweight(u);s.from;let l=s.unsafeRelative==="path"?u.pathname:s.from??i[1],c=s.to?`${s.to}`:void 0,f=i[2],d=Object.assign(Object.create(null),i[3]),h=c?.charCodeAt(0)===47?"/":this.resolvePathWithBase(l,"."),m=c?this.resolvePathWithBase(h,c):h,g=Cn(s.params,d),p=this.routesByPath[Y(m)],v;if(p)v=this.getRouteBranch(p);else if(m.includes("$"))v=[];else{let[C,T,D]=this.getMatchedRoutes(m);v=C,this.options.notFoundRoute&&(!D||D.path!=="/"&&T["**"])&&(v=[...v,this.options.notFoundRoute])}if(v.length&&ht(g))for(let C of v){let T=C.options.params?.stringify??C.options.stringifyParams;if(T)try{Object.assign(g,T(g))}catch{}}let S=o.leaveParams?m:Nt(he({path:m,params:g,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,y=f;if(o._includeValidateSearch&&this.options.search?.strict){let C={};v.forEach(T=>{if(T.options.validateSearch)try{Object.assign(C,ve(T.options.validateSearch,{...C,...y}))}catch{}}),y=C}y=ns(y,s,v,o._includeValidateSearch),y=pt(f,y);let w=this.options.stringifySearch(y),R=s.hash===!0?u.hash:s.hash?J(s.hash,u.hash):void 0,L=R?`#${R}`:"",x=s.state===!0?u.state:s.state?J(s.state,u.state):{};x=st(u.state,x);let _=`${S}${w}${L}`,b,P,E=!1;if(this.rewrite){let C=new URL(_,this.origin),T=Je(this.rewrite,C);b=C.href.replace(C.origin,""),T.origin!==this.origin?(P=T.href,E=!0):P=T.pathname+T.search+T.hash}else b=Yo(_),P=b;return{publicHref:P,href:b,pathname:S,search:y,searchStr:w,state:x,hash:R??"",external:E,unmaskOnReload:s.unmaskOnReload}},"build"),n=a((s={},u)=>{let i=r(s),l=u?r(u):void 0;if(!l){let c=Object.create(null);if(this.options.routeMasks){let f=on(i.pathname,this.processedTree);if(f){Object.assign(c,f.rawParams);let{from:d,params:h,...m}=f.route,g=Cn(h,c);u={from:o.from,...m,params:g},l=r(u)}}}return l&&(i.maskedLocation=l),i},"buildWithMatches");return o.mask?n(o,{from:o.from,...o.mask}):n(o)},this.commitLocation=async({viewTransition:o,ignoreBlocker:r,...n})=>{let s,u=Y(this.latestLocation.href)===Y(n.href)&&Q(Pn(n.state),Pn(this.latestLocation.state)),i=this._commitPromise,l,c=new Promise(f=>{l=f});if(c.resolve=()=>{l(),i?.resolve()},this._commitPromise=c,u)this.load();else{let{maskedLocation:f,hashScrollIntoView:d,...h}=n;f&&(h={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=d??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=o,s=n.replace?"REPLACE":"PUSH",this.history[s==="REPLACE"?"replace":"push"](h.publicHref,h.state,{ignoreBlocker:r}),this.history.subscribers.size||this.load({action:{type:s}})}return this._scroll.next=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:o,resetScroll:r,hashScrollIntoView:n,viewTransition:s,ignoreBlocker:u,_redirects:i,href:l,...c}={})=>{if(l){let h=this.history.location.state.__TSR_index,m=$t(l,{__TSR_index:o?h:h+1}),g=new URL(m.pathname,this.origin);c.to=ge(this.rewrite,g).pathname,c.search=this.options.parseSearch(m.search),c.hash=m.hash.slice(1)}let f=this.buildLocation({...c,_includeValidateSearch:!0});i&&(f._redirects=i),this._pendingLocation=f;let d=this.commitLocation({...f,viewTransition:s,replace:o,resetScroll:r,hashScrollIntoView:n,ignoreBlocker:u});return queueMicrotask(()=>{this._pendingLocation===f&&(this._pendingLocation=void 0)}),d},this.navigate=async({to:o,reloadDocument:r,href:n,publicHref:s,...u})=>{let i=!1;if(n)try{new URL(`${n}`),i=!0}catch{}if(i&&!r&&(r=!0),r){if(o!==void 0||!n){let c=this.buildLocation({to:o,...u});n=n??c.publicHref,s=s??c.publicHref}let l=!i&&s?s:n;if(it(l,this.protocolAllowlist))return;if(!u.ignoreBlocker){let c=this.history.getBlockers?.()??[];for(let f of c)if(f?.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}u.replace?window.location.replace(l):window.location.href=l;return}return this.buildAndCommitLocation({...u,href:n,to:o,_isNavigate:!0})},this.load=async o=>{if(!1)return(void 0)(this,o);this.updateLatestLocation(),o?.action&&(this._scroll.hash=o.action.type==="PUSH"||o.action.type==="REPLACE"),await In(this,o)},this.startViewTransition=o=>{let r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&!!1&&typeof document.startViewTransition=="function"){let n;if(typeof r=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){let s=this.latestLocation,u=this.stores.resolvedLocation.get(),i=typeof r.types=="function"?r.types(Ct(s,u)):r.types;if(i===!1)return o();n={update:o,types:i}}else n=o;return document.startViewTransition(n).updateCallbackDone}return o()},this.invalidate=o=>{let r=this._committed,n=o?.filter,s=this._preloads,u=new Set([...r,...this._cache.values(),...[...s?.values()??[]].flat(),...this._tx?.[3]??[]].filter(c=>!n||n(c)).map(c=>c.id)),i=[];for(let[c,f]of s??[])f.some(d=>u.has(d.id))&&(s.delete(c),i.push(c));let l=a(c=>{if(u.has(c.id)){let f=this.routesById[c.routeId],d={...c,invalid:!0,...(o?.forcePending||c.status==="error"||c.status==="notFound")&&bn(f)?{status:"pending",error:void 0}:void 0};return c._flight=void 0,d}return c},"invalidate");this._committed=r.map(l);for(let[c,f]of this._cache)u.has(c)&&(f.invalid=!0,o?.forcePending&&(f.status="pending"));for(let c of u)this._flights?.delete(c);for(let c of i)c.abort();return this.shouldViewTransition=!1,this.load({sync:o?.sync})},this.resolveRedirect=o=>{let r=o.headers.get("Location");if(!o.options.href||o.options._builtLocation){let n=(o.options._builtLocation??this.buildLocation(o.options)).publicHref||"/";o.options.href=n,o.headers.set("Location",n)}else if(r)try{let n=new URL(r);if(this.origin&&n.origin===this.origin){let s=n.pathname+n.search+n.hash;o.options.href=s,o.headers.set("Location",s)}}catch{}if(o.options.href&&!o.options._builtLocation&&it(o.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return o.headers.get("Location")||o.headers.set("Location",o.options.href),o},this.clearCache=o=>{let r=this._cache,n=this._preloads,s=o?.filter,u=[],i=[];for(let[c,f]of r)(!s||s(f))&&(i.push(c),u.push(f));let l=[];for(let[c,f]of n??[])(!s||f.some(s))&&(l.push(c),u.push(...f));for(let c of i)r.delete(c);for(let c of l)n.delete(c);for(let c of u){let f=c._flight;c._flight=void 0,f&&!--f[2]&&(this._flights?.get(c.id)===f&&this._flights.delete(c.id),l.push(f[1]))}for(let c of l)c.abort()},this.loadRouteChunk=Lt,this.preloadRoute=o=>no(this,o),this.matchRoute=(o,r)=>{let n={...o,to:o.to?this.resolvePathWithBase(o.from||"",o.to):void 0,params:o.params||{},leaveParams:!0},s=this.buildLocation(n),u=this.stores.status.get()==="pending";if(r?.pending&&!u)return!1;let i=r?.pending??!u?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),l=nn(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,i.pathname,this.processedTree);return!l||o.params&&!Q(l.rawParams,o.params,{partial:!0})?!1:r?.includeSearch??!0?Q(i.search,s.search,{partial:!0})?l.rawParams:!1:l.rawParams},this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??vn,parseSearch:t.parseSearch??gn,protocolAllowlist:t.protocolAllowlist??We}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:e,processedTree:o}){this.routesById=t,this.routesByPath=e,this.processedTree=o;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(t){let e=this.routeBranchCache.get(t);return e||(e=je(t),this.routeBranchCache.set(t,e)),e}matchRoutesInternal(t,e){let[o,r,n]=this.getMatchedRoutes(t.pathname),s=o,u=!1;(n?n.path!=="/"&&r["**"]:Y(t.pathname))&&(this.options.notFoundRoute?s=[...s,this.options.notFoundRoute]:u=!0);let i=u?rs(this.options.notFoundMode,s):void 0,l=new Array(s.length),c=this._committed,f=a((h,m)=>{let g=c[m];return g?.routeId===h.id?g:h===this.options.notFoundRoute?c.find(p=>p.routeId===h.id):void 0},"previousAt"),d;for(let h=0;h<s.length;h++){let m=s[h],g=l[h-1],p,v,S;{let D=g?.search??t.search,wt=g?._strictSearch??void 0;try{let rt=ve(m.options.validateSearch,{...D})??void 0;p={...D,...rt},v={...wt,...rt}}catch(rt){let re=rt;if(rt instanceof Yt||(re=new Yt(rt.message,{cause:rt})),e?.throwOnError)throw re;p=D,v={},S=re}}let y="",w="";try{y=m.options.loaderDeps?.({search:p})??"",w=y&&JSON.stringify(y)||""}catch(D){if(e?.throwOnError)throw D;S??=D}let{interpolatedPath:R,usedParams:L}=he({path:m.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),x=m.id+R+w,_=f(m,h),b=this._cache.get(x)??(_?.id===x?_:void 0);d=b?._strictParams??Object.assign(L,d);let P;if(!b)try{Ln(m,d)}catch(D){if(K(D)||Jt(D)?P=D:P=new kn(D.message,{cause:D}),e?.throwOnError)throw P}let E=_?"stay":"enter",C;if(b)C={...b,cause:E,search:_?pt(_.search,p):pt(b.search,p),_strictSearch:v,searchError:S};else{let D=bn(m)?"pending":"success";C={id:x,ssr:m.options.ssr,index:h,routeId:m.id,params:_?.params??d,_strictParams:d,pathname:R,updatedAt:Date.now(),search:_?pt(_.search,p):p,_strictSearch:v,searchError:S,status:D,isFetching:!1,error:void 0,paramsError:P,context:{},abortController:e?._controller??new AbortController,cause:E,loaderDeps:_?st(_.loaderDeps,y):y,invalid:!1,preload:!1,staticData:m.options.staticData||{},fullPath:m.fullPath}}let T=i===m.id;C._notFound&&!T&&(C.error=void 0),C._notFound=T,l[h]=C}for(let h=0;h<l.length;h++){let m=l[h];m.params=m.cause==="stay"?pt(m.params,d):d,e?._controller&&(m.context={})}return l}matchRoutesLightweight(t){let e=dt(this.stores.ids.get()),o=e?this.stores.byRoute.get(e).get():void 0,r=o?.id,n=this.lightweightCache.get(t);if(n&&n[0]===r)return n[1];let[s,u]=this.getMatchedRoutes(t.pathname),i=dt(s),l={...t.search};for(let h of s)try{Object.assign(l,ve(h.options.validateSearch,l))}catch{}let c=o&&o.routeId===i.id&&o.pathname===t.pathname,f;if(c)f=o.params;else{let h=Object.assign(Object.create(null),u);for(let m of s)try{Ln(m,h)}catch{}f=h}let d=[s,i.fullPath,l,f];return this.lightweightCache.set(t,[r,d]),d}},Yt=class extends Error{static{a(this,"SearchParamError")}},kn=class extends Error{static{a(this,"PathParamError")}};function ve(t,e){if(t==null)return{};if("~standard"in t){let o=t["~standard"].validate(e);if(o instanceof Promise)throw new Yt("Async validation not supported");if(o.issues)throw new Yt(JSON.stringify(o.issues,void 0,2),{cause:o});return o.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}a(ve,"validateSearch");function ns(t,e,o,r){let n=[];for(let u of o){let i=u.options;if("search"in i)i.search?.middlewares&&n.push(...i.search.middlewares);else if(i.preSearchFilters||i.postSearchFilters){let c=a(({search:f,next:d})=>{let h=d(i.preSearchFilters?i.preSearchFilters.reduce((m,g)=>g(m),f):f);return i.postSearchFilters?i.postSearchFilters.reduce((m,g)=>g(m),h):h},"legacyMiddleware");n.push(c)}let l=i.validateSearch;if(l){let c=a(({search:f,next:d,meta:h})=>{let m=d(f);if(r)try{let g=ve(l,m);if(h&&g)for(let p in g)p in m||(h.defaulted||=new Map).set(p,g[p]);return{...m,...g}}catch{}return m},"validate");n.push(c)}}let s=a((u,i,l)=>{if(u>=n.length){if(!e.search)return{};if(e.search===!0)return i;let f=J(e.search,i);return l&&(l.explicit=f),f}let c=a((f,d)=>{if(d){let h=l||{};return{search:s(u+1,f,h),meta:h}}return s(u+1,f,l)},"next");return n[u]({search:i,next:c,meta:l})},"applyNext");return s(0,t)}a(ns,"applySearchMiddleware");function rs(t,e){if(t!=="root"){let o;for(let r=e.length-1;r>=0;r--){let n=e[r];if(n.options.notFoundComponent)return n.id;o||=n.children&&n.id}if(o)return o}return tt}a(rs,"findGlobalNotFoundRouteId");function Cn(t,e){return t===!1||t===null?Object.create(null):(t??!0)===!0?e:Object.assign(e,J(t,e))}a(Cn,"resolveNextParams");function Ln(t,e){let o=t.options.params?.parse??t.options.parseParams;o&&Object.assign(e,o(e))}a(Ln,"extractStrictParams");function ro(t,e){return t.options[e]?.preload?.()}a(ro,"preloadComponent");function ss(t,e){let o=ro(t,"component"),r=ro(t,"pendingComponent"),n=e&&r?r.then(e):r;return e&&!r&&e(),o&&n?Promise.all([o,n]).then(()=>{}):o??n}a(ss,"loadComponents");function Lt(t,e,o){let r=a(()=>e===!1?void 0:e?ro(t,e):ss(t,o),"afterLazy"),n=t._lazy;if(n)return n===!0?r():n.then(r);if(!t.lazyFn)return r();let s=t.lazyFn().then(u=>{{let{id:i,...l}=u.options;Object.assign(t.options,l),t._lazy=!0}},u=>{throw t._lazy=void 0,u});return t._lazy=s,s.then(r)}a(Lt,"loadRouteChunk");function Fn(t){let e=t.findIndex(o=>o.status!=="success"||o._notFound)+1;return e&&e<t.length?t.slice(0,e):t}a(Fn,"_getRenderedMatches");var at=0,_t=1,_e=2,et=3,kt=4;function Zt(t){return typeof t[0]=="number"}a(Zt,"isControl");function St(t,e){return e.aborted?Promise.race([Promise.reject(e),t]):new Promise((o,r)=>{let n=a(()=>r(e),"abort");e.addEventListener("abort",n,{once:!0}),Promise.resolve(t).then(o,r).finally(()=>e.removeEventListener("abort",n))})}a(St,"waitFor");function It(t,e){return t.routesById[e.routeId]}a(It,"getRoute");function Qt(t,e,o){return Jt(t)?[et,t]:K(t)?(t.routeId||=o,[_e,t]):(e&&typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),e?[_t,t]:[at,t])}a(Qt,"normalize");function An(t,e){let o=Qt(e,!0,t.id);if(o[0]!==_t)return o;try{t.options.onError?.(o[1])}catch(r){o=Qt(r,!0,t.id)}return o}a(An,"normalizeError");function Xt(t,e,o){return o[0].signal.aborted||!o[2]()?(o[0].abort(),[kt]):An(t,e)}a(Xt,"normalizeLaneError");function $n(t,e){return o=>t.navigate({...o,_fromLocation:e})}a($n,"navigateFrom");async function is(t,e,o,r,n,s){let[u,i]=e,l=o[0].signal,c=!!o[4];for(let f=o[7]??0;f<r;f++){let d=i[f],h=It(t,d);d.abortController=o[0];let m=i[f-1]?.context??t.options.context??{},g={params:d.params,location:u,navigate:$n(t,u),buildLocation:t.buildLocation,cause:c?"preload":d.cause,abortController:o[0],preload:c,matches:i,routeId:h.id},p=m;try{let R=d._ctx;!R&&h.options.context&&(R=d._ctx=h.options.context({...g,deps:d.loaderDeps,context:m})||{}),p={...m,...R},d.context=p}catch(R){return ut(t,d),[f,Xt(h,R,o)]}if(l.aborted||!o[2]())return o[0].abort(),[f,[kt]];let v=d.paramsError??d.searchError;if(v!==void 0)return ut(t,d),[f,Xt(h,v,o)];let S=h.options.beforeLoad;if(!S)continue;let y={...g,search:d.search,context:p,...t.options.additionalContext},w=d.status;w==="success"&&f>=s&&(d.status="pending"),o[8]?.();try{te(t,d,"beforeLoad",o[0]);let R=await St(S(y),l);if(!o[2]())return o[0].abort(),[f,[kt]];let L=Qt(R,!1,h.id);if(L[0]!==at)return ut(t,d),[f,L];d.context={...p,...R}}catch(R){return ut(t,d),[f,Xt(h,R,o)]}finally{w==="success"&&d.status==="pending"&&(d.status="success"),te(t,d,!1,o[0])}}n()}a(is,"contextualize");function ao(t,e,o){if(!(!o||--o[2])){if(t._flights?.get(e.id)===o){let r=t._tx;if(r&&!r[0].signal.aborted&&!r[3].includes(e)&&r[3].some(n=>n.id===e.id)&&r[3].some(n=>n.isFetching==="beforeLoad"))return;t._flights.delete(e.id)}return o[1]}}a(ao,"releaseOwnedFlight");function ut(t,e){let o=e._flight;e._flight=void 0,ao(t,e,o)?.abort()}a(ut,"releaseFlight");function q(t,e,o,r){let n=[];for(let s of e)if(!o?.includes(s)){let u=s._flight;if(s._flight=void 0,r&&u?.[2]===1&&t._flights?.get(s.id)===u&&o?.some(i=>i.id===s.id))u[2]=0;else{let i=ao(t,s,u);i&&n.push(i)}}for(let s of n)s.abort()}a(q,"transferMatchResources");function co(t){for(let e of t){let o=e._flight;o&&o[2]++}}a(co,"acquireMatchResources");function te(t,e,o,r){if(e.isFetching=o,r&&t._tx?.[0]!==r)return;let n=t.stores.byRoute.get(e.routeId),s=n?.get();s?.id===e.id&&n.set({...s,isFetching:o})}a(te,"setFetching");function Bn(t,e,o,r,n,s,u){let i=e[0];return{params:o.params,location:i,navigate:$n(t,i),cause:u?"preload":o.cause,abortController:n,preload:u,deps:o.loaderDeps,parentMatchPromise:s,context:o.context,route:r,...t.options.additionalContext}}a(Bn,"getLoaderContext");async function Tn(t,e,o,r,n,s,u,i){let l=i.signal;if(l.aborted)return[kt];if(!n)return[at,void 0];let c=o._flight;te(t,o,"loader",i);try{if(!c){let f=new AbortController;c=[Promise.resolve().then(()=>n(Bn(t,e,o,r,f,s,u))).then(d=>Qt(d,!1,r.id),d=>Qt(d,!0,r.id)).then(d=>(d[0]!==at&&t._flights?.get(o.id)===c&&(t._flights.delete(o.id),c[2]||f.abort()),d[0]===_t&&c[2]?An(r,d[1]):d)),f,1],(t._flights??=new Map).set(o.id,c)}return o._flight=c,o.abortController=c[1],await St(c[0],l)}catch(f){if(f!==l)throw f;return ut(t,o),[kt]}finally{te(t,o,!1,i)}}a(Tn,"loadResource");function Mn(t,e,o){e[0]===at?(t.loaderData=e[1],t.error=void 0,t.status="success",t.invalid=!1,t.updatedAt=Date.now(),t.preload=o):e[0]!==et&&(t.status="success",t.error=void 0,t.invalid=!0)}a(Mn,"settleInto");function as(t,e,o){let r=t._cache.get(e.id);if(r!==o||t._committed.some(s=>s.id===e.id&&s._flight===e._flight))return;let n={...e,_notFound:void 0,context:{}};n._flight&&n._flight[2]++,t._cache.set(e.id,n),r&&ut(t,r)}a(as,"cacheLoaderMatch");function On(t,e){return e[0]===_t||e[0]===_e?{...t,status:e[0]===_t?"error":"notFound",error:e[1],_flight:void 0}:t}a(On,"getParentSnapshot");function cs(t,e,o,r,n,s,u){let i=e[1][o],l=It(t,i),c=!!s[4],f=c?t._cache.get(i.id):void 0,d,h=!1,m;try{if(i.status==="success"&&(d=l.options.shouldReload,typeof d=="function"&&(d=d(Bn(t,e,i,l,s[0],n,c))),s[2]()||(s[0].abort(),m=[kt])),!m)if(i.status!=="success")h=!0;else{let P=s[4]||i.preload?l.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:l.options.staleTime??t.options.defaultStaleTime??0;h=!!(i.invalid||d||d===void 0&&Date.now()-i.updatedAt>=P&&(s[6]||i.cause==="enter"||s[3].some(E=>E.routeId===i.routeId&&E.id!==i.id)))}}catch(P){i.invalid=!0,ut(t,i),m=Xt(l,P,s)}let g=l.options.loader,p=typeof g=="function"?g:g?.handler,v=(!c||l.options.preload!==!1)&&g?t._flights?.get(i.id):void 0;v===i._flight||m?v=void 0:v&&!h&&!c&&d===void 0?h=!0:h||(v=void 0);let S=!!(g&&h&&i.status==="success"&&!c&&!s[5]&&((typeof g=="function"?void 0:g?.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),y=h&&(!c||l.options.preload!==!1),w=y&&!S&&(i.status!=="success"||!!g),R=l.lazyFn&&l._lazy!==!0?s[8]:void 0;if(y&&!g&&(i.invalid=!1,i.updatedAt=Date.now()),v&&v[2]++,w){let P=i._flight;i._flight=v,ao(t,i,P)?.abort(),i.status==="success"&&o>=u&&(i.status="pending"),s[8]?.()}y||(i.isFetching=!1);let L=(m?Promise.resolve(m):w?Tn(t,e,i,l,p,n,c,s[0]):Promise.resolve([at,i.loaderData])).then(P=>(w&&(Mn(i,P,c),P[0]===at&&(c&&g&&!s[0].signal.aborted&&as(t,i,f),i.status="pending")),P)),x=St(Promise.resolve().then(()=>Lt(l,void 0,R)),s[0].signal).then(()=>{},P=>[o,Xt(l,P,s)]).then(P=>L.then(E=>(w&&!P&&E[0]===at&&i.status==="pending"&&s[2]()&&(i.status="success",s[8]?.()),P)));if(r.push([o,L,x]),!S)return L.then(P=>On(i,P));let _={...i,status:"pending",preload:!1,_flight:v};i.invalid=!1,i.isFetching="loader";let b=Tn(t,e,_,l,p,n,!1,s[0]).then(P=>(i.isFetching=!1,Mn(_,P,!1),P));return(e[2]??=[]).push([o,b,x,_]),b.then(P=>On(_,P))}a(cs,"createLoaderTask");async function so(t,e,o,r,n=0){let s=o?.[1][1],u=s?.routeId?e.findIndex(i=>i.routeId===s.routeId):o?.[0]??e.length-1;u<0&&(u=0);for(let i=u;i>=0;i--){let l=It(t,e[i]),c=Lt(l,!1);if(c)try{await St(c,r)}catch(f){if(f===r)throw f}if(l.options.notFoundComponent)return i}return s?.routeId?u:n}a(so,"getNotFoundBoundary");function Bt(t,e){e[2]&&(q(t,e[2].map(o=>o[3])),e[2]=void 0)}a(Bt,"discardBackground");async function Nn(t,e,o,r){let n;try{await Promise.all(t.map(s=>s[1].then(async u=>{let i=s[0];if(!(r&&i>=await r)){if(u[0]>=et)throw[i,u];!n&&u[0]!==at&&(n=[i,u],await Promise.all((o??[]).map(l=>{if(!(l[0]<=i))return l[1].then(c=>{if(c[0]===et)throw[l[0],c]})})))}})))}catch(s){return s}return e??n}a(Nn,"settleTasks");async function Un(t,e,o,r,n,s,u){let i=e[1],l=await s,c=!1,f=i.findIndex(g=>g._notFound),d=a(g=>g[1][0]===_e?so(t,i,g,r.signal):g[0],"boundaryOf"),h=f<0?i.length:f;if((l?.[1][0]??0)>=et)h=0;else if(l){h=l[2]??=await d(l);for(let g of o){if(g[0]>=h)break;let p=await g[1];if(p[0]!==at&&p[0]<et&&!("loaderData"in i[g[0]])){l=[g[0],p],h=l[2]=await d(l);break}}}for(let g of o){if(g[0]>=h)break;let p=await g[2];if(p){l=p;break}}if((l?.[1][0]??0)>=et){let g=l[1];if(g[0]!==et||g[1].options.reloadDocument||n<20)return Bt(t,e),g;c=!0,l=[0,[_t,new Error("Too many redirects")]]}let m=l?l[2]??await d(l):f;if(m>=0){let g=l?.[1],p=g?.[0],v=i[m],S=g?.[1],y=a(()=>{g&&(v._notFound=void 0,p===_t?v.status="error":(S.routeId=v.routeId,v.routeId===t.routeTree.id?(v.status="success",v._notFound=!0):v.status="notFound"),v.error=S,v.isFetching=!1)},"install");y();let w=It(t,v);try{await St(g?Promise.resolve().then(()=>Lt(w,p===_t?"errorComponent":"notFoundComponent")):Promise.all([Lt(w),Lt(w,"notFoundComponent")]),r.signal)}catch(R){if(R===r.signal)return Bt(t,e),[kt]}g?c&&(r.abort(),await Promise.all([...o.map(R=>R[1]),...o.map(R=>R[2]),...(e[2]??[]).map(R=>R[1])]),Bt(t,e),q(t,i),y()):(v.status="success",u?.())}return e}a(Un,"reduceLane");async function Vn(t,e,o,r=0,n=e[1].length){let s=e[1];for(let u=r;u<n;u++){let i=s[u],l=It(t,i).options;if(l.head||l.scripts)try{let c={ssr:t.options.ssr,matches:s,match:i,params:i.params,loaderData:i.loaderData},[f,d]=await St(Promise.all([l.head?.(c),l.scripts?.(c)]),o);i.meta=f?.meta,i.links=f?.links,i.headScripts=f?.scripts,i.styles=f?.styles,i.scripts=d}catch(c){if(c===o)break;console.error(c)}if(i.status!=="success"||i._notFound)break}return e}a(Vn,"projectLane");async function Wn(t,e,o,r){let n=[e,o],s=t.stores.matches.get(),u=o.findIndex(p=>p._notFound);if(t.options.notFoundMode!=="root"&&u>=0){let p=await so(t,n[1],void 0,r[0].signal,u);p!==u&&(o[u]._notFound=void 0,o[p]._notFound=!0),u=p}let i=u<0?o.length:u+1,l=0;for(;l<i&&l!==u;){let p=o[l],v=r[3][l],S=s[l];if(v?.id!==p.id||v.status!=="success"||v._notFound||p.preload||S?.id!==p.id||S.status!=="success"||S._notFound)break;l++}let c=[],f=r[7]??0,d=f?Promise.resolve(n[1][f-1]):void 0,h=a(()=>{for(let p=f;p<i&&!r[0].signal.aborted;p++)d=cs(t,n,p,c,d,r,l)},"planSuccessfulLane"),m=await is(t,n,r,i,h,l);if(m&&(r[5]=!0,i=m[0],m[1][0]===_e?(m[2]=await so(t,n[1],m,r[0].signal),i=Math.min(i,m[2]+1)):m[1][0]>=et&&(i=0),h()),r[2]()&&!r[4]){let p=[];for(let[v,S]of t._flights??[])S[2]||(t._flights.delete(v),p.push(S[1]));for(let v of p)v.abort()}let g;try{let p=Un(t,n,c,r[0],r[1],Nn(c,m,n[2]),r[8]);n[2]?.length&&(n[3]=Nn(n[2],void 0,void 0,p.then(v=>Zt(v)?0:Fn(v[1]).length,()=>0))),g=await p}catch(p){throw Bt(t,n),p}return Zt(g)?g:Vn(t,g,r[0].signal,r[7]===g[1].length?r[7]:0)}a(Wn,"executeClientLane");function io(t,e){if(t._tx!==e)return;let o=t._pending,r=!1,n=o?.[0][3][o[1]]?.id;o?.[0]!==e&&(o&&e[3][o[1]]?.id===n?(o[0]=e,r=!0):(clearTimeout(o?.[3]),t._pending=o=void 0));let s=e[3],u=t.stores.matches.get(),i=-1,l,c,f,d=!1;for(let p=0;p<s.length;p++){let v=s[p],S=v.status==="success";if(d=u[p]?.id===v.id&&u[p]?.status==="pending",S&&!d)continue;let y=It(t,v);if(l=S&&d||v.invalid?0:y.options.pendingMs??t.options.defaultPendingMs,f=y.options.pendingComponent??t.options.defaultPendingComponent,!f||typeof l!="number"||l===1/0)return;i=p,c=y.options.pendingMinMs??t.options.defaultPendingMinMs??0;break}if(i<0)return;let h=s[i].id;if((!o||o[1]!==i||n!==h)&&(clearTimeout(o?.[3]),t._pending=o=[e,i,d?Date.now()+c:e[4]+l,void 0,d?Promise.resolve(!0):void 0,f]),o[4]&&!r&&o[5]===f)return;if(o[5]=f,!o[4]){clearTimeout(o[3]);let p=o[2]-Date.now();if(p>0){o[3]=setTimeout(()=>io(t,e),p);return}o[2]=0}let m=s.map(p=>({...p,_flight:void 0}));m[i].status="pending";let g=t.startTransition(()=>t.stores.setMatches(m),m).then(p=>(p&&t._pending===o&&o[4]===g&&!o[2]&&(o[2]=Date.now()+c),p));o[4]=g}a(io,"offerPending");function ye(t,e){let o=t._pending;o?.[0]===e&&(clearTimeout(o[3]),t._pending=void 0)}a(ye,"finishPending");function zn(t,e){t._committed=e,t.stores.setMatches(e)}a(zn,"publishMatches");function Dn(t,e){q(t,e[1]),Bt(t,e)}a(Dn,"discardLane");function ls(t,e,o,r){let n=t._committed,s=t._cache;for(let c of o)c.preload=!1,r&&(c._assetEnd=void 0);let u=Fn(o).length,i=new Map,l=Date.now();for(let c of[...n,...s.values()]){if(c.status!=="success"||o.some((d,h)=>d.id===c.id&&(h<u||d.status==="success")))continue;let f=It(t,c);!f.options.loader||l-c.updatedAt>=(c.preload?f.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:f.options.gcTime??t.options.defaultGcTime??3e5)||i.set(c.id,s.get(c.id)===c?c:{...c,_flight:void 0,isFetching:!1,context:{}})}e[3]=[],t._cache=i,zn(t,o),q(t,[...s.values(),...n],[...o,...i.values()]),En(t,n,o,()=>t._tx===e)}a(ls,"commitMatches");async function Et(t,e){let o=t._tx;for(;o&&o!==e;){if(await o[5],t._tx===o)return;o=t._tx}}a(Et,"awaitCurrent");async function Hn(t,e,o){await t.navigate({...o.options,replace:!0,ignoreBlocker:!0,_redirects:e[1]+1})}a(Hn,"followRedirect");function jn(t,e){ye(t,e),e[0].abort(),q(t,e[3]),e[3]=[],t._tx===e&&(t.batch(()=>{t.stores.status.set("idle"),t.stores.setMatches(t._committed)}),t._tx===e&&(t._commitPromise?.resolve(),t._commitPromise=void 0))}a(jn,"restoreCommitted");async function us(t,e,o,r,n){let s=o.map(c=>({...c}));co(s);for(let c of r)ut(t,s[c[0]]),s[c[0]]=c[3];let u=[e[2],s],i;try{i=await Un(t,u,r,e[0],e[1],n)}catch(c){throw q(t,s),c}if(Zt(i)){q(t,s),i[0]===et&&t._tx===e&&t._committed===o&&await Hn(t,e,i[1]);return}let l=await Vn(t,i,e[0].signal);if(t._tx!==e||t._committed!==o){q(t,l[1]);return}for(let c of l[1]){let f=t._cache.get(c.id);f?._flight&&f._flight===c._flight&&(t._cache.delete(c.id),ut(t,f))}zn(t,l[1]),q(t,o,l[1])}a(us,"runBackground");async function fs(t,e,o,r,n,s){let u=[e[0],e[1],()=>t._tx===e&&!!e[3].length,t._committed,void 0,n,o,s,r],i=await Wn(t,e[2],e[3],u);if(Zt(i)){i[0]===et&&t._tx===e?(ye(t,e),q(t,e[3]),e[3]=[],t._tx===e&&await Hn(t,e,i[1])):jn(t,e);return}let l=t._pending;if(l?.[0]===e&&(clearTimeout(l[3]),l[4])){let h=e[0].signal,m=!1;try{m=await St(l[4],h)}catch(g){if(g!==h)throw g}if(m&&t._pending===l&&l[0]===e){let g=l[2]-Date.now();if(g>0){try{await St(new Promise(p=>{l[3]=setTimeout(p,g)}),h)}catch{}clearTimeout(l[3])}}}if(t._tx!==e){ye(t,e),Dn(t,i);return}let c=e[2],f=Ct(c,t.stores.resolvedLocation.get()),d=i[2];await t.startViewTransition(async()=>{if(t._tx!==e){Dn(t,i);return}let h=a(()=>{ye(t,e),ls(t,e,i[1],s),t._tx===e&&(t.emit({type:"onLoad",...f}),t._tx===e&&t.emit({type:"onBeforeRouteMount",...f}))},"commit"),m=await t.startTransition(h,i[1]);if(t._tx!==e){Bt(t,i);return}d?.length&&us(t,e,i[1],d,i[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(c),t.stores.status.set("idle"),t._tx===e&&t.emit({type:"onResolved",...f}),m&&t._tx===e&&t.emit({type:"onRendered",...f})}),t._tx===e&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}a(fs,"runClientTransaction");async function In(t,e){let o=!1,r=o?t.stores.matches.get():void 0,n=t._tx,s=t.stores.resolvedLocation.get(),u=s??t.stores.location.get(),i=t.latestLocation,l=t._pendingLocation,c=l?.href===i.href?l._redirects??0:0,f=t._handoff,d=o?void 0:f?.[0](),h=new AbortController,m=t._preflight;if(t._preflight=h,!o&&!d&&f?.[1](),m?.abort(),h.signal.aborted){await Et(t,n);return}let g=Ct(i,s);if(t.emit({type:"onBeforeNavigate",...g}),h.signal.aborted||t.emit({type:"onBeforeLoad",...g}),h.signal.aborted){await Et(t,n);return}let p=u.href===i.href,v,S=h;try{v=t.matchRoutes(i,{_controller:h}),co(v)}catch(R){if(h.abort(),!Jt(R)){await Et(t),t._commitPromise?.resolve(),t._commitPromise=void 0;return}await t.navigate({...R.options,replace:!0,ignoreBlocker:!0}),await Et(t,n);return}let y=d?f[1](v):void 0;if(y?S=d:d?.abort(),h.signal.aborted){q(t,v),await Et(t,n);return}t._preflight=void 0;let w=[S,c,i,v,Date.now(),Promise.resolve().then(()=>fs(t,w,p,()=>io(t,w),e?.sync,y)).catch(()=>{t._tx===w&&jn(t,w)})];if(t._tx=w,n){for(let R of t.stores.matches.get()){if(t._tx!==w)break;R.isFetching&&te(t,R,!1)}n[0].abort(),q(t,n[3],w[3],!0)}if(t._tx!==w){q(t,w[3]),w[3]=[],await Et(t,w);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(i)}),!s&&!v.some(R=>R._notFound)&&io(t,w);try{await w[5]}finally{await Et(t,w)}}a(In,"loadClientRoute");async function no(t,e,o=0){if(o>20)return;let r=e._builtLocation??t.buildLocation(e),n=t._committed,s=new AbortController,u;try{u=t.matchRoutes(r,{_controller:s}),co(u)}catch(l){s.abort(),K(l)||console.error(l);return}(t._preloads??=new Map).set(s,u);let i;try{let l;try{l=await Wn(t,r,u,[s,o,()=>!0,n,!0])}finally{i=t._preloads.delete(s),q(t,u),s.abort()}if(!Zt(l))return l[1];if(i&&l[0]===et&&!l[1].options.reloadDocument)return no(t,{...l[1].options,_fromLocation:r},o+1)}catch(l){K(l)||console.error(l)}}a(no,"preloadClientRoute");var lo="Error preloading route! \u261D\uFE0F";var Se=class{static{a(this,"BaseRoute")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;let o=this.options,r=!o?.path&&!o?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=tt:this.parentRoute||mt();let n=r?tt:o?.path;n&&n!=="/"&&(n=fe(n));let s=o?.id||n,u=r?tt:Pt([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);n==="__root__"&&(n="/"),u!=="__root__"&&(u=Pt(["/",u]));let i=u==="__root__"?"/":Pt([this.parentRoute.fullPath,n]);this._path=n,this._id=u,this._fullPath=i,this._to=Y(i)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>yn({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}};var uo=class extends Se{static{a(this,"BaseRootRoute")}constructor(t){super(t)}};var Pe=k(B(),1);var O=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(O||{});function Kn({update:t,notify:e,unwatched:o}){return{link:r,unlink:n,propagate:s,checkDirty:u,shallowPropagate:i};function r(c,f,d){let h=f.depsTail;if(h!==void 0&&h.dep===c)return;let m=h!==void 0?h.nextDep:f.deps;if(m!==void 0&&m.dep===c){m.version=d,f.depsTail=m;return}let g=c.subsTail;if(g!==void 0&&g.version===d&&g.sub===f)return;let p=f.depsTail=c.subsTail={version:d,dep:c,sub:f,prevDep:h,nextDep:m,prevSub:g,nextSub:void 0};m!==void 0&&(m.prevDep=p),h!==void 0?h.nextDep=p:f.deps=p,g!==void 0?g.nextSub=p:c.subs=p}function n(c,f=c.sub){let d=c.dep,h=c.prevDep,m=c.nextDep,g=c.nextSub,p=c.prevSub;return m!==void 0?m.prevDep=h:f.depsTail=h,h!==void 0?h.nextDep=m:f.deps=m,g!==void 0?g.prevSub=p:d.subsTail=p,p!==void 0?p.nextSub=g:(d.subs=g)===void 0&&o(d),m}function s(c){let f=c.nextSub,d;t:do{let h=c.sub,m=h.flags;if(m&60?m&12?m&4?!(m&48)&&l(c,h)?(h.flags=m|40,m&=1):m=0:h.flags=m&-9|32:m=0:h.flags=m|32,m&2&&e(h),m&1){let g=h.subs;if(g!==void 0){let p=(c=g).nextSub;p!==void 0&&(d={value:f,prev:d},f=p);continue}}if((c=f)!==void 0){f=c.nextSub;continue}for(;d!==void 0;)if(c=d.value,d=d.prev,c!==void 0){f=c.nextSub;continue t}break}while(!0)}function u(c,f){let d,h=0,m=!1;t:do{let g=c.dep,p=g.flags;if(f.flags&16)m=!0;else if((p&17)===17){if(t(g)){let v=g.subs;v.nextSub!==void 0&&i(v),m=!0}}else if((p&33)===33){(c.nextSub!==void 0||c.prevSub!==void 0)&&(d={value:c,prev:d}),c=g.deps,f=g,++h;continue}if(!m){let v=c.nextDep;if(v!==void 0){c=v;continue}}for(;h--;){let v=f.subs,S=v.nextSub!==void 0;if(S?(c=d.value,d=d.prev):c=v,m){if(t(f)){S&&i(v),f=c.sub;continue}m=!1}else f.flags&=-33;f=c.sub;let y=c.nextDep;if(y!==void 0){c=y;continue t}}return m}while(!0)}function i(c){do{let f=c.sub,d=f.flags;(d&48)===32&&(f.flags=d|16,(d&6)===2&&e(f))}while((c=c.nextSub)!==void 0)}function l(c,f){let d=f.depsTail;for(;d!==void 0;){if(d===c)return!0;d=d.prevDep}return!1}}a(Kn,"createReactiveSystem");function Jn(t,e,o){let r=typeof t=="object",n=r?t:void 0;return{next:(r?t.next:t)?.bind(n),error:(r?t.error:e)?.bind(n),complete:(r?t.complete:o)?.bind(n)}}a(Jn,"toObserver");var fo=[],we=0,{link:qn,unlink:ps,propagate:ms,checkDirty:Yn,shallowPropagate:Gn}=Kn({update(t){return t._update()},notify(t){fo[ho++]=t,t.flags&=~O.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=O.Mutable|O.Dirty,xe(t))}}),Re=0,ho=0,ct,po=0;function mo(t){try{++po,t()}finally{--po||go()}}a(mo,"batch");function xe(t){let e=t.depsTail,o=e!==void 0?e.nextDep:t.deps;for(;o!==void 0;)o=ps(o,t)}a(xe,"purgeDeps");function go(){if(!(po>0)){for(;Re<ho;){let t=fo[Re];fo[Re++]=void 0,t.notify()}Re=0,ho=0}}a(go,"flush");function be(t,e){let o=typeof t=="function",r=t,n={_snapshot:o?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:o?O.None:O.Mutable,get(){return ct!==void 0&&qn(n,ct,we),n._snapshot},subscribe(s){let u=Jn(s),i={current:!1},l=gs(()=>{n.get(),i.current?u.next?.(n._snapshot):i.current=!0});return{unsubscribe:a(()=>{l.stop()},"unsubscribe")}},_update(s){let u=ct,i=e?.compare??Object.is;if(o)ct=n,++we,n.depsTail=void 0;else if(s===void 0)return!1;o&&(n.flags=O.Mutable|O.RecursedCheck);try{let l=n._snapshot,c=typeof s=="function"?s(l):s===void 0&&o?r(l):s;return l===void 0||!i(l,c)?(n._snapshot=c,!0):!1}finally{ct=u,o&&(n.flags&=~O.RecursedCheck),xe(n)}}};return o?(n.flags=O.Mutable|O.Dirty,n.get=function(){let s=n.flags;if(s&O.Dirty||s&O.Pending&&Yn(n.deps,n)){if(n._update()){let u=n.subs;u!==void 0&&Gn(u)}}else s&O.Pending&&(n.flags=s&~O.Pending);return ct!==void 0&&qn(n,ct,we),n._snapshot}):n.set=function(s){if(n._update(s)){let u=n.subs;u!==void 0&&(ms(u),Gn(u),go())}},n}a(be,"createAtom");function gs(t){let e=a(()=>{let r=ct;ct=o,++we,o.depsTail=void 0,o.flags=O.Watching|O.RecursedCheck;try{return t()}finally{ct=r,o.flags&=~O.RecursedCheck,xe(o)}},"run"),o={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:O.Watching|O.RecursedCheck,notify(){let r=this.flags;r&O.Dirty||r&O.Pending&&Yn(this.deps,this)?e():this.flags=O.Watching},stop(){this.flags=O.None,this.depsTail=void 0,xe(this)}};return e(),o}a(gs,"effect");var vo=k(B(),1),Xn=k(Nr(),1);function vs(t,e){return t===e}a(vs,"defaultCompare");function W(t,e,o=vs){let r=(0,vo.useCallback)(u=>{if(!t)return()=>{};let{unsubscribe:i}=t.subscribe(u);return i},[t]),n=(0,vo.useCallback)(()=>t?.get(),[t]);return(0,Xn.useSyncExternalStoreWithSelector)(r,n,n,e,o)}a(W,"useStore");var Zn={};function yo(t,e){let o=Pe.useRef();return r=>{let n=t?.select?t.select(r):r;return t?.structuralSharing??e.options.defaultStructuralSharing?o.current=st(o.current,n):n}}a(yo,"useStructuralSharing");function X(t){let e=N(),o=Pe.useContext(t.from?jo:bt),r=t.from??o,n=e.stores.getMatchStore(r);if(!1){let i=n.get();if(!i){(t.shouldThrow??!0)&&mt();return}return t.select?t.select(i):i}let s=yo(t,e),u=W(n,i=>i?s(i):Zn);if(u!==Zn)return u;(t.shouldThrow??!0)&&mt()}a(X,"useMatch");function Ce(t){return X({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:a(e=>t.select?t.select(e.search):e.search,"select")})}a(Ce,"useSearch");var lt=k(B(),1);var Le=lt.useLayoutEffect;function Qn(t,e,o={},r){lt.useEffect(()=>{if(!t.current||r||typeof IntersectionObserver!="function")return;let n=new IntersectionObserver(([s])=>{e(s)},o);return n.observe(t.current),()=>{n.disconnect()}},[e,r,o,t])}a(Qn,"useIntersectionObserver");function tr(t){let e=lt.useRef(null);return lt.useImperativeHandle(t,()=>e.current,[]),e}a(tr,"useForwardedRef");var _o=k(B(),1);function Ee(t){let e=N();return _o.useCallback(o=>e.navigate({...o,from:o.from??t?.from}),[t?.from,e])}a(Ee,"useNavigate");var Ut=k(B(),1),nt=k(Z(),1);function Tt(t){return(0,nt.jsx)(ys,{...t})}a(Tt,"CatchBoundary");var ys=class extends Ut.Component{static{a(this,"CatchBoundaryImpl")}constructor(...t){super(...t),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(t,e){let o=t.getResetKey();return e.error&&e.resetKey!==o?{resetKey:o,error:null}:{resetKey:o}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,e){this.props.onCatch?.(t,e)}render(){let t=this.state.error;return t?Ut.createElement(this.props.errorComponent??So,{error:t,reset:this.reset}):this.props.children}};function So({error:t}){let[e,o]=Ut.useState(!1);return(0,nt.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,nt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,nt.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,nt.jsx)("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:a(()=>o(r=>!r),"onClick"),children:e?"Hide Error":"Show Error"})]}),(0,nt.jsx)("div",{style:{height:".25rem"}}),e?(0,nt.jsx)("div",{children:(0,nt.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?(0,nt.jsx)("code",{children:t.message}):null})}):null]})}a(So,"ErrorComponent");var Ro=k(B(),1),er=k(Z(),1);function or({children:t,fallback:e=null}){return(0,er.jsx)(Ro.default.Fragment,{children:wo()?t:e})}a(or,"ClientOnly");function wo(){return Ro.default.useSyncExternalStore(_s,()=>!0,()=>!1)}a(wo,"useHydrated");function _s(){return()=>{}}a(_s,"subscribe");function xo(t){return X({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:a(e=>t.select?t.select(e.loaderData):e.loaderData,"select")})}a(xo,"useLoaderData");function bo(t){let{select:e,...o}=t;return X({...o,select:a(r=>e?e(r.loaderDeps):r.loaderDeps,"select")})}a(bo,"useLoaderDeps");function Po(t){return X({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:a(e=>{let o=t.strict===!1?e.params:e._strictParams;return t.select?t.select(o):o},"select")})}a(Po,"useParams");function Co(t){return X({...t,select:a(e=>t.select?t.select(e.context):e.context,"select")})}a(Co,"useRouteContext");var U=k(B(),1);var Ss=k(Z(),1);var ar=k(Or(),1);function Lo(t){let e=U.useRef(t);return Q(e.current,t,{ignoreUndefined:!1})||(e.current=t),e.current}a(Lo,"useValueStable");function Rs(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}a(Rs,"compareLinkState");function ws(t,e,o){if(t?.external)return it(t.href,o)?void 0:t.href;if(!cr(e)&&!(typeof e!="string"||e.indexOf(":")===-1))try{return new URL(e),it(e,o)?void 0:e}catch{}}a(ws,"resolveExternalLink");function xs(t,e,o,r,n,s){if(s)return!1;if(o?.exact){if(!de(t.pathname,e.pathname,r))return!1}else{let u=vt(t.pathname,r),i=vt(e.pathname,r);if(!(u.startsWith(i)&&(u.length===i.length||u[i.length]==="/")))return!1}return(o?.includeSearch??!0)&&!Q(t.search,e.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:o?.includeHash?n&&t.hash===e.hash:!0}a(xs,"resolveIsActive");function bs(t,e){let o=N(),r=tr(e),{activeProps:n,inactiveProps:s,activeOptions:u,to:i,preload:l,preloadDelay:c,preloadIntentProximity:f,hashScrollIntoView:d,replace:h,startTransition:m,resetScroll:g,viewTransition:p,children:v,target:S,disabled:y,style:w,className:R,onClick:L,onBlur:x,onFocus:_,onMouseEnter:b,onMouseLeave:P,onTouchStart:E,ignoreBlocker:C,params:T,search:D,hash:wt,state:rt,mask:re,reloadDocument:Ds,unsafeRelative:Fs,from:As,_fromLocation:$s,...Mt}=t;if(!1){let F=cr(i);if(typeof i=="string"&&!F&&i.indexOf(":")>-1)try{return new URL(i),it(i,o.protocolAllowlist)?{...Mt,ref:r,href:void 0,...v&&{children:v},...S&&{target:S},...y&&{disabled:y},...w&&{style:w},...R&&{className:R}}:{...Mt,ref:r,href:i,...v&&{children:v},...S&&{target:S},...y&&{disabled:y},...w&&{style:w},...R&&{className:R}}}catch{}let I=o.buildLocation({...t,from:t.from}),z=ir(I.maskedLocation?I.maskedLocation.publicHref:I.publicHref,I.maskedLocation?I.maskedLocation.external:I.external,o.history,y),ft=(()=>{if(z?.external)return it(z.href,o.protocolAllowlist)?void 0:z.href;if(!F&&typeof i=="string"&&i.indexOf(":")>-1)try{return new URL(i),it(i,o.protocolAllowlist)?void 0:i}catch{}})(),Ae=(()=>{if(ft)return!1;let $=o.stores.location.get(),H=u?.exact??!1;if(H){if(!de($.pathname,I.pathname,o.basepath))return!1}else{let V=vt($.pathname,o.basepath),j=vt(I.pathname,o.basepath);if(!(V.startsWith(j)&&(V.length===j.length||V[j.length]==="/")))return!1}if((u?.includeSearch??!0)&&$.search!==I.search){let V=!$.search||typeof $.search=="object"&&!ht($.search),j=!I.search||typeof I.search=="object"&&!ht(I.search);if(!(V&&j)&&!Q($.search,I.search,{partial:!H,ignoreUndefined:!u?.explicitUndefined}))return!1}return!u?.includeHash})();if(ft)return{...Mt,ref:r,href:ft,...v&&{children:v},...S&&{target:S},...y&&{disabled:y},...w&&{style:w},...R&&{className:R}};let $e=Ae?J(n,{})??nr:Vt,Be=Ae?Vt:J(s,{})??Vt,Vo=(()=>{let $=w,H=$e.style,V=Be.style;if(!(!$&&!H&&!V))return $&&!H&&!V?$:!$&&H&&!V?H:!$&&!H&&V?V:{...$,...H,...V}})(),Wo=(()=>{let $=R,H=$e.className,V=Be.className;if(!$&&!H&&!V)return"";let j="";return $&&(j=$),H&&(j=j?`${j} ${H}`:H),V&&(j=j?`${j} ${V}`:V),j})();return{...Mt,...$e,...Be,href:z?.href,ref:r,disabled:!!y,target:S,...Vo&&{style:Vo},...Wo&&{className:Wo},...y&&rr,...Ae&&sr}}let Oe=wo(),Cr=Lo(t.search),Lr=Lo(t.params),No=Lo(u),Ht=U.useMemo(()=>t,[o,t.from,t._fromLocation,t.hash,t.to,Cr,Lr,t.state,t.mask,t.unsafeRelative]),Er=U.useCallback(F=>{let I=o.buildLocation({_fromLocation:F,...Ht}),z=ir(I.maskedLocation?I.maskedLocation.publicHref:I.publicHref,I.maskedLocation?I.maskedLocation.external:I.external,o.history,y),ft=ws(z,i,o.protocolAllowlist);return[z?.href,ft,xs(F,I,No,o.basepath,Oe,ft!==void 0)]},[No,y,Oe,Ht,o,i]),[kr,Ne,De]=W(o.stores.location,Er,Rs),se=De?J(n,{})??nr:Vt,ie=De?Vt:J(s,{})??Vt,Do=[R,se.className,ie.className].filter(Boolean).join(" "),Fo=(w||se.style||ie.style)&&{...w,...se.style,...ie.style},[Ir,Ao]=U.useState(!1),$o=U.useRef(!1),Ot=t.reloadDocument||Ne?!1:l??o.options.defaultPreload,Fe=c??o.options.defaultPreloadDelay??0,xt=U.useCallback(()=>{o.preloadRoute(Ht).catch(F=>{console.warn(F),console.warn(lo)})},[o,Ht]);Qn(r,U.useCallback(F=>{F?.isIntersecting&&xt()},[xt]),Cs,!!y||Ot!=="viewport"),U.useEffect(()=>{$o.current||!y&&Ot==="render"&&(xt(),$o.current=!0)},[y,xt,Ot]);let Tr=a(F=>{let I=F.currentTarget.getAttribute("target"),z=S!==void 0?S:I;if(!y&&!Ls(F)&&!F.defaultPrevented&&(!z||z==="_self")&&F.button===0){F.preventDefault(),(0,ar.flushSync)(()=>{Ao(!0)});let ft=o.subscribe("onResolved",()=>{ft(),Ao(!1)});o.navigate({...Ht,replace:h,resetScroll:g,hashScrollIntoView:d,startTransition:m,viewTransition:p,ignoreBlocker:C})}},"handleClick");if(Ne)return{...Mt,ref:r,href:Ne,...v&&{children:v},...S&&{target:S},...y&&{disabled:y},...w&&{style:w},...R&&{className:R},...L&&{onClick:L},...x&&{onBlur:x},..._&&{onFocus:_},...b&&{onMouseEnter:b},...P&&{onMouseLeave:P},...E&&{onTouchStart:E}};let Bo=a(F=>{if(y||Ot!=="intent")return;if(!Fe){xt();return}let I=F.currentTarget;if(ee.has(I))return;let z=setTimeout(()=>{ee.delete(I),xt()},Fe);ee.set(I,z)},"enqueueIntentPreload"),Mr=a(F=>{y||Ot!=="intent"||xt()},"handleTouchStart"),Uo=a(F=>{if(y||!Ot||!Fe)return;let I=F.currentTarget,z=ee.get(I);z&&(clearTimeout(z),ee.delete(I))},"handleLeave");return{...Mt,...se,...ie,href:kr,ref:r,onClick:Wt([L,Tr]),onBlur:Wt([x,Uo]),onFocus:Wt([_,Bo]),onMouseEnter:Wt([b,Bo]),onMouseLeave:Wt([P,Uo]),onTouchStart:Wt([E,Mr]),disabled:!!y,target:S,...Fo&&{style:Fo},...Do&&{className:Do},...y&&rr,...De&&sr,...Oe&&Ir&&Ps}}a(bs,"useLinkProps");var Vt={},nr={className:"active"},rr={role:"link","aria-disabled":!0},sr={"data-status":"active","aria-current":"page"},Ps={"data-transitioning":"transitioning"},ee=new WeakMap,Cs={rootMargin:"100px"},Wt=a(t=>e=>{for(let o of t)if(o){if(e.defaultPrevented)return;o(e)}},"composeHandlers");function ir(t,e,o,r){if(!r)return e?{href:t,external:!0}:{href:o.createHref(t)||"/",external:!1}}a(ir,"getHrefOption");function cr(t){if(typeof t!="string")return!1;let e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}a(cr,"isSafeInternal");var Eo=U.forwardRef((t,e)=>{let{_asChild:o,...r}=t,{type:n,...s}=bs(r,e),u=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!o){let{disabled:i,...l}=s;return U.createElement("a",l,u)}return U.createElement(o,s,u)});function Ls(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}a(Ls,"isCtrlEvent");var ko=k(B(),1),Io=k(Z(),1);var lr=class extends Se{static{a(this,"Route")}constructor(t){super(t),this.useMatch=e=>X({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Co({...e,from:this.id}),this.useSearch=e=>Ce({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Po({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>bo({...e,from:this.id}),this.useLoaderData=e=>xo({...e,from:this.id}),this.useNavigate=()=>Ee({from:this.fullPath}),this.Link=ko.default.forwardRef((e,o)=>(0,Io.jsx)(Eo,{ref:o,from:this.fullPath,...e}))}};function Es(t){return new lr(t)}a(Es,"createRoute");var ur=class extends uo{static{a(this,"RootRoute")}constructor(t){super(t),this.useMatch=e=>X({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Co({...e,from:this.id}),this.useSearch=e=>Ce({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Po({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>bo({...e,from:this.id}),this.useLoaderData=e=>xo({...e,from:this.id}),this.useNavigate=()=>Ee({from:this.fullPath}),this.Link=ko.default.forwardRef((e,o)=>(0,Io.jsx)(Eo,{ref:o,from:this.fullPath,...e}))}};function ks(t){return new ur(t)}a(ks,"createRootRoute");var Bc=k(B(),1);var ke=k(Z(),1);function fr(t){let e=N();if(!1){let r=`not-found-${e.stores.location.get().pathname}-${e.stores.status.get()}`;return(0,ke.jsx)(Tt,{getResetKey:a(()=>r,"getResetKey"),onCatch:a((n,s)=>{if(K(n))t.onCatch?.(n,s);else throw n},"onCatch"),errorComponent:a(({error:n})=>{if(K(n))return t.fallback?.(n);throw n},"errorComponent"),children:t.children})}let o=`not-found-${W(e.stores.location,r=>r.pathname)}-${W(e.stores.status,r=>r)}`;return(0,ke.jsx)(Tt,{getResetKey:a(()=>o,"getResetKey"),onCatch:a((r,n)=>{if(K(r))t.onCatch?.(r,n);else throw r},"onCatch"),errorComponent:a(({error:r})=>{if(K(r))return t.fallback?.(r);throw r},"errorComponent"),children:t.children})}a(fr,"CatchNotFound");function dr(){return(0,ke.jsx)("p",{children:"Not Found"})}a(dr,"DefaultGlobalNotFound");var hr=k(Z(),1);function pr({children:t}){let e=N();return null}a(pr,"ScriptOnce");var Kc=k(B(),1),Ie=k(Z(),1);function Rt(t){return(0,Ie.jsx)(Ie.Fragment,{children:t.children})}a(Rt,"SafeFragment");var Yc=k(B(),1),Te=k(Z(),1);function To(t,e,o){return e.options.notFoundComponent?(0,Te.jsx)(e.options.notFoundComponent,{...o}):t.options.defaultNotFoundComponent?(0,Te.jsx)(t.options.defaultNotFoundComponent,{...o}):(0,Te.jsx)(dr,{})}a(To,"renderRouteNotFound");var gr=k(Z(),1);function mr(t){return null}a(mr,"getScrollRestorationScriptForRouter");function vr(){let t=mr(N());return t?(0,gr.jsx)(pr,{children:t}):null}a(vr,"ScrollRestoration");var G=k(B(),1);var A=k(Z(),1);function oe(t,e){let o=e?.options.pendingComponent??t.options.defaultPendingComponent;return o?(0,A.jsx)(o,{}):null}a(oe,"renderPending");var Is=a((t,e)=>t[0]===e[0]&&t[1]===e[1],"outletMatchSelectionEqual"),Me=G.memo(a(function({routeId:e}){let o=N();return(0,A.jsx)(yr,{router:o,match:W(o.stores.getMatchStore(e),r=>r)})},"MatchImpl"));function yr({router:t,match:e}){let o=t.routesById[e.routeId],r=oe(t,o),n=o.options.errorComponent??t.options.defaultErrorComponent,s=o.options.onCatch??t.options.defaultOnCatch,u=o.isRoot?o.options.notFoundComponent??t.options.notFoundRoute?.options.component:o.options.notFoundComponent,i=e.ssr===!1||e.ssr==="data-only",l=o.options.wrapInSuspense??r??(o.options.errorComponent?.preload||i)?G.Suspense:Rt,c=n?Tt:Rt,f=u?fr:Rt;return(0,A.jsxs)(o.isRoot?o.options.shellComponent??Rt:Rt,{children:[(0,A.jsx)(bt.Provider,{value:e.routeId,children:(0,A.jsx)(l,{fallback:r,children:(0,A.jsx)(c,{getResetKey:a(()=>e,"getResetKey"),errorComponent:n,onCatch:a((d,h)=>{if(K(d))throw d.routeId??=e.routeId,d;s?.(d,h)},"onCatch"),children:(0,A.jsx)(f,{fallback:a(d=>{if(d.routeId??=e.routeId,d.routeId!==e.routeId)throw d;return G.createElement(u,d)},"fallback"),children:i?(0,A.jsx)(or,{fallback:r,children:(0,A.jsx)(_r,{match:e})}):(0,A.jsx)(_r,{match:e})})})})}),null]})}a(yr,"MatchView");var _r=G.memo(a(function({match:e}){let o=N(),r=e.routeId,n=o.routesById[r],s=G.useMemo(()=>{let i=(n.options.remountDeps??o.options.defaultRemountDeps)?.({routeId:r,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[r,e.loaderDeps,e._strictParams,e._strictSearch,n.options.remountDeps,o.options.defaultRemountDeps]),u=G.useMemo(()=>{let i=n.options.component??o.options.defaultComponent;return i?(0,A.jsx)(i,{},s):(0,A.jsx)(Sr,{})},[s,n.options.component,o.options.defaultComponent]);if(e.status==="pending"){if(o._tx)throw o._tx[5];return oe(o,n)}if(e.status==="notFound")return To(o,n,e.error);if(e.status==="error"){if(!1)return(0,A.jsx)((n.options.errorComponent??o.options.defaultErrorComponent)||So,{error:e.error,reset:void 0,info:{componentStack:""}});throw e.error}return u},"MatchInnerImpl")),Sr=G.memo(a(function(){let e=N(),o=G.useContext(bt),r,n,s;if(!1){let i=e.stores.matches.get(),l=i.findIndex(f=>f.routeId===o),c=i[l];r=!!c._notFound,n=c.error,s=i[l+1]?.routeId}else{let i=e.stores.getMatchStore(o);[r,n]=W(i,l=>[!!l._notFound,l.error],Is),s=W(e.stores.ids,l=>l[l.indexOf(o)+1])}if(r)return To(e,e.routesById[o],n);if(!s)return null;let u=(0,A.jsx)(Me,{routeId:s});return o===tt?(0,A.jsx)(G.Suspense,{fallback:oe(e),children:u}):u},"OutletImpl"));var Mo=k(B(),1);function Oo(t,e){let o=t[1];t.length=0,o?.(e)}a(Oo,"settleOwner");function Rr({t}){let e=N(),o=e._rendered??=[],r=void 0;return e.startTransition=(n,s)=>new Promise((u,i)=>{Oo(o,!1),o.push(s,u),t(e),Mo.startTransition(()=>{try{n()}catch(l){o[1]===u&&(o.length=0),i(l)}})}),Le(()=>{let n=e.history.subscribe(e.load);if(r?.current)return n;r&&(r.current=!0),e.updateLatestLocation();let s=e.latestLocation,u=e.buildLocation({to:s.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Y(s.publicHref)!==Y(u.publicHref))return e.commitLocation({...u,replace:!0,ignoreBlocker:!0}),n;let i=e.stores.resolvedLocation.get();return i?.href===s.href&&i.state.__TSR_key===s.state.__TSR_key?o.push(e.stores.matches.get(),l=>{l&&e.emit({type:"onRendered",...Ct(i,i)})}):e._tx||e.load().catch(console.error),n},[e,e.history]),null}a(Rr,"Transitioner");var zt=k(B(),1);var ot=k(Z(),1);function wr(){let t=N(),e=t.routesById[tt],o=oe(t,e),r=t.ssr?Rt:zt.Suspense,n=(0,ot.jsxs)(ot.Fragment,{children:[!!1&&(0,ot.jsx)(Rr,{t:zt.useState()[1]}),(0,ot.jsx)(r,{fallback:o,children:(0,ot.jsx)(Ts,{})})]});return t.options.InnerWrap?(0,ot.jsx)(t.options.InnerWrap,{children:n}):n}a(wr,"Matches");function Ts(){let t=N(),e=t._rendered,o=W(t.stores.matches,u=>e[0]??u),r=o[0],n=r?.routeId;Le(()=>{e[0]===o&&Oo(e,!0)},[e,o]);let s=n?(0,ot.jsx)(Me,{routeId:n}):null;return(0,ot.jsx)(bt.Provider,{value:n,children:t.options.disableGlobalCatchBoundary?s:(0,ot.jsx)(Tt,{getResetKey:a(()=>r,"getResetKey"),onCatch:void 0,children:s})})}a(Ts,"MatchesInner");var xr=a(t=>({createMutableStore:be,createReadonlyStore:be,batch:mo}),"getStoreFactory");var Ms=a(t=>new br(t),"createRouter"),br=class extends oo{static{a(this,"Router")}constructor(t){super(t,xr)}};var Kl=k(B(),1),ne=k(Z(),1);function Pr({router:t,children:e,...o}){ht(o)&&t.update({...t.options,...o,context:{...t.options.context,...o.context}});let r=(0,ne.jsx)(ae.Provider,{value:t,children:e});return t.options.Wrap?(0,ne.jsx)(t.options.Wrap,{children:r}):r}a(Pr,"RouterContextProvider");function Os({router:t,...e}){return(0,ne.jsx)(Pr,{router:t,...e,children:(0,ne.jsx)(wr,{})})}a(Os,"RouterProvider");function Ns(t){let e=N({warn:t?.router===void 0}),o=t?.router||e;if(!1){let r=o.stores.__store.get();return t?.select?t.select(r):r}return W(o.stores.__store,yo(t,o))}a(Ns,"useRouterState");export{to as a,es as b,N as c,Ce as d,Ee as e,Es as f,ks as g,Sr as h,Ms as i,Os as j,Ns as k};
@@ -0,0 +1 @@
1
+ import{a as h}from"./chunk-BQK2C2Z4.js";import{a as e}from"./chunk-R5ZTCHCE.js";var m=e((i,o,s)=>h(i,t=>{o(t.height>0?t:{height:s,width:t.width})}),"s");export{m as a};
@@ -0,0 +1 @@
1
+ import{a as n,d as v,f as N,g as z,i as k}from"./chunk-R5ZTCHCE.js";var y=v(N(),1);var u=v(z(),1);var C={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"},I={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"},A=n(j=>{let e=(0,y.c)(18),{className:i,children:c,label:b,onClose:r,panelTestId:f,testId:g,variant:h}=j,o;e[0]!==r?(o=n(s=>{s.target===s.currentTarget&&r()},"r"),e[0]=r,e[1]=o):o=e[1];let m=o,t;e[2]!==r?(t=n(s=>{s.key==="Escape"&&r()},"a"),e[2]=r,e[3]=t):t=e[3];let p=t,x=C[h],w=I[h],l;e[4]!==i||e[5]!==w?(l=k(w,i),e[4]=i,e[5]=w,e[6]=l):l=e[6];let a;e[7]!==c||e[8]!==b||e[9]!==f||e[10]!==l?(a=(0,u.jsx)("div",{"aria-label":b,className:l,"data-testid":f,role:"dialog",children:c}),e[7]=c,e[8]=b,e[9]=f,e[10]=l,e[11]=a):a=e[11];let d;return e[12]!==m||e[13]!==p||e[14]!==x||e[15]!==a||e[16]!==g?(d=(0,u.jsx)("div",{className:x,"data-testid":g,onClick:m,onKeyDown:p,role:"presentation",children:a}),e[12]=m,e[13]=p,e[14]=x,e[15]=a,e[16]=g,e[17]=d):d=e[17],d},"_");export{A as a};
@@ -0,0 +1 @@
1
+ import{a as H}from"./chunk-WUW4ZHRL.js";import{b as x}from"./chunk-SPDZUX4P.js";import"./chunk-7PIHTTND.js";import{b as z}from"./chunk-YUWMB6EV.js";import{f as O}from"./chunk-TBXK3FKP.js";import"./chunk-RCZTUWG3.js";import{a as _}from"./chunk-UANVABQG.js";import{a as q,b as B,c as E,d as S,e as i,f as s}from"./chunk-L4EZAHCD.js";import{a as A,e as L}from"./chunk-IYWVSMAY.js";import{d as W}from"./chunk-6ZPTNC34.js";import"./chunk-VYW2PAWC.js";import{a as R,d as M,f as $,g as D}from"./chunk-R5ZTCHCE.js";var I=M($(),1);var n=M(D(),1);var F=2e3,G=new Set(["open"]),ie=R(Q=>{let e=(0,I.c)(41),{read:y}=Q,t=W(),j=O(),v;e[0]!==j||e[1]!==y?(v=R(()=>Promise.resolve(y?y():j.debug()),"T"),e[0]=j,e[1]=y,e[2]=v):v=e[2];let V=v,K=y?"injected":"live",b;e[3]!==K?(b=["lunora-studio","sync-client-debug",K],e[3]=K,e[4]=b):b=e[4];let{data:c,refetch:Y}=z(b,V);if(H(Y,!0,F),!c){let r;e[5]!==t?(r=t("Reading the sync client's state\u2026"),e[5]=t,e[6]=r):r=e[6];let g;e[7]!==t?(g=t("Sync client"),e[7]=t,e[8]=g):g=e[8];let T;return e[9]!==r||e[10]!==g?(T=(0,n.jsx)(A,{children:(0,n.jsx)(L,{children:(0,n.jsx)(_,{description:r,title:g})})}),e[9]=r,e[10]=g,e[11]=T):T=e[11],T}let{pendingWrites:k,shards:N,subscriptions:w}=c,a;e[12]!==t?(a=t("This Studio session's sync client"),e[12]=t,e[13]=a):a=e[13];let l;e[14]!==a?(l=(0,n.jsx)("span",{className:"text-sm font-medium",children:a}),e[14]=a,e[15]=l):l=e[15];let P=c.connectionStatus==="connected"?"default":"secondary",o;e[16]!==c.connectionStatus||e[17]!==P?(o=(0,n.jsx)(x,{variant:P,children:c.connectionStatus}),e[16]=c.connectionStatus,e[17]=P,e[18]=o):o=e[18];let d;e[19]!==k||e[20]!==t?(d=k>0?(0,n.jsx)(x,{variant:"secondary",children:t("{count} pending writes",{count:k})}):null,e[19]=k,e[20]=t,e[21]=d):d=e[21];let h;e[22]!==l||e[23]!==o||e[24]!==d?(h=(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[l,o,d]}),e[22]=l,e[23]=o,e[24]=d,e[25]=h):h=e[25];let u;e[26]!==t?(u=t("Reads client.debug() for the client running in this page \u2014 not your application's client. Call client.debug() in your app to diagnose a specific stuck overlay there."),e[26]=t,e[27]=u):u=e[27];let m;e[28]!==u?(m=(0,n.jsx)("p",{className:"text-muted-foreground text-xs",children:u}),e[28]=u,e[29]=m):m=e[29];let p;e[30]!==N||e[31]!==t?(p=N.length===0?(0,n.jsx)(_,{description:t("No shard connection has been opened yet."),title:t("No shards")}):(0,n.jsxs)(q,{children:[(0,n.jsx)(B,{children:(0,n.jsxs)(S,{children:[(0,n.jsx)(i,{children:t("Shard")}),(0,n.jsx)(i,{children:t("Socket")}),(0,n.jsx)(i,{children:t("Confirmed watermark")})]})}),(0,n.jsx)(E,{children:N.map(r=>(0,n.jsxs)(S,{children:[(0,n.jsx)(s,{children:r.shardKey??t("(default)")}),(0,n.jsx)(s,{children:(0,n.jsx)(x,{variant:G.has(r.wsState)?"default":"secondary",children:r.wsState})}),(0,n.jsx)(s,{children:r.confirmedMutationWatermark})]},r.shardKey??"__default__"))})]}),e[30]=N,e[31]=t,e[32]=p):p=e[32];let f;e[33]!==w||e[34]!==t?(f=w.length===0?(0,n.jsx)(_,{description:t("This client holds no live queries or shapes."),title:t("No subscriptions")}):(0,n.jsxs)(q,{children:[(0,n.jsx)(B,{children:(0,n.jsxs)(S,{children:[(0,n.jsx)(i,{children:t("Subscription")}),(0,n.jsx)(i,{children:t("Kind")}),(0,n.jsx)(i,{children:t("Acked")}),(0,n.jsx)(i,{children:t("Cursor")}),(0,n.jsx)(i,{children:t("Pending overlays")})]})}),(0,n.jsx)(E,{children:w.map(r=>(0,n.jsxs)(S,{children:[(0,n.jsx)(s,{className:"font-mono text-xs",children:r.functionPath}),(0,n.jsx)(s,{children:r.kind}),(0,n.jsx)(s,{children:(0,n.jsx)(x,{variant:r.acked?"default":"secondary",children:r.acked?t("yes"):t("no")})}),(0,n.jsx)(s,{children:r.serverCursor??"\u2014"}),(0,n.jsx)(s,{children:r.pendingOptimisticLayers})]},r.id))})]}),e[33]=w,e[34]=t,e[35]=f):f=e[35];let C;return e[36]!==m||e[37]!==p||e[38]!==f||e[39]!==h?(C=(0,n.jsx)(A,{children:(0,n.jsxs)(L,{className:"flex flex-col gap-4",children:[h,m,p,f]})}),e[36]=m,e[37]=p,e[38]=f,e[39]=h,e[40]=C):C=e[40],C},"ie");export{ie as default};