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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (387) hide show
  1. package/dist/index.d.ts +15 -2
  2. package/dist/index.js +1 -1
  3. package/dist/mount.js +1 -1
  4. package/dist/packem_chunks/AdvisorHealthPanel.js +1 -1
  5. package/dist/packem_chunks/ApiTab.js +1 -1
  6. package/dist/packem_chunks/AuditPanel.js +1 -1
  7. package/dist/packem_chunks/DeploymentHealthPanel.js +1 -1
  8. package/dist/packem_chunks/ExportImportPanel.js +3 -3
  9. package/dist/packem_chunks/FileBrowser.js +4 -4
  10. package/dist/packem_chunks/FunctionRunner.js +1 -1
  11. package/dist/packem_chunks/FunctionStatsPanel.js +1 -1
  12. package/dist/packem_chunks/HealthPanel.js +1 -1
  13. package/dist/packem_chunks/InsightsPanel.js +1 -1
  14. package/dist/packem_chunks/LogsPanel.js +1 -1
  15. package/dist/packem_chunks/MailPanel.js +1 -1
  16. package/dist/packem_chunks/MetricsPanel.js +1 -1
  17. package/dist/packem_chunks/NotificationsPanel.js +1 -1
  18. package/dist/packem_chunks/PitrPanel.js +1 -1
  19. package/dist/packem_chunks/SchemaViewer.js +1 -1
  20. package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -1
  21. package/dist/packem_chunks/SettingsPanel.js +1 -1
  22. package/dist/packem_chunks/SqlEditorPanel.js +6 -6
  23. package/dist/packem_chunks/TableEditor.js +1 -1
  24. package/dist/packem_chunks/agents-panel.js +1 -1
  25. package/dist/packem_chunks/analytics-panel.js +1 -1
  26. package/dist/packem_chunks/auth-audit-panel.js +1 -1
  27. package/dist/packem_chunks/auth-config-panel.js +1 -1
  28. package/dist/packem_chunks/auth-sessions-panel.js +1 -1
  29. package/dist/packem_chunks/containers-panel.js +1 -1
  30. package/dist/packem_chunks/dashboards-panel.js +1 -1
  31. package/dist/packem_chunks/evals-panel.js +1 -1
  32. package/dist/packem_chunks/fanout-panel.js +1 -1
  33. package/dist/packem_chunks/flags-panel.js +1 -1
  34. package/dist/packem_chunks/issues-panel.js +1 -1
  35. package/dist/packem_chunks/kv-browser.js +1 -1
  36. package/dist/packem_chunks/log-drains-panel.js +4 -4
  37. package/dist/packem_chunks/migrations-route.js +1 -1
  38. package/dist/packem_chunks/organizations-panel.js +1 -1
  39. package/dist/packem_chunks/payments-panel.js +1 -1
  40. package/dist/packem_chunks/permissions-panel.js +1 -1
  41. package/dist/packem_chunks/queues-panel.js +1 -1
  42. package/dist/packem_chunks/rls-panel.js +1 -1
  43. package/dist/packem_chunks/schedule-panel.js +1 -1
  44. package/dist/packem_chunks/sparkline.js +1 -1
  45. package/dist/packem_chunks/storage-rules-panel.js +1 -1
  46. package/dist/packem_chunks/subscriptions-panel.js +1 -1
  47. package/dist/packem_chunks/sync-client-panel.js +1 -1
  48. package/dist/packem_chunks/traces-panel.js +1 -1
  49. package/dist/packem_chunks/users-panel.js +1 -1
  50. package/dist/packem_chunks/vector-browser.js +1 -1
  51. package/dist/packem_chunks/workflows-panel.js +1 -1
  52. package/dist/packem_shared/ApiDocsPanel-BQ79UVEg.js +2 -0
  53. package/dist/packem_shared/ApiReferencePanel-CkCFMCBb.js +1 -0
  54. package/dist/packem_shared/CommandPalette-B5yLEABs.js +1 -0
  55. package/dist/packem_shared/ConfirmButton-Cj2SOapE.js +1 -0
  56. package/dist/packem_shared/ConnectionBadge-Bh16X9-u.js +1 -0
  57. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-DuULO4XM.js +1 -0
  58. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-1Lrg55IV.js +1 -0
  59. package/dist/packem_shared/DEFAULT_LOCALE-A1Yg5ORA.js +1 -0
  60. package/dist/packem_shared/DataBrowser-BnDIFN-S.js +1 -0
  61. package/dist/packem_shared/DataFilters-3nbW0uax.js +1 -0
  62. package/dist/packem_shared/ErrorBoundary-BWNF98VF.js +1 -0
  63. package/dist/packem_shared/GlobalDataBrowser-DusjXzRF.js +1 -0
  64. package/dist/packem_shared/HomePanel-BcaHVBJh.js +1 -0
  65. package/dist/packem_shared/MigrationsPanel-CCOENX4X.js +1 -0
  66. package/dist/packem_shared/OpenRpcReferencePanel-21OWMH45.js +1 -0
  67. package/dist/packem_shared/ScheduledJobs-CiO3eXgI.js +1 -0
  68. package/dist/packem_shared/ShardInput-XumEzeT0.js +1 -0
  69. package/dist/packem_shared/Studio-CHmLCjBR.js +1 -0
  70. package/dist/packem_shared/StudioApp-DCdbsciH.js +1 -0
  71. package/dist/packem_shared/StudioI18nProvider-Bl547evf.js +1 -0
  72. package/dist/packem_shared/advisor-view-C1KFTXSH.js +1 -0
  73. package/dist/packem_shared/aggregateMetrics-A-Y7OH6R.js +1 -0
  74. package/dist/packem_shared/alert-C2SEhYS9.js +1 -0
  75. package/dist/packem_shared/{badge-BbuuAio7.js → badge-cAk9Di1Q.js} +1 -1
  76. package/dist/packem_shared/bar-chart-CCyO67Uf.js +6 -0
  77. package/dist/packem_shared/browser-storage-Br_bLeBt.js +1 -0
  78. package/dist/packem_shared/{button-BkCrNcAs.js → button-BOPLD1un.js} +1 -1
  79. package/dist/packem_shared/card-BGlQzQY-.js +1 -0
  80. package/dist/packem_shared/cf-links-CBJ5SywP.js +1 -0
  81. package/dist/packem_shared/{checkbox-StT4Gob6.js → checkbox-C5w53W-E.js} +1 -1
  82. package/dist/packem_shared/data-grid-BFTQnkXq.js +1 -0
  83. package/dist/packem_shared/data-view-params-qoSTqjAj.js +1 -0
  84. package/dist/packem_shared/dropdown-menu-D_ewqsUU.js +2 -0
  85. package/dist/packem_shared/empty-state-B939z6K2.js +1 -0
  86. package/dist/packem_shared/error-alert-TYdKetJd.js +1 -0
  87. package/dist/packem_shared/grid-features-C_yXlMc_.js +6 -0
  88. package/dist/packem_shared/home-panel-BiJHXeDC.js +3 -0
  89. package/dist/packem_shared/input-CY5W3wzv.js +1 -0
  90. package/dist/packem_shared/internal-CwaF9YNk.js +2 -0
  91. package/dist/packem_shared/label-BOUo-DP0.js +1 -0
  92. package/dist/packem_shared/live-status-Bf7rR8o8.js +1 -0
  93. package/dist/packem_shared/{log-fields-CoL3hsIQ.js → log-fields-SBxKyBug.js} +1 -1
  94. package/dist/packem_shared/log-line-UnE93Ovi.js +1 -0
  95. package/dist/packem_shared/modal-shell-wGW4CKEW.js +1 -0
  96. package/dist/packem_shared/operation-console-provider-DoloEvon.js +1 -0
  97. package/dist/packem_shared/recording-client-CKn4-vUx.js +1 -0
  98. package/dist/packem_shared/reference-view-CUIDzLf0.js +12 -0
  99. package/dist/packem_shared/result-chart-Ca3YLzt8.js +1 -0
  100. package/dist/packem_shared/schema-diagram-DHD13TjS.js +2 -0
  101. package/dist/packem_shared/scroll-area-DSJftwu_.js +2 -0
  102. package/dist/packem_shared/select-BPISLTcv.js +2 -0
  103. package/dist/packem_shared/shard-history-QcjcMnCA.js +1 -0
  104. package/dist/packem_shared/skeleton-DFBBaJU6.js +1 -0
  105. package/dist/packem_shared/sparkline-BreIqzDO.js +1 -0
  106. package/dist/packem_shared/stat-card-B9uIvAHg.js +1 -0
  107. package/dist/packem_shared/{storage-tier-DznqOf-q.js → storage-tier-C2mKwYRj.js} +1 -1
  108. package/dist/packem_shared/studio-B3eEcBK0.js +2 -0
  109. package/dist/packem_shared/table-BMsuYFhk.js +2 -0
  110. package/dist/packem_shared/table-list-sidebar-Bluzd1_2.js +1 -0
  111. package/dist/packem_shared/textarea-DpO3i-Qo.js +1 -0
  112. package/dist/packem_shared/{trace-handoff-Dw7mwjxu.js → trace-handoff-C0CFV2ix.js} +1 -1
  113. package/dist/packem_shared/use-admin-query-P0RJrjsD.js +1 -0
  114. package/dist/packem_shared/use-async-submit-DdLd0MdK.js +1 -0
  115. package/dist/packem_shared/use-auth-config-z3KRWAqD.js +1 -0
  116. package/dist/packem_shared/use-open-trace-4tIa0SXZ.js +1 -0
  117. package/dist/packem_shared/use-shard-key-BsP3o5wT.js +1 -0
  118. package/dist/packem_shared/use-sql-assistant-CP90nLLh.js +1 -0
  119. package/dist/packem_shared/useDebounced-DVeQ5-oW.js +1 -0
  120. package/dist/packem_shared/virtual-rect-D_j7aLxX.js +1 -0
  121. package/dist/packem_shared/wire-codec-Dl3VeNrd.js +1 -0
  122. package/dist/standalone/chunk-25OIGX2A.js +1 -0
  123. package/dist/standalone/{chunk-OBMNLQWG.js → chunk-26VREVWU.js} +1 -1
  124. package/dist/standalone/chunk-2BDM6HNL.js +1 -0
  125. package/dist/standalone/{chunk-6WB63KTN.js → chunk-2DC6F7NH.js} +1 -1
  126. package/dist/standalone/chunk-3F5I435D.js +1 -0
  127. package/dist/standalone/{chunk-RJS7UD5U.js → chunk-3QB5JI32.js} +1 -1
  128. package/dist/standalone/chunk-3RYEUXY2.js +1 -0
  129. package/dist/standalone/chunk-44WNSIGQ.js +1 -0
  130. package/dist/standalone/chunk-45YWYMD5.js +1 -0
  131. package/dist/standalone/chunk-4MAJFNON.js +1 -0
  132. package/dist/standalone/chunk-4YTSKL4R.js +1 -0
  133. package/dist/standalone/chunk-57VX76PR.js +1 -0
  134. package/dist/standalone/chunk-5JLIP2HH.js +1 -0
  135. package/dist/standalone/chunk-5NRQIDQA.js +1 -0
  136. package/dist/standalone/{chunk-2ZG23BA5.js → chunk-5T7KRUPX.js} +1 -1
  137. package/dist/standalone/chunk-6FWN26RH.js +1 -0
  138. package/dist/standalone/chunk-6JGXSMKV.js +1 -0
  139. package/dist/standalone/{chunk-HX7IXD7I.js → chunk-6NJAHOGO.js} +1 -1
  140. package/dist/standalone/chunk-6SAAMM4S.js +1 -0
  141. package/dist/standalone/{chunk-IUYFXK4X.js → chunk-6ZPTNC34.js} +6 -6
  142. package/dist/standalone/chunk-74ASA4WU.js +1 -0
  143. package/dist/standalone/{chunk-6ST5ECQA.js → chunk-7PIHTTND.js} +1 -1
  144. package/dist/standalone/{chunk-GMR677FL.js → chunk-7SROZWKL.js} +1 -1
  145. package/dist/standalone/chunk-AECDJKXB.js +1 -0
  146. package/dist/standalone/{chunk-2PJNAWB3.js → chunk-AFKLFS74.js} +1 -1
  147. package/dist/standalone/chunk-AOAJGSYZ.js +2 -0
  148. package/dist/standalone/chunk-AOE75NAT.js +1 -0
  149. package/dist/standalone/{chunk-HFRJMPXJ.js → chunk-APRVSWBH.js} +27 -27
  150. package/dist/standalone/{chunk-LWE6NWQX.js → chunk-BELLXCN7.js} +1 -1
  151. package/dist/standalone/chunk-BORG7WUC.js +1 -0
  152. package/dist/standalone/{chunk-AVAC26HJ.js → chunk-BQK2C2Z4.js} +1 -1
  153. package/dist/standalone/chunk-BRHTM6FU.js +1 -0
  154. package/dist/standalone/{chunk-MWIKAR7F.js → chunk-BWEXJENB.js} +1 -1
  155. package/dist/standalone/chunk-C5E5PLJT.js +4 -0
  156. package/dist/standalone/chunk-C7E4I7JZ.js +1 -0
  157. package/dist/standalone/{chunk-QWGT25SE.js → chunk-CAOUXOL7.js} +1 -1
  158. package/dist/standalone/chunk-CEPMQS24.js +6 -0
  159. package/dist/standalone/chunk-CKTKI4IY.js +1 -0
  160. package/dist/standalone/{chunk-IC4L6G56.js → chunk-CN2AINNY.js} +1 -1
  161. package/dist/standalone/chunk-CP4ZFBVW.js +1 -0
  162. package/dist/standalone/chunk-CYX3OHJ3.js +1 -0
  163. package/dist/standalone/{chunk-7P7NURTD.js → chunk-D7DUQS2Y.js} +1 -1
  164. package/dist/standalone/{chunk-QBWRC5YX.js → chunk-DKSLOJDQ.js} +1 -1
  165. package/dist/standalone/chunk-DL3UOEWN.js +1 -0
  166. package/dist/standalone/chunk-DPNEFSEC.js +1 -0
  167. package/dist/standalone/{chunk-BGBLQ563.js → chunk-DUDQV6XJ.js} +1 -1
  168. package/dist/standalone/chunk-EDHW2EEG.js +1 -0
  169. package/dist/standalone/chunk-EYGF6TQS.js +1 -0
  170. package/dist/standalone/chunk-F7JOSNAT.js +1 -0
  171. package/dist/standalone/{chunk-7QOXFLZB.js → chunk-FBAZHG35.js} +1 -1
  172. package/dist/standalone/chunk-FLCK2WWQ.js +1 -0
  173. package/dist/standalone/chunk-FSWPREH3.js +1 -0
  174. package/dist/standalone/{chunk-ZCNMXKF2.js → chunk-GIRZD3UB.js} +2 -2
  175. package/dist/standalone/chunk-GZMBMNL3.js +6 -0
  176. package/dist/standalone/chunk-HPX3IM45.js +13 -0
  177. package/dist/standalone/{chunk-KUVMORDQ.js → chunk-INBA3473.js} +1 -1
  178. package/dist/standalone/{chunk-T6VMSOBB.js → chunk-INQICZYC.js} +1 -1
  179. package/dist/standalone/chunk-IWNVQHF7.js +1 -0
  180. package/dist/standalone/chunk-IWOZGUI2.js +1 -0
  181. package/dist/standalone/chunk-IYWVSMAY.js +1 -0
  182. package/dist/standalone/chunk-JURAVSE7.js +1 -0
  183. package/dist/standalone/chunk-JUWOEHDD.js +1 -0
  184. package/dist/standalone/{chunk-4UOFSGUS.js → chunk-JV7KTJPY.js} +1 -1
  185. package/dist/standalone/{chunk-XVD7HWY7.js → chunk-JVAYDDMK.js} +1 -1
  186. package/dist/standalone/chunk-KEKIGANB.js +1 -0
  187. package/dist/standalone/chunk-KFZ37KQP.js +1 -0
  188. package/dist/standalone/chunk-KQIHXYE6.js +1 -0
  189. package/dist/standalone/chunk-L4EZAHCD.js +1 -0
  190. package/dist/standalone/chunk-L7CJ5PGH.js +1 -0
  191. package/dist/standalone/{chunk-5MJ3G4DY.js → chunk-LT4XQDD2.js} +1 -1
  192. package/dist/standalone/chunk-M3NNNOD5.js +1 -0
  193. package/dist/standalone/chunk-MBEIKVJH.js +1 -0
  194. package/dist/standalone/chunk-MCLM2QJI.js +1 -0
  195. package/dist/standalone/chunk-METRMDIQ.js +1 -0
  196. package/dist/standalone/{chunk-OKQ3NJOW.js → chunk-MGC6PRMV.js} +1 -1
  197. package/dist/standalone/chunk-MOUI44OT.js +1 -0
  198. package/dist/standalone/{chunk-DRR3KV5L.js → chunk-MSFUDXBA.js} +1 -1
  199. package/dist/standalone/chunk-NIX2QSSN.js +1 -0
  200. package/dist/standalone/chunk-NXXGISFB.js +1 -0
  201. package/dist/standalone/{chunk-SBZXUGZ7.js → chunk-OE4KGVJW.js} +4 -4
  202. package/dist/standalone/chunk-OG57FC7W.js +1 -0
  203. package/dist/standalone/chunk-OLQWBGKT.js +1 -0
  204. package/dist/standalone/{chunk-F2I4JLFR.js → chunk-OOBJFXYB.js} +1 -1
  205. package/dist/standalone/chunk-P52BY657.js +1 -0
  206. package/dist/standalone/chunk-PHHMPYEP.js +1 -0
  207. package/dist/standalone/{chunk-6KWKX3RH.js → chunk-PJDKRUWT.js} +1 -1
  208. package/dist/standalone/chunk-PZ4QDWTI.js +1 -0
  209. package/dist/standalone/chunk-QZ55OWAB.js +4 -0
  210. package/dist/standalone/chunk-R5ZTCHCE.js +1 -0
  211. package/dist/standalone/chunk-RBUVNO22.js +1 -0
  212. package/dist/standalone/{chunk-XBDKZZ67.js → chunk-RCZTUWG3.js} +1 -1
  213. package/dist/standalone/chunk-S77D4SHR.js +1 -0
  214. package/dist/standalone/chunk-SL5R7WBN.js +1 -0
  215. package/dist/standalone/chunk-SMKRXJUC.js +1 -0
  216. package/dist/standalone/{chunk-THIXMMZD.js → chunk-SPDZUX4P.js} +1 -1
  217. package/dist/standalone/chunk-T2LDA6WP.js +1 -0
  218. package/dist/standalone/{chunk-5UY7MLRC.js → chunk-T6HLABZW.js} +1 -1
  219. package/dist/standalone/{chunk-BDHAGUAY.js → chunk-TBXK3FKP.js} +4 -4
  220. package/dist/standalone/{chunk-7QIFDWQV.js → chunk-TFMQSCGC.js} +1 -1
  221. package/dist/standalone/chunk-TLPWZ5NI.js +3 -0
  222. package/dist/standalone/chunk-TNKECJW4.js +1 -0
  223. package/dist/standalone/{chunk-XQCVZAGU.js → chunk-UANVABQG.js} +1 -1
  224. package/dist/standalone/chunk-UIF57LBO.js +1 -0
  225. package/dist/standalone/chunk-V6QPVFDL.js +1 -0
  226. package/dist/standalone/chunk-VNTEQQPP.js +1 -0
  227. package/dist/standalone/chunk-VR3UJA7B.js +1 -0
  228. package/dist/standalone/{chunk-5DVJR52Z.js → chunk-VYW2PAWC.js} +3 -3
  229. package/dist/standalone/chunk-VZCS5GXZ.js +1 -0
  230. package/dist/standalone/{chunk-XYV7TMYI.js → chunk-WHRG6S5P.js} +1 -1
  231. package/dist/standalone/{chunk-CKG2DTZ2.js → chunk-WIG3HCUJ.js} +1 -1
  232. package/dist/standalone/chunk-WUW4ZHRL.js +1 -0
  233. package/dist/standalone/chunk-X6Q5DWLZ.js +1 -0
  234. package/dist/standalone/{chunk-Z2IF3TEX.js → chunk-XGIG4EDG.js} +4 -4
  235. package/dist/standalone/chunk-XJSWM47N.js +1 -0
  236. package/dist/standalone/chunk-XQS7KSHL.js +1 -0
  237. package/dist/standalone/chunk-YS7HEZC2.js +1 -0
  238. package/dist/standalone/chunk-YUWMB6EV.js +1 -0
  239. package/dist/standalone/{chunk-TMGHRD6W.js → chunk-ZPGNTTQ3.js} +1 -1
  240. package/dist/standalone/chunk-ZQLIKKIY.js +1 -0
  241. package/dist/standalone/chunk-ZSOLGJFC.js +1 -0
  242. package/dist/standalone/studio.js +6 -6
  243. package/package.json +9 -9
  244. package/dist/packem_shared/ApiDocsPanel-Cu_QmzO0.js +0 -2
  245. package/dist/packem_shared/ApiReferencePanel-DuIU1P8B.js +0 -1
  246. package/dist/packem_shared/CommandPalette-mPR8-vIm.js +0 -1
  247. package/dist/packem_shared/ConfirmButton-CTL3f3kr.js +0 -1
  248. package/dist/packem_shared/ConnectionBadge-DOk0CQWo.js +0 -1
  249. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-BCC8_4BQ.js +0 -1
  250. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-B-hcFVoi.js +0 -1
  251. package/dist/packem_shared/DEFAULT_LOCALE-BZ4NojpD.js +0 -1
  252. package/dist/packem_shared/DataBrowser-CPNKM0KZ.js +0 -1
  253. package/dist/packem_shared/DataFilters-B26ZeqBZ.js +0 -1
  254. package/dist/packem_shared/ErrorBoundary-DvzYskH7.js +0 -1
  255. package/dist/packem_shared/GlobalDataBrowser-BSmyOO0n.js +0 -1
  256. package/dist/packem_shared/HomePanel-BUO6BcYQ.js +0 -1
  257. package/dist/packem_shared/MigrationsPanel-BAnvY79E.js +0 -1
  258. package/dist/packem_shared/OpenRpcReferencePanel-DXeffPFr.js +0 -1
  259. package/dist/packem_shared/ScheduledJobs-pHVlh2xU.js +0 -1
  260. package/dist/packem_shared/ShardInput-BVn2iCU0.js +0 -1
  261. package/dist/packem_shared/Studio-CD66AkL1.js +0 -1
  262. package/dist/packem_shared/StudioApp-0Vaayv2I.js +0 -1
  263. package/dist/packem_shared/StudioI18nProvider-CZ5h4nrV.js +0 -1
  264. package/dist/packem_shared/advisor-view-CGcwvlMo.js +0 -1
  265. package/dist/packem_shared/aggregateMetrics-BNfajLa2.js +0 -1
  266. package/dist/packem_shared/alert-CVcOFuDR.js +0 -1
  267. package/dist/packem_shared/bar-chart-B8oDHgnw.js +0 -6
  268. package/dist/packem_shared/browser-storage-xjTyMKY0.js +0 -1
  269. package/dist/packem_shared/card-BMKx5UdA.js +0 -1
  270. package/dist/packem_shared/cf-links-Dmg86v1D.js +0 -1
  271. package/dist/packem_shared/data-grid-Ci4-tZkk.js +0 -1
  272. package/dist/packem_shared/data-view-params-ClrV7XgF.js +0 -1
  273. package/dist/packem_shared/dropdown-menu-BgS2zw1i.js +0 -2
  274. package/dist/packem_shared/empty-state-Cg7t_8qu.js +0 -1
  275. package/dist/packem_shared/error-alert-_2q2VtVG.js +0 -1
  276. package/dist/packem_shared/grid-features-Y2YSjhCf.js +0 -6
  277. package/dist/packem_shared/home-panel-Ir3YHReO.js +0 -3
  278. package/dist/packem_shared/input-JHu63lTv.js +0 -1
  279. package/dist/packem_shared/internal-zkEvTqy8.js +0 -2
  280. package/dist/packem_shared/label-6uP1obNF.js +0 -1
  281. package/dist/packem_shared/live-status-CmuRLFKf.js +0 -1
  282. package/dist/packem_shared/log-line-BDI826X-.js +0 -1
  283. package/dist/packem_shared/modal-shell-CUwwWC2o.js +0 -1
  284. package/dist/packem_shared/operation-console-provider-BMJNtiyB.js +0 -1
  285. package/dist/packem_shared/recording-client-DtUxwVNY.js +0 -1
  286. package/dist/packem_shared/reference-view-DncEStdm.js +0 -12
  287. package/dist/packem_shared/result-chart-0VgP_3FP.js +0 -1
  288. package/dist/packem_shared/schema-diagram-GVgnLWTf.js +0 -2
  289. package/dist/packem_shared/scroll-area-DTEq6Jec.js +0 -2
  290. package/dist/packem_shared/select-BssZMiFY.js +0 -2
  291. package/dist/packem_shared/shard-history-DMEW5VBE.js +0 -1
  292. package/dist/packem_shared/skeleton-C1wQ9M5t.js +0 -1
  293. package/dist/packem_shared/sparkline-BNvxiJj_.js +0 -1
  294. package/dist/packem_shared/stat-card-BGJdhfm6.js +0 -1
  295. package/dist/packem_shared/studio-CUXq5VSB.js +0 -2
  296. package/dist/packem_shared/table-DZAB8cs3.js +0 -2
  297. package/dist/packem_shared/table-list-sidebar-fz0m_4I4.js +0 -1
  298. package/dist/packem_shared/textarea-Bu2-jKAs.js +0 -1
  299. package/dist/packem_shared/use-admin-query-CnnyWJXM.js +0 -1
  300. package/dist/packem_shared/use-async-submit-B32whHJO.js +0 -1
  301. package/dist/packem_shared/use-auth-config-0EnNCdLu.js +0 -1
  302. package/dist/packem_shared/use-open-trace-CniEgUdp.js +0 -1
  303. package/dist/packem_shared/use-shard-key-B2JtNa5m.js +0 -1
  304. package/dist/packem_shared/use-sql-assistant-Dtw55kKM.js +0 -1
  305. package/dist/packem_shared/useDebounced-CU-uftxO.js +0 -1
  306. package/dist/packem_shared/virtual-rect-1o1veP7R.js +0 -1
  307. package/dist/packem_shared/wire-codec-DkrdsFXO.js +0 -1
  308. package/dist/standalone/chunk-25IDU7IW.js +0 -1
  309. package/dist/standalone/chunk-2OUPA2WJ.js +0 -1
  310. package/dist/standalone/chunk-2QSHLBCO.js +0 -1
  311. package/dist/standalone/chunk-3C3CG7ZK.js +0 -1
  312. package/dist/standalone/chunk-3CWGJYBB.js +0 -1
  313. package/dist/standalone/chunk-3DH35OZ5.js +0 -1
  314. package/dist/standalone/chunk-3SCGCJYS.js +0 -1
  315. package/dist/standalone/chunk-3XIESWL4.js +0 -1
  316. package/dist/standalone/chunk-54MMVNPT.js +0 -1
  317. package/dist/standalone/chunk-5RIKPDDA.js +0 -1
  318. package/dist/standalone/chunk-5Y3QLNWX.js +0 -1
  319. package/dist/standalone/chunk-63D4ABMW.js +0 -1
  320. package/dist/standalone/chunk-6QBOXH2I.js +0 -1
  321. package/dist/standalone/chunk-7CZI2HNL.js +0 -1
  322. package/dist/standalone/chunk-7T7UOTYK.js +0 -1
  323. package/dist/standalone/chunk-7UP7OQJG.js +0 -1
  324. package/dist/standalone/chunk-AXQU7ULF.js +0 -1
  325. package/dist/standalone/chunk-BCOT3QRZ.js +0 -1
  326. package/dist/standalone/chunk-BG5ELOW6.js +0 -1
  327. package/dist/standalone/chunk-BXJPPINU.js +0 -1
  328. package/dist/standalone/chunk-BZDIRP7L.js +0 -1
  329. package/dist/standalone/chunk-C3YACIEE.js +0 -1
  330. package/dist/standalone/chunk-CAOA5AM4.js +0 -1
  331. package/dist/standalone/chunk-CFPZYHPY.js +0 -2
  332. package/dist/standalone/chunk-CZZWYUTR.js +0 -1
  333. package/dist/standalone/chunk-DJZYD5I5.js +0 -1
  334. package/dist/standalone/chunk-DNEIBTLL.js +0 -1
  335. package/dist/standalone/chunk-EF5J67J3.js +0 -1
  336. package/dist/standalone/chunk-EJWTF334.js +0 -1
  337. package/dist/standalone/chunk-EP4JQH5X.js +0 -1
  338. package/dist/standalone/chunk-ESVP44Y3.js +0 -1
  339. package/dist/standalone/chunk-EXL35M7T.js +0 -1
  340. package/dist/standalone/chunk-F3J6ER2V.js +0 -13
  341. package/dist/standalone/chunk-FURI47Z2.js +0 -1
  342. package/dist/standalone/chunk-FZ2N52BV.js +0 -1
  343. package/dist/standalone/chunk-GG6PIGQO.js +0 -1
  344. package/dist/standalone/chunk-GRL5MG3Z.js +0 -1
  345. package/dist/standalone/chunk-HBSEWNIR.js +0 -1
  346. package/dist/standalone/chunk-HLENOQDN.js +0 -1
  347. package/dist/standalone/chunk-HPFLBYRI.js +0 -1
  348. package/dist/standalone/chunk-HUF7RMS3.js +0 -1
  349. package/dist/standalone/chunk-I6A5C46N.js +0 -1
  350. package/dist/standalone/chunk-IBPWTHHW.js +0 -1
  351. package/dist/standalone/chunk-IGCNMZSB.js +0 -1
  352. package/dist/standalone/chunk-IVFHIQOT.js +0 -1
  353. package/dist/standalone/chunk-KZRWBSYQ.js +0 -1
  354. package/dist/standalone/chunk-LEDWUPXM.js +0 -1
  355. package/dist/standalone/chunk-MLT5MMMY.js +0 -1
  356. package/dist/standalone/chunk-OENUM3OW.js +0 -1
  357. package/dist/standalone/chunk-QLQADHFE.js +0 -1
  358. package/dist/standalone/chunk-RA5DW5MU.js +0 -1
  359. package/dist/standalone/chunk-RFSPHFKM.js +0 -1
  360. package/dist/standalone/chunk-RMN2JN4S.js +0 -1
  361. package/dist/standalone/chunk-S23KCFVU.js +0 -1
  362. package/dist/standalone/chunk-S4665UG5.js +0 -4
  363. package/dist/standalone/chunk-SD4BERSA.js +0 -1
  364. package/dist/standalone/chunk-SFDOII3B.js +0 -1
  365. package/dist/standalone/chunk-SMIESS7P.js +0 -1
  366. package/dist/standalone/chunk-SY6ANTKE.js +0 -1
  367. package/dist/standalone/chunk-TCV7MMYR.js +0 -1
  368. package/dist/standalone/chunk-UFESYXCE.js +0 -6
  369. package/dist/standalone/chunk-UKI2ZYB2.js +0 -1
  370. package/dist/standalone/chunk-UTK6JUTY.js +0 -1
  371. package/dist/standalone/chunk-V53KNYRN.js +0 -1
  372. package/dist/standalone/chunk-VIJLMIC3.js +0 -1
  373. package/dist/standalone/chunk-VOY5EALQ.js +0 -1
  374. package/dist/standalone/chunk-VR3OBMGZ.js +0 -1
  375. package/dist/standalone/chunk-WJCKVELA.js +0 -1
  376. package/dist/standalone/chunk-WJQLNYGX.js +0 -1
  377. package/dist/standalone/chunk-WPK2Q33V.js +0 -6
  378. package/dist/standalone/chunk-WQH3LT2P.js +0 -1
  379. package/dist/standalone/chunk-WZ65AZKA.js +0 -1
  380. package/dist/standalone/chunk-XEGWCG5S.js +0 -1
  381. package/dist/standalone/chunk-XFGE43TZ.js +0 -1
  382. package/dist/standalone/chunk-XNSCEAHM.js +0 -4
  383. package/dist/standalone/chunk-XXQUMVWH.js +0 -1
  384. package/dist/standalone/chunk-Y32QIKBS.js +0 -1
  385. package/dist/standalone/chunk-YJ25NVR2.js +0 -3
  386. package/dist/standalone/chunk-ZJGP6EKR.js +0 -1
  387. /package/dist/standalone/{chunk-XF2B7P5A.js → chunk-W2JBKQNU.js} +0 -0
@@ -1 +0,0 @@
1
- import{a as Nt,b as Ve,c as dt,d as gt,e as Tt,f as dr}from"./chunk-2PJNAWB3.js";import{a as ar,b as cr,c as ur,d as pr,e as mr}from"./chunk-SD4BERSA.js";import{a as fr}from"./chunk-IC4L6G56.js";import{A as _o,B as Uo,C as ko,D as P,G as a,H as Fo,L as Bo,Z as Ho,a as Eo,ca as jo,d as wo,da as zo,ha as Wo,ia as Go,ja as mt,k as Ht,la as qo,ma as $o,n as Vo,oa as Ko,pa as Jo,q as Oo,qa as Zo,ra as Qo,ta as er,ua as tr,va as or,wa as rr,x as Do,y as Lo}from"./chunk-2QSHLBCO.js";import{a as To,b as Xo}from"./chunk-BGBLQ563.js";import{a as Po,b as Mo,c as Yo}from"./chunk-IVFHIQOT.js";import{a as nr,b as sr,i as lr,j as ir,k as At}from"./chunk-QBWRC5YX.js";import{C as pt,F as Ao,I as _e,K as Xe,L as ft,M as ro,N as No,O as ge,P as xe,a as Ut,b as ut,c as Ro,e as bo,f as yo,g as Ft,h as Ct,i as Io,p as Bt,y as vo,z as Co}from"./chunk-CFPZYHPY.js";import{b as jt}from"./chunk-DJZYD5I5.js";import{a as ee,c as de,e as kt}from"./chunk-2OUPA2WJ.js";import{a as wt,c as je,d as So,e as ho,h as oo,i as xo,j as O}from"./chunk-6ST5ECQA.js";import{a as r,d as mn,e as I,f as _,g as dn,h as Me,j as ot}from"./chunk-3XIESWL4.js";var Ot=I(dn(),1),Ec=I(_(),1);var me={};mn(me,{Arrow:()=>Zr,Backdrop:()=>kr,Group:()=>cn,GroupLabel:()=>pn,Icon:()=>Or,Item:()=>qr,ItemIndicator:()=>Xr,ItemText:()=>Kr,Label:()=>Nr,List:()=>Gr,Popup:()=>zr,Portal:()=>_r,Positioner:()=>Fr,Root:()=>Er,ScrollDownArrow:()=>on,ScrollUpArrow:()=>sn,Separator:()=>fr,Trigger:()=>Tr,Value:()=>Mr});var j=I(_(),1);var St=I(_(),1);var no=St.createContext(null),so=St.createContext(null);function U(){let e=St.useContext(no);if(e===null)throw new Error(je(60));return e}r(U,"useSelectRootContext");function zt(){let e=St.useContext(so);if(e===null)throw new Error(je(61));return e}r(zt,"useSelectFloatingContext");var gr=r((e,t)=>Object.is(e,t),"defaultItemEquality");function Ue(e,t,o){return e==null||t==null?Object.is(e,t):o(e,t)}r(Ue,"compareItemEquality");function Sr(e,t,o){return!e||e.length===0?!1:e.some(n=>n===void 0?!1:Ue(t,n,o))}r(Sr,"selectedValueIncludes");function rt(e,t,o){return!e||e.length===0?-1:e.findIndex(n=>n===void 0?!1:Ue(n,t,o))}r(rt,"findItemIndex");function hr(e,t,o){return e.filter(n=>!Ue(t,n,o))}r(hr,"removeItem");var xr=I(_(),1);function Wt(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}r(Wt,"serializeValue");var Rr=I(Me(),1);function br(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}r(br,"isGroupedItems");function yr(e){if(!Array.isArray(e))return e!=null&&"null"in e;let t=e;if(br(t)){for(let o of t)for(let n of o.items)if(n&&n.value==null&&n.label!=null)return!0;return!1}for(let o of t)if(o&&o.value==null&&o.label!=null)return!0;return!1}r(yr,"hasNullItemLabel");function lo(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Wt(e)}r(lo,"stringifyAsLabel");function ze(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Wt(e.value):Wt(e)}r(ze,"stringifyAsValue");function io(e,t,o){function n(){return lo(e,o)}if(r(n,"fallback"),o&&e!=null)return o(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??n();if(Array.isArray(t)){let l=t,c=br(l)?l.flatMap(s=>s.items):l;if(e==null||typeof e!="object"){let s=c.find(m=>m.value===e);return s&&s.label!=null?s.label:n()}if("value"in e){let s=c.find(m=>m&&m.value===e.value);if(s&&s.label!=null)return s.label}}return n()}r(io,"resolveSelectedLabel");function Ir(e,t,o){return e.reduce((n,l,c)=>(c>0&&n.push(", "),n.push((0,Rr.jsx)(xr.Fragment,{children:io(l,t,o)},c)),n),[])}r(Ir,"resolveMultipleLabels");var i={id:P(e=>e.id),labelId:P(e=>e.labelId),modal:P(e=>e.modal),multiple:P(e=>e.multiple),items:P(e=>e.items),itemToStringLabel:P(e=>e.itemToStringLabel),itemToStringValue:P(e=>e.itemToStringValue),isItemEqualToValue:P(e=>e.isItemEqualToValue),value:P(e=>e.value),hasSelectedValue:P(e=>{let{value:t,multiple:o,itemToStringValue:n}=e;return t==null?!1:o&&Array.isArray(t)?t.length>0:ze(t,n)!==""}),hasNullItemLabel:P((e,t)=>t?yr(e.items):!1),open:P(e=>e.open),mounted:P(e=>e.mounted),forceMount:P(e=>e.forceMount),transitionStatus:P(e=>e.transitionStatus),openMethod:P(e=>e.openMethod),activeIndex:P(e=>e.activeIndex),selectedIndex:P(e=>e.selectedIndex),isActive:P((e,t)=>e.activeIndex===t),isSelected:P((e,t)=>{let o=e.isItemEqualToValue,n=e.value;return e.multiple?Array.isArray(n)&&n.some(l=>Ue(t,l,o)):Ue(t,n,o)}),isSelectedByFocus:P((e,t)=>e.selectedIndex===t),popupProps:P(e=>e.popupProps),triggerProps:P(e=>e.triggerProps),triggerElement:P(e=>e.triggerElement),positionerElement:P(e=>e.positionerElement),listElement:P(e=>e.listElement),popupSide:P(e=>e.popupSide),scrollUpArrowVisible:P(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:P(e=>e.scrollDownArrowVisible),hasScrollArrows:P(e=>e.hasScrollArrows)};function vr(e,t,o=(n,l)=>n===l){return e.length===t.length&&e.every((n,l)=>o(n,t[l]))}r(vr,"areArraysEqual");var ht=I(Me(),1);function Er(e){let{id:t,value:o,defaultValue:n=null,onValueChange:l,open:c,defaultOpen:s=!1,onOpenChange:m,name:p,form:f,autoComplete:g,disabled:h=!1,readOnly:R=!1,required:v=!1,modal:C=!0,actionsRef:k,inputRef:x,onOpenChangeComplete:J,items:B,multiple:A=!1,itemToStringLabel:b,itemToStringValue:L,isItemEqualToValue:M=gr,highlightItemOnHover:ae=!0,children:te}=e,{clearErrors:$}=Ro(),{setDirty:se,setTouched:Se,setFocused:Re,validityData:z,setFilled:X,name:D,disabled:ce,validation:N,validationMode:Z}=ut(),H=Ft({id:t}),V=ce||h,u=D??p,[S,le]=ro({controlled:o,default:A?n??oo:n,name:"Select",state:"value"}),[F,be]=ro({controlled:c,default:s,name:"Select",state:"open"}),he=j.useRef([]),d=j.useRef([]),w=j.useRef(null),ue=j.useRef(null),Ae=j.useRef(0),T=j.useRef(null),K=j.useRef([]),W=j.useRef(!1),Ie=j.useRef(null),ie=j.useRef(null),pe=j.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),fe=j.useRef(!1),{mounted:oe,setMounted:Ne,transitionStatus:Q}=ft(F),{openMethod:G,triggerProps:re}=qo(F),y=So(()=>new Fo({id:H,labelId:void 0,modal:C,multiple:A,itemToStringLabel:b,itemToStringValue:L,isItemEqualToValue:M,value:S,open:F,mounted:oe,transitionStatus:Q,items:B,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,We=a(y,i.activeIndex),Te=a(y,i.selectedIndex),Oe=a(y,i.triggerElement),ke=a(y,i.positionerElement),Ge=rr(G),Je=G??Ge??null,It=j.useMemo(()=>A?"":ze(S,L),[A,S,L]),Fe=j.useMemo(()=>A&&Array.isArray(S)?S.map(E=>ze(E,L)):ze(S,L),[A,S,L]),Ze=Ht(y.state.triggerElement),ne=de(()=>Fe);No(Ze,H,S,ne,!V,p);let Be=j.useRef(S),He=A?Array.isArray(S)&&S.length>0:S!=null&&ze(S,L)!=="";ee(()=>{S!==Be.current&&y.set("forceMount",!0)},[y,S]),ee(()=>{X(He)},[He,X]),ee(r(function(){let Y=K.current,ve;if(A){let ye=Array.isArray(S)?S:[];if(ye.length===0)ve=null;else{let $e=ye[ye.length-1],tt=rt(Y,$e,M);ve=tt===-1?null:tt}}else{let ye=rt(Y,S,M);ve=ye===-1?null:ye}ve===null&&(ie.current=null),!F&&y.set("selectedIndex",ve)},"syncSelectedIndex"),[He,A,F,S,K,M,y,ie]);function De(E){let Y=z.initialValue;return Array.isArray(E)&&Array.isArray(Y)?!vr(E,Y,(ve,ye)=>Ue(ve,ye,M)):E!==Y}r(De,"isSelectedValueDirty"),Yo(S,()=>{$(u),se(De(S)),N.change(S)});let st=de((E,Y)=>{m?.(E,Y),!Y.isCanceled&&(be(E),!E&&(Y.reason===ge.focusOut||Y.reason===ge.outsidePress)&&(Se(!0),Re(!1),Z==="onBlur"&&N.commit(S)))}),lt=de(()=>{Ne(!1),y.update({activeIndex:null,openMethod:null}),J?.(!1)});Xe({enabled:!k,open:F,ref:w,onComplete(){F||lt()}}),j.useImperativeHandle(k,()=>({unmount:lt}),[lt]);let Ye=de((E,Y)=>{l?.(E,Y),!Y.isCanceled&&le(E)}),Le=de(()=>{let E=y.state.listElement||w.current;if(!E)return;let Y=dt(E.scrollHeight,E.clientHeight),ve=gt(E.scrollTop,Y),ye=ve>0,$e=ve<Y;y.state.scrollUpArrowVisible!==ye&&y.set("scrollUpArrowVisible",ye),y.state.scrollDownArrowVisible!==$e&&y.set("scrollDownArrowVisible",$e)}),Qe=Ho({open:F,onOpenChange:st,elements:{reference:Oe,floating:ke}}),it=Lo(Qe,{enabled:!R&&!V,event:"mousedown"}),at=_o(Qe),qe=jo(Qe,{enabled:!R&&!V,listRef:he,activeIndex:We,selectedIndex:Te,disabledIndices:oo,onNavigate(E){E===null&&!F||y.set("activeIndex",E)},focusItemOnHover:ae}),et=zo(Qe,{enabled:!R&&!V&&(F||!A),listRef:d,activeIndex:We,selectedIndex:Te,disabledIndices:r(E=>mr(he.current[E]),"disabledIndices"),onMatch(E){F?y.set("activeIndex",E):Ye(K.current[E],xe("none"))},onTyping(E){W.current=E}}),vt=j.useMemo(()=>{let E=wt(et.reference,qe.reference,at.reference,it.reference,re);return H&&(E.id=H),E},[it.reference,et.reference,qe.reference,at.reference,re,H]),Et=j.useMemo(()=>wt(Bo,et.floating,qe.floating,at.floating),[et.floating,qe.floating,at.floating]),Dt=qe.item??xo;ko(()=>{y.update({popupProps:Et,triggerProps:vt})}),ee(()=>{y.update({id:H,modal:C,multiple:A,value:S,open:F,mounted:oe,transitionStatus:Q,popupProps:Et,triggerProps:vt,items:B,itemToStringLabel:b,itemToStringValue:L,isItemEqualToValue:M,openMethod:Je})},[y,H,C,A,S,F,oe,Q,Et,vt,B,b,L,M,Je]);let Pe=j.useMemo(()=>({store:y,name:u,required:v,disabled:V,readOnly:R,multiple:A,highlightItemOnHover:ae,setValue:Ye,setOpen:st,listRef:he,popupRef:w,scrollHandlerRef:ue,handleScrollArrowVisibility:Le,scrollArrowsMountedCountRef:Ae,itemProps:Dt,valueRef:T,valuesRef:K,labelsRef:d,typingRef:W,selectionRef:pe,firstItemTextRef:Ie,selectedItemTextRef:ie,validation:N,onOpenChangeComplete:J,alignItemWithTriggerActiveRef:fe,initialValueRef:Be}),[y,u,v,V,R,A,ae,Ye,st,Dt,N,J,Le]),ct=ho(x,N.inputRef),Lt=A&&Array.isArray(S)&&S.length>0,_t=A?void 0:u,eo=j.useMemo(()=>!A||!Array.isArray(S)||!u?null:S.map(E=>{let Y=ze(E,L);return(0,ht.jsx)("input",{type:"hidden",form:f,name:u,value:Y,disabled:V},Y)}),[A,S,f,u,L,V]);return(0,ht.jsx)(no.Provider,{value:Pe,children:(0,ht.jsxs)(so.Provider,{value:Qe,children:[te,(0,ht.jsx)("input",{...N.getValidationProps(V,{onFocus(){y.state.triggerElement?.focus({focusVisible:!0})},onChange(E){if(E.nativeEvent.defaultPrevented||V||R)return;let Y=E.currentTarget.value,ve=xe(ge.none,E.nativeEvent);function ye(){if(A)return;let $e=Y.toLowerCase(),tt=K.current.findIndex(to=>ze(to,L).toLowerCase()===$e||lo(to,b).toLowerCase()===$e);tt===-1&&(tt=K.current.findIndex((to,fn)=>{let go=d.current[fn];return go!=null&&go.toLowerCase()===$e}));let mo=tt===-1?void 0:K.current[tt];mo!=null&&Ye(mo,ve)}r(ye,"handleChange"),y.set("forceMount",!0),queueMicrotask(ye)}}),id:H&&_t==null?`${H}-hidden-input`:void 0,form:f,name:_t,autoComplete:g,value:It,disabled:V,required:v&&!Lt,readOnly:R,ref:ct,style:u?Mo:Po,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),eo]})})}r(Er,"SelectRoot");var Ar=I(_(),1);function wr(e){return e==null?void 0:`${e}-label`}r(wr,"getDefaultLabelId");function Cr(e,t){return e??t}r(Cr,"resolveAriaLabelledBy");var Nr=Ar.forwardRef(r(function(t,o){let{render:n,className:l,style:c,...s}=t,m=s;delete m.id;let p=ut(),{store:f}=U(),g=a(f,i.triggerElement),h=a(f,i.id),R=wr(h),v=Co({id:R,fallbackControlId:g?.id??h,setLabelId(C){f.set("labelId",C)}});return O("div",t,{ref:o,state:p.state,props:[v,s],stateAttributesMapping:Ut})},"SelectLabel"));var xt=I(_(),1);var Gt=2,gn=400,Sn={...Go,...Ut,popupSide:r(e=>e?{"data-popup-side":e}:null,"popupSide"),value:r(()=>null,"value")},Tr=xt.forwardRef(r(function(t,o){let{render:n,className:l,id:c,disabled:s=!1,nativeButton:m=!0,style:p,...f}=t,{setTouched:g,setFocused:h,validationMode:R,state:v,disabled:C}=ut(),{labelId:k}=yo(),{store:x,setOpen:J,selectionRef:B,validation:A,readOnly:b,required:L,alignItemWithTriggerActiveRef:M,disabled:ae}=U(),te=C||ae||s,$=a(x,i.open),se=a(x,i.mounted),Se=a(x,i.value),Re=a(x,i.triggerProps),z=a(x,i.positionerElement),X=a(x,i.listElement),D=a(x,i.popupSide),ce=a(x,i.id),N=a(x,i.labelId),Z=a(x,i.hasSelectedValue),H=se&&z?D:null,V=c??ce,u=Cr(k,N);Ft({id:V});let S=Ht(z),le=xt.useRef(null),{getButtonProps:F,buttonRef:be}=jt({disabled:te,native:m}),he=de(W=>{x.set("triggerElement",W)}),d=pt(),w=pt(),ue=pt();xt.useEffect(()=>{if($)return ue.start(gn,()=>{B.current.allowUnselectedMouseUp=!0,B.current.allowSelectedMouseUp=!0}),()=>{ue.clear()};B.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},w.clear()},[$,B,w,ue]);let Ae=wt(Re,{id:V,role:"combobox","aria-expanded":$?"true":"false","aria-haspopup":"listbox","aria-controls":$?X?.id??vo(z)?.id:void 0,"aria-labelledby":u,"aria-readonly":b||void 0,"aria-required":L||void 0,tabIndex:te?-1:0,onFocus(W){h(!0),$&&M.current&&J(!1,xe(ge.none,W.nativeEvent)),d.start(0,()=>{x.set("forceMount",!0)})},onBlur(W){Bt(z,W.relatedTarget)||(g(!0),h(!1),R==="onBlur"&&A.commit(Se))},onMouseDown(W){if($)return;let Ie=Ct(W.currentTarget);function ie(pe){if(!le.current)return;let fe=pe.target;if(Bt(le.current,fe)||Bt(S.current,fe))return;let oe=pr(le.current);pe.clientX>=oe.left-Gt&&pe.clientX<=oe.right+Gt&&pe.clientY>=oe.top-Gt&&pe.clientY<=oe.bottom+Gt||J(!1,xe(ge.cancelOpen,pe))}r(ie,"handleMouseUp"),w.start(0,()=>{Ie.addEventListener("mouseup",ie,{once:!0})})}},f,F),T=A.getValidationProps(te,Ae);T.role="combobox";let K={...v,open:$,disabled:te,value:Se,readOnly:b,popupSide:H,placeholder:!Z};return O("button",t,{ref:[o,le,be,he],state:K,stateAttributesMapping:Sn,props:T})},"SelectTrigger"));var Pr=I(_(),1);var hn={value:r(()=>null,"value")},Mr=Pr.forwardRef(r(function(t,o){let{className:n,render:l,children:c,placeholder:s,style:m,...p}=t,{store:f,valueRef:g}=U(),h=a(f,i.value),R=a(f,i.items),v=a(f,i.itemToStringLabel),C=a(f,i.hasSelectedValue),k=!C&&s!=null&&c==null,x=a(f,i.hasNullItemLabel,k),J={value:h,placeholder:!C},B=null;return typeof c=="function"?B=c(h):c!=null?B=c:!C&&s!=null&&!x?B=s:Array.isArray(h)?B=Ir(h,R,v):B=io(h,R,v),O("span",t,{state:J,ref:[o,g],props:[{children:B},p],stateAttributesMapping:hn})},"SelectValue"));var Vr=I(_(),1);var Or=Vr.forwardRef(r(function(t,o){let{render:n,className:l,style:c,...s}=t,{store:m}=U(),f={open:a(m,i.open)};return O("span",t,{state:f,ref:o,props:[{"aria-hidden":!0,children:"\u25BC"},s],stateAttributesMapping:Wo})},"SelectIcon"));var Lr=I(_(),1);var ao=I(_(),1);var Dr=ao.createContext(void 0);var co=I(Me(),1);var _r=Lr.forwardRef(r(function(t,o){let{store:n}=U(),l=a(n,i.mounted),c=a(n,i.forceMount);return l||c?(0,co.jsx)(Dr.Provider,{value:!0,children:(0,co.jsx)(Oo,{ref:o,...t})}):null},"SelectPortal"));var Ur=I(_(),1);var xn={...mt,..._e},kr=Ur.forwardRef(r(function(t,o){let{render:n,className:l,style:c,...s}=t,{store:m}=U(),p=a(m,i.open),f=a(m,i.mounted),g=a(m,i.transitionStatus);return O("div",t,{state:{open:p,transitionStatus:g},ref:o,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},s],stateAttributesMapping:xn})},"SelectBackdrop"));var Ee=I(_(),1);var Yt=I(_(),1);var uo=Yt.createContext(void 0);function Ke(){let e=Yt.useContext(uo);if(!e)throw new Error(je(59));return e}r(Ke,"useSelectPositionerContext");function Rt(e,t){e&&Object.assign(e.style,t)}r(Rt,"clearStyles");var qt={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"};var Pt=I(Me(),1);var Rn={position:"fixed"},Fr=Ee.forwardRef(r(function(t,o){let{anchor:n,positionMethod:l="absolute",className:c,render:s,side:m="bottom",align:p="center",sideOffset:f=0,alignOffset:g=0,collisionBoundary:h="clipping-ancestors",collisionPadding:R,arrowPadding:v=5,sticky:C=!1,disableAnchorTracking:k,alignItemWithTrigger:x=!0,collisionAvoidance:J=Vo,style:B,...A}=t,{store:b,listRef:L,labelsRef:M,alignItemWithTriggerActiveRef:ae,selectedItemTextRef:te,valuesRef:$,initialValueRef:se,popupRef:Se,setValue:Re}=U(),z=zt(),X=a(b,i.open),D=a(b,i.mounted),ce=a(b,i.modal),N=a(b,i.value),Z=a(b,i.openMethod),H=a(b,i.positionerElement),V=a(b,i.triggerElement),u=a(b,i.isItemEqualToValue),S=a(b,i.transitionStatus),le=Ee.useRef(null),F=Ee.useRef(null),[be,he]=Ee.useState(x),d=D&&be&&Z!=="touch";!D&&be!==x&&he(x),ee(()=>{D||(i.scrollUpArrowVisible(b.state)&&b.set("scrollUpArrowVisible",!1),i.scrollDownArrowVisible(b.state)&&b.set("scrollDownArrowVisible",!1))},[b,D]),Ee.useImperativeHandle(ae,()=>d),er((d||ce)&&X,Z==="touch",H,V);let w=Ko({anchor:n,floatingRootContext:z,positionMethod:l,mounted:D,side:m,sideOffset:f,align:p,alignOffset:g,arrowPadding:v,collisionBoundary:h,collisionPadding:R,sticky:C,disableAnchorTracking:k??d,collisionAvoidance:J,keepMounted:!0}),ue=d?"none":w.side,Ae=d?Rn:w.positionerStyles,T={open:X,side:ue,align:w.align,anchorHidden:w.anchorHidden};ee(()=>{b.set("popupSide",w.side)},[b,w.side]);let K=de(fe=>{b.set("positionerElement",fe)}),W=Qo(t,T,{styles:Ae,transitionStatus:S,props:A,refs:[o,K],hidden:!D,inert:!X}),Ie=Ee.useRef(0),ie=de(fe=>{if(fe.size===0&&Ie.current===0||$.current.length===0)return;let oe=Ie.current;if(Ie.current=fe.size,fe.size===oe)return;let Ne=xe(ge.none);if(oe!==0&&!b.state.multiple&&N!==null&&rt($.current,N,u)===-1){let G=se.current,y=G!=null&&rt($.current,G,u)!==-1?G:null;Re(y,Ne),y===null&&(b.set("selectedIndex",null),te.current=null)}if(oe!==0&&b.state.multiple&&Array.isArray(N)){let Q=r(re=>rt($.current,re,u)!==-1,"hasVisibleItem"),G=N.filter(re=>Q(re));(G.length!==N.length||G.some(re=>!Sr(N,re,u)))&&(Re(G,Ne),G.length===0&&(b.set("selectedIndex",null),te.current=null))}if(X&&d){b.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let Q={height:""};Rt(H,Q),Rt(Se.current,Q)}}),pe=Ee.useMemo(()=>({...w,side:ue,alignItemWithTriggerActive:d,setControlledAlignItemWithTrigger:he,scrollUpArrowRef:le,scrollDownArrowRef:F}),[w,ue,d,he]);return(0,Pt.jsx)(ur,{elementsRef:L,labelsRef:M,onMapChange:ie,children:(0,Pt.jsxs)(uo.Provider,{value:pe,children:[D&&ce&&(0,Pt.jsx)(Jo,{inert:$o(!X),cutout:V}),W]})})},"SelectPositioner"));var we=I(_(),1);var Kt=I(Me(),1);var bn={...mt,..._e},zr=we.forwardRef(r(function(t,o){let{render:n,className:l,style:c,finalFocus:s,...m}=t,{store:p,popupRef:f,onOpenChangeComplete:g,setOpen:h,valueRef:R,firstItemTextRef:v,selectedItemTextRef:C,multiple:k,handleScrollArrowVisibility:x,scrollHandlerRef:J,listRef:B,highlightItemOnHover:A}=U(),{side:b,align:L,alignItemWithTriggerActive:M,isPositioned:ae,setControlledAlignItemWithTrigger:te}=Ke(),$=or(!0)!=null,se=zt(),Se=Xo(),{nonce:Re,disableStyleElements:z}=dr(),X=a(p,i.id),D=a(p,i.open),ce=a(p,i.openMethod),N=a(p,i.mounted),Z=a(p,i.popupProps),H=a(p,i.transitionStatus),V=a(p,i.triggerElement),u=a(p,i.positionerElement),S=a(p,i.listElement),le=we.useRef(!1),F=we.useRef(!1),be=we.useRef({}),he=Ao(),d=de(T=>{if(!u||!f.current||!F.current)return;if(le.current||!M){x();return}let K=u.style.top==="0px",W=u.style.bottom==="0px";if(!K&&!W){x();return}let Ie=Hr(u),ie=Mt(u.getBoundingClientRect().height,"y",Ie),pe=Ct(u),fe=kt(u),oe=fe.getComputedStyle(u),Ne=parseFloat(oe.marginTop),Q=parseFloat(oe.marginBottom),G=Br(fe.getComputedStyle(f.current)),re=Math.min(pe.documentElement.clientHeight-Ne-Q,G),y=T.scrollTop,We=$t(T),Te=0,Oe=null,ke=!1,Ge=!1,Je=r(ne=>{u.style.height=`${ne}px`},"setHeight"),It=r((ne,Be)=>{let He=Nt(ne,0,re-ie);He>0&&Je(ie+He),T.scrollTop=Be,re-(ie+He)<=Ve&&(le.current=!0),x()},"handleSmallDiff"),Fe=K?We-y:y,Ze=Math.min(ie+Fe,re);if(Te=Ze,Fe<=Ve){It(Fe,K?We:0);return}if(re-Ze>Ve)K?Ge=!0:Oe=0;else if(ke=!0,W&&y<We){let ne=ie+Fe-re;Oe=y-(Fe-ne)}if(Te=Math.ceil(Te),Te!==0&&Je(Te),Ge||Oe!=null){let ne=$t(T),Be=Ge?ne:Nt(Oe,0,ne);Math.abs(T.scrollTop-Be)>Ve&&(T.scrollTop=Be)}(ke||Te>=re-Ve)&&(le.current=!0),x()});we.useImperativeHandle(J,()=>d,[d]),Xe({open:D,ref:f,onComplete(){D&&g?.(!0)}});let w={open:D,transitionStatus:H,side:b,align:L};ee(()=>{!u||!f.current||Object.keys(be.current).length||(be.current={top:u.style.top||"0",left:u.style.left||"0",right:u.style.right,height:u.style.height,bottom:u.style.bottom,minHeight:u.style.minHeight,maxHeight:u.style.maxHeight,marginTop:u.style.marginTop,marginBottom:u.style.marginBottom})},[f,u]),ee(()=>{D||M||(F.current=!1,le.current=!1,Rt(u,be.current))},[D,M,u,f]),ee(()=>{let T=f.current;if(!D||!V||!u||!T||M&&!ae||p.state.transitionStatus==="ending")return;if(!M){F.current=!0,he.request(x),T.style.removeProperty("--transform-origin");return}let K=yn(T);T.style.removeProperty("--transform-origin");try{let W=C.current;W?.isConnected||(W=!i.hasSelectedValue(p.state)&&v.current?.isConnected?v.current:null);let Ie=R.current,ie=kt(u),pe=ie.getComputedStyle(u),fe=ie.getComputedStyle(T),oe=Ct(V),Ne=Hr(V),Q=Xt(V.getBoundingClientRect(),Ne),G=Xt(u.getBoundingClientRect(),Ne),re=Q.height,y=S||T,We=y.scrollHeight,Te=parseFloat(fe.borderBottomWidth),Oe=parseFloat(pe.marginTop)||10,ke=parseFloat(pe.marginBottom)||10,Ge=parseFloat(pe.minHeight)||100,Je=Br(fe),It=5,Fe=5,Ze=20,ne=oe.documentElement.clientHeight-Oe-ke,Be=oe.documentElement.clientWidth,He=ne-Q.bottom+re,De,st=Se==="rtl"?Q.right-G.width:Q.left,lt=0;if(W&&Ie){let Pe=Xt(Ie.getBoundingClientRect(),Ne);De=Xt(W.getBoundingClientRect(),Ne),st=G.left+(Se==="rtl"?Pe.right-De.right:Pe.left-De.left);let ct=Pe.top-Q.top+Pe.height/2;lt=De.top-G.top+De.height/2-ct}let Ye=He+lt+ke+Te,Le=Math.min(ne,Ye),Qe=ne-Oe-ke,it=Ye-Le,at=Be-Fe;u.style.left=`${Nt(st,It,at-G.width)}px`,u.style.height=`${Le}px`,u.style.maxHeight="none",u.style.marginTop=`${Oe}px`,u.style.marginBottom=`${ke}px`,T.style.height="100%";let qe=$t(y),et=it>=qe-Ve;et&&(Le=Math.min(ne,G.height)-(it-qe));let vt=Q.top<Ze||Q.bottom>ne-Ze||Math.ceil(Le)+Ve<Math.min(We,Ge),Et=(ie.visualViewport?.scale??1)!==1&&Io.engine.webkit;if(vt||Et){F.current=!0,Rt(u,be.current),te(!1);return}let Dt=Math.max(Ge,Le);if(et){let Pe=Math.max(0,ne-Ye);u.style.top=G.height>=Qe?"0":`${Pe}px`,u.style.height=`${Le}px`,y.scrollTop=$t(y)}else u.style.bottom="0",y.scrollTop=it;if(De){let Pe=G.top,ct=G.height,Lt=De.top+De.height/2,_t=ct>0?(Lt-Pe)/ct*100:50,eo=Nt(_t,0,100);T.style.setProperty("--transform-origin",`50% ${eo}%`)}(Dt===ne||Le>=Je)&&(le.current=!0),x(),A&&p.state.selectedIndex===null&&p.state.activeIndex===null&&B.current[0]!=null&&p.set("activeIndex",0),F.current=!0}finally{K()}},[p,D,u,V,R,v,C,f,x,M,te,he,S,B,A,Se,ae]),we.useEffect(()=>{if(!M||!u||!D)return;let T=kt(u);function K(W){h(!1,xe(ge.windowResize,W))}return r(K,"handleResize"),To(T,"resize",K)},[h,M,u,D]);let ue={...S?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":k||void 0,id:`${X}-list`},onKeyDown(T){$&&tr.has(T.key)&&T.stopPropagation()},onScroll(T){S||d(T.currentTarget)},...M&&{style:S?{height:"100%"}:qt}},Ae=O("div",t,{ref:[o,f],state:w,stateAttributesMapping:bn,props:[Z,ue,Zo(H),{className:!S&&M?Tt.className:void 0},m]});return(0,Kt.jsxs)(we.Fragment,{children:[!z&&Tt.getElement(Re),(0,Kt.jsx)(Do,{context:se,modal:!1,disabled:!N,openInteractionType:ce,returnFocus:s,restoreFocus:!0,children:Ae})]})},"SelectPopup"));function Br(e){let t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}r(Br,"getMaxPopupHeight");function $t(e){return dt(e.scrollHeight,e.clientHeight)}r($t,"getMaxScrollTop");function Hr(e){return Uo.getScale(e)}r(Hr,"getScale");function Mt(e,t,o){return e/o[t]}r(Mt,"normalizeSize");function Xt(e,t){return wo({x:Mt(e.x,"x",t),y:Mt(e.y,"y",t),width:Mt(e.width,"x",t),height:Mt(e.height,"y",t)})}r(Xt,"normalizeRect");var jr=[["transform","none"],["scale","1"],["translate","0 0"]];function yn(e){let{style:t}=e,o={};for(let[n,l]of jr)o[n]=t.getPropertyValue(n),t.setProperty(n,l,"important");return()=>{for(let[n]of jr){let l=o[n];l?t.setProperty(n,l):t.removeProperty(n)}}}r(yn,"unsetTransformStyles");var Wr=I(_(),1);var Gr=Wr.forwardRef(r(function(t,o){let{render:n,className:l,style:c,...s}=t,{store:m,scrollHandlerRef:p}=U(),{alignItemWithTriggerActive:f}=Ke(),g=a(m,i.hasScrollArrows),h=a(m,i.openMethod),R=a(m,i.multiple),C={id:`${a(m,i.id)}-list`,role:"listbox","aria-multiselectable":R||void 0,onScroll(x){p.current?.(x.currentTarget)},...f&&{style:qt},className:g&&h!=="touch"?Tt.className:void 0},k=de(x=>{m.set("listElement",x)});return O("div",t,{ref:[o,k],props:[C,s]})},"SelectList"));var Ce=I(_(),1);var Jt=I(_(),1);var po=Jt.createContext(void 0);function Vt(){let e=Jt.useContext(po);if(!e)throw new Error(je(57));return e}r(Vt,"useSelectItemContext");var Yr=I(Me(),1);var qr=Ce.memo(Ce.forwardRef(r(function(t,o){let{render:n,className:l,style:c,value:s=null,label:m,disabled:p=!1,nativeButton:f=!1,...g}=t,h=Ce.useRef(null),R=cr({label:m,textRef:h,indexGuessBehavior:ar.GuessFromOrder}),{store:v,itemProps:C,setOpen:k,setValue:x,selectionRef:J,typingRef:B,valuesRef:A,multiple:b,selectedItemTextRef:L,disabled:M,readOnly:ae}=U(),te=a(v,i.isActive,R.index),$=a(v,i.open),se=a(v,i.isSelected,s),Se=a(v,i.isSelectedByFocus,R.index),Re=a(v,i.isItemEqualToValue),z=R.index,X=z!==-1,D=Ce.useRef(null);ee(()=>{if(!X)return;let d=A.current;return d[z]=s,()=>{delete d[z]}},[X,z,s,A]),ee(()=>{if(!X)return;let d=v.state.value,w=d;b&&Array.isArray(d)&&(w=d.length>0?d[d.length-1]:void 0),w!==void 0&&Ue(s,w,Re)&&(v.set("selectedIndex",z),h.current&&(L.current=h.current))},[X,z,b,Re,v,s,L]);let ce=Ce.useRef(null),N=Ce.useRef("mouse"),Z=Ce.useRef(!1),{getButtonProps:H,buttonRef:V}=jt({disabled:p,focusableWhenDisabled:!0,native:f,composite:!0}),u={disabled:p,selected:se,highlighted:te};function S(d){if(M||ae)return;let w=v.state.value;if(b){let ue=Array.isArray(w)?w:[],Ae=se?hr(ue,s,Re):[...ue,s];x(Ae,xe(ge.itemPress,d))}else x(s,xe(ge.itemPress,d)),k(!1,xe(ge.itemPress,d))}r(S,"commitSelection");function le(){J.current.dragY=0}r(le,"resetDragMovement");let F={role:"option","aria-selected":se,tabIndex:$&&te?0:-1,onKeyDown(d){ce.current=d.key,v.set("activeIndex",z),d.key===" "&&B.current&&d.preventDefault()},onClick(d){let w=d.type==="click"&&N.current!=="touch",ue=d.nativeEvent.pointerType,Ae=w&&Eo(d.nativeEvent)&&(ue!==void 0||te),T=w&&!Ae&&!Z.current;Z.current=!1,!(d.type==="keydown"&&ce.current===null)&&(p||d.type==="keydown"&&ce.current===" "&&B.current||T||(ce.current=null,S(d.nativeEvent)))},onPointerEnter(d){N.current=d.pointerType},onPointerMove(d){if(d.pointerType==="mouse"&&d.buttons===1){let w=J.current;w.dragY+=d.movementY,w.dragY**2>=64&&(w.allowUnselectedMouseUp=!0)}},onPointerDown(d){N.current=d.pointerType,Z.current=!0,le()},onMouseUp(){if(le(),p||N.current==="touch"||Z.current)return;let d=!J.current.allowSelectedMouseUp&&se,w=!J.current.allowUnselectedMouseUp&&!se;d||w||(Z.current=!0,D.current?.click(),Z.current=!1)}},be=O("div",t,{ref:[V,o,R.ref,D],state:u,props:[C,F,g,H]}),he=Ce.useMemo(()=>({selected:se,index:z,textRef:h,selectedByFocus:Se,hasRegistered:X}),[se,z,h,Se,X]);return(0,Yr.jsx)(po.Provider,{value:he,children:be})},"SelectItem")));var nt=I(_(),1);var $r=I(Me(),1);var Xr=nt.forwardRef(r(function(t,o){let n=t.keepMounted??!1,{selected:l}=Vt();return n||l?(0,$r.jsx)(In,{...t,ref:o}):null},"SelectItemIndicator")),In=nt.memo(nt.forwardRef((e,t)=>{let{render:o,className:n,style:l,keepMounted:c,...s}=e,{selected:m}=Vt(),p=nt.useRef(null),{transitionStatus:f,setMounted:g}=ft(m),R=O("span",e,{ref:[t,p],state:{selected:m,transitionStatus:f},props:[{"aria-hidden":!0,children:"\u2714\uFE0F"},s],stateAttributesMapping:_e});return Xe({open:m,ref:p,onComplete(){m||g(!1)}}),R}));var bt=I(_(),1);var Kr=bt.memo(bt.forwardRef(r(function(t,o){let{index:n,textRef:l,selectedByFocus:c,hasRegistered:s}=Vt(),{firstItemTextRef:m,selectedItemTextRef:p}=U(),{render:f,className:g,style:h,...R}=t,v=bt.useCallback(k=>{k&&(s&&n===0&&(m.current=k),s&&c&&(p.current=k))},[m,p,n,c,s]);return O("div",t,{ref:[v,o,l],props:R})},"SelectItemText")));var Jr=I(_(),1);var vn={...mt,..._e},Zr=Jr.forwardRef(r(function(t,o){let{render:n,className:l,style:c,...s}=t,{store:m}=U(),{side:p,align:f,arrowRef:g,arrowStyles:h,arrowUncentered:R,alignItemWithTriggerActive:v}=Ke(),k={open:a(m,i.open),side:p,align:f,uncentered:R},x=O("div",t,{state:k,ref:[g,o],props:[{style:h,"aria-hidden":!0},s],stateAttributesMapping:vn});return v?null:x},"SelectArrow"));var en=I(_(),1);var Qr=I(_(),1);var Zt=Qr.forwardRef(r(function(t,o){let{render:n,className:l,style:c,direction:s,keepMounted:m=!1,...p}=t,f=s==="up",{store:g,popupRef:h,listRef:R,handleScrollArrowVisibility:v,scrollArrowsMountedCountRef:C}=U(),{side:k,scrollDownArrowRef:x,scrollUpArrowRef:J}=Ke(),B=f?i.scrollUpArrowVisible:i.scrollDownArrowVisible,A=a(g,B),b=a(g,i.openMethod),L=A&&b!=="touch",M=pt(),ae=f?J:x,{mounted:te,transitionStatus:$,setMounted:se}=ft(L);ee(()=>(C.current+=1,g.state.hasScrollArrows||g.set("hasScrollArrows",!0),()=>{C.current=Math.max(0,C.current-1),C.current===0&&g.state.hasScrollArrows&&g.set("hasScrollArrows",!1)}),[g,C]),Xe({open:L,ref:ae,onComplete(){L||se(!1)}});let z=O("div",t,{ref:[o,ae],state:{direction:s,visible:L,side:k,transitionStatus:$},props:[{"aria-hidden":!0,children:f?"\u25B2":"\u25BC",style:{position:"absolute"},onMouseMove(D){if(D.movementX===0&&D.movementY===0||M.isStarted())return;g.set("activeIndex",null);function ce(){let N=g.state.listElement??h.current;if(!N)return;g.set("activeIndex",null),v();let Z=dt(N.scrollHeight,N.clientHeight),H=gt(N.scrollTop,Z),V=H===(f?0:Z),u=R.current;if(H!==N.scrollTop&&(N.scrollTop=H),u.length===0&&g.set(f?"scrollUpArrowVisible":"scrollDownArrowVisible",!V),V){M.clear();return}if(u.length>0){let S=ae.current?.offsetHeight||0;N.scrollTop=En(u,f,H,N.clientHeight,S,Z)}M.start(40,ce)}r(ce,"scrollNextItem"),M.start(40,ce)},onMouseLeave(){M.clear()}},p],stateAttributesMapping:_e});return te||m?z:null},"SelectScrollArrow"));function En(e,t,o,n,l,c){if(t){let g=0,h=o+l-Ve;for(let C=0;C<e.length;C+=1){let k=e[C];if(k&&k.offsetTop>=h){g=C;break}}let R=Math.max(0,g-1),v=e[R];return R<g&&v?gt(v.offsetTop-l,c):0}let s=e.length-1,m=o+n-l+Ve;for(let g=0;g<e.length;g+=1){let h=e[g];if(h&&h.offsetTop+h.offsetHeight>m){s=Math.max(0,g-1);break}}let p=Math.min(e.length-1,s+1),f=e[p];return p>s&&f?gt(f.offsetTop+f.offsetHeight-n+l,c):c}r(En,"getTargetScrollTop");var tn=I(Me(),1);var on=en.forwardRef(r(function(t,o){return(0,tn.jsx)(Zt,{...t,ref:o,direction:"down"})},"SelectScrollDownArrow"));var rn=I(_(),1);var nn=I(Me(),1);var sn=rn.forwardRef(r(function(t,o){return(0,nn.jsx)(Zt,{...t,ref:o,direction:"up"})},"SelectScrollUpArrow"));var yt=I(_(),1);var Qt=I(_(),1);var fo=Qt.createContext(void 0);function ln(){let e=Qt.useContext(fo);if(e===void 0)throw new Error(je(56));return e}r(ln,"useSelectGroupContext");var an=I(Me(),1);var cn=yt.forwardRef(r(function(t,o){let{render:n,className:l,style:c,...s}=t,[m,p]=yt.useState(),f=yt.useMemo(()=>({labelId:m,setLabelId:p}),[m,p]),g=O("div",t,{ref:o,props:[{role:"group","aria-labelledby":m},s]});return(0,an.jsx)(fo.Provider,{value:f,children:g})},"SelectGroup"));var un=I(_(),1);var pn=un.forwardRef(r(function(t,o){let{render:n,className:l,style:c,id:s,...m}=t,{setLabelId:p}=ln(),f=bo(s);return ee(()=>{p(f)},[f,p]),O("div",t,{ref:o,props:[{id:f},m]})},"SelectGroupLabel"));var q=I(Me(),1);var Tc=me.Root;function Pc(e){let t=(0,Ot.c)(8),o,n;t[0]!==e?({className:o,...n}=e,t[0]=e,t[1]=o,t[2]=n):(o=t[1],n=t[2]);let l;t[3]!==o?(l=ot("flex flex-1 text-start",o),t[3]=o,t[4]=l):l=t[4];let c;return t[5]!==n||t[6]!==l?(c=(0,q.jsx)(me.Value,{"data-slot":"select-value",className:l,...n}),t[5]=n,t[6]=l,t[7]=c):c=t[7],c}r(Pc,"W");function Mc({className:e,size:t="default",children:o,...n}){return(0,q.jsxs)(me.Trigger,{"data-slot":"select-trigger","data-size":t,className:ot("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pe-2 ps-2.5 text-xs whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-md *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[o,(0,q.jsx)(me.Icon,{render:(0,q.jsx)(At,{icon:ir,strokeWidth:2,className:"pointer-events-none size-4 text-muted-foreground"})})]})}r(Mc,"T");function Vc({className:e,children:t,side:o="bottom",sideOffset:n=4,align:l="center",alignOffset:c=0,alignItemWithTrigger:s=!0,...m}){return(0,q.jsx)(me.Portal,{children:(0,q.jsx)(me.Positioner,{side:o,sideOffset:n,align:l,alignOffset:c,alignItemWithTrigger:s,className:"isolate z-50",children:(0,q.jsxs)(me.Popup,{"data-slot":"select-content","data-align-trigger":s,className:ot("isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 animate-none! relative bg-popover before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!",e),...m,children:[(0,q.jsx)(wn,{}),(0,q.jsx)(me.List,{children:t}),(0,q.jsx)(Cn,{})]})})})}r(Vc,"$");function Oc(e){let t=(0,Ot.c)(13),o,n,l;t[0]!==e?({className:n,children:o,...l}=e,t[0]=e,t[1]=o,t[2]=n,t[3]=l):(o=t[1],n=t[2],l=t[3]);let c;t[4]!==n?(c=ot("relative flex w-full cursor-default items-center gap-2 rounded-md py-2 pe-8 ps-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",n),t[4]=n,t[5]=c):c=t[5];let s;t[6]!==o?(s=(0,q.jsx)(me.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:o}),t[6]=o,t[7]=s):s=t[7];let m;t[8]===Symbol.for("react.memo_cache_sentinel")?(m=(0,q.jsx)(me.ItemIndicator,{render:(0,q.jsx)("span",{className:"pointer-events-none absolute end-2 flex size-4 items-center justify-center"}),children:(0,q.jsx)(At,{icon:lr,strokeWidth:2,className:"pointer-events-none"})}),t[8]=m):m=t[8];let p;return t[9]!==l||t[10]!==c||t[11]!==s?(p=(0,q.jsxs)(me.Item,{"data-slot":"select-item",className:c,...l,children:[s,m]}),t[9]=l,t[10]=c,t[11]=s,t[12]=p):p=t[12],p}r(Oc,"A");function wn(e){let t=(0,Ot.c)(9),o,n;t[0]!==e?({className:o,...n}=e,t[0]=e,t[1]=o,t[2]=n):(o=t[1],n=t[2]);let l;t[3]!==o?(l=ot("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",o),t[3]=o,t[4]=l):l=t[4];let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=(0,q.jsx)(At,{icon:sr,strokeWidth:2}),t[5]=c):c=t[5];let s;return t[6]!==n||t[7]!==l?(s=(0,q.jsx)(me.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:l,...n,children:c}),t[6]=n,t[7]=l,t[8]=s):s=t[8],s}r(wn,"x");function Cn(e){let t=(0,Ot.c)(9),o,n;t[0]!==e?({className:o,...n}=e,t[0]=e,t[1]=o,t[2]=n):(o=t[1],n=t[2]);let l;t[3]!==o?(l=ot("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",o),t[3]=o,t[4]=l):l=t[4];let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=(0,q.jsx)(At,{icon:nr,strokeWidth:2}),t[5]=c):c=t[5];let s;return t[6]!==n||t[7]!==l?(s=(0,q.jsx)(me.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:l,...n,children:c}),t[6]=n,t[7]=l,t[8]=s):s=t[8],s}r(Cn,"w");export{Tc as a,Pc as b,Mc as c,Vc as d,Oc as e};
@@ -1 +0,0 @@
1
- import{a as O}from"./chunk-IGCNMZSB.js";import{b as C}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import"./chunk-QLQADHFE.js";import{a as L}from"./chunk-VDW32UET.js";import{c as $}from"./chunk-FZ2N52BV.js";import"./chunk-BDHAGUAY.js";import"./chunk-XBDKZZ67.js";import{a as I}from"./chunk-XQCVZAGU.js";import{a as k,b as A,c as D,d as g,e as c,f as l}from"./chunk-WJQLNYGX.js";import{a as b,e as S}from"./chunk-WQH3LT2P.js";import{d as w}from"./chunk-IUYFXK4X.js";import"./chunk-5DVJR52Z.js";import{a as p,e as y,g as j,h as E}from"./chunk-3XIESWL4.js";var _=y(j(),1);var t=y(E(),1);var T="container:",M={error:"error",sleep:"sleeping",start:"running",stop:"stopped"},W=p(e=>{let n=e.indexOf(":");if(n===-1)return{event:e.trim()};let r=e.slice(n+1).trim(),a=e.slice(0,n).trim();return r===""?{event:a}:{detail:r,event:a}},"_"),B=p(e=>{let n=new Map;for(let r of e){let a=r.functionPath??"";if(!a.startsWith(T))continue;let i=a.slice(T.length);if(i==="")continue;let s=JSON.stringify([i,r.instance??""]),o=n.get(s);if(o!==void 0&&o.timestamp>=r.timestamp)continue;let{detail:u,event:d}=W(r.message);n.set(s,{detail:u,event:d,exitCode:r.exitCode,instance:r.instance,level:r.level,name:i,state:M[d]??"unknown",timestamp:r.timestamp})}return[...n.values()].toSorted((r,a)=>r.name.localeCompare(a.name)||(r.instance??"").localeCompare(a.instance??""))},"j"),F={error:"destructive",running:"success",sleeping:"info",stopped:"outline",unknown:"secondary"},H=p(e=>{let{entries:n}=e??{};return Array.isArray(n)?n:[]},"W"),V=p(()=>{let e=(0,_.c)(19),n=w(),r,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={},a={live:!0,shardKey:""},e[0]=r,e[1]=a):(r=e[0],a=e[1]);let{data:i,error:s,liveError:o}=$(L.getLogs,r,a),u=i!==void 0,d;if(e[2]!==i||e[3]!==s||e[4]!==o||e[5]!==u||e[6]!==n){let N=B(H(i)),x;e[8]!==s?(x=s!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"containers-error",role:"alert",children:s}),e[8]=s,e[9]=x):x=e[9];let m;e[10]!==n?(m=n("Cloudflare Containers are observed from their lifecycle log stream. This shows the current state per instance \u2014 ports and health checks aren't carried in that stream."),e[10]=n,e[11]=m):m=e[11];let f;e[12]!==m?(f=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:m}),e[12]=m,e[13]=f):f=e[13];let h;e[14]!==o?(h=(0,t.jsx)(O,{message:o,prefix:"containers"}),e[14]=o,e[15]=h):h=e[15];let v;e[16]!==f||e[17]!==h?(v=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[f,h]}),e[16]=f,e[17]=h,e[18]=v):v=e[18],d=(0,t.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-containers-panel",children:[x,v,u&&N.length===0?(0,t.jsx)(I,{description:n("No container lifecycle activity yet. Instances declared with defineContainer show up here once they start, sleep, stop, or error."),testId:"containers-empty",title:n("No container activity")}):(0,t.jsx)(b,{className:"overflow-hidden py-0",children:(0,t.jsx)(S,{className:"px-0",children:(0,t.jsxs)(k,{"data-testid":"containers-table",children:[(0,t.jsx)(A,{children:(0,t.jsxs)(g,{children:[(0,t.jsx)(c,{children:n("Container")}),(0,t.jsx)(c,{children:n("Instance")}),(0,t.jsx)(c,{children:n("State")}),(0,t.jsx)(c,{children:n("Last event")}),(0,t.jsx)(c,{children:n("Detail")}),(0,t.jsx)(c,{children:n("Exit")}),(0,t.jsx)(c,{children:n("When")})]})}),(0,t.jsx)(D,{children:N.map(J)})]})})})]}),e[2]=i,e[3]=s,e[4]=o,e[5]=u,e[6]=n,e[7]=d}else d=e[7];return d},"H");function J(e){return(0,t.jsxs)(g,{"data-testid":`containers-row-${e.name}${e.instance===void 0?"":`-${e.instance}`}`,children:[(0,t.jsx)(l,{className:"font-mono text-xs",children:e.name}),(0,t.jsx)(l,{className:"max-w-40 truncate font-mono text-xs text-muted-foreground",title:e.instance,children:e.instance??"\u2014"}),(0,t.jsx)(l,{children:(0,t.jsx)(C,{variant:F[e.state],children:e.state})}),(0,t.jsx)(l,{className:"font-mono text-xs text-muted-foreground",children:e.event}),(0,t.jsx)(l,{className:"max-w-64 truncate text-xs text-muted-foreground",title:e.detail,children:e.detail??"\u2014"}),(0,t.jsx)(l,{className:"font-mono text-xs tabular-nums text-muted-foreground",children:e.exitCode??"\u2014"}),(0,t.jsx)(l,{className:"text-xs tabular-nums text-muted-foreground",children:new Date(e.timestamp).toLocaleString()})]},`${e.name}/${e.instance??""}`)}p(J,"B");export{V as default};
@@ -1 +0,0 @@
1
- import{a as y}from"./chunk-GRL5MG3Z.js";import{R as k}from"./chunk-CFPZYHPY.js";import{d as j}from"./chunk-IUYFXK4X.js";import{a as m,e as b,f as w,g as F,h as $}from"./chunk-3XIESWL4.js";var C=b(F(),1),h=b(w(),1);var a=b($(),1);var B=m(i=>{let t=(0,C.c)(21),{id:f,onChange:g,testId:e,value:v}=i,r=j(),u=(0,h.useId)(),[d]=(0,h.useState)(A),c;t[0]!==g?(c=m(S=>{g(S.target.value)},"m"),t[0]=g,t[1]=c):c=t[1];let x=c,s;t[2]!==r?(s=r("Shard key"),t[2]=r,t[3]=s):s=t[3];let I=d.length>0?u:void 0,o;t[4]!==r?(o=r("shard key (optional)"),t[4]=r,t[5]=o):o=t[5];let l;t[6]!==f||t[7]!==x||t[8]!==s||t[9]!==I||t[10]!==o||t[11]!==e||t[12]!==v?(l=(0,a.jsx)(k,{"aria-label":s,className:"h-8 w-48","data-testid":e,id:f,list:I,onChange:x,placeholder:o,value:v}),t[6]=f,t[7]=x,t[8]=s,t[9]=I,t[10]=o,t[11]=e,t[12]=v,t[13]=l):l=t[13];let n;t[14]!==u||t[15]!==d||t[16]!==e?(n=d.length>0&&(0,a.jsx)("datalist",{"data-testid":`${e}-recents`,id:u,children:d.map(N)}),t[14]=u,t[15]=d,t[16]=e,t[17]=n):n=t[17];let p;return t[18]!==l||t[19]!==n?(p=(0,a.jsxs)(a.Fragment,{children:[l,n]}),t[18]=l,t[19]=n,t[20]=p):p=t[20],p},"A");function A(){return y()}m(A,"F");function N(i){return(0,a.jsx)("option",{"aria-label":i,value:i},i)}m(N,"w");export{B as a};
@@ -1 +0,0 @@
1
- import{a as Qe}from"./chunk-3DH35OZ5.js";import{a as Me}from"./chunk-DNEIBTLL.js";import{a as Ve}from"./chunk-ESVP44Y3.js";import{a as Je}from"./chunk-3SCGCJYS.js";import{a as D}from"./chunk-5Y3QLNWX.js";import{a as He}from"./chunk-54MMVNPT.js";import{a as Ke}from"./chunk-FURI47Z2.js";import"./chunk-IVFHIQOT.js";import"./chunk-QBWRC5YX.js";import{R as B}from"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import{a as z}from"./chunk-MWIKAR7F.js";import"./chunk-DJZYD5I5.js";import"./chunk-2OUPA2WJ.js";import{b as T}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{b as Ge}from"./chunk-FZ2N52BV.js";import{f as E}from"./chunk-BDHAGUAY.js";import"./chunk-XBDKZZ67.js";import{a as Ze}from"./chunk-XQCVZAGU.js";import{a as Ue,b as _e,c as $e,d as L,e as U,f as _}from"./chunk-WJQLNYGX.js";import{a as we,e as Ce}from"./chunk-WQH3LT2P.js";import{d as W,h as je,m as Ae,o as ze,r as Ie}from"./chunk-IUYFXK4X.js";import"./chunk-5DVJR52Z.js";import{a as r,e as Le,f as Ye,g as et,h as tt}from"./chunk-3XIESWL4.js";var k=Le(Ye(),1);var Z=Le(et(),1);var t=Le(tt(),1);var at=r(()=>{let u=(0,Z.c)(3),{config:e,ready:l}=Me(),s;return u[0]!==e.capabilities||u[1]!==l?(s={capabilities:e.capabilities,ready:l},u[0]=e.capabilities,u[1]=l,u[2]=s):s=u[2],s},"et"),st={boolean:"checkbox",date:"datetime-local",number:"number",string:"text"},lt=r((u,e)=>u.type==="boolean"?!0:typeof e!="string"||e.trim()===""?!1:u.type!=="number"||!Number.isNaN(Number(e.trim())),"at"),rt=r((u,e)=>{if(u.type==="boolean")return e===!0?{value:!0}:u.required?{value:!1}:void 0;let l=typeof e=="string"?e.trim():"";if(l!==""){if(u.type==="number"){let s=Number(l);return Number.isNaN(s)?void 0:{value:s}}return{value:l}}},"lt"),it=r(u=>{let e=(0,Z.c)(105),{onClose:l,onCreated:s}=u,c=E(),a=W(),{config:o}=Me(),{busy:i,error:n,run:m}=Je(),[w,S]=(0,k.useState)(""),[b,C]=(0,k.useState)(""),[y,I]=(0,k.useState)(""),[h,g]=(0,k.useState)(""),v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={},e[0]=v):v=e[0];let[f,d]=(0,k.useState)(v),A;e[1]===Symbol.for("react.memo_cache_sentinel")?(A=r(p=>{S(p.target.value)},"C"),e[1]=A):A=e[1];let x=A,F;e[2]===Symbol.for("react.memo_cache_sentinel")?(F=r(p=>{C(p.target.value)},"F"),e[2]=F):F=e[2];let O=F,P;e[3]===Symbol.for("react.memo_cache_sentinel")?(P=r(p=>{I(p.target.value)},"P"),e[3]=P):P=e[3];let Be=P,G;e[4]===Symbol.for("react.memo_cache_sentinel")?(G=r(p=>{g(p.target.value)},"O"),e[4]=G):G=e[4];let Te=G,H;e[5]===Symbol.for("react.memo_cache_sentinel")?(H=r((p,$)=>{d(V=>({...V,[p]:$}))},"G"),e[5]=H):H=e[5];let Pe=H,J;e[6]!==f?(J=r(p=>f[p.name]??(p.type==="boolean"?!1:""),"H"),e[6]=f,e[7]=J):J=e[7];let R=J,K;if(e[8]!==o.userFields||e[9]!==R){let p;e[11]!==R?(p=r($=>!$.required||lt($,R($)),"p"),e[11]=R,e[12]=p):p=e[12],K=o.userFields.every(p),e[8]=o.userFields,e[9]=R,e[10]=K}else K=e[10];let Fe=K,Q;e[13]!==i||e[14]!==w||e[15]!==b||e[16]!==Fe?(Q=!i&&w.trim()!==""&&b.trim()!==""&&Fe,e[13]=i,e[14]=w,e[15]=b,e[16]=Fe,e[17]=Q):Q=e[17];let De=Q,X;e[18]!==o.userFields||e[19]!==R?(X=r(()=>{let p={};for(let $ of o.userFields){let V=rt($,R($));V!==void 0&&(p[$.name]=V.value)}return Object.keys(p).length===0?void 0:p},"W"),e[18]=o.userFields,e[19]=R,e[20]=X):X=e[20];let Se=X,Y;e[21]!==Se||e[22]!==c||e[23]!==w||e[24]!==b||e[25]!==l||e[26]!==s||e[27]!==y||e[28]!==h||e[29]!==m?(Y=r(()=>{m(async()=>{await c.createAuthUser({data:Se(),email:w.trim(),name:b.trim(),password:y===""?void 0:y,role:h.trim()===""?void 0:h.trim()}),s(),l()})},"Z"),e[21]=Se,e[22]=c,e[23]=w,e[24]=b,e[25]=l,e[26]=s,e[27]=y,e[28]=h,e[29]=m,e[30]=Y):Y=e[30];let N=Y,j;e[31]!==a?(j=a("Create user"),e[31]=a,e[32]=j):j=e[32];let q;e[33]!==a?(q=a("Create user"),e[33]=a,e[34]=q):q=e[34];let M;e[35]!==q?(M=(0,t.jsx)("h2",{className:"text-sm font-semibold text-foreground",children:q}),e[35]=q,e[36]=M):M=e[36];let ee;e[37]!==a?(ee=a("email"),e[37]=a,e[38]=ee):ee=e[38];let te;e[39]!==ee?(te=(0,t.jsx)(D,{htmlFor:"uc-email",children:ee}),e[39]=ee,e[40]=te):te=e[40];let ae;e[41]!==w?(ae=(0,t.jsx)(B,{"data-testid":"uc-email",id:"uc-email",onChange:x,type:"email",value:w}),e[41]=w,e[42]=ae):ae=e[42];let se;e[43]!==te||e[44]!==ae?(se=(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[te,ae]}),e[43]=te,e[44]=ae,e[45]=se):se=e[45];let le;e[46]!==a?(le=a("name"),e[46]=a,e[47]=le):le=e[47];let re;e[48]!==le?(re=(0,t.jsx)(D,{htmlFor:"uc-name",children:le}),e[48]=le,e[49]=re):re=e[49];let ie;e[50]!==b?(ie=(0,t.jsx)(B,{"data-testid":"uc-name",id:"uc-name",onChange:O,value:b}),e[50]=b,e[51]=ie):ie=e[51];let ne;e[52]!==re||e[53]!==ie?(ne=(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[re,ie]}),e[52]=re,e[53]=ie,e[54]=ne):ne=e[54];let de;e[55]!==a?(de=a("Password (optional)"),e[55]=a,e[56]=de):de=e[56];let oe;e[57]!==de?(oe=(0,t.jsx)(D,{htmlFor:"uc-password",children:de}),e[57]=de,e[58]=oe):oe=e[58];let ce;e[59]!==y?(ce=(0,t.jsx)(B,{"data-testid":"uc-password",id:"uc-password",onChange:Be,type:"password",value:y}),e[59]=y,e[60]=ce):ce=e[60];let ue;e[61]!==oe||e[62]!==ce?(ue=(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[oe,ce]}),e[61]=oe,e[62]=ce,e[63]=ue):ue=e[63];let me;e[64]!==a?(me=a("Role (optional)"),e[64]=a,e[65]=me):me=e[65];let he;e[66]!==me?(he=(0,t.jsx)(D,{htmlFor:"uc-role",children:me}),e[66]=me,e[67]=he):he=e[67];let pe;e[68]!==h?(pe=(0,t.jsx)(B,{"data-testid":"uc-role",id:"uc-role",onChange:Te,value:h}),e[68]=h,e[69]=pe):pe=e[69];let fe;e[70]!==he||e[71]!==pe?(fe=(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[he,pe]}),e[70]=he,e[71]=pe,e[72]=fe):fe=e[72];let ve;e[73]!==o.userFields||e[74]!==R||e[75]!==a?(ve=o.userFields.length>0&&(0,t.jsxs)("div",{className:"flex flex-col gap-3 border-t border-border pt-3","data-testid":"uc-plugin-fields",children:[(0,t.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:a("Plugin fields")}),o.userFields.map(p=>{let $=`uc-field-${p.name}`,V=p.required?"":` (${a("optional")})`;if(p.type==="boolean"){let qe=R(p)===!0;return(0,t.jsxs)("label",{className:"flex items-center gap-2",htmlFor:$,children:[(0,t.jsx)(Qe,{checked:qe,"data-testid":$,id:$,onCheckedChange:r(Xe=>{Pe(p.name,Xe)},"onCheckedChange")}),(0,t.jsxs)("span",{className:"text-sm",children:[p.name,V]})]},p.name)}let We=R(p);return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)(D,{htmlFor:$,children:[p.name,V]}),(0,t.jsx)(B,{"data-testid":$,id:$,onChange:r(qe=>{Pe(p.name,qe.target.value)},"onChange"),type:st[p.type],value:typeof We=="string"?We:""})]},p.name)})]}),e[73]=o.userFields,e[74]=R,e[75]=a,e[76]=ve):ve=e[76];let xe;e[77]!==n?(xe=n!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"uc-error",role:"alert",children:n}),e[77]=n,e[78]=xe):xe=e[78];let be;e[79]!==a?(be=a("Cancel"),e[79]=a,e[80]=be):be=e[80];let ye;e[81]!==l||e[82]!==be?(ye=(0,t.jsx)(z,{"data-testid":"uc-cancel",onClick:l,size:"sm",type:"button",variant:"outline",children:be}),e[81]=l,e[82]=be,e[83]=ye):ye=e[83];let Oe=!De,ge;e[84]!==i||e[85]!==a?(ge=a(i?"Creating\u2026":"Create"),e[84]=i,e[85]=a,e[86]=ge):ge=e[86];let Ne;e[87]!==N||e[88]!==Oe||e[89]!==ge?(Ne=(0,t.jsx)(z,{"data-testid":"uc-submit",disabled:Oe,onClick:N,size:"sm",type:"button",children:ge}),e[87]=N,e[88]=Oe,e[89]=ge,e[90]=Ne):Ne=e[90];let ke;e[91]!==ye||e[92]!==Ne?(ke=(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[ye,Ne]}),e[91]=ye,e[92]=Ne,e[93]=ke):ke=e[93];let Re;return e[94]!==l||e[95]!==j||e[96]!==M||e[97]!==se||e[98]!==ne||e[99]!==ue||e[100]!==fe||e[101]!==ve||e[102]!==xe||e[103]!==ke?(Re=(0,t.jsxs)(Ve,{label:j,onClose:l,panelTestId:"uc-dialog",testId:"uc-overlay",variant:"dialog",children:[M,se,ne,ue,fe,ve,xe,ke]}),e[94]=l,e[95]=j,e[96]=M,e[97]=se,e[98]=ne,e[99]=ue,e[100]=fe,e[101]=ve,e[102]=xe,e[103]=ke,e[104]=Re):Re=e[104],Re},"st"),Ee=r(u=>{let e=(0,Z.c)(2),{children:l}=u,s;return e[0]!==l?(s=(0,t.jsx)("h3",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l}),e[0]=l,e[1]=s):s=e[1],s},"Le"),nt=r(u=>{let e=(0,Z.c)(29),{busy:l,runAction:s,userId:c,version:a}=u,o=E(),i=W(),[n,m]=(0,k.useState)(null),[w,S]=(0,k.useState)(null),b;e[0]!==o||e[1]!==c?(b=r(()=>{ze((async()=>{S(null);try{let x=await o.listAuthSessions({limit:50,userId:c});m(x.rows)}catch(x){let F=x;m(null),S(je(F))}})())},"x"),e[0]=o,e[1]=c,e[2]=b):b=e[2];let C;e[3]!==o||e[4]!==c||e[5]!==a?(C=[o,c,a],e[3]=o,e[4]=c,e[5]=a,e[6]=C):C=e[6],(0,k.useEffect)(b,C);let y;e[7]!==o||e[8]!==s?(y=r(x=>{s(()=>o.revokeAuthSession({sessionId:x}))},"y"),e[7]=o,e[8]=s,e[9]=y):y=e[9];let I=y,h;e[10]!==i?(h=i("Sessions"),e[10]=i,e[11]=h):h=e[11];let g;e[12]!==h?(g=(0,t.jsx)(Ee,{children:h}),e[12]=h,e[13]=g):g=e[13];let v;e[14]!==w?(v=w!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"ud-sessions-error",role:"alert",children:w}),e[14]=w,e[15]=v):v=e[15];let f;e[16]!==n||e[17]!==i?(f=n!==null&&n.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"ud-sessions-empty",children:i("No active sessions.")}),e[16]=n,e[17]=i,e[18]=f):f=e[18];let d;e[19]!==l||e[20]!==I||e[21]!==n||e[22]!==i?(d=n!==null&&n.length>0&&(0,t.jsx)(we,{className:"overflow-hidden py-0",children:(0,t.jsx)(Ce,{className:"px-0",children:(0,t.jsxs)(Ue,{"data-testid":"ud-sessions-table",children:[(0,t.jsx)(_e,{children:(0,t.jsxs)(L,{children:[(0,t.jsx)(U,{children:i("expires")}),(0,t.jsx)(U,{children:i("ip")}),(0,t.jsx)(U,{children:i("user agent")}),(0,t.jsx)(U,{"aria-label":i("Actions")})]})}),(0,t.jsx)($e,{children:n.map(x=>(0,t.jsxs)(L,{"data-testid":`ud-session-${x.id}`,children:[(0,t.jsx)(_,{className:"text-muted-foreground tabular-nums",children:Ie(x.expiresAt)}),(0,t.jsx)(_,{children:x.ipAddress??""}),(0,t.jsx)(_,{className:"max-w-40 truncate",children:x.userAgent??""}),(0,t.jsx)(_,{children:(0,t.jsx)(z,{"data-testid":`ud-revoke-${x.id}`,disabled:l,onClick:r(()=>{I(x.id)},"onClick"),size:"xs",type:"button",variant:"ghost",children:i("Revoke")})})]},x.id))})]})})}),e[19]=l,e[20]=I,e[21]=n,e[22]=i,e[23]=d):d=e[23];let A;return e[24]!==g||e[25]!==v||e[26]!==f||e[27]!==d?(A=(0,t.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"ud-sessions",children:[g,v,f,d]}),e[24]=g,e[25]=v,e[26]=f,e[27]=d,e[28]=A):A=e[28],A},"rt"),dt=r(u=>{let e=(0,Z.c)(30),{busy:l,runAction:s,userId:c,version:a}=u,o=E(),i=W(),[n,m]=(0,k.useState)(null),[w,S]=(0,k.useState)(null),b;e[0]!==o||e[1]!==c?(b=r(()=>{ze((async()=>{S(null);try{m(await o.listAuthAccounts({userId:c}))}catch(x){let F=x;m(null),S(je(F))}})())},"x"),e[0]=o,e[1]=c,e[2]=b):b=e[2];let C;e[3]!==o||e[4]!==c||e[5]!==a?(C=[o,c,a],e[3]=o,e[4]=c,e[5]=a,e[6]=C):C=e[6],(0,k.useEffect)(b,C);let y;e[7]!==o||e[8]!==s||e[9]!==c?(y=r(x=>{s(()=>o.unlinkAuthAccount({accountId:x,userId:c}))},"y"),e[7]=o,e[8]=s,e[9]=c,e[10]=y):y=e[10];let I=y,h;e[11]!==i?(h=i("Linked accounts"),e[11]=i,e[12]=h):h=e[12];let g;e[13]!==h?(g=(0,t.jsx)(Ee,{children:h}),e[13]=h,e[14]=g):g=e[14];let v;e[15]!==w?(v=w!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:w}),e[15]=w,e[16]=v):v=e[16];let f;e[17]!==n||e[18]!==i?(f=n!==null&&n.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("No linked accounts.")}),e[17]=n,e[18]=i,e[19]=f):f=e[19];let d;e[20]!==n||e[21]!==l||e[22]!==I||e[23]!==i?(d=n!==null&&n.length>0&&(0,t.jsx)(we,{className:"overflow-hidden py-0",children:(0,t.jsx)(Ce,{className:"px-0",children:(0,t.jsxs)(Ue,{"data-testid":"ud-accounts-table",children:[(0,t.jsx)(_e,{children:(0,t.jsxs)(L,{children:[(0,t.jsx)(U,{children:i("provider")}),(0,t.jsx)(U,{children:i("created")}),(0,t.jsx)(U,{"aria-label":i("Actions")})]})}),(0,t.jsx)($e,{children:n.map(x=>{let F=Ae(x.id);return(0,t.jsxs)(L,{"data-testid":`ud-account-${F}`,children:[(0,t.jsx)(_,{children:Ae(x.providerId)}),(0,t.jsx)(_,{className:"text-muted-foreground tabular-nums",children:Ie(x.createdAt)}),(0,t.jsx)(_,{children:(0,t.jsx)(z,{"data-testid":`ud-unlink-${F}`,disabled:l,onClick:r(()=>{I(F)},"onClick"),size:"xs",type:"button",variant:"ghost",children:i("Unlink")})})]},F)})})]})})}),e[20]=n,e[21]=l,e[22]=I,e[23]=i,e[24]=d):d=e[24];let A;return e[25]!==g||e[26]!==v||e[27]!==f||e[28]!==d?(A=(0,t.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"ud-accounts",children:[g,v,f,d]}),e[25]=g,e[26]=v,e[27]=f,e[28]=d,e[29]=A):A=e[29],A},"it"),ot=r(u=>{let e=(0,Z.c)(40),{busy:l,capabilities:s,runAction:c,userId:a,version:o}=u,i=E(),n=W(),[m,w]=(0,k.useState)(null),S;e[0]!==s.passkey||e[1]!==i||e[2]!==a?(S=r(()=>{s.passkey&&ze((async()=>{try{w(await i.listAuthPasskeys({userId:a}))}catch{w(null)}})())},"I"),e[0]=s.passkey,e[1]=i,e[2]=a,e[3]=S):S=e[3];let b;e[4]!==s.passkey||e[5]!==i||e[6]!==a||e[7]!==o?(b=[s.passkey,i,a,o],e[4]=s.passkey,e[5]=i,e[6]=a,e[7]=o,e[8]=b):b=e[8],(0,k.useEffect)(S,b);let C;e[9]!==i||e[10]!==c||e[11]!==a?(C=r(()=>{c(()=>i.disableAuthTwoFactor({userId:a}))},"w"),e[9]=i,e[10]=c,e[11]=a,e[12]=C):C=e[12];let y=C,I;e[13]!==i||e[14]!==c?(I=r(F=>{c(()=>i.deleteAuthPasskey({passkeyId:F}))},"A"),e[13]=i,e[14]=c,e[15]=I):I=e[15];let h=I,g;e[16]!==n?(g=n("Security"),e[16]=n,e[17]=g):g=e[17];let v;e[18]!==g?(v=(0,t.jsx)(Ee,{children:g}),e[18]=g,e[19]=v):v=e[19];let f;e[20]!==l||e[21]!==s.twoFactor||e[22]!==y||e[23]!==n?(f=s.twoFactor&&(0,t.jsx)(z,{"data-testid":"ud-disable-2fa",disabled:l,onClick:y,size:"sm",type:"button",variant:"outline",children:n("Disable two-factor")}),e[20]=l,e[21]=s.twoFactor,e[22]=y,e[23]=n,e[24]=f):f=e[24];let d;e[25]!==s.passkey||e[26]!==m||e[27]!==n?(d=s.passkey&&m!==null&&m.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:n("No passkeys.")}),e[25]=s.passkey,e[26]=m,e[27]=n,e[28]=d):d=e[28];let A;e[29]!==l||e[30]!==s.passkey||e[31]!==h||e[32]!==m||e[33]!==n?(A=s.passkey&&m!==null&&m.length>0&&(0,t.jsx)(we,{className:"overflow-hidden py-0",children:(0,t.jsx)(Ce,{className:"px-0",children:(0,t.jsxs)(Ue,{"data-testid":"ud-passkeys-table",children:[(0,t.jsx)(_e,{children:(0,t.jsxs)(L,{children:[(0,t.jsx)(U,{children:n("name")}),(0,t.jsx)(U,{children:n("created")}),(0,t.jsx)(U,{"aria-label":n("Actions")})]})}),(0,t.jsx)($e,{children:m.map(F=>{let O=Ae(F.id);return(0,t.jsxs)(L,{"data-testid":`ud-passkey-${O}`,children:[(0,t.jsx)(_,{children:Ae(F.name)||O}),(0,t.jsx)(_,{className:"text-muted-foreground tabular-nums",children:Ie(F.createdAt)}),(0,t.jsx)(_,{children:(0,t.jsx)(z,{"data-testid":`ud-delete-passkey-${O}`,disabled:l,onClick:r(()=>{h(O)},"onClick"),size:"xs",type:"button",variant:"ghost",children:n("Delete")})})]},O)})})]})})}),e[29]=l,e[30]=s.passkey,e[31]=h,e[32]=m,e[33]=n,e[34]=A):A=e[34];let x;return e[35]!==v||e[36]!==f||e[37]!==d||e[38]!==A?(x=(0,t.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"ud-security",children:[v,f,d,A]}),e[35]=v,e[36]=f,e[37]=d,e[38]=A,e[39]=x):x=e[39],x},"nt"),ct=/(?:at|expires)$/iu,ut=new Set(["banExpires","banned","banReason","email","emailVerified","id","name","role"]),mt=r((u,e)=>typeof e=="number"&&ct.test(u)?Ie(e):Ae(e),"ct"),ht=r(({capabilities:u,onChanged:e,onClose:l,user:s})=>{let c=E(),a=W(),o=s.banned===!0,[i,n]=(0,k.useState)(null),[m,w]=(0,k.useState)(!1),[S,b]=(0,k.useState)(0),[C,y]=(0,k.useState)(typeof s.role=="string"?s.role:""),[I,h]=(0,k.useState)(""),[g,v]=(0,k.useState)(""),[f,d]=(0,k.useState)(""),[A,x]=(0,k.useState)(null),[F,O]=(0,k.useState)(!1),P=r((N,j)=>{ze((async()=>{w(!0),n(null);try{let q=await N();j?.refresh!==!1&&(b(M=>M+1),e()),j?.onResult?.(q)}catch(q){n(je(q))}w(!1)})())},"P"),Be=r(N=>{y(N.target.value)},"De"),G=r(N=>{h(N.target.value)},"O"),Te=r(N=>{v(N.target.value)},"je"),H=r(N=>{d(N.target.value)},"G"),Pe=r(()=>{let N=C.trim();N!==""&&P(async()=>{await c.setAuthUserRole({role:N,userId:s.id})})},"Se"),J=r(()=>{let N=Number.parseInt(g,10),j=Number.isFinite(N)&&N>0?N*86400:void 0;P(async()=>{await c.banAuthUser({expiresInSeconds:j,reason:I.trim()===""?void 0:I.trim(),userId:s.id})})},"H"),R=r(()=>{P(async()=>{await c.unbanAuthUser({userId:s.id})})},"R"),K=r(()=>{P(async()=>{await c.setAuthUserPassword({newPassword:f,userId:s.id}),d("")})},"J"),Fe=r(()=>{P(()=>c.impersonateAuthUser({userId:s.id}),{onResult:r(N=>{x(N.token)},"onResult"),refresh:!1})},"we"),Q=r(()=>{P(async()=>{await c.revokeAuthUserSessions({userId:s.id})})},"K"),De=r(()=>{P(async()=>{await c.removeAuthUser({userId:s.id}),l()})},"Te"),X=r(()=>{O(!0)},"W"),Se=r(()=>{O(!1)},"Ce"),Y=Object.entries(s).filter(([N])=>!ut.has(N));return(0,t.jsxs)(Ve,{label:a("User details"),onClose:l,panelTestId:"ud-panel",testId:"ud-overlay",variant:"drawer",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-foreground",children:s.name??s.email??s.id}),(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:s.id}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 pt-1",children:[typeof s.role=="string"&&s.role!==""&&(0,t.jsx)(T,{variant:"secondary",children:s.role}),o?(0,t.jsx)(T,{variant:"destructive",children:a("Banned")}):(0,t.jsx)(T,{variant:"outline",children:a("Active")}),s.emailVerified===!0?(0,t.jsx)(T,{variant:"secondary",children:a("verified")}):(0,t.jsx)(T,{variant:"outline",children:a("unverified")})]})]}),(0,t.jsx)(z,{"data-testid":"ud-close",onClick:l,size:"sm",type:"button",variant:"ghost",children:a("Close")})]}),i!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"ud-action-error",role:"alert",children:i}),u.admin&&(0,t.jsxs)(we,{className:"gap-0 py-0",children:[(0,t.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,t.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:a("Actions")})}),(0,t.jsxs)(Ce,{className:"flex flex-col gap-3 p-3",children:[(0,t.jsxs)("div",{className:"flex items-end gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-1",children:[(0,t.jsx)(D,{htmlFor:"ud-role",children:a("Role")}),(0,t.jsx)(B,{"data-testid":"ud-role-input",id:"ud-role",onChange:Be,value:C})]}),(0,t.jsx)(z,{"data-testid":"ud-set-role",disabled:m||C.trim()==="",onClick:Pe,size:"sm",type:"button",variant:"outline",children:a("Set role")})]}),o?(0,t.jsx)(z,{"data-testid":"ud-unban",disabled:m,onClick:R,size:"sm",type:"button",variant:"outline",children:a("Unban")}):(0,t.jsxs)("div",{className:"flex items-end gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-1",children:[(0,t.jsx)(D,{htmlFor:"ud-ban-reason",children:a("Ban reason (optional)")}),(0,t.jsx)(B,{"data-testid":"ud-ban-reason",id:"ud-ban-reason",onChange:G,value:I})]}),(0,t.jsxs)("div",{className:"flex w-24 flex-col gap-1",children:[(0,t.jsx)(D,{htmlFor:"ud-ban-days",children:a("Days")}),(0,t.jsx)(B,{"data-testid":"ud-ban-days",id:"ud-ban-days",onChange:Te,type:"number",value:g})]}),(0,t.jsx)(z,{"data-testid":"ud-ban",disabled:m,onClick:J,size:"sm",type:"button",variant:"destructive",children:a("Ban user")})]}),(0,t.jsxs)("div",{className:"flex items-end gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-1",children:[(0,t.jsx)(D,{htmlFor:"ud-password",children:a("New password")}),(0,t.jsx)(B,{"data-testid":"ud-password",id:"ud-password",onChange:H,type:"password",value:f})]}),(0,t.jsx)(z,{"data-testid":"ud-set-password",disabled:m||f==="",onClick:K,size:"sm",type:"button",variant:"outline",children:a("Set password")})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(z,{"data-testid":"ud-impersonate",disabled:m,onClick:Fe,size:"sm",type:"button",variant:"outline",children:a("Impersonate")}),(0,t.jsx)(z,{"data-testid":"ud-revoke-all",disabled:m,onClick:Q,size:"sm",type:"button",variant:"outline",children:a("Revoke all sessions")}),F?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(z,{"data-testid":"ud-delete-confirm",disabled:m,onClick:De,size:"sm",type:"button",variant:"destructive",children:a("Confirm delete")}),(0,t.jsx)(z,{"data-testid":"ud-delete-cancel",onClick:Se,size:"sm",type:"button",variant:"ghost",children:a("Cancel")})]}):(0,t.jsx)(z,{"data-testid":"ud-delete",disabled:m,onClick:X,size:"sm",type:"button",variant:"destructive",children:a("Delete user")})]}),A!==null&&(0,t.jsxs)("div",{className:"flex flex-col gap-1","data-testid":"ud-impersonation",children:[(0,t.jsx)(D,{htmlFor:"ud-token",children:a("Impersonation token")}),(0,t.jsx)(B,{"data-testid":"ud-token",id:"ud-token",readOnly:!0,value:A})]})]})]}),(0,t.jsx)(nt,{busy:m,runAction:P,userId:s.id,version:S}),u.accounts&&(0,t.jsx)(dt,{busy:m,runAction:P,userId:s.id,version:S}),(u.twoFactor||u.passkey)&&(0,t.jsx)(ot,{busy:m,capabilities:u,runAction:P,userId:s.id,version:S}),(0,t.jsxs)("div",{className:"flex flex-col gap-1","data-testid":"ud-fields",children:[(0,t.jsx)("h3",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:a("Fields")}),(0,t.jsx)("dl",{className:"flex flex-col",children:Y.map(([N,j])=>(0,t.jsxs)("div",{className:"flex flex-col border-t border-border py-1.5",children:[(0,t.jsx)("dt",{className:"text-xs font-semibold text-muted-foreground",children:N}),(0,t.jsx)("dd",{className:"m-0 font-mono text-xs break-words",children:mt(N,j)})]},N))})]})]})},"ut"),pt=50,$t=r(({pageSize:u=pt}={})=>{let e=E(),l=W(),[s,c]=(0,k.useState)(""),[a,o]=(0,k.useState)(""),i=Ke(s),[n,m]=(0,k.useState)(null),[w,S]=(0,k.useState)(!1),{capabilities:b}=at(),C=i.trim(),y=a.trim(),I=Ge(["lunora-auth-users",C,y,u],()=>e.listAuthUsers({filterField:y===""?void 0:"role",filterValue:y===""?void 0:y,limit:u,search:C===""?void 0:C}),{keepPreviousData:!0}),h=I.data?.rows??null,g=I.error,v=r(()=>{I.refetch()},"v");He(()=>{I.refetch()},!0);let f=n===null?null:h?.find(d=>d.id===n)??null;return(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-users",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(B,{"aria-label":l("Search users"),className:"w-56","data-testid":"us-search",onChange:r(d=>{c(d.target.value)},"onChange"),placeholder:l("Search by email or name\u2026"),value:s}),(0,t.jsx)(B,{"aria-label":l("Filter by role"),className:"w-40","data-testid":"us-role-filter",onChange:r(d=>{o(d.target.value)},"onChange"),placeholder:l("Filter by role"),value:a}),(0,t.jsx)(z,{"data-testid":"us-new",onClick:r(()=>{S(!0)},"onClick"),size:"sm",type:"button",children:l("New user")})]}),g!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"us-users-error",role:"alert",children:g}),h!==null&&h.length===0&&(0,t.jsx)(Ze,{description:l("Users who sign up to your app will appear here."),icon:(0,t.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M16 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M9.5 10a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm11.5 10v-2a4 4 0 0 0-3-3.85"})}),testId:"us-empty",title:l("No users.")}),h!==null&&h.length>0&&(0,t.jsx)(we,{className:"overflow-hidden py-0",children:(0,t.jsx)(Ce,{className:"px-0",children:(0,t.jsxs)(Ue,{"data-testid":"us-table",children:[(0,t.jsx)(_e,{children:(0,t.jsxs)(L,{children:[(0,t.jsx)(U,{children:l("id")}),(0,t.jsx)(U,{children:l("email")}),(0,t.jsx)(U,{children:l("name")}),(0,t.jsx)(U,{children:l("role")}),(0,t.jsx)(U,{children:l("status")}),(0,t.jsx)(U,{children:l("verified")}),(0,t.jsx)(U,{children:l("created")}),(0,t.jsx)(U,{"aria-label":l("Actions")})]})}),(0,t.jsx)($e,{children:h.map(d=>(0,t.jsxs)(L,{"data-testid":`us-row-${d.id}`,children:[(0,t.jsx)(_,{className:"font-mono text-xs",children:d.id}),(0,t.jsx)(_,{children:d.email??""}),(0,t.jsx)(_,{children:d.name??""}),(0,t.jsx)(_,{children:typeof d.role=="string"&&d.role!==""?(0,t.jsx)(T,{variant:"secondary",children:d.role}):""}),(0,t.jsx)(_,{children:d.banned===!0?(0,t.jsx)(T,{variant:"destructive",children:l("Banned")}):(0,t.jsx)(T,{variant:"success",children:l("Active")})}),(0,t.jsx)(_,{children:d.emailVerified===!0?(0,t.jsx)(T,{variant:"success",children:l("yes")}):(0,t.jsx)(T,{variant:"outline",children:l("no")})}),(0,t.jsx)(_,{className:"text-muted-foreground tabular-nums",children:Ie(d.createdAt)}),(0,t.jsx)(_,{children:(0,t.jsx)(z,{"data-testid":`us-manage-${d.id}`,onClick:r(()=>{m(d.id)},"onClick"),size:"xs",type:"button",variant:"ghost",children:l("Manage")})})]},d.id))})]})})}),f!==null&&(0,t.jsx)(ht,{capabilities:b,onChanged:v,onClose:r(()=>{m(null)},"onClose"),user:f}),w&&(0,t.jsx)(it,{onClose:r(()=>{S(!1)},"onClose"),onCreated:v})]})},"Pt");export{$t as UsersPanel};
@@ -1,4 +0,0 @@
1
- import{b as Ue}from"./chunk-WPK2Q33V.js";import{c as _e}from"./chunk-XF2B7P5A.js";import"./chunk-GG6PIGQO.js";import"./chunk-SD4BERSA.js";import"./chunk-IC4L6G56.js";import{a as ye}from"./chunk-3DH35OZ5.js";import"./chunk-ESVP44Y3.js";import{a as Re}from"./chunk-54MMVNPT.js";import"./chunk-I6A5C46N.js";import"./chunk-2QSHLBCO.js";import"./chunk-BGBLQ563.js";import"./chunk-IVFHIQOT.js";import"./chunk-QBWRC5YX.js";import{a as Le}from"./chunk-Y32QIKBS.js";import{a as De}from"./chunk-RMN2JN4S.js";import"./chunk-GRL5MG3Z.js";import"./chunk-7T7UOTYK.js";import{R as Ne}from"./chunk-CFPZYHPY.js";import"./chunk-T6VMSOBB.js";import"./chunk-7QIFDWQV.js";import{a as re}from"./chunk-MWIKAR7F.js";import"./chunk-DJZYD5I5.js";import"./chunk-2OUPA2WJ.js";import{b as ae}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as be}from"./chunk-VDW32UET.js";import{f as Se}from"./chunk-BDHAGUAY.js";import"./chunk-XBDKZZ67.js";import{a as he}from"./chunk-XQCVZAGU.js";import{a as $e,b as Te,c as Fe,d as ce,e as ne,f as ee}from"./chunk-WJQLNYGX.js";import{a as je,e as ze}from"./chunk-WQH3LT2P.js";import{d as Ce,f as me,g as ge,h as X,l as pe,o as W,q as Ke}from"./chunk-IUYFXK4X.js";import"./chunk-5DVJR52Z.js";import{a as g,e as fe,f as mt,g as gt,h as pt}from"./chunk-3XIESWL4.js";var M=fe(gt(),1),j=fe(mt(),1);var n=fe(pt(),1);var Oe=g((d,e,t)=>{let{onCopy:r,onDelete:s,onDownload:o,onToggleSelect:c}=t,i=g(()=>{r(d.key)},"i"),l=g(()=>{o(d.key)},"o"),u=g(()=>{s(d.key)},"u"),h=g(()=>{c(d.key)},"h");return{copy:i,download:l,name:d.key.slice(e.length),remove:u,toggle:h}},"Ke"),Me=g(d=>{let e=(0,M.c)(31),{busy:t,buttonClassName:r,copied:s,objectKey:o,onCopy:c,onDelete:i,onDownload:l,t:u}=d,h=`storage-copy-${o}`,f;e[0]!==s||e[1]!==u?(f=u(s?"Copied":"Copy URL"),e[0]=s,e[1]=u,e[2]=f):f=e[2];let m;e[3]!==t||e[4]!==r||e[5]!==c||e[6]!==h||e[7]!==f?(m=(0,n.jsx)(re,{className:r,"data-testid":h,disabled:t,onClick:c,size:"sm",type:"button",variant:"ghost",children:f}),e[3]=t,e[4]=r,e[5]=c,e[6]=h,e[7]=f,e[8]=m):m=e[8];let w=`storage-download-${o}`,a;e[9]!==u?(a=u("Download"),e[9]=u,e[10]=a):a=e[10];let k;e[11]!==t||e[12]!==r||e[13]!==l||e[14]!==w||e[15]!==a?(k=(0,n.jsx)(re,{className:r,"data-testid":w,disabled:t,onClick:l,size:"sm",type:"button",variant:"ghost",children:a}),e[11]=t,e[12]=r,e[13]=l,e[14]=w,e[15]=a,e[16]=k):k=e[16];let C;e[17]!==u?(C=u("Delete object?"),e[17]=u,e[18]=C):C=e[18];let x=`storage-delete-${o}`,b;e[19]!==u?(b=u("Delete"),e[19]=u,e[20]=b):b=e[20];let v;e[21]!==t||e[22]!==i||e[23]!==C||e[24]!==x||e[25]!==b?(v=(0,n.jsx)(Le,{confirmLabel:C,disabled:t,onConfirm:i,testId:x,children:b}),e[21]=t,e[22]=i,e[23]=C,e[24]=x,e[25]=b,e[26]=v):v=e[26];let y;return e[27]!==v||e[28]!==m||e[29]!==k?(y=(0,n.jsxs)(n.Fragment,{children:[m,k,v]}),e[27]=v,e[28]=m,e[29]=k,e[30]=y):y=e[30],y},"De"),Ae=g(d=>{let e=(0,M.c)(14),{objectKey:t,references:r,t:s}=d;if(r===void 0)return null;if(r.length===0){let h=`storage-orphan-${t}`,f;e[0]!==s?(f=s("Orphan"),e[0]=s,e[1]=f):f=e[1];let m;return e[2]!==h||e[3]!==f?(m=(0,n.jsx)(ae,{"data-testid":h,variant:"warning",children:f}),e[2]=h,e[3]=f,e[4]=m):m=e[4],m}let o;e[5]!==r?(o=r.map(bt).join(`
2
- `),e[5]=r,e[6]=o):o=e[6];let c=o,i=`storage-refs-${t}`,l;e[7]!==r.length||e[8]!==s?(l=r.length===1?s("1 record"):s("{count} records",{count:r.length}),e[7]=r.length,e[8]=s,e[9]=l):l=e[9];let u;return e[10]!==c||e[11]!==i||e[12]!==l?(u=(0,n.jsx)(ae,{"data-testid":i,title:c,variant:"secondary",children:l}),e[10]=c,e[11]=i,e[12]=l,e[13]=u):u=e[13],u},"Te"),Pe=g(d=>{let e=(0,M.c)(7),{objectKey:t,onToggle:r,selected:s,t:o}=d,c;e[0]!==o?(c=o("Select row"),e[0]=o,e[1]=c):c=e[1];let i=`storage-select-${t}`,l;return e[2]!==r||e[3]!==s||e[4]!==c||e[5]!==i?(l=(0,n.jsx)(ye,{"aria-label":c,checked:s,"data-testid":i,onCheckedChange:r}),e[2]=r,e[3]=s,e[4]=c,e[5]=i,e[6]=l):l=e[6],l},"Fe");function bt(d){return`${d.table}\xB7${d.id}`}g(bt,"yt");var yt=g(d=>{let e=(0,M.c)(10),{colSpan:t,name:r,onEnter:s}=d,o;e[0]!==r||e[1]!==s?(o=g(()=>{s(r)},"n"),e[0]=r,e[1]=s,e[2]=o):o=e[2];let c=o,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,n.jsx)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z"})}),e[3]=i):i=e[3];let l;e[4]!==c||e[5]!==r?(l=(0,n.jsxs)("button",{className:"inline-flex items-center gap-2 font-mono text-xs outline-none hover:text-foreground focus-visible:text-foreground","data-testid":"fb-folder",onClick:c,type:"button",children:[i,r]}),e[4]=c,e[5]=r,e[6]=l):l=e[6];let u;return e[7]!==t||e[8]!==l?(u=(0,n.jsx)(ce,{children:(0,n.jsx)(ee,{colSpan:t,children:l})}),e[7]=t,e[8]=l,e[9]=u):u=e[9],u},"xt"),xt=g(d=>{let e=(0,M.c)(37),{busy:t,copiedKey:r,handlers:s,object:o,prefix:c,references:i,selected:l,showReferences:u,t:h}=d,f;e[0]!==s||e[1]!==o||e[2]!==c?(f=Oe(o,c,s),e[0]=s,e[1]=o,e[2]=c,e[3]=f):f=e[3];let{copy:m,download:w,name:a,remove:k,toggle:C}=f,x;e[4]!==o.key||e[5]!==l||e[6]!==h||e[7]!==C?(x=(0,n.jsx)(ee,{className:"w-8",children:(0,n.jsx)(Pe,{objectKey:o.key,onToggle:C,selected:l,t:h})}),e[4]=o.key,e[5]=l,e[6]=h,e[7]=C,e[8]=x):x=e[8];let b;e[9]!==a?(b=(0,n.jsx)(ee,{className:"font-mono text-xs",children:a}),e[9]=a,e[10]=b):b=e[10];let v;e[11]!==o.size?(v=pe(o.size),e[11]=o.size,e[12]=v):v=e[12];let y;e[13]!==v?(y=(0,n.jsx)(ee,{className:"tabular-nums text-muted-foreground",children:v}),e[13]=v,e[14]=y):y=e[14];let z=o.httpMetadata?.contentType??"",S;e[15]!==z?(S=(0,n.jsx)(ee,{children:z}),e[15]=z,e[16]=S):S=e[16];let N;e[17]!==o.key||e[18]!==i||e[19]!==u||e[20]!==h?(N=u&&(0,n.jsx)(ee,{children:(0,n.jsx)(Ae,{objectKey:o.key,references:i,t:h})}),e[17]=o.key,e[18]=i,e[19]=u,e[20]=h,e[21]=N):N=e[21];let $=r===o.key,K;e[22]!==t||e[23]!==m||e[24]!==w||e[25]!==o.key||e[26]!==k||e[27]!==h||e[28]!==$?(K=(0,n.jsx)(ee,{className:"text-right",children:(0,n.jsx)("span",{className:"inline-flex items-center gap-1",children:(0,n.jsx)(Me,{busy:t,copied:$,objectKey:o.key,onCopy:m,onDelete:k,onDownload:w,t:h})})}),e[22]=t,e[23]=m,e[24]=w,e[25]=o.key,e[26]=k,e[27]=h,e[28]=$,e[29]=K):K=e[29];let F;return e[30]!==K||e[31]!==x||e[32]!==b||e[33]!==y||e[34]!==S||e[35]!==N?(F=(0,n.jsxs)(ce,{"data-testid":"fb-row",children:[x,b,y,S,N,K]}),e[30]=K,e[31]=x,e[32]=b,e[33]=y,e[34]=S,e[35]=N,e[36]=F):F=e[36],F},"vt"),vt=g(d=>{let e=(0,M.c)(65),{allSelected:t,busy:r,copiedKey:s,files:o,folders:c,handlers:i,onEnterFolder:l,prefix:u,references:h,selected:f,showReferences:m,someSelected:w,t:a,toggleSelectAll:k}=d,C;e[0]!==a?(C=a("Select all rows"),e[0]=a,e[1]=C):C=e[1];let x;e[2]!==t||e[3]!==w||e[4]!==C||e[5]!==k?(x=(0,n.jsx)(ne,{className:"w-8",children:(0,n.jsx)(ye,{"aria-label":C,checked:t,"data-testid":"storage-select-all",indeterminate:w,onCheckedChange:k})}),e[2]=t,e[3]=w,e[4]=C,e[5]=k,e[6]=x):x=e[6];let b;e[7]!==a?(b=a("key"),e[7]=a,e[8]=b):b=e[8];let v;e[9]!==b?(v=(0,n.jsx)(ne,{children:b}),e[9]=b,e[10]=v):v=e[10];let y;e[11]!==a?(y=a("size"),e[11]=a,e[12]=y):y=e[12];let z;e[13]!==y?(z=(0,n.jsx)(ne,{children:y}),e[13]=y,e[14]=z):z=e[14];let S;e[15]!==a?(S=a("content-type"),e[15]=a,e[16]=S):S=e[16];let N;e[17]!==S?(N=(0,n.jsx)(ne,{children:S}),e[17]=S,e[18]=N):N=e[18];let $;e[19]!==m||e[20]!==a?($=m&&(0,n.jsx)(ne,{children:a("used by")}),e[19]=m,e[20]=a,e[21]=$):$=e[21];let K;e[22]!==a?(K=a("Actions"),e[22]=a,e[23]=K):K=e[23];let F;e[24]!==K?(F=(0,n.jsx)(ne,{"aria-label":K}),e[24]=K,e[25]=F):F=e[25];let T;e[26]!==F||e[27]!==x||e[28]!==v||e[29]!==z||e[30]!==N||e[31]!==$?(T=(0,n.jsx)(Te,{children:(0,n.jsxs)(ce,{children:[x,v,z,N,$,F]})}),e[26]=F,e[27]=x,e[28]=v,e[29]=z,e[30]=N,e[31]=$,e[32]=T):T=e[32];let L;if(e[33]!==c||e[34]!==l||e[35]!==m){let R;e[37]!==l||e[38]!==m?(R=g(_=>(0,n.jsx)(yt,{colSpan:m?6:5,name:_,onEnter:l},_),"R"),e[37]=l,e[38]=m,e[39]=R):R=e[39],L=c.map(R),e[33]=c,e[34]=l,e[35]=m,e[36]=L}else L=e[36];let B;if(e[40]!==r||e[41]!==s||e[42]!==o||e[43]!==i||e[44]!==u||e[45]!==h||e[46]!==f||e[47]!==m||e[48]!==a){let R;e[50]!==r||e[51]!==s||e[52]!==i||e[53]!==u||e[54]!==h||e[55]!==f||e[56]!==m||e[57]!==a?(R=g(_=>(0,n.jsx)(xt,{busy:r,copiedKey:s,handlers:i,object:_,prefix:u,references:h[_.key],selected:f.has(_.key),showReferences:m,t:a},_.key),"R"),e[50]=r,e[51]=s,e[52]=i,e[53]=u,e[54]=h,e[55]=f,e[56]=m,e[57]=a,e[58]=R):R=e[58],B=o.map(R),e[40]=r,e[41]=s,e[42]=o,e[43]=i,e[44]=u,e[45]=h,e[46]=f,e[47]=m,e[48]=a,e[49]=B}else B=e[49];let U;e[59]!==L||e[60]!==B?(U=(0,n.jsxs)(Fe,{children:[L,B]}),e[59]=L,e[60]=B,e[61]=U):U=e[61];let I;return e[62]!==T||e[63]!==U?(I=(0,n.jsx)(je,{className:"overflow-hidden py-0",children:(0,n.jsx)(ze,{className:"px-0",children:(0,n.jsxs)($e,{"data-testid":"fb-table",children:[T,U]})})}),e[62]=T,e[63]=U,e[64]=I):I=e[64],I},"kt"),kt=[{label:"15m",seconds:900},{label:"1h",seconds:3600},{label:"24h",seconds:86400},{label:"7d",seconds:604800}],wt=3600,Be=g((d,e)=>{if(e==="size")return d.size;if(e==="type")return d.httpMetadata?.contentType??"";if(e==="date"){if(d.uploaded===void 0)return 0;let t=new Date(d.uploaded).getTime();return Number.isNaN(t)?0:t}return e.startsWith("tag:")?d.customMetadata?.[e.slice(4)]??"":d.key},"ve"),St=g((d,e,t)=>{let r=t==="desc"?-1:1;return d.toSorted((s,o)=>{let c=Be(s,e),i=Be(o,e);return(typeof c=="number"&&typeof i=="number"?c-i:String(c).localeCompare(String(i)))*r})},"Nt"),Ct=g((d,e)=>{let t=new Set,r=[];for(let s of d){let o=s.key.slice(e.length),c=o.indexOf("/");c===-1?r.push(s):t.add(o.slice(0,c+1))}return{files:r,folders:[...t].toSorted((s,o)=>s.localeCompare(o))}},"Ct"),Nt=g(d=>{let e=(0,M.c)(59),{bucket:t,buckets:r,busy:s,draftPrefix:o,expiry:c,fileInputRef:i,onBucketChange:l,onExpiryChange:u,onFileChange:h,onList:f,onPrefixChange:m,onUploadClick:w,t:a}=d,k;e[0]!==m?(k=g(P=>{m(P.target.value)},"v"),e[0]=m,e[1]=k):k=e[1];let C=k,x;e[2]!==l?(x=g(P=>{l(P.target.value)},"y"),e[2]=l,e[3]=x):x=e[3];let b=x,v;e[4]!==u?(v=g(P=>{u(Number.parseInt(P.target.value,10))},"x"),e[4]=u,e[5]=v):v=e[5];let y=v,z;e[6]!==t||e[7]!==r||e[8]!==b||e[9]!==a?(z=r.length>0&&(0,n.jsx)("select",{"aria-label":a("Bucket"),className:"h-8 rounded-md border border-border bg-background px-1 outline-none focus-visible:border-ring","data-testid":"fb-bucket",onChange:b,value:t,children:r.map(zt)}),e[6]=t,e[7]=r,e[8]=b,e[9]=a,e[10]=z):z=e[10];let S;e[11]!==a?(S=a("Key prefix"),e[11]=a,e[12]=S):S=e[12];let N;e[13]!==a?(N=a("key prefix (optional)"),e[13]=a,e[14]=N):N=e[14];let $;e[15]!==o||e[16]!==C||e[17]!==S||e[18]!==N?($=(0,n.jsx)(Ne,{"aria-label":S,className:"h-8 w-64 max-w-full","data-testid":"fb-prefix-input",onChange:C,placeholder:N,value:o}),e[15]=o,e[16]=C,e[17]=S,e[18]=N,e[19]=$):$=e[19];let K;e[20]!==a?(K=a("List"),e[20]=a,e[21]=K):K=e[21];let F;e[22]!==s||e[23]!==f||e[24]!==K?(F=(0,n.jsx)(re,{"data-testid":"fb-list",disabled:s,onClick:f,size:"sm",type:"button",children:K}),e[22]=s,e[23]=f,e[24]=K,e[25]=F):F=e[25];let T;e[26]!==s||e[27]!==a?(T=a(s?"Uploading\u2026":"Upload"),e[26]=s,e[27]=a,e[28]=T):T=e[28];let L;e[29]!==s||e[30]!==w||e[31]!==T?(L=(0,n.jsx)(re,{"data-testid":"storage-upload",disabled:s,onClick:w,size:"sm",type:"button",variant:"outline",children:T}),e[29]=s,e[30]=w,e[31]=T,e[32]=L):L=e[32];let B;e[33]!==i||e[34]!==h?(B=(0,n.jsx)("input",{className:"hidden","data-testid":"storage-file-input",onChange:h,ref:i,type:"file"}),e[33]=i,e[34]=h,e[35]=B):B=e[35];let U;e[36]!==a?(U=a("Link expiry"),e[36]=a,e[37]=U):U=e[37];let I;e[38]!==a?(I=kt.map(P=>(0,n.jsx)("option",{value:P.seconds,children:a(P.label)},P.seconds)),e[38]=a,e[39]=I):I=e[39];let R;e[40]!==c||e[41]!==y||e[42]!==I?(R=(0,n.jsx)("select",{className:"h-8 rounded-md border border-border bg-background px-1 tabular-nums outline-none focus-visible:border-ring","data-testid":"storage-expiry",id:"storage-expiry",onChange:y,value:c,children:I}),e[40]=c,e[41]=y,e[42]=I,e[43]=R):R=e[43];let _;e[44]!==U||e[45]!==R?(_=(0,n.jsxs)("label",{className:"ml-auto flex items-center gap-1.5 text-xs text-muted-foreground",htmlFor:"storage-expiry",children:[U,R]}),e[44]=U,e[45]=R,e[46]=_):_=e[46];let O;e[47]!==a?(O=a("Open in Cloudflare"),e[47]=a,e[48]=O):O=e[48];let A;e[49]!==O?(A=(0,n.jsx)("a",{className:"text-sm text-primary underline-offset-4 hover:underline","data-testid":"fb-cf-link",href:_e,rel:"noreferrer",target:"_blank",children:O}),e[49]=O,e[50]=A):A=e[50];let G;return e[51]!==L||e[52]!==B||e[53]!==_||e[54]!==A||e[55]!==z||e[56]!==$||e[57]!==F?(G=(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[z,$,F,L,B,_,A]}),e[51]=L,e[52]=B,e[53]=_,e[54]=A,e[55]=z,e[56]=$,e[57]=F,e[58]=G):G=e[58],G},"$t"),jt=g(d=>{let e=(0,M.c)(66),{onSortKeyChange:t,onThumbSizeChange:r,showGrid:s,showList:o,sortDirection:c,sortKey:i,t:l,tagKeys:u,thumbSize:h,toggleSortDirection:f,view:m}=d,w;e[0]!==t?(w=g(V=>{t(V.target.value)},"k"),e[0]=t,e[1]=w):w=e[1];let a=w,k;e[2]!==r?(k=g(V=>{r(Number.parseInt(V.target.value,10))},"v"),e[2]=r,e[3]=k):k=e[3];let C=k,x=m==="list",b;e[4]!==l?(b=l("List"),e[4]=l,e[5]=b):b=e[5];let v;e[6]!==o||e[7]!==x||e[8]!==b?(v=(0,n.jsx)("button",{"aria-pressed":x,className:"px-2 py-1 outline-none transition-colors hover:bg-accent aria-pressed:bg-accent aria-pressed:text-accent-foreground","data-testid":"fb-view-list",onClick:o,type:"button",children:b}),e[6]=o,e[7]=x,e[8]=b,e[9]=v):v=e[9];let y=m==="grid",z;e[10]!==l?(z=l("Grid"),e[10]=l,e[11]=z):z=e[11];let S;e[12]!==s||e[13]!==y||e[14]!==z?(S=(0,n.jsx)("button",{"aria-pressed":y,className:"border-s border-border px-2 py-1 outline-none transition-colors hover:bg-accent aria-pressed:bg-accent aria-pressed:text-accent-foreground","data-testid":"fb-view-grid",onClick:s,type:"button",children:z}),e[12]=s,e[13]=y,e[14]=z,e[15]=S):S=e[15];let N;e[16]!==v||e[17]!==S?(N=(0,n.jsxs)("div",{className:"inline-flex overflow-hidden rounded-md border border-border",children:[v,S]}),e[16]=v,e[17]=S,e[18]=N):N=e[18];let $;e[19]!==l?($=l("Sort"),e[19]=l,e[20]=$):$=e[20];let K;e[21]!==l?(K=l("Name"),e[21]=l,e[22]=K):K=e[22];let F;e[23]!==K?(F=(0,n.jsx)("option",{value:"name",children:K}),e[23]=K,e[24]=F):F=e[24];let T;e[25]!==l?(T=l("size"),e[25]=l,e[26]=T):T=e[26];let L;e[27]!==T?(L=(0,n.jsx)("option",{value:"size",children:T}),e[27]=T,e[28]=L):L=e[28];let B;e[29]!==l?(B=l("Type"),e[29]=l,e[30]=B):B=e[30];let U;e[31]!==B?(U=(0,n.jsx)("option",{value:"type",children:B}),e[31]=B,e[32]=U):U=e[32];let I;e[33]!==l?(I=l("Modified"),e[33]=l,e[34]=I):I=e[34];let R;e[35]!==I?(R=(0,n.jsx)("option",{value:"date",children:I}),e[35]=I,e[36]=R):R=e[36];let _;e[37]!==u?(_=u.map(Kt),e[37]=u,e[38]=_):_=e[38];let O;e[39]!==a||e[40]!==i||e[41]!==F||e[42]!==L||e[43]!==U||e[44]!==R||e[45]!==_?(O=(0,n.jsxs)("select",{className:"h-8 rounded-md border border-border bg-background px-1 outline-none focus-visible:border-ring","data-testid":"fb-sort",id:"fb-sort",onChange:a,value:i,children:[F,L,U,R,_]}),e[39]=a,e[40]=i,e[41]=F,e[42]=L,e[43]=U,e[44]=R,e[45]=_,e[46]=O):O=e[46];let A;e[47]!==$||e[48]!==O?(A=(0,n.jsxs)("label",{className:"flex items-center gap-1.5 text-muted-foreground",htmlFor:"fb-sort",children:[$,O]}),e[47]=$,e[48]=O,e[49]=A):A=e[49];let G;e[50]!==l?(G=l("Toggle sort direction"),e[50]=l,e[51]=G):G=e[51];let P=c==="asc"?"\u2191":"\u2193",H;e[52]!==G||e[53]!==P||e[54]!==f?(H=(0,n.jsx)("button",{"aria-label":G,className:"flex size-8 items-center justify-center rounded-md border border-border tabular-nums outline-none transition-colors hover:bg-accent focus-visible:bg-accent","data-testid":"fb-sort-dir",onClick:f,type:"button",children:P}),e[52]=G,e[53]=P,e[54]=f,e[55]=H):H=e[55];let Y;e[56]!==C||e[57]!==l||e[58]!==h||e[59]!==m?(Y=m==="grid"&&(0,n.jsxs)("label",{className:"ml-auto flex items-center gap-1.5 text-muted-foreground",htmlFor:"fb-thumb-size",children:[l("Thumbnail size"),(0,n.jsx)("input",{className:"accent-primary","data-testid":"fb-thumb-size",id:"fb-thumb-size",max:240,min:80,onChange:C,step:8,type:"range",value:h})]}),e[56]=C,e[57]=l,e[58]=h,e[59]=m,e[60]=Y):Y=e[60];let oe;return e[61]!==A||e[62]!==H||e[63]!==Y||e[64]!==N?(oe=(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs","data-testid":"fb-controls",children:[N,A,H,Y]}),e[61]=A,e[62]=H,e[63]=Y,e[64]=N,e[65]=oe):oe=e[65],oe},"jt");function zt(d){return(0,n.jsx)("option",{value:d,children:d},d)}g(zt,"zt");function Kt(d){return(0,n.jsx)("option",{value:`tag:${d}`,children:d},d)}g(Kt,"Kt");var Dt=/\.(?:avif|bmp|gif|ico|jpe?g|png|svg|webp)$/iu,$t=g(d=>(d.httpMetadata?.contentType??"").startsWith("image/")||Dt.test(d.key),"Tt"),Tt=g(()=>{let d=(0,M.c)(1),e;return d[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)("svg",{"aria-hidden":"true",className:"size-8 text-muted-foreground/60",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.4,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M7 3h7l5 5v13a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm7 0v5h5"})}),d[0]=e):e=d[0],e},"Ft"),Ft=g(d=>{let e=(0,M.c)(13),{object:t,resolveUrl:r}=d,[s,o]=(0,j.useState)(null),[c,i]=(0,j.useState)(!1),l;e[0]!==t?(l=$t(t),e[0]=t,e[1]=l):l=e[1];let u=l,h,f;e[2]!==u||e[3]!==t.key||e[4]!==r?(h=g(()=>{if(!u)return;let k={cancelled:!1};return W((async()=>{try{let C=await r(t.key);k.cancelled||o(C)}catch{k.cancelled||i(!0)}})()),()=>{k.cancelled=!0}},"h"),f=[u,t.key,r],e[2]=u,e[3]=t.key,e[4]=r,e[5]=h,e[6]=f):(h=e[5],f=e[6]),(0,j.useEffect)(h,f);let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=g(()=>{i(!0)},"m"),e[7]=m):m=e[7];let w=m,a;return e[8]!==c||e[9]!==u||e[10]!==t.key||e[11]!==s?(a=(0,n.jsx)("div",{className:"flex aspect-square w-full items-center justify-center overflow-hidden rounded-md border border-border bg-muted/30",children:u&&s!==null&&!c?(0,n.jsx)("img",{alt:t.key,className:"size-full object-cover",loading:"lazy",onError:w,src:s}):(0,n.jsx)(Tt,{})}),e[8]=c,e[9]=u,e[10]=t.key,e[11]=s,e[12]=a):a=e[12],a},"Rt"),Lt=g(d=>{let e=(0,M.c)(42),{busy:t,copiedKey:r,handlers:s,object:o,prefix:c,references:i,resolveUrl:l,selected:u,showReferences:h,t:f}=d,m;e[0]!==s||e[1]!==o||e[2]!==c?(m=Oe(o,c,s),e[0]=s,e[1]=o,e[2]=c,e[3]=m):m=e[3];let{copy:w,download:a,name:k,remove:C,toggle:x}=m,b;e[4]!==o||e[5]!==l?(b=(0,n.jsx)(Ft,{object:o,resolveUrl:l}),e[4]=o,e[5]=l,e[6]=b):b=e[6];let v;e[7]!==o.key||e[8]!==u||e[9]!==f||e[10]!==x?(v=(0,n.jsx)("span",{className:"absolute left-1.5 top-1.5 rounded bg-background/80 p-0.5",children:(0,n.jsx)(Pe,{objectKey:o.key,onToggle:x,selected:u,t:f})}),e[7]=o.key,e[8]=u,e[9]=f,e[10]=x,e[11]=v):v=e[11];let y;e[12]!==b||e[13]!==v?(y=(0,n.jsxs)("div",{className:"relative",children:[b,v]}),e[12]=b,e[13]=v,e[14]=y):y=e[14];let z;e[15]!==k?(z=(0,n.jsx)("p",{className:"truncate font-mono text-xs",title:k,children:k}),e[15]=k,e[16]=z):z=e[16];let S;e[17]!==o.size?(S=pe(o.size),e[17]=o.size,e[18]=S):S=e[18];let N;e[19]!==S?(N=(0,n.jsx)("p",{className:"text-[11px] tabular-nums text-muted-foreground",children:S}),e[19]=S,e[20]=N):N=e[20];let $;e[21]!==o.key||e[22]!==i||e[23]!==h||e[24]!==f?($=h&&(0,n.jsx)("div",{className:"mt-1",children:(0,n.jsx)(Ae,{objectKey:o.key,references:i,t:f})}),e[21]=o.key,e[22]=i,e[23]=h,e[24]=f,e[25]=$):$=e[25];let K;e[26]!==z||e[27]!==N||e[28]!==$?(K=(0,n.jsxs)("div",{className:"min-w-0",children:[z,N,$]}),e[26]=z,e[27]=N,e[28]=$,e[29]=K):K=e[29];let F=r===o.key,T;e[30]!==t||e[31]!==w||e[32]!==a||e[33]!==o.key||e[34]!==C||e[35]!==f||e[36]!==F?(T=(0,n.jsx)("div",{className:"flex items-center gap-1",children:(0,n.jsx)(Me,{busy:t,buttonClassName:"h-7 px-2 text-xs",copied:F,objectKey:o.key,onCopy:w,onDelete:C,onDownload:a,t:f})}),e[30]=t,e[31]=w,e[32]=a,e[33]=o.key,e[34]=C,e[35]=f,e[36]=F,e[37]=T):T=e[37];let L;return e[38]!==T||e[39]!==y||e[40]!==K?(L=(0,n.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"fb-tile",children:[y,K,T]}),e[38]=T,e[39]=y,e[40]=K,e[41]=L):L=e[41],L},"Lt"),Rt=g(d=>{let e=(0,M.c)(9),{name:t,onEnter:r}=d,s;e[0]!==t||e[1]!==r?(s=g(()=>{r(t)},"l"),e[0]=t,e[1]=r,e[2]=s):s=e[2];let o=s,c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=(0,n.jsx)("span",{className:"flex aspect-square w-full items-center justify-center rounded-md border border-border bg-muted/30 transition-colors hover:bg-accent",children:(0,n.jsx)("svg",{"aria-hidden":"true",className:"size-10 text-muted-foreground",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.4,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z"})})}),e[3]=c):c=e[3];let i;e[4]!==t?(i=(0,n.jsx)("span",{className:"truncate font-mono text-xs",title:t,children:t}),e[4]=t,e[5]=i):i=e[5];let l;return e[6]!==o||e[7]!==i?(l=(0,n.jsxs)("button",{className:"flex flex-col gap-1.5 text-left outline-none","data-testid":"fb-folder",onClick:o,type:"button",children:[c,i]}),e[6]=o,e[7]=i,e[8]=l):l=e[8],l},"Ot"),Ut=g(d=>{let e=(0,M.c)(34),{busy:t,copiedKey:r,files:s,folders:o,handlers:c,onEnterFolder:i,prefix:l,references:u,resolveUrl:h,selected:f,showReferences:m,size:w,t:a}=d,k;e[0]!==w?(k=w.toString(),e[0]=w,e[1]=k):k=e[1];let C=`repeat(auto-fill, minmax(${k}px, 1fr))`,x;e[2]!==C?(x={gridTemplateColumns:C},e[2]=C,e[3]=x):x=e[3];let b=x,v;if(e[4]!==o||e[5]!==i){let S;e[7]!==i?(S=g(N=>(0,n.jsx)(Rt,{name:N,onEnter:i},N),"w"),e[7]=i,e[8]=S):S=e[8],v=o.map(S),e[4]=o,e[5]=i,e[6]=v}else v=e[6];let y;if(e[9]!==t||e[10]!==r||e[11]!==s||e[12]!==c||e[13]!==l||e[14]!==u||e[15]!==h||e[16]!==f||e[17]!==m||e[18]!==a){let S;e[20]!==t||e[21]!==r||e[22]!==c||e[23]!==l||e[24]!==u||e[25]!==h||e[26]!==f||e[27]!==m||e[28]!==a?(S=g(N=>(0,n.jsx)(Lt,{busy:t,copiedKey:r,handlers:c,object:N,prefix:l,references:u[N.key],resolveUrl:h,selected:f.has(N.key),showReferences:m,t:a},N.key),"w"),e[20]=t,e[21]=r,e[22]=c,e[23]=l,e[24]=u,e[25]=h,e[26]=f,e[27]=m,e[28]=a,e[29]=S):S=e[29],y=s.map(S),e[9]=t,e[10]=r,e[11]=s,e[12]=c,e[13]=l,e[14]=u,e[15]=h,e[16]=f,e[17]=m,e[18]=a,e[19]=y}else y=e[19];let z;return e[30]!==b||e[31]!==v||e[32]!==y?(z=(0,n.jsxs)("div",{className:"grid gap-4","data-testid":"fb-gallery",style:b,children:[v,y]}),e[30]=b,e[31]=v,e[32]=y,e[33]=z):z=e[33],z},"Et"),_t=g(d=>{let e=(0,M.c)(23),{reference:t,t:r}=d,s=`fb-dangling-${t.table}-${t.id}-${t.column}`,o=`${t.table}\xB7${t.id}`,c;e[0]!==o?(c=(0,n.jsx)(ae,{variant:"secondary",children:o}),e[0]=o,e[1]=c):c=e[1];let i;e[2]!==t.column?(i=(0,n.jsx)("span",{className:"text-muted-foreground",children:t.column}),e[2]=t.column,e[3]=i):i=e[3];let l;e[4]!==r?(l=r("\u2192"),e[4]=r,e[5]=l):l=e[5];let u;e[6]!==l?(u=(0,n.jsx)("span",{className:"text-muted-foreground/60",children:l}),e[6]=l,e[7]=u):u=e[7];let h;e[8]!==t.key?(h=(0,n.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-foreground",children:t.key}),e[8]=t.key,e[9]=h):h=e[9];let f;e[10]!==c||e[11]!==i||e[12]!==u||e[13]!==h?(f=(0,n.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5",children:[c,i,u,h]}),e[10]=c,e[11]=i,e[12]=u,e[13]=h,e[14]=f):f=e[14];let m;e[15]!==r?(m=r("Missing object"),e[15]=r,e[16]=m):m=e[16];let w;e[17]!==m?(w=(0,n.jsx)(ae,{className:"border-destructive/40 text-destructive",variant:"outline",children:m}),e[17]=m,e[18]=w):w=e[18];let a;return e[19]!==s||e[20]!==w||e[21]!==f?(a=(0,n.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 rounded-md border border-border/60 px-3 py-2 text-xs","data-testid":s,children:[f,w]}),e[19]=s,e[20]=w,e[21]=f,e[22]=a):a=e[22],a},"Ut"),Bt=g(d=>{let e=(0,M.c)(37),{busy:t,onCheck:r,references:s,t:o,truncated:c}=d,i;e[0]!==o?(i=o("Integrity"),e[0]=o,e[1]=i):i=e[1];let l;e[2]!==i?(l=(0,n.jsx)("span",{className:"font-mono text-[11px] uppercase tracking-wide text-muted-foreground",children:i}),e[2]=i,e[3]=l):l=e[3];let u;e[4]!==o?(u=o("Orphaned objects"),e[4]=o,e[5]=u):u=e[5];let h;e[6]!==u?(h=(0,n.jsx)("span",{className:"text-sm font-medium text-foreground",children:u}),e[6]=u,e[7]=h):h=e[7];let f;e[8]!==o?(f=o("Find records whose file reference points at an object the bucket no longer has."),e[8]=o,e[9]=f):f=e[9];let m;e[10]!==f?(m=(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:f}),e[10]=f,e[11]=m):m=e[11];let w;e[12]!==l||e[13]!==h||e[14]!==m?(w=(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[l,h,m]}),e[12]=l,e[13]=h,e[14]=m,e[15]=w):w=e[15];let a;e[16]!==t||e[17]!==o?(a=o(t?"Checking\u2026":"Check for orphans"),e[16]=t,e[17]=o,e[18]=a):a=e[18];let k;e[19]!==t||e[20]!==r||e[21]!==a?(k=(0,n.jsx)(re,{"data-testid":"fb-orphans-check",disabled:t,onClick:r,size:"sm",type:"button",variant:"outline",children:a}),e[19]=t,e[20]=r,e[21]=a,e[22]=k):k=e[22];let C;e[23]!==w||e[24]!==k?(C=(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[w,k]}),e[23]=w,e[24]=k,e[25]=C):C=e[25];let x;e[26]!==s?.length||e[27]!==o?(x=s?.length===0&&(0,n.jsx)(he,{description:o("Every record's file reference points at an object that exists in the bucket."),testId:"fb-orphans-empty",title:o("No dangling references.")}),e[26]=s?.length,e[27]=o,e[28]=x):x=e[28];let b;e[29]!==s||e[30]!==o||e[31]!==c?(b=s!==void 0&&s.length>0&&(0,n.jsxs)(n.Fragment,{children:[c&&(0,n.jsx)("p",{className:"text-xs text-warning","data-testid":"fb-orphans-truncated",children:o("Showing the first {count} dangling references \u2014 the scan was truncated.",{count:s.length})}),(0,n.jsx)("ul",{className:"flex flex-col gap-1.5","data-testid":"fb-orphans-list",children:s.map(y=>(0,n.jsx)(_t,{reference:y,t:o},`${y.table}\xB7${y.id}\xB7${y.column}`))})]}),e[29]=s,e[30]=o,e[31]=c,e[32]=b):b=e[32];let v;return e[33]!==C||e[34]!==x||e[35]!==b?(v=(0,n.jsxs)("section",{className:"flex flex-col gap-2 rounded-lg border border-border/60 p-3","data-testid":"fb-orphans",children:[C,x,b]}),e[33]=C,e[34]=x,e[35]=b,e[36]=v):v=e[36],v},"_t"),Et=g(function(d,e){let t=(0,M.c)(18),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=new Set,t[0]=r):r=t[0];let[s,o]=(0,j.useState)(r),c;t[1]===Symbol.for("react.memo_cache_sentinel")?(c=g(x=>{o(b=>{let v=new Set(b);return v.has(x)?v.delete(x):v.add(x),v})},"c"),t[1]=c):c=t[1];let i=c,l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=g(()=>{o(new Set)},"o"),t[2]=l):l=t[2];let u=l,h,f,m;if(t[3]!==d||t[4]!==e||t[5]!==s){let x;t[9]!==e?(x=g(b=>e(b),"y"),t[9]=e,t[10]=x):x=t[10],f=d.map(x),h=f.length>0&&f.every(b=>s.has(b)),m=!h&&f.some(b=>s.has(b)),t[3]=d,t[4]=e,t[5]=s,t[6]=h,t[7]=f,t[8]=m}else h=t[6],f=t[7],m=t[8];let w=m,a;t[11]!==f?(a=g(()=>{o(x=>f.every(b=>x.has(b))?new Set:new Set(f))},"a"),t[11]=f,t[12]=a):a=t[12];let k=a,C;return t[13]!==h||t[14]!==s||t[15]!==w||t[16]!==k?(C={allSelected:h,clear:u,selected:s,someSelected:w,toggle:i,toggleAll:k},t[13]=h,t[14]=s,t[15]=w,t[16]=k,t[17]=C):C=t[17],C},"Bt"),It=me(be.storageReferences),Ot=me(be.storageOrphans),Ee=1e4,Mt=1e3,At=3600,Pt=g((d,e)=>{if(!("document"in globalThis))return;let t=globalThis.document.createElement("a");t.href=d,t.download=e,t.rel="noopener",globalThis.document.body.append(t),t.click(),t.remove()},"Wt"),Wt=g(d=>d.key,"qt"),Gt=g(({initialPrefix:d,pageSize:e})=>{let t=Se(),[r,s]=(0,j.useState)(d??""),[o,c]=(0,j.useState)(d??""),[i,l]=(0,j.useState)(wt),[u,h]=(0,j.useState)("list"),[f,m]=(0,j.useState)(128),[w,a]=(0,j.useState)("name"),[k,C]=(0,j.useState)("asc"),[x,b]=(0,j.useState)(void 0),[v,y]=(0,j.useState)(void 0),[z,S]=(0,j.useState)(!1),[N,$]=(0,j.useState)(void 0),[K,F]=(0,j.useState)(void 0),[T,L]=(0,j.useState)(""),[B,U]=(0,j.useState)({}),[I,R]=(0,j.useState)(!1),[_,O]=(0,j.useState)(void 0),[A,G]=(0,j.useState)(!1),[P,H]=(0,j.useState)(!1),[Y,oe]=(0,j.useState)([]),[V,xe]=(0,j.useState)(""),le=(0,j.useRef)(0),Q=(0,j.useRef)(0);(0,j.useEffect)(()=>{let p={cancelled:!1};return W((async()=>{try{let D=await t.listStorageBuckets();if(!p.cancelled){oe(D);let[E]=D;E!==void 0&&xe(q=>q===""?E:q)}}catch{}})()),()=>{p.cancelled=!0}},[t]);let Z=(0,j.useMemo)(()=>({list:g(p=>t.listStorageObjects({...p,bucket:V}),"list"),remove:g(p=>t.deleteStorageObject(p,{bucket:V}),"remove"),signedUrl:g((p,D)=>t.signedStorageUrl(p,{...D,bucket:V}),"signedUrl"),upload:g(p=>t.uploadStorageObject({...p,bucket:V}),"upload")}),[V,t]),J=(0,j.useCallback)(async(p,D,E)=>{le.current+=1;let q=le.current;y(void 0),S(!0);try{let te=await Z.list({cursor:D,limit:e,prefix:p});if(q!==le.current)return;b(we=>E&&we!==void 0?[...we,...te.objects]:te.objects),F(te.cursor)}catch(te){if(q!==le.current)return;E||b(void 0),y(X(te))}finally{q===le.current&&S(!1)}},[e,Z]);(0,j.useEffect)(()=>{W(J(d??"",void 0,!1))},[J,d]);let We=(x?.length??0)<=e;Re(()=>{W(J(r,void 0,!1))},We);let{files:de,folders:Ge}=Ct(x??[],r),He=(0,j.useMemo)(()=>{let p=new Set;for(let D of de)for(let E of Object.keys(D.customMetadata??{}))p.add(E);return[...p].toSorted((D,E)=>D.localeCompare(E))},[de]),ie=St(de,w,k),ue=(0,j.useMemo)(()=>[...new Set(ie.map(p=>p.key))].toSorted((p,D)=>p.localeCompare(D)).join(`
3
- `),[ie]);(0,j.useEffect)(()=>{let p=ue===""?[]:ue.split(`
4
- `);if(p.length===0){U({});return}let D={current:!0};return W((async()=>{try{let E=await t.query(It,{keys:p},ge(T));D.current&&(U(E.references??{}),R(Object.keys(E.storageColumns??{}).length>0))}catch{D.current&&(U({}),R(!1))}})()),()=>{D.current=!1}},[t,ue,T]);let{allSelected:qe,clear:se,selected:ve,someSelected:Ve,toggle:Ze,toggleAll:Je}=Et(ie,Wt),Ye=g(()=>{s(o),se(),W(J(o,void 0,!1))},"Ie"),Qe=g(()=>{W(J(r,K,!0))},"Me"),ke=g(p=>{s(p),c(p),se(),W(J(p,void 0,!1))},"be"),Xe=g(p=>{ke(`${r}${p}`)},"Ae"),et=g(p=>Z.signedUrl(p,{expiresInSeconds:At}),"Pe"),tt=g(()=>{h("list")},"We"),rt=g(()=>{h("grid")},"qe"),nt=g(p=>{a(p)},"Ge"),ot=g(()=>{C(p=>p==="asc"?"desc":"asc")},"He"),lt=g(p=>{m(p)},"Ze"),st=g(p=>{l(p)},"Ve"),at=g(()=>{y(void 0),S(!0),W((async()=>{try{for(let p of ve)await Z.remove(p);await J(r,void 0,!1),se()}catch(p){y(X(p))}S(!1)})())},"Xe"),it=g(p=>{y(void 0),W((async()=>{try{let D=await Z.signedUrl(p,{expiresInSeconds:i});Ke(D)&&$(p)}catch(D){y(X(D))}})())},"Ye"),ct=g(p=>{y(void 0),W((async()=>{try{let D=await Z.signedUrl(p,{expiresInSeconds:i}),E=p.slice(p.lastIndexOf("/")+1)||p;Pt(D,E)}catch(D){y(X(D))}})())},"Qe");(0,j.useEffect)(()=>{if(N===void 0)return;let p=globalThis.setTimeout(()=>{$(void 0)},2e3);return()=>{globalThis.clearTimeout(p)}},[N]);let dt=g(p=>{y(void 0),S(!0),W((async()=>{try{await Z.remove(p),await J(r,void 0,!1)}catch(D){y(X(D))}S(!1)})())},"Je"),ut=g(p=>{let D=`${r}${p.name}`;y(void 0),S(!0),W((async()=>{try{let E=await p.arrayBuffer();await Z.upload({body:E,contentType:p.type===""?void 0:p.type,key:D}),await J(r,void 0,!1)}catch(E){y(X(E))}S(!1)})())},"et");(0,j.useEffect)(()=>{Q.current+=1,O(void 0),H(!1)},[T]);let ft=g(()=>{Q.current+=1;let p=Q.current;y(void 0),G(!0),W((async()=>{try{let D=[],E;do{let q=await Z.list({cursor:E,limit:Mt});for(let te of q.objects)D.push(te.key);E=D.length>=Ee?void 0:q.cursor}while(E!==void 0);if(D.length>=Ee)p===Q.current&&(O([]),H(!0));else{let q=await t.query(Ot,{liveKeys:D},ge(T));p===Q.current&&(O(q.references??[]),H(q.truncated===!0))}}catch(D){p===Q.current&&(O([]),H(!1),y(X(D)))}p===Q.current&&G(!1)})())},"tt"),ht=g(p=>{le.current+=1,Q.current+=1,xe(p),s(d??""),c(d??""),b(void 0),O(void 0),H(!1),se()},"rt");return{allSelected:qe,bucket:V,buckets:Y,bulkDelete:at,busy:z,checkOrphans:ft,clearSelection:se,copiedKey:N,danglingBusy:A,danglingReferences:_,danglingTruncated:P,draftPrefix:o,enterFolder:Xe,error:v,expiry:i,files:ie,folders:Ge,hasObjects:x!==void 0&&x.length>0,hasStorageColumns:I,listFirst:Ye,loaded:x!==void 0,loadMore:Qe,navigate:ke,nextCursor:K,onCopy:it,onDelete:dt,onDownload:ct,onExpiryChange:st,onFile:ut,onSortKeyChange:nt,onThumbSizeChange:lt,prefix:r,referenceShard:T,references:B,resolveUrl:et,selectBucket:ht,selected:ve,setDraftPrefix:c,setReferenceShard:L,showGrid:rt,showList:tt,someSelected:Ve,sortDirection:k,sortKey:w,tagKeys:He,thumbSize:f,toggleSelect:Ze,toggleSelectAll:Je,toggleSortDirection:ot,view:u}},"Gt"),Ht=100,Ie=g(d=>{let e=(0,M.c)(6),{label:t,onNavigate:r,target:s}=d,o;e[0]!==r||e[1]!==s?(o=g(()=>{r(s)},"n"),e[0]=r,e[1]=s,e[2]=o):o=e[2];let c=o,i;return e[3]!==c||e[4]!==t?(i=(0,n.jsx)("button",{className:"rounded px-1 text-muted-foreground outline-none hover:text-foreground focus-visible:text-foreground",onClick:c,type:"button",children:t}),e[3]=c,e[4]=t,e[5]=i):i=e[5],i},"we"),qt=g(d=>{let e=(0,M.c)(11),{onNavigate:t,prefix:r,t:s}=d,o;if(e[0]!==t||e[1]!==r||e[2]!==s){let c=r.split("/").filter(Vt),i;e[4]!==s?(i=s("Folder path"),e[4]=s,e[5]=i):i=e[5];let l;e[6]!==s?(l=s("root"),e[6]=s,e[7]=l):l=e[7];let u;e[8]!==t||e[9]!==l?(u=(0,n.jsx)(Ie,{label:l,onNavigate:t,target:""}),e[8]=t,e[9]=l,e[10]=u):u=e[10],o=(0,n.jsxs)("nav",{"aria-label":i,className:"flex flex-wrap items-center gap-0.5 text-xs","data-testid":"fb-breadcrumbs",children:[u,c.map((h,f)=>(0,n.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,n.jsx)("span",{className:"text-muted-foreground/50",children:"/"}),(0,n.jsx)(Ie,{label:h,onNavigate:t,target:`${c.slice(0,f+1).join("/")}/`})]},`${h}-${f.toString()}`))]}),e[0]=t,e[1]=r,e[2]=s,e[3]=o}else o=e[3];return o},"Zt"),ur=g(({initialPrefix:d,pageSize:e=Ht})=>{let t=Ce(),r=Gt({initialPrefix:d,pageSize:e}),s=(0,j.useRef)(null),{onCopy:o,onDelete:c,onDownload:i,onFile:l,toggleSelect:u}=r,h={onCopy:o,onDelete:c,onDownload:i,onToggleSelect:u},f=g(()=>{s.current?.click()},"f"),m=g(a=>{let k=a.target,C=k.files?.[0];k.value="",C&&l(C)},"m"),w=r.loaded&&!r.hasObjects;return(0,n.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"lunora-file-browser",children:[(0,n.jsx)(Nt,{bucket:r.bucket,buckets:r.buckets,busy:r.busy,draftPrefix:r.draftPrefix,expiry:r.expiry,fileInputRef:s,onBucketChange:r.selectBucket,onExpiryChange:r.onExpiryChange,onFileChange:m,onList:r.listFirst,onPrefixChange:r.setDraftPrefix,onUploadClick:f,t}),r.loaded&&(0,n.jsx)(qt,{onNavigate:r.navigate,prefix:r.prefix,t}),r.hasObjects&&(0,n.jsx)(jt,{onSortKeyChange:r.onSortKeyChange,onThumbSizeChange:r.onThumbSizeChange,showGrid:r.showGrid,showList:r.showList,sortDirection:r.sortDirection,sortKey:r.sortKey,t,tagKeys:r.tagKeys,thumbSize:r.thumbSize,toggleSortDirection:r.toggleSortDirection,view:r.view}),r.hasStorageColumns&&(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2","data-testid":"fb-references-shard",children:[(0,n.jsx)("label",{className:"text-xs text-muted-foreground",htmlFor:"fb-reference-shard-input",children:t("References shard")}),(0,n.jsx)(De,{id:"fb-reference-shard-input",onChange:r.setReferenceShard,testId:"fb-reference-shard-input",value:r.referenceShard}),(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:t("Which shard's records are checked for references to these files. Empty = root shard.")})]}),r.hasStorageColumns&&(0,n.jsx)(Bt,{busy:r.danglingBusy,onCheck:r.checkOrphans,references:r.danglingReferences,t,truncated:r.danglingTruncated}),r.selected.size>0&&(0,n.jsx)(Ue,{count:r.selected.size,editable:!0,onClear:r.clearSelection,onDelete:r.bulkDelete}),r.error!==void 0&&(0,n.jsx)("p",{className:"text-sm text-destructive","data-testid":"storage-error",role:"alert",children:r.error}),w&&(0,n.jsx)(he,{description:t("Objects you upload to your R2 buckets will appear here."),icon:(0,n.jsxs)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,n.jsx)("path",{d:"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z"}),(0,n.jsx)("path",{d:"M12 11v5m-2.5-2.5h5"})]}),testId:"fb-empty",title:t("No objects.")}),r.hasObjects&&r.view==="list"&&(0,n.jsx)(vt,{allSelected:r.allSelected,busy:r.busy,copiedKey:r.copiedKey,files:r.files,folders:r.folders,handlers:h,onEnterFolder:r.enterFolder,prefix:r.prefix,references:r.references,selected:r.selected,showReferences:r.hasStorageColumns,someSelected:r.someSelected,t,toggleSelectAll:r.toggleSelectAll}),r.hasObjects&&r.view==="grid"&&(0,n.jsx)(Ut,{busy:r.busy,copiedKey:r.copiedKey,files:r.files,folders:r.folders,handlers:h,onEnterFolder:r.enterFolder,prefix:r.prefix,references:r.references,resolveUrl:r.resolveUrl,selected:r.selected,showReferences:r.hasStorageColumns,size:r.thumbSize,t}),r.nextCursor!==void 0&&(0,n.jsx)("div",{children:(0,n.jsx)(re,{"data-testid":"fb-next",disabled:r.busy,onClick:r.loadMore,size:"sm",type:"button",variant:"outline",children:t("Load more")})})]})},"pr");function Vt(d){return d!==""}g(Vt,"Vt");export{ur as FileBrowser};
@@ -1 +0,0 @@
1
- import{i as y}from"./chunk-CFPZYHPY.js";import{a as C,c as M,e as P}from"./chunk-2OUPA2WJ.js";import{d as T}from"./chunk-6ST5ECQA.js";import{a as o,e as L,f as S,h as z}from"./chunk-3XIESWL4.js";var O=L(S(),1);var w=L(S(),1);var _=w.createContext({register:o(()=>{},"register"),unregister:o(()=>{},"unregister"),subscribeMapChange:o(()=>()=>{},"subscribeMapChange"),elementsRef:{current:[]},nextIndexRef:{current:0}});function F(){return w.useContext(_)}o(F,"useCompositeListContext");var W=(function(t){return t[t.None=0]="None",t[t.GuessFromOrder=1]="GuessFromOrder",t})({});function V(t={}){let{label:n,metadata:r,textRef:s,indexGuessBehavior:N,index:m}=t,{register:x,unregister:p,subscribeMapChange:f,elementsRef:d,labelsRef:h,nextIndexRef:c}=F(),g=O.useRef(-1),[a,i]=O.useState(m??(N===W.GuessFromOrder?()=>{if(g.current===-1){let e=c.current;c.current+=1,g.current=e}return g.current}:-1)),E=O.useRef(null),D=O.useCallback(e=>{if(E.current=e,a!==-1&&e!==null&&(d.current[a]=e,h)){let l=n!==void 0;h.current[a]=l?n:s?.current?.textContent??e.textContent}},[a,d,h,n,s]);return C(()=>{if(m!=null)return;let e=E.current;if(e)return x(e,r),()=>{p(e)}},[m,x,p,r]),C(()=>{if(m==null)return f(e=>{let l=E.current?e.get(E.current)?.index:null;l!=null&&i(l)})},[m,f,i]),{ref:D,index:a}}o(V,"useCompositeListItem");var b=L(S(),1);var v=L(z(),1);function Z(t){let{children:n,elementsRef:r,labelsRef:s,onMapChange:N}=t,m=M(N),x=b.useRef(0),p=T(U).current,f=T(k).current,[d,h]=b.useState(0),c=b.useRef(d),g=M((e,l)=>{f.set(e,l??null),c.current+=1,h(c.current)}),a=M(e=>{f.delete(e),c.current+=1,h(c.current)}),i=b.useMemo(()=>{let e=new Map;return Array.from(f.keys()).filter(u=>u.isConnected).sort(A).forEach((u,I)=>{let R=f.get(u)??{};e.set(u,{...R,index:I})}),e},[f,d]);C(()=>{if(typeof MutationObserver!="function"||i.size===0)return;let e=new MutationObserver(l=>{let u=new Set,I=o(R=>u.has(R)?u.delete(R):u.add(R),"updateDiff");l.forEach(R=>{R.removedNodes.forEach(I),R.addedNodes.forEach(I)}),u.size===0&&(c.current+=1,h(c.current))});return i.forEach((l,u)=>{u.parentElement&&e.observe(u.parentElement,{childList:!0})}),()=>{e.disconnect()}},[i]),C(()=>{c.current===d&&(r.current.length!==i.size&&(r.current.length=i.size),s&&s.current.length!==i.size&&(s.current.length=i.size),x.current=i.size),m(i)},[m,i,r,s,d]),C(()=>()=>{r.current=[]},[r]),C(()=>()=>{s&&(s.current=[])},[s]);let E=M(e=>(p.add(e),()=>{p.delete(e)}));C(()=>{p.forEach(e=>e(i))},[p,i]);let D=b.useMemo(()=>({register:g,unregister:a,subscribeMapChange:E,elementsRef:r,labelsRef:s,nextIndexRef:x}),[g,a,E,r,s,x]);return(0,v.jsx)(_.Provider,{value:D,children:n})}o(Z,"CompositeList");function k(){return new Map}o(k,"createMap");function U(){return new Set}o(U,"createListeners");function A(t,n){let r=t.compareDocumentPosition(n);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}o(A,"sortByDocumentPosition");function re(t){let n=t.getBoundingClientRect(),r=P(t);if(y.env.jsdom)return n;let s=r.getComputedStyle(t,"::before"),N=r.getComputedStyle(t,"::after");if(!(s.content!=="none"||N.content!=="none"))return n;let x=parseFloat(s.width)||0,p=parseFloat(s.height)||0,f=parseFloat(N.width)||0,d=parseFloat(N.height)||0,h=Math.max(n.width,x,f),c=Math.max(n.height,p,d),g=h-n.width,a=c-n.height;return{left:n.left-g/2,right:n.right+g/2,top:n.top-a/2,bottom:n.bottom+a/2}}o(re,"getPseudoElementBounds");function ie(t){return t==null||t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true"}o(ie,"isElementDisabled");export{W as a,V as b,Z as c,re as d,ie as e};
@@ -1 +0,0 @@
1
- import{a as o}from"./chunk-3XIESWL4.js";var u={highErrorRate:.05,highWriteContention:.1,lowCacheHitRate:.5,minCacheSamples:10,minConflictCalls:5,minErrorCalls:5,slowFunctionMs:1e3},h={error:0,info:2,warning:1},g=o((e,a)=>{let s=[];if(e.maxDurationMs>=a.slowFunctionMs){let n=e.scannedTables??[];n.length>0?s.push({fn:e.path,kind:"missing-index",severity:"warning",tables:n.map(t=>t.table),value:e.maxDurationMs}):s.push({fn:e.path,kind:"slow-function",severity:"info",value:e.maxDurationMs})}e.calls>=a.minErrorCalls&&e.errors/e.calls>=a.highErrorRate&&s.push({fn:e.path,kind:"high-error-rate",message:e.lastErrorMessage??void 0,severity:"error",value:e.errors/e.calls});let r=e.conflicts??0;return r>0&&e.calls>=a.minConflictCalls&&r/e.calls>=a.highWriteContention&&s.push({fn:e.path,kind:"high-write-contention",severity:"warning",value:r/e.calls}),s},"u"),v=o((e,a,s=u)=>{let r=[];if(e?.cache){let{evictions:n,hits:t,misses:c}=e.cache,i=t+c;if(i>=s.minCacheSamples){let l=t/i;l<s.lowCacheHitRate&&r.push({kind:"low-cache-hit-rate",severity:"warning",value:l})}n>0&&n>t&&r.push({kind:"high-evictions",severity:"warning",value:n})}for(let n of a??[])r.push(...g(n,s));return r.toSorted((n,t)=>h[n.severity]-h[t.severity])},"g");export{v as a};
@@ -1 +0,0 @@
1
- import{b as Rs}from"./chunk-T6VMSOBB.js";import{a as ys}from"./chunk-7QIFDWQV.js";import{a as i,e as k,f as W,h as ot}from"./chunk-3XIESWL4.js";var Go=k(W(),1),ue=Go.createContext(null);var Jo=k(W(),1);function D(t){return Jo.useContext(ue)}i(D,"useRouter");var ze=k(W(),1),Mt=ze.createContext(void 0),Yo=ze.createContext(void 0);function pt(t){return t[t.length-1]}i(pt,"last");function Ss(t){return typeof t=="function"}i(Ss,"isFunction");function Y(t,o){return Ss(t)?t(o):t}i(Y,"functionalUpdate");var er=Object.prototype.hasOwnProperty,Xo=Object.prototype.propertyIsEnumerable;function mt(t){for(let o in t)if(er.call(t,o))return!0;return!1}i(mt,"hasKeys");var Ps=i(()=>Object.create(null),"createNull"),gt=i((t,o)=>at(t,o,Ps),"nullReplaceEqualDeep");function at(t,o,e=()=>({}),s=0){if(!1)return o;if(t===o)return t;if(s>500)return o;let r=o,n=Ke(t)&&Ke(r);if(!n&&!(Yt(t)&&Yt(r)))return r;let a=n?t:Zo(t);if(!a)return r;let c=n?r:Zo(r);if(!c)return r;let u=a.length,d=c.length,f=n?new Array(d):e(),l=0;for(let p=0;p<d;p++){let h=n?p:c[p],m=t[h],y=r[h];if(m===y){f[h]=m,(n?p<u:er.call(t,h))&&l++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){f[h]=y;continue}let g=at(m,y,e,s+1);f[h]=g,g===m&&l++}return u===d&&l===u?t:f}i(at,"replaceEqualDeep");function Zo(t){let o=Object.getOwnPropertyNames(t);for(let r of o)if(!Xo.call(t,r))return!1;let e=Object.getOwnPropertySymbols(t);if(e.length===0)return o;let s=o;for(let r of e){if(!Xo.call(t,r))return!1;s.push(r)}return s}i(Zo,"getEnumerableOwnKeys");function Yt(t){if(!Qo(t))return!1;let o=t.constructor;if(typeof o>"u")return!0;let e=o.prototype;return!(!Qo(e)||!e.hasOwnProperty("isPrototypeOf"))}i(Yt,"isPlainObject");function Qo(t){return Object.prototype.toString.call(t)==="[object Object]"}i(Qo,"hasObjectPrototype");function Ke(t){return Array.isArray(t)&&t.length===Object.keys(t).length}i(Ke,"isPlainArray");function st(t,o,e){if(t===o)return!0;if(typeof t!=typeof o)return!1;if(Array.isArray(t)&&Array.isArray(o)){if(t.length!==o.length)return!1;for(let s=0,r=t.length;s<r;s++)if(!st(t[s],o[s],e))return!1;return!0}if(Yt(t)&&Yt(o)){let s=e?.ignoreUndefined??!0;if(e?.partial){for(let a in o)if((!s||o[a]!==void 0)&&!st(t[a],o[a],e))return!1;return!0}let r=0;if(!s)r=Object.keys(t).length;else for(let a in t)t[a]!==void 0&&r++;let n=0;for(let a in o)if((!s||o[a]!==void 0)&&(n++,n>r||!st(t[a],o[a],e)))return!1;return r===n}return!1}i(st,"deepEqual");function ct(t){let o,e,s=new Promise((r,n)=>{o=r,e=n});return s.status="pending",s.resolve=r=>{s.status="resolved",s.value=r,o(r),t?.(r)},s.reject=r=>{s.status="rejected",e(r)},s}i(ct,"createControlledPromise");function vt(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}i(vt,"isPromise");var xs=/[\x00-\x1f\x7f"<>`{}]/g;function ws(t){return t.replace(xs,o=>"%"+o.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}i(ws,"sanitizePathSegment");function tr(t){let o;try{o=decodeURI(t)}catch{o=t.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return ws(o)}i(tr,"decodeSegment");var qe=["http:","https:","mailto:","tel:"];function ut(t,o){if(!t)return!1;try{let e=new URL(t);return!o.has(e.protocol)}catch{return!1}}i(ut,"isDangerousProtocol");function At(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};let o=/%25|%5C/gi,e=0,s="",r;for(;(r=o.exec(t))!==null;)s+=tr(t.slice(e,r.index))+r[0],e=o.lastIndex;s=s+tr(e?t.slice(e):t);let n=!1;return s.startsWith("//")&&(n=!0,s="/"+s.replace(/^\/+/,"")),{path:s,handledProtocolRelativeURL:n}}i(At,"decodePath");function or(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}i(or,"encodePathLikeUrl");function rr(t,o){if(t===o)return!0;if(t.length!==o.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==o[e])return!1;return!0}i(rr,"arraysEqual");function $(){throw new Error("Invariant failed")}i($,"invariant");function yt(t){let o=new Map,e,s,r=i(n=>{n.next&&(n.prev?(n.prev.next=n.next,n.next.prev=n.prev,n.next=void 0,s&&(s.next=n,n.prev=s)):(n.next.prev=void 0,e=n.next,n.next=void 0,s&&(n.prev=s,s.next=n)),s=n)},"touch");return{get(n){let a=o.get(n);if(a)return r(a),a.value},set(n,a){if(o.size>=t&&e){let u=e;o.delete(u.key),u.next&&(e=u.next,u.next.prev=void 0),u===s&&(s=void 0)}let c=o.get(n);if(c)c.value=a,r(c);else{let u={key:n,value:a,prev:s};s&&(s.next=u),s=u,e||(e=u),o.set(n,u)}},clear(){o.clear(),e=void 0,s=void 0}}}i(yt,"createLRUCache");var St=4,nr=5;function _s(t){let o=t.indexOf("{");if(o===-1)return null;let e=t.indexOf("}",o);return e===-1||o+1>=t.length?null:[o,e]}i(_s,"getOpenAndCloseBraces");function Ye(t,o,e=new Uint16Array(6)){let s=t.indexOf("/",o),r=s===-1?t.length:s,n=t.substring(o,r);if(!n||!n.includes("$"))return e[0]=0,e[1]=o,e[2]=o,e[3]=r,e[4]=r,e[5]=r,e;if(n==="$"){let c=t.length;return e[0]=2,e[1]=o,e[2]=o,e[3]=c,e[4]=c,e[5]=c,e}if(n.charCodeAt(0)===36)return e[0]=1,e[1]=o,e[2]=o+1,e[3]=r,e[4]=r,e[5]=r,e;let a=_s(n);if(a){let[c,u]=a,d=n.charCodeAt(c+1);if(d===45){if(c+2<n.length&&n.charCodeAt(c+2)===36){let f=c+3,l=u;if(f<l)return e[0]=3,e[1]=o+c,e[2]=o+f,e[3]=o+l,e[4]=o+u+1,e[5]=r,e}}else if(d===36){let f=c+1,l=c+2;return l===u?(e[0]=2,e[1]=o+c,e[2]=o+f,e[3]=o+l,e[4]=o+u+1,e[5]=t.length,e):(e[0]=1,e[1]=o+c,e[2]=o+l,e[3]=o+u,e[4]=o+u+1,e[5]=r,e)}}return e[0]=0,e[1]=o,e[2]=o,e[3]=r,e[4]=r,e[5]=r,e}i(Ye,"parseSegment");function de(t,o,e,s,r,n,a){a?.(e);let c=s;{let u=e.fullPath??e.from,d=u.length,f=e.options?.caseSensitive??t,l=e.options?.params?.parse??e.options?.parseParams;for(;c<d;){let h=Ye(u,c,o),m,y=c,g=h[5];switch(c=g+1,n++,h[0]){case 0:{let v=u.substring(h[2],h[3]);if(f){let R=r.static?.get(v);if(R)m=R;else{r.static??=new Map;let S=It(e.fullPath??e.from);S.parent=r,S.depth=n,m=S,r.static.set(v,S)}}else{let R=v.toLowerCase(),S=r.staticInsensitive?.get(R);if(S)m=S;else{r.staticInsensitive??=new Map;let P=It(e.fullPath??e.from);P.parent=r,P.depth=n,m=P,r.staticInsensitive.set(R,P)}}break}case 1:{let v=u.substring(y,h[1]),R=u.substring(h[4],g),S=f&&!!(v||R),P=v?S?v:v.toLowerCase():void 0,_=R?S?R:R.toLowerCase():void 0,b=!l&&r.dynamic?.find(x=>!x.parse&&x.caseSensitive===S&&x.prefix===P&&x.suffix===_);if(b)m=b;else{let x=Je(1,e.fullPath??e.from,S,P,_);m=x,x.depth=n,x.parent=r,r.dynamic??=[],r.dynamic.push(x)}break}case 3:{let v=u.substring(y,h[1]),R=u.substring(h[4],g),S=f&&!!(v||R),P=v?S?v:v.toLowerCase():void 0,_=R?S?R:R.toLowerCase():void 0,b=!l&&r.optional?.find(x=>!x.parse&&x.caseSensitive===S&&x.prefix===P&&x.suffix===_);if(b)m=b;else{let x=Je(3,e.fullPath??e.from,S,P,_);m=x,x.parent=r,x.depth=n,r.optional??=[],r.optional.push(x)}break}case 2:{let v=u.substring(y,h[1]),R=u.substring(h[4],g),S=f&&!!(v||R),P=v?S?v:v.toLowerCase():void 0,_=R?S?R:R.toLowerCase():void 0,b=Je(2,e.fullPath??e.from,S,P,_);m=b,b.parent=r,b.depth=n,r.wildcard??=[],r.wildcard.push(b)}}r=m}if(l&&e.children&&!e.isRoot&&e.id&&e.id.charCodeAt(e.id.lastIndexOf("/")+1)===95){let h=It(e.fullPath??e.from);h.kind=nr,h.parent=r,n++,h.depth=n,r.pathless??=[],r.pathless.push(h),r=h}let p=(e.path||!e.children)&&!e.isRoot;if(p&&u.endsWith("/")){let h=It(e.fullPath??e.from);h.kind=St,h.parent=r,n++,h.depth=n,r.index=h,r=h}r.parse=l??null,r.priority=e.options?.params?.priority??0,p&&!r.route&&(r.route=e,r.fullPath=e.fullPath??e.from)}if(e.children)for(let u of e.children)de(t,o,u,c,r,n,a)}i(de,"parseSegments");function Ge(t,o){if(t.parse&&!o.parse)return-1;if(!t.parse&&o.parse)return 1;if(t.parse&&o.parse&&(t.priority||o.priority))return o.priority-t.priority;if(t.prefix&&o.prefix&&t.prefix!==o.prefix){if(t.prefix.startsWith(o.prefix))return-1;if(o.prefix.startsWith(t.prefix))return 1}if(t.suffix&&o.suffix&&t.suffix!==o.suffix){if(t.suffix.endsWith(o.suffix))return-1;if(o.suffix.endsWith(t.suffix))return 1}return t.prefix&&!o.prefix?-1:!t.prefix&&o.prefix?1:t.suffix&&!o.suffix?-1:!t.suffix&&o.suffix?1:t.caseSensitive&&!o.caseSensitive?-1:!t.caseSensitive&&o.caseSensitive?1:0}i(Ge,"sortDynamic");function Rt(t){if(t.pathless)for(let o of t.pathless)Rt(o);if(t.static)for(let o of t.static.values())Rt(o);if(t.staticInsensitive)for(let o of t.staticInsensitive.values())Rt(o);if(t.dynamic?.length){t.dynamic.sort(Ge);for(let o of t.dynamic)Rt(o)}if(t.optional?.length){t.optional.sort(Ge);for(let o of t.optional)Rt(o)}if(t.wildcard?.length){t.wildcard.sort(Ge);for(let o of t.wildcard)Rt(o)}}i(Rt,"sortTreeNodes");function It(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0}}i(It,"createStaticNode");function Je(t,o,e,s,r){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:o,parent:null,parse:null,priority:0,caseSensitive:e,prefix:s,suffix:r}}i(Je,"createDynamicNode");function ir(t,o){let e=It("/"),s=new Uint16Array(6);for(let r of t)de(!1,s,r,1,e,0);Rt(e),o.masksTree=e,o.flatCache=yt(1e3)}i(ir,"processRouteMasks");function ar(t,o){t||="/";let e=o.flatCache.get(t);if(e)return e;let s=Xe(t,o.masksTree);return o.flatCache.set(t,s),s}i(ar,"findFlatMatch");function cr(t,o,e,s,r){t||="/",s||="/";let n=o?`case\0${t}`:t,a=r.singleCache.get(n);return a||(a=It("/"),de(o,new Uint16Array(6),{from:t},1,a,0),r.singleCache.set(n,a)),Xe(s,a,e)}i(cr,"findSingleMatch");function ur(t,o,e=!1){let s=e?t:`nofuzz\0${t}`,r=o.matchCache.get(s);if(r!==void 0)return r;t||="/";let n;try{n=Xe(t,o.segmentTree,e)}catch(a){if(a instanceof URIError)n=null;else throw a}return n&&(n.branch=Ze(n.route)),o.matchCache.set(s,n),n}i(ur,"findRouteMatch");function Cs(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}i(Cs,"trimPathRight");function lr(t,o=!1,e){let s=It(t.fullPath),r=new Uint16Array(6),n={},a={},c=0;return de(o,r,t,1,s,0,u=>{if(e?.(u,c),u.id in n&&$(),n[u.id]=u,c!==0&&u.path){let d=Cs(u.fullPath);(!a[d]||u.fullPath.endsWith("/"))&&(a[d]=u)}c++}),Rt(s),{processedTree:{segmentTree:s,singleCache:yt(1e3),matchCache:yt(1e3),flatCache:null,masksTree:null},routesById:n,routesByPath:a}}i(lr,"processRouteTree");function Xe(t,o,e=!1){let s=t.split("/"),r=Ls(t,s,o,e);if(!r)return null;let[n]=fr(t,s,r);return{route:r.node.route,rawParams:n}}i(Xe,"findMatch");function fr(t,o,e){let s=bs(e.node),r=null,n=Object.create(null),a=e.extract?.part??0,c=e.extract?.node??0,u=e.extract?.path??0,d=e.extract?.segment??0;for(;c<s.length;a++,c++,u++,d++){let f=s[c];if(f.kind===St)break;if(f.kind===nr){d--,a--,u--;continue}let l=o[a],p=u;if(l&&(u+=l.length),f.kind===1){r??=e.node.fullPath.split("/");let h=r[d],m=f.prefix?.length??0;if(h.charCodeAt(m)===123){let y=f.suffix?.length??0,g=h.substring(m+2,h.length-y-1),v=l.substring(m,l.length-y);n[g]=decodeURIComponent(v)}else{let y=h.substring(1);n[y]=decodeURIComponent(l)}}else if(f.kind===3){if(e.skipped&1<<c){a--,u=p-1;continue}r??=e.node.fullPath.split("/");let h=r[d],m=f.prefix?.length??0,y=f.suffix?.length??0,g=h.substring(m+3,h.length-y-1),v=f.suffix||f.prefix?l.substring(m,l.length-y):l;v&&(n[g]=decodeURIComponent(v))}else if(f.kind===2){let h=f,m=t.substring(p+(h.prefix?.length??0),t.length-(h.suffix?.length??0)),y=decodeURIComponent(m);n["*"]=y,n._splat=y;break}}return e.rawParams&&Object.assign(n,e.rawParams),[n,{part:a,node:c,path:u,segment:d}]}i(fr,"extractParams");function Ze(t){let o=[t];for(;t.parentRoute;)t=t.parentRoute,o.push(t);return o.reverse(),o}i(Ze,"buildRouteBranch");function bs(t){let o=Array(t.depth+1);do o[t.depth]=t,t=t.parent;while(t);return o}i(bs,"buildBranch");function Ls(t,o,e,s){if(t==="/"&&e.index)return{node:e.index,skipped:0};let r=!pt(o),n=r&&t!=="/",a=o.length-(r?1:0),c=[{node:e,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],u=null,d=null;for(;c.length;){let f=c.pop(),{node:l,index:p,skipped:h,depth:m,statics:y,dynamics:g,optionals:v}=f,{extract:R,rawParams:S}=f;if(l.kind===2&&l.route&&!fe(d,f))continue;if(l.parse){if(!sr(t,o,f))continue;S=f.rawParams,R=f.extract}s&&l.route&&l.kind!==St&&fe(u,f)&&(u=f);let P=p===a;if(P&&(l.route&&(!n||l.kind===St||l.kind===2)&&fe(d,f)&&(d=f),!l.optional&&!l.wildcard&&!l.index&&!l.pathless))continue;let _=P?void 0:o[p],b;if(P&&l.index){let x={node:l.index,index:p,skipped:h,depth:m+1,statics:y,dynamics:g,optionals:v,extract:R,rawParams:S},w=!0;if(l.index.parse&&(sr(t,o,x)||(w=!1)),w){if(!g&&!v&&!h&&Ms(y,a))return x;fe(d,x)&&(d=x)}}if(l.wildcard)for(let x=l.wildcard.length-1;x>=0;x--){let w=l.wildcard[x],{prefix:C,suffix:M}=w;if(!(C&&(P||!(w.caseSensitive?_:b??=_.toLowerCase()).startsWith(C)))){if(M){if(P)continue;let L=o.slice(p).join("/").slice(-M.length);if((w.caseSensitive?L:L.toLowerCase())!==M)continue}c.push({node:w,index:a,skipped:h,depth:m+1,statics:y,dynamics:g,optionals:v,extract:R,rawParams:S})}}if(l.optional){let x=h|1<<m,w=m+1;for(let C=l.optional.length-1;C>=0;C--){let M=l.optional[C];c.push({node:M,index:p,skipped:x,depth:w,statics:y,dynamics:g,optionals:v,extract:R,rawParams:S})}if(!P)for(let C=l.optional.length-1;C>=0;C--){let M=l.optional[C],{prefix:L,suffix:I}=M;if(L||I){let rt=M.caseSensitive?_:b??=_.toLowerCase();if(L&&!rt.startsWith(L)||I&&!rt.endsWith(I))continue}c.push({node:M,index:p+1,skipped:h,depth:w,statics:y,dynamics:g,optionals:v+le(a,p),extract:R,rawParams:S})}}if(!P&&l.dynamic&&_)for(let x=l.dynamic.length-1;x>=0;x--){let w=l.dynamic[x],{prefix:C,suffix:M}=w;if(C||M){let L=w.caseSensitive?_:b??=_.toLowerCase();if(C&&!L.startsWith(C)||M&&!L.endsWith(M))continue}c.push({node:w,index:p+1,skipped:h,depth:m+1,statics:y,dynamics:g+le(a,p),optionals:v,extract:R,rawParams:S})}if(!P&&l.staticInsensitive){let x=l.staticInsensitive.get(b??=_.toLowerCase());x&&c.push({node:x,index:p+1,skipped:h,depth:m+1,statics:y+le(a,p),dynamics:g,optionals:v,extract:R,rawParams:S})}if(!P&&l.static){let x=l.static.get(_);x&&c.push({node:x,index:p+1,skipped:h,depth:m+1,statics:y+le(a,p),dynamics:g,optionals:v,extract:R,rawParams:S})}if(l.pathless){let x=m+1;for(let w=l.pathless.length-1;w>=0;w--){let C=l.pathless[w];c.push({node:C,index:p,skipped:h,depth:x,statics:y,dynamics:g,optionals:v,extract:R,rawParams:S})}}}if(d)return d;if(s&&u){let f=u.index;for(let p=0;p<u.index;p++)f+=o[p].length;let l=f===t.length?"/":t.slice(f);return u.rawParams??=Object.create(null),u.rawParams["**"]=decodeURIComponent(l),u}return null}i(Ls,"getNodeMatch");function le(t,o){return 2**(t-o-1)}i(le,"segmentScore");function Ms(t,o){return t===2**(o-1)-1}i(Ms,"isPerfectStaticMatch");function sr(t,o,e){let s,r;try{[s,r]=fr(t,o,e)}catch{return null}if(e.rawParams=s,e.extract=r,!e.node.parse)return!0;try{if(e.node.parse(s)===!1)return null}catch{}return!0}i(sr,"validateParseParams");function fe(t,o){return t?o.statics>t.statics||o.statics===t.statics&&(o.dynamics>t.dynamics||o.dynamics===t.dynamics&&(o.optionals>t.optionals||o.optionals===t.optionals&&((o.node.kind===St)>(t.node.kind===St)||o.node.kind===St==(t.node.kind===St)&&o.depth>t.depth))):!0}i(fe,"isFrameMoreSpecific");function Et(t){return Zt(t.filter(o=>o!==void 0).join("/"))}i(Et,"joinPaths");function Zt(t){return t.replace(/\/{2,}/g,"/")}i(Zt,"cleanPath");function he(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}i(he,"trimPathLeft");function Z(t){let o=t.length;return o>1&&t[o-1]==="/"?t.replace(/\/{1,}$/,""):t}i(Z,"trimPathRight");function Qt(t){return Z(he(t))}i(Qt,"trimPath");function Pt(t,o){return t?.endsWith("/")&&t!=="/"&&t!==`${o}/`?t.slice(0,-1):t}i(Pt,"removeTrailingSlash");function pe(t,o,e){return Pt(t,e)===Pt(o,e)}i(pe,"exactPathTest");function Qe({base:t,to:o,trailingSlash:e="never",cache:s}){let r=o.startsWith("/"),n=!r&&o===".",a;if(s){a=r?o:n?t:t+"\0"+o;let d=s.get(a);if(d)return d}let c;if(n)c=t.split("/");else if(r)c=o.split("/");else{for(c=t.split("/");c.length>1&&pt(c)==="";)c.pop();let d=o.split("/");for(let f=0,l=d.length;f<l;f++){let p=d[f];p===""?f?f===l-1&&c.push(p):c=[p]:p===".."?c.pop():p==="."||c.push(p)}}c.length>1&&(pt(c)===""?e==="never"&&c.pop():e==="always"&&c.push(""));let u=Zt(c.join("/"))||"/";return a&&s&&s.set(a,u),u}i(Qe,"resolvePath");function hr(t){let o=new Map(t.map(r=>[encodeURIComponent(r),r])),e=Array.from(o.keys()).map(r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),s=new RegExp(e,"g");return r=>r.replace(s,n=>o.get(n)??n)}i(hr,"compileDecodeCharMap");function Xt(t,o,e){let s=o[t];return typeof s!="string"?s:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(s)?s:s.split("/").map(r=>dr(r,e)).join("/"):dr(s,e)}i(Xt,"encodeParam");function me({path:t,params:o,decoder:e,...s}){let r=!1,n=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:n,isMissingParams:r};if(!t.includes("$"))return{interpolatedPath:t,usedParams:n,isMissingParams:r};if(!1){let f=t.length,l=0,p="";for(;l<f;){for(;l<f&&t.charCodeAt(l)===47;)l++;if(l>=f)break;let h=l,m=t.indexOf("/",l);m===-1&&(m=f),l=m;let y=t.substring(h,m);if(y)if(y.charCodeAt(0)===36)if(y.length===1){let g=o._splat;if(n._splat=g,n["*"]=g,!g){r=!0;continue}let v=Xt("_splat",o,e);p+="/"+v}else{let g=y.substring(1);!r&&!(g in o)&&(r=!0),n[g]=o[g];let v=Xt(g,o,e)??"undefined";p+="/"+v}else p+="/"+y}return t.endsWith("/")&&(p+="/"),{usedParams:n,interpolatedPath:p||"/",isMissingParams:r}}let a=t.length,c=0,u,d="";for(;c<a;){let f=c;u=Ye(t,f,u);let l=u[5];if(c=l+1,f===l)continue;let p=u[0];if(p===0){d+="/"+t.substring(f,l);continue}if(p===2){let h=o._splat;n._splat=h,n["*"]=h;let m=t.substring(f,u[1]),y=t.substring(u[4],l);if(!h){r=!0,(m||y)&&(d+="/"+m+y);continue}let g=Xt("_splat",o,e);d+="/"+m+g+y;continue}if(p===1){let h=t.substring(u[2],u[3]);!r&&!(h in o)&&(r=!0),n[h]=o[h];let m=t.substring(f,u[1]),y=t.substring(u[4],l),g=Xt(h,o,e)??"undefined";d+="/"+m+g+y;continue}if(p===3){let h=t.substring(u[2],u[3]),m=o[h];if(m==null)continue;n[h]=m;let y=t.substring(f,u[1]),g=t.substring(u[4],l),v=Xt(h,o,e)??"";d+="/"+y+v+g;continue}}return t.endsWith("/")&&(d+="/"),{usedParams:n,interpolatedPath:d||"/",isMissingParams:r}}i(me,"interpolatePath");function dr(t,o){let e=encodeURIComponent(t);return o?.(e)??e}i(dr,"encodePathParam");function A(t){return t?.isNotFound===!0}i(A,"isNotFound");function Is(){try{return sessionStorage}catch{return}}i(Is,"getSafeSessionStorage");var Es="tsr-scroll-restoration-v1_3",gr=Is();function ks(){try{return JSON.parse(gr?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}i(ks,"createScrollRestorationCache");function Ts(){try{gr?.setItem(Es,JSON.stringify(Bt))}catch{}}i(Ts,"persistScrollRestorationCache");var Bt=ks(),pr="data-scroll-restoration-id",Os=i(t=>t.state.__TSR_key||t.href,"defaultGetScrollRestorationKey");function Ns(t){let o=t.getAttribute(pr);if(o)return`[${pr}="${o}"]`;let e="",s=t,r;for(;r=s.parentNode;){let n=1,a=s;for(;a=a.previousElementSibling;)n++;let c=`${s.localName}:nth-child(${n})`;e=e?`${c} > ${e}`:c,s=r}return e}i(Ns,"getScrollRestorationSelector");var ge=!1,ve="window";function to(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}i(to,"getElement");function mr(t){let o=new Set;for(let e of t){if(e===ve)continue;let s=to(e);s&&o.add(s)}return o}i(mr,"getScrollToTopElements");function vr(t,o){let e=o??t.options.scrollRestoration,s=t._scroll;if(e&&(s.restoring=!0),!1)return;let r=t.options.getScrollRestorationKey||Os,n=new Set,a=i(c=>{let u=Bt[c]||={};for(let d of n)d===document?u[ve]={scrollX,scrollY}:d.isConnected&&(u[Ns(d)]={scrollX:d.scrollLeft,scrollY:d.scrollTop})},"snapshotCurrentScrollTargets");e&&!s.restoration&&(s.restoration=!0,ge=!1,history.scrollRestoration="manual",document.addEventListener("scroll",c=>{ge||n.add(c.target)},!0),t.subscribe("onBeforeLoad",c=>{c.fromLocation&&a(r(c.fromLocation)),n.clear()}),addEventListener("pagehide",()=>{a(r(t.stores.resolvedLocation.get()??t.stores.location.get())),Ts()})),!s.reset&&(s.reset=!0,t.subscribe("onRendered",c=>{let u=t.options.scrollRestorationBehavior,d=t.options.scrollToTopSelectors,f=s.next,l=s.hash,p;if(n.clear(),s.next=!0,s.hash=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;let h=r(c.toLocation),m=c.fromLocation&&r(c.fromLocation);if(s.restoring&&m&&m!==h){let y=Bt[m];if(y){let g=Bt[h];for(let v in y){if(v===ve){if(f)continue}else{let R=to(v);if(!R||f&&d&&(p??=mr(d),p.has(R)))continue}g||(g=Bt[h]={}),g[v]??=y[v]}}}ge=!0;try{let y=c.toLocation.hash,g=c.toLocation.state.__hashScrollIntoViewOptions??!0,v=!1;if(f){!y&&d&&(p??=mr(d));let R=y&&g&&l,S=s.restoring?Bt[h]:void 0;if(S)for(let P in S){let{scrollX:_,scrollY:b}=S[P];if(P===ve){if(R)continue;scrollTo({top:b,left:_,behavior:u}),v=!0}else{let x=to(P);x&&(x.scrollLeft=_,x.scrollTop=b,p?.delete(x))}}if(!y){let P={top:0,left:0,behavior:u};if(v||scrollTo(P),p)for(let _ of p)_.scrollTo(P)}}!v&&y&&g&&document.getElementById(y)?.scrollIntoView(g)}finally{ge=!1}}))}i(vr,"setupScrollRestoration");function yr(t,o=String){let e=new URLSearchParams;for(let s in t){let r=t[s];r!==void 0&&e.set(s,o(r))}return e.toString()}i(yr,"encode");function eo(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}i(eo,"toValue");function Rr(t){let o=new URLSearchParams(t),e=Object.create(null);for(let[s,r]of o.entries()){let n=e[s];n==null?e[s]=eo(r):Array.isArray(n)?n.push(eo(r)):e[s]=[n,eo(r)]}return e}i(Rr,"decode");var Sr=Ds(JSON.parse),Pr=Fs(JSON.stringify,JSON.parse);function Ds(t){return o=>{o[0]==="?"&&(o=o.substring(1));let e=Rr(o);for(let s in e){let r=e[s];if(typeof r=="string")try{e[s]=t(r)}catch{}}return e}}i(Ds,"parseSearchWith");function Fs(t,o){let e=typeof o=="function";function s(r){if(typeof r=="object"&&r!==null)try{return t(r)}catch{}else if(e&&typeof r=="string")try{return o(r),t(r)}catch{}return r}return i(s,"stringifyValue"),r=>{let n=yr(r,s);return n?`?${n}`:""}}i(Fs,"stringifySearchWith");var X="__root__";function $t(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}let o=new Headers(t.headers);t.href&&o.get("Location")===null&&o.set("Location",t.href);let e=new Response(null,{status:t.statusCode,headers:o});if(e.options=t,t.throw)throw e;return e}i($t,"redirect");function H(t){return t instanceof Response&&!!t.options}i(H,"isRedirect");function xr(t){return{input:i(({url:o})=>{for(let e of t)o=ye(e,o);return o},"input"),output:i(({url:o})=>{for(let e=t.length-1;e>=0;e--)o=oo(t[e],o);return o},"output")}}i(xr,"composeRewrites");function wr(t){let o=Qt(t.basepath),e=`/${o}`,s=t.caseSensitive?e:e.toLowerCase(),r=`${s}/`;return{input:i(({url:n})=>{let a=t.caseSensitive?n.pathname:n.pathname.toLowerCase();return a===s?n.pathname="/":a.startsWith(r)&&(n.pathname=n.pathname.slice(e.length)),n},"input"),output:i(({url:n})=>(n.pathname=Et(["/",o,n.pathname]),n),"output")}}i(wr,"rewriteBasepath");function ye(t,o){let e=t?.input?.({url:o});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return o}i(ye,"executeRewriteInput");function oo(t,o){let e=t?.output?.({url:o});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return o}i(oo,"executeRewriteOutput");function no(t){let o=t;return{get(){return o},set(e){o=Y(e,o)}}}i(no,"createNonReactiveMutableStore");function io(t){return{get(){return t()}}}i(io,"createNonReactiveReadonlyStore");function _r(t,o){let{createMutableStore:e,createReadonlyStore:s,batch:r,init:n}=o,a=new Map,c=new Map,u=new Map,d=e(t.status),f=e(t.loadedAt),l=e(t.isLoading),p=e(t.isTransitioning),h=e(t.location),m=e(t.resolvedLocation),y=e(t.statusCode),g=e(t.redirect),v=e([]),R=e([]),S=e([]),P=s(()=>ro(a,v.get())),_=s(()=>ro(c,R.get())),b=s(()=>ro(u,S.get())),x=s(()=>v.get()[0]),w=s(()=>v.get().some(tt=>a.get(tt)?.get().status==="pending")),C=s(()=>({locationHref:h.get().href,resolvedLocationHref:m.get()?.href,status:d.get()})),M=s(()=>({status:d.get(),loadedAt:f.get(),isLoading:l.get(),isTransitioning:p.get(),matches:P.get(),location:h.get(),resolvedLocation:m.get(),statusCode:y.get(),redirect:g.get()})),L=yt(64);function I(tt){let zt=L.get(tt);return zt||(zt=s(()=>{let Fo=v.get();for(let Ao of Fo){let ie=a.get(Ao);if(ie&&ie.routeId===tt)return ie.get()}}),L.set(tt,zt)),zt}i(I,"getRouteMatchStore");let rt={status:d,loadedAt:f,isLoading:l,isTransitioning:p,location:h,resolvedLocation:m,statusCode:y,redirect:g,matchesId:v,pendingIds:R,cachedIds:S,matches:P,pendingMatches:_,cachedMatches:b,firstId:x,hasPending:w,matchRouteDeps:C,matchStores:a,pendingMatchStores:c,cachedMatchStores:u,__store:M,getRouteMatchStore:I,setMatches:K,setPending:dt,setCached:ne};K(t.matches),n?.(rt);function K(tt){so(tt,a,v,e,r)}i(K,"setMatches");function dt(tt){so(tt,c,R,e,r)}i(dt,"setPending");function ne(tt){so(tt,u,S,e,r)}return i(ne,"setCached"),rt}i(_r,"createRouterStores");function ro(t,o){let e=[];for(let s of o){let r=t.get(s);r&&e.push(r.get())}return e}i(ro,"readPoolMatches");function so(t,o,e,s,r){let n=t.map(c=>c.id),a=new Set(n);r(()=>{for(let c of o.keys())a.has(c)||o.delete(c);for(let c of t){let u=o.get(c.id);if(!u){let d=s(c);d.routeId=c.routeId,o.set(c.id,d);continue}u.routeId=c.routeId,u.get()!==c&&u.set(c)}rr(e.get(),n)||e.set(n)})}i(so,"reconcileMatchPool");var ao=i(t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},"triggerOnReady"),As=i(t=>t.stores.matchesId.get().some(o=>t.stores.matchStores.get(o)?.get()._forcePending),"hasForcePendingActiveMatch"),Pe=i((t,o)=>!!(t.preload&&!t.router.stores.matchStores.has(o)),"resolvePreload"),kt=i((t,o,e=!0)=>{let s={...t.router.options.context??{}},r=e?o:o-1;for(let n=0;n<=r;n++){let a=t.matches[n];if(!a)continue;let c=t.router.getMatch(a.id);c&&Object.assign(s,c.__routeContext,c.__beforeLoadContext)}return s},"buildMatchContext"),Cr=i((t,o)=>{if(!t.matches.length)return;let e=o.routeId,s=t.matches.findIndex(a=>a.routeId===t.router.routeTree.id),r=s>=0?s:0,n=e?t.matches.findIndex(a=>a.routeId===e):t.firstBadMatchIndex??t.matches.length-1;n<0&&(n=r);for(let a=n;a>=0;a--){let c=t.matches[a];if(t.router.looseRoutesById[c.routeId].options.notFoundComponent)return a}return e?n:r},"getNotFoundBoundaryIndex"),xt=i((t,o,e)=>{if(!(!H(e)&&!A(e)))throw H(e)&&e.redirectHandled&&!e.options.reloadDocument||(o&&(o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.loaderPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loaderPromise=void 0,o._nonReactive.error=e,t.updateMatch(o.id,s=>({...s,status:H(e)?"redirected":A(e)?"notFound":s.status==="pending"?"success":s.status,context:kt(t,o.index),isFetching:!1,error:e})),A(e)&&!e.routeId&&(e.routeId=o.routeId),o._nonReactive.loadPromise?.resolve()),H(e)&&(t.rendered=!0,e.options._fromLocation=t.location,e.redirectHandled=!0,e=t.router.resolveRedirect(e))),e},"handleRedirectAndNotFound"),Ir=i((t,o)=>{let e=t.router.getMatch(o);return!!(!e||!!1&&e._nonReactive.dehydrated||!1)},"shouldSkipLoader"),br=i((t,o,e)=>{let s=kt(t,e);t.updateMatch(o,r=>({...r,context:s}))},"syncMatchContext"),te=i((t,o,e)=>{let{id:s,routeId:r}=t.matches[o],n=t.router.looseRoutesById[r];if(e instanceof Promise)throw e;t.firstBadMatchIndex??=o,xt(t,t.router.getMatch(s),e);try{n.options.onError?.(e)}catch(a){e=a,xt(t,t.router.getMatch(s),e)}t.updateMatch(s,a=>(a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,a._nonReactive.loadPromise?.resolve(),{...a,error:e,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!H(e)&&!A(e)&&(t.serialError??=e)},"handleSerialError"),Bs=i((t,o,e,s)=>{let r=t.router.getMatch(o),n=t.matches[e-1]?.id,a=n?t.router.getMatch(n):void 0;if(t.router.isShell()){r.ssr=s.id===X;return}if(a?.ssr===!1){r.ssr=!1;return}let c=i(h=>h===!0&&a?.ssr==="data-only"?"data-only":h,"parentOverride"),u=t.router.options.defaultSsr??!0;if(s.options.ssr===void 0){r.ssr=c(u);return}if(typeof s.options.ssr!="function"){r.ssr=c(s.options.ssr);return}let{search:d,params:f}=r,l={search:Re(d,r.searchError),params:Re(f,r.paramsError),location:t.location,matches:t.matches.map(h=>({index:h.index,pathname:h.pathname,fullPath:h.fullPath,staticData:h.staticData,id:h.id,routeId:h.routeId,search:Re(h.search,h.searchError),params:Re(h.params,h.paramsError),ssr:h.ssr}))},p=s.options.ssr(l);if(vt(p))return p.then(h=>{r.ssr=c(h??u)});r.ssr=c(p??u)},"isBeforeLoadSsr"),Er=i((t,o,e,s)=>{if(s._nonReactive.pendingTimeout!==void 0)return;let r=e.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!!1&&!Pe(t,o)&&(e.options.loader||e.options.beforeLoad||uo(e))&&typeof r=="number"&&r!==1/0&&(e.options.pendingComponent??t.router.options?.defaultPendingComponent)){let n=setTimeout(()=>{ao(t)},r);s._nonReactive.pendingTimeout=n}},"setupPendingTimeout"),$s=i((t,o,e)=>{let s=t.router.getMatch(o);if(!s._nonReactive.beforeLoadPromise&&!s._nonReactive.loaderPromise)return;Er(t,o,e,s);let r=i(()=>{let n=t.router.getMatch(o);n.preload&&(n.status==="redirected"||n.status==="notFound")&&xt(t,n,n.error)},"then");return s._nonReactive.beforeLoadPromise?s._nonReactive.beforeLoadPromise.then(r):r()},"preBeforeLoadSetup"),Us=i((t,o,e,s)=>{let r=t.router.getMatch(o),n=r._nonReactive.loadPromise;r._nonReactive.loadPromise=ct(()=>{n?.resolve(),n=void 0});let{paramsError:a,searchError:c}=r;a&&te(t,e,a),c&&te(t,e,c),Er(t,o,s,r);let u=new AbortController,d=!1,f=i(()=>{d||(d=!0,t.updateMatch(o,P=>({...P,isFetching:"beforeLoad",fetchCount:P.fetchCount+1,abortController:u})))},"pending"),l=i(()=>{r._nonReactive.beforeLoadPromise?.resolve(),r._nonReactive.beforeLoadPromise=void 0,t.updateMatch(o,P=>({...P,isFetching:!1}))},"resolve");if(!s.options.beforeLoad){t.router.batch(()=>{f(),l()});return}r._nonReactive.beforeLoadPromise=ct();let p={...kt(t,e,!1),...r.__routeContext},{search:h,params:m,cause:y}=r,g=Pe(t,o),v={search:h,abortController:u,params:m,preload:g,context:p,location:t.location,navigate:i(P=>t.router.navigate({...P,_fromLocation:t.location}),"navigate"),buildLocation:t.router.buildLocation,cause:g?"preload":y,matches:t.matches,routeId:s.id,...t.router.options.additionalContext},R=i(P=>{if(P===void 0){t.router.batch(()=>{f(),l()});return}(H(P)||A(P))&&(f(),te(t,e,P)),t.router.batch(()=>{f(),t.updateMatch(o,_=>({..._,__beforeLoadContext:P})),l()})},"updateContext"),S;try{if(S=s.options.beforeLoad(v),vt(S))return f(),S.catch(P=>{te(t,e,P)}).then(R)}catch(P){f(),te(t,e,P)}R(S)},"executeBeforeLoad"),Hs=i((t,o)=>{let{id:e,routeId:s}=t.matches[o],r=t.router.looseRoutesById[s],n=i(()=>{if(!1){let u=Bs(t,e,o,r);if(vt(u))return u.then(c)}return c()},"serverSsr"),a=i(()=>Us(t,e,o,r),"execute"),c=i(()=>{if(Ir(t,e))return;let u=$s(t,e,r);return vt(u)?u.then(a):a()},"queueExecution");return n()},"handleBeforeLoad"),Vs=i((t,o,e)=>{let s=t.router.getMatch(o);if(!s||!e.options.head&&!e.options.scripts&&!e.options.headers)return;let r={ssr:t.router.options.ssr,matches:t.matches,match:s,params:s.params,loaderData:s.loaderData};return Promise.all([e.options.head?.(r),e.options.scripts?.(r),e.options.headers?.(r)]).then(([n,a,c])=>({meta:n?.meta,links:n?.links,headScripts:n?.scripts,headers:c,scripts:a,styles:n?.styles}))},"executeHead"),kr=i((t,o,e,s,r)=>{let n=o[s-1],{params:a,loaderDeps:c,abortController:u,cause:d}=t.router.getMatch(e),f=kt(t,s),l=Pe(t,e);return{params:a,deps:c,preload:!!l,parentMatchPromise:n,abortController:u,context:f,location:t.location,navigate:i(p=>t.router.navigate({...p,_fromLocation:t.location}),"navigate"),cause:l?"preload":d,route:r,...t.router.options.additionalContext}},"getLoaderContext"),Lr=i(async(t,o,e,s,r)=>{try{let n=t.router.getMatch(e);try{(!!1||n.ssr===!0)&&Ut(r);let a=r.options.loader,c=typeof a=="function"?a:a?.handler,u=c?.(kr(t,o,e,s,r)),d=!!c&&vt(u);if((d||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||n._nonReactive.minPendingPromise)&&t.updateMatch(e,l=>({...l,isFetching:"loader"})),c){let l=d?await u:u;xt(t,t.router.getMatch(e),l),l!==void 0&&t.updateMatch(e,p=>({...p,loaderData:l}))}r._lazyPromise&&await r._lazyPromise;let f=n._nonReactive.minPendingPromise;f&&await f,r._componentsPromise&&await r._componentsPromise,t.updateMatch(e,l=>({...l,error:void 0,context:kt(t,s),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let c=a;if(c?.name==="AbortError"){if(n.abortController.signal.aborted){n._nonReactive.loaderPromise?.resolve(),n._nonReactive.loaderPromise=void 0;return}t.updateMatch(e,d=>({...d,status:d.status==="pending"?"success":d.status,isFetching:!1,context:kt(t,s)}));return}let u=n._nonReactive.minPendingPromise;u&&await u,A(a)&&await r.options.notFoundComponent?.preload?.(),xt(t,t.router.getMatch(e),a);try{r.options.onError?.(a)}catch(d){c=d,xt(t,t.router.getMatch(e),d)}!H(c)&&!A(c)&&await Ut(r,["errorComponent"]),t.updateMatch(e,d=>({...d,error:c,context:kt(t,s),status:"error",isFetching:!1}))}}catch(n){let a=t.router.getMatch(e);a&&(a._nonReactive.loaderPromise=void 0),xt(t,a,n)}},"runLoader"),Ws=i(async(t,o,e)=>{async function s(h,m,y,g,v){let R=Date.now()-m.updatedAt,S=h?v.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:v.options.staleTime??t.router.options.defaultStaleTime??0,P=v.options.shouldReload,_=typeof P=="function"?P(kr(t,o,r,e,v)):P,{status:b,invalid:x}=g,w=R>=S&&(!!t.forceStaleReload||g.cause==="enter"||y!==void 0&&y!==g.id);a=b==="success"&&(x||(_??w)),h&&v.options.preload===!1||(a&&!t.sync&&f?(c=!0,(async()=>{try{await Lr(t,o,r,e,v);let C=t.router.getMatch(r);C._nonReactive.loaderPromise?.resolve(),C._nonReactive.loadPromise?.resolve(),C._nonReactive.loaderPromise=void 0,C._nonReactive.loadPromise=void 0}catch(C){H(C)&&await t.router.navigate(C.options)}})()):b!=="success"||a?await Lr(t,o,r,e,v):br(t,r,e))}i(s,"handleLoader");let{id:r,routeId:n}=t.matches[e],a=!1,c=!1,u=t.router.looseRoutesById[n],d=u.options.loader,f=((typeof d=="function"?void 0:d?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(Ir(t,r)){if(!t.router.getMatch(r))return t.matches[e];if(br(t,r,e),!1)return t.router.getMatch(r)}else{let h=t.router.getMatch(r),m=t.router.stores.matchesId.get()[e],y=(m&&t.router.stores.matchStores.get(m)||null)?.routeId===n?m:t.router.stores.matches.get().find(v=>v.routeId===n)?.id,g=Pe(t,r);if(h._nonReactive.loaderPromise){if(h.status==="success"&&!t.sync&&!h.preload&&f)return h;await h._nonReactive.loaderPromise;let v=t.router.getMatch(r),R=v._nonReactive.error||v.error;R&&xt(t,v,R),v.status==="pending"&&await s(g,h,y,v,u)}else{let v=g&&!t.router.stores.matchStores.has(r),R=t.router.getMatch(r);R._nonReactive.loaderPromise=ct(),v!==R.preload&&t.updateMatch(r,S=>({...S,preload:v})),await s(g,h,y,R,u)}}let l=t.router.getMatch(r);c||(l._nonReactive.loaderPromise?.resolve(),l._nonReactive.loadPromise?.resolve(),l._nonReactive.loadPromise=void 0),clearTimeout(l._nonReactive.pendingTimeout),l._nonReactive.pendingTimeout=void 0,c||(l._nonReactive.loaderPromise=void 0),l._nonReactive.dehydrated=void 0;let p=c?l.isFetching:!1;return p!==l.isFetching||l.invalid!==!1?(t.updateMatch(r,h=>({...h,isFetching:p,invalid:!1})),t.router.getMatch(r)):l},"loadRouteMatch");async function co(t){let o=t,e=[];!!1&&As(o.router)&&ao(o);let s;for(let p=0;p<o.matches.length;p++){try{let h=Hs(o,p);vt(h)&&await h}catch(h){if(H(h))throw h;if(A(h))s=h;else if(!o.preload)throw h;break}if(o.serialError||o.firstBadMatchIndex!=null)break}let r=o.firstBadMatchIndex??o.matches.length,n=s&&!o.preload?Cr(o,s):void 0,a=s&&o.preload?0:n!==void 0?Math.min(n+1,r):r,c,u;for(let p=0;p<a;p++)e.push(Ws(o,e,p));try{await Promise.all(e)}catch{let p=await Promise.allSettled(e);for(let h of p){if(h.status!=="rejected")continue;let m=h.reason;if(H(m))throw m;A(m)?c??=m:u??=m}if(u!==void 0)throw u}let d=c??(s&&!o.preload?s:void 0),f=o.firstBadMatchIndex!==void 0?o.firstBadMatchIndex:o.matches.length-1;if(!d&&s&&o.preload)return o.matches;if(d){let p=Cr(o,d);p===void 0&&$();let h=o.matches[p],m=o.router.looseRoutesById[h.routeId],y=o.router.options?.defaultNotFoundComponent;!m.options.notFoundComponent&&y&&(m.options.notFoundComponent=y),d.routeId=h.routeId;let g=h.routeId===o.router.routeTree.id;o.updateMatch(h.id,v=>({...v,...g?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:d},isFetching:!1})),f=p,await Ut(m,["notFoundComponent"])}else if(!o.preload){let p=o.matches[0];p.globalNotFound||o.router.getMatch(p.id)?.globalNotFound&&o.updateMatch(p.id,h=>({...h,globalNotFound:!1,error:void 0}))}if(o.serialError&&o.firstBadMatchIndex!==void 0){let p=o.router.looseRoutesById[o.matches[o.firstBadMatchIndex].routeId];await Ut(p,["errorComponent"])}for(let p=0;p<=f;p++){let{id:h,routeId:m}=o.matches[p],y=o.router.looseRoutesById[m];try{let g=Vs(o,h,y);if(g){let v=await g;o.updateMatch(h,R=>({...R,...v}))}}catch(g){console.error(`Error executing head for route ${m}:`,g)}}let l=ao(o);if(vt(l)&&await l,d)throw d;if(o.serialError&&!o.preload&&!o.onReady)throw o.serialError;return o.matches}i(co,"loadMatches");function Mr(t,o){let e=o.map(s=>t.options[s]?.preload?.()).filter(Boolean);if(e.length!==0)return Promise.all(e)}i(Mr,"preloadRouteComponents");function Ut(t,o=Se){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(s=>{let{id:r,...n}=s.options;Object.assign(t.options,n),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);let e=i(()=>t._componentsLoaded?void 0:o===Se?(()=>{if(t._componentsPromise===void 0){let s=Mr(t,Se);s?t._componentsPromise=s.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():Mr(t,o),"runAfterLazy");return t._lazyPromise?t._lazyPromise.then(e):e()}i(Ut,"loadRouteChunk");function Re(t,o){return o?{status:"error",error:o}:{status:"success",value:t}}i(Re,"makeMaybe");function uo(t){for(let o of Se)if(t.options[o]?.preload)return!0;return!1}i(uo,"routeNeedsPreload");var Se=["component","errorComponent","pendingComponent","notFoundComponent"];var wt="__TSR_index",Tr="popstate",Or="beforeunload";function fo(t){let o=t.getLocation(),e=new Set,s=i(a=>{o=t.getLocation(),e.forEach(c=>c({location:o,action:a}))},"notify"),r=i(a=>{t.notifyOnIndexChange??!0?s(a):o=t.getLocation()},"handleIndexChange"),n=i(async({task:a,navigateOpts:c,...u})=>{if(c?.ignoreBlocker??!1){a();return}let d=t.getBlockers?.()??[],f=u.type==="PUSH"||u.type==="REPLACE";if(typeof document<"u"&&d.length&&f)for(let l of d){let p=Ht(u.path,u.state);if(await l.blockerFn({currentLocation:o,nextLocation:p,action:u.type})){t.onBlocked?.();return}}a()},"tryNavigation");return{get location(){return o},get length(){return t.getLength()},subscribers:e,subscribe:i(a=>(e.add(a),()=>{e.delete(a)}),"subscribe"),push:i((a,c,u)=>{let d=o.state[wt];c=lo(d+1,c),n({task:i(()=>{t.pushState(a,c),s({type:"PUSH"})},"task"),navigateOpts:u,type:"PUSH",path:a,state:c})},"push"),replace:i((a,c,u)=>{let d=o.state[wt];c=lo(d,c),n({task:i(()=>{t.replaceState(a,c),s({type:"REPLACE"})},"task"),navigateOpts:u,type:"REPLACE",path:a,state:c})},"replace"),go:i((a,c)=>{n({task:i(()=>{t.go(a),r({type:"GO",index:a})},"task"),navigateOpts:c,type:"GO"})},"go"),back:i(a=>{n({task:i(()=>{t.back(a?.ignoreBlocker??!1),r({type:"BACK"})},"task"),navigateOpts:a,type:"BACK"})},"back"),forward:i(a=>{n({task:i(()=>{t.forward(a?.ignoreBlocker??!1),r({type:"FORWARD"})},"task"),navigateOpts:a,type:"FORWARD"})},"forward"),canGoBack:i(()=>o.state[wt]!==0,"canGoBack"),createHref:i(a=>t.createHref(a),"createHref"),block:i(a=>{if(!t.setBlockers)return()=>{};let c=t.getBlockers?.()??[];return t.setBlockers([...c,a]),()=>{let u=t.getBlockers?.()??[];t.setBlockers?.(u.filter(d=>d!==a))}},"block"),flush:i(()=>t.flush?.(),"flush"),destroy:i(()=>t.destroy?.(),"destroy"),notify:s}}i(fo,"createHistory");function lo(t,o){o||(o={});let e=po();return{...o,key:e,__TSR_key:e,[wt]:t}}i(lo,"assignKeyAndIndex");function ho(t){let o=t?.window??(typeof document<"u"?window:void 0),e=o.history.pushState,s=o.history.replaceState,r=[],n=i(()=>r,"_getBlockers"),a=i(w=>r=w,"_setBlockers"),c=t?.createHref??(w=>w),u=t?.parseLocation??(()=>Ht(`${o.location.pathname}${o.location.search}${o.location.hash}`,o.history.state));if(!o.history.state?.__TSR_key&&!o.history.state?.key){let w=po();o.history.replaceState({[wt]:0,key:w,__TSR_key:w},"")}let d=u(),f,l=!1,p=!1,h=!1,m=!1,y=i(()=>d,"getLocation"),g,v,R=i(()=>{g&&(x._ignoreSubscribers=!0,(g.isPush?o.history.pushState:o.history.replaceState)(g.state,"",g.href),x._ignoreSubscribers=!1,g=void 0,v=void 0,f=void 0)},"flush"),S=i((w,C,M)=>{let L=c(C);v||(f=d),d=Ht(C,M),g={href:L,state:M,isPush:g?.isPush||w==="push"},v||(v=Promise.resolve().then(()=>R()))},"queueHistoryAction"),P=i(w=>{d=u(),x.notify({type:w})},"onPushPop"),_=i(async()=>{if(p){p=!1;return}let w=u(),C=w.state[wt]-d.state[wt],M=C===1,L=C===-1,I=!M&&!L||l;l=!1;let rt=I?"GO":L?"BACK":"FORWARD",K=I?{type:"GO",index:C}:{type:L?"BACK":"FORWARD"};if(h)h=!1;else{let dt=n();if(typeof document<"u"&&dt.length){for(let ne of dt)if(await ne.blockerFn({currentLocation:d,nextLocation:w,action:rt})){p=!0,o.history.go(1),x.notify(K);return}}}d=u(),x.notify(K)},"onPushPopEvent"),b=i(w=>{if(m){m=!1;return}let C=!1,M=n();if(typeof document<"u"&&M.length)for(let L of M){let I=L.enableBeforeUnload??!0;if(I===!0){C=!0;break}if(typeof I=="function"&&I()===!0){C=!0;break}}if(C)return w.preventDefault(),w.returnValue=""},"onBeforeUnload"),x=fo({getLocation:y,getLength:i(()=>o.history.length,"getLength"),pushState:i((w,C)=>S("push",w,C),"pushState"),replaceState:i((w,C)=>S("replace",w,C),"replaceState"),back:i(w=>(w&&(h=!0),m=!0,o.history.back()),"back"),forward:i(w=>{w&&(h=!0),m=!0,o.history.forward()},"forward"),go:i(w=>{l=!0,o.history.go(w)},"go"),createHref:i(w=>c(w),"createHref"),flush:R,destroy:i(()=>{o.history.pushState=e,o.history.replaceState=s,o.removeEventListener(Or,b,{capture:!0}),o.removeEventListener(Tr,_)},"destroy"),onBlocked:i(()=>{f&&d!==f&&(d=f)},"onBlocked"),getBlockers:n,setBlockers:a,notifyOnIndexChange:!1});return o.addEventListener(Or,b,{capture:!0}),o.addEventListener(Tr,_),o.history.pushState=function(...w){let C=e.apply(o.history,w);return x._ignoreSubscribers||P("PUSH"),C},o.history.replaceState=function(...w){let C=s.apply(o.history,w);return x._ignoreSubscribers||P("REPLACE"),C},x}i(ho,"createBrowserHistory");function js(t={initialEntries:["/"]}){let o=t.initialEntries,e=t.initialIndex?Math.min(Math.max(t.initialIndex,0),o.length-1):o.length-1,s=o.map((u,d)=>lo(d,void 0)),r=i(()=>Ht(o[e],s[e]),"getLocation"),n=[];return fo({getLocation:r,getLength:i(()=>o.length,"getLength"),pushState:i((u,d)=>{e<o.length-1&&(o.splice(e+1),s.splice(e+1)),s.push(d),o.push(u),e=Math.max(o.length-1,0)},"pushState"),replaceState:i((u,d)=>{s[e]=d,o[e]=u},"replaceState"),back:i(()=>{e=Math.max(e-1,0)},"back"),forward:i(()=>{e=Math.min(e+1,o.length-1)},"forward"),go:i(u=>{e=Math.min(Math.max(e+u,0),o.length-1)},"go"),createHref:i(u=>u,"createHref"),getBlockers:i(()=>n,"_getBlockers"),setBlockers:i(u=>n=u,"_setBlockers")})}i(js,"createMemoryHistory");function zs(t){let o=t.replace(/[\x00-\x1f\x7f]/g,"");return o.startsWith("//")&&(o="/"+o.replace(/^\/+/,"")),o}i(zs,"sanitizePath");function Ht(t,o){let e=zs(t),s=e.indexOf("#"),r=e.indexOf("?"),n=po();return{href:e,pathname:e.substring(0,s>0?r>0?Math.min(s,r):s:r>0?r:e.length),hash:s>-1?e.substring(s):"",search:r>-1?e.slice(r,s===-1?void 0:s):"",state:o||{[wt]:0,key:n,__TSR_key:n}}}i(Ht,"parseHref");function po(){return(Math.random()+1).toString(36).substring(7)}i(po,"createRandomKey");function ht(t,o){let e=o,s=t;return{fromLocation:e,toLocation:s,pathChanged:e?.pathname!==s.pathname,hrefChanged:e?.href!==s.href,hashChanged:e?.hash!==s.hash}}i(ht,"getLocationChangeInfo");var mo=class{static{i(this,"RouterCore")}constructor(t,o){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let s=this.options,r=this.basepath??s?.basepath??"/",n=this.basepath===void 0,a=s?.rewrite;if(this.options={...s,...e},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=hr(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=ho()),this.origin=this.options.origin,this.origin||(!!1&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let f;if(!1){let l=globalThis.__TSR_CACHE__;this.resolvePathCache=l.resolvePathCache,f=l.processRouteTreeResult}else this.resolvePathCache=yt(1e3),f=this.buildRouteTree(),!1;this.setRoutes(f)}if(!this.stores&&this.latestLocation){let f=this.getStoreConfig(this);this.batch=f.batch,this.stores=_r(Fr(this.latestLocation),f),vr(this)}let c=!1,u=this.options.basepath??"/",d=this.options.rewrite;if(n||r!==u||a!==d){this.basepath=u;let f=[],l=Qt(u);l&&l!=="/"&&f.push(wr({basepath:u})),d&&f.push(d),this.rewrite=f.length===0?void 0:f.length===1?f[0]:xr(f),this.history&&this.updateLatestLocation(),c=!0}c&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=lr(this.routeTree,this.options.caseSensitive,(s,r)=>{s.init({originalIndex:r})});return this.options.routeMasks&&ir(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,s)=>{let r={eventType:e,fn:s};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=e=>{this.subscribers.forEach(s=>{s.eventType===e.type&&s.fn(e)})},this.parseLocation=(e,s)=>{let r=i(({pathname:u,search:d,hash:f,href:l,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(u)){let v=this.options.parseSearch(d),R=this.options.stringifySearch(v);return{href:u+R+f,publicHref:u+R+f,pathname:At(u).path,external:!1,searchStr:R,search:gt(s?.search,v),hash:At(f.slice(1)).path,state:at(s?.state,p)}}let h=new URL(l,this.origin),m=ye(this.rewrite,h),y=this.options.parseSearch(m.search),g=this.options.stringifySearch(y);return m.search=g,{href:m.href.replace(m.origin,""),publicHref:l,pathname:At(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:g,search:gt(s?.search,y),hash:At(m.hash.slice(1)).path,state:at(s?.state,p)}},"parse"),n=r(e),{__tempLocation:a,__tempKey:c}=n.state;if(a&&(!c||c===this.tempLocationKey)){let u=r(a);return u.state.key=n.state.key,u.state.__TSR_key=n.state.__TSR_key,delete u.state.__tempLocation,{...u,maskedLocation:n}}return n},this.resolvePathWithBase=(e,s)=>Qe({base:e,to:s.includes("//")?Zt(s):s,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,s,r)=>typeof e=="string"?this.matchRoutesInternal({pathname:e,search:s},r):this.matchRoutesInternal(e,s),this.getMatchedRoutes=e=>Ar({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let s=this.getMatch(e);s&&(s.abortController.abort(),clearTimeout(s._nonReactive.pendingTimeout),s._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let s=this.stores.matchStores.get(e)?.get();s&&(s.status==="pending"||s.isFetching==="loader")&&this.cancelMatch(e)})},this.buildLocation=e=>{let s=i((n={})=>{let a=n._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(a);n.from;let u=n.unsafeRelative==="path"?a.pathname:n.from??c.fullPath,d=n.to?`${n.to}`:void 0,f=c.search,l=Object.assign(Object.create(null),c.params),p=d?.charCodeAt(0)===47?"/":this.resolvePathWithBase(u,"."),h=d?this.resolvePathWithBase(p,d):p,m=n.params===!1||n.params===null?Object.create(null):(n.params??!0)===!0?l:Object.assign(l,Y(n.params,l)),y=this.routesByPath[Z(h)],g;if(y)g=this.getRouteBranch(y);else if(h.includes("$"))g=[];else{let L=this.getMatchedRoutes(h);g=L.matchedRoutes,this.options.notFoundRoute&&(!L.foundRoute||L.foundRoute.path!=="/"&&L.routeParams["**"])&&(g=[...g,this.options.notFoundRoute])}if(g.length&&mt(m))for(let L of g){let I=L.options.params?.stringify??L.options.stringifyParams;if(I)try{Object.assign(m,I(m))}catch{}}let v=e.leaveParams?h:At(me({path:h,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,R=f;if(e._includeValidateSearch&&this.options.search?.strict){let L={};g.forEach(I=>{if(I.options.validateSearch)try{Object.assign(L,xe(I.options.validateSearch,{...L,...R}))}catch{}}),R=L}R=Ks({search:R,dest:n,destRoutes:g,_includeValidateSearch:e._includeValidateSearch}),R=gt(f,R);let S=this.options.stringifySearch(R),P=n.hash===!0?a.hash:n.hash?Y(n.hash,a.hash):void 0,_=P?`#${P}`:"",b=n.state===!0?a.state:n.state?Y(n.state,a.state):{};b=at(a.state,b);let x=`${v}${S}${_}`,w,C,M=!1;if(this.rewrite){let L=new URL(x,this.origin),I=oo(this.rewrite,L);w=L.href.replace(L.origin,""),I.origin!==this.origin?(C=I.href,M=!0):C=I.pathname+I.search+I.hash}else w=or(x),C=w;return{publicHref:C,href:w,pathname:v,search:R,searchStr:S,state:b,hash:P??"",external:M,unmaskOnReload:n.unmaskOnReload}},"build"),r=i((n={},a)=>{let c=s(n),u=a?s(a):void 0;if(!u){let d=Object.create(null);if(this.options.routeMasks){let f=ar(c.pathname,this.processedTree);if(f){Object.assign(d,f.rawParams);let{from:l,params:p,...h}=f.route,m=p===!1||p===null?Object.create(null):(p??!0)===!0?d:Object.assign(d,Y(p,d));a={from:e.from,...h,params:m},u=s(a)}}}return u&&(c.maskedLocation=u),c},"buildWithMatches");return e.mask?r(e,{from:e.from,...e.mask}):r(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:s,...r})=>{let n,a=i(()=>{let d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(l=>{r.state[l]=this.latestLocation.state[l]});let f=st(r.state,this.latestLocation.state);return d.forEach(l=>{delete r.state[l]}),f},"isSameState"),c=Z(this.latestLocation.href)===Z(r.href),u=this.commitLocationPromise;if(this.commitLocationPromise=ct(()=>{u?.resolve(),u=void 0}),c&&a())this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...l}=r;d&&(l={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...l,search:l.searchStr,state:{...l.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(l.unmaskOnReload??this.options.unmaskOnReload??!1)&&(l.state.__tempKey=this.tempLocationKey)),l.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,n=r.replace?"REPLACE":"PUSH",this.history[n==="REPLACE"?"replace":"push"](l.publicHref,l.state,{ignoreBlocker:s})}return this._scroll.next=r.resetScroll??!0,this.history.subscribers.size||this.load(n?{action:{type:n}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:s,hashScrollIntoView:r,viewTransition:n,ignoreBlocker:a,href:c,...u}={})=>{if(c){let l=this.history.location.state.__TSR_index,p=Ht(c,{__TSR_index:e?l:l+1}),h=new URL(p.pathname,this.origin);u.to=ye(this.rewrite,h).pathname,u.search=this.options.parseSearch(p.search),u.hash=p.hash.slice(1)}let d=this.buildLocation({...u,_includeValidateSearch:!0});this.pendingBuiltLocation=d;let f=this.commitLocation({...d,viewTransition:n,replace:e,resetScroll:s,hashScrollIntoView:r,ignoreBlocker:a});return queueMicrotask(()=>{this.pendingBuiltLocation===d&&(this.pendingBuiltLocation=void 0)}),f},this.navigate=async({to:e,reloadDocument:s,href:r,publicHref:n,...a})=>{let c=!1;if(r)try{new URL(`${r}`),c=!0}catch{}if(c&&!s&&(s=!0),s){if(e!==void 0||!r){let d=this.buildLocation({to:e,...a});r=r??d.publicHref,n=n??d.publicHref}let u=!c&&n?n:r;if(ut(u,this.protocolAllowlist))return;if(!a.ignoreBlocker){let d=this.history.getBlockers?.()??[];for(let f of d)if(f?.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(u):window.location.href=u;return}return this.buildAndCommitLocation({...a,href:r,to:e,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),!1){let r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==r.publicHref){let n=this.getParsedLocationHref(r);throw r.external?$t({href:n}):$t({href:n,_builtLocation:r})}}let e=this.matchRoutes(this.latestLocation),s=this.stores.cachedMatches.get().filter(r=>!e.some(n=>n.id===r.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(s)})},this.load=async e=>{let s=e?.action?.type,r,n,a,c=this.stores.resolvedLocation.get()??this.stores.location.get();for(a=new Promise(d=>{this.startTransition(async()=>{try{this.beforeLoad(),s&&(this._scroll.hash=s==="PUSH"||s==="REPLACE");let f=this.latestLocation,l=ht(f,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...l}),this.emit({type:"onBeforeLoad",...l}),await co({router:this,sync:e?.sync,forceStaleReload:c.href===f.href,matches:this.stores.pendingMatches.get(),location:f,updateMatch:this.updateMatch,onReady:i(async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let p=null,h=null,m=null,y=null;this.batch(()=>{let g=this.stores.pendingMatches.get(),v=g.length,R=this.stores.matches.get();p=v?R.filter(_=>!this.stores.pendingMatchStores.has(_.id)):null;let S=new Set;for(let _ of this.stores.pendingMatchStores.values())_.routeId&&S.add(_.routeId);let P=new Set;for(let _ of this.stores.matchStores.values())_.routeId&&P.add(_.routeId);h=v?R.filter(_=>!S.has(_.routeId)):null,m=v?g.filter(_=>!P.has(_.routeId)):null,y=v?g.filter(_=>P.has(_.routeId)):R,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),v&&(this.stores.setMatches(g),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...p.filter(_=>_.status!=="error"&&_.status!=="notFound"&&_.status!=="redirected")]),this.clearExpiredCache())});for(let[g,v]of[[h,"onLeave"],[m,"onEnter"],[y,"onStay"]])if(g)for(let R of g)this.looseRoutesById[R.routeId].options[v]?.(R)})})},"onReady")})}catch(f){H(f)?(r=f,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):A(f)&&(n=f);let l=r?r.status:n?404:this.stores.matches.get().some(p=>p.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(l),this.stores.redirect.set(r)})}this.latestLoadPromise===a&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.stores.matches.get().some(d=>d.status==="error")&&(u=500),u!==void 0&&this.stores.statusCode.set(u)},this.startViewTransition=e=>{let s=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,s&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;if(typeof s=="object"&&this.isViewTransitionTypesSupported){let n=this.latestLocation,a=this.stores.resolvedLocation.get(),c=typeof s.types=="function"?s.types(ht(n,a)):s.types;if(c===!1){e();return}r={update:e,types:c}}else r=e;document.startViewTransition(r)}else e()},this.updateMatch=(e,s)=>{this.startTransition(()=>{let r=this.stores.pendingMatchStores.get(e);if(r){r.set(s);return}let n=this.stores.matchStores.get(e);if(n){n.set(s);return}let a=this.stores.cachedMatchStores.get(e);if(a){let c=s(a.get());c.status==="redirected"?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(u=>u.filter(d=>d!==e)):a.set(c)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let s=i(r=>e?.filter?.(r)??!0?{...r,invalid:!0,...e?.forcePending||r.status==="error"||r.status==="notFound"?{status:"pending",error:void 0}:void 0}:r,"invalidate");return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(s)),this.stores.setCached(this.stores.cachedMatches.get().map(s)),this.stores.setPending(this.stores.pendingMatches.get().map(s))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||"/",this.resolveRedirect=e=>{let s=e.headers.get("Location");if(!e.options.href||e.options._builtLocation){let r=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(r);e.options.href=n,e.headers.set("Location",n)}else if(s)try{let r=new URL(s);if(this.origin&&r.origin===this.origin){let n=r.pathname+r.search+r.hash;e.options.href=n,e.headers.set("Location",n)}}catch{}if(e.options.href&&!e.options._builtLocation&&ut(e.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return e.headers.get("Location")||e.headers.set("Location",e.options.href),e},this.clearCache=e=>{let s=e?.filter;s!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(r=>!s(r))):this.stores.setCached([])},this.clearExpiredCache=()=>{let e=Date.now(),s=i(r=>{let n=this.looseRoutesById[r.routeId];if(!n.options.loader)return!0;let a=(r.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:e-r.updatedAt>=a},"filter");this.clearCache({filter:s})},this.loadRouteChunk=Ut,this.preloadRoute=async e=>{let s=e._builtLocation??this.buildLocation(e),r=this.matchRoutes(s,{throwOnError:!0,preload:!0,dest:e}),n=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...n,...this.stores.cachedIds.get()]),c=r.filter(u=>!a.has(u.id));if(c.length){let u=this.stores.cachedMatches.get();this.stores.setCached([...u,...c])}try{return r=await co({router:this,matches:r,location:s,preload:!0,updateMatch:i((u,d)=>{n.has(u)?r=r.map(f=>f.id===u?d(f):f):this.updateMatch(u,d)},"updateMatch")}),r}catch(u){if(H(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:s});A(u)||console.error(u);return}},this.matchRoute=(e,s)=>{let r={...e,to:e.to?this.resolvePathWithBase(e.from||"",e.to):void 0,params:e.params||{},leaveParams:!0},n=this.buildLocation(r);if(s?.pending&&this.stores.status.get()!=="pending")return!1;let a=(s?.pending===void 0?!this.stores.isLoading.get():s.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=cr(n.pathname,s?.caseSensitive??!1,s?.fuzzy??!1,a.pathname,this.processedTree);return!c||e.params&&!st(c.rawParams,e.params,{partial:!0})?!1:s?.includeSearch??!0?st(a.search,n.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status==="notFound"||e.globalNotFound),this.getStoreConfig=o,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Pr,parseSearch:t.parseSearch??Sr,protocolAllowlist:t.protocolAllowlist??qe}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:o,processedTree:e}){this.routesById=t,this.routesByPath=o,this.processedTree=e;let s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)}getRouteBranch(t){let o=this.routeBranchCache.get(t);return o||(o=Ze(t),this.routeBranchCache.set(t,o)),o}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,o){let e=this.getMatchedRoutes(t.pathname),{foundRoute:s,routeParams:r}=e,{matchedRoutes:n}=e,a=!1;(s?s.path!=="/"&&r["**"]:Z(t.pathname))&&(this.options.notFoundRoute?n=[...n,this.options.notFoundRoute]:a=!0);let c=a?Gs(this.options.notFoundMode,n):void 0,u=new Array(n.length),d=new Map;for(let f of this.stores.matchStores.values())f.routeId&&d.set(f.routeId,f.get());for(let f=0;f<n.length;f++){let l=n[f],p=u[f-1],h,m,y;{let I=p?.search??t.search,rt=p?._strictSearch??void 0;try{let K=xe(l.options.validateSearch,{...I})??void 0;h={...I,...K},m={...rt,...K},y=void 0}catch(K){let dt=K;if(K instanceof ee||(dt=new ee(K.message,{cause:K})),o?.throwOnError)throw dt;h=I,m={},y=dt}}let g=l.options.loaderDeps?.({search:h})??"",v=g?JSON.stringify(g):"",{interpolatedPath:R,usedParams:S}=me({path:l.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),P=l.id+R+v,_=this.getMatch(P),b=d.get(l.id),x=_?._strictParams??S,w;if(!_)try{Nr(l,x)}catch(I){if(A(I)||H(I)?w=I:w=new Dr(I.message,{cause:I}),o?.throwOnError)throw w}Object.assign(r,x);let C=b?"stay":"enter",M;if(_)M={..._,cause:C,params:b?.params??r,_strictParams:x,search:b?gt(b.search,h):gt(_.search,h),_strictSearch:m};else{let I=l.options.loader||l.options.beforeLoad||l.lazyFn||uo(l)?"pending":"success";M={id:P,ssr:l.options.ssr,index:f,routeId:l.id,params:b?.params??r,_strictParams:x,pathname:R,updatedAt:Date.now(),search:b?gt(b.search,h):h,_strictSearch:m,searchError:void 0,status:I,isFetching:!1,error:void 0,paramsError:w,__routeContext:void 0,_nonReactive:{loadPromise:ct()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:C,loaderDeps:b?at(b.loaderDeps,g):g,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:l.options.staticData||{},fullPath:l.fullPath}}o?.preload||(M.globalNotFound=c===l.id),M.searchError=y;let L=this.getParentContext(p);M.context={...L,...M.__routeContext,...M.__beforeLoadContext},u[f]=M}for(let f=0;f<u.length;f++){let l=u[f],p=this.looseRoutesById[l.routeId],h=this.getMatch(l.id),m=d.get(l.routeId);if(l.params=m?gt(m.params,r):r,!h){let y=u[f-1],g=this.getParentContext(y);if(p.options.context){let v={deps:l.loaderDeps,params:l.params,context:g??{},location:t,navigate:i(R=>this.navigate({...R,_fromLocation:t}),"navigate"),buildLocation:this.buildLocation,cause:l.cause,abortController:l.abortController,preload:!!l.preload,matches:u,routeId:p.id};l.__routeContext=p.options.context(v)??void 0}l.context={...g,...l.__routeContext,...l.__beforeLoadContext}}}return u}matchRoutesLightweight(t){let o=pt(this.stores.matchesId.get()),e=this.lightweightCache.get(t);if(e&&e[0]===o)return e[1];let{matchedRoutes:s,routeParams:r}=this.getMatchedRoutes(t.pathname),n=pt(s),a={...t.search};for(let l of s)try{Object.assign(a,xe(l.options.validateSearch,a))}catch{}let c=o&&this.stores.matchStores.get(o)?.get(),u=c&&c.routeId===n.id&&c.pathname===t.pathname,d;if(u)d=c.params;else{let l=Object.assign(Object.create(null),r);for(let p of s)try{Nr(p,l)}catch{}d=l}let f={matchedRoutes:s,fullPath:n.fullPath,search:a,params:d};return this.lightweightCache.set(t,[o,f]),f}},ee=class extends Error{static{i(this,"SearchParamError")}},Dr=class extends Error{static{i(this,"PathParamError")}};function Fr(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}i(Fr,"getInitialRouterState");function xe(t,o){if(t==null)return{};if("~standard"in t){let e=t["~standard"].validate(o);if(e instanceof Promise)throw new ee("Async validation not supported");if(e.issues)throw new ee(JSON.stringify(e.issues,void 0,2),{cause:e});return e.value}return"parse"in t?t.parse(o):typeof t=="function"?t(o):{}}i(xe,"validateSearch");function Ar({pathname:t,routesById:o,processedTree:e}){let s=Object.create(null),r=Z(t),n,a=ur(r,e,!0);return a&&(n=a.route,Object.assign(s,a.rawParams)),{matchedRoutes:a?.branch||[o.__root__],routeParams:s,foundRoute:n}}i(Ar,"getMatchedRoutes");function Ks({search:t,dest:o,destRoutes:e,_includeValidateSearch:s}){return qs(e)(t,o,s??!1)}i(Ks,"applySearchMiddleware");function qs(t){let o,e,s=[];for(let n of t){let a=n.options;if("search"in a)a.search?.middlewares&&s.push(...a.search.middlewares);else if(a.preSearchFilters||a.postSearchFilters){let u=i(({search:d,next:f})=>{let l=f(a.preSearchFilters?a.preSearchFilters.reduce((p,h)=>h(p),d):d);return a.postSearchFilters?a.postSearchFilters.reduce((p,h)=>h(p),l):l},"legacyMiddleware");s.push(u)}let c=a.validateSearch;if(c){let u=i(({search:d,next:f,meta:l})=>{let p=f(d);if(e)try{let h=xe(c,p);if(l&&h)for(let m in h)m in p||(l.defaulted||=new Map).set(m,h[m]);return{...p,...h}}catch{}return p},"validate");s.push(u)}}let r=i((n,a,c)=>{if(n>=s.length){if(!o.search)return{};if(o.search===!0)return a;let d=Y(o.search,a);return c&&(c.explicit=d),d}let u=i((d,f)=>{if(f){let l=c||{};return{search:r(n+1,d,l),meta:l}}return r(n+1,d,c)},"next");return s[n]({search:a,next:u,meta:c})},"applyNext");return i(function(a,c,u){return o=c,e=u,r(0,a)},"middleware")}i(qs,"buildMiddlewareChain");function Gs(t,o){if(t!=="root")for(let e=o.length-1;e>=0;e--){let s=o[e];if(s.children)return s.id}return X}i(Gs,"findGlobalNotFoundRouteId");function Nr(t,o){let e=t.options.params?.parse??t.options.parseParams;if(e){let s=e(o);if(s===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(o,s)}}i(Nr,"extractStrictParams");var go="Error preloading route! \u261D\uFE0F";var we=class{static{i(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=o=>{this.originalIndex=o.originalIndex;let e=this.options,s=!e?.path&&!e?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=X:this.parentRoute||$();let r=s?X:e?.path;r&&r!=="/"&&(r=he(r));let n=e?.id||r,a=s?X:Et([this.parentRoute.id==="__root__"?"":this.parentRoute.id,n]);r==="__root__"&&(r="/"),a!=="__root__"&&(a=Et(["/",a]));let c=a==="__root__"?"/":Et([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=c,this._to=Z(c)},this.addChildren=o=>this._addFileChildren(o),this._addFileChildren=o=>(Array.isArray(o)&&(this.children=o),typeof o=="object"&&o!==null&&(this.children=Object.values(o)),this),this._addFileTypes=()=>this,this.updateLoader=o=>(Object.assign(this.options,o),this),this.update=o=>(Object.assign(this.options,o),this),this.lazy=o=>(this.lazyFn=o,this),this.redirect=o=>$t({from:this.fullPath,...o}),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 vo=class extends we{static{i(this,"BaseRootRoute")}constructor(t){super(t)}};var Me=k(W(),1);var F=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(F||{});function Br({update:t,notify:o,unwatched:e}){return{link:s,unlink:r,propagate:n,checkDirty:a,shallowPropagate:c};function s(d,f,l){let p=f.depsTail;if(p!==void 0&&p.dep===d)return;let h=p!==void 0?p.nextDep:f.deps;if(h!==void 0&&h.dep===d){h.version=l,f.depsTail=h;return}let m=d.subsTail;if(m!==void 0&&m.version===l&&m.sub===f)return;let y=f.depsTail=d.subsTail={version:l,dep:d,sub:f,prevDep:p,nextDep:h,prevSub:m,nextSub:void 0};h!==void 0&&(h.prevDep=y),p!==void 0?p.nextDep=y:f.deps=y,m!==void 0?m.nextSub=y:d.subs=y}function r(d,f=d.sub){let l=d.dep,p=d.prevDep,h=d.nextDep,m=d.nextSub,y=d.prevSub;return h!==void 0?h.prevDep=p:f.depsTail=p,p!==void 0?p.nextDep=h:f.deps=h,m!==void 0?m.prevSub=y:l.subsTail=y,y!==void 0?y.nextSub=m:(l.subs=m)===void 0&&e(l),h}function n(d){let f=d.nextSub,l;t:do{let p=d.sub,h=p.flags;if(h&60?h&12?h&4?!(h&48)&&u(d,p)?(p.flags=h|40,h&=1):h=0:p.flags=h&-9|32:h=0:p.flags=h|32,h&2&&o(p),h&1){let m=p.subs;if(m!==void 0){let y=(d=m).nextSub;y!==void 0&&(l={value:f,prev:l},f=y);continue}}if((d=f)!==void 0){f=d.nextSub;continue}for(;l!==void 0;)if(d=l.value,l=l.prev,d!==void 0){f=d.nextSub;continue t}break}while(!0)}function a(d,f){let l,p=0,h=!1;t:do{let m=d.dep,y=m.flags;if(f.flags&16)h=!0;else if((y&17)===17){if(t(m)){let g=m.subs;g.nextSub!==void 0&&c(g),h=!0}}else if((y&33)===33){(d.nextSub!==void 0||d.prevSub!==void 0)&&(l={value:d,prev:l}),d=m.deps,f=m,++p;continue}if(!h){let g=d.nextDep;if(g!==void 0){d=g;continue}}for(;p--;){let g=f.subs,v=g.nextSub!==void 0;if(v?(d=l.value,l=l.prev):d=g,h){if(t(f)){v&&c(g),f=d.sub;continue}h=!1}else f.flags&=-33;f=d.sub;let R=d.nextDep;if(R!==void 0){d=R;continue t}}return h}while(!0)}function c(d){do{let f=d.sub,l=f.flags;(l&48)===32&&(f.flags=l|16,(l&6)===2&&o(f))}while((d=d.nextSub)!==void 0)}function u(d,f){let l=f.depsTail;for(;l!==void 0;){if(l===d)return!0;l=l.prevDep}return!1}}i(Br,"createReactiveSystem");function Hr(t,o,e){let s=typeof t=="object",r=s?t:void 0;return{next:(s?t.next:t)?.bind(r),error:(s?t.error:o)?.bind(r),complete:(s?t.complete:e)?.bind(r)}}i(Hr,"toObserver");var yo=[],Ce=0,{link:$r,unlink:Xs,propagate:Zs,checkDirty:Vr,shallowPropagate:Ur}=Br({update(t){return t._update()},notify(t){yo[Ro++]=t,t.flags&=~F.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=F.Mutable|F.Dirty,be(t))}}),_e=0,Ro=0,lt,So=0;function oe(t){try{++So,t()}finally{--So||Po()}}i(oe,"batch");function be(t){let o=t.depsTail,e=o!==void 0?o.nextDep:t.deps;for(;e!==void 0;)e=Xs(e,t)}i(be,"purgeDeps");function Po(){if(!(So>0)){for(;_e<Ro;){let t=yo[_e];yo[_e++]=void 0,t.notify()}_e=0,Ro=0}}i(Po,"flush");function Le(t,o){let e=typeof t=="function",s=t,r={_snapshot:e?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:e?F.None:F.Mutable,get(){return lt!==void 0&&$r(r,lt,Ce),r._snapshot},subscribe(n){let a=Hr(n),c={current:!1},u=Qs(()=>{r.get(),c.current?a.next?.(r._snapshot):c.current=!0});return{unsubscribe:i(()=>{u.stop()},"unsubscribe")}},_update(n){let a=lt,c=o?.compare??Object.is;if(e)lt=r,++Ce,r.depsTail=void 0;else if(n===void 0)return!1;e&&(r.flags=F.Mutable|F.RecursedCheck);try{let u=r._snapshot,d=typeof n=="function"?n(u):n===void 0&&e?s(u):n;return u===void 0||!c(u,d)?(r._snapshot=d,!0):!1}finally{lt=a,e&&(r.flags&=~F.RecursedCheck),be(r)}}};return e?(r.flags=F.Mutable|F.Dirty,r.get=function(){let n=r.flags;if(n&F.Dirty||n&F.Pending&&Vr(r.deps,r)){if(r._update()){let a=r.subs;a!==void 0&&Ur(a)}}else n&F.Pending&&(r.flags=n&~F.Pending);return lt!==void 0&&$r(r,lt,Ce),r._snapshot}):r.set=function(n){if(r._update(n)){let a=r.subs;a!==void 0&&(Zs(a),Ur(a),Po())}},r}i(Le,"createAtom");function Qs(t){let o=i(()=>{let s=lt;lt=e,++Ce,e.depsTail=void 0,e.flags=F.Watching|F.RecursedCheck;try{return t()}finally{lt=s,e.flags&=~F.RecursedCheck,be(e)}},"run"),e={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:F.Watching|F.RecursedCheck,notify(){let s=this.flags;s&F.Dirty||s&F.Pending&&Vr(this.deps,this)?o():this.flags=F.Watching},stop(){this.flags=F.None,this.depsTail=void 0,be(this)}};return o(),e}i(Qs,"effect");var xo=k(W(),1),Wr=k(Rs(),1);function tn(t,o){return t===o}i(tn,"defaultCompare");function B(t,o,e=tn){let s=(0,xo.useCallback)(a=>{if(!t)return()=>{};let{unsubscribe:c}=t.subscribe(a);return c},[t]),r=(0,xo.useCallback)(()=>t?.get(),[t]);return(0,Wr.useSyncExternalStoreWithSelector)(s,r,r,o,e)}i(B,"useStore");var wo={get(){},subscribe(){return{unsubscribe(){}}}};function _o(t,o){let e=Me.useRef();return s=>{let r=t?.select?t.select(s):s;return t?.structuralSharing??o.options.defaultStructuralSharing?e.current=at(e.current,r):r}}i(_o,"useStructuralSharing");function Q(t){let o=D(),e=Me.useContext(t.from?Yo:Mt),s=t.from?o.stores.getRouteMatchStore(t.from):o.stores.matchStores.get(e);if(!1){let a=s?.get();if(!a){(t.shouldThrow??!0)&&$();return}return t.select?t.select(a):a}let r=_o(t,o),n=B(s??wo,a=>a?r(a):wo);if(n!==wo)return n;(t.shouldThrow??!0)&&$()}i(Q,"useMatch");function Ie(t){return Q({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:i(o=>t.select?t.select(o.search):o.search,"select")})}i(Ie,"useSearch");var nt=k(W(),1);var Tt=typeof window<"u"?nt.useLayoutEffect:nt.useEffect;function Ee(t){let o=nt.useRef({value:t,prev:null}),e=o.current.value;return t!==e&&(o.current={value:t,prev:e}),o.current.prev}i(Ee,"usePrevious");function jr(t,o,e={},s={}){nt.useEffect(()=>{if(!t.current||s.disabled||typeof IntersectionObserver!="function")return;let r=new IntersectionObserver(([n])=>{o(n)},e);return r.observe(t.current),()=>{r.disconnect()}},[o,e,s.disabled,t])}i(jr,"useIntersectionObserver");function zr(t){let o=nt.useRef(null);return nt.useImperativeHandle(t,()=>o.current,[]),o}i(zr,"useForwardedRef");var Co=k(W(),1);function ke(t){let o=D();return Co.useCallback(e=>o.navigate({...e,from:e.from??t?.from}),[t?.from,o])}i(ke,"useNavigate");var Vt=k(W(),1),it=k(ot(),1);function Ot(t){let o=t.errorComponent??Nt;return(0,it.jsx)(en,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:i(({error:e,reset:s})=>e?Vt.createElement(o,{error:e,reset:s}):t.children,"children")})}i(Ot,"CatchBoundary");var en=class extends Vt.Component{static{i(this,"CatchBoundaryImpl")}constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,o){let e=t.getResetKey();return o.error&&o.resetKey!==e?{resetKey:e,error:null}:{resetKey:e}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,o){this.props.onCatch&&this.props.onCatch(t,o)}render(){return this.props.children({error:this.state.error,reset:i(()=>{this.reset()},"reset")})}};function Nt({error:t}){let[o,e]=Vt.useState(!1);return(0,it.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,it.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,it.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,it.jsx)("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:i(()=>e(s=>!s),"onClick"),children:o?"Hide Error":"Show Error"})]}),(0,it.jsx)("div",{style:{height:".25rem"}}),o?(0,it.jsx)("div",{children:(0,it.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?(0,it.jsx)("code",{children:t.message}):null})}):null]})}i(Nt,"ErrorComponent");var Te=k(W(),1),bo=k(ot(),1);function Kr({children:t,fallback:o=null}){return Lo()?(0,bo.jsx)(Te.default.Fragment,{children:t}):(0,bo.jsx)(Te.default.Fragment,{children:o})}i(Kr,"ClientOnly");function Lo(){return Te.default.useSyncExternalStore(on,()=>!0,()=>!1)}i(Lo,"useHydrated");function on(){return()=>{}}i(on,"subscribe");function Mo(t){return Q({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:i(o=>t.select?t.select(o.loaderData):o.loaderData,"select")})}i(Mo,"useLoaderData");function Io(t){let{select:o,...e}=t;return Q({...e,select:i(s=>o?o(s.loaderDeps):s.loaderDeps,"select")})}i(Io,"useLoaderDeps");function Eo(t){return Q({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:i(o=>{let e=t.strict===!1?o.params:o._strictParams;return t.select?t.select(e):e},"select")})}i(Eo,"useParams");function ko(t){return Q({...t,select:i(o=>t.select?t.select(o.context):o.context,"select")})}i(ko,"useRouteContext");var U=k(W(),1),rn=k(ot(),1);var Zr=k(ys(),1);function sn(t,o){let e=D(),s=zr(o),r=!1,{activeProps:n,inactiveProps:a,activeOptions:c,to:u,preload:d,preloadDelay:f,preloadIntentProximity:l,hashScrollIntoView:p,replace:h,startTransition:m,resetScroll:y,viewTransition:g,children:v,target:R,disabled:S,style:P,className:_,onClick:b,onBlur:x,onFocus:w,onMouseEnter:C,onMouseLeave:M,onTouchStart:L,ignoreBlocker:I,params:rt,search:K,hash:dt,state:ne,mask:tt,reloadDocument:zt,unsafeRelative:Fo,from:Ao,_fromLocation:ie,...Dt}=t;if(r){let O=Xr(u);if(typeof u=="string"&&!O&&u.indexOf(":")>-1)try{return new URL(u),ut(u,e.protocolAllowlist)?{...Dt,ref:s,href:void 0,...v&&{children:v},...R&&{target:R},...S&&{disabled:S},...P&&{style:P},..._&&{className:_}}:{...Dt,ref:s,href:u,...v&&{children:v},...R&&{target:R},...S&&{disabled:S},...P&&{style:P},..._&&{className:_}}}catch{}let T=e.buildLocation({...t,from:t.from}),et=Yr(T.maskedLocation?T.maskedLocation.publicHref:T.publicHref,T.maskedLocation?T.maskedLocation.external:T.external,e.history,S),Jt=(()=>{if(et?.external)return ut(et.href,e.protocolAllowlist)?void 0:et.href;if(!O&&typeof u=="string"&&u.indexOf(":")>-1)try{return new URL(u),ut(u,e.protocolAllowlist)?void 0:u}catch{}})(),Ve=(()=>{if(Jt)return!1;let V=e.stores.location.get(),G=c?.exact??!1;if(G){if(!pe(V.pathname,T.pathname,e.basepath))return!1}else{let j=Pt(V.pathname,e.basepath),J=Pt(T.pathname,e.basepath);if(!(j.startsWith(J)&&(j.length===J.length||j[J.length]==="/")))return!1}if((c?.includeSearch??!0)&&V.search!==T.search){let j=!V.search||typeof V.search=="object"&&!mt(V.search),J=!T.search||typeof T.search=="object"&&!mt(T.search);if(!(j&&J)&&!st(V.search,T.search,{partial:!G,ignoreUndefined:!c?.explicitUndefined}))return!1}return!c?.includeHash})();if(Jt)return{...Dt,ref:s,href:Jt,...v&&{children:v},...R&&{target:R},...S&&{disabled:S},...P&&{style:P},..._&&{className:_}};let We=Ve?Y(n,{})??qr:Wt,je=Ve?Wt:Y(a,{})??Wt,Ko=(()=>{let V=P,G=We.style,j=je.style;if(!(!V&&!G&&!j))return V&&!G&&!j?V:!V&&G&&!j?G:!V&&!G&&j?j:{...V,...G,...j}})(),qo=(()=>{let V=_,G=We.className,j=je.className;if(!V&&!G&&!j)return"";let J="";return V&&(J=V),G&&(J=J?`${J} ${G}`:G),j&&(J=J?`${J} ${j}`:j),J})();return{...Dt,...We,...je,href:et?.href,ref:s,disabled:!!S,target:R,...Ko&&{style:Ko},...qo&&{className:qo},...S&&Gr,...Ve&&Jr}}let $e=Lo(),Kt=U.useMemo(()=>t,[e,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),bt=B(e.stores.location,O=>O,(O,T)=>O.href===T.href),q=U.useMemo(()=>{let O={_fromLocation:bt,...Kt};return e.buildLocation(O)},[e,bt,Kt]),Bo=q.maskedLocation?q.maskedLocation.publicHref:q.publicHref,$o=q.maskedLocation?q.maskedLocation.external:q.external,qt=U.useMemo(()=>Yr(Bo,$o,e.history,S),[S,$o,Bo,e.history]),Gt=U.useMemo(()=>{if(qt?.external)return ut(qt.href,e.protocolAllowlist)?void 0:qt.href;if(!Xr(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),ut(u,e.protocolAllowlist)?void 0:u}catch{}},[u,qt,e.protocolAllowlist]),Ue=U.useMemo(()=>{if(Gt)return!1;if(c?.exact){if(!pe(bt.pathname,q.pathname,e.basepath))return!1}else{let O=Pt(bt.pathname,e.basepath),T=Pt(q.pathname,e.basepath);if(!(O.startsWith(T)&&(O.length===T.length||O[T.length]==="/")))return!1}return(c?.includeSearch??!0)&&!st(bt.search,q.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?$e&&bt.hash===q.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,bt,Gt,$e,q.hash,q.pathname,q.search,e.basepath]),ae=Ue?Y(n,{})??qr:Wt,ce=Ue?Wt:Y(a,{})??Wt,Uo=[_,ae.className,ce.className].filter(Boolean).join(" "),Ho=(P||ae.style||ce.style)&&{...P,...ae.style,...ce.style},[ms,Vo]=U.useState(!1),Wo=U.useRef(!1),Ft=t.reloadDocument||Gt?!1:d??e.options.defaultPreload,He=f??e.options.defaultPreloadDelay??0,Lt=U.useCallback(()=>{e.preloadRoute({...Kt,_builtLocation:q}).catch(O=>{console.warn(O),console.warn(go)})},[e,Kt,q]);jr(s,U.useCallback(O=>{O?.isIntersecting&&Lt()},[Lt]),an,{disabled:!!S||Ft!=="viewport"}),U.useEffect(()=>{Wo.current||!S&&Ft==="render"&&(Lt(),Wo.current=!0)},[S,Lt,Ft]);let gs=i(O=>{let T=O.currentTarget.getAttribute("target"),et=R!==void 0?R:T;if(!S&&!cn(O)&&!O.defaultPrevented&&(!et||et==="_self")&&O.button===0){O.preventDefault(),(0,Zr.flushSync)(()=>{Vo(!0)});let Jt=e.subscribe("onResolved",()=>{Jt(),Vo(!1)});e.navigate({...Kt,replace:h,resetScroll:y,hashScrollIntoView:p,startTransition:m,viewTransition:g,ignoreBlocker:I})}},"handleClick");if(Gt)return{...Dt,ref:s,href:Gt,...v&&{children:v},...R&&{target:R},...S&&{disabled:S},...P&&{style:P},..._&&{className:_},...b&&{onClick:b},...x&&{onBlur:x},...w&&{onFocus:w},...C&&{onMouseEnter:C},...M&&{onMouseLeave:M},...L&&{onTouchStart:L}};let jo=i(O=>{if(S||Ft!=="intent")return;if(!He){Lt();return}let T=O.currentTarget;if(re.has(T))return;let et=setTimeout(()=>{re.delete(T),Lt()},He);re.set(T,et)},"enqueueIntentPreload"),vs=i(O=>{S||Ft!=="intent"||Lt()},"handleTouchStart"),zo=i(O=>{if(S||!Ft||!He)return;let T=O.currentTarget,et=re.get(T);et&&(clearTimeout(et),re.delete(T))},"handleLeave");return{...Dt,...ae,...ce,href:qt?.href,ref:s,onClick:jt([b,gs]),onBlur:jt([x,zo]),onFocus:jt([w,jo]),onMouseEnter:jt([C,jo]),onMouseLeave:jt([M,zo]),onTouchStart:jt([L,vs]),disabled:!!S,target:R,...Ho&&{style:Ho},...Uo&&{className:Uo},...S&&Gr,...Ue&&Jr,...$e&&ms&&nn}}i(sn,"useLinkProps");var Wt={},qr={className:"active"},Gr={role:"link","aria-disabled":!0},Jr={"data-status":"active","aria-current":"page"},nn={"data-transitioning":"transitioning"},re=new WeakMap,an={rootMargin:"100px"},jt=i(t=>o=>{for(let e of t)if(e){if(o.defaultPrevented)return;e(o)}},"composeHandlers");function Yr(t,o,e,s){if(!s)return o?{href:t,external:!0}:{href:e.createHref(t)||"/",external:!1}}i(Yr,"getHrefOption");function Xr(t){if(typeof t!="string")return!1;let o=t.charCodeAt(0);return o===47?t.charCodeAt(1)!==47:o===46}i(Xr,"isSafeInternal");var To=U.forwardRef((t,o)=>{let{_asChild:e,...s}=t,{type:r,...n}=sn(s,o),a=typeof s.children=="function"?s.children({isActive:n["data-status"]==="active"}):s.children;if(!e){let{disabled:c,...u}=n;return U.createElement("a",u,a)}return U.createElement(e,n,a)});function cn(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}i(cn,"isCtrlEvent");var Oo=k(W(),1),No=k(ot(),1);var Qr=class extends we{static{i(this,"Route")}constructor(t){super(t),this.useMatch=o=>Q({select:o?.select,from:this.id,structuralSharing:o?.structuralSharing}),this.useRouteContext=o=>ko({...o,from:this.id}),this.useSearch=o=>Ie({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useParams=o=>Eo({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useLoaderDeps=o=>Io({...o,from:this.id}),this.useLoaderData=o=>Mo({...o,from:this.id}),this.useNavigate=()=>ke({from:this.fullPath}),this.Link=Oo.default.forwardRef((o,e)=>(0,No.jsx)(To,{ref:e,from:this.fullPath,...o}))}};function un(t){return new Qr(t)}i(un,"createRoute");var ts=class extends vo{static{i(this,"RootRoute")}constructor(t){super(t),this.useMatch=o=>Q({select:o?.select,from:this.id,structuralSharing:o?.structuralSharing}),this.useRouteContext=o=>ko({...o,from:this.id}),this.useSearch=o=>Ie({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useParams=o=>Eo({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useLoaderDeps=o=>Io({...o,from:this.id}),this.useLoaderData=o=>Mo({...o,from:this.id}),this.useNavigate=()=>ke({from:this.fullPath}),this.Link=Oo.default.forwardRef((o,e)=>(0,No.jsx)(To,{ref:e,from:this.fullPath,...o}))}};function ln(t){return new ts(t)}i(ln,"createRootRoute");var Rc=k(W(),1),Oe=k(ot(),1);function es(t){let o=D();if(!1){let s=`not-found-${o.stores.location.get().pathname}-${o.stores.status.get()}`;return(0,Oe.jsx)(Ot,{getResetKey:i(()=>s,"getResetKey"),onCatch:i((r,n)=>{if(A(r))t.onCatch?.(r,n);else throw r},"onCatch"),errorComponent:i(({error:r})=>{if(A(r))return t.fallback?.(r);throw r},"errorComponent"),children:t.children})}let e=`not-found-${B(o.stores.location,s=>s.pathname)}-${B(o.stores.status,s=>s)}`;return(0,Oe.jsx)(Ot,{getResetKey:i(()=>e,"getResetKey"),onCatch:i((s,r)=>{if(A(s))t.onCatch?.(s,r);else throw s},"onCatch"),errorComponent:i(({error:s})=>{if(A(s))return t.fallback?.(s);throw s},"errorComponent"),children:t.children})}i(es,"CatchNotFound");function os(){return(0,Oe.jsx)("p",{children:"Not Found"})}i(os,"DefaultGlobalNotFound");var rs=k(ot(),1);function ss({children:t}){let o=D();return null}i(ss,"ScriptOnce");var bc=k(W(),1),Ne=k(ot(),1);function _t(t){return(0,Ne.jsx)(Ne.Fragment,{children:t.children})}i(_t,"SafeFragment");var Ec=k(W(),1),De=k(ot(),1);function Fe(t,o,e){return o.options.notFoundComponent?(0,De.jsx)(o.options.notFoundComponent,{...e}):t.options.defaultNotFoundComponent?(0,De.jsx)(t.options.defaultNotFoundComponent,{...e}):(0,De.jsx)(os,{})}i(Fe,"renderRouteNotFound");var is=k(ot(),1);function ns(t){return null}i(ns,"getScrollRestorationScriptForRouter");function as(){let t=ns(D());return t?(0,is.jsx)(ss,{children:t}):null}i(as,"ScrollRestoration");var z=k(W(),1),N=k(ot(),1);var fn=i((t,o)=>t.routeId===o.routeId&&t._displayPending===o._displayPending,"matchViewFieldsEqual"),dn=i((t,o)=>t[0]===o[0]&&t[1]===o[1],"outletMatchSelectionEqual"),Ae=z.memo(i(function({matchId:o}){let e=D();if(!1){let a=e.stores.matchStores.get(o)?.get();a||$();let c=a.routeId,u=e.routesById[c].parentRoute?.id;return(0,N.jsx)(cs,{router:e,matchId:o,resetKey:e.stores.loadedAt.get(),matchState:{routeId:c,ssr:a.ssr,_displayPending:a._displayPending,parentRouteId:u}})}let s=e.stores.matchStores.get(o);s||$();let r=B(e.stores.loadedAt,a=>a),n=B(s,a=>a,fn);return(0,N.jsx)(cs,{router:e,matchId:o,resetKey:r,matchState:z.useMemo(()=>{let a=n.routeId,c=e.routesById[a].parentRoute?.id;return{routeId:a,ssr:n.ssr,_displayPending:n._displayPending,parentRouteId:c}},[n._displayPending,n.routeId,n.ssr,e.routesById])})},"MatchImpl"));function cs({router:t,matchId:o,resetKey:e,matchState:s}){let r=t.routesById[s.routeId],n=r.options.pendingComponent??t.options.defaultPendingComponent,a=n?(0,N.jsx)(n,{}):null,c=r.options.errorComponent??t.options.defaultErrorComponent,u=r.options.onCatch??t.options.defaultOnCatch,d=r.isRoot?r.options.notFoundComponent??t.options.notFoundRoute?.options.component:r.options.notFoundComponent,f=s.ssr===!1||s.ssr==="data-only",l=(!r.isRoot||r.options.wrapInSuspense||f)&&(r.options.wrapInSuspense??n??(r.options.errorComponent?.preload||f))?z.Suspense:_t,p=c?Ot:_t,h=d?es:_t;return(0,N.jsxs)(r.isRoot?r.options.shellComponent??_t:_t,{children:[(0,N.jsx)(Mt.Provider,{value:o,children:(0,N.jsx)(l,{fallback:a,children:(0,N.jsx)(p,{getResetKey:i(()=>e,"getResetKey"),errorComponent:c||Nt,onCatch:i((m,y)=>{if(A(m))throw m.routeId??=s.routeId,m;u?.(m,y)},"onCatch"),children:(0,N.jsx)(h,{fallback:i(m=>{if(m.routeId??=s.routeId,!d||m.routeId&&m.routeId!==s.routeId||!m.routeId&&!r.isRoot)throw m;return z.createElement(d,m)},"fallback"),children:f||s._displayPending?(0,N.jsx)(Kr,{fallback:a,children:(0,N.jsx)(us,{matchId:o})}):(0,N.jsx)(us,{matchId:o})})})})}),s.parentRouteId===X?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(hn,{}),t.options.scrollRestoration&&!1?(0,N.jsx)(as,{}):null]}):null]})}i(cs,"MatchView");function hn(){let t=D();if(!1)return null;let o=z.useRef();return Tt(()=>{let e=t.stores.resolvedLocation.get(),s=o.current;e&&(!s||s.href!==e.href)&&t.emit({type:"onRendered",...ht(t.stores.location.get(),s??e)}),o.current=e},[B(t.stores.resolvedLocation,e=>e?.state.__TSR_key),t]),null}i(hn,"OnRendered");var us=z.memo(i(function({matchId:o}){let e=D(),s=i((f,l)=>e.getMatch(f.id)?._nonReactive[l]??f._nonReactive[l],"getMatchPromise");if(!1){let f=e.stores.matchStores.get(o)?.get();f||$();let l=f.routeId,p=e.routesById[l],h=(e.routesById[l].options.remountDeps??e.options.defaultRemountDeps)?.({routeId:l,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch}),m=h?JSON.stringify(h):void 0,y=p.options.component??e.options.defaultComponent,g=y?(0,N.jsx)(y,{},m):(0,N.jsx)(Do,{});if(f._displayPending)throw s(f,"displayPendingPromise");if(f._forcePending)throw s(f,"minPendingPromise");if(f.status==="pending")throw s(f,"loadPromise");if(f.status==="notFound")return A(f.error)||$(),Fe(e,p,f.error);if(f.status==="redirected")throw H(f.error)||$(),s(f,"loadPromise");return f.status==="error"?(0,N.jsx)((p.options.errorComponent??e.options.defaultErrorComponent)||Nt,{error:f.error,reset:void 0,info:{componentStack:""}}):g}let r=e.stores.matchStores.get(o);r||$();let n=B(r,f=>f),a=n.routeId,c=e.routesById[a],u=z.useMemo(()=>{let f=(e.routesById[a].options.remountDeps??e.options.defaultRemountDeps)?.({routeId:a,loaderDeps:n.loaderDeps,params:n._strictParams,search:n._strictSearch});return f?JSON.stringify(f):void 0},[a,n.loaderDeps,n._strictParams,n._strictSearch,e.options.defaultRemountDeps,e.routesById]),d=z.useMemo(()=>{let f=c.options.component??e.options.defaultComponent;return f?(0,N.jsx)(f,{},u):(0,N.jsx)(Do,{})},[u,c.options.component,e.options.defaultComponent]);if(n._displayPending)throw s(n,"displayPendingPromise");if(n._forcePending)throw s(n,"minPendingPromise");if(n.status==="pending"){let f=c.options.pendingMinMs??e.options.defaultPendingMinMs;if(f){let l=e.getMatch(n.id);if(l&&!l._nonReactive.minPendingPromise&&!!1){let p=ct();l._nonReactive.minPendingPromise=p,setTimeout(()=>{p.resolve(),l._nonReactive.minPendingPromise=void 0},f)}}throw s(n,"loadPromise")}if(n.status==="notFound")return A(n.error)||$(),Fe(e,c,n.error);if(n.status==="redirected")throw H(n.error)||$(),s(n,"loadPromise");if(n.status==="error"){if(!1)return(0,N.jsx)((c.options.errorComponent??e.options.defaultErrorComponent)||Nt,{error:n.error,reset:void 0,info:{componentStack:""}});throw n.error}return d},"MatchInnerImpl")),Do=z.memo(i(function(){let o=D(),e=z.useContext(Mt),s,r=!1,n;if(!1){let d=o.stores.matches.get(),f=e?d.findIndex(p=>p.id===e):-1,l=f>=0?d[f]:void 0;s=l?.routeId,r=l?.globalNotFound??!1,n=f>=0?d[f+1]?.id:void 0}else{let d=e?o.stores.matchStores.get(e):void 0;[s,r]=B(d,f=>[f?.routeId,f?.globalNotFound??!1],dn),n=B(o.stores.matchesId,f=>f[f.findIndex(l=>l===e)+1])}let a=s?o.routesById[s]:void 0,c=o.options.defaultPendingComponent?(0,N.jsx)(o.options.defaultPendingComponent,{}):null;if(r)return a||$(),Fe(o,a,void 0);if(!n)return null;let u=(0,N.jsx)(Ae,{matchId:n});return s===X?(0,N.jsx)(z.Suspense,{fallback:c,children:u}):u},"OutletImpl"));var Ct=k(W(),1);function ls(){let t=D(),o=Ct.useRef({router:t,mounted:!1}),[e,s]=Ct.useState(!1),r=B(t.stores.isLoading,l=>l),n=B(t.stores.hasPending,l=>l),a=Ee(r),c=r||e||n,u=Ee(c),d=r||n,f=Ee(d);return t.startTransition=l=>{s(!0),Ct.startTransition(()=>{l(),s(!1)})},Ct.useEffect(()=>{let l=t.history.subscribe(t.load),p=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Z(t.latestLocation.publicHref)!==Z(p.publicHref)&&t.commitLocation({...p,replace:!0}),()=>{l()}},[t,t.history]),Tt(()=>{if(typeof window<"u"&&t.ssr||o.current.router===t&&o.current.mounted)return;o.current={router:t,mounted:!0},i(async()=>{try{await t.load()}catch(p){console.error(p)}},"tryLoad")()},[t]),Tt(()=>{a&&!r&&t.emit({type:"onLoad",...ht(t.stores.location.get(),t.stores.resolvedLocation.get())})},[a,t,r]),Tt(()=>{f&&!d&&t.emit({type:"onBeforeRouteMount",...ht(t.stores.location.get(),t.stores.resolvedLocation.get())})},[d,f,t]),Tt(()=>{if(u&&!c){let l=ht(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...l}),oe(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())})}},[c,u,t]),null}i(ls,"Transitioner");var Be=k(W(),1),ft=k(ot(),1);function fs(){let t=D(),o=t.routesById[X].options.pendingComponent??t.options.defaultPendingComponent,e=o?(0,ft.jsx)(o,{}):null,s=(0,ft.jsxs)(typeof document<"u"&&t.ssr?_t:Be.Suspense,{fallback:e,children:[!!1&&(0,ft.jsx)(ls,{}),(0,ft.jsx)(pn,{})]});return t.options.InnerWrap?(0,ft.jsx)(t.options.InnerWrap,{children:s}):s}i(fs,"Matches");function pn(){let t=D(),o=!1,e=o?t.stores.firstId.get():B(t.stores.firstId,n=>n),s=o?t.stores.loadedAt.get():B(t.stores.loadedAt,n=>n),r=e?(0,ft.jsx)(Ae,{matchId:e}):null;return(0,ft.jsx)(Mt.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:(0,ft.jsx)(Ot,{getResetKey:i(()=>s,"getResetKey"),errorComponent:Nt,onCatch:void 0,children:r})})}i(pn,"MatchesInner");var ds=i(t=>({createMutableStore:Le,createReadonlyStore:Le,batch:oe}),"getStoreFactory");var mn=i(t=>new hs(t),"createRouter"),hs=class extends mo{static{i(this,"Router")}constructor(t){super(t,ds)}};var Lu=k(W(),1),se=k(ot(),1);function ps({router:t,children:o,...e}){mt(e)&&t.update({...t.options,...e,context:{...t.options.context,...e.context}});let s=(0,se.jsx)(ue.Provider,{value:t,children:o});return t.options.Wrap?(0,se.jsx)(t.options.Wrap,{children:s}):s}i(ps,"RouterContextProvider");function gn({router:t,...o}){return(0,se.jsx)(ps,{router:t,...o,children:(0,se.jsx)(fs,{})})}i(gn,"RouterProvider");function vn(t){let o=D({warn:t?.router===void 0}),e=t?.router||o;if(!1){let s=e.stores.__store.get();return t?.select?t.select(s):s}return B(e.stores.__store,_o(t,e))}i(vn,"useRouterState");export{ho as a,js as b,D as c,Ie as d,ke as e,un as f,ln as g,Do as h,mn as i,gn as j,vn as k};