@lunora/studio 1.0.0-alpha.34 → 1.0.0-alpha.340

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 (472) hide show
  1. package/LICENSE.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/index.d.mts +1597 -0
  4. package/dist/index.d.ts +991 -807
  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 +6 -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-Py7C4ibM.mjs +2 -0
  63. package/dist/packem_shared/ApiReferencePanel-DlYVADAy.mjs +1 -0
  64. package/dist/packem_shared/CommandPalette-CM1hqAOD.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-DvhNw0BI.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-DxlLv5x1.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-TFTQpSVj.mjs +1 -0
  74. package/dist/packem_shared/HomePanel-BVz2sDQ4.mjs +1 -0
  75. package/dist/packem_shared/MigrationsPanel-fUyhbt0w.mjs +1 -0
  76. package/dist/packem_shared/OpenRpcReferencePanel-nYyfjjse.mjs +1 -0
  77. package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.mjs +1 -0
  78. package/dist/packem_shared/ScheduledJobs-zSeU_6cN.mjs +1 -0
  79. package/dist/packem_shared/ShardInput-C6mjgAh4.mjs +1 -0
  80. package/dist/packem_shared/Studio-CNqMkRmB.mjs +1 -0
  81. package/dist/packem_shared/StudioApp-CUxEVr__.mjs +1 -0
  82. package/dist/packem_shared/StudioI18nProvider-fVsCSs5L.mjs +1 -0
  83. package/dist/packem_shared/advisor-view-CXiPdw4B.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-D45VvUTx.d.mts +351 -0
  87. package/dist/packem_shared/app.d-D45VvUTx.d.ts +351 -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-BHTuvSI7.mjs +1 -0
  98. package/dist/packem_shared/data-view-params-DhYmAkcj.mjs +1 -0
  99. package/dist/packem_shared/diagram-export-panel-BMLzao0Y.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-D-ftqyo-.mjs +1 -0
  103. package/dist/packem_shared/grid-features-CIdZ8Dqo.mjs +6 -0
  104. package/dist/packem_shared/grid-pagination-DgzyzfBh.mjs +1 -0
  105. package/dist/packem_shared/home-panel-CF-MfsnH.mjs +3 -0
  106. package/dist/packem_shared/input-CXhxesPC.mjs +1 -0
  107. package/dist/packem_shared/internal-BXEjuLPN.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-BWDt_F56.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-CFBkH4uZ.mjs +1 -0
  116. package/dist/packem_shared/reference-view-BrsL8UGn.mjs +13 -0
  117. package/dist/packem_shared/schema-diagram-ghsOCED7.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-COsfUSGc.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-BcHsk7mT.mjs +2 -0
  128. package/dist/packem_shared/table-D0SBiDu-.mjs +2 -0
  129. package/dist/packem_shared/table-list-sidebar-DwqtHSHU.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-I1uILsUP.mjs +1 -0
  133. package/dist/packem_shared/use-admin-spec-BdNLZbTO.mjs +1 -0
  134. package/dist/packem_shared/use-async-submit-2eBBD0-m.mjs +1 -0
  135. package/dist/packem_shared/use-auth-config-DQ8tNyBh.mjs +1 -0
  136. package/dist/packem_shared/use-mirrored-ref-CVDf2z1M.mjs +1 -0
  137. package/dist/packem_shared/use-open-trace-B_0LbTD7.mjs +1 -0
  138. package/dist/packem_shared/use-shard-key-BsP3o5wT.mjs +1 -0
  139. package/dist/packem_shared/use-sql-assistant-DetnUyFf.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-253UHWDX.js +1 -0
  144. package/dist/standalone/chunk-2I4NHEKA.js +1 -0
  145. package/dist/standalone/chunk-2IKDEUCX.js +1 -0
  146. package/dist/standalone/chunk-2SNK7KHX.js +1 -0
  147. package/dist/standalone/chunk-37WYCOQ2.js +1 -0
  148. package/dist/standalone/chunk-3FYMEXVB.js +1 -0
  149. package/dist/standalone/chunk-3N5PRV3V.js +1 -0
  150. package/dist/standalone/chunk-3YXASVTP.js +1 -0
  151. package/dist/standalone/chunk-43GV7LQK.js +1 -0
  152. package/dist/standalone/chunk-4CGBMYO3.js +6 -0
  153. package/dist/standalone/chunk-4NOMAGEO.js +1 -0
  154. package/dist/standalone/chunk-4ZEL6BYL.js +1 -0
  155. package/dist/standalone/chunk-55UGUCQ6.js +1 -0
  156. package/dist/standalone/chunk-5B2RTXBS.js +1 -0
  157. package/dist/standalone/chunk-5QR2SQIS.js +1 -0
  158. package/dist/standalone/chunk-5SLTDY4C.js +1 -0
  159. package/dist/standalone/chunk-5Y5UTG4N.js +1 -0
  160. package/dist/standalone/chunk-6XKL22OG.js +3 -0
  161. package/dist/standalone/chunk-6ZSIPBTC.js +6 -0
  162. package/dist/standalone/chunk-74IYYDDI.js +19 -0
  163. package/dist/standalone/chunk-7G4Z6Q7X.js +1 -0
  164. package/dist/standalone/chunk-7GVT36VI.js +1 -0
  165. package/dist/standalone/chunk-7Q256NLI.js +1 -0
  166. package/dist/standalone/chunk-7RKB5KS7.js +1 -0
  167. package/dist/standalone/chunk-7Y3SY37W.js +1 -0
  168. package/dist/standalone/chunk-APEQELK3.js +1 -0
  169. package/dist/standalone/chunk-AUAECCXB.js +1 -0
  170. package/dist/standalone/{chunk-BJGBHGK3.js → chunk-AUGKHAMQ.js} +1 -1
  171. package/dist/standalone/chunk-BFQMOALO.js +1 -0
  172. package/dist/standalone/chunk-BOMPSVRC.js +1 -0
  173. package/dist/standalone/chunk-BTG6YDYM.js +1 -0
  174. package/dist/standalone/chunk-BTQ72TPT.js +1 -0
  175. package/dist/standalone/chunk-CCDX5RYT.js +1 -0
  176. package/dist/standalone/chunk-CGQMJYCW.js +1 -0
  177. package/dist/standalone/chunk-CVXNHIQW.js +1 -0
  178. package/dist/standalone/chunk-DBHZXRL6.js +1 -0
  179. package/dist/standalone/chunk-DBZ4TBP5.js +1 -0
  180. package/dist/standalone/chunk-DEFCA7GG.js +5 -0
  181. package/dist/standalone/chunk-DHGPCQ2F.js +1 -0
  182. package/dist/standalone/chunk-E4PXACVL.js +3 -0
  183. package/dist/standalone/chunk-E5DXYVPB.js +1 -0
  184. package/dist/standalone/chunk-ECY2JC5F.js +1 -0
  185. package/dist/standalone/chunk-EE227HDE.js +1 -0
  186. package/dist/standalone/chunk-ENIA26XP.js +1 -0
  187. package/dist/standalone/chunk-EWMBX5N2.js +1 -0
  188. package/dist/standalone/chunk-FCXFQF2W.js +1 -0
  189. package/dist/standalone/chunk-FPI7AMQJ.js +1 -0
  190. package/dist/standalone/chunk-FUL4ROKH.js +1 -0
  191. package/dist/standalone/chunk-FUYEZFBP.js +1 -0
  192. package/dist/standalone/chunk-G2F22AMT.js +1 -0
  193. package/dist/standalone/chunk-GC4XRCRZ.js +1 -0
  194. package/dist/standalone/chunk-GHQ2VDI2.js +1 -0
  195. package/dist/standalone/chunk-GOFZ4Y74.js +1 -0
  196. package/dist/standalone/chunk-GUDC24NJ.js +1 -0
  197. package/dist/standalone/chunk-GWVYDOBH.js +1 -0
  198. package/dist/standalone/chunk-GYBCO7NN.js +1 -0
  199. package/dist/standalone/chunk-HCFJBY65.js +1 -0
  200. package/dist/standalone/chunk-HCTJKP5J.js +1 -0
  201. package/dist/standalone/chunk-HGHIVU76.js +1 -0
  202. package/dist/standalone/chunk-HH52IEFY.js +4 -0
  203. package/dist/standalone/chunk-HIJGQX6F.js +4 -0
  204. package/dist/standalone/chunk-HPYJUVCC.js +1 -0
  205. package/dist/standalone/chunk-I26MS5PJ.js +1 -0
  206. package/dist/standalone/chunk-ICRKYAYO.js +1 -0
  207. package/dist/standalone/chunk-IRSSZXC3.js +1 -0
  208. package/dist/standalone/chunk-ITT6MM23.js +1 -0
  209. package/dist/standalone/chunk-IWZ7GVQO.js +1 -0
  210. package/dist/standalone/chunk-JR4ROUBB.js +1 -0
  211. package/dist/standalone/chunk-K2EHRNYW.js +1 -0
  212. package/dist/standalone/chunk-K3UAOIR7.js +1 -0
  213. package/dist/standalone/chunk-KCFO2BVI.js +15 -0
  214. package/dist/standalone/chunk-KF7Y5S5O.js +1 -0
  215. package/dist/standalone/chunk-LHG2JVIM.js +2 -0
  216. package/dist/standalone/chunk-LXCVA5SP.js +1 -0
  217. package/dist/standalone/chunk-M3QKMHAP.js +15 -0
  218. package/dist/standalone/chunk-MVWZMWPD.js +1 -0
  219. package/dist/standalone/chunk-NCBLHBRW.js +1 -0
  220. package/dist/standalone/chunk-NCCORPSU.js +7 -0
  221. package/dist/standalone/chunk-NCPW7WHO.js +1 -0
  222. package/dist/standalone/chunk-NGVP66OH.js +1 -0
  223. package/dist/standalone/chunk-NQZALRU3.js +1 -0
  224. package/dist/standalone/chunk-NRP22GKC.js +1 -0
  225. package/dist/standalone/chunk-NXQW5E6W.js +1 -0
  226. package/dist/standalone/chunk-O2FW4VRL.js +1 -0
  227. package/dist/standalone/chunk-OI5HX3ZO.js +1 -0
  228. package/dist/standalone/chunk-OLIKYC3C.js +59 -0
  229. package/dist/standalone/chunk-OPM7ESDV.js +1 -0
  230. package/dist/standalone/chunk-OQ6I6OXT.js +2 -0
  231. package/dist/standalone/chunk-OYCUPD3Q.js +1 -0
  232. package/dist/standalone/chunk-PSMQQV6S.js +1 -0
  233. package/dist/standalone/chunk-Q6ED4KUL.js +1 -0
  234. package/dist/standalone/chunk-Q6IT6ZD7.js +1 -0
  235. package/dist/standalone/{chunk-ZHVTQ37P.js → chunk-QAQDMS6R.js} +1 -1
  236. package/dist/standalone/chunk-QJLHH3ET.js +1 -0
  237. package/dist/standalone/chunk-R3ADWOYR.js +1 -0
  238. package/dist/standalone/chunk-R6U22RSY.js +1 -0
  239. package/dist/standalone/chunk-RB3WPSY5.js +14 -0
  240. package/dist/standalone/chunk-RGMVGZV4.js +1 -0
  241. package/dist/standalone/chunk-RWVIV3U7.js +1 -0
  242. package/dist/standalone/chunk-S4Z7K55A.js +1 -0
  243. package/dist/standalone/chunk-SA2OGF3F.js +1 -0
  244. package/dist/standalone/chunk-SC6P4M3S.js +1 -0
  245. package/dist/standalone/chunk-SJQERRSZ.js +1 -0
  246. package/dist/standalone/chunk-SU6QNITV.js +1 -0
  247. package/dist/standalone/chunk-T6IV7OKH.js +1 -0
  248. package/dist/standalone/chunk-UC7MNI2F.js +1 -0
  249. package/dist/standalone/chunk-UIIKW4II.js +1 -0
  250. package/dist/standalone/chunk-UJQNKTYE.js +1 -0
  251. package/dist/standalone/chunk-UVL7N5IL.js +1 -0
  252. package/dist/standalone/chunk-UYEZR3BI.js +1 -0
  253. package/dist/standalone/chunk-VCFEO3RI.js +1 -0
  254. package/dist/standalone/chunk-VDC6JP4A.js +1 -0
  255. package/dist/standalone/chunk-VENSZ6LF.js +1 -0
  256. package/dist/standalone/chunk-VESGIGMQ.js +1 -0
  257. package/dist/standalone/chunk-VJ7RCBJ7.js +1 -0
  258. package/dist/standalone/chunk-VNMKNORK.js +1 -0
  259. package/dist/standalone/chunk-VQRCJJXS.js +1 -0
  260. package/dist/standalone/chunk-VVCXVAA7.js +8 -0
  261. package/dist/standalone/chunk-VXJJSPX3.js +1 -0
  262. package/dist/standalone/chunk-WJRYEML4.js +1 -0
  263. package/dist/standalone/chunk-WUI2PUY6.js +1 -0
  264. package/dist/standalone/chunk-WVWCUB4S.js +1 -0
  265. package/dist/standalone/chunk-WVYIBXUH.js +1 -0
  266. package/dist/standalone/chunk-X4MAMXRE.js +1 -0
  267. package/dist/standalone/chunk-XBQ66PGW.js +1 -0
  268. package/dist/standalone/chunk-XGCIDUJF.js +1 -0
  269. package/dist/standalone/chunk-XKISL2CG.js +1 -0
  270. package/dist/standalone/chunk-Y3AYVFTK.js +1 -0
  271. package/dist/standalone/chunk-YZ72ZAGX.js +1 -0
  272. package/dist/standalone/chunk-ZJQIGWLG.js +1 -0
  273. package/dist/standalone/chunk-ZKJS6EBE.js +1 -0
  274. package/dist/standalone/chunk-ZKV2XC5B.js +1 -0
  275. package/dist/standalone/chunk-ZPNTFCVI.js +1 -0
  276. package/dist/standalone/studio.js +9 -214
  277. package/dist/styles.css +2 -2
  278. package/package.json +26 -22
  279. package/dist/index.js +0 -41
  280. package/dist/mount.js +0 -27
  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 -198
  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 -377
  287. package/dist/packem_chunks/HealthPanel.js +0 -648
  288. package/dist/packem_chunks/InsightsPanel.js +0 -462
  289. package/dist/packem_chunks/LogsPanel.js +0 -827
  290. package/dist/packem_chunks/MailPanel.js +0 -441
  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 -2513
  295. package/dist/packem_chunks/SecurityAdvisorPanel.js +0 -95
  296. package/dist/packem_chunks/SettingsPanel.js +0 -391
  297. package/dist/packem_chunks/SqlEditorPanel.js +0 -2323
  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 -780
  304. package/dist/packem_chunks/fanout-panel.js +0 -482
  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 -186
  310. package/dist/packem_chunks/permissions-panel.js +0 -805
  311. package/dist/packem_chunks/queues-panel.js +0 -148
  312. package/dist/packem_chunks/rls-panel.js +0 -315
  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 -140
  316. package/dist/packem_chunks/subscriptions-panel.js +0 -238
  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-Cu6mD4u7.js +0 -842
  322. package/dist/packem_shared/ApiReferencePanel-Co_wpRF2.js +0 -230
  323. package/dist/packem_shared/CommandPalette-BUPpbpMc.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-DSNK1tPg.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-ErfvIs1S.js +0 -289
  333. package/dist/packem_shared/HomePanel-DQk3P8xX.js +0 -14
  334. package/dist/packem_shared/OpenRpcReferencePanel-DLWzrIx9.js +0 -192
  335. package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
  336. package/dist/packem_shared/ScheduledJobs-ClaNpZsg.js +0 -262
  337. package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
  338. package/dist/packem_shared/Studio-Biu37c3O.js +0 -16
  339. package/dist/packem_shared/StudioApp-D6a2ZmXS.js +0 -657
  340. package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
  341. package/dist/packem_shared/advisor-view-D3-U4kRR.js +0 -159
  342. package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
  343. package/dist/packem_shared/alert-CdAET2K_.js +0 -68
  344. package/dist/packem_shared/app.d-CNLRTrWw.d.ts +0 -300
  345. package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
  346. package/dist/packem_shared/bar-chart-DSwcWIRy.js +0 -3246
  347. package/dist/packem_shared/browser-storage-tLOxkIHd.js +0 -185
  348. package/dist/packem_shared/button-BhsN2uZH.js +0 -49
  349. package/dist/packem_shared/card-DURq3ElK.js +0 -175
  350. package/dist/packem_shared/cf-links-BZfRdxSE.js +0 -8
  351. package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
  352. package/dist/packem_shared/data-grid-Jz8FqQ2C.js +0 -183
  353. package/dist/packem_shared/data-view-params-Cd6yRVbv.js +0 -96
  354. package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
  355. package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
  356. package/dist/packem_shared/error-alert-BBT6D22d.js +0 -114
  357. package/dist/packem_shared/grid-features-CUr8Z1_O.js +0 -745
  358. package/dist/packem_shared/home-panel-Bo-Mgrkn.js +0 -1639
  359. package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
  360. package/dist/packem_shared/internal-DTsYVn-g.js +0 -97
  361. package/dist/packem_shared/label-D8ykjn5J.js +0 -46
  362. package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
  363. package/dist/packem_shared/modal-shell-hyaJvIJ6.js +0 -100
  364. package/dist/packem_shared/reference-view-CSKyUyPl.js +0 -2141
  365. package/dist/packem_shared/select-UkNYCT3s.js +0 -273
  366. package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
  367. package/dist/packem_shared/skeleton-CGhL0p20.js +0 -45
  368. package/dist/packem_shared/sparkline-BnA1kC9X.js +0 -93
  369. package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
  370. package/dist/packem_shared/studio-C4sgu0F7.js +0 -4015
  371. package/dist/packem_shared/table-DsCa9Qp9.js +0 -246
  372. package/dist/packem_shared/table-list-sidebar-B5psdSV1.js +0 -832
  373. package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
  374. package/dist/packem_shared/use-admin-query-BHPKmPuj.js +0 -106
  375. package/dist/packem_shared/use-auth-capabilities-C-VH0oJJ.js +0 -32
  376. package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
  377. package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
  378. package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
  379. package/dist/standalone/chunk-25VHPD2I.js +0 -1
  380. package/dist/standalone/chunk-2GGMGPEP.js +0 -1
  381. package/dist/standalone/chunk-2K47A3P6.js +0 -1
  382. package/dist/standalone/chunk-2NGUNNGW.js +0 -1
  383. package/dist/standalone/chunk-3CJW6NWG.js +0 -4
  384. package/dist/standalone/chunk-3OA7PECS.js +0 -6
  385. package/dist/standalone/chunk-4H2OJBXO.js +0 -1
  386. package/dist/standalone/chunk-4MLAVZP4.js +0 -1
  387. package/dist/standalone/chunk-4QHKBC77.js +0 -1
  388. package/dist/standalone/chunk-55YA7ZZI.js +0 -76
  389. package/dist/standalone/chunk-5OH3VPZF.js +0 -1
  390. package/dist/standalone/chunk-5OIBXYZM.js +0 -1
  391. package/dist/standalone/chunk-5PQMXK24.js +0 -1
  392. package/dist/standalone/chunk-6GFEVKJP.js +0 -1
  393. package/dist/standalone/chunk-764T6X6X.js +0 -1
  394. package/dist/standalone/chunk-7M3F6U4L.js +0 -1
  395. package/dist/standalone/chunk-7TJJXVSE.js +0 -1
  396. package/dist/standalone/chunk-7VF3IAAW.js +0 -2
  397. package/dist/standalone/chunk-AHILM3ZP.js +0 -1
  398. package/dist/standalone/chunk-AJIUI7DD.js +0 -1
  399. package/dist/standalone/chunk-AQGOX5DK.js +0 -1
  400. package/dist/standalone/chunk-BACPICH6.js +0 -1
  401. package/dist/standalone/chunk-BET2625I.js +0 -1
  402. package/dist/standalone/chunk-BQUQS7QN.js +0 -1
  403. package/dist/standalone/chunk-CKSHCYGC.js +0 -2
  404. package/dist/standalone/chunk-DCECRP45.js +0 -1
  405. package/dist/standalone/chunk-DFP2DADO.js +0 -1
  406. package/dist/standalone/chunk-DORBUITF.js +0 -1
  407. package/dist/standalone/chunk-DVKPRFIJ.js +0 -1
  408. package/dist/standalone/chunk-DWDILV2E.js +0 -1
  409. package/dist/standalone/chunk-E6WUCLSI.js +0 -1
  410. package/dist/standalone/chunk-E7WLF6IU.js +0 -1
  411. package/dist/standalone/chunk-EVPLBWUT.js +0 -8
  412. package/dist/standalone/chunk-FCSPAJW4.js +0 -1
  413. package/dist/standalone/chunk-FKO3HO6I.js +0 -4
  414. package/dist/standalone/chunk-G2ICR3DL.js +0 -1
  415. package/dist/standalone/chunk-GJ6PGSES.js +0 -13
  416. package/dist/standalone/chunk-GMSGZDDH.js +0 -13
  417. package/dist/standalone/chunk-GTM65MVX.js +0 -1
  418. package/dist/standalone/chunk-GVRM4U6W.js +0 -2
  419. package/dist/standalone/chunk-GZDWDDXN.js +0 -1
  420. package/dist/standalone/chunk-HV7G6DFP.js +0 -5
  421. package/dist/standalone/chunk-ISJAJWYI.js +0 -1
  422. package/dist/standalone/chunk-J6J54MBP.js +0 -1
  423. package/dist/standalone/chunk-JIDZFLTB.js +0 -4
  424. package/dist/standalone/chunk-JSEXCW5Q.js +0 -1
  425. package/dist/standalone/chunk-K3GNLVYK.js +0 -1
  426. package/dist/standalone/chunk-K4ZDRTQM.js +0 -1
  427. package/dist/standalone/chunk-KEGAWN6Y.js +0 -1
  428. package/dist/standalone/chunk-KTK3V4DC.js +0 -1
  429. package/dist/standalone/chunk-KZ6INM5M.js +0 -1
  430. package/dist/standalone/chunk-LI43EKM6.js +0 -1
  431. package/dist/standalone/chunk-MFPTVCJ6.js +0 -1
  432. package/dist/standalone/chunk-MPYFGAOW.js +0 -1
  433. package/dist/standalone/chunk-O3NAGRTR.js +0 -1
  434. package/dist/standalone/chunk-O77VNUFD.js +0 -1
  435. package/dist/standalone/chunk-PA3LN4XJ.js +0 -1
  436. package/dist/standalone/chunk-PN5NCZDX.js +0 -1
  437. package/dist/standalone/chunk-PVZI3CXP.js +0 -19
  438. package/dist/standalone/chunk-PZ7HD5T2.js +0 -1
  439. package/dist/standalone/chunk-QAFAJBAW.js +0 -1
  440. package/dist/standalone/chunk-QBAT52GB.js +0 -1
  441. package/dist/standalone/chunk-QHIIRFG7.js +0 -1
  442. package/dist/standalone/chunk-RRCPZMC2.js +0 -22
  443. package/dist/standalone/chunk-RSEEHNFI.js +0 -1
  444. package/dist/standalone/chunk-SEU5V7I6.js +0 -1
  445. package/dist/standalone/chunk-SGDQIWAR.js +0 -4
  446. package/dist/standalone/chunk-SVR644RF.js +0 -1
  447. package/dist/standalone/chunk-SYEIXTEU.js +0 -1
  448. package/dist/standalone/chunk-T5HRXUSY.js +0 -1
  449. package/dist/standalone/chunk-TAD43CG5.js +0 -1
  450. package/dist/standalone/chunk-TBMYIZIO.js +0 -1
  451. package/dist/standalone/chunk-TDL7NEWA.js +0 -1
  452. package/dist/standalone/chunk-TM7CMA7X.js +0 -1
  453. package/dist/standalone/chunk-TQ36RWOP.js +0 -1
  454. package/dist/standalone/chunk-TY7L2V4E.js +0 -1
  455. package/dist/standalone/chunk-U4OAQPBT.js +0 -1
  456. package/dist/standalone/chunk-UDSVXA42.js +0 -1
  457. package/dist/standalone/chunk-UII66UVF.js +0 -1
  458. package/dist/standalone/chunk-UK64ZSUW.js +0 -1
  459. package/dist/standalone/chunk-VEZO7G5Q.js +0 -3
  460. package/dist/standalone/chunk-VLXV72QE.js +0 -1
  461. package/dist/standalone/chunk-VSHUSN6T.js +0 -1
  462. package/dist/standalone/chunk-VYMCCC6O.js +0 -1
  463. package/dist/standalone/chunk-WXPWVBIY.js +0 -1
  464. package/dist/standalone/chunk-X72PYOEW.js +0 -1
  465. package/dist/standalone/chunk-X7MMBSNW.js +0 -1
  466. package/dist/standalone/chunk-XIGIWZLO.js +0 -4
  467. package/dist/standalone/chunk-XNJNSCLM.js +0 -1
  468. package/dist/standalone/chunk-XUGSA2NG.js +0 -1
  469. package/dist/standalone/chunk-Y2ZPNDL7.js +0 -4
  470. package/dist/standalone/chunk-YM6BBZDN.js +0 -1
  471. package/dist/standalone/chunk-ZPP2KOR4.js +0 -1
  472. package/dist/standalone/chunk-ZPUO7FNI.js +0 -1
@@ -0,0 +1 @@
1
+ import{c as T}from"./chunk-MVWZMWPD.js";import{a as S,c as w,e as _}from"./chunk-AUAECCXB.js";import{d as W}from"./chunk-BOMPSVRC.js";import{a as s,d as N,e as F,g as X}from"./chunk-I26MS5PJ.js";var L=N(F(),1);var D=N(F(),1);var A=D.createContext({register:s(()=>{},"register"),unregister:s(()=>{},"unregister"),subscribeMapChange:s(()=>()=>{},"subscribeMapChange"),nextIndexRef:{current:0}});function j(){return D.useContext(A)}s(j,"useCompositeListContext");function ne(n={}){let{guess:t,label:e,metadata:i,textRef:u,index:r}=n,{register:a,unregister:f,subscribeMapChange:m,nextIndexRef:C}=j(),l=L.useRef(-1),[b,g]=L.useState(r==null&&t?()=>{if(l.current===-1){let p=C.current;C.current+=1,l.current=p}return l.current}:-1),M=r??b,E=L.useRef(null),y=L.useCallback(p=>{let v=E.current;v&&f(v),E.current=p,p&&a(p,{metadata:i??null,index:r??null,label:e,textRef:u})},[r,a,f,i,e,u]);return S(()=>{if(r==null)return m(p=>{let v=E.current?p.get(E.current)?.index:null;v!=null&&g(v)})},[r,m]),{ref:y,index:M}}s(ne,"useCompositeListItem");var R=N(F(),1);var k=N(X(),1);function ae(n){let{children:t,elementsRef:e,labelsRef:i,onMapChange:u}=n,r=w(u),[,a]=R.useState(!1),f=W(G).current,m=W(z).current,C=R.useRef(0),l=R.useRef(!0),b=R.useRef(null),g=R.useRef(null),M=w(()=>{l.current||(l.current=!0,a(o=>!o))}),E=w((o,h)=>{m.set(o,h),M()}),y=w(o=>{m.delete(o),M()}),p=w(o=>{let h=new Map;return e.current.length=0,i&&(i.current.length=0),o.forEach(c=>{h.set(c.element,{...c.registration.metadata??{},index:c.index}),e.current[c.index]=c.element,i&&(i.current[c.index]=c.registration.label!==void 0?c.registration.label:c.registration.textRef?.current?.textContent??c.element.textContent)}),C.current=e.current.length,h});function v(o){if(g.current?.disconnect(),g.current=null,typeof MutationObserver!="function"||o.length<2)return;let h=new MutationObserver(d=>{if(!K(d))return;let I=null;for(let x of o)if(x.isConnected){if(I&&H(I,x)>0){h.disconnect(),M();return}I=x}});g.current=h;let c=new Set;for(let d=1;d<o.length;d+=1){let I=J(o[d-1],o[d]);I&&c.add(I)}c.forEach(d=>h.observe(d,{childList:!0}))}s(v,"observe");let U=w(()=>{let[o,h]=q(m),c=p(o),d=b.current,I=!d||d.length!==o.length||o.some((x,V)=>{let O=d[V];return x.index!==O.index||x.element!==O.element||x.registration.index!==O.registration.index||x.registration.metadata!==O.registration.metadata});v(h),b.current=o,l.current=!1,I&&(f.forEach(x=>x(c)),r(c))});S(()=>(!l.current&&b.current&&p(b.current),()=>{e.current=[],i&&(i.current=[])}),[e,i,p]),S(()=>{l.current&&U()}),S(()=>()=>{g.current?.disconnect(),l.current=!0},[]);let B=w(o=>(f.add(o),()=>{f.delete(o)})),Y=R.useMemo(()=>({register:E,unregister:y,subscribeMapChange:B,nextIndexRef:C}),[E,y,B,C]);return(0,k.jsx)(A.Provider,{value:Y,children:t})}s(ae,"CompositeList");function z(){return new Map}s(z,"createMap");function G(){return new Set}s(G,"createListeners");function q(n){let t=new Set,e=[],i=[];n.forEach((r,a)=>{if(!a.isConnected)return;let f=r.index,m={index:f??-1,element:a,registration:r};f===null?i.push(m):f>=0&&(t.add(f),e.push(m))});let u=0;return i.sort((r,a)=>H(r.element,a.element)),i.forEach(r=>{for(;t.has(u);)u+=1;r.index=u,e.push(r),u+=1}),t.size>0&&e.sort((r,a)=>r.index-a.index),[e,i.map(r=>r.element)]}s(q,"getCompositeListSnapshot");function J(n,t){let e=n.parentElement;for(;e&&!e.contains(t);)e=e.parentElement;return e}s(J,"getCommonAncestor");function K(n){for(let t of n)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}s(K,"hasMovedNode");function H(n,t){return n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}s(H,"sortByDocumentPosition");var P=5;function pe(n,t){let e=Q(t);return n.clientX>=e.left-P&&n.clientX<=e.right+P&&n.clientY>=e.top-P&&n.clientY<=e.bottom+P}s(pe,"isMouseWithinBounds");function Q(n){let t=n.getBoundingClientRect(),e=_(n);if(T.env.jsdom)return t;let i=e.getComputedStyle(n,"::before"),u=e.getComputedStyle(n,"::after");if(!(i.content!=="none"||u.content!=="none"))return t;let a=parseFloat(i.width)||0,f=parseFloat(i.height)||0,m=parseFloat(u.width)||0,C=parseFloat(u.height)||0,l=Math.max(t.width,a,m),b=Math.max(t.height,f,C),g=l-t.width,M=b-t.height;return{left:t.left-g/2,right:t.right+g/2,top:t.top-M/2,bottom:t.bottom+M/2}}s(Q,"getPseudoElementBounds");function ge(n){return n==null||n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}s(ge,"isElementDisabled");export{ne as a,ae as b,pe as c,ge as d};
@@ -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{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{d as P}from"./chunk-74IYYDDI.js";import{a as x,d as k,f as w,g as z}from"./chunk-I26MS5PJ.js";var $=k(w(),1);var n=k(z(),1);var S=[25,50,100,250],j=x(b=>{let e=(0,$.c)(18),{onChange:p,options:m,prefix:o,value:f}=b,t=P(),u;e[0]!==p?(u=x(v=>{p(Number.parseInt(v.target.value,10))},"c"),e[0]=p,e[1]=u):u=e[1];let a=u,g=`${o}-page-size`,i;e[2]!==t?(i=t("Rows per page"),e[2]=t,e[3]=i):i=e[3];let s;e[4]!==i?(s=(0,n.jsx)("span",{children:i}),e[4]=i,e[5]=s):s=e[5];let c=`${o}-page-size`,l=`${o}-page-size`,r;e[6]!==m?(r=m.map(T),e[6]=m,e[7]=r):r=e[7];let d;e[8]!==a||e[9]!==c||e[10]!==l||e[11]!==r||e[12]!==f?(d=(0,n.jsx)("select",{className:"h-6 rounded-md border border-border bg-background px-1 tabular-nums outline-none focus-visible:border-ring","data-testid":c,id:l,onChange:a,value:f,children:r}),e[8]=a,e[9]=c,e[10]=l,e[11]=r,e[12]=f,e[13]=d):d=e[13];let h;return e[14]!==g||e[15]!==s||e[16]!==d?(h=(0,n.jsxs)("label",{className:"flex items-center gap-1.5",htmlFor:g,children:[s,d]}),e[14]=g,e[15]=s,e[16]=d,e[17]=h):h=e[17],h},"C"),E=x(b=>{let e=(0,$.c)(25),{onJump:p,page:m,pages:o,prefix:f}=b,t=P(),u;e[0]!==p||e[1]!==o?(u=x(y=>{let C=Number.parseInt(y,10);Number.isNaN(C)||p(Math.min(Math.max(1,C),Math.max(1,o)))},"c"),e[0]=p,e[1]=o,e[2]=u):u=e[2];let a=u,g;e[3]!==a?(g=x(y=>{y.key==="Enter"&&a(y.currentTarget.value)},"b"),e[3]=a,e[4]=g):g=e[4];let i=g,s;e[5]!==a?(s=x(y=>{a(y.currentTarget.value)},"o"),e[5]=a,e[6]=s):s=e[6];let c=s,l;e[7]!==t?(l=t("Page"),e[7]=t,e[8]=l):l=e[8];let r;e[9]!==t?(r=t("Page"),e[9]=t,e[10]=r):r=e[10];let d=`${f}-page-jump`,h=Math.max(1,o),v;e[11]!==c||e[12]!==i||e[13]!==m||e[14]!==r||e[15]!==d||e[16]!==h?(v=(0,n.jsx)("input",{"aria-label":r,className:"h-6 w-12 rounded-md border border-border bg-background px-1 text-center tabular-nums outline-none focus-visible:border-ring","data-testid":d,defaultValue:m,max:h,min:1,onBlur:c,onKeyDown:i,type:"number"},m),e[11]=c,e[12]=i,e[13]=m,e[14]=r,e[15]=d,e[16]=h,e[17]=v):v=e[17];let N;e[18]!==o||e[19]!==t?(N=t("of {pages}",{pages:o}),e[18]=o,e[19]=t,e[20]=N):N=e[20];let M;return e[21]!==l||e[22]!==v||e[23]!==N?(M=(0,n.jsxs)("span",{className:"flex items-center gap-1.5 tabular-nums",children:[l,v,N]}),e[21]=l,e[22]=v,e[23]=N,e[24]=M):M=e[24],M},"j"),I=x(({hasNext:b,hasPrevious:e,onJumpToPage:p,onNext:m,onPageSizeChange:o,onPrevious:f,pageSize:t,pageSizeOptions:u=S,prefix:a,rangeEnd:g,rangeStart:i,total:s})=>{let c=P(),l="rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",r=t!==void 0&&t>0?Math.max(1,Math.ceil(s/t)):1,d=t!==void 0&&t>0?Math.floor(Math.max(0,i-1)/t)+1:1;return(0,n.jsxs)("div",{className:"flex w-full items-center justify-between gap-3 text-xs text-muted-foreground",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[t!==void 0&&o!==void 0&&(0,n.jsx)(j,{onChange:o,options:u,prefix:a,value:t}),(0,n.jsx)("span",{className:"tabular-nums","data-testid":`${a}-page-info`,children:c("{rangeStart}-{rangeEnd} of {total}",{rangeEnd:g,rangeStart:i,total:s})})]}),(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("button",{className:l,"data-testid":`${a}-prev`,disabled:!e,onClick:f,type:"button",children:c("Previous")}),t!==void 0&&p!==void 0&&(0,n.jsx)(E,{onJump:p,page:d,pages:r,prefix:a}),(0,n.jsx)("button",{className:l,"data-testid":`${a}-next`,disabled:!b,onClick:m,type:"button",children:c("Next")})]})]})},"_");function T(b){return(0,n.jsx)("option",{value:b,children:b},b)}x(T,"E");export{I as a};
@@ -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};
@@ -1 +1 @@
1
- import{a as r,i as y}from"./chunk-RRCPZMC2.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};
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 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 Ze}from"./chunk-GYBCO7NN.js";import{a as Me,b as Re}from"./chunk-Q6IT6ZD7.js";import"./chunk-VVCXVAA7.js";import"./chunk-NQZALRU3.js";import"./chunk-OPM7ESDV.js";import"./chunk-Y3AYVFTK.js";import{a as ke}from"./chunk-37WYCOQ2.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 Ye}from"./chunk-R6U22RSY.js";import{a as Xe}from"./chunk-7Q256NLI.js";import{b as We}from"./chunk-ZKJS6EBE.js";import"./chunk-RGMVGZV4.js";import{i as Je}from"./chunk-OQ6I6OXT.js";import{i as Ae}from"./chunk-E4PXACVL.js";import"./chunk-MVWZMWPD.js";import"./chunk-SJQERRSZ.js";import"./chunk-7Y3SY37W.js";import{a as ge}from"./chunk-7G4Z6Q7X.js";import"./chunk-3YXASVTP.js";import"./chunk-AUAECCXB.js";import{b as Ee}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{a as je}from"./chunk-4ZEL6BYL.js";import{l as Ue}from"./chunk-NCCORPSU.js";import"./chunk-QAQDMS6R.js";import"./chunk-M3QKMHAP.js";import{a as Qe}from"./chunk-RWVIV3U7.js";import{a as qe,b as Ge,c as Ke,d as Pe,e as Le}from"./chunk-2IKDEUCX.js";import{d as ze,f as Fe,g as $e,h as Oe,q as be}from"./chunk-74IYYDDI.js";import{a as r,d as Be,e as nt,f as st,g as rt,i as De}from"./chunk-I26MS5PJ.js";var we=Be(st(),1);var x=Be(nt(),1);var t=Be(rt(),1);var ot=Fe(je.listTables),it=Fe(je.listTableIndexes),dt=Fe(je.readTablePage),ct=Fe(je.describeTables),mt={},He=[],ut=r(s=>{let e=(0,we.c)(74),{initialShardKey:u,initialTable:n}=s,l=Ue(),[a,m]=(0,x.useState)("graph"),{queryShardKey:c,setShardKey:d,shardKey:b}=Ye(u),[o,h]=(0,x.useState)(""),[i,y]=(0,x.useState)(null),[p,$]=(0,x.useState)(null),S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={},e[0]=S):S=e[0];let[K,N]=(0,x.useState)(S),O;e[1]===Symbol.for("react.memo_cache_sentinel")?(O={},e[1]=O):O=e[1];let[E,P]=(0,x.useState)(O),[T,C]=(0,x.useState)(null),z;e[2]===Symbol.for("react.memo_cache_sentinel")?(z={},e[2]=z):z=e[2];let[F,fe]=(0,x.useState)(z),te;e[3]===Symbol.for("react.memo_cache_sentinel")?(te={},e[3]=te):te=e[3];let[_,j]=(0,x.useState)(te),[k,xe]=(0,x.useState)(null),[L,ce]=(0,x.useState)(null),le;e[4]===Symbol.for("react.memo_cache_sentinel")?(le={},e[4]=le):le=e[4];let[W,Ce]=(0,x.useState)(le),[X,me]=(0,x.useState)(null),ve=(0,x.useRef)(0),M;e[5]!==l?(M=r(async g=>{ve.current=ve.current+1;let v=ve.current;$(null);try{let w=await l.query(ot,{},$e(g));if(v!==ve.current)return;We(g),y(w),N({}),P({}),C(null),fe(A=>Object.fromEntries(Object.entries(A).filter(I=>{let[pe]=I;return pe!==g}))),j(A=>Object.fromEntries(Object.entries(A).filter(I=>{let[pe]=I;return pe!==g})))}catch(w){let A=w;if(v!==ve.current)return;y(null),$(Oe(A))}},"D"),e[5]=l,e[6]=M):M=e[6];let B=M,ae;e[7]!==l?(ae=r(async()=>{ce(null);try{xe(await l.listGlobalTables())}catch(g){let v=g;xe(null),ce(Oe(v))}},"se"),e[7]=l,e[8]=ae):ae=e[8];let ue=ae,D,ne;e[9]!==c||e[10]!==B||e[11]!==ue?(D=r(()=>{be(B(c)),be(ue())},"R"),ne=[B,ue,c],e[9]=c,e[10]=B,e[11]=ue,e[12]=D,e[13]=ne):(D=e[12],ne=e[13]),(0,x.useEffect)(D,ne);let R;e[14]!==l||e[15]!==K||e[16]!==T||e[17]!==c?(R=r(async g=>{if(T===g){C(null);return}C(g);let v=`${c}:${g}`;if(K[v]!==void 0)return;let[w,A]=await Promise.allSettled([l.query(dt,{limit:1,offset:0,table:g},$e(c)),l.query(it,{table:g},$e(c))]);w.status==="fulfilled"?N(I=>({...I,[v]:w.value.columns})):$(Oe(w.reason)),A.status==="fulfilled"&&P(I=>({...I,[v]:A.value.indexes}))},"K"),e[14]=l,e[15]=K,e[16]=T,e[17]=c,e[18]=R):R=e[18];let se=R,re;e[19]!==l||e[20]!==W||e[21]!==X?(re=r(async g=>{if(X===g){me(null);return}if(me(g),W[g]===void 0)try{let v=await l.readGlobalTablePage({limit:1,offset:0,table:g});Ce(w=>({...w,[g]:v.columns}))}catch(v){ce(Oe(v))}},"oe"),e[19]=l,e[20]=W,e[21]=X,e[22]=re):re=e[22];let he=re,Y=(0,x.useRef)(void 0),Z,V;e[23]!==n||e[24]!==i||e[25]!==se?(Z=r(()=>{n===void 0||i===null||Y.current===n||i.some(g=>g.name===n)&&(Y.current=n,be(se(n)))},"Q"),V=[n,i,se],e[23]=n,e[24]=i,e[25]=se,e[26]=Z,e[27]=V):(Z=e[26],V=e[27]),(0,x.useEffect)(Z,V);let oe;e[28]!==l?(oe=r(async(g,v,w)=>{let[A,I]=await Promise.all([Promise.allSettled([l.query(ct,{tables:[...v,...w]},$e(g))]),Promise.all(w.map(async Q=>{let Se=await Promise.allSettled([l.readGlobalTablePage({limit:1,offset:0,table:Q})]),Ve=Se[0].status==="fulfilled"?Se[0].value:void 0;return{columns:Ve?.columns??[],refs:Ve?.refs??{},table:Q}}))]),pe=A[0].status==="fulfilled"?A[0].value?.columnsByTable??{}:{},_e=A[0].status==="rejected",Ie=new Map(I.map(ht)),G=[...v,...w].map(Q=>{let Se=pe[Q]??[];return[Q,Se.length>0?Se:Ie.get(Q)??[]]});fe(Q=>({...Q,[g]:Object.fromEntries(G)})),j(Q=>({...Q,[g]:_e}))},"ie"),e[28]=l,e[29]=oe):oe=e[29];let U=oe,ie,J;e[30]!==L||e[31]!==k||e[32]!==U||e[33]!==c||e[34]!==F||e[35]!==i||e[36]!==a?(ie=r(()=>{a!=="graph"||i===null||k===null&&L===null||F[c]!==void 0||be(U(c,i.map(pt),(k??[]).map(gt)))},"re"),J=[a,i,k,L,c,F,U],e[30]=L,e[31]=k,e[32]=U,e[33]=c,e[34]=F,e[35]=i,e[36]=a,e[37]=ie,e[38]=J):(ie=e[37],J=e[38]),(0,x.useEffect)(ie,J);let q=F[c]??mt,H;if(e[39]!==q||e[40]!==k||e[41]!==i){let g;e[43]!==q?(g=r(I=>({columns:q[I.name]??He,name:I.name,tier:"shard"}),"h"),e[43]=q,e[44]=g):g=e[44];let v=(i??[]).map(g),w;e[45]!==q?(w=r(I=>({columns:q[I.name]??He,name:I.name,tier:"global"}),"N"),e[45]=q,e[46]=w):w=e[46];let A=(k??[]).map(w);H=[...v,...A],e[39]=q,e[40]=k,e[41]=i,e[42]=H}else H=e[42];let f=H,ee;if(e[47]!==o||e[48]!==i){let g=o.trim().toLowerCase();ee=(i??[]).filter(v=>v.name.toLowerCase().includes(g)),e[47]=o,e[48]=i,e[49]=ee}else ee=e[49];let de=ee,ye;if(e[50]!==k||e[51]!==o){let g=o.trim().toLowerCase();ye=(k??[]).filter(v=>v.name.toLowerCase().includes(g)),e[50]=k,e[51]=o,e[52]=ye}else ye=e[52];let Te=ye,Ne;return e[53]!==K||e[54]!==f||e[55]!==p||e[56]!==T||e[57]!==Te||e[58]!==de||e[59]!==W||e[60]!==L||e[61]!==X||e[62]!==k||e[63]!==E||e[64]!==B||e[65]!==d||e[66]!==_||e[67]!==b||e[68]!==o||e[69]!==i||e[70]!==se||e[71]!==he||e[72]!==a?(Ne={columns:K,diagramTables:f,error:p,expanded:T,filteredGlobalTables:Te,filteredTables:de,globalColumns:W,globalError:L,globalExpanded:X,globalTables:k,indexes:E,refresh:B,setShardKey:d,setTableFilter:h,setView:m,shardColumnsError:_,shardKey:b,tableFilter:o,tables:i,toggle:se,toggleGlobal:he,view:a},e[53]=K,e[54]=f,e[55]=p,e[56]=T,e[57]=Te,e[58]=de,e[59]=W,e[60]=L,e[61]=X,e[62]=k,e[63]=E,e[64]=B,e[65]=d,e[66]=_,e[67]=b,e[68]=o,e[69]=i,e[70]=se,e[71]=he,e[72]=a,e[73]=Ne):Ne=e[73],Ne},"mt");function ht(s){let{columns:e,refs:u,table:n}=s;return[n,e.map(l=>{let a=u[l];return a===void 0?{name:l,optional:!1,type:""}:{name:l,optional:!1,ref:a,type:"id"}})]}r(ht,"ut");function pt(s){return s.name}r(pt,"ft");function gt(s){return s.name}r(gt,"ht");var bt="/__lunora/schema-edit",ft=r(async s=>{let e=await fetch(bt,{body:JSON.stringify(s),headers:{"Content-Type":"application/json"},method:"POST"}),u=await e.json();return u.needsMigration===!0?{kind:"needs-migration",message:u.message??"This edit needs a migration."}:e.ok&&u.tables!==void 0?{diagnostics:u.diagnostics??[],kind:"ok",tables:u.tables}:{kind:"error",message:u.error??`schema edit failed (${String(e.status)})`}},"gt"),xt=r(s=>{let e=(0,we.c)(32),{hasTables:u,mode:n,onAddColumn:l,onAddIndex:a,onAddTable:m,onDestructive:c}=s,d=ze(),b=n==="addTable"?"default":"outline",o;e[0]!==d?(o=d("Add table"),e[0]=d,e[1]=o):o=e[1];let h;e[2]!==m||e[3]!==b||e[4]!==o?(h=(0,t.jsx)(ge,{"data-testid":"sc-editor-add-table",onClick:m,size:"xs",type:"button",variant:b,children:o}),e[2]=m,e[3]=b,e[4]=o,e[5]=h):h=e[5];let i=!u,y=n==="addColumn"?"default":"outline",p;e[6]!==d?(p=d("Add column"),e[6]=d,e[7]=p):p=e[7];let $;e[8]!==l||e[9]!==i||e[10]!==y||e[11]!==p?($=(0,t.jsx)(ge,{"data-testid":"sc-editor-add-column",disabled:i,onClick:l,size:"xs",type:"button",variant:y,children:p}),e[8]=l,e[9]=i,e[10]=y,e[11]=p,e[12]=$):$=e[12];let S=!u,K=n==="addIndex"?"default":"outline",N;e[13]!==d?(N=d("Add index"),e[13]=d,e[14]=N):N=e[14];let O;e[15]!==a||e[16]!==N||e[17]!==S||e[18]!==K?(O=(0,t.jsx)(ge,{"data-testid":"sc-editor-add-index",disabled:S,onClick:a,size:"xs",type:"button",variant:K,children:N}),e[15]=a,e[16]=N,e[17]=S,e[18]=K,e[19]=O):O=e[19];let E=!u,P=n==="destructive"?"default":"ghost",T;e[20]!==d?(T=d("Rename / drop / change type\u2026"),e[20]=d,e[21]=T):T=e[21];let C;e[22]!==c||e[23]!==E||e[24]!==P||e[25]!==T?(C=(0,t.jsx)(ge,{"data-testid":"sc-editor-destructive",disabled:E,onClick:c,size:"xs",type:"button",variant:P,children:T}),e[22]=c,e[23]=E,e[24]=P,e[25]=T,e[26]=C):C=e[26];let z;return e[27]!==O||e[28]!==C||e[29]!==h||e[30]!==$?(z=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[h,$,O,C]}),e[27]=O,e[28]=C,e[29]=h,e[30]=$,e[31]=z):z=e[31],z},"bt"),vt=r(s=>{let e=(0,we.c)(28),{onOpenMigrations:u,result:n}=s,l=ze();if(n===null){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(t.Fragment,{}),e[0]=o):o=e[0],o}if(n.kind==="error"){let o;return e[1]!==n.message?(o=(0,t.jsx)("p",{className:"mt-3 text-sm text-destructive","data-testid":"sc-editor-error",role:"alert",children:n.message}),e[1]=n.message,e[2]=o):o=e[2],o}if(n.kind==="needs-migration"){let o;e[3]!==n.message||e[4]!==l?(o=n.message===""?l("This edit changes stored data and must go through a migration. Review the migration before applying."):n.message,e[3]=n.message,e[4]=l,e[5]=o):o=e[5];let h;e[6]!==o?(h=(0,t.jsx)("p",{className:"text-sm text-warning",role:"alert",children:o}),e[6]=o,e[7]=h):h=e[7];let i;e[8]!==l?(i=l("Open Migrations"),e[8]=l,e[9]=i):i=e[9];let y;e[10]!==u||e[11]!==i?(y=(0,t.jsx)(ge,{className:"self-start","data-testid":"sc-editor-open-migrations",onClick:u,size:"xs",type:"button",variant:"outline",children:i}),e[10]=u,e[11]=i,e[12]=y):y=e[12];let p;return e[13]!==h||e[14]!==y?(p=(0,t.jsxs)("div",{className:"mt-3 flex flex-col gap-2","data-testid":"sc-editor-needs-migration",children:[h,y]}),e[13]=h,e[14]=y,e[15]=p):p=e[15],p}if(n.diagnostics.length===0){let o;return e[16]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(t.Fragment,{}),e[16]=o):o=e[16],o}let a;e[17]!==l?(a=l("Codegen reported diagnostics:"),e[17]=l,e[18]=a):a=e[18];let m;e[19]!==a?(m=(0,t.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:a}),e[19]=a,e[20]=m):m=e[20];let c;e[21]!==n.diagnostics?(c=n.diagnostics.map(yt),e[21]=n.diagnostics,e[22]=c):c=e[22];let d;e[23]!==c?(d=(0,t.jsx)("ul",{className:"flex flex-col gap-0.5",children:c}),e[23]=c,e[24]=d):d=e[24];let b;return e[25]!==m||e[26]!==d?(b=(0,t.jsxs)("div",{className:"mt-3 flex flex-col gap-1","data-testid":"sc-editor-diagnostics",children:[m,d]}),e[25]=m,e[26]=d,e[27]=b):b=e[27],b},"xt");function yt(s){return(0,t.jsx)("li",{className:"font-mono text-[11px] text-destructive",children:s},s)}r(yt,"vt");var Nt=[{label:"string",validator:"v.string()"},{label:"number",validator:"v.number()"},{label:"boolean",validator:"v.boolean()"},{label:"bigint",validator:"v.bigint()"},{label:"bytes",validator:"v.bytes()"},{label:"any",validator:"v.any()"}],Ct="v.string()",Tt=r(s=>s.split(",").map(e=>e.trim()).filter(e=>e!==""),"Nt"),wt=r(s=>{let e=(0,we.c)(83),{onApplied:u,tableNames:n}=s,l=ze(),a=Je(),[m,c]=(0,x.useState)(null),[d,b]=(0,x.useState)(!1),[o,h]=(0,x.useState)(null),[i,y]=(0,x.useState)(""),[p,$]=(0,x.useState)(""),[S,K]=(0,x.useState)(Ct),[N,O]=(0,x.useState)(n[0]??""),[E,P]=(0,x.useState)(""),[T,C]=(0,x.useState)(""),[z,F]=(0,x.useState)(!1),fe;e[0]===Symbol.for("react.memo_cache_sentinel")?(fe=r(()=>{c(null),y(""),$(""),P(""),C(""),F(!1)},"pe"),e[0]=fe):fe=e[0];let te=fe,_;e[1]!==u?(_=r(async G=>{b(!0),h(null);try{let Q=await ft(G);h(Q),Q.kind==="ok"&&(u(Q.tables),te())}catch(Q){let Se=Q;h({kind:"error",message:Se instanceof Error?Se.message:String(Se)})}b(!1)},"E"),e[1]=u,e[2]=_):_=e[2];let j=_,k;e[3]!==j||e[4]!==i?(k=r(()=>{be(j({kind:"addTable",table:i.trim()}))},"w"),e[3]=j,e[4]=i,e[5]=k):k=e[5];let xe=k,L;e[6]!==p||e[7]!==j||e[8]!==N||e[9]!==S?(L=r(()=>{be(j({column:p.trim(),kind:"addOptionalColumn",table:N,validator:S}))},"B"),e[6]=p,e[7]=j,e[8]=N,e[9]=S,e[10]=L):L=e[10];let ce=L,le;e[11]!==T||e[12]!==E||e[13]!==j||e[14]!==N||e[15]!==z?(le=r(()=>{be(j({fields:Tt(T),kind:"addIndex",name:E.trim(),table:N,unique:z}))},"le"),e[11]=T,e[12]=E,e[13]=j,e[14]=N,e[15]=z,e[16]=le):le=e[16];let W=le,Ce;e[17]===Symbol.for("react.memo_cache_sentinel")?(Ce=r(()=>{h(null),c("addTable")},"Ne"),e[17]=Ce):Ce=e[17];let X=Ce,me;e[18]===Symbol.for("react.memo_cache_sentinel")?(me=r(()=>{h(null),c("addColumn")},"me"),e[18]=me):me=e[18];let ve=me,M;e[19]===Symbol.for("react.memo_cache_sentinel")?(M=r(()=>{h(null),c("addIndex")},"D"),e[19]=M):M=e[19];let B=M,ae;e[20]!==l?(ae=r(()=>{c("destructive"),h({kind:"needs-migration",message:l("This edit changes stored data and must go through a migration. Review the migration before applying.")})},"se"),e[20]=l,e[21]=ae):ae=e[21];let ue=ae,D;e[22]===Symbol.for("react.memo_cache_sentinel")?(D=r(G=>{y(G.target.value)},"R"),e[22]=D):D=e[22];let ne=D,R;e[23]===Symbol.for("react.memo_cache_sentinel")?(R=r(G=>{$(G.target.value)},"K"),e[23]=R):R=e[23];let se=R,re;e[24]===Symbol.for("react.memo_cache_sentinel")?(re=r(G=>{K(G.target.value)},"oe"),e[24]=re):re=e[24];let he=re,Y;e[25]===Symbol.for("react.memo_cache_sentinel")?(Y=r(G=>{O(G.target.value)},"X"),e[25]=Y):Y=e[25];let Z=Y,V;e[26]===Symbol.for("react.memo_cache_sentinel")?(V=r(G=>{P(G.target.value)},"U"),e[26]=V):V=e[26];let oe=V,U;e[27]===Symbol.for("react.memo_cache_sentinel")?(U=r(G=>{C(G.target.value)},"V"),e[27]=U):U=e[27];let ie=U,J;e[28]===Symbol.for("react.memo_cache_sentinel")?(J=r(G=>{F(G.target.checked)},"Y"),e[28]=J):J=e[28];let q=J,H;e[29]!==a?(H=r(()=>{be(a({to:"/migrations"}))},"Z"),e[29]=a,e[30]=H):H=e[30];let f=H,ee;e[31]!==l?(ee=l("Edit schema"),e[31]=l,e[32]=ee):ee=e[32];let de;e[33]!==ee?(de=(0,t.jsx)(Ke,{children:ee}),e[33]=ee,e[34]=de):de=e[34];let ye;e[35]!==l?(ye=l("Adds a table, column, or index to lunora/schema.ts and reruns codegen."),e[35]=l,e[36]=ye):ye=e[36];let Te;e[37]!==ye?(Te=(0,t.jsx)(Pe,{children:ye}),e[37]=ye,e[38]=Te):Te=e[38];let Ne;e[39]!==de||e[40]!==Te?(Ne=(0,t.jsxs)(Ge,{children:[de,Te]}),e[39]=de,e[40]=Te,e[41]=Ne):Ne=e[41];let g=n.length>0,v;e[42]!==m||e[43]!==ue||e[44]!==g?(v=(0,t.jsx)(xt,{hasTables:g,mode:m,onAddColumn:ve,onAddIndex:B,onAddTable:X,onDestructive:ue}),e[42]=m,e[43]=ue,e[44]=g,e[45]=v):v=e[45];let w;e[46]!==d||e[47]!==m||e[48]!==xe||e[49]!==l||e[50]!==i?(w=m==="addTable"&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-end gap-2","data-testid":"sc-editor-table-form",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-table-name",children:l("Table name")}),(0,t.jsx)(Ae,{"data-testid":"sc-editor-table-name",id:"sc-editor-table-name",onChange:ne,value:i})]}),(0,t.jsx)(ge,{"data-testid":"sc-editor-table-apply",disabled:d||i.trim()==="",onClick:xe,size:"xs",type:"button",children:l(d?"Applying\u2026":"Apply")}),(0,t.jsx)(ge,{onClick:te,size:"xs",type:"button",variant:"ghost",children:l("Cancel")})]}),e[46]=d,e[47]=m,e[48]=xe,e[49]=l,e[50]=i,e[51]=w):w=e[51];let A;e[52]!==d||e[53]!==p||e[54]!==m||e[55]!==ce||e[56]!==l||e[57]!==n||e[58]!==N||e[59]!==S?(A=m==="addColumn"&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-end gap-2","data-testid":"sc-editor-column-form",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-column-table",children:l("Table name")}),(0,t.jsx)("select",{className:"h-8 rounded-md border border-input bg-transparent px-2 text-xs","data-testid":"sc-editor-column-table",id:"sc-editor-column-table",onChange:Z,value:N,children:n.map(St)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-column-name",children:l("Column name")}),(0,t.jsx)(Ae,{"data-testid":"sc-editor-column-name",id:"sc-editor-column-name",onChange:se,value:p})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-column-type",children:l("Column type")}),(0,t.jsx)("select",{className:"h-8 rounded-md border border-input bg-transparent px-2 text-xs","data-testid":"sc-editor-column-type",id:"sc-editor-column-type",onChange:he,value:S,children:Nt.map(kt)})]}),(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground",children:l("Optional")}),(0,t.jsx)(ge,{"data-testid":"sc-editor-column-apply",disabled:d||p.trim()===""||N==="",onClick:ce,size:"xs",type:"button",children:l(d?"Applying\u2026":"Apply")}),(0,t.jsx)(ge,{onClick:te,size:"xs",type:"button",variant:"ghost",children:l("Cancel")})]}),e[52]=d,e[53]=p,e[54]=m,e[55]=ce,e[56]=l,e[57]=n,e[58]=N,e[59]=S,e[60]=A):A=e[60];let I;e[61]!==d||e[62]!==T||e[63]!==E||e[64]!==m||e[65]!==W||e[66]!==l||e[67]!==n||e[68]!==N||e[69]!==z?(I=m==="addIndex"&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-end gap-2","data-testid":"sc-editor-index-form",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-index-table",children:l("Table name")}),(0,t.jsx)("select",{className:"h-8 rounded-md border border-input bg-transparent px-2 text-xs","data-testid":"sc-editor-index-table",id:"sc-editor-index-table",onChange:Z,value:N,children:n.map(_t)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-index-name",children:l("Index name")}),(0,t.jsx)(Ae,{"data-testid":"sc-editor-index-name",id:"sc-editor-index-name",onChange:oe,value:E})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)(ke,{htmlFor:"sc-editor-index-fields",children:l("Index fields (comma-separated)")}),(0,t.jsx)(Ae,{"data-testid":"sc-editor-index-fields",id:"sc-editor-index-fields",onChange:ie,value:T})]}),(0,t.jsxs)(ke,{className:"flex items-center gap-1 text-xs",htmlFor:"sc-editor-index-unique",children:[(0,t.jsx)("input",{checked:z,"data-testid":"sc-editor-index-unique",id:"sc-editor-index-unique",onChange:q,type:"checkbox"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:l("Unique")})]}),(0,t.jsx)(ge,{"data-testid":"sc-editor-index-apply",disabled:d||E.trim()===""||T.trim()==="",onClick:W,size:"xs",type:"button",children:l(d?"Applying\u2026":"Apply")}),(0,t.jsx)(ge,{onClick:te,size:"xs",type:"button",variant:"ghost",children:l("Cancel")})]}),e[61]=d,e[62]=T,e[63]=E,e[64]=m,e[65]=W,e[66]=l,e[67]=n,e[68]=N,e[69]=z,e[70]=I):I=e[70];let pe;e[71]!==f||e[72]!==o?(pe=(0,t.jsx)(vt,{onOpenMigrations:f,result:o}),e[71]=f,e[72]=o,e[73]=pe):pe=e[73];let _e;e[74]!==v||e[75]!==w||e[76]!==A||e[77]!==I||e[78]!==pe?(_e=(0,t.jsxs)(Le,{children:[v,w,A,I,pe]}),e[74]=v,e[75]=w,e[76]=A,e[77]=I,e[78]=pe,e[79]=_e):_e=e[79];let Ie;return e[80]!==Ne||e[81]!==_e?(Ie=(0,t.jsxs)(qe,{"data-testid":"sc-editor",size:"sm",children:[Ne,_e]}),e[80]=Ne,e[81]=_e,e[82]=Ie):Ie=e[82],Ie},"Tt");function St(s){return(0,t.jsx)("option",{value:s,children:s},s)}r(St,"St");function kt(s){return(0,t.jsx)("option",{value:s.validator,children:s.label},s.validator)}r(kt,"wt");function _t(s){return(0,t.jsx)("option",{value:s,children:s},s)}r(_t,"_t");var et=[],It=r(s=>{let e=(0,we.c)(5),{open:u}=s,n=u&&"rotate-90",l;e[0]!==n?(l=De("size-3.5 shrink-0 text-muted-foreground transition-transform duration-150",n),e[0]=n,e[1]=l):l=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)("path",{d:"m9 6 6 6-6 6"}),e[2]=a):a=e[2];let m;return e[3]!==l?(m=(0,t.jsx)("svg",{"aria-hidden":"true",className:l,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:a}),e[3]=l,e[4]=m):m=e[4],m},"Et"),tt=r(s=>{let e=(0,we.c)(20),{children:u,expanded:n,name:l,onToggle:a,rowCount:m,rowTestId:c,toggleTestId:d}=s,b;e[0]!==n?(b=(0,t.jsx)(It,{open:n}),e[0]=n,e[1]=b):b=e[1];let o;e[2]!==l?(o=(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:l,children:l}),e[2]=l,e[3]=o):o=e[3];let h;e[4]!==m?(h=(0,t.jsxs)("span",{className:"ms-auto shrink-0 text-xs text-muted-foreground tabular-nums",children:["(",m,")"]}),e[4]=m,e[5]=h):h=e[5];let i;e[6]!==n||e[7]!==a||e[8]!==b||e[9]!==o||e[10]!==h||e[11]!==d?(i=(0,t.jsxs)("button",{"aria-expanded":n,className:"flex w-full items-center gap-2 px-3 py-2 text-start transition-colors hover:bg-muted/50 aria-expanded:bg-muted/40","data-testid":d,onClick:a,type:"button",children:[b,o," ",h]}),e[6]=n,e[7]=a,e[8]=b,e[9]=o,e[10]=h,e[11]=d,e[12]=i):i=e[12];let y;e[13]!==u||e[14]!==n?(y=n&&(0,t.jsx)("div",{className:"px-3 pb-3 ps-8",children:u}),e[13]=u,e[14]=n,e[15]=y):y=e[15];let p;return e[16]!==c||e[17]!==i||e[18]!==y?(p=(0,t.jsxs)("li",{className:"border-t border-border/60 first:border-t-0","data-testid":c,children:[i,y]}),e[16]=c,e[17]=i,e[18]=y,e[19]=p):p=e[19],p},"Je"),lt=r(s=>{let e=(0,we.c)(5),{columns:u,testId:n}=s,l;e[0]!==u?(l=u.map(zt),e[0]=u,e[1]=l):l=e[1];let a;return e[2]!==l||e[3]!==n?(a=(0,t.jsx)("ul",{className:"flex flex-wrap gap-1.5 pt-1","data-testid":n,children:l}),e[2]=l,e[3]=n,e[4]=a):a=e[4],a},"We"),At=r(s=>{let e=(0,we.c)(10),{heading:u,indexes:n,testId:l}=s,a;e[0]!==u?(a=(0,t.jsx)("p",{className:"mb-1.5 font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:u}),e[0]=u,e[1]=a):a=e[1];let m;e[2]!==n?(m=n.map(Et),e[2]=n,e[3]=m):m=e[3];let c;e[4]!==m||e[5]!==l?(c=(0,t.jsx)("ul",{className:"flex flex-col gap-1","data-testid":l,children:m}),e[4]=m,e[5]=l,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==c?(d=(0,t.jsxs)("div",{className:"pt-3",children:[a,c]}),e[7]=a,e[8]=c,e[9]=d):d=e[9],d},"It"),at=r(s=>De("border-b-2 px-3 py-2 font-mono text-[11px] tracking-widest uppercase outline-none transition-colors",s?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),"Xe"),Xt=r(s=>{let e=(0,we.c)(85),{initialShardKey:u,initialTable:n,schemaEditable:l}=s,a=ze(),m;e[0]!==u||e[1]!==n?(m={initialShardKey:u,initialTable:n},e[0]=u,e[1]=n,e[2]=m):m=e[2];let{columns:c,diagramTables:d,error:b,expanded:o,filteredGlobalTables:h,filteredTables:i,globalColumns:y,globalError:p,globalExpanded:$,globalTables:S,indexes:K,refresh:N,setShardKey:O,setTableFilter:E,setView:P,shardColumnsError:T,shardKey:C,tableFilter:z,tables:F,toggle:fe,toggleGlobal:te,view:_}=ut(m),j;e[3]!==P?(j=r(()=>{P("list")},"M"),e[3]=P,e[4]=j):j=e[4];let k=j,xe;e[5]!==P?(xe=r(()=>{P("graph")},"ge"),e[5]=P,e[6]=xe):xe=e[6];let L=xe,ce;e[7]!==E?(ce=r(f=>{E(f.target.value)},"ce"),e[7]=E,e[8]=ce):ce=e[8];let le=ce,W;e[9]!==N||e[10]!==C?(W=r(f=>{be(N(C))},"J"),e[9]=N,e[10]=C,e[11]=W):W=e[11];let Ce=W,X;e[12]!==F?(X=F??[],e[12]=F,e[13]=X):X=e[13];let me;e[14]!==X?(me=X.map(Ft),e[14]=X,e[15]=me):me=e[15];let ve=me,M;e[16]!==O||e[17]!==C?(M=(0,t.jsx)(Xe,{onChange:O,testId:"sc-shard-input",value:C}),e[16]=O,e[17]=C,e[18]=M):M=e[18];let B;e[19]!==a?(B=a("Schema view"),e[19]=a,e[20]=B):B=e[20];let ae=_==="graph",ue=_==="graph",D;e[21]!==ue?(D=at(ue),e[21]=ue,e[22]=D):D=e[22];let ne;e[23]!==a?(ne=a("Graph"),e[23]=a,e[24]=ne):ne=e[24];let R;e[25]!==L||e[26]!==ae||e[27]!==D||e[28]!==ne?(R=(0,t.jsx)("button",{"aria-selected":ae,className:D,"data-testid":"sc-view-graph",onClick:L,role:"tab",type:"button",children:ne}),e[25]=L,e[26]=ae,e[27]=D,e[28]=ne,e[29]=R):R=e[29];let se=_==="list",re=_==="list",he;e[30]!==re?(he=at(re),e[30]=re,e[31]=he):he=e[31];let Y;e[32]!==a?(Y=a("Table list"),e[32]=a,e[33]=Y):Y=e[33];let Z;e[34]!==k||e[35]!==se||e[36]!==he||e[37]!==Y?(Z=(0,t.jsx)("button",{"aria-selected":se,className:he,"data-testid":"sc-view-list",onClick:k,role:"tab",type:"button",children:Y}),e[34]=k,e[35]=se,e[36]=he,e[37]=Y,e[38]=Z):Z=e[38];let V;e[39]!==R||e[40]!==Z||e[41]!==B?(V=(0,t.jsxs)("div",{"aria-label":B,className:"flex items-center gap-1","data-testid":"sc-view-toggle",role:"tablist",children:[R,Z]}),e[39]=R,e[40]=Z,e[41]=B,e[42]=V):V=e[42];let oe;e[43]!==V||e[44]!==M?(oe=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[M,V]}),e[43]=V,e[44]=M,e[45]=oe):oe=e[45];let U;e[46]!==Ce||e[47]!==l||e[48]!==ve?(U=l===!0&&(0,t.jsx)(wt,{onApplied:Ce,tableNames:ve}),e[46]=Ce,e[47]=l,e[48]=ve,e[49]=U):U=e[49];let ie;e[50]!==le||e[51]!==a||e[52]!==z||e[53]!==_?(ie=_==="list"&&(0,t.jsx)(Ae,{"aria-label":a("Filter tables"),className:"h-8 max-w-xs","data-testid":"sc-filter",onChange:le,placeholder:a("Filter tables"),value:z}),e[50]=le,e[51]=a,e[52]=z,e[53]=_,e[54]=ie):ie=e[54];let J;e[55]!==d||e[56]!==b||e[57]!==p||e[58]!==T||e[59]!==C||e[60]!==_?(J=_==="graph"&&(0,t.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"sc-graph-view",children:[b!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"sc-error",role:"alert",children:b}),p!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"sc-global-error",role:"alert",children:p}),(0,t.jsx)(Ze,{columnsError:T[C]===!0,tables:d,testIdPrefix:"sc-graph"})]}),e[55]=d,e[56]=b,e[57]=p,e[58]=T,e[59]=C,e[60]=_,e[61]=J):J=e[61];let q;e[62]!==c||e[63]!==b||e[64]!==o||e[65]!==h||e[66]!==i||e[67]!==y||e[68]!==p||e[69]!==$||e[70]!==S||e[71]!==K||e[72]!==C||e[73]!==a||e[74]!==F||e[75]!==fe||e[76]!==te||e[77]!==_?(q=_==="list"&&(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)(qe,{"data-testid":"sc-shard-section",size:"sm",children:[(0,t.jsxs)(Ge,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(Re,{tier:"shard"}),(0,t.jsx)(Ke,{children:a("Shard tables")}),F!==null&&(0,t.jsx)(Ee,{className:"ms-auto tabular-nums",variant:"outline",children:i.length})]}),(0,t.jsx)(Pe,{children:Me.shard.hint})]}),(0,t.jsxs)(Le,{children:[b!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"sc-error",role:"alert",children:b}),F!==null&&F.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"sc-empty",children:a("No tables in this shard.")}),F!==null&&F.length>0&&i.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"sc-no-match",children:a("No tables match your filter.")}),i.length>0&&(0,t.jsx)("ul",{className:"-mx-3 overflow-hidden border-t border-border","data-testid":"sc-table-list",children:i.map(f=>{let ee=`${C}:${f.name}`,de=K[ee]??[];return(0,t.jsxs)(tt,{expanded:o===f.name,name:f.name,onToggle:r(()=>{be(fe(f.name))},"onToggle"),rowCount:f.rowCount,rowTestId:`sc-table-${f.name}`,toggleTestId:`sc-toggle-${f.name}`,children:[(0,t.jsx)(lt,{columns:c[ee]??et,testId:`sc-columns-${f.name}`}),de.length>0&&(0,t.jsx)(At,{heading:a("Indexes"),indexes:de,testId:`sc-indexes-${f.name}`})]},f.name)})})]})]}),(0,t.jsxs)(qe,{"data-testid":"sc-global-section",size:"sm",children:[(0,t.jsxs)(Ge,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(Re,{tier:"global"}),(0,t.jsx)(Ke,{children:a("Global tables (D1)")}),S!==null&&(0,t.jsx)(Ee,{className:"ms-auto tabular-nums",variant:"outline",children:h.length})]}),(0,t.jsx)(Pe,{children:Me.global.hint})]}),(0,t.jsxs)(Le,{children:[p!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"sc-global-error",role:"alert",children:p}),S!==null&&S.length===0&&(0,t.jsx)(Qe,{description:Me.global.hint,testId:"sc-global-empty",title:a("No global tables.")}),S!==null&&S.length>0&&h.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"sc-global-no-match",children:a("No tables match your filter.")}),h.length>0&&(0,t.jsx)("ul",{className:"-mx-3 overflow-hidden border-t border-border","data-testid":"sc-global-table-list",children:h.map(f=>(0,t.jsx)(tt,{expanded:$===f.name,name:f.name,onToggle:r(()=>{be(te(f.name))},"onToggle"),rowCount:f.rowCount,rowTestId:`sc-global-table-${f.name}`,toggleTestId:`sc-global-toggle-${f.name}`,children:(0,t.jsx)(lt,{columns:y[f.name]??et,testId:`sc-global-columns-${f.name}`})},f.name))})]})]})]}),e[62]=c,e[63]=b,e[64]=o,e[65]=h,e[66]=i,e[67]=y,e[68]=p,e[69]=$,e[70]=S,e[71]=K,e[72]=C,e[73]=a,e[74]=F,e[75]=fe,e[76]=te,e[77]=_,e[78]=q):q=e[78];let H;return e[79]!==oe||e[80]!==U||e[81]!==ie||e[82]!==J||e[83]!==q?(H=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-schema",children:[oe,U,ie,J,q]}),e[79]=oe,e[80]=U,e[81]=ie,e[82]=J,e[83]=q,e[84]=H):H=e[84],H},"Qt");function zt(s){return(0,t.jsx)("li",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground",children:s},s)}r(zt,"kt");function Et(s){return(0,t.jsxs)("li",{className:"flex flex-wrap items-center gap-1.5 text-xs",children:[(0,t.jsx)("span",{className:"font-mono",children:s.name}),(0,t.jsx)(Ee,{variant:"outline",children:s.type}),s.unique===!0&&(0,t.jsx)(Ee,{variant:"secondary",children:"unique"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:s.fields.join(", ")})]},`${s.type}:${s.name}`)}r(Et,"At");function Ft(s){return s.name}r(Ft,"$t");export{Xt as SchemaViewer};
@@ -0,0 +1 @@
1
+ import{a as u,d as y,e as d}from"./chunk-I26MS5PJ.js";var t=y(d(),1);var S=u((r,a=400)=>{let e=(r??"").trim(),[o,c]=(0,t.useState)(e),[i,n]=(0,t.useState)(e),m=(0,t.useRef)(r);m.current!==r&&(m.current=r,c(e),n(e));let f=o.trim();return(0,t.useEffect)(()=>{let s=setTimeout(()=>{n(f)},a);return()=>{clearTimeout(s)}},[f,a]),{queryShardKey:i,setShardKey:u(s=>{c(s)},"setShardKey"),shardKey:o}},"f");export{S as a};
@@ -0,0 +1,14 @@
1
+ import{a as le}from"./chunk-VDC6JP4A.js";import{a as je}from"./chunk-FPI7AMQJ.js";import{a as he}from"./chunk-37WYCOQ2.js";import{a as V}from"./chunk-SA2OGF3F.js";import{d as Ne,f as ke,g as we,k as oe}from"./chunk-GHQ2VDI2.js";import{a as Pe}from"./chunk-7Q256NLI.js";import"./chunk-ZKJS6EBE.js";import"./chunk-RGMVGZV4.js";import{i as ve}from"./chunk-E4PXACVL.js";import"./chunk-MVWZMWPD.js";import"./chunk-7Y3SY37W.js";import{a as W}from"./chunk-7G4Z6Q7X.js";import"./chunk-3YXASVTP.js";import"./chunk-AUAECCXB.js";import{b as ye}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{a as $e}from"./chunk-4ZEL6BYL.js";import{l as F}from"./chunk-NCCORPSU.js";import"./chunk-QAQDMS6R.js";import{d as be}from"./chunk-M3QKMHAP.js";import{a as U}from"./chunk-RWVIV3U7.js";import{d as J,e as Se,f as se,g as ie,h as fe,n as Ie,q as Oe,t as ae}from"./chunk-74IYYDDI.js";import{a as u,d as K,e as me,f as te,g as re,i as ue}from"./chunk-I26MS5PJ.js";var Qe=K(te(),1),xe=K(me(),1);var Y=K(te(),1);var X=K(me(),1);var R=K(re(),1);var Xe=se($e.listTables),Ye=["react","client","cli"],Ze={action:"action",mutation:"mutation",query:"query"},Ce=u(t=>{let e=t.indexOf(":");return e===-1?{file:"",fn:t}:{file:t.slice(0,e),fn:t.slice(e+1)}},"Q"),et=u(({file:t,fn:e,kind:a})=>`await client.${Ze[a]}(api.${t}.${e}, { /* args */ });`,"ie"),tt=u(t=>{let e=`api.${t.file}.${t.fn}`;switch(t.kind){case"action":return`const { call: ${t.fn} } = useAction(${e});`;case"mutation":return`const ${t.fn} = useMutation(${e});`;default:return`const data = useQuery(${e}, { /* args */ });`}},"se"),rt=u(({file:t,fn:e})=>`lunora run ${t}:${e} --args '{ }'`,"oe"),at=u(t=>["// Read rows",`const rows = await ctx.db.query("${t}").collect();`,"","// Insert a row",`const id = await ctx.db.insert("${t}", { /* fields */ });`,"","// Generated types",`type Row = Doc<"${t}">;`,`type RowId = Id<"${t}">;`].join(`
2
+ `),"ce"),nt=u((t,e)=>{switch(t){case"cli":return rt(e);case"client":return et(e);default:return tt(e)}},"re"),Re=u(t=>{let e=(0,Y.c)(19),{code:a,label:r,testId:n}=t,s=J(),o;e[0]!==a?(o=u(()=>{ae(a)},"c"),e[0]=a,e[1]=o):o=e[1];let i=o,c;e[2]!==r?(c=(0,R.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:r}),e[2]=r,e[3]=c):c=e[3];let m=`${n}-copy`,l;e[4]!==s?(l=s("Copy"),e[4]=s,e[5]=l):l=e[5];let p;e[6]!==i||e[7]!==m||e[8]!==l?(p=(0,R.jsx)(W,{"data-testid":m,onClick:i,size:"xs",type:"button",variant:"ghost",children:l}),e[6]=i,e[7]=m,e[8]=l,e[9]=p):p=e[9];let f;e[10]!==c||e[11]!==p?(f=(0,R.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[c,p]}),e[10]=c,e[11]=p,e[12]=f):f=e[12];let h;e[13]!==a||e[14]!==n?(h=(0,R.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs","data-testid":n,children:a}),e[13]=a,e[14]=n,e[15]=h):h=e[15];let g;return e[16]!==f||e[17]!==h?(g=(0,R.jsxs)("div",{className:"flex flex-col gap-1.5",children:[f,h]}),e[16]=f,e[17]=h,e[18]=g):g=e[18],g},"U"),ot=u(t=>{let e=(0,Y.c)(46),{file:a,fn:r,kind:n}=t,s=J(),[o,i]=(0,X.useState)("react"),c,m,l;if(e[0]!==a||e[1]!==r||e[2]!==n||e[3]!==s||e[4]!==o){let w={file:a,fn:r,kind:n},j;e[8]!==s?(j=s("CLI"),e[8]=s,e[9]=j):j=e[9];let O;e[10]!==s?(O=s("Client"),e[10]=s,e[11]=O):O=e[11];let S;e[12]!==s?(S=s("React"),e[12]=s,e[13]=S):S=e[13];let C;e[14]!==j||e[15]!==O||e[16]!==S?(C={cli:j,client:O,react:S},e[14]=j,e[15]=O,e[16]=S,e[17]=C):C=e[17],l=C;let A;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=u(_=>{i(_.currentTarget.dataset.tab)},"B"),e[18]=A):A=e[18],c=A,m=nt(o,w),e[0]=a,e[1]=r,e[2]=n,e[3]=s,e[4]=o,e[5]=c,e[6]=m,e[7]=l}else c=e[5],m=e[6],l=e[7];let p=m,f=`api.${a}.${r}`,h;e[19]!==f?(h=(0,R.jsx)("h2",{className:"font-mono text-sm font-semibold text-foreground","data-testid":"api-fn-title",children:f}),e[19]=f,e[20]=h):h=e[20];let g;e[21]!==n||e[22]!==s?(g=s("Call this {kind} from your app.",{kind:n}),e[21]=n,e[22]=s,e[23]=g):g=e[23];let x;e[24]!==g?(x=(0,R.jsx)("p",{className:"text-xs text-muted-foreground",children:g}),e[24]=g,e[25]=x):x=e[25];let v;e[26]!==h||e[27]!==x?(v=(0,R.jsxs)("div",{children:[h,x]}),e[26]=h,e[27]=x,e[28]=v):v=e[28];let N;e[29]!==s?(N=s("Snippet flavour"),e[29]=s,e[30]=N):N=e[30];let y;e[31]!==c||e[32]!==o||e[33]!==l?(y=Ye.map(w=>(0,R.jsx)(W,{"aria-selected":o===w,"data-tab":w,"data-testid":`api-tab-${w}`,onClick:c,role:"tab",size:"xs",type:"button",variant:o===w?"default":"outline",children:l[w]},w)),e[31]=c,e[32]=o,e[33]=l,e[34]=y):y=e[34];let b;e[35]!==N||e[36]!==y?(b=(0,R.jsx)("div",{"aria-label":N,className:"flex gap-1.5","data-testid":"api-tabs",role:"tablist",children:y}),e[35]=N,e[36]=y,e[37]=b):b=e[37];let I=l[o],P=`api-snippet-${o}`,$;e[38]!==p||e[39]!==I||e[40]!==P?($=(0,R.jsx)(Re,{code:p,label:I,testId:P}),e[38]=p,e[39]=I,e[40]=P,e[41]=$):$=e[41];let k;return e[42]!==$||e[43]!==v||e[44]!==b?(k=(0,R.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"api-fn-doc",children:[v,b,$]}),e[42]=$,e[43]=v,e[44]=b,e[45]=k):k=e[45],k},"de"),st=u(t=>{let e=(0,Y.c)(19),{name:a}=t,r=J(),n;e[0]!==a?(n=at(a),e[0]=a,e[1]=n):n=e[1];let s=n,o;e[2]!==a?(o=(0,R.jsx)("h2",{className:"font-mono text-sm font-semibold text-foreground","data-testid":"api-table-title",children:a}),e[2]=a,e[3]=o):o=e[3];let i;e[4]!==r?(i=r("Read and write this table through the typed data model."),e[4]=r,e[5]=i):i=e[5];let c;e[6]!==i?(c=(0,R.jsx)("p",{className:"text-xs text-muted-foreground",children:i}),e[6]=i,e[7]=c):c=e[7];let m;e[8]!==o||e[9]!==c?(m=(0,R.jsxs)("div",{children:[o,c]}),e[8]=o,e[9]=c,e[10]=m):m=e[10];let l;e[11]!==r?(l=r("Data model"),e[11]=r,e[12]=l):l=e[12];let p;e[13]!==s||e[14]!==l?(p=(0,R.jsx)(Re,{code:s,label:l,testId:"api-snippet-table"}),e[13]=s,e[14]=l,e[15]=p):p=e[15];let f;return e[16]!==m||e[17]!==p?(f=(0,R.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"api-table-doc",children:[m,p]}),e[16]=m,e[17]=p,e[18]=f):f=e[18],f},"fe"),Te=u(t=>{let e=(0,Y.c)(8),{active:a,label:r,onSelect:n,testId:s,value:o}=t,i;e[0]!==n||e[1]!==o?(i=u(()=>{n(o)},"m"),e[0]=n,e[1]=o,e[2]=i):i=e[2];let c=i,m=a?"page":void 0,l;return e[3]!==r||e[4]!==c||e[5]!==m||e[6]!==s?(l=(0,R.jsx)("button",{"aria-current":m,className:"w-full truncate rounded-md px-2 py-1 text-start font-mono text-xs text-muted-foreground outline-none transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent aria-[current=page]:bg-sidebar-accent aria-[current=page]:font-medium aria-[current=page]:text-foreground","data-testid":s,onClick:c,type:"button",children:r}),e[3]=r,e[4]=c,e[5]=m,e[6]=s,e[7]=l):l=e[7],l},"G"),it=u(t=>{let e=new Map;for(let a of t){let{file:r,fn:n}=Ce(a.path),s=e.get(r)??[];s.push({fn:n,kind:a.kind,path:a.path}),e.set(r,s)}return[...e.entries()].map(([a,r])=>({file:a,items:r.toSorted((n,s)=>n.fn.localeCompare(s.fn))})).toSorted((a,r)=>a.file.localeCompare(r.file))},"pe"),Ae=u(t=>{let e=(0,Y.c)(58),{functions:a,initialShardKey:r}=t,n=J(),s=F(),[o,i]=(0,X.useState)(null),[c,m]=(0,X.useState)(null),l,p;e[0]!==s||e[1]!==r?(l=u(()=>{let _=!1;return s.query(Xe,{},ie(r??"")).then(T=>(_||i(T),T)).catch(()=>{_||i([])}),()=>{_=!0}},"o"),p=[s,r],e[0]=s,e[1]=r,e[2]=l,e[3]=p):(l=e[2],p=e[3]),(0,X.useEffect)(l,p);let f,h,g,x,v,N,y,b,I,P;if(e[4]!==a||e[5]!==c||e[6]!==n||e[7]!==o){let _=a??[],T=it(_),L=(o??[]).map(lt).toSorted(dt),E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E=u(M=>{m({kind:"fn",path:M})},"P"),e[18]=E):E=e[18];let D=E,Q;e[19]===Symbol.for("react.memo_cache_sentinel")?(Q=u(M=>{m({kind:"table",name:M})},"j"),e[19]=Q):Q=e[19];let Ve=Q;h=c?.kind==="fn"?_.find(M=>M.path===c.path):void 0,f=_.length>0||L.length>0,g=h===void 0?void 0:Ce(h.path),I="grid min-h-0 gap-6 md:grid-cols-[16rem_minmax(0,1fr)]",P="lunora-api-docs",e[20]!==n?(x=n("API resources"),e[20]=n,e[21]=x):x=e[21],v="flex flex-col gap-4 overflow-y-auto",N="api-rail";let ne;e[22]!==c||e[23]!==n?(ne=u(M=>(0,R.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,R.jsx)("span",{className:"px-2 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:M.file||n("(root)")}),M.items.map(ee=>(0,R.jsx)(Te,{active:c?.kind==="fn"&&c.path===ee.path,label:ee.fn,onSelect:D,testId:`api-rail-fn-${ee.path}`,value:ee.path},ee.path))]},M.file),"q"),e[22]=c,e[23]=n,e[24]=ne):ne=e[24],y=T.map(ne),b=L.length>0&&(0,R.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,R.jsx)("span",{className:"px-2 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:n("Tables")}),L.map(M=>(0,R.jsx)(Te,{active:c?.kind==="table"&&c.name===M,label:M,onSelect:Ve,testId:`api-rail-table-${M}`,value:M},M))]}),e[4]=a,e[5]=c,e[6]=n,e[7]=o,e[8]=f,e[9]=h,e[10]=g,e[11]=x,e[12]=v,e[13]=N,e[14]=y,e[15]=b,e[16]=I,e[17]=P}else f=e[8],h=e[9],g=e[10],x=e[11],v=e[12],N=e[13],y=e[14],b=e[15],I=e[16],P=e[17];let $;e[25]!==f||e[26]!==n?($=!f&&(0,R.jsx)("p",{className:"px-2 text-xs text-muted-foreground","data-testid":"api-rail-empty",children:n("No functions or tables to document yet.")}),e[25]=f,e[26]=n,e[27]=$):$=e[27];let k;e[28]!==$||e[29]!==x||e[30]!==v||e[31]!==N||e[32]!==y||e[33]!==b?(k=(0,R.jsxs)("nav",{"aria-label":x,className:v,"data-testid":N,children:[y,b,$]}),e[28]=$,e[29]=x,e[30]=v,e[31]=N,e[32]=y,e[33]=b,e[34]=k):k=e[34];let w;e[35]!==c||e[36]!==n?(w=c===null&&(0,R.jsx)(U,{description:n("Select a function or table to see how to call it from your app."),testId:"api-empty",title:n("API usage snippets")}),e[35]=c,e[36]=n,e[37]=w):w=e[37];let j;e[38]!==c?.kind||e[39]!==h||e[40]!==g?(j=c?.kind==="fn"&&h!==void 0&&g!==void 0&&(0,R.jsx)(ot,{file:g.file,fn:g.fn,kind:h.kind},h.path),e[38]=c?.kind,e[39]=h,e[40]=g,e[41]=j):j=e[41];let O;e[42]!==c?.kind||e[43]!==h||e[44]!==n?(O=c?.kind==="fn"&&h===void 0&&(0,R.jsx)(U,{testId:"api-empty",title:n("API usage snippets")}),e[42]=c?.kind,e[43]=h,e[44]=n,e[45]=O):O=e[45];let S;e[46]!==c?(S=c?.kind==="table"&&(0,R.jsx)(st,{name:c.name}),e[46]=c,e[47]=S):S=e[47];let C;e[48]!==w||e[49]!==j||e[50]!==O||e[51]!==S?(C=(0,R.jsxs)("div",{className:"min-w-0",children:[w,j,O,S]}),e[48]=w,e[49]=j,e[50]=O,e[51]=S,e[52]=C):C=e[52];let A;return e[53]!==k||e[54]!==C||e[55]!==I||e[56]!==P?(A=(0,R.jsxs)("div",{className:I,"data-testid":P,children:[k,C]}),e[53]=k,e[54]=C,e[55]=I,e[56]=P,e[57]=A):A=e[57],A},"ke");function lt(t){return t.name}u(lt,"ue");function dt(t,e){return t.localeCompare(e)}u(dt,"me");var De=K(te(),1);var z=K(te(),1);var q=K(me(),1);var d=K(re(),1);var ct=u(t=>typeof t=="number"?"number":typeof t=="boolean"?"boolean":"string","we"),Je=u(t=>{if(t.enum!==void 0&&t.enum.length>0)return t.enum;if(t.anyOf!==void 0&&t.anyOf.length>0&&t.anyOf.every(e=>e.const!==void 0))return t.anyOf.map(e=>e.const)},"Q"),ce=u(t=>t===void 0?"any":t.const!==void 0?JSON.stringify(t.const):t.enum!==void 0&&t.enum.length>0?t.enum.map(e=>JSON.stringify(e)).join(" | "):t.anyOf!==void 0&&t.anyOf.length>0?t.anyOf.map(e=>ce(e)).join(" | "):t.type==="array"?`array<${ce(t.items)}>`:t.type??"any","z"),pt=u(t=>{let e=Je(t);return e!==void 0?t.type??ct(e[0]):ce(t)},"ke"),mt=u(t=>{let e=Je(t);return e===void 0?void 0:e.map(a=>JSON.stringify(a)).join(" | ")},"Oe"),ut=u(t=>{let e=[];t.minimum!==void 0?e.push(`${String(t.minimum)} \u2264`):t.exclusiveMinimum!==void 0&&e.push(`${String(t.exclusiveMinimum)} <`);let a=e.length>0;e.push("value"),t.maximum!==void 0?e.push(`\u2264 ${String(t.maximum)}`):t.exclusiveMaximum!==void 0&&e.push(`< ${String(t.exclusiveMaximum)}`);let r=e.length>(a?2:1);return a||r?e.join(" "):void 0},"$e"),ft=u(t=>{if(t.type==="object"&&t.properties!==void 0)return t;if(t.type==="array"&&t.items?.type==="object"&&t.items.properties!==void 0)return t.items},"Te"),Z=u(t=>{if(t===void 0)return null;if(t.const!==void 0)return t.const;if(t.enum!==void 0&&t.enum.length>0)return t.enum[0];if(t.anyOf!==void 0&&t.anyOf.length>0)return Z(t.anyOf[0]);switch(t.type){case"array":return[];case"boolean":return!1;case"number":return 0;case"object":{let e={};for(let[a,r]of Object.entries(t.properties??{}))e[a]=Z(r);return e}case"string":return"";default:return null}},"D"),de=u(t=>{let e=(0,z.c)(7),{label:a,value:r}=t,n;e[0]!==a?(n=(0,d.jsx)("span",{className:"text-muted-foreground",children:a}),e[0]=a,e[1]=n):n=e[1];let s;e[2]!==r?(s=(0,d.jsx)("span",{className:"text-foreground",children:r}),e[2]=r,e[3]=s):s=e[3];let o;return e[4]!==n||e[5]!==s?(o=(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 rounded border border-border px-1.5 py-0.5 font-mono text-[10px]",children:[n,s]}),e[4]=n,e[5]=s,e[6]=o):o=e[6],o},"K"),ht=u(t=>{let e=(0,z.c)(40),{name:a,required:r,schema:n}=t,s=J(),o;e[0]!==n?(o=ut(n),e[0]=n,e[1]=o):o=e[1];let i=o,c;e[2]!==n?(c=mt(n),e[2]=n,e[3]=c):c=e[3];let m=c,l=n["x-lunora-table"],p=n.format!==void 0||i!==void 0||m!==void 0||l!==void 0,f;e[4]!==n?(f=ft(n),e[4]=n,e[5]=f):f=e[5];let h=f,g=r?"*":"?",x;e[6]!==g?(x=(0,d.jsx)("span",{className:"text-muted-foreground",children:g}),e[6]=g,e[7]=x):x=e[7];let v;e[8]!==a||e[9]!==x?(v=(0,d.jsxs)("span",{className:"font-mono text-foreground",children:[a,x]}),e[8]=a,e[9]=x,e[10]=v):v=e[10];let N;e[11]!==n?(N=pt(n),e[11]=n,e[12]=N):N=e[12];let y;e[13]!==N?(y=(0,d.jsx)("span",{className:"font-mono text-muted-foreground",children:N}),e[13]=N,e[14]=y):y=e[14];let b;e[15]!==v||e[16]!==y?(b=(0,d.jsxs)("div",{className:"flex items-baseline gap-2",children:[v,y]}),e[15]=v,e[16]=y,e[17]=b):b=e[17];let I;e[18]!==n.description?(I=n.description!==void 0&&(0,d.jsx)("p",{className:"max-w-prose text-muted-foreground",children:n.description}),e[18]=n.description,e[19]=I):I=e[19];let P;e[20]!==p||e[21]!==i||e[22]!==l||e[23]!==n.format||e[24]!==s||e[25]!==m?(P=p&&(0,d.jsxs)("div",{className:"flex flex-wrap gap-1",children:[n.format!==void 0&&(0,d.jsx)(de,{label:s("Format"),value:n.format}),i!==void 0&&(0,d.jsx)(de,{label:s("Range"),value:i}),m!==void 0&&(0,d.jsx)(de,{label:s("Value in"),value:m}),l!==void 0&&(0,d.jsx)(de,{label:s("relation"),value:l})]}),e[20]=p,e[21]=i,e[22]=l,e[23]=n.format,e[24]=s,e[25]=m,e[26]=P):P=e[26];let $;e[27]!==I||e[28]!==P||e[29]!==b?($=(0,d.jsxs)("div",{className:"flex flex-col gap-1 py-2",children:[b,I,P]}),e[27]=I,e[28]=P,e[29]=b,e[30]=$):$=e[30];let k=$;if(h===void 0){let S;return e[31]!==k?(S=(0,d.jsx)("div",{className:"border-b border-border/50 last:border-b-0",children:k}),e[31]=k,e[32]=S):S=e[32],S}let w;e[33]!==k?(w=(0,d.jsx)("summary",{className:"cursor-pointer marker:text-muted-foreground",children:k}),e[33]=k,e[34]=w):w=e[34];let j;e[35]!==h?(j=(0,d.jsx)("div",{className:"mb-2 ml-2 border-l border-border pl-3",children:(0,d.jsx)(Le,{schema:h})}),e[35]=h,e[36]=j):j=e[36];let O;return e[37]!==w||e[38]!==j?(O=(0,d.jsxs)("details",{className:"border-b border-border/50 last:border-b-0",children:[w,j]}),e[37]=w,e[38]=j,e[39]=O):O=e[39],O},"Ee"),Le=u(t=>{let e=(0,z.c)(7),{schema:a}=t,r;e[0]!==a.required?(r=new Set(a.required),e[0]=a.required,e[1]=r):r=e[1];let n=r,s;e[2]!==a.properties?(s=Object.entries(a.properties??{}),e[2]=a.properties,e[3]=s):s=e[3];let o=s,i;return e[4]!==n||e[5]!==o?(i=(0,d.jsx)("div",{className:"flex flex-col",children:o.map(c=>{let[m,l]=c;return(0,d.jsx)(ht,{name:m,required:n.has(m),schema:l},m)})}),e[4]=n,e[5]=o,e[6]=i):i=e[6],i},"Z"),_e=u(t=>{let e=(0,z.c)(10),{schema:a,testId:r}=t;if(a?.type!=="object"||Object.keys(a.properties??{}).length===0){let o;e[0]!==a?(o=ce(a),e[0]=a,e[1]=o):o=e[1];let i;return e[2]!==o||e[3]!==r?(i=(0,d.jsx)("p",{className:"font-mono text-xs text-muted-foreground","data-testid":r,children:o}),e[2]=o,e[3]=r,e[4]=i):i=e[4],i}let n;e[5]!==a?(n=(0,d.jsx)(Le,{schema:a}),e[5]=a,e[6]=n):n=e[6];let s;return e[7]!==n||e[8]!==r?(s=(0,d.jsx)("div",{className:"text-xs","data-testid":r,children:n}),e[7]=n,e[8]=r,e[9]=s):s=e[9],s},"V"),gt=["curl","javascript","lunora"],xt={lunora:"Lunora",curl:"cURL",javascript:"JavaScript"},bt=u(t=>`api.${t.replaceAll(/[/:]/g,".")}`,"Ae"),yt=u(t=>{let e=Z(t.argsSchema)??{};return t.functionPath===void 0?e:{args:e,functionPath:t.functionPath}},"je"),vt=u((t,e,a)=>{let r=`${a}${e.httpPath}`,n=JSON.stringify(yt(e),void 0,2),s=JSON.stringify(Z(e.argsSchema)??{},void 0,2);switch(t){case"curl":{let o=e.method!=="GET"&&e.method!=="HEAD",i=[`curl -X ${e.method} ${JSON.stringify(r)}`];return o&&i.push(' -H "Content-Type: application/json"',` -d '${n}'`),i.join(` \\
3
+ `)}case"lunora":return e.functionPath===void 0?`await fetch(${JSON.stringify(e.httpPath)}, { method: ${JSON.stringify(e.method)} });`:`import { useLunora } from "@lunora/react";
4
+ import { api } from "./_generated/api";
5
+
6
+ const client = useLunora();
7
+ await client.${e.kind??"query"}(${bt(e.functionPath)}, ${s});`;default:{let o=e.method!=="GET"&&e.method!=="HEAD"?`{
8
+ method: ${JSON.stringify(e.method)},
9
+ headers: { "Content-Type": "application/json" },
10
+ body: JSON.stringify(${n}),
11
+ }`:`{ method: ${JSON.stringify(e.method)} }`;return`const response = await fetch(${JSON.stringify(r)}, ${o});
12
+ const data = await response.json();`}}},"Ie"),Nt=u(t=>{let e=(0,z.c)(24),{operation:a,server:r}=t,n=J(),[s,o]=(0,q.useState)("curl"),i;e[0]!==a||e[1]!==s||e[2]!==r?(i=vt(s,a,r),e[0]=a,e[1]=s,e[2]=r,e[3]=i):i=e[3];let c=i,m;e[4]!==c?(m=u(()=>{ae(c)},"d"),e[4]=c,e[5]=m):m=e[5];let l=m,p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=u(I=>{o(I.currentTarget.dataset.sample)},"u"),e[6]=p):p=e[6];let f=p,h;e[7]!==s?(h=gt.map(I=>(0,d.jsx)("button",{"aria-selected":s===I,className:"rounded px-2 py-0.5 text-xs text-muted-foreground transition-colors hover:text-foreground aria-selected:bg-muted aria-selected:font-medium aria-selected:text-foreground","data-sample":I,"data-testid":`api-sample-${I}`,onClick:f,role:"tab",type:"button",children:xt[I]},I)),e[7]=s,e[8]=h):h=e[8];let g;e[9]!==h?(g=(0,d.jsx)("div",{className:"flex gap-1",role:"tablist",children:h}),e[9]=h,e[10]=g):g=e[10];let x;e[11]!==n?(x=n("Copy"),e[11]=n,e[12]=x):x=e[12];let v;e[13]!==l||e[14]!==x?(v=(0,d.jsx)(W,{"data-testid":"api-sample-copy",onClick:l,size:"xs",type:"button",variant:"ghost",children:x}),e[13]=l,e[14]=x,e[15]=v):v=e[15];let N;e[16]!==g||e[17]!==v?(N=(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-border px-3 py-2",children:[g,v]}),e[16]=g,e[17]=v,e[18]=N):N=e[18];let y;e[19]!==c?(y=(0,d.jsx)("pre",{className:"overflow-auto px-3 pb-3 font-mono text-xs","data-testid":"api-sample-source",children:c}),e[19]=c,e[20]=y):y=e[20];let b;return e[21]!==N||e[22]!==y?(b=(0,d.jsxs)("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card","data-testid":"api-code-samples",children:[N,y]}),e[21]=N,e[22]=y,e[23]=b):b=e[23],b},"Pe"),kt={blue:"text-info",emerald:"text-success",neutral:"text-muted-foreground",orange:"text-warning",red:"text-destructive",violet:"text-royal-amethyst"},wt=u(t=>{switch(t.toUpperCase()){case"DELETE":return"red";case"GET":return"emerald";case"PATCH":return"orange";case"POST":return"blue";case"PUT":return"orange";default:return"neutral"}},"_e"),St=u(t=>{switch(t){case"action":return"violet";case"mutation":return"orange";case"query":return"emerald";default:return"neutral"}},"Be"),ge=u(t=>{let e=(0,z.c)(7),{kind:a,method:r,testId:n}=t,s;e[0]!==a||e[1]!==r?(s=a??r.toUpperCase(),e[0]=a,e[1]=r,e[2]=s):s=e[2];let o=s,i=a===void 0?wt(r):St(a),c=`${kt[i]} font-mono text-[10px] tracking-wide uppercase`,m;return e[3]!==o||e[4]!==c||e[5]!==n?(m=(0,d.jsx)(ye,{className:c,"data-testid":n,variant:"ghost",children:o}),e[3]=o,e[4]=c,e[5]=n,e[6]=m):m=e[6],m},"q"),Me=u(t=>t.startsWith("2")?"text-emerald-600 dark:text-emerald-400":t==="default"||t.startsWith("4")||t.startsWith("5")?"text-red-600 dark:text-red-400":"text-muted-foreground","ee"),qe=u(t=>t.startsWith("2")?"bg-emerald-500":t==="default"||t.startsWith("4")||t.startsWith("5")?"bg-red-500":"bg-muted-foreground","te"),It=new Set([" ",`
13
+ `,"\r"]),Ee=" ",Ot=u(t=>{let e="";for(let n of t)It.has(n)||(e+=n);let a=0,r=e.length;for(;a<r&&(e[a]??"")<=Ee;)a+=1;for(;r>a&&(e[r-1]??"")<=Ee;)r-=1;return e.slice(a,r)},"Je"),$t=/^(?:[a-z][\d+.a-z-]*:)?\/\//i,Pt=u((t,e)=>{let a=globalThis.location?.origin??"",r=e===""?a:e,n=Ot(t);if(r===""){if($t.test(n))throw new Error(`restDispatch: refusing to send the admin token off-origin (${n} names its own host and there is no origin to check it against)`);return n}let s=new URL(n,r);if(s.origin!==new URL(r).origin)throw new Error(`restDispatch: refusing to send the admin token off-origin (${s.origin} is not ${r})`);return s.toString()},"Ke"),jt=u(async(t,e,a,r)=>{let n=t.method!=="GET"&&t.method!=="HEAD",s=Pt(t.httpPath,a),o=await(await fetch(s,{body:n?JSON.stringify(e):void 0,headers:{...n?{"content-type":"application/json"}:{},...r===null||r===""?{}:{authorization:`Bearer ${r}`}},method:t.method})).text();try{return JSON.parse(o)}catch{return o}},"ze"),Tt=u(t=>JSON.stringify(Z(t.argsSchema)??{},void 0,2),"Fe"),Ke=(0,q.createContext)(null),ze=u(()=>{let t=(0,q.use)(Ke);if(t===null)throw new be("INTERNAL","useOperationRun must be used within an OperationRunProvider");return t},"se"),Ct=u(({children:t,operation:e})=>{let a=J(),r=F(),[n,s]=(0,q.useState)(()=>Tt(e)),[o,i]=(0,q.useState)(""),[c,m]=(0,q.useState)("idle"),[l,p]=(0,q.useState)(void 0),[f,h]=(0,q.useState)(null),[g,x]=(0,q.useState)(null),v=u(async()=>{let N;try{N=n.trim()===""?{}:JSON.parse(n)}catch(b){m("error"),p(void 0),x(null),h(a("Invalid JSON args: {message}",{message:fe(b)}));return}m("running"),h(null);let y=performance.now();try{let b=await(e.functionPath===void 0?jt(e,N,r.url,r.getAuthToken()):Se(r,e.kind,se(e.functionPath),N,ie(o)));p(b),x(Math.round(performance.now()-y)),m("success")}catch(b){p(void 0),x(Math.round(performance.now()-y)),h(fe(b)),m("error")}},"v");return(0,d.jsx)(Ke,{value:{argsText:n,durationMs:g,error:f,operation:e,response:l,send:u(()=>{Oe(v())},"send"),setArgsText:s,setShardKey:i,shardKey:o,status:c},children:t})},"We"),Rt=u(()=>{let t=(0,z.c)(48),e=J(),{argsText:a,operation:r,send:n,setArgsText:s,setShardKey:o,shardKey:i,status:c}=ze(),m;t[0]!==s?(m=u(T=>{s(T.target.value)},"d"),t[0]=s,t[1]=m):m=t[1];let l=m,p;t[2]!==n?(p=u(T=>{T.key==="Enter"&&(T.metaKey||T.ctrlKey)&&(T.preventDefault(),n())},"u"),t[2]=n,t[3]=p):p=t[3];let f=p,h=c==="running",g;t[4]!==r.kind||t[5]!==r.method?(g=(0,d.jsx)(ge,{kind:r.kind,method:r.method,testId:"api-try-method"}),t[4]=r.kind,t[5]=r.method,t[6]=g):g=t[6];let x=r.functionPath??r.httpPath,v;t[7]!==x?(v=(0,d.jsx)("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-foreground",children:x}),t[7]=x,t[8]=v):v=t[8];let N=h?"animate-pulse":void 0,y;t[9]!==N?(y=(0,d.jsx)(oe,{className:N,icon:we,strokeWidth:2}),t[9]=N,t[10]=y):y=t[10];let b;t[11]!==h||t[12]!==e?(b=e(h?"Sending\u2026":"Send"),t[11]=h,t[12]=e,t[13]=b):b=t[13];let I;t[14]!==h||t[15]!==n||t[16]!==y||t[17]!==b?(I=(0,d.jsxs)(W,{"data-testid":"api-try-send",disabled:h,onClick:n,size:"sm",type:"button",children:[y,b]}),t[14]=h,t[15]=n,t[16]=y,t[17]=b,t[18]=I):I=t[18];let P;t[19]!==g||t[20]!==v||t[21]!==I?(P=(0,d.jsxs)("div",{className:"flex items-center gap-2 border-b border-border bg-muted px-3 py-2",children:[g,v,I]}),t[19]=g,t[20]=v,t[21]=I,t[22]=P):P=t[22];let $;t[23]!==e?($=e("Arguments (JSON)"),t[23]=e,t[24]=$):$=t[24];let k;t[25]!==$?(k=(0,d.jsx)(he,{htmlFor:"api-try-args",children:$}),t[25]=$,t[26]=k):k=t[26];let w;t[27]!==a?(w=a.split(`
14
+ `),t[27]=a,t[28]=w):w=t[28];let j=Math.min(12,Math.max(3,w.length)),O;t[29]!==a||t[30]!==l||t[31]!==f||t[32]!==j?(O=(0,d.jsx)(je,{className:"font-mono text-xs","data-testid":"api-try-args",id:"api-try-args",onChange:l,onKeyDown:f,rows:j,spellCheck:!1,value:a}),t[29]=a,t[30]=l,t[31]=f,t[32]=j,t[33]=O):O=t[33];let S;t[34]!==k||t[35]!==O?(S=(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[k,O]}),t[34]=k,t[35]=O,t[36]=S):S=t[36];let C;t[37]!==r.functionPath||t[38]!==o||t[39]!==i||t[40]!==e?(C=r.functionPath!==void 0&&(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,d.jsx)(he,{htmlFor:"shard-input",children:e("Shard key (optional)")}),(0,d.jsx)(Pe,{id:"shard-input",onChange:o,testId:"shard-input",value:i})]}),t[37]=r.functionPath,t[38]=o,t[39]=i,t[40]=e,t[41]=C):C=t[41];let A;t[42]!==S||t[43]!==C?(A=(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-3",children:[S,C]}),t[42]=S,t[43]=C,t[44]=A):A=t[44];let _;return t[45]!==A||t[46]!==P?(_=(0,d.jsxs)("div",{className:"overflow-hidden rounded-xl border border-border bg-card","data-testid":"api-try-it",children:[P,A]}),t[45]=A,t[46]=P,t[47]=_):_=t[47],_},"qe"),At=u(t=>{let e=(0,z.c)(51),{operation:a}=t,r=J(),n=`api-operation-${a.operationId}`,s=a.key,o;e[0]!==a.kind||e[1]!==a.method?(o=(0,d.jsx)(ge,{kind:a.kind,method:a.method,testId:"api-operation-method"}),e[0]=a.kind,e[1]=a.method,e[2]=o):o=e[2];let i=a.functionPath??a.httpPath,c;e[3]!==i?(c=(0,d.jsx)("code",{className:"truncate font-mono text-xs text-muted-foreground",children:i}),e[3]=i,e[4]=c):c=e[4];let m;e[5]!==o||e[6]!==c?(m=(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[o,c]}),e[5]=o,e[6]=c,e[7]=m):m=e[7];let l;e[8]!==a.title?(l=(0,d.jsx)("h1",{className:"text-lg font-semibold text-foreground","data-testid":"api-operation-title",children:a.title}),e[8]=a.title,e[9]=l):l=e[9];let p;e[10]!==a.description?(p=a.description!==void 0&&(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:a.description}),e[10]=a.description,e[11]=p):p=e[11];let f;e[12]!==m||e[13]!==l||e[14]!==p?(f=(0,d.jsxs)("header",{className:"sticky top-0 z-10 -mx-6 -mt-6 flex flex-col gap-2 border-b border-border bg-background px-6 pt-6 pb-3",children:[m,l,p]}),e[12]=m,e[13]=l,e[14]=p,e[15]=f):f=e[15];let h;e[16]!==r?(h=r("Try it"),e[16]=r,e[17]=h):h=e[17];let g;e[18]!==h?(g=(0,d.jsx)("h2",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:h}),e[18]=h,e[19]=g):g=e[19];let x;e[20]===Symbol.for("react.memo_cache_sentinel")?(x=(0,d.jsx)(Rt,{}),e[20]=x):x=e[20];let v;e[21]!==g?(v=(0,d.jsxs)("section",{className:"flex flex-col gap-2",children:[g,x]}),e[21]=g,e[22]=v):v=e[22];let N;e[23]!==r?(N=r("Request arguments"),e[23]=r,e[24]=N):N=e[24];let y;e[25]!==N?(y=(0,d.jsx)("h2",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:N}),e[25]=N,e[26]=y):y=e[26];let b;e[27]!==a.argsSchema?(b=(0,d.jsx)(_e,{schema:a.argsSchema,testId:"api-operation-args"}),e[27]=a.argsSchema,e[28]=b):b=e[28];let I;e[29]!==y||e[30]!==b?(I=(0,d.jsxs)("section",{className:"flex flex-col gap-2",children:[y,b]}),e[29]=y,e[30]=b,e[31]=I):I=e[31];let P;e[32]!==r?(P=r("Response body"),e[32]=r,e[33]=P):P=e[33];let $;e[34]!==P?($=(0,d.jsx)("h2",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:P}),e[34]=P,e[35]=$):$=e[35];let k;if(e[36]!==a.responses||e[37]!==r){let O;e[39]!==r?(O=u(S=>(0,d.jsxs)("div",{className:"flex flex-col gap-1.5 rounded-xl border border-border bg-card p-3",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,d.jsxs)("span",{className:`inline-flex items-center gap-1.5 font-mono text-xs font-semibold ${Me(S.status)}`,children:[(0,d.jsx)("span",{className:`size-1.5 rounded-full ${qe(S.status)}`}),S.status]}),S.schema!==void 0&&(0,d.jsx)("span",{className:"rounded border border-border px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:r("application/json")})]}),S.description!==void 0&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:S.description}),S.schema!==void 0&&(0,d.jsx)(_e,{schema:S.schema,testId:`api-response-${S.status}`})]},S.status),"E"),e[39]=r,e[40]=O):O=e[40],k=a.responses.map(O),e[36]=a.responses,e[37]=r,e[38]=k}else k=e[38];let w;e[41]!==$||e[42]!==k?(w=(0,d.jsxs)("section",{className:"flex flex-col gap-3",children:[$,k]}),e[41]=$,e[42]=k,e[43]=w):w=e[43];let j;return e[44]!==a.key||e[45]!==n||e[46]!==v||e[47]!==I||e[48]!==w||e[49]!==f?(j=(0,d.jsxs)("div",{className:"flex flex-col gap-6 duration-200 animate-in fade-in-0 slide-in-from-bottom-1","data-testid":n,children:[f,v,I,w]},s),e[44]=a.key,e[45]=n,e[46]=v,e[47]=I,e[48]=w,e[49]=f,e[50]=j):j=e[50],j},"He"),_t={boolean:"text-royal-amethyst",key:"text-sky-sapphire",number:"text-warning",plain:"",string:"text-success"},Et=/"(?:[^"\\]|\\.)*"|\b(?:true|false|null)\b|-?\d+(?:\.\d+)?/g,Jt=/^\s*:/,Lt=u((t,e,a)=>a.startsWith('"')?Jt.test(t.slice(e))?"key":"string":a==="true"||a==="false"||a==="null"?"boolean":"number","Xe"),Mt=u(t=>{let e=[],a=0;for(let r of t.matchAll(Et)){let{index:n}=r,s=r[0],o=n+s.length;n>a&&e.push({kind:"plain",start:a,text:t.slice(a,n)}),e.push({kind:Lt(t,o,s),start:n,text:s}),a=o}return a<t.length&&e.push({kind:"plain",start:a,text:t.slice(a)}),e},"Ye"),qt=u(t=>{let e=(0,z.c)(4),{code:a}=t,r;e[0]!==a?(r=Mt(a).map(Kt),e[0]=a,e[1]=r):r=e[1];let n;return e[2]!==r?(n=(0,d.jsx)(d.Fragment,{children:r}),e[2]=r,e[3]=n):n=e[3],n},"Qe");function Kt(t){return(0,d.jsx)("span",{className:_t[t.kind],children:t.text},t.start)}u(Kt,"Ze");var Be="__live__",zt=u(t=>t.schema===void 0?"":JSON.stringify(Z(t.schema),void 0,2),"et"),Bt=u((t,e,a)=>a?t??"":e===void 0?"":JSON.stringify(e,Ie,2),"tt"),Dt=u(t=>{let e=(0,z.c)(18),{active:a,running:r,showError:n}=t,s=J();if(r){let p;e[0]!==s?(p=s("Sending\u2026"),e[0]=s,e[1]=p):p=e[1];let f;return e[2]!==p?(f=(0,d.jsx)("p",{className:"px-3 py-3 text-xs text-muted-foreground","data-testid":"api-response-running",children:p}),e[2]=p,e[3]=f):f=e[3],f}if(a===void 0||a.body===""){let p;e[4]!==a?.live||e[5]!==s?(p=a?.live===!0?s("Send a request to see the response."):s("No example for this response."),e[4]=a?.live,e[5]=s,e[6]=p):p=e[6];let f;return e[7]!==p?(f=(0,d.jsx)("p",{className:"px-3 py-3 text-xs text-muted-foreground","data-testid":"api-response-idle",children:p}),e[7]=p,e[8]=f):f=e[8],f}let o=n&&"text-destructive",i;e[9]!==o?(i=ue("max-h-[28rem] overflow-auto px-3 py-3 font-mono text-xs",o),e[9]=o,e[10]=i):i=e[10];let c=n?"api-response-error":"api-response-body",m;e[11]!==a.body||e[12]!==n?(m=n?a.body:(0,d.jsx)(qt,{code:a.body}),e[11]=a.body,e[12]=n,e[13]=m):m=e[13];let l;return e[14]!==i||e[15]!==c||e[16]!==m?(l=(0,d.jsx)("pre",{className:i,"data-testid":c,children:m}),e[14]=i,e[15]=c,e[16]=m,e[17]=l):l=e[17],l},"rt"),Wt=u(({durationMs:t,error:e,failed:a,operation:r,ran:n,response:s,t:o})=>{let i=r.responses.map(c=>({body:zt(c),durationMs:null,id:c.status,label:c.status,live:!1,status:c.status}));return n?[{body:Bt(e,s,a),durationMs:t,id:Be,label:o("Live"),live:!0,status:a?"error":"200"},...i]:i},"st"),Ut=u(()=>{let t=(0,z.c)(19),e=J(),{durationMs:a,error:r,operation:n,response:s,status:o}=ze(),i=o==="running",c=o==="error",m=o==="success"||c,l=Wt({durationMs:a,error:r,failed:c,operation:n,ran:m,response:s,t:e}),p=m?Be:l.find(Ft)?.id??l[0]?.id??"",[f,h]=(0,q.useState)(null),g=l.find(T=>T.id===(f??p))??l[0],x;t[0]===Symbol.for("react.memo_cache_sentinel")?(x=u(T=>{let{id:L}=T.currentTarget.dataset;L!==void 0&&h(L)},"m"),t[0]=x):x=t[0];let v=x,N=u(()=>{g!==void 0&&ae(g.body)},"w"),y=g?.live===!0?g.durationMs:null,b=g?.live===!0&&g.status==="error",I="flex min-h-0 flex-col rounded-xl border border-border bg-card",P="api-response-panel",$;t[1]!==e?($=e("Response"),t[1]=e,t[2]=$):$=t[2];let k;t[3]!==$?(k=(0,d.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:$}),t[3]=$,t[4]=k):k=t[4];let w=y!==null&&(0,d.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground",children:e("{ms} ms",{ms:y})}),j=g!==void 0&&g.body!==""&&(0,d.jsx)(W,{"aria-label":e("Copy"),"data-testid":"api-response-copy",onClick:N,size:"icon-xs",type:"button",variant:"ghost",children:(0,d.jsx)(oe,{icon:Ne,strokeWidth:2})}),O;t[5]!==w||t[6]!==j?(O=(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[w,j]}),t[5]=w,t[6]=j,t[7]=O):O=t[7];let S;t[8]!==k||t[9]!==O?(S=(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-border px-3 py-2",children:[k,O]}),t[8]=k,t[9]=O,t[10]=S):S=t[10];let C=l.length>0&&(0,d.jsx)("div",{className:"flex gap-1 overflow-x-auto border-b border-border px-2 py-1.5",role:"tablist",children:l.map(T=>{let L=T.id===g?.id;return(0,d.jsxs)("button",{"aria-selected":L,className:ue("inline-flex items-center gap-1.5 rounded px-2 py-0.5 font-mono text-xs transition-colors hover:text-foreground aria-selected:bg-muted aria-selected:font-medium",L?Me(T.status):"text-muted-foreground"),"data-id":T.id,"data-testid":T.live?"api-response-tab-live":`api-response-tab-${T.status}`,onClick:v,role:"tab",type:"button",children:[(0,d.jsx)("span",{className:`size-1.5 rounded-full ${qe(T.status)}`}),T.label]},T.id)})}),A;t[11]!==g||t[12]!==i||t[13]!==b?(A=(0,d.jsx)(Dt,{active:g,running:i,showError:b}),t[11]=g,t[12]=i,t[13]=b,t[14]=A):A=t[14];let _;return t[15]!==A||t[16]!==S||t[17]!==C?(_=(0,d.jsxs)("div",{className:I,"data-testid":P,children:[S,C,A]}),t[15]=A,t[16]=S,t[17]=C,t[18]=_):_=t[18],_},"nt");function Ft(t){return t.status.startsWith("2")}u(Ft,"ot");var Ht=u((t,e)=>{let a=e.trim().toLowerCase();return a===""?t:t.map(r=>({...r,operations:r.operations.filter(n=>`${n.summary} ${n.operationId}`.toLowerCase().includes(a))})).filter(r=>r.operations.length>0)},"it"),pe=u(t=>{let e=(0,z.c)(53),{model:a}=t,r=J(),n=a.groups[0]?.operations[0]?.key??"",[s,o]=(0,q.useState)(n),[i,c]=(0,q.useState)(""),m;e[0]!==n||e[1]!==a.operationByKey||e[2]!==s?(m=a.operationByKey.get(s)??a.operationByKey.get(n),e[0]=n,e[1]=a.operationByKey,e[2]=s,e[3]=m):m=e[3];let l=m,p,f,h,g,x,v,N,y,b,I;if(e[4]!==i||e[5]!==a.groups||e[6]!==a.server||e[7]!==l?.key||e[8]!==r){p=Ht(a.groups,i);let O;e[19]===Symbol.for("react.memo_cache_sentinel")?(O=u(E=>{let{key:D}=E.currentTarget.dataset;D!==void 0&&o(D)},"E"),e[19]=O):O=e[19];let S=O,C;e[20]===Symbol.for("react.memo_cache_sentinel")?(C=u(E=>{c(E.target.value)},"A"),e[20]=C):C=e[20];let A=C;f=a.server??"",b="grid min-h-0 flex-1 grid-cols-1 overflow-hidden lg:grid-cols-[16rem_minmax(0,1fr)_22rem]",I="api-reference",e[21]!==r?(x=r("API operations"),e[21]=r,e[22]=x):x=e[22],v="flex min-h-0 flex-col overflow-y-auto border-r border-border",N="api-reference-nav";let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=(0,d.jsx)(oe,{className:"pointer-events-none absolute top-1/2 left-2 size-3.5 -translate-y-1/2 text-muted-foreground",icon:ke,strokeWidth:2}),e[23]=_):_=e[23];let T;e[24]!==r?(T=r("Filter operations"),e[24]=r,e[25]=T):T=e[25],e[26]!==i||e[27]!==T?(y=(0,d.jsx)("div",{className:"sticky top-0 z-10 border-b border-border bg-sidebar p-2",children:(0,d.jsxs)("div",{className:"relative",children:[_,(0,d.jsx)(ve,{className:"h-7 pl-7","data-testid":"api-filter",onChange:A,placeholder:T,value:i})]})}),e[26]=i,e[27]=T,e[28]=y):y=e[28],h="flex flex-col gap-4 p-2";let L;e[29]!==l?.key||e[30]!==r?(L=u(E=>(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,d.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:E.name||r("(root)")}),(0,d.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground/70",children:E.operations.length})]}),E.operations.map(D=>{let Q=D.key===l?.key;return(0,d.jsxs)("button",{"aria-current":Q?"page":void 0,className:"flex items-center justify-between gap-2 rounded-md border-l-2 border-transparent px-2 py-1 text-start text-xs text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground aria-[current=page]:border-primary aria-[current=page]:bg-sidebar-accent aria-[current=page]:font-medium aria-[current=page]:text-foreground","data-key":D.key,"data-testid":`api-nav-${D.operationId}`,onClick:S,type:"button",children:[(0,d.jsx)("span",{className:"truncate",children:D.summary}),(0,d.jsx)(ge,{kind:D.kind,method:D.method})]},D.key)})]},E.name),"L"),e[29]=l?.key,e[30]=r,e[31]=L):L=e[31],g=p.map(L),e[4]=i,e[5]=a.groups,e[6]=a.server,e[7]=l?.key,e[8]=r,e[9]=p,e[10]=f,e[11]=h,e[12]=g,e[13]=x,e[14]=v,e[15]=N,e[16]=y,e[17]=b,e[18]=I}else p=e[9],f=e[10],h=e[11],g=e[12],x=e[13],v=e[14],N=e[15],y=e[16],b=e[17],I=e[18];let P;e[32]!==p.length||e[33]!==r?(P=p.length===0&&(0,d.jsx)("p",{className:"px-2 py-1 text-xs text-muted-foreground","data-testid":"api-nav-empty",children:r("No operations match your filter.")}),e[32]=p.length,e[33]=r,e[34]=P):P=e[34];let $;e[35]!==P||e[36]!==h||e[37]!==g?($=(0,d.jsxs)("div",{className:h,children:[g,P]}),e[35]=P,e[36]=h,e[37]=g,e[38]=$):$=e[38];let k;e[39]!==$||e[40]!==x||e[41]!==v||e[42]!==N||e[43]!==y?(k=(0,d.jsxs)("nav",{"aria-label":x,className:v,"data-testid":N,children:[y,$]}),e[39]=$,e[40]=x,e[41]=v,e[42]=N,e[43]=y,e[44]=k):k=e[44];let w;e[45]!==l||e[46]!==f?(w=l===void 0?(0,d.jsx)("div",{className:"lg:col-span-2"}):(0,d.jsxs)(Ct,{operation:l,children:[(0,d.jsx)("div",{className:"min-w-0 overflow-y-auto p-6","data-testid":"api-reference-main",children:(0,d.jsx)(At,{operation:l})}),(0,d.jsxs)("aside",{className:"flex min-w-0 flex-col gap-4 overflow-y-auto border-border p-4 lg:border-l","data-testid":"api-reference-aside",children:[(0,d.jsx)(Nt,{operation:l,server:f}),(0,d.jsx)(Ut,{})]})]},l.key),e[45]=l,e[46]=f,e[47]=w):w=e[47];let j;return e[48]!==k||e[49]!==w||e[50]!==b||e[51]!==I?(j=(0,d.jsxs)("div",{className:b,"data-testid":I,children:[k,w]}),e[48]=k,e[49]=w,e[50]=b,e[51]=I,e[52]=j):j=e[52],j},"wt");var H=K(re(),1);var Gt=["get","post","put","patch","delete","head","options","trace"],We=u(t=>t?.content?.["application/json"]?.schema,"y"),Qt=u((t,e)=>Object.entries(t.responses??{}).map(([a,r])=>{let n=r.$ref?.replace("#/components/responses/",""),s=n===void 0?r:e.components?.responses?.[n]??r;return{description:s.description,schema:We(s),status:a}}),"j"),Vt=u((t,e,a,r,n)=>{let s=We(r.requestBody),o=s?.properties?.functionPath?.const,i=typeof o=="string"?o:void 0,c=i===void 0?s:s?.properties?.args,m=r.operationId??`${a} ${e}`;return{argsSchema:c,description:r.description,functionPath:i,httpPath:e,key:t,kind:r["x-lunora-function-kind"],method:a.toUpperCase(),operationId:m,requestSchema:s,responses:Qt(r,n),summary:r.summary??m,tags:r.tags??[],title:r.summary??m}},"b"),Xt=u(t=>{let e=[];for(let[a,r]of Object.entries(t.paths??{})){let n=a.includes("#")?a.slice(0,a.indexOf("#")):a;for(let s of Gt){let o=r[s];o!==void 0&&e.push(Vt(a,n,s,o,t))}}return e},"x"),Yt=u(t=>{let e=t??{},a=Xt(e),r=new Map((e.tags??[]).map(i=>[i.name,i.description])),n=new Set,s=[],o=u(i=>{if(n.has(i))return;n.add(i);let c=a.filter(m=>(m.tags[0]??"")===i);c.length>0&&s.push({description:r.get(i),name:i,operations:c})},"l");for(let i of e.tags??[])o(i.name);for(let i of a)o(i.tags[0]??"");return{groups:s,operationByKey:new Map(a.map(i=>[i.key,i])),server:e.servers?.[0]?.url,title:e.info?.title??"API reference",version:e.info?.version}},"w"),Zt=u(t=>{let{paths:e}=t;return e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0},"R"),er=u(t=>{let e=t;return Zt(e)?{kind:"empty"}:{kind:"ready",spec:e}},"T"),Ue=u(t=>{let e=(0,De.c)(23),{spec:a}=t,r=J(),n=F(),s;e[0]!==n?(s=u(()=>n.fetchOpenApi(),"n"),e[0]=n,e[1]=s):s=e[1];let o=le(a,s,er),i;e[2]!==o.kind||e[3]!==o.spec?(i=o.kind==="ready"?Yt(o.spec):void 0,e[2]=o.kind,e[3]=o.spec,e[4]=i):i=e[4];let c=i;if(o.kind==="loading"){let l;return e[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,H.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"api-reference-loading",children:[(0,H.jsx)(V,{className:"h-8 w-48"}),(0,H.jsx)(V,{className:"h-64 w-full"})]}),e[5]=l):l=e[5],l}if(o.kind==="error"){let l;e[6]!==o.message||e[7]!==r?(l=r("Couldn't load the OpenAPI spec: {message}",{message:o.message}),e[6]=o.message,e[7]=r,e[8]=l):l=e[8];let p;e[9]!==r?(p=r("API reference unavailable"),e[9]=r,e[10]=p):p=e[10];let f;return e[11]!==l||e[12]!==p?(f=(0,H.jsx)(U,{description:l,testId:"api-reference-error",title:p}),e[11]=l,e[12]=p,e[13]=f):f=e[13],f}if(o.kind==="empty"||c===void 0){let l;e[14]!==r?(l=r("Run `lunora codegen` and wire `_generated/openapi.json` to the worker to render the API reference here."),e[14]=r,e[15]=l):l=e[15];let p;e[16]!==r?(p=r("No OpenAPI spec configured"),e[16]=r,e[17]=p):p=e[17];let f;return e[18]!==l||e[19]!==p?(f=(0,H.jsx)(U,{description:l,testId:"api-reference-empty",title:p}),e[18]=l,e[19]=p,e[20]=f):f=e[20],f}let m;return e[21]!==c?(m=(0,H.jsx)(pe,{model:c}),e[21]=c,e[22]=m):m=e[22],m},"H");var Fe=K(te(),1);var G=K(re(),1);var He=u(t=>(t.methods??[]).filter(e=>e["x-lunora-function-kind"]!=="stream"),"k"),tr=u(t=>(t.params??[]).find(e=>e.name==="args")??(t.params??[])[0],"w"),rr=u(t=>t["x-tags"]?.[0]?.name??(t.name.includes(":")?t.name.slice(0,t.name.indexOf(":")):""),"I"),ar=u(t=>{let e=tr(t)?.schema;return{argsSchema:e,description:t.description,functionPath:t.name,httpPath:"/_lunora/rpc",key:t.name,kind:t["x-lunora-function-kind"],method:"POST",operationId:t.name,requestSchema:e,responses:[{description:t.result?.name,schema:t.result?.schema,status:"200"}],summary:t.summary??t.name,tags:[rr(t)],title:t.summary??t.name}},"v"),nr=u(t=>{let e=t??{},a=He(e).map(n=>ar(n)),r=new Map;for(let n of a){let s=n.tags[0]??"",o=r.get(s)??[];o.push(n),r.set(s,o)}return{groups:[...r.entries()].map(([n,s])=>({name:n,operations:s.toSorted((o,i)=>o.operationId.localeCompare(i.operationId))})).toSorted((n,s)=>n.name.localeCompare(s.name)),operationByKey:new Map(a.map(n=>[n.key,n])),title:e.info?.title??"API reference",version:e.info?.version}},"C"),or=u(t=>He(t).length===0,"N"),sr=u(t=>{let e=t;return or(e)?{kind:"empty"}:{kind:"ready",spec:e}},"b"),Ge=u(t=>{let e=(0,Fe.c)(23),{spec:a}=t,r=J(),n=F(),s;e[0]!==n?(s=u(()=>n.fetchOpenRpc(),"a"),e[0]=n,e[1]=s):s=e[1];let o=le(a,s,sr),i;e[2]!==o.kind||e[3]!==o.spec?(i=o.kind==="ready"?nr(o.spec):void 0,e[2]=o.kind,e[3]=o.spec,e[4]=i):i=e[4];let c=i;if(o.kind==="loading"){let l;return e[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,G.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"openrpc-reference-loading",children:[(0,G.jsx)(V,{className:"h-8 w-48"}),(0,G.jsx)(V,{className:"h-64 w-full"})]}),e[5]=l):l=e[5],l}if(o.kind==="error"){let l;e[6]!==o.message||e[7]!==r?(l=r("Couldn't load the OpenRPC spec: {message}",{message:o.message}),e[6]=o.message,e[7]=r,e[8]=l):l=e[8];let p;e[9]!==r?(p=r("API reference unavailable"),e[9]=r,e[10]=p):p=e[10];let f;return e[11]!==l||e[12]!==p?(f=(0,G.jsx)(U,{description:l,testId:"openrpc-reference-error",title:p}),e[11]=l,e[12]=p,e[13]=f):f=e[13],f}if(o.kind==="empty"||c===void 0){let l;e[14]!==r?(l=r("Run `lunora codegen --api-spec openrpc` and wire `_generated/openrpc.json` to the worker to render the OpenRPC reference here."),e[14]=r,e[15]=l):l=e[15];let p;e[16]!==r?(p=r("No OpenRPC spec configured"),e[16]=r,e[17]=p):p=e[17];let f;return e[18]!==l||e[19]!==p?(f=(0,G.jsx)(U,{description:l,testId:"openrpc-reference-empty",title:p}),e[18]=l,e[19]=p,e[20]=f):f=e[20],f}let m;return e[21]!==c?(m=(0,G.jsx)(pe,{model:c}),e[21]=c,e[22]=m):m=e[22],m},"B");var B=K(re(),1);var ir=["reference","snippets"],lr=["openapi","openrpc"],Zr=u(t=>{let e=(0,Qe.c)(51),{functions:a,initialShardKey:r,openApiSpec:n,openRpcSpec:s}=t,o=J(),[i,c]=(0,xe.useState)("reference"),[m,l]=(0,xe.useState)("openapi"),p;e[0]!==o?(p=o("Reference"),e[0]=o,e[1]=p):p=e[1];let f;e[2]!==o?(f=o("Snippets"),e[2]=o,e[3]=f):f=e[3];let h;e[4]!==p||e[5]!==f?(h={reference:p,snippets:f},e[4]=p,e[5]=f,e[6]=h):h=e[6];let g=h,x;e[7]!==o?(x=o("OpenAPI"),e[7]=o,e[8]=x):x=e[8];let v;e[9]!==o?(v=o("OpenRPC"),e[9]=o,e[10]=v):v=e[10];let N;e[11]!==x||e[12]!==v?(N={openapi:x,openrpc:v},e[11]=x,e[12]=v,e[13]=N):N=e[13];let y=N,b;e[14]===Symbol.for("react.memo_cache_sentinel")?(b=u(E=>{c(E.currentTarget.dataset.view)},"S"),e[14]=b):b=e[14];let I=b,P;e[15]===Symbol.for("react.memo_cache_sentinel")?(P=u(E=>{l(E.currentTarget.dataset.format)},"A"),e[15]=P):P=e[15];let $=P,k;e[16]!==o?(k=o("API view"),e[16]=o,e[17]=k):k=e[17];let w;e[18]!==i||e[19]!==g?(w=ir.map(E=>(0,B.jsx)(W,{"aria-selected":i===E,"data-testid":`api-view-${E}`,"data-view":E,onClick:I,role:"tab",size:"sm",type:"button",variant:i===E?"default":"outline",children:g[E]},E)),e[18]=i,e[19]=g,e[20]=w):w=e[20];let j;e[21]!==w||e[22]!==k?(j=(0,B.jsx)("div",{"aria-label":k,className:"flex gap-1.5","data-testid":"api-view-toggle",role:"tablist",children:w}),e[21]=w,e[22]=k,e[23]=j):j=e[23];let O;e[24]!==m||e[25]!==y||e[26]!==o||e[27]!==i?(O=i==="reference"&&(0,B.jsx)("div",{"aria-label":o("API spec format"),className:"flex gap-1.5","data-testid":"api-format-toggle",role:"tablist",children:lr.map(E=>(0,B.jsx)(W,{"aria-selected":m===E,"data-format":E,"data-testid":`api-format-${E}`,onClick:$,role:"tab",size:"sm",type:"button",variant:m===E?"default":"outline",children:y[E]},E))}),e[24]=m,e[25]=y,e[26]=o,e[27]=i,e[28]=O):O=e[28];let S;e[29]!==j||e[30]!==O?(S=(0,B.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center gap-3 border-b border-border px-6 py-3",children:[j,O]}),e[29]=j,e[30]=O,e[31]=S):S=e[31];let C;e[32]!==a||e[33]!==r||e[34]!==i?(C=i==="snippets"&&(0,B.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto p-6",children:(0,B.jsx)(Ae,{functions:a,initialShardKey:r})}),e[32]=a,e[33]=r,e[34]=i,e[35]=C):C=e[35];let A;e[36]!==m||e[37]!==n||e[38]!==i?(A=i==="reference"&&m==="openapi"&&(0,B.jsx)(Ue,{spec:n}),e[36]=m,e[37]=n,e[38]=i,e[39]=A):A=e[39];let _;e[40]!==m||e[41]!==s||e[42]!==i?(_=i==="reference"&&m==="openrpc"&&(0,B.jsx)(Ge,{spec:s}),e[40]=m,e[41]=s,e[42]=i,e[43]=_):_=e[43];let T;e[44]!==C||e[45]!==A||e[46]!==_?(T=(0,B.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:[C,A,_]}),e[44]=C,e[45]=A,e[46]=_,e[47]=T):T=e[47];let L;return e[48]!==S||e[49]!==T?(L=(0,B.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col","data-testid":"lunora-api-tab",children:[S,T]}),e[48]=S,e[49]=T,e[50]=L):L=e[50],L},"k");export{Zr as default};
@@ -0,0 +1 @@
1
+ import{a as c,d as p,e as b,f as v}from"./chunk-I26MS5PJ.js";var h=p(v(),1),g=p(b(),1);var y=c((a="local")=>{try{return a==="local"?globalThis.localStorage:globalThis.sessionStorage}catch{return}},"d"),S=c(function(a,s="local"){try{let r=y(s)?.getItem(a)??void 0,t=r===void 0?[]:JSON.parse(r);return Array.isArray(t)?t:[]}catch{return[]}},"g"),I=c((a,s,r="local")=>{let t=y(r);if(t!==void 0)try{t.setItem(a,JSON.stringify(s))}catch{}},"I"),A=c((a,s="local")=>{try{y(s)?.removeItem(a)}catch{}},"A"),T=c(function(a,s){let r=(0,h.c)(10),t=s===void 0?"local":s,u;r[0]!==a||r[1]!==t?(u=c(()=>S(a,t),"i"),r[0]=a,r[1]=t,r[2]=u):u=r[2];let[n,f]=(0,g.useState)(u),i=(0,g.useRef)(`${t}:${a}`),e,l;r[3]!==a||r[4]!==t||r[5]!==n?(e=c(()=>{let m=`${t}:${a}`;if(i.current!==m){i.current=m,f(S(a,t));return}I(a,n,t)},"c"),l=[a,t,n],r[3]=a,r[4]=t,r[5]=n,r[6]=e,r[7]=l):(e=r[6],l=r[7]),(0,g.useEffect)(e,l);let o;return r[8]!==n?(o=[n,f],r[8]=n,r[9]=o):o=r[9],o},"J"),J=c(function(a,s,r){let t=(0,h.c)(6),u="local",[n,f]=T(a,u),i;t[0]!==s||t[1]!==f?(i=c(m=>{f($=>{let d=$[0]??s;return[typeof m=="function"?m(d):m]})},"a"),t[0]=s,t[1]=f,t[2]=i):i=t[2];let e=i,l=n[0]??s,o;return t[3]!==e||t[4]!==l?(o=[l,e],t[3]=e,t[4]=l,t[5]=o):o=t[5],o},"O"),O=c(a=>globalThis.crypto?.randomUUID?.()??`${a}-${globalThis.performance.now().toString(36)}`,"V");export{y as a,S as b,I as c,A as d,T as e,J as f,O as g};
@@ -0,0 +1 @@
1
+ import{a as u,d as g,f as b,g as j,i as h}from"./chunk-I26MS5PJ.js";var v=g(b(),1);var t=g(j(),1);var z=u(N=>{let e=(0,v.c)(19),{action:a,className:x,description:c,icon:m,testId:f,title:p}=N,s;e[0]!==x?(s=h("flex flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border px-6 py-14 text-center",x),e[0]=x,e[1]=s):s=e[1];let r;e[2]!==m?(r=m!==void 0&&(0,t.jsx)("span",{className:"flex size-10 items-center justify-center rounded-lg bg-muted text-muted-foreground [&_svg]:size-5",children:m}),e[2]=m,e[3]=r):r=e[3];let d;e[4]!==p?(d=(0,t.jsx)("p",{className:"text-sm font-medium text-foreground",children:p}),e[4]=p,e[5]=d):d=e[5];let l;e[6]!==c?(l=c!==void 0&&(0,t.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:c}),e[6]=c,e[7]=l):l=e[7];let o;e[8]!==d||e[9]!==l?(o=(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[d,l]}),e[8]=d,e[9]=l,e[10]=o):o=e[10];let i;e[11]!==a?(i=a!==void 0&&(0,t.jsx)("div",{className:"mt-1 flex items-center gap-2",children:a}),e[11]=a,e[12]=i):i=e[12];let n;return e[13]!==s||e[14]!==r||e[15]!==o||e[16]!==i||e[17]!==f?(n=(0,t.jsxs)("div",{className:s,"data-testid":f,children:[r,o,i]}),e[13]=s,e[14]=r,e[15]=o,e[16]=i,e[17]=f,e[18]=n):n=e[18],n},"y");export{z as a};
@@ -0,0 +1 @@
1
+ import{a as h}from"./chunk-5B2RTXBS.js";import{a as e}from"./chunk-I26MS5PJ.js";var m=e((i,o,s)=>h(i,t=>{o(t.height>0?t:{height:s,width:t.width})}),"s");export{m as a};
@@ -0,0 +1 @@
1
+ import{a as l,d as m,f as d,g as p,i}from"./chunk-I26MS5PJ.js";var n=m(d(),1);var c=m(p(),1);function f(r){let t=(0,n.c)(8),e,s;t[0]!==r?({className:e,...s}=r,t[0]=r,t[1]=e,t[2]=s):(e=t[1],s=t[2]);let a;t[3]!==e?(a=i("animate-pulse rounded-md bg-muted",e),t[3]=e,t[4]=a):a=t[4];let o;return t[5]!==s||t[6]!==a?(o=(0,c.jsx)("div",{"data-slot":"skeleton",className:a,...s}),t[5]=s,t[6]=a,t[7]=o):o=t[7],o}l(f,"p");export{f as a};
@@ -0,0 +1 @@
1
+ import{a as C}from"./chunk-7G4Z6Q7X.js";import"./chunk-3YXASVTP.js";import"./chunk-AUAECCXB.js";import{b as v}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{a as j}from"./chunk-ZJQIGWLG.js";import"./chunk-NCPW7WHO.js";import"./chunk-IRSSZXC3.js";import"./chunk-55UGUCQ6.js";import{a as g}from"./chunk-4ZEL6BYL.js";import{c as h}from"./chunk-DHGPCQ2F.js";import"./chunk-NCCORPSU.js";import"./chunk-QAQDMS6R.js";import"./chunk-M3QKMHAP.js";import{a as $}from"./chunk-RWVIV3U7.js";import{a as I,b as _,c as q,d as p,e as o,f as i}from"./chunk-HCTJKP5J.js";import{a as S,e as K}from"./chunk-2IKDEUCX.js";import{d as T,u as F}from"./chunk-74IYYDDI.js";import{a as d,d as k,e as ne,f as oe,g as ie}from"./chunk-I26MS5PJ.js";var Q=k(oe(),1),G=k(ne(),1);var e=k(ie(),1);var H="agent_threads",de="agent_messages",L="agent_run_queue",J=100,N=250,le={},ce={filters:[],limit:J,offset:0,orderBy:{column:"updatedAt",direction:"desc"},skipCount:!0,table:H},c=d((s,t)=>{let a=s[t];return typeof a=="string"?a:void 0},"c"),B=d((s,t)=>{let a=s[t];return typeof a=="number"?a:void 0},"E"),O=d(s=>{let{usage:t}=s;if(t===null||typeof t!="object")return;let{totalTokens:a}=t;return typeof a=="number"?a:void 0},"H"),me=d(s=>{let{toolCalls:t}=s;return Array.isArray(t)?t.map(a=>a!==null&&typeof a=="object"?a.name:void 0).filter(a=>typeof a=="string"):[]},"de"),ue=d(s=>{switch(s){case"awaiting_input":return"warning";case"cancelled":return"warning";case"error":return"destructive";case"running":return"info";default:return"outline"}},"le"),he=d(s=>{switch(s){case"approved":return"success";case"rejected":return"destructive";default:return"warning"}},"ie"),ge=d(s=>{let t=(0,Q.c)(3),{fetched:a}=s,m=T(),l;return t[0]!==a||t[1]!==m?(l=a<=N?null:(0,e.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"agents-messages-truncated",children:m("Showing the latest {count} messages; older ones are not shown.",{count:N})}),t[0]=a,t[1]=m,t[2]=l):l=t[2],l},"ce"),Te=d(({initialShardKey:s=""})=>{let t=T(),[a,m]=(0,G.useState)(void 0),{data:l}=h(g.listTables,le,{live:!0,shardKey:s}),V=l!==void 0,f=Array.isArray(l)&&l.some(r=>r.name===H),W=Array.isArray(l)&&l.some(r=>r.name===L),{data:E,error:X,errorSource:Y,liveError:Z}=h(g.readTablePage,ce,{enabled:f,live:!0,shardKey:s}),ee={filters:[{column:"threadKey",operator:"eq",value:a??""}],limit:N+1,offset:0,orderBy:{column:"seq",direction:"desc"},skipCount:!0,table:de},{data:P}=h(g.readTablePage,{limit:J,offset:0,orderBy:{column:"position",direction:"asc"},skipCount:!0,table:L},{enabled:W,live:!0,shardKey:s}),{data:U,error:te,errorSource:ae}=h(g.readTablePage,ee,{enabled:f&&a!==void 0,live:!0,shardKey:s}),b=Array.isArray(E?.rows)?E.rows:[],re=Array.isArray(P?.rows)?P.rows:[],z=d(r=>re.filter(n=>c(n,"threadKey")===r).length,"C"),M=Array.isArray(U?.rows)?U.rows:[],R=M.slice(0,N).toReversed(),D=b.find(r=>c(r,"key")===a),x;return V&&!f?x=(0,e.jsx)($,{description:t("No @lunora/agent tables found in this deployment. Add lunora/agents.ts with defineAgent(...) and merge the agent schema extension to run durable AI agents."),testId:"agents-unconfigured",title:t("No agents configured")}):f&&b.length===0?x=(0,e.jsx)($,{description:t("No agent has run yet. Start a run with ctx.agents.<name>.run(...) and its thread appears here."),testId:"agents-empty",title:t("No agent threads yet")}):x=(0,e.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,e.jsx)(S,{className:"overflow-hidden py-0",children:(0,e.jsx)(K,{className:"px-0",children:(0,e.jsxs)(I,{"data-testid":"agents-threads-table",children:[(0,e.jsx)(_,{children:(0,e.jsxs)(p,{children:[(0,e.jsx)(o,{children:t("Agent")}),(0,e.jsx)(o,{children:t("Key")}),(0,e.jsx)(o,{children:t("Status")}),(0,e.jsx)(o,{children:t("Queued")}),(0,e.jsx)(o,{children:t("Messages")}),(0,e.jsx)(o,{children:t("Tokens")}),(0,e.jsx)(o,{children:t("Updated")}),(0,e.jsx)(o,{"aria-label":t("Actions")})]})}),(0,e.jsx)(q,{children:b.map(r=>{let n=c(r,"key")??"",u=c(r,"status"),y=O(r);return(0,e.jsxs)(p,{"data-active":n===a?"":void 0,"data-testid":`agents-thread-${n}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs",children:c(r,"agent")??"\u2014"}),(0,e.jsx)(i,{className:"font-mono text-xs text-muted-foreground",children:n}),(0,e.jsx)(i,{children:(0,e.jsx)(v,{"data-testid":`agents-thread-status-${n}`,variant:ue(u),children:u??"\u2014"})}),(0,e.jsx)(i,{className:"tabular-nums",children:z(n)===0?(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"}):(0,e.jsx)(v,{"data-testid":`agents-thread-queued-${n}`,variant:"warning",children:z(n)})}),(0,e.jsx)(i,{className:"tabular-nums",children:B(r,"messageCount")??"\u2014"}),(0,e.jsx)(i,{className:"tabular-nums text-muted-foreground",children:y??"\u2014"}),(0,e.jsx)(i,{className:"text-muted-foreground tabular-nums",children:F(B(r,"updatedAt"),"\u2014")}),(0,e.jsx)(i,{className:"text-right",children:(0,e.jsx)(C,{"data-testid":`agents-thread-open-${n}`,onClick:d(()=>{m(n)},"onClick"),size:"sm",type:"button",variant:"outline",children:t("Timeline")})})]},n)})})]})})}),te!==null&&(0,e.jsx)(j,{error:ae,testId:"agents-messages-error"}),a!==void 0&&(0,e.jsx)(S,{className:"overflow-hidden py-0","data-testid":"agents-thread-detail",children:(0,e.jsxs)(K,{className:"flex flex-col gap-3 px-4 py-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsxs)("span",{className:"font-mono text-xs",children:[t("Timeline")," \xB7 ",a,D!==void 0&&(0,e.jsxs)("span",{className:"text-muted-foreground",children:[" \xB7 ",t("Usage"),": ",O(D)??0," ",t("Tokens")]})]}),(0,e.jsx)(C,{"data-testid":"agents-thread-detail-close",onClick:d(()=>{m(void 0)},"onClick"),size:"xs",type:"button",variant:"ghost",children:t("Close")})]}),(0,e.jsx)(ge,{fetched:M.length}),R.length===0?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:t("This thread has no messages yet.")}):(0,e.jsxs)(I,{"data-testid":"agents-messages-table",children:[(0,e.jsx)(_,{children:(0,e.jsxs)(p,{children:[(0,e.jsx)(o,{children:t("Role")}),(0,e.jsx)(o,{children:t("Content")}),(0,e.jsx)(o,{children:t("Tool")}),(0,e.jsx)(o,{children:t("Approval")})]})}),(0,e.jsx)(q,{children:R.map((r,n)=>{let u=c(r,"role")??"\u2014",y=me(r),se=c(r,"toolName"),w=c(r,"status"),A=B(r,"seq")??n;return(0,e.jsxs)(p,{"data-testid":`agents-message-${String(A)}`,children:[(0,e.jsx)(i,{className:"font-mono text-xs align-top text-muted-foreground",children:u}),(0,e.jsx)(i,{className:"max-w-md font-mono text-xs whitespace-pre-wrap break-words",children:c(r,"content")??"\u2014"}),(0,e.jsx)(i,{className:"font-mono text-xs align-top text-muted-foreground",children:se??(y.length>0?y.join(", "):"\u2014")}),(0,e.jsx)(i,{className:"align-top",children:w===void 0?(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:"\u2014"}):(0,e.jsx)(v,{"data-testid":`agents-message-approval-${String(A)}`,variant:he(w),children:w})})]},c(r,"messageKey")??`${u}:${String(A)}`)})})]})]})})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-agents-panel",children:[X!==null&&(0,e.jsx)(j,{error:Y,testId:"agents-error"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:t("Agents run as durable workflows. Each run persists a thread of assistant and tool messages; select a thread to inspect its timeline, tool calls, approvals, and token usage.")}),Z!==void 0&&(0,e.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-500","data-testid":"agents-live-error",role:"alert",children:t("Live updates unavailable; showing the last evaluation.")}),x]})},"Ee");export{Te as default};
@@ -0,0 +1 @@
1
+ import{a as s,b as m,e as V}from"./chunk-I26MS5PJ.js";var h=m(w=>{"use strict";var a=V();function z(e,u){return e===u&&(e!==0||1/e===1/u)||e!==e&&u!==u}s(z,"is");var I=typeof Object.is=="function"?Object.is:z,M=a.useState,_=a.useEffect,g=a.useLayoutEffect,G=a.useDebugValue;function L(e,u){var t=u(),i=M({inst:{value:t,getSnapshot:u}}),r=i[0].inst,n=i[1];return g(function(){r.value=t,r.getSnapshot=u,y(r)&&n({inst:r})},[e,t,u]),_(function(){return y(r)&&n({inst:r}),e(function(){y(r)&&n({inst:r})})},[e]),G(t),t}s(L,"useSyncExternalStore$2");function y(e){var u=e.getSnapshot;e=e.value;try{var t=u();return!I(e,t)}catch{return!0}}s(y,"checkIfSnapshotChanged");function $(e,u){return u()}s($,"useSyncExternalStore$1");var k=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?$:L;w.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:k});var O=m((T,D)=>{"use strict";D.exports=h()});var N=m(R=>{"use strict";var E=V(),C=O();function U(e,u){return e===u&&(e!==0||1/e===1/u)||e!==e&&u!==u}s(U,"is");var W=typeof Object.is=="function"?Object.is:U,A=C.useSyncExternalStore,B=E.useRef,F=E.useEffect,H=E.useMemo,J=E.useDebugValue;R.useSyncExternalStoreWithSelector=function(e,u,t,i,r){var n=B(null);if(n.current===null){var c={hasValue:!1,value:null};n.current=c}else c=n.current;n=H(function(){function j(o){if(!S){if(S=!0,v=o,o=i(o),r!==void 0&&c.hasValue){var f=c.value;if(r(f,o))return d=f}return d=o}if(f=d,W(v,o))return f;var p=i(o);return r!==void 0&&r(f,p)?(v=o,f):(v=o,d=p)}s(j,"memoizedSelector");var S=!1,v,d,b=t===void 0?null:t;return[function(){return j(u())},b===null?void 0:function(){return j(b())}]},[u,t,i,r]);var l=A(e,n[0],n[1]);return F(function(){c.hasValue=!0,c.value=l},[l]),J(l),l}});var K=m((Z,q)=>{"use strict";q.exports=N()});export{O as a,K as b};