tower-studio 0.2.41 → 0.2.42

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 (282) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +2 -0
  3. package/.next/standalone/.next/build-manifest.json +3 -3
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/routes-manifest.json +16 -0
  6. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +2 -2
  14. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +27 -27
  15. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  16. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/.next/standalone/.next/server/app/api/adapters/test/route.js +2 -2
  18. package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js +1 -1
  25. package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js +1 -1
  27. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/internal/assistant/route.js +1 -1
  29. package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js +1 -1
  31. package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/internal/backup/import/route.js +1 -1
  33. package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js +2 -3
  36. package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js +1 -1
  38. package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js +1 -1
  40. package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route/app-paths-manifest.json +3 -0
  43. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route/build-manifest.json +9 -0
  44. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route/server-reference-manifest.json +4 -0
  45. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js +11 -0
  46. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js.nft.json +1 -0
  47. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route_client-reference-manifest.js +3 -0
  48. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +5 -5
  49. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route/app-paths-manifest.json +3 -0
  51. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route/build-manifest.json +9 -0
  52. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route/server-reference-manifest.json +4 -0
  53. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js +11 -0
  54. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js.nft.json +1 -0
  55. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route_client-reference-manifest.js +3 -0
  56. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js +1 -1
  57. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
  58. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js +1 -1
  59. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js.nft.json +1 -1
  60. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js +1 -1
  61. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
  62. package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
  63. package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +116 -116
  64. package/.next/standalone/.next/server/app/missions/page.js +2 -3
  65. package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
  66. package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  67. package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +2 -2
  68. package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +27 -27
  69. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +2 -2
  72. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +27 -27
  73. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  74. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  75. package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +2 -2
  76. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +44 -44
  77. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  78. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +2 -2
  80. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +112 -100
  81. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  82. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  83. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +2 -2
  84. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +91 -79
  85. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  86. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  87. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +2 -2
  88. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +80 -68
  89. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  90. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  91. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +2 -2
  92. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +69 -69
  93. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  94. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  95. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +2 -2
  96. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +27 -27
  97. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  98. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  99. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +2 -2
  100. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +71 -71
  101. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
  102. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
  103. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +3 -3
  104. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +88 -76
  105. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  106. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  107. package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +2 -2
  108. package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +57 -45
  109. package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
  110. package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  111. package/.next/standalone/.next/server/app-paths-manifest.json +2 -0
  112. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +5 -5
  113. package/.next/standalone/.next/server/chunks/0zjb_server_app_api_internal_terminal_[taskId]_resume_route_actions_0uascj..js +3 -0
  114. package/.next/standalone/.next/server/chunks/0zjb_server_app_api_internal_terminal_[taskId]_stop_route_actions_0r3bvc-.js +3 -0
  115. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.tbb~k._.js +3 -0
  116. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05zlbau._.js +4 -0
  117. package/.next/standalone/.next/server/chunks/[root-of-the-server]__06qz5fz._.js +4 -0
  118. package/.next/standalone/.next/server/chunks/[root-of-the-server]__075f7rs._.js +4 -0
  119. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08b~~wj._.js +3 -0
  120. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__037x-0a._.js → [root-of-the-server]__0askhfg._.js} +4 -4
  121. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__04u7b2g._.js → [root-of-the-server]__0bo_6v~._.js} +2 -2
  122. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e~6fr~._.js +3 -0
  123. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0kexk71._.js → [root-of-the-server]__0fxmnch._.js} +3 -3
  124. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gr~8aq._.js +3 -0
  125. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0hd.0to._.js +3 -0
  126. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0g2lv9x._.js → [root-of-the-server]__0j3l3l4._.js} +2 -2
  127. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0fp8qv9._.js → [root-of-the-server]__0obk~80._.js} +2 -2
  128. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__05nz.tg._.js → [root-of-the-server]__0skk0fd._.js} +2 -2
  129. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0ag-i9m._.js → [root-of-the-server]__0v2nkck._.js} +2 -2
  130. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~6py0f._.js +4 -0
  131. package/.next/standalone/.next/server/chunks/[root-of-the-server]__126b53k._.js +4 -0
  132. package/.next/standalone/.next/server/chunks/_0aflzks._.js +7 -0
  133. package/.next/standalone/.next/server/chunks/_0b~hjvi._.js +7 -0
  134. package/.next/standalone/.next/server/chunks/_0qk_esg._.js +4 -0
  135. package/.next/standalone/.next/server/chunks/src_02ruq-1._.js +1 -1
  136. package/.next/standalone/.next/server/chunks/src_07gek7k._.js +3 -0
  137. package/.next/standalone/.next/server/chunks/src_0mqkaid._.js +3 -0
  138. package/.next/standalone/.next/server/chunks/src_actions_agent-actions_ts_10q9r5b._.js +4 -0
  139. package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
  140. package/.next/standalone/.next/server/chunks/ssr/{0ws9_lucide-react_dist_esm_icons_10_90yo._.js → 0ws9_lucide-react_dist_esm_icons_0pkla8j._.js} +2 -2
  141. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.-z9ts._.js +1 -1
  142. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__038u_kv._.js +3 -3
  143. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__045k323._.js +3 -0
  144. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04wbr9x._.js +1 -1
  145. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__058rbx5._.js +3 -3
  146. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05xg05r._.js +1 -1
  147. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__087pocz._.js +3 -0
  148. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0c2mh1c._.js +47 -0
  149. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ce3fpq._.js +3 -3
  150. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dsaqeq._.js +3 -0
  151. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gt5dbj._.js +3 -0
  152. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h-se8t._.js +3 -0
  153. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h589~0._.js +3 -3
  154. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
  155. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0oq-j16._.js +3 -3
  156. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0whlq2_._.js +4 -0
  157. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
  158. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__10s67lq._.js +3 -3
  159. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12w35bx._.js +3 -3
  160. package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
  161. package/.next/standalone/.next/server/chunks/ssr/_03lt1_x._.js +3 -3
  162. package/.next/standalone/.next/server/chunks/ssr/_04~zqvy._.js +3 -3
  163. package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
  164. package/.next/standalone/.next/server/chunks/ssr/{_0_z-t6g._.js → _08bq4g8._.js} +2 -2
  165. package/.next/standalone/.next/server/chunks/ssr/{_0t863nl._.js → _09z2zmm._.js} +1 -1
  166. package/.next/standalone/.next/server/chunks/ssr/_0_5abui._.js +3 -0
  167. package/.next/standalone/.next/server/chunks/ssr/_0axcfvf._.js +3 -0
  168. package/.next/standalone/.next/server/chunks/ssr/_0c2gong._.js +3 -0
  169. package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
  170. package/.next/standalone/.next/server/chunks/ssr/{_0ecu98s._.js → _0dye20y._.js} +2 -2
  171. package/.next/standalone/.next/server/chunks/ssr/{_0dzx554._.js → _0f~l8kv._.js} +3 -3
  172. package/.next/standalone/.next/server/chunks/ssr/{_04mn9go._.js → _0m.wslt._.js} +2 -2
  173. package/.next/standalone/.next/server/chunks/ssr/_0o2tntr._.js +3 -0
  174. package/.next/standalone/.next/server/chunks/ssr/_0p6p_68._.js +3 -3
  175. package/.next/standalone/.next/server/chunks/ssr/{_0u_uywm._.js → _0q2mf9q._.js} +1 -1
  176. package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
  177. package/.next/standalone/.next/server/chunks/ssr/{_0_6ss3p._.js → _0rq68d8._.js} +2 -2
  178. package/.next/standalone/.next/server/chunks/ssr/{_0hh17jg._.js → _0rxeqmo._.js} +2 -2
  179. package/.next/standalone/.next/server/chunks/ssr/{_0tsu0gq._.js → _0u.n7v8._.js} +2 -2
  180. package/.next/standalone/.next/server/chunks/ssr/_0u7c6bz._.js +3 -3
  181. package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
  182. package/.next/standalone/.next/server/chunks/ssr/_0whlnt7._.js +3 -0
  183. package/.next/standalone/.next/server/chunks/ssr/_0~oc5bl._.js +3 -0
  184. package/.next/standalone/.next/server/chunks/ssr/_116-_2z._.js +3 -0
  185. package/.next/standalone/.next/server/chunks/ssr/_12ca88g._.js +3 -3
  186. package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
  187. package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
  188. package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +2 -2
  189. package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
  190. package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
  191. package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
  192. package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
  193. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
  194. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
  195. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_notes_notes-page-client_tsx_10gyo3v._.js +1 -1
  196. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
  197. package/.next/standalone/.next/server/chunks/ssr/src_components_ui_select_tsx_0d2ra01._.js +1 -1
  198. package/.next/standalone/.next/server/chunks/ssr/{src_lib_11w~.ge._.js → src_lib_0x6grav._.js} +1 -1
  199. package/.next/standalone/.next/server/functions-config-manifest.json +2 -0
  200. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  201. package/.next/standalone/.next/server/pages/500.html +1 -1
  202. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  203. package/.next/standalone/.next/server/server-reference-manifest.json +345 -303
  204. package/.next/standalone/.next/static/chunks/0-efd~h5j2ufi.js +1 -0
  205. package/.next/standalone/.next/static/chunks/{0fz47g1x5o2xj.js → 0.onaugl2w8ci.js} +1 -1
  206. package/.next/standalone/.next/static/chunks/{0ad0ou7l2.r6e.js → 0.wxa05y455w7.js} +1 -1
  207. package/.next/standalone/.next/static/chunks/0.z171pzeg-.7.js +1 -0
  208. package/.next/standalone/.next/static/chunks/01zlxs4rl~h_o.js +1 -0
  209. package/.next/standalone/.next/static/chunks/{05zm_-7x0fubq.js → 02f8-ju2se8qw.js} +1 -1
  210. package/.next/standalone/.next/static/chunks/{03sdutmq6~3v-.js → 035a_v6g7ioyw.js} +1 -1
  211. package/.next/standalone/.next/static/chunks/{02o~o8tgt860j.js → 040j8d.w8mkyn.js} +1 -1
  212. package/.next/standalone/.next/static/chunks/0_d04kox03m72.css +1 -0
  213. package/.next/standalone/.next/static/chunks/0af7afat3acfx.js +1 -0
  214. package/.next/standalone/.next/static/chunks/0ais32-8.3wlj.js +1 -0
  215. package/.next/standalone/.next/static/chunks/{12rj7-g8lxjew.js → 0bdwzhoelky9-.js} +1 -1
  216. package/.next/standalone/.next/static/chunks/{0.65.u3zhwau~.js → 0clewc5ifaruu.js} +1 -1
  217. package/.next/standalone/.next/static/chunks/0dewfthzwmcwb.js +1 -0
  218. package/.next/standalone/.next/static/chunks/0f43x~jzb70f4.js +1 -0
  219. package/.next/standalone/.next/static/chunks/{0v.l5.sqos562.js → 0i-x__600fys6.js} +1 -1
  220. package/.next/standalone/.next/static/chunks/0lyq0-a32.15m.js +1 -0
  221. package/.next/standalone/.next/static/chunks/{06s-d8my6b9t7.js → 0m~m1~si.ot17.js} +1 -1
  222. package/.next/standalone/.next/static/chunks/{0tfmi08mzcieh.js → 0rozlwh3y46l0.js} +1 -1
  223. package/.next/standalone/.next/static/chunks/0t8lz62rmr801.js +2 -0
  224. package/.next/standalone/.next/static/chunks/0utrquxfg25b2.js +1 -0
  225. package/.next/standalone/.next/static/chunks/0wcdxs4sl-gjf.js +1 -0
  226. package/.next/standalone/.next/static/chunks/0wcwdbtpm0~r6.js +1 -0
  227. package/.next/standalone/.next/static/chunks/{0i2soupf1735z.js → 0x-ug4iz~~qr2.js} +1 -1
  228. package/.next/standalone/.next/static/chunks/0xj6v_80hlyv0.js +1 -0
  229. package/.next/standalone/.next/static/chunks/0xl7h5fsfc7zk.js +1 -0
  230. package/.next/standalone/.next/static/chunks/{11sqt~58g35be.js → 0ypd9eqm_pj-o.js} +1 -1
  231. package/.next/standalone/.next/static/chunks/115ae91fq~slq.js +1 -0
  232. package/.next/standalone/.next/static/chunks/{1195ux3t_r-rb.js → 13.3woq55msp..js} +1 -1
  233. package/.next/standalone/.next/static/chunks/17fug-zaik-v~.js +1 -0
  234. package/.next/standalone/.next/static/chunks/{0v8apmh_d7lz3.js → 17m4o~gdsvuo3.js} +1 -1
  235. package/.next/standalone/package.json +1 -1
  236. package/README.md +25 -3
  237. package/README.zh.md +25 -3
  238. package/dist/mcp-server.cjs +115 -0
  239. package/package.json +1 -1
  240. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +0 -4
  241. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.z8.oi._.js +0 -4
  242. package/.next/standalone/.next/server/chunks/[root-of-the-server]__02jy80j._.js +0 -4
  243. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0az764e._.js +0 -3
  244. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0giry~0._.js +0 -3
  245. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kuo6q5._.js +0 -4
  246. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0np.553._.js +0 -4
  247. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0u_-4~7._.js +0 -3
  248. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08w4.zf._.js +0 -3
  249. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0da~mv~._.js +0 -47
  250. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dn90me._.js +0 -3
  251. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gtqd5o._.js +0 -4
  252. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0nwisa8._.js +0 -3
  253. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w--i~y._.js +0 -3
  254. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zkpwjj._.js +0 -3
  255. package/.next/standalone/.next/server/chunks/ssr/_0-_yznx._.js +0 -43
  256. package/.next/standalone/.next/server/chunks/ssr/_03v~rg0._.js +0 -3
  257. package/.next/standalone/.next/server/chunks/ssr/_0_9i_x2._.js +0 -3
  258. package/.next/standalone/.next/server/chunks/ssr/_0b.qjaj._.js +0 -3
  259. package/.next/standalone/.next/server/chunks/ssr/_0mdqhxi._.js +0 -3
  260. package/.next/standalone/.next/server/chunks/ssr/_0r-flc_._.js +0 -3
  261. package/.next/standalone/.next/server/chunks/ssr/_0rkdyad._.js +0 -3
  262. package/.next/standalone/.next/server/chunks/ssr/_0z6ji0d._.js +0 -3
  263. package/.next/standalone/.next/static/chunks/0-x5eie9u3i_2.js +0 -1
  264. package/.next/standalone/.next/static/chunks/00w9dd4fooyic.js +0 -1
  265. package/.next/standalone/.next/static/chunks/04zy.uc7eru64.js +0 -1
  266. package/.next/standalone/.next/static/chunks/05~2gwcex7hv0.js +0 -1
  267. package/.next/standalone/.next/static/chunks/062.w.nsp3886.js +0 -1
  268. package/.next/standalone/.next/static/chunks/0651zmy-w~saj.js +0 -1
  269. package/.next/standalone/.next/static/chunks/06lla3jtd~xb4.js +0 -1
  270. package/.next/standalone/.next/static/chunks/0babmd83h6ejs.js +0 -1
  271. package/.next/standalone/.next/static/chunks/0c8c6pcmlzgmi.js +0 -1
  272. package/.next/standalone/.next/static/chunks/0c~~56wny5m2u.js +0 -1
  273. package/.next/standalone/.next/static/chunks/0ev98toavtr6..js +0 -1
  274. package/.next/standalone/.next/static/chunks/0lnsj7fwkprxe.js +0 -1
  275. package/.next/standalone/.next/static/chunks/0oz8sw6j078vm.js +0 -2
  276. package/.next/standalone/.next/static/chunks/0umi7ddtiv8sw.js +0 -1
  277. package/.next/standalone/.next/static/chunks/0w33dj~dfamnr.css +0 -1
  278. package/.next/standalone/.next/static/chunks/0y3a2-c-i9t~t.js +0 -1
  279. package/.next/standalone/.next/static/chunks/10qltt-r5q91p.js +0 -1
  280. /package/.next/standalone/.next/static/{zSKVtiYaR_yWxx7AopTMR → LCBoYZWhXzs8PjuBmxw7g}/_buildManifest.js +0 -0
  281. /package/.next/standalone/.next/static/{zSKVtiYaR_yWxx7AopTMR → LCBoYZWhXzs8PjuBmxw7g}/_clientMiddlewareManifest.js +0 -0
  282. /package/.next/standalone/.next/static/{zSKVtiYaR_yWxx7AopTMR → LCBoYZWhXzs8PjuBmxw7g}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,645119,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(538059),n=e.i(210702),a=e.i(232545),i=e.i(487278),l=e.i(368490),o=e.i(259846),d=e.i(572989);let c=(0,d.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var x=e.i(519455),m=e.i(759684),u=e.i(606393),p=e.i(226145),h=e.i(340873),f=e.i(263938),g=e.i(960518),v=e.i(453889),j=e.i(645378);let b=(0,d.default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var N=e.i(464249);let y=(0,d.default)("package-check",[["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m16 17 2 2 4-4",key:"uh5qu3"}],["path",{d:"M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753",key:"kpkbpo"}],["path",{d:"M3.29 7 12 12l8.71-5",key:"19ckod"}],["path",{d:"m7.5 4.27 8.997 5.148",key:"9yrvtv"}]]),w=(0,d.default)("panel-right",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);var C=e.i(746798),S=e.i(685149),k=e.i(35967),D=e.i(533499);function T(e){if(!e)return"";let t="string"==typeof e?new Date(e):e;if(isNaN(t.getTime()))return"";let s=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${s}-${r}`}let B=Object.fromEntries(S.BOARD_COLUMNS.map(e=>[e.id,e.color]));function E({children:e,className:s}){return(0,t.jsx)("span",{className:`inline-flex items-center gap-1.5 rounded-md border border-border bg-muted/40 px-2 py-0.5 text-xs text-muted-foreground ${s??""}`,children:e})}function I({task:e,onOpenDetail:r}){let{t:n}=(0,D.useI18n)(),[a,i]=(0,s.useState)(!1),o="CANCELLED"===e.status?"text-muted-foreground line-through decoration-muted-foreground/40":"DONE"===e.status?"text-muted-foreground":"text-foreground";return(0,t.jsxs)("div",{className:"rounded-[10px]",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>i(e=>!e),className:"flex w-full items-center gap-2.5 rounded-[10px] px-2.5 py-2.5 text-left transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsx)(l.ChevronRight,{className:`h-3.5 w-3.5 flex-none text-muted-foreground/60 transition-transform duration-150 ${a?"rotate-90":""}`}),(0,t.jsx)("span",{className:`h-2 w-2 flex-none rounded-full ${B[e.status]??"bg-slate-400"}`}),(0,t.jsx)("span",{className:`text-[13.5px] font-medium ${o}`,children:e.title}),e.labels.map(({label:e})=>(0,t.jsx)("span",{className:"rounded-full border border-border px-1.5 py-px text-[10.5px] text-muted-foreground",style:e.color?{borderColor:e.color+"55",color:e.color}:void 0,children:e.name},e.id)),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)("span",{className:"flex w-16 flex-none justify-center",children:(0,t.jsx)("span",{className:`rounded-[5px] px-1.5 py-px text-[10.5px] font-bold ${S.PRIORITY_CONFIG[e.priority]?.color??S.PRIORITY_CONFIG.LOW.color}`,children:e.priority})}),(0,t.jsx)("span",{className:"h-3 w-px bg-border flex-none"}),(0,t.jsxs)("span",{className:"flex w-[72px] flex-none items-center gap-1.5",children:[(0,t.jsx)("span",{className:`h-1.5 w-1.5 flex-none rounded-full ${B[e.status]??"bg-slate-400"}`}),(0,t.jsx)("span",{className:"truncate text-[10.5px] text-muted-foreground",children:n(`version.taskStatus.${e.status}`)})]}),(0,t.jsx)("span",{className:"h-3 w-px bg-border flex-none"}),(0,t.jsx)("span",{className:"flex w-6 flex-none justify-center",children:r&&(0,t.jsxs)(C.Tooltip,{children:[(0,t.jsx)(C.TooltipTrigger,{render:(0,t.jsx)(x.Button,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground",onClick:t=>{t.stopPropagation(),r(e.id)}}),children:(0,t.jsx)(w,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(C.TooltipContent,{children:n("version.detail")})]})})]}),a&&(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 pb-3 pl-[30px] pr-3 pt-1",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(v.FolderOpen,{className:"h-3 w-3 text-muted-foreground/60"}),(0,t.jsx)("span",{className:"text-[11px] font-bold uppercase tracking-wide text-muted-foreground/60",children:n("version.resources")})]}),0===e.assets.length?(0,t.jsx)("p",{className:"text-[12px] italic text-muted-foreground/60",children:n("version.empty.resources")}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.assets.map(e=>{var s;let r=e.mimeType?.startsWith("image/");return(0,t.jsxs)("span",{className:"inline-flex cursor-pointer items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-[12px] text-foreground shadow-sm transition-colors hover:border-primary/50",children:[r?(0,t.jsx)(b,{className:"h-3.5 w-3.5 text-muted-foreground"}):(0,t.jsx)(j.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("span",{children:e.filename}),null!=e.size&&(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground/60",children:(s=e.size)<1024?`${s} B`:s<1048576?`${Math.round(s/1024)} KB`:`${(s/1048576).toFixed(1)} MB`})]},e.id)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(j.FileText,{className:"h-3 w-3 text-muted-foreground/60"}),(0,t.jsx)("span",{className:"text-[11px] font-bold uppercase tracking-wide text-muted-foreground/60",children:n("version.notes")})]}),0===e.notes.length?(0,t.jsx)("p",{className:"text-[12px] italic text-muted-foreground/60",children:n("version.empty.notes")}):(0,t.jsx)("div",{className:"flex flex-col gap-1.5",children:e.notes.map(e=>(0,t.jsx)("div",{className:"rounded-lg border border-border border-l-violet-500/50 bg-background px-2.5 py-2 shadow-sm [border-left-width:3px]",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[12.5px] font-semibold text-foreground",children:e.title}),e.category&&(0,t.jsx)("span",{className:"rounded-[5px] border border-violet-500/30 bg-violet-500/15 px-1.5 py-px text-[10px] font-bold text-violet-300",children:e.category})]})},e.id))})]})]})]})}function L({version:e,diffStat:r,onEdit:n,onRelease:a,onViewDiff:i,onOpenTaskDetail:o}){var d;let c,{t:m}=(0,D.useI18n)(),[v,j]=(0,s.useState)(e.isCurrent),b="RELEASED"===e.status,w="ACTIVE"===e.status,S=e.tasks.length,B=e.tasks.filter(e=>"DONE"===e.status).length,R=!!(e.releaseCommit||r),$=(c=`${S} ${m("version.tasksCount")}`,B>0&&B<S?`${c} \xb7 ${B} ${m("version.doneCount")}`:B>0&&B===S?`${c} \xb7 ${m("version.allDone")}`:c);return(0,t.jsxs)("div",{className:["overflow-hidden rounded-[14px] border bg-card shadow-sm transition-shadow duration-150 hover:shadow-md",e.isCurrent?"border-border border-l-2 border-l-primary ring-1 ring-primary/20":"border-border",b?"opacity-[.96]":""].filter(Boolean).join(" "),children:[(0,t.jsx)("button",{type:"button",onClick:()=>j(e=>!e),className:"w-full text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsxs)("div",{className:"px-4 py-3.5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(l.ChevronRight,{className:`h-4 w-4 flex-none text-muted-foreground/60 transition-transform duration-150 ${v?"rotate-90":""}`}),(0,t.jsx)("span",{className:"font-mono text-[14.5px] font-bold text-foreground",children:e.number}),(0,t.jsx)("span",{className:"text-[14.5px] font-semibold text-foreground",children:e.name}),(0,t.jsx)(k.VersionTypeBadge,{name:e.type?.name??null}),(0,t.jsx)(k.VersionStatusBadge,{status:e.status}),e.isCurrent&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-primary/30 bg-primary/15 px-2.5 py-0.5 text-[11px] font-bold text-primary shadow-sm",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-primary opacity-90"}),m("version.current")]}),(0,t.jsx)("span",{className:"flex-1"}),S>0&&(0,t.jsx)("span",{className:"text-[11.5px] text-muted-foreground",children:$}),(0,t.jsxs)("span",{className:"flex items-center gap-1",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[n&&(0,t.jsxs)(C.Tooltip,{children:[(0,t.jsx)(C.TooltipTrigger,{render:(0,t.jsx)(x.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>n(e.id)}),children:(0,t.jsx)(N.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(C.TooltipContent,{children:m("version.edit")})]}),w&&a&&(0,t.jsxs)(x.Button,{variant:"outline",className:"h-7 px-2 text-xs font-semibold",onClick:()=>a(e.id),children:[(0,t.jsx)(y,{className:"h-3.5 w-3.5"}),m("version.release")]})]})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex flex-wrap items-center gap-2",children:[b&&e.releasedAt?(0,t.jsxs)(E,{children:[(0,t.jsx)(u.Calendar,{className:"h-3 w-3"}),m("version.releasedAt"),(0,t.jsx)("strong",{className:"text-foreground",children:T(e.releasedAt)})]}):e.startDate||e.targetDate?(0,t.jsxs)(E,{children:[(0,t.jsx)(u.Calendar,{className:"h-3 w-3"}),e.startDate?T(e.startDate):"—"," → ",e.targetDate?(0,t.jsx)("strong",{className:"text-foreground",children:T(e.targetDate)}):"—"]}):null,e.baseBranch&&(0,t.jsxs)(E,{children:[(0,t.jsx)(p.GitBranch,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-mono text-[11px] text-foreground",children:e.baseBranch})]}),e.baseCommit&&(0,t.jsxs)(E,{children:[(0,t.jsx)(h.GitCommitHorizontal,{className:"h-3 w-3"}),m("version.field.baseCommit"),(0,t.jsx)("span",{className:"font-mono text-[11px] text-foreground",children:(d=e.baseCommit)?d.slice(0,7):""})]}),b&&(0,t.jsxs)(E,{children:[(0,t.jsx)(f.Tag,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-mono text-[11px] text-foreground",children:e.number})]}),r&&(0,t.jsxs)(E,{children:[(0,t.jsx)(g.GitCompare,{className:"h-3 w-3"}),!b&&(0,t.jsx)("span",{className:"text-muted-foreground",children:m("version.diff.live")}),(0,t.jsxs)("span",{className:"font-bold text-emerald-400",children:["+",r.additions.toLocaleString()]}),(0,t.jsxs)("span",{className:"font-bold text-rose-400",children:["−",r.deletions.toLocaleString()]}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:["· ",r.files," ",m("version.diff.files")]})]}),R&&i&&(0,t.jsxs)(x.Button,{variant:"ghost",size:"sm",className:"h-6 gap-1 px-2 text-xs text-muted-foreground",onClick:t=>{t.stopPropagation(),i(e.id)},children:[(0,t.jsx)(g.GitCompare,{className:"h-3 w-3"}),m("version.diff.view")," →"]})]}),e.description&&(0,t.jsx)("p",{className:"mt-2 text-[13px] text-muted-foreground",children:e.description})]})}),v&&S>0&&(0,t.jsx)("div",{className:"border-t border-dashed border-border bg-muted/40 px-2 pb-2 pt-1.5",children:e.tasks.map(e=>(0,t.jsx)(I,{task:e,onOpenDetail:o},e.id))})]})}var R=e.i(360112),$=e.i(597746),_=e.i(456346),O=e.i(776639),A=e.i(793479),V=e.i(110204),P=e.i(967489),M=e.i(337822),F=e.i(317056),z=e.i(699375),U=e.i(624687),H=e.i(514798);let G=(0,H.createServerReference)("4043ff5a84972c7c2ddfeec3147ebf2ebff8945c16",H.callServer,void 0,H.findSourceMapURL,"createVersion"),K=(0,H.createServerReference)("60c607e708bae26458385379ad99da3c737194b662",H.callServer,void 0,H.findSourceMapURL,"updateVersion"),W=(0,H.createServerReference)("4081ee9c9a695196c6d3e70e0038201b8597cf6d5b",H.callServer,void 0,H.findSourceMapURL,"getVersionTypes");var Y=e.i(6138),q=e.i(279430),J=e.i(998626);let Q=(0,H.createServerReference)("40c779892dde01fe899f24bb278250b6a894fc0fd4",H.callServer,void 0,H.findSourceMapURL,"createVersionType"),X=(0,H.createServerReference)("600aa2ba48626ad0d43da5526025b52a5e4e9a28a8",H.callServer,void 0,H.findSourceMapURL,"updateVersionType"),Z=(0,H.createServerReference)("40246dc2f400ccc74a808f18f2f00baf7c638f4a77",H.callServer,void 0,H.findSourceMapURL,"deleteVersionType");function ee({open:e,onOpenChange:r,workspaceId:n,onChanged:a}){let{t:i}=(0,D.useI18n)(),[l,o]=(0,s.useState)([]),[d,c]=(0,s.useState)(""),[m,u]=(0,s.useState)({}),[p,h]=(0,s.useTransition)(),f=async()=>{let e=await W(n);o(e),u(t=>{let s={};return e.forEach(e=>{s[e.id]=e.id in t?t[e.id]:e.name}),s})};(0,s.useEffect)(()=>{e&&(f(),c(""))},[e,n]);let g=()=>{let e=d.trim();e&&h(async()=>{try{await Q({workspaceId:n,name:e}),c(""),await f(),a?.(),R.toast.success(i("version.type.add"))}catch(e){R.toast.error(e instanceof Error?e.message:String(e))}})};return(0,t.jsx)(O.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(O.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(O.DialogHeader,{children:(0,t.jsx)(O.DialogTitle,{children:i("version.manageTypes")})}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 py-2",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(A.Input,{value:d,onChange:e=>c(e.target.value),placeholder:i("version.type.namePlaceholder"),disabled:p,onKeyDown:e=>{"Enter"===e.key&&g()},className:"flex-1"}),(0,t.jsx)(x.Button,{onClick:g,disabled:p||!d.trim(),children:i("version.type.add")})]}),0===l.length?(0,t.jsx)("p",{className:"text-center text-sm text-muted-foreground py-4",children:i("version.type.empty")}):(0,t.jsx)("div",{className:"flex flex-col gap-1.5",children:l.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,t.jsx)("span",{className:`inline-flex h-2.5 w-2.5 flex-none rounded-full ${(0,k.typeBadgeColor)(m[e.id]??e.name).split(" ").filter(e=>e.startsWith("bg-"))[0]??"bg-muted"}`}),(0,t.jsx)(A.Input,{value:m[e.id]??e.name,onChange:t=>u(s=>({...s,[e.id]:t.target.value})),onBlur:()=>(e=>{let t=(m[e]??"").trim();if(!t)return;let s=l.find(t=>t.id===e);s?.name!==t&&h(async()=>{try{await X(e,{name:t}),await f(),a?.()}catch(t){R.toast.error(t instanceof Error?t.message:String(t)),u(t=>({...t,[e]:s?.name??""}))}})})(e.id),onKeyDown:e=>{"Enter"===e.key&&e.target.blur()},disabled:p,className:"h-7 flex-1 border-transparent bg-transparent shadow-none focus-visible:border-input focus-visible:bg-background focus-visible:shadow-sm"}),(0,t.jsx)(x.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 flex-none text-muted-foreground hover:text-destructive",onClick:()=>{var t;return t=e.id,void(window.confirm(i("version.type.deleteConfirm"))&&h(async()=>{try{await Z(t),await f(),a?.()}catch(e){R.toast.error(e instanceof Error?e.message:String(e))}}))},disabled:p,children:(0,t.jsx)(J.Trash2,{className:"h-3.5 w-3.5"})})]},e.id))})]})]})})}function et(e){if(!e)return"";let t="string"==typeof e?new Date(e):e;if(isNaN(t.getTime()))return"";let s=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0");return`${s}-${r}-${n}`}function es(e){if(!e)return;let t=new Date(e);return isNaN(t.getTime())?void 0:t}function er({open:e,onOpenChange:r,projectId:n,workspaceId:a,editVersion:i,defaultBaseBranch:l,projectLocalPath:o,onSuccess:d}){let{t:c}=(0,D.useI18n)(),m=!!i,[u,h]=(0,s.useState)(""),[f,g]=(0,s.useState)(""),[v,j]=(0,s.useState)(""),[b,N]=(0,s.useState)([]),[y,w]=(0,s.useState)(!1),[C,S]=(0,s.useState)(""),[k,T]=(0,s.useState)(""),[B,E]=(0,s.useState)(""),[I,L]=(0,s.useState)(""),[H,J]=(0,s.useState)(!1),[Q,X]=(0,s.useState)([]),[Z,en]=(0,s.useState)(!1),[ea,ei]=(0,s.useState)(!1),el=!!o,[eo,ed]=(0,s.useTransition)();return(0,s.useEffect)(()=>{e&&(i?(h(i.number),g(i.name),j(i.typeId??""),S(i.baseBranch??""),T(et(i.startDate)),E(et(i.targetDate)),L(i.description??"")):(h(""),g(""),j(""),S(l??""),T(""),E(""),L("")),J(!1))},[e,i,l]),(0,s.useEffect)(()=>{e&&W(a).then(N).catch(()=>N([]))},[e,a]),(0,s.useEffect)(()=>{e&&el?(en(!0),(0,Y.getProjectBranches)(o).then(X).catch(()=>X([])).finally(()=>en(!1)),(0,q.fetchRemoteBranches)(o).then(()=>(0,Y.getProjectBranches)(o).then(X)).catch(()=>{})):X([])},[e,el,o]),(0,t.jsxs)(O.Dialog,{open:e,onOpenChange:r,children:[(0,t.jsxs)(O.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(O.DialogHeader,{children:(0,t.jsx)(O.DialogTitle,{children:m?c("version.edit"):c("version.new")})}),(0,t.jsxs)("div",{className:"grid gap-4 py-2",children:[(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsxs)(V.Label,{htmlFor:"version-number",children:[c("version.field.number"),(0,t.jsx)("span",{className:"text-destructive ml-0.5",children:"*"})]}),(0,t.jsx)(A.Input,{id:"version-number",value:u,onChange:e=>h(e.target.value),placeholder:c("version.placeholder.number"),disabled:eo})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsxs)(V.Label,{htmlFor:"version-name",children:[c("version.field.name"),(0,t.jsx)("span",{className:"text-destructive ml-0.5",children:"*"})]}),(0,t.jsx)(A.Input,{id:"version-name",value:f,onChange:e=>g(e.target.value),placeholder:c("version.placeholder.name"),disabled:eo})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(V.Label,{children:c("version.field.type")}),(0,t.jsxs)(P.Select,{value:v||"__none__",onValueChange:e=>{j(e&&"__none__"!==e?e:"")},children:[(0,t.jsx)(P.SelectTrigger,{className:"w-full",disabled:eo,children:(0,t.jsx)("span",{className:"truncate",children:v?b.find(e=>e.id===v)?.name??c("version.type.uncategorized"):c("version.type.uncategorized")})}),(0,t.jsxs)(P.SelectContent,{children:[(0,t.jsx)(P.SelectItem,{value:"__none__",children:c("version.type.uncategorized")}),b.map(e=>(0,t.jsx)(P.SelectItem,{value:e.id,children:e.name},e.id))]})]}),(0,t.jsxs)(x.Button,{type:"button",variant:"ghost",size:"sm",className:"h-auto justify-start px-0 py-0.5 text-xs text-muted-foreground hover:text-foreground",onClick:()=>w(!0),disabled:eo,children:["+ ",c("version.manageTypes")]})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(V.Label,{children:c("version.field.baseBranch")}),Z?(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:c("task.branchLoading")}):el&&Q.length>0?(0,t.jsxs)(M.Popover,{open:ea,onOpenChange:ei,children:[(0,t.jsxs)(M.PopoverTrigger,{className:"flex h-8 w-full items-center gap-2 rounded-lg border border-input bg-transparent px-3 text-sm transition-colors hover:bg-accent focus:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50",disabled:eo,"data-testid":"version-branch-selector",children:[(0,t.jsx)(p.GitBranch,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:`flex-1 truncate text-left text-xs ${C?"font-mono":"text-muted-foreground"}`,title:C||void 0,children:C||c("version.field.noBranch")}),(0,t.jsx)(_.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,t.jsx)(M.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,t.jsxs)(F.Command,{children:[(0,t.jsx)(F.CommandInput,{placeholder:c("task.branchSearch")}),(0,t.jsxs)(F.CommandList,{children:[(0,t.jsx)(F.CommandEmpty,{children:c("task.branchNone")}),(0,t.jsxs)(F.CommandGroup,{children:[(0,t.jsxs)(F.CommandItem,{value:"__none__",onSelect:()=>{S(""),ei(!1)},children:[(0,t.jsx)("span",{className:"flex-1 truncate text-muted-foreground",children:c("version.field.noBranch")}),!C&&(0,t.jsx)($.Check,{className:"ml-auto h-3 w-3 shrink-0 text-primary"})]}),Q.map(e=>(0,t.jsxs)(F.CommandItem,{value:e,onSelect:()=>{S(e),ei(!1)},children:[(0,t.jsx)(p.GitBranch,{className:"mr-2 h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono",title:e,children:e}),e===C&&(0,t.jsx)($.Check,{className:"ml-auto h-3 w-3 shrink-0 text-primary"})]},e))]})]})]})})]}):(0,t.jsx)(A.Input,{id:"version-base-branch",value:C,onChange:e=>S(e.target.value),placeholder:"main",disabled:eo})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(V.Label,{htmlFor:"version-start-date",children:c("version.field.startDate")}),(0,t.jsx)("input",{id:"version-start-date",type:"date",value:k,onChange:e=>T(e.target.value),disabled:eo,className:"h-8 w-full rounded-lg border border-input bg-transparent px-2.5 py-1 text-sm outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50"})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(V.Label,{htmlFor:"version-target-date",children:c("version.field.targetDate")}),(0,t.jsx)("input",{id:"version-target-date",type:"date",value:B,onChange:e=>E(e.target.value),disabled:eo,className:"h-8 w-full rounded-lg border border-input bg-transparent px-2.5 py-1 text-sm outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50"})]})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(V.Label,{htmlFor:"version-description",children:c("version.field.description")}),(0,t.jsx)(U.Textarea,{id:"version-description",value:I,onChange:e=>L(e.target.value),rows:3,disabled:eo})]}),!m&&(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(z.Switch,{id:"version-set-current",checked:H,onCheckedChange:J,disabled:eo}),(0,t.jsx)(V.Label,{htmlFor:"version-set-current",className:"cursor-pointer",children:c("version.field.setCurrent")})]})]}),(0,t.jsxs)(O.DialogFooter,{children:[(0,t.jsx)(x.Button,{variant:"outline",onClick:()=>r(!1),disabled:eo,children:c("common.cancel")}),(0,t.jsx)(x.Button,{onClick:()=>{u.trim()&&f.trim()&&ed(async()=>{try{m&&i?await K(i.id,{number:u.trim(),name:f.trim(),typeId:v||null,baseBranch:C.trim()||null,startDate:es(k)??null,targetDate:es(B)??null,description:I.trim()||null}):await G({projectId:n,number:u.trim(),name:f.trim(),typeId:v||void 0,baseBranch:C.trim()||void 0,startDate:es(k),targetDate:es(B),description:I.trim()||void 0,setCurrent:H}),R.toast.success(m?c("version.edit"):c("version.new")),r(!1),d?.()}catch(e){R.toast.error(e instanceof Error?e.message:String(e))}})},disabled:eo||!u.trim()||!f.trim(),children:m?c("common.save"):c("common.create")})]})]}),(0,t.jsx)(ee,{open:y,onOpenChange:w,workspaceId:a,onChanged:()=>W(a).then(N)})]})}let en=(0,H.createServerReference)("60c83673486198449864e4d0427d473a3d723d4daf",H.callServer,void 0,H.findSourceMapURL,"releaseVersion");function ea({open:e,onOpenChange:r,version:n,candidates:a,onSuccess:i}){let{t:l}=(0,D.useI18n)(),[o,d]=(0,s.useState)(""),[c,m]=(0,s.useTransition)();(0,s.useEffect)(()=>{e&&d("")},[e,n]);let u=a.find(e=>e.id===o),p=a.length>0,h=p&&!!o&&!c;return(0,t.jsx)(O.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(O.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(O.DialogHeader,{children:(0,t.jsx)(O.DialogTitle,{children:l("version.releaseAction")})}),(0,t.jsxs)("div",{className:"grid gap-4 py-2",children:[n&&(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:[n.number," · ",n.name]}),(0,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsx)("span",{children:l("version.release.rolloverHint")}),n?.unfinishedCount!==void 0&&n.unfinishedCount>0&&(0,t.jsxs)("span",{className:"ml-1 font-medium text-foreground",children:["(",n.unfinishedCount,")"]})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:l("version.release.nextVersion")}),p?(0,t.jsxs)(P.Select,{value:o,onValueChange:e=>{e&&d(e)},disabled:c,children:[(0,t.jsx)(P.SelectTrigger,{className:"w-full",children:(0,t.jsx)("span",{className:"truncate",children:u?`${u.number} \xb7 ${u.name}`:""})}),(0,t.jsx)(P.SelectContent,{children:a.map(e=>(0,t.jsxs)(P.SelectItem,{value:e.id,children:[e.number," · ",e.name]},e.id))})]}):(0,t.jsx)("p",{className:"text-xs text-destructive",children:l("version.release.noCandidates")})]})]}),(0,t.jsxs)(O.DialogFooter,{children:[(0,t.jsx)(x.Button,{variant:"outline",onClick:()=>r(!1),disabled:c,children:l("common.cancel")}),(0,t.jsx)(x.Button,{onClick:()=>{n&&o&&m(async()=>{try{await en(n.id,o),R.toast.success(l("version.release")),r(!1),i?.()}catch(e){R.toast.error(e instanceof Error?e.message:String(e))}})},disabled:!h,children:l("version.release")})]})]})})}var ei=e.i(400355);let el=(0,H.createServerReference)("408b7eafacb1268ff3a626f14508f7dd2d4fcd84eb",H.callServer,void 0,H.findSourceMapURL,"getVersionDiff");var eo=e.i(196199);function ed({file:e}){let{t:r}=(0,D.useI18n)(),[n,a]=(0,s.useState)(!0),i=e.to&&"/dev/null"!==e.to?e.to:e.from??"",o=e.additions??0,d=e.deletions??0,c=[];for(let t of e.chunks)for(let e of(c.push({type:"normal",content:t.content,chunkHeader:t.content}),t.changes))c.push({type:e.type,content:e.content});let x=c.length>500,m=x?c.slice(0,500):c;return(0,t.jsxs)("div",{className:"overflow-hidden rounded-[10px] border border-border",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>a(e=>!e),className:"flex w-full items-center gap-2 bg-muted/40 px-3 py-2 text-left transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsx)(l.ChevronRight,{className:`h-3.5 w-3.5 flex-none text-muted-foreground/60 transition-transform duration-150 ${n?"rotate-90":""}`}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono text-[12px] font-medium text-foreground",children:i}),(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] font-bold text-emerald-400",children:["+",o]}),(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] font-bold text-rose-400",children:["−",d]})]}),n&&(0,t.jsxs)("div",{className:"overflow-x-auto",children:[(0,t.jsx)("pre",{className:"m-0 p-0",children:m.map((e,s)=>void 0!==e.chunkHeader?(0,t.jsx)("div",{className:"whitespace-pre px-3 py-px font-mono text-xs text-muted-foreground bg-muted/40",children:e.content},s):"add"===e.type?(0,t.jsx)("div",{className:"whitespace-pre px-3 py-px font-mono text-xs text-emerald-300 bg-emerald-500/10",children:e.content},s):"del"===e.type?(0,t.jsx)("div",{className:"whitespace-pre px-3 py-px font-mono text-xs text-rose-300 bg-rose-500/10",children:e.content},s):(0,t.jsx)("div",{className:"whitespace-pre px-3 py-px font-mono text-xs text-muted-foreground",children:e.content},s))}),x&&(0,t.jsx)("p",{className:"border-t border-border px-3 py-2 text-[11px] text-muted-foreground/70 italic",children:r("version.diff.truncated")})]})]})}function ec({open:e,onOpenChange:r,versionId:n,versionLabel:a}){let{t:i}=(0,D.useI18n)(),[l,o]=(0,s.useTransition)(),[d,c]=(0,s.useState)(null),[x,m]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{e&&n&&(c(null),m(!1),o(async()=>{let e=await el(n);if(!e)return void m(!0);let t=(0,eo.parseUnifiedDiff)(e.patch);0===t.length||""===e.patch?m(!0):c(t)}))},[e,n]),(0,t.jsx)(O.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(O.DialogContent,{className:"sm:max-w-3xl max-h-[80vh] overflow-auto",children:[(0,t.jsx)(O.DialogHeader,{children:(0,t.jsxs)(O.DialogTitle,{children:[i("version.diff.title"),a?` — ${a}`:""]})}),l&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-12 text-muted-foreground",children:[(0,t.jsx)(ei.Loader2,{className:"h-5 w-5 animate-spin"}),(0,t.jsx)("span",{className:"text-sm",children:i("version.diff.loading")})]}),!l&&x&&(0,t.jsx)("p",{className:"py-10 text-center text-sm text-muted-foreground",children:i("version.diff.empty")}),!l&&d&&d.length>0&&(0,t.jsx)("div",{className:"flex flex-col gap-2",children:d.map((e,s)=>(0,t.jsx)(ed,{file:e},s))})]})})}var ex=e.i(605005),em=e.i(889620);function eu({version:e,isFirst:s,isLast:r,dashed:n=!1,diffStat:a,onEdit:i,onRelease:l,onViewDiff:o,onOpenTaskDetail:d}){return(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsxs)("div",{className:"relative flex w-5 flex-none flex-col items-center",children:[(0,t.jsx)("div",{className:["w-px flex-none",s?"h-0":"h-6",n?"bg-[repeating-linear-gradient(to_bottom,var(--border)_0_4px,transparent_4px_8px)]":"bg-border"].filter(Boolean).join(" ")}),(0,t.jsx)("div",{className:["z-10 h-3.5 w-3.5 flex-none rounded-full border-2",e.isCurrent?"border-primary bg-primary ring-2 ring-primary/30":"ACTIVE"===e.status?"border-emerald-400 bg-emerald-400":"RELEASED"===e.status?"border-zinc-500 bg-zinc-500":"border-muted-foreground/40 bg-transparent border-dashed"].join(" ")}),!r&&(0,t.jsx)("div",{className:["w-px flex-1",n?"bg-[repeating-linear-gradient(to_bottom,var(--border)_0_4px,transparent_4px_8px)]":"bg-border"].join(" ")})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 pb-5",children:(0,t.jsx)(L,{version:e,diffStat:a??null,onEdit:i,onRelease:l,onViewDiff:o,onOpenTaskDetail:d})})]})}e.s(["VersionTimelineClient",0,function({project:e,workspaceId:d,versions:u,diffStats:p,backlog:h}){let f,{t:g}=(0,D.useI18n)(),v=(0,r.useRouter)();(0,s.useEffect)(()=>{(0,em.setLastProjectId)(d,e.id)},[d,e.id]);let[j,b]=(0,s.useState)(!1),[N,y]=(0,s.useState)(null),[w,C]=(0,s.useState)(!1),[S,k]=(0,s.useState)(!1),[T,B]=(0,s.useState)(null),[E,L]=(0,s.useState)(null),[R,$]=(0,s.useState)(null),[_,O]=(0,s.useState)(!1),A=[...[...u.filter(e=>"RELEASED"!==e.status)].sort((e,t)=>{if(!e.targetDate&&!t.targetDate)return 0;if(!e.targetDate)return 1;if(!t.targetDate)return -1;let s=new Date(t.targetDate).getTime()-new Date(e.targetDate).getTime();return 0!==s?s:new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()}),...[...u.filter(e=>"RELEASED"===e.status)].sort((e,t)=>e.releasedAt||t.releasedAt?e.releasedAt?t.releasedAt?new Date(t.releasedAt).getTime()-new Date(e.releasedAt).getTime():-1:1:0)],V=e=>{let t=u.find(t=>t.id===e);t&&(y({id:t.id,number:t.number,name:t.name,typeId:t.typeId??null,baseBranch:t.baseBranch,startDate:t.startDate,targetDate:t.targetDate,description:t.description}),b(!0))},P=e=>{let t=u.find(t=>t.id===e);t&&(B(t),k(!0))},M=e=>{L(e)},F=()=>{y(null),b(!0)},z=()=>{v.refresh()},U=T?u.filter(e=>e.id!==T.id&&("PLANNED"===e.status||"ACTIVE"===e.status)).map(e=>({id:e.id,number:e.number,name:e.name})):[],H=T?T.tasks.filter(e=>"DONE"!==e.status&&"CANCELLED"!==e.status).length:void 0;return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsxs)("div",{className:"header-xl flex shrink-0 items-center gap-4 border-b px-6",children:[(0,t.jsxs)(n.default,{href:`/workspaces/${d}?projectId=${e.id}`,className:"flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[(0,t.jsx)(o.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:g("archive.backToBoard")})]}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{className:"truncate font-medium",children:e.name}),(0,t.jsx)("span",{children:"/"}),(0,t.jsx)("span",{children:g("version.timeline")})]}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground/70",children:g("version.historyHint")})]}),(0,t.jsxs)(x.Button,{variant:"outline",onClick:()=>C(!0),children:[(0,t.jsx)(c,{className:"h-4 w-4"}),g("version.manageTypes")]}),(0,t.jsxs)(x.Button,{onClick:F,children:[(0,t.jsx)(a.Plus,{className:"h-4 w-4"}),g("version.new")]})]}),(0,t.jsx)(m.ScrollArea,{className:"min-h-0 flex-1",children:(0,t.jsx)("div",{className:"px-6 py-6",children:(0,t.jsxs)("div",{className:"mx-auto max-w-3xl",children:[0===u.length&&0===h.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 py-20 text-center text-muted-foreground",children:[(0,t.jsx)("p",{className:"text-sm",children:g("version.empty.list")}),(0,t.jsxs)(x.Button,{variant:"outline",onClick:F,children:[(0,t.jsx)(a.Plus,{className:"h-4 w-4"}),g("version.new")]})]}),A.length>0&&(0,t.jsx)("div",{className:"relative",children:A.map((e,s)=>(0,t.jsx)(eu,{version:e,isFirst:0===s,isLast:s===A.length-1&&0===h.length,diffStat:p[e.id],onEdit:V,onRelease:P,onViewDiff:M,onOpenTaskDetail:$},e.id))}),h.length>0&&(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsxs)("div",{className:"relative flex w-5 flex-none flex-col items-center",children:[(0,t.jsx)("div",{className:"h-6 w-px bg-[repeating-linear-gradient(to_bottom,var(--border)_0_4px,transparent_4px_8px)]"}),(0,t.jsx)("div",{className:"z-10 h-3.5 w-3.5 flex-none rounded-full border-2 border-dashed border-muted-foreground/40 bg-transparent"})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 pb-5",children:(0,t.jsxs)("div",{className:"overflow-hidden rounded-[14px] border border-dashed bg-muted/40 shadow-sm",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>O(e=>!e),className:"w-full px-4 py-3 text-left transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)(l.ChevronRight,{className:`h-3.5 w-3.5 flex-none text-muted-foreground/60 transition-transform duration-150 ${_?"rotate-90":""}`}),(0,t.jsx)(i.Archive,{className:"h-4 w-4 flex-none text-muted-foreground/70"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-foreground",children:g("version.history")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:g("version.historySub")}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsxs)("span",{className:"text-[11.5px] text-muted-foreground",children:[h.length," ",g("version.tasksCount")]})]}),(0,t.jsx)("p",{className:"mt-2 text-xs text-muted-foreground/70",children:g("version.historyHint")})]}),_&&(0,t.jsx)("div",{className:"border-t border-dashed border-border px-2 pb-2 pt-1.5",children:h.map(e=>(0,t.jsx)(I,{task:e,onOpenDetail:$},e.id))})]})})]})]})})}),(0,t.jsx)(er,{open:j,onOpenChange:e=>{b(e),e||y(null)},projectId:e.id,workspaceId:d,editVersion:N,defaultBaseBranch:null,projectLocalPath:e.localPath,onSuccess:z}),(0,t.jsx)(ee,{open:w,onOpenChange:C,workspaceId:d,onChanged:()=>v.refresh()}),(0,t.jsx)(ea,{open:S,onOpenChange:e=>{k(e),e||B(null)},version:T?{id:T.id,number:T.number,name:T.name,unfinishedCount:H}:null,candidates:U,onSuccess:z}),(0,t.jsx)(ec,{open:!!E,onOpenChange:e=>{e||L(null)},versionId:E,versionLabel:E&&(f=u.find(e=>e.id===E))?`${f.number} ${f.name}`:void 0}),(0,t.jsx)(ex.TaskOverviewDrawer,{open:!!R,onOpenChange:e=>{e||$(null)},taskId:R})]})}],645119)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,967489,516358,e=>{"use strict";var t=e.i(289721);e.s([],648333),e.i(648333);var r=e.i(965652),n=e.i(416369),l=e.i(362891),o=e.i(903224),i=e.i(528796),s=e.i(314757),a=e.i(804849),u=e.i(887642),c=e.i(20746),d=e.i(812901),p=e.i(956741),f=e.i(430557),m=e.i(594640),g=e.i(592604),h=e.i(306296),v=e.i(234951),S=e.i(471959);e.i(708878);var b=e.i(462902);let x=r.createContext(null),y=r.createContext(null);function w(){let e=r.useContext(x);if(null===e)throw Error((0,b.default)(60));return e}function E(){let e=r.useContext(y);if(null===e)throw Error((0,b.default)(61));return e}var R=e.i(890514),M=e.i(103353),I=e.i(193214),A=e.i(596290);let C=(e,t)=>Object.is(e,t);function T(e,t,r){return null==e||null==t?Object.is(e,t):r(e,t)}function P(e,t,r){return e&&0!==e.length?e.findIndex(e=>void 0!==e&&T(e,t,r)):-1}function j(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}function V(e){return null!=e&&e.length>0&&"object"==typeof e[0]&&null!=e[0]&&"items"in e[0]}function L(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?j(e.value):j(e)}function k(e,t,r){function n(){if(r&&null!=e)return r(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return j(e)}if(r&&null!=e)return r(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return t[e]??n();if(Array.isArray(t)){let r=V(t)?t.flatMap(e=>e.items):t;if(null==e||"object"!=typeof e){let t=r.find(t=>t.value===e);return t&&null!=t.label?t.label:n()}if("value"in e){let t=r.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return n()}let O={id:(0,A.createSelector)(e=>e.id),labelId:(0,A.createSelector)(e=>e.labelId),modal:(0,A.createSelector)(e=>e.modal),multiple:(0,A.createSelector)(e=>e.multiple),items:(0,A.createSelector)(e=>e.items),itemToStringLabel:(0,A.createSelector)(e=>e.itemToStringLabel),itemToStringValue:(0,A.createSelector)(e=>e.itemToStringValue),isItemEqualToValue:(0,A.createSelector)(e=>e.isItemEqualToValue),value:(0,A.createSelector)(e=>e.value),hasSelectedValue:(0,A.createSelector)(e=>{let{value:t,multiple:r,itemToStringValue:n}=e;return null!=t&&(r&&Array.isArray(t)?t.length>0:""!==L(t,n))}),hasNullItemLabel:(0,A.createSelector)((e,t)=>!!t&&function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(V(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1}(e.items)),open:(0,A.createSelector)(e=>e.open),mounted:(0,A.createSelector)(e=>e.mounted),forceMount:(0,A.createSelector)(e=>e.forceMount),transitionStatus:(0,A.createSelector)(e=>e.transitionStatus),openMethod:(0,A.createSelector)(e=>e.openMethod),activeIndex:(0,A.createSelector)(e=>e.activeIndex),selectedIndex:(0,A.createSelector)(e=>e.selectedIndex),isActive:(0,A.createSelector)((e,t)=>e.activeIndex===t),isSelected:(0,A.createSelector)((e,t,r)=>{let n=e.isItemEqualToValue,l=e.value;return e.multiple?Array.isArray(l)&&l.some(e=>T(r,e,n)):e.selectedIndex===t&&null!==e.selectedIndex||T(r,l,n)}),isSelectedByFocus:(0,A.createSelector)((e,t)=>e.selectedIndex===t),popupProps:(0,A.createSelector)(e=>e.popupProps),triggerProps:(0,A.createSelector)(e=>e.triggerProps),triggerElement:(0,A.createSelector)(e=>e.triggerElement),positionerElement:(0,A.createSelector)(e=>e.positionerElement),listElement:(0,A.createSelector)(e=>e.listElement),scrollUpArrowVisible:(0,A.createSelector)(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:(0,A.createSelector)(e=>e.scrollDownArrowVisible),hasScrollArrows:(0,A.createSelector)(e=>e.hasScrollArrows)};var D=e.i(67077),U=e.i(586622),N=e.i(504068),H=e.i(571870),F=e.i(421689),B=e.i(954588),z=e.i(353052),_=e.i(892069),Y=e.i(565455),$=e.i(581263),q=e.i(551974),W=e.i(397791);let K=r.forwardRef(function(e,t){let{render:r,className:n,...l}=e;delete l.id;let o=(0,R.useFieldRootContext)(),{store:i}=w(),s=(0,d.useStore)(i,O.triggerElement),a=(0,d.useStore)(i,O.id),u=null==a?void 0:`${a}-label`,c=(0,W.useLabel)({id:u,fallbackControlId:s?.id??a,setLabelId(e){i.set("labelId",e)}});return(0,$.useRenderElement)("div",e,{ref:t,state:o.state,props:[c,l],stateAttributesMapping:q.fieldValidityMapping})});var X=e.i(102094),G=e.i(161476),J=e.i(179279),Q=e.i(845756),Z=e.i(748299),ee=e.i(682354),et=e.i(282109);let er={...Q.pressableTriggerOpenStateMapping,...q.fieldValidityMapping,value:()=>null},en=r.forwardRef(function(e,t){let{render:n,className:o,id:i,disabled:s=!1,nativeButton:a=!0,...p}=e,{setTouched:f,setFocused:m,validationMode:g,state:h,disabled:v}=(0,R.useFieldRootContext)(),{labelId:S}=(0,J.useLabelableContext)(),{store:b,setOpen:x,selectionRef:y,validation:E,readOnly:I,required:A,alignItemWithTriggerActiveRef:C,disabled:T,keyboardActiveRef:P}=w(),j=v||T||s,V=(0,d.useStore)(b,O.open),L=(0,d.useStore)(b,O.value),k=(0,d.useStore)(b,O.triggerProps),N=(0,d.useStore)(b,O.positionerElement),H=(0,d.useStore)(b,O.listElement),F=(0,d.useStore)(b,O.id),B=(0,d.useStore)(b,O.labelId),z=(0,d.useStore)(b,O.hasSelectedValue),_=!z&&V,q=(0,d.useStore)(b,O.hasNullItemLabel,_),W=i??F;(0,M.useLabelableId)({id:W});let K=(0,c.useValueAsRef)(N),Q=r.useRef(null),{getButtonProps:en,buttonRef:el}=(0,et.useButton)({disabled:j,native:a}),eo=(0,u.useStableCallback)(e=>{b.set("triggerElement",e)}),ei=(0,l.useMergedRefs)(t,Q,el,eo),es=(0,G.useTimeout)(),ea=(0,G.useTimeout)(),eu=(0,G.useTimeout)(),ec=(0,G.useTimeout)();r.useEffect(()=>{if(V)return z||q?ec.start(200,()=>{y.current.allowUnselectedMouseUp=!0,eu.start(200,()=>{y.current.allowSelectedMouseUp=!0})}):eu.start(400,()=>{y.current.allowUnselectedMouseUp=!0,y.current.allowSelectedMouseUp=!0}),()=>{eu.clear(),ec.clear()};y.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},ea.clear()},[V,z,q,y,ea,eu,ec]);let ed=r.useMemo(()=>H?.id??(0,ee.getFloatingFocusElement)(N)?.id,[H,N]),ep=(0,Y.mergeProps)(k,{id:W,role:"combobox","aria-expanded":V?"true":"false","aria-haspopup":"listbox","aria-controls":V?ed:void 0,"aria-labelledby":S??B,"aria-readonly":I||void 0,"aria-required":A||void 0,tabIndex:j?-1:0,ref:ei,onFocus(e){m(!0),V&&C.current&&x(!1,(0,D.createChangeEventDetails)(U.REASONS.none,e.nativeEvent)),es.start(0,()=>{b.set("forceMount",!0)})},onBlur(e){(0,ee.contains)(N,e.relatedTarget)||(f(!0),m(!1),"onBlur"===g&&E.commit(L))},onPointerMove(){P.current=!1},onKeyDown(){P.current=!0},onMouseDown(e){if(V)return;let t=(0,X.ownerDocument)(e.currentTarget);function r(e){if(!Q.current)return;let t=e.target;if((0,ee.contains)(Q.current,t)||(0,ee.contains)(K.current,t)||t===Q.current)return;let r=(0,Z.getPseudoElementBounds)(Q.current);e.clientX>=r.left-2&&e.clientX<=r.right+2&&e.clientY>=r.top-2&&e.clientY<=r.bottom+2||x(!1,(0,D.createChangeEventDetails)(U.REASONS.cancelOpen,e))}ea.start(0,()=>{t.addEventListener("mouseup",r,{once:!0})})}},E.getValidationProps,p,en);ep.role="combobox";let ef={...h,open:V,disabled:j,value:L,readOnly:I,placeholder:!z};return(0,$.useRenderElement)("button",e,{ref:[t,Q],state:ef,stateAttributesMapping:er,props:ep})}),el={value:()=>null},eo=r.forwardRef(function(e,n){let{className:l,render:o,children:i,placeholder:s,...a}=e,{store:u,valueRef:c}=w(),p=(0,d.useStore)(u,O.value),f=(0,d.useStore)(u,O.items),m=(0,d.useStore)(u,O.itemToStringLabel),g=(0,d.useStore)(u,O.hasSelectedValue),h=(0,d.useStore)(u,O.hasNullItemLabel,!g&&null!=s&&null==i),v=null;if("function"==typeof i)v=i(p);else if(null!=i)v=i;else if(g||null==s||h)if(Array.isArray(p))v=p.reduce((e,n,l)=>(l>0&&e.push(", "),e.push((0,t.jsx)(r.Fragment,{children:k(n,f,m)},l)),e),[]);else v=k(p,f,m);else v=s;return(0,$.useRenderElement)("span",e,{state:{value:p,placeholder:!g},ref:[n,c],props:[{children:v},a],stateAttributesMapping:el})}),ei=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),i=(0,d.useStore)(o,O.open);return(0,$.useRenderElement)("span",e,{state:{open:i},ref:t,props:[{"aria-hidden":!0,children:"▼"},l],stateAttributesMapping:Q.triggerOpenStateMapping})});var es=e.i(888393);let ea=r.createContext(void 0),eu=r.forwardRef(function(e,r){let{store:n}=w(),l=(0,d.useStore)(n,O.mounted),o=(0,d.useStore)(n,O.forceMount);return l||o?(0,t.jsx)(ea.Provider,{value:!0,children:(0,t.jsx)(es.FloatingPortal,{ref:r,...e})}):null});var ec=e.i(809058);let ed={...Q.popupStateMapping,...ec.transitionStatusMapping},ep=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),i=(0,d.useStore)(o,O.open),s=(0,d.useStore)(o,O.mounted),a=(0,d.useStore)(o,O.transitionStatus);return(0,$.useRenderElement)("div",e,{state:{open:i,transitionStatus:a},ref:t,props:[{role:"presentation",hidden:!s,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:ed})});var ef=e.i(831766),em=e.i(620163),eg=e.i(579028),eh=e.i(887943);let ev=r.createContext(void 0);function eS(){let e=r.useContext(ev);if(!e)throw Error((0,b.default)(59));return e}var eb=e.i(72287),ex=e.i(693354),ey=e.i(808754);function ew(e,t){e&&Object.assign(e.style,t)}let eE={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},eR={position:"fixed"},eM=r.forwardRef(function(e,n){let{anchor:l,positionMethod:o="absolute",className:i,render:s,side:c="bottom",align:p="center",sideOffset:f=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:h,arrowPadding:v=5,sticky:S=!1,disableAnchorTracking:b,alignItemWithTrigger:x=!0,collisionAvoidance:y=ex.DROPDOWN_COLLISION_AVOIDANCE,...R}=e,{store:M,listRef:I,labelsRef:A,alignItemWithTriggerActiveRef:C,selectedItemTextRef:j,valuesRef:V,initialValueRef:L,popupRef:k,setValue:N}=w(),H=E(),F=(0,d.useStore)(M,O.open),B=(0,d.useStore)(M,O.mounted),z=(0,d.useStore)(M,O.modal),_=(0,d.useStore)(M,O.value),Y=(0,d.useStore)(M,O.openMethod),q=(0,d.useStore)(M,O.positionerElement),W=(0,d.useStore)(M,O.triggerElement),K=(0,d.useStore)(M,O.isItemEqualToValue),X=(0,d.useStore)(M,O.transitionStatus),G=r.useRef(null),J=r.useRef(null),[Z,ee]=r.useState(x),et=B&&Z&&"touch"!==Y;B||Z===x||ee(x),(0,a.useIsoLayoutEffect)(()=>{!B&&(O.scrollUpArrowVisible(M.state)&&M.set("scrollUpArrowVisible",!1),O.scrollDownArrowVisible(M.state)&&M.set("scrollDownArrowVisible",!1))},[M,B]),r.useImperativeHandle(C,()=>et),(0,em.useScrollLock)((et||z)&&F&&"touch"!==Y,W);let er=(0,eh.useAnchorPositioning)({anchor:l,floatingRootContext:H,positionMethod:o,mounted:B,side:c,sideOffset:f,align:p,alignOffset:m,arrowPadding:v,collisionBoundary:g,collisionPadding:h,sticky:S,disableAnchorTracking:b??et,collisionAvoidance:y,keepMounted:!0}),en=et?"none":er.side,el=et?eR:er.positionerStyles,eo=r.useMemo(()=>{let e={};return F||(e.pointerEvents="none"),{role:"presentation",hidden:!B,style:{...el,...e}}},[F,B,el]),ei={open:F,side:en,align:er.align,anchorHidden:er.anchorHidden},es=(0,u.useStableCallback)(e=>{M.set("positionerElement",e)}),ea=(0,$.useRenderElement)("div",e,{ref:[n,es],state:ei,stateAttributesMapping:Q.popupStateMapping,props:[eo,(0,ey.getDisabledMountTransitionStyles)(X),R]}),eu=r.useRef(0),ec=(0,u.useStableCallback)(e=>{if(0===e.size&&0===eu.current||0===V.current.length)return;let t=eu.current;if(eu.current=e.size,e.size===t)return;let r=(0,D.createChangeEventDetails)(U.REASONS.none);if(0!==t&&!M.state.multiple&&null!==_&&-1===P(V.current,_,K)){let e=L.current,t=null!=e&&-1!==P(V.current,e,K)?e:null;N(t,r),null===t&&(M.set("selectedIndex",null),j.current=null)}if(0!==t&&M.state.multiple&&Array.isArray(_)){let e=_.filter(e=>-1!==P(V.current,e,K));(e.length!==_.length||e.some(e=>!(_&&0!==_.length&&_.some(t=>void 0!==t&&T(e,t,K)))))&&(N(e,r),0===e.length&&(M.set("selectedIndex",null),j.current=null))}if(F&&et){M.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:""};ew(q,e),ew(k.current,e)}}),ed=r.useMemo(()=>({...er,side:en,alignItemWithTriggerActive:et,setControlledAlignItemWithTrigger:ee,scrollUpArrowRef:G,scrollDownArrowRef:J}),[er,en,et,ee]);return(0,t.jsx)(eg.CompositeList,{elementsRef:I,labelsRef:A,onMapChange:ec,children:(0,t.jsxs)(ev.Provider,{value:ed,children:[B&&z&&(0,t.jsx)(eb.InternalBackdrop,{inert:(0,ef.inertValue)(!F),cutout:W}),ea]})})});var eI=e.i(585012),eA=e.i(641645),eC=e.i(442383),eT=e.i(285182);function eP(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var ej=e.i(946467),eV=e.i(11931),eL=e.i(278928),ek=e.i(685668),eO=e.i(196368),eD=e.i(197920),eU=e.i(867467),eN=e.i(743945);let eH={...Q.popupStateMapping,...ec.transitionStatusMapping},eF=r.forwardRef(function(e,n){let{render:l,className:o,finalFocus:i,...s}=e,{store:c,popupRef:p,onOpenChangeComplete:f,setOpen:m,valueRef:g,selectedItemTextRef:h,keyboardActiveRef:v,multiple:S,handleScrollArrowVisibility:b,scrollHandlerRef:x,highlightItemOnHover:y}=w(),{side:R,align:M,alignItemWithTriggerActive:I,setControlledAlignItemWithTrigger:A,scrollDownArrowRef:C,scrollUpArrowRef:T}=eS(),P=null!=(0,eO.useToolbarRootContext)(!0),j=E(),{nonce:V,disableStyleElements:L}=(0,eN.useCSPContext)(),k=(0,G.useTimeout)(),H=(0,d.useStore)(c,O.id),F=(0,d.useStore)(c,O.open),B=(0,d.useStore)(c,O.mounted),z=(0,d.useStore)(c,O.popupProps),_=(0,d.useStore)(c,O.transitionStatus),Y=(0,d.useStore)(c,O.triggerElement),q=(0,d.useStore)(c,O.positionerElement),W=(0,d.useStore)(c,O.listElement),K=r.useRef(0),J=r.useRef(!1),Q=r.useRef(0),Z=r.useRef(!1),ee=r.useRef({}),et=(0,ej.useAnimationFrame)(),er=(0,u.useStableCallback)(e=>{if(!q||!p.current||!Z.current)return;if(J.current||!I)return void b();let t="0px"===q.style.top,r="0px"===q.style.bottom,n=q.getBoundingClientRect().height,l=(0,X.ownerDocument)(q),o=getComputedStyle(q),i=parseFloat(o.marginTop),s=parseFloat(o.marginBottom),a=eB(getComputedStyle(p.current)),u=Math.min(l.documentElement.clientHeight-i-s,a),c=e.scrollTop,d=ez(e),f=0,m=null,g=!1,h=!1,v=e=>{q.style.height=`${e}px`},S=(t,r)=>{let l=(0,eU.clamp)(t,0,u-n);l>0&&v(n+l),e.scrollTop=r,u-(n+l)<=1&&(J.current=!0),b()};if(t){let e=d-c,t=Math.min(n+e,u);if(f=t,e<=1)return void S(e,d);u-t>1?h=!0:g=!0}else if(r){let e=n+c,t=Math.min(e,u);if(f=t,c<=1)return void S(c,0);u-t>1?m=0:(g=!0,c<d&&(m=c-(c-(e-u))))}if(0!==(f=Math.ceil(f))&&v(f),h||null!=m){let t=ez(e),r=h?t:(0,eU.clamp)(m,0,t);Math.abs(e.scrollTop-r)>1&&(e.scrollTop=r)}(g||f>=u-1)&&(J.current=!0),b()});r.useImperativeHandle(x,()=>er,[er]),(0,N.useOpenChangeComplete)({open:F,ref:p,onComplete(){F&&f?.(!0)}}),(0,a.useIsoLayoutEffect)(()=>{q&&p.current&&!Object.keys(ee.current).length&&(ee.current={top:q.style.top||"0",left:q.style.left||"0",right:q.style.right,height:q.style.height,bottom:q.style.bottom,minHeight:q.style.minHeight,maxHeight:q.style.maxHeight,marginTop:q.style.marginTop,marginBottom:q.style.marginBottom})},[p,q]),(0,a.useIsoLayoutEffect)(()=>{F||I||(Z.current=!1,J.current=!1,K.current=0,Q.current=0,ew(q,ee.current))},[F,I,q,p]),(0,a.useIsoLayoutEffect)(()=>{let e=p.current;if(F&&Y&&q&&e&&"ending"!==c.state.transitionStatus){if(!I){Z.current=!0,et.request(b),e.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{let t=function(e){let{style:t}=e,r={};for(let[e,n]of eY)r[e]=t.getPropertyValue(e),t.setProperty(e,n,"important");return()=>{for(let[e]of eY){let n=r[e];n?t.setProperty(e,n):t.removeProperty(e)}}}(e);e.style.removeProperty("--transform-origin");try{var r;let t,n=getComputedStyle(q),l=getComputedStyle(e),o=(0,X.ownerDocument)(Y),i=(0,eT.ownerWindow)(q),s=(r=Y,eL.platform.getScale(r)),a=e_(Y.getBoundingClientRect(),s),u=e_(q.getBoundingClientRect(),s),c=a.left,d=a.height,p=W||e,f=p.scrollHeight,m=parseFloat(l.borderBottomWidth),v=parseFloat(n.marginTop)||10,S=parseFloat(n.marginBottom)||10,x=parseFloat(n.minHeight)||100,y=eB(l),w=o.documentElement.clientHeight-v-S,E=o.documentElement.clientWidth,R=w-a.bottom+d,M=h.current,I=g.current,C=0,T=0;if(M&&I){let e=e_(I.getBoundingClientRect(),s);t=e_(M.getBoundingClientRect(),s);let r=e.left-c,n=t.left-u.left,l=e.top-a.top+e.height/2,o=t.top-u.top+t.height/2;C=r-n,T=o-l}let P=R+T+S+m,j=Math.min(w,P),V=w-v-S,L=P-j,k=Math.max(5,c+C),O=Math.max(0,k+u.width-(E-5));q.style.left=`${k-O}px`,q.style.height=`${j}px`,q.style.maxHeight="auto",q.style.marginTop=`${v}px`,q.style.marginBottom=`${S}px`,e.style.height="100%";let D=ez(p),U=L>=D-1;U&&(j=Math.min(w,u.height)-(L-D));let N=a.top<20||a.bottom>w-20||Math.ceil(j)+1<Math.min(f,x),H=(i.visualViewport?.scale??1)!==1&&eC.isWebKit;if(N||H){Z.current=!0,ew(q,ee.current),eI.flushSync(()=>A(!1));return}if(U){let e=Math.max(0,w-P);q.style.top=u.height>=V?"0":`${e}px`,q.style.height=`${j}px`,p.scrollTop=ez(p),K.current=Math.max(x,j)}else q.style.bottom="0",K.current=Math.max(x,j),p.scrollTop=L;if(t){let r=u.top,n=u.height,l=t.top+t.height/2,o=(0,eU.clamp)(n>0?(l-r)/n*100:50,0,100);e.style.setProperty("--transform-origin",`50% ${o}%`)}(K.current===w||j>=y)&&(J.current=!0),b(),setTimeout(()=>{Z.current=!0})}finally{t()}})}},[c,F,q,Y,g,h,p,b,I,A,et,C,T,W]),r.useEffect(()=>{if(!I||!q||!F)return;let e=(0,eT.ownerWindow)(q);function t(e){m(!1,(0,D.createChangeEventDetails)(U.REASONS.windowResize,e))}return e.addEventListener("resize",t),()=>{e.removeEventListener("resize",t)}},[m,I,q,F]);let en={...W?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":S||void 0,id:`${H}-list`},onKeyDown(e){v.current=!0,P&&eD.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},onMouseMove(){v.current=!1},onPointerLeave(e){if(!y||eP(e)||"touch"===e.pointerType)return;let t=e.currentTarget;k.start(0,()=>{c.set("activeIndex",null),t.focus({preventScroll:!0})})},onScroll(e){W||er(e.currentTarget)},...I&&{style:W?{height:"100%"}:eE}},el=(0,$.useRenderElement)("div",e,{ref:[n,p],state:{open:F,transitionStatus:_,side:R,align:M},stateAttributesMapping:eH,props:[z,en,(0,ey.getDisabledMountTransitionStyles)(_),{className:!W&&I?ek.styleDisableScrollbar.className:void 0},s]});return(0,t.jsxs)(r.Fragment,{children:[!L&&ek.styleDisableScrollbar.getElement(V),(0,t.jsx)(eV.FloatingFocusManager,{context:j,modal:!1,disabled:!B,returnFocus:i,restoreFocus:!0,children:el})]})});function eB(e){let t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function ez(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function e_(e,t){return(0,eA.rectToClientRect)({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}let eY=[["transform","none"],["scale","1"],["translate","0 0"]],e$=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o,scrollHandlerRef:i}=w(),{alignItemWithTriggerActive:s}=eS(),a=(0,d.useStore)(o,O.hasScrollArrows),c=(0,d.useStore)(o,O.openMethod),p=(0,d.useStore)(o,O.multiple),f=(0,d.useStore)(o,O.id),m={id:`${f}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(e){i.current?.(e.currentTarget)},...s&&{style:eE},className:a&&"touch"!==c?ek.styleDisableScrollbar.className:void 0},g=(0,u.useStableCallback)(e=>{o.set("listElement",e)});return(0,$.useRenderElement)("div",e,{ref:[t,g],props:[m,l]})});var eq=e.i(655728);let eW=r.createContext(void 0);function eK(){let e=r.useContext(eW);if(!e)throw Error((0,b.default)(57));return e}let eX=r.memo(r.forwardRef(function(e,n){let{render:l,className:o,value:i=null,label:s,disabled:u=!1,nativeButton:p=!1,...f}=e,m=r.useRef(null),g=(0,eq.useCompositeListItem)({label:s,textRef:m,indexGuessBehavior:eq.IndexGuessBehavior.GuessFromOrder}),{store:h,getItemProps:v,setOpen:S,setValue:b,selectionRef:x,typingRef:y,valuesRef:E,keyboardActiveRef:R,multiple:M,highlightItemOnHover:I}=w(),A=(0,G.useTimeout)(),C=(0,d.useStore)(h,O.isActive,g.index),P=(0,d.useStore)(h,O.isSelected,g.index,i),j=(0,d.useStore)(h,O.isSelectedByFocus,g.index),V=(0,d.useStore)(h,O.isItemEqualToValue),L=g.index,k=-1!==L,N=r.useRef(null),H=(0,c.useValueAsRef)(L);(0,a.useIsoLayoutEffect)(()=>{if(!k)return;let e=E.current;return e[L]=i,()=>{delete e[L]}},[k,L,i,E]),(0,a.useIsoLayoutEffect)(()=>{if(!k)return;let e=h.state.value,t=e;M&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),void 0!==t&&T(i,t,V)&&h.set("selectedIndex",L)},[k,L,M,V,h,i]);let F=v({active:C,selected:P});F.onFocus=void 0,F.id=void 0;let B=r.useRef(null),z=r.useRef("mouse"),_=r.useRef(!1),{getButtonProps:Y,buttonRef:q}=(0,et.useButton)({disabled:u,focusableWhenDisabled:!0,native:p,composite:!0}),W=(0,$.useRenderElement)("div",e,{ref:[q,n,g.ref,N],state:{disabled:u,selected:P,highlighted:C},props:[F,{role:"option","aria-selected":P,tabIndex:C?0:-1,onFocus(){h.set("activeIndex",L)},onMouseEnter(){!R.current&&null===h.state.selectedIndex&&I&&h.set("activeIndex",L)},onMouseMove(){I&&h.set("activeIndex",L)},onMouseLeave(e){!I||R.current||eP(e)||A.start(0,()=>{h.state.activeIndex===L&&h.set("activeIndex",null)})},onTouchStart(){x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){B.current=e.key,h.set("activeIndex",L)," "===e.key&&y.current&&e.preventDefault()},onClick(e){_.current=!1,"keydown"===e.type&&null===B.current||u||"keydown"===e.type&&" "===B.current&&y.current||"touch"!==z.current&&!C||(B.current=null,function(e){let t=h.state.value;if(M){let r=Array.isArray(t)?t:[];b(P?r.filter(e=>!T(i,e,V)):[...r,i],(0,D.createChangeEventDetails)(U.REASONS.itemPress,e))}else b(i,(0,D.createChangeEventDetails)(U.REASONS.itemPress,e)),S(!1,(0,D.createChangeEventDetails)(U.REASONS.itemPress,e))}(e.nativeEvent))},onPointerEnter(e){z.current=e.pointerType},onPointerDown(e){z.current=e.pointerType,_.current=!0},onMouseUp(){if(u)return;if(_.current){_.current=!1;return}let e=!x.current.allowSelectedMouseUp&&P,t=!x.current.allowUnselectedMouseUp&&!P;e||t||"touch"!==z.current&&!C||N.current?.click()}},f,Y]}),K=r.useMemo(()=>({selected:P,indexRef:H,textRef:m,selectedByFocus:j,hasRegistered:k}),[P,H,m,j,k]);return(0,t.jsx)(eW.Provider,{value:K,children:W})})),eG=r.forwardRef(function(e,r){let n=e.keepMounted??!1,{selected:l}=eK();return n||l?(0,t.jsx)(eJ,{...e,ref:r}):null}),eJ=r.memo(r.forwardRef((e,t)=>{let{render:n,className:l,keepMounted:o,...i}=e,{selected:s}=eK(),a=r.useRef(null),{transitionStatus:u,setMounted:c}=(0,I.useTransitionStatus)(s),d=(0,$.useRenderElement)("span",e,{ref:[t,a],state:{selected:s,transitionStatus:u},props:[{"aria-hidden":!0,children:"✔️"},i],stateAttributesMapping:ec.transitionStatusMapping});return(0,N.useOpenChangeComplete)({open:s,ref:a,onComplete(){s||c(!1)}}),d})),eQ=r.memo(r.forwardRef(function(e,t){let{indexRef:n,textRef:l,selectedByFocus:o,hasRegistered:i}=eK(),{selectedItemTextRef:s}=w(),{className:a,render:u,...c}=e,d=r.useCallback(e=>{if(!e||!i)return;let t=null===s.current||!s.current.isConnected;(o||t&&0===n.current)&&(s.current=e)},[s,n,o,i]);return(0,$.useRenderElement)("div",e,{ref:[d,t,l],props:c})})),eZ={...Q.popupStateMapping,...ec.transitionStatusMapping},e0=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),{side:i,align:s,arrowRef:a,arrowStyles:u,arrowUncentered:c,alignItemWithTriggerActive:p}=eS(),f=(0,d.useStore)(o,O.open,!0),m=(0,$.useRenderElement)("div",e,{state:{open:f,side:i,align:s,uncentered:c},ref:[a,t],props:[{style:u,"aria-hidden":!0},l],stateAttributesMapping:eZ});return p?null:m}),e1=r.forwardRef(function(e,t){let{render:r,className:n,direction:l,keepMounted:o=!1,...i}=e,{store:s,popupRef:u,listRef:c,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:f}=w(),{side:m,scrollDownArrowRef:g,scrollUpArrowRef:h}=eS(),v="up"===l?O.scrollUpArrowVisible:O.scrollDownArrowVisible,S=(0,d.useStore)(s,v),b=(0,d.useStore)(s,O.openMethod),x=S&&"touch"!==b,y=(0,G.useTimeout)(),E="up"===l?h:g,{transitionStatus:R,setMounted:M}=(0,I.useTransitionStatus)(x);(0,a.useIsoLayoutEffect)(()=>(f.current+=1,s.state.hasScrollArrows||s.set("hasScrollArrows",!0),()=>{f.current=Math.max(0,f.current-1),0===f.current&&s.state.hasScrollArrows&&s.set("hasScrollArrows",!1)}),[s,f]),(0,N.useOpenChangeComplete)({open:x,ref:E,onComplete(){x||M(!1)}});let A=(0,$.useRenderElement)("div",e,{ref:[t,E],state:{direction:l,visible:x,side:m,transitionStatus:R},props:[{"aria-hidden":!0,children:"up"===l?"▲":"▼",style:{position:"absolute"},onMouseMove(e){0===e.movementX&&0===e.movementY||y.isStarted()||(s.set("activeIndex",null),y.start(40,function e(){let t=s.state.listElement??u.current;if(!t)return;s.set("activeIndex",null),p();let r=0===t.scrollTop,n=Math.round(t.scrollTop+t.clientHeight)>=t.scrollHeight;if(0===c.current.length&&("up"===l?s.set("scrollUpArrowVisible",!r):s.set("scrollDownArrowVisible",!n)),"up"===l&&r||"down"===l&&n)return void y.clear();if((s.state.listElement||u.current)&&c.current&&c.current.length>0){let e=c.current,r=E.current?.offsetHeight||0;if("up"===l){let n=0,l=t.scrollTop+r;for(let t=0;t<e.length;t+=1){let r=e[t];if(r&&r.offsetTop>=l){n=t;break}}let o=Math.max(0,n-1);if(o<n){let n=e[o];n&&(t.scrollTop=Math.max(0,n.offsetTop-r))}else t.scrollTop=0}else{let n=e.length-1,l=t.scrollTop+t.clientHeight-r;for(let t=0;t<e.length;t+=1){let r=e[t];if(r&&r.offsetTop+r.offsetHeight>l){n=Math.max(0,t-1);break}}let o=Math.min(e.length-1,n+1);if(o>n){let n=e[o];n&&(t.scrollTop=n.offsetTop+n.offsetHeight-t.clientHeight+r)}else t.scrollTop=t.scrollHeight-t.clientHeight}}y.start(40,e)}))},onMouseLeave(){y.clear()}},i]});return x||o?A:null}),e5=r.forwardRef(function(e,r){return(0,t.jsx)(e1,{...e,ref:r,direction:"down"})}),e2=r.forwardRef(function(e,r){return(0,t.jsx)(e1,{...e,ref:r,direction:"up"})}),e8=r.createContext(void 0),e9=r.forwardRef(function(e,n){let{className:l,render:o,...i}=e,[s,a]=r.useState(),u=r.useMemo(()=>({labelId:s,setLabelId:a}),[s,a]),c=(0,$.useRenderElement)("div",e,{ref:n,props:[{role:"group","aria-labelledby":s},i]});return(0,t.jsx)(e8.Provider,{value:u,children:c})});var e4=e.i(207516);let e6=r.forwardRef(function(e,t){let{className:n,render:l,id:o,...i}=e,{setLabelId:s}=function(){let e=r.useContext(e8);if(void 0===e)throw Error((0,b.default)(56));return e}(),u=(0,e4.useBaseUiId)(o);return(0,a.useIsoLayoutEffect)(()=>{s(u)},[u,s]),(0,$.useRenderElement)("div",e,{ref:t,props:[{id:u},i]})});var e7=e.i(983640);e.s(["Arrow",0,e0,"Backdrop",0,ep,"Group",0,e9,"GroupLabel",0,e6,"Icon",0,ei,"Item",0,eX,"ItemIndicator",0,eG,"ItemText",0,eQ,"Label",0,K,"List",0,e$,"Popup",0,eF,"Portal",0,eu,"Positioner",0,eM,"Root",0,function(e){let{id:b,value:w,defaultValue:E=null,onValueChange:A,open:T,defaultOpen:j=!1,onOpenChange:V,name:k,autoComplete:$,disabled:q=!1,readOnly:W=!1,required:K=!1,modal:X=!0,actionsRef:G,inputRef:J,onOpenChangeComplete:Q,items:Z,multiple:ee=!1,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en=C,highlightItemOnHover:el=!0,children:eo}=e,{clearErrors:ei}=(0,H.useFormContext)(),{setDirty:es,setTouched:ea,setFocused:eu,shouldValidateOnChange:ec,validityData:ed,setFilled:ep,name:ef,disabled:em,validation:eg,validationMode:eh}=(0,R.useFieldRootContext)(),ev=(0,M.useLabelableId)({id:b}),eS=em||q,eb=ef??k,[ex,ey]=(0,s.useControlled)({controlled:w,default:ee?E??B.EMPTY_ARRAY:E,name:"Select",state:"value"}),[ew,eE]=(0,s.useControlled)({controlled:T,default:j,name:"Select",state:"open"}),eR=r.useRef([]),eM=r.useRef([]),eI=r.useRef(null),eA=r.useRef(null),eC=r.useRef(0),eT=r.useRef(null),eP=r.useRef([]),ej=r.useRef(!1),eV=r.useRef(!1),eL=r.useRef(null),ek=r.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),eO=r.useRef(!1),{mounted:eD,setMounted:eU,transitionStatus:eN}=(0,I.useTransitionStatus)(ew),{openMethod:eH,triggerProps:eF}=(0,_.useOpenInteractionType)(ew),eB=(0,o.useRefWithInit)(()=>new p.Store({id:ev,labelId:void 0,modal:X,multiple:ee,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en,value:ex,open:ew,mounted:eD,transitionStatus:eN,items:Z,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ez=(0,d.useStore)(eB,O.activeIndex),e_=(0,d.useStore)(eB,O.selectedIndex),eY=(0,d.useStore)(eB,O.triggerElement),e$=(0,d.useStore)(eB,O.positionerElement),eq=r.useMemo(()=>ee&&Array.isArray(ex)&&0===ex.length?"":L(ex,er),[ee,ex,er]),eW=r.useMemo(()=>ee&&Array.isArray(ex)?ex.map(e=>L(e,er)):L(ex,er),[ee,ex,er]),eK=(0,c.useValueAsRef)(eB.state.triggerElement);(0,F.useField)({id:ev,commit:eg.commit,value:ex,controlRef:eK,name:eb,getValue:()=>eW});let eX=r.useRef(ex);(0,a.useIsoLayoutEffect)(()=>{ex!==eX.current&&eB.set("forceMount",!0)},[eB,ex]),(0,a.useIsoLayoutEffect)(()=>{ep(ee?Array.isArray(ex)&&ex.length>0:null!=ex)},[ee,ex,ep]),(0,a.useIsoLayoutEffect)(function(){if(ew)return;let e=eP.current;if(ee){let t=Array.isArray(ex)?ex:[];if(0===t.length)return void eB.set("selectedIndex",null);let r=P(e,t[t.length-1],en);return void eB.set("selectedIndex",-1===r?null:r)}let t=P(e,ex,en);eB.set("selectedIndex",-1===t?null:t)},[ee,ew,ex,eP,en,eB]),(0,z.useValueChanged)(ex,()=>{ei(eb),es(ex!==ed.initialValue),ec()?eg.commit(ex):eg.commit(ex,!0)});let eG=(0,u.useStableCallback)((e,t)=>{if(V?.(e,t),!t.isCanceled&&(eE(e),e||t.reason!==U.REASONS.focusOut&&t.reason!==U.REASONS.outsidePress||(ea(!0),eu(!1),"onBlur"===eh&&eg.commit(ex)),!e&&null!==eB.state.activeIndex)){let e=eR.current[eB.state.activeIndex];queueMicrotask(()=>{e?.setAttribute("tabindex","-1")})}}),eJ=(0,u.useStableCallback)(()=>{eU(!1),eB.set("activeIndex",null),Q?.(!1)});(0,N.useOpenChangeComplete)({enabled:!G,open:ew,ref:eI,onComplete(){ew||eJ()}}),r.useImperativeHandle(G,()=>({unmount:eJ}),[eJ]);let eQ=(0,u.useStableCallback)((e,t)=>{A?.(e,t),t.isCanceled||ey(e)}),eZ=(0,u.useStableCallback)(()=>{let e=eB.state.listElement||eI.current;if(!e)return;let t=e.scrollTop,r=e.scrollTop+e.clientHeight,n=t>1,l=r<e.scrollHeight-1;eB.state.scrollUpArrowVisible!==n&&eB.set("scrollUpArrowVisible",n),eB.state.scrollDownArrowVisible!==l&&eB.set("scrollDownArrowVisible",l)}),e0=(0,g.useFloatingRootContext)({open:ew,onOpenChange:eG,elements:{reference:eY,floating:e$}}),e1=(0,f.useClick)(e0,{enabled:!W&&!eS,event:"mousedown"}),e5=(0,m.useDismiss)(e0,{bubbles:!1}),e2=(0,v.useListNavigation)(e0,{enabled:!W&&!eS,listRef:eR,activeIndex:ez,selectedIndex:e_,disabledIndices:B.EMPTY_ARRAY,onNavigate(e){(null!==e||ew)&&eB.set("activeIndex",e)},focusItemOnHover:!1}),e8=(0,S.useTypeahead)(e0,{enabled:!W&&!eS&&(ew||!ee),listRef:eM,activeIndex:ez,selectedIndex:e_,onMatch(e){ew?eB.set("activeIndex",e):eQ(eP.current[e],(0,D.createChangeEventDetails)("none"))},onTypingChange(e){ej.current=e}}),{getReferenceProps:e9,getFloatingProps:e4,getItemProps:e6}=(0,h.useInteractions)([e1,e5,e2,e8]),e7=r.useMemo(()=>(0,Y.mergeProps)(e9(),eF,ev?{id:ev}:B.EMPTY_OBJECT),[e9,eF,ev]);(0,i.useOnFirstRender)(()=>{eB.update({popupProps:e4(),triggerProps:e7})}),(0,a.useIsoLayoutEffect)(()=>{eB.update({id:ev,modal:X,multiple:ee,value:ex,open:ew,mounted:eD,transitionStatus:eN,popupProps:e4(),triggerProps:e7,items:Z,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en,openMethod:eH})},[eB,ev,X,ee,ex,ew,eD,eN,e4,e7,Z,et,er,en,eH]);let e3=r.useMemo(()=>({store:eB,name:eb,required:K,disabled:eS,readOnly:W,multiple:ee,itemToStringLabel:et,itemToStringValue:er,highlightItemOnHover:el,setValue:eQ,setOpen:eG,listRef:eR,popupRef:eI,scrollHandlerRef:eA,handleScrollArrowVisibility:eZ,scrollArrowsMountedCountRef:eC,getItemProps:e6,events:e0.context.events,valueRef:eT,valuesRef:eP,labelsRef:eM,typingRef:ej,selectionRef:ek,selectedItemTextRef:eL,validation:eg,onOpenChangeComplete:Q,keyboardActiveRef:eV,alignItemWithTriggerActiveRef:eO,initialValueRef:eX}),[eB,eb,K,eS,W,ee,et,er,el,eQ,eG,e6,e0.context.events,eg,Q,eZ]),te=(0,l.useMergedRefs)(J,eg.inputRef),tt=ee&&Array.isArray(ex)&&ex.length>0,tr=ee?void 0:eb,tn=r.useMemo(()=>ee&&Array.isArray(ex)&&eb?ex.map(e=>{let r=L(e,er);return(0,t.jsx)("input",{type:"hidden",name:eb,value:r},r)}):null,[ee,ex,eb,er]);return(0,t.jsx)(x.Provider,{value:e3,children:(0,t.jsxs)(y.Provider,{value:e0,children:[eo,(0,t.jsx)("input",{...eg.getInputValidationProps({onFocus(){eB.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.value,r=(0,D.createChangeEventDetails)(U.REASONS.none,e.nativeEvent);eB.set("forceMount",!0),queueMicrotask(function(){if(ee)return;let e=eP.current.find(e=>L(e,er).toLowerCase()===t.toLowerCase());null!=e&&(es(e!==ed.initialValue),eQ(e,r),ec()&&eg.commit(e))})}}),id:ev&&null==tr?`${ev}-hidden-input`:void 0,name:tr,autoComplete:$,value:eq,disabled:eS,required:K&&!tt,readOnly:W,ref:te,style:eb?n.visuallyHiddenInput:n.visuallyHidden,tabIndex:-1,"aria-hidden":!0}),tn]})})},"ScrollDownArrow",0,e5,"ScrollUpArrow",0,e2,"Separator",()=>e7.Separator,"Trigger",0,en,"Value",0,eo],278289);var e3=e.i(278289),e3=e3,te=e.i(975157),tt=e.i(314338),tt=tt,tr=e.i(533133),tn=e.i(792566),tn=tn;function tl({className:e,...r}){return(0,t.jsx)(e3.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:(0,te.cn)("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...r,children:(0,t.jsx)(tn.default,{})})}function to({className:e,...r}){return(0,t.jsx)(e3.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:(0,te.cn)("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...r,children:(0,t.jsx)(tt.default,{})})}e.s(["Select",0,function(e){return(0,t.jsx)(e3.Root,{modal:!1,...e})},"SelectContent",0,function({className:e,children:r,side:n="bottom",sideOffset:l=4,align:o="start",alignOffset:i=0,alignItemWithTrigger:s=!1,...a}){return(0,t.jsxs)(e3.Portal,{children:[(0,t.jsx)(e3.Backdrop,{className:"fixed inset-0 z-50"}),(0,t.jsx)(e3.Positioner,{side:n,sideOffset:l,align:o,alignOffset:i,alignItemWithTrigger:s,className:"isolate z-50",children:(0,t.jsxs)(e3.Popup,{"data-slot":"select-content","data-align-trigger":s,className:(0,te.cn)("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a,children:[(0,t.jsx)(tl,{}),(0,t.jsx)(e3.List,{children:r}),(0,t.jsx)(to,{})]})})]})},"SelectItem",0,function({className:e,children:r,...n}){return(0,t.jsxs)(e3.Item,{"data-slot":"select-item",className:(0,te.cn)("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[(0,t.jsx)(e3.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:r}),(0,t.jsx)(e3.ItemIndicator,{render:(0,t.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:(0,t.jsx)(tr.CheckIcon,{className:"pointer-events-none"})})]})},"SelectTrigger",0,function({className:e,size:r="default",children:n,...l}){return(0,t.jsxs)(e3.Trigger,{"data-slot":"select-trigger","data-size":r,className:(0,te.cn)("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...l,children:[n,(0,t.jsx)(e3.Icon,{render:(0,t.jsx)(tt.default,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}],967489);var ti=e.i(514798);let ts=(0,ti.createServerReference)("4049c3ac282394cff9e752075d1a38bf7571becce2",ti.callServer,void 0,ti.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,ts],516358)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,967489,338973,e=>{"use strict";var t=e.i(289721);e.s([],648333),e.i(648333);var r=e.i(965652),n=e.i(416369),l=e.i(362891),o=e.i(903224),i=e.i(528796),s=e.i(314757),a=e.i(804849),u=e.i(887642),c=e.i(20746),d=e.i(812901),p=e.i(956741),f=e.i(430557),m=e.i(594640),g=e.i(592604),h=e.i(306296),v=e.i(234951),S=e.i(471959);e.i(708878);var b=e.i(462902);let x=r.createContext(null),y=r.createContext(null);function w(){let e=r.useContext(x);if(null===e)throw Error((0,b.default)(60));return e}function E(){let e=r.useContext(y);if(null===e)throw Error((0,b.default)(61));return e}var R=e.i(890514),M=e.i(103353),I=e.i(193214),A=e.i(596290);let C=(e,t)=>Object.is(e,t);function T(e,t,r){return null==e||null==t?Object.is(e,t):r(e,t)}function P(e,t,r){return e&&0!==e.length?e.findIndex(e=>void 0!==e&&T(e,t,r)):-1}function j(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}function V(e){return null!=e&&e.length>0&&"object"==typeof e[0]&&null!=e[0]&&"items"in e[0]}function L(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?j(e.value):j(e)}function k(e,t,r){function n(){if(r&&null!=e)return r(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return j(e)}if(r&&null!=e)return r(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return t[e]??n();if(Array.isArray(t)){let r=V(t)?t.flatMap(e=>e.items):t;if(null==e||"object"!=typeof e){let t=r.find(t=>t.value===e);return t&&null!=t.label?t.label:n()}if("value"in e){let t=r.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return n()}let O={id:(0,A.createSelector)(e=>e.id),labelId:(0,A.createSelector)(e=>e.labelId),modal:(0,A.createSelector)(e=>e.modal),multiple:(0,A.createSelector)(e=>e.multiple),items:(0,A.createSelector)(e=>e.items),itemToStringLabel:(0,A.createSelector)(e=>e.itemToStringLabel),itemToStringValue:(0,A.createSelector)(e=>e.itemToStringValue),isItemEqualToValue:(0,A.createSelector)(e=>e.isItemEqualToValue),value:(0,A.createSelector)(e=>e.value),hasSelectedValue:(0,A.createSelector)(e=>{let{value:t,multiple:r,itemToStringValue:n}=e;return null!=t&&(r&&Array.isArray(t)?t.length>0:""!==L(t,n))}),hasNullItemLabel:(0,A.createSelector)((e,t)=>!!t&&function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(V(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1}(e.items)),open:(0,A.createSelector)(e=>e.open),mounted:(0,A.createSelector)(e=>e.mounted),forceMount:(0,A.createSelector)(e=>e.forceMount),transitionStatus:(0,A.createSelector)(e=>e.transitionStatus),openMethod:(0,A.createSelector)(e=>e.openMethod),activeIndex:(0,A.createSelector)(e=>e.activeIndex),selectedIndex:(0,A.createSelector)(e=>e.selectedIndex),isActive:(0,A.createSelector)((e,t)=>e.activeIndex===t),isSelected:(0,A.createSelector)((e,t,r)=>{let n=e.isItemEqualToValue,l=e.value;return e.multiple?Array.isArray(l)&&l.some(e=>T(r,e,n)):e.selectedIndex===t&&null!==e.selectedIndex||T(r,l,n)}),isSelectedByFocus:(0,A.createSelector)((e,t)=>e.selectedIndex===t),popupProps:(0,A.createSelector)(e=>e.popupProps),triggerProps:(0,A.createSelector)(e=>e.triggerProps),triggerElement:(0,A.createSelector)(e=>e.triggerElement),positionerElement:(0,A.createSelector)(e=>e.positionerElement),listElement:(0,A.createSelector)(e=>e.listElement),scrollUpArrowVisible:(0,A.createSelector)(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:(0,A.createSelector)(e=>e.scrollDownArrowVisible),hasScrollArrows:(0,A.createSelector)(e=>e.hasScrollArrows)};var D=e.i(67077),U=e.i(586622),N=e.i(504068),H=e.i(571870),F=e.i(421689),B=e.i(954588),z=e.i(353052),_=e.i(892069),Y=e.i(565455),$=e.i(581263),q=e.i(551974),W=e.i(397791);let K=r.forwardRef(function(e,t){let{render:r,className:n,...l}=e;delete l.id;let o=(0,R.useFieldRootContext)(),{store:i}=w(),s=(0,d.useStore)(i,O.triggerElement),a=(0,d.useStore)(i,O.id),u=null==a?void 0:`${a}-label`,c=(0,W.useLabel)({id:u,fallbackControlId:s?.id??a,setLabelId(e){i.set("labelId",e)}});return(0,$.useRenderElement)("div",e,{ref:t,state:o.state,props:[c,l],stateAttributesMapping:q.fieldValidityMapping})});var X=e.i(102094),G=e.i(161476),J=e.i(179279),Q=e.i(845756),Z=e.i(748299),ee=e.i(682354),et=e.i(282109);let er={...Q.pressableTriggerOpenStateMapping,...q.fieldValidityMapping,value:()=>null},en=r.forwardRef(function(e,t){let{render:n,className:o,id:i,disabled:s=!1,nativeButton:a=!0,...p}=e,{setTouched:f,setFocused:m,validationMode:g,state:h,disabled:v}=(0,R.useFieldRootContext)(),{labelId:S}=(0,J.useLabelableContext)(),{store:b,setOpen:x,selectionRef:y,validation:E,readOnly:I,required:A,alignItemWithTriggerActiveRef:C,disabled:T,keyboardActiveRef:P}=w(),j=v||T||s,V=(0,d.useStore)(b,O.open),L=(0,d.useStore)(b,O.value),k=(0,d.useStore)(b,O.triggerProps),N=(0,d.useStore)(b,O.positionerElement),H=(0,d.useStore)(b,O.listElement),F=(0,d.useStore)(b,O.id),B=(0,d.useStore)(b,O.labelId),z=(0,d.useStore)(b,O.hasSelectedValue),_=!z&&V,q=(0,d.useStore)(b,O.hasNullItemLabel,_),W=i??F;(0,M.useLabelableId)({id:W});let K=(0,c.useValueAsRef)(N),Q=r.useRef(null),{getButtonProps:en,buttonRef:el}=(0,et.useButton)({disabled:j,native:a}),eo=(0,u.useStableCallback)(e=>{b.set("triggerElement",e)}),ei=(0,l.useMergedRefs)(t,Q,el,eo),es=(0,G.useTimeout)(),ea=(0,G.useTimeout)(),eu=(0,G.useTimeout)(),ec=(0,G.useTimeout)();r.useEffect(()=>{if(V)return z||q?ec.start(200,()=>{y.current.allowUnselectedMouseUp=!0,eu.start(200,()=>{y.current.allowSelectedMouseUp=!0})}):eu.start(400,()=>{y.current.allowUnselectedMouseUp=!0,y.current.allowSelectedMouseUp=!0}),()=>{eu.clear(),ec.clear()};y.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},ea.clear()},[V,z,q,y,ea,eu,ec]);let ed=r.useMemo(()=>H?.id??(0,ee.getFloatingFocusElement)(N)?.id,[H,N]),ep=(0,Y.mergeProps)(k,{id:W,role:"combobox","aria-expanded":V?"true":"false","aria-haspopup":"listbox","aria-controls":V?ed:void 0,"aria-labelledby":S??B,"aria-readonly":I||void 0,"aria-required":A||void 0,tabIndex:j?-1:0,ref:ei,onFocus(e){m(!0),V&&C.current&&x(!1,(0,D.createChangeEventDetails)(U.REASONS.none,e.nativeEvent)),es.start(0,()=>{b.set("forceMount",!0)})},onBlur(e){(0,ee.contains)(N,e.relatedTarget)||(f(!0),m(!1),"onBlur"===g&&E.commit(L))},onPointerMove(){P.current=!1},onKeyDown(){P.current=!0},onMouseDown(e){if(V)return;let t=(0,X.ownerDocument)(e.currentTarget);function r(e){if(!Q.current)return;let t=e.target;if((0,ee.contains)(Q.current,t)||(0,ee.contains)(K.current,t)||t===Q.current)return;let r=(0,Z.getPseudoElementBounds)(Q.current);e.clientX>=r.left-2&&e.clientX<=r.right+2&&e.clientY>=r.top-2&&e.clientY<=r.bottom+2||x(!1,(0,D.createChangeEventDetails)(U.REASONS.cancelOpen,e))}ea.start(0,()=>{t.addEventListener("mouseup",r,{once:!0})})}},E.getValidationProps,p,en);ep.role="combobox";let ef={...h,open:V,disabled:j,value:L,readOnly:I,placeholder:!z};return(0,$.useRenderElement)("button",e,{ref:[t,Q],state:ef,stateAttributesMapping:er,props:ep})}),el={value:()=>null},eo=r.forwardRef(function(e,n){let{className:l,render:o,children:i,placeholder:s,...a}=e,{store:u,valueRef:c}=w(),p=(0,d.useStore)(u,O.value),f=(0,d.useStore)(u,O.items),m=(0,d.useStore)(u,O.itemToStringLabel),g=(0,d.useStore)(u,O.hasSelectedValue),h=(0,d.useStore)(u,O.hasNullItemLabel,!g&&null!=s&&null==i),v=null;if("function"==typeof i)v=i(p);else if(null!=i)v=i;else if(g||null==s||h)if(Array.isArray(p))v=p.reduce((e,n,l)=>(l>0&&e.push(", "),e.push((0,t.jsx)(r.Fragment,{children:k(n,f,m)},l)),e),[]);else v=k(p,f,m);else v=s;return(0,$.useRenderElement)("span",e,{state:{value:p,placeholder:!g},ref:[n,c],props:[{children:v},a],stateAttributesMapping:el})}),ei=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),i=(0,d.useStore)(o,O.open);return(0,$.useRenderElement)("span",e,{state:{open:i},ref:t,props:[{"aria-hidden":!0,children:"▼"},l],stateAttributesMapping:Q.triggerOpenStateMapping})});var es=e.i(888393);let ea=r.createContext(void 0),eu=r.forwardRef(function(e,r){let{store:n}=w(),l=(0,d.useStore)(n,O.mounted),o=(0,d.useStore)(n,O.forceMount);return l||o?(0,t.jsx)(ea.Provider,{value:!0,children:(0,t.jsx)(es.FloatingPortal,{ref:r,...e})}):null});var ec=e.i(809058);let ed={...Q.popupStateMapping,...ec.transitionStatusMapping},ep=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),i=(0,d.useStore)(o,O.open),s=(0,d.useStore)(o,O.mounted),a=(0,d.useStore)(o,O.transitionStatus);return(0,$.useRenderElement)("div",e,{state:{open:i,transitionStatus:a},ref:t,props:[{role:"presentation",hidden:!s,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:ed})});var ef=e.i(831766),em=e.i(620163),eg=e.i(579028),eh=e.i(887943);let ev=r.createContext(void 0);function eS(){let e=r.useContext(ev);if(!e)throw Error((0,b.default)(59));return e}var eb=e.i(72287),ex=e.i(693354),ey=e.i(808754);function ew(e,t){e&&Object.assign(e.style,t)}let eE={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},eR={position:"fixed"},eM=r.forwardRef(function(e,n){let{anchor:l,positionMethod:o="absolute",className:i,render:s,side:c="bottom",align:p="center",sideOffset:f=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:h,arrowPadding:v=5,sticky:S=!1,disableAnchorTracking:b,alignItemWithTrigger:x=!0,collisionAvoidance:y=ex.DROPDOWN_COLLISION_AVOIDANCE,...R}=e,{store:M,listRef:I,labelsRef:A,alignItemWithTriggerActiveRef:C,selectedItemTextRef:j,valuesRef:V,initialValueRef:L,popupRef:k,setValue:N}=w(),H=E(),F=(0,d.useStore)(M,O.open),B=(0,d.useStore)(M,O.mounted),z=(0,d.useStore)(M,O.modal),_=(0,d.useStore)(M,O.value),Y=(0,d.useStore)(M,O.openMethod),q=(0,d.useStore)(M,O.positionerElement),W=(0,d.useStore)(M,O.triggerElement),K=(0,d.useStore)(M,O.isItemEqualToValue),X=(0,d.useStore)(M,O.transitionStatus),G=r.useRef(null),J=r.useRef(null),[Z,ee]=r.useState(x),et=B&&Z&&"touch"!==Y;B||Z===x||ee(x),(0,a.useIsoLayoutEffect)(()=>{!B&&(O.scrollUpArrowVisible(M.state)&&M.set("scrollUpArrowVisible",!1),O.scrollDownArrowVisible(M.state)&&M.set("scrollDownArrowVisible",!1))},[M,B]),r.useImperativeHandle(C,()=>et),(0,em.useScrollLock)((et||z)&&F&&"touch"!==Y,W);let er=(0,eh.useAnchorPositioning)({anchor:l,floatingRootContext:H,positionMethod:o,mounted:B,side:c,sideOffset:f,align:p,alignOffset:m,arrowPadding:v,collisionBoundary:g,collisionPadding:h,sticky:S,disableAnchorTracking:b??et,collisionAvoidance:y,keepMounted:!0}),en=et?"none":er.side,el=et?eR:er.positionerStyles,eo=r.useMemo(()=>{let e={};return F||(e.pointerEvents="none"),{role:"presentation",hidden:!B,style:{...el,...e}}},[F,B,el]),ei={open:F,side:en,align:er.align,anchorHidden:er.anchorHidden},es=(0,u.useStableCallback)(e=>{M.set("positionerElement",e)}),ea=(0,$.useRenderElement)("div",e,{ref:[n,es],state:ei,stateAttributesMapping:Q.popupStateMapping,props:[eo,(0,ey.getDisabledMountTransitionStyles)(X),R]}),eu=r.useRef(0),ec=(0,u.useStableCallback)(e=>{if(0===e.size&&0===eu.current||0===V.current.length)return;let t=eu.current;if(eu.current=e.size,e.size===t)return;let r=(0,D.createChangeEventDetails)(U.REASONS.none);if(0!==t&&!M.state.multiple&&null!==_&&-1===P(V.current,_,K)){let e=L.current,t=null!=e&&-1!==P(V.current,e,K)?e:null;N(t,r),null===t&&(M.set("selectedIndex",null),j.current=null)}if(0!==t&&M.state.multiple&&Array.isArray(_)){let e=_.filter(e=>-1!==P(V.current,e,K));(e.length!==_.length||e.some(e=>!(_&&0!==_.length&&_.some(t=>void 0!==t&&T(e,t,K)))))&&(N(e,r),0===e.length&&(M.set("selectedIndex",null),j.current=null))}if(F&&et){M.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:""};ew(q,e),ew(k.current,e)}}),ed=r.useMemo(()=>({...er,side:en,alignItemWithTriggerActive:et,setControlledAlignItemWithTrigger:ee,scrollUpArrowRef:G,scrollDownArrowRef:J}),[er,en,et,ee]);return(0,t.jsx)(eg.CompositeList,{elementsRef:I,labelsRef:A,onMapChange:ec,children:(0,t.jsxs)(ev.Provider,{value:ed,children:[B&&z&&(0,t.jsx)(eb.InternalBackdrop,{inert:(0,ef.inertValue)(!F),cutout:W}),ea]})})});var eI=e.i(585012),eA=e.i(641645),eC=e.i(442383),eT=e.i(285182);function eP(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var ej=e.i(946467),eV=e.i(11931),eL=e.i(278928),ek=e.i(685668),eO=e.i(196368),eD=e.i(197920),eU=e.i(867467),eN=e.i(743945);let eH={...Q.popupStateMapping,...ec.transitionStatusMapping},eF=r.forwardRef(function(e,n){let{render:l,className:o,finalFocus:i,...s}=e,{store:c,popupRef:p,onOpenChangeComplete:f,setOpen:m,valueRef:g,selectedItemTextRef:h,keyboardActiveRef:v,multiple:S,handleScrollArrowVisibility:b,scrollHandlerRef:x,highlightItemOnHover:y}=w(),{side:R,align:M,alignItemWithTriggerActive:I,setControlledAlignItemWithTrigger:A,scrollDownArrowRef:C,scrollUpArrowRef:T}=eS(),P=null!=(0,eO.useToolbarRootContext)(!0),j=E(),{nonce:V,disableStyleElements:L}=(0,eN.useCSPContext)(),k=(0,G.useTimeout)(),H=(0,d.useStore)(c,O.id),F=(0,d.useStore)(c,O.open),B=(0,d.useStore)(c,O.mounted),z=(0,d.useStore)(c,O.popupProps),_=(0,d.useStore)(c,O.transitionStatus),Y=(0,d.useStore)(c,O.triggerElement),q=(0,d.useStore)(c,O.positionerElement),W=(0,d.useStore)(c,O.listElement),K=r.useRef(0),J=r.useRef(!1),Q=r.useRef(0),Z=r.useRef(!1),ee=r.useRef({}),et=(0,ej.useAnimationFrame)(),er=(0,u.useStableCallback)(e=>{if(!q||!p.current||!Z.current)return;if(J.current||!I)return void b();let t="0px"===q.style.top,r="0px"===q.style.bottom,n=q.getBoundingClientRect().height,l=(0,X.ownerDocument)(q),o=getComputedStyle(q),i=parseFloat(o.marginTop),s=parseFloat(o.marginBottom),a=eB(getComputedStyle(p.current)),u=Math.min(l.documentElement.clientHeight-i-s,a),c=e.scrollTop,d=ez(e),f=0,m=null,g=!1,h=!1,v=e=>{q.style.height=`${e}px`},S=(t,r)=>{let l=(0,eU.clamp)(t,0,u-n);l>0&&v(n+l),e.scrollTop=r,u-(n+l)<=1&&(J.current=!0),b()};if(t){let e=d-c,t=Math.min(n+e,u);if(f=t,e<=1)return void S(e,d);u-t>1?h=!0:g=!0}else if(r){let e=n+c,t=Math.min(e,u);if(f=t,c<=1)return void S(c,0);u-t>1?m=0:(g=!0,c<d&&(m=c-(c-(e-u))))}if(0!==(f=Math.ceil(f))&&v(f),h||null!=m){let t=ez(e),r=h?t:(0,eU.clamp)(m,0,t);Math.abs(e.scrollTop-r)>1&&(e.scrollTop=r)}(g||f>=u-1)&&(J.current=!0),b()});r.useImperativeHandle(x,()=>er,[er]),(0,N.useOpenChangeComplete)({open:F,ref:p,onComplete(){F&&f?.(!0)}}),(0,a.useIsoLayoutEffect)(()=>{q&&p.current&&!Object.keys(ee.current).length&&(ee.current={top:q.style.top||"0",left:q.style.left||"0",right:q.style.right,height:q.style.height,bottom:q.style.bottom,minHeight:q.style.minHeight,maxHeight:q.style.maxHeight,marginTop:q.style.marginTop,marginBottom:q.style.marginBottom})},[p,q]),(0,a.useIsoLayoutEffect)(()=>{F||I||(Z.current=!1,J.current=!1,K.current=0,Q.current=0,ew(q,ee.current))},[F,I,q,p]),(0,a.useIsoLayoutEffect)(()=>{let e=p.current;if(F&&Y&&q&&e&&"ending"!==c.state.transitionStatus){if(!I){Z.current=!0,et.request(b),e.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{let t=function(e){let{style:t}=e,r={};for(let[e,n]of eY)r[e]=t.getPropertyValue(e),t.setProperty(e,n,"important");return()=>{for(let[e]of eY){let n=r[e];n?t.setProperty(e,n):t.removeProperty(e)}}}(e);e.style.removeProperty("--transform-origin");try{var r;let t,n=getComputedStyle(q),l=getComputedStyle(e),o=(0,X.ownerDocument)(Y),i=(0,eT.ownerWindow)(q),s=(r=Y,eL.platform.getScale(r)),a=e_(Y.getBoundingClientRect(),s),u=e_(q.getBoundingClientRect(),s),c=a.left,d=a.height,p=W||e,f=p.scrollHeight,m=parseFloat(l.borderBottomWidth),v=parseFloat(n.marginTop)||10,S=parseFloat(n.marginBottom)||10,x=parseFloat(n.minHeight)||100,y=eB(l),w=o.documentElement.clientHeight-v-S,E=o.documentElement.clientWidth,R=w-a.bottom+d,M=h.current,I=g.current,C=0,T=0;if(M&&I){let e=e_(I.getBoundingClientRect(),s);t=e_(M.getBoundingClientRect(),s);let r=e.left-c,n=t.left-u.left,l=e.top-a.top+e.height/2,o=t.top-u.top+t.height/2;C=r-n,T=o-l}let P=R+T+S+m,j=Math.min(w,P),V=w-v-S,L=P-j,k=Math.max(5,c+C),O=Math.max(0,k+u.width-(E-5));q.style.left=`${k-O}px`,q.style.height=`${j}px`,q.style.maxHeight="auto",q.style.marginTop=`${v}px`,q.style.marginBottom=`${S}px`,e.style.height="100%";let D=ez(p),U=L>=D-1;U&&(j=Math.min(w,u.height)-(L-D));let N=a.top<20||a.bottom>w-20||Math.ceil(j)+1<Math.min(f,x),H=(i.visualViewport?.scale??1)!==1&&eC.isWebKit;if(N||H){Z.current=!0,ew(q,ee.current),eI.flushSync(()=>A(!1));return}if(U){let e=Math.max(0,w-P);q.style.top=u.height>=V?"0":`${e}px`,q.style.height=`${j}px`,p.scrollTop=ez(p),K.current=Math.max(x,j)}else q.style.bottom="0",K.current=Math.max(x,j),p.scrollTop=L;if(t){let r=u.top,n=u.height,l=t.top+t.height/2,o=(0,eU.clamp)(n>0?(l-r)/n*100:50,0,100);e.style.setProperty("--transform-origin",`50% ${o}%`)}(K.current===w||j>=y)&&(J.current=!0),b(),setTimeout(()=>{Z.current=!0})}finally{t()}})}},[c,F,q,Y,g,h,p,b,I,A,et,C,T,W]),r.useEffect(()=>{if(!I||!q||!F)return;let e=(0,eT.ownerWindow)(q);function t(e){m(!1,(0,D.createChangeEventDetails)(U.REASONS.windowResize,e))}return e.addEventListener("resize",t),()=>{e.removeEventListener("resize",t)}},[m,I,q,F]);let en={...W?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":S||void 0,id:`${H}-list`},onKeyDown(e){v.current=!0,P&&eD.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},onMouseMove(){v.current=!1},onPointerLeave(e){if(!y||eP(e)||"touch"===e.pointerType)return;let t=e.currentTarget;k.start(0,()=>{c.set("activeIndex",null),t.focus({preventScroll:!0})})},onScroll(e){W||er(e.currentTarget)},...I&&{style:W?{height:"100%"}:eE}},el=(0,$.useRenderElement)("div",e,{ref:[n,p],state:{open:F,transitionStatus:_,side:R,align:M},stateAttributesMapping:eH,props:[z,en,(0,ey.getDisabledMountTransitionStyles)(_),{className:!W&&I?ek.styleDisableScrollbar.className:void 0},s]});return(0,t.jsxs)(r.Fragment,{children:[!L&&ek.styleDisableScrollbar.getElement(V),(0,t.jsx)(eV.FloatingFocusManager,{context:j,modal:!1,disabled:!B,returnFocus:i,restoreFocus:!0,children:el})]})});function eB(e){let t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function ez(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function e_(e,t){return(0,eA.rectToClientRect)({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}let eY=[["transform","none"],["scale","1"],["translate","0 0"]],e$=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o,scrollHandlerRef:i}=w(),{alignItemWithTriggerActive:s}=eS(),a=(0,d.useStore)(o,O.hasScrollArrows),c=(0,d.useStore)(o,O.openMethod),p=(0,d.useStore)(o,O.multiple),f=(0,d.useStore)(o,O.id),m={id:`${f}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(e){i.current?.(e.currentTarget)},...s&&{style:eE},className:a&&"touch"!==c?ek.styleDisableScrollbar.className:void 0},g=(0,u.useStableCallback)(e=>{o.set("listElement",e)});return(0,$.useRenderElement)("div",e,{ref:[t,g],props:[m,l]})});var eq=e.i(655728);let eW=r.createContext(void 0);function eK(){let e=r.useContext(eW);if(!e)throw Error((0,b.default)(57));return e}let eX=r.memo(r.forwardRef(function(e,n){let{render:l,className:o,value:i=null,label:s,disabled:u=!1,nativeButton:p=!1,...f}=e,m=r.useRef(null),g=(0,eq.useCompositeListItem)({label:s,textRef:m,indexGuessBehavior:eq.IndexGuessBehavior.GuessFromOrder}),{store:h,getItemProps:v,setOpen:S,setValue:b,selectionRef:x,typingRef:y,valuesRef:E,keyboardActiveRef:R,multiple:M,highlightItemOnHover:I}=w(),A=(0,G.useTimeout)(),C=(0,d.useStore)(h,O.isActive,g.index),P=(0,d.useStore)(h,O.isSelected,g.index,i),j=(0,d.useStore)(h,O.isSelectedByFocus,g.index),V=(0,d.useStore)(h,O.isItemEqualToValue),L=g.index,k=-1!==L,N=r.useRef(null),H=(0,c.useValueAsRef)(L);(0,a.useIsoLayoutEffect)(()=>{if(!k)return;let e=E.current;return e[L]=i,()=>{delete e[L]}},[k,L,i,E]),(0,a.useIsoLayoutEffect)(()=>{if(!k)return;let e=h.state.value,t=e;M&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),void 0!==t&&T(i,t,V)&&h.set("selectedIndex",L)},[k,L,M,V,h,i]);let F=v({active:C,selected:P});F.onFocus=void 0,F.id=void 0;let B=r.useRef(null),z=r.useRef("mouse"),_=r.useRef(!1),{getButtonProps:Y,buttonRef:q}=(0,et.useButton)({disabled:u,focusableWhenDisabled:!0,native:p,composite:!0}),W=(0,$.useRenderElement)("div",e,{ref:[q,n,g.ref,N],state:{disabled:u,selected:P,highlighted:C},props:[F,{role:"option","aria-selected":P,tabIndex:C?0:-1,onFocus(){h.set("activeIndex",L)},onMouseEnter(){!R.current&&null===h.state.selectedIndex&&I&&h.set("activeIndex",L)},onMouseMove(){I&&h.set("activeIndex",L)},onMouseLeave(e){!I||R.current||eP(e)||A.start(0,()=>{h.state.activeIndex===L&&h.set("activeIndex",null)})},onTouchStart(){x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){B.current=e.key,h.set("activeIndex",L)," "===e.key&&y.current&&e.preventDefault()},onClick(e){_.current=!1,"keydown"===e.type&&null===B.current||u||"keydown"===e.type&&" "===B.current&&y.current||"touch"!==z.current&&!C||(B.current=null,function(e){let t=h.state.value;if(M){let r=Array.isArray(t)?t:[];b(P?r.filter(e=>!T(i,e,V)):[...r,i],(0,D.createChangeEventDetails)(U.REASONS.itemPress,e))}else b(i,(0,D.createChangeEventDetails)(U.REASONS.itemPress,e)),S(!1,(0,D.createChangeEventDetails)(U.REASONS.itemPress,e))}(e.nativeEvent))},onPointerEnter(e){z.current=e.pointerType},onPointerDown(e){z.current=e.pointerType,_.current=!0},onMouseUp(){if(u)return;if(_.current){_.current=!1;return}let e=!x.current.allowSelectedMouseUp&&P,t=!x.current.allowUnselectedMouseUp&&!P;e||t||"touch"!==z.current&&!C||N.current?.click()}},f,Y]}),K=r.useMemo(()=>({selected:P,indexRef:H,textRef:m,selectedByFocus:j,hasRegistered:k}),[P,H,m,j,k]);return(0,t.jsx)(eW.Provider,{value:K,children:W})})),eG=r.forwardRef(function(e,r){let n=e.keepMounted??!1,{selected:l}=eK();return n||l?(0,t.jsx)(eJ,{...e,ref:r}):null}),eJ=r.memo(r.forwardRef((e,t)=>{let{render:n,className:l,keepMounted:o,...i}=e,{selected:s}=eK(),a=r.useRef(null),{transitionStatus:u,setMounted:c}=(0,I.useTransitionStatus)(s),d=(0,$.useRenderElement)("span",e,{ref:[t,a],state:{selected:s,transitionStatus:u},props:[{"aria-hidden":!0,children:"✔️"},i],stateAttributesMapping:ec.transitionStatusMapping});return(0,N.useOpenChangeComplete)({open:s,ref:a,onComplete(){s||c(!1)}}),d})),eQ=r.memo(r.forwardRef(function(e,t){let{indexRef:n,textRef:l,selectedByFocus:o,hasRegistered:i}=eK(),{selectedItemTextRef:s}=w(),{className:a,render:u,...c}=e,d=r.useCallback(e=>{if(!e||!i)return;let t=null===s.current||!s.current.isConnected;(o||t&&0===n.current)&&(s.current=e)},[s,n,o,i]);return(0,$.useRenderElement)("div",e,{ref:[d,t,l],props:c})})),eZ={...Q.popupStateMapping,...ec.transitionStatusMapping},e0=r.forwardRef(function(e,t){let{className:r,render:n,...l}=e,{store:o}=w(),{side:i,align:s,arrowRef:a,arrowStyles:u,arrowUncentered:c,alignItemWithTriggerActive:p}=eS(),f=(0,d.useStore)(o,O.open,!0),m=(0,$.useRenderElement)("div",e,{state:{open:f,side:i,align:s,uncentered:c},ref:[a,t],props:[{style:u,"aria-hidden":!0},l],stateAttributesMapping:eZ});return p?null:m}),e1=r.forwardRef(function(e,t){let{render:r,className:n,direction:l,keepMounted:o=!1,...i}=e,{store:s,popupRef:u,listRef:c,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:f}=w(),{side:m,scrollDownArrowRef:g,scrollUpArrowRef:h}=eS(),v="up"===l?O.scrollUpArrowVisible:O.scrollDownArrowVisible,S=(0,d.useStore)(s,v),b=(0,d.useStore)(s,O.openMethod),x=S&&"touch"!==b,y=(0,G.useTimeout)(),E="up"===l?h:g,{transitionStatus:R,setMounted:M}=(0,I.useTransitionStatus)(x);(0,a.useIsoLayoutEffect)(()=>(f.current+=1,s.state.hasScrollArrows||s.set("hasScrollArrows",!0),()=>{f.current=Math.max(0,f.current-1),0===f.current&&s.state.hasScrollArrows&&s.set("hasScrollArrows",!1)}),[s,f]),(0,N.useOpenChangeComplete)({open:x,ref:E,onComplete(){x||M(!1)}});let A=(0,$.useRenderElement)("div",e,{ref:[t,E],state:{direction:l,visible:x,side:m,transitionStatus:R},props:[{"aria-hidden":!0,children:"up"===l?"▲":"▼",style:{position:"absolute"},onMouseMove(e){0===e.movementX&&0===e.movementY||y.isStarted()||(s.set("activeIndex",null),y.start(40,function e(){let t=s.state.listElement??u.current;if(!t)return;s.set("activeIndex",null),p();let r=0===t.scrollTop,n=Math.round(t.scrollTop+t.clientHeight)>=t.scrollHeight;if(0===c.current.length&&("up"===l?s.set("scrollUpArrowVisible",!r):s.set("scrollDownArrowVisible",!n)),"up"===l&&r||"down"===l&&n)return void y.clear();if((s.state.listElement||u.current)&&c.current&&c.current.length>0){let e=c.current,r=E.current?.offsetHeight||0;if("up"===l){let n=0,l=t.scrollTop+r;for(let t=0;t<e.length;t+=1){let r=e[t];if(r&&r.offsetTop>=l){n=t;break}}let o=Math.max(0,n-1);if(o<n){let n=e[o];n&&(t.scrollTop=Math.max(0,n.offsetTop-r))}else t.scrollTop=0}else{let n=e.length-1,l=t.scrollTop+t.clientHeight-r;for(let t=0;t<e.length;t+=1){let r=e[t];if(r&&r.offsetTop+r.offsetHeight>l){n=Math.max(0,t-1);break}}let o=Math.min(e.length-1,n+1);if(o>n){let n=e[o];n&&(t.scrollTop=n.offsetTop+n.offsetHeight-t.clientHeight+r)}else t.scrollTop=t.scrollHeight-t.clientHeight}}y.start(40,e)}))},onMouseLeave(){y.clear()}},i]});return x||o?A:null}),e2=r.forwardRef(function(e,r){return(0,t.jsx)(e1,{...e,ref:r,direction:"down"})}),e5=r.forwardRef(function(e,r){return(0,t.jsx)(e1,{...e,ref:r,direction:"up"})}),e8=r.createContext(void 0),e9=r.forwardRef(function(e,n){let{className:l,render:o,...i}=e,[s,a]=r.useState(),u=r.useMemo(()=>({labelId:s,setLabelId:a}),[s,a]),c=(0,$.useRenderElement)("div",e,{ref:n,props:[{role:"group","aria-labelledby":s},i]});return(0,t.jsx)(e8.Provider,{value:u,children:c})});var e6=e.i(207516);let e4=r.forwardRef(function(e,t){let{className:n,render:l,id:o,...i}=e,{setLabelId:s}=function(){let e=r.useContext(e8);if(void 0===e)throw Error((0,b.default)(56));return e}(),u=(0,e6.useBaseUiId)(o);return(0,a.useIsoLayoutEffect)(()=>{s(u)},[u,s]),(0,$.useRenderElement)("div",e,{ref:t,props:[{id:u},i]})});var e3=e.i(983640);e.s(["Arrow",0,e0,"Backdrop",0,ep,"Group",0,e9,"GroupLabel",0,e4,"Icon",0,ei,"Item",0,eX,"ItemIndicator",0,eG,"ItemText",0,eQ,"Label",0,K,"List",0,e$,"Popup",0,eF,"Portal",0,eu,"Positioner",0,eM,"Root",0,function(e){let{id:b,value:w,defaultValue:E=null,onValueChange:A,open:T,defaultOpen:j=!1,onOpenChange:V,name:k,autoComplete:$,disabled:q=!1,readOnly:W=!1,required:K=!1,modal:X=!0,actionsRef:G,inputRef:J,onOpenChangeComplete:Q,items:Z,multiple:ee=!1,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en=C,highlightItemOnHover:el=!0,children:eo}=e,{clearErrors:ei}=(0,H.useFormContext)(),{setDirty:es,setTouched:ea,setFocused:eu,shouldValidateOnChange:ec,validityData:ed,setFilled:ep,name:ef,disabled:em,validation:eg,validationMode:eh}=(0,R.useFieldRootContext)(),ev=(0,M.useLabelableId)({id:b}),eS=em||q,eb=ef??k,[ex,ey]=(0,s.useControlled)({controlled:w,default:ee?E??B.EMPTY_ARRAY:E,name:"Select",state:"value"}),[ew,eE]=(0,s.useControlled)({controlled:T,default:j,name:"Select",state:"open"}),eR=r.useRef([]),eM=r.useRef([]),eI=r.useRef(null),eA=r.useRef(null),eC=r.useRef(0),eT=r.useRef(null),eP=r.useRef([]),ej=r.useRef(!1),eV=r.useRef(!1),eL=r.useRef(null),ek=r.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),eO=r.useRef(!1),{mounted:eD,setMounted:eU,transitionStatus:eN}=(0,I.useTransitionStatus)(ew),{openMethod:eH,triggerProps:eF}=(0,_.useOpenInteractionType)(ew),eB=(0,o.useRefWithInit)(()=>new p.Store({id:ev,labelId:void 0,modal:X,multiple:ee,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en,value:ex,open:ew,mounted:eD,transitionStatus:eN,items:Z,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ez=(0,d.useStore)(eB,O.activeIndex),e_=(0,d.useStore)(eB,O.selectedIndex),eY=(0,d.useStore)(eB,O.triggerElement),e$=(0,d.useStore)(eB,O.positionerElement),eq=r.useMemo(()=>ee&&Array.isArray(ex)&&0===ex.length?"":L(ex,er),[ee,ex,er]),eW=r.useMemo(()=>ee&&Array.isArray(ex)?ex.map(e=>L(e,er)):L(ex,er),[ee,ex,er]),eK=(0,c.useValueAsRef)(eB.state.triggerElement);(0,F.useField)({id:ev,commit:eg.commit,value:ex,controlRef:eK,name:eb,getValue:()=>eW});let eX=r.useRef(ex);(0,a.useIsoLayoutEffect)(()=>{ex!==eX.current&&eB.set("forceMount",!0)},[eB,ex]),(0,a.useIsoLayoutEffect)(()=>{ep(ee?Array.isArray(ex)&&ex.length>0:null!=ex)},[ee,ex,ep]),(0,a.useIsoLayoutEffect)(function(){if(ew)return;let e=eP.current;if(ee){let t=Array.isArray(ex)?ex:[];if(0===t.length)return void eB.set("selectedIndex",null);let r=P(e,t[t.length-1],en);return void eB.set("selectedIndex",-1===r?null:r)}let t=P(e,ex,en);eB.set("selectedIndex",-1===t?null:t)},[ee,ew,ex,eP,en,eB]),(0,z.useValueChanged)(ex,()=>{ei(eb),es(ex!==ed.initialValue),ec()?eg.commit(ex):eg.commit(ex,!0)});let eG=(0,u.useStableCallback)((e,t)=>{if(V?.(e,t),!t.isCanceled&&(eE(e),e||t.reason!==U.REASONS.focusOut&&t.reason!==U.REASONS.outsidePress||(ea(!0),eu(!1),"onBlur"===eh&&eg.commit(ex)),!e&&null!==eB.state.activeIndex)){let e=eR.current[eB.state.activeIndex];queueMicrotask(()=>{e?.setAttribute("tabindex","-1")})}}),eJ=(0,u.useStableCallback)(()=>{eU(!1),eB.set("activeIndex",null),Q?.(!1)});(0,N.useOpenChangeComplete)({enabled:!G,open:ew,ref:eI,onComplete(){ew||eJ()}}),r.useImperativeHandle(G,()=>({unmount:eJ}),[eJ]);let eQ=(0,u.useStableCallback)((e,t)=>{A?.(e,t),t.isCanceled||ey(e)}),eZ=(0,u.useStableCallback)(()=>{let e=eB.state.listElement||eI.current;if(!e)return;let t=e.scrollTop,r=e.scrollTop+e.clientHeight,n=t>1,l=r<e.scrollHeight-1;eB.state.scrollUpArrowVisible!==n&&eB.set("scrollUpArrowVisible",n),eB.state.scrollDownArrowVisible!==l&&eB.set("scrollDownArrowVisible",l)}),e0=(0,g.useFloatingRootContext)({open:ew,onOpenChange:eG,elements:{reference:eY,floating:e$}}),e1=(0,f.useClick)(e0,{enabled:!W&&!eS,event:"mousedown"}),e2=(0,m.useDismiss)(e0,{bubbles:!1}),e5=(0,v.useListNavigation)(e0,{enabled:!W&&!eS,listRef:eR,activeIndex:ez,selectedIndex:e_,disabledIndices:B.EMPTY_ARRAY,onNavigate(e){(null!==e||ew)&&eB.set("activeIndex",e)},focusItemOnHover:!1}),e8=(0,S.useTypeahead)(e0,{enabled:!W&&!eS&&(ew||!ee),listRef:eM,activeIndex:ez,selectedIndex:e_,onMatch(e){ew?eB.set("activeIndex",e):eQ(eP.current[e],(0,D.createChangeEventDetails)("none"))},onTypingChange(e){ej.current=e}}),{getReferenceProps:e9,getFloatingProps:e6,getItemProps:e4}=(0,h.useInteractions)([e1,e2,e5,e8]),e3=r.useMemo(()=>(0,Y.mergeProps)(e9(),eF,ev?{id:ev}:B.EMPTY_OBJECT),[e9,eF,ev]);(0,i.useOnFirstRender)(()=>{eB.update({popupProps:e6(),triggerProps:e3})}),(0,a.useIsoLayoutEffect)(()=>{eB.update({id:ev,modal:X,multiple:ee,value:ex,open:ew,mounted:eD,transitionStatus:eN,popupProps:e6(),triggerProps:e3,items:Z,itemToStringLabel:et,itemToStringValue:er,isItemEqualToValue:en,openMethod:eH})},[eB,ev,X,ee,ex,ew,eD,eN,e6,e3,Z,et,er,en,eH]);let e7=r.useMemo(()=>({store:eB,name:eb,required:K,disabled:eS,readOnly:W,multiple:ee,itemToStringLabel:et,itemToStringValue:er,highlightItemOnHover:el,setValue:eQ,setOpen:eG,listRef:eR,popupRef:eI,scrollHandlerRef:eA,handleScrollArrowVisibility:eZ,scrollArrowsMountedCountRef:eC,getItemProps:e4,events:e0.context.events,valueRef:eT,valuesRef:eP,labelsRef:eM,typingRef:ej,selectionRef:ek,selectedItemTextRef:eL,validation:eg,onOpenChangeComplete:Q,keyboardActiveRef:eV,alignItemWithTriggerActiveRef:eO,initialValueRef:eX}),[eB,eb,K,eS,W,ee,et,er,el,eQ,eG,e4,e0.context.events,eg,Q,eZ]),te=(0,l.useMergedRefs)(J,eg.inputRef),tt=ee&&Array.isArray(ex)&&ex.length>0,tr=ee?void 0:eb,tn=r.useMemo(()=>ee&&Array.isArray(ex)&&eb?ex.map(e=>{let r=L(e,er);return(0,t.jsx)("input",{type:"hidden",name:eb,value:r},r)}):null,[ee,ex,eb,er]);return(0,t.jsx)(x.Provider,{value:e7,children:(0,t.jsxs)(y.Provider,{value:e0,children:[eo,(0,t.jsx)("input",{...eg.getInputValidationProps({onFocus(){eB.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.value,r=(0,D.createChangeEventDetails)(U.REASONS.none,e.nativeEvent);eB.set("forceMount",!0),queueMicrotask(function(){if(ee)return;let e=eP.current.find(e=>L(e,er).toLowerCase()===t.toLowerCase());null!=e&&(es(e!==ed.initialValue),eQ(e,r),ec()&&eg.commit(e))})}}),id:ev&&null==tr?`${ev}-hidden-input`:void 0,name:tr,autoComplete:$,value:eq,disabled:eS,required:K&&!tt,readOnly:W,ref:te,style:eb?n.visuallyHiddenInput:n.visuallyHidden,tabIndex:-1,"aria-hidden":!0}),tn]})})},"ScrollDownArrow",0,e2,"ScrollUpArrow",0,e5,"Separator",()=>e3.Separator,"Trigger",0,en,"Value",0,eo],278289);var e7=e.i(278289),e7=e7,te=e.i(975157),tt=e.i(314338),tt=tt,tr=e.i(533133),tn=e.i(792566),tn=tn;function tl({className:e,...r}){return(0,t.jsx)(e7.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:(0,te.cn)("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...r,children:(0,t.jsx)(tn.default,{})})}function to({className:e,...r}){return(0,t.jsx)(e7.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:(0,te.cn)("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...r,children:(0,t.jsx)(tt.default,{})})}e.s(["Select",0,function(e){return(0,t.jsx)(e7.Root,{modal:!1,...e})},"SelectContent",0,function({className:e,children:r,side:n="bottom",sideOffset:l=4,align:o="start",alignOffset:i=0,alignItemWithTrigger:s=!1,...a}){return(0,t.jsxs)(e7.Portal,{children:[(0,t.jsx)(e7.Backdrop,{className:"fixed inset-0 z-50"}),(0,t.jsx)(e7.Positioner,{side:n,sideOffset:l,align:o,alignOffset:i,alignItemWithTrigger:s,className:"isolate z-50",children:(0,t.jsxs)(e7.Popup,{"data-slot":"select-content","data-align-trigger":s,className:(0,te.cn)("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a,children:[(0,t.jsx)(tl,{}),(0,t.jsx)(e7.List,{children:r}),(0,t.jsx)(to,{})]})})]})},"SelectItem",0,function({className:e,children:r,...n}){return(0,t.jsxs)(e7.Item,{"data-slot":"select-item",className:(0,te.cn)("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[(0,t.jsx)(e7.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:r}),(0,t.jsx)(e7.ItemIndicator,{render:(0,t.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:(0,t.jsx)(tr.CheckIcon,{className:"pointer-events-none"})})]})},"SelectTrigger",0,function({className:e,size:r="default",children:n,...l}){return(0,t.jsxs)(e7.Trigger,{"data-slot":"select-trigger","data-size":r,className:(0,te.cn)("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...l,children:[n,(0,t.jsx)(e7.Icon,{render:(0,t.jsx)(tt.default,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}],967489);var ti=e.i(514798);let ts=(0,ti.createServerReference)("40118872f3d23c38466036d1df507ff3b1a2f96ba8",ti.callServer,void 0,ti.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,ts],338973)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},19671,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],19671)},475958,e=>{"use strict";let t=(0,e.i(572989).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],475958)},673984,e=>{"use strict";let t=(0,e.i(572989).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],673984)},566606,e=>{"use strict";var t,a=e.i(289721),s=e.i(965652),i=e.i(538059),n=e.i(821957),r=e.i(519455),l=e.i(793479),o=e.i(905455),d=e.i(746798),c=e.i(224277),u=e.i(400355),m=e.i(597746),h=e.i(657153),x=e.i(567860),p=e.i(572989);let g=(0,p.default)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);var f=e.i(533499),b=e.i(975157);let v=[{adapterType:"claude_code",provider:"claude",label:"Claude CLI"},{adapterType:"codex_cli",provider:"codex",label:"Codex CLI"}];function j({results:e,onResult:t}){let{t:i}=(0,f.useI18n)(),[n,l]=(0,s.useState)({}),o=v.some(e=>n[e.provider]);async function c(e){if(!n[e.provider]){l(t=>({...t,[e.provider]:!0}));try{let a=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:e.adapterType,provider:e.provider})}),s=await a.json();t(e.provider,s)}catch{t(e.provider,{ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]})}finally{l(t=>({...t,[e.provider]:!1}))}}}async function p(){await Promise.all(v.map(e=>c(e)))}return(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:i("onboarding.step2.passHint")}),(0,a.jsxs)(r.Button,{variant:"outline",onClick:p,disabled:o,children:[o?(0,a.jsx)(u.Loader2,{className:"h-4 w-4 animate-spin"}):(0,a.jsx)(x.Terminal,{className:"h-4 w-4"}),i("onboarding.step2.testAll")]})]}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-2",children:v.map(t=>{let s=!!n[t.provider],l=e[t.provider],o=l?.ok===!0,x=null!=l&&!l.ok,p=l?.checks.find(e=>!e.passed)?.message,f=s?i("settings.aiTools.testing"):o?i("settings.aiTools.testPassed"):x?p??i("settings.aiTools.testFailed"):i("onboarding.step2.notTested"),v=x?l.checks.filter(e=>!e.passed).map(e=>e.message).join("\n"):void 0;return(0,a.jsxs)("div",{className:(0,b.cn)("flex items-center gap-2.5 rounded-lg border px-3 py-2.5 transition-colors",o?"border-green-200 bg-green-50 dark:border-green-800 dark:bg-green-950/20":x?"border-red-200 bg-red-50 dark:border-red-800 dark:bg-red-950/20":"border-border bg-muted/30"),children:[(0,a.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:s?(0,a.jsx)(u.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"}):o?(0,a.jsx)(m.Check,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):x?(0,a.jsx)(h.X,{className:"h-4 w-4 text-red-600 dark:text-red-400"}):(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-muted-foreground/40"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium",children:t.label}),(0,a.jsx)("p",{className:(0,b.cn)("truncate text-xs",o?"text-green-700 dark:text-green-300":x?"text-red-700 dark:text-red-300":"text-muted-foreground"),title:v,children:f})]}),(0,a.jsxs)(d.Tooltip,{children:[(0,a.jsx)(d.TooltipTrigger,{render:(0,a.jsx)(r.Button,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground",onClick:()=>c(t),disabled:s,children:(0,a.jsx)(g,{className:"h-4 w-4"})})}),(0,a.jsx)(d.TooltipContent,{children:i("settings.aiTools.testConnection")})]})]},t.provider)})})]})}var y=e.i(964146),N=e.i(673984),k=e.i(226145),w=e.i(245697),C=e.i(19671),T=e.i(368490),S=e.i(387091),P=e.i(15299);let L=(0,p.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);var R=e.i(769757),M=e.i(232545),B=e.i(998626),I=e.i(453889),E=e.i(475958);e.s([],342627),e.i(342627),e.i(708878);var $=e.i(954588),O=e.i(314757),F=e.i(887642),U=e.i(804849),V=e.i(362891),H=e.i(903224),z=e.i(416369);let q=((t={}).checked="data-checked",t.unchecked="data-unchecked",t.indeterminate="data-indeterminate",t.disabled="data-disabled",t.readonly="data-readonly",t.required="data-required",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t);var K=e.i(551974);function A(e){return s.useMemo(()=>({checked:t=>e.indeterminate?{}:t?{[q.checked]:""}:{[q.unchecked]:""},...K.fieldValidityMapping}),[e.indeterminate])}var D=e.i(581263),W=e.i(207516),_=e.i(565455),G=e.i(282109),J=e.i(890514),Z=e.i(971667),X=e.i(421689),Y=e.i(571870),Q=e.i(179279),ee=e.i(689401),et=e.i(756499),ea=e.i(462902);let es=s.createContext(void 0);var ei=e.i(67077),en=e.i(586622),er=e.i(353052);let el=s.forwardRef(function(e,t){let{checked:i,className:n,defaultChecked:r=!1,"aria-labelledby":l,disabled:o=!1,id:d,indeterminate:c=!1,inputRef:u,name:m,onCheckedChange:h,parent:x=!1,readOnly:p=!1,render:g,required:f=!1,uncheckedValue:b,value:v,nativeButton:j=!1,...y}=e,{clearErrors:N}=(0,Y.useFormContext)(),{disabled:k,name:w,setDirty:C,setFilled:T,setFocused:S,setTouched:P,state:L,validationMode:R,validityData:M,shouldValidateOnChange:B,validation:I}=(0,J.useFieldRootContext)(),E=(0,Z.useFieldItemContext)(),{labelId:q,controlId:K,registerControlId:ea,getDescriptionProps:el}=(0,Q.useLabelableContext)(),eo=(0,et.useCheckboxGroupContext)(),ed=eo?.parent,ec=ed&&eo.allValues,eu=k||E.disabled||eo?.disabled||o,em=w??m,eh=v??em,ex=(0,W.useBaseUiId)(),ep=(0,W.useBaseUiId)(),eg=K;ec?eg=x?ep:`${ed.id}-${eh}`:d&&(eg=d);let ef={};ec&&(x?ef=eo.parent.getParentProps():eh&&(ef=eo.parent.getChildProps(eh)));let eb=(0,F.useStableCallback)(h),{checked:ev=i,indeterminate:ej=c,onCheckedChange:ey,...eN}=ef,ek=eo?.value,ew=eo?.setValue,eC=eo?.defaultValue,eT=s.useRef(null),eS=(0,H.useRefWithInit)(()=>Symbol("checkbox-control")),eP=s.useRef(!1),{getButtonProps:eL,buttonRef:eR}=(0,G.useButton)({disabled:eu,native:j}),eM=eo?.validation??I,[eB,eI]=(0,O.useControlled)({controlled:eh&&ek&&!x?ek.includes(eh):ev,default:eh&&eC&&!x?eC.includes(eh):r,name:"Checkbox",state:"checked"});(0,U.useIsoLayoutEffect)(()=>{ea!==$.NOOP&&(eP.current=!0,ea(eS.current,eg))},[eg,eo,ea,x,eS]),s.useEffect(()=>{let e=eS.current;return()=>{eP.current&&ea!==$.NOOP&&(eP.current=!1,ea(e,void 0))}},[ea,eS]),(0,X.useField)({enabled:!eo,id:ex,commit:eM.commit,value:eB,controlRef:eT,name:em,getValue:()=>eB});let eE=s.useRef(null),e$=(0,V.useMergedRefs)(u,eE,eM.inputRef),eO=(0,ee.useAriaLabelledBy)(l,q,eE,!j,eg??void 0);(0,U.useIsoLayoutEffect)(()=>{eE.current&&(eE.current.indeterminate=ej,eB&&T(!0))},[eB,ej,T]),(0,er.useValueChanged)(eB,()=>{(!eo||x)&&(N(em),T(eB),C(eB!==M.initialValue),B()?eM.commit(eB):eM.commit(eB,!0))});let eF=(0,_.mergeProps)({checked:eB,disabled:eu,name:x?void 0:em,id:j?void 0:eg??void 0,required:f,ref:e$,style:em?z.visuallyHiddenInput:z.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked,a=(0,ei.createChangeEventDetails)(en.REASONS.none,e.nativeEvent);ey?.(t,a),eb(t,a),!a.isCanceled&&(eI(t),eh&&ek&&ew&&!x&&ew(t?[...ek,eh]:ek.filter(e=>e!==eh),a))},onFocus(){eT.current?.focus()}},void 0!==v?{value:(eo?eB&&v:v)||""}:$.EMPTY_OBJECT,el,eo?eM.getValidationProps:eM.getInputValidationProps),eU=ec?!!ev:eB,eV=ec&&ej||c;s.useEffect(()=>{if(!ed||!eh)return;let e=ed.disabledStatesRef.current;return e.set(eh,eu),()=>{e.delete(eh)}},[ed,eu,eh]);let eH=s.useMemo(()=>({...L,checked:eU,disabled:eu,readOnly:p,required:f,indeterminate:eV}),[L,eU,eu,p,f,eV]),ez=A(eH),eq=(0,D.useRenderElement)("span",e,{state:eH,ref:[eR,eT,t,eo?.registerControlRef],props:[{id:j?eg??void 0:ex,role:"checkbox","aria-checked":ej?"mixed":eB,"aria-readonly":p||void 0,"aria-required":f||void 0,"aria-labelledby":eO,"data-parent":x?"":void 0,onFocus(){S(!0)},onBlur(){let e=eE.current;e&&(P(!0),S(!1),"onBlur"===R&&eM.commit(eo?ek:e.checked))},onClick(e){p||eu||(e.preventDefault(),eE.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},el,eM.getValidationProps,y,eN,eL],stateAttributesMapping:ez});return(0,a.jsxs)(es.Provider,{value:eH,children:[eq,!eB&&!eo&&em&&!x&&void 0!==b&&(0,a.jsx)("input",{type:"hidden",name:em,value:b}),(0,a.jsx)("input",{...eF})]})});var eo=e.i(504068),ed=e.i(193214),ec=e.i(809058);let eu=s.forwardRef(function(e,t){let{render:a,className:i,keepMounted:n=!1,...r}=e,l=function(){let e=s.useContext(es);if(void 0===e)throw Error((0,ea.default)(14));return e}(),o=l.checked||l.indeterminate,{mounted:d,transitionStatus:c,setMounted:u}=(0,ed.useTransitionStatus)(o),m=s.useRef(null),h={...l,transitionStatus:c};(0,eo.useOpenChangeComplete)({open:o,ref:m,onComplete(){o||u(!1)}});let x=A(l),p=s.useMemo(()=>({...x,...ec.transitionStatusMapping,...K.fieldValidityMapping}),[x]),g=(0,D.useRenderElement)("span",e,{ref:[t,m],state:h,stateAttributesMapping:p,props:r});return n||d?g:null});e.s(["Indicator",0,eu,"Root",0,el],606680);var em=e.i(606680),em=em,eh=e.i(533133);function ex({className:e,...t}){return(0,a.jsx)(em.Root,{"data-slot":"checkbox",className:(0,b.cn)("peer size-4 shrink-0 rounded-[4px] border border-input bg-background shadow-xs outline-none transition-[color,box-shadow] dark:bg-input/30","data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40","data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...t,children:(0,a.jsx)(em.Indicator,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current",children:(0,a.jsx)(eh.CheckIcon,{className:"size-3.5",strokeWidth:3})})})}var ep=e.i(887911),eg=e.i(635715),ef=e.i(514798);let eb=(0,ef.createServerReference)("6065d16f647c6ee94cb2f15606a415704e7fd8e696",ef.callServer,void 0,ef.findSourceMapURL,"completeOnboarding"),ev=(0,ef.createServerReference)("60842739efa841a1ba87b142d51e567915f66e14e4",ef.callServer,void 0,ef.findSourceMapURL,"setOnboardingExtensions");function ej({username:e,onComplete:t}){let{t:i}=(0,f.useI18n)(),n=(0,ep.listExtensionMetadata)(),[l,o]=(0,s.useState)(()=>new Set(n.map(e=>e.id))),[d,c]=(0,s.useState)(!1),m=n.length,h=l.size;async function x(){c(!0);let a=Array.from(l),s=[];if(a.length>0)for(let e of(await Promise.all(a.map(async e=>{try{let t=await (0,eg.installExtension)(e);return{id:e,success:t.success}}catch{return{id:e,success:!1}}}))))e.success&&s.push(e.id);await ev(a,s),await eb(e),c(!1),t()}return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:i("onboarding.step4.title")}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:i("onboarding.step4.desc")})]}),(0,a.jsx)("div",{className:"space-y-2",children:n.map(e=>{let t=e.icon,s=l.has(e.id);return(0,a.jsxs)("label",{className:`flex items-start gap-3 rounded-lg border p-3 cursor-pointer transition-colors ${s?"border-primary/40 bg-primary/5 hover:bg-primary/10":"border-border bg-background hover:bg-accent/50"}`,children:[(0,a.jsx)(ex,{checked:s,onCheckedChange:()=>{var t;return t=e.id,void o(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},disabled:d,className:"mt-0.5"}),(0,a.jsxs)("div",{className:"flex flex-1 items-start gap-3 min-w-0",children:[(0,a.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:(0,a.jsx)(t,{className:"h-4 w-4 text-muted-foreground"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,a.jsxs)("span",{className:"shrink-0 text-xs text-muted-foreground",children:["~",e.sizeMB," MB"]})]}),(0,a.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.description}),(0,a.jsxs)("a",{href:e.homepageUrl,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"mt-1 inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[(0,a.jsx)(E.ExternalLink,{className:"h-3 w-3"}),i("settings.extensions.visitHomepage")]})]})]})]},e.id)})}),h<m&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground italic",children:i("onboarding.step4.skipHint")}),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)(r.Button,{onClick:x,disabled:d,children:d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),i("onboarding.step4.installing")]}):0===h?i("onboarding.step4.continueWithoutInstall"):i("onboarding.step4.continue")})})]})}function ey({step:e}){let t=[N.User,x.Terminal,k.GitBranch,w.Package][e-1]??N.User,s=["Profile","Connect","Configure","Extensions"][e-1]??"";return(0,a.jsxs)("div",{className:"relative h-full w-full overflow-hidden",children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-[0.07] text-white",style:{backgroundImage:"radial-gradient(circle, currentColor 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{width:"380px",height:"380px",background:"radial-gradient(circle, oklch(0.80 0.14 75 / 0.25) 0%, oklch(0.80 0.14 75 / 0.08) 45%, transparent 70%)",animation:"ob-pulse 6s ease-in-out infinite"}}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/25",style:{width:"260px",height:"260px",animation:"ob-spin 20s linear infinite"},children:(0,a.jsx)("div",{className:"absolute -top-1.5 left-1/2 -translate-x-1/2 h-3 w-3 rounded-full bg-amber-400",style:{boxShadow:"0 0 16px oklch(0.80 0.14 75 / 0.7)"}})}),(0,a.jsxs)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/15",style:{width:"380px",height:"380px",animation:"ob-spin 30s linear infinite reverse"},children:[(0,a.jsx)("div",{className:"absolute -top-1 left-1/2 -translate-x-1/2 h-2 w-2 rounded-full bg-amber-400/70"}),(0,a.jsx)("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 h-1.5 w-1.5 rounded-full bg-amber-400/50"})]}),(0,a.jsx)("svg",{className:"absolute",style:{top:"18%",right:"22%",animation:"ob-float 8s ease-in-out infinite"},width:"44",height:"50",viewBox:"0 0 40 46",fill:"none",children:(0,a.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.4)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.06)"})}),(0,a.jsx)("svg",{className:"absolute",style:{bottom:"22%",left:"18%",animation:"ob-float 10s ease-in-out 2s infinite"},width:"32",height:"36",viewBox:"0 0 40 46",fill:"none",children:(0,a.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.3)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.05)"})}),(0,a.jsx)("div",{className:"absolute h-3.5 w-3.5 rounded-full bg-amber-400/40",style:{top:"30%",left:"28%",animation:"ob-float 7s ease-in-out 1s infinite"}}),(0,a.jsx)("div",{className:"absolute h-2.5 w-2.5 rounded-full bg-amber-400/30",style:{top:"65%",right:"30%",animation:"ob-float 9s ease-in-out 3s infinite"}}),(0,a.jsx)("div",{className:"absolute h-2 w-2 rounded-full bg-amber-400/20",style:{top:"45%",right:"15%",animation:"ob-float 6s ease-in-out 0.5s infinite"}}),(0,a.jsxs)("svg",{className:"absolute inset-0 h-full w-full text-white opacity-[0.12]",children:[(0,a.jsx)("line",{x1:"30%",y1:"25%",x2:"70%",y2:"45%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 12s linear infinite"}}),(0,a.jsx)("line",{x1:"65%",y1:"30%",x2:"35%",y2:"70%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 15s linear infinite reverse"}})]}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,a.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl border border-amber-400/35 bg-amber-500/10 backdrop-blur-sm transition-all duration-700",style:{boxShadow:"0 0 50px oklch(0.80 0.14 75 / 0.2)"},children:(0,a.jsx)(t,{className:"h-7 w-7 text-amber-400"})})}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 translate-y-12 text-center",children:(0,a.jsx)("p",{className:"text-[11px] font-medium tracking-widest uppercase text-amber-400/60",children:s})})]})}let eN={host:"",ownerMatch:"*",localPathTemplate:""};e.s(["default",0,function(){let e,t,u,h=(0,i.useRouter)(),{t:p,locale:g,setLocale:b}=(0,f.useI18n)(),{theme:v,setTheme:E}=(0,n.useTheme)(),[$,O]=(0,s.useState)(!1),[F,U]=(0,s.useState)(1),[V,H]=(0,s.useState)(""),[z,q]=(0,s.useState)({}),K=Object.values(z).some(e=>e.ok),[A,D]=(0,s.useState)([]),[W,_]=(0,s.useState)({...eN}),[G,J]=(0,s.useState)(!0),[Z,X]=(0,s.useState)(0),[Y,Q]=(0,s.useState)(!1),[ee,et]=(0,s.useState)(!1);(0,s.useEffect)(()=>O(!0),[]);let ea=[{value:"light",label:(0,a.jsx)(S.Sun,{className:"h-4 w-4"})},{value:"dark",label:(0,a.jsx)(P.Moon,{className:"h-4 w-4"})},{value:"system",label:(0,a.jsx)(L,{className:"h-4 w-4"})}];function es(){U(e=>e+1)}function ei(){U(e=>Math.max(1,e-1))}let en=[{icon:N.User,label:p("onboarding.step1.title")},{icon:x.Terminal,label:p("onboarding.step2.title")},{icon:k.GitBranch,label:p("onboarding.step3.title")},{icon:w.Package,label:p("onboarding.step4.title")}];return(0,a.jsxs)("div",{className:"flex h-screen bg-background",children:[(0,a.jsx)("div",{className:"hidden xl:block xl:w-3/5 border-r border-border/50 bg-[oklch(0.13_0.006_260)]",children:(0,a.jsx)(ey,{step:F})}),(0,a.jsx)("div",{className:"flex w-full flex-col items-center px-8 pt-[10vh] pb-10 xl:w-2/5 xl:px-16 overflow-y-auto",children:(0,a.jsxs)("div",{className:"w-full max-w-lg space-y-6",children:[(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-8 w-8 rounded-lg"}),(0,a.jsx)("span",{className:"text-lg font-semibold tracking-tight",children:"Tower"})]}),(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:en.map((e,t)=>{let s=t+1,i=s===F,n=s<F,r=e.icon;return(0,a.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[t>0&&(0,a.jsx)("div",{className:`h-px w-4 transition-colors duration-500 ${n?"bg-primary":"bg-border"}`}),(0,a.jsxs)("div",{className:`flex items-center gap-1 shrink-0 rounded-full px-2 py-1 text-[11px] font-medium whitespace-nowrap transition-all duration-500 ${i?"bg-primary text-primary-foreground shadow-sm":n?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:[n?(0,a.jsx)(m.Check,{className:"h-3 w-3 shrink-0"}):(0,a.jsx)(r,{className:"h-3 w-3 shrink-0"}),(0,a.jsx)("span",{children:e.label})]})]},t)})})]}),(0,a.jsxs)("div",{children:[1===F&&(0,a.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:p("onboarding.step1.title")}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:p("onboarding.step1.desc")})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:"onboarding-username",className:"text-sm font-medium",children:p("onboarding.step1.usernameLabel")}),(0,a.jsx)("input",{id:"onboarding-username",type:"text",value:V,onChange:e=>H(e.target.value),placeholder:p("onboarding.step1.usernamePlaceholder"),className:"flex h-10 w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",maxLength:64,autoFocus:!0,autoComplete:"username"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,a.jsxs)("div",{className:"space-y-2.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(R.Languages,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,a.jsx)("label",{className:"text-sm font-medium",children:p("settings.language")})]}),(0,a.jsx)(o.SegmentedControl,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}].map(e=>({value:e.value,label:e.label})),value:g,onChange:e=>b(e)})]}),(0,a.jsxs)("div",{className:"space-y-2.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(S.Sun,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,a.jsx)("label",{className:"text-sm font-medium",children:p("settings.theme")})]}),$?(0,a.jsx)(o.SegmentedControl,{options:ea.map(e=>({value:e.value,label:e.label})),value:v??"system",onChange:e=>E(e)}):(0,a.jsx)("div",{className:"inline-flex h-8 rounded-md border border-border bg-muted p-1 gap-1 w-[120px]"})]})]}),(0,a.jsx)("div",{className:"flex justify-end pt-3",children:(0,a.jsxs)(r.Button,{onClick:es,disabled:0===V.trim().length,className:"px-5",children:[p("onboarding.step1.next"),(0,a.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})})]}),2===F&&(0,a.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:p("onboarding.step2.title")}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:p("onboarding.step2.desc")})]}),(0,a.jsx)(j,{results:z,onResult:(e,t)=>q(a=>({...a,[e]:t}))}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,a.jsxs)(r.Button,{variant:"ghost",className:"text-muted-foreground",onClick:ei,children:[(0,a.jsx)(C.ChevronLeft,{className:"h-4 w-4 mr-1"}),p("onboarding.back")]}),(0,a.jsxs)(r.Button,{onClick:es,disabled:!K,className:"px-5",children:[p("onboarding.step1.next"),(0,a.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),3===F&&(0,a.jsxs)("div",{className:"space-y-5 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:p("onboarding.step3.title")}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:p("onboarding.step3.desc")})]}),A.length>0&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:p("onboarding.step3.added").replace("{count}",String(A.length))}),A.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"text-sm font-medium truncate",children:[e.host,(0,a.jsx)("span",{className:"text-muted-foreground",children:"*"!==e.ownerMatch?` / ${e.ownerMatch}`:""})]}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground font-mono truncate",children:e.localPathTemplate})]}),(0,a.jsx)(r.Button,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>{var t;return t=e.id,void D(e=>e.filter(e=>e.id!==t))},children:(0,a.jsx)(B.Trash2,{className:"h-3.5 w-3.5"})})]},e.id))]}),G?(0,a.jsxs)("div",{className:"space-y-3 rounded-lg border border-border p-4",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{className:"text-xs font-medium",children:p("onboarding.step3.hostLabel")}),(0,a.jsx)(l.Input,{value:W.host,onChange:e=>_(t=>({...t,host:e.target.value})),placeholder:p("onboarding.step3.hostPlaceholder"),className:"h-9",autoFocus:!0})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{className:"text-xs font-medium",children:p("onboarding.step3.ownerLabel")}),(0,a.jsx)(l.Input,{value:W.ownerMatch,onChange:e=>_(t=>({...t,ownerMatch:e.target.value})),placeholder:p("onboarding.step3.ownerPlaceholder"),className:"h-9"})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{className:"block text-xs font-medium",children:p("onboarding.step3.pathLabel")}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(l.Input,{value:W.localPathTemplate,onChange:e=>_(t=>({...t,localPathTemplate:e.target.value})),placeholder:p("onboarding.step3.pathPlaceholder"),className:"h-9 font-mono text-xs flex-1"}),(0,a.jsxs)(d.Tooltip,{children:[(0,a.jsx)(d.TooltipTrigger,{render:(0,a.jsx)(r.Button,{variant:Y?"default":"outline",size:"sm",type:"button",onClick:()=>{Q(e=>(e||X(2),!e))},className:"shrink-0 font-mono",children:"{path}"})}),(0,a.jsx)(d.TooltipContent,{side:"top",className:"max-w-xs",children:(0,a.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,a.jsx)("div",{className:"font-medium",children:p("settings.config.git.pathTooltipTitle")}),(0,a.jsx)("div",{className:"opacity-80",children:p("settings.config.git.pathTooltipDetail")})]})})]}),(0,a.jsxs)(d.Tooltip,{children:[(0,a.jsx)(d.TooltipTrigger,{render:(0,a.jsx)(r.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>et(!0),children:(0,a.jsx)(I.FolderOpen,{className:"h-4 w-4"})})}),(0,a.jsx)(d.TooltipContent,{children:p("settings.config.git.pickFolder")})]})]}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:p(Y?"onboarding.step3.pathHintFull":"onboarding.step3.pathHintRepo")})]}),W.localPathTemplate&&(e=W.localPathTemplate.trim().replace(/\/+$/,""),t=Y?`${e}/{path}`:e,u=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium",children:p("onboarding.step3.previewLabel")}),(0,a.jsx)("div",{className:"flex gap-1 flex-wrap",children:u.map((e,t)=>(0,a.jsx)("button",{type:"button",onClick:()=>X(t),className:`rounded-md px-2 py-1 text-[11px] font-medium transition-colors ${Z===t?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e.label},t))}),(0,a.jsxs)("div",{className:"rounded-md bg-muted/50 px-3 py-2 space-y-1",children:[(0,a.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:u[Z].url}),(0,a.jsxs)("p",{className:"font-mono text-xs",children:[(0,a.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,a.jsx)("span",{className:"text-primary",children:function(e,t){if(!e||!t)return"";let a=t.trim(),s=[],i=a.match(/^git@[^:]+:(.+)$/);if(i)s=i[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let e=new URL(a);s=decodeURIComponent(e.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!s.length)return"";let n=s[0],r=s[s.length-1],l=s.join("/");if(e.includes("{path}"))return e.replace("{path}",l).replace("{owner}",n).replace("{repo}",r).replace(/\/+$/,"");let o=e.replace("{owner}",n).replace("{repo}","").replace(/\/+$/,"");return`${o}/${r}`}(t,u[Z].url)})]})]})]})),(0,a.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[A.length>0&&(0,a.jsx)(r.Button,{variant:"ghost",onClick:()=>J(!1),children:p("settings.config.git.cancel")}),(0,a.jsxs)(r.Button,{onClick:function(){if(!W.host.trim()||!W.localPathTemplate.trim())return;let e=W.localPathTemplate.trim().replace(/\/+$/,""),t=Y?`${e}/{path}`:e,a={id:crypto.randomUUID(),host:W.host.trim(),ownerMatch:W.ownerMatch.trim()||"*",localPathTemplate:t,priority:A.length};D(e=>[...e,a]),_({...eN}),Q(!1),J(!1)},disabled:!W.host.trim()||!W.localPathTemplate.trim(),children:[(0,a.jsx)(m.Check,{className:"h-4 w-4 mr-1"}),p("settings.config.git.save")]})]})]}):(0,a.jsxs)(r.Button,{variant:"outline",onClick:()=>{_({...eN}),J(!0)},children:[(0,a.jsx)(M.Plus,{className:"h-4 w-4 mr-1"}),p("settings.config.git.addRule")]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,a.jsxs)(r.Button,{variant:"ghost",className:"text-muted-foreground",onClick:ei,children:[(0,a.jsx)(C.ChevronLeft,{className:"h-4 w-4 mr-1"}),p("onboarding.back")]}),(0,a.jsxs)(r.Button,{onClick:async()=>{A.length>0&&await (0,y.setConfigValue)("git.pathMappingRules",A),U(e=>e+1)},className:"px-5",children:[p("onboarding.step1.next"),(0,a.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),4===F&&(0,a.jsx)(ej,{username:V,onComplete:()=>h.replace("/workspaces")})]}),(0,a.jsx)("div",{className:"pt-6 text-xs text-muted-foreground",children:p("onboarding.stepIndicator").replace("{current}",String(F)).replace("{total}",String(4))})]})}),(0,a.jsx)(c.FolderBrowserDialog,{open:ee,onOpenChange:et,onSelect:e=>{_(t=>({...t,localPathTemplate:e})),et(!1)}})]})}],566606)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},19671,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],19671)},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},475958,e=>{"use strict";let t=(0,e.i(572989).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],475958)},673984,e=>{"use strict";let t=(0,e.i(572989).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],673984)},566606,e=>{"use strict";var t,a=e.i(289721),s=e.i(965652),i=e.i(538059),n=e.i(821957),r=e.i(519455),l=e.i(793479),o=e.i(905455),d=e.i(746798),c=e.i(224277),u=e.i(400355),m=e.i(597746),h=e.i(657153),x=e.i(567860),p=e.i(572989);let g=(0,p.default)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);var f=e.i(533499),b=e.i(975157);let v=[{adapterType:"claude_code",provider:"claude",label:"Claude CLI"},{adapterType:"codex_cli",provider:"codex",label:"Codex CLI"}];function j({results:e,onResult:t}){let{t:i}=(0,f.useI18n)(),[n,l]=(0,s.useState)({}),o=v.some(e=>n[e.provider]);async function c(e){if(!n[e.provider]){l(t=>({...t,[e.provider]:!0}));try{let a=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:e.adapterType,provider:e.provider})}),s=await a.json();t(e.provider,s)}catch{t(e.provider,{ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]})}finally{l(t=>({...t,[e.provider]:!1}))}}}async function p(){await Promise.all(v.map(e=>c(e)))}return(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:i("onboarding.step2.passHint")}),(0,a.jsxs)(r.Button,{variant:"outline",onClick:p,disabled:o,children:[o?(0,a.jsx)(u.Loader2,{className:"h-4 w-4 animate-spin"}):(0,a.jsx)(x.Terminal,{className:"h-4 w-4"}),i("onboarding.step2.testAll")]})]}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-2",children:v.map(t=>{let s=!!n[t.provider],l=e[t.provider],o=l?.ok===!0,x=null!=l&&!l.ok,p=l?.checks.find(e=>!e.passed)?.message,f=s?i("settings.aiTools.testing"):o?i("settings.aiTools.testPassed"):x?p??i("settings.aiTools.testFailed"):i("onboarding.step2.notTested"),v=x?l.checks.filter(e=>!e.passed).map(e=>e.message).join("\n"):void 0;return(0,a.jsxs)("div",{className:(0,b.cn)("flex items-center gap-2.5 rounded-lg border px-3 py-2.5 transition-colors",o?"border-green-200 bg-green-50 dark:border-green-800 dark:bg-green-950/20":x?"border-red-200 bg-red-50 dark:border-red-800 dark:bg-red-950/20":"border-border bg-muted/30"),children:[(0,a.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:s?(0,a.jsx)(u.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"}):o?(0,a.jsx)(m.Check,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):x?(0,a.jsx)(h.X,{className:"h-4 w-4 text-red-600 dark:text-red-400"}):(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-muted-foreground/40"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium",children:t.label}),(0,a.jsx)("p",{className:(0,b.cn)("truncate text-xs",o?"text-green-700 dark:text-green-300":x?"text-red-700 dark:text-red-300":"text-muted-foreground"),title:v,children:f})]}),(0,a.jsxs)(d.Tooltip,{children:[(0,a.jsx)(d.TooltipTrigger,{render:(0,a.jsx)(r.Button,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground",onClick:()=>c(t),disabled:s,children:(0,a.jsx)(g,{className:"h-4 w-4"})})}),(0,a.jsx)(d.TooltipContent,{children:i("settings.aiTools.testConnection")})]})]},t.provider)})})]})}var y=e.i(863255),N=e.i(673984),k=e.i(226145),w=e.i(245697),C=e.i(19671),T=e.i(368490),S=e.i(387091),P=e.i(15299);let L=(0,p.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);var R=e.i(769757),M=e.i(232545),B=e.i(998626),I=e.i(453889),E=e.i(475958);e.s([],342627),e.i(342627),e.i(708878);var $=e.i(954588),O=e.i(314757),F=e.i(887642),U=e.i(804849),V=e.i(362891),H=e.i(903224),z=e.i(416369);let q=((t={}).checked="data-checked",t.unchecked="data-unchecked",t.indeterminate="data-indeterminate",t.disabled="data-disabled",t.readonly="data-readonly",t.required="data-required",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t);var K=e.i(551974);function A(e){return s.useMemo(()=>({checked:t=>e.indeterminate?{}:t?{[q.checked]:""}:{[q.unchecked]:""},...K.fieldValidityMapping}),[e.indeterminate])}var D=e.i(581263),W=e.i(207516),_=e.i(565455),G=e.i(282109),J=e.i(890514),Z=e.i(971667),X=e.i(421689),Y=e.i(571870),Q=e.i(179279),ee=e.i(689401),et=e.i(756499),ea=e.i(462902);let es=s.createContext(void 0);var ei=e.i(67077),en=e.i(586622),er=e.i(353052);let el=s.forwardRef(function(e,t){let{checked:i,className:n,defaultChecked:r=!1,"aria-labelledby":l,disabled:o=!1,id:d,indeterminate:c=!1,inputRef:u,name:m,onCheckedChange:h,parent:x=!1,readOnly:p=!1,render:g,required:f=!1,uncheckedValue:b,value:v,nativeButton:j=!1,...y}=e,{clearErrors:N}=(0,Y.useFormContext)(),{disabled:k,name:w,setDirty:C,setFilled:T,setFocused:S,setTouched:P,state:L,validationMode:R,validityData:M,shouldValidateOnChange:B,validation:I}=(0,J.useFieldRootContext)(),E=(0,Z.useFieldItemContext)(),{labelId:q,controlId:K,registerControlId:ea,getDescriptionProps:el}=(0,Q.useLabelableContext)(),eo=(0,et.useCheckboxGroupContext)(),ed=eo?.parent,ec=ed&&eo.allValues,eu=k||E.disabled||eo?.disabled||o,em=w??m,eh=v??em,ex=(0,W.useBaseUiId)(),ep=(0,W.useBaseUiId)(),eg=K;ec?eg=x?ep:`${ed.id}-${eh}`:d&&(eg=d);let ef={};ec&&(x?ef=eo.parent.getParentProps():eh&&(ef=eo.parent.getChildProps(eh)));let eb=(0,F.useStableCallback)(h),{checked:ev=i,indeterminate:ej=c,onCheckedChange:ey,...eN}=ef,ek=eo?.value,ew=eo?.setValue,eC=eo?.defaultValue,eT=s.useRef(null),eS=(0,H.useRefWithInit)(()=>Symbol("checkbox-control")),eP=s.useRef(!1),{getButtonProps:eL,buttonRef:eR}=(0,G.useButton)({disabled:eu,native:j}),eM=eo?.validation??I,[eB,eI]=(0,O.useControlled)({controlled:eh&&ek&&!x?ek.includes(eh):ev,default:eh&&eC&&!x?eC.includes(eh):r,name:"Checkbox",state:"checked"});(0,U.useIsoLayoutEffect)(()=>{ea!==$.NOOP&&(eP.current=!0,ea(eS.current,eg))},[eg,eo,ea,x,eS]),s.useEffect(()=>{let e=eS.current;return()=>{eP.current&&ea!==$.NOOP&&(eP.current=!1,ea(e,void 0))}},[ea,eS]),(0,X.useField)({enabled:!eo,id:ex,commit:eM.commit,value:eB,controlRef:eT,name:em,getValue:()=>eB});let eE=s.useRef(null),e$=(0,V.useMergedRefs)(u,eE,eM.inputRef),eO=(0,ee.useAriaLabelledBy)(l,q,eE,!j,eg??void 0);(0,U.useIsoLayoutEffect)(()=>{eE.current&&(eE.current.indeterminate=ej,eB&&T(!0))},[eB,ej,T]),(0,er.useValueChanged)(eB,()=>{(!eo||x)&&(N(em),T(eB),C(eB!==M.initialValue),B()?eM.commit(eB):eM.commit(eB,!0))});let eF=(0,_.mergeProps)({checked:eB,disabled:eu,name:x?void 0:em,id:j?void 0:eg??void 0,required:f,ref:e$,style:em?z.visuallyHiddenInput:z.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked,a=(0,ei.createChangeEventDetails)(en.REASONS.none,e.nativeEvent);ey?.(t,a),eb(t,a),!a.isCanceled&&(eI(t),eh&&ek&&ew&&!x&&ew(t?[...ek,eh]:ek.filter(e=>e!==eh),a))},onFocus(){eT.current?.focus()}},void 0!==v?{value:(eo?eB&&v:v)||""}:$.EMPTY_OBJECT,el,eo?eM.getValidationProps:eM.getInputValidationProps),eU=ec?!!ev:eB,eV=ec&&ej||c;s.useEffect(()=>{if(!ed||!eh)return;let e=ed.disabledStatesRef.current;return e.set(eh,eu),()=>{e.delete(eh)}},[ed,eu,eh]);let eH=s.useMemo(()=>({...L,checked:eU,disabled:eu,readOnly:p,required:f,indeterminate:eV}),[L,eU,eu,p,f,eV]),ez=A(eH),eq=(0,D.useRenderElement)("span",e,{state:eH,ref:[eR,eT,t,eo?.registerControlRef],props:[{id:j?eg??void 0:ex,role:"checkbox","aria-checked":ej?"mixed":eB,"aria-readonly":p||void 0,"aria-required":f||void 0,"aria-labelledby":eO,"data-parent":x?"":void 0,onFocus(){S(!0)},onBlur(){let e=eE.current;e&&(P(!0),S(!1),"onBlur"===R&&eM.commit(eo?ek:e.checked))},onClick(e){p||eu||(e.preventDefault(),eE.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},el,eM.getValidationProps,y,eN,eL],stateAttributesMapping:ez});return(0,a.jsxs)(es.Provider,{value:eH,children:[eq,!eB&&!eo&&em&&!x&&void 0!==b&&(0,a.jsx)("input",{type:"hidden",name:em,value:b}),(0,a.jsx)("input",{...eF})]})});var eo=e.i(504068),ed=e.i(193214),ec=e.i(809058);let eu=s.forwardRef(function(e,t){let{render:a,className:i,keepMounted:n=!1,...r}=e,l=function(){let e=s.useContext(es);if(void 0===e)throw Error((0,ea.default)(14));return e}(),o=l.checked||l.indeterminate,{mounted:d,transitionStatus:c,setMounted:u}=(0,ed.useTransitionStatus)(o),m=s.useRef(null),h={...l,transitionStatus:c};(0,eo.useOpenChangeComplete)({open:o,ref:m,onComplete(){o||u(!1)}});let x=A(l),p=s.useMemo(()=>({...x,...ec.transitionStatusMapping,...K.fieldValidityMapping}),[x]),g=(0,D.useRenderElement)("span",e,{ref:[t,m],state:h,stateAttributesMapping:p,props:r});return n||d?g:null});e.s(["Indicator",0,eu,"Root",0,el],606680);var em=e.i(606680),em=em,eh=e.i(533133);function ex({className:e,...t}){return(0,a.jsx)(em.Root,{"data-slot":"checkbox",className:(0,b.cn)("peer size-4 shrink-0 rounded-[4px] border border-input bg-background shadow-xs outline-none transition-[color,box-shadow] dark:bg-input/30","data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40","data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...t,children:(0,a.jsx)(em.Indicator,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current",children:(0,a.jsx)(eh.CheckIcon,{className:"size-3.5",strokeWidth:3})})})}var ep=e.i(887911),eg=e.i(311687),ef=e.i(514798);let eb=(0,ef.createServerReference)("6076596bd293cdd855f89742a00cf37915e785323c",ef.callServer,void 0,ef.findSourceMapURL,"completeOnboarding"),ev=(0,ef.createServerReference)("60989c7084fe6a3648aaebdf6450e4d69d1b62e7f2",ef.callServer,void 0,ef.findSourceMapURL,"setOnboardingExtensions");function ej({username:e,onComplete:t}){let{t:i}=(0,f.useI18n)(),n=(0,ep.listExtensionMetadata)(),[l,o]=(0,s.useState)(()=>new Set(n.map(e=>e.id))),[d,c]=(0,s.useState)(!1),m=n.length,h=l.size;async function x(){c(!0);let a=Array.from(l),s=[];if(a.length>0)for(let e of(await Promise.all(a.map(async e=>{try{let t=await (0,eg.installExtension)(e);return{id:e,success:t.success}}catch{return{id:e,success:!1}}}))))e.success&&s.push(e.id);await ev(a,s),await eb(e),c(!1),t()}return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:i("onboarding.step4.title")}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:i("onboarding.step4.desc")})]}),(0,a.jsx)("div",{className:"space-y-2",children:n.map(e=>{let t=e.icon,s=l.has(e.id);return(0,a.jsxs)("label",{className:`flex items-start gap-3 rounded-lg border p-3 cursor-pointer transition-colors ${s?"border-primary/40 bg-primary/5 hover:bg-primary/10":"border-border bg-background hover:bg-accent/50"}`,children:[(0,a.jsx)(ex,{checked:s,onCheckedChange:()=>{var t;return t=e.id,void o(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},disabled:d,className:"mt-0.5"}),(0,a.jsxs)("div",{className:"flex flex-1 items-start gap-3 min-w-0",children:[(0,a.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:(0,a.jsx)(t,{className:"h-4 w-4 text-muted-foreground"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,a.jsxs)("span",{className:"shrink-0 text-xs text-muted-foreground",children:["~",e.sizeMB," MB"]})]}),(0,a.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.description}),(0,a.jsxs)("a",{href:e.homepageUrl,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"mt-1 inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[(0,a.jsx)(E.ExternalLink,{className:"h-3 w-3"}),i("settings.extensions.visitHomepage")]})]})]})]},e.id)})}),h<m&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground italic",children:i("onboarding.step4.skipHint")}),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)(r.Button,{onClick:x,disabled:d,children:d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),i("onboarding.step4.installing")]}):0===h?i("onboarding.step4.continueWithoutInstall"):i("onboarding.step4.continue")})})]})}function ey({step:e}){let t=[N.User,x.Terminal,k.GitBranch,w.Package][e-1]??N.User,s=["Profile","Connect","Configure","Extensions"][e-1]??"";return(0,a.jsxs)("div",{className:"relative h-full w-full overflow-hidden",children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-[0.07] text-white",style:{backgroundImage:"radial-gradient(circle, currentColor 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{width:"380px",height:"380px",background:"radial-gradient(circle, oklch(0.80 0.14 75 / 0.25) 0%, oklch(0.80 0.14 75 / 0.08) 45%, transparent 70%)",animation:"ob-pulse 6s ease-in-out infinite"}}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/25",style:{width:"260px",height:"260px",animation:"ob-spin 20s linear infinite"},children:(0,a.jsx)("div",{className:"absolute -top-1.5 left-1/2 -translate-x-1/2 h-3 w-3 rounded-full bg-amber-400",style:{boxShadow:"0 0 16px oklch(0.80 0.14 75 / 0.7)"}})}),(0,a.jsxs)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/15",style:{width:"380px",height:"380px",animation:"ob-spin 30s linear infinite reverse"},children:[(0,a.jsx)("div",{className:"absolute -top-1 left-1/2 -translate-x-1/2 h-2 w-2 rounded-full bg-amber-400/70"}),(0,a.jsx)("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 h-1.5 w-1.5 rounded-full bg-amber-400/50"})]}),(0,a.jsx)("svg",{className:"absolute",style:{top:"18%",right:"22%",animation:"ob-float 8s ease-in-out infinite"},width:"44",height:"50",viewBox:"0 0 40 46",fill:"none",children:(0,a.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.4)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.06)"})}),(0,a.jsx)("svg",{className:"absolute",style:{bottom:"22%",left:"18%",animation:"ob-float 10s ease-in-out 2s infinite"},width:"32",height:"36",viewBox:"0 0 40 46",fill:"none",children:(0,a.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.3)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.05)"})}),(0,a.jsx)("div",{className:"absolute h-3.5 w-3.5 rounded-full bg-amber-400/40",style:{top:"30%",left:"28%",animation:"ob-float 7s ease-in-out 1s infinite"}}),(0,a.jsx)("div",{className:"absolute h-2.5 w-2.5 rounded-full bg-amber-400/30",style:{top:"65%",right:"30%",animation:"ob-float 9s ease-in-out 3s infinite"}}),(0,a.jsx)("div",{className:"absolute h-2 w-2 rounded-full bg-amber-400/20",style:{top:"45%",right:"15%",animation:"ob-float 6s ease-in-out 0.5s infinite"}}),(0,a.jsxs)("svg",{className:"absolute inset-0 h-full w-full text-white opacity-[0.12]",children:[(0,a.jsx)("line",{x1:"30%",y1:"25%",x2:"70%",y2:"45%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 12s linear infinite"}}),(0,a.jsx)("line",{x1:"65%",y1:"30%",x2:"35%",y2:"70%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 15s linear infinite reverse"}})]}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,a.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl border border-amber-400/35 bg-amber-500/10 backdrop-blur-sm transition-all duration-700",style:{boxShadow:"0 0 50px oklch(0.80 0.14 75 / 0.2)"},children:(0,a.jsx)(t,{className:"h-7 w-7 text-amber-400"})})}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 translate-y-12 text-center",children:(0,a.jsx)("p",{className:"text-[11px] font-medium tracking-widest uppercase text-amber-400/60",children:s})})]})}let eN={host:"",ownerMatch:"*",localPathTemplate:""};e.s(["default",0,function(){let e,t,u,h=(0,i.useRouter)(),{t:p,locale:g,setLocale:b}=(0,f.useI18n)(),{theme:v,setTheme:E}=(0,n.useTheme)(),[$,O]=(0,s.useState)(!1),[F,U]=(0,s.useState)(1),[V,H]=(0,s.useState)(""),[z,q]=(0,s.useState)({}),K=Object.values(z).some(e=>e.ok),[A,D]=(0,s.useState)([]),[W,_]=(0,s.useState)({...eN}),[G,J]=(0,s.useState)(!0),[Z,X]=(0,s.useState)(0),[Y,Q]=(0,s.useState)(!1),[ee,et]=(0,s.useState)(!1);(0,s.useEffect)(()=>O(!0),[]);let ea=[{value:"light",label:(0,a.jsx)(S.Sun,{className:"h-4 w-4"})},{value:"dark",label:(0,a.jsx)(P.Moon,{className:"h-4 w-4"})},{value:"system",label:(0,a.jsx)(L,{className:"h-4 w-4"})}];function es(){U(e=>e+1)}function ei(){U(e=>Math.max(1,e-1))}let en=[{icon:N.User,label:p("onboarding.step1.title")},{icon:x.Terminal,label:p("onboarding.step2.title")},{icon:k.GitBranch,label:p("onboarding.step3.title")},{icon:w.Package,label:p("onboarding.step4.title")}];return(0,a.jsxs)("div",{className:"flex h-screen bg-background",children:[(0,a.jsx)("div",{className:"hidden xl:block xl:w-3/5 border-r border-border/50 bg-[oklch(0.13_0.006_260)]",children:(0,a.jsx)(ey,{step:F})}),(0,a.jsx)("div",{className:"flex w-full flex-col items-center px-8 pt-[10vh] pb-10 xl:w-2/5 xl:px-16 overflow-y-auto",children:(0,a.jsxs)("div",{className:"w-full max-w-lg space-y-6",children:[(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-8 w-8 rounded-lg"}),(0,a.jsx)("span",{className:"text-lg font-semibold tracking-tight",children:"Tower"})]}),(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:en.map((e,t)=>{let s=t+1,i=s===F,n=s<F,r=e.icon;return(0,a.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[t>0&&(0,a.jsx)("div",{className:`h-px w-4 transition-colors duration-500 ${n?"bg-primary":"bg-border"}`}),(0,a.jsxs)("div",{className:`flex items-center gap-1 shrink-0 rounded-full px-2 py-1 text-[11px] font-medium whitespace-nowrap transition-all duration-500 ${i?"bg-primary text-primary-foreground shadow-sm":n?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:[n?(0,a.jsx)(m.Check,{className:"h-3 w-3 shrink-0"}):(0,a.jsx)(r,{className:"h-3 w-3 shrink-0"}),(0,a.jsx)("span",{children:e.label})]})]},t)})})]}),(0,a.jsxs)("div",{children:[1===F&&(0,a.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:p("onboarding.step1.title")}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:p("onboarding.step1.desc")})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:"onboarding-username",className:"text-sm font-medium",children:p("onboarding.step1.usernameLabel")}),(0,a.jsx)("input",{id:"onboarding-username",type:"text",value:V,onChange:e=>H(e.target.value),placeholder:p("onboarding.step1.usernamePlaceholder"),className:"flex h-10 w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",maxLength:64,autoFocus:!0,autoComplete:"username"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,a.jsxs)("div",{className:"space-y-2.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(R.Languages,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,a.jsx)("label",{className:"text-sm font-medium",children:p("settings.language")})]}),(0,a.jsx)(o.SegmentedControl,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}].map(e=>({value:e.value,label:e.label})),value:g,onChange:e=>b(e)})]}),(0,a.jsxs)("div",{className:"space-y-2.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(S.Sun,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,a.jsx)("label",{className:"text-sm font-medium",children:p("settings.theme")})]}),$?(0,a.jsx)(o.SegmentedControl,{options:ea.map(e=>({value:e.value,label:e.label})),value:v??"system",onChange:e=>E(e)}):(0,a.jsx)("div",{className:"inline-flex h-8 rounded-md border border-border bg-muted p-1 gap-1 w-[120px]"})]})]}),(0,a.jsx)("div",{className:"flex justify-end pt-3",children:(0,a.jsxs)(r.Button,{onClick:es,disabled:0===V.trim().length,className:"px-5",children:[p("onboarding.step1.next"),(0,a.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})})]}),2===F&&(0,a.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:p("onboarding.step2.title")}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:p("onboarding.step2.desc")})]}),(0,a.jsx)(j,{results:z,onResult:(e,t)=>q(a=>({...a,[e]:t}))}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,a.jsxs)(r.Button,{variant:"ghost",className:"text-muted-foreground",onClick:ei,children:[(0,a.jsx)(C.ChevronLeft,{className:"h-4 w-4 mr-1"}),p("onboarding.back")]}),(0,a.jsxs)(r.Button,{onClick:es,disabled:!K,className:"px-5",children:[p("onboarding.step1.next"),(0,a.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),3===F&&(0,a.jsxs)("div",{className:"space-y-5 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:p("onboarding.step3.title")}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:p("onboarding.step3.desc")})]}),A.length>0&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:p("onboarding.step3.added").replace("{count}",String(A.length))}),A.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"text-sm font-medium truncate",children:[e.host,(0,a.jsx)("span",{className:"text-muted-foreground",children:"*"!==e.ownerMatch?` / ${e.ownerMatch}`:""})]}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground font-mono truncate",children:e.localPathTemplate})]}),(0,a.jsx)(r.Button,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>{var t;return t=e.id,void D(e=>e.filter(e=>e.id!==t))},children:(0,a.jsx)(B.Trash2,{className:"h-3.5 w-3.5"})})]},e.id))]}),G?(0,a.jsxs)("div",{className:"space-y-3 rounded-lg border border-border p-4",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{className:"text-xs font-medium",children:p("onboarding.step3.hostLabel")}),(0,a.jsx)(l.Input,{value:W.host,onChange:e=>_(t=>({...t,host:e.target.value})),placeholder:p("onboarding.step3.hostPlaceholder"),className:"h-9",autoFocus:!0})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{className:"text-xs font-medium",children:p("onboarding.step3.ownerLabel")}),(0,a.jsx)(l.Input,{value:W.ownerMatch,onChange:e=>_(t=>({...t,ownerMatch:e.target.value})),placeholder:p("onboarding.step3.ownerPlaceholder"),className:"h-9"})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{className:"block text-xs font-medium",children:p("onboarding.step3.pathLabel")}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(l.Input,{value:W.localPathTemplate,onChange:e=>_(t=>({...t,localPathTemplate:e.target.value})),placeholder:p("onboarding.step3.pathPlaceholder"),className:"h-9 font-mono text-xs flex-1"}),(0,a.jsxs)(d.Tooltip,{children:[(0,a.jsx)(d.TooltipTrigger,{render:(0,a.jsx)(r.Button,{variant:Y?"default":"outline",size:"sm",type:"button",onClick:()=>{Q(e=>(e||X(2),!e))},className:"shrink-0 font-mono",children:"{path}"})}),(0,a.jsx)(d.TooltipContent,{side:"top",className:"max-w-xs",children:(0,a.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,a.jsx)("div",{className:"font-medium",children:p("settings.config.git.pathTooltipTitle")}),(0,a.jsx)("div",{className:"opacity-80",children:p("settings.config.git.pathTooltipDetail")})]})})]}),(0,a.jsxs)(d.Tooltip,{children:[(0,a.jsx)(d.TooltipTrigger,{render:(0,a.jsx)(r.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>et(!0),children:(0,a.jsx)(I.FolderOpen,{className:"h-4 w-4"})})}),(0,a.jsx)(d.TooltipContent,{children:p("settings.config.git.pickFolder")})]})]}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:p(Y?"onboarding.step3.pathHintFull":"onboarding.step3.pathHintRepo")})]}),W.localPathTemplate&&(e=W.localPathTemplate.trim().replace(/\/+$/,""),t=Y?`${e}/{path}`:e,u=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium",children:p("onboarding.step3.previewLabel")}),(0,a.jsx)("div",{className:"flex gap-1 flex-wrap",children:u.map((e,t)=>(0,a.jsx)("button",{type:"button",onClick:()=>X(t),className:`rounded-md px-2 py-1 text-[11px] font-medium transition-colors ${Z===t?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e.label},t))}),(0,a.jsxs)("div",{className:"rounded-md bg-muted/50 px-3 py-2 space-y-1",children:[(0,a.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:u[Z].url}),(0,a.jsxs)("p",{className:"font-mono text-xs",children:[(0,a.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,a.jsx)("span",{className:"text-primary",children:function(e,t){if(!e||!t)return"";let a=t.trim(),s=[],i=a.match(/^git@[^:]+:(.+)$/);if(i)s=i[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let e=new URL(a);s=decodeURIComponent(e.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!s.length)return"";let n=s[0],r=s[s.length-1],l=s.join("/");if(e.includes("{path}"))return e.replace("{path}",l).replace("{owner}",n).replace("{repo}",r).replace(/\/+$/,"");let o=e.replace("{owner}",n).replace("{repo}","").replace(/\/+$/,"");return`${o}/${r}`}(t,u[Z].url)})]})]})]})),(0,a.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[A.length>0&&(0,a.jsx)(r.Button,{variant:"ghost",onClick:()=>J(!1),children:p("settings.config.git.cancel")}),(0,a.jsxs)(r.Button,{onClick:function(){if(!W.host.trim()||!W.localPathTemplate.trim())return;let e=W.localPathTemplate.trim().replace(/\/+$/,""),t=Y?`${e}/{path}`:e,a={id:crypto.randomUUID(),host:W.host.trim(),ownerMatch:W.ownerMatch.trim()||"*",localPathTemplate:t,priority:A.length};D(e=>[...e,a]),_({...eN}),Q(!1),J(!1)},disabled:!W.host.trim()||!W.localPathTemplate.trim(),children:[(0,a.jsx)(m.Check,{className:"h-4 w-4 mr-1"}),p("settings.config.git.save")]})]})]}):(0,a.jsxs)(r.Button,{variant:"outline",onClick:()=>{_({...eN}),J(!0)},children:[(0,a.jsx)(M.Plus,{className:"h-4 w-4 mr-1"}),p("settings.config.git.addRule")]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,a.jsxs)(r.Button,{variant:"ghost",className:"text-muted-foreground",onClick:ei,children:[(0,a.jsx)(C.ChevronLeft,{className:"h-4 w-4 mr-1"}),p("onboarding.back")]}),(0,a.jsxs)(r.Button,{onClick:async()=>{A.length>0&&await (0,y.setConfigValue)("git.pathMappingRules",A),U(e=>e+1)},className:"px-5",children:[p("onboarding.step1.next"),(0,a.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),4===F&&(0,a.jsx)(ej,{username:V,onComplete:()=>h.replace("/workspaces")})]}),(0,a.jsx)("div",{className:"pt-6 text-xs text-muted-foreground",children:p("onboarding.stepIndicator").replace("{current}",String(F)).replace("{total}",String(4))})]})}),(0,a.jsx)(c.FolderBrowserDialog,{open:ee,onOpenChange:et,onSelect:e=>{_(t=>({...t,localPathTemplate:e})),et(!1)}})]})}],566606)}]);
@@ -0,0 +1,2 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},259846,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],259846)},867533,e=>{"use strict";let t=(0,e.i(572989).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],867533)},736061,460707,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("folder-search",[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["FolderSearch",0,r],736061);let n=(0,t.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,n],460707)},35967,e=>{"use strict";var t=e.i(289721);let r=(0,e.i(572989).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var n=e.i(533499);let i=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function s(e){return i[function(e){let t=0;for(let r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)>>>0;return t}(e)%i.length]}let u={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};e.s(["TaskVersionTag",0,function({number:e,name:n,showName:i=!1,className:s="",title:u}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${s}`,title:u??(n?`${e} \xb7 ${n}`:e),children:[(0,t.jsx)(r,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),i&&n?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:n}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:r}=(0,n.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${u[e]}`,children:r(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:r}=(0,n.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${s(e)}`,children:e}):(0,t.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:r("version.type.uncategorized")})},"typeBadgeColor",0,s],35967)},517675,49618,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40d355190aa13f7b29eb4ae960d07d3f17efbc9494",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,r],517675);let n=(0,t.createServerReference)("40887b42fd63bf331153abc27703393fbce3ca35b4",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,n],49618)},12659,e=>{"use strict";let t=(0,e.i(572989).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,t],12659)},912505,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:n,description:i,action:s,className:u}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",u),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:n}),i&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:i}),s&&(0,t.jsx)("div",{className:"mt-2",children:s})]})}])},313029,e=>{"use strict";let t=(0,e.i(572989).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",0,t],313029)},77597,485599,e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){var r,i;r=t,i=n[t],(r=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(r))in e?Object.defineProperty(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(e){return function t(){for(var r=this,n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];return i.length>=e.length?e.apply(this,i):function(){for(var e=arguments.length,n=Array(e),s=0;s<e;s++)n[s]=arguments[s];return t.apply(r,[].concat(i,n))}}}function o(e){return({}).toString.call(e).includes("Object")}function c(e){return"function"==typeof e}var a,l,h=u(function(e,t){throw Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),d=function(e,t){return o(t)||h("changeType"),Object.keys(t).some(function(t){return!Object.prototype.hasOwnProperty.call(e,t)})&&h("changeField"),t},f=function(e){c(e)||h("selectorType")},g=function(e){c(e)||o(e)||h("handlerType"),o(e)&&Object.values(e).some(function(e){return!c(e)})&&h("handlersType")},p=function(e){e||h("initialIsRequired"),o(e)||h("initialType"),Object.keys(e).length||h("initialContent")};function m(e,t){return c(t)?t(e.current):t}function y(e,t){return e.current=s(s({},e.current),t),t}function v(e,t,r){return c(t)?t(e.current):Object.keys(r).forEach(function(r){var n;return null==(n=t[r])?void 0:n.call(t,e.current[r])}),r}var b={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},x=(a=function(e,t){throw Error(e[t]||e.default)},function e(){for(var t=this,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return n.length>=a.length?a.apply(this,n):function(){for(var r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return e.apply(t,[].concat(n,i))}})(b),A=function(e){return(e||x("configIsRequired"),({}).toString.call(e).includes("Object")||x("configType"),e.urls)?(console.warn(b.deprecation),{paths:{vs:e.urls.monacoBase}}):e},E=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}},M={type:"cancelation",msg:"operation is manually canceled"};function C(e){var t=!1,r=new Promise(function(r,n){e.then(function(e){return t?n(M):r(e)}),e.catch(n)});return r.cancel=function(){return t=!0},r}var S=["monaco"],w=function(e){if(Array.isArray(e))return e}(l=({create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p(e),g(t);var r={current:e},n=u(v)(r,t),i=u(y)(r),s=u(d)(e),o=u(m)(r);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return f(e),e(r.current)},function(e){(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}})(n,i,s,o)(e)}]}}).create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,s,u=[],o=!0,c=!1;try{i=(t=t.call(e)).next,!1;for(;!(o=(r=i.call(t)).done)&&(u.push(r.value),2!==u.length);o=!0);}catch(e){c=!0,n=e}finally{try{if(!o&&null!=t.return&&(s=t.return(),Object(s)!==s))return}finally{if(c)throw n}}return u}}(l)||function(e){if(e){if("string"==typeof e)return t(e,2);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,2):void 0}}(l)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),k=w[0],D=w[1];function F(e){return document.body.appendChild(e)}function _(e){var t,r,n=k(function(e){return{config:e.config,reject:e.reject}}),i=(t="".concat(n.config.paths.vs,"/loader.js"),r=document.createElement("script"),t&&(r.src=t),r);return i.onload=function(){return e()},i.onerror=n.reject,i}function j(){var e=k(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var r=t.m||t;B(r),e.resolve(r)},function(t){e.reject(t)})}function B(e){k().monaco||D({monaco:e})}var O=new Promise(function(e,t){return D({resolve:e,reject:t})}),I={config:function(e){var t=A(e),r=t.monaco,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,S);D(function(e){return{config:function e(t,r){return Object.keys(r).forEach(function(n){r[n]instanceof Object&&t[n]&&Object.assign(r[n],e(t[n],r[n]))}),n(n({},t),r)}(e.config,i),monaco:r}})},init:function(){var e=k(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(D({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),C(O);if(window.monaco&&window.monaco.editor)return B(window.monaco),e.resolve(window.monaco),C(O);E(F,_)(j)}return C(O)},__getMonacoInstance:function(){return k(function(e){return e.monaco})}};e.s(["default",0,I],485599);var R=e.i(965652),L={display:"flex",position:"relative",textAlign:"initial"},$={width:"100%"},P={display:"none"},z={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"},N=function({children:e}){return R.default.createElement("div",{style:z},e)},T=(0,R.memo)(function({width:e,height:t,isEditorReady:r,loading:n,_ref:i,className:s,wrapperProps:u}){return R.default.createElement("section",{style:{...L,width:e,height:t},...u},!r&&R.default.createElement(N,null,n),R.default.createElement("div",{ref:i,style:{...$,...!r&&P},className:s}))}),U=function(e){(0,R.useEffect)(e,[])},V=function(e,t,r=!0){let n=(0,R.useRef)(!0);(0,R.useEffect)(n.current||!r?()=>{n.current=!1}:e,t)};function q(){}function W(e,t,r,n){var i,s,u,o,c,a;return i=e,s=n,i.editor.getModel(K(i,s))||(u=e,o=t,c=r,a=n,u.editor.createModel(o,c,a?K(u,a):void 0))}function K(e,t){return e.Uri.parse(t)}var H=(0,R.memo)(function({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:i,originalModelPath:s,modifiedModelPath:u,keepCurrentOriginalModel:o=!1,keepCurrentModifiedModel:c=!1,theme:a="light",loading:l="Loading...",options:h={},height:d="100%",width:f="100%",className:g,wrapperProps:p={},beforeMount:m=q,onMount:y=q}){let[v,b]=(0,R.useState)(!1),[x,A]=(0,R.useState)(!0),E=(0,R.useRef)(null),M=(0,R.useRef)(null),C=(0,R.useRef)(null),S=(0,R.useRef)(y),w=(0,R.useRef)(m),k=(0,R.useRef)(!1);U(()=>{let e=I.init();return e.then(e=>(M.current=e)&&A(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>{let t;return E.current?(t=E.current?.getModel(),void(o||t?.original?.dispose(),c||t?.modified?.dispose(),E.current?.dispose())):e.cancel()}}),V(()=>{if(E.current&&M.current){let t=E.current.getOriginalEditor(),i=W(M.current,e||"",n||r||"text",s||"");i!==t.getModel()&&t.setModel(i)}},[s],v),V(()=>{if(E.current&&M.current){let e=E.current.getModifiedEditor(),n=W(M.current,t||"",i||r||"text",u||"");n!==e.getModel()&&e.setModel(n)}},[u],v),V(()=>{let e=E.current.getModifiedEditor();e.getOption(M.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],v),V(()=>{E.current?.getModel()?.original.setValue(e||"")},[e],v),V(()=>{let{original:e,modified:t}=E.current.getModel();M.current.editor.setModelLanguage(e,n||r||"text"),M.current.editor.setModelLanguage(t,i||r||"text")},[r,n,i],v),V(()=>{M.current?.editor.setTheme(a)},[a],v),V(()=>{E.current?.updateOptions(h)},[h],v);let D=(0,R.useCallback)(()=>{if(!M.current)return;w.current(M.current);let o=W(M.current,e||"",n||r||"text",s||""),c=W(M.current,t||"",i||r||"text",u||"");E.current?.setModel({original:o,modified:c})},[r,t,i,e,n,s,u]),F=(0,R.useCallback)(()=>{!k.current&&C.current&&(E.current=M.current.editor.createDiffEditor(C.current,{automaticLayout:!0,...h}),D(),M.current?.editor.setTheme(a),b(!0),k.current=!0)},[h,a,D]);return(0,R.useEffect)(()=>{v&&S.current(E.current,M.current)},[v]),(0,R.useEffect)(()=>{x||v||F()},[x,v,F]),R.default.createElement(T,{width:f,height:d,isEditorReady:v,loading:l,_ref:C,className:g,wrapperProps:p})}),G=function(e){let t=(0,R.useRef)();return(0,R.useEffect)(()=>{t.current=e},[e]),t.current},Q=new Map,J=(0,R.memo)(function({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:i,path:s,theme:u="light",line:o,loading:c="Loading...",options:a={},overrideServices:l={},saveViewState:h=!0,keepCurrentModel:d=!1,width:f="100%",height:g="100%",className:p,wrapperProps:m={},beforeMount:y=q,onMount:v=q,onChange:b,onValidate:x=q}){let[A,E]=(0,R.useState)(!1),[M,C]=(0,R.useState)(!0),S=(0,R.useRef)(null),w=(0,R.useRef)(null),k=(0,R.useRef)(null),D=(0,R.useRef)(v),F=(0,R.useRef)(y),_=(0,R.useRef)(void 0),j=(0,R.useRef)(n),B=G(s),O=(0,R.useRef)(!1),L=(0,R.useRef)(!1);U(()=>{let e=I.init();return e.then(e=>(S.current=e)&&C(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>w.current?void(_.current?.dispose(),d?h&&Q.set(s,w.current.saveViewState()):w.current.getModel()?.dispose(),w.current.dispose(),w.current=null,O.current=!1,E(!1)):e.cancel()}),V(()=>{let u=W(S.current,e||n||"",t||i||"",s||r||"");u!==w.current?.getModel()&&(h&&Q.set(B,w.current?.saveViewState()),w.current?.setModel(u),h&&w.current?.restoreViewState(Q.get(s)))},[s],A),V(()=>{w.current?.updateOptions(a)},[a],A),V(()=>{w.current&&void 0!==n&&(w.current.getOption(S.current.editor.EditorOption.readOnly)?w.current.setValue(n):n!==w.current.getValue()&&(L.current=!0,w.current.executeEdits("",[{range:w.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),w.current.pushUndoStop(),L.current=!1))},[n],A),V(()=>{let e=w.current?.getModel();A&&e&&i&&S.current?.editor.setModelLanguage(e,i)},[i,A],A),V(()=>{void 0!==o&&w.current?.revealLine(o)},[o],A),V(()=>{S.current?.editor.setTheme(u)},[u],A);let $=(0,R.useCallback)(()=>{if(!(!k.current||!S.current)&&!O.current){F.current(S.current);let c=s||r,d=W(S.current,n||e||"",t||i||"",c||"");w.current=S.current?.editor.create(k.current,{model:d,automaticLayout:!0,...a},l),h&&w.current.restoreViewState(Q.get(c)),S.current.editor.setTheme(u),void 0!==o&&w.current.revealLine(o),E(!0),O.current=!0}},[e,t,r,n,i,s,a,l,h,u,o]);return(0,R.useEffect)(()=>{A&&D.current(w.current,S.current)},[A]),(0,R.useEffect)(()=>{M||A||$()},[M,A,$]),j.current=n,(0,R.useEffect)(()=>{A&&b&&(_.current?.dispose(),_.current=w.current?.onDidChangeModelContent(e=>{L.current||b(w.current.getValue(),e)}))},[A,b]),(0,R.useEffect)(()=>{if(A){let e=S.current.editor.onDidChangeMarkers(e=>{let t=w.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=S.current.editor.getModelMarkers({resource:t});x?.(e)}});return()=>{e?.dispose()}}return()=>{}},[A,x]),R.default.createElement(T,{width:f,height:g,isEditorReady:A,loading:c,_ref:k,className:p,wrapperProps:m})});e.s(["DiffEditor",0,H,"Editor",0,J,"default",0,J,"useMonaco",0,function(){let[e,t]=(0,R.useState)(I.__getMonacoInstance());return U(()=>{let r;return e||(r=I.init()).then(e=>{t(e)}),()=>r?.cancel()}),e}],77597)},461526,e=>{"use strict";e.s(["PREVIEW_TASK_ID",0,"__preview__"])},882651,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],882651);let r=(0,e.i(572989).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,r],181209)},759686,e=>{"use strict";var t=e.i(567098);e.s(["AlertTriangle",()=>t.default])},292862,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("402d893c5a621a969e01ad18f836ca670ab21cd95a",t.callServer,void 0,t.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,r])},991838,e=>{"use strict";var t=e.i(965652),r=e.i(770303);e.s(["useExtension",0,function(e){let n=(0,t.useContext)(r.ExtensionContext);if(!n)throw Error("useExtension must be used inside <ExtensionProvider>");return{status:n.statusMap[e],loading:n.loading,isInstalling:n.installing.has(e),install:()=>n.install(e),uninstall:()=>n.uninstall(e),refresh:()=>n.refresh(e)}}])},960518,e=>{"use strict";let t=(0,e.i(572989).default)("git-compare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);e.s(["GitCompare",0,t],960518)},340873,e=>{"use strict";let t=(0,e.i(572989).default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);e.s(["GitCommitHorizontal",0,t],340873)},707631,(e,t,r)=>{t.exports=e=>{if(!e||"string"!=typeof e||e.match(/^\s+$/))return[];let t=e.split(`
2
+ `);if(0===t.length)return[];let r=[],n=null,i=null,u=0,c=0,a=null,l=e=>{let[t,i]=s(e)??[];n={chunks:[],deletions:0,additions:0,from:t,to:i},r.push(n)},h=()=>{(!n||n.chunks.length)&&l()},d=e=>{if(!i)return;let[t]=i.changes.slice(-1);i.changes.push({type:t.type,[t.type]:!0,ln1:t.ln1,ln2:t.ln2,ln:t.ln,content:e})},f=[[/^diff\s/,l],[/^new file mode (\d+)$/,(e,t)=>{h(),n.new=!0,n.newMode=t[1],n.from="/dev/null"}],[/^deleted file mode (\d+)$/,(e,t)=>{h(),n.deleted=!0,n.oldMode=t[1],n.to="/dev/null"}],[/^old mode (\d+)$/,(e,t)=>{h(),n.oldMode=t[1]}],[/^new mode (\d+)$/,(e,t)=>{h(),n.newMode=t[1]}],[/^index\s[\da-zA-Z]+\.\.[\da-zA-Z]+(\s(\d+))?$/,(e,t)=>{h(),n.index=e.split(" ").slice(1),t[1]&&(n.oldMode=n.newMode=t[1].trim())}],[/^---\s/,e=>{h(),n.from=o(e)}],[/^\+\+\+\s/,e=>{h(),n.to=o(e)}],[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/,(e,t)=>{n||l(e);let[r,s,o,h]=t.slice(1);u=+r,c=+o,i={content:e,changes:[],oldStart:+r,oldLines:+(s||1),newStart:+o,newLines:+(h||1)},a={oldLines:+(s||1),newLines:+(h||1)},n.chunks.push(i)}],[/^\$/,d]],g=[[/^\$/,d],[/^-/,e=>{i&&(i.changes.push({type:"del",del:!0,ln:u++,content:e}),n.deletions++,a.oldLines--)}],[/^\+/,e=>{i&&(i.changes.push({type:"add",add:!0,ln:c++,content:e}),n.additions++,a.newLines--)}],[/^\s*/,e=>{i?.changes.push({type:"normal",normal:!0,ln1:u++,ln2:c++,content:e}),a.oldLines--,a.newLines--}]],p=e=>{a?(e=>{for(let[t,r]of g){let n=e.match(t);if(n){r(e,n);break}}0===a.oldLines&&0===a.newLines&&(a=null)})(e):(e=>{for(let[t,r]of f){let n=e.match(t);if(n){r(e,n);break}}})(e)};for(let e of t)p(e);return r};let n=/(a|i|w|c|o|1|2)\/.*(?=["']? ["']?(b|i|w|c|o|1|2)\/)|(b|i|w|c|o|1|2)\/.*$/g,i=/^(a|b|i|w|c|o|1|2)\//,s=e=>e?.match(n)?.map(e=>e.replace(i,"").replace(/("|')$/,"")),u=/^\\?['"]|\\?['"]$/g,o=e=>{let t=c(e,"-+").trim();return(t=l(t)).replace(u,"").replace(i,"")},c=(e,t)=>{if(e=d(e),!t&&String.prototype.trimLeft)return e.trimLeft();let r=h(t);return e.replace(RegExp(`^${r}+`),"")},a=/\t.*|\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d(.\d+)?\s(\+|-)\d\d\d\d/,l=e=>{let t=a.exec(e);return t&&(e=e.substring(0,t.index).trim()),e},h=e=>null==e?"\\s":e instanceof RegExp?e.source:`[${d(e).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}]`,d=e=>`${e??""}`},196199,e=>{"use strict";var t=e.i(707631);function r(e){return e.replace(/\r\n/g,"\n")}e.s(["normalizeLF",0,r,"parseUnifiedDiff",0,function(e){return(0,t.default)(r(e))}])},922341,307650,684947,775719,373703,596975,409844,380012,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("604644f30a1a018f2574d8716b1667df04c61b3df8",t.callServer,void 0,t.findSourceMapURL,"listDirectory");e.s(["listDirectory",0,r],922341);let n=(0,t.createServerReference)("702b7b4cafe04bd1f06a8acff5ddd9819b1b040a6c",t.callServer,void 0,t.findSourceMapURL,"getGitStatus");e.s(["getGitStatus",0,n],307650);let i=(0,t.createServerReference)("60bc31e84a5f231095ac400c6ed0366a1efb75b02a",t.callServer,void 0,t.findSourceMapURL,"createFile");e.s(["createFile",0,i],684947);let s=(0,t.createServerReference)("6013494532f5595f902b12d24f26d3898fe833e194",t.callServer,void 0,t.findSourceMapURL,"createDirectory");e.s(["createDirectory",0,s],775719);let u=(0,t.createServerReference)("70479bc56b507a8acaea22b79f84865c0ac8d9dcbf",t.callServer,void 0,t.findSourceMapURL,"renameEntry");e.s(["renameEntry",0,u],373703);let o=(0,t.createServerReference)("60aa7d76120f845fe5b04a34071142d28ccbd31b1c",t.callServer,void 0,t.findSourceMapURL,"deleteEntry");e.s(["deleteEntry",0,o],596975);let c=(0,t.createServerReference)("405e004a2b52e8a6d92ccad98b1019a40dc7ecd5e4",t.callServer,void 0,t.findSourceMapURL,"listAllFiles");e.s(["listAllFiles",0,c],409844);let a=(0,t.createServerReference)("60e9adb6f53e7e1b0b14efbbc5990b5b081c299cb0",t.callServer,void 0,t.findSourceMapURL,"readFileContent");e.s(["readFileContent",0,a],380012)},655065,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("70952ac40ac2b93c77f49ad33533bdea2657e3d9eb",t.callServer,void 0,t.findSourceMapURL,"writeFileContent");e.s(["writeFileContent",0,r])},280569,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("6075a764fe624c08cc4621c70b164fd6ddfee1e5f2",t.callServer,void 0,t.findSourceMapURL,"readFileContentForce");e.s(["readFileContentForce",0,r])},257868,681894,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40440496d342c8b9a8abc5babc36d91186e2d060ef",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,r],257868);let n=(0,t.createServerReference)("60daaf44fc82c289f40d6d430c9f39ac67379ca846",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,n],681894)},169751,e=>{"use strict";function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===c(e)}function r(e){return null==e?"":function(e){if("string"==typeof e)return e;if("bigint"==typeof e)return e.toString();let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}function n(e){return"string"==typeof e}function i(e){return"number"==typeof e}function s(e){return"object"==typeof e}function u(e){return null!=e}function o(e){return!e.trim().length}function c(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let a=Object.prototype.hasOwnProperty;class l{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let r=h(e);this._keys.push(r),this._keyMap[r.id]=r,t+=r.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function h(e){let r=null,i=null,s=null,u=1,o=null;if(n(e)||t(e))s=e,r=d(e),i=f(e);else{if(!a.call(e,"name"))throw Error("Missing name property in key");let t=e.name;if(s=t,a.call(e,"weight")&&(u=e.weight)<=0)throw Error(`Property 'weight' in key '${t}' must be a positive integer`);r=d(t),i=f(t),o=e.getFn}return{path:r,id:i,weight:u,src:s,getFn:o}}function d(e){return t(e)?e:e.split(".")}function f(e){return t(e)?e.join("."):e}let g=Object.freeze({isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,useTokenSearch:!1,getFn:function(e,o){let a=[],l=!1,h=(e,o,d,f)=>{if(u(e))if(o[d]){var g,p;let m=e[o[d]];if(!u(m))return;if(d===o.length-1&&(n(m)||i(m)||!0===(g=m)||!1===g||s(p=g)&&null!==p&&"[object Boolean]"==c(g)||"bigint"==typeof m))a.push(void 0!==f?{v:r(m),i:f}:r(m));else if(t(m)){l=!0;for(let e=0,t=m.length;e<t;e+=1)h(m[e],o,d+1,e)}else o.length&&h(m,o,d+1,f)}else a.push(void 0!==f?{v:e,i:f}:e)};return h(e,n(o)?o.split("."):o,0),l?a:a[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}),p=/[^ ]+/g;class m{constructor({getFn:e=g.getFn,fieldNormWeight:t=g.fieldNormWeight}={}){this.norm=function(e=1,t=3){let r=new Map,n=Math.pow(10,t);return{get(t){let i=t.match(p).length;if(r.has(i))return r.get(i);let s=parseFloat(Math.round(1/Math.pow(i,.5*e)*n)/n);return r.set(i,s),s},clear(){r.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,n(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();n(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,r=this.size();t<r;t+=1)this.records[t].i-=1}removeAll(e){for(let t=e.length-1;t>=0;t-=1)this.records.splice(e[t],1);for(let e=0,t=this.records.length;e<t;e+=1)this.records[e].i=e}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!u(e)||o(e))return;let r={v:e,i:t,n:this.norm.get(e)};this.records.push(r)}_addObject(e,i){let s={i:i,$:{}};this.keys.forEach((i,c)=>{let a=i.getFn?i.getFn(e):this.getFn(e,i.path);if(u(a)){if(t(a)){let e=[];for(let t=0,i=a.length;t<i;t+=1){let i=a[t];if(u(i)){if(n(i)){if(!o(i)){let r={v:i,i:t,n:this.norm.get(i)};e.push(r)}}else if(u(i.v)){let t=n(i.v)?i.v:r(i.v);if(!o(t)){let r={v:t,i:i.i,n:this.norm.get(t)};e.push(r)}}}}s.$[c]=e}else if(n(a)&&!o(a)){let e={v:a,n:this.norm.get(a)};s.$[c]=e}}}),this.records.push(s)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}}function y(e,t,{getFn:r=g.getFn,fieldNormWeight:n=g.fieldNormWeight}={}){let i=new m({getFn:r,fieldNormWeight:n});return i.setKeys(e.map(h)),i.setSources(t),i.create(),i}function v(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let r=1,n=e.length;r<n;r+=1){let n=t[t.length-1],i=e[r];i[0]<=n[1]+1?n[1]=Math.max(n[1],i[1]):t.push(i)}return t}let b={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},x=RegExp("["+Object.keys(b).join("")+"]","g"),A=String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(x,e=>b[e]):e=>e;class E{constructor(e,{location:t=g.location,threshold:r=g.threshold,distance:n=g.distance,includeMatches:i=g.includeMatches,findAllMatches:s=g.findAllMatches,minMatchCharLength:u=g.minMatchCharLength,isCaseSensitive:o=g.isCaseSensitive,ignoreDiacritics:c=g.ignoreDiacritics,ignoreLocation:a=g.ignoreLocation}={}){if(this.options={location:t,threshold:r,distance:n,includeMatches:i,findAllMatches:s,minMatchCharLength:u,isCaseSensitive:o,ignoreDiacritics:c,ignoreLocation:a},e=o?e:e.toLowerCase(),e=c?A(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const l=(e,t)=>{this.chunks.push({pattern:e,alphabet:function(e){let t={};for(let r=0,n=e.length;r<n;r+=1){let i=e.charAt(r);t[i]=(t[i]||0)|1<<n-r-1}return t}(e),startIndex:t})},h=this.pattern.length;if(h>32){let e=0;const t=h%32,r=h-t;for(;e<r;)l(this.pattern.substr(e,32),e),e+=32;if(t){const e=h-32;l(this.pattern.substr(e),e)}}else l(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:r,includeMatches:n}=this.options;if(e=t?e:e.toLowerCase(),e=r?A(e):e,this.pattern===e){let t={isMatch:!0,score:0};return n&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:s,threshold:u,findAllMatches:o,minMatchCharLength:c,ignoreLocation:a}=this.options,l=[],h=0,d=!1;this.chunks.forEach(({pattern:t,alphabet:r,startIndex:f})=>{let{isMatch:p,score:m,indices:y}=function(e,t,r,{location:n=g.location,distance:i=g.distance,threshold:s=g.threshold,findAllMatches:u=g.findAllMatches,minMatchCharLength:o=g.minMatchCharLength,includeMatches:c=g.includeMatches,ignoreLocation:a=g.ignoreLocation}={}){let l;if(t.length>32)throw Error("Pattern length exceeds max of 32.");let h=t.length,d=e.length,f=Math.max(0,Math.min(n,d)),p=s,m=f,y=(e,t)=>{let r=e/h;if(a)return r;let n=Math.abs(f-t);return i?r+n/i:n?1:r},v=o>1||c,b=v?Array(d):[];for(;(l=e.indexOf(t,m))>-1;)if(p=Math.min(y(0,l),p),m=l+h,v){let e=0;for(;e<h;)b[l+e]=1,e+=1}m=-1;let x=[],A=1,E=h+d,M=1<<h-1;for(let t=0;t<h;t+=1){let n=0,i=E;for(;n<i;)y(t,f+i)<=p?n=i:E=i,i=Math.floor((E-n)/2+n);E=i;let s=Math.max(1,f-i+1),o=u?d:Math.min(f+i,d)+h,c=Array(o+2);c[o+1]=(1<<t)-1;for(let n=o;n>=s;n-=1){let i=n-1,u=r[e[i]];if(v&&(b[i]=+!!u),c[n]=(c[n+1]<<1|1)&u,t&&(c[n]|=(x[n+1]|x[n])<<1|1|x[n+1]),c[n]&M&&(A=y(t,i))<=p){if(p=A,(m=i)<=f)break;s=Math.max(1,2*f-m)}}if(y(t+1,f)>p)break;x=c}let C={isMatch:m>=0,score:Math.max(.001,A)};if(v){let e=function(e=[],t=g.minMatchCharLength){let r=[],n=-1,i=-1,s=0;for(let u=e.length;s<u;s+=1){let u=e[s];u&&-1===n?n=s:u||-1===n||((i=s-1)-n+1>=t&&r.push([n,i]),n=-1)}return e[s-1]&&s-n>=t&&r.push([n,s-1]),r}(b,o);e.length?c&&(C.indices=e):C.isMatch=!1}return C}(e,t,r,{location:i+f,distance:s,threshold:u,findAllMatches:o,minMatchCharLength:c,includeMatches:n,ignoreLocation:a});p&&(d=!0),h+=m,p&&y&&l.push(...y)});let f={isMatch:d,score:d?h/this.chunks.length:1};return d&&n&&(f.indices=v(l)),f}}class M{constructor(e){this.pattern=e}static isMultiMatch(e){return C(e,this.multiRegex)}static isSingleMatch(e){return C(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}}function C(e,t){let r=e.match(t);return r?r[1]:null}class S extends M{constructor(e,{location:t=g.location,threshold:r=g.threshold,distance:n=g.distance,includeMatches:i=g.includeMatches,findAllMatches:s=g.findAllMatches,minMatchCharLength:u=g.minMatchCharLength,isCaseSensitive:o=g.isCaseSensitive,ignoreDiacritics:c=g.ignoreDiacritics,ignoreLocation:a=g.ignoreLocation}={}){super(e),this._bitapSearch=new E(e,{location:t,threshold:r,distance:n,includeMatches:i,findAllMatches:s,minMatchCharLength:u,isCaseSensitive:o,ignoreDiacritics:c,ignoreLocation:a})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class w extends M{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,r=0,n=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,r))>-1;)r=t+i,n.push([t,r-1]);let s=!!n.length;return{isMatch:s,score:+!s,indices:n}}}let k=[class extends M{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},w,class extends M{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},class extends M{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},class extends M{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},class extends M{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},class extends M{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=-1===e.indexOf(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},S],D=k.length,F=new Set([S.type,w.type]),_=[];function j(...e){_.push(...e)}function B(e,t){for(let r=0,n=_.length;r<n;r+=1){let n=_[r];if(n.condition(e,t))return new n(e,t)}return new E(e,t)}let O="$and",I="$path",R=e=>!!(e[O]||e.$or),L=e=>({[O]:Object.keys(e).map(t=>({[t]:e[t]}))});function $(e,r,{auto:i=!0}={}){let u=e=>{if(n(e)){let t={keyId:null,pattern:e};return i&&(t.searcher=B(e,r)),t}let o=Object.keys(e),c=!!e[I];if(!c&&o.length>1&&!R(e))return u(L(e));if(!t(e)&&s(e)&&!R(e)){let t=c?e[I]:o[0],s=c?e.$val:e[t];if(!n(s))throw Error(`Invalid value for key ${t}`);let u={keyId:f(t),pattern:s};return i&&(u.searcher=B(s,r)),u}let a={children:[],operator:o[0]};return o.forEach(r=>{let n=e[r];t(n)&&n.forEach(e=>{a.children.push(u(e))})}),a};return R(e)||(e=L(e)),u(e)}function P(e,{ignoreFieldNorm:t=g.ignoreFieldNorm}){let r=1;return e.forEach(({key:e,norm:n,score:i})=>{let s=e?e.weight:null;r*=Math.pow(0===i&&s?Number.EPSILON:i,(s||1)*(t?1:n))}),r}class z{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){let t=this.heap;for(;e>0;){let r=e-1>>1;if(t[e].score<=t[r].score)break;let n=t[e];t[e]=t[r],t[r]=n,e=r}}_sinkDown(e){let t=this.heap,r=t.length,n=e;do{let i=2*(e=n)+1,s=2*e+2;if(i<r&&t[i].score>t[n].score&&(n=i),s<r&&t[s].score>t[n].score&&(n=s),n!==e){let r=t[e];t[e]=t[n],t[n]=r}}while(n!==e)}}function N(e,t){let r=e.matches;t.matches=[],u(r)&&r.forEach(e=>{if(!u(e.indices)||!e.indices.length)return;let{indices:r,value:n}=e,i={indices:r,value:n};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function T(e,t){t.score=e.score}let U=/\b\w+\b/g;function V({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize:r=>(e||(r=r.toLowerCase()),t&&(r=A(r)),r.match(U)||[])}}function q(e,t){for(let[r,n]of e.terms){let i=n.filter(e=>e.docIdx!==t),s=n.length-i.length;s>0&&(e.fieldCount-=s,e.df.set(r,(e.df.get(r)||0)-s),0===i.length?(e.terms.delete(r),e.df.delete(r)):e.terms.set(r,i))}}class W{constructor(e,t,r){this.options={...g,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new l(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,r),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=B(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof m))throw Error("Incorrect 'index' type");if(this._myIndex=t||y(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=V({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=function(e,t,r){let n=new Map,i=new Map,s=0;function u(e,t,u,o){let c=r.tokenize(e);if(!c.length)return;s++;let a=new Map;for(let e of c)a.set(e,(a.get(e)||0)+1);for(let[e,r]of a){let s={docIdx:t,keyIdx:u,subIdx:o,tf:r},c=n.get(e);c||(c=[],n.set(e,c)),c.push(s),i.set(e,(i.get(e)||0)+1)}}for(let r of e){let{i:e,v:n,$:i}=r;if(void 0!==n){u(n,e,-1,-1);continue}if(i)for(let r=0;r<t;r++){let t=i[r];if(t)if(Array.isArray(t))for(let n of t)u(n.v,e,r,n.i??-1);else u(t.v,e,r,-1)}}return{terms:n,fieldCount:s,df:i}}(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(u(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=V({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});!function(e,t,r,n){let{i:i,v:s,$:u}=t;function o(t,r,s){let u=n.tokenize(t);if(!u.length)return;e.fieldCount++;let o=new Map;for(let e of u)o.set(e,(o.get(e)||0)+1);for(let[t,n]of o){let u={docIdx:i,keyIdx:r,subIdx:s,tf:n},o=e.terms.get(t);o||(o=[],e.terms.set(t,o)),o.push(u),e.df.set(t,(e.df.get(t)||0)+1)}}if(void 0!==s)return o(s,-1,-1);if(u)for(let e=0;e<r;e++){let t=u[e];if(t)if(Array.isArray(t))for(let r of t)o(r.v,e,r.i??-1);else o(t.v,e,-1)}}(this._invertedIndex,e,this._myIndex.keys.length,t)}}remove(e=()=>!1){let t=[],r=[];for(let n=0,i=this._docs.length;n<i;n+=1)e(this._docs[n],n)&&(t.push(this._docs[n]),r.push(n));if(r.length){if(this._invertedIndex)for(let e of r)q(this._invertedIndex,e);for(let e=r.length-1;e>=0;e-=1)this._docs.splice(r[e],1);this._myIndex.removeAll(r)}return t}removeAt(e){this._invertedIndex&&q(this._invertedIndex,e);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}getIndex(){return this._myIndex}search(e,t){let r,{limit:s=-1}=t||{},{includeMatches:u,includeScore:o,shouldSort:c,sortFn:a,ignoreFieldNorm:l}=this.options;if(n(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return i(s)&&s>-1&&(e=e.slice(0,s)),e}if(i(s)&&s>0&&n(e)){let t=new z(s);n(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:l}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:l}),r=t.extractSorted(a)}else!function(e,{ignoreFieldNorm:t=g.ignoreFieldNorm}){e.forEach(e=>{e.score=P(e.matches,{ignoreFieldNorm:t})})}(r=n(e)?n(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),{ignoreFieldNorm:l}),c&&r.sort(a),i(s)&&s>-1&&(r=r.slice(0,s));return function(e,t,{includeMatches:r=g.includeMatches,includeScore:n=g.includeScore}={}){let i=[];return r&&i.push(N),n&&i.push(T),e.map(e=>{let{idx:r}=e,n={item:t[r],refIndex:r};return i.length&&i.forEach(t=>{t(e,n)}),n})}(r,this._docs,{includeMatches:u,includeScore:o})}_searchStringList(e,{heap:t,ignoreFieldNorm:r}={}){let n=this._getSearcher(e),{records:i}=this._myIndex,s=t?null:[];return i.forEach(({v:e,i:i,n:o})=>{if(!u(e))return;let{isMatch:c,score:a,indices:l}=n.searchIn(e);if(c){let n={item:e,idx:i,matches:[{score:a,value:e,norm:o,indices:l}]};t?(n.score=P(n.matches,{ignoreFieldNorm:r}),t.shouldInsert(n.score)&&t.insert(n)):s.push(n)}}),s}_searchLogical(e){let t=$(e,this.options),r=(e,t,n)=>{if(!("children"in e)){let r,{keyId:i,searcher:s}=e;return(null===i?(r=[],this._myIndex.keys.forEach((e,n)=>{r.push(...this._findMatches({key:e,value:t[n],searcher:s}))})):r=this._findMatches({key:this._keyStore.get(i),value:this._myIndex.getValueForItemAtKeyId(t,i),searcher:s}),r&&r.length)?[{idx:n,item:t,matches:r}]:[]}let{children:i,operator:s}=e,u=[];for(let e=0,o=i.length;e<o;e+=1){let o=r(i[e],t,n);if(o.length)u.push(...o);else if(s===O)return[]}return u},n=this._myIndex.records,i=new Map,s=[];return n.forEach(({$:e,i:n})=>{if(u(e)){let u=r(t,e,n);u.length&&(i.has(n)||(i.set(n,{idx:n,item:e,matches:[]}),s.push(i.get(n))),u.forEach(({matches:e})=>{i.get(n).matches.push(...e)}))}}),s}_searchObjectList(e,{heap:t,ignoreFieldNorm:r}={}){let n=this._getSearcher(e),{keys:i,records:s}=this._myIndex,o=t?null:[];return s.forEach(({$:e,i:s})=>{if(!u(e))return;let c=[],a=!1,l=!1;if(i.forEach((t,r)=>{let i=this._findMatches({key:t,value:e[r],searcher:n});i.length?(c.push(...i),i[0].hasInverse&&(l=!0)):a=!0}),(!l||!a)&&c.length){let n={idx:s,item:e,matches:c};t?(n.score=P(n.matches,{ignoreFieldNorm:r}),t.shouldInsert(n.score)&&t.insert(n)):o.push(n)}}),o}_findMatches({key:e,value:r,searcher:n}){if(!u(r))return[];let i=[];if(t(r))r.forEach(({v:t,i:r,n:s})=>{if(!u(t))return;let{isMatch:o,score:c,indices:a,hasInverse:l}=n.searchIn(t);o&&i.push({score:c,key:e,value:t,idx:r,norm:s,indices:a,hasInverse:l})});else{let{v:t,n:s}=r,{isMatch:u,score:o,indices:c,hasInverse:a}=n.searchIn(t);u&&i.push({score:o,key:e,value:t,norm:s,indices:c,hasInverse:a})}return i}}W.version="7.3.0",W.createIndex=y,W.parseIndex=function(e,{getFn:t=g.getFn,fieldNormWeight:r=g.fieldNormWeight}={}){let{keys:n,records:i}=e,s=new m({getFn:t,fieldNormWeight:r});return s.setKeys(n),s.setIndexRecords(i),s},W.config=g,W.match=function(e,t,r){return B(e,{...g,...r}).searchIn(t)},W.parseQuery=$,j(class{constructor(e,{isCaseSensitive:t=g.isCaseSensitive,ignoreDiacritics:r=g.ignoreDiacritics,includeMatches:n=g.includeMatches,minMatchCharLength:i=g.minMatchCharLength,ignoreLocation:s=g.ignoreLocation,findAllMatches:u=g.findAllMatches,location:o=g.location,threshold:c=g.threshold,distance:a=g.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:r,includeMatches:n,minMatchCharLength:i,findAllMatches:u,ignoreLocation:s,location:o,threshold:c,distance:a},e=t?e:e.toLowerCase(),e=r?A(e):e,this.pattern=e,this.query=function(e,t={}){return e.replace(/\\\|/g,"\0").split("|").map(e=>{let r=(function(e){let t=[],r=e.length,n=0;for(;n<r;){for(;n<r&&" "===e[n];)n++;if(n>=r)break;let i=n;for(;i<r&&" "!==e[i]&&'"'!==e[i];)i++;if(i<r&&'"'===e[i]){for(i++;i<r;){if('"'===e[i]){let t=i+1;if(t>=r||" "===e[t]){i++;break}if("$"===e[t]&&(t+1>=r||" "===e[t+1])){i+=2;break}}i++}t.push(e.substring(n,i)),n=i}else{for(;i<r&&" "!==e[i];)i++;t.push(e.substring(n,i)),n=i}}return t})(e.replace(/\u0000/g,"|").trim()).filter(e=>e&&!!e.trim()),n=[];for(let e=0,i=r.length;e<i;e+=1){let i=r[e],s=!1,u=-1;for(;!s&&++u<D;){let e=k[u],r=e.isMultiMatch(i);r&&(n.push(new e(r,t)),s=!0)}if(!s)for(u=-1;++u<D;){let e=k[u],r=e.isSingleMatch(i);if(r){n.push(new e(r,t));break}}}return n})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:r,isCaseSensitive:n,ignoreDiacritics:i}=this.options;e=n?e:e.toLowerCase(),e=i?A(e):e;let s=0,u=[],o=0,c=!1;for(let n=0,i=t.length;n<i;n+=1){let i=t[n];u.length=0,s=0,c=!1;for(let t=0,n=i.length;t<n;t+=1){let n=i[t],{isMatch:a,indices:l,score:h}=n.search(e);if(a){s+=1,o+=h;let e=n.constructor.type;e.startsWith("inverse")&&(c=!0),r&&(F.has(e)?u.push(...l):u.push(l))}else{o=0,s=0,u.length=0,c=!1;break}}if(s){let e={isMatch:!0,score:o/s};return c&&(e.hasInverse=!0),r&&(e.indices=v(u)),e}}return{isMatch:!1,score:1}}}),j(class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=V({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});const r=this.analyzer.tokenize(e),{df:n,fieldCount:i}=t._invertedIndex;for(const e of(this.termSearchers=[],this.idfWeights=[],r)){this.termSearchers.push(new E(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const r=n.get(e)||0,s=Math.log(1+(i-r+.5)/(r+.5));this.idfWeights.push(s)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],r=0,n=0,i=0;for(let s=0;s<this.termSearchers.length;s++){let u=this.termSearchers[s].searchIn(e),o=this.idfWeights[s];n+=o,u.isMatch&&(i++,r+=o*(1-u.score),u.indices&&t.push(...u.indices))}if(0===i)return{isMatch:!1,score:1};let s={isMatch:!0,score:Math.max(.001,n>0?1-r/n:0)};return this.options.includeMatches&&t.length&&(s.indices=v(t)),s}}),W.use=function(...e){e.forEach(e=>j(e))},e.s(["default",0,W])},922088,e=>{e.v(t=>Promise.all(["static/chunks/0-efd~h5j2ufi.js"].map(t=>e.l(t))).then(()=>t(69466)))},84973,e=>{e.v(t=>Promise.all(["static/chunks/06.0rr3vc.77j.js"].map(t=>e.l(t))).then(()=>t(609403)))},574372,e=>{e.v(t=>Promise.all(["static/chunks/167~e_c5qi8o2.js"].map(t=>e.l(t))).then(()=>t(318135)))},732137,e=>{e.v(t=>Promise.all(["static/chunks/040j8d.w8mkyn.js","static/chunks/0ep-qrl_zzch8.js","static/chunks/17oc2l.ekcs8b.css"].map(t=>e.l(t))).then(()=>t(461834)))}]);