@kynetic-ai/spec 0.11.0 → 0.12.0

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 (501) hide show
  1. package/README.md +55 -455
  2. package/dist/agent-runtime/bootstrap.d.ts +31 -0
  3. package/dist/agent-runtime/bootstrap.d.ts.map +1 -0
  4. package/dist/agent-runtime/bootstrap.js +302 -0
  5. package/dist/agent-runtime/bootstrap.js.map +1 -0
  6. package/dist/agent-runtime/dispatch.d.ts +119 -10
  7. package/dist/agent-runtime/dispatch.d.ts.map +1 -1
  8. package/dist/agent-runtime/dispatch.js +1154 -219
  9. package/dist/agent-runtime/dispatch.js.map +1 -1
  10. package/dist/agent-runtime/invocation.d.ts +28 -1
  11. package/dist/agent-runtime/invocation.d.ts.map +1 -1
  12. package/dist/agent-runtime/invocation.js +171 -59
  13. package/dist/agent-runtime/invocation.js.map +1 -1
  14. package/dist/agent-runtime/prompts.d.ts +9 -0
  15. package/dist/agent-runtime/prompts.d.ts.map +1 -1
  16. package/dist/agent-runtime/prompts.js +42 -7
  17. package/dist/agent-runtime/prompts.js.map +1 -1
  18. package/dist/agent-runtime/session-event-accumulator.d.ts +83 -0
  19. package/dist/agent-runtime/session-event-accumulator.d.ts.map +1 -0
  20. package/dist/agent-runtime/session-event-accumulator.js +203 -0
  21. package/dist/agent-runtime/session-event-accumulator.js.map +1 -0
  22. package/dist/agent-runtime/session-event-types.d.ts +67 -0
  23. package/dist/agent-runtime/session-event-types.d.ts.map +1 -0
  24. package/dist/agent-runtime/session-event-types.js +13 -0
  25. package/dist/agent-runtime/session-event-types.js.map +1 -0
  26. package/dist/agent-runtime/workspace.d.ts +244 -0
  27. package/dist/agent-runtime/workspace.d.ts.map +1 -0
  28. package/dist/agent-runtime/workspace.js +2025 -0
  29. package/dist/agent-runtime/workspace.js.map +1 -0
  30. package/dist/agents/adapters.d.ts.map +1 -1
  31. package/dist/agents/adapters.js +58 -13
  32. package/dist/agents/adapters.js.map +1 -1
  33. package/dist/agents/spawner.d.ts +8 -0
  34. package/dist/agents/spawner.d.ts.map +1 -1
  35. package/dist/agents/spawner.js +25 -3
  36. package/dist/agents/spawner.js.map +1 -1
  37. package/dist/cli/batch-exec.js +1 -1
  38. package/dist/cli/batch-exec.js.map +1 -1
  39. package/dist/cli/command-annotations.d.ts +15 -3
  40. package/dist/cli/command-annotations.d.ts.map +1 -1
  41. package/dist/cli/command-annotations.js +23 -3
  42. package/dist/cli/command-annotations.js.map +1 -1
  43. package/dist/cli/commands/agent.d.ts +2 -0
  44. package/dist/cli/commands/agent.d.ts.map +1 -1
  45. package/dist/cli/commands/agent.js +144 -27
  46. package/dist/cli/commands/agent.js.map +1 -1
  47. package/dist/cli/commands/agents.d.ts.map +1 -1
  48. package/dist/cli/commands/agents.js +5 -5
  49. package/dist/cli/commands/agents.js.map +1 -1
  50. package/dist/cli/commands/derive.d.ts.map +1 -1
  51. package/dist/cli/commands/derive.js +118 -3
  52. package/dist/cli/commands/derive.js.map +1 -1
  53. package/dist/cli/commands/guard.d.ts.map +1 -1
  54. package/dist/cli/commands/guard.js +8 -6
  55. package/dist/cli/commands/guard.js.map +1 -1
  56. package/dist/cli/commands/index.d.ts +1 -0
  57. package/dist/cli/commands/index.d.ts.map +1 -1
  58. package/dist/cli/commands/index.js +1 -0
  59. package/dist/cli/commands/index.js.map +1 -1
  60. package/dist/cli/commands/init.d.ts.map +1 -1
  61. package/dist/cli/commands/init.js +20 -0
  62. package/dist/cli/commands/init.js.map +1 -1
  63. package/dist/cli/commands/item.d.ts.map +1 -1
  64. package/dist/cli/commands/item.js +205 -47
  65. package/dist/cli/commands/item.js.map +1 -1
  66. package/dist/cli/commands/log.d.ts.map +1 -1
  67. package/dist/cli/commands/log.js +24 -10
  68. package/dist/cli/commands/log.js.map +1 -1
  69. package/dist/cli/commands/plan-import.d.ts +3 -3
  70. package/dist/cli/commands/plan-import.d.ts.map +1 -1
  71. package/dist/cli/commands/plan-import.js +213 -528
  72. package/dist/cli/commands/plan-import.js.map +1 -1
  73. package/dist/cli/commands/plan.d.ts.map +1 -1
  74. package/dist/cli/commands/plan.js +533 -83
  75. package/dist/cli/commands/plan.js.map +1 -1
  76. package/dist/cli/commands/review.d.ts +14 -0
  77. package/dist/cli/commands/review.d.ts.map +1 -0
  78. package/dist/cli/commands/review.js +1142 -0
  79. package/dist/cli/commands/review.js.map +1 -0
  80. package/dist/cli/commands/serve.d.ts +1 -0
  81. package/dist/cli/commands/serve.d.ts.map +1 -1
  82. package/dist/cli/commands/serve.js +33 -10
  83. package/dist/cli/commands/serve.js.map +1 -1
  84. package/dist/cli/commands/session/checkpoint.d.ts +2 -4
  85. package/dist/cli/commands/session/checkpoint.d.ts.map +1 -1
  86. package/dist/cli/commands/session/checkpoint.js +6 -107
  87. package/dist/cli/commands/session/checkpoint.js.map +1 -1
  88. package/dist/cli/commands/session/commands.d.ts.map +1 -1
  89. package/dist/cli/commands/session/commands.js +33 -23
  90. package/dist/cli/commands/session/commands.js.map +1 -1
  91. package/dist/cli/commands/session/compact.js +4 -4
  92. package/dist/cli/commands/session/compact.js.map +1 -1
  93. package/dist/cli/commands/session/create.js +2 -2
  94. package/dist/cli/commands/session/create.js.map +1 -1
  95. package/dist/cli/commands/session/format.d.ts.map +1 -1
  96. package/dist/cli/commands/session/format.js +1 -6
  97. package/dist/cli/commands/session/format.js.map +1 -1
  98. package/dist/cli/commands/session/log.d.ts +32 -7
  99. package/dist/cli/commands/session/log.d.ts.map +1 -1
  100. package/dist/cli/commands/session/log.js +166 -60
  101. package/dist/cli/commands/session/log.js.map +1 -1
  102. package/dist/cli/commands/session/migrate.d.ts +9 -0
  103. package/dist/cli/commands/session/migrate.d.ts.map +1 -0
  104. package/dist/cli/commands/session/migrate.js +46 -0
  105. package/dist/cli/commands/session/migrate.js.map +1 -0
  106. package/dist/cli/commands/session/stale-close.d.ts.map +1 -1
  107. package/dist/cli/commands/session/stale-close.js +5 -8
  108. package/dist/cli/commands/session/stale-close.js.map +1 -1
  109. package/dist/cli/commands/session/types.d.ts +1 -1
  110. package/dist/cli/commands/session/types.d.ts.map +1 -1
  111. package/dist/cli/commands/setup.d.ts +2 -2
  112. package/dist/cli/commands/setup.d.ts.map +1 -1
  113. package/dist/cli/commands/setup.js +287 -257
  114. package/dist/cli/commands/setup.js.map +1 -1
  115. package/dist/cli/commands/shadow.d.ts.map +1 -1
  116. package/dist/cli/commands/shadow.js +147 -31
  117. package/dist/cli/commands/shadow.js.map +1 -1
  118. package/dist/cli/commands/skill-crud.d.ts +7 -0
  119. package/dist/cli/commands/skill-crud.d.ts.map +1 -1
  120. package/dist/cli/commands/skill-crud.js +41 -18
  121. package/dist/cli/commands/skill-crud.js.map +1 -1
  122. package/dist/cli/commands/skill-diff.d.ts.map +1 -1
  123. package/dist/cli/commands/skill-diff.js +29 -3
  124. package/dist/cli/commands/skill-diff.js.map +1 -1
  125. package/dist/cli/commands/skill-install.d.ts.map +1 -1
  126. package/dist/cli/commands/skill-install.js +5 -4
  127. package/dist/cli/commands/skill-install.js.map +1 -1
  128. package/dist/cli/commands/task.d.ts.map +1 -1
  129. package/dist/cli/commands/task.js +359 -49
  130. package/dist/cli/commands/task.js.map +1 -1
  131. package/dist/cli/commands/trait.d.ts.map +1 -1
  132. package/dist/cli/commands/trait.js +5 -27
  133. package/dist/cli/commands/trait.js.map +1 -1
  134. package/dist/cli/commands/validate.d.ts.map +1 -1
  135. package/dist/cli/commands/validate.js +113 -52
  136. package/dist/cli/commands/validate.js.map +1 -1
  137. package/dist/cli/index.d.ts.map +1 -1
  138. package/dist/cli/index.js +69 -2
  139. package/dist/cli/index.js.map +1 -1
  140. package/dist/cli/output.d.ts +26 -0
  141. package/dist/cli/output.d.ts.map +1 -1
  142. package/dist/cli/output.js +108 -1
  143. package/dist/cli/output.js.map +1 -1
  144. package/dist/cli/sync-mode.d.ts +44 -0
  145. package/dist/cli/sync-mode.d.ts.map +1 -0
  146. package/dist/cli/sync-mode.js +64 -0
  147. package/dist/cli/sync-mode.js.map +1 -0
  148. package/dist/daemon/middleware/project-context.ts +25 -7
  149. package/dist/daemon/project-context.ts +18 -0
  150. package/dist/daemon/routes/agent-dispatch.ts +99 -22
  151. package/dist/daemon/routes/aggregation.ts +184 -0
  152. package/dist/daemon/routes/inbox.ts +5 -0
  153. package/dist/daemon/routes/items.ts +145 -0
  154. package/dist/daemon/routes/meta.ts +1 -1
  155. package/dist/daemon/routes/projects.ts +28 -6
  156. package/dist/daemon/routes/ref-resolution.ts +119 -0
  157. package/dist/daemon/routes/refs.ts +42 -0
  158. package/dist/daemon/routes/session-related.ts +140 -0
  159. package/dist/daemon/routes/sessions.ts +420 -19
  160. package/dist/daemon/routes/tasks.ts +62 -5
  161. package/dist/daemon/routes/triage.ts +40 -1
  162. package/dist/daemon/server.ts +143 -49
  163. package/dist/daemon/session-sync.ts +11 -0
  164. package/dist/daemon/shadow-sync.ts +11 -0
  165. package/dist/daemon/watcher.ts +56 -5
  166. package/dist/daemon/websocket/project-resolution.ts +77 -0
  167. package/dist/export/json.d.ts.map +1 -1
  168. package/dist/export/json.js +104 -1
  169. package/dist/export/json.js.map +1 -1
  170. package/dist/export/types.d.ts +52 -1
  171. package/dist/export/types.d.ts.map +1 -1
  172. package/dist/index.d.ts +1 -0
  173. package/dist/index.d.ts.map +1 -1
  174. package/dist/index.js +1 -0
  175. package/dist/index.js.map +1 -1
  176. package/dist/parser/agent-detection.d.ts +1 -1
  177. package/dist/parser/agent-detection.d.ts.map +1 -1
  178. package/dist/parser/agent-detection.js +10 -0
  179. package/dist/parser/agent-detection.js.map +1 -1
  180. package/dist/parser/config.d.ts +397 -2
  181. package/dist/parser/config.d.ts.map +1 -1
  182. package/dist/parser/config.js +125 -3
  183. package/dist/parser/config.js.map +1 -1
  184. package/dist/parser/dispatch-workspaces.d.ts +18 -0
  185. package/dist/parser/dispatch-workspaces.d.ts.map +1 -0
  186. package/dist/parser/dispatch-workspaces.js +209 -0
  187. package/dist/parser/dispatch-workspaces.js.map +1 -0
  188. package/dist/parser/doctor.d.ts.map +1 -1
  189. package/dist/parser/doctor.js +27 -8
  190. package/dist/parser/doctor.js.map +1 -1
  191. package/dist/parser/file-lock.d.ts.map +1 -1
  192. package/dist/parser/file-lock.js +9 -2
  193. package/dist/parser/file-lock.js.map +1 -1
  194. package/dist/parser/index.d.ts +6 -0
  195. package/dist/parser/index.d.ts.map +1 -1
  196. package/dist/parser/index.js +6 -0
  197. package/dist/parser/index.js.map +1 -1
  198. package/dist/parser/plans.d.ts.map +1 -1
  199. package/dist/parser/plans.js +1 -0
  200. package/dist/parser/plans.js.map +1 -1
  201. package/dist/parser/refs.d.ts +8 -1
  202. package/dist/parser/refs.d.ts.map +1 -1
  203. package/dist/parser/refs.js +27 -1
  204. package/dist/parser/refs.js.map +1 -1
  205. package/dist/parser/review-operations.d.ts +72 -0
  206. package/dist/parser/review-operations.d.ts.map +1 -0
  207. package/dist/parser/review-operations.js +185 -0
  208. package/dist/parser/review-operations.js.map +1 -0
  209. package/dist/parser/review-task-integration.d.ts +78 -0
  210. package/dist/parser/review-task-integration.d.ts.map +1 -0
  211. package/dist/parser/review-task-integration.js +173 -0
  212. package/dist/parser/review-task-integration.js.map +1 -0
  213. package/dist/parser/review-threads.d.ts +101 -0
  214. package/dist/parser/review-threads.d.ts.map +1 -0
  215. package/dist/parser/review-threads.js +222 -0
  216. package/dist/parser/review-threads.js.map +1 -0
  217. package/dist/parser/review-validation.d.ts +69 -0
  218. package/dist/parser/review-validation.d.ts.map +1 -0
  219. package/dist/parser/review-validation.js +207 -0
  220. package/dist/parser/review-validation.js.map +1 -0
  221. package/dist/parser/reviews.d.ts +58 -0
  222. package/dist/parser/reviews.d.ts.map +1 -0
  223. package/dist/parser/reviews.js +230 -0
  224. package/dist/parser/reviews.js.map +1 -0
  225. package/dist/parser/session-branch.d.ts +91 -0
  226. package/dist/parser/session-branch.d.ts.map +1 -0
  227. package/dist/parser/session-branch.js +565 -0
  228. package/dist/parser/session-branch.js.map +1 -0
  229. package/dist/parser/session-sync-scheduler.d.ts +53 -0
  230. package/dist/parser/session-sync-scheduler.d.ts.map +1 -0
  231. package/dist/parser/session-sync-scheduler.js +100 -0
  232. package/dist/parser/session-sync-scheduler.js.map +1 -0
  233. package/dist/parser/setup-status.d.ts +7 -1
  234. package/dist/parser/setup-status.d.ts.map +1 -1
  235. package/dist/parser/setup-status.js +104 -39
  236. package/dist/parser/setup-status.js.map +1 -1
  237. package/dist/parser/shadow-sync-scheduler.d.ts +71 -0
  238. package/dist/parser/shadow-sync-scheduler.d.ts.map +1 -0
  239. package/dist/parser/shadow-sync-scheduler.js +139 -0
  240. package/dist/parser/shadow-sync-scheduler.js.map +1 -0
  241. package/dist/parser/shadow.d.ts +121 -14
  242. package/dist/parser/shadow.d.ts.map +1 -1
  243. package/dist/parser/shadow.js +752 -27
  244. package/dist/parser/shadow.js.map +1 -1
  245. package/dist/parser/skill-render.d.ts +24 -0
  246. package/dist/parser/skill-render.d.ts.map +1 -1
  247. package/dist/parser/skill-render.js +98 -26
  248. package/dist/parser/skill-render.js.map +1 -1
  249. package/dist/parser/validate.d.ts +43 -3
  250. package/dist/parser/validate.d.ts.map +1 -1
  251. package/dist/parser/validate.js +204 -30
  252. package/dist/parser/validate.js.map +1 -1
  253. package/dist/parser/yaml.d.ts +47 -11
  254. package/dist/parser/yaml.d.ts.map +1 -1
  255. package/dist/parser/yaml.js +329 -149
  256. package/dist/parser/yaml.js.map +1 -1
  257. package/dist/review/checks.d.ts +97 -0
  258. package/dist/review/checks.d.ts.map +1 -0
  259. package/dist/review/checks.js +175 -0
  260. package/dist/review/checks.js.map +1 -0
  261. package/dist/review/index.d.ts +3 -0
  262. package/dist/review/index.d.ts.map +1 -0
  263. package/dist/review/index.js +3 -0
  264. package/dist/review/index.js.map +1 -0
  265. package/dist/review/subject-bindings.d.ts +83 -0
  266. package/dist/review/subject-bindings.d.ts.map +1 -0
  267. package/dist/review/subject-bindings.js +175 -0
  268. package/dist/review/subject-bindings.js.map +1 -0
  269. package/dist/schema/common.d.ts +26 -0
  270. package/dist/schema/common.d.ts.map +1 -1
  271. package/dist/schema/common.js +13 -0
  272. package/dist/schema/common.js.map +1 -1
  273. package/dist/schema/dispatch-workspace.d.ts +2643 -0
  274. package/dist/schema/dispatch-workspace.d.ts.map +1 -0
  275. package/dist/schema/dispatch-workspace.js +187 -0
  276. package/dist/schema/dispatch-workspace.js.map +1 -0
  277. package/dist/schema/inbox.d.ts +8 -8
  278. package/dist/schema/index.d.ts +2 -0
  279. package/dist/schema/index.d.ts.map +1 -1
  280. package/dist/schema/index.js +2 -0
  281. package/dist/schema/index.js.map +1 -1
  282. package/dist/schema/meta.d.ts +648 -116
  283. package/dist/schema/meta.d.ts.map +1 -1
  284. package/dist/schema/meta.js +27 -0
  285. package/dist/schema/meta.js.map +1 -1
  286. package/dist/schema/plan.d.ts +30 -19
  287. package/dist/schema/plan.d.ts.map +1 -1
  288. package/dist/schema/plan.js +3 -1
  289. package/dist/schema/plan.js.map +1 -1
  290. package/dist/schema/review-records.d.ts +2676 -0
  291. package/dist/schema/review-records.d.ts.map +1 -0
  292. package/dist/schema/review-records.js +232 -0
  293. package/dist/schema/review-records.js.map +1 -0
  294. package/dist/schema/spec.d.ts +32 -14
  295. package/dist/schema/spec.d.ts.map +1 -1
  296. package/dist/schema/spec.js +5 -0
  297. package/dist/schema/spec.js.map +1 -1
  298. package/dist/schema/task.d.ts +187 -29
  299. package/dist/schema/task.d.ts.map +1 -1
  300. package/dist/schema/task.js +12 -2
  301. package/dist/schema/task.js.map +1 -1
  302. package/dist/schema/triage.d.ts +22 -22
  303. package/dist/sessions/cache.d.ts +119 -0
  304. package/dist/sessions/cache.d.ts.map +1 -0
  305. package/dist/sessions/cache.js +284 -0
  306. package/dist/sessions/cache.js.map +1 -0
  307. package/dist/sessions/index.d.ts +1 -0
  308. package/dist/sessions/index.d.ts.map +1 -1
  309. package/dist/sessions/index.js +2 -0
  310. package/dist/sessions/index.js.map +1 -1
  311. package/dist/sessions/legacy.d.ts +77 -0
  312. package/dist/sessions/legacy.d.ts.map +1 -0
  313. package/dist/sessions/legacy.js +146 -0
  314. package/dist/sessions/legacy.js.map +1 -0
  315. package/dist/sessions/store.d.ts +103 -73
  316. package/dist/sessions/store.d.ts.map +1 -1
  317. package/dist/sessions/store.js +335 -186
  318. package/dist/sessions/store.js.map +1 -1
  319. package/dist/sessions/types.d.ts +44 -16
  320. package/dist/sessions/types.d.ts.map +1 -1
  321. package/dist/sessions/types.js +11 -2
  322. package/dist/sessions/types.js.map +1 -1
  323. package/dist/strings/errors.d.ts +32 -0
  324. package/dist/strings/errors.d.ts.map +1 -1
  325. package/dist/strings/errors.js +17 -0
  326. package/dist/strings/errors.js.map +1 -1
  327. package/dist/strings/labels.d.ts +1 -0
  328. package/dist/strings/labels.d.ts.map +1 -1
  329. package/dist/strings/labels.js +1 -0
  330. package/dist/strings/labels.js.map +1 -1
  331. package/dist/utils/activity.d.ts +101 -0
  332. package/dist/utils/activity.d.ts.map +1 -0
  333. package/dist/utils/activity.js +408 -0
  334. package/dist/utils/activity.js.map +1 -0
  335. package/dist/utils/git.d.ts +31 -0
  336. package/dist/utils/git.d.ts.map +1 -1
  337. package/dist/utils/git.js +87 -0
  338. package/dist/utils/git.js.map +1 -1
  339. package/dist/utils/index.d.ts +2 -0
  340. package/dist/utils/index.d.ts.map +1 -1
  341. package/dist/utils/index.js +1 -0
  342. package/dist/utils/index.js.map +1 -1
  343. package/dist/web-ui/_app/immutable/assets/0.tmlwn-Ih.css +1 -0
  344. package/dist/web-ui/_app/immutable/assets/9.BwwJybWx.css +1 -0
  345. package/dist/web-ui/_app/immutable/chunks/2KqE8gtn.js +1 -0
  346. package/dist/web-ui/_app/immutable/chunks/70-t_QvE.js +1 -0
  347. package/dist/web-ui/_app/immutable/chunks/AiWQj974.js +1 -0
  348. package/dist/web-ui/_app/immutable/chunks/{CPPfDSei.js → B25nWFyA.js} +4 -4
  349. package/dist/web-ui/_app/immutable/chunks/{DBYE9jOd.js → B2bcA_Q_.js} +1 -1
  350. package/dist/web-ui/_app/immutable/chunks/B5e5HYyB.js +1 -0
  351. package/dist/web-ui/_app/immutable/chunks/B7-5z6eA.js +1 -0
  352. package/dist/web-ui/_app/immutable/chunks/B7bGmhK0.js +1 -0
  353. package/dist/web-ui/_app/immutable/chunks/{DzO4hlg9.js → B8tYZKAE.js} +1 -1
  354. package/dist/web-ui/_app/immutable/chunks/{B5LJFxqa.js → BFGAyJjD.js} +1 -1
  355. package/dist/web-ui/_app/immutable/chunks/BG0850zf.js +1 -0
  356. package/dist/web-ui/_app/immutable/chunks/{DAMmvwn4.js → BG8eSzAd.js} +1 -1
  357. package/dist/web-ui/_app/immutable/chunks/BIMxXS8I.js +1 -0
  358. package/dist/web-ui/_app/immutable/chunks/BSzL1fpU.js +1 -0
  359. package/dist/web-ui/_app/immutable/chunks/BYtjHfeq.js +1 -0
  360. package/dist/web-ui/_app/immutable/chunks/{DxCk-KHc.js → Bp5pFYXL.js} +1 -1
  361. package/dist/web-ui/_app/immutable/chunks/{B8a0xDxR.js → BsJFsuAT.js} +1 -1
  362. package/dist/web-ui/_app/immutable/chunks/BvpNHcD6.js +1 -0
  363. package/dist/web-ui/_app/immutable/chunks/BypqA25-.js +1 -0
  364. package/dist/web-ui/_app/immutable/chunks/{BVA9Exy-.js → C0w6WDm5.js} +1 -1
  365. package/dist/web-ui/_app/immutable/chunks/C5_PAZ0y.js +1 -0
  366. package/dist/web-ui/_app/immutable/chunks/CDRO15Iv.js +1 -0
  367. package/dist/web-ui/_app/immutable/chunks/CF1CoqD5.js +1 -0
  368. package/dist/web-ui/_app/immutable/chunks/CS2sa4_m.js +1 -0
  369. package/dist/web-ui/_app/immutable/chunks/{BJ0JX3ea.js → CWUQwB9H.js} +1 -1
  370. package/dist/web-ui/_app/immutable/chunks/CY5FDdSU.js +1 -0
  371. package/dist/web-ui/_app/immutable/chunks/C_7MTDoj.js +1 -0
  372. package/dist/web-ui/_app/immutable/chunks/{D3vxvonu.js → CaAJD3dl.js} +1 -1
  373. package/dist/web-ui/_app/immutable/chunks/{BP352uRn.js → ChB5iyEL.js} +1 -1
  374. package/dist/web-ui/_app/immutable/chunks/{pE6cYWlS.js → ChQD-6N8.js} +1 -1
  375. package/dist/web-ui/_app/immutable/chunks/{Eo4gF7ih.js → CqbsoCwA.js} +1 -1
  376. package/dist/web-ui/_app/immutable/chunks/DCeJW50p.js +1 -0
  377. package/dist/web-ui/_app/immutable/chunks/{Cncwi6fQ.js → DJtZNgcs.js} +1 -1
  378. package/dist/web-ui/_app/immutable/chunks/DKIeaprD.js +1 -0
  379. package/dist/web-ui/_app/immutable/chunks/DLd2uVIA.js +1 -0
  380. package/dist/web-ui/_app/immutable/chunks/{DjcCz-PU.js → DW_subyT.js} +2 -2
  381. package/dist/web-ui/_app/immutable/chunks/DbU6lVn0.js +1 -0
  382. package/dist/web-ui/_app/immutable/chunks/Dc7ZCC5m.js +1 -0
  383. package/dist/web-ui/_app/immutable/chunks/Dd5umPsk.js +2 -0
  384. package/dist/web-ui/_app/immutable/chunks/{BysXJlZb.js → Dg_zDpDS.js} +1 -1
  385. package/dist/web-ui/_app/immutable/chunks/Dgqu8Yuc.js +1 -0
  386. package/dist/web-ui/_app/immutable/chunks/DmxsPZTB.js +1 -0
  387. package/dist/web-ui/_app/immutable/chunks/DphTaFUB.js +1 -0
  388. package/dist/web-ui/_app/immutable/chunks/DqK4iHp0.js +1 -0
  389. package/dist/web-ui/_app/immutable/chunks/{D9QNBZM2.js → DqT6OH_u.js} +2 -2
  390. package/dist/web-ui/_app/immutable/chunks/Ds9I9wQb.js +1 -0
  391. package/dist/web-ui/_app/immutable/chunks/Du5ng3u4.js +1 -0
  392. package/dist/web-ui/_app/immutable/chunks/DxJw79Wi.js +1 -0
  393. package/dist/web-ui/_app/immutable/chunks/GFTX8GgV.js +1 -0
  394. package/dist/web-ui/_app/immutable/chunks/{C076q4JN.js → HNjs76Zz.js} +1 -1
  395. package/dist/web-ui/_app/immutable/chunks/HVMjDi4_.js +1 -0
  396. package/dist/web-ui/_app/immutable/chunks/{BkOJ8DkV.js → P0A_fJvS.js} +1 -1
  397. package/dist/web-ui/_app/immutable/chunks/T3vGWjIL.js +1 -0
  398. package/dist/web-ui/_app/immutable/chunks/VTmrX9Qu.js +1 -0
  399. package/dist/web-ui/_app/immutable/chunks/{k_Qegko0.js → Xvwhx_F1.js} +1 -1
  400. package/dist/web-ui/_app/immutable/chunks/Yyz1XMQA.js +1 -0
  401. package/dist/web-ui/_app/immutable/chunks/{62JVKtnb.js → dh5HeqUr.js} +1 -1
  402. package/dist/web-ui/_app/immutable/chunks/fZMteyca.js +62 -0
  403. package/dist/web-ui/_app/immutable/chunks/{D82RulSH.js → gPrj-hqC.js} +1 -1
  404. package/dist/web-ui/_app/immutable/chunks/htcWMiYN.js +1 -0
  405. package/dist/web-ui/_app/immutable/chunks/{CwELQvbx.js → oTsvd9y4.js} +1 -1
  406. package/dist/web-ui/_app/immutable/chunks/qJfLUwU4.js +1 -0
  407. package/dist/web-ui/_app/immutable/chunks/xCtiO_JE.js +1 -0
  408. package/dist/web-ui/_app/immutable/chunks/{DvA-KON-.js → y4GeEH6k.js} +1 -1
  409. package/dist/web-ui/_app/immutable/entry/app.C4h_eOn6.js +2 -0
  410. package/dist/web-ui/_app/immutable/entry/start.CQFTf9ep.js +1 -0
  411. package/dist/web-ui/_app/immutable/nodes/0.Dh1xO970.js +1 -0
  412. package/dist/web-ui/_app/immutable/nodes/1.l75D3Opx.js +1 -0
  413. package/dist/web-ui/_app/immutable/nodes/10.DBidBPc-.js +1 -0
  414. package/dist/web-ui/_app/immutable/nodes/11.Ab0gUKWe.js +1 -0
  415. package/dist/web-ui/_app/immutable/nodes/12.CMsnoxfs.js +1 -0
  416. package/dist/web-ui/_app/immutable/nodes/13.D8YKuknB.js +1 -0
  417. package/dist/web-ui/_app/immutable/nodes/14.DZ0aan7y.js +1 -0
  418. package/dist/web-ui/_app/immutable/nodes/15.CUIKreDL.js +2 -0
  419. package/dist/web-ui/_app/immutable/nodes/16.BWc8--BO.js +1 -0
  420. package/dist/web-ui/_app/immutable/nodes/2.CDUonbuh.js +1 -0
  421. package/dist/web-ui/_app/immutable/nodes/3.Ctg3M00i.js +1 -0
  422. package/dist/web-ui/_app/immutable/nodes/4.Ci-JDwbA.js +2 -0
  423. package/dist/web-ui/_app/immutable/nodes/5.CTyEDAq0.js +1 -0
  424. package/dist/web-ui/_app/immutable/nodes/6.BTZZqsAb.js +1 -0
  425. package/dist/web-ui/_app/immutable/nodes/7.BI52g_Jo.js +137 -0
  426. package/dist/web-ui/_app/immutable/nodes/8.3hZPaB9x.js +1 -0
  427. package/dist/web-ui/_app/immutable/nodes/9.DS49kvwl.js +29 -0
  428. package/dist/web-ui/_app/version.json +1 -1
  429. package/dist/web-ui/favicon-192.png +0 -0
  430. package/dist/web-ui/favicon-32.png +0 -0
  431. package/dist/web-ui/favicon.ico +0 -0
  432. package/dist/web-ui/index.html +14 -14
  433. package/package.json +12 -6
  434. package/plugin/.claude-plugin/marketplace.json +1 -1
  435. package/plugin/.claude-plugin/plugin.json +1 -1
  436. package/plugin/plugins/kspec/skills/merge/SKILL.md +127 -0
  437. package/plugin/plugins/kspec/skills/plan/SKILL.md +55 -26
  438. package/plugin/plugins/kspec/skills/review/SKILL.md +350 -133
  439. package/plugin/plugins/kspec/skills/task-work/SKILL.md +96 -106
  440. package/templates/agents-sections/04-pr-workflow.md +15 -12
  441. package/templates/agents-sections/06-ralph-loop.md +15 -10
  442. package/templates/skills/manifest.yaml +25 -7
  443. package/templates/skills/merge/SKILL.md +120 -0
  444. package/templates/skills/plan/SKILL.md +55 -26
  445. package/templates/skills/review/SKILL.md +346 -130
  446. package/templates/skills/task-work/SKILL.md +93 -103
  447. package/dist/web-ui/_app/immutable/assets/0.BJaYkGW2.css +0 -1
  448. package/dist/web-ui/_app/immutable/assets/9.SzGLxi4x.css +0 -1
  449. package/dist/web-ui/_app/immutable/chunks/-lc0BifF.js +0 -1
  450. package/dist/web-ui/_app/immutable/chunks/8RBjHMN1.js +0 -1
  451. package/dist/web-ui/_app/immutable/chunks/B5wTVqxm.js +0 -1
  452. package/dist/web-ui/_app/immutable/chunks/B6VSmczZ.js +0 -1
  453. package/dist/web-ui/_app/immutable/chunks/BEOQc37C.js +0 -1
  454. package/dist/web-ui/_app/immutable/chunks/BHtYorjv.js +0 -1
  455. package/dist/web-ui/_app/immutable/chunks/BMuCqDX8.js +0 -1
  456. package/dist/web-ui/_app/immutable/chunks/BUZujXJ2.js +0 -1
  457. package/dist/web-ui/_app/immutable/chunks/BWET-efb.js +0 -1
  458. package/dist/web-ui/_app/immutable/chunks/BXkNecpt.js +0 -1
  459. package/dist/web-ui/_app/immutable/chunks/BYzrIfX8.js +0 -1
  460. package/dist/web-ui/_app/immutable/chunks/BpuwufMc.js +0 -1
  461. package/dist/web-ui/_app/immutable/chunks/BwMO4RrG.js +0 -1
  462. package/dist/web-ui/_app/immutable/chunks/C33JaVbg.js +0 -1
  463. package/dist/web-ui/_app/immutable/chunks/CGtqifKp.js +0 -1
  464. package/dist/web-ui/_app/immutable/chunks/CHDZZ7OG.js +0 -1
  465. package/dist/web-ui/_app/immutable/chunks/CUir3f4J.js +0 -60
  466. package/dist/web-ui/_app/immutable/chunks/CrCIbn0C.js +0 -1
  467. package/dist/web-ui/_app/immutable/chunks/D6TVmR9T.js +0 -1
  468. package/dist/web-ui/_app/immutable/chunks/D7LTux4W.js +0 -1
  469. package/dist/web-ui/_app/immutable/chunks/DAh4Wfku.js +0 -1
  470. package/dist/web-ui/_app/immutable/chunks/DAx07bEQ.js +0 -1
  471. package/dist/web-ui/_app/immutable/chunks/DOno4cA2.js +0 -1
  472. package/dist/web-ui/_app/immutable/chunks/DQA8NZIH.js +0 -2
  473. package/dist/web-ui/_app/immutable/chunks/DRfPm2bo.js +0 -1
  474. package/dist/web-ui/_app/immutable/chunks/DhQhksaB.js +0 -1
  475. package/dist/web-ui/_app/immutable/chunks/DjG7s6hm.js +0 -1
  476. package/dist/web-ui/_app/immutable/chunks/DkltRNvh.js +0 -1
  477. package/dist/web-ui/_app/immutable/chunks/DlaTnPKL.js +0 -1
  478. package/dist/web-ui/_app/immutable/chunks/ExCq5swK.js +0 -1
  479. package/dist/web-ui/_app/immutable/chunks/T3zZGv51.js +0 -1
  480. package/dist/web-ui/_app/immutable/chunks/XZumBYeP.js +0 -1
  481. package/dist/web-ui/_app/immutable/chunks/_ySfNjkF.js +0 -1
  482. package/dist/web-ui/_app/immutable/chunks/iEtR5cV6.js +0 -1
  483. package/dist/web-ui/_app/immutable/entry/app.Cgu6uKeS.js +0 -2
  484. package/dist/web-ui/_app/immutable/entry/start.9XifnLoB.js +0 -1
  485. package/dist/web-ui/_app/immutable/nodes/0.DISwcKSK.js +0 -1
  486. package/dist/web-ui/_app/immutable/nodes/1.Cx2Ufqp1.js +0 -1
  487. package/dist/web-ui/_app/immutable/nodes/10.C3z8ijXL.js +0 -1
  488. package/dist/web-ui/_app/immutable/nodes/11.DZdIjZmM.js +0 -1
  489. package/dist/web-ui/_app/immutable/nodes/12.FsIGfAOa.js +0 -1
  490. package/dist/web-ui/_app/immutable/nodes/13.DZoFwagf.js +0 -1
  491. package/dist/web-ui/_app/immutable/nodes/14.DaIzDKbQ.js +0 -1
  492. package/dist/web-ui/_app/immutable/nodes/15.BYyt4XWF.js +0 -2
  493. package/dist/web-ui/_app/immutable/nodes/16.CQkSqpOe.js +0 -1
  494. package/dist/web-ui/_app/immutable/nodes/2.Bkf_j2UJ.js +0 -1
  495. package/dist/web-ui/_app/immutable/nodes/3.kaMCurJG.js +0 -1
  496. package/dist/web-ui/_app/immutable/nodes/4.BSsFPTHG.js +0 -2
  497. package/dist/web-ui/_app/immutable/nodes/5.CpPlcCEZ.js +0 -1
  498. package/dist/web-ui/_app/immutable/nodes/6.BN4FqQmY.js +0 -1
  499. package/dist/web-ui/_app/immutable/nodes/7.9kBYIZik.js +0 -1
  500. package/dist/web-ui/_app/immutable/nodes/8.BuijtZ6B.js +0 -1
  501. package/dist/web-ui/_app/immutable/nodes/9.C-Weba8R.js +0 -1
@@ -0,0 +1 @@
1
+ import{f,a as i}from"./y4GeEH6k.js";import{p as m,c as n,e as p,r as c,a as d}from"./CaAJD3dl.js";import{m as v,o as h,l as u}from"./Dd5umPsk.js";import{p as _,r as g,b as x}from"./Dg_zDpDS.js";var b=f("<div><!></div>");function P(o,s){m(s,!0);let r=_(s,"ref",15,null),t=g(s,["$$slots","$$events","$$legacy","ref","class","children"]);var e=b();v(e,a=>({"data-slot":"dialog-footer",class:a,...t}),[()=>h("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",s.class)]);var l=n(e);u(l,()=>s.children??p),c(e),x(e,a=>r(a),()=>r()),i(o,e),d()}export{P as D};
@@ -0,0 +1 @@
1
+ import{c as n,a as m}from"./y4GeEH6k.js";import{p as i,f as d,e as l,a as c}from"./CaAJD3dl.js";import{l as f}from"./Dd5umPsk.js";import{s as h,r as u}from"./Dg_zDpDS.js";import{I as $}from"./C5_PAZ0y.js";function x(a,o){i(o,!0);let s=u(o,["$$slots","$$events","$$legacy"]);const e=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"}]];$(a,h({name:"folder"},()=>s,{get iconNode(){return e},children:(t,v)=>{var r=n(),p=d(r);f(p,()=>o.children??l),m(t,r)},$$slots:{default:!0}})),c()}export{x as F};
@@ -1 +1 @@
1
- import{c as i,a as n}from"./DvA-KON-.js";import"./BUZujXJ2.js";import{f as p}from"./D3vxvonu.js";import{I as l,s as m}from"./BHtYorjv.js";import{l as d,s as f}from"./BysXJlZb.js";function y(s,r){const t=d(r,["children","$$slots","$$events","$$legacy"]);const e=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}],["path",{d:"M12 17h.01"}]];l(s,f({name:"circle-question-mark"},()=>t,{get iconNode(){return e},children:(a,$)=>{var o=i(),c=p(o);m(c,r,"default",{}),n(a,o)},$$slots:{default:!0}}))}export{y as C};
1
+ import{c as i,a as n}from"./y4GeEH6k.js";import"./DxJw79Wi.js";import{f as p}from"./CaAJD3dl.js";import{I as l,s as m}from"./DLd2uVIA.js";import{l as d,s as f}from"./Dg_zDpDS.js";function y(s,r){const t=d(r,["children","$$slots","$$events","$$legacy"]);const e=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}],["path",{d:"M12 17h.01"}]];l(s,f({name:"circle-question-mark"},()=>t,{get iconNode(){return e},children:(a,$)=>{var o=i(),c=p(o);m(c,r,"default",{}),n(a,o)},$$slots:{default:!0}}))}export{y as C};
@@ -1 +1 @@
1
- import{br as ke,b as A,g as T,e as I,m as Z,bs as ht}from"./D3vxvonu.js";import{a as pt,b as x}from"./D7LTux4W.js";import{o as Ne}from"./CwELQvbx.js";class Ee{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Se{constructor(t,n){this.status=t,this.location=n}}class Re extends Error{constructor(t,n,a){super(a),this.status=t,this.text=n}}new URL("sveltekit-internal://");function gt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function mt(e){return e.split("%25").map(decodeURI).join("%25")}function _t(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function he({href:e}){return e.split("#")[0]}function wt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let a=n.length;for(;a;)t=t*33^n.charCodeAt(--a)}else if(ArrayBuffer.isView(n)){const a=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let r=a.length;for(;r;)t=t*33^a[--r]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function vt(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n}const yt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&F.delete(xe(e)),yt(e,t));const F=new Map;function bt(e,t){const n=xe(e,t),a=document.querySelector(n);if(a?.textContent){a.remove();let{body:r,...s}=JSON.parse(a.textContent);const o=a.getAttribute("data-ttl");return o&&F.set(n,{body:r,init:s,ttl:1e3*Number(o)}),a.getAttribute("data-b64")!==null&&(r=vt(r)),Promise.resolve(new Response(r,s))}return window.fetch(e,t)}function kt(e,t,n){if(F.size>0){const a=xe(e,n),r=F.get(a);if(r){if(performance.now()<r.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(r.body,r.init);F.delete(a)}}return window.fetch(t,n)}function xe(e,t){let a=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const r=[];t.headers&&r.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&r.push(t.body),a+=`[data-hash="${wt(...r)}"]`}return a}const Et=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function St(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${xt(e).map(a=>{const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(r)return t.push({name:r[1],matcher:r[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const o=a.split(/\[(.+?)\](?!\])/);return"/"+o.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return pe(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return pe(String.fromCharCode(...c.slice(2).split("-").map(_=>parseInt(_,16))));const f=Et.exec(c),[,h,w,u,g]=f;return t.push({name:u,matcher:g,optional:!!h,rest:!!w,chained:w?l===1&&o[0]==="":!1}),w?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return pe(c)}).join("")}).join("")}/?$`),params:t}}function Rt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function xt(e){return e.slice(1).split("/").filter(Rt)}function Lt(e,t,n){const a={},r=e.slice(1),s=r.filter(i=>i!==void 0);let o=0;for(let i=0;i<t.length;i+=1){const c=t[i];let l=r[i-o];if(c.chained&&c.rest&&o&&(l=r.slice(i-o,i+1).filter(f=>f).join("/"),o=0),l===void 0){c.rest&&(a[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){a[c.name]=l;const f=t[i+1],h=r[i+1];f&&!f.rest&&f.optional&&h&&c.chained&&(o=0),!f&&!h&&Object.keys(a).length===s.length&&(o=0);continue}if(c.optional&&c.chained){o++;continue}return}if(!o)return a}function pe(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ut({nodes:e,server_loads:t,dictionary:n,matchers:a}){const r=new Set(t);return Object.entries(n).map(([i,[c,l,f]])=>{const{pattern:h,params:w}=St(i),u={id:i,exec:g=>{const _=h.exec(g);if(_)return Lt(_,w,a)},errors:[1,...f||[]].map(g=>e[g]),layouts:[0,...l||[]].map(o),leaf:s(c)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function s(i){const c=i<0;return c&&(i=~i),[c,e[i]]}function o(i){return i===void 0?i:[r.has(i),e[i]]}}function Ge(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function De(e,t,n=JSON.stringify){const a=n(t);try{sessionStorage[e]=a}catch{}}const At="1772928360048",We="sveltekit:snapshot",Ye="sveltekit:scroll",ze="sveltekit:states",Tt="sveltekit:pageurl",B="sveltekit:history",W="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ce=location.origin;function Le(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function le(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const qe={...j,"":j.hover};function He(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Je(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=He(e)}}function _e(e,t,n){let a;try{if(a=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&a.hash.match(/^#[^/]/)){const i=location.hash.split("#")[1]||"/";a.hash=`#${i}${a.hash}`}}catch{}const r=e instanceof SVGAElement?e.target.baseVal:e.target,s=!a||!!r||ue(a,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=a?.origin===ce&&e.hasAttribute("download");return{url:a,external:s,target:r,download:o}}function ee(e){let t=null,n=null,a=null,r=null,s=null,o=null,i=e;for(;i&&i!==document.documentElement;)a===null&&(a=V(i,"preload-code")),r===null&&(r=V(i,"preload-data")),t===null&&(t=V(i,"keepfocus")),n===null&&(n=V(i,"noscroll")),s===null&&(s=V(i,"reload")),o===null&&(o=V(i,"replacestate")),i=He(i);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:qe[a??"off"],preload_data:qe[r??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(o)}}function Ve(e){const t=ke(e);let n=!0;function a(){n=!0,t.update(o=>o)}function r(o){n=!1,t.set(o)}function s(o){let i;return t.subscribe(c=>{(i===void 0||n&&c!==i)&&o(i=c)})}return{notify:a,set:r,subscribe:s}}const Xe={v:()=>{}};function It(){const{set:e,subscribe:t}=ke(!1);let n;async function a(){clearTimeout(n);try{const r=await fetch(`${pt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const o=(await r.json()).version!==At;return o&&(e(!0),Xe.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:t,check:a}}function ue(e,t,n){return e.origin!==ce||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function on(e){}const Qe=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...Qe];const Ot=new Set([...Qe]);[...Ot];function Pt(e){return e.filter(t=>t!=null)}function Ue(e){return e instanceof Ee||e instanceof Re?e.status:500}function Ct(e){return e instanceof Re?e.text:"Internal Error"}let k,Y,ge;const $t=Ne.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ne.toString());$t?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},Y={current:null},ge={current:!1}):(k=new class{#e=A({});get data(){return T(this.#e)}set data(t){I(this.#e,t)}#t=A(null);get form(){return T(this.#t)}set form(t){I(this.#t,t)}#n=A(null);get error(){return T(this.#n)}set error(t){I(this.#n,t)}#a=A({});get params(){return T(this.#a)}set params(t){I(this.#a,t)}#r=A({id:null});get route(){return T(this.#r)}set route(t){I(this.#r,t)}#o=A({});get state(){return T(this.#o)}set state(t){I(this.#o,t)}#s=A(-1);get status(){return T(this.#s)}set status(t){I(this.#s,t)}#i=A(new URL("https://example.com"));get url(){return T(this.#i)}set url(t){I(this.#i,t)}},Y=new class{#e=A(null);get current(){return T(this.#e)}set current(t){I(this.#e,t)}},ge=new class{#e=A(!1);get current(){return T(this.#e)}set current(t){I(this.#e,t)}},Xe.v=()=>ge.current=!0);function jt(e){Object.assign(k,e)}const Nt=new Set(["icon","shortcut icon","apple-touch-icon"]),D=Ge(Ye)??{},z=Ge(We)??{},$={url:Ve({}),page:Ve({}),navigating:ke(null),updated:It()};function Ae(e){D[e]=le()}function Dt(e,t){let n=e+1;for(;D[n];)delete D[n],n+=1;for(n=t+1;z[n];)delete z[n],n+=1}function H(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function Ze(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function Be(){}let Te,we,te,O,ve,v;const ne=[],ae=[];let L=null;function ye(){L?.fork?.then(e=>e?.discard()),L=null}const Q=new Map,et=new Set,qt=new Set,G=new Set;let m={branch:[],error:null,url:null},tt=!1,re=!1,Ke=!0,J=!1,M=!1,nt=!1,Ie=!1,at,y,R,N;const oe=new Set,Me=new Map;async function un(e,t,n){globalThis.__sveltekit_1t47v30?.data&&globalThis.__sveltekit_1t47v30.data,document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Te=Ut(e),O=document.documentElement,ve=t,we=e.nodes[0],te=e.nodes[1],we(),te(),y=history.state?.[B],R=history.state?.[W],y||(y=R=Date.now(),history.replaceState({...history.state,[B]:y,[W]:R},""));const a=D[y];function r(){a&&(history.scrollRestoration="manual",scrollTo(a.x,a.y))}n?(r(),await Qt(ve,n)):(await K({type:"enter",url:Le(v.hash?tn(new URL(location.href)):location.href),replace_state:!0}),r()),Xt()}function Vt(){ne.length=0,Ie=!1}function rt(e){ae.some(t=>t?.snapshot)&&(z[e]=ae.map(t=>t?.snapshot?.capture()))}function ot(e){z[e]?.forEach((t,n)=>{ae[n]?.snapshot?.restore(t)})}function Fe(){Ae(y),De(Ye,D),rt(R),De(We,z)}async function st(e,t,n,a){let r;t.invalidateAll&&ye(),await K({type:"goto",url:Le(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:a,accept:()=>{t.invalidateAll&&(Ie=!0,r=[...Me.keys()]),t.invalidate&&t.invalidate.forEach(Jt)}}),t.invalidateAll&&Z().then(Z).then(()=>{Me.forEach(({resource:s},o)=>{r?.includes(o)&&s.refresh?.()})})}async function Bt(e){if(e.id!==L?.id){ye();const t={};oe.add(t),L={id:e.id,token:t,promise:ct({...e,preload:t}).then(n=>(oe.delete(t),n.type==="loaded"&&n.state.error&&ye(),n)),fork:null}}return L.promise}async function me(e){const t=(await fe(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}async function it(e,t,n){m=e.state;const a=document.querySelector("style[data-sveltekit]");if(a&&a.remove(),Object.assign(k,e.props.page),at=new v.root({target:t,props:{...e.props,stores:$,components:ae},hydrate:n,sync:!1}),await Promise.resolve(),ot(R),n){const r={from:null,to:{params:m.params,route:{id:m.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};G.forEach(s=>s(r))}re=!0}function se({url:e,params:t,branch:n,status:a,error:r,route:s,form:o}){let i="never";if(x&&(e.pathname===x||e.pathname===x+"/"))i="always";else for(const u of n)u?.slash!==void 0&&(i=u.slash);e.pathname=gt(e.pathname,i),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:r,route:s},props:{constructors:Pt(n).map(u=>u.node.component),page:je(k)}};o!==void 0&&(c.props.form=o);let l={},f=!k,h=0;for(let u=0;u<Math.max(n.length,m.branch.length);u+=1){const g=n[u],_=m.branch[u];g?.data!==_?.data&&(f=!0),g&&(l={...l,...g.data},f&&(c.props[`data_${h}`]=l),h+=1)}return(!m.url||e.href!==m.url.href||m.error!==r||o!==void 0&&o!==k.form||f)&&(c.props.page={error:r,params:t,route:{id:s?.id??null},state:{},status:a,url:new URL(e),form:o??null,data:f?l:k.data}),c}async function Oe({loader:e,parent:t,url:n,params:a,route:r,server_data_node:s}){let o=null;const i={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();return{node:c,loader:e,server:s,universal:c.universal?.load?{type:"data",data:o,uses:i}:null,data:o??s?.data??null,slash:c.universal?.trailingSlash??s?.slash}}function Kt(e,t,n){let a=e instanceof Request?e.url:e;const r=new URL(a,n);r.origin===n.origin&&(a=r.href.slice(n.origin.length));const s=re?kt(a,r.href,t):bt(a,t);return{resolved:r,promise:s}}function Mt(e,t,n,a,r,s){if(Ie)return!0;if(!r)return!1;if(r.parent&&e||r.route&&t||r.url&&n)return!0;for(const o of r.search_params)if(a.has(o))return!0;for(const o of r.params)if(s[o]!==m.params[o])return!0;for(const o of r.dependencies)if(ne.some(i=>i(new URL(o))))return!0;return!1}function Pe(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Ft(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const a of n){const r=e.searchParams.getAll(a),s=t.searchParams.getAll(a);r.every(o=>s.includes(o))&&s.every(o=>r.includes(o))&&n.delete(a)}return n}function Gt({error:e,url:t,route:n,params:a}){return{type:"loaded",state:{error:e,url:t,route:n,params:a,branch:[]},props:{page:je(k),constructors:[]}}}async function ct({id:e,invalidating:t,url:n,params:a,route:r,preload:s}){if(L?.id===e)return oe.delete(L.token),L.promise;const{errors:o,layouts:i,leaf:c}=r,l=[...i,c];o.forEach(p=>p?.().catch(()=>{})),l.forEach(p=>p?.[1]().catch(()=>{}));const f=m.url?e!==ie(m.url):!1,h=m.route?r.id!==m.route.id:!1,w=Ft(m.url,n);let u=!1;const g=l.map(async(p,d)=>{if(!p)return;const E=m.branch[d];return p[1]===E?.loader&&!Mt(u,h,f,w,E.universal?.uses,a)?E:(u=!0,Oe({loader:p[1],url:n,params:a,route:r,parent:async()=>{const P={};for(let U=0;U<d;U+=1)Object.assign(P,(await g[U])?.data);return P},server_data_node:Pe(p[0]?{type:"skip"}:null,p[0]?E?.server:void 0)}))});for(const p of g)p.catch(()=>{});const _=[];for(let p=0;p<l.length;p+=1)if(l[p])try{_.push(await g[p])}catch(d){if(d instanceof Se)return{type:"redirect",location:d.location};if(oe.has(s))return Gt({error:await X(d,{params:a,url:n,route:{id:r.id}}),url:n,params:a,route:r});let E=Ue(d),S;if(d instanceof Ee)S=d.body;else{if(await $.updated.check())return await Ze(),await H(n);S=await X(d,{params:a,url:n,route:{id:r.id}})}const P=await Wt(p,_,o);return P?se({url:n,params:a,branch:_.slice(0,P.idx).concat(P.node),status:E,error:S,route:r}):await ut(n,{id:r.id},S,E)}else _.push(void 0);return se({url:n,params:a,branch:_,status:200,error:null,route:r,form:t?void 0:null})}async function Wt(e,t,n){for(;e--;)if(n[e]){let a=e;for(;!t[a];)a-=1;try{return{idx:a+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Ce({status:e,error:t,url:n,route:a}){const r={};let s=null;try{const o=await Oe({loader:we,url:n,params:r,route:a,parent:()=>Promise.resolve({}),server_data_node:Pe(s)}),i={node:await te(),loader:te,universal:null,server:null,data:null};return se({url:n,params:r,branch:[o,i],status:e,error:t,route:null})}catch(o){if(o instanceof Se)return st(new URL(o.location,location.href),{},0);throw o}}async function Yt(e){const t=e.href;if(Q.has(t))return Q.get(t);let n;try{const a=(async()=>{let r=await v.hooks.reroute({url:new URL(e),fetch:async(s,o)=>Kt(s,o,e).promise})??e;if(typeof r=="string"){const s=new URL(e);v.hash?s.hash=r:s.pathname=r,r=s}return r})();Q.set(t,a),n=await a}catch{Q.delete(t);return}return n}async function fe(e,t){if(e&&!ue(e,x,v.hash)){const n=await Yt(e);if(!n)return;const a=zt(n);for(const r of Te){const s=r.exec(a);if(s)return{id:ie(e),invalidating:t,route:r,params:_t(s),url:e}}}}function zt(e){return mt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function ie(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function lt({url:e,type:t,intent:n,delta:a,event:r}){let s=!1;const o=$e(m,n,e,t);a!==void 0&&(o.navigation.delta=a),r!==void 0&&(o.navigation.event=r);const i={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return J||et.forEach(c=>c(i)),s?null:o}async function K({type:e,url:t,popped:n,keepfocus:a,noscroll:r,replace_state:s,state:o={},redirect_count:i=0,nav_token:c={},accept:l=Be,block:f=Be,event:h}){const w=N;N=c;const u=await fe(t,!1),g=e==="enter"?$e(m,u,t,e):lt({url:t,type:e,delta:n?.delta,intent:u,event:h});if(!g){f(),N===c&&(N=w);return}const _=y,p=R;l(),J=!0,re&&g.navigation.type!=="enter"&&$.navigating.set(Y.current=g.navigation);let d=u&&await ct(u);if(!d){if(ue(t,x,v.hash))return await H(t,s);d=await ut(t,{id:null},await X(new Re(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,s)}if(t=u?.url||t,N!==c)return g.reject(new Error("navigation aborted")),!1;if(d.type==="redirect"){if(i<20){await K({type:e,url:new URL(d.location,t),popped:n,keepfocus:a,noscroll:r,replace_state:s,state:o,redirect_count:i+1,nav_token:c}),g.fulfil(void 0);return}d=await Ce({status:500,error:await X(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else d.props.page.status>=400&&await $.updated.check()&&(await Ze(),await H(t,s));if(Vt(),Ae(_),rt(p),d.props.page.url.pathname!==t.pathname&&(t.pathname=d.props.page.url.pathname),o=n?n.state:o,!n){const b=s?0:1,q={[B]:y+=b,[W]:R+=b,[ze]:o};(s?history.replaceState:history.pushState).call(history,q,"",t),s||Dt(y,R)}const E=u&&L?.id===u.id?L.fork:null;L=null,d.props.page.state=o;let S;if(re){const b=(await Promise.all(Array.from(qt,C=>C(g.navigation)))).filter(C=>typeof C=="function");if(b.length>0){let C=function(){b.forEach(de=>{G.delete(de)})};b.push(C),b.forEach(de=>{G.add(de)})}m=d.state,d.props.page&&(d.props.page.url=t);const q=E&&await E;q?S=q.commit():(at.$set(d.props),jt(d.props.page),S=ht?.()),nt=!0}else await it(d,ve,!1);const{activeElement:P}=document;await S,await Z(),await Z();let U=n?n.scroll:r?le():null;if(Ke){const b=t.hash&&document.getElementById(ft(t));if(U)scrollTo(U.x,U.y);else if(b){b.scrollIntoView();const{top:q,left:C}=b.getBoundingClientRect();U={x:pageXOffset+C,y:pageYOffset+q}}else scrollTo(0,0)}const dt=document.activeElement!==P&&document.activeElement!==document.body;!a&&!dt&&en(t,U),Ke=!0,d.props.page&&Object.assign(k,d.props.page),J=!1,e==="popstate"&&ot(R),g.fulfil(void 0),G.forEach(b=>b(g.navigation)),$.navigating.set(Y.current=null)}async function ut(e,t,n,a,r){return e.origin===ce&&e.pathname===location.pathname&&!tt?await Ce({status:a,error:n,url:e,route:t}):await H(e,r)}function Ht(){let e,t={element:void 0,href:void 0},n;O.addEventListener("mousemove",i=>{const c=i.target;clearTimeout(e),e=setTimeout(()=>{s(c,j.hover)},20)});function a(i){i.defaultPrevented||s(i.composedPath()[0],j.tap)}O.addEventListener("mousedown",a),O.addEventListener("touchstart",a,{passive:!0});const r=new IntersectionObserver(i=>{for(const c of i)c.isIntersecting&&(me(new URL(c.target.href)),r.unobserve(c.target))},{threshold:0});async function s(i,c){const l=Je(i,O),f=l===t.element&&l?.href===t.href&&c>=n;if(!l||f)return;const{url:h,external:w,download:u}=_e(l,x,v.hash);if(w||u)return;const g=ee(l),_=h&&ie(m.url)===ie(h);if(!(g.reload||_))if(c<=g.preload_data){t={element:l,href:l.href},n=j.tap;const p=await fe(h,!1);if(!p)return;Bt(p)}else c<=g.preload_code&&(t={element:l,href:l.href},n=c,me(h))}function o(){r.disconnect();for(const i of O.querySelectorAll("a")){const{url:c,external:l,download:f}=_e(i,x,v.hash);if(l||f)continue;const h=ee(i);h.reload||(h.preload_code===j.viewport&&r.observe(i),h.preload_code===j.eager&&me(c))}}G.add(o),o()}function X(e,t){if(e instanceof Ee)return e.body;const n=Ue(e),a=Ct(e);return v.hooks.handleError({error:e,event:t,status:n,message:a})??{message:a}}function fn(e,t={}){return e=new URL(Le(e)),e.origin!==ce?Promise.reject(new Error("goto: invalid URL")):st(e,t,0)}function Jt(e){if(typeof e=="function")ne.push(e);else{const{href:t}=new URL(e,location.href);ne.push(n=>n.href===t)}}function Xt(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Fe(),!J){const a=$e(m,void 0,null,"leave"),r={...a.navigation,cancel:()=>{n=!0,a.reject(new Error("navigation cancelled"))}};et.forEach(s=>s(r))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Fe()}),navigator.connection?.saveData||Ht(),O.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Je(t.composedPath()[0],O);if(!n)return;const{url:a,external:r,target:s,download:o}=_e(n,x,v.hash);if(!a)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const i=ee(n);if(!(n instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[l,f]=(v.hash?a.hash.replace(/^#/,""):a.href).split("#"),h=l===he(location);if(r||i.reload&&(!h||!f)){lt({url:a,type:"link",event:t})?J=!0:t.preventDefault();return}if(f!==void 0&&h){const[,w]=m.url.href.split("#");if(w===f){if(t.preventDefault(),f===""||f==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=n.ownerDocument.getElementById(decodeURIComponent(f));u&&(u.scrollIntoView(),u.focus())}return}if(M=!0,Ae(y),e(a),!i.replace_state)return;M=!1}t.preventDefault(),await new Promise(w=>{requestAnimationFrame(()=>{setTimeout(w,0)}),setTimeout(w,100)}),await K({type:"link",url:a,keepfocus:i.keepfocus,noscroll:i.noscroll,replace_state:i.replace_state??a.href===location.href,event:t})}),O.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),a=t.submitter;if((a?.formTarget||n.target)==="_blank"||(a?.formMethod||n.method)!=="get")return;const o=new URL(a?.hasAttribute("formaction")&&a?.formAction||n.action);if(ue(o,x,!1))return;const i=t.target,c=ee(i);if(c.reload)return;t.preventDefault(),t.stopPropagation();const l=new FormData(i,a);o.search=new URLSearchParams(l).toString(),K({type:"form",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!be){if(t.state?.[B]){const n=t.state[B];if(N={},n===y)return;const a=D[n],r=t.state[ze]??{},s=new URL(t.state[Tt]??location.href),o=t.state[W],i=m.url?he(location)===he(m.url):!1;if(o===R&&(nt||i)){r!==k.state&&(k.state=r),e(s),D[y]=le(),a&&scrollTo(a.x,a.y),y=n;return}const l=n-y;await K({type:"popstate",url:s,popped:{state:r,scroll:a,delta:l},accept:()=>{y=n,R=o},block:()=>{history.go(-l)},nav_token:N,event:t})}else if(!M){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{M&&(M=!1,history.replaceState({...history.state,[B]:++y,[W]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Nt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(Y.current=null)});function e(t){m.url=k.url=t,$.page.set(je(k)),$.page.notify()}}async function Qt(e,{status:t=200,error:n,node_ids:a,params:r,route:s,server_route:o,data:i,form:c}){tt=!0;const l=new URL(location.href);let f;({params:r={},route:s={id:null}}=await fe(l,!1)||{}),f=Te.find(({id:u})=>u===s.id);let h,w=!0;try{const u=a.map(async(_,p)=>{const d=i[p];return d?.uses&&(d.uses=Zt(d.uses)),Oe({loader:v.nodes[_],url:l,params:r,route:s,parent:async()=>{const E={};for(let S=0;S<p;S+=1)Object.assign(E,(await u[S]).data);return E},server_data_node:Pe(d)})}),g=await Promise.all(u);if(f){const _=f.layouts;for(let p=0;p<_.length;p++)_[p]||g.splice(p,0,void 0)}h=se({url:l,params:r,branch:g,status:t,error:n,form:c,route:f??null})}catch(u){if(u instanceof Se){await H(new URL(u.location,location.href));return}h=await Ce({status:Ue(u),error:await X(u,{url:l,params:r,route:s}),url:l,route:s}),e.textContent="",w=!1}h.props.page&&(h.props.page.state={}),await it(h,e,w)}function Zt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let be=!1;function en(e,t=null){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const a=ft(e);if(a&&document.getElementById(a)){const{x:s,y:o}=t??le();setTimeout(()=>{const i=history.state;be=!0,location.replace(`#${a}`),v.hash&&location.replace(e.hash),history.replaceState(i,"",e.hash),scrollTo(s,o),be=!1})}else{const s=document.body,o=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),o!==null?s.setAttribute("tabindex",o):s.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const s=[];for(let o=0;o<r.rangeCount;o+=1)s.push(r.getRangeAt(o));setTimeout(()=>{if(r.rangeCount===s.length){for(let o=0;o<r.rangeCount;o+=1){const i=s[o],c=r.getRangeAt(o);if(i.commonAncestorContainer!==c.commonAncestorContainer||i.startContainer!==c.startContainer||i.endContainer!==c.endContainer||i.startOffset!==c.startOffset||i.endOffset!==c.endOffset)return}r.removeAllRanges()}})}}}function $e(e,t,n,a){let r,s;const o=new Promise((c,l)=>{r=c,s=l});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n},willUnload:!t,type:a,complete:o},fulfil:r,reject:s}}function je(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function tn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function ft(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{un as a,fn as g,on as l,k as p,$ as s};
1
+ import{br as ke,b as A,g as T,d as I,j as Z,bs as ht}from"./CaAJD3dl.js";import{a as pt,b as x}from"./CDRO15Iv.js";import{o as Ne}from"./oTsvd9y4.js";class Ee{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Se{constructor(t,n){this.status=t,this.location=n}}class Re extends Error{constructor(t,n,a){super(a),this.status=t,this.text=n}}new URL("sveltekit-internal://");function gt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function mt(e){return e.split("%25").map(decodeURI).join("%25")}function _t(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function he({href:e}){return e.split("#")[0]}function wt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let a=n.length;for(;a;)t=t*33^n.charCodeAt(--a)}else if(ArrayBuffer.isView(n)){const a=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let r=a.length;for(;r;)t=t*33^a[--r]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function vt(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n}const yt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&F.delete(xe(e)),yt(e,t));const F=new Map;function bt(e,t){const n=xe(e,t),a=document.querySelector(n);if(a?.textContent){a.remove();let{body:r,...s}=JSON.parse(a.textContent);const o=a.getAttribute("data-ttl");return o&&F.set(n,{body:r,init:s,ttl:1e3*Number(o)}),a.getAttribute("data-b64")!==null&&(r=vt(r)),Promise.resolve(new Response(r,s))}return window.fetch(e,t)}function kt(e,t,n){if(F.size>0){const a=xe(e,n),r=F.get(a);if(r){if(performance.now()<r.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(r.body,r.init);F.delete(a)}}return window.fetch(t,n)}function xe(e,t){let a=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const r=[];t.headers&&r.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&r.push(t.body),a+=`[data-hash="${wt(...r)}"]`}return a}const Et=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function St(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${xt(e).map(a=>{const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(r)return t.push({name:r[1],matcher:r[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const o=a.split(/\[(.+?)\](?!\])/);return"/"+o.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return pe(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return pe(String.fromCharCode(...c.slice(2).split("-").map(_=>parseInt(_,16))));const f=Et.exec(c),[,h,w,u,g]=f;return t.push({name:u,matcher:g,optional:!!h,rest:!!w,chained:w?l===1&&o[0]==="":!1}),w?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return pe(c)}).join("")}).join("")}/?$`),params:t}}function Rt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function xt(e){return e.slice(1).split("/").filter(Rt)}function Lt(e,t,n){const a={},r=e.slice(1),s=r.filter(i=>i!==void 0);let o=0;for(let i=0;i<t.length;i+=1){const c=t[i];let l=r[i-o];if(c.chained&&c.rest&&o&&(l=r.slice(i-o,i+1).filter(f=>f).join("/"),o=0),l===void 0){c.rest&&(a[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){a[c.name]=l;const f=t[i+1],h=r[i+1];f&&!f.rest&&f.optional&&h&&c.chained&&(o=0),!f&&!h&&Object.keys(a).length===s.length&&(o=0);continue}if(c.optional&&c.chained){o++;continue}return}if(!o)return a}function pe(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ut({nodes:e,server_loads:t,dictionary:n,matchers:a}){const r=new Set(t);return Object.entries(n).map(([i,[c,l,f]])=>{const{pattern:h,params:w}=St(i),u={id:i,exec:g=>{const _=h.exec(g);if(_)return Lt(_,w,a)},errors:[1,...f||[]].map(g=>e[g]),layouts:[0,...l||[]].map(o),leaf:s(c)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function s(i){const c=i<0;return c&&(i=~i),[c,e[i]]}function o(i){return i===void 0?i:[r.has(i),e[i]]}}function Ge(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function De(e,t,n=JSON.stringify){const a=n(t);try{sessionStorage[e]=a}catch{}}const At="1773739681176",We="sveltekit:snapshot",Ye="sveltekit:scroll",ze="sveltekit:states",Tt="sveltekit:pageurl",B="sveltekit:history",W="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ce=location.origin;function Le(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function le(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const qe={...j,"":j.hover};function He(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Je(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=He(e)}}function _e(e,t,n){let a;try{if(a=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&a.hash.match(/^#[^/]/)){const i=location.hash.split("#")[1]||"/";a.hash=`#${i}${a.hash}`}}catch{}const r=e instanceof SVGAElement?e.target.baseVal:e.target,s=!a||!!r||ue(a,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=a?.origin===ce&&e.hasAttribute("download");return{url:a,external:s,target:r,download:o}}function ee(e){let t=null,n=null,a=null,r=null,s=null,o=null,i=e;for(;i&&i!==document.documentElement;)a===null&&(a=V(i,"preload-code")),r===null&&(r=V(i,"preload-data")),t===null&&(t=V(i,"keepfocus")),n===null&&(n=V(i,"noscroll")),s===null&&(s=V(i,"reload")),o===null&&(o=V(i,"replacestate")),i=He(i);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:qe[a??"off"],preload_data:qe[r??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(o)}}function Ve(e){const t=ke(e);let n=!0;function a(){n=!0,t.update(o=>o)}function r(o){n=!1,t.set(o)}function s(o){let i;return t.subscribe(c=>{(i===void 0||n&&c!==i)&&o(i=c)})}return{notify:a,set:r,subscribe:s}}const Xe={v:()=>{}};function It(){const{set:e,subscribe:t}=ke(!1);let n;async function a(){clearTimeout(n);try{const r=await fetch(`${pt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const o=(await r.json()).version!==At;return o&&(e(!0),Xe.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:t,check:a}}function ue(e,t,n){return e.origin!==ce||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function on(e){}const Qe=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...Qe];const Ot=new Set([...Qe]);[...Ot];function Pt(e){return e.filter(t=>t!=null)}function Ue(e){return e instanceof Ee||e instanceof Re?e.status:500}function Ct(e){return e instanceof Re?e.text:"Internal Error"}let k,Y,ge;const $t=Ne.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ne.toString());$t?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},Y={current:null},ge={current:!1}):(k=new class{#e=A({});get data(){return T(this.#e)}set data(t){I(this.#e,t)}#t=A(null);get form(){return T(this.#t)}set form(t){I(this.#t,t)}#n=A(null);get error(){return T(this.#n)}set error(t){I(this.#n,t)}#a=A({});get params(){return T(this.#a)}set params(t){I(this.#a,t)}#r=A({id:null});get route(){return T(this.#r)}set route(t){I(this.#r,t)}#o=A({});get state(){return T(this.#o)}set state(t){I(this.#o,t)}#s=A(-1);get status(){return T(this.#s)}set status(t){I(this.#s,t)}#i=A(new URL("https://example.com"));get url(){return T(this.#i)}set url(t){I(this.#i,t)}},Y=new class{#e=A(null);get current(){return T(this.#e)}set current(t){I(this.#e,t)}},ge=new class{#e=A(!1);get current(){return T(this.#e)}set current(t){I(this.#e,t)}},Xe.v=()=>ge.current=!0);function jt(e){Object.assign(k,e)}const Nt=new Set(["icon","shortcut icon","apple-touch-icon"]),D=Ge(Ye)??{},z=Ge(We)??{},$={url:Ve({}),page:Ve({}),navigating:ke(null),updated:It()};function Ae(e){D[e]=le()}function Dt(e,t){let n=e+1;for(;D[n];)delete D[n],n+=1;for(n=t+1;z[n];)delete z[n],n+=1}function H(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function Ze(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function Be(){}let Te,we,te,O,ve,v;const ne=[],ae=[];let L=null;function ye(){L?.fork?.then(e=>e?.discard()),L=null}const Q=new Map,et=new Set,qt=new Set,G=new Set;let m={branch:[],error:null,url:null},tt=!1,re=!1,Ke=!0,J=!1,M=!1,nt=!1,Ie=!1,at,y,R,N;const oe=new Set,Me=new Map;async function un(e,t,n){globalThis.__sveltekit_1222h2t?.data&&globalThis.__sveltekit_1222h2t.data,document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Te=Ut(e),O=document.documentElement,ve=t,we=e.nodes[0],te=e.nodes[1],we(),te(),y=history.state?.[B],R=history.state?.[W],y||(y=R=Date.now(),history.replaceState({...history.state,[B]:y,[W]:R},""));const a=D[y];function r(){a&&(history.scrollRestoration="manual",scrollTo(a.x,a.y))}n?(r(),await Qt(ve,n)):(await K({type:"enter",url:Le(v.hash?tn(new URL(location.href)):location.href),replace_state:!0}),r()),Xt()}function Vt(){ne.length=0,Ie=!1}function rt(e){ae.some(t=>t?.snapshot)&&(z[e]=ae.map(t=>t?.snapshot?.capture()))}function ot(e){z[e]?.forEach((t,n)=>{ae[n]?.snapshot?.restore(t)})}function Fe(){Ae(y),De(Ye,D),rt(R),De(We,z)}async function st(e,t,n,a){let r;t.invalidateAll&&ye(),await K({type:"goto",url:Le(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:a,accept:()=>{t.invalidateAll&&(Ie=!0,r=[...Me.keys()]),t.invalidate&&t.invalidate.forEach(Jt)}}),t.invalidateAll&&Z().then(Z).then(()=>{Me.forEach(({resource:s},o)=>{r?.includes(o)&&s.refresh?.()})})}async function Bt(e){if(e.id!==L?.id){ye();const t={};oe.add(t),L={id:e.id,token:t,promise:ct({...e,preload:t}).then(n=>(oe.delete(t),n.type==="loaded"&&n.state.error&&ye(),n)),fork:null}}return L.promise}async function me(e){const t=(await fe(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}async function it(e,t,n){m=e.state;const a=document.querySelector("style[data-sveltekit]");if(a&&a.remove(),Object.assign(k,e.props.page),at=new v.root({target:t,props:{...e.props,stores:$,components:ae},hydrate:n,sync:!1}),await Promise.resolve(),ot(R),n){const r={from:null,to:{params:m.params,route:{id:m.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};G.forEach(s=>s(r))}re=!0}function se({url:e,params:t,branch:n,status:a,error:r,route:s,form:o}){let i="never";if(x&&(e.pathname===x||e.pathname===x+"/"))i="always";else for(const u of n)u?.slash!==void 0&&(i=u.slash);e.pathname=gt(e.pathname,i),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:r,route:s},props:{constructors:Pt(n).map(u=>u.node.component),page:je(k)}};o!==void 0&&(c.props.form=o);let l={},f=!k,h=0;for(let u=0;u<Math.max(n.length,m.branch.length);u+=1){const g=n[u],_=m.branch[u];g?.data!==_?.data&&(f=!0),g&&(l={...l,...g.data},f&&(c.props[`data_${h}`]=l),h+=1)}return(!m.url||e.href!==m.url.href||m.error!==r||o!==void 0&&o!==k.form||f)&&(c.props.page={error:r,params:t,route:{id:s?.id??null},state:{},status:a,url:new URL(e),form:o??null,data:f?l:k.data}),c}async function Oe({loader:e,parent:t,url:n,params:a,route:r,server_data_node:s}){let o=null;const i={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();return{node:c,loader:e,server:s,universal:c.universal?.load?{type:"data",data:o,uses:i}:null,data:o??s?.data??null,slash:c.universal?.trailingSlash??s?.slash}}function Kt(e,t,n){let a=e instanceof Request?e.url:e;const r=new URL(a,n);r.origin===n.origin&&(a=r.href.slice(n.origin.length));const s=re?kt(a,r.href,t):bt(a,t);return{resolved:r,promise:s}}function Mt(e,t,n,a,r,s){if(Ie)return!0;if(!r)return!1;if(r.parent&&e||r.route&&t||r.url&&n)return!0;for(const o of r.search_params)if(a.has(o))return!0;for(const o of r.params)if(s[o]!==m.params[o])return!0;for(const o of r.dependencies)if(ne.some(i=>i(new URL(o))))return!0;return!1}function Pe(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Ft(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const a of n){const r=e.searchParams.getAll(a),s=t.searchParams.getAll(a);r.every(o=>s.includes(o))&&s.every(o=>r.includes(o))&&n.delete(a)}return n}function Gt({error:e,url:t,route:n,params:a}){return{type:"loaded",state:{error:e,url:t,route:n,params:a,branch:[]},props:{page:je(k),constructors:[]}}}async function ct({id:e,invalidating:t,url:n,params:a,route:r,preload:s}){if(L?.id===e)return oe.delete(L.token),L.promise;const{errors:o,layouts:i,leaf:c}=r,l=[...i,c];o.forEach(p=>p?.().catch(()=>{})),l.forEach(p=>p?.[1]().catch(()=>{}));const f=m.url?e!==ie(m.url):!1,h=m.route?r.id!==m.route.id:!1,w=Ft(m.url,n);let u=!1;const g=l.map(async(p,d)=>{if(!p)return;const E=m.branch[d];return p[1]===E?.loader&&!Mt(u,h,f,w,E.universal?.uses,a)?E:(u=!0,Oe({loader:p[1],url:n,params:a,route:r,parent:async()=>{const P={};for(let U=0;U<d;U+=1)Object.assign(P,(await g[U])?.data);return P},server_data_node:Pe(p[0]?{type:"skip"}:null,p[0]?E?.server:void 0)}))});for(const p of g)p.catch(()=>{});const _=[];for(let p=0;p<l.length;p+=1)if(l[p])try{_.push(await g[p])}catch(d){if(d instanceof Se)return{type:"redirect",location:d.location};if(oe.has(s))return Gt({error:await X(d,{params:a,url:n,route:{id:r.id}}),url:n,params:a,route:r});let E=Ue(d),S;if(d instanceof Ee)S=d.body;else{if(await $.updated.check())return await Ze(),await H(n);S=await X(d,{params:a,url:n,route:{id:r.id}})}const P=await Wt(p,_,o);return P?se({url:n,params:a,branch:_.slice(0,P.idx).concat(P.node),status:E,error:S,route:r}):await ut(n,{id:r.id},S,E)}else _.push(void 0);return se({url:n,params:a,branch:_,status:200,error:null,route:r,form:t?void 0:null})}async function Wt(e,t,n){for(;e--;)if(n[e]){let a=e;for(;!t[a];)a-=1;try{return{idx:a+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Ce({status:e,error:t,url:n,route:a}){const r={};let s=null;try{const o=await Oe({loader:we,url:n,params:r,route:a,parent:()=>Promise.resolve({}),server_data_node:Pe(s)}),i={node:await te(),loader:te,universal:null,server:null,data:null};return se({url:n,params:r,branch:[o,i],status:e,error:t,route:null})}catch(o){if(o instanceof Se)return st(new URL(o.location,location.href),{},0);throw o}}async function Yt(e){const t=e.href;if(Q.has(t))return Q.get(t);let n;try{const a=(async()=>{let r=await v.hooks.reroute({url:new URL(e),fetch:async(s,o)=>Kt(s,o,e).promise})??e;if(typeof r=="string"){const s=new URL(e);v.hash?s.hash=r:s.pathname=r,r=s}return r})();Q.set(t,a),n=await a}catch{Q.delete(t);return}return n}async function fe(e,t){if(e&&!ue(e,x,v.hash)){const n=await Yt(e);if(!n)return;const a=zt(n);for(const r of Te){const s=r.exec(a);if(s)return{id:ie(e),invalidating:t,route:r,params:_t(s),url:e}}}}function zt(e){return mt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function ie(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function lt({url:e,type:t,intent:n,delta:a,event:r}){let s=!1;const o=$e(m,n,e,t);a!==void 0&&(o.navigation.delta=a),r!==void 0&&(o.navigation.event=r);const i={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return J||et.forEach(c=>c(i)),s?null:o}async function K({type:e,url:t,popped:n,keepfocus:a,noscroll:r,replace_state:s,state:o={},redirect_count:i=0,nav_token:c={},accept:l=Be,block:f=Be,event:h}){const w=N;N=c;const u=await fe(t,!1),g=e==="enter"?$e(m,u,t,e):lt({url:t,type:e,delta:n?.delta,intent:u,event:h});if(!g){f(),N===c&&(N=w);return}const _=y,p=R;l(),J=!0,re&&g.navigation.type!=="enter"&&$.navigating.set(Y.current=g.navigation);let d=u&&await ct(u);if(!d){if(ue(t,x,v.hash))return await H(t,s);d=await ut(t,{id:null},await X(new Re(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,s)}if(t=u?.url||t,N!==c)return g.reject(new Error("navigation aborted")),!1;if(d.type==="redirect"){if(i<20){await K({type:e,url:new URL(d.location,t),popped:n,keepfocus:a,noscroll:r,replace_state:s,state:o,redirect_count:i+1,nav_token:c}),g.fulfil(void 0);return}d=await Ce({status:500,error:await X(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else d.props.page.status>=400&&await $.updated.check()&&(await Ze(),await H(t,s));if(Vt(),Ae(_),rt(p),d.props.page.url.pathname!==t.pathname&&(t.pathname=d.props.page.url.pathname),o=n?n.state:o,!n){const b=s?0:1,q={[B]:y+=b,[W]:R+=b,[ze]:o};(s?history.replaceState:history.pushState).call(history,q,"",t),s||Dt(y,R)}const E=u&&L?.id===u.id?L.fork:null;L=null,d.props.page.state=o;let S;if(re){const b=(await Promise.all(Array.from(qt,C=>C(g.navigation)))).filter(C=>typeof C=="function");if(b.length>0){let C=function(){b.forEach(de=>{G.delete(de)})};b.push(C),b.forEach(de=>{G.add(de)})}m=d.state,d.props.page&&(d.props.page.url=t);const q=E&&await E;q?S=q.commit():(at.$set(d.props),jt(d.props.page),S=ht?.()),nt=!0}else await it(d,ve,!1);const{activeElement:P}=document;await S,await Z(),await Z();let U=n?n.scroll:r?le():null;if(Ke){const b=t.hash&&document.getElementById(ft(t));if(U)scrollTo(U.x,U.y);else if(b){b.scrollIntoView();const{top:q,left:C}=b.getBoundingClientRect();U={x:pageXOffset+C,y:pageYOffset+q}}else scrollTo(0,0)}const dt=document.activeElement!==P&&document.activeElement!==document.body;!a&&!dt&&en(t,U),Ke=!0,d.props.page&&Object.assign(k,d.props.page),J=!1,e==="popstate"&&ot(R),g.fulfil(void 0),G.forEach(b=>b(g.navigation)),$.navigating.set(Y.current=null)}async function ut(e,t,n,a,r){return e.origin===ce&&e.pathname===location.pathname&&!tt?await Ce({status:a,error:n,url:e,route:t}):await H(e,r)}function Ht(){let e,t={element:void 0,href:void 0},n;O.addEventListener("mousemove",i=>{const c=i.target;clearTimeout(e),e=setTimeout(()=>{s(c,j.hover)},20)});function a(i){i.defaultPrevented||s(i.composedPath()[0],j.tap)}O.addEventListener("mousedown",a),O.addEventListener("touchstart",a,{passive:!0});const r=new IntersectionObserver(i=>{for(const c of i)c.isIntersecting&&(me(new URL(c.target.href)),r.unobserve(c.target))},{threshold:0});async function s(i,c){const l=Je(i,O),f=l===t.element&&l?.href===t.href&&c>=n;if(!l||f)return;const{url:h,external:w,download:u}=_e(l,x,v.hash);if(w||u)return;const g=ee(l),_=h&&ie(m.url)===ie(h);if(!(g.reload||_))if(c<=g.preload_data){t={element:l,href:l.href},n=j.tap;const p=await fe(h,!1);if(!p)return;Bt(p)}else c<=g.preload_code&&(t={element:l,href:l.href},n=c,me(h))}function o(){r.disconnect();for(const i of O.querySelectorAll("a")){const{url:c,external:l,download:f}=_e(i,x,v.hash);if(l||f)continue;const h=ee(i);h.reload||(h.preload_code===j.viewport&&r.observe(i),h.preload_code===j.eager&&me(c))}}G.add(o),o()}function X(e,t){if(e instanceof Ee)return e.body;const n=Ue(e),a=Ct(e);return v.hooks.handleError({error:e,event:t,status:n,message:a})??{message:a}}function fn(e,t={}){return e=new URL(Le(e)),e.origin!==ce?Promise.reject(new Error("goto: invalid URL")):st(e,t,0)}function Jt(e){if(typeof e=="function")ne.push(e);else{const{href:t}=new URL(e,location.href);ne.push(n=>n.href===t)}}function Xt(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Fe(),!J){const a=$e(m,void 0,null,"leave"),r={...a.navigation,cancel:()=>{n=!0,a.reject(new Error("navigation cancelled"))}};et.forEach(s=>s(r))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Fe()}),navigator.connection?.saveData||Ht(),O.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Je(t.composedPath()[0],O);if(!n)return;const{url:a,external:r,target:s,download:o}=_e(n,x,v.hash);if(!a)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const i=ee(n);if(!(n instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[l,f]=(v.hash?a.hash.replace(/^#/,""):a.href).split("#"),h=l===he(location);if(r||i.reload&&(!h||!f)){lt({url:a,type:"link",event:t})?J=!0:t.preventDefault();return}if(f!==void 0&&h){const[,w]=m.url.href.split("#");if(w===f){if(t.preventDefault(),f===""||f==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=n.ownerDocument.getElementById(decodeURIComponent(f));u&&(u.scrollIntoView(),u.focus())}return}if(M=!0,Ae(y),e(a),!i.replace_state)return;M=!1}t.preventDefault(),await new Promise(w=>{requestAnimationFrame(()=>{setTimeout(w,0)}),setTimeout(w,100)}),await K({type:"link",url:a,keepfocus:i.keepfocus,noscroll:i.noscroll,replace_state:i.replace_state??a.href===location.href,event:t})}),O.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),a=t.submitter;if((a?.formTarget||n.target)==="_blank"||(a?.formMethod||n.method)!=="get")return;const o=new URL(a?.hasAttribute("formaction")&&a?.formAction||n.action);if(ue(o,x,!1))return;const i=t.target,c=ee(i);if(c.reload)return;t.preventDefault(),t.stopPropagation();const l=new FormData(i,a);o.search=new URLSearchParams(l).toString(),K({type:"form",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!be){if(t.state?.[B]){const n=t.state[B];if(N={},n===y)return;const a=D[n],r=t.state[ze]??{},s=new URL(t.state[Tt]??location.href),o=t.state[W],i=m.url?he(location)===he(m.url):!1;if(o===R&&(nt||i)){r!==k.state&&(k.state=r),e(s),D[y]=le(),a&&scrollTo(a.x,a.y),y=n;return}const l=n-y;await K({type:"popstate",url:s,popped:{state:r,scroll:a,delta:l},accept:()=>{y=n,R=o},block:()=>{history.go(-l)},nav_token:N,event:t})}else if(!M){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{M&&(M=!1,history.replaceState({...history.state,[B]:++y,[W]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Nt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(Y.current=null)});function e(t){m.url=k.url=t,$.page.set(je(k)),$.page.notify()}}async function Qt(e,{status:t=200,error:n,node_ids:a,params:r,route:s,server_route:o,data:i,form:c}){tt=!0;const l=new URL(location.href);let f;({params:r={},route:s={id:null}}=await fe(l,!1)||{}),f=Te.find(({id:u})=>u===s.id);let h,w=!0;try{const u=a.map(async(_,p)=>{const d=i[p];return d?.uses&&(d.uses=Zt(d.uses)),Oe({loader:v.nodes[_],url:l,params:r,route:s,parent:async()=>{const E={};for(let S=0;S<p;S+=1)Object.assign(E,(await u[S]).data);return E},server_data_node:Pe(d)})}),g=await Promise.all(u);if(f){const _=f.layouts;for(let p=0;p<_.length;p++)_[p]||g.splice(p,0,void 0)}h=se({url:l,params:r,branch:g,status:t,error:n,form:c,route:f??null})}catch(u){if(u instanceof Se){await H(new URL(u.location,location.href));return}h=await Ce({status:Ue(u),error:await X(u,{url:l,params:r,route:s}),url:l,route:s}),e.textContent="",w=!1}h.props.page&&(h.props.page.state={}),await it(h,e,w)}function Zt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let be=!1;function en(e,t=null){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const a=ft(e);if(a&&document.getElementById(a)){const{x:s,y:o}=t??le();setTimeout(()=>{const i=history.state;be=!0,location.replace(`#${a}`),v.hash&&location.replace(e.hash),history.replaceState(i,"",e.hash),scrollTo(s,o),be=!1})}else{const s=document.body,o=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),o!==null?s.setAttribute("tabindex",o):s.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const s=[];for(let o=0;o<r.rangeCount;o+=1)s.push(r.getRangeAt(o));setTimeout(()=>{if(r.rangeCount===s.length){for(let o=0;o<r.rangeCount;o+=1){const i=s[o],c=r.getRangeAt(o);if(i.commonAncestorContainer!==c.commonAncestorContainer||i.startContainer!==c.startContainer||i.endContainer!==c.endContainer||i.startOffset!==c.startOffset||i.endOffset!==c.endOffset)return}r.removeAllRanges()}})}}}function $e(e,t,n,a){let r,s;const o=new Promise((c,l)=>{r=c,s=l});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n},willUnload:!t,type:a,complete:o},fulfil:r,reject:s}}function je(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function tn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function ft(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{un as a,fn as g,on as l,k as p,$ as s};
@@ -0,0 +1 @@
1
+ import{c as p,a as m}from"./y4GeEH6k.js";import{p as i,f as c,e as d,a as f}from"./CaAJD3dl.js";import{l}from"./Dd5umPsk.js";import{s as h,r as u}from"./Dg_zDpDS.js";import{I as $}from"./C5_PAZ0y.js";function N(s,o){i(o,!0);let e=u(o,["$$slots","$$events","$$legacy"]);const t=[["path",{d:"m6 9 6 6 6-6"}]];$(s,h({name:"chevron-down"},()=>e,{get iconNode(){return t},children:(a,v)=>{var r=p(),n=c(r);l(n,()=>o.children??d),m(a,r)},$$slots:{default:!0}})),f()}export{N as C};
@@ -0,0 +1 @@
1
+ import{o as xt,w as Ot,a_ as It,v as Ft,b as T,a$ as tt,aj as Dt,g as v,d as b,at as F,b0 as Nt,b1 as et,b2 as Rt,C as kt,y as K,k as Pt,j as Lt,u as lt,f as m,e as A,p as x,b3 as Mt,a as O,b4 as Bt}from"./CaAJD3dl.js";import{c as y,a as w}from"./y4GeEH6k.js";import{c as _t,o as p,m as Vt,u as Wt}from"./DqT6OH_u.js";import{l as I}from"./Dd5umPsk.js";import{B as Ut,i as Kt,p as d}from"./Dg_zDpDS.js";import{r as G,e as l,c as Gt,u as M,s as qt,v as zt}from"./B25nWFyA.js";function jt(n,t,e){xt&&Ot();var r=new Ut(n),s=!It();Ft(()=>{var o=t();s&&o!==null&&typeof o=="object"&&(o={}),r.ensure(o,e)})}class Ht extends Map{#t=new Map;#e=T(0);#n=T(0);#r=tt||-1;constructor(t){if(super(),t){for(var[e,r]of t)super.set(e,r);this.#n.v=super.size}}#s(t){return tt===this.#r?T(t):Dt(t)}has(t){var e=this.#t,r=e.get(t);if(r===void 0){var s=super.get(t);if(s!==void 0)r=this.#s(0),e.set(t,r);else return v(this.#e),!1}return v(r),!0}forEach(t,e){this.#i(),super.forEach(t,e)}get(t){var e=this.#t,r=e.get(t);if(r===void 0){var s=super.get(t);if(s!==void 0)r=this.#s(0),e.set(t,r);else{v(this.#e);return}}return v(r),super.get(t)}set(t,e){var r=this.#t,s=r.get(t),o=super.get(t),i=super.set(t,e),a=this.#e;if(s===void 0)s=this.#s(0),r.set(t,s),b(this.#n,super.size),F(a);else if(o!==e){F(s);var c=a.reactions===null?null:new Set(a.reactions),u=c===null||!s.reactions?.every(h=>c.has(h));u&&F(a)}return i}delete(t){var e=this.#t,r=e.get(t),s=super.delete(t);return r!==void 0&&(e.delete(t),b(this.#n,super.size),b(r,-1),F(this.#e)),s}clear(){if(super.size!==0){super.clear();var t=this.#t;b(this.#n,0);for(var e of t.values())b(e,-1);F(this.#e),t.clear()}}#i(){v(this.#e);var t=this.#t;if(this.#n.v!==t.size){for(var e of super.keys())if(!t.has(e)){var r=this.#s(0);t.set(e,r)}}for([,r]of this.#t)v(r)}keys(){return v(this.#e),super.keys()}values(){return this.#i(),super.values()}entries(){return this.#i(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return v(this.#n),super.size}}const Xt=typeof window<"u"?window:void 0;function Yt(n){let t=n.activeElement;for(;t?.shadowRoot;){const e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}class Zt{#t;#e;constructor(t={}){const{window:e=Xt,document:r=e?.document}=t;e!==void 0&&(this.#t=r,this.#e=_t(s=>{const o=p(e,"focusin",s),i=p(e,"focusout",s);return()=>{o(),i()}}))}get current(){return this.#e?.(),this.#t?Yt(this.#t):null}}new Zt;class Jt{#t;#e;constructor(t){this.#t=t,this.#e=Symbol(t)}get key(){return this.#e}exists(){return Nt(this.#e)}get(){const t=et(this.#e);if(t===void 0)throw new Error(`Context "${this.#t}" not found`);return t}getOr(t){const e=et(this.#e);return e===void 0?t:e}set(t){return Rt(this.#e,t)}}function Qt(n,t){switch(n){case"post":K(t);break;case"pre":kt(t);break}}function ft(n,t,e,r={}){const{lazy:s=!1}=r;let o=!s,i=Array.isArray(n)?[]:void 0;Qt(t,()=>{const a=Array.isArray(n)?n.map(u=>u()):n();if(!o){o=!0,i=a;return}const c=Pt(()=>e(a,i));return i=a,c})}function E(n,t,e){ft(n,"post",t,e)}function $t(n,t,e){ft(n,"pre",t,e)}E.pre=$t;function R(n){K(()=>()=>{n()})}function te(n,t){return setTimeout(t,n)}function X(n){Lt().then(n)}const ee=1,ne=9,re=11;function j(n){return G(n)&&n.nodeType===ee&&typeof n.nodeName=="string"}function ht(n){return G(n)&&n.nodeType===ne}function se(n){return G(n)&&n.constructor?.name==="VisualViewport"}function ie(n){return G(n)&&n.nodeType!==void 0}function dt(n){return ie(n)&&n.nodeType===re&&"host"in n}function oe(n,t){if(!n||!t||!j(n)||!j(t))return!1;const e=t.getRootNode?.();if(n===t||n.contains(t))return!0;if(e&&dt(e)){let r=t;for(;r;){if(n===r)return!0;r=r.parentNode||r.host}}return!1}function ae(n){return ht(n)?n:se(n)?n.document:n?.ownerDocument??document}function ue(n){return dt(n)?ue(n.host):ht(n)?n.defaultView??window:j(n)?n.ownerDocument?.defaultView??window:window}function ce(n){let t=n.activeElement;for(;t?.shadowRoot;){const e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}class vt{element;#t=lt(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return v(this.#t)}set root(t){b(this.#t,t)}constructor(t){typeof t=="function"?this.element=l(t):this.element=t}getDocument=()=>ae(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>ce(this.root);isActiveElement=t=>t===this.getActiveElement();getElementById(t){return this.root.getElementById(t)}querySelector=t=>this.root?this.root.querySelector(t):null;querySelectorAll=t=>this.root?this.root.querySelectorAll(t):[];setTimeout=(t,e)=>this.getWindow().setTimeout(t,e);clearTimeout=t=>this.getWindow().clearTimeout(t)}const rn="ArrowDown",sn="ArrowLeft",on="ArrowRight",an="ArrowUp",un="End",cn="Enter",le="Escape",ln="Home",fn="PageDown",hn="PageUp",dn=" ",vn="Tab",bn="p",gn="n",pn="j",mn="k",yn="h",wn="l",bt=typeof document<"u",nt=fe();function fe(){return bt&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function rt(n){return n instanceof HTMLElement}function En(n){return n instanceof Element}function he(n){return n instanceof Element||n instanceof SVGElement}function Sn(n){return n.matches(":focus-visible")}function Tn(n){return n!==null}class de{#t;#e=null;constructor(t){this.#t=t,R(()=>this.#n())}#n(){this.#e&&(window.cancelAnimationFrame(this.#e),this.#e=null)}run(t){this.#n();const e=this.#t.ref.current;if(e){if(typeof e.getAnimations!="function"){this.#r(t);return}this.#e=window.requestAnimationFrame(()=>{const r=e.getAnimations();if(r.length===0){this.#r(t);return}Promise.allSettled(r.map(s=>s.finished)).then(()=>{this.#r(t)})})}}#r(t){const e=()=>{t()};this.#t.afterTick?X(e):e()}}class Cn{#t;#e;#n;#r=T(!1);constructor(t){this.#t=t,b(this.#r,t.open.current,!0),this.#e=t.enabled??!0,this.#n=new de({ref:this.#t.ref,afterTick:this.#t.open}),E(()=>this.#t.open.current,e=>{e&&b(this.#r,!0),this.#e&&this.#n.run(()=>{e===this.#t.open.current&&(this.#t.open.current||b(this.#r,!1),this.#t.onComplete?.())})})}get shouldRender(){return v(this.#r)}}function g(){}function ve(n,t){var e=y(),r=m(e);jt(r,()=>t.children,s=>{var o=y(),i=m(o);I(i,()=>t.children??A),w(s,o)}),w(n,e)}const be=new Jt("BitsConfig");function ge(){const n=new pe(null,{});return be.getOr(n).opts}class pe{opts;constructor(t,e){const r=me(t,e);this.opts={defaultPortalTo:r(s=>s.defaultPortalTo),defaultLocale:r(s=>s.defaultLocale)}}}function me(n,t){return e=>l(()=>{const s=e(t)?.current;if(s!==void 0)return s;if(n!==null)return e(n.opts)?.current})}function ye(n,t){return e=>{const r=ge();return l(()=>{const s=e();if(s!==void 0)return s;const o=n(r).current;return o!==void 0?o:t})}}const we=ye(n=>n.defaultPortalTo,"body");function An(n,t){x(t,!0);const e=we(()=>t.to),r=Mt();let s=lt(o);function o(){if(!bt||t.disabled)return null;let f=null;return typeof e.current=="string"?f=document.querySelector(e.current):f=e.current,f}let i;function a(){i&&(Wt(i),i=null)}E([()=>v(s),()=>t.disabled],([f,S])=>{if(!f||S){a();return}return i=Vt(ve,{target:f,props:{children:t.children},context:r}),()=>{a()}});var c=y(),u=m(c);{var h=f=>{var S=y(),k=m(S);I(k,()=>t.children??A),w(f,S)};Kt(u,f=>{t.disabled&&f(h)})}w(n,c),O()}function st(n,t=500){let e=null;const r=(...s)=>{e!==null&&clearTimeout(e),e=setTimeout(()=>{n(...s)},t)};return r.destroy=()=>{e!==null&&(clearTimeout(e),e=null)},r}function gt(n,t){return n===t||n.contains(t)}function pt(n){return n?.ownerDocument??document}function xn(n){if(!n)return null;for(const t of n.childNodes)if(t.nodeType!==Node.COMMENT_NODE)return t;return null}function Ee(n,t){const{clientX:e,clientY:r}=n,s=t.getBoundingClientRect();return e<s.left||e>s.right||r<s.top||r>s.bottom}var mt=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],H=mt.join(","),yt=typeof Element>"u",C=yt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_=!yt&&Element.prototype.getRootNode?function(n){var t;return n==null||(t=n.getRootNode)===null||t===void 0?void 0:t.call(n)}:function(n){return n?.ownerDocument},V=function(t,e){var r;e===void 0&&(e=!0);var s=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=s===""||s==="true",i=o||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):V(t.parentNode));return i},Se=function(t){var e,r=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return r===""||r==="true"},wt=function(t,e,r){if(V(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(H));return e&&C.call(t,H)&&s.unshift(t),s=s.filter(r),s},W=function(t,e,r){for(var s=[],o=Array.from(t);o.length;){var i=o.shift();if(!V(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),c=a.length?a:i.children,u=W(c,!0,r);r.flatten?s.push.apply(s,u):s.push({scopeParent:i,candidates:u})}else{var h=C.call(i,H);h&&r.filter(i)&&(e||!t.includes(i))&&s.push(i);var f=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),S=!V(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(f&&S){var k=W(f===!0?i.children:f.children,!0,r);r.flatten?s.push.apply(s,k):s.push({scopeParent:i,candidates:k})}else o.unshift.apply(o,i.children)}}return s},Et=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},St=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Se(t))&&!Et(t)?0:t.tabIndex},Te=function(t,e){var r=St(t);return r<0&&e&&!Et(t)?0:r},Ce=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Tt=function(t){return t.tagName==="INPUT"},Ae=function(t){return Tt(t)&&t.type==="hidden"},xe=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return e},Oe=function(t,e){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===e)return t[r]},Ie=function(t){if(!t.name)return!0;var e=t.form||_(t),r=function(a){return e.querySelectorAll('input[type="radio"][name="'+a+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=r(window.CSS.escape(t.name));else try{s=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var o=Oe(s,t.form);return!o||o===t},Fe=function(t){return Tt(t)&&t.type==="radio"},De=function(t){return Fe(t)&&!Ie(t)},Ne=function(t){var e,r=t&&_(t),s=(e=r)===null||e===void 0?void 0:e.host,o=!1;if(r&&r!==t){var i,a,c;for(o=!!((i=s)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(s)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!o&&s;){var u,h,f;r=_(s),s=(u=r)===null||u===void 0?void 0:u.host,o=!!((h=s)!==null&&h!==void 0&&(f=h.ownerDocument)!==null&&f!==void 0&&f.contains(s))}}return o},it=function(t){var e=t.getBoundingClientRect(),r=e.width,s=e.height;return r===0&&s===0},Re=function(t,e){var r=e.displayCheck,s=e.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(t).visibility==="hidden")return!0;var i=C.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(C.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var c=t;t;){var u=t.parentElement,h=_(t);if(u&&!u.shadowRoot&&s(u)===!0)return it(t);t.assignedSlot?t=t.assignedSlot:!u&&h!==t.ownerDocument?t=h.host:t=u}t=c}if(Ne(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return it(t);return!1},ke=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var r=0;r<e.children.length;r++){var s=e.children.item(r);if(s.tagName==="LEGEND")return C.call(e,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}e=e.parentElement}return!1},U=function(t,e){return!(e.disabled||Ae(e)||Re(e,t)||xe(e)||ke(e))},ot=function(t,e){return!(De(e)||St(e)<0||!U(t,e))},Pe=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Ct=function(t){var e=[],r=[];return t.forEach(function(s,o){var i=!!s.scopeParent,a=i?s.scopeParent:s,c=Te(a,i),u=i?Ct(s.candidates):a;c===0?i?e.push.apply(e,u):e.push(a):r.push({documentOrder:o,tabIndex:c,item:s,isScope:i,content:u})}),r.sort(Ce).reduce(function(s,o){return o.isScope?s.push.apply(s,o.content):s.push(o.content),s},[]).concat(e)},Le=function(t,e){e=e||{};var r;return e.getShadowRoot?r=W([t],e.includeContainer,{filter:ot.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Pe}):r=wt(t,e.includeContainer,ot.bind(null,e)),Ct(r)},Me=function(t,e){e=e||{};var r;return e.getShadowRoot?r=W([t],e.includeContainer,{filter:U.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):r=wt(t,e.includeContainer,U.bind(null,e)),r},Be=mt.concat("iframe:not([inert]):not([inert] *)").join(","),_e=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return C.call(t,Be)===!1?!1:U(e,t)};const Ve="data-context-menu-trigger",We="data-context-menu-content";Gt({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});globalThis.bitsDismissableLayers??=new Map;class Y{static create(t){return new Y(t)}opts;#t;#e;#n={pointerdown:!1};#r=!1;#s=!1;#i=void 0;#c;#o=g;constructor(t){this.opts=t,this.#e=t.interactOutsideBehavior,this.#t=t.onInteractOutside,this.#c=t.onFocusOutside,K(()=>{this.#i=pt(this.opts.ref.current)});let e=g;const r=()=>{this.#h(),globalThis.bitsDismissableLayers.delete(this),this.#a.destroy(),e()};E([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return te(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#e),e(),e=this.#l())}),r}),R(()=>{this.#h.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#a.destroy(),this.#o(),e()})}#f=t=>{t.defaultPrevented||this.opts.ref.current&&X(()=>{!this.opts.ref.current||this.#g(t.target)||t.target&&!this.#s&&this.#c.current?.(t)})};#l(){return M(p(this.#i,"pointerdown",M(this.#d,this.#b),{capture:!0}),p(this.#i,"pointerdown",M(this.#v,this.#a)),p(this.#i,"focusin",this.#f))}#u=t=>{let e=t;e.defaultPrevented&&(e=at(t)),this.#t.current(t)};#a=st(t=>{if(!this.opts.ref.current){this.#o();return}const e=this.opts.isValidEvent.current(t,this.opts.ref.current)||Ge(t,this.opts.ref.current);if(!this.#r||this.#p()||!e){this.#o();return}let r=t;if(r.defaultPrevented&&(r=at(r)),this.#e.current!=="close"&&this.#e.current!=="defer-otherwise-close"){this.#o();return}t.pointerType==="touch"?(this.#o(),this.#o=p(this.#i,"click",this.#u,{once:!0})):this.#t.current(r)},10);#d=t=>{this.#n[t.type]=!0};#v=t=>{this.#n[t.type]=!1};#b=()=>{this.opts.ref.current&&(this.#r=Ke(this.opts.ref.current))};#g=t=>this.opts.ref.current?gt(this.opts.ref.current,t):!1;#h=st(()=>{for(const t in this.#n)this.#n[t]=!1;this.#r=!1},20);#p(){return Object.values(this.#n).some(Boolean)}#m=()=>{this.#s=!0};#y=()=>{this.#s=!1};props={onfocuscapture:this.#m,onblurcapture:this.#y}}function Ue(n=[...globalThis.bitsDismissableLayers]){return n.findLast(([t,{current:e}])=>e==="close"||e==="ignore")}function Ke(n){const t=[...globalThis.bitsDismissableLayers],e=Ue(t);if(e)return e[0].opts.ref.current===n;const[r]=t[0];return r.opts.ref.current===n}function Ge(n,t){const e=n.target;if(!he(e))return!1;const r=!!e.closest(`[${Ve}]`);if("button"in n&&n.button>0&&!r)return!1;if("button"in n&&n.button===0&&r)return!0;const s=!!t.closest(`[${We}]`);return r&&s?!1:pt(e).documentElement.contains(e)&&!gt(t,e)&&Ee(n,t)}function at(n){const t=n.currentTarget,e=n.target;let r;n instanceof PointerEvent?r=new PointerEvent(n.type,n):r=new PointerEvent("pointerdown",n);let s=!1;return new Proxy(r,{get:(i,a)=>a==="currentTarget"?t:a==="target"?e:a==="preventDefault"?()=>{s=!0,typeof i.preventDefault=="function"&&i.preventDefault()}:a==="defaultPrevented"?s:a in i?i[a]:n[a]})}function On(n,t){x(t,!0);let e=d(t,"interactOutsideBehavior",3,"close"),r=d(t,"onInteractOutside",3,g),s=d(t,"onFocusOutside",3,g),o=d(t,"isValidEvent",3,()=>!1);const i=Y.create({id:l(()=>t.id),interactOutsideBehavior:l(()=>e()),onInteractOutside:l(()=>r()),enabled:l(()=>t.enabled),onFocusOutside:l(()=>s()),isValidEvent:l(()=>o()),ref:t.ref});var a=y(),c=m(a);I(c,()=>t.children??A,()=>({props:i.props})),w(n,a),O()}globalThis.bitsEscapeLayers??=new Map;class Z{static create(t){return new Z(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new vt(this.opts.ref);let e=g;E(()=>t.enabled.current,r=>(r&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),e=this.#t()),()=>{e(),globalThis.bitsEscapeLayers.delete(this)}))}#t=()=>p(this.domContext.getDocument(),"keydown",this.#e,{passive:!1});#e=t=>{if(t.key!==le||!qe(this))return;const e=new KeyboardEvent(t.type,t);t.preventDefault();const r=this.opts.escapeKeydownBehavior.current;r!=="close"&&r!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(e)}}function qe(n){const t=[...globalThis.bitsEscapeLayers],e=t.findLast(([s,{current:o}])=>o==="close"||o==="ignore");if(e)return e[0]===n;const[r]=t[0];return r===n}function In(n,t){x(t,!0);let e=d(t,"escapeKeydownBehavior",3,"close"),r=d(t,"onEscapeKeydown",3,g);Z.create({escapeKeydownBehavior:l(()=>e()),onEscapeKeydown:l(()=>r()),enabled:l(()=>t.enabled),ref:t.ref});var s=y(),o=m(s);I(o,()=>t.children??A),w(n,s),O()}class J{static instance;#t=qt([]);#e=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||(this.instance=new J),this.instance}register(t){const e=this.getActive();e&&e!==t&&e.pause();const r=document.activeElement;r&&r!==document.body&&this.#n.set(t,r),this.#t.current=this.#t.current.filter(s=>s!==t),this.#t.current.unshift(t)}unregister(t){this.#t.current=this.#t.current.filter(r=>r!==t);const e=this.getActive();e&&e.resume()}getActive(){return this.#t.current[0]}setFocusMemory(t,e){this.#e.set(t,e)}getFocusMemory(t){return this.#e.get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,e){this.#n.set(t,e)}getPreFocusMemory(t){return this.#n.get(t)}clearPreFocusMemory(t){this.#n.delete(t)}}class Q{#t=!1;#e=null;#n=J.getInstance();#r=[];#s;constructor(t){this.#s=t}get paused(){return this.#t}pause(){this.#t=!0}resume(){this.#t=!1}#i(){for(const t of this.#r)t();this.#r=[]}mount(t){this.#e&&this.unmount(),this.#e=t,this.#n.register(this),this.#f(),this.#c()}unmount(){this.#e&&(this.#i(),this.#o(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),this.#e=null)}#c(){if(!this.#e)return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#s.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#e)return;const e=this.#u();e?(e.focus(),this.#n.setFocusMemory(this,e)):this.#e.focus()})}#o(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#s.onCloseAutoFocus.current?.(t),!t.defaultPrevented){const e=this.#n.getPreFocusMemory(this);if(e&&document.contains(e))try{e.focus()}catch{document.body.focus()}}}#f(){if(!this.#e||!this.#s.trap.current)return;const t=this.#e,e=t.ownerDocument,r=i=>{if(this.#t||!this.#n.isActiveScope(this))return;const a=i.target;if(!a)return;if(t.contains(a))this.#n.setFocusMemory(this,a);else{const u=this.#n.getFocusMemory(this);if(u&&t.contains(u)&&_e(u))i.preventDefault(),u.focus();else{const h=this.#u(),f=this.#a()[0];(h||f||t).focus()}}},s=i=>{if(!this.#s.loop||this.#t||i.key!=="Tab"||!this.#n.isActiveScope(this))return;const a=this.#l();if(a.length<2)return;const c=a[0],u=a[a.length-1];!i.shiftKey&&e.activeElement===u?(i.preventDefault(),c.focus()):i.shiftKey&&e.activeElement===c&&(i.preventDefault(),u.focus())};this.#r.push(p(e,"focusin",r,{capture:!0}),p(t,"keydown",s));const o=new MutationObserver(()=>{const i=this.#n.getFocusMemory(this);if(i&&!t.contains(i)){const a=this.#u(),c=this.#a()[0],u=a||c;u?(u.focus(),this.#n.setFocusMemory(this,u)):t.focus()}});o.observe(t,{childList:!0,subtree:!0}),this.#r.push(()=>o.disconnect())}#l(){return this.#e?Le(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}#u(){return this.#l()[0]||null}#a(){return this.#e?Me(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let e=null;return E([()=>t.ref.current,()=>t.enabled.current],([r,s])=>{r&&s?(e||(e=new Q(t)),e.mount(r)):e&&(e.unmount(),e=null)}),R(()=>{e?.unmount()}),{get props(){return{tabindex:-1}}}}}function Fn(n,t){x(t,!0);let e=d(t,"enabled",3,!1),r=d(t,"trapFocus",3,!1),s=d(t,"loop",3,!1),o=d(t,"onCloseAutoFocus",3,g),i=d(t,"onOpenAutoFocus",3,g);const a=Q.use({enabled:l(()=>e()),trap:l(()=>r()),loop:s(),onCloseAutoFocus:l(()=>o()),onOpenAutoFocus:l(()=>i()),ref:t.ref});var c=y(),u=m(c);I(u,()=>t.focusScope??A,()=>({props:a.props})),w(n,c),O()}globalThis.bitsTextSelectionLayers??=new Map;class ${static create(t){return new $(t)}opts;domContext;#t=g;constructor(t){this.opts=t,this.domContext=new vt(t.ref);let e=g;E(()=>this.opts.enabled.current,r=>(r&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),e(),e=this.#e()),()=>{e(),this.#r(),globalThis.bitsTextSelectionLayers.delete(this)}))}#e(){return M(p(this.domContext.getDocument(),"pointerdown",this.#n),p(this.domContext.getDocument(),"pointerup",zt(this.#r,this.opts.onPointerUp.current)))}#n=t=>{const e=this.opts.ref.current,r=t.target;!rt(e)||!rt(r)||!this.opts.enabled.current||!je(this)||!oe(e,r)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&(this.#t=ze(e,this.domContext.getDocument().body)))};#r=()=>{this.#t(),this.#t=g}}const ut=n=>n.style.userSelect||n.style.webkitUserSelect;function ze(n,t){const e=ut(t),r=ut(n);return P(t,"none"),P(n,"text"),()=>{P(t,e),P(n,r)}}function P(n,t){n.style.userSelect=t,n.style.webkitUserSelect=t}function je(n){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const e=t.at(-1);return e?e[0]===n:!1}function Dn(n,t){x(t,!0);let e=d(t,"preventOverflowTextSelection",3,!0),r=d(t,"onPointerDown",3,g),s=d(t,"onPointerUp",3,g);$.create({id:l(()=>t.id),onPointerDown:l(()=>r()),onPointerUp:l(()=>s()),enabled:l(()=>t.enabled&&e()),ref:t.ref});var o=y(),i=m(o);I(i,()=>t.children??A),w(n,o),O()}globalThis.bitsIdCounter??={current:0};function He(n="bits"){return globalThis.bitsIdCounter.current++,`${n}-${globalThis.bitsIdCounter.current}`}class Xe{#t;#e=0;#n=T();#r;constructor(t){this.#t=t}#s(){this.#e-=1,this.#r&&this.#e<=0&&(this.#r(),b(this.#n,void 0),this.#r=void 0)}get(...t){return this.#e+=1,v(this.#n)===void 0&&(this.#r=Bt(()=>{b(this.#n,this.#t(...t),!0)})),K(()=>()=>{this.#s()}),v(this.#n)}}const B=new Ht;let L=T(null),q=null,D=null,N=!1;const ct=l(()=>{for(const n of B.values())if(n)return!0;return!1});let z=null;const Ye=new Xe(()=>{function n(){document.body.setAttribute("style",v(L)??""),document.body.style.removeProperty("--scrollbar-width"),nt&&q?.(),b(L,null)}function t(){D!==null&&(window.clearTimeout(D),D=null)}function e(s,o){t(),N=!0,z=Date.now();const i=z,a=()=>{D=null,z===i&&(At(B)?N=!1:(N=!1,o()))},c=s===null?24:s;D=window.setTimeout(a,c)}function r(){v(L)===null&&B.size===0&&!N&&b(L,document.body.getAttribute("style"),!0)}return E(()=>ct.current,()=>{if(!ct.current)return;r(),N=!1;const s=getComputedStyle(document.documentElement),o=getComputedStyle(document.body),i=s.scrollbarGutter?.includes("stable")||o.scrollbarGutter?.includes("stable"),a=window.innerWidth-document.documentElement.clientWidth,u={padding:Number.parseInt(o.paddingRight??"0",10)+a,margin:Number.parseInt(o.marginRight??"0",10)};a>0&&!i&&(document.body.style.paddingRight=`${u.padding}px`,document.body.style.marginRight=`${u.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",nt&&(q=p(document,"touchmove",h=>{h.target===document.documentElement&&(h.touches.length>1||h.preventDefault())},{passive:!1})),X(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),R(()=>()=>{q?.()}),{get lockMap(){return B},resetBodyStyle:n,scheduleCleanupIfNoNewLocks:e,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}});class Ze{#t=He();#e;#n=()=>null;#r;locked;constructor(t,e=()=>null){this.#e=t,this.#n=e,this.#r=Ye.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#t,this.#e??!1),this.locked=l(()=>this.#r.lockMap.get(this.#t)??!1,r=>this.#r.lockMap.set(this.#t,r)),R(()=>{if(this.#r.lockMap.delete(this.#t),At(this.#r.lockMap))return;const r=this.#n();this.#r.scheduleCleanupIfNoNewLocks(r,()=>{this.#r.resetBodyStyle()})}))}}function At(n){for(const[t,e]of n)if(e)return!0;return!1}function Nn(n,t){x(t,!0);let e=d(t,"preventScroll",3,!0),r=d(t,"restoreScrollDelay",3,null);e()&&new Ze(e(),()=>r()),O()}export{an as A,yn as B,Jt as C,On as D,cn as E,Fn as F,mn as G,ln as H,bn as I,wn as J,pn as K,gn as L,jt as M,Cn as P,dn as S,Dn as T,In as a,Nn as b,An as c,vt as d,Sn as e,on as f,ae as g,sn as h,En as i,rn as j,un as k,rt as l,X as m,g as n,R as o,Xt as p,Tn as q,ue as r,vn as s,hn as t,He as u,fn as v,E as w,nt as x,te as y,xn as z};
@@ -1 +1 @@
1
- import{z as d,A as g,u as i,q as m,B as l,C as b,g as p,D as v,F as h}from"./D3vxvonu.js";function x(n=!1){const s=d,e=s.l.u;if(!e)return;let r=()=>v(s.s);if(n){let o=0,t={};const _=h(()=>{let c=!1;const a=s.s;for(const f in a)a[f]!==t[f]&&(t[f]=a[f],c=!0);return c&&o++,o});r=()=>p(_)}e.b.length&&g(()=>{u(s,r),l(e.b)}),i(()=>{const o=m(()=>e.m.map(b));return()=>{for(const t of o)typeof t=="function"&&t()}}),e.a.length&&i(()=>{u(s,r),l(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}export{x as i};
1
+ import{z as d,C as g,y as i,k as m,D as l,F as b,g as p,G as k,H as v}from"./CaAJD3dl.js";function y(n=!1){const s=d,e=s.l.u;if(!e)return;let r=()=>k(s.s);if(n){let o=0,t={};const _=v(()=>{let c=!1;const a=s.s;for(const f in a)a[f]!==t[f]&&(t[f]=a[f],c=!0);return c&&o++,o});r=()=>p(_)}e.b.length&&g(()=>{u(s,r),l(e.b)}),i(()=>{const o=m(()=>e.m.map(b));return()=>{for(const t of o)typeof t=="function"&&t()}}),e.a.length&&i(()=>{u(s,r),l(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}export{y as i};
@@ -0,0 +1 @@
1
+ import{b as x,a as d,c as p}from"./y4GeEH6k.js";import{p as y,a as z,s as S,c as j,e as C,r as I,f as A,g as a,u as B,P as G}from"./CaAJD3dl.js";import{m as h,h as P,l as q,j as D,G as E}from"./Dd5umPsk.js";import{p as t,r as F}from"./Dg_zDpDS.js";const H={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var J=x("<svg><!><!></svg>");function R(u,e){y(e,!0);const m=t(e,"color",3,"currentColor"),r=t(e,"size",3,24),i=t(e,"strokeWidth",3,2),v=t(e,"absoluteStrokeWidth",3,!1),f=t(e,"iconNode",19,()=>[]),g=F(e,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]);var o=J();h(o,s=>({...H,...g,width:r(),height:r(),stroke:m(),"stroke-width":s,class:["lucide-icon lucide",e.name&&`lucide-${e.name}`,e.class]}),[()=>v()?Number(i())*24/Number(r()):i()]);var n=j(o);P(n,17,f,D,(s,b)=>{var l=B(()=>G(a(b),2));let w=()=>a(l)[0],_=()=>a(l)[1];var c=p(),W=A(c);E(W,w,!0,(N,K)=>{h(N,()=>({..._()}))}),d(s,c)});var k=S(n);q(k,()=>e.children??C),I(o),d(u,o),z()}export{R as I};
@@ -0,0 +1 @@
1
+ const s=globalThis.__sveltekit_1222h2t?.base??"",t=globalThis.__sveltekit_1222h2t?.assets??s??"";export{t as a,s as b};
@@ -0,0 +1 @@
1
+ import{f as l,a as c}from"./y4GeEH6k.js";import{p as f,a as i,c as n,e as p,r as m}from"./CaAJD3dl.js";import{m as h,l as u,o as v}from"./Dd5umPsk.js";import{p as b,b as x,r as g}from"./Dg_zDpDS.js";var _=l("<div><!></div>");function j(o,r){f(r,!0);let e=b(r,"ref",15,null),t=g(r,["$$slots","$$events","$$legacy","ref","class","children"]);var a=_();h(a,s=>({"data-slot":"card",class:s,...t}),[()=>v("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",r.class)]);var d=n(a);u(d,()=>r.children??p),m(a),x(a,s=>e(s),()=>e()),c(o,a),i()}export{j as C};
@@ -0,0 +1 @@
1
+ const f={Read:"📄",Write:"✏️",Edit:"✏️",Bash:"$",Grep:"🔍",Glob:"📁",WebFetch:"🌐",WebSearch:"🌐",Task:"🤖",TodoWrite:"✅",NotebookEdit:"📓"};function y(a){return f[a]??"🔧"}function k(a,n){if(!n||typeof n!="object")return"";const e=n;if(e.command&&typeof e.command=="string")return p(e.command,80);if(e.file_path&&typeof e.file_path=="string")return String(e.file_path);if(e.pattern&&typeof e.pattern=="string")return`pattern: ${p(String(e.pattern),60)}`;if(e.query&&typeof e.query=="string")return p(String(e.query),80);if(e.content&&typeof e.content=="string")return p(String(e.content),80);const t=Object.keys(e);return t.length<=3?t.join(", "):`${t.length} params`}function p(a,n){return a.length<=n?a:a.slice(0,n)+"…"}function m(a){const n=a.content;if(n&&typeof n=="object"){const e=n;if(e.type==="text"&&typeof e.text=="string")return e.text}return typeof a.text=="string"?a.text:typeof n=="string"?n:""}function _(a){const n=[],e=new Map;for(const t of a){const o=t.data;if(o)switch(t.type){case"session.start":{n.push({type:"system",label:"Session started",detail:o.agent_type?`Agent: ${o.agent_type}`:void 0,timestamp:t.ts,seq:t.seq});break}case"session.end":case"session.wrapup":{n.push({type:"system",label:t.type==="session.end"?"Session ended":"Session wrapping up",detail:o.reason?String(o.reason):void 0,timestamp:t.ts,seq:t.seq});break}case"session.update":{const s=o.sessionUpdate?o:o.update;if(!s)break;const i=s.sessionUpdate;if(i==="agent_message_chunk"||i==="assistant_text"||i==="assistant"){const l=m(s);if(l){const r=n[n.length-1];r?.type==="message"?r.content+=l:n.push({type:"message",content:l,timestamp:t.ts,seq:t.seq})}}else if(i==="agent_thought_chunk"||i==="thinking"||i==="assistant_thinking"){const l=m(s);if(l){const r=n[n.length-1];r?.type==="thinking"?r.content+=l:n.push({type:"thinking",content:l,timestamp:t.ts,seq:t.seq})}}else if(i==="tool_call"){const l=s.toolCallId??s.tool_call_id??s.id??"",r=s.title??s.tool??s.toolName??s.name??"unknown",c=s.rawInput??s.input,u={type:"tool_call",toolName:r,toolCallId:l,input:c,status:"running",startedAt:t.ts,seq:t.seq};e.set(l,u),n.push(u)}else if(i==="tool_call_update"||i==="tool_result"){const l=s.toolCallId??s.tool_call_id??s.id??"",r=e.get(l);if(r){const c=s.status,u=s.rawOutput??s.output??s.content;u!==void 0&&(r.output=u,r.resultSeq=t.seq),c==="completed"||c==="failed"?(r.status=c,r.completedAt=t.ts,r.durationMs=t.ts-r.startedAt):s.error||s.isError?(r.status="failed",r.completedAt=t.ts,r.durationMs=t.ts-r.startedAt):i==="tool_result"&&(r.status="completed",r.completedAt=t.ts,r.durationMs=t.ts-r.startedAt),r.resultSeq||(r.resultSeq=t.seq),s.rawInput!==void 0&&(r.input=s.rawInput)}}break}case"tool.call":{const s=o.tool??o.name??"unknown",i=o.toolCallId??o.tool_call_id??o.id??`tool-${t.seq}`,l={type:"tool_call",toolName:s,toolCallId:i,input:o.input??o.rawInput??o.args,status:"running",startedAt:t.ts,seq:t.seq};e.set(i,l),n.push(l);break}case"tool.result":{const s=o.toolCallId??o.tool_call_id??o.id??"",i=e.get(s);i&&(i.output=o.output??o.rawOutput??o.content,i.status=o.error||o.isError?"failed":"completed",i.completedAt=t.ts,i.durationMs=t.ts-i.startedAt,i.resultSeq=t.seq);break}case"note":{n.push({type:"system",label:"Note",detail:typeof o.message=="string"?o.message:JSON.stringify(o),timestamp:t.ts,seq:t.seq});break}case"agent.dispatched":case"agent.started":case"agent.completed":case"agent.failed":case"agent.timeout":{const s={"agent.dispatched":"Agent dispatched","agent.started":"Agent started","agent.completed":"Agent completed","agent.failed":"Agent failed","agent.timeout":"Agent timed out"};n.push({type:"system",label:s[t.type]??t.type,detail:o.task_ref?`Task: ${o.task_ref}`:void 0,timestamp:t.ts,seq:t.seq});break}case"prompt.sent":{const s=o.phase,i=o.iteration;s&&n.push({type:"system",label:`Iteration ${i??"?"}`,detail:`Phase: ${s}`,timestamp:t.ts,seq:t.seq});break}case"iteration.timeout":{n.push({type:"system",label:"Iteration timeout",timestamp:t.ts,seq:t.seq});break}}}return n}function S(a,n,e){const t=[...a];switch(n){case"message_start":{t.push({type:"message",content:"",timestamp:e.timestamp??Date.now(),seq:-1,isStreaming:!0});break}case"message_progress":{const o=e.text??"",s=t[t.length-1];s?.type==="message"&&s.isStreaming?t[t.length-1]={...s,content:s.content+o}:t.push({type:"message",content:o,timestamp:e.timestamp??Date.now(),seq:-1,isStreaming:!0});break}case"message_complete":{const o=e.text??"",s=t[t.length-1];s?.type==="message"&&s.isStreaming?t[t.length-1]={...s,content:s.content+o,isStreaming:!1}:o&&t.push({type:"message",content:o,timestamp:e.timestamp??Date.now(),seq:-1});break}case"thinking_start":{t.push({type:"thinking",content:"",timestamp:e.timestamp??Date.now(),seq:-1,isStreaming:!0});break}case"thinking_progress":{const o=e.text??"",s=t[t.length-1];s?.type==="thinking"&&s.isStreaming?t[t.length-1]={...s,content:s.content+o}:t.push({type:"thinking",content:o,timestamp:e.timestamp??Date.now(),seq:-1,isStreaming:!0});break}case"thinking_complete":{const o=e.text??"",s=t[t.length-1];s?.type==="thinking"&&s.isStreaming?t[t.length-1]={...s,content:s.content+o,isStreaming:!1}:o&&t.push({type:"thinking",content:o,timestamp:e.timestamp??Date.now(),seq:-1});break}case"tool_call_start":{const o=e.tool_call_id??"",s=e.tool_name??"unknown";t.push({type:"tool_call",toolName:s,toolCallId:o,input:e.tool_input,status:"running",startedAt:e.timestamp??Date.now(),seq:-1});break}case"tool_call_complete":{const o=e.tool_call_id??"",s=t.findLastIndex(i=>i.type==="tool_call"&&i.toolCallId===o);if(s!==-1){const i=t[s];t[s]={...i,status:e.status==="failed"?"failed":"completed",durationMs:e.duration_ms??void 0,completedAt:e.timestamp??Date.now()}}break}}return t}function q(a){return a.map(n=>{if(n.type==="tool_call"&&n.output!==void 0){const{output:e,...t}=n;return t}return n})}function w(a){if(a<1e3)return`${a}ms`;const n=Math.floor(a/1e3),e=Math.floor(n/60),t=Math.floor(e/60);return t>0?`${t}h ${e%60}m`:e>0?`${e}m ${n%60}s`:`${n}s`}function b(a){return new Date(a).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function $(a){const n=Math.floor(a/1e3),e=Math.floor(n/60),t=Math.floor(e/60);return t>0?`${t}h ${e%60}m`:e>0?`${e}m ${n%60}s`:`${n}s`}function D(a){const n=Date.now(),e=new Date(a).getTime(),t=n-e,o=Math.floor(t/6e4),s=Math.floor(o/60),i=Math.floor(s/24);return o<1?"just now":o<60?`${o}m`:s<24?`${s}h`:i<30?`${i}d`:`${Math.floor(i/30)}mo`}function I(a){const n=new Date(a),e=new Date,t=n.toLocaleTimeString("en-US",{hour12:!0,hour:"numeric",minute:"2-digit",second:"2-digit"});if(n.getFullYear()===e.getFullYear()&&n.getMonth()===e.getMonth()&&n.getDate()===e.getDate())return t;const s=n.toLocaleString("en-US",{month:"short"}),i=n.getDate();return`${s} ${i}, ${t}`}function g(a,n,e){return a-n-e}const d=100;function x(a,n,e){return g(a,n,e)<=d}function M(a,n,e){return!a&&(n||e>0)}function T(a){return a.length===0?-1:a[a.length-1].seq}function A(a){switch(a){case"manual":return"Manual Run";case"task.ready":return"Dispatched: Task Ready";case"task.in_progress":return"Dispatched: In Progress";case"task.needs_work":return"Dispatched: Fix Cycle";case"task.pending_review":return"Dispatched: PR Review";case"legacy":return"Legacy";default:return a?`Dispatched: ${a}`:"Legacy"}}function C(a){return!!a&&a!=="manual"&&a!=="legacy"}const h=new Set(["Write","Edit","NotebookEdit"]);function L(a){const n=new Set;for(const e of a){if(e.type!=="tool_call"||!h.has(e.toolName))continue;const t=e.input;if(!t)continue;const o=t.file_path??t.notebook_path;o&&n.add(o)}return[...n].sort()}export{D as a,b,y as c,k as d,w as e,$ as f,A as g,M as h,C as i,I as j,L as k,q as l,T as m,S as n,_ as p,x as s};
@@ -1 +1 @@
1
- import{c as n,a as i}from"./DvA-KON-.js";import{p as m,f as l,i as c,a as d}from"./D3vxvonu.js";import{k as f}from"./DQA8NZIH.js";import{s as h,r as u}from"./BysXJlZb.js";import{I as $}from"./B5wTVqxm.js";function y(r,o){m(o,!0);let a=u(o,["$$slots","$$events","$$legacy"]);const t=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"}]];$(r,h({name:"inbox"},()=>a,{get iconNode(){return t},children:(e,v)=>{var s=n(),p=l(s);f(p,()=>o.children??c),i(e,s)},$$slots:{default:!0}})),d()}export{y as I};
1
+ import{c as n,a as i}from"./y4GeEH6k.js";import{p as m,f as l,e as c,a as d}from"./CaAJD3dl.js";import{l as f}from"./Dd5umPsk.js";import{s as h,r as u}from"./Dg_zDpDS.js";import{I as $}from"./C5_PAZ0y.js";function y(r,o){m(o,!0);let a=u(o,["$$slots","$$events","$$legacy"]);const t=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"}]];$(r,h({name:"inbox"},()=>a,{get iconNode(){return t},children:(e,v)=>{var s=n(),p=l(s);f(p,()=>o.children??c),i(e,s)},$$slots:{default:!0}})),d()}export{y as I};
@@ -0,0 +1 @@
1
+ import{p as Q,c as P,a as c,f as T}from"./y4GeEH6k.js";import{b as y,g as r,d as a,u as h,p as z,f,a as U,c as V,e as W,r as X,s as ct}from"./CaAJD3dl.js";import{l as I,m as Y}from"./Dd5umPsk.js";import{p as i,i as F,r as Z,s as et}from"./Dg_zDpDS.js";import{e as d,c as Pt,g as Ct,a as j,f as L,d as $,m as A}from"./B25nWFyA.js";import{C as _t,P as ht,w as rt,o as Ot,S as Nt,E as It,n as B,F as St,a as wt,D as At,T as Dt,b as ut}from"./BypqA25-.js";const kt=Pt({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),E=new _t("Dialog.Root | AlertDialog.Root");class ot{static create(t){const o=E.getOr(null);return E.set(new ot(t,o))}opts;#t=y(null);get triggerNode(){return r(this.#t)}set triggerNode(t){a(this.#t,t,!0)}#e=y(null);get contentNode(){return r(this.#e)}set contentNode(t){a(this.#e,t,!0)}#r=y(null);get overlayNode(){return r(this.#r)}set overlayNode(t){a(this.#r,t,!0)}#o=y(null);get descriptionNode(){return r(this.#o)}set descriptionNode(t){a(this.#o,t,!0)}#s=y(void 0);get contentId(){return r(this.#s)}set contentId(t){a(this.#s,t,!0)}#n=y(void 0);get titleId(){return r(this.#n)}set titleId(t){a(this.#n,t,!0)}#i=y(void 0);get triggerId(){return r(this.#i)}set triggerId(t){a(this.#i,t,!0)}#a=y(void 0);get descriptionId(){return r(this.#a)}set descriptionId(t){a(this.#a,t,!0)}#d=y(null);get cancelNode(){return r(this.#d)}set cancelNode(t){a(this.#d,t,!0)}#l=y(0);get nestedOpenCount(){return r(this.#l)}set nestedOpenCount(t){a(this.#l,t,!0)}depth;parent;contentPresence;overlayPresence;constructor(t,o){this.opts=t,this.parent=o,this.depth=o?o.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new ht({ref:d(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new ht({ref:d(()=>this.overlayNode),open:this.opts.open,enabled:!0}),rt(()=>this.opts.open.current,s=>{this.parent&&(s?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),Ot(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=t=>kt.getAttr(t,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#c=h(()=>({"data-state":Ct(this.opts.open.current)}));get sharedProps(){return r(this.#c)}set sharedProps(t){a(this.#c,t)}}class st{static create(t){return new st(t,E.get())}opts;root;attachment;constructor(t,o){this.opts=t,this.root=o,this.attachment=j(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===Nt||t.key===It)&&(t.preventDefault(),this.root.handleClose())}#t=h(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return r(this.#t)}set props(t){a(this.#t,t)}}class nt{static create(t){return new nt(t,E.get())}opts;root;attachment;constructor(t,o){this.opts=t,this.root=o,this.root.titleId=this.opts.id.current,this.attachment=j(this.opts.ref),rt.pre(()=>this.opts.id.current,s=>{this.root.titleId=s})}#t=h(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment}));get props(){return r(this.#t)}set props(t){a(this.#t,t)}}class pt{static create(t){return new pt(t,E.get())}opts;root;attachment;constructor(t,o){this.opts=t,this.root=o,this.root.descriptionId=this.opts.id.current,this.attachment=j(this.opts.ref,s=>{this.root.descriptionNode=s}),rt.pre(()=>this.opts.id.current,s=>{this.root.descriptionId=s})}#t=h(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this.root.sharedProps,...this.attachment}));get props(){return r(this.#t)}set props(t){a(this.#t,t)}}class it{static create(t){return new it(t,E.get())}opts;root;attachment;constructor(t,o){this.opts=t,this.root=o,this.attachment=j(this.opts.ref,s=>{this.root.contentNode=s,this.root.contentId=s?.id})}#t=h(()=>({open:this.root.opts.open.current}));get snippetProps(){return r(this.#t)}set snippetProps(t){a(this.#t,t)}#e=h(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,"data-nested-open":L(this.root.nestedOpenCount>0),"data-nested":L(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return r(this.#e)}set props(t){a(this.#e,t)}get shouldRender(){return this.root.contentPresence.shouldRender}}class at{static create(t){return new at(t,E.get())}opts;root;attachment;constructor(t,o){this.opts=t,this.root=o,this.attachment=j(this.opts.ref,s=>this.root.overlayNode=s)}#t=h(()=>({open:this.root.opts.open.current}));get snippetProps(){return r(this.#t)}set snippetProps(t){a(this.#t,t)}#e=h(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":L(this.root.nestedOpenCount>0),"data-nested":L(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return r(this.#e)}set props(t){a(this.#e,t)}get shouldRender(){return this.root.overlayPresence.shouldRender}}var Ft=T("<div><!></div>");function Ht(C,t){const o=Q();z(t,!0);let s=i(t,"id",19,()=>$(o)),p=i(t,"ref",15,null),g=i(t,"level",3,2),_=Z(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const u=nt.create({id:d(()=>s()),level:d(()=>g()),ref:d(()=>p(),n=>p(n))}),m=h(()=>A(_,u.props));var b=P(),D=f(b);{var S=n=>{var e=P(),l=f(e);I(l,()=>t.child,()=>({props:r(m)})),c(n,e)},v=n=>{var e=Ft();Y(e,()=>({...r(m)}));var l=V(e);I(l,()=>t.children??W),X(e),c(n,e)};F(D,n=>{t.child?n(S):n(v,!1)})}c(C,b),U()}var Et=T("<div><!></div>");function Jt(C,t){const o=Q();z(t,!0);let s=i(t,"id",19,()=>$(o)),p=i(t,"forceMount",3,!1),g=i(t,"ref",15,null),_=Z(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const u=at.create({id:d(()=>s()),ref:d(()=>g(),v=>g(v))}),m=h(()=>A(_,u.props));var b=P(),D=f(b);{var S=v=>{var n=P(),e=f(n);{var l=w=>{var O=P(),N=f(O);{let G=h(()=>({props:A(r(m)),...u.snippetProps}));I(N,()=>t.child,()=>r(G))}c(w,O)},q=w=>{var O=Et();Y(O,G=>({...G}),[()=>A(r(m))]);var N=V(O);I(N,()=>t.children??W,()=>u.snippetProps),X(O),c(w,O)};F(e,w=>{t.child?w(l):w(q,!1)})}c(v,n)};F(D,v=>{(u.shouldRender||p())&&v(S)})}c(C,b),U()}function Lt(C,t){z(t,!0);let o=i(t,"open",15,!1),s=i(t,"onOpenChange",3,B),p=i(t,"onOpenChangeComplete",3,B);ot.create({variant:d(()=>"dialog"),open:d(()=>o(),u=>{o(u),s()(u)}),onOpenChangeComplete:d(()=>p())});var g=P(),_=f(g);I(_,()=>t.children??W),c(C,g),U()}var Rt=T("<button><!></button>");function Qt(C,t){const o=Q();z(t,!0);let s=i(t,"id",19,()=>$(o)),p=i(t,"ref",15,null),g=i(t,"disabled",3,!1),_=Z(t,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const u=st.create({variant:d(()=>"close"),id:d(()=>s()),ref:d(()=>p(),n=>p(n)),disabled:d(()=>!!g())}),m=h(()=>A(_,u.props));var b=P(),D=f(b);{var S=n=>{var e=P(),l=f(e);I(l,()=>t.child,()=>({props:r(m)})),c(n,e)},v=n=>{var e=Rt();Y(e,()=>({...r(m)}));var l=V(e);I(l,()=>t.children??W),X(e),c(n,e)};F(D,n=>{t.child?n(S):n(v,!1)})}c(C,b),U()}var Bt=T("<!> <!>",1),xt=T("<!> <div><!></div>",1);function Vt(C,t){const o=Q();z(t,!0);let s=i(t,"id",19,()=>$(o)),p=i(t,"ref",15,null),g=i(t,"forceMount",3,!1),_=i(t,"onCloseAutoFocus",3,B),u=i(t,"onOpenAutoFocus",3,B),m=i(t,"onEscapeKeydown",3,B),b=i(t,"onInteractOutside",3,B),D=i(t,"trapFocus",3,!0),S=i(t,"preventScroll",3,!0),v=i(t,"restoreScrollDelay",3,null),n=Z(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const e=it.create({id:d(()=>s()),ref:d(()=>p(),N=>p(N))}),l=h(()=>A(n,e.props));var q=P(),w=f(q);{var O=N=>{St(N,{get ref(){return e.opts.ref},loop:!0,get trapFocus(){return D()},get enabled(){return e.root.opts.open.current},get onOpenAutoFocus(){return u()},get onCloseAutoFocus(){return _()},focusScope:(ft,gt)=>{let dt=()=>gt?.().props;wt(ft,et(()=>r(l),{get enabled(){return e.root.opts.open.current},get ref(){return e.opts.ref},onEscapeKeydown:H=>{m()(H),!H.defaultPrevented&&e.root.handleClose()},children:(H,Mt)=>{At(H,et(()=>r(l),{get ref(){return e.opts.ref},get enabled(){return e.root.opts.open.current},onInteractOutside:J=>{b()(J),!J.defaultPrevented&&e.root.handleClose()},children:(J,Kt)=>{Dt(J,et(()=>r(l),{get ref(){return e.opts.ref},get enabled(){return e.root.opts.open.current},children:(vt,Tt)=>{var lt=P(),mt=f(lt);{var bt=R=>{var x=Bt(),M=f(x);{var K=k=>{ut(k,{get preventScroll(){return S()},get restoreScrollDelay(){return v()}})};F(M,k=>{e.root.opts.open.current&&k(K)})}var tt=ct(M,2);{let k=h(()=>({props:A(r(l),dt()),...e.snippetProps}));I(tt,()=>t.child,()=>r(k))}c(R,x)},yt=R=>{var x=xt(),M=f(x);ut(M,{get preventScroll(){return S()}});var K=ct(M,2);Y(K,k=>({...k}),[()=>A(r(l),dt())]);var tt=V(K);I(tt,()=>t.children??W),X(K),c(R,x)};F(mt,R=>{t.child?R(bt):R(yt,!1)})}c(vt,lt)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};F(w,N=>{(e.shouldRender||g())&&N(O)})}c(C,q),U()}export{Lt as D,Jt as a,Qt as b,Vt as c,Ht as d,pt as e};
@@ -0,0 +1 @@
1
+ import{c as n,a as d}from"./y4GeEH6k.js";import{p as i,f as h,e as m,a as c}from"./CaAJD3dl.js";import{l as f}from"./Dd5umPsk.js";import{s as l,r as u}from"./Dg_zDpDS.js";import{I as $}from"./C5_PAZ0y.js";function B(r,t){i(t,!0);let a=u(t,["$$slots","$$events","$$legacy"]);const s=[["path",{d:"M12 8V4H8"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}],["path",{d:"M2 14h2"}],["path",{d:"M20 14h2"}],["path",{d:"M15 13v2"}],["path",{d:"M9 13v2"}]];$(r,l({name:"bot"},()=>a,{get iconNode(){return s},children:(e,v)=>{var o=n(),p=h(o);f(p,()=>t.children??m),d(e,o)},$$slots:{default:!0}})),c()}export{B};
@@ -1 +1 @@
1
- var Gt=Array.isArray,Kt=Array.prototype.indexOf,Mn=Array.from,Fn=Object.defineProperty,ve=Object.getOwnPropertyDescriptor,$t=Object.getOwnPropertyDescriptors,zt=Object.prototype,Xt=Array.prototype,at=Object.getPrototypeOf,Qe=Object.isExtensible;function jn(e){return typeof e=="function"}const Ee=()=>{};function Ln(e){return e()}function Zt(e){for(var t=0;t<e.length;t++)e[t]()}function lt(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function qn(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const g=2,ge=4,pe=8,He=1<<24,F=16,j=32,z=64,ut=128,N=512,E=1024,S=2048,L=4096,P=8192,H=16384,Ue=32768,me=65536,et=1<<17,ot=1<<18,oe=1<<19,ct=1<<20,Yn=1<<25,te=32768,Fe=1<<21,Ve=1<<22,U=1<<23,J=Symbol("$state"),Hn=Symbol("legacy props"),Un=Symbol(""),fe=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Bn=1,Be=3,_t=8;function Wt(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Jt(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Qt(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function en(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function tn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function nn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Gn(){throw new Error("https://svelte.dev/e/hydration_failed")}function Kn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function rn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function sn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function $n(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const zn=1,Xn=2,Zn=4,Wn=8,Jn=16,Qn=1,er=2,tr=4,nr=8,rr=16,sr=1,fr=2,an="[",ln="[!",un="]",Ge={},b=Symbol(),ir="http://www.w3.org/1999/xhtml",ar="http://www.w3.org/2000/svg",lr="@attach";function Ke(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function ur(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function or(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let B=!1;function cr(e){B=e}let x;function ae(e){if(e===null)throw Ke(),Ge;return x=e}function _r(){return ae(X(x))}function vr(e){if(B){if(X(x)!==null)throw Ke(),Ge;x=e}}function dr(e=1){if(B){for(var t=e,n=x;t--;)n=X(n);x=n}}function pr(e=!0){for(var t=0,n=x;;){if(n.nodeType===_t){var r=n.data;if(r===un){if(t===0)return n;t-=1}else(r===an||r===ln)&&(t+=1)}var s=X(n);e&&n.remove(),n=s}}function hr(e){if(!e||e.nodeType!==_t)throw Ke(),Ge;return e.data}function vt(e){return e===this.v}function dt(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function pt(e){return!dt(e,this.v)}let Ce=!1;function yr(){Ce=!0}let y=null;function Te(e){y=e}function wr(e){return De().get(e)}function br(e,t){return De().set(e,t),t}function Er(e){return De().has(e)}function gr(){return De()}function mr(e,t=!1,n){y={p:y,i:!1,c:null,e:null,s:e,x:null,l:Ce&&!t?{s:null,u:null,$:[]}:null}}function Tr(e){var t=y,n=t.e;if(n!==null){t.e=null;for(var r of n)Ct(r)}return e!==void 0&&(t.x=e),t.i=!0,y=t.p,e??{}}function he(){return!Ce||y!==null&&y.l===null}function De(e){return y===null&&Wt(),y.c??=new Map(on(y)||void 0)}function on(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}let Z=[];function ht(){var e=Z;Z=[],Zt(e)}function yt(e){if(Z.length===0&&!de){var t=Z;queueMicrotask(()=>{t===Z&&ht()})}Z.push(e)}function cn(){for(;Z.length>0;)ht()}function _n(e){var t=p;if(t===null)return _.f|=U,e;if((t.f&Ue)===0){if((t.f&ut)===0)throw e;t.b.error(e)}else Ae(e,t)}function Ae(e,t){for(;t!==null;){if((t.f&ut)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const vn=-7169;function m(e,t){e.f=e.f&vn|t}function $e(e){(e.f&N)!==0||e.deps===null?m(e,E):m(e,L)}function wt(e){if(e!==null)for(const t of e)(t.f&g)===0||(t.f&te)===0||(t.f^=te,wt(t.deps))}function dn(e,t,n){(e.f&S)!==0?t.add(e):(e.f&L)!==0&&n.add(e),wt(e.deps),m(e,E)}const be=new Set;let h=null,Ie=null,D=null,O=[],ke=null,je=!1,de=!1;class G{committed=!1;current=new Map;previous=new Map;#n=new Set;#r=new Set;#e=0;#t=0;#i=null;#s=new Set;#f=new Set;skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#t>0}process(t){O=[],Ie=null,this.apply();var n=[],r=[];for(const s of t)this.#a(s,n,r);this.is_fork||this.#u(),this.is_deferred()?(this.#l(r),this.#l(n)):(Ie=this,h=null,tt(r),tt(n),Ie=null,this.#i?.resolve()),D=null}#a(t,n,r){t.f^=E;for(var s=t.first,f=null;s!==null;){var u=s.f,a=(u&(j|z))!==0,l=a&&(u&E)!==0,i=l||(u&P)!==0||this.skipped_effects.has(s);if(!i&&s.fn!==null){a?s.f^=E:f!==null&&(u&(ge|pe|He))!==0?f.b.defer_effect(s):(u&ge)!==0?n.push(s):ce(s)&&((u&F)!==0&&this.#s.add(s),ue(s));var o=s.first;if(o!==null){s=o;continue}}var c=s.parent;for(s=s.next;s===null&&c!==null;)c===f&&(f=null),s=c.next,c=c.parent}}#l(t){for(var n=0;n<t.length;n+=1)dn(t[n],this.#s,this.#f)}capture(t,n){n!==b&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&U)===0&&(this.current.set(t,t.v),D?.set(t,t.v))}activate(){h=this,this.apply()}deactivate(){h===this&&(h=null,D=null)}flush(){if(this.activate(),O.length>0){if(bt(),h!==null&&h!==this)return}else this.#e===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#r)t(this);this.#r.clear()}#u(){if(this.#t===0){for(const t of this.#n)t();this.#n.clear()}this.#e===0&&this.#o()}#o(){if(be.size>1){this.previous.clear();var t=D,n=!0;for(const s of be){if(s===this){n=!1;continue}const f=[];for(const[a,l]of this.current){if(s.current.has(a))if(n&&l!==s.current.get(a))s.current.set(a,l);else continue;f.push(a)}if(f.length===0)continue;const u=[...s.current.keys()].filter(a=>!this.current.has(a));if(u.length>0){var r=O;O=[];const a=new Set,l=new Map;for(const i of f)Et(i,u,a,l);if(O.length>0){h=s,s.apply();for(const i of O)s.#a(i,[],[]);s.deactivate()}O=r}}h=null,D=t}this.committed=!0,be.delete(this)}increment(t){this.#e+=1,t&&(this.#t+=1)}decrement(t){this.#e-=1,t&&(this.#t-=1),this.revive()}revive(){for(const t of this.#s)this.#f.delete(t),m(t,S),ne(t);for(const t of this.#f)m(t,L),ne(t);this.flush()}oncommit(t){this.#n.add(t)}ondiscard(t){this.#r.add(t)}settled(){return(this.#i??=lt()).promise}static ensure(){if(h===null){const t=h=new G;be.add(h),de||G.enqueue(()=>{h===t&&t.flush()})}return h}static enqueue(t){yt(t)}apply(){}}function pn(e){var t=de;de=!0;try{for(var n;;){if(cn(),O.length===0&&(h?.flush(),O.length===0))return ke=null,n;bt()}}finally{de=t}}function bt(){var e=Q;je=!0;var t=null;try{var n=0;for(Oe(!0);O.length>0;){var r=G.ensure();if(n++>1e3){var s,f;hn()}r.process(O),V.clear()}}finally{je=!1,Oe(e),ke=null}}function hn(){try{nn()}catch(e){Ae(e,ke)}}let I=null;function tt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(H|P))===0&&ce(r)&&(I=new Set,ue(r),r.deps===null&&r.first===null&&r.nodes===null&&(r.teardown===null&&r.ac===null?It(r):r.fn=null),I?.size>0)){V.clear();for(const s of I){if((s.f&(H|P))!==0)continue;const f=[s];let u=s.parent;for(;u!==null;)I.has(u)&&(I.delete(u),f.push(u)),u=u.parent;for(let a=f.length-1;a>=0;a--){const l=f[a];(l.f&(H|P))===0&&ue(l)}}I.clear()}}I=null}}function Et(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const f=s.f;(f&g)!==0?Et(s,t,n,r):(f&(Ve|F))!==0&&(f&S)===0&&gt(s,t,r)&&(m(s,S),ne(s))}}function gt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(t.includes(s))return!0;if((s.f&g)!==0&&gt(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function ne(e){for(var t=ke=e;t.parent!==null;){t=t.parent;var n=t.f;if(je&&t===p&&(n&F)!==0&&(n&ot)===0)return;if((n&(z|j))!==0){if((n&E)===0)return;t.f^=E}}O.push(t)}function yn(e,t,n,r){const s=he()?ze:En;if(n.length===0&&e.length===0){r(t.map(s));return}var f=h,u=p,a=wn();function l(){Promise.all(n.map(i=>bn(i))).then(i=>{a();try{r([...t.map(s),...i])}catch(o){(u.f&H)===0&&Ae(o,u)}f?.deactivate(),xe()}).catch(i=>{Ae(i,u)})}e.length>0?Promise.all(e).then(()=>{a();try{return l()}finally{f?.deactivate(),xe()}}):l()}function wn(){var e=p,t=_,n=y,r=h;return function(f=!0){le(e),$(t),Te(n),f&&r?.activate()}}function xe(){le(null),$(null),Te(null)}function ze(e){var t=g|S,n=_!==null&&(_.f&g)!==0?_:null;return p!==null&&(p.f|=oe),{ctx:y,deps:null,effects:null,equals:vt,f:t,fn:e,reactions:null,rv:0,v:b,wv:0,parent:n??p,ac:null}}function bn(e,t,n){let r=p;r===null&&Jt();var s=r.b,f=void 0,u=Ze(b),a=!_,l=new Map;return On(()=>{var i=lt();f=i.promise;try{Promise.resolve(e()).then(i.resolve,i.reject).then(()=>{o===h&&o.committed&&o.deactivate(),xe()})}catch(d){i.reject(d),xe()}var o=h;if(a){var c=s.is_rendered();s.update_pending_count(1),o.increment(c),l.get(o)?.reject(fe),l.delete(o),l.set(o,i)}const v=(d,w=void 0)=>{if(o.activate(),w)w!==fe&&(u.f|=U,qe(u,w));else{(u.f&U)!==0&&(u.f^=U),qe(u,d);for(const[ye,we]of l){if(l.delete(ye),ye===o)break;we.reject(fe)}}a&&(s.update_pending_count(-1),o.decrement(c))};i.promise.then(v,d=>v(null,d||"unknown"))}),Rn(()=>{for(const i of l.values())i.reject(fe)}),new Promise(i=>{function o(c){function v(){c===f?i(u):o(f)}c.then(v,v)}o(f)})}function Ar(e){const t=ze(e);return jt(t),t}function En(e){const t=ze(e);return t.equals=pt,t}function mt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)K(t[n])}}function gn(e){for(var t=e.parent;t!==null;){if((t.f&g)===0)return(t.f&H)===0?t:null;t=t.parent}return null}function Xe(e){var t,n=p;le(gn(e));try{e.f&=~te,mt(e),t=Ht(e)}finally{le(n)}return t}function Tt(e){var t=Xe(e);if(!e.equals(t)&&(e.wv=qt(),(!h?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){m(e,E);return}re||(D!==null?(Nt()||h?.is_fork)&&D.set(e,t):$e(e))}let Le=new Set;const V=new Map;let At=!1;function Ze(e,t){var n={f:0,v:e,reactions:null,equals:vt,rv:0,wv:0};return n}function q(e,t){const n=Ze(e);return jt(n),n}function xr(e,t=!1,n=!0){const r=Ze(e);return t||(r.equals=pt),Ce&&n&&y!==null&&y.l!==null&&(y.l.s??=[]).push(r),r}function Y(e,t,n=!1){_!==null&&(!k||(_.f&et)!==0)&&he()&&(_.f&(g|F|Ve|et))!==0&&!M?.includes(e)&&fn();let r=n?_e(t):t;return qe(e,r)}function qe(e,t){if(!e.equals(t)){var n=e.v;re?V.set(e,t):V.set(e,n),e.v=t;var r=G.ensure();if(r.capture(e,n),(e.f&g)!==0){const s=e;(e.f&S)!==0&&Xe(s),$e(s)}e.wv=qt(),xt(e,S),he()&&p!==null&&(p.f&E)!==0&&(p.f&(j|z))===0&&(R===null?kn([e]):R.push(e)),!r.is_fork&&Le.size>0&&!At&&mn()}return t}function mn(){At=!1;var e=Q;Oe(!0);const t=Array.from(Le);try{for(const n of t)(n.f&E)!==0&&m(n,L),ce(n)&&ue(n)}finally{Oe(e)}Le.clear()}function Sr(e,t=1){var n=ie(e),r=t===1?n++:n--;return Y(e,n),r}function Me(e){Y(e,e.v+1)}function xt(e,t){var n=e.reactions;if(n!==null)for(var r=he(),s=n.length,f=0;f<s;f++){var u=n[f],a=u.f;if(!(!r&&u===p)){var l=(a&S)===0;if(l&&m(u,t),(a&g)!==0){var i=u;D?.delete(i),(a&te)===0&&(a&N&&(u.f|=te),xt(i,L))}else l&&((a&F)!==0&&I!==null&&I.add(u),ne(u))}}}function _e(e){if(typeof e!="object"||e===null||J in e)return e;const t=at(e);if(t!==zt&&t!==Xt)return e;var n=new Map,r=Gt(e),s=q(0),f=ee,u=a=>{if(ee===f)return a();var l=_,i=ee;$(null),it(f);var o=a();return $(l),it(i),o};return r&&n.set("length",q(e.length)),new Proxy(e,{defineProperty(a,l,i){(!("value"in i)||i.configurable===!1||i.enumerable===!1||i.writable===!1)&&rn();var o=n.get(l);return o===void 0?o=u(()=>{var c=q(i.value);return n.set(l,c),c}):Y(o,i.value,!0),!0},deleteProperty(a,l){var i=n.get(l);if(i===void 0){if(l in a){const o=u(()=>q(b));n.set(l,o),Me(s)}}else Y(i,b),Me(s);return!0},get(a,l,i){if(l===J)return e;var o=n.get(l),c=l in a;if(o===void 0&&(!c||ve(a,l)?.writable)&&(o=u(()=>{var d=_e(c?a[l]:b),w=q(d);return w}),n.set(l,o)),o!==void 0){var v=ie(o);return v===b?void 0:v}return Reflect.get(a,l,i)},getOwnPropertyDescriptor(a,l){var i=Reflect.getOwnPropertyDescriptor(a,l);if(i&&"value"in i){var o=n.get(l);o&&(i.value=ie(o))}else if(i===void 0){var c=n.get(l),v=c?.v;if(c!==void 0&&v!==b)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return i},has(a,l){if(l===J)return!0;var i=n.get(l),o=i!==void 0&&i.v!==b||Reflect.has(a,l);if(i!==void 0||p!==null&&(!o||ve(a,l)?.writable)){i===void 0&&(i=u(()=>{var v=o?_e(a[l]):b,d=q(v);return d}),n.set(l,i));var c=ie(i);if(c===b)return!1}return o},set(a,l,i,o){var c=n.get(l),v=l in a;if(r&&l==="length")for(var d=i;d<c.v;d+=1){var w=n.get(d+"");w!==void 0?Y(w,b):d in a&&(w=u(()=>q(b)),n.set(d+"",w))}if(c===void 0)(!v||ve(a,l)?.writable)&&(c=u(()=>q(void 0)),Y(c,_e(i)),n.set(l,c));else{v=c.v!==b;var ye=u(()=>_e(i));Y(c,ye)}var we=Reflect.getOwnPropertyDescriptor(a,l);if(we?.set&&we.set.call(o,i),!v){if(r&&typeof l=="string"){var Je=n.get("length"),Pe=Number(l);Number.isInteger(Pe)&&Pe>=Je.v&&Y(Je,Pe+1)}Me(s)}return!0},ownKeys(a){ie(s);var l=Reflect.ownKeys(a).filter(c=>{var v=n.get(c);return v===void 0||v.v!==b});for(var[i,o]of n)o.v!==b&&!(i in a)&&l.push(i);return l},setPrototypeOf(){sn()}})}function nt(e){try{if(e!==null&&typeof e=="object"&&J in e)return e[J]}catch{}return e}function Rr(e,t){return Object.is(nt(e),nt(t))}var rt,Tn,St,Rt;function Or(){if(rt===void 0){rt=window,Tn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;St=ve(t,"firstChild").get,Rt=ve(t,"nextSibling").get,Qe(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Qe(n)&&(n.__t=void 0)}}function Se(e=""){return document.createTextNode(e)}function Re(e){return St.call(e)}function X(e){return Rt.call(e)}function Nr(e,t){if(!B)return Re(e);var n=Re(x);if(n===null)n=x.appendChild(Se());else if(t&&n.nodeType!==Be){var r=Se();return n?.before(r),ae(r),r}return ae(n),n}function Cr(e,t=!1){if(!B){var n=Re(e);return n instanceof Comment&&n.data===""?X(n):n}if(t&&x?.nodeType!==Be){var r=Se();return x?.before(r),ae(r),r}return x}function Dr(e,t=1,n=!1){let r=B?x:e;for(var s;t--;)s=r,r=X(r);if(!B)return r;if(n&&r?.nodeType!==Be){var f=Se();return r===null?s?.after(f):r.before(f),ae(f),f}return ae(r),r}function An(e){e.textContent=""}function kr(){return!1}function Pr(e,t){if(t){const n=document.body;e.autofocus=!0,yt(()=>{document.activeElement===n&&e.focus()})}}function Ir(e){B&&Re(e)!==null&&An(e)}let st=!1;function xn(){st||(st=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function We(e){var t=_,n=p;$(null),le(null);try{return e()}finally{$(t),le(n)}}function Mr(e,t,n,r=n){e.addEventListener(t,()=>We(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),xn()}function Ot(e){p===null&&(_===null&&tn(),en()),re&&Qt()}function Sn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function C(e,t,n){var r=p;r!==null&&(r.f&P)!==0&&(e|=P);var s={ctx:y,deps:null,nodes:null,f:e|S|N,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{ue(s),s.f|=Ue}catch(a){throw K(s),a}else t!==null&&ne(s);var f=s;if(n&&f.deps===null&&f.teardown===null&&f.nodes===null&&f.first===f.last&&(f.f&oe)===0&&(f=f.first,(e&F)!==0&&(e&me)!==0&&f!==null&&(f.f|=me)),f!==null&&(f.parent=r,r!==null&&Sn(f,r),_!==null&&(_.f&g)!==0&&(e&z)===0)){var u=_;(u.effects??=[]).push(f)}return s}function Nt(){return _!==null&&!k}function Rn(e){const t=C(pe,null,!1);return m(t,E),t.teardown=e,t}function Fr(e){Ot();var t=p.f,n=!_&&(t&j)!==0&&(t&Ue)===0;if(n){var r=y;(r.e??=[]).push(e)}else return Ct(e)}function Ct(e){return C(ge|ct,e,!1)}function jr(e){return Ot(),C(pe|ct,e,!0)}function Lr(e){G.ensure();const t=C(z|oe,e,!0);return()=>{K(t)}}function qr(e){G.ensure();const t=C(z|oe,e,!0);return(n={})=>new Promise(r=>{n.outro?Dn(t,()=>{K(t),r(void 0)}):(K(t),r(void 0))})}function Yr(e){return C(ge,e,!1)}function Hr(e,t){var n=y,r={effect:null,ran:!1,deps:e};n.l.$.push(r),r.effect=Dt(()=>{e(),!r.ran&&(r.ran=!0,Bt(t))})}function Ur(){var e=y;Dt(()=>{for(var t of e.l.$){t.deps();var n=t.effect;(n.f&E)!==0&&n.deps!==null&&m(n,L),ce(n)&&ue(n),t.ran=!1}})}function On(e){return C(Ve|oe,e,!0)}function Dt(e,t=0){return C(pe|t,e,!0)}function Vr(e,t=[],n=[],r=[]){yn(r,t,n,s=>{C(pe,()=>e(...s.map(ie)),!0)})}function Br(e,t=0){var n=C(F|t,e,!0);return n}function Gr(e,t=0){var n=C(He|t,e,!0);return n}function Kr(e){return C(j|oe,e,!0)}function kt(e){var t=e.teardown;if(t!==null){const n=re,r=_;ft(!0),$(null);try{t.call(null)}finally{ft(n),$(r)}}}function Pt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&We(()=>{s.abort(fe)});var r=n.next;(n.f&z)!==0?n.parent=null:K(n,t),n=r}}function Nn(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&j)===0&&K(t),t=n}}function K(e,t=!0){var n=!1;(t||(e.f&ot)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Cn(e.nodes.start,e.nodes.end),n=!0),Pt(e,t&&!n),Ne(e,0),m(e,H);var r=e.nodes&&e.nodes.t;if(r!==null)for(const f of r)f.stop();kt(e);var s=e.parent;s!==null&&s.first!==null&&It(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Cn(e,t){for(;e!==null;){var n=e===t?null:X(e);e.remove(),e=n}}function It(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Dn(e,t,n=!0){var r=[];Mt(e,r,!0);var s=()=>{n&&K(e),t&&t()},f=r.length;if(f>0){var u=()=>--f||s();for(var a of r)a.out(u)}else s()}function Mt(e,t,n){if((e.f&P)===0){e.f^=P;var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)(a.is_global||n)&&t.push(a);for(var s=e.first;s!==null;){var f=s.next,u=(s.f&me)!==0||(s.f&j)!==0&&(e.f&F)!==0;Mt(s,t,u?n:!1),s=f}}}function $r(e){Ft(e,!0)}function Ft(e,t){if((e.f&P)!==0){e.f^=P,(e.f&E)===0&&(m(e,S),ne(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&me)!==0||(n.f&j)!==0;Ft(n,s?t:!1),n=r}var f=e.nodes&&e.nodes.t;if(f!==null)for(const u of f)(u.is_global||t)&&u.in()}}function zr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:X(n);t.append(n),n=s}}let Q=!1;function Oe(e){Q=e}let re=!1;function ft(e){re=e}let _=null,k=!1;function $(e){_=e}let p=null;function le(e){p=e}let M=null;function jt(e){_!==null&&(M===null?M=[e]:M.push(e))}let T=null,A=0,R=null;function kn(e){R=e}let Lt=1,W=0,ee=W;function it(e){ee=e}function qt(){return++Lt}function ce(e){var t=e.f;if((t&S)!==0)return!0;if(t&g&&(e.f&=~te),(t&L)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var f=n[s];if(ce(f)&&Tt(f),f.wv>e.wv)return!0}(t&N)!==0&&D===null&&m(e,E)}return!1}function Yt(e,t,n=!0){var r=e.reactions;if(r!==null&&!M?.includes(e))for(var s=0;s<r.length;s++){var f=r[s];(f.f&g)!==0?Yt(f,t,!1):t===f&&(n?m(f,S):(f.f&E)!==0&&m(f,L),ne(f))}}function Ht(e){var t=T,n=A,r=R,s=_,f=M,u=y,a=k,l=ee,i=e.f;T=null,A=0,R=null,_=(i&(j|z))===0?e:null,M=null,Te(e.ctx),k=!1,ee=++W,e.ac!==null&&(We(()=>{e.ac.abort(fe)}),e.ac=null);try{e.f|=Fe;var o=e.fn,c=o(),v=e.deps;if(T!==null){var d;if(Ne(e,A),v!==null&&A>0)for(v.length=A+T.length,d=0;d<T.length;d++)v[A+d]=T[d];else e.deps=v=T;if(Nt()&&(e.f&N)!==0)for(d=A;d<v.length;d++)(v[d].reactions??=[]).push(e)}else v!==null&&A<v.length&&(Ne(e,A),v.length=A);if(he()&&R!==null&&!k&&v!==null&&(e.f&(g|L|S))===0)for(d=0;d<R.length;d++)Yt(R[d],e);if(s!==null&&s!==e){if(W++,s.deps!==null)for(let w=0;w<n;w+=1)s.deps[w].rv=W;if(t!==null)for(const w of t)w.rv=W;R!==null&&(r===null?r=R:r.push(...R))}return(e.f&U)!==0&&(e.f^=U),c}catch(w){return _n(w)}finally{e.f^=Fe,T=t,A=n,R=r,_=s,M=f,Te(u),k=a,ee=l}}function Pn(e,t){let n=t.reactions;if(n!==null){var r=Kt.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}if(n===null&&(t.f&g)!==0&&(T===null||!T.includes(t))){var f=t;(f.f&N)!==0&&(f.f^=N,f.f&=~te),$e(f),mt(f),Ne(f,0)}}function Ne(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Pn(e,n[r])}function ue(e){var t=e.f;if((t&H)===0){m(e,E);var n=p,r=Q;p=e,Q=!0;try{(t&(F|He))!==0?Nn(e):Pt(e),kt(e);var s=Ht(e);e.teardown=typeof s=="function"?s:null,e.wv=Lt;var f}finally{Q=r,p=n}}}async function Xr(){await Promise.resolve(),pn()}function Zr(){return G.ensure().settled()}function ie(e){var t=e.f,n=(t&g)!==0;if(_!==null&&!k){var r=p!==null&&(p.f&H)!==0;if(!r&&!M?.includes(e)){var s=_.deps;if((_.f&Fe)!==0)e.rv<W&&(e.rv=W,T===null&&s!==null&&s[A]===e?A++:T===null?T=[e]:T.push(e));else{(_.deps??=[]).push(e);var f=e.reactions;f===null?e.reactions=[_]:f.includes(_)||f.push(_)}}}if(re&&V.has(e))return V.get(e);if(n){var u=e;if(re){var a=u.v;return((u.f&E)===0&&u.reactions!==null||Vt(u))&&(a=Xe(u)),V.set(u,a),a}var l=(u.f&N)===0&&!k&&_!==null&&(Q||(_.f&N)!==0),i=u.deps===null;ce(u)&&(l&&(u.f|=N),Tt(u)),l&&!i&&Ut(u)}if(D?.has(e))return D.get(e);if((e.f&U)!==0)throw e.v;return e.v}function Ut(e){if(e.deps!==null){e.f|=N;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&g)!==0&&(t.f&N)===0&&Ut(t)}}function Vt(e){if(e.v===b)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(V.has(t)||(t.f&g)!==0&&Vt(t))return!0;return!1}function Bt(e){var t=k;try{return k=!0,e()}finally{k=t}}function Wr(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(J in e)Ye(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&J in n&&Ye(n)}}}function Ye(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{Ye(e[r],t)}catch{}const n=at(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=$t(n);for(let s in r){const f=r[s].get;if(f)try{f.call(e)}catch{}}}}}function In(e,t,n){if(e==null)return t(void 0),Ee;const r=Bt(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const se=[];function Jr(e,t=Ee){let n=null;const r=new Set;function s(a){if(dt(e,a)&&(e=a,n)){const l=!se.length;for(const i of r)i[1](),se.push(i,e);if(l){for(let i=0;i<se.length;i+=2)se[i][0](se[i+1]);se.length=0}}}function f(a){s(a(e))}function u(a,l=Ee){const i=[a,l];return r.add(i),r.size===1&&(n=t(s,f)||Ee),a(e),()=>{r.delete(i),r.size===0&&n&&(n(),n=null)}}return{set:s,update:f,subscribe:u}}function Qr(e){let t;return In(e,n=>t=n)(),t}export{rt as $,jr as A,Zt as B,Ln as C,Wr as D,me as E,ze as F,yr as G,Wt as H,Ce as I,Gt as J,xr as K,In as L,Qr as M,Rn as N,Fn as O,Sr as P,qn as Q,$r as R,K as S,Dn as T,Se as U,Kr as V,x as W,zr as X,kr as Y,hr as Z,ln as _,Tr as a,zn as a$,pr as a0,ae as a1,cr as a2,Yr as a3,yt as a4,J as a5,ve as a6,Kn as a7,tr as a8,En as a9,m as aA,S as aB,ne as aC,L as aD,qe as aE,Ae as aF,$n as aG,oe as aH,ut as aI,or as aJ,We as aK,Or as aL,an as aM,X as aN,Ge as aO,Gn as aP,An as aQ,Mn as aR,qr as aS,un as aT,Ke as aU,pn as aV,Cn as aW,lr as aX,Hr as aY,Ur as aZ,Yn as a_,re as aa,p as ab,H as ac,nr as ad,er as ae,Qn as af,jn as ag,Hn as ah,rr as ai,Ze as aj,le as ak,Re as al,Tn as am,sr as an,fr as ao,Ue as ap,_t as aq,Be as ar,Nt as as,Me as at,G as au,dn as av,$ as aw,Te as ax,_n as ay,_ as az,q as b,Jn as b0,Xn as b1,P as b2,Zn as b3,Wn as b4,Bn as b5,ar as b6,Gr as b7,ur as b8,Rr as b9,yn as ba,Pr as bb,b as bc,xn as bd,ir as be,at as bf,Un as bg,$t as bh,he as bi,ee as bj,Er as bk,wr as bl,br as bm,gr as bn,Lr as bo,zt as bp,ot as bq,Jr as br,Zr as bs,Nr as c,_e as d,Y as e,Cr as f,ie as g,Ar as h,Ee as i,Ir as j,h as k,Mr as l,Xr as m,dr as n,B as o,mr as p,Bt as q,vr as r,Dr as s,Vr as t,Fr as u,Dt as v,Ie as w,Br as x,_r as y,y as z};
1
+ var Gt=Array.isArray,Kt=Array.prototype.indexOf,Mn=Array.from,Fn=Object.defineProperty,ve=Object.getOwnPropertyDescriptor,$t=Object.getOwnPropertyDescriptors,zt=Object.prototype,Xt=Array.prototype,at=Object.getPrototypeOf,Qe=Object.isExtensible;function jn(e){return typeof e=="function"}const Ee=()=>{};function Ln(e){return e()}function Zt(e){for(var t=0;t<e.length;t++)e[t]()}function lt(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function qn(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const g=2,ge=4,pe=8,He=1<<24,F=16,j=32,z=64,ut=128,N=512,E=1024,S=2048,L=4096,P=8192,H=16384,Ue=32768,me=65536,et=1<<17,ot=1<<18,oe=1<<19,ct=1<<20,Yn=1<<25,te=32768,Fe=1<<21,Ve=1<<22,U=1<<23,J=Symbol("$state"),Hn=Symbol("legacy props"),Un=Symbol(""),fe=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Bn=1,Be=3,_t=8;function Wt(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Jt(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Qt(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function en(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function tn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function nn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Gn(){throw new Error("https://svelte.dev/e/hydration_failed")}function Kn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function rn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function sn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function $n(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const zn=1,Xn=2,Zn=4,Wn=8,Jn=16,Qn=1,er=2,tr=4,nr=8,rr=16,sr=1,fr=2,an="[",ln="[!",un="]",Ge={},b=Symbol(),ir="http://www.w3.org/1999/xhtml",ar="http://www.w3.org/2000/svg",lr="@attach";function Ke(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function ur(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function or(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let B=!1;function cr(e){B=e}let x;function ae(e){if(e===null)throw Ke(),Ge;return x=e}function _r(){return ae(X(x))}function vr(e){if(B){if(X(x)!==null)throw Ke(),Ge;x=e}}function dr(e=1){if(B){for(var t=e,n=x;t--;)n=X(n);x=n}}function pr(e=!0){for(var t=0,n=x;;){if(n.nodeType===_t){var r=n.data;if(r===un){if(t===0)return n;t-=1}else(r===an||r===ln)&&(t+=1)}var s=X(n);e&&n.remove(),n=s}}function hr(e){if(!e||e.nodeType!==_t)throw Ke(),Ge;return e.data}function vt(e){return e===this.v}function dt(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function pt(e){return!dt(e,this.v)}let Ce=!1;function yr(){Ce=!0}let y=null;function Te(e){y=e}function wr(e){return De().get(e)}function br(e,t){return De().set(e,t),t}function Er(e){return De().has(e)}function gr(){return De()}function mr(e,t=!1,n){y={p:y,i:!1,c:null,e:null,s:e,x:null,l:Ce&&!t?{s:null,u:null,$:[]}:null}}function Tr(e){var t=y,n=t.e;if(n!==null){t.e=null;for(var r of n)Ct(r)}return e!==void 0&&(t.x=e),t.i=!0,y=t.p,e??{}}function he(){return!Ce||y!==null&&y.l===null}function De(e){return y===null&&Wt(),y.c??=new Map(on(y)||void 0)}function on(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}let Z=[];function ht(){var e=Z;Z=[],Zt(e)}function yt(e){if(Z.length===0&&!de){var t=Z;queueMicrotask(()=>{t===Z&&ht()})}Z.push(e)}function cn(){for(;Z.length>0;)ht()}function _n(e){var t=p;if(t===null)return _.f|=U,e;if((t.f&Ue)===0){if((t.f&ut)===0)throw e;t.b.error(e)}else Ae(e,t)}function Ae(e,t){for(;t!==null;){if((t.f&ut)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const vn=-7169;function m(e,t){e.f=e.f&vn|t}function $e(e){(e.f&N)!==0||e.deps===null?m(e,E):m(e,L)}function wt(e){if(e!==null)for(const t of e)(t.f&g)===0||(t.f&te)===0||(t.f^=te,wt(t.deps))}function dn(e,t,n){(e.f&S)!==0?t.add(e):(e.f&L)!==0&&n.add(e),wt(e.deps),m(e,E)}const be=new Set;let h=null,Ie=null,D=null,O=[],ke=null,je=!1,de=!1;class G{committed=!1;current=new Map;previous=new Map;#n=new Set;#r=new Set;#e=0;#t=0;#i=null;#s=new Set;#f=new Set;skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#t>0}process(t){O=[],Ie=null,this.apply();var n=[],r=[];for(const s of t)this.#a(s,n,r);this.is_fork||this.#u(),this.is_deferred()?(this.#l(r),this.#l(n)):(Ie=this,h=null,tt(r),tt(n),Ie=null,this.#i?.resolve()),D=null}#a(t,n,r){t.f^=E;for(var s=t.first,f=null;s!==null;){var u=s.f,a=(u&(j|z))!==0,l=a&&(u&E)!==0,i=l||(u&P)!==0||this.skipped_effects.has(s);if(!i&&s.fn!==null){a?s.f^=E:f!==null&&(u&(ge|pe|He))!==0?f.b.defer_effect(s):(u&ge)!==0?n.push(s):ce(s)&&((u&F)!==0&&this.#s.add(s),ue(s));var o=s.first;if(o!==null){s=o;continue}}var c=s.parent;for(s=s.next;s===null&&c!==null;)c===f&&(f=null),s=c.next,c=c.parent}}#l(t){for(var n=0;n<t.length;n+=1)dn(t[n],this.#s,this.#f)}capture(t,n){n!==b&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&U)===0&&(this.current.set(t,t.v),D?.set(t,t.v))}activate(){h=this,this.apply()}deactivate(){h===this&&(h=null,D=null)}flush(){if(this.activate(),O.length>0){if(bt(),h!==null&&h!==this)return}else this.#e===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#r)t(this);this.#r.clear()}#u(){if(this.#t===0){for(const t of this.#n)t();this.#n.clear()}this.#e===0&&this.#o()}#o(){if(be.size>1){this.previous.clear();var t=D,n=!0;for(const s of be){if(s===this){n=!1;continue}const f=[];for(const[a,l]of this.current){if(s.current.has(a))if(n&&l!==s.current.get(a))s.current.set(a,l);else continue;f.push(a)}if(f.length===0)continue;const u=[...s.current.keys()].filter(a=>!this.current.has(a));if(u.length>0){var r=O;O=[];const a=new Set,l=new Map;for(const i of f)Et(i,u,a,l);if(O.length>0){h=s,s.apply();for(const i of O)s.#a(i,[],[]);s.deactivate()}O=r}}h=null,D=t}this.committed=!0,be.delete(this)}increment(t){this.#e+=1,t&&(this.#t+=1)}decrement(t){this.#e-=1,t&&(this.#t-=1),this.revive()}revive(){for(const t of this.#s)this.#f.delete(t),m(t,S),ne(t);for(const t of this.#f)m(t,L),ne(t);this.flush()}oncommit(t){this.#n.add(t)}ondiscard(t){this.#r.add(t)}settled(){return(this.#i??=lt()).promise}static ensure(){if(h===null){const t=h=new G;be.add(h),de||G.enqueue(()=>{h===t&&t.flush()})}return h}static enqueue(t){yt(t)}apply(){}}function pn(e){var t=de;de=!0;try{for(var n;;){if(cn(),O.length===0&&(h?.flush(),O.length===0))return ke=null,n;bt()}}finally{de=t}}function bt(){var e=Q;je=!0;var t=null;try{var n=0;for(Oe(!0);O.length>0;){var r=G.ensure();if(n++>1e3){var s,f;hn()}r.process(O),V.clear()}}finally{je=!1,Oe(e),ke=null}}function hn(){try{nn()}catch(e){Ae(e,ke)}}let I=null;function tt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(H|P))===0&&ce(r)&&(I=new Set,ue(r),r.deps===null&&r.first===null&&r.nodes===null&&(r.teardown===null&&r.ac===null?It(r):r.fn=null),I?.size>0)){V.clear();for(const s of I){if((s.f&(H|P))!==0)continue;const f=[s];let u=s.parent;for(;u!==null;)I.has(u)&&(I.delete(u),f.push(u)),u=u.parent;for(let a=f.length-1;a>=0;a--){const l=f[a];(l.f&(H|P))===0&&ue(l)}}I.clear()}}I=null}}function Et(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const f=s.f;(f&g)!==0?Et(s,t,n,r):(f&(Ve|F))!==0&&(f&S)===0&&gt(s,t,r)&&(m(s,S),ne(s))}}function gt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(t.includes(s))return!0;if((s.f&g)!==0&&gt(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function ne(e){for(var t=ke=e;t.parent!==null;){t=t.parent;var n=t.f;if(je&&t===p&&(n&F)!==0&&(n&ot)===0)return;if((n&(z|j))!==0){if((n&E)===0)return;t.f^=E}}O.push(t)}function yn(e,t,n,r){const s=he()?ze:En;if(n.length===0&&e.length===0){r(t.map(s));return}var f=h,u=p,a=wn();function l(){Promise.all(n.map(i=>bn(i))).then(i=>{a();try{r([...t.map(s),...i])}catch(o){(u.f&H)===0&&Ae(o,u)}f?.deactivate(),xe()}).catch(i=>{Ae(i,u)})}e.length>0?Promise.all(e).then(()=>{a();try{return l()}finally{f?.deactivate(),xe()}}):l()}function wn(){var e=p,t=_,n=y,r=h;return function(f=!0){le(e),$(t),Te(n),f&&r?.activate()}}function xe(){le(null),$(null),Te(null)}function ze(e){var t=g|S,n=_!==null&&(_.f&g)!==0?_:null;return p!==null&&(p.f|=oe),{ctx:y,deps:null,effects:null,equals:vt,f:t,fn:e,reactions:null,rv:0,v:b,wv:0,parent:n??p,ac:null}}function bn(e,t,n){let r=p;r===null&&Jt();var s=r.b,f=void 0,u=Ze(b),a=!_,l=new Map;return On(()=>{var i=lt();f=i.promise;try{Promise.resolve(e()).then(i.resolve,i.reject).then(()=>{o===h&&o.committed&&o.deactivate(),xe()})}catch(d){i.reject(d),xe()}var o=h;if(a){var c=s.is_rendered();s.update_pending_count(1),o.increment(c),l.get(o)?.reject(fe),l.delete(o),l.set(o,i)}const v=(d,w=void 0)=>{if(o.activate(),w)w!==fe&&(u.f|=U,qe(u,w));else{(u.f&U)!==0&&(u.f^=U),qe(u,d);for(const[ye,we]of l){if(l.delete(ye),ye===o)break;we.reject(fe)}}a&&(s.update_pending_count(-1),o.decrement(c))};i.promise.then(v,d=>v(null,d||"unknown"))}),Rn(()=>{for(const i of l.values())i.reject(fe)}),new Promise(i=>{function o(c){function v(){c===f?i(u):o(f)}c.then(v,v)}o(f)})}function Ar(e){const t=ze(e);return jt(t),t}function En(e){const t=ze(e);return t.equals=pt,t}function mt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)K(t[n])}}function gn(e){for(var t=e.parent;t!==null;){if((t.f&g)===0)return(t.f&H)===0?t:null;t=t.parent}return null}function Xe(e){var t,n=p;le(gn(e));try{e.f&=~te,mt(e),t=Ht(e)}finally{le(n)}return t}function Tt(e){var t=Xe(e);if(!e.equals(t)&&(e.wv=qt(),(!h?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){m(e,E);return}re||(D!==null?(Nt()||h?.is_fork)&&D.set(e,t):$e(e))}let Le=new Set;const V=new Map;let At=!1;function Ze(e,t){var n={f:0,v:e,reactions:null,equals:vt,rv:0,wv:0};return n}function q(e,t){const n=Ze(e);return jt(n),n}function xr(e,t=!1,n=!0){const r=Ze(e);return t||(r.equals=pt),Ce&&n&&y!==null&&y.l!==null&&(y.l.s??=[]).push(r),r}function Y(e,t,n=!1){_!==null&&(!k||(_.f&et)!==0)&&he()&&(_.f&(g|F|Ve|et))!==0&&!M?.includes(e)&&fn();let r=n?_e(t):t;return qe(e,r)}function qe(e,t){if(!e.equals(t)){var n=e.v;re?V.set(e,t):V.set(e,n),e.v=t;var r=G.ensure();if(r.capture(e,n),(e.f&g)!==0){const s=e;(e.f&S)!==0&&Xe(s),$e(s)}e.wv=qt(),xt(e,S),he()&&p!==null&&(p.f&E)!==0&&(p.f&(j|z))===0&&(R===null?kn([e]):R.push(e)),!r.is_fork&&Le.size>0&&!At&&mn()}return t}function mn(){At=!1;var e=Q;Oe(!0);const t=Array.from(Le);try{for(const n of t)(n.f&E)!==0&&m(n,L),ce(n)&&ue(n)}finally{Oe(e)}Le.clear()}function Sr(e,t=1){var n=ie(e),r=t===1?n++:n--;return Y(e,n),r}function Me(e){Y(e,e.v+1)}function xt(e,t){var n=e.reactions;if(n!==null)for(var r=he(),s=n.length,f=0;f<s;f++){var u=n[f],a=u.f;if(!(!r&&u===p)){var l=(a&S)===0;if(l&&m(u,t),(a&g)!==0){var i=u;D?.delete(i),(a&te)===0&&(a&N&&(u.f|=te),xt(i,L))}else l&&((a&F)!==0&&I!==null&&I.add(u),ne(u))}}}function _e(e){if(typeof e!="object"||e===null||J in e)return e;const t=at(e);if(t!==zt&&t!==Xt)return e;var n=new Map,r=Gt(e),s=q(0),f=ee,u=a=>{if(ee===f)return a();var l=_,i=ee;$(null),it(f);var o=a();return $(l),it(i),o};return r&&n.set("length",q(e.length)),new Proxy(e,{defineProperty(a,l,i){(!("value"in i)||i.configurable===!1||i.enumerable===!1||i.writable===!1)&&rn();var o=n.get(l);return o===void 0?o=u(()=>{var c=q(i.value);return n.set(l,c),c}):Y(o,i.value,!0),!0},deleteProperty(a,l){var i=n.get(l);if(i===void 0){if(l in a){const o=u(()=>q(b));n.set(l,o),Me(s)}}else Y(i,b),Me(s);return!0},get(a,l,i){if(l===J)return e;var o=n.get(l),c=l in a;if(o===void 0&&(!c||ve(a,l)?.writable)&&(o=u(()=>{var d=_e(c?a[l]:b),w=q(d);return w}),n.set(l,o)),o!==void 0){var v=ie(o);return v===b?void 0:v}return Reflect.get(a,l,i)},getOwnPropertyDescriptor(a,l){var i=Reflect.getOwnPropertyDescriptor(a,l);if(i&&"value"in i){var o=n.get(l);o&&(i.value=ie(o))}else if(i===void 0){var c=n.get(l),v=c?.v;if(c!==void 0&&v!==b)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return i},has(a,l){if(l===J)return!0;var i=n.get(l),o=i!==void 0&&i.v!==b||Reflect.has(a,l);if(i!==void 0||p!==null&&(!o||ve(a,l)?.writable)){i===void 0&&(i=u(()=>{var v=o?_e(a[l]):b,d=q(v);return d}),n.set(l,i));var c=ie(i);if(c===b)return!1}return o},set(a,l,i,o){var c=n.get(l),v=l in a;if(r&&l==="length")for(var d=i;d<c.v;d+=1){var w=n.get(d+"");w!==void 0?Y(w,b):d in a&&(w=u(()=>q(b)),n.set(d+"",w))}if(c===void 0)(!v||ve(a,l)?.writable)&&(c=u(()=>q(void 0)),Y(c,_e(i)),n.set(l,c));else{v=c.v!==b;var ye=u(()=>_e(i));Y(c,ye)}var we=Reflect.getOwnPropertyDescriptor(a,l);if(we?.set&&we.set.call(o,i),!v){if(r&&typeof l=="string"){var Je=n.get("length"),Pe=Number(l);Number.isInteger(Pe)&&Pe>=Je.v&&Y(Je,Pe+1)}Me(s)}return!0},ownKeys(a){ie(s);var l=Reflect.ownKeys(a).filter(c=>{var v=n.get(c);return v===void 0||v.v!==b});for(var[i,o]of n)o.v!==b&&!(i in a)&&l.push(i);return l},setPrototypeOf(){sn()}})}function nt(e){try{if(e!==null&&typeof e=="object"&&J in e)return e[J]}catch{}return e}function Rr(e,t){return Object.is(nt(e),nt(t))}var rt,Tn,St,Rt;function Or(){if(rt===void 0){rt=window,Tn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;St=ve(t,"firstChild").get,Rt=ve(t,"nextSibling").get,Qe(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Qe(n)&&(n.__t=void 0)}}function Se(e=""){return document.createTextNode(e)}function Re(e){return St.call(e)}function X(e){return Rt.call(e)}function Nr(e,t){if(!B)return Re(e);var n=Re(x);if(n===null)n=x.appendChild(Se());else if(t&&n.nodeType!==Be){var r=Se();return n?.before(r),ae(r),r}return ae(n),n}function Cr(e,t=!1){if(!B){var n=Re(e);return n instanceof Comment&&n.data===""?X(n):n}if(t&&x?.nodeType!==Be){var r=Se();return x?.before(r),ae(r),r}return x}function Dr(e,t=1,n=!1){let r=B?x:e;for(var s;t--;)s=r,r=X(r);if(!B)return r;if(n&&r?.nodeType!==Be){var f=Se();return r===null?s?.after(f):r.before(f),ae(f),f}return ae(r),r}function An(e){e.textContent=""}function kr(){return!1}function Pr(e,t){if(t){const n=document.body;e.autofocus=!0,yt(()=>{document.activeElement===n&&e.focus()})}}function Ir(e){B&&Re(e)!==null&&An(e)}let st=!1;function xn(){st||(st=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function We(e){var t=_,n=p;$(null),le(null);try{return e()}finally{$(t),le(n)}}function Mr(e,t,n,r=n){e.addEventListener(t,()=>We(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),xn()}function Ot(e){p===null&&(_===null&&tn(),en()),re&&Qt()}function Sn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function C(e,t,n){var r=p;r!==null&&(r.f&P)!==0&&(e|=P);var s={ctx:y,deps:null,nodes:null,f:e|S|N,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{ue(s),s.f|=Ue}catch(a){throw K(s),a}else t!==null&&ne(s);var f=s;if(n&&f.deps===null&&f.teardown===null&&f.nodes===null&&f.first===f.last&&(f.f&oe)===0&&(f=f.first,(e&F)!==0&&(e&me)!==0&&f!==null&&(f.f|=me)),f!==null&&(f.parent=r,r!==null&&Sn(f,r),_!==null&&(_.f&g)!==0&&(e&z)===0)){var u=_;(u.effects??=[]).push(f)}return s}function Nt(){return _!==null&&!k}function Rn(e){const t=C(pe,null,!1);return m(t,E),t.teardown=e,t}function Fr(e){Ot();var t=p.f,n=!_&&(t&j)!==0&&(t&Ue)===0;if(n){var r=y;(r.e??=[]).push(e)}else return Ct(e)}function Ct(e){return C(ge|ct,e,!1)}function jr(e){return Ot(),C(pe|ct,e,!0)}function Lr(e){G.ensure();const t=C(z|oe,e,!0);return()=>{K(t)}}function qr(e){G.ensure();const t=C(z|oe,e,!0);return(n={})=>new Promise(r=>{n.outro?Dn(t,()=>{K(t),r(void 0)}):(K(t),r(void 0))})}function Yr(e){return C(ge,e,!1)}function Hr(e,t){var n=y,r={effect:null,ran:!1,deps:e};n.l.$.push(r),r.effect=Dt(()=>{e(),!r.ran&&(r.ran=!0,Bt(t))})}function Ur(){var e=y;Dt(()=>{for(var t of e.l.$){t.deps();var n=t.effect;(n.f&E)!==0&&n.deps!==null&&m(n,L),ce(n)&&ue(n),t.ran=!1}})}function On(e){return C(Ve|oe,e,!0)}function Dt(e,t=0){return C(pe|t,e,!0)}function Vr(e,t=[],n=[],r=[]){yn(r,t,n,s=>{C(pe,()=>e(...s.map(ie)),!0)})}function Br(e,t=0){var n=C(F|t,e,!0);return n}function Gr(e,t=0){var n=C(He|t,e,!0);return n}function Kr(e){return C(j|oe,e,!0)}function kt(e){var t=e.teardown;if(t!==null){const n=re,r=_;ft(!0),$(null);try{t.call(null)}finally{ft(n),$(r)}}}function Pt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&We(()=>{s.abort(fe)});var r=n.next;(n.f&z)!==0?n.parent=null:K(n,t),n=r}}function Nn(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&j)===0&&K(t),t=n}}function K(e,t=!0){var n=!1;(t||(e.f&ot)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Cn(e.nodes.start,e.nodes.end),n=!0),Pt(e,t&&!n),Ne(e,0),m(e,H);var r=e.nodes&&e.nodes.t;if(r!==null)for(const f of r)f.stop();kt(e);var s=e.parent;s!==null&&s.first!==null&&It(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Cn(e,t){for(;e!==null;){var n=e===t?null:X(e);e.remove(),e=n}}function It(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Dn(e,t,n=!0){var r=[];Mt(e,r,!0);var s=()=>{n&&K(e),t&&t()},f=r.length;if(f>0){var u=()=>--f||s();for(var a of r)a.out(u)}else s()}function Mt(e,t,n){if((e.f&P)===0){e.f^=P;var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)(a.is_global||n)&&t.push(a);for(var s=e.first;s!==null;){var f=s.next,u=(s.f&me)!==0||(s.f&j)!==0&&(e.f&F)!==0;Mt(s,t,u?n:!1),s=f}}}function $r(e){Ft(e,!0)}function Ft(e,t){if((e.f&P)!==0){e.f^=P,(e.f&E)===0&&(m(e,S),ne(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&me)!==0||(n.f&j)!==0;Ft(n,s?t:!1),n=r}var f=e.nodes&&e.nodes.t;if(f!==null)for(const u of f)(u.is_global||t)&&u.in()}}function zr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:X(n);t.append(n),n=s}}let Q=!1;function Oe(e){Q=e}let re=!1;function ft(e){re=e}let _=null,k=!1;function $(e){_=e}let p=null;function le(e){p=e}let M=null;function jt(e){_!==null&&(M===null?M=[e]:M.push(e))}let T=null,A=0,R=null;function kn(e){R=e}let Lt=1,W=0,ee=W;function it(e){ee=e}function qt(){return++Lt}function ce(e){var t=e.f;if((t&S)!==0)return!0;if(t&g&&(e.f&=~te),(t&L)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var f=n[s];if(ce(f)&&Tt(f),f.wv>e.wv)return!0}(t&N)!==0&&D===null&&m(e,E)}return!1}function Yt(e,t,n=!0){var r=e.reactions;if(r!==null&&!M?.includes(e))for(var s=0;s<r.length;s++){var f=r[s];(f.f&g)!==0?Yt(f,t,!1):t===f&&(n?m(f,S):(f.f&E)!==0&&m(f,L),ne(f))}}function Ht(e){var t=T,n=A,r=R,s=_,f=M,u=y,a=k,l=ee,i=e.f;T=null,A=0,R=null,_=(i&(j|z))===0?e:null,M=null,Te(e.ctx),k=!1,ee=++W,e.ac!==null&&(We(()=>{e.ac.abort(fe)}),e.ac=null);try{e.f|=Fe;var o=e.fn,c=o(),v=e.deps;if(T!==null){var d;if(Ne(e,A),v!==null&&A>0)for(v.length=A+T.length,d=0;d<T.length;d++)v[A+d]=T[d];else e.deps=v=T;if(Nt()&&(e.f&N)!==0)for(d=A;d<v.length;d++)(v[d].reactions??=[]).push(e)}else v!==null&&A<v.length&&(Ne(e,A),v.length=A);if(he()&&R!==null&&!k&&v!==null&&(e.f&(g|L|S))===0)for(d=0;d<R.length;d++)Yt(R[d],e);if(s!==null&&s!==e){if(W++,s.deps!==null)for(let w=0;w<n;w+=1)s.deps[w].rv=W;if(t!==null)for(const w of t)w.rv=W;R!==null&&(r===null?r=R:r.push(...R))}return(e.f&U)!==0&&(e.f^=U),c}catch(w){return _n(w)}finally{e.f^=Fe,T=t,A=n,R=r,_=s,M=f,Te(u),k=a,ee=l}}function Pn(e,t){let n=t.reactions;if(n!==null){var r=Kt.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}if(n===null&&(t.f&g)!==0&&(T===null||!T.includes(t))){var f=t;(f.f&N)!==0&&(f.f^=N,f.f&=~te),$e(f),mt(f),Ne(f,0)}}function Ne(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Pn(e,n[r])}function ue(e){var t=e.f;if((t&H)===0){m(e,E);var n=p,r=Q;p=e,Q=!0;try{(t&(F|He))!==0?Nn(e):Pt(e),kt(e);var s=Ht(e);e.teardown=typeof s=="function"?s:null,e.wv=Lt;var f}finally{Q=r,p=n}}}async function Xr(){await Promise.resolve(),pn()}function Zr(){return G.ensure().settled()}function ie(e){var t=e.f,n=(t&g)!==0;if(_!==null&&!k){var r=p!==null&&(p.f&H)!==0;if(!r&&!M?.includes(e)){var s=_.deps;if((_.f&Fe)!==0)e.rv<W&&(e.rv=W,T===null&&s!==null&&s[A]===e?A++:T===null?T=[e]:T.push(e));else{(_.deps??=[]).push(e);var f=e.reactions;f===null?e.reactions=[_]:f.includes(_)||f.push(_)}}}if(re&&V.has(e))return V.get(e);if(n){var u=e;if(re){var a=u.v;return((u.f&E)===0&&u.reactions!==null||Vt(u))&&(a=Xe(u)),V.set(u,a),a}var l=(u.f&N)===0&&!k&&_!==null&&(Q||(_.f&N)!==0),i=u.deps===null;ce(u)&&(l&&(u.f|=N),Tt(u)),l&&!i&&Ut(u)}if(D?.has(e))return D.get(e);if((e.f&U)!==0)throw e.v;return e.v}function Ut(e){if(e.deps!==null){e.f|=N;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&g)!==0&&(t.f&N)===0&&Ut(t)}}function Vt(e){if(e.v===b)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(V.has(t)||(t.f&g)!==0&&Vt(t))return!0;return!1}function Bt(e){var t=k;try{return k=!0,e()}finally{k=t}}function Wr(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(J in e)Ye(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&J in n&&Ye(n)}}}function Ye(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{Ye(e[r],t)}catch{}const n=at(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=$t(n);for(let s in r){const f=r[s].get;if(f)try{f.call(e)}catch{}}}}}function In(e,t,n){if(e==null)return t(void 0),Ee;const r=Bt(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const se=[];function Jr(e,t=Ee){let n=null;const r=new Set;function s(a){if(dt(e,a)&&(e=a,n)){const l=!se.length;for(const i of r)i[1](),se.push(i,e);if(l){for(let i=0;i<se.length;i+=2)se[i][0](se[i+1]);se.length=0}}}function f(a){s(a(e))}function u(a,l=Ee){const i=[a,l];return r.add(i),r.size===1&&(n=t(s,f)||Ee),a(e),()=>{r.delete(i),r.size===0&&n&&(n(),n=null)}}return{set:s,update:f,subscribe:u}}function Qr(e){let t;return In(e,n=>t=n)(),t}export{rt as $,Ce as A,Gt as B,jr as C,Zt as D,me as E,Ln as F,Wr as G,ze as H,yr as I,xr as J,In as K,Qr as L,Rn as M,Fn as N,Sr as O,qn as P,_e as Q,$r as R,K as S,Dn as T,Se as U,Kr as V,x as W,zr as X,kr as Y,hr as Z,ln as _,Tr as a,ee as a$,pr as a0,ae as a1,cr as a2,Yr as a3,yt as a4,J as a5,ve as a6,Kn as a7,tr as a8,En as a9,m as aA,S as aB,ne as aC,L as aD,qe as aE,Ae as aF,$n as aG,oe as aH,ut as aI,or as aJ,We as aK,Or as aL,an as aM,X as aN,Ge as aO,Gn as aP,An as aQ,Mn as aR,qr as aS,un as aT,Ke as aU,pn as aV,lr as aW,Hr as aX,Ur as aY,Cn as aZ,he as a_,re as aa,p as ab,H as ac,nr as ad,er as ae,Qn as af,jn as ag,Hn as ah,rr as ai,Ze as aj,le as ak,Re as al,Tn as am,sr as an,fr as ao,Ue as ap,_t as aq,Be as ar,Nt as as,Me as at,G as au,dn as av,$ as aw,Te as ax,_n as ay,_ as az,q as b,Er as b0,wr as b1,br as b2,gr as b3,Lr as b4,Yn as b5,zn as b6,Jn as b7,Xn as b8,P as b9,Zn as ba,Wn as bb,Bn as bc,ar as bd,Gr as be,ur as bf,Rr as bg,yn as bh,Pr as bi,b as bj,xn as bk,ir as bl,at as bm,Un as bn,$t as bo,zt as bp,ot as bq,Jr as br,Zr as bs,Nr as c,Y as d,Ee as e,Cr as f,ie as g,Ir as h,h as i,Xr as j,Bt as k,Mr as l,Dt as m,dr as n,B as o,mr as p,Ie as q,vr as r,Dr as s,Vr as t,Ar as u,Br as v,_r as w,Wt as x,Fr as y,y as z};
@@ -1 +1 @@
1
- import{e as i,b as h,g as l}from"./D3vxvonu.js";import{D as S}from"./DQA8NZIH.js";const g=`${S}/ws`,m=3e4,r=1e4,a=10;class b{ws=null;baseUrl;projectPath;state="disconnected";intentionalDisconnect=!1;subscriptions=new Map;eventHandlers=new Map;stateChangeHandlers=new Set;lastSeqProcessed=-1;reconnectAttempts=0;reconnectTimer=null;connectionLostTimer=null;stats={connect_count:0,reconnect_count:0,last_connected_at:null,last_disconnected_at:null};constructor(t={}){typeof t=="string"?(this.baseUrl=t,this.projectPath=null):(this.baseUrl=t.url||g,this.projectPath=t.projectPath||null)}getUrl(){if(!this.projectPath)return this.baseUrl;const t=new URL(this.baseUrl);return t.searchParams.set("project",this.projectPath),t.toString()}setProjectPath(t){this.projectPath!==t&&(this.projectPath=t,this.isConnected()&&(this.reconnectAttempts=0,this.disconnect(),this.connect()))}getProjectPath(){return this.projectPath}getState(){return this.state}isConnected(){return this.state==="connected"}isConnectionLost(){return this.state==="connected"||!this.stats.last_disconnected_at?!1:Date.now()-this.stats.last_disconnected_at.getTime()>r}connect(){if(this.ws&&(this.state==="connected"||this.state==="connecting")){console.warn("[WebSocketManager] Already connected or connecting");return}this.intentionalDisconnect=!1,this.setState("connecting");const t=this.getUrl();console.log("[WebSocketManager] Connecting to:",t);const e=new WebSocket(t);this.ws=e,e.onopen=()=>{this.ws===e&&(console.log("[WebSocketManager] Connected"),this.setState("connected"),this.reconnectAttempts=0,this.stats.connect_count++,this.stats.last_connected_at=new Date,this.clearConnectionLostTimer())},e.onmessage=n=>{if(this.ws===e)try{const c=JSON.parse(n.data);this.handleMessage(c)}catch(c){console.error("[WebSocketManager] Failed to parse message:",c)}},e.onerror=n=>{this.ws===e&&console.error("[WebSocketManager] WebSocket error:",n)},e.onclose=n=>{if(this.ws===e){if(console.log("[WebSocketManager] Disconnected:",n.code,n.reason),this.setState("disconnected"),this.stats.last_disconnected_at=new Date,this.ws=null,this.intentionalDisconnect){this.intentionalDisconnect=!1;return}this.startConnectionLostTimer(),this.scheduleReconnect()}}}disconnect(){if(this.clearReconnectTimer(),this.clearConnectionLostTimer(),this.intentionalDisconnect=!0,this.ws){const t=this.ws;this.ws=null,t.close(1e3,"Client disconnect")}this.setState("disconnected")}subscribe(t){for(const e of t)this.subscriptions.has(e)||this.subscriptions.set(e,{topic:e,subscribed_at:new Date});this.isConnected()&&this.sendCommand({action:"subscribe",request_id:crypto.randomUUID(),payload:{topics:t}})}unsubscribe(t){for(const e of t)this.subscriptions.delete(e);this.isConnected()&&this.sendCommand({action:"unsubscribe",request_id:crypto.randomUUID(),payload:{topics:t}})}on(t,e){this.eventHandlers.has(t)||this.eventHandlers.set(t,new Set),this.eventHandlers.get(t).add(e)}off(t,e){const n=this.eventHandlers.get(t);n&&(n.delete(e),n.size===0&&this.eventHandlers.delete(t))}onStateChange(t){this.stateChangeHandlers.add(t)}offStateChange(t){this.stateChangeHandlers.delete(t)}handleMessage(t){if("event"in t&&t.event==="connected"){if(console.log("[WebSocketManager] Session ID:",t.data.session_id),this.lastSeqProcessed=-1,this.subscriptions.size>0){const n=Array.from(this.subscriptions.keys());this.sendCommand({action:"subscribe",request_id:crypto.randomUUID(),payload:{topics:n}})}return}if("ack"in t){const e=t;e.success||console.error("[WebSocketManager] Command failed:",e.error);return}if("msg_id"in t&&"seq"in t){const e=t;if(e.seq<=this.lastSeqProcessed){console.debug("[WebSocketManager] Skipping duplicate event:",e.seq);return}this.lastSeqProcessed=e.seq;const n=this.eventHandlers.get(e.topic);if(n)for(const c of n)try{c(e)}catch(f){console.error("[WebSocketManager] Event handler error:",f)}}}sendCommand(t){if(!this.ws||this.ws.readyState!==WebSocket.OPEN){console.warn("[WebSocketManager] Cannot send command: not connected");return}try{this.ws.send(JSON.stringify(t))}catch(e){console.error("[WebSocketManager] Failed to send command:",e)}}scheduleReconnect(){if(this.reconnectAttempts>=a){console.error("[WebSocketManager] Max reconnect attempts reached");return}this.clearReconnectTimer(),this.reconnectAttempts++,this.stats.reconnect_count++;const t=Math.min(Math.pow(2,this.reconnectAttempts-1)*1e3,m);console.log(`[WebSocketManager] Reconnecting in ${t}ms (attempt ${this.reconnectAttempts}/${a})`),this.reconnectTimer=setTimeout(()=>{this.setState("reconnecting"),this.connect()},t)}clearReconnectTimer(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}startConnectionLostTimer(){this.clearConnectionLostTimer(),this.connectionLostTimer=setTimeout(()=>{this.notifyConnectionLostChange()},r)}clearConnectionLostTimer(){this.connectionLostTimer&&(clearTimeout(this.connectionLostTimer),this.connectionLostTimer=null)}setState(t){this.state!==t&&(this.state=t,this.notifyStateChange())}notifyStateChange(){for(const t of this.stateChangeHandlers)try{t(this.state)}catch(e){console.error("[WebSocketManager] State change handler error:",e)}}notifyConnectionLostChange(){this.notifyStateChange()}getStats(){return{...this.stats}}getSubscriptions(){return Array.from(this.subscriptions.keys())}}let s=null,d=h("disconnected"),u=h(!1);function w(o){if(s){console.warn("[ConnectionStore] Already initialized");return}s=new b(o),s.onStateChange(t=>{i(d,t,!0),i(u,s.isConnectionLost(),!0)}),s.connect()}function T(o){if(!s){console.warn("[ConnectionStore] Not initialized, cannot reconnect with project");return}s.setProjectPath(o)}function _(){return l(d)}function M(){return l(u)}function k(o){s&&s.subscribe(o)}function y(o){s&&s.unsubscribe(o)}function P(o,t){s&&s.on(o,t)}function L(o,t){s&&s.off(o,t)}export{L as a,w as b,_ as g,M as i,P as o,T as r,k as s,y as u};
1
+ import{d as i,b as h,g as l}from"./CaAJD3dl.js";import{D as S}from"./Dd5umPsk.js";const g=`${S}/ws`,m=3e4,r=1e4,a=10;class b{ws=null;baseUrl;projectPath;state="disconnected";intentionalDisconnect=!1;subscriptions=new Map;eventHandlers=new Map;stateChangeHandlers=new Set;lastSeqProcessed=-1;reconnectAttempts=0;reconnectTimer=null;connectionLostTimer=null;stats={connect_count:0,reconnect_count:0,last_connected_at:null,last_disconnected_at:null};constructor(t={}){typeof t=="string"?(this.baseUrl=t,this.projectPath=null):(this.baseUrl=t.url||g,this.projectPath=t.projectPath||null)}getUrl(){if(!this.projectPath)return this.baseUrl;const t=new URL(this.baseUrl);return t.searchParams.set("project",this.projectPath),t.toString()}setProjectPath(t){this.projectPath!==t&&(this.projectPath=t,this.isConnected()&&(this.reconnectAttempts=0,this.disconnect(),this.connect()))}getProjectPath(){return this.projectPath}getState(){return this.state}isConnected(){return this.state==="connected"}isConnectionLost(){return this.state==="connected"||!this.stats.last_disconnected_at?!1:Date.now()-this.stats.last_disconnected_at.getTime()>r}connect(){if(this.ws&&(this.state==="connected"||this.state==="connecting")){console.warn("[WebSocketManager] Already connected or connecting");return}this.intentionalDisconnect=!1,this.setState("connecting");const t=this.getUrl();console.log("[WebSocketManager] Connecting to:",t);const e=new WebSocket(t);this.ws=e,e.onopen=()=>{this.ws===e&&(console.log("[WebSocketManager] Connected"),this.setState("connected"),this.reconnectAttempts=0,this.stats.connect_count++,this.stats.last_connected_at=new Date,this.clearConnectionLostTimer())},e.onmessage=o=>{if(this.ws===e)try{const c=JSON.parse(o.data);this.handleMessage(c)}catch(c){console.error("[WebSocketManager] Failed to parse message:",c)}},e.onerror=o=>{this.ws===e&&console.error("[WebSocketManager] WebSocket error:",o)},e.onclose=o=>{if(this.ws===e){if(console.log("[WebSocketManager] Disconnected:",o.code,o.reason),this.setState("disconnected"),this.stats.last_disconnected_at=new Date,this.ws=null,this.intentionalDisconnect){this.intentionalDisconnect=!1;return}this.startConnectionLostTimer(),this.scheduleReconnect()}}}disconnect(){if(this.clearReconnectTimer(),this.clearConnectionLostTimer(),this.intentionalDisconnect=!0,this.ws){const t=this.ws;this.ws=null,t.close(1e3,"Client disconnect")}this.setState("disconnected")}subscribe(t){for(const e of t)this.subscriptions.has(e)||this.subscriptions.set(e,{topic:e,subscribed_at:new Date});this.isConnected()&&this.sendCommand({action:"subscribe",request_id:crypto.randomUUID(),payload:{topics:t}})}unsubscribe(t){for(const e of t)this.subscriptions.delete(e);this.isConnected()&&this.sendCommand({action:"unsubscribe",request_id:crypto.randomUUID(),payload:{topics:t}})}on(t,e){this.eventHandlers.has(t)||this.eventHandlers.set(t,new Set),this.eventHandlers.get(t).add(e)}off(t,e){const o=this.eventHandlers.get(t);o&&(o.delete(e),o.size===0&&this.eventHandlers.delete(t))}onStateChange(t){this.stateChangeHandlers.add(t)}offStateChange(t){this.stateChangeHandlers.delete(t)}handleMessage(t){if("event"in t&&t.event==="connected"){if(console.log("[WebSocketManager] Session ID:",t.data.session_id),this.lastSeqProcessed=-1,this.subscriptions.size>0){const o=Array.from(this.subscriptions.keys());this.sendCommand({action:"subscribe",request_id:crypto.randomUUID(),payload:{topics:o}})}return}if("ack"in t){const e=t;e.success||console.error("[WebSocketManager] Command failed:",e.error);return}if("msg_id"in t&&"seq"in t){const e=t;if(e.seq<=this.lastSeqProcessed){console.debug("[WebSocketManager] Skipping duplicate event:",e.seq);return}this.lastSeqProcessed=e.seq;const o=this.eventHandlers.get(e.topic);if(o)for(const c of o)try{c(e)}catch(f){console.error("[WebSocketManager] Event handler error:",f)}}}sendCommand(t){if(!this.ws||this.ws.readyState!==WebSocket.OPEN){console.warn("[WebSocketManager] Cannot send command: not connected");return}try{this.ws.send(JSON.stringify(t))}catch(e){console.error("[WebSocketManager] Failed to send command:",e)}}scheduleReconnect(){if(this.reconnectAttempts>=a){console.error("[WebSocketManager] Max reconnect attempts reached");return}this.clearReconnectTimer(),this.reconnectAttempts++,this.stats.reconnect_count++;const t=Math.min(Math.pow(2,this.reconnectAttempts-1)*1e3,m);console.log(`[WebSocketManager] Reconnecting in ${t}ms (attempt ${this.reconnectAttempts}/${a})`),this.reconnectTimer=setTimeout(()=>{this.setState("reconnecting"),this.connect()},t)}clearReconnectTimer(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}startConnectionLostTimer(){this.clearConnectionLostTimer(),this.connectionLostTimer=setTimeout(()=>{this.notifyConnectionLostChange()},r)}clearConnectionLostTimer(){this.connectionLostTimer&&(clearTimeout(this.connectionLostTimer),this.connectionLostTimer=null)}setState(t){this.state!==t&&(this.state=t,this.notifyStateChange())}notifyStateChange(){for(const t of this.stateChangeHandlers)try{t(this.state)}catch(e){console.error("[WebSocketManager] State change handler error:",e)}}notifyConnectionLostChange(){this.notifyStateChange()}getStats(){return{...this.stats}}getSubscriptions(){return Array.from(this.subscriptions.keys())}}let n=null,d=h("disconnected"),u=h(!1);function w(s){if(n){console.warn("[ConnectionStore] Already initialized");return}n=new b(s),n.onStateChange(t=>{i(d,t,!0),i(u,n.isConnectionLost(),!0)}),n.connect()}function T(s){if(!n){console.warn("[ConnectionStore] Not initialized, cannot reconnect with project");return}n.setProjectPath(s)}function _(){return l(d)}function M(){return l(u)}function k(s){n&&n.subscribe(s)}function y(s){n&&n.unsubscribe(s)}function P(s,t){n&&n.on(s,t)}function L(s,t){n&&n.off(s,t)}function W(s){n&&n.onStateChange(s)}function D(s){n&&n.offStateChange(s)}export{L as a,W as b,D as c,w as d,_ as g,M as i,P as o,T as r,k as s,y as u};
@@ -1 +1 @@
1
- import{i as a,K as f,L as c,M as l,g as b,N as _,O as d,e as p}from"./D3vxvonu.js";let u=!1,t=Symbol();function v(e,n,r){const s=r[n]??={store:null,source:f(void 0),unsubscribe:a};if(s.store!==e&&!(t in r))if(s.unsubscribe(),s.store=e??null,e==null)s.source.v=void 0,s.unsubscribe=a;else{var i=!0;s.unsubscribe=c(e,o=>{i?s.source.v=o:p(s.source,o)}),i=!1}return e&&t in r?l(e):b(s.source)}function m(){const e={};function n(){_(()=>{for(var r in e)e[r].unsubscribe();d(e,t,{enumerable:!1,value:!0})})}return[e,n]}function y(e){var n=u;try{return u=!1,[e(),u]}finally{u=n}}export{v as a,y as c,m as s};
1
+ import{e as a,J as f,K as c,L as l,g as b,M as _,N as d,d as p}from"./CaAJD3dl.js";let u=!1,t=Symbol();function v(e,n,r){const s=r[n]??={store:null,source:f(void 0),unsubscribe:a};if(s.store!==e&&!(t in r))if(s.unsubscribe(),s.store=e??null,e==null)s.source.v=void 0,s.unsubscribe=a;else{var i=!0;s.unsubscribe=c(e,o=>{i?s.source.v=o:p(s.source,o)}),i=!1}return e&&t in r?l(e):b(s.source)}function m(){const e={};function n(){_(()=>{for(var r in e)e[r].unsubscribe();d(e,t,{enumerable:!1,value:!0})})}return[e,n]}function y(e){var n=u;try{return u=!1,[e(),u]}finally{u=n}}export{v as a,y as c,m as s};
@@ -1 +1 @@
1
- import{c as _,a as s,f as m}from"./DvA-KON-.js";import{p as w,f as k,a as I}from"./D3vxvonu.js";import{p as o,i as P,r as S,b as f}from"./BysXJlZb.js";import{l as c,m as b}from"./DQA8NZIH.js";import{b as j,a as v}from"./BXkNecpt.js";var q=m("<input/>"),z=m("<input/>");function F(p,i){w(i,!0);let a=o(i,"ref",15,null),d=o(i,"value",15),g=o(i,"files",15),n=o(i,"data-slot",3,"input"),l=S(i,["$$slots","$$events","$$legacy","ref","value","type","files","class","data-slot"]);var u=_(),x=k(u);{var y=t=>{var e=q();c(e,r=>({"data-slot":n(),class:r,type:"file",...l}),[()=>b("selection:bg-primary dark:bg-input/30 selection:text-primary-foreground border-input ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 pt-1.5 text-sm font-medium shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i.class)],void 0,void 0,void 0,!0),f(e,r=>a(r),()=>a()),j(e,g),v(e,d),s(t,e)},h=t=>{var e=z();c(e,r=>({"data-slot":n(),class:r,type:i.type,...l}),[()=>b("border-input bg-background selection:bg-primary dark:bg-input/30 selection:text-primary-foreground ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i.class)],void 0,void 0,void 0,!0),f(e,r=>a(r),()=>a()),v(e,d),s(t,e)};P(x,t=>{i.type==="file"?t(y):t(h,!1)})}s(p,u),I()}export{F as I};
1
+ import{c as _,a as s,f as m}from"./y4GeEH6k.js";import{p as w,f as k,a as I}from"./CaAJD3dl.js";import{p as o,i as P,r as S,b as f}from"./Dg_zDpDS.js";import{m as c,o as b}from"./Dd5umPsk.js";import{b as j,a as v}from"./qJfLUwU4.js";var q=m("<input/>"),z=m("<input/>");function F(p,i){w(i,!0);let a=o(i,"ref",15,null),d=o(i,"value",15),g=o(i,"files",15),n=o(i,"data-slot",3,"input"),l=S(i,["$$slots","$$events","$$legacy","ref","value","type","files","class","data-slot"]);var u=_(),x=k(u);{var y=t=>{var e=q();c(e,r=>({"data-slot":n(),class:r,type:"file",...l}),[()=>b("selection:bg-primary dark:bg-input/30 selection:text-primary-foreground border-input ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 pt-1.5 text-sm font-medium shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i.class)],void 0,void 0,void 0,!0),f(e,r=>a(r),()=>a()),j(e,g),v(e,d),s(t,e)},h=t=>{var e=z();c(e,r=>({"data-slot":n(),class:r,type:i.type,...l}),[()=>b("border-input bg-background selection:bg-primary dark:bg-input/30 selection:text-primary-foreground ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i.class)],void 0,void 0,void 0,!0),f(e,r=>a(r),()=>a()),v(e,d),s(t,e)};P(x,t=>{i.type==="file"?t(y):t(h,!1)})}s(p,u),I()}export{F as I};