trybeacon 0.1.67 → 0.1.68

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 (351) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.next/BUILD_ID +1 -1
  3. package/.next/app-path-routes-manifest.json +11 -15
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +3 -27
  6. package/.next/routes-manifest.json +0 -28
  7. package/.next/server/app/_global-error/page.js +3 -3
  8. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/_global-error.html +1 -1
  10. package/.next/server/app/_global-error.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/.next/server/app/_not-found/page.js +2 -2
  18. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  19. package/.next/server/app/_not-found.html +1 -1
  20. package/.next/server/app/_not-found.rsc +11 -11
  21. package/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
  22. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_index.segment.rsc +11 -11
  24. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  25. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  26. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  27. package/.next/server/app/api/board-annotations/[id]/route.js +1 -1
  28. package/.next/server/app/api/board-annotations/route.js +1 -1
  29. package/.next/server/app/api/board-layout/route.js +1 -1
  30. package/.next/server/app/api/bug-flags/[id]/route.js +1 -1
  31. package/.next/server/app/api/bug-flags/route.js +1 -1
  32. package/.next/server/app/api/code-graph/position/route.js +1 -1
  33. package/.next/server/app/api/code-graph/route.js +1 -1
  34. package/.next/server/app/api/context/feature/route.js +1 -1
  35. package/.next/server/app/api/context/file/route.js +1 -1
  36. package/.next/server/app/api/context/route.js +1 -1
  37. package/.next/server/app/api/db/arrange/route.js +1 -1
  38. package/.next/server/app/api/db/backfill-access/route.js +1 -1
  39. package/.next/server/app/api/db/position/route.js +1 -1
  40. package/.next/server/app/api/db/prune-planned/route.js +1 -1
  41. package/.next/server/app/api/db/reconcile-endpoints/route.js +1 -1
  42. package/.next/server/app/api/db/relations/[id]/route.js +1 -1
  43. package/.next/server/app/api/db/tables/[id]/route.js +1 -1
  44. package/.next/server/app/api/draft/approve/route.js +1 -1
  45. package/.next/server/app/api/draft/route.js +1 -1
  46. package/.next/server/app/api/draft/status/route.js +1 -1
  47. package/.next/server/app/api/edges/[id]/route.js +1 -1
  48. package/.next/server/app/api/edges/route.js +1 -1
  49. package/.next/server/app/api/endpoints/[id]/route.js +1 -1
  50. package/.next/server/app/api/entities/route.js +1 -1
  51. package/.next/server/app/api/flags/route.js +1 -1
  52. package/.next/server/app/api/ingest/route.js +2 -2
  53. package/.next/server/app/api/init/route.js +2 -2
  54. package/.next/server/app/api/lesson/close/route.js +1 -1
  55. package/.next/server/app/api/lesson/presence/route.js +1 -1
  56. package/.next/server/app/api/lesson/questions/route.js +1 -1
  57. package/.next/server/app/api/lesson/route.js +1 -1
  58. package/.next/server/app/api/lesson/save/route.js +1 -1
  59. package/.next/server/app/api/lesson/verdict/route.js +1 -1
  60. package/.next/server/app/api/map/describe/route.js +2 -2
  61. package/.next/server/app/api/map/files/route.js +1 -1
  62. package/.next/server/app/api/map/finish/route.js +1 -1
  63. package/.next/server/app/api/map/route.js +1 -1
  64. package/.next/server/app/api/map/start/route.js +1 -1
  65. package/.next/server/app/api/map/touch-active/route.js +1 -1
  66. package/.next/server/app/api/mention-search/route.js +1 -1
  67. package/.next/server/app/api/nodes/[id]/position/route.js +1 -1
  68. package/.next/server/app/api/nodes/[id]/route.js +1 -1
  69. package/.next/server/app/api/nodes/positions/route.js +1 -1
  70. package/.next/server/app/api/nodes/route.js +1 -1
  71. package/.next/server/app/api/nodes/subtasks/route.js +1 -1
  72. package/.next/server/app/api/notes/[id]/route.js +1 -1
  73. package/.next/server/app/api/notes/route.js +1 -1
  74. package/.next/server/app/api/open/route.js +1 -1
  75. package/.next/server/app/api/plan/annotations/route.js +3 -3
  76. package/.next/server/app/api/plan/approve/route.js +2 -2
  77. package/.next/server/app/api/plan/history/route.js +1 -1
  78. package/.next/server/app/api/plan/markdown/route.js +1 -1
  79. package/.next/server/app/api/plan/presence/route.js +1 -1
  80. package/.next/server/app/api/plan/route.js +1 -1
  81. package/.next/server/app/api/plan/verdict/route.js +1 -1
  82. package/.next/server/app/api/preferences/route.js +1 -1
  83. package/.next/server/app/api/project-meta/route.js +1 -1
  84. package/.next/server/app/api/reset/route.js +1 -1
  85. package/.next/server/app/api/scope-guard/check/route.js +1 -1
  86. package/.next/server/app/api/share/create/route.js +1 -1
  87. package/.next/server/app/api/share/route.js +1 -1
  88. package/.next/server/app/api/share/route.js.nft.json +1 -1
  89. package/.next/server/app/api/stream/route.js +2 -2
  90. package/.next/server/app/api/tab/nav/route.js +1 -1
  91. package/.next/server/app/api/tab/presence/route.js +1 -1
  92. package/.next/server/app/api/telemetry/route.js +1 -1
  93. package/.next/server/app/api/telemetry/stats/route.js +1 -1
  94. package/.next/server/app/api/version/route.js +1 -1
  95. package/.next/server/app/api/workspace/activate/route.js +1 -1
  96. package/.next/server/app/api/workspace/route.js +1 -1
  97. package/.next/server/app/apple-icon.png/route.js +1 -1
  98. package/.next/server/app/docs/page.js +2 -2
  99. package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  100. package/.next/server/app/docs.html +1 -1
  101. package/.next/server/app/docs.rsc +12 -12
  102. package/.next/server/app/docs.segments/_full.segment.rsc +12 -12
  103. package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  104. package/.next/server/app/docs.segments/_index.segment.rsc +11 -11
  105. package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
  106. package/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +2 -2
  107. package/.next/server/app/docs.segments/docs.segment.rsc +1 -1
  108. package/.next/server/app/help/page.js +2 -2
  109. package/.next/server/app/help/page_client-reference-manifest.js +1 -1
  110. package/.next/server/app/help.html +1 -1
  111. package/.next/server/app/help.rsc +11 -11
  112. package/.next/server/app/help.segments/_full.segment.rsc +11 -11
  113. package/.next/server/app/help.segments/_head.segment.rsc +1 -1
  114. package/.next/server/app/help.segments/_index.segment.rsc +11 -11
  115. package/.next/server/app/help.segments/_tree.segment.rsc +2 -2
  116. package/.next/server/app/help.segments/help/__PAGE__.segment.rsc +1 -1
  117. package/.next/server/app/help.segments/help.segment.rsc +1 -1
  118. package/.next/server/app/icon.svg/route.js +1 -1
  119. package/.next/server/app/index.html +1 -1
  120. package/.next/server/app/index.rsc +12 -12
  121. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  122. package/.next/server/app/index.segments/_full.segment.rsc +12 -12
  123. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  124. package/.next/server/app/index.segments/_index.segment.rsc +11 -11
  125. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  126. package/.next/server/app/learn/page.js +3 -3
  127. package/.next/server/app/learn/page.js.nft.json +1 -1
  128. package/.next/server/app/learn/page_client-reference-manifest.js +1 -1
  129. package/.next/server/app/map/page.js +2 -2
  130. package/.next/server/app/map/page.js.nft.json +1 -1
  131. package/.next/server/app/map/page_client-reference-manifest.js +1 -1
  132. package/.next/server/app/page.js +2 -2
  133. package/.next/server/app/page_client-reference-manifest.js +1 -1
  134. package/.next/server/app/plan/page.js +2 -2
  135. package/.next/server/app/plan/page.js.nft.json +1 -1
  136. package/.next/server/app/plan/page_client-reference-manifest.js +1 -1
  137. package/.next/server/app/s/[token]/page.js +2 -2
  138. package/.next/server/app/s/[token]/page.js.nft.json +1 -1
  139. package/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
  140. package/.next/server/app/settings/page.js +2 -2
  141. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  142. package/.next/server/app-paths-manifest.json +11 -15
  143. package/.next/server/chunks/2773.js +1 -0
  144. package/.next/server/chunks/4307.js +1 -1
  145. package/.next/server/chunks/6709.js +1 -0
  146. package/.next/server/middleware-build-manifest.js +1 -1
  147. package/.next/server/middleware.js +1 -1
  148. package/.next/server/pages/404.html +1 -1
  149. package/.next/server/pages/500.html +1 -1
  150. package/.next/server/server-reference-manifest.js +1 -1
  151. package/.next/server/server-reference-manifest.json +1 -1
  152. package/.next/static/ZEJwYPSMMES2UlUBBgBmw/_buildManifest.js +1 -0
  153. package/.next/static/chunks/6371-9ebaddaf512402a4.js +1 -0
  154. package/.next/static/chunks/app/_global-error/page-93569b5eb93a61e9.js +1 -0
  155. package/.next/static/chunks/app/api/board-annotations/[id]/route-93569b5eb93a61e9.js +1 -0
  156. package/.next/static/chunks/app/api/board-annotations/route-93569b5eb93a61e9.js +1 -0
  157. package/.next/static/chunks/app/api/board-layout/route-93569b5eb93a61e9.js +1 -0
  158. package/.next/static/chunks/app/api/bug-flags/[id]/route-93569b5eb93a61e9.js +1 -0
  159. package/.next/static/chunks/app/api/bug-flags/route-93569b5eb93a61e9.js +1 -0
  160. package/.next/static/chunks/app/api/code-graph/position/route-93569b5eb93a61e9.js +1 -0
  161. package/.next/static/chunks/app/api/code-graph/route-93569b5eb93a61e9.js +1 -0
  162. package/.next/static/chunks/app/api/context/feature/route-93569b5eb93a61e9.js +1 -0
  163. package/.next/static/chunks/app/api/context/file/route-93569b5eb93a61e9.js +1 -0
  164. package/.next/static/chunks/app/api/context/route-93569b5eb93a61e9.js +1 -0
  165. package/.next/static/chunks/app/api/db/arrange/route-93569b5eb93a61e9.js +1 -0
  166. package/.next/static/chunks/app/api/db/backfill-access/route-93569b5eb93a61e9.js +1 -0
  167. package/.next/static/chunks/app/api/db/position/route-93569b5eb93a61e9.js +1 -0
  168. package/.next/static/chunks/app/api/db/prune-planned/route-93569b5eb93a61e9.js +1 -0
  169. package/.next/static/chunks/app/api/db/reconcile-endpoints/route-93569b5eb93a61e9.js +1 -0
  170. package/.next/static/chunks/app/api/db/relations/[id]/route-93569b5eb93a61e9.js +1 -0
  171. package/.next/static/chunks/app/api/db/tables/[id]/route-93569b5eb93a61e9.js +1 -0
  172. package/.next/static/chunks/app/api/draft/approve/route-93569b5eb93a61e9.js +1 -0
  173. package/.next/static/chunks/app/api/draft/route-93569b5eb93a61e9.js +1 -0
  174. package/.next/static/chunks/app/api/draft/status/route-93569b5eb93a61e9.js +1 -0
  175. package/.next/static/chunks/app/api/edges/[id]/route-93569b5eb93a61e9.js +1 -0
  176. package/.next/static/chunks/app/api/edges/route-93569b5eb93a61e9.js +1 -0
  177. package/.next/static/chunks/app/api/endpoints/[id]/route-93569b5eb93a61e9.js +1 -0
  178. package/.next/static/chunks/app/api/entities/route-93569b5eb93a61e9.js +1 -0
  179. package/.next/static/chunks/app/api/flags/route-93569b5eb93a61e9.js +1 -0
  180. package/.next/static/chunks/app/api/ingest/route-93569b5eb93a61e9.js +1 -0
  181. package/.next/static/chunks/app/api/init/route-93569b5eb93a61e9.js +1 -0
  182. package/.next/static/chunks/app/api/lesson/close/route-93569b5eb93a61e9.js +1 -0
  183. package/.next/static/chunks/app/api/lesson/presence/route-93569b5eb93a61e9.js +1 -0
  184. package/.next/static/chunks/app/api/lesson/questions/route-93569b5eb93a61e9.js +1 -0
  185. package/.next/static/chunks/app/api/lesson/route-93569b5eb93a61e9.js +1 -0
  186. package/.next/static/chunks/app/api/lesson/save/route-93569b5eb93a61e9.js +1 -0
  187. package/.next/static/chunks/app/api/lesson/verdict/route-93569b5eb93a61e9.js +1 -0
  188. package/.next/static/chunks/app/api/map/describe/route-93569b5eb93a61e9.js +1 -0
  189. package/.next/static/chunks/app/api/map/files/route-93569b5eb93a61e9.js +1 -0
  190. package/.next/static/chunks/app/api/map/finish/route-93569b5eb93a61e9.js +1 -0
  191. package/.next/static/chunks/app/api/map/route-93569b5eb93a61e9.js +1 -0
  192. package/.next/static/chunks/app/api/map/start/route-93569b5eb93a61e9.js +1 -0
  193. package/.next/static/chunks/app/api/map/touch-active/route-93569b5eb93a61e9.js +1 -0
  194. package/.next/static/chunks/app/api/mention-search/route-93569b5eb93a61e9.js +1 -0
  195. package/.next/static/chunks/app/api/nodes/[id]/position/route-93569b5eb93a61e9.js +1 -0
  196. package/.next/static/chunks/app/api/nodes/[id]/route-93569b5eb93a61e9.js +1 -0
  197. package/.next/static/chunks/app/api/nodes/positions/route-93569b5eb93a61e9.js +1 -0
  198. package/.next/static/chunks/app/api/nodes/route-93569b5eb93a61e9.js +1 -0
  199. package/.next/static/chunks/app/api/nodes/subtasks/route-93569b5eb93a61e9.js +1 -0
  200. package/.next/static/chunks/app/api/notes/[id]/route-93569b5eb93a61e9.js +1 -0
  201. package/.next/static/chunks/app/api/notes/route-93569b5eb93a61e9.js +1 -0
  202. package/.next/static/chunks/app/api/open/route-93569b5eb93a61e9.js +1 -0
  203. package/.next/static/chunks/app/api/plan/annotations/route-93569b5eb93a61e9.js +1 -0
  204. package/.next/static/chunks/app/api/plan/approve/route-93569b5eb93a61e9.js +1 -0
  205. package/.next/static/chunks/app/api/plan/history/route-93569b5eb93a61e9.js +1 -0
  206. package/.next/static/chunks/app/api/plan/markdown/route-93569b5eb93a61e9.js +1 -0
  207. package/.next/static/chunks/app/api/plan/presence/route-93569b5eb93a61e9.js +1 -0
  208. package/.next/static/chunks/app/api/plan/route-93569b5eb93a61e9.js +1 -0
  209. package/.next/static/chunks/app/api/plan/verdict/route-93569b5eb93a61e9.js +1 -0
  210. package/.next/static/chunks/app/api/preferences/route-93569b5eb93a61e9.js +1 -0
  211. package/.next/static/chunks/app/api/project-meta/route-93569b5eb93a61e9.js +1 -0
  212. package/.next/static/chunks/app/api/reset/route-93569b5eb93a61e9.js +1 -0
  213. package/.next/static/chunks/app/api/scope-guard/check/route-93569b5eb93a61e9.js +1 -0
  214. package/.next/static/chunks/app/api/share/create/route-93569b5eb93a61e9.js +1 -0
  215. package/.next/static/chunks/app/api/share/route-93569b5eb93a61e9.js +1 -0
  216. package/.next/static/chunks/app/api/stream/route-93569b5eb93a61e9.js +1 -0
  217. package/.next/static/chunks/app/api/tab/nav/route-93569b5eb93a61e9.js +1 -0
  218. package/.next/static/chunks/app/api/tab/presence/route-93569b5eb93a61e9.js +1 -0
  219. package/.next/static/chunks/app/api/telemetry/route-93569b5eb93a61e9.js +1 -0
  220. package/.next/static/chunks/app/api/telemetry/stats/route-93569b5eb93a61e9.js +1 -0
  221. package/.next/static/chunks/app/api/version/route-93569b5eb93a61e9.js +1 -0
  222. package/.next/static/chunks/app/api/workspace/activate/route-93569b5eb93a61e9.js +1 -0
  223. package/.next/static/chunks/app/api/workspace/route-93569b5eb93a61e9.js +1 -0
  224. package/.next/static/chunks/app/docs/page-126c0e42c71731b2.js +1 -0
  225. package/.next/static/chunks/app/layout-e46e1337e196e904.js +1 -0
  226. package/.next/static/chunks/app/learn/{page-03acad0a37068966.js → page-4193bf2f60c4f812.js} +1 -1
  227. package/.next/static/chunks/app/map/{page-5cfad64d5feea695.js → page-6f0139228ec52538.js} +1 -1
  228. package/.next/static/chunks/app/{page-d08947a671077569.js → page-ec00130a7a249f14.js} +1 -1
  229. package/.next/static/chunks/app/plan/{page-5eacb6b83bd4873d.js → page-5addc50440c40167.js} +1 -1
  230. package/.next/static/chunks/app/s/[token]/{page-1a350cf50a45500c.js → page-13976553e707cad8.js} +1 -1
  231. package/.next/static/chunks/next/dist/client/components/builtin/app-error-93569b5eb93a61e9.js +1 -0
  232. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-93569b5eb93a61e9.js +1 -0
  233. package/.next/static/chunks/next/dist/client/components/builtin/not-found-93569b5eb93a61e9.js +1 -0
  234. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-93569b5eb93a61e9.js +1 -0
  235. package/.next/static/css/ac0b6ff5058ccc12.css +1 -0
  236. package/.next/trace +43 -43
  237. package/.next/trace-build +1 -1
  238. package/.next/types/routes.d.ts +2 -6
  239. package/.next/types/validator.ts +0 -36
  240. package/package.json +3 -3
  241. package/.next/server/app/api/feedback/[id]/route.js +0 -1
  242. package/.next/server/app/api/feedback/[id]/route.js.nft.json +0 -1
  243. package/.next/server/app/api/feedback/[id]/route_client-reference-manifest.js +0 -1
  244. package/.next/server/app/api/feedback/[id]/vote/route.js +0 -1
  245. package/.next/server/app/api/feedback/[id]/vote/route.js.nft.json +0 -1
  246. package/.next/server/app/api/feedback/[id]/vote/route_client-reference-manifest.js +0 -1
  247. package/.next/server/app/api/feedback/route.js +0 -1
  248. package/.next/server/app/api/feedback/route.js.nft.json +0 -1
  249. package/.next/server/app/api/feedback/route_client-reference-manifest.js +0 -1
  250. package/.next/server/app/feedback/page.js +0 -2
  251. package/.next/server/app/feedback/page.js.nft.json +0 -1
  252. package/.next/server/app/feedback/page_client-reference-manifest.js +0 -1
  253. package/.next/server/app/feedback.html +0 -1
  254. package/.next/server/app/feedback.meta +0 -15
  255. package/.next/server/app/feedback.rsc +0 -32
  256. package/.next/server/app/feedback.segments/_full.segment.rsc +0 -32
  257. package/.next/server/app/feedback.segments/_head.segment.rsc +0 -6
  258. package/.next/server/app/feedback.segments/_index.segment.rsc +0 -15
  259. package/.next/server/app/feedback.segments/_tree.segment.rsc +0 -5
  260. package/.next/server/app/feedback.segments/feedback/__PAGE__.segment.rsc +0 -9
  261. package/.next/server/app/feedback.segments/feedback.segment.rsc +0 -5
  262. package/.next/server/chunks/2050.js +0 -1
  263. package/.next/server/chunks/5683.js +0 -1
  264. package/.next/static/chunks/1276-b84f61ec9c0df862.js +0 -1
  265. package/.next/static/chunks/app/_global-error/page-2390ea0e69e5991f.js +0 -1
  266. package/.next/static/chunks/app/api/board-annotations/[id]/route-2390ea0e69e5991f.js +0 -1
  267. package/.next/static/chunks/app/api/board-annotations/route-2390ea0e69e5991f.js +0 -1
  268. package/.next/static/chunks/app/api/board-layout/route-2390ea0e69e5991f.js +0 -1
  269. package/.next/static/chunks/app/api/bug-flags/[id]/route-2390ea0e69e5991f.js +0 -1
  270. package/.next/static/chunks/app/api/bug-flags/route-2390ea0e69e5991f.js +0 -1
  271. package/.next/static/chunks/app/api/code-graph/position/route-2390ea0e69e5991f.js +0 -1
  272. package/.next/static/chunks/app/api/code-graph/route-2390ea0e69e5991f.js +0 -1
  273. package/.next/static/chunks/app/api/context/feature/route-2390ea0e69e5991f.js +0 -1
  274. package/.next/static/chunks/app/api/context/file/route-2390ea0e69e5991f.js +0 -1
  275. package/.next/static/chunks/app/api/context/route-2390ea0e69e5991f.js +0 -1
  276. package/.next/static/chunks/app/api/db/arrange/route-2390ea0e69e5991f.js +0 -1
  277. package/.next/static/chunks/app/api/db/backfill-access/route-2390ea0e69e5991f.js +0 -1
  278. package/.next/static/chunks/app/api/db/position/route-2390ea0e69e5991f.js +0 -1
  279. package/.next/static/chunks/app/api/db/prune-planned/route-2390ea0e69e5991f.js +0 -1
  280. package/.next/static/chunks/app/api/db/reconcile-endpoints/route-2390ea0e69e5991f.js +0 -1
  281. package/.next/static/chunks/app/api/db/relations/[id]/route-2390ea0e69e5991f.js +0 -1
  282. package/.next/static/chunks/app/api/db/tables/[id]/route-2390ea0e69e5991f.js +0 -1
  283. package/.next/static/chunks/app/api/draft/approve/route-2390ea0e69e5991f.js +0 -1
  284. package/.next/static/chunks/app/api/draft/route-2390ea0e69e5991f.js +0 -1
  285. package/.next/static/chunks/app/api/draft/status/route-2390ea0e69e5991f.js +0 -1
  286. package/.next/static/chunks/app/api/edges/[id]/route-2390ea0e69e5991f.js +0 -1
  287. package/.next/static/chunks/app/api/edges/route-2390ea0e69e5991f.js +0 -1
  288. package/.next/static/chunks/app/api/endpoints/[id]/route-2390ea0e69e5991f.js +0 -1
  289. package/.next/static/chunks/app/api/entities/route-2390ea0e69e5991f.js +0 -1
  290. package/.next/static/chunks/app/api/feedback/[id]/route-2390ea0e69e5991f.js +0 -1
  291. package/.next/static/chunks/app/api/feedback/[id]/vote/route-2390ea0e69e5991f.js +0 -1
  292. package/.next/static/chunks/app/api/feedback/route-2390ea0e69e5991f.js +0 -1
  293. package/.next/static/chunks/app/api/flags/route-2390ea0e69e5991f.js +0 -1
  294. package/.next/static/chunks/app/api/ingest/route-2390ea0e69e5991f.js +0 -1
  295. package/.next/static/chunks/app/api/init/route-2390ea0e69e5991f.js +0 -1
  296. package/.next/static/chunks/app/api/lesson/close/route-2390ea0e69e5991f.js +0 -1
  297. package/.next/static/chunks/app/api/lesson/presence/route-2390ea0e69e5991f.js +0 -1
  298. package/.next/static/chunks/app/api/lesson/questions/route-2390ea0e69e5991f.js +0 -1
  299. package/.next/static/chunks/app/api/lesson/route-2390ea0e69e5991f.js +0 -1
  300. package/.next/static/chunks/app/api/lesson/save/route-2390ea0e69e5991f.js +0 -1
  301. package/.next/static/chunks/app/api/lesson/verdict/route-2390ea0e69e5991f.js +0 -1
  302. package/.next/static/chunks/app/api/map/describe/route-2390ea0e69e5991f.js +0 -1
  303. package/.next/static/chunks/app/api/map/files/route-2390ea0e69e5991f.js +0 -1
  304. package/.next/static/chunks/app/api/map/finish/route-2390ea0e69e5991f.js +0 -1
  305. package/.next/static/chunks/app/api/map/route-2390ea0e69e5991f.js +0 -1
  306. package/.next/static/chunks/app/api/map/start/route-2390ea0e69e5991f.js +0 -1
  307. package/.next/static/chunks/app/api/map/touch-active/route-2390ea0e69e5991f.js +0 -1
  308. package/.next/static/chunks/app/api/mention-search/route-2390ea0e69e5991f.js +0 -1
  309. package/.next/static/chunks/app/api/nodes/[id]/position/route-2390ea0e69e5991f.js +0 -1
  310. package/.next/static/chunks/app/api/nodes/[id]/route-2390ea0e69e5991f.js +0 -1
  311. package/.next/static/chunks/app/api/nodes/positions/route-2390ea0e69e5991f.js +0 -1
  312. package/.next/static/chunks/app/api/nodes/route-2390ea0e69e5991f.js +0 -1
  313. package/.next/static/chunks/app/api/nodes/subtasks/route-2390ea0e69e5991f.js +0 -1
  314. package/.next/static/chunks/app/api/notes/[id]/route-2390ea0e69e5991f.js +0 -1
  315. package/.next/static/chunks/app/api/notes/route-2390ea0e69e5991f.js +0 -1
  316. package/.next/static/chunks/app/api/open/route-2390ea0e69e5991f.js +0 -1
  317. package/.next/static/chunks/app/api/plan/annotations/route-2390ea0e69e5991f.js +0 -1
  318. package/.next/static/chunks/app/api/plan/approve/route-2390ea0e69e5991f.js +0 -1
  319. package/.next/static/chunks/app/api/plan/history/route-2390ea0e69e5991f.js +0 -1
  320. package/.next/static/chunks/app/api/plan/markdown/route-2390ea0e69e5991f.js +0 -1
  321. package/.next/static/chunks/app/api/plan/presence/route-2390ea0e69e5991f.js +0 -1
  322. package/.next/static/chunks/app/api/plan/route-2390ea0e69e5991f.js +0 -1
  323. package/.next/static/chunks/app/api/plan/verdict/route-2390ea0e69e5991f.js +0 -1
  324. package/.next/static/chunks/app/api/preferences/route-2390ea0e69e5991f.js +0 -1
  325. package/.next/static/chunks/app/api/project-meta/route-2390ea0e69e5991f.js +0 -1
  326. package/.next/static/chunks/app/api/reset/route-2390ea0e69e5991f.js +0 -1
  327. package/.next/static/chunks/app/api/scope-guard/check/route-2390ea0e69e5991f.js +0 -1
  328. package/.next/static/chunks/app/api/share/create/route-2390ea0e69e5991f.js +0 -1
  329. package/.next/static/chunks/app/api/share/route-2390ea0e69e5991f.js +0 -1
  330. package/.next/static/chunks/app/api/stream/route-2390ea0e69e5991f.js +0 -1
  331. package/.next/static/chunks/app/api/tab/nav/route-2390ea0e69e5991f.js +0 -1
  332. package/.next/static/chunks/app/api/tab/presence/route-2390ea0e69e5991f.js +0 -1
  333. package/.next/static/chunks/app/api/telemetry/route-2390ea0e69e5991f.js +0 -1
  334. package/.next/static/chunks/app/api/telemetry/stats/route-2390ea0e69e5991f.js +0 -1
  335. package/.next/static/chunks/app/api/version/route-2390ea0e69e5991f.js +0 -1
  336. package/.next/static/chunks/app/api/workspace/activate/route-2390ea0e69e5991f.js +0 -1
  337. package/.next/static/chunks/app/api/workspace/route-2390ea0e69e5991f.js +0 -1
  338. package/.next/static/chunks/app/docs/page-ae19d2e91ec24771.js +0 -1
  339. package/.next/static/chunks/app/feedback/page-ea7f66503f2a4ca6.js +0 -1
  340. package/.next/static/chunks/app/layout-9f0f4d8e4534a62e.js +0 -1
  341. package/.next/static/chunks/next/dist/client/components/builtin/app-error-2390ea0e69e5991f.js +0 -1
  342. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-2390ea0e69e5991f.js +0 -1
  343. package/.next/static/chunks/next/dist/client/components/builtin/not-found-2390ea0e69e5991f.js +0 -1
  344. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-2390ea0e69e5991f.js +0 -1
  345. package/.next/static/css/63986592e2be7d62.css +0 -1
  346. package/.next/static/hkOIw5DQW9WSwBwZrD8_9/_buildManifest.js +0 -1
  347. package/.next/types/app/api/feedback/[id]/route.ts +0 -351
  348. package/.next/types/app/api/feedback/[id]/vote/route.ts +0 -351
  349. package/.next/types/app/api/feedback/route.ts +0 -351
  350. package/.next/types/app/feedback/page.ts +0 -87
  351. /package/.next/static/{hkOIw5DQW9WSwBwZrD8_9 → ZEJwYPSMMES2UlUBBgBmw}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6624],{9383:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},15330:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]])},22137:(e,t,n)=>{Promise.resolve().then(n.bind(n,24006))},24006:(e,t,n)=>{"use strict";n.d(t,{PlanWorkspace:()=>ei});var s=n(95155),r=n(12115),a=n(64577),o=n(25640),l=n(34306),i=n(92571),d=n(30772);let c=(0,d.A)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]),u=(0,d.A)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);var m=n(45486),h=n(25494),x=n(17356),p=n(9383),f=n(9005),g=n(65738),b=n(8962),v=n(73321),y=n(48484),j=n(60292),w=n(99979),k=n(32133),N=n(38332),C=n(91337);function A(e,t,n,s,r,a,o=8){return{left:Math.max(o,Math.min(e,r-n-o)),top:Math.max(o,Math.min(t,a-s-o))}}var E=n(51909);let S="u">typeof CSS&&"highlights"in CSS&&"u">typeof Highlight,z="beacon-pending",R="beacon-annotation",M="beacon-deletion";function D(){return S?CSS.highlights:null}function O(...e){return new globalThis.Highlight(...e)}function P(e){let t=e.getClientRects(),n=t.length?t[t.length-1]:e.getBoundingClientRect();return{x:n.right,y:n.bottom}}function T({markdown:e,round:t,onApi:n,hideSubmit:o=!1,getExtraSubmitPayload:l}){let[i,d]=(0,r.useState)([]),[c,u]=(0,r.useState)(""),[m,h]=(0,r.useState)(!1),[x,g]=(0,r.useState)(null),[b,v]=(0,r.useState)(null),[y,E]=(0,r.useState)(null),[L,$]=(0,r.useState)(!1),[H,B]=(0,r.useState)(!1),U=(0,r.useRef)(null),X=(0,r.useRef)(null),G=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=!0;return(async()=>{try{let t=await fetch("/api/plan/annotations",{cache:"no-store",headers:(0,j.dh)((0,w.X0)())});if(!t.ok)return;let n=await t.json();if(!e)return;d(n.annotations??[]),u(n.globalComment??""),B(!!n.submitted)}catch{}})(),()=>{e=!1}},[e,t]),(0,r.useEffect)(()=>{if(H)return;let e=setTimeout(()=>{fetch("/api/plan/annotations",{method:"PUT",headers:{"content-type":"application/json",...(0,j.dh)((0,w.X0)())},body:JSON.stringify({annotations:i,globalComment:c,round:t})}).catch(()=>{})},400);return()=>clearTimeout(e)},[i,c,H,t]);let K=(0,r.useCallback)(()=>{let e=window.getSelection();if(!e||e.isCollapsed)return void g(null);let t=e.toString().trim();if(!t)return void g(null);if(!U.current?.contains(e.anchorNode))return;let{x:n,y:s}=P(e.getRangeAt(0));g({x:n,y:s,excerpt:t})},[]);(0,r.useEffect)(()=>{let e=()=>setTimeout(K,0);return document.addEventListener("mouseup",e),document.addEventListener("selectionchange",e),()=>{document.removeEventListener("mouseup",e),document.removeEventListener("selectionchange",e)}},[K]);let _=(0,r.useCallback)((e,t="comment",n="")=>{let s=`a-${Date.now()}-${Math.floor(1e6*Math.random())}`;d(r=>[...r,{id:s,excerpt:e,comment:n,kind:t}]),"comment"===t&&E(s),g(null),window.getSelection()?.removeAllRanges()},[]);(0,r.useEffect)(()=>{let e=e=>{let t=window.getSelection();if(!t||t.isCollapsed)return;let n=t.toString().trim();if(!n||!U.current?.contains(t.anchorNode))return;let s=document.activeElement;if(s&&/^(TEXTAREA|INPUT)$/.test(s.tagName)||!(1===e.key.length&&!e.metaKey&&!e.ctrlKey&&!e.altKey))return;e.preventDefault();let r=t.getRangeAt(0);G.current=r.cloneRange();let{x:a,y:o}=P(r);v({x:a,y:o,excerpt:n,seed:e.key}),g(null),window.getSelection()?.removeAllRanges()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]),(0,r.useEffect)(()=>{let e=D();if(!b||!e)return;let t=G.current;if(t)return e.set(z,O(t)),()=>{e.delete(z)}},[b]),(0,r.useEffect)(()=>{let e=D();if(!e||!U.current)return;let t=[],n=[];for(let e of i){let s=function(e,t){if(!t)return null;let n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:e=>e.parentElement?.closest("pre, table")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),s=[],r="";for(let e=n.nextNode();e;e=n.nextNode())s.push({node:e,start:r.length}),r+=e.nodeValue??"";let a=r.indexOf(t);if(a<0)return null;let o=e=>{for(let t=s.length-1;t>=0;t--)if(s[t].start<=e)return{node:s[t].node,offset:e-s[t].start};return null},l=o(a),i=o(a+t.length);if(!l||!i)return null;let d=document.createRange();return d.setStart(l.node,l.offset),d.setEnd(i.node,i.offset),d}(U.current,e.excerpt);s&&((e.kind??"comment")==="deletion"?n:t).push(s)}let s=(t,n)=>n.length?e.set(t,O(...n)):e.delete(t);return s(R,t),s(M,n),()=>{e.delete(R),e.delete(M)}},[i,e]),(0,r.useEffect)(()=>{if(!m)return;let e=e=>{let t=e.target;!t||X.current?.contains(t)||t.closest("[data-overall-toggle]")||h(!1)},t=e=>{"Escape"===e.key&&h(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[m]);let q=(e,t)=>d(n=>n.map(n=>n.id===e?{...n,comment:t}:n)),V=e=>d(t=>t.filter(t=>t.id!==e)),W=()=>{d([]),u(""),h(!1),fetch("/api/plan/annotations",{method:"DELETE",headers:(0,j.dh)((0,w.X0)())}).catch(()=>{})},J=async()=>{if(!L){$(!0);try{let e=l?.()??{},n=await fetch("/api/plan/annotations",{method:"POST",headers:{"content-type":"application/json",...(0,j.dh)((0,w.X0)())},body:JSON.stringify({annotations:i,globalComment:c,round:t,...e})});n.ok?B(!0):409===n.status&&window.location.reload()}finally{$(!1)}}},Y=(0,r.useMemo)(()=>i.filter(e=>"deletion"===e.kind||e.comment.trim()).length+ +!!c.trim(),[i,c]);return(0,r.useEffect)(()=>{n?.({liveCount:Y,submitting:L,submitted:H,submit:()=>void J(),clearAll:W,annotationCount:i.length,hasGlobalComment:!!c.trim(),globalOpen:m,toggleOverall:()=>h(e=>!e),annotations:i,updateComment:q,removeAnnotation:V,focusOnAnnotation:e=>E(e),addComment:e=>_(e,"comment")})},[Y,L,H,i,c,m]),(0,s.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,s.jsx)("div",{className:"relative shrink-0",children:(0,s.jsxs)("div",{className:"absolute right-3 top-2 z-30 flex items-center gap-1",children:[!o&&(0,s.jsxs)("button",{onClick:()=>void J(),disabled:L||0===Y,className:(0,C.cn)("flex items-center gap-1 rounded-md border px-2 py-1 text-[11px] font-semibold transition-colors",H?"border-emerald-500/40 bg-emerald-500/15 text-emerald-300":0===Y?"border-white/10 text-muted-foreground opacity-50":"border-sky-500/40 bg-sky-500/15 text-sky-300 hover:bg-sky-500/25"),title:H?"Submitted — your terminal session is reading the feedback":"Submit all feedback so the agent can revise the plan",children:[H?(0,s.jsx)(a.A,{className:"size-3"}):(0,s.jsx)(p.A,{className:"size-3"}),H?"Submitted":"Submit feedback"]}),m&&(0,s.jsxs)("div",{ref:X,className:"absolute right-0 top-[calc(100%+6px)] z-50 w-[320px] rounded-md border border-white/10 bg-card p-2 shadow-xl",children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Overall feedback"}),(0,s.jsx)("button",{onClick:()=>h(!1),title:"Close (Esc)",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,s.jsx)(f.A,{className:"size-3"})})]}),(0,s.jsx)("textarea",{autoFocus:!0,value:c,onChange:e=>u(e.target.value),onKeyDown:e=>{e.stopPropagation(),"Enter"===e.key&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),!L&&Y>0&&(J(),h(!1))):"Escape"===e.key&&(e.preventDefault(),h(!1))},placeholder:"Plan-level notes — e.g. 'split this into two phases' or 'wrong abstraction'…",rows:4,className:"w-full resize-y rounded border border-white/5 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-sky-400/40"}),(0,s.jsx)("div",{className:"mt-1 text-right text-[9px] text-muted-foreground/70",children:"⌘/Ctrl+Enter to submit \xb7 Esc to close"})]})]})}),(0,s.jsx)("div",{ref:U,className:"min-h-0 flex-1 overflow-y-auto px-5 pb-5 pt-16 text-[15px] leading-[1.6] selection:bg-[var(--accent-2,#ff7a45)]/30",children:(0,s.jsx)(F,{markdown:e,annotations:b&&!S?[...i,{id:"__pending",excerpt:b.excerpt,comment:"",kind:"comment"}]:i,focusOnId:y,onClearFocus:()=>E(null),onUpdate:q,onRemove:V})}),x&&(0,s.jsxs)("div",{style:function(e,t){let{left:n,top:s}=A(e,t,76,34,window.innerWidth,window.innerHeight);return{position:"fixed",left:n,top:s,zIndex:60}}(x.x+4,x.y+6),className:"flex items-center gap-0.5 rounded-md border border-white/15 bg-card/95 p-0.5 shadow-lg backdrop-blur",children:[(0,s.jsx)("button",{onClick:()=>{let e=window.getSelection();G.current=e&&e.rangeCount?e.getRangeAt(0).cloneRange():null,v({...x,seed:""}),g(null),e?.removeAllRanges()},title:"Comment on this text",className:"rounded p-1 text-sky-300 hover:bg-sky-500/15",children:(0,s.jsx)(k.A,{className:"size-3.5"})}),(0,s.jsx)("button",{onClick:()=>_(x.excerpt,"deletion"),title:"Mark this for deletion",className:"rounded p-1 text-red-300 hover:bg-red-500/15",children:(0,s.jsx)(N.A,{className:"size-3.5"})})]}),b&&(0,s.jsx)(I,{excerpt:b.excerpt,x:b.x,y:b.y,seed:b.seed,onConfirm:e=>{_(b.excerpt,"comment",e),v(null)},onCancel:()=>v(null)})]})}function I({excerpt:e,x:t,y:n,seed:o,onConfirm:l,onCancel:i}){let[d,c]=(0,r.useState)(o),u=(0,r.useRef)(null),[m,h]=(0,r.useState)(()=>A(t+4,n+6,256,130,window.innerWidth,window.innerHeight));(0,r.useLayoutEffect)(()=>{let e=u.current;if(!e)return;let{width:s,height:r}=e.getBoundingClientRect();h(A(t+4,n+6,s,r,window.innerWidth,window.innerHeight))},[t,n]);let x=()=>d.trim()?l(d.trim()):i();return(0,s.jsxs)("div",{ref:u,style:{position:"fixed",left:m.left,top:m.top,zIndex:60},className:"w-64 rounded-md border border-white/15 bg-card/95 p-1.5 shadow-xl backdrop-blur",onBlur:e=>{u.current?.contains(e.relatedTarget)||x()},children:[(0,s.jsxs)("div",{className:"mb-1 line-clamp-1 text-[10px] text-muted-foreground",children:["“",e,"”"]}),(0,s.jsx)("textarea",{autoFocus:!0,value:d,onChange:e=>c(e.target.value),onFocus:e=>e.currentTarget.setSelectionRange(d.length,d.length),placeholder:"Comment… (Enter to add \xb7 Esc to discard)",onKeyDown:e=>{e.stopPropagation(),"Enter"!==e.key||e.shiftKey?"Escape"===e.key&&(e.preventDefault(),i()):(e.preventDefault(),x())},className:"h-16 w-full resize-none rounded bg-white/[0.05] px-1.5 py-1 text-xs outline-none placeholder:text-muted-foreground/50 focus:bg-white/[0.08]"}),(0,s.jsxs)("div",{className:"mt-1 flex items-center justify-end gap-1",children:[(0,s.jsxs)("button",{type:"button",onClick:i,title:"Discard this comment (Esc)",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",children:[(0,s.jsx)(f.A,{className:"size-3"}),"Discard"]}),(0,s.jsxs)("button",{type:"button",onClick:x,disabled:!d.trim(),title:"Add this comment (Enter)",className:"flex items-center gap-1 rounded bg-sky-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-sky-300 transition-colors hover:bg-sky-500/25 disabled:opacity-40",children:[(0,s.jsx)(a.A,{className:"size-3"}),"Add"]})]})]})}function L({annotations:e,updateComment:t,removeAnnotation:n,focusOnAnnotation:r,onClose:a}){return 0===e.length?(0,s.jsx)("div",{className:"rounded-lg border border-dashed border-white/10 px-3 py-6 text-center text-[11px] text-muted-foreground",children:"Highlight any text in the plan to leave an inline comment."}):(0,s.jsx)("ul",{className:"space-y-1.5",children:e.map(e=>(0,s.jsx)("li",{className:(0,C.cn)("group rounded-md border bg-background/30 px-2 py-1.5 transition-colors hover:bg-background/50","deletion"===e.kind?"border-red-500/25":"border-sky-500/15"),children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>{r(e.id),a?.()},title:"Jump to this excerpt in the plan",className:(0,C.cn)("block w-full truncate text-left text-[10.5px] font-mono","deletion"===e.kind?"text-red-300/90 line-through":"text-foreground/80 hover:text-foreground"),children:["“",e.excerpt,"”"]}),"deletion"!==e.kind&&(0,s.jsx)("textarea",{value:e.comment,onChange:n=>t(e.id,n.target.value),placeholder:"Write your comment…",rows:1,className:"field-sizing-content mt-1 w-full resize-none bg-transparent text-[11px] leading-snug text-foreground/90 outline-none placeholder:text-muted-foreground/60 focus:text-foreground"})]}),(0,s.jsx)("button",{onClick:()=>n(e.id),title:"Remove this annotation",className:"shrink-0 rounded p-1 text-muted-foreground/70 opacity-0 transition-opacity hover:bg-red-500/15 hover:text-red-300 group-hover:opacity-100",children:(0,s.jsx)(g.A,{className:"size-3"})})]})},e.id))})}function F({markdown:e,annotations:t,focusOnId:n,onClearFocus:a,onUpdate:o,onRemove:l}){let i=(0,r.useMemo)(()=>(0,E.n$)(e),[e]);return(0,s.jsx)("div",{className:"mx-auto w-full max-w-[66ch] space-y-4",children:i.map((e,r)=>(0,s.jsx)($,{block:e,index:r,annotations:t,focusOnId:n,onClearFocus:a,onUpdate:o,onRemove:l},r))})}function $({block:e,index:t,annotations:n,focusOnId:r,onClearFocus:a,onUpdate:o,onRemove:l}){if("code"===e.kind)return(0,s.jsx)(E.NG,{text:e.text});if("table"===e.kind)return(0,s.jsx)(E.QH,{block:e});let i=(0,s.jsx)(H,{text:e.text,annotations:n,focusOnId:r,onClearFocus:a,onUpdate:o,onRemove:l}),d=(0,E.Vq)(e.kind)?(0,E.vB)(t):void 0;return(0,s.jsx)(s.Fragment,{children:(0,E.aM)(e,i,"reading",d)})}function H({text:e,annotations:t,focusOnId:n,onClearFocus:r,onUpdate:a,onRemove:o}){let l=(S?[]:t).map(t=>({a:t,idx:e.indexOf(t.excerpt)})).filter(e=>e.idx>=0).sort((e,t)=>e.idx-t.idx);if(!l.length)return(0,s.jsx)(U,{text:e});let i=[],d=0;for(let{a:t,idx:c}of l)c<d||(c>d&&i.push((0,s.jsx)(U,{text:e.slice(d,c)},`p-${d}`)),i.push((0,s.jsx)(B,{annotation:t,autoFocus:n===t.id,onClearFocus:r,onUpdate:a,onRemove:o},t.id)),d=c+t.excerpt.length);return d<e.length&&i.push((0,s.jsx)(U,{text:e.slice(d)},"p-tail")),(0,s.jsx)(s.Fragment,{children:i})}function B({annotation:e,autoFocus:t,onClearFocus:n,onUpdate:a,onRemove:o}){let l=(0,r.useRef)(null);return((0,r.useEffect)(()=>{if(t&&l.current){l.current.focus();let e=l.current.value;l.current.setSelectionRange(e.length,e.length),n()}},[t,n]),"deletion"===(e.kind??"comment"))?(0,s.jsxs)("span",{className:"relative inline",children:[(0,s.jsx)("span",{className:"rounded bg-red-500/15 px-0.5 text-red-200/90 line-through decoration-red-300/70 decoration-2",children:(0,s.jsx)(U,{text:e.excerpt})}),(0,s.jsx)("button",{type:"button",onClick:()=>o(e.id),title:"Unmark",className:"ml-0.5 inline-flex translate-y-[-1px] items-center text-red-300/70 hover:text-red-300",children:(0,s.jsx)(g.A,{className:"size-3"})})]}):(0,s.jsx)("span",{className:"rounded bg-[var(--accent-2,#ff7a45)]/15 px-0.5","data-annotation-id":e.id,children:(0,s.jsx)(U,{text:e.excerpt})})}function U({text:e}){return(0,s.jsx)(E.cV,{text:e})}var X=n(31966);let G=(0,d.A)("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]),K=(0,d.A)("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);var _=n(51276),q=n(44853),V=n(5937),W=n(74350),J=n(89793),Y=n(96719);function Q({planId:e,className:t,title:n="Share a read-only link to this plan"}){let[a,o]=(0,r.useState)(!1),{status:l,url:d,error:c,copied:u,mint:m,copy:h,reset:x}=(0,J.b)();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{type:"button",title:n,onClick:function(){x(),o(!0),m({kind:"plan",...e?{planId:e}:{}})},className:t??"glass flex size-8 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground",children:(0,s.jsx)(V.A,{className:"size-3.5"})}),(0,s.jsx)(W.lG,{open:a,onOpenChange:o,children:(0,s.jsxs)(W.Cf,{children:[(0,s.jsxs)(W.c7,{children:[(0,s.jsx)(W.L3,{children:"Share this plan"}),(0,s.jsx)(W.rr,{children:"Anyone with the link can view this plan and its boards — no Beacon needed. Links expire after 7 days."})]}),"loading"===l&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-[12px] text-muted-foreground",children:[(0,s.jsx)(i.A,{className:"size-4 animate-spin"})," Creating link…"]}),"done"===l&&(0,s.jsx)(Y.F,{url:d,copied:u,onCopy:h}),"error"===l&&(0,s.jsx)("p",{className:"text-[12px] text-red-400",children:c})]})})]})}var Z=n(66616),ee=n(36849);let et="beacon:plan-history-sidebar";function en({pendingPlan:e=!1,workspaceId:t}){let n=(0,v.useRouter)(),[i,d]=(0,r.useState)([]),[c,m]=(0,r.useState)(null),[h,x]=(0,r.useState)(null),[p,g]=(0,r.useState)("map"),[b,y]=(0,r.useState)(()=>{try{return"0"!==window.localStorage.getItem(et)}catch{return!0}}),j=(0,r.useCallback)(()=>{y(e=>{let t=!e;try{localStorage.setItem(et,t?"1":"0")}catch{}return t})},[]);(0,r.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/plan/history");if(!e.ok)return;let t=await e.json();d(t.items),t.items.length&&!c&&m(t.items[0].id)}catch{}})()},[]),(0,r.useEffect)(()=>{c&&(async()=>{let e=await fetch(`/api/plan/history?id=${encodeURIComponent(c)}`);e.ok&&x(await e.json())})()},[c]);let k=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let n of e){let e=new Date(n.archivedAt).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"});t.has(e)||t.set(e,[]),t.get(e).push(n)}return Array.from(t.entries())})(i),[i]),N=(0,r.useMemo)(()=>(function(e){let t=e?.features??[];if(0===t.length)return{nodes:[],edges:[]};let n=new Map;t.forEach((e,t)=>{let s=e.title.trim();n.has(s)||n.set(s,`arch-${t}`)});let s=(e,t)=>n.get(e.title.trim())??`arch-${t}`,r=t.map((e,t)=>({id:s(e,t),parentId:null,cluster:e.cluster??null,status:"PENDING",priority:e.priority??2,title:e.title,role:e.role??null})),a=(0,ee.VI)(r,"cluster"),o=t.map((e,t)=>{let n=s(e,t),r=a.get(n)??{x:0,y:0};return{id:n,view:"ROADMAP",kind:e.kind??"FEATURE",cluster:e.cluster??null,layer:e.layer??null,title:e.title,role:e.role??null,plain:e.plain??null,status:"PENDING",priority:e.priority??2,x:r.x,y:r.y,source:"DRAFT",sourceRef:null,parentId:null,isCriterion:!1,files:[],bugFlags:[]}}),l=[];return t.forEach((e,t)=>{let r=s(e,t);for(let t of e.dependsOn??[]){let e=n.get(t.trim());e&&e!==r&&l.push({id:`arch-edge-${r}-${e}`,fromId:r,toId:e,kind:"DEPENDS",label:"depends on",sourceHandle:null,targetHandle:null})}}),{nodes:o,edges:l}})(h?.featureGraph),[h]),A=N.nodes.length>0,S=(h?.draftDoc?.tables.length??0)>0||(h?.draftDoc?.endpoints.length??0)>0,z=A||S,R="map"!==p||A?"db"!==p||S?p:"map":"db",M=!!h&&""===h.markdown.replace(/^#[^\n]*\n?/,"").trim(),D=e?(0,s.jsxs)("button",{onClick:()=>n.push((0,w.rc)()),className:"glass pointer-events-auto mb-1 ml-3 mt-1 flex h-8 w-fit shrink-0 items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold text-sky-300 transition-colors hover:bg-sky-500/15",title:"Return to the plan that's still pending review",children:[(0,s.jsx)(X.A,{className:"size-3.5"})," Back to current plan"]}):null;return 0===i.length?(0,s.jsxs)("div",{className:"flex h-screen min-h-0 flex-col pt-14",children:[D,(0,s.jsx)("div",{className:"flex flex-1 items-center justify-center px-6 text-center",children:(0,s.jsxs)("div",{className:"max-w-md text-sm text-muted-foreground",children:[(0,s.jsx)(u,{className:"mx-auto mb-3 size-7 text-muted-foreground/40"}),(0,s.jsx)("div",{className:"mb-2 text-base font-semibold text-foreground",children:"No plans yet."}),"Ask the agent to propose a feature in your terminal session — it lands here via MCP and you can review + annotate on both sides. Past plans get archived to this page for browsing."]})})]}):(0,s.jsxs)("div",{className:"flex h-screen min-h-0 flex-col pt-14",children:[D,h&&(0,s.jsxs)("div",{className:"glass pointer-events-auto fixed right-3 top-3 z-30 flex h-9 items-center gap-2 rounded-full px-3",children:[(0,s.jsx)("span",{className:(0,C.cn)("rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide","approved"===h.verdict?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),children:h.verdict}),(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:new Date(h.archivedAt).toLocaleString()}),(0,s.jsx)("span",{"aria-hidden":!0,className:"h-4 w-px bg-white/10"}),(0,s.jsx)(Q,{planId:h.id,className:"flex size-6 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground"})]}),(0,s.jsxs)("div",{className:"flex min-h-0 flex-1",children:[b?(0,s.jsxs)("aside",{className:"flex w-64 min-w-0 shrink-0 flex-col border-r border-white/5 bg-card/30",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-white/5 px-3 py-2",children:[(0,s.jsxs)("span",{className:"text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Plan history \xb7 ",i.length]}),(0,s.jsx)("button",{onClick:j,title:"Collapse history",className:"flex size-5 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(G,{className:"size-3.5"})})]}),(0,s.jsx)("ul",{className:"min-h-0 flex-1 overflow-y-auto",children:k.map(([e,t])=>(0,s.jsxs)("li",{children:[(0,s.jsx)("div",{className:"px-3 pb-1 pt-3 text-[9px] font-semibold uppercase tracking-widest text-muted-foreground/60",children:e}),(0,s.jsx)("ul",{children:t.map(e=>(0,s.jsx)("li",{children:(0,s.jsxs)("button",{onClick:()=>m(e.id),className:(0,C.cn)("flex w-full items-start gap-1.5 px-3 py-1.5 text-left text-[12px] transition-colors",c===e.id?"bg-white/[0.06] text-foreground":"text-muted-foreground hover:bg-white/[0.03] hover:text-foreground"),children:[(0,s.jsx)("span",{className:(0,C.cn)("mt-0.5 inline-flex size-3.5 shrink-0 items-center justify-center rounded-full","approved"===e.verdict?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),title:e.verdict,children:"approved"===e.verdict?(0,s.jsx)(a.A,{className:"size-2.5"}):(0,s.jsx)(f.A,{className:"size-2.5"})}),(0,s.jsx)("span",{className:"line-clamp-2",children:e.description})]})},e.id))})]},e))})]}):(0,s.jsx)("aside",{className:"flex w-10 shrink-0 flex-col items-center border-r border-white/5 bg-card/30 py-2",children:(0,s.jsx)("button",{onClick:j,title:`Show plan history \xb7 ${i.length}`,className:"flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(K,{className:"size-4"})})}),h?(0,s.jsxs)("div",{className:"flex min-h-0 min-w-0 flex-1",children:[(0,s.jsx)("div",{className:(0,C.cn)("relative flex min-h-0 min-w-0 flex-col",!z&&"flex-1"),style:z?{width:"44%"}:void 0,children:(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-4",children:[(0,s.jsx)(E.pO,{markdown:h.markdown}),M&&(0,s.jsx)("p",{className:"mt-2 text-[13px] text-muted-foreground",children:(h.featureGraph?.features?.length??0)===0&&(h.draftDoc?.tables?.length??0)===0&&(h.draftDoc?.endpoints?.length??0)===0?"This plan was approved without a detailed write-up — no features or schema were attached either.":"This plan has no written body. See the Features and Schema canvases for what it proposed."}),h.globalComment&&(0,s.jsxs)("div",{className:"mt-4 rounded-lg border border-white/5 bg-card/40 p-3",children:[(0,s.jsx)("div",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Overall feedback"}),(0,s.jsx)("div",{className:"text-[12px] whitespace-pre-wrap",children:h.globalComment})]})]})}),z&&(0,s.jsxs)("div",{className:"relative flex min-h-0 min-w-0 flex-1 flex-col border-l border-white/5",children:[A&&S&&(0,s.jsx)("div",{className:"pointer-events-none absolute left-3 top-3 z-20",children:(0,s.jsxs)("div",{className:"glass pointer-events-auto flex items-center gap-1 rounded-full p-0.5",children:[(0,s.jsx)(Z.E,{active:"map"===R,onClick:()=>g("map"),icon:(0,s.jsx)(o.A,{className:"size-3"}),children:"Features"}),(0,s.jsx)(Z.E,{active:"db"===R,onClick:()=>g("db"),icon:(0,s.jsx)(l.A,{className:"size-3"}),children:"Schema"})]})}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:"map"===R?(0,s.jsx)(_.MapClient,{view:"ROADMAP",nodes:N.nodes,edges:N.edges,embedded:!0,readOnly:!0}):(0,s.jsx)(q.DbMapClient,{tables:[],relations:[],endpoints:[],draft:h.draftDoc??null,workspaceId:t,embedded:!0,readOnly:!0})})]})]}):(0,s.jsx)("section",{className:"flex min-h-0 min-w-0 flex-1 items-center justify-center text-sm text-muted-foreground",children:"Select a plan on the left to view it."})]})]})}function es({markdown:e}){let t=(0,r.useMemo)(()=>(0,E.n$)(e).map((e,t)=>({b:e,i:t})).filter(({b:e})=>(0,E.Vq)(e.kind)).map(({b:e,i:t})=>({id:(0,E.vB)(t),level:(0,E.F8)(e.kind),label:(0,E.kz)(e.text)})).filter(e=>e.label.length>0),[e]),[n,a]=(0,r.useState)(null);return(0,r.useEffect)(()=>{if("u"<typeof IntersectionObserver||0===t.length)return;let e=t.map(e=>document.getElementById(e.id)).filter(e=>null!==e);if(0===e.length)return;let n=new IntersectionObserver(e=>{let t=e.filter(e=>e.isIntersecting).sort((e,t)=>e.boundingClientRect.top-t.boundingClientRect.top);t[0]&&a(t[0].target.id)},{rootMargin:"-12% 0px -70% 0px",threshold:0});return e.forEach(e=>n.observe(e)),()=>n.disconnect()},[t]),(0,s.jsxs)("aside",{className:"flex w-60 shrink-0 flex-col overflow-y-auto border-r border-white/5 bg-background pt-16",children:[(0,s.jsx)("div",{className:"px-4 pb-2 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Sections"}),0===t.length?(0,s.jsx)("p",{className:"px-4 text-[12px] text-muted-foreground/70",children:"No headings in this plan."}):(0,s.jsx)("nav",{className:"space-y-0.5 px-2 pb-6",children:t.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;let n;return t=e.id,void((n=document.getElementById(t))&&(n.scrollIntoView({behavior:"smooth",block:"start"}),a(t)))},title:e.label,style:{paddingLeft:`${.5+.75*e.level}rem`},className:(0,C.cn)("block w-full truncate rounded py-1 pr-2 text-left text-[12px] leading-snug transition-colors",n===e.id?"bg-white/10 font-medium text-foreground":"text-muted-foreground hover:bg-white/[0.05] hover:text-foreground"),children:e.label},e.id))})]})}var er=n(50981),ea=n(4474),eo=n(97358);function el({open:e,onOpenChange:t,onConfirmed:n}){let[o,l]=(0,r.useState)("bypassPermissions"),[i,d]=(0,r.useState)(!1);async function c(){d(!0);try{await fetch("/api/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({planApprovalMode:o})}).catch(()=>{}),t(!1),n()}finally{d(!1)}}return(0,s.jsx)(W.lG,{open:e,onOpenChange:t,children:(0,s.jsxs)(W.Cf,{className:"max-w-lg",children:[(0,s.jsxs)(W.c7,{children:[(0,s.jsxs)(W.L3,{className:"flex items-center gap-2",children:[(0,s.jsx)(er.A,{className:"size-4 text-emerald-400"}),"After approving, the agent should…"]}),(0,s.jsx)(W.rr,{children:"Pick the permission mode your terminal session enters when you approve a plan. We ask once and remember it for every project — change it anytime in Settings."})]}),(0,s.jsx)("div",{className:"space-y-2 py-1",children:eo.pC.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>l(e.value),className:(0,C.cn)("flex w-full items-start gap-3 rounded-lg border p-3 text-left transition-colors",o===e.value?"border-emerald-500/50 bg-emerald-500/10":"border-white/10 bg-white/[0.03] hover:bg-white/[0.06]"),children:[(0,s.jsx)("span",{className:(0,C.cn)("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border",o===e.value?"border-emerald-400 bg-emerald-400/20":"border-white/30"),children:o===e.value&&(0,s.jsx)(a.A,{className:"size-3 text-emerald-300"})}),(0,s.jsxs)("span",{className:"min-w-0",children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-foreground",children:e.label}),(0,s.jsx)("span",{className:"block text-xs text-muted-foreground",children:e.description})]})]},e.value))}),(0,s.jsxs)(W.Es,{className:"items-center justify-between gap-2 sm:justify-between",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"You can change this later in Settings."}),(0,s.jsx)(ea.$,{onClick:c,disabled:i,size:"sm",children:i?"Saving…":"Save & approve"})]})]})})}function ei({dbProps:e,mapProps:t,planMarkdown:n,repoFiles:d=[],forceHistory:k=!1}){let N=(0,v.useRouter)(),{status:A,discard:S}=(0,y.j)(),z=t.nodes.length>0,R=e.tables.length>0||e.endpoints.length>0||(e.draft?.tables.length??0)>0||(e.draft?.endpoints.length??0)>0,[M,D]=(0,r.useState)(z?"map":"db"),O="map"!==M||z?"db"!==M||R?M:"map":"db",[P,I]=(0,r.useState)(!1),[F,$]=(0,r.useState)(!1),[H,B]=(0,r.useState)(null),U=(0,r.useRef)(!1),X=(0,r.useCallback)(async()=>{await fetch("/api/plan/approve",{method:"POST",headers:(0,j.dh)((0,w.X0)())}).catch(()=>{}),B({features:A.features,tables:A.tables,endpoints:A.endpoints})},[A.features,A.tables,A.endpoints]);(0,r.useEffect)(()=>{if(!H)return;U.current=!1;let e=H.features>0?"/map?view=ROADMAP":H.tables>0||H.endpoints>0?"/map?view=DATABASE":"/map?view=ROADMAP",t=setTimeout(()=>{U.current||(U.current=!0,N.push(e))},3e3);return()=>clearTimeout(t)},[H,N]);let G=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/preferences",{cache:"no-store"});if((await e.json()).planApprovalModeConfigured)return void X()}catch{X();return}$(!0)},[X]),[K,V]=(0,r.useState)(null),W=(0,r.useCallback)(e=>V(e),[]),J=(0,r.useRef)(null),Y=(0,r.useRef)(null),ee=(0,r.useRef)(e.draft),[et,er]=(0,r.useState)(!1),ea=(0,r.useCallback)(()=>er(!0),[]),[eo,ec]=(0,r.useState)([]),[eu,em]=(0,r.useState)(!1),[eh,ex]=(0,r.useState)(""),ep=(0,r.useCallback)(e=>{ex(e),em(!0)},[]),ef=(0,r.useRef)(eo);(0,r.useEffect)(()=>{ef.current=eo},[eo]),(0,r.useEffect)(()=>{ec([]),em(!1),er(!1)},[A.proposedAt]),(0,r.useEffect)(()=>{let e=()=>void fetch("/api/plan/presence",{method:"POST",cache:"no-store",headers:(0,j.dh)((0,w.X0)())}).catch(()=>{});e();let t=setInterval(e,5e3);return()=>clearInterval(t)},[]);let eg=(0,r.useCallback)(()=>({draft:ee.current,questions:ef.current}),[]),eb=(0,r.useMemo)(()=>{let n=[];for(let e of t.nodes)n.push(`feature: ${e.title}`);for(let t of e.draft?.tables??[])n.push(`table: ${t.name}`);for(let t of e.tables)n.push(`table: ${t.name}`);for(let t of e.draft?.endpoints??[])n.push(`endpoint: ${t.method} ${t.path}`);for(let t of e.endpoints)n.push(`endpoint: ${t.method} ${t.path}`);return Array.from(new Set(n))},[t.nodes,e]),ev=K?(0,s.jsx)(L,{annotations:K.annotations,updateComment:K.updateComment,removeAnnotation:K.removeAnnotation,focusOnAnnotation:K.focusOnAnnotation,onClose:()=>J.current?.close()}):null,ey=(0,r.useCallback)(()=>{J.current?.open()},[]),ej=(0,r.useCallback)(e=>{K?.addComment(e)},[K]),ew=(0,r.useCallback)(e=>{K?.focusOnAnnotation(e),"db"===O?Y.current?.openComments():J.current?.openComments()},[K,O]),[ek,eN]=(0,r.useState)(()=>{try{let e=window.localStorage.getItem("beacon:plan-left-pct");return e?Math.max(20,Math.min(80,Number(e))):50}catch{return 50}}),eC=(0,r.useRef)(null),eA=(0,r.useRef)(!1),eE=(0,r.useCallback)(e=>{e.preventDefault(),eA.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[]);(0,r.useEffect)(()=>{let e=e=>{if(!eA.current||!eC.current)return;let t=eC.current.getBoundingClientRect();eN(Math.max(20,Math.min(80,(e.clientX-t.left)/t.width*100)))},t=()=>{if(eA.current){eA.current=!1,document.body.style.cursor="",document.body.style.userSelect="";try{localStorage.setItem("beacon:plan-left-pct",String(ek))}catch{}}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t)}},[ek]);let eS=async()=>{await fetch("/api/plan/annotations",{method:"DELETE",headers:(0,j.dh)((0,w.X0)())}).catch(()=>{}),await S(),N.refresh()};if((!A.pending||k)&&!H)return(0,s.jsx)(E.Ue,{files:d,children:(0,s.jsx)(en,{pendingPlan:A.pending,workspaceId:e.workspaceId})});let ez=z||R,eR=ez&&!P,eM=!ez||P,eD=((K?.liveCount??0)>0||et||eo.length>0)&&!K?.submitted;return(0,s.jsxs)("div",{className:"relative flex h-screen flex-col",children:[H&&(0,s.jsxs)("div",{className:"absolute inset-0 z-50 flex flex-col items-center justify-center gap-5 bg-background/97 px-6 text-center backdrop-blur-sm",children:[(0,s.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-emerald-500/15",children:(0,s.jsx)(a.A,{className:"size-6 text-emerald-300"})}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Plan approved"}),(0,s.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:H.features>0||H.tables>0||H.endpoints>0?"It's committed. Here's where to find it:":"It's archived to your plan history."}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground/70",children:"Taking you to the map in 3 seconds…"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[H.features>0&&(0,s.jsxs)("button",{onClick:()=>{U.current=!0,N.push("/map?view=ROADMAP")},className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,s.jsx)(o.A,{className:"size-4 text-sky-300"})," ",H.features," feature",1===H.features?"":"s"," → Map"]}),(H.tables>0||H.endpoints>0)&&(0,s.jsxs)("button",{onClick:()=>{U.current=!0,N.push("/map?view=DATABASE")},className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,s.jsx)(l.A,{className:"size-4 text-violet-300"})," ",H.tables," table",1===H.tables?"":"s"," \xb7 ",H.endpoints," endpoint",1===H.endpoints?"":"s"," → Database"]})]}),(0,s.jsx)("button",{onClick:()=>{U.current=!0,B(null),N.push((0,w.rc)({view:"history"}))},className:"rounded-full border border-white/12 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Done — browse plan history"})]}),K?.submitted&&(0,s.jsxs)("div",{className:"absolute inset-0 z-40 flex flex-col items-center justify-center gap-4 bg-background/95 px-6 text-center backdrop-blur-sm",children:[(0,s.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-sky-500/15",children:(0,s.jsx)(i.A,{className:"size-6 animate-spin text-sky-300"})}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Feedback sent"}),(0,s.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:"Your terminal session is revising the plan based on your comments. The updated plan will appear here automatically — no need to refresh."})]}),(0,s.jsx)("button",{onClick:()=>N.push((0,w.rc)({view:"history"})),className:"rounded-full border border-white/12 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Browse past plans"})]}),(0,s.jsxs)("div",{className:"pointer-events-none fixed right-3 top-3 z-30 flex items-center gap-2",children:[ez&&P&&(0,s.jsx)("button",{onClick:()=>I(!1),title:"Collapse — show the board again",className:"glass pointer-events-auto flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(c,{className:"size-3.5"})}),(0,s.jsxs)("div",{className:"glass pointer-events-auto flex h-10 items-center gap-0.5 rounded-full px-1",children:[(0,s.jsx)("button",{onClick:()=>N.push((0,w.rc)({view:"history"})),title:"Browse past plans (you can come back to this one)",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(u,{className:"size-3.5"})}),(0,s.jsx)(Q,{className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground"}),(0,s.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,s.jsxs)("button",{onClick:ey,disabled:!K,title:K?.annotationCount?`Open the side panel \xb7 ${K.annotationCount} comment${1===K.annotationCount?"":"s"} so far`:"Open the side panel (details + comments)",className:"relative flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:[(0,s.jsx)(m.A,{className:"size-3.5"}),K&&(K.annotationCount??0)>0&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-sky-500 px-1 text-[9px] font-semibold text-white",children:K.annotationCount})]}),(0,s.jsxs)("button",{"data-overall-toggle":!0,onClick:()=>K?.toggleOverall?.(),disabled:!K?.toggleOverall,title:K?.hasGlobalComment?"Edit your overall feedback":"Add overall plan-level feedback",className:(0,C.cn)("relative flex size-8 shrink-0 items-center justify-center rounded-full transition-colors",K?.globalOpen?"bg-white/10 text-foreground":K?.hasGlobalComment?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground hover:bg-white/[0.06] hover:text-foreground"),children:[(0,s.jsx)(h.A,{className:"size-3.5"}),K?.hasGlobalComment&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 size-2 rounded-full bg-sky-400"})]}),(0,s.jsxs)("button",{onClick:()=>em(e=>!e),title:"Ask the agent a question about a node (answered in its next round)",className:(0,C.cn)("relative flex size-8 shrink-0 items-center justify-center rounded-full transition-colors",eu?"bg-white/10 text-foreground":eo.length?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground hover:bg-white/[0.06] hover:text-foreground"),children:[(0,s.jsx)(x.A,{className:"size-3.5"}),eo.length>0&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-sky-500 px-1 text-[9px] font-semibold text-white",children:eo.length})]}),(0,s.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,s.jsxs)("button",{onClick:()=>K?.submit(),disabled:!K||K.submitting||0===K.liveCount&&!et&&0===eo.length,title:K&&(0!==K.liveCount||et||0!==eo.length)?K.submitted?"Submitted — your terminal session is reading the feedback":"Submit feedback (comments + canvas edits) so the agent can revise the plan":"Highlight text or edit the canvas, then submit",className:(0,C.cn)("flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-semibold transition-colors",K?.submitted?"text-sky-300":K&&(0!==K.liveCount||et||0!==eo.length)?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground opacity-50"),children:[K?.submitted?(0,s.jsx)(a.A,{className:"size-3"}):(0,s.jsx)(p.A,{className:"size-3"}),K?.submitted?"Submitted":"Feedback"]}),eD&&(0,s.jsxs)("button",{onClick:()=>{K?.clearAll?.(),er(!1),ec([])},title:"Discard your unsubmitted comments / canvas edits so you can approve the plan as-is",className:"flex shrink-0 items-center gap-1 rounded-full px-2 py-1 text-[11px] font-medium text-amber-300/90 transition-colors hover:bg-amber-500/15",children:[(0,s.jsx)(f.A,{className:"size-3"})," Clear to approve"]}),(0,s.jsxs)("button",{onClick:()=>void G(),disabled:eD,title:eD?"You have unsubmitted feedback — submit it, or click ‘Clear to approve’ to drop it":"Approve the plan",className:(0,C.cn)("flex shrink-0 items-center gap-1 rounded-full border border-emerald-500/40 bg-emerald-500/15 px-2.5 py-1 text-[11px] font-semibold text-emerald-300 transition-colors hover:bg-emerald-500/25",eD&&"opacity-40 hover:bg-emerald-500/15"),children:[(0,s.jsx)(a.A,{className:"size-3"})," Approve"]}),(0,s.jsxs)("button",{onClick:eS,className:"flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",title:"Discard the plan",children:[(0,s.jsx)(g.A,{className:"size-3"})," Discard"]}),(0,s.jsx)(el,{open:F,onOpenChange:$,onConfirmed:()=>void X()})]})]}),eu&&(0,s.jsxs)("div",{className:"fixed right-3 top-16 z-30 w-80 rounded-xl border border-white/10 bg-card p-3 shadow-xl",children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Ask the agent"}),(0,s.jsx)("button",{onClick:()=>em(!1),title:"Close",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,s.jsx)(f.A,{className:"size-3.5"})})]}),(0,s.jsx)(ed,{targets:eb,initialTarget:eh,onAdd:e=>ec(t=>[...t,e])}),eo.length>0&&(0,s.jsx)("ul",{className:"mt-2 space-y-1",children:eo.map((e,t)=>(0,s.jsxs)("li",{className:"group flex items-start justify-between gap-2 rounded-md border border-white/5 bg-background/40 px-2 py-1",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"truncate font-mono text-[10px] text-sky-300/90",children:e.target}),(0,s.jsx)("div",{className:"text-[11px] text-foreground/90",children:e.question})]}),(0,s.jsx)("button",{onClick:()=>ec(e=>e.filter((e,n)=>n!==t)),title:"Remove",className:"shrink-0 rounded p-0.5 text-muted-foreground/70 opacity-0 transition-opacity hover:text-red-300 group-hover:opacity-100",children:(0,s.jsx)(f.A,{className:"size-3"})})]},t))}),(0,s.jsx)("p",{className:"mt-2 text-[10px] text-muted-foreground",children:"Questions are sent with your feedback on Submit — the agent answers them in its next round."})]}),(0,s.jsxs)("div",{ref:eC,className:"flex min-h-0 flex-1",children:[eM&&(0,s.jsx)(es,{markdown:n}),(0,s.jsxs)("div",{className:(0,C.cn)("relative flex min-w-0 flex-col",!eR&&"flex-1"),style:eR?{width:`${ek}%`}:void 0,children:[eR&&(0,s.jsx)("div",{className:"pointer-events-none absolute right-3 top-3 z-20",children:(0,s.jsx)("button",{onClick:()=>I(!0),title:"Expand the plan to full width",className:"glass pointer-events-auto flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(b.A,{className:"size-3.5"})})}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:(0,s.jsx)(E.Ue,{files:d,children:(0,s.jsx)(T,{markdown:n,round:A.proposedAt,onApi:W,hideSubmit:!0,getExtraSubmitPayload:eg})})})]}),eR&&(0,s.jsx)("div",{onPointerDown:eE,className:"group relative w-px shrink-0 cursor-col-resize bg-white/5 hover:bg-white/15",title:"Drag to resize",children:(0,s.jsx)("div",{className:"absolute inset-y-0 -left-1.5 right-[-6px] z-10"})}),eR&&(0,s.jsxs)("div",{className:"relative flex min-w-0 flex-col",style:{width:`${100-ek}%`},children:[z&&R&&(0,s.jsx)("div",{className:"pointer-events-none absolute left-3 top-3 z-20",children:(0,s.jsxs)("div",{className:"glass pointer-events-auto flex items-center gap-1 rounded-full p-0.5",children:[(0,s.jsx)(Z.E,{active:"map"===O,onClick:()=>D("map"),icon:(0,s.jsx)(o.A,{className:"size-3"}),children:"Map"}),(0,s.jsx)(Z.E,{active:"db"===O,onClick:()=>D("db"),icon:(0,s.jsx)(l.A,{className:"size-3"}),children:"Database"})]})}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:"map"===O?(0,s.jsx)(_.MapClient,{view:t.view,nodes:t.nodes,edges:t.edges,hasFrontend:t.hasFrontend,embedded:!0,commentsContent:ev,commentsCount:K?.annotationCount??0,controlRef:J,onAskAgent:ep,onAddComment:ej,annotations:K?.annotations,onPinClick:ew,onUpdateComment:K?.updateComment,onRemoveComment:K?.removeAnnotation}):(0,s.jsx)(q.DbMapClient,{tables:e.tables,relations:e.relations,endpoints:e.endpoints,draft:e.draft,workspaceId:e.workspaceId,diffBase:e.diffBase,embedded:!0,draftRef:ee,onEdit:ea,controlRef:Y,commentsContent:ev,commentsCount:K?.annotationCount??0,onAddComment:ej,annotations:K?.annotations,onPinClick:ew,onUpdateComment:K?.updateComment,onRemoveComment:K?.removeAnnotation})})]})]})]})}function ed({targets:e,onAdd:t,initialTarget:n}){let[a,o]=(0,r.useState)(n||e[0]||""),[l,i]=(0,r.useState)("");(0,r.useEffect)(()=>{n&&o(n)},[n]),(0,r.useEffect)(()=>{!a&&e[0]&&o(e[0])},[e,a]);let d=()=>{let e=l.trim();e&&(t({target:a||"(plan)",question:e}),i(""))};return(0,s.jsxs)("div",{className:"space-y-1.5",children:[e.length>0&&(0,s.jsx)("select",{value:a,onChange:e=>o(e.target.value),className:"w-full rounded border border-white/10 bg-background px-2 py-1 text-[11px] outline-none focus:border-sky-400/40",children:e.map(e=>(0,s.jsx)("option",{value:e,className:"bg-card",children:e},e))}),(0,s.jsx)("textarea",{value:l,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d())},rows:2,placeholder:"e.g. why a new table instead of reusing users? (⌘/Ctrl+Enter to add)",className:"w-full resize-y rounded border border-white/10 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-sky-400/40"}),(0,s.jsx)("button",{onClick:d,disabled:!l.trim(),className:(0,C.cn)("w-full rounded-md px-2 py-1 text-[11px] font-semibold transition-colors",l.trim()?"bg-sky-500/15 text-sky-300 hover:bg-sky-500/25":"text-muted-foreground opacity-50"),children:"Add question"})]})}},25494:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]])},31966:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},38332:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]])},48484:(e,t,n)=>{"use strict";n.d(t,{PlanProvider:()=>c,j:()=>u});var s=n(95155),r=n(12115),a=n(73321),o=n(60292),l=n(99979);let i={pending:!1,proposedAt:0,tables:0,endpoints:0,features:0},d=(0,r.createContext)(null);function c({children:e}){let t=(0,a.useRouter)(),[n,u]=(0,r.useState)(i),m=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/plan",{method:"GET",cache:"no-store",headers:(0,o.dh)((0,l.X0)())});if(!e.ok)return;let t=await e.json();u(t)}catch{}},[]);(0,r.useEffect)(()=>{m();let e=setInterval(()=>void m(),4e3);return()=>clearInterval(e)},[m]);let h=(0,r.useCallback)(async()=>{await fetch("/api/plan",{method:"DELETE",headers:(0,o.dh)((0,l.X0)())}).catch(()=>{}),u(i),t.refresh()},[t]),x=(0,r.useCallback)(async()=>{await fetch("/api/plan/approve",{method:"POST",headers:(0,o.dh)((0,l.X0)())}).catch(()=>{}),u(i),t.refresh()},[t]);return(0,s.jsx)(d.Provider,{value:{status:n,discard:h,approvePlan:x,refresh:m},children:e})}function u(){let e=(0,r.useContext)(d);if(!e)throw Error("usePlan must be used inside PlanProvider");return e}},60976:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("redo-2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]])},97358:(e,t,n)=>{"use strict";n.d(t,{pC:()=>s});let s=[{value:"default",label:"Manual approval",description:"Approve each tool call yourself — Claude Code's default."},{value:"acceptEdits",label:"Auto-accept edits",description:"Auto-approve file edits; still ask before running other tools."},{value:"bypassPermissions",label:"Bypass permissions",description:"Auto-approve every tool call (like --dangerously-skip-permissions)."},{value:"auto",label:"Auto",description:"Autonomous, gated by a safety classifier (needs a recent Claude Code + Sonnet 4.6+)."}]},99979:(e,t,n)=>{"use strict";function s(){return new URLSearchParams(window.location.search).get("ws")}function r(e){let t=new URLSearchParams,n=s();for(let[s,r]of(n&&t.set("ws",n),Object.entries(e??{})))t.set(s,r);let r=t.toString();return r?`/plan?${r}`:"/plan"}n.d(t,{X0:()=>s,rc:()=>r})}},e=>{e.O(0,[2574,3862,5004,277,8500,4888,8997,9887,5957,766,2059,2231,1276,4853,1909,8441,3794,7358],()=>e(e.s=22137)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6624],{9383:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},15330:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]])},22137:(e,t,n)=>{Promise.resolve().then(n.bind(n,24006))},24006:(e,t,n)=>{"use strict";n.d(t,{PlanWorkspace:()=>ei});var s=n(95155),r=n(12115),a=n(64577),o=n(25640),l=n(34306),i=n(92571),d=n(30772);let c=(0,d.A)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]),u=(0,d.A)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);var m=n(45486),h=n(25494),x=n(17356),p=n(9383),f=n(9005),g=n(65738),b=n(8962),v=n(73321),y=n(48484),j=n(60292),w=n(99979),k=n(32133),N=n(38332),C=n(91337);function A(e,t,n,s,r,a,o=8){return{left:Math.max(o,Math.min(e,r-n-o)),top:Math.max(o,Math.min(t,a-s-o))}}var E=n(51909);let S="u">typeof CSS&&"highlights"in CSS&&"u">typeof Highlight,z="beacon-pending",R="beacon-annotation",M="beacon-deletion";function D(){return S?CSS.highlights:null}function O(...e){return new globalThis.Highlight(...e)}function P(e){let t=e.getClientRects(),n=t.length?t[t.length-1]:e.getBoundingClientRect();return{x:n.right,y:n.bottom}}function T({markdown:e,round:t,onApi:n,hideSubmit:o=!1,getExtraSubmitPayload:l}){let[i,d]=(0,r.useState)([]),[c,u]=(0,r.useState)(""),[m,h]=(0,r.useState)(!1),[x,g]=(0,r.useState)(null),[b,v]=(0,r.useState)(null),[y,E]=(0,r.useState)(null),[L,$]=(0,r.useState)(!1),[H,B]=(0,r.useState)(!1),U=(0,r.useRef)(null),X=(0,r.useRef)(null),G=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=!0;return(async()=>{try{let t=await fetch("/api/plan/annotations",{cache:"no-store",headers:(0,j.dh)((0,w.X0)())});if(!t.ok)return;let n=await t.json();if(!e)return;d(n.annotations??[]),u(n.globalComment??""),B(!!n.submitted)}catch{}})(),()=>{e=!1}},[e,t]),(0,r.useEffect)(()=>{if(H)return;let e=setTimeout(()=>{fetch("/api/plan/annotations",{method:"PUT",headers:{"content-type":"application/json",...(0,j.dh)((0,w.X0)())},body:JSON.stringify({annotations:i,globalComment:c,round:t})}).catch(()=>{})},400);return()=>clearTimeout(e)},[i,c,H,t]);let K=(0,r.useCallback)(()=>{let e=window.getSelection();if(!e||e.isCollapsed)return void g(null);let t=e.toString().trim();if(!t)return void g(null);if(!U.current?.contains(e.anchorNode))return;let{x:n,y:s}=P(e.getRangeAt(0));g({x:n,y:s,excerpt:t})},[]);(0,r.useEffect)(()=>{let e=()=>setTimeout(K,0);return document.addEventListener("mouseup",e),document.addEventListener("selectionchange",e),()=>{document.removeEventListener("mouseup",e),document.removeEventListener("selectionchange",e)}},[K]);let _=(0,r.useCallback)((e,t="comment",n="")=>{let s=`a-${Date.now()}-${Math.floor(1e6*Math.random())}`;d(r=>[...r,{id:s,excerpt:e,comment:n,kind:t}]),"comment"===t&&E(s),g(null),window.getSelection()?.removeAllRanges()},[]);(0,r.useEffect)(()=>{let e=e=>{let t=window.getSelection();if(!t||t.isCollapsed)return;let n=t.toString().trim();if(!n||!U.current?.contains(t.anchorNode))return;let s=document.activeElement;if(s&&/^(TEXTAREA|INPUT)$/.test(s.tagName)||!(1===e.key.length&&!e.metaKey&&!e.ctrlKey&&!e.altKey))return;e.preventDefault();let r=t.getRangeAt(0);G.current=r.cloneRange();let{x:a,y:o}=P(r);v({x:a,y:o,excerpt:n,seed:e.key}),g(null),window.getSelection()?.removeAllRanges()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]),(0,r.useEffect)(()=>{let e=D();if(!b||!e)return;let t=G.current;if(t)return e.set(z,O(t)),()=>{e.delete(z)}},[b]),(0,r.useEffect)(()=>{let e=D();if(!e||!U.current)return;let t=[],n=[];for(let e of i){let s=function(e,t){if(!t)return null;let n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:e=>e.parentElement?.closest("pre, table")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),s=[],r="";for(let e=n.nextNode();e;e=n.nextNode())s.push({node:e,start:r.length}),r+=e.nodeValue??"";let a=r.indexOf(t);if(a<0)return null;let o=e=>{for(let t=s.length-1;t>=0;t--)if(s[t].start<=e)return{node:s[t].node,offset:e-s[t].start};return null},l=o(a),i=o(a+t.length);if(!l||!i)return null;let d=document.createRange();return d.setStart(l.node,l.offset),d.setEnd(i.node,i.offset),d}(U.current,e.excerpt);s&&((e.kind??"comment")==="deletion"?n:t).push(s)}let s=(t,n)=>n.length?e.set(t,O(...n)):e.delete(t);return s(R,t),s(M,n),()=>{e.delete(R),e.delete(M)}},[i,e]),(0,r.useEffect)(()=>{if(!m)return;let e=e=>{let t=e.target;!t||X.current?.contains(t)||t.closest("[data-overall-toggle]")||h(!1)},t=e=>{"Escape"===e.key&&h(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[m]);let q=(e,t)=>d(n=>n.map(n=>n.id===e?{...n,comment:t}:n)),V=e=>d(t=>t.filter(t=>t.id!==e)),W=()=>{d([]),u(""),h(!1),fetch("/api/plan/annotations",{method:"DELETE",headers:(0,j.dh)((0,w.X0)())}).catch(()=>{})},J=async()=>{if(!L){$(!0);try{let e=l?.()??{},n=await fetch("/api/plan/annotations",{method:"POST",headers:{"content-type":"application/json",...(0,j.dh)((0,w.X0)())},body:JSON.stringify({annotations:i,globalComment:c,round:t,...e})});n.ok?B(!0):409===n.status&&window.location.reload()}finally{$(!1)}}},Y=(0,r.useMemo)(()=>i.filter(e=>"deletion"===e.kind||e.comment.trim()).length+ +!!c.trim(),[i,c]);return(0,r.useEffect)(()=>{n?.({liveCount:Y,submitting:L,submitted:H,submit:()=>void J(),clearAll:W,annotationCount:i.length,hasGlobalComment:!!c.trim(),globalOpen:m,toggleOverall:()=>h(e=>!e),annotations:i,updateComment:q,removeAnnotation:V,focusOnAnnotation:e=>E(e),addComment:e=>_(e,"comment")})},[Y,L,H,i,c,m]),(0,s.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,s.jsx)("div",{className:"relative shrink-0",children:(0,s.jsxs)("div",{className:"absolute right-3 top-2 z-30 flex items-center gap-1",children:[!o&&(0,s.jsxs)("button",{onClick:()=>void J(),disabled:L||0===Y,className:(0,C.cn)("flex items-center gap-1 rounded-md border px-2 py-1 text-[11px] font-semibold transition-colors",H?"border-emerald-500/40 bg-emerald-500/15 text-emerald-300":0===Y?"border-white/10 text-muted-foreground opacity-50":"border-sky-500/40 bg-sky-500/15 text-sky-300 hover:bg-sky-500/25"),title:H?"Submitted — your terminal session is reading the feedback":"Submit all feedback so the agent can revise the plan",children:[H?(0,s.jsx)(a.A,{className:"size-3"}):(0,s.jsx)(p.A,{className:"size-3"}),H?"Submitted":"Submit feedback"]}),m&&(0,s.jsxs)("div",{ref:X,className:"absolute right-0 top-[calc(100%+6px)] z-50 w-[320px] rounded-md border border-white/10 bg-card p-2 shadow-xl",children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Overall feedback"}),(0,s.jsx)("button",{onClick:()=>h(!1),title:"Close (Esc)",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,s.jsx)(f.A,{className:"size-3"})})]}),(0,s.jsx)("textarea",{autoFocus:!0,value:c,onChange:e=>u(e.target.value),onKeyDown:e=>{e.stopPropagation(),"Enter"===e.key&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),!L&&Y>0&&(J(),h(!1))):"Escape"===e.key&&(e.preventDefault(),h(!1))},placeholder:"Plan-level notes — e.g. 'split this into two phases' or 'wrong abstraction'…",rows:4,className:"w-full resize-y rounded border border-white/5 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-sky-400/40"}),(0,s.jsx)("div",{className:"mt-1 text-right text-[9px] text-muted-foreground/70",children:"⌘/Ctrl+Enter to submit \xb7 Esc to close"})]})]})}),(0,s.jsx)("div",{ref:U,className:"min-h-0 flex-1 overflow-y-auto px-5 pb-5 pt-16 text-[15px] leading-[1.6] selection:bg-[var(--accent-2,#ff7a45)]/30",children:(0,s.jsx)(F,{markdown:e,annotations:b&&!S?[...i,{id:"__pending",excerpt:b.excerpt,comment:"",kind:"comment"}]:i,focusOnId:y,onClearFocus:()=>E(null),onUpdate:q,onRemove:V})}),x&&(0,s.jsxs)("div",{style:function(e,t){let{left:n,top:s}=A(e,t,76,34,window.innerWidth,window.innerHeight);return{position:"fixed",left:n,top:s,zIndex:60}}(x.x+4,x.y+6),className:"flex items-center gap-0.5 rounded-md border border-white/15 bg-card/95 p-0.5 shadow-lg backdrop-blur",children:[(0,s.jsx)("button",{onClick:()=>{let e=window.getSelection();G.current=e&&e.rangeCount?e.getRangeAt(0).cloneRange():null,v({...x,seed:""}),g(null),e?.removeAllRanges()},title:"Comment on this text",className:"rounded p-1 text-sky-300 hover:bg-sky-500/15",children:(0,s.jsx)(k.A,{className:"size-3.5"})}),(0,s.jsx)("button",{onClick:()=>_(x.excerpt,"deletion"),title:"Mark this for deletion",className:"rounded p-1 text-red-300 hover:bg-red-500/15",children:(0,s.jsx)(N.A,{className:"size-3.5"})})]}),b&&(0,s.jsx)(I,{excerpt:b.excerpt,x:b.x,y:b.y,seed:b.seed,onConfirm:e=>{_(b.excerpt,"comment",e),v(null)},onCancel:()=>v(null)})]})}function I({excerpt:e,x:t,y:n,seed:o,onConfirm:l,onCancel:i}){let[d,c]=(0,r.useState)(o),u=(0,r.useRef)(null),[m,h]=(0,r.useState)(()=>A(t+4,n+6,256,130,window.innerWidth,window.innerHeight));(0,r.useLayoutEffect)(()=>{let e=u.current;if(!e)return;let{width:s,height:r}=e.getBoundingClientRect();h(A(t+4,n+6,s,r,window.innerWidth,window.innerHeight))},[t,n]);let x=()=>d.trim()?l(d.trim()):i();return(0,s.jsxs)("div",{ref:u,style:{position:"fixed",left:m.left,top:m.top,zIndex:60},className:"w-64 rounded-md border border-white/15 bg-card/95 p-1.5 shadow-xl backdrop-blur",onBlur:e=>{u.current?.contains(e.relatedTarget)||x()},children:[(0,s.jsxs)("div",{className:"mb-1 line-clamp-1 text-[10px] text-muted-foreground",children:["“",e,"”"]}),(0,s.jsx)("textarea",{autoFocus:!0,value:d,onChange:e=>c(e.target.value),onFocus:e=>e.currentTarget.setSelectionRange(d.length,d.length),placeholder:"Comment… (Enter to add \xb7 Esc to discard)",onKeyDown:e=>{e.stopPropagation(),"Enter"!==e.key||e.shiftKey?"Escape"===e.key&&(e.preventDefault(),i()):(e.preventDefault(),x())},className:"h-16 w-full resize-none rounded bg-white/[0.05] px-1.5 py-1 text-xs outline-none placeholder:text-muted-foreground/50 focus:bg-white/[0.08]"}),(0,s.jsxs)("div",{className:"mt-1 flex items-center justify-end gap-1",children:[(0,s.jsxs)("button",{type:"button",onClick:i,title:"Discard this comment (Esc)",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",children:[(0,s.jsx)(f.A,{className:"size-3"}),"Discard"]}),(0,s.jsxs)("button",{type:"button",onClick:x,disabled:!d.trim(),title:"Add this comment (Enter)",className:"flex items-center gap-1 rounded bg-sky-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-sky-300 transition-colors hover:bg-sky-500/25 disabled:opacity-40",children:[(0,s.jsx)(a.A,{className:"size-3"}),"Add"]})]})]})}function L({annotations:e,updateComment:t,removeAnnotation:n,focusOnAnnotation:r,onClose:a}){return 0===e.length?(0,s.jsx)("div",{className:"rounded-lg border border-dashed border-white/10 px-3 py-6 text-center text-[11px] text-muted-foreground",children:"Highlight any text in the plan to leave an inline comment."}):(0,s.jsx)("ul",{className:"space-y-1.5",children:e.map(e=>(0,s.jsx)("li",{className:(0,C.cn)("group rounded-md border bg-background/30 px-2 py-1.5 transition-colors hover:bg-background/50","deletion"===e.kind?"border-red-500/25":"border-sky-500/15"),children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>{r(e.id),a?.()},title:"Jump to this excerpt in the plan",className:(0,C.cn)("block w-full truncate text-left text-[10.5px] font-mono","deletion"===e.kind?"text-red-300/90 line-through":"text-foreground/80 hover:text-foreground"),children:["“",e.excerpt,"”"]}),"deletion"!==e.kind&&(0,s.jsx)("textarea",{value:e.comment,onChange:n=>t(e.id,n.target.value),placeholder:"Write your comment…",rows:1,className:"field-sizing-content mt-1 w-full resize-none bg-transparent text-[11px] leading-snug text-foreground/90 outline-none placeholder:text-muted-foreground/60 focus:text-foreground"})]}),(0,s.jsx)("button",{onClick:()=>n(e.id),title:"Remove this annotation",className:"shrink-0 rounded p-1 text-muted-foreground/70 opacity-0 transition-opacity hover:bg-red-500/15 hover:text-red-300 group-hover:opacity-100",children:(0,s.jsx)(g.A,{className:"size-3"})})]})},e.id))})}function F({markdown:e,annotations:t,focusOnId:n,onClearFocus:a,onUpdate:o,onRemove:l}){let i=(0,r.useMemo)(()=>(0,E.n$)(e),[e]);return(0,s.jsx)("div",{className:"mx-auto w-full max-w-[66ch] space-y-4",children:i.map((e,r)=>(0,s.jsx)($,{block:e,index:r,annotations:t,focusOnId:n,onClearFocus:a,onUpdate:o,onRemove:l},r))})}function $({block:e,index:t,annotations:n,focusOnId:r,onClearFocus:a,onUpdate:o,onRemove:l}){if("code"===e.kind)return(0,s.jsx)(E.NG,{text:e.text});if("table"===e.kind)return(0,s.jsx)(E.QH,{block:e});let i=(0,s.jsx)(H,{text:e.text,annotations:n,focusOnId:r,onClearFocus:a,onUpdate:o,onRemove:l}),d=(0,E.Vq)(e.kind)?(0,E.vB)(t):void 0;return(0,s.jsx)(s.Fragment,{children:(0,E.aM)(e,i,"reading",d)})}function H({text:e,annotations:t,focusOnId:n,onClearFocus:r,onUpdate:a,onRemove:o}){let l=(S?[]:t).map(t=>({a:t,idx:e.indexOf(t.excerpt)})).filter(e=>e.idx>=0).sort((e,t)=>e.idx-t.idx);if(!l.length)return(0,s.jsx)(U,{text:e});let i=[],d=0;for(let{a:t,idx:c}of l)c<d||(c>d&&i.push((0,s.jsx)(U,{text:e.slice(d,c)},`p-${d}`)),i.push((0,s.jsx)(B,{annotation:t,autoFocus:n===t.id,onClearFocus:r,onUpdate:a,onRemove:o},t.id)),d=c+t.excerpt.length);return d<e.length&&i.push((0,s.jsx)(U,{text:e.slice(d)},"p-tail")),(0,s.jsx)(s.Fragment,{children:i})}function B({annotation:e,autoFocus:t,onClearFocus:n,onUpdate:a,onRemove:o}){let l=(0,r.useRef)(null);return((0,r.useEffect)(()=>{if(t&&l.current){l.current.focus();let e=l.current.value;l.current.setSelectionRange(e.length,e.length),n()}},[t,n]),"deletion"===(e.kind??"comment"))?(0,s.jsxs)("span",{className:"relative inline",children:[(0,s.jsx)("span",{className:"rounded bg-red-500/15 px-0.5 text-red-200/90 line-through decoration-red-300/70 decoration-2",children:(0,s.jsx)(U,{text:e.excerpt})}),(0,s.jsx)("button",{type:"button",onClick:()=>o(e.id),title:"Unmark",className:"ml-0.5 inline-flex translate-y-[-1px] items-center text-red-300/70 hover:text-red-300",children:(0,s.jsx)(g.A,{className:"size-3"})})]}):(0,s.jsx)("span",{className:"rounded bg-[var(--accent-2,#ff7a45)]/15 px-0.5","data-annotation-id":e.id,children:(0,s.jsx)(U,{text:e.excerpt})})}function U({text:e}){return(0,s.jsx)(E.cV,{text:e})}var X=n(31966);let G=(0,d.A)("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]),K=(0,d.A)("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);var _=n(86371),q=n(44853),V=n(5937),W=n(74350),J=n(89793),Y=n(96719);function Q({planId:e,className:t,title:n="Share a read-only link to this plan"}){let[a,o]=(0,r.useState)(!1),{status:l,url:d,error:c,copied:u,mint:m,copy:h,reset:x}=(0,J.b)();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{type:"button",title:n,onClick:function(){x(),o(!0),m({kind:"plan",...e?{planId:e}:{}})},className:t??"glass flex size-8 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground",children:(0,s.jsx)(V.A,{className:"size-3.5"})}),(0,s.jsx)(W.lG,{open:a,onOpenChange:o,children:(0,s.jsxs)(W.Cf,{children:[(0,s.jsxs)(W.c7,{children:[(0,s.jsx)(W.L3,{children:"Share this plan"}),(0,s.jsx)(W.rr,{children:"Anyone with the link can view this plan and its boards — no Beacon needed. Links expire after 7 days."})]}),"loading"===l&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-[12px] text-muted-foreground",children:[(0,s.jsx)(i.A,{className:"size-4 animate-spin"})," Creating link…"]}),"done"===l&&(0,s.jsx)(Y.F,{url:d,copied:u,onCopy:h}),"error"===l&&(0,s.jsx)("p",{className:"text-[12px] text-red-400",children:c})]})})]})}var Z=n(66616),ee=n(36849);let et="beacon:plan-history-sidebar";function en({pendingPlan:e=!1,workspaceId:t}){let n=(0,v.useRouter)(),[i,d]=(0,r.useState)([]),[c,m]=(0,r.useState)(null),[h,x]=(0,r.useState)(null),[p,g]=(0,r.useState)("map"),[b,y]=(0,r.useState)(()=>{try{return"0"!==window.localStorage.getItem(et)}catch{return!0}}),j=(0,r.useCallback)(()=>{y(e=>{let t=!e;try{localStorage.setItem(et,t?"1":"0")}catch{}return t})},[]);(0,r.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/plan/history");if(!e.ok)return;let t=await e.json();d(t.items),t.items.length&&!c&&m(t.items[0].id)}catch{}})()},[]),(0,r.useEffect)(()=>{c&&(async()=>{let e=await fetch(`/api/plan/history?id=${encodeURIComponent(c)}`);e.ok&&x(await e.json())})()},[c]);let k=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let n of e){let e=new Date(n.archivedAt).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"});t.has(e)||t.set(e,[]),t.get(e).push(n)}return Array.from(t.entries())})(i),[i]),N=(0,r.useMemo)(()=>(function(e){let t=e?.features??[];if(0===t.length)return{nodes:[],edges:[]};let n=new Map;t.forEach((e,t)=>{let s=e.title.trim();n.has(s)||n.set(s,`arch-${t}`)});let s=(e,t)=>n.get(e.title.trim())??`arch-${t}`,r=t.map((e,t)=>({id:s(e,t),parentId:null,cluster:e.cluster??null,status:"PENDING",priority:e.priority??2,title:e.title,role:e.role??null})),a=(0,ee.VI)(r,"cluster"),o=t.map((e,t)=>{let n=s(e,t),r=a.get(n)??{x:0,y:0};return{id:n,view:"ROADMAP",kind:e.kind??"FEATURE",cluster:e.cluster??null,layer:e.layer??null,title:e.title,role:e.role??null,plain:e.plain??null,status:"PENDING",priority:e.priority??2,x:r.x,y:r.y,source:"DRAFT",sourceRef:null,parentId:null,isCriterion:!1,files:[],bugFlags:[]}}),l=[];return t.forEach((e,t)=>{let r=s(e,t);for(let t of e.dependsOn??[]){let e=n.get(t.trim());e&&e!==r&&l.push({id:`arch-edge-${r}-${e}`,fromId:r,toId:e,kind:"DEPENDS",label:"depends on",sourceHandle:null,targetHandle:null})}}),{nodes:o,edges:l}})(h?.featureGraph),[h]),A=N.nodes.length>0,S=(h?.draftDoc?.tables.length??0)>0||(h?.draftDoc?.endpoints.length??0)>0,z=A||S,R="map"!==p||A?"db"!==p||S?p:"map":"db",M=!!h&&""===h.markdown.replace(/^#[^\n]*\n?/,"").trim(),D=e?(0,s.jsxs)("button",{onClick:()=>n.push((0,w.rc)()),className:"glass pointer-events-auto mb-1 ml-3 mt-1 flex h-8 w-fit shrink-0 items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold text-sky-300 transition-colors hover:bg-sky-500/15",title:"Return to the plan that's still pending review",children:[(0,s.jsx)(X.A,{className:"size-3.5"})," Back to current plan"]}):null;return 0===i.length?(0,s.jsxs)("div",{className:"flex h-screen min-h-0 flex-col pt-14",children:[D,(0,s.jsx)("div",{className:"flex flex-1 items-center justify-center px-6 text-center",children:(0,s.jsxs)("div",{className:"max-w-md text-sm text-muted-foreground",children:[(0,s.jsx)(u,{className:"mx-auto mb-3 size-7 text-muted-foreground/40"}),(0,s.jsx)("div",{className:"mb-2 text-base font-semibold text-foreground",children:"No plans yet."}),"Ask the agent to propose a feature in your terminal session — it lands here via MCP and you can review + annotate on both sides. Past plans get archived to this page for browsing."]})})]}):(0,s.jsxs)("div",{className:"flex h-screen min-h-0 flex-col pt-14",children:[D,h&&(0,s.jsxs)("div",{className:"glass pointer-events-auto fixed right-3 top-3 z-30 flex h-9 items-center gap-2 rounded-full px-3",children:[(0,s.jsx)("span",{className:(0,C.cn)("rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide","approved"===h.verdict?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),children:h.verdict}),(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:new Date(h.archivedAt).toLocaleString()}),(0,s.jsx)("span",{"aria-hidden":!0,className:"h-4 w-px bg-white/10"}),(0,s.jsx)(Q,{planId:h.id,className:"flex size-6 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground"})]}),(0,s.jsxs)("div",{className:"flex min-h-0 flex-1",children:[b?(0,s.jsxs)("aside",{className:"flex w-64 min-w-0 shrink-0 flex-col border-r border-white/5 bg-card/30",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-white/5 px-3 py-2",children:[(0,s.jsxs)("span",{className:"text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Plan history \xb7 ",i.length]}),(0,s.jsx)("button",{onClick:j,title:"Collapse history",className:"flex size-5 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(G,{className:"size-3.5"})})]}),(0,s.jsx)("ul",{className:"min-h-0 flex-1 overflow-y-auto",children:k.map(([e,t])=>(0,s.jsxs)("li",{children:[(0,s.jsx)("div",{className:"px-3 pb-1 pt-3 text-[9px] font-semibold uppercase tracking-widest text-muted-foreground/60",children:e}),(0,s.jsx)("ul",{children:t.map(e=>(0,s.jsx)("li",{children:(0,s.jsxs)("button",{onClick:()=>m(e.id),className:(0,C.cn)("flex w-full items-start gap-1.5 px-3 py-1.5 text-left text-[12px] transition-colors",c===e.id?"bg-white/[0.06] text-foreground":"text-muted-foreground hover:bg-white/[0.03] hover:text-foreground"),children:[(0,s.jsx)("span",{className:(0,C.cn)("mt-0.5 inline-flex size-3.5 shrink-0 items-center justify-center rounded-full","approved"===e.verdict?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),title:e.verdict,children:"approved"===e.verdict?(0,s.jsx)(a.A,{className:"size-2.5"}):(0,s.jsx)(f.A,{className:"size-2.5"})}),(0,s.jsx)("span",{className:"line-clamp-2",children:e.description})]})},e.id))})]},e))})]}):(0,s.jsx)("aside",{className:"flex w-10 shrink-0 flex-col items-center border-r border-white/5 bg-card/30 py-2",children:(0,s.jsx)("button",{onClick:j,title:`Show plan history \xb7 ${i.length}`,className:"flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(K,{className:"size-4"})})}),h?(0,s.jsxs)("div",{className:"flex min-h-0 min-w-0 flex-1",children:[(0,s.jsx)("div",{className:(0,C.cn)("relative flex min-h-0 min-w-0 flex-col",!z&&"flex-1"),style:z?{width:"44%"}:void 0,children:(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-4",children:[(0,s.jsx)(E.pO,{markdown:h.markdown}),M&&(0,s.jsx)("p",{className:"mt-2 text-[13px] text-muted-foreground",children:(h.featureGraph?.features?.length??0)===0&&(h.draftDoc?.tables?.length??0)===0&&(h.draftDoc?.endpoints?.length??0)===0?"This plan was approved without a detailed write-up — no features or schema were attached either.":"This plan has no written body. See the Features and Schema canvases for what it proposed."}),h.globalComment&&(0,s.jsxs)("div",{className:"mt-4 rounded-lg border border-white/5 bg-card/40 p-3",children:[(0,s.jsx)("div",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Overall feedback"}),(0,s.jsx)("div",{className:"text-[12px] whitespace-pre-wrap",children:h.globalComment})]})]})}),z&&(0,s.jsxs)("div",{className:"relative flex min-h-0 min-w-0 flex-1 flex-col border-l border-white/5",children:[A&&S&&(0,s.jsx)("div",{className:"pointer-events-none absolute left-3 top-3 z-20",children:(0,s.jsxs)("div",{className:"glass pointer-events-auto flex items-center gap-1 rounded-full p-0.5",children:[(0,s.jsx)(Z.E,{active:"map"===R,onClick:()=>g("map"),icon:(0,s.jsx)(o.A,{className:"size-3"}),children:"Features"}),(0,s.jsx)(Z.E,{active:"db"===R,onClick:()=>g("db"),icon:(0,s.jsx)(l.A,{className:"size-3"}),children:"Schema"})]})}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:"map"===R?(0,s.jsx)(_.MapClient,{view:"ROADMAP",nodes:N.nodes,edges:N.edges,embedded:!0,readOnly:!0}):(0,s.jsx)(q.DbMapClient,{tables:[],relations:[],endpoints:[],draft:h.draftDoc??null,workspaceId:t,embedded:!0,readOnly:!0})})]})]}):(0,s.jsx)("section",{className:"flex min-h-0 min-w-0 flex-1 items-center justify-center text-sm text-muted-foreground",children:"Select a plan on the left to view it."})]})]})}function es({markdown:e}){let t=(0,r.useMemo)(()=>(0,E.n$)(e).map((e,t)=>({b:e,i:t})).filter(({b:e})=>(0,E.Vq)(e.kind)).map(({b:e,i:t})=>({id:(0,E.vB)(t),level:(0,E.F8)(e.kind),label:(0,E.kz)(e.text)})).filter(e=>e.label.length>0),[e]),[n,a]=(0,r.useState)(null);return(0,r.useEffect)(()=>{if("u"<typeof IntersectionObserver||0===t.length)return;let e=t.map(e=>document.getElementById(e.id)).filter(e=>null!==e);if(0===e.length)return;let n=new IntersectionObserver(e=>{let t=e.filter(e=>e.isIntersecting).sort((e,t)=>e.boundingClientRect.top-t.boundingClientRect.top);t[0]&&a(t[0].target.id)},{rootMargin:"-12% 0px -70% 0px",threshold:0});return e.forEach(e=>n.observe(e)),()=>n.disconnect()},[t]),(0,s.jsxs)("aside",{className:"flex w-60 shrink-0 flex-col overflow-y-auto border-r border-white/5 bg-background pt-16",children:[(0,s.jsx)("div",{className:"px-4 pb-2 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Sections"}),0===t.length?(0,s.jsx)("p",{className:"px-4 text-[12px] text-muted-foreground/70",children:"No headings in this plan."}):(0,s.jsx)("nav",{className:"space-y-0.5 px-2 pb-6",children:t.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;let n;return t=e.id,void((n=document.getElementById(t))&&(n.scrollIntoView({behavior:"smooth",block:"start"}),a(t)))},title:e.label,style:{paddingLeft:`${.5+.75*e.level}rem`},className:(0,C.cn)("block w-full truncate rounded py-1 pr-2 text-left text-[12px] leading-snug transition-colors",n===e.id?"bg-white/10 font-medium text-foreground":"text-muted-foreground hover:bg-white/[0.05] hover:text-foreground"),children:e.label},e.id))})]})}var er=n(50981),ea=n(4474),eo=n(97358);function el({open:e,onOpenChange:t,onConfirmed:n}){let[o,l]=(0,r.useState)("bypassPermissions"),[i,d]=(0,r.useState)(!1);async function c(){d(!0);try{await fetch("/api/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({planApprovalMode:o})}).catch(()=>{}),t(!1),n()}finally{d(!1)}}return(0,s.jsx)(W.lG,{open:e,onOpenChange:t,children:(0,s.jsxs)(W.Cf,{className:"max-w-lg",children:[(0,s.jsxs)(W.c7,{children:[(0,s.jsxs)(W.L3,{className:"flex items-center gap-2",children:[(0,s.jsx)(er.A,{className:"size-4 text-emerald-400"}),"After approving, the agent should…"]}),(0,s.jsx)(W.rr,{children:"Pick the permission mode your terminal session enters when you approve a plan. We ask once and remember it for every project — change it anytime in Settings."})]}),(0,s.jsx)("div",{className:"space-y-2 py-1",children:eo.pC.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>l(e.value),className:(0,C.cn)("flex w-full items-start gap-3 rounded-lg border p-3 text-left transition-colors",o===e.value?"border-emerald-500/50 bg-emerald-500/10":"border-white/10 bg-white/[0.03] hover:bg-white/[0.06]"),children:[(0,s.jsx)("span",{className:(0,C.cn)("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border",o===e.value?"border-emerald-400 bg-emerald-400/20":"border-white/30"),children:o===e.value&&(0,s.jsx)(a.A,{className:"size-3 text-emerald-300"})}),(0,s.jsxs)("span",{className:"min-w-0",children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-foreground",children:e.label}),(0,s.jsx)("span",{className:"block text-xs text-muted-foreground",children:e.description})]})]},e.value))}),(0,s.jsxs)(W.Es,{className:"items-center justify-between gap-2 sm:justify-between",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"You can change this later in Settings."}),(0,s.jsx)(ea.$,{onClick:c,disabled:i,size:"sm",children:i?"Saving…":"Save & approve"})]})]})})}function ei({dbProps:e,mapProps:t,planMarkdown:n,repoFiles:d=[],forceHistory:k=!1}){let N=(0,v.useRouter)(),{status:A,discard:S}=(0,y.j)(),z=t.nodes.length>0,R=e.tables.length>0||e.endpoints.length>0||(e.draft?.tables.length??0)>0||(e.draft?.endpoints.length??0)>0,[M,D]=(0,r.useState)(z?"map":"db"),O="map"!==M||z?"db"!==M||R?M:"map":"db",[P,I]=(0,r.useState)(!1),[F,$]=(0,r.useState)(!1),[H,B]=(0,r.useState)(null),U=(0,r.useRef)(!1),X=(0,r.useCallback)(async()=>{await fetch("/api/plan/approve",{method:"POST",headers:(0,j.dh)((0,w.X0)())}).catch(()=>{}),B({features:A.features,tables:A.tables,endpoints:A.endpoints})},[A.features,A.tables,A.endpoints]);(0,r.useEffect)(()=>{if(!H)return;U.current=!1;let e=H.features>0?"/map?view=ROADMAP":H.tables>0||H.endpoints>0?"/map?view=DATABASE":"/map?view=ROADMAP",t=setTimeout(()=>{U.current||(U.current=!0,N.push(e))},3e3);return()=>clearTimeout(t)},[H,N]);let G=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/preferences",{cache:"no-store"});if((await e.json()).planApprovalModeConfigured)return void X()}catch{X();return}$(!0)},[X]),[K,V]=(0,r.useState)(null),W=(0,r.useCallback)(e=>V(e),[]),J=(0,r.useRef)(null),Y=(0,r.useRef)(null),ee=(0,r.useRef)(e.draft),[et,er]=(0,r.useState)(!1),ea=(0,r.useCallback)(()=>er(!0),[]),[eo,ec]=(0,r.useState)([]),[eu,em]=(0,r.useState)(!1),[eh,ex]=(0,r.useState)(""),ep=(0,r.useCallback)(e=>{ex(e),em(!0)},[]),ef=(0,r.useRef)(eo);(0,r.useEffect)(()=>{ef.current=eo},[eo]),(0,r.useEffect)(()=>{ec([]),em(!1),er(!1)},[A.proposedAt]),(0,r.useEffect)(()=>{let e=()=>void fetch("/api/plan/presence",{method:"POST",cache:"no-store",headers:(0,j.dh)((0,w.X0)())}).catch(()=>{});e();let t=setInterval(e,5e3);return()=>clearInterval(t)},[]);let eg=(0,r.useCallback)(()=>({draft:ee.current,questions:ef.current}),[]),eb=(0,r.useMemo)(()=>{let n=[];for(let e of t.nodes)n.push(`feature: ${e.title}`);for(let t of e.draft?.tables??[])n.push(`table: ${t.name}`);for(let t of e.tables)n.push(`table: ${t.name}`);for(let t of e.draft?.endpoints??[])n.push(`endpoint: ${t.method} ${t.path}`);for(let t of e.endpoints)n.push(`endpoint: ${t.method} ${t.path}`);return Array.from(new Set(n))},[t.nodes,e]),ev=K?(0,s.jsx)(L,{annotations:K.annotations,updateComment:K.updateComment,removeAnnotation:K.removeAnnotation,focusOnAnnotation:K.focusOnAnnotation,onClose:()=>J.current?.close()}):null,ey=(0,r.useCallback)(()=>{J.current?.open()},[]),ej=(0,r.useCallback)(e=>{K?.addComment(e)},[K]),ew=(0,r.useCallback)(e=>{K?.focusOnAnnotation(e),"db"===O?Y.current?.openComments():J.current?.openComments()},[K,O]),[ek,eN]=(0,r.useState)(()=>{try{let e=window.localStorage.getItem("beacon:plan-left-pct");return e?Math.max(20,Math.min(80,Number(e))):50}catch{return 50}}),eC=(0,r.useRef)(null),eA=(0,r.useRef)(!1),eE=(0,r.useCallback)(e=>{e.preventDefault(),eA.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[]);(0,r.useEffect)(()=>{let e=e=>{if(!eA.current||!eC.current)return;let t=eC.current.getBoundingClientRect();eN(Math.max(20,Math.min(80,(e.clientX-t.left)/t.width*100)))},t=()=>{if(eA.current){eA.current=!1,document.body.style.cursor="",document.body.style.userSelect="";try{localStorage.setItem("beacon:plan-left-pct",String(ek))}catch{}}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t)}},[ek]);let eS=async()=>{await fetch("/api/plan/annotations",{method:"DELETE",headers:(0,j.dh)((0,w.X0)())}).catch(()=>{}),await S(),N.refresh()};if((!A.pending||k)&&!H)return(0,s.jsx)(E.Ue,{files:d,children:(0,s.jsx)(en,{pendingPlan:A.pending,workspaceId:e.workspaceId})});let ez=z||R,eR=ez&&!P,eM=!ez||P,eD=((K?.liveCount??0)>0||et||eo.length>0)&&!K?.submitted;return(0,s.jsxs)("div",{className:"relative flex h-screen flex-col",children:[H&&(0,s.jsxs)("div",{className:"absolute inset-0 z-50 flex flex-col items-center justify-center gap-5 bg-background/97 px-6 text-center backdrop-blur-sm",children:[(0,s.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-emerald-500/15",children:(0,s.jsx)(a.A,{className:"size-6 text-emerald-300"})}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Plan approved"}),(0,s.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:H.features>0||H.tables>0||H.endpoints>0?"It's committed. Here's where to find it:":"It's archived to your plan history."}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground/70",children:"Taking you to the map in 3 seconds…"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[H.features>0&&(0,s.jsxs)("button",{onClick:()=>{U.current=!0,N.push("/map?view=ROADMAP")},className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,s.jsx)(o.A,{className:"size-4 text-sky-300"})," ",H.features," feature",1===H.features?"":"s"," → Map"]}),(H.tables>0||H.endpoints>0)&&(0,s.jsxs)("button",{onClick:()=>{U.current=!0,N.push("/map?view=DATABASE")},className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,s.jsx)(l.A,{className:"size-4 text-violet-300"})," ",H.tables," table",1===H.tables?"":"s"," \xb7 ",H.endpoints," endpoint",1===H.endpoints?"":"s"," → Database"]})]}),(0,s.jsx)("button",{onClick:()=>{U.current=!0,B(null),N.push((0,w.rc)({view:"history"}))},className:"rounded-full border border-white/12 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Done — browse plan history"})]}),K?.submitted&&(0,s.jsxs)("div",{className:"absolute inset-0 z-40 flex flex-col items-center justify-center gap-4 bg-background/95 px-6 text-center backdrop-blur-sm",children:[(0,s.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-sky-500/15",children:(0,s.jsx)(i.A,{className:"size-6 animate-spin text-sky-300"})}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Feedback sent"}),(0,s.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:"Your terminal session is revising the plan based on your comments. The updated plan will appear here automatically — no need to refresh."})]}),(0,s.jsx)("button",{onClick:()=>N.push((0,w.rc)({view:"history"})),className:"rounded-full border border-white/12 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Browse past plans"})]}),(0,s.jsxs)("div",{className:"pointer-events-none fixed right-3 top-3 z-30 flex items-center gap-2",children:[ez&&P&&(0,s.jsx)("button",{onClick:()=>I(!1),title:"Collapse — show the board again",className:"glass pointer-events-auto flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(c,{className:"size-3.5"})}),(0,s.jsxs)("div",{className:"glass pointer-events-auto flex h-10 items-center gap-0.5 rounded-full px-1",children:[(0,s.jsx)("button",{onClick:()=>N.push((0,w.rc)({view:"history"})),title:"Browse past plans (you can come back to this one)",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(u,{className:"size-3.5"})}),(0,s.jsx)(Q,{className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground"}),(0,s.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,s.jsxs)("button",{onClick:ey,disabled:!K,title:K?.annotationCount?`Open the side panel \xb7 ${K.annotationCount} comment${1===K.annotationCount?"":"s"} so far`:"Open the side panel (details + comments)",className:"relative flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:[(0,s.jsx)(m.A,{className:"size-3.5"}),K&&(K.annotationCount??0)>0&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-sky-500 px-1 text-[9px] font-semibold text-white",children:K.annotationCount})]}),(0,s.jsxs)("button",{"data-overall-toggle":!0,onClick:()=>K?.toggleOverall?.(),disabled:!K?.toggleOverall,title:K?.hasGlobalComment?"Edit your overall feedback":"Add overall plan-level feedback",className:(0,C.cn)("relative flex size-8 shrink-0 items-center justify-center rounded-full transition-colors",K?.globalOpen?"bg-white/10 text-foreground":K?.hasGlobalComment?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground hover:bg-white/[0.06] hover:text-foreground"),children:[(0,s.jsx)(h.A,{className:"size-3.5"}),K?.hasGlobalComment&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 size-2 rounded-full bg-sky-400"})]}),(0,s.jsxs)("button",{onClick:()=>em(e=>!e),title:"Ask the agent a question about a node (answered in its next round)",className:(0,C.cn)("relative flex size-8 shrink-0 items-center justify-center rounded-full transition-colors",eu?"bg-white/10 text-foreground":eo.length?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground hover:bg-white/[0.06] hover:text-foreground"),children:[(0,s.jsx)(x.A,{className:"size-3.5"}),eo.length>0&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-sky-500 px-1 text-[9px] font-semibold text-white",children:eo.length})]}),(0,s.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,s.jsxs)("button",{onClick:()=>K?.submit(),disabled:!K||K.submitting||0===K.liveCount&&!et&&0===eo.length,title:K&&(0!==K.liveCount||et||0!==eo.length)?K.submitted?"Submitted — your terminal session is reading the feedback":"Submit feedback (comments + canvas edits) so the agent can revise the plan":"Highlight text or edit the canvas, then submit",className:(0,C.cn)("flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-semibold transition-colors",K?.submitted?"text-sky-300":K&&(0!==K.liveCount||et||0!==eo.length)?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground opacity-50"),children:[K?.submitted?(0,s.jsx)(a.A,{className:"size-3"}):(0,s.jsx)(p.A,{className:"size-3"}),K?.submitted?"Submitted":"Feedback"]}),eD&&(0,s.jsxs)("button",{onClick:()=>{K?.clearAll?.(),er(!1),ec([])},title:"Discard your unsubmitted comments / canvas edits so you can approve the plan as-is",className:"flex shrink-0 items-center gap-1 rounded-full px-2 py-1 text-[11px] font-medium text-amber-300/90 transition-colors hover:bg-amber-500/15",children:[(0,s.jsx)(f.A,{className:"size-3"})," Clear to approve"]}),(0,s.jsxs)("button",{onClick:()=>void G(),disabled:eD,title:eD?"You have unsubmitted feedback — submit it, or click ‘Clear to approve’ to drop it":"Approve the plan",className:(0,C.cn)("flex shrink-0 items-center gap-1 rounded-full border border-emerald-500/40 bg-emerald-500/15 px-2.5 py-1 text-[11px] font-semibold text-emerald-300 transition-colors hover:bg-emerald-500/25",eD&&"opacity-40 hover:bg-emerald-500/15"),children:[(0,s.jsx)(a.A,{className:"size-3"})," Approve"]}),(0,s.jsxs)("button",{onClick:eS,className:"flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",title:"Discard the plan",children:[(0,s.jsx)(g.A,{className:"size-3"})," Discard"]}),(0,s.jsx)(el,{open:F,onOpenChange:$,onConfirmed:()=>void X()})]})]}),eu&&(0,s.jsxs)("div",{className:"fixed right-3 top-16 z-30 w-80 rounded-xl border border-white/10 bg-card p-3 shadow-xl",children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Ask the agent"}),(0,s.jsx)("button",{onClick:()=>em(!1),title:"Close",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,s.jsx)(f.A,{className:"size-3.5"})})]}),(0,s.jsx)(ed,{targets:eb,initialTarget:eh,onAdd:e=>ec(t=>[...t,e])}),eo.length>0&&(0,s.jsx)("ul",{className:"mt-2 space-y-1",children:eo.map((e,t)=>(0,s.jsxs)("li",{className:"group flex items-start justify-between gap-2 rounded-md border border-white/5 bg-background/40 px-2 py-1",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"truncate font-mono text-[10px] text-sky-300/90",children:e.target}),(0,s.jsx)("div",{className:"text-[11px] text-foreground/90",children:e.question})]}),(0,s.jsx)("button",{onClick:()=>ec(e=>e.filter((e,n)=>n!==t)),title:"Remove",className:"shrink-0 rounded p-0.5 text-muted-foreground/70 opacity-0 transition-opacity hover:text-red-300 group-hover:opacity-100",children:(0,s.jsx)(f.A,{className:"size-3"})})]},t))}),(0,s.jsx)("p",{className:"mt-2 text-[10px] text-muted-foreground",children:"Questions are sent with your feedback on Submit — the agent answers them in its next round."})]}),(0,s.jsxs)("div",{ref:eC,className:"flex min-h-0 flex-1",children:[eM&&(0,s.jsx)(es,{markdown:n}),(0,s.jsxs)("div",{className:(0,C.cn)("relative flex min-w-0 flex-col",!eR&&"flex-1"),style:eR?{width:`${ek}%`}:void 0,children:[eR&&(0,s.jsx)("div",{className:"pointer-events-none absolute right-3 top-3 z-20",children:(0,s.jsx)("button",{onClick:()=>I(!0),title:"Expand the plan to full width",className:"glass pointer-events-auto flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(b.A,{className:"size-3.5"})})}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:(0,s.jsx)(E.Ue,{files:d,children:(0,s.jsx)(T,{markdown:n,round:A.proposedAt,onApi:W,hideSubmit:!0,getExtraSubmitPayload:eg})})})]}),eR&&(0,s.jsx)("div",{onPointerDown:eE,className:"group relative w-px shrink-0 cursor-col-resize bg-white/5 hover:bg-white/15",title:"Drag to resize",children:(0,s.jsx)("div",{className:"absolute inset-y-0 -left-1.5 right-[-6px] z-10"})}),eR&&(0,s.jsxs)("div",{className:"relative flex min-w-0 flex-col",style:{width:`${100-ek}%`},children:[z&&R&&(0,s.jsx)("div",{className:"pointer-events-none absolute left-3 top-3 z-20",children:(0,s.jsxs)("div",{className:"glass pointer-events-auto flex items-center gap-1 rounded-full p-0.5",children:[(0,s.jsx)(Z.E,{active:"map"===O,onClick:()=>D("map"),icon:(0,s.jsx)(o.A,{className:"size-3"}),children:"Map"}),(0,s.jsx)(Z.E,{active:"db"===O,onClick:()=>D("db"),icon:(0,s.jsx)(l.A,{className:"size-3"}),children:"Database"})]})}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:"map"===O?(0,s.jsx)(_.MapClient,{view:t.view,nodes:t.nodes,edges:t.edges,hasFrontend:t.hasFrontend,embedded:!0,commentsContent:ev,commentsCount:K?.annotationCount??0,controlRef:J,onAskAgent:ep,onAddComment:ej,annotations:K?.annotations,onPinClick:ew,onUpdateComment:K?.updateComment,onRemoveComment:K?.removeAnnotation}):(0,s.jsx)(q.DbMapClient,{tables:e.tables,relations:e.relations,endpoints:e.endpoints,draft:e.draft,workspaceId:e.workspaceId,diffBase:e.diffBase,embedded:!0,draftRef:ee,onEdit:ea,controlRef:Y,commentsContent:ev,commentsCount:K?.annotationCount??0,onAddComment:ej,annotations:K?.annotations,onPinClick:ew,onUpdateComment:K?.updateComment,onRemoveComment:K?.removeAnnotation})})]})]})]})}function ed({targets:e,onAdd:t,initialTarget:n}){let[a,o]=(0,r.useState)(n||e[0]||""),[l,i]=(0,r.useState)("");(0,r.useEffect)(()=>{n&&o(n)},[n]),(0,r.useEffect)(()=>{!a&&e[0]&&o(e[0])},[e,a]);let d=()=>{let e=l.trim();e&&(t({target:a||"(plan)",question:e}),i(""))};return(0,s.jsxs)("div",{className:"space-y-1.5",children:[e.length>0&&(0,s.jsx)("select",{value:a,onChange:e=>o(e.target.value),className:"w-full rounded border border-white/10 bg-background px-2 py-1 text-[11px] outline-none focus:border-sky-400/40",children:e.map(e=>(0,s.jsx)("option",{value:e,className:"bg-card",children:e},e))}),(0,s.jsx)("textarea",{value:l,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d())},rows:2,placeholder:"e.g. why a new table instead of reusing users? (⌘/Ctrl+Enter to add)",className:"w-full resize-y rounded border border-white/10 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-sky-400/40"}),(0,s.jsx)("button",{onClick:d,disabled:!l.trim(),className:(0,C.cn)("w-full rounded-md px-2 py-1 text-[11px] font-semibold transition-colors",l.trim()?"bg-sky-500/15 text-sky-300 hover:bg-sky-500/25":"text-muted-foreground opacity-50"),children:"Add question"})]})}},25494:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]])},31966:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},38332:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]])},48484:(e,t,n)=>{"use strict";n.d(t,{PlanProvider:()=>c,j:()=>u});var s=n(95155),r=n(12115),a=n(73321),o=n(60292),l=n(99979);let i={pending:!1,proposedAt:0,tables:0,endpoints:0,features:0},d=(0,r.createContext)(null);function c({children:e}){let t=(0,a.useRouter)(),[n,u]=(0,r.useState)(i),m=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/plan",{method:"GET",cache:"no-store",headers:(0,o.dh)((0,l.X0)())});if(!e.ok)return;let t=await e.json();u(t)}catch{}},[]);(0,r.useEffect)(()=>{m();let e=setInterval(()=>void m(),4e3);return()=>clearInterval(e)},[m]);let h=(0,r.useCallback)(async()=>{await fetch("/api/plan",{method:"DELETE",headers:(0,o.dh)((0,l.X0)())}).catch(()=>{}),u(i),t.refresh()},[t]),x=(0,r.useCallback)(async()=>{await fetch("/api/plan/approve",{method:"POST",headers:(0,o.dh)((0,l.X0)())}).catch(()=>{}),u(i),t.refresh()},[t]);return(0,s.jsx)(d.Provider,{value:{status:n,discard:h,approvePlan:x,refresh:m},children:e})}function u(){let e=(0,r.useContext)(d);if(!e)throw Error("usePlan must be used inside PlanProvider");return e}},60976:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("redo-2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]])},97358:(e,t,n)=>{"use strict";n.d(t,{pC:()=>s});let s=[{value:"default",label:"Manual approval",description:"Approve each tool call yourself — Claude Code's default."},{value:"acceptEdits",label:"Auto-accept edits",description:"Auto-approve file edits; still ask before running other tools."},{value:"bypassPermissions",label:"Bypass permissions",description:"Auto-approve every tool call (like --dangerously-skip-permissions)."},{value:"auto",label:"Auto",description:"Autonomous, gated by a safety classifier (needs a recent Claude Code + Sonnet 4.6+)."}]},99979:(e,t,n)=>{"use strict";function s(){return new URLSearchParams(window.location.search).get("ws")}function r(e){let t=new URLSearchParams,n=s();for(let[s,r]of(n&&t.set("ws",n),Object.entries(e??{})))t.set(s,r);let r=t.toString();return r?`/plan?${r}`:"/plan"}n.d(t,{X0:()=>s,rc:()=>r})}},e=>{e.O(0,[2574,3862,5004,277,8500,4888,8997,9887,5957,766,2059,2231,6371,4853,1909,8441,3794,7358],()=>e(e.s=22137)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9962],{15330:(e,a,s)=>{"use strict";s.d(a,{A:()=>r});let r=(0,s(30772).A)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]])},48045:(e,a,s)=>{"use strict";s.d(a,{SharedBoardView:()=>x});var r=s(95155),d=s(12115),t=s(25640),n=s(83599),l=s(34306),i=s(51276),o=s(44853),c=s(53981),m=s(91337);let h={ROADMAP:{label:"Roadmap",icon:(0,r.jsx)(t.A,{className:"size-3"})},ARCHITECTURE:{label:"Architecture",icon:(0,r.jsx)(n.A,{className:"size-3"})},DATABASE:{label:"Database",icon:(0,r.jsx)(l.A,{className:"size-3"})}};function x({snapshot:e}){let a=e.selectedTabs.filter(e=>h[e]),[s,t]=(0,d.useState)(a[0]??"ROADMAP");return(0,r.jsxs)("div",{className:"flex h-dvh flex-col bg-background",children:[(0,r.jsx)(c.E,{label:"shared from",workspaceLabel:e.workspaceLabel,createdAt:e.createdAt}),(0,r.jsxs)("main",{className:"relative min-h-0 flex-1 overflow-hidden",children:[a.length>1&&(0,r.jsx)("nav",{className:"absolute left-1/2 top-3 z-20 max-w-[calc(100%-1.5rem)] -translate-x-1/2",children:(0,r.jsx)("div",{className:"glass flex items-center gap-1 rounded-full p-0.5",children:a.map(e=>(0,r.jsxs)("button",{onClick:()=>t(e),title:h[e].label,className:(0,m.cn)("flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[11px] font-medium transition-colors",s===e?"bg-white/10 text-foreground":"text-muted-foreground hover:text-foreground"),children:[h[e].icon,(0,r.jsx)("span",{className:"hidden sm:inline",children:h[e].label})]},e))})}),"ROADMAP"===s&&e.roadmap&&(0,r.jsx)(i.MapClient,{view:"ROADMAP",nodes:e.roadmap.nodes,edges:e.roadmap.edges,hasFrontend:e.roadmap.hasFrontend,embedded:!0,readOnly:!0,firstTapHighlightsOnly:!0}),"ARCHITECTURE"===s&&e.architecture&&(0,r.jsx)(i.MapClient,{view:"ARCHITECTURE",nodes:e.architecture.nodes,edges:e.architecture.edges,hasFrontend:e.architecture.hasFrontend,embedded:!0,readOnly:!0,firstTapHighlightsOnly:!0}),"DATABASE"===s&&e.database&&(0,r.jsx)(o.DbMapClient,{tables:e.database.tables,relations:e.database.relations,endpoints:e.database.endpoints,draft:e.database.draft,workspaceId:"shared",embedded:!0,readOnly:!0})]})]})}},51212:(e,a,s)=>{"use strict";s.d(a,{SharedPlanView:()=>x});var r=s(95155),d=s(12115),t=s(25640),n=s(34306),l=s(51276),i=s(44853),o=s(51909),c=s(53981),m=s(66616),h=s(91337);function x({snapshot:e}){let a=(e.roadmap?.nodes.length??0)>0,s=(e.draft?.tables.length??0)>0||(e.draft?.endpoints.length??0)>0,p=a||s,[b,f]=(0,d.useState)(a?"map":"db"),u="map"!==b||a?"db"!==b||s?b:"map":"db",[g,v]=(0,d.useState)("plan");return(0,r.jsxs)("div",{className:"flex h-dvh flex-col bg-background",children:[(0,r.jsx)(c.E,{label:"plan from",workspaceLabel:e.workspaceLabel,createdAt:e.createdAt,verdict:e.verdict}),p&&(0,r.jsx)("div",{className:"flex shrink-0 border-b border-white/5 bg-card/40 md:hidden",children:["plan","board"].map(e=>(0,r.jsx)("button",{onClick:()=>v(e),className:(0,h.cn)("flex-1 py-2 text-[12px] font-medium capitalize transition-colors",g===e?"border-b-2 border-foreground text-foreground":"text-muted-foreground hover:text-foreground"),children:e},e))}),(0,r.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col md:flex-row",children:[(0,r.jsx)("div",{className:(0,h.cn)("min-h-0 overflow-y-auto px-5 py-5 sm:px-6",p?"md:w-[44%]":"flex-1",p&&("plan"===g?"flex-1 md:flex-none":"hidden md:block")),children:(0,r.jsx)(o.pO,{markdown:e.markdown.trim()||"_This plan has no written body._"})}),p&&(0,r.jsxs)("div",{className:(0,h.cn)("relative min-h-0 flex-1 flex-col border-l border-white/5","board"===g?"flex":"hidden md:flex"),children:[a&&s&&(0,r.jsx)("div",{className:"pointer-events-none absolute left-3 top-3 z-20",children:(0,r.jsxs)("div",{className:"glass pointer-events-auto flex items-center gap-1 rounded-full p-0.5",children:[(0,r.jsx)(m.E,{active:"map"===u,onClick:()=>f("map"),icon:(0,r.jsx)(t.A,{className:"size-3"}),children:"Features"}),(0,r.jsx)(m.E,{active:"db"===u,onClick:()=>f("db"),icon:(0,r.jsx)(n.A,{className:"size-3"}),children:"Schema"})]})}),(0,r.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:"map"===u?(0,r.jsx)(l.MapClient,{view:"ROADMAP",nodes:e.roadmap.nodes,edges:e.roadmap.edges,hasFrontend:e.roadmap.hasFrontend,embedded:!0,readOnly:!0}):(0,r.jsx)(i.DbMapClient,{tables:[],relations:[],endpoints:[],draft:e.draft??null,workspaceId:"shared",embedded:!0,readOnly:!0})})]})]})]})}},53981:(e,a,s)=>{"use strict";s.d(a,{E:()=>n});var r=s(95155);let d=(0,s(30772).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var t=s(91337);function n({label:e,workspaceLabel:a,createdAt:s,verdict:l}){return(0,r.jsxs)("header",{className:"relative z-20 flex h-12 shrink-0 items-center gap-2 border-b border-white/5 bg-card/40 px-3 backdrop-blur sm:gap-3 sm:px-4",children:[(0,r.jsxs)("span",{className:"flex shrink-0 items-center gap-1.5 rounded-full bg-white/[0.06] px-2.5 py-1 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:[(0,r.jsx)(d,{className:"size-3"})," Read-only"]}),(0,r.jsxs)("span",{className:"min-w-0 flex-1 truncate text-[12px] text-muted-foreground",children:[e," ",(0,r.jsx)("span",{className:"text-foreground",children:a})," \xb7 ",new Date(s).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})]}),l&&(0,r.jsx)("span",{className:(0,t.cn)("shrink-0 rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide","approved"===l?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),children:l}),(0,r.jsxs)("a",{href:"https://www.trybeacon.sh",target:"_blank",rel:"noreferrer",className:"shrink-0 whitespace-nowrap text-[11px] text-muted-foreground transition-colors hover:text-foreground",children:[(0,r.jsx)("span",{className:"hidden sm:inline",children:"Made with "}),"Beacon"]})]})}},60976:(e,a,s)=>{"use strict";s.d(a,{A:()=>r});let r=(0,s(30772).A)("redo-2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]])},80239:(e,a,s)=>{Promise.resolve().then(s.bind(s,48045)),Promise.resolve().then(s.bind(s,51212)),Promise.resolve().then(s.bind(s,71265))}},e=>{e.O(0,[2574,3862,5004,277,8500,4888,8997,9887,5957,766,2059,2231,1276,4853,1909,8441,3794,7358],()=>e(e.s=80239)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9962],{15330:(e,a,s)=>{"use strict";s.d(a,{A:()=>r});let r=(0,s(30772).A)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]])},48045:(e,a,s)=>{"use strict";s.d(a,{SharedBoardView:()=>x});var r=s(95155),d=s(12115),t=s(25640),n=s(83599),l=s(34306),i=s(86371),o=s(44853),c=s(53981),m=s(91337);let h={ROADMAP:{label:"Roadmap",icon:(0,r.jsx)(t.A,{className:"size-3"})},ARCHITECTURE:{label:"Architecture",icon:(0,r.jsx)(n.A,{className:"size-3"})},DATABASE:{label:"Database",icon:(0,r.jsx)(l.A,{className:"size-3"})}};function x({snapshot:e}){let a=e.selectedTabs.filter(e=>h[e]),[s,t]=(0,d.useState)(a[0]??"ROADMAP");return(0,r.jsxs)("div",{className:"flex h-dvh flex-col bg-background",children:[(0,r.jsx)(c.E,{label:"shared from",workspaceLabel:e.workspaceLabel,createdAt:e.createdAt}),(0,r.jsxs)("main",{className:"relative min-h-0 flex-1 overflow-hidden",children:[a.length>1&&(0,r.jsx)("nav",{className:"absolute left-1/2 top-3 z-20 max-w-[calc(100%-1.5rem)] -translate-x-1/2",children:(0,r.jsx)("div",{className:"glass flex items-center gap-1 rounded-full p-0.5",children:a.map(e=>(0,r.jsxs)("button",{onClick:()=>t(e),title:h[e].label,className:(0,m.cn)("flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[11px] font-medium transition-colors",s===e?"bg-white/10 text-foreground":"text-muted-foreground hover:text-foreground"),children:[h[e].icon,(0,r.jsx)("span",{className:"hidden sm:inline",children:h[e].label})]},e))})}),"ROADMAP"===s&&e.roadmap&&(0,r.jsx)(i.MapClient,{view:"ROADMAP",nodes:e.roadmap.nodes,edges:e.roadmap.edges,hasFrontend:e.roadmap.hasFrontend,embedded:!0,readOnly:!0,firstTapHighlightsOnly:!0}),"ARCHITECTURE"===s&&e.architecture&&(0,r.jsx)(i.MapClient,{view:"ARCHITECTURE",nodes:e.architecture.nodes,edges:e.architecture.edges,hasFrontend:e.architecture.hasFrontend,embedded:!0,readOnly:!0,firstTapHighlightsOnly:!0}),"DATABASE"===s&&e.database&&(0,r.jsx)(o.DbMapClient,{tables:e.database.tables,relations:e.database.relations,endpoints:e.database.endpoints,draft:e.database.draft,workspaceId:"shared",embedded:!0,readOnly:!0})]})]})}},51212:(e,a,s)=>{"use strict";s.d(a,{SharedPlanView:()=>x});var r=s(95155),d=s(12115),t=s(25640),n=s(34306),l=s(86371),i=s(44853),o=s(51909),c=s(53981),m=s(66616),h=s(91337);function x({snapshot:e}){let a=(e.roadmap?.nodes.length??0)>0,s=(e.draft?.tables.length??0)>0||(e.draft?.endpoints.length??0)>0,p=a||s,[b,f]=(0,d.useState)(a?"map":"db"),u="map"!==b||a?"db"!==b||s?b:"map":"db",[g,v]=(0,d.useState)("plan");return(0,r.jsxs)("div",{className:"flex h-dvh flex-col bg-background",children:[(0,r.jsx)(c.E,{label:"plan from",workspaceLabel:e.workspaceLabel,createdAt:e.createdAt,verdict:e.verdict}),p&&(0,r.jsx)("div",{className:"flex shrink-0 border-b border-white/5 bg-card/40 md:hidden",children:["plan","board"].map(e=>(0,r.jsx)("button",{onClick:()=>v(e),className:(0,h.cn)("flex-1 py-2 text-[12px] font-medium capitalize transition-colors",g===e?"border-b-2 border-foreground text-foreground":"text-muted-foreground hover:text-foreground"),children:e},e))}),(0,r.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col md:flex-row",children:[(0,r.jsx)("div",{className:(0,h.cn)("min-h-0 overflow-y-auto px-5 py-5 sm:px-6",p?"md:w-[44%]":"flex-1",p&&("plan"===g?"flex-1 md:flex-none":"hidden md:block")),children:(0,r.jsx)(o.pO,{markdown:e.markdown.trim()||"_This plan has no written body._"})}),p&&(0,r.jsxs)("div",{className:(0,h.cn)("relative min-h-0 flex-1 flex-col border-l border-white/5","board"===g?"flex":"hidden md:flex"),children:[a&&s&&(0,r.jsx)("div",{className:"pointer-events-none absolute left-3 top-3 z-20",children:(0,r.jsxs)("div",{className:"glass pointer-events-auto flex items-center gap-1 rounded-full p-0.5",children:[(0,r.jsx)(m.E,{active:"map"===u,onClick:()=>f("map"),icon:(0,r.jsx)(t.A,{className:"size-3"}),children:"Features"}),(0,r.jsx)(m.E,{active:"db"===u,onClick:()=>f("db"),icon:(0,r.jsx)(n.A,{className:"size-3"}),children:"Schema"})]})}),(0,r.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:"map"===u?(0,r.jsx)(l.MapClient,{view:"ROADMAP",nodes:e.roadmap.nodes,edges:e.roadmap.edges,hasFrontend:e.roadmap.hasFrontend,embedded:!0,readOnly:!0}):(0,r.jsx)(i.DbMapClient,{tables:[],relations:[],endpoints:[],draft:e.draft??null,workspaceId:"shared",embedded:!0,readOnly:!0})})]})]})]})}},53981:(e,a,s)=>{"use strict";s.d(a,{E:()=>n});var r=s(95155);let d=(0,s(30772).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var t=s(91337);function n({label:e,workspaceLabel:a,createdAt:s,verdict:l}){return(0,r.jsxs)("header",{className:"relative z-20 flex h-12 shrink-0 items-center gap-2 border-b border-white/5 bg-card/40 px-3 backdrop-blur sm:gap-3 sm:px-4",children:[(0,r.jsxs)("span",{className:"flex shrink-0 items-center gap-1.5 rounded-full bg-white/[0.06] px-2.5 py-1 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:[(0,r.jsx)(d,{className:"size-3"})," Read-only"]}),(0,r.jsxs)("span",{className:"min-w-0 flex-1 truncate text-[12px] text-muted-foreground",children:[e," ",(0,r.jsx)("span",{className:"text-foreground",children:a})," \xb7 ",new Date(s).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})]}),l&&(0,r.jsx)("span",{className:(0,t.cn)("shrink-0 rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide","approved"===l?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),children:l}),(0,r.jsxs)("a",{href:"https://www.trybeacon.sh",target:"_blank",rel:"noreferrer",className:"shrink-0 whitespace-nowrap text-[11px] text-muted-foreground transition-colors hover:text-foreground",children:[(0,r.jsx)("span",{className:"hidden sm:inline",children:"Made with "}),"Beacon"]})]})}},60976:(e,a,s)=>{"use strict";s.d(a,{A:()=>r});let r=(0,s(30772).A)("redo-2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]])},80239:(e,a,s)=>{Promise.resolve().then(s.bind(s,48045)),Promise.resolve().then(s.bind(s,51212)),Promise.resolve().then(s.bind(s,71265))}},e=>{e.O(0,[2574,3862,5004,277,8500,4888,8997,9887,5957,766,2059,2231,6371,4853,1909,8441,3794,7358],()=>e(e.s=80239)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,543,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5884,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9560,9751],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,543,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5884,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9560,9751],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,543,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5884,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9560,9751],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,543,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5884,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9560,9751],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);