@lunora/studio 1.0.0-alpha.31 → 1.0.0-alpha.310

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 (467) hide show
  1. package/LICENSE.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/index.d.mts +1581 -0
  4. package/dist/index.d.ts +974 -806
  5. package/dist/index.mjs +1 -0
  6. package/dist/mount.d.mts +22 -0
  7. package/dist/mount.d.ts +11 -10
  8. package/dist/mount.mjs +1 -0
  9. package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -0
  10. package/dist/packem_chunks/ApiTab.mjs +1 -0
  11. package/dist/packem_chunks/AuditPanel.mjs +1 -0
  12. package/dist/packem_chunks/DeploymentHealthPanel.mjs +1 -0
  13. package/dist/packem_chunks/ExportImportPanel.mjs +3 -0
  14. package/dist/packem_chunks/FileBrowser.mjs +4 -0
  15. package/dist/packem_chunks/FunctionRunner.mjs +1 -0
  16. package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -0
  17. package/dist/packem_chunks/HealthPanel.mjs +1 -0
  18. package/dist/packem_chunks/InsightsPanel.mjs +1 -0
  19. package/dist/packem_chunks/LogsPanel.mjs +1 -0
  20. package/dist/packem_chunks/MailPanel.mjs +2 -0
  21. package/dist/packem_chunks/MetricsPanel.mjs +1 -0
  22. package/dist/packem_chunks/NotificationsPanel.mjs +1 -0
  23. package/dist/packem_chunks/PitrPanel.mjs +1 -0
  24. package/dist/packem_chunks/SchemaViewer.mjs +1 -0
  25. package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -0
  26. package/dist/packem_chunks/SettingsPanel.mjs +1 -0
  27. package/dist/packem_chunks/SqlEditorPanel.mjs +10 -0
  28. package/dist/packem_chunks/TableEditor.mjs +1 -0
  29. package/dist/packem_chunks/agents-panel.mjs +1 -0
  30. package/dist/packem_chunks/ai-usage-panel.mjs +1 -0
  31. package/dist/packem_chunks/analytics-panel.mjs +1 -0
  32. package/dist/packem_chunks/architecture-panel.mjs +1 -0
  33. package/dist/packem_chunks/auth-audit-panel.mjs +1 -0
  34. package/dist/packem_chunks/auth-config-panel.mjs +1 -0
  35. package/dist/packem_chunks/auth-sessions-panel.mjs +1 -0
  36. package/dist/packem_chunks/containers-panel.mjs +1 -0
  37. package/dist/packem_chunks/dashboards-panel.mjs +1 -0
  38. package/dist/packem_chunks/evals-panel.mjs +1 -0
  39. package/dist/packem_chunks/fanout-panel.mjs +1 -0
  40. package/dist/packem_chunks/flags-panel.mjs +1 -0
  41. package/dist/packem_chunks/issues-panel.mjs +1 -0
  42. package/dist/packem_chunks/kv-browser.mjs +1 -0
  43. package/dist/packem_chunks/log-drains-panel.mjs +4 -0
  44. package/dist/packem_chunks/migrations-route.mjs +1 -0
  45. package/dist/packem_chunks/organizations-panel.mjs +1 -0
  46. package/dist/packem_chunks/payments-panel.mjs +1 -0
  47. package/dist/packem_chunks/permissions-panel.mjs +1 -0
  48. package/dist/packem_chunks/privacy-requests-panel.mjs +1 -0
  49. package/dist/packem_chunks/queues-panel.mjs +1 -0
  50. package/dist/packem_chunks/reactors-panel.mjs +1 -0
  51. package/dist/packem_chunks/rls-panel.mjs +1 -0
  52. package/dist/packem_chunks/schedule-panel.mjs +1 -0
  53. package/dist/packem_chunks/sparkline.mjs +1 -0
  54. package/dist/packem_chunks/storage-rules-panel.mjs +1 -0
  55. package/dist/packem_chunks/subscriptions-panel.mjs +1 -0
  56. package/dist/packem_chunks/sync-client-panel.mjs +1 -0
  57. package/dist/packem_chunks/traces-panel.mjs +1 -0
  58. package/dist/packem_chunks/users-panel.mjs +1 -0
  59. package/dist/packem_chunks/vector-browser.mjs +1 -0
  60. package/dist/packem_chunks/workflows-panel.mjs +1 -0
  61. package/dist/packem_shared/ADMIN_FUNCTIONS-B8yyk5BX.mjs +1 -0
  62. package/dist/packem_shared/ApiDocsPanel-fhDlZGE4.mjs +2 -0
  63. package/dist/packem_shared/ApiReferencePanel-nAf8tNRr.mjs +1 -0
  64. package/dist/packem_shared/CommandPalette-D9ZY-qQd.mjs +1 -0
  65. package/dist/packem_shared/ConfirmButton-DU4p72Er.mjs +1 -0
  66. package/dist/packem_shared/ConnectionBadge-B8Hj5DaE.mjs +1 -0
  67. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-DuULO4XM.mjs +1 -0
  68. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs +1 -0
  69. package/dist/packem_shared/DEFAULT_LOCALE-A1Yg5ORA.mjs +1 -0
  70. package/dist/packem_shared/DataBrowser-E68QfaST.mjs +4 -0
  71. package/dist/packem_shared/DataFilters-CYZFt2EK.mjs +1 -0
  72. package/dist/packem_shared/ErrorBoundary-BWNF98VF.mjs +1 -0
  73. package/dist/packem_shared/GlobalDataBrowser-DhObcZDY.mjs +1 -0
  74. package/dist/packem_shared/HomePanel-CUuYsApa.mjs +1 -0
  75. package/dist/packem_shared/MigrationsPanel-CkVIwAbK.mjs +1 -0
  76. package/dist/packem_shared/OpenRpcReferencePanel-BxEr49D9.mjs +1 -0
  77. package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.mjs +1 -0
  78. package/dist/packem_shared/ScheduledJobs-BZNcYWBP.mjs +1 -0
  79. package/dist/packem_shared/ShardInput-C6mjgAh4.mjs +1 -0
  80. package/dist/packem_shared/Studio-CZjQXFHC.mjs +1 -0
  81. package/dist/packem_shared/StudioApp-C9ENwcOH.mjs +1 -0
  82. package/dist/packem_shared/StudioI18nProvider-fVsCSs5L.mjs +1 -0
  83. package/dist/packem_shared/advisor-view-DzI2RQhY.mjs +1 -0
  84. package/dist/packem_shared/aggregateMetrics-DKFJc-o5.mjs +1 -0
  85. package/dist/packem_shared/alert-PB5W11MM.mjs +1 -0
  86. package/dist/packem_shared/app.d-D7vL0y8y.d.mts +349 -0
  87. package/dist/packem_shared/app.d-D7vL0y8y.d.ts +349 -0
  88. package/dist/packem_shared/auth-pager-DiDnXsfe.mjs +1 -0
  89. package/dist/packem_shared/badge-r_5B4LHP.mjs +1 -0
  90. package/dist/packem_shared/bar-chart-BCsEIQoQ.mjs +6 -0
  91. package/dist/packem_shared/browser-storage-BH1MxLZs.mjs +1 -0
  92. package/dist/packem_shared/button-q0UYSmrn.mjs +1 -0
  93. package/dist/packem_shared/card-By2O8ULa.mjs +1 -0
  94. package/dist/packem_shared/cf-links-CBJ5SywP.mjs +1 -0
  95. package/dist/packem_shared/checkbox-CnS9cyCz.mjs +1 -0
  96. package/dist/packem_shared/control-button-BOZ5K-FC.mjs +1 -0
  97. package/dist/packem_shared/data-grid-DIiNmDR9.mjs +1 -0
  98. package/dist/packem_shared/data-view-params-DhYmAkcj.mjs +1 -0
  99. package/dist/packem_shared/diagram-export-panel-D5CVNJkp.mjs +2 -0
  100. package/dist/packem_shared/dropdown-menu-jLZenfWH.mjs +2 -0
  101. package/dist/packem_shared/empty-state-D7jEML_T.mjs +1 -0
  102. package/dist/packem_shared/error-alert-DueSEkt-.mjs +1 -0
  103. package/dist/packem_shared/grid-features-OVIMIQan.mjs +6 -0
  104. package/dist/packem_shared/grid-pagination-DgzyzfBh.mjs +1 -0
  105. package/dist/packem_shared/home-panel-BcE8S2Nn.mjs +3 -0
  106. package/dist/packem_shared/input-CXhxesPC.mjs +1 -0
  107. package/dist/packem_shared/internal-Df43vQI0.mjs +2 -0
  108. package/dist/packem_shared/label-DKFzyHq6.mjs +1 -0
  109. package/dist/packem_shared/live-status-BuJdUZFU.mjs +1 -0
  110. package/dist/packem_shared/log-fields-BolUoZ9g.mjs +1 -0
  111. package/dist/packem_shared/log-line-CICyJ_kc.mjs +1 -0
  112. package/dist/packem_shared/metrics-format-1sNGG47R.mjs +1 -0
  113. package/dist/packem_shared/modal-shell-CDztwLnv.mjs +1 -0
  114. package/dist/packem_shared/operation-console-provider-DoloEvon.mjs +1 -0
  115. package/dist/packem_shared/recording-client-CyFiAE2l.mjs +1 -0
  116. package/dist/packem_shared/reference-view-CIHyURU6.mjs +13 -0
  117. package/dist/packem_shared/schema-diagram-C5oilX7l.mjs +2 -0
  118. package/dist/packem_shared/scroll-area-CXCQH7VT.mjs +2 -0
  119. package/dist/packem_shared/select-DPyS18Vy.mjs +2 -0
  120. package/dist/packem_shared/shard-history-CaO3C4KQ.mjs +1 -0
  121. package/dist/packem_shared/shortcuts-B9gDaXmw.mjs +1 -0
  122. package/dist/packem_shared/skeleton-DX1gfixl.mjs +1 -0
  123. package/dist/packem_shared/sparkline-B_sPPO_8.mjs +1 -0
  124. package/dist/packem_shared/sql-result-table-DyK762_A.mjs +1 -0
  125. package/dist/packem_shared/stat-card-BAv73QtB.mjs +1 -0
  126. package/dist/packem_shared/storage-tier-C2mKwYRj.mjs +1 -0
  127. package/dist/packem_shared/studio-fK2DTLde.mjs +2 -0
  128. package/dist/packem_shared/table-D0SBiDu-.mjs +2 -0
  129. package/dist/packem_shared/table-list-sidebar-DkPO_Qtz.mjs +1 -0
  130. package/dist/packem_shared/textarea--40GKAyz.mjs +1 -0
  131. package/dist/packem_shared/trace-handoff-BV3EWqy_.mjs +1 -0
  132. package/dist/packem_shared/use-admin-query-tlBof8Yg.mjs +1 -0
  133. package/dist/packem_shared/use-admin-spec-Bir7V68L.mjs +1 -0
  134. package/dist/packem_shared/use-async-submit-CZqCMTJ_.mjs +1 -0
  135. package/dist/packem_shared/use-auth-config-Z_n4ABCI.mjs +1 -0
  136. package/dist/packem_shared/use-mirrored-ref-CVDf2z1M.mjs +1 -0
  137. package/dist/packem_shared/use-open-trace-DMVhpnyG.mjs +1 -0
  138. package/dist/packem_shared/use-shard-key-BsP3o5wT.mjs +1 -0
  139. package/dist/packem_shared/use-sql-assistant-CZydTzd5.mjs +1 -0
  140. package/dist/packem_shared/useDebounced-DVeQ5-oW.mjs +1 -0
  141. package/dist/packem_shared/utils-bhneXptQ.mjs +1 -0
  142. package/dist/packem_shared/virtual-rect-D_j7aLxX.mjs +1 -0
  143. package/dist/standalone/chunk-225UTWUC.js +2 -0
  144. package/dist/standalone/chunk-253UHWDX.js +1 -0
  145. package/dist/standalone/chunk-2D5PY4GN.js +1 -0
  146. package/dist/standalone/chunk-2I4NHEKA.js +1 -0
  147. package/dist/standalone/chunk-2IKDEUCX.js +1 -0
  148. package/dist/standalone/chunk-2R4BRJGM.js +1 -0
  149. package/dist/standalone/chunk-2SJZZH4H.js +1 -0
  150. package/dist/standalone/chunk-2VA5S3IA.js +1 -0
  151. package/dist/standalone/chunk-37WYCOQ2.js +1 -0
  152. package/dist/standalone/chunk-3GWYCFNE.js +1 -0
  153. package/dist/standalone/chunk-3PZCWECC.js +1 -0
  154. package/dist/standalone/chunk-3QX3JY3V.js +1 -0
  155. package/dist/standalone/chunk-3YXASVTP.js +1 -0
  156. package/dist/standalone/chunk-4IGNK2QW.js +1 -0
  157. package/dist/standalone/chunk-4WD4XGC3.js +1 -0
  158. package/dist/standalone/chunk-4ZEL6BYL.js +1 -0
  159. package/dist/standalone/chunk-55UGUCQ6.js +1 -0
  160. package/dist/standalone/chunk-5B2RTXBS.js +1 -0
  161. package/dist/standalone/chunk-5LZ7ITPY.js +1 -0
  162. package/dist/standalone/chunk-5QR2SQIS.js +1 -0
  163. package/dist/standalone/chunk-6HLARDYO.js +1 -0
  164. package/dist/standalone/chunk-6QTAHSDD.js +1 -0
  165. package/dist/standalone/chunk-6RUR4ENY.js +1 -0
  166. package/dist/standalone/chunk-7474UICL.js +1 -0
  167. package/dist/standalone/chunk-76BXZLNG.js +1 -0
  168. package/dist/standalone/chunk-7DQRMMWU.js +3 -0
  169. package/dist/standalone/chunk-7G4Z6Q7X.js +1 -0
  170. package/dist/standalone/chunk-7RKB5KS7.js +1 -0
  171. package/dist/standalone/chunk-7RPU77RS.js +1 -0
  172. package/dist/standalone/chunk-7Y3SY37W.js +1 -0
  173. package/dist/standalone/chunk-AD2DJJC3.js +1 -0
  174. package/dist/standalone/chunk-AD7GTQBR.js +1 -0
  175. package/dist/standalone/chunk-APSLOGDM.js +1 -0
  176. package/dist/standalone/chunk-AUAECCXB.js +1 -0
  177. package/dist/standalone/{chunk-BJGBHGK3.js → chunk-AUGKHAMQ.js} +1 -1
  178. package/dist/standalone/chunk-AV7OEKJ6.js +9 -0
  179. package/dist/standalone/chunk-AVACONK5.js +1 -0
  180. package/dist/standalone/chunk-BOMPSVRC.js +1 -0
  181. package/dist/standalone/chunk-BSHTZR6K.js +1 -0
  182. package/dist/standalone/chunk-BV2EBCUX.js +1 -0
  183. package/dist/standalone/chunk-CCDX5RYT.js +1 -0
  184. package/dist/standalone/chunk-CGQMJYCW.js +1 -0
  185. package/dist/standalone/chunk-CVXNHIQW.js +1 -0
  186. package/dist/standalone/chunk-D4ZXRW2I.js +5 -0
  187. package/dist/standalone/chunk-E4PXACVL.js +3 -0
  188. package/dist/standalone/chunk-ECY2JC5F.js +1 -0
  189. package/dist/standalone/chunk-F7GN7PFX.js +1 -0
  190. package/dist/standalone/chunk-FPI7AMQJ.js +1 -0
  191. package/dist/standalone/chunk-FUGLFWLW.js +1 -0
  192. package/dist/standalone/chunk-FUYEZFBP.js +1 -0
  193. package/dist/standalone/chunk-FWNCU5GC.js +8 -0
  194. package/dist/standalone/chunk-G74GIEU4.js +1 -0
  195. package/dist/standalone/chunk-GD2NG5PX.js +1 -0
  196. package/dist/standalone/chunk-GHQ2VDI2.js +1 -0
  197. package/dist/standalone/chunk-GHZ2JWYN.js +1 -0
  198. package/dist/standalone/chunk-H3BZ3JO6.js +1 -0
  199. package/dist/standalone/chunk-HCTJKP5J.js +1 -0
  200. package/dist/standalone/chunk-HJHSQPHW.js +19 -0
  201. package/dist/standalone/chunk-HXBFXMPI.js +4 -0
  202. package/dist/standalone/chunk-I26MS5PJ.js +1 -0
  203. package/dist/standalone/chunk-IEDJDJCP.js +1 -0
  204. package/dist/standalone/chunk-IFEMFSLN.js +1 -0
  205. package/dist/standalone/chunk-IWZ7GVQO.js +1 -0
  206. package/dist/standalone/chunk-IY6US3YF.js +1 -0
  207. package/dist/standalone/chunk-JH36CKFQ.js +1 -0
  208. package/dist/standalone/chunk-JQXA2OYK.js +1 -0
  209. package/dist/standalone/chunk-JRGRIQ7P.js +14 -0
  210. package/dist/standalone/chunk-JX6TE3LZ.js +1 -0
  211. package/dist/standalone/chunk-JZGTSH2C.js +4 -0
  212. package/dist/standalone/chunk-K6564T6V.js +1 -0
  213. package/dist/standalone/chunk-K72WUXVL.js +1 -0
  214. package/dist/standalone/chunk-KB4LDWU5.js +1 -0
  215. package/dist/standalone/chunk-L254SW7Y.js +1 -0
  216. package/dist/standalone/chunk-M2FQTDR4.js +1 -0
  217. package/dist/standalone/chunk-M2ZMWQFY.js +1 -0
  218. package/dist/standalone/chunk-MOC6MEKG.js +15 -0
  219. package/dist/standalone/chunk-MVS7RWFI.js +1 -0
  220. package/dist/standalone/chunk-MVWZMWPD.js +1 -0
  221. package/dist/standalone/chunk-MWIKSOHW.js +1 -0
  222. package/dist/standalone/chunk-NCPW7WHO.js +1 -0
  223. package/dist/standalone/chunk-NDTQTKDX.js +6 -0
  224. package/dist/standalone/chunk-NGVP66OH.js +1 -0
  225. package/dist/standalone/chunk-NQZALRU3.js +1 -0
  226. package/dist/standalone/chunk-NRP22GKC.js +1 -0
  227. package/dist/standalone/chunk-NXGPDLDU.js +1 -0
  228. package/dist/standalone/chunk-NXQW5E6W.js +1 -0
  229. package/dist/standalone/chunk-OPM7ESDV.js +1 -0
  230. package/dist/standalone/chunk-OQ6I6OXT.js +2 -0
  231. package/dist/standalone/chunk-OSGXNEFA.js +1 -0
  232. package/dist/standalone/chunk-OYCUPD3Q.js +1 -0
  233. package/dist/standalone/chunk-PIMTWCRD.js +1 -0
  234. package/dist/standalone/chunk-PJSLU6LL.js +1 -0
  235. package/dist/standalone/chunk-Q6ED4KUL.js +1 -0
  236. package/dist/standalone/chunk-Q6IT6ZD7.js +1 -0
  237. package/dist/standalone/chunk-QAQDMS6R.js +1 -0
  238. package/dist/standalone/chunk-QBE5USC3.js +1 -0
  239. package/dist/standalone/chunk-QEMJIJCD.js +1 -0
  240. package/dist/standalone/chunk-QJLHH3ET.js +1 -0
  241. package/dist/standalone/chunk-QPTUTBNA.js +1 -0
  242. package/dist/standalone/chunk-QSF3YY7X.js +59 -0
  243. package/dist/standalone/chunk-R6U22RSY.js +1 -0
  244. package/dist/standalone/chunk-RGMVGZV4.js +1 -0
  245. package/dist/standalone/chunk-RHRUDVZJ.js +1 -0
  246. package/dist/standalone/chunk-RWVIV3U7.js +1 -0
  247. package/dist/standalone/chunk-S4Z7K55A.js +1 -0
  248. package/dist/standalone/chunk-SA2OGF3F.js +1 -0
  249. package/dist/standalone/chunk-SFDYCSQW.js +1 -0
  250. package/dist/standalone/chunk-SJQERRSZ.js +1 -0
  251. package/dist/standalone/chunk-SV764LKQ.js +1 -0
  252. package/dist/standalone/chunk-SZCVCB4X.js +3 -0
  253. package/dist/standalone/chunk-TPHEVTCW.js +1 -0
  254. package/dist/standalone/chunk-UC7MNI2F.js +1 -0
  255. package/dist/standalone/chunk-UYEZR3BI.js +1 -0
  256. package/dist/standalone/chunk-V24V4CZ4.js +1 -0
  257. package/dist/standalone/chunk-VCFEO3RI.js +1 -0
  258. package/dist/standalone/chunk-VESGIGMQ.js +1 -0
  259. package/dist/standalone/chunk-VGL7ERWQ.js +15 -0
  260. package/dist/standalone/chunk-VS4MTIRN.js +1 -0
  261. package/dist/standalone/chunk-VXEC3UCO.js +1 -0
  262. package/dist/standalone/chunk-WJRYEML4.js +1 -0
  263. package/dist/standalone/chunk-WOBRELSS.js +1 -0
  264. package/dist/standalone/chunk-XGCIDUJF.js +1 -0
  265. package/dist/standalone/chunk-XHRKNCCI.js +1 -0
  266. package/dist/standalone/chunk-XL2AUAZA.js +1 -0
  267. package/dist/standalone/chunk-XOFQMNBS.js +1 -0
  268. package/dist/standalone/chunk-Y3AYVFTK.js +1 -0
  269. package/dist/standalone/chunk-YPWBHX2E.js +1 -0
  270. package/dist/standalone/chunk-YVNIQ7OG.js +1 -0
  271. package/dist/standalone/chunk-YVR4SEPU.js +1 -0
  272. package/dist/standalone/chunk-Z22BDS6N.js +1 -0
  273. package/dist/standalone/chunk-ZKJS6EBE.js +1 -0
  274. package/dist/standalone/chunk-ZQPAHCMA.js +1 -0
  275. package/dist/standalone/chunk-ZYKSTQC7.js +1 -0
  276. package/dist/standalone/studio.js +9 -214
  277. package/dist/styles.css +2 -2
  278. package/package.json +26 -21
  279. package/dist/index.js +0 -41
  280. package/dist/mount.js +0 -26
  281. package/dist/packem_chunks/ApiTab.js +0 -251
  282. package/dist/packem_chunks/AuditPanel.js +0 -200
  283. package/dist/packem_chunks/ExportImportPanel.js +0 -197
  284. package/dist/packem_chunks/FileBrowser.js +0 -2932
  285. package/dist/packem_chunks/FunctionRunner.js +0 -343
  286. package/dist/packem_chunks/FunctionStatsPanel.js +0 -375
  287. package/dist/packem_chunks/HealthPanel.js +0 -648
  288. package/dist/packem_chunks/InsightsPanel.js +0 -461
  289. package/dist/packem_chunks/LogsPanel.js +0 -827
  290. package/dist/packem_chunks/MailPanel.js +0 -440
  291. package/dist/packem_chunks/MetricsPanel.js +0 -1344
  292. package/dist/packem_chunks/MigrationsPanel.js +0 -239
  293. package/dist/packem_chunks/PitrPanel.js +0 -252
  294. package/dist/packem_chunks/SchemaViewer.js +0 -2512
  295. package/dist/packem_chunks/SecurityAdvisorPanel.js +0 -92
  296. package/dist/packem_chunks/SettingsPanel.js +0 -390
  297. package/dist/packem_chunks/SqlEditorPanel.js +0 -2322
  298. package/dist/packem_chunks/TableEditor.js +0 -313
  299. package/dist/packem_chunks/analytics-panel.js +0 -261
  300. package/dist/packem_chunks/auth-config-panel.js +0 -179
  301. package/dist/packem_chunks/auth-sessions-panel.js +0 -175
  302. package/dist/packem_chunks/containers-panel.js +0 -247
  303. package/dist/packem_chunks/dashboards-panel.js +0 -779
  304. package/dist/packem_chunks/fanout-panel.js +0 -481
  305. package/dist/packem_chunks/flags-panel.js +0 -176
  306. package/dist/packem_chunks/kv-browser.js +0 -1896
  307. package/dist/packem_chunks/log-drains-panel.js +0 -273
  308. package/dist/packem_chunks/organizations-panel.js +0 -670
  309. package/dist/packem_chunks/payments-panel.js +0 -185
  310. package/dist/packem_chunks/permissions-panel.js +0 -804
  311. package/dist/packem_chunks/queues-panel.js +0 -147
  312. package/dist/packem_chunks/rls-panel.js +0 -313
  313. package/dist/packem_chunks/schedule-panel.js +0 -831
  314. package/dist/packem_chunks/sparkline.js +0 -79
  315. package/dist/packem_chunks/storage-rules-panel.js +0 -138
  316. package/dist/packem_chunks/subscriptions-panel.js +0 -236
  317. package/dist/packem_chunks/users-panel.js +0 -1265
  318. package/dist/packem_chunks/vector-browser.js +0 -281
  319. package/dist/packem_chunks/workflows-panel.js +0 -562
  320. package/dist/packem_shared/ADMIN_FUNCTIONS-CdaxLGkE.js +0 -48
  321. package/dist/packem_shared/ApiDocsPanel-B6u_wnz-.js +0 -842
  322. package/dist/packem_shared/ApiReferencePanel-Drz4UO0a.js +0 -230
  323. package/dist/packem_shared/CommandPalette-B5BertvU.js +0 -373
  324. package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
  325. package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
  326. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
  327. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
  328. package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
  329. package/dist/packem_shared/DataBrowser-ANTHLWWh.js +0 -4493
  330. package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
  331. package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
  332. package/dist/packem_shared/GlobalDataBrowser-CjgTG_wa.js +0 -289
  333. package/dist/packem_shared/HomePanel-BRcQVDby.js +0 -14
  334. package/dist/packem_shared/OpenRpcReferencePanel-CspFdbUT.js +0 -192
  335. package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
  336. package/dist/packem_shared/ScheduledJobs-BEJXtsBn.js +0 -262
  337. package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
  338. package/dist/packem_shared/Studio-B1V0GxTz.js +0 -16
  339. package/dist/packem_shared/StudioApp-CR0Tvy81.js +0 -657
  340. package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
  341. package/dist/packem_shared/advisor-view-DzqyvUU3.js +0 -159
  342. package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
  343. package/dist/packem_shared/app.d-CNLRTrWw.d.ts +0 -300
  344. package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
  345. package/dist/packem_shared/bar-chart-Bb__F5-u.js +0 -3245
  346. package/dist/packem_shared/browser-storage-d03UsV7v.js +0 -249
  347. package/dist/packem_shared/button-BhsN2uZH.js +0 -49
  348. package/dist/packem_shared/card-DURq3ElK.js +0 -175
  349. package/dist/packem_shared/cf-links-BZfRdxSE.js +0 -8
  350. package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
  351. package/dist/packem_shared/data-grid-Dsg6nRjo.js +0 -183
  352. package/dist/packem_shared/data-view-params-Cd6yRVbv.js +0 -96
  353. package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
  354. package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
  355. package/dist/packem_shared/grid-features-D7nNzBYm.js +0 -745
  356. package/dist/packem_shared/home-panel-CRIs6x2j.js +0 -1639
  357. package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
  358. package/dist/packem_shared/internal-FcNZ3beb.js +0 -68
  359. package/dist/packem_shared/label-D8ykjn5J.js +0 -46
  360. package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
  361. package/dist/packem_shared/modal-shell-hyaJvIJ6.js +0 -100
  362. package/dist/packem_shared/reference-view-Doy1XlQq.js +0 -2140
  363. package/dist/packem_shared/select-UkNYCT3s.js +0 -273
  364. package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
  365. package/dist/packem_shared/skeleton-CGhL0p20.js +0 -45
  366. package/dist/packem_shared/sparkline-KgMPHS4u.js +0 -93
  367. package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
  368. package/dist/packem_shared/studio-CQ-rtNhn.js +0 -4013
  369. package/dist/packem_shared/table-DsCa9Qp9.js +0 -246
  370. package/dist/packem_shared/table-list-sidebar-VMo0ftxD.js +0 -832
  371. package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
  372. package/dist/packem_shared/use-admin-query-BViPA3US.js +0 -105
  373. package/dist/packem_shared/use-auth-capabilities-BHkoBnbZ.js +0 -32
  374. package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
  375. package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
  376. package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
  377. package/dist/standalone/chunk-2DS7JLWL.js +0 -13
  378. package/dist/standalone/chunk-2K47A3P6.js +0 -1
  379. package/dist/standalone/chunk-2NGUNNGW.js +0 -1
  380. package/dist/standalone/chunk-2PDQ4KZ6.js +0 -1
  381. package/dist/standalone/chunk-3BP4BTLR.js +0 -4
  382. package/dist/standalone/chunk-3OA7PECS.js +0 -6
  383. package/dist/standalone/chunk-45QK5ZPN.js +0 -1
  384. package/dist/standalone/chunk-4QHKBC77.js +0 -1
  385. package/dist/standalone/chunk-57LYXHXH.js +0 -1
  386. package/dist/standalone/chunk-5NSZVXCS.js +0 -1
  387. package/dist/standalone/chunk-5OIBXYZM.js +0 -1
  388. package/dist/standalone/chunk-63XKJQTQ.js +0 -1
  389. package/dist/standalone/chunk-6RC6L33K.js +0 -4
  390. package/dist/standalone/chunk-6VTGE3WJ.js +0 -1
  391. package/dist/standalone/chunk-7PBZKXYA.js +0 -1
  392. package/dist/standalone/chunk-7POIIWC5.js +0 -3
  393. package/dist/standalone/chunk-7RYIQKZA.js +0 -1
  394. package/dist/standalone/chunk-7TJJXVSE.js +0 -1
  395. package/dist/standalone/chunk-AB6QGMBF.js +0 -1
  396. package/dist/standalone/chunk-AHILM3ZP.js +0 -1
  397. package/dist/standalone/chunk-AQGOX5DK.js +0 -1
  398. package/dist/standalone/chunk-ASLGNHAX.js +0 -1
  399. package/dist/standalone/chunk-BHTPZS7L.js +0 -4
  400. package/dist/standalone/chunk-D6ORSB24.js +0 -1
  401. package/dist/standalone/chunk-DGWTR4G7.js +0 -1
  402. package/dist/standalone/chunk-DSX53PBM.js +0 -1
  403. package/dist/standalone/chunk-DV2MNASX.js +0 -1
  404. package/dist/standalone/chunk-DWDILV2E.js +0 -1
  405. package/dist/standalone/chunk-EGJX34WM.js +0 -1
  406. package/dist/standalone/chunk-FCR3HKFV.js +0 -1
  407. package/dist/standalone/chunk-FKO3HO6I.js +0 -4
  408. package/dist/standalone/chunk-FQKNJSRA.js +0 -76
  409. package/dist/standalone/chunk-G2TFEWEQ.js +0 -4
  410. package/dist/standalone/chunk-GTM65MVX.js +0 -1
  411. package/dist/standalone/chunk-GZXPPJVK.js +0 -1
  412. package/dist/standalone/chunk-HFBRE65A.js +0 -1
  413. package/dist/standalone/chunk-HG7Q5B3H.js +0 -1
  414. package/dist/standalone/chunk-HTQL7AXU.js +0 -1
  415. package/dist/standalone/chunk-HV7G6DFP.js +0 -5
  416. package/dist/standalone/chunk-ITLLHEVG.js +0 -1
  417. package/dist/standalone/chunk-J6J54MBP.js +0 -1
  418. package/dist/standalone/chunk-JSEXCW5Q.js +0 -1
  419. package/dist/standalone/chunk-KEGAWN6Y.js +0 -1
  420. package/dist/standalone/chunk-KG3QTFWE.js +0 -1
  421. package/dist/standalone/chunk-KGS7KM4A.js +0 -2
  422. package/dist/standalone/chunk-KNRVPCFX.js +0 -1
  423. package/dist/standalone/chunk-KODWGUAB.js +0 -1
  424. package/dist/standalone/chunk-KZ6INM5M.js +0 -1
  425. package/dist/standalone/chunk-LZWPCZLE.js +0 -1
  426. package/dist/standalone/chunk-N2QDG3MW.js +0 -1
  427. package/dist/standalone/chunk-N4JI6VQD.js +0 -1
  428. package/dist/standalone/chunk-NNISYDNI.js +0 -1
  429. package/dist/standalone/chunk-O4PXDNR3.js +0 -1
  430. package/dist/standalone/chunk-O77VNUFD.js +0 -1
  431. package/dist/standalone/chunk-OD2POGPJ.js +0 -1
  432. package/dist/standalone/chunk-OXCK3ZUG.js +0 -1
  433. package/dist/standalone/chunk-P7DSVO4U.js +0 -1
  434. package/dist/standalone/chunk-PKAM3N5C.js +0 -1
  435. package/dist/standalone/chunk-QGXGBHQO.js +0 -1
  436. package/dist/standalone/chunk-QHA3TAEJ.js +0 -1
  437. package/dist/standalone/chunk-QQWC62X7.js +0 -1
  438. package/dist/standalone/chunk-RMYA7NAH.js +0 -1
  439. package/dist/standalone/chunk-RRCPZMC2.js +0 -22
  440. package/dist/standalone/chunk-S53RUBW5.js +0 -1
  441. package/dist/standalone/chunk-SB4GT6PK.js +0 -1
  442. package/dist/standalone/chunk-SEU5V7I6.js +0 -1
  443. package/dist/standalone/chunk-SHIOUDOT.js +0 -1
  444. package/dist/standalone/chunk-SIDRSX7Y.js +0 -1
  445. package/dist/standalone/chunk-SVR644RF.js +0 -1
  446. package/dist/standalone/chunk-TAD43CG5.js +0 -1
  447. package/dist/standalone/chunk-TBMYIZIO.js +0 -1
  448. package/dist/standalone/chunk-TICVNLPM.js +0 -1
  449. package/dist/standalone/chunk-TQ36RWOP.js +0 -1
  450. package/dist/standalone/chunk-UGMRUEBU.js +0 -1
  451. package/dist/standalone/chunk-UII66UVF.js +0 -1
  452. package/dist/standalone/chunk-VJPQUBN6.js +0 -8
  453. package/dist/standalone/chunk-VLXV72QE.js +0 -1
  454. package/dist/standalone/chunk-VMJKJWG6.js +0 -1
  455. package/dist/standalone/chunk-VPDPN5RR.js +0 -2
  456. package/dist/standalone/chunk-VSEGZA3J.js +0 -1
  457. package/dist/standalone/chunk-VXBZQIGY.js +0 -4
  458. package/dist/standalone/chunk-W5LWN6IP.js +0 -1
  459. package/dist/standalone/chunk-W7PCVQTE.js +0 -1
  460. package/dist/standalone/chunk-W7SQVLBH.js +0 -1
  461. package/dist/standalone/chunk-XLILSHPE.js +0 -1
  462. package/dist/standalone/chunk-XURNGQSS.js +0 -1
  463. package/dist/standalone/chunk-YJGANMU7.js +0 -18
  464. package/dist/standalone/chunk-YQQJ4N6U.js +0 -1
  465. package/dist/standalone/chunk-ZH7UES4T.js +0 -2
  466. package/dist/standalone/chunk-ZPUO7FNI.js +0 -1
  467. package/dist/standalone/chunk-ZQCVDXDL.js +0 -1
@@ -0,0 +1,2 @@
1
+ import{b as fr}from"./chunk-SJQERRSZ.js";import{a,d as F,e as V,g as Z}from"./chunk-I26MS5PJ.js";var Oo=F(V(),1),te=Oo.createContext(null);var No=F(V(),1);function M(t){let e=No.useContext(te);return e||void 0,e}a(M,"useRouter");var Ie=F(V(),1),Nt=Ie.createContext(void 0),Fo=Ie.createContext(void 0);function tt(t){return t[t.length-1]}a(tt,"last");function pt(t,e){return typeof t=="function"?t(e):t}a(pt,"functionalUpdate");var oe=Object.prototype.hasOwnProperty;function Ft(t){for(let e in t)if(oe.call(t,e))return!0;return!1}a(Ft,"hasKeys");var Tt=a(()=>Object.create(null),"createNull"),mt=a((t,e)=>Q(t,e,!0),"nullReplaceEqualDeep");function Q(t,e,o,n=0){if(!1)return e;if(t===e)return t;if(n++>500)return e;let r=Array.isArray(t)&&Array.isArray(e);if(!r&&!(ee(t)&&ee(e)))return e;let i=Object.keys(t),s=i.length,c=Object.keys(e),l=c.length;if(r?s!==t.length||l!==e.length||s&&tt(i)!==`${s-1}`||l&&tt(c)!==`${l-1}`:s!==Object.getOwnPropertyNames(t).length||l!==Object.getOwnPropertyNames(e).length||Object.getOwnPropertySymbols(e).length)return e;let u=0,f,d,h;if(r){for(;u<l&&(h=u,d=t[h],f=e[h],f=d===f?d:typeof d=="object"?Q(d,f,o,n):f,f===d);u++);if(u===l&&s===l)return t}else{let m=s===l,g=!0;for(;u<l;u++){h=c[u],d=t[h];let S=e[h];f=d===S?d:typeof d=="object"?Q(d,S,o,n):S,m&&=f===d&&(i[u]===h||oe.call(t,h)),g&&=Object.is(f,S),i[u]=f}if(m)return Object.getOwnPropertySymbols(t).length?e:t;if(g)return e}let p=r?c.fill(0):o?Tt():{};for(let m=0;m<l;m++)h=r?m:c[m],r?(d=t[h],m>u&&(f=e[h],f=d===f?d:typeof d=="object"?Q(d,f,o,n):f),p[h]=m<u?d:f):p[h]=i[m];return p}a(Q,"replaceEqualDeep");function ee(t){return!t||typeof t!="object"?!1:(Object.getPrototypeOf(t)?.constructor??Object)===Object}a(ee,"isPlainObject");function J(t,e,o,n){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0,i=t.length;r<i;r++){let s=t[r],c=e[r];if(s!==c&&!J(s,c,o,n))return!1}return!0}if(ee(t)&&ee(e)){if(o){for(let i in e)if((n||e[i]!==void 0)&&!J(t[i],e[i],o,n))return!1;return!0}let r=0;if(n)r=Object.keys(t).length;else for(let i in t)t[i]!==void 0&&r++;for(let i in e)if((n||e[i]!==void 0)&&(r--===0||!J(t[i],e[i],o,n)))return!1;return r===0}return!1}a(J,"deepEqual");var dr=/[\x00-\x1f\x7f"<>`{}]/g;function hr(t){return t.replace(dr,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}a(hr,"sanitizePathSegment");function To(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 hr(e)}a(To,"decodeSegment");var Oe=["http:","https:","mailto:","tel:"];function st(t){if(t[0]!=="/"&&t.includes(":"))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(t)?.[1]?.replace(/[\t\n\r]/g,"").toLowerCase()}a(st,"getUrlScheme");var Ne=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Mt(t,e){if(!t)return!1;if(Ne.test(t))return!0;let o=st(t);return o?!e.has(o):!1}a(Mt,"isDangerousProtocol");function xt(t){if(!t)return t;let e=t;if(/[%\\\x00-\x1f\x7f]/.test(t)){let o=/%25|%5C/gi,n=0,r;for(e="";(r=o.exec(t))!==null;)e+=To(t.slice(n,r.index))+r[0],n=o.lastIndex;e+=To(n?t.slice(n):t)}return e}a(xt,"decodePath");function Mo(t){return/[\s\u0080-\uFFFF]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}a(Mo,"encodePathLikeUrl");function Do(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(Do,"arraysEqual");function ut(){throw new Error("Invariant failed")}a(ut,"invariant");function it(t){return t.replace(/\/{2,}/g,"/")}a(it,"cleanPath");function ne(t){return t==="/"?t:t.replace(/^\/+/,"")}a(ne,"trimPathLeft");function U(t){let e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/+$/,""):t}a(U,"trimPathRight");function Dt(t){return U(ne(t))}a(Dt,"trimPath");function re(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}a(re,"removeTrailingSlash");function se(t,e,o="never",n){if(e.includes("//")&&(e=it(e)),e.startsWith("/"))return e.length===1||o==="preserve"?e:o==="always"?e.endsWith("/")?e:`${e}/`:e.endsWith("/")?e.slice(0,-1):e;let r=e===".",i;if(n){i=r?t:t+"\0"+e;let u=n.get(i);if(u)return u}let s;if(r)s=t.split("/");else{for(t.includes("//")&&(t=it(t)),s=t.split("/");s.length>1&&tt(s)==="";)s.pop();let u=e.split("/");for(let f=0,d=u.length;f<d;f++){let h=u[f];h===""?f?f===d-1&&s.push(h):s=[h]:h===".."?s.length>1?s.pop():s=[""]:h==="."||s.push(h)}}s.length>1&&(tt(s)===""?o==="never"&&s.pop():o==="always"&&s.push(""));let c=s.join("/"),l=(r?it(c):c)||"/";return i&&n&&n.set(i,l),l}a(se,"resolvePath");function Ao(t){let e=new Map(t.map(n=>[encodeURIComponent(n),n])),o=new RegExp([...e.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return n=>n.replace(o,r=>e.get(r)??r)}a(Ao,"compileDecodeCharMap");function pr(t){return t==null||t===""}a(pr,"isMissingSplat");function mr(t,e,o){if(typeof e!="string")return""+(e??void 0);let n=t==="_splat";if(n&&(!e||/^[a-zA-Z0-9\-._~!/]*$/.test(e)))return e;let r=encodeURIComponent(e);return n&&(r=r.replaceAll("%2F","/")),o?o(r):r}a(mr,"encodeParam");function ie(t,e,o,n,r){let i=t.endsWith("/")?"/":"",s="";for(let c of e){if(typeof c=="string"){s+=c;continue}let[l,u,f,d]=c,h=l===2,p=h&&d!==void 0?d+i:d,m=o[u];if(!(l===3&&m==null)){if(r&&(r[u]=m,h&&(r["*"]=m)),h&&pr(m)){if(f==="/"&&!p)continue;m=""}s+=f+mr(u,m,n)+(p||"")}}return s+i||"/"}a(ie,"interpolatePath");function q(t){return t?.isNotFound===!0}a(q,"isNotFound");function gr(){try{return sessionStorage}catch{return}}a(gr,"getSafeSessionStorage");var yr="tsr-scroll-restoration-v1_3",Vo=gr();function vr(){try{return JSON.parse(Vo?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}a(vr,"createScrollRestorationCache");var bt=vr(),$o="data-scroll-restoration-id",Sr=a(t=>t.state.__TSR_key||t.href,"defaultGetScrollRestorationKey");function Rr(t){let e=t.getAttribute($o);if(e)return`[${$o}="${e}"]`;let o="",n=t,r;for(;r=n.parentNode;){let i=1,s=n;for(;s=s.previousElementSibling;)i++;let c=`${n.localName}:nth-child(${i})`;o=o?`${c} > ${o}`:c,n=r}return o}a(Rr,"getScrollRestorationSelector");var ae=!1,ce="window";function Fe(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}a(Fe,"getElement");function Bo(t){let e=new Set;for(let o of t){if(o===ce)continue;let n=Fe(o);n&&e.add(n)}return e}a(Bo,"getScrollToTopElements");function Ho(t,e){let o=e??t.options.scrollRestoration,n=t._scroll;if(o&&(n.e=!0),!1)return;let r=t.options.getScrollRestorationKey||Sr,i=new Set,s=a(c=>{let l=bt[c]||={};for(let u of i)u===document?l[ce]={scrollX,scrollY}:u.isConnected&&(l[Rr(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})},"snapshotCurrentScrollTargets");o&&!n.s&&(n.s=!0,ae=!1,history.scrollRestoration="manual",document.addEventListener("scroll",c=>{ae||i.add(c.target)},!0),t.subscribe("onBeforeLoad",c=>{c.fromLocation&&s(r(c.fromLocation)),i.clear()}),addEventListener("pagehide",()=>{history.scrollRestoration="auto",s(r(t.stores.resolvedLocation.get()??t.stores.location.get()));try{Vo?.setItem(yr,JSON.stringify(bt))}catch{}}),addEventListener("pageshow",c=>{c.persisted&&(history.scrollRestoration="manual")})),!n.r&&(n.r=!0,t.subscribe("onRendered",c=>{let l=t.options.scrollRestorationBehavior,u=t.options.scrollToTopSelectors,f=n.n,d=n.h,h;if(i.clear(),n.n=!0,n.h=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;let p=r(c.toLocation),m=c.fromLocation&&r(c.fromLocation);if(n.e&&m&&m!==p){let g=bt[m];if(g){let S=bt[p];for(let y in g){if(y===ce){if(f)continue}else{let R=Fe(y);if(!R||f&&u&&(h??=Bo(u),h.has(R)))continue}S||(S=bt[p]={}),S[y]??=g[y]}}}ae=!0;try{let g=c.toLocation.hash,S=c.toLocation.state.__hashScrollIntoViewOptions??!0,y=!1;if(f){!g&&u&&(h??=Bo(u));let R=g&&S&&d,b=n.e?bt[p]:void 0;if(b)for(let x in b){let{scrollX:P,scrollY:_}=b[x];if(x===ce){if(R)continue;scrollTo({top:_,left:P,behavior:l}),y=!0}else{let v=Fe(x);v&&(v.scrollLeft=P,v.scrollTop=_,h?.delete(v))}}if(!g){let x={top:0,left:0,behavior:l};if(y||scrollTo(x),h)for(let P of h)P.scrollTo(x)}}!y&&g&&S&&document.getElementById(g)?.scrollIntoView(S)}finally{ae=!1}}))}a(Ho,"setupScrollRestoration");function zo(t,e=String){let o;for(let n in t){let r=t[n];r!==void 0&&(o||=new URLSearchParams).set(n,e(r))}return o?o.toString():""}a(zo,"encode");function Te(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}a(Te,"toValue");function Uo(t){let e=new URLSearchParams(t),o=Object.create(null);for(let[n,r]of e.entries()){let i=o[n];i==null?o[n]=Te(r):Array.isArray(i)?i.push(Te(r)):o[n]=[i,Te(r)]}return o}a(Uo,"decode");var Wo=/^(?:\s|["[{\d-]|fa|nu|tr)/,jo=_r(JSON.parse),Ko=wr(JSON.stringify,JSON.parse);function _r(t){let e=t===JSON.parse;return o=>{o[0]==="?"&&(o=o.substring(1));let n=Uo(o);for(let r in n){let i=n[r];if(typeof i=="string"){if(e&&!Wo.test(i))continue;try{n[r]=t(i)}catch{}}}return n}}a(_r,"parseSearchWith");function wr(t,e){let o=e===JSON.parse;function n(r){if(r&&typeof r=="object")try{return t(r)}catch{}else if(e&&typeof r=="string"){if(o&&!Wo.test(r))return r;try{return e(r),t(r)}catch{}}return r}return a(n,"stringifyValue"),r=>{let i=zo(r,n);return i?`?${i}`:""}}a(wr,"stringifySearchWith");var Y="__root__";function qo(t){t.statusCode=t.statusCode||t.code||307;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(qo,"redirect");function le(t){return t instanceof Response&&!!t.options}a(le,"isRedirect");function Ct(t){let e=new Map,o,n;return{get(r){let i=e.get(r);if(i)return i.visited=!0,i.value},set(r,i){let s=e.get(r);if(s){s.value=i;return}if(e.size>=t){let l=o?.next().value;for(;!l||l.visited;)l?l.visited=!1:o=e.values(),l=o.next().value;l===n&&(o=void 0),e.delete(l.key)}let c={key:r,value:i,visited:!1};n=c,e.set(r,c)},clear(){e.clear(),o=void 0,n=void 0}}}a(Ct,"createSieveCache");var ft=4,Jo=5;function xr(t){let e=t.names;if(e)return e;let o=[];for(let n of t)typeof n!="string"&&o.push(n[1]);return t.names=o}a(xr,"getParamNames");function br(t,e,o){let n=t.substring(e,o);if(n.charCodeAt(0)===36)return n.length===1?[2,"_splat","",void 0]:[1,n.substring(1),"",""];let r=n.indexOf("{");if(r>=0){let i=n.indexOf("}",r),s=n.charCodeAt(r+1)===45,c=r+(s?3:2);if(i>=0&&n.charCodeAt(c-1)===36&&(!s||c<i)){let l=n.substring(c,i);return[s?3:l?1:2,l||"_splat",n.substring(0,r),t.substring(e+i+1,l?o:t.length)]}}return n}a(br,"parseSegment");function Pt(t,e,o,n,r,i){let s=o,c=e.fullPath??e.from,l=e.options,u=c.length,f=c.endsWith("/")?u-1:u,d=l?.caseSensitive??t,h=l?.params?.parse??l?.parseParams,p,m=i?o-1:0;if(!n||c.includes("$")){p=i?.slice()??[];let y=tt(p);y&&typeof y!="string"&&y[0]===2&&(p[p.length-1]=[y[0],y[1],y[2],y[3]===void 0?void 0:y[3]+c.substring(o-(c[o-2]==="/"?2:1),f)],m=u)}for(;s<u;){let y=s,R=c.indexOf("/",y),b=R===-1?u:R,x=br(c,y,b);s=b+1;let P;if(typeof x=="string"){if(!n)continue;let _=x,v;d?v=n.static??=new Map:(_=x.toLowerCase(),v=n.staticInsensitive??=new Map);let w=v.get(_);if(w)P=w;else{let E=gt(n);P=E,v.set(_,E)}}else{let _=x[0],v=x[2],w=x[3]??"";if(_===2&&(b=u,s=b+1),p&&m<b&&(m<y-1&&p.push(c.substring(m,y-1)),x[2]="/"+v,_===2&&x[3]!==void 0&&f<u&&(x[3]=w.slice(0,-1)),p.push(x),m=b),!n)continue;let E=d&&!!(v||w);d||(v=v.toLowerCase(),w=w.toLowerCase());let L=_===1?n.dynamic??=[]:_===3?n.optional??=[]:n.wildcard??=[],k=_!==2&&!h&&L.find(C=>!C.parse&&C.caseSensitive===E&&C.prefix===v&&C.suffix===w);if(k)P=k;else{let C=gt(n,_,E,v,w);P=C,L.push(C),L.length===2&&r?.push(L)}}n=P}p&&m<f&&p.push(c.substring(m,f));let g=p?.slice();if(!n)return g;if(h&&e.children&&!e.isRoot&&e.id&&e.id.charCodeAt(e.id.lastIndexOf("/")+1)===95){let y=gt(n,Jo);(n.pathless??=[]).push(y),n=y}let S=(e.path||!e.children)&&!e.isRoot;if(S&&f<u){let y=gt(n,ft);n.index=y,n=y}return n.parse=h??null,n.priority=l?.params?.priority??0,n.route||(n.data=g,S&&(n.route=e)),[n,s,g]}a(Pt,"parseSegments");function Yo(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(Yo,"sortDynamic");function gt(t,e=0,o,n,r){return{kind:e,depth:t?t.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:t,parse:null,priority:0,caseSensitive:o,prefix:n,suffix:r}}a(gt,"createSegmentNode");function Xo(t,e){let o=gt(),n=[];function r(i,s,c,l){let[u,f,d]=Pt(!1,i,s,c,n,l);if(i.children)for(let h of i.children)r(h,f,u,d)}a(r,"visit");for(let i of t)r(i,1,o);for(let i of n)i.sort(Yo);e.masksTree=o,e.flatCache=Ct(1e3)}a(Xo,"processRouteMasks");function Zo(t,e){t||="/";let o=e.flatCache.get(t);if(o!==void 0)return o;let n=Me(t,e.masksTree);return e.flatCache.set(t,n),n}a(Zo,"findFlatMatch");function Qo(t,e,o,n,r){t||="/",n||="/";let i=e?`case\0${t}`:t,s=r.singleCache.get(i);return s||(s=gt(),Pt(e,{from:t},1,s),r.singleCache.set(i,s)),Me(n,s,o)}a(Qo,"findSingleMatch");function tn(t,e,o=!1){let n=o?t:`nofuzz\0${t}`,r=e.matchCache.get(n);if(r!==void 0)return r;t||="/";let i;try{i=Me(t,e.segmentTree,o)}catch(s){if(s instanceof URIError)i=null;else throw s}return i&&(i.branch=De(i.route)),e.matchCache.set(n,i),i}a(tn,"findRouteMatch");function en(t,e=!1){let o=gt(),n=[],r={},i={},s=0;function c(l,u,f,d){if(l.init(s),l.id in r&&ut(),r[l.id]=l,s!==0&&l.path){let g=U(l.fullPath);(!i[g]||l.fullPath.endsWith("/"))&&(i[g]=l)}s++;let[h,p,m]=Pt(e,l,u,f,n,d);if(l._interpolation=m,l.children)for(let g of l.children)c(g,p,h,m)}a(c,"visit"),c(t,1,o);for(let l of n)l.sort(Yo);return{processedTree:{segmentTree:o,singleCache:Ct(1e3),matchCache:Ct(1e3),flatCache:null,masksTree:null},routesById:r,routesByPath:i}}a(en,"processRouteTree");function Me(t,e,o=!1){let n=t.split("/"),r=Pr(t,n,e,o);if(!r)return null;let[i]=on(t,n,r);return{route:r.node.route,rawParams:i}}a(Me,"findMatch");function on(t,e,o){let n=Cr(o.node),r=o.node.data&&xr(o.node.data),i=Object.create(null),s=o.extract?.part??0,c=o.extract?.node??0,l=o.extract?.path??0,u=o.extract?.param??0;for(;c<n.length;s++,c++,l++){let f=n[c];if(f.kind===ft)break;if(f.kind===Jo){s--,l--;continue}let d=e[s],h=l;if(d&&(l+=d.length),f.kind===1||f.kind===3){let p=r[u++];if(f.kind===3&&o.skipped&1<<c){s--,l=h-1;continue}let m=f.suffix||f.prefix?d.substring(f.prefix.length,d.length-f.suffix.length):d;(m||f.kind===1)&&(i[p]=decodeURIComponent(m))}else if(f.kind===2){let p=f,m=t.substring(h+p.prefix.length,t.length-p.suffix.length),g=decodeURIComponent(m);i["*"]=g,i._splat=g;break}}return o.rawParams&&Object.assign(i,o.rawParams),[i,{part:s,node:c,path:l,param:u}]}a(on,"extractParams");function De(t){let e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}a(De,"buildRouteBranch");function Cr(t){let e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}a(Cr,"buildBranch");function Pr(t,e,o,n){if(t==="/"&&o.index)return{node:o.index,skipped:0};let r=!tt(e),i=r&&t!=="/",s=e.length-(r?1:0),c=[{node:o,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],l=null,u=null;for(;c.length;){let f=c.pop(),{node:d,index:h,skipped:p,statics:m,dynamics:g,optionals:S}=f,{extract:y,rawParams:R}=f;if(d.kind===2&&d.route&&!fe(u,f))continue;if(d.parse){if(!Go(t,e,f))continue;R=f.rawParams,y=f.extract}n&&d.route&&d.kind!==ft&&fe(l,f)&&(l=f);let b=h===s;if(b&&(d.route&&(!i||d.kind===ft||d.kind===2)&&fe(u,f)&&(u=f),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;let x=b?void 0:e[h],P;if(b&&d.index){let _={node:d.index,index:h,skipped:p,statics:m,dynamics:g,optionals:S,extract:y,rawParams:R},v=!0;if(d.index.parse&&(Go(t,e,_)||(v=!1)),v){if(!g&&!S&&!p&&Er(m,s))return _;fe(u,_)&&(u=_)}}if(d.wildcard)for(let _=d.wildcard.length-1;_>=0;_--){let v=d.wildcard[_],{prefix:w,suffix:E}=v;if(!(w&&(b||!(v.caseSensitive?x:P??=x.toLowerCase()).startsWith(w)))){if(E){if(b)continue;let L=e.slice(h).join("/"),k=L.slice(-E.length);if((v.caseSensitive?k:k.toLowerCase())!==E||L.length-E.length<w.length)continue}c.push({node:v,index:s,skipped:p,statics:m,dynamics:g,optionals:S,extract:y,rawParams:R})}}if(d.optional){let _=p|1<<d.depth+1;for(let v=d.optional.length-1;v>=0;v--){let w=d.optional[v];c.push({node:w,index:h,skipped:_,statics:m,dynamics:g,optionals:S,extract:y,rawParams:R})}if(!b)for(let v=d.optional.length-1;v>=0;v--){let w=d.optional[v],{prefix:E,suffix:L}=w;if(E||L){let k=w.caseSensitive?x:P??=x.toLowerCase();if(E&&!k.startsWith(E)||L&&k.indexOf(L,k.length-L.length)<E.length)continue}c.push({node:w,index:h+1,skipped:p,statics:m,dynamics:g,optionals:S+ue(s,h),extract:y,rawParams:R})}}if(!b&&d.dynamic&&x)for(let _=d.dynamic.length-1;_>=0;_--){let v=d.dynamic[_],{prefix:w,suffix:E}=v;if(w||E){let L=v.caseSensitive?x:P??=x.toLowerCase();if(w&&!L.startsWith(w)||E&&L.indexOf(E,L.length-E.length)<w.length)continue}c.push({node:v,index:h+1,skipped:p,statics:m,dynamics:g+ue(s,h),optionals:S,extract:y,rawParams:R})}if(!b&&d.staticInsensitive){let _=d.staticInsensitive.get(P??=x.toLowerCase());_&&c.push({node:_,index:h+1,skipped:p,statics:m+ue(s,h),dynamics:g,optionals:S,extract:y,rawParams:R})}if(!b&&d.static){let _=d.static.get(x);_&&c.push({node:_,index:h+1,skipped:p,statics:m+ue(s,h),dynamics:g,optionals:S,extract:y,rawParams:R})}if(d.pathless)for(let _=d.pathless.length-1;_>=0;_--){let v=d.pathless[_];c.push({node:v,index:h,skipped:p,statics:m,dynamics:g,optionals:S,extract:y,rawParams:R})}}if(u)return u;if(n&&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(Pr,"getNodeMatch");function ue(t,e){return 2**(t-e-1)}a(ue,"segmentScore");function Er(t,e){return t===2**(e-1)-1}a(Er,"isPerfectStaticMatch");function Go(t,e,o){let n,r;try{[n,r]=on(t,e,o)}catch{return null}if(o.rawParams=n,o.extract=r,!o.node.parse)return!0;try{if(o.node.parse(n)===!1)return null}catch{}return!0}a(Go,"validateParseParams");function fe(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===ft)>(t.node.kind===ft)||e.node.kind===ft==(t.node.kind===ft)&&e.node.depth>t.node.depth))):!0}a(fe,"isFrameMoreSpecific");function nn(t,e,o){let n=Dt(t),r=`/${n}`,i=e?r:r.toLowerCase(),s=`${i}/`,c={input:a(({url:l})=>{let u=e?l.pathname:l.pathname.toLowerCase();return u===i?l.pathname="/":u.startsWith(s)&&(l.pathname=l.pathname.slice(r.length)),l},"input"),output:a(({url:l})=>(l.pathname=it(`/${n}${l.pathname}`),l),"output")};return o?{input:a(({url:l})=>de(o,c.input({url:l})),"input"),output:a(({url:l})=>c.output({url:Ae(o,l)}),"output")}:c}a(nn,"rewriteBasepath");function de(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(de,"executeRewriteInput");function Ae(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(Ae,"executeRewriteOutput");function $e(t){let e=t;return{get(){return e},set(o){e=pt(o,e)}}}a($e,"createNonReactiveMutableStore");function Be(t){return{get(){return t()}}}a(Be,"createNonReactiveReadonlyStore");function rn(t,e){let{createMutableStore:o,createReadonlyStore:n,batch:r}=e,i=new Map,s=o("idle"),c=o(t),l=o(void 0),u=o([]),f=n(()=>u.get().map(g=>i.get(g).get())),d=n(()=>({status:s.get(),isLoading:s.get()==="pending",matches:f.get(),location:c.get(),resolvedLocation:l.get()}));function h(g){let S=i.get(g);return S||(S=o(void 0),i.set(g,S)),S}a(h,"getMatchStore");let p={status:s,location:c,resolvedLocation:l,ids:u,matches:f,byRoute:i,__store:d,getMatchStore:h,setMatches:m};function m(g){let S=u.get(),y=g.map(R=>R.routeId);r(()=>{Do(S,y)||u.set(y);for(let R of S)y.includes(R)||i.get(R).set(()=>{});for(let R of g){let b=h(R.routeId);b.get()!==R&&b.set(R)}})}return a(m,"setMatches"),p}a(rn,"createRouterStores");var dt="__TSR_index",sn="popstate",an="beforeunload",Lr=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function At(t){let e=Lr.exec(t);return e?"/"+t.slice(e[0].length):t}a(At,"normalizeProtocolRelative");function He(t){return/[\x00-\x1f\x7f]/.test(t)&&(t=t.replace(/[\x00-\x1f\x7f]/g,e=>`
2
+ \r`.includes(e)?"":encodeURIComponent(e))),At(t)}a(He,"normalizeHref");function ze(t){let e=t.getLocation(),o=new Set,n=a(s=>{e=t.getLocation(),o.forEach(c=>c({location:e,action:s}))},"notify"),r=a(s=>{t.notifyOnIndexChange??!0?n(s):e=t.getLocation()},"handleIndexChange"),i=a(async({task:s,navigateOpts:c,...l})=>{if(c?.ignoreBlocker??!1){s();return}let u=t.getBlockers?.()??[],f=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&u.length&&f)for(let d of u){let h=Et(l.path,l.state);if(await d.blockerFn({currentLocation:e,nextLocation:h,action:l.type})){t.onBlocked?.();return}}s()},"tryNavigation");return{get location(){return e},get length(){return t.getLength()},subscribers:o,subscribe:a(s=>(o.add(s),()=>{o.delete(s)}),"subscribe"),push:a((s,c,l)=>{let u=e.state[dt];c=Ve(u+1,c),i({task:a(()=>{t.pushState(s,c),n({type:"PUSH"})},"task"),navigateOpts:l,type:"PUSH",path:s,state:c})},"push"),replace:a((s,c,l)=>{let u=e.state[dt];c=Ve(u,c),i({task:a(()=>{t.replaceState(s,c),n({type:"REPLACE"})},"task"),navigateOpts:l,type:"REPLACE",path:s,state:c})},"replace"),go:a((s,c)=>{i({task:a(()=>{t.go(s,c?.ignoreBlocker??!1),r({type:"GO",index:s})},"task"),navigateOpts:c,type:"GO"})},"go"),back:a(s=>{i({task:a(()=>{t.back(s?.ignoreBlocker??!1),r({type:"BACK"})},"task"),navigateOpts:s,type:"BACK"})},"back"),forward:a(s=>{i({task:a(()=>{t.forward(s?.ignoreBlocker??!1),r({type:"FORWARD"})},"task"),navigateOpts:s,type:"FORWARD"})},"forward"),canGoBack:a(()=>e.state[dt]!==0,"canGoBack"),createHref:a(s=>t.createHref(s),"createHref"),block:a(s=>{if(!t.setBlockers)return()=>{};let c=t.getBlockers?.()??[];return t.setBlockers([...c,s]),()=>{let l=t.getBlockers?.()??[];t.setBlockers?.(l.filter(u=>u!==s))}},"block"),flush:a(()=>t.flush?.(),"flush"),destroy:a(()=>t.destroy?.(),"destroy"),notify:n,_getBlockers:a(()=>t.getBlockers?.()??[],"_getBlockers")}}a(ze,"createHistory");function Ve(t,e){let o=We();return{...e,key:o,__TSR_key:o,[dt]:t}}a(Ve,"assignKeyAndIndex");function Ue(t){let e=t?.window??(typeof document<"u"?window:void 0),o=e.history.pushState,n=e.history.replaceState,r=[],i=a(()=>r,"_getBlockers"),s=a(v=>r=v,"_setBlockers"),c=a(v=>He(t?.createHref?t.createHref(v):v),"createHref"),l=t?.parseLocation??(()=>Et(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){let v=We();e.history.replaceState({[dt]:0,key:v,__TSR_key:v},"")}let u=l(),f,d=!1,h=!1,p=!1,m=!1,g=a(()=>u,"getLocation"),S,y=a(()=>{S&&(_._ignoreSubscribers=!0,(S[2]?e.history.pushState:e.history.replaceState)(S[1],"",S[0]),_._ignoreSubscribers=!1,S=void 0,f=void 0)},"flush"),R=a((v,w,E)=>{let L=t?.createHref?c(w):void 0,k=!!S;k||(f=u),u=Et(w,E),S=[L??u.href,E,S?.[2]||v],k||queueMicrotask(()=>y())},"queueHistoryAction"),b=a(v=>{u=l(),_.notify({type:v})},"onPushPop"),x=a(async()=>{if(m=!1,h){h=!1;return}let v=l(),w=v.state[dt]-u.state[dt],E=w===1,L=w===-1,k=!E&&!L||d;d=!1;let C=k?"GO":L?"BACK":"FORWARD",O=k?{type:"GO",index:w}:{type:L?"BACK":"FORWARD"};if(p)p=!1;else{let N=i();if(typeof document<"u"&&N.length){for(let T of N)if(await T.blockerFn({currentLocation:u,nextLocation:v,action:C})){h=!0,e.history.go(-w),_.notify(O);return}}}u=l(),_.notify(O)},"onPushPopEvent"),P=a(v=>{if(m){m=!1;return}let w=!1,E=i();if(typeof document<"u"&&E.length)for(let L of E){let k=L.enableBeforeUnload??!0;if(k===!0){w=!0;break}if(typeof k=="function"&&k()===!0){w=!0;break}}if(w)return v.preventDefault(),v.returnValue=""},"onBeforeUnload"),_=ze({getLocation:g,getLength:a(()=>e.history.length,"getLength"),pushState:a((v,w)=>R(!0,v,w),"pushState"),replaceState:a((v,w)=>R(!1,v,w),"replaceState"),back:a(v=>(v&&(p=!0,m=!0),e.history.back()),"back"),forward:a(v=>{v&&(p=!0,m=!0),e.history.forward()},"forward"),go:a((v,w)=>{d=!0,w&&(p=!0,m=!0),e.history.go(v)},"go"),createHref:a(v=>c(v),"createHref"),flush:y,destroy:a(()=>{e.history.pushState=o,e.history.replaceState=n,e.removeEventListener(an,P,{capture:!0}),e.removeEventListener(sn,x)},"destroy"),onBlocked:a(()=>{f&&u!==f&&(u=f)},"onBlocked"),getBlockers:i,setBlockers:s,notifyOnIndexChange:!1});return _._ignoreNextBeforeUnload=v=>{m=!1;try{v=new URL(v,e.document.baseURI).href,m=/^https?:/.test(v)&&(!v.includes("#")||v.split("#")[0]!==e.location.href.split("#")[0])}catch{}},e.addEventListener(an,P,{capture:!0}),e.addEventListener(sn,x),e.history.pushState=function(...v){let w=o.apply(e.history,v);return _._ignoreSubscribers||b("PUSH"),w},e.history.replaceState=function(...v){let w=n.apply(e.history,v);return _._ignoreSubscribers||b("REPLACE"),w},_}a(Ue,"createBrowserHistory");function kr(t={initialEntries:["/"]}){let e=t.initialEntries,o=t.initialIndex?Math.min(Math.max(t.initialIndex,0),e.length-1):e.length-1,n=e.map((l,u)=>Ve(u,void 0)),r=a(()=>Et(e[o],n[o]),"getLocation"),i=[];return ze({getLocation:r,getLength:a(()=>e.length,"getLength"),pushState:a((l,u)=>{o=o<e.length-1?o+1:e.length,n[o]=u,e[o]=l,o<e.length-1&&(e.length=o+1,n.length=o+1)},"pushState"),replaceState:a((l,u)=>{n[o]=u,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:He,getBlockers:a(()=>i,"_getBlockers"),setBlockers:a(l=>i=l,"_setBlockers")})}a(kr,"createMemoryHistory");function Et(t,e){let o=He(t),n=o.indexOf("#"),r=o.indexOf("?");if(!e){let i=We();e={[dt]:0,key:i,__TSR_key:i}}return{href:o,pathname:o.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:o.length),hash:n>-1?o.substring(n):"",search:r>-1?o.slice(r,n===-1?void 0:n):"",state:e}}a(Et,"parseHref");function We(){return(Math.random()+1).toString(36).substring(7)}a(We,"createRandomKey");function je(t,e){return t.protocol!=="http:"&&t.protocol!=="https:"||t.origin!==e||!!t.username||!!t.password}a(je,"isExternalUrl");function Ke(t){return t.pathname+t.search+t.hash}a(Ke,"getUrlPath");function cn(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}a(cn,"routeNeedsLoad");function yt(t,e){return{fromLocation:e,toLocation:t,pathChanged:e?.pathname!==t.pathname,hrefChanged:e?.href!==t.href,hashChanged:e?.hash!==t.hash}}a(yt,"getLocationChangeInfo");function ln({key:t,__TSR_key:e,__TSR_index:o,__hashScrollIntoViewOptions:n,...r}){return r}a(ln,"_getUserHistoryState");function dn(t){return t.findIndex(e=>e.status==="error"||e.status==="notFound"||e._notFound)+1}a(dn,"lifecycleEnd");function hn(t,e,o,n,r,i){n&&(e=e.slice(0,n)),r&&(o=o.slice(0,r));for(let s of e){if(i&&t._tx!==i)return;o.some(c=>c.routeId===s.routeId)||t.routesById[s.routeId].options.onLeave?.(s)}for(let s of o){if(i&&t._tx!==i)return;t.routesById[s.routeId].options[e.some(c=>c.routeId===s.routeId)?"onStay":"onEnter"]?.(s)}}a(hn,"runRouteLifecycle");var Je=class{static{a(this,"RouterCore")}constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async o=>(o(),!1),this.update=o=>{let n=this.options;this.options={...n,...o},this.isServer=this.options.isServer??!1??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Ue()),this.origin=this.options.origin,this.origin||(!!1&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");let r=this.options.basepath??"/",i=this.options.rewrite,s=this.basepath!==r||n?.rewrite!==i||n?.caseSensitive!==this.options.caseSensitive;if(s&&(this.basepath=r,this.rewrite=r!=="/"&&Dt(r)?nn(r,this.options.caseSensitive,i):i),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||!1){this.routeTree=this.options.routeTree;let c;c=this.buildRouteTree(),!1,this.setRoutes(c)}if(this.stores)s&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let c=this.getStoreConfig(this);this.batch=c.batch,this.stores=rn(this.latestLocation,c),Ho(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let o=en(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Xo(this.options.routeMasks,o.processedTree),{...o,resolvePathCache:Ct(1e3)}},this.subscribe=(o,n)=>{let r={eventType:o,fn:n};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=o=>{for(let n of this.subscribers)if(n.eventType===o.type)try{n.fn(o)}catch(r){console.error(r)}},this.parseLocation=(o,n)=>{let r=a(({pathname:l,search:u,hash:f,href:d},h)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){let S=this.options.parseSearch(u),y=this.options.stringifySearch(S);return{href:l+y+f,publicHref:l+y+f,pathname:xt(l),external:!1,searchStr:y,search:mt(n?.search,S),hash:xt(f.slice(1)),state:Q(n?.state,h)}}let p=de(this.rewrite,new URL(d,this.origin)),m=this.options.parseSearch(p.search),g=this.options.stringifySearch(m);return p.search=g,{href:p.href.replace(p.origin,""),publicHref:d,pathname:xt(At(p.pathname)),external:!!this.rewrite&&je(p,this.origin),searchStr:g,search:mt(n?.search,m),hash:xt(p.hash.slice(1)),state:Q(n?.state,h)}},"parse"),i=r(o,o.state),{__tempLocation:s,__tempKey:c}=i.state;if(s&&(!c||c===this.tempLocationKey)){let l=r(s,{...s.state,__tempLocation:void 0,key:i.state.key,__TSR_key:i.state.__TSR_key});return l.maskedLocation=i,l}return i},this.matchRoutes=(o,n,r)=>typeof o=="string"?this.matchRoutesInternal({pathname:o,search:n},r):this.matchRoutesInternal(o,n),this.getMatchedRoutes=o=>{let n=Object.create(null),r=tn(U(o),this.processedTree,!0);return r&&Object.assign(n,r.rawParams),[r?.branch||[this.routesById.__root__],n,r?.route]},this.buildLocation=o=>{if(!!1){let s=this.staticLocations.get(o);if(s)return s}let n=!1,r=a((s={})=>{if(s.href){let N=Et(s.href,{});s={...s,to:de(this.rewrite,new URL(N.pathname,this.origin)).pathname,search:this.options.parseSearch(N.search),hash:N.hash.slice(1)}}let c=s._fromLocation||this._pendingLocation||this.latestLocation,l,u=a(()=>(n=!0,c),"current"),f=a(()=>(n=!0,l??=this.matchRoutesLightweight(c)),"currentMatch"),d=s.to?`${s.to}`:".",h=se(d[0]==="/"?"":s.unsafeRelative==="path"?u().pathname:s.from??f()[1],d,this.options.trailingSlash,this.resolvePathCache),p=this.routesByPath[U(h)],m=h.includes("$"),g;if(p)g=p._branch??=De(p);else if(m)g=[];else{let[N,T,A]=this.getMatchedRoutes(h);g=N,this.options.notFoundRoute&&(!A||A.path!=="/"&&T["**"])&&(g=[...g,this.options.notFoundRoute])}let S=m?p?._interpolation??Pt(!1,{fullPath:h},0):void 0,y;for(let N of g){let T=N.options.params?.stringify??N.options.stringifyParams;if(T){let A=f()[3];if(y??=qe(s.params,A),!Ft(y))break;y===A&&(y=Object.assign(Tt(),y));try{Object.assign(y,T(y))}catch{}}}y??=qe(s.params,Ir(s.params,S)?f()[3]:Ge);let R=o.leaveParams?h:At(xt(S?ie(h,S,y,this.pathParamsDecoder):h)),b=Or(g,o._includeValidateSearch),x=a(()=>{let N=f()[2];if(o._includeValidateSearch&&this.options.search?.strict){let T={};g.forEach(A=>{if(A.options.validateSearch)try{Object.assign(T,he(A.options.validateSearch,{...T,...N}))}catch{}}),N=T}return N},"fromSearch"),P=b.length?Nr(b,x(),s):s.search===!0?x():typeof s.search=="function"?s.search(x()):s.search||Ge,_=this.options.stringifySearch(P),v=s.hash===!0?u().hash:typeof s.hash=="function"?s.hash(u().hash):s.hash||void 0,w=v?`#${v}`:"",E=s.state?s.state===!0?u().state:typeof s.state=="function"?s.state(u().state):s.state:Ge,L=`${R}${_}${w}`,k,C,O=!1;if(this.rewrite){let N=new URL(L,this.origin),T=N.origin,A=Ae(this.rewrite,N);k=Ke(N),je(A,T)?(C=A.href,O=!0):C=At(Ke(A))}else k=Mo(L),C=k;return{publicHref:C,href:k,pathname:R,search:P,searchStr:_,state:E,hash:v??"",external:O,unmaskOnReload:s.unmaskOnReload}},"build"),i=r(o);if(o.mask)i.maskedLocation=r({from:o.from,...o.mask});else if(this.options.routeMasks){let s=Zo(i.pathname,this.processedTree);if(s){let c=Object.assign(Tt(),s.rawParams),{from:l,params:u,...f}=s.route,d=qe(u,c);i.maskedLocation=r({from:o.from,...f,params:d})}}return!!1&&!n&&o._fromLocation&&!i.maskedLocation&&this.staticLocations.set(o,i),i},this.commitLocation=async({viewTransition:o,ignoreBlocker:n,...r})=>{if(!1)return;let i=r.maskedLocation??r;if(i.external&&!!1)return un(this,i.publicHref,{replace:r.replace,ignoreBlocker:n});let s,c=U(this.latestLocation.href)===U(r.href)&&J(ln(r.state),ln(this.latestLocation.state)),l=this._commitPromise,u,f=new Promise(d=>{u=d});if(f.resolve=()=>{u(),l?.resolve()},this._commitPromise=f,c)this.load();else{let{maskedLocation:d,hashScrollIntoView:h,...p}=r;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state={...p.state,__hashScrollIntoViewOptions:h??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=o,s=r.replace?"REPLACE":"PUSH",this.history[s==="REPLACE"?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:n}),this.history.subscribers.size||this.load({action:{type:s}})}return this._scroll.n=r.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:o,resetScroll:n,hashScrollIntoView:r,viewTransition:i,ignoreBlocker:s,...c}={})=>{if(!1)return Promise.resolve();let l=this.buildLocation({...c,_includeValidateSearch:!0});this._pendingLocation=l;let u=this.commitLocation({...l,viewTransition:i,replace:o,resetScroll:n,hashScrollIntoView:r,ignoreBlocker:s});return queueMicrotask(()=>{this._pendingLocation===l&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:o,reloadDocument:n,href:r,publicHref:i,...s})=>{if(!1)return;let c=r?st(r):void 0;if(c||n){if(o!==void 0||!r){let u=this.buildLocation({to:o,...s}),f=u.maskedLocation??u;r??=f.publicHref,i??=f.publicHref}return un(this,!c&&i?i:r,s)}return this.buildAndCommitLocation({...s,href:r,to:o,_isNavigate:!0})},this.load=async o=>{if(!1)return(void 0)(this,o);this.updateLatestLocation(),o?.action&&(this._scroll.h=o.action.type==="PUSH"||o.action.type==="REPLACE"),await mn(this,o)},this.startViewTransition=o=>{let n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&!!1&&typeof document.startViewTransition=="function"){let r;if(typeof n=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){let i=this.latestLocation,s=this.stores.resolvedLocation.get(),c=typeof n.types=="function"?n.types(yt(i,s)):n.types;if(c===!1)return o();r={update:o,types:c}}else r=o;return document.startViewTransition(r).updateCallbackDone}return o()},this.invalidate=o=>{let n=this._committed,r=o?.filter,i=this._preloads,s=new Set,c=a(f=>{(!r||r(f))&&s.add(f.id)},"consider");n.forEach(c),this._cache.forEach(c),i?.forEach(f=>f.forEach(c)),this._tx?.[3].forEach(c);let l=[];for(let[f,d]of i??[])d.some(h=>s.has(h.id))&&(i.delete(f),l.push(f));let u=a(f=>{if(s.has(f.id)){let d=this.routesById[f.routeId],h={...f,invalid:!0,...(o?.forcePending||f.status==="error"||f.status==="notFound")&&cn(d)?{status:"pending",error:void 0}:void 0};return f._flight=void 0,h}return f},"invalidate");this._committed=n.map(u);for(let[f,d]of this._cache)s.has(f)&&(d.invalid=!0,o?.forcePending&&(d.status="pending"));for(let f of s){let d=this._flights?.get(f);this._flights?.delete(f),d&&!d[2]&&l.push(d[1])}for(let f of l)f.abort();return this.shouldViewTransition=!1,this.load({sync:o?.sync})},this.resolveRedirect=o=>{let n=o.options,r=o.headers.get("Location")||n.href;if(!r){let s=this.buildLocation(n);r=(s.maskedLocation??s).publicHref||"/"}let i;if(Ne.test(r)||(i=st(r))&&!this.protocolAllowlist.has(i))throw new Error("Redirect blocked: unsafe protocol");if(i==="http:"||i==="https:"){let s=new URL(r);s.pathname.startsWith("//")?r=s.href:je(s,this.origin)||(r=Ke(s),i=void 0)}return i&&(n.reloadDocument=!0),n.href=r,o.headers.set("Location",r),o},this.clearCache=o=>{let n=this._cache,r=this._preloads,i=o?.filter,s=[],c=[];for(let[u,f]of n)(!i||i(f))&&(c.push(u),s.push(f));let l=[];for(let[u,f]of r??[])(!i||f.some(i))&&(l.push(u),s.push(...f));for(let u of c)n.delete(u);for(let u of l)r.delete(u);for(let u of s){let f=u._flight;u._flight=void 0,f&&!--f[2]&&(this._flights?.get(u.id)===f&&this._flights.delete(u.id),l.push(f[1]))}for(let u of l)u.abort()},this.loadRouteChunk=vt,this.preloadRoute=o=>gn(this,o),this.matchRoute=(o,n)=>{let r={...o,to:o.to?se(o.from||"",o.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:o.params||{},leaveParams:!0},i=this.buildLocation(r),s=this.stores.status.get()==="pending";if(n?.pending&&!s)return!1;let c=n?.pending??!s?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),l=Qo(i.pathname,n?.caseSensitive??!1,n?.fuzzy??!1,c.pathname,this.processedTree);return!l||o.params&&!J(l.rawParams,o.params,!0)?!1:n?.includeSearch??!0?J(c.search,i.search,!0)?l.rawParams:!1:l.rawParams},this.getStoreConfig=e,t.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=Ao(t.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Ko,parseSearch:t.parseSearch??jo,protocolAllowlist:t.protocolAllowlist??Oe}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(t){Object.assign(this,t),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let e=this.options.notFoundRoute;e&&(e.init(99999999999),this.routesById[e.id]!==e&&(e._interpolation=Pt(!1,e,0)),this.routesById[e.id]=e)}matchRoutesInternal(t,e){let[o,n,r]=this.getMatchedRoutes(t.pathname),i=o,s=!1;(r?r.path!=="/"&&n["**"]:U(t.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:s=!0);let c=s?Fr(this.options.notFoundMode,i):void 0,l=new Array(i.length),u=this._committed,f=a((h,p)=>{let m=u[p];return m?.routeId===h.id?m:h===this.options.notFoundRoute?u.find(g=>g.routeId===h.id):void 0},"previousAt"),d;for(let h=0;h<i.length;h++){let p=i[h],m=l[h-1],g,S,y;{let O=m?.search??t.search,N=m?._strictSearch??void 0;try{let T=he(p.options.validateSearch,{...O})??void 0;g={...O,...T},S={...N,...T}}catch(T){let A=T;if(T instanceof $t||(A=new $t(T.message,{cause:T})),e?.throwOnError)throw A;g=O,S={},y=A}}let R="",b="";try{R=p.options.loaderDeps?.({search:g})??"",b=R&&JSON.stringify(R)||""}catch(O){if(e?.throwOnError)throw O;y??=O}let x=Tt(),P=p._interpolation?ie(p.fullPath,p._interpolation,n,this.pathParamsDecoder,x):p.fullPath,_=p.id+P+b,v=f(p,h),w=this._cache.get(_)??(v?.id===_?v:void 0);d=w?._strictParams??Object.assign(x,d);let E;if(!w)try{fn(p,d)}catch(O){if(q(O)||le(O)?E=O:E=new pn(O.message,{cause:O}),e?.throwOnError)throw E}let L=v?"stay":"enter",k;if(w)k={...w,cause:L,search:v?mt(v.search,g):mt(w.search,g),_strictSearch:S,searchError:y};else{let O=cn(p)?"pending":"success";k={id:_,ssr:p.options.ssr,index:h,routeId:p.id,params:v?.params??d,_strictParams:d,pathname:P,updatedAt:Date.now(),search:v?mt(v.search,g):g,_strictSearch:S,searchError:y,status:O,isFetching:!1,error:void 0,paramsError:E,context:{},abortController:e?._controller??new AbortController,cause:L,loaderDeps:v?Q(v.loaderDeps,R):R,invalid:!1,preload:!1,staticData:p.options.staticData||{},fullPath:p.fullPath}}let C=c===p.id;k._notFound&&!C&&(k.error=void 0),k._notFound=C,l[h]=k}for(let h=0;h<l.length;h++){let p=l[h];p.params=p.cause==="stay"?mt(p.params,d):d,e?._controller&&(p.context={})}return l}matchRoutesLightweight(t){let e=tt(this.stores.ids.get()),o=e?this.stores.byRoute.get(e).get():void 0,n=o?.id,r=this.lightweightCache.get(t);if(r&&r[0]===n)return r[1];let[i,s]=this.getMatchedRoutes(t.pathname),c=tt(i),l={...t.search};for(let h of i)try{Object.assign(l,he(h.options.validateSearch,l))}catch{}let u=o&&o.routeId===c.id&&o.pathname===t.pathname,f;if(u)f=o.params;else{let h=s;for(let p of i)try{fn(p,h)}catch{}f=h}let d=[i,c.fullPath,l,f];return this.lightweightCache.set(t,[n,d]),d}};async function un(t,e,{replace:o,ignoreBlocker:n}){if(!Mt(e,t.protocolAllowlist)){if(!n){let r=t.history._getBlockers();for(let i of r)if(i?.blockerFn&&await i.blockerFn({currentLocation:t.history.location,nextLocation:t.history.location,action:o?"REPLACE":"PUSH"}))return}t.history._ignoreNextBeforeUnload?.(e),o?window.location.replace(e):window.location.href=e}}a(un,"documentNavigation");var $t=class extends Error{static{a(this,"SearchParamError")}},pn=class extends Error{static{a(this,"PathParamError")}};function he(t,e){if(t==null)return{};if("~standard"in t){let o=t["~standard"].validate(e);if(o instanceof Promise)throw new $t("Async validation not supported");if(o.issues)throw new $t(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(he,"validateSearch");function qe(t,e){if(t===void 0||t===!0)return e;let o=Object.create(null);return t===!1||t===null?o:typeof t=="function"?(Object.assign(o,e),Object.assign(o,t(o))):Object.assign(o,e,t)}a(qe,"resolveNextParams");function Ir(t,e){return typeof t=="function"?!0:!e||t===!1||t===null?!1:t===void 0||t===!0||e.some(o=>typeof o!="string"&&!oe.call(t,o[1]))}a(Ir,"needsInheritedParams");var Ge=Object.freeze({});function Or(t,e){let o=[];for(let n=0;n<t.length;n++){let r=t[n].options;if("search"in r)r.search?.middlewares&&o.push(...r.search.middlewares);else if(r.preSearchFilters||r.postSearchFilters){let s=a(({search:c,next:l})=>{let u=l(r.preSearchFilters?r.preSearchFilters.reduce((f,d)=>d(f),c):c);return r.postSearchFilters?r.postSearchFilters.reduce((f,d)=>d(f),u):u},"legacyMiddleware");o.push(s)}let i=r.validateSearch;if(e&&i){let s=a(({search:c,next:l,meta:u})=>{let f=l(c);try{let d=he(i,f);if(u&&d)for(let h in d)h in f||(u.defaulted||=new Map).set(h,d[h]);return{...f,...d}}catch{}return f},"validate");o.push(s)}}return o}a(Or,"getSearchMiddlewares");function Nr(t,e,o){let n=a((r,i,s)=>{if(r>=t.length){if(!o.search)return{};if(o.search===!0)return i;let l=pt(o.search,i);return s&&(s.explicit=l),l}let c=a((l,u)=>{if(u){let f=s||{};return{search:n(r+1,l,f),meta:f}}return n(r+1,l,s)},"next");return t[r]({search:i,next:c,meta:s})},"applyNext");return n(0,e)}a(Nr,"applySearchMiddleware");function Fr(t,e){if(t!=="root"){let o;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.options.notFoundComponent)return r.id;o||=r.children&&r.id}if(o)return o}return Y}a(Fr,"findGlobalNotFoundRouteId");function fn(t,e){let o=t.options.params?.parse??t.options.parseParams;o&&Object.assign(e,o(e))}a(fn,"extractStrictParams");function Ye(t,e){return t.options[e]?.preload?.()}a(Ye,"preloadComponent");function Tr(t,e){let o=Ye(t,"component"),n=Ye(t,"pendingComponent");return e&&(n?n=n.then(e):e()),o&&n?Promise.all([o,n]).then(()=>{}):o??n}a(Tr,"loadComponents");function vt(t,e,o){let n=a(()=>e===!1?void 0:e?Ye(t,e):Tr(t,o),"afterLazy"),r=t._lazy;if(r)return r===!0?n():r.then(n);if(!t.lazyFn)return n();let i=t.lazyFn().then(s=>{{let{id:c,...l}=s.options;Object.assign(t.options,l),t._lazy=!0}},s=>{throw t._lazy=void 0,s});return t._lazy=i,i.then(n)}a(vt,"loadRouteChunk");function Qe(t){let e=t.findIndex(o=>o.status!=="success"||o._notFound)+1;return e&&e<t.length?t.slice(0,e):t}a(Qe,"_getRenderedMatches");var nt=0,ct=1,me=2,W=3,ht=[4];function Ht(t){return typeof t[0]=="number"}a(Ht,"isControl");function Rt(t,e){return e.aborted?Promise.race([Promise.reject(e),t]):new Promise((o,n)=>{let r=a(()=>n(e),"abort");e.addEventListener("abort",r,{once:!0}),Promise.resolve(t).then(o,n).then(()=>e.removeEventListener("abort",r))})}a(Rt,"waitFor");function _t(t,e){return t.routesById[e.routeId]}a(_t,"getRoute");function zt(t,e,o){return le(t)?[W,t]:q(t)?(t.routeId||=o,[me,t]):e?(typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),[ct,t]):[nt,t]}a(zt,"normalize");function to(t,e){let o=zt(e,!0,t.id);if(o[0]!==ct)return o;try{t.options.onError?.(o[1])}catch(n){o=zt(n,!0,t.id)}return o}a(to,"normalizeError");function Vt(t,e,o,n,r){return r[0].signal.aborted?ht:no(t,e,o,to(o,n),r)}a(Vt,"normalizeLaneError");async function Mr(t,e,o,n,r,i){let[s,c]=e,l=o[0].signal,u=!!o[3];for(let f=o[6]??0;f<n;f++){let d=c[f],h=_t(t,d);d.abortController=o[0];let p=c[f-1]?.context??t.options.context??{},m={params:d.params,location:s,navigate:a(R=>t.navigate({...R,_fromLocation:s}),"navigate"),buildLocation:t.buildLocation,cause:u?"preload":d.cause,abortController:o[0],preload:u,matches:c,routeId:h.id};try{let R=d._ctx||=h.options.context?h.options.context({...m,deps:d.loaderDeps,context:p})||{}:void 0;d.context={...p,...R}}catch(R){return at(t,d),[f,Vt(t,e,h,R,o)]}if(l.aborted)return[f,ht];let g=d.paramsError??d.searchError;if(g!==void 0)return at(t,d),[f,Vt(t,e,h,g,o)];let S=h.options.beforeLoad;if(!S)continue;let y=d.status;f>=i&&(d.status="pending",o[7]?.());try{Ut(t,d,"beforeLoad",o[0]);let R=S({...m,search:d.search,context:d.context,...t.options.additionalContext}),b=await(typeof R?.then=="function"?Rt(R,l):R);if(l.aborted)return[f,ht];let x=no(t,e,h,zt(b,!1,h.id),o);if(x[0]!==nt)return at(t,d),[f,x];d.context={...d.context,...b}}catch(R){return at(t,d),[f,Vt(t,e,h,R,o)]}finally{d.status=y,Ut(t,d,!1,o[0])}}r()}a(Mr,"contextualize");function eo(t,e,o){if(!(!o||--o[2])){if(t._flights?.get(e.id)===o){let n=t._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(e)&&n[3].some(r=>r.id===e.id)&&n[3].some(r=>r.isFetching==="beforeLoad"))return;t._flights.delete(e.id)}return o[1]}}a(eo,"releaseOwnedFlight");function at(t,e){let o=e._flight;e._flight=void 0,eo(t,e,o)?.abort()}a(at,"releaseFlight");function j(t,e,o,n){let r=[];for(let i of e)if(!o?.includes(i)){let s=i._flight;if(i._flight=void 0,n&&s?.[2]===1&&t._flights?.get(i.id)===s&&o?.some(c=>c.id===i.id))s[2]=0;else{let c=eo(t,i,s);c&&r.push(c)}}for(let i of r)i.abort()}a(j,"transferMatchResources");function oo(t){for(let e of t){let o=e._flight;o&&o[2]++}}a(oo,"acquireMatchResources");function Ut(t,e,o,n){if(e.isFetching=o,n&&t._tx?.[0]!==n)return;let r=t.stores.byRoute.get(e.routeId),i=r?.get();i?.id===e.id&&r.set({...i,isFetching:o})}a(Ut,"setFetching");function wn(t,e,o,n,r,i,s){let c=e[0];return{params:o.params,location:c,navigate:a(l=>t.navigate({...l,_fromLocation:c}),"navigate"),cause:s?"preload":o.cause,abortController:r,preload:s,deps:o.loaderDeps,parentMatchPromise:i,context:o.context,route:n,...t.options.additionalContext}}a(wn,"getLoaderContext");async function yn(t,e,o,n,r,i,s){let c=s[0],l=c.signal;if(l.aborted)return ht;if(!r)return[nt,void 0];let u=o._flight;Ut(t,o,"loader",c);try{if(!u){let f=new AbortController;u=[Promise.resolve().then(()=>r(wn(t,e,o,n,f,i,!!s[3]))).then(d=>zt(d,!1,n.id),d=>zt(d,!0,n.id)).then(d=>(d[0]!==nt&&t._flights?.get(o.id)===u&&(t._flights.delete(o.id),u[2]||f.abort()),d[0]===ct&&u[2]?to(n,d[1]):d)),f,1],(t._flights??=new Map).set(o.id,u)}return o._flight=u,o.abortController=u[1],no(t,e,n,await Rt(u[0],l),s)}catch(f){if(f!==l||!l.aborted)throw f;return at(t,o),ht}finally{Ut(t,o,!1,c)}}a(yn,"loadResource");function vn(t,e,o){e[0]!==W&&(t.status="success",t.error=void 0,e[0]===nt?(t.loaderData=e[1],t.invalid=!1,t.updatedAt=Date.now(),t.preload=o):t.invalid=!0)}a(vn,"settleInto");function Dr(t,e,o){let n=t._cache.get(e.id);if(n!==o||t._committed.some(i=>i.id===e.id&&i._flight===e._flight))return;let r={...e,_notFound:void 0,context:{}};r._flight&&r._flight[2]++,t._cache.set(e.id,r),n&&at(t,n)}a(Dr,"cacheLoaderMatch");function Sn(t,e){return e[0]===ct||e[0]===me?{...t,status:e[0]===ct?"error":"notFound",error:e[1],_flight:void 0}:t}a(Sn,"getParentSnapshot");function Ar(t,e,o,n,r,i,s){let c=e[1][o],l=_t(t,c),u=!!i[3],f=t._cache.get(c.id),d,h=!1,p;try{if(c.status==="success"&&(d=l.options.shouldReload,typeof d=="function"&&(d=d(wn(t,e,c,l,i[0],r,u))),i[0].signal.aborted&&(p=ht)),!p)if(c.status!=="success")h=!0;else{let C=u||c.preload?l.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:l.options.staleTime??t.options.defaultStaleTime??0;h=!!(c.invalid||d||d===void 0&&Date.now()-c.updatedAt>=C&&(i[5]||c.cause==="enter"||i[2].some(O=>O.routeId===c.routeId&&O.id!==c.id)))}}catch(C){c.invalid=!0,at(t,c),p=Vt(t,e,l,C,i)}let m=l.options.loader,g=typeof m=="function",S=g?m:m?.handler,y=!u||l.options.preload!==!1,R=y&&m?t._flights?.get(c.id):void 0;R===c._flight||p?R=void 0:R&&!h&&!u&&d===void 0?h=!0:h||(R=void 0);let b=!!(m&&h&&c.status==="success"&&!u&&!i[4]&&((g?void 0:m.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),x=h&&y,P=x&&!b&&(c.status!=="success"||!!m),_=o>=s?i[7]:void 0,v=l.lazyFn&&l._lazy!==!0?_:void 0;if(x&&!m&&(c.invalid=!1,c.updatedAt=Date.now()),R&&R[2]++,P){let C=c._flight;c._flight=R,eo(t,c,C)?.abort(),o>=s&&(c.status="pending"),_?.()}x||(c.isFetching=!1);let w=!p&&P?yn(t,e,c,l,S,r,i).then(C=>(vn(c,C,u),C[0]===nt&&(m&&!i[0].signal.aborted&&Dr(t,c,f),o>=s&&(c.status="pending")),C)):Promise.resolve(p??[nt,c.loaderData]),E=(async()=>{try{let O=vt(l,void 0,v);O&&await Rt(O,i[0].signal)}catch(O){if(!e[1].some((N,T)=>T<=o&&(N.status==="error"||N.status==="notFound"||N._notFound)))return[o,Vt(t,e,l,O,i)]}let C=await w;P&&C[0]===nt&&c.status==="pending"&&!i[0].signal.aborted&&(c.status="success",_?.())})();if(n.push([o,w,E]),!b)return w.then(C=>Sn(c,C));let L={...c,status:"pending",preload:!1,_flight:R};c.invalid=!1,c.isFetching="loader";let k=yn(t,e,L,l,S,r,i).then(C=>(c.isFetching=!1,vn(L,C,!1),C));return(e[2]??=[]).push([o,k,E,L]),k.then(C=>Sn(L,C))}a(Ar,"createLoaderTask");async function Xe(t,e,o,n,r=0){let i=o?.[1][1],s=i?.routeId?e.findIndex(c=>c.routeId===i.routeId):o?.[0]??e.length-1;s<0&&(s=0);for(let c=s;c>=0;c--){let l=_t(t,e[c]);try{let u=vt(l,!1);u&&await Rt(u,n)}catch(u){if(u===n&&n.aborted)throw u}if(l.options.notFoundComponent)return c}return i?.routeId?s:r}a(Xe,"getNotFoundBoundary");function St(t,e){e[2]&&(j(t,e[2].map(o=>o[3])),e[2]=void 0)}a(St,"discardBackground");async function Rn(t,e,o,n){let r;try{await Promise.all(t.map(i=>i[1].then(async s=>{let c=i[0];if(!(n&&c>=await n)){if(s[0]>=W)throw[c,s];!r&&s[0]!==nt&&(r=[c,s],await Promise.all((o??[]).map(l=>{if(!(l[0]<=c))return l[1].then(u=>{if(u[0]===W)throw[l[0],u]})})))}})))}catch(i){return i}return e??r}a(Rn,"settleTasks");function no(t,e,o,n,r,i){for(;n[0]===W;){let s=n[1],c=s.options;try{if((c.href||s.headers.has("Location"))&&(t.resolveRedirect(s),c.reloadDocument)||(c.reloadDocument?r[3]:r[1]>=20))return n;let l=t.buildLocation({...c,_fromLocation:e[0],_includeValidateSearch:!0}),u=l.maskedLocation??l;if(u.external){let f=s.clone();return f.options={...c},f.headers.set("Location",u.publicHref),t.resolveRedirect(f),r[3]?[W,f]:[W,f,u]}return[W,s,l]}catch(l){n=i?[ct,l]:to(o,l),i=!0}}return n}a(no,"materializeRedirect");async function xn(t,e,o,n,r,i){let s=e[1],c=await r,l=!1,u=s.findIndex(p=>p._notFound),f=a(p=>p[1][0]===me?Xe(t,s,p,n.signal):p[0],"boundaryOf"),d=u<0?s.length:u;if((c?.[1][0]??0)>=W)d=0;else if(c){d=c[2]??=await f(c);for(let p of o){if(p[0]>=d)break;let m=await p[1];if(m[0]!==nt&&m[0]<W&&!("loaderData"in s[p[0]])){c=[p[0],m],d=c[2]=await f(c);break}}}for(let p of o){if(p[0]>=d)break;let m=await p[2];if(m){c=m;break}}if((c?.[1][0]??0)>=W){let p=c[1];if(p[0]!==W||p[1].options.reloadDocument||p[2])return St(t,e),p;l=!0,c=[0,[ct,new Error("Too many redirects")]]}let h=c?c[2]??await f(c):u;if(h>=0){let p=c?.[1],m=p?.[0],g=s[h],S=p?.[1],y=a(()=>{p&&(g._notFound=void 0,m===ct?g.status="error":(S.routeId=g.routeId,g.routeId===t.routeTree.id?(g.status="success",g._notFound=!0):g.status="notFound"),g.error=S,g.isFetching=!1)},"install");y(),p||i?.();let R=_t(t,g);try{await Rt(p?Promise.resolve().then(()=>vt(R,m===ct?"errorComponent":"notFoundComponent")):Promise.all([vt(R),vt(R,"notFoundComponent")]),n.signal)}catch(b){if(b===n.signal&&n.signal.aborted)return St(t,e),ht}p?l&&(n.abort(),await Promise.all([...o.map(b=>b[1]),...o.map(b=>b[2]),...(e[2]??[]).map(b=>b[1])]),St(t,e),j(t,s),y()):g.status="success"}return e}a(xn,"reduceLane");async function bn(t,e,o,n=0,r=e[1].length){let i=e[1];for(let s=n;s<r;s++){let c=i[s],l=_t(t,c).options;if(l.head||l.scripts)try{let u={ssr:t.options.ssr,matches:i,match:c,params:c.params,loaderData:c.loaderData},[f,d]=await Rt(Promise.all([l.head?.(u),l.scripts?.(u)]),o);c.meta=f?.meta,c.links=f?.links,c.headScripts=f?.scripts,c.styles=f?.styles,c.scripts=d}catch(u){if(u===o&&o.aborted)break;console.error(u)}if(c.status!=="success"||c._notFound)break}return e}a(bn,"projectLane");async function Cn(t,e,o,n){let r=[e,o],i=n[0].signal,s;try{let c=t.stores.matches.get(),l=o.findIndex(y=>y._notFound);if(t.options.notFoundMode!=="root"&&l>=0){let y=await Xe(t,o,void 0,i,l);o[l]._notFound=void 0,o[y]._notFound=!0,l=y}let u=l<0?o.length:l+1,f=0;for(;f<u&&f!==l;){let y=o[f],R=n[2][f],b=c[f];if(R?.id!==y.id||R.status!=="success"||y.preload||b?.id!==y.id||b.status!=="success"||(f++,R._notFound||b._notFound))break}let d=[],h=n[6]??0,p=h?Promise.resolve(o[h-1]):void 0,m=a(()=>{for(let y=h;y<u&&!i.aborted;y++)p=Ar(t,r,y,d,p,n,f)},"planSuccessfulLane"),g=await Mr(t,r,n,u,m,f);if(g){if(n[4]=!0,u=g[0],g[1][0]===me){let y=await Xe(t,o,g,i);g[2]=y,u=Math.min(u,y+1)}else g[1][0]>=W&&(u=0);m()}if(!i.aborted&&!n[3]){let y=[];for(let[R,b]of t._flights??[])b[2]||(t._flights.delete(R),y.push(b[1]));for(let R of y)R.abort()}let S=xn(t,r,d,n[0],Rn(d,g,r[2]),n[7]);r[2]?.length&&(r[3]=Rn(r[2],void 0,void 0,S.then(y=>Ht(y)?0:Qe(o).length,()=>0))),s=await S}catch(c){if(St(t,r),c===i&&i.aborted)return ht;throw c}return Ht(s)?s:bn(t,s,i,n[6]===o.length?n[6]:0)}a(Cn,"executeClientLane");function Ze(t,e){if(t._tx!==e)return;let o=e[3],n=t.stores.matches.get(),r=t._pending;for(let i=0;i<o.length;i++){let s=o[i],c=s.status==="success"&&!s._notFound,l=n[i]?.id===s.id&&n[i]?.status==="pending";if(c&&!l)continue;let u=_t(t,s),f=c||s.invalid?0:u.options.pendingMs??t.options.defaultPendingMs,d=u.options.pendingComponent??t.options.defaultPendingComponent;if(!d||typeof f!="number"||f===1/0){r&&(r[0]=e,r[2]=0,r[4]=!0);return}let h=u.options.pendingMinMs??t.options.defaultPendingMinMs??0,p=!1;if(r?.[1]===s.id?(p=r[0]!==e,r[0]=e):(clearTimeout(r?.[3]),t._pending=r=void 0),r||(t._pending=r=[e,s.id,l?Date.now()+h:e[4]+f,void 0,l||void 0,d]),r[4]&&!p&&r[5]===d)return;if(r[5]=d,!r[4]){clearTimeout(r[3]);let S=r[2]-Date.now();if(S>0){r[3]=setTimeout(()=>Ze(t,e),S);return}r[2]=0}let m=o.map(S=>({...S,_flight:void 0}));m[i].status="pending";let g=r[4]=t.startTransition(()=>t.stores.setMatches(m),m).then(S=>(S&&t._pending===r&&r[4]===g&&!r[2]&&(r[2]=Date.now()+h),S));return}}a(Ze,"offerPending");function Bt(t,e){let o=t._pending;(t._tx===e||!t._tx?.[3].some(n=>n.id===o?.[1]))&&(clearTimeout(o?.[3]),t._pending=void 0)}a(Bt,"finishPending");async function _n(t,e){let o=t._pending;if(!o)return;clearTimeout(o[3]);let n=o[2]-Date.now();if(!o[4]||n<=0||!Qe(e[3]).some(i=>i.id===o[1]))return;let r;try{await Rt(new Promise(i=>{r=setTimeout(i,n)}),e[0].signal)}catch{}clearTimeout(r)}a(_n,"awaitPendingMinimum");function Pn(t,e){t._committed=e,t.stores.setMatches(e)}a(Pn,"publishMatches");function $r(t,e,o,n){let r=t._committed,i=t._lifecycleEnd,s=t._cache;for(let f of o)f.preload=!1,n&&(f._assetEnd=void 0);let c=Qe(o).length,l=new Map;{let f=Date.now(),d=new Set;for(let h=0;h<o.length;h++){let p=o[h];(h<c||p.status==="success")&&d.add(p.id)}for(let h of[...r,...s.values()]){if(h.status!=="success"||d.has(h.id))continue;let p=_t(t,h);!p.options.loader||f-h.updatedAt>=(h.preload?p.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:p.options.gcTime??t.options.defaultGcTime??3e5)||l.set(h.id,s.get(h.id)===h?h:{...h,_flight:void 0,isFetching:!1,context:{}})}}e[3]=[],t._cache=l;let u=t._lifecycleEnd=dn(o);Pn(t,o),j(t,[...s.values(),...r].filter(f=>f._flight&&l.get(f.id)!==f),o),hn(t,r,o,i,u,e)}a($r,"commitMatches");async function pe(t,e){let o=t._tx;for(;o&&o!==e;)e=o,await o[5],o=t._tx}a(pe,"awaitCurrent");function En(t,e,o){let n=o[1].options,r=o[2];if(!r)return t.navigate({...n,replace:!0,ignoreBlocker:!0});if(n.reloadDocument)return t.navigate({href:(r.maskedLocation??r).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});r._redirects=e[1]+1,t._pendingLocation=r;let i=t.commitLocation({...r,viewTransition:n.viewTransition,replace:!0,resetScroll:n.resetScroll,hashScrollIntoView:n.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{t._pendingLocation===r&&(t._pendingLocation=void 0)}),i}a(En,"followRedirect");async function Br(t,e,o,n,r){let i=o.map(l=>({...l}));oo(i);for(let l of n)at(t,i[l[0]]),i[l[0]]=l[3];let s=[e[2],i],c;try{c=await xn(t,s,n,e[0],r)}catch(l){throw j(t,i),l}if(Ht(c)){j(t,i),c[0]===W&&t._tx===e&&t._committed===o&&await En(t,e,c);return}if(await bn(t,c,e[0].signal),t._tx!==e||t._committed!==o){j(t,i);return}for(let l of i){let u=t._cache.get(l.id);u?._flight&&u._flight===l._flight&&(t._cache.delete(l.id),at(t,u))}Pn(t,i),j(t,o,i)}a(Br,"runBackground");async function Vr(t,e,o,n,r,i){let s=await Cn(t,e[2],e[3],[e[0],e[1],t._committed,void 0,r,o,i,n]);if(Ht(s)){let d=s[0]===W&&t._tx===e;if((!d||s[1].options.reloadDocument)&&Bt(t,e),j(t,e[3]),e[3]=[],!d)return;if(t._tx!==e){Bt(t,e);return}await En(t,e,s);return}let c=s[1];if(t._tx===e&&await _n(t,e),t._tx!==e){Bt(t,e),j(t,c),St(t,s);return}let l=e[2],u=yt(l,t.stores.resolvedLocation.get()),f=s[2];await t.startViewTransition(async()=>{if(t._tx===e&&await _n(t,e),t._tx!==e){Bt(t,e),j(t,c),St(t,s);return}let d=a(()=>{Bt(t,e),$r(t,e,c,i),t._tx===e&&(t.emit({type:"onLoad",...u}),t._tx===e&&t.emit({type:"onBeforeRouteMount",...u}))},"commit"),h=await t.startTransition(d,c);if(t._tx!==e){St(t,s);return}f?.length&&Br(t,e,c,f,s[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(l),t.stores.status.set("idle"),t._tx===e&&t.emit({type:"onResolved",...u}),h&&t._tx===e&&t.emit({type:"onRendered",...u})}),t._tx===e&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}a(Vr,"runClientTransaction");async function mn(t,e){let o=!1,n=t._tx,r=t.stores.resolvedLocation.get(),i=r??t.stores.location.get(),s=t.latestLocation,c=t._pendingLocation,l=c?.href===s.href?c._redirects??0:0,u=t._handoff,f=o?void 0:u?.[0](),d=new AbortController,h=t._preflight;if(t._preflight=d,!o&&!f&&u?.[1](),h?.abort(),!d.signal.aborted){let P=yt(s,r);t.emit({type:"onBeforeNavigate",...P}),d.signal.aborted||t.emit({type:"onBeforeLoad",...P})}if(d.signal.aborted){await pe(t,n);return}let p=i.href===s.href,m=d,g=t.matchRoutes(s,{_controller:d});oo(g);let S=f?u[1](g):void 0;if(S?m=f:f?.abort(),d.signal.aborted){j(t,g),await pe(t,n);return}t._preflight=void 0;let y,R=a(()=>Vr(t,x,p,()=>Ze(t,x),e?.sync,S),"run"),b=e?.sync?new Promise(P=>y=P):Promise.resolve().then(R),x=[m,l,s,g,Date.now(),b.then(()=>pe(t,x))];if(t._tx=x,n){for(let P of t.stores.matches.get()){if(t._tx!==x)break;P.isFetching&&Ut(t,P,!1)}n[0].abort(),j(t,n[3],x[3],!0)}if(t._tx!==x){j(t,x[3]),x[3]=[],y?.(),await pe(t,x);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(s)}),(S||!t._committed.length&&g[0]?.status!=="success"&&!g.some(P=>P._notFound))&&Ze(t,x),y?.(R()),await x[5]}a(mn,"loadClientRoute");async function gn(t,e){let o=t.buildLocation(e);for(let n=0;;n++){let r=t._committed,i=new AbortController,s,c,l;try{try{s=t.matchRoutes(o,{_controller:i}),oo(s),c=(t._preloads??=new Map).set(i,s),l=await Cn(t,o,s,[i,n,r,!0])}finally{c&&(c=c.delete(i),j(t,s)),i.abort()}if(!Ht(l))return l[1];if(!c||l.length<3)return;o=l[2]}catch(u){q(u)||console.error(u);return}}}a(gn,"preloadClientRoute");var ro="Error preloading route! \u261D\uFE0F";var ge=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,this._branch=void 0;let o=this.options,n=!o?.path&&!o?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=Y:this.parentRoute||ut();let r=n?Y:o?.path;r&&r!=="/"&&(r=ne(r));let i=o?.id||r,s=n?Y:it((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(i??""));r==="__root__"&&(r="/");let c=s==="__root__"?"/":r===void 0?this.parentRoute.fullPath:it(this.parentRoute.fullPath+"/"+r);this._path=r,this._id=s,this._fullPath=c,this._to=U(c)},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=>qo({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 so=class extends ge{static{a(this,"BaseRootRoute")}constructor(t){super(t)}};var _e=F(V(),1);function Ln({update:t,notify:e,unwatched:o}){return{link:n,unlink:r,propagate:i,checkDirty:s,shallowPropagate:c};function n(u,f,d){let h=f.depsTail;if(h!==void 0&&h.dep===u)return;let p=h!==void 0?h.nextDep:f.deps;if(p!==void 0&&p.dep===u){p.version=d,f.depsTail=p;return}let m=u.subsTail;if(m!==void 0&&m.version===d&&m.sub===f)return;let g=f.depsTail=u.subsTail={version:d,dep:u,sub:f,prevDep:h,nextDep:p,prevSub:m,nextSub:void 0};p!==void 0&&(p.prevDep=g),h!==void 0?h.nextDep=g:f.deps=g,m!==void 0?m.nextSub=g:u.subs=g}function r(u,f=u.sub){let d=u.dep,h=u.prevDep,p=u.nextDep,m=u.nextSub,g=u.prevSub;return p!==void 0?p.prevDep=h:f.depsTail=h,h!==void 0?h.nextDep=p:f.deps=p,m!==void 0?m.prevSub=g:d.subsTail=g,g!==void 0?g.nextSub=m:(d.subs=m)===void 0&&o(d),p}function i(u){let f=u.nextSub,d;t:do{let h=u.sub,p=h.flags;if(p&60?p&12?p&4?!(p&48)&&l(u,h)?(h.flags=p|40,p&=1):p=0:h.flags=p&-9|32:p=0:h.flags=p|32,p&2&&e(h),p&1){let m=h.subs;if(m!==void 0){let g=(u=m).nextSub;g!==void 0&&(d={value:f,prev:d},f=g);continue}}if((u=f)!==void 0){f=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){f=u.nextSub;continue t}break}while(!0)}function s(u,f){let d,h=0,p=!1;t:do{let m=u.dep,g=m.flags;if(f.flags&16)p=!0;else if((g&17)===17){if(t(m)){let S=m.subs;S.nextSub!==void 0&&c(S),p=!0}}else if((g&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=m.deps,f=m,++h;continue}if(!p){let S=u.nextDep;if(S!==void 0){u=S;continue}}for(;h--;){let S=f.subs,y=S.nextSub!==void 0;if(y?(u=d.value,d=d.prev):u=S,p){if(t(f)){y&&c(S),f=u.sub;continue}p=!1}else f.flags&=-33;f=u.sub;let R=u.nextDep;if(R!==void 0){u=R;continue t}}return p}while(!0)}function c(u){do{let f=u.sub,d=f.flags;(d&48)===32&&(f.flags=d|16,(d&6)===2&&e(f))}while((u=u.nextSub)!==void 0)}function l(u,f){let d=f.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}a(Ln,"createReactiveSystem");function On(t,e,o){let n=typeof t=="object",r=n?t:void 0;return{next:(n?t.next:t)?.bind(r),error:(n?t.error:e)?.bind(r),complete:(n?t.complete:o)?.bind(r)}}a(On,"toObserver");var io=[],ve=0,{link:kn,unlink:Ur,propagate:Wr,checkDirty:Nn,shallowPropagate:In}=Ln({update(t){return t._update()},notify(t){io[ao++]=t,t.flags&=-3},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=17,Se(t))}}),ye=0,ao=0,et,co=0;function lo(t){try{++co,t()}finally{--co||uo()}}a(lo,"batch");function Se(t){let e=t.depsTail,o=e!==void 0?e.nextDep:t.deps;for(;o!==void 0;)o=Ur(o,t)}a(Se,"purgeDeps");function uo(){if(!(co>0)){for(;ye<ao;){let t=io[ye];io[ye++]=void 0,t.notify()}ye=0,ao=0}}a(uo,"flush");function Re(t,e){let o=typeof t=="function",n=t,r={_snapshot:o?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:o?0:1,get(){return et!==void 0&&kn(r,et,ve),r._snapshot},subscribe(i){let s=On(i),c={current:!1},l=jr(()=>{r.get(),c.current?(et=void 0,s.next?.(r._snapshot)):c.current=!0});return{unsubscribe:a(()=>{l.stop()},"unsubscribe")}},_update(i){let s=et,c=e?.compare??Object.is;if(o)et=r,++ve,r.depsTail=void 0;else if(i===void 0)return!1;o&&(r.flags=5);try{let l=r._snapshot,u=typeof i=="function"?i(l):i===void 0&&o?n(l):i;return l===void 0||!c(l,u)?(r._snapshot=u,!0):!1}finally{et=s,o&&(r.flags&=-5),Se(r)}}};return o?(r.flags=17,r.get=function(){let i=r.flags;if(i&16||i&32&&Nn(r.deps,r)){if(r._update()){let s=r.subs;s!==void 0&&In(s)}}else i&32&&(r.flags=i&-33);return et!==void 0&&kn(r,et,ve),r._snapshot}):r.set=function(i){if(r._update(i)){let s=r.subs;s!==void 0&&(Wr(s),In(s),uo())}},r}a(Re,"createAtom");function jr(t){let e=a(()=>{let n=et;et=o,++ve,o.depsTail=void 0,o.flags=6;try{return t()}finally{et=n,o.flags&=-5,Se(o)}},"run"),o={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let n=this.flags;n&16||n&32&&Nn(this.deps,this)?e():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,Se(this)}};return e(),o}a(jr,"effect");function Kr(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(let[n,r]of t)if(!e.has(n)||!Object.is(r,e.get(n)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();let o=Fn(t);if(o.length!==Fn(e).length)return!1;for(let n=0;n<o.length;n++)if(!Object.prototype.hasOwnProperty.call(e,o[n])||!Object.is(t[o[n]],e[o[n]]))return!1;return!0}a(Kr,"shallow");function Fn(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}a(Fn,"getOwnKeys");var fo=F(V(),1),Tn=F(fr(),1);function qr(t,e){return t===e}a(qr,"defaultCompare");function H(t,e=n=>n,o){let n=o?.compare??qr,r=(0,fo.useCallback)(s=>{let{unsubscribe:c}=t.subscribe(s);return c},[t]),i=(0,fo.useCallback)(()=>t.get(),[t]);return(0,Tn.useSyncExternalStoreWithSelector)(r,i,i,e,n)}a(H,"useSelector");var Mn={};function ho(t,e){let o=_e.useRef();return n=>{let r=t?.select?t.select(n):n;return t?.structuralSharing??e.options.defaultStructuralSharing?o.current=Q(o.current,r):r}}a(ho,"useStructuralSharing");function G(t){let e=M(),o=_e.useContext(t.from?Fo:Nt),n=t.from??o,r=e.stores.getMatchStore(n);if(!1){let c=r.get();if(!c){(t.shouldThrow??!0)&&ut();return}return t.select?t.select(c):c}let i=ho(t,e),s=H(r,c=>c?i(c):Mn);if(s!==Mn)return s;(t.shouldThrow??!0)&&ut()}a(G,"useMatch");function we(t){return G({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(we,"useSearch");var Wt=F(V(),1);var xe=Wt.useLayoutEffect;var po=F(V(),1);function be(t){let e=M();return po.useCallback(o=>e.navigate({...o,from:o.from??t?.from}),[t?.from,e])}a(be,"useNavigate");var Lt=F(V(),1),rt=F(Z(),1);var wt=class extends Lt.Component{static{a(this,"CatchBoundary")}constructor(...t){super(...t),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(t,e){let o=t.getResetKey();return e.error&&e.resetKey!==o?{resetKey:o,error:0}:{resetKey:o}}static getDerivedStateFromError(t){return{error:[t]}}componentDidCatch(t,e){this.props.onCatch?.(t,e)}render(){let t=this.state.error;return t?Lt.createElement(this.props.errorComponent??mo,{error:t[0],reset:this.reset}):this.props.children}};function mo({error:t}){let[e,o]=Lt.useState(!1);return(0,rt.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,rt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,rt.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,rt.jsx)("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:a(()=>o(n=>!n),"onClick"),children:e?"Hide Error":"Show Error"})]}),(0,rt.jsx)("div",{style:{height:".25rem"}}),e?(0,rt.jsx)("div",{children:(0,rt.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t?.message?(0,rt.jsx)("code",{children:t.message}):null})}):null]})}a(mo,"ErrorComponent");var go=F(V(),1),An=F(Z(),1);var Dn=a(()=>!0,"getSnapshot"),Gr=a(()=>!1,"getServerSnapshot");function $n({children:t,fallback:e=null}){return(0,An.jsx)(go.default.Fragment,{children:yo()?t:e})}a($n,"ClientOnly");function yo(t=!0){return go.default.useSyncExternalStore(Jr,Dn,t?Gr:Dn)}a(yo,"useHydrated");function Jr(){return()=>{}}a(Jr,"subscribe");function vo(t){return G({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:a(e=>t.select?t.select(e.loaderData):e.loaderData,"select")})}a(vo,"useLoaderData");function So(t){let{select:e,...o}=t;return G({...o,select:a(n=>e?e(n.loaderDeps):n.loaderDeps,"select")})}a(So,"useLoaderDeps");function Ro(t){return G({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(Ro,"useParams");function _o(t){return G({...t,select:a(e=>t.select?t.select(e.context):e.context,"select")})}a(_o,"useRouteContext");var B=F(V(),1);var Yr=F(Z(),1);function Xr(...t){let e=B.useRef(t),o=e.current;return t.forEach((n,r)=>{J(o[r],n,!1,!0)||(o[r]=n)}),e.current}a(Xr,"useStableValues");function Ce(t,e){t.preloadRoute(e).catch(o=>{console.warn(o),console.warn(ro)})}a(Ce,"preloadLink");var Zr={compare:a((t,e)=>t[0]===e[0]&&t[1]===e[1],"compare")};function Bn(t,e){let o=typeof t=="string"&&st(t);if(o)return e.has(o)?t:null}a(Bn,"resolveExternalLink");function Vn(t,e,o,n,r){let i=re(t.pathname,n),s=re(e.pathname,n);return(o?.exact?i!==s:!(i.startsWith(s)&&(i.length===s.length||i[s.length]==="/")))||(o?.includeSearch??!0)&&!J(t.search,e.search,!o?.exact,o?.explicitUndefined)?!1:o?.includeHash?r&&t.hash===e.hash:!0}a(Vn,"resolveIsActive");function Qr(t,e,o){let n=M();if(!1)return os(n,t,e,o);let r=B.useRef(null),i=B.useCallback($=>{if(r.current=$,typeof e=="function")return e($);e&&(e.current=$)},[e]),{activeOptions:s,to:c,preload:l,preloadDelay:u,hashScrollIntoView:f,replace:d,startTransition:h,resetScroll:p,viewTransition:m,ignoreBlocker:g,disabled:S,target:y,onClick:R,onBlur:b,onFocus:x,onMouseEnter:P,onMouseLeave:_,onTouchStart:v}=t,w=yo(!!s?.includeHash),[E,L,k]=Xr(t.search,t.params,s),[C,O]=B.useMemo(()=>[t,{...t}],[n,t.from,t._fromLocation,t.hash,t.to,E,L,t.state,t.mask,t.unsafeRelative]),N=B.useMemo(()=>{let $=Bn(c,n.protocolAllowlist);if($!==void 0){let Qt=[$??void 0];return()=>Qt}let z,Zt;return Qt=>{C._fromLocation||(O._fromLocation=Qt);let Io=n.buildLocation(O),Ot=Wn(Io,n,S);return(!z||z[0]!==Ot)&&(z=[Ot,!(S||Ot&&!st(Ot))&&void 0],Zt=[Ot,!0]),z[1]!==void 0&&Vn(Qt,Io,k,n.basepath,w)?Zt:z}},[k,S,w,C,O,n,c]),[T,A]=H(n.stores.location,N,Zr),Gt=A===void 0&&T,Jt=S||T===void 0,Yt=B.useRef(!1),lt=t.reloadDocument||Gt||Jt?!1:l??n.options.defaultPreload,ke=u??n.options.defaultPreloadDelay??0,Xt=B.useCallback($=>{let z=$?.isIntersecting;if(!(z??lt==="intent")){z===!1&&wo(r);return}if(!ke){Ce(n,C);return}jt.has(r)||jt.set(r,setTimeout(()=>{jt.delete(r),Ce(n,C)},ke))},[n,C,r,lt,ke]);B.useEffect(()=>{if(!lt)return;lt==="render"&&!Yt.current&&(Yt.current=!0,Ce(n,C));let $=!0,z;return lt==="viewport"&&r.current&&typeof IntersectionObserver=="function"&&(z=new IntersectionObserver(Zt=>{$&&Xt(Zt.pop())},{rootMargin:"100px"}),z.observe(r.current)),()=>{$=!1,z?.disconnect(),wo(r)}},[n,C,lt,Xt,r]);let ot=zn(t,o);if(ot.ref=e?i:r,Gt)return ot.href=Gt,ot;let lr=a($=>{let z=y??$.currentTarget.getAttribute("target");!Jt&&!($.metaKey||$.altKey||$.ctrlKey||$.shiftKey)&&!$.defaultPrevented&&(!z||z==="_self")&&$.button===0&&($.preventDefault(),n.navigate({...C,replace:d,resetScroll:p,hashScrollIntoView:f,startTransition:h,viewTransition:m,ignoreBlocker:g}))},"handleClick"),ur=a(()=>{lt==="intent"&&Ce(n,C)},"handleTouchStart"),ko=a(()=>{lt==="intent"&&wo(r)},"handleLeave");return ot.onClick=kt(R,lr),ot.onBlur=kt(b,ko),ot.onFocus=kt(x,Xt),ot.onMouseEnter=kt(P,Xt),ot.onMouseLeave=kt(_,ko),ot.onTouchStart=kt(v,ur),Un(ot,t,A,T,Jt,o)}a(Qr,"useLinkProps");var ts={},es={className:"active"},Hn=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","_fromLocation","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function zn(t,e){let o={};for(let n in t)Hn.has(n)||n==="type"&&e!==void 0||n==="disabled"&&e==="a"||(o[n]=t[n]);return o}a(zn,"collectElementProps");function Un(t,e,o,n,r,i){let{activeProps:s,inactiveProps:c,className:l,style:u,target:f}=e,d=pt(o?s:c,{})??(o?es:ts);Object.assign(t,d),t.href=n,i!=="a"&&(t.disabled=r),t.target=f;let h=d.style;(u||h)&&(t.style=u&&h?{...u,...h}:u||h);let p=d.className;return(l||p)&&(t.className=l?p?`${l} ${p}`:l:p),r&&(t.role="link",t["aria-disabled"]=!0),o&&(t["data-status"]="active",t["aria-current"]="page"),t}a(Un,"applyLinkState");function os(t,e,o,n){let{to:r,disabled:i,activeOptions:s}=e,c=Bn(r,t.protocolAllowlist),l=c===void 0?t.buildLocation(e):void 0,u=l?Wn(l,t,i):c??void 0,f=i||!u,d=c??(u&&st(u)?u:void 0),h=zn(e,n);return h.ref=o,d?(h.href=d,h):Un(h,e,!!l&&!(!i&&!u)&&Vn(t.stores.location.get(),l,s,t.basepath,!1),u,f,n)}a(os,"getServerLinkProps");var jt=new WeakMap,wo=a(t=>{clearTimeout(jt.get(t)),jt.delete(t)},"cancelPreload"),kt=a((t,e)=>t?o=>o.defaultPrevented||(t(o),o.defaultPrevented||e(o)):e,"composeHandlers");function Wn(t,e,o){if(o)return;let n=t.maskedLocation??t,r=n.external?n.publicHref:e.history.createHref(n.publicHref)||"/";if(!((n.external||r!==n.publicHref)&&Mt(r,e.protocolAllowlist)))return r}a(Wn,"getHrefOption");var xo=B.memo(B.forwardRef((t,e)=>{let o=t._asChild||"a",n=Qr(t,e,o),r=typeof t.children=="function"?t.children({isActive:n["data-status"]==="active"}):t.children;return B.createElement(o,n,r)}),ns);function ns(t,e){let o=0;for(let n in e)if(o++,t[n]!==e[n]&&(!Hn.has(n)||!J(t[n],e[n],!1,!0)))return!1;for(let n in t)o--;return o===0}a(ns,"areLinkPropsEqual");var bo=F(V(),1),Co=F(Z(),1);var jn=class extends ge{static{a(this,"Route")}constructor(t){super(t),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>_o({...e,from:this.id}),this.useSearch=e=>we({...e,from:this.id}),this.useParams=e=>Ro({...e,from:this.id}),this.useLoaderDeps=e=>So({...e,from:this.id}),this.useLoaderData=e=>vo({...e,from:this.id}),this.useNavigate=()=>be({from:this.fullPath}),this.Link=bo.default.forwardRef((e,o)=>(0,Co.jsx)(xo,{ref:o,from:this.fullPath,...e}))}};function rs(t){return new jn(t)}a(rs,"createRoute");var Kn=class extends so{static{a(this,"RootRoute")}constructor(t){super(t),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>_o({...e,from:this.id}),this.useSearch=e=>we({...e,from:this.id}),this.useParams=e=>Ro({...e,from:this.id}),this.useLoaderDeps=e=>So({...e,from:this.id}),this.useLoaderData=e=>vo({...e,from:this.id}),this.useNavigate=()=>be({from:this.fullPath}),this.Link=bo.default.forwardRef((e,o)=>(0,Co.jsx)(xo,{ref:o,from:this.fullPath,...e}))}};function ss(t){return new Kn(t)}a(ss,"createRootRoute");var gc=F(V(),1);var Pe=F(Z(),1);function qn(t){let e=M();if(!1){let n=`not-found-${e.stores.location.get().pathname}-${e.stores.status.get()}`;return(0,Pe.jsx)(wt,{getResetKey:a(()=>n,"getResetKey"),onCatch:a((r,i)=>{if(q(r))t.onCatch?.(r,i);else throw r},"onCatch"),errorComponent:a(({error:r})=>{if(q(r))return t.fallback?.(r);throw r},"errorComponent"),children:t.children})}let o=`not-found-${H(e.stores.location,n=>n.pathname)}-${H(e.stores.status)}`;return(0,Pe.jsx)(wt,{getResetKey:a(()=>o,"getResetKey"),onCatch:a((n,r)=>{if(q(n))t.onCatch?.(n,r);else throw n},"onCatch"),errorComponent:a(({error:n})=>{if(q(n))return t.fallback?.(n);throw n},"errorComponent"),children:t.children})}a(qn,"CatchNotFound");function Gn(){return(0,Pe.jsx)("p",{children:"Not Found"})}a(Gn,"DefaultGlobalNotFound");var Jn=F(Z(),1);function Yn({children:t}){let e=M();return null}a(Yn,"ScriptOnce");var bc=F(V(),1),Ee=F(Z(),1);function Po(t,e,o){return e.options.notFoundComponent?(0,Ee.jsx)(e.options.notFoundComponent,{...o}):t.options.defaultNotFoundComponent?(0,Ee.jsx)(t.options.defaultNotFoundComponent,{...o}):(0,Ee.jsx)(Gn,{})}a(Po,"renderRouteNotFound");var Zn=F(Z(),1);function Xn(t){return null}a(Xn,"getScrollRestorationScriptForRouter");function Qn(){let t=Xn(M());return t?(0,Zn.jsx)(Yn,{children:t}):null}a(Qn,"ScrollRestoration");var K=F(V(),1);var D=F(Z(),1);function Kt(t,e){let o=e?.options.pendingComponent??t.options.defaultPendingComponent;return o?(0,D.jsx)(o,{}):null}a(Kt,"renderPending");var is=a((t,e)=>t[0]===e[0]&&t[1]===e[1],"outletMatchSelectionEqual"),er=a((t,e,o)=>!e.isRoot||e.options.shellComponent||e.options.wrapInSuspense||o===!1||o==="data-only"||!t.ssr,"canWrapInSuspense"),Le=K.memo(a(function({routeId:e}){let o=M();return(0,D.jsx)(tr,{router:o,match:H(o.stores.getMatchStore(e))})},"MatchImpl"));function tr({router:t,match:e}){let o=t.routesById[e.routeId],n=Kt(t,o),r=o.options.errorComponent??t.options.defaultErrorComponent,i=o.options.onCatch??t.options.defaultOnCatch,s=o.isRoot?o.options.notFoundComponent??t.options.notFoundRoute?.options.component:o.options.notFoundComponent,c=e.ssr===!1||e.ssr==="data-only",l=er(t,o,e.ssr)&&(o.options.wrapInSuspense??n??(o.options.errorComponent?.preload||c)),u=(0,D.jsx)(as,{match:e});c&&(u=(0,D.jsx)($n,{fallback:n,children:u})),s&&(u=(0,D.jsx)(qn,{fallback:a(h=>{if(h.routeId??=e.routeId,h.routeId!==e.routeId)throw h;return K.createElement(s,h)},"fallback"),children:u})),r&&(u=(0,D.jsx)(wt,{getResetKey:a(()=>e,"getResetKey"),errorComponent:r,onCatch:a((h,p)=>{if(q(h))throw h.routeId??=e.routeId,h;i?.(h,p)},"onCatch"),children:u})),l&&(u=(0,D.jsx)(K.Suspense,{fallback:n,children:u}));let f=null,d=o.isRoot?o.options.shellComponent:void 0;return(0,D.jsx)(Nt.Provider,{value:e.routeId,children:d?(0,D.jsxs)(d,{children:[u,f]}):(0,D.jsxs)(D.Fragment,{children:[u,f]})})}a(tr,"MatchView");var as=K.memo(a(function({match:e}){let o=M(),n=e.routeId,r=o.routesById[n],i=K.useMemo(()=>{let c=(r.options.remountDeps??o.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return c?JSON.stringify(c):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,o.options.defaultRemountDeps]),s=K.useMemo(()=>{let c=r.options.component??o.options.defaultComponent;return c?(0,D.jsx)(c,{},i):(0,D.jsx)(or,{})},[i,r.options.component,o.options.defaultComponent]);if(e.status==="pending"){if(o.ssr&&!er(o,r,e.ssr))return s;if(o._tx)throw o._tx[5];return Kt(o,r)}if(e.status==="notFound")return Po(o,r,e.error);if(e.status==="error"){if(!1)return(0,D.jsx)((r.options.errorComponent??o.options.defaultErrorComponent)||mo,{error:e.error,reset:void 0,info:{componentStack:""}});throw e.error}return s},"MatchInnerImpl")),or=K.memo(a(function(){let e=M(),o=K.useContext(Nt),n,r,i;if(!1){let c=e.stores.matches.get(),l=c.findIndex(f=>f.routeId===o),u=c[l];n=!!u._notFound,r=u.error,i=c[l+1]?.routeId}else{let c=e.stores.getMatchStore(o);[n,r]=H(c,l=>[!!l._notFound,l.error],{compare:is}),i=H(e.stores.ids,l=>l[l.indexOf(o)+1])}if(n)return Po(e,e.routesById[o],r);if(!i)return null;let s=(0,D.jsx)(Le,{routeId:i});return o===Y?(0,D.jsx)(K.Suspense,{fallback:Kt(e),children:s}):s},"OutletImpl"));var Eo=F(V(),1);function Lo(t,e){let o=t[1];t.length=0,o?.(e)}a(Lo,"settleOwner");function nr({t}){let e=M(),o=e._rendered??=[],n=void 0;return e.startTransition=(r,i)=>new Promise(s=>{Lo(o,!1),o.push(i,s),t(e),Eo.startTransition(r)}),xe(()=>{let r=e.history.subscribe(e.load);if(n?.current)return r;n&&(n.current=!0),e.updateLatestLocation();let i=e.latestLocation,s=e.buildLocation({to:i.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(U(i.publicHref)!==U(s.publicHref))return e.commitLocation({...s,replace:!0,ignoreBlocker:!0}),r;let c=e.stores.resolvedLocation.get();return c?.href===i.href&&c.state.__TSR_key===i.state.__TSR_key?o.push(e.stores.matches.get(),l=>{l&&e.emit({type:"onRendered",...yt(c,c)})}):e._tx||e.load({sync:!0}).catch(console.error),r},[e,e.history]),null}a(nr,"Transitioner");var It=F(V(),1);var X=F(Z(),1);function sr(){let t=M(),e=t.routesById[Y],o=Kt(t,e),n=(0,X.jsxs)(X.Fragment,{children:[!!1&&(0,X.jsx)(nr,{t:It.useState()[1]}),t.ssr?(0,X.jsx)(rr,{}):(0,X.jsx)(It.Suspense,{fallback:o,children:(0,X.jsx)(rr,{})})]});return t.options.InnerWrap?(0,X.jsx)(t.options.InnerWrap,{children:n}):n}a(sr,"Matches");function rr(){let t=M(),e=t._rendered,o=H(t.stores.matches,s=>e[0]??s),n=o[0],r=n?.routeId;xe(()=>{e[0]===o&&Lo(e,!0)},[e,o]);let i=r?(0,X.jsx)(Le,{routeId:r}):null;return t.options.disableGlobalCatchBoundary?i:(0,X.jsx)(wt,{getResetKey:a(()=>n,"getResetKey"),onCatch:void 0,children:i})}a(rr,"MatchesInner");var ir=a(t=>({createMutableStore:Re,createReadonlyStore:Re,batch:lo}),"getStoreFactory");var cs=a(t=>new ar(t),"createRouter"),ar=class extends Je{static{a(this,"Router")}constructor(t){super(t,ir)}};var yl=F(V(),1),qt=F(Z(),1);function cr({router:t,children:e,...o}){Ft(o)&&t.update({...t.options,...o,context:{...t.options.context,...o.context}});let n=(0,qt.jsx)(te.Provider,{value:t,children:e});return t.options.Wrap?(0,qt.jsx)(t.options.Wrap,{children:n}):n}a(cr,"RouterContextProvider");function ls({router:t,...e}){return(0,qt.jsx)(cr,{router:t,...e,children:(0,qt.jsx)(sr,{})})}a(ls,"RouterProvider");function us(t){let e=M({warn:t?.router===void 0}),o=t?.router||e;if(!1){let n=o.stores.__store.get();return t?.select?t.select(n):n}return H(o.stores.__store,ho(t,o))}a(us,"useRouterState");export{Ue as a,kr as b,M as c,lo as d,Re as e,Kr as f,H as g,we as h,be as i,rs as j,ss as k,or as l,cs as m,ls as n,us as o};
@@ -0,0 +1 @@
1
+ import{h as u,p as f}from"./chunk-HJHSQPHW.js";import{a as s,d as l,e as h,f as S}from"./chunk-I26MS5PJ.js";var i=l(S(),1),c=l(h(),1);var g=s(()=>{let t=(0,i.c)(4),[a,n]=(0,c.useState)(!1),[e,m]=(0,c.useState)(null),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s(p=>{f((async()=>{n(!0),m(null);try{await p()}catch(b){m(u(b))}n(!1)})())},"e"),t[0]=r):r=t[0];let y=r,o;return t[1]!==a||t[2]!==e?(o={busy:a,error:e,run:y},t[1]=a,t[2]=e,t[3]=o):o=t[3],o},"g");export{g as a};
@@ -0,0 +1 @@
1
+ import{G as ve,H as Ce,c as Z,d as fe,f as he,fa as Pe,g as ge,ga as G,h as ye,ha as Re,i as Se,ia as we,ja as be,ka as Ee,ta as xe}from"./chunk-NXQW5E6W.js";import{b as Y}from"./chunk-UC7MNI2F.js";import{F as U,H as j,M as V,N,e as de}from"./chunk-MVWZMWPD.js";import{a as Ye}from"./chunk-SJQERRSZ.js";import{a as ue}from"./chunk-7Y3SY37W.js";import{a as v,c as E,e as le,i as pe,r as me,w as W}from"./chunk-AUAECCXB.js";import{c as ce,g as w,i as D}from"./chunk-BOMPSVRC.js";import{a as n,d as R,e as B,g as je}from"./chunk-I26MS5PJ.js";var Te=class{static{n(this,"BasePopupHandle")}attachedStores=[];attachedStoreValue=null;storeListeners=new Set;constructor(t,o,r=!0){this.fallbackStore=t,this.componentName=o,this.throwOnMissingTrigger=r}get attachedStore(){return this.attachedStoreValue}get store(){return this.attachedStoreValue??this.fallbackStore}get serverStore(){return this.fallbackStore}subscribeStore(t){return this.storeListeners.add(t),()=>{this.storeListeners.delete(t)}}attachStore(t){return this.attachedStores.push(t),this.setActiveStore(t),()=>{let o=this.attachedStores.lastIndexOf(t);o!==-1&&this.attachedStores.splice(o,1),this.setActiveStore(this.attachedStores[this.attachedStores.length-1]??null)}}setActiveStore(t){this.attachedStoreValue!==t&&(this.attachedStoreValue=t,this.storeListeners.forEach(o=>{o()}))}openByTrigger(t){let o=this.attachedStore;if(o===null)return;let r;if(t){for(let s=this.attachedStores.length-1;s>=0&&!r;s-=1)r=this.attachedStores[s].context.triggerElements.getById(t);r??=this.fallbackStore.context.triggerElements.getById(t)}if(t&&!r&&this.throwOnMissingTrigger)throw new Error(ce(99,this.componentName,t,this.componentName));o.setOpen(!0,N(V.imperativeAction,void 0,r))}closePopup(){let t=this.attachedStore;t!==null&&t.setOpen(!1,N(V.imperativeAction))}};var ee=R(B(),1),Oe=R(Ye(),1);function rt(e){let t=ee.useCallback(r=>e===void 0?w:e.subscribeStore(r),[e]),o=ee.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,Oe.useSyncExternalStore)(t,o,()=>e?.serverStore)}n(rt,"usePopupHandleStore");var Ae=R(B(),1),te=R(ue(),1);function lt(e,t){let o=Ae.useRef(null);function r(i){te.flushSync(()=>{e.setOpen(!1,N(V.focusOut,i.nativeEvent,i.currentTarget))}),ye(o.current)?.focus()}n(r,"handlePreFocusGuardFocus");function s(i){let u=e.select("positionerElement");if(u&&Se(i,u))e.context.beforeContentFocusGuardRef.current?.focus();else{te.flushSync(()=>{e.setOpen(!1,N(V.focusOut,i.nativeEvent,i.currentTarget))});let a=ge(e.context.triggerFocusTargetRef.current||t.current);for(;a!==null&&de(u,a);){let l=a;if(a=he(a),a===l)break}a?.focus()}}return n(s,"handleFocusTargetFocus"),{preFocusGuardRef:o,handlePreFocusGuardFocus:r,handleFocusTargetFocus:s}}n(lt,"useTriggerFocusGuards");var c=R(B(),1),Le=R(ue(),1);var F=R(B(),1);function oe(e){let t=me(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,s=pe(e),i=s?e.offsetWidth:o,u=s?e.offsetHeight:r;return(Z(o)!==i||Z(r)!==u)&&(o=i,r=u),{width:o,height:r}}n(oe,"getCssDimensions");var H="--popup-width",_="--popup-height";function Ne(e){let{popupElement:t,positionerElement:o,content:r,mounted:s,onMeasureLayout:i,onMeasureLayoutComplete:u,side:a,direction:l}=e,g=j(t,!0),C=U(),p=F.useRef(null),d=F.useRef(!0),m=F.useRef(w),y=E(i),h=E(u),b=F.useMemo(()=>Ge(a,l),[a,l]);v(()=>{if(!s){m.current=w,d.current=!0,p.current=null;return}if(!t||!o)return;m.current=Ve(t,b),ne(t,"auto");let I=q(t,"position","static"),x=q(t,"transform","none"),S=q(t,"scale","1"),T=Ve(o,{[Re]:"max-content",[we]:"max-content"});function X(){I(),x(),T()}n(X,"restoreMeasurementOverrides");function L(){X(),S()}if(n(L,"restoreMeasurementOverridesIncludingScale"),y?.(),d.current||p.current===null){K(o,"max-content");let A=oe(t);return p.current=A,K(o,A),L(),h?.(null,A),d.current=!1,()=>{m.current(),m.current=w}}K(o,"max-content");let O=p.current,P=oe(t);p.current=P,ne(t,O),L(),h?.(O,P),K(o,P);let $=new AbortController;return C.request(()=>{ne(t,P),g(()=>{t.style.setProperty(H,"auto"),t.style.setProperty(_,"auto")},$.signal)}),()=>{$.abort(),C.cancel(),m.current(),m.current=w}},[r,t,o,g,C,s,y,h,b])}n(Ne,"usePopupAutoResize");function Ge(e,t){let o=e==="top",r=e==="left"||e===(t==="rtl"?"inline-end":"inline-start");return!o&&!r?D:{position:"absolute",[o?"bottom":"top"]:"0",[r?"right":"left"]:"0"}}n(Ge,"getPopupAnchoringStyles");function q(e,t,o){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,o),()=>{e.style.setProperty(t,r)}}n(q,"overrideElementStyle");function Ve(e,t){let o=[];for(let[r,s]of Object.entries(t))o.push(q(e,r,s));return o.length?()=>{o.forEach(r=>r())}:w}n(Ve,"applyElementStyles");function ne(e,t){let o=t==="auto"?"auto":`${t.width}px`,r=t==="auto"?"auto":`${t.height}px`;e.style.setProperty(H,o),e.style.setProperty(_,r)}n(ne,"setPopupCssSize");function K(e,t){let o=t==="max-content"?"max-content":`${t.width}px`,r=t==="max-content"?"max-content":`${t.height}px`;e.style.setProperty(be,o),e.style.setProperty(Ee,r)}n(K,"setPositionerCssSize");var Fe={name:"adaptiveOrigin",async fn(e){let{x:t,y:o,rects:{floating:r},elements:{floating:s},platform:i,strategy:u,placement:a}=e,l=le(s),g=l.getComputedStyle(s);if(!(g.transitionDuration!=="0s"&&g.transitionDuration!==""))return{x:t,y:o,data:G};let p=await i.getOffsetParent?.(s),d={width:0,height:0};if(u==="fixed"&&l?.visualViewport)d={width:l.visualViewport.width,height:l.visualViewport.height};else if(p===l){let x=W(s);d={width:x.documentElement.clientWidth,height:x.documentElement.clientHeight}}else await i.isElement?.(p)&&(d=await i.getDimensions(p));let m=fe(a),y=t,h=o;m==="left"&&(y=d.width-(t+r.width)),m==="top"&&(h=d.height-(o+r.height));let b=m==="left"?"right":G.sideX,I=m==="top"?"bottom":G.sideY;return{x:y,y:h,data:{sideX:b,sideY:I}}}};var Me="data-activation-direction";var M=R(je(),1);var Yt={activationDirection:n(e=>e?{[Me]:e}:null,"activationDirection")};function Gt(e){let{store:t,side:o,children:r}=e,s=Y(),i=t.useState("activeTriggerElement"),u=t.useState("activeTriggerId"),a=t.useState("open"),l=t.useState("payload"),g=t.useState("mounted"),C=t.useState("popupElement"),p=t.useState("positionerElement"),d=xe(a?i:null),m=Je(u,l),y=c.useRef(null),[h,b]=c.useState(null),[I,x]=c.useState(null),S=c.useRef(null),T=c.useRef(null),X=j(S,!0),L=U(),O=c.useRef(null),[P,$]=c.useState(null),[A,J]=c.useState(!1);v(()=>(t.set("adaptiveOrigin",Fe),()=>{t.set("adaptiveOrigin",void 0)}),[t]);let ke=E(()=>{S.current?.style.setProperty("animation","none"),S.current?.style.setProperty("transition","none"),T.current?.style.setProperty("display","none")}),Be=E(f=>{S.current?.style.removeProperty("animation"),S.current?.style.removeProperty("transition"),T.current?.style.removeProperty("display"),f&&$(f)}),ie=E(()=>{O.current?.abort();let f=new AbortController;O.current=f,X(()=>{b(null),$(null),y.current=null},f.signal)}),z=c.useRef(null);v(()=>{(!a||!g)&&(z.current=null)},[a,g]),v(()=>{if(i&&d&&i!==d&&z.current!==i&&y.current){b(y.current),J(!0);let f=Xe(d,i);x(f),z.current=i}},[i,d]),v(()=>{h!=null&&(O.current?.abort(),J(!0),L.request(()=>{Le.flushSync(()=>{J(!1)}),ie()}))},[m,h,ie,L]),v(()=>{let f=S.current;if(!f)return;let ae=W(f).createElement("div");for(let Ue of Array.from(f.childNodes))ae.appendChild(Ue.cloneNode(!0));y.current=ae});let se=h!=null,Q;se?Q=(0,M.jsxs)(c.Fragment,{children:[(0,M.jsx)("div",{"data-previous":!0,inert:Pe(!0),ref:T,style:{...P?{[H]:`${P.width}px`,[_]:`${P.height}px`}:null,position:"absolute"},"data-ending-style":A?void 0:""},"previous"),(0,M.jsx)("div",{"data-current":!0,ref:S,"data-starting-style":A?"":void 0,children:r},m)]}):Q=(0,M.jsx)("div",{"data-current":!0,ref:S,children:r},m),v(()=>{let f=T.current;!f||!h||f.replaceChildren(...Array.from(h.childNodes))},[h]),Ne({popupElement:C,positionerElement:p,mounted:g,content:l,onMeasureLayout:ke,onMeasureLayoutComplete:Be,side:o,direction:s});let We={activationDirection:qe(I),transitioning:se};return{children:Q,state:We}}n(Gt,"usePopupViewport");function qe(e){if(e)return`${Ie(e.horizontal,5,"right","left")} ${Ie(e.vertical,5,"down","up")}`}n(qe,"getActivationDirection");function Ie(e,t,o,r){return e>t?o:e<-t?r:""}n(Ie,"getValueWithTolerance");function Xe(e,t){let o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),s={x:o.left+o.width/2,y:o.top+o.height/2},i={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:i.x-s.x,vertical:i.y-s.y}}n(Xe,"calculateRelativePosition");function Je(e,t){let[o,r]=c.useState(0),s=c.useRef(e),i=c.useRef(t),u=c.useRef(!1);return v(()=>{let a=s.current,l=i.current,g=e!==a,C=t!==l;g?(r(p=>p+1),u.current=!C):u.current&&C&&(r(p=>p+1),u.current=!1),s.current=e,i.current=t},[e,t]),`${e??"current"}-${o}`}n(Je,"usePopupContentKey");function zt(e,t,o=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Ce({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:o,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:D,inactiveTriggerProps:D,popupProps:D}}n(zt,"createInitialPopupStoreState");var k=n(e=>e.triggerIdProp??e.activeTriggerId,"activeTriggerIdSelector"),re=n(e=>e.openProp??e.open,"openSelector"),$e=n(e=>(e.popupElement?.id??e.floatingId)||void 0,"popupIdSelector");function He(e,t){return t!==void 0&&re(e)&&k(e)===t}n(He,"triggerOwnsOpenPopup");function ze(e,t){return He(e,t)?!0:t!==void 0&&re(e)&&k(e)==null&&e.triggerCount===1}n(ze,"triggerOwnsOpenPopupOrIsOnlyTrigger");var Qt={open:re,mounted:n(e=>e.mounted,"mounted"),transitionStatus:n(e=>e.transitionStatus,"transitionStatus"),floatingRootContext:n(e=>e.floatingRootContext,"floatingRootContext"),triggerCount:n(e=>e.triggerCount,"triggerCount"),preventUnmountingOnClose:n(e=>e.preventUnmountingOnClose,"preventUnmountingOnClose"),payload:n(e=>e.payload,"payload"),activeTriggerId:k,activeTriggerElement:n(e=>e.mounted?e.activeTriggerElement:null,"activeTriggerElement"),popupId:$e,isTriggerActive:n((e,t)=>t!==void 0&&k(e)===t,"isTriggerActive"),isOpenedByTrigger:n((e,t)=>He(e,t),"isOpenedByTrigger"),isMountedByTrigger:n((e,t)=>t!==void 0&&k(e)===t&&e.mounted,"isMountedByTrigger"),triggerProps:n((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,"triggerProps"),triggerPopupId:n((e,t)=>ze(e,t)?$e(e):void 0,"triggerPopupId"),popupProps:n(e=>e.popupProps,"popupProps"),popupElement:n(e=>e.popupElement,"popupElement"),positionerElement:n(e=>e.positionerElement,"positionerElement")};var _e=class extends ve{static{n(this,"NullStore")}setState(t){}update(t){}set(t,o){}notifyAll(){}};export{Te as a,zt as b,Qt as c,rt as d,_e as e,lt as f,Yt as g,Gt as h};
@@ -0,0 +1 @@
1
+ import{a as N}from"./chunk-RWVIV3U7.js";import{a as q,b as A,c as M,d as w,e as C,f as E}from"./chunk-HCTJKP5J.js";import{a as v}from"./chunk-2IKDEUCX.js";import{d as g,h as j,o as L,p as S}from"./chunk-HJHSQPHW.js";import{a as u,d as x,e as H,f as I,g as R}from"./chunk-I26MS5PJ.js";var Q=x(I(),1),d=x(H(),1);var a=x(R(),1);var T={volume:"Request volume per function",latency:"Latency p50 / p95 per function",hotShards:"Hot shards"},O=Object.keys(T),P={error:null,loading:!0,rows:null},$=u(s=>Object.keys(s[0]??{}),"B"),U=u(s=>{let e=(0,Q.c)(22),{state:y,title:o}=s,l=g(),{error:t,loading:r,rows:n}=y,c;if(e[0]!==t||e[1]!==r||e[2]!==n||e[3]!==l||e[4]!==o){let b=n===null?[]:$(n),i;e[6]!==l||e[7]!==o?(i=l(o),e[6]=l,e[7]=o,e[8]=i):i=e[8];let p;e[9]!==i?(p=(0,a.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,a.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:i})}),e[9]=i,e[10]=p):p=e[10];let m;e[11]!==r||e[12]!==l?(m=r&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-loading",children:l("Loading\u2026")}),e[11]=r,e[12]=l,e[13]=m):m=e[13];let h;e[14]!==t||e[15]!==r?(h=!r&&t!==null&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"analytics-error",role:"alert",children:t}),e[14]=t,e[15]=r,e[16]=h):h=e[16];let f;e[17]!==t||e[18]!==r||e[19]!==n||e[20]!==l?(f=!r&&t===null&&n!==null&&n.length===0&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-empty-rows",children:l("No data points yet.")}),e[17]=t,e[18]=r,e[19]=n,e[20]=l,e[21]=f):f=e[21],c=(0,a.jsxs)(v,{className:"gap-0 py-0","data-testid":`analytics-panel-${o}`,children:[p,m,h,f,!r&&t===null&&n!==null&&n.length>0&&(0,a.jsxs)(q,{children:[(0,a.jsx)(A,{children:(0,a.jsx)(w,{children:b.map(W)})}),(0,a.jsx)(M,{children:n.map((V,B)=>(0,a.jsx)(w,{children:b.map(k=>(0,a.jsx)(E,{className:"font-mono text-xs",children:L(V[k])},k))},B))})]})]}),e[0]=t,e[1]=r,e[2]=n,e[3]=l,e[4]=o,e[5]=c}else c=e[5];return c},"V"),G=u(({runQuery:s}={})=>{let e=g(),[y,o]=(0,d.useState)({}),l=(0,d.useCallback)(async t=>{if(s!==void 0)for(let r of O){if(t.cancelled)return;o(n=>({...n,[r]:P}));try{let{rows:n}=await s(r);t.cancelled||o(c=>({...c,[r]:{error:null,loading:!1,rows:n}}))}catch(n){t.cancelled||o(c=>({...c,[r]:{error:j(n),loading:!1,rows:null}}))}}},[s]);return(0,d.useEffect)(()=>{let t={cancelled:!1};return S(l(t)),()=>{t.cancelled=!0}},[l]),s===void 0?(0,a.jsx)(N,{description:e("Analytics usage panels read through your worker, never from the browser. Pass studio.analyticsSqlQuery, a runner that calls an admin-only action running functionUsageQuery(panel) through ctx.analyticsSql, to enable these panels."),icon:(0,a.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"})}),testId:"analytics-not-configured",title:e("Analytics usage panels are not wired up.")}):(0,a.jsx)("div",{className:"flex flex-col gap-4","data-testid":"lunora-analytics-panel",children:O.map(t=>(0,a.jsx)(U,{state:y[t]??P,title:T[t]},t))})},"X");function W(s){return(0,a.jsx)(C,{children:s},s)}u(W,"$");export{G as AnalyticsPanel};
@@ -0,0 +1 @@
1
+ import{a as ot}from"./chunk-VXEC3UCO.js";import"./chunk-Q6IT6ZD7.js";import"./chunk-FWNCU5GC.js";import"./chunk-NQZALRU3.js";import"./chunk-OPM7ESDV.js";import"./chunk-Y3AYVFTK.js";import{a as Re}from"./chunk-37WYCOQ2.js";import{a as it}from"./chunk-SV764LKQ.js";import"./chunk-OYCUPD3Q.js";import"./chunk-NXQW5E6W.js";import"./chunk-UC7MNI2F.js";import"./chunk-NGVP66OH.js";import"./chunk-GHQ2VDI2.js";import"./chunk-AUGKHAMQ.js";import{a as et}from"./chunk-R6U22RSY.js";import{a as nt}from"./chunk-XHRKNCCI.js";import{a as Ze}from"./chunk-YVR4SEPU.js";import{b as Ye}from"./chunk-ZKJS6EBE.js";import"./chunk-RGMVGZV4.js";import{h as Pe,i as Be}from"./chunk-OQ6I6OXT.js";import{i as Ue}from"./chunk-E4PXACVL.js";import"./chunk-MVWZMWPD.js";import"./chunk-SJQERRSZ.js";import"./chunk-7Y3SY37W.js";import{a as ze}from"./chunk-7G4Z6Q7X.js";import"./chunk-3YXASVTP.js";import"./chunk-AUAECCXB.js";import{b as We}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{a as Oe}from"./chunk-AD2DJJC3.js";import"./chunk-NCPW7WHO.js";import"./chunk-ZQPAHCMA.js";import"./chunk-55UGUCQ6.js";import{a as F}from"./chunk-4ZEL6BYL.js";import{c as ce}from"./chunk-M2FQTDR4.js";import{l as Je}from"./chunk-AV7OEKJ6.js";import"./chunk-QAQDMS6R.js";import"./chunk-VGL7ERWQ.js";import{a as $e}from"./chunk-RWVIV3U7.js";import{a as tt,b as at,c as rt,d as Fe,e as q,f as T}from"./chunk-HCTJKP5J.js";import{a as He,e as Qe}from"./chunk-2IKDEUCX.js";import{d as le,f as Ve,g as Ge,h as Xe,p as Ne,t as Se}from"./chunk-HJHSQPHW.js";import{a as o,d as se,e as De,f as Ee,g as Ae,i as de}from"./chunk-I26MS5PJ.js";var pe=se(Ee(),1),ue=se(De(),1);var st=se(Ee(),1);var S=se(De(),1);var c=se(Ae(),1);var Nt=Ve(F.runMigration),dt=o(t=>{let e=(0,st.c)(98),{initialShardKey:r}=t,n=Je(),a=le(),{queryShardKey:s,setShardKey:i,shardKey:d}=et(r),[u,b]=(0,S.useState)(""),[h,y]=(0,S.useState)("up"),[p,g]=(0,S.useState)(!0),[f,x]=(0,S.useState)(!1),[v,m]=(0,S.useState)(null),[w,k]=(0,S.useState)(null),L;e[0]!==d?(L=d.trim(),e[0]=d,e[1]=L):L=e[1];let C=L===s,j;e[2]===Symbol.for("react.memo_cache_sentinel")?(j={},e[2]=j):j=e[2];let M;e[3]!==s?(M={live:!0,shardKey:s},e[3]=s,e[4]=M):M=e[4];let $=ce(F.migrationStatus,j,M),N=$.data?.migrations??null,Te=$.error,{errorSource:Ce,liveError:Me}=$,fe,ge;e[5]!==s||e[6]!==$.data?(fe=o(()=>{$.data!==void 0&&Ye(s)},"W"),ge=[$.data,s],e[5]=s,e[6]=$.data,e[7]=fe,e[8]=ge):(fe=e[7],ge=e[8]),(0,S.useEffect)(fe,ge);let be;if(e[9]!==n||e[10]!==h||e[11]!==p||e[12]!==u||e[13]!==d||e[14]!==$||e[15]!==a){let I=o(async()=>{let Ke=u.trim();if(Ke===""){k(a("Enter a migration id")),m(null);return}x(!0),k(null);try{let Ie=await n.query(Nt,{direction:h,dryRun:p,id:Ke},Ge(d));m(Ie),$.refetch()}catch(Ie){let $t=Ie;m(null),k(Xe($t))}x(!1)},"m");be=o(()=>{Ne(I())},"V"),e[9]=n,e[10]=h,e[11]=p,e[12]=u,e[13]=d,e[14]=$,e[15]=a,e[16]=be}else be=e[16];let ye=be,ve;e[17]===Symbol.for("react.memo_cache_sentinel")?(ve=o(I=>{b(I.target.value)},"Y"),e[17]=ve):ve=e[17];let xt=ve,xe;e[18]===Symbol.for("react.memo_cache_sentinel")?(xe=o(I=>{y(I.target.value==="down"?"down":"up")},"Z"),e[18]=xe):xe=e[18];let kt=xe,ke;e[19]===Symbol.for("react.memo_cache_sentinel")?(ke=o(I=>{g(I.target.checked)},"ee"),e[19]=ke):ke=e[19];let wt=ke,_;e[20]!==i||e[21]!==d?(_=(0,c.jsx)(Ze,{onChange:i,testId:"mg-shard-input",value:d}),e[20]=i,e[21]=d,e[22]=_):_=e[22];let K;e[23]!==Me?(K=(0,c.jsx)(it,{message:Me,prefix:"mg"}),e[23]=Me,e[24]=K):K=e[24];let D;e[25]!==_||e[26]!==K?(D=(0,c.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[_,K]}),e[25]=_,e[26]=K,e[27]=D):D=e[27];let E;e[28]!==Te||e[29]!==Ce?(E=Te!==null&&(0,c.jsx)(Oe,{error:Ce,testId:"mg-status-error"}),e[28]=Te,e[29]=Ce,e[30]=E):E=e[30];let A;e[31]!==N||e[32]!==a?(A=N!==null&&N.length===0&&(0,c.jsx)($e,{description:a("Data migrations you run against this shard will be tracked here."),icon:(0,c.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,c.jsx)("path",{d:"M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.6L4 16m0 4v-4h4"})}),testId:"mg-empty",title:a("No migrations have run on this shard.")}),e[31]=N,e[32]=a,e[33]=A):A=e[33];let J;e[34]!==N||e[35]!==a?(J=N!==null&&N.length>0&&(0,c.jsx)(He,{className:"overflow-hidden py-0",children:(0,c.jsx)(Qe,{className:"px-0",children:(0,c.jsxs)(tt,{"data-testid":"mg-table",children:[(0,c.jsx)(at,{children:(0,c.jsxs)(Fe,{children:[(0,c.jsx)(q,{children:a("id")}),(0,c.jsx)(q,{children:a("direction")}),(0,c.jsx)(q,{children:a("status")}),(0,c.jsx)(q,{children:a("processed")}),(0,c.jsx)(q,{children:a("changed")}),(0,c.jsx)(q,{children:a("updated")}),(0,c.jsx)(q,{children:a("error")})]})}),(0,c.jsx)(rt,{children:N.map(St)})]})})}),e[34]=N,e[35]=a,e[36]=J):J=e[36];let P;e[37]!==a?(P=a("Run migration"),e[37]=a,e[38]=P):P=e[38];let B;e[39]!==P?(B=(0,c.jsx)(Re,{children:P}),e[39]=P,e[40]=B):B=e[40];let W;e[41]!==a?(W=a("Migration id"),e[41]=a,e[42]=W):W=e[42];let U;e[43]!==a?(U=a("migration id"),e[43]=a,e[44]=U):U=e[44];let z;e[45]!==u||e[46]!==W||e[47]!==U?(z=(0,c.jsx)(Ue,{"aria-label":W,className:"w-auto","data-testid":"mg-id-input",onChange:xt,placeholder:U,value:u}),e[45]=u,e[46]=W,e[47]=U,e[48]=z):z=e[48];let H;e[49]!==a?(H=a("Direction"),e[49]=a,e[50]=H):H=e[50];let Q;e[51]!==a?(Q=a("up"),e[51]=a,e[52]=Q):Q=e[52];let V;e[53]!==Q?(V=(0,c.jsx)("option",{value:"up",children:Q}),e[53]=Q,e[54]=V):V=e[54];let G;e[55]!==a?(G=a("down"),e[55]=a,e[56]=G):G=e[56];let X;e[57]!==G?(X=(0,c.jsx)("option",{value:"down",children:G}),e[57]=G,e[58]=X):X=e[58];let Y;e[59]!==h||e[60]!==H||e[61]!==V||e[62]!==X?(Y=(0,c.jsxs)("select",{"aria-label":H,className:"flex h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs transition-colors outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 dark:bg-input/30","data-testid":"mg-direction",onChange:kt,value:h,children:[V,X]}),e[59]=h,e[60]=H,e[61]=V,e[62]=X,e[63]=Y):Y=e[63];let Z;e[64]!==p?(Z=(0,c.jsx)("input",{checked:p,className:"size-4 accent-primary","data-testid":"mg-dry-run",id:"mg-dry-run",onChange:wt,type:"checkbox"}),e[64]=p,e[65]=Z):Z=e[65];let ee;e[66]!==a?(ee=a("Dry run"),e[66]=a,e[67]=ee):ee=e[67];let te;e[68]!==Z||e[69]!==ee?(te=(0,c.jsxs)(Re,{className:"flex items-center gap-1.5",htmlFor:"mg-dry-run",children:[Z,ee]}),e[68]=Z,e[69]=ee,e[70]=te):te=e[70];let ae;e[71]!==p||e[72]!==ye||e[73]!==f||e[74]!==C||e[75]!==a?(ae=p?(0,c.jsx)(ze,{"data-testid":"mg-run",disabled:f||!C,onClick:ye,type:"button",children:a(f?"Running\u2026":"Run")}):(0,c.jsx)(nt,{confirmLabel:a(f?"Running\u2026":"Run migration?"),disabled:f||!C,onConfirm:ye,testId:"mg-run",children:a("Run")}),e[71]=p,e[72]=ye,e[73]=f,e[74]=C,e[75]=a,e[76]=ae):ae=e[76];let re;e[77]!==z||e[78]!==Y||e[79]!==te||e[80]!==ae?(re=(0,c.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[z,Y,te,ae]}),e[77]=z,e[78]=Y,e[79]=te,e[80]=ae,e[81]=re):re=e[81];let ne;e[82]!==B||e[83]!==re?(ne=(0,c.jsxs)("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card p-3 shadow-xs",children:[B,re]}),e[82]=B,e[83]=re,e[84]=ne):ne=e[84];let ie;e[85]!==w?(ie=w!==null&&(0,c.jsx)("pre",{className:"text-sm text-destructive whitespace-pre-wrap","data-testid":"mg-run-error",role:"alert",children:w}),e[85]=w,e[86]=ie):ie=e[86];let oe;e[87]!==v||e[88]!==a?(oe=v!==null&&(0,c.jsxs)("p",{className:"text-sm text-muted-foreground","data-testid":"mg-run-result",children:[v.dryRun?a("Dry run: "):"",a("{status} \u2014 processed",{status:v.status}),v.processed,a(", changed"),v.changed]}),e[87]=v,e[88]=a,e[89]=oe):oe=e[89];let we;return e[90]!==D||e[91]!==E||e[92]!==A||e[93]!==J||e[94]!==ne||e[95]!==ie||e[96]!==oe?(we=(0,c.jsxs)("div",{className:"flex flex-col gap-3 pt-4","data-testid":"lunora-migrations",children:[D,E,A,J,ne,ie,oe]}),e[90]=D,e[91]=E,e[92]=A,e[93]=J,e[94]=ne,e[95]=ie,e[96]=oe,e[97]=we):we=e[97],we},"yt");function St(t){return(0,c.jsxs)(Fe,{"data-testid":`mg-row-${t.id}`,children:[(0,c.jsx)(T,{children:t.id}),(0,c.jsx)(T,{children:t.direction}),(0,c.jsx)(T,{children:(0,c.jsx)(We,{variant:"secondary",children:t.status})}),(0,c.jsx)(T,{children:t.processed}),(0,c.jsx)(T,{children:t.changed}),(0,c.jsx)(T,{children:Se(t.updatedAt)}),(0,c.jsx)(T,{children:t.error??""})]},t.id)}o(St,"Je");var l=se(Ae(),1);var Le=1;function Ot(t){let e={},r=Object.keys(t);r.sort();for(let n of r)e[n]=t[n];return e}o(Ot,"re");var me=o(t=>typeof t=="object"&&t!==null,"O"),jt=o(t=>me(t)&&me(t.fields)&&me(t.indexes)&&me(t.relations)&&typeof t.shardMode=="string","de"),qt=o(t=>{if(t===void 0||t.trim()==="")return{status:"absent"};let e;try{e=JSON.parse(t)}catch(r){return{error:`baseline is not valid JSON: ${r instanceof Error?r.message:String(r)}`,status:"invalid"}}if(!me(e)||e.version!==Le||!me(e.tables))return{error:`baseline is malformed or written by an incompatible version (expected version ${String(Le)})`,status:"invalid"};for(let[r,n]of Object.entries(e.tables))if(!jt(n))return{error:`baseline table "${r}" has an invalid structure`,status:"invalid"};return{snapshot:{jurisdiction:typeof e.jurisdiction=="string"?e.jurisdiction:void 0,migrationIds:Array.isArray(e.migrationIds)?e.migrationIds:[],tables:e.tables,version:Le},status:"ok"}},"le"),Tt=o((t,e)=>t.unique===e.unique&&t.fields.length===e.fields.length&&t.fields.every((r,n)=>r===e.fields[n]),"ce"),lt=o(t=>t.unique!==void 0,"J"),_e=o(({nullable:t,optional:e,refined:r,unique:n,...a})=>JSON.stringify(Ot(a)),"D"),ct=o(t=>({form:JSON.stringify([_e(t),t.optional===!0,t.nullable===!0]),refined:t.refined===!0}),"H"),mt=o(t=>t.kind==="union"&&t.members?t.members.map(e=>ct(e)):[ct({...t,nullable:!1,optional:!1})],"V"),Ct=o((t,e)=>{if(e.kind!=="union")return!1;let r=mt(e);return mt(t).every(n=>r.some(a=>a.form===n.form&&(n.refined||!a.refined)))},"me"),O=o(t=>{switch(t.kind){case"array":return`array(${t.of?O(t.of):"?"})`;case"id":return`id(${t.ref??"?"})`;case"literal":return`literal(${t.literal??"?"})`;case"object":return`object({ ${Object.keys(t.fields??{}).join(", ")} })`;case"record":return`record(${t.key?O(t.key):"?"}, ${t.of?O(t.of):"?"})`;case"union":return(t.members??[]).map(e=>O(e)).join(" | ");default:return t.kind}},"x"),he=o((t,e,r)=>({remediation:"backfill",scope:"table",severity:"breaking",summary:r,table:t,type:e}),"T"),qe=o((t,e,r)=>({remediation:"none",scope:"table",severity:"safe",summary:r,table:t,type:e}),"q"),Mt=o((t,e,r,n,a)=>{if(!(r.kind===n.kind&&(!a||_e(r)===_e(n))))return a&&Ct(r,n)?qe(t,"widenedFieldShape",`field ${t}.${e} widened: ${O(r)} \u2192 ${O(n)} \u2014 every stored value stays valid`):r.kind!==n.kind?he(t,"changedFieldKind",`field ${t}.${e} changed type: ${r.kind} \u2192 ${n.kind} \u2014 add a data migration to convert existing values`):he(t,"changedFieldShape",`field ${t}.${e} changed shape: ${O(r)} \u2192 ${O(n)} \u2014 stored values were written against the old shape; add a data migration to convert them`)},"he"),It=o((t,e,r,n)=>{let a=[];return r.unique!==n.unique&&a.push(n.unique===!0?he(t,"addedFieldConstraint",`field ${t}.${e} became unique \u2014 existing duplicates would violate it; add a data migration to de-duplicate first`):qe(t,"relaxedFieldConstraint",`field ${t}.${e} is no longer unique`)),r.nullable!==n.nullable&&a.push(n.nullable===!0?qe(t,"relaxedFieldConstraint",`field ${t}.${e} became nullable`):he(t,"addedFieldConstraint",`field ${t}.${e} is no longer nullable \u2014 rows holding NULL would be invalid; add a data migration to backfill them`)),r.refined!==n.refined&&a.push(n.refined===!0?he(t,"addedFieldConstraint",`field ${t}.${e} gained a validation refinement \u2014 stored values were never checked against it; add a data migration if any could fail`):qe(t,"relaxedFieldConstraint",`field ${t}.${e} dropped its validation refinement`)),a},"fe"),yt=o((t,e,r,n)=>{let a=[],s=lt(r)&&lt(n),i=Mt(t,e,r,n,s);return i&&a.push(i),s&&a.push(...It(t,e,r,n)),r.optional&&!n.optional?a.push({remediation:"backfill",severity:"breaking",summary:`field ${t}.${e} became required \u2014 rows missing it would be invalid; add a data migration to backfill it`,table:t,scope:"table",type:"fieldOptionalToRequired"}):!r.optional&&n.optional&&a.push({remediation:"none",scope:"table",severity:"safe",summary:`field ${t}.${e} became optional`,table:t,type:"fieldRequiredToOptional"}),a},"Y"),Ft=o((t,e,r)=>r.optional?{remediation:"none",scope:"table",severity:"safe",summary:`added optional field ${t}.${e}`,table:t,type:"addedOptionalField"}:{remediation:"backfill",severity:"breaking",summary:`added required field ${t}.${e} \u2014 existing rows have no value; add a data migration to backfill it`,table:t,scope:"table",type:"addedRequiredField"},"ue"),Rt=o((t,e,r,n)=>{for(let[a,s]of Object.entries(r.fields)){let i=e.fields[a];i===void 0?n.push(Ft(t,a,s)):n.push(...yt(t,a,i,s))}for(let a of Object.keys(e.fields))r.fields[a]===void 0&&n.push({remediation:"backfill",severity:"breaking",summary:`removed field ${t}.${a} \u2014 add a data migration if stored data must be cleaned up`,table:t,scope:"table",type:"removedField"})},"pe"),Lt=o((t,e,r,n)=>{for(let[a,s]of Object.entries(r.indexes)){let i=e.indexes[a];if(i===void 0){n.push(s.unique?{remediation:"backfill",scope:"table",severity:"breaking",summary:`added unique index ${a} on ${t} \u2014 existing duplicates would violate it; add a data migration to de-duplicate first`,table:t,type:"addedIndex"}:{remediation:"none",scope:"table",severity:"safe",summary:`added index ${a} on ${t}`,table:t,type:"addedIndex"});continue}Tt(i,s)||n.push({remediation:"code",severity:"breaking",summary:`index ${a} on ${t} changed shape \u2014 a query may have relied on the old index`,table:t,scope:"table",type:"changedIndex"})}for(let a of Object.keys(e.indexes))r.indexes[a]===void 0&&n.push({remediation:"code",severity:"breaking",summary:`removed index ${a} on ${t} \u2014 a query that used \`.withIndex("${a}")\` would break`,table:t,scope:"table",type:"removedIndex"})},"ge"),_t=o((t,e,r,n)=>{for(let a of Object.keys(r.relations))e.relations[a]===void 0&&n.push({remediation:"none",scope:"schema",severity:"safe",summary:`added relation ${t}.${a}`,table:t,type:"addedRelation"});for(let a of Object.keys(e.relations))r.relations[a]===void 0&&n.push({remediation:"code",scope:"schema",severity:"breaking",summary:`removed relation ${t}.${a}`,table:t,type:"removedRelation"})},"be"),ut="shardBy:_unknown_",je="global",Kt=o((t,e)=>t===je&&e.startsWith(`${je}:`)||e===je&&t.startsWith(`${je}:`),"ye"),Dt=o((t,e,r)=>{if(e===r)return r!==ut?void 0:{remediation:"rehome",scope:"table",severity:"breaking",summary:`table ${t} declares a non-literal .shardBy(...) key, so codegen cannot read which column partitions it \u2014 every such key records as "${ut}" and two DIFFERENT keys would compare equal. Pass the shard key as a string literal; until then this is reported on every run, because the alternative is a silent pass on a re-home that strands every row (export/import is the only way back).`,table:t,type:"changedShardMode"};if(!Kt(e,r))return{remediation:"rehome",severity:"breaking",summary:`table ${t} changed shard mode: ${e} \u2192 ${r} \u2014 its physical storage moves, and existing rows do NOT follow the schema; re-home them with an export/import round trip (https://lunora.sh/docs/concepts/sharding#migrating-a-populated-table)`,table:t,scope:"table",type:"changedShardMode"}},"ve"),ht=o(t=>t.memory!==void 0,"Q"),pt=o(t=>t.after??0,"W"),R=o(t=>t.after===void 0?`.ttl("${t.field}")`:`.ttl("${t.field}", { after: ${String(t.after)} })`,"w"),Et=o((t,e,r)=>{if(e===void 0&&r===void 0)return;let n=o(d=>({remediation:"backfill",scope:"table",severity:"breaking",summary:d,table:t,type:"changedTtlPolicy"}),"n"),a=o(d=>({remediation:"none",scope:"table",severity:"safe",summary:d,table:t,type:"changedTtlPolicy"}),"s");if(r===void 0)return a(`table ${t} dropped its TTL policy \u2014 its rows are no longer swept`);if(e===void 0)return n(`table ${t} gained a TTL policy ${R(r)} \u2014 every row already past the cutoff is deleted on the next alarm sweep; add a data migration to refresh or clear "${r.field}" on the rows written before it`);if(e.field!==r.field)return n(`table ${t} moved its TTL to a different column: ${R(e)} \u2192 ${R(r)} \u2014 rows are now expired by a column they were never written against; add a data migration to populate "${r.field}"`);let s=pt(e),i=pt(r);return i<s?n(`table ${t} shortened its TTL: ${R(e)} \u2192 ${R(r)} \u2014 rows that were not expired under the old offset are deleted on the next alarm sweep; add a data migration to refresh "${r.field}" on the rows that must survive`):i>s?a(`table ${t} lengthened its TTL: ${R(e)} \u2192 ${R(r)}`):void 0},"xe"),At=o((t,e,r)=>{let n=[];return e.memory!==r.memory&&n.push(r.memory===!0?{remediation:"rehome",scope:"table",severity:"breaking",summary:`table ${t} became a .memory() table \u2014 every row is deleted in every shard on the next Durable Object cold start, and no data migration survives that; export the rows first if they must be kept, or revert`,table:t,type:"changedMemoryMode"}:{remediation:"none",scope:"table",severity:"safe",summary:`table ${t} is no longer a .memory() table \u2014 its rows now survive a cold start`,table:t,type:"changedMemoryMode"}),e.commitOrdered!==r.commitOrdered&&n.push(r.commitOrdered===!0?{remediation:"backfill",scope:"table",severity:"breaking",summary:`table ${t} became .commitOrdered() \u2014 rows written before it carry no _commitSeq, so a \`_commitSeq > cursor\` changefeed never offers them; add a data migration over the table to stamp them (the rewrite allocates a sequence)`,table:t,type:"changedCommitOrdering"}:{remediation:"code",scope:"table",severity:"breaking",summary:`table ${t} is no longer .commitOrdered() \u2014 new rows carry no _commitSeq, so a \`_commitSeq > cursor\` changefeed stops advancing without erroring; update the consumers before deploying`,table:t,type:"changedCommitOrdering"}),n},"ke"),Jt=o((t,e,r,n)=>{let a=Dt(t,e.shardMode,r.shardMode);if(a&&n.push(a),ht(e)&&ht(r)){n.push(...At(t,e,r));let s=Et(t,e.ttl,r.ttl);s&&n.push(s)}Rt(t,e,r,n),Lt(t,e,r,n),_t(t,e,r,n)},"$e"),Pt=o((t,e)=>{let r=[],n=t?.tables??{};for(let[a,s]of Object.entries(e.tables)){let i=n[a];if(i===void 0){r.push({remediation:"none",scope:"table",severity:"safe",summary:`added table ${a}`,table:a,type:"addedTable"});continue}Jt(a,i,s,r)}for(let a of Object.keys(n))e.tables[a]===void 0&&r.push({remediation:"rehome",scope:"table",severity:"breaking",summary:`removed table ${a} \u2014 its rows stay in each shard's SQLite, unreachable through the schema; export the shard first if the data must be kept`,table:a,type:"removedTable"});if(t!==void 0&&t.jurisdiction!==e.jurisdiction){let a=t.jurisdiction??"(none)",s=e.jurisdiction??"(none)";r.push({remediation:"rehome",scope:"schema",severity:"breaking",summary:`Durable Object jurisdiction changed from ${a} to ${s} \u2014 this re-homes every DO and strands all existing shard, scheduler, and session-DO data in the old region (no in-place migration; export then import to move it). Revert the change, or override the gate to proceed intentionally.`,type:"changedJurisdiction"})}return{changes:r}},"we"),ft=o(t=>Object.entries(t.fields).map(([e,r])=>({name:e,optional:r.optional,ref:Object.values(t.relations).find(n=>n.field===e&&n.kind==="one")?.table,type:O(r)})),"B"),gt=o((t,e,r)=>{let n={},a=e?.fields??{},s=r?.fields??{};for(let[i,d]of Object.entries(s)){let u=a[i];u===void 0?n[i]=e===void 0?"unchanged":"added":n[i]=yt(t,i,u,d).length===0?"unchanged":"changed"}for(let i of Object.keys(a))s[i]===void 0&&(n[i]="removed");return n},"U"),Bt=o((t,e)=>{let{changes:r}=Pt(t,e),n=new Set(r.filter(i=>i.scope==="table"&&i.table!==void 0).map(i=>i.table)),a=[],s=o((i,d)=>i?"added":n.has(d)?"changed":"context","a");for(let[i,d]of Object.entries(e.tables)){let u=t?.tables[i],b=s(u===void 0,i);a.push({columns:ft(d),fieldStatus:gt(i,u,d),name:i,shardMode:d.shardMode,status:b})}for(let[i,d]of Object.entries(t?.tables??{}))e.tables[i]===void 0&&a.push({columns:ft(d),fieldStatus:gt(i,d,void 0),name:i,shardMode:d.shardMode,status:"removed"});return a.sort((i,d)=>i.name.localeCompare(d.name)),{breakingCount:r.filter(i=>i.severity==="breaking").length,changes:r,tables:a}},"Oe"),bt=o(t=>{let e=qt(t);return e.status==="ok"?e.snapshot:void 0},"K"),Wt={added:"ring-2 ring-emerald-500/60",changed:"ring-2 ring-amber-500/70",context:"opacity-55",removed:"opacity-70 ring-2 ring-destructive/60"},Ut=o(t=>t==="global"||t.startsWith("global:")?"global":"shard","Te"),zt=o(t=>{let e=(0,pe.c)(24),{appliedAt:r,hash:n,onSelect:a,selected:s,seq:i}=t,d=s?"border-s-primary bg-accent/60 text-foreground":"border-s-transparent text-muted-foreground hover:bg-accent/30 hover:text-foreground",u;e[0]!==d?(u=de("flex w-full flex-col items-start gap-1 border-s-2 px-4 py-3 text-start outline-none transition-colors",d),e[0]=d,e[1]=u):u=e[1];let b=`sh-version-${n}`,h;e[2]!==n||e[3]!==a?(h=o(()=>{a(n)},"u"),e[2]=n,e[3]=a,e[4]=h):h=e[4];let y;e[5]!==i?(y=(0,l.jsxs)("span",{className:"font-mono text-[13px] tabular-nums",children:["v",i]}),e[5]=i,e[6]=y):y=e[6];let p;e[7]!==n?(p=n.slice(0,7),e[7]=n,e[8]=p):p=e[8];let g;e[9]!==p?(g=(0,l.jsx)("span",{className:"ms-auto font-mono text-[10px] tracking-wider text-muted-foreground/70 uppercase",children:p}),e[9]=p,e[10]=g):g=e[10];let f;e[11]!==y||e[12]!==g?(f=(0,l.jsxs)("span",{className:"flex w-full items-baseline gap-2",children:[y,g]}),e[11]=y,e[12]=g,e[13]=f):f=e[13];let x;e[14]!==r?(x=Se(r),e[14]=r,e[15]=x):x=e[15];let v;e[16]!==x?(v=(0,l.jsx)("span",{className:"font-mono text-[10px] tracking-wide text-muted-foreground/70",children:x}),e[16]=x,e[17]=v):v=e[17];let m;return e[18]!==v||e[19]!==u||e[20]!==b||e[21]!==h||e[22]!==f?(m=(0,l.jsx)("li",{children:(0,l.jsxs)("button",{className:u,"data-testid":b,onClick:h,type:"button",children:[f,v]})}),e[18]=v,e[19]=u,e[20]=b,e[21]=h,e[22]=f,e[23]=m):m=e[23],m},"je"),Ht=o(t=>{let e=(0,pe.c)(26),{breaking:r,count:n,first:a}=t,s=le();if(a){let g;e[0]!==n?(g=(0,l.jsx)("span",{className:"text-3xl leading-none font-light tracking-tight tabular-nums",children:n}),e[0]=n,e[1]=g):g=e[1];let f;e[2]!==s?(f=s("tables"),e[2]=s,e[3]=f):f=e[3];let x;e[4]!==f?(x=(0,l.jsx)("span",{className:"font-mono text-[11px] tracking-widest text-muted-foreground uppercase",children:f}),e[4]=f,e[5]=x):x=e[5];let v;return e[6]!==g||e[7]!==x?(v=(0,l.jsxs)("div",{className:"flex items-baseline gap-3","data-testid":"sh-summary",children:[g,x]}),e[6]=g,e[7]=x,e[8]=v):v=e[8],v}let i=r>0&&"text-destructive",d;e[9]!==i?(d=de("text-3xl leading-none font-light tracking-tight tabular-nums",i),e[9]=i,e[10]=d):d=e[10];let u;e[11]!==n||e[12]!==d?(u=(0,l.jsx)("span",{className:d,children:n}),e[11]=n,e[12]=d,e[13]=u):u=e[13];let b;e[14]!==n||e[15]!==s?(b=s(n===1?"change":"changes"),e[14]=n,e[15]=s,e[16]=b):b=e[16];let h;e[17]!==b?(h=(0,l.jsx)("span",{className:"font-mono text-[11px] tracking-widest text-muted-foreground uppercase",children:b}),e[17]=b,e[18]=h):h=e[18];let y;e[19]!==r||e[20]!==s?(y=r>0&&(0,l.jsxs)("span",{className:"font-mono text-[11px] tracking-widest text-destructive uppercase",children:["\xB7 ",s("{count} breaking",{count:r})]}),e[19]=r,e[20]=s,e[21]=y):y=e[21];let p;return e[22]!==u||e[23]!==h||e[24]!==y?(p=(0,l.jsxs)("div",{className:"flex items-baseline gap-3","data-testid":"sh-summary",children:[u,h,y]}),e[22]=u,e[23]=h,e[24]=y,e[25]=p):p=e[25],p},"Fe"),vt={addedFieldConstraint:{action:"added",kind:"constraint"},addedIndex:{action:"added",kind:"index"},addedOptionalField:{action:"added",kind:"field?"},addedRelation:{action:"added",kind:"relation"},addedRequiredField:{action:"added",kind:"field"},addedTable:{action:"added",kind:"table"},changedCommitOrdering:{action:"changed",kind:"commit ordering"},changedFieldKind:{action:"changed",kind:"field kind"},changedFieldShape:{action:"changed",kind:"field shape"},changedIndex:{action:"changed",kind:"index"},changedJurisdiction:{action:"changed",kind:"jurisdiction"},changedMemoryMode:{action:"changed",kind:"memory mode"},changedShardMode:{action:"changed",kind:"shard mode"},changedTtlPolicy:{action:"changed",kind:"TTL policy"},fieldOptionalToRequired:{action:"changed",kind:"field \u2192 required"},fieldRequiredToOptional:{action:"changed",kind:"field \u2192 optional"},relaxedFieldConstraint:{action:"removed",kind:"constraint"},removedField:{action:"removed",kind:"field"},removedIndex:{action:"removed",kind:"index"},removedRelation:{action:"removed",kind:"relation"},removedTable:{action:"removed",kind:"table"},widenedFieldShape:{action:"changed",kind:"field \u2192 wider"}},Qt=o((t,e)=>{let r=`${vt[t.type].action} ${e} `;return t.summary.startsWith(r)?t.summary.slice(r.length):t.summary},"qe"),Vt=o(t=>{let e=new Map;for(let n of t){let a=n.table??"",s=e.get(a);s===void 0?e.set(a,[n]):s.push(n)}let r=[...e].map(([n,a])=>({changes:a,table:n}));return[...r.filter(n=>n.table!==""),...r.filter(n=>n.table==="")]},"Ce"),Gt=o(t=>{let e=(0,pe.c)(2),{children:r}=t,n;return e[0]!==r?(n=(0,l.jsx)("div",{className:"px-4 pt-4 pb-2 font-mono text-[10px] tracking-widest text-muted-foreground/70 uppercase",children:r}),e[0]=r,e[1]=n):n=e[1],n},"Me"),Xt=o(({pane:t,shardKey:e=""})=>{let r=le(),n=Be(),a=Pe({strict:!1}).version,s=o(m=>{Ne(n({search:{version:m},to:"/migrations"}))},"o"),i=ce(F.schemaHistory,{},{shardKey:e}),d=i.data?.versions??[],u=a!==void 0&&d.some(m=>m.hash===a)?a:d[0]?.hash,b=d.findIndex(m=>m.hash===u),h=b===-1?void 0:d[b+1]?.hash,y=ce(F.schemaVersion,{hash:u??""},{enabled:u!==void 0,shardKey:e}),p=ce(F.schemaVersion,{hash:h??""},{enabled:h!==void 0,shardKey:e}),g=(0,ue.useMemo)(()=>{let m=bt(y.data?.version?.snapshotJson);if(m!==void 0)return Bt(bt(p.data?.version?.snapshotJson),m)},[y.data,p.data]),f=(0,ue.useMemo)(()=>(g?.tables??[]).map(m=>({columns:m.columns,name:m.name,tier:Ut(m.shardMode)})),[g]),x=(0,ue.useMemo)(()=>{let m={};for(let w of g?.tables??[])m[w.name]=Wt[w.status];return m},[g]);if(i.error!==null)return(0,l.jsx)(Oe,{error:i.errorSource,testId:"sh-error"});if(d.length===0)return(0,l.jsx)($e,{description:r("Each distinct schema shape this shard runs is recorded here, so you can see what changed and when."),testId:"sh-empty",title:r("No schema versions recorded yet.")});let v=g?.changes??[];return(0,l.jsxs)("div",{className:"flex min-h-0 flex-1 gap-4","data-testid":"lunora-schema-history",children:[(0,l.jsxs)("nav",{className:"flex w-56 shrink-0 flex-col overflow-hidden border-e border-border","data-testid":"sh-timeline-rail",children:[(0,l.jsx)(Gt,{children:r("Schema versions")}),(0,l.jsx)("ul",{className:"min-h-0 flex-1 overflow-y-auto","data-testid":"sh-timeline",children:d.map(m=>(0,l.jsx)(zt,{appliedAt:m.appliedAt,hash:m.hash,onSelect:s,selected:m.hash===u,seq:m.seq},m.hash))})]}),(0,l.jsxs)("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col gap-4 pe-1 pt-4",children:[(0,l.jsx)(Ht,{breaking:g?.breakingCount??0,count:h===void 0?f.length:v.length,first:h===void 0}),t==="diagram"?(0,l.jsx)("div",{className:"flex min-h-0 flex-1 flex-col",children:(0,l.jsx)(ot,{fill:!0,nodeClasses:x,tables:f,testIdPrefix:"sh"})}):(0,l.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto","data-testid":"sh-changes",children:Vt(v).map(m=>{let w=(g?.tables??[]).find(k=>k.name===m.table);return(0,l.jsxs)("section",{className:"mb-6",children:[(0,l.jsxs)("div",{className:"flex items-baseline gap-3 border-b border-border/60 pb-1.5",children:[(0,l.jsx)("span",{className:"font-mono text-[13px] text-foreground",children:m.table===""?r("schema"):m.table}),w!==void 0&&(0,l.jsx)("span",{className:"font-mono text-[10px] tracking-widest text-muted-foreground/70 tabular-nums uppercase",children:r("{count} columns",{count:w.columns.length})}),m.changes.length>1&&(0,l.jsx)("span",{className:"ms-auto font-mono text-[10px] tracking-widest text-muted-foreground/70 tabular-nums",children:m.changes.length})]}),(0,l.jsx)("ul",{children:m.changes.map(k=>{let{action:L,kind:C}=vt[k.type],j=k.severity==="breaking",M=Qt(k,C);return(0,l.jsxs)("li",{className:"flex items-baseline gap-4 border-s-2 py-1.5 ps-3 transition-colors hover:bg-accent/30",children:[(0,l.jsx)("span",{"aria-hidden":"true",className:de("-ms-3 h-3 w-0.5 shrink-0 self-center",j?"bg-destructive":"bg-transparent")}),(0,l.jsxs)("span",{className:"w-44 shrink-0 font-mono text-[10px] tracking-widest text-muted-foreground/70 uppercase",children:[r(L)," ",C]}),M!==m.table&&(0,l.jsx)("span",{className:de("min-w-0 font-mono text-[13px]",j?"text-destructive":"text-foreground"),children:M}),j&&(0,l.jsx)("span",{className:"ms-auto shrink-0 font-mono text-[10px] tracking-widest text-destructive uppercase",children:r("breaking")})]},`${k.type}-${k.summary}`)})})]},m.table)})})]})]})},"Ie"),Yt=o(t=>de("-mb-px border-b-2 px-3 py-2.5 font-mono text-[11px] tracking-wider uppercase transition-colors outline-none","hover:bg-accent/40 focus-visible:bg-accent/40",t?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),"Re"),Ta=o(t=>{let e=(0,pe.c)(11),{initialShardKey:r}=t,n=le(),[a,s]=(0,ue.useState)("diagram"),i;e[0]!==a?(i=o((y,p,g,f)=>(0,l.jsxs)("button",{"aria-selected":a===y,className:Yt(a===y),"data-testid":g,onClick:o(()=>{s(y)},"onClick"),role:"tab",type:"button",children:[p,f!==void 0&&(0,l.jsx)("span",{className:"ms-2 tabular-nums text-muted-foreground/70",children:f})]}),"o"),e[0]=a,e[1]=i):i=e[1];let d=i,u;e[2]!==n||e[3]!==d?(u=(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-1 border-b border-border px-3","data-testid":"mg-panes",role:"tablist",children:[d("diagram",n("Diagram"),"mg-pane-diagram"),d("changes",n("Changes"),"mg-pane-changes"),d("data",n("Data migrations"),"mg-pane-data")]}),e[2]=n,e[3]=d,e[4]=u):u=e[4];let b;e[5]!==r||e[6]!==a?(b=(0,l.jsx)("div",{className:"flex min-h-0 flex-1 flex-col",children:a==="data"?(0,l.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-4",children:(0,l.jsx)(dt,{initialShardKey:r})}):(0,l.jsx)(Xt,{pane:a,shardKey:r})}),e[5]=r,e[6]=a,e[7]=b):b=e[7];let h;return e[8]!==u||e[9]!==b?(h=(0,l.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col pt-4","data-testid":"lunora-migrations-route",children:[u,b]}),e[8]=u,e[9]=b,e[10]=h):h=e[10],h},"Ue");export{Ta as default};
@@ -0,0 +1 @@
1
+ import{a as i,j as a}from"./chunk-BOMPSVRC.js";import{a as o}from"./chunk-QAQDMS6R.js";import{a as r,i as n}from"./chunk-I26MS5PJ.js";function s(e){return a(e.defaultTagName??"div",e,e)}r(s,"useRender");var g=o("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-none border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive font-mono text-[11px] tracking-wide uppercase focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline",success:"bg-success/10 text-success font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-success/15 dark:bg-success/15",warning:"bg-warning/10 text-warning font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-warning/15 dark:bg-warning/15",info:"bg-info/10 text-info font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-info/15 dark:bg-info/15"}},defaultVariants:{variant:"default"}});function x({className:e,variant:t="default",render:d,...u}){return s({defaultTagName:"span",props:i({className:n(g({variant:t}),e)},u),render:d,state:{slot:"badge",variant:t}})}r(x,"f");export{s as a,x as b};
@@ -0,0 +1 @@
1
+ import{a as d,d as n,f as c,g as p}from"./chunk-I26MS5PJ.js";var b=n(c(),1),s=n(p(),1);var y={alignItems:"center",border:"1px solid",borderRadius:4,display:"inline-flex",fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:11,fontWeight:400,gap:6,letterSpacing:"0.06em",lineHeight:1.4,padding:"1px 8px",textTransform:"uppercase"},g={borderRadius:"50%",display:"inline-block",height:7,width:7},h=d((l,e,t,a)=>({badgeStyle:{...y,borderColor:l,color:l},color:l,dotStyle:{...g,backgroundColor:l},hint:a,label:e,title:t}),"i"),S={global:h("var(--royal-amethyst)","Global \xB7 D1","Global table \u2014 a single D1 table shared across all shards","Declared .global() and stored once in Cloudflare D1, shared across every shard and tenant. Auth tables (user, session, \u2026) live here too."),shard:h("var(--sky-sapphire)","Shard-local","Shard-local table \u2014 per-shard SQLite inside a Durable Object","Stored per shard key in a Durable Object's SQLite (.shardBy(...)). You are viewing one shard at a time \u2014 change the shard key to inspect another.")},m=d(l=>{let e=(0,b.c)(9),{tier:t}=l,a=S[t],i=`storage-tier-${t}`,r;e[0]!==a.dotStyle?(r=(0,s.jsx)("span",{"aria-hidden":"true",style:a.dotStyle}),e[0]=a.dotStyle,e[1]=r):r=e[1];let o;return e[2]!==a.badgeStyle||e[3]!==a.label||e[4]!==a.title||e[5]!==i||e[6]!==r||e[7]!==t?(o=(0,s.jsxs)("span",{"data-testid":i,"data-tier":t,style:a.badgeStyle,title:a.title,children:[r,a.label]}),e[2]=a.badgeStyle,e[3]=a.label,e[4]=a.title,e[5]=i,e[6]=r,e[7]=t,e[8]=o):o=e[8],o},"y");export{S as a,m as b};
@@ -0,0 +1 @@
1
+ import{a as r,h as y}from"./chunk-I26MS5PJ.js";var V=r(e=>typeof e=="boolean"?`${e}`:e===0?"0":e,"falsyToString"),N=y,j=r((e,l)=>n=>{var s;if(l?.variants==null)return N(e,n?.class,n?.className);let{variants:v,defaultVariants:d}=l,f=Object.keys(v).map(t=>{let a=n?.[t],u=d?.[t];if(a===null)return null;let i=V(a)||V(u);return v[t][i]}),c=n&&Object.entries(n).reduce((t,a)=>{let[u,i]=a;return i===void 0||(t[u]=i),t},{}),C=l==null||(s=l.compoundVariants)===null||s===void 0?void 0:s.reduce((t,a)=>{let{class:u,className:i,...x}=a;return Object.entries(x).every(O=>{let[m,o]=O;return Array.isArray(o)?o.includes({...d,...c}[m]):{...d,...c}[m]===o})?[...t,u,i]:t},[]);return N(e,f,C,n?.class,n?.className)},"cva");export{j as a};
@@ -0,0 +1 @@
1
+ import{a as O,b as D}from"./chunk-5B2RTXBS.js";import{a as F}from"./chunk-SV764LKQ.js";import{a as V}from"./chunk-R6U22RSY.js";import{a as T}from"./chunk-YVR4SEPU.js";import"./chunk-ZKJS6EBE.js";import"./chunk-RGMVGZV4.js";import{i as L}from"./chunk-E4PXACVL.js";import"./chunk-MVWZMWPD.js";import"./chunk-7Y3SY37W.js";import"./chunk-AUAECCXB.js";import{b as C}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{a as z}from"./chunk-AD2DJJC3.js";import"./chunk-NCPW7WHO.js";import"./chunk-ZQPAHCMA.js";import"./chunk-55UGUCQ6.js";import{a as R}from"./chunk-4ZEL6BYL.js";import{c as M}from"./chunk-M2FQTDR4.js";import"./chunk-AV7OEKJ6.js";import"./chunk-QAQDMS6R.js";import"./chunk-VGL7ERWQ.js";import{a as K}from"./chunk-RWVIV3U7.js";import{a as A,b as q,c as B,d as p,e as d,f as n}from"./chunk-HCTJKP5J.js";import{a as I,e as E}from"./chunk-2IKDEUCX.js";import{d as b,m as j,t as k}from"./chunk-HJHSQPHW.js";import{a as i,d as y,e as ee,g as te}from"./chunk-I26MS5PJ.js";var s=y(ee(),1);var e=y(te(),1);var re=i(o=>o===void 0?"":JSON.stringify(o,j),"te"),ae=41,J=480,H=5,ie=i((o,t)=>O(o,l=>{t(l.height>0?l:{height:J,width:l.width})}),"ae"),Ne=i(({initialShardKey:o})=>{let t=b(),{queryShardKey:l,setShardKey:P,shardKey:U}=V(o),[h,W]=(0,s.useState)(""),{data:f,error:g,errorSource:Z,isLoading:_,liveError:G}=M(R.getAuditLog,{},{live:!0,shardKey:l}),c=(0,s.useMemo)(()=>f?.entries??[],[f]),m=(0,s.useMemo)(()=>{let a=h.trim().toLowerCase();return a===""?c:c.filter(r=>r.op.toLowerCase().includes(a)||(r.table??"").toLowerCase().includes(a)||(r.id??"").toLowerCase().includes(a))},[c,h]),x=(0,s.useRef)(null),v=D({count:m.length,estimateSize:i(()=>ae,"estimateSize"),getScrollElement:i(()=>x.current,"getScrollElement"),initialRect:{height:J,width:800},observeElementRect:ie,overscan:8}),u=v.getVirtualItems(),Q=v.getTotalSize(),N=u[0]?.start??0,w=Q-(u.at(-1)?.end??0),X={height:N},Y={height:w},$=i(a=>{W(a.target.value)},"z");return(0,e.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-audit",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)(T,{onChange:P,testId:"au-shard-input",value:U}),(0,e.jsx)(F,{message:G,prefix:"au"}),(0,e.jsx)(L,{"aria-label":t("Filter audit log"),className:"h-8 w-48","data-testid":"au-search",onChange:$,placeholder:t("filter op, table, id"),value:h})]}),g!==null&&(0,e.jsx)(z,{error:Z,testId:"au-error"}),g===null&&!_&&m.length===0&&(0,e.jsx)(K,{description:t("State-changing admin operations are recorded here."),icon:(0,e.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,e.jsx)("path",{d:"M8 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-2M9 3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V3Zm-1 9h8m-8 4h5"})}),testId:"au-empty",title:t("No audit entries.")}),m.length>0&&(0,e.jsx)(I,{className:"overflow-hidden py-0",children:(0,e.jsx)(E,{className:"max-h-[30rem] overflow-auto px-0",ref:x,children:(0,e.jsxs)(A,{"data-testid":"au-table",children:[(0,e.jsx)(q,{children:(0,e.jsxs)(p,{children:[(0,e.jsx)(d,{children:t("time")}),(0,e.jsx)(d,{children:t("op")}),(0,e.jsx)(d,{children:t("table")}),(0,e.jsx)(d,{children:t("id")}),(0,e.jsx)(d,{children:t("detail")})]})}),(0,e.jsxs)(B,{children:[N>0&&(0,e.jsx)("tr",{"aria-hidden":"true",children:(0,e.jsx)("td",{colSpan:H,style:X})}),u.map(a=>{let r=m[a.index],S=re(r.detail);return(0,e.jsxs)(p,{"data-testid":"au-row",children:[(0,e.jsx)(n,{className:"text-muted-foreground tabular-nums",children:k(r.ts,"\u2014")}),(0,e.jsx)(n,{children:(0,e.jsx)(C,{variant:"secondary",children:r.op})}),(0,e.jsx)(n,{className:"font-medium",children:r.table??(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})}),(0,e.jsx)(n,{className:"max-w-[20ch] truncate font-mono text-xs",children:r.id??(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})}),(0,e.jsx)(n,{className:"max-w-[32ch] truncate font-mono text-xs text-muted-foreground",title:S||void 0,children:S||(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})})]},r.seq)}),w>0&&(0,e.jsx)("tr",{"aria-hidden":"true",children:(0,e.jsx)("td",{colSpan:H,style:Y})})]})]})})})]})},"we");export{Ne as AuditPanel};
@@ -0,0 +1 @@
1
+ import{a as Pe,b as Re}from"./chunk-2VA5S3IA.js";import{a as ce}from"./chunk-VCFEO3RI.js";import{a as Te}from"./chunk-6QTAHSDD.js";import"./chunk-VESGIGMQ.js";import{a as Se}from"./chunk-S4Z7K55A.js";import{b as ke}from"./chunk-5B2RTXBS.js";import{a as de}from"./chunk-UYEZR3BI.js";import{a as Le}from"./chunk-SV764LKQ.js";import{a as ie}from"./chunk-IWZ7GVQO.js";import{a as xe}from"./chunk-R6U22RSY.js";import{a as be}from"./chunk-YVR4SEPU.js";import{b as ve}from"./chunk-ZKJS6EBE.js";import"./chunk-RGMVGZV4.js";import"./chunk-OQ6I6OXT.js";import{i as D}from"./chunk-E4PXACVL.js";import"./chunk-MVWZMWPD.js";import"./chunk-SJQERRSZ.js";import"./chunk-7Y3SY37W.js";import{a as pe}from"./chunk-7G4Z6Q7X.js";import"./chunk-3YXASVTP.js";import"./chunk-AUAECCXB.js";import{b as re}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{a as ye}from"./chunk-AD2DJJC3.js";import"./chunk-NCPW7WHO.js";import"./chunk-ZQPAHCMA.js";import"./chunk-55UGUCQ6.js";import{a as ne}from"./chunk-4ZEL6BYL.js";import{c as oe}from"./chunk-M2FQTDR4.js";import{l as ge}from"./chunk-AV7OEKJ6.js";import"./chunk-QAQDMS6R.js";import"./chunk-VGL7ERWQ.js";import{a as J}from"./chunk-RWVIV3U7.js";import{a as we,b as Ne,c as Ce,d as se,e as B,f as W}from"./chunk-HCTJKP5J.js";import{d as z,h as ae,i as fe,p as le}from"./chunk-HJHSQPHW.js";import{a as v,d as te,e as _e,f as Ae,g as Ue,i as j}from"./chunk-I26MS5PJ.js";var K=te(Ae(),1);var I=te(_e(),1);var r=te(Ue(),1);var me=["trace","debug","log","info","warn","error","fatal"],$e="LOG_ARCHIVE_NOT_CONFIGURED",ze={cursor:void 0,error:null,loading:!1,notConfigured:!1,rows:null},De=v((i,e)=>{switch(e.type){case"append":return{...i,cursor:e.cursor,error:null,loading:!1,rows:[...i.rows??[],...e.rows]};case"failed":return{cursor:void 0,error:e.message,loading:!1,notConfigured:!1,rows:null};case"loaded":return{cursor:e.cursor,error:null,loading:!1,notConfigured:!1,rows:e.rows};case"loading":return{...i,error:null,loading:!0,notConfigured:!1};case"notConfigured":return{cursor:void 0,error:null,loading:!1,notConfigured:!0,rows:null};case"pageFailed":return{...i,error:e.message,loading:!1};default:return i}},"De"),Be=v(i=>{let e=(0,K.c)(33),{row:t}=i,n;e[0]!==t.fields?(n=ce(t.fields),e[0]=t.fields,e[1]=n):n=e[1];let s=n,o=`lg-archive-row-${String(t.ts)}`,c;e[2]!==t.ts?(c=new Date(t.ts).toLocaleString(),e[2]=t.ts,e[3]=c):c=e[3];let f;e[4]!==c?(f=(0,r.jsx)(W,{className:"tabular-nums whitespace-nowrap text-xs text-muted-foreground",children:c}),e[4]=c,e[5]=f):f=e[5];let m=Pe[t.level],d;e[6]!==t.level||e[7]!==m?(d=(0,r.jsx)(W,{children:(0,r.jsx)(re,{variant:m,children:t.level})}),e[6]=t.level,e[7]=m,e[8]=d):d=e[8];let a;e[9]!==t.functionPath?(a=(0,r.jsx)(W,{className:"font-mono text-xs",children:t.functionPath}),e[9]=t.functionPath,e[10]=a):a=e[10];let h;e[11]!==t.message?(h=(0,r.jsx)("div",{className:"truncate",title:t.message,children:t.message}),e[11]=t.message,e[12]=h):h=e[12];let l;e[13]!==s?(l=s!==""&&(0,r.jsx)("div",{className:"truncate font-mono text-[11px] text-muted-foreground",title:s,children:s}),e[13]=s,e[14]=l):l=e[14];let u;e[15]!==h||e[16]!==l?(u=(0,r.jsxs)(W,{className:"max-w-md",children:[h,l]}),e[15]=h,e[16]=l,e[17]=u):u=e[17];let g=t.traceId??"\u2014",b;e[18]!==g?(b=(0,r.jsx)(W,{className:"font-mono text-[11px] text-muted-foreground",children:g}),e[18]=g,e[19]=b):b=e[19];let x=t.shardKey??"\u2014",w;e[20]!==x?(w=(0,r.jsx)(W,{className:"font-mono text-[11px] text-muted-foreground",children:x}),e[20]=x,e[21]=w):w=e[21];let N=t.userId??"\u2014",y;e[22]!==N?(y=(0,r.jsx)(W,{className:"font-mono text-[11px] text-muted-foreground",children:N}),e[22]=N,e[23]=y):y=e[23];let T;return e[24]!==u||e[25]!==b||e[26]!==w||e[27]!==y||e[28]!==o||e[29]!==f||e[30]!==d||e[31]!==a?(T=(0,r.jsxs)(se,{"data-testid":o,children:[f,d,a,u,b,w,y]}),e[24]=u,e[25]=b,e[26]=w,e[27]=y,e[28]=o,e[29]=f,e[30]=d,e[31]=a,e[32]=T):T=e[32],T},"Qe"),We=v(({shardKey:i})=>{let e=ge(),t=z(),[n,s]=(0,I.useState)(""),[o,c]=(0,I.useState)(""),[f,m]=(0,I.useState)(""),[{cursor:d,error:a,loading:h,notConfigured:l,rows:u},g]=(0,I.useReducer)(De,ze),b=ie(n.trim(),400),x=ie(o.trim(),400),w={...b===""?{}:{functionPathPrefix:b},...f===""?{}:{minLevel:f},...i===""?{}:{shardKey:i},...x===""?{}:{userId:x}},N=JSON.stringify(w),y=(0,I.useRef)(N);(0,I.useEffect)(()=>{let p={cancelled:!1};return y.current=N,le((async()=>{g({type:"loading"});try{let C=await e.queryLogArchive(w);p.cancelled||g({cursor:C.nextCursor,rows:C.rows,type:"loaded"})}catch(C){p.cancelled||g(fe(C)===$e?{type:"notConfigured"}:{message:ae(C),type:"failed"})}})()),()=>{p.cancelled=!0}},[e,N]);let T=v(async()=>{if(d===void 0)return;let p=N;g({type:"loading"});try{let C=await e.queryLogArchive({...w,cursor:d});y.current===p&&g({cursor:C.nextCursor,rows:C.rows,type:"append"})}catch(C){y.current===p&&g({message:ae(C),type:"pageFailed"})}},"T"),R=v(p=>{s(p.target.value)},"R"),k=v(p=>{c(p.target.value)},"N"),L=v(p=>{m(p.target.value)},"L"),S=v(()=>{le(T())},"S");return l?(0,r.jsx)(J,{action:(0,r.jsx)("a",{className:"text-sm text-primary underline-offset-4 hover:underline",href:de,rel:"noreferrer",target:"_blank",children:t("Open in Cloudflare")}),description:t("Wire pipelineLogSink to a Cloudflare Pipeline \u2192 R2 Data Catalog table and set R2_SQL_ACCOUNT_ID, R2_SQL_TOKEN, R2_SQL_BUCKET to browse the durable log archive here."),testId:"lg-archive-not-configured",title:t("Log archive not configured")}):(0,r.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lg-archive",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)(D,{"aria-label":t("Function path prefix"),className:"h-8 w-48","data-testid":"lg-archive-path",onChange:R,placeholder:t("function path\u2026"),value:n}),(0,r.jsx)(D,{"aria-label":t("User id"),className:"h-8 w-40","data-testid":"lg-archive-user",onChange:k,placeholder:t("user id\u2026"),value:o}),(0,r.jsxs)("select",{"aria-label":t("Minimum level"),className:"h-8 rounded-md border border-border bg-background px-2 text-sm","data-testid":"lg-archive-min-level",onChange:L,value:f,children:[(0,r.jsx)("option",{value:"",children:t("min level")}),me.map(p=>(0,r.jsx)("option",{value:p,children:p},p))]})]}),a!==null&&(0,r.jsx)("p",{className:"text-sm text-destructive","data-testid":"lg-archive-error",role:"alert",children:a}),h&&u===null&&a===null&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"lg-archive-loading",children:t("Loading\u2026")}),u!==null&&u.length===0&&(0,r.jsx)(J,{description:t("No archived logs match these filters. The durable archive fills as pipelineLogSink flushes records to R2."),testId:"lg-archive-empty",title:t("No archived logs.")}),u!==null&&u.length>0&&(0,r.jsx)("div",{className:"overflow-hidden rounded-xl border border-border shadow-xs",children:(0,r.jsxs)(we,{"data-testid":"lg-archive-table",children:[(0,r.jsx)(Ne,{children:(0,r.jsxs)(se,{children:[(0,r.jsx)(B,{children:t("Time")}),(0,r.jsx)(B,{children:t("Level")}),(0,r.jsx)(B,{children:t("Function")}),(0,r.jsx)(B,{children:t("Message")}),(0,r.jsx)(B,{children:t("Trace")}),(0,r.jsx)(B,{children:t("Shard")}),(0,r.jsx)(B,{children:t("User")})]})}),(0,r.jsx)(Ce,{children:u.map((p,C)=>(0,r.jsx)(Be,{row:p},`${String(p.ts)}-${String(C)}`))})]})}),d!==void 0&&(0,r.jsx)("div",{children:(0,r.jsx)(pe,{"data-testid":"lg-archive-more",disabled:h,onClick:S,size:"sm",variant:"outline",children:t(h?"Loading\u2026":"Load more")})})]})},"ze"),je=v(i=>{let e=(0,K.c)(11),{level:t,onToggle:n,selected:s}=i,o;e[0]!==t||e[1]!==n?(o=v(()=>{n(t)},"o"),e[0]=t,e[1]=n,e[2]=o):o=e[2];let c=o,f=s?"border-border bg-muted font-medium":"border-input text-muted-foreground",m;e[3]!==f?(m=j("rounded-md border px-2 py-1 text-xs",f),e[3]=f,e[4]=m):m=e[4];let d=`logs-level-${t}`,a;return e[5]!==t||e[6]!==c||e[7]!==s||e[8]!==m||e[9]!==d?(a=(0,r.jsx)("button",{"aria-pressed":s,className:m,"data-testid":d,onClick:c,type:"button",children:t}),e[5]=t,e[6]=c,e[7]=s,e[8]=m,e[9]=d,e[10]=a):a=e[10],a},"Ge"),Ve=v(i=>{let e=(0,K.c)(68),{levelFilter:t,onLogPathChange:n,onSearchChange:s,onTimeRangeChange:o,onToggleLevel:c,onToggleSummary:f,pathFilter:m,search:d,showSummary:a,timeRange:h}=i,l=z(),u;e[0]!==l?(u=l("Search messages"),e[0]=l,e[1]=u):u=e[1];let g;e[2]!==l?(g=l("search message"),e[2]=l,e[3]=g):g=e[3];let b;e[4]!==s||e[5]!==d||e[6]!==u||e[7]!==g?(b=(0,r.jsx)(D,{"aria-label":u,className:"h-8 w-48","data-testid":"lg-search",onChange:s,placeholder:g,value:d}),e[4]=s,e[5]=d,e[6]=u,e[7]=g,e[8]=b):b=e[8];let x;e[9]!==l?(x=l("Function path"),e[9]=l,e[10]=x):x=e[10];let w;e[11]!==l?(w=l("filter path"),e[11]=l,e[12]=w):w=e[12];let N;e[13]!==n||e[14]!==m||e[15]!==x||e[16]!==w?(N=(0,r.jsx)(D,{"aria-label":x,className:"h-8 w-40","data-testid":"logs-path-filter",onChange:n,placeholder:w,value:m}),e[13]=n,e[14]=m,e[15]=x,e[16]=w,e[17]=N):N=e[17];let y;e[18]!==l?(y=l("Level filter"),e[18]=l,e[19]=y):y=e[19];let T;e[20]!==t||e[21]!==c?(T=me.map(Q=>(0,r.jsx)(je,{level:Q,onToggle:c,selected:t.has(Q)},Q)),e[20]=t,e[21]=c,e[22]=T):T=e[22];let R;e[23]!==y||e[24]!==T?(R=(0,r.jsx)("div",{"aria-label":y,className:"inline-flex items-center gap-1","data-testid":"logs-level-filter",role:"group",children:T}),e[23]=y,e[24]=T,e[25]=R):R=e[25];let k;e[26]!==l?(k=l("Time range"),e[26]=l,e[27]=k):k=e[27];let L;e[28]!==l?(L=l("All time"),e[28]=l,e[29]=L):L=e[29];let S;e[30]!==L?(S=(0,r.jsx)("option",{value:"all",children:L}),e[30]=L,e[31]=S):S=e[31];let p;e[32]!==l?(p=l("Last 5m"),e[32]=l,e[33]=p):p=e[33];let C;e[34]!==p?(C=(0,r.jsx)("option",{value:"5m",children:p}),e[34]=p,e[35]=C):C=e[35];let q;e[36]!==l?(q=l("Last 15m"),e[36]=l,e[37]=q):q=e[37];let F;e[38]!==q?(F=(0,r.jsx)("option",{value:"15m",children:q}),e[38]=q,e[39]=F):F=e[39];let O;e[40]!==l?(O=l("Last hour"),e[40]=l,e[41]=O):O=e[41];let E;e[42]!==O?(E=(0,r.jsx)("option",{value:"1h",children:O}),e[42]=O,e[43]=E):E=e[43];let M;e[44]!==o||e[45]!==k||e[46]!==S||e[47]!==C||e[48]!==F||e[49]!==E||e[50]!==h?(M=(0,r.jsxs)("select",{"aria-label":k,className:"h-8 rounded-md border border-input bg-transparent px-2 text-sm shadow-xs focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none","data-testid":"logs-time-range",onChange:o,value:h,children:[S,C,F,E]}),e[44]=o,e[45]=k,e[46]=S,e[47]=C,e[48]=F,e[49]=E,e[50]=h,e[51]=M):M=e[51];let V=a?"border-border bg-muted font-medium":"border-input text-muted-foreground",_;e[52]!==V?(_=j("h-8 rounded-md border px-3 text-sm",V),e[52]=V,e[53]=_):_=e[53];let U;e[54]!==a||e[55]!==l?(U=l(a?"List":"Summary"),e[54]=a,e[55]=l,e[56]=U):U=e[56];let A;e[57]!==f||e[58]!==a||e[59]!==_||e[60]!==U?(A=(0,r.jsx)("button",{"aria-pressed":a,className:_,"data-testid":"logs-summary-toggle",onClick:f,type:"button",children:U}),e[57]=f,e[58]=a,e[59]=_,e[60]=U,e[61]=A):A=e[61];let $;return e[62]!==M||e[63]!==A||e[64]!==b||e[65]!==N||e[66]!==R?($=(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[b,N,R,M,A]}),e[62]=M,e[63]=A,e[64]=b,e[65]=N,e[66]=R,e[67]=$):$=e[67],$},"He"),Qe=v(i=>{let e=(0,K.c)(53),{onOutcomeChange:t,onPathChange:n,onTableChange:s,onUserChange:o,outcomeFilter:c,pathPrefix:f,tableFilter:m,userIdFilter:d}=i,a=z(),h;e[0]!==a?(h=a("Function path"),e[0]=a,e[1]=h):h=e[1];let l;e[2]!==a?(l=a("file:function"),e[2]=a,e[3]=l):l=e[3];let u;e[4]!==n||e[5]!==f||e[6]!==h||e[7]!==l?(u=(0,r.jsx)(D,{"aria-label":h,className:"h-8 w-44","data-testid":"lg-req-path",onChange:n,placeholder:l,value:f}),e[4]=n,e[5]=f,e[6]=h,e[7]=l,e[8]=u):u=e[8];let g;e[9]!==a?(g=a("User id"),e[9]=a,e[10]=g):g=e[10];let b;e[11]!==a?(b=a("userId"),e[11]=a,e[12]=b):b=e[12];let x;e[13]!==o||e[14]!==g||e[15]!==b||e[16]!==d?(x=(0,r.jsx)(D,{"aria-label":g,className:"h-8 w-32","data-testid":"lg-req-user",onChange:o,placeholder:b,value:d}),e[13]=o,e[14]=g,e[15]=b,e[16]=d,e[17]=x):x=e[17];let w;e[18]!==a?(w=a("Table touched"),e[18]=a,e[19]=w):w=e[19];let N;e[20]!==a?(N=a("table"),e[20]=a,e[21]=N):N=e[21];let y;e[22]!==s||e[23]!==w||e[24]!==N||e[25]!==m?(y=(0,r.jsx)(D,{"aria-label":w,className:"h-8 w-32","data-testid":"lg-req-table",onChange:s,placeholder:N,value:m}),e[22]=s,e[23]=w,e[24]=N,e[25]=m,e[26]=y):y=e[26];let T;e[27]!==a?(T=a("Outcome filter"),e[27]=a,e[28]=T):T=e[28];let R;e[29]!==a?(R=a("all"),e[29]=a,e[30]=R):R=e[30];let k;e[31]!==R?(k=(0,r.jsx)("option",{value:"all",children:R}),e[31]=R,e[32]=k):k=e[32];let L;e[33]!==a?(L=a("ok"),e[33]=a,e[34]=L):L=e[34];let S;e[35]!==L?(S=(0,r.jsx)("option",{value:"ok",children:L}),e[35]=L,e[36]=S):S=e[36];let p;e[37]!==a?(p=a("error"),e[37]=a,e[38]=p):p=e[38];let C;e[39]!==p?(C=(0,r.jsx)("option",{value:"error",children:p}),e[39]=p,e[40]=C):C=e[40];let q;e[41]!==t||e[42]!==c||e[43]!==T||e[44]!==k||e[45]!==S||e[46]!==C?(q=(0,r.jsxs)("select",{"aria-label":T,className:"h-8 rounded-md border border-input bg-transparent px-2 text-sm shadow-xs focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none","data-testid":"lg-req-outcome",onChange:t,value:c,children:[k,S,C]}),e[41]=t,e[42]=c,e[43]=T,e[44]=k,e[45]=S,e[46]=C,e[47]=q):q=e[47];let F;return e[48]!==q||e[49]!==u||e[50]!==x||e[51]!==y?(F=(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[u,x,y,q]}),e[48]=q,e[49]=u,e[50]=x,e[51]=y,e[52]=F):F=e[52],F},"We"),Fe=v(i=>{let e=(0,K.c)(7),{bucket:t}=i,n;e[0]!==t.key?(n=(0,r.jsx)("span",{className:"truncate text-muted-foreground",role:"gridcell",children:t.key}),e[0]=t.key,e[1]=n):n=e[1];let s;e[2]!==t.count?(s=(0,r.jsx)("span",{className:"shrink-0 tabular-nums",role:"gridcell",children:t.count}),e[2]=t.count,e[3]=s):s=e[3];let o;return e[4]!==n||e[5]!==s?(o=(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4 px-3 py-1 font-mono text-xs","data-testid":"logs-summary-row",role:"row",children:[n,s]}),e[4]=n,e[5]=s,e[6]=o):o=e[6],o},"ve"),Ye=v(i=>{let e=(0,K.c)(31),{summary:t}=i,n=z(),s;e[0]!==t.total||e[1]!==n?(s=n("{count} entries",{count:t.total}),e[0]=t.total,e[1]=n,e[2]=s):s=e[2];let o;e[3]!==s?(o=(0,r.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"logs-summary-total",children:s}),e[3]=s,e[4]=o):o=e[4];let c;e[5]!==n?(c=n("By level"),e[5]=n,e[6]=c):c=e[6];let f;e[7]!==c?(f=(0,r.jsx)("h4",{className:"mb-1 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:c}),e[7]=c,e[8]=f):f=e[8];let m;e[9]!==t.byLevel?(m=t.byLevel.map(Ge),e[9]=t.byLevel,e[10]=m):m=e[10];let d;e[11]!==m?(d=(0,r.jsx)("div",{className:"overflow-hidden rounded-lg border border-border","data-testid":"logs-summary-levels",role:"grid",children:m}),e[11]=m,e[12]=d):d=e[12];let a;e[13]!==f||e[14]!==d?(a=(0,r.jsxs)("div",{children:[f,d]}),e[13]=f,e[14]=d,e[15]=a):a=e[15];let h;e[16]!==n?(h=n("By function"),e[16]=n,e[17]=h):h=e[17];let l;e[18]!==h?(l=(0,r.jsx)("h4",{className:"mb-1 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:h}),e[18]=h,e[19]=l):l=e[19];let u;e[20]!==t.byPath?(u=t.byPath.map(He),e[20]=t.byPath,e[21]=u):u=e[21];let g;e[22]!==u?(g=(0,r.jsx)("div",{className:"overflow-hidden rounded-lg border border-border","data-testid":"logs-summary-paths",role:"grid",children:u}),e[22]=u,e[23]=g):g=e[23];let b;e[24]!==g||e[25]!==l?(b=(0,r.jsxs)("div",{children:[l,g]}),e[24]=g,e[25]=l,e[26]=b):b=e[26];let x;return e[27]!==b||e[28]!==o||e[29]!==a?(x=(0,r.jsxs)("div",{className:"flex flex-col gap-4 rounded-xl border border-border bg-card p-4 shadow-xs","data-testid":"logs-summary",children:[o,a,b]}),e[27]=b,e[28]=o,e[29]=a,e[30]=x):x=e[30],x},"Ye");function Ge(i){return(0,r.jsx)(Fe,{bucket:i},i.key)}v(Ge,"je");function He(i){return(0,r.jsx)(Fe,{bucket:i},i.key)}v(He,"Je");var Je=v(i=>{let e=(0,K.c)(46),{liveError:t,onShardKeyChange:n,onShowArchive:s,onShowErrors:o,onShowRequests:c,shardKey:f,view:m}=i,d=z(),a=m==="requests",h=m==="requests"?"bg-muted font-medium":"text-muted-foreground",l;e[0]!==h?(l=j("px-3 py-1 text-sm",h),e[0]=h,e[1]=l):l=e[1];let u;e[2]!==d?(u=d("Requests"),e[2]=d,e[3]=u):u=e[3];let g;e[4]!==c||e[5]!==a||e[6]!==l||e[7]!==u?(g=(0,r.jsx)("button",{"aria-selected":a,className:l,"data-testid":"lg-view-requests",onClick:c,role:"tab",type:"button",children:u}),e[4]=c,e[5]=a,e[6]=l,e[7]=u,e[8]=g):g=e[8];let b=m==="errors",x=m==="errors"?"bg-muted font-medium":"text-muted-foreground",w;e[9]!==x?(w=j("px-3 py-1 text-sm",x),e[9]=x,e[10]=w):w=e[10];let N;e[11]!==d?(N=d("Errors"),e[11]=d,e[12]=N):N=e[12];let y;e[13]!==o||e[14]!==b||e[15]!==w||e[16]!==N?(y=(0,r.jsx)("button",{"aria-selected":b,className:w,"data-testid":"lg-view-errors",onClick:o,role:"tab",type:"button",children:N}),e[13]=o,e[14]=b,e[15]=w,e[16]=N,e[17]=y):y=e[17];let T=m==="archive",R=m==="archive"?"bg-muted font-medium":"text-muted-foreground",k;e[18]!==R?(k=j("px-3 py-1 text-sm",R),e[18]=R,e[19]=k):k=e[19];let L;e[20]!==d?(L=d("Archive"),e[20]=d,e[21]=L):L=e[21];let S;e[22]!==s||e[23]!==T||e[24]!==k||e[25]!==L?(S=(0,r.jsx)("button",{"aria-selected":T,className:k,"data-testid":"lg-view-archive",onClick:s,role:"tab",type:"button",children:L}),e[22]=s,e[23]=T,e[24]=k,e[25]=L,e[26]=S):S=e[26];let p;e[27]!==y||e[28]!==S||e[29]!==g?(p=(0,r.jsxs)("div",{className:"inline-flex overflow-hidden rounded-lg border border-border",role:"tablist",children:[g,y,S]}),e[27]=y,e[28]=S,e[29]=g,e[30]=p):p=e[30];let C;e[31]!==n||e[32]!==f?(C=(0,r.jsx)(be,{onChange:n,testId:"lg-shard-input",value:f}),e[31]=n,e[32]=f,e[33]=C):C=e[33];let q;e[34]!==t||e[35]!==m?(q=m!=="archive"&&(0,r.jsx)(Le,{message:t,prefix:"lg"}),e[34]=t,e[35]=m,e[36]=q):q=e[36];let F;e[37]!==d?(F=d("Open in Cloudflare"),e[37]=d,e[38]=F):F=e[38];let O;e[39]!==F?(O=(0,r.jsx)("a",{className:"text-sm text-primary underline-offset-4 hover:underline","data-testid":"lg-cf-link",href:de,rel:"noreferrer",target:"_blank",children:F}),e[39]=F,e[40]=O):O=e[40];let E;return e[41]!==p||e[42]!==C||e[43]!==q||e[44]!==O?(E=(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[p,C,q,O]}),e[41]=p,e[42]=C,e[43]=q,e[44]=O,e[45]=E):E=e[45],E},"Xe"),ue=400,Xe=36,Ze={height:ue,overflow:"auto"},Oe={left:0,position:"absolute",top:0,width:"100%"},et={error:"destructive",ok:"secondary"},Ee=v(i=>{let e=(0,K.c)(6),{onOpenTrace:t,traceId:n}=i,s=z(),o;e[0]!==t||e[1]!==s||e[2]!==n?(o=n===void 0?null:(0,r.jsx)("button",{className:"text-primary underline-offset-2 hover:underline","data-testid":"lg-trace-link",onClick:v(()=>{t(n)},"onClick"),type:"button",children:s("Trace")}),e[0]=t,e[1]=s,e[2]=n,e[3]=o):o=e[3];let c;return e[4]!==o?(c=(0,r.jsx)("span",{className:"w-16 shrink-0 text-right",role:"gridcell",children:o}),e[4]=o,e[5]=c):c=e[5],c},"xe"),tt=v(i=>{let e=(0,K.c)(13),{entry:t,index:n,measureRef:s,onOpenTrace:o,start:c}=i,f=`translateY(${String(c)}px)`,m;e[0]!==f?(m={...Oe,transform:f},e[0]=f,e[1]=m):m=e[1];let d=m,a;e[2]!==t?(a=(0,r.jsx)(Re,{entry:t}),e[2]=t,e[3]=a):a=e[3];let h;e[4]!==t.traceId||e[5]!==o?(h=(0,r.jsx)(Ee,{onOpenTrace:o,traceId:t.traceId}),e[4]=t.traceId,e[5]=o,e[6]=h):h=e[6];let l;return e[7]!==n||e[8]!==s||e[9]!==d||e[10]!==a||e[11]!==h?(l=(0,r.jsxs)("div",{className:"flex items-center border-b border-border px-3 py-1.5 font-mono text-xs hover:bg-muted/50","data-index":n,"data-testid":"lg-row",ref:s,role:"row",style:d,children:[a,h]}),e[7]=n,e[8]=s,e[9]=d,e[10]=a,e[11]=h,e[12]=l):l=e[12],l},"rt"),Ie=v(i=>i.length===0?"\u2014":i.join(", "),"ce"),rt=v(i=>{let e=(0,K.c)(41),{entry:t,index:n,measureRef:s,onOpenTrace:o,start:c}=i,f=`translateY(${String(c)}px)`,m;e[0]!==f?(m={...Oe,transform:f},e[0]=f,e[1]=m):m=e[1];let d=m,a;e[2]!==t.ts?(a=new Date(t.ts).toLocaleString(),e[2]=t.ts,e[3]=a):a=e[3];let h;e[4]!==a?(h=(0,r.jsx)("span",{className:"w-40 shrink-0 tabular-nums text-muted-foreground",role:"gridcell",children:a}),e[4]=a,e[5]=h):h=e[5];let l=et[t.outcome],u;e[6]!==t.outcome||e[7]!==l?(u=(0,r.jsx)("span",{className:"w-16 shrink-0",role:"gridcell",children:(0,r.jsx)(re,{variant:l,children:t.outcome})}),e[6]=t.outcome,e[7]=l,e[8]=u):u=e[8];let g;e[9]!==t.functionPath?(g=(0,r.jsx)("span",{className:"w-44 shrink-0 truncate",role:"gridcell",title:t.functionPath,children:t.functionPath}),e[9]=t.functionPath,e[10]=g):g=e[10];let b=t.shardKey??"\u2014",x;e[11]!==b?(x=(0,r.jsx)("span",{className:"w-24 shrink-0 truncate text-muted-foreground",role:"gridcell",children:b}),e[11]=b,e[12]=x):x=e[12];let w=t.userId??"\u2014",N;e[13]!==w?(N=(0,r.jsx)("span",{className:"w-24 shrink-0 truncate text-muted-foreground",role:"gridcell",children:w}),e[13]=w,e[14]=N):N=e[14];let y;e[15]!==t.durationMs?(y=Math.round(t.durationMs),e[15]=t.durationMs,e[16]=y):y=e[16];let T=`${String(y)}ms`,R;e[17]!==T?(R=(0,r.jsx)("span",{className:"w-16 shrink-0 tabular-nums text-muted-foreground",role:"gridcell",children:T}),e[17]=T,e[18]=R):R=e[18];let k;e[19]!==t.errorMessage||e[20]!==t.outcome||e[21]!==t.tablesRead||e[22]!==t.tablesWritten?(k=t.outcome==="error"&&t.errorMessage!==void 0?t.errorMessage:`r:${Ie(t.tablesRead)} \xB7 w:${Ie(t.tablesWritten)}`,e[19]=t.errorMessage,e[20]=t.outcome,e[21]=t.tablesRead,e[22]=t.tablesWritten,e[23]=k):k=e[23];let L;e[24]!==k?(L=(0,r.jsx)("span",{className:"flex-1 truncate text-muted-foreground",role:"gridcell",children:k}),e[24]=k,e[25]=L):L=e[25];let S;e[26]!==t.traceId||e[27]!==o?(S=(0,r.jsx)(Ee,{onOpenTrace:o,traceId:t.traceId}),e[26]=t.traceId,e[27]=o,e[28]=S):S=e[28];let p;return e[29]!==n||e[30]!==s||e[31]!==d||e[32]!==N||e[33]!==R||e[34]!==L||e[35]!==S||e[36]!==h||e[37]!==u||e[38]!==g||e[39]!==x?(p=(0,r.jsxs)("div",{className:"flex items-center border-b border-border px-3 py-1.5 font-mono text-xs hover:bg-muted/50","data-index":n,"data-testid":"lg-req-row",ref:s,role:"row",style:d,children:[h,u,g,x,N,R,L,S]}),e[29]=n,e[30]=s,e[31]=d,e[32]=N,e[33]=R,e[34]=L,e[35]=S,e[36]=h,e[37]=u,e[38]=g,e[39]=x,e[40]=p):p=e[40],p},"st"),qe=v(i=>{let{entries:e}=i??{};return Array.isArray(e)?e:[]},"de"),at=v(i=>{let e={};return i.functionPathPrefix.trim()!==""&&(e.functionPathPrefix=i.functionPathPrefix.trim()),i.userId.trim()!==""&&(e.userId=i.userId.trim()),i.tableTouched.trim()!==""&&(e.tableTouched=i.tableTouched.trim()),(i.outcome==="ok"||i.outcome==="error")&&(e.outcome=i.outcome),e},"lt"),lt={"5m":300*1e3,"15m":900*1e3,"1h":3600*1e3},ot=v((i,e)=>{let t=e.search.trim().toLowerCase(),n=e.path.trim().toLowerCase(),s=e.range==="all"?Number.NEGATIVE_INFINITY:e.now-lt[e.range];return i.filter(o=>e.levels.size>0&&!e.levels.has(o.level)||o.timestamp<s||n!==""&&!(o.functionPath??"").toLowerCase().includes(n)?!1:t===""||o.message.toLowerCase().includes(t)||ce(o.fields).toLowerCase().includes(t))},"at"),nt="\u2014",st=v(i=>{let e=new Map,t=new Map;for(let o of i){e.set(o.level,(e.get(o.level)??0)+1);let c=o.functionPath??nt;t.set(c,(t.get(c)??0)+1)}let n=me.filter(o=>e.has(o)).map(o=>({count:e.get(o)??0,key:o})),s=[...t.entries()].map(([o,c])=>({count:c,key:o})).toSorted((o,c)=>c.count===o.count?o.key.localeCompare(c.key):c.count-o.count);return{byLevel:n,byPath:s,total:i.length}},"it"),qt=v(({initialShardKey:i})=>{let e=z(),[t,n]=(0,I.useState)("requests"),{queryShardKey:s,setShardKey:o,shardKey:c}=xe(i),[f,m]=(0,I.useState)(""),[d,a]=(0,I.useState)(()=>new Set),[h,l]=(0,I.useState)(""),[u,g]=(0,I.useState)("all"),[b,x]=(0,I.useState)(!1),[w,N]=(0,I.useState)(""),[y,T]=(0,I.useState)(""),[R,k]=(0,I.useState)(""),[L,S]=(0,I.useState)("all"),p=at({functionPathPrefix:w,outcome:L,tableTouched:R,userId:y}),C=oe(ne.getRequestLog,p,{enabled:t==="requests",live:!0,shardKey:s}),q=oe(ne.getLogs,{},{enabled:t==="errors",live:!0,shardKey:s}),F=t==="requests"?C:q,{error:O,errorSource:E,isLoading:M,liveError:V}=F,_=Te(s),U=qe(q.data),A=qe(C.data);(0,I.useEffect)(()=>{F.data!==void 0&&ve(s)},[F.data,s]);let $=ot(U,{levels:d,now:Date.now(),path:h,range:u,search:f}),Q=st($),X=t==="requests"?A.length:$.length,Z=t==="errors"&&b,Y=(0,I.useMemo)(()=>O!==null?"error":X===0?M?Z?"summary":"list":"empty":Z?"summary":"list",[X,M,O,Z]),he=(0,I.useRef)(null),G=ke({count:X,estimateSize:v(()=>Xe,"estimateSize"),getScrollElement:v(()=>he.current,"getScrollElement"),initialRect:{height:ue,width:800},observeElementRect:v((P,ee)=>Se(P,ee,ue),"observeElementRect"),overscan:8}),Ke=G.getVirtualItems(),Me={height:G.getTotalSize(),position:"relative",width:"100%"};return(0,r.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-logs",children:[(0,r.jsx)(Je,{liveError:V,onShardKeyChange:o,onShowArchive:v(()=>{n("archive"),x(!1)},"onShowArchive"),onShowErrors:v(()=>{n("errors"),x(!1)},"onShowErrors"),onShowRequests:v(()=>{n("requests"),x(!1)},"onShowRequests"),shardKey:c,view:t}),t==="errors"&&(0,r.jsx)(Ve,{levelFilter:d,onLogPathChange:v(P=>{l(P.target.value)},"onLogPathChange"),onSearchChange:v(P=>{m(P.target.value)},"onSearchChange"),onTimeRangeChange:v(P=>{g(P.target.value)},"onTimeRangeChange"),onToggleLevel:v(P=>{a(ee=>{let H=new Set(ee);return H.has(P)?H.delete(P):H.add(P),H})},"onToggleLevel"),onToggleSummary:v(()=>{x(P=>!P)},"onToggleSummary"),pathFilter:h,search:f,showSummary:b,timeRange:u}),t==="requests"&&(0,r.jsx)(Qe,{onOutcomeChange:v(P=>{S(P.target.value)},"onOutcomeChange"),onPathChange:v(P=>{N(P.target.value)},"onPathChange"),onTableChange:v(P=>{k(P.target.value)},"onTableChange"),onUserChange:v(P=>{T(P.target.value)},"onUserChange"),outcomeFilter:L,pathPrefix:w,tableFilter:R,userIdFilter:y}),t==="archive"?(0,r.jsx)(We,{shardKey:s}):(0,r.jsxs)(r.Fragment,{children:[Y==="error"&&(0,r.jsx)(ye,{error:E,testId:"lg-error"}),Y==="empty"&&(0,r.jsx)(J,{description:e("Function and request logs for this shard show up here as your app handles traffic."),icon:(0,r.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M4 5h16M4 12h16M4 19h10"})}),testId:"lg-empty",title:e("No logs.")}),Y==="summary"&&(0,r.jsx)(Ye,{summary:Q}),Y==="list"&&(0,r.jsx)("div",{className:"rounded-xl border border-border shadow-xs","data-testid":"lg-scroll",ref:he,style:Ze,children:(0,r.jsx)("div",{"aria-label":e("Recent logs"),"data-testid":"lg-table",role:"grid",style:Me,children:Ke.map(P=>t==="requests"?(0,r.jsx)(rt,{entry:A[P.index],index:P.index,measureRef:G.measureElement,onOpenTrace:_,start:P.start},P.key):(0,r.jsx)(tt,{entry:$[P.index],index:P.index,measureRef:G.measureElement,onOpenTrace:_,start:P.start},P.key))})})]})]})},"Wt");export{qt as LogsPanel,ot as filterLogs,st as summarizeLogs};
@@ -0,0 +1 @@
1
+ import{a as n,d as v,f as N,g as z,i as k}from"./chunk-I26MS5PJ.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 N}from"./chunk-AD2DJJC3.js";import{a as v,b as w,c as y,d,e as c,f as i}from"./chunk-HCTJKP5J.js";import{a as x,e as b}from"./chunk-2IKDEUCX.js";import{d as h}from"./chunk-HJHSQPHW.js";import{a,d as p,e as I,g as R,i as g}from"./chunk-I26MS5PJ.js";var $=p(I(),1);var e=p(R(),1);var A={ERROR:"error",INFO:"info",WARN:"warning"},q=a(r=>{let n=typeof r.metadata.table=="string"?r.metadata.table:void 0;return{description:`${r.detail} ${r.remediation}`,entity:n,issueType:r.title,key:r.cacheKey,level:A[r.level]}},"z"),C=["error","warning","info"],O={error:"bg-destructive",info:"bg-info",warning:"bg-warning"},S=a((r,n)=>({error:r("Errors"),info:r("Info"),warning:r("Warnings")})[n],"$"),j=a((r,n,o)=>({error:r("{count} errors",{count:o}),info:r("{count} suggestions",{count:o}),warning:r("{count} warnings",{count:o})})[n],"k"),z=a((r,n)=>({error:r("No errors detected"),info:r("No suggestions"),warning:r("No warnings detected")})[n],"V"),F=a(r=>{let n={error:0,info:0,warning:0};for(let o of r??[])n[o.level]+=1;return n},"O"),B=a(({error:r=null,errorSource:n,rows:o,testId:l,toolbar:f})=>{let s=h(),[m,k]=(0,$.useState)("error"),T=F(o),u=(o??[]).filter(t=>t.level===m),E=a(t=>{k(t.currentTarget.dataset.level)},"h");return(0,e.jsxs)("div",{className:"flex flex-col gap-3","data-testid":l,children:[(0,e.jsx)("div",{className:"flex border-b border-border",role:"tablist",children:C.map(t=>(0,e.jsxs)("button",{"aria-selected":m===t,className:"flex min-w-32 flex-col gap-0.5 border-b-2 border-transparent px-4 py-2 text-start outline-none transition-colors hover:bg-muted/40 focus-visible:bg-muted/40 aria-selected:border-foreground","data-level":t,"data-testid":`${l}-tab-${t}`,onClick:E,role:"tab",type:"button",children:[(0,e.jsxs)("span",{className:"flex items-center gap-2 text-sm font-medium text-foreground",children:[(0,e.jsx)("span",{"aria-hidden":"true",className:g("size-2 rounded-sm",O[t])}),S(s,t)]}),(0,e.jsx)("span",{className:"ps-4 text-xs text-muted-foreground",children:j(s,t,T[t])})]},t))}),f!==void 0&&(0,e.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:f}),r!==null&&(0,e.jsx)(N,{error:n??r,testId:`${l}-error`}),(0,e.jsx)(x,{className:"overflow-hidden py-0",children:(0,e.jsx)(b,{className:"px-0",children:(0,e.jsxs)(v,{children:[(0,e.jsx)(w,{children:(0,e.jsxs)(d,{children:[(0,e.jsx)(c,{children:s("Issue type")}),(0,e.jsx)(c,{children:s("Entity/item")}),(0,e.jsx)(c,{children:s("Description")})]})}),(0,e.jsx)(y,{children:u.length===0?(0,e.jsx)(d,{children:(0,e.jsxs)(i,{className:"h-40 text-center align-middle text-muted-foreground",colSpan:3,"data-testid":`${l}-empty`,children:[(0,e.jsx)("span",{className:"block text-sm font-medium text-foreground",children:z(s,m)}),(0,e.jsx)("span",{className:"block text-sm",children:s("Nothing to report for this deployment.")})]})}):u.map(t=>(0,e.jsxs)(d,{children:[(0,e.jsx)(i,{className:"font-medium text-foreground",children:t.issueType}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:t.entity??"\u2014"}),(0,e.jsxs)(i,{className:"text-muted-foreground",children:[(0,e.jsx)("span",{children:t.description}),t.action!==void 0&&(0,e.jsx)("span",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:t.action})]})]},t.key))})]})})})]})},"F");export{q as a,B as b};