vibedoc 1.6.1 → 1.7.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 (297) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +2 -0
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +39 -11
  5. package/.next/routes-manifest.json +12 -0
  6. package/.next/server/app/(app)/activity/page.js.nft.json +1 -1
  7. package/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/(app)/board/page.js.nft.json +1 -1
  9. package/.next/server/app/(app)/board/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/(app)/chat/page/app-paths-manifest.json +3 -0
  11. package/.next/server/app/(app)/chat/page/build-manifest.json +20 -0
  12. package/.next/server/app/(app)/chat/page/next-font-manifest.json +11 -0
  13. package/.next/server/app/(app)/chat/page/react-loadable-manifest.json +1 -0
  14. package/.next/server/app/(app)/chat/page/server-reference-manifest.json +4 -0
  15. package/.next/server/app/(app)/chat/page.js +15 -0
  16. package/.next/server/app/(app)/chat/page.js.map +5 -0
  17. package/.next/server/app/(app)/chat/page.js.nft.json +1 -0
  18. package/.next/server/app/(app)/chat/page_client-reference-manifest.js +3 -0
  19. package/.next/server/app/(app)/docs/page.js.nft.json +1 -1
  20. package/.next/server/app/(app)/docs/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/(app)/explorer/page.js.nft.json +1 -1
  22. package/.next/server/app/(app)/explorer/page_client-reference-manifest.js +1 -1
  23. package/.next/server/app/(app)/memory/page.js.nft.json +1 -1
  24. package/.next/server/app/(app)/memory/page_client-reference-manifest.js +1 -1
  25. package/.next/server/app/(app)/roadmap/page.js.nft.json +1 -1
  26. package/.next/server/app/(app)/roadmap/page_client-reference-manifest.js +1 -1
  27. package/.next/server/app/(app)/settings/page.js.nft.json +1 -1
  28. package/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
  29. package/.next/server/app/(app)/setup/page.js.nft.json +1 -1
  30. package/.next/server/app/(app)/setup/page_client-reference-manifest.js +1 -1
  31. package/.next/server/app/_global-error.html +1 -1
  32. package/.next/server/app/_global-error.rsc +1 -1
  33. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  34. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  35. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  36. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  37. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  38. package/.next/server/app/_not-found.html +1 -1
  39. package/.next/server/app/_not-found.rsc +2 -2
  40. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  41. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  42. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  43. package/.next/server/app/activity.html +1 -1
  44. package/.next/server/app/activity.rsc +22 -23
  45. package/.next/server/app/activity.segments/!KGFwcCk/activity/__PAGE__.segment.rsc +9 -10
  46. package/.next/server/app/activity.segments/_full.segment.rsc +22 -23
  47. package/.next/server/app/activity.segments/_tree.segment.rsc +2 -2
  48. package/.next/server/app/api/activity/route.js.nft.json +1 -1
  49. package/.next/server/app/api/backlinks/route.js.nft.json +1 -1
  50. package/.next/server/app/api/chat/route.js.nft.json +1 -1
  51. package/.next/server/app/api/context/route.js.nft.json +1 -1
  52. package/.next/server/app/api/conversations/route/app-paths-manifest.json +3 -0
  53. package/.next/server/app/api/conversations/route/build-manifest.json +12 -0
  54. package/.next/server/app/api/conversations/route/server-reference-manifest.json +4 -0
  55. package/.next/server/app/api/conversations/route.js +9 -0
  56. package/.next/server/app/api/conversations/route.js.map +5 -0
  57. package/.next/server/app/api/conversations/route.js.nft.json +1 -0
  58. package/.next/server/app/api/conversations/route_client-reference-manifest.js +3 -0
  59. package/.next/server/app/api/decisions/route.js.nft.json +1 -1
  60. package/.next/server/app/api/docs/route.js.nft.json +1 -1
  61. package/.next/server/app/api/explorer/route.js.nft.json +1 -1
  62. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  63. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  64. package/.next/server/app/api/plan/apply/route.js.nft.json +1 -1
  65. package/.next/server/app/api/projects/route.js.nft.json +1 -1
  66. package/.next/server/app/api/registry/route.js.nft.json +1 -1
  67. package/.next/server/app/api/roadmap/create/route.js.nft.json +1 -1
  68. package/.next/server/app/api/roadmap/delete/route.js.nft.json +1 -1
  69. package/.next/server/app/api/roadmap/generate/route.js.nft.json +1 -1
  70. package/.next/server/app/api/roadmap/layout/route.js.nft.json +1 -1
  71. package/.next/server/app/api/roadmap/route.js.nft.json +1 -1
  72. package/.next/server/app/api/roadmap/update/route.js.nft.json +1 -1
  73. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  74. package/.next/server/app/api/settings/route.js.nft.json +1 -1
  75. package/.next/server/app/api/setup/generate/route.js.nft.json +1 -1
  76. package/.next/server/app/api/setup/write/route.js.nft.json +1 -1
  77. package/.next/server/app/api/summary/route.js.nft.json +1 -1
  78. package/.next/server/app/api/tasks/create/route.js.nft.json +1 -1
  79. package/.next/server/app/api/tasks/route.js.nft.json +1 -1
  80. package/.next/server/app/board.html +1 -1
  81. package/.next/server/app/board.rsc +22 -23
  82. package/.next/server/app/board.segments/!KGFwcCk/board/__PAGE__.segment.rsc +9 -10
  83. package/.next/server/app/board.segments/_full.segment.rsc +22 -23
  84. package/.next/server/app/board.segments/_tree.segment.rsc +2 -2
  85. package/.next/server/app/chat.html +1 -0
  86. package/.next/server/app/chat.meta +31 -0
  87. package/.next/server/app/chat.rsc +29 -0
  88. package/.next/server/app/chat.segments/!KGFwcCk/chat/__PAGE__.segment.rsc +31 -0
  89. package/.next/server/app/chat.segments/_full.segment.rsc +29 -0
  90. package/.next/server/app/chat.segments/_tree.segment.rsc +4 -0
  91. package/.next/server/app/docs.html +1 -1
  92. package/.next/server/app/docs.rsc +22 -27
  93. package/.next/server/app/docs.segments/!KGFwcCk/docs/__PAGE__.segment.rsc +6 -6
  94. package/.next/server/app/docs.segments/_full.segment.rsc +22 -27
  95. package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
  96. package/.next/server/app/explorer.html +1 -1
  97. package/.next/server/app/explorer.rsc +22 -23
  98. package/.next/server/app/explorer.segments/!KGFwcCk/explorer/__PAGE__.segment.rsc +9 -10
  99. package/.next/server/app/explorer.segments/_full.segment.rsc +22 -23
  100. package/.next/server/app/explorer.segments/_tree.segment.rsc +2 -2
  101. package/.next/server/app/index.html +1 -1
  102. package/.next/server/app/index.rsc +2 -2
  103. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  104. package/.next/server/app/index.segments/_full.segment.rsc +2 -2
  105. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  106. package/.next/server/app/memory.html +1 -1
  107. package/.next/server/app/memory.rsc +22 -23
  108. package/.next/server/app/memory.segments/!KGFwcCk/memory/__PAGE__.segment.rsc +9 -10
  109. package/.next/server/app/memory.segments/_full.segment.rsc +22 -23
  110. package/.next/server/app/memory.segments/_tree.segment.rsc +2 -2
  111. package/.next/server/app/page.js.nft.json +1 -1
  112. package/.next/server/app/page_client-reference-manifest.js +1 -1
  113. package/.next/server/app/roadmap.html +1 -1
  114. package/.next/server/app/roadmap.rsc +22 -26
  115. package/.next/server/app/roadmap.segments/!KGFwcCk/roadmap/__PAGE__.segment.rsc +9 -11
  116. package/.next/server/app/roadmap.segments/_full.segment.rsc +22 -26
  117. package/.next/server/app/roadmap.segments/_tree.segment.rsc +2 -2
  118. package/.next/server/app/settings.html +1 -1
  119. package/.next/server/app/settings.rsc +22 -23
  120. package/.next/server/app/settings.segments/!KGFwcCk/settings/__PAGE__.segment.rsc +9 -10
  121. package/.next/server/app/settings.segments/_full.segment.rsc +22 -23
  122. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  123. package/.next/server/app/setup.html +1 -1
  124. package/.next/server/app/setup.rsc +22 -23
  125. package/.next/server/app/setup.segments/!KGFwcCk/setup/__PAGE__.segment.rsc +9 -10
  126. package/.next/server/app/setup.segments/_full.segment.rsc +22 -23
  127. package/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
  128. package/.next/server/app-paths-manifest.json +2 -0
  129. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1htgzmb._.js +3 -0
  130. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1htgzmb._.js.map +1 -0
  131. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0d2_lq6._.js +3 -0
  132. package/.next/server/chunks/[root-of-the-server]__1613hjb._.js +4 -4
  133. package/.next/server/chunks/[root-of-the-server]__1613hjb._.js.map +1 -1
  134. package/.next/server/chunks/[root-of-the-server]__1jxu2x9._.js +3 -0
  135. package/.next/server/chunks/[root-of-the-server]__1jxu2x9._.js.map +1 -0
  136. package/.next/server/chunks/_next-internal_server_app_api_conversations_route_actions_1-pu7gs.js +3 -0
  137. package/.next/server/chunks/ssr/{0_nd_mermaid_dist_mermaid_core_mjs_1vulg1x._.js → 0_nd_mermaid_dist_mermaid_core_mjs_0vv_0i3._.js} +2 -2
  138. package/.next/server/chunks/ssr/{1u84_katex_dist_katex_mjs_0mwkb-i._.js → 1u84_katex_dist_katex_mjs_1z0p1bs._.js} +1 -1
  139. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_0cvmffy._.js +3 -0
  140. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_0cvmffy._.js.map +1 -0
  141. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_0u3jxas._.js +3 -0
  142. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_0u3jxas._.js.map +1 -0
  143. package/.next/server/chunks/ssr/[root-of-the-server]__11lfnu0._.js +3 -0
  144. package/.next/server/chunks/ssr/[root-of-the-server]__11lfnu0._.js.map +1 -0
  145. package/.next/server/chunks/ssr/_059qmur._.js +3 -0
  146. package/.next/server/chunks/ssr/_059qmur._.js.map +1 -0
  147. package/.next/server/chunks/ssr/_081irea._.js +3 -0
  148. package/.next/server/chunks/ssr/_081irea._.js.map +1 -0
  149. package/.next/server/chunks/ssr/_0d8t8l4._.js +3 -0
  150. package/.next/server/chunks/ssr/_0d8t8l4._.js.map +1 -0
  151. package/.next/server/chunks/ssr/_0dyvcdg._.js +3 -0
  152. package/.next/server/chunks/ssr/_0dyvcdg._.js.map +1 -0
  153. package/.next/server/chunks/ssr/_1-ghqy4._.js +3 -0
  154. package/.next/server/chunks/ssr/_1-ghqy4._.js.map +1 -0
  155. package/.next/server/chunks/ssr/_17jy5db._.js +3 -0
  156. package/.next/server/chunks/ssr/_17jy5db._.js.map +1 -0
  157. package/.next/server/chunks/ssr/_1c95ems._.js +1 -1
  158. package/.next/server/chunks/ssr/_1c95ems._.js.map +1 -1
  159. package/.next/server/chunks/ssr/_1dllfz5._.js +4 -0
  160. package/.next/server/chunks/ssr/_1dllfz5._.js.map +1 -0
  161. package/.next/server/chunks/ssr/_next-internal_server_app_(app)_chat_page_actions_0g4tbzt.js +3 -0
  162. package/.next/server/chunks/ssr/node_modules__pnpm_006_c8z._.js +3 -0
  163. package/.next/server/chunks/ssr/node_modules__pnpm_006_c8z._.js.map +1 -0
  164. package/.next/server/chunks/ssr/{node_modules__pnpm_00wjhj4._.js → node_modules__pnpm_0286-tg._.js} +1 -1
  165. package/.next/server/chunks/ssr/{node_modules__pnpm_0w9uewb._.js → node_modules__pnpm_04khl_s._.js} +1 -1
  166. package/.next/server/chunks/ssr/{node_modules__pnpm_1zsbfem._.js → node_modules__pnpm_07t_e8c._.js} +1 -1
  167. package/.next/server/chunks/ssr/{node_modules__pnpm_0p10j87._.js → node_modules__pnpm_08sqeu2._.js} +1 -1
  168. package/.next/server/chunks/ssr/{node_modules__pnpm_0cj37c-._.js → node_modules__pnpm_09_i2jk._.js} +1 -1
  169. package/.next/server/chunks/ssr/node_modules__pnpm_09_i2jk._.js.map +1 -0
  170. package/.next/server/chunks/ssr/{node_modules__pnpm_19ys1iv._.js → node_modules__pnpm_0a9b2ei._.js} +1 -1
  171. package/.next/server/chunks/ssr/{node_modules__pnpm_0ma8hho._.js → node_modules__pnpm_0ah02mu._.js} +1 -1
  172. package/.next/server/chunks/ssr/{node_modules__pnpm_0kna82c._.js → node_modules__pnpm_0cj8ryj._.js} +1 -1
  173. package/.next/server/chunks/ssr/{node_modules__pnpm_04xoqd9._.js → node_modules__pnpm_0dwi7mu._.js} +2 -2
  174. package/.next/server/chunks/ssr/node_modules__pnpm_0dwi7mu._.js.map +1 -0
  175. package/.next/server/chunks/ssr/{node_modules__pnpm_19ejwjv._.js → node_modules__pnpm_0f77_ng._.js} +1 -1
  176. package/.next/server/chunks/ssr/{node_modules__pnpm_11lluiq._.js → node_modules__pnpm_0fd3pr1._.js} +2 -2
  177. package/.next/server/chunks/ssr/{node_modules__pnpm_1xolwvc._.js → node_modules__pnpm_0gifu-u._.js} +2 -2
  178. package/.next/server/chunks/ssr/{node_modules__pnpm_1r4w_7k._.js → node_modules__pnpm_0jpv2b6._.js} +2 -2
  179. package/.next/server/chunks/ssr/{node_modules__pnpm_17o8zbz._.js → node_modules__pnpm_0og06fy._.js} +1 -1
  180. package/.next/server/chunks/ssr/{node_modules__pnpm_042y3e-._.js → node_modules__pnpm_0qc3gsk._.js} +1 -1
  181. package/.next/server/chunks/ssr/{node_modules__pnpm_0yixxj2._.js → node_modules__pnpm_0ts89ne._.js} +1 -1
  182. package/.next/server/chunks/ssr/{node_modules__pnpm_18pu1wl._.js → node_modules__pnpm_0ttvopp._.js} +1 -1
  183. package/.next/server/chunks/ssr/{node_modules__pnpm_1-poetj._.js → node_modules__pnpm_0u3u82f._.js} +1 -1
  184. package/.next/server/chunks/ssr/{node_modules__pnpm_07j8gcu._.js → node_modules__pnpm_0y35hs4._.js} +1 -1
  185. package/.next/server/chunks/ssr/{node_modules__pnpm_1a3fo7j._.js → node_modules__pnpm_104pzhc._.js} +2 -2
  186. package/.next/server/chunks/ssr/{node_modules__pnpm_00i3mh2._.js → node_modules__pnpm_195j8p_._.js} +1 -1
  187. package/.next/server/chunks/ssr/node_modules__pnpm_1kcnkjs._.js +3 -0
  188. package/.next/server/chunks/ssr/node_modules__pnpm_1kcnkjs._.js.map +1 -0
  189. package/.next/server/chunks/ssr/{node_modules__pnpm_1_34wt2._.js → node_modules__pnpm_1l8k8w1._.js} +1 -1
  190. package/.next/server/chunks/ssr/{node_modules__pnpm_0nbxdp_._.js → node_modules__pnpm_1w0f1m5._.js} +1 -1
  191. package/.next/server/chunks/ssr/{node_modules__pnpm_1l-posw._.js → node_modules__pnpm_1woddr6._.js} +2 -2
  192. package/.next/server/chunks/ssr/{node_modules__pnpm_0fk-8nl._.js → node_modules__pnpm_1x0t5_z._.js} +1 -1
  193. package/.next/server/chunks/ssr/{node_modules__pnpm_1o30a9w._.js → node_modules__pnpm_1xzf8g_._.js} +1 -1
  194. package/.next/server/chunks/ssr/{node_modules__pnpm_0--x5-5._.js → node_modules__pnpm_1yq90z7._.js} +1 -1
  195. package/.next/server/chunks/ssr/node_modules__pnpm_1yq90z7._.js.map +1 -0
  196. package/.next/server/chunks/ssr/src_app_(app)_chat_page_tsx_0c3e4l4._.js +3 -0
  197. package/.next/server/chunks/ssr/src_app_(app)_chat_page_tsx_0c3e4l4._.js.map +1 -0
  198. package/.next/server/chunks/ssr/src_app_(app)_layout_tsx_1yu5hom._.js +3 -0
  199. package/.next/server/chunks/ssr/src_app_(app)_layout_tsx_1yu5hom._.js.map +1 -0
  200. package/.next/server/chunks/ssr/src_app_(app)_roadmap_page_tsx_0vcq3jr._.js +5 -0
  201. package/.next/server/chunks/ssr/src_app_(app)_roadmap_page_tsx_0vcq3jr._.js.map +1 -0
  202. package/.next/server/chunks/ssr/src_context_ChatContext_tsx_0lowp8p._.js +5 -0
  203. package/.next/server/chunks/ssr/src_context_ChatContext_tsx_0lowp8p._.js.map +1 -0
  204. package/.next/server/chunks/ssr/{_1wf14_u._.js → src_lib_templates_index_ts_1s61uk7._.js} +2 -2
  205. package/.next/server/chunks/ssr/{_1wf14_u._.js.map → src_lib_templates_index_ts_1s61uk7._.js.map} +1 -1
  206. package/.next/server/middleware-build-manifest.js +3 -3
  207. package/.next/server/next-font-manifest.js +1 -1
  208. package/.next/server/next-font-manifest.json +4 -0
  209. package/.next/server/pages/404.html +1 -1
  210. package/.next/server/pages/500.html +1 -1
  211. package/.next/server/prefetch-hints.json +19 -0
  212. package/.next/server/server-reference-manifest.js +1 -1
  213. package/.next/server/server-reference-manifest.json +1 -1
  214. package/.next/static/chunks/050mq8l4e1ubn.js +1 -0
  215. package/.next/static/chunks/098le48845_fg.js +3 -0
  216. package/.next/static/chunks/0cw4-ebkoufdc.js +1 -0
  217. package/.next/static/chunks/0feo-go1w5nct.js +1 -0
  218. package/.next/static/chunks/14sefb904pl64.js +21 -0
  219. package/.next/static/chunks/1fer-wulyrjrs.js +3 -0
  220. package/.next/static/chunks/1o7b1x4umy8a6.js +1 -0
  221. package/.next/static/chunks/1q_io1j58aukw.js +1 -0
  222. package/.next/static/chunks/1t-cgh4477hfo.js +1 -0
  223. package/.next/static/chunks/1u-1po1qesc9f.js +1 -0
  224. package/.next/static/chunks/1u5kegkgm0xoz.js +1 -0
  225. package/.next/static/chunks/24ygzsgd-moqy.js +1 -0
  226. package/.next/static/chunks/26folxgplfa9t.js +68 -0
  227. package/.next/static/chunks/2ocixvjhv34_3.js +1 -0
  228. package/.next/static/chunks/3_lsdgxa-h7ma.css +10 -0
  229. package/.next/static/chunks/3rmv-sb9w9i3e.js +1 -0
  230. package/.next/static/chunks/3ttzomivj48jh.js +2 -0
  231. package/README.md +1 -1
  232. package/package.json +1 -1
  233. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_08ca0b4._.js +0 -3
  234. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_08ca0b4._.js.map +0 -1
  235. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_0c1k9is._.js +0 -3
  236. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_0c1k9is._.js.map +0 -1
  237. package/.next/server/chunks/ssr/_0qyglif._.js +0 -5
  238. package/.next/server/chunks/ssr/_0qyglif._.js.map +0 -1
  239. package/.next/server/chunks/ssr/_0skuoxv._.js +0 -6
  240. package/.next/server/chunks/ssr/_0skuoxv._.js.map +0 -1
  241. package/.next/server/chunks/ssr/_14i_6yb._.js +0 -3
  242. package/.next/server/chunks/ssr/_14i_6yb._.js.map +0 -1
  243. package/.next/server/chunks/ssr/_1cbhuz4._.js +0 -3
  244. package/.next/server/chunks/ssr/_1cbhuz4._.js.map +0 -1
  245. package/.next/server/chunks/ssr/_1ewk_mn._.js +0 -3
  246. package/.next/server/chunks/ssr/_1ewk_mn._.js.map +0 -1
  247. package/.next/server/chunks/ssr/_1y-ofyw._.js +0 -3
  248. package/.next/server/chunks/ssr/_1y-ofyw._.js.map +0 -1
  249. package/.next/server/chunks/ssr/node_modules__pnpm_0bmkw6o._.js +0 -3
  250. package/.next/server/chunks/ssr/node_modules__pnpm_0bmkw6o._.js.map +0 -1
  251. package/.next/server/chunks/ssr/src_components_008q3v8._.js +0 -3
  252. package/.next/server/chunks/ssr/src_components_008q3v8._.js.map +0 -1
  253. package/.next/static/chunks/0-vk2d2nnzav2.js +0 -3
  254. package/.next/static/chunks/02sab26ica2x3.js +0 -1
  255. package/.next/static/chunks/0eggcu0ovk8sd.js +0 -68
  256. package/.next/static/chunks/0iva6rdtfqpbz.js +0 -1
  257. package/.next/static/chunks/0qm101bdsxdyh.css +0 -10
  258. package/.next/static/chunks/0wg9n5zb8mo2p.js +0 -1
  259. package/.next/static/chunks/0z_y7el6m76yk.js +0 -1
  260. package/.next/static/chunks/1-ekntoveuxzd.js +0 -4
  261. package/.next/static/chunks/10neasnz6hhq1.js +0 -1
  262. package/.next/static/chunks/22dw7r8x0h2sx.js +0 -1
  263. package/.next/static/chunks/26ee8jsbellqk.js +0 -21
  264. package/.next/static/chunks/3kkg030rcpz7l.js +0 -1
  265. package/.next/static/chunks/3pf_4ye6ju8gt.js +0 -1
  266. /package/.next/server/chunks/{ssr/0_nd_mermaid_dist_mermaid_core_mjs_1vulg1x._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0d2_lq6._.js.map} +0 -0
  267. /package/.next/server/chunks/{ssr/1u84_katex_dist_katex_mjs_0mwkb-i._.js.map → _next-internal_server_app_api_conversations_route_actions_1-pu7gs.js.map} +0 -0
  268. /package/.next/server/chunks/ssr/{node_modules__pnpm_0--x5-5._.js.map → 0_nd_mermaid_dist_mermaid_core_mjs_0vv_0i3._.js.map} +0 -0
  269. /package/.next/server/chunks/ssr/{node_modules__pnpm_04xoqd9._.js.map → 1u84_katex_dist_katex_mjs_1z0p1bs._.js.map} +0 -0
  270. /package/.next/server/chunks/ssr/{node_modules__pnpm_0cj37c-._.js.map → _next-internal_server_app_(app)_chat_page_actions_0g4tbzt.js.map} +0 -0
  271. /package/.next/server/chunks/ssr/{node_modules__pnpm_00wjhj4._.js.map → node_modules__pnpm_0286-tg._.js.map} +0 -0
  272. /package/.next/server/chunks/ssr/{node_modules__pnpm_0w9uewb._.js.map → node_modules__pnpm_04khl_s._.js.map} +0 -0
  273. /package/.next/server/chunks/ssr/{node_modules__pnpm_1zsbfem._.js.map → node_modules__pnpm_07t_e8c._.js.map} +0 -0
  274. /package/.next/server/chunks/ssr/{node_modules__pnpm_0p10j87._.js.map → node_modules__pnpm_08sqeu2._.js.map} +0 -0
  275. /package/.next/server/chunks/ssr/{node_modules__pnpm_19ys1iv._.js.map → node_modules__pnpm_0a9b2ei._.js.map} +0 -0
  276. /package/.next/server/chunks/ssr/{node_modules__pnpm_0ma8hho._.js.map → node_modules__pnpm_0ah02mu._.js.map} +0 -0
  277. /package/.next/server/chunks/ssr/{node_modules__pnpm_0kna82c._.js.map → node_modules__pnpm_0cj8ryj._.js.map} +0 -0
  278. /package/.next/server/chunks/ssr/{node_modules__pnpm_19ejwjv._.js.map → node_modules__pnpm_0f77_ng._.js.map} +0 -0
  279. /package/.next/server/chunks/ssr/{node_modules__pnpm_11lluiq._.js.map → node_modules__pnpm_0fd3pr1._.js.map} +0 -0
  280. /package/.next/server/chunks/ssr/{node_modules__pnpm_1xolwvc._.js.map → node_modules__pnpm_0gifu-u._.js.map} +0 -0
  281. /package/.next/server/chunks/ssr/{node_modules__pnpm_1r4w_7k._.js.map → node_modules__pnpm_0jpv2b6._.js.map} +0 -0
  282. /package/.next/server/chunks/ssr/{node_modules__pnpm_17o8zbz._.js.map → node_modules__pnpm_0og06fy._.js.map} +0 -0
  283. /package/.next/server/chunks/ssr/{node_modules__pnpm_042y3e-._.js.map → node_modules__pnpm_0qc3gsk._.js.map} +0 -0
  284. /package/.next/server/chunks/ssr/{node_modules__pnpm_0yixxj2._.js.map → node_modules__pnpm_0ts89ne._.js.map} +0 -0
  285. /package/.next/server/chunks/ssr/{node_modules__pnpm_18pu1wl._.js.map → node_modules__pnpm_0ttvopp._.js.map} +0 -0
  286. /package/.next/server/chunks/ssr/{node_modules__pnpm_1-poetj._.js.map → node_modules__pnpm_0u3u82f._.js.map} +0 -0
  287. /package/.next/server/chunks/ssr/{node_modules__pnpm_07j8gcu._.js.map → node_modules__pnpm_0y35hs4._.js.map} +0 -0
  288. /package/.next/server/chunks/ssr/{node_modules__pnpm_1a3fo7j._.js.map → node_modules__pnpm_104pzhc._.js.map} +0 -0
  289. /package/.next/server/chunks/ssr/{node_modules__pnpm_00i3mh2._.js.map → node_modules__pnpm_195j8p_._.js.map} +0 -0
  290. /package/.next/server/chunks/ssr/{node_modules__pnpm_1_34wt2._.js.map → node_modules__pnpm_1l8k8w1._.js.map} +0 -0
  291. /package/.next/server/chunks/ssr/{node_modules__pnpm_0nbxdp_._.js.map → node_modules__pnpm_1w0f1m5._.js.map} +0 -0
  292. /package/.next/server/chunks/ssr/{node_modules__pnpm_1l-posw._.js.map → node_modules__pnpm_1woddr6._.js.map} +0 -0
  293. /package/.next/server/chunks/ssr/{node_modules__pnpm_0fk-8nl._.js.map → node_modules__pnpm_1x0t5_z._.js.map} +0 -0
  294. /package/.next/server/chunks/ssr/{node_modules__pnpm_1o30a9w._.js.map → node_modules__pnpm_1xzf8g_._.js.map} +0 -0
  295. /package/.next/static/{gJtrYenzL6_deB-6pdvIL → uJ5RYxgFnE5svAvnuLDXN}/_buildManifest.js +0 -0
  296. /package/.next/static/{gJtrYenzL6_deB-6pdvIL → uJ5RYxgFnE5svAvnuLDXN}/_clientMiddlewareManifest.js +0 -0
  297. /package/.next/static/{gJtrYenzL6_deB-6pdvIL → uJ5RYxgFnE5svAvnuLDXN}/_ssgManifest.js +0 -0
@@ -1,3 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,138324,(e,t,r)=>{"use strict";e.i(583225),Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return b},useLinkStatus:function(){return y}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let s=e.r(56421),o=e.r(72345),i=s._(e.r(180338)),l=e.r(626167),d=e.r(757336),c=e.r(863555),u=e.r(549757),p=e.r(671412),f=e.r(235871),h=e.r(716851),m=e.r(658853),x=e.r(571921);function b(t){var r;let a,n,s,[b,y]=(0,i.useOptimistic)(h.IDLE_LINK_STATUS),v=(0,i.useRef)(null),{href:j,as:w,children:N,prefetch:k=null,passHref:S,replace:E,shallow:_,scroll:C,onClick:A,onMouseEnter:M,onTouchStart:T,legacyBehavior:R=!1,onNavigate:O,transitionTypes:P,ref:$,unstable_dynamicOnHover:z,...D}=t;a=N,R&&("string"==typeof a||"number"==typeof a)&&(a=(0,o.jsx)("a",{children:a}));let I=i.default.useContext(d.AppRouterContext),L=!1!==k,q=!1===k?"none":!0===k?"full":"auto",U="none"!==q?"auto"===q?x.FetchStrategy.PPR:x.FetchStrategy.Full:x.FetchStrategy.PPR,B="string"==typeof(r=w||j)?r:(0,l.formatUrl)(r);if(R){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});n=i.default.Children.only(a)}let F=R?n&&"object"==typeof n&&n.ref:$,K,G=i.default.useCallback(e=>(null!==I&&(v.current=(0,h.mountLinkInstance)(e,B,I,U,L,y,K)),()=>{v.current&&((0,h.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,h.unmountPrefetchableInstance)(e)}),[L,B,I,U,y,K]),V={ref:(0,c.useMergedRef)(G,F),onClick(t){R||"function"!=typeof A||A(t),R&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(t),!I||t.defaultPrevented||function(t,r,a,n,s,o,l,d="none"){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:p}=e.r(187250);i.default.startTransition(()=>{p(r,n?"replace":"push",!1===s?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,a.current,l,d)})}}(t,B,v,E,C,O,P,q)},onMouseEnter(e){R||"function"!=typeof M||M(e),R&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),I&&L&&(0,h.onNavigationIntent)(e.currentTarget,!0===z)},onTouchStart:function(e){R||"function"!=typeof T||T(e),R&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),I&&L&&(0,h.onNavigationIntent)(e.currentTarget,!0===z)}};return(0,u.isAbsoluteUrl)(B)?V.href=B:R&&!S&&("a"!==n.type||"href"in n.props)||(V.href=(0,p.addBasePath)(B)),s=R?i.default.cloneElement(n,V):(0,o.jsx)("a",{...D,...V,children:a}),(0,o.jsx)(g.Provider,{value:b,children:s})}let g=(0,i.createContext)(h.IDLE_LINK_STATUS),y=()=>(0,i.useContext)(g);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},863555,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let a=e.r(180338);function n(e,t){let r=(0,a.useRef)(null),n=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=s(e,a)),t&&(n.current=s(t,a))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},549757,(e,t,r)=>{"use strict";e.i(583225),Object.defineProperty(r,"__esModule",{value:!0});var a={DecodeError:function(){return b},MiddlewareNotFoundError:function(){return j},MissingStaticPage:function(){return v},NormalizeError:function(){return g},PageNotFoundError:function(){return y},SP:function(){return m},ST:function(){return x},WEB_VITALS:function(){return s},execOnce:function(){return o},getDisplayName:function(){return u},getLocationOrigin:function(){return d},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return p},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return w}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let s=["CLS","FCP","FID","INP","LCP","TTFB"];function o(e){let t,r=!1;return(...a)=>(r||(r=!0,t=e(...a)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&i.test(e)};function d(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=d();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function p(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let a=await e.getInitialProps(t);if(r&&p(r))return a;if(!a)throw Object.defineProperty(Error(`"${u(e)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return a}let m="u">typeof performance,x=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class b extends Error{}class g extends Error{}class y extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class v extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class j extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function w(e){return JSON.stringify({message:e.message,stack:e.stack})}},658853,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return s}});let a=e.r(549757),n=e.r(144654);function s(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},818732,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={assign:function(){return l},searchParamsToUrlQuery:function(){return s},urlQueryToSearchParams:function(){return i}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});function s(e){let t={};for(let[r,a]of e.entries()){let e=t[r];void 0===e?t[r]=a:Array.isArray(e)?e.push(a):t[r]=[e,a]}return t}function o(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function i(e){let t=new URLSearchParams;for(let[r,a]of Object.entries(e))if(Array.isArray(a))for(let e of a)t.append(r,o(e));else t.set(r,o(a));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,a]of r.entries())e.append(t,a)}return e}},626167,(e,t,r)=>{"use strict";e.i(583225),Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return i},formatWithValidation:function(){return d},urlObjectKeys:function(){return l}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let s=e.r(56421)._(e.r(818732)),o=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,a=e.protocol||"",n=e.pathname||"",i=e.hash||"",l=e.query||"",d=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?d=t+e.host:r&&(d=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(d+=":"+e.port)),l&&"object"==typeof l&&(l=String(s.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||o.test(a))&&!1!==d?(d="//"+(d||""),n&&"/"!==n[0]&&(n="/"+n)):d||(d=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),n=n.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${a}${d}${n}${c}${i}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return i(e)}},588537,e=>{"use strict";var t=e.i(72345),r=e.i(180338),a=e.i(910172),n=e.i(763371),s=e.i(573009),o=e.i(243668);function i(){let{rootParam:e,refresh:t,setEditorSettings:a,setAutoRefreshSeconds:i,autoRefreshSeconds:l}=(0,n.useApp)(),d=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!e)return;let t=!1;return fetch(`/api/settings${e}&type=settings`).then(e=>e.ok?e.json():o.DEFAULT_SETTINGS).then(e=>{t||((0,s.applyTheme)(e.theme),(0,s.applyAccent)(e.accentColor),(0,s.applyFontSize)(e.fontSize),(0,s.applyFonts)(e),a(e.editor),i(e.project?.autoRefresh??0))}).catch(()=>{}),()=>{t=!0}},[e]),(0,r.useEffect)(()=>(d.current&&clearInterval(d.current),l>0&&(d.current=setInterval(t,1e3*l)),()=>{d.current&&(clearInterval(d.current),d.current=null)}),[l,t]),null}function l(){return(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"flex gap-1.5 justify-center mb-4",children:[0,1,2].map(e=>(0,t.jsx)("div",{className:"w-2 h-2 rounded-full bg-accent animate-pulse-dot",style:{animationDelay:`${.15*e}s`}},e))}),(0,t.jsx)("p",{className:"text-muted text-sm font-mono",children:"Loading project..."})]})})}var d=e.i(755146);function c({projects:e,activeProject:r,currentName:a,onSelect:n}){return(0,t.jsxs)(d.DropdownMenu,{children:[(0,t.jsx)(d.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)("button",{className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md bg-surface2 border border-border text-sm hover:border-border2 transition-colors",children:[(0,t.jsx)("span",{className:"text-txt font-medium truncate max-w-[200px]",children:a||"Select project"}),(0,t.jsx)("span",{className:"text-muted text-xs",children:"▾"})]})}),(0,t.jsx)(d.DropdownMenuContent,{className:"w-64 bg-surface border-border2 text-txt",align:"start",children:0===e.length?(0,t.jsx)("div",{className:"px-3 py-2 text-sm text-muted",children:"No projects found"}):e.map(e=>(0,t.jsx)(d.DropdownMenuItem,{onClick:()=>n(e.root),className:`cursor-pointer hover:bg-surface2 focus:bg-surface2 ${e.root===r?"text-accent":""}`,children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-muted truncate font-mono",children:e.root})]})},e.root))})]})}var u=e.i(487486);function p({board:e}){return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)(u.Badge,{variant:"secondary",className:"gap-1 text-xs font-mono text-amber",children:["🔨 ",e["in-progress"]||0]}),(0,t.jsxs)(u.Badge,{variant:"secondary",className:"gap-1 text-xs font-mono text-muted",children:["📋 ",e.todo||0]}),(0,t.jsxs)(u.Badge,{variant:"secondary",className:"gap-1 text-xs font-mono text-teal",children:["✅ ",e.done||0]})]})}var f=e.i(975157);function h({active:e}){return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-xs font-mono text-muted",children:[(0,t.jsx)("div",{className:(0,f.cn)("w-1.5 h-1.5 rounded-full transition-colors duration-500",e?"bg-teal shadow-[0_0_6px_#4fd8b4]":"bg-border2")}),(0,t.jsx)("span",{children:e?"live update":"connected"})]})}var m=e.i(617739),x=e.i(294237),b=e.i(83790);let g={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};g.node;let y=(0,b.default)(g);var v=e.i(519455),j=e.i(793479),w=e.i(772436),N=e.i(980376);function k({className:e,...r}){return(0,t.jsx)("div",{className:(0,f.cn)("animate-pulse rounded-md bg-surface2",e),...r})}var S=e.i(746798);let E=r.createContext(null);function _(){let e=r.useContext(E);if(!e)throw Error("useSidebar must be used within a SidebarProvider.");return e}let C=r.forwardRef(({defaultOpen:e=!0,open:a,onOpenChange:n,className:s,style:o,children:i,...l},d)=>{let c=function(){let[e,t]=r.useState(void 0);return r.useEffect(()=>{let e=window.matchMedia("(max-width: 767px)"),r=()=>{t(window.innerWidth<768)};return e.addEventListener("change",r),t(window.innerWidth<768),()=>e.removeEventListener("change",r)},[]),!!e}(),[u,p]=r.useState(!1),[h,m]=r.useState(e),x=a??h,b=r.useCallback(e=>{let t="function"==typeof e?e(x):e;n?n(t):m(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[n,x]),g=r.useCallback(()=>c?p(e=>!e):b(e=>!e),[c,b,p]);r.useEffect(()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),g())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[g]);let y=x?"expanded":"collapsed",v=r.useMemo(()=>({state:y,open:x,setOpen:b,isMobile:c,openMobile:u,setOpenMobile:p,toggleSidebar:g}),[y,x,b,c,u,p,g]);return(0,t.jsx)(E.Provider,{value:v,children:(0,t.jsx)(S.TooltipProvider,{delayDuration:0,children:(0,t.jsx)("div",{style:{"--sidebar-width":"16rem","--sidebar-width-icon":"3rem",...o},className:(0,f.cn)("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",s),ref:d,...l,children:i})})})});C.displayName="SidebarProvider";let A=r.forwardRef(({side:e="left",variant:r="sidebar",collapsible:a="offcanvas",className:n,children:s,...o},i)=>{let{isMobile:l,state:d,openMobile:c,setOpenMobile:u}=_();return"none"===a?(0,t.jsx)("div",{className:(0,f.cn)("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),ref:i,...o,children:s}):l?(0,t.jsx)(N.Sheet,{open:c,onOpenChange:u,...o,children:(0,t.jsxs)(N.SheetContent,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:e,children:[(0,t.jsxs)(N.SheetHeader,{className:"sr-only",children:[(0,t.jsx)(N.SheetTitle,{children:"Sidebar"}),(0,t.jsx)(N.SheetDescription,{children:"Displays the mobile sidebar."})]}),(0,t.jsx)("div",{className:"flex h-full w-full flex-col",children:s})]})}):(0,t.jsxs)("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":"collapsed"===d?a:"","data-variant":r,"data-side":e,children:[(0,t.jsx)("div",{className:(0,f.cn)("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===r||"inset"===r?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),(0,t.jsx)("div",{className:(0,f.cn)("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex","left"===e?"left-0 group-data-[collapsible=offcanvas]:-left-(--sidebar-width)":"right-0 group-data-[collapsible=offcanvas]:-right-(--sidebar-width)","floating"===r||"inset"===r?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...o,children:(0,t.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:s})})]})});A.displayName="Sidebar";let M=r.forwardRef(({className:e,onClick:r,...a},n)=>{let{toggleSidebar:s}=_();return(0,t.jsxs)(v.Button,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:(0,f.cn)("h-7 w-7",e),onClick:e=>{r?.(e),s()},...a,children:[(0,t.jsx)(y,{}),(0,t.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});M.displayName="SidebarTrigger",r.forwardRef(({className:e,...r},a)=>{let{toggleSidebar:n}=_();return(0,t.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:(0,f.cn)("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-[translate,background-color] ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...r})}).displayName="SidebarRail";let T=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("main",{ref:a,className:(0,f.cn)("relative flex w-full flex-1 flex-col bg-bg","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",e),...r}));T.displayName="SidebarInset",r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(j.Input,{ref:a,"data-sidebar":"input",className:(0,f.cn)("h-8 w-full bg-bg shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...r})).displayName="SidebarInput";let R=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,"data-sidebar":"header",className:(0,f.cn)("flex flex-col gap-2 p-2",e),...r}));R.displayName="SidebarHeader",r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,"data-sidebar":"footer",className:(0,f.cn)("flex flex-col gap-2 p-2",e),...r})).displayName="SidebarFooter";let O=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(w.Separator,{ref:a,"data-sidebar":"separator",className:(0,f.cn)("mx-2 w-auto bg-sidebar-border",e),...r}));O.displayName="SidebarSeparator";let P=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,"data-sidebar":"content",className:(0,f.cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...r}));P.displayName="SidebarContent";let $=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,"data-sidebar":"group",className:(0,f.cn)("relative flex w-full min-w-0 flex-col p-2",e),...r}));$.displayName="SidebarGroup";let z=r.forwardRef(({className:e,asChild:r=!1,...a},n)=>{let s=r?m.Slot:"div";return(0,t.jsx)(s,{ref:n,"data-sidebar":"group-label",className:(0,f.cn)("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...a})});z.displayName="SidebarGroupLabel",r.forwardRef(({className:e,asChild:r=!1,...a},n)=>{let s=r?m.Slot:"button";return(0,t.jsx)(s,{ref:n,"data-sidebar":"group-action",className:(0,f.cn)("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...a})}).displayName="SidebarGroupAction";let D=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,"data-sidebar":"group-content",className:(0,f.cn)("w-full text-sm",e),...r}));D.displayName="SidebarGroupContent";let I=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("ul",{ref:a,"data-sidebar":"menu",className:(0,f.cn)("flex w-full min-w-0 flex-col gap-1",e),...r}));I.displayName="SidebarMenu";let L=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:(0,f.cn)("group/menu-item relative",e),...r}));L.displayName="SidebarMenuItem";let q=(0,x.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-bg shadow-[0_0_0_1px_rgb(var(--rgb-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_rgb(var(--rgb-surface2))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}}),U=r.forwardRef(({asChild:e=!1,isActive:r=!1,variant:a="default",size:n="default",tooltip:s,className:o,...i},l)=>{let d=e?m.Slot:"button",{isMobile:c,state:u}=_(),p=(0,t.jsx)(d,{ref:l,"data-sidebar":"menu-button","data-size":n,"data-active":r,className:(0,f.cn)(q({variant:a,size:n}),o),...i});return s?("string"==typeof s&&(s={children:s}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:p}),(0,t.jsx)(S.TooltipContent,{side:"right",align:"center",hidden:"collapsed"!==u||c,...s})]})):p});U.displayName="SidebarMenuButton",r.forwardRef(({className:e,asChild:r=!1,showOnHover:a=!1,...n},s)=>{let o=r?m.Slot:"button";return(0,t.jsx)(o,{ref:s,"data-sidebar":"menu-action",className:(0,f.cn)("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...n})}).displayName="SidebarMenuAction",r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:(0,f.cn)("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...r})).displayName="SidebarMenuBadge",r.forwardRef(({className:e,showIcon:a=!1,...n},s)=>{let o=r.useMemo(()=>`${Math.floor(40*Math.random())+50}%`,[]);return(0,t.jsxs)("div",{ref:s,"data-sidebar":"menu-skeleton",className:(0,f.cn)("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[a&&(0,t.jsx)(k,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,t.jsx)(k,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}).displayName="SidebarMenuSkeleton",r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:(0,f.cn)("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...r})).displayName="SidebarMenuSub",r.forwardRef(({...e},r)=>(0,t.jsx)("li",{ref:r,...e})).displayName="SidebarMenuSubItem",r.forwardRef(({asChild:e=!1,size:r="md",isActive:a,className:n,...s},o)=>{let i=e?m.Slot:"a";return(0,t.jsx)(i,{ref:o,"data-sidebar":"menu-sub-button","data-size":r,"data-active":a,className:(0,f.cn)("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground","sm"===r&&"text-xs","md"===r&&"text-sm","group-data-[collapsible=icon]:hidden",n),...s})}).displayName="SidebarMenuSubButton";var B=e.i(476785);function F({summary:e,projects:r,activeProject:a,liveIndicator:n,onProjectChange:s,onToggleChat:o}){let i=(0,B.useOrigin)().replace(/^https?:\/\//,"");return(0,t.jsxs)("header",{className:"h-12 border-b border-border flex items-center px-4 gap-4 shrink-0 bg-surface/80 backdrop-blur-xs sticky top-0 z-50",children:[(0,t.jsx)(M,{className:"-ml-1"}),(0,t.jsx)(w.Separator,{orientation:"vertical",className:"mr-2 h-4"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,t.jsx)("div",{className:"w-6 h-6 rounded-md bg-linear-to-br from-accent to-teal flex items-center justify-center text-xs",children:"⬡"}),(0,t.jsx)("span",{className:"font-mono text-xs text-muted tracking-widest uppercase",children:"VibeDoc"})]}),(0,t.jsx)(c,{projects:r,activeProject:a,currentName:e?.name||"",onSelect:s}),e&&(0,t.jsx)(p,{board:e.tasks.board}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsx)(h,{active:n}),(0,t.jsx)("button",{onClick:o,title:"Agent chat (c)",className:"px-2 py-1 rounded-sm border border-border bg-surface2 text-xs font-mono text-muted hover:text-txt",children:"Agent"}),(0,t.jsxs)("div",{className:"hidden md:flex items-center gap-1.5 px-2 py-1 rounded-sm bg-surface2 border border-border",children:[(0,t.jsx)("span",{className:"text-xs font-mono text-muted",children:"MCP"}),(0,t.jsxs)("code",{className:"text-xs font-mono text-accent",children:[i,"/api/mcp"]})]})]})}let K={name:"layout-dashboard",size:24,node:[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]};K.node;let G=(0,b.default)(K);var V=e.i(732460),W=e.i(788293);let H={name:"brain",size:24,node:[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]};H.node;let J=(0,b.default)(H),Z={name:"circle-dot",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]};Z.node;let Q=(0,b.default)(Z),X={name:"ban",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]};X.node;let Y=(0,b.default)(X),ee={name:"clipboard-list",size:24,node:[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]};ee.node;let et=(0,b.default)(ee),er={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};er.node;let ea=(0,b.default)(er);var en=e.i(463464);let es={name:"folder-tree",size:24,node:[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]};es.node;let eo=(0,b.default)(es),ei={name:"map",size:24,node:[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]};ei.node;let el=(0,b.default)(ei);var ed=e.i(138324);let ec=[{href:"/board",icon:G,label:"Board"},{href:"/roadmap",icon:el,label:"Roadmap"},{href:"/docs",icon:V.BookOpen,label:"Docs"},{href:"/activity",icon:W.Zap,label:"Activity"},{href:"/memory",icon:J,label:"Memory"},{href:"/explorer",icon:eo,label:"Explorer"},{href:"/settings",icon:en.Settings,label:"Settings"}],eu=[{status:"in-progress",icon:Q,label:"Active"},{status:"blocked",icon:Y,label:"Blocked"},{status:"todo",icon:et,label:"Todo"},{status:"done",icon:ea,label:"Done"}];function ep({board:e}){let r=(0,a.usePathname)();return(0,t.jsxs)(A,{collapsible:"icon",children:[(0,t.jsx)(R,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1",children:[(0,t.jsx)("div",{className:"w-6 h-6 rounded-md bg-linear-to-br from-accent to-teal flex items-center justify-center text-xs shrink-0",children:"⬡"}),(0,t.jsx)("span",{className:"font-mono text-xs text-muted tracking-widest uppercase group-data-[collapsible=icon]:hidden",children:"VibeDoc"})]})}),(0,t.jsxs)(P,{children:[(0,t.jsx)($,{children:(0,t.jsx)(D,{children:(0,t.jsx)(I,{children:ec.map(({href:e,icon:a,label:n})=>(0,t.jsx)(L,{children:(0,t.jsx)(U,{asChild:!0,isActive:r.startsWith(e),tooltip:n,children:(0,t.jsxs)(ed.default,{href:e,children:[(0,t.jsx)(a,{}),(0,t.jsx)("span",{children:n})]})})},e))})})}),e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(O,{}),(0,t.jsxs)($,{children:[(0,t.jsx)(z,{children:"Board"}),(0,t.jsx)(D,{children:(0,t.jsx)(I,{children:eu.map(({status:r,icon:a,label:n})=>{let s=e[r]?.length||0;return(0,t.jsx)(L,{children:(0,t.jsxs)(U,{tooltip:`${n}: ${s}`,children:[(0,t.jsx)(a,{}),(0,t.jsx)("span",{children:n}),(0,t.jsx)("span",{className:"ml-auto font-mono text-xs",children:s})]})},r)})})})]})]})]})]})}var ef=e.i(161863);let eh={name:"file-plus",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]};eh.node;let em=(0,b.default)(eh),ex={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};ex.node;let eb=(0,b.default)(ex);var eg=e.i(776639),ey=e.i(759684);function ev({open:e,onClose:n,onOpenDoc:s,onNewDoc:o,rootParam:i}){let l=(0,a.useRouter)(),[d,c]=(0,r.useState)(""),[u,p]=(0,r.useState)([]),[h,m]=(0,r.useState)(0),x=[{label:"New Doc",icon:em,action:()=>{o?.(),n()}},{label:"Go to Board",icon:G,action:()=>{l.push("/board"),n()}},{label:"Go to Roadmap",icon:el,action:()=>{l.push("/roadmap"),n()}},{label:"Go to Activity",icon:eb,action:()=>{l.push("/activity"),n()}},{label:"Go to Memory",icon:J,action:()=>{l.push("/memory"),n()}}];function b(e){s(e.path),n()}(0,r.useEffect)(()=>{e||(c(""),p([]),m(0))},[e]),(0,r.useEffect)(()=>{if(d.length<2){p([]),m(0);return}let e=setTimeout(async()=>{try{let e=await fetch(`/api/docs${i}&q=${encodeURIComponent(d)}`),t=await e.json();p(t.results?.map(e=>({path:e.file,section:e.file.split("/").slice(0,-1).join("/"),name:e.file.split("/").pop()?.replace(/\.md$/,"")??e.file}))??[]),m(0)}catch{}},300);return()=>clearTimeout(e)},[d,i]);let g=""===d;return(0,t.jsx)(eg.Dialog,{open:e,onOpenChange:e=>{e||n()},children:(0,t.jsxs)(eg.DialogContent,{className:"max-w-lg p-0 overflow-hidden bg-surface border-border gap-0",children:[(0,t.jsx)(eg.DialogTitle,{className:"sr-only",children:"Command Palette"}),(0,t.jsxs)("div",{className:"flex items-center px-4 h-12",children:[(0,t.jsx)(ef.Search,{className:"h-4 w-4 text-muted shrink-0 mr-3"}),(0,t.jsx)(j.Input,{autoFocus:!0,value:d,onChange:e=>c(e.target.value),onKeyDown:function(e){let t=u.length>0,r=t?u.length:x.length;"ArrowDown"===e.key?(e.preventDefault(),m(e=>Math.min(e+1,r-1))):"ArrowUp"===e.key?(e.preventDefault(),m(e=>Math.max(e-1,0))):"Enter"===e.key&&(t&&u[h]?b(u[h]):!t&&d.length<2&&x[h]&&x[h].action())},placeholder:"Search docs…",className:"border-0 bg-transparent h-full text-sm shadow-none focus-visible:ring-0 px-0 placeholder:text-muted"})]}),(0,t.jsx)("div",{className:"border-t border-border"}),(0,t.jsxs)(ey.ScrollArea,{className:"max-h-72",children:[g&&(0,t.jsx)("div",{className:"py-1",children:x.map((e,r)=>(0,t.jsxs)("button",{onClick:e.action,onMouseEnter:()=>m(r),className:(0,f.cn)("flex items-center gap-3 w-full px-4 py-2 text-sm text-left transition-colors",h===r?"bg-accent/10 text-txt":"text-muted hover:text-txt"),children:[(0,t.jsx)(e.icon,{className:"h-4 w-4 shrink-0"}),e.label]},e.label))}),!g&&u.length>0&&(0,t.jsx)("div",{className:"py-1",children:u.map((e,r)=>(0,t.jsxs)("button",{onClick:()=>b(e),onMouseEnter:()=>m(r),className:(0,f.cn)("flex items-center justify-between w-full px-4 py-2 text-sm text-left transition-colors",h===r?"bg-accent/10":"hover:bg-accent/5"),children:[(0,t.jsx)("span",{className:"font-medium text-txt truncate",children:e.name}),e.section&&(0,t.jsx)("span",{className:"text-xs text-muted ml-3 shrink-0 truncate max-w-[40%]",children:e.section})]},e.path))}),!g&&d.length>=2&&0===u.length&&(0,t.jsx)("div",{className:"px-4 py-6 text-center text-sm text-muted",children:"No docs found"})]})]})})}var ej=e.i(406952);let ew=/[/\-_. ]/;function eN({open:e,onClose:a,onOpenDoc:n,rootParam:s}){let[o,i]=(0,r.useState)([]),[l,d]=(0,r.useState)(""),[c,u]=(0,r.useState)(0),p=(0,r.useRef)(null),[h,m]=(0,r.useState)(e);e!==h&&(m(e),e&&(d(""),u(0))),(0,r.useEffect)(()=>{e&&fetch(`/api/docs${s}`).then(e=>e.json()).then(e=>i(Array.isArray(e)?e:[])).catch(()=>i([]))},[e,s]);let x=(0,r.useMemo)(()=>{var e;return e=e=>e.path,o.map(t=>({item:t,path:e(t),score:function(e,t){let r=e.toLowerCase().replace(/\s+/g,"");if(!r)return 0;let a=t.toLowerCase(),n=null;for(let e=a.indexOf(r[0]);-1!==e;e=a.indexOf(r[0],e+1)){let t=function(e,t,r){let a=t.lastIndexOf("/")+1,n=0,s=0,o=-2;for(let i=r;i<t.length&&s<e.length;i++)t[i]===e[s]&&(n+=1,i===o+1&&(n+=5),(0===i||ew.test(t[i-1]))&&(n+=8),i>=a&&(n+=3),o=i,s++);return s===e.length?n:null}(r,a,e);null!==t&&(null===n||t>n)&&(n=t)}return n}(l,e(t))})).filter(e=>null!==e.score).sort((e,t)=>t.score-e.score||e.path.length-t.path.length).map(e=>e.item)},[l,o]),b=x.slice(0,50);function g(e){e&&(n(e.path),a())}return(0,r.useEffect)(()=>{p.current?.querySelector(`[data-index="${c}"]`)?.scrollIntoView({block:"nearest"})},[c]),(0,t.jsx)(eg.Dialog,{open:e,onOpenChange:e=>{e||a()},children:(0,t.jsxs)(eg.DialogContent,{className:"max-w-xl p-0 overflow-hidden bg-surface border-border gap-0 top-[20%] translate-y-0",children:[(0,t.jsx)(eg.DialogTitle,{className:"sr-only",children:"Go to file"}),(0,t.jsx)(j.Input,{autoFocus:!0,value:l,onChange:e=>{d(e.target.value),u(0)},onKeyDown:function(e){"ArrowDown"===e.key||e.ctrlKey&&"n"===e.key?(e.preventDefault(),u(e=>Math.min(e+1,b.length-1))):"ArrowUp"===e.key||e.ctrlKey&&"p"===e.key?(e.preventDefault(),u(e=>Math.max(e-1,0))):"Enter"===e.key&&(e.preventDefault(),g(b[c]))},placeholder:"Go to file…",className:"h-11 rounded-none border-0 border-b border-border bg-transparent px-4 text-sm shadow-none focus-visible:ring-0 placeholder:text-muted"}),(0,t.jsxs)("div",{ref:p,className:"max-h-80 overflow-y-auto py-1",children:[b.map((e,r)=>{let a=e.path.lastIndexOf("/");return(0,t.jsxs)("button",{"data-index":r,onClick:()=>g(e),onMouseMove:()=>u(r),className:(0,f.cn)("flex items-center gap-2.5 w-full px-4 py-1.5 text-left text-sm transition-colors",c===r?"bg-accent/10 text-txt":"text-muted"),children:[(0,t.jsx)(ej.FileText,{className:"h-3.5 w-3.5 shrink-0 opacity-60"}),(0,t.jsx)("span",{className:"truncate text-txt",children:e.path.slice(a+1)}),a>0&&(0,t.jsx)("span",{className:"truncate text-xs text-muted",children:e.path.slice(0,a)})]},e.path)}),0===b.length&&(0,t.jsx)("div",{className:"px-4 py-6 text-center text-sm text-muted",children:"No matching files"}),x.length>50&&(0,t.jsxs)("div",{className:"px-4 py-1.5 text-xs text-muted",children:[x.length-50," more — keep typing to narrow"]})]})]})})}var ek=e.i(91881),eS=e.i(998822);function eE({proposal:e,onResolve:a}){let{rootParam:s,openDoc:o}=(0,n.useApp)(),[i,l]=(0,r.useState)(null),[d,c]=(0,r.useState)(null),[u,p]=(0,r.useState)(!1);(0,r.useEffect)(()=>{fetch(`/api/docs${s}&read=${encodeURIComponent(e.path)}`).then(e=>e.ok?e.json():null).then(t=>l(t?.path===e.path.replace(/^\.\//,"")&&"string"==typeof t.content?t.content:"")).catch(()=>l(""))},[e.path,s]);let h=(0,r.useMemo)(()=>null===i?null:function(e,t){let r=e;for(let[e,a]of t.entries()){if("string"!=typeof a?.old_string||"string"!=typeof a?.new_string)return{error:`Edit ${e+1}: old_string and new_string must be strings`};if(""===a.old_string){if(""!==r)return{error:`Edit ${e+1}: empty old_string is only allowed for a new, empty doc`};r=a.new_string;continue}let t=r.indexOf(a.old_string);if(-1===t)return{error:`Edit ${e+1}: old_string not found in the doc`};if(-1!==r.indexOf(a.old_string,t+1))return{error:`Edit ${e+1}: old_string matches more than once; include more surrounding text`};r=r.slice(0,t)+a.new_string+r.slice(t+a.old_string.length)}return{content:r}}(i,e.edits),[i,e.edits]),m=null!==h&&"error"in h?h.error:null,x=(0,r.useMemo)(()=>{var e;let t,r;return null===i||!h||"error"in h?[]:(t=(e=function(e,t){let r=e.split("\n"),a=t.split("\n"),n=0;for(;n<r.length&&n<a.length&&r[n]===a[n];)n++;let s=r.length,o=a.length;for(;s>n&&o>n&&r[s-1]===a[o-1];)s--,o--;let i=r.slice(n,s),l=a.slice(n,o),d=Array.from({length:i.length+1},()=>Array(l.length+1).fill(0));for(let e=i.length-1;e>=0;e--)for(let t=l.length-1;t>=0;t--)d[e][t]=i[e]===l[t]?d[e+1][t+1]+1:Math.max(d[e+1][t],d[e][t+1]);let c=[],u=0,p=0;for(;u<i.length||p<l.length;)u<i.length&&p<l.length&&i[u]===l[p]?(c.push({op:" ",text:i[u]}),u++,p++):u<i.length&&(p===l.length||d[u+1][p]>=d[u][p+1])?(c.push({op:"-",text:i[u]}),u++):(c.push({op:"+",text:l[p]}),p++);return[...r.slice(0,n).map(e=>({op:" ",text:e})),...c,...r.slice(s).map(e=>({op:" ",text:e}))]}(i,h.content)).map(()=>!1),e.forEach((r,a)=>{if(" "!==r.op)for(let r=Math.max(0,a-2);r<=Math.min(e.length-1,a+2);r++)t[r]=!0}),r=[],e.forEach((e,a)=>{t[a]?r.push(e):"number"==typeof r[r.length-1]?r[r.length-1]=r[r.length-1]+1:r.push(1)}),r)},[i,h]),b=x.filter(e=>"number"!=typeof e&&"+"===e.op).length,g=x.filter(e=>"number"!=typeof e&&"-"===e.op).length;async function y(){p(!0),c(null);try{let t=await fetch(`/api/docs${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path,edits:e.edits,actor:"ai"})});if(!t.ok)throw Error((await t.json().catch(()=>null))?.error??"Save failed");a("accepted")}catch(e){c(e.message)}finally{p(!1)}}return(0,t.jsxs)("div",{className:"my-2 rounded-md border border-border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-surface2 border-b border-border",children:[(0,t.jsx)("button",{onClick:()=>o(e.path),className:"text-xs font-mono text-accent truncate hover:underline",title:e.path,children:e.path}),(0,t.jsxs)("span",{className:"text-[10px] font-mono text-teal-400",children:["+",b]}),(0,t.jsxs)("span",{className:"text-[10px] font-mono text-red-400",children:["-",g]})]}),e.summary&&(0,t.jsx)("div",{className:"px-2 py-1 text-xs text-muted border-b border-border",children:e.summary}),(0,t.jsxs)("div",{className:"max-h-72 overflow-auto text-[11px] font-mono leading-5",children:[null===i&&(0,t.jsx)("div",{className:"px-2 py-1 text-muted",children:"Loading diff…"}),m&&(0,t.jsxs)("div",{className:"px-2 py-1 text-red-400",children:["Doc changed since this proposal (",m,"). Ask the agent to propose again."]}),null!==i&&!m&&0===x.length&&(0,t.jsx)("div",{className:"px-2 py-1 text-muted",children:"No changes"}),x.map((e,r)=>"number"==typeof e?(0,t.jsxs)("div",{className:"px-2 text-muted bg-surface2/50",children:["⋯ ",e," unchanged line",e>1?"s":""]},r):(0,t.jsxs)("div",{className:(0,f.cn)("px-2 whitespace-pre-wrap break-words","+"===e.op&&"bg-teal-500/10 text-teal-300","-"===e.op&&"bg-red-500/10 text-red-300 line-through decoration-red-400/40"),children:[e.op," ",e.text||" "]},r))]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 border-t border-border",children:["pending"===e.status?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:y,disabled:u||null===i||!!m,className:"text-xs px-2 py-0.5 rounded-sm bg-accent/20 text-accent hover:bg-accent/30 disabled:opacity-50",children:u?"Applying…":"Accept"}),(0,t.jsx)("button",{onClick:()=>a("rejected"),disabled:u,className:"text-xs px-2 py-0.5 rounded-sm text-muted hover:text-txt",children:"Reject"})]}):(0,t.jsx)("span",{className:(0,f.cn)("text-xs","accepted"===e.status?"text-teal-400":"text-muted"),children:"accepted"===e.status?"✓ Applied":"Rejected"}),d&&(0,t.jsx)("span",{className:"text-xs text-red-400 truncate",children:d})]})]})}function e_({proposal:e,onResolve:a}){let{rootParam:s,openDoc:o}=(0,n.useApp)(),i=e.plan,l="breakdown"===i.kind?i.tasks:[],d="roadmap"===i.kind?i.horizons??[]:[],c="roadmap"===i.kind?i.epics??[]:[],u="breakdown"===i.kind?(i.epic??"").trim().toUpperCase():"",p="breakdown"===i.kind?i.newEpic:void 0,[f,h]=(0,r.useState)(new Map),[m,x]=(0,r.useState)(new Set),[b,g]=(0,r.useState)(null),[y,v]=(0,r.useState)(null),[j,w]=(0,r.useState)(!1);(0,r.useEffect)(()=>{fetch(`/api/roadmap${s}`).then(e=>e.ok?e.json():null).then(e=>h(new Map((e?.items??[]).map(e=>[e.id,e.title])))).catch(()=>h(new Map))},[s]);let N=("breakdown"===i.kind?l.map(e=>e.key):[...d,...c].map(e=>e.key)).filter(e=>!m.has(e)),k="pending"===e.status,S=new Set(d.map(e=>e.key)),E=(e,r,a,n,s=!1)=>(0,t.jsx)(eC,{rowKey:e,title:r,meta:a,body:n,indent:s,checked:!m.has(e),disabled:!k||j,onToggle:()=>{v(null),x(t=>{let r=new Set(t),a=r.has(e);for(let t of S.has(e)?[e,...c.filter(t=>t.parent.trim()===e).map(e=>e.key)]:[e])a?r.delete(t):r.add(t);let n=c.find(t=>t.key===e)?.parent.trim();return a&&n&&S.has(n)&&r.delete(n),r})},open:b===e,onOpen:()=>g(b===e?null:e)},e),_=e=>e.trim().split("\n")[0]??"",C=[...new Set(c.map(e=>e.parent.trim()).filter(e=>!S.has(e)))];async function A(){w(!0),v(null);try{let e=await fetch(`/api/plan/apply${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plan:i,selected:N})}),t=await e.json().catch(()=>null);if(!e.ok)throw Error(t?.error??`Apply failed (${e.status})`);a("accepted",t?.created??[],[...m])}catch(e){v(e.message)}finally{w(!1)}}return(0,t.jsxs)("div",{className:"my-2 rounded-md border border-border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-surface2 border-b border-border",children:[(0,t.jsx)("span",{className:"text-[10px] font-mono uppercase tracking-widest text-muted",children:"Plan"}),"breakdown"===i.kind?(0,t.jsxs)(t.Fragment,{children:[u?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-xs font-mono text-accent",children:u}),(0,t.jsx)("span",{className:"text-xs text-txt truncate",children:f.get(u)??""})]}):p?(0,t.jsxs)("span",{className:"text-xs text-txt truncate",children:["New epic: ",p.title,(0,t.jsxs)("span",{className:"text-muted",children:[" (under ",p.parent.trim().toUpperCase()," ",f.get(p.parent.trim().toUpperCase())??"",")"]})]}):(0,t.jsx)("span",{className:"text-xs text-muted",children:"No epic"}),(0,t.jsxs)("span",{className:"ml-auto text-[10px] font-mono text-muted",children:[l.length," tasks"]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-xs text-txt",children:"Roadmap"}),(0,t.jsxs)("span",{className:"ml-auto text-[10px] font-mono text-muted",children:[d.length?`${d.length} horizons \xb7 `:"",c.length," epics"]})]})]}),(0,t.jsxs)("ul",{className:"max-h-80 overflow-auto",children:[l.map(e=>E(e.key,e.title,[e.size,e.dependsOn?.length?`after ${e.dependsOn.join(", ")}`:null,e.due?`due ${e.due}`:null].filter(Boolean).join(" · "),e.body)),d.map(e=>[E(e.key,e.title,"new horizon",e.body),...c.filter(t=>t.parent.trim()===e.key).map(e=>E(e.key,e.title,_(e.body),e.body,!0))]),C.map(e=>[(0,t.jsxs)("li",{className:"px-2 py-1.5 border-b border-border text-xs text-muted",children:[(0,t.jsx)("span",{className:"font-mono text-accent mr-1",children:e.toUpperCase()}),f.get(e.toUpperCase())??""]},`parent-${e}`),...c.filter(t=>t.parent.trim()===e).map(e=>E(e.key,e.title,_(e.body),e.body,!0))])]}),y&&(0,t.jsx)("div",{className:"px-2 py-1 text-xs text-red-400 whitespace-pre-wrap border-t border-border",children:y}),(0,t.jsx)("div",{className:"flex items-center gap-2 px-2 py-1.5 border-t border-border",children:k?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:A,disabled:j||0===N.length,className:"text-xs px-2 py-0.5 rounded-sm bg-accent/20 text-accent hover:bg-accent/30 disabled:opacity-50",children:j?"Creating…":`Accept (${N.length})`}),(0,t.jsx)("button",{onClick:()=>a("rejected",[],[]),disabled:j,className:"text-xs px-2 py-0.5 rounded-sm text-muted hover:text-txt",children:"Reject"})]}):"accepted"===e.status?(0,t.jsxs)("span",{className:"text-xs text-teal-400",children:["✓ Created"," ",(e.created??[]).map((e,r)=>(0,t.jsxs)("span",{children:[r>0&&", ",(0,t.jsx)("button",{onClick:()=>o(e.file),className:"font-mono hover:underline",children:e.id})]},e.id))]}):(0,t.jsx)("span",{className:"text-xs text-muted",children:"Rejected"})})]})}function eC({rowKey:e,title:r,meta:a,body:n,indent:s,checked:o,disabled:i,onToggle:l,open:d,onOpen:c}){return(0,t.jsxs)("li",{"data-plan-row":e,className:"border-b border-border last:border-b-0",children:[(0,t.jsxs)("div",{className:(0,f.cn)("flex items-start gap-2 px-2 py-1.5",s&&"pl-6"),children:[(0,t.jsx)("input",{type:"checkbox","aria-label":`Include ${r}`,checked:o,disabled:i,onChange:l,className:"mt-0.5 accent-accent"}),(0,t.jsxs)("button",{onClick:c,className:"flex-1 min-w-0 text-left",children:[(0,t.jsxs)("div",{className:(0,f.cn)("text-xs text-txt",!o&&"line-through text-muted"),children:[(0,t.jsx)("span",{className:"font-mono text-muted mr-1",children:e}),r]}),a&&(0,t.jsx)("div",{className:"text-[10px] font-mono text-muted truncate",children:a})]})]}),d&&n&&(0,t.jsx)("div",{className:"px-3 pb-2 border-t border-border bg-surface2/40",children:(0,t.jsx)(eS.MarkdownRenderer,{content:n,className:"text-xs"})})]})}let eA="\0other";function eM({set:e,disabled:a,onSubmit:n}){let[s,o]=(0,r.useState)(()=>e.questions.map(()=>[])),[i,l]=(0,r.useState)(()=>e.questions.map(()=>"")),d=!!e.answers,c=e.questions.map((e,t)=>{let r=e.options.map(e=>e.label).filter(e=>s[t].includes(e));return s[t].includes(eA)&&i[t].trim()&&r.push(`Other: "${i[t].trim()}"`),r.join(", ")}),u=c.every(Boolean);return(0,t.jsxs)("div",{className:"my-2 rounded-md border border-border overflow-hidden","data-question-card":!0,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-surface2 border-b border-border",children:[(0,t.jsx)("span",{className:"text-[10px] font-mono uppercase tracking-widest text-muted",children:"Questions"}),d&&(0,t.jsx)("span",{className:"ml-auto text-[10px] font-mono text-accent",children:"✓ Answered"})]}),(0,t.jsxs)("div",{className:"p-2 space-y-3",children:[e.questions.map((r,a)=>(0,t.jsxs)("fieldset",{disabled:d,className:"space-y-1",children:[(0,t.jsxs)("legend",{className:"mb-1",children:[(0,t.jsx)("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded-sm bg-surface2 border border-border text-accent mr-1.5",children:r.header}),(0,t.jsx)("span",{className:"text-xs text-txt",children:r.question})]}),d?(0,t.jsx)("p",{className:"text-xs text-txt pl-1",children:e.answers?.[a]}):(0,t.jsxs)(t.Fragment,{children:[[...r.options,{label:"Other",value:eA}].map(n=>{let i="value"in n?n.value:n.label,l=s[a].includes(i);return(0,t.jsxs)("label",{className:(0,f.cn)("flex gap-2 items-start rounded-sm px-1 py-0.5 cursor-pointer hover:bg-surface2",l&&"bg-surface2"),children:[(0,t.jsx)("input",{type:r.multiSelect?"checkbox":"radio",name:`${e.id}-${a}`,checked:l,onChange:()=>{var e;return e=r.multiSelect,void o(t=>t.map((t,r)=>r!==a?t:e?t.includes(i)?t.filter(e=>e!==i):[...t,i]:[i]))},className:"mt-0.5 accent-accent"}),(0,t.jsxs)("span",{className:"text-xs",children:[(0,t.jsx)("span",{className:"text-txt",children:n.label}),"description"in n&&n.description&&(0,t.jsx)("span",{className:"block text-muted",children:n.description})]})]},i)}),s[a].includes(eA)&&(0,t.jsx)("input",{value:i[a],onChange:e=>l(t=>t.map((t,r)=>r===a?e.target.value:t)),placeholder:"Your answer","aria-label":`Other answer for ${r.header}`,className:"ml-6 w-[calc(100%-1.5rem)] rounded-sm bg-surface2 border border-border px-2 py-1 text-xs text-txt placeholder:text-muted focus:outline-hidden focus:border-accent"})]})]},a)),!d&&(0,t.jsx)("button",{onClick:()=>n(c),disabled:!u||a,className:"text-xs px-2 py-0.5 rounded-sm bg-accent/20 text-accent hover:bg-accent/30 disabled:opacity-50",children:"Submit"})]})]})}let eT=e=>!!e&&"object"==typeof e&&!Array.isArray(e),eR=e=>"string"==typeof e?e.trim():"";var eO=e.i(956555);function eP({onClose:e}){let{rootParam:s,activeProject:o,selectedDoc:i}=(0,n.useApp)(),l=(0,a.usePathname)(),[d,c]=(0,r.useState)([]),[u,p]=(0,r.useState)(""),[h,m]=(0,r.useState)(!1),[x,b]=(0,r.useState)(null),g=(0,r.useRef)(null),y=(0,r.useRef)(null),v=(0,r.useRef)(null),j=(0,r.useRef)([]),w="/docs"===l?i?.path:void 0;function N(e){c(t=>[...t.slice(0,-1),e(t[t.length-1])])}async function k(e){let t=(e??u).trim();if(!t||h)return;void 0===e&&p(""),b(null),m(!0),c(e=>[...e,{role:"user",text:t,tools:[],proposals:[],plans:[],questions:[]},{role:"assistant",text:"",tools:[],proposals:[],plans:[],questions:[]}]);let r=j.current.splice(0),a=r.length?`[${r.join(" ")}]
2
-
3
- ${t}`:t,n=new AbortController;y.current=n;try{let e=await fetch(`/api/chat${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:a,sessionId:g.current,docPath:w}),signal:n.signal});if(!e.ok||!e.body){let t=await e.json().catch(()=>null);throw Error(t?.error??`Request failed (${e.status})`)}let t=e.body.getReader(),r=new TextDecoder,o="";for(;;){let{done:e,value:a}=await t.read();if(e)break;let n=(o+=r.decode(a,{stream:!0})).split("\n");for(let e of(o=n.pop()??"",n))if(e.trim())try{!function(e){if(e.session_id&&(g.current=e.session_id),"stream_event"===e.type){let t=e.event;t?.type==="message_start"?N(e=>e.text&&!e.text.endsWith("\n\n")?{...e,text:e.text+"\n\n"}:e):t?.type==="content_block_delta"&&t.delta?.type==="text_delta"&&N(e=>({...e,text:e.text+t.delta.text}))}else if("assistant"===e.type){let t=(e.message?.content??[]).filter(e=>"tool_use"===e.type),r=t.filter(e=>e.name.endsWith("vibedoc_propose_edit")&&"string"==typeof e.input?.path&&Array.isArray(e.input?.edits)).map(e=>({id:e.id,path:e.input.path,edits:e.input.edits,summary:"string"==typeof e.input.summary?e.input.summary:void 0,status:"pending"})),a=t.filter(e=>e.name.endsWith("vibedoc_propose_plan")).flatMap(e=>{let t=function(e){if(!eT(e))return null;let t=(e,t)=>Array.isArray(e)&&e.every(e=>eT(e)&&t.every(t=>"string"==typeof e[t])&&(void 0===e.dependsOn||Array.isArray(e.dependsOn)));if("breakdown"===e.kind){let r=void 0===e.epic||"string"==typeof e.epic,a=void 0===e.newEpic||eT(e.newEpic)&&"string"==typeof e.newEpic.title&&"string"==typeof e.newEpic.parent;return r&&a&&t(e.tasks,["key","title"])&&e.tasks.length>0?e:null}if("roadmap"===e.kind){let r=e.horizons??[],a=e.epics??[];return t(r,["key","title"])&&t(a,["key","title","parent"])?{kind:"roadmap",horizons:r,epics:a}:null}return null}(e.input?.plan);return t?[{id:e.id,plan:t,status:"pending"}]:[]}),n=t.filter(e=>{var t;return e.name.endsWith("vibedoc_ask_questions")&&Array.isArray(t=e.input?.questions)&&t.length>0&&t.every(e=>!!e&&"object"==typeof e&&"string"==typeof e.question&&"string"==typeof e.header&&Array.isArray(e.options)&&e.options.every(e=>!!e&&"object"==typeof e&&"string"==typeof e.label))}).map(e=>({id:e.id,questions:e.input.questions})),s=["vibedoc_propose_edit","vibedoc_propose_plan","vibedoc_ask_questions"],o=t.filter(e=>!s.some(t=>e.name.endsWith(t))).map(e=>e.name.replace(/^mcp__vibedoc__vibedoc_/,""));(o.length||r.length||a.length||n.length)&&N(e=>({...e,tools:[...e.tools,...o],proposals:[...e.proposals,...r],plans:[...e.plans,...a],questions:[...e.questions,...n]}))}else if("user"===e.type){let t=new Set((e.message?.content??[]).filter(e=>"tool_result"===e.type&&e.is_error).map(e=>e.tool_use_id));t.size&&N(e=>({...e,proposals:e.proposals.filter(e=>!t.has(e.id)),plans:e.plans.filter(e=>!t.has(e.id)),questions:e.questions.filter(e=>!t.has(e.id))}))}else"result"===e.type&&e.is_error?N(t=>({...t,error:e.result??e.subtype??"Agent error"})):"error"===e.type&&N(t=>({...t,error:e.message}))}(JSON.parse(e))}catch{}}}catch(e){n.signal.aborted||N(t=>({...t,error:e.message}))}finally{m(!1)}}(0,r.useEffect)(()=>{y.current?.abort(),g.current=null,j.current=[],c([])},[o]),(0,r.useEffect)(()=>{let e=v.current;e&&(e.scrollTop=e.scrollHeight)},[d]),(0,r.useEffect)(()=>{function e(e){let t=e.detail?.message;t&&(h?b("Agent is busy. Try again when this turn finishes."):k(t))}return window.addEventListener(eO.ASK_AGENT_EVENT,e),()=>window.removeEventListener(eO.ASK_AGENT_EVENT,e)});let S=!!d[d.length-1]?.questions.some(e=>!e.answers);return(0,t.jsxs)("aside",{className:"w-[380px] h-full border-l border-border bg-surface flex flex-col",children:[(0,t.jsxs)("div",{className:"h-10 px-3 flex items-center gap-2 border-b border-border",children:[(0,t.jsx)("span",{className:"text-xs font-mono uppercase tracking-widest text-muted",children:"Agent"}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsx)("button",{onClick:function(){y.current?.abort(),g.current=null,j.current=[],c([])},className:"text-xs text-muted hover:text-txt",children:"New chat"}),(0,t.jsx)("button",{onClick:e,className:"text-muted hover:text-txt text-lg leading-none","aria-label":"Close chat",children:"×"})]}),(0,t.jsxs)("div",{ref:v,className:"flex-1 overflow-y-auto p-3 space-y-3 text-sm",children:[0===d.length&&(0,t.jsx)("p",{className:"text-muted text-xs",children:"Ask the agent to read, write or restructure docs. Runs on your local Claude Code login."}),d.map((e,r)=>(0,t.jsx)("div",{className:(0,f.cn)("user"===e.role&&"ml-8 rounded-lg bg-surface2 px-3 py-2 whitespace-pre-wrap"),children:"user"===e.role?e.text:(0,t.jsxs)(t.Fragment,{children:[e.tools.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mb-2",children:e.tools.map((e,r)=>(0,t.jsx)("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded-sm bg-surface2 border border-border text-accent",children:e},r))}),e.proposals.map(e=>(0,t.jsx)(eE,{proposal:e,onResolve:t=>{var r,a;return r=e.id,a=e.path,void(j.current.push(`User ${t} your proposed edit to ${a}.`),c(e=>e.map(e=>({...e,proposals:e.proposals.map(e=>e.id===r?{...e,status:t}:e)}))))}},e.id)),e.plans.map(e=>(0,t.jsx)(e_,{proposal:e,onResolve:(t,r,a)=>{var n;let s;return s="breakdown"===e.plan.kind?eR((n=e.plan).epic)?eR(n.epic).toUpperCase():n.newEpic?`new epic "${eR(n.newEpic.title)}"`:"no epic":"the roadmap",void(j.current.push("accepted"===t?`User accepted plan for ${s}: created ${r.map(e=>e.id).join(", ")}${a.length?` (unchecked: ${a.join(", ")})`:""}.`:`User rejected the plan for ${s}.`),c(a=>a.map(a=>({...a,plans:a.plans.map(a=>a.id===e.id?{...a,status:t,created:r}:a)}))))}},e.id)),e.questions.map(e=>(0,t.jsx)(eM,{set:e,disabled:h,onSubmit:t=>(function(e,t){if(!h){var r;c(r=>r.map(r=>({...r,questions:r.questions.map(r=>r.id===e.id?{...r,answers:t}:r)}))),k((r=e.questions,["Answers:",...r.map((e,r)=>`- ${e.header}: ${t[r]}`)].join("\n")))}})(e,t)},e.id)),e.text&&(0,t.jsx)(eS.MarkdownRenderer,{content:e.text,className:"text-sm"}),!e.text&&!e.error&&h&&r===d.length-1&&(0,t.jsx)("span",{className:"text-muted text-xs",children:"Thinking…"}),e.error&&(0,t.jsx)("p",{className:"text-red-400 text-xs whitespace-pre-wrap",children:e.error})]})},r))]}),(0,t.jsxs)("div",{className:"border-t border-border p-2",children:[x&&(0,t.jsx)("div",{className:"text-[11px] text-amber px-1 pb-1",children:x}),w&&(0,t.jsxs)("div",{className:"text-[10px] font-mono text-muted px-1 pb-1 truncate",children:["@ ",w]}),(0,t.jsx)("textarea",{value:u,onChange:e=>p(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),k())},rows:3,placeholder:h?"Agent is working…":S?"Answer the questions above…":"Ask the agent… (Enter to send)",className:"w-full resize-none rounded-md bg-surface2 border border-border px-2 py-1.5 text-sm text-txt placeholder:text-muted focus:outline-hidden focus:border-accent"})]})]})}let e$=[{key:"Cmd+K",description:"Open command palette"},{key:"Cmd+P",description:"Go to file"},{key:"b",description:"Go to Board"},{key:"d",description:"Go to Docs"},{key:"a",description:"Go to Activity"},{key:"m",description:"Go to Memory"},{key:"e",description:"Go to Explorer"},{key:"c",description:"Toggle agent chat"},{key:"/",description:"Focus doc search"},{key:"?",description:"Toggle this help"},{key:"Esc",description:"Close panel / modal"}];function ez({children:e}){let{loading:s,summary:o,projects:i,activeProject:d,liveIndicator:c,onProjectChange:u,board:p,openDoc:h,rootParam:m}=(0,n.useApp)(),x=(0,a.useRouter)(),b=(0,a.usePathname)(),[g,y]=(0,r.useState)(!1),[v,j]=(0,r.useState)(!1),[w,N]=(0,r.useState)(!1),[k,S]=(0,r.useState)(!1),[E,_]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{function e(e){if((e.metaKey||e.ctrlKey)&&"k"===e.key){e.preventDefault(),j(e=>!e);return}if((e.metaKey||e.ctrlKey)&&"p"===e.key){e.preventDefault(),j(!1),N(e=>!e);return}let t=e.target?.tagName;if("INPUT"!==t&&"TEXTAREA"!==t)switch(e.key){case"b":x.push("/board");break;case"d":x.push("/docs");break;case"a":x.push("/activity");break;case"m":x.push("/memory");break;case"e":x.push("/explorer");break;case"c":_(e=>!e);break;case"?":y(e=>!e);break;case"Escape":y(!1);break;case"/":e.preventDefault(),"/docs"===b?document.getElementById("doc-search")?.focus():x.push("/docs")}}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[x,b]),(0,r.useEffect)(()=>{let e=()=>_(!0);return window.addEventListener(eO.ASK_AGENT_EVENT,e),()=>window.removeEventListener(eO.ASK_AGENT_EVENT,e)},[]),s)?(0,t.jsx)(l,{}):(0,t.jsxs)(C,{children:[(0,t.jsx)(ep,{board:p}),(0,t.jsxs)(T,{className:"min-w-0",children:[(0,t.jsx)(F,{summary:o,projects:i,activeProject:d,liveIndicator:c,onProjectChange:u,onToggleChat:()=>_(e=>!e)}),(0,t.jsxs)("div",{className:"flex flex-1 min-h-0",children:[(0,t.jsx)("main",{className:"flex-1 overflow-y-auto",children:e}),(0,t.jsx)("div",{inert:!E,className:(0,f.cn)("shrink-0 overflow-hidden sticky top-12 h-[calc(100svh-3rem)] transition-[width] duration-[var(--duration-slow)] ease-out-soft",E?"w-[380px]":"w-0"),children:(0,t.jsx)(eP,{onClose:()=>_(!1)})})]}),(0,t.jsx)(eN,{open:w,onClose:()=>N(!1),onOpenDoc:h,rootParam:m}),(0,t.jsx)(ev,{open:v,onClose:()=>j(!1),onOpenDoc:h,onNewDoc:()=>{j(!1),S(!0)},rootParam:m}),(0,t.jsx)(ek.NewDocModal,{open:k,onOpenChange:S,rootParam:m,onDocCreated:async e=>{await h(e)}}),(0,t.jsx)(eg.Dialog,{open:g,onOpenChange:y,children:(0,t.jsxs)(eg.DialogContent,{"aria-describedby":void 0,className:"block w-80 p-5 rounded-xl sm:rounded-xl shadow-2xl",children:[(0,t.jsx)(eg.DialogTitle,{className:"font-display text-sm font-semibold text-txt mb-4",children:"Keyboard shortcuts"}),(0,t.jsx)("table",{className:"w-full text-xs",children:(0,t.jsx)("tbody",{children:e$.map(({key:e,description:r})=>(0,t.jsxs)("tr",{className:"border-t border-border first:border-0",children:[(0,t.jsx)("td",{className:"py-1.5 pr-4",children:(0,t.jsx)("kbd",{className:"font-mono bg-surface2 border border-border rounded-sm px-1.5 py-0.5 text-accent",children:e})}),(0,t.jsx)("td",{className:"py-1.5 text-muted",children:r})]},e))})})]})})]})]})}e.s(["default",0,function({children:e}){return(0,t.jsxs)(n.AppProvider,{children:[(0,t.jsx)(i,{}),(0,t.jsx)(ez,{children:e})]})}],588537)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,479432,e=>{"use strict";var t=e.i(83790);let a={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};a.node;let s=(0,t.default)(a);e.s(["Bot",0,s],479432)},240595,e=>{"use strict";var t=e.i(83790);let a={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};a.node;let s=(0,t.default)(a);e.s(["Loader2",0,s],240595)},885600,e=>{"use strict";var t=e.i(83790);let a={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};a.node;let s=(0,t.default)(a);e.s(["Sparkles",0,s],885600)},496385,e=>{"use strict";var t=e.i(83790);let a={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};a.node;let s=(0,t.default)(a);e.s(["AlertTriangle",0,s],496385)},172856,798103,394512,e=>{"use strict";var t=e.i(83790);let a={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};a.node;let s=(0,t.default)(a);e.s(["Users",0,s],172856);let r={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};r.node;let l=(0,t.default)(r);e.s(["Code2",0,l],798103);let i={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};i.node;let n=(0,t.default)(i);e.s(["List",0,n],394512)},294895,e=>{"use strict";var t=e.i(72345),a=e.i(180338),s=e.i(763371),r=e.i(83790);let l={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};l.node;let i=(0,r.default)(l);var n=e.i(675964),c=e.i(885600),o=e.i(837001),d=e.i(240595),m=e.i(975157),x=e.i(479432),h=e.i(406952);let p={name:"building-complex",size:24,node:[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],aliases:["building-2"]};p.node;let u=(0,r.default)(p),b={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};b.node;let g=(0,r.default)(b);var f=e.i(732460),y=e.i(496385);let v={name:"calendar",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]]};v.node;let j=(0,r.default)(v);var k=e.i(172856);let N={name:"git-branch",size:24,node:[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]};N.node;let w=(0,r.default)(N),C={name:"shield",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]};C.node;let S=(0,r.default)(C),T={name:"database",size:24,node:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]};T.node;let M=(0,r.default)(T);var P=e.i(798103);let A={name:"workflow",size:24,node:[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]};A.node;let z=(0,r.default)(A);var I=e.i(394512),L=e.i(649021);let R=[{id:"nextjs-production",name:"Next.js Production",description:"Complete setup for a production Next.js application with CI/CD, Docker, and code quality tools",projectTypes:["web-app"],templateIds:["claude-md","architecture-overview","contributing","security","pr-template","changelog","testing","onboarding","dockerfile","docker-compose","dockerignore","env-example","ci-workflow","cd-workflow","dependabot-config","eslintrc","prettierrc","tsconfig-strict","vscode-settings","vscode-extensions"]},{id:"api-backend",name:"API Backend",description:"Production API service with OpenAPI spec, Docker, monitoring, and runbook",projectTypes:["api-backend"],templateIds:["claude-md","architecture-overview","api-reference","openapi","runbook","contributing","security","pr-template","changelog","testing","dockerfile","docker-compose","dockerignore","env-example","ci-workflow","cd-workflow","health-check-doc","slo-doc"]},{id:"library-sdk",name:"Library / SDK",description:"Open-source library with strict TypeScript, changelog, and release automation",projectTypes:["library"],templateIds:["claude-md","contributing","security","pr-template","changelog","testing","tsconfig-strict","eslintrc","prettierrc","editorconfig","commitlint","dependabot-config","release-workflow","codeowners"]},{id:"cli-tool",name:"CLI Tool",description:"Command-line tool with Makefile automation and release workflow",projectTypes:["cli-tool"],templateIds:["claude-md","contributing","security","pr-template","changelog","testing","makefile","env-example","ci-workflow","release-workflow","commitlint","editorconfig","eslintrc"]},{id:"monorepo",name:"Monorepo",description:"Multi-package monorepo with code ownership, commit conventions, and architecture docs",projectTypes:["monorepo"],templateIds:["claude-md","architecture-overview","contributing","security","pr-template","changelog","testing","onboarding","codeowners","commitlint","ci-workflow","cd-workflow","dockerfile","env-example","eslintrc","lint-staged"]},{id:"ai-first",name:"AI-First",description:"Cross-cutting preset for projects that heavily use AI coding agents",projectTypes:[],templateIds:["claude-md","agents-md","gemini-md","cursorrules","copilot-instructions","contributing","pr-template","changelog"]},{id:"minimal",name:"Minimal",description:"Just the essentials — get started fast with 5 key files",projectTypes:[],templateIds:["claude-md","contributing","pr-template","changelog","env-example"]}],F={"ai-agent":"AI Agent Config",github:"GitHub",process:"Process Docs",technical:"Technical Docs",infrastructure:"Infrastructure","github-actions":"GitHub Actions","code-quality":"Code Quality",monitoring:"Monitoring"},D={"ai-agent":x.Bot,github:w,process:z,technical:h.FileText,infrastructure:g,"github-actions":z,"code-quality":o.Check,monitoring:y.AlertTriangle},B={"claude-md":x.Bot,"agents-md":x.Bot,"gemini-md":x.Bot,cursorrules:P.Code2,windsurfrules:P.Code2,"copilot-instructions":x.Bot,contributing:w,security:S,"pr-template":w,"bug-report":y.AlertTriangle,"feature-request":h.FileText,changelog:I.List,deployment:z,testing:o.Check,glossary:f.BookOpen,prd:h.FileText,"architecture-overview":u,"api-reference":g,runbook:f.BookOpen,adr:y.AlertTriangle,onboarding:k.Users,database:M,openapi:g,"meeting-notes":j,blank:h.FileText},E=function(e){let t=[],a=new Map;for(let s of e)a.has(s.category)||(t.push(s.category),a.set(s.category,[])),a.get(s.category).push(s);return t.map(e=>({category:e,displayName:F[e]??e,items:a.get(e)}))}(L.TEMPLATES);function G({selected:e,onChange:s,projectType:r}){let l,[i,n]=(0,a.useState)("recommended"),c=t=>e.some(e=>e.id===t),d=R.filter(e=>0===e.projectTypes.length||e.projectTypes.includes(r??""));return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-txt mb-2",children:"Select Templates"}),(0,t.jsx)("p",{className:"text-muted",children:"Choose which documentation files to generate for your project."})]}),(0,t.jsxs)("div",{className:"flex gap-1 overflow-x-auto pb-2 border-b border-border",children:[(0,t.jsx)("button",{onClick:()=>n("recommended"),className:(0,m.cn)("px-3 py-1.5 text-sm rounded-md whitespace-nowrap transition-colors","recommended"===i?"bg-accent text-white":"text-muted hover:text-txt"),children:"⭐ Recommended"}),E.map(e=>(0,t.jsx)("button",{onClick:()=>n(e.category),className:(0,m.cn)("px-3 py-1.5 text-sm rounded-md whitespace-nowrap transition-colors",i===e.category?"bg-accent text-white":"text-muted hover:text-txt"),children:e.displayName},e.category))]}),"recommended"===i&&(0,t.jsxs)("div",{className:"space-y-4",children:[0===d.length&&(0,t.jsx)("p",{className:"text-muted text-sm",children:"No presets match your project type. Select templates manually from the tabs above."}),d.map(e=>{let a=e.templateIds.every(e=>c(e));return(0,t.jsx)("div",{className:"p-4 rounded-lg border border-border hover:border-accent/50 transition-colors",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium text-txt",children:e.name}),(0,t.jsx)("div",{className:"text-sm text-muted mt-1",children:e.description}),(0,t.jsxs)("div",{className:"text-xs text-accent/70 mt-1",children:[e.templateIds.length," templates"]})]}),(0,t.jsx)("button",{onClick:()=>{s(e.templateIds.map(e=>L.TEMPLATES.find(t=>t.id===e)).filter(e=>void 0!==e).map(e=>({id:e.id,name:e.name,path:e.defaultPath})))},className:(0,m.cn)("shrink-0 px-3 py-1.5 text-sm rounded-lg border transition-colors",a?"border-accent bg-accent/10 text-accent":"border-border hover:border-accent text-txt"),children:a?"✓ Selected":"Select bundle"})]})},e.id)})]}),"recommended"!==i&&((l=E.find(e=>e.category===i))?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-muted uppercase tracking-wider",children:l.displayName}),(0,t.jsx)("button",{onClick:()=>(t=>{let a=E.find(e=>e.category===t);if(a)if(a.items.every(e=>c(e.id)))s(e.filter(e=>!a.items.some(t=>t.id===e.id)));else{let t=[...e];a.items.forEach(e=>{c(e.id)||t.push({id:e.id,name:e.name,path:e.defaultPath})}),s(t)}})(l.category),className:"text-xs text-accent hover:text-accent/80 transition-colors",children:l.items.every(e=>c(e.id))?"Deselect all":"Select all"})]}),(0,t.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:l.items.map(a=>{let r=B[a.id]??D[a.category],l=c(a.id);return(0,t.jsx)("button",{onClick:()=>{c(a.id)?s(e.filter(e=>e.id!==a.id)):s([...e,{id:a.id,name:a.name,path:a.defaultPath}])},className:(0,m.cn)("p-3 rounded-lg border text-left transition-colors",l?"border-accent bg-accent/10":"border-border hover:border-accent/50"),children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("div",{className:(0,m.cn)("w-8 h-8 rounded-lg flex items-center justify-center shrink-0",l?"bg-accent/20":"bg-surface2"),children:(0,t.jsx)(r,{className:(0,m.cn)("w-4 h-4",l?"text-accent":"text-muted")})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"font-medium text-sm text-txt truncate",children:a.name}),(0,t.jsx)("div",{className:"text-xs text-muted truncate",children:a.description})]}),l&&(0,t.jsx)(o.Check,{className:"w-4 h-4 text-accent shrink-0"})]})},a.id)})})]}):null),(0,t.jsxs)("div",{className:"text-sm text-muted",children:[e.length," template",1!==e.length?"s":""," selected"]})]})}var q=e.i(793479);let V=[{value:"web-app",label:"Web Application"},{value:"api-backend",label:"API / Backend"},{value:"cli-tool",label:"CLI Tool"},{value:"library",label:"Library / SDK"},{value:"mobile-app",label:"Mobile App"},{value:"monorepo",label:"Monorepo"}];function K({answers:e,onChange:a}){let s=(t,s)=>{a({...e,[t]:s})};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-txt mb-2",children:"Basic Information"}),(0,t.jsx)("p",{className:"text-muted",children:"Tell us about your project to customize the documentation."})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-txt mb-1.5",children:["Project Name ",(0,t.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,t.jsx)(q.Input,{value:e.projectName,onChange:e=>s("projectName",e.target.value),placeholder:"My Awesome Project",className:"bg-surface2"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-txt mb-1.5",children:"Project Type"}),(0,t.jsx)("select",{value:e.projectType,onChange:e=>s("projectType",e.target.value),className:"w-full h-10 px-3 rounded-md border border-border bg-surface2 text-txt text-sm focus:outline-hidden focus:ring-2 focus:ring-accent/50",children:V.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-txt mb-1.5",children:["Repository URL ",(0,t.jsx)("span",{className:"text-muted",children:"(optional)"})]}),(0,t.jsx)(q.Input,{value:e.repoUrl,onChange:e=>s("repoUrl",e.target.value),placeholder:"https://github.com/org/repo",className:"bg-surface2"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-txt mb-1.5",children:"Description"}),(0,t.jsx)("textarea",{value:e.description,onChange:e=>s("description",e.target.value),placeholder:"A brief description of what your project does...",rows:3,className:"w-full px-3 py-2 rounded-md border border-border bg-surface2 text-txt text-sm resize-none focus:outline-hidden focus:ring-2 focus:ring-accent/50"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-txt mb-1.5",children:["Key Features ",(0,t.jsx)("span",{className:"text-muted",children:"(optional)"})]}),(0,t.jsx)(q.Input,{value:e.keyFeatures,onChange:e=>s("keyFeatures",e.target.value),placeholder:"Auth, payments, real-time sync, etc.",className:"bg-surface2"}),(0,t.jsx)("p",{className:"text-xs text-muted mt-1",children:"Comma-separated list of main features"})]})]})]})}var H=e.i(161863),O=e.i(765470);let Q=[{id:"language",label:"Language",techs:["TypeScript","JavaScript","Python","Go","Rust","Java","C#","Ruby","Kotlin","Swift","PHP","Elixir"]},{id:"frontend",label:"Frontend",techs:["React","Vue","Angular","Next.js","Nuxt","SvelteKit","Remix","Astro","Vite","Tailwind CSS","React Native","Expo"]},{id:"backend",label:"Backend",techs:["Node.js","Express","Fastify","NestJS","FastAPI","Django","Flask","Rails","Spring Boot","Go/Fiber","Rust/Actix","Hono","Bun"]},{id:"database",label:"Database",techs:["PostgreSQL","MySQL","MongoDB","Redis","SQLite","Supabase","PlanetScale","DynamoDB","Cassandra","Prisma","Drizzle","TypeORM"]},{id:"devops",label:"DevOps",techs:["Docker","Kubernetes","GitHub Actions","GitLab CI","CircleCI","Jenkins","Terraform","Pulumi","AWS","GCP","Azure","Vercel","Railway","Fly.io","Render"]},{id:"testing",label:"Testing",techs:["Jest","Vitest","Playwright","Cypress","Testing Library","pytest","RSpec","Mocha","k6"]},{id:"tools",label:"Tools",techs:["ESLint","Prettier","Husky","lint-staged","Storybook","Turborepo","pnpm","Nx","GraphQL","tRPC","Zod","Stripe"]}];Q.flatMap(e=>e.techs);let J=[{id:"nextjs",label:"Next.js Full-Stack",techs:["TypeScript","Next.js","React","Tailwind CSS","PostgreSQL","Prisma"]},{id:"python-api",label:"Python API",techs:["Python","FastAPI","PostgreSQL","Redis","Docker"]},{id:"react-native",label:"React Native",techs:["TypeScript","React Native","Expo"]},{id:"go-service",label:"Go Microservice",techs:["Go","Go/Fiber","PostgreSQL","Docker","Kubernetes"]},{id:"sveltekit",label:"SvelteKit",techs:["TypeScript","SvelteKit","Tailwind CSS","SQLite"]}];function W({value:e,onChange:s}){let[r,l]=(0,a.useState)(""),[i,n]=(0,a.useState)("language"),c=r.trim().length>0,o=t=>{e.includes(t)?s(e.filter(e=>e!==t)):s([...e,t])},d=c?Q.map(e=>({...e,items:e.techs.filter(e=>e.toLowerCase().includes(r.toLowerCase()))})).filter(e=>e.items.length>0):[],x=Q.find(e=>e.id===i)?.techs??[],h=Q.flatMap(e=>e.techs).some(e=>e.toLowerCase()===r.toLowerCase()),p=c&&!h&&r.trim().length>0;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted mb-2 uppercase tracking-wider",children:"Quick Presets"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:J.map(a=>(0,t.jsx)("button",{type:"button",onClick:()=>{let t;(t=a.techs.filter(t=>!e.includes(t))).length>0&&s([...e,...t])},className:"px-3 py-1 rounded-md border border-border text-xs text-txt hover:border-accent hover:text-accent transition-colors",children:a.label},a.id))})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(H.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted pointer-events-none"}),(0,t.jsx)("input",{value:r,onChange:e=>l(e.target.value),onKeyDown:t=>{if("Enter"===t.key){let a;t.preventDefault(),!Q.flatMap(e=>e.techs).some(e=>e.toLowerCase()===r.toLowerCase())&&r.trim()&&((a=r.trim())&&!e.includes(a)&&s([...e,a]),l(""))}else"Escape"===t.key&&l("")},placeholder:"Search technologies...",className:"w-full pl-9 pr-3 py-2 rounded-md border border-border bg-surface2 text-txt text-sm outline-hidden placeholder:text-muted focus:border-accent transition-colors"}),c&&(0,t.jsx)("button",{type:"button",onClick:()=>l(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted hover:text-txt transition-colors",children:(0,t.jsx)(O.X,{className:"w-4 h-4"})})]}),!c&&(0,t.jsx)("div",{className:"flex gap-1 overflow-x-auto pb-1 scrollbar-hide",children:Q.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>n(e.id),className:(0,m.cn)("px-3 py-1 rounded-md text-xs font-medium whitespace-nowrap transition-colors shrink-0",i===e.id?"bg-accent text-white":"bg-surface2 text-muted hover:text-txt hover:bg-surface"),children:e.label},e.id))}),c?(0,t.jsxs)("div",{className:"space-y-3",children:[d.map(a=>(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted uppercase tracking-wider mb-1.5",children:a.label}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:a.items.map(a=>(0,t.jsx)("button",{type:"button",onClick:()=>o(a),className:(0,m.cn)("px-3 py-1 rounded-full text-sm border transition-colors",e.includes(a)?"bg-accent/15 border-accent text-accent":"bg-surface2 border-border text-txt hover:border-accent/50 hover:text-accent/80"),children:a},a))})]},a.id)),p&&(0,t.jsxs)("p",{className:"text-xs text-muted",children:["Press ",(0,t.jsx)("kbd",{className:"px-1 py-0.5 rounded-sm bg-surface border border-border text-xs",children:"Enter"}),' to add "',r,'"']})]}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:x.map(a=>(0,t.jsx)("button",{type:"button",onClick:()=>o(a),className:(0,m.cn)("px-3 py-1 rounded-full text-sm border transition-colors",e.includes(a)?"bg-accent/15 border-accent text-accent":"bg-surface2 border-border text-txt hover:border-accent/50 hover:text-accent/80"),children:a},a))}),e.length>0&&(0,t.jsxs)("div",{className:"pt-2 border-t border-border",children:[(0,t.jsxs)("p",{className:"text-xs font-medium text-muted mb-2",children:["Selected (",e.length,")"]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.map(a=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-accent/15 text-accent text-sm font-medium",children:[a,(0,t.jsx)("button",{type:"button",onClick:()=>s(e.filter(e=>e!==a)),className:"hover:text-accent/70 transition-colors",children:(0,t.jsx)(O.X,{className:"w-3 h-3"})})]},a))})]})]})}let U=[{value:"solo",label:"Solo"},{value:"2-5",label:"2–5"},{value:"6-15",label:"6–15"},{value:"15+",label:"15+"}],$=[{value:"",label:"Not sure / other"},{value:"Jest",label:"Jest"},{value:"Vitest",label:"Vitest"},{value:"pytest",label:"pytest"},{value:"RSpec",label:"RSpec"},{value:"Mocha",label:"Mocha"}],Y=[{value:"",label:"Not specified"},{value:"trunk-based",label:"Trunk-based"},{value:"gitflow",label:"Gitflow"},{value:"feature-branch",label:"Feature branches"}],X=["GitHub Actions","GitLab CI","CircleCI","Jenkins","Buildkite","Travis CI"],Z=["ESLint","Prettier","Biome","Stylelint","oxc","Rome"],_=["Vercel","AWS","GCP","Azure","Fly.io","Railway","Render","Docker","Kubernetes","Heroku"];function ee({answers:e,onChange:a}){let s=(t,s)=>{a({...e,[t]:s})};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-txt mb-2",children:"Team & Conventions"}),(0,t.jsx)("p",{className:"text-muted",children:"Help us tailor documentation to your team. All fields are optional."})]}),(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-txt mb-2",children:"Team Size"}),(0,t.jsx)("div",{className:"flex gap-2 flex-wrap",children:U.map(a=>(0,t.jsx)("button",{type:"button",onClick:()=>s("teamSize",e.teamSize===a.value?"":a.value),className:(0,m.cn)("px-4 py-2 rounded-lg border text-sm font-medium transition-colors",e.teamSize===a.value?"border-accent bg-accent/10 text-accent":"border-border text-txt hover:border-accent/50"),children:a.label},a.value))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-txt mb-1.5",children:"Linting & Formatting"}),(0,t.jsx)("div",{className:"flex gap-2 flex-wrap mb-2",children:Z.map(a=>(0,t.jsx)("button",{type:"button",onClick:()=>{s("linting",e.linting.includes(a)?e.linting.filter(e=>e!==a):[...e.linting,a])},className:(0,m.cn)("px-3 py-1.5 rounded-md border text-sm transition-colors",e.linting.includes(a)?"border-accent bg-accent/10 text-accent":"border-border text-txt hover:border-accent/50"),children:a},a))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-txt mb-1.5",children:"Test Framework"}),(0,t.jsx)("select",{value:e.testFramework,onChange:e=>s("testFramework",e.target.value),className:"w-full h-10 px-3 rounded-md border border-border bg-surface2 text-txt text-sm focus:outline-hidden focus:ring-2 focus:ring-accent/50",children:$.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-txt mb-1.5",children:"CI/CD"}),(0,t.jsx)("div",{className:"flex gap-2 flex-wrap mb-2",children:X.map(a=>(0,t.jsx)("button",{type:"button",onClick:()=>{s("ciCd",e.ciCd.includes(a)?e.ciCd.filter(e=>e!==a):[...e.ciCd,a])},className:(0,m.cn)("px-3 py-1.5 rounded-md border text-sm transition-colors",e.ciCd.includes(a)?"border-accent bg-accent/10 text-accent":"border-border text-txt hover:border-accent/50"),children:a},a))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-txt mb-2",children:"Branch Strategy"}),(0,t.jsx)("div",{className:"flex gap-2 flex-wrap",children:Y.filter(e=>e.value).map(a=>(0,t.jsx)("button",{type:"button",onClick:()=>s("branchStrategy",e.branchStrategy===a.value?"":a.value),className:(0,m.cn)("px-4 py-2 rounded-lg border text-sm font-medium transition-colors",e.branchStrategy===a.value?"border-accent bg-accent/10 text-accent":"border-border text-txt hover:border-accent/50"),children:a.label},a.value))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-txt mb-1.5",children:"Deployment Target"}),(0,t.jsx)("div",{className:"flex gap-2 flex-wrap",children:_.map(a=>(0,t.jsx)("button",{type:"button",onClick:()=>{s("deploymentTarget",e.deploymentTarget.includes(a)?e.deploymentTarget.filter(e=>e!==a):[...e.deploymentTarget,a])},className:(0,m.cn)("px-3 py-1.5 rounded-md border text-sm transition-colors",e.deploymentTarget.includes(a)?"border-accent bg-accent/10 text-accent":"border-border text-txt hover:border-accent/50"),children:a},a))})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-txt mb-1.5",children:["Additional Conventions ",(0,t.jsx)("span",{className:"text-muted",children:"(optional)"})]}),(0,t.jsx)(q.Input,{value:e.conventions,onChange:e=>s("conventions",e.target.value),placeholder:"Conventional Commits, semantic versioning, etc.",className:"bg-surface2"})]})]})]})}let et={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};et.node;let ea=(0,r.default)(et),es={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};es.node;let er=(0,r.default)(es);var el=e.i(998822);function ei({files:e,onWrite:s,isWriting:r,mode:l,onModeChange:i}){let[c,o]=(0,a.useState)(new Set),d=e.filter(e=>!e.skipped),x=e.filter(e=>e.skipped);return 0===e.length?(0,t.jsxs)("div",{className:"text-center py-12",children:[(0,t.jsx)(er,{className:"w-12 h-12 text-muted mx-auto mb-4"}),(0,t.jsx)("h3",{className:"text-lg font-medium text-txt mb-2",children:"No files generated"}),(0,t.jsx)("p",{className:"text-muted",children:"Something went wrong. Please go back and try again."})]}):(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-txt mb-2",children:"Preview"}),(0,t.jsx)("p",{className:"text-muted",children:"Review the files that will be created."})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 bg-surface2 rounded-lg p-1",children:[(0,t.jsx)("button",{onClick:()=>i("quick"),className:(0,m.cn)("px-3 py-1 text-sm rounded-md transition-colors","quick"===l?"bg-surface text-txt shadow-xs":"text-muted hover:text-txt"),children:"Quick"}),(0,t.jsx)("button",{onClick:()=>i("ai"),className:(0,m.cn)("px-3 py-1 text-sm rounded-md transition-colors","ai"===l?"bg-surface text-txt shadow-xs":"text-muted hover:text-txt"),children:"AI"})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("h3",{className:"text-sm font-medium text-muted uppercase tracking-wider",children:["Files to create (",d.length,")"]}),(0,t.jsx)("div",{className:"border border-border rounded-lg divide-y divide-border overflow-hidden",children:d.map(e=>{let a=c.has(e.path),s=e.path.endsWith(".md");return(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{onClick:()=>{var t;return t=e.path,void o(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},className:"w-full flex items-center gap-3 p-3 hover:bg-surface2 transition-colors",children:[a?(0,t.jsx)(ea,{className:"w-4 h-4 text-muted shrink-0"}):(0,t.jsx)(n.ChevronRight,{className:"w-4 h-4 text-muted shrink-0"}),(0,t.jsx)(h.FileText,{className:"w-4 h-4 text-accent shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-mono text-txt",children:e.path})]}),a&&(0,t.jsx)("div",{className:"px-3 pb-3",children:s?(0,t.jsx)("div",{className:"prose prose-invert max-w-none p-3 bg-surface2 rounded-lg max-h-64 overflow-y-auto text-sm",children:(0,t.jsx)(el.MarkdownRenderer,{content:e.content.slice(0,3e3)})}):(0,t.jsxs)("pre",{className:"p-3 bg-surface2 rounded-lg text-xs text-muted overflow-x-auto max-h-64 overflow-y-auto",children:[e.content.slice(0,2e3),e.content.length>2e3&&"\n\n...(truncated)"]})})]},e.path)})})]}),x.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("h3",{className:"text-sm font-medium text-muted uppercase tracking-wider",children:["Skipped (",x.length,")"]}),(0,t.jsx)("div",{className:"bg-amber-500/10 border border-amber-500/30 rounded-lg p-3 space-y-1",children:x.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)(er,{className:"w-4 h-4 text-amber-400 shrink-0"}),(0,t.jsx)("span",{className:"font-mono text-amber-400",children:e.path}),(0,t.jsxs)("span",{className:"text-amber-400/70",children:["— ",e.reason||"already exists"]})]},e.path))})]}),(0,t.jsxs)("div",{className:"text-sm text-muted",children:[d.length," file",1!==d.length?"s":""," will be created",x.length>0&&`, ${x.length} skipped`]})]})}let en=[{id:"welcome",title:"Welcome"},{id:"basic-info",title:"Basic Info"},{id:"templates",title:"Templates"},{id:"tech-stack",title:"Tech Stack"},{id:"team",title:"Team"},{id:"preview",title:"Preview"},{id:"complete",title:"Complete"}],ec=en.length-1;function eo(){let{activeProject:e,rootParam:r,projects:l}=(0,s.useApp)(),x=l.find(t=>t.root===e),[h,p]=(0,a.useState)(0),[u,b]=(0,a.useState)([]),[g,f]=(0,a.useState)({projectName:"",projectType:"web-app",description:"",repoUrl:"",techStackTags:[],keyFeatures:"",teamSize:"",linting:[],testFramework:"",ciCd:[],branchStrategy:"",deploymentTarget:[],conventions:""}),[y,v]=(0,a.useState)("quick"),[j,k]=(0,a.useState)([]),[N,w]=(0,a.useState)(!1),[C,S]=(0,a.useState)([]);(0,a.useEffect)(()=>{!async function(){try{let e=await fetch(`/api/docs${r}`),t=await e.json();if(!Array.isArray(t))return;let a=t.filter(e=>"CLAUDE.md"===e.path||"AGENTS.md"===e.path).map(e=>e.path);S(a)}catch{}}()},[r]);let T=async()=>{if(4===h){w(!0);try{let e=await fetch(`/api/setup/generate${r}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({templates:u,answers:g,mode:y})}),t=await e.json();k(t.files||[])}catch{k([])}w(!1)}p(e=>Math.min(e+1,ec))},M=async()=>{w(!0);try{await fetch(`/api/setup/write${r}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:j})}),p(6)}catch{}w(!1)};return(0,t.jsxs)("div",{className:"min-h-screen bg-bg flex flex-col",children:[(0,t.jsx)("div",{className:"border-b border-border bg-surface",children:(0,t.jsxs)("div",{className:"max-w-3xl mx-auto px-6 py-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("h1",{className:"text-lg font-semibold text-txt",children:"Setup Wizard"}),(0,t.jsxs)("span",{className:"text-sm text-muted",children:["Step ",h+1," of ",en.length]})]}),(0,t.jsx)("div",{className:"flex gap-1",children:en.map((e,a)=>(0,t.jsx)("div",{className:(0,m.cn)("h-1 flex-1 rounded-full transition-colors",a<=h?"bg-accent":"bg-border")},e.id))}),(0,t.jsx)("div",{className:"flex gap-1 mt-1",children:en.map((e,a)=>(0,t.jsx)("div",{className:"flex-1 text-center",children:a===h&&(0,t.jsx)("span",{className:"text-xs text-accent",children:e.title})},e.id))})]})}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsxs)("div",{className:"max-w-3xl mx-auto px-6 py-8",children:[0===h&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"text-center space-y-4",children:[(0,t.jsx)("div",{className:"w-16 h-16 rounded-2xl bg-accent/10 flex items-center justify-center mx-auto",children:(0,t.jsx)(c.Sparkles,{className:"w-8 h-8 text-accent"})}),(0,t.jsx)("h2",{className:"text-2xl font-bold text-txt",children:"Welcome to VibeDoc"}),(0,t.jsx)("p",{className:"text-muted max-w-md mx-auto",children:"Let's set up your project documentation. You can generate AI-optimized docs like CLAUDE.md, architecture overviews, and more."})]}),x&&(0,t.jsxs)("div",{className:"bg-surface border border-border rounded-lg p-4",children:[(0,t.jsx)("div",{className:"text-sm text-muted mb-1",children:"Current Project"}),(0,t.jsx)("div",{className:"font-medium text-txt",children:x.name}),(0,t.jsx)("div",{className:"text-xs text-muted mt-1 font-mono",children:x.root})]}),C.length>0&&(0,t.jsxs)("div",{className:"bg-amber-500/10 border border-amber-500/30 rounded-lg p-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-amber-400 mb-1",children:"Existing files detected"}),(0,t.jsxs)("div",{className:"text-sm text-amber-400/80",children:[C.join(", ")," already exist. They will be skipped during generation."]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-medium text-txt mb-3",children:"Quick Start with a Preset"}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3",children:["nextjs-production","api-backend","minimal","ai-first"].map(e=>{let a=R.find(t=>t.id===e);return a?(0,t.jsxs)("button",{onClick:()=>{b(a.templateIds.map(e=>L.TEMPLATES.find(t=>t.id===e)).filter(e=>void 0!==e).map(e=>({id:e.id,name:e.name,path:e.defaultPath}))),p(1)},className:"p-3 rounded-lg border border-border hover:border-accent/50 text-left transition-colors",children:[(0,t.jsx)("div",{className:"font-medium text-sm text-txt",children:a.name}),(0,t.jsx)("div",{className:"text-xs text-muted mt-1",children:a.description})]},e):null})})]})]}),1===h&&(0,t.jsx)(K,{answers:g,onChange:f}),2===h&&(0,t.jsx)(G,{selected:u,onChange:b,projectType:g.projectType}),3===h&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-txt mb-2",children:"Tech Stack"}),(0,t.jsx)("p",{className:"text-muted",children:"Add the technologies your project uses. Search or type custom ones."})]}),(0,t.jsx)(W,{value:g.techStackTags,onChange:e=>f(t=>({...t,techStackTags:e}))}),g.techStackTags.length>0&&(0,t.jsxs)("p",{className:"text-sm text-muted",children:[g.techStackTags.length," technolog",1!==g.techStackTags.length?"ies":"y"," added"]})]}),4===h&&(0,t.jsx)(ee,{answers:g,onChange:f}),5===h&&(0,t.jsx)(ei,{files:j,onWrite:M,isWriting:N,mode:y,onModeChange:v}),6===h&&(0,t.jsxs)("div",{className:"text-center space-y-6",children:[(0,t.jsx)("div",{className:"w-16 h-16 rounded-full bg-green-500/10 flex items-center justify-center mx-auto",children:(0,t.jsx)(o.Check,{className:"w-8 h-8 text-green-500"})}),(0,t.jsx)("h2",{className:"text-2xl font-bold text-txt",children:"Setup Complete!"}),(0,t.jsx)("p",{className:"text-muted max-w-md mx-auto",children:"Your documentation files have been created. You can now view and edit them in the Docs tab."}),(0,t.jsxs)("div",{className:"bg-surface border border-border rounded-lg p-4 text-left max-w-md mx-auto",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-txt mb-2",children:"Next steps:"}),(0,t.jsxs)("ul",{className:"text-sm text-muted space-y-2",children:[(0,t.jsx)("li",{children:"• Review generated files in the Docs tab"}),(0,t.jsx)("li",{children:"• Edit content to match your project specifics"}),(0,t.jsx)("li",{children:"• Connect your coding agent via MCP for AI assistance"})]})]}),(0,t.jsxs)("a",{href:"/docs",className:"inline-flex items-center gap-2 px-4 py-2 bg-accent text-white rounded-lg font-medium hover:bg-accent/90 transition-colors",children:["Go to Docs",(0,t.jsx)(n.ChevronRight,{className:"w-4 h-4"})]})]})]})}),h<ec&&(0,t.jsx)("div",{className:"border-t border-border bg-surface",children:(0,t.jsxs)("div",{className:"max-w-3xl mx-auto px-6 py-4 flex items-center justify-between",children:[(0,t.jsxs)("button",{onClick:()=>{p(e=>Math.max(e-1,0))},disabled:0===h,className:(0,m.cn)("flex items-center gap-2 px-4 py-2 rounded-lg font-medium transition-colors",0===h?"text-muted cursor-not-allowed":"text-txt hover:bg-surface2"),children:[(0,t.jsx)(i,{className:"w-4 h-4"}),"Back"]}),5===h?(0,t.jsx)("button",{onClick:M,disabled:N||0===j.length,className:"flex items-center gap-2 px-4 py-2 bg-accent text-white rounded-lg font-medium hover:bg-accent/90 transition-colors disabled:opacity-50",children:N?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.Loader2,{className:"w-4 h-4 animate-spin"}),"Writing..."]}):(0,t.jsxs)(t.Fragment,{children:["Write Files",(0,t.jsx)(o.Check,{className:"w-4 h-4"})]})}):(0,t.jsx)("button",{onClick:T,disabled:!(()=>{switch(h){case 0:default:return!0;case 1:return""!==g.projectName.trim();case 2:return u.length>0}})()||N,className:"flex items-center gap-2 px-4 py-2 bg-accent text-white rounded-lg font-medium hover:bg-accent/90 transition-colors disabled:opacity-50",children:N?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.Loader2,{className:"w-4 h-4 animate-spin"}),"Generating..."]}):(0,t.jsxs)(t.Fragment,{children:[4===h?"Generate":"Next",(0,t.jsx)(n.ChevronRight,{className:"w-4 h-4"})]})})]})})]})}e.s(["default",0,function(){return(0,t.jsx)(eo,{})}],294895)}]);
@@ -1,68 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,83790,e=>{"use strict";var t=e.i(180338);let r=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),n={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"},s=(0,t.createContext)({}),i=(0,t.forwardRef)(({color:e,size:i,width:l,height:a,strokeWidth:o,absoluteStrokeWidth:c,nonScalingStroke:h,className:p="",children:u,iconNode:g=[],icon:k={node:g,aliases:[],size:24},...d},f)=>{let{size:x=24,strokeWidth:b=2,absoluteStrokeWidth:m=!1,nonScalingStroke:w=!1,color:S="currentColor",className:$=""}=(0,t.useContext)(s)??{},y=!!u||(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(d),[R,z,T=[]]=function(e,t={}){return function(e,t={}){let s=t.attributeNames??{},i=e=>s[e]??e,l=e.size??e.width??n.width,a=e.size??e.height??n.height,o=e.aliases?.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>`lucide-${e}`)??[],c=[...e.name?[`lucide-${e.name}`]:[],...o],h=t.className?.split(" ").filter(Boolean)??[],p=!1===t.includeDefaultClasses?r(...h):r("lucide",...c,...h),u=t.absoluteStrokeWidth?Number(t.strokeWidth??n["stroke-width"])*Number(e.size??e.width??n.width)/Number(t.size??t.width??n.width):t.strokeWidth??n["stroke-width"];return["svg",{...Object.entries(n).reduce((e,[t,r])=>(e[i(t)]=r,e),{}),..."color"in t&&t.color&&{[i("stroke")]:t.color},..."size"in t&&null!=t.size&&{[i("width")]:t.size,[i("height")]:t.size},..."width"in t&&null!=t.width&&{[i("width")]:t.width},..."height"in t&&null!=t.height&&{[i("height")]:t.height},[i("stroke-width")]:u,...p&&{[i("class")]:p},[i("viewBox")]:`0 0 ${l} ${a}`,...!1===t.hasA11yProp?{[i("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(e=>{let[r,n,s]=e,l=t.nonScalingStroke?{[i("vector-effect")]:"non-scaling-stroke",...n}:n;return s?[r,l,s]:[r,l]})]}(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}(k,{color:e??S,width:l??i??x,height:a??i??x,strokeWidth:o??b,absoluteStrokeWidth:c??m,nonScalingStroke:h??w,className:r($,p),hasA11yProp:y,attributes:d});return(0,t.createElement)(R,{ref:f,...z},[...T.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(u)?u:[u]])});e.s(["default",0,function(e,r=[],n=[]){let s,l="string"==typeof e?function(e,t,r=[]){if(null==t)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:t,...r.length>0?{aliases:r}:{}}}(e,r,n):e,a=(0,t.forwardRef)(({className:e,...r},n)=>(0,t.createElement)(i,{ref:n,icon:l,className:e,...r}));return l.name&&(a.displayName=(s=(e=>{let t="",r=!1;for(let n of e){if("-"===n||"_"===n||n<=" "){r=t.length>0;continue}0===t.length?t+=n.toLowerCase():t+=r?n.toUpperCase():n,r=!1}return t})(l.name)).charAt(0).toUpperCase()+s.slice(1)),a}],83790)},765470,e=>{"use strict";var t=e.i(83790);let r={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};r.node;let n=(0,t.default)(r);e.s(["X",0,n],765470)},998822,e=>{"use strict";var t=e.i(72345),r=e.i(180338);function n(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var s=n(),i={exec:()=>null};function l(e){let t=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),s=t[n];return s||(s=e(n),t[n]=s),s}}function a(e,t=""){let r="string"==typeof e?e:e.source,n={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(c.caret,"$1"),r=r.replace(e,s),n},getRegex:()=>new RegExp(r,t)};return n}var o=((e="")=>{try{return!!RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),c={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:l(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:l(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:l(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:l(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:l(e=>RegExp(`^ {0,${e}}(?:</?(?:${m})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:l(e=>RegExp(`^ {0,${e}}>`))},h=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,p=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,u=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,g=a(u).replace(/bull/g,p).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),k=a(u).replace(/bull/g,p).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),d=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,f=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,x=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",f).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),b=a(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,p).getRegex(),m="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",w=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,S=a("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",w).replace("tag",m).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),$=e=>a(d).replace("hr",h).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",e).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",m).getRegex(),y=$(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),R=$(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),z={blockquote:a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",R).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:x,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:h,html:S,lheading:g,list:b,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:y,table:i,text:/^[^\n]+/},T=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",h).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",m).getRegex(),A={...z,lheading:k,table:T,paragraph:a(d).replace("hr",h).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",T).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",m).getRegex()},_={...z,html:a("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",w).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:i,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(d).replace("hr",h).replace("heading",` *#{1,6} *[^
2
- ]`).replace("lheading",g).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},P=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,C=/[\p{P}\p{S}]/u,L=/[\s\p{P}\p{S}]/u,E=/[^\s\p{P}\p{S}]/u,I=a(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,L).getRegex(),v=/(?!~)[\p{P}\p{S}]/u,B=a(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",o?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),q=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Z=a(q,"u").replace(/punct/g,C).getRegex(),N=a(q,"u").replace(/punct/g,v).getRegex(),D=a(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,"u").replace(/openQuote/g,/[\p{Pi}\p{Ps}"']/u).replace(/punct/g,C).getRegex(),O="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",j=a(O,"gu").replace(/notPunctSpace/g,E).replace(/punctSpace/g,L).replace(/punct/g,C).getRegex(),Q=a(O,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,v).getRegex(),M=a("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,E).replace(/punctSpace/g,L).replace(/punct/g,C).getRegex(),W=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,E).replace(/punctSpace/g,L).replace(/punct/g,C).getRegex(),H=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,E).replace(/punctSpace/g,L).replace(/punct/g,C).getRegex(),G=a(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,C).getRegex(),U=a("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,E).replace(/punctSpace/g,L).replace(/punct/g,C).getRegex(),X=a(/\\(punct)/,"gu").replace(/punct/g,C).getRegex(),F=a(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),K=a(w).replace("(?:-->|$)","-->").getRegex(),J=a("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",K).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),V=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Y=a(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",V).getRegex(),ee=a(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Y).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),et=a(/^!?\[(label)\]\[(ref)\]/).replace("label",Y).replace("ref",f).getRegex(),er=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",f).getRegex(),en=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,es=a(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",V).getRegex(),ei=a("reflink|nolink(?!\\()","g").replace("reflink",a(/^!?\[(label)\]\[(ref)\]/).replace("label",es).replace("ref",en).getRegex()).replace("nolink",a(/^!?\[(ref)\](?:\[\])?/).replace("ref",en).getRegex()).getRegex(),el=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ea=a(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),eo={_backpedal:i,anyPunctuation:X,autolink:F,blockSkip:B,br:P,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:i,delLDelim:i,delRDelim:i,emStrongLDelim:Z,emStrongRDelimAst:j,emStrongRDelimUnd:W,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:ee,nolink:er,punctuation:I,reflink:et,reflinkSearch:ei,tag:J,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:i},ec={...eo,emStrongLDelim:D,emStrongRDelimAst:M,emStrongRDelimUnd:H,link:a(/^!?\[(label)\]\((.*?)\)/).replace("label",Y).getRegex(),reflink:a(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Y).getRegex()},eh={...eo,emStrongRDelimAst:Q,emStrongLDelim:N,delLDelim:G,delRDelim:U,url:a(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",ea).replace("protocol",el).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:a(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",el).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},ep={...eh,br:a(P).replace("{2,}","*").getRegex(),text:a(eh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},eu={normal:z,gfm:A,pedantic:_},eg={normal:eo,gfm:eh,breaks:ep,pedantic:ec},ek={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ed=e=>ek[e];function ef(e,t){if(t){if(c.escapeTest.test(e))return e.replace(c.escapeReplace,ed)}else if(c.escapeTestNoEncode.test(e))return e.replace(c.escapeReplaceNoEncode,ed);return e}function ex(e){try{e=encodeURI(e).replace(c.percentDecode,"%")}catch{return null}return e}function eb(e,t){let r=e.replace(c.findPipe,(e,t,r)=>{let n=!1,s=t;for(;--s>=0&&"\\"===r[s];)n=!n;return n?"|":" |"}).split(c.splitPipe),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(c.slashPipe,"|");return r}function em(e,t,r){let n=e.length;if(0===n)return"";let s=0;for(;s<n;){let i=e.charAt(n-s-1);if(i!==t||r)if(i!==t&&r)s++;else break;else s++}return e.slice(0,n-s)}function ew(e){let t=e.split(`
3
- `),r=t.length-1;for(;r>=0&&c.blankLine.test(t[r]);)r--;return t.length-r<=2?e:t.slice(0,r+1).join(`
4
- `)}function eS(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function e$(e,t=0){let r=t,n="";for(let t of e)if(" "===t){let e=4-r%4;n+=" ".repeat(e),r+=e}else n+=t,r++;return n}function ey(e,t,r,n,s){let i=t.href,l=t.title||null,a=e[1].replace(s.other.outputLinkReplace,"$1"),o="!"===e[0].charAt(0);n.state.inLink=!0;let c=n.state.linkEmitted,h=n.state.inRawBlock;n.state.linkEmitted=!1;let p=n.inlineTokens(a),u=n.state.linkEmitted;if(n.state.linkEmitted=c,n.state.inLink=!1,!o){if(u){n.state.inRawBlock=h;return}n.state.linkEmitted=!0}return{type:o?"image":"link",raw:r,href:i,title:l,text:a,tokens:p}}function eR(e,t,r,n){if(!t.includes("<"))return!1;for(let s=0;s<t.length;s++){if("\\"===t[s]){s++;continue}if("`"===t[s]){let e=n.inline.code.exec(t.slice(s));if(e){s+=e[0].length-1;continue}}if("<"!==t[s])continue;let i=e.slice(r+s),l=n.inline.tag.exec(i)||n.inline.autolink.exec(i);if(l){if(l[0].length>t.length-s)return!0;s+=l[0].length-1}}return!1}var ez=class{options;rules;lexer;constructor(e){this.options=e||s}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:ew(t[0]),r=e.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e,codeBlockStyle:"indented",text:r}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],r=function(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(null===n)return t;let s=n[1];return t.split(`
5
- `).map(e=>{let t=e.match(r.other.beginningSpace);if(null===t)return e;let[n]=t;return e.slice(Math.min(n.length,s.length))}).join(`
6
- `)}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=em(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:"heading",raw:em(t[0],`
7
- `),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:em(t[0],`
8
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=em(t[0],`
9
- `).split(`
10
- `),r="",n="",s=[];for(;e.length>0;){let t=!1,i=[],l;for(l=0;l<e.length;l++)if(this.rules.other.blockquoteStart.test(e[l]))i.push(e[l]),t=!0;else if(t)break;else i.push(e[l]);e=e.slice(l);let a=i.join(`
11
- `),o=a.replace(this.rules.other.blockquoteSetextReplace,`
12
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
13
- ${a}`:a,n=n?`${n}
14
- ${o}`:o;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(o,s,!0),this.lexer.state.top=c,0===e.length)break;let h=s.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let t=e.join(`
15
- `),i=h.raw+`
16
- `+t.replace(this.rules.other.blockquoteSetextReplace2,""),l=this.blockquote(i);s[s.length-1]=l;let a=i.substring(l.raw.length).replace(/^\n/,""),o=a?a.split(`
17
- `).length:0,c=o?e.slice(0,-o):e;c.length>0&&(r=`${r}
18
- ${c.join(`
19
- `)}`),n=n.substring(0,n.length-h.text.length)+l.text;break}if(h?.type==="list"){let t=h.raw+`
20
- `+e.join(`
21
- `),i=this.list(t);s[s.length-1]=i,r=r.substring(0,r.length-h.raw.length)+i.raw,n=n.substring(0,n.length-h.raw.length)+i.raw,e=t.substring(s.at(-1).raw.length).split(`
22
- `);continue}}return{type:"blockquote",raw:r,tokens:s,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),n=r.length>1,s={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let i=this.rules.other.listItemRegex(r),l=!1;for(;e;){let r=!1,n="",a="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let o=t[2].split(`
23
- `,1)[0],c=t[1].length,h=this.options.pedantic?e$(o,c):o.replace(this.rules.other.leadingSpaceTab,e=>e$(e,c)),p=e.split(`
24
- `,1)[0],u=!h.trim(),g=0;if(this.options.pedantic?(g=2,a=h.trimStart()):u?g=c+1:(g=(g=h.search(this.rules.other.nonSpaceChar))>4?1:g,a=h.slice(g),g+=c),u&&this.rules.other.blankLine.test(p)&&(n+=p+`
25
- `,e=e.substring(p.length+1),r=!0),!r){let t=this.rules.other.nextBulletRegex(g),r=this.rules.other.hrRegex(g),s=this.rules.other.fencesBeginRegex(g),i=this.rules.other.headingBeginRegex(g),l=this.rules.other.htmlBeginRegex(g),o=this.rules.other.blockquoteBeginRegex(g);for(;e;){let c=e.split(`
26
- `,1)[0],k;if(p=c,k=this.options.pedantic?p=p.replace(this.rules.other.listReplaceNesting," "):p.replace(this.rules.other.leadingSpaceTab,e=>e.replace(this.rules.other.tabCharGlobal," ")),s.test(p)||i.test(p)||l.test(p)||o.test(p)||t.test(p)||r.test(p))break;if(k.search(this.rules.other.nonSpaceChar)>=g||!p.trim())a+=`
27
- `+k.slice(g);else{if(u||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||s.test(h)||i.test(h)||r.test(h))break;a+=`
28
- `+p}u=!p.trim(),n+=c+`
29
- `,e=e.substring(c.length+1),h=k.slice(g)}}s.loose||(l?s.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(l=!0)),s.items.push({type:"list_item",raw:n,task:!!this.options.gfm&&this.rules.other.listIsTask.test(a),loose:!1,text:a,tokens:[]}),s.raw+=n}let a=s.items.at(-1);if(!a)return;for(let e of(a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),s.raw=s.raw.trimEnd(),s.items))if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!s.loose){let t=e.tokens.filter(e=>"space"===e.type);s.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of s.items){let t=e.tokens[0];if(e.task&&(t?.type==="text"||t?.type==="paragraph")){e.text=e.text.replace(this.rules.other.listReplaceTask,""),t.raw=t.raw.replace(this.rules.other.listReplaceTask,""),t.text=t.text.replace(this.rules.other.listReplaceTask,"");for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,"");break}let r=this.rules.other.listTaskCheckbox.exec(e.raw);if(r){let t={type:"checkbox",raw:r[0]+" ",checked:"[ ]"!==r[0]};e.checked=t.checked,s.loose?e.tokens[0]&&["paragraph","text"].includes(e.tokens[0].type)&&"tokens"in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:"paragraph",raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&(e.task=!1)}if(s.loose)for(let e of s.items)for(let t of(e.loose=!0,e.tokens))"text"===t.type&&(t.type="paragraph");return s}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=ew(t[0]);return{type:"html",block:!0,raw:e,pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=eS(t[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:em(t[0],`
30
- `),href:r,title:n}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=eb(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
31
- `):[],i={type:"table",raw:em(t[0],`
32
- `),header:[],align:[],rows:[]};if(r.length===n.length){for(let e of n)this.rules.other.tableAlignRight.test(e)?i.align.push("right"):this.rules.other.tableAlignCenter.test(e)?i.align.push("center"):this.rules.other.tableAlignLeft.test(e)?i.align.push("left"):i.align.push(null);for(let e=0;e<r.length;e++)i.header.push({text:r[e],tokens:this.lexer.inline(r[e]),header:!0,align:i.align[e]});for(let e of s)i.rows.push(eb(e,i.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:"heading",raw:em(t[0],`
33
- `),depth:"="===t[2].charAt(0)?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
34
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let r="!"===t[0].charAt(0)?2:1;if(!this.options.pedantic&&eR(e,t[1],r,this.rules))return;let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let e=em(n.slice(0,-1),"\\");if((n.length-e.length)%2==0)return}else{let e=function(e){if(-1===e.indexOf(")"))return -1;let t=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if("("===e[r])t++;else if(")"===e[r]&&--t<0)return r;return t>0?-2:-1}(t[2]);if(-2===e)return;if(e>-1){let r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let s=t[2],i="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(s);e&&(s=e[1],i=e[3])}else i=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(s=this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s.slice(1):s.slice(1,-1)),ey(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let n="!"===r[0].charAt(0)?2:1;if(!this.options.pedantic&&eR(e,r[1],n,this.rules))return;let s=t[eS((r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "))];if(!s){let e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return ey(r,s,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||!n[1]&&!n[2]&&!n[3]&&!n[4]||n[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[3])||!r||this.rules.inline.punctuation.exec(r))){let s=[...n[0]].length-1,i,l,a=s,o=0,c=n[0][0],h=r===c,p="*"===c?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,t=t.slice(-1*e.length+s);null!==(n=p.exec(t));){if(!(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6]))continue;if(l=[...i].length,n[3]||n[4]){a+=l;continue}if(n[5]||n[6]){if(s%3&&!((s+l)%3)){o+=l;continue}if(h)break}if((a-=l)>0)continue;l=Math.min(l,l+a+o);let t=[...n[0]][0].length,r=e.slice(0,s+n.index+t+l);if(Math.min(s,l)%2){let e=r.slice(1,-1);return{type:"em",raw:r,text:e,tokens:this.lexer.inlineTokens(e)}}let c=r.slice(2,-2);return{type:"strong",raw:r,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(e),n=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&n&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let n=this.rules.inline.delLDelim.exec(e);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let r=[...n[0]].length-1,s,i,l=r,a=this.rules.inline.delRDelim;for(a.lastIndex=0,t=t.slice(-1*e.length+r);null!==(n=a.exec(t));){if(!(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])||(i=[...s].length)!==r)continue;if(n[3]||n[4]){l+=i;continue}if((l-=i)>0)continue;i=Math.min(i,i+l);let t=[...n[0]][0].length,a=e.slice(0,r+n.index+t+i),o=a.slice(r,-r);return{type:"del",raw:a,text:o,tokens:this.lexer.inlineTokens(o)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,r;return r="@"===t[2]?"mailto:"+(e=t[1]):e=t[1],{type:"link",raw:t[0],text:e,href:r,autolink:!0,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])r="mailto:"+(e=t[0]);else{let n;do n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(n!==t[0])e=t[0],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,autolink:!0,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:e?t[0]:t[0].replace(c.numericCharacterReference,(e,t,r)=>{let n=void 0===t?Number.parseInt(r,16):Number.parseInt(t,10);return 0===n||n>1114111||n>=55296&&n<=57343?"�":String.fromCodePoint(n)}),escaped:e}}}},eT=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||s,this.options.tokenizer=this.options.tokenizer||new ez,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let t={other:c,block:eu.normal,inline:eg.normal};this.options.pedantic?(t.block=eu.pedantic,t.inline=eg.pedantic):this.options.gfm&&(t.block=eu.gfm,this.options.breaks?t.inline=eg.breaks:t.inline=eg.gfm),this.tokenizer.rules=t}static get rules(){return{block:eu,inline:eg}}static lex(t,r){return new e(r).lex(t)}static lexInline(t,r){return new e(r).inlineTokens(t)}lex(e){e=e.replace(c.carriageReturn,`
35
- `),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],r=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(c.tabCharGlobal," ").replace(c.spaceLine,""));let n=1/0;for(;e;){let s;if(e.length<n)n=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}if(this.options.extensions?.block?.some(r=>!!(s=r.call({lexer:this},e,t))&&(e=e.substring(s.raw.length),t.push(s),!0)))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);let r=t.at(-1);1===s.raw.length&&void 0!==r?r.raw+=`
36
- `:t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);let r=t.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(`
37
- `)?"":`
38
- `)+s.raw,r.text+=`
39
- `+s.text,this.inlineQueue.at(-1).src=r.text):t.push(s);continue}if((s=this.tokenizer.fences(e))||(s=this.tokenizer.heading(e))||(s=this.tokenizer.hr(e))||(s=this.tokenizer.blockquote(e))||(s=this.tokenizer.list(e))||(s=this.tokenizer.html(e))){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);let r=t.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(`
40
- `)?"":`
41
- `)+s.raw,r.text+=`
42
- `+s.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},t.push(s));continue}if((s=this.tokenizer.table(e))||(s=this.tokenizer.lheading(e))){e=e.substring(s.raw.length),t.push(s);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,r=e.slice(1),n;this.options.extensions.startBlock.forEach(e=>{"number"==typeof(n=e.call({lexer:this},r))&&n>=0&&(t=Math.min(t,n))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(s=this.tokenizer.paragraph(i))){let n=t.at(-1);r&&n?.type==="paragraph"?(n.raw+=(n.raw.endsWith(`
43
- `)?"":`
44
- `)+s.raw,n.text+=`
45
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(s),r=i.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);let r=t.at(-1);r?.type==="text"?(r.raw+=(r.raw.endsWith(`
46
- `)?"":`
47
- `)+s.raw,r.text+=`
48
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(s);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes("["))return!1;let t=this.tokenizer.rules.inline.link;for(let r of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(r[0])&&"!"!==e.charAt(r.index-1))return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],r=e.lastIndexOf("[");if(!("!"===e.charAt(0)||!Object.hasOwn(this.tokens.links,eS(e.slice(r+1,-1))))&&!(r>1&&this.linkInText(e.slice(1,r-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let r=e;if(this.tokens.links&&e.includes("[")){let e=this.tokenizer.rules.inline.reflinkSearch,t=r=>{let n=r.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,eS(r.slice(n+1,-1))))return r;if(n>1&&"!"!==r.charAt(0)){let s=r.slice(1,n-1);if(this.linkInText(s))return"["+s.replace(e,t)+"]["+"a".repeat(r.length-n-2)+"]"}return"["+"a".repeat(r.length-2)+"]"};r=r.replace(e,t)}r=(r=r.replace(this.tokenizer.rules.inline.anyPunctuation,e=>"+".repeat(e.length))).replace(this.tokenizer.rules.inline.blockSkip,(e,t,r)=>{let n=r?r.length:0;return e.slice(0,n)+"["+"a".repeat(e.length-n-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let n=!1,s="",i=1/0;for(;e;){let l;if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}if(n||(s=""),n=!1,this.options.extensions?.inline?.some(r=>!!(l=r.call({lexer:this},e,t))&&(e=e.substring(l.raw.length),t.push(l),!0)))continue;if((l=this.tokenizer.escape(e))||(l=this.tokenizer.tag(e))||(l=this.tokenizer.link(e))){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(l.raw.length);let r=t.at(-1);"text"===l.type&&r?.type==="text"?(r.raw+=l.raw,r.text+=l.text):t.push(l);continue}if((l=this.tokenizer.emStrong(e,r,s))||(l=this.tokenizer.codespan(e))||(l=this.tokenizer.br(e))||(l=this.tokenizer.del(e,r,s))||(l=this.tokenizer.autolink(e))||!this.state.inLink&&(l=this.tokenizer.url(e))){e=e.substring(l.raw.length),t.push(l);continue}let a=e;if(this.options.extensions?.startInline){let t=1/0,r=e.slice(1),n;this.options.extensions.startInline.forEach(e=>{"number"==typeof(n=e.call({lexer:this},r))&&n>=0&&(t=Math.min(t,n))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(l=this.tokenizer.inlineText(a)){e=e.substring(l.raw.length),"_"!==l.raw.slice(-1)&&(s=l.raw.slice(-1)),n=!0;let r=t.at(-1);r?.type==="text"?(r.raw+=l.raw,r.text+=l.text):t.push(l);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw Error(t)}},eA=class{options;parser;constructor(e){this.options=e||s}space(e){return""}code({text:e,lang:t,escaped:r}){let n=(t||"").match(c.notSpaceStart)?.[0],s=e?e.replace(c.endingNewline,"")+`
49
- `:"";return n?'<pre><code class="language-'+ef(n)+'">'+(r?s:ef(s,!0))+`</code></pre>
50
- `:"<pre><code>"+(r?s:ef(s,!0))+`</code></pre>
51
- `}blockquote({tokens:e}){return`<blockquote>
52
- ${this.parser.parse(e)}</blockquote>
53
- `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
54
- `}hr(e){return`<hr>
55
- `}list(e){let t=e.ordered,r=e.start,n="";for(let t=0;t<e.items.length;t++){let r=e.items[t];n+=this.listitem(r)}let s=t?"ol":"ul";return"<"+s+(t&&1!==r?' start="'+r+'"':"")+`>
56
- `+n+"</"+s+`>
57
- `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
58
- `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
59
- `}table(e){let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.tablecell(e.header[t]);t+=this.tablerow({text:r});let n="";for(let t=0;t<e.rows.length;t++){let s=e.rows[t];r="";for(let e=0;e<s.length;e++)r+=this.tablecell(s[e]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
60
- <thead>
61
- `+t+`</thead>
62
- `+n+`</table>
63
- `}tablerow({text:e}){return`<tr>
64
- ${e}</tr>
65
- `}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
66
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${ef(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:r,tokens:n,autolink:s}){let i=s?ef(r,!0):this.parser.parseInline(n),l=ex(e);if(null===l)return i;let a='<a href="'+(e=ef(l,s))+'"';return t&&(a+=' title="'+ef(t)+'"'),a+=">"+i+"</a>"}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let s=ex(e);if(null===s)return ef(r);e=s;let i=`<img src="${ef(e)}" alt="${ef(r)}"`;return t&&(i+=` title="${ef(t)}"`),i+=">"}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ef(e.text)}},e_=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},eP=class e{options;renderer;textRenderer;constructor(e){this.options=e||s,this.options.renderer=this.options.renderer||new eA,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new e_}static parse(t,r){return new e(r).parse(t)}static parseInline(t,r){return new e(r).parseInline(t)}parse(e){this.renderer.parser=this;let t="";for(let r=0;r<e.length;r++){let n=e[r];if(this.options.extensions?.renderers?.[n.type]){let e=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(n.type)){t+=e||"";continue}}switch(n.type){case"space":t+=this.renderer.space(n);break;case"hr":t+=this.renderer.hr(n);break;case"heading":t+=this.renderer.heading(n);break;case"code":t+=this.renderer.code(n);break;case"table":t+=this.renderer.table(n);break;case"blockquote":t+=this.renderer.blockquote(n);break;case"list":t+=this.renderer.list(n);break;case"checkbox":t+=this.renderer.checkbox(n);break;case"html":t+=this.renderer.html(n);break;case"def":t+=this.renderer.def(n);break;case"paragraph":t+=this.renderer.paragraph(n);break;case"text":t+=this.renderer.text(n);break;default:{let e='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let r="";for(let n=0;n<e.length;n++){let s=e[n];if(this.options.extensions?.renderers?.[s.type]){let e=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==e||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(s.type)){r+=e||"";continue}}switch(s.type){case"escape":case"text":r+=t.text(s);break;case"html":r+=t.html(s);break;case"link":r+=t.link(s);break;case"image":r+=t.image(s);break;case"checkbox":r+=t.checkbox(s);break;case"strong":r+=t.strong(s);break;case"em":r+=t.em(s);break;case"codespan":r+=t.codespan(s);break;case"br":r+=t.br(s);break;case"del":r+=t.del(s);break;default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw Error(e)}}}return r}},eC=class{options;block;constructor(e){this.options=e||s}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?eT.lex:eT.lexInline}provideParser(e=this.block){return e?eP.parse:eP.parseInline}},eL=new class{defaults=n();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=eP;Renderer=eA;TextRenderer=e_;Lexer=eT;Tokenizer=ez;Hooks=eC;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":for(let e of n.header)r=r.concat(this.walkTokens(e.tokens,t));for(let e of n.rows)for(let n of e)r=r.concat(this.walkTokens(n.tokens,t));break;case"list":r=r.concat(this.walkTokens(n.items,t));break;default:{let e=n;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(n=>{let s=e[n].flat(1/0);r=r.concat(this.walkTokens(s,t))}):e.tokens&&(r=r.concat(this.walkTokens(e.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error("extension name required");if("renderer"in e){let r=t.renderers[e.name];r?t.renderers[e.name]=function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:t.renderers[e.name]=e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw Error("extension level must be 'block' or 'inline'");let r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),r.extensions=t),e.renderer){let t=this.defaults.renderer||new eA(this.defaults);for(let r in e.renderer){if(!(r in t))throw Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let n=e.renderer[r],s=t[r];t[r]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=s.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new ez(this.defaults);for(let r in e.tokenizer){if(!(r in t))throw Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let n=e.tokenizer[r],s=t[r];t[r]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=s.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new eC;for(let r in e.hooks){if(!(r in t))throw Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let n=e.hooks[r],s=t[r];eC.passThroughHooks.has(r)?t[r]=e=>{if(this.defaults.async&&eC.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await n.call(t,e);return s.call(t,r)})();let i=n.call(t,e);return s.call(t,i)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let r=await n.apply(t,e);return!1===r&&(r=await s.apply(t,e)),r})();let r=n.apply(t,e);return!1===r&&(r=s.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return eT.lex(e,t??this.defaults)}parser(e,t){return eP.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},s={...this.defaults,...n},i=this.onError(!!s.silent,!!s.async);if(!0===this.defaults.async&&!1===n.async)return i(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return i(Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return i(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=e),s.async)return(async()=>{let r=s.hooks?await s.hooks.preprocess(t):t,n=await (s.hooks?await s.hooks.provideLexer(e):e?eT.lex:eT.lexInline)(r,s),i=s.hooks?await s.hooks.processAllTokens(n):n;s.walkTokens&&await Promise.all(this.walkTokens(i,s.walkTokens));let l=await (s.hooks?await s.hooks.provideParser(e):e?eP.parse:eP.parseInline)(i,s);return s.hooks?await s.hooks.postprocess(l):l})().catch(i);try{s.hooks&&(t=s.hooks.preprocess(t));let r=(s.hooks?s.hooks.provideLexer(e):e?eT.lex:eT.lexInline)(t,s);s.hooks&&(r=s.hooks.processAllTokens(r)),s.walkTokens&&this.walkTokens(r,s.walkTokens);let n=(s.hooks?s.hooks.provideParser(e):e?eP.parse:eP.parseInline)(r,s);return s.hooks&&(n=s.hooks.postprocess(n)),n}catch(e){return i(e)}}}onError(e,t){return r=>{if(r.message+=`
67
- Please report this to https://github.com/markedjs/marked.`,e){let e="<p>An error occurred:</p><pre>"+ef(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function eE(e,t){return eL.parse(e,t)}eE.options=eE.setOptions=function(e){return eL.setOptions(e),eE.defaults=eL.defaults,s=eE.defaults,eE},eE.getDefaults=n,eE.defaults=s,eE.use=function(...e){return eL.use(...e),eE.defaults=eL.defaults,s=eE.defaults,eE},eE.walkTokens=function(e,t){return eL.walkTokens(e,t)},eE.parseInline=eL.parseInline,eE.Parser=eP,eE.parser=eP.parse,eE.Renderer=eA,eE.TextRenderer=e_,eE.Lexer=eT,eE.lexer=eT.lex,eE.Tokenizer=ez,eE.Hooks=eC,eE.parse=eE,eE.options,eE.setOptions,eE.walkTokens,eE.parseInline,eP.parse,eT.lex;var eI=e.i(975157);eE.setOptions({gfm:!0,breaks:!1}),eE.use({renderer:{code({text:e,lang:t}){if("mermaid"===t){let t=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return`<div class="mermaid not-prose">${t}</div>`}return!1}}}),eE.use({renderer:{heading({tokens:e,depth:t}){let r=this.parser.parseInline(e),n=r.replace(/<[^>]*>/g,"").toLowerCase().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-");return`<h${t} id="${n}">${r}</h${t}>
68
- `}}});let ev=(0,r.memo)(function({content:n,className:s}){let i=eE.parse(n).replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/\son\w+="[^"]*"/gi,"").replace(/\son\w+='[^']*'/gi,""),l=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let t=l.current;if(!t)return;let r=!1,n=setTimeout(()=>{r||e.A(528427).then(e=>{if(r||!t.isConnected)return;let n=Array.from(t.querySelectorAll(".mermaid:not([data-processed])"));0!==n.length&&(e.default.initialize({startOnLoad:!1,theme:"dark",darkMode:!0,securityLevel:"antiscript"}),e.default.run({nodes:n}).catch(e=>{console.error("[mermaid]",e)}))})},120);return()=>{r=!0,clearTimeout(n)}},[i]),(0,t.jsx)("div",{ref:l,className:(0,eI.cn)("prose-dark",s),dangerouslySetInnerHTML:{__html:i}})});e.s(["MarkdownRenderer",0,ev],998822)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,240595,e=>{"use strict";var t=e.i(83790);let s={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};s.node;let a=(0,t.default)(s);e.s(["Loader2",0,a],240595)},155515,e=>{"use strict";var t=e.i(83790);let s={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};s.node;let a=(0,t.default)(s);e.s(["Plus",0,a],155515)},955787,e=>{"use strict";var t=e.i(72345),s=e.i(180338),a=e.i(763371),r=e.i(155515),n=e.i(975157),o=e.i(487486),l=e.i(34086);function d({status:e,tasks:a,onMoveTask:r,onOpenTask:i}){let[c,x]=(0,s.useState)(!1);return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)("span",{className:"text-sm",children:l.STATUS_ICONS[e]}),(0,t.jsx)("span",{className:"text-xs font-mono font-semibold text-muted uppercase tracking-wider",children:e}),(0,t.jsx)(o.Badge,{variant:"secondary",className:"ml-auto font-mono text-xs h-5 px-1.5",children:a.length})]}),(0,t.jsxs)("div",{className:(0,n.cn)("flex flex-col gap-2 min-h-[60px] rounded-lg transition-colors",c&&"ring-1 ring-accent/50 bg-accent/5"),onDragOver:e=>{e.preventDefault(),x(!0)},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||x(!1)},onDrop:t=>{t.preventDefault(),x(!1);let s=t.dataTransfer.getData("taskId");s&&r(s,e)},children:[(a??[]).map(e=>(0,t.jsx)(l.TaskCard,{task:e,onMove:r,onOpen:()=>i(e)},e.id)),0===a.length&&(0,t.jsx)("div",{className:"border border-dashed border-border rounded-lg py-6 text-center text-xs text-muted",children:"empty"})]})]})}function i({board:e,summary:s,onMoveTask:a,onOpenTask:n,onNewTask:o}){return(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,t.jsx)("h1",{className:"font-display text-xl font-semibold tracking-tight",children:"Task Board"}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)("span",{className:"text-xs font-mono text-muted",children:[s?.tasks.total||0," tasks"]}),(0,t.jsxs)("button",{onClick:o,className:"flex items-center gap-1.5 px-3 py-1.5 bg-accent text-white rounded-lg text-sm font-medium hover:bg-accent/90 transition-colors",children:[(0,t.jsx)(r.Plus,{className:"w-3.5 h-3.5"}),"New Task"]})]})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4",children:["in-progress","todo","blocked","done"].map(s=>(0,t.jsx)(d,{status:s,tasks:e[s],onMoveTask:a,onOpenTask:n},s))})]})}var c=e.i(592381),x=e.i(287272),m=e.i(765470),u=e.i(240595);let p=[{value:"XS (< 1 hr)",label:"XS — under 1 hr"},{value:"S (1-2 hrs)",label:"S — 1–2 hrs"},{value:"M (3-4 hrs)",label:"M — 3–4 hrs"},{value:"L (5-8 hrs)",label:"L — 5–8 hrs"},{value:"XL (> 1 day)",label:"XL — over a day"}];function b({open:e,onOpenChange:a,rootParam:o,onTaskCreated:l}){let[d,i]=(0,s.useState)(""),[c,h]=(0,s.useState)(""),[g,f]=(0,s.useState)(""),[j,v]=(0,s.useState)(""),[N,k]=(0,s.useState)(""),[y,w]=(0,s.useState)(""),[T,S]=(0,s.useState)(!1);async function C(e){if(e.preventDefault(),!d.trim())return void w("Title is required");S(!0),w("");try{let e=await fetch(`/api/tasks/create${o}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:d.trim(),phase:c.trim()||void 0,size:g||void 0,description:j.trim()||void 0,dependsOn:N.trim()||void 0})});if(!e.ok){let t=await e.json();w(t.error??"Failed to create task"),S(!1);return}S(!1),l(),a(!1)}catch{w("Network error — please try again"),S(!1)}}return(0,s.useEffect)(()=>{e&&(i(""),h(""),f(""),v(""),k(""),w(""),S(!1))},[e]),(0,t.jsx)(x.Root,{open:e,onOpenChange:a,children:(0,t.jsxs)(x.Portal,{children:[(0,t.jsx)(x.Overlay,{className:"fixed inset-0 z-50 bg-black/60"}),(0,t.jsxs)(x.Content,{className:"fixed z-50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-lg bg-surface border border-border rounded-xl shadow-2xl",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border",children:[(0,t.jsx)(x.Title,{className:"font-semibold text-txt",children:"New Task"}),(0,t.jsx)(x.Close,{className:"text-muted hover:text-txt transition-colors",children:(0,t.jsx)(m.X,{className:"w-4 h-4"})})]}),(0,t.jsxs)("form",{onSubmit:C,className:"p-5 space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("label",{className:"block text-xs font-medium text-muted uppercase tracking-wide",children:["Title ",(0,t.jsx)("span",{className:"text-danger",children:"*"})]}),(0,t.jsx)("input",{autoFocus:!0,type:"text",value:d,onChange:e=>i(e.target.value),placeholder:"e.g. Add drag-and-drop to kanban",className:"w-full px-3 py-2 bg-surface2 border border-border rounded-lg text-sm text-txt placeholder:text-muted focus:outline-hidden focus:border-accent transition-colors"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-muted uppercase tracking-wide",children:"Phase"}),(0,t.jsx)("input",{type:"text",value:c,onChange:e=>h(e.target.value),placeholder:"e.g. 1 — Core",className:"w-full px-3 py-2 bg-surface2 border border-border rounded-lg text-sm text-txt placeholder:text-muted focus:outline-hidden focus:border-accent transition-colors"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-muted uppercase tracking-wide",children:"Size"}),(0,t.jsxs)("select",{value:g,onChange:e=>f(e.target.value),className:"w-full px-3 py-2 bg-surface2 border border-border rounded-lg text-sm text-txt focus:outline-hidden focus:border-accent transition-colors",children:[(0,t.jsx)("option",{value:"",children:"—"}),p.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))]})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-muted uppercase tracking-wide",children:"Depends on"}),(0,t.jsx)("input",{type:"text",value:N,onChange:e=>k(e.target.value),placeholder:"e.g. T001, T003",className:"w-full px-3 py-2 bg-surface2 border border-border rounded-lg text-sm text-txt placeholder:text-muted focus:outline-hidden focus:border-accent transition-colors"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-muted uppercase tracking-wide",children:"Description"}),(0,t.jsx)("textarea",{value:j,onChange:e=>v(e.target.value),placeholder:"What needs to be built?",rows:3,className:"w-full px-3 py-2 bg-surface2 border border-border rounded-lg text-sm text-txt placeholder:text-muted focus:outline-hidden focus:border-accent transition-colors resize-none"})]}),y&&(0,t.jsx)("p",{className:"text-sm text-danger",children:y}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-1",children:[(0,t.jsx)(x.Close,{type:"button",className:"px-4 py-2 text-sm text-muted hover:text-txt transition-colors",children:"Cancel"}),(0,t.jsxs)("button",{type:"submit",disabled:T||!d.trim(),className:(0,n.cn)("flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors","bg-accent text-white hover:bg-accent/90 disabled:opacity-50 disabled:cursor-not-allowed"),children:[T?(0,t.jsx)(u.Loader2,{className:"w-4 h-4 animate-spin"}):(0,t.jsx)(r.Plus,{className:"w-4 h-4"}),T?"Creating…":"Create Task"]})]})]})]})]})})}e.s(["default",0,function(){let{board:e,summary:r,moveTask:n,refresh:o,rootParam:l}=(0,a.useApp)(),[d,x]=(0,s.useState)(null),[m,u]=(0,s.useState)(!1);return e?(0,t.jsxs)("div",{className:"relative flex-1",children:[(0,t.jsx)(i,{board:e,summary:r,onMoveTask:n,onOpenTask:x,onNewTask:()=>u(!0)}),(0,t.jsx)(c.TaskDetailPanel,{task:d,onClose:()=>x(null),onMove:n}),(0,t.jsx)(b,{open:m,onOpenChange:u,rootParam:l,onTaskCreated:o})]}):null}],955787)},329090,e=>{"use strict";var t=e.i(72345);let s={task_updated:"🔨",decision_logged:"📝",memory_updated:"🧠",doc_read:"📄",session_start:"🤖",roadmap_updated:"🗺️"};function a(e){let t=(Date.now()-new Date(e).getTime())/1e3;return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}e.s(["ActivityEventRow",0,function({event:e}){return(0,t.jsxs)("div",{className:"flex gap-4 pb-4 animate-fade-in",children:[(0,t.jsx)("div",{className:"relative shrink-0 w-8 h-8 rounded-full bg-surface2 border border-border flex items-center justify-center text-sm z-10",children:s[e.type]||"•"}),(0,t.jsxs)("div",{className:"flex-1 pt-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-txt",children:e.title}),"ai"===e.actor&&(0,t.jsx)("span",{className:"text-xs px-1.5 py-0.5 rounded-sm bg-accent/10 text-accent border border-accent/20 font-mono",children:"AI"})]}),e.detail&&(0,t.jsx)("p",{className:"text-xs text-muted truncate",children:e.detail}),(0,t.jsx)("p",{className:"text-xs text-muted/60 mt-0.5 font-mono",children:a(e.timestamp)})]})]})},"timeAgo",0,a])},34086,e=>{"use strict";var t=e.i(72345),s=e.i(180338),a=e.i(975157),r=e.i(487486),n=e.i(519455);let o={todo:"text-muted border-border2","in-progress":"text-amber border-amber/30 bg-amber/5",blocked:"text-danger border-danger/30 bg-danger/5",done:"text-teal border-teal/30 bg-teal/5",cancelled:"text-muted border-border line-through"},l={todo:"border-border2 text-muted","in-progress":"border-amber/40 text-amber",blocked:"border-danger/40 text-danger",done:"border-teal/40 text-teal",cancelled:"border-border text-muted"},d={todo:"📋","in-progress":"🔨",blocked:"🚫",done:"✅",cancelled:"❌"},i={todo:["in-progress"],"in-progress":["done","blocked","todo"],blocked:["in-progress","cancelled"],done:["todo"],cancelled:["todo"]};e.s(["STATUS_ICONS",0,d,"TaskCard",0,function({task:e,onMove:c,onOpen:x}){let[m,u]=(0,s.useState)(!1),p=i[e.status]||[];return(0,t.jsxs)("div",{draggable:!0,onDragStart:t=>{t.dataTransfer.setData("taskId",e.id),t.dataTransfer.effectAllowed="move",u(!0)},onDragEnd:()=>u(!1),style:{viewTransitionName:`task-${e.file.replace(/[^a-zA-Z0-9_-]/g,"_")}`},className:(0,a.cn)("group relative bg-surface border rounded-lg p-3 text-sm transition-[border-color,opacity] hover:border-border2",o[e.status]||"border-border",m&&"opacity-50 cursor-grabbing"),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,t.jsx)("span",{className:"text-xs font-mono text-muted",children:e.id}),(0,t.jsx)(r.Badge,{variant:"outline",className:(0,a.cn)("text-[10px] h-4 px-1.5 font-normal",l[e.status]),children:"in-progress"===e.status?"active":e.status})]}),(0,t.jsx)("p",{className:"font-medium text-txt text-sm leading-snug mb-2",children:e.title}),e.phase&&(0,t.jsx)("p",{className:"text-xs text-muted mb-2",children:e.phase}),(0,t.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,t.jsx)(n.Button,{variant:"ghost",size:"sm",className:"h-6 text-xs px-2",onClick:x,children:"open"}),p.map(s=>(0,t.jsxs)(n.Button,{variant:"ghost",size:"sm",className:"h-6 text-xs px-2",onClick:()=>c(e.id,s),children:[d[s]," ","in-progress"===s?"start":s]},s))]})]})}])},592381,e=>{"use strict";var t=e.i(72345),s=e.i(180338),a=e.i(975157),r=e.i(980376),n=e.i(998822),o=e.i(34086),l=e.i(910172),d=e.i(763371),i=e.i(329090);function c({taskId:e,onNavigate:a}){let{rootParam:r}=(0,d.useApp)(),n=(0,l.useRouter)(),[o,x]=(0,s.useState)(null);return(0,s.useEffect)(()=>{let t=r?`${r}&`:"?";fetch(`/api/sessions${t}taskId=${encodeURIComponent(e)}`).then(e=>e.json()).then(e=>x(Array.isArray(e)?e:[])).catch(()=>x([]))},[r,e]),(0,t.jsxs)("div",{className:"px-5 py-3 border-b border-border shrink-0",children:[(0,t.jsx)("p",{className:"mb-2 text-xs font-mono uppercase tracking-wide text-muted",children:"Sessions"}),null===o?null:0===o.length?(0,t.jsx)("p",{className:"text-xs text-muted",children:"No recorded sessions"}):(0,t.jsx)("div",{className:"flex max-h-40 flex-col gap-1 overflow-y-auto",children:o.map(e=>(0,t.jsxs)("button",{onClick:()=>{a(),n.push(`/activity?session=${encodeURIComponent(e.id)}`)},className:"flex items-center gap-2 rounded-sm px-2 py-1 text-left text-xs hover:bg-surface2",children:[(0,t.jsx)("span",{children:"ai"===e.actor?"🤖":"👤"}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-muted",children:(0,i.timeAgo)(e.start)}),(0,t.jsx)("span",{className:"truncate text-txt",children:e.headline})]},e.id))})]})}let x={todo:["in-progress"],"in-progress":["done","blocked","todo"],blocked:["in-progress","cancelled"],done:["todo"],cancelled:["todo"]},m={"in-progress":"start",done:"done",blocked:"blocked",todo:"backlog",cancelled:"cancel"},u={todo:"text-muted border-border2","in-progress":"text-amber border-amber/30 bg-amber/5",blocked:"text-danger border-danger/30 bg-danger/5",done:"text-teal border-teal/30 bg-teal/5",cancelled:"text-muted border-border"};e.s(["TaskDetailPanel",0,function({task:e,onClose:l,onMove:d}){let[i,p]=(0,s.useState)(e);e&&e!==i&&p(e);let b=i&&x[i.status]||[];return(0,t.jsx)(r.Sheet,{open:!!e,onOpenChange:e=>{e||l()},children:(0,t.jsx)(r.SheetContent,{side:"right","aria-describedby":void 0,className:"p-0 gap-0 sm:max-w-[420px] border-border flex flex-col",children:i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 pl-5 pr-12 py-4 border-b border-border shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-xs text-muted",children:i.id}),(0,t.jsxs)("span",{className:(0,a.cn)("text-xs px-1.5 py-0.5 rounded-sm border font-mono",u[i.status]),children:[o.STATUS_ICONS[i.status]," ",i.status]})]}),(0,t.jsx)(r.SheetTitle,{className:"font-medium text-txt text-sm leading-snug",children:i.title})]}),b.length>0&&(0,t.jsx)("div",{className:"flex items-center gap-2 px-5 py-3 border-b border-border shrink-0",children:b.map(e=>(0,t.jsxs)("button",{onClick:()=>{d(i.id,e),l()},className:"text-xs px-2.5 py-1 rounded-sm bg-surface2 border border-border text-muted hover:text-txt hover:border-border2 transition-colors",children:[o.STATUS_ICONS[e]," ",m[e]||e]},e))}),(0,t.jsx)(c,{taskId:i.id,onNavigate:l},i.id),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:i.raw?(0,t.jsx)(n.MarkdownRenderer,{content:i.raw}):(0,t.jsx)("p",{className:"text-sm text-muted",children:"No content available."})})]})})})}],592381)}]);