idea-manager 1.3.5 → 1.3.6

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 (443) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +5 -5
  3. package/.next/build-manifest.json +13 -13
  4. package/.next/next-minimal-server.js.nft.json +1 -1
  5. package/.next/next-server.js.nft.json +1 -1
  6. package/.next/prerender-manifest.json +3 -3
  7. package/.next/required-server-files.js +2 -0
  8. package/.next/required-server-files.json +2 -0
  9. package/.next/server/app/_global-error/page.js +3 -10
  10. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  11. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -2
  12. package/.next/server/app/_global-error.html +2 -2
  13. package/.next/server/app/_global-error.meta +2 -1
  14. package/.next/server/app/_global-error.rsc +7 -7
  15. package/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  16. package/.next/server/app/_global-error.segments/{__PAGE__.segment.rsc → _global-error/__PAGE__.segment.rsc} +2 -2
  17. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +4 -0
  18. package/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  19. package/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  20. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  21. package/.next/server/app/_not-found/page.js +6 -13
  22. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  23. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -2
  24. package/.next/server/app/_not-found.html +2 -2
  25. package/.next/server/app/_not-found.rsc +11 -9
  26. package/.next/server/app/_not-found.segments/_full.segment.rsc +11 -9
  27. package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  28. package/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
  29. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  30. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  31. package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -2
  32. package/.next/server/app/api/archive/route.js +83 -6
  33. package/.next/server/app/api/archive/route.js.nft.json +1 -1
  34. package/.next/server/app/api/archive/route_client-reference-manifest.js +1 -2
  35. package/.next/server/app/api/filesystem/route.js +1 -6
  36. package/.next/server/app/api/filesystem/route.js.nft.json +1 -1
  37. package/.next/server/app/api/filesystem/route_client-reference-manifest.js +1 -2
  38. package/.next/server/app/api/filesystem/tree/route.js +1 -6
  39. package/.next/server/app/api/filesystem/tree/route.js.nft.json +1 -1
  40. package/.next/server/app/api/filesystem/tree/route_client-reference-manifest.js +1 -2
  41. package/.next/server/app/api/global-memo/route.js +77 -6
  42. package/.next/server/app/api/global-memo/route.js.nft.json +1 -1
  43. package/.next/server/app/api/global-memo/route_client-reference-manifest.js +1 -2
  44. package/.next/server/app/api/health/route.js +1 -6
  45. package/.next/server/app/api/health/route.js.nft.json +1 -1
  46. package/.next/server/app/api/health/route_client-reference-manifest.js +1 -2
  47. package/.next/server/app/api/projects/[id]/apply-distribute/route.js +97 -6
  48. package/.next/server/app/api/projects/[id]/apply-distribute/route.js.nft.json +1 -1
  49. package/.next/server/app/api/projects/[id]/apply-distribute/route_client-reference-manifest.js +1 -2
  50. package/.next/server/app/api/projects/[id]/auto-distribute/route.js +45 -6
  51. package/.next/server/app/api/projects/[id]/auto-distribute/route.js.nft.json +1 -1
  52. package/.next/server/app/api/projects/[id]/auto-distribute/route_client-reference-manifest.js +1 -2
  53. package/.next/server/app/api/projects/[id]/brainstorm/route.js +77 -6
  54. package/.next/server/app/api/projects/[id]/brainstorm/route.js.nft.json +1 -1
  55. package/.next/server/app/api/projects/[id]/brainstorm/route_client-reference-manifest.js +1 -2
  56. package/.next/server/app/api/projects/[id]/git-sync/route.js +77 -6
  57. package/.next/server/app/api/projects/[id]/git-sync/route.js.nft.json +1 -1
  58. package/.next/server/app/api/projects/[id]/git-sync/route_client-reference-manifest.js +1 -2
  59. package/.next/server/app/api/projects/[id]/route.js +77 -6
  60. package/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
  61. package/.next/server/app/api/projects/[id]/route_client-reference-manifest.js +1 -2
  62. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/route.js +91 -6
  63. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/route.js.nft.json +1 -1
  64. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/route_client-reference-manifest.js +1 -2
  65. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/chat/route.js +22 -6
  66. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/chat/route.js.nft.json +1 -1
  67. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/chat/route_client-reference-manifest.js +1 -2
  68. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/prompt/route.js +77 -6
  69. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/prompt/route.js.nft.json +1 -1
  70. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/prompt/route_client-reference-manifest.js +1 -2
  71. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/route.js +83 -6
  72. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/route.js.nft.json +1 -1
  73. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/route_client-reference-manifest.js +1 -2
  74. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/route.js +83 -6
  75. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/route.js.nft.json +1 -1
  76. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/route_client-reference-manifest.js +1 -2
  77. package/.next/server/app/api/projects/[id]/sub-projects/route.js +91 -6
  78. package/.next/server/app/api/projects/[id]/sub-projects/route.js.nft.json +1 -1
  79. package/.next/server/app/api/projects/[id]/sub-projects/route_client-reference-manifest.js +1 -2
  80. package/.next/server/app/api/projects/route.js +77 -6
  81. package/.next/server/app/api/projects/route.js.nft.json +1 -1
  82. package/.next/server/app/api/projects/route_client-reference-manifest.js +1 -2
  83. package/.next/server/app/api/sync/route.js +77 -7
  84. package/.next/server/app/api/sync/route.js.nft.json +1 -1
  85. package/.next/server/app/api/sync/route_client-reference-manifest.js +1 -2
  86. package/.next/server/app/index.html +2 -2
  87. package/.next/server/app/index.rsc +13 -13
  88. package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  89. package/.next/server/app/index.segments/_full.segment.rsc +13 -13
  90. package/.next/server/app/index.segments/_head.segment.rsc +4 -4
  91. package/.next/server/app/index.segments/_index.segment.rsc +4 -4
  92. package/.next/server/app/index.segments/_tree.segment.rsc +4 -4
  93. package/.next/server/app/page.js +23 -15
  94. package/.next/server/app/page.js.nft.json +1 -1
  95. package/.next/server/app/page_client-reference-manifest.js +1 -2
  96. package/.next/server/app/projects/[id]/page.js +6 -15
  97. package/.next/server/app/projects/[id]/page.js.nft.json +1 -1
  98. package/.next/server/app/projects/[id]/page_client-reference-manifest.js +1 -2
  99. package/.next/server/app-paths-manifest.json +5 -5
  100. package/.next/server/chunks/445.js +22 -0
  101. package/.next/server/chunks/471.js +13 -0
  102. package/.next/server/chunks/482.js +1 -0
  103. package/.next/server/chunks/806.js +77 -0
  104. package/.next/server/chunks/813.js +1 -0
  105. package/.next/server/middleware-build-manifest.js +1 -21
  106. package/.next/server/middleware-manifest.json +2 -2
  107. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  108. package/.next/server/next-font-manifest.js +1 -1
  109. package/.next/server/next-font-manifest.json +1 -19
  110. package/.next/server/pages/404.html +2 -2
  111. package/.next/server/pages/500.html +2 -2
  112. package/.next/server/server-reference-manifest.js +1 -1
  113. package/.next/server/server-reference-manifest.json +1 -5
  114. package/.next/server/webpack-runtime.js +1 -0
  115. package/.next/static/chunks/151-332d463cd8bd4db6.js +1 -0
  116. package/.next/static/chunks/4bd1b696-096d35a2bd1da3af.js +1 -0
  117. package/.next/static/chunks/794-37dad9bbc14b04b8.js +2 -0
  118. package/.next/static/chunks/app/_global-error/page-fd75b71b49e9729e.js +1 -0
  119. package/.next/static/chunks/app/_not-found/page-abee8833f317bce2.js +1 -0
  120. package/.next/static/chunks/app/api/archive/route-fd75b71b49e9729e.js +1 -0
  121. package/.next/static/chunks/app/api/filesystem/route-fd75b71b49e9729e.js +1 -0
  122. package/.next/static/chunks/app/api/filesystem/tree/route-fd75b71b49e9729e.js +1 -0
  123. package/.next/static/chunks/app/api/global-memo/route-fd75b71b49e9729e.js +1 -0
  124. package/.next/static/chunks/app/api/health/route-fd75b71b49e9729e.js +1 -0
  125. package/.next/static/chunks/app/api/projects/[id]/apply-distribute/route-fd75b71b49e9729e.js +1 -0
  126. package/.next/static/chunks/app/api/projects/[id]/auto-distribute/route-fd75b71b49e9729e.js +1 -0
  127. package/.next/static/chunks/app/api/projects/[id]/brainstorm/route-fd75b71b49e9729e.js +1 -0
  128. package/.next/static/chunks/app/api/projects/[id]/git-sync/route-fd75b71b49e9729e.js +1 -0
  129. package/.next/static/chunks/app/api/projects/[id]/route-fd75b71b49e9729e.js +1 -0
  130. package/.next/static/chunks/app/api/projects/[id]/sub-projects/[subId]/route-fd75b71b49e9729e.js +1 -0
  131. package/.next/static/chunks/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/chat/route-fd75b71b49e9729e.js +1 -0
  132. package/.next/static/chunks/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/prompt/route-fd75b71b49e9729e.js +1 -0
  133. package/.next/static/chunks/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/route-fd75b71b49e9729e.js +1 -0
  134. package/.next/static/chunks/app/api/projects/[id]/sub-projects/[subId]/tasks/route-fd75b71b49e9729e.js +1 -0
  135. package/.next/static/chunks/app/api/projects/[id]/sub-projects/route-fd75b71b49e9729e.js +1 -0
  136. package/.next/static/chunks/app/api/projects/route-fd75b71b49e9729e.js +1 -0
  137. package/.next/static/chunks/app/api/sync/route-fd75b71b49e9729e.js +1 -0
  138. package/.next/static/chunks/app/layout-52917f6c941a9818.js +1 -0
  139. package/.next/static/chunks/app/page-6bd6387a28d57acb.js +18 -0
  140. package/.next/static/chunks/app/projects/[id]/page-822db6c758e612c4.js +1 -0
  141. package/.next/static/chunks/framework-75892d61b920805f.js +1 -0
  142. package/.next/static/chunks/main-app-35159df8e1c56fc3.js +1 -0
  143. package/.next/static/chunks/main-f1d55fffd3cc9809.js +5 -0
  144. package/.next/static/chunks/next/dist/client/components/builtin/app-error-fd75b71b49e9729e.js +1 -0
  145. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-fd75b71b49e9729e.js +1 -0
  146. package/.next/static/chunks/next/dist/client/components/builtin/global-error-25a0b2af2b25843d.js +1 -0
  147. package/.next/static/chunks/next/dist/client/components/builtin/not-found-fd75b71b49e9729e.js +1 -0
  148. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-fd75b71b49e9729e.js +1 -0
  149. package/.next/static/chunks/webpack-046a553649a22885.js +1 -0
  150. package/.next/static/css/cd2b29b661e5554a.css +3 -0
  151. package/.next/static/pg-uaAz_0WfqjOVXsPpiN/_buildManifest.js +1 -0
  152. package/.next/trace +3 -1
  153. package/.next/trace-build +1 -1
  154. package/.next/types/app/api/archive/route.ts +350 -0
  155. package/.next/types/app/api/filesystem/route.ts +350 -0
  156. package/.next/types/app/api/filesystem/tree/route.ts +350 -0
  157. package/.next/types/app/api/global-memo/route.ts +350 -0
  158. package/.next/types/app/api/health/route.ts +350 -0
  159. package/.next/types/app/api/projects/[id]/apply-distribute/route.ts +350 -0
  160. package/.next/types/app/api/projects/[id]/auto-distribute/route.ts +350 -0
  161. package/.next/types/app/api/projects/[id]/brainstorm/route.ts +350 -0
  162. package/.next/types/app/api/projects/[id]/git-sync/route.ts +350 -0
  163. package/.next/types/app/api/projects/[id]/route.ts +350 -0
  164. package/.next/types/app/api/projects/[id]/sub-projects/[subId]/route.ts +350 -0
  165. package/.next/types/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/chat/route.ts +350 -0
  166. package/.next/types/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/prompt/route.ts +350 -0
  167. package/.next/types/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/route.ts +350 -0
  168. package/.next/types/app/api/projects/[id]/sub-projects/[subId]/tasks/route.ts +350 -0
  169. package/.next/types/app/api/projects/[id]/sub-projects/route.ts +350 -0
  170. package/.next/types/app/api/projects/route.ts +350 -0
  171. package/.next/types/app/api/sync/route.ts +350 -0
  172. package/.next/types/app/layout.ts +86 -0
  173. package/.next/types/app/page.ts +86 -0
  174. package/.next/types/app/projects/[id]/page.ts +86 -0
  175. package/.next/types/package.json +1 -0
  176. package/package.json +2 -2
  177. package/.next/build/chunks/[root-of-the-server]__51225daf._.js +0 -206
  178. package/.next/build/chunks/[root-of-the-server]__51225daf._.js.map +0 -8
  179. package/.next/build/chunks/[root-of-the-server]__974941ed._.js +0 -500
  180. package/.next/build/chunks/[root-of-the-server]__974941ed._.js.map +0 -11
  181. package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_6920245c._.js +0 -13
  182. package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_6920245c._.js.map +0 -5
  183. package/.next/build/chunks/[turbopack]_runtime.js +0 -795
  184. package/.next/build/chunks/[turbopack]_runtime.js.map +0 -10
  185. package/.next/build/chunks/node_modules_2d7da256._.js +0 -6765
  186. package/.next/build/chunks/node_modules_2d7da256._.js.map +0 -47
  187. package/.next/build/package.json +0 -1
  188. package/.next/build/postcss.js +0 -6
  189. package/.next/build/postcss.js.map +0 -5
  190. package/.next/fallback-build-manifest.json +0 -12
  191. package/.next/server/app/_global-error/page/app-paths-manifest.json +0 -3
  192. package/.next/server/app/_global-error/page/build-manifest.json +0 -17
  193. package/.next/server/app/_global-error/page/next-font-manifest.json +0 -6
  194. package/.next/server/app/_global-error/page/server-reference-manifest.json +0 -4
  195. package/.next/server/app/_global-error/page.js.map +0 -5
  196. package/.next/server/app/_not-found/page/app-paths-manifest.json +0 -3
  197. package/.next/server/app/_not-found/page/build-manifest.json +0 -17
  198. package/.next/server/app/_not-found/page/next-font-manifest.json +0 -11
  199. package/.next/server/app/_not-found/page/react-loadable-manifest.json +0 -1
  200. package/.next/server/app/_not-found/page/server-reference-manifest.json +0 -4
  201. package/.next/server/app/_not-found/page.js.map +0 -5
  202. package/.next/server/app/api/archive/route/app-paths-manifest.json +0 -3
  203. package/.next/server/app/api/archive/route/build-manifest.json +0 -11
  204. package/.next/server/app/api/archive/route/server-reference-manifest.json +0 -4
  205. package/.next/server/app/api/archive/route.js.map +0 -5
  206. package/.next/server/app/api/filesystem/route/app-paths-manifest.json +0 -3
  207. package/.next/server/app/api/filesystem/route/build-manifest.json +0 -11
  208. package/.next/server/app/api/filesystem/route/server-reference-manifest.json +0 -4
  209. package/.next/server/app/api/filesystem/route.js.map +0 -5
  210. package/.next/server/app/api/filesystem/tree/route/app-paths-manifest.json +0 -3
  211. package/.next/server/app/api/filesystem/tree/route/build-manifest.json +0 -11
  212. package/.next/server/app/api/filesystem/tree/route/server-reference-manifest.json +0 -4
  213. package/.next/server/app/api/filesystem/tree/route.js.map +0 -5
  214. package/.next/server/app/api/global-memo/route/app-paths-manifest.json +0 -3
  215. package/.next/server/app/api/global-memo/route/build-manifest.json +0 -11
  216. package/.next/server/app/api/global-memo/route/server-reference-manifest.json +0 -4
  217. package/.next/server/app/api/global-memo/route.js.map +0 -5
  218. package/.next/server/app/api/health/route/app-paths-manifest.json +0 -3
  219. package/.next/server/app/api/health/route/build-manifest.json +0 -11
  220. package/.next/server/app/api/health/route/server-reference-manifest.json +0 -4
  221. package/.next/server/app/api/health/route.js.map +0 -5
  222. package/.next/server/app/api/projects/[id]/apply-distribute/route/app-paths-manifest.json +0 -3
  223. package/.next/server/app/api/projects/[id]/apply-distribute/route/build-manifest.json +0 -11
  224. package/.next/server/app/api/projects/[id]/apply-distribute/route/server-reference-manifest.json +0 -4
  225. package/.next/server/app/api/projects/[id]/apply-distribute/route.js.map +0 -5
  226. package/.next/server/app/api/projects/[id]/auto-distribute/route/app-paths-manifest.json +0 -3
  227. package/.next/server/app/api/projects/[id]/auto-distribute/route/build-manifest.json +0 -11
  228. package/.next/server/app/api/projects/[id]/auto-distribute/route/server-reference-manifest.json +0 -4
  229. package/.next/server/app/api/projects/[id]/auto-distribute/route.js.map +0 -5
  230. package/.next/server/app/api/projects/[id]/brainstorm/route/app-paths-manifest.json +0 -3
  231. package/.next/server/app/api/projects/[id]/brainstorm/route/build-manifest.json +0 -11
  232. package/.next/server/app/api/projects/[id]/brainstorm/route/server-reference-manifest.json +0 -4
  233. package/.next/server/app/api/projects/[id]/brainstorm/route.js.map +0 -5
  234. package/.next/server/app/api/projects/[id]/git-sync/route/app-paths-manifest.json +0 -3
  235. package/.next/server/app/api/projects/[id]/git-sync/route/build-manifest.json +0 -11
  236. package/.next/server/app/api/projects/[id]/git-sync/route/server-reference-manifest.json +0 -4
  237. package/.next/server/app/api/projects/[id]/git-sync/route.js.map +0 -5
  238. package/.next/server/app/api/projects/[id]/route/app-paths-manifest.json +0 -3
  239. package/.next/server/app/api/projects/[id]/route/build-manifest.json +0 -11
  240. package/.next/server/app/api/projects/[id]/route/server-reference-manifest.json +0 -4
  241. package/.next/server/app/api/projects/[id]/route.js.map +0 -5
  242. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/route/app-paths-manifest.json +0 -3
  243. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/route/build-manifest.json +0 -11
  244. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/route/server-reference-manifest.json +0 -4
  245. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/route.js.map +0 -5
  246. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/chat/route/app-paths-manifest.json +0 -3
  247. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/chat/route/build-manifest.json +0 -11
  248. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/chat/route/server-reference-manifest.json +0 -4
  249. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/chat/route.js.map +0 -5
  250. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/prompt/route/app-paths-manifest.json +0 -3
  251. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/prompt/route/build-manifest.json +0 -11
  252. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/prompt/route/server-reference-manifest.json +0 -4
  253. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/prompt/route.js.map +0 -5
  254. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/route/app-paths-manifest.json +0 -3
  255. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/route/build-manifest.json +0 -11
  256. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/route/server-reference-manifest.json +0 -4
  257. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/[taskId]/route.js.map +0 -5
  258. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/route/app-paths-manifest.json +0 -3
  259. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/route/build-manifest.json +0 -11
  260. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/route/server-reference-manifest.json +0 -4
  261. package/.next/server/app/api/projects/[id]/sub-projects/[subId]/tasks/route.js.map +0 -5
  262. package/.next/server/app/api/projects/[id]/sub-projects/route/app-paths-manifest.json +0 -3
  263. package/.next/server/app/api/projects/[id]/sub-projects/route/build-manifest.json +0 -11
  264. package/.next/server/app/api/projects/[id]/sub-projects/route/server-reference-manifest.json +0 -4
  265. package/.next/server/app/api/projects/[id]/sub-projects/route.js.map +0 -5
  266. package/.next/server/app/api/projects/route/app-paths-manifest.json +0 -3
  267. package/.next/server/app/api/projects/route/build-manifest.json +0 -11
  268. package/.next/server/app/api/projects/route/server-reference-manifest.json +0 -4
  269. package/.next/server/app/api/projects/route.js.map +0 -5
  270. package/.next/server/app/api/sync/route/app-paths-manifest.json +0 -3
  271. package/.next/server/app/api/sync/route/build-manifest.json +0 -11
  272. package/.next/server/app/api/sync/route/server-reference-manifest.json +0 -4
  273. package/.next/server/app/api/sync/route.js.map +0 -5
  274. package/.next/server/app/page/app-paths-manifest.json +0 -3
  275. package/.next/server/app/page/build-manifest.json +0 -17
  276. package/.next/server/app/page/next-font-manifest.json +0 -11
  277. package/.next/server/app/page/react-loadable-manifest.json +0 -1
  278. package/.next/server/app/page/server-reference-manifest.json +0 -4
  279. package/.next/server/app/page.js.map +0 -5
  280. package/.next/server/app/projects/[id]/page/app-paths-manifest.json +0 -3
  281. package/.next/server/app/projects/[id]/page/build-manifest.json +0 -17
  282. package/.next/server/app/projects/[id]/page/next-font-manifest.json +0 -11
  283. package/.next/server/app/projects/[id]/page/react-loadable-manifest.json +0 -1
  284. package/.next/server/app/projects/[id]/page/server-reference-manifest.json +0 -4
  285. package/.next/server/app/projects/[id]/page.js.map +0 -5
  286. package/.next/server/chunks/1a58a_projects_[id]_sub-projects_[subId]_tasks_[taskId]_chat_route_actions_1be27c01.js +0 -3
  287. package/.next/server/chunks/1a58a_projects_[id]_sub-projects_[subId]_tasks_[taskId]_chat_route_actions_1be27c01.js.map +0 -1
  288. package/.next/server/chunks/1a58a_projects_[id]_sub-projects_[subId]_tasks_[taskId]_prompt_route_actions_5ee3e100.js +0 -3
  289. package/.next/server/chunks/1a58a_projects_[id]_sub-projects_[subId]_tasks_[taskId]_prompt_route_actions_5ee3e100.js.map +0 -1
  290. package/.next/server/chunks/3e585_api_projects_[id]_sub-projects_[subId]_tasks_[taskId]_route_actions_47f36e9b.js +0 -3
  291. package/.next/server/chunks/3e585_api_projects_[id]_sub-projects_[subId]_tasks_[taskId]_route_actions_47f36e9b.js.map +0 -1
  292. package/.next/server/chunks/[root-of-the-server]__2a52210d._.js +0 -100
  293. package/.next/server/chunks/[root-of-the-server]__2a52210d._.js.map +0 -1
  294. package/.next/server/chunks/[root-of-the-server]__34701b49._.js +0 -79
  295. package/.next/server/chunks/[root-of-the-server]__34701b49._.js.map +0 -1
  296. package/.next/server/chunks/[root-of-the-server]__3b497ee5._.js +0 -79
  297. package/.next/server/chunks/[root-of-the-server]__3b497ee5._.js.map +0 -1
  298. package/.next/server/chunks/[root-of-the-server]__496e96d0._.js +0 -79
  299. package/.next/server/chunks/[root-of-the-server]__496e96d0._.js.map +0 -1
  300. package/.next/server/chunks/[root-of-the-server]__5d7dc5dc._.js +0 -85
  301. package/.next/server/chunks/[root-of-the-server]__5d7dc5dc._.js.map +0 -1
  302. package/.next/server/chunks/[root-of-the-server]__65ee5804._.js +0 -3
  303. package/.next/server/chunks/[root-of-the-server]__65ee5804._.js.map +0 -1
  304. package/.next/server/chunks/[root-of-the-server]__78ead139._.js +0 -3
  305. package/.next/server/chunks/[root-of-the-server]__78ead139._.js.map +0 -1
  306. package/.next/server/chunks/[root-of-the-server]__7f22619d._.js +0 -79
  307. package/.next/server/chunks/[root-of-the-server]__7f22619d._.js.map +0 -1
  308. package/.next/server/chunks/[root-of-the-server]__894e451b._.js +0 -3
  309. package/.next/server/chunks/[root-of-the-server]__894e451b._.js.map +0 -1
  310. package/.next/server/chunks/[root-of-the-server]__8e7eb129._.js +0 -79
  311. package/.next/server/chunks/[root-of-the-server]__8e7eb129._.js.map +0 -1
  312. package/.next/server/chunks/[root-of-the-server]__b6f77030._.js +0 -85
  313. package/.next/server/chunks/[root-of-the-server]__b6f77030._.js.map +0 -1
  314. package/.next/server/chunks/[root-of-the-server]__bb8ddf02._.js +0 -85
  315. package/.next/server/chunks/[root-of-the-server]__bb8ddf02._.js.map +0 -1
  316. package/.next/server/chunks/[root-of-the-server]__c451a819._.js +0 -93
  317. package/.next/server/chunks/[root-of-the-server]__c451a819._.js.map +0 -1
  318. package/.next/server/chunks/[root-of-the-server]__c9875abe._.js +0 -123
  319. package/.next/server/chunks/[root-of-the-server]__c9875abe._.js.map +0 -1
  320. package/.next/server/chunks/[root-of-the-server]__d66bf38b._.js +0 -79
  321. package/.next/server/chunks/[root-of-the-server]__d66bf38b._.js.map +0 -1
  322. package/.next/server/chunks/[root-of-the-server]__eb0e8539._.js +0 -79
  323. package/.next/server/chunks/[root-of-the-server]__eb0e8539._.js.map +0 -1
  324. package/.next/server/chunks/[root-of-the-server]__f408c708._.js +0 -21
  325. package/.next/server/chunks/[root-of-the-server]__f408c708._.js.map +0 -1
  326. package/.next/server/chunks/[root-of-the-server]__fbbecda7._.js +0 -93
  327. package/.next/server/chunks/[root-of-the-server]__fbbecda7._.js.map +0 -1
  328. package/.next/server/chunks/[root-of-the-server]__fd0f0b60._.js +0 -99
  329. package/.next/server/chunks/[root-of-the-server]__fd0f0b60._.js.map +0 -1
  330. package/.next/server/chunks/[turbopack]_runtime.js +0 -795
  331. package/.next/server/chunks/[turbopack]_runtime.js.map +0 -10
  332. package/.next/server/chunks/_next-internal_server_app_api_archive_route_actions_f5db166b.js +0 -3
  333. package/.next/server/chunks/_next-internal_server_app_api_archive_route_actions_f5db166b.js.map +0 -1
  334. package/.next/server/chunks/_next-internal_server_app_api_filesystem_route_actions_4d8f988e.js +0 -3
  335. package/.next/server/chunks/_next-internal_server_app_api_filesystem_route_actions_4d8f988e.js.map +0 -1
  336. package/.next/server/chunks/_next-internal_server_app_api_filesystem_tree_route_actions_9c467f18.js +0 -3
  337. package/.next/server/chunks/_next-internal_server_app_api_filesystem_tree_route_actions_9c467f18.js.map +0 -1
  338. package/.next/server/chunks/_next-internal_server_app_api_global-memo_route_actions_22c30ae0.js +0 -3
  339. package/.next/server/chunks/_next-internal_server_app_api_global-memo_route_actions_22c30ae0.js.map +0 -1
  340. package/.next/server/chunks/_next-internal_server_app_api_health_route_actions_da3433c4.js +0 -3
  341. package/.next/server/chunks/_next-internal_server_app_api_health_route_actions_da3433c4.js.map +0 -1
  342. package/.next/server/chunks/_next-internal_server_app_api_projects_[id]_brainstorm_route_actions_e2dbd41e.js +0 -3
  343. package/.next/server/chunks/_next-internal_server_app_api_projects_[id]_brainstorm_route_actions_e2dbd41e.js.map +0 -1
  344. package/.next/server/chunks/_next-internal_server_app_api_projects_[id]_git-sync_route_actions_0a84c322.js +0 -3
  345. package/.next/server/chunks/_next-internal_server_app_api_projects_[id]_git-sync_route_actions_0a84c322.js.map +0 -1
  346. package/.next/server/chunks/_next-internal_server_app_api_projects_[id]_route_actions_6fd2e5a5.js +0 -3
  347. package/.next/server/chunks/_next-internal_server_app_api_projects_[id]_route_actions_6fd2e5a5.js.map +0 -1
  348. package/.next/server/chunks/_next-internal_server_app_api_projects_[id]_sub-projects_route_actions_0c31d31d.js +0 -3
  349. package/.next/server/chunks/_next-internal_server_app_api_projects_[id]_sub-projects_route_actions_0c31d31d.js.map +0 -1
  350. package/.next/server/chunks/_next-internal_server_app_api_projects_route_actions_38c611ee.js +0 -3
  351. package/.next/server/chunks/_next-internal_server_app_api_projects_route_actions_38c611ee.js.map +0 -1
  352. package/.next/server/chunks/_next-internal_server_app_api_sync_route_actions_78e25bf5.js +0 -3
  353. package/.next/server/chunks/_next-internal_server_app_api_sync_route_actions_78e25bf5.js.map +0 -1
  354. package/.next/server/chunks/ce889_server_app_api_projects_[id]_apply-distribute_route_actions_df2ffb77.js +0 -3
  355. package/.next/server/chunks/ce889_server_app_api_projects_[id]_apply-distribute_route_actions_df2ffb77.js.map +0 -1
  356. package/.next/server/chunks/ce889_server_app_api_projects_[id]_auto-distribute_route_actions_0d998155.js +0 -3
  357. package/.next/server/chunks/ce889_server_app_api_projects_[id]_auto-distribute_route_actions_0d998155.js.map +0 -1
  358. package/.next/server/chunks/ce889_server_app_api_projects_[id]_sub-projects_[subId]_route_actions_d3d7322e.js +0 -3
  359. package/.next/server/chunks/ce889_server_app_api_projects_[id]_sub-projects_[subId]_route_actions_d3d7322e.js.map +0 -1
  360. package/.next/server/chunks/ce889_server_app_api_projects_[id]_sub-projects_[subId]_tasks_route_actions_c6a0ca5c.js +0 -3
  361. package/.next/server/chunks/ce889_server_app_api_projects_[id]_sub-projects_[subId]_tasks_route_actions_c6a0ca5c.js.map +0 -1
  362. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_8aec5fa3.js +0 -3
  363. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_8aec5fa3.js.map +0 -1
  364. package/.next/server/chunks/ssr/[root-of-the-server]__11fa4345._.js +0 -7
  365. package/.next/server/chunks/ssr/[root-of-the-server]__11fa4345._.js.map +0 -1
  366. package/.next/server/chunks/ssr/[root-of-the-server]__15600e29._.js +0 -3
  367. package/.next/server/chunks/ssr/[root-of-the-server]__15600e29._.js.map +0 -1
  368. package/.next/server/chunks/ssr/[root-of-the-server]__1690ee0d._.js +0 -10
  369. package/.next/server/chunks/ssr/[root-of-the-server]__1690ee0d._.js.map +0 -1
  370. package/.next/server/chunks/ssr/[root-of-the-server]__25744882._.js +0 -3
  371. package/.next/server/chunks/ssr/[root-of-the-server]__25744882._.js.map +0 -1
  372. package/.next/server/chunks/ssr/[root-of-the-server]__685464c9._.js +0 -3
  373. package/.next/server/chunks/ssr/[root-of-the-server]__685464c9._.js.map +0 -1
  374. package/.next/server/chunks/ssr/[root-of-the-server]__72142a5d._.js +0 -3
  375. package/.next/server/chunks/ssr/[root-of-the-server]__72142a5d._.js.map +0 -1
  376. package/.next/server/chunks/ssr/[root-of-the-server]__75a388cb._.js +0 -20
  377. package/.next/server/chunks/ssr/[root-of-the-server]__75a388cb._.js.map +0 -1
  378. package/.next/server/chunks/ssr/[root-of-the-server]__830451e1._.js +0 -3
  379. package/.next/server/chunks/ssr/[root-of-the-server]__830451e1._.js.map +0 -1
  380. package/.next/server/chunks/ssr/[root-of-the-server]__b9356576._.js +0 -4
  381. package/.next/server/chunks/ssr/[root-of-the-server]__b9356576._.js.map +0 -1
  382. package/.next/server/chunks/ssr/[root-of-the-server]__ba92c669._.js +0 -3
  383. package/.next/server/chunks/ssr/[root-of-the-server]__ba92c669._.js.map +0 -1
  384. package/.next/server/chunks/ssr/[root-of-the-server]__eb5bf179._.js +0 -3
  385. package/.next/server/chunks/ssr/[root-of-the-server]__eb5bf179._.js.map +0 -1
  386. package/.next/server/chunks/ssr/[root-of-the-server]__f437da88._.js +0 -3
  387. package/.next/server/chunks/ssr/[root-of-the-server]__f437da88._.js.map +0 -1
  388. package/.next/server/chunks/ssr/[turbopack]_runtime.js +0 -795
  389. package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +0 -10
  390. package/.next/server/chunks/ssr/_67775056._.js +0 -4
  391. package/.next/server/chunks/ssr/_67775056._.js.map +0 -1
  392. package/.next/server/chunks/ssr/_c1309523._.js +0 -4
  393. package/.next/server/chunks/ssr/_c1309523._.js.map +0 -1
  394. package/.next/server/chunks/ssr/_c6614283._.js +0 -6
  395. package/.next/server/chunks/ssr/_c6614283._.js.map +0 -1
  396. package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_75761787.js +0 -3
  397. package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_75761787.js.map +0 -1
  398. package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_554ec2bf.js +0 -3
  399. package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_554ec2bf.js.map +0 -1
  400. package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_39d4fc33.js +0 -3
  401. package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_39d4fc33.js.map +0 -1
  402. package/.next/server/chunks/ssr/_next-internal_server_app_projects_[id]_page_actions_38fa8475.js +0 -3
  403. package/.next/server/chunks/ssr/_next-internal_server_app_projects_[id]_page_actions_38fa8475.js.map +0 -1
  404. package/.next/server/chunks/ssr/node_modules_next_dist_08570d7f._.js +0 -4
  405. package/.next/server/chunks/ssr/node_modules_next_dist_08570d7f._.js.map +0 -1
  406. package/.next/server/chunks/ssr/node_modules_next_dist_4b63a0e1._.js +0 -3
  407. package/.next/server/chunks/ssr/node_modules_next_dist_4b63a0e1._.js.map +0 -1
  408. package/.next/server/chunks/ssr/node_modules_next_dist_681edc0a._.js +0 -6
  409. package/.next/server/chunks/ssr/node_modules_next_dist_681edc0a._.js.map +0 -1
  410. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_9774470f._.js +0 -3
  411. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_9774470f._.js.map +0 -1
  412. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_45780354.js +0 -3
  413. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_45780354.js.map +0 -1
  414. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_ece394eb.js +0 -3
  415. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_ece394eb.js.map +0 -1
  416. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_15817684.js +0 -3
  417. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_15817684.js.map +0 -1
  418. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_65a7265e.js +0 -4
  419. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_65a7265e.js.map +0 -1
  420. package/.next/server/chunks/ssr/node_modules_next_dist_f9713a08._.js +0 -3
  421. package/.next/server/chunks/ssr/node_modules_next_dist_f9713a08._.js.map +0 -1
  422. package/.next/static/chunks/385fc008b130bf74.js +0 -18
  423. package/.next/static/chunks/49e97d465ceca13b.js +0 -1
  424. package/.next/static/chunks/6e093cead5296944.js +0 -1
  425. package/.next/static/chunks/7b694eaada62ea2a.js +0 -1
  426. package/.next/static/chunks/7de9141b1af425c3.js +0 -1
  427. package/.next/static/chunks/86a65d1968466727.js +0 -2
  428. package/.next/static/chunks/a6dad97d9634a72d.js.map +0 -1
  429. package/.next/static/chunks/beee8ee1af8e6c72.js +0 -4
  430. package/.next/static/chunks/c8ce5b975abff10f.css +0 -3
  431. package/.next/static/chunks/turbopack-95ef14dd34e4eb10.js +0 -4
  432. package/.next/static/rPCRfdyLwhwdfgixlvq0W/_buildManifest.js +0 -11
  433. package/.next/static/rPCRfdyLwhwdfgixlvq0W/_clientMiddlewareManifest.json +0 -1
  434. package/.next/turbopack +0 -0
  435. /package/.next/{server/app/_global-error/page/react-loadable-manifest.json → react-loadable-manifest.json} +0 -0
  436. /package/.next/static/chunks/{a6dad97d9634a72d.js → polyfills-42372ed130431b0a.js} +0 -0
  437. /package/.next/static/media/{caa3a2e1cccd8315-s.p.853070df.woff2 → 4cf2300e9c8272f7-s.p.woff2} +0 -0
  438. /package/.next/static/media/{bbc41e54d2fcbd21-s.799d8ef8.woff2 → 747892c23ea88013-s.woff2} +0 -0
  439. /package/.next/static/media/{8a480f0b521d4e75-s.8e0177b5.woff2 → 8d697b304b401681-s.woff2} +0 -0
  440. /package/.next/static/media/{797e433ab948586e-s.p.dbea232f.woff2 → 93f479601ee12b01-s.p.woff2} +0 -0
  441. /package/.next/static/media/{4fa387ec64143e14-s.c1fdd6c2.woff2 → 9610d9e46709d722-s.woff2} +0 -0
  442. /package/.next/static/media/{7178b3e590c64307-s.b97b3418.woff2 → ba015fad6dcf6784-s.woff2} +0 -0
  443. /package/.next/static/{rPCRfdyLwhwdfgixlvq0W → pg-uaAz_0WfqjOVXsPpiN}/_ssgManifest.js +0 -0
@@ -1,18 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,26568,(e,t,n)=>{"use strict";var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,l=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g;function d(e){return e?e.replace(c,""):""}t.exports=function(e,t){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,c=1;function f(e){var t=e.match(i);t&&(n+=t.length);var r=e.lastIndexOf("\n");c=~r?e.length-r:c+e.length}function p(){var e={line:n,column:c};return function(t){return t.position=new h(e),g(l),t}}function h(e){this.start=e,this.end={line:n,column:c},this.source=t.source}function m(r){var i=Error(t.source+":"+n+":"+c+": "+r);if(i.reason=r,i.filename=t.source,i.line=n,i.column=c,i.source=e,t.silent);else throw i}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function x(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=p();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return m("End of comment missing");var r=e.slice(2,n-2);return c+=2,f(r),e=e.slice(n),c+=2,t({type:"comment",comment:r})}}h.prototype.content=e,g(l);var y,v=[];for(x(v);y=function(){var e=p(),t=g(o);if(t){if(b(),!g(a))return m("property missing ':'");var n=g(s),i=e({type:"declaration",property:d(t[0].replace(r,"")),value:n?d(n[0].replace(r,"")):""});return g(u),i}}();)!1!==y&&(v.push(y),x(v));return v}},70454,(e,t,n)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;let r=(0,i.default)(e),l="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;let{property:r,value:i}=e;l?t(r,i,e):i&&((n=n||{})[r]=i)}),n};let i=r(e.r(26568))},65185,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.camelCase=void 0;var r=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,l=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},u=function(e,t){return"".concat(t,"-")};n.camelCase=function(e,t){var n;return(void 0===t&&(t={}),!(n=e)||l.test(n)||r.test(n))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,u):e.replace(o,u)).replace(i,s))}},15511,(e,t,n)=>{"use strict";var r=(e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(e.r(70454)),i=e.r(65185);function l(e,t){var n={};return e&&"string"==typeof e&&(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}l.default=l,t.exports=l},4100,(e,t,n)=>{"use strict";var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,l=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},s=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),l=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!l)return!1;for(t in e);return void 0===t||r.call(e,t)},u=function(e,t){l&&"__proto__"===t.name?l(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;else if(o)return o(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,l,o,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(t=arguments[f],null!=t)for(n in t)r=c(d,n),d!==(i=c(t,n))&&(h&&i&&(s(i)||(l=a(i)))?(l?(l=!1,o=r&&a(r)?r:[]):o=r&&s(r)?r:{},u(d,{name:n,newValue:e(h,o,i)})):void 0!==i&&u(d,{name:n,newValue:i}));return d}},52683,e=>{"use strict";let t;var n,r,i,l,o,a,s,u,c,d,f,p,h,m,g,x,b,y,v,k=e.i(18050),w=e.i(71645);let j={id:"dashboard",type:"dashboard"};function C(e){return e.some(e=>"dashboard"===e.id)?e:[j,...e]}function S(e,t){switch(t.type){case"OPEN_PROJECT":{let n=e.tabs.find(e=>e.projectId===t.projectId);if(n)return{tabs:e.tabs.map(e=>e.id===n.id?{...e,initialSubId:t.initialSubId,initialTaskId:t.initialTaskId}:e),activeTabId:n.id};let r={id:t.projectId,type:"project",projectId:t.projectId,projectName:t.projectName,initialSubId:t.initialSubId,initialTaskId:t.initialTaskId};return{tabs:[...e.tabs,r],activeTabId:r.id}}case"CLOSE_TAB":{if("dashboard"===t.tabId)return e;let n=e.tabs.findIndex(e=>e.id===t.tabId),r=e.tabs.filter(e=>e.id!==t.tabId),i=e.activeTabId;return e.activeTabId===t.tabId&&(i=r[Math.max(0,n-1)]?.id||"dashboard"),{tabs:C(r),activeTabId:i}}case"SET_ACTIVE":return{...e,activeTabId:t.tabId};case"UPDATE_TAB_NAME":return{...e,tabs:e.tabs.map(e=>e.id===t.tabId?{...e,projectName:t.name}:e)};case"CONSUME_INITIAL":return{...e,tabs:e.tabs.map(e=>e.id===t.tabId?{...e,initialSubId:void 0,initialTaskId:void 0}:e)};case"HYDRATE":return{tabs:C(t.state.tabs),activeTabId:t.state.activeTabId};default:return e}}let N="im-tabs",E={tabs:[j],activeTabId:"dashboard"};function T(){return E}let D=(0,w.createContext)(null);function I(){let e=(0,w.useContext)(D);if(!e)throw Error("useTabContext must be used within TabProvider");return e}function A({children:e}){let[t,n]=(0,w.useReducer)(S,void 0,T);(0,w.useEffect)(()=>{try{let e=localStorage.getItem(N);if(e){let t=JSON.parse(e);n({type:"HYDRATE",state:{tabs:C(t.tabs),activeTabId:t.activeTabId}})}}catch{}},[]),(0,w.useEffect)(()=>{localStorage.setItem(N,JSON.stringify(t))},[t]),(0,w.useEffect)(()=>{let e=t.tabs.find(e=>e.id===t.activeTabId);if(!e)return;let n="dashboard"===e.type?"/":`/projects/${e.projectId}`;window.location.pathname!==n&&window.history.replaceState(null,"",n)},[t.activeTabId,t.tabs]),(0,w.useEffect)(()=>{let e=window.location.pathname.match(/^\/projects\/(.+)$/);if(e){let r=e[1];t.tabs.some(e=>e.projectId===r)?n({type:"SET_ACTIVE",tabId:r}):fetch(`/api/projects/${r}`).then(e=>e.ok?e.json():null).then(e=>{e&&n({type:"OPEN_PROJECT",projectId:r,projectName:e.name})})}let r=sessionStorage.getItem("im-open-project");r&&(sessionStorage.removeItem("im-open-project"),fetch(`/api/projects/${r}`).then(e=>e.ok?e.json():null).then(e=>{e&&n({type:"OPEN_PROJECT",projectId:r,projectName:e.name})}))},[]);let r=(0,w.useCallback)((e,t,r,i)=>{n({type:"OPEN_PROJECT",projectId:e,projectName:t,initialSubId:r,initialTaskId:i})},[]),i=(0,w.useCallback)(e=>{n({type:"CLOSE_TAB",tabId:e})},[]),l=(0,w.useCallback)(e=>{n({type:"SET_ACTIVE",tabId:e})},[]),o=(0,w.useCallback)((e,t)=>{n({type:"UPDATE_TAB_NAME",tabId:e,name:t})},[]),a=(0,w.useCallback)(e=>{n({type:"CONSUME_INITIAL",tabId:e})},[]),s=(0,w.useCallback)(()=>{let e=t.tabs.findIndex(e=>e.id===t.activeTabId),r=t.tabs[(e+1)%t.tabs.length];r&&n({type:"SET_ACTIVE",tabId:r.id})},[t.tabs,t.activeTabId]),u=(0,w.useCallback)(()=>{let e=t.tabs.findIndex(e=>e.id===t.activeTabId),r=t.tabs[(e-1+t.tabs.length)%t.tabs.length];r&&n({type:"SET_ACTIVE",tabId:r.id})},[t.tabs,t.activeTabId]);return(0,w.useEffect)(()=>{let e=e=>{e.ctrlKey&&"Tab"===e.key&&(e.preventDefault(),e.shiftKey?u():s())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[s,u]),(0,k.jsx)(D.Provider,{value:{state:t,openProject:r,closeTab:i,setActiveTab:l,updateTabName:o,consumeInitial:a,nextTab:s,prevTab:u},children:e})}function P(){let{state:e,setActiveTab:t,closeTab:n}=I();return(0,k.jsx)("div",{className:"tab-bar",children:e.tabs.map(r=>{let i=e.activeTabId===r.id,l="dashboard"===r.type;return(0,k.jsxs)("div",{onClick:()=>t(r.id),onMouseDown:e=>{1!==e.button||l||(e.preventDefault(),n(r.id))},className:`tab-item ${i?"tab-item-active":""}`,children:[(0,k.jsx)("span",{className:"truncate",children:l?"Dashboard":r.projectName||"Project"}),!l&&(0,k.jsx)("button",{onClick:e=>{e.stopPropagation(),n(r.id)},className:"tab-close",children:"×"})]},r.id)})})}function M({onSelect:e,onCancel:t,initialPath:n}){let[r,i]=(0,w.useState)(null),[l,o]=(0,w.useState)(!0),[a,s]=(0,w.useState)(null),u=(0,w.useCallback)(async e=>{o(!0),s(null);try{let t=e?`?path=${encodeURIComponent(e)}`:"",n=await fetch(`/api/filesystem${t}`);if(n.ok)i(await n.json());else{let e=await n.json();s(e.error||"불러오기 실패")}}catch{s("불러오기 실패")}finally{o(!1)}},[]);return(0,w.useEffect)(()=>{u(n)},[u,n]),(0,k.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:t,children:(0,k.jsxs)("div",{className:"bg-card border border-border rounded-lg shadow-xl w-[520px] max-h-[70vh] flex flex-col",onClick:e=>e.stopPropagation(),children:[(0,k.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[(0,k.jsx)("h3",{className:"text-sm font-semibold",children:"프로젝트 폴더 선택"}),(0,k.jsx)("button",{onClick:t,className:"text-muted-foreground hover:text-foreground text-lg leading-none",children:"×"})]}),(0,k.jsx)("div",{className:"px-4 py-2 border-b border-border bg-muted",children:(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsx)("span",{className:"text-xs text-muted-foreground shrink-0",children:"경로:"}),(0,k.jsx)("span",{className:"text-xs font-mono truncate flex-1",title:r?.current,children:r?.current||"..."}),r?.isProject&&(0,k.jsx)("span",{className:"text-xs text-success shrink-0 font-medium",children:"프로젝트 감지"})]})}),(0,k.jsx)("div",{className:"flex-1 overflow-y-auto min-h-0",children:l?(0,k.jsx)("div",{className:"p-8 text-center text-muted-foreground text-sm",children:"불러오는 중..."}):a?(0,k.jsx)("div",{className:"p-8 text-center text-destructive text-sm",children:a}):(0,k.jsxs)("div",{className:"py-1",children:[r?.parent&&(0,k.jsxs)("button",{onClick:()=>u(r.parent),className:"w-full text-left px-4 py-2 text-sm hover:bg-muted transition-colors flex items-center gap-2 text-muted-foreground",children:[(0,k.jsx)("span",{children:"↑"}),(0,k.jsx)("span",{children:".."})]}),r?.dirs.length===0&&(0,k.jsx)("div",{className:"px-4 py-6 text-center text-muted-foreground text-xs",children:"하위 폴더가 없습니다"}),r?.dirs.map(e=>(0,k.jsxs)("button",{onClick:()=>u(e.path),className:"w-full text-left px-4 py-2 text-sm hover:bg-muted transition-colors flex items-center gap-2",children:[(0,k.jsx)("span",{className:"text-muted-foreground",children:"📁"}),(0,k.jsx)("span",{children:e.name})]},e.path))]})}),(0,k.jsxs)("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-border",children:[(0,k.jsx)("button",{onClick:t,className:"px-3 py-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",children:"취소"}),(0,k.jsx)("button",{onClick:()=>r&&e(r.current),disabled:!r,className:"px-4 py-1.5 text-xs bg-primary hover:bg-primary-hover text-white rounded-md transition-colors disabled:opacity-50",children:"이 폴더 선택"})]})]})})}function L({open:e,title:t,description:n,confirmLabel:r="Confirm",cancelLabel:i="Cancel",variant:l="default",onConfirm:o,onCancel:a}){let s=(0,w.useRef)(null),u=(0,w.useRef)(null);(0,w.useEffect)(()=>{e&&s.current?.focus()},[e]);let c=(0,w.useCallback)(t=>{e&&("Escape"===t.key&&a(),"Enter"===t.key&&o())},[e,a,o]);return((0,w.useEffect)(()=>(window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)),[c]),e)?(0,k.jsx)("div",{ref:u,onClick:e=>{e.target===u.current&&a()},className:"fixed inset-0 z-50 flex items-center justify-center",style:{background:"rgba(0,0,0,0.5)",backdropFilter:"blur(2px)"},children:(0,k.jsxs)("div",{className:"bg-card border border-border rounded-xl shadow-2xl shadow-black/40 w-full max-w-sm mx-4 animate-dialog-in",children:[(0,k.jsxs)("div",{className:"p-5",children:[(0,k.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:t}),n&&(0,k.jsx)("p",{className:"text-xs text-muted-foreground mt-1.5 leading-relaxed",children:n})]}),(0,k.jsxs)("div",{className:"flex justify-end gap-2 px-5 pb-4",children:[(0,k.jsx)("button",{onClick:a,className:"px-3 py-1.5 text-xs text-muted-foreground hover:text-foreground bg-muted hover:bg-card-hover border border-border rounded-md transition-colors",children:i}),(0,k.jsx)("button",{ref:s,onClick:o,className:`px-3 py-1.5 text-xs text-white rounded-md transition-colors ${"danger"===l?"bg-destructive hover:bg-destructive/80":"bg-primary hover:bg-primary-hover"}`,children:r})]})]})}):null}let O=[{key:"active",label:"Active"},{key:"all",label:"All"},{key:"today",label:"Today"},{key:"archive",label:"Archive"}];function R({value:e,onChange:t}){let[n,r]=(0,w.useState)(!1);return((0,w.useEffect)(()=>r(!0),[]),n)?(0,k.jsx)("div",{className:"flex gap-1 bg-muted rounded-lg p-1",children:O.map(n=>(0,k.jsx)("button",{onClick:()=>t(n.key),className:`px-4 py-1.5 text-sm rounded-md transition-all ${e===n.key?"bg-card text-foreground shadow-sm font-medium":"text-muted-foreground hover:text-foreground"}`,children:n.label},n.key))}):null}let F={idea:"💡",writing:"✏️",submitted:"🚀",testing:"🧪",done:"✅",problem:"🔴"};function z({subProject:e,projectName:t,onClick:n}){let{active_count:r,pending_count:i,done_count:l,problem_count:o,task_count:a,preview_tasks:s,last_activity:u}=e;return(0,k.jsxs)("div",{onClick:n,className:"p-4 bg-card hover:bg-card-hover border border-border rounded-xl cursor-pointer transition-all group hover:border-muted-foreground/30 hover:shadow-md hover:shadow-black/20",children:[(0,k.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,k.jsx)("h3",{className:"text-sm font-semibold group-hover:text-primary transition-colors truncate flex-1",children:e.name}),(0,k.jsx)("span",{className:"text-xs text-muted-foreground ml-2 flex-shrink-0",children:t})]}),s.length>0&&(0,k.jsx)("div",{className:"space-y-1 mb-3",children:s.map((e,t)=>(0,k.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,k.jsx)("span",{className:"flex-shrink-0",children:F[e.status]}),(0,k.jsx)("span",{className:`truncate ${"done"===e.status?"text-muted-foreground line-through":"text-foreground"}`,children:e.title})]},t))}),(0,k.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[(0,k.jsxs)("div",{className:"flex items-center gap-3",children:[r>0&&(0,k.jsxs)("span",{className:"text-primary",children:["active ",r]}),i>0&&(0,k.jsxs)("span",{children:["pending ",i]}),l>0&&(0,k.jsxs)("span",{className:"text-success",children:["done ",l]}),o>0&&(0,k.jsxs)("span",{className:"text-destructive",children:["problem ",o]}),0===a&&(0,k.jsx)("span",{children:"no tasks"})]}),u&&(0,k.jsx)("span",{children:function(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let n=Math.floor(t/60);if(n<24)return`${n}h ago`;let r=Math.floor(n/24);return`${r}d ago`}(u)})]})]})}function _(){let e,{state:t,openProject:n,closeTab:r}=I(),i="dashboard"===t.activeTabId,[l,o]=(0,w.useState)([]),[a,s]=(0,w.useState)([]),[u,c]=(0,w.useState)(!1),[d,f]=(0,w.useState)(""),[p,h]=(0,w.useState)(""),[m,g]=(0,w.useState)(""),[x,b]=(0,w.useState)(!0),[y,v]=(0,w.useState)(!1),[j,C]=(0,w.useState)(null),[S,N]=(0,w.useState)([]),[E,T]=(0,w.useState)(""),[D,A]=(0,w.useState)(!1),[P,O]=(0,w.useState)(null),[F,_]=(0,w.useState)(!1),[B,$]=(0,w.useState)(""),[U,H]=(0,w.useState)(""),[V,q]=(0,w.useState)(()=>"true"===localStorage.getItem("im-memo-open")),K=(0,w.useRef)(null),[J,W]=(0,w.useState)(()=>localStorage.getItem("im-dashboard-tab")||"active"),X=(0,w.useCallback)(async()=>{let e=await fetch("/api/projects"),t=await e.json(),n=await Promise.all(t.map(async e=>{let t=await fetch(`/api/projects/${e.id}/sub-projects`),n=await t.json();return{...e,subProjects:n}}));o(n);let r=[];for(let e of n)for(let t of e.subProjects)if(t.task_count>0){let n=await fetch(`/api/projects/${e.id}/sub-projects/${t.id}/tasks`);for(let i of(await n.json()))i.is_today&&r.push({...i,projectName:e.name,subProjectName:t.name})}s(r),b(!1)},[]);(0,w.useEffect)(()=>{X(),fetch("/api/global-memo").then(e=>e.json()).then(e=>T(e.content||""))},[X]),(0,w.useEffect)(()=>{i&&!x&&X()},[i]);let Y=(0,w.useCallback)(async()=>{let e=await fetch("/api/archive");N((await e.json()).map(e=>{let t=l.find(t=>t.id===e.project_id),n=t?.subProjects.find(t=>t.id===e.sub_project_id);return{...e,projectName:t?.name,subProjectName:n?.name}}))},[l]),Q=async()=>{A(!0),$("");let e=await fetch("/api/sync");O(await e.json())},G=async e=>{_(!0),$("");try{let t=await fetch("/api/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,repoUrl:U})}),n=await t.json();if(t.ok){if($(n.message||"Success"),"init"===e){let e=await fetch("/api/sync").then(e=>e.json());O(e)}"pull"===e&&X()}else $(`Error: ${n.error}`)}catch{$("Error: request failed")}_(!1)},Z=async e=>{if(e.preventDefault(),!d.trim())return;let t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:d.trim(),description:p.trim(),project_path:m.trim()||void 0})});if(t.ok){let e=await t.json();f(""),h(""),g(""),c(!1),n(e.id,e.name)}},ee=async()=>{j&&(await fetch(`/api/projects/${j}`,{method:"DELETE"}),r(j),C(null),X())},et={idea:"💡",writing:"✏️",submitted:"🚀",testing:"🧪",done:"✅",problem:"🔴"};return(0,k.jsxs)("div",{className:"h-full overflow-y-auto p-8 w-full max-w-5xl mx-auto",children:[(0,k.jsxs)("header",{className:"flex items-center justify-between mb-6",children:[(0,k.jsx)("div",{children:(0,k.jsxs)("h1",{className:"text-2xl font-bold tracking-tight",children:["IM ",(0,k.jsx)("span",{className:"text-muted-foreground font-normal text-sm ml-2",children:"Idea Manager v2"})]})}),(0,k.jsxs)("div",{className:"flex items-center gap-3",children:[(0,k.jsx)(R,{value:J,onChange:e=>{W(e),localStorage.setItem("im-dashboard-tab",e),"archive"===e&&Y()}}),(0,k.jsx)("button",{onClick:Q,className:"px-3 py-2 text-sm border rounded-lg transition-colors bg-muted hover:bg-card-hover text-muted-foreground border-border",title:"DB Sync via Git",children:"Sync"}),(0,k.jsx)("button",{onClick:()=>{let e=!V;q(e),localStorage.setItem("im-memo-open",String(e))},className:`px-3 py-2 text-sm border rounded-lg transition-colors ${V?"bg-accent/15 text-accent border-accent/30 hover:bg-accent/25":"bg-muted hover:bg-card-hover text-muted-foreground border-border"}`,title:"Quick memo",children:"Memo"}),(0,k.jsx)("button",{onClick:()=>c(!u),className:"px-4 py-2 bg-primary hover:bg-primary-hover text-white rounded-lg transition-colors font-medium text-sm",children:"+ Project"})]})]}),V&&(0,k.jsxs)("div",{className:"mb-6 bg-card rounded-lg border border-border overflow-hidden",children:[(0,k.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border",children:[(0,k.jsx)("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Quick Memo"}),(0,k.jsx)("span",{className:"text-[10px] text-muted-foreground",children:"auto-saved"})]}),(0,k.jsx)("textarea",{value:E,onChange:e=>{var t;T(t=e.target.value),K.current&&clearTimeout(K.current),K.current=setTimeout(()=>{fetch("/api/global-memo",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})})},500)},placeholder:"자유롭게 메모하세요...",className:"w-full bg-transparent px-4 py-3 text-sm text-foreground resize-none focus:outline-none leading-relaxed font-mono min-h-[150px] max-h-[400px]",style:{height:Math.max(150,Math.min(400,(E.split("\n").length+1)*22))}})]}),u&&(0,k.jsxs)("form",{onSubmit:Z,className:"mb-6 p-5 bg-card rounded-lg border border-border",children:[(0,k.jsx)("input",{type:"text",placeholder:"Project name",value:d,onChange:e=>f(e.target.value),className:"w-full bg-input border border-border rounded-lg px-4 py-2.5 mb-3 focus:border-primary focus:outline-none text-foreground",autoFocus:!0}),(0,k.jsx)("input",{type:"text",placeholder:"Description (optional)",value:p,onChange:e=>h(e.target.value),className:"w-full bg-input border border-border rounded-lg px-4 py-2.5 mb-3 focus:border-primary focus:outline-none text-foreground"}),(0,k.jsx)("div",{className:"mb-4",children:(0,k.jsx)("button",{type:"button",onClick:()=>v(!0),className:"w-full bg-input border border-border rounded-lg px-4 py-2.5 text-left text-sm hover:border-primary transition-colors",children:m?(0,k.jsx)("span",{className:"font-mono text-foreground",children:m}):(0,k.jsx)("span",{className:"text-muted-foreground",children:"Project folder (optional)"})})}),(0,k.jsxs)("div",{className:"flex gap-2 justify-end",children:[(0,k.jsx)("button",{type:"button",onClick:()=>c(!1),className:"px-4 py-2 text-muted-foreground hover:text-foreground transition-colors text-sm",children:"Cancel"}),(0,k.jsx)("button",{type:"submit",className:"px-4 py-2 bg-primary hover:bg-primary-hover text-white rounded-lg transition-colors text-sm",children:"Create"})]})]}),x?(0,k.jsx)("div",{className:"text-center text-muted-foreground py-20",children:"Loading..."}):"archive"===J?0===S.length?(0,k.jsxs)("div",{className:"text-center py-20 text-muted-foreground",children:[(0,k.jsx)("p",{className:"text-lg mb-2",children:"No archived tasks"}),(0,k.jsx)("p",{className:"text-sm",children:"Archived tasks will appear here"})]}):(0,k.jsx)("div",{className:"space-y-2",children:S.map(e=>(0,k.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-card border border-border rounded-lg transition-colors group",children:[(0,k.jsx)("span",{className:"text-sm",children:et[e.status]}),(0,k.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,k.jsx)("span",{className:"text-sm font-medium",children:e.title}),(0,k.jsxs)("span",{className:"text-xs text-muted-foreground ml-2",children:[e.projectName,e.subProjectName?` / ${e.subProjectName}`:""]}),e.description&&(0,k.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:e.description})]}),(0,k.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,k.jsx)("button",{onClick:async()=>{await fetch("/api/archive",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({taskId:e.id,action:"restore"})}),Y(),X()},className:"px-2 py-1 text-xs text-primary hover:bg-primary/10 rounded transition-colors",children:"Restore"}),(0,k.jsx)("button",{onClick:async()=>{await fetch("/api/archive",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({taskId:e.id,action:"delete"})}),Y()},className:"px-2 py-1 text-xs text-destructive hover:bg-destructive/10 rounded transition-colors",children:"Delete"})]})]},e.id))}):"today"===J?0===a.length?(0,k.jsxs)("div",{className:"text-center py-20 text-muted-foreground",children:[(0,k.jsx)("p",{className:"text-lg mb-2",children:"No tasks marked for today"}),(0,k.jsx)("p",{className:"text-sm",children:"Mark tasks with the Today button in task detail"})]}):(0,k.jsx)("div",{className:"space-y-2",children:a.map(e=>(0,k.jsxs)("div",{onClick:()=>n(e.project_id,e.projectName,e.sub_project_id,e.id),className:"flex items-center gap-3 p-3 bg-card hover:bg-card-hover border border-border rounded-lg cursor-pointer transition-colors",children:[(0,k.jsx)("span",{className:"text-sm",children:et[e.status]}),(0,k.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,k.jsx)("span",{className:"text-sm font-medium",children:e.title}),(0,k.jsxs)("span",{className:"text-xs text-muted-foreground ml-2",children:[e.projectName," / ",e.subProjectName]})]})]},e.id))}):(0,k.jsx)(k.Fragment,{children:"all"===J?0===l.length?(0,k.jsxs)("div",{className:"text-center py-20",children:[(0,k.jsx)("p",{className:"text-muted-foreground text-lg mb-2",children:"No projects yet"}),(0,k.jsx)("p",{className:"text-muted-foreground text-sm",children:"Click + Project to get started"})]}):(0,k.jsx)("div",{className:"space-y-6",children:l.map(e=>(0,k.jsxs)("div",{children:[(0,k.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,k.jsxs)("div",{className:"flex items-center gap-2 cursor-pointer hover:text-primary transition-colors",onClick:()=>n(e.id,e.name),children:[(0,k.jsx)("h2",{className:"text-sm font-semibold",children:e.name}),e.project_path&&(0,k.jsx)("span",{className:"text-xs text-muted-foreground font-mono truncate max-w-48",children:e.project_path})]}),(0,k.jsx)("button",{onClick:t=>{var n;return n=e.id,void(t.stopPropagation(),C(n))},className:"text-xs text-muted-foreground hover:text-destructive transition-colors",children:"Delete"})]}),0===e.subProjects.length?(0,k.jsxs)("div",{className:"text-xs text-muted-foreground py-4 text-center border border-dashed border-border rounded-lg",children:["No sub-projects."," ",(0,k.jsx)("span",{className:"text-primary cursor-pointer hover:underline",onClick:()=>n(e.id,e.name),children:"Open project"})," ","to add one."]}):(0,k.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:e.subProjects.map(t=>(0,k.jsx)(z,{subProject:t,projectName:e.name,onClick:()=>n(e.id,e.name,t.id)},t.id))})]},e.id))}):0===(e=(()=>{let e=[];for(let t of l)for(let n of t.subProjects)"active"===J?(n.active_count>0||n.problem_count>0)&&e.push({sp:n,projectName:t.name,projectId:t.id}):"all"===J&&e.push({sp:n,projectName:t.name,projectId:t.id});return e.sort((e,t)=>t.sp.active_count+t.sp.problem_count-(e.sp.active_count+e.sp.problem_count)),e})()).length?(0,k.jsxs)("div",{className:"text-center py-20 text-muted-foreground",children:[(0,k.jsx)("p",{className:"text-lg mb-2",children:"No active tasks"}),(0,k.jsx)("p",{className:"text-sm",children:"Submit tasks to see them here"})]}):(0,k.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:e.map(({sp:e,projectName:t,projectId:r})=>(0,k.jsx)(z,{subProject:e,projectName:t,onClick:()=>{let i=l.find(e=>e.id===r);n(r,i?.name||t,e.id)}},e.id))})}),y&&(0,k.jsx)(M,{onSelect:e=>{g(e),v(!1)},onCancel:()=>v(!1)}),D&&(0,k.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[(0,k.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>A(!1)}),(0,k.jsxs)("div",{className:"relative bg-card border border-border rounded-xl shadow-2xl w-[480px] animate-dialog-in",children:[(0,k.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border",children:[(0,k.jsx)("h3",{className:"text-sm font-semibold",children:"DB Sync"}),(0,k.jsx)("button",{onClick:()=>A(!1),className:"text-muted-foreground hover:text-foreground text-lg px-1",children:"x"})]}),(0,k.jsxs)("div",{className:"p-5 space-y-4",children:[null===P?(0,k.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):P.initialized?(0,k.jsxs)("div",{className:"space-y-3",children:[(0,k.jsxs)("div",{className:"text-xs space-y-1",children:[(0,k.jsxs)("p",{children:[(0,k.jsx)("span",{className:"text-muted-foreground",children:"Remote:"})," ",(0,k.jsx)("span",{className:"font-mono",children:P.remoteUrl||"none"})]}),(0,k.jsxs)("p",{children:[(0,k.jsx)("span",{className:"text-muted-foreground",children:"Last sync:"})," ",P.lastCommit||"never"]})]}),(0,k.jsxs)("div",{className:"flex gap-2",children:[(0,k.jsx)("button",{onClick:()=>G("push"),disabled:F,className:"flex-1 px-4 py-2 text-sm bg-primary text-white rounded-lg hover:bg-primary-hover transition-colors disabled:opacity-50",children:F?"...":"Push"}),(0,k.jsx)("button",{onClick:()=>G("pull"),disabled:F,className:"flex-1 px-4 py-2 text-sm bg-muted text-foreground border border-border rounded-lg hover:bg-card-hover transition-colors disabled:opacity-50",children:F?"...":"Pull"})]})]}):(0,k.jsxs)("div",{className:"space-y-3",children:[(0,k.jsx)("p",{className:"text-sm text-muted-foreground",children:"Git 저장소 URL을 입력하세요."}),(0,k.jsx)("input",{value:U,onChange:e=>H(e.target.value),placeholder:"https://github.com/user/repo.git",className:"w-full bg-input border border-border rounded-lg px-3 py-2 text-sm focus:border-primary focus:outline-none text-foreground"}),(0,k.jsx)("button",{onClick:()=>G("init"),disabled:F||!U.trim(),className:"w-full px-4 py-2 text-sm bg-primary text-white rounded-lg hover:bg-primary-hover transition-colors disabled:opacity-50",children:F?"Initializing...":"Initialize"})]}),B&&(0,k.jsx)("p",{className:`text-xs ${B.startsWith("Error")?"text-destructive":"text-success"}`,children:B})]})]})]}),(0,k.jsx)(L,{open:!!j,title:"Delete project?",description:"This will permanently delete the project and all its data.",confirmLabel:"Delete",variant:"danger",onConfirm:ee,onCancel:()=>C(null)})]})}function B({projectId:e,onCollapse:t}){let[n,r]=(0,w.useState)(""),[i,l]=(0,w.useState)(!1),[o,a]=(0,w.useState)(!1),s=(0,w.useRef)(null),u=(0,w.useRef)(null);(0,w.useEffect)(()=>{(async()=>{let t=await fetch(`/api/projects/${e}/brainstorm`);r((await t.json()).content||""),a(!0)})()},[e]);let c=(0,w.useCallback)(async t=>{l(!0),await fetch(`/api/projects/${e}/brainstorm`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})}),l(!1)},[e]);return o?(0,k.jsxs)("div",{className:"flex flex-col h-full",children:[(0,k.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border",children:[(0,k.jsx)("h2",{className:"text-sm font-medium text-muted-foreground",children:"BRAINSTORMING"}),(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsx)("span",{className:"text-xs text-muted-foreground",children:i?"저장 중...":n?"저장됨":""}),t&&(0,k.jsx)("button",{onClick:t,className:"text-muted-foreground hover:text-foreground transition-colors text-xs px-1",title:"접기 (B)",children:"«"})]})]}),(0,k.jsx)("div",{className:"editor-container",children:(0,k.jsx)("textarea",{ref:u,value:n,onChange:e=>{let t=e.target.value;r(t),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{c(t)},1e3)},placeholder:`자유롭게 아이디어를 적어보세요...
2
-
3
- 예시:
4
- - 소셜 로그인을 활용한 사용자 인증
5
- - 분석 차트가 포함된 대시보드
6
- - 알림 시스템 필요 (푸시 + 이메일)
7
- - 다크 모드 지원
8
- - 모바일 반응형 디자인 중요`,className:"flex-1 w-full p-4 bg-transparent resize-none text-foreground placeholder:text-muted-foreground/40 font-mono text-sm leading-relaxed",spellCheck:!1})})]}):(0,k.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:"로딩 중..."})}var $=e.i(74080);let U="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function H(e){let t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function V(e){return"nodeType"in e}function q(e){var t,n;return e?H(e)?e:V(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function K(e){let{Document:t}=q(e);return e instanceof t}function J(e){return!H(e)&&e instanceof q(e).HTMLElement}function W(e){return e instanceof q(e).SVGElement}function X(e){return e?H(e)?e.document:V(e)?K(e)?e:J(e)||W(e)?e.ownerDocument:document:document:document}let Y=U?w.useLayoutEffect:w.useEffect;function Q(e){let t=(0,w.useRef)(e);return Y(()=>{t.current=e}),(0,w.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function G(e,t){void 0===t&&(t=[e]);let n=(0,w.useRef)(e);return Y(()=>{n.current!==e&&(n.current=e)},t),n}function Z(e,t){let n=(0,w.useRef)();return(0,w.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function ee(e){let t=Q(e),n=(0,w.useRef)(null),r=(0,w.useCallback)(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,r]}function et(e){let t=(0,w.useRef)();return(0,w.useEffect)(()=>{t.current=e},[e]),t.current}let en={};function er(e,t){return(0,w.useMemo)(()=>{if(t)return t;let n=null==en[e]?0:en[e]+1;return en[e]=n,e+"-"+n},[e,t])}function ei(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>{for(let[r,i]of Object.entries(n)){let n=t[r];null!=n&&(t[r]=n+e*i)}return t},{...t})}}let el=ei(1),eo=ei(-1);function ea(e){if(!e)return!1;let{KeyboardEvent:t}=q(e.target);return t&&e instanceof t}function es(e){if(function(e){if(!e)return!1;let{TouchEvent:t}=q(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return"clientX"in e&&"clientY"in e?{x:e.clientX,y:e.clientY}:null}let eu=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[eu.Translate.toString(e),eu.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),ec="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]",ed={display:"none"};function ef(e){let{id:t,value:n}=e;return w.default.createElement("div",{id:t,style:ed},n)}function ep(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return w.default.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}let eh=(0,w.createContext)(null),em={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},eg={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function ex(e){var t;let n,{announcements:r=eg,container:i,hiddenTextDescribedById:l,screenReaderInstructions:o=em}=e,{announce:a,announcement:s}=function(){let[e,t]=(0,w.useState)("");return{announce:(0,w.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}(),u=er("DndLiveRegion"),[c,d]=(0,w.useState)(!1);if((0,w.useEffect)(()=>{d(!0)},[]),t=(0,w.useMemo)(()=>({onDragStart(e){let{active:t}=e;a(r.onDragStart({active:t}))},onDragMove(e){let{active:t,over:n}=e;r.onDragMove&&a(r.onDragMove({active:t,over:n}))},onDragOver(e){let{active:t,over:n}=e;a(r.onDragOver({active:t,over:n}))},onDragEnd(e){let{active:t,over:n}=e;a(r.onDragEnd({active:t,over:n}))},onDragCancel(e){let{active:t,over:n}=e;a(r.onDragCancel({active:t,over:n}))}}),[a,r]),n=(0,w.useContext)(eh),(0,w.useEffect)(()=>{if(!n)throw Error("useDndMonitor must be used within a children of <DndContext>");return n(t)},[t,n]),!c)return null;let f=w.default.createElement(w.default.Fragment,null,w.default.createElement(ef,{id:l,value:o.draggable}),w.default.createElement(ep,{id:u,announcement:s}));return i?(0,$.createPortal)(f,i):f}function eb(){}function ey(e,t){return(0,w.useMemo)(()=>({sensor:e,options:null!=t?t:{}}),[e,t])}(n=d||(d={})).DragStart="dragStart",n.DragMove="dragMove",n.DragEnd="dragEnd",n.DragCancel="dragCancel",n.DragOver="dragOver",n.RegisterDroppable="registerDroppable",n.SetDroppableDisabled="setDroppableDisabled",n.UnregisterDroppable="unregisterDroppable";let ev=Object.freeze({x:0,y:0});function ek(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ew(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function ej(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function eC(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function eS(e,t){if(!e||0===e.length)return null;let[n]=e;return t?n[t]:n}function eN(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}let eE=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=eN(t,t.left,t.top),l=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=ek(eN(r),i);l.push({id:t,data:{droppableContainer:e,value:n}})}}return l.sort(ew)},eT=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,l=n.get(r);if(l){let n=function(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height);if(r<i&&n<l){let o=t.width*t.height,a=e.width*e.height,s=(i-r)*(l-n);return Number((s/(o+a-s)).toFixed(4))}return 0}(l,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(ej)};function eD(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ev}let eI=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((e,t)=>({...e,top:e.top+ +t.y,bottom:e.bottom+ +t.y,left:e.left+ +t.x,right:e.right+ +t.x}),{...e})},eA={ignoreTransform:!1};function eP(e,t){void 0===t&&(t=eA);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=q(e).getComputedStyle(e);t&&(n=function(e,t,n){let r=function(e){if(e.startsWith("matrix3d(")){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;let{scaleX:i,scaleY:l,x:o,y:a}=r,s=e.left-o-(1-i)*parseFloat(n),u=e.top-a-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?e.width/i:e.width,d=l?e.height/l:e.height;return{width:c,height:d,top:u,right:s+c,bottom:u+d,left:s}}(n,t,r))}let{top:r,left:i,width:l,height:o,bottom:a,right:s}=n;return{top:r,left:i,width:l,height:o,bottom:a,right:s}}function eM(e){return eP(e,{ignoreTransform:!0})}function eL(e,t){let n=[];return e?function r(i){var l,o;let a;if(null!=t&&n.length>=t||!i)return n;if(K(i)&&null!=i.scrollingElement&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!J(i)||W(i)||n.includes(i))return n;let s=q(e).getComputedStyle(i);return(i!==e&&(void 0===(l=s)&&(l=q(i).getComputedStyle(i)),a=/(auto|scroll|overlay)/,["overflow","overflowX","overflowY"].some(e=>{let t=l[e];return"string"==typeof t&&a.test(t)}))&&n.push(i),void 0===(o=s)&&(o=q(i).getComputedStyle(i)),"fixed"===o.position)?n:r(i.parentNode)}(e):n}function eO(e){let[t]=eL(e,1);return null!=t?t:null}function eR(e){return U&&e?H(e)?e:V(e)?K(e)||e===X(e).scrollingElement?window:J(e)?e:null:null:null}function eF(e){return H(e)?e.scrollX:e.scrollLeft}function ez(e){return H(e)?e.scrollY:e.scrollTop}function e_(e){return{x:eF(e),y:ez(e)}}function eB(e){return!!U&&!!e&&e===document.scrollingElement}function e$(e){let t={x:0,y:0},n=eB(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,l=e.scrollLeft<=t.x;return{isTop:i,isLeft:l,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}(r=f||(f={}))[r.Forward=1]="Forward",r[r.Backward=-1]="Backward";let eU={x:.2,y:.2};function eH(e){return e.reduce((e,t)=>el(e,e_(t)),ev)}let eV=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+eF(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+ez(t),0)}]];class eq{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=eL(t),r=eH(n);for(const[t,i,l]of(this.rect={...e},this.width=e.width,this.height=e.height,eV))for(const e of i)Object.defineProperty(this,e,{get:()=>{let i=l(n),o=r[t]-i;return this.rect[e]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class eK{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function eJ(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}function eW(e){e.preventDefault()}function eX(e){e.stopPropagation()}(i=p||(p={})).Click="click",i.DragStart="dragstart",i.Keydown="keydown",i.ContextMenu="contextmenu",i.Resize="resize",i.SelectionChange="selectionchange",i.VisibilityChange="visibilitychange",(l=h||(h={})).Space="Space",l.Down="ArrowDown",l.Right="ArrowRight",l.Left="ArrowLeft",l.Up="ArrowUp",l.Esc="Escape",l.Enter="Enter",l.Tab="Tab";let eY={start:[h.Space,h.Enter],cancel:[h.Esc],end:[h.Space,h.Enter,h.Tab]},eQ=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case h.Right:return{...n,x:n.x+25};case h.Left:return{...n,x:n.x-25};case h.Down:return{...n,y:n.y+25};case h.Up:return{...n,y:n.y-25}}};class eG{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new eK(X(t)),this.windowListeners=new eK(q(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(p.Resize,this.handleCancel),this.windowListeners.add(p.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(p.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=eP),!e)return;let{top:n,left:r,bottom:i,right:l}=t(e);eO(e)&&(i<=0||l<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(ev)}handleKeyDown(e){if(ea(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=eY,coordinateGetter:l=eQ,scrollBehavior:o="smooth"}=r,{code:a}=e;if(i.end.includes(a))return void this.handleEnd(e);if(i.cancel.includes(a))return void this.handleCancel(e);let{collisionRect:s}=n.current,u=s?{x:s.left,y:s.top}:ev;this.referenceCoordinates||(this.referenceCoordinates=u);let c=l(e,{active:t,context:n.current,currentCoordinates:u});if(c){let t=eo(c,u),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:l,isRight:a,isLeft:s,isBottom:u,maxScroll:d,minScroll:f}=e$(n),p=function(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}(n),m={x:Math.min(i===h.Right?p.right-p.width/2:p.right,Math.max(i===h.Right?p.left:p.left+p.width/2,c.x)),y:Math.min(i===h.Down?p.bottom-p.height/2:p.bottom,Math.max(i===h.Down?p.top:p.top+p.height/2,c.y))},g=i===h.Right&&!a||i===h.Left&&!s,x=i===h.Down&&!u||i===h.Up&&!l;if(g&&m.x!==c.x){let e=n.scrollLeft+t.x,l=i===h.Right&&e<=d.x||i===h.Left&&e>=f.x;if(l&&!t.y)return void n.scrollTo({left:e,behavior:o});l?r.x=n.scrollLeft-e:r.x=i===h.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(x&&m.y!==c.y){let e=n.scrollTop+t.y,l=i===h.Down&&e<=d.y||i===h.Up&&e>=f.y;if(l&&!t.x)return void n.scrollTo({top:e,behavior:o});l?r.y=n.scrollTop-e:r.y=i===h.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,el(eo(c,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function eZ(e){return!!(e&&"distance"in e)}function e0(e){return!!(e&&"delay"in e)}eG.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=eY,onActivation:i}=t,{active:l}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=l.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==i||i({event:e.nativeEvent}),!0)}return!1}}];class e1{constructor(e,t,n){var r;void 0===n&&(n=function(e){let{EventTarget:t}=q(e);return e instanceof t?e:X(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:l}=i;this.props=e,this.events=t,this.document=X(l),this.documentListeners=new eK(this.document),this.listeners=new eK(n),this.windowListeners=new eK(q(l)),this.initialCoordinates=null!=(r=es(i))?r:ev,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(p.Resize,this.handleCancel),this.windowListeners.add(p.DragStart,eW),this.windowListeners.add(p.VisibilityChange,this.handleCancel),this.windowListeners.add(p.ContextMenu,eW),this.documentListeners.add(p.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(e0(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(eZ(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(p.Click,eX,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(p.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;let{activated:n,initialCoordinates:r,props:i}=this,{onMove:l,options:{activationConstraint:o}}=i;if(!r)return;let a=null!=(t=es(e))?t:ev,s=eo(r,a);if(!n&&o){if(eZ(o)){if(null!=o.tolerance&&eJ(s,o.tolerance))return this.handleCancel();if(eJ(s,o.distance))return this.handleStart()}return e0(o)&&eJ(s,o.tolerance)?this.handleCancel():void this.handlePending(o,s)}e.cancelable&&e.preventDefault(),l(a)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===h.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}let e2={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class e4 extends e1{constructor(e){const{event:t}=e;super(e,e2,X(t.target))}}e4.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!!n.isPrimary&&0===n.button&&(null==r||r({event:n}),!0)}}];(o=m||(m={}))[o.RightClick=2]="RightClick";(a=g||(g={}))[a.Pointer=0]="Pointer",a[a.DraggableRect=1]="DraggableRect",(s=x||(x={}))[s.TreeOrder=0]="TreeOrder",s[s.ReversedTreeOrder=1]="ReversedTreeOrder";let e5={x:{[f.Backward]:!1,[f.Forward]:!1},y:{[f.Backward]:!1,[f.Forward]:!1}};(u=b||(b={}))[u.Always=0]="Always",u[u.BeforeDragging=1]="BeforeDragging",u[u.WhileDragging=2]="WhileDragging",(y||(y={})).Optimized="optimized";let e3=new Map;function e6(e,t){return Z(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function e9(e){let{callback:t,disabled:n}=e,r=Q(t),i=(0,w.useMemo)(()=>{if(n||"u"<typeof window||void 0===window.ResizeObserver)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,w.useEffect)(()=>()=>null==i?void 0:i.disconnect(),[i]),i}function e8(e){return new eq(eP(e),e)}function e7(e,t,n){void 0===t&&(t=e8);let[r,i]=(0,w.useState)(null);function l(){i(r=>{if(!e)return null;if(!1===e.isConnected){var i;return null!=(i=null!=r?r:n)?i:null}let l=t(e);return JSON.stringify(r)===JSON.stringify(l)?r:l})}let o=function(e){let{callback:t,disabled:n}=e,r=Q(t),i=(0,w.useMemo)(()=>{if(n||"u"<typeof window||void 0===window.MutationObserver)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,w.useEffect)(()=>()=>null==i?void 0:i.disconnect(),[i]),i}({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){l();break}}}}),a=e9({callback:l});return Y(()=>{l(),e?(null==a||a.observe(e),null==o||o.observe(document.body,{childList:!0,subtree:!0})):(null==a||a.disconnect(),null==o||o.disconnect())},[e]),r}let te=[];function tt(e,t){void 0===t&&(t=[]);let n=(0,w.useRef)(null);return(0,w.useEffect)(()=>{n.current=null},t),(0,w.useEffect)(()=>{let t=e!==ev;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?eo(e,n.current):ev}function tn(e){return(0,w.useMemo)(()=>{let t,n;return e?(t=e.innerWidth,{top:0,left:0,right:t,bottom:n=e.innerHeight,width:t,height:n}):null},[e])}let tr=[],ti=[{sensor:e4,options:{}},{sensor:eG,options:{}}],tl={current:{}},to={draggable:{measure:eM},droppable:{measure:eM,strategy:b.WhileDragging,frequency:y.Optimized},dragOverlay:{measure:eP}};class ta extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}let ts={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ta,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:eb},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:to,measureDroppableContainers:eb,windowRect:null,measuringScheduled:!1},tu={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:eb,draggableNodes:new Map,over:null,measureDroppableContainers:eb},tc=(0,w.createContext)(tu),td=(0,w.createContext)(ts);function tf(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ta}}}function tp(e,t){switch(t.type){case d.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case d.DragMove:if(null==e.draggable.active)return e;return{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case d.DragEnd:case d.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case d.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new ta(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case d.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,l=e.droppable.containers.get(n);if(!l||r!==l.key)return e;let o=new ta(e.droppable.containers);return o.set(n,{...l,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case d.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let l=new ta(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function th(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,w.useContext)(tc),l=et(r),o=et(null==n?void 0:n.id);return(0,w.useEffect)(()=>{if(!t&&!r&&l&&null!=o){if(!ea(l)||document.activeElement===l.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;(t.current||n.current)&&requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=e.matches(ec)?e:e.querySelector(ec);if(t){t.focus();break}}})}},[r,t,i,o,l]),null}let tm=(0,w.createContext)({...ev,scaleX:1,scaleY:1});(c=v||(v={}))[c.Uninitialized=0]="Uninitialized",c[c.Initializing=1]="Initializing",c[c.Initialized=2]="Initialized";let tg=(0,w.memo)(function(e){var t,n,r,i,l,o,a,s;let u,c,p,h,m,y,k,j,{id:C,accessibility:S,autoScroll:N=!0,children:E,sensors:T=ti,collisionDetection:D=eT,measuring:I,modifiers:A,...P}=e,[M,L]=(0,w.useReducer)(tp,void 0,tf),[O,R]=function(){let[e]=(0,w.useState)(()=>new Set),t=(0,w.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,w.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[F,z]=(0,w.useState)(v.Uninitialized),_=F===v.Initialized,{draggable:{active:B,nodes:H,translate:V},droppable:{containers:K}}=M,W=null!=B?H.get(B):null,X=(0,w.useRef)({initial:null,translated:null}),Q=(0,w.useMemo)(()=>{var e;return null!=B?{id:B,data:null!=(e=null==W?void 0:W.data)?e:tl,rect:X}:null},[B,W]),en=(0,w.useRef)(null),[ei,eo]=(0,w.useState)(null),[ea,eu]=(0,w.useState)(null),ec=G(P,Object.values(P)),ed=er("DndDescribedBy",C),ef=(0,w.useMemo)(()=>K.getEnabled(),[K]),ep=(0,w.useMemo)(()=>({draggable:{...to.draggable,...null==I?void 0:I.draggable},droppable:{...to.droppable,...null==I?void 0:I.droppable},dragOverlay:{...to.dragOverlay,...null==I?void 0:I.dragOverlay}}),[null==I?void 0:I.draggable,null==I?void 0:I.droppable,null==I?void 0:I.dragOverlay]),{droppableRects:em,measureDroppableContainers:eg,measuringScheduled:eb}=function(e,t){let{dragging:n,dependencies:r,config:i}=t,[l,o]=(0,w.useState)(null),{frequency:a,measure:s,strategy:u}=i,c=(0,w.useRef)(e),d=function(){switch(u){case b.Always:return!1;case b.BeforeDragging:return n;default:return!n}}(),f=G(d),p=(0,w.useCallback)(function(e){void 0===e&&(e=[]),f.current||o(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),h=(0,w.useRef)(null),m=Z(t=>{if(d&&!n)return e3;if(!t||t===e3||c.current!==e||null!=l){let t=new Map;for(let n of e){if(!n)continue;if(l&&l.length>0&&!l.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new eq(s(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,l,n,d,s]);return(0,w.useEffect)(()=>{c.current=e},[e]),(0,w.useEffect)(()=>{d||p()},[n,d]),(0,w.useEffect)(()=>{l&&l.length>0&&o(null)},[JSON.stringify(l)]),(0,w.useEffect)(()=>{d||"number"!=typeof a||null!==h.current||(h.current=setTimeout(()=>{p(),h.current=null},a))},[a,d,p,...r]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:null!=l}}(ef,{dragging:_,dependencies:[V.x,V.y],config:ep.droppable}),ey=Z(e=>{var t;return null==B?null:null!=(t=null!=m?m:e)?t:null},[m=(h=null!=B?H.get(B):void 0)?h.node.current:null,B]),ek=(0,w.useMemo)(()=>ea?es(ea):null,[ea]),ew=(u=(null==ei?void 0:ei.autoScrollEnabled)===!1,c="object"==typeof N?!1===N.enabled:!1===N,p=_&&!u&&!c,"object"==typeof N?{...N,enabled:p}:{enabled:p}),ej=e6(ey,ep.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,l=(0,w.useRef)(!1),{x:o,y:a}="boolean"==typeof i?{x:i,y:i}:i;Y(()=>{if(!o&&!a||!t){l.current=!1;return}if(l.current||!r)return;let e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;let i=eD(n(e),r);if(o||(i.x=0),a||(i.y=0),l.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=eO(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,a,r,n])}({activeNode:null!=B?H.get(B):null,config:ew.layoutShiftCompensation,initialRect:ej,measure:ep.draggable.measure});let eC=e7(ey,ep.draggable.measure,ej),eN=e7(ey?ey.parentElement:null),eE=(0,w.useRef)({activatorEvent:null,active:null,activeNode:ey,collisionRect:null,collisions:null,droppableRects:em,draggableNodes:H,draggingNode:null,draggingNodeRect:null,droppableContainers:K,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),eA=K.getNodeFor(null==(t=eE.current.over)?void 0:t.id),eM=function(e){let{measure:t}=e,[n,r]=(0,w.useState)(null),i=e9({callback:(0,w.useCallback)(e=>{for(let{target:n}of e)if(J(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[l,o]=ee((0,w.useCallback)(e=>{let n=function(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return J(t)?t:e}(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?t(n):null)},[t,i]));return(0,w.useMemo)(()=>({nodeRef:l,rect:n,setRef:o}),[n,l,o])}({measure:ep.dragOverlay.measure}),eF=null!=(n=eM.nodeRef.current)?n:ey,ez=_?null!=(r=eM.rect)?r:eC:null,eV=!!(eM.nodeRef.current&&eM.rect),eK=(y=e6(l=eV?null:eC),eD(l,y)),eJ=tn(eF?q(eF):null),eW=(o=_?null!=eA?eA:ey:null,k=(0,w.useRef)(o),j=Z(e=>o?e&&e!==te&&o&&k.current&&o.parentNode===k.current.parentNode?e:eL(o):te,[o]),(0,w.useEffect)(()=>{k.current=o},[o]),j),eX=function(e,t){void 0===t&&(t=eP);let[n]=e,r=tn(n?q(n):null),[i,l]=(0,w.useState)(tr);function o(){l(()=>e.length?e.map(e=>eB(e)?r:new eq(t(e),e)):tr)}let a=e9({callback:o});return Y(()=>{null==a||a.disconnect(),o(),e.forEach(e=>null==a?void 0:a.observe(e))},[e]),i}(eW),eY=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}(A,{transform:{x:V.x-eK.x,y:V.y-eK.y,scaleX:1,scaleY:1},activatorEvent:ea,active:Q,activeNodeRect:eC,containerNodeRect:eN,draggingNodeRect:ez,over:eE.current.over,overlayNodeRect:eM.rect,scrollableAncestors:eW,scrollableAncestorRects:eX,windowRect:eJ}),eQ=ek?el(ek,V):null,eG=function(e){let[t,n]=(0,w.useState)(null),r=(0,w.useRef)(e),i=(0,w.useCallback)(e=>{let t=eR(e.target);t&&n(e=>e?(e.set(t,e_(t)),new Map(e)):null)},[]);return(0,w.useEffect)(()=>{let t=r.current;if(e!==t){l(t);let o=e.map(e=>{let t=eR(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,e_(t)]):null}).filter(e=>null!=e);n(o.length?new Map(o):null),r.current=e}return()=>{l(e),l(t)};function l(e){e.forEach(e=>{let t=eR(e);null==t||t.removeEventListener("scroll",i)})}},[i,e]),(0,w.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>el(e,t),ev):eH(e):ev,[e,t])}(eW),eZ=tt(eG),e0=tt(eG,[eC]),e1=el(eY,eZ),e2=ez?eI(ez,eY):null,e4=Q&&e2?D({active:Q,collisionRect:e2,droppableRects:em,droppableContainers:ef,pointerCoordinates:eQ}):null,e8=eS(e4,"id"),[ta,ts]=(0,w.useState)(null),tu=(a=eV?eY:el(eY,e0),s=null!=(i=null==ta?void 0:ta.rect)?i:null,{...a,scaleX:s&&eC?s.width/eC.width:1,scaleY:s&&eC?s.height/eC.height:1}),tg=(0,w.useRef)(null),tx=(0,w.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(null==en.current)return;let i=H.get(en.current);if(!i)return;let l=e.nativeEvent,o=new n({active:en.current,activeNode:i,event:l,options:r,context:eE,onAbort(e){if(!H.get(e))return;let{onDragAbort:t}=ec.current,n={id:e};null==t||t(n),O({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!H.get(e))return;let{onDragPending:i}=ec.current,l={id:e,constraint:t,initialCoordinates:n,offset:r};null==i||i(l),O({type:"onDragPending",event:l})},onStart(e){let t=en.current;if(null==t)return;let n=H.get(t);if(!n)return;let{onDragStart:r}=ec.current,i={activatorEvent:l,active:{id:t,data:n.data,rect:X}};(0,$.unstable_batchedUpdates)(()=>{null==r||r(i),z(v.Initializing),L({type:d.DragStart,initialCoordinates:e,active:t}),O({type:"onDragStart",event:i}),eo(tg.current),eu(l)})},onMove(e){L({type:d.DragMove,coordinates:e})},onEnd:a(d.DragEnd),onCancel:a(d.DragCancel)});function a(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=eE.current,o=null;if(t&&i){let{cancelDrop:a}=ec.current;o={activatorEvent:l,active:t,collisions:n,delta:i,over:r},e===d.DragEnd&&"function"==typeof a&&await Promise.resolve(a(o))&&(e=d.DragCancel)}en.current=null,(0,$.unstable_batchedUpdates)(()=>{L({type:e}),z(v.Uninitialized),ts(null),eo(null),eu(null),tg.current=null;let t=e===d.DragEnd?"onDragEnd":"onDragCancel";if(o){let e=ec.current[t];null==e||e(o),O({type:t,event:o})}})}}tg.current=o},[H]),tb=(0,w.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,l=H.get(r);null!==en.current||!l||i.dndKit||i.defaultPrevented||!0===e(n,t.options,{active:l})&&(i.dndKit={capturedBy:t.sensor},en.current=r,tx(n,t))},[H,tx]),ty=(0,w.useMemo)(()=>T.reduce((e,t)=>{let{sensor:n}=t;return[...e,...n.activators.map(e=>({eventName:e.eventName,handler:tb(e.handler,t)}))]},[]),[T,tb]);(0,w.useEffect)(()=>{if(!U)return;let e=T.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(let t of e)null==t||t()}},T.map(e=>{let{sensor:t}=e;return t})),Y(()=>{eC&&F===v.Initializing&&z(v.Initialized)},[eC,F]),(0,w.useEffect)(()=>{let{onDragMove:e}=ec.current,{active:t,activatorEvent:n,collisions:r,over:i}=eE.current;if(!t||!n)return;let l={active:t,activatorEvent:n,collisions:r,delta:{x:e1.x,y:e1.y},over:i};(0,$.unstable_batchedUpdates)(()=>{null==e||e(l),O({type:"onDragMove",event:l})})},[e1.x,e1.y]),(0,w.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=eE.current;if(!e||null==en.current||!t||!i)return;let{onDragOver:l}=ec.current,o=r.get(e8),a=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,s={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:a};(0,$.unstable_batchedUpdates)(()=>{ts(a),null==l||l(s),O({type:"onDragOver",event:s})})},[e8]),Y(()=>{eE.current={activatorEvent:ea,active:Q,activeNode:ey,collisionRect:e2,collisions:e4,droppableRects:em,draggableNodes:H,draggingNode:eF,draggingNodeRect:ez,droppableContainers:K,over:ta,scrollableAncestors:eW,scrollAdjustedTranslate:e1},X.current={initial:ez,translated:e2}},[Q,ey,e4,e2,H,eF,ez,em,K,ta,eW,e1]),function(e){let t,{acceleration:n,activator:r=g.Pointer,canScroll:i,draggingRect:l,enabled:o,interval:a=5,order:s=x.TreeOrder,pointerCoordinates:u,scrollableAncestors:c,scrollableAncestorRects:d,delta:p,threshold:h}=e,m=function(e){let{delta:t,disabled:n}=e,r=et(t);return Z(e=>{if(n||!r||!e)return e5;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[f.Backward]:e.x[f.Backward]||-1===i.x,[f.Forward]:e.x[f.Forward]||1===i.x},y:{[f.Backward]:e.y[f.Backward]||-1===i.y,[f.Forward]:e.y[f.Forward]||1===i.y}}},[n,t,r])}({delta:p,disabled:!o}),[b,y]=(t=(0,w.useRef)(null),[(0,w.useCallback)((e,n)=>{t.current=setInterval(e,n)},[]),(0,w.useCallback)(()=>{null!==t.current&&(clearInterval(t.current),t.current=null)},[])]),v=(0,w.useRef)({x:0,y:0}),k=(0,w.useRef)({x:0,y:0}),j=(0,w.useMemo)(()=>{switch(r){case g.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case g.DraggableRect:return l}},[r,l,u]),C=(0,w.useRef)(null),S=(0,w.useCallback)(()=>{let e=C.current;if(!e)return;let t=v.current.x*k.current.x,n=v.current.y*k.current.y;e.scrollBy(t,n)},[]),N=(0,w.useMemo)(()=>s===x.TreeOrder?[...c].reverse():c,[s,c]);(0,w.useEffect)(()=>{if(!o||!c.length||!j)return void y();for(let e of N){if((null==i?void 0:i(e))===!1)continue;let t=d[c.indexOf(e)];if(!t)continue;let{direction:r,speed:l}=function(e,t,n,r,i){let{top:l,left:o,right:a,bottom:s}=n;void 0===r&&(r=10),void 0===i&&(i=eU);let{isTop:u,isBottom:c,isLeft:d,isRight:p}=e$(e),h={x:0,y:0},m={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!u&&l<=t.top+g.height?(h.y=f.Backward,m.y=r*Math.abs((t.top+g.height-l)/g.height)):!c&&s>=t.bottom-g.height&&(h.y=f.Forward,m.y=r*Math.abs((t.bottom-g.height-s)/g.height)),!p&&a>=t.right-g.width?(h.x=f.Forward,m.x=r*Math.abs((t.right-g.width-a)/g.width)):!d&&o<=t.left+g.width&&(h.x=f.Backward,m.x=r*Math.abs((t.left+g.width-o)/g.width)),{direction:h,speed:m}}(e,t,j,n,h);for(let e of["x","y"])m[e][r[e]]||(l[e]=0,r[e]=0);if(l.x>0||l.y>0){y(),C.current=e,b(S,a),v.current=l,k.current=r;return}}v.current={x:0,y:0},k.current={x:0,y:0},y()},[n,S,i,y,o,a,JSON.stringify(j),JSON.stringify(m),b,c,N,d,JSON.stringify(h)])}({...ew,delta:V,draggingRect:e2,pointerCoordinates:eQ,scrollableAncestors:eW,scrollableAncestorRects:eX});let tv=(0,w.useMemo)(()=>({active:Q,activeNode:ey,activeNodeRect:eC,activatorEvent:ea,collisions:e4,containerNodeRect:eN,dragOverlay:eM,draggableNodes:H,droppableContainers:K,droppableRects:em,over:ta,measureDroppableContainers:eg,scrollableAncestors:eW,scrollableAncestorRects:eX,measuringConfiguration:ep,measuringScheduled:eb,windowRect:eJ}),[Q,ey,eC,ea,e4,eN,eM,H,K,em,ta,eg,eW,eX,ep,eb,eJ]),tk=(0,w.useMemo)(()=>({activatorEvent:ea,activators:ty,active:Q,activeNodeRect:eC,ariaDescribedById:{draggable:ed},dispatch:L,draggableNodes:H,over:ta,measureDroppableContainers:eg}),[ea,ty,Q,eC,L,ed,H,ta,eg]);return w.default.createElement(eh.Provider,{value:R},w.default.createElement(tc.Provider,{value:tk},w.default.createElement(td.Provider,{value:tv},w.default.createElement(tm.Provider,{value:tu},E)),w.default.createElement(th,{disabled:(null==S?void 0:S.restoreFocus)===!1})),w.default.createElement(ex,{...S,hiddenTextDescribedById:ed}))}),tx=(0,w.createContext)(null),tb="button",ty={timeout:25},tv={position:"fixed",touchAction:"none"},tk=e=>ea(e)?"transform 250ms ease":void 0;function tw(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function tj(e){return null!==e&&e>=0}(e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:l,className:o,rect:a,style:s,transform:u,transition:c=tk}=e;if(!a)return null;let d=i?u:{...u,scaleX:1,scaleY:1},f={...tv,width:a.width,height:a.height,top:a.top,left:a.left,transform:eu.Transform.toString(d),transformOrigin:i&&r?function(e,t){let n=es(e);if(!n)return"0 0";let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}(r,a):void 0,transition:"function"==typeof c?c(r):c,...s};return w.default.createElement(n,{className:o,style:f,ref:t},l)},t={styles:{active:{opacity:"0"}}};let tC=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,l=tw(t,r,n),o=t[i],a=l[i];return a&&o?{x:a.left-o.left,y:a.top-o.top,scaleX:a.width/o.width,scaleY:a.height/o.height}:null},tS={scaleX:1,scaleY:1},tN=e=>{var t,n,r,i;let l,o,a,{activeIndex:s,activeNodeRect:u,index:c,rects:d,overIndex:f}=e,p=null!=(t=d[s])?t:u;if(!p)return null;if(c===s){let e=d[f];return e?{x:0,y:s<f?e.top+e.height-(p.top+p.height):e.top-p.top,...tS}:null}let h=(n=d,r=c,i=s,l=n[r],o=n[r-1],a=n[r+1],l?i<r?o?l.top-(o.top+o.height):a?a.top-(l.top+l.height):0:a?a.top-(l.top+l.height):o?l.top-(o.top+o.height):0:0);return c>s&&c<=f?{x:0,y:-p.height-h,...tS}:c<s&&c>=f?{x:0,y:p.height+h,...tS}:{x:0,y:0,...tS}},tE="Sortable",tT=w.default.createContext({activeIndex:-1,containerId:tE,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:tC,disabled:{draggable:!1,droppable:!1}});function tD(e){let{children:t,id:n,items:r,strategy:i=tC,disabled:l=!1}=e,{active:o,dragOverlay:a,droppableRects:s,over:u,measureDroppableContainers:c}=(0,w.useContext)(td),d=er(tE,n),f=null!==a.rect,p=(0,w.useMemo)(()=>r.map(e=>"object"==typeof e&&"id"in e?e.id:e),[r]),h=null!=o,m=o?p.indexOf(o.id):-1,g=u?p.indexOf(u.id):-1,x=(0,w.useRef)(p),b=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(p,x.current),y=-1!==g&&-1===m||b,v="boolean"==typeof l?{draggable:l,droppable:l}:l;Y(()=>{b&&h&&c(p)},[b,p,h,c]),(0,w.useEffect)(()=>{x.current=p},[p]);let k=(0,w.useMemo)(()=>({activeIndex:m,containerId:d,disabled:v,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:p.reduce((e,t,n)=>{let r=s.get(t);return r&&(e[n]=r),e},Array(p.length)),strategy:i}),[m,d,v.draggable,v.droppable,y,p,g,s,f,i]);return w.default.createElement(tT.Provider,{value:k},t)}let tI=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return tw(n,r,i).indexOf(t)},tA=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:l,newIndex:o,previousItems:a,previousContainerId:s,transition:u}=e;return!!u&&!!r&&(a===l||i!==o)&&(!!n||o!==i&&t===s)},tP={duration:200,easing:"ease"},tM="transform",tL=eu.Transition.toString({property:tM,duration:0,easing:"linear"}),tO={roleDescription:"sortable"};function tR(e){if(!e)return!1;let t=e.data.current;return!!t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable}let tF=[h.Down,h.Right,h.Up,h.Left],tz=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:l,over:o,scrollableAncestors:a}}=t;if(tF.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];l.getEnabled().forEach(n=>{if(!n||null!=n&&n.disabled)return;let l=i.get(n.id);if(l)switch(e.code){case h.Down:r.top<l.top&&t.push(n);break;case h.Up:r.top>l.top&&t.push(n);break;case h.Left:r.left>l.left&&t.push(n);break;case h.Right:r.left<l.left&&t.push(n)}});let c=(e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=eC(t),l=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=eC(r),o=Number((i.reduce((e,t,r)=>e+ek(n[r],t),0)/4).toFixed(4));l.push({id:t,data:{droppableContainer:e,value:o}})}}return l.sort(ew)})({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),d=eS(c,"id");if(d===(null==o?void 0:o.id)&&c.length>1&&(d=c[1].id),null!=d){let e=l.get(n.id),t=l.get(d),o=t?i.get(t.id):null,c=null==t?void 0:t.node.current;if(c&&o&&e&&t){var s,u;let n=eL(c).some((e,t)=>a[t]!==e),i=t_(e,t),l=(s=e,u=t,!!tR(s)&&!!tR(u)&&!!t_(s,u)&&s.data.current.sortable.index<u.data.current.sortable.index),d=n||!i?{x:0,y:0}:{x:l?r.width-o.width:0,y:l?r.height-o.height:0},f={x:o.left,y:o.top};return d.x&&d.y?f:eo(f,d)}}}};function t_(e,t){return!!tR(e)&&!!tR(t)&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}let tB=[{key:"idea",label:"Idea",icon:"💡",color:"text-muted-foreground"},{key:"writing",label:"Writing",icon:"✏️",color:"text-warning"},{key:"submitted",label:"Submitted",icon:"🚀",color:"text-primary"},{key:"testing",label:"Testing",icon:"🧪",color:"text-accent"},{key:"done",label:"Done",icon:"✅",color:"text-success"},{key:"problem",label:"Problem",icon:"🔴",color:"text-destructive"}];function t$({status:e,onChange:t}){return(0,k.jsx)("div",{className:"flex items-center gap-1",children:tB.map(n=>(0,k.jsx)("button",{onClick:()=>t(n.key),title:n.label,className:`px-2 py-1 rounded text-base transition-all ${e===n.key?`${n.color} bg-muted scale-110`:"opacity-40 hover:opacity-80"}`,children:n.icon},n.key))})}function tU(e){return tB.find(t=>t.key===e)?.icon??""}let tH={high:"bg-destructive",medium:"bg-warning",low:"bg-muted-foreground"};function tV({subProjects:e,tasks:t,selectedSubId:n,selectedTaskId:r,onSelectSub:i,onSelectTask:l,onCreateSub:o,onDeleteSub:a,onCreateTask:s,onStatusChange:u,onTodayToggle:c,onDeleteTask:d,onReorderSubs:f,onAutoDistribute:p,chatStates:h}){let[m,g]=(0,w.useState)(new Set),[x,b]=(0,w.useState)(null),[y,v]=(0,w.useState)(""),j=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,w.useMemo)(()=>[...t].filter(e=>null!=e),[...t])}(ey(e4,{activationConstraint:{distance:5}}),ey(eG,{coordinateGetter:tz})),C=e=>{g(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},S=e=>{let t=y.trim();t&&(i(e),s(t),v(""),b(null))};return(0,k.jsxs)("div",{className:"flex flex-col h-full",children:[(0,k.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border flex-shrink-0",children:[(0,k.jsx)("h2",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Projects"}),(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsx)("button",{onClick:()=>{g(e.length>0&&e.every(e=>m.has(e.id))?new Set:new Set(e.map(e=>e.id)))},className:"text-xs text-muted-foreground hover:text-foreground transition-colors",title:e.length>0&&e.every(e=>m.has(e.id))?"Expand all":"Collapse all",children:e.length>0&&e.every(e=>m.has(e.id))?"▶":"▼"}),p&&(0,k.jsx)("button",{onClick:p,className:"text-[10px] px-1.5 py-0.5 bg-accent/15 text-accent border border-accent/30 rounded hover:bg-accent/25 transition-colors",title:"AI auto-distribute brainstorming to tasks",children:"Auto"}),(0,k.jsxs)("button",{onClick:o,className:"text-xs text-muted-foreground hover:text-foreground transition-colors",title:"Add sub-project (N)",children:["+ ",(0,k.jsx)("span",{className:"text-muted-foreground/50",children:"N"})]})]})]}),(0,k.jsxs)("div",{className:"flex-1 overflow-y-auto py-1",children:[0===e.length&&(0,k.jsx)("div",{className:"text-center py-8 text-muted-foreground text-xs",children:"Create a sub-project to get started"}),(0,k.jsx)(tg,{sensors:j,collisionDetection:eE,onDragEnd:t=>{let{active:n,over:r}=t;if(!r||n.id===r.id||!f)return;let i=e.findIndex(e=>e.id===n.id),l=e.findIndex(e=>e.id===r.id);if(-1===i||-1===l)return;let o=[...e],[a]=o.splice(i,1);o.splice(l,0,a),f(o.map(e=>e.id))},children:(0,k.jsx)(tD,{items:e.map(e=>e.id),strategy:tN,children:e.map(e=>(0,k.jsx)(tq,{sp:e,isSelected:n===e.id,isCollapsed:m.has(e.id),tasks:n===e.id?t:[],selectedTaskId:r,addingTaskFor:x,newTaskTitle:y,onSelectSub:i,onSelectTask:l,onToggleCollapse:C,onDeleteSub:a,onStatusChange:u,onTodayToggle:c,onDeleteTask:d,onAddTask:S,onSetAddingTaskFor:b,onSetNewTaskTitle:v,chatStates:h},e.id))})})]})]})}function tq({sp:e,isSelected:t,isCollapsed:n,tasks:r,selectedTaskId:i,addingTaskFor:l,newTaskTitle:o,onSelectSub:a,onSelectTask:s,onToggleCollapse:u,onDeleteSub:c,onStatusChange:f,onTodayToggle:p,onDeleteTask:h,onAddTask:m,onSetAddingTaskFor:g,onSetNewTaskTitle:x,chatStates:b}){let y,{attributes:v,listeners:j,setNodeRef:C,transform:S,transition:N,isDragging:E}=function(e){var t,n,r,i;let{animateLayoutChanges:l=tA,attributes:o,disabled:a,data:s,getNewIndex:u=tI,id:c,strategy:f,resizeObserverConfig:p,transition:h=tP}=e,{items:m,containerId:g,activeIndex:x,disabled:b,disableTransforms:y,sortedRects:v,overIndex:k,useDragOverlay:j,strategy:C}=(0,w.useContext)(tT),S=(t=a,n=b,"boolean"==typeof t?{draggable:t,droppable:!1}:{draggable:null!=(r=null==t?void 0:t.draggable)?r:n.draggable,droppable:null!=(i=null==t?void 0:t.droppable)?i:n.droppable}),N=m.indexOf(c),E=(0,w.useMemo)(()=>({sortable:{containerId:g,index:N,items:m},...s}),[g,s,N,m]),T=(0,w.useMemo)(()=>m.slice(m.indexOf(c)),[m,c]),{rect:D,node:I,isOver:A,setNodeRef:P}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,l=er("Droppable"),{active:o,dispatch:a,over:s,measureDroppableContainers:u}=(0,w.useContext)(tc),c=(0,w.useRef)({disabled:n}),f=(0,w.useRef)(!1),p=(0,w.useRef)(null),h=(0,w.useRef)(null),{disabled:m,updateMeasurementsFor:g,timeout:x}={...ty,...i},b=G(null!=g?g:r),y=e9({callback:(0,w.useCallback)(()=>{if(!f.current){f.current=!0;return}null!=h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(b.current)?b.current:[b.current]),h.current=null},x)},[x]),disabled:m||!o}),[v,k]=ee((0,w.useCallback)((e,t)=>{y&&(t&&(y.unobserve(t),f.current=!1),e&&y.observe(e))},[y])),j=G(t);return(0,w.useEffect)(()=>{y&&v.current&&(y.disconnect(),f.current=!1,y.observe(v.current))},[v,y]),(0,w.useEffect)(()=>(a({type:d.RegisterDroppable,element:{id:r,key:l,disabled:n,node:v,rect:p,data:j}}),()=>a({type:d.UnregisterDroppable,key:l,id:r})),[r]),(0,w.useEffect)(()=>{n!==c.current.disabled&&(a({type:d.SetDroppableDisabled,id:r,key:l,disabled:n}),c.current.disabled=n)},[r,l,n,a]),{active:o,rect:p,isOver:(null==s?void 0:s.id)===r,node:v,over:s,setNodeRef:k}}({id:c,data:E,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:T,...p}}),{active:M,activatorEvent:L,activeNodeRect:O,attributes:R,setNodeRef:F,listeners:z,isDragging:_,over:B,setActivatorNodeRef:$,transform:U}=function(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,l=er("Draggable"),{activators:o,activatorEvent:a,active:s,activeNodeRect:u,ariaDescribedById:c,draggableNodes:d,over:f}=(0,w.useContext)(tc),{role:p=tb,roleDescription:h="draggable",tabIndex:m=0}=null!=i?i:{},g=(null==s?void 0:s.id)===t,x=(0,w.useContext)(g?tm:tx),[b,y]=ee(),[v,k]=ee(),j=(0,w.useMemo)(()=>o.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[o,t]),C=G(n);return Y(()=>(d.set(t,{id:t,key:l,node:b,activatorNode:v,data:C}),()=>{let e=d.get(t);e&&e.key===l&&d.delete(t)}),[d,t]),{active:s,activatorEvent:a,activeNodeRect:u,attributes:(0,w.useMemo)(()=>({role:p,tabIndex:m,"aria-disabled":r,"aria-pressed":!!g&&p===tb||void 0,"aria-roledescription":h,"aria-describedby":c.draggable}),[r,p,m,g,h,c.draggable]),isDragging:g,listeners:r?void 0:j,node:b,over:f,setNodeRef:y,setActivatorNodeRef:k,transform:x}}({id:c,data:E,attributes:{...tO,...o},disabled:S.draggable}),H=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,w.useMemo)(()=>e=>{t.forEach(t=>t(e))},t)}(P,F),V=!!M,q=V&&!y&&tj(x)&&tj(k),K=!j&&_,J=K&&q?U:null,W=q?null!=J?J:(null!=f?f:C)({rects:v,activeNodeRect:O,activeIndex:x,overIndex:k,index:N}):null,X=tj(x)&&tj(k)?u({id:c,items:m,activeIndex:x,overIndex:k}):N,Q=null==M?void 0:M.id,Z=(0,w.useRef)({activeId:Q,items:m,newIndex:X,containerId:g}),et=m!==Z.current.items,en=l({active:M,containerId:g,isDragging:_,isSorting:V,id:c,index:N,items:m,newIndex:Z.current.newIndex,previousItems:Z.current.items,previousContainerId:Z.current.containerId,transition:h,wasDragging:null!=Z.current.activeId}),ei=function(e){let{disabled:t,index:n,node:r,rect:i}=e,[l,o]=(0,w.useState)(null),a=(0,w.useRef)(n);return Y(()=>{if(!t&&n!==a.current&&r.current){let e=i.current;if(e){let t=eP(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==a.current&&(a.current=n)},[t,n,r,i]),(0,w.useEffect)(()=>{l&&o(null)},[l]),l}({disabled:!en,index:N,node:I,rect:D});return(0,w.useEffect)(()=>{V&&Z.current.newIndex!==X&&(Z.current.newIndex=X),g!==Z.current.containerId&&(Z.current.containerId=g),m!==Z.current.items&&(Z.current.items=m)},[V,X,g,m]),(0,w.useEffect)(()=>{if(Q===Z.current.activeId)return;if(null!=Q&&null==Z.current.activeId){Z.current.activeId=Q;return}let e=setTimeout(()=>{Z.current.activeId=Q},50);return()=>clearTimeout(e)},[Q]),{active:M,activeIndex:x,attributes:R,data:E,rect:D,index:N,newIndex:X,items:m,isOver:A,isSorting:V,isDragging:_,listeners:z,node:I,overIndex:k,over:B,setNodeRef:H,setActivatorNodeRef:$,setDroppableNodeRef:P,setDraggableNodeRef:F,transform:null!=ei?ei:W,transition:ei||et&&Z.current.newIndex===N?tL:(!K||ea(L))&&h&&(V||en)?eu.Transition.toString({...h,property:tM}):void 0}}({id:e.id}),T={transform:eu.Transform.toString(S),transition:N,opacity:E?.5:1,zIndex:E?10:void 0};return(0,k.jsxs)("div",{ref:C,style:T,className:"mb-0.5",children:[(0,k.jsxs)("div",{onClick:()=>{t?u(e.id):(a(e.id),n&&u(e.id))},className:`flex items-center gap-1.5 px-2 py-1.5 cursor-pointer transition-colors group text-sm ${t?"text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[(0,k.jsx)("span",{...v,...j,className:"w-4 h-4 flex items-center justify-center text-xs text-muted-foreground/40 hover:text-muted-foreground cursor-grab active:cursor-grabbing flex-shrink-0",title:"Drag to reorder",onClick:e=>e.stopPropagation(),children:"⠿"}),(0,k.jsx)("button",{onClick:t=>{t.stopPropagation(),u(e.id)},className:"w-4 h-4 flex items-center justify-center text-xs text-muted-foreground flex-shrink-0",children:n?"▶":"▼"}),(y=0===e.task_count?null:e.problem_count>0?{dotClass:"bg-destructive",label:`${e.problem_count}!`,title:`${e.problem_count} problem`}:e.done_count===e.task_count?{dotClass:"bg-success",label:`${e.done_count}/${e.task_count}`,title:"All done"}:e.done_count>0?{dotClass:"bg-primary",label:`${e.done_count}/${e.task_count}`,title:`${e.done_count} done, ${e.active_count} active`}:e.active_count>0?{dotClass:"bg-warning",label:`${e.active_count}`,title:`${e.active_count} in progress`}:null)?(0,k.jsx)("span",{className:`w-2 h-2 rounded-full ${y.dotClass} flex-shrink-0`,title:y.title}):null,(0,k.jsx)("span",{className:`flex-1 truncate font-medium ${t?"text-primary":""}`,children:e.name}),(0,k.jsxs)("div",{className:"flex items-center gap-1.5",children:[e.task_count>0&&(0,k.jsx)("span",{className:"text-xs text-muted-foreground tabular-nums",children:e.task_count}),(0,k.jsx)("button",{onClick:t=>{t.stopPropagation(),c(e.id)},className:"text-muted-foreground hover:text-destructive opacity-0 group-hover:opacity-100 transition-opacity text-xs",children:"x"})]})]}),!n&&t&&(0,k.jsxs)("div",{className:"ml-3 border-l border-border/50",children:[0===r.length&&!l&&(0,k.jsx)("div",{className:"text-xs text-muted-foreground py-2 pl-4",children:"No tasks"}),r.map(e=>(0,k.jsxs)("div",{onClick:()=>s(e.id),className:`group/task flex items-center gap-1.5 pl-4 pr-2 py-1.5 cursor-pointer transition-colors text-sm border-l-2 ${i===e.id?"bg-card-hover border-l-primary":"border-l-transparent hover:bg-card-hover/50"}`,children:[(0,k.jsx)("button",{onClick:t=>{var n;let r,i;t.stopPropagation();let l=(n=e.status,-1===(i=(r=["idea","writing","submitted","testing","done"]).indexOf(n))?"idea":r[(i+1)%r.length]);f(e.id,l)},className:"flex-shrink-0 text-sm",title:`Status: ${e.status}`,children:tU(e.status)}),(0,k.jsx)("span",{className:`tree-priority-dot ${tH[e.priority]}`}),(0,k.jsx)("span",{className:`flex-1 truncate ${"done"===e.status?"text-muted-foreground line-through":""}`,children:e.title}),b?.[e.id]==="loading"&&(0,k.jsxs)("span",{className:"flex-shrink-0 flex items-center gap-1 text-[10px] text-warning",title:"AI 응답 대기 중",children:[(0,k.jsx)("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-warning animate-pulse"}),"AI..."]}),b?.[e.id]==="done"&&(0,k.jsx)("span",{className:"flex-shrink-0 text-[10px] text-success",title:"AI 응답 완료",children:"✓"}),e.is_today&&(0,k.jsx)("button",{onClick:t=>{t.stopPropagation(),p(e.id,!1)},className:"text-xs flex-shrink-0 text-primary",title:"Remove from today",children:"*"}),(0,k.jsx)("button",{onClick:t=>{t.stopPropagation(),h(e.id)},className:"flex-shrink-0 text-muted-foreground/0 group-hover/task:text-muted-foreground hover:!text-destructive transition-colors text-xs px-0.5",title:"Delete task",children:"×"})]},e.id)),l===e.id?(0,k.jsx)("div",{className:"pl-4 pr-2 py-1",children:(0,k.jsx)("input",{type:"text",value:o,onChange:e=>x(e.target.value),onKeyDown:t=>{"Enter"===t.key&&m(e.id),"Escape"===t.key&&(x(""),g(null))},placeholder:"Task title...",className:"w-full bg-input border border-border rounded px-2 py-1 text-sm focus:border-primary focus:outline-none text-foreground",autoFocus:!0})}):(0,k.jsxs)("button",{"data-add-task":!0,onClick:()=>{a(e.id),g(e.id)},className:"pl-4 pr-2 py-1 text-xs text-muted-foreground hover:text-foreground transition-colors text-left w-full",children:["+ Add task ",(0,k.jsx)("span",{className:"text-muted-foreground/50 ml-1",children:"T"})]})]}),!n&&!t&&e.preview_tasks&&e.preview_tasks.length>0&&(0,k.jsx)("div",{className:"ml-3 border-l border-border/50",children:e.preview_tasks.map((t,n)=>(0,k.jsxs)("div",{onClick:()=>a(e.id),className:"flex items-center gap-1.5 pl-4 pr-2 py-1 cursor-pointer text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,k.jsx)("span",{className:"flex-shrink-0",children:tU(t.status)}),(0,k.jsx)("span",{className:"truncate",children:t.title})]},n))})]})}function tK({content:e,onSave:t,onRefine:n,refining:r}){let[i,l]=(0,w.useState)(!1),[o,a]=(0,w.useState)(e),[s,u]=(0,w.useState)(!1),c=(0,w.useRef)(null);(0,w.useEffect)(()=>{a(e)},[e]),(0,w.useEffect)(()=>{i&&c.current&&(c.current.focus(),c.current.style.height="auto",c.current.style.height=c.current.scrollHeight+"px")},[i]);let d=()=>{t(o),l(!1)},f=async()=>{e&&(await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),1500))};return(0,k.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,k.jsxs)("div",{className:"flex items-center justify-between",children:[(0,k.jsx)("h4",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Prompt"}),(0,k.jsxs)("div",{className:"flex items-center gap-1.5",children:[n&&(0,k.jsx)("button",{onClick:n,disabled:r,className:"prompt-action-btn prompt-generate-btn",children:r?"Refining...":"AI Refine"}),!i&&e&&(0,k.jsx)("button",{onClick:f,className:"prompt-action-btn",children:s?"Copied!":"Copy"}),i?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("button",{onClick:()=>{a(e),l(!1)},className:"prompt-action-btn",children:"Cancel"}),(0,k.jsx)("button",{onClick:d,className:"prompt-action-btn",style:{color:"hsl(var(--success))"},children:"Save"})]}):(0,k.jsx)("button",{onClick:()=>l(!0),className:"prompt-action-btn",children:"Edit"})]})]}),i?(0,k.jsx)("textarea",{ref:c,value:o,onChange:e=>{a(e.target.value),e.target.style.height="auto",e.target.style.height=e.target.scrollHeight+"px"},onKeyDown:t=>{"Escape"===t.key&&(a(e),l(!1)),(t.metaKey||t.ctrlKey)&&"Enter"===t.key&&d()},className:"prompt-edit-textarea",rows:4,placeholder:"Write your prompt here..."}):e?(0,k.jsx)("div",{className:"prompt-content text-sm",children:e}):(0,k.jsx)("div",{className:"text-sm text-muted-foreground italic py-6 text-center border border-dashed border-border rounded-lg",children:"No prompt yet. Click Edit to write one."})]})}function tJ(){}function tW(){}let tX=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tY=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tQ={};function tG(e,t){return((t||tQ).jsx?tY:tX).test(e)}let tZ=/[ \t\n\f\r]/g;function t0(e){return""===e.replace(tZ,"")}class t1{constructor(e,t){this.attribute=t,this.property=e}}t1.prototype.attribute="",t1.prototype.booleanish=!1,t1.prototype.boolean=!1,t1.prototype.commaOrSpaceSeparated=!1,t1.prototype.commaSeparated=!1,t1.prototype.defined=!1,t1.prototype.mustUseProperty=!1,t1.prototype.number=!1,t1.prototype.overloadedBoolean=!1,t1.prototype.property="",t1.prototype.spaceSeparated=!1,t1.prototype.space=void 0;let t2=0,t4=ne(),t5=ne(),t3=ne(),t6=ne(),t9=ne(),t8=ne(),t7=ne();function ne(){return 2**++t2}e.s(["boolean",0,t4,"booleanish",0,t5,"commaOrSpaceSeparated",0,t7,"commaSeparated",0,t8,"number",0,t6,"overloadedBoolean",0,t3,"spaceSeparated",0,t9],744);var nt=e.i(744);let nn=Object.keys(nt);class nr extends t1{constructor(e,t,n,r){let i=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++i<nn.length;){const e=nn[i];!function(e,t,n){n&&(e[t]=n)}(this,nn[i],(n&nt[e])===nt[e])}}}function ni(e){return e.toLowerCase()}nr.prototype.defined=!0;let nl=/[A-Z]/g,no=/-[a-z]/g,na=/^data[-\w.:]+$/i;function ns(e){return"-"+e.toLowerCase()}function nu(e){return e.charAt(1).toUpperCase()}let nc={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};class nd{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function nf(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new nd(n,r,t)}function np(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let l=new nr(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[ni(r)]=r,n[ni(l.attribute)]=r}return new nd(t,n,e.space)}nd.prototype.normal={},nd.prototype.property={},nd.prototype.space=void 0;let nh=np({properties:{ariaActiveDescendant:null,ariaAtomic:t5,ariaAutoComplete:null,ariaBusy:t5,ariaChecked:t5,ariaColCount:t6,ariaColIndex:t6,ariaColSpan:t6,ariaControls:t9,ariaCurrent:null,ariaDescribedBy:t9,ariaDetails:null,ariaDisabled:t5,ariaDropEffect:t9,ariaErrorMessage:null,ariaExpanded:t5,ariaFlowTo:t9,ariaGrabbed:t5,ariaHasPopup:null,ariaHidden:t5,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:t9,ariaLevel:t6,ariaLive:null,ariaModal:t5,ariaMultiLine:t5,ariaMultiSelectable:t5,ariaOrientation:null,ariaOwns:t9,ariaPlaceholder:null,ariaPosInSet:t6,ariaPressed:t5,ariaReadOnly:t5,ariaRelevant:null,ariaRequired:t5,ariaRoleDescription:t9,ariaRowCount:t6,ariaRowIndex:t6,ariaRowSpan:t6,ariaSelected:t5,ariaSetSize:t6,ariaSort:null,ariaValueMax:t6,ariaValueMin:t6,ariaValueNow:t6,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function nm(e,t){return t in e?e[t]:t}function ng(e,t){return nm(e,t.toLowerCase())}let nx=np({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:t8,acceptCharset:t9,accessKey:t9,action:null,allow:null,allowFullScreen:t4,allowPaymentRequest:t4,allowUserMedia:t4,alt:null,as:null,async:t4,autoCapitalize:null,autoComplete:t9,autoFocus:t4,autoPlay:t4,blocking:t9,capture:null,charSet:null,checked:t4,cite:null,className:t9,cols:t6,colSpan:null,content:null,contentEditable:t5,controls:t4,controlsList:t9,coords:t6|t8,crossOrigin:null,data:null,dateTime:null,decoding:null,default:t4,defer:t4,dir:null,dirName:null,disabled:t4,download:t3,draggable:t5,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:t4,formTarget:null,headers:t9,height:t6,hidden:t3,high:t6,href:null,hrefLang:null,htmlFor:t9,httpEquiv:t9,id:null,imageSizes:null,imageSrcSet:null,inert:t4,inputMode:null,integrity:null,is:null,isMap:t4,itemId:null,itemProp:t9,itemRef:t9,itemScope:t4,itemType:t9,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:t4,low:t6,manifest:null,max:null,maxLength:t6,media:null,method:null,min:null,minLength:t6,multiple:t4,muted:t4,name:null,nonce:null,noModule:t4,noValidate:t4,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:t4,optimum:t6,pattern:null,ping:t9,placeholder:null,playsInline:t4,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:t4,referrerPolicy:null,rel:t9,required:t4,reversed:t4,rows:t6,rowSpan:t6,sandbox:t9,scope:null,scoped:t4,seamless:t4,selected:t4,shadowRootClonable:t4,shadowRootDelegatesFocus:t4,shadowRootMode:null,shape:null,size:t6,sizes:null,slot:null,span:t6,spellCheck:t5,src:null,srcDoc:null,srcLang:null,srcSet:null,start:t6,step:null,style:null,tabIndex:t6,target:null,title:null,translate:null,type:null,typeMustMatch:t4,useMap:null,value:t5,width:t6,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:t9,axis:null,background:null,bgColor:null,border:t6,borderColor:null,bottomMargin:t6,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:t4,declare:t4,event:null,face:null,frame:null,frameBorder:null,hSpace:t6,leftMargin:t6,link:null,longDesc:null,lowSrc:null,marginHeight:t6,marginWidth:t6,noResize:t4,noHref:t4,noShade:t4,noWrap:t4,object:null,profile:null,prompt:null,rev:null,rightMargin:t6,rules:null,scheme:null,scrolling:t5,standby:null,summary:null,text:null,topMargin:t6,valueType:null,version:null,vAlign:null,vLink:null,vSpace:t6,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:t4,disableRemotePlayback:t4,prefix:null,property:null,results:t6,security:null,unselectable:null},space:"html",transform:ng}),nb=np({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:t7,accentHeight:t6,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:t6,amplitude:t6,arabicForm:null,ascent:t6,attributeName:null,attributeType:null,azimuth:t6,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:t6,by:null,calcMode:null,capHeight:t6,className:t9,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:t6,diffuseConstant:t6,direction:null,display:null,dur:null,divisor:t6,dominantBaseline:null,download:t4,dx:null,dy:null,edgeMode:null,editable:null,elevation:t6,enableBackground:null,end:null,event:null,exponent:t6,externalResourcesRequired:null,fill:null,fillOpacity:t6,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:t8,g2:t8,glyphName:t8,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:t6,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:t6,horizOriginX:t6,horizOriginY:t6,id:null,ideographic:t6,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:t6,k:t6,k1:t6,k2:t6,k3:t6,k4:t6,kernelMatrix:t7,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:t6,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:t6,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:t6,overlineThickness:t6,paintOrder:null,panose1:null,path:null,pathLength:t6,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:t9,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:t6,pointsAtY:t6,pointsAtZ:t6,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:t7,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:t7,rev:t7,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:t7,requiredFeatures:t7,requiredFonts:t7,requiredFormats:t7,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:t6,specularExponent:t6,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:t6,strikethroughThickness:t6,string:null,stroke:null,strokeDashArray:t7,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:t6,strokeOpacity:t6,strokeWidth:null,style:null,surfaceScale:t6,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:t7,tabIndex:t6,tableValues:null,target:null,targetX:t6,targetY:t6,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:t7,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:t6,underlineThickness:t6,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:t6,values:null,vAlphabetic:t6,vMathematical:t6,vectorEffect:null,vHanging:t6,vIdeographic:t6,version:null,vertAdvY:t6,vertOriginX:t6,vertOriginY:t6,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:t6,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:nm}),ny=np({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),nv=np({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ng}),nk=np({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),nw=nf([nh,nx,ny,nv,nk],"html"),nj=nf([nh,nb,ny,nv,nk],"svg");var nC=e.i(15511);let nS=nE("end"),nN=nE("start");function nE(e){return function(t){let n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function nT(e){return e&&"object"==typeof e?"position"in e||"type"in e?nI(e.position):"start"in e||"end"in e?nI(e):"line"in e||"column"in e?nD(e):"":""}function nD(e){return nA(e&&e.line)+":"+nA(e&&e.column)}function nI(e){return nD(e&&e.start)+"-"+nD(e&&e.end)}function nA(e){return e&&"number"==typeof e?e:1}class nP extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},l=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(l=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=o?o.line:void 0,this.name=nT(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=l&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}nP.prototype.file="",nP.prototype.name="",nP.prototype.reason="",nP.prototype.message="",nP.prototype.stack="",nP.prototype.column=void 0,nP.prototype.line=void 0,nP.prototype.ancestors=void 0,nP.prototype.cause=void 0,nP.prototype.fatal=void 0,nP.prototype.place=void 0,nP.prototype.ruleId=void 0,nP.prototype.source=void 0;let nM={}.hasOwnProperty,nL=new Map,nO=/[A-Z]/g,nR=new Set(["table","tbody","thead","tfoot","tr"]),nF=new Set(["td","th"]),nz="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function n_(e,t,n){var r,i,l,o,a,s,u,c,d;let f,p,h,m,g,x,b,y,v,k,w;return"element"===t.type?(r=e,i=t,l=n,p=f=r.schema,"svg"===i.tagName.toLowerCase()&&"html"===f.space&&(r.schema=nj),r.ancestors.push(i),h=nH(r,i.tagName,!1),m=function(e,t){let n,r,i={};for(r in t.properties)if("children"!==r&&nM.call(t.properties,r)){let l=function(e,t,n){let r=function(e,t){let n=ni(t),r=t,i=t1;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&na.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(no,nu);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!no.test(e)){let n=e.replace(nl,ns);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=nr}return new i(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){var i;let t;if(Array.isArray(n)&&(n=r.commaSeparated?(t={},(""===(i=n)[i.length-1]?[...i,""]:i).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return(0,nC.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let t=new nP("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=nz+"#cannot-parse-style-attribute",t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){let t,n={};for(t in e)nM.call(e,t)&&(n[function(e){let t=e.replace(nO,nq);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return n}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?nc[r.property]||r.property:r.attribute,n]}}(e,r,t.properties[r]);if(l){let[r,o]=l;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof o&&nF.has(t.tagName)?n=o:i[r]=o}}return n&&((i.style||(i.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n),i}(r,i),g=nU(r,i),nR.has(i.tagName)&&(g=g.filter(function(e){return"string"!=typeof e||!("object"==typeof e?"text"===e.type&&t0(e.value):t0(e))})),nB(r,m,h,i),n$(m,g),r.ancestors.pop(),r.schema=f,r.create(i,h,m,l)):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return tJ("ExpressionStatement"===n.type),e.evaluater.evaluateExpression(n.expression)}nV(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?(o=e,a=t,s=n,b=x=o.schema,"svg"===a.name&&"html"===x.space&&(o.schema=nj),o.ancestors.push(a),y=null===a.name?o.Fragment:nH(o,a.name,!0),v=function(e,t){let n={};for(let r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];tJ("ExpressionStatement"===t.type);let i=t.expression;tJ("ObjectExpression"===i.type);let l=i.properties[0];tJ("SpreadElement"===l.type),Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else nV(e,t.position);else{let i,l=r.name;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];tJ("ExpressionStatement"===t.type),i=e.evaluater.evaluateExpression(t.expression)}else nV(e,t.position);else i=null===r.value||r.value;n[l]=i}return n}(o,a),k=nU(o,a),nB(o,v,y,a),n$(v,k),o.ancestors.pop(),o.schema=x,o.create(a,y,v,s)):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);nV(e,t.position)}(e,t):"root"===t.type?(u=e,c=t,d=n,n$(w={},nU(u,c)),u.create(c,u.Fragment,w,d)):"text"===t.type?t.value:void 0}function nB(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function n$(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function nU(e,t){let n=[],r=-1,i=e.passKeys?new Map:nL;for(;++r<t.children.length;){let l,o=t.children[r];if(e.passKeys){let e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){let t=i.get(e)||0;l=e+"-"+t,i.set(e,t+1)}}let a=n_(e,o,l);void 0!==a&&n.push(a)}return n}function nH(e,t,n){let r;if(n)if(t.includes(".")){let e,n=t.split("."),i=-1;for(;++i<n.length;){let t=tG(n[i])?{type:"Identifier",name:n[i]}:{type:"Literal",value:n[i]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(i&&"Literal"===t.type),optional:!1}:t}tJ(e,"always a result"),r=e}else r=tG(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){let t=r.value;return nM.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);nV(e)}function nV(e,t){let n=new nP("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=nz+"#cannot-handle-mdx-estrees-without-createevaluater",n}function nq(e){return"-"+e.toLowerCase()}let nK={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},nJ={};function nW(e,t){let n=t||nJ;return nX(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function nX(e,t,n){var r;if((r=e)&&"object"==typeof r){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return nY(e.children,t,n)}return Array.isArray(e)?nY(e,t,n):""}function nY(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=nX(e[i],t,n);return r.join("")}function nQ(e,t,n,r){let i,l=e.length,o=0;if(t=t<0?-t>l?0:l+t:t>l?l:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);o<r.length;)(i=r.slice(o,o+1e4)).unshift(t,0),e.splice(...i),o+=1e4,t+=1e4}function nG(e,t){return e.length>0?(nQ(e,e.length,0,t),e):t}let nZ={}.hasOwnProperty;function n0(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let r,i=(nZ.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];if(l)for(r in l){nZ.call(i,r)||(i[r]=[]);let e=l[r];!function(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);nQ(e,0,0,r)}(i[r],Array.isArray(e)?e:e?[e]:[])}}}(t,e[n]);return t}let n1=rr(/[A-Za-z]/),n2=rr(/[\dA-Za-z]/),n4=rr(/[#-'*+\--9=?A-Z^-~]/);function n5(e){return null!==e&&(e<32||127===e)}let n3=rr(/\d/),n6=rr(/[\dA-Fa-f]/),n9=rr(/[!-/:-@[-`{-~]/);function n8(e){return null!==e&&e<-2}function n7(e){return null!==e&&(e<0||32===e)}function re(e){return -2===e||-1===e||32===e}let rt=rr(/\p{P}|\p{S}/u),rn=rr(/\s/);function rr(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function ri(e,t,n,r){let i=r?r-1:1/0,l=0;return function(r){return re(r)?(e.enter(n),function r(o){return re(o)&&l++<i?(e.consume(o),r):(e.exit(n),t(o))}(r)):t(r)}}let rl={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ri(e,n,"linePrefix"))},function(n){return e.enter("paragraph"),function n(r){let i=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=i),t=i,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return n8(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},ro={tokenize:function(e){let t,n,r,i=this,l=[],o=0;return a;function a(t){if(o<l.length){let n=l[o];return i.containerState=n[1],e.attempt(n[0].continuation,s,u)(t)}return u(t)}function s(e){if(o++,i.containerState._closeFlow){let n;i.containerState._closeFlow=void 0,t&&x();let r=i.events.length,l=r;for(;l--;)if("exit"===i.events[l][0]&&"chunkFlow"===i.events[l][1].type){n=i.events[l][1].end;break}g(o);let a=r;for(;a<i.events.length;)i.events[a][1].end={...n},a++;return nQ(i.events,l+1,0,i.events.slice(r)),i.events.length=a,u(e)}return a(e)}function u(n){if(o===l.length){if(!t)return f(n);if(t.currentConstruct&&t.currentConstruct.concrete)return h(n);i.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(ra,c,d)(n)}function c(e){return t&&x(),g(o),f(e)}function d(e){return i.parser.lazy[i.now().line]=o!==l.length,r=i.now().offset,h(e)}function f(t){return i.containerState={},e.attempt(ra,p,h)(t)}function p(e){return o++,l.push([i.currentConstruct,i.containerState]),f(e)}function h(r){if(null===r){t&&x(),g(0),e.consume(r);return}return t=t||i.parser.flow(i.now()),e.enter("chunkFlow",{_tokenizer:t,contentType:"flow",previous:n}),function t(n){if(null===n){m(e.exit("chunkFlow"),!0),g(0),e.consume(n);return}return n8(n)?(e.consume(n),m(e.exit("chunkFlow")),o=0,i.interrupt=void 0,a):(e.consume(n),t)}(r)}function m(e,l){let a=i.sliceStream(e);if(l&&a.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(a),i.parser.lazy[e.start.line]){let e,n,l=t.events.length;for(;l--;)if(t.events[l][1].start.offset<r&&(!t.events[l][1].end||t.events[l][1].end.offset>r))return;let a=i.events.length,s=a;for(;s--;)if("exit"===i.events[s][0]&&"chunkFlow"===i.events[s][1].type){if(e){n=i.events[s][1].end;break}e=!0}for(g(o),l=a;l<i.events.length;)i.events[l][1].end={...n},l++;nQ(i.events,s+1,0,i.events.slice(a)),i.events.length=l}}function g(t){let n=l.length;for(;n-- >t;){let t=l[n];i.containerState=t[1],t[0].exit.call(i,e)}l.length=t}function x(){t.write([null]),n=void 0,t=void 0,i.containerState._closeFlow=void 0}}},ra={tokenize:function(e,t,n){return ri(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},rs={partial:!0,tokenize:function(e,t,n){return function(t){return re(t)?ri(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||n8(e)?t(e):n(e)}}};class ru{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=null==t?1/0:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-(t||0),1/0);return n&&rc(this.left,n),r.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),rc(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),rc(this.right,e.reverse())}setCursor(e){if(e!==this.left.length&&(!(e>this.left.length)||0!==this.right.length)&&(!(e<0)||0!==this.left.length))if(e<this.left.length){let t=this.left.splice(e,1/0);rc(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);rc(this.left,t.reverse())}}}function rc(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function rd(e){let t,n,r,i,l,o,a,s={},u=-1,c=new ru(e);for(;++u<c.length;){for(;u in s;)u=s[u];if(t=c.get(u),u&&"chunkFlow"===t[1].type&&"listItemPrefix"===c.get(u-1)[1].type&&((r=0)<(o=t[1]._tokenizer.events).length&&"lineEndingBlank"===o[r][1].type&&(r+=2),r<o.length&&"content"===o[r][1].type))for(;++r<o.length&&"content"!==o[r][1].type;)"chunkText"===o[r][1].type&&(o[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(s,function(e,t){let n,r,i=e.get(t)[1],l=e.get(t)[2],o=t-1,a=[],s=i._tokenizer;!s&&(s=l.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let u=s.events,c=[],d={},f=-1,p=i,h=0,m=0,g=[0];for(;p;){for(;e.get(++o)[1]!==p;);a.push(o),!p._tokenizer&&(n=l.sliceStream(p),p.next||n.push(null),r&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(n),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),r=p,p=p.next}for(p=i;++f<u.length;)"exit"===u[f][0]&&"enter"===u[f-1][0]&&u[f][1].type===u[f-1][1].type&&u[f][1].start.line!==u[f][1].end.line&&(m=f+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=u.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)d[h+c[f][0]]=h+c[f][1],h+=c[f][1]-c[f][0]-1;return d}(c,u)),u=s[u],a=!0);else if(t[1]._container){for(r=u,n=void 0;r--;)if("lineEnding"===(i=c.get(r))[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(n&&(c.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);else if("linePrefix"===i[1].type||"listItemIndent"===i[1].type);else break;n&&(t[1].end={...c.get(n)[1].start},(l=c.slice(n,u)).unshift(t),c.splice(n,u-n+1,l))}}return nQ(e,0,1/0,c.slice(0)),!a}let rf={resolve:function(e){return rd(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):n8(t)?e.check(rp,l,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function l(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},rp={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ri(e,i,"linePrefix")};function i(i){if(null===i||n8(i))return n(i);let l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&"linePrefix"===l[1].type&&l[2].sliceSerialize(l[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}},rh={tokenize:function(e){let t=this,n=e.attempt(rs,function(r){return null===r?void e.consume(r):(e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,ri(e,e.attempt(this.parser.constructs.flow,r,e.attempt(rf,r)),"linePrefix")));return n;function r(r){return null===r?void e.consume(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n)}}},rm={resolveAll:ry()},rg=rb("string"),rx=rb("text");function rb(e){return{resolveAll:ry("text"===e?rv:void 0),tokenize:function(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,l,o);return l;function l(e){return s(e)?i(e):o(e)}function o(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),a)}function a(e){return s(e)?(t.exit("data"),i(e)):(t.consume(e),a)}function s(e){if(null===e)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function ry(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function rv(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,i=e[n-1][1],l=t.sliceStream(i),o=l.length,a=-1,s=0;for(;o--;){let e=l[o];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===e)r=!0,s++;else if(-1===e);else{o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let l={type:n===e.length||r||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:i.start._bufferIndex+a,_index:i.start._index+o,line:i.end.line,column:i.end.column-s,offset:i.end.offset-s},end:{...i.end}};i.end={...l.start},i.start.offset===i.end.offset?Object.assign(i,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}function rk(e){return null===e||n7(e)||rn(e)?1:rt(e)?2:void 0}function rw(e,t,n){let r=[],i=-1;for(;++i<e.length;){let l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}let rj={name:"attention",resolveAll:function(e,t){let n,r,i,l,o,a,s,u,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close){for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;let d={...e[n][1].end},f={...e[c][1].start};rC(d,-a),rC(f,a),l={type:a>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},o={type:a>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:f},i={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:a>1?"strong":"emphasis",start:{...l.start},end:{...o.end}},e[n][1].end={...l.start},e[c][1].start={...o.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=nG(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=nG(s,[["enter",r,t],["enter",l,t],["exit",l,t],["enter",i,t]]),s=nG(s,rw(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=nG(s,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(u=2,s=nG(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):u=0,nQ(e,n-1,c-n+3,s),c=n+s.length-u-2;break}}for(c=-1;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,i=this.previous,l=rk(i);return function(o){return n=o,e.enter("attentionSequence"),function o(a){if(a===n)return e.consume(a),o;let s=e.exit("attentionSequence"),u=rk(a),c=!u||2===u&&l||r.includes(a),d=!l||2===l&&u||r.includes(i);return s._open=!!(42===n?c:c&&(l||!d)),s._close=!!(42===n?d:d&&(u||!c)),t(a)}(o)}}};function rC(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let rS={continuation:{tokenize:function(e,t,n){let r=this;return function(t){return re(t)?ri(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(rS,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return re(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},rN={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return n9(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},rE=document.createElement("i");function rT(e){let t="&"+e+";";rE.innerHTML=t;let n=rE.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}let rD={name:"characterReference",tokenize:function(e,t,n){let r,i,l=this,o=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),r=31,i=n2,u(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=n6,u):(e.enter("characterReferenceValue"),r=7,i=n3,u(t))}function u(a){if(59===a&&o){let r=e.exit("characterReferenceValue");return i!==n2||rT(l.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&o++<r?(e.consume(a),u):n(a)}}},rI={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},rA={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){let r,i=this,l={partial:!0,tokenize:function(e,t,n){let l=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(t){return e.enter("codeFencedFence"),re(t)?ri(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(i){return i===r?(l++,e.consume(i),t):l>=a?(e.exit("codeFencedFenceSequence"),re(i)?ri(e,u,"whitespace")(i):u(i)):n(i)}(t)):n(t)}function u(r){return null===r||n8(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}},o=0,a=0;return function(t){var l;let u;return l=t,o=(u=i.events[i.events.length-1])&&"linePrefix"===u[1].type?u[2].sliceSerialize(u[1],!0).length:0,r=l,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(i){return i===r?(a++,e.consume(i),t):a<3?n(i):(e.exit("codeFencedFenceSequence"),re(i)?ri(e,s,"whitespace")(i):s(i))}(l)};function s(l){return null===l||n8(l)?(e.exit("codeFencedFence"),i.interrupt?t(l):e.check(rI,c,h)(l)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||n8(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(i)):re(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ri(e,u,"whitespace")(i)):96===i&&i===r?n(i):(e.consume(i),t)}(l))}function u(t){return null===t||n8(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||n8(i)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(i)):96===i&&i===r?n(i):(e.consume(i),t)}(t))}function c(t){return e.attempt(l,h,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f}function f(t){return o>0&&re(t)?ri(e,p,"linePrefix",o+1)(t):p(t)}function p(t){return null===t||n8(t)?e.check(rI,c,h)(t):(e.enter("codeFlowValue"),function t(n){return null===n||n8(n)?(e.exit("codeFlowValue"),p(n)):(e.consume(n),t)}(t))}function h(n){return e.exit("codeFenced"),t(n)}}},rP={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),ri(e,i,"linePrefix",5)(t)};function i(t){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?function t(n){return null===n?l(n):n8(n)?e.attempt(rM,t,l)(n):(e.enter("codeFlowValue"),function n(r){return null===r||n8(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function l(n){return e.exit("codeIndented"),t(n)}}},rM={partial:!0,tokenize:function(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):n8(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):ri(e,l,"linePrefix",5)(t)}function l(e){let l=r.events[r.events.length-1];return l&&"linePrefix"===l[1].type&&l[2].sliceSerialize(l[1],!0).length>=4?t(e):n8(e)?i(e):n(e)}}};function rL(e,t,n,r,i,l,o,a,s){let u=s||1/0,c=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(l),e.consume(t),e.exit(l),d):null===t||32===t||41===t||n5(t)?n(t):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),h(t))};function d(n){return 62===n?(e.enter(l),e.consume(n),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(a),d(t)):null===t||60===t||n8(t)?n(t):(e.consume(t),92===t?p:f)}function p(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function h(i){return!c&&(null===i||41===i||n7(i))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(i)):c<u&&40===i?(e.consume(i),c++,h):41===i?(e.consume(i),c--,h):null===i||32===i||40===i||n5(i)?n(i):(e.consume(i),92===i?m:h)}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function rO(e,t,n,r,i,l){let o,a=this,s=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(l),u};function u(d){return s>999||null===d||91===d||93===d&&!o||94===d&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(l),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):n8(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(t){return null===t||91===t||93===t||n8(t)||s++>999?(e.exit("chunkString"),u(t)):(e.consume(t),o||(o=!re(t)),92===t?d:c)}function d(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function rR(e,t,n,r,i,l){let o;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,a):n(t)};function a(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(l),s(n))}function s(t){return t===o?(e.exit(l),a(o)):null===t?n(t):n8(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ri(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===o||null===t||n8(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:u)}function c(t){return t===o||92===t?(e.consume(t),u):u(t)}}function rF(e,t){let n;return function r(i){return n8(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):re(i)?ri(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function rz(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let r_={partial:!0,tokenize:function(e,t,n){return function(t){return n7(t)?rF(e,r)(t):n(t)};function r(t){return rR(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return re(t)?ri(e,l,"whitespace")(t):l(t)}function l(e){return null===e||n8(e)?t(e):n(e)}}},rB=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],r$=["pre","script","style","textarea"],rU={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(rs,t,n)}}},rH={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return n8(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},rV={name:"labelEnd",resolveAll:function(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){let e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&nQ(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,l,o=e.length,a=0;for(;o--;)if(n=e[o][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[o][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[o][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=o,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(i=o);let s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},c={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[i-2][1].start}};return l=nG(l=[["enter",s,t],["enter",u,t]],e.slice(r+1,r+a+3)),l=nG(l,[["enter",c,t]]),l=nG(l,rw(t.parser.constructs.insideSpan.null,e.slice(r+a+4,i-3),t)),l=nG(l,[["exit",c,t],e[i-2],e[i-1],["exit",u,t]]),l=nG(l,e.slice(i+1)),l=nG(l,[["exit",s,t]]),nQ(e,r,e.length,l),e},tokenize:function(e,t,n){let r,i,l=this,o=l.events.length;for(;o--;)if(("labelImage"===l.events[o][1].type||"labelLink"===l.events[o][1].type)&&!l.events[o][1]._balanced){r=l.events[o][1];break}return function(t){return r?r._inactive?c(t):(i=l.parser.defined.includes(rz(l.sliceSerialize({start:r.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(rq,u,i?u:c)(t):91===t?e.attempt(rK,u,i?s:c)(t):i?u(t):c(t)}function s(t){return e.attempt(rJ,u,c)(t)}function u(e){return t(e)}function c(e){return r._balanced=!0,n(e)}}},rq={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return n7(t)?rF(e,i)(t):i(t)}function i(t){return 41===t?u(t):rL(e,l,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function l(t){return n7(t)?rF(e,a)(t):u(t)}function o(e){return n(e)}function a(t){return 34===t||39===t||40===t?rR(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function s(t){return n7(t)?rF(e,u)(t):u(t)}function u(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},rK={tokenize:function(e,t,n){let r=this;return function(t){return rO.call(r,e,i,l,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(rz(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function l(e){return n(e)}}},rJ={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},rW={name:"labelStartImage",resolveAll:rV.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),l):n(t)}function l(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},rX={name:"labelStartLink",resolveAll:rV.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},rY={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),ri(e,t,"linePrefix")}}},rQ={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(l){var o;return e.enter("thematicBreak"),r=o=l,function l(o){return o===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),i++,t):(e.exit("thematicBreakSequence"),re(n)?ri(e,l,"whitespace")(n):l(n))}(o)):i>=3&&(null===o||n8(o))?(e.exit("thematicBreak"),t(o)):n(o)}(o)}}},rG={continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(rs,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ri(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!re(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(r0,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,ri(e,e.attempt(rG,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){let r=this,i=r.events[r.events.length-1],l=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){let i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:n3(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(rQ,n,a)(t):a(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(i){return n3(i)&&++o<10?(e.consume(i),t):(!r.interrupt||o<2)&&(r.containerState.marker?i===r.containerState.marker:41===i||46===i)?(e.exit("listItemValue"),a(i)):n(i)}(t)}return n(t)};function a(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(rs,r.interrupt?n:s,e.attempt(rZ,c,u))}function s(e){return r.containerState.initialBlankLine=!0,l++,c(e)}function u(t){return re(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),c):n(t)}function c(n){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},rZ={partial:!0,tokenize:function(e,t,n){let r=this;return ri(e,function(e){let i=r.events[r.events.length-1];return!re(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},r0={partial:!0,tokenize:function(e,t,n){let r=this;return ri(e,function(e){let i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},r1={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,l=e.length;for(;l--;)if("enter"===e[l][0]){if("content"===e[l][1].type){n=l;break}"paragraph"===e[l][1].type&&(r=l)}else"content"===e[l][1].type&&e.splice(l,1),i||"definition"!==e[l][1].type||(i=l);let o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",o,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=o,e.push(["exit",o,t]),e},tokenize:function(e,t,n){let r,i=this;return function(t){var o;let a,s=i.events.length;for(;s--;)if("lineEnding"!==i.events[s][1].type&&"linePrefix"!==i.events[s][1].type&&"content"!==i.events[s][1].type){a="paragraph"===i.events[s][1].type;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||a)?(e.enter("setextHeadingLine"),r=t,o=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),re(n)?ri(e,l,"lineSuffix")(n):l(n))}(o)):n(t)};function l(r){return null===r||n8(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};e.s(["attentionMarkers",0,{null:[42,95]},"contentInitial",0,{91:{name:"definition",tokenize:function(e,t,n){let r,i=this;return function(t){var r;return e.enter("definition"),r=t,rO.call(i,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function l(t){return(r=rz(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):n(t)}function o(t){return n7(t)?rF(e,a)(t):a(t)}function a(t){return rL(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(r_,u,u)(t)}function u(t){return re(t)?ri(e,c,"whitespace")(t):c(t)}function c(l){return null===l||n8(l)?(e.exit("definition"),i.parser.defined.push(r),t(l)):n(l)}}}},"disable",0,{null:[]},"document",0,{42:rG,43:rG,45:rG,48:rG,49:rG,50:rG,51:rG,52:rG,53:rG,54:rG,55:rG,56:rG,57:rG,62:rS},"flow",0,{35:{name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,l=3;return"whitespace"===e[3][1].type&&(l+=2),i-2>l&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(l===i-1||i-4>l&&"whitespace"===e[i-2][1].type)&&(i-=l+1===i?2:4),i>l&&(n={type:"atxHeadingText",start:e[l][1].start,end:e[i][1].end},r={type:"chunkText",start:e[l][1].start,end:e[i][1].end,contentType:"text"},nQ(e,l,i-l+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(i){var l;return e.enter("atxHeading"),l=i,e.enter("atxHeadingSequence"),function i(l){return 35===l&&r++<6?(e.consume(l),i):null===l||n7(l)?(e.exit("atxHeadingSequence"),function n(r){return 35===r?(e.enter("atxHeadingSequence"),function t(r){return 35===r?(e.consume(r),t):(e.exit("atxHeadingSequence"),n(r))}(r)):null===r||n8(r)?(e.exit("atxHeading"),t(r)):re(r)?ri(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||n7(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(l)):n(l)}(l)}}},42:rQ,45:[r1,rQ],60:{concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){let r,i,l,o,a,s=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),u};function u(o){return 33===o?(e.consume(o),c):47===o?(e.consume(o),i=!0,p):63===o?(e.consume(o),r=3,s.interrupt?t:P):n1(o)?(e.consume(o),l=String.fromCharCode(o),h):n(o)}function c(i){return 45===i?(e.consume(i),r=2,d):91===i?(e.consume(i),r=5,o=0,f):n1(i)?(e.consume(i),r=4,s.interrupt?t:P):n(i)}function d(r){return 45===r?(e.consume(r),s.interrupt?t:P):n(r)}function f(r){let i="CDATA[";return r===i.charCodeAt(o++)?(e.consume(r),o===i.length)?s.interrupt?t:C:f:n(r)}function p(t){return n1(t)?(e.consume(t),l=String.fromCharCode(t),h):n(t)}function h(o){if(null===o||47===o||62===o||n7(o)){let a=47===o,u=l.toLowerCase();return!a&&!i&&r$.includes(u)?(r=1,s.interrupt?t(o):C(o)):rB.includes(l.toLowerCase())?(r=6,a)?(e.consume(o),m):s.interrupt?t(o):C(o):(r=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(o):i?function t(n){return re(n)?(e.consume(n),t):w(n)}(o):g(o))}return 45===o||n2(o)?(e.consume(o),l+=String.fromCharCode(o),h):n(o)}function m(r){return 62===r?(e.consume(r),s.interrupt?t:C):n(r)}function g(t){return 47===t?(e.consume(t),w):58===t||95===t||n1(t)?(e.consume(t),x):re(t)?(e.consume(t),g):w(t)}function x(t){return 45===t||46===t||58===t||95===t||n2(t)?(e.consume(t),x):b(t)}function b(t){return 61===t?(e.consume(t),y):re(t)?(e.consume(t),b):g(t)}function y(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,v):re(t)?(e.consume(t),y):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||n7(n)?b(n):(e.consume(n),t)}(t)}function v(t){return t===a?(e.consume(t),a=null,k):null===t||n8(t)?n(t):(e.consume(t),v)}function k(e){return 47===e||62===e||re(e)?g(e):n(e)}function w(t){return 62===t?(e.consume(t),j):n(t)}function j(t){return null===t||n8(t)?C(t):re(t)?(e.consume(t),j):n(t)}function C(t){return 45===t&&2===r?(e.consume(t),T):60===t&&1===r?(e.consume(t),D):62===t&&4===r?(e.consume(t),M):63===t&&3===r?(e.consume(t),P):93===t&&5===r?(e.consume(t),A):n8(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(rU,L,S)(t)):null===t||n8(t)?(e.exit("htmlFlowData"),S(t)):(e.consume(t),C)}function S(t){return e.check(rH,N,L)(t)}function N(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),E}function E(t){return null===t||n8(t)?S(t):(e.enter("htmlFlowData"),C(t))}function T(t){return 45===t?(e.consume(t),P):C(t)}function D(t){return 47===t?(e.consume(t),l="",I):C(t)}function I(t){if(62===t){let n=l.toLowerCase();return r$.includes(n)?(e.consume(t),M):C(t)}return n1(t)&&l.length<8?(e.consume(t),l+=String.fromCharCode(t),I):C(t)}function A(t){return 93===t?(e.consume(t),P):C(t)}function P(t){return 62===t?(e.consume(t),M):45===t&&2===r?(e.consume(t),P):C(t)}function M(t){return null===t||n8(t)?(e.exit("htmlFlowData"),L(t)):(e.consume(t),M)}function L(n){return e.exit("htmlFlow"),t(n)}}},61:r1,95:rQ,96:rA,126:rA},"flowInitial",0,{[-2]:rP,[-1]:rP,32:rP},"insideSpan",0,{null:[rj,rm]},"string",0,{38:rD,92:rN},"text",0,{[-5]:rY,[-4]:rY,[-3]:rY,33:rW,38:rD,42:rj,60:[{name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return n1(t)?(e.consume(t),l):64===t?n(t):a(t)}function l(t){return 43===t||45===t||46===t||n2(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,o):(43===n||45===n||46===n||n2(n))&&r++<32?(e.consume(n),t):(r=0,a(n))}(t)):a(t)}function o(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||n5(r)?n(r):(e.consume(r),o)}function a(t){return 64===t?(e.consume(t),s):n4(t)?(e.consume(t),a):n(t)}function s(i){return n2(i)?function i(l){return 46===l?(e.consume(l),r=0,s):62===l?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(l),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(l){if((45===l||n2(l))&&r++<63){let n=45===l?t:i;return e.consume(l),n}return n(l)}(l)}(i):n(i)}}},{name:"htmlText",tokenize:function(e,t,n){let r,i,l,o=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),v):63===t?(e.consume(t),b):n1(t)?(e.consume(t),w):n(t)}function s(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),i=0,p):n1(t)?(e.consume(t),x):n(t)}function u(t){return 45===t?(e.consume(t),f):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),d):n8(t)?(l=c,I(t)):(e.consume(t),c)}function d(t){return 45===t?(e.consume(t),f):c(t)}function f(e){return 62===e?D(e):45===e?d(e):c(e)}function p(t){let r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),i===r.length?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):n8(t)?(l=h,I(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?D(t):93===t?(e.consume(t),g):h(t)}function x(t){return null===t||62===t?D(t):n8(t)?(l=x,I(t)):(e.consume(t),x)}function b(t){return null===t?n(t):63===t?(e.consume(t),y):n8(t)?(l=b,I(t)):(e.consume(t),b)}function y(e){return 62===e?D(e):b(e)}function v(t){return n1(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||n2(t)?(e.consume(t),k):function t(n){return n8(n)?(l=t,I(n)):re(n)?(e.consume(n),t):D(n)}(t)}function w(t){return 45===t||n2(t)?(e.consume(t),w):47===t||62===t||n7(t)?j(t):n(t)}function j(t){return 47===t?(e.consume(t),D):58===t||95===t||n1(t)?(e.consume(t),C):n8(t)?(l=j,I(t)):re(t)?(e.consume(t),j):D(t)}function C(t){return 45===t||46===t||58===t||95===t||n2(t)?(e.consume(t),C):function t(n){return 61===n?(e.consume(n),S):n8(n)?(l=t,I(n)):re(n)?(e.consume(n),t):j(n)}(t)}function S(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,N):n8(t)?(l=S,I(t)):re(t)?(e.consume(t),S):(e.consume(t),E)}function N(t){return t===r?(e.consume(t),r=void 0,T):null===t?n(t):n8(t)?(l=N,I(t)):(e.consume(t),N)}function E(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||n7(t)?j(t):(e.consume(t),E)}function T(e){return 47===e||62===e||n7(e)?j(e):n(e)}function D(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function I(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return re(t)?ri(e,P,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):P(t)}function P(t){return e.enter("htmlTextData"),l(t)}}}],91:rX,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return n8(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},rN],93:rV,95:rj,96:{name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(("lineEnding"===e[3][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,l=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),l++,t):(e.exit("codeTextSequence"),o(n))}(t)};function o(s){return null===s?n(s):32===s?(e.enter("space"),e.consume(s),e.exit("space"),o):96===s?(i=e.enter("codeTextSequence"),r=0,function n(o){return 96===o?(e.consume(o),r++,n):r===l?(e.exit("codeTextSequence"),e.exit("codeText"),t(o)):(i.type="codeTextData",a(o))}(s)):n8(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):(e.enter("codeTextData"),a(s))}function a(t){return null===t||32===t||96===t||n8(t)?(e.exit("codeTextData"),o(t)):(e.consume(t),a)}}}}],4127);var r2=e.i(4127);let r4=/[\0\t\n\r]/g;function r5(e,t){let n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(65535&n)==65535||(65535&n)==65534||n>1114111?"�":String.fromCodePoint(n)}let r3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function r6(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return r5(n.slice(t?2:1),t?16:10)}return rT(n)||e}let r9={}.hasOwnProperty;function r8(e){return{line:e.line,column:e.column,offset:e.offset}}function r7(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+nT({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+nT({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+nT({start:t.start,end:t.end})+") is still open")}function ie(e){let t=this;t.parser=function(n){var r,i;let l,o,a,s;return"object"==typeof(r={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(i=r,r=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(x),autolinkProtocol:u,autolinkEmail:u,atxHeading:r(h),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:u,characterReference:u,codeFenced:r(p),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:r(p,i),codeText:r(function(){return{type:"inlineCode",value:""}},i),codeTextData:u,data:u,codeFlowValue:u,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(m),hardBreakTrailing:r(m),htmlFlow:r(g,i),htmlFlowData:u,htmlText:r(g,i),htmlTextData:u,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:i,link:r(x),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(b,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(b),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:r(h),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:o(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:o(),autolinkEmail:function(e){c.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){c.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:o(),characterEscapeValue:c,characterReferenceMarkerHexadecimal:f,characterReferenceMarkerNumeric:f,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=r5(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=rT(n);let i=this.stack[this.stack.length-1];i.value+=t},characterReference:function(e){this.stack.pop().position.end=r8(e.end)},codeFenced:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:c,codeIndented:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:c,data:c,definition:o(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=rz(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:o(),hardBreakEscape:o(d),hardBreakTrailing:o(d),htmlFlow:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:c,htmlText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:c,image:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=t.replace(r3,r6),n.identifier=rz(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=r8(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(u.call(this,e),c.call(this,e))},link:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=rz(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:o(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:o(),thematicBreak:o()}};!function e(t,n){let r=-1;for(;++r<n.length;){let i=n[r];Array.isArray(i)?e(t,i):function(e,t){let n;for(n in t)if(r9.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,i)}}(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},o={stack:[r],tokenStack:[],config:t,enter:l,exit:a,buffer:i,resume:s,data:n},u=[],c=-1;for(;++c<e.length;)("listOrdered"===e[c][1].type||"listUnordered"===e[c][1].type)&&("enter"===e[c][0]?u.push(c):c=function(e,t,n){let r,i,l,o,a=t-1,s=-1,u=!1;for(;++a<=n;){let t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||o||s||l||(l=a),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let o=a;for(i=void 0;o--;){let t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=o}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}l&&(!i||l<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){let i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(a,0,["enter",i,t[2]]),a++,n++,l=void 0,o=!0}}}return e[t][1]._spread=u,n}(e,u.pop(),c));for(c=-1;++c<e.length;){let n=t[e[c][0]];r9.call(n,e[c][1].type)&&n[e[c][1].type].call(Object.assign({sliceSerialize:e[c][2].sliceSerialize},o),e[c][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||r7).call(o,void 0,e[0])}for(r.position={start:r8(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:r8(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},c=-1;++c<t.transforms.length;)r=t.transforms[c](r)||r;return r};function r(e,t){return function(n){l.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function l(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:r8(t.start),end:void 0}}function o(e){return function(t){e&&e.call(this,t),a.call(this,t)}}function a(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||r7).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+nT({start:e.start,end:e.end})+"): it’s not open");n.position.end=r8(e.end)}function s(){return nW(this.stack.pop())}function u(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:r8(e.start),end:void 0},t.push(n)),this.stack.push(n)}function c(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=r8(e.end)}function d(){this.data.atHardBreak=!0}function f(e){this.data.characterReferenceType=e.type}function p(){return{type:"code",lang:null,meta:null,value:""}}function h(){return{type:"heading",depth:0,children:[]}}function m(){return{type:"break"}}function g(){return{type:"html",value:""}}function x(){return{type:"link",title:null,url:"",children:[]}}function b(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(i)(function(e){for(;!rd(e););return e}((function(e){let t={constructs:n0([r2,...(e||{}).extensions||[]]),content:n(rl),defined:[],document:n(ro),flow:n(rh),lazy:{},string:n(rg),text:n(rx)};return t;function n(e){return function(n){return function(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},l=[],o=[],a=[],s={attempt:h(function(e,t){m(e,t.from)}),check:h(p),consume:function(e){n8(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,g()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=f(),u.events.push(["enter",n,u]),a.push(n),n},exit:function(e){let t=a.pop();return t.end=f(),u.events.push(["exit",t,u]),t},interrupt:h(p,{interrupt:!0})},u={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,g()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,i=[];for(;++r<e.length;){let l,o=e[r];if("string"==typeof o)l=o;else switch(o){case -5:l="\r";break;case -4:l="\n";break;case -3:l="\r\n";break;case -2:l=t?" ":" ";break;case -1:if(!t&&n)continue;l=" ";break;default:l=String.fromCharCode(o)}n=-2===o,i.push(l)}return i.join("")}(d(e),t)},sliceStream:d,write:function(e){return(o=nG(o,e),function(){let e;for(;r._index<o.length;){let n=o[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),c=c(t)}else c=c(n)}}(),null!==o[o.length-1])?[]:(m(t,0),u.events=rw(l,u.events,u),u.events)}},c=t.tokenize.call(u,s);return t.resolveAll&&l.push(t),u;function d(e){return function(e,t){let n,r=t.start._index,i=t.start._bufferIndex,l=t.end._index,o=t.end._bufferIndex;if(r===l)n=[e[r].slice(i,o)];else{if(n=e.slice(r,l),i>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(i):n.shift()}o>0&&n.push(e[l].slice(0,o))}return n}(o,e)}function f(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:l}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:l}}function p(e,t){t.restore()}function h(e,t){return function(n,i,l){var o;let c,d,p,h;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):(o=n,function(e){let t=null!==e&&o[e],n=null!==e&&o.null;return m([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function m(e){return(c=e,d=0,0===e.length)?l:x(e[d])}function x(e){return function(n){let i,l,o,c,d;return(i=f(),l=u.previous,o=u.currentConstruct,c=u.events.length,d=Array.from(a),h={from:c,restore:function(){r=i,u.previous=l,u.currentConstruct=o,u.events.length=c,a=d,g()}},p=e,e.partial||(u.currentConstruct=e),e.name&&u.parser.constructs.disable.null.includes(e.name))?y(n):e.tokenize.call(t?Object.assign(Object.create(u),t):u,s,b,y)(n)}}function b(t){return e(p,h),i}function y(e){return(h.restore(),++d<c.length)?x(c[d]):l}}}function m(e,t){e.resolveAll&&!l.includes(e)&&l.push(e),e.resolve&&nQ(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function g(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}(t,e,n)}}})(i).document().write((o=1,a="",s=!0,function(e,t,n){let r,i,u,c,d,f=[];for(e=a+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),u=0,a="",s&&(65279===e.charCodeAt(0)&&u++,s=void 0);u<e.length;){if(r4.lastIndex=u,c=(r=r4.exec(e))&&void 0!==r.index?r.index:e.length,d=e.charCodeAt(c),!r){a=e.slice(u);break}if(10===d&&u===c&&l)f.push(-3),l=void 0;else switch(l&&(f.push(-5),l=void 0),u<c&&(f.push(e.slice(u,c)),o+=c-u),d){case 0:f.push(65533),o++;break;case 9:for(i=4*Math.ceil(o/4),f.push(-2);o++<i;)f.push(-1);break;case 10:f.push(-4),o=1;break;default:l=!0,o=1}u=c+1}return n&&(l&&f.push(-5),a&&f.push(a),f.push(null)),f})(n,r,!0))))}}let it="object"==typeof self?self:globalThis,ir=e=>{var t;let n,r;return(t=new Map,n=(e,n)=>(t.set(n,e),e),r=i=>{if(t.has(i))return t.get(i);let[l,o]=e[i];switch(l){case 0:case -1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new it[e](t),i)}case 8:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new it[l](o),i)})(0)},{toString:ii}={},{keys:il}=Object,io=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=ii.call(e).slice(8,-1);switch(n){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},ia=([e,t])=>0===e&&("function"===t||"symbol"===t),is=(e,{json:t,lossy:n}={})=>{var r,i,l;let o,a,s=[];return(r=!(t||n),i=!!t,l=new Map,o=(e,t)=>{let n=s.push(e)-1;return l.set(t,n),n},a=e=>{if(l.has(e))return l.get(e);let[t,n]=io(e);switch(t){case 0:{let i=e;switch(n){case"bigint":t=8,i=e.toString();break;case"function":case"symbol":if(r)throw TypeError("unable to serialize "+n);i=null;break;case"undefined":return o([-1],e)}return o([t,i],e)}case 1:{if(n){let t=e;return"DataView"===n?t=new Uint8Array(e.buffer):"ArrayBuffer"===n&&(t=new Uint8Array(e)),o([n,[...t]],e)}let r=[],i=o([t,r],e);for(let t of e)r.push(a(t));return i}case 2:{if(n)switch(n){case"BigInt":return o([n,e.toString()],e);case"Boolean":case"Number":case"String":return o([n,e.valueOf()],e)}if(i&&"toJSON"in e)return a(e.toJSON());let l=[],s=o([t,l],e);for(let t of il(e))(r||!ia(io(e[t])))&&l.push([a(t),a(e[t])]);return s}case 3:return o([t,e.toISOString()],e);case 4:{let{source:n,flags:r}=e;return o([t,{source:n,flags:r}],e)}case 5:{let n=[],i=o([t,n],e);for(let[t,i]of e)(r||!(ia(io(t))||ia(io(i))))&&n.push([a(t),a(i)]);return i}case 6:{let n=[],i=o([t,n],e);for(let t of e)(r||!ia(io(t)))&&n.push(a(t));return i}}let{message:s}=e;return o([t,{name:n,message:s}],e)})(e),s},iu="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?ir(is(e,t)):structuredClone(e):(e,t)=>ir(is(e,t));function ic(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let l=e.charCodeAt(n),o="";if(37===l&&n2(e.charCodeAt(n+1))&&n2(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){let t=e.charCodeAt(n+1);l<56320&&t>56319&&t<57344?(o=String.fromCharCode(l,t),i=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function id(e,t){let n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function ip(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}let ih=function(e){var t,n;if(null==e)return ig;if("function"==typeof e)return im(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=ih(e[n]);return im(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):(t=e,im(function(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}))}if("string"==typeof e){return n=e,im(function(e){return e&&e.type===n})}throw Error("Expected function, string, or object as test")};function im(e){return function(t,n,r){return!!(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function ig(){return!0}let ix=[];function ib(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;let l=ih(i),o=r?-1:1;(function e(i,a,s){let u=i&&"object"==typeof i?i:{};if("string"==typeof u.type){let e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(c,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return c;function c(){var u;let c,d,f,p=ix;if((!t||l(i,a,s[s.length-1]||void 0))&&!1===(p=Array.isArray(u=n(i,s))?u:"number"==typeof u?[!0,u]:null==u?ix:[u])[0])return p;if("children"in i&&i.children&&i.children&&"skip"!==p[0])for(d=(r?i.children.length:-1)+o,f=s.concat(i);d>-1&&d<i.children.length;){if(!1===(c=e(i.children[d],d,f)())[0])return c;d="number"==typeof c[1]?c[1]:d+o}return p}})(e,void 0,[])()}function iy(e,t,n,r){let i,l,o;"function"==typeof t&&"function"!=typeof n?(l=void 0,o=t,i=n):(l=t,o=n,i=r),ib(e,l,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)},i)}function iv(e,t){let n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];let i=e.all(t),l=i[0];l&&"text"===l.type?l.value="["+l.value:i.unshift({type:"text",value:"["});let o=i[i.length-1];return o&&"text"===o.type?o.value+=r:i.push({type:"text",value:r}),i}function ik(e){let t=e.spread;return null==t?e.children.length>1:t}function iw(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}let ij={blockquote:function(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l={type:"element",tagName:"pre",properties:{},children:[l=e.applyData(t,l)]},e.patch(t,l),l},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){let n,r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),l=ic(i.toLowerCase()),o=e.footnoteOrder.indexOf(i),a=e.footnoteCounts.get(i);void 0===a?(a=0,e.footnoteOrder.push(i),n=e.footnoteOrder.length):n=o+1,a+=1,e.footnoteCounts.set(i,a);let s={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,s);let u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)},heading:function(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return iv(e,t);let i={src:ic(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);let l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)},image:function(e,t){let n={src:ic(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return iv(e,t);let i={href:ic(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);let l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)},link:function(e,t){let n={href:ic(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){let r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=ik(n[r])}return t}(n):ik(t),l={},o=[];if("boolean"==typeof t.checked){let e,n=r[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},r.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a<r.length;){let e=r[a];(i||0!==a||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?o.push(e):o.push(...e.children)}let s=r[r.length-1];s&&(i||"element"!==s.type||"p"!==s.tagName)&&o.push({type:"text",value:"\n"});let u={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,u),e.applyData(t,u)},list:function(e,t){let n={},r=e.all(t),i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){let e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)},paragraph:function(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=nN(t.children[1]),o=nS(t.children[t.children.length-1]);l&&o&&(r.position={start:l,end:o}),i.push(r)}let l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",l=n&&"table"===n.type?n.align:void 0,o=l?l.length:t.children.length,a=-1,s=[];for(;++a<o;){let n=t.children[a],r={},o=l?l[a]:void 0;o&&(r.align=o);let u={type:"element",tagName:i,properties:r,children:[]};n&&(u.children=e.all(n),e.patch(n,u),u=e.applyData(n,u)),s.push(u)}let u={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,u),e.applyData(t,u)},text:function(e,t){let n={type:"text",value:function(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,l=[];for(;r;)l.push(iw(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(iw(t.slice(i),i>0,!1)),l.join("")}(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:iC,yaml:iC,definition:iC,footnoteDefinition:iC};function iC(){}let iS={}.hasOwnProperty,iN={};function iE(e,t){e.position&&(t.position=function(e){let t=nN(e),n=nS(e);if(t&&n)return{start:t,end:n}}(e))}function iT(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&i&&Object.assign(n.properties,iu(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function iD(e,t){let n=[],r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function iI(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function iA(e,t){let n,r,i,l,o=(n=t||iN,r=new Map,i=new Map,l={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let i=l.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=iI(i.value)),!Array.isArray(i)&&"element"===i.type)){let e=i.children[0];e&&"text"===e.type&&(e.value=iI(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:iT,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...ij,...n.handlers},one:function(e,t){let n=e.type,r=l.handlers[n];if(iS.call(l.handlers,n)&&r)return r(l,e,t);if(l.options.passThrough&&l.options.passThrough.includes(n)){if("children"in e){let{children:t,...n}=e,r=iu(n);return r.children=l.all(e),r}return iu(e)}return(l.options.unknownHandler||function(e,t){let n=t.data||{},r="value"in t&&!(iS.call(n,"hProperties")||iS.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)})(l,e,t)},options:n,patch:iE,wrap:iD},iy(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),l),a=o.one(e,void 0),s=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||id,r=e.options.footnoteBackLabel||ip,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[],s=-1;for(;++s<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[s]);if(!i)continue;let l=e.all(i),o=String(i.identifier).toUpperCase(),u=ic(o.toLowerCase()),c=0,d=[],f=e.footnoteCounts.get(o);for(;void 0!==f&&++c<=f;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,c);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+u+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let p=l[l.length-1];if(p&&"element"===p.type&&"p"===p.tagName){let e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else l.push(...d);let h={type:"element",tagName:"li",properties:{id:t+"fn-"+u},children:e.wrap(l,!0)};e.patch(i,h),a.push(h)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...iu(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(o),u=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&(tJ("children"in u),u.children.push({type:"text",value:"\n"},s)),u}function iP(e,t){return e&&"run"in e?async function(n,r){let i=iA(n,{file:r,...t});await e.run(i,r)}:function(n,r){return iA(n,{file:r,...e||t})}}function iM(e){if(e)throw e}var iL=e.i(4100);function iO(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}let iR=function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');iB(e);let r=0,i=-1,l=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;l--;)if(47===e.codePointAt(l)){if(n){r=l+1;break}}else i<0&&(n=!0,i=l+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let o=-1,a=t.length-1;for(;l--;)if(47===e.codePointAt(l)){if(n){r=l+1;break}}else o<0&&(n=!0,o=l+1),a>-1&&(e.codePointAt(l)===t.codePointAt(a--)?a<0&&(i=l):(a=-1,i=o));return r===i?i=o:i<0&&(i=e.length),e.slice(r,i)},iF=function(e){let t;if(iB(e),0===e.length)return".";let n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},iz=function(e){let t;iB(e);let n=e.length,r=-1,i=0,l=-1,o=0;for(;n--;){let a=e.codePointAt(n);if(47===a){if(t){i=n+1;break}continue}r<0&&(t=!0,r=n+1),46===a?l<0?l=n:1!==o&&(o=1):l>-1&&(o=-1)}return l<0||r<0||0===o||1===o&&l===r-1&&l===i+1?"":e.slice(l,r)},i_=function(...e){var t;let n,r,i,l=-1;for(;++l<e.length;)iB(e[l]),e[l]&&(i=void 0===i?e[l]:i+"/"+e[l]);return void 0===i?".":(iB(t=i),n=47===t.codePointAt(0),0!==(r=function(e,t){let n,r,i="",l=0,o=-1,a=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else if(47===n)break;else n=47;if(47===n){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(i.length<2||2!==l||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2)){if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",l=0):l=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),o=s,a=0;continue}}else if(i.length>0){i="",l=0,o=s,a=0;continue}}t&&(i=i.length>0?i+"/..":"..",l=2)}else i.length>0?i+="/"+e.slice(o+1,s):i=e.slice(o+1,s),l=s-o-1;o=s,a=0}else 46===n&&a>-1?a++:a=-1}return i}(t,!n)).length||n||(r="."),r.length>0&&47===t.codePointAt(t.length-1)&&(r+="/"),n?"/"+r:r)};function iB(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function i$(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let iU=["history","path","basename","stem","extname","dirname"];class iH{constructor(e){let t,n;t=e?i$(e)?{path:e}:"string"==typeof e||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":"/",this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<iU.length;){const e=iU[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)iU.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?iR(this.path):void 0}set basename(e){iq(e,"basename"),iV(e,"basename"),this.path=i_(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?iF(this.path):void 0}set dirname(e){iK(this.basename,"dirname"),this.path=i_(e||"",this.basename)}get extname(){return"string"==typeof this.path?iz(this.path):void 0}set extname(e){if(iV(e,"extname"),iK(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=i_(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){i$(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!i$(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){let e=t.codePointAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),iq(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?iR(this.path,this.extname):void 0}set stem(e){iq(e,"stem"),iV(e,"stem"),this.path=i_(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new nP(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function iV(e,t){if(e&&e.includes("/"))throw Error("`"+t+"` cannot be a path: did not expect `/`")}function iq(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function iK(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let iJ=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},iW={}.hasOwnProperty;class iX extends iJ{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){let e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw TypeError("Expected function as last argument, not "+r);!function i(l,...o){let a=e[++n],s=-1;if(l)return void r(l);for(;++s<t.length;)(null===o[s]||void 0===o[s])&&(o[s]=t[s]);t=o,a?(function(e,t){let n;return function(...t){let l,o=e.length>t.length;o&&t.push(r);try{l=e.apply(this,t)}catch(e){if(o&&n)throw e;return r(e)}o||(l&&l.then&&"function"==typeof l.then?l.then(i,r):l instanceof Error?r(l):i(l))};function r(e,...i){n||(n=!0,t(e,...i))}function i(e){r(null,e)}})(a,i)(...o):r(null,...o)}(null,...t)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){let e=new iX,t=-1;for(;++t<this.attachers.length;){let n=this.attachers[t];e.use(...n)}return e.data((0,iL.default)(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2==arguments.length?(iZ("data",this.frozen),this.namespace[e]=t,this):iW.call(this.namespace,e)&&this.namespace[e]||void 0:e?(iZ("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let n=e.call(this,...t);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=i2(e),n=this.parser||this.Parser;return iQ("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),iQ("process",this.parser||this.Parser),iG("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let l=i2(e),o=n.parse(l);function a(e,n){e||!n?i(e):r?r(n):(tJ(t,"`done` is defined if `resolve` is not"),t(void 0,n))}n.run(o,l,function(e,t,r){var i,l;if(e||!t||!r)return a(e);let o=n.stringify(t,r);"string"==typeof(i=o)||(l=i)&&"object"==typeof l&&"byteLength"in l&&"byteOffset"in l?r.value=o:r.result=o,a(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),iQ("processSync",this.parser||this.Parser),iG("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,iM(e),t=r}),i1("processSync","process",n),tJ(t,"we either bailed on an error or have a tree"),t}run(e,t,n){i0(e),this.freeze();let r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,l){tJ("function"!=typeof t,"`file` can’t be a `done` anymore, we checked");let o=i2(t);r.run(e,o,function(t,r,o){let a=r||e;t?l(t):i?i(a):(tJ(n,"`done` is defined if `resolve` is not"),n(void 0,a,o))})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){iM(e),n=t,r=!0}),i1("runSync","run",r),tJ(n,"we either bailed on an error or have a tree"),n}stringify(e,t){this.freeze();let n=i2(t),r=this.compiler||this.Compiler;return iG("stringify",r),i0(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(iZ("use",this.frozen),null==e);else if("function"==typeof e)o(e,t);else if("object"==typeof e)Array.isArray(e)?l(e):i(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(!("plugins"in e)&&!("settings"in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(e.plugins),e.settings&&(r.settings=(0,iL.default)(!0,r.settings,e.settings))}function l(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;)!function(e){if("function"==typeof e)o(e,[]);else if("object"==typeof e)if(Array.isArray(e)){let[t,...n]=e;o(t,n)}else i(e);else throw TypeError("Expected usable value, not `"+e+"`")}(e[t]);else throw TypeError("Expected a list of plugins, not `"+e+"`")}function o(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(-1===i)n.push([e,...t]);else if(t.length>0){let[r,...l]=t,o=n[i][1];iO(o)&&iO(r)&&(r=(0,iL.default)(!0,o,r)),n[i]=[e,r,...l]}}}}let iY=new iX().freeze();function iQ(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function iG(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function iZ(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function i0(e){if(!iO(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function i1(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function i2(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new iH(e)}let i4=[],i5={allowDangerousHtml:!0},i3=/^(https?|ircs?|mailto|xmpp)$/i,i6=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function i9(e){var t;let n,r,i,l,o,a=(n=(t=e).rehypePlugins||i4,r=t.remarkPlugins||i4,i=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...i5}:i5,iY().use(ie).use(r).use(iP,i).use(n)),s=(l=e.children||"",o=new iH,"string"==typeof l?o.value=l:tW("Unexpected value `"+l+"` for `children` prop, expected `string`"),o);return function(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,s=t.urlTransform||i8;for(let e of i6)Object.hasOwn(t,e.from)&&tW("Unexpected `"+e.from+"` prop, "+(e.to?"use `"+e.to+"` instead":"remove it")+" (see <https://github.com/remarkjs/react-markdown/blob/main/changelog.md#"+e.id+"> for more info)");return n&&l&&tW("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other"),iy(e,function(e,t,i){if("raw"===e.type&&i&&"number"==typeof t)return o?i.children.splice(t,1):i.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in nK)if(Object.hasOwn(nK,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=nK[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=s(String(n||""),t,e))}}if("element"===e.type){let o=n?!n.includes(e.tagName):!!l&&l.includes(e.tagName);if(!o&&r&&"number"==typeof t&&(o=!r(e,t,i)),o&&i&&"number"==typeof t)return a&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}),function(e,t){var n,r,i,l;let o;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let a=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");n=a,r=t.jsxDEV,o=function(e,t,i,l){let o=Array.isArray(i.children),a=nN(e);return r(t,i,l,o,{columnNumber:a?a.column-1:void 0,fileName:n,lineNumber:a?a.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");i=t.jsx,l=t.jsxs,o=function(e,t,n,r){let o=Array.isArray(n.children)?l:i;return r?o(t,n,r):o(t,n)}}let s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?nj:nw,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},u=n_(s,e,void 0);return u&&"string"!=typeof u?u:s.create(e,s.Fragment,{children:u||void 0},void 0)}(e,{Fragment:k.Fragment,components:i,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0})}(a.runSync(a.parse(s),s),e)}function i8(e){let t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return -1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||i3.test(e.slice(0,t))?e:""}function i7(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}let le="phrasing",lt=["autolink","link","image","label"];function ln(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function lr(e){this.config.enter.autolinkProtocol.call(this,e)}function li(e){this.config.exit.autolinkProtocol.call(this,e)}function ll(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];tJ("link"===t.type),t.url="http://"+this.sliceSerialize(e)}function lo(e){this.config.exit.autolinkEmail.call(this,e)}function la(e){this.exit(e)}function ls(e){!function(e,t,n){let r=ih((n||{}).ignore||[]),i=function(e){let t=[];if(!Array.isArray(e))throw TypeError("Expected find and replace tuple or list of tuples");let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){var i;let e=n[r];t.push(["string"==typeof(i=e[0])?RegExp(function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(i),"g"):i,function(e){return"function"==typeof e?e:function(){return e}}(e[1])])}return t}(t),l=-1;for(;++l<i.length;)ib(e,"text",o);function o(e,t){let n,o=-1;for(;++o<t.length;){let e=t[o],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){let n=t[t.length-1],r=i[l][0],o=i[l][1],a=0,s=n.children.indexOf(e),u=!1,c=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},l=o(...d,i);if("string"==typeof l&&(l=l.length>0?{type:"text",value:l}:void 0),!1===l?r.lastIndex=n+1:(a!==n&&c.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(l)?c.push(...l):l&&c.push(l),a=n+d[0].length,u=!0),!r.global)break;d=r.exec(e.value)}return u?(a<e.value.length&&c.push({type:"text",value:e.value.slice(a)}),n.children.splice(s,1,...c)):c=[e],s+c.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,lu],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,lc]],{ignore:["link","linkReference"]})}function lu(e,t,n,r,i){let l,o="";if(!ld(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),(l=n.split(".")).length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[a-zA-Z\d]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[a-zA-Z\d]/.test(l[l.length-2])))return!1;let a=function(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")"),i=i7(e,"("),l=i7(e,")");for(;-1!==r&&i>l;)e+=n.slice(0,r+1),r=(n=n.slice(r+1)).indexOf(")"),l++;return[e,n]}(n+r);if(!a[0])return!1;let s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function lc(e,t,n,r){return!(!ld(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ld(e,t){let n=e.input.charCodeAt(e.index-1);return(0===e.index||rn(n)||rt(n))&&(!t||47!==n)}function lf(){this.buffer()}function lp(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function lh(){this.buffer()}function lm(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function lg(e){let t=this.resume(),n=this.stack[this.stack.length-1];tJ("footnoteReference"===n.type),n.identifier=rz(this.sliceSerialize(e)).toLowerCase(),n.label=t}function lx(e){this.exit(e)}function lb(e){let t=this.resume(),n=this.stack[this.stack.length-1];tJ("footnoteDefinition"===n.type),n.identifier=rz(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ly(e){this.exit(e)}function lv(e,t,n,r){let i=n.createTracker(r),l=i.move("[^"),o=n.enter("footnoteReference"),a=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),a(),o(),l+=i.move("]")}function lk(e,t,n){return 0===t?e:lw(e,t,n)}function lw(e,t,n){return(n?"":" ")+e}lv.peek=function(){return"["};let lj=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function lC(e){this.enter({type:"delete",children:[]},e)}function lS(e){this.exit(e)}function lN(e,t,n,r){let i=n.createTracker(r),l=n.enter("strikethrough"),o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),l(),o}function lE(e){return e.length}function lT(e){let t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:114*(82===t||114===t)}lN.peek=function(){return"~"};function lD(e,t,n){let r=e.value||"",i="`",l=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){let e,t=n.unsafe[l],i=n.compilePattern(t);if(t.atBreak)for(;e=i.exec(r);){let t=e.index;10===r.charCodeAt(t)&&13===r.charCodeAt(t-1)&&t--,r=r.slice(0,t)+" "+r.slice(e.index+1)}}return i+r+i}lD.peek=function(){return"`"};ih(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);let lI=function(e,t,n,r){let i=function(e){let t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n),l=n.bulletCurrent||function(e){let t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(n);t&&"list"===t.type&&t.ordered&&(l=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+l);let o=l.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(o=4*Math.ceil(o/4));let a=n.createTracker(r);a.move(l+" ".repeat(o-l.length)),a.shift(o);let s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),function(e,t,n){return t?(n?"":" ".repeat(o))+e:(n?l:l+" ".repeat(o-l.length))+e});return s(),u};function lA(e){let t=e._align;tJ(t,"expected `_align` on table"),this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function lP(e){this.exit(e),this.data.inTable=void 0}function lM(e){this.enter({type:"tableRow",children:[]},e)}function lL(e){this.exit(e)}function lO(e){this.enter({type:"tableCell",children:[]},e)}function lR(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,lF));let n=this.stack[this.stack.length-1];tJ("inlineCode"===n.type),n.value=t,this.exit(e)}function lF(e,t){return"|"===t?t:e}function lz(e){let t=this.stack[this.stack.length-2];tJ("listItem"===t.type),t.checked="taskListCheckValueChecked"===e.type}function l_(e){let t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){let e=this.stack[this.stack.length-1];tJ("paragraph"===e.type);let n=e.children[0];if(n&&"text"===n.type){let r,i=t.children,l=-1;for(;++l<i.length;){let e=i[l];if("paragraph"===e.type){r=e;break}}r===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function lB(e,t,n,r){let i=e.children[0],l="boolean"==typeof e.checked&&i&&"paragraph"===i.type,o="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);l&&a.move(o);let s=lI(e,t,n,{...r,...a.current()});return l&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+o})),s}let l$={tokenize:function(e,t,n){let r=0;return function t(l){return(87===l||119===l)&&r<3?(r++,e.consume(l),t):46===l&&3===r?(e.consume(l),i):n(l)};function i(e){return null===e?n(e):t(e)}},partial:!0},lU={tokenize:function(e,t,n){let r,i,l;return o;function o(t){return 46===t||95===t?e.check(lV,s,a)(t):null===t||n7(t)||rn(t)||45!==t&&rt(t)?s(t):(l=!0,e.consume(t),o)}function a(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),o}function s(e){return i||r||!l?n(e):t(e)}},partial:!0},lH={tokenize:function(e,t){let n=0,r=0;return i;function i(o){return 40===o?(n++,e.consume(o),i):41===o&&r<n?l(o):33===o||34===o||38===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||60===o||63===o||93===o||95===o||126===o?e.check(lV,t,l)(o):null===o||n7(o)||rn(o)?t(o):(e.consume(o),i)}function l(t){return 41===t&&r++,e.consume(t),i}},partial:!0},lV={tokenize:function(e,t,n){return r;function r(o){return 33===o||34===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||63===o||95===o||126===o?(e.consume(o),r):38===o?(e.consume(o),l):93===o?(e.consume(o),i):60===o||null===o||n7(o)||rn(o)?t(o):n(o)}function i(e){return null===e||40===e||91===e||n7(e)||rn(e)?t(e):r(e)}function l(t){return n1(t)?function t(i){return 59===i?(e.consume(i),r):n1(i)?(e.consume(i),t):n(i)}(t):n(t)}},partial:!0},lq={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return n2(e)?n(e):t(e)}},partial:!0},lK={name:"wwwAutolink",tokenize:function(e,t,n){let r=this;return function(t){return 87!==t&&119!==t||!lQ.call(r,r.previous)||l1(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(l$,e.attempt(lU,e.attempt(lH,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:lQ},lJ={name:"protocolAutolink",tokenize:function(e,t,n){let r=this,i="",l=!1;return function(t){return(72===t||104===t)&&lG.call(r,r.previous)&&!l1(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),o):n(t)};function o(t){if(n1(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),o;if(58===t){let n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),a}return n(t)}function a(t){return 47===t?(e.consume(t),l)?s:(l=!0,a):n(t)}function s(t){return null===t||n5(t)||n7(t)||rn(t)||rt(t)?n(t):e.attempt(lU,e.attempt(lH,u),n)(t)}function u(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:lG},lW={name:"emailAutolink",tokenize:function(e,t,n){let r,i,l=this;return function(t){return!l0(t)||!lZ.call(l,l.previous)||l1(l.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),function t(r){return l0(r)?(e.consume(r),t):64===r?(e.consume(r),o):n(r)}(t))};function o(t){return 46===t?e.check(lq,s,a)(t):45===t||95===t||n2(t)?(i=!0,e.consume(t),o):s(t)}function a(t){return e.consume(t),r=!0,o}function s(o){return i&&r&&n1(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(o)):n(o)}},previous:lZ},lX={},lY=48;for(;lY<123;)lX[lY]=lW,58==++lY?lY=65:91===lY&&(lY=97);function lQ(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||n7(e)}function lG(e){return!n1(e)}function lZ(e){return!(47===e||l0(e))}function l0(e){return 43===e||45===e||46===e||95===e||n2(e)}function l1(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}lX[43]=lW,lX[45]=lW,lX[46]=lW,lX[95]=lW,lX[72]=[lW,lJ],lX[104]=[lW,lJ],lX[87]=[lW,lK],lX[119]=[lW,lK];let l2={tokenize:function(e,t,n){let r=this;return ri(e,function(e){let i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function l4(e,t,n){let r,i=this,l=i.events.length,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);for(;l--;){let e=i.events[l][1];if("labelImage"===e.type){r=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(l){if(!r||!r._balanced)return n(l);let a=rz(i.sliceSerialize({start:r.end,end:i.now()}));return 94===a.codePointAt(0)&&o.includes(a.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l)):n(l)}}function l5(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function l3(e,t,n){let r,i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),o=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),a};function a(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(a){if(o>999||93===a&&!r||null===a||91===a||n7(a))return n(a);if(93===a){e.exit("chunkString");let r=e.exit("gfmFootnoteCallString");return l.includes(rz(i.sliceSerialize(r)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(a)}return n7(a)||(r=!0),o++,e.consume(a),92===a?u:s}function u(t){return 91===t||92===t||93===t?(e.consume(t),o++,s):s(t)}}function l6(e,t,n){let r,i,l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]),a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),s};function s(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(t)}function u(t){if(a>999||93===t&&!i||null===t||91===t||n7(t))return n(t);if(93===t){e.exit("chunkString");let n=e.exit("gfmFootnoteDefinitionLabelString");return r=rz(l.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return n7(t)||(i=!0),a++,e.consume(t),92===t?c:u}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,u):u(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(r)||o.push(r),ri(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function l9(e,t,n){return e.check(rs,t,e.attempt(l2,t,n))}function l8(e){e.exit("gfmFootnoteDefinition")}class l7{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let i=0;if(0!==n||0!==r.length){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length,n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}}function oe(e,t,n){let r,i=this,l=0,o=0;return function(e){let t=i.events.length-1;for(;t>-1;){let e=i.events[t][1].type;if("lineEnding"===e||"linePrefix"===e)t--;else break}let r=t>-1?i.events[t][1].type:null,l="tableHead"===r||"tableRow"===r?b:a;return l===b&&i.parser.lazy[i.now().line]?n(e):l(e)};function a(t){var n;return e.enter("tableHead"),e.enter("tableRow"),124===(n=t)||(r=!0,o+=1),s(n)}function s(t){return null===t?n(t):n8(t)?o>1?(o=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):re(t)?ri(e,s,"whitespace")(t):(o+=1,r&&(r=!1,l+=1),124===t)?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,s):(e.enter("data"),u(t))}function u(t){return null===t||124===t||n7(t)?(e.exit("data"),s(t)):(e.consume(t),92===t?c:u)}function c(t){return 92===t||124===t?(e.consume(t),u):u(t)}function d(t){return(i.interrupt=!1,i.parser.lazy[i.now().line])?n(t):(e.enter("tableDelimiterRow"),r=!1,re(t))?ri(e,f,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t)}function f(t){return 45===t||58===t?h(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):n(t)}function p(t){return re(t)?ri(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(o+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(o+=1,m(t)):null===t||n8(t)?x(t):n(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),function t(n){return 45===n?(e.consume(n),t):58===n?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(n),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(n))}(t)):n(t)}function g(t){return re(t)?ri(e,x,"whitespace")(t):x(t)}function x(i){if(124===i)return f(i);if(null===i||n8(i))return r&&l===o?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(i)):n(i);return n(i)}function b(t){return e.enter("tableRow"),y(t)}function y(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),y):null===n||n8(n)?(e.exit("tableRow"),t(n)):re(n)?ri(e,y,"whitespace")(n):(e.enter("data"),v(n))}function v(t){return null===t||124===t||n7(t)?(e.exit("data"),y(t)):(e.consume(t),92===t?k:v)}function k(t){return 92===t||124===t?(e.consume(t),v):v(t)}}function ot(e,t){let n,r,i,l=-1,o=!0,a=0,s=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f=new l7;for(;++l<e.length;){let p=e[l],h=p[1];"enter"===p[0]?"tableHead"===h.type?(c=!1,0!==d&&(or(f,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(l,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(o=!0,i=void 0,s=[0,0,0,0],u=[0,l+1,0,0],c&&(c=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(l,0,[["enter",r,t]])),a="tableDelimiterRow"===h.type?2:r?3:1):a&&("data"===h.type||"tableDelimiterMarker"===h.type||"tableDelimiterFiller"===h.type)?(o=!1,0===u[2]&&(0!==s[1]&&(u[0]=u[1],i=on(f,t,s,a,void 0,i),s=[0,0,0,0]),u[2]=l)):"tableCellDivider"===h.type&&(o?o=!1:(0!==s[1]&&(u[0]=u[1],i=on(f,t,s,a,void 0,i)),u=[(s=u)[1],l,0,0])):"tableHead"===h.type?(c=!0,d=l):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=l,0!==s[1]?(u[0]=u[1],i=on(f,t,s,a,l,i)):0!==u[1]&&(i=on(f,t,u,a,l,i)),a=0):a&&("data"===h.type||"tableDelimiterMarker"===h.type||"tableDelimiterFiller"===h.type)&&(u[3]=l)}for(0!==d&&or(f,t,d,n,r),f.consume(t.events),l=-1;++l<t.events.length;){let e=t.events[l];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=function(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){let e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}(t.events,l))}return e}function on(e,t,n,r,i,l){0!==n[0]&&(l.end=Object.assign({},oi(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));let o=oi(t.events,n[1]);if(l={type:1===r?"tableHeader":2===r?"tableDelimiter":"tableData",start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",l,t]]),0!==n[2]){let i=oi(t.events,n[2]),l=oi(t.events,n[3]),o={type:"tableContent",start:Object.assign({},i),end:Object.assign({},l)};if(e.add(n[2],0,[["enter",o,t]]),2!==r){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",o,t]])}return void 0!==i&&(l.end=Object.assign({},oi(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function or(e,t,n,r,i){let l=[],o=oi(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function oi(e,t){let n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}let ol={name:"tasklistCheck",tokenize:function(e,t,n){let r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return n7(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),l):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),l):n(t)}function l(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(t)}function o(r){return n8(r)?t(r):re(r)?e.check({tokenize:oo},t,n)(r):n(r)}}};function oo(e,t,n){return ri(e,function(e){return null===e?n(e):t(e)},"whitespace")}let oa={};function os(e){let t,n,r,i=e||oa,l=this.data(),o=l.micromarkExtensions||(l.micromarkExtensions=[]),a=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),s=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);o.push(n0([{text:lX},{document:{91:{name:"gfmFootnoteDefinition",tokenize:l6,continuation:{tokenize:l9},exit:l8}},text:{91:{name:"gfmFootnoteCall",tokenize:l3},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:l4,resolveTo:l5}}},(t=(i||{}).singleTilde,n={name:"strikethrough",tokenize:function(e,n,r){let i=this.previous,l=this.events,o=0;return function(a){return 126===i&&"characterEscape"!==l[l.length-1][1].type?r(a):(e.enter("strikethroughSequenceTemporary"),function l(a){let s=rk(i);if(126===a)return o>1?r(a):(e.consume(a),o++,l);if(o<2&&!t)return r(a);let u=e.exit("strikethroughSequenceTemporary"),c=rk(a);return u._open=!c||2===c&&!!s,u._close=!s||2===s&&!!c,n(a)}(a))}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";let i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},l={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",l,t]],a=t.parser.constructs.insideSpan.null;a&&nQ(o,o.length,0,rw(a,e.slice(r+1,n),t)),nQ(o,o.length,0,[["exit",l,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),nQ(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}},null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}),{flow:{null:{name:"table",tokenize:oe,resolveAll:ot}}},{text:{91:ol}}])),a.push([{transforms:[ls],enter:{literalAutolink:ln,literalAutolinkEmail:lr,literalAutolinkHttp:lr,literalAutolinkWww:lr},exit:{literalAutolink:la,literalAutolinkEmail:lo,literalAutolinkHttp:li,literalAutolinkWww:ll}},{enter:{gfmFootnoteCallString:lf,gfmFootnoteCall:lp,gfmFootnoteDefinitionLabelString:lh,gfmFootnoteDefinition:lm},exit:{gfmFootnoteCallString:lg,gfmFootnoteCall:lx,gfmFootnoteDefinitionLabelString:lb,gfmFootnoteDefinition:ly}},{canContainEols:["delete"],enter:{strikethrough:lC},exit:{strikethrough:lS}},{enter:{table:lA,tableData:lO,tableHeader:lO,tableRow:lM},exit:{codeText:lR,table:lP,tableData:lL,tableHeader:lL,tableRow:lL}},{exit:{taskListCheckValueChecked:lz,taskListCheckValueUnchecked:lz,paragraph:l_}}]),s.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:le,notInConstruct:lt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:le,notInConstruct:lt},{character:":",before:"[ps]",after:"\\/",inConstruct:le,notInConstruct:lt}]},(r=!1,i&&i.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:function(e,t,n,i){let l=n.createTracker(i),o=l.move("[^"),a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=l.move(n.safe(n.associationId(e),{before:o,after:"]"})),s(),o+=l.move("]:"),e.children&&e.children.length>0&&(l.shift(4),o+=l.move((r?"\n":" ")+n.indentLines(n.containerFlow(e,l.current()),r?lw:lk))),a(),o},footnoteReference:lv},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lj}],handlers:{delete:lN}},function(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=lD(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return a(function(e,t,n){let r=e.children,i=-1,l=[],o=t.enter("table");for(;++i<r.length;)l[i]=s(r[i],t,n);return o(),l}(e,n,r),e.align)},tableCell:o,tableRow:function(e,t,n,r){let i=a([s(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function o(e,t,n,r){let i=n.enter("tableCell"),o=n.enter("phrasing"),a=n.containerPhrasing(e,{...r,before:l,after:l});return o(),i(),a}function a(e,t){return function(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||lE,l=[],o=[],a=[],s=[],u=0,c=-1;for(;++c<e.length;){let t=[],r=[],l=-1;for(e[c].length>u&&(u=e[c].length);++l<e[c].length;){var d;let o=null==(d=e[c][l])?"":String(d);if(!1!==n.alignDelimiters){let e=i(o);r[l]=e,(void 0===s[l]||e>s[l])&&(s[l]=e)}t.push(o)}o[c]=t,a[c]=r}let f=-1;if("object"==typeof r&&"length"in r)for(;++f<u;)l[f]=lT(r[f]);else{let e=lT(r);for(;++f<u;)l[f]=e}f=-1;let p=[],h=[];for(;++f<u;){let e=l[f],t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let i=!1===n.alignDelimiters?1:Math.max(1,s[f]-t.length-r.length),o=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&((i=t.length+i+r.length)>s[f]&&(s[f]=i),h[f]=i),p[f]=o}o.splice(1,0,p),a.splice(1,0,h),c=-1;let m=[];for(;++c<o.length;){let e=o[c],t=a[c];f=-1;let r=[];for(;++f<u;){let i=e[f]||"",o="",a="";if(!1!==n.alignDelimiters){let e=s[f]-(t[f]||0),n=l[f];114===n?o=" ".repeat(e):99===n?e%2?(o=" ".repeat(e/2+.5),a=" ".repeat(e/2-.5)):a=o=" ".repeat(e/2):a=" ".repeat(e)}!1===n.delimiterStart||f||r.push("|"),!1!==n.padding&&(!1!==n.alignDelimiters||""!==i)&&(!1!==n.delimiterStart||f)&&r.push(" "),!1!==n.alignDelimiters&&r.push(o),r.push(i),!1!==n.alignDelimiters&&r.push(a),!1!==n.padding&&r.push(" "),(!1!==n.delimiterEnd||f!==u-1)&&r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function s(e,t,n){let r=e.children,i=-1,l=[],a=t.enter("tableRow");for(;++i<r.length;)l[i]=o(r[i],e,t,n);return a(),l}}(i),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:lB}}]})}function ou({basePath:e,taskStatus:t,onApplyToPrompt:n,onChatStateChange:r}){let[i,l]=(0,w.useState)([]),[o,a]=(0,w.useState)(""),[s,u]=(0,w.useState)(!1),c=(0,w.useRef)(null),d=(0,w.useRef)(null),f=(0,w.useRef)(e);(0,w.useEffect)(()=>{f.current=e,l([]),u(!1)},[e]),(0,w.useEffect)(()=>{"u">typeof Notification&&"default"===Notification.permission&&Notification.requestPermission()},[]);let p=(0,w.useCallback)(()=>{fetch(`${e}/chat`).then(e=>e.json()).then(t=>{f.current===e&&Array.isArray(t)&&l(t)})},[e]);(0,w.useEffect)(()=>{p()},[p]),(0,w.useEffect)(()=>{if("testing"!==t)return;let e=setInterval(p,3e3);return()=>clearInterval(e)},[t,p]),(0,w.useEffect)(()=>{c.current?.scrollIntoView({behavior:"smooth"})},[i]);let h=(0,w.useCallback)(async()=>{let t=o.trim();if(!t||s)return;a(""),u(!0),r?.("loading");let n=`temp-${Date.now()}`,i={id:n,task_id:"",role:"user",content:t,created_at:new Date().toISOString()};l(e=>[...e,i]);try{let i=await fetch(`${e}/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:t})});if(f.current!==e)return void r?.("done");if(i.ok){var c;let e=await i.json();l(t=>[...t.filter(e=>e.id!==n),e.userMessage,e.aiMessage]),e.aiMessage?.content&&(c=e.aiMessage.content,document.hasFocus()||"granted"===Notification.permission&&new Notification("IM - AI Response",{body:c.slice(0,120),icon:"/icon-192.png"}))}}catch{}f.current===e&&(u(!1),d.current?.focus()),r?.("done")},[o,s,e,r]);return(0,k.jsxs)("div",{className:"flex flex-col h-full border-t border-border",children:[(0,k.jsxs)("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-border",children:[(0,k.jsx)("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"AI Chat"}),"testing"===t&&(0,k.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-warning",children:[(0,k.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-warning animate-pulse"}),"Executing..."]})]}),(0,k.jsxs)("div",{className:"flex-1 overflow-y-auto px-3 py-2 space-y-2 min-h-0",children:[0===i.length&&!s&&(0,k.jsx)("div",{className:"text-sm text-muted-foreground text-center py-4",children:"Ask AI to help refine your task or prompt"}),i.filter(e=>e.content).map(e=>(0,k.jsxs)("div",{className:`flex flex-col ${"user"===e.role?"items-end":"items-start"}`,children:[(0,k.jsx)("div",{className:`max-w-[90%] px-3 py-2 rounded-lg text-sm leading-relaxed ${"user"===e.role?"bg-accent text-white rounded-br-sm whitespace-pre-wrap":"bg-muted text-foreground rounded-bl-sm chat-markdown"}`,children:"assistant"===e.role?(0,k.jsx)(i9,{remarkPlugins:[os],children:e.content}):e.content}),"assistant"===e.role&&(0,k.jsx)("button",{onClick:()=>n(e.content),className:"text-xs text-muted-foreground hover:text-primary mt-0.5 px-1 transition-colors",children:"Apply to prompt"})]},e.id)),s&&(0,k.jsxs)("div",{className:"flex gap-1 px-2 py-2",children:[(0,k.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-muted-foreground animate-bounce",style:{animationDelay:"0ms"}}),(0,k.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-muted-foreground animate-bounce",style:{animationDelay:"150ms"}}),(0,k.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-muted-foreground animate-bounce",style:{animationDelay:"300ms"}})]}),(0,k.jsx)("div",{ref:c})]}),(0,k.jsxs)("div",{className:"flex gap-1.5 px-2 py-2 border-t border-border",children:[(0,k.jsx)("textarea",{ref:d,value:o,onChange:e=>a(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),h())},placeholder:"Ask AI...",rows:1,className:"flex-1 bg-input border border-border rounded-md px-3 py-2 text-sm text-foreground resize-none focus:border-primary focus:outline-none"}),(0,k.jsx)("button",{onClick:h,disabled:!o.trim()||s,className:"px-3 py-2 bg-accent text-white text-sm rounded-md disabled:opacity-40 hover:bg-accent/80 transition-colors flex-shrink-0",children:"Send"})]})]})}function oc({task:e,projectId:t,subProjectId:n,onUpdate:r,onDelete:i,onChatStateChange:l}){let[o,a]=(0,w.useState)(e.title),[s,u]=(0,w.useState)(e.description),[c,d]=(0,w.useState)(""),[f,p]=(0,w.useState)(!1),[h,m]=(0,w.useState)(!1),[g,x]=(0,w.useState)(!1),b=`/api/projects/${t}/sub-projects/${n}/tasks/${e.id}`,y=(0,w.useRef)(null);(0,w.useEffect)(()=>{a(e.title),u(e.description),fetch(`${b}/prompt`).then(e=>e.json()).then(e=>d(e.content||""))},[e.id,e.title,e.description,b]);let v=(0,w.useCallback)(()=>{let t=o.trim();t&&t!==e.title?r({title:t}):a(e.title),m(!1)},[o,e.title,r]),j=(0,w.useCallback)(()=>{s!==e.description&&r({description:s})},[s,e.description,r]),C=(0,w.useCallback)(async e=>{d(e),await fetch(`${b}/prompt`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e,prompt_type:"manual"})})},[b]),S=(0,w.useCallback)(async()=>{p(!0);try{let t=await fetch(`${b}/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:`Please refine and improve this prompt for a coding assistant. Current prompt: ${c||"(empty - generate one based on the task)"}. Task: ${e.title}. Description: ${e.description}. Output ONLY the improved prompt text, nothing else.`})});if(t.ok){let e=await t.json(),n=e.aiMessage?.content||"";n&&await C(n)}}catch{}p(!1)},[b,c,e.title,e.description,C]),N=(0,w.useCallback)(async e=>{await C(e)},[C]);return(0,k.jsxs)("div",{className:"flex flex-col h-full",children:[(0,k.jsxs)("div",{className:"px-4 py-3 border-b border-border flex-shrink-0 space-y-2",children:[h?(0,k.jsx)("input",{value:o,onChange:e=>a(e.target.value),onBlur:v,onKeyDown:t=>{"Enter"===t.key&&v(),"Escape"===t.key&&(a(e.title),m(!1))},className:"w-full bg-transparent text-lg font-semibold border-b border-primary focus:outline-none pb-1 text-foreground",autoFocus:!0}):(0,k.jsx)("h2",{onClick:()=>m(!0),className:"text-lg font-semibold cursor-text hover:text-primary transition-colors",children:e.title}),(0,k.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,k.jsx)(t$,{status:e.status,onChange:e=>r({status:e})}),(0,k.jsx)("div",{className:"flex items-center gap-1",children:["high","medium","low"].map(t=>(0,k.jsx)("button",{onClick:()=>r({priority:t}),className:`px-2 py-0.5 text-xs rounded transition-colors ${e.priority===t?"high"===t?"bg-destructive/20 text-destructive":"medium"===t?"bg-warning/20 text-warning":"bg-muted text-muted-foreground":"text-muted-foreground/40 hover:text-muted-foreground"}`,children:t},t))}),(0,k.jsx)("button",{onClick:()=>r({is_today:!e.is_today}),className:`text-xs px-2 py-0.5 rounded transition-colors ${e.is_today?"bg-primary/20 text-primary":"text-muted-foreground hover:text-foreground"}`,children:e.is_today?"Today *":"Mark today"}),(0,k.jsx)("span",{className:"text-border",children:"|"}),(0,k.jsxs)("button",{onClick:()=>x(!0),className:`text-xs px-2 py-0.5 rounded transition-colors border ${c?"bg-accent/15 text-accent border-accent/30 hover:bg-accent/25":"text-muted-foreground border-border hover:text-foreground hover:border-muted-foreground"}`,children:["Prompt",c?" *":""]}),(0,k.jsx)("button",{onClick:i,className:"text-xs text-muted-foreground hover:text-destructive transition-colors ml-auto",children:"Delete"})]}),(0,k.jsx)("textarea",{value:s,onChange:e=>u(e.target.value),onBlur:j,placeholder:"Background, conditions, notes...",className:"w-full bg-input border border-border rounded-lg px-3 py-2 text-sm focus:border-primary focus:outline-none text-foreground resize-y leading-relaxed min-h-[3.5rem] max-h-[300px]",rows:2})]}),(0,k.jsx)("div",{className:"flex-1 min-h-0",children:(0,k.jsx)(ou,{basePath:b,taskStatus:e.status,onApplyToPrompt:N,onChatStateChange:l?t=>l(e.id,t):void 0})}),g&&(0,k.jsx)("div",{ref:y,onClick:e=>{e.target===y.current&&x(!1)},className:"fixed inset-0 z-50 flex items-center justify-center",style:{background:"rgba(0,0,0,0.5)",backdropFilter:"blur(2px)"},children:(0,k.jsxs)("div",{className:"bg-card border border-border rounded-xl shadow-2xl shadow-black/40 w-full max-w-2xl mx-4 max-h-[80vh] flex flex-col animate-dialog-in",children:[(0,k.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border",children:[(0,k.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:"Prompt"}),(0,k.jsx)("button",{onClick:()=>x(!1),className:"text-muted-foreground hover:text-foreground transition-colors text-sm",children:"Close"})]}),(0,k.jsx)("div",{className:"flex-1 overflow-y-auto p-5",children:(0,k.jsx)(tK,{content:c,onSave:C,onRefine:S,refining:f})})]})})]})}function od({open:e,content:t,onSave:n,onClose:r}){let[i,l]=(0,w.useState)(t),o=(0,w.useRef)(null);return((0,w.useEffect)(()=>{e&&(l(t),setTimeout(()=>o.current?.focus(),50))},[e,t]),(0,w.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"===e.key&&r(),(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),n(i))};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,i,n,r]),e)?(0,k.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[(0,k.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:r}),(0,k.jsxs)("div",{className:"relative bg-card border border-border rounded-xl shadow-2xl w-[640px] max-h-[80vh] flex flex-col animate-dialog-in",children:[(0,k.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border",children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("h3",{className:"text-sm font-semibold",children:"AI Policy"}),(0,k.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:"AI 채팅과 프롬프트 다듬기에 항상 포함되는 프로젝트 컨텍스트"})]}),(0,k.jsx)("button",{onClick:r,className:"text-muted-foreground hover:text-foreground text-lg px-1",children:"x"})]}),(0,k.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,k.jsx)("textarea",{ref:o,value:i,onChange:e=>l(e.target.value),placeholder:`프로젝트 컨텍스트와 AI 지침을 작성하세요.
9
-
10
- 예시:
11
- - 이 프로젝트는 JABIS 스마트워크 시스템입니다
12
- - 기술 스택: React + TypeScript + Vite (monorepo)
13
- - DB: PostgreSQL (jabis 스키마)
14
- - 한국어로 응답할 것
15
- - 코드 제안 시 기존 컨벤션을 따를 것`,className:"w-full bg-input border border-border rounded-lg px-4 py-3 text-sm text-foreground resize-none focus:border-primary focus:outline-none leading-relaxed font-mono min-h-[300px]"})}),(0,k.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-t border-border",children:[(0,k.jsx)("span",{className:"text-xs text-muted-foreground",children:"Cmd+Enter to save"}),(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsx)("button",{onClick:r,className:"px-3 py-1.5 text-xs text-muted-foreground hover:text-foreground border border-border rounded-md transition-colors",children:"Cancel"}),(0,k.jsx)("button",{onClick:()=>n(i),className:"px-3 py-1.5 text-xs bg-primary text-white rounded-md hover:bg-primary-hover transition-colors",children:"Save"})]})]})]})]}):null}let of={success:{icon:"✅",color:"text-success"},error:{icon:"❌",color:"text-destructive"},"no-git":{icon:"➖",color:"text-muted-foreground"},"no-path":{icon:"➖",color:"text-muted-foreground"}};function op({open:e,results:t,onClose:n}){let r=(0,w.useRef)(null);if((0,w.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"===e.key&&n()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,n]),!e)return null;let i=t.filter(e=>"success"===e.status).length,l=t.filter(e=>"error"===e.status).length,o=t.filter(e=>"no-git"===e.status||"no-path"===e.status).length;return(0,k.jsx)("div",{ref:r,onClick:e=>{e.target===r.current&&n()},className:"fixed inset-0 z-50 flex items-center justify-center",style:{background:"rgba(0,0,0,0.5)",backdropFilter:"blur(2px)"},children:(0,k.jsxs)("div",{className:"bg-card border border-border rounded-xl shadow-2xl shadow-black/40 w-full max-w-md mx-4 animate-dialog-in",children:[(0,k.jsxs)("div",{className:"p-5 border-b border-border",children:[(0,k.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:"Git Sync Results"}),(0,k.jsxs)("p",{className:"text-xs text-muted-foreground mt-1",children:[i," synced, ",l," failed, ",o," skipped"]})]}),(0,k.jsx)("div",{className:"max-h-64 overflow-y-auto p-3 space-y-1.5",children:0===t.length?(0,k.jsx)("p",{className:"text-xs text-muted-foreground text-center py-4",children:"No projects with linked folders"}):t.map(e=>{let t=of[e.status];return(0,k.jsxs)("div",{className:"flex items-start gap-2 p-2 rounded-lg bg-muted/50",children:[(0,k.jsx)("span",{className:"text-sm flex-shrink-0",children:t.icon}),(0,k.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,k.jsx)("div",{className:"text-xs font-medium truncate",children:e.projectName}),(0,k.jsx)("div",{className:`text-xs ${t.color} truncate`,title:e.message,children:e.message})]})]},e.projectId)})}),(0,k.jsx)("div",{className:"flex justify-end px-5 pb-4 pt-2",children:(0,k.jsx)("button",{onClick:n,className:"px-3 py-1.5 text-xs text-muted-foreground hover:text-foreground bg-muted hover:bg-card-hover border border-border rounded-md transition-colors",children:"Close"})})]})})}let oh={ts:"TS",tsx:"TX",js:"JS",jsx:"JX",json:"{}",md:"MD",css:"CS",scss:"SC",html:"HT",svg:"SV",png:"PN",jpg:"JP",py:"PY",go:"GO",rs:"RS",java:"JA",sql:"SQ",sh:"SH",yml:"YM",yaml:"YM",toml:"TM",xml:"XM",txt:"TX",env:"EN",lock:"LK",gitignore:"GI"};function om({rootPath:e,onClose:t}){let[n,r]=(0,w.useState)({}),[i,l]=(0,w.useState)(new Set([e])),o=(0,w.useRef)(null),a=(0,w.useCallback)(async e=>{r(t=>({...t,[e]:{entries:[],loaded:!1,loading:!0}}));try{let t=await fetch(`/api/filesystem/tree?path=${encodeURIComponent(e)}`);if(!t.ok)throw Error("Failed to load");let n=await t.json();r(t=>({...t,[e]:{entries:n.entries,loaded:!0,loading:!1}}))}catch{r(t=>({...t,[e]:{entries:[],loaded:!0,loading:!1,error:"Failed to load"}}))}},[]);(0,w.useEffect)(()=>{a(e)},[e,a]),(0,w.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t]);let s=(e,t)=>{let r=n[e];return r?r.loading?(0,k.jsx)("div",{className:"flex items-center gap-2 py-1",style:{paddingLeft:16*t+12},children:(0,k.jsx)("span",{className:"text-xs text-muted-foreground animate-pulse",children:"Loading..."})}):r.error?(0,k.jsx)("div",{className:"flex items-center gap-2 py-1",style:{paddingLeft:16*t+12},children:(0,k.jsx)("span",{className:"text-xs text-destructive",children:r.error})}):0===r.entries.length?(0,k.jsx)("div",{className:"flex items-center gap-2 py-1",style:{paddingLeft:16*t+12},children:(0,k.jsx)("span",{className:"text-xs text-muted-foreground italic",children:"Empty"})}):r.entries.map(e=>{var r,o;let u="directory"===e.type,c=i.has(e.path);return(0,k.jsxs)("div",{children:[(0,k.jsx)("div",{className:`flex items-center gap-1.5 py-[3px] pr-3 cursor-pointer transition-colors hover:bg-card-hover group ${u?"text-foreground":"text-muted-foreground"}`,style:{paddingLeft:16*t+12},onClick:()=>{var t;return u&&(t=e.path,void l(e=>{let r=new Set(e);return r.has(t)?r.delete(t):(r.add(t),n[t]?.loaded||n[t]?.loading||a(t)),r}))},children:u?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("span",{className:"w-4 text-center text-xs text-muted-foreground flex-shrink-0",children:c?"▼":"▶"}),(0,k.jsx)("span",{className:"text-sm flex-shrink-0",children:c?"📂":"📁"}),(0,k.jsx)("span",{className:"text-sm truncate flex-1 font-medium",children:e.name})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("span",{className:"w-4 flex-shrink-0"}),(0,k.jsx)("span",{className:"text-[10px] font-mono w-5 text-center flex-shrink-0 text-muted-foreground/70",children:(r=e.extension)?oh[r]||r.slice(0,2).toUpperCase():"--"}),(0,k.jsx)("span",{className:"text-sm truncate flex-1",children:e.name}),void 0!==e.size&&(0,k.jsx)("span",{className:"text-[10px] text-muted-foreground/50 tabular-nums flex-shrink-0",children:(o=e.size)<1024?`${o}B`:o<1048576?`${(o/1024).toFixed(0)}K`:`${(o/1048576).toFixed(1)}M`})]})}),u&&c&&s(e.path,t+1)]},e.path)}):null},u=e.split("/").pop()||e;return(0,k.jsxs)("div",{ref:o,className:"fixed inset-0 z-50 flex justify-end",onClick:e=>{e.target===o.current&&t()},children:[(0,k.jsx)("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-[2px]"}),(0,k.jsxs)("div",{className:"relative w-[420px] max-w-[85vw] h-full bg-card border-l border-border shadow-2xl flex flex-col animate-drawer-in",children:[(0,k.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border flex-shrink-0",children:[(0,k.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,k.jsx)("span",{className:"text-base",children:"📂"}),(0,k.jsxs)("div",{className:"min-w-0",children:[(0,k.jsx)("h2",{className:"text-sm font-semibold truncate",children:u}),(0,k.jsx)("p",{className:"text-[10px] text-muted-foreground font-mono truncate",children:e})]})]}),(0,k.jsx)("button",{onClick:t,className:"text-muted-foreground hover:text-foreground transition-colors text-lg px-1",title:"Close (ESC)",children:"×"})]}),(0,k.jsx)("div",{className:"flex-1 overflow-y-auto py-2",children:s(e,0)}),(0,k.jsx)("div",{className:"px-4 py-2 border-t border-border flex-shrink-0",children:(0,k.jsx)("p",{className:"text-[10px] text-muted-foreground",children:"ESC to close"})})]})]})}function og({open:e,projectId:t,onClose:n,onApplied:r}){let[i,l]=(0,w.useState)(!1),[o,a]=(0,w.useState)(!1),[s,u]=(0,w.useState)(null),[c,d]=(0,w.useState)([]),[f,p]=(0,w.useState)(new Set);(0,w.useEffect)(()=>{e&&(d([]),u(null),p(new Set),h())},[e]),(0,w.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"===e.key&&n()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,n]);let h=async()=>{l(!0),u(null);try{let e=await fetch(`/api/projects/${t}/auto-distribute`,{method:"POST"}),n=await e.json();if(!e.ok){let e=n.raw?`
16
-
17
- AI 응답:
18
- ${n.raw}`:"";u((n.error||"Failed to get distribution")+e);return}d(n.distributions||[])}catch{u("AI 호출에 실패했습니다.")}finally{l(!1)}},m=async()=>{let e=c.filter(e=>e.tasks.length>0);if(0!==e.length){a(!0);try{let i=await fetch(`/api/projects/${t}/apply-distribute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({distributions:e})});if(i.ok)r(),n();else{let e=await i.json();u(e.error||"Failed to apply")}}catch{u("적용에 실패했습니다.")}finally{a(!1)}}},g=c.reduce((e,t)=>e+t.tasks.length,0);return e?(0,k.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[(0,k.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:n}),(0,k.jsxs)("div",{className:"relative bg-card border border-border rounded-xl shadow-2xl w-[720px] max-h-[85vh] flex flex-col animate-dialog-in",children:[(0,k.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border",children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("h3",{className:"text-sm font-semibold",children:"Auto Distribute"}),(0,k.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:"AI가 브레인스토밍을 분석하여 태스크를 분배합니다"})]}),(0,k.jsx)("button",{onClick:n,className:"text-muted-foreground hover:text-foreground text-lg px-1",children:"x"})]}),(0,k.jsxs)("div",{className:"flex-1 overflow-y-auto p-4",children:[i&&(0,k.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-3",children:[(0,k.jsx)("div",{className:"w-6 h-6 border-2 border-primary border-t-transparent rounded-full animate-spin"}),(0,k.jsx)("p",{className:"text-sm text-muted-foreground",children:"AI가 분석 중..."})]}),s&&(0,k.jsxs)("div",{className:"bg-danger/10 border border-danger/30 rounded-lg p-3 mb-3",children:[(0,k.jsx)("pre",{className:"text-xs text-danger whitespace-pre-wrap break-all max-h-[200px] overflow-y-auto",children:s}),(0,k.jsx)("button",{onClick:h,className:"text-xs text-accent hover:underline mt-1",children:"다시 시도"})]}),!i&&c.length>0&&(0,k.jsx)("div",{className:"space-y-3",children:c.map((e,t)=>(0,k.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,k.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 bg-muted/50",children:[(0,k.jsx)("button",{onClick:()=>{p(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})},className:"text-xs text-muted-foreground hover:text-foreground w-4",children:f.has(t)?"▶":"▼"}),(0,k.jsx)("span",{className:`text-[10px] px-1.5 py-0.5 rounded font-medium ${e.is_new?"bg-success/15 text-success":"bg-accent/15 text-accent"}`,children:e.is_new?"NEW":"EXISTING"}),(0,k.jsx)("input",{value:e.sub_project_name,onChange:e=>{var n;return n=e.target.value,void d(e=>e.map((e,r)=>r===t?{...e,sub_project_name:n}:e))},className:"flex-1 bg-transparent text-sm font-medium text-foreground focus:outline-none border-b border-transparent focus:border-primary"}),(0,k.jsx)("span",{className:"text-xs text-muted-foreground tabular-nums",children:e.tasks.length}),(0,k.jsx)("button",{onClick:()=>{d(e=>e.filter((e,n)=>n!==t))},className:"text-xs text-muted-foreground hover:text-danger px-1",title:"Remove group",children:"x"})]}),!f.has(t)&&(0,k.jsxs)("div",{className:"divide-y divide-border",children:[e.tasks.map((e,n)=>{var r;return(0,k.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 group hover:bg-muted/30",children:[(r=e.priority,(0,k.jsx)("span",{className:`inline-block w-2 h-2 rounded-full ${{high:"bg-danger",medium:"bg-warning",low:"bg-muted-foreground/40"}[r]}`})),(0,k.jsx)("input",{value:e.title,onChange:e=>{var r;return r=e.target.value,void d(e=>e.map((e,i)=>i===t?{...e,tasks:e.tasks.map((e,t)=>t===n?{...e,title:r}:e)}:e))},className:"flex-1 bg-transparent text-xs text-foreground focus:outline-none border-b border-transparent focus:border-primary"}),(0,k.jsxs)("select",{value:e.priority,onChange:e=>{var r;return r=e.target.value,void d(e=>e.map((e,i)=>i===t?{...e,tasks:e.tasks.map((e,t)=>t===n?{...e,priority:r}:e)}:e))},className:"text-[10px] bg-transparent text-muted-foreground cursor-pointer hover:text-foreground opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,k.jsx)("option",{value:"high",children:"high"}),(0,k.jsx)("option",{value:"medium",children:"medium"}),(0,k.jsx)("option",{value:"low",children:"low"})]}),c.length>1&&(0,k.jsxs)("select",{value:"",onChange:e=>{let r=parseInt(e.target.value);isNaN(r)||d(e=>{let i=e[t].tasks[n];return e.map((e,l)=>l===t?{...e,tasks:e.tasks.filter((e,t)=>t!==n)}:l===r?{...e,tasks:[...e.tasks,i]}:e)})},className:"text-[10px] bg-transparent text-muted-foreground cursor-pointer hover:text-foreground opacity-0 group-hover:opacity-100 transition-opacity",title:"Move to...",children:[(0,k.jsx)("option",{value:"",children:"Move"}),c.map((e,n)=>n!==t&&(0,k.jsx)("option",{value:n,children:e.sub_project_name},n))]}),(0,k.jsx)("button",{onClick:()=>{d(e=>e.map((e,r)=>r===t?{...e,tasks:e.tasks.filter((e,t)=>t!==n)}:e))},className:"text-xs text-muted-foreground hover:text-danger opacity-0 group-hover:opacity-100 transition-opacity px-0.5",children:"x"})]},n)}),0===e.tasks.length&&(0,k.jsx)("div",{className:"px-3 py-2 text-xs text-muted-foreground italic",children:"No tasks (this group will be skipped)"})]})]},t))}),!i&&!s&&0===c.length&&(0,k.jsx)("div",{className:"text-center py-16 text-sm text-muted-foreground",children:"No distribution available"})]}),(0,k.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-t border-border",children:[(0,k.jsx)("span",{className:"text-xs text-muted-foreground",children:c.length>0&&`${c.length} projects, ${g} tasks`}),(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[!i&&c.length>0&&(0,k.jsx)("button",{onClick:h,className:"px-3 py-1.5 text-xs text-muted-foreground hover:text-foreground border border-border rounded-md transition-colors",children:"Retry"}),(0,k.jsx)("button",{onClick:n,className:"px-3 py-1.5 text-xs text-muted-foreground hover:text-foreground border border-border rounded-md transition-colors",children:"Cancel"}),(0,k.jsx)("button",{onClick:m,disabled:o||i||0===g,className:"px-4 py-1.5 text-xs bg-primary text-white rounded-md hover:bg-primary-hover transition-colors disabled:opacity-50",children:o?"Applying...":`Apply (${g})`})]})]})]})]}):null}function ox({id:e,initialSubId:t,initialTaskId:n}){let{state:r,setActiveTab:i,consumeInitial:l,updateTabName:o}=I(),a=r.activeTabId===e,s=(0,w.useRef)(t),u=(0,w.useRef)(n);(0,w.useEffect)(()=>{t&&(s.current=t),n&&(u.current=n),(t||n)&&(t&&m(t),n&&y(n),l(e))},[t,n]);let[c,d]=(0,w.useState)(null),[f,p]=(0,w.useState)([]),[h,m]=(0,w.useState)(null),[g,x]=(0,w.useState)([]),[b,y]=(0,w.useState)(null),[v,j]=(0,w.useState)(!1),[C,S]=(0,w.useState)(null),[N,E]=(0,w.useState)(!1),[T,D]=(0,w.useState)(!0),[A,P]=(0,w.useState)(""),[O,R]=(0,w.useState)(!1),[F,z]=(0,w.useState)(!1),[_,$]=(0,w.useState)(null),[U,H]=(0,w.useState)(null),[V,q]=(0,w.useState)(!1),[K,J]=(0,w.useState)(!1),[W,X]=(0,w.useState)({}),Y=(0,w.useRef)(!1),[Q,G]=(0,w.useState)(500),[Z,ee]=(0,w.useState)(500),et=(0,w.useRef)(null),en=(0,w.useRef)(null),er=(0,w.useRef)(0),ei=(0,w.useRef)(0),el=(0,w.useCallback)((e,t)=>{t.preventDefault(),en.current=e,er.current=t.clientX,ei.current="left"===e?Q:Z},[Q,Z]);(0,w.useEffect)(()=>{let e=e=>{if(!en.current)return;let t=e.clientX-er.current,n=Math.max(180,Math.min(900,ei.current+t));"left"===en.current?G(n):ee(n)},t=()=>{en.current=null};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[]),(0,w.useEffect)(()=>{fetch(`/api/projects/${e}`).then(e=>e.ok?e.json():null).then(t=>{t&&(d(t),o(e,t.name))})},[e,o]);let eo=(0,w.useCallback)(async()=>{let t=await fetch(`/api/projects/${e}/sub-projects`);if(!t.ok)return;let n=await t.json();return p(n),n},[e]);(0,w.useEffect)(()=>{eo().then(e=>{if(!e||0===e.length)return;let t=s.current;t&&e.some(e=>e.id===t)?m(t):h||m(e[0].id)})},[eo]),(0,w.useEffect)(()=>{h?fetch(`/api/projects/${e}/sub-projects/${h}/tasks`).then(e=>e.json()).then(e=>{x(e);let t=u.current;t&&e.some(e=>e.id===t)&&(y(t),u.current=void 0)}):x([])},[e,h]);let ea=g.find(e=>e.id===b)??null,es=async()=>{if(!A.trim())return;let t=await fetch(`/api/projects/${e}/sub-projects`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:A.trim()})});if(t.ok){let e=await t.json();P(""),E(!1),await eo(),m(e.id)}},eu=async t=>{if(!h)return;let n=await fetch(`/api/projects/${e}/sub-projects/${h}/tasks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:t})});if(n.ok){let e=await n.json();x(t=>[...t,e]),y(e.id),eo()}},ec=async(t,n)=>{let r=await fetch(`/api/projects/${e}/sub-projects/${h}/tasks/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:n})});if(r.ok){let e=await r.json();x(n=>n.map(n=>n.id===t?e:n)),eo()}},ed=async(t,n)=>{let r=await fetch(`/api/projects/${e}/sub-projects/${h}/tasks/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({is_today:n})});if(r.ok){let e=await r.json();x(n=>n.map(n=>n.id===t?e:n))}},ef=async t=>{if(!b||!h)return;let n=await fetch(`/api/projects/${e}/sub-projects/${h}/tasks/${b}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(n.ok){let e=await n.json();x(t=>t.map(t=>t.id===b?e:t)),eo()}},ep=async t=>{p(e=>{let n=new Map(e.map(e=>[e.id,e]));return t.map(e=>n.get(e)).filter(Boolean)}),await fetch(`/api/projects/${e}/sub-projects`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderedIds:t})})},eh=e=>{let t=e||b;t&&S({type:"delete-task",id:t})},em=async t=>{C&&("delete-sub"===C.type?(await fetch(`/api/projects/${e}/sub-projects/${C.id}`,{method:"DELETE"}),h===C.id&&(m(null),y(null)),eo()):"delete-task"===C.type&&(await fetch(`/api/projects/${e}/sub-projects/${h}/tasks/${C.id}?mode=${t||"archive"}`,{method:"DELETE"}),x(e=>e.filter(e=>e.id!==C.id)),b===C.id&&y(null),eo()),S(null))},eg=async t=>{let n=await fetch(`/api/projects/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_path:t})});n.ok&&(d(await n.json()),j(!1))},ex=async t=>{let n=await fetch(`/api/projects/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({ai_context:t})});n.ok&&(d(await n.json()),R(!1))},eb=(0,w.useCallback)(async(t=!1)=>{if(!Y.current){Y.current=!0,t||z(!0);try{let n=await fetch(`/api/projects/${e}/git-sync`,{method:"POST"});if(n.ok){let e=await n.json();H(new Date),t||$(e)}}catch{}finally{Y.current=!1,t||z(!1)}}},[e]);(0,w.useEffect)(()=>{if(!c?.project_path)return;let e=setInterval(()=>eb(!0),18e5);return()=>clearInterval(e)},[c?.project_path,eb]);let ey=async()=>{if(!c)return;let t=await fetch(`/api/projects/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({watch_enabled:!c.watch_enabled})});t.ok&&d(await t.json())};return((0,w.useEffect)(()=>{let e=e=>{if(!a)return;let t=e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement;if(!t&&"KeyB"===e.code&&!e.metaKey&&!e.ctrlKey){e.preventDefault(),D(e=>!e);return}if(!t&&"KeyN"===e.code&&!e.metaKey&&!e.ctrlKey){e.preventDefault(),E(!0);return}if(!t&&"KeyT"===e.code&&!e.metaKey&&!e.ctrlKey&&h){e.preventDefault();let t=document.querySelector("[data-add-task]");t?.click();return}if(b&&h&&!t){let t={Digit1:"idea",Digit2:"writing",Digit3:"submitted",Digit4:"testing",Digit5:"done",Digit6:"problem"};(e.metaKey||e.ctrlKey)&&t[e.code]&&(e.preventDefault(),ec(b,t[e.code]))}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),c)?(0,k.jsxs)("div",{className:"flex flex-col h-full",children:[(0,k.jsxs)("header",{className:"flex items-center justify-between px-4 py-2 border-b border-border bg-card flex-shrink-0",children:[(0,k.jsxs)("div",{className:"flex items-center gap-3",children:[(0,k.jsx)("button",{onClick:()=>i("dashboard"),className:"text-muted-foreground hover:text-foreground hover:bg-muted transition-colors text-sm px-2 py-1 rounded-md",children:"← Back"}),(0,k.jsx)("span",{className:"text-border",children:"|"}),(0,k.jsx)("h1",{className:"text-sm font-semibold",children:c.name}),c.project_path&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("span",{className:"text-xs text-muted-foreground font-mono truncate max-w-48",title:c.project_path,children:c.project_path}),(0,k.jsx)("button",{onClick:()=>q(!0),className:"text-xs text-muted-foreground hover:text-foreground hover:bg-muted transition-colors px-1.5 py-0.5 rounded",title:"View file tree",children:"📂"})]})]}),(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsxs)("select",{value:c.agent_type||"claude",onChange:async t=>{let n=await fetch(`/api/projects/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent_type:t.target.value})});n.ok&&d(await n.json())},className:"px-2 py-1.5 text-xs bg-muted border border-border rounded-md text-foreground cursor-pointer hover:bg-card-hover transition-colors",title:"AI Agent",children:[(0,k.jsx)("option",{value:"claude",children:"Claude"}),(0,k.jsx)("option",{value:"gemini",children:"Gemini"}),(0,k.jsx)("option",{value:"codex",children:"Codex"})]}),(0,k.jsxs)("button",{onClick:ey,className:`px-3 py-1.5 text-xs border rounded-md transition-colors flex items-center gap-1.5 ${c.watch_enabled?"bg-success/15 text-success border-success/30 hover:bg-success/25":"bg-muted hover:bg-card-hover text-muted-foreground border-border"}`,title:c.watch_enabled?"Watch ON":"Watch OFF",children:[(0,k.jsx)("span",{className:`inline-block w-2 h-2 rounded-full ${c.watch_enabled?"bg-success animate-pulse":"bg-muted-foreground/40"}`}),"Watch"]}),(0,k.jsxs)("button",{onClick:()=>R(!0),className:`px-3 py-1.5 text-xs border rounded-md transition-colors ${c.ai_context?"bg-accent/15 text-accent border-accent/30 hover:bg-accent/25":"bg-muted hover:bg-card-hover text-muted-foreground border-border"}`,children:["AI Policy",c.ai_context?" *":""]}),c.project_path?(0,k.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,k.jsxs)("button",{onClick:()=>eb(!1),disabled:F,className:"px-3 py-1.5 text-xs bg-muted hover:bg-card-hover text-foreground border border-border rounded-md transition-colors disabled:opacity-50 flex items-center gap-1.5",title:U?`Last sync: ${U.toLocaleTimeString()}`:"Git pull",children:[(0,k.jsx)("span",{className:F?"animate-spin":"",children:"↻"}),F?"Syncing...":"Git Sync"]}),U&&(0,k.jsx)("span",{className:"text-xs text-muted-foreground",children:U.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}):(0,k.jsx)("button",{onClick:()=>j(!0),className:"px-3 py-1.5 text-xs bg-muted hover:bg-card-hover text-foreground border border-border rounded-md transition-colors",children:"Link folder"})]})]}),(0,k.jsxs)("div",{ref:et,className:"flex-1 flex overflow-hidden",children:[T?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("div",{style:{width:Q},className:"border-r border-border flex flex-col flex-shrink-0",children:(0,k.jsx)(B,{projectId:e,onCollapse:()=>D(!1)})}),(0,k.jsx)("div",{className:"panel-resize-handle",onMouseDown:e=>el("left",e),children:(0,k.jsx)("div",{className:"panel-resize-handle-bar"})})]}):(0,k.jsx)("button",{onClick:()=>D(!0),className:"w-8 border-r border-border flex-shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-card-hover transition-colors text-xs",title:"Show brainstorming (B)",style:{writingMode:"vertical-rl"},children:"Brainstorm"}),(0,k.jsxs)("div",{style:{width:Z},className:"border-r border-border flex flex-col flex-shrink-0",children:[N&&(0,k.jsx)("div",{className:"px-3 py-2 border-b border-border",children:(0,k.jsx)("input",{type:"text",value:A,onChange:e=>P(e.target.value),onKeyDown:e=>{"Enter"===e.key&&es(),"Escape"===e.key&&(P(""),E(!1))},placeholder:"Sub-project name...",className:"w-full bg-input border border-border rounded px-2 py-1 text-xs focus:border-primary focus:outline-none text-foreground",autoFocus:!0})}),(0,k.jsx)(tV,{subProjects:f,tasks:g,selectedSubId:h,selectedTaskId:b,onSelectSub:e=>{m(e),y(null)},onSelectTask:e=>{y(e),X(t=>{if("done"!==t[e])return t;let n={...t};return delete n[e],n})},onCreateSub:()=>E(!0),onDeleteSub:e=>{S({type:"delete-sub",id:e})},onCreateTask:eu,onStatusChange:ec,onTodayToggle:ed,onDeleteTask:eh,onReorderSubs:ep,onAutoDistribute:()=>J(!0),chatStates:W})]}),(0,k.jsx)("div",{className:"panel-resize-handle",onMouseDown:e=>el("center",e),children:(0,k.jsx)("div",{className:"panel-resize-handle-bar"})}),(0,k.jsx)("div",{className:"flex-1 min-w-0",children:ea?(0,k.jsx)(oc,{task:ea,projectId:e,subProjectId:h,onUpdate:ef,onDelete:eh,onChatStateChange:(e,t)=>{X(n=>({...n,[e]:t}))}}):(0,k.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:g.length>0?"Select a task":h?"Create a task to get started":"Select a sub-project"})})]}),v&&(0,k.jsx)(M,{onSelect:eg,onCancel:()=>j(!1),initialPath:c.project_path||void 0}),(0,k.jsx)(L,{open:C?.type==="delete-sub",title:"Delete sub-project?",description:"This will delete the sub-project and all its tasks.",confirmLabel:"Delete",variant:"danger",onConfirm:()=>em(),onCancel:()=>S(null)}),C?.type==="delete-task"&&(0,k.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{background:"rgba(0,0,0,0.5)",backdropFilter:"blur(2px)"},children:(0,k.jsxs)("div",{className:"bg-card border border-border rounded-xl shadow-2xl shadow-black/40 w-full max-w-sm mx-4 animate-dialog-in",children:[(0,k.jsxs)("div",{className:"p-5",children:[(0,k.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:"Remove task"}),(0,k.jsx)("p",{className:"text-xs text-muted-foreground mt-1.5 leading-relaxed",children:"보관함에 넣으면 나중에 복원하거나 프롬프트를 참고할 수 있습니다."})]}),(0,k.jsxs)("div",{className:"flex justify-end gap-2 px-5 pb-4",children:[(0,k.jsx)("button",{onClick:()=>S(null),className:"px-3 py-1.5 text-xs text-muted-foreground hover:text-foreground bg-muted hover:bg-card-hover border border-border rounded-md transition-colors",children:"Cancel"}),(0,k.jsx)("button",{onClick:()=>em("permanent"),className:"px-3 py-1.5 text-xs text-white bg-destructive hover:bg-destructive/80 rounded-md transition-colors",children:"Delete"}),(0,k.jsx)("button",{onClick:()=>em("archive"),className:"px-3 py-1.5 text-xs text-white bg-primary hover:bg-primary-hover rounded-md transition-colors",children:"Archive"})]})]})}),(0,k.jsx)(od,{open:O,content:c.ai_context||"",onSave:ex,onClose:()=>R(!1)}),(0,k.jsx)(op,{open:!!_,results:_||[],onClose:()=>$(null)}),V&&c.project_path&&(0,k.jsx)(om,{rootPath:c.project_path,onClose:()=>q(!1)}),(0,k.jsx)(og,{open:K,projectId:e,onClose:()=>J(!1),onApplied:()=>{eo()}})]}):(0,k.jsx)("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Loading..."})}function ob(){let{state:e}=I();return(0,k.jsxs)("div",{className:"h-screen flex flex-col",children:[(0,k.jsx)(P,{}),(0,k.jsx)("div",{className:"flex-1 min-h-0 relative",children:e.tabs.map(t=>(0,k.jsx)("div",{className:"absolute inset-0 flex flex-col",style:{display:t.id===e.activeTabId?"flex":"none"},children:"dashboard"===t.type?(0,k.jsx)(_,{}):(0,k.jsx)(ox,{id:t.projectId,initialSubId:t.initialSubId,initialTaskId:t.initialTaskId})},t.id))})]})}function oy(){return(0,k.jsx)(A,{children:(0,k.jsx)(ob,{})})}e.s(["default",()=>oy],52683)}]);