@co0ontty/wand 4.106.0 → 4.106.1

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 (279) hide show
  1. package/README.md +2 -2
  2. package/dist/ai-text-runner.js +24 -14
  3. package/dist/build-info.d.ts +2 -0
  4. package/dist/build-info.js +18 -0
  5. package/dist/build-info.json +3 -3
  6. package/dist/cli.js +8 -2
  7. package/dist/daemon-maintenance-state.js +1 -1
  8. package/dist/daemon-maintenance-targets.d.ts +1 -0
  9. package/dist/daemon-maintenance-targets.js +25 -9
  10. package/dist/daemon-maintenance.d.ts +3 -0
  11. package/dist/daemon-maintenance.js +60 -13
  12. package/dist/employee-im-types.d.ts +1 -1
  13. package/dist/employee-input-scheduling.d.ts +4 -0
  14. package/dist/employee-knowledge-cli.js +5 -5
  15. package/dist/employee-knowledge.d.ts +3 -1
  16. package/dist/employee-knowledge.js +24 -8
  17. package/dist/git-quick-commit.d.ts +2 -0
  18. package/dist/git-quick-commit.js +15 -2
  19. package/dist/git-worktree-batch.d.ts +26 -0
  20. package/dist/git-worktree-batch.js +139 -0
  21. package/dist/global-knowledge.d.ts +12 -0
  22. package/dist/global-knowledge.js +124 -0
  23. package/dist/iteration-log.d.ts +13 -5
  24. package/dist/iteration-log.js +120 -59
  25. package/dist/knowledge-types.d.ts +12 -1
  26. package/dist/knowledge-types.js +4 -0
  27. package/dist/middleware/api-scope.js +1 -0
  28. package/dist/model-groups.js +6 -3
  29. package/dist/models/parsers/opencode.js +31 -1
  30. package/dist/models.js +15 -14
  31. package/dist/npm-update-utils.d.ts +5 -2
  32. package/dist/npm-update-utils.js +34 -4
  33. package/dist/opencode-cli.d.ts +6 -0
  34. package/dist/opencode-cli.js +51 -0
  35. package/dist/opencode-system-fallback.d.ts +1 -0
  36. package/dist/opencode-system-fallback.js +16 -4
  37. package/dist/pi-native-event-bridge.js +55 -3
  38. package/dist/pi-native-input.d.ts +22 -0
  39. package/dist/pi-native-input.js +77 -0
  40. package/dist/pi-tmux-host.d.ts +14 -5
  41. package/dist/pi-tmux-host.js +68 -17
  42. package/dist/process-manager.js +17 -3
  43. package/dist/pty-tmux-backend.d.ts +27 -2
  44. package/dist/pty-tmux-backend.js +471 -70
  45. package/dist/pty-tmux-log.d.ts +1 -1
  46. package/dist/pty-tmux-log.js +23 -2
  47. package/dist/retention-protection.d.ts +1 -1
  48. package/dist/retention-protection.js +3 -2
  49. package/dist/retention.d.ts +5 -0
  50. package/dist/retention.js +11 -0
  51. package/dist/server-knowledge-routes.js +2 -2
  52. package/dist/server-session-input-routes.js +38 -19
  53. package/dist/server-session-lifecycle-routes.js +14 -1
  54. package/dist/server-session-worktree-routes.js +105 -12
  55. package/dist/server-task-routes.js +41 -12
  56. package/dist/server-workspace-routes.js +77 -9
  57. package/dist/server.js +67 -35
  58. package/dist/session-registry.d.ts +17 -3
  59. package/dist/session-registry.js +66 -13
  60. package/dist/session-service.js +1 -1
  61. package/dist/storage/internal.d.ts +4 -3
  62. package/dist/storage/internal.js +3 -3
  63. package/dist/storage/knowledge-repository.d.ts +5 -0
  64. package/dist/storage/knowledge-repository.js +75 -16
  65. package/dist/storage/mappers.d.ts +1 -0
  66. package/dist/storage/mappers.js +6 -1
  67. package/dist/storage/migrations.js +60 -0
  68. package/dist/storage/session-input-repository.d.ts +19 -0
  69. package/dist/storage/session-input-repository.js +35 -0
  70. package/dist/storage/task-workflow-repository.d.ts +29 -0
  71. package/dist/storage/task-workflow-repository.js +110 -0
  72. package/dist/storage/tasks-repository.d.ts +6 -1
  73. package/dist/storage/tasks-repository.js +94 -34
  74. package/dist/storage/workspaces-repository.d.ts +7 -0
  75. package/dist/storage/workspaces-repository.js +28 -2
  76. package/dist/storage-cleanup.d.ts +7 -2
  77. package/dist/storage-cleanup.js +16 -0
  78. package/dist/storage-schema.js +2 -0
  79. package/dist/storage.d.ts +5 -1
  80. package/dist/storage.js +12 -0
  81. package/dist/structured-exec-host.d.ts +4 -0
  82. package/dist/structured-exec-pump.d.ts +1 -0
  83. package/dist/structured-exec-pump.js +18 -11
  84. package/dist/structured-opencode-adapter.d.ts +2 -1
  85. package/dist/structured-opencode-adapter.js +32 -8
  86. package/dist/structured-pi-adapter.js +13 -2
  87. package/dist/structured-runner.d.ts +6 -0
  88. package/dist/structured-session-manager-replay.d.ts +2 -0
  89. package/dist/structured-session-manager-replay.js +27 -0
  90. package/dist/structured-session-manager.d.ts +32 -21
  91. package/dist/structured-session-manager.js +395 -118
  92. package/dist/structured-tmux-host.d.ts +23 -2
  93. package/dist/structured-tmux-host.js +143 -20
  94. package/dist/task-actions.js +5 -3
  95. package/dist/task-archive-policy.js +2 -1
  96. package/dist/task-comment-dispatch.d.ts +2 -1
  97. package/dist/task-comment-dispatch.js +19 -6
  98. package/dist/task-execution-queue.d.ts +2 -0
  99. package/dist/task-execution-queue.js +10 -10
  100. package/dist/task-hierarchy.js +1 -1
  101. package/dist/task-read-model.d.ts +1 -1
  102. package/dist/task-read-model.js +2 -1
  103. package/dist/task-types.d.ts +34 -3
  104. package/dist/task-types.js +21 -5
  105. package/dist/task-workflow-cli.d.ts +2 -0
  106. package/dist/task-workflow-cli.js +29 -0
  107. package/dist/task-workflow-runner.d.ts +4 -0
  108. package/dist/task-workflow-runner.js +36 -0
  109. package/dist/task-workflow.d.ts +13 -0
  110. package/dist/task-workflow.js +48 -0
  111. package/dist/terminal-daemon-server.js +12 -4
  112. package/dist/tmux-policy.d.ts +9 -0
  113. package/dist/tmux-policy.js +46 -0
  114. package/dist/tmux-terminal-host.js +5 -2
  115. package/dist/tui/commands.js +2 -1
  116. package/dist/types.d.ts +5 -0
  117. package/dist/wand-task-sync.js +5 -0
  118. package/dist/web-ui/content/ai-teams.js +9 -9
  119. package/dist/web-ui/content/module-manifest.json +1 -1
  120. package/dist/web-ui/content/modules/{52574891ef08e29b → 014fa5c6f973badf}/host.js +3 -3
  121. package/dist/web-ui/content/modules/0818b1d31a11d006/employee-profile.js +1 -0
  122. package/dist/web-ui/content/modules/{31157ceb6d23b809 → 0a58d9ec273078e4}/chunk.js +3 -3
  123. package/dist/web-ui/content/modules/{bf3ee58e0da44822 → 0a979dcd165cd0cc}/chunk.js +1 -1
  124. package/dist/web-ui/content/modules/{5f298a8f43dd0589 → 0c143928e8f96abc}/chunk.js +1 -1
  125. package/dist/web-ui/content/modules/0e9e42a319f6b8fc/workspace-window.js +1 -0
  126. package/dist/web-ui/content/modules/{b713cad51ca4c512 → 0f0d1769b732c0bd}/chunk.js +1 -1
  127. package/dist/web-ui/content/modules/{4970319a83432ec7 → 1447886e6a1e74a4}/chunk.js +1 -1
  128. package/dist/web-ui/content/modules/151c734cbca31da5/host.js +1 -0
  129. package/dist/web-ui/content/modules/{e5174201f9d918fb → 16e4ab9c5263fcfd}/chunk.js +1 -1
  130. package/dist/web-ui/content/modules/17e752fb53952753/host.js +1 -0
  131. package/dist/web-ui/content/modules/{913187c92a98a1ac → 20ed1454fc09fa6f}/chunk.js +1 -1
  132. package/dist/web-ui/content/modules/255a3baf59d2b734/home.js +6 -0
  133. package/dist/web-ui/content/modules/{2f801e53dda62770 → 296dd81886c42b45}/chunk.js +1 -1
  134. package/dist/web-ui/content/modules/{8891ca8165435ca1 → 2a01f4e525c0725e}/chunk.js +1 -1
  135. package/dist/web-ui/content/modules/2ab4409c82b44fba/markdown.js +1 -0
  136. package/dist/web-ui/content/modules/2c955eced11610c2/chunk.js +1 -0
  137. package/dist/web-ui/content/modules/2d7ee4f9e2c0aca4/panel.js +1 -0
  138. package/dist/web-ui/content/modules/{3f8830f8ad28decc → 33ae550e4a295c85}/chunk.js +1 -1
  139. package/dist/web-ui/content/modules/35f4aa4443696bd0/chunk.js +1 -0
  140. package/dist/web-ui/content/modules/388b37ffcce9d4ff/host.js +1 -0
  141. package/dist/web-ui/content/modules/39279604dcdac7c7/runtime.js +338 -0
  142. package/dist/web-ui/content/modules/{57c357d321db5df9 → 3a3cdff2a662b7d3}/chunk.js +1 -1
  143. package/dist/web-ui/content/modules/{d49f106c4d106057 → 3ab646be55514243}/chunk.js +1 -1
  144. package/dist/web-ui/content/modules/{16dab1297efd71a7 → 3ae88a5c5e1949d2}/chunk.js +1 -1
  145. package/dist/web-ui/content/modules/3e3b0e71d6ce80d8/chunk.js +1 -0
  146. package/dist/web-ui/content/modules/{ec33e17c00c1eb24 → 434aaaaf9604dc34}/chunk.js +1 -1
  147. package/dist/web-ui/content/modules/4385cd48771e1d4f/host.js +1 -0
  148. package/dist/web-ui/content/modules/{face3dbf117d63e3 → 4638129d60f549a0}/chunk.js +1 -1
  149. package/dist/web-ui/content/modules/47407209931b7011/host.js +13 -0
  150. package/dist/web-ui/content/modules/4829dd712d8b366b/chunk.js +1 -0
  151. package/dist/web-ui/content/modules/488d5b747bf374c8/chunk.js +1 -0
  152. package/dist/web-ui/content/modules/{ed7405f064944215 → 4ab085c195f7d76a}/sha256.js +1 -1
  153. package/dist/web-ui/content/modules/{f27a5d3c6c02a71c → 4c485bd44740fec7}/chunk.js +1 -1
  154. package/dist/web-ui/content/modules/{771439a41e737ee2 → 4ca0494308ab2bb3}/chunk.js +1 -1
  155. package/dist/web-ui/content/modules/4ec571218779ba3e/composer-surface-adapter.js +1 -0
  156. package/dist/web-ui/content/modules/{5933ce8965aa4004 → 5023bf0294c2e7cb}/chunk.js +1 -1
  157. package/dist/web-ui/content/modules/{e63582a3bce48f7d → 5456e3417600bf15}/chunk.js +1 -1
  158. package/dist/web-ui/content/modules/55c588b0f5b41a52/host-bridge.js +1 -0
  159. package/dist/web-ui/content/modules/{9d941d6ff39861b8 → 5c3c8237ba7d8460}/chunk.js +1 -1
  160. package/dist/web-ui/content/modules/624b858da9834757/host.js +1 -0
  161. package/dist/web-ui/content/modules/6290be936320d4b1/host.js +1 -0
  162. package/dist/web-ui/content/modules/66be408793048cc3/progress.js +1 -0
  163. package/dist/web-ui/content/modules/67a11176a563317b/chunk.js +1 -0
  164. package/dist/web-ui/content/modules/{e060508ecd50fa7e → 68ef6ec7d26d78cd}/chunk.js +1 -1
  165. package/dist/web-ui/content/modules/{41445c6589dba325 → 6ec3e41df31927d9}/host.js +2 -2
  166. package/dist/web-ui/content/modules/{97d7f267959fd385 → 6f10f369445bbcbe}/chunk.js +1 -1
  167. package/dist/web-ui/content/modules/{d47d75a78ae598e3 → 7295d9ff92d5e1e7}/chunk.js +1 -1
  168. package/dist/web-ui/content/modules/{f383d892fef73483 → 72cd613de1a5f69b}/chunk.js +1 -1
  169. package/dist/web-ui/content/modules/73aae1daafeea7e7/workspaces-panel.js +4 -0
  170. package/dist/web-ui/content/modules/{c2f09c8a472f5d83 → 73d2689f13b9a3e9}/dialog-modal.js +1 -1
  171. package/dist/web-ui/content/modules/{2f97ddba3842adaa → 75cf0c048e9b92ab}/chunk.js +1 -1
  172. package/dist/web-ui/content/modules/{4ba1e8c74bed7ef2 → 75dabda3b141296e}/chunk.js +1 -1
  173. package/dist/web-ui/content/modules/{f3cff7792ba39df8 → 76c10b58d5f92d02}/login-visual.js +1 -1
  174. package/dist/web-ui/content/modules/{b63e075f222a1266 → 783583a12f5010f8}/library-bridge.js +1 -1
  175. package/dist/web-ui/content/modules/7e13a8a4a981f2f1/group-editor.js +1 -0
  176. package/dist/web-ui/content/modules/{0d76e582a7a71b2f → 7e3034fea34c6dae}/chunk.js +1 -1
  177. package/dist/web-ui/content/modules/80bf3291f2577a68/host.js +1 -0
  178. package/dist/web-ui/content/modules/{cba6f13c0b2aec1c → 82c3e08f34a6b828}/chunk.js +1 -1
  179. package/dist/web-ui/content/modules/{dedd4a19bb70e327 → 83d1f4cf82c65f19}/page.js +3 -3
  180. package/dist/web-ui/content/modules/844f97958f25240c/shell-file-panel-drawer.js +1 -0
  181. package/dist/web-ui/content/modules/{62e0023451f428cf → 899cdc467044d418}/chunk.js +1 -1
  182. package/dist/web-ui/content/modules/{5083a5dbb5b155b7 → 8c7ca1fe72741c07}/chunk.js +1 -1
  183. package/dist/web-ui/content/modules/8dae4ca2261525e4/task-board-host.js +27 -0
  184. package/dist/web-ui/content/modules/92195c14c74929da/list-filter-panel.js +1 -0
  185. package/dist/web-ui/content/modules/{a61393bfa976d8d5 → 93793696af76bcbf}/chunk.js +1 -1
  186. package/dist/web-ui/content/modules/{db521a246e14e5e4 → 97cd6af3da5622b8}/chunk.js +4 -4
  187. package/dist/web-ui/content/modules/{8de8368570ab089d → 9d3179258249ec77}/chunk.js +1 -1
  188. package/dist/web-ui/content/modules/{579d486763d47c0d → a234c484078c0568}/chunk.js +1 -1
  189. package/dist/web-ui/content/modules/a4d215448a089a7d/host.js +1 -0
  190. package/dist/web-ui/content/modules/{c0a446100d969f3e → ae003f89901c5687}/chunk.js +1 -1
  191. package/dist/web-ui/content/modules/ae712bdd45b9917e/employee-card.js +1 -0
  192. package/dist/web-ui/content/modules/{a2caed0139df4b21 → b2a15293f7965d09}/chunk.js +1 -1
  193. package/dist/web-ui/content/modules/b4ee65e9998f0088/host.js +61 -0
  194. package/dist/web-ui/content/modules/{bd3daf04a8bf4422 → b666137d17f83be9}/chunk.js +1 -1
  195. package/dist/web-ui/content/modules/{831b6c7b43e800be → b66beb6c0185256b}/host.js +1 -1
  196. package/dist/web-ui/content/modules/{816eb9b3a000fb2c → bb03b17e877657de}/chunk.js +1 -1
  197. package/dist/web-ui/content/modules/{1eab7410d5586038 → bc343afc991db1a1}/chunk.js +1 -1
  198. package/dist/web-ui/content/modules/bca45976ff8fe2ac/host.js +69 -0
  199. package/dist/web-ui/content/modules/{d434edbb2f4672e5 → c2715dbfc9eaf510}/chunk.js +1 -1
  200. package/dist/web-ui/content/modules/{d6fffe2c2a3a738d → c30c220281f35d74}/toast-region.js +1 -1
  201. package/dist/web-ui/content/modules/c4cc46fa9b4adddc/dropdown-surface.js +1 -0
  202. package/dist/web-ui/content/modules/c6dd19ee3d3ffd59/brand-identity.js +1 -0
  203. package/dist/web-ui/content/modules/c7ea6a114e6ff8ae/host.js +1 -0
  204. package/dist/web-ui/content/modules/{a59734be368daa7e → c916d82c8acef9c8}/chunk.js +1 -1
  205. package/dist/web-ui/content/modules/{182929e188c1ab3a → cceaedda619a737a}/host.js +1 -1
  206. package/dist/web-ui/content/modules/cf67f52b076b9d2d/panel-host.js +1 -0
  207. package/dist/web-ui/content/modules/{9e163d54ff8fd1aa → d26c86558d422313}/chunk.js +1 -1
  208. package/dist/web-ui/content/modules/d2b8c6c6f3706032/queue-view-adapter.js +1 -0
  209. package/dist/web-ui/content/modules/d52ebe2ef12a9fa8/chunk.js +3 -0
  210. package/dist/web-ui/content/modules/{3fe11a75284ad8ae → d552b3bff2151eb6}/host.js +2 -2
  211. package/dist/web-ui/content/modules/d5d6b4511ac76a6e/chunk.js +3 -0
  212. package/dist/web-ui/content/modules/{bd7dc4bb46731ee7 → df42e151d625463b}/chunk.js +1 -1
  213. package/dist/web-ui/content/modules/{2a791cd2e14aa1e0 → e0a04f5ae56c68aa}/notice-view.js +1 -1
  214. package/dist/web-ui/content/modules/{438807b8bf112cd0 → e28e607c95d6f63a}/chunk.js +1 -1
  215. package/dist/web-ui/content/modules/{50da446c1377c220 → e3880df97ea62d0c}/chunk.js +1 -1
  216. package/dist/web-ui/content/modules/{87c7f50d9455d55e → e66196f1ece3e3ad}/chunk.js +1 -1
  217. package/dist/web-ui/content/modules/{9b12c2301f3a18f3 → eb76307444ac9d71}/chunk.js +1 -1
  218. package/dist/web-ui/content/modules/{c33935155289c22d → ebff7ca22cee1468}/chunk.js +1 -1
  219. package/dist/web-ui/content/modules/{4861eca9a8a87ad0 → ed1c712c569960d6}/chunk.js +1 -1
  220. package/dist/web-ui/content/modules/ee8b9c2d4bec63d4/chunk.js +1 -0
  221. package/dist/web-ui/content/modules/f458a194ce4208e2/chunk.js +1 -0
  222. package/dist/web-ui/content/modules/{11af5d14b30e57b6 → f938e826420cfe1b}/chunk.js +1 -1
  223. package/dist/web-ui/content/modules/fa7b9bf6cc84bfc1/chat-render.js +81 -0
  224. package/dist/web-ui/content/modules/{ea8fe4b9999fd2aa → fd1fb1834f5f06df}/chunk.js +1 -1
  225. package/dist/web-ui/content/modules/fd3084e562a3dbd6/host.js +1 -0
  226. package/dist/web-ui/content/styles.css +1 -1
  227. package/dist/web-ui/embedded-assets.d.ts +416 -413
  228. package/dist/web-ui/embedded-assets.js +5 -5
  229. package/dist/web-ui/page-route.js +2 -2
  230. package/dist/web-ui/react/workspaces/types.d.ts +3 -0
  231. package/dist/web-ui/thinking-efforts.d.ts +2 -0
  232. package/dist/web-ui/thinking-efforts.js +8 -0
  233. package/package.json +1 -2
  234. package/scripts/stage-render-binaries.js +0 -1
  235. package/skills/wand-knowledge/SKILL.md +5 -3
  236. package/dist/structured-bounded-keys.d.ts +0 -19
  237. package/dist/structured-bounded-keys.js +0 -47
  238. package/dist/web-ui/content/modules/00b168a19664439e/dropdown-surface.js +0 -1
  239. package/dist/web-ui/content/modules/059c5fb7f128d340/task-board-host.js +0 -27
  240. package/dist/web-ui/content/modules/07494f5a623e4471/chat-render.js +0 -76
  241. package/dist/web-ui/content/modules/0a743ad3b4db6874/chunk.js +0 -3
  242. package/dist/web-ui/content/modules/1858670c0f84fec5/employee-profile.js +0 -1
  243. package/dist/web-ui/content/modules/20c47dc0442f5a04/host.js +0 -1
  244. package/dist/web-ui/content/modules/226241b999d12008/host.js +0 -1
  245. package/dist/web-ui/content/modules/23c4b8d223ec64c5/host.js +0 -61
  246. package/dist/web-ui/content/modules/2882c97388ff4f7b/employee-card.js +0 -1
  247. package/dist/web-ui/content/modules/2c90c3be260e6cce/progress.js +0 -1
  248. package/dist/web-ui/content/modules/2d7be9935394f397/workspace-window.js +0 -1
  249. package/dist/web-ui/content/modules/389a5112332ec23a/host.js +0 -1
  250. package/dist/web-ui/content/modules/3ea13e8b3c2deaa4/panel-host.js +0 -1
  251. package/dist/web-ui/content/modules/42e5c34002fcffb7/chunk.js +0 -1
  252. package/dist/web-ui/content/modules/4a5d669c90f545cb/host.js +0 -1
  253. package/dist/web-ui/content/modules/5705d25468274534/host.js +0 -1
  254. package/dist/web-ui/content/modules/5961ab2947c86ca1/shell-file-panel-drawer.js +0 -1
  255. package/dist/web-ui/content/modules/5b6e1369df7dea69/chunk.js +0 -1
  256. package/dist/web-ui/content/modules/6787bdcf56f743a5/host.js +0 -1
  257. package/dist/web-ui/content/modules/67c39b0398186a9f/host.js +0 -1
  258. package/dist/web-ui/content/modules/6b16f35c0627bafb/chunk.js +0 -1
  259. package/dist/web-ui/content/modules/6dd4f3e2f619f7a0/chunk.js +0 -1
  260. package/dist/web-ui/content/modules/70a2e13e0ccc8549/panel.js +0 -1
  261. package/dist/web-ui/content/modules/710db590e9707f73/runtime.js +0 -338
  262. package/dist/web-ui/content/modules/7249950f8771dbeb/workspaces-panel.js +0 -4
  263. package/dist/web-ui/content/modules/87dcd516ffd9f688/composer-surface-adapter.js +0 -1
  264. package/dist/web-ui/content/modules/8b7cd7bffdfd69e7/brand-identity.js +0 -1
  265. package/dist/web-ui/content/modules/8bf9917f6c3429f6/host.js +0 -1
  266. package/dist/web-ui/content/modules/8e612d4881fa4118/home.js +0 -6
  267. package/dist/web-ui/content/modules/8e6178262ea63dec/markdown.js +0 -1
  268. package/dist/web-ui/content/modules/96f2ae970f8c576b/host.js +0 -1
  269. package/dist/web-ui/content/modules/ba89cd97627e6682/queue-view-adapter.js +0 -1
  270. package/dist/web-ui/content/modules/c351eb11e0bdec2c/sidebar-peek.js +0 -1
  271. package/dist/web-ui/content/modules/ca7ca5902a35d26e/chunk.js +0 -1
  272. package/dist/web-ui/content/modules/d5d28ec375826ef2/chunk.js +0 -3
  273. package/dist/web-ui/content/modules/d6b16dedb9011c33/chunk.js +0 -1
  274. package/dist/web-ui/content/modules/d8a7011760f61719/group-editor.js +0 -1
  275. package/dist/web-ui/content/modules/d9e2b65e9679ad39/host.js +0 -75
  276. package/dist/web-ui/content/modules/eac72f69716dba05/chunk.js +0 -1
  277. package/dist/web-ui/content/modules/ebc53dedc3945514/host.js +0 -1
  278. package/dist/web-ui/content/modules/f43da7050badf54c/host.js +0 -1
  279. package/dist/web-ui/content/modules/fb2356eced24c4cc/host-bridge.js +0 -1
@@ -0,0 +1,338 @@
1
+
2
+ const __wandCssTextPool = Object.freeze([":root{--wand-page-inset:20px;--wand-page-title-size:18px;--wand-page-toolbar-height:36px;--wand-page-header-height:56px}@media(max-width:639px){:root{--wand-page-inset:12px}}#overlay-root{isolation:isolate;position:fixed;inset:0;z-index:20000;pointer-events:none}.wand-ui-mount{display:contents}.wand-ui-portals{position:fixed;inset:0;pointer-events:none}.wand-ui-portals :is(.ant-modal-wrap,.ant-dropdown,.ant-dropdown-menu-submenu-popup,.ant-select-dropdown,.ant-popover,.ant-notification-notice){pointer-events:auto}.wand-ui-dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.wand-ui-dialog-content .ant-modal-body{max-height:calc(100dvh - 180px - var(--wand-safe-top,0px) - var(--wand-safe-bottom,0px));overflow:auto;overscroll-behavior:contain}.wand-ui-dialog-title{font-size:var(--wand-page-title-size);font-weight:600;line-height:1.4}.wand-ui-dialog-description{white-space:pre-wrap;font-weight:400;font-size:13px;line-height:1.55;color:var(--text-secondary);padding-top:4px}.wand-ui-dialog-content .wand-dialog-sticky-actions{position:sticky;bottom:0;z-index:2;padding-block:12px;background:var(--bg-elevated);border-top:1px solid var(--border-subtle)}@media(max-width:639px){.wand-ui-dialog-content .ant-modal-body{max-height:calc(100dvh - 160px - var(--wand-safe-top,0px) - var(--wand-safe-bottom,0px))}}.wand-ui-dialog-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:20px}.wand-ui-switch-row{display:inline-flex;align-items:center;gap:9px}.wand-ui-menu{display:flex;flex-direction:column}.wand-ui-menu-item{justify-content:flex-start;width:100%}.wand-ui-menu-item-label{flex:1;min-width:0;text-align:start}.wand-ui-menu-item-hint,.wand-ui-dropdown-item-hint{margin-inline-start:auto}.wand-ui-badge{font-variant-numeric:tabular-nums;margin-inline-end:0}.wand-self-tag{margin-inline-start:6px;vertical-align:middle}.wand-ui-select-content{max-width:calc(100vw - var(--wand-safe-left, 0px) - var(--wand-safe-right, 0px) - 24px)}.wand-ui-select-content .ant-dropdown-menu{max-height:min(360px,60dvh);overflow-y:auto;overscroll-behavior:contain}.wand-ui-navigation-list{list-style:none;margin:0;padding:0}.wand-ui-navigation[data-orientation=horizontal] .wand-ui-navigation-list{display:flex}.wand-ui-navigation-link{height:auto;justify-content:flex-start;text-align:start}.wand-ui-stretch-tabs{position:relative;isolation:isolate}.wand-ui-stretch-tabs .ant-segmented-thumb{visibility:hidden}.wand-ui-stretch-tabs .ant-segmented-item-selected{background:transparent;box-shadow:none}.wand-ui-stretch-tabs .ant-segmented-item{position:relative;z-index:1}.wand-ui-stretch-indicator{position:absolute;z-index:0;top:2px;bottom:2px;border-radius:inherit;background:var(--bg-elevated, #fffdfa);box-shadow:var(--shadow-sm);pointer-events:none;transition:left var(--motion-indicator) var(--ease-in-out-smooth),width var(--motion-indicator) var(--ease-in-out-smooth)}\n","@keyframes wand-ui-fade-in{0%{opacity:0}to{opacity:1}}@keyframes wand-ui-fade-out{0%{opacity:1}to{opacity:0}}@keyframes wand-ui-dialog-in{0%{opacity:0;transform:translate(-50%,calc(-50% + 6px))}to{opacity:1;transform:translate(-50%,-50%)}}@keyframes wand-ui-dialog-out{0%{opacity:1;transform:translate(-50%,-50%)}to{opacity:0;transform:translate(-50%,calc(-50% + 4px))}}@keyframes wand-ui-scale-in{0%{opacity:0;transform:scale(.98)}to{opacity:1;transform:scale(1)}}@media(max-width:520px){.wand-ui-dialog-actions{flex-direction:column-reverse}.wand-ui-dialog-actions .wand-ui-button{width:100%}}\n","@media(prefers-reduced-motion:reduce){:is(.ant-dropdown,.ant-dropdown-menu-submenu-popup,.ant-popover,.ant-tooltip,.ant-picker-dropdown,.ant-select-dropdown){transition-property:none!important;animation-duration:.01ms!important;transform:none!important}.ant-modal{animation-duration:.01ms!important;transform:none!important}#overlay-root *,#overlay-root *:before,#overlay-root *:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n","@keyframes wand-settings-fade-in{0%{opacity:0}to{opacity:1}}\n",".wand-workspace-agent-model-select,.wand-new-session-model-select{width:100%}\n",".composer-config-select-host{display:inline-flex;flex:1 1 auto;min-width:0;max-width:100%}.wand-composer-select-trigger{width:100%;min-width:0}.wand-composer-select-trigger>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wand-composer-select-content{width:max-content;max-width:min(560px,calc(100vw - 28px));max-height:min(330px,var(--available-height));overflow:auto}.wand-composer-select-item{max-width:min(530px,calc(100vw - 48px))}.wand-composer-select-item .ant-dropdown-menu-title-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n","[data-pi-composer]{position:relative}[data-pi-settings-host]{position:absolute;inset-inline-start:0;bottom:calc(100% + 8px);width:min(640px,100%);z-index:55}[data-pi-settings-toggle-host]{display:contents}.input-composer:has(.permission-actions:not(.hidden)) [data-pi-settings-toggle-host]{display:none}.wand-pi-skill-switch:focus-visible{outline:2px solid var(--border-focus);outline-offset:2px;border-radius:var(--control-radius)}\n",".local-preview-link{color:var(--accent);text-decoration:underline;text-underline-offset:2px}.local-preview-link:hover{color:var(--accent-hover)}\n",".wand-media-stage.ant-btn{display:flex;align-items:center;justify-content:center;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%;padding:12px;overflow:auto;white-space:normal;background-image:linear-gradient(45deg,var(--bg-tertiary) 25%,transparent 25%),linear-gradient(-45deg,var(--bg-tertiary) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--bg-tertiary) 75%),linear-gradient(-45deg,transparent 75%,var(--bg-tertiary) 75%);background-position:0 0,0 8px,8px -8px,-8px 0;background-size:16px 16px;cursor:zoom-in}.wand-media-stage .ant-image{display:flex;max-width:100%;max-height:100%}.wand-media-stage img{max-width:100%;max-height:100%;object-fit:contain}.wand-media-stage.zoomed{align-items:flex-start;justify-content:flex-start;cursor:zoom-out}.wand-media-stage.zoomed .ant-image,.wand-media-stage.zoomed img{max-width:none;max-height:none}.wand-image-viewer-caption{display:block;max-width:100%;overflow-wrap:anywhere;text-align:center}.wand-image-viewer :is(.ant-image-preview-close,.ant-image-preview-switch,.ant-image-preview-actions-action){min-width:44px;min-height:44px}.wand-image-viewer.ant-image-preview .ant-image-preview-switch:not(:disabled){background:var(--bg-terminal)}.wand-image-viewer .ant-image-preview-img{touch-action:none}.markdown-content img[role=button]{max-width:100%;max-height:360px;object-fit:contain;cursor:zoom-in}.markdown-content img[role=button]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}\n",".wand-plush-avatar{position:relative;display:inline-grid;flex:none;place-items:center;overflow:visible;isolation:isolate;vertical-align:middle;line-height:0}.wand-plush-avatar canvas,.wand-plush-avatar-fallback{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}.wand-plush-avatar canvas{opacity:0}.wand-plush-avatar[data-renderer=webgl] canvas{opacity:1}.wand-plush-avatar[data-renderer=webgl] .wand-plush-avatar-fallback{visibility:hidden}.wand-avatar-file-fallback{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.wand-plush-avatar[data-renderer=webgl] .wand-avatar-file-fallback{visibility:hidden}\n",".wand-avatar-editor{min-width:0}.wand-avatar-editor-summary{flex-wrap:wrap}.wand-avatar-editor-trigger.ant-btn{flex:0 0 44px;width:44px;height:44px;padding:0;position:relative;overflow:visible}.wand-avatar-edit-mark{position:absolute;bottom:0;right:-2px;display:grid;place-items:center;width:16px;height:16px;border-radius:5px;background:var(--bg-elevated);color:var(--text-secondary);border:1px solid var(--border-subtle)}.wand-avatar-upload-hint{display:block;margin-top:4px;font-size:11px}.wand-avatar-options:disabled{opacity:.65}.wand-avatar-options:disabled input{cursor:default}.wand-avatar-editor-caption{font-size:12px}.wand-avatar-sculpt{display:grid;grid-template-columns:172px minmax(0,1fr);gap:12px 18px;margin-top:12px;padding:14px;background:var(--bg-elevated);border:1px solid var(--border-subtle);border-radius:8px}.wand-avatar-sculpt-preview{min-width:0;align-self:center;display:flex;flex-direction:column;align-items:center;gap:5px}.wand-avatar-sculpt-preview>.ant-typography{font-size:11px}.wand-avatar-sculpt-preview>.ant-btn{font-size:12px}.wand-avatar-sculpt-controls{display:flex;flex-direction:column;gap:10px;min-width:0}.wand-avatar-options{margin:0;padding:0;border:0;min-width:0}.wand-avatar-options legend{display:flex;gap:8px;align-items:baseline;width:100%;margin:0 0 5px;padding:0;font-size:12px;color:var(--text-primary)}.wand-avatar-options legend>span{color:var(--text-secondary);font-size:11px}.wand-avatar-option-row{display:flex;flex-wrap:wrap;gap:4px}.wand-avatar-option{position:relative;width:32px;height:32px;cursor:pointer;display:grid;place-items:center}.wand-avatar-option input{appearance:none;position:absolute;margin:0;inset:0;width:100%;height:100%;border-radius:6px;border:1px solid transparent;background:transparent;cursor:pointer}.wand-avatar-option input:hover{background:var(--bg-hover)}.wand-avatar-option input:checked{background:var(--accent-muted);border-color:var(--primary)}.wand-avatar-option input:focus-visible{outline:2px solid var(--border-focus);outline-offset:2px}.wand-avatar-option-mark{width:22px;height:22px;display:grid;place-items:center;color:var(--text-secondary);pointer-events:none;position:relative}.wand-avatar-option-mark svg{width:20px;height:20px;fill:var(--text-secondary);stroke:currentColor;stroke-width:1.4;stroke-linejoin:round;stroke-linecap:round}.wand-avatar-color{width:18px;height:18px;border-radius:50%;box-shadow:inset 0 0 0 1px #0000001f}.wand-avatar-option-name{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.wand-avatar-sculpt-footer{grid-column:1/-1;padding-top:10px;border-top:1px solid var(--border-subtle)}.wand-avatar-sculpt-footer>.ant-typography{font-size:11px}@media(max-width:600px){.wand-avatar-sculpt{grid-template-columns:minmax(0,1fr);gap:12px;padding:12px}.wand-avatar-sculpt-preview{flex-direction:row;flex-wrap:wrap;justify-content:center}.wand-avatar-sculpt-preview>[data-plush-avatar]{flex:0 0 140px}.wand-avatar-sculpt-preview>.ant-typography{display:none}.wand-avatar-sculpt-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px}.wand-avatar-options:nth-child(-n+2){grid-column:1/-1}.wand-avatar-editor-summary>.ant-btn{padding-inline:6px}}@media(pointer:coarse){.wand-avatar-option{width:44px;height:44px}.wand-avatar-option-row{gap:2px}}@media(forced-colors:active){.wand-avatar-option input:checked{border-color:Highlight}.wand-avatar-color{border:1px solid CanvasText}}\n",".sidebar-session-preview{display:grid;grid-template-rows:1fr;opacity:1;min-width:0;transition:grid-template-rows var(--motion-normal) var(--ease-out-expo),opacity var(--motion-fast) var(--ease-in-out-smooth)}.sidebar-session-preview[data-expanded=true]{grid-template-rows:0fr;opacity:0}.sidebar-session-preview-clip{min-height:0;min-width:0;overflow:hidden}.sidebar-session-preview-row{display:flex;align-items:center;gap:4px;min-width:0;padding:2px 4px 6px;overflow:hidden}.sidebar-session-preview .sidebar-session-tag.ant-btn{flex:none;width:36px;min-width:36px;height:28px;padding:0;gap:4px;border-radius:var(--radius-xs);color:var(--text-secondary);background:var(--sidebar-surface,var(--bg-surface));border:1px solid var(--border-subtle)}.sidebar-session-preview .sidebar-session-tag[data-titles=true]{width:auto;padding-inline:6px}.sidebar-session-preview .sidebar-session-tag[aria-pressed=true],.sidebar-session-preview .sidebar-session-more.ant-btn[data-contains-current=true]{background:var(--sidebar-selected,var(--bg-active));color:var(--sidebar-accent,var(--text-link));border-color:var(--sidebar-selected,var(--border-subtle))}.sidebar-session-preview :is(.sidebar-session-tag,.sidebar-session-more):focus-visible{outline:2px solid var(--sidebar-accent,var(--border-focus));outline-offset:-2px}.sidebar-session-preview .sidebar-session-more.ant-btn{flex:none;width:auto;min-width:0;max-width:100%;height:28px;padding:0 6px;font-size:11px;font-variant-numeric:tabular-nums;border-radius:var(--radius-xs);color:var(--text-secondary);background:var(--sidebar-surface,var(--bg-surface));border:1px solid var(--border-subtle)}.sidebar-session-tag-content{display:inline-flex;align-items:center;gap:4px}.sidebar-session-tag-title{font-size:11px;line-height:16px;white-space:nowrap}.sidebar-session-preview .sidebar-provider-mark{flex:none}.sidebar-session-preview .sidebar-provider-mark>svg{width:100%;height:100%}.sidebar-session-preview-status{display:inline-flex;align-items:center;justify-content:center;width:8px;height:8px;flex:none;line-height:0}.sidebar-session-preview-status .ant-badge{line-height:0}.sidebar-session-preview-status .ant-badge-status-dot{width:5px;height:5px}.sidebar-session-preview-measure-clip{position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;pointer-events:none}.sidebar-session-preview-measure{display:flex;width:max-content;gap:4px}.sidebar-session-preview-measure-clip .sidebar-session-more.ant-btn{max-width:none}.sidebar-session-preview-task{margin-inline-start:20px}.sidebar-session-preview-person{margin-inline-start:28px}@media(pointer:coarse){.sidebar-session-preview :is(.sidebar-session-tag,.sidebar-session-more).ant-btn{height:36px}}@media(prefers-reduced-motion:reduce){.sidebar-session-preview{transition:none}}\n",".sidebar-session-area{min-width:0;padding-inline-start:12px}.sidebar-session-area[data-empty]{min-height:36px}.sidebar-session-area-toggle.ant-btn{width:24px;min-width:24px;height:32px;padding:0;flex-shrink:0;color:var(--text-secondary)}.sidebar-session-area-content{min-width:0}.sidebar-session-area-content>.sidebar-session-preview{margin-inline-start:0}.sidebar-session-area-content .conversation-person-sessions,.sidebar .sidebar-session-area-content .im-sidebar-group-inner,.sidebar .sidebar-session-area-content .workspace-task-sessions{margin-inline-start:0}@media(pointer:coarse),(max-width:640px){.sidebar-session-area[data-empty]{min-height:44px}.sidebar-session-area-toggle.ant-btn{width:44px;min-width:44px;height:44px}}\n",".sidebar-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.workspaces-panel{position:relative}.sidebar-navigation-rail{width:56px;flex:none;min-height:0;padding:8px 4px;border-inline-end:1px solid var(--border-subtle);background:var(--sidebar-rail)}.sidebar-rail-scroll{width:100%;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.sidebar-rail-scroll>.sidebar-brand-mark{display:block;margin:8px auto 16px}.sidebar-list-panel{flex:1;min-width:0;min-height:0}.sidebar-list-panel[hidden]{display:none}.sidebar.context-rail .sidebar-navigation-rail{border-inline-end:1px solid var(--border-subtle)}.sidebar-navigation-rail :is(.wand-ui-icon-button,.sidebar-list-error,[data-daemon-update-status]){width:44px;min-width:44px;height:44px;padding:0;flex:none}.sidebar .conversation-navigation .wand-ui-icon-button{height:48px;display:flex;flex-direction:column;gap:3px;border-radius:var(--control-radius);color:var(--text-secondary)}.sidebar .conversation-navigation .wand-ui-icon-button[aria-current=page]{color:var(--sidebar-accent);background:var(--sidebar-selected)}.sidebar-nav-icon{display:flex;height:20px;align-items:center;justify-content:center}.sidebar-nav-label{font-size:10px;line-height:14px;font-weight:500}.sidebar:focus-visible{outline:2px solid var(--sidebar-accent);outline-offset:-2px}.sidebar .wand-ui-button:focus-visible{outline:2px solid var(--sidebar-accent);outline-offset:2px}.sidebar-list-panel{background:var(--sidebar-surface);border-inline-end:1px solid var(--border-subtle)}.sidebar-rail-notices{margin-block:12px 4px;padding-block-start:12px;border-block-start:1px solid var(--border-subtle)}.sidebar .sidebar-profile-button{margin-block-start:8px;display:flex;flex-direction:column;gap:3px;color:var(--text-secondary)}.sidebar-notification-content{width:min(280px,calc(100vw - 64px));max-height:min(480px,65dvh);overflow:auto}.sidebar-unified .sidebar-navigation-rail{width:76px;padding:8px 10px}.sidebar-unified .sidebar-rail-scroll{display:flex;flex-direction:column;align-items:center;gap:4px}.sidebar-unified .sidebar-rail-scroll>.sidebar-brand-mark{flex:none;margin:6px auto}.sidebar-unified .conversation-navigation{align-items:center}.sidebar-unified .conversation-navigation .wand-ui-icon-button{height:40px}.sidebar-unified .sidebar-nav-label{display:none}.sidebar-unified .sidebar-rail-notices{width:100%;margin:4px 0;padding:4px 0 0;flex:none}.sidebar-unified .sidebar-profile-button{margin:0}.sidebar-filter-capsules{width:100%;display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 0}.sidebar-capsule-label{font-size:11px;line-height:16px;color:var(--text-secondary);white-space:nowrap}.sidebar-filter-capsule{display:flex;flex-direction:column;align-items:center;flex:none;gap:4px;padding:6px 3px;border:1px solid var(--border-subtle);border-radius:28px;background:var(--sidebar-surface)}.sidebar-filter-capsule .wand-ui-icon-button{width:40px;min-width:40px;height:40px;border-radius:50%}.sidebar-filter-capsule [data-filter-active=true]{color:var(--sidebar-accent);background:var(--sidebar-selected)}.sidebar-filter-capsule [data-filter-active=true]:after{content:\"\";position:absolute;inset-inline-end:3px;top:6px;width:4px;height:4px;border-radius:50%;background:currentColor}.sidebar-capsule-rest{width:40px;display:flex;flex-direction:column;align-items:center;gap:4px;max-height:min(240px,32dvh);overflow-y:auto;overflow-x:hidden;scrollbar-width:none}.sidebar-workspace-symbol{position:relative;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px}.sidebar-workspace-symbol .sidebar-workspace-monogram{position:absolute;right:-3px;bottom:-2px;min-width:12px;max-width:22px;padding:0 2px;border-radius:3px;background:var(--sidebar-surface);font-size:9px;line-height:12px;font-weight:600}.sidebar-capsule-picker{display:flex;flex-direction:column;gap:12px;width:260px;max-width:calc(100vw - 36px)}.sidebar-capsule-choice{display:flex;align-items:center;gap:8px}.unified-sidebar-section{display:flex;justify-content:space-between;padding:12px 8px 6px;font-size:11px;font-weight:600;color:var(--text-secondary)}.sidebar-capsule-options{display:flex;flex-direction:column;gap:4px;max-height:300px;overflow:auto}.sidebar-capsule-options .ant-btn{width:100%;justify-content:space-between;min-height:36px}.sidebar-capsule-options .ant-btn>span:first-child{overflow:hidden;text-overflow:ellipsis}.unified-sidebar-list{display:flex;flex:1;flex-direction:column;min-height:0;min-width:0}.unified-sidebar-tools{flex:none;display:flex;flex-direction:column;gap:10px;padding:0 12px 12px}.unified-sidebar-tools .sidebar-new-task{width:100%}.unified-sidebar-tools .wand-ui-search{flex:1;min-width:0}.unified-sidebar-tools .conversation-list-filter-trigger{width:34px;min-width:34px}.unified-sidebar-tools .conversation-list-filter-trigger>span:last-child{display:none}.unified-sidebar-tools>[role=status]{font-size:12px}.unified-sidebar-rows{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 8px 12px;scroll-padding-block:8px}.unified-sidebar-row{min-width:0;display:flex;align-items:center;border-radius:var(--control-radius)}.unified-sidebar-row>.ant-btn:first-child{flex:1;min-width:0}.unified-sidebar-row .unified-sidebar-more{width:28px;min-width:28px;height:32px;flex:none;opacity:0}.unified-sidebar-row:hover .unified-sidebar-more,.unified-sidebar-row:focus-within .unified-sidebar-more{opacity:1}@media(pointer:coarse){.unified-sidebar-row .unified-sidebar-more{opacity:1}}.unified-sidebar-row .im-sidebar-item-name{font-size:13px}.unified-sidebar-row .wand-sidebar-session-row{min-height:58px}.unified-sidebar-current{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:8px;border-radius:var(--control-radius);background:var(--sidebar-selected);font-size:12px}.unified-sidebar-empty{padding:16px 8px}@media(pointer:coarse){.sidebar-filter-capsule .wand-ui-icon-button{min-width:44px;width:44px;height:44px}.sidebar-capsule-options .ant-btn{min-height:44px}}.sidebar .conversation-navigation{width:100%}.sidebar:not(.collapsed) .conversation-navigation>.wand-ui-stretch-tabs,.sidebar:not(.collapsed) .conversation-navigation .ant-segmented{width:100%}.sidebar:not(.collapsed) .conversation-navigation .ant-segmented-group{display:flex}.sidebar:not(.collapsed) .conversation-navigation .ant-segmented-item{flex:1;text-align:center}.sidebar .sidebar-body{overscroll-behavior:contain;scrollbar-gutter:stable}.sidebar-header-primary{min-height:32px}.sidebar-header-main{min-width:0}.sidebar-header-actions{flex-shrink:0}.sidebar-compact-toggle-label,.conversation-create-label{display:none}.sidebar-header-actions :is(.sidebar-more-trigger,.sidebar-compact-toggle,.sidebar-close,.conversation-create-button){width:32px;min-width:32px;height:32px;padding:0}.sidebar-title{font-size:15px;letter-spacing:0}.sidebar-compact-toggle[aria-pressed=true] .sidebar-collapse-direction{transform:rotate(180deg)}.sidebar-new-task.ant-btn{height:34px;font-size:13px}.sidebar-status:empty{display:none}.sidebar-footer-actions{min-width:0}.sidebar-footer:has(#back-to-native-button,#switch-server-button){flex-wrap:wrap}.sidebar .conversation-list-tools,.sidebar-presentation-tools{position:sticky;top:0;z-index:2;background:var(--sidebar-surface)}.sidebar-search-slot{display:grid;flex:1;min-width:0;align-items:center;min-height:32px}.sidebar-list-title,.sidebar-search-expand{grid-area:1 / 1;min-width:0;transition:opacity var(--motion-fast) var(--ease-in-out-smooth),visibility var(--motion-fast) var(--ease-in-out-smooth)}.sidebar-search-expand{opacity:0;pointer-events:none}.is-searching .sidebar-search-expand{opacity:1;pointer-events:auto}.is-searching .sidebar-list-title{opacity:0;visibility:hidden}.sidebar-search-input input::-webkit-search-cancel-button{display:none}.sidebar-disclosure-chevron{display:inline-flex;flex-shrink:0;transform:rotate(-90deg);transition:transform var(--motion-fast) var(--ease-in-out-smooth)}.sidebar-disclosure-chevron[data-open=true]{transform:rotate(0)}.sidebar .workspace-row-main{min-height:48px}.sidebar .workspace-row-title{font-size:13px;font-weight:600}.sidebar .workspace-row-path{display:block;max-width:100%;line-height:1.5}.sidebar .workspace-row-count,.sidebar .workspace-task-count,.sidebar .im-sidebar-group-count{color:var(--text-secondary);font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0}.sidebar .workspace-row-count{min-width:2ch;text-align:end}.sidebar .sidebar-head-activity,.sidebar .im-sidebar-group-attention-slot{width:12px;flex:none;display:inline-flex;justify-content:center}.sidebar .wand-sidebar-group-toggle{min-height:48px;padding:6px}.sidebar .im-sidebar-group-title{min-width:0;font-size:13px;font-weight:600}.sidebar .im-sidebar-group-meta{display:inline-flex;align-items:center;gap:4px;flex:none}.sidebar .im-sidebar-group-action{display:inline-flex;flex:none}.sidebar .sidebar-recent-add{width:28px;min-width:28px;height:32px;padding:0}.sidebar .im-sidebar-group-inner{margin-inline-start:8px;border-inline-start:1px solid var(--border-subtle)}.sidebar .sidebar-group-empty,.sidebar .sidebar-filter-empty{margin:0;padding:6px;font-size:12px;line-height:1.5}.sidebar .workspace-tasks{margin-inline-start:8px;border-inline-start:1px solid var(--border-subtle)}.sidebar .workspace-task-sessions{margin-inline-start:6px;border-inline-start:1px solid var(--border-subtle)}.sidebar .workspace-task-main,.sidebar .workspace-session-main{min-height:36px}.sidebar .workspace-task-main{flex:1 1 0;min-width:0;overflow:hidden}.sidebar .workspace-task-name{font-size:13px;white-space:nowrap}.sidebar .workspace-task-disclosure-slot{width:20px;height:32px;flex:none;display:inline-flex;align-items:center}.sidebar .workspace-task-disclosure.ant-btn{width:20px;min-width:20px;height:32px;padding:0;color:var(--text-secondary)}.sidebar .sidebar-task-status{display:inline-flex;align-items:center;justify-content:flex-end;gap:3px;flex:0 0 auto;min-width:4em;white-space:nowrap;word-break:keep-all;font-size:12px;line-height:18px;color:var(--text-secondary)}.sidebar .sidebar-task-status>*{flex:none;white-space:nowrap}.sidebar .sidebar-task-status.tone-accent{color:var(--success)}.sidebar .sidebar-task-status.tone-warning{color:var(--warning)}.sidebar .sidebar-task-status.tone-success{color:var(--success)}.sidebar .workspace-task-children{margin-inline-start:8px;padding-inline-start:8px;border-inline-start:1px solid var(--border-subtle)}.sidebar .workspace-session-name{font-size:13px}.sidebar .workspace-session-kind{color:var(--text-secondary);font-size:11px}.sidebar .workspace-loose-label{display:block;padding:8px 6px 4px;font-size:12px}.sidebar .workspace-loose-session-list{display:flex;flex-direction:column;gap:2px}.sidebar .sidebar-list-title{font-size:12px;color:var(--text-secondary)}.sidebar .sidebar-view-switch .ant-segmented-item-label{padding-inline:8px;font-size:12px}.sidebar .sidebar-body{scroll-padding-block:100px 12px}.sidebar :is(.workspace-task-action,.workspace-task-chevron-btn){width:28px;min-width:28px;height:32px;padding:0;flex-shrink:0}.sidebar-menu-heading{display:grid;gap:2px;min-width:0;padding-block:2px}.sidebar-menu-heading strong,.sidebar-menu-heading span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-menu-heading strong{color:var(--text-primary);font-weight:var(--font-weight-semibold)}.sidebar-menu-heading span{color:var(--text-secondary);font-size:var(--font-size-xs)}.sidebar-menu-error{color:var(--danger);white-space:normal;overflow-wrap:anywhere}:is(.sidebar-row-menu,.sidebar-menu-submenus) .ant-dropdown-menu{max-width:min(288px,calc(100vw - 24px))}.sidebar-menu-submenus .ant-dropdown-menu-submenu-popup{min-width:min(224px,calc(100vw - 24px));max-width:min(288px,calc(100vw - 24px))}.sidebar-menu-submenus .ant-dropdown-menu{max-height:min(360px,calc(100dvh - 24px));overflow-y:auto;overscroll-behavior:contain}:is(.sidebar-row-menu,.sidebar-menu-submenus) :is(.ant-dropdown-menu-item,.ant-dropdown-menu-submenu-title){height:auto;min-height:32px}.sidebar [data-sidebar-menu-open=true]{border-radius:var(--control-radius);background:var(--sidebar-selected)}.sidebar .sidebar-footer-actions{align-items:center}.sidebar .conversation-search-host{display:flex;align-items:center;gap:6px;padding:0 4px 6px}.sidebar .conversation-search-host>.conversation-search-input{flex:1;min-width:0}.sidebar .conversation-list-filter-trigger{flex:none;width:64px;min-width:64px;height:34px;padding-inline:6px;gap:4px}.conversation-list-filter-summary{min-width:0;min-height:28px}.conversation-list-filter-summary>.ant-typography{min-width:0;font-size:12px}.conversation-list-filter-summary>button{flex:none;font-size:12px;padding-inline:4px}.conversation-list-filter-panel{position:relative;width:420px;max-width:calc(100vw - 48px);display:flex;flex-direction:column;gap:12px}.conversation-list-filter-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.conversation-filter-field{min-width:0;display:flex;flex-direction:column;gap:6px}.conversation-filter-field-label{font-size:12px;color:var(--text-secondary)}.conversation-filter-field .ant-select{width:100%;min-width:0;height:32px}.conversation-list-filter-activity{font-size:12px;color:var(--text-secondary)}.conversation-list-filter-footer{flex:none;padding-top:10px;border-top:1px solid var(--border-subtle)}@media(pointer:coarse),(max-width:640px){.sidebar .conversation-list-filter-trigger,.conversation-list-filter-summary>button{min-height:44px}.conversation-filter-field .ant-select{height:44px}.conversation-list-filter-panel .ant-btn,.conversation-list-filter-panel .ant-select-item-option,.conversation-list-filter-activity{min-height:44px}.conversation-list-filter-activity .ant-switch{min-width:44px}}.sidebar .conversation-search-input{min-height:34px;font-size:12px;background:var(--bg-surface)}.sidebar .conversation-list-section{padding:0 4px 10px;gap:6px}.sidebar .conversation-list-count{padding-inline:2px;color:var(--text-secondary)}.sidebar .conversation-row:hover,.sidebar .conversation-row:focus-within{background:var(--sidebar-hover)}.sidebar .conversation-row[aria-current=page]{background:var(--sidebar-selected)}.sidebar .conversation-row[aria-current=page] .conversation-row-title{color:var(--sidebar-accent)}.sidebar .conversation-row-open.ant-btn:hover{color:inherit;background:transparent}.sidebar .conversation-row-time{color:var(--text-secondary)}.conversation-person-sessions{margin-inline-start:28px;border-inline-start:1px solid var(--border-subtle);padding-inline-start:4px;min-width:0;max-height:min(45dvh,360px);overflow-y:auto;overscroll-behavior:contain}.conversation-other-sessions{margin-top:8px}.conversation-other-toggle{width:100%;justify-content:flex-start;gap:8px;min-height:36px;color:var(--text-secondary)}.conversation-other-toggle span:last-child{margin-inline-start:auto}.sidebar .im-sidebar-group:has(.sidebar-session-preview) .im-sidebar-group-inner{max-height:min(45dvh,360px);overflow-y:auto;overscroll-behavior:contain}.conversation-person-sessions .wand-sidebar-session-row{min-height:44px}.sidebar :is(.workspace-session-main,.workspace-task-main,.wand-sidebar-session-row)[aria-current=page],.sidebar .wand-sidebar-session-row.active{color:var(--sidebar-accent);background:var(--sidebar-selected)}.sidebar .conversation-navigation .wand-ui-icon-button:hover{background:var(--sidebar-hover)}.sidebar .conversation-navigation .wand-ui-icon-button[aria-current=page]{background:var(--sidebar-selected)}.sidebar .conversation-navigation .wand-ui-icon-button[aria-current=page]:before{content:\"\";position:absolute;inset-inline-start:0;inset-block:14px;width:2px;border-radius:2px;background:var(--sidebar-accent)}.sidebar .conversation-list-filter{flex:1;min-width:0}.sidebar .conversation-list-filter .ant-segmented-item-label{padding-inline:6px}.sidebar .conversation-list-filter .ant-segmented-item-selected{color:var(--sidebar-accent)}.sidebar .sidebar-activity-filter.ant-btn{flex:none;width:48px;height:28px;padding:0;border-radius:var(--radius-full);font-size:12px;color:var(--text-secondary);background:transparent;border-color:var(--border-subtle)}.sidebar .sidebar-activity-filter.ant-btn[aria-pressed=true]{color:var(--sidebar-accent);background:var(--sidebar-selected);border-color:color-mix(in srgb,var(--sidebar-accent) 45%,var(--border-subtle))}.sidebar .conversation-search-input:focus-within{border-color:var(--sidebar-accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--sidebar-accent) 14%,transparent)}.sidebar.collapsed .conversation-row{justify-content:center;padding:6px 0;min-height:48px}.sidebar.collapsed .sidebar-body{scrollbar-gutter:auto}@media(pointer:coarse),(max-width:640px){.sidebar-header-actions :is(.sidebar-compact-toggle,.sidebar-close,.conversation-create-button){width:44px;min-width:44px;height:44px}.sidebar-new-task.ant-btn{min-height:44px}.sidebar :is(.workspace-task-action,.workspace-task-chevron-btn){width:32px;min-width:32px;height:44px}.sidebar .workspace-task-main,.sidebar .workspace-session-main{min-height:44px}.sidebar .workspace-task-disclosure-slot{width:36px;height:44px}.sidebar .workspace-task-disclosure.ant-btn{width:36px;min-width:36px;height:44px}.sidebar .sidebar-activity-filter.ant-btn{min-height:44px}.sidebar .sidebar-recent-add{width:44px;min-width:44px;height:44px}:is(.sidebar-row-menu,.sidebar-menu-submenus) :is(.ant-dropdown-menu-item,.ant-dropdown-menu-submenu-title){min-height:44px}}@media(max-width:640px){:is(.sidebar-row-menu,.sidebar-menu-submenus) :is(.ant-dropdown-menu-item,.ant-dropdown-menu-submenu-title){min-height:44px}}@media(prefers-reduced-motion:reduce){.sidebar-list-title,.sidebar-search-expand,.sidebar-disclosure-chevron{transition:none}}.sidebar-full-list{opacity:1;visibility:visible;transition:opacity var(--motion-fast) var(--ease-in-out-smooth),visibility var(--motion-normal) var(--ease-in-out-smooth)}.workspaces-panel-compact .sidebar-full-list{position:absolute;inset:0 auto auto 0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--motion-quick-exit) var(--ease-in-out-smooth),visibility var(--motion-quick-exit) var(--ease-in-out-smooth)}.sidebar-projection-swap{position:relative}.sidebar-projection-current{opacity:1;transition:opacity var(--motion-fast) var(--ease-in-out-smooth)}.sidebar-projection-swap[data-entering=true] .sidebar-projection-current{opacity:0}.sidebar-projection-old{position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity var(--motion-quick-exit) var(--ease-in-out-smooth)}@starting-style{.sidebar-projection-old{opacity:1}}@media(prefers-reduced-motion:reduce){.sidebar-full-list,.sidebar-projection-current,.sidebar-projection-old{transition:none}}.wand-workspace-manage-check{display:inline-flex;flex:none;margin-inline-end:6px;pointer-events:none}.wand-sidebar-modal-form{display:grid;gap:16px}.wand-sidebar-modal-body{min-width:0;max-height:64dvh;overflow:auto}.wand-sidebar-modal-footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.wand-task-create-input{width:100%}.wand-subject-provider{width:20px;height:20px;flex:none}.wand-workspace-tabs{flex:1;min-width:0}.wand-workspace-tab-label{display:inline-flex;align-items:center;gap:6px;max-width:240px}.wand-workspace-tab-label>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:640px){.wand-workspace-tab-label{max-width:96px}[data-session-tabs=task] .wand-workspace-tabs .ant-tabs-tab-remove{display:none}}.wand-attention-list{display:flex;flex-direction:column;gap:2px;margin:0;padding:0;list-style:none}.wand-attention-item{width:100%;height:auto;white-space:normal;text-align:start;justify-content:flex-start}.wand-attention-item strong,.wand-attention-item span{overflow-wrap:anywhere}.home-attention.is-sidebar{max-height:min(50dvh,520px);overflow-y:auto;overscroll-behavior:contain}.blank-chat-attention{position:absolute;inset-block-start:24px;inset-inline-start:24px;z-index:1}.wand-worktree-selection{display:flex;align-items:flex-start;width:100%;margin-block:8px}@media(prefers-reduced-motion:no-preference){#sessions-drawer.sidebar-refined[role=dialog]:not([data-drawer-gesture=active]){animation:sidebar-drawer-slide-in var(--motion-normal, .22s) cubic-bezier(.16,1,.3,1)}.drawer-backdrop.open:not([data-drawer-gesture=active]){animation:sidebar-backdrop-fade-in var(--motion-normal, .22s) cubic-bezier(.16,1,.3,1)}}@keyframes sidebar-drawer-slide-in{0%{transform:translate3d(-100%,0,0)}to{transform:translateZ(0)}}@keyframes sidebar-backdrop-fade-in{0%{opacity:0}to{opacity:1}}\n"]);
3
+ var Tee=Object.create,Q5=Object.defineProperty,_ee=Object.getOwnPropertyDescriptor,jee=Object.getOwnPropertyNames,Nee=Object.getPrototypeOf,Pee=Object.prototype.hasOwnProperty,Ree=(e,t,r)=>t in e?Q5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,or=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},ws=(e,t)=>{for(var r in t)Q5(e,r,{get:t[r],enumerable:!0})},Oee=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of jee(t))!Pee.call(e,a)&&a!==r&&Q5(e,a,{get:()=>t[a],enumerable:!(n=_ee(t,a))||n.enumerable});return e},A=(e,t,r)=>(r=e!=null?Tee(Nee(e)):{},Oee(t||!e||!e.__esModule?Q5(r,"default",{value:e,enumerable:!0}):r,e)),ae=(e,t,r)=>Ree(e,typeof t!="symbol"?t+"":t,r);var zee=or(e=>{"use strict";var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function x(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,F={};function S(O,z,K){this.props=O,this.context=z,this.refs=F,this.updater=K||y}S.prototype.isReactComponent={},S.prototype.setState=function(O,z){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,z,"setState")},S.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function D(){}D.prototype=S.prototype;function $(O,z,K){this.props=O,this.context=z,this.refs=F,this.updater=K||y}var C=$.prototype=new D;C.constructor=$,E(C,S.prototype),C.isPureReactComponent=!0;var B=Array.isArray;function M(){}var I={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function N(O,z,K){var J=K.ref;return{$$typeof:t,type:O,key:z,ref:J!==void 0?J:null,props:K}}function R(O,z){return N(O.type,z,O.props)}function L(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function q(O){var z={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(K){return z[K]})}var W=/\/+/g;function U(O,z){return typeof O=="object"&&O!==null&&O.key!=null?q(""+O.key):z.toString(36)}function P(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(M,M):(O.status="pending",O.then(function(z){O.status==="pending"&&(O.status="fulfilled",O.value=z)},function(z){O.status==="pending"&&(O.status="rejected",O.reason=z)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function H(O,z,K,J,te){var ee=typeof O;(ee==="undefined"||ee==="boolean")&&(O=null);var ie=!1;if(O===null)ie=!0;else switch(ee){case"bigint":case"string":case"number":ie=!0;break;case"object":switch(O.$$typeof){case t:case r:ie=!0;break;case v:return ie=O._init,H(ie(O._payload),z,K,J,te)}}if(ie)return te=te(O),ie=J===""?"."+U(O,0):J,B(te)?(K="",ie!=null&&(K=ie.replace(W,"$&/")+"/"),H(te,z,K,"",function(he){return he})):te!=null&&(L(te)&&(te=R(te,K+(te.key==null||O&&O.key===te.key?"":(""+te.key).replace(W,"$&/")+"/")+ie)),z.push(te)),1;ie=0;var me=J===""?".":J+":";if(B(O))for(var le=0;le<O.length;le++)J=O[le],ee=me+U(J,le),ie+=H(J,z,K,ee,te);else if(le=x(O),typeof le=="function")for(O=le.call(O),le=0;!(J=O.next()).done;)J=J.value,ee=me+U(J,le++),ie+=H(J,z,K,ee,te);else if(ee==="object"){if(typeof O.then=="function")return H(P(O),z,K,J,te);throw z=String(O),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.")}return ie}function V(O,z,K){if(O==null)return O;var J=[],te=0;return H(O,J,"","",function(ee){return z.call(K,ee,te++)}),J}function Q(O){if(O._status===-1){var z=O._result;z=z(),z.then(function(K){(O._status===0||O._status===-1)&&(O._status=1,O._result=K)},function(K){(O._status===0||O._status===-1)&&(O._status=2,O._result=K)}),O._status===-1&&(O._status=0,O._result=z)}if(O._status===1)return O._result.default;throw O._result}var X=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},Z={map:V,forEach:function(O,z,K){V(O,function(){z.apply(this,arguments)},K)},count:function(O){var z=0;return V(O,function(){z++}),z},toArray:function(O){return V(O,function(z){return z})||[]},only:function(O){if(!L(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};e.Activity=g,e.Children=Z,e.Component=S,e.Fragment=n,e.Profiler=o,e.PureComponent=$,e.StrictMode=a,e.Suspense=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,e.__COMPILER_RUNTIME={__proto__:null,c:function(O){return I.H.useMemoCache(O)}},e.cache=function(O){return function(){return O.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(O,z,K){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var J=E({},O.props),te=O.key;if(z!=null)for(ee in z.key!==void 0&&(te=""+z.key),z)!j.call(z,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&z.ref===void 0||(J[ee]=z[ee]);var ee=arguments.length-2;if(ee===1)J.children=K;else if(1<ee){for(var ie=Array(ee),me=0;me<ee;me++)ie[me]=arguments[me+2];J.children=ie}return N(O.type,te,J)},e.createContext=function(O){return O={$$typeof:u,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:l,_context:O},O},e.createElement=function(O,z,K){var J,te={},ee=null;if(z!=null)for(J in z.key!==void 0&&(ee=""+z.key),z)j.call(z,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(te[J]=z[J]);var ie=arguments.length-2;if(ie===1)te.children=K;else if(1<ie){for(var me=Array(ie),le=0;le<ie;le++)me[le]=arguments[le+2];te.children=me}if(O&&O.defaultProps)for(J in ie=O.defaultProps,ie)te[J]===void 0&&(te[J]=ie[J]);return N(O,ee,te)},e.createRef=function(){return{current:null}},e.forwardRef=function(O){return{$$typeof:d,render:O}},e.isValidElement=L,e.lazy=function(O){return{$$typeof:v,_payload:{_status:-1,_result:O},_init:Q}},e.memo=function(O,z){return{$$typeof:h,type:O,compare:z===void 0?null:z}},e.startTransition=function(O){var z=I.T,K={};I.T=K;try{var J=O(),te=I.S;te!==null&&te(K,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(M,X)}catch(ee){X(ee)}finally{z!==null&&K.types!==null&&(z.types=K.types),I.T=z}},e.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},e.use=function(O){return I.H.use(O)},e.useActionState=function(O,z,K){return I.H.useActionState(O,z,K)},e.useCallback=function(O,z){return I.H.useCallback(O,z)},e.useContext=function(O){return I.H.useContext(O)},e.useDebugValue=function(){},e.useDeferredValue=function(O,z){return I.H.useDeferredValue(O,z)},e.useEffect=function(O,z){return I.H.useEffect(O,z)},e.useEffectEvent=function(O){return I.H.useEffectEvent(O)},e.useId=function(){return I.H.useId()},e.useImperativeHandle=function(O,z,K){return I.H.useImperativeHandle(O,z,K)},e.useInsertionEffect=function(O,z){return I.H.useInsertionEffect(O,z)},e.useLayoutEffect=function(O,z){return I.H.useLayoutEffect(O,z)},e.useMemo=function(O,z){return I.H.useMemo(O,z)},e.useOptimistic=function(O,z){return I.H.useOptimistic(O,z)},e.useReducer=function(O,z,K){return I.H.useReducer(O,z,K)},e.useRef=function(O){return I.H.useRef(O)},e.useState=function(O){return I.H.useState(O)},e.useSyncExternalStore=function(O,z,K){return I.H.useSyncExternalStore(O,z,K)},e.useTransition=function(){return I.H.useTransition()},e.version="19.2.7"}),_=or((e,t)=>{"use strict";t.exports=zee()});var Lee=or(e=>{"use strict";var t=_();function r(p){var h="https://react.dev/errors/"+p;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+p+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(r(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(p,h,v){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:p,containerInfo:h,implementation:v}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,h){if(p==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(p,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(r(299));return l(p,h,null,v)},e.flushSync=function(p){var h=u.T,v=a.p;try{if(u.T=null,a.p=2,p)return p()}finally{u.T=h,a.p=v,a.d.f()}},e.preconnect=function(p,h){typeof p=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(p,h))},e.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},e.preinit=function(p,h){if(typeof p=="string"&&h&&typeof h.as=="string"){var v=h.as,g=d(v,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?a.d.S(p,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:x}):v==="script"&&a.d.X(p,{crossOrigin:g,integrity:b,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},e.preinitModule=function(p,h){if(typeof p=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=d(h.as,h.crossOrigin);a.d.M(p,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(p)},e.preload=function(p,h){if(typeof p=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,g=d(v,h.crossOrigin);a.d.L(p,v,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},e.preloadModule=function(p,h){if(typeof p=="string")if(h){var v=d(h.as,h.crossOrigin);a.d.m(p,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(p)},e.requestFormReset=function(p){a.d.r(p)},e.unstable_batchedUpdates=function(p,h){return p(h)},e.useFormState=function(p,h,v){return u.H.useFormState(p,h,v)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version="19.2.7"}),er=or((e,t)=>{"use strict";function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(n){console.error(n)}}r(),t.exports=Lee()}),Hee=or(e=>{"use strict";function t(P,H){var V=P.length;P.push(H);e:for(;0<V;){var Q=V-1>>>1,X=P[Q];if(0<a(X,H))P[Q]=H,P[V]=X,V=Q;else break e}}function r(P){return P.length===0?null:P[0]}function n(P){if(P.length===0)return null;var H=P[0],V=P.pop();if(V!==H){P[0]=V;e:for(var Q=0,X=P.length,Z=X>>>1;Q<Z;){var O=2*(Q+1)-1,z=P[O],K=O+1,J=P[K];if(0>a(z,V))K<X&&0>a(J,z)?(P[Q]=J,P[K]=V,Q=K):(P[Q]=z,P[O]=V,Q=O);else if(K<X&&0>a(J,V))P[Q]=J,P[K]=V,Q=K;else break e}}return H}function a(P,H){var V=P.sortIndex-H.sortIndex;return V!==0?V:P.id-H.id}e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"?(o=performance,e.unstable_now=function(){return o.now()}):(l=Date,u=l.now(),e.unstable_now=function(){return l.now()-u});var o,l,u,d=[],p=[],h=1,v=null,g=3,b=!1,x=!1,y=!1,E=!1,F=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function $(P){for(var H=r(p);H!==null;){if(H.callback===null)n(p);else if(H.startTime<=P)n(p),H.sortIndex=H.expirationTime,t(d,H);else break;H=r(p)}}function C(P){if(y=!1,$(P),!x)if(r(d)!==null)x=!0,B||(B=!0,L());else{var H=r(p);H!==null&&U(C,H.startTime-P)}}var B=!1,M=-1,I=5,j=-1;function N(){return E?!0:!(e.unstable_now()-j<I)}function R(){if(E=!1,B){var P=e.unstable_now();j=P;var H=!0;try{e:{x=!1,y&&(y=!1,S(M),M=-1),b=!0;var V=g;try{t:{for($(P),v=r(d);v!==null&&!(v.expirationTime>P&&N());){var Q=v.callback;if(typeof Q=="function"){v.callback=null,g=v.priorityLevel;var X=Q(v.expirationTime<=P);if(P=e.unstable_now(),typeof X=="function"){v.callback=X,$(P),H=!0;break t}v===r(d)&&n(d),$(P)}else n(d);v=r(d)}if(v!==null)H=!0;else{var Z=r(p);Z!==null&&U(C,Z.startTime-P),H=!1}}break e}finally{v=null,g=V,b=!1}H=void 0}}finally{H?L():B=!1}}}var L;typeof D=="function"?L=function(){D(R)}:typeof MessageChannel<"u"?(q=new MessageChannel,W=q.port2,q.port1.onmessage=R,L=function(){W.postMessage(null)}):L=function(){F(R,0)};var q,W;function U(P,H){M=F(function(){P(e.unstable_now())},H)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(P){switch(g){case 1:case 2:case 3:var H=3;break;default:H=g}var V=g;g=H;try{return P()}finally{g=V}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(P,H){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var V=g;g=P;try{return H()}finally{g=V}},e.unstable_scheduleCallback=function(P,H,V){var Q=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?Q+V:Q):V=Q,P){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=V+X,P={id:h++,callback:H,priorityLevel:P,startTime:V,expirationTime:X,sortIndex:-1},V>Q?(P.sortIndex=V,t(p,P),r(d)===null&&P===r(p)&&(y?(S(M),M=-1):y=!0,U(C,V-Q))):(P.sortIndex=X,t(d,P),x||b||(x=!0,B||(B=!0,L()))),P},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(P){var H=g;return function(){var V=g;g=H;try{return P.apply(this,arguments)}finally{g=V}}}}),qee=or((e,t)=>{"use strict";t.exports=Hee()}),Wee=or(e=>{"use strict";var t=qee(),r=_(),n=er();function a(i){var s="https://react.dev/errors/"+i;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function l(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function u(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function d(i){if(i.tag===31){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function p(i){if(l(i)!==i)throw Error(a(188))}function h(i){var s=i.alternate;if(!s){if(s=l(i),s===null)throw Error(a(188));return s!==i?null:i}for(var c=i,f=s;;){var w=c.return;if(w===null)break;var k=w.alternate;if(k===null){if(f=w.return,f!==null){c=f;continue}break}if(w.child===k.child){for(k=w.child;k;){if(k===c)return p(w),i;if(k===f)return p(w),s;k=k.sibling}throw Error(a(188))}if(c.return!==f.return)c=w,f=k;else{for(var T=!1,G=w.child;G;){if(G===c){T=!0,c=w,f=k;break}if(G===f){T=!0,f=w,c=k;break}G=G.sibling}if(!T){for(G=k.child;G;){if(G===c){T=!0,c=k,f=w;break}if(G===f){T=!0,f=k,c=w;break}G=G.sibling}if(!T)throw Error(a(189))}}if(c.alternate!==f)throw Error(a(190))}if(c.tag!==3)throw Error(a(188));return c.stateNode.current===c?i:s}function v(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i;for(i=i.child;i!==null;){if(s=v(i),s!==null)return s;i=i.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),$=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),R=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function q(i){return i===null||typeof i!="object"?null:(i=L&&i[L]||i["@@iterator"],typeof i=="function"?i:null)}var W=Symbol.for("react.client.reference");function U(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===W?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case E:return"Fragment";case S:return"Profiler";case F:return"StrictMode";case B:return"Suspense";case M:return"SuspenseList";case N:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case y:return"Portal";case $:return i.displayName||"Context";case D:return(i._context.displayName||"Context")+".Consumer";case C:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case I:return s=i.displayName||null,s!==null?s:U(i.type)||"Memo";case j:s=i._payload,i=i._init;try{return U(i(s))}catch{}}return null}var P=Array.isArray,H=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},X=[],Z=-1;function O(i){return{current:i}}function z(i){0>Z||(i.current=X[Z],X[Z]=null,Z--)}function K(i,s){Z++,X[Z]=i.current,i.current=s}var J=O(null),te=O(null),ee=O(null),ie=O(null);function me(i,s){switch(K(ee,s),K(te,i),K(J,null),s.nodeType){case 9:case 11:i=(i=s.documentElement)&&(i=i.namespaceURI)?IN(i):0;break;default:if(i=s.tagName,s=s.namespaceURI)s=IN(s),i=MN(s,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}z(J),K(J,i)}function le(){z(J),z(te),z(ee)}function he(i){i.memoizedState!==null&&K(ie,i);var s=J.current,c=MN(s,i.type);s!==c&&(K(te,i),K(J,c))}function se(i){te.current===i&&(z(J),z(te)),ie.current===i&&(z(ie),Pv._currentValue=Q)}var ke,De;function we(i){if(ke===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);ke=s&&s[1]||"",De=-1<c.stack.indexOf(`
4
+ at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
5
+ `+ke+i+De}var de=!1;function be(i,s){if(!i||de)return"";de=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(s){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(ve){var ge=ve}Reflect.construct(i,[],Se)}else{try{Se.call()}catch(ve){ge=ve}i.call(Se.prototype)}}else{try{throw Error()}catch(ve){ge=ve}(Se=i())&&typeof Se.catch=="function"&&Se.catch(function(){})}}catch(ve){if(ve&&ge&&typeof ve.stack=="string")return[ve.stack,ge.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var w=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");w&&w.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var k=f.DetermineComponentFrameRoot(),T=k[0],G=k[1];if(T&&G){var re=T.split(`
6
+ `),fe=G.split(`
7
+ `);for(w=f=0;f<re.length&&!re[f].includes("DetermineComponentFrameRoot");)f++;for(;w<fe.length&&!fe[w].includes("DetermineComponentFrameRoot");)w++;if(f===re.length||w===fe.length)for(f=re.length-1,w=fe.length-1;1<=f&&0<=w&&re[f]!==fe[w];)w--;for(;1<=f&&0<=w;f--,w--)if(re[f]!==fe[w]){if(f!==1||w!==1)do if(f--,w--,0>w||re[f]!==fe[w]){var Ee=`
8
+ `+re[f].replace(" at new "," at ");return i.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",i.displayName)),Ee}while(1<=f&&0<=w);break}}}finally{de=!1,Error.prepareStackTrace=c}return(c=i?i.displayName||i.name:"")?we(c):""}function ye(i,s){switch(i.tag){case 26:case 27:case 5:return we(i.type);case 16:return we("Lazy");case 13:return i.child!==s&&s!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return be(i.type,!1);case 11:return be(i.type.render,!1);case 1:return be(i.type,!0);case 31:return we("Activity");default:return""}}function Re(i){try{var s="",c=null;do s+=ye(i,c),c=i,i=i.return;while(i);return s}catch(f){return`
9
+ Error generating stack: `+f.message+`
10
+ `+f.stack}}var Fe=Object.prototype.hasOwnProperty,$e=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,He=t.unstable_shouldYield,Oe=t.unstable_requestPaint,Me=t.unstable_now,Te=t.unstable_getCurrentPriorityLevel,Xe=t.unstable_ImmediatePriority,ot=t.unstable_UserBlockingPriority,Ye=t.unstable_NormalPriority,Ve=t.unstable_LowPriority,Ae=t.unstable_IdlePriority,Ne=t.log,ht=t.unstable_setDisableYieldValue,lt=null,Ke=null;function je(i){if(typeof Ne=="function"&&ht(i),Ke&&typeof Ke.setStrictMode=="function")try{Ke.setStrictMode(lt,i)}catch{}}var nt=Math.clz32?Math.clz32:Jr,Nt=Math.log,Pt=Math.LN2;function Jr(i){return i>>>=0,i===0?32:31-(Nt(i)/Pt|0)|0}var Xt=256,Tr=262144,tr=4194304;function Tt(i){var s=i&42;if(s!==0)return s;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function cr(i,s,c){var f=i.pendingLanes;if(f===0)return 0;var w=0,k=i.suspendedLanes,T=i.pingedLanes;i=i.warmLanes;var G=f&134217727;return G!==0?(f=G&~k,f!==0?w=Tt(f):(T&=G,T!==0?w=Tt(T):c||(c=G&~i,c!==0&&(w=Tt(c))))):(G=f&~k,G!==0?w=Tt(G):T!==0?w=Tt(T):c||(c=f&~i,c!==0&&(w=Tt(c)))),w===0?0:s!==0&&s!==w&&(s&k)===0&&(k=w&-w,c=s&-s,k>=c||k===32&&(c&4194048)!==0)?s:w}function $r(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function Wt(i,s){switch(i){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dt(){var i=tr;return tr<<=1,(tr&62914560)===0&&(tr=4194304),i}function St(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function ze(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Je(i,s,c,f,w,k){var T=i.pendingLanes;i.pendingLanes=c,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=c,i.entangledLanes&=c,i.errorRecoveryDisabledLanes&=c,i.shellSuspendCounter=0;var G=i.entanglements,re=i.expirationTimes,fe=i.hiddenUpdates;for(c=T&~c;0<c;){var Ee=31-nt(c),Se=1<<Ee;G[Ee]=0,re[Ee]=-1;var ge=fe[Ee];if(ge!==null)for(fe[Ee]=null,Ee=0;Ee<ge.length;Ee++){var ve=ge[Ee];ve!==null&&(ve.lane&=-536870913)}c&=~Se}f!==0&&ut(i,f,0),k!==0&&w===0&&i.tag!==0&&(i.suspendedLanes|=k&~(T&~s))}function ut(i,s,c){i.pendingLanes|=s,i.suspendedLanes&=~s;var f=31-nt(s);i.entangledLanes|=s,i.entanglements[f]=i.entanglements[f]|1073741824|c&261930}function Le(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var f=31-nt(c),w=1<<f;w&s|i[f]&s&&(i[f]|=s),c&=~w}}function Ze(i,s){var c=s&-s;return c=(c&42)!==0?1:gt(c),(c&(i.suspendedLanes|s))!==0?0:c}function gt(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Qt(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Yt(){var i=V.p;return i!==0?i:(i=window.event,i===void 0?32:tP(i.type))}function on(i,s){var c=V.p;try{return V.p=i,s()}finally{V.p=c}}var Pr=Math.random().toString(36).slice(2),rr="__reactFiber$"+Pr,Vr="__reactProps$"+Pr,bt="__reactContainer$"+Pr,Rt="__reactEvents$"+Pr,vr="__reactListeners$"+Pr,Bn="__reactHandles$"+Pr,Va="__reactResources$"+Pr,fr="__reactMarker$"+Pr;function di(i){delete i[rr],delete i[Vr],delete i[Rt],delete i[vr],delete i[Bn]}function Ga(i){var s=i[rr];if(s)return s;for(var c=i.parentNode;c;){if(s=c[bt]||c[rr]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=ON(i);i!==null;){if(c=i[rr])return c;i=ON(i)}return s}i=c,c=i.parentNode}return null}function Dr(i){if(i=i[rr]||i[bt]){var s=i.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return i}return null}function Ln(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i.stateNode;throw Error(a(33))}function xa(i){var s=i[Va];return s||(s=i[Va]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function mr(i){i[fr]=!0}var $i=new Set,ao={};function Ea(i,s){yt(i,s),yt(i+"Capture",s)}function yt(i,s){for(ao[i]=s,i=0;i<s.length;i++)$i.add(s[i])}var Yn=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Jn={},Zn={};function pp(i){return Fe.call(Zn,i)?!0:Fe.call(Jn,i)?!1:Yn.test(i)?Zn[i]=!0:(Jn[i]=!0,!1)}function hs(i,s,c){if(pp(s))if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":i.removeAttribute(s);return;case"boolean":var f=s.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){i.removeAttribute(s);return}}i.setAttribute(s,""+c)}}function al(i,s,c){if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(s);return}i.setAttribute(s,""+c)}}function Di(i,s,c,f){if(f===null)i.removeAttribute(c);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(c);return}i.setAttributeNS(s,c,""+f)}}function ka(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Im(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Yg(i,s,c){var f=Object.getOwnPropertyDescriptor(i.constructor.prototype,s);if(!i.hasOwnProperty(s)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var w=f.get,k=f.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return w.call(this)},set:function(T){c=""+T,k.call(this,T)}}),Object.defineProperty(i,s,{enumerable:f.enumerable}),{getValue:function(){return c},setValue:function(T){c=""+T},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Jg(i){if(!i._valueTracker){var s=Im(i)?"checked":"value";i._valueTracker=Yg(i,s,""+i[s])}}function We(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),f="";return i&&(f=Im(i)?i.checked?"true":"false":i.value),i=f,i!==c?(s.setValue(i),!0):!1}function nr(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Mm=/[\n"\\]/g;function io(i){return i.replace(Mm,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Tm(i,s,c,f,w,k,T,G){i.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?i.type=T:i.removeAttribute("type"),s!=null?T==="number"?(s===0&&i.value===""||i.value!=s)&&(i.value=""+ka(s)):i.value!==""+ka(s)&&(i.value=""+ka(s)):T!=="submit"&&T!=="reset"||i.removeAttribute("value"),s!=null?ev(i,T,ka(s)):c!=null?ev(i,T,ka(c)):f!=null&&i.removeAttribute("value"),w==null&&k!=null&&(i.defaultChecked=!!k),w!=null&&(i.checked=w&&typeof w!="function"&&typeof w!="symbol"),G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"?i.name=""+ka(G):i.removeAttribute("name")}function Zg(i,s,c,f,w,k,T,G){if(k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(i.type=k),s!=null||c!=null){if(!(k!=="submit"&&k!=="reset"||s!=null)){Jg(i);return}c=c!=null?""+ka(c):"",s=s!=null?""+ka(s):c,G||s===i.value||(i.value=s),i.defaultValue=s}f=f??w,f=typeof f!="function"&&typeof f!="symbol"&&!!f,i.checked=G?i.checked:!!f,i.defaultChecked=!!f,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(i.name=T),Jg(i)}function ev(i,s,c){s==="number"&&nr(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function _m(i,s,c,f){if(i=i.options,s){s={};for(var w=0;w<c.length;w++)s["$"+c[w]]=!0;for(c=0;c<i.length;c++)w=s.hasOwnProperty("$"+i[c].value),i[c].selected!==w&&(i[c].selected=w),w&&f&&(i[c].defaultSelected=!0)}else{for(c=""+ka(c),s=null,w=0;w<i.length;w++){if(i[w].value===c){i[w].selected=!0,f&&(i[w].defaultSelected=!0);return}s!==null||i[w].disabled||(s=i[w])}s!==null&&(s.selected=!0)}}function ST(i,s,c){if(s!=null&&(s=""+ka(s),s!==i.value&&(i.value=s),c==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=c!=null?""+ka(c):""}function FT(i,s,c,f){if(s==null){if(f!=null){if(c!=null)throw Error(a(92));if(P(f)){if(1<f.length)throw Error(a(93));f=f[0]}c=f}c==null&&(c=""),s=c}c=ka(s),i.defaultValue=c,f=i.textContent,f===c&&f!==""&&f!==null&&(i.value=f),Jg(i)}function jm(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var BJ=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function $T(i,s,c){var f=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?f?i.setProperty(s,""):s==="float"?i.cssFloat="":i[s]="":f?i.setProperty(s,c):typeof c!="number"||c===0||BJ.has(s)?s==="float"?i.cssFloat=c:i[s]=(""+c).trim():i[s]=c+"px"}function DT(i,s,c){if(s!=null&&typeof s!="object")throw Error(a(62));if(i=i.style,c!=null){for(var f in c)!c.hasOwnProperty(f)||s!=null&&s.hasOwnProperty(f)||(f.indexOf("--")===0?i.setProperty(f,""):f==="float"?i.cssFloat="":i[f]="");for(var w in s)f=s[w],s.hasOwnProperty(w)&&c[w]!==f&&$T(i,w,f)}else for(var k in s)s.hasOwnProperty(k)&&$T(i,k,s[k])}function PC(i){if(i.indexOf("-")===-1)return!1;switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var IJ=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),MJ=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ow(i){return MJ.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function eu(){}var RC=null;function OC(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Nm=null,Pm=null;function AT(i){var s=Dr(i);if(s&&(i=s.stateNode)){var c=i[Vr]||null;e:switch(i=s.stateNode,s.type){case"input":if(Tm(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+io(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var f=c[s];if(f!==i&&f.form===i.form){var w=f[Vr]||null;if(!w)throw Error(a(90));Tm(f,w.value,w.defaultValue,w.defaultValue,w.checked,w.defaultChecked,w.type,w.name)}}for(s=0;s<c.length;s++)f=c[s],f.form===i.form&&We(f)}break e;case"textarea":ST(i,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&_m(i,!!c.multiple,s,!1)}}}var zC=!1;function BT(i,s,c){if(zC)return i(s,c);zC=!0;try{var f=i(s);return f}finally{if(zC=!1,(Nm!==null||Pm!==null)&&($5(),Nm&&(s=Nm,i=Pm,Pm=Nm=null,AT(s),i)))for(s=0;s<i.length;s++)AT(i[s])}}function tv(i,s){var c=i.stateNode;if(c===null)return null;var f=c[Vr]||null;if(f===null)return null;c=f[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(a(231,s,typeof c));return c}var tu=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),LC=!1;if(tu)try{Rm={},Object.defineProperty(Rm,"passive",{get:function(){LC=!0}}),window.addEventListener("test",Rm,Rm),window.removeEventListener("test",Rm,Rm)}catch{LC=!1}var Rm,xc=null,HC=null,zw=null;function IT(){if(zw)return zw;var i,s=HC,c=s.length,f,w="value"in xc?xc.value:xc.textContent,k=w.length;for(i=0;i<c&&s[i]===w[i];i++);var T=c-i;for(f=1;f<=T&&s[c-f]===w[k-f];f++);return zw=w.slice(i,1<f?1-f:void 0)}function Lw(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Hw(){return!0}function MT(){return!1}function Ai(i){function s(c,f,w,k,T){this._reactName=c,this._targetInst=w,this.type=f,this.nativeEvent=k,this.target=T,this.currentTarget=null;for(var G in i)i.hasOwnProperty(G)&&(c=i[G],this[G]=c?c(k):k[G]);return this.isDefaultPrevented=(k.defaultPrevented!=null?k.defaultPrevented:k.returnValue===!1)?Hw:MT,this.isPropagationStopped=MT,this}return g(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Hw)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Hw)},persist:function(){},isPersistent:Hw}),s}var fp={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qw=Ai(fp),rv=g({},fp,{view:0,detail:0}),TJ=Ai(rv),qC,WC,nv,Ww=g({},rv,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:VC,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==nv&&(nv&&i.type==="mousemove"?(qC=i.screenX-nv.screenX,WC=i.screenY-nv.screenY):WC=qC=0,nv=i),qC)},movementY:function(i){return"movementY"in i?i.movementY:WC}}),TT=Ai(Ww),_J=g({},Ww,{dataTransfer:0}),jJ=Ai(_J),NJ=g({},rv,{relatedTarget:0}),UC=Ai(NJ),PJ=g({},fp,{animationName:0,elapsedTime:0,pseudoElement:0}),RJ=Ai(PJ),OJ=g({},fp,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),zJ=Ai(OJ),LJ=g({},fp,{data:0}),_T=Ai(LJ),HJ={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qJ={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},WJ={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function UJ(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=WJ[i])?!!s[i]:!1}function VC(){return UJ}var VJ=g({},rv,{key:function(i){if(i.key){var s=HJ[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Lw(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?qJ[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:VC,charCode:function(i){return i.type==="keypress"?Lw(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Lw(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),GJ=Ai(VJ),KJ=g({},Ww,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jT=Ai(KJ),XJ=g({},rv,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:VC}),QJ=Ai(XJ),YJ=g({},fp,{propertyName:0,elapsedTime:0,pseudoElement:0}),JJ=Ai(YJ),ZJ=g({},Ww,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),eZ=Ai(ZJ),tZ=g({},fp,{newState:0,oldState:0}),rZ=Ai(tZ),nZ=[9,13,27,32],GC=tu&&"CompositionEvent"in window,av=null;tu&&"documentMode"in document&&(av=document.documentMode);var aZ=tu&&"TextEvent"in window&&!av,NT=tu&&(!GC||av&&8<av&&11>=av),PT=" ",RT=!1;function OT(i,s){switch(i){case"keyup":return nZ.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zT(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Om=!1;function iZ(i,s){switch(i){case"compositionend":return zT(s);case"keypress":return s.which!==32?null:(RT=!0,PT);case"textInput":return i=s.data,i===PT&&RT?null:i;default:return null}}function oZ(i,s){if(Om)return i==="compositionend"||!GC&&OT(i,s)?(i=IT(),zw=HC=xc=null,Om=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return NT&&s.locale!=="ko"?null:s.data;default:return null}}var sZ={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function LT(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!sZ[i.type]:s==="textarea"}function HT(i,s,c,f){Nm?Pm?Pm.push(f):Pm=[f]:Nm=f,s=N5(s,"onChange"),0<s.length&&(c=new qw("onChange","change",null,c,f),i.push({event:c,listeners:s}))}var iv=null,ov=null;function lZ(i){SN(i,0)}function Uw(i){var s=Ln(i);if(We(s))return i}function qT(i,s){if(i==="change")return s}var WT=!1;tu&&(tu?(Vw="oninput"in document,Vw||(XC=document.createElement("div"),XC.setAttribute("oninput","return;"),Vw=typeof XC.oninput=="function"),KC=Vw):KC=!1,WT=KC&&(!document.documentMode||9<document.documentMode));var KC,Vw,XC;function UT(){iv&&(iv.detachEvent("onpropertychange",VT),ov=iv=null)}function VT(i){if(i.propertyName==="value"&&Uw(ov)){var s=[];HT(s,ov,i,OC(i)),BT(lZ,s)}}function uZ(i,s,c){i==="focusin"?(UT(),iv=s,ov=c,iv.attachEvent("onpropertychange",VT)):i==="focusout"&&UT()}function cZ(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Uw(ov)}function dZ(i,s){if(i==="click")return Uw(s)}function pZ(i,s){if(i==="input"||i==="change")return Uw(s)}function fZ(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var oo=typeof Object.is=="function"?Object.is:fZ;function sv(i,s){if(oo(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),f=Object.keys(s);if(c.length!==f.length)return!1;for(f=0;f<c.length;f++){var w=c[f];if(!Fe.call(s,w)||!oo(i[w],s[w]))return!1}return!0}function GT(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function KT(i,s){var c=GT(i);i=0;for(var f;c;){if(c.nodeType===3){if(f=i+c.textContent.length,i<=s&&f>=s)return{node:c,offset:s-i};i=f}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=GT(c)}}function XT(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?XT(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function QT(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var s=nr(i.document);s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)i=s.contentWindow;else break;s=nr(i.document)}return s}function QC(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}var mZ=tu&&"documentMode"in document&&11>=document.documentMode,zm=null,YC=null,lv=null,JC=!1;function YT(i,s,c){var f=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;JC||zm==null||zm!==nr(f)||(f=zm,"selectionStart"in f&&QC(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),lv&&sv(lv,f)||(lv=f,f=N5(YC,"onSelect"),0<f.length&&(s=new qw("onSelect","select",null,s,c),i.push({event:s,listeners:f}),s.target=zm)))}function mp(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Lm={animationend:mp("Animation","AnimationEnd"),animationiteration:mp("Animation","AnimationIteration"),animationstart:mp("Animation","AnimationStart"),transitionrun:mp("Transition","TransitionRun"),transitionstart:mp("Transition","TransitionStart"),transitioncancel:mp("Transition","TransitionCancel"),transitionend:mp("Transition","TransitionEnd")},ZC={},JT={};tu&&(JT=document.createElement("div").style,"AnimationEvent"in window||(delete Lm.animationend.animation,delete Lm.animationiteration.animation,delete Lm.animationstart.animation),"TransitionEvent"in window||delete Lm.transitionend.transition);function hp(i){if(ZC[i])return ZC[i];if(!Lm[i])return i;var s=Lm[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in JT)return ZC[i]=s[c];return i}var ZT=hp("animationend"),e_=hp("animationiteration"),t_=hp("animationstart"),hZ=hp("transitionrun"),gZ=hp("transitionstart"),vZ=hp("transitioncancel"),r_=hp("transitionend"),n_=new Map,eS="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");eS.push("scrollEnd");function gs(i,s){n_.set(i,s),Ea(s,[i])}var Gw=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Io=[],Hm=0,tS=0;function Kw(){for(var i=Hm,s=tS=Hm=0;s<i;){var c=Io[s];Io[s++]=null;var f=Io[s];Io[s++]=null;var w=Io[s];Io[s++]=null;var k=Io[s];if(Io[s++]=null,f!==null&&w!==null){var T=f.pending;T===null?w.next=w:(w.next=T.next,T.next=w),f.pending=w}k!==0&&a_(c,w,k)}}function Xw(i,s,c,f){Io[Hm++]=i,Io[Hm++]=s,Io[Hm++]=c,Io[Hm++]=f,tS|=f,i.lanes|=f,i=i.alternate,i!==null&&(i.lanes|=f)}function rS(i,s,c,f){return Xw(i,s,c,f),Qw(i)}function gp(i,s){return Xw(i,null,null,s),Qw(i)}function a_(i,s,c){i.lanes|=c;var f=i.alternate;f!==null&&(f.lanes|=c);for(var w=!1,k=i.return;k!==null;)k.childLanes|=c,f=k.alternate,f!==null&&(f.childLanes|=c),k.tag===22&&(i=k.stateNode,i===null||i._visibility&1||(w=!0)),i=k,k=k.return;return i.tag===3?(k=i.stateNode,w&&s!==null&&(w=31-nt(c),i=k.hiddenUpdates,f=i[w],f===null?i[w]=[s]:f.push(s),s.lane=c|536870912),k):null}function Qw(i){if(50<Bv)throw Bv=0,d8=null,Error(a(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var qm={};function bZ(i,s,c,f){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function so(i,s,c,f){return new bZ(i,s,c,f)}function nS(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ru(i,s){var c=i.alternate;return c===null?(c=so(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&65011712,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c.refCleanup=i.refCleanup,c}function i_(i,s){i.flags&=65011714;var c=i.alternate;return c===null?(i.childLanes=0,i.lanes=s,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,s=c.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),i}function Yw(i,s,c,f,w,k){var T=0;if(f=i,typeof i=="function")nS(i)&&(T=1);else if(typeof i=="string")T=xee(i,c,J.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case N:return i=so(31,c,s,w),i.elementType=N,i.lanes=k,i;case E:return vp(c.children,w,k,s);case F:T=8,w|=24;break;case S:return i=so(12,c,s,w|2),i.elementType=S,i.lanes=k,i;case B:return i=so(13,c,s,w),i.elementType=B,i.lanes=k,i;case M:return i=so(19,c,s,w),i.elementType=M,i.lanes=k,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:T=10;break e;case D:T=9;break e;case C:T=11;break e;case I:T=14;break e;case j:T=16,f=null;break e}T=29,c=Error(a(130,i===null?"null":typeof i,"")),f=null}return s=so(T,c,s,w),s.elementType=i,s.type=f,s.lanes=k,s}function vp(i,s,c,f){return i=so(7,i,f,s),i.lanes=c,i}function aS(i,s,c){return i=so(6,i,null,s),i.lanes=c,i}function o_(i){var s=so(18,null,null,0);return s.stateNode=i,s}function iS(i,s,c){return s=so(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}var s_=new WeakMap;function Mo(i,s){if(typeof i=="object"&&i!==null){var c=s_.get(i);return c!==void 0?c:(s={value:i,source:s,stack:Re(s)},s_.set(i,s),s)}return{value:i,source:s,stack:Re(s)}}var Wm=[],Um=0,Jw=null,uv=0,To=[],_o=0,Ec=null,il=1,ol="";function nu(i,s){Wm[Um++]=uv,Wm[Um++]=Jw,Jw=i,uv=s}function l_(i,s,c){To[_o++]=il,To[_o++]=ol,To[_o++]=Ec,Ec=i;var f=il;i=ol;var w=32-nt(f)-1;f&=~(1<<w),c+=1;var k=32-nt(s)+w;if(30<k){var T=w-w%5;k=(f&(1<<T)-1).toString(32),f>>=T,w-=T,il=1<<32-nt(s)+w|c<<w|f,ol=k+i}else il=1<<k|c<<w|f,ol=i}function oS(i){i.return!==null&&(nu(i,1),l_(i,1,0))}function sS(i){for(;i===Jw;)Jw=Wm[--Um],Wm[Um]=null,uv=Wm[--Um],Wm[Um]=null;for(;i===Ec;)Ec=To[--_o],To[_o]=null,ol=To[--_o],To[_o]=null,il=To[--_o],To[_o]=null}function u_(i,s){To[_o++]=il,To[_o++]=ol,To[_o++]=Ec,il=s.id,ol=s.overflow,Ec=i}var Ca=null,sn=null,dr=!1,kc=null,jo=!1,lS=Error(a(519));function Cc(i){var s=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cv(Mo(s,i)),lS}function c_(i){var s=i.stateNode,c=i.type,f=i.memoizedProps;switch(s[rr]=i,s[Vr]=f,c){case"dialog":Zt("cancel",s),Zt("close",s);break;case"iframe":case"object":case"embed":Zt("load",s);break;case"video":case"audio":for(c=0;c<Mv.length;c++)Zt(Mv[c],s);break;case"source":Zt("error",s);break;case"img":case"image":case"link":Zt("error",s),Zt("load",s);break;case"details":Zt("toggle",s);break;case"input":Zt("invalid",s),Zg(s,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":Zt("invalid",s);break;case"textarea":Zt("invalid",s),FT(s,f.value,f.defaultValue,f.children)}c=f.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||f.suppressHydrationWarning===!0||AN(s.textContent,c)?(f.popover!=null&&(Zt("beforetoggle",s),Zt("toggle",s)),f.onScroll!=null&&Zt("scroll",s),f.onScrollEnd!=null&&Zt("scrollend",s),f.onClick!=null&&(s.onclick=eu),s=!0):s=!1,s||Cc(i,!0)}function d_(i){for(Ca=i.return;Ca;)switch(Ca.tag){case 5:case 31:case 13:jo=!1;return;case 27:case 3:jo=!0;return;default:Ca=Ca.return}}function Vm(i){if(i!==Ca)return!1;if(!dr)return d_(i),dr=!0,!1;var s=i.tag,c;if((c=s!==3&&s!==27)&&((c=s===5)&&(c=i.type,c=!(c!=="form"&&c!=="button")||C8(i.type,i.memoizedProps)),c=!c),c&&sn&&Cc(i),d_(i),s===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));sn=RN(i)}else if(s===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));sn=RN(i)}else s===27?(s=sn,Rc(i.type)?(i=A8,A8=null,sn=i):sn=s):sn=Ca?No(i.stateNode.nextSibling):null;return!0}function bp(){sn=Ca=null,dr=!1}function uS(){var i=kc;return i!==null&&(Ti===null?Ti=i:Ti.push.apply(Ti,i),kc=null),i}function cv(i){kc===null?kc=[i]:kc.push(i)}var cS=O(null),yp=null,au=null;function Sc(i,s,c){K(cS,s._currentValue),s._currentValue=c}function iu(i){i._currentValue=cS.current,z(cS)}function dS(i,s,c){for(;i!==null;){var f=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),i===c)break;i=i.return}}function pS(i,s,c,f){var w=i.child;for(w!==null&&(w.return=i);w!==null;){var k=w.dependencies;if(k!==null){var T=w.child;k=k.firstContext;e:for(;k!==null;){var G=k;k=w;for(var re=0;re<s.length;re++)if(G.context===s[re]){k.lanes|=c,G=k.alternate,G!==null&&(G.lanes|=c),dS(k.return,c,i),f||(T=null);break e}k=G.next}}else if(w.tag===18){if(T=w.return,T===null)throw Error(a(341));T.lanes|=c,k=T.alternate,k!==null&&(k.lanes|=c),dS(T,c,i),T=null}else T=w.child;if(T!==null)T.return=w;else for(T=w;T!==null;){if(T===i){T=null;break}if(w=T.sibling,w!==null){w.return=T.return,T=w;break}T=T.return}w=T}}function Gm(i,s,c,f){i=null;for(var w=s,k=!1;w!==null;){if(!k){if((w.flags&524288)!==0)k=!0;else if((w.flags&262144)!==0)break}if(w.tag===10){var T=w.alternate;if(T===null)throw Error(a(387));if(T=T.memoizedProps,T!==null){var G=w.type;oo(w.pendingProps.value,T.value)||(i!==null?i.push(G):i=[G])}}else if(w===ie.current){if(T=w.alternate,T===null)throw Error(a(387));T.memoizedState.memoizedState!==w.memoizedState.memoizedState&&(i!==null?i.push(Pv):i=[Pv])}w=w.return}i!==null&&pS(s,i,c,f),s.flags|=262144}function Zw(i){for(i=i.firstContext;i!==null;){if(!oo(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function wp(i){yp=i,au=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Sa(i){return p_(yp,i)}function e5(i,s){return yp===null&&wp(i),p_(i,s)}function p_(i,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},au===null){if(i===null)throw Error(a(308));au=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else au=au.next=s;return c}var yZ=typeof AbortController<"u"?AbortController:function(){var i=[],s=this.signal={aborted:!1,addEventListener:function(c,f){i.push(f)}};this.abort=function(){s.aborted=!0,i.forEach(function(c){return c()})}},wZ=t.unstable_scheduleCallback,xZ=t.unstable_NormalPriority,Hn={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fS(){return{controller:new yZ,data:new Map,refCount:0}}function dv(i){i.refCount--,i.refCount===0&&wZ(xZ,function(){i.controller.abort()})}var pv=null,mS=0,Km=0,Xm=null;function EZ(i,s){if(pv===null){var c=pv=[];mS=0,Km=v8(),Xm={status:"pending",value:void 0,then:function(f){c.push(f)}}}return mS++,s.then(f_,f_),s}function f_(){if(--mS===0&&pv!==null){Xm!==null&&(Xm.status="fulfilled");var i=pv;pv=null,Km=0,Xm=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function kZ(i,s){var c=[],f={status:"pending",value:null,reason:null,then:function(w){c.push(w)}};return i.then(function(){f.status="fulfilled",f.value=s;for(var w=0;w<c.length;w++)(0,c[w])(s)},function(w){for(f.status="rejected",f.reason=w,w=0;w<c.length;w++)(0,c[w])(void 0)}),f}var m_=H.S;H.S=function(i,s){Yj=Me(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&EZ(i,s),m_!==null&&m_(i,s)};var xp=O(null);function hS(){var i=xp.current;return i!==null?i:Gr.pooledCache}function t5(i,s){s===null?K(xp,xp.current):K(xp,s.pool)}function h_(){var i=hS();return i===null?null:{parent:Hn._currentValue,pool:i}}var Qm=Error(a(460)),gS=Error(a(474)),r5=Error(a(542)),n5={then:function(){}};function g_(i){return i=i.status,i==="fulfilled"||i==="rejected"}function v_(i,s,c){switch(c=i[c],c===void 0?i.push(s):c!==s&&(s.then(eu,eu),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,y_(i),i;default:if(typeof s.status=="string")s.then(eu,eu);else{if(i=Gr,i!==null&&100<i.shellSuspendCounter)throw Error(a(482));i=s,i.status="pending",i.then(function(f){if(s.status==="pending"){var w=s;w.status="fulfilled",w.value=f}},function(f){if(s.status==="pending"){var w=s;w.status="rejected",w.reason=f}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,y_(i),i}throw kp=s,Qm}}function Ep(i){try{var s=i._init;return s(i._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(kp=c,Qm):c}}var kp=null;function b_(){if(kp===null)throw Error(a(459));var i=kp;return kp=null,i}function y_(i){if(i===Qm||i===r5)throw Error(a(483))}var Ym=null,fv=0;function a5(i){var s=fv;return fv+=1,Ym===null&&(Ym=[]),v_(Ym,i,s)}function mv(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function i5(i,s){throw s.$$typeof===b?Error(a(525)):(i=Object.prototype.toString.call(s),Error(a(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i)))}function w_(i){function s(ce,oe){if(i){var pe=ce.deletions;pe===null?(ce.deletions=[oe],ce.flags|=16):pe.push(oe)}}function c(ce,oe){if(!i)return null;for(;oe!==null;)s(ce,oe),oe=oe.sibling;return null}function f(ce){for(var oe=new Map;ce!==null;)ce.key!==null?oe.set(ce.key,ce):oe.set(ce.index,ce),ce=ce.sibling;return oe}function w(ce,oe){return ce=ru(ce,oe),ce.index=0,ce.sibling=null,ce}function k(ce,oe,pe){return ce.index=pe,i?(pe=ce.alternate,pe!==null?(pe=pe.index,pe<oe?(ce.flags|=67108866,oe):pe):(ce.flags|=67108866,oe)):(ce.flags|=1048576,oe)}function T(ce){return i&&ce.alternate===null&&(ce.flags|=67108866),ce}function G(ce,oe,pe,Ce){return oe===null||oe.tag!==6?(oe=aS(pe,ce.mode,Ce),oe.return=ce,oe):(oe=w(oe,pe),oe.return=ce,oe)}function re(ce,oe,pe,Ce){var pt=pe.type;return pt===E?Ee(ce,oe,pe.props.children,Ce,pe.key):oe!==null&&(oe.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===j&&Ep(pt)===oe.type)?(oe=w(oe,pe.props),mv(oe,pe),oe.return=ce,oe):(oe=Yw(pe.type,pe.key,pe.props,null,ce.mode,Ce),mv(oe,pe),oe.return=ce,oe)}function fe(ce,oe,pe,Ce){return oe===null||oe.tag!==4||oe.stateNode.containerInfo!==pe.containerInfo||oe.stateNode.implementation!==pe.implementation?(oe=iS(pe,ce.mode,Ce),oe.return=ce,oe):(oe=w(oe,pe.children||[]),oe.return=ce,oe)}function Ee(ce,oe,pe,Ce,pt){return oe===null||oe.tag!==7?(oe=vp(pe,ce.mode,Ce,pt),oe.return=ce,oe):(oe=w(oe,pe),oe.return=ce,oe)}function Se(ce,oe,pe){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return oe=aS(""+oe,ce.mode,pe),oe.return=ce,oe;if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case x:return pe=Yw(oe.type,oe.key,oe.props,null,ce.mode,pe),mv(pe,oe),pe.return=ce,pe;case y:return oe=iS(oe,ce.mode,pe),oe.return=ce,oe;case j:return oe=Ep(oe),Se(ce,oe,pe)}if(P(oe)||q(oe))return oe=vp(oe,ce.mode,pe,null),oe.return=ce,oe;if(typeof oe.then=="function")return Se(ce,a5(oe),pe);if(oe.$$typeof===$)return Se(ce,e5(ce,oe),pe);i5(ce,oe)}return null}function ge(ce,oe,pe,Ce){var pt=oe!==null?oe.key:null;if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return pt!==null?null:G(ce,oe,""+pe,Ce);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case x:return pe.key===pt?re(ce,oe,pe,Ce):null;case y:return pe.key===pt?fe(ce,oe,pe,Ce):null;case j:return pe=Ep(pe),ge(ce,oe,pe,Ce)}if(P(pe)||q(pe))return pt!==null?null:Ee(ce,oe,pe,Ce,null);if(typeof pe.then=="function")return ge(ce,oe,a5(pe),Ce);if(pe.$$typeof===$)return ge(ce,oe,e5(ce,pe),Ce);i5(ce,pe)}return null}function ve(ce,oe,pe,Ce,pt){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint")return ce=ce.get(pe)||null,G(oe,ce,""+Ce,pt);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case x:return ce=ce.get(Ce.key===null?pe:Ce.key)||null,re(oe,ce,Ce,pt);case y:return ce=ce.get(Ce.key===null?pe:Ce.key)||null,fe(oe,ce,Ce,pt);case j:return Ce=Ep(Ce),ve(ce,oe,pe,Ce,pt)}if(P(Ce)||q(Ce))return ce=ce.get(pe)||null,Ee(oe,ce,Ce,pt,null);if(typeof Ce.then=="function")return ve(ce,oe,pe,a5(Ce),pt);if(Ce.$$typeof===$)return ve(ce,oe,pe,e5(oe,Ce),pt);i5(oe,Ce)}return null}function tt(ce,oe,pe,Ce){for(var pt=null,wr=null,it=oe,Ot=oe=0,ir=null;it!==null&&Ot<pe.length;Ot++){it.index>Ot?(ir=it,it=null):ir=it.sibling;var xr=ge(ce,it,pe[Ot],Ce);if(xr===null){it===null&&(it=ir);break}i&&it&&xr.alternate===null&&s(ce,it),oe=k(xr,oe,Ot),wr===null?pt=xr:wr.sibling=xr,wr=xr,it=ir}if(Ot===pe.length)return c(ce,it),dr&&nu(ce,Ot),pt;if(it===null){for(;Ot<pe.length;Ot++)it=Se(ce,pe[Ot],Ce),it!==null&&(oe=k(it,oe,Ot),wr===null?pt=it:wr.sibling=it,wr=it);return dr&&nu(ce,Ot),pt}for(it=f(it);Ot<pe.length;Ot++)ir=ve(it,ce,Ot,pe[Ot],Ce),ir!==null&&(i&&ir.alternate!==null&&it.delete(ir.key===null?Ot:ir.key),oe=k(ir,oe,Ot),wr===null?pt=ir:wr.sibling=ir,wr=ir);return i&&it.forEach(function(qc){return s(ce,qc)}),dr&&nu(ce,Ot),pt}function kt(ce,oe,pe,Ce){if(pe==null)throw Error(a(151));for(var pt=null,wr=null,it=oe,Ot=oe=0,ir=null,xr=pe.next();it!==null&&!xr.done;Ot++,xr=pe.next()){it.index>Ot?(ir=it,it=null):ir=it.sibling;var qc=ge(ce,it,xr.value,Ce);if(qc===null){it===null&&(it=ir);break}i&&it&&qc.alternate===null&&s(ce,it),oe=k(qc,oe,Ot),wr===null?pt=qc:wr.sibling=qc,wr=qc,it=ir}if(xr.done)return c(ce,it),dr&&nu(ce,Ot),pt;if(it===null){for(;!xr.done;Ot++,xr=pe.next())xr=Se(ce,xr.value,Ce),xr!==null&&(oe=k(xr,oe,Ot),wr===null?pt=xr:wr.sibling=xr,wr=xr);return dr&&nu(ce,Ot),pt}for(it=f(it);!xr.done;Ot++,xr=pe.next())xr=ve(it,ce,Ot,xr.value,Ce),xr!==null&&(i&&xr.alternate!==null&&it.delete(xr.key===null?Ot:xr.key),oe=k(xr,oe,Ot),wr===null?pt=xr:wr.sibling=xr,wr=xr);return i&&it.forEach(function(Mee){return s(ce,Mee)}),dr&&nu(ce,Ot),pt}function zr(ce,oe,pe,Ce){if(typeof pe=="object"&&pe!==null&&pe.type===E&&pe.key===null&&(pe=pe.props.children),typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case x:e:{for(var pt=pe.key;oe!==null;){if(oe.key===pt){if(pt=pe.type,pt===E){if(oe.tag===7){c(ce,oe.sibling),Ce=w(oe,pe.props.children),Ce.return=ce,ce=Ce;break e}}else if(oe.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===j&&Ep(pt)===oe.type){c(ce,oe.sibling),Ce=w(oe,pe.props),mv(Ce,pe),Ce.return=ce,ce=Ce;break e}c(ce,oe);break}else s(ce,oe);oe=oe.sibling}pe.type===E?(Ce=vp(pe.props.children,ce.mode,Ce,pe.key),Ce.return=ce,ce=Ce):(Ce=Yw(pe.type,pe.key,pe.props,null,ce.mode,Ce),mv(Ce,pe),Ce.return=ce,ce=Ce)}return T(ce);case y:e:{for(pt=pe.key;oe!==null;){if(oe.key===pt)if(oe.tag===4&&oe.stateNode.containerInfo===pe.containerInfo&&oe.stateNode.implementation===pe.implementation){c(ce,oe.sibling),Ce=w(oe,pe.children||[]),Ce.return=ce,ce=Ce;break e}else{c(ce,oe);break}else s(ce,oe);oe=oe.sibling}Ce=iS(pe,ce.mode,Ce),Ce.return=ce,ce=Ce}return T(ce);case j:return pe=Ep(pe),zr(ce,oe,pe,Ce)}if(P(pe))return tt(ce,oe,pe,Ce);if(q(pe)){if(pt=q(pe),typeof pt!="function")throw Error(a(150));return pe=pt.call(pe),kt(ce,oe,pe,Ce)}if(typeof pe.then=="function")return zr(ce,oe,a5(pe),Ce);if(pe.$$typeof===$)return zr(ce,oe,e5(ce,pe),Ce);i5(ce,pe)}return typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint"?(pe=""+pe,oe!==null&&oe.tag===6?(c(ce,oe.sibling),Ce=w(oe,pe),Ce.return=ce,ce=Ce):(c(ce,oe),Ce=aS(pe,ce.mode,Ce),Ce.return=ce,ce=Ce),T(ce)):c(ce,oe)}return function(ce,oe,pe,Ce){try{fv=0;var pt=zr(ce,oe,pe,Ce);return Ym=null,pt}catch(it){if(it===Qm||it===r5)throw it;var wr=so(29,it,null,ce.mode);return wr.lanes=Ce,wr.return=ce,wr}}}var Cp=w_(!0),x_=w_(!1),Fc=!1;function vS(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bS(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function $c(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Dc(i,s,c){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(Cr&2)!==0){var w=f.pending;return w===null?s.next=s:(s.next=w.next,w.next=s),f.pending=s,s=Qw(i),a_(i,null,c),s}return Xw(i,f,s,c),Qw(i)}function hv(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194048)!==0)){var f=s.lanes;f&=i.pendingLanes,c|=f,s.lanes=c,Le(i,c)}}function yS(i,s){var c=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,c===f)){var w=null,k=null;if(c=c.firstBaseUpdate,c!==null){do{var T={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};k===null?w=k=T:k=k.next=T,c=c.next}while(c!==null);k===null?w=k=s:k=k.next=s}else w=k=s;c={baseState:f.baseState,firstBaseUpdate:w,lastBaseUpdate:k,shared:f.shared,callbacks:f.callbacks},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}var wS=!1;function gv(){if(wS){var i=Xm;if(i!==null)throw i}}function vv(i,s,c,f){wS=!1;var w=i.updateQueue;Fc=!1;var k=w.firstBaseUpdate,T=w.lastBaseUpdate,G=w.shared.pending;if(G!==null){w.shared.pending=null;var re=G,fe=re.next;re.next=null,T===null?k=fe:T.next=fe,T=re;var Ee=i.alternate;Ee!==null&&(Ee=Ee.updateQueue,G=Ee.lastBaseUpdate,G!==T&&(G===null?Ee.firstBaseUpdate=fe:G.next=fe,Ee.lastBaseUpdate=re))}if(k!==null){var Se=w.baseState;T=0,Ee=fe=re=null,G=k;do{var ge=G.lane&-536870913,ve=ge!==G.lane;if(ve?(ar&ge)===ge:(f&ge)===ge){ge!==0&&ge===Km&&(wS=!0),Ee!==null&&(Ee=Ee.next={lane:0,tag:G.tag,payload:G.payload,callback:null,next:null});e:{var tt=i,kt=G;ge=s;var zr=c;switch(kt.tag){case 1:if(tt=kt.payload,typeof tt=="function"){Se=tt.call(zr,Se,ge);break e}Se=tt;break e;case 3:tt.flags=tt.flags&-65537|128;case 0:if(tt=kt.payload,ge=typeof tt=="function"?tt.call(zr,Se,ge):tt,ge==null)break e;Se=g({},Se,ge);break e;case 2:Fc=!0}}ge=G.callback,ge!==null&&(i.flags|=64,ve&&(i.flags|=8192),ve=w.callbacks,ve===null?w.callbacks=[ge]:ve.push(ge))}else ve={lane:ge,tag:G.tag,payload:G.payload,callback:G.callback,next:null},Ee===null?(fe=Ee=ve,re=Se):Ee=Ee.next=ve,T|=ge;if(G=G.next,G===null){if(G=w.shared.pending,G===null)break;ve=G,G=ve.next,ve.next=null,w.lastBaseUpdate=ve,w.shared.pending=null}}while(!0);Ee===null&&(re=Se),w.baseState=re,w.firstBaseUpdate=fe,w.lastBaseUpdate=Ee,k===null&&(w.shared.lanes=0),Tc|=T,i.lanes=T,i.memoizedState=Se}}function E_(i,s){if(typeof i!="function")throw Error(a(191,i));i.call(s)}function k_(i,s){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)E_(c[i],s)}var Jm=O(null),o5=O(0);function C_(i,s){i=mu,K(o5,i),K(Jm,s),mu=i|s.baseLanes}function xS(){K(o5,mu),K(Jm,Jm.current)}function ES(){mu=o5.current,z(Jm),z(o5)}var lo=O(null),vs=null;function Ac(i){var s=i.alternate;K(In,In.current&1),K(lo,i),vs===null&&(s===null||Jm.current!==null||s.memoizedState!==null)&&(vs=i)}function kS(i){K(In,In.current),K(lo,i),vs===null&&(vs=i)}function S_(i){i.tag===22?(K(In,In.current),K(lo,i),vs===null&&(vs=i)):Bc(i)}function Bc(){K(In,In.current),K(lo,lo.current)}function uo(i){z(lo),vs===i&&(vs=null),z(In)}var In=O(0);function s5(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||$8(c)||D8(c)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var ou=0,_t=null,Rr=null,qn=null,l5=!1,Zm=!1,Sp=!1,u5=0,bv=0,eh=null,CZ=0;function Cn(){throw Error(a(321))}function CS(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!oo(i[c],s[c]))return!1;return!0}function SS(i,s,c,f,w,k){return ou=k,_t=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,H.H=i===null||i.memoizedState===null?lj:zS,Sp=!1,k=c(f,w),Sp=!1,Zm&&(k=$_(s,c,f,w)),F_(i),k}function F_(i){H.H=xv;var s=Rr!==null&&Rr.next!==null;if(ou=0,qn=Rr=_t=null,l5=!1,bv=0,eh=null,s)throw Error(a(300));i===null||Wn||(i=i.dependencies,i!==null&&Zw(i)&&(Wn=!0))}function $_(i,s,c,f){_t=i;var w=0;do{if(Zm&&(eh=null),bv=0,Zm=!1,25<=w)throw Error(a(301));if(w+=1,qn=Rr=null,i.updateQueue!=null){var k=i.updateQueue;k.lastEffect=null,k.events=null,k.stores=null,k.memoCache!=null&&(k.memoCache.index=0)}H.H=uj,k=s(c,f)}while(Zm);return k}function SZ(){var i=H.H,s=i.useState()[0];return s=typeof s.then=="function"?yv(s):s,i=i.useState()[0],(Rr!==null?Rr.memoizedState:null)!==i&&(_t.flags|=1024),s}function FS(){var i=u5!==0;return u5=0,i}function $S(i,s,c){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~c}function DS(i){if(l5){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}l5=!1}ou=0,qn=Rr=_t=null,Zm=!1,bv=u5=0,eh=null}function pi(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qn===null?_t.memoizedState=qn=i:qn=qn.next=i,qn}function Mn(){if(Rr===null){var i=_t.alternate;i=i!==null?i.memoizedState:null}else i=Rr.next;var s=qn===null?_t.memoizedState:qn.next;if(s!==null)qn=s,Rr=i;else{if(i===null)throw _t.alternate===null?Error(a(467)):Error(a(310));Rr=i,i={memoizedState:Rr.memoizedState,baseState:Rr.baseState,baseQueue:Rr.baseQueue,queue:Rr.queue,next:null},qn===null?_t.memoizedState=qn=i:qn=qn.next=i}return qn}function c5(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yv(i){var s=bv;return bv+=1,eh===null&&(eh=[]),i=v_(eh,i,s),s=_t,(qn===null?s.memoizedState:qn.next)===null&&(s=s.alternate,H.H=s===null||s.memoizedState===null?lj:zS),i}function d5(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return yv(i);if(i.$$typeof===$)return Sa(i)}throw Error(a(438,String(i)))}function AS(i){var s=null,c=_t.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var f=_t.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(s={data:f.data.map(function(w){return w.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),c===null&&(c=c5(),_t.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(i),f=0;f<i;f++)c[f]=R;return s.index++,c}function su(i,s){return typeof s=="function"?s(i):s}function p5(i){var s=Mn();return BS(s,Rr,i)}function BS(i,s,c){var f=i.queue;if(f===null)throw Error(a(311));f.lastRenderedReducer=c;var w=i.baseQueue,k=f.pending;if(k!==null){if(w!==null){var T=w.next;w.next=k.next,k.next=T}s.baseQueue=w=k,f.pending=null}if(k=i.baseState,w===null)i.memoizedState=k;else{s=w.next;var G=T=null,re=null,fe=s,Ee=!1;do{var Se=fe.lane&-536870913;if(Se!==fe.lane?(ar&Se)===Se:(ou&Se)===Se){var ge=fe.revertLane;if(ge===0)re!==null&&(re=re.next={lane:0,revertLane:0,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null}),Se===Km&&(Ee=!0);else if((ou&ge)===ge){fe=fe.next,ge===Km&&(Ee=!0);continue}else Se={lane:0,revertLane:fe.revertLane,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},re===null?(G=re=Se,T=k):re=re.next=Se,_t.lanes|=ge,Tc|=ge;Se=fe.action,Sp&&c(k,Se),k=fe.hasEagerState?fe.eagerState:c(k,Se)}else ge={lane:Se,revertLane:fe.revertLane,gesture:fe.gesture,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},re===null?(G=re=ge,T=k):re=re.next=ge,_t.lanes|=Se,Tc|=Se;fe=fe.next}while(fe!==null&&fe!==s);if(re===null?T=k:re.next=G,!oo(k,i.memoizedState)&&(Wn=!0,Ee&&(c=Xm,c!==null)))throw c;i.memoizedState=k,i.baseState=T,i.baseQueue=re,f.lastRenderedState=k}return w===null&&(f.lanes=0),[i.memoizedState,f.dispatch]}function IS(i){var s=Mn(),c=s.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=i;var f=c.dispatch,w=c.pending,k=s.memoizedState;if(w!==null){c.pending=null;var T=w=w.next;do k=i(k,T.action),T=T.next;while(T!==w);oo(k,s.memoizedState)||(Wn=!0),s.memoizedState=k,s.baseQueue===null&&(s.baseState=k),c.lastRenderedState=k}return[k,f]}function D_(i,s,c){var f=_t,w=Mn(),k=dr;if(k){if(c===void 0)throw Error(a(407));c=c()}else c=s();var T=!oo((Rr||w).memoizedState,c);if(T&&(w.memoizedState=c,Wn=!0),w=w.queue,_S(I_.bind(null,f,w,i),[i]),w.getSnapshot!==s||T||qn!==null&&qn.memoizedState.tag&1){if(f.flags|=2048,th(9,{destroy:void 0},B_.bind(null,f,w,c,s),null),Gr===null)throw Error(a(349));k||(ou&127)!==0||A_(f,s,c)}return c}function A_(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=_t.updateQueue,s===null?(s=c5(),_t.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function B_(i,s,c,f){s.value=c,s.getSnapshot=f,M_(s)&&T_(i)}function I_(i,s,c){return c(function(){M_(s)&&T_(i)})}function M_(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!oo(i,c)}catch{return!0}}function T_(i){var s=gp(i,2);s!==null&&_i(s,i,2)}function MS(i){var s=pi();if(typeof i=="function"){var c=i;if(i=c(),Sp){je(!0);try{c()}finally{je(!1)}}}return s.memoizedState=s.baseState=i,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:su,lastRenderedState:i},s}function __(i,s,c,f){return i.baseState=c,BS(i,Rr,typeof f=="function"?f:su)}function FZ(i,s,c,f,w){if(h5(i))throw Error(a(485));if(i=s.action,i!==null){var k={payload:w,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){k.listeners.push(T)}};H.T!==null?c(!0):k.isTransition=!1,f(k),c=s.pending,c===null?(k.next=s.pending=k,j_(s,k)):(k.next=c.next,s.pending=c.next=k)}}function j_(i,s){var c=s.action,f=s.payload,w=i.state;if(s.isTransition){var k=H.T,T={};H.T=T;try{var G=c(w,f),re=H.S;re!==null&&re(T,G),N_(i,s,G)}catch(fe){TS(i,s,fe)}finally{k!==null&&T.types!==null&&(k.types=T.types),H.T=k}}else try{k=c(w,f),N_(i,s,k)}catch(fe){TS(i,s,fe)}}function N_(i,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(f){P_(i,s,f)},function(f){return TS(i,s,f)}):P_(i,s,c)}function P_(i,s,c){s.status="fulfilled",s.value=c,R_(s),i.state=c,s=i.pending,s!==null&&(c=s.next,c===s?i.pending=null:(c=c.next,s.next=c,j_(i,c)))}function TS(i,s,c){var f=i.pending;if(i.pending=null,f!==null){f=f.next;do s.status="rejected",s.reason=c,R_(s),s=s.next;while(s!==f)}i.action=null}function R_(i){i=i.listeners;for(var s=0;s<i.length;s++)(0,i[s])()}function O_(i,s){return s}function z_(i,s){if(dr){var c=Gr.formState;if(c!==null){e:{var f=_t;if(dr){if(sn){t:{for(var w=sn,k=jo;w.nodeType!==8;){if(!k){w=null;break t}if(w=No(w.nextSibling),w===null){w=null;break t}}k=w.data,w=k==="F!"||k==="F"?w:null}if(w){sn=No(w.nextSibling),f=w.data==="F!";break e}}Cc(f)}f=!1}f&&(s=c[0])}}return c=pi(),c.memoizedState=c.baseState=s,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:O_,lastRenderedState:s},c.queue=f,c=ij.bind(null,_t,f),f.dispatch=c,f=MS(!1),k=OS.bind(null,_t,!1,f.queue),f=pi(),w={state:s,dispatch:null,action:i,pending:null},f.queue=w,c=FZ.bind(null,_t,w,k,c),w.dispatch=c,f.memoizedState=i,[s,c,!1]}function L_(i){var s=Mn();return H_(s,Rr,i)}function H_(i,s,c){if(s=BS(i,s,O_)[0],i=p5(su)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var f=yv(s)}catch(T){throw T===Qm?r5:T}else f=s;s=Mn();var w=s.queue,k=w.dispatch;return c!==s.memoizedState&&(_t.flags|=2048,th(9,{destroy:void 0},$Z.bind(null,w,c),null)),[f,k,i]}function $Z(i,s){i.action=s}function q_(i){var s=Mn(),c=Rr;if(c!==null)return H_(s,c,i);Mn(),s=s.memoizedState,c=Mn();var f=c.queue.dispatch;return c.memoizedState=i,[s,f,!1]}function th(i,s,c,f){return i={tag:i,create:c,deps:f,inst:s,next:null},s=_t.updateQueue,s===null&&(s=c5(),_t.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=i.next=i:(f=c.next,c.next=i,i.next=f,s.lastEffect=i),i}function W_(){return Mn().memoizedState}function f5(i,s,c,f){var w=pi();_t.flags|=i,w.memoizedState=th(1|s,{destroy:void 0},c,f===void 0?null:f)}function m5(i,s,c,f){var w=Mn();f=f===void 0?null:f;var k=w.memoizedState.inst;Rr!==null&&f!==null&&CS(f,Rr.memoizedState.deps)?w.memoizedState=th(s,k,c,f):(_t.flags|=i,w.memoizedState=th(1|s,k,c,f))}function U_(i,s){f5(8390656,8,i,s)}function _S(i,s){m5(2048,8,i,s)}function DZ(i){_t.flags|=4;var s=_t.updateQueue;if(s===null)s=c5(),_t.updateQueue=s,s.events=[i];else{var c=s.events;c===null?s.events=[i]:c.push(i)}}function V_(i){var s=Mn().memoizedState;return DZ({ref:s,nextImpl:i}),function(){if((Cr&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}function G_(i,s){return m5(4,2,i,s)}function K_(i,s){return m5(4,4,i,s)}function X_(i,s){if(typeof s=="function"){i=i();var c=s(i);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function Q_(i,s,c){c=c!=null?c.concat([i]):null,m5(4,4,X_.bind(null,s,i),c)}function jS(){}function Y_(i,s){var c=Mn();s=s===void 0?null:s;var f=c.memoizedState;return s!==null&&CS(s,f[1])?f[0]:(c.memoizedState=[i,s],i)}function J_(i,s){var c=Mn();s=s===void 0?null:s;var f=c.memoizedState;if(s!==null&&CS(s,f[1]))return f[0];if(f=i(),Sp){je(!0);try{i()}finally{je(!1)}}return c.memoizedState=[f,s],f}function NS(i,s,c){return c===void 0||(ou&1073741824)!==0&&(ar&261930)===0?i.memoizedState=s:(i.memoizedState=c,i=Zj(),_t.lanes|=i,Tc|=i,c)}function Z_(i,s,c,f){return oo(c,s)?c:Jm.current!==null?(i=NS(i,c,f),oo(i,s)||(Wn=!0),i):(ou&42)===0||(ou&1073741824)!==0&&(ar&261930)===0?(Wn=!0,i.memoizedState=c):(i=Zj(),_t.lanes|=i,Tc|=i,s)}function ej(i,s,c,f,w){var k=V.p;V.p=k!==0&&8>k?k:8;var T=H.T,G={};H.T=G,OS(i,!1,s,c);try{var re=w(),fe=H.S;if(fe!==null&&fe(G,re),re!==null&&typeof re=="object"&&typeof re.then=="function"){var Ee=kZ(re,f);wv(i,s,Ee,fo(i))}else wv(i,s,f,fo(i))}catch(Se){wv(i,s,{then:function(){},status:"rejected",reason:Se},fo())}finally{V.p=k,T!==null&&G.types!==null&&(T.types=G.types),H.T=T}}function AZ(){}function PS(i,s,c,f){if(i.tag!==5)throw Error(a(476));var w=tj(i).queue;ej(i,w,s,Q,c===null?AZ:function(){return rj(i),c(f)})}function tj(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:su,lastRenderedState:Q},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:su,lastRenderedState:c},next:null},i.memoizedState=s,i=i.alternate,i!==null&&(i.memoizedState=s),s}function rj(i){var s=tj(i);s.next===null&&(s=i.alternate.memoizedState),wv(i,s.next.queue,{},fo())}function RS(){return Sa(Pv)}function nj(){return Mn().memoizedState}function aj(){return Mn().memoizedState}function BZ(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var c=fo();i=$c(c);var f=Dc(s,i,c);f!==null&&(_i(f,s,c),hv(f,s,c)),s={cache:fS()},i.payload=s;return}s=s.return}}function IZ(i,s,c){var f=fo();c={lane:f,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},h5(i)?oj(s,c):(c=rS(i,s,c,f),c!==null&&(_i(c,i,f),sj(c,s,f)))}function ij(i,s,c){var f=fo();wv(i,s,c,f)}function wv(i,s,c,f){var w={lane:f,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(h5(i))oj(s,w);else{var k=i.alternate;if(i.lanes===0&&(k===null||k.lanes===0)&&(k=s.lastRenderedReducer,k!==null))try{var T=s.lastRenderedState,G=k(T,c);if(w.hasEagerState=!0,w.eagerState=G,oo(G,T))return Xw(i,s,w,0),Gr===null&&Kw(),!1}catch{}if(c=rS(i,s,w,f),c!==null)return _i(c,i,f),sj(c,s,f),!0}return!1}function OS(i,s,c,f){if(f={lane:2,revertLane:v8(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},h5(i)){if(s)throw Error(a(479))}else s=rS(i,c,f,2),s!==null&&_i(s,i,2)}function h5(i){var s=i.alternate;return i===_t||s!==null&&s===_t}function oj(i,s){Zm=l5=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function sj(i,s,c){if((c&4194048)!==0){var f=s.lanes;f&=i.pendingLanes,c|=f,s.lanes=c,Le(i,c)}}var xv={readContext:Sa,use:d5,useCallback:Cn,useContext:Cn,useEffect:Cn,useImperativeHandle:Cn,useLayoutEffect:Cn,useInsertionEffect:Cn,useMemo:Cn,useReducer:Cn,useRef:Cn,useState:Cn,useDebugValue:Cn,useDeferredValue:Cn,useTransition:Cn,useSyncExternalStore:Cn,useId:Cn,useHostTransitionStatus:Cn,useFormState:Cn,useActionState:Cn,useOptimistic:Cn,useMemoCache:Cn,useCacheRefresh:Cn};xv.useEffectEvent=Cn;var lj={readContext:Sa,use:d5,useCallback:function(i,s){return pi().memoizedState=[i,s===void 0?null:s],i},useContext:Sa,useEffect:U_,useImperativeHandle:function(i,s,c){c=c!=null?c.concat([i]):null,f5(4194308,4,X_.bind(null,s,i),c)},useLayoutEffect:function(i,s){return f5(4194308,4,i,s)},useInsertionEffect:function(i,s){f5(4,2,i,s)},useMemo:function(i,s){var c=pi();s=s===void 0?null:s;var f=i();if(Sp){je(!0);try{i()}finally{je(!1)}}return c.memoizedState=[f,s],f},useReducer:function(i,s,c){var f=pi();if(c!==void 0){var w=c(s);if(Sp){je(!0);try{c(s)}finally{je(!1)}}}else w=s;return f.memoizedState=f.baseState=w,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:w},f.queue=i,i=i.dispatch=IZ.bind(null,_t,i),[f.memoizedState,i]},useRef:function(i){var s=pi();return i={current:i},s.memoizedState=i},useState:function(i){i=MS(i);var s=i.queue,c=ij.bind(null,_t,s);return s.dispatch=c,[i.memoizedState,c]},useDebugValue:jS,useDeferredValue:function(i,s){var c=pi();return NS(c,i,s)},useTransition:function(){var i=MS(!1);return i=ej.bind(null,_t,i.queue,!0,!1),pi().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,c){var f=_t,w=pi();if(dr){if(c===void 0)throw Error(a(407));c=c()}else{if(c=s(),Gr===null)throw Error(a(349));(ar&127)!==0||A_(f,s,c)}w.memoizedState=c;var k={value:c,getSnapshot:s};return w.queue=k,U_(I_.bind(null,f,k,i),[i]),f.flags|=2048,th(9,{destroy:void 0},B_.bind(null,f,k,c,s),null),c},useId:function(){var i=pi(),s=Gr.identifierPrefix;if(dr){var c=ol,f=il;c=(f&~(1<<32-nt(f)-1)).toString(32)+c,s="_"+s+"R_"+c,c=u5++,0<c&&(s+="H"+c.toString(32)),s+="_"}else c=CZ++,s="_"+s+"r_"+c.toString(32)+"_";return i.memoizedState=s},useHostTransitionStatus:RS,useFormState:z_,useActionState:z_,useOptimistic:function(i){var s=pi();s.memoizedState=s.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=OS.bind(null,_t,!0,c),c.dispatch=s,[i,s]},useMemoCache:AS,useCacheRefresh:function(){return pi().memoizedState=BZ.bind(null,_t)},useEffectEvent:function(i){var s=pi(),c={impl:i};return s.memoizedState=c,function(){if((Cr&2)!==0)throw Error(a(440));return c.impl.apply(void 0,arguments)}}},zS={readContext:Sa,use:d5,useCallback:Y_,useContext:Sa,useEffect:_S,useImperativeHandle:Q_,useInsertionEffect:G_,useLayoutEffect:K_,useMemo:J_,useReducer:p5,useRef:W_,useState:function(){return p5(su)},useDebugValue:jS,useDeferredValue:function(i,s){var c=Mn();return Z_(c,Rr.memoizedState,i,s)},useTransition:function(){var i=p5(su)[0],s=Mn().memoizedState;return[typeof i=="boolean"?i:yv(i),s]},useSyncExternalStore:D_,useId:nj,useHostTransitionStatus:RS,useFormState:L_,useActionState:L_,useOptimistic:function(i,s){var c=Mn();return __(c,Rr,i,s)},useMemoCache:AS,useCacheRefresh:aj};zS.useEffectEvent=V_;var uj={readContext:Sa,use:d5,useCallback:Y_,useContext:Sa,useEffect:_S,useImperativeHandle:Q_,useInsertionEffect:G_,useLayoutEffect:K_,useMemo:J_,useReducer:IS,useRef:W_,useState:function(){return IS(su)},useDebugValue:jS,useDeferredValue:function(i,s){var c=Mn();return Rr===null?NS(c,i,s):Z_(c,Rr.memoizedState,i,s)},useTransition:function(){var i=IS(su)[0],s=Mn().memoizedState;return[typeof i=="boolean"?i:yv(i),s]},useSyncExternalStore:D_,useId:nj,useHostTransitionStatus:RS,useFormState:q_,useActionState:q_,useOptimistic:function(i,s){var c=Mn();return Rr!==null?__(c,Rr,i,s):(c.baseState=i,[i,c.queue.dispatch])},useMemoCache:AS,useCacheRefresh:aj};uj.useEffectEvent=V_;function LS(i,s,c,f){s=i.memoizedState,c=c(f,s),c=c==null?s:g({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var HS={enqueueSetState:function(i,s,c){i=i._reactInternals;var f=fo(),w=$c(f);w.payload=s,c!=null&&(w.callback=c),s=Dc(i,w,f),s!==null&&(_i(s,i,f),hv(s,i,f))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var f=fo(),w=$c(f);w.tag=1,w.payload=s,c!=null&&(w.callback=c),s=Dc(i,w,f),s!==null&&(_i(s,i,f),hv(s,i,f))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=fo(),f=$c(c);f.tag=2,s!=null&&(f.callback=s),s=Dc(i,f,c),s!==null&&(_i(s,i,c),hv(s,i,c))}};function cj(i,s,c,f,w,k,T){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,k,T):s.prototype&&s.prototype.isPureReactComponent?!sv(c,f)||!sv(w,k):!0}function dj(i,s,c,f){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,f),s.state!==i&&HS.enqueueReplaceState(s,s.state,null)}function Fp(i,s){var c=s;if("ref"in s){c={};for(var f in s)f!=="ref"&&(c[f]=s[f])}if(i=i.defaultProps){c===s&&(c=g({},c));for(var w in i)c[w]===void 0&&(c[w]=i[w])}return c}function pj(i){Gw(i)}function fj(i){console.error(i)}function mj(i){Gw(i)}function g5(i,s){try{var c=i.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(f){setTimeout(function(){throw f})}}function hj(i,s,c){try{var f=i.onCaughtError;f(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(w){setTimeout(function(){throw w})}}function qS(i,s,c){return c=$c(c),c.tag=3,c.payload={element:null},c.callback=function(){g5(i,s)},c}function gj(i){return i=$c(i),i.tag=3,i}function vj(i,s,c,f){var w=c.type.getDerivedStateFromError;if(typeof w=="function"){var k=f.value;i.payload=function(){return w(k)},i.callback=function(){hj(s,c,f)}}var T=c.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(i.callback=function(){hj(s,c,f),typeof w!="function"&&(_c===null?_c=new Set([this]):_c.add(this));var G=f.stack;this.componentDidCatch(f.value,{componentStack:G!==null?G:""})})}function MZ(i,s,c,f,w){if(c.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(s=c.alternate,s!==null&&Gm(s,c,w,!0),c=lo.current,c!==null){switch(c.tag){case 31:case 13:return vs===null?D5():c.alternate===null&&Sn===0&&(Sn=3),c.flags&=-257,c.flags|=65536,c.lanes=w,f===n5?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([f]):s.add(f),m8(i,f,w)),!1;case 22:return c.flags|=65536,f===n5?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([f])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([f]):c.add(f)),m8(i,f,w)),!1}throw Error(a(435,c.tag))}return m8(i,f,w),D5(),!1}if(dr)return s=lo.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=w,f!==lS&&(i=Error(a(422),{cause:f}),cv(Mo(i,c)))):(f!==lS&&(s=Error(a(423),{cause:f}),cv(Mo(s,c))),i=i.current.alternate,i.flags|=65536,w&=-w,i.lanes|=w,f=Mo(f,c),w=qS(i.stateNode,f,w),yS(i,w),Sn!==4&&(Sn=2)),!1;var k=Error(a(520),{cause:f});if(k=Mo(k,c),Av===null?Av=[k]:Av.push(k),Sn!==4&&(Sn=2),s===null)return!0;f=Mo(f,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,i=w&-w,c.lanes|=i,i=qS(c.stateNode,f,i),yS(c,i),!1;case 1:if(s=c.type,k=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(_c===null||!_c.has(k))))return c.flags|=65536,w&=-w,c.lanes|=w,w=gj(w),vj(w,i,c,f),yS(c,w),!1}c=c.return}while(c!==null);return!1}var WS=Error(a(461)),Wn=!1;function Fa(i,s,c,f){s.child=i===null?x_(s,null,c,f):Cp(s,i.child,c,f)}function bj(i,s,c,f,w){c=c.render;var k=s.ref;if("ref"in f){var T={};for(var G in f)G!=="ref"&&(T[G]=f[G])}else T=f;return wp(s),f=SS(i,s,c,T,k,w),G=FS(),i!==null&&!Wn?($S(i,s,w),lu(i,s,w)):(dr&&G&&oS(s),s.flags|=1,Fa(i,s,f,w),s.child)}function yj(i,s,c,f,w){if(i===null){var k=c.type;return typeof k=="function"&&!nS(k)&&k.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=k,wj(i,s,k,f,w)):(i=Yw(c.type,null,f,s,s.mode,w),i.ref=s.ref,i.return=s,s.child=i)}if(k=i.child,!JS(i,w)){var T=k.memoizedProps;if(c=c.compare,c=c!==null?c:sv,c(T,f)&&i.ref===s.ref)return lu(i,s,w)}return s.flags|=1,i=ru(k,f),i.ref=s.ref,i.return=s,s.child=i}function wj(i,s,c,f,w){if(i!==null){var k=i.memoizedProps;if(sv(k,f)&&i.ref===s.ref)if(Wn=!1,s.pendingProps=f=k,JS(i,w))(i.flags&131072)!==0&&(Wn=!0);else return s.lanes=i.lanes,lu(i,s,w)}return US(i,s,c,f,w)}function xj(i,s,c,f){var w=f.children,k=i!==null?i.memoizedState:null;if(i===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((s.flags&128)!==0){if(k=k!==null?k.baseLanes|c:c,i!==null){for(f=s.child=i.child,w=0;f!==null;)w=w|f.lanes|f.childLanes,f=f.sibling;f=w&~k}else f=0,s.child=null;return Ej(i,s,k,c,f)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&t5(s,k!==null?k.cachePool:null),k!==null?C_(s,k):xS(),S_(s);else return f=s.lanes=536870912,Ej(i,s,k!==null?k.baseLanes|c:c,c,f)}else k!==null?(t5(s,k.cachePool),C_(s,k),Bc(s),s.memoizedState=null):(i!==null&&t5(s,null),xS(),Bc(s));return Fa(i,s,w,c),s.child}function Ev(i,s){return i!==null&&i.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function Ej(i,s,c,f,w){var k=hS();return k=k===null?null:{parent:Hn._currentValue,pool:k},s.memoizedState={baseLanes:c,cachePool:k},i!==null&&t5(s,null),xS(),S_(s),i!==null&&Gm(i,s,f,!0),s.childLanes=w,null}function v5(i,s){return s=y5({mode:s.mode,children:s.children},i.mode),s.ref=i.ref,i.child=s,s.return=i,s}function kj(i,s,c){return Cp(s,i.child,null,c),i=v5(s,s.pendingProps),i.flags|=2,uo(s),s.memoizedState=null,i}function TZ(i,s,c){var f=s.pendingProps,w=(s.flags&128)!==0;if(s.flags&=-129,i===null){if(dr){if(f.mode==="hidden")return i=v5(s,f),s.lanes=536870912,Ev(null,i);if(kS(s),(i=sn)?(i=PN(i,jo),i=i!==null&&i.data==="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:Ec!==null?{id:il,overflow:ol}:null,retryLane:536870912,hydrationErrors:null},c=o_(i),c.return=s,s.child=c,Ca=s,sn=null)):i=null,i===null)throw Cc(s);return s.lanes=536870912,null}return v5(s,f)}var k=i.memoizedState;if(k!==null){var T=k.dehydrated;if(kS(s),w)if(s.flags&256)s.flags&=-257,s=kj(i,s,c);else if(s.memoizedState!==null)s.child=i.child,s.flags|=128,s=null;else throw Error(a(558));else if(Wn||Gm(i,s,c,!1),w=(c&i.childLanes)!==0,Wn||w){if(f=Gr,f!==null&&(T=Ze(f,c),T!==0&&T!==k.retryLane))throw k.retryLane=T,gp(i,T),_i(f,i,T),WS;D5(),s=kj(i,s,c)}else i=k.treeContext,sn=No(T.nextSibling),Ca=s,dr=!0,kc=null,jo=!1,i!==null&&u_(s,i),s=v5(s,f),s.flags|=4096;return s}return i=ru(i.child,{mode:f.mode,children:f.children}),i.ref=s.ref,s.child=i,i.return=s,i}function b5(i,s){var c=s.ref;if(c===null)i!==null&&i.ref!==null&&(s.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(a(284));(i===null||i.ref!==c)&&(s.flags|=4194816)}}function US(i,s,c,f,w){return wp(s),c=SS(i,s,c,f,void 0,w),f=FS(),i!==null&&!Wn?($S(i,s,w),lu(i,s,w)):(dr&&f&&oS(s),s.flags|=1,Fa(i,s,c,w),s.child)}function Cj(i,s,c,f,w,k){return wp(s),s.updateQueue=null,c=$_(s,f,c,w),F_(i),f=FS(),i!==null&&!Wn?($S(i,s,k),lu(i,s,k)):(dr&&f&&oS(s),s.flags|=1,Fa(i,s,c,k),s.child)}function Sj(i,s,c,f,w){if(wp(s),s.stateNode===null){var k=qm,T=c.contextType;typeof T=="object"&&T!==null&&(k=Sa(T)),k=new c(f,k),s.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,k.updater=HS,s.stateNode=k,k._reactInternals=s,k=s.stateNode,k.props=f,k.state=s.memoizedState,k.refs={},vS(s),T=c.contextType,k.context=typeof T=="object"&&T!==null?Sa(T):qm,k.state=s.memoizedState,T=c.getDerivedStateFromProps,typeof T=="function"&&(LS(s,c,T,f),k.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof k.getSnapshotBeforeUpdate=="function"||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(T=k.state,typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount(),T!==k.state&&HS.enqueueReplaceState(k,k.state,null),vv(s,f,k,w),gv(),k.state=s.memoizedState),typeof k.componentDidMount=="function"&&(s.flags|=4194308),f=!0}else if(i===null){k=s.stateNode;var G=s.memoizedProps,re=Fp(c,G);k.props=re;var fe=k.context,Ee=c.contextType;T=qm,typeof Ee=="object"&&Ee!==null&&(T=Sa(Ee));var Se=c.getDerivedStateFromProps;Ee=typeof Se=="function"||typeof k.getSnapshotBeforeUpdate=="function",G=s.pendingProps!==G,Ee||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(G||fe!==T)&&dj(s,k,f,T),Fc=!1;var ge=s.memoizedState;k.state=ge,vv(s,f,k,w),gv(),fe=s.memoizedState,G||ge!==fe||Fc?(typeof Se=="function"&&(LS(s,c,Se,f),fe=s.memoizedState),(re=Fc||cj(s,c,re,f,ge,fe,T))?(Ee||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(s.flags|=4194308)):(typeof k.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=fe),k.props=f,k.state=fe,k.context=T,f=re):(typeof k.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{k=s.stateNode,bS(i,s),T=s.memoizedProps,Ee=Fp(c,T),k.props=Ee,Se=s.pendingProps,ge=k.context,fe=c.contextType,re=qm,typeof fe=="object"&&fe!==null&&(re=Sa(fe)),G=c.getDerivedStateFromProps,(fe=typeof G=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(T!==Se||ge!==re)&&dj(s,k,f,re),Fc=!1,ge=s.memoizedState,k.state=ge,vv(s,f,k,w),gv();var ve=s.memoizedState;T!==Se||ge!==ve||Fc||i!==null&&i.dependencies!==null&&Zw(i.dependencies)?(typeof G=="function"&&(LS(s,c,G,f),ve=s.memoizedState),(Ee=Fc||cj(s,c,Ee,f,ge,ve,re)||i!==null&&i.dependencies!==null&&Zw(i.dependencies))?(fe||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(f,ve,re),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(f,ve,re)),typeof k.componentDidUpdate=="function"&&(s.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof k.componentDidUpdate!="function"||T===i.memoizedProps&&ge===i.memoizedState||(s.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||T===i.memoizedProps&&ge===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=ve),k.props=f,k.state=ve,k.context=re,f=Ee):(typeof k.componentDidUpdate!="function"||T===i.memoizedProps&&ge===i.memoizedState||(s.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||T===i.memoizedProps&&ge===i.memoizedState||(s.flags|=1024),f=!1)}return k=f,b5(i,s),f=(s.flags&128)!==0,k||f?(k=s.stateNode,c=f&&typeof c.getDerivedStateFromError!="function"?null:k.render(),s.flags|=1,i!==null&&f?(s.child=Cp(s,i.child,null,w),s.child=Cp(s,null,c,w)):Fa(i,s,c,w),s.memoizedState=k.state,i=s.child):i=lu(i,s,w),i}function Fj(i,s,c,f){return bp(),s.flags|=256,Fa(i,s,c,f),s.child}var VS={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function GS(i){return{baseLanes:i,cachePool:h_()}}function KS(i,s,c){return i=i!==null?i.childLanes&~c:0,s&&(i|=po),i}function $j(i,s,c){var f=s.pendingProps,w=!1,k=(s.flags&128)!==0,T;if((T=k)||(T=i!==null&&i.memoizedState===null?!1:(In.current&2)!==0),T&&(w=!0,s.flags&=-129),T=(s.flags&32)!==0,s.flags&=-33,i===null){if(dr){if(w?Ac(s):Bc(s),(i=sn)?(i=PN(i,jo),i=i!==null&&i.data!=="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:Ec!==null?{id:il,overflow:ol}:null,retryLane:536870912,hydrationErrors:null},c=o_(i),c.return=s,s.child=c,Ca=s,sn=null)):i=null,i===null)throw Cc(s);return D8(i)?s.lanes=32:s.lanes=536870912,null}var G=f.children;return f=f.fallback,w?(Bc(s),w=s.mode,G=y5({mode:"hidden",children:G},w),f=vp(f,w,c,null),G.return=s,f.return=s,G.sibling=f,s.child=G,f=s.child,f.memoizedState=GS(c),f.childLanes=KS(i,T,c),s.memoizedState=VS,Ev(null,f)):(Ac(s),XS(s,G))}var re=i.memoizedState;if(re!==null&&(G=re.dehydrated,G!==null)){if(k)s.flags&256?(Ac(s),s.flags&=-257,s=QS(i,s,c)):s.memoizedState!==null?(Bc(s),s.child=i.child,s.flags|=128,s=null):(Bc(s),G=f.fallback,w=s.mode,f=y5({mode:"visible",children:f.children},w),G=vp(G,w,c,null),G.flags|=2,f.return=s,G.return=s,f.sibling=G,s.child=f,Cp(s,i.child,null,c),f=s.child,f.memoizedState=GS(c),f.childLanes=KS(i,T,c),s.memoizedState=VS,s=Ev(null,f));else if(Ac(s),D8(G)){if(T=G.nextSibling&&G.nextSibling.dataset,T)var fe=T.dgst;T=fe,f=Error(a(419)),f.stack="",f.digest=T,cv({value:f,source:null,stack:null}),s=QS(i,s,c)}else if(Wn||Gm(i,s,c,!1),T=(c&i.childLanes)!==0,Wn||T){if(T=Gr,T!==null&&(f=Ze(T,c),f!==0&&f!==re.retryLane))throw re.retryLane=f,gp(i,f),_i(T,i,f),WS;$8(G)||D5(),s=QS(i,s,c)}else $8(G)?(s.flags|=192,s.child=i.child,s=null):(i=re.treeContext,sn=No(G.nextSibling),Ca=s,dr=!0,kc=null,jo=!1,i!==null&&u_(s,i),s=XS(s,f.children),s.flags|=4096);return s}return w?(Bc(s),G=f.fallback,w=s.mode,re=i.child,fe=re.sibling,f=ru(re,{mode:"hidden",children:f.children}),f.subtreeFlags=re.subtreeFlags&65011712,fe!==null?G=ru(fe,G):(G=vp(G,w,c,null),G.flags|=2),G.return=s,f.return=s,f.sibling=G,s.child=f,Ev(null,f),f=s.child,G=i.child.memoizedState,G===null?G=GS(c):(w=G.cachePool,w!==null?(re=Hn._currentValue,w=w.parent!==re?{parent:re,pool:re}:w):w=h_(),G={baseLanes:G.baseLanes|c,cachePool:w}),f.memoizedState=G,f.childLanes=KS(i,T,c),s.memoizedState=VS,Ev(i.child,f)):(Ac(s),c=i.child,i=c.sibling,c=ru(c,{mode:"visible",children:f.children}),c.return=s,c.sibling=null,i!==null&&(T=s.deletions,T===null?(s.deletions=[i],s.flags|=16):T.push(i)),s.child=c,s.memoizedState=null,c)}function XS(i,s){return s=y5({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function y5(i,s){return i=so(22,i,null,s),i.lanes=0,i}function QS(i,s,c){return Cp(s,i.child,null,c),i=XS(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function Dj(i,s,c){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),dS(i.return,s,c)}function YS(i,s,c,f,w,k){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:c,tailMode:w,treeForkCount:k}:(T.isBackwards=s,T.rendering=null,T.renderingStartTime=0,T.last=f,T.tail=c,T.tailMode=w,T.treeForkCount=k)}function Aj(i,s,c){var f=s.pendingProps,w=f.revealOrder,k=f.tail;f=f.children;var T=In.current,G=(T&2)!==0;if(G?(T=T&1|2,s.flags|=128):T&=1,K(In,T),Fa(i,s,f,c),f=dr?uv:0,!G&&i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Dj(i,c,s);else if(i.tag===19)Dj(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(w){case"forwards":for(c=s.child,w=null;c!==null;)i=c.alternate,i!==null&&s5(i)===null&&(w=c),c=c.sibling;c=w,c===null?(w=s.child,s.child=null):(w=c.sibling,c.sibling=null),YS(s,!1,w,c,k,f);break;case"backwards":case"unstable_legacy-backwards":for(c=null,w=s.child,s.child=null;w!==null;){if(i=w.alternate,i!==null&&s5(i)===null){s.child=w;break}i=w.sibling,w.sibling=c,c=w,w=i}YS(s,!0,c,null,k,f);break;case"together":YS(s,!1,null,null,void 0,f);break;default:s.memoizedState=null}return s.child}function lu(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Tc|=s.lanes,(c&s.childLanes)===0)if(i!==null){if(Gm(i,s,c,!1),(c&s.childLanes)===0)return null}else return null;if(i!==null&&s.child!==i.child)throw Error(a(153));if(s.child!==null){for(i=s.child,c=ru(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=ru(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function JS(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&Zw(i)))}function _Z(i,s,c){switch(s.tag){case 3:me(s,s.stateNode.containerInfo),Sc(s,Hn,i.memoizedState.cache),bp();break;case 27:case 5:he(s);break;case 4:me(s,s.stateNode.containerInfo);break;case 10:Sc(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,kS(s),null;break;case 13:var f=s.memoizedState;if(f!==null)return f.dehydrated!==null?(Ac(s),s.flags|=128,null):(c&s.child.childLanes)!==0?$j(i,s,c):(Ac(s),i=lu(i,s,c),i!==null?i.sibling:null);Ac(s);break;case 19:var w=(i.flags&128)!==0;if(f=(c&s.childLanes)!==0,f||(Gm(i,s,c,!1),f=(c&s.childLanes)!==0),w){if(f)return Aj(i,s,c);s.flags|=128}if(w=s.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),K(In,In.current),f)break;return null;case 22:return s.lanes=0,xj(i,s,c,s.pendingProps);case 24:Sc(s,Hn,i.memoizedState.cache)}return lu(i,s,c)}function Bj(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps)Wn=!0;else{if(!JS(i,c)&&(s.flags&128)===0)return Wn=!1,_Z(i,s,c);Wn=(i.flags&131072)!==0}else Wn=!1,dr&&(s.flags&1048576)!==0&&l_(s,uv,s.index);switch(s.lanes=0,s.tag){case 16:e:{var f=s.pendingProps;if(i=Ep(s.elementType),s.type=i,typeof i=="function")nS(i)?(f=Fp(i,f),s.tag=1,s=Sj(null,s,i,f,c)):(s.tag=0,s=US(null,s,i,f,c));else{if(i!=null){var w=i.$$typeof;if(w===C){s.tag=11,s=bj(null,s,i,f,c);break e}else if(w===I){s.tag=14,s=yj(null,s,i,f,c);break e}}throw s=U(i)||i,Error(a(306,s,""))}}return s;case 0:return US(i,s,s.type,s.pendingProps,c);case 1:return f=s.type,w=Fp(f,s.pendingProps),Sj(i,s,f,w,c);case 3:e:{if(me(s,s.stateNode.containerInfo),i===null)throw Error(a(387));f=s.pendingProps;var k=s.memoizedState;w=k.element,bS(i,s),vv(s,f,null,c);var T=s.memoizedState;if(f=T.cache,Sc(s,Hn,f),f!==k.cache&&pS(s,[Hn],c,!0),gv(),f=T.element,k.isDehydrated)if(k={element:f,isDehydrated:!1,cache:T.cache},s.updateQueue.baseState=k,s.memoizedState=k,s.flags&256){s=Fj(i,s,f,c);break e}else if(f!==w){w=Mo(Error(a(424)),s),cv(w),s=Fj(i,s,f,c);break e}else for(i=s.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,sn=No(i.firstChild),Ca=s,dr=!0,kc=null,jo=!0,c=x_(s,null,f,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(bp(),f===w){s=lu(i,s,c);break e}Fa(i,s,f,c)}s=s.child}return s;case 26:return b5(i,s),i===null?(c=qN(s.type,null,s.pendingProps,null))?s.memoizedState=c:dr||(c=s.type,i=s.pendingProps,f=P5(ee.current).createElement(c),f[rr]=s,f[Vr]=i,$a(f,c,i),mr(f),s.stateNode=f):s.memoizedState=qN(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return he(s),i===null&&dr&&(f=s.stateNode=zN(s.type,s.pendingProps,ee.current),Ca=s,jo=!0,w=sn,Rc(s.type)?(A8=w,sn=No(f.firstChild)):sn=w),Fa(i,s,s.pendingProps.children,c),b5(i,s),i===null&&(s.flags|=4194304),s.child;case 5:return i===null&&dr&&((w=f=sn)&&(f=lee(f,s.type,s.pendingProps,jo),f!==null?(s.stateNode=f,Ca=s,sn=No(f.firstChild),jo=!1,w=!0):w=!1),w||Cc(s)),he(s),w=s.type,k=s.pendingProps,T=i!==null?i.memoizedProps:null,f=k.children,C8(w,k)?f=null:T!==null&&C8(w,T)&&(s.flags|=32),s.memoizedState!==null&&(w=SS(i,s,SZ,null,null,c),Pv._currentValue=w),b5(i,s),Fa(i,s,f,c),s.child;case 6:return i===null&&dr&&((i=c=sn)&&(c=uee(c,s.pendingProps,jo),c!==null?(s.stateNode=c,Ca=s,sn=null,i=!0):i=!1),i||Cc(s)),null;case 13:return $j(i,s,c);case 4:return me(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=Cp(s,null,f,c):Fa(i,s,f,c),s.child;case 11:return bj(i,s,s.type,s.pendingProps,c);case 7:return Fa(i,s,s.pendingProps,c),s.child;case 8:return Fa(i,s,s.pendingProps.children,c),s.child;case 12:return Fa(i,s,s.pendingProps.children,c),s.child;case 10:return f=s.pendingProps,Sc(s,s.type,f.value),Fa(i,s,f.children,c),s.child;case 9:return w=s.type._context,f=s.pendingProps.children,wp(s),w=Sa(w),f=f(w),s.flags|=1,Fa(i,s,f,c),s.child;case 14:return yj(i,s,s.type,s.pendingProps,c);case 15:return wj(i,s,s.type,s.pendingProps,c);case 19:return Aj(i,s,c);case 31:return TZ(i,s,c);case 22:return xj(i,s,c,s.pendingProps);case 24:return wp(s),f=Sa(Hn),i===null?(w=hS(),w===null&&(w=Gr,k=fS(),w.pooledCache=k,k.refCount++,k!==null&&(w.pooledCacheLanes|=c),w=k),s.memoizedState={parent:f,cache:w},vS(s),Sc(s,Hn,w)):((i.lanes&c)!==0&&(bS(i,s),vv(s,null,null,c),gv()),w=i.memoizedState,k=s.memoizedState,w.parent!==f?(w={parent:f,cache:f},s.memoizedState=w,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=w),Sc(s,Hn,f)):(f=k.cache,Sc(s,Hn,f),f!==w.cache&&pS(s,[Hn],c,!0))),Fa(i,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(a(156,s.tag))}function uu(i){i.flags|=4}function ZS(i,s,c,f,w){if((s=(i.mode&32)!==0)&&(s=!1),s){if(i.flags|=16777216,(w&335544128)===w)if(i.stateNode.complete)i.flags|=8192;else if(nN())i.flags|=8192;else throw kp=n5,gS}else i.flags&=-16777217}function Ij(i,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!KN(s))if(nN())i.flags|=8192;else throw kp=n5,gS}function w5(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?dt():536870912,i.lanes|=s,ih|=s)}function kv(i,s){if(!dr)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function ln(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,f=0;if(s)for(var w=i.child;w!==null;)c|=w.lanes|w.childLanes,f|=w.subtreeFlags&65011712,f|=w.flags&65011712,w.return=i,w=w.sibling;else for(w=i.child;w!==null;)c|=w.lanes|w.childLanes,f|=w.subtreeFlags,f|=w.flags,w.return=i,w=w.sibling;return i.subtreeFlags|=f,i.childLanes=c,s}function jZ(i,s,c){var f=s.pendingProps;switch(sS(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ln(s),null;case 1:return ln(s),null;case 3:return c=s.stateNode,f=null,i!==null&&(f=i.memoizedState.cache),s.memoizedState.cache!==f&&(s.flags|=2048),iu(Hn),le(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(Vm(s)?uu(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,uS())),ln(s),null;case 26:var w=s.type,k=s.memoizedState;return i===null?(uu(s),k!==null?(ln(s),Ij(s,k)):(ln(s),ZS(s,w,null,f,c))):k?k!==i.memoizedState?(uu(s),ln(s),Ij(s,k)):(ln(s),s.flags&=-16777217):(i=i.memoizedProps,i!==f&&uu(s),ln(s),ZS(s,w,i,f,c)),null;case 27:if(se(s),c=ee.current,w=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==f&&uu(s);else{if(!f){if(s.stateNode===null)throw Error(a(166));return ln(s),null}i=J.current,Vm(s)?c_(s,i):(i=zN(w,f,c),s.stateNode=i,uu(s))}return ln(s),null;case 5:if(se(s),w=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==f&&uu(s);else{if(!f){if(s.stateNode===null)throw Error(a(166));return ln(s),null}if(k=J.current,Vm(s))c_(s,k);else{var T=P5(ee.current);switch(k){case 1:k=T.createElementNS("http://www.w3.org/2000/svg",w);break;case 2:k=T.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;default:switch(w){case"svg":k=T.createElementNS("http://www.w3.org/2000/svg",w);break;case"math":k=T.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;case"script":k=T.createElement("div"),k.innerHTML="<script><\/script>",k=k.removeChild(k.firstChild);break;case"select":k=typeof f.is=="string"?T.createElement("select",{is:f.is}):T.createElement("select"),f.multiple?k.multiple=!0:f.size&&(k.size=f.size);break;default:k=typeof f.is=="string"?T.createElement(w,{is:f.is}):T.createElement(w)}}k[rr]=s,k[Vr]=f;e:for(T=s.child;T!==null;){if(T.tag===5||T.tag===6)k.appendChild(T.stateNode);else if(T.tag!==4&&T.tag!==27&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===s)break e;for(;T.sibling===null;){if(T.return===null||T.return===s)break e;T=T.return}T.sibling.return=T.return,T=T.sibling}s.stateNode=k;e:switch($a(k,w,f),w){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}f&&uu(s)}}return ln(s),ZS(s,s.type,i===null?null:i.memoizedProps,s.pendingProps,c),null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==f&&uu(s);else{if(typeof f!="string"&&s.stateNode===null)throw Error(a(166));if(i=ee.current,Vm(s)){if(i=s.stateNode,c=s.memoizedProps,f=null,w=Ca,w!==null)switch(w.tag){case 27:case 5:f=w.memoizedProps}i[rr]=s,i=!!(i.nodeValue===c||f!==null&&f.suppressHydrationWarning===!0||AN(i.nodeValue,c)),i||Cc(s,!0)}else i=P5(i).createTextNode(f),i[rr]=s,s.stateNode=i}return ln(s),null;case 31:if(c=s.memoizedState,i===null||i.memoizedState!==null){if(f=Vm(s),c!==null){if(i===null){if(!f)throw Error(a(318));if(i=s.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(557));i[rr]=s}else bp(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ln(s),i=!1}else c=uS(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=c),i=!0;if(!i)return s.flags&256?(uo(s),s):(uo(s),null);if((s.flags&128)!==0)throw Error(a(558))}return ln(s),null;case 13:if(f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(w=Vm(s),f!==null&&f.dehydrated!==null){if(i===null){if(!w)throw Error(a(318));if(w=s.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(a(317));w[rr]=s}else bp(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ln(s),w=!1}else w=uS(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=w),w=!0;if(!w)return s.flags&256?(uo(s),s):(uo(s),null)}return uo(s),(s.flags&128)!==0?(s.lanes=c,s):(c=f!==null,i=i!==null&&i.memoizedState!==null,c&&(f=s.child,w=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(w=f.alternate.memoizedState.cachePool.pool),k=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(k=f.memoizedState.cachePool.pool),k!==w&&(f.flags|=2048)),c!==i&&c&&(s.child.flags|=8192),w5(s,s.updateQueue),ln(s),null);case 4:return le(),i===null&&y8(s.stateNode.containerInfo),ln(s),null;case 10:return iu(s.type),ln(s),null;case 19:if(z(In),f=s.memoizedState,f===null)return ln(s),null;if(w=(s.flags&128)!==0,k=f.rendering,k===null)if(w)kv(f,!1);else{if(Sn!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(k=s5(i),k!==null){for(s.flags|=128,kv(f,!1),i=k.updateQueue,s.updateQueue=i,w5(s,i),s.subtreeFlags=0,i=c,c=s.child;c!==null;)i_(c,i),c=c.sibling;return K(In,In.current&1|2),dr&&nu(s,f.treeForkCount),s.child}i=i.sibling}f.tail!==null&&Me()>S5&&(s.flags|=128,w=!0,kv(f,!1),s.lanes=4194304)}else{if(!w)if(i=s5(k),i!==null){if(s.flags|=128,w=!0,i=i.updateQueue,s.updateQueue=i,w5(s,i),kv(f,!0),f.tail===null&&f.tailMode==="hidden"&&!k.alternate&&!dr)return ln(s),null}else 2*Me()-f.renderingStartTime>S5&&c!==536870912&&(s.flags|=128,w=!0,kv(f,!1),s.lanes=4194304);f.isBackwards?(k.sibling=s.child,s.child=k):(i=f.last,i!==null?i.sibling=k:s.child=k,f.last=k)}return f.tail!==null?(i=f.tail,f.rendering=i,f.tail=i.sibling,f.renderingStartTime=Me(),i.sibling=null,c=In.current,K(In,w?c&1|2:c&1),dr&&nu(s,f.treeForkCount),i):(ln(s),null);case 22:case 23:return uo(s),ES(),f=s.memoizedState!==null,i!==null?i.memoizedState!==null!==f&&(s.flags|=8192):f&&(s.flags|=8192),f?(c&536870912)!==0&&(s.flags&128)===0&&(ln(s),s.subtreeFlags&6&&(s.flags|=8192)):ln(s),c=s.updateQueue,c!==null&&w5(s,c.retryQueue),c=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),f=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),f!==c&&(s.flags|=2048),i!==null&&z(xp),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),iu(Hn),ln(s),null;case 25:return null;case 30:return null}throw Error(a(156,s.tag))}function NZ(i,s){switch(sS(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return iu(Hn),le(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return se(s),null;case 31:if(s.memoizedState!==null){if(uo(s),s.alternate===null)throw Error(a(340));bp()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 13:if(uo(s),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(a(340));bp()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return z(In),null;case 4:return le(),null;case 10:return iu(s.type),null;case 22:case 23:return uo(s),ES(),i!==null&&z(xp),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return iu(Hn),null;case 25:return null;default:return null}}function Mj(i,s){switch(sS(s),s.tag){case 3:iu(Hn),le();break;case 26:case 27:case 5:se(s);break;case 4:le();break;case 31:s.memoizedState!==null&&uo(s);break;case 13:uo(s);break;case 19:z(In);break;case 10:iu(s.type);break;case 22:case 23:uo(s),ES(),i!==null&&z(xp);break;case 24:iu(Hn)}}function Cv(i,s){try{var c=s.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var w=f.next;c=w;do{if((c.tag&i)===i){f=void 0;var k=c.create,T=c.inst;f=k(),T.destroy=f}c=c.next}while(c!==w)}}catch(G){jr(s,s.return,G)}}function Ic(i,s,c){try{var f=s.updateQueue,w=f!==null?f.lastEffect:null;if(w!==null){var k=w.next;f=k;do{if((f.tag&i)===i){var T=f.inst,G=T.destroy;if(G!==void 0){T.destroy=void 0,w=s;var re=c,fe=G;try{fe()}catch(Ee){jr(w,re,Ee)}}}f=f.next}while(f!==k)}}catch(Ee){jr(s,s.return,Ee)}}function Tj(i){var s=i.updateQueue;if(s!==null){var c=i.stateNode;try{k_(s,c)}catch(f){jr(i,i.return,f)}}}function _j(i,s,c){c.props=Fp(i.type,i.memoizedProps),c.state=i.memoizedState;try{c.componentWillUnmount()}catch(f){jr(i,s,f)}}function Sv(i,s){try{var c=i.ref;if(c!==null){switch(i.tag){case 26:case 27:case 5:var f=i.stateNode;break;case 30:f=i.stateNode;break;default:f=i.stateNode}typeof c=="function"?i.refCleanup=c(f):c.current=f}}catch(w){jr(i,s,w)}}function sl(i,s){var c=i.ref,f=i.refCleanup;if(c!==null)if(typeof f=="function")try{f()}catch(w){jr(i,s,w)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(w){jr(i,s,w)}else c.current=null}function jj(i){var s=i.type,c=i.memoizedProps,f=i.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&f.focus();break e;case"img":c.src?f.src=c.src:c.srcSet&&(f.srcset=c.srcSet)}}catch(w){jr(i,i.return,w)}}function e8(i,s,c){try{var f=i.stateNode;ree(f,i.type,c,s),f[Vr]=s}catch(w){jr(i,i.return,w)}}function Nj(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Rc(i.type)||i.tag===4}function t8(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Nj(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Rc(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function r8(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(i,s):(s=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,s.appendChild(i),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=eu));else if(f!==4&&(f===27&&Rc(i.type)&&(c=i.stateNode,s=null),i=i.child,i!==null))for(r8(i,s,c),i=i.sibling;i!==null;)r8(i,s,c),i=i.sibling}function x5(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(f!==4&&(f===27&&Rc(i.type)&&(c=i.stateNode),i=i.child,i!==null))for(x5(i,s,c),i=i.sibling;i!==null;)x5(i,s,c),i=i.sibling}function Pj(i){var s=i.stateNode,c=i.memoizedProps;try{for(var f=i.type,w=s.attributes;w.length;)s.removeAttributeNode(w[0]);$a(s,f,c),s[rr]=i,s[Vr]=c}catch(k){jr(i,i.return,k)}}var cu=!1,Un=!1,n8=!1,Rj=typeof WeakSet=="function"?WeakSet:Set,ma=null;function PZ(i,s){if(i=i.containerInfo,E8=W5,i=QT(i),QC(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var w=f.anchorOffset,k=f.focusNode;f=f.focusOffset;try{c.nodeType,k.nodeType}catch{c=null;break e}var T=0,G=-1,re=-1,fe=0,Ee=0,Se=i,ge=null;t:for(;;){for(var ve;Se!==c||w!==0&&Se.nodeType!==3||(G=T+w),Se!==k||f!==0&&Se.nodeType!==3||(re=T+f),Se.nodeType===3&&(T+=Se.nodeValue.length),(ve=Se.firstChild)!==null;)ge=Se,Se=ve;for(;;){if(Se===i)break t;if(ge===c&&++fe===w&&(G=T),ge===k&&++Ee===f&&(re=T),(ve=Se.nextSibling)!==null)break;Se=ge,ge=Se.parentNode}Se=ve}c=G===-1||re===-1?null:{start:G,end:re}}else c=null}c=c||{start:0,end:0}}else c=null;for(k8={focusedElem:i,selectionRange:c},W5=!1,ma=s;ma!==null;)if(s=ma,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,ma=i;else for(;ma!==null;){switch(s=ma,k=s.alternate,i=s.flags,s.tag){case 0:if((i&4)!==0&&(i=s.updateQueue,i=i!==null?i.events:null,i!==null))for(c=0;c<i.length;c++)w=i[c],w.ref.impl=w.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&k!==null){i=void 0,c=s,w=k.memoizedProps,k=k.memoizedState,f=c.stateNode;try{var tt=Fp(c.type,w);i=f.getSnapshotBeforeUpdate(tt,k),f.__reactInternalSnapshotBeforeUpdate=i}catch(kt){jr(c,c.return,kt)}}break;case 3:if((i&1024)!==0){if(i=s.stateNode.containerInfo,c=i.nodeType,c===9)F8(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":F8(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(a(163))}if(i=s.sibling,i!==null){i.return=s.return,ma=i;break}ma=s.return}}function Oj(i,s,c){var f=c.flags;switch(c.tag){case 0:case 11:case 15:pu(i,c),f&4&&Cv(5,c);break;case 1:if(pu(i,c),f&4)if(i=c.stateNode,s===null)try{i.componentDidMount()}catch(T){jr(c,c.return,T)}else{var w=Fp(c.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(w,s,i.__reactInternalSnapshotBeforeUpdate)}catch(T){jr(c,c.return,T)}}f&64&&Tj(c),f&512&&Sv(c,c.return);break;case 3:if(pu(i,c),f&64&&(i=c.updateQueue,i!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=c.child.stateNode;break;case 1:s=c.child.stateNode}try{k_(i,s)}catch(T){jr(c,c.return,T)}}break;case 27:s===null&&f&4&&Pj(c);case 26:case 5:pu(i,c),s===null&&f&4&&jj(c),f&512&&Sv(c,c.return);break;case 12:pu(i,c);break;case 31:pu(i,c),f&4&&Hj(i,c);break;case 13:pu(i,c),f&4&&qj(i,c),f&64&&(i=c.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(c=VZ.bind(null,c),cee(i,c))));break;case 22:if(f=c.memoizedState!==null||cu,!f){s=s!==null&&s.memoizedState!==null||Un,w=cu;var k=Un;cu=f,(Un=s)&&!k?fu(i,c,(c.subtreeFlags&8772)!==0):pu(i,c),cu=w,Un=k}break;case 30:break;default:pu(i,c)}}function zj(i){var s=i.alternate;s!==null&&(i.alternate=null,zj(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&di(s)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var dn=null,Bi=!1;function du(i,s,c){for(c=c.child;c!==null;)Lj(i,s,c),c=c.sibling}function Lj(i,s,c){if(Ke&&typeof Ke.onCommitFiberUnmount=="function")try{Ke.onCommitFiberUnmount(lt,c)}catch{}switch(c.tag){case 26:Un||sl(c,s),du(i,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:Un||sl(c,s);var f=dn,w=Bi;Rc(c.type)&&(dn=c.stateNode,Bi=!1),du(i,s,c),_v(c.stateNode),dn=f,Bi=w;break;case 5:Un||sl(c,s);case 6:if(f=dn,w=Bi,dn=null,du(i,s,c),dn=f,Bi=w,dn!==null)if(Bi)try{(dn.nodeType===9?dn.body:dn.nodeName==="HTML"?dn.ownerDocument.body:dn).removeChild(c.stateNode)}catch(k){jr(c,s,k)}else try{dn.removeChild(c.stateNode)}catch(k){jr(c,s,k)}break;case 18:dn!==null&&(Bi?(i=dn,jN(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,c.stateNode),fh(i)):jN(dn,c.stateNode));break;case 4:f=dn,w=Bi,dn=c.stateNode.containerInfo,Bi=!0,du(i,s,c),dn=f,Bi=w;break;case 0:case 11:case 14:case 15:Ic(2,c,s),Un||Ic(4,c,s),du(i,s,c);break;case 1:Un||(sl(c,s),f=c.stateNode,typeof f.componentWillUnmount=="function"&&_j(c,s,f)),du(i,s,c);break;case 21:du(i,s,c);break;case 22:Un=(f=Un)||c.memoizedState!==null,du(i,s,c),Un=f;break;default:du(i,s,c)}}function Hj(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{fh(i)}catch(c){jr(s,s.return,c)}}}function qj(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{fh(i)}catch(c){jr(s,s.return,c)}}function RZ(i){switch(i.tag){case 31:case 13:case 19:var s=i.stateNode;return s===null&&(s=i.stateNode=new Rj),s;case 22:return i=i.stateNode,s=i._retryCache,s===null&&(s=i._retryCache=new Rj),s;default:throw Error(a(435,i.tag))}}function E5(i,s){var c=RZ(i);s.forEach(function(f){if(!c.has(f)){c.add(f);var w=GZ.bind(null,i,f);f.then(w,w)}})}function Ii(i,s){var c=s.deletions;if(c!==null)for(var f=0;f<c.length;f++){var w=c[f],k=i,T=s,G=T;e:for(;G!==null;){switch(G.tag){case 27:if(Rc(G.type)){dn=G.stateNode,Bi=!1;break e}break;case 5:dn=G.stateNode,Bi=!1;break e;case 3:case 4:dn=G.stateNode.containerInfo,Bi=!0;break e}G=G.return}if(dn===null)throw Error(a(160));Lj(k,T,w),dn=null,Bi=!1,k=w.alternate,k!==null&&(k.return=null),w.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)Wj(s,i),s=s.sibling}var bs=null;function Wj(i,s){var c=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Ii(s,i),Mi(i),f&4&&(Ic(3,i,i.return),Cv(3,i),Ic(5,i,i.return));break;case 1:Ii(s,i),Mi(i),f&512&&(Un||c===null||sl(c,c.return)),f&64&&cu&&(i=i.updateQueue,i!==null&&(f=i.callbacks,f!==null&&(c=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=c===null?f:c.concat(f))));break;case 26:var w=bs;if(Ii(s,i),Mi(i),f&512&&(Un||c===null||sl(c,c.return)),f&4){var k=c!==null?c.memoizedState:null;if(f=i.memoizedState,c===null)if(f===null)if(i.stateNode===null){e:{f=i.type,c=i.memoizedProps,w=w.ownerDocument||w;t:switch(f){case"title":k=w.getElementsByTagName("title")[0],(!k||k[fr]||k[rr]||k.namespaceURI==="http://www.w3.org/2000/svg"||k.hasAttribute("itemprop"))&&(k=w.createElement(f),w.head.insertBefore(k,w.querySelector("head > title"))),$a(k,f,c),k[rr]=i,mr(k),f=k;break e;case"link":var T=VN("link","href",w).get(f+(c.href||""));if(T){for(var G=0;G<T.length;G++)if(k=T[G],k.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&k.getAttribute("rel")===(c.rel==null?null:c.rel)&&k.getAttribute("title")===(c.title==null?null:c.title)&&k.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){T.splice(G,1);break t}}k=w.createElement(f),$a(k,f,c),w.head.appendChild(k);break;case"meta":if(T=VN("meta","content",w).get(f+(c.content||""))){for(G=0;G<T.length;G++)if(k=T[G],k.getAttribute("content")===(c.content==null?null:""+c.content)&&k.getAttribute("name")===(c.name==null?null:c.name)&&k.getAttribute("property")===(c.property==null?null:c.property)&&k.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&k.getAttribute("charset")===(c.charSet==null?null:c.charSet)){T.splice(G,1);break t}}k=w.createElement(f),$a(k,f,c),w.head.appendChild(k);break;default:throw Error(a(468,f))}k[rr]=i,mr(k),f=k}i.stateNode=f}else GN(w,i.type,i.stateNode);else i.stateNode=UN(w,f,i.memoizedProps);else k!==f?(k===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):k.count--,f===null?GN(w,i.type,i.stateNode):UN(w,f,i.memoizedProps)):f===null&&i.stateNode!==null&&e8(i,i.memoizedProps,c.memoizedProps)}break;case 27:Ii(s,i),Mi(i),f&512&&(Un||c===null||sl(c,c.return)),c!==null&&f&4&&e8(i,i.memoizedProps,c.memoizedProps);break;case 5:if(Ii(s,i),Mi(i),f&512&&(Un||c===null||sl(c,c.return)),i.flags&32){w=i.stateNode;try{jm(w,"")}catch(tt){jr(i,i.return,tt)}}f&4&&i.stateNode!=null&&(w=i.memoizedProps,e8(i,w,c!==null?c.memoizedProps:w)),f&1024&&(n8=!0);break;case 6:if(Ii(s,i),Mi(i),f&4){if(i.stateNode===null)throw Error(a(162));f=i.memoizedProps,c=i.stateNode;try{c.nodeValue=f}catch(tt){jr(i,i.return,tt)}}break;case 3:if(z5=null,w=bs,bs=R5(s.containerInfo),Ii(s,i),bs=w,Mi(i),f&4&&c!==null&&c.memoizedState.isDehydrated)try{fh(s.containerInfo)}catch(tt){jr(i,i.return,tt)}n8&&(n8=!1,Uj(i));break;case 4:f=bs,bs=R5(i.stateNode.containerInfo),Ii(s,i),Mi(i),bs=f;break;case 12:Ii(s,i),Mi(i);break;case 31:Ii(s,i),Mi(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,E5(i,f)));break;case 13:Ii(s,i),Mi(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(C5=Me()),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,E5(i,f)));break;case 22:w=i.memoizedState!==null;var re=c!==null&&c.memoizedState!==null,fe=cu,Ee=Un;if(cu=fe||w,Un=Ee||re,Ii(s,i),Un=Ee,cu=fe,Mi(i),f&8192)e:for(s=i.stateNode,s._visibility=w?s._visibility&-2:s._visibility|1,w&&(c===null||re||cu||Un||$p(i)),c=null,s=i;;){if(s.tag===5||s.tag===26){if(c===null){re=c=s;try{if(k=re.stateNode,w)T=k.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none";else{G=re.stateNode;var Se=re.memoizedProps.style,ge=Se!=null&&Se.hasOwnProperty("display")?Se.display:null;G.style.display=ge==null||typeof ge=="boolean"?"":(""+ge).trim()}}catch(tt){jr(re,re.return,tt)}}}else if(s.tag===6){if(c===null){re=s;try{re.stateNode.nodeValue=w?"":re.memoizedProps}catch(tt){jr(re,re.return,tt)}}}else if(s.tag===18){if(c===null){re=s;try{var ve=re.stateNode;w?NN(ve,!0):NN(re.stateNode,!1)}catch(tt){jr(re,re.return,tt)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===i)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}f&4&&(f=i.updateQueue,f!==null&&(c=f.retryQueue,c!==null&&(f.retryQueue=null,E5(i,c))));break;case 19:Ii(s,i),Mi(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,E5(i,f)));break;case 30:break;case 21:break;default:Ii(s,i),Mi(i)}}function Mi(i){var s=i.flags;if(s&2){try{for(var c,f=i.return;f!==null;){if(Nj(f)){c=f;break}f=f.return}if(c==null)throw Error(a(160));switch(c.tag){case 27:var w=c.stateNode,k=t8(i);x5(i,k,w);break;case 5:var T=c.stateNode;c.flags&32&&(jm(T,""),c.flags&=-33);var G=t8(i);x5(i,G,T);break;case 3:case 4:var re=c.stateNode.containerInfo,fe=t8(i);r8(i,fe,re);break;default:throw Error(a(161))}}catch(Ee){jr(i,i.return,Ee)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function Uj(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var s=i;Uj(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),i=i.sibling}}function pu(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Oj(i,s.alternate,s),s=s.sibling}function $p(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:Ic(4,s,s.return),$p(s);break;case 1:sl(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&_j(s,s.return,c),$p(s);break;case 27:_v(s.stateNode);case 26:case 5:sl(s,s.return),$p(s);break;case 22:s.memoizedState===null&&$p(s);break;case 30:$p(s);break;default:$p(s)}i=i.sibling}}function fu(i,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var f=s.alternate,w=i,k=s,T=k.flags;switch(k.tag){case 0:case 11:case 15:fu(w,k,c),Cv(4,k);break;case 1:if(fu(w,k,c),f=k,w=f.stateNode,typeof w.componentDidMount=="function")try{w.componentDidMount()}catch(fe){jr(f,f.return,fe)}if(f=k,w=f.updateQueue,w!==null){var G=f.stateNode;try{var re=w.shared.hiddenCallbacks;if(re!==null)for(w.shared.hiddenCallbacks=null,w=0;w<re.length;w++)E_(re[w],G)}catch(fe){jr(f,f.return,fe)}}c&&T&64&&Tj(k),Sv(k,k.return);break;case 27:Pj(k);case 26:case 5:fu(w,k,c),c&&f===null&&T&4&&jj(k),Sv(k,k.return);break;case 12:fu(w,k,c);break;case 31:fu(w,k,c),c&&T&4&&Hj(w,k);break;case 13:fu(w,k,c),c&&T&4&&qj(w,k);break;case 22:k.memoizedState===null&&fu(w,k,c),Sv(k,k.return);break;case 30:break;default:fu(w,k,c)}s=s.sibling}}function a8(i,s){var c=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==c&&(i!=null&&i.refCount++,c!=null&&dv(c))}function i8(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&dv(i))}function ys(i,s,c,f){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Vj(i,s,c,f),s=s.sibling}function Vj(i,s,c,f){var w=s.flags;switch(s.tag){case 0:case 11:case 15:ys(i,s,c,f),w&2048&&Cv(9,s);break;case 1:ys(i,s,c,f);break;case 3:ys(i,s,c,f),w&2048&&(i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&dv(i)));break;case 12:if(w&2048){ys(i,s,c,f),i=s.stateNode;try{var k=s.memoizedProps,T=k.id,G=k.onPostCommit;typeof G=="function"&&G(T,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(re){jr(s,s.return,re)}}else ys(i,s,c,f);break;case 31:ys(i,s,c,f);break;case 13:ys(i,s,c,f);break;case 23:break;case 22:k=s.stateNode,T=s.alternate,s.memoizedState!==null?k._visibility&2?ys(i,s,c,f):Fv(i,s):k._visibility&2?ys(i,s,c,f):(k._visibility|=2,rh(i,s,c,f,(s.subtreeFlags&10256)!==0||!1)),w&2048&&a8(T,s);break;case 24:ys(i,s,c,f),w&2048&&i8(s.alternate,s);break;default:ys(i,s,c,f)}}function rh(i,s,c,f,w){for(w=w&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var k=i,T=s,G=c,re=f,fe=T.flags;switch(T.tag){case 0:case 11:case 15:rh(k,T,G,re,w),Cv(8,T);break;case 23:break;case 22:var Ee=T.stateNode;T.memoizedState!==null?Ee._visibility&2?rh(k,T,G,re,w):Fv(k,T):(Ee._visibility|=2,rh(k,T,G,re,w)),w&&fe&2048&&a8(T.alternate,T);break;case 24:rh(k,T,G,re,w),w&&fe&2048&&i8(T.alternate,T);break;default:rh(k,T,G,re,w)}s=s.sibling}}function Fv(i,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=i,f=s,w=f.flags;switch(f.tag){case 22:Fv(c,f),w&2048&&a8(f.alternate,f);break;case 24:Fv(c,f),w&2048&&i8(f.alternate,f);break;default:Fv(c,f)}s=s.sibling}}var $v=8192;function nh(i,s,c){if(i.subtreeFlags&$v)for(i=i.child;i!==null;)Gj(i,s,c),i=i.sibling}function Gj(i,s,c){switch(i.tag){case 26:nh(i,s,c),i.flags&$v&&i.memoizedState!==null&&Eee(c,bs,i.memoizedState,i.memoizedProps);break;case 5:nh(i,s,c);break;case 3:case 4:var f=bs;bs=R5(i.stateNode.containerInfo),nh(i,s,c),bs=f;break;case 22:i.memoizedState===null&&(f=i.alternate,f!==null&&f.memoizedState!==null?(f=$v,$v=16777216,nh(i,s,c),$v=f):nh(i,s,c));break;default:nh(i,s,c)}}function Kj(i){var s=i.alternate;if(s!==null&&(i=s.child,i!==null)){s.child=null;do s=i.sibling,i.sibling=null,i=s;while(i!==null)}}function Dv(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var f=s[c];ma=f,Qj(f,i)}Kj(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Xj(i),i=i.sibling}function Xj(i){switch(i.tag){case 0:case 11:case 15:Dv(i),i.flags&2048&&Ic(9,i,i.return);break;case 3:Dv(i);break;case 12:Dv(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&2&&(i.return===null||i.return.tag!==13)?(s._visibility&=-3,k5(i)):Dv(i);break;default:Dv(i)}}function k5(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var f=s[c];ma=f,Qj(f,i)}Kj(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:Ic(8,s,s.return),k5(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,k5(s));break;default:k5(s)}i=i.sibling}}function Qj(i,s){for(;ma!==null;){var c=ma;switch(c.tag){case 0:case 11:case 15:Ic(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var f=c.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:dv(c.memoizedState.cache)}if(f=c.child,f!==null)f.return=c,ma=f;else e:for(c=i;ma!==null;){f=ma;var w=f.sibling,k=f.return;if(zj(f),f===c){ma=null;break e}if(w!==null){w.return=k,ma=w;break e}ma=k}}}var OZ={getCacheForType:function(i){var s=Sa(Hn),c=s.data.get(i);return c===void 0&&(c=i(),s.data.set(i,c)),c},cacheSignal:function(){return Sa(Hn).controller.signal}},zZ=typeof WeakMap=="function"?WeakMap:Map,Cr=0,Gr=null,Jt=null,ar=0,_r=0,co=null,Mc=!1,ah=!1,o8=!1,mu=0,Sn=0,Tc=0,Dp=0,s8=0,po=0,ih=0,Av=null,Ti=null,l8=!1,C5=0,Yj=0,S5=1/0,F5=null,_c=null,ea=0,jc=null,oh=null,hu=0,u8=0,c8=null,Jj=null,Bv=0,d8=null;function fo(){return(Cr&2)!==0&&ar!==0?ar&-ar:H.T!==null?v8():Yt()}function Zj(){if(po===0)if((ar&536870912)===0||dr){var i=Tr;Tr<<=1,(Tr&3932160)===0&&(Tr=262144),po=i}else po=536870912;return i=lo.current,i!==null&&(i.flags|=32),po}function _i(i,s,c){(i===Gr&&(_r===2||_r===9)||i.cancelPendingCommit!==null)&&(sh(i,0),Nc(i,ar,po,!1)),ze(i,c),((Cr&2)===0||i!==Gr)&&(i===Gr&&((Cr&2)===0&&(Dp|=c),Sn===4&&Nc(i,ar,po,!1)),ll(i))}function eN(i,s,c){if((Cr&6)!==0)throw Error(a(327));var f=!c&&(s&127)===0&&(s&i.expiredLanes)===0||$r(i,s),w=f?qZ(i,s):f8(i,s,!0),k=f;do{if(w===0){ah&&!f&&Nc(i,s,0,!1);break}else{if(c=i.current.alternate,k&&!LZ(c)){w=f8(i,s,!1),k=!1;continue}if(w===2){if(k=s,i.errorRecoveryDisabledLanes&k)var T=0;else T=i.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){s=T;e:{var G=i;w=Av;var re=G.current.memoizedState.isDehydrated;if(re&&(sh(G,T).flags|=256),T=f8(G,T,!1),T!==2){if(o8&&!re){G.errorRecoveryDisabledLanes|=k,Dp|=k,w=4;break e}k=Ti,Ti=w,k!==null&&(Ti===null?Ti=k:Ti.push.apply(Ti,k))}w=T}if(k=!1,w!==2)continue}}if(w===1){sh(i,0),Nc(i,s,0,!0);break}e:{switch(f=i,k=w,k){case 0:case 1:throw Error(a(345));case 4:if((s&4194048)!==s)break;case 6:Nc(f,s,po,!Mc);break e;case 2:Ti=null;break;case 3:case 5:break;default:throw Error(a(329))}if((s&62914560)===s&&(w=C5+300-Me(),10<w)){if(Nc(f,s,po,!Mc),cr(f,0,!0)!==0)break e;hu=s,f.timeoutHandle=TN(tN.bind(null,f,c,Ti,F5,l8,s,po,Dp,ih,Mc,k,"Throttled",-0,0),w);break e}tN(f,c,Ti,F5,l8,s,po,Dp,ih,Mc,k,null,-0,0)}}break}while(!0);ll(i)}function tN(i,s,c,f,w,k,T,G,re,fe,Ee,Se,ge,ve){if(i.timeoutHandle=-1,Se=s.subtreeFlags,Se&8192||(Se&16785408)===16785408){Se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:eu},Gj(s,k,Se);var tt=(k&62914560)===k?C5-Me():(k&4194048)===k?Yj-Me():0;if(tt=kee(Se,tt),tt!==null){hu=k,i.cancelPendingCommit=tt(uN.bind(null,i,s,k,c,f,w,T,G,re,Ee,Se,null,ge,ve)),Nc(i,k,T,!fe);return}}uN(i,s,k,c,f,w,T,G,re)}function LZ(i){for(var s=i;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var f=0;f<c.length;f++){var w=c[f],k=w.getSnapshot;w=w.value;try{if(!oo(k(),w))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Nc(i,s,c,f){s&=~s8,s&=~Dp,i.suspendedLanes|=s,i.pingedLanes&=~s,f&&(i.warmLanes|=s),f=i.expirationTimes;for(var w=s;0<w;){var k=31-nt(w),T=1<<k;f[k]=-1,w&=~T}c!==0&&ut(i,c,s)}function $5(){return(Cr&6)===0?(Iv(0,!1),!1):!0}function p8(){if(Jt!==null){if(_r===0)var i=Jt.return;else i=Jt,au=yp=null,DS(i),Ym=null,fv=0,i=Jt;for(;i!==null;)Mj(i.alternate,i),i=i.return;Jt=null}}function sh(i,s){var c=i.timeoutHandle;c!==-1&&(i.timeoutHandle=-1,iee(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),hu=0,p8(),Gr=i,Jt=c=ru(i.current,null),ar=s,_r=0,co=null,Mc=!1,ah=$r(i,s),o8=!1,ih=po=s8=Dp=Tc=Sn=0,Ti=Av=null,l8=!1,(s&8)!==0&&(s|=s&32);var f=i.entangledLanes;if(f!==0)for(i=i.entanglements,f&=s;0<f;){var w=31-nt(f),k=1<<w;s|=i[w],f&=~k}return mu=s,Kw(),c}function rN(i,s){_t=null,H.H=xv,s===Qm||s===r5?(s=b_(),_r=3):s===gS?(s=b_(),_r=4):_r=s===WS?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,co=s,Jt===null&&(Sn=1,g5(i,Mo(s,i.current)))}function nN(){var i=lo.current;return i===null?!0:(ar&4194048)===ar?vs===null:(ar&62914560)===ar||(ar&536870912)!==0?i===vs:!1}function aN(){var i=H.H;return H.H=xv,i===null?xv:i}function iN(){var i=H.A;return H.A=OZ,i}function D5(){Sn=4,Mc||(ar&4194048)!==ar&&lo.current!==null||(ah=!0),(Tc&134217727)===0&&(Dp&134217727)===0||Gr===null||Nc(Gr,ar,po,!1)}function f8(i,s,c){var f=Cr;Cr|=2;var w=aN(),k=iN();(Gr!==i||ar!==s)&&(F5=null,sh(i,s)),s=!1;var T=Sn;e:do try{if(_r!==0&&Jt!==null){var G=Jt,re=co;switch(_r){case 8:p8(),T=6;break e;case 3:case 2:case 9:case 6:lo.current===null&&(s=!0);var fe=_r;if(_r=0,co=null,lh(i,G,re,fe),c&&ah){T=0;break e}break;default:fe=_r,_r=0,co=null,lh(i,G,re,fe)}}HZ(),T=Sn;break}catch(Ee){rN(i,Ee)}while(!0);return s&&i.shellSuspendCounter++,au=yp=null,Cr=f,H.H=w,H.A=k,Jt===null&&(Gr=null,ar=0,Kw()),T}function HZ(){for(;Jt!==null;)oN(Jt)}function qZ(i,s){var c=Cr;Cr|=2;var f=aN(),w=iN();Gr!==i||ar!==s?(F5=null,S5=Me()+500,sh(i,s)):ah=$r(i,s);e:do try{if(_r!==0&&Jt!==null){s=Jt;var k=co;t:switch(_r){case 1:_r=0,co=null,lh(i,s,k,1);break;case 2:case 9:if(g_(k)){_r=0,co=null,sN(s);break}s=function(){_r!==2&&_r!==9||Gr!==i||(_r=7),ll(i)},k.then(s,s);break e;case 3:_r=7;break e;case 4:_r=5;break e;case 7:g_(k)?(_r=0,co=null,sN(s)):(_r=0,co=null,lh(i,s,k,7));break;case 5:var T=null;switch(Jt.tag){case 26:T=Jt.memoizedState;case 5:case 27:var G=Jt;if(T?KN(T):G.stateNode.complete){_r=0,co=null;var re=G.sibling;if(re!==null)Jt=re;else{var fe=G.return;fe!==null?(Jt=fe,A5(fe)):Jt=null}break t}}_r=0,co=null,lh(i,s,k,5);break;case 6:_r=0,co=null,lh(i,s,k,6);break;case 8:p8(),Sn=6;break e;default:throw Error(a(462))}}WZ();break}catch(Ee){rN(i,Ee)}while(!0);return au=yp=null,H.H=f,H.A=w,Cr=c,Jt!==null?0:(Gr=null,ar=0,Kw(),Sn)}function WZ(){for(;Jt!==null&&!He();)oN(Jt)}function oN(i){var s=Bj(i.alternate,i,mu);i.memoizedProps=i.pendingProps,s===null?A5(i):Jt=s}function sN(i){var s=i,c=s.alternate;switch(s.tag){case 15:case 0:s=Cj(c,s,s.pendingProps,s.type,void 0,ar);break;case 11:s=Cj(c,s,s.pendingProps,s.type.render,s.ref,ar);break;case 5:DS(s);default:Mj(c,s),s=Jt=i_(s,mu),s=Bj(c,s,mu)}i.memoizedProps=i.pendingProps,s===null?A5(i):Jt=s}function lh(i,s,c,f){au=yp=null,DS(s),Ym=null,fv=0;var w=s.return;try{if(MZ(i,w,s,c,ar)){Sn=1,g5(i,Mo(c,i.current)),Jt=null;return}}catch(k){if(w!==null)throw Jt=w,k;Sn=1,g5(i,Mo(c,i.current)),Jt=null;return}s.flags&32768?(dr||f===1?i=!0:ah||(ar&536870912)!==0?i=!1:(Mc=i=!0,(f===2||f===9||f===3||f===6)&&(f=lo.current,f!==null&&f.tag===13&&(f.flags|=16384))),lN(s,i)):A5(s)}function A5(i){var s=i;do{if((s.flags&32768)!==0){lN(s,Mc);return}i=s.return;var c=jZ(s.alternate,s,mu);if(c!==null){Jt=c;return}if(s=s.sibling,s!==null){Jt=s;return}Jt=s=i}while(s!==null);Sn===0&&(Sn=5)}function lN(i,s){do{var c=NZ(i.alternate,i);if(c!==null){c.flags&=32767,Jt=c;return}if(c=i.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(i=i.sibling,i!==null)){Jt=i;return}Jt=i=c}while(i!==null);Sn=6,Jt=null}function uN(i,s,c,f,w,k,T,G,re){i.cancelPendingCommit=null;do B5();while(ea!==0);if((Cr&6)!==0)throw Error(a(327));if(s!==null){if(s===i.current)throw Error(a(177));if(k=s.lanes|s.childLanes,k|=tS,Je(i,c,k,T,G,re),i===Gr&&(Jt=Gr=null,ar=0),oh=s,jc=i,hu=c,u8=k,c8=w,Jj=f,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,KZ(Ye,function(){return mN(),null})):(i.callbackNode=null,i.callbackPriority=0),f=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||f){f=H.T,H.T=null,w=V.p,V.p=2,T=Cr,Cr|=4;try{PZ(i,s,c)}finally{Cr=T,V.p=w,H.T=f}}ea=1,cN(),dN(),pN()}}function cN(){if(ea===1){ea=0;var i=jc,s=oh,c=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||c){c=H.T,H.T=null;var f=V.p;V.p=2;var w=Cr;Cr|=4;try{Wj(s,i);var k=k8,T=QT(i.containerInfo),G=k.focusedElem,re=k.selectionRange;if(T!==G&&G&&G.ownerDocument&&XT(G.ownerDocument.documentElement,G)){if(re!==null&&QC(G)){var fe=re.start,Ee=re.end;if(Ee===void 0&&(Ee=fe),"selectionStart"in G)G.selectionStart=fe,G.selectionEnd=Math.min(Ee,G.value.length);else{var Se=G.ownerDocument||document,ge=Se&&Se.defaultView||window;if(ge.getSelection){var ve=ge.getSelection(),tt=G.textContent.length,kt=Math.min(re.start,tt),zr=re.end===void 0?kt:Math.min(re.end,tt);!ve.extend&&kt>zr&&(T=zr,zr=kt,kt=T);var ce=KT(G,kt),oe=KT(G,zr);if(ce&&oe&&(ve.rangeCount!==1||ve.anchorNode!==ce.node||ve.anchorOffset!==ce.offset||ve.focusNode!==oe.node||ve.focusOffset!==oe.offset)){var pe=Se.createRange();pe.setStart(ce.node,ce.offset),ve.removeAllRanges(),kt>zr?(ve.addRange(pe),ve.extend(oe.node,oe.offset)):(pe.setEnd(oe.node,oe.offset),ve.addRange(pe))}}}}for(Se=[],ve=G;ve=ve.parentNode;)ve.nodeType===1&&Se.push({element:ve,left:ve.scrollLeft,top:ve.scrollTop});for(typeof G.focus=="function"&&G.focus(),G=0;G<Se.length;G++){var Ce=Se[G];Ce.element.scrollLeft=Ce.left,Ce.element.scrollTop=Ce.top}}W5=!!E8,k8=E8=null}finally{Cr=w,V.p=f,H.T=c}}i.current=s,ea=2}}function dN(){if(ea===2){ea=0;var i=jc,s=oh,c=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||c){c=H.T,H.T=null;var f=V.p;V.p=2;var w=Cr;Cr|=4;try{Oj(i,s.alternate,s)}finally{Cr=w,V.p=f,H.T=c}}ea=3}}function pN(){if(ea===4||ea===3){ea=0,Oe();var i=jc,s=oh,c=hu,f=Jj;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?ea=5:(ea=0,oh=jc=null,fN(i,i.pendingLanes));var w=i.pendingLanes;if(w===0&&(_c=null),Qt(c),s=s.stateNode,Ke&&typeof Ke.onCommitFiberRoot=="function")try{Ke.onCommitFiberRoot(lt,s,void 0,(s.current.flags&128)===128)}catch{}if(f!==null){s=H.T,w=V.p,V.p=2,H.T=null;try{for(var k=i.onRecoverableError,T=0;T<f.length;T++){var G=f[T];k(G.value,{componentStack:G.stack})}}finally{H.T=s,V.p=w}}(hu&3)!==0&&B5(),ll(i),w=i.pendingLanes,(c&261930)!==0&&(w&42)!==0?i===d8?Bv++:(Bv=0,d8=i):Bv=0,Iv(0,!1)}}function fN(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,dv(s)))}function B5(){return cN(),dN(),pN(),mN()}function mN(){if(ea!==5)return!1;var i=jc,s=u8;u8=0;var c=Qt(hu),f=H.T,w=V.p;try{V.p=32>c?32:c,H.T=null,c=c8,c8=null;var k=jc,T=hu;if(ea=0,oh=jc=null,hu=0,(Cr&6)!==0)throw Error(a(331));var G=Cr;if(Cr|=4,Xj(k.current),Vj(k,k.current,T,c),Cr=G,Iv(0,!1),Ke&&typeof Ke.onPostCommitFiberRoot=="function")try{Ke.onPostCommitFiberRoot(lt,k)}catch{}return!0}finally{V.p=w,H.T=f,fN(i,s)}}function hN(i,s,c){s=Mo(c,s),s=qS(i.stateNode,s,2),i=Dc(i,s,2),i!==null&&(ze(i,2),ll(i))}function jr(i,s,c){if(i.tag===3)hN(i,i,c);else for(;s!==null;){if(s.tag===3){hN(s,i,c);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(_c===null||!_c.has(f))){i=Mo(c,i),c=gj(2),f=Dc(s,c,2),f!==null&&(vj(c,f,s,i),ze(f,2),ll(f));break}}s=s.return}}function m8(i,s,c){var f=i.pingCache;if(f===null){f=i.pingCache=new zZ;var w=new Set;f.set(s,w)}else w=f.get(s),w===void 0&&(w=new Set,f.set(s,w));w.has(c)||(o8=!0,w.add(c),i=UZ.bind(null,i,s,c),s.then(i,i))}function UZ(i,s,c){var f=i.pingCache;f!==null&&f.delete(s),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,Gr===i&&(ar&c)===c&&(Sn===4||Sn===3&&(ar&62914560)===ar&&300>Me()-C5?(Cr&2)===0&&sh(i,0):s8|=c,ih===ar&&(ih=0)),ll(i)}function gN(i,s){s===0&&(s=dt()),i=gp(i,s),i!==null&&(ze(i,s),ll(i))}function VZ(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),gN(i,c)}function GZ(i,s){var c=0;switch(i.tag){case 31:case 13:var f=i.stateNode,w=i.memoizedState;w!==null&&(c=w.retryLane);break;case 19:f=i.stateNode;break;case 22:f=i.stateNode._retryCache;break;default:throw Error(a(314))}f!==null&&f.delete(s),gN(i,c)}function KZ(i,s){return $e(i,s)}var I5=null,uh=null,h8=!1,M5=!1,g8=!1,Pc=0;function ll(i){i!==uh&&i.next===null&&(uh===null?I5=uh=i:uh=uh.next=i),M5=!0,h8||(h8=!0,QZ())}function Iv(i,s){if(!g8&&M5){g8=!0;do for(var c=!1,f=I5;f!==null;){if(!s)if(i!==0){var w=f.pendingLanes;if(w===0)var k=0;else{var T=f.suspendedLanes,G=f.pingedLanes;k=(1<<31-nt(42|i)+1)-1,k&=w&~(T&~G),k=k&201326741?k&201326741|1:k?k|2:0}k!==0&&(c=!0,wN(f,k))}else k=ar,k=cr(f,f===Gr?k:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(k&3)===0||$r(f,k)||(c=!0,wN(f,k));f=f.next}while(c);g8=!1}}function XZ(){vN()}function vN(){M5=h8=!1;var i=0;Pc!==0&&aee()&&(i=Pc);for(var s=Me(),c=null,f=I5;f!==null;){var w=f.next,k=bN(f,s);k===0?(f.next=null,c===null?I5=w:c.next=w,w===null&&(uh=c)):(c=f,(i!==0||(k&3)!==0)&&(M5=!0)),f=w}ea!==0&&ea!==5||Iv(i,!1),Pc!==0&&(Pc=0)}function bN(i,s){for(var c=i.suspendedLanes,f=i.pingedLanes,w=i.expirationTimes,k=i.pendingLanes&-62914561;0<k;){var T=31-nt(k),G=1<<T,re=w[T];re===-1?((G&c)===0||(G&f)!==0)&&(w[T]=Wt(G,s)):re<=s&&(i.expiredLanes|=G),k&=~G}if(s=Gr,c=ar,c=cr(i,i===s?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f=i.callbackNode,c===0||i===s&&(_r===2||_r===9)||i.cancelPendingCommit!==null)return f!==null&&f!==null&&Ie(f),i.callbackNode=null,i.callbackPriority=0;if((c&3)===0||$r(i,c)){if(s=c&-c,s===i.callbackPriority)return s;switch(f!==null&&Ie(f),Qt(c)){case 2:case 8:c=ot;break;case 32:c=Ye;break;case 268435456:c=Ae;break;default:c=Ye}return f=yN.bind(null,i),c=$e(c,f),i.callbackPriority=s,i.callbackNode=c,s}return f!==null&&f!==null&&Ie(f),i.callbackPriority=2,i.callbackNode=null,2}function yN(i,s){if(ea!==0&&ea!==5)return i.callbackNode=null,i.callbackPriority=0,null;var c=i.callbackNode;if(B5()&&i.callbackNode!==c)return null;var f=ar;return f=cr(i,i===Gr?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f===0?null:(eN(i,f,s),bN(i,Me()),i.callbackNode!=null&&i.callbackNode===c?yN.bind(null,i):null)}function wN(i,s){if(B5())return null;eN(i,s,!0)}function QZ(){oee(function(){(Cr&6)!==0?$e(Xe,XZ):vN()})}function v8(){if(Pc===0){var i=Km;i===0&&(i=Xt,Xt<<=1,(Xt&261888)===0&&(Xt=256)),Pc=i}return Pc}function xN(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Ow(""+i)}function EN(i,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,i.id&&c.setAttribute("form",i.id),s.parentNode.insertBefore(c,s),i=new FormData(i),c.parentNode.removeChild(c),i}function YZ(i,s,c,f,w){if(s==="submit"&&c&&c.stateNode===w){var k=xN((w[Vr]||null).action),T=f.submitter;T&&(s=(s=T[Vr]||null)?xN(s.formAction):T.getAttribute("formAction"),s!==null&&(k=s,T=null));var G=new qw("action","action",null,f,w);i.push({event:G,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(Pc!==0){var re=T?EN(w,T):new FormData(w);PS(c,{pending:!0,data:re,method:w.method,action:k},null,re)}}else typeof k=="function"&&(G.preventDefault(),re=T?EN(w,T):new FormData(w),PS(c,{pending:!0,data:re,method:w.method,action:k},k,re))},currentTarget:w}]})}}for(_5=0;_5<eS.length;_5++)T5=eS[_5],kN=T5.toLowerCase(),CN=T5[0].toUpperCase()+T5.slice(1),gs(kN,"on"+CN);var T5,kN,CN,_5;gs(ZT,"onAnimationEnd"),gs(e_,"onAnimationIteration"),gs(t_,"onAnimationStart"),gs("dblclick","onDoubleClick"),gs("focusin","onFocus"),gs("focusout","onBlur"),gs(hZ,"onTransitionRun"),gs(gZ,"onTransitionStart"),gs(vZ,"onTransitionCancel"),gs(r_,"onTransitionEnd"),yt("onMouseEnter",["mouseout","mouseover"]),yt("onMouseLeave",["mouseout","mouseover"]),yt("onPointerEnter",["pointerout","pointerover"]),yt("onPointerLeave",["pointerout","pointerover"]),Ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ea("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mv="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),JZ=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Mv));function SN(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var f=i[c],w=f.event;f=f.listeners;e:{var k=void 0;if(s)for(var T=f.length-1;0<=T;T--){var G=f[T],re=G.instance,fe=G.currentTarget;if(G=G.listener,re!==k&&w.isPropagationStopped())break e;k=G,w.currentTarget=fe;try{k(w)}catch(Ee){Gw(Ee)}w.currentTarget=null,k=re}else for(T=0;T<f.length;T++){if(G=f[T],re=G.instance,fe=G.currentTarget,G=G.listener,re!==k&&w.isPropagationStopped())break e;k=G,w.currentTarget=fe;try{k(w)}catch(Ee){Gw(Ee)}w.currentTarget=null,k=re}}}}function Zt(i,s){var c=s[Rt];c===void 0&&(c=s[Rt]=new Set);var f=i+"__bubble";c.has(f)||(FN(s,i,2,!1),c.add(f))}function b8(i,s,c){var f=0;s&&(f|=4),FN(c,i,f,s)}var j5="_reactListening"+Math.random().toString(36).slice(2);function y8(i){if(!i[j5]){i[j5]=!0,$i.forEach(function(c){c!=="selectionchange"&&(JZ.has(c)||b8(c,!1,i),b8(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[j5]||(s[j5]=!0,b8("selectionchange",!1,s))}}function FN(i,s,c,f){switch(tP(s)){case 2:var w=Fee;break;case 8:w=$ee;break;default:w=_8}c=w.bind(null,s,c,i),w=void 0,!LC||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(w=!0),f?w!==void 0?i.addEventListener(s,c,{capture:!0,passive:w}):i.addEventListener(s,c,!0):w!==void 0?i.addEventListener(s,c,{passive:w}):i.addEventListener(s,c,!1)}function w8(i,s,c,f,w){var k=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var T=f.tag;if(T===3||T===4){var G=f.stateNode.containerInfo;if(G===w)break;if(T===4)for(T=f.return;T!==null;){var re=T.tag;if((re===3||re===4)&&T.stateNode.containerInfo===w)return;T=T.return}for(;G!==null;){if(T=Ga(G),T===null)return;if(re=T.tag,re===5||re===6||re===26||re===27){f=k=T;continue e}G=G.parentNode}}f=f.return}BT(function(){var fe=k,Ee=OC(c),Se=[];e:{var ge=n_.get(i);if(ge!==void 0){var ve=qw,tt=i;switch(i){case"keypress":if(Lw(c)===0)break e;case"keydown":case"keyup":ve=GJ;break;case"focusin":tt="focus",ve=UC;break;case"focusout":tt="blur",ve=UC;break;case"beforeblur":case"afterblur":ve=UC;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ve=TT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=jJ;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=QJ;break;case ZT:case e_:case t_:ve=RJ;break;case r_:ve=JJ;break;case"scroll":case"scrollend":ve=TJ;break;case"wheel":ve=eZ;break;case"copy":case"cut":case"paste":ve=zJ;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=jT;break;case"toggle":case"beforetoggle":ve=rZ}var kt=(s&4)!==0,zr=!kt&&(i==="scroll"||i==="scrollend"),ce=kt?ge!==null?ge+"Capture":null:ge;kt=[];for(var oe=fe,pe;oe!==null;){var Ce=oe;if(pe=Ce.stateNode,Ce=Ce.tag,Ce!==5&&Ce!==26&&Ce!==27||pe===null||ce===null||(Ce=tv(oe,ce),Ce!=null&&kt.push(Tv(oe,Ce,pe))),zr)break;oe=oe.return}0<kt.length&&(ge=new ve(ge,tt,null,c,Ee),Se.push({event:ge,listeners:kt}))}}if((s&7)===0){e:{if(ge=i==="mouseover"||i==="pointerover",ve=i==="mouseout"||i==="pointerout",ge&&c!==RC&&(tt=c.relatedTarget||c.fromElement)&&(Ga(tt)||tt[bt]))break e;if((ve||ge)&&(ge=Ee.window===Ee?Ee:(ge=Ee.ownerDocument)?ge.defaultView||ge.parentWindow:window,ve?(tt=c.relatedTarget||c.toElement,ve=fe,tt=tt?Ga(tt):null,tt!==null&&(zr=l(tt),kt=tt.tag,tt!==zr||kt!==5&&kt!==27&&kt!==6)&&(tt=null)):(ve=null,tt=fe),ve!==tt)){if(kt=TT,Ce="onMouseLeave",ce="onMouseEnter",oe="mouse",(i==="pointerout"||i==="pointerover")&&(kt=jT,Ce="onPointerLeave",ce="onPointerEnter",oe="pointer"),zr=ve==null?ge:Ln(ve),pe=tt==null?ge:Ln(tt),ge=new kt(Ce,oe+"leave",ve,c,Ee),ge.target=zr,ge.relatedTarget=pe,Ce=null,Ga(Ee)===fe&&(kt=new kt(ce,oe+"enter",tt,c,Ee),kt.target=pe,kt.relatedTarget=zr,Ce=kt),zr=Ce,ve&&tt)t:{for(kt=ZZ,ce=ve,oe=tt,pe=0,Ce=ce;Ce;Ce=kt(Ce))pe++;Ce=0;for(var pt=oe;pt;pt=kt(pt))Ce++;for(;0<pe-Ce;)ce=kt(ce),pe--;for(;0<Ce-pe;)oe=kt(oe),Ce--;for(;pe--;){if(ce===oe||oe!==null&&ce===oe.alternate){kt=ce;break t}ce=kt(ce),oe=kt(oe)}kt=null}else kt=null;ve!==null&&$N(Se,ge,ve,kt,!1),tt!==null&&zr!==null&&$N(Se,zr,tt,kt,!0)}}e:{if(ge=fe?Ln(fe):window,ve=ge.nodeName&&ge.nodeName.toLowerCase(),ve==="select"||ve==="input"&&ge.type==="file")var wr=qT;else if(LT(ge))if(WT)wr=pZ;else{wr=cZ;var it=uZ}else ve=ge.nodeName,!ve||ve.toLowerCase()!=="input"||ge.type!=="checkbox"&&ge.type!=="radio"?fe&&PC(fe.elementType)&&(wr=qT):wr=dZ;if(wr&&(wr=wr(i,fe))){HT(Se,wr,c,Ee);break e}it&&it(i,ge,fe),i==="focusout"&&fe&&ge.type==="number"&&fe.memoizedProps.value!=null&&ev(ge,"number",ge.value)}switch(it=fe?Ln(fe):window,i){case"focusin":(LT(it)||it.contentEditable==="true")&&(zm=it,YC=fe,lv=null);break;case"focusout":lv=YC=zm=null;break;case"mousedown":JC=!0;break;case"contextmenu":case"mouseup":case"dragend":JC=!1,YT(Se,c,Ee);break;case"selectionchange":if(mZ)break;case"keydown":case"keyup":YT(Se,c,Ee)}var Ot;if(GC)e:{switch(i){case"compositionstart":var ir="onCompositionStart";break e;case"compositionend":ir="onCompositionEnd";break e;case"compositionupdate":ir="onCompositionUpdate";break e}ir=void 0}else Om?OT(i,c)&&(ir="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(ir="onCompositionStart");ir&&(NT&&c.locale!=="ko"&&(Om||ir!=="onCompositionStart"?ir==="onCompositionEnd"&&Om&&(Ot=IT()):(xc=Ee,HC="value"in xc?xc.value:xc.textContent,Om=!0)),it=N5(fe,ir),0<it.length&&(ir=new _T(ir,i,null,c,Ee),Se.push({event:ir,listeners:it}),Ot?ir.data=Ot:(Ot=zT(c),Ot!==null&&(ir.data=Ot)))),(Ot=aZ?iZ(i,c):oZ(i,c))&&(ir=N5(fe,"onBeforeInput"),0<ir.length&&(it=new _T("onBeforeInput","beforeinput",null,c,Ee),Se.push({event:it,listeners:ir}),it.data=Ot)),YZ(Se,i,fe,c,Ee)}SN(Se,s)})}function Tv(i,s,c){return{instance:i,listener:s,currentTarget:c}}function N5(i,s){for(var c=s+"Capture",f=[];i!==null;){var w=i,k=w.stateNode;if(w=w.tag,w!==5&&w!==26&&w!==27||k===null||(w=tv(i,c),w!=null&&f.unshift(Tv(i,w,k)),w=tv(i,s),w!=null&&f.push(Tv(i,w,k))),i.tag===3)return f;i=i.return}return[]}function ZZ(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function $N(i,s,c,f,w){for(var k=s._reactName,T=[];c!==null&&c!==f;){var G=c,re=G.alternate,fe=G.stateNode;if(G=G.tag,re!==null&&re===f)break;G!==5&&G!==26&&G!==27||fe===null||(re=fe,w?(fe=tv(c,k),fe!=null&&T.unshift(Tv(c,fe,re))):w||(fe=tv(c,k),fe!=null&&T.push(Tv(c,fe,re)))),c=c.return}T.length!==0&&i.push({event:s,listeners:T})}var eee=/\r\n?/g,tee=/\u0000|\uFFFD/g;function DN(i){return(typeof i=="string"?i:""+i).replace(eee,`
11
+ `).replace(tee,"")}function AN(i,s){return s=DN(s),DN(i)===s}function Or(i,s,c,f,w,k){switch(c){case"children":typeof f=="string"?s==="body"||s==="textarea"&&f===""||jm(i,f):(typeof f=="number"||typeof f=="bigint")&&s!=="body"&&jm(i,""+f);break;case"className":al(i,"class",f);break;case"tabIndex":al(i,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":al(i,c,f);break;case"style":DT(i,f,k);break;case"data":if(s!=="object"){al(i,"data",f);break}case"src":case"href":if(f===""&&(s!=="a"||c!=="href")){i.removeAttribute(c);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(c);break}f=Ow(""+f),i.setAttribute(c,f);break;case"action":case"formAction":if(typeof f=="function"){i.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof k=="function"&&(c==="formAction"?(s!=="input"&&Or(i,s,"name",w.name,w,null),Or(i,s,"formEncType",w.formEncType,w,null),Or(i,s,"formMethod",w.formMethod,w,null),Or(i,s,"formTarget",w.formTarget,w,null)):(Or(i,s,"encType",w.encType,w,null),Or(i,s,"method",w.method,w,null),Or(i,s,"target",w.target,w,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(c);break}f=Ow(""+f),i.setAttribute(c,f);break;case"onClick":f!=null&&(i.onclick=eu);break;case"onScroll":f!=null&&Zt("scroll",i);break;case"onScrollEnd":f!=null&&Zt("scrollend",i);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(a(61));if(c=f.__html,c!=null){if(w.children!=null)throw Error(a(60));i.innerHTML=c}}break;case"multiple":i.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":i.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){i.removeAttribute("xlink:href");break}c=Ow(""+f),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,""+f):i.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":f&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,""):i.removeAttribute(c);break;case"capture":case"download":f===!0?i.setAttribute(c,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,f):i.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?i.setAttribute(c,f):i.removeAttribute(c);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?i.removeAttribute(c):i.setAttribute(c,f);break;case"popover":Zt("beforetoggle",i),Zt("toggle",i),hs(i,"popover",f);break;case"xlinkActuate":Di(i,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":Di(i,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":Di(i,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":Di(i,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":Di(i,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":Di(i,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":Di(i,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":Di(i,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":Di(i,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":hs(i,"is",f);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=IJ.get(c)||c,hs(i,c,f))}}function x8(i,s,c,f,w,k){switch(c){case"style":DT(i,f,k);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(a(61));if(c=f.__html,c!=null){if(w.children!=null)throw Error(a(60));i.innerHTML=c}}break;case"children":typeof f=="string"?jm(i,f):(typeof f=="number"||typeof f=="bigint")&&jm(i,""+f);break;case"onScroll":f!=null&&Zt("scroll",i);break;case"onScrollEnd":f!=null&&Zt("scrollend",i);break;case"onClick":f!=null&&(i.onclick=eu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ao.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(w=c.endsWith("Capture"),s=c.slice(2,w?c.length-7:void 0),k=i[Vr]||null,k=k!=null?k[c]:null,typeof k=="function"&&i.removeEventListener(s,k,w),typeof f=="function")){typeof k!="function"&&k!==null&&(c in i?i[c]=null:i.hasAttribute(c)&&i.removeAttribute(c)),i.addEventListener(s,f,w);break e}c in i?i[c]=f:f===!0?i.setAttribute(c,""):hs(i,c,f)}}}function $a(i,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Zt("error",i),Zt("load",i);var f=!1,w=!1,k;for(k in c)if(c.hasOwnProperty(k)){var T=c[k];if(T!=null)switch(k){case"src":f=!0;break;case"srcSet":w=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Or(i,s,k,T,c,null)}}w&&Or(i,s,"srcSet",c.srcSet,c,null),f&&Or(i,s,"src",c.src,c,null);return;case"input":Zt("invalid",i);var G=k=T=w=null,re=null,fe=null;for(f in c)if(c.hasOwnProperty(f)){var Ee=c[f];if(Ee!=null)switch(f){case"name":w=Ee;break;case"type":T=Ee;break;case"checked":re=Ee;break;case"defaultChecked":fe=Ee;break;case"value":k=Ee;break;case"defaultValue":G=Ee;break;case"children":case"dangerouslySetInnerHTML":if(Ee!=null)throw Error(a(137,s));break;default:Or(i,s,f,Ee,c,null)}}Zg(i,k,G,re,fe,T,w,!1);return;case"select":Zt("invalid",i),f=T=k=null;for(w in c)if(c.hasOwnProperty(w)&&(G=c[w],G!=null))switch(w){case"value":k=G;break;case"defaultValue":T=G;break;case"multiple":f=G;default:Or(i,s,w,G,c,null)}s=k,c=T,i.multiple=!!f,s!=null?_m(i,!!f,s,!1):c!=null&&_m(i,!!f,c,!0);return;case"textarea":Zt("invalid",i),k=w=f=null;for(T in c)if(c.hasOwnProperty(T)&&(G=c[T],G!=null))switch(T){case"value":f=G;break;case"defaultValue":w=G;break;case"children":k=G;break;case"dangerouslySetInnerHTML":if(G!=null)throw Error(a(91));break;default:Or(i,s,T,G,c,null)}FT(i,f,w,k);return;case"option":for(re in c)c.hasOwnProperty(re)&&(f=c[re],f!=null)&&(re==="selected"?i.selected=f&&typeof f!="function"&&typeof f!="symbol":Or(i,s,re,f,c,null));return;case"dialog":Zt("beforetoggle",i),Zt("toggle",i),Zt("cancel",i),Zt("close",i);break;case"iframe":case"object":Zt("load",i);break;case"video":case"audio":for(f=0;f<Mv.length;f++)Zt(Mv[f],i);break;case"image":Zt("error",i),Zt("load",i);break;case"details":Zt("toggle",i);break;case"embed":case"source":case"link":Zt("error",i),Zt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(fe in c)if(c.hasOwnProperty(fe)&&(f=c[fe],f!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Or(i,s,fe,f,c,null)}return;default:if(PC(s)){for(Ee in c)c.hasOwnProperty(Ee)&&(f=c[Ee],f!==void 0&&x8(i,s,Ee,f,c,void 0));return}}for(G in c)c.hasOwnProperty(G)&&(f=c[G],f!=null&&Or(i,s,G,f,c,null))}function ree(i,s,c,f){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var w=null,k=null,T=null,G=null,re=null,fe=null,Ee=null;for(ve in c){var Se=c[ve];if(c.hasOwnProperty(ve)&&Se!=null)switch(ve){case"checked":break;case"value":break;case"defaultValue":re=Se;default:f.hasOwnProperty(ve)||Or(i,s,ve,null,f,Se)}}for(var ge in f){var ve=f[ge];if(Se=c[ge],f.hasOwnProperty(ge)&&(ve!=null||Se!=null))switch(ge){case"type":k=ve;break;case"name":w=ve;break;case"checked":fe=ve;break;case"defaultChecked":Ee=ve;break;case"value":T=ve;break;case"defaultValue":G=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(a(137,s));break;default:ve!==Se&&Or(i,s,ge,ve,f,Se)}}Tm(i,T,G,re,fe,Ee,k,w);return;case"select":ve=T=G=ge=null;for(k in c)if(re=c[k],c.hasOwnProperty(k)&&re!=null)switch(k){case"value":break;case"multiple":ve=re;default:f.hasOwnProperty(k)||Or(i,s,k,null,f,re)}for(w in f)if(k=f[w],re=c[w],f.hasOwnProperty(w)&&(k!=null||re!=null))switch(w){case"value":ge=k;break;case"defaultValue":G=k;break;case"multiple":T=k;default:k!==re&&Or(i,s,w,k,f,re)}s=G,c=T,f=ve,ge!=null?_m(i,!!c,ge,!1):!!f!=!!c&&(s!=null?_m(i,!!c,s,!0):_m(i,!!c,c?[]:"",!1));return;case"textarea":ve=ge=null;for(G in c)if(w=c[G],c.hasOwnProperty(G)&&w!=null&&!f.hasOwnProperty(G))switch(G){case"value":break;case"children":break;default:Or(i,s,G,null,f,w)}for(T in f)if(w=f[T],k=c[T],f.hasOwnProperty(T)&&(w!=null||k!=null))switch(T){case"value":ge=w;break;case"defaultValue":ve=w;break;case"children":break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(a(91));break;default:w!==k&&Or(i,s,T,w,f,k)}ST(i,ge,ve);return;case"option":for(var tt in c)ge=c[tt],c.hasOwnProperty(tt)&&ge!=null&&!f.hasOwnProperty(tt)&&(tt==="selected"?i.selected=!1:Or(i,s,tt,null,f,ge));for(re in f)ge=f[re],ve=c[re],f.hasOwnProperty(re)&&ge!==ve&&(ge!=null||ve!=null)&&(re==="selected"?i.selected=ge&&typeof ge!="function"&&typeof ge!="symbol":Or(i,s,re,ge,f,ve));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var kt in c)ge=c[kt],c.hasOwnProperty(kt)&&ge!=null&&!f.hasOwnProperty(kt)&&Or(i,s,kt,null,f,ge);for(fe in f)if(ge=f[fe],ve=c[fe],f.hasOwnProperty(fe)&&ge!==ve&&(ge!=null||ve!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(a(137,s));break;default:Or(i,s,fe,ge,f,ve)}return;default:if(PC(s)){for(var zr in c)ge=c[zr],c.hasOwnProperty(zr)&&ge!==void 0&&!f.hasOwnProperty(zr)&&x8(i,s,zr,void 0,f,ge);for(Ee in f)ge=f[Ee],ve=c[Ee],!f.hasOwnProperty(Ee)||ge===ve||ge===void 0&&ve===void 0||x8(i,s,Ee,ge,f,ve);return}}for(var ce in c)ge=c[ce],c.hasOwnProperty(ce)&&ge!=null&&!f.hasOwnProperty(ce)&&Or(i,s,ce,null,f,ge);for(Se in f)ge=f[Se],ve=c[Se],!f.hasOwnProperty(Se)||ge===ve||ge==null&&ve==null||Or(i,s,Se,ge,f,ve)}function BN(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function nee(){if(typeof performance.getEntriesByType=="function"){for(var i=0,s=0,c=performance.getEntriesByType("resource"),f=0;f<c.length;f++){var w=c[f],k=w.transferSize,T=w.initiatorType,G=w.duration;if(k&&G&&BN(T)){for(T=0,G=w.responseEnd,f+=1;f<c.length;f++){var re=c[f],fe=re.startTime;if(fe>G)break;var Ee=re.transferSize,Se=re.initiatorType;Ee&&BN(Se)&&(re=re.responseEnd,T+=Ee*(re<G?1:(G-fe)/(re-fe)))}if(--f,s+=8*(k+T)/(w.duration/1e3),i++,10<i)break}}if(0<i)return s/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var E8=null,k8=null;function P5(i){return i.nodeType===9?i:i.ownerDocument}function IN(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function MN(i,s){if(i===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&s==="foreignObject"?0:i}function C8(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var S8=null;function aee(){var i=window.event;return i&&i.type==="popstate"?i===S8?!1:(S8=i,!0):(S8=null,!1)}var TN=typeof setTimeout=="function"?setTimeout:void 0,iee=typeof clearTimeout=="function"?clearTimeout:void 0,_N=typeof Promise=="function"?Promise:void 0,oee=typeof queueMicrotask=="function"?queueMicrotask:typeof _N<"u"?function(i){return _N.resolve(null).then(i).catch(see)}:TN;function see(i){setTimeout(function(){throw i})}function Rc(i){return i==="head"}function jN(i,s){var c=s,f=0;do{var w=c.nextSibling;if(i.removeChild(c),w&&w.nodeType===8)if(c=w.data,c==="/$"||c==="/&"){if(f===0){i.removeChild(w),fh(s);return}f--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")f++;else if(c==="html")_v(i.ownerDocument.documentElement);else if(c==="head"){c=i.ownerDocument.head,_v(c);for(var k=c.firstChild;k;){var T=k.nextSibling,G=k.nodeName;k[fr]||G==="SCRIPT"||G==="STYLE"||G==="LINK"&&k.rel.toLowerCase()==="stylesheet"||c.removeChild(k),k=T}}else c==="body"&&_v(i.ownerDocument.body);c=w}while(c);fh(s)}function NN(i,s){var c=i;i=0;do{var f=c.nextSibling;if(c.nodeType===1?s?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(s?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),f&&f.nodeType===8)if(c=f.data,c==="/$"){if(i===0)break;i--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||i++;c=f}while(c)}function F8(i){var s=i.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":F8(c),di(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function lee(i,s,c,f){for(;i.nodeType===1;){var w=c;if(i.nodeName.toLowerCase()!==s.toLowerCase()){if(!f&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(f){if(!i[fr])switch(s){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(k=i.getAttribute("rel"),k==="stylesheet"&&i.hasAttribute("data-precedence")||k!==w.rel||i.getAttribute("href")!==(w.href==null||w.href===""?null:w.href)||i.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin)||i.getAttribute("title")!==(w.title==null?null:w.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(k=i.getAttribute("src"),(k!==(w.src==null?null:w.src)||i.getAttribute("type")!==(w.type==null?null:w.type)||i.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin))&&k&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(s==="input"&&i.type==="hidden"){var k=w.name==null?null:""+w.name;if(w.type==="hidden"&&i.getAttribute("name")===k)return i}else return i;if(i=No(i.nextSibling),i===null)break}return null}function uee(i,s,c){if(s==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=No(i.nextSibling),i===null))return null;return i}function PN(i,s){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!s||(i=No(i.nextSibling),i===null))return null;return i}function $8(i){return i.data==="$?"||i.data==="$~"}function D8(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function cee(i,s){var c=i.ownerDocument;if(i.data==="$~")i._reactRetry=s;else if(i.data!=="$?"||c.readyState!=="loading")s();else{var f=function(){s(),c.removeEventListener("DOMContentLoaded",f)};c.addEventListener("DOMContentLoaded",f),i._reactRetry=f}}function No(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return i}var A8=null;function RN(i){i=i.nextSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"||c==="/&"){if(s===0)return No(i.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}i=i.nextSibling}return null}function ON(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(s===0)return i;s--}else c!=="/$"&&c!=="/&"||s++}i=i.previousSibling}return null}function zN(i,s,c){switch(s=P5(c),i){case"html":if(i=s.documentElement,!i)throw Error(a(452));return i;case"head":if(i=s.head,!i)throw Error(a(453));return i;case"body":if(i=s.body,!i)throw Error(a(454));return i;default:throw Error(a(451))}}function _v(i){for(var s=i.attributes;s.length;)i.removeAttributeNode(s[0]);di(i)}var Po=new Map,LN=new Set;function R5(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var gu=V.d;V.d={f:dee,r:pee,D:fee,C:mee,L:hee,m:gee,X:bee,S:vee,M:yee};function dee(){var i=gu.f(),s=$5();return i||s}function pee(i){var s=Dr(i);s!==null&&s.tag===5&&s.type==="form"?rj(s):gu.r(i)}var ch=typeof document>"u"?null:document;function HN(i,s,c){var f=ch;if(f&&typeof s=="string"&&s){var w=io(s);w='link[rel="'+i+'"][href="'+w+'"]',typeof c=="string"&&(w+='[crossorigin="'+c+'"]'),LN.has(w)||(LN.add(w),i={rel:i,crossOrigin:c,href:s},f.querySelector(w)===null&&(s=f.createElement("link"),$a(s,"link",i),mr(s),f.head.appendChild(s)))}}function fee(i){gu.D(i),HN("dns-prefetch",i,null)}function mee(i,s){gu.C(i,s),HN("preconnect",i,s)}function hee(i,s,c){gu.L(i,s,c);var f=ch;if(f&&i&&s){var w='link[rel="preload"][as="'+io(s)+'"]';s==="image"&&c&&c.imageSrcSet?(w+='[imagesrcset="'+io(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(w+='[imagesizes="'+io(c.imageSizes)+'"]')):w+='[href="'+io(i)+'"]';var k=w;switch(s){case"style":k=dh(i);break;case"script":k=ph(i)}Po.has(k)||(i=g({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:i,as:s},c),Po.set(k,i),f.querySelector(w)!==null||s==="style"&&f.querySelector(jv(k))||s==="script"&&f.querySelector(Nv(k))||(s=f.createElement("link"),$a(s,"link",i),mr(s),f.head.appendChild(s)))}}function gee(i,s){gu.m(i,s);var c=ch;if(c&&i){var f=s&&typeof s.as=="string"?s.as:"script",w='link[rel="modulepreload"][as="'+io(f)+'"][href="'+io(i)+'"]',k=w;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":k=ph(i)}if(!Po.has(k)&&(i=g({rel:"modulepreload",href:i},s),Po.set(k,i),c.querySelector(w)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(Nv(k)))return}f=c.createElement("link"),$a(f,"link",i),mr(f),c.head.appendChild(f)}}}function vee(i,s,c){gu.S(i,s,c);var f=ch;if(f&&i){var w=xa(f).hoistableStyles,k=dh(i);s=s||"default";var T=w.get(k);if(!T){var G={loading:0,preload:null};if(T=f.querySelector(jv(k)))G.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":s},c),(c=Po.get(k))&&B8(i,c);var re=T=f.createElement("link");mr(re),$a(re,"link",i),re._p=new Promise(function(fe,Ee){re.onload=fe,re.onerror=Ee}),re.addEventListener("load",function(){G.loading|=1}),re.addEventListener("error",function(){G.loading|=2}),G.loading|=4,O5(T,s,f)}T={type:"stylesheet",instance:T,count:1,state:G},w.set(k,T)}}}function bee(i,s){gu.X(i,s);var c=ch;if(c&&i){var f=xa(c).hoistableScripts,w=ph(i),k=f.get(w);k||(k=c.querySelector(Nv(w)),k||(i=g({src:i,async:!0},s),(s=Po.get(w))&&I8(i,s),k=c.createElement("script"),mr(k),$a(k,"link",i),c.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},f.set(w,k))}}function yee(i,s){gu.M(i,s);var c=ch;if(c&&i){var f=xa(c).hoistableScripts,w=ph(i),k=f.get(w);k||(k=c.querySelector(Nv(w)),k||(i=g({src:i,async:!0,type:"module"},s),(s=Po.get(w))&&I8(i,s),k=c.createElement("script"),mr(k),$a(k,"link",i),c.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},f.set(w,k))}}function qN(i,s,c,f){var w=(w=ee.current)?R5(w):null;if(!w)throw Error(a(446));switch(i){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=dh(c.href),c=xa(w).hoistableStyles,f=c.get(s),f||(f={type:"style",instance:null,count:0,state:null},c.set(s,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){i=dh(c.href);var k=xa(w).hoistableStyles,T=k.get(i);if(T||(w=w.ownerDocument||w,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},k.set(i,T),(k=w.querySelector(jv(i)))&&!k._p&&(T.instance=k,T.state.loading=5),Po.has(i)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},Po.set(i,c),k||wee(w,i,c,T.state))),s&&f===null)throw Error(a(528,""));return T}if(s&&f!==null)throw Error(a(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=ph(c),c=xa(w).hoistableScripts,f=c.get(s),f||(f={type:"script",instance:null,count:0,state:null},c.set(s,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,i))}}function dh(i){return'href="'+io(i)+'"'}function jv(i){return'link[rel="stylesheet"]['+i+"]"}function WN(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function wee(i,s,c,f){i.querySelector('link[rel="preload"][as="style"]['+s+"]")?f.loading=1:(s=i.createElement("link"),f.preload=s,s.addEventListener("load",function(){return f.loading|=1}),s.addEventListener("error",function(){return f.loading|=2}),$a(s,"link",c),mr(s),i.head.appendChild(s))}function ph(i){return'[src="'+io(i)+'"]'}function Nv(i){return"script[async]"+i}function UN(i,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var f=i.querySelector('style[data-href~="'+io(c.href)+'"]');if(f)return s.instance=f,mr(f),f;var w=g({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return f=(i.ownerDocument||i).createElement("style"),mr(f),$a(f,"style",w),O5(f,c.precedence,i),s.instance=f;case"stylesheet":w=dh(c.href);var k=i.querySelector(jv(w));if(k)return s.state.loading|=4,s.instance=k,mr(k),k;f=WN(c),(w=Po.get(w))&&B8(f,w),k=(i.ownerDocument||i).createElement("link"),mr(k);var T=k;return T._p=new Promise(function(G,re){T.onload=G,T.onerror=re}),$a(k,"link",f),s.state.loading|=4,O5(k,c.precedence,i),s.instance=k;case"script":return k=ph(c.src),(w=i.querySelector(Nv(k)))?(s.instance=w,mr(w),w):(f=c,(w=Po.get(k))&&(f=g({},c),I8(f,w)),i=i.ownerDocument||i,w=i.createElement("script"),mr(w),$a(w,"link",f),i.head.appendChild(w),s.instance=w);case"void":return null;default:throw Error(a(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(f=s.instance,s.state.loading|=4,O5(f,c.precedence,i));return s.instance}function O5(i,s,c){for(var f=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),w=f.length?f[f.length-1]:null,k=w,T=0;T<f.length;T++){var G=f[T];if(G.dataset.precedence===s)k=G;else if(k!==w)break}k?k.parentNode.insertBefore(i,k.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(i,s.firstChild))}function B8(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function I8(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var z5=null;function VN(i,s,c){if(z5===null){var f=new Map,w=z5=new Map;w.set(c,f)}else w=z5,f=w.get(c),f||(f=new Map,w.set(c,f));if(f.has(i))return f;for(f.set(i,null),c=c.getElementsByTagName(i),w=0;w<c.length;w++){var k=c[w];if(!(k[fr]||k[rr]||i==="link"&&k.getAttribute("rel")==="stylesheet")&&k.namespaceURI!=="http://www.w3.org/2000/svg"){var T=k.getAttribute(s)||"";T=i+T;var G=f.get(T);G?G.push(k):f.set(T,[k])}}return f}function GN(i,s,c){i=i.ownerDocument||i,i.head.insertBefore(c,s==="title"?i.querySelector("head > title"):null)}function xee(i,s,c){if(c===1||s.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(i=s.disabled,typeof s.precedence=="string"&&i==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function KN(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function Eee(i,s,c,f){if(c.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var w=dh(f.href),k=s.querySelector(jv(w));if(k){s=k._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(i.count++,i=L5.bind(i),s.then(i,i)),c.state.loading|=4,c.instance=k,mr(k);return}k=s.ownerDocument||s,f=WN(f),(w=Po.get(w))&&B8(f,w),k=k.createElement("link"),mr(k);var T=k;T._p=new Promise(function(G,re){T.onload=G,T.onerror=re}),$a(k,"link",f),c.instance=k}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(c,s),(s=c.state.preload)&&(c.state.loading&3)===0&&(i.count++,c=L5.bind(i),s.addEventListener("load",c),s.addEventListener("error",c))}}var M8=0;function kee(i,s){return i.stylesheets&&i.count===0&&q5(i,i.stylesheets),0<i.count||0<i.imgCount?function(c){var f=setTimeout(function(){if(i.stylesheets&&q5(i,i.stylesheets),i.unsuspend){var k=i.unsuspend;i.unsuspend=null,k()}},6e4+s);0<i.imgBytes&&M8===0&&(M8=62500*nee());var w=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&q5(i,i.stylesheets),i.unsuspend)){var k=i.unsuspend;i.unsuspend=null,k()}},(i.imgBytes>M8?50:800)+s);return i.unsuspend=c,function(){i.unsuspend=null,clearTimeout(f),clearTimeout(w)}}:null}function L5(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)q5(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var H5=null;function q5(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,H5=new Map,s.forEach(Cee,i),H5=null,L5.call(i))}function Cee(i,s){if(!(s.state.loading&4)){var c=H5.get(i);if(c)var f=c.get(null);else{c=new Map,H5.set(i,c);for(var w=i.querySelectorAll("link[data-precedence],style[data-precedence]"),k=0;k<w.length;k++){var T=w[k];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(c.set(T.dataset.precedence,T),f=T)}f&&c.set(null,f)}w=s.instance,T=w.getAttribute("data-precedence"),k=c.get(T)||f,k===f&&c.set(null,w),c.set(T,w),this.count++,f=L5.bind(this),w.addEventListener("load",f),w.addEventListener("error",f),k?k.parentNode.insertBefore(w,k.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(w,i.firstChild)),s.state.loading|=4}}var Pv={$$typeof:$,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function See(i,s,c,f,w,k,T,G,re){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=St(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=St(0),this.hiddenUpdates=St(null),this.identifierPrefix=f,this.onUncaughtError=w,this.onCaughtError=k,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=re,this.incompleteTransitions=new Map}function XN(i,s,c,f,w,k,T,G,re,fe,Ee,Se){return i=new See(i,s,c,T,re,fe,Ee,Se,G),s=1,k===!0&&(s|=24),k=so(3,null,null,s),i.current=k,k.stateNode=i,s=fS(),s.refCount++,i.pooledCache=s,s.refCount++,k.memoizedState={element:f,isDehydrated:c,cache:s},vS(k),i}function QN(i){return i?(i=qm,i):qm}function YN(i,s,c,f,w,k){w=QN(w),f.context===null?f.context=w:f.pendingContext=w,f=$c(s),f.payload={element:c},k=k===void 0?null:k,k!==null&&(f.callback=k),c=Dc(i,f,s),c!==null&&(_i(c,i,s),hv(c,i,s))}function JN(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function T8(i,s){JN(i,s),(i=i.alternate)&&JN(i,s)}function ZN(i){if(i.tag===13||i.tag===31){var s=gp(i,67108864);s!==null&&_i(s,i,67108864),T8(i,67108864)}}function eP(i){if(i.tag===13||i.tag===31){var s=fo();s=gt(s);var c=gp(i,s);c!==null&&_i(c,i,s),T8(i,s)}}var W5=!0;function Fee(i,s,c,f){var w=H.T;H.T=null;var k=V.p;try{V.p=2,_8(i,s,c,f)}finally{V.p=k,H.T=w}}function $ee(i,s,c,f){var w=H.T;H.T=null;var k=V.p;try{V.p=8,_8(i,s,c,f)}finally{V.p=k,H.T=w}}function _8(i,s,c,f){if(W5){var w=j8(f);if(w===null)w8(i,s,f,U5,c),rP(i,f);else if(Aee(w,i,s,c,f))f.stopPropagation();else if(rP(i,f),s&4&&-1<Dee.indexOf(i)){for(;w!==null;){var k=Dr(w);if(k!==null)switch(k.tag){case 3:if(k=k.stateNode,k.current.memoizedState.isDehydrated){var T=Tt(k.pendingLanes);if(T!==0){var G=k;for(G.pendingLanes|=2,G.entangledLanes|=2;T;){var re=1<<31-nt(T);G.entanglements[1]|=re,T&=~re}ll(k),(Cr&6)===0&&(S5=Me()+500,Iv(0,!1))}}break;case 31:case 13:G=gp(k,2),G!==null&&_i(G,k,2),$5(),T8(k,2)}if(k=j8(f),k===null&&w8(i,s,f,U5,c),k===w)break;w=k}w!==null&&f.stopPropagation()}else w8(i,s,f,null,c)}}function j8(i){return i=OC(i),N8(i)}var U5=null;function N8(i){if(U5=null,i=Ga(i),i!==null){var s=l(i);if(s===null)i=null;else{var c=s.tag;if(c===13){if(i=u(s),i!==null)return i;i=null}else if(c===31){if(i=d(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null)}}return U5=i,null}function tP(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Te()){case Xe:return 2;case ot:return 8;case Ye:case Ve:return 32;case Ae:return 268435456;default:return 32}default:return 32}}var P8=!1,Oc=null,zc=null,Lc=null,Rv=new Map,Ov=new Map,Hc=[],Dee="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function rP(i,s){switch(i){case"focusin":case"focusout":Oc=null;break;case"dragenter":case"dragleave":zc=null;break;case"mouseover":case"mouseout":Lc=null;break;case"pointerover":case"pointerout":Rv.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ov.delete(s.pointerId)}}function zv(i,s,c,f,w,k){return i===null||i.nativeEvent!==k?(i={blockedOn:s,domEventName:c,eventSystemFlags:f,nativeEvent:k,targetContainers:[w]},s!==null&&(s=Dr(s),s!==null&&ZN(s)),i):(i.eventSystemFlags|=f,s=i.targetContainers,w!==null&&s.indexOf(w)===-1&&s.push(w),i)}function Aee(i,s,c,f,w){switch(s){case"focusin":return Oc=zv(Oc,i,s,c,f,w),!0;case"dragenter":return zc=zv(zc,i,s,c,f,w),!0;case"mouseover":return Lc=zv(Lc,i,s,c,f,w),!0;case"pointerover":var k=w.pointerId;return Rv.set(k,zv(Rv.get(k)||null,i,s,c,f,w)),!0;case"gotpointercapture":return k=w.pointerId,Ov.set(k,zv(Ov.get(k)||null,i,s,c,f,w)),!0}return!1}function nP(i){var s=Ga(i.target);if(s!==null){var c=l(s);if(c!==null){if(s=c.tag,s===13){if(s=u(c),s!==null){i.blockedOn=s,on(i.priority,function(){eP(c)});return}}else if(s===31){if(s=d(c),s!==null){i.blockedOn=s,on(i.priority,function(){eP(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function V5(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=j8(i.nativeEvent);if(c===null){c=i.nativeEvent;var f=new c.constructor(c.type,c);RC=f,c.target.dispatchEvent(f),RC=null}else return s=Dr(c),s!==null&&ZN(s),i.blockedOn=c,!1;s.shift()}return!0}function aP(i,s,c){V5(i)&&c.delete(s)}function Bee(){P8=!1,Oc!==null&&V5(Oc)&&(Oc=null),zc!==null&&V5(zc)&&(zc=null),Lc!==null&&V5(Lc)&&(Lc=null),Rv.forEach(aP),Ov.forEach(aP)}function G5(i,s){i.blockedOn===s&&(i.blockedOn=null,P8||(P8=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bee)))}var K5=null;function iP(i){K5!==i&&(K5=i,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){K5===i&&(K5=null);for(var s=0;s<i.length;s+=3){var c=i[s],f=i[s+1],w=i[s+2];if(typeof f!="function"){if(N8(f||c)===null)continue;break}var k=Dr(c);k!==null&&(i.splice(s,3),s-=3,PS(k,{pending:!0,data:w,method:c.method,action:f},f,w))}}))}function fh(i){function s(re){return G5(re,i)}Oc!==null&&G5(Oc,i),zc!==null&&G5(zc,i),Lc!==null&&G5(Lc,i),Rv.forEach(s),Ov.forEach(s);for(var c=0;c<Hc.length;c++){var f=Hc[c];f.blockedOn===i&&(f.blockedOn=null)}for(;0<Hc.length&&(c=Hc[0],c.blockedOn===null);)nP(c),c.blockedOn===null&&Hc.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(f=0;f<c.length;f+=3){var w=c[f],k=c[f+1],T=w[Vr]||null;if(typeof k=="function")T||iP(c);else if(T){var G=null;if(k&&k.hasAttribute("formAction")){if(w=k,T=k[Vr]||null)G=T.formAction;else if(N8(w)!==null)continue}else G=T.action;typeof G=="function"?c[f+1]=G:(c.splice(f,3),f-=3),iP(c)}}}function oP(){function i(k){k.canIntercept&&k.info==="react-transition"&&k.intercept({handler:function(){return new Promise(function(T){return w=T})},focusReset:"manual",scroll:"manual"})}function s(){w!==null&&(w(),w=null),f||setTimeout(c,20)}function c(){if(!f&&!navigation.transition){var k=navigation.currentEntry;k&&k.url!=null&&navigation.navigate(k.url,{state:k.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,w=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(c,100),function(){f=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),w!==null&&(w(),w=null)}}}function R8(i){this._internalRoot=i}X5.prototype.render=R8.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(a(409));var c=s.current,f=fo();YN(c,f,i,s,null,null)},X5.prototype.unmount=R8.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;YN(i.current,2,null,i,null,null),$5(),s[bt]=null}};function X5(i){this._internalRoot=i}X5.prototype.unstable_scheduleHydration=function(i){if(i){var s=Yt();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Hc.length&&s!==0&&s<Hc[c].priority;c++);Hc.splice(c,0,i),c===0&&nP(i)}};var sP=r.version;if(sP!=="19.2.7")throw Error(a(527,sP,"19.2.7"));V.findDOMNode=function(i){var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(a(188)):(i=Object.keys(i).join(","),Error(a(268,i)));return i=h(s),i=i!==null?v(i):null,i=i===null?null:i.stateNode,i};var Iee={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Lv=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Lv.isDisabled&&Lv.supportsFiber))try{lt=Lv.inject(Iee),Ke=Lv}catch{}var Lv;e.createRoot=function(i,s){if(!o(i))throw Error(a(299));var c=!1,f="",w=pj,k=fj,T=mj;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onUncaughtError!==void 0&&(w=s.onUncaughtError),s.onCaughtError!==void 0&&(k=s.onCaughtError),s.onRecoverableError!==void 0&&(T=s.onRecoverableError)),s=XN(i,1,!1,null,null,c,f,null,w,k,T,oP),i[bt]=s.current,y8(i),new R8(s)},e.hydrateRoot=function(i,s,c){if(!o(i))throw Error(a(299));var f=!1,w="",k=pj,T=fj,G=mj,re=null;return c!=null&&(c.unstable_strictMode===!0&&(f=!0),c.identifierPrefix!==void 0&&(w=c.identifierPrefix),c.onUncaughtError!==void 0&&(k=c.onUncaughtError),c.onCaughtError!==void 0&&(T=c.onCaughtError),c.onRecoverableError!==void 0&&(G=c.onRecoverableError),c.formState!==void 0&&(re=c.formState)),s=XN(i,1,!0,s,c??null,f,w,re,k,T,G,oP),s.context=QN(null),c=s.current,f=fo(),f=gt(f),w=$c(f),w.callback=null,Dc(c,w,f),c=f,s.current.lanes=c,ze(s,c),ll(s),i[bt]=s.current,y8(i),new X5(s)},e.version="19.2.7"}),Xa=or((e,t)=>{"use strict";function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(n){console.error(n)}}r(),t.exports=Wee()}),Uee=or(e=>{"use strict";var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function n(a,o,l){var u=null;if(l!==void 0&&(u=""+l),o.key!==void 0&&(u=""+o.key),"key"in o){l={};for(var d in o)d!=="key"&&(l[d]=o[d])}else l=o;return o=l.ref,{$$typeof:t,type:a,key:u,ref:o!==void 0?o:null,props:l}}e.Fragment=r,e.jsx=n,e.jsxs=n}),xe=or((e,t)=>{"use strict";t.exports=Uee()}),Vee=or(e=>{"use strict";var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function y(E){if(typeof E=="object"&&E!==null){var F=E.$$typeof;switch(F){case t:switch(E=E.type,E){case n:case o:case a:case p:case h:case b:return E;default:switch(E=E&&E.$$typeof,E){case u:case d:case g:case v:return E;case l:return E;default:return F}}case r:return F}}}e.ContextConsumer=l,e.ContextProvider=u,e.Element=t,e.ForwardRef=d,e.Fragment=n,e.Lazy=g,e.Memo=v,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=p,e.SuspenseList=h,e.isContextConsumer=function(E){return y(E)===l},e.isContextProvider=function(E){return y(E)===u},e.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},e.isForwardRef=function(E){return y(E)===d},e.isFragment=function(E){return y(E)===n},e.isLazy=function(E){return y(E)===g},e.isMemo=function(E){return y(E)===v},e.isPortal=function(E){return y(E)===r},e.isProfiler=function(E){return y(E)===o},e.isStrictMode=function(E){return y(E)===a},e.isSuspense=function(E){return y(E)===p},e.isSuspenseList=function(E){return y(E)===h},e.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===o||E===a||E===p||E===h||E===b||typeof E=="object"&&E!==null&&(E.$$typeof===g||E.$$typeof===v||E.$$typeof===u||E.$$typeof===l||E.$$typeof===d||E.$$typeof===x||E.getModuleId!==void 0)},e.typeOf=y}),Gee=or((e,t)=>{"use strict";t.exports=Vee()}),Kee=or((e,t)=>{"use strict";t.exports=o,t.exports.isMobile=o,t.exports.default=o;var r=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,n=/CrOS/,a=/android|ipad|playbook|silk/i;function o(l){l||(l={});let u=l.ua;if(!u&&typeof navigator<"u"&&(u=navigator.userAgent),u&&u.headers&&typeof u.headers["user-agent"]=="string"&&(u=u.headers["user-agent"]),typeof u!="string")return!1;let d=r.test(u)&&!n.test(u)||!!l.tablet&&a.test(u);return!d&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&u.indexOf("Macintosh")!==-1&&u.indexOf("Safari")!==-1&&(d=!0),d}});function jR(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=jR(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Y(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=jR(e))&&(n&&(n+=" "),n+=t);return n}var eF=Y,Xee=A(_()),Qee=(0,Xee.createContext)({}),Sh=Qee,Y5=A(_()),Yee=A(_()),bx=A(_()),lP="data-rc-order",uP="data-rc-priority",Jee="rc-util-key",i4=new Map;function NR(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Zee(e,t){if(!e||!t)return!1;if(e.contains)return e.contains(t);let r=t;for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function PR({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:Jee}function tF(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function ete(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function rF(e){return Array.from((i4.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function RR(e,t={}){if(!NR())return null;let{csp:r,prepend:n,priority:a=0}=t,o=ete(n),l=o==="prependQueue",u=document.createElement("style");u.setAttribute(lP,o),l&&a&&u.setAttribute(uP,`${a}`),r?.nonce&&(u.nonce=r.nonce),u.innerHTML=e;let d=tF(t),{firstChild:p}=d;if(n){if(l){let h=(t.styles||rF(d)).filter(v=>{if(!["prepend","prependQueue"].includes(v.getAttribute(lP)))return!1;let g=Number(v.getAttribute(uP)||0);return a>=g});if(h.length)return d.insertBefore(u,h[h.length-1].nextSibling),u}d.insertBefore(u,p)}else d.appendChild(u);return u}function tte(e,t={}){let{styles:r}=t;return r||(r=rF(tF(t))),r.find(n=>n.getAttribute(PR(t))===e)}function rte(e,t){let r=i4.get(e);if(!r||!Zee(document,r)){let n=RR("",t);if(!n)return;let{parentNode:a}=n;i4.set(e,a),e.removeChild(n)}}function nte(e,t,r={}){if(!NR())return null;let n=tF(r),a=rF(n),o={...r,styles:a};rte(n,o);let l=tte(t,o);if(l)return o.csp?.nonce&&l.nonce!==o.csp.nonce&&(l.nonce=o.csp.nonce),l.innerHTML!==e&&(l.innerHTML=e),l;let u=RR(e,o);return u?.setAttribute(PR(o),t),u}function ate(e){return e?.getRootNode?.()}function ite(e){let t=ate(e);return typeof ShadowRoot<"u"&&t instanceof ShadowRoot?t:null}var cP={};function ote(e,t){e||cP[t]||(cP[t]=!0)}function ste(e){return e.replace(/-(.)/g,(t,r)=>r.toUpperCase())}function nF(e,t){ote(e,`[@ant-design/icons] ${t}`)}function yx(e){return e!==null&&typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function dP(e={}){return Object.keys(e).reduce((t,r)=>{let n=e[r];return r==="class"?(t.className=n,delete t.class):(delete t[r],t[ste(r)]=n),t},{})}function o4(e,t,r){return r?bx.default.createElement(e.tag,{key:t,...dP(e.attrs),...r},(e.children||[]).map((n,a)=>o4(n,`${t}-${e.tag}-${a}`))):bx.default.createElement(e.tag,{key:t,...dP(e.attrs)},(e.children||[]).map((n,a)=>o4(n,`${t}-${e.tag}-${a}`)))}var lte={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},ute=`
12
+ .anticon {
13
+ display: inline-flex;
14
+ align-items: center;
15
+ color: inherit;
16
+ font-style: normal;
17
+ line-height: 0;
18
+ text-align: center;
19
+ text-transform: none;
20
+ vertical-align: -0.125em;
21
+ text-rendering: optimizeLegibility;
22
+ -webkit-font-smoothing: antialiased;
23
+ -moz-osx-font-smoothing: grayscale;
24
+ }
25
+
26
+ .anticon > * {
27
+ line-height: 1;
28
+ }
29
+
30
+ .anticon svg {
31
+ display: inline-block;
32
+ vertical-align: inherit;
33
+ }
34
+
35
+ .anticon::before {
36
+ display: none;
37
+ }
38
+
39
+ .anticon .anticon-icon {
40
+ display: block;
41
+ }
42
+
43
+ .anticon[tabindex] {
44
+ cursor: pointer;
45
+ }
46
+
47
+ .anticon-spin {
48
+ -webkit-animation: loadingCircle 1s infinite linear;
49
+ animation: loadingCircle 1s infinite linear;
50
+ }
51
+
52
+ @-webkit-keyframes loadingCircle {
53
+ 100% {
54
+ -webkit-transform: rotate(360deg);
55
+ transform: rotate(360deg);
56
+ }
57
+ }
58
+
59
+ @keyframes loadingCircle {
60
+ 100% {
61
+ -webkit-transform: rotate(360deg);
62
+ transform: rotate(360deg);
63
+ }
64
+ }
65
+ `,OR=e=>{let{csp:t,prefixCls:r,layer:n,zeroRuntime:a}=(0,bx.useContext)(Sh),o=ute;r&&(o=o.replace(/anticon/g,r)),n&&(o=`@layer ${n} {
66
+ ${o}
67
+ }`),(0,bx.useEffect)(()=>{if(a)return;let l=e.current,u=ite(l);nte(o,"@ant-design-icons",{prepend:!n,csp:t,attachTo:u})},[])},zR=e=>{let{icon:t,className:r,onClick:n,style:a,primaryColor:o,secondaryColor:l,...u}=e,d=Yee.useRef(null);if(OR(d),nF(yx(t),`icon should be icon definiton, but got ${typeof t}`),!yx(t))return null;let p=t;return o4(p.icon,`svg-${p.name}`,{className:r,onClick:n,style:a,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...u,ref:d})};zR.displayName="IconReact";var cte=zR;function s4(){return s4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s4.apply(this,arguments)}var dte=Y5.forwardRef((e,t)=>{let{className:r,icon:n,spin:a,rotate:o,tabIndex:l,onClick:u,twoToneColor:d,...p}=e,{prefixCls:h="anticon",rootClassName:v}=Y5.useContext(Sh);if(nF(yx(n),`icon should be icon definiton, but got ${typeof n}`),!yx(n))return null;let g=Y(v,h,{[`${h}-${n.name}`]:!!n.name,[`${h}-spin`]:!!a||n.name==="loading"},r),b=l;b===void 0&&u&&(b=-1);let x=o?{msTransform:`rotate(${o}deg)`,transform:`rotate(${o}deg)`}:void 0;return Y5.createElement("span",s4({role:"img","aria-label":n.name},p,{ref:t,tabIndex:b,onClick:u,className:g}),Y5.createElement(cte,{icon:n,style:x}))}),Ut=dte,pte=A(_()),l4=A(_());function Ka(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var pP=Ka()?l4.useLayoutEffect:l4.useEffect,LR=(e,t)=>{let r=l4.useRef(!0);pP(()=>e(r.current),t),pP(()=>(r.current=!1,()=>{r.current=!0}),[])},aF=(e,t)=>{LR(r=>{if(!r)return e()},t)},sr=LR;function qt(e,t){let[r,n]=(0,pte.useState)(e),a=t!==void 0?t:r;return sr(o=>{o||n(t)},[t]),[a,n]}var u4=A(_());function fte(){return{...u4}.useId}var fP=0;function mte(e,t){let r=String(t).replace(/[^a-zA-Z0-9_.:-]/g,"-");return`${e}-${r}`}var mP=fte(),pl=mP?function(e){let t=mP();return e||t}:function(e){let[t,r]=u4.useState("ssr-id");return u4.useEffect(()=>{let n=fP;fP+=1,r(`rc_unique_${n}`)},[]),e||t};function Lr(e){return e!=null}function Lt(e){return Lr(e)&&e!==!1&&e!==""}function Vt(e,t){let r=Object.assign({},e);return Array.isArray(t)&&t.forEach(n=>{delete r[n]}),r}var hte=Symbol.for("react.element"),gte=Symbol.for("react.transitional.element"),vte=Symbol.for("react.fragment");function HR(e){return e&&typeof e=="object"&&(e.$$typeof===hte||e.$$typeof===gte)&&e.type===vte}var bte=A(_());function Er(e,t={}){let r=[];return bte.default.Children.forEach(e,n=>{n==null&&!t.keepEmpty||(Array.isArray(n)?r=r.concat(Er(n)):HR(n)&&n.props?r=r.concat(Er(n.props.children,t)):r.push(n))}),r}function yte(...e){let t={};for(let r of e)if(r)for(let n of Object.keys(r))r[n]!==void 0&&(t[n]=r[n]);return t}var Cx=yte,wte=A(Xa()),wx="__rc_react_root__";function iF(e,t){let r=t[wx]||(0,wte.createRoot)(t);r.render(e),t[wx]=r}async function oF(e){return Promise.resolve().then(()=>{e[wx]?.unmount(),delete e[wx]})}var hP=A(_()),xte=e=>{let t=hP.useRef(e);return t.current=e,hP.useCallback((...r)=>t.current?.(...r),[])},xt=xte,O8=A(_()),Ete=e=>{let t=O8.useRef(!1),[r,n]=O8.useState(e);O8.useEffect(()=>(t.current=!1,()=>{t.current=!0}),[]);function a(o,l){l&&t.current||n(o)}return[r,a]},qR=Ete,gP=A(_()),WR=e=>+setTimeout(e,16),UR=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(WR=e=>window.requestAnimationFrame(e),UR=e=>window.cancelAnimationFrame(e));var vP=0,sF=new Map;function VR(e){sF.delete(e)}var GR=(e,t=1)=>{vP+=1;let r=vP;function n(a){if(a===0)VR(r),e();else{let o=WR(()=>{n(a-1)});sF.set(r,o)}}return n(t),r};GR.cancel=e=>{let t=sF.get(e);return VR(e),UR(t)};var br=GR;function Fh(e){let[t,r]=gP.useState(e),n=gP.useRef(null),a=xt(()=>{if(n.current){let[l,u]=n.current;l?br.cancel(u):clearTimeout(u),n.current=null}}),o=xt((l,u)=>{let d=u||{frame:1};a(),d===!0?r(l):"ms"in d?n.current=[!1,setTimeout(()=>r(l),d.ms)]:n.current=[!0,br(()=>r(l),d.frame)]});return[t,o]}var kte=A(_());function $h(e,t,r){let n=kte.useRef({});return(!("value"in n.current)||r(n.current.condition,t))&&(n.current.value=e(),n.current.condition=t),n.current.value}var bP=A(_());function Cte(e){let[,t]=bP.useReducer(o=>o+1,0),r=bP.useRef(e),n=xt(()=>r.current),a=xt(o=>{r.current=typeof o=="function"?o(r.current):o,t()});return[n,a]}var KR=Cte,XR=A(_()),z8=A(Gee()),Ste=Number(XR.version.split(".")[0]),Fte=(e,t)=>{typeof e=="function"?e(t):typeof e=="object"&&e&&"current"in e&&(e.current=t)},pn=(...e)=>{let t=e.filter(Boolean);return t.length<=1?t[0]:r=>{e.forEach(n=>{Fte(n,r)})}},Qa=(...e)=>$h(()=>pn(...e),e,(t,r)=>t.length!==r.length||t.every((n,a)=>n!==r[a])),yu=e=>{if(!e)return!1;if(lF(e)&&Ste>=19)return!0;let t=(0,z8.isMemo)(e)?e.type.type:e.type;return!(typeof t=="function"&&!t.prototype?.render&&t.$$typeof!==z8.ForwardRef||typeof e=="function"&&!e.prototype?.render&&e.$$typeof!==z8.ForwardRef)};function lF(e){return(0,XR.isValidElement)(e)&&!HR(e)}var Sx=e=>lF(e)&&yu(e),Pi=e=>{if(e&&lF(e)){let t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function QR(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let r=t;for(;r;){if(r===e)return!0;r=r.parentNode}return!1}var yP="data-rc-order",wP="data-rc-priority",$te="rc-util-key",c4=new Map;function YR({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:$te}function Fx(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Dte(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function uF(e){return Array.from((c4.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function JR(e,t={}){if(!Ka())return null;let{csp:r,prepend:n,priority:a=0}=t,o=Dte(n),l=o==="prependQueue",u=document.createElement("style");u.setAttribute(yP,o),l&&a&&u.setAttribute(wP,`${a}`),r?.nonce&&(u.nonce=r?.nonce),u.innerHTML=e;let d=Fx(t),{firstChild:p}=d;if(n){if(l){let h=(t.styles||uF(d)).filter(v=>{if(!["prepend","prependQueue"].includes(v.getAttribute(yP)))return!1;let g=Number(v.getAttribute(wP)||0);return a>=g});if(h.length)return d.insertBefore(u,h[h.length-1].nextSibling),u}d.insertBefore(u,p)}else d.appendChild(u);return u}function ZR(e,t={}){let{styles:r}=t;return r||(r=uF(Fx(t))),r.find(n=>n.getAttribute(YR(t))===e)}function Yv(e,t={}){let r=ZR(e,t);r&&Fx(t).removeChild(r)}function Ate(e,t){let r=c4.get(e);if(!r||!QR(document,r)){let n=JR("",t),{parentNode:a}=n;c4.set(e,a),e.removeChild(n)}}function Np(e,t,r={}){let n=Fx(r),a=uF(n),o={...r,styles:a};Ate(n,o);let l=ZR(t,o);if(l)return o.csp?.nonce&&l.nonce!==o.csp?.nonce&&(l.nonce=o.csp?.nonce),l.innerHTML!==e&&(l.innerHTML=e),l;let u=JR(e,o);return u.setAttribute(YR(o),t),u}function xh(e){return e instanceof HTMLElement||e instanceof SVGElement}function $x(e){return e&&typeof e=="object"&&xh(e.nativeElement)?e.nativeElement:xh(e)?e:null}var Wv=A(_()),rb=(e=>{if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){let{width:t,height:r}=e.getBBox();if(t||r)return!0}if(e.getBoundingClientRect){let{width:t,height:r}=e.getBoundingClientRect();if(t||r)return!0}}return!1});function xP(e,t=!1){if(rb(e)){let r=e.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(r)||e.isContentEditable||r==="a"&&!!e.getAttribute("href"),a=e.getAttribute("tabindex"),o=Number(a),l=null;return a&&!Number.isNaN(o)?l=o:n&&l===null&&(l=0),n&&e.disabled&&(l=null),l!==null&&(l>=0||t&&l<0)}return!1}function nb(e,t=!1){let r=[...e.querySelectorAll("*")].filter(n=>xP(n,t));return xP(e,t)&&r.unshift(e),r}function Dx(e,t){if(!e)return;e.focus(t);let{cursor:r}=t||{};if(r&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){let n=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(n,n);break;default:e.setSelectionRange(0,n)}}}var wh=null,Gc=[],d4=new Map,cF=new Map;function dF(){return Gc[Gc.length-1]}function Bte(e){let t=dF();if(e&&t){let r;for(let[a,o]of d4.entries())if(o===t){r=a;break}let n=cF.get(r);return!!n&&(n===e||n.contains(e))}return!1}function Ite(e){let{activeElement:t}=document;return e===t||e.contains(t)}function L8(){let e=dF(),{activeElement:t}=document;if(!Bte(t))if(e&&!Ite(e)){let r=nb(e);(r.includes(wh)?wh:r[0])?.focus({preventScroll:!0})}else wh=t}function EP(e){if(e.key==="Tab"){let{activeElement:t}=document,r=dF(),n=nb(r),a=n[n.length-1];e.shiftKey&&t===n[0]?wh=a:!e.shiftKey&&t===a&&(wh=n[0])}}function Mte(e,t){return e&&(d4.set(t,e),Gc=Gc.filter(r=>r!==e),Gc.push(e),window.addEventListener("focusin",L8),window.addEventListener("keydown",EP,!0),L8()),()=>{wh=null,Gc=Gc.filter(r=>r!==e),d4.delete(t),cF.delete(t),Gc.length===0&&(window.removeEventListener("focusin",L8),window.removeEventListener("keydown",EP,!0))}}function Tte(e,t){let r=(0,Wv.useRef)(0),[n,a]=(0,Wv.useState)(0);(0,Wv.useEffect)(()=>{r.current=0},t),(0,Wv.useEffect)(()=>{let[o,l]=e(r.current);return l||(r.current+=1,a(u=>u+1)),o},[...t,n])}function _te(e,t){let r=pl(),n=(0,Wv.useRef)(t);return n.current=t,Tte(a=>{if(!e)return[void 0,!0];let o=n.current();return o?[Mte(o,r),!0]:[void 0,a>=1]},[r,e]),[a=>{a&&cF.set(r,a)}]}function eO(e){return e?.getRootNode?.()}function jte(e){return eO(e)instanceof ShadowRoot}function p4(e){return jte(e)?eO(e):null}var tO=e=>{if(Ka()&&window.document.documentElement){let t=Array.isArray(e)?e:[e],{documentElement:r}=window.document;return t.some(n=>n in r.style)}return!1},Nte=(e,t)=>{if(!tO(e))return!1;let r=document.createElement("div"),n=r.style[e];return r.style[e]=t,r.style[e]!==n};function Ax(e,t){return!Array.isArray(e)&&t!==void 0?Nte(e,t):tO(e)}var Ft={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){let{keyCode:t}=e;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=Ft.F1&&t<=Ft.F12)return!1;switch(t){case Ft.ALT:case Ft.CAPS_LOCK:case Ft.CONTEXT_MENU:case Ft.CTRL:case Ft.DOWN:case Ft.END:case Ft.ESC:case Ft.HOME:case Ft.INSERT:case Ft.LEFT:case Ft.MAC_FF_META:case Ft.META:case Ft.NUMLOCK:case Ft.NUM_CENTER:case Ft.PAGE_DOWN:case Ft.PAGE_UP:case Ft.PAUSE:case Ft.PRINT_SCREEN:case Ft.RIGHT:case Ft.SHIFT:case Ft.UP:case Ft.WIN_KEY:case Ft.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=Ft.ZERO&&e<=Ft.NINE||e>=Ft.NUM_ZERO&&e<=Ft.NUM_MULTIPLY||e>=Ft.A&&e<=Ft.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&e===0)return!0;switch(e){case Ft.SPACE:case Ft.QUESTION_MARK:case Ft.NUM_PLUS:case Ft.NUM_MINUS:case Ft.NUM_PERIOD:case Ft.NUM_DIVISION:case Ft.SEMICOLON:case Ft.DASH:case Ft.EQUALS:case Ft.COMMA:case Ft.PERIOD:case Ft.SLASH:case Ft.APOSTROPHE:case Ft.SINGLE_QUOTE:case Ft.OPEN_SQUARE_BRACKET:case Ft.BACKSLASH:case Ft.CLOSE_SQUARE_BRACKET:return!0;default:return!1}},isEditableTarget:function(e){let t=e.target;if(!(t instanceof HTMLElement))return!1;let r=t.tagName;return!!(r==="INPUT"||r==="TEXTAREA"||r==="SELECT"||t.isContentEditable)}},yn=Ft;function Pte(e){let t=`rc-scrollbar-measure-${Math.random().toString(36).substring(7)}`,r=document.createElement("div");r.id=t;let n=r.style;n.position="absolute",n.left="0",n.top="0",n.width="100px",n.height="100px",n.overflow="scroll";let a,o;if(e){let d=getComputedStyle(e);n.scrollbarColor=d.scrollbarColor,n.scrollbarWidth=d.scrollbarWidth;let p=getComputedStyle(e,"::-webkit-scrollbar"),h=parseInt(p.width,10),v=parseInt(p.height,10);try{let g=h?`width: ${p.width};`:"",b=v?`height: ${p.height};`:"";Np(`
68
+ #${t}::-webkit-scrollbar {
69
+ ${g}
70
+ ${b}
71
+ }`,t)}catch(g){console.error(g),a=h,o=v}}document.body.appendChild(r);let l=e&&a&&!Number.isNaN(a)?a:r.offsetWidth-r.clientWidth,u=e&&o&&!Number.isNaN(o)?o:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),Yv(t),{width:l,height:u}}function Rte(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:Pte(e)}var f4={},Ote=[],zte=e=>{Ote.push(e)};function Lte(e,t){}function Hte(e,t){}function qte(){f4={}}function rO(e,t,r){!t&&!f4[r]&&(e(!1,r),f4[r]=!0)}function Bx(e,t){rO(Lte,e,t)}function Wte(e,t){rO(Hte,e,t)}Bx.preMessage=zte;Bx.resetWarned=qte;Bx.noteOnce=Wte;var Da=Bx;function Ute(e,t,r=!1){let n=new Set;function a(o,l,u=1){let d=n.has(o);if(Da(!d,"Warning: There may be circular references"),d)return!1;if(o===l)return!0;if(r&&u>1)return!1;n.add(o);let p=u+1;if(Array.isArray(o)){if(!Array.isArray(l)||o.length!==l.length)return!1;for(let h=0;h<o.length;h++)if(!a(o[h],l[h],p))return!1;return!0}if(o&&l&&typeof o=="object"&&typeof l=="object"){let h=Object.keys(o);return h.length!==Object.keys(l).length?!1:h.every(v=>a(o[v],l[v],p))}return!1}return a(e,t)}var ed=Ute,Vte=A(Kee()),H8,Gte=()=>(typeof H8>"u"&&(H8=(0,Vte.default)()),H8),pF=Gte,Kte=`accept acceptCharset accessKey action allowFullScreen allowTransparency
72
+ alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
73
+ charSet checked classID className colSpan cols content contentEditable contextMenu
74
+ controls coords crossOrigin data dateTime default defer dir disabled download draggable
75
+ encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
76
+ headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
77
+ is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
78
+ mediaGroup method min minLength multiple muted name noValidate nonce open
79
+ optimum pattern placeholder poster preload radioGroup readOnly rel required
80
+ reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
81
+ shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
82
+ summary tabIndex target title type useMap value width wmode wrap`,Xte=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
83
+ onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
84
+ onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
85
+ onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
86
+ onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
87
+ onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
88
+ onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad
89
+ onPointerDown onPointerMove onPointerUp onPointerCancel onPointerEnter onPointerLeave onPointerOver onPointerOut onGotPointerCapture onLostPointerCapture
90
+ onAnimationStart onAnimationEnd onAnimationIteration
91
+ onTransitionEnd onTransitionRun onTransitionStart onTransitionCancel
92
+ onBeforeInput onReset onInvalid
93
+ onAuxClick onToggle onBeforeToggle onCancel onClose onResize onScrollEnd`,Qte=`${Kte} ${Xte}`.split(/[\s\n]+/),Yte="aria-",Jte="data-";function kP(e,t){return e.indexOf(t)===0}function Ya(e,t=!1){let r;t===!1?r={aria:!0,data:!0,attr:!0}:t===!0?r={aria:!0}:r={...t};let n={};return Object.keys(e).forEach(a=>{(r.aria&&(a==="role"||kP(a,Yte))||r.data&&kP(a,Jte)||r.attr&&Qte.includes(a))&&(n[a]=e[a])}),n}function Zte(e,t){return typeof Proxy<"u"&&e?new Proxy(e,{get(r,n){if(t[n])return t[n];let a=r[n];return typeof a=="function"?a.bind(r):a}}):e}function Ni(e,t){let r=e;for(let n=0;n<t.length;n+=1){if(r==null)return;r=r[t[n]]}return r}function nO(e,t,r,n){if(!t.length)return r;let[a,...o]=t,l;return!e&&typeof a=="number"?l=[]:Array.isArray(e)?l=[...e]:l={...e},n&&r===void 0&&o.length===1?delete l[a][o[0]]:l[a]=nO(l[a],o,r,n),l}function mi(e,t,r,n=!1){return t.length&&n&&r===void 0&&!Ni(e,t.slice(0,-1))?e:nO(e,t,r,n)}function ere(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function CP(e){return Array.isArray(e)?[]:{}}var tre=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function rre(e,t={}){let{prepareArray:r}=t,n=r||(()=>[]),a=CP(e[0]);return e.forEach(o=>{function l(u,d){let p=new Set(d),h=Ni(o,u),v=Array.isArray(h);if(v||ere(h)){if(!p.has(h)){p.add(h);let g=Ni(a,u);v?a=mi(a,u,n(g,h)):(!g||typeof g!="object")&&(a=mi(a,u,CP(h))),tre(h).forEach(b=>{Object.getOwnPropertyDescriptor(h,b).enumerable&&l([...u,b],p)})}}else a=mi(a,u,h)}l([])}),a}function td(...e){return rre(e)}var z$e=A(_()),L$e=A(er());function m4(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function nre(e){if(Array.isArray(e))return m4(e)}function are(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aO(e,t){if(e){if(typeof e=="string")return m4(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m4(e,t):void 0}}function ire(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
94
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function en(e){return nre(e)||are(e)||aO(e)||ire()}var Gn=e=>typeof e=="number"&&!Number.isNaN(e),Ja=e=>typeof e=="string",Ct=e=>e!==null&&typeof e=="object",pr=e=>typeof e=="function",ore=e=>Lr(e)&&pr(e.then),fF=e=>typeof e!="object"&&!pr(e)||e===null,ab=e=>Ct(e)&&"propertyName"in e&&Ja(e.propertyName),Ix=A(_()),h4=(e,t)=>{let r={...e};return Object.keys(t).forEach(n=>{t[n]._default?r[n]||(r[n]={}):r[n]=h4(r[n],t[n])}),r},iO=(e={},...t)=>t.filter(r=>!!r).reduce((r,n)=>(Object.keys(n).forEach(a=>{let o=e[a],l=n[a];if(o)if(Ct(l))r[a]=iO(o,r[a],l);else{let{_default:u}=o;u&&(r[a]=r[a]||{},r[a][u]=Y(r[a][u],l))}else r[a]=Y(r[a],l)}),r),{}),sre=(e,...t)=>Ix.useMemo(()=>iO.apply(void 0,[e].concat(t)),[e].concat(t)),lre=(...e)=>e.filter(t=>!!t).reduce((t,r={})=>(Object.keys(r).forEach(n=>{t[n]={...t[n],...r[n]}}),t),{}),ure=(...e)=>Ix.useMemo(()=>lre.apply(void 0,e),[].concat(e)),Ue=(e,t="root")=>Ix.useMemo(()=>e?{[t]:e}:void 0,[e,t]),g4=(e,t)=>pr(e)?e(t):e,Et=(e,t,r,n)=>{let a=e.map(d=>d?g4(d,r):void 0),o=t.map(d=>d?g4(d,r):void 0),l=sre.apply(void 0,[n].concat(en(a))),u=ure.apply(void 0,en(o));return Ix.useMemo(()=>n?[h4(l,n),h4(u,n)]:[l,u],[l,u,n])},cre=A(_());function dre(){}var{resetWarned:H$e}=Da,pre=cre.createContext({}),oO=()=>{let e=()=>{};return e.deprecated=dre,e},Dh=oO,sO=A(_()),Yc="ant",Mx="anticon",mF=["outlined","borderless","filled","underlined"],fre=(e,t)=>t||(e?`${Yc}-${e}`:Yc),st=sO.createContext({getPrefixCls:fre,iconPrefixCls:Mx}),{Consumer:q$e}=st,SP={};function wt(e){let t=sO.useContext(st),{getPrefixCls:r,direction:n,getPopupContainer:a,renderEmpty:o}=t,l=t[e];return{classNames:SP,styles:SP,...l,getPrefixCls:r,direction:n,getPopupContainer:a,renderEmpty:o}}var FP=A(_());function mre(e){for(var t=0,r,n=0,a=e.length;a>=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Jv=mre,hre=A(_()),gre=A(_());function v4(e){return e.join("%")}var $P=0,vre=class{constructor(e){ae(this,"instanceId"),ae(this,"cache",new Map),ae(this,"updateTimes",new Map),ae(this,"extracted",new Set),this.instanceId=e}get(e){return this.opGet(v4(e))}opGet(e){return this.cache.get(e)||null}update(e,t){return this.opUpdate(v4(e),t)}opUpdate(e,t){let r=this.cache.get(e),n=t(r);n===null?(this.cache.delete(e),this.updateTimes.delete(e)):(this.cache.set(e,n),this.updateTimes.set(e,$P),$P+=1)}},bre=vre,Tx="data-token-hash",dl="data-css-hash",Kc="__cssinjs_instance__";function yre(){let e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){let t=document.body.querySelectorAll(`style[${dl}]`)||[],{firstChild:r}=document.head;Array.from(t).forEach(a=>{a[Kc]||(a[Kc]=e),a[Kc]===e&&document.head.insertBefore(a,r)});let n={};Array.from(document.querySelectorAll(`style[${dl}]`)).forEach(a=>{let o=a.getAttribute(dl);n[o]?a[Kc]===e&&a.parentNode?.removeChild(a):n[o]=!0})}return new bre(e)}var wre=gre.createContext({hashPriority:"low",cache:yre(),defaultCache:!0,autoPrefix:!1}),rd=wre,xre="CALC_UNIT",W$e=new RegExp(xre,"g");function Ere(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var b4=class y4{constructor(){ae(this,"cache"),ae(this,"keys"),ae(this,"cacheCallTimes"),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(t,r=!1){let n={map:this.cache};return t.forEach(a=>{n?n=n?.map?.get(a):n=void 0}),n?.value&&r&&(n.value[1]=this.cacheCallTimes++),n?.value}get(t){return this.internalGet(t,!0)?.[0]}has(t){return!!this.internalGet(t)}set(t,r){if(!this.has(t)){if(this.size()+1>y4.MAX_CACHE_SIZE+y4.MAX_CACHE_OFFSET){let[a]=this.keys.reduce((o,l)=>{let[,u]=o;return this.internalGet(l)[1]<u?[l,this.internalGet(l)[1]]:o},[this.keys[0],this.cacheCallTimes]);this.delete(a)}this.keys.push(t)}let n=this.cache;t.forEach((a,o)=>{if(o===t.length-1)n.set(a,{value:[r,this.cacheCallTimes++]});else{let l=n.get(a);l?l.map||(l.map=new Map):n.set(a,{map:new Map}),n=n.get(a).map}})}deleteByPath(t,r){let n=t.get(r[0]);if(r.length===1)return n.map?t.set(r[0],{map:n.map}):t.delete(r[0]),n.value?.[0];let a=this.deleteByPath(n.map,r.slice(1));return(!n.map||n.map.size===0)&&!n.value&&t.delete(r[0]),a}delete(t){if(this.has(t))return this.keys=this.keys.filter(r=>!Ere(r,t)),this.deleteByPath(this.cache,t)}};ae(b4,"MAX_CACHE_SIZE",20),ae(b4,"MAX_CACHE_OFFSET",5);var kre=b4,DP=0,lO=class{constructor(e){ae(this,"derivatives"),ae(this,"id"),this.derivatives=Array.isArray(e)?e:[e],this.id=DP,e.length===0&&e.length>0,DP+=1}getDerivativeToken(e){return this.derivatives.reduce((t,r)=>r(e,t),void 0)}},q8=new kre;function Eh(e){let t=Array.isArray(e)?e:[e];return q8.has(t)||q8.set(t,new lO(t)),q8.get(t)}var Cre=new WeakMap,W8={};function Sre(e,t){let r=Cre;for(let n=0;n<t.length;n+=1){let a=t[n];r.has(a)||r.set(a,new WeakMap),r=r.get(a)}return r.has(W8)||r.set(W8,e()),r.get(W8)}var AP=new WeakMap;function Gv(e){let t=AP.get(e)||"";return t||(Object.keys(e).forEach(r=>{let n=e[r];t+=r,n instanceof lO?t+=n.id:n&&typeof n=="object"?t+=Gv(n):t+=n}),t=Jv(t),AP.set(e,t)),t}function Fre(e,t){return Jv(`${t}_${Gv(e)}`)}var U$e=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),w4=Ka();function ue(e){return typeof e=="number"?`${e}px`:e}function xx(e,t,r,n={},a=!1){if(a)return e;let o={...n,[Tx]:t,[dl]:r};return`<style ${Object.keys(o).map(l=>{let u=o[l];return u?`${l}="${u}"`:null}).filter(l=>l).join(" ")}>${e}</style>`}function uO(e){let{hashCls:t,hashPriority:r="low"}=e||{};if(!t)return"";let n=`.${t}`;return r==="low"?`:where(${n})`:n}var $re=e=>e!=null;function hF(e,t){let r=typeof t=="function"?t():t;return r?{...e,csp:{...e.csp,nonce:r}}:e}var dx=(e,t="")=>`--${t?`${t}-`:""}${e}`.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase(),Dre=(e,t,r)=>{let{hashCls:n,hashPriority:a="low",scope:o}=r||{};if(!Object.keys(e).length)return"";let l=`${uO({hashCls:n,hashPriority:a})}.${t}`,u=[o].flat().filter(Boolean);return`${u.length?u.map(d=>`${l}.${d}`).join(", "):l}{${Object.entries(e).map(([d,p])=>`${d}:${p};`).join("")}}`},cO=(e,t,r)=>{let{hashCls:n,hashPriority:a="low",prefix:o,unitless:l,ignore:u,preserve:d}=r||{},p={},h={};return Object.entries(e).forEach(([v,g])=>{if(d?.[v])h[v]=g;else if((typeof g=="string"||typeof g=="number")&&!u?.[v]){let b=dx(v,o);p[b]=typeof g=="number"&&!l?.[v]?`${g}px`:String(g),h[v]=`var(${b})`}}),[h,Dre(p,t,{scope:r?.scope,hashCls:n,hashPriority:a})]},BP=A(_()),Are=A(_());function Bre(){return!1}var Ire=Bre,J5=new Map;function gF(e,t,r,n,a){let{cache:o}=BP.useContext(rd),l=[e,...t],u=v4(l),d=Ire(),p=v=>{o.opUpdate(u,g=>{let[b=0,x]=g||[void 0,void 0],y=x||r(),E=[b,y];return v?v(E):E})};BP.useMemo(()=>{p()},[u]);let h=o.opGet(u)[1];return(0,Are.useInsertionEffect)(()=>(p(([v,g])=>[v+1,g]),J5.has(u)||(a?.(h),J5.set(u,!0),Promise.resolve().then(()=>{J5.delete(u)})),()=>{o.opUpdate(u,v=>{let[g=0,b]=v||[];return g-1===0?(n?.(b,!1),J5.delete(u),null):[g-1,b]})}),[u]),h}var Mre={},Tre="css",Ip=new Map;function _re(e){Ip.set(e,(Ip.get(e)||0)+1)}function jre(e,t){typeof document<"u"&&document.querySelectorAll(`style[${Tx}="${e}"]`).forEach(r=>{r[Kc]===t&&r.parentNode?.removeChild(r)})}var Nre=-1;function Pre(e,t){Ip.set(e,(Ip.get(e)||0)-1);let r=new Set;Ip.forEach((n,a)=>{n<=0&&r.add(a)}),Ip.size-r.size>Nre&&r.forEach(n=>{jre(n,t),Ip.delete(n)})}var _x=(e,t,r,n)=>{let a={...r.getDerivativeToken(e),...t};return n&&(a=n(a)),a},dO="token";function pO(e,t,r){let{cache:{instanceId:n},container:a,hashPriority:o}=(0,hre.useContext)(rd),{salt:l="",override:u=Mre,formatToken:d,getComputedToken:p,cssVar:h,nonce:v}=r,g=Sre(()=>Object.assign({},...t),t),b=Gv(g),x=Gv(u),y=Gv(h);return gF(dO,[l,e.id,b,x,y],()=>{let E=p?p(g,u,e):_x(g,u,e,d),F={...E},S=`${l}_${h.prefix}`,D=Jv(S),$=`${Tre}-${D}`;F._tokenKey=Fre(F,S);let[C,B]=cO(E,h.key,{prefix:h.prefix,ignore:h.ignore,unitless:h.unitless,preserve:h.preserve,hashPriority:o,hashCls:h.hashed?$:void 0});return C._hashId=D,_re(h.key),[C,$,F,B,h.key]},([,,,,E])=>{Pre(E,n)},([,,,E,F])=>{if(!E)return;let S={mark:dl,prepend:"queue",attachTo:a,priority:-999};S=hF(S,v);let D=Np(E,Jv(`css-var-${F}`),S);D[Kc]=n,D.setAttribute(Tx,F)})}var Rre=(e,t,r)=>{let[,,n,a,o]=e,{plain:l}=r||{};if(!a)return null;let u=n._tokenKey,d=-999,p={"data-rc-order":"prependQueue","data-rc-priority":`${d}`},h=xx(a,o,u,p,l);return[d,u,h]},Ore=A(_()),zre=A(_()),Lre={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Hre=Lre,un="-ms-",Kv="-moz-",Sr="-webkit-",fO="comm",vF="rule",bF="decl",qre="@import",Wre="@namespace",mO="@keyframes",Ure="@layer",Vre=Math.abs,Xv=String.fromCharCode,x4=Object.assign;function Gre(e,t){return ta(e,0)^45?(((t<<2^ta(e,0))<<2^ta(e,1))<<2^ta(e,2))<<2^ta(e,3):0}function hO(e){return e.trim()}function vu(e,t){return(e=t.exec(e))?e[0]:e}function Ht(e,t,r){return e.replace(t,r)}function U8(e,t){return e.indexOf(t)}function ta(e,t){return e.charCodeAt(t)|0}function Rp(e,t,r){return e.slice(t,r)}function xs(e){return e.length}function gO(e){return e.length}function Uv(e,t){return t.push(e),e}function Kre(e,t){return e.map(t).join("")}function IP(e,t){return e.filter(function(r){return!vu(r,t)})}var jx=1,kh=1,vO=0,zo=0,Vn=0,Ah="";function Nx(e,t,r,n,a,o,l,u){return{value:e,root:t,parent:r,type:n,props:a,children:o,line:jx,column:kh,length:l,return:"",siblings:u}}function Vc(e,t){return x4(Nx("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function mh(e){for(;e.root;)e=Vc(e.root,{children:[e]});Uv(e,e.siblings)}function Xre(){return Vn}function Qre(){return Vn=zo>0?ta(Ah,--zo):0,kh--,Vn===10&&(kh=1,jx--),Vn}function ks(){return Vn=zo<vO?ta(Ah,zo++):0,kh++,Vn===10&&(kh=1,jx++),Vn}function Xc(){return ta(Ah,zo)}function px(){return zo}function Px(e,t){return Rp(Ah,e,t)}function Zv(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Yre(e){return jx=kh=1,vO=xs(Ah=e),zo=0,[]}function Jre(e){return Ah="",e}function V8(e){return hO(Px(zo-1,E4(e===91?e+2:e===40?e+1:e)))}function Zre(e){for(;(Vn=Xc())&&Vn<33;)ks();return Zv(e)>2||Zv(Vn)>3?"":" "}function ene(e,t){for(;--t&&ks()&&!(Vn<48||Vn>102||Vn>57&&Vn<65||Vn>70&&Vn<97););return Px(e,px()+(t<6&&Xc()==32&&ks()==32))}function E4(e){for(;ks();)switch(Vn){case e:return zo;case 34:case 39:e!==34&&e!==39&&E4(Vn);break;case 40:e===41&&E4(e);break;case 92:ks();break}return zo}function tne(e,t){for(;ks()&&e+Vn!==57&&!(e+Vn===84&&Xc()===47););return"/*"+Px(t,zo-1)+"*"+Xv(e===47?e:ks())}function rne(e){for(;!Zv(Xc());)ks();return Px(e,zo)}function MP(e){return Jre(fx("",null,null,null,[""],e=Yre(e),0,[0],e))}function fx(e,t,r,n,a,o,l,u,d){for(var p=0,h=0,v=l,g=0,b=0,x=0,y=1,E=1,F=1,S=0,D=0,$="",C=a,B=o,M=n,I=$;E;)switch(x=D,D=ks()){case 40:x!=108&&ta(I,v-1)==58?(S++,I+="("):I+=V8(D);break;case 41:S--,I+=")";break;case 34:case 39:case 91:I+=V8(D);break;case 9:case 10:case 13:case 32:if(S>0){I+=Xv(D);break}I+=Zre(x);break;case 92:I+=ene(px()-1,7);continue;case 47:switch(Xc()){case 42:case 47:Uv(nne(tne(ks(),px()),t,r,d),d),(Zv(x||1)==5||Zv(Xc()||1)==5)&&xs(I)&&Rp(I,-1,void 0)!==" "&&(I+=" ");break;default:I+="/"}break;case 123*y:u[p++]=xs(I)*F;case 125*y:case 59:case 0:if(S>0&&D){I+=Xv(D);break}switch(D){case 0:case 125:E=0;case 59+h:F==-1&&(I=Ht(I,/\f/g,"")),b>0&&(xs(I)-v||y===0)&&Uv(b>32?_P(I+";",n,r,v-1,d):_P(Ht(I," ","")+";",n,r,v-2,d),d);break;case 59:I+=";";default:if(Uv(M=TP(I,t,r,p,h,a,u,$,C=[],B=[],v,o),o),D===123)if(h===0)fx(I,t,M,M,C,o,v,u,B);else{switch(g){case 99:if(ta(I,3)===110)break;case 108:if(ta(I,2)===97)break;default:h=0;case 100:case 109:case 115:}h?fx(e,M,M,n&&Uv(TP(e,M,M,0,0,a,u,$,a,C=[],v,B),B),a,B,v,u,n?C:B):fx(I,M,M,M,[""],B,0,u,B)}}p=h=b=0,y=F=1,$=I="",v=l;break;case 58:v=1+xs(I),b=x;default:if(y<1){if(D==123)--y;else if(D==125&&y++==0&&Qre()==125)continue}switch(I+=Xv(D),D*y){case 38:F=h>0?1:(I+="\f",-1);break;case 44:if(S>0)break;u[p++]=(xs(I)-1)*F,F=1;break;case 64:Xc()===45&&(I+=V8(ks())),g=Xc(),h=v=xs($=I+=rne(px())),D++;break;case 45:x===45&&xs(I)==2&&(y=0)}}return o}function TP(e,t,r,n,a,o,l,u,d,p,h,v){for(var g=a-1,b=a===0?o:[""],x=gO(b),y=0,E=0,F=0;y<n;++y)for(var S=0,D=Rp(e,g+1,g=Vre(E=l[y])),$=e;S<x;++S)($=hO(E>0?b[S]+" "+D:Ht(D,/&\f/g,b[S])))&&(d[F++]=$);return Nx(e,t,r,a===0?vF:u,d,p,h,v)}function nne(e,t,r,n){return Nx(e,t,r,fO,Xv(Xre()),Rp(e,2,-2),0,n)}function _P(e,t,r,n,a){return Nx(e,t,r,bF,Rp(e,0,n),Rp(e,n+1,-1),n,a)}function bO(e,t,r){switch(Gre(e,t)){case 5103:return Sr+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Sr+e+e;case 4855:return Sr+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return Kv+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Sr+e+Kv+e+un+e+e;case 5936:switch(ta(e,t+11)){case 114:return Sr+e+un+Ht(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Sr+e+un+Ht(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Sr+e+un+Ht(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Sr+e+un+e+e;case 6165:return Sr+e+un+"flex-"+e+e;case 5187:return Sr+e+Ht(e,/(\w+).+(:[^]+)/,Sr+"box-$1$2"+un+"flex-$1$2")+e;case 5443:return Sr+e+un+"flex-item-"+Ht(e,/flex-|-self/g,"")+(vu(e,/flex-|baseline/)?"":un+"grid-row-"+Ht(e,/flex-|-self/g,""))+e;case 4675:return Sr+e+un+"flex-line-pack"+Ht(e,/align-content|flex-|-self/g,"")+e;case 5548:return Sr+e+un+Ht(e,"shrink","negative")+e;case 5292:return Sr+e+un+Ht(e,"basis","preferred-size")+e;case 6060:return Sr+"box-"+Ht(e,"-grow","")+Sr+e+un+Ht(e,"grow","positive")+e;case 4554:return Sr+Ht(e,/([^-])(transform)/g,"$1"+Sr+"$2")+e;case 6187:return Ht(Ht(Ht(e,/(zoom-|grab)/,Sr+"$1"),/(image-set)/,Sr+"$1"),e,"")+e;case 5495:case 3959:return Ht(e,/(image-set\([^]*)/,Sr+"$1$`$1");case 4968:return Ht(Ht(e,/(.+:)(flex-)?(.*)/,Sr+"box-pack:$3"+un+"flex-pack:$3"),/space-between/,"justify")+Sr+e+e;case 4200:if(!vu(e,/flex-|baseline/))return un+"grid-column-align"+Rp(e,t)+e;break;case 2592:case 3360:return un+Ht(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,a){return t=a,vu(n.props,/grid-\w+-end/)})?~U8(e+(r=r[t].value),"span")?e:un+Ht(e,"-start","")+e+un+"grid-row-span:"+(~U8(r,"span")?vu(r,/\d+/):+vu(r,/\d+/)-+vu(e,/\d+/))+";":un+Ht(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return vu(n.props,/grid-\w+-start/)})?e:un+Ht(Ht(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Ht(e,/(.+)-inline(.+)/,Sr+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(xs(e)-1-t>6)switch(ta(e,t+1)){case 109:if(ta(e,t+4)!==45)break;case 102:return Ht(e,/(.+:)(.+)-([^]+)/,"$1"+Sr+"$2-$3$1"+Kv+(ta(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~U8(e,"stretch")?bO(Ht(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Ht(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,a,o,l,u,d,p){return un+a+":"+o+p+(l?un+a+"-span:"+(u?d:+d-+o)+p:"")+e});case 4949:if(ta(e,t+6)===121)return Ht(e,":",":"+Sr)+e;break;case 6444:switch(ta(e,ta(e,14)===45?18:11)){case 120:return Ht(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Sr+(ta(e,14)===45?"inline-":"")+"box$3$1"+Sr+"$2$3$1"+un+"$2box$3")+e;case 100:return Ht(e,":",":"+un)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Ht(e,"scroll-","scroll-snap-")+e}return e}function eb(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function jP(e,t,r,n){switch(e.type){case Ure:if(e.children.length)break;case qre:case Wre:case bF:return e.return=e.return||e.value;case fO:return"";case mO:return e.return=e.value+"{"+eb(e.children,n)+"}";case vF:if(!xs(e.value=e.props.join(",")))return""}return xs(r=eb(e.children,n))?e.return=e.value+"{"+r+"}":""}function ane(e){var t=gO(e);return function(r,n,a,o){for(var l="",u=0;u<t;u++)l+=e[u](r,n,a,o)||"";return l}}function ine(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case bF:e.return=bO(e.value,e.length,r);return;case mO:return eb([Vc(e,{value:Ht(e.value,"@","@"+Sr)})],n);case vF:if(e.length)return Kre(r=e.props,function(a){switch(vu(a,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":mh(Vc(e,{props:[Ht(a,/:(read-\w+)/,":"+Kv+"$1")]})),mh(Vc(e,{props:[a]})),x4(e,{props:IP(r,n)});break;case"::placeholder":mh(Vc(e,{props:[Ht(a,/:(plac\w+)/,":"+Sr+"input-$1")]})),mh(Vc(e,{props:[Ht(a,/:(plac\w+)/,":"+Kv+"$1")]})),mh(Vc(e,{props:[Ht(a,/:(plac\w+)/,un+"input-$1")]})),mh(Vc(e,{props:[a]})),x4(e,{props:IP(r,n)});break}return""})}}var NP="data-ant-cssinjs-cache-path",yO="_FILE_STYLE__",Pp,wO=!0;function one(){if(!Pp&&(Pp={},Ka())){let e=document.createElement("div");e.className=NP,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);let t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(n=>{let[a,o]=n.split(":");Pp[a]=o});let r=document.querySelector(`style[${NP}]`);r&&(wO=!1,r.parentNode?.removeChild(r)),document.body.removeChild(e)}}function sne(e){return one(),!!Pp[e]}function lne(e){let t=Pp[e],r=null;if(t&&Ka())if(wO)r=yO;else{let n=document.querySelector(`style[${dl}="${Pp[e]}"]`);n?r=n.innerHTML:delete Pp[e]}return[r,t]}var une="_skip_check_",xO="_multi_value_";function mx(e,t){return(t?eb(MP(e),ane([ine,jP])):eb(MP(e),jP)).replace(/\{%%%\:[^;];}/g,";")}function cne(e){return typeof e=="object"&&e&&(une in e||xO in e)}function PP(e,t,r="high"){if(!t)return e;let n=uO({hashCls:t,hashPriority:r});return e.split(",").map(a=>{let o=a.trim().split(/\s+/),l=o[0]||"",u=l.match(/^\w+/)?.[0]||"";return l=`${u}${n}${l.slice(u.length)}`,[l,...o.slice(1)].join(" ")}).join(",")}var k4=(e,t={},{root:r,injectHash:n,parentSelectors:a}={root:!0,parentSelectors:[]})=>{let{hashId:o,layer:l,path:u,hashPriority:d,transformers:p=[],linters:h=[]}=t,v="",g={};function b(y){let E=y.getName(o);if(!g[E]){let[F]=k4(y.style,t,{root:!1,parentSelectors:a});g[E]=`@keyframes ${y.getName(o)}${F}`}}function x(y,E=[]){return y.forEach(F=>{Array.isArray(F)?x(F,E):F&&E.push(F)}),E}return x(Array.isArray(e)?e:[e]).forEach(y=>{let E=typeof y=="string"&&!r?{}:y;if(typeof E=="string")v+=`${E}
95
+ `;else if(E._keyframe)b(E);else{let F=p.reduce((S,D)=>D?.visit?.(S)||S,E);Object.keys(F).forEach(S=>{let D=F[S];if(typeof D=="object"&&D&&(S!=="animationName"||!D._keyframe)&&!cne(D)){let $=!1,C=S.trim(),B=!1;(r||n)&&o?C.startsWith("@")?$=!0:C==="&"?C=PP("",o,d):C=PP(S,o,d):r&&!o&&(C==="&"||C==="")&&(C="",B=!0);let[M,I]=k4(D,t,{root:B,injectHash:$,parentSelectors:[...a,C]});g={...g,...I},v+=`${C}${M}`}else{let $=function(B,M){let I=B.replace(/[A-Z]/g,N=>`-${N.toLowerCase()}`),j=M;!Hre[B]&&typeof j=="number"&&j!==0&&(j=`${j}px`),B==="animationName"&&M?._keyframe&&(b(M),j=M.getName(o)),v+=`${I}:${j};`},C=D?.value??D;typeof D=="object"&&D?.[xO]&&Array.isArray(C)?C.forEach(B=>{$(S,B)}):$re(C)&&$(S,C)}})}}),r?l&&(v&&(v=`@layer ${l.name} {${v}}`),l.dependencies&&(g[`@layer ${l.name}`]=l.dependencies.map(y=>`@layer ${y}, ${l.name};`).join(`
96
+ `))):v=`{${v}}`,[v,g]};function EO(e,t){return Jv(`${e.join("%")}${t}`)}var kO="style";function C4(e,t){let{path:r,hashId:n,layer:a,nonce:o,clientOnly:l,order:u=0}=e,{mock:d,hashPriority:p,container:h,transformers:v,linters:g,cache:b,layer:x,autoPrefix:y}=zre.useContext(rd),E=[n||""];x&&E.push("layer"),E.push(...r);let F=w4;gF(kO,E,()=>{let S=E.join("|");if(sne(S)){let[I,j]=lne(S);if(I)return[I,j,{},l,u]}let D=t(),[$,C]=k4(D,{hashId:n,hashPriority:p,layer:x?a:void 0,path:r.join("-"),transformers:v,linters:g}),B=mx($,y||!1),M=EO(E,B);return[B,M,C,l,u]},(S,D)=>{let[,$]=S;D&&w4&&Yv($,{mark:dl,attachTo:h})},S=>{let[D,$,C,,B]=S;if(F&&D!==yO){let M={mark:dl,prepend:x?!1:"queue",attachTo:h,priority:B};M=hF(M,o);let I=[],j=[];Object.keys(C).forEach(R=>{R.startsWith("@layer")?I.push(R):j.push(R)}),I.forEach(R=>{Np(mx(C[R],y||!1),`_layer-${R}`,{...M,prepend:!0})});let N=Np(D,$,M);N[Kc]=b.instanceId,j.forEach(R=>{Np(mx(C[R],y||!1),`_effect-${R}`,M)})}})}var dne=(e,t,r)=>{let[n,a,o,l,u]=e,{plain:d,autoPrefix:p}=r||{};if(l)return null;let h=n,v={"data-rc-order":"prependQueue","data-rc-priority":`${u}`};return h=xx(n,void 0,a,v,d),o&&Object.keys(o).forEach(g=>{if(!t[g]){t[g]=!0;let b=mx(o[g],p||!1),x=xx(b,void 0,`_effect-${g}`,v,d);g.startsWith("@layer")?h=x+h:h+=x}}),[u,a,h]},CO="cssVar",pne=(e,t)=>{let{key:r,prefix:n,unitless:a,ignore:o,token:l,hashId:u,scope:d,nonce:p}=e,{cache:{instanceId:h},container:v,hashPriority:g}=(0,Ore.useContext)(rd),{_tokenKey:b}=l,x=Array.isArray(d)?d.join("@@"):d,y=[...e.path,r,x,b];return gF(CO,y,()=>{let E=t(),[F,S]=cO(E,r,{prefix:n,unitless:a,ignore:o,scope:d,hashPriority:g,hashCls:u}),D=EO(y,S);return[F,S,D,r]},([,,E])=>{w4&&Yv(E,{mark:dl,attachTo:v})},([,E,F])=>{if(!E)return;let S={mark:dl,prepend:"queue",attachTo:v,priority:-999};S=hF(S,p);let D=Np(E,F,S);D[Kc]=h,D.setAttribute(Tx,r)})},fne=(e,t,r)=>{let[,n,a,o]=e,{plain:l}=r||{};if(!n)return null;let u=-999,d={"data-rc-order":"prependQueue","data-rc-priority":`${u}`},p=xx(n,o,a,d,l);return[u,a,p]},mne=pne,V$e={[kO]:dne,[dO]:Rre,[CO]:fne},hne=class{constructor(e,t){ae(this,"name"),ae(this,"style"),ae(this,"_keyframe",!0),this.name=e,this.style=t}getName(e=""){return e?`${e}-${this.name}`:this.name}},Dt=hne;function hh(e){return e.notSplit=!0,e}var G$e={inset:["top","right","bottom","left"],insetBlock:["top","bottom"],insetBlockStart:["top"],insetBlockEnd:["bottom"],insetInline:["left","right"],insetInlineStart:["left"],insetInlineEnd:["right"],marginBlock:["marginTop","marginBottom"],marginBlockStart:["marginTop"],marginBlockEnd:["marginBottom"],marginInline:["marginLeft","marginRight"],marginInlineStart:["marginLeft"],marginInlineEnd:["marginRight"],paddingBlock:["paddingTop","paddingBottom"],paddingBlockStart:["paddingTop"],paddingBlockEnd:["paddingBottom"],paddingInline:["paddingLeft","paddingRight"],paddingInlineStart:["paddingLeft"],paddingInlineEnd:["paddingRight"],borderBlock:hh(["borderTop","borderBottom"]),borderBlockStart:hh(["borderTop"]),borderBlockEnd:hh(["borderBottom"]),borderInline:hh(["borderLeft","borderRight"]),borderInlineStart:hh(["borderLeft"]),borderInlineEnd:hh(["borderRight"]),borderBlockWidth:["borderTopWidth","borderBottomWidth"],borderBlockStartWidth:["borderTopWidth"],borderBlockEndWidth:["borderBottomWidth"],borderInlineWidth:["borderLeftWidth","borderRightWidth"],borderInlineStartWidth:["borderLeftWidth"],borderInlineEndWidth:["borderRightWidth"],borderBlockStyle:["borderTopStyle","borderBottomStyle"],borderBlockStartStyle:["borderTopStyle"],borderBlockEndStyle:["borderBottomStyle"],borderInlineStyle:["borderLeftStyle","borderRightStyle"],borderInlineStartStyle:["borderLeftStyle"],borderInlineEndStyle:["borderRightStyle"],borderBlockColor:["borderTopColor","borderBottomColor"],borderBlockStartColor:["borderTopColor"],borderBlockEndColor:["borderBottomColor"],borderInlineColor:["borderLeftColor","borderRightColor"],borderInlineStartColor:["borderLeftColor"],borderInlineEndColor:["borderRightColor"],borderStartStartRadius:["borderTopLeftRadius"],borderStartEndRadius:["borderTopRightRadius"],borderEndStartRadius:["borderBottomLeftRadius"],borderEndEndRadius:["borderBottomRightRadius"]},gne="6.6.5",vne=gne,bne=A(_()),ib={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},yne={...ib,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
97
+ 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
98
+ 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,focusOutline:!0,motion:!0},Jc=yne,wne={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},ha=Math.round;function G8(e,t){let r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(a=>parseFloat(a));for(let a=0;a<3;a+=1)n[a]=t(n[a]||0,r[a]||"",a);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}var RP=(e,t,r)=>r===0?e:e/100;function Hv(e,t){let r=t||255;return e>r?r:e<0?0:e}var Ar=class SO{constructor(t){ae(this,"isValid",!0),ae(this,"r",0),ae(this,"g",0),ae(this,"b",0),ae(this,"a",1),ae(this,"_h"),ae(this,"_hsl_s"),ae(this,"_hsv_s"),ae(this,"_l"),ae(this,"_v"),ae(this,"_max"),ae(this,"_min"),ae(this,"_brightness");function r(n){return n[0]in t&&n[1]in t&&n[2]in t}if(t)if(typeof t=="string"){let n=function(o){return a.startsWith(o)},a=t.trim();if(/^#?[A-F\d]{3,8}$/i.test(a))this.fromHexString(a);else if(n("rgb"))this.fromRgbString(a);else if(n("hsl"))this.fromHslString(a);else if(n("hsv")||n("hsb"))this.fromHsvString(a);else{let o=wne[a.toLowerCase()];o&&this.fromHexString(parseInt(o,36).toString(16).padStart(6,"0"))}}else if(t instanceof SO)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._hsl_s=t._hsl_s,this._hsv_s=t._hsv_s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=Hv(t.r),this.g=Hv(t.g),this.b=Hv(t.b),this.a=typeof t.a=="number"?Hv(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){let r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(o){let l=o/255;return l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4)}let r=t(this.r),n=t(this.g),a=t(this.b);return .2126*r+.7152*n+.0722*a}getHue(){if(typeof this._h>"u"){let t=this.getMax()-this.getMin();t===0?this._h=0:this._h=ha(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){return this.getHSVSaturation()}getHSVSaturation(){if(typeof this._hsv_s>"u"){let t=this.getMax()-this.getMin();t===0?this._hsv_s=0:this._hsv_s=t/this.getMax()}return this._hsv_s}getHSLSaturation(){if(typeof this._hsl_s>"u"){let t=this.getMax()-this.getMin();if(t===0)this._hsl_s=0;else{let r=this.getLightness();this._hsl_s=t/255/(1-Math.abs(2*r-1))}}return this._hsl_s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){let r=this.getHue(),n=this.getSaturation(),a=this.getLightness()-t/100;return a<0&&(a=0),this._c({h:r,s:n,l:a,a:this.a})}lighten(t=10){let r=this.getHue(),n=this.getSaturation(),a=this.getLightness()+t/100;return a>1&&(a=1),this._c({h:r,s:n,l:a,a:this.a})}mix(t,r=50){let n=this._c(t),a=r/100,o=u=>(n[u]-this[u])*a+this[u],l={r:ha(o("r")),g:ha(o("g")),b:ha(o("b")),a:ha(o("a")*100)/100};return this._c(l)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){let r=this._c(t),n=this.a+r.a*(1-this.a),a=o=>ha((this[o]*this.a+r[o]*r.a*(1-this.a))/n);return this._c({r:a("r"),g:a("g"),b:a("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#",r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;let n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;let a=(this.b||0).toString(16);if(t+=a.length===2?a:"0"+a,typeof this.a=="number"&&this.a>=0&&this.a<1){let o=ha(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getHSLSaturation(),l:this.getLightness(),a:this.a}}toHslString(){let t=this.getHue(),r=ha(this.getHSLSaturation()*100),n=ha(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getHSVSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,r,n){let a=this.clone();return a[t]=Hv(r,n),a}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){let r=t.replace("#","");function n(a,o){return parseInt(r[a]+r[o||a],16)}r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:t,s:r,l:n,a}){let o=(t%360+360)%360;if(this._h=o,this._hsl_s=r,this._l=n,this.a=typeof a=="number"?a:1,r<=0){let b=ha(n*255);this.r=b,this.g=b,this.b=b;return}let l=0,u=0,d=0,p=o/60,h=(1-Math.abs(2*n-1))*r,v=h*(1-Math.abs(p%2-1));p>=0&&p<1?(l=h,u=v):p>=1&&p<2?(l=v,u=h):p>=2&&p<3?(u=h,d=v):p>=3&&p<4?(u=v,d=h):p>=4&&p<5?(l=v,d=h):p>=5&&p<6&&(l=h,d=v);let g=n-h/2;this.r=ha((l+g)*255),this.g=ha((u+g)*255),this.b=ha((d+g)*255)}fromHsv({h:t,s:r,v:n,a}){let o=(t%360+360)%360;this._h=o,this._hsv_s=r,this._v=n,this.a=typeof a=="number"?a:1;let l=ha(n*255);if(this.r=l,this.g=l,this.b=l,r<=0)return;let u=o/60,d=Math.floor(u),p=u-d,h=ha(n*(1-r)*255),v=ha(n*(1-r*p)*255),g=ha(n*(1-r*(1-p))*255);switch(d){case 0:this.g=g,this.b=h;break;case 1:this.r=v,this.b=h;break;case 2:this.r=h,this.b=g;break;case 3:this.r=h,this.g=v;break;case 4:this.r=g,this.g=h;break;default:this.g=h,this.b=v;break}}fromHsvString(t){let r=G8(t,RP);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){let r=G8(t,RP);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){let r=G8(t,(n,a)=>a.includes("%")?ha(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}},Z5=2,OP=.16,xne=.05,Ene=.05,kne=.15,FO=5,$O=4,Cne=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function zP(e,t,r){let n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-Z5*t:Math.round(e.h)+Z5*t:n=r?Math.round(e.h)+Z5*t:Math.round(e.h)-Z5*t,n<0?n+=360:n>=360&&(n-=360),n}function LP(e,t,r){if(e.h===0&&e.s===0)return e.s;let n;return r?n=e.s-OP*t:t===$O?n=e.s+OP:n=e.s+xne*t,n>1&&(n=1),r&&t===FO&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function HP(e,t,r){let n;return r?n=e.v+Ene*t:n=e.v-kne*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function Bh(e,t={}){let r=[],n=new Ar(e),a=n.toHsv();for(let o=FO;o>0;o-=1){let l=new Ar({h:zP(a,o,!0),s:LP(a,o,!0),v:HP(a,o,!0)});r.push(l)}r.push(n);for(let o=1;o<=$O;o+=1){let l=new Ar({h:zP(a,o),s:LP(a,o),v:HP(a,o)});r.push(l)}return t.theme==="dark"?Cne.map(({index:o,amount:l})=>new Ar(t.backgroundColor||"#141414").mix(r[o],l).toHexString()):r.map(o=>o.toHexString())}var hx={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},S4=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];S4.primary=S4[5];var F4=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];F4.primary=F4[5];var $4=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];$4.primary=$4[5];var Ch=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Ch.primary=Ch[5];var D4=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];D4.primary=D4[5];var A4=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];A4.primary=A4[5];var B4=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];B4.primary=B4[5];var I4=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];I4.primary=I4[5];var M4=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];M4.primary=M4[5];var T4=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];T4.primary=T4[5];var _4=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];_4.primary=_4[5];var j4=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];j4.primary=j4[5];var N4=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];N4.primary=N4[5];var K8={red:S4,volcano:F4,orange:$4,gold:Ch,yellow:D4,lime:A4,green:B4,cyan:I4,blue:M4,geekblue:T4,purple:_4,magenta:j4,grey:N4},qP=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];qP.primary=qP[5];var WP=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];WP.primary=WP[5];var UP=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];UP.primary=UP[5];var VP=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];VP.primary=VP[5];var GP=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];GP.primary=GP[5];var KP=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];KP.primary=KP[5];var XP=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];XP.primary=XP[5];var QP=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];QP.primary=QP[5];var YP=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];YP.primary=YP[5];var JP=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];JP.primary=JP[5];var ZP=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];ZP.primary=ZP[5];var eR=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];eR.primary=eR[5];var tR=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];tR.primary=tR[5];var hi=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Rx(e,{generateColorPalettes:t,generateNeutralColorPalettes:r}){let{colorSuccess:n,colorWarning:a,colorError:o,colorInfo:l,colorPrimary:u,colorBgBase:d,colorTextBase:p}=e,h=t(u),v=t(n),g=t(a),b=t(o),x=t(l),y=r(d,p),E=e.colorLink||e.colorInfo,F=t(E),S=new Ar(b[1]).mix(new Ar(b[3]),50).toHexString(),D={};return hi.forEach($=>{let C=e[$];if(C){let B=t(C);D[`${$}Hover`]=B[5],D[`${$}Active`]=B[7]}}),{...y,colorPrimaryBg:h[1],colorPrimaryBgHover:h[2],colorPrimaryBorder:h[3],colorPrimaryBorderHover:h[4],colorPrimaryHover:h[5],colorPrimary:h[6],colorPrimaryActive:h[7],colorPrimaryTextHover:h[8],colorPrimaryText:h[9],colorPrimaryTextActive:h[10],colorSuccessBg:v[1],colorSuccessBgHover:v[2],colorSuccessBorder:v[3],colorSuccessBorderHover:v[4],colorSuccessHover:v[4],colorSuccess:v[6],colorSuccessActive:v[7],colorSuccessTextHover:v[8],colorSuccessText:v[9],colorSuccessTextActive:v[10],colorErrorBg:b[1],colorErrorBgHover:b[2],colorErrorBgFilledHover:S,colorErrorBgActive:b[3],colorErrorBorder:b[3],colorErrorBorderHover:b[4],colorErrorHover:b[5],colorError:b[6],colorErrorActive:b[7],colorErrorTextHover:b[8],colorErrorText:b[9],colorErrorTextActive:b[10],colorWarningBg:g[1],colorWarningBgHover:g[2],colorWarningBorder:g[3],colorWarningBorderHover:g[4],colorWarningHover:g[4],colorWarning:g[6],colorWarningActive:g[7],colorWarningTextHover:g[8],colorWarningText:g[9],colorWarningTextActive:g[10],colorInfoBg:x[1],colorInfoBgHover:x[2],colorInfoBorder:x[3],colorInfoBorderHover:x[4],colorInfoHover:x[4],colorInfo:x[6],colorInfoActive:x[7],colorInfoTextHover:x[8],colorInfoText:x[9],colorInfoTextActive:x[10],colorLinkHover:F[4],colorLink:F[6],colorLinkActive:F[7],...D,colorBgMask:new Ar("#000").setA(.45).toRgbString(),colorWhite:"#fff"}}var Sne=e=>{let t=e,r=e,n=e,a=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?r=4:e<8&&e>=7?r=5:e<14&&e>=8?r=6:e<16&&e>=14?r=7:e>=16&&(r=8),e<6&&e>=2?n=1:e>=6&&(n=2),e>4&&e<8?a=4:e>=8&&(a=6),{borderRadius:e,borderRadiusXS:n,borderRadiusSM:r,borderRadiusLG:t,borderRadiusOuter:a}},Fne=Sne;function $ne(e){let{motionUnit:t,motionBase:r,borderRadius:n,lineWidth:a}=e;return{motionDurationFast:`${(r+t).toFixed(1)}s`,motionDurationMid:`${(r+t*2).toFixed(1)}s`,motionDurationSlow:`${(r+t*3).toFixed(1)}s`,lineWidthBold:a+1,...Fne(n)}}var Dne=e=>{let{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},Ox=Dne;function Ih(e){return(e+8)/e}function Ane(e){let t=Array.from({length:10}).map((r,n)=>{let a=n-1,o=e*Math.E**(a/5),l=n>1?Math.floor(o):Math.ceil(o);return Math.floor(l/2)*2});return t[1]=e,t.map(r=>({size:r,lineHeight:Ih(r)}))}var Bne=e=>{let t=Ane(e),r=t.map(h=>h.size),n=t.map(h=>h.lineHeight),a=r[1],o=r[0],l=r[2],u=n[1],d=n[0],p=n[2];return{fontSizeSM:o,fontSize:a,fontSizeLG:l,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:u,lineHeightLG:p,lineHeightSM:d,fontHeight:Math.round(u*a),fontHeightLG:Math.round(p*l),fontHeightSM:Math.round(d*o),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}},zx=Bne;function Ine(e){let{sizeUnit:t,sizeStep:r}=e;return{sizeXXL:t*(r+8),sizeXL:t*(r+4),sizeLG:t*(r+2),sizeMD:t*(r+1),sizeMS:t*r,size:t*r,sizeSM:t*(r-1),sizeXS:t*(r-2),sizeXXS:t*(r-3)}}var Ro=(e,t)=>new Ar(e).setA(t).toRgbString(),gh=(e,t)=>new Ar(e).darken(t).toHexString(),Mne=e=>{let t=Bh(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},Tne=(e,t,r)=>{let n=e||"#fff",a=t||"#000";return{colorBgBase:n,colorTextBase:a,colorShadow:r||"#000",colorText:Ro(a,.88),colorTextSecondary:Ro(a,.65),colorTextTertiary:Ro(a,.45),colorTextQuaternary:Ro(a,.25),colorFill:Ro(a,.15),colorFillSecondary:Ro(a,.06),colorFillTertiary:Ro(a,.04),colorFillQuaternary:Ro(a,.02),colorBgSolid:Ro(a,1),colorBgSolidHover:Ro(a,.75),colorBgSolidActive:Ro(a,.95),colorBgLayout:gh(n,4),colorBgContainer:gh(n,0),colorBgElevated:gh(n,0),colorBgSpotlight:Ro(a,.85),colorBgBlur:"transparent",colorBorder:gh(n,15),colorBorderDisabled:gh(n,15),colorBorderSecondary:gh(n,6)}};function Mh(e){hx.pink=hx.magenta,K8.pink=K8.magenta;let t=Object.keys(ib).map(r=>{let n=e[r]===hx[r]?K8[r]:Bh(e[r]);return Array.from({length:10},()=>1).reduce((a,o,l)=>(a[`${r}-${l+1}`]=n[l],a[`${r}${l+1}`]=n[l],a),{})}).reduce((r,n)=>(r={...r,...n},r),{});return{...e,...t,...Rx(e,{generateColorPalettes:Mne,generateNeutralColorPalettes:Tne}),...zx(e.fontSize),...Ine(e),...Ox(e),...$ne(e)}}var _ne=Eh(Mh),ob=_ne,Op={token:Jc,override:{override:Jc},hashed:!0},sb=bne.default.createContext(Op);function X8(e){return e>=0&&e<=255}function jne(e,t){let{r,g:n,b:a,a:o}=new Ar(e).toRgb();if(o<1)return e;let{r:l,g:u,b:d}=new Ar(t).toRgb();for(let p=.01;p<=1;p+=.01){let h=Math.round((r-l*(1-p))/p),v=Math.round((n-u*(1-p))/p),g=Math.round((a-d*(1-p))/p);if(X8(h)&&X8(v)&&X8(g))return new Ar({r:h,g:v,b:g,a:Math.round(p*100)/100}).toRgbString()}return new Ar({r,g:n,b:a,a:1}).toRgbString()}var _p=jne;function Lx(e){let{override:t,...r}=e,n={...t};Object.keys(Jc).forEach(y=>{delete n[y]});let a={...r,...n},o=new Ar(a.colorShadow),l=o.a,u=y=>o.clone().setA(l*y).toRgbString(),d=480,p=576,h=768,v=992,g=1200,b=1600,x=1920;return a.motion===!1&&(a.motionDurationFast="0s",a.motionDurationMid="0s",a.motionDurationSlow="0s"),{...a,colorFillContent:a.colorFillSecondary,colorFillContentHover:a.colorFill,colorFillAlter:a.colorFillQuaternary,colorBgContainerDisabled:a.colorFillTertiary,colorBorderBg:a.colorBgContainer,colorSplit:_p(a.colorBorderSecondary,a.colorBgContainer),colorTextPlaceholder:a.colorTextQuaternary,colorTextDisabled:a.colorTextQuaternary,colorTextHeading:a.colorText,colorTextLabel:a.colorTextSecondary,colorTextDescription:a.colorTextTertiary,colorTextLightSolid:a.colorWhite,colorHighlight:a.colorError,colorBgTextHover:a.colorFillSecondary,colorBgTextActive:a.colorFill,colorIcon:a.colorTextTertiary,colorIconHover:a.colorText,colorErrorOutline:_p(a.colorErrorBg,a.colorBgContainer),colorWarningOutline:_p(a.colorWarningBg,a.colorBgContainer),colorErrorAffix:a.colorError,colorWarningAffix:a.colorWarning,fontHeight:Math.round(a.fontSize*a.lineHeight),fontHeightSM:Math.round(a.fontSizeSM*a.lineHeightSM),fontHeightLG:Math.round(a.fontSizeLG*a.lineHeightLG),fontSizeIcon:a.fontSizeSM,lineWidthFocus:a.focusOutline===!1?0:a.lineWidth*3,lineWidth:a.lineWidth,controlOutlineWidth:a.lineWidth*2,controlInteractiveSize:a.controlHeight/2,controlItemBgHover:a.colorFillTertiary,controlItemBgActive:a.colorPrimaryBg,controlItemBgActiveHover:a.colorPrimaryBgHover,controlItemBgActiveDisabled:a.colorFill,controlTmpOutline:a.colorFillQuaternary,controlOutline:_p(a.colorPrimaryBg,a.colorBgContainer),lineType:a.lineType,borderRadius:a.borderRadius,borderRadiusXS:a.borderRadiusXS,borderRadiusSM:a.borderRadiusSM,borderRadiusLG:a.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:a.sizeXXS,paddingXS:a.sizeXS,paddingSM:a.sizeSM,padding:a.size,paddingMD:a.sizeMD,paddingLG:a.sizeLG,paddingXL:a.sizeXL,paddingContentHorizontalLG:a.sizeLG,paddingContentVerticalLG:a.sizeMS,paddingContentHorizontal:a.sizeMS,paddingContentVertical:a.sizeSM,paddingContentHorizontalSM:a.size,paddingContentVerticalSM:a.sizeXS,marginXXS:a.sizeXXS,marginXS:a.sizeXS,marginSM:a.sizeSM,margin:a.size,marginMD:a.sizeMD,marginLG:a.sizeLG,marginXL:a.sizeXL,marginXXL:a.sizeXXL,boxShadow:`
99
+ 0 6px 16px 0 ${u(.08)},
100
+ 0 3px 6px -4px ${u(.12)},
101
+ 0 9px 28px 8px ${u(.05)}
102
+ `,boxShadowSecondary:`
103
+ 0 6px 16px 0 ${u(.08)},
104
+ 0 3px 6px -4px ${u(.12)},
105
+ 0 9px 28px 8px ${u(.05)}
106
+ `,boxShadowTertiary:`
107
+ 0 1px 2px 0 ${u(.05)},
108
+ 0 1px 6px -1px ${u(.03)},
109
+ 0 2px 4px 0 ${u(.03)}
110
+ `,screenXS:d,screenXSMin:d,screenXSMax:p-1,screenSM:p,screenSMMin:p,screenSMMax:h-1,screenMD:h,screenMDMin:h,screenMDMax:v-1,screenLG:v,screenLGMin:v,screenLGMax:g-1,screenXL:g,screenXLMin:g,screenXLMax:b-1,screenXXL:b,screenXXLMin:b,screenXXLMax:x-1,screenXXXL:x,screenXXXLMin:x,boxShadowPopoverArrow:`2px 2px 5px ${u(.05)}`,dropShadowPopover:`drop-shadow(0 6px 16px ${u(.08)}) drop-shadow(0 3px 6px ${u(.12)}) drop-shadow(0 9px 28px ${u(.05)})`,boxShadowCard:`
111
+ 0 1px 2px -2px ${u(.16)},
112
+ 0 3px 6px 0 ${u(.12)},
113
+ 0 5px 12px 4px ${u(.09)}
114
+ `,boxShadowDrawerRight:`
115
+ -6px 0 16px 0 ${u(.08)},
116
+ -3px 0 6px -4px ${u(.12)},
117
+ -9px 0 28px 8px ${u(.05)}
118
+ `,boxShadowDrawerLeft:`
119
+ 6px 0 16px 0 ${u(.08)},
120
+ 3px 0 6px -4px ${u(.12)},
121
+ 9px 0 28px 8px ${u(.05)}
122
+ `,boxShadowDrawerUp:`
123
+ 0 6px 16px 0 ${u(.08)},
124
+ 0 3px 6px -4px ${u(.12)},
125
+ 0 9px 28px 8px ${u(.05)}
126
+ `,boxShadowDrawerDown:`
127
+ 0 -6px 16px 0 ${u(.08)},
128
+ 0 -3px 6px -4px ${u(.12)},
129
+ 0 -9px 28px 8px ${u(.05)}
130
+ `,boxShadowTabsOverflowLeft:`inset 10px 0 8px -8px ${u(.08)}`,boxShadowTabsOverflowRight:`inset -10px 0 8px -8px ${u(.08)}`,boxShadowTabsOverflowTop:`inset 0 10px 8px -8px ${u(.08)}`,boxShadowTabsOverflowBottom:`inset 0 -10px 8px -8px ${u(.08)}`,...n}}var DO={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},Nne={motionBase:!0,motionUnit:!0},Pne={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0,screenXXLMax:!0,screenXXXL:!0,screenXXXLMin:!0},AO=(e,t,r)=>{let n=r.getDerivativeToken(e),{override:a,...o}=t,l={...n,override:a};return l=Lx(l),o&&Object.entries(o).forEach(([u,d])=>{let{theme:p,...h}=d,v=h;p&&(v=AO({...l,...h},{override:h},p)),l[u]=v}),l};function Aa(){let{token:e,hashed:t,theme:r,override:n,cssVar:a,zeroRuntime:o}=FP.default.useContext(sb),{csp:l,getPrefixCls:u}=FP.default.useContext(st),d={prefix:a?.prefix??u(),key:a?.key??"css-var-root"},p=`${vne}-${t||""}`,h=r||ob,[v,g,b]=pO(h,[Jc,e],{salt:p,override:n,getComputedToken:AO,cssVar:{...d,unitless:DO,ignore:Nne,preserve:Pne},nonce:l?.nonce});return[h,b,t?g:"",v,d,!!o]}function Cs(e){"@babel/helpers - typeof";return Cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cs(e)}function Rne(e){if(Array.isArray(e))return e}function One(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,l,u=[],d=!0,p=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;d=!1}else for(;!(d=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);d=!0);}catch(h){p=!0,a=h}finally{try{if(!d&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(p)throw a}}return u}}function zne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
131
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yF(e,t){return Rne(e)||One(e,t)||aO(e,t)||zne()}function Lne(e,t){if(Cs(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Cs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BO(e){var t=Lne(e,"string");return Cs(t)=="symbol"?t:t+""}function Oo(e,t,r){return(t=BO(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ji(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rR(Object(r),!0).forEach(function(n){Oo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Hne=A(_());function wu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nR(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,BO(n.key),n)}}function xu(e,t,r){return t&&nR(e.prototype,t),r&&nR(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qv(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P4(e,t){return P4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},P4(e,t)}function lb(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P4(e,t)}function Zc(e){return Zc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zc(e)}function ub(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ub=function(){return!!e})()}function Hx(e,t){if(t&&(Cs(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qv(e)}function IO(e){var t=ub();return function(){var r,n=Zc(e);if(t){var a=Zc(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return Hx(this,r)}}var qne=xu(function e(){wu(this,e)}),MO=qne,TO="CALC_UNIT",Wne=new RegExp(TO,"g");function Q8(e){return typeof e=="number"?"".concat(e).concat(TO):e}var Une=(function(e){lb(r,e);var t=IO(r);function r(n,a){var o;wu(this,r),o=t.call(this),Oo(Qv(o),"result",""),Oo(Qv(o),"unitlessCssVar",void 0),Oo(Qv(o),"lowPriority",void 0);var l=Cs(n);return o.unitlessCssVar=a,n instanceof r?o.result="(".concat(n.result,")"):l==="number"?o.result=Q8(n):l==="string"&&(o.result=n),o}return xu(r,[{key:"add",value:function(n){return n instanceof r?this.result="".concat(this.result," + ").concat(n.getResult()):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," + ").concat(Q8(n))),this.lowPriority=!0,this}},{key:"sub",value:function(n){return n instanceof r?this.result="".concat(this.result," - ").concat(n.getResult()):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," - ").concat(Q8(n))),this.lowPriority=!0,this}},{key:"mul",value:function(n){return this.lowPriority&&(this.result="(".concat(this.result,")")),n instanceof r?this.result="".concat(this.result," * ").concat(n.getResult(!0)):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," * ").concat(n)),this.lowPriority=!1,this}},{key:"div",value:function(n){return this.lowPriority&&(this.result="(".concat(this.result,")")),n instanceof r?this.result="".concat(this.result," / ").concat(n.getResult(!0)):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," / ").concat(n)),this.lowPriority=!1,this}},{key:"getResult",value:function(n){return this.lowPriority||n?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(n){var a=this,o=n||{},l=o.unit,u=!0;return typeof l=="boolean"?u=l:Array.from(this.unitlessCssVar).some(function(d){return a.result.includes(d)})&&(u=!1),this.result=this.result.replace(Wne,u?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),r})(MO),Vne=(function(e){lb(r,e);var t=IO(r);function r(n){var a;return wu(this,r),a=t.call(this),Oo(Qv(a),"result",0),n instanceof r?a.result=n.result:typeof n=="number"&&(a.result=n),a}return xu(r,[{key:"add",value:function(n){return n instanceof r?this.result+=n.result:typeof n=="number"&&(this.result+=n),this}},{key:"sub",value:function(n){return n instanceof r?this.result-=n.result:typeof n=="number"&&(this.result-=n),this}},{key:"mul",value:function(n){return n instanceof r?this.result*=n.result:typeof n=="number"&&(this.result*=n),this}},{key:"div",value:function(n){return n instanceof r?this.result/=n.result:typeof n=="number"&&(this.result/=n),this}},{key:"equal",value:function(){return this.result}}]),r})(MO),Gne=Vne,Kne=function(e,t){var r=e==="css"?Une:Gne;return function(n){return new r(n,t)}},Xne=Kne,Qne=function(e,t){return"".concat([t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))},aR=Qne;function Yne(e,t,r,n){var a=ji({},t[e]);if(n!=null&&n.deprecatedTokens){var o=n.deprecatedTokens;o.forEach(function(u){var d=yF(u,2),p=d[0],h=d[1];if(a!=null&&a[p]||a!=null&&a[h]){var v;(v=a[h])!==null&&v!==void 0||(a[h]=a?.[p])}})}var l=ji(ji({},r),a);return Object.keys(l).forEach(function(u){l[u]===t[u]&&delete l[u]}),l}var iR=Yne,_O=typeof CSSINJS_STATISTIC<"u",R4=!0;function vt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!_O)return Object.assign.apply(Object,[{}].concat(t));R4=!1;var n={};return t.forEach(function(a){if(Cs(a)==="object"){var o=Object.keys(a);o.forEach(function(l){Object.defineProperty(n,l,{configurable:!0,enumerable:!0,get:function(){return a[l]}})})}}),R4=!0,n}var oR={};function Jne(){}var Zne=function(e){var t,r=e,n=Jne;return _O&&typeof Proxy<"u"&&(t=new Set,r=new Proxy(e,{get:function(a,o){if(R4){var l;(l=t)===null||l===void 0||l.add(o)}return a[o]}}),n=function(a,o){var l;oR[a]={global:Array.from(t),component:ji(ji({},(l=oR[a])===null||l===void 0?void 0:l.component),o)}}),{token:r,keys:t,flush:n}},eae=Zne;function tae(e,t,r){if(typeof r=="function"){var n;return r(vt(t,(n=t[e])!==null&&n!==void 0?n:{}))}return r??{}}var sR=tae;function rae(e){return e==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return"max(".concat(r.map(function(a){return ue(a)}).join(","),")")},min:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return"min(".concat(r.map(function(a){return ue(a)}).join(","),")")}}}var nae=rae,aae=A(_()),iae=1e3*60*10,oae=(function(){function e(){wu(this,e),Oo(this,"map",new Map),Oo(this,"objectIDMap",new WeakMap),Oo(this,"nextID",0),Oo(this,"lastAccessBeat",new Map),Oo(this,"accessBeat",0)}return xu(e,[{key:"set",value:function(t,r){this.clear();var n=this.getCompositeKey(t);this.map.set(n,r),this.lastAccessBeat.set(n,Date.now())}},{key:"get",value:function(t){var r=this.getCompositeKey(t),n=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,n}},{key:"getCompositeKey",value:function(t){var r=this,n=t.map(function(a){return a&&Cs(a)==="object"?"obj_".concat(r.getObjectID(a)):"".concat(Cs(a),"_").concat(a)});return n.join("|")}},{key:"getObjectID",value:function(t){if(this.objectIDMap.has(t))return this.objectIDMap.get(t);var r=this.nextID;return this.objectIDMap.set(t,r),this.nextID+=1,r}},{key:"clear",value:function(){var t=this;if(this.accessBeat>1e4){var r=Date.now();this.lastAccessBeat.forEach(function(n,a){r-n>iae&&(t.map.delete(a),t.lastAccessBeat.delete(a))}),this.accessBeat=0}}}]),e})(),lR=new oae;function sae(e,t){return aae.default.useMemo(function(){var r=lR.get(t);if(r)return r;var n=e();return lR.set(t,n),n},t)}var lae=sae,uae=function(){return{}},cae=uae;function dae(e){var t=e.useCSP,r=t===void 0?cae:t,n=e.useToken,a=e.usePrefix,o=e.getResetStyles,l=e.getCommonStyle,u=e.getCompUnitless;function d(g,b,x,y){var E=Array.isArray(g)?g[0]:g;function F(I){return"".concat(String(E)).concat(I.slice(0,1).toUpperCase()).concat(I.slice(1))}var S=y?.unitless||{},D=typeof u=="function"?u(g):{},$=ji(ji({},D),{},Oo({},F("zIndexPopup"),!0));Object.keys(S).forEach(function(I){$[F(I)]=S[I]});var C=ji(ji({},y),{},{unitless:$,prefixToken:F}),B=h(g,b,x,C),M=p(E,x,C);return function(I){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I,N=B(I,j),R=y?.extraCssVarPrefixCls,L=typeof R=="function"?R({prefixCls:I,rootCls:j}):R,q=M(L!=null&&L.length?[j].concat(en(L)):j);return[N,q]}}function p(g,b,x){var y=x.unitless,E=x.prefixToken,F=x.ignore;return function(S){var D=n(),$=D.cssVar,C=D.realToken,B=r();return mne({path:[g],prefix:$.prefix,key:$.key,unitless:y,ignore:F,token:C,scope:S,nonce:function(){return B.nonce}},function(){var M=sR(g,C,b),I=iR(g,C,M,{deprecatedTokens:x?.deprecatedTokens});return M&&Object.keys(M).forEach(function(j){I[E(j)]=I[j],delete I[j]}),I}),$?.key}}function h(g,b,x){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},E=Array.isArray(g)?g:[g,g],F=yF(E,1),S=F[0],D=E.join("-"),$=e.layer||{name:"antd"};return function(C){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C,M=n(),I=M.theme,j=M.realToken,N=M.hashId,R=M.token,L=M.cssVar,q=M.zeroRuntime,W=(0,Hne.useMemo)(function(){return q},[]);if(W)return N;var U=a(),P=U.rootPrefixCls,H=U.iconPrefixCls,V=r(),Q="css",X=lae(function(){var J=new Set;return Object.keys(y.unitless||{}).forEach(function(te){J.add(dx(te,L.prefix)),J.add(dx(te,aR(S,L.prefix)))}),Xne(Q,J)},[Q,S,L?.prefix]),Z=nae(Q),O=Z.max,z=Z.min,K={theme:I,token:R,hashId:N,nonce:function(){return V.nonce},clientOnly:y.clientOnly,layer:$,order:y.order||-999};return typeof o=="function"&&C4(ji(ji({},K),{},{clientOnly:!1,path:["Shared",P]}),function(){return o(R,{prefix:{rootPrefixCls:P,iconPrefixCls:H},csp:V})}),C4(ji(ji({},K),{},{path:[D,C,H]}),function(){if(y.injectStyle===!1)return[];var J=eae(R),te=J.token,ee=J.flush,ie=sR(S,j,x),me=".".concat(C),le=iR(S,j,ie,{deprecatedTokens:y.deprecatedTokens});ie&&Cs(ie)==="object"&&Object.keys(ie).forEach(function(De){ie[De]="var(".concat(dx(De,aR(S,L.prefix)),")")});var he=vt(te,{componentCls:me,prefixCls:C,iconCls:".".concat(H),antCls:".".concat(P),calc:X,max:O,min:z},ie),se=b(he,{hashId:N,prefixCls:C,rootPrefixCls:P,iconPrefixCls:H});ee(S,le);var ke=typeof l=="function"?l(he,C,B,y.resetFont):null;return[y.resetStyle===!1?null:ke,se]}),N}}function v(g,b,x){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},E=h(g,b,x,ji({resetStyle:!1,order:-998},y)),F=function(S){var D=S.prefixCls,$=S.rootCls,C=$===void 0?D:$;return E(D,C),null};return F}return{genStyleHooks:d,genSubStyleComponent:v,genComponentStyleHook:h}}var jO=dae,uR=A(_()),fl={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Mt=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),zp=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block",verticalAlign:"inherit"}}),pae=new Dt("loadingCircle",{"100%":{transform:"rotate(360deg)"}}),Th=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),gi=(e,t)=>({outline:`${ue(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:["outline-offset","outline"].map(r=>`${r} 0s`).join(", ")}),Tn=(e,t)=>({"&:focus-visible":gi(e,t)}),fae=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},...Tn(e),"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),mae=(e,t,r,n)=>{let a=`[class^="${t}"], [class*=" ${t}"]`,o=r?`.${r}`:a,l={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}},u={};return n!==!1&&(u={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[o]:{...u,...l,[a]:l}}},NO=e=>({[`.${e}`]:{...zp(),"&::before":{display:"none"},"&[tabindex]":{cursor:"pointer"}},[`.${e} .${e}-icon`]:{display:"block"},[`.${e}-spin`]:{animationName:pae,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}}),qx=e=>({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none",...Tn(e),"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:ct,genComponentStyleHook:wF,genSubStyleComponent:_h}=jO({usePrefix:()=>{let{getPrefixCls:e,iconPrefixCls:t}=(0,uR.useContext)(st);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{let[e,t,r,n,a,o]=Aa();return{theme:e,realToken:t,hashId:r,token:n,cssVar:a,zeroRuntime:o}},useCSP:()=>{let{csp:e}=(0,uR.useContext)(st);return e??{}},getResetStyles:(e,t)=>{let r=fae(e);return[r,{"&":r},NO(t?.prefix.iconPrefixCls??Mx)]},getCommonStyle:mae,getCompUnitless:()=>DO}),wn=(e,t)=>{let r=`--${e.replace(/\./g,"")}-${t}-`;return[n=>`${r}${n}`,(n,a)=>a?`var(${r}${n}, ${a})`:`var(${r}${n})`]};function nd(e,t){return hi.reduce((r,n)=>{let a=e[`${n}1`],o=e[`${n}3`],l=e[`${n}6`],u=e[`${n}7`];return{...r,...t(n,{lightColor:a,lightBorderColor:o,darkColor:l,textColor:u})}},{})}var hae=(e,t)=>{let[r,n]=Aa();return C4({theme:r,token:n,hashId:"",path:["ant-design-icons",e],nonce:()=>t?.nonce,layer:{name:"antd"}},()=>NO(e))},gae=hae,Y8=A(_()),vae=A(_()),bae=(0,vae.createContext)(void 0),xF=bae,yae={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},PO=yae,wae={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},xae={...wae,locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Last year",nextYear:"Next year",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},Eae=xae,kae={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},RO=kae,Cae={lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],...Eae},timePickerLocale:{...RO}},EF=Cae,OO=EF,mo="${label} is not a valid ${type}",Sae={locale:"en",Pagination:PO,DatePicker:EF,TimePicker:RO,Calendar:OO,global:{placeholder:"Please select",close:"Close",sortable:"sortable",show:"Show",hide:"Hide"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Carousel:{prevSlide:"Previous slide",nextSlide:"Next slide"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:mo,method:mo,array:mo,object:mo,number:mo,date:mo,boolean:mo,integer:mo,float:mo,regexp:mo,email:mo,url:mo,hex:mo},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}},bu=Sae,Fae=(e,t)=>{let r=Y8.useContext(xF),n=Y8.useMemo(()=>{let o=t||bu[e],l=r?.[e]??{};return{...pr(o)?o():o,...l||{}}},[e,t,r]),a=Y8.useMemo(()=>{let o=r?.locale;return r?.exist&&!o?bu.locale:o},[r]);return[n,a]},Lp=Fae,J8=A(_()),gx={...bu.Modal},vx=[],cR=()=>vx.reduce((e,t)=>({...e,...t}),bu.Modal);function $ae(e){if(e){let t={...e};return vx.push(t),gx=cR(),()=>{vx=vx.filter(r=>r!==t),gx=cR()}}gx={...bu.Modal}}function Dae(){return gx}var Aae="internalMark",Bae=e=>{let{locale:t={},children:r,_ANT_MARK__:n}=e;J8.useEffect(()=>$ae(t?.Modal),[t]);let a=J8.useMemo(()=>({...t,exist:!0}),[t]);return J8.createElement(xF.Provider,{value:a},r)},Iae=Bae,Ex=A(_());function cb(e){return e&&Ex.default.isValidElement(e)&&e.type===Ex.default.Fragment}var Wx=(e,t,r)=>Ex.default.isValidElement(e)?Ex.default.cloneElement(e,pr(r)?r(e.props||{}):r):t;function Fr(e,t){return Wx(e,e,t)}var dR=A(_()),Ap=A(_()),Mae=A(er()),Tae=A(_()),_ae=Tae.createContext(null),zO=_ae,pR=!1;function jae(e){return typeof e=="boolean"&&(pR=e),pR}var ex=A(_()),fR=[];function Nae(e,t){let[r]=ex.useState(()=>Ka()?document.createElement("div"):null),n=ex.useRef(!1),a=ex.useContext(zO),[o,l]=ex.useState(fR),u=a||(n.current?void 0:h=>{l(v=>[h,...v])});function d(){r.parentElement||document.body.appendChild(r),n.current=!0}function p(){r.parentElement?.removeChild(r),n.current=!1}return sr(()=>(e?a?a(d):d():p(),p),[e]),sr(()=>{o.length&&(o.forEach(h=>h()),l(fR))},[o]),[r,u]}var Pae=A(_());function Rae(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var Oae=`rc-util-locker-${Date.now()}`,mR=0;function zae(e){let t=!!e,[r]=Pae.useState(()=>(mR+=1,`${Oae}_${mR}`));sr(()=>{if(t){let n=Rte(document.body).width,a=Rae();Np(`
132
+ html body {
133
+ overflow-y: hidden;
134
+ ${a?`width: calc(100% - ${n}px);`:""}
135
+ }`,r)}else Yv(r);return()=>{Yv(r)}},[t,r])}var hR=A(_()),jp=[],Lae=200,LO=0,HO=e=>{if(e.key==="Escape"&&!e.isComposing){if(Date.now()-LO<Lae)return;let t=jp.length;for(let r=t-1;r>=0;r-=1)jp[r].onEsc({top:r===t-1,event:e})}},qO=()=>{LO=Date.now()};function Hae(){window.addEventListener("keydown",HO),window.addEventListener("compositionend",qO)}function qae(){jp.length===0&&(window.removeEventListener("keydown",HO),window.removeEventListener("compositionend",qO))}function Wae(e,t){let r=pl(),n=xt(t),a=()=>{jp.find(l=>l.id===r)||jp.push({id:r,onEsc:n})},o=()=>{jp=jp.filter(l=>l.id!==r)};(0,hR.useMemo)(()=>{e?a():e||o()},[e]),(0,hR.useEffect)(()=>{if(e)return a(),Hae(),()=>{o(),qae()}},[e])}var gR=e=>e===!1?!1:!Ka()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,Uae=Ap.forwardRef((e,t)=>{let{open:r,autoLock:n,getContainer:a,debug:o,autoDestroy:l=!0,children:u,onEsc:d}=e,[p,h]=Ap.useState(r),v=p||r;Ap.useEffect(()=>{(l||r)&&h(r)},[r,l]);let[g,b]=Ap.useState(()=>gR(a));Ap.useEffect(()=>{let C=gR(a);b(()=>C??null)});let[x,y]=Nae(v&&!g,o),E=g??x;zae(n&&r&&Ka()&&(E===x||E===document.body)),Wae(r,d);let F=null;u&&yu(u)&&t&&(F=Pi(u));let S=Qa(F,t);if(!v||!Ka()||g===void 0)return null;let D=E===!1||jae(),$=u;return t&&($=Ap.cloneElement(u,{ref:S})),Ap.createElement(zO.Provider,{value:y},D?$:(0,Mae.createPortal)($,E))}),Vae=Uae,Ux=Vae,WO=A(_()),bh=A(_()),yh=A(_()),O4=yh.createContext(null);function Gae({children:e,onBatchResize:t}){let r=yh.useRef(0),n=yh.useRef([]),a=yh.useContext(O4),o=yh.useCallback((l,u,d)=>{r.current+=1;let p=r.current;n.current.push({size:l,element:u,data:d}),Promise.resolve().then(()=>{p===r.current&&(t?.(n.current),n.current=[])}),a?.(l,u,d)},[t,a]);return yh.createElement(O4.Provider,{value:o},e)}var Z8=A(_()),Qc=new Map;function Kae(e){e.forEach(t=>{let{target:r}=t;Qc.get(r)?.forEach(n=>n(r))})}var e4;function UO(){return e4||(e4=new ResizeObserver(Kae)),e4}function Xae(e,t){Qc.has(e)||(Qc.set(e,new Set),UO().observe(e)),Qc.get(e).add(t)}function Qae(e,t){Qc.has(e)&&(Qc.get(e).delete(t),Qc.get(e).size||(UO().unobserve(e),Qc.delete(e)))}function VO(e,t,r,n){let a=Z8.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),o=xt(d=>{let{width:p,height:h}=d.getBoundingClientRect(),{offsetWidth:v,offsetHeight:g}=d,b=Math.floor(p),x=Math.floor(h);if(a.current.width!==b||a.current.height!==x||a.current.offsetWidth!==v||a.current.offsetHeight!==g){let y={width:b,height:x,offsetWidth:v,offsetHeight:g};a.current=y;let E=v===Math.round(p)?p:v,F=g===Math.round(h)?h:g,S={...y,offsetWidth:E,offsetHeight:F};n?.(S,d),Promise.resolve().then(()=>{r?.(S,d)})}}),l=typeof t=="function",u=Z8.useRef(0);Z8.useEffect(()=>{let d=l?t():t;return d&&e?Xae(d,o):e&&l&&(u.current+=1),()=>{d&&Qae(d,o)}},[e,l?u.current:t])}function Yae(e,t){let{children:r,disabled:n,onResize:a,data:o}=e,l=bh.useRef(null),u=bh.useContext(O4),d=typeof r=="function",p=d?r(l):r,h=!d&&bh.isValidElement(p)&&yu(p),v=h?Pi(p):null,g=Qa(v,l),b=()=>$x(l.current);return bh.useImperativeHandle(t,()=>b()),VO(!n,b,a,(x,y)=>{u?.(x,y,o)}),h?bh.cloneElement(p,{ref:g}):p}var Jae=bh.forwardRef(Yae),Zae=Jae;function z4(){return z4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},z4.apply(this,arguments)}var eie="rc-observer-key";function tie(e,t){let{children:r}=e;return(typeof r=="function"?[r]:Er(r)).map((n,a)=>{let o=n?.key||`${eie}-${a}`;return WO.createElement(Zae,z4({},e,{key:o,ref:a===0?t:void 0}),n)})}var GO=WO.forwardRef(tie);GO.Collection=Gae;var Ba=GO,Zr=A(_()),Wc=A(_()),rie=A(_()),L4=A(_()),KO=L4.createContext({}),nie=e=>{let{children:t,...r}=e,n=L4.useMemo(()=>({motion:r.motion}),[r.motion]);return L4.createElement(KO.Provider,{value:n},t)},aie=nie,tx=A(_()),Bp=A(_()),cl="none",rx="appear",nx="enter",ax="leave",vR="none",Es="prepare",Mp="start",Tp="active",XO="prepared",iie=A(_()),oie=A(_());function bR(e,t){let r={};return r[e.toLowerCase()]=t.toLowerCase(),r[`Webkit${e}`]=`webkit${t}`,r[`Moz${e}`]=`moz${t}`,r[`ms${e}`]=`MS${t}`,r[`O${e}`]=`o${t.toLowerCase()}`,r}function sie(e,t){let r={animationend:bR("Animation","AnimationEnd"),transitionend:bR("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}var lie=sie(Ka(),typeof window<"u"?window:{}),QO={};Ka()&&({style:QO}=document.createElement("div"));var ix={};function YO(e){if(ix[e])return ix[e];let t=lie[e];if(t){let r=Object.keys(t),n=r.length;for(let a=0;a<n;a+=1){let o=r[a];if(Object.prototype.hasOwnProperty.call(t,o)&&o in QO)return ix[e]=t[o],ix[e]}}return""}var JO=YO("animationend"),ZO=YO("transitionend"),ez=!!(JO&&ZO),yR=JO||"animationend",wR=ZO||"transitionend";function xR(e,t){if(!e)return null;if(typeof e=="object"){let r=t.replace(/-\w/g,n=>n[1].toUpperCase());return e[r]}return`${e}-${t}`}var uie=(e=>{let t=(0,oie.useRef)();function r(a){a&&(a.removeEventListener(wR,e),a.removeEventListener(yR,e))}function n(a){t.current&&t.current!==a&&r(t.current),a&&a!==t.current&&(a.addEventListener(wR,e),a.addEventListener(yR,e),t.current=a)}return iie.useEffect(()=>()=>{r(t.current),t.current=null},[]),[n,r]}),ER=A(_()),cie=Ka()?ER.useLayoutEffect:ER.useEffect,tz=cie,die=A(_()),kR=A(_()),pie=(()=>{let e=kR.useRef(null);function t(){br.cancel(e.current)}function r(n,a=2){t();let o=br(()=>{a<=1?n({isCanceled:()=>o!==e.current}):r(n,a-1)});e.current=o}return kR.useEffect(()=>()=>{t()},[]),[r,t]}),fie=[Es,Mp,Tp,"end"],mie=[Es,XO],rz=!1,hie=!0;function nz(e){return e===Tp||e==="end"}var gie=((e,t,r)=>{let[n,a]=qR(vR),[o,l]=pie();function u(){a(Es,!0)}let d=t?mie:fie;return tz(()=>{if(n!==vR&&n!=="end"){let p=d.indexOf(n),h=d[p+1],v=r(n);v===rz?a(h,!0):h&&o(g=>{function b(){g.isCanceled()||a(h,!0)}v===!0?b():Promise.resolve(v).then(b)})}},[e,n]),die.useEffect(()=>()=>{l()},[]),[u,n]});function vie(e,t,r,{motionEnter:n=!0,motionAppear:a=!0,motionLeave:o=!0,motionDeadline:l,motionLeaveImmediately:u,onAppearPrepare:d,onEnterPrepare:p,onLeavePrepare:h,onAppearStart:v,onEnterStart:g,onLeaveStart:b,onAppearActive:x,onEnterActive:y,onLeaveActive:E,onAppearEnd:F,onEnterEnd:S,onLeaveEnd:D,onVisibleChanged:$}){let[C,B]=tx.useState(),[M,I]=KR(cl),[j,N]=tx.useState([null,null]),R=M(),L=(0,Bp.useRef)(!1),q=(0,Bp.useRef)(null);function W(){return r()}let U=(0,Bp.useRef)(!1);function P(){I(cl),N([null,null])}let H=xt(ie=>{let me=M();if(me===cl)return;let le=W();if(ie&&!ie.deadline&&ie.target!==le)return;let he=U.current,se;me===rx&&he?se=F?.(le,ie):me===nx&&he?se=S?.(le,ie):me===ax&&he&&(se=D?.(le,ie)),he&&se!==!1&&P()}),[V]=uie(H),Q=ie=>{switch(ie){case rx:return{[Es]:d,[Mp]:v,[Tp]:x};case nx:return{[Es]:p,[Mp]:g,[Tp]:y};case ax:return{[Es]:h,[Mp]:b,[Tp]:E};default:return{}}},X=tx.useMemo(()=>Q(R),[R]),[Z,O]=gie(R,!e,ie=>{if(ie===Es){let me=X[Es];return me?me(W()):rz}return ie in X&&N([X[ie]?.(W(),null)||null,ie]),ie===Tp&&R!==cl&&(V(W()),l>0&&(clearTimeout(q.current),q.current=setTimeout(()=>{H({deadline:!0})},l))),ie===XO&&P(),hie}),z=nz(O);U.current=z;let K=(0,Bp.useRef)(null);tz(()=>{if(L.current&&K.current===t)return;B(t);let ie=L.current;L.current=!0;let me;!ie&&t&&a&&(me=rx),ie&&t&&n&&(me=nx),(ie&&!t&&o||!ie&&u&&!t&&o)&&(me=ax);let le=Q(me);me&&(e||le[Es])?(I(me),Z()):I(cl),K.current=t},[t]),(0,Bp.useEffect)(()=>{(R===rx&&!a||R===nx&&!n||R===ax&&!o)&&I(cl)},[a,n,o]),(0,Bp.useEffect)(()=>()=>{L.current=!1,clearTimeout(q.current)},[]);let J=tx.useRef(!1);(0,Bp.useEffect)(()=>{C&&(J.current=!0),C!==void 0&&R===cl&&((J.current||C)&&$?.(C),J.current=!0)},[C,R]);let te=j[0];X[Es]&&O===Mp&&(te={transition:"none",...te});let ee=j[1];return[M,O,te,C??t,!L.current&&R===cl&&e&&a?"NONE":O===Mp||O===Tp?ee===O:!0]}function az(e){return e?.length<2}function bie(e){let t=e;typeof e=="object"&&({transitionSupport:t}=e);function r(a,o){return!!(a.motionName&&t&&o!==!1)}let n=Wc.forwardRef((a,o)=>{let{visible:l=!0,removeOnLeave:u=!0,forceRender:d,children:p,motionName:h,leavedClassName:v,eventProps:g}=a,{motion:b}=Wc.useContext(KO),x=r(a,b),y=(0,rie.useRef)();function E(){return $x(y.current)}let[F,S,D,$,C]=vie(x,l,E,a),B=F(),M=Wc.useRef($);$&&(M.current=!0);let I=Wc.useMemo(()=>{let R={};return Object.defineProperties(R,{nativeElement:{enumerable:!0,get:E},inMotion:{enumerable:!0,get:()=>()=>F()!==cl},enableMotion:{enumerable:!0,get:()=>()=>x}}),R},[]);Wc.useImperativeHandle(o,()=>I,[]);let j=Wc.useRef(0);C&&(j.current+=1);let N=Wc.useMemo(()=>{if(C==="NONE")return null;let R,L={...g,visible:l};if(!p)R=null;else if(B===cl)$?R=p({...L},y):!u&&M.current&&v?R=p({...L,className:v},y):d||!u&&!v?R=p({...L,style:{display:"none"}},y):R=null;else{let q;S===Es?q="prepare":nz(S)?q="active":S===Mp&&(q="start");let W=xR(h,`${B}-${q}`);R=p({...L,className:Y(xR(h,B),{[W]:W&&q,[h]:typeof h=="string"}),style:D},y)}return R},[j.current]);if(az(p)&&Sx(N)){let R=Pi(N);if(R!==y)return Wc.cloneElement(N,{ref:pn(R,y)})}return N});return n.displayName="CSSMotion",n}var iz=bie(ez),ox=A(_()),H4="keep",q4="remove",t4="removed";function yie(e){let t;return e&&typeof e=="object"&&"key"in e?t=e:t={key:e},{...t,key:String(t.key)}}function W4(e=[]){return e.map(yie)}function wie(e=[],t=[]){let r=[],n=0,a=t.length,o=W4(e),l=W4(t);o.forEach(d=>{let p=!1;for(let h=n;h<a;h+=1){let v=l[h];if(v.key===d.key){n<h&&(r=r.concat(l.slice(n,h).map(g=>({...g,status:"add"}))),n=h),r.push({...v,status:H4}),n+=1,p=!0;break}}p||r.push({...d,status:q4})}),n<a&&(r=r.concat(l.slice(n).map(d=>({...d,status:"add"}))));let u={};return r.forEach(({key:d})=>{u[d]=(u[d]||0)+1}),Object.keys(u).filter(d=>u[d]>1).forEach(d=>{r=r.filter(({key:p,status:h})=>p!==d||h!==q4),r.forEach(p=>{p.key===d&&(p.status=H4)})}),r}function U4(){return U4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},U4.apply(this,arguments)}var xie=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Eie(e,t=iz){class r extends ox.Component{constructor(){super(...arguments),ae(this,"state",{keyEntities:[]}),ae(this,"removeKey",a=>{this.setState(o=>({keyEntities:o.keyEntities.map(l=>l.key!==a?l:{...l,status:t4})}),()=>{let{keyEntities:o}=this.state;o.filter(({status:l})=>l!==t4).length===0&&this.props.onAllRemoved&&this.props.onAllRemoved()})})}static getDerivedStateFromProps({keys:a},{keyEntities:o}){let l=W4(a);return{keyEntities:wie(o,l).filter(u=>{let d=o.find(({key:p})=>u.key===p);return!(d&&d.status===t4&&u.status===q4)})}}render(){let{keyEntities:a}=this.state,{component:o,children:l,onVisibleChanged:u,onAllRemoved:d,...p}=this.props,h=o||ox.Fragment,v={};return xie.forEach(g=>{v[g]=p[g],delete p[g]}),delete p.keys,ox.createElement(h,p,a.map(({status:g,...b},x)=>{let y=g==="add"||g===H4;return ox.createElement(t,U4({},v,{key:b.key,visible:y,eventProps:b,onVisibleChanged:E=>{u?.(E,{key:b.key}),E||this.removeKey(b.key)}}),az(l)?E=>l({...E,index:x}):(E,F)=>l({...E,index:x},F))}))}}return ae(r,"defaultProps",{component:"div"}),r}var kie=Eie(ez),ra=iz,ul=A(_()),CR=A(_());function Cie(e){let{prefixCls:t,align:r,arrow:n,arrowPos:a}=e,{className:o,content:l,style:u}=n||{},{x:d=0,y:p=0}=a,h=CR.useRef(null);if(!r||!r.points)return null;let v={position:"absolute"};if(r.autoArrow!==!1){let g=r.points[0],b=r.points[1],x=g[0],y=g[1],E=b[0],F=b[1];x===E||!["t","b"].includes(x)?v.top=p:x==="t"?v.top=0:v.bottom=0,y===F||!["l","r"].includes(y)?v.left=d:y==="l"?v.left=0:v.right=0}return CR.createElement("div",{ref:h,className:Y(`${t}-arrow`,o),style:{...v,...u}},l)}var SR=A(_());function V4(){return V4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},V4.apply(this,arguments)}function Sie(e){let{prefixCls:t,open:r,zIndex:n,mask:a,motion:o,mobile:l}=e;return a?SR.createElement(ra,V4({},o,{motionAppear:!0,visible:r,removeOnLeave:!0}),({className:u})=>SR.createElement("div",{style:{zIndex:n},className:Y(`${t}-mask`,l&&`${t}-mobile-mask`,u)})):null}var Fie=A(_()),$ie=Fie.memo(({children:e})=>e,(e,t)=>t.cache),Die=$ie;function oz(e,t,r,n,a,o,l,u){let d="auto",p=e?{}:{left:"-1000vw",top:"-1000vh",right:d,bottom:d};if(!e&&(t||!r)){let{points:h}=n,v=n.dynamicInset||n._experimental?.dynamicInset,g=v&&h[0][1]==="r",b=v&&h[0][0]==="b";g?(p.right=a,p.left=d):(p.left=l,p.right=d),b?(p.bottom=o,p.top=d):(p.top=u,p.bottom=d)}return p}function G4(){return G4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},G4.apply(this,arguments)}var Aie=ul.forwardRef((e,t)=>{let{onEsc:r,popup:n,className:a,prefixCls:o,style:l,target:u,onVisibleChanged:d,open:p,keepDom:h,fresh:v,onClick:g,mask:b,arrow:x,arrowPos:y,align:E,motion:F,maskMotion:S,mobile:D,forceRender:$,getPopupContainer:C,autoDestroy:B,portal:M,children:I,zIndex:j,onMouseEnter:N,onMouseLeave:R,onPointerEnter:L,onPointerDownCapture:q,ready:W,offsetX:U,offsetY:P,offsetR:H,offsetB:V,onAlign:Q,onPrepare:X,onResize:Z,stretch:O,targetWidth:z,targetHeight:K}=e,J=typeof n=="function"?n():n,te=p||h,ee=!!D,[ie,me,le]=ul.useMemo(()=>D?[D.mask,D.maskMotion,D.motion]:[b,S,F],[D,b,S,F]),he=C?.length>0,[se,ke]=ul.useState(!C||!he);sr(()=>{!se&&he&&u&&ke(!0)},[se,he,u]);let De=xt((be,ye)=>{Z?.(be,ye),Q()}),we=oz(ee,W,p,E,H,V,U,P);if(!se)return null;let de={};return O&&(O.includes("height")&&K?de.height=K:O.includes("minHeight")&&K&&(de.minHeight=K),O.includes("width")&&z?de.width=z:O.includes("minWidth")&&z&&(de.minWidth=z)),p||(de.pointerEvents="none"),ul.createElement(M,{open:$||te,getContainer:C&&(()=>C(u)),autoDestroy:B,onEsc:r},ul.createElement(Sie,{prefixCls:o,open:p,zIndex:j,mask:ie,motion:me,mobile:ee}),ul.createElement(Ba,{onResize:De,disabled:!p},be=>ul.createElement(ra,G4({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:$,leavedClassName:`${o}-hidden`},le,{onAppearPrepare:X,onEnterPrepare:X,visible:p,onVisibleChanged:ye=>{F?.onVisibleChanged?.(ye),d(ye)}}),({className:ye,style:Re},Fe)=>{let $e=Y(o,ye,a,{[`${o}-mobile`]:ee});return ul.createElement("div",{ref:pn(be,t,Fe),className:$e,style:{"--arrow-x":`${y.x||0}px`,"--arrow-y":`${y.y||0}px`,...we,...de,...Re,boxSizing:"border-box",zIndex:j,...l},onMouseEnter:N,onMouseLeave:R,onPointerEnter:L,onClick:g,onPointerDownCapture:q},x&&ul.createElement(Cie,{prefixCls:o,arrow:x,arrowPos:y,align:E}),ul.createElement(Die,{cache:!p&&!v},J))})),I)}),sz=Aie,lz=A(_()),Bie=lz.createContext(null),kx=Bie,uz=lz.createContext(null),Iie=A(_());function FR(e){return e?Array.isArray(e)?e:[e]:[]}function Mie(e,t,r){return Iie.useMemo(()=>{let n=FR(t??e),a=FR(r??e),o=new Set(n),l=new Set(a);return o.has("hover")&&!o.has("click")&&o.add("touch"),l.has("hover")&&!l.has("click")&&l.add("touch"),[o,l]},[e,t,r])}var sx=A(_());function Tie(e=[],t=[],r){let n=(a,o)=>a[o]||"";return r?n(e,0)===n(t,0):n(e,0)===n(t,0)&&n(e,1)===n(t,1)}function cz(e,t,r,n){let{points:a}=r,o=Object.keys(e);for(let l=0;l<o.length;l+=1){let u=o[l];if(Tie(e[u]?.points,a,n))return`${t}-placement-${u}`}return""}function db(e){return e.ownerDocument.defaultView}function K4(e){let t=[],r=e?.parentElement,n=["hidden","scroll","clip","auto"];for(;r;){let{overflowX:a,overflowY:o,overflow:l}=db(r).getComputedStyle(r);[a,o,l].some(u=>n.includes(u))&&t.push(r),r=r.parentElement}return t}function tb(e,t=1){return Number.isNaN(e)?t:e}function qv(e){return tb(parseFloat(e),0)}function $R(e,t){let r={...e};return(t||[]).forEach(n=>{if(n instanceof HTMLBodyElement||n instanceof HTMLHtmlElement)return;let{overflow:a,overflowClipMargin:o,borderTopWidth:l,borderBottomWidth:u,borderLeftWidth:d,borderRightWidth:p}=db(n).getComputedStyle(n),h=n.getBoundingClientRect(),{offsetHeight:v,clientHeight:g,offsetWidth:b,clientWidth:x}=n,y=qv(l),E=qv(u),F=qv(d),S=qv(p),D=tb(Math.round(h.width/b*1e3)/1e3),$=tb(Math.round(h.height/v*1e3)/1e3),C=(b-x-F-S)*D,B=(v-g-y-E)*$,M=y*$,I=E*$,j=F*D,N=S*D,R=0,L=0;if(a==="clip"){let H=qv(o);R=H*D,L=H*$}let q=h.x+j-R,W=h.y+M-L,U=q+h.width+2*R-j-N-C,P=W+h.height+2*L-M-I-B;r.left=Math.max(r.left,q),r.top=Math.max(r.top,W),r.right=Math.min(r.right,U),r.bottom=Math.min(r.bottom,P)}),r}function DR(e,t=0){let r=`${t}`,n=r.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(r)}function AR(e,t){let[r,n]=t||[];return[DR(e.width,r),DR(e.height,n)]}function BR(e=""){return[e[0],e[1]]}function vh(e,t){let r=t[0],n=t[1],a,o;return r==="t"?o=e.y:r==="b"?o=e.y+e.height:o=e.y+e.height/2,n==="l"?a=e.x:n==="r"?a=e.x+e.width:a=e.x+e.width/2,{x:a,y:o}}function Uc(e,t){let r={t:"b",b:"t",l:"r",r:"l"},n=[...e];return n[t]=r[e[t]]||"c",n}function IR(e){return e.join("")}function dz(e,t,r,n,a,o,l,u){let[d,p]=sx.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:a[n]||{}}),h=sx.useRef(0),v=sx.useMemo(()=>!t||u?[]:K4(t),[t]),g=sx.useRef({});e||(g.current={});let b=xt(()=>{if(t&&r&&e&&!u){let E=function(yt,Yn,Jn=be){let Zn=P.x+yt,pp=P.y+Yn,hs=Zn+te,al=pp+J,Di=Math.max(Zn,Jn.left),ka=Math.max(pp,Jn.top),Im=Math.min(hs,Jn.right),Yg=Math.min(al,Jn.bottom);return Math.max(0,(Im-Di)*(Yg-ka))},F=function(){ze=P.y+nt,Je=ze+J,ut=P.x+je,Le=ut+te},S=t,D=S.ownerDocument,$=db(S),{position:C}=$.getComputedStyle(S),B=S.style.left,M=S.style.top,I=S.style.right,j=S.style.bottom,N=S.style.overflow,R=S.style.overflowX,L=S.style.overflowY,q={...a[n],...o},W=D.createElement("div");S.parentElement?.appendChild(W),W.style.left=`${S.offsetLeft}px`,W.style.top=`${S.offsetTop}px`,W.style.position=C,W.style.height=`${S.offsetHeight}px`,W.style.width=`${S.offsetWidth}px`,S.style.left="0",S.style.top="0",S.style.right="auto",S.style.bottom="auto",S.style.overflow="hidden";let U;if(Array.isArray(r))U={x:r[0],y:r[1],width:0,height:0};else{let yt=r.getBoundingClientRect();yt.x=yt.x??yt.left,yt.y=yt.y??yt.top,U={x:yt.x,y:yt.y,width:yt.width,height:yt.height}}let P=S.getBoundingClientRect(),{height:H,width:V}=$.getComputedStyle(S);P.x=P.x??P.left,P.y=P.y??P.top;let{clientWidth:Q,clientHeight:X,scrollWidth:Z,scrollHeight:O,scrollTop:z,scrollLeft:K}=D.documentElement,J=P.height,te=P.width,ee=U.height,ie=U.width,me={left:0,top:0,right:Q,bottom:X},le={left:-K,top:-z,right:Z-K,bottom:O-z},{htmlRegion:he}=q,se="visible",ke="visibleFirst";he!=="scroll"&&he!==ke&&(he=se);let De=he===ke,we=$R(le,v),de=$R(me,v),be=he===se?de:we,ye=De?de:be;S.style.left="auto",S.style.top="auto",S.style.right="0",S.style.bottom="0";let Re=S.getBoundingClientRect();S.style.left=B,S.style.top=M,S.style.right=I,S.style.bottom=j,S.style.overflow=N,S.style.overflowX=R,S.style.overflowY=L,S.parentElement?.removeChild(W);let Fe=tb(Math.round(te/parseFloat(V)*1e3)/1e3),$e=tb(Math.round(J/parseFloat(H)*1e3)/1e3);if(Fe===0||$e===0||xh(r)&&!rb(r))return;let{offset:Ie,targetOffset:He}=q,[Oe,Me]=AR(P,Ie),[Te,Xe]=AR(U,He);U.x-=Te,U.y-=Xe;let[ot,Ye]=q.points||[],Ve=BR(Ye),Ae=BR(ot),Ne=vh(U,Ve),ht=vh(P,Ae),lt={...q},Ke=[Ae,Ve],je=Ne.x-ht.x+Oe,nt=Ne.y-ht.y+Me,Nt=E(je,nt),Pt=E(je,nt,de),Jr=vh(U,["t","l"]),Xt=vh(P,["t","l"]),Tr=vh(U,["b","r"]),tr=vh(P,["b","r"]),Tt=q.overflow||{},{adjustX:cr,adjustY:$r,shiftX:Wt,shiftY:dt}=Tt,St=yt=>typeof yt=="boolean"?yt:yt>=0,ze,Je,ut,Le;F();let Ze=St($r),gt=Ae[0]===Ve[0];if(Ze&&Ae[0]==="t"&&(Je>ye.bottom||g.current.bt)){let yt=nt;gt?yt-=J-ee:yt=Jr.y-tr.y-Me;let Yn=E(je,yt),Jn=E(je,yt,de);Yn>Nt||Yn===Nt&&(!De||Jn>=Pt)?(g.current.bt=!0,nt=yt,Me=-Me,Ke=[Uc(Ke[0],0),Uc(Ke[1],0)]):g.current.bt=!1}if(Ze&&Ae[0]==="b"&&(ze<ye.top||g.current.tb)){let yt=nt;gt?yt+=J-ee:yt=Tr.y-Xt.y-Me;let Yn=E(je,yt),Jn=E(je,yt,de);Yn>Nt||Yn===Nt&&(!De||Jn>=Pt)?(g.current.tb=!0,nt=yt,Me=-Me,Ke=[Uc(Ke[0],0),Uc(Ke[1],0)]):g.current.tb=!1}let Qt=St(cr),Yt=Ae[1]===Ve[1];if(Qt&&Ae[1]==="l"&&(Le>ye.right||g.current.rl)){let yt=je;Yt?yt-=te-ie:yt=Jr.x-tr.x-Oe;let Yn=E(yt,nt),Jn=E(yt,nt,de);Yn>Nt||Yn===Nt&&(!De||Jn>=Pt)?(g.current.rl=!0,je=yt,Oe=-Oe,Ke=[Uc(Ke[0],1),Uc(Ke[1],1)]):g.current.rl=!1}if(Qt&&Ae[1]==="r"&&(ut<ye.left||g.current.lr)){let yt=je;Yt?yt+=te-ie:yt=Tr.x-Xt.x-Oe;let Yn=E(yt,nt),Jn=E(yt,nt,de);Yn>Nt||Yn===Nt&&(!De||Jn>=Pt)?(g.current.lr=!0,je=yt,Oe=-Oe,Ke=[Uc(Ke[0],1),Uc(Ke[1],1)]):g.current.lr=!1}lt.points=[IR(Ke[0]),IR(Ke[1])],F();let on=Wt===!0?0:Wt;typeof on=="number"&&(ut<de.left&&(je-=ut-de.left-Oe,U.x+ie<de.left+on&&(je+=U.x-de.left+ie-on)),Le>de.right&&(je-=Le-de.right-Oe,U.x>de.right-on&&(je+=U.x-de.right+on)));let Pr=dt===!0?0:dt;typeof Pr=="number"&&(ze<de.top&&(nt-=ze-de.top-Me,U.y+ee<de.top+Pr&&(nt+=U.y-de.top+ee-Pr)),Je>de.bottom&&(nt-=Je-de.bottom-Me,U.y>de.bottom-Pr&&(nt+=U.y-de.bottom+Pr)));let rr=P.x+je,Vr=rr+te,bt=P.y+nt,Rt=bt+J,vr=U.x,Bn=vr+ie,Va=U.y,fr=Va+ee,di=Math.max(rr,vr),Ga=Math.min(Vr,Bn),Dr=(di+Ga)/2-rr,Ln=Math.max(bt,Va),xa=Math.min(Rt,fr),mr=(Ln+xa)/2-bt;l?.(t,lt);let $i=Re.right-P.x-(je+P.width),ao=Re.bottom-P.y-(nt+P.height);Fe===1&&(je=Math.floor(je),$i=Math.floor($i)),$e===1&&(nt=Math.floor(nt),ao=Math.floor(ao));let Ea={ready:!0,offsetX:je/Fe,offsetY:nt/$e,offsetR:$i/Fe,offsetB:ao/$e,arrowX:Dr/Fe,arrowY:mr/$e,scaleX:Fe,scaleY:$e,align:lt};p(Ea)}}),x=()=>{h.current+=1;let E=h.current;Promise.resolve().then(()=>{h.current===E&&b()})},y=()=>{p(E=>({...E,ready:!1}))};return sr(y,[n]),sr(()=>{e||y()},[e]),[d.ready,d.offsetX,d.offsetY,d.offsetR,d.offsetB,d.arrowX,d.arrowY,d.scaleX,d.scaleY,d.align,x]}var MR=A(_());function pz(){let e=MR.useRef(null),t=()=>{e.current&&(clearTimeout(e.current),e.current=null)},r=(n,a)=>{t(),a===0?n():e.current=setTimeout(()=>{n()},a*1e3)};return MR.useEffect(()=>()=>{t()},[]),r}function _ie(e,t,r,n,a){sr(()=>{if(e&&t&&r){let o=function(){n(),a()},l=t,u=r,d=K4(l),p=K4(u),h=db(u),v=new Set([h,...d,...p]);return v.forEach(g=>{g.addEventListener("scroll",o,{passive:!0})}),h.addEventListener("resize",o,{passive:!0}),n(),()=>{v.forEach(g=>{g.removeEventListener("scroll",o),h.removeEventListener("resize",o)})}}},[e,t,r])}var r4=A(_());function jie(e,t,r,n,a,o,l,u){let d=r4.useRef(e);d.current=e;let p=r4.useRef(!1);r4.useEffect(()=>{if(t&&n&&(!a||o)){let v=()=>{p.current=!1},g=y=>{d.current&&!l(y.composedPath?.()?.[0]||y.target)&&!p.current&&u(!1)},b=db(n);b.addEventListener("pointerdown",v,!0),b.addEventListener("mousedown",g,!0),b.addEventListener("contextmenu",g,!0);let x=p4(r);return x&&(x.addEventListener("mousedown",g,!0),x.addEventListener("contextmenu",g,!0)),()=>{b.removeEventListener("pointerdown",v,!0),b.removeEventListener("mousedown",g,!0),b.removeEventListener("contextmenu",g,!0),x&&(x.removeEventListener("mousedown",g,!0),x.removeEventListener("contextmenu",g,!0))}}},[t,r,n,a,o]);function h(){p.current=!0}return h}var fi=A(_()),lx=A(_());function Nie(){let[e,t]=lx.default.useState(null),[r,n]=lx.default.useState(!1),[a,o]=lx.default.useState(!1),l=lx.default.useRef(null),u=xt(p=>{p===!1?(l.current=null,n(!1)):a&&r?l.current=p:(n(!0),t(p),l.current=null,r||o(!0))}),d=xt(p=>{p?(o(!1),l.current&&(t(l.current),l.current=null)):(o(!1),l.current=null)});return[u,r,e,d]}var ux=A(_());function X4(){return X4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},X4.apply(this,arguments)}var Pie=e=>{let{prefixCls:t,isMobile:r,ready:n,open:a,align:o,offsetR:l,offsetB:u,offsetX:d,offsetY:p,arrowPos:h,popupSize:v,motion:g,uniqueContainerClassName:b,uniqueContainerStyle:x}=e,y=`${t}-unique-container`,[E,F]=ux.default.useState(!1),S=oz(r,n,a,o,l,u,d,p),D=ux.default.useRef(S);n&&(D.current=S);let $={};return v&&($.width=v.width,$.height=v.height),ux.default.createElement(ra,X4({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,leavedClassName:`${y}-hidden`},g,{visible:a,onVisibleChanged:C=>{F(C)}}),({className:C,style:B})=>{let M=Y(y,C,b,{[`${y}-visible`]:E});return ux.default.createElement("div",{className:M,style:{"--arrow-x":`${h?.x||0}px`,"--arrow-y":`${h?.y||0}px`,...D.current,...$,...B,...x}})})},Rie=Pie,Oie=({children:e,postTriggerProps:t})=>{let[r,n,a,o]=Nie(),l=fi.useMemo(()=>!a||!t?a:t(a),[a,t]),[u,d]=fi.useState(null),[p,h]=fi.useState(null),v=fi.useRef(null),g=xt(V=>{v.current=V,xh(V)&&u!==V&&d(V)}),b=fi.useRef(null),x=pz(),y=xt((V,Q)=>{b.current=Q,x(()=>{r(V)},V.delay)}),E=V=>{x(()=>{b.current?.()||r(!1)},V)},F=xt(V=>{o(V)}),[S,D,$,C,B,M,I,,,j,N]=dz(n,u,l?.target,l?.popupPlacement,l?.builtinPlacements||{},l?.popupAlign,void 0,!1),R=fi.useMemo(()=>{if(!l)return"";let V=cz(l.builtinPlacements||{},l.prefixCls||"",j,!1);return Y(V,l.getPopupClassNameFromAlign?.(j))},[j,l?.getPopupClassNameFromAlign,l?.builtinPlacements,l?.prefixCls]),L=fi.useMemo(()=>({show:y,hide:E}),[]);fi.useEffect(()=>{N()},[l?.target]);let q=xt(()=>(N(),Promise.resolve())),W=fi.useRef({}),U=fi.useContext(kx),P=fi.useMemo(()=>({registerSubPopup:(V,Q)=>{W.current[V]=Q,U?.registerSubPopup(V,Q)}}),[U]),H=l?.prefixCls;return fi.createElement(uz.Provider,{value:L},e,l&&fi.createElement(kx.Provider,{value:P},fi.createElement(sz,{ref:g,portal:Ux,onEsc:l.onEsc,prefixCls:H,popup:l.popup,className:Y(l.popupClassName,R,`${H}-unique-controlled`),style:l.popupStyle,target:l.target,open:n,keepDom:!0,fresh:!0,autoDestroy:!1,onVisibleChanged:F,ready:S,offsetX:D,offsetY:$,offsetR:C,offsetB:B,onAlign:N,onPrepare:q,onResize:V=>h({width:V.offsetWidth,height:V.offsetHeight}),arrowPos:{x:M,y:I},align:j,zIndex:l.zIndex,mask:l.mask,arrow:l.arrow,motion:l.popupMotion,maskMotion:l.maskMotion,getPopupContainer:l.getPopupContainer},fi.createElement(Rie,{prefixCls:H,isMobile:!1,ready:S,open:n,align:j,offsetR:C,offsetB:B,offsetX:D,offsetY:$,arrowPos:{x:M,y:I},popupSize:p,motion:l.popupMotion,uniqueContainerClassName:Y(l.uniqueContainerClassName,R),uniqueContainerStyle:l.uniqueContainerStyle}))))},zie=Oie,Lie=A(er());function Hie(e=Ux){return Zr.forwardRef((t,r)=>{let{prefixCls:n="rc-trigger-popup",children:a,action:o="hover",showAction:l,hideAction:u,disabled:d=!1,popupVisible:p,defaultPopupVisible:h,onOpenChange:v,afterOpenChange:g,onPopupVisibleChange:b,afterPopupVisibleChange:x,mouseEnterDelay:y,mouseLeaveDelay:E=.1,focusDelay:F,blurDelay:S,mask:D,maskClosable:$=!0,getPopupContainer:C,forceRender:B,autoDestroy:M,popup:I,popupClassName:j,uniqueContainerClassName:N,uniqueContainerStyle:R,popupStyle:L,popupPlacement:q,builtinPlacements:W={},popupAlign:U,zIndex:P,stretch:H,getPopupClassNameFromAlign:V,fresh:Q,unique:X,alignPoint:Z,onPopupClick:O,onPopupAlign:z,arrow:K,popupMotion:J,maskMotion:te,mobile:ee,...ie}=t,me=M||!1,le=p===void 0,he=!!ee,se=Zr.useRef({}),ke=Zr.useContext(kx),De=Zr.useMemo(()=>({registerSubPopup:(We,nr)=>{se.current[We]=nr,ke?.registerSubPopup(We,nr)}}),[ke]),we=Zr.useContext(uz),de=pl(),[be,ye]=Zr.useState(null),Re=Zr.useRef(null),Fe=xt(We=>{Re.current=We,xh(We)&&be!==We&&ye(We),ke?.registerSubPopup(de,We)}),[$e,Ie]=Zr.useState(null),He=Zr.useRef(null),Oe=xt(We=>{let nr=$x(We);xh(nr)&&$e!==nr&&(Ie(nr),He.current=nr)}),Me={},Te=xt(We=>{let nr=$e;return nr?.contains(We)||p4(nr)?.host===We||We===nr||be?.contains(We)||p4(be)?.host===We||We===be||Object.values(se.current).some(Mm=>Mm?.contains(We)||We===Mm)}),Xe=K?{...K!==!0?K:{}}:null,[ot,Ye]=qt(h||!1,p),Ve=ot||!1,Ae=Ve&&!d,Ne=Zr.useMemo(()=>{let We=typeof a=="function"?a({open:Ae}):a;return Zr.Children.only(We)},[a,Ae]),ht=Ne?.props||{},lt=xt(()=>Ae),Ke=xt((We=0)=>({popup:I,target:$e,delay:We,prefixCls:n,popupClassName:j,uniqueContainerClassName:N,uniqueContainerStyle:R,popupStyle:L,popupPlacement:q,builtinPlacements:W,popupAlign:U,zIndex:P,mask:D,maskClosable:$,popupMotion:J,maskMotion:te,arrow:Xe,getPopupContainer:C,getPopupClassNameFromAlign:V,id:de,onEsc:Jr}));sr(()=>{we&&X&&$e&&!le&&!ke&&(Ae?we.show(Ke(y),lt):we.hide(E))},[Ae,$e]);let je=Zr.useRef(Ae);je.current=Ae;let nt=xt(We=>{(0,Lie.flushSync)(()=>{Ve!==We&&(Ye(We),v?.(We),b?.(We))})}),Nt=pz(),Pt=(We,nr=0)=>{if(p!==void 0){Nt(()=>{nt(We)},nr);return}if(we&&X&&le&&!ke){We?we.show(Ke(nr),lt):we.hide(nr);return}Nt(()=>{nt(We)},nr)};function Jr({top:We}){We&&Pt(!1)}let[Xt,Tr]=Zr.useState(!1);sr(We=>{(!We||Ae)&&Tr(!0)},[Ae]);let[tr,Tt]=Zr.useState(null),[cr,$r]=Zr.useState(null),Wt=We=>{$r([We.clientX,We.clientY])},[dt,St,ze,Je,ut,Le,Ze,gt,Qt,Yt,on]=dz(Ae,be,Z&&cr!==null?cr:$e,q,W,U,z,he),[Pr,rr]=Mie(o,l,u),Vr=Pr.has("click"),bt=rr.has("click")||rr.has("contextMenu"),Rt=xt(()=>{Xt||on()});_ie(Ae,$e,be,Rt,()=>{je.current&&Z&&bt&&Pt(!1)}),sr(()=>{Rt()},[cr,q]),sr(()=>{Ae&&!W?.[q]&&Rt()},[JSON.stringify(U)]);let vr=Zr.useMemo(()=>{let We=cz(W,n,Yt,Z);return Y(We,V?.(Yt))},[Yt,V,W,n,Z]);Zr.useImperativeHandle(r,()=>({nativeElement:He.current,popupElement:Re.current,forceAlign:Rt}));let[Bn,Va]=Zr.useState(0),[fr,di]=Zr.useState(0),Ga=()=>{if(H&&$e){let We=$e.getBoundingClientRect();Va(We.width),di(We.height)}},Dr=()=>{Ga(),Rt()},Ln=We=>{Tr(!1),on(),g?.(We),x?.(We)},xa=()=>new Promise(We=>{Ga(),Tt(()=>We)});sr(()=>{tr&&(on(),tr(),Tt(null))},[tr]);function mr(We,nr,Mm,io,Tm){Me[We]=(Zg,...ev)=>{(!Tm||!Tm())&&(io?.(Zg),Pt(nr,Mm)),ht[We]?.(Zg,...ev)}}let $i=Pr.has("touch"),ao=rr.has("touch"),Ea=Zr.useRef(!1);($i||ao)&&(Me.onTouchStart=(...We)=>{Ea.current=!0,je.current&&ao?Pt(!1):!je.current&&$i&&Pt(!0),ht.onTouchStart?.(...We)}),(Vr||bt)&&(Me.onClick=(We,...nr)=>{je.current&&bt?Pt(!1):!je.current&&Vr&&(Wt(We),Pt(!0)),ht.onClick?.(We,...nr),Ea.current=!1});let yt=jie(Ae,bt||ao,$e,be,D,$,Te,Pt),Yn=Pr.has("hover"),Jn=rr.has("hover"),Zn,pp,hs=()=>Ea.current;if(Yn){let We=nr=>{Wt(nr)};mr("onMouseEnter",!0,y,We,hs),mr("onPointerEnter",!0,y,We,hs),Zn=nr=>{(Ae||Xt)&&be?.contains(nr.target)&&Pt(!0,y)},Z&&(Me.onMouseMove=nr=>{ht.onMouseMove?.(nr)})}Jn&&(mr("onMouseLeave",!1,E,void 0,hs),mr("onPointerLeave",!1,E,void 0,hs),pp=()=>{Pt(!1,E)}),Pr.has("focus")&&mr("onFocus",!0,F),rr.has("focus")&&mr("onBlur",!1,S),Pr.has("contextMenu")&&(Me.onContextMenu=(We,...nr)=>{je.current&&rr.has("contextMenu")?Pt(!1):(Wt(We),Pt(!0)),We.preventDefault(),ht.onContextMenu?.(We,...nr)});let al=Zr.useRef(!1);al.current||(al.current=B||Ae||Xt);let Di={...ht,...Me},ka={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(We=>{ie[We]&&(ka[We]=(...nr)=>{Di[We]?.(...nr),ie[We](...nr)})});let Im={x:Le,y:Ze};VO(Ae,$e,Dr);let Yg=Qa(Oe,Pi(Ne)),Jg=Zr.cloneElement(Ne,{...Di,...ka,ref:Yg});return Zr.createElement(Zr.Fragment,null,Jg,al.current&&(!we||!X)&&Zr.createElement(kx.Provider,{value:De},Zr.createElement(sz,{portal:e,ref:Fe,prefixCls:n,popup:I,className:Y(j,!he&&vr),style:L,target:$e,onMouseEnter:Zn,onMouseLeave:pp,onPointerEnter:Zn,zIndex:P,open:Ae,keepDom:Xt,fresh:Q,onClick:O,onPointerDownCapture:yt,mask:D,motion:J,maskMotion:te,onVisibleChanged:Ln,onPrepare:xa,forceRender:B,autoDestroy:me,getPopupContainer:C,onEsc:Jr,align:Yt,arrow:Xe,arrowPos:Im,ready:dt,offsetX:St,offsetY:ze,offsetR:Je,offsetB:ut,onAlign:Rt,stretch:H,targetWidth:Bn/gt,targetHeight:fr/Qt,mobile:ee})))})}var jh=Hie(Ux),n4=A(_()),qie=({children:e})=>{let{getPrefixCls:t}=n4.default.useContext(st),r=t();return n4.default.isValidElement(e)?n4.default.createElement(ra,{visible:!0,motionName:`${r}-fade`,motionAppear:!0,motionEnter:!0,motionLeave:!1,removeOnLeave:!1},({style:n,className:a})=>Fr(e,o=>({className:Y(o.className,a),style:{...o.style,...n}}))):e},Wie=qie,cx=[null,null];function Uie(e){if(cx[0]!==e){let t={};Object.keys(e).forEach(r=>{t[r]={...e[r],dynamicInset:!1}}),cx[0]=e,cx[1]=t}return cx[1]}var Vie=({children:e})=>{let t=r=>{let{id:n,builtinPlacements:a,popup:o}=r,l=pr(o)?o():o,u=Uie(a);return{...r,getPopupContainer:null,arrow:!1,popup:dR.default.createElement(Wie,{key:n},l),builtinPlacements:u}};return dR.default.createElement(zie,{postTriggerProps:t},e)},Vx=Vie,Q4=A(_()),Y4=Q4.createContext(!1),fz=({children:e,disabled:t})=>{let r=Q4.useContext(Y4);return Q4.createElement(Y4.Provider,{value:t??r},e)},Ia=Y4,bn=A(_()),Gie=A(_()),mz=(0,Gie.createContext)(void 0),TR=A(_()),J4=A(_()),Z4=J4.createContext(void 0),Kie=({children:e,size:t})=>{let r=J4.useContext(Z4);return J4.createElement(Z4.Provider,{value:t||r},e)},Nh=Z4;function Xie(){let e=(0,TR.useContext)(Ia),t=(0,TR.useContext)(Nh);return{componentDisabled:e,componentSize:t}}var Qie=Xie,Yie=A(_());function Jie(e,t,r){let n=Dh("ConfigProvider"),a=e||{},o=a.inherit===!1||!t?{...Op,hashed:t?.hashed??Op.hashed,cssVar:t?.cssVar,zeroRuntime:t?.zeroRuntime}:t,l=(0,Yie.useId)();return $h(()=>{if(!e)return t;let u={...o.components};Object.keys(e.components||{}).forEach(h=>{u[h]={...u[h],...e.components[h]}});let d=`css-var-${l.replace(/:/g,"")}`,p={prefix:r?.prefixCls,...o.cssVar,...a.cssVar,key:a.cssVar?.key||d};return{...o,...a,token:{...o.token,...a.token},components:u,cssVar:p}},[a,o,r?.prefixCls,l],(u,d)=>u.some((p,h)=>{let v=d[h];return!ed(p,v,!0)}))}var Vv=A(_()),_R=Vv.createContext(!0);function Zie(e){let t=Vv.useContext(_R),{children:r}=e,[,n]=Aa(),{motion:a}=n,o=Vv.useRef(!1);return o.current||(o.current=t!==a),o.current?Vv.createElement(_R.Provider,{value:a},Vv.createElement(aie,{motion:a},r)):r}var K$e=A(_()),eoe=()=>null,toe=({iconPrefixCls:e,csp:t})=>(gae(e,t),null),roe=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"],kF,hz,gz,vz;function a4(){return kF||Yc}function noe(){return hz||Mx}var aoe=e=>{let{prefixCls:t,iconPrefixCls:r,theme:n,holderRender:a}=e;t!==void 0&&(kF=t),r!==void 0&&(hz=r),"holderRender"in e&&(vz=a),n&&(gz=n)},ioe=()=>({getPrefixCls:(e,t)=>t||(e?`${a4()}-${e}`:a4()),getIconPrefixCls:noe,getRootPrefixCls:()=>kF||a4(),getTheme:()=>gz,holderRender:vz}),ooe=e=>{let{children:t,csp:r,autoInsertSpaceInButton:n,alert:a,affix:o,anchor:l,app:u,form:d,locale:p,componentSize:h,direction:v,space:g,splitter:b,virtual:x,dropdownMatchSelectWidth:y,popupMatchSelectWidth:E,popupOverflow:F,legacyLocale:S,parentContext:D,iconPrefixCls:$,theme:C,componentDisabled:B,segmented:M,statistic:I,spin:j,calendar:N,carousel:R,cascader:L,collapse:q,typography:W,checkbox:U,descriptions:P,divider:H,drawer:V,skeleton:Q,steps:X,image:Z,layout:O,list:z,listy:K,mentions:J,modal:te,progress:ee,result:ie,slider:me,breadcrumb:le,masonry:he,menu:se,pagination:ke,input:De,inputPassword:we,inputSearch:de,textArea:be,otp:ye,empty:Re,badge:Fe,borderBeam:$e,radio:Ie,rate:He,ribbon:Oe,switch:Me,transfer:Te,avatar:Xe,message:ot,tag:Ye,table:Ve,card:Ae,cardMeta:Ne,tabs:ht,timeline:lt,timePicker:Ke,upload:je,notification:nt,tree:Nt,colorPicker:Pt,datePicker:Jr,rangePicker:Xt,flex:Tr,wave:tr,dropdown:Tt,warning:cr,tour:$r,tooltip:Wt,popover:dt,popconfirm:St,qrcode:ze,floatButton:Je,floatButtonGroup:ut,variant:Le,inputNumber:Ze,treeSelect:gt,watermark:Qt}=e,Yt=bn.useMemo(()=>Ct(p)&&Object.prototype.hasOwnProperty.call(p,"default")&&p.default?.locale?p.default:p,[p]),on=bn.useCallback((Dr,Ln)=>{let{prefixCls:xa}=e;if(Ln)return Ln;let mr=xa||D.getPrefixCls("");return Dr?`${mr}-${Dr}`:mr},[D.getPrefixCls,e.prefixCls]),Pr=$||D.iconPrefixCls||Mx,rr=r||D.csp,Vr=Jie(C,D.theme,{prefixCls:on("")}),bt={csp:rr,autoInsertSpaceInButton:n,alert:a,affix:o,anchor:l,app:u,locale:Yt||S,direction:v,space:g,splitter:b,virtual:x,popupMatchSelectWidth:E??y,popupOverflow:F,getPrefixCls:on,iconPrefixCls:Pr,theme:Vr,segmented:M,statistic:I,spin:j,calendar:N,carousel:R,cascader:L,collapse:q,typography:W,checkbox:U,descriptions:P,divider:H,drawer:V,skeleton:Q,steps:X,image:Z,input:De,inputPassword:we,inputSearch:de,textArea:be,otp:ye,layout:O,list:z,listy:K,mentions:J,modal:te,progress:ee,result:ie,slider:me,breadcrumb:le,masonry:he,menu:se,pagination:ke,empty:Re,badge:Fe,borderBeam:$e,radio:Ie,rate:He,ribbon:Oe,switch:Me,transfer:Te,avatar:Xe,message:ot,tag:Ye,table:Ve,card:Ae,cardMeta:Ne,tabs:ht,timeline:lt,timePicker:Ke,upload:je,notification:nt,tree:Nt,colorPicker:Pt,datePicker:Jr,rangePicker:Xt,flex:Tr,wave:tr,dropdown:Tt,warning:cr,tour:$r,tooltip:Wt,popover:dt,popconfirm:St,qrcode:ze,floatButton:Je,floatButtonGroup:ut,variant:Le,inputNumber:Ze,treeSelect:gt,watermark:Qt},Rt={...D};Object.keys(bt).forEach(Dr=>{bt[Dr]!==void 0&&(Rt[Dr]=bt[Dr])}),roe.forEach(Dr=>{let Ln=e[Dr];Ln&&(Rt[Dr]=Ln)}),typeof n<"u"&&(Rt.button={autoInsertSpace:n,...Rt.button});let vr=$h(()=>Rt,Rt,(Dr,Ln)=>{let xa=Object.keys(Dr),mr=Object.keys(Ln);return xa.length!==mr.length||xa.some($i=>Dr[$i]!==Ln[$i])}),{layer:Bn}=bn.useContext(rd),Va=bn.useMemo(()=>({prefixCls:Pr,csp:rr,layer:Bn?"antd":void 0,zeroRuntime:!!Bn||Vr?.zeroRuntime}),[Pr,rr,Bn,Vr?.zeroRuntime]),fr=bn.createElement(bn.Fragment,null,bn.createElement(toe,{iconPrefixCls:Pr,csp:rr}),bn.createElement(eoe,{dropdownMatchSelectWidth:y}),t),di=bn.useMemo(()=>td(bu.Form?.defaultValidateMessages||{},vr.locale?.Form?.defaultValidateMessages||{},vr.form?.validateMessages||{},d?.validateMessages||{}),[vr,d?.validateMessages]);Object.keys(di).length>0&&(fr=bn.createElement(mz.Provider,{value:di},fr)),Yt&&(fr=bn.createElement(Iae,{locale:Yt,_ANT_MARK__:Aae},fr)),(Pr||rr)&&(fr=bn.createElement(Sh.Provider,{value:Va},fr)),h&&(fr=bn.createElement(Kie,{size:h},fr)),fr=bn.createElement(Zie,null,fr),Wt?.unique&&(fr=bn.createElement(Vx,null,fr));let Ga=bn.useMemo(()=>{let{algorithm:Dr,token:Ln,components:xa,cssVar:mr,...$i}=Vr||{},ao=Dr&&(!Array.isArray(Dr)||Dr.length>0)?Eh(Dr):ob,Ea={};Object.entries(xa||{}).forEach(([Yn,Jn])=>{let Zn={...Jn};"algorithm"in Zn&&(Zn.algorithm===!0?Zn.theme=ao:(Array.isArray(Zn.algorithm)||pr(Zn.algorithm))&&(Zn.theme=Eh(Zn.algorithm)),delete Zn.algorithm),Ea[Yn]=Zn});let yt={...Jc,...Ln};return{...$i,theme:ao,token:yt,components:Ea,override:{override:yt,...Ea},cssVar:mr}},[Vr]);return C&&(fr=bn.createElement(sb.Provider,{value:Ga},fr)),vr.warning&&(fr=bn.createElement(pre.Provider,{value:vr.warning},fr)),B!==void 0&&(fr=bn.createElement(fz,{disabled:B},fr)),bn.createElement(st.Provider,{value:vr},fr)},Ph=e=>{let t=bn.useContext(st),r=bn.useContext(xF);return bn.createElement(ooe,{parentContext:t,legacyLocale:r,...e})};Ph.ConfigContext=st;Ph.SizeContext=Nh;Ph.config=aoe;Ph.useConfig=Qie;Object.defineProperty(Ph,"SizeContext",{get:()=>Nh});var ad=Ph,soe=e=>`${e}-css-var`,xn=soe;var bz=A(_(),1),loe=A(_(),1),uoe={messageWarning:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719"}],["path",{d:"M12 8v4"}],["path",{d:"M12 16h.01"}]],activity:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"}]],layers:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"}]],folders:[["path",{d:"M20 5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h2.5a1.5 1.5 0 0 1 1.2.6l.6.8a1.5 1.5 0 0 0 1.2.6z"}],["path",{d:"M3 8.268a2 2 0 0 0-1 1.738V19a2 2 0 0 0 2 2h11a2 2 0 0 0 1.732-1"}]],messageQuestion:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}],["path",{d:"M12 17h.01"}]],circleX:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]],zap:[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z"}]],folder:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"}],["path",{d:"M2 10h20"}]],terminal:[["path",{d:"M12 19h8"}],["path",{d:"m4 17 6-6-6-6"}]],explorer:[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1"}]],more:[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"12",cy:"5",r:"1"}],["circle",{cx:"12",cy:"19",r:"1"}]],plus:[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]],close:[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],git:[["path",{d:"M15 6a9 9 0 0 0-9 9V3"}],["circle",{cx:"18",cy:"6",r:"3"}],["circle",{cx:"6",cy:"18",r:"3"}]],branch:[["path",{d:"M15 6a9 9 0 0 0-9 9V3"}],["circle",{cx:"18",cy:"6",r:"3"}],["circle",{cx:"6",cy:"18",r:"3"}]],rail:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]],splitHorizontal:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M12 3v18"}]],splitVertical:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 12h18"}]],copy:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]],trash:[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]],hash:[["line",{x1:"4",x2:"20",y1:"9",y2:"9"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21"}]],merge:[["circle",{cx:"18",cy:"18",r:"3"}],["circle",{cx:"6",cy:"6",r:"3"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9"}]],check:[["path",{d:"M20 6 9 17l-5-5"}]],chevronLeft:[["path",{d:"m12 19-7-7 7-7"}],["path",{d:"M19 12H5"}]],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"}],["circle",{cx:"12",cy:"12",r:"3"}]],chevronDown:[["path",{d:"m6 9 6 6 6-6"}]]};function coe(e){return uoe[e==="back"?"chevronLeft":e]?.map(([t,r],n)=>loe.createElement(t,{...r,key:n}))}var ne=A(xe(),1),yz=bz.createContext("default"),pb=yz.Provider;function CF(e){return e?"branch":"task"}function Be({name:e,size:t=14,className:r,strokeWidth:n=1.8,slot:a}){let o=bz.useContext(yz)==="lucide"||["layers","folders","messageQuestion","messageWarning","activity","circleX"].includes(e)?coe(e):void 0,l=o?2:n,u={width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:l,style:{width:t,height:t,strokeWidth:l},strokeLinecap:"round",strokeLinejoin:"round",className:r,"aria-hidden":!0,"data-wand-icon":e,"data-icon":a??e};if(o||e==="messageWarning"||e==="activity"||e==="layers"||e==="folders"||e==="messageQuestion"||e==="circleX")return(0,ne.jsx)("svg",{...u,"data-wand-icon-family":"lucide",children:o});switch(e){case"archive":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"3",y:"4",width:"18",height:"4",rx:"1"}),(0,ne.jsx)("path",{d:"M5 8v11a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8"}),(0,ne.jsx)("path",{d:"M10 12h4"})]});case"audio":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("path",{d:"M9 18V5l11-2v13"}),(0,ne.jsx)("circle",{cx:"7",cy:"18",r:"3"}),(0,ne.jsx)("circle",{cx:"18",cy:"16",r:"3"})]});case"back":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"9",y:"3",width:"12",height:"18",rx:"2"}),(0,ne.jsx)("path",{d:"M15 18h.01"}),(0,ne.jsx)("path",{d:"M6 8L2 12l4 4M2 12h8"})]});case"bell":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9M10 21h4"})});case"user":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("circle",{cx:"12",cy:"7.5",r:"3.5"}),(0,ne.jsx)("path",{d:"M5 20v-1a7 7 0 0 1 14 0v1"})]});case"users":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("circle",{cx:"9",cy:"7.5",r:"3"}),(0,ne.jsx)("path",{d:"M3.5 20v-1a5.5 5.5 0 0 1 11 0v1M16 5a3 3 0 0 1 0 5.5M20.5 20v-1a5.5 5.5 0 0 0-3.5-5.1"})]});case"binary":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M12 3l8 9-8 9-8-9 8-9z"})});case"board":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"3.5",y:"4",width:"4",height:"12",rx:"1"}),(0,ne.jsx)("rect",{x:"10",y:"4",width:"4",height:"16",rx:"1"}),(0,ne.jsx)("rect",{x:"16.5",y:"4",width:"4",height:"8",rx:"1"})]});case"brain":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M12 5a3 3 0 0 0-5.8 1A4 4 0 0 0 4 13a4 4 0 0 0 8 5V5Zm0 0a3 3 0 0 1 5.8 1A4 4 0 0 1 20 13a4 4 0 0 1-8 5M8 10l4 2 4-2"})});case"branch":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("circle",{cx:"6",cy:"6",r:"2.5"}),(0,ne.jsx)("circle",{cx:"6",cy:"18",r:"2.5"}),(0,ne.jsx)("circle",{cx:"18",cy:"8",r:"2.5"}),(0,ne.jsx)("path",{d:"M6 8.5v7M18 10.5c0 4-6 2.5-6 6.5"})]});case"calendar":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"4",y:"5",width:"16",height:"16",rx:"2"}),(0,ne.jsx)("path",{d:"M8 3v4M16 3v4M4 10h16M8 14h2M14 14h2M8 18h2M14 18h2"})]});case"chat":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("path",{d:"M5.5 4h13a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H9l-5.5 3V6a2 2 0 0 1 2-2Z"}),(0,ne.jsx)("path",{d:"M8 9h8"})]});case"check":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M20 6L9 17l-5-5"})});case"chevron":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M6 9l6 6 6-6"})});case"chevronDown":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M6 9l6 6 6-6"})});case"chevronUp":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M6 15l6-6 6 6"})});case"chevronLeft":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M15 6l-6 6 6 6"})});case"circle":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"7"})});case"clipboard":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"8",y:"3",width:"8",height:"4",rx:"1"}),(0,ne.jsx)("path",{d:"M16 5h2a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V7a2 2 0 012-2h2"})]});case"close":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})});case"copy":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),(0,ne.jsx)("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"})]});case"cpu":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"}),(0,ne.jsx)("rect",{x:"10",y:"10",width:"4",height:"4",rx:".5"}),(0,ne.jsx)("path",{d:"M9 3v3M15 3v3M9 18v3M15 18v3M3 9h3M3 15h3M18 9h3M18 15h3"})]});case"download":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M7 10l5 5 5-5M12 15V3"})});case"edit":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("path",{d:"M12 20h9"}),(0,ne.jsx)("path",{d:"M16.5 3.5a2.1 2.1 0 013 3L8 18l-4 1 1-4z"})]});case"enter":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("path",{d:"M9 10l-5 5 5 5"}),(0,ne.jsx)("path",{d:"M4 15h11a5 5 0 005-5V4"})]});case"explorer":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M14 3.5H6.5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V9L14 3.5ZM14 3.5V9h5.5M8.5 13h7M8.5 16.5h5"})});case"eye":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("path",{d:"M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z"}),(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"3"})]});case"file":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("path",{d:"M14 3H6a2 2 0 00-2 2v14a2 2 0 002 2h12a2 2 0 002-2V9z"}),(0,ne.jsx)("path",{d:"M14 3v6h6"})]});case"folder":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M20.5 18a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2H10l2 3h6.5a2 2 0 0 1 2 2v9Z"})});case"gear":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("path",{d:"m9.5 3-.6 2.5-2.2 1.3-2.5-.7-2.5 4.3 1.9 1.8v2.6l-1.9 1.8 2.5 4.3 2.5-.7 2.2 1.3.6 2.5h5l.6-2.5 2.2-1.3 2.5.7 2.5-4.3-1.9-1.8v-2.6l1.9-1.8-2.5-4.3-2.5.7-2.2-1.3L14.5 3Z",transform:"translate(2 1) scale(.833333)"}),(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"3"})]});case"git":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,ne.jsx)("path",{d:"M12 3v6M12 15v6"})]});case"hash":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M4 9h16M4 15h16M10 3L8 21M16 3l-2 18"})});case"history":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,ne.jsx)("path",{d:"M12 7v5l3.5 2"})]});case"home":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M4 11l8-7 8 7v9a2 2 0 01-2 2h-4v-7H10v7H6a2 2 0 01-2-2z"})});case"image":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,ne.jsx)("circle",{cx:"9",cy:"9",r:"2"}),(0,ne.jsx)("path",{d:"m21 15-4.5-4.5L5 21"})]});case"info":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,ne.jsx)("path",{d:"M12 11v5M12 8h.01"})]});case"keyboard":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"2",y:"6",width:"20",height:"12",rx:"2"}),(0,ne.jsx)("path",{d:"M6 10h.01M10 10h.01M14 10h.01M18 10h.01M6 14h.01M18 14h.01M9 14h6"})]});case"keycaps":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"3",y:"4",width:"8",height:"6",rx:"1.5"}),(0,ne.jsx)("rect",{x:"14",y:"4",width:"7",height:"6",rx:"1.5"}),(0,ne.jsx)("rect",{x:"3",y:"13",width:"18",height:"7",rx:"1.5"}),(0,ne.jsx)("path",{d:"M9 16.5h6"})]});case"lock":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"4",y:"11",width:"16",height:"10",rx:"2"}),(0,ne.jsx)("path",{d:"M8 11V7a4 4 0 0 1 8 0v4M12 15v2"})]});case"unlock":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"4",y:"11",width:"16",height:"10",rx:"2"}),(0,ne.jsx)("path",{d:"M8 11V7a4 4 0 0 1 7.8-1.2M12 15v2"})]});case"logout":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4M16 17l5-5-5-5M21 12H9"})});case"markdown":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),(0,ne.jsx)("path",{d:"M7 15V9l3 4 3-4v6"})]});case"merge":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("circle",{cx:"6",cy:"6",r:"2.5"}),(0,ne.jsx)("circle",{cx:"6",cy:"18",r:"2.5"}),(0,ne.jsx)("circle",{cx:"18",cy:"18",r:"2.5"}),(0,ne.jsx)("path",{d:"M6 8.5v7M8.5 18H15.5M8.5 6c6 0 7.5 5 7.5 9.5"})]});case"milestone":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("path",{d:"M5 21V4"}),(0,ne.jsx)("path",{d:"M5 5h11l-1.6 3.5L16 12H5z"})]});case"pin":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"m9 3 6 0-1 5 4 4v2h-5v7l-1-2-1 2v-7H6v-2l4-4z"})});case"more":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("circle",{cx:"12",cy:"5",r:"1"}),(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"1"}),(0,ne.jsx)("circle",{cx:"12",cy:"19",r:"1"})]});case"paperclip":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M21.44 11.05 12.25 20.24a6 6 0 0 1-8.49-8.49l8.84-8.84a4 4 0 1 1 5.66 5.66L9.41 17.41a2 2 0 1 1-2.83-2.83l8.84-8.83"})});case"parallel":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("path",{d:"M12 3l9 5-9 5-9-5 9-5z"}),(0,ne.jsx)("path",{d:"M3 13l9 5 9-5"}),(0,ne.jsx)("path",{d:"M3 17l9 5 9-5"})]});case"pdf":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("path",{d:"M14 3H6a2 2 0 00-2 2v14a2 2 0 002 2h12a2 2 0 002-2V9z"}),(0,ne.jsx)("path",{d:"M14 3v6h6M8 13h5M8 17h8"})]});case"plus":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M12 5v14M5 12h14"})});case"question":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,ne.jsx)("path",{d:"M9.8 9a2.5 2.5 0 113.5 2.3c-.9.4-1.3 1-1.3 2.2M12 17h.01"})]});case"rail":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"3"}),(0,ne.jsx)("path",{d:"M7 4v16"}),(0,ne.jsx)("path",{d:"M11 8h6M11 12h6M11 16h4"})]});case"refresh":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("path",{d:"M21 12a9 9 0 11-3-6.7"}),(0,ne.jsx)("path",{d:"M21 3v6h-6"})]});case"resume":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M1 4v6h6M3.5 15A9 9 0 109 3.6L3 10"})});case"search":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,ne.jsx)("path",{d:"M20 20l-3.5-3.5"})]});case"server":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"2",y:"3",width:"20",height:"8",rx:"2"}),(0,ne.jsx)("rect",{x:"2",y:"13",width:"20",height:"8",rx:"2"}),(0,ne.jsx)("path",{d:"M6 7h.01M6 17h.01"})]});case"shield":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})});case"shieldCheck":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),(0,ne.jsx)("path",{d:"M9 12l2 2 4-4"})]});case"sigma":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M18 4H6l7 8-7 8h12"})});case"sliders":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("path",{d:"M4 7h10M18 7h2"}),(0,ne.jsx)("circle",{cx:"16",cy:"7",r:"2"}),(0,ne.jsx)("path",{d:"M4 17h2M10 17h10"}),(0,ne.jsx)("circle",{cx:"8",cy:"17",r:"2"})]});case"spark":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("path",{d:"M12 2v4M12 18v4M4.9 4.9l2.8 2.8M16.3 16.3l2.8 2.8M2 12h4M18 12h4M4.9 19.1l2.8-2.8M16.3 7.7l2.8-2.8"}),(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"3"})]});case"sparkle":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("path",{d:"M12 3l1.3 3.8L17 8.1l-3.7 1.3L12 13l-1.3-3.6L7 8.1l3.7-1.3L12 3z"}),(0,ne.jsx)("path",{d:"M18 13l.7 2 2 .7-2 .7-.7 2-.7-2-2-.7 2-.7.7-2z"})]});case"splitHorizontal":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),(0,ne.jsx)("path",{d:"M12 4v16M6 9l3 3-3 3M18 9l-3 3 3 3"})]});case"splitVertical":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),(0,ne.jsx)("path",{d:"M3 12h18M9 7l3 3 3-3M9 17l3-3 3 3"})]});case"stop":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})});case"task":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"5",y:"4",width:"14",height:"16",rx:"2"}),(0,ne.jsx)("path",{d:"M9 9h6M9 13h6M9 17h4"})]});case"terminal":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"2.5",y:"3.5",width:"19",height:"17",rx:"3"}),(0,ne.jsx)("path",{d:"m5 7 5 5-5 5M12 17h7"})]});case"trash":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6"})});case"up":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M12 19V5M5 12l7-7 7 7"})});case"video":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),(0,ne.jsx)("path",{d:"m10 9 5 3-5 3z"})]});case"warning":return(0,ne.jsxs)("svg",{...u,children:[(0,ne.jsx)("path",{d:"M12 3l10 18H2L12 3z"}),(0,ne.jsx)("path",{d:"M12 10v5M12 18h.01"})]});case"wrench":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M14.7 6.3a4 4 0 1 1 4 4l-9 9-3.5 1 1-3.5 7.5-7.5z"})});case"zap":return(0,ne.jsx)("svg",{...u,children:(0,ne.jsx)("path",{d:"M13 2L4 14h7l-1 8 9-12h-7l1-8z"})})}}var Rh=A(_()),doe=A(_()),qp="RC_FORM_INTERNAL_HOOKS",Hr=()=>{Da(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},poe=doe.createContext({getFieldValue:Hr,getFieldsValue:Hr,getFieldError:Hr,getFieldWarning:Hr,getFieldsError:Hr,isFieldsTouched:Hr,isFieldTouched:Hr,isFieldValidating:Hr,isFieldsValidating:Hr,resetFields:Hr,setFields:Hr,setFieldValue:Hr,setFieldsValue:Hr,validateFields:Hr,submit:Hr,getInternalHooks:()=>(Hr(),{dispatch:Hr,initEntityValue:Hr,registerField:Hr,useSubscribe:Hr,setInitialValues:Hr,destroyForm:Hr,setCallbacks:Hr,registerWatch:Hr,getFields:Hr,setValidateMessages:Hr,setPreserve:Hr,getInitialValue:Hr})}),Wp=poe;function DF(e){return e==null?[]:Array.isArray(e)?e:[e]}function foe(e){return e&&!!e._init}function Fn(e){return DF(e)}function wz(e,t){let r={};return t.forEach(n=>{let a=Ni(e,n);r=mi(r,n,a)}),r}function Lh(e,t,r=!1){return e&&e.some(n=>Yx(t,n,r))}function Yx(e,t,r=!1){return!e||!t||!r&&e.length!==t.length?!1:t.every((n,a)=>e[a]===n)}function moe(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!="object"||typeof t!="object")return!1;let r=Object.keys(e),n=Object.keys(t);return[...new Set([...r,...n])].every(a=>{let o=e[a],l=t[a];return typeof o=="function"&&typeof l=="function"?!0:o===l})}function hoe(e,...t){let r=t[0];return r&&r.target&&typeof r.target=="object"&&e in r.target?r.target[e]:r}function xz(e,t,r){let{length:n}=e;if(t<0||t>=n||r<0||r>=n)return e;let a=e[t],o=t-r;return o>0?[...e.slice(0,r),a,...e.slice(r,t),...e.slice(t+1,n)]:o<0?[...e.slice(0,t),...e.slice(t+1,r+1),a,...e.slice(r+1,n)]:e}function SF(e){try{return JSON.stringify(e)}catch{return Math.random()}}function goe(...e){let[t,r={}]=e,n=foe(r)?{form:r}:r,a=n.form,[o,l]=(0,Rh.useState)(()=>typeof t=="function"?t({}):void 0),u=(0,Rh.useMemo)(()=>SF(o),[o]),d=(0,Rh.useRef)(u);d.current=u;let p=(0,Rh.useContext)(Wp),h=a||p,v=h&&h._init,{getFieldsValue:g,getInternalHooks:b}=h,{registerWatch:x}=b(qp),y=xt((F,S)=>{let D=n.preserve?S??g(!0):F??g(),$=typeof t=="function"?t(D):Ni(D,Fn(t));SF(o)!==SF($)&&l($)}),E=typeof t=="function"?t:JSON.stringify(t);return(0,Rh.useEffect)(()=>{v&&y()},[v,E]),(0,Rh.useEffect)(()=>v?x((F,S)=>{y(F,S)}):void 0,[v]),o}var Bz=goe,voe=A(_()),ku=A(_()),boe=A(_()),yoe=boe.createContext(null),vb=yoe;function AF(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",tel:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone(){let e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var BF=AF(),woe=/%[sdj%]/g,xoe=()=>{};typeof process<"u"&&process.env;function IF(e){if(!e||!e.length)return null;let t={};return e.forEach(r=>{let n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function ho(e,...t){let r=0,n=t.length;return typeof e=="function"?e.apply(null,t):typeof e=="string"?e.replace(woe,a=>{if(a==="%%")return"%";if(r>=n)return a;switch(a){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch{return"[Circular]"}break;default:return a}}):e}function Eoe(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function na(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||Eoe(t)&&typeof e=="string"&&!e)}function koe(e,t,r){let n=[],a=0,o=e.length;function l(u){n.push(...u||[]),a++,a===o&&r(n)}e.forEach(u=>{t(u,l)})}function Ez(e,t,r){let n=0,a=e.length;function o(l){if(l&&l.length){r(l);return}let u=n;n=n+1,u<a?t(e[u],o):r([])}o([])}function Coe(e){let t=[];return Object.keys(e).forEach(r=>{t.push(...e[r]||[])}),t}var kz=class extends Error{constructor(e,t){super("Async Validation Error"),ae(this,"errors"),ae(this,"fields"),this.errors=e,this.fields=t}};function Soe(e,t,r,n,a){if(t.first){let v=new Promise((g,b)=>{let x=E=>(n(E),E.length?b(new kz(E,IF(E))):g(a)),y=Coe(e);Ez(y,r,x)});return v.catch(g=>g),v}let o=t.firstFields===!0?Object.keys(e):t.firstFields||[],l=Object.keys(e),u=l.length,d=0,p=[],h=new Promise((v,g)=>{let b=x=>{if(p.push.apply(p,x),d++,d===u)return n(p),p.length?g(new kz(p,IF(p))):v(a)};l.length||(n(p),v(a)),l.forEach(x=>{let y=e[x];o.indexOf(x)!==-1?Ez(y,r,b):koe(y,r,b)})});return h.catch(v=>v),h}function Foe(e){return!!(e&&e.message!==void 0)}function $oe(e,t){let r=e;for(let n=0;n<t.length;n++){if(r==null)return r;r=r[t[n]]}return r}function Cz(e,t){return r=>{let n;return e.fullFields?n=$oe(t,e.fullFields):n=t[r.field||e.fullField],Foe(r)?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||e.fullField}}}function Sz(e,t){if(t){for(let r in t)if(t.hasOwnProperty(r)){let n=t[r];typeof n=="object"&&typeof e[r]=="object"?e[r]={...e[r],...n}:e[r]=n}}return e}var Oh="enum",Doe=(e,t,r,n,a)=>{e[Oh]=Array.isArray(e[Oh])?e[Oh]:[],e[Oh].indexOf(t)===-1&&n.push(ho(a.messages[Oh],e.fullField,e[Oh].join(", ")))},Aoe=Doe,Boe=(e,t,r,n,a)=>{e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||n.push(ho(a.messages.pattern.mismatch,e.fullField,t,e.pattern))):typeof e.pattern=="string"&&(new RegExp(e.pattern).test(t)||n.push(ho(a.messages.pattern.mismatch,e.fullField,t,e.pattern))))},Ioe=Boe,Moe=(e,t,r,n,a)=>{let o=typeof e.len=="number",l=typeof e.min=="number",u=typeof e.max=="number",d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p=t,h=null,v=typeof t=="number",g=typeof t=="string",b=Array.isArray(t);if(v?h="number":g?h="string":b&&(h="array"),!h)return!1;b&&(p=t.length),g&&(p=t.replace(d,"_").length),o?p!==e.len&&n.push(ho(a.messages[h].len,e.fullField,e.len)):l&&!u&&p<e.min?n.push(ho(a.messages[h].min,e.fullField,e.min)):u&&!l&&p>e.max?n.push(ho(a.messages[h].max,e.fullField,e.max)):l&&u&&(p<e.min||p>e.max)&&n.push(ho(a.messages[h].range,e.fullField,e.min,e.max))},Toe=Moe,_oe=(e,t,r,n,a,o)=>{e.required&&(!r.hasOwnProperty(e.field)||na(t,o||e.type))&&n.push(ho(a.messages.required,e.fullField))},Iz=_oe,Gx,joe=(()=>{if(Gx)return Gx;let e="[a-fA-F\\d:]",t=x=>x&&x.includeBoundaries?`(?:(?<=\\s|^)(?=${e})|(?<=${e})(?=\\s|$))`:"",r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",a=`(?:${[`(?:${n}:){7}(?:${n}|:)`,`(?:${n}:){6}(?:${r}|:${n}|:)`,`(?:${n}:){5}(?::${r}|(?::${n}){1,2}|:)`,`(?:${n}:){4}(?:(?::${n}){0,1}:${r}|(?::${n}){1,3}|:)`,`(?:${n}:){3}(?:(?::${n}){0,2}:${r}|(?::${n}){1,4}|:)`,`(?:${n}:){2}(?:(?::${n}){0,3}:${r}|(?::${n}){1,5}|:)`,`(?:${n}:){1}(?:(?::${n}){0,4}:${r}|(?::${n}){1,6}|:)`,`(?::(?:(?::${n}){0,5}:${r}|(?::${n}){1,7}|:))`].join("|")})(?:%[0-9a-zA-Z]{1,})?`,o=new RegExp(`(?:^${r}$)|(?:^${a}$)`),l=new RegExp(`^${r}$`),u=new RegExp(`^${a}$`),d=x=>x&&x.exact?o:new RegExp(`(?:${t(x)}${r}${t(x)})|(?:${t(x)}${a}${t(x)})`,"g");d.v4=x=>x&&x.exact?l:new RegExp(`${t(x)}${r}${t(x)}`,"g"),d.v6=x=>x&&x.exact?u:new RegExp(`${t(x)}${a}${t(x)}`,"g");let p="(?:(?:[a-z]+:)?//)",h="(?:\\S+(?::\\S*)?@)?",v=d.v4().source,g=d.v6().source,b=`(?:${p}|www\\.)${h}(?:localhost|${v}|${g}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return Gx=new RegExp(`(?:^${b}$)`,"i"),Gx}),FF={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},mb={integer(e){return mb.number(e)&&parseInt(e,10)===e},float(e){return mb.number(e)&&!mb.integer(e)},array(e){return Array.isArray(e)},regexp(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number(e){return isNaN(e)?!1:typeof e=="number"},object(e){return typeof e=="object"&&!mb.array(e)},method(e){return typeof e=="function"},email(e){return typeof e=="string"&&e.length<=320&&!!e.match(FF.email)},tel(e){return typeof e=="string"&&e.length<=32&&!!e.match(FF.tel)},url(e){return typeof e=="string"&&e.length<=2048&&!!e.match(joe())},hex(e){return typeof e=="string"&&!!e.match(FF.hex)}},Noe=(e,t,r,n,a)=>{if(e.required&&t===void 0){Iz(e,t,r,n,a);return}let o=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],l=e.type;o.indexOf(l)>-1?mb[l](t)||n.push(ho(a.messages.types[l],e.fullField,e.type)):l&&typeof t!==e.type&&n.push(ho(a.messages.types[l],e.fullField,e.type))},Poe=Noe,Roe=(e,t,r,n,a)=>{(/^\s+$/.test(t)||t==="")&&n.push(ho(a.messages.whitespace,e.fullField))},Ooe=Roe,lr={required:Iz,whitespace:Ooe,type:Poe,range:Toe,enum:Aoe,pattern:Ioe},zoe=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t)&&!e.required)return r();lr.required(e,t,n,o,a)}r(o)},Loe=zoe,Hoe=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(t==null&&!e.required)return r();lr.required(e,t,n,o,a,"array"),t!=null&&(lr.type(e,t,n,o,a),lr.range(e,t,n,o,a))}r(o)},qoe=Hoe,Woe=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t)&&!e.required)return r();lr.required(e,t,n,o,a),t!==void 0&&lr.type(e,t,n,o,a)}r(o)},Uoe=Woe,Voe=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t,"date")&&!e.required)return r();if(lr.required(e,t,n,o,a),!na(t,"date")){let l;t instanceof Date?l=t:l=new Date(t),lr.type(e,l,n,o,a),l&&lr.range(e,l.getTime(),n,o,a)}}r(o)},Goe=Voe,Koe="enum",Xoe=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t)&&!e.required)return r();lr.required(e,t,n,o,a),t!==void 0&&lr[Koe](e,t,n,o,a)}r(o)},Qoe=Xoe,Yoe=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t)&&!e.required)return r();lr.required(e,t,n,o,a),t!==void 0&&(lr.type(e,t,n,o,a),lr.range(e,t,n,o,a))}r(o)},Joe=Yoe,Zoe=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t)&&!e.required)return r();lr.required(e,t,n,o,a),t!==void 0&&(lr.type(e,t,n,o,a),lr.range(e,t,n,o,a))}r(o)},ese=Zoe,tse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t)&&!e.required)return r();lr.required(e,t,n,o,a),t!==void 0&&lr.type(e,t,n,o,a)}r(o)},rse=tse,nse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(t===""&&(t=void 0),na(t)&&!e.required)return r();lr.required(e,t,n,o,a),t!==void 0&&(lr.type(e,t,n,o,a),lr.range(e,t,n,o,a))}r(o)},ase=nse,ise=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t)&&!e.required)return r();lr.required(e,t,n,o,a),t!==void 0&&lr.type(e,t,n,o,a)}r(o)},ose=ise,sse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t,"string")&&!e.required)return r();lr.required(e,t,n,o,a),na(t,"string")||lr.pattern(e,t,n,o,a)}r(o)},lse=sse,use=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t)&&!e.required)return r();lr.required(e,t,n,o,a),na(t)||lr.type(e,t,n,o,a)}r(o)},cse=use,dse=(e,t,r,n,a)=>{let o=[],l=Array.isArray(t)?"array":typeof t;lr.required(e,t,n,o,a,l),r(o)},pse=dse,fse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t,"string")&&!e.required)return r();lr.required(e,t,n,o,a,"string"),na(t,"string")||(lr.type(e,t,n,o,a),lr.range(e,t,n,o,a),lr.pattern(e,t,n,o,a),e.whitespace===!0&&lr.whitespace(e,t,n,o,a))}r(o)},mse=fse,hse=(e,t,r,n,a)=>{let o=e.type,l=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(na(t,o)&&!e.required)return r();lr.required(e,t,n,l,a,o),na(t,o)||lr.type(e,t,n,l,a)}r(l)},Kx=hse,gb={string:mse,method:rse,number:ase,boolean:Uoe,regexp:cse,integer:ese,float:Joe,array:qoe,object:ose,enum:Qoe,pattern:lse,date:Goe,url:Kx,hex:Kx,email:Kx,tel:Kx,required:pse,any:Loe},hb=class MF{constructor(t){ae(this,"rules",null),ae(this,"_messages",BF),this.define(t)}define(t){if(!t)throw new Error("Cannot configure a schema with no rules");if(typeof t!="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={},Object.keys(t).forEach(r=>{let n=t[r];this.rules[r]=Array.isArray(n)?n:[n]})}messages(t){return t&&(this._messages=Sz(AF(),t)),this._messages}validate(t,r={},n=()=>{}){let a=t,o=r,l=n;if(typeof o=="function"&&(l=o,o={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,a),Promise.resolve(a);function u(h){let v=[],g={};function b(x){Array.isArray(x)?v=v.concat(...x):v.push(x)}for(let x=0;x<h.length;x++)b(h[x]);v.length?(g=IF(v),l(v,g)):l(null,a)}if(o.messages){let h=this.messages();h===BF&&(h=AF()),Sz(h,o.messages),o.messages=h}else o.messages=this.messages();let d={};(o.keys||Object.keys(this.rules)).forEach(h=>{let v=this.rules[h],g=a[h];v.forEach(b=>{let x=b;typeof x.transform=="function"&&(a===t&&(a={...a}),g=a[h]=x.transform(g),g!=null&&(x.type=x.type||(Array.isArray(g)?"array":typeof g))),typeof x=="function"?x={validator:x}:x={...x},x.validator=this.getValidationMethod(x),x.validator&&(x.field=h,x.fullField=x.fullField||h,x.type=this.getType(x),d[h]=d[h]||[],d[h].push({rule:x,value:g,source:a,field:h}))})});let p={};return Soe(d,o,(h,v)=>{let g=h.rule,b=(g.type==="object"||g.type==="array")&&(typeof g.fields=="object"||typeof g.defaultField=="object");b=b&&(g.required||!g.required&&h.value),g.field=h.field;function x(F,S){return{...S,fullField:`${g.fullField}.${F}`,fullFields:g.fullFields?[...g.fullFields,F]:[F]}}function y(F=[]){let S=Array.isArray(F)?F:[F];!o.suppressWarning&&S.length&&MF.warning("async-validator:",S),S.length&&g.message!==void 0&&g.message!==null&&(S=[].concat(g.message));let D=S.map(Cz(g,a));if(o.first&&D.length)return p[g.field]=1,v(D);if(!b)v(D);else{if(g.required&&!h.value)return g.message!==void 0?D=[].concat(g.message).map(Cz(g,a)):o.error&&(D=[o.error(g,ho(o.messages.required,g.field))]),v(D);let $={};g.defaultField&&Object.keys(h.value).map(M=>{$[M]=g.defaultField}),$={...$,...h.rule.fields};let C={};Object.keys($).forEach(M=>{let I=$[M],j=Array.isArray(I)?I:[I];C[M]=j.map(x.bind(null,M))});let B=new MF(C);B.messages(o.messages),h.rule.options&&(h.rule.options.messages=o.messages,h.rule.options.error=o.error),B.validate(h.value,h.rule.options||o,M=>{let I=[];D&&D.length&&I.push(...D),M&&M.length&&I.push(...M),v(I.length?I:null)})}}let E;if(g.asyncValidator)E=g.asyncValidator(g,h.value,y,h.source,o);else if(g.validator){try{E=g.validator(g,h.value,y,h.source,o)}catch(F){console.error?.(F),o.suppressValidatorError||setTimeout(()=>{throw F},0),y(F.message)}E===!0?y():E===!1?y(typeof g.message=="function"?g.message(g.fullField||g.field):g.message||`${g.fullField||g.field} fails`):E instanceof Array?y(E):E instanceof Error&&y(E.message)}E&&E.then&&E.then(()=>y(),F=>y(F))},h=>{u(h)},a)}getType(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!gb.hasOwnProperty(t.type))throw new Error(ho("Unknown rule type %s",t.type));return t.type||"string"}getValidationMethod(t){if(typeof t.validator=="function")return t.validator;let r=Object.keys(t),n=r.indexOf("message");return n!==-1&&r.splice(n,1),r.length===1&&r[0]==="required"?gb.required:gb[this.getType(t)]||void 0}};ae(hb,"register",function(e,t){if(typeof t!="function")throw new Error("Cannot register a validator by type, validator is not a function");gb[e]=t}),ae(hb,"warning",xoe),ae(hb,"messages",BF),ae(hb,"validators",gb);var gse=hb,vse=gse,Fz=A(_()),Ri="'${name}' is not a valid ${type}",Mz={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Ri,method:Ri,array:Ri,object:Ri,number:Ri,date:Ri,boolean:Ri,integer:Ri,float:Ri,regexp:Ri,email:Ri,tel:Ri,url:Ri,hex:Ri},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},$z=vse;function bse(e,t){return e.replace(/\\?\$\{\w+\}/g,r=>{if(r.startsWith("\\"))return r.slice(1);let n=r.slice(2,-1);return t[n]})}var Dz="CODE_LOGIC_ERROR";async function TF(e,t,r,n,a){let o={...r};if(delete o.ruleIndex,$z.warning=()=>{},o.validator){let v=o.validator;o.validator=(...g)=>{try{return v(...g)}catch(b){return console.error(b),Promise.reject(Dz)}}}let l=null;o&&o.type==="array"&&o.defaultField&&(l=o.defaultField,delete o.defaultField);let u=new $z({[e]:[o]}),d=td(Mz,n.validateMessages);u.messages(d);let p=[];try{await Promise.resolve(u.validate({[e]:t},{...n}))}catch(v){v.errors&&(p=v.errors.map(({message:g},b)=>{let x=g===Dz?d.default:g;return Fz.isValidElement(x)?Fz.cloneElement(x,{key:`error_${b}`}):x}))}if(!p.length&&l&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((v,g)=>TF(`${e}.${g}`,v,l,n,a)))).reduce((v,g)=>[...v,...g],[]);let h={...r,name:e,enum:(r.enum||[]).join(", "),...a};return p.map(v=>typeof v=="string"?bse(v,h):v)}function yse(e,t,r,n,a,o){let l=e.join("."),u=r.map((p,h)=>{let v=p.validator,g={...p,ruleIndex:h};return v&&(g.validator=(b,x,y)=>{let E=!1,F=v(b,x,(...S)=>{Promise.resolve().then(()=>{Da(!E,"Your validator function has already return a promise. `callback` will be ignored."),E||y(...S)})});E=F&&typeof F.then=="function"&&typeof F.catch=="function",Da(E,"`callback` is deprecated. Please return a promise instead."),E&&F.then(()=>{y()}).catch(S=>{y(S||" ")})}),g}).sort(({warningOnly:p,ruleIndex:h},{warningOnly:v,ruleIndex:g})=>!!p==!!v?h-g:p?1:-1),d;if(a===!0)d=new Promise(async(p,h)=>{for(let v=0;v<u.length;v+=1){let g=u[v],b=await TF(l,t,g,n,o);if(b.length){h([{errors:b,rule:g}]);return}}p([])});else{let p=u.map(h=>TF(l,t,h,n,o).then(v=>({errors:v,rule:h})));d=(a?xse(p):wse(p)).then(h=>Promise.reject(h))}return d.catch(p=>p),d}async function wse(e){return Promise.all(e).then(t=>[].concat(...t))}async function xse(e){let t=0;return new Promise(r=>{e.forEach(n=>{n.then(a=>{a.errors.length&&r([a]),t+=1,t===e.length&&r([])})})})}var Tz=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},Ese=class{constructor(e){ae(this,"namePathList",[]),ae(this,"taskId",0),ae(this,"watcherList",new Set),ae(this,"form"),this.form=e}register(e){return this.watcherList.add(e),()=>{this.watcherList.delete(e)}}notify(e){e.forEach(t=>{this.namePathList.every(r=>!Yx(r,t))&&this.namePathList.push(t)}),this.doBatch()}doBatch(){this.taskId+=1;let e=this.taskId;Tz(()=>{if(e===this.taskId&&this.watcherList.size){let t=this.form.getForm(),r=t.getFieldsValue(),n=t.getFieldsValue(!0);this.watcherList.forEach(a=>{a(r,n,this.namePathList)}),this.namePathList=[]}})}};async function kse(){return new Promise(e=>{Tz(()=>{br(()=>{e()})})})}function _F(){return _F=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_F.apply(this,arguments)}var Hp=[],fb=[];function $F(e,t,r,n,a,o){return typeof e=="function"?e(t,r,"source"in o?{source:o.source}:{}):n!==a}var _z=class extends ku.PureComponent{constructor(e){if(super(e),ae(this,"state",{resetCount:0}),ae(this,"cancelRegisterFunc",null),ae(this,"mounted",!1),ae(this,"touched",!1),ae(this,"dirty",!1),ae(this,"validatePromise"),ae(this,"prevValidating"),ae(this,"errors",Hp),ae(this,"warnings",fb),ae(this,"cancelRegister",()=>{let{preserve:t,isListField:r,name:n}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(r,t,Fn(n)),this.cancelRegisterFunc=null}),ae(this,"getNamePath",()=>{let{name:t,fieldContext:r}=this.props,{prefixName:n=[]}=r;return t!==void 0?[...n,...t]:[]}),ae(this,"getRules",()=>{let{rules:t=[],fieldContext:r}=this.props;return t.map(n=>typeof n=="function"?n(r):n)}),ae(this,"refresh",()=>{this.mounted&&this.setState(({resetCount:t})=>({resetCount:t+1}))}),ae(this,"metaCache",null),ae(this,"triggerMetaEvent",t=>{let{onMetaChange:r}=this.props;if(r){let n={...this.getMeta(),destroy:t};ed(this.metaCache,n)||r(n),this.metaCache=n}else this.metaCache=null}),ae(this,"onStoreChange",(t,r,n)=>{let{shouldUpdate:a,dependencies:o=[],onReset:l}=this.props,{store:u}=n,d=this.getNamePath(),p=this.getValue(t),h=this.getValue(u),v=r&&Lh(r,d);switch(n.type==="valueUpdate"&&n.source==="external"&&!ed(p,h)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=Hp,this.warnings=fb,this.triggerMetaEvent()),n.type){case"reset":if(!r||v){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=Hp,this.warnings=fb,this.triggerMetaEvent(),l?.(),this.refresh();return}break;case"remove":{if(a&&$F(a,t,u,p,h,n)){this.reRender();return}break}case"setField":{let{data:g}=n;if(v){"touched"in g&&(this.touched=g.touched),"validating"in g&&!("originRCField"in g)&&(this.validatePromise=g.validating?Promise.resolve([]):null),"errors"in g&&(this.errors=g.errors||Hp),"warnings"in g&&(this.warnings=g.warnings||fb),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if("value"in g&&Lh(r,d,!0)){this.reRender();return}if(a&&!d.length&&$F(a,t,u,p,h,n)){this.reRender();return}break}case"dependenciesUpdate":{if(o.map(Fn).some(g=>Lh(n.relatedFields,g))){this.reRender();return}break}default:if(v||(!o.length||d.length||a)&&$F(a,t,u,p,h,n)){this.reRender();return}break}a===!0&&this.reRender()}),ae(this,"validateRules",t=>{let r=this.getNamePath(),n=this.getValue(),{triggerName:a,validateOnly:o=!1,delayFrame:l}=t||{},u=Promise.resolve().then(async()=>{if(!this.mounted)return[];let{validateFirst:d=!1,messageVariables:p,validateDebounce:h}=this.props;l&&await kse();let v=this.getRules();if(a&&(v=v.filter(b=>b).filter(b=>{let{validateTrigger:x}=b;return x?DF(x).includes(a):!0})),h&&a&&(await new Promise(b=>{setTimeout(b,h)}),this.validatePromise!==u))return[];let g=yse(r,n,v,t,d,p);return g.catch(b=>b).then((b=Hp)=>{if(this.validatePromise===u){this.validatePromise=null;let x=[],y=[];b.forEach?.(({rule:{warningOnly:E},errors:F=Hp})=>{E?y.push(...F):x.push(...F)}),this.errors=x,this.warnings=y,this.triggerMetaEvent(),this.reRender()}}),g});return o||(this.validatePromise=u,this.dirty=!0,this.errors=Hp,this.warnings=fb,this.triggerMetaEvent(),this.reRender()),u}),ae(this,"isFieldValidating",()=>!!this.validatePromise),ae(this,"isFieldTouched",()=>this.touched),ae(this,"isFieldDirty",()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;let{fieldContext:t}=this.props,{getInitialValue:r}=t.getInternalHooks(qp);return r(this.getNamePath())!==void 0}),ae(this,"getErrors",()=>this.errors),ae(this,"getWarnings",()=>this.warnings),ae(this,"isListField",()=>this.props.isListField),ae(this,"isList",()=>this.props.isList),ae(this,"isPreserve",()=>this.props.preserve),ae(this,"getMeta",()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null})),ae(this,"getOnlyChild",t=>{if(typeof t=="function"){let n=this.getMeta();return{...this.getOnlyChild(t(this.getControlled(),n,this.props.fieldContext)),isFunction:!0}}let r=Er(t);return r.length!==1||!ku.isValidElement(r[0])?{child:r,isFunction:!1}:{child:r[0],isFunction:!1}}),ae(this,"getValue",t=>{let{getFieldsValue:r}=this.props.fieldContext,n=this.getNamePath();return Ni(t||r(!0),n)}),ae(this,"getControlled",(t={})=>{let{name:r,trigger:n="onChange",validateTrigger:a,getValueFromEvent:o,normalize:l,valuePropName:u="value",getValueProps:d,fieldContext:p}=this.props,h=a!==void 0?a:p.validateTrigger,v=this.getNamePath(),{getInternalHooks:g,getFieldsValue:b}=p,{dispatch:x}=g(qp),y=this.getValue(),E=d||($=>({[u]:$})),F=t[n],S=r!==void 0?E(y):{},D={...t,...S};return D[n]=(...$)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();let C=this.getValue(),B;o?B=o(...$):B=hoe(u,...$),l&&(B=l(B,C,b(!0))),B!==C&&x({type:"updateValue",namePath:v,value:B}),F&&F(...$)},DF(h||[]).forEach($=>{let C=D[$];D[$]=(...B)=>{C&&C(...B);let{rules:M}=this.props;M&&M.length&&x({type:"validateField",namePath:v,triggerName:$})}}),D}),e.fieldContext){let{getInternalHooks:t}=e.fieldContext,{initEntityValue:r}=t(qp);r(this)}}componentDidMount(){let{shouldUpdate:e,fieldContext:t}=this.props;if(this.mounted=!0,t){let{getInternalHooks:r}=t,{registerField:n}=r(qp);this.cancelRegisterFunc=n(this)}e===!0&&this.reRender()}componentWillUnmount(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}reRender(){this.mounted&&this.forceUpdate()}render(){let{resetCount:e}=this.state,{children:t}=this.props,{child:r,isFunction:n}=this.getOnlyChild(t),a;return n?a=r:ku.isValidElement(r)?a=ku.cloneElement(r,this.getControlled(r.props)):(Da(!r,"`children` of Field is not validate ReactElement."),a=r),ku.createElement(ku.Fragment,{key:e},a)}};ae(_z,"contextType",Wp);function Cse({name:e,...t}){let r=ku.useContext(Wp),n=ku.useContext(vb),a=e!==void 0?Fn(e):void 0,o=t.isListField??!!n,l="keep";return o||(l=`_${(a||[]).join("_")}`),ku.createElement(_z,_F({key:l,name:a,isListField:o},t,{fieldContext:r}))}var RF=Cse,Eu=A(_());function Sse({name:e,initialValue:t,children:r,rules:n,validateTrigger:a,isListField:o}){let l=Eu.useContext(Wp),u=Eu.useContext(vb),d=Eu.useRef({keys:[],id:0}).current,p=Eu.useMemo(()=>[...Fn(l.prefixName)||[],...Fn(e)],[l.prefixName,e]),h=Eu.useMemo(()=>({...l,prefixName:p}),[l,p]),v=Eu.useMemo(()=>({getKey:b=>{let x=p.length,y=b[x];return[d.keys[y],b.slice(x+1)]}}),[d,p]);if(typeof r!="function")return Da(!1,"Form.List only accepts function as children."),null;let g=(b,x,{source:y})=>y==="internal"?!1:b!==x;return Eu.createElement(vb.Provider,{value:v},Eu.createElement(Wp.Provider,{value:h},Eu.createElement(RF,{name:[],shouldUpdate:g,rules:n,validateTrigger:a,initialValue:t,isList:!0,isListField:o??!!u},({value:b=[],onChange:x},y)=>{let{getFieldValue:E}=l,F=()=>E(p||[])||[],S={add:($,C)=>{let B=F();C>=0&&C<=B.length?(d.keys=[...d.keys.slice(0,C),d.id,...d.keys.slice(C)],x([...B.slice(0,C),$,...B.slice(C)])):(d.keys=[...d.keys,d.id],x([...B,$])),d.id+=1},remove:$=>{let C=F(),B=new Set(Array.isArray($)?$:[$]);B.size<=0||(d.keys=d.keys.filter((M,I)=>!B.has(I)),x(C.filter((M,I)=>!B.has(I))))},move($,C){if($===C)return;let B=F();$<0||$>=B.length||C<0||C>=B.length||(d.keys=xz(d.keys,$,C),x(xz(B,$,C)))}},D=b||[];return Array.isArray(D)||(D=[]),r(D.map(($,C)=>{let B=d.keys[C];return B===void 0&&(d.keys[C]=d.id,B=d.keys[C],d.id+=1),{name:C,key:B,isListField:!0}}),S,y)})))}var jz=Sse,Az=A(_());function Fse(e){let t=!1,r=e.length,n=[];return e.length?new Promise((a,o)=>{e.forEach((l,u)=>{l.catch(d=>(t=!0,d)).then(d=>{r-=1,n[u]=d,!(r>0)&&(t&&o(n),a(n))})})}):Promise.resolve([])}var jF="__@field_split__";function Xx(e){return e.map(t=>`${typeof t}:${t}`).join(jF)}var $se=class{constructor(){ae(this,"kvs",new Map)}set(e,t){this.kvs.set(Xx(e),t)}get(e){return this.kvs.get(Xx(e))}getAsPrefix(e){let t=Xx(e),r=t+jF,n=[],a=this.kvs.get(t);return a!==void 0&&n.push(a),this.kvs.forEach((o,l)=>{l.startsWith(r)&&n.push(o)}),n}update(e,t){let r=this.get(e),n=t(r);n?this.set(e,n):this.delete(e)}delete(e){this.kvs.delete(Xx(e))}map(e){return[...this.kvs.entries()].map(([t,r])=>{let n=t.split(jF);return e({key:n.map(a=>{let[,o,l]=a.match(/^([^:]*):(.*)$/);return o==="number"?Number(l):l}),value:r})})}toJSON(){let e={};return this.map(({key:t,value:r})=>(e[t.join(".")]=r,null)),e}},zh=$se,Dse=class{constructor(e){ae(this,"formHooked",!1),ae(this,"forceRootUpdate"),ae(this,"subscribable",!0),ae(this,"store",{}),ae(this,"fieldEntities",[]),ae(this,"initialValues",{}),ae(this,"callbacks",{}),ae(this,"validateMessages",null),ae(this,"preserve",null),ae(this,"lastValidatePromise",null),ae(this,"watcherCenter",new Ese(this)),ae(this,"getForm",()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks})),ae(this,"getInternalHooks",t=>t===qp?(this.formHooked=!0,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch}):(Da(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)),ae(this,"useSubscribe",t=>{this.subscribable=t}),ae(this,"prevWithoutPreserves",null),ae(this,"setInitialValues",(t,r)=>{if(this.initialValues=t||{},r){let n=td(t,this.store);this.prevWithoutPreserves?.map(({key:a})=>{n=mi(n,a,Ni(t,a))}),this.prevWithoutPreserves=null,this.updateStore(n)}}),ae(this,"destroyForm",t=>{if(t)this.updateStore({});else{let r=new zh;this.getFieldEntities(!0).forEach(n=>{this.isMergedPreserve(n.isPreserve())||r.set(n.getNamePath(),!0)}),this.prevWithoutPreserves=r}}),ae(this,"getInitialValue",t=>{let r=Ni(this.initialValues,t);return t.length?td(r):r}),ae(this,"setCallbacks",t=>{this.callbacks=t}),ae(this,"setValidateMessages",t=>{this.validateMessages=t}),ae(this,"setPreserve",t=>{this.preserve=t}),ae(this,"registerWatch",t=>this.watcherCenter.register(t)),ae(this,"notifyWatch",(t=[])=>{this.watcherCenter.notify(t)}),ae(this,"timeoutId",null),ae(this,"warningUnhooked",()=>{}),ae(this,"updateStore",t=>{this.store=t}),ae(this,"getFieldEntities",(t=!1)=>t?this.fieldEntities.filter(r=>r.getNamePath().length):this.fieldEntities),ae(this,"getFieldsMap",(t=!1)=>{let r=new zh;return this.getFieldEntities(t).forEach(n=>{let a=n.getNamePath();r.set(a,n)}),r}),ae(this,"getFieldEntitiesForNamePathList",(t,r=!1)=>{if(!t)return this.getFieldEntities(!0);let n=this.getFieldsMap(!0);return r?t.flatMap(a=>{let o=Fn(a),l=n.getAsPrefix(o);return l.length?l:[{INVALIDATE_NAME_PATH:o}]}):t.map(a=>{let o=Fn(a);return n.get(o)||{INVALIDATE_NAME_PATH:Fn(a)}})}),ae(this,"getFieldsValue",(t,r)=>{this.warningUnhooked();let n,a;if(t===!0||Array.isArray(t)?(n=t,a=r):t&&typeof t=="object"&&(a=t.filter),n===!0&&!a)return this.store;let o=this.getFieldEntitiesForNamePathList(Array.isArray(n)?n:null,!0),l=[],u=[];o.forEach(p=>{let h=p.INVALIDATE_NAME_PATH||p.getNamePath();if(p.isList?.()){u.push(h);return}if(!a)l.push(h);else{let v="getMeta"in p?p.getMeta():null;a(v)&&l.push(h)}});let d=wz(this.store,l.map(Fn));return u.forEach(p=>{Ni(d,p)||(d=mi(d,p,[]))}),d}),ae(this,"getFieldValue",t=>{this.warningUnhooked();let r=Fn(t);return Ni(this.store,r)}),ae(this,"getFieldsError",t=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(t).map((r,n)=>r&&!r.INVALIDATE_NAME_PATH?{name:r.getNamePath(),errors:r.getErrors(),warnings:r.getWarnings()}:{name:Fn(t[n]),errors:[],warnings:[]}))),ae(this,"getFieldError",t=>{this.warningUnhooked();let r=Fn(t);return this.getFieldsError([r])[0].errors}),ae(this,"getFieldWarning",t=>{this.warningUnhooked();let r=Fn(t);return this.getFieldsError([r])[0].warnings}),ae(this,"isFieldsTouched",(...t)=>{this.warningUnhooked();let[r,n]=t,a,o=!1;t.length===0?a=null:t.length===1?Array.isArray(r)?(a=r.map(Fn),o=!1):(a=null,o=r):(a=r.map(Fn),o=n);let l=this.getFieldEntities(!0),u=v=>v.isFieldTouched();if(!a)return o?l.every(v=>u(v)||v.isList()):l.some(u);let d=new zh;a.forEach(v=>{d.set(v,[])}),l.forEach(v=>{let g=v.getNamePath();a.forEach(b=>{b.every((x,y)=>g[y]===x)&&d.update(b,x=>[...x,v])})});let p=v=>v.some(u),h=d.map(({value:v})=>v);return o?h.every(p):h.some(p)}),ae(this,"isFieldTouched",t=>(this.warningUnhooked(),this.isFieldsTouched([t]))),ae(this,"isFieldsValidating",t=>{this.warningUnhooked();let r=this.getFieldEntities();if(!t)return r.some(a=>a.isFieldValidating());let n=t.map(Fn);return r.some(a=>{let o=a.getNamePath();return Lh(n,o)&&a.isFieldValidating()})}),ae(this,"isFieldValidating",t=>(this.warningUnhooked(),this.isFieldsValidating([t]))),ae(this,"resetWithFieldInitialValue",(t={})=>{let r=new zh,n=this.getFieldEntities(!0);n.forEach(l=>{let{initialValue:u}=l.props,d=l.getNamePath();if(u!==void 0){let p=r.get(d)||new Set;p.add({entity:l,value:u}),r.set(d,p)}});let a=l=>{l.forEach(u=>{let{initialValue:d}=u.props;if(d!==void 0){let p=u.getNamePath();if(this.getInitialValue(p)!==void 0)Da(!1,`Form already set 'initialValues' with path '${p.join(".")}'. Field can not overwrite it.`);else{let h=r.get(p);if(h&&h.size>1)Da(!1,`Multiple Field with path '${p.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(h){let v=this.getFieldValue(p);!u.isListField()&&(!t.skipExist||v===void 0)&&this.updateStore(mi(this.store,p,[...h][0].value))}}}})},o;t.entities?o=t.entities:t.namePathList?(o=[],t.namePathList.forEach(l=>{let u=r.get(l);u&&o.push(...[...u].map(d=>d.entity))})):o=n,a(o)}),ae(this,"resetFields",t=>{this.warningUnhooked();let r=this.store;if(!t){this.updateStore(td(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(r,null,{type:"reset"}),this.notifyWatch();return}let n=t.map(Fn);n.forEach(a=>{let o=this.getInitialValue(a);this.updateStore(mi(this.store,a,o))}),this.resetWithFieldInitialValue({namePathList:n}),this.notifyObservers(r,n,{type:"reset"}),this.notifyWatch(n)}),ae(this,"setFields",t=>{this.warningUnhooked();let r=this.store,n=[];t.forEach(a=>{let{name:o,...l}=a,u=Fn(o);n.push(u),"value"in l&&this.updateStore(mi(this.store,u,l.value)),this.notifyObservers(r,[u],{type:"setField",data:a})}),this.notifyWatch(n)}),ae(this,"getFields",()=>this.getFieldEntities(!0).map(t=>{let r=t.getNamePath(),n={...t.getMeta(),name:r,value:this.getFieldValue(r)};return Object.defineProperty(n,"originRCField",{value:!0}),n})),ae(this,"initEntityValue",t=>{let{initialValue:r}=t.props;if(r!==void 0){let n=t.getNamePath();Ni(this.store,n)===void 0&&this.updateStore(mi(this.store,n,r))}}),ae(this,"isMergedPreserve",t=>(t!==void 0?t:this.preserve)??!0),ae(this,"registerField",t=>{this.fieldEntities.push(t);let r=t.getNamePath();if(this.notifyWatch([r]),t.props.initialValue!==void 0){let n=this.store;this.resetWithFieldInitialValue({entities:[t],skipExist:!0}),this.notifyObservers(n,[t.getNamePath()],{type:"valueUpdate",source:"internal"})}return(n,a,o=[])=>{if(this.fieldEntities=this.fieldEntities.filter(l=>l!==t),!this.isMergedPreserve(a)&&(!n||o.length>1)){let l=n?void 0:this.getInitialValue(r);if(r.length&&this.getFieldValue(r)!==l&&this.fieldEntities.every(u=>!Yx(u.getNamePath(),r))){let u=this.store;this.updateStore(mi(u,r,l,!0)),this.notifyObservers(u,[r],{type:"remove"}),this.triggerDependenciesUpdate(u,r)}}this.notifyWatch([r])}}),ae(this,"dispatch",t=>{switch(t.type){case"updateValue":{let{namePath:r,value:n}=t;this.updateValue(r,n);break}case"validateField":{let{namePath:r,triggerName:n}=t;this.validateFields([r],{triggerName:n});break}default:}}),ae(this,"notifyObservers",(t,r,n)=>{if(this.subscribable){let a={...n,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:o})=>{o(t,r,a)})}else this.forceRootUpdate()}),ae(this,"triggerDependenciesUpdate",(t,r)=>{let n=this.getDependencyChildrenFields(r);return n.length&&this.validateFields(n,{delayFrame:!0}),this.notifyObservers(t,n,{type:"dependenciesUpdate",relatedFields:[r,...n]}),n}),ae(this,"updateValue",(t,r)=>{let n=Fn(t),a=this.store;this.updateStore(mi(this.store,n,r)),this.notifyObservers(a,[n],{type:"valueUpdate",source:"internal"}),this.notifyWatch([n]);let o=this.triggerDependenciesUpdate(a,n),{onValuesChange:l}=this.callbacks;if(l){let u=wz(this.store,[n]),d=this.getFieldsValue(),p=mi(d,n,Ni(u,n));l(u,p)}this.triggerOnFieldsChange([n,...o])}),ae(this,"setFieldsValue",t=>{this.warningUnhooked();let r=this.store;if(t){let n=td(this.store,t);this.updateStore(n)}this.notifyObservers(r,null,{type:"valueUpdate",source:"external"}),this.notifyWatch()}),ae(this,"setFieldValue",(t,r)=>{this.setFields([{name:t,value:r,errors:[],warnings:[],touched:!0}])}),ae(this,"getDependencyChildrenFields",t=>{let r=new Set,n=[],a=new zh;this.getFieldEntities().forEach(l=>{let{dependencies:u}=l.props;(u||[]).forEach(d=>{let p=Fn(d);a.update(p,(h=new Set)=>(h.add(l),h))})});let o=l=>{(a.get(l)||new Set).forEach(u=>{if(!r.has(u)){r.add(u);let d=u.getNamePath();u.isFieldDirty()&&d.length&&(n.push(d),o(d))}})};return o(t),n}),ae(this,"triggerOnFieldsChange",(t,r)=>{let{onFieldsChange:n}=this.callbacks;if(n){let a=this.getFields();if(r){let l=new zh;r.forEach(({name:u,errors:d})=>{l.set(u,d)}),a.forEach(u=>{u.errors=l.get(u.name)||u.errors})}let o=a.filter(({name:l})=>Lh(t,l));o.length&&n(o,a)}}),ae(this,"validateFields",(t,r)=>{this.warningUnhooked();let n,a;Array.isArray(t)||typeof t=="string"||typeof r=="string"?(n=t,a=r):a=t;let o=!!n,l=o?n.map(Fn):[],u=[...l],d=[],p=String(Date.now()),h=new Set,{recursive:v,dirty:g}=a||{};this.getFieldEntities(!0).forEach(E=>{let F=E.getNamePath();if(o||((!E.isList()||!l.some(S=>Yx(S,F,!0)))&&u.push(F),l.push(F)),!(!E.props.rules||!E.props.rules.length)&&!(g&&!E.isFieldDirty())&&(h.add(F.join(p)),!o||Lh(l,F,v))){let S=E.validateRules({validateMessages:{...Mz,...this.validateMessages},...a});d.push(S.then(()=>({name:F,errors:[],warnings:[]})).catch(D=>{let $=[],C=[];return D.forEach?.(({rule:{warningOnly:B},errors:M})=>{B?C.push(...M):$.push(...M)}),$.length?Promise.reject({name:F,errors:$,warnings:C}):{name:F,errors:$,warnings:C}}))}});let b=Fse(d);this.lastValidatePromise=b,b.catch(E=>E).then(E=>{let F=E.map(({name:S})=>S);this.notifyObservers(this.store,F,{type:"validateFinish"}),this.triggerOnFieldsChange(F,E)});let x=b.then(()=>this.lastValidatePromise===b?Promise.resolve(this.getFieldsValue(u)):Promise.reject([])).catch(E=>{let F=E.filter(D=>D&&D.errors.length),S=F[0]?.errors?.[0];return Promise.reject({message:S,values:this.getFieldsValue(l),errorFields:F,outOfDate:this.lastValidatePromise!==b})});x.catch(E=>E);let y=l.filter(E=>h.has(E.join(p)));return this.triggerOnFieldsChange(y),x}),ae(this,"submit",()=>{this.warningUnhooked(),this.validateFields().then(t=>{let{onFinish:r}=this.callbacks;if(r)try{r(t)}catch(n){console.error(n)}}).catch(t=>{let{onFinishFailed:r}=this.callbacks;r&&r(t)})}),this.forceRootUpdate=e}};function Ase(e){let t=Az.useRef(null),[,r]=Az.useState({});if(!t.current)if(e)t.current=e;else{let n=()=>{r({})},a=new Dse(n);t.current=a.getForm()}return[t.current]}var OF=Ase,Lo=A(_()),Qx=A(_()),NF=Qx.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),Nz=({validateMessages:e,onFormChange:t,onFormFinish:r,children:n})=>{let a=Qx.useContext(NF),o=Qx.useRef({});return Qx.createElement(NF.Provider,{value:{...a,validateMessages:{...a.validateMessages,...e},triggerFormChange:(l,u)=>{t&&t(l,{changedFields:u,forms:o.current}),a.triggerFormChange(l,u)},triggerFormFinish:(l,u)=>{r&&r(l,{values:u,forms:o.current}),a.triggerFormFinish(l,u)},registerForm:(l,u)=>{l&&(o.current={...o.current,[l]:u}),a.registerForm(l,u)},unregisterForm:l=>{let u={...o.current};delete u[l],o.current=u,a.unregisterForm(l)}}},n)},Bse=NF;function PF(){return PF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},PF.apply(this,arguments)}var Ise=(e,t)=>{let{name:r,initialValues:n,fields:a,form:o,preserve:l,children:u,component:d="form",validateMessages:p,validateTrigger:h="onChange",onValuesChange:v,onFieldsChange:g,onFinish:b,onFinishFailed:x,clearOnDestroy:y,...E}=e,F=Lo.useRef(null),S=Lo.useContext(Bse),[D]=OF(o),{useSubscribe:$,setInitialValues:C,setCallbacks:B,setValidateMessages:M,setPreserve:I,destroyForm:j}=D.getInternalHooks(qp);Lo.useImperativeHandle(t,()=>({...D,nativeElement:F.current})),Lo.useEffect(()=>(S.registerForm(r,D),()=>{S.unregisterForm(r)}),[S,D,r]),M({...S.validateMessages,...p}),B({onValuesChange:v,onFieldsChange:(P,...H)=>{S.triggerFormChange(r,P),g&&g(P,...H)},onFinish:P=>{S.triggerFormFinish(r,P),b&&b(P)},onFinishFailed:x}),I(l);let N=Lo.useRef(null);C(n,!N.current),N.current||(N.current=!0),Lo.useEffect(()=>()=>j(y),[]);let R,L=typeof u=="function";if(L){let P=D.getFieldsValue(!0);R=u(P,D)}else R=u;$(!L);let q=Lo.useRef(null);Lo.useEffect(()=>{moe(q.current||[],a||[])||D.setFields(a||[]),q.current=a},[a,D]);let W=Lo.useMemo(()=>({...D,validateTrigger:h}),[D,h]),U=Lo.createElement(vb.Provider,{value:null},Lo.createElement(Wp.Provider,{value:W},R));return d===!1?U:Lo.createElement(d,PF({},E,{ref:F,onSubmit:P=>{P.preventDefault(),P.stopPropagation(),D.submit()},onReset:P=>{P.preventDefault(),D.resetFields(),E.onReset?.(P)}}),U)},Mse=Ise,Tse=voe.forwardRef(Mse),Hh=Tse;Hh.FormProvider=Nz;Hh.Field=RF;Hh.List=jz;Hh.useForm=OF;Hh.useWatch=Bz;var _se=Hh,Cu=A(_()),jse=Cu.createContext({labelAlign:"right",layout:"horizontal",itemRef:()=>{}}),Nse=Cu.createContext(null),Pse=e=>{let t=Vt(e,["prefixCls"]);return Cu.createElement(Nz,{...t})},Rse=Cu.createContext({prefixCls:""}),go=Cu.createContext({}),zF=({children:e,status:t,override:r})=>{let n=Cu.useContext(go),a=Cu.useMemo(()=>{let o={...n};return r&&delete o.isFormItemInput,t&&(delete o.status,delete o.hasFeedback,delete o.feedbackIcon),o},[t,r,n]);return Cu.createElement(go.Provider,{value:a},e)},LF=Cu.createContext(void 0);var Pz=A(_()),Ose=(e,t,r,n)=>{let a=Pz.useContext(st),{variant:o,[e]:l}=a,u=Pz.useContext(LF),d=n?a[n]:void 0,p=l?.variant??d?.variant,h=typeof t<"u"||r===!1||typeof u<"u"||typeof p<"u"||typeof o<"u",v;typeof t<"u"?v=t:r===!1?v="borderless":v=u??p??o??"outlined";let g=mF.includes(v);return[v,g,h]},Su=Ose;function bb(...e){return e.find(t=>t!==void 0)}var Up=(e,t,r)=>Y({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:r}),qh=(e,t)=>t||e;var Rz=A(_()),zse=e=>{let t=Rz.default.useContext(Nh);return Rz.default.useMemo(()=>e?Ja(e)?e??t:pr(e)?e(t):t:t,[e,t])},qr=zse,HF=()=>({height:0,opacity:0}),Oz=e=>({height:e?.scrollHeight??0,opacity:e?1:0}),Lse=e=>({height:e?.offsetHeight??0}),qF=(e,t)=>t?.deadline===!0||ab(t)&&t.propertyName==="height",Hse=(e=Yc)=>({motionName:`${e}-motion-collapse`,onAppearStart:HF,onEnterStart:HF,onAppearActive:Oz,onEnterActive:Oz,onLeaveStart:Lse,onLeaveActive:HF,onAppearEnd:qF,onEnterEnd:qF,onLeaveEnd:qF,motionDeadline:500}),Vp=(e,t,r)=>r!==void 0?r:`${e}-${t}`,yb=Hse,zz=e=>({animationDuration:e,animationFillMode:"both"}),Jx=(e,t,r,n,a=!1)=>{let o=a?"&":"";return{[`
136
+ ${o}${e}-enter,
137
+ ${o}${e}-appear
138
+ `]:{...zz(n),animationPlayState:"paused"},[`${o}${e}-leave`]:{...zz(n),animationPlayState:"paused"},[`
139
+ ${o}${e}-enter${e}-enter-active,
140
+ ${o}${e}-appear${e}-appear-active
141
+ `]:{animationName:t,animationPlayState:"running"},[`${o}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}},qse=new Dt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),Wse=new Dt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),WF=(e,t=!1)=>{let{antCls:r}=e,n=`${r}-fade`,a=t?"&":"";return[Jx(n,qse,Wse,e.motionDurationMid,t),{[`
142
+ ${a}${n}-enter,
143
+ ${a}${n}-appear
144
+ `]:{opacity:0,animationTimingFunction:"linear"},[`${a}${n}-leave`]:{animationTimingFunction:"linear"}}]},Wh=new Dt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Uh=new Dt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Vh=new Dt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Gh=new Dt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),Zx=new Dt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),e2=new Dt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),t2=new Dt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),r2=new Dt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Use={"slide-up":{inKeyframes:Wh,outKeyframes:Uh},"slide-down":{inKeyframes:Vh,outKeyframes:Gh},"slide-left":{inKeyframes:Zx,outKeyframes:e2},"slide-right":{inKeyframes:t2,outKeyframes:r2}},Ho=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:a,outKeyframes:o}=Use[t];return[Jx(n,a,o,e.motionDurationMid),{[`
145
+ ${n}-enter,
146
+ ${n}-appear
147
+ `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},qo=()=>({"@media (prefers-reduced-motion: reduce)":{"&, &::before, &::after":{transition:"none",animation:"none"}}}),Kh=()=>({"@media (prefers-reduced-motion: reduce)":{transition:"none",animation:"none"}}),qz=new Dt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Vse=new Dt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Lz=new Dt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Hz=new Dt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),Gse=new Dt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),Kse=new Dt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),Xse=new Dt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),Qse=new Dt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),Yse=new Dt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),Jse=new Dt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),Zse=new Dt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),ele=new Dt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),tle={zoom:{inKeyframes:qz,outKeyframes:Vse},"zoom-big":{inKeyframes:Lz,outKeyframes:Hz},"zoom-big-fast":{inKeyframes:Lz,outKeyframes:Hz},"zoom-left":{inKeyframes:Xse,outKeyframes:Qse},"zoom-right":{inKeyframes:Yse,outKeyframes:Jse},"zoom-up":{inKeyframes:Gse,outKeyframes:Kse},"zoom-down":{inKeyframes:Zse,outKeyframes:ele}},Fu=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:a,outKeyframes:o}=tle[t];return[Jx(n,a,o,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
148
+ ${n}-enter,
149
+ ${n}-appear
150
+ `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},rle=e=>{let{componentCls:t,antCls:r,motionDurationMid:n,motionEaseInOut:a}=e;return{[t]:{[`${r}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`${["height","opacity"].map(o=>`${o} ${n} ${a}`).join(", ")} !important`}},[`${r}-motion-collapse`]:{overflow:"hidden",transition:`${["height","opacity"].map(o=>`${o} ${n} ${a}`).join(", ")} !important`}}}},wb=rle,nle=new Dt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ale=new Dt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),ile=new Dt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ole=new Dt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),sle=new Dt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),lle=new Dt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),ule=new Dt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),cle=new Dt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),dle={"move-up":{inKeyframes:ule,outKeyframes:cle},"move-down":{inKeyframes:nle,outKeyframes:ale},"move-left":{inKeyframes:ile,outKeyframes:ole},"move-right":{inKeyframes:sle,outKeyframes:lle}},n2=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:a,outKeyframes:o}=dle[t];return[Jx(n,a,o,e.motionDurationMid),{[`
151
+ ${n}-enter,
152
+ ${n}-appear
153
+ `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};var ple=A(_()),Wz=e=>e==="horizontal"||e==="vertical",Wo=(e,t,r)=>(0,ple.useMemo)(()=>{let n=Wz(e),a;return n?a=e:typeof t=="boolean"?a=t?"vertical":"horizontal":a=Wz(r)?r:"horizontal",[a,a==="vertical"]},[r,e,t]),Oi=A(_()),fle=e=>{let{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},mle=ct(["Space","Compact"],fle,()=>({}),{resetStyle:!1}),a2=Oi.createContext(null),ml=(e,t)=>{let r=Oi.useContext(a2),n=Oi.useMemo(()=>{if(!r)return"";let{compactDirection:a,isFirstItem:o,isLastItem:l}=r,u=a==="vertical"?"-vertical-":"-";return Y(`${e}-compact${u}item`,{[`${e}-compact${u}first-item`]:o,[`${e}-compact${u}last-item`]:l,[`${e}-compact${u}item-rtl`]:t==="rtl"})},[e,t,r]);return{compactSize:r?.compactSize,compactDirection:r?.compactDirection,compactItemClassnames:n}},VF=e=>{let{children:t}=e;return Oi.createElement(a2.Provider,{value:null},t)},hle=e=>{let{children:t,...r}=e;return Oi.createElement(a2.Provider,{value:Oi.useMemo(()=>r,[r])},t)},gle=Oi.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n}=Oi.useContext(st),{size:a,direction:o,orientation:l,block:u,prefixCls:d,className:p,rootClassName:h,children:v,vertical:g,...b}=e,[x,y]=Wo(l,g,o),E=qr(I=>a??I),F=r("space-compact",d),[S]=mle(F),D=Y(F,S,{[`${F}-rtl`]:n==="rtl",[`${F}-block`]:u,[`${F}-vertical`]:y},p,h),$=Oi.useContext(a2),C=Oi.useRef(null);Oi.useImperativeHandle(t,()=>({nativeElement:C.current}));let B=Er(v),M=Oi.useMemo(()=>B.map((I,j)=>{let N=I?.key||`${F}-item-${j}`;return Oi.createElement(hle,{key:N,compactSize:E,compactDirection:x,isFirstItem:j===0&&(!$||$?.isFirstItem),isLastItem:j===B.length-1&&(!$||$?.isLastItem)},I)}),[B,$,x,E,F]);return B.length===0?null:Oi.createElement("div",{ref:C,className:D,...b},M)}),xb=gle,DDe=A(_()),UF=e=>Math.round(Number(e||0)),vle=e=>{if(e instanceof Ar)return e;if(e&&typeof e=="object"&&"h"in e&&"b"in e){let{b:t,...r}=e;return{...r,v:t}}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},Gp=class extends Ar{constructor(e){super(vle(e))}toHsbString(){let e=this.toHsb(),t=UF(e.s*100),r=UF(e.b*100),n=UF(e.h),a=e.a,o=`hsb(${n}, ${t}%, ${r}%)`,l=`hsba(${n}, ${t}%, ${r}%, ${a.toFixed(a===0?0:2)})`;return a===1?o:l}toHsb(){let{v:e,...t}=this.toHsv();return{...t,b:e,a:this.a}}},ble=e=>e instanceof Gp?e:new Gp(e),ADe=ble("#1677ff"),BDe=A(_()),IDe=A(_()),MDe=A(_()),TDe=A(_()),_De=A(_()),jDe=A(_()),NDe=A(_()),PDe=A(_()),RDe=A(_()),ODe=A(_()),yle=(e,t)=>e?.replace(/[^0-9a-f]/gi,"").slice(0,t?8:6)||"",wle=(e,t)=>e?yle(e,t):"",Kp=(function(){function e(t){if(wu(this,e),this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=t.colors?.map(n=>({color:new e(n.color),percent:n.percent})),this.cleared=t.cleared;return}let r=Array.isArray(t);r&&t.length?(this.colors=t.map(({color:n,percent:a})=>({color:new e(n),percent:a})),this.metaColor=new Gp(this.colors[0].color.metaColor)):this.metaColor=new Gp(r?"":t),(!t||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return xu(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return wle(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){let{colors:t}=this;return t?`linear-gradient(90deg, ${t.map(r=>`${r.color.toRgbString()} ${r.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(t){return!t||this.isGradient()!==t.isGradient()?!1:this.isGradient()?this.colors.length===t.colors.length&&this.colors.every((r,n)=>{let a=t.colors[n];return r.percent===a.percent&&r.color.equals(a.color)}):this.toHexString()===t.toHexString()}}])})(),GF=e=>e instanceof Kp?e:new Kp(e);var Uz=A(_()),xle=e=>{let{space:t,form:r,children:n}=e;if(!Lt(n))return null;let a=n;return r&&(a=Uz.default.createElement(zF,{override:!0,status:!0},a)),t&&(a=Uz.default.createElement(VF,null,a)),a},id=xle;var Vz=A(_()),Ele={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},kle=Ele;function KF(){return KF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},KF.apply(this,arguments)}var Cle=(e,t)=>Vz.createElement(Ut,KF({},e,{ref:t,icon:kle})),Sle=Vz.forwardRef(Cle),Xp=Sle;function _n(){return _n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_n.apply(null,arguments)}var Xh=A(_()),tL=A(_()),Fle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},$le=Fle;function t7(){return t7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t7.apply(this,arguments)}var Dle=(e,t)=>tL.createElement(Ut,t7({},e,{ref:t,icon:$le})),Ale=tL.forwardRef(Dle),Du=Ale,Gz=A(_()),rL=A(_()),$u=A(_()),Eb=A(_()),Ble=Eb.default.forwardRef((e,t)=>{let{prefixCls:r,forceRender:n,className:a,style:o,children:l,isActive:u,role:d,classNames:p,styles:h}=e,[v,g]=Eb.default.useState(u||n);return Eb.default.useEffect(()=>{(n||u)&&g(!0)},[n,u]),v?Eb.default.createElement("div",{ref:t,className:Y(`${r}-panel`,{[`${r}-panel-active`]:u,[`${r}-panel-inactive`]:!u},a),style:o,role:d},Eb.default.createElement("div",{className:Y(`${r}-body`,p?.body),style:h?.body},l)):null}),Ile=Ble,Mle=$u.default.forwardRef((e,t)=>{let{showArrow:r=!0,headerClass:n,isActive:a,onItemClick:o,forceRender:l,className:u,classNames:d={},styles:p={},prefixCls:h,collapsible:v,accordion:g,panelKey:b,extra:x,header:y,expandIcon:E,openMotion:F,destroyOnHidden:S,children:D,...$}=e,C=v==="disabled",B=x!=null&&typeof x!="boolean",M={onClick:()=>{o?.(b)},onKeyDown:L=>{(L.key==="Enter"||L.keyCode===yn.ENTER||L.which===yn.ENTER)&&o?.(b)},role:g?"tab":"button","aria-expanded":a,"aria-disabled":C,tabIndex:C?-1:0},I=typeof E=="function"?E(e):$u.default.createElement("i",{className:"arrow"}),j=I&&$u.default.createElement("div",_n({className:Y(`${h}-expand-icon`,d?.icon),style:p?.icon},["header","icon"].includes(v)?M:{}),I),N=Y(`${h}-item`,{[`${h}-item-active`]:a,[`${h}-item-disabled`]:C},u),R={className:Y(n,`${h}-header`,{[`${h}-collapsible-${v}`]:!!v},d?.header),style:p?.header,...["header","icon"].includes(v)?{}:M};return $u.default.createElement("div",_n({},$,{ref:t,className:N}),$u.default.createElement("div",R,r&&j,$u.default.createElement("span",_n({className:Y(`${h}-title`,d?.title),style:p?.title},v==="header"?M:{}),y),B&&$u.default.createElement("div",{className:`${h}-extra`},x)),$u.default.createElement(ra,_n({visible:a,leavedClassName:`${h}-panel-hidden`},F,{forceRender:l,removeOnLeave:S}),({className:L,style:q},W)=>$u.default.createElement(Ile,{ref:W,prefixCls:h,className:L,classNames:d,style:q,styles:p,isActive:a,forceRender:l,role:g?"tabpanel":void 0},D)))}),nL=Mle;function aL(e,t,r){if(!e||!t)return e||t;let n=Array.from(new Set([...Object.keys(e),...Object.keys(t)])),a={};return n.forEach(o=>{a[o]=r(e[o],t[o])}),a}function Tle(e,t){return aL(e,t,(r,n)=>eF(r,n))}function _le(e,t){return aL(e,t,(r,n)=>({...r,...n}))}var jle=(e,t)=>{let{prefixCls:r,accordion:n,collapsible:a,destroyOnHidden:o,onItemClick:l,activeKey:u,openMotion:d,expandIcon:p,classNames:h,styles:v}=t;return e.map((g,b)=>{let{children:x,label:y,key:E,collapsible:F,onItemClick:S,destroyOnHidden:D,classNames:$,styles:C,...B}=g,M=String(E??b),I=F??a,j=D??o,N=L=>{I!=="disabled"&&(l(L),S?.(L))},R=!1;return n?R=u[0]===M:R=u.indexOf(M)>-1,rL.default.createElement(nL,_n({},B,{classNames:Tle(h,$),styles:_le(v,C),prefixCls:r,key:M,panelKey:M,isActive:R,accordion:n,openMotion:d,expandIcon:p,header:y,collapsible:I,onItemClick:N,destroyOnHidden:j}),x)})},Nle=(e,t,r)=>{if(!e)return null;let{prefixCls:n,accordion:a,collapsible:o,destroyOnHidden:l,onItemClick:u,activeKey:d,openMotion:p,expandIcon:h,classNames:v,styles:g}=r,b=e.key||String(t),{header:x,headerClass:y,destroyOnHidden:E,collapsible:F,onItemClick:S}=e.props,D=!1;a?D=d[0]===b:D=d.indexOf(b)>-1;let $=F??o,C=M=>{$!=="disabled"&&(u(M),S?.(M))},B={key:b,panelKey:b,header:x,headerClass:y,classNames:v,styles:g,isActive:D,prefixCls:n,destroyOnHidden:E??l,openMotion:p,accordion:a,children:e.props.children,onItemClick:C,expandIcon:h,collapsible:$};return typeof e.type=="string"?e:(Object.keys(B).forEach(M=>{typeof B[M]>"u"&&delete B[M]}),rL.default.cloneElement(e,B))};function Ple(e,t,r){return Array.isArray(e)?jle(e,r):Er(t).map((n,a)=>Nle(n,a,r))}var Rle=Ple;function Kz(e){let t=e;if(!Array.isArray(t)){let r=typeof t;t=r==="number"||r==="string"?[t]:[]}return t.map(r=>String(r))}var Ole=Gz.default.forwardRef((e,t)=>{let{prefixCls:r="rc-collapse",destroyOnHidden:n=!1,style:a,accordion:o,className:l,children:u,collapsible:d,openMotion:p,expandIcon:h,activeKey:v,defaultActiveKey:g,onChange:b,items:x,classNames:y,styles:E}=e,F=Y(r,l),[S,D]=qt(g,v),$=Kz(S),C=xt(I=>{let j=Kz(I);D(j),b?.(j)}),B=I=>{C(o?$[0]===I?[]:[I]:$.includes(I)?$.filter(j=>j!==I):[...$,I])};Da(!u,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");let M=Rle(x,u,{prefixCls:r,accordion:o,openMotion:p,expandIcon:h,collapsible:d,destroyOnHidden:n,onItemClick:B,activeKey:$,classNames:y,styles:E});return Gz.default.createElement("div",_n({ref:t,className:F,style:a,role:o?"tablist":void 0},Ya(e,{aria:!0,data:!0})),M)}),iL=Object.assign(Ole,{Panel:nL}),oL=iL,{Panel:oAe}=iL,XF=A(_()),zle=XF.forwardRef((e,t)=>{let{getPrefixCls:r}=XF.useContext(st),{prefixCls:n,className:a,showArrow:o=!0}=e,l=r("collapse",n),u=Y({[`${l}-no-arrow`]:!o},a);return XF.createElement(oL.Panel,{ref:t,...e,prefixCls:l,className:u})}),Lle=zle,Hle=e=>{let{componentCls:t,contentBg:r,padding:n,headerBg:a,headerPadding:o,headerPaddingSM:l,headerPaddingLG:u,collapsePanelBorderRadius:d,lineWidth:p,lineType:h,colorBorder:v,colorText:g,colorTextHeading:b,colorTextDisabled:x,fontSizeLG:y,lineHeight:E,lineHeightLG:F,marginSM:S,paddingSM:D,paddingLG:$,paddingXS:C,motionDurationSlow:B,fontSizeIcon:M,contentPadding:I,contentPaddingSM:j,contentPaddingLG:N,fontHeight:R,fontHeightLG:L}=e,q=`${ue(p)} ${h} ${v}`;return{[t]:{...Mt(e),backgroundColor:a,border:q,borderRadius:d,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:q,"&:first-child":{[`
154
+ &,
155
+ & > ${t}-header`]:{borderRadius:`${ue(d)} ${ue(d)} 0 0`}},"&:last-child":{[`
156
+ &,
157
+ & > ${t}-header`]:{borderRadius:`0 0 ${ue(d)} ${ue(d)}`}},[`> ${t}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:o,color:b,lineHeight:E,cursor:"pointer",transition:`all ${B}, visibility 0s`,...Tn(e),[`> ${t}-title`]:{flex:"auto"},[`${t}-expand-icon`]:{height:R,display:"flex",alignItems:"center",marginInlineEnd:S},[`${t}-arrow`]:{...zp(),fontSize:M,transition:`transform ${B}`,svg:{transition:`transform ${B}`}},[`${t}-title`]:{marginInlineEnd:"auto","> svg":{display:"inline-block",verticalAlign:"middle",marginBlockEnd:"0.2em"}}},[`${t}-collapsible-header`]:{cursor:"default",[`${t}-title`]:{flex:"none",cursor:"pointer"},[`${t}-expand-icon`]:{cursor:"pointer"}},[`${t}-collapsible-icon`]:{cursor:"unset",[`${t}-expand-icon`]:{cursor:"pointer"}}},[`${t}-panel`]:{color:g,backgroundColor:r,borderTop:q,[`& > ${t}-body`]:{padding:I},"&-hidden":{display:"none"}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:l,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(D).sub(C).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:j}}},"&-large":{[`> ${t}-item`]:{fontSize:y,lineHeight:F,[`> ${t}-header`]:{padding:u,[`> ${t}-expand-icon`]:{height:L,marginInlineStart:e.calc($).sub(n).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:N}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-panel`]:{borderRadius:`0 0 ${ue(d)} ${ue(d)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"&, & > .arrow":{color:x,cursor:"not-allowed"}},[`&${t}-icon-placement-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,marginInlineEnd:0,marginInlineStart:S}}}}}}},qle=e=>{let{componentCls:t}=e,r=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[r]:{transform:"rotate(180deg)"}}}},Wle=e=>{let{componentCls:t,headerBg:r,borderlessContentPadding:n,borderlessContentBg:a,colorBorder:o}=e;return{[`${t}-borderless`]:{backgroundColor:r,border:0,[`> ${t}-item`]:{borderBottom:`${ue(e.lineWidth)} ${e.lineType} ${o}`},[`
158
+ > ${t}-item:last-child,
159
+ > ${t}-item:last-child ${t}-header
160
+ `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-panel`]:{backgroundColor:a,borderTop:0},[`> ${t}-item > ${t}-panel > ${t}-body`]:{padding:n}}}},Ule=e=>{let{componentCls:t,paddingSM:r}=e;return{[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-panel`]:{backgroundColor:"transparent",border:0,[`> ${t}-body`]:{paddingBlock:r}}}}}},Vle=e=>({headerPadding:`${ue(e.paddingSM)} ${ue(e.padding)}`,headerPaddingSM:`${ue(e.paddingXS)} ${ue(e.paddingSM)} ${ue(e.paddingXS)} ${ue(e.paddingXS)}`,headerPaddingLG:`${ue(e.padding)} ${ue(e.paddingLG)} ${ue(e.padding)} ${ue(e.padding)}`,headerBg:e.colorFillAlter,contentPadding:`${ue(e.padding)} ${ue(16)}`,contentPaddingSM:e.paddingSM,contentPaddingLG:e.paddingLG,contentBg:e.colorBgContainer,borderlessContentPadding:`${ue(e.paddingXXS)} ${ue(16)} ${ue(e.padding)}`,borderlessContentBg:"transparent"}),Gle=ct("Collapse",e=>{let t=vt(e,{collapsePanelBorderRadius:e.borderRadiusLG});return[Hle(t),Wle(t),Ule(t),qle(t),wb(t)]},Vle),Kle=Xh.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n,expandIcon:a,className:o,style:l,classNames:u,styles:d}=wt("collapse"),{prefixCls:p,className:h,rootClassName:v,style:g,bordered:b=!0,ghost:x,size:y,expandIconPlacement:E,expandIconPosition:F,children:S,destroyInactivePanel:D,destroyOnHidden:$,expandIcon:C,classNames:B,styles:M}=e,I=qr(K=>y??K??"middle"),j=r("collapse",p),N=r(),[R,L]=Gle(j),q=E??F??"start",W={...e,size:I,bordered:b,expandIconPlacement:q},U=Ue(l),P=Ue(g),[H,V]=Et([u,B],[d,U,M,P],{props:W}),Q=C??a,X=Xh.useCallback((K={})=>{let J=K.collapsible==="header"||K.collapsible==="icon",te=pr(Q)?Q(K):Xh.createElement(Du,{rotate:K.isActive?n==="rtl"?-90:90:void 0,...J?{"aria-label":K.isActive?"expanded":"collapsed"}:{"aria-hidden":!0}});return Fr(te,ee=>({className:Y(ee.className,`${j}-arrow`)}))},[Q,j,n]),Z=Y(`${j}-icon-placement-${q}`,{[`${j}-borderless`]:!b,[`${j}-rtl`]:n==="rtl",[`${j}-ghost`]:!!x,[`${j}-large`]:I==="large",[`${j}-small`]:I==="small"},o,h,v,R,L,H.root),O=Xh.useMemo(()=>({...yb(N),motionAppear:!1,leavedClassName:`${j}-panel-hidden`}),[N,j]),z=Xh.useMemo(()=>S?Er(S).map(K=>K):null,[S]);return Xh.createElement(oL,{ref:t,openMotion:O,...Vt(e,["rootClassName"]),expandIcon:X,prefixCls:j,className:Z,style:V.root,classNames:H,styles:V,destroyOnHidden:$??D},z)}),Xle=Object.assign(Kle,{Panel:Lle}),n7=Xle,i2=A(_()),Qle=e=>{let{componentCls:t,colorPrimary:r,motionDurationSlow:n,motionEaseInOut:a,motionEaseOutCirc:o,antCls:l}=e,[,u]=wn(l,"wave");return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:u("color",r),boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:["box-shadow 0.4s","opacity 2s"].map(d=>`${d} ${o}`).join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:["box-shadow","opacity"].map(d=>`${d} ${n} ${a}`).join(",")}}}}},Yle=wF("Wave",Qle),QF=A(_()),Cb=`${Yc}-wave-target`,vo=A(_()),Xz=e=>e?Ja(e)&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/i.test(e)&&!/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i.test(e)&&e!=="transparent"&&e!=="canvastext":!1;function Jle(e,t=null){let r=getComputedStyle(e),{borderTopColor:n,borderColor:a,backgroundColor:o}=r;return t&&Xz(r[t])?r[t]:[n,a,o].find(Xz)??null}function YF(e){return Number.isNaN(e)?0:e}var Zle=e=>{let{className:t,target:r,component:n,colorSource:a}=e,o=vo.useRef(null),{getPrefixCls:l}=vo.useContext(st),u=l(),[d]=wn(u,"wave"),[p,h]=vo.useState(null),[v,g]=vo.useState([]),[b,x]=vo.useState(0),[y,E]=vo.useState(0),[F,S]=vo.useState(0),[D,$]=vo.useState(0),[C,B]=vo.useState(!1),M={left:b,top:y,width:F,height:D,borderRadius:v.map(N=>`${N}px`).join(" ")};p&&(M[d("color")]=p);function I(){let N=getComputedStyle(r);h(Jle(r,a));let R=N.position==="static",{borderLeftWidth:L,borderTopWidth:q}=N;x(R?r.offsetLeft:YF(-Number.parseFloat(L))),E(R?r.offsetTop:YF(-Number.parseFloat(q))),S(r.offsetWidth),$(r.offsetHeight);let{borderTopLeftRadius:W,borderTopRightRadius:U,borderBottomLeftRadius:P,borderBottomRightRadius:H}=N;g([W,U,H,P].map(V=>YF(Number.parseFloat(V))))}if(vo.useEffect(()=>{if(r){let N=br(()=>{I(),B(!0)}),R;return typeof ResizeObserver<"u"&&(R=new ResizeObserver(I),R.observe(r)),()=>{br.cancel(N),R?.disconnect()}}},[r]),!C)return null;let j=(n==="Checkbox"||n==="Radio")&&r?.classList.contains(Cb);return vo.createElement(ra,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(N,R)=>{if(R.deadline||ab(R)&&R.propertyName==="opacity"){let L=o.current?.parentElement;oF(L).then(()=>{L?.remove()})}return!1}},({className:N},R)=>vo.createElement("div",{ref:pn(o,R),className:Y(t,N,{"wave-quick":j}),style:M}))},eue=(e,t)=>{let{component:r}=t;if(r==="Checkbox"&&!e.querySelector("input")?.checked)return;let n=document.createElement("div");n.style.position="absolute",n.style.left="0px",n.style.top="0px",e?.insertBefore(n,e?.firstChild),iF(vo.createElement(Zle,{...t,target:e}),n)},tue=eue,rue=(e,t,r,n)=>{let{wave:a}=QF.useContext(st),[,o,l]=Aa(),u=xt(p=>{let h=e.current;if(a?.disabled||!h)return;let v=h.querySelector(`.${Cb}`)||h,{showEffect:g}=a||{};(g||tue)(v,{className:t,token:o,component:r,event:p,hashId:l,colorSource:n})}),d=QF.useRef(null);return QF.useEffect(()=>()=>{br.cancel(d.current)},[]),p=>{br.cancel(d.current),d.current=br(()=>{u(p)})}},nue=rue,Qz={click:"click",mousedown:"mousedown",mouseup:"mouseup",pointerdown:"pointerdown",pointerup:"pointerup"},aue=e=>{let{children:t,disabled:r,component:n,colorSource:a}=e,{getPrefixCls:o,wave:l}=(0,i2.useContext)(st),u=(0,i2.useRef)(null),d=o("wave"),p=Yle(d),h=nue(u,Y(d,p),n,a);if(i2.default.useEffect(()=>{let g=u.current;if(!g||g.nodeType!==window.Node.ELEMENT_NODE||r)return;let b=E=>{!rb(E.target)||!g.getAttribute||g.getAttribute("disabled")||g.disabled||g.className.includes("disabled")&&!g.className.includes("disabled:")||g.getAttribute("aria-disabled")==="true"||g.className.includes("-leave")||h(E)},x=l?.triggerType,y=x&&x in Qz?Qz[x]:"click";return g.addEventListener(y,b,!0),()=>{g.removeEventListener(y,b,!0)}},[r,l?.triggerType]),!i2.default.isValidElement(t))return t??null;let v=yu(t)?pn(Pi(t),u):u;return Fr(t,{ref:v})},od=aue,o2=A(_()),Yz=/^[\u4E00-\u9FA5]{2}$/,r7=Yz.test.bind(Yz);function iue(e){return e==="danger"?{danger:!0}:{type:e}}function JF(e){return e==="text"||e==="link"}function oue(e,t,r,n){if(!Lt(e))return;let a=t?" ":"";return!Ja(e)&&!Gn(e)&&Ja(e.type)&&r7(e.props.children)?Fr(e,o=>{let l=Y(o.className,n)||void 0,u={...r,...o.style};return{...o,children:o.children.split("").join(a),className:l,style:u}}):Ja(e)?o2.default.createElement("span",{className:n,style:r},r7(e)?e.split("").join(a):e):cb(e)?o2.default.createElement("span",{className:n,style:r},e):Fr(e,o=>({...o,className:Y(o.className,n)||void 0,style:{...o.style,...r}}))}function sue(e,t,r,n){let a=!1,o=[];return o2.default.Children.forEach(e,l=>{let u=Ja(l)||Gn(l);if(a&&u){let d=o.length-1,p=o[d];o[d]=`${p}${l}`}else o.push(l);a=u}),o2.default.Children.map(o,l=>oue(l,t,r,n))}var sAe=["default","primary","danger"].concat(en(hi)),aa=A(_()),kb=A(_()),sL=kb.createContext(void 0),lue=e=>{let{getPrefixCls:t,direction:r}=kb.useContext(st),{prefixCls:n,size:a,className:o,...l}=e,u=t("btn-group",n),[,,d]=Aa(),p=kb.useMemo(()=>{switch(a){case"large":return"lg";case"small":return"sm";default:return""}},[a]),h=Y(u,{[`${u}-${p}`]:p,[`${u}-rtl`]:r==="rtl"},o,d);return kb.createElement(sL.Provider,{value:a},kb.createElement("div",{...l,className:h}))},uue=lue,Qh=A(_()),Jz=A(_()),cue=(0,Jz.forwardRef)((e,t)=>{let{className:r,style:n,children:a,prefixCls:o}=e,l=Y(`${o}-icon`,r);return Jz.default.createElement("span",{ref:t,className:l,style:n},a)}),lL=cue,Zz=(0,Qh.forwardRef)((e,t)=>{let{prefixCls:r,className:n,style:a,iconClassName:o}=e,l=Y(`${r}-loading-icon`,n);return Qh.default.createElement(lL,{prefixCls:r,className:l,style:a,ref:t},Qh.default.createElement(Xp,{className:o}))}),ZF=()=>({width:0,opacity:0,transform:"scale(0)"}),e7=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),due=e=>{let{prefixCls:t,loading:r,existIcon:n,className:a,style:o,mount:l}=e,u=!!r;return n?Qh.default.createElement(Zz,{prefixCls:t,className:a,style:o}):Qh.default.createElement(ra,{visible:u,motionName:`${t}-loading-icon-motion`,motionAppear:!l,motionEnter:!l,motionLeave:!l,removeOnLeave:!0,onAppearStart:ZF,onAppearActive:e7,onEnterStart:ZF,onEnterActive:e7,onLeaveStart:e7,onLeaveActive:ZF},({className:d,style:p},h)=>{let v={...o,...p};return Qh.default.createElement(Zz,{prefixCls:t,className:Y(a,d),style:v,ref:h})})},pue=due,eL=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),fue=e=>{let{componentCls:t,fontSize:r,lineWidth:n,groupBorderColor:a,colorErrorHover:o}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(n).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:r}},eL(`${t}-primary`,a),eL(`${t}-danger`,o)]}},mue=fue,lAe=A(_()),s2=(e,t)=>{let{r,g:n,b:a,a:o}=e.toRgb(),l=new Gp(e.toRgbString()).onBackground(t).toHsv();return o<=.5?l.v>.5:r*.299+n*.587+a*.114>192},uL=e=>{let{paddingInline:t,onlyIconSize:r,borderColorDisabled:n}=e;return vt(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:r,colorBorderDisabled:n})},cL=e=>{let t=e.contentFontSize??e.fontSize,r=e.contentFontSizeSM??e.fontSize,n=e.contentFontSizeLG??e.fontSizeLG,a=e.contentLineHeight??Ih(t),o=e.contentLineHeightSM??Ih(r),l=e.contentLineHeightLG??Ih(n),u=s2(new Kp(e.colorBgSolid),"#fff")?"#000":"#fff",d=hi.reduce((v,g)=>({...v,[`${g}ShadowColor`]:`0 ${ue(e.controlOutlineWidth)} 0 ${_p(e[`${g}1`],e.colorBgContainer)}`}),{}),p=e.colorBgContainerDisabled,h=e.colorBgContainerDisabled;return{...d,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:u,contentFontSize:t,contentFontSizeSM:r,contentFontSizeLG:n,contentLineHeight:a,contentLineHeightSM:o,contentLineHeightLG:l,paddingBlock:Math.max((e.controlHeight-t*a)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-r*o)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-n*l)/2-e.lineWidth,0),defaultBgDisabled:p,dashedBgDisabled:h}},hue=e=>{let{componentCls:t,antCls:r,lineWidth:n,lineType:a}=e,[o,l]=wn(r,"btn");return{[t]:[{[o("border-width")]:n,[o("border-color")]:"#000",[o("border-color-hover")]:l("border-color"),[o("border-color-active")]:l("border-color"),[o("border-color-disabled")]:l("border-color"),[o("border-style")]:a,[o("text-color")]:"#000",[o("text-color-hover")]:l("text-color"),[o("text-color-active")]:l("text-color"),[o("text-color-disabled")]:l("text-color"),[o("bg-color")]:"#ddd",[o("bg-color-hover")]:l("bg-color"),[o("bg-color-active")]:l("bg-color"),[o("bg-color-disabled")]:e.colorBgContainerDisabled,[o("bg-color-container")]:e.colorBgContainer,[o("shadow")]:"none"},{border:[l("border-width"),l("border-style"),l("border-color")].join(" "),color:l("text-color"),backgroundColor:l("bg-color"),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[l("border-width"),l("border-style"),l("border-color-hover")].join(" "),color:l("text-color-hover"),backgroundColor:l("bg-color-hover")},"&:active":{border:[l("border-width"),l("border-style"),l("border-color-active")].join(" "),color:l("text-color-active"),backgroundColor:l("bg-color-active")}}},{[`&${t}-variant-solid`]:{[o("solid-bg-color")]:l("color-base"),[o("solid-bg-color-hover")]:l("color-hover"),[o("solid-bg-color-active")]:l("color-active"),[o("border-color")]:"transparent",[o("text-color")]:e.colorTextLightSolid,[o("bg-color")]:l("solid-bg-color"),[o("bg-color-hover")]:l("solid-bg-color-hover"),[o("bg-color-active")]:l("solid-bg-color-active"),boxShadow:l("shadow")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("border-color")]:l("color-base"),[o("border-color-hover")]:l("color-hover"),[o("border-color-active")]:l("color-active"),[o("bg-color")]:l("bg-color-container"),[o("text-color")]:l("color-base"),[o("text-color-hover")]:l("color-hover"),[o("text-color-active")]:l("color-active"),boxShadow:l("shadow")},[`&${t}-variant-dashed`]:{[o("border-style")]:"dashed",[o("bg-color-disabled")]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[o("border-color")]:"transparent",[o("text-color")]:l("color-base"),[o("bg-color")]:l("color-light"),[o("bg-color-hover")]:l("color-light-hover"),[o("bg-color-active")]:l("color-light-active")},[`&${t}-variant-text, &${t}-variant-link`]:{[o("border-color")]:"transparent",[o("text-color")]:l("color-base"),[o("text-color-hover")]:l("color-hover"),[o("text-color-active")]:l("color-active"),[o("bg-color")]:"transparent",[o("bg-color-hover")]:"transparent",[o("bg-color-active")]:"transparent",[`&:disabled, &${e.componentCls}-disabled`]:{background:"transparent",borderColor:"transparent"}},[`&${t}-variant-text`]:{[o("bg-color-hover")]:l("color-light"),[o("bg-color-active")]:l("color-light-active")}},{[`&${t}-variant-link`]:{[o("color-base")]:e.colorLink,[o("color-hover")]:e.colorLinkHover,[o("color-active")]:e.colorLinkActive,[o("bg-color-hover")]:e.linkHoverBg},[`&${t}-color-primary`]:{[o("color-base")]:e.colorPrimary,[o("color-hover")]:e.colorPrimaryHover,[o("color-active")]:e.colorPrimaryActive,[o("color-light")]:e.colorPrimaryBg,[o("color-light-hover")]:e.colorPrimaryBgHover,[o("color-light-active")]:e.colorPrimaryBorder,[o("shadow")]:e.primaryShadow,[`&${t}-variant-solid`]:{[o("text-color")]:e.primaryColor,[o("text-color-hover")]:l("text-color"),[o("text-color-active")]:l("text-color")}},[`&${t}-color-dangerous`]:{[o("color-base")]:e.colorError,[o("color-hover")]:e.colorErrorHover,[o("color-active")]:e.colorErrorActive,[o("color-light")]:e.colorErrorBg,[o("color-light-hover")]:e.colorErrorBgFilledHover,[o("color-light-active")]:e.colorErrorBgActive,[o("shadow")]:e.dangerShadow,[`&${t}-variant-solid`]:{[o("text-color")]:e.dangerColor,[o("text-color-hover")]:l("text-color"),[o("text-color-active")]:l("text-color")}},[`&${t}-color-default`]:{[o("solid-bg-color")]:e.colorBgSolid,[o("solid-bg-color-hover")]:e.colorBgSolidHover,[o("solid-bg-color-active")]:e.colorBgSolidActive,[o("color-base")]:e.defaultBorderColor,[o("color-hover")]:e.defaultHoverBorderColor,[o("color-active")]:e.defaultActiveBorderColor,[o("color-light")]:e.colorFillTertiary,[o("color-light-hover")]:e.colorFillSecondary,[o("color-light-active")]:e.colorFill,[o("text-color")]:e.defaultColor,[o("text-color-hover")]:e.defaultHoverColor,[o("text-color-active")]:e.defaultActiveColor,[o("shadow")]:e.defaultShadow,[`&${t}-variant-outlined`]:{[o("bg-color-disabled")]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[o("text-color")]:e.solidTextColor,[o("text-color-hover")]:l("text-color"),[o("text-color-active")]:l("text-color")},[`&${t}-variant-filled, &${t}-variant-text`]:{[o("text-color-hover")]:l("text-color"),[o("text-color-active")]:l("text-color")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("text-color")]:e.defaultColor,[o("text-color-hover")]:e.defaultHoverColor,[o("text-color-active")]:e.defaultActiveColor,[o("bg-color-container")]:e.defaultBg,[o("bg-color-hover")]:e.defaultHoverBg,[o("bg-color-active")]:e.defaultActiveBg},[`&${t}-variant-text`]:{[o("text-color")]:e.textTextColor,[o("text-color-hover")]:e.textTextHoverColor,[o("text-color-active")]:e.textTextActiveColor,[o("bg-color-hover")]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("text-color")]:e.defaultGhostColor,[o("border-color")]:e.defaultGhostBorderColor}}}},hi.map(u=>{let d=e[`${u}6`],p=e[`${u}1`],h=e[`${u}Hover`],v=e[`${u}2`],g=e[`${u}3`],b=e[`${u}Active`],x=e[`${u}ShadowColor`];return{[`&${t}-color-${u}`]:{[o("color-base")]:d,[o("color-hover")]:h,[o("color-active")]:b,[o("color-light")]:p,[o("color-light-hover")]:v,[o("color-light-active")]:g,[o("shadow")]:x}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:l("bg-color-disabled"),color:e.colorTextDisabled,boxShadow:"none"}},{[`&${t}-background-ghost`]:{[o("bg-color")]:e.ghostBg,[o("bg-color-hover")]:e.ghostBg,[o("bg-color-active")]:e.ghostBg,[o("shadow")]:"none",[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("bg-color-hover")]:e.ghostBg,[o("bg-color-active")]:e.ghostBg}}}]}},gue=hue,vue=e=>{let{componentCls:t,iconCls:r,fontWeight:n,opacityLoading:a,motionDurationSlow:o,motionEaseInOut:l,iconGap:u,calc:d}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:u,alignItems:"center",justifyContent:"center",fontWeight:n,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",...qo(),"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:zp(),[`${t}-icon`]:{display:"inline-flex",alignItems:"center",[r]:{verticalAlign:"middle","&:before":{content:'"\\a0"',display:"inline-block",width:0}}},"> a":{color:"currentColor"},"&:not(:disabled)":Tn(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${r})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:a,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(p=>`${p} ${o} ${l}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineEnd:d(u).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:d(u).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineStart:d(u).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:d(u).mul(-1).equal()}}}}}},bue=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),a7=(e,t="")=>{let{componentCls:r,controlHeight:n,fontSize:a,borderRadius:o,buttonPaddingHorizontal:l,iconCls:u,buttonPaddingVertical:d,buttonIconOnlyFontSize:p}=e;return[{[t]:{fontSize:a,height:n,padding:`${ue(d)} ${ue(l)}`,borderRadius:o,[`&${r}-icon-only`]:{width:n,[u]:{fontSize:p}}}},{[`${r}${r}-circle${t}`]:bue(e)},{[`${r}${r}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${r}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},yue=e=>{let t=vt(e,{fontSize:e.contentFontSize});return a7(t,e.componentCls)},wue=e=>{let t=vt(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return a7(t,`${e.componentCls}-sm`)},xue=e=>{let t=vt(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return a7(t,`${e.componentCls}-lg`)},Eue=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},kue=ct("Button",e=>{let t=uL(e);return[vue(t),yue(t),wue(t),xue(t),Eue(t),gue(t),mue(t)]},cL,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function Cue(e,t,r,n){let{focusElCls:a,focus:o,borderElCls:l}=r,u=l?"> *":"",d=u?` ${u}`:"",p=g=>g.filter(Boolean).map(b=>`&:${b}${d}`).join(","),h=p(["hover",a?`hover${a}`:null]),v=p([o?"focus":null,"active"]);return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{[v]:{zIndex:3},[h]:{zIndex:4},...a?{[`&${a}`]:{zIndex:3}}:{},[`&[disabled] ${u}`]:{zIndex:0}}}}function Sue(e,t,r){let{borderElCls:n}=r,a=n?`> ${n}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${a}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${a}, &${e}-sm ${a}, &${e}-lg ${a}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${a}, &${e}-sm ${a}, &${e}-lg ${a}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Yh(e,t={focus:!0}){let{componentCls:r}=e,{componentCls:n}=t,a=n||r,o=`${a}-compact`;return{[o]:{...Cue(e,o,t,a),...Sue(a,o,t)}}}function Fue(e,t,r){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{"&:focus,&:active":{zIndex:3},"&:hover":{zIndex:4},"&[disabled]":{zIndex:0}}}}function $ue(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function Due(e){let t=`${e.componentCls}-compact-vertical`;return{[t]:{...Fue(e,t,e.componentCls),...$ue(e.componentCls,t)}}}var Aue=e=>{let{antCls:t,componentCls:r,lineWidth:n,calc:a,colorBgContainer:o}=e,l=`${r}-variant-solid:not([disabled])`,u=a(n).mul(-1).equal(),[d,p]=wn(t,"btn"),h=v=>({[`${r}-compact${v?"-vertical":""}-item`]:{[d("compact-connect-border-color")]:p("bg-color-hover"),[`&${l}`]:{transition:"none",[`& + ${l}:before`]:[{position:"absolute",backgroundColor:p("compact-connect-border-color"),content:'""'},v?{top:u,insetInline:u,height:n}:{insetBlock:u,insetInlineStart:u,width:n}],"&:hover:before":{display:"none"}}}});return[h(),h(!0),{[`${l}${r}-color-default`]:{[d("compact-connect-border-color")]:`color-mix(in srgb, ${p("bg-color-hover")} 75%, ${o})`}}]},Bue=_h(["Button","compact"],e=>{let t=uL(e);return[Yh(t),Due(t),Aue(t)]},cL);function Iue(e){if(Ct(e)){let t=e?.delay;return t=Gn(t)?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}var Mue={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},Tue=aa.default.forwardRef((e,t)=>{let{_skipSemantic:r,loading:n=!1,prefixCls:a,color:o,variant:l,type:u,danger:d=!1,shape:p,size:h,disabled:v,className:g,rootClassName:b,children:x,icon:y,iconPosition:E,iconPlacement:F,ghost:S=!1,block:D=!1,htmlType:$="button",classNames:C,styles:B,style:M,autoInsertSpace:I,autoFocus:j,...N}=e,R=Er(x),L=u||"default",{getPrefixCls:q,direction:W,autoInsertSpace:U,className:P,style:H,classNames:V,styles:Q,loadingIcon:X,shape:Z,color:O,variant:z}=wt("button"),K=p||Z||"default",[J,te]=(0,aa.useMemo)(()=>{if(o&&l)return[o,l];if(u||d){let Wt=Mue[L]||[];return d?["danger",Wt[1]]:Wt}return l==="solid"?["primary",l]:O&&z?[O,z]:z==="solid"?["primary",z]:["default","outlined"]},[o,l,u,d,O,z,L]),[ee,ie]=(0,aa.useMemo)(()=>S&&te==="solid"?[J,"outlined"]:[J,te],[J,te,S]),me=ee==="danger",le=me?"dangerous":ee,he=I??U??!0,se=q("btn",a),[ke,De]=kue(se),we=(0,aa.useContext)(Ia),de=v??we,be=(0,aa.useContext)(sL),ye=(0,aa.useMemo)(()=>Iue(n),[n]),[Re,Fe]=Fh(ye.loading),[$e,Ie]=(0,aa.useState)(!1),He=(0,aa.useRef)(null),Oe=Qa(t,He),Me=R.length===1&&!y&&!JF(ie),Te=(0,aa.useRef)(!0);aa.default.useEffect(()=>(Te.current=!1,()=>{Te.current=!0}),[]),sr(()=>{ye.delay>0?Fe(!0,{ms:ye.delay}):Fe(ye.loading,!0)},[ye.delay,ye.loading]),(0,aa.useEffect)(()=>{if(!He.current||!he)return;let Wt=He.current.textContent||"";Me&&r7(Wt)?$e||Ie(!0):$e&&Ie(!1)}),(0,aa.useEffect)(()=>{j&&He.current?.focus()},[]);let Xe=aa.default.useCallback(Wt=>{if(Re||de){Wt.preventDefault();return}e.onClick?.(("href"in e,Wt))},[e.onClick,Re,de]),{compactSize:ot,compactItemClassnames:Ye}=ml(se,W),Ve=qr(Wt=>h??ot??be??Wt),Ae=Re?"loading":y,Ne=F??E??"start",ht=Vt(N,["navigate"]),lt={...e,type:L,color:ee,variant:ie,danger:me,shape:K,size:Ve,disabled:de,loading:Re,iconPlacement:Ne},Ke=Ue(H),je=Ue(M),[nt,Nt]=Et([r?void 0:V,C],[r?void 0:Q,Ke,B,je],{props:lt}),Pt=Y(se,ke,De,{[`${se}-${K}`]:K!=="default"&&K!=="square"&&K,[`${se}-${L}`]:L,[`${se}-dangerous`]:d,[`${se}-color-${le}`]:le,[`${se}-variant-${ie}`]:ie,[`${se}-lg`]:Ve==="large",[`${se}-sm`]:Ve==="small",[`${se}-icon-only`]:!x&&x!==0&&!!Ae,[`${se}-background-ghost`]:S&&!JF(ie),[`${se}-loading`]:Re,[`${se}-two-chinese-chars`]:$e&&he&&!Re,[`${se}-block`]:D,[`${se}-rtl`]:W==="rtl",[`${se}-icon-end`]:Ne==="end"},Ye,g,b,P,nt.root),Jr={className:nt.icon,style:Nt.icon},Xt=Wt=>aa.default.createElement(lL,{prefixCls:se,...Jr},Wt),Tr=aa.default.createElement(pue,{existIcon:!!y,prefixCls:se,loading:Re,mount:Te.current,...Jr}),tr=Ct(n)&&n.icon||X,Tt;y&&!Re?Tt=Xt(y):n&&tr?Tt=Xt(tr):Tt=Tr;let cr=Lt(x)?sue(x,Me&&he,Nt.content,nt.content):null;if(ht.href!==void 0)return aa.default.createElement("a",{...ht,className:Y(Pt,{[`${se}-disabled`]:de}),href:de?void 0:ht.href,style:Nt.root,onClick:Xe,ref:Oe,tabIndex:de?-1:0,"aria-disabled":de},Tt,cr);let $r=aa.default.createElement("button",{...N,type:$,className:Pt,style:Nt.root,onClick:Xe,disabled:de,ref:Oe},Tt,cr,Ye&&aa.default.createElement(Bue,{prefixCls:se}));return JF(ie)||($r=aa.default.createElement(od,{component:"Button",disabled:Re},$r)),$r}),i7=Tue;i7.Group=uue;i7.__ANT_BUTTON=!0;var Sb=i7;var dL=A(_()),_ue={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},jue=_ue;function o7(){return o7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o7.apply(this,arguments)}var Nue=(e,t)=>dL.createElement(Ut,o7({},e,{ref:t,icon:jue})),Pue=dL.forwardRef(Nue),Fb=Pue;var hl=A(_()),zi=A(_());function Rue(e){return!!(e.addonBefore||e.addonAfter)}function Oue(e){return!!(e.prefix||e.suffix||e.allowClear)}function pL(e,t,r){let n=t.cloneNode(!0),a=Object.create(e,{target:{value:n},currentTarget:{value:n}});return n.value=r,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(n.selectionStart=t.selectionStart,n.selectionEnd=t.selectionEnd),n.setSelectionRange=(...o)=>{t.setSelectionRange(...o)},a}function l2(e,t,r,n){if(!r)return;let a=t;if(t.type==="click"){a=pL(t,e,""),r(a);return}if(e.type!=="file"&&n!==void 0){a=pL(t,e,n),r(a);return}r(a)}function d7(){return d7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d7.apply(this,arguments)}var zue=zi.default.forwardRef((e,t)=>{let{inputElement:r,children:n,prefixCls:a,prefix:o,suffix:l,addonBefore:u,addonAfter:d,className:p,style:h,disabled:v,readOnly:g,focused:b,triggerFocus:x,allowClear:y,value:E,handleReset:F,hidden:S,classes:D,classNames:$,dataAttrs:C,styles:B,components:M,onClear:I}=e,j=n??r,N=M?.affixWrapper||"span",R=M?.groupWrapper||"span",L=M?.wrapper||"span",q=M?.groupAddon||"span",W=(0,zi.useRef)(null),U=Q=>{W.current?.contains(Q.target)&&x?.()},P=Oue(e),H=(0,zi.cloneElement)(j,{value:E,className:Y(j.props?.className,!P&&$?.variant)||null}),V=(0,zi.useRef)(null);if(zi.default.useImperativeHandle(t,()=>({nativeElement:V.current||W.current})),P){let Q=null;if(y){let z=!v&&!g&&E&&!(typeof y=="object"&&y.disabled),K=`${a}-clear-icon`,J=typeof y=="object"&&y?.clearIcon?y.clearIcon:"\u2716";Q=zi.default.createElement("button",{type:"button",onClick:te=>{F?.(te),I?.()},onMouseDown:te=>te.preventDefault(),className:Y(K,{[`${K}-hidden`]:!z,[`${K}-has-suffix`]:!!l},$?.clear),style:B?.clear},J)}let X=`${a}-affix-wrapper`,Z=Y(X,{[`${a}-disabled`]:v,[`${X}-disabled`]:v,[`${X}-focused`]:b,[`${X}-readonly`]:g,[`${X}-input-with-clear-btn`]:l&&y&&E},D?.affixWrapper,$?.affixWrapper,$?.variant),O=(l||y)&&zi.default.createElement("span",{className:Y(`${a}-suffix`,$?.suffix),style:B?.suffix},Q,l);H=zi.default.createElement(N,d7({className:Z,style:B?.affixWrapper,onClick:U},C?.affixWrapper,{ref:W}),o&&zi.default.createElement("span",{className:Y(`${a}-prefix`,$?.prefix),style:B?.prefix},o),H,O)}if(Rue(e)){let Q=`${a}-group`,X=`${Q}-addon`,Z=`${Q}-wrapper`,O=Y(`${a}-wrapper`,Q,D?.wrapper,$?.wrapper),z=Y(Z,{[`${Z}-disabled`]:v},D?.group,$?.groupWrapper);H=zi.default.createElement(R,{className:z,ref:V},zi.default.createElement(L,{className:O},u&&zi.default.createElement(q,{className:X},u),H,d&&zi.default.createElement(q,{className:X},d)))}return zi.default.cloneElement(H,{className:Y(H.props?.className,p)||null,style:{...H.props?.style,...h},hidden:S})}),xL=zue,bo=A(_()),Lue=A(_());function EL(e,t){return Lue.useMemo(()=>{let r={};t&&(r.show=typeof t=="object"&&t.formatter?t.formatter:!!t),r={...r,...e};let{show:n,...a}=r;return{...a,show:!!n,showFormatter:typeof n=="function"?n:void 0,strategy:a.strategy||(o=>o.length)}},[e,t])}var Hue=A(_());function kL({countConfig:e,value:t,maxLength:r}){return Hue.useMemo(()=>{let n=e.max??r,a=e.strategy(t),o=!!n&&a>n,l=Number(n)>0,u=e.show?e.showFormatter?e.showFormatter({value:t,count:a,maxLength:n}):`${a}${l?` / ${n}`:""}`:void 0;return{mergedMax:n,isOutOfRange:o,dataCount:u}},[e,r,t])}var $b=A(_());function CL({countConfig:e,getTarget:t}){let[r,n]=$b.useState(null),a=$b.useRef(t);return $b.useEffect(()=>{a.current=t},[t]),$b.useEffect(()=>{r&&(a.current()?.setSelectionRange(...r),n(null))},[r]),$b.useCallback((o,l)=>{let u=o;return!l&&e.exceedFormatter&&e.max&&e.strategy(o)>e.max&&(u=e.exceedFormatter(o,{max:e.max}),o!==u&&n([a.current()?.selectionStart||0,a.current()?.selectionEnd||0])),u},[e])}function SL(e,t){let[r,n]=qt(e,t),a=r==null?"":String(r);return{value:r,setValue:n,formatValue:a}}function u2(){return u2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u2.apply(this,arguments)}var que=(0,bo.forwardRef)((e,t)=>{let{autoComplete:r,onChange:n,onFocus:a,onBlur:o,onPressEnter:l,onKeyDown:u,onKeyUp:d,prefixCls:p="rc-input",disabled:h,htmlSize:v,className:g,maxLength:b,suffix:x,showCount:y,count:E,type:F="text",classes:S,classNames:D,styles:$,onCompositionStart:C,onCompositionEnd:B,...M}=e,[I,j]=(0,bo.useState)(!1),N=(0,bo.useRef)(!1),R=(0,bo.useRef)(!1),L=(0,bo.useRef)(null),q=(0,bo.useRef)(null),W=se=>{L.current&&Dx(L.current,se)},{setValue:U,formatValue:P}=SL(e.defaultValue,e.value),H=EL(E,y),{isOutOfRange:V,dataCount:Q}=kL({countConfig:H,value:P,maxLength:b}),X=CL({countConfig:H,getTarget:()=>L.current});(0,bo.useImperativeHandle)(t,()=>({focus:W,blur:()=>{L.current?.blur()},setSelectionRange:(se,ke,De)=>{L.current?.setSelectionRange(se,ke,De)},select:()=>{L.current?.select()},input:L.current,nativeElement:q.current?.nativeElement||L.current})),(0,bo.useEffect)(()=>{R.current&&(R.current=!1),j(se=>se&&h?!1:se)},[h]);let Z=(se,ke,De)=>{let we=X(ke,N.current);De.source==="compositionEnd"&&ke===we||(U(we),L.current&&l2(L.current,se,n,we))},O=se=>{Z(se,se.target.value,{source:"change"})},z=se=>{N.current=!1,Z(se,se.currentTarget.value,{source:"compositionEnd"}),B?.(se)},K=se=>{l&&se.key==="Enter"&&!R.current&&!se.nativeEvent.isComposing&&(R.current=!0,l(se)),u?.(se)},J=se=>{se.key==="Enter"&&(R.current=!1),d?.(se)},te=se=>{j(!0),a?.(se)},ee=se=>{R.current&&(R.current=!1),j(!1),o?.(se)},ie=se=>{U(""),W(),L.current&&l2(L.current,se,n)},me=V&&`${p}-out-of-range`,le=()=>{let se=Vt(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return bo.default.createElement("input",u2({autoComplete:r},se,{onChange:O,onFocus:te,onBlur:ee,onKeyDown:K,onKeyUp:J,className:Y(p,{[`${p}-disabled`]:h},D?.input),style:$?.input,ref:L,size:v,type:F,onCompositionStart:ke=>{N.current=!0,C?.(ke)},onCompositionEnd:z}))},he=()=>x||H.show?bo.default.createElement(bo.default.Fragment,null,H.show&&bo.default.createElement("span",{className:Y(`${p}-show-count-suffix`,{[`${p}-show-count-has-suffix`]:!!x},D?.count),style:{...$?.count}},Q),x):null;return bo.default.createElement(xL,u2({},M,{prefixCls:p,className:Y(g,me),handleReset:ie,value:P,focused:I,triggerFocus:W,suffix:he(),disabled:h,classes:S,classNames:D,styles:$,ref:q}),le())}),Wue=que,yo=A(_()),gl=A(_()),Uue=`
161
+ min-height:0 !important;
162
+ max-height:none !important;
163
+ height:0 !important;
164
+ visibility:hidden !important;
165
+ overflow:hidden !important;
166
+ position:absolute !important;
167
+ z-index:-1000 !important;
168
+ top:0 !important;
169
+ right:0 !important;
170
+ pointer-events: none !important;
171
+ `,Vue=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],s7={},wo;function Gue(e,t=!1){let r=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&s7[r])return s7[r];let n=window.getComputedStyle(e),a=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),o=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),l=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),u={sizingStyle:Vue.map(d=>`${d}:${n.getPropertyValue(d)}`).join(";"),paddingSize:o,borderSize:l,boxSizing:a};return t&&r&&(s7[r]=u),u}function Kue(e,t=!1,r=null,n=null){wo||(wo=document.createElement("textarea"),wo.setAttribute("tab-index","-1"),wo.setAttribute("aria-hidden","true"),wo.setAttribute("name","hiddenTextarea"),document.body.appendChild(wo)),e.getAttribute("wrap")?wo.setAttribute("wrap",e.getAttribute("wrap")):wo.removeAttribute("wrap");let{paddingSize:a,borderSize:o,boxSizing:l,sizingStyle:u}=Gue(e,t);wo.setAttribute("style",`${u};${Uue}`),wo.value=e.value||e.placeholder||"";let d,p,h,v=wo.scrollHeight;if(l==="border-box"?v+=o:l==="content-box"&&(v-=a),r!==null||n!==null){wo.value=" ";let b=wo.scrollHeight-a;r!==null&&(d=b*r,l==="border-box"&&(d=d+a+o),v=Math.max(d,v)),n!==null&&(p=b*n,l==="border-box"&&(p=p+a+o),h=v>p?void 0:"hidden",v=Math.min(p,v))}let g={height:v,overflowY:h,resize:"none"};return d&&(g.minHeight=d),p&&(g.maxHeight=p),g}function p7(){return p7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p7.apply(this,arguments)}var l7=0,u7=1,c7=2,Xue=gl.forwardRef((e,t)=>{let{prefixCls:r,defaultValue:n,value:a,autoSize:o,onResize:l,className:u,style:d,disabled:p,onChange:h,onInternalAutoSize:v,...g}=e,[b,x]=qt(n,a),y=b??"",E=W=>{x(W.target.value),h?.(W)},F=gl.useRef(null);gl.useImperativeHandle(t,()=>({textArea:F.current}));let[S,D]=gl.useMemo(()=>o&&typeof o=="object"?[o.minRows,o.maxRows]:[],[o]),$=!!o,[C,B]=gl.useState(c7),[M,I]=gl.useState(),j=()=>{B(l7)};sr(()=>{$&&j()},[a,S,D,$]),sr(()=>{if(C===l7)B(u7);else if(C===u7){let W=Kue(F.current,!1,S,D);B(c7),I(W)}},[C]);let N=gl.useRef(void 0),R=()=>{N.current!==void 0&&br.cancel(N.current)},L=W=>{C===c7&&(l?.(W),o&&(R(),N.current=br(()=>{j()})))};gl.useEffect(()=>R,[]);let q={...d,...$?M:null};return(C===l7||C===u7)&&(q.overflowY="hidden",q.overflowX="hidden"),gl.createElement(Ba,{onResize:L,disabled:!(o||l)},gl.createElement("textarea",p7({},g,{ref:F,style:q,className:Y(r,u,{[`${r}-disabled`]:p}),disabled:p,value:y,onChange:E})))}),Que=Xue;function f7(){return f7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f7.apply(this,arguments)}var Yue=yo.default.forwardRef(({defaultValue:e,value:t,onFocus:r,onBlur:n,onChange:a,allowClear:o,maxLength:l,onCompositionStart:u,onCompositionEnd:d,suffix:p,prefixCls:h="rc-textarea",showCount:v,count:g,className:b,style:x,disabled:y,hidden:E,classNames:F,styles:S,onResize:D,onClear:$,onPressEnter:C,readOnly:B,autoSize:M,onKeyDown:I,...j},N)=>{let[R,L]=yo.default.useState(!1),q=yo.default.useRef(!1),[W,U]=yo.default.useState(null),P=(0,yo.useRef)(null),H=(0,yo.useRef)(null),V=()=>H.current?.textArea||null,{setValue:Q,formatValue:X}=SL(e,t),Z=EL(g,v),{isOutOfRange:O,dataCount:z}=kL({countConfig:Z,value:X,maxLength:l}),K=CL({countConfig:Z,getTarget:()=>H.current?.textArea||null}),J=()=>{V()?.focus()};(0,yo.useImperativeHandle)(N,()=>({resizableTextArea:H.current,focus:J,blur:()=>{V()?.blur()},nativeElement:P.current?.nativeElement||V()})),(0,yo.useEffect)(()=>{L(be=>!y&&be)},[y]);let te=(be,ye)=>{let Re=K(ye,q.current);Q(Re),l2(be.currentTarget,be,a,Re)},ee=be=>{q.current=!0,u?.(be)},ie=be=>{q.current=!1,te(be,be.currentTarget.value),d?.(be)},me=be=>{te(be,be.target.value)},le=be=>{be.key==="Enter"&&C&&!be.nativeEvent.isComposing&&C(be),I?.(be)},he=be=>{L(!0),r?.(be)},se=be=>{L(!1),n?.(be)},ke=be=>{Q(""),J();let ye=V();ye&&l2(ye,be,a)},De=p;Z.show&&(De=yo.default.createElement(yo.default.Fragment,null,De,yo.default.createElement("span",{className:Y(`${h}-data-count`,F?.count),style:S?.count},z)));let we=be=>{D?.(be),V()?.style.height&&U(!0)},de=!M&&!v&&!o;return yo.default.createElement(xL,{ref:P,value:X,allowClear:o,handleReset:ke,suffix:De,prefixCls:h,classNames:{...F,affixWrapper:Y(F?.affixWrapper,{[`${h}-show-count`]:v,[`${h}-textarea-allow-clear`]:o})},disabled:y,focused:R,className:Y(b,O&&`${h}-out-of-range`),style:{...x,...W&&!de?{height:"auto"}:{}},dataAttrs:typeof z=="string"?{affixWrapper:{"data-count":z}}:void 0,styles:S,hidden:E,readOnly:B,onClear:$},yo.default.createElement(Que,f7({},j,{autoSize:M,maxLength:l,onKeyDown:le,onChange:me,onFocus:he,onBlur:se,onCompositionStart:ee,onCompositionEnd:ie,className:Y(F?.textarea),style:{resize:x?.resize,...S?.textarea},disabled:y,prefixCls:h,onResize:we,ref:H,readOnly:B})))}),Jue=Yue,Zue=Wue,fL=A(_()),m7=e=>{let{allowClear:t,clearIcon:r,contextAllowClear:n,contextClearIcon:a,defaultAllowClear:o,componentName:l}=e;return(0,fL.useMemo)(()=>t??n??o?{clearIcon:bb(Ct(t)?t?.clearIcon:r,Ct(n)?n?.clearIcon:a,fL.default.createElement(Fb,null)),disabled:(Ct(t)?t?.disabled:void 0)??(Ct(n)?n?.disabled:void 0)}:!1,[t,r,n,a,o])},mL=A(_());function c2(e,t){let r=(0,mL.useRef)([]),n=()=>{r.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute("type")==="password"&&e.current?.input.hasAttribute("value")&&e.current?.input.removeAttribute("value")}))};return(0,mL.useEffect)(()=>(t&&n(),()=>r.current.forEach(a=>{a&&clearTimeout(a)})),[t]),n}function Qp(e){return vt(e,{inputAffixPadding:e.paddingXXS})}var Yp=e=>{let{controlHeight:t,fontSize:r,lineHeight:n,lineWidth:a,lineWidthFocus:o,controlHeightSM:l,controlHeightLG:u,fontSizeLG:d,lineHeightLG:p,paddingSM:h,controlPaddingHorizontalSM:v,controlPaddingHorizontal:g,colorFillAlter:b,colorPrimaryHover:x,colorPrimary:y,controlOutlineWidth:E,controlOutline:F,colorErrorOutline:S,colorWarningOutline:D,colorBgContainer:$,inputFontSize:C,inputFontSizeLG:B,inputFontSizeSM:M}=e,I=C||r,j=M||I,N=B||d,R=Math.round((t-I*n)/2*10)/10-a,L=Math.round((l-j*n)/2*10)/10-a,q=Math.ceil((u-N*p)/2*10)/10-a;return{lineWidthFocus:o===0?0:a,paddingBlock:Math.max(R,0),paddingBlockSM:Math.max(L,0),paddingBlockLG:Math.max(q,0),paddingInline:h-a,paddingInlineSM:v-a,paddingInlineLG:g-a,addonBg:b,activeBorderColor:y,hoverBorderColor:x,activeShadow:`0 0 0 ${E}px ${F}`,errorActiveShadow:`0 0 0 ${E}px ${S}`,warningActiveShadow:`0 0 0 ${E}px ${D}`,hoverBg:$,activeBg:$,inputFontSize:I,inputFontSizeLG:N,inputFontSizeSM:j}},ece=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),d2=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":{...ece(vt(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),h7=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),hL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...h7(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),FL=(e,t)=>({"&-outlined":{...h7(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...d2(e)},...hL(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...hL(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),gL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),tce=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...gL(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...gL(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...d2(e)}}}}),$L="&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)",DL=(e,t)=>({outline:`${ue(e.lineWidthFocus)} ${e.lineType} ${t}`,outlineOffset:ue(e.calc(e.lineWidth).mul(-1).equal()),transition:["outline-offset","outline"].map(r=>`${r} 0s`).join(", ")}),vL=(e,t)=>({"&, & input, & textarea":{color:t.color},[$L]:DL(e,t.color),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),AL=(e,t)=>{let{componentCls:r}=e;return{"&-borderless":{background:"transparent",border:"none",paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${r}-sm, &${r}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${r}-lg, &${r}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&:focus, &:focus-within":{outline:"none"},[$L]:DL(e,e.activeBorderColor),[`&${r}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${r}-status-error`]:vL(e,{color:e.colorError,affixColor:e.colorErrorAffix}),[`&${r}-status-warning`]:vL(e,{color:e.colorWarning,affixColor:e.colorWarningAffix}),...t}}},BL=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:t?.inputColor??"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),bL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...BL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),IL=(e,t)=>({"&-filled":{...BL(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...d2(e)},...bL(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorErrorAffix}),...bL(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarningAffix}),...t}}),yL=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),rce=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...yL(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...yL(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),ML=(e,t)=>({background:e.colorBgContainer,borderWidth:`${ue(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),wL=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...ML(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),TL=(e,t)=>({"&-underlined":{...ML(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"},...wL(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...wL(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),_L=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),g7=e=>{let{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:a}=e;return{padding:`${ue(t)} ${ue(a)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},v7=e=>({padding:`${ue(e.paddingBlockSM)} ${ue(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),b7=(e,t={})=>({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${ue(e.paddingBlock)} ${ue(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,..._L(e.colorTextPlaceholder),"&-lg":{...g7(e),...t.largeStyle},"&-sm":{...v7(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),nce=e=>{let{componentCls:t,antCls:r}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:{...g7(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...v7(e)},[`&-lg ${r}-select-single`]:{height:e.controlHeightLG},[`&-sm ${r}-select-single`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${ue(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${ue(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${ue(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${ue(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},[`${r}-cascader-picker`]:{margin:`-9px ${ue(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${r}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:"block",...Th(),[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
172
+ & > ${t}-affix-wrapper,
173
+ & > ${t}-number-affix-wrapper,
174
+ & > ${r}-picker-range
175
+ `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${r}-select,
176
+ & > ${r}-select-auto-complete ${t},
177
+ & > ${r}-cascader-picker ${t},
178
+ & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${r}-select-focused`]:{zIndex:1},[`& > ${r}-select > ${r}-select-arrow`]:{zIndex:1},[`& > *:first-child,
179
+ & > ${r}-select:first-child,
180
+ & > ${r}-select-auto-complete:first-child ${t},
181
+ & > ${r}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
182
+ & > ${r}-select:last-child,
183
+ & > ${r}-cascader-picker:last-child ${t},
184
+ & > ${r}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${r}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},ace=e=>{let{componentCls:t,controlHeightSM:r,lineWidth:n,calc:a}=e,o=a(r).sub(a(n).mul(2)).sub(16).div(2).equal();return{[t]:{...Mt(e),...b7(e),...FL(e),...IL(e),...AL(e),...TL(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:r,paddingTop:o,paddingBottom:o}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}}}},ice=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...gi(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${ue(e.inputAffixPadding)}`}}}},oce=e=>{let{componentCls:t,inputAffixPadding:r,colorTextDescription:n,motionDurationSlow:a,colorIcon:o,colorIconHover:l}=e,u=`${t}-affix-wrapper`,d=`${t}-affix-wrapper-disabled`;return{[u]:{...b7(e),display:"inline-flex","&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:n,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:r},"&-suffix":{marginInlineStart:r},"&-password-icon":{display:"inline-flex",color:o,cursor:"pointer",transition:`all ${a}`,"&:hover":{color:l}}},...ice(e)},[`${t}-underlined`]:{borderRadius:0},[d]:{[`${t}-password-icon`]:{color:o,cursor:"not-allowed","&:hover":{color:o}}}}},sce=e=>{let{componentCls:t,borderRadiusLG:r,borderRadiusSM:n}=e;return{[`${t}-group`]:{...Mt(e),...nce(e),"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:r,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:n}},...tce(e),...rce(e),[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},lce=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},jL=ct(["Input","Shared"],e=>{let t=vt(e,Qp(e));return[ace(t),oce(t)]},Yp,{resetFont:!1}),p2=ct(["Input","Component"],e=>{let t=vt(e,Qp(e));return[sce(t),lce(t),Yh(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},Yp,{resetFont:!1});function uce(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var cce=(0,hl.forwardRef)((e,t)=>{let{prefixCls:r,bordered:n=!0,status:a,size:o,disabled:l,onBlur:u,onFocus:d,suffix:p,allowClear:h,addonAfter:v,addonBefore:g,className:b,style:x,styles:y,rootClassName:E,onChange:F,classNames:S,variant:D,...$}=e,{getPrefixCls:C,direction:B,allowClear:M,autoComplete:I,className:j,style:N,classNames:R,styles:L}=wt("input"),q=C("input",r),W=(0,hl.useRef)(null),U=xn(q),[P,H]=jL(q,E);p2(q,U);let{compactSize:V,compactItemClassnames:Q}=ml(q,B),X=qr(Ie=>o??V??Ie),Z=hl.default.useContext(Ia),O=l??Z,z={...e,size:X,disabled:O},K=Ue(N),J=Ue(x),[te,ee]=Et([R,S],[L,K,y,J],{props:z}),{status:ie,hasFeedback:me,feedbackIcon:le}=(0,hl.useContext)(go),he=qh(ie,a),se=uce(e)||!!me,ke=(0,hl.useRef)(se),De=c2(W,!0),we=Ie=>{De(),u?.(Ie)},de=Ie=>{De(),d?.(Ie)},be=Ie=>{De(),F?.(Ie)},ye=(me||p)&&hl.default.createElement(hl.default.Fragment,null,p,me&&le),Re=m7({allowClear:h,contextAllowClear:M,componentName:"Input"}),[Fe,$e]=Su("input",D,n);return hl.default.createElement(Zue,{ref:pn(t,W),prefixCls:q,autoComplete:I,...$,disabled:O,onBlur:we,onFocus:de,style:ee.root,styles:ee,suffix:ye,allowClear:Re,className:Y(b,E,H,U,Q,j,te.root),onChange:be,addonBefore:g&&hl.default.createElement(id,{form:!0,space:!0},g),addonAfter:v&&hl.default.createElement(id,{form:!0,space:!0},v),classNames:{...te,input:Y({[`${q}-sm`]:X==="small",[`${q}-lg`]:X==="large",[`${q}-rtl`]:B==="rtl"},te.input,P),variant:Y({[`${q}-${Fe}`]:$e},Up(q,he)),affixWrapper:Y({[`${q}-affix-wrapper-sm`]:X==="small",[`${q}-affix-wrapper-lg`]:X==="large",[`${q}-affix-wrapper-rtl`]:B==="rtl"},P),wrapper:Y({[`${q}-group-rtl`]:B==="rtl"},P),groupWrapper:Y({[`${q}-group-wrapper-sm`]:X==="small",[`${q}-group-wrapper-lg`]:X==="large",[`${q}-group-wrapper-rtl`]:B==="rtl",[`${q}-group-wrapper-${Fe}`]:$e},Up(`${q}-group-wrapper`,he,me),P)}})}),Jh=cce,sd=A(_()),dce=A(_()),pce=e=>{let{componentCls:t,paddingLG:r}=e,n=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical","@media (hover: none) and (pointer: coarse)":{resize:"none"},[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[n]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
185
+ &-allow-clear > ${t},
186
+ &-affix-wrapper${n}-has-feedback ${t}
187
+ `]:{paddingInlineEnd:r},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${n}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},fce=ct(["Input","TextArea"],e=>{let t=vt(e,Qp(e));return pce(t)},Yp,{resetFont:!1}),mce=(0,dce.forwardRef)((e,t)=>{let{prefixCls:r,bordered:n=!0,size:a,disabled:o,status:l,allowClear:u,classNames:d,rootClassName:p,className:h,style:v,styles:g,variant:b,showCount:x,onMouseDown:y,onResize:E,...F}=e,{getPrefixCls:S,direction:D,allowClear:$,autoComplete:C,className:B,style:M,classNames:I,styles:j}=wt("textArea"),N=sd.useContext(Ia),R=o??N,{status:L,hasFeedback:q,feedbackIcon:W}=sd.useContext(go),U=qh(L,l),P=Ue(M),H=Ue(v),[V,Q]=Et([I,d],[j,P,g,H],{props:e}),X=sd.useRef(null);sd.useImperativeHandle(t,()=>({resizableTextArea:X.current?.resizableTextArea,focus:be=>{Dx(X.current?.resizableTextArea?.textArea,be)},blur:()=>X.current?.blur(),nativeElement:X.current?.nativeElement||null}));let Z=S("input",r),O=xn(Z),[z,K]=jL(Z,p);fce(Z,O);let{compactSize:J,compactItemClassnames:te}=ml(Z,D),ee=qr(be=>a??J??be),[ie,me]=Su("textArea",b,n),le=m7({allowClear:u,contextAllowClear:$,componentName:"TextArea"}),[he,se]=sd.useState(!1),[ke,De]=sd.useState(!1),we=be=>{se(!0),y?.(be);let ye=()=>{se(!1),document.removeEventListener("mouseup",ye)};document.addEventListener("mouseup",ye)},de=be=>{if(E?.(be),he&&pr(getComputedStyle)){let ye=X.current?.nativeElement?.querySelector("textarea");ye&&getComputedStyle(ye).resize==="both"&&De(!0)}};return sd.createElement(Jue,{autoComplete:C,...F,style:Q.root,styles:Q,disabled:R,allowClear:le,className:Y(K,O,h,p,te,B,V.root,{[`${Z}-textarea-affix-wrapper-resize-dirty`]:ke}),classNames:{...V,textarea:Y({[`${Z}-sm`]:ee==="small",[`${Z}-lg`]:ee==="large"},z,V.textarea,he&&`${Z}-mouse-active`),variant:Y({[`${Z}-${ie}`]:me},Up(Z,U)),affixWrapper:Y(`${Z}-textarea-affix-wrapper`,{[`${Z}-affix-wrapper-rtl`]:D==="rtl",[`${Z}-affix-wrapper-sm`]:ee==="small",[`${Z}-affix-wrapper-lg`]:ee==="large",[`${Z}-textarea-show-count`]:x||e.count?.show},z)},prefixCls:Z,suffix:q&&sd.createElement("span",{className:`${Z}-textarea-suffix`},W),showCount:x,ref:X,onResize:de,onMouseDown:we})}),Db=mce;var hce=A(_()),gce=hce.default.createContext(void 0),Zh=gce,vce=A(_()),Au=100,bce=10,NL=Au*bce,BAe=NL+Au,PL={Modal:Au,Drawer:Au,Popover:Au,Popconfirm:Au,Tooltip:Au,Tour:Au,FloatButton:Au},yce={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},wce=e=>e in PL,Jp=(e,t)=>{let[,r]=Aa(),n=vce.default.useContext(Zh),a=wce(e),o;if(t!==void 0)o=[t,t];else{let l=n??0;a?l+=(n?0:r.zIndexPopupBase)+PL[e]:l+=yce[e],o=[n===void 0?t:l,l]}return o};var Uo=A(_()),xce=A(_()),Ece=e=>{let{children:t,prefixCls:r,id:n,classNames:a,styles:o,className:l,style:u}=e;return xce.createElement("div",{id:n,className:Y(`${r}-container`,a?.container,l),style:{...o?.container,...u},role:"tooltip"},typeof t=="function"?t():t)},Bb=Ece,e0=A(_()),RL=A(_()),t0={shiftX:64,adjustY:1},r0={adjustX:1,shiftY:!0},Vo=[0,0],kce={left:{points:["cr","cl"],overflow:r0,offset:[-4,0],targetOffset:Vo},right:{points:["cl","cr"],overflow:r0,offset:[4,0],targetOffset:Vo},top:{points:["bc","tc"],overflow:t0,offset:[0,-4],targetOffset:Vo},bottom:{points:["tc","bc"],overflow:t0,offset:[0,4],targetOffset:Vo},topLeft:{points:["bl","tl"],overflow:t0,offset:[0,-4],targetOffset:Vo},leftTop:{points:["tr","tl"],overflow:r0,offset:[-4,0],targetOffset:Vo},topRight:{points:["br","tr"],overflow:t0,offset:[0,-4],targetOffset:Vo},rightTop:{points:["tl","tr"],overflow:r0,offset:[4,0],targetOffset:Vo},bottomRight:{points:["tr","br"],overflow:t0,offset:[0,4],targetOffset:Vo},rightBottom:{points:["bl","br"],overflow:r0,offset:[4,0],targetOffset:Vo},bottomLeft:{points:["tl","bl"],overflow:t0,offset:[0,4],targetOffset:Vo},leftBottom:{points:["br","bl"],overflow:r0,offset:[-4,0],targetOffset:Vo}};function y7(){return y7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y7.apply(this,arguments)}var Cce=e0.forwardRef((e,t)=>{let{trigger:r=["hover","focus"],mouseEnterDelay:n=0,mouseLeaveDelay:a=.1,prefixCls:o="rc-tooltip",children:l,onVisibleChange:u,afterVisibleChange:d,motion:p,placement:h="right",align:v={},destroyOnHidden:g=!1,defaultVisible:b,getTooltipContainer:x,arrowContent:y,overlay:E,id:F,showArrow:S=!0,classNames:D,styles:$,...C}=e,B=pl(F),M=(0,RL.useRef)(null);(0,RL.useImperativeHandle)(t,()=>M.current);let I={...C};"visible"in e&&(I.popupVisible=e.visible);let j=e0.useMemo(()=>{if(!S)return!1;let R=S===!0?{}:S;return{...R,className:Y(R.className,D?.arrow),style:{...R.style,...$?.arrow},content:R.content??y}},[S,D?.arrow,$?.arrow,y]),N=({open:R})=>{let L=e0.Children.only(l),q={"aria-describedby":[L.props["aria-describedby"],E&&R?B:void 0].filter(Boolean).join(" ")||void 0};return e0.cloneElement(L,q)};return e0.createElement(jh,y7({popupClassName:D?.root,prefixCls:o,popup:e0.createElement(Bb,{key:"content",prefixCls:o,id:B,classNames:D,styles:$},E),action:r,builtinPlacements:kce,popupPlacement:h,ref:M,popupAlign:v,getPopupContainer:x,onOpenChange:u,afterOpenChange:d,popupMotion:p,defaultPopupVisible:b,autoDestroy:g,mouseLeaveDelay:a,popupStyle:$?.root,mouseEnterDelay:n,arrow:j,uniqueContainerClassName:D?.uniqueContainer,uniqueContainerStyle:$?.uniqueContainer},I),N)}),Sce=Cce,Fce=Sce;function n0(e){let{sizePopupArrow:t,borderRadiusXS:r,borderRadiusOuter:n}=e,a=t/2,o=0,l=a,u=n*1/Math.sqrt(2),d=a-n*(1-1/Math.sqrt(2)),p=a-r*(1/Math.sqrt(2)),h=n*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),v=2*a-p,g=h,b=2*a-u,x=d,y=2*a-o,E=l,F=a*Math.sqrt(2)+n*(Math.sqrt(2)-2),S=n*(Math.sqrt(2)-1),D=`polygon(${S}px 100%, 50% ${S}px, ${2*a-S}px 100%, ${S}px 100%)`,$=`path('M ${o} ${l} A ${n} ${n} 0 0 0 ${u} ${d} L ${p} ${h} A ${r} ${r} 0 0 1 ${v} ${g} L ${b} ${x} A ${n} ${n} 0 0 0 ${y} ${E} Z')`;return{arrowShadowWidth:F,arrowPath:$,arrowPolygon:D}}var LL=(e,t,r)=>{let{sizePopupArrow:n,arrowPolygon:a,arrowPath:o,arrowShadowWidth:l,borderRadiusXS:u,calc:d}=e,p={content:'""',position:"absolute",width:l,height:l,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${ue(u)} 0`},transform:"translateY(50%) rotate(-135deg)",zIndex:0,background:"transparent"};return r&&(p.boxShadow=r),{pointerEvents:"none",width:n,height:n,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:n,height:d(n).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[a,o]},content:'""'},"&::after":p}},HL=8;function Zp(e){let{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?HL:n}}var $ce=(e,t,r)=>{let{componentCls:n,boxShadowPopoverArrow:a,arrowOffsetVertical:o,arrowOffsetHorizontal:l,antCls:u}=e,[d]=wn(u,"tooltip"),{arrowDistance:p=0,arrowShadow:h=!0}=r||{};return{[n]:{[`${n}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...LL(e,t,h?a:!1),"&:before":{background:t}}],[[`&-placement-top > ${n}-arrow`,`&-placement-topLeft > ${n}-arrow`,`&-placement-topRight > ${n}-arrow`].join(",")]:{bottom:p,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{[d("arrow-offset-x")]:l,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:l}}},"&-placement-topRight":{[d("arrow-offset-x")]:`calc(100% - ${ue(l)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:l}}},[[`&-placement-bottom > ${n}-arrow`,`&-placement-bottomLeft > ${n}-arrow`,`&-placement-bottomRight > ${n}-arrow`].join(",")]:{top:p,transform:"translateY(-100%)"},[`&-placement-bottom > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{[d("arrow-offset-x")]:l,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:l}}},"&-placement-bottomRight":{[d("arrow-offset-x")]:`calc(100% - ${ue(l)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:l}}},[[`&-placement-left > ${n}-arrow`,`&-placement-leftTop > ${n}-arrow`,`&-placement-leftBottom > ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:p},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${n}-arrow`]:{top:o},[`&-placement-leftBottom > ${n}-arrow`]:{bottom:o},[[`&-placement-right > ${n}-arrow`,`&-placement-rightTop > ${n}-arrow`,`&-placement-rightBottom > ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:p},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${n}-arrow`]:{top:o},[`&-placement-rightBottom > ${n}-arrow`]:{bottom:o}}}},a0=$ce;function Dce(e,t,r,n){if(n===!1)return{adjustX:!1,adjustY:!1};let a=Ct(n)?n:{},o={};switch(e){case"top":case"bottom":o.shiftX=t.arrowOffsetHorizontal*2+r,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=t.arrowOffsetVertical*2+r,o.shiftX=!0,o.adjustX=!0;break}let l={...o,...a};return l.shiftX||(l.adjustX=!0),l.shiftY||(l.adjustY=!0),l}var OL={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},Ace={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},Bce=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function f2(e){let{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:a,borderRadius:o,visibleFirst:l}=e,u=t/2,d={},p=Zp({contentRadius:o,limitVerticalRadius:!0});return Object.keys(OL).forEach(h=>{let v={...n&&Ace[h]||OL[h],offset:[0,0],dynamicInset:!0};switch(d[h]=v,Bce.has(h)&&(v.autoArrow=!1),h){case"top":case"topLeft":case"topRight":v.offset[1]=-u-a;break;case"bottom":case"bottomLeft":case"bottomRight":v.offset[1]=u+a;break;case"left":case"leftTop":case"leftBottom":v.offset[0]=-u-a;break;case"right":case"rightTop":case"rightBottom":v.offset[0]=u+a;break}if(n)switch(h){case"topLeft":case"bottomLeft":v.offset[0]=-p.arrowOffsetHorizontal-u;break;case"topRight":case"bottomRight":v.offset[0]=p.arrowOffsetHorizontal+u;break;case"leftTop":case"rightTop":v.offset[1]=-p.arrowOffsetHorizontal*2+u;break;case"leftBottom":case"rightBottom":v.offset[1]=p.arrowOffsetHorizontal*2-u;break}v.overflow=Dce(h,p,t,r),l&&(v.htmlRegion="visibleFirst")}),d}var Ice=A(_()),Mce=Ice.default.createContext(!1),Tce=Mce,_ce=A(_()),jce=(e,t)=>{let r=n=>typeof n=="boolean"?{show:n}:n||{};return _ce.default.useMemo(()=>{let n=r(e),a=r(t);return{...a,...n,show:n.show??a.show??!0}},[e,t])},m2=jce,Ab=A(_()),zL="50%",Nce=e=>{let{calc:t,componentCls:r,tooltipMaxWidth:n,tooltipColor:a,tooltipBg:o,tooltipBorderRadius:l,zIndexPopup:u,controlHeight:d,dropShadowPopover:p,paddingSM:h,paddingXS:v,arrowOffsetHorizontal:g,sizePopupArrow:b,antCls:x}=e,[y,E]=wn(x,"tooltip"),F=t(l).add(b).add(g).equal(),S={minWidth:t(l).mul(2).add(b).equal(),minHeight:d,padding:`${ue(e.calc(h).div(2).equal())} ${ue(v)}`,color:E("overlay-color",a),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:l,boxSizing:"border-box"},D={[y("valid-offset-x")]:E("arrow-offset-x","var(--arrow-x)"),transformOrigin:[E("valid-offset-x",zL),`var(--arrow-y, ${zL})`].join(" ")};return[{[r]:{...Mt(e),position:"absolute",zIndex:u,display:"block",width:"max-content",maxWidth:n,visibility:"visible",filter:p,...D,"&-hidden":{display:"none"},[y("arrow-background-color")]:o,[`${r}-container`]:[S,WF(e,!0)],[`&:has(~ ${r}-unique-container)`]:{[`${r}-container`]:{border:"none",background:"transparent"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:F},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${r}-inner`]:{borderRadius:e.min(l,HL)}},[`${r}-content`]:{position:"relative"},...nd(e,($,{darkColor:C})=>({[`&${r}-${$}`]:{[`${r}-container`]:{backgroundColor:C},[`${r}-arrow`]:{[y("arrow-background-color")]:C}}})),"&-rtl":{direction:"rtl"}}},a0(e,E("arrow-background-color"),{arrowShadow:!1}),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${r}-unique-container`]:{...S,...D,position:"absolute",zIndex:t(u).sub(1).equal(),filter:p,"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},Pce=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...Zp({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...n0(vt(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),qL=(e,t,r=!0)=>ct("Tooltip",n=>{let{borderRadius:a,colorTextLightSolid:o,colorBgSpotlight:l,maxWidth:u}=n,d=vt(n,{tooltipMaxWidth:u,tooltipColor:o,tooltipBorderRadius:a,tooltipBg:l});return[Nce(d),Fu(n,"zoom-big-fast")]},Pce,{resetStyle:!1,injectStyle:r})(e,t),Rce=hi.map(e=>`${e}-inverse`),Oce=["success","processing","error","default","warning"];function ef(e,t=!0){return t?[].concat(en(Rce),en(hi)).includes(e):hi.includes(e)}function w7(e){return Oce.includes(e)}var WL=(e,t,r)=>{let n=ef(r),[a]=wn(e,"tooltip"),o=Y({[`${t}-${r}`]:r&&n}),l={},u={},d=GF(r).toRgb(),p=(.299*d.r+.587*d.g+.114*d.b)/255<.5?"#FFF":"#000";return r&&!n&&(l.background=r,l[a("overlay-color")]=p,u[a("arrow-background-color")]=r),{className:o,overlayStyle:l,arrowStyle:u}},zce=e=>{let{prefixCls:t,className:r,placement:n="top",title:a,color:o,overlayInnerStyle:l,classNames:u,styles:d}=e,{getPrefixCls:p}=Ab.useContext(st),h=p("tooltip",t),v=p(),g=xn(h),[b,x]=qL(h,g),y=WL(v,h,o),E=y.arrowStyle,F=Ab.useMemo(()=>({container:{...l,...y.overlayStyle}}),[l,y.overlayStyle]),S={...e,placement:n},[D,$]=Et([u],[F,d],{props:S}),C=Y(g,b,x,h,`${h}-pure`,`${h}-placement-${n}`,r,y.className);return Ab.createElement("div",{className:C,style:E},Ab.createElement("div",{className:`${h}-arrow`}),Ab.createElement(Bb,{...e,className:b,prefixCls:h,classNames:D,styles:$},a))},Lce=zce,Hce=Uo.forwardRef((e,t)=>{let{prefixCls:r,openClassName:n,getTooltipContainer:a,color:o,children:l,afterOpenChange:u,arrow:d,destroyTooltipOnHide:p,destroyOnHidden:h,title:v,overlay:g,trigger:b,builtinPlacements:x,autoAdjustOverflow:y=!0,motion:E,getPopupContainer:F,placement:S="top",mouseEnterDelay:D,mouseLeaveDelay:$,rootClassName:C,styles:B,classNames:M,onOpenChange:I,overlayInnerStyle:j,overlayStyle:N,overlayClassName:R,...L}=e,[,q]=Aa(),W=e["data-popover-inject"],{getPopupContainer:U,getPrefixCls:P,direction:H,...V}=wt("tooltip"),{className:Q,style:X,classNames:Z,styles:O,arrow:z,trigger:K,mouseEnterDelay:J,mouseLeaveDelay:te}=W?{}:V,ee=D??J??.1,ie=$??te??.1,me=m2(d,z),le=me.show,he=b||K||"hover",se=F||a||U,ke=h??!!p,De=Uo.useContext(Tce),we=Dh("Tooltip"),de=Uo.useRef(null),be=()=>{de.current?.forceAlign()};Uo.useImperativeHandle(t,()=>({forceAlign:be,nativeElement:de.current?.nativeElement,popupElement:de.current?.popupElement}));let[ye,Re]=qt(e.defaultOpen??!1,e.open),Fe=!v&&!g&&v!==0,$e=Wt=>{Re(Fe?!1:Wt),!Fe&&I&&I(Wt)},Ie=Uo.useMemo(()=>x||f2({arrowPointAtCenter:me?.pointAtCenter??!1,autoAdjustOverflow:y,arrowWidth:le?q.sizePopupArrow:0,borderRadius:q.borderRadius,offset:q.marginXXS,visibleFirst:!0}),[me,x,q,le,y]),He=Uo.useMemo(()=>v===0?v:g||v||"",[g,v]),Oe=Uo.createElement(id,{space:!0,form:!0},pr(He)?He():He),Me={...e,trigger:he,builtinPlacements:Ie,getPopupContainer:se,destroyOnHidden:ke,mouseEnterDelay:ee,mouseLeaveDelay:ie},Te=Ue(X),Xe=Ue(N),[ot,Ye]=Et([Z,M],[O,Te,B,Xe],{props:Me}),Ve=P("tooltip",r),Ae=P(),Ne=ye;(!("open"in e)&&Fe||De)&&(Ne=!1);let ht=Uo.isValidElement(l)&&!cb(l)?l:Uo.createElement("span",null,l),lt=ht.props,Ke=!lt.className||typeof lt.className=="string"?Y(lt.className,n||`${Ve}-open`):lt.className,je=xn(Ve),[nt,Nt]=qL(Ve,je,!W),Pt=WL(Ae,Ve,o),Jr=Pt.arrowStyle,Xt=Y(je,nt,Nt),Tr=Y(R,{[`${Ve}-rtl`]:H==="rtl"},Pt.className,C,Xt,Q,ot.root),[tr,Tt]=Jp("Tooltip",L.zIndex),cr={...Ye.container,...j,...Pt.overlayStyle},$r=Uo.createElement(Fce,{unique:!0,...L,zIndex:tr,showArrow:le,placement:S,mouseEnterDelay:ee,mouseLeaveDelay:ie,prefixCls:Ve,classNames:{root:Tr,container:ot.container,arrow:ot.arrow,uniqueContainer:Y(Xt,ot.container)},styles:{root:{...Jr,...Ye.root},container:cr,uniqueContainer:cr,arrow:Ye.arrow},ref:de,overlay:Oe,visible:Ne,onVisibleChange:$e,afterVisibleChange:u,arrowContent:Uo.createElement("span",{className:`${Ve}-arrow-content`}),motion:{motionName:Vp(Ae,"zoom-big-fast",typeof E?.motionName=="string"?E?.motionName:void 0),motionDeadline:1e3},trigger:he,builtinPlacements:Ie,getTooltipContainer:se,destroyOnHidden:ke},Ne&&!L.disabled?Fr(ht,{className:Ke}):ht);return Uo.createElement(Zh.Provider,{value:Tt},$r)}),x7=Hce;x7._InternalPanelDoNotUseOrYouWillBeFired=Lce;x7.UniqueProvider=Vx;var Ma=x7;var Li=Sb;function tf(e){return["small","middle","medium","large"].includes(e)}function h2(e){return e?Gn(e):!1}var E7=A(_()),UL=["wrap","nowrap","wrap-reverse"],VL=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],GL=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],qce=(e,t)=>{let r=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${r}`]:r&&UL.includes(r)}},Wce=(e,t)=>{let r={};return GL.forEach(n=>{r[`${e}-align-${n}`]=t.align===n}),r[`${e}-align-stretch`]=!t.align&&!!t.vertical,r},Uce=(e,t)=>{let r={};return VL.forEach(n=>{r[`${e}-justify-${n}`]=t.justify===n}),r},Vce=(e,t)=>Y({...qce(e,t),...Wce(e,t),...Uce(e,t)}),Gce=Vce,Kce=e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},Xce=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-medium, &-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},Qce=e=>{let{componentCls:t}=e,r={};return UL.forEach(n=>{r[`${t}-wrap-${n}`]={flexWrap:n}}),r},Yce=e=>{let{componentCls:t}=e,r={};return GL.forEach(n=>{r[`${t}-align-${n}`]={alignItems:n}}),r},Jce=e=>{let{componentCls:t}=e,r={};return VL.forEach(n=>{r[`${t}-justify-${n}`]={justifyContent:n}}),r},Zce=()=>({}),ede=ct("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:n}=e,a=vt(e,{flexGapSM:t,flexGap:r,flexGapLG:n});return[Kce(a),Xce(a),Qce(a),Yce(a),Jce(a)]},Zce,{resetStyle:!1}),tde=E7.default.forwardRef((e,t)=>{let{prefixCls:r,rootClassName:n,className:a,style:o,flex:l,gap:u,vertical:d,orientation:p,component:h="div",children:v,...g}=e,{flex:b,direction:x,getPrefixCls:y}=E7.default.useContext(st),E=y("flex",r),[F,S]=ede(E),[,D]=Wo(p,d??b?.vertical),$=Y(a,n,b?.className,E,F,S,Gce(E,{...e,vertical:D}),{[`${E}-rtl`]:x==="rtl",[`${E}-gap-${u}`]:tf(u),[`${E}-vertical`]:D}),C={...b?.style,...o};return Lr(l)&&(C.flex=l),Lr(u)&&!tf(u)&&(C.gap=u),E7.default.createElement(h,{ref:t,className:$,style:C,...Vt(g,["justify","wrap","align"])},v)}),rt=tde,KL=A(_()),rde={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},nde=rde;function k7(){return k7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},k7.apply(this,arguments)}var ade=(e,t)=>KL.createElement(Ut,k7({},e,{ref:t,icon:nde})),ide=KL.forwardRef(ade),F7=ide,XL=A(_()),ode={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},sde=ode;function C7(){return C7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},C7.apply(this,arguments)}var lde=(e,t)=>XL.createElement(Ut,C7({},e,{ref:t,icon:sde})),ude=XL.forwardRef(lde),$7=ude,QL=A(_()),cde={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},dde=cde;function S7(){return S7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},S7.apply(this,arguments)}var pde=(e,t)=>QL.createElement(Ut,S7({},e,{ref:t,icon:dde})),fde=QL.forwardRef(pde),D7=fde;var YL=A(_()),mde={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},hde=mde;function A7(){return A7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},A7.apply(this,arguments)}var gde=(e,t)=>YL.createElement(Ut,A7({},e,{ref:t,icon:hde})),vde=YL.forwardRef(gde),B7=vde;var JL=A(_()),yr=A(_()),Bu=A(_()),bde=(e,t,r,n)=>{let{titleMarginBottom:a,fontWeightStrong:o}=n;return{marginBottom:a,color:r,fontWeight:o,fontSize:e,lineHeight:t}},yde=e=>{let t=[1,2,3,4,5],r={};return t.forEach(n=>{r[`
188
+ h${n}&,
189
+ div&-h${n},
190
+ div&-h${n} > textarea,
191
+ h${n}
192
+ `]=bde(e[`fontSizeHeading${n}`],e[`lineHeightHeading${n}`],e.colorTextHeading,e)}),r},wde=e=>{let{componentCls:t}=e;return{[`&${`${t}-link`}`]:{...qx(e),userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none",[`${t}-actions`]:{pointerEvents:"auto"}}}}}},xde=e=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:`${ue(e.lineWidth)} ${e.lineType} rgba(100, 100, 100, 0.2)`,borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:`${ue(e.lineWidth)} ${e.lineType} rgba(100, 100, 100, 0.2)`,borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:Ch[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:`${ue(e.lineWidth)} ${e.lineType} rgba(100, 100, 100, 0.2)`,borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85},table:{width:"100%",textAlign:"start",borderCollapse:"separate",borderSpacing:0,marginBlock:"1em","th, td":{padding:ue(e.padding),overflowWrap:"break-word",borderBottom:`${ue(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"thead > tr:first-child > th:first-child":{borderStartStartRadius:e.borderRadiusLG},"thead > tr:first-child > th:last-child":{borderStartEndRadius:e.borderRadiusLG},"thead > tr > th":{textAlign:"start",position:"relative",color:e.colorTextHeading,fontWeight:e.fontWeightStrong,backgroundColor:e.colorFillAlter,transition:`background-color ${e.motionDurationMid} ease`,"&:not(:last-child)::before":{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:e.colorSplit,transform:"translateY(-50%)",content:'""'}},"tbody > tr":{"> th, > td":{transition:`background-color ${e.motionDurationMid} ease`},"&:hover > th, &:hover > td":{backgroundColor:e.colorFillAlter}}}}),Ede=e=>{let{componentCls:t,paddingSM:r}=e,n=r;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(n).div(-2).add(1).equal(),marginBottom:e.calc(n).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},[`&${t}-edit-content textarea`]:{margin:"0!important",fontSize:"inherit",lineHeight:"inherit",fontFamily:"inherit",fontWeight:"inherit",MozTransition:"none",height:"1em"}}}},kde=e=>({[`${e.componentCls}-copy-success`]:{"&, &:hover, &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),Cde=()=>({"a&-ellipsis, span&-ellipsis":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{...fl,"a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),Sde=e=>{let{componentCls:t,titleMarginTop:r}=e;return{[t]:{color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary, &${t}-link${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success, &${t}-link${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning, &${t}-link${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger, &${t}-link${t}-danger`]:{color:e.colorErrorText,[`&${t}-link:active, &${t}-link:focus`]:{color:e.colorErrorTextActive},[`&${t}-link:hover`]:{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"div&, p":{marginBottom:"1em"},...yde(e),[`& + h1${t}, & + h2${t}, & + h3${t}, & + h4${t}, & + h5${t}`]:{marginTop:r},"div, ul, li, p, h1, h2, h3, h4, h5":{"+ h1, + h2, + h3, + h4, + h5":{marginTop:r}},...xde(e),...wde(e),[`${t}-actions`]:{display:"inline"},[`
193
+ ${t}-expand,
194
+ ${t}-collapse,
195
+ ${t}-edit,
196
+ ${t}-copy
197
+ `]:{...qx(e),marginInlineStart:e.marginXXS},[`${t}-actions-start`]:{[`
198
+ ${t}-expand,
199
+ ${t}-collapse,
200
+ ${t}-edit,
201
+ ${t}-copy:not(${t}-copy-icon-only)
202
+ `]:{marginInlineStart:0,marginInlineEnd:e.marginXXS}},...Ede(e),...kde(e),...Cde(),"&-rtl":{direction:"rtl"}}}},Fde=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),sH=ct("Typography",Sde,Fde),$de=e=>{let{prefixCls:t,"aria-label":r,className:n,style:a,classNames:o,styles:l,direction:u,maxLength:d,autoSize:p=!0,value:h,onSave:v,onCancel:g,onEnd:b,component:x,enterIcon:y=Bu.createElement($7,null)}=e,E=Bu.useRef(null),F=Bu.useRef(!1),S=Bu.useRef(null),[D,$]=Bu.useState(h);Bu.useEffect(()=>{$(h)},[h]),Bu.useEffect(()=>{if(E.current?.resizableTextArea){let{textArea:U}=E.current.resizableTextArea;U.focus();let{length:P}=U.value;U.setSelectionRange(P,P)}},[]);let C=({target:U})=>{$(U.value.replace(/[\n\r]/g,""))},B=()=>{F.current=!0},M=()=>{F.current=!1},I=({keyCode:U})=>{F.current||(S.current=U)},j=()=>{v(D.trim())},N=({keyCode:U,ctrlKey:P,altKey:H,metaKey:V,shiftKey:Q})=>{S.current!==U||F.current||P||H||V||Q||(U===yn.ENTER?(j(),b?.()):U===yn.ESC&&g())},R=()=>{j()},[L,q]=sH(t),W=Y(t,`${t}-edit-content`,{[`${t}-rtl`]:u==="rtl",[`${t}-${x}`]:!!x},n,o.root,L,q);return Bu.createElement("div",{className:W,style:{...l.root,...a}},Bu.createElement(Db,{ref:E,maxLength:d,value:D,onChange:C,onKeyDown:I,onKeyUp:N,onCompositionStart:B,onCompositionEnd:M,onBlur:R,"aria-label":r,rows:1,autoSize:p,className:o.textarea,style:l.textarea}),y!==null?Fr(y,{className:`${t}-edit-content-confirm`}):null)},Dde=$de,Ade=A(_()),Bde=(e,t)=>{let r=!1,n=a=>{a.stopPropagation(),a.preventDefault(),a.clipboardData?.clearData(),a.clipboardData?.setData("text/plain",e),t&&a.clipboardData?.setData("text/html",e),r=!0};try{return document.addEventListener("copy",n,{capture:!0}),document.execCommand("copy"),r}catch{return!1}finally{document.removeEventListener("copy",n,{capture:!0})}},Ide=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:"text/html"}),"text/plain":new Blob([e],{type:"text/plain"})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function Mde(e,t){if(typeof e!="string")return!1;let r=t?.format==="text/html";return!!(await Ide(e,r)||Bde(e,r))}var Tde=Mde,_de=(e,t={})=>!Lr(e)&&t?.skipEmpty?[]:Array.isArray(e)?e:[e],lH=_de,jde=({copyConfig:e,children:t})=>{let[r,n]=Fh(!1),[a,o]=Ade.useState(!1),l={};e.format&&(l.format=e.format);let u=xt(async d=>{d?.preventDefault(),d?.stopPropagation(),o(!0);try{let p=pr(e.text)?await e.text():e.text;await Tde(p||lH(t,{skipEmpty:!0}).join("")||"",l),o(!1),n(!0,!0),n(!1,{ms:3e3}),e.onCopy?.(d)}catch(p){throw o(!1),p}});return{copied:r,copyLoading:a,onClick:u}},Nde=jde,Pde=A(_()),Rde=(e,t)=>{let r=!!e;return Pde.useMemo(()=>{let n={...t,...r&&Ct(e)?e:null};return[r,n]},[r,e,t])},I7=Rde,ZL=A(_()),Ode=e=>{let t=(0,ZL.useRef)(void 0);return(0,ZL.useEffect)(()=>{t.current=e}),t.current},zde=Ode,eH=A(_()),Lde=(e,t,r)=>(0,eH.useMemo)(()=>e===!0?{title:t??r}:(0,eH.isValidElement)(e)?{title:e}:Ct(e)?{title:t??r,...e}:{title:e},[e,t,r]),Hde=Lde,qde=A(_()),uH=(e,t,r,n,a)=>{let{getPrefixCls:o,direction:l,className:u,style:d,classNames:p,styles:h}=wt("typography"),v=n??l,g=o("typography",e),b={...a,prefixCls:g,direction:v},x=(0,qde.useMemo)(()=>({root:u}),[u]),y=Ue(d),[E,F]=Et([x,p,t],[h,y,r],{props:b});return[E,F,g,v]},b2=A(_()),cH=b2.forwardRef((e,t)=>{let{component:r="article",className:n,rootClassName:a,children:o,direction:l,style:u,classNames:d,styles:p,prefixCls:h,...v}=e,[g,b]=sH(h),x=Y(h,{[`${h}-rtl`]:l==="rtl"},n,a,g,b,d?.root),y={...p?.root,...u};return b2.createElement(r,{...v,className:x,style:y,ref:t},o)}),Wde=b2.forwardRef((e,t)=>{let{prefixCls:r,className:n,rootClassName:a,direction:o,classNames:l,styles:u,...d}=e,[p,h,v,g]=uH(r,l,u,o,e);return b2.createElement(cH,{ref:t,className:Y(n,a),direction:g,classNames:p,styles:h,prefixCls:v,...d})}),Ude=Wde,Ib=A(_()),tH=e=>e===!1?[!1,!1]:lH(e);function M7(e,t,r){return e===!0||e===void 0?t:e||r&&t}function Vde(e){let t=document.createElement("em");e.appendChild(t);let r=e.getBoundingClientRect(),n=t.getBoundingClientRect();return e.removeChild(t),r.left>n.left||n.right>r.right||r.top>n.top||n.bottom>r.bottom}var R7=e=>["string","number"].includes(typeof e),Gde=e=>{let{prefixCls:t,copied:r,locale:n,iconOnly:a,tooltips:o,icon:l,tabIndex:u,onCopy:d,loading:p,className:h,style:v}=e,g=tH(o),b=tH(l),{copied:x,copy:y}=n??{},E=r?x:y,F=M7(g[r?1:0],E),S=typeof F=="string"?F:E;return Ib.createElement(Ma,{title:F},Ib.createElement("button",{type:"button",className:Y(`${t}-copy`,h,{[`${t}-copy-success`]:r,[`${t}-copy-icon-only`]:a}),style:v,onClick:d,"aria-label":S,tabIndex:u},r?M7(b[1],Ib.createElement(B7,null),!0):M7(b[0],p?Ib.createElement(Xp,null):Ib.createElement(D7,null),!0)))},Kde=Gde,Wr=A(_()),g2=Wr.forwardRef(({style:e,children:t},r)=>{let n=Wr.useRef(null);return Wr.useImperativeHandle(r,()=>({isExceed:()=>{let a=n.current;return a.scrollHeight>a.clientHeight},getHeight:()=>n.current.clientHeight})),Wr.createElement("span",{"aria-hidden":!0,ref:n,style:{position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)",...e}},t)}),Xde=e=>e.reduce((t,r)=>t+(R7(r)?String(r).length:1),0);function rH(e,t){let r=0,n=[];for(let a=0;a<e.length;a+=1){if(r===t)return n;let o=e[a],l=R7(o)?String(o).length:1,u=r+l;if(u>t){let d=t-r;return n.push(String(o).slice(0,d)),n}n.push(o),r=u}return e}var T7=0,_7=1,j7=2,N7=3,nH=4,v2={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function Qde(e){let{enableMeasure:t,width:r,text:n,children:a,rows:o,expanded:l,measureDeps:u,miscDeps:d,onEllipsis:p}=e,h=Wr.useMemo(()=>Er(n),[n]),v=Wr.useMemo(()=>Xde(h),[n]),g=Wr.useMemo(()=>a(h,!1),[n].concat(en(u))),[b,x]=Wr.useState(null),y=Wr.useRef(null),E=Wr.useRef(null),F=Wr.useRef(null),S=Wr.useRef(null),D=Wr.useRef(null),[$,C]=Wr.useState(!1),[B,M]=Wr.useState(T7),[I,j]=Wr.useState(0),[N,R]=Wr.useState(null);sr(()=>{M(t&&r&&v?_7:T7)},[r,n,o,t,h].concat(en(u))),sr(()=>{if(B===_7){M(j7);let U=E.current&&getComputedStyle(E.current).whiteSpace;R(U)}else if(B===j7){let U=!!F.current?.isExceed();M(U?N7:nH),x(U?[0,v]:null),C(U);let P=F.current?.getHeight()||0,H=o===1?0:S.current?.getHeight()||0,V=D.current?.getHeight()||0,Q=Math.max(P,H+V);j(Q+1),p(U)}},[B]);let L=b?Math.ceil((b[0]+b[1])/2):0;sr(()=>{let[U,P]=b||[0,0];if(U!==P){let H=(y.current?.getHeight()||0)>I,V=L;P-U===1&&(V=H?U:P),x(H?[U,V]:[V,P])}},[b,L]);let q=Wr.useMemo(()=>{if(!t)return a(h,!1);if(B!==N7||!b||b[0]!==b[1]){let U=a(h,!1);return[nH,T7].includes(B)?U:Wr.createElement("span",{style:{...v2,WebkitLineClamp:o}},U)}return a(l?h:rH(h,b[0]),$)},[l,B,b,h].concat(en(d))),W={width:r,margin:0,padding:0,whiteSpace:N==="nowrap"?"normal":"inherit"};return Wr.createElement(Wr.Fragment,null,q,B===j7&&Wr.createElement(Wr.Fragment,null,Wr.createElement(g2,{style:{...W,...v2,WebkitLineClamp:o},ref:F},g),Wr.createElement(g2,{style:{...W,...v2,WebkitLineClamp:o-1},ref:S},g),Wr.createElement(g2,{style:{...W,...v2,WebkitLineClamp:1},ref:D},a([],!0))),B===N7&&b&&b[0]!==b[1]&&Wr.createElement(g2,{style:{...W,top:400},ref:y},a(rH(h,L),!0)),B===_7&&Wr.createElement("span",{style:{whiteSpace:"inherit"},ref:E}))}var Yde=A(_()),Jde=({enableEllipsis:e,isEllipsis:t,disabled:r,children:n,tooltipProps:a})=>!a?.title||!e?n:Yde.createElement(Ma,{...a,disabled:!t||r},n),Zde=Jde;function epe({mark:e,code:t,underline:r,delete:n,strong:a,keyboard:o,italic:l},u){let d=u;function p(h,v){v&&(d=yr.createElement(h,{},d))}return p("strong",a),p("u",r),p("del",n),p("code",t),p("mark",e),p("kbd",o),p("i",l),d}var tpe="...",aH=["delete","mark","code","underline","strong","keyboard","italic"],rpe=yr.forwardRef((e,t)=>{let{prefixCls:r,className:n,style:a,classNames:o,styles:l,direction:u,type:d,disabled:p,children:h,ellipsis:v,editable:g,copyable:b,actions:x,component:y,title:E,onMouseEnter:F,onMouseLeave:S,...D}=e,[$]=Lp("Text"),C=yr.useRef(null),B=yr.useRef(null),[M,I,j,N]=uH(r,o,l,u,e),R=Vt(D,aH),[L,q]=I7(g),[W,U]=qt(!1,q.editing),{triggerType:P=["icon"]}=q,H=dt=>{dt&&q.onStart?.(),U(dt)},V=zde(W);sr(()=>{!W&&V&&B.current?.focus()},[W]);let Q=dt=>{dt?.preventDefault(),H(!0)},X=dt=>{q.onChange?.(dt),H(!1)},Z=()=>{q.onCancel?.(),H(!1)},[O,z]=I7(b),{placement:K="end"}=x??{},{copied:J,copyLoading:te,onClick:ee}=Nde({copyConfig:z,children:h}),[ie,me]=yr.useState(!1),[le,he]=yr.useState(!1),[se,ke]=yr.useState(!1),[De,we]=yr.useState(!1),[de,be]=yr.useState(!0),[ye,Re]=I7(v,{expandable:!1,symbol:dt=>dt?$?.collapse:$?.expand}),[Fe,$e]=qt(Re.defaultExpanded||!1,Re.expanded),Ie=ye&&(!Fe||Re.expandable==="collapsible"),{rows:He=1}=Re,Oe=yr.useMemo(()=>Ie&&(Re.suffix!==void 0||Re.onEllipsis||Re.expandable||L||O),[Ie,Re,L,O]);sr(()=>{ye&&!Oe&&(me(Ax("webkitLineClamp")),he(Ax("textOverflow")))},[Oe,ye]);let[Me,Te]=yr.useState(Ie),Xe=yr.useMemo(()=>Oe?!1:He===1?le:ie,[Oe,He,ie,le]);sr(()=>{Te(Xe&&Ie)},[Xe,Ie]);let ot=Hde(Re.tooltip,q.text,h),Ye=Me&&!!ot.title,Ve=Ie&&(Me?Ye&&De:se),Ae=Ie&&He===1&&Me,Ne=Ie&&He>1&&Me,ht=(dt,St)=>{$e(St.expanded),Re.onExpand?.(dt,St)},[lt,Ke]=yr.useState(0),[je,nt]=Fh(!1),Nt=yr.useRef(!1),Pt=({offsetWidth:dt})=>{Ke(dt)},Jr=dt=>{ke(dt),se!==dt&&Re.onEllipsis?.(dt)},Xt=yr.useCallback(()=>{let dt=C.current;if(ye&&Ye&&dt){let St=Vde(dt);we(ze=>ze===St?ze:St)}},[ye,Ye]);yr.useEffect(()=>{Nt.current&&Xt()},[Xt,h,Ne,de,lt]),yr.useEffect(()=>{let dt=C.current;if(typeof IntersectionObserver>"u"||!dt||!Ye||!Ie)return;let St=new IntersectionObserver(()=>{be(!!dt.offsetParent)});return St.observe(dt),()=>{St.disconnect()}},[Ye,Ie]);let Tr=yr.useMemo(()=>{if(!(!ye||Me))return[q.text,h,E,ot.title].find(R7)},[ye,Me,E,ot.title,Ve,q.text]);if(W)return yr.createElement(Dde,{value:q.text??(typeof h=="string"?h:""),onSave:X,onCancel:Z,onEnd:q.onEnd,prefixCls:j,className:n,style:a,direction:N,component:y,maxLength:q.maxLength,autoSize:q.autoSize,enterIcon:q.enterIcon,classNames:M,styles:I});let tr=()=>{let{expandable:dt,symbol:St}=Re;return dt?yr.createElement("button",{type:"button",key:"expand",className:Y(`${j}-${Fe?"collapse":"expand"}`,M.action),style:I.action,onClick:ze=>ht(ze,{expanded:!Fe}),"aria-label":Fe?$.collapse:$?.expand},pr(St)?St(Fe):St):null},Tt=()=>{if(!L)return;let{icon:dt,tooltip:St,tabIndex:ze}=q,Je=Er(St)[0]||$?.edit,ut=typeof Je=="string"?Je:"";return P.includes("icon")?yr.createElement(Ma,{key:"edit",title:St===!1?"":Je},yr.createElement("button",{type:"button",ref:B,className:Y(`${j}-edit`,M.action),style:I.action,onClick:Q,"aria-label":ut,tabIndex:ze},dt||yr.createElement(F7,{role:"button"}))):null},cr=()=>O?yr.createElement(Kde,{key:"copy",...z,prefixCls:j,copied:J,locale:$,onCopy:ee,loading:te,iconOnly:!Lt(h),className:M.action,style:I.action}):null,$r=dt=>{let St=dt&&tr(),ze=Tt(),Je=cr();return!St&&!ze&&!Je?null:yr.createElement("span",{key:"operations",className:Y(`${j}-actions`,M.actions,{[`${j}-actions-start`]:K==="start"}),style:I.actions,onMouseEnter:()=>nt(!0,!0),onMouseLeave:()=>nt(!1,{ms:500})},St,ze,Je)},Wt=dt=>[dt&&!Fe&&yr.createElement("span",{"aria-hidden":!0,key:"ellipsis"},tpe),Re.suffix];return yr.createElement(Ba,{onResize:Pt,disabled:!Ie},dt=>yr.createElement(Zde,{tooltipProps:ot,enableEllipsis:Ie,isEllipsis:Ve,disabled:je},yr.createElement(cH,{onMouseEnter:St=>{Nt.current=!0,Xt(),F?.(St)},onMouseLeave:St=>{Nt.current=!1,S?.(St)},className:Y({[`${j}-${d}`]:d,[`${j}-disabled`]:p,[`${j}-ellipsis`]:ye,[`${j}-ellipsis-single-line`]:Ae,[`${j}-ellipsis-multiple-line`]:Ne,[`${j}-link`]:y==="a"},n),classNames:M,styles:I,prefixCls:j,style:{...a,WebkitLineClamp:Ne?He:void 0},component:y,ref:pn(dt,C,t),direction:N,onClick:P.includes("text")?Q:void 0,"aria-label":Tr?.toString(),title:E,...R},yr.createElement(Qde,{enableMeasure:Ie&&!Me,text:h,rows:He,width:lt,onEllipsis:Jr,expanded:Fe,measureDeps:[K],miscDeps:[J,Fe,te,L,O,K,$].concat(en(aH.map(St=>e[St])))},(St,ze)=>epe(e,yr.createElement(yr.Fragment,null,K==="start"?$r(ze):null,St.length>0&&ze&&!Fe&&Tr?yr.createElement("span",{key:"show-content","aria-hidden":!0},St):St,Wt(ze),K==="start"?null:$r(ze)))))))}),y2=rpe,npe=JL.forwardRef((e,t)=>{let{ellipsis:r,rel:n,children:a,navigate:o,...l}=e,u={...l,rel:n===void 0&&l.target==="_blank"?"noopener noreferrer":n};return JL.createElement(y2,{...u,ref:t,ellipsis:!!r,component:"a"},a)}),ape=npe,iH=A(_()),ipe=iH.forwardRef((e,t)=>{let{children:r,...n}=e;return iH.createElement(y2,{ref:t,...n,component:"div"},r)}),ope=ipe,P7=A(_()),spe=P7.forwardRef((e,t)=>{let{ellipsis:r,children:n,...a}=e,o=P7.useMemo(()=>Ct(r)?Vt(r,["expandable","rows"]):r,[r]);return P7.createElement(y2,{ref:t,...a,ellipsis:o,component:"span"},n)}),lpe=spe,oH=A(_()),upe=[1,2,3,4,5],cpe=oH.forwardRef((e,t)=>{let{level:r=1,children:n,...a}=e,o=upe.includes(r)?`h${r}`:"h1";return oH.createElement(y2,{ref:t,...a,component:o},n)}),dpe=cpe,Mb=Ude;Mb.Text=lpe;Mb.Link=ape;Mb.Title=dpe;Mb.Paragraph=ope;var Gt=Mb;var Tb=A(_(),1),jn=A(xe(),1);function O7({label:e,count:t,preview:r,icon:n,expanded:a,id:o,className:l,onClick:u,buttonRef:d}){return(0,jn.jsx)(Li,{ref:d,id:o,type:"default",className:`composer-work-trigger ${l??""}`,onClick:u,"aria-expanded":a,"aria-label":`${e}\uFF0C${t}`,title:r,children:(0,jn.jsxs)("span",{className:"composer-work-summary",children:[(0,jn.jsx)(Be,{name:n,size:16}),(0,jn.jsxs)("span",{className:"composer-work-label",children:[e,(0,jn.jsx)("span",{className:"composer-work-count",children:t})]}),(0,jn.jsx)("span",{className:"composer-work-preview",children:r}),(0,jn.jsx)("span",{className:"composer-work-chevron","data-open":a,children:(0,jn.jsx)(Be,{name:"chevronDown",size:12})})]})})}function z7({title:e,description:t,onClose:r,actions:n,children:a,footer:o,className:l}){return(0,jn.jsxs)("section",{className:`composer-work-panel ${l??""}`,children:[(0,jn.jsxs)("header",{className:"composer-work-header",children:[(0,jn.jsxs)("div",{children:[(0,jn.jsx)(Gt.Text,{strong:!0,children:e}),t&&(0,jn.jsx)("p",{children:t})]}),(0,jn.jsxs)("div",{className:"composer-work-header-actions",children:[n,(0,jn.jsx)(Li,{type:"text",size:"small","aria-label":`\u5173\u95ED${e}`,onClick:r,icon:(0,jn.jsx)(Be,{name:"close",size:16})})]})]}),(0,jn.jsx)("div",{className:"composer-work-scroll",tabIndex:0,"aria-label":`${e}\u5217\u8868`,children:a}),o&&(0,jn.jsx)("footer",{className:"composer-work-footer",children:o})]})}function L7({text:e,limit:t=60}){let[r,n]=Tb.useState(!1),[a,o]=Tb.useState(!1),l=Tb.useRef(null),u=Tb.useId();return Tb.useLayoutEffect(()=>{let d=l.current;if(!d)return;let p=()=>{r||o(d.scrollHeight>d.clientHeight+1)};p();let h=new ResizeObserver(p);return h.observe(d),()=>h.disconnect()},[e,r]),(0,jn.jsxs)("div",{children:[(0,jn.jsx)("p",{ref:l,id:u,className:"composer-work-text","data-full":r,children:e}),(e.length>t||a)&&(0,jn.jsx)(Li,{type:"link",size:"small",className:"composer-work-read-more","aria-expanded":r,"aria-controls":u,onClick:()=>n(!r),children:r?"\u6536\u8D77\u5168\u6587":"\u5C55\u5F00\u5168\u6587"})]})}var vl=class{constructor(e){ae(this,"equals",e),ae(this,"snapshot"),ae(this,"listeners",new Set),ae(this,"subscribe",t=>(this.listeners.add(t),()=>this.listeners.delete(t))),ae(this,"getSnapshot",()=>this.snapshot),this.snapshot=Object.freeze({revision:0,mounts:Object.freeze([])})}sync(e){let t=this.snapshot.mounts;if(!(t.length===e.length&&e.every((r,n)=>this.equals(t[n],r)))){this.snapshot=Object.freeze({revision:this.snapshot.revision+1,mounts:Object.freeze(e.slice())});for(let r of this.listeners)r()}}clear(){this.snapshot.mounts.length!==0&&this.sync([])}};var ppe=class extends vl{constructor(){super((e,t)=>e.target===t.target&&e.toggleTarget===t.toggleTarget&&e.sessionId===t.sessionId&&e.draft===t.draft&&e.open===t.open&&e.openRevision===t.openRevision),ae(this,"dismissed",null),ae(this,"expanded",null),ae(this,"opener","draft"),ae(this,"focusPending",!1),ae(this,"openRevision",0),ae(this,"panelFocus",null)}sync(e){this.expanded&&this.expanded!==e[0]?.sessionId&&(this.expanded=null);let t=this.getSnapshot().mounts[0];t?.sessionId!==e[0]?.sessionId&&(this.focusPending=!1,this.opener="draft"),e[0]?.open&&(!t?.open||t.sessionId!==e[0].sessionId)&&this.openRevision++,super.sync(e.map(r=>({...r,openRevision:this.openRevision})))}isDismissed(e,t){return this.dismissed?.sessionId===e&&this.dismissed.draft===t}isExpanded(e){return this.expanded===e}openedBy(){return this.opener}toggle(e){let t=this.getSnapshot().mounts[0];return!t||t.sessionId!==e?!1:t.open?(this.dismiss(),!1):(this.dismissed=null,this.expanded=e,this.opener="toggle",this.focusPending=!0,this.sync([{...t,open:!0}]),!0)}dismiss(){let e=this.getSnapshot().mounts[0];e&&(this.dismissed={sessionId:e.sessionId,draft:e.draft},this.expanded=null,this.focusPending=!1,this.sync([{...e,open:!1}]))}reopen(){this.dismissed=null,this.expanded=null,this.opener="draft";let e=this.getSnapshot().mounts[0];e&&this.sync([{...e,open:!0}])}hasPendingFocus(){return this.focusPending}clearPendingFocus(){this.focusPending=!1}registerFocus(e,t){let r={sessionId:e.sessionId,target:e.target,focus:t};return this.panelFocus=r,()=>{this.panelFocus===r&&(this.panelFocus=null)}}focusControl(e=!1){let t=this.getSnapshot().mounts[0];return t?.open&&this.panelFocus?.sessionId===t.sessionId&&this.panelFocus.target===t.target?this.panelFocus.focus(e):!1}},ia=new ppe;function w2(e){return/^wlt_[a-zA-Z0-9_-]{43}$/.test(e)}function H7(e){let t=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;t?t.call(e,""):e.value="",e.dispatchEvent(new Event("input",{bubbles:!0}))}var Go={viewport:108,inset:24,background:"#E3E8EE",paths:[{fill:"#6B7B8D",d:"M6,0h6v6h-6z M48,0h6v6h-6z M0,6h6v6h-6z M12,6h6v6h-6z M42,6h6v6h-6z M54,6h6v6h-6z M0,12h6v6h-6z M54,12h6v6h-6z M6,36h6v6h-6z M48,36h6v6h-6z M18,48h6v6h-6z M36,48h6v6h-6z"},{fill:"#9EAAB8",d:"M6,6h6v6h-6z M48,6h6v6h-6z M6,12h48v6h-48z M0,18h12v6h-12z M24,18h12v6h-12z M48,18h12v6h-12z M0,24h12v6h-12z M24,24h12v6h-12z M48,24h12v6h-12z M0,30h24v6h-24z M36,30h24v6h-24z M0,36h6v6h-6z M12,36h6v6h-6z M24,36h12v6h-12z M42,36h6v6h-6z M54,36h6v6h-6z M6,42h48v6h-48z M12,48h6v6h-6z M24,48h12v6h-12z M42,48h6v6h-6z M18,54h6v6h-6z M36,54h6v6h-6z"},{fill:"#FFFFFF",d:"M12,18h6v6h-6z M36,18h6v6h-6z M12,24h12v6h-12z M36,24h12v6h-12z"},{fill:"#7EC88B",d:"M18,18h6v6h-6z M42,18h6v6h-6z"},{fill:"#F28B9A",d:"M24,30h12v6h-12z"},{fill:"#C5CED8",d:"M18,36h6v6h-6z M36,36h6v6h-6z"}]};function dH(e="wand-brand-mark"){let t=e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),{viewport:r,inset:n,background:a,paths:o}=Go;return`<svg class="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${r} ${r}" aria-hidden="true" focusable="false" data-wand-brand="pixel-cat"><rect width="${r}" height="${r}" rx="24" fill="${a}"/><g transform="translate(${n} ${n})">`+o.map(({fill:l,d:u})=>`<path fill="${l}" d="${u}"/>`).join("")+"</g></svg>"}var q7="data:image/svg+xml,"+encodeURIComponent(dH());var i0=A(_(),1),pH=(0,i0.createContext)(null);function fpe(e){return{subscribe:t=>e.subscribe(t),getSnapshot:()=>e.getSnapshot()}}function W7({store:e,children:t}){return(0,i0.createElement)(pH.Provider,{value:e},t)}function fH(){let e=(0,i0.useContext)(pH);if(!e)throw new Error("useUiStore must be used inside UiStoreProvider");return e}function vi(){let e=fH(),t=(0,i0.useMemo)(()=>fpe(e),[e]);return(0,i0.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getSnapshot)}function Hi(){let e=fH();return(0,i0.useCallback)(t=>e.dispatch(t),[e])}function et(...e){return e.filter(Boolean).join(" ")}var mH=A(_(),1),_b=A(xe(),1);function hH(e){let t=e.trim();return t?(t=t.replace(/\/{2,}/g,"/"),t=t.replace(/\/+$/,""),t||"/"):""}function mpe(e){let t=hH(e);return t==="/"||!t?"/":t.slice(0,t.lastIndexOf("/"))||"/"}function U7({explorerRef:e,suspended:t=!1}={}){let r=vi(),n=Hi(),a=r.layout.filePanelOpen&&!t,[o,l]=mH.useState(null);return mH.useEffect(()=>{if(!a||o)return;let u=!0;return globalThis.__wandImportBrowserModule("5f0e00d267a0d1e3").then(d=>{u&&l(()=>d.ShellFilePanelDrawer)}),()=>{u=!1}},[a,o]),(0,_b.jsxs)(_b.Fragment,{children:[(0,_b.jsx)("div",{id:"file-panel-backdrop",className:et("file-panel-backdrop",r.layout.filePanelBackdropVisible&&"open"),"aria-hidden":"true",onClick:()=>{n({type:"layout.files.close"})},hidden:!0}),(0,_b.jsx)("div",{className:"file-explorer legacy-file-explorer-host",id:"file-explorer",ref:e,hidden:!0,"aria-hidden":"true"}),o?(0,_b.jsx)(o,{explorerRef:e,suspended:t}):null]})}var rf=globalThis.__wandBrowserRuntime??{configPath:"${wandConfigPath}",aiTeamsChunkSrc:"${aiTeamsChunkSrc}",plushAvatarChunkSrc:"${plushAvatarChunkSrc}"},x2="wand-decision-expert",E2="\u77F3\u4E00",hpe="Wand \u672C\u5730\u51B3\u7B56\u6A21\u578B \xB7 LAYA";var Iu=["claude","codex","opencode","grok","qoder","pi"],gpe=["claude","codex","opencode","grok","qoder","pi"],vpe=`^(?:${gpe.join("|")}):[a-z0-9][a-z0-9_-]{0,31}$`;function k2(e){return typeof e=="string"&&bpe.test(e)}var bpe=new RegExp(vpe),ype=new Set(Iu);function G7(e){return typeof e=="string"&&ype.has(e)}function C2(e){return e==="qoder"?"qodercli":e}var wpe={claude:"claude-cli-print",codex:"codex-cli-exec",opencode:"opencode-cli-run",grok:"grok-cli-headless",qoder:"qoder-cli-print",pi:"pi-cli-json"};function K7(e){return wpe[e]}var bl={claude:"Claude",codex:"Codex",opencode:"OpenCode",grok:"Grok",qoder:"Qoder",pi:"Pi"},jb="Wand Agent",xpe={anthropic:"claude",claude:"claude","claude-cli":"claude","claude-cli-print":"claude","claude-sdk":"claude",codex:"codex","codex-cli":"codex","codex-cli-exec":"codex",grok:"grok","grok-cli":"grok","grok-cli-headless":"grok","open-code":"opencode",open_code:"opencode",opencode:"opencode","opencode-cli-run":"opencode",qoder:"qoder","qoder-cli":"qoder","qoder-cli-print":"qoder",qodercli:"qoder",pi:"pi","pi-cli":"pi","pi-cli-json":"pi"};function Ko(e){if(typeof e!="string")return null;let t=e.trim().toLowerCase();return t?xpe[t]??null:null}var Epe=new Set(["npx","pnpx","bunx","yarn","pnpm","corepack"]),kpe=new Set(["dlx","exec","x"]);function V7(e){let t=e.match(/^(?:"([^"]+)"|'([^']+)'|(\S+))/);return(t?.[1]??t?.[2]??t?.[3]??"").split(/[\\/]/).pop()?.replace(/\.(?:cmd|exe)$/i,"")??""}function Cpe(e){if(typeof e!="string")return;let t=e.trim();if(!t)return;let r=t.match(/"[^"]*"|'[^']*'|\S+/g)??[],n=0;if(Epe.has(V7(r[0]??"").toLowerCase()))for(n=1;n<r.length;){let a=r[n];if(a.startsWith("-")){n+=1;continue}if(kpe.has(V7(a).toLowerCase())){n+=1;continue}break}return Ko(V7(r[n]??""))??void 0}function Nb(e){if(typeof e=="string"&&e.trim().toLowerCase()==="terminal")return"\u7EC8\u7AEF";let t=Ko(e);return t?bl[t]:typeof e=="string"&&e.trim()?e.trim():"AI"}var Mu=Cpe,o0="wand-agent",s0=[{id:"claude",provider:"claude",label:bl.claude,description:"Claude Code"},{id:"codex",provider:"codex",label:bl.codex,description:"OpenAI Codex CLI"},{id:"opencode",provider:"opencode",label:bl.opencode,description:"OpenCode CLI"},{id:"grok",provider:"grok",label:bl.grok,description:"Grok Build CLI"},{id:"qoder",provider:"qoder",label:bl.qoder,description:"Qoder CLI"},{id:"pi",provider:"pi",engine:"cli",label:bl.pi,description:"Pi CLI\uFF1A\u7ED3\u6784\u5316 JSON \u6216 PTY \u7EC8\u7AEF"},{id:o0,provider:"pi",engine:"sdk",label:jb,description:"Wand \u81EA\u5E26 Agent\uFF1A\u8FDB\u7A0B\u5185 SDK \u6267\u884C\uFF0C\u53EA\u652F\u6301\u7ED3\u6784\u5316\u4F1A\u8BDD"}];function nf(e){return e?s0.find(t=>t.id===e)??null:null}function X7(e,t){return e==="pi"&&t==="sdk"?o0:e}function Tu(e,t){return Ko(e)==="pi"&&(t==="sdk"||t==="core")?jb:Nb(e)}var S2="#D97757",F2="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z",$2="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z",Spe="M517.36 400H634.72V634.72H517.36Z",D2=[{fill:"#F09082",d:"M165.29 165.29H517.36V400H400V282.65H165.29Z"},{fill:"#4D9ABF",d:"M165.29 282.65H282.65V400H400V517.36H282.65V634.72H165.29Z"},{fill:"#F1BE58",d:Spe}],A2=["M13.2371 21.0407L24.3186 12.8506C24.8619 12.4491 25.6384 12.6057 25.8973 13.2294C27.2597 16.5185 26.651 20.4712 23.9403 23.1851C21.2297 25.8989 17.4581 26.4941 14.0108 25.1386L10.2449 26.8843C15.6463 30.5806 22.2053 29.6665 26.304 25.5601C29.5551 22.3051 30.562 17.8683 29.6205 13.8673L29.629 13.8758C28.2637 7.99809 29.9647 5.64871 33.449.844576C33.5314.730667 33.6139.616757 33.6964.5L29.1113 5.09055V5.07631L13.2343 21.0436Z","M10.9503 23.0313C7.07343 19.3235 7.74185 13.5853 11.0498 10.2763C13.4959 7.82722 17.5036 6.82767 21.0021 8.2971L24.7595 6.55998C24.0826 6.07017 23.215 5.54334 22.2195 5.17313C17.7198 3.31926 12.3326 4.24192 8.67479 7.90126C5.15635 11.4239 4.0499 16.8403 5.94992 21.4622C7.36924 24.9165 5.04257 27.3598 2.69884 29.826C1.86829 30.7002 1.0349 31.5745.36364 32.5L10.9474 23.0341Z"];function Fpe(e){let t=Ko(e),r=`class="${`wand-provider-logo wand-provider-logo-${t??"generic"}`}" aria-hidden="true" focusable="false" data-provider-logo="${t??"generic"}"`;return t==="opencode"?`<svg ${r} viewBox="0 0 512 512"><path d="M0 0H512V512H0Z" fill="#131010"/><path d="M320 224V352H192V224H320Z" fill="#5A5858"/><path d="M384 416H128V96H384V416ZM320 160H192V352H320V160Z" fill="#fff" fill-rule="evenodd"/></svg>`:t==="qoder"?`<svg ${r} viewBox="0 0 180 180"><rect width="180" height="180" rx="40" fill="#111113"/><path d="M78 31c18 0 35 6 49 18l8 7c-5-2-10-3-15-3-10 0-19 3-26 9-11 10-17 24-17 40v18c0 12 5 21 13 28l-45-24c-8-4-13-12-13-21V80c0-27 20-49 46-49Z" fill="#fff"/><path d="M126 53c13 4 22 15 22 29v54c0 8-8 13-15 9l-10-5c-6 5-14 8-23 8-14 0-26-7-34-17l-6-9c15-7 26-19 33-33 4-9 6-18 6-28v-8c8-3 18-3 27 0Z" fill="#2ADB5C"/></svg>`:t==="grok"?`<svg ${r} viewBox="0 0 34 33" fill="currentColor">${A2.map(n=>`<path d="${n}"/>`).join("")}</svg>`:t==="pi"?`<svg ${r} viewBox="0 0 800 800">${D2.map(({d:n,fill:a})=>`<path d="${n}" fill="${a}"/>`).join("")}</svg>`:t==="claude"?`<svg ${r} viewBox="0 0 24 24" fill="${S2}"><path d="${F2}"/></svg>`:t==="codex"?`<svg ${r} viewBox="0 0 24 24" fill="currentColor"><path d="${$2}"/></svg>`:`<svg ${r} viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1"/><circle cx="12" cy="12" r="3"/></svg>`}var q9e=A(_(),1),oa=A(xe(),1);function Xo({provider:e,className:t}){let r=Ko(e),n=et("wand-provider-logo",`wand-provider-logo-${r??"generic"}`,t);return r==="qoder"?(0,oa.jsxs)("svg",{className:n,viewBox:"0 0 180 180","aria-hidden":"true",focusable:"false","data-provider-logo":"qoder",children:[(0,oa.jsx)("rect",{width:"180",height:"180",rx:"40",fill:"#111113"}),(0,oa.jsx)("path",{d:"M78 31c18 0 35 6 49 18l8 7c-5-2-10-3-15-3-10 0-19 3-26 9-11 10-17 24-17 40v18c0 12 5 21 13 28l-45-24c-8-4-13-12-13-21V80c0-27 20-49 46-49Z",fill:"#fff"}),(0,oa.jsx)("path",{d:"M126 53c13 4 22 15 22 29v54c0 8-8 13-15 9l-10-5c-6 5-14 8-23 8-14 0-26-7-34-17l-6-9c15-7 26-19 33-33 4-9 6-18 6-28v-8c8-3 18-3 27 0Z",fill:"#2ADB5C"})]}):r==="opencode"?(0,oa.jsxs)("svg",{className:n,viewBox:"0 0 512 512","aria-hidden":"true",focusable:"false","data-provider-logo":"opencode",children:[(0,oa.jsx)("path",{d:"M0 0H512V512H0Z",fill:"#131010"}),(0,oa.jsx)("path",{d:"M320 224V352H192V224H320Z",fill:"#5A5858"}),(0,oa.jsx)("path",{d:"M384 416H128V96H384V416ZM320 160H192V352H320V160Z",fill:"#fff",fillRule:"evenodd"})]}):r==="grok"?(0,oa.jsx)("svg",{className:n,viewBox:"0 0 34 33",fill:"currentColor","aria-hidden":"true",focusable:"false","data-provider-logo":"grok",children:A2.map(a=>(0,oa.jsx)("path",{d:a},a))}):r==="pi"?(0,oa.jsx)("svg",{className:n,viewBox:"0 0 800 800",fill:"currentColor","aria-hidden":"true",focusable:"false","data-provider-logo":"pi",children:D2.map(({d:a,fill:o})=>(0,oa.jsx)("path",{d:a,fill:o},o))}):r==="claude"?(0,oa.jsx)("svg",{className:n,viewBox:"0 0 24 24",fill:S2,"aria-hidden":"true",focusable:"false","data-provider-logo":"claude",children:(0,oa.jsx)("path",{d:F2})}):r==="codex"?(0,oa.jsx)("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false","data-provider-logo":"codex",children:(0,oa.jsx)("path",{d:$2})}):(0,oa.jsxs)("svg",{className:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false","data-provider-logo":"generic",children:[(0,oa.jsx)("path",{d:"M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1"}),(0,oa.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}var $pe=A(_()),af=["xxxl","xxl","xl","lg","md","sm","xs"],Dpe=[].concat(af).reverse(),Ape=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`(min-width: ${e.screenXXXL}px)`}),Bpe=e=>{let t=e,r=[].concat(af).reverse();return r.forEach((n,a)=>{let o=n.toUpperCase(),l=`screen${o}Min`,u=`screen${o}`;if(!(t[l]<=t[u]))throw new Error(`${l}<=${u} fails : !(${t[l]}<=${t[u]})`);if(a<r.length-1){let d=`screen${o}Max`;if(!(t[u]<=t[d]))throw new Error(`${u}<=${d} fails : !(${t[u]}<=${t[d]})`);let p=`screen${r[a+1].toUpperCase()}Min`;if(!(t[d]<=t[p]))throw new Error(`${d}<=${p} fails : !(${t[d]}<=${t[p]})`)}}),e},Ipe=(e,t)=>{if(t){for(let r of af)if(e[r]&&t?.[r]!==void 0)return t[r]}},Mpe=()=>{let[,e]=Aa(),t=Ape(Bpe(e));return $pe.default.useMemo(()=>{let r=new Map,n=-1,a={};return{responsiveMap:t,matchHandlers:{},dispatch(o){return a=o,r.forEach(l=>{l(a)}),r.size>=1},subscribe(o){return r.size||this.register(),n+=1,r.set(n,o),o(a),n},unsubscribe(o){r.delete(o),r.size||this.unregister()},register(){Object.entries(t).forEach(([o,l])=>{let u=({matches:p})=>{this.dispatch({...a,[o]:p})},d=window.matchMedia(l);pr(d.addEventListener)&&d.addEventListener("change",u),this.matchHandlers[l]={mql:d,listener:u},u(d)})},unregister(){Object.values(t).forEach(o=>{let l=this.matchHandlers[o];pr(l?.mql.removeEventListener)&&l.mql.removeEventListener("change",l?.listener)}),r.clear()}}},[t])},Tpe=Mpe,_pe=A(_()),jpe=A(_()),gH=()=>jpe.default.useReducer(e=>e+1,0);function Npe(e=!0,t={}){let r=(0,_pe.useRef)(t),[,n]=gH(),a=Tpe();return sr(()=>{let o=a.subscribe(l=>{r.current=l,e&&n()});return()=>a.unsubscribe(o)},[e]),r.current}var Q7=Npe;var vH=A(_(),1);function xH(){let e=!1,t=0,r,n=()=>{r!==void 0&&clearTimeout(r),r=void 0};return{onCompositionStart(){n(),t+=1,e=!0},onCompositionEnd(){n(),e=!0;let a=t;r=setTimeout(()=>{t===a&&(e=!1,r=void 0)},0)},isComposing(){return e},shouldIgnore(a){return e||a.isComposing===!0||a.keyCode===229||a.nativeEvent?.isComposing===!0||a.nativeEvent?.keyCode===229},reset(){n(),t+=1,e=!1}}}function Pb(){let e=(0,vH.useRef)(null);return e.current||(e.current=xH()),(0,vH.useEffect)(()=>()=>e.current?.reset(),[]),e.current}var EH={};ws(EH,{hasOpenOwnedPopupSurface:()=>I2,hasOpenPopupSurface:()=>of,isWandPopupOwnedBy:()=>sf,popupOffset:()=>cd,popupPlacement:()=>ud,registerPopupDismiss:()=>CH,registerPopupOwner:()=>l0,usePopupDismiss:()=>$n});var bH=A(_(),1);function ud(e,t){return e==="top"||e==="bottom"?t==="center"?e:`${e}${t==="end"?"Right":"Left"}`:t==="center"?e:`${e}${t==="end"?"Bottom":"Top"}`}function cd(e,t){return e==="left"?[-t,0]:e==="right"?[t,0]:[0,e==="top"?-t:t]}var Ss=[],ld=xH();function kH(){for(let e=Ss.length-1;e>=0;e-=1)if(Ss[e]?.priority==="blocking")return Ss[e];return Ss.at(-1)}function of(){return Ss.length>0||Array.from(document.querySelectorAll("[role=dialog],[data-wand-dialog-surface],.ant-select-dropdown,.ant-dropdown,.ant-popover")).some(e=>e.getClientRects().length&&getComputedStyle(e).visibility!=="hidden")}function yH(e){if(!(e.key!=="Escape"||!Ss.length)){if(ld.shouldIgnore(e)){e.stopImmediatePropagation();return}e.preventDefault(),e.stopImmediatePropagation(),kH()?.dismiss()}}function wH(){kH()?.dismiss()}function CH(e,t="normal"){Ss.length||(document.addEventListener("compositionstart",ld.onCompositionStart,!0),document.addEventListener("compositionend",ld.onCompositionEnd,!0),document.addEventListener("focusout",ld.reset,!0),document.addEventListener("keydown",yH,!0),window.addEventListener("popstate",wH));let r={dismiss:e,priority:t};return Ss.push(r),()=>{let n=Ss.indexOf(r);n>=0&&Ss.splice(n,1),Ss.length||(document.removeEventListener("compositionstart",ld.onCompositionStart,!0),document.removeEventListener("compositionend",ld.onCompositionEnd,!0),document.removeEventListener("focusout",ld.reset,!0),document.removeEventListener("keydown",yH,!0),window.removeEventListener("popstate",wH),ld.reset())}}var B2=new Map;function l0(e,t){return!t||e===t?()=>{}:(B2.set(e,t),()=>{B2.get(e)===t&&B2.delete(e)})}function sf(e,t){let r=e instanceof Element?e.closest("[data-wand-popup-owner]")?.getAttribute("data-wand-popup-owner"):null,n=new Set;for(;r&&!n.has(r);){if(r===t)return!0;n.add(r),r=B2.get(r)??null}return!1}function I2(e){return!e.length||typeof document>"u"?!1:Array.from(document.querySelectorAll("[data-wand-popup-owner]")).some(t=>t.getClientRects().length>0&&getComputedStyle(t).visibility!=="hidden"&&e.some(r=>sf(t,r)))}function $n(e,t,r="normal"){let n=(0,bH.useRef)(t);n.current=t,(0,bH.useEffect)(()=>e?CH(()=>n.current(),r):void 0,[e,r])}var r3=or((e,t)=>{(function(r,n){typeof e=="object"&&typeof t<"u"?t.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=n()})(e,(function(){"use strict";var r=1e3,n=6e4,a=36e5,o="millisecond",l="second",u="minute",d="hour",p="day",h="week",v="month",g="quarter",b="year",x="date",y="Invalid Date",E=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,F=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(W){var U=["th","st","nd","rd"],P=W%100;return"["+W+(U[(P-20)%10]||U[P]||U[0])+"]"}},D=function(W,U,P){var H=String(W);return!H||H.length>=U?W:""+Array(U+1-H.length).join(P)+W},$={s:D,z:function(W){var U=-W.utcOffset(),P=Math.abs(U),H=Math.floor(P/60),V=P%60;return(U<=0?"+":"-")+D(H,2,"0")+":"+D(V,2,"0")},m:function W(U,P){if(U.date()<P.date())return-W(P,U);var H=12*(P.year()-U.year())+(P.month()-U.month()),V=U.clone().add(H,v),Q=P-V<0,X=U.clone().add(H+(Q?-1:1),v);return+(-(H+(P-V)/(Q?V-X:X-V))||0)},a:function(W){return W<0?Math.ceil(W)||0:Math.floor(W)},p:function(W){return{M:v,y:b,w:h,d:p,D:x,h:d,m:u,s:l,ms:o,Q:g}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},C="en",B={};B[C]=S;var M="$isDayjsObject",I=function(W){return W instanceof L||!(!W||!W[M])},j=function W(U,P,H){var V;if(!U)return C;if(typeof U=="string"){var Q=U.toLowerCase();B[Q]&&(V=Q),P&&(B[Q]=P,V=Q);var X=U.split("-");if(!V&&X.length>1)return W(X[0])}else{var Z=U.name;B[Z]=U,V=Z}return!H&&V&&(C=V),V||!H&&C},N=function(W,U){if(I(W))return W.clone();var P=typeof U=="object"?U:{};return P.date=W,P.args=arguments,new L(P)},R=$;R.l=j,R.i=I,R.w=function(W,U){return N(W,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var L=(function(){function W(P){this.$L=j(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[M]=!0}var U=W.prototype;return U.parse=function(P){this.$d=(function(H){var V=H.date,Q=H.utc;if(V===null)return new Date(NaN);if(R.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var X=V.match(E);if(X){var Z=X[2]-1||0,O=(X[7]||"0").substring(0,3);return Q?new Date(Date.UTC(X[1],Z,X[3]||1,X[4]||0,X[5]||0,X[6]||0,O)):new Date(X[1],Z,X[3]||1,X[4]||0,X[5]||0,X[6]||0,O)}}return new Date(V)})(P),this.init()},U.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},U.$utils=function(){return R},U.isValid=function(){return this.$d.toString()!==y},U.isSame=function(P,H){var V=N(P);return this.startOf(H)<=V&&V<=this.endOf(H)},U.isAfter=function(P,H){return N(P)<this.startOf(H)},U.isBefore=function(P,H){return this.endOf(H)<N(P)},U.$g=function(P,H,V){return R.u(P)?this[H]:this.set(V,P)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(P,H){var V=this,Q=!!R.u(H)||H,X=R.p(P),Z=function(me,le){var he=R.w(V.$u?Date.UTC(V.$y,le,me):new Date(V.$y,le,me),V);return Q?he:he.endOf(p)},O=function(me,le){return R.w(V.toDate()[me].apply(V.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(le)),V)},z=this.$W,K=this.$M,J=this.$D,te="set"+(this.$u?"UTC":"");switch(X){case b:return Q?Z(1,0):Z(31,11);case v:return Q?Z(1,K):Z(0,K+1);case h:var ee=this.$locale().weekStart||0,ie=(z<ee?z+7:z)-ee;return Z(Q?J-ie:J+(6-ie),K);case p:case x:return O(te+"Hours",0);case d:return O(te+"Minutes",1);case u:return O(te+"Seconds",2);case l:return O(te+"Milliseconds",3);default:return this.clone()}},U.endOf=function(P){return this.startOf(P,!1)},U.$set=function(P,H){var V,Q=R.p(P),X="set"+(this.$u?"UTC":""),Z=(V={},V[p]=X+"Date",V[x]=X+"Date",V[v]=X+"Month",V[b]=X+"FullYear",V[d]=X+"Hours",V[u]=X+"Minutes",V[l]=X+"Seconds",V[o]=X+"Milliseconds",V)[Q],O=Q===p?this.$D+(H-this.$W):H;if(Q===v||Q===b){var z=this.clone().set(x,1);z.$d[Z](O),z.init(),this.$d=z.set(x,Math.min(this.$D,z.daysInMonth())).$d}else Z&&this.$d[Z](O);return this.init(),this},U.set=function(P,H){return this.clone().$set(P,H)},U.get=function(P){return this[R.p(P)]()},U.add=function(P,H){var V,Q=this;P=Number(P);var X=R.p(H),Z=function(K){var J=N(Q);return R.w(J.date(J.date()+Math.round(K*P)),Q)};if(X===v)return this.set(v,this.$M+P);if(X===b)return this.set(b,this.$y+P);if(X===p)return Z(1);if(X===h)return Z(7);var O=(V={},V[u]=n,V[d]=a,V[l]=r,V)[X]||1,z=this.$d.getTime()+P*O;return R.w(z,this)},U.subtract=function(P,H){return this.add(-1*P,H)},U.format=function(P){var H=this,V=this.$locale();if(!this.isValid())return V.invalidDate||y;var Q=P||"YYYY-MM-DDTHH:mm:ssZ",X=R.z(this),Z=this.$H,O=this.$m,z=this.$M,K=V.weekdays,J=V.months,te=V.meridiem,ee=function(le,he,se,ke){return le&&(le[he]||le(H,Q))||se[he].slice(0,ke)},ie=function(le){return R.s(Z%12||12,le,"0")},me=te||function(le,he,se){var ke=le<12?"AM":"PM";return se?ke.toLowerCase():ke};return Q.replace(F,(function(le,he){return he||(function(se){switch(se){case"YY":return String(H.$y).slice(-2);case"YYYY":return R.s(H.$y,4,"0");case"M":return z+1;case"MM":return R.s(z+1,2,"0");case"MMM":return ee(V.monthsShort,z,J,3);case"MMMM":return ee(J,z);case"D":return H.$D;case"DD":return R.s(H.$D,2,"0");case"d":return String(H.$W);case"dd":return ee(V.weekdaysMin,H.$W,K,2);case"ddd":return ee(V.weekdaysShort,H.$W,K,3);case"dddd":return K[H.$W];case"H":return String(Z);case"HH":return R.s(Z,2,"0");case"h":return ie(1);case"hh":return ie(2);case"a":return me(Z,O,!0);case"A":return me(Z,O,!1);case"m":return String(O);case"mm":return R.s(O,2,"0");case"s":return String(H.$s);case"ss":return R.s(H.$s,2,"0");case"SSS":return R.s(H.$ms,3,"0");case"Z":return X}return null})(le)||X.replace(":","")}))},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(P,H,V){var Q,X=this,Z=R.p(H),O=N(P),z=(O.utcOffset()-this.utcOffset())*n,K=this-O,J=function(){return R.m(X,O)};switch(Z){case b:Q=J()/12;break;case v:Q=J();break;case g:Q=J()/3;break;case h:Q=(K-z)/6048e5;break;case p:Q=(K-z)/864e5;break;case d:Q=K/a;break;case u:Q=K/n;break;case l:Q=K/r;break;default:Q=K}return V?Q:R.a(Q)},U.daysInMonth=function(){return this.endOf(v).$D},U.$locale=function(){return B[this.$L]},U.locale=function(P,H){if(!P)return this.$L;var V=this.clone(),Q=j(P,H,!0);return Q&&(V.$L=Q),V},U.clone=function(){return R.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},W})(),q=L.prototype;return N.prototype=q,[["$ms",o],["$s",l],["$m",u],["$H",d],["$W",p],["$M",v],["$y",b],["$D",x]].forEach((function(W){q[W[1]]=function(U){return this.$g(U,W[0],W[1])}})),N.extend=function(W,U){return W.$i||(W(U,L,N),W.$i=!0),N},N.locale=j,N.isDayjs=I,N.unix=function(W){return N(1e3*W)},N.en=B[C],N.Ls=B,N.p={},N}))}),Ppe=or(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.call=u,e.default=void 0,e.note=o,e.noteOnce=p,e.preMessage=void 0,e.resetWarned=l,e.warning=a,e.warningOnce=d;var t={},r=[],n=v=>{r.push(v)};e.preMessage=n;function a(v,g){}function o(v,g){}function l(){t={}}function u(v,g,b){!g&&!t[b]&&(v(!1,b),t[b]=!0)}function d(v,g){u(a,v,g)}function p(v,g){u(o,v,g)}d.preMessage=n,d.resetWarned=l,d.noteOnce=p;var h=e.default=d}),c0=or((e,t)=>{function r(n){return n&&n.__esModule?n:{default:n}}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}),Rpe=or(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},r=e.default=t}),DH=or(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.commonLocale=void 0;var t=e.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}}),Ope=or(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=DH(),r={...t.commonLocale,locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Last year",nextYear:"Next year",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},n=e.default=r}),AH=or(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},r=e.default=t}),BH=or(e=>{"use strict";var t=c0().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(Ope()),n=t(AH()),a={lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],...r.default},timePickerLocale:{...n.default}},o=e.default=a}),zpe=or(e=>{"use strict";var t=c0().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(BH()),n=e.default=r.default}),Lpe=or(e=>{"use strict";var t=c0().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(Rpe()),n=t(zpe()),a=t(BH()),o=t(AH()),l="${label} is not a valid ${type}",u={locale:"en",Pagination:r.default,DatePicker:a.default,TimePicker:o.default,Calendar:n.default,global:{placeholder:"Please select",close:"Close",sortable:"sortable",show:"Show",hide:"Hide"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Carousel:{prevSlide:"Previous slide",nextSlide:"Next slide"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:l,method:l,array:l,object:l,number:l,date:l,boolean:l,integer:l,float:l,regexp:l,email:l,url:l,hex:l},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}},d=e.default=u}),Hpe=or((e,t)=>{t.exports=Lpe()}),qpe=or(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"},r=e.default=t}),Wpe=or(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=DH(),r={...t.commonLocale,locale:"zh_CN",today:"\u4ECA\u5929",now:"\u6B64\u523B",backToToday:"\u8FD4\u56DE\u4ECA\u5929",ok:"\u786E\u5B9A",timeSelect:"\u9009\u62E9\u65F6\u95F4",dateSelect:"\u9009\u62E9\u65E5\u671F",weekSelect:"\u9009\u62E9\u5468",clear:"\u6E05\u9664",week:"\u5468",month:"\u6708",year:"\u5E74",previousMonth:"\u4E0A\u4E2A\u6708",nextMonth:"\u4E0B\u4E2A\u6708",monthSelect:"\u9009\u62E9\u6708\u4EFD",yearSelect:"\u9009\u62E9\u5E74\u4EFD",decadeSelect:"\u9009\u62E9\u5E74\u4EE3",previousYear:"\u4E0A\u4E00\u5E74",nextYear:"\u4E0B\u4E00\u5E74",previousDecade:"\u4E0A\u4E00\u5E74\u4EE3",nextDecade:"\u4E0B\u4E00\u5E74\u4EE3",previousCentury:"\u4E0A\u4E00\u4E16\u7EAA",nextCentury:"\u4E0B\u4E00\u4E16\u7EAA",yearFormat:"YYYY\u5E74",cellDateFormat:"D",monthBeforeYear:!1},n=e.default=r}),IH=or(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4",rangePlaceholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]},r=e.default=t}),MH=or(e=>{"use strict";var t=c0().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(Wpe()),n=t(IH()),a={lang:{placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",yearPlaceholder:"\u8BF7\u9009\u62E9\u5E74\u4EFD",quarterPlaceholder:"\u8BF7\u9009\u62E9\u5B63\u5EA6",monthPlaceholder:"\u8BF7\u9009\u62E9\u6708\u4EFD",weekPlaceholder:"\u8BF7\u9009\u62E9\u5468",rangePlaceholder:["\u5F00\u59CB\u65E5\u671F","\u7ED3\u675F\u65E5\u671F"],rangeYearPlaceholder:["\u5F00\u59CB\u5E74\u4EFD","\u7ED3\u675F\u5E74\u4EFD"],rangeMonthPlaceholder:["\u5F00\u59CB\u6708\u4EFD","\u7ED3\u675F\u6708\u4EFD"],rangeQuarterPlaceholder:["\u5F00\u59CB\u5B63\u5EA6","\u7ED3\u675F\u5B63\u5EA6"],rangeWeekPlaceholder:["\u5F00\u59CB\u5468","\u7ED3\u675F\u5468"],...r.default},timePickerLocale:{...n.default}};a.lang.ok="\u786E\u5B9A";var o=e.default=a}),Upe=or(e=>{"use strict";var t=c0().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(MH()),n=e.default=r.default}),Vpe=or(e=>{"use strict";var t=c0().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(qpe()),n=t(Upe()),a=t(MH()),o=t(IH()),l="${label}\u4E0D\u662F\u4E00\u4E2A\u6709\u6548\u7684${type}",u={locale:"zh-cn",Pagination:r.default,DatePicker:a.default,TimePicker:o.default,Calendar:n.default,global:{placeholder:"\u8BF7\u9009\u62E9",close:"\u5173\u95ED",sortable:"\u53EF\u6392\u5E8F",show:"\u663E\u793A",hide:"\u9690\u85CF"},Table:{filterTitle:"\u7B5B\u9009",filterConfirm:"\u786E\u5B9A",filterReset:"\u91CD\u7F6E",filterEmptyText:"\u65E0\u7B5B\u9009\u9879",filterCheckAll:"\u5168\u9009",filterSearchPlaceholder:"\u5728\u7B5B\u9009\u9879\u4E2D\u641C\u7D22",emptyText:"\u6682\u65E0\u6570\u636E",selectAll:"\u5168\u9009\u5F53\u9875",selectInvert:"\u53CD\u9009\u5F53\u9875",selectNone:"\u6E05\u7A7A\u6240\u6709",selectionAll:"\u5168\u9009\u6240\u6709",sortTitle:"\u6392\u5E8F",expand:"\u5C55\u5F00\u884C",collapse:"\u5173\u95ED\u884C",triggerDesc:"\u70B9\u51FB\u964D\u5E8F",triggerAsc:"\u70B9\u51FB\u5347\u5E8F",cancelSort:"\u53D6\u6D88\u6392\u5E8F"},Modal:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",justOkText:"\u77E5\u9053\u4E86"},Tour:{Next:"\u4E0B\u4E00\u6B65",Previous:"\u4E0A\u4E00\u6B65",Finish:"\u7ED3\u675F\u5BFC\u89C8"},Popconfirm:{cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A"},Transfer:{titles:["",""],searchPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",itemUnit:"\u9879",itemsUnit:"\u9879",remove:"\u5220\u9664",selectCurrent:"\u5168\u9009\u5F53\u9875",removeCurrent:"\u5220\u9664\u5F53\u9875",selectAll:"\u5168\u9009\u6240\u6709",deselectAll:"\u53D6\u6D88\u5168\u9009",removeAll:"\u5220\u9664\u5168\u90E8",selectInvert:"\u53CD\u9009\u5F53\u9875"},Upload:{uploading:"\u6587\u4EF6\u4E0A\u4F20\u4E2D",removeFile:"\u5220\u9664\u6587\u4EF6",uploadError:"\u4E0A\u4F20\u9519\u8BEF",previewFile:"\u9884\u89C8\u6587\u4EF6",downloadFile:"\u4E0B\u8F7D\u6587\u4EF6"},Empty:{description:"\u6682\u65E0\u6570\u636E"},Icon:{icon:"\u56FE\u6807"},Text:{edit:"\u7F16\u8F91",copy:"\u590D\u5236",copied:"\u590D\u5236\u6210\u529F",expand:"\u5C55\u5F00",collapse:"\u6536\u8D77"},Carousel:{prevSlide:"\u4E0A\u4E00\u5F20\u5E7B\u706F\u7247",nextSlide:"\u4E0B\u4E00\u5F20\u5E7B\u706F\u7247"},Form:{optional:"\uFF08\u53EF\u9009\uFF09",defaultValidateMessages:{default:"\u5B57\u6BB5\u9A8C\u8BC1\u9519\u8BEF${label}",required:"\u8BF7\u8F93\u5165${label}",enum:"${label}\u5FC5\u987B\u662F\u5176\u4E2D\u4E00\u4E2A[${enum}]",whitespace:"${label}\u4E0D\u80FD\u4E3A\u7A7A\u5B57\u7B26",date:{format:"${label}\u65E5\u671F\u683C\u5F0F\u65E0\u6548",parse:"${label}\u4E0D\u80FD\u8F6C\u6362\u4E3A\u65E5\u671F",invalid:"${label}\u662F\u4E00\u4E2A\u65E0\u6548\u65E5\u671F"},types:{string:l,method:l,array:l,object:l,number:l,date:l,boolean:l,integer:l,float:l,regexp:l,email:l,url:l,hex:l},string:{len:"${label}\u987B\u4E3A${len}\u4E2A\u5B57\u7B26",min:"${label}\u6700\u5C11${min}\u4E2A\u5B57\u7B26",max:"${label}\u6700\u591A${max}\u4E2A\u5B57\u7B26",range:"${label}\u987B\u5728${min}-${max}\u5B57\u7B26\u4E4B\u95F4"},number:{len:"${label}\u5FC5\u987B\u7B49\u4E8E${len}",min:"${label}\u6700\u5C0F\u503C\u4E3A${min}",max:"${label}\u6700\u5927\u503C\u4E3A${max}",range:"${label}\u987B\u5728${min}-${max}\u4E4B\u95F4"},array:{len:"\u987B\u4E3A${len}\u4E2A${label}",min:"\u6700\u5C11${min}\u4E2A${label}",max:"\u6700\u591A${max}\u4E2A${label}",range:"${label}\u6570\u91CF\u987B\u5728${min}-${max}\u4E4B\u95F4"},pattern:{mismatch:"${label}\u4E0E\u6A21\u5F0F\u4E0D\u5339\u914D${pattern}"}}},QRCode:{expired:"\u4E8C\u7EF4\u7801\u8FC7\u671F",refresh:"\u70B9\u51FB\u5237\u65B0",scanned:"\u5DF2\u626B\u63CF"},ColorPicker:{presetEmpty:"\u6682\u65E0",transparent:"\u65E0\u8272",singleColor:"\u5355\u8272",gradientColor:"\u6E10\u53D8\u8272"}},d=e.default=u}),Gpe=or((e,t)=>{t.exports=Vpe()}),Kpe=or((e,t)=>{(function(r,n){typeof e=="object"&&typeof t<"u"?t.exports=n(r3()):typeof define=="function"&&define.amd?define(["dayjs"],n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_locale_zh_cn=n(r.dayjs)})(e,(function(r){"use strict";function n(l){return l&&typeof l=="object"&&"default"in l?l:{default:l}}var a=n(r),o={name:"zh-cn",weekdays:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),weekdaysShort:"\u5468\u65E5_\u5468\u4E00_\u5468\u4E8C_\u5468\u4E09_\u5468\u56DB_\u5468\u4E94_\u5468\u516D".split("_"),weekdaysMin:"\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),ordinal:function(l,u){return u==="W"?l+"\u5468":l+"\u65E5"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5Ah\u70B9mm\u5206",LLLL:"YYYY\u5E74M\u6708D\u65E5ddddAh\u70B9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm"},relativeTime:{future:"%s\u5185",past:"%s\u524D",s:"\u51E0\u79D2",m:"1 \u5206\u949F",mm:"%d \u5206\u949F",h:"1 \u5C0F\u65F6",hh:"%d \u5C0F\u65F6",d:"1 \u5929",dd:"%d \u5929",M:"1 \u4E2A\u6708",MM:"%d \u4E2A\u6708",y:"1 \u5E74",yy:"%d \u5E74"},meridiem:function(l,u){var d=100*l+u;return d<600?"\u51CC\u6668":d<900?"\u65E9\u4E0A":d<1100?"\u4E0A\u5348":d<1300?"\u4E2D\u5348":d<1800?"\u4E0B\u5348":"\u665A\u4E0A"}};return a.default.locale(o,null,!0),o}))}),TH={};ws(TH,{MOTION_DWELL_FAILED_MS:()=>p0,MOTION_DWELL_RESULT_SENTENCE_MS:()=>_H,MOTION_DWELL_SENT_MS:()=>d0,MOTION_PROCESSING_STAGGER_MS:()=>jH,readMotionTokenMs:()=>NH,useReducedMotion:()=>Za});var SH=A(_(),1),d0=720,p0=1500,_H=1200,jH=150;function NH(e){if(typeof document>"u")return 0;let t=getComputedStyle(document.documentElement).getPropertyValue(e).trim(),r=Number.parseFloat(t);return Number.isFinite(r)?r*(t.endsWith("ms")?1:1e3):0}function Za(){let e=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,[t,r]=SH.useState(e);return SH.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let n=window.matchMedia("(prefers-reduced-motion: reduce)"),a=()=>r(n.matches);return n.addEventListener("change",a),a(),()=>n.removeEventListener("change",a)},[]),t}var PH={};ws(PH,{PopupOwnerProvider:()=>_2,PortalContainerProvider:()=>dd,REACT_UI_PORTALS_ID:()=>cf,documentPortalContainer:()=>Ob,useParentPopupOwner:()=>f0,usePortalContainer:()=>Kn});var T2=A(_(),1),RH=A(xe(),1),cf="wand-react-ui-portals",OH=(0,T2.createContext)(null),zH=(0,T2.createContext)(null);function _2({owner:e,children:t}){return(0,RH.jsx)(zH.Provider,{value:e,children:t})}function f0(){return(0,T2.useContext)(zH)}function dd({container:e,children:t}){return(0,RH.jsx)(OH.Provider,{value:e,children:t})}function Ob(){if(!(typeof document>"u"))return document.getElementById(cf)??void 0}function Kn(){return(0,T2.useContext)(OH)??Ob()}var LH={};ws(LH,{WandUiBoundary:()=>Bt,WandUiMeasurementProvider:()=>Lb,WandUiProvider:()=>Xn,getWandTerminalTheme:()=>fd,getWandTheme:()=>zb,installWandThemeTokens:()=>t3,wandTheme:()=>pd});var u0=A(_(),1),lf=A(_()),FH=A(_()),rBe=A(Ppe()),nBe=A(_());function Xpe(){}var Qpe=Xpe,Ype=Qpe,Jpe=A(_()),Zpe=(0,Jpe.createContext)(void 0),HH=Zpe,efe=A(Hpe()),Y7=A(_()),tfe={locale:"en",Conversations:{create:"New chat"},Sender:{stopLoading:"Stop loading",speechRecording:"Speech recording"},Actions:{feedbackLike:"Like",feedbackDislike:"Dislike",audio:"Play audio",audioRunning:"Audio playing",audioError:"Playback error",audioLoading:"Loading audio"},Bubble:{editableOk:"OK",editableCancel:"Cancel"},Mermaid:{zoomIn:"Zoom in",zoomOut:"Zoom out",zoomReset:"Reset",download:"Download",code:"Code",image:"Image"},Folder:{selectFile:"Please select a file",loadError:"Failed to load file",noService:"File content service not configured",loadFailed:"Failed to load file"}},J7=tfe,rfe=(e,t)=>{let r=Y7.useContext(HH),n=Y7.useMemo(()=>{let o=t||J7?.[e]||efe.default?.[e],l=r?.[e]??{};return{...typeof o=="function"?o():o,...l||{}}},[e,t,r]),a=Y7.useMemo(()=>{let o=r?.locale;return r?.exist&&!o?J7.locale:o},[r]);return[n,a]},nfe=rfe,afe="internalMark",ife=e=>{let{locale:t={},children:r,_ANT_MARK__:n}=e,a=FH.useMemo(()=>({...t,exist:!0}),[t]);return FH.createElement(HH.Provider,{value:a},r)},ofe=ife,sfe=A(_()),lfe=sfe.default.createContext({}),qH=lfe,ufe=A(_()),cfe="ant";function dfe(){let{getPrefixCls:e,direction:t,csp:r,iconPrefixCls:n,theme:a}=ufe.default.useContext(ad.ConfigContext);return{theme:a,getPrefixCls:e,direction:t,csp:r,iconPrefixCls:n}}var pfe=dfe,ffe=e=>{let{actions:t,attachments:r,bubble:n,conversations:a,prompts:o,sender:l,suggestion:u,thoughtChain:d,welcome:p,fileCard:h,think:v,theme:g,locale:b,children:x,mermaid:y,codeHighlighter:E,iconPrefixCls:F,...S}=e,D=lf.default.useMemo(()=>({actions:t,attachments:r,bubble:n,conversations:a,prompts:o,sender:l,suggestion:u,thoughtChain:d,fileCard:h,think:v,mermaid:y,codeHighlighter:E,welcome:p}),[t,r,n,a,o,l,u,d,p,y,v,h,E]),$=x;b&&($=lf.default.createElement(ofe,{locale:b,_ANT_MARK__:afe},$));let{layer:C}=lf.default.useContext(rd),B=lf.default.useMemo(()=>({prefixCls:F,csp:S.csp,layer:C?"antdx":void 0}),[F,S.csp,C]);return(F||S.csp)&&($=lf.default.createElement(Sh.Provider,{value:B},$)),lf.default.createElement(qH.Provider,{value:D},lf.default.createElement(ad,_n({},S,{theme:g,locale:b}),$))},mfe=ffe;function hfe(){let e=mfe,t=typeof e=="function"?e:e?.default;if(typeof t!="function")throw new Error("@ant-design/x/es/x-provider \u672A\u5BFC\u51FA XProvider \u7EC4\u4EF6");return t}var WH=hfe(),UH=A(Gpe(),1),gfe={locale:"zh-cn",Conversations:{create:"\u65B0\u5BF9\u8BDD"},Sender:{stopLoading:"\u505C\u6B62\u8BF7\u6C42",speechRecording:"\u6B63\u5728\u5F55\u97F3"},Actions:{feedbackLike:"\u559C\u6B22",feedbackDislike:"\u4E0D\u559C\u6B22",audio:"\u64AD\u653E\u8BED\u97F3",audioRunning:"\u8BED\u97F3\u64AD\u653E\u4E2D",audioError:"\u64AD\u653E\u51FA\u9519\u4E86",audioLoading:"\u6B63\u5728\u52A0\u8F7D\u8BED\u97F3"},Bubble:{editableOk:"\u786E\u8BA4",editableCancel:"\u53D6\u6D88"},Mermaid:{zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",zoomReset:"\u91CD\u7F6E",download:"\u4E0B\u8F7D",code:"\u4EE3\u7801",image:"\u56FE\u7247"},Folder:{selectFile:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u6587\u4EF6",loadError:"\u6587\u4EF6\u52A0\u8F7D\u5931\u8D25",noService:"\u672A\u914D\u7F6E\u6587\u4EF6\u5185\u5BB9\u670D\u52A1",loadFailed:"\u52A0\u8F7D\u6587\u4EF6\u5931\u8D25"}},VH=gfe,vfe=A(r3(),1),aBe=A(Kpe(),1),bfe=e=>{let t=e?.algorithm?Eh(e.algorithm):ob,r={...Jc,...e?.token};return _x(r,{override:e?.token},t,Lx)},yfe=bfe;function wfe(e){let{sizeUnit:t,sizeStep:r}=e,n=r-2;return{sizeXXL:t*(n+10),sizeXL:t*(n+6),sizeLG:t*(n+2),sizeMD:t*(n+2),sizeMS:t*(n+1),size:t*n,sizeSM:t*n,sizeXS:t*(n-1),sizeXXS:t*(n-1)}}var xfe=(e,t)=>{let r=t??Mh(e),n=r.fontSizeSM,a=r.controlHeight-4;return{...r,...wfe(t??e),...zx(n),controlHeight:a,...Ox({...r,controlHeight:a})}},Efe=xfe,Qo=(e,t)=>new Ar(e).setA(t).toRgbString(),uf=(e,t)=>new Ar(e).lighten(t).toHexString(),$H=e=>{let t=Bh(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},kfe=(e,t,r)=>{let n=e||"#000",a=t||"#fff";return{colorBgBase:n,colorTextBase:a,colorShadow:r||"rgba(255, 255, 255, 0.2)",colorText:Qo(a,.85),colorTextSecondary:Qo(a,.65),colorTextTertiary:Qo(a,.45),colorTextQuaternary:Qo(a,.25),colorFill:Qo(a,.18),colorFillSecondary:Qo(a,.12),colorFillTertiary:Qo(a,.08),colorFillQuaternary:Qo(a,.04),colorBgSolid:Qo(a,.95),colorBgSolidHover:Qo(a,1),colorBgSolidActive:Qo(a,.9),colorBgElevated:uf(n,12),colorBgContainer:uf(n,8),colorBgLayout:uf(n,0),colorBgSpotlight:uf(n,26),colorBgBlur:Qo(a,.04),colorBorder:uf(n,26),colorBorderDisabled:uf(n,26),colorBorderSecondary:uf(n,19)}},Cfe=(e,t)=>{let r=Object.keys(ib).map(l=>{let u=Bh(e[l],{theme:"dark"});return Array.from({length:10},()=>1).reduce((d,p,h)=>(d[`${l}-${h+1}`]=u[h],d[`${l}${h+1}`]=u[h],d),{})}).reduce((l,u)=>(l={...l,...u},l),{}),n=t??Mh(e),a=Rx(e,{generateColorPalettes:$H,generateNeutralColorPalettes:kfe}),o=hi.reduce((l,u)=>{let d=e[u];if(d){let p=$H(d);l[`${u}Hover`]=p[7],l[`${u}Active`]=p[5]}return l},{});return{...n,...r,...a,...o,colorPrimaryBg:a.colorPrimaryBorder,colorPrimaryBgHover:a.colorPrimaryBorderHover}},Sfe=Cfe;function Ffe(){let[e,t,r,n]=Aa();return{theme:e,token:t,hashId:r,cssVar:n}}var $fe={defaultSeed:Op.token,useToken:Ffe,defaultAlgorithm:Mh,darkAlgorithm:Sfe,compactAlgorithm:Efe,getDesignToken:yfe,defaultConfig:Op,_internalContext:sb},n3=$fe,a3="wand-theme",M2=[{id:"warm",name:"\u6696\u767D\u94DC\u8272",dark:!1,primary:"#b8562f",primaryHover:"#9e4b29",primaryActive:"#873e23",link:"#9e4b29",focus:"#b8562f",text:"#29241f",secondary:"#6b5e54",background:"#faf8f5",surface:"#fffdfa",sidebar:"#f4f0e9",selected:"#ebe0d3",hover:"#ece6dd",border:"#ebe5dd",terminal:"#17120f",terminalText:"#f4eee6",terminalCursor:"#d88d60"},{id:"blue",name:"\u77F3\u58A8\u84DD",dark:!1,primary:"#395f87",primaryHover:"#2e4f73",primaryActive:"#24415f",link:"#395f87",focus:"#395f87",text:"#252d36",secondary:"#546477",background:"#f6f8fa",surface:"#fcfdff",sidebar:"#edf1f6",selected:"#dee7f1",hover:"#e6ecf3",border:"#dfe6ee",terminal:"#141b24",terminalText:"#e5edf7",terminalCursor:"#93b9e6"},{id:"forest",name:"\u68EE\u6797\u7EFF",dark:!1,primary:"#3c6750",primaryHover:"#2f5441",primaryActive:"#254534",link:"#3c6750",focus:"#3c6750",text:"#253029",secondary:"#526759",background:"#f7f9f6",surface:"#fcfdfa",sidebar:"#edf2eb",selected:"#dfe9dd",hover:"#e7eee4",border:"#dfe7dc",terminal:"#142019",terminalText:"#e7f0e5",terminalCursor:"#a0cba4"},{id:"mauve",name:"\u96FE\u7D2B",dark:!1,primary:"#735583",primaryHover:"#604570",primaryActive:"#50395e",link:"#735583",focus:"#735583",text:"#302934",secondary:"#675b6d",background:"#f9f7fa",surface:"#fefcfe",sidebar:"#f1edf4",selected:"#e8dfed",hover:"#eee7f1",border:"#e7dfea",terminal:"#201923",terminalText:"#f0e7f5",terminalCursor:"#c7a9dc"},{id:"graphite",name:"\u6DF1\u8272\u77F3\u58A8",dark:!0,primary:"#47678e",primaryHover:"#4f7399",primaryActive:"#3c587a",link:"#b0c9e9",focus:"#a5c5ef",text:"#e5e9ef",secondary:"#b0b9c7",background:"#191d23",surface:"#232830",sidebar:"#1e232a",selected:"#303f51",hover:"#2c333e",border:"#3b4452",terminal:"#11151a",terminalText:"#e5e9ef",terminalCursor:"#a5c5ef"}];function GH(e){return M2.find(t=>t.id===e)?.id??"warm"}function i3(e){return M2.find(t=>t.id===e)??M2[0]}function Dfe(e,t){return{...e.dark?{algorithm:t}:{},token:{colorPrimary:e.primary,colorPrimaryHover:e.primaryHover,colorPrimaryActive:e.primaryActive,colorPrimaryText:e.link,colorPrimaryTextHover:e.dark?"#c5d8f1":e.primaryHover,colorPrimaryTextActive:e.dark?"#dbe6f5":e.primaryActive,colorPrimaryBg:e.selected,colorPrimaryBgHover:e.hover,colorPrimaryBorder:e.focus,colorLink:e.link,colorLinkHover:e.dark?"#c5d8f1":e.primaryHover,colorLinkActive:e.dark?"#dbe6f5":e.primaryActive,lineWidthFocus:2,controlOutline:e.focus,controlOutlineWidth:2,colorInfo:e.primary,colorInfoText:e.link,colorInfoBg:e.selected,colorSuccess:"#4f7a58",colorSuccessText:e.dark?"#9acda5":"#456d4e",colorSuccessTextHover:e.dark?"#b3dfbc":"#3b5f43",colorSuccessTextActive:e.dark?"#c7e8cd":"#2f5036",colorSuccessBg:e.dark?"#24392d":"#eff6ed",colorWarning:"#8b640d",colorWarningText:e.dark?"#ddbc72":"#8b640d",colorWarningBg:e.dark?"#3b3221":"#fff6dd",colorError:"#b7342e",colorErrorHover:"#9f2a25",colorErrorActive:"#87201d",colorErrorBg:e.dark?"#3c2728":"#fff1ee",colorErrorBgHover:e.dark?"#4b2c2e":"#ffe9e4",colorErrorBgFilledHover:e.dark?"#4b2c2e":"#ffe7e2",colorErrorBgActive:e.dark?"#522e30":"#ffddd6",colorErrorBorder:e.dark?"#ae645f":"#d87c70",colorErrorBorderHover:e.dark?"#f3978e":"#b7342e",colorErrorText:e.dark?"#f3978e":"#b7342e",colorErrorTextHover:e.dark?"#ffb7af":"#9f2a25",colorErrorTextActive:e.dark?"#ffd1cb":"#87201d",colorText:e.text,colorTextSecondary:e.secondary,colorTextDescription:e.secondary,colorTextPlaceholder:e.secondary,colorBgLayout:e.background,colorBgContainer:e.surface,colorBgElevated:e.surface,colorBorderSecondary:e.border,borderRadius:8,fontFamily:'-apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif',fontSize:14,fontSizeSM:12,zIndexPopupBase:20010},components:{Layout:{siderBg:e.sidebar,headerBg:e.surface,bodyBg:e.background},Menu:{itemBg:"transparent",subMenuItemBg:"transparent",itemSelectedBg:e.selected,itemSelectedColor:e.link,itemHoverBg:e.hover},Tree:{nodeHoverBg:e.hover,directoryNodeSelectedBg:e.selected,directoryNodeSelectedColor:e.link},Button:{primaryShadow:"none"}}}}function Afe(e,t){return{"bg-primary":e.colorBgLayout,"bg-secondary":e.colorFillAlter,"bg-tertiary":e.colorFillSecondary,"bg-elevated":e.colorBgContainer,"bg-surface":e.colorBgContainer,"bg-sidebar":t.sidebar,"bg-terminal":t.terminal,"bg-hover":t.hover,"bg-active":t.selected,"sidebar-rail":t.id==="warm"?"#eeede9":t.sidebar,"sidebar-surface":t.id==="warm"?"#f7f6f2":t.surface,"sidebar-hover":t.id==="warm"?"#eeece7":t.hover,"sidebar-selected":t.id==="warm"?"#e9e3f4":t.selected,"sidebar-accent":t.id==="warm"?"#6a5486":t.link,"border-subtle":e.colorBorderSecondary,"border-default":e.colorBorder,"border-strong":e.colorTextTertiary,border:e.colorBorder,"border-focus":t.focus,"text-primary":e.colorText,"text-secondary":e.colorTextSecondary,"text-tertiary":e.colorTextTertiary,"text-muted":e.colorTextSecondary,"text-inverse":e.colorTextLightSolid,"text-link":e.colorLink,accent:t.link,"accent-solid":e.colorPrimary,"accent-hover":e.colorPrimaryTextHover,"accent-solid-hover":e.colorPrimaryHover,"accent-active":e.colorPrimaryTextActive,"accent-strong":e.colorPrimaryTextActive,"accent-muted":t.selected,"accent-soft":e.colorPrimaryBorder,success:e.colorSuccessText,"success-hover":e.colorSuccessTextHover,"success-muted":e.colorSuccessBg,warning:e.colorWarningText,"warning-muted":e.colorWarningBg,danger:e.colorErrorText,"danger-hover":e.colorErrorTextHover,"danger-muted":e.colorErrorBg,info:e.colorInfoText,"info-muted":e.colorInfoBg,permission:e.colorWarningText,"permission-muted":e.colorWarningBg,thinking:e.colorTextSecondary,"syntax-keyword":t.dark?"#cfb4ed":"#8250df","syntax-string":t.dark?"#9acda5":"#0a7d37","syntax-number":t.dark?"#ddbc72":"#965100","syntax-comment":t.secondary,"syntax-operator":t.dark?"#f1a9ce":"#b2085f","selection-bg":t.dark?"#364965":t.selected,"find-highlight-bg":t.dark?"#54461b":"#fff5bd","find-active-bg":t.dark?"#644324":"#ffdbc0","font-sans":e.fontFamily,"font-mono":e.fontFamilyCode,"font-size-2xs":"12px","font-size-xs":`${e.fontSizeSM}px`,"font-size-sm":`${e.fontSize}px`,"font-size-base":`${e.fontSize}px`,"font-size-lg":`${e.fontSizeLG}px`,"font-size-xl":`${e.fontSizeHeading3}px`,"font-weight-regular":400,"font-weight-medium":500,"font-weight-semibold":e.fontWeightStrong,"font-weight-bold":e.fontWeightStrong,"line-height-tight":e.lineHeightHeading3,"line-height-base":e.lineHeight,"line-height-relaxed":e.lineHeight,"radius-xs":`${e.borderRadiusSM}px`,"radius-sm":`${e.borderRadius}px`,"radius-md":`${e.borderRadiusLG}px`,"radius-lg":`${e.borderRadiusLG}px`,"radius-full":"9999px","control-radius":`${e.borderRadius}px`,"shadow-xs":e.boxShadowTertiary,"shadow-sm":e.boxShadowTertiary,"shadow-md":e.boxShadowSecondary,"shadow-lg":e.boxShadowSecondary,"shadow-xl":e.boxShadow,"shadow-elevated":e.boxShadowSecondary,"float-bg":e.colorBgElevated,"float-border":e.colorBorderSecondary,"float-radius":`${e.borderRadiusLG}px`,"float-shadow":e.boxShadowSecondary,"scrollbar-thumb":e.colorTextQuaternary,"scrollbar-hover":e.colorTextTertiary,"scrollbar-active":e.colorTextSecondary,"scrollbar-track":"transparent"}}function Bfe(e){return`:root { ${Object.entries(e).map(([t,r])=>`--${t}: ${r};`).join(" ")} }`}function KH(){try{return GH(window.localStorage.getItem(a3))}catch{return"warm"}}var Z7=KH(),e3=new Set;function XH(e){if(e!==Z7){Z7=e;for(let t of e3)t()}}var xo={subscribe(e){return e3.add(e),()=>{e3.delete(e)}},getSnapshot:()=>Z7,getServerSnapshot:()=>"warm"};function Ife(e){let t=GH(e),r=!0;try{window.localStorage.setItem(a3,t)}catch{r=!1}return XH(t),r}typeof window<"u"&&window.addEventListener("storage",e=>{(e.key===a3||e.key===null)&&XH(KH())});var Rb=A(xe(),1);vfe.default.locale("zh-cn");var o3=u0.createContext(!1);function zb(e){return Dfe(i3(e),n3.darkAlgorithm)}var pd=zb("warm");function fd(e=xo.getSnapshot()){let t=i3(e);return{background:t.terminal,foreground:t.terminalText,cursor:t.terminalCursor,selectionBackground:t.dark?"#364965":"#49413d"}}function t3(e=document){let t=xo.getSnapshot(),r=i3(t),n=n3.getDesignToken(zb(t)),a=e.getElementById("wand-theme-tokens");a||(a=e.createElement("style"),a.id="wand-theme-tokens",e.head.appendChild(a)),a.textContent=Bfe(Afe(n,r)),e.documentElement.dataset.wandTheme=t,e.documentElement.style.colorScheme=r.dark?"dark":"light",e.querySelector('meta[name="theme-color"]')?.setAttribute("content",r.background)}typeof document<"u"&&(t3(),xo.subscribe(()=>t3()));function Xn({children:e}){let t=u0.useSyncExternalStore(xo.subscribe,xo.getSnapshot,xo.getServerSnapshot),r=u0.useMemo(()=>zb(t),[t]),n=Kn(),a=Za(),o=u0.useMemo(()=>{let l=typeof document>"u"?null:getComputedStyle(document.documentElement),u=(d,p)=>l?.getPropertyValue(d).trim()||p;return{...r,cssVar:{key:a?"wand-ui-reduced":"wand-ui"},token:{...r.token,motion:!0,motionDurationFast:a?"0.00001s":u("--motion-fast","0.12s"),motionDurationMid:a?"0.00001s":u("--motion-normal","0.22s"),motionDurationSlow:a?"0.00001s":u("--motion-normal","0.22s"),motionEaseInOut:u("--ease-in-out-smooth","ease-in-out"),motionEaseOut:u("--ease-out-expo","ease-out")}}},[a,r]);return(0,Rb.jsx)(o3.Provider,{value:!0,children:(0,Rb.jsx)(WH,{locale:{...UH.default,...VH},theme:o,getPopupContainer:()=>n??document.body,children:e})})}function Bt({children:e}){return u0.useContext(o3)?e:(0,Rb.jsx)(Xn,{children:e})}function Lb({children:e}){let t=u0.useSyncExternalStore(xo.subscribe,xo.getSnapshot,xo.getServerSnapshot),r=zb(t);return(0,Rb.jsx)(o3.Provider,{value:!0,children:(0,Rb.jsx)(WH,{locale:{...UH.default,...VH},theme:{...r,cssVar:{key:"wand-ui-measurement"},token:{...r.token,motion:!1}},children:e})})}var s3=A(_()),j2=e=>Lt(e)?pr(e)?e():e:null,yl=A(_()),QH="50%",Mfe=e=>{let{componentCls:t,popoverColor:r,titleMinWidth:n,fontWeightStrong:a,innerPadding:o,dropShadowPopover:l,colorTextHeading:u,borderRadiusLG:d,zIndexPopup:p,titleMarginBottom:h,colorBgElevated:v,popoverBg:g,titleBorderBottom:b,innerContentPadding:x,titlePadding:y,antCls:E}=e,[F,S]=wn(E,"tooltip");return[{[t]:{...Mt(e),position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:p,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",filter:l,[F("valid-offset-x")]:S("arrow-offset-x","var(--arrow-x)"),transformOrigin:[S("valid-offset-x",QH),`var(--arrow-y, ${QH})`].join(" "),[F("arrow-background-color")]:v,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-container`]:{backgroundColor:g,backgroundClip:"padding-box",borderRadius:d,padding:o},[`${t}-title`]:{minWidth:n,marginBottom:h,color:u,fontWeight:a,borderBottom:b,padding:y},[`${t}-content`]:{color:r,padding:x}}},a0(e,S("arrow-background-color"),{arrowShadow:!1}),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block"}}]},Tfe=e=>{let{componentCls:t,antCls:r}=e,[n]=wn(r,"tooltip");return{[t]:hi.map(a=>{let o=e[`${a}6`];return{[`&${t}-${a}`]:{[n("arrow-background-color")]:o,[`${t}-inner`]:{backgroundColor:o},[`${t}-arrow`]:{background:"transparent"}}}})}},_fe=e=>{let{lineWidth:t,controlHeight:r,fontHeight:n,padding:a,wireframe:o,zIndexPopupBase:l,borderRadiusLG:u,marginXS:d,lineType:p,colorSplit:h,paddingSM:v}=e,g=r-n,b=g/2,x=g/2-t,y=a;return{titleMinWidth:177,zIndexPopup:l+30,...n0(e),...Zp({contentRadius:u,limitVerticalRadius:!0}),innerPadding:o?0:12,titleMarginBottom:o?0:d,titlePadding:o?`${b}px ${y}px ${x}px`:0,titleBorderBottom:o?`${t}px ${p} ${h}`:"none",innerContentPadding:o?`${v}px ${y}px`:0}},JH=ct("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,n=vt(e,{popoverBg:t,popoverColor:r});return[Mfe(n),Tfe(n),Fu(n,"zoom-big")]},_fe,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]}),ZH=e=>{let{title:t,content:r,prefixCls:n,classNames:a,styles:o}=e;return!Lt(t)&&!Lt(r)?null:yl.createElement(yl.Fragment,null,Lt(t)&&yl.createElement("div",{className:Y(`${n}-title`,a?.title),style:o?.title},t),Lt(r)&&yl.createElement("div",{className:Y(`${n}-content`,a?.content),style:o?.content},r))},jfe=e=>{let{hashId:t,prefixCls:r,className:n,style:a,placement:o="top",title:l,content:u,children:d,classNames:p,styles:h}=e,v=j2(l),g=j2(u),b={...e,placement:o},[x,y]=Et([p],[h],{props:b}),E=Y(t,r,`${r}-pure`,`${r}-placement-${o}`,n);return yl.createElement("div",{className:E,style:a},yl.createElement("div",{className:`${r}-arrow`}),yl.createElement(Bb,{...e,className:t,prefixCls:r,classNames:x,styles:y},d||yl.createElement(ZH,{prefixCls:r,title:v,content:g,classNames:x,styles:y})))},Nfe=e=>{let{prefixCls:t,className:r,...n}=e,{getPrefixCls:a}=yl.useContext(st),o=a("popover",t),[l,u]=JH(o);return yl.createElement(jfe,{...n,prefixCls:o,hashId:l,className:Y(r,u)})},Pfe=Nfe,Rfe=s3.forwardRef((e,t)=>{let{prefixCls:r,title:n,content:a,overlayClassName:o,placement:l="top",trigger:u,children:d,mouseEnterDelay:p,mouseLeaveDelay:h,onOpenChange:v,overlayStyle:g={},styles:b,classNames:x,motion:y,arrow:E,...F}=e,{getPrefixCls:S,className:D,style:$,classNames:C,styles:B,arrow:M,trigger:I,mouseEnterDelay:j,mouseLeaveDelay:N}=wt("popover"),R=p??j??.1,L=h??N??.1,q=S("popover",r),[W,U]=JH(q),P=S(),H=m2(E,M),V=u||I||"hover",Q={...e,placement:l,trigger:V,mouseEnterDelay:R,mouseLeaveDelay:L,overlayStyle:g,styles:b,classNames:x},X=Ue($),Z=Ue(g),[O,z]=Et([C,x],[B,X,b,Z],{props:Q}),K=Y(o,W,U,D,O.root),[J,te]=qt(e.defaultOpen??!1,e.open),ee=le=>{te(le),v?.(le)},ie=j2(n),me=j2(a);return s3.createElement(Ma,{unique:!1,arrow:H,placement:l,trigger:V,mouseEnterDelay:R,mouseLeaveDelay:L,...F,prefixCls:q,classNames:{root:K,container:O.container,arrow:O.arrow},styles:{root:z.root,container:z.container,arrow:z.arrow},ref:t,open:J,onOpenChange:ee,overlay:Lt(ie)||Lt(me)?s3.createElement(ZH,{prefixCls:q,title:ie,content:me,classNames:O,styles:z}):null,motion:{motionName:Vp(P,"zoom-big",typeof y?.motionName=="string"?y?.motionName:void 0)},"data-popover-inject":!0},d)}),eq=Rfe;eq._InternalPanelDoNotUseOrYouWillBeFired=Pfe;var m0=eq,YH=A(_(),1),l3=A(xe(),1);function bi({trigger:e,triggerActions:t="click",children:r,ariaLabel:n,align:a="center",side:o="bottom",sideOffset:l=8,className:u,open:d,contentId:p,contentRole:h,popupOwner:v=p??n,onOpenChange:g,onAfterOpenChange:b}){let x=Kn(),y=YH.useRef(null),[E,F]=YH.useState(!1),S=d??E,D=$=>{F($),g?.($)};return $n(S,()=>{D(!1),y.current?.nativeElement?.focus({preventScroll:!0})}),(0,l3.jsx)(Bt,{children:(0,l3.jsx)(m0,{ref:y,open:S,onOpenChange:D,afterOpenChange:b,trigger:t,arrow:!1,placement:ud(o,a),destroyOnHidden:!0,getPopupContainer:()=>x??document.body,align:{offset:cd(o,l)},classNames:{root:et("wand-ui-popover-content",u)},content:(0,l3.jsx)("div",{id:p,role:h,"aria-label":n,"data-wand-popup-owner":v,children:r}),children:e})})}var Ta=A(_()),Ofe=A(_()),zfe=Ofe.createContext({}),u3=zfe,Lfe=e=>{let{antCls:t,componentCls:r,iconCls:n,avatarBg:a,avatarColor:o,containerSize:l,containerSizeLG:u,containerSizeSM:d,textFontSize:p,textFontSizeLG:h,textFontSizeSM:v,iconFontSize:g,iconFontSizeLG:b,iconFontSizeSM:x,borderRadius:y,borderRadiusLG:E,borderRadiusSM:F,lineWidth:S,lineType:D}=e,$=(C,B,M,I)=>({width:C,height:C,borderRadius:"50%",fontSize:B,[`&${r}-square`]:{borderRadius:I},[`&${r}-icon`]:{fontSize:M,[`> ${n}`]:{margin:0}}});return{[r]:{...Mt(e),position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"hidden",color:o,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:a,border:`${ue(S)} ${D} transparent`,"&-image":{background:"transparent"},[`${t}-image-img`]:{display:"block"},...$(l,p,g,y),"&-lg":{...$(u,h,b,E)},"&-sm":{...$(d,v,x,F)},"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}}}},Hfe=e=>{let{componentCls:t,groupBorderColor:r,groupOverlapping:n,groupSpace:a}=e;return{[`${t}-group`]:{display:"inline-flex",[t]:{borderColor:r},"> *:not(:first-child)":{marginInlineStart:n}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:a}}}},qfe=e=>{let{controlHeight:t,controlHeightLG:r,controlHeightSM:n,fontSize:a,fontSizeLG:o,fontSizeXL:l,fontSizeHeading3:u,marginXS:d,marginXXS:p,colorBorderBg:h}=e;return{containerSize:t,containerSizeLG:r,containerSizeSM:n,textFontSize:a,textFontSizeLG:a,textFontSizeSM:a,iconFontSize:Math.round((o+l)/2),iconFontSizeLG:u,iconFontSizeSM:a,groupSpace:p,groupOverlapping:-d,groupBorderColor:h}},rq=ct("Avatar",e=>{let{colorTextLightSolid:t,colorTextPlaceholder:r}=e,n=vt(e,{avatarBg:r,avatarColor:t});return[Lfe(n),Hfe(n)]},qfe),Wfe=Ta.forwardRef((e,t)=>{let{prefixCls:r,shape:n,size:a,src:o,srcSet:l,icon:u,className:d,rootClassName:p,style:h,alt:v,draggable:g,children:b,crossOrigin:x,gap:y=4,onError:E,...F}=e,[S,D]=Ta.useState(1),[$,C]=Ta.useState(!1),[B,M]=Ta.useState(!0),I=Ta.useRef(null),j=Ta.useRef(null),N=pn(t,I),{getPrefixCls:R,className:L,style:q}=wt("avatar"),W=Ta.useContext(u3),U=()=>{if(!j.current||!I.current)return;let se=j.current.offsetWidth,ke=I.current.offsetWidth;se!==0&&ke!==0&&y*2<ke&&D(ke-y*2<se?(ke-y*2)/se:1)};Ta.useEffect(()=>{C(!0)},[]),Ta.useEffect(()=>{M(!0),D(1)},[o,l]),Ta.useEffect(U,[y]);let P=()=>{E?.()!==!1&&M(!1)},H=qr(se=>a??W?.size??se??"medium"),V=Object.keys(Ct(H)?H||{}:{}).some(se=>af.includes(se)),Q=Lt(u),X=Q7(V),Z=Ta.useMemo(()=>{if(!Ct(H))return{};let se=af.find(De=>X[De]),ke=H[se];return ke?{width:ke,height:ke,fontSize:ke&&(Q||Lt(b))?ke/2:18}:{}},[X,H,Q,b]),O=R("avatar",r),z=xn(O),[K,J]=rq(O,z),te=Y({[`${O}-lg`]:H==="large",[`${O}-sm`]:H==="small"}),ee=Ta.isValidElement(o),ie=n||W?.shape||"circle",me=Y(O,te,L,`${O}-${ie}`,{[`${O}-image`]:ee||o&&B,[`${O}-icon`]:Q},J,z,d,p,K),le=Gn(H)?{width:H,height:H,fontSize:Q?H/2:18}:{},he;if(typeof o=="string"&&B)he=Ta.createElement("img",{src:o,draggable:g,srcSet:l,onError:P,alt:v,crossOrigin:x});else if(ee)he=o;else if(Q)he=u;else if($||S!==1){let se=`scale(${S})`,ke={msTransform:se,WebkitTransform:se,transform:se};he=Ta.createElement(Ba,{onResize:U},Ta.createElement("span",{className:`${O}-string`,ref:j,style:ke},b))}else he=Ta.createElement("span",{className:`${O}-string`,style:{opacity:0},ref:j},b);return Ta.createElement("span",{...F,style:{...le,...Z,...q,...h},className:me,ref:N},he)}),nq=Wfe,Eo=A(_()),tq=e=>{let{size:t,shape:r}=Eo.useContext(u3),n=Eo.useMemo(()=>({size:e.size||t,shape:e.shape||r}),[e.size,e.shape,t,r]);return Eo.createElement(u3.Provider,{value:n},e.children)},Ufe=Eo.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n}=Eo.useContext(st),{prefixCls:a,className:o,rootClassName:l,style:u,maxCount:d,maxStyle:p,size:h,shape:v,maxPopoverPlacement:g,maxPopoverTrigger:b,children:x,max:y}=e,E=r("avatar",a),F=`${E}-group`,S=xn(E),[D,$]=rq(E,S),C=Y(F,{[`${F}-rtl`]:n==="rtl"},$,S,o,l,D),B=Er(x).map((N,R)=>Fr(N,{key:`avatar-key-${R}`})),M=Eo.useRef(null);Eo.useImperativeHandle(t,()=>({nativeElement:M.current}));let I=y?.count||d,j=B.length;if(I&&I<j){let N=B.slice(0,I),R=B.slice(I,j),L=y?.style||p,q=y?.popover?.trigger||b||"hover",W=y?.popover?.placement||g||"top",U={content:R,...y?.popover,placement:W,trigger:q,rootClassName:Y(`${F}-popover`,y?.popover?.rootClassName)};return N.push(Eo.createElement(m0,{key:"avatar-popover-key",destroyOnHidden:!0,...U},Eo.createElement(nq,{style:L},`+${j-I}`))),Eo.createElement(tq,{shape:v,size:h},Eo.createElement("div",{ref:M,className:C,style:u},N))}return Eo.createElement(tq,{shape:v,size:h},Eo.createElement("div",{ref:M,className:C,style:u},B))}),Vfe=Ufe,aq=nq;aq.Group=Vfe;var Yo=aq;var md=A(_()),h0=A(_()),Hb=A(_()),pf=A(_()),iq=e=>{let{prefixCls:t,value:r,current:n,offset:a=0}=e,o;return a&&(o={position:"absolute",top:`${a}00%`,left:0}),pf.createElement("span",{style:o,className:Y(`${t}-only-unit`,{current:n})},r)};function Gfe(e,t,r){let n=e,a=0;for(;(n+10)%10!==t;)n+=r,a+=r;return a}var Kfe=e=>{let{prefixCls:t,count:r,value:n}=e,a=Number(n),o=Math.abs(r),[l,u]=pf.useState(a),[d,p]=pf.useState(o),h=()=>{u(a),p(o)};pf.useEffect(()=>{let b=setTimeout(h,1e3);return()=>clearTimeout(b)},[a]);let v,g;if(l===a||Number.isNaN(a)||Number.isNaN(l))v=[pf.createElement(iq,{...e,key:a,current:!0})],g={transition:"none"};else{v=[];let b=a+10,x=[];for(let F=a;F<=b;F+=1)x.push(F);let y=d<o?1:-1,E=x.findIndex(F=>F%10===l);v=(y<0?x.slice(0,E+1):x.slice(E)).map((F,S)=>{let D=F%10;return pf.createElement(iq,{...e,key:F,value:D,offset:y<0?S-E:S,current:S===E})}),g={transform:`translateY(${-Gfe(l,a,y)}00%)`}}return pf.createElement("span",{className:`${t}-only`,style:g,onTransitionEnd:h},v)},Xfe=Kfe,Qfe=Hb.forwardRef((e,t)=>{let{prefixCls:r,count:n,className:a,motionClassName:o,style:l,title:u,show:d,component:p="sup",children:h,...v}=e,{getPrefixCls:g}=Hb.useContext(st),b=g("scroll-number",r),x={...v,"data-show":d,style:l,className:Y(b,a,o),title:u},y=n;if(n&&Number(n)%1===0){let E=String(n).split("");y=Hb.createElement("bdi",null,E.map((F,S)=>Hb.createElement(Xfe,{prefixCls:b,count:Number(n),value:F,key:E.length-S})))}return l?.borderColor&&(x.style={...l,boxShadow:`0 0 0 1px ${l.borderColor} inset`}),h?Fr(h,E=>({className:Y(`${b}-custom-component`,E?.className,o)})):Hb.createElement(p,{...x,ref:t},y)}),Yfe=Qfe,Jfe=new Dt("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),Zfe=new Dt("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),eme=new Dt("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),tme=new Dt("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),rme=new Dt("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),nme=new Dt("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),ame=e=>{let{componentCls:t,iconCls:r,antCls:n,badgeShadowSize:a,textFontSize:o,textFontSizeSM:l,statusSize:u,dotSize:d,textFontWeight:p,indicatorHeight:h,indicatorHeightSM:v,marginXS:g,calc:b}=e,x=`${n}-scroll-number`,y=nd(e,(E,{darkColor:F})=>({[`&${t} ${t}-color-${E}`]:{background:F,[`&:not(${t}-count)`]:{color:F},"a:hover &":{background:F}}}));return{[t]:{...Mt(e),position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:h,height:h,color:e.badgeTextColor,fontWeight:p,fontSize:o,lineHeight:ue(h),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:b(h).div(2).equal(),boxShadow:`0 0 0 ${ue(a)} ${e.badgeShadowColor}`,transition:`background-color ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:v,height:v,fontSize:l,lineHeight:ue(v),borderRadius:b(v).div(2).equal()},[`${t}-multiple-words`]:{paddingInline:e.paddingInline,bdi:{unicodeBidi:"plaintext"}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:d,minWidth:d,height:d,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${ue(a)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${x}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${r}-spin`]:{animationName:nme,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:u,height:u,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorInfoTextHover,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:a,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:Jfe,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:g,color:e.colorText,fontSize:e.fontSize}},...y,[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:Zfe,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:eme,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:tme,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:rme,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${x}-custom-component, ${t}-count`]:{transform:"none"},[`${x}-custom-component, ${x}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[x]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${x}-only`]:{position:"relative",display:"inline-block",height:h,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${x}-only-unit`]:{height:h,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${x}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${x}-custom-component`]:{transform:"translate(-50%, -50%)"}}}}},oq=e=>{let{fontHeight:t,lineWidth:r,marginXS:n,colorBorderBg:a}=e,o=t,l=r,u=e.colorTextLightSolid,d=e.colorError,p=e.colorErrorHover;return vt(e,{badgeFontHeight:o,badgeShadowSize:l,badgeTextColor:u,badgeColor:d,badgeColorHover:p,badgeShadowColor:a,badgeProcessingDuration:"1.2s",badgeRibbonOffset:n,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},sq=e=>{let{fontSize:t,lineHeight:r,fontSizeSM:n,lineWidth:a,paddingXS:o}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*r)-2*a,indicatorHeightSM:t,dotSize:n/2,textFontSize:n,textFontSizeSM:n,textFontWeight:"normal",statusSize:n/2,paddingInline:o}},ime=ct("Badge",e=>{let t=oq(e);return ame(t)},sq),ome=md.forwardRef((e,t)=>{let{prefixCls:r,scrollNumberPrefixCls:n,children:a,status:o,text:l,color:u,count:d=null,overflowCount:p=99,dot:h=!1,size:v="medium",title:g,offset:b,style:x,className:y,rootClassName:E,classNames:F,styles:S,showZero:D=!1,...$}=e,{getPrefixCls:C,direction:B,className:M,style:I,classNames:j,styles:N}=wt("badge"),R=C("badge",r),[L,q]=ime(R),W={...e,overflowCount:p,size:v,dot:h,showZero:D},U=d>p?`${p}+`:d,P=U==="0"||U===0||l==="0"||l===0,H=d===null||P&&!D,V=(Lr(o)||Lr(u))&&H,Q=Lr(o)||!P,X=!!(!a&&V&&(l||Q||!H)),Z=(0,h0.useMemo)(()=>{if(!b)return;let Me=Number.parseInt(b[0],10);return{marginTop:b[1],insetInlineEnd:-Me}},[b]),O=(0,h0.useMemo)(()=>({...Z,...I,...x}),[Z,x,I]),z=X?"root":"indicator",K=Ue(I,z),J=Ue(x,z),[te,ee]=Et([j,F],[N,K,S,J],{props:W}),ie=h&&!P,me=ie?"":U,le=(0,h0.useMemo)(()=>(!Lt(me)&&!Lt(l)||P&&!D)&&!ie,[me,P,D,ie,l]),he=(0,h0.useRef)(d);le||(he.current=d);let se=he.current,ke=(0,h0.useRef)(me);le||(ke.current=me);let De=ke.current,we=(0,h0.useRef)(ie);le||(we.current=ie);let de=Ja(se)||Gn(se)?se:void 0,be=g===null||g===!1?void 0:g??de,ye=!le&&(l===0?D:!!l&&l!==!0),Re=ye?md.createElement("span",{className:`${R}-status-text`},l):null,Fe=Ct(se)?Fr(se,Me=>({style:{...O,...Me.style}})):void 0,$e=ef(u,!1),Ie=Y(te.indicator,{[`${R}-status-dot`]:V,[`${R}-status-${o}`]:!!o,[`${R}-color-${u}`]:$e}),He={};u&&!$e&&(He.color=u,He.background=u);let Oe=Y(R,{[`${R}-status`]:V,[`${R}-not-a-wrapper`]:!a,[`${R}-rtl`]:B==="rtl"},y,E,M,te.root,L,q);if(X){let Me=ee.root?.color;return md.createElement("span",{ref:t,...$,className:Oe,style:{...Z,...ee.root}},md.createElement("span",{className:Ie,style:{...ee.indicator,...He}}),ye&&md.createElement("span",{style:{color:Me},className:`${R}-status-text`},l))}return md.createElement("span",{ref:t,...$,className:Oe,style:ee.root},a,md.createElement(ra,{visible:!le,motionName:`${R}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:Me})=>{let Te=C("scroll-number",n),Xe=we.current,ot=Y(te.indicator,{[`${R}-dot`]:Xe,[`${R}-count`]:!Xe,[`${R}-count-sm`]:v==="small",[`${R}-multiple-words`]:!Xe&&De&&De.toString().length>1,[`${R}-status-${o}`]:!!o,[`${R}-color-${u}`]:$e}),Ye={...Z,...ee.indicator};return u&&!$e&&(Ye=Ye||{},Ye.background=u),md.createElement(Yfe,{prefixCls:Te,show:!le,motionClassName:Me,className:ot,count:De,title:be,style:Ye,key:"scrollNumber"},Fe)}),Re)}),sme=ome,df=A(_()),lme=e=>{let{antCls:t,badgeFontHeight:r,marginXS:n,badgeRibbonOffset:a,calc:o}=e,l=`${t}-ribbon`,u=`${t}-ribbon-wrapper`,d=nd(e,(p,{darkColor:h})=>({[`&${l}-color-${p}`]:{background:h,color:h}}));return{[u]:{position:"relative"},[l]:{...Mt(e),position:"absolute",top:n,padding:`0 ${ue(e.paddingXS)}`,color:e.colorPrimary,lineHeight:ue(r),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${l}-content`]:{color:e.badgeTextColor},[`${l}-corner`]:{position:"absolute",top:"100%",width:a,height:a,color:"currentcolor",border:`${ue(o(a).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter},...d,[`&${l}-placement-end`]:{insetInlineEnd:o(a).mul(-1).equal(),borderEndEndRadius:0,[`${l}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${l}-placement-start`]:{insetInlineStart:o(a).mul(-1).equal(),borderEndStartRadius:0,[`${l}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}}}},ume=ct(["Badge","Ribbon"],e=>{let t=oq(e);return lme(t)},sq),cme=df.forwardRef((e,t)=>{let{className:r,prefixCls:n,style:a,color:o,children:l,text:u,placement:d="end",rootClassName:p,styles:h,classNames:v}=e,{getPrefixCls:g,direction:b,className:x,style:y,classNames:E,styles:F}=wt("ribbon"),S=g("ribbon",n),D=`${S}-wrapper`,[$,C]=ume(S,D),B={...e,placement:d},M=Ue(y,"indicator"),I=Ue(a,"indicator"),[j,N]=Et([E,v],[F,M,h,I],{props:B}),R=ef(o,!1),L=Y(S,`${S}-placement-${d}`,{[`${S}-rtl`]:b==="rtl",[`${S}-color-${o}`]:R},r,x,j.indicator),q={},W={};o&&!R&&(q.background=o,W.color=o);let U=df.useRef(null);return df.useImperativeHandle(t,()=>({nativeElement:U.current})),df.createElement("div",{ref:U,className:Y(D,p,$,C,j.root),style:N.root},l,df.createElement("div",{className:Y(L,$),style:{...q,...N.indicator}},df.createElement("span",{className:Y(`${S}-content`,j.content),style:N.content},u),df.createElement("div",{className:`${S}-corner`,style:W})))}),dme=cme,lq=sme;lq.Ribbon=dme;var qi=lq;var Jo=A(_());function pme(e,t,r){var n=r||{},a=n.noTrailing,o=a===void 0?!1:a,l=n.noLeading,u=l===void 0?!1:l,d=n.debounceMode,p=d===void 0?void 0:d,h,v=!1,g=0;function b(){h&&clearTimeout(h)}function x(E){var F=E||{},S=F.upcomingOnly,D=S===void 0?!1:S;b(),v=!D}function y(){for(var E=arguments.length,F=new Array(E),S=0;S<E;S++)F[S]=arguments[S];var D=this,$=Date.now()-g;if(v)return;function C(){g=Date.now(),t.apply(D,F)}function B(){h=void 0}!u&&p&&!h&&C(),b(),p===void 0&&$>e?u?(g=Date.now(),o||(h=setTimeout(p?B:C,e))):C():o!==!0&&(h=setTimeout(p?B:C,p===void 0?e-$:e))}return y.cancel=x,y}function fme(e,t,r){var n=r||{},a=n.atBegin,o=a===void 0?!1:a;return pme(e,t,{debounceMode:o!==!1})}var uq=A(_()),g0=A(_()),v0=A(_()),N2=100,fq=N2/5,mq=N2/2-fq/2,c3=mq*2*Math.PI,cq=50,dq=e=>{let{dotClassName:t,style:r,hasCircleCls:n}=e;return v0.createElement("circle",{className:Y(`${t}-circle`,{[`${t}-circle-bg`]:n}),r:mq,cx:cq,cy:cq,strokeWidth:fq,style:r})},mme=({percent:e,prefixCls:t})=>{let r=`${t}-dot`,n=`${r}-holder`,a=`${n}-hidden`,[o,l]=v0.useState(!1);sr(()=>{e!==0&&l(!0)},[e]);let u=Math.max(Math.min(e,100),0);if(!o)return null;let d={strokeDashoffset:`${c3/4}`,strokeDasharray:`${c3*u/100} ${c3*(100-u)/100}`};return v0.createElement("span",{className:Y(n,`${r}-progress`,{[a]:u<=0})},v0.createElement("svg",{viewBox:`0 0 ${N2} ${N2}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u},v0.createElement(dq,{dotClassName:r,hasCircleCls:!0}),v0.createElement(dq,{dotClassName:r,style:d})))},hme=mme;function gme(e){let{prefixCls:t,percent:r=0,className:n,style:a}=e,o=`${t}-dot`,l=`${o}-holder`,u=`${l}-hidden`;return g0.createElement(g0.Fragment,null,g0.createElement("span",{className:Y(l,n,r>0&&u),style:a},g0.createElement("span",{className:Y(o,`${t}-dot-spin`)},[1,2,3,4].map(d=>g0.createElement("i",{className:`${t}-dot-item`,key:d})))),g0.createElement(hme,{prefixCls:t,percent:r}))}function vme(e){let{prefixCls:t,indicator:r,percent:n,className:a,style:o}=e,l=`${t}-dot`;return r&&uq.isValidElement(r)?Fr(r,u=>({className:Y(u.className,l,a),style:{...u.style,...o},percent:n})):uq.createElement(gme,{prefixCls:t,percent:n,className:a,style:o})}var bme=new Dt("antSpinMove",{to:{opacity:1}}),yme=new Dt("antRotate",{to:{transform:"rotate(405deg)"}}),wme=e=>{let{componentCls:t}=e,r=`${t}-section`;return{[t]:{...Mt(e),position:"relative","&-rtl":{direction:"rtl"},[`&${r}, > ${r}`]:{display:"flex",alignItems:"center",flexDirection:"column",gap:e.paddingSM,color:e.colorPrimary},[`&${r}`]:{display:"inline-flex"},[`> ${r}`]:{position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)",zIndex:1},[`${t}-description`]:{fontSize:e.fontSize,lineHeight:1},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},"&-spinning":{[`${t}-description`]:{textShadow:`0 0px 5px ${e.colorBgContainer}`},[`${t}-container`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-fullscreen":{position:"fixed",inset:0,backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,opacity:0,pointerEvents:"none",transition:`all ${e.motionDurationMid}`,[`&${t}-spinning`]:{opacity:1,pointerEvents:"auto"},[`> ${r}`]:{color:e.colorWhite,[`${t}-description`]:{color:e.colorTextLightSolid}}}}}},xme=e=>{let{componentCls:t,antCls:r,motionDurationSlow:n}=e,[a,o]=wn(r,"spin");return{[t]:{[a("dot-holder-size")]:e.dotSize,[a("dot-item-size")]:`calc((${o("dot-holder-size")} - ${e.marginXXS} / 2) / 2)`,[`${t}-dot`]:{"&-holder":{width:"1em",height:"1em",fontSize:o("dot-holder-size"),display:"inline-block",transition:["transform","opacity"].map(l=>`${l} ${n} ease`).join(", "),transformOrigin:"50% 50%",lineHeight:1,"&-hidden":{transform:"scale(0.3)",opacity:0}},position:"relative",display:"inline-block",fontSize:o("dot-holder-size"),width:"1em",height:"1em","&-spin":{transform:"rotate(45deg)",animationName:yme,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-item":{position:"absolute",display:"block",width:o("dot-item-size"),height:o("dot-item-size"),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:bme,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-progress":{position:"absolute",left:"50%",top:0,transform:"translateX(-50%)"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(l=>`${l} ${n} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}}}}},Eme=e=>{let{componentCls:t}=e,[r]=wn(e.antCls,"spin");return{[t]:{"&-sm":{[r("dot-holder-size")]:e.dotSizeSM},"&-lg":{[r("dot-holder-size")]:e.dotSizeLG}}}},kme=e=>{let{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:r}},Cme=ct("Spin",e=>{let t=vt(e,{spinDotDefault:e.colorTextDescription});return[wme(t),xme(t),Eme(t)]},kme),d3=A(_()),Sme=200,pq=[[30,.05],[70,.03],[96,.01]];function Fme(e,t){let[r,n]=d3.useState(0),a=d3.useRef(null),o=t==="auto";return d3.useEffect(()=>(o&&e&&(n(0),a.current=setInterval(()=>{n(l=>{let u=100-l;for(let d=0;d<pq.length;d+=1){let[p,h]=pq[d];if(l<=p)return l+u*h}return l})},Sme)),()=>{a.current&&(clearInterval(a.current),a.current=null)}),[o,e]),o?r:t}var hq;function $me(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}var gq=Jo.forwardRef((e,t)=>{let{prefixCls:r,spinning:n=!0,delay:a=0,className:o,rootClassName:l,size:u,tip:d,description:p,wrapperClassName:h,style:v,children:g,fullscreen:b=!1,indicator:x,percent:y,classNames:E,styles:F,...S}=e,{getPrefixCls:D,direction:$,indicator:C,className:B,style:M,classNames:I,styles:j}=wt("spin"),N=D("spin",r),[R,L]=Cme(N),[q,W]=Jo.useState(()=>n&&!$me(n,a)),U=Fme(q,y);Jo.useEffect(()=>{if(n){let ee=fme(a,()=>{W(!0)});return ee(),()=>{ee?.cancel?.()}}W(!1)},[a,n]);let P=qr(ee=>u??ee),H=p??d,V={...e,size:P,spinning:q,tip:H,description:H,fullscreen:b,children:g,percent:U},Q=Ue(M),[X,Z]=Et([I,E],[j,Q,F],{props:V}),O=x??C??hq,z=typeof g<"u",K=z||b,J=Jo.createElement(Jo.Fragment,null,Jo.createElement(vme,{className:Y(X.indicator),style:Z.indicator,prefixCls:N,indicator:O,percent:U}),H&&Jo.createElement("div",{className:Y(`${N}-description`,X.tip,X.description),style:{...Z.tip,...Z.description}},H)),te=Jo.useRef(null);return Jo.useImperativeHandle(t,()=>({nativeElement:te.current})),Jo.createElement("div",{ref:te,className:Y(N,{[`${N}-sm`]:P==="small",[`${N}-lg`]:P==="large",[`${N}-spinning`]:q,[`${N}-rtl`]:$==="rtl",[`${N}-fullscreen`]:b},l,X.root,b&&X.mask,K?h:[`${N}-section`,X.section],B,o,R,L),style:{...Z.root,...K?{}:Z.section,...b?Z.mask:{},...v},"aria-live":"polite","aria-busy":q,...S},q&&(K?Jo.createElement("div",{className:Y(`${N}-section`,X.section),style:Z.section},J):J),z&&Jo.createElement("div",{className:Y(`${N}-container`,X.container),style:Z.container},g))});gq.setDefaultIndicator=e=>{hq=e};var Wi=gq;var bq={};ws(bq,{installReactUiStyles:()=>b0,installStyleSheet:()=>_a});var Dme=__wandCssTextPool[0],Ame=__wandCssTextPool[1],Bme=__wandCssTextPool[2],Ime=__wandCssTextPool[3],Mme=__wandCssTextPool[4],Tme=__wandCssTextPool[5],_me=__wandCssTextPool[6],jme=__wandCssTextPool[7],Nme=__wandCssTextPool[8],vq="wand-react-ui-styles",Pme=[Dme,Ime,Ame,Mme,Tme,jme,Nme,"",_me,Bme].join("");function b0(e=document){if(e.getElementById(vq))return;let t=e.createElement("style");t.id=vq,t.textContent=Pme,e.head.appendChild(t)}function _a(e,t,r=document){if(r.getElementById(e))return;let n=r.createElement("style");n.id=e,n.textContent=t,r.head.appendChild(n)}var kq="wand-hr",Ub=2,w3="wand-ops",Cq="e_wand_ops",Rme="\u52E4\u52B3\u7684\u521D\u4E8C",x3="\u7CFB\u7EDF\u7528\u6237";function Sq(e){return e?.systemKey===w3}var E3="wand-default",Fq="e_wand_default",$q="\u9ED8\u8BA4\u7528\u6237";function Dq(e){return e?.systemKey===E3}function Ome(e){return e?.systemKey===x2}function k3(e){let t=e?.systemKey;return t===w3||t===E3||t===x2||t===kq}var f3=8,m3=20;function zme(e){return Sq(e)||Ome(e)||e.systemKey===kq?[x3]:Dq(e)?[$q]:e.tags??[]}function Lme(e){if(!Array.isArray(e))throw new Error("\u5458\u5DE5\u6807\u7B7E\u5FC5\u987B\u662F\u6570\u7EC4\u3002");let t=[];for(let r of e){if(typeof r!="string")throw new Error("\u5458\u5DE5\u6807\u7B7E\u5FC5\u987B\u662F\u6587\u5B57\u3002");let n=r.trim();if(n){if(n.length>m3)throw new Error(`\u6BCF\u4E2A\u5458\u5DE5\u6807\u7B7E\u4E0D\u80FD\u8D85\u8FC7 ${m3} \u4E2A\u5B57\u7B26\u3002`);if(/[,,、\x00-\x1f\x7f]/.test(n))throw new Error("\u5458\u5DE5\u6807\u7B7E\u4E0D\u80FD\u5305\u542B\u5206\u9694\u7B26\u6216\u63A7\u5236\u5B57\u7B26\u3002");if(n===x3||n===$q)throw new Error(`\u300C${n}\u300D\u662F\u5185\u7F6E\u6807\u7B7E\uFF0C\u4E0D\u53EF\u81EA\u5B9A\u4E49\u3002`);t.includes(n)||t.push(n)}}if(t.length>f3)throw new Error(`\u6700\u591A ${f3} \u4E2A\u5458\u5DE5\u6807\u7B7E\u3002`);return t}function Hme(e){return Lme(e.split(/[,,、\n]+/))}var qme=[{id:Fq,systemKey:E3,avatar:"plush-cat:v1:silver"},{id:Cq,systemKey:w3,avatar:"plush-cat:v1:orange"}];function C3(e){return qme.find(t=>t.id===e.id&&t.systemKey===e.systemKey)?.avatar??null}function Wme(e){return C3(e)??e.avatar??""}function S3(e){return C3(e)!==null}var ja=A(xe(),1);function Aq({activity:e,pawColor:t}){return e==="idle"?null:(0,ja.jsx)("svg",{className:"wand-avatar-file-fallback",viewBox:"0 0 100 100","aria-hidden":"true","data-file-prop":e,children:e==="reading"?(0,ja.jsxs)(ja.Fragment,{children:[(0,ja.jsx)("path",{d:"M25 70Q38 67 50 73Q62 67 75 70V90Q62 87 50 93Q38 87 25 90Z",fill:"#426a70"}),(0,ja.jsx)("path",{d:"M25 71Q38 69 50 74Q62 69 75 71L74 74Q61 71 50 77Q39 71 26 74Z",fill:"#fff3d5"}),(0,ja.jsx)("circle",{cx:"25",cy:"84",r:"4.2",fill:t}),(0,ja.jsx)("circle",{cx:"75",cy:"84",r:"4.2",fill:t}),(0,ja.jsx)("path",{d:"M50 77v15m-20-14 1 9m38-9-1 9",stroke:"#dba758",strokeWidth:"1"})]}):(0,ja.jsxs)(ja.Fragment,{children:[(0,ja.jsx)("path",{d:"M28 75L70 72L74 92L31 95Z",fill:"#426a70"}),(0,ja.jsx)("path",{d:"M31 76L68 74L70 76L32 78Z",fill:"#fff3d5"}),(0,ja.jsx)("path",{d:"M34 78l2 12",stroke:"#626c78",strokeWidth:"1"}),(0,ja.jsx)("path",{d:"M53 77L59 66",stroke:"#dba758",strokeWidth:"3",strokeLinecap:"round"}),(0,ja.jsx)("path",{d:"M53 77L51 79L55 78Z",fill:"#626c78"}),(0,ja.jsx)("circle",{cx:"30",cy:"86",r:"4.2",fill:t}),(0,ja.jsx)("circle",{cx:"56",cy:"72",r:"4",fill:t})]})})}var Ume=A(_(),1),P2=A(xe(),1);function H2(){let e=Za();return Ume.useLayoutEffect(()=>_a("wand-avatar-thinking",`
203
+ .wand-avatar-thinking{position:absolute;left:var(--plush-thinking-x,4px);top:var(--plush-thinking-y,0px);transform:translate(-50%,-50%);z-index:2;line-height:0;color:var(--text-secondary);pointer-events:none}
204
+ .wand-avatar-thinking .ant-spin{display:block;color:inherit;line-height:0}
205
+ .wand-avatar-thinking .ant-spin-dot{font-size:24px}
206
+ .wand-avatar-thinking .ant-spin-dot-spin{animation-duration:var(--motion-spin)}
207
+ .wand-avatar-thinking[data-reduced-motion="true"] .ant-spin-dot-spin{animation:none}
208
+ .wand-plush-avatar[data-render-state="paused"] .ant-spin-dot-spin{animation-play-state:paused}
209
+ `),[]),(0,P2.jsx)("span",{className:"wand-avatar-thinking","data-reduced-motion":e,"aria-hidden":"true",children:(0,P2.jsx)(Wi,{size:"small",indicator:(0,P2.jsx)("svg",{className:"ant-spin-dot-spin",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"var(--bg-primary)",strokeWidth:"0.6",children:[1,.9,.75,.6,.45,.3,.2,.15].map((t,r)=>(0,P2.jsx)("rect",{x:"10.5",y:"1",width:"3",height:"6",rx:"1.5",opacity:t,transform:`rotate(${r*45} 12 12)`},r))})})})}var Fs=A(_(),1),Vme=[[[.17,0,0],[.47,.06,-.02],[.78,.22,-.065],[1.035,.27,-.1],[1.13,.19,-.12],[1.07,.075,-.132],[.93,.11,-.105],[.96,.21,-.078]],[[.195,-.013,0],[.5,-.025,-.03],[.79,-.09,-.06],[1.04,-.14,-.105],[1.11,-.27,-.12],[1.03,-.36,-.1],[.91,-.32,-.072],[.94,-.23,-.062]],[[.17,-.026,0],[.39,-.07,-.015],[.56,-.18,-.04],[.73,-.31,-.08],[.78,-.44,-.11],[.68,-.48,-.097],[.6,-.39,-.075]],[[.195,-.039,0],[.46,.06,-.03],[.66,.11,-.04],[.8,.035,-.05],[.78,-.06,-.06],[.69,-.09,-.065]]];function Gme(e,t){let r=Vme[e];if(!r)throw new RangeError("Unknown Chuer whisker");let n=r[0],a=t>0;return r.map(([o,l,u])=>[t*(n[0]+(o-n[0])*(a?.94:1)),n[1]+(l-n[1])*(a?e%2?.85:1.08:1),u*(a?.92:1)])}function Kme(e,t,r){let n=Gme(e,t),a=l=>`${50+l[0]*36} ${50-(r+l[1])*36}`,o=`M${a(n[0])}`;for(let l=0;l<n.length-1;l++){let u=n[l],d=n[l+1],p=n[l-1]??[2*u[0]-d[0],2*u[1]-d[1],2*u[2]-d[2]],h=n[l+2]??[2*d[0]-u[0],2*d[1]-u[1],2*d[2]-u[2]],v=[u[0]+(d[0]-p[0])/6,u[1]+(d[1]-p[1])/6,0],g=[d[0]-(h[0]-u[0])/6,d[1]-(h[1]-u[1])/6,0];o+=`C${a(v)} ${a(g)} ${a(d)}`}return o}var Xme={silver:{breed:"sculpted-huniu",pattern:"silver-tabby",coat:"#bdc2c0",dark:"#535d5b",pale:"#ece9e1",iris:"#819374",innerEar:"#c8b3ad",nose:"#a27667",head:[.9,.85,.58],ear:[.26,.34,.32],earX:.58,earY:.65,eyeX:.335,eyeY:.11,eyeWidth:.204,eyeUpper:.152,eyeLower:.139,pupilWidth:.086,pupilHeight:.12,cheekDepth:.036,noseY:-.205,noseWidth:.101,noseHeight:.074,muzzleY:-.315,mouthY:-.375,chinY:-.535,chinDepth:.065,chinWidth:.265,chinHeight:.16,jawDepth:.018,muzzleDepth:.089,furLength:.67},orange:{breed:"sculpted-chuer",pattern:"brown-tabby-white",coat:"#81735c",dark:"#37382e",pale:"#e9e3d5",iris:"#929d6d",innerEar:"#b6a18e",nose:"#a77f76",head:[.96,.78,.455],ear:[.245,.21,.31],earX:.62,earY:.62,eyeX:.365,eyeY:.075,eyeWidth:.193,eyeUpper:.105,eyeLower:.128,pupilWidth:.065,pupilHeight:.104,cheekDepth:.069,noseY:-.055,noseWidth:.081,noseHeight:.052,muzzleY:-.18,mouthY:-.277,chinY:-.445,chinDepth:.115,chinWidth:.29,chinHeight:.17,jawDepth:.025,muzzleDepth:.086,furLength:1.62}},Qme={silver:[{points:[[-.04,.75],[-.1,.61],[-.07,.43],[-.045,.28]],width:.035,opacity:.82},{points:[[.06,.74],[.105,.59],[.07,.41],[.04,.27]],width:.032,opacity:.76},{points:[[-.37,.67],[-.32,.54],[-.25,.43],[-.205,.32]],width:.035,opacity:.58},{points:[[.36,.67],[.31,.52],[.24,.43],[.2,.32]],width:.034,opacity:.57},{points:[[-.3,.55],[-.19,.575],[-.1,.5]],width:.026,opacity:.51},{points:[[.3,.55],[.19,.56],[.1,.49]],width:.025,opacity:.49},{points:[[-.49,.04],[-.65,-.015],[-.8,.02],[-.9,.095]],width:.04,opacity:.67},{points:[[.49,.04],[.66,-.02],[.8,.02],[.9,.09]],width:.04,opacity:.67},{points:[[-.57,-.16],[-.72,-.19],[-.9,-.12]],width:.035,opacity:.5},{points:[[.57,-.16],[.73,-.19],[.9,-.12]],width:.035,opacity:.5}],orange:[{points:[[-.035,.71],[-.09,.55],[-.045,.37],[-.075,.22]],width:.067,opacity:.9},{points:[[.04,.72],[.105,.55],[.065,.35],[.09,.19]],width:.067,opacity:.9},{points:[[-.38,.68],[-.34,.53],[-.26,.4],[-.2,.29]],width:.062,opacity:.75},{points:[[.37,.68],[.33,.52],[.27,.39],[.21,.29]],width:.06,opacity:.74},{points:[[-.33,.54],[-.2,.565],[-.11,.46]],width:.048,opacity:.62},{points:[[.32,.535],[.19,.545],[.12,.46]],width:.045,opacity:.61},{points:[[-.55,.33],[-.7,.23],[-.93,.27]],width:.065,opacity:.64},{points:[[.55,.33],[.71,.23],[.94,.27]],width:.065,opacity:.64},{points:[[-.53,-.04],[-.71,-.12],[-.97,-.065]],width:.068,opacity:.69},{points:[[.53,-.04],[.72,-.1],[.97,-.045]],width:.062,opacity:.64}]};function h3(e){return Xme[e.coat]}function Yme(e,t){let r=(t+.045)/e.head[1],n=Math.max(0,1-(r/.8)**2)**3;return e.head[0]*(1+.025*Math.exp(-(((r+.12)/.82)**2))-.038*n)}var Vb=[{id:"heart",label:"\u5FC3\u5F62"},{id:"triangle",label:"\u5706\u89D2\u4E09\u89D2"},{id:"diamond",label:"\u83F1\u5F62"},{id:"round",label:"\u5706\u5F62"},{id:"square",label:"\u5706\u89D2\u65B9\u5F62"},{id:"capsule",label:"\u80F6\u56CA"}],hd=[{id:"coral",label:"\u73CA\u745A",color:"#E99589"},{id:"sage",label:"\u7070\u7EFF",color:"#A9BDA7"},{id:"lavender",label:"\u6DE1\u7D2B",color:"#BFB0D9"},{id:"cream",label:"\u5976\u6CB9",color:"#E8D8B8"},{id:"blue",label:"\u96FE\u84DD",color:"#A9C6D5"},{id:"ochre",label:"\u8D6D\u9EC4",color:"#D4AE65"}],Gb=[{id:"none",label:"\u65E0\u773C\u955C"},{id:"gold",label:"\u91D1\u6846\u773C\u955C"},{id:"ink",label:"\u9ED1\u6846\u773C\u955C"}],Kb=[{id:"none",label:"\u65E0\u5E3D\u5B50"},{id:"beanie",label:"\u9488\u7EC7\u5E3D"},{id:"beret",label:"\u8D1D\u96F7\u5E3D"}];function Bq(e){return"kind"in e&&e.kind==="dog"}function Xb(e){return e==="plush-dog:v1:shiba:red-scarf"?{version:1,kind:"dog",breed:"shiba",scarf:"red"}:null}function g3(e){return"kind"in e&&e.kind==="cat"}function Qb(e){return e==="plush-cat:v1:silver"?{version:1,kind:"cat",coat:"silver"}:e==="plush-cat:v1:orange"?{version:1,kind:"cat",coat:"orange"}:null}function q2(e){let t=Wme(e);return Xb(t)??Qb(t)??Jb({...e,avatar:t})}function R2(e,t){return e.some(r=>r.id===t)}function x0(e){let t=e.split(":");if(t.length!==6||t[0]!=="plush"||t[1]!=="v1")return null;let[,,r,n,a,o]=t;return!R2(Vb,r)||!R2(hd,n)||!R2(Gb,a)||!R2(Kb,o)?null:{version:1,shape:r,color:n,glasses:a,hat:o}}function F3(e){let t=`plush:v${e.version}:${e.shape}:${e.color}:${e.glasses}:${e.hat}`;if(!x0(t))throw new Error("\u6BDB\u7ED2\u5934\u50CF\u914D\u7F6E\u65E0\u6548\u3002");return t}function Jme(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t=Math.imul(t^e.charCodeAt(r),16777619);return t=Math.imul(t^t>>>16,2246822507),t=Math.imul(t^t>>>13,3266489909),(t^t>>>16)>>>0}function Yb({id:e,name:t}){let r=(e??"").trim()||(t??"").trim()||"member",n=(a,o)=>o[Jme(`plush:v1:${r}:${a}`)%o.length].id;return{version:1,shape:n("shape",Vb),color:n("color",hd),glasses:n("glasses",Gb),hat:n("hat",Kb)}}function Jb(e){let t=e.avatar??"";return t.startsWith("data:image/")||/^cat:\d+$/.test(t)?null:x0(t)??Yb(e)}var ft=A(xe(),1),O2=rf.plushAvatarChunkSrc,Iq=3,Mq=1,Zme=[750,2e3],qb=null,v3=!1,yq=0,y0=new Set,fn={status:"idle",assetPath:O2.split("?")[0],attempts:0,cycleAttempts:0,maxCycleAttempts:Iq,onlineRecoveries:0,maxOnlineRecoveries:Mq,startedAt:0,finishedAt:0};globalThis.__wandPlushLoaderDiagnostics=()=>({...fn});function ehe(){return new Promise((e,t)=>{let r=document.createElement("script"),n=!1,a=u=>{n||(n=!0,window.clearTimeout(o),r.onload=r.onerror=null,u?(r.remove(),t(u)):e(globalThis.__wandPlushRuntime))},o=window.setTimeout(()=>a("timeout"),15e3);r.async=!0,r.onload=()=>a(globalThis.__wandPlushRuntime?void 0:"loaded-missing-runtime"),r.onerror=()=>a("download");let l=fn.attempts<=1?O2:`${O2}${O2.includes("?")?"&":"?"}wandPlushRetry=${fn.attempts}`;try{r.src=l,document.head.append(r)}catch{a("download")}})}function the(){let e=globalThis;return e.__wandPlushRuntime?(fn.status="ready",fn.failure=void 0,Promise.resolve(e.__wandPlushRuntime)):qb||(v3?Promise.reject(fn.failure):(fn.status="loading",fn.startedAt=Date.now(),fn.finishedAt=0,fn.cycleAttempts=0,qb=(async()=>{for(let t=0;t<Iq;t++){if(t&&await new Promise(r=>window.setTimeout(r,Zme[t-1])),e.__wandPlushRuntime)return fn.status="ready",fn.failure=void 0,fn.finishedAt=Date.now(),e.__wandPlushRuntime;fn.attempts++,fn.cycleAttempts++;try{let r=await ehe();return fn.status="ready",fn.failure=void 0,fn.finishedAt=Date.now(),r}catch(r){fn.failure=r==="timeout"||r==="loaded-missing-runtime"?r:"download"}}throw v3=!0,fn.status="failed",fn.finishedAt=Date.now(),fn.failure})().finally(()=>{qb=null}),qb))}function Tq(e){if(qb||fn.status!=="failed"||!y0.size||e&&yq>=Mq)return!1;e&&(fn.onlineRecoveries=++yq),v3=!1;for(let t of y0)t();return!0}var wq=()=>{Tq(!0)};function rhe(){return Tq(!1)}var nhe=2500,_q=650,ahe=1e3,z2=!1,w0=!1,L2=!1,b3=0,jq=0,p3=!1,ff=new Set;function xq(){document.hidden||$3()}function $3(){if(w0)return;if(!ff.size){L2=!1;return}if(document.hidden){document.addEventListener("visibilitychange",xq,{once:!0});return}if(p3)return;p3=!0;let e=()=>{if(p3=!1,w0)return;if(!ff.size){L2=!1;return}if(document.hidden){document.addEventListener("visibilitychange",xq,{once:!0});return}w0=!0;let t=[...ff];ff.clear();for(let r of t)r()};typeof window.requestIdleCallback=="function"?window.requestIdleCallback(e,{timeout:ahe}):window.setTimeout(e,0)}function y3(){z2||(z2=!0,window.clearTimeout(b3),b3=0,window.removeEventListener("load",y3),jq=window.setTimeout($3,_q))}function ihe(){if(!(w0||L2||!ff.size)){if(L2=!0,z2||document.readyState==="complete"){z2=!0,jq=window.setTimeout($3,_q);return}window.addEventListener("load",y3,{once:!0}),b3=window.setTimeout(y3,Math.max(0,nhe-performance.now()))}}function ohe(e){return w0?(e(),()=>{}):(ff.add(e),ihe(),()=>{ff.delete(e)})}var Nq=__wandCssTextPool[9],she={heart:"M50 84C42 80 13 61 13 35C13 13 37 9 50 27C63 9 87 13 87 35C87 61 58 80 50 84Z",triangle:"M42 20Q50 7 58 20L86 68Q95 86 76 87H24Q5 86 14 68Z",diamond:"M41 15Q50 6 59 15L85 41Q94 50 85 59L59 85Q50 94 41 85L15 59Q6 50 15 41Z",round:"M88 50A38 38 0 1 1 12 50A38 38 0 1 1 88 50Z",square:"M32 14H68Q86 14 86 32V68Q86 86 68 86H32Q14 86 14 68V32Q14 14 32 14Z",capsule:"M50 9Q79 9 79 39V61Q79 91 50 91Q21 91 21 61V39Q21 9 50 9Z"};function Pq({config:e}){let t=Fs.useId();if(Bq(e))return(0,ft.jsxs)("svg",{className:"wand-plush-avatar-fallback",viewBox:"0 0 100 100","aria-hidden":"true",children:[(0,ft.jsx)("path",{d:"M17 42L21 9Q23 4 28 10L43 28H57L72 10Q77 4 79 9L83 42V65Q83 84 50 85Q17 84 17 65Z",fill:"#cb803f"}),(0,ft.jsx)("path",{d:"M24 17L27 35L36 30ZM76 17L73 35L64 30Z",fill:"#eebf90"}),(0,ft.jsx)("path",{d:"M18 58Q30 58 37 47Q50 43 63 47Q70 58 82 58V65Q82 81 50 82Q18 81 18 65",fill:"#fff0da"}),(0,ft.jsx)("ellipse",{cx:"35",cy:"45",rx:"4",ry:"5",fill:"#29201b"}),(0,ft.jsx)("ellipse",{cx:"65",cy:"45",rx:"4",ry:"5",fill:"#29201b"}),(0,ft.jsx)("path",{d:"M44 58Q50 55 56 58Q57 63 50 65Q43 63 44 58Z",fill:"#29201b"}),(0,ft.jsx)("path",{d:"M50 65v4m-10 0q10 9 20 0",fill:"none",stroke:"#66402b",strokeWidth:"2",strokeLinecap:"round"}),(0,ft.jsx)("path",{d:"M24 77Q50 87 76 77L78 86Q50 97 22 86Z",fill:"#c43f3b"}),(0,ft.jsx)("path",{d:"M62 83L77 86L73 98L60 93Z",fill:"#ae302d"})]});if(g3(e)){let n=e.coat==="silver",a=h3(e),{coat:o,dark:l,pale:u,iris:d,innerEar:p,nose:h}=a,v=E=>50+E*36,g=E=>50-E*36,b=[];for(let E of[-1,1])for(let F=0;F<=48;F++){let S=(E<0?F:48-F)/48*Math.PI,D=Math.cos(S)*a.head[1]-.045,$=!n&&D<.2&&D>-.55&&F%3===0?.035:0;b.push([v(E*(Math.sin(S)*Yme(a,D)+$)),g(D)])}let x=b.map(([E,F],S)=>`${S?"L":"M"}${E} ${F}`).join(" ")+"Z",y=E=>Array.from({length:65},(F,S)=>{let D=S/64*Math.PI*2,$=Math.cos(D),C=Math.sin(D);return`${S?"L":"M"}${v(E*a.eyeX+$*a.eyeWidth)} ${g(a.eyeY+Math.sign(C)*Math.pow(Math.abs(C),.82)*(C>=0?a.eyeUpper:a.eyeLower)+E*$*.018)}`}).join(" ")+"Z";return(0,ft.jsxs)("svg",{className:"wand-plush-avatar-fallback",viewBox:"0 0 100 100","aria-hidden":"true",children:[(0,ft.jsxs)("defs",{children:[(0,ft.jsx)("clipPath",{id:t,children:(0,ft.jsx)("path",{d:x})}),(0,ft.jsxs)("radialGradient",{id:`${t}-jaw`,cx:"50",cy:g(a.chinY),r:a.chinWidth*56,gradientUnits:"userSpaceOnUse",children:[(0,ft.jsx)("stop",{offset:"0",stopColor:u}),(0,ft.jsx)("stop",{offset:".65",stopColor:u,stopOpacity:".97"}),(0,ft.jsx)("stop",{offset:"1",stopColor:u,stopOpacity:".86"})]})]}),[-1,1].map(E=>(0,ft.jsxs)("g",{transform:`translate(${v(E*a.earX)} ${g(a.earY)}) rotate(${E*16})`,children:[(0,ft.jsx)("path",{d:"M-.18 -.93 Q0 -1.22 .18 -.93 L.87 .48 Q1.03 .8 .66 .83 Q0 .92 -.66 .83 Q-1.03 .8 -.87 .48Z",transform:`scale(${a.ear[0]*36} ${a.ear[1]*36})`,fill:o}),(0,ft.jsx)("path",{d:"M-.18 -.93 Q0 -1.22 .18 -.93 L.87 .48 Q1.03 .8 .66 .83 Q0 .92 -.66 .83 Q-1.03 .8 -.87 .48Z",transform:`translate(0 .7) scale(${a.ear[0]*21} ${a.ear[1]*23})`,fill:p})]},E)),(0,ft.jsx)("path",{d:x,fill:o}),(0,ft.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,ft.jsx)("path",{d:n?"M16 63Q25 57 32 57Q35 53 44 53Q50 51 56 53Q65 53 68 57Q75 57 84 63L78 94H22Z":"M10 64Q24 61 28 62Q34 64 40 54Q47 53 48 48Q49 40 52 45Q53 53 61 53Q63 61 76 62L89 66L82 94H16Z",fill:`url(#${t}-jaw)`}),Qme[e.coat].map((E,F)=>(0,ft.jsx)("path",{d:E.points.map(([S,D],$)=>`${$?"L":"M"}${v(S)} ${g(D)}`).join(" "),fill:"none",stroke:l,strokeWidth:E.width*56,opacity:E.opacity,strokeLinecap:"round",strokeLinejoin:"round"},F))]}),[-1,1].map(E=>(0,ft.jsxs)("g",{children:[(0,ft.jsx)("path",{d:y(E),fill:d,stroke:"#354134",strokeWidth:".8"}),(0,ft.jsx)("ellipse",{cx:v(E*a.eyeX-E*.008),cy:g(a.eyeY),rx:a.pupilWidth*36,ry:a.pupilHeight*36,fill:"#152018"}),(0,ft.jsx)("ellipse",{cx:v(E*a.eyeX-.041),cy:g(a.eyeY+.048),rx:".54",ry:".75",fill:"#f5f2df"}),(n?[0,1,2]:[0,1,2,3]).map(F=>(0,ft.jsx)("path",{"data-whisker":n?"straight":"curly",d:n?`M${v(E*.18)} ${g(a.muzzleY-F*.013)}Q${v(E*.63)} ${g(a.muzzleY+.115-F*.074)} ${v(E*(.97+F%2*.09))} ${g(a.muzzleY+.19-F*.143)}`:Kme(F,E,a.muzzleY),fill:"none",stroke:"#eae5d8",strokeWidth:n?".3":".36"},F))]},E)),(0,ft.jsx)("path",{d:`M${v(-a.noseWidth)} ${g(a.noseY+a.noseHeight*.4)}Q50 ${g(a.noseY+a.noseHeight*.65)} ${v(a.noseWidth)} ${g(a.noseY+a.noseHeight*.4)}L50 ${g(a.noseY-a.noseHeight*.7)}Z`,fill:h,stroke:"#665344",strokeWidth:".45"}),(0,ft.jsx)("path",{d:`M50 ${g(a.noseY-a.noseHeight*.6)}V${g(a.mouthY+.035)}m-4 1q4-1 8 0`,fill:"none",stroke:"#665344",strokeWidth:".6",strokeLinecap:"round"})]})}let r=hd.find(n=>n.id===e.color)?.color??"#ecb6a3";return(0,ft.jsxs)("svg",{className:"wand-plush-avatar-fallback",viewBox:"0 0 100 100","aria-hidden":"true",children:[(0,ft.jsx)("path",{d:she[e.shape],fill:r}),(0,ft.jsx)("ellipse",{cx:"38",cy:"51",rx:"2.6",ry:"4",fill:"#25211e"}),(0,ft.jsx)("ellipse",{cx:"62",cy:"51",rx:"2.6",ry:"4",fill:"#25211e"}),(0,ft.jsx)("path",{d:"M45 62Q50 68 55 62",fill:"none",stroke:"#25211e",strokeWidth:"2.3",strokeLinecap:"round"}),e.glasses!=="none"?(0,ft.jsxs)("g",{fill:"none",stroke:e.glasses==="gold"?"#a88143":"#302d29",strokeWidth:e.glasses==="gold"?1.4:2.2,children:[(0,ft.jsx)("circle",{cx:"38",cy:"50",r:"10"}),(0,ft.jsx)("circle",{cx:"62",cy:"50",r:"10"}),(0,ft.jsx)("path",{d:"M48 49Q50 47 52 49M28 48H18M72 48H82"})]}):null,e.hat==="beanie"?(0,ft.jsxs)("g",{fill:"#b96843",children:[(0,ft.jsx)("path",{d:"M23 28Q24 2 50 2Q76 2 77 28Z"}),(0,ft.jsx)("rect",{x:"20",y:"21",width:"60",height:"10",rx:"4"}),(0,ft.jsx)("circle",{cx:"50",cy:"4",r:"7"})]}):null,e.hat==="beret"?(0,ft.jsxs)("g",{fill:"#e9dfca",children:[(0,ft.jsx)("ellipse",{cx:"51",cy:"19",rx:"33",ry:"12",transform:"rotate(12 51 19)"}),(0,ft.jsx)("path",{d:"M54 9L55 3",stroke:"#d4c6a9",strokeWidth:"4"})]}):null]})}function D3({config:e,size:t=32,className:r=""}){return Fs.useEffect(()=>{_a("wand-plush-avatar-styles",Nq)},[]),(0,ft.jsx)("span",{className:`wand-plush-avatar ${r}`.trim(),"data-plush-avatar":"","data-avatar-config":JSON.stringify(e),"data-renderer":"static","aria-hidden":"true",style:{width:t,height:t},children:(0,ft.jsx)(Pq,{config:e})})}function E0({config:e,size:t=32,className:r="",speaking:n=!1,thinking:a=!1,loading:o=!1,fileActivity:l="idle",interactive:u=!1,onRendererChange:d}){let p=Fs.useRef(null),h=Fs.useRef(null),v=Za(),[g,b]=Fs.useState("deferred"),[x,y]=Fs.useState("static"),[E,F]=Fs.useState(),S=JSON.stringify(e),D=Fs.useRef({config:e,size:t,speaking:n,thinking:a,fileActivity:l,interactive:u,reducedMotion:v}),$=Fs.useRef(d);return $.current=d,D.current={config:e,size:t,speaking:n,thinking:a,fileActivity:l,interactive:u,reducedMotion:v},Fs.useEffect(()=>{_a("wand-plush-avatar-styles",Nq);let C=p.current;if(!C)return;let B=!0,M=!1,I=!1,j="",N=null,R=null,L=null,q=(H,V)=>{let Q=`${H}:${V??""}`;j!==Q&&(j=Q,$.current?.(H,V))},W=()=>{!B||M||h.current||(M=!0,I=!1,L?.disconnect(),b("loading"),y("static"),F(void 0),q("loading"),the().then(H=>{M=!1,B&&(h.current=H.attach(C,D.current,(V,Q,X)=>{B&&(b(V),y(Q),F(X),q(V,X))}))},()=>{M=!1,I=!0,B&&(b("fallback"),y("fallback"),F("runtime-load"),q("fallback","runtime-load"))}))},U=()=>{if(!(!B||M||h.current)){if(R?.(),R=null,document.hidden){let H=()=>{document.hidden||(document.removeEventListener("visibilitychange",H),R=null,U())};document.addEventListener("visibilitychange",H),R=()=>document.removeEventListener("visibilitychange",H);return}if(u||w0){W();return}N||(N=ohe(()=>{N=null,W()}))}};L=new IntersectionObserver(H=>{if(H.some(V=>V.isIntersecting)){U();return}N?.(),N=null},{rootMargin:"48px"}),L.observe(C);let P=()=>{I&&W()};return y0.size||window.addEventListener("online",wq),y0.add(P),()=>{y0.delete(P),y0.size||window.removeEventListener("online",wq),B=!1,L?.disconnect(),N?.(),N=null,R?.(),R=null,h.current?.dispose(),h.current=null}},[]),Fs.useEffect(()=>{h.current?.update(D.current)},[S,t,n,a,l,u,v]),(0,ft.jsxs)("span",{className:`wand-plush-avatar ${r}`.trim(),"data-plush-avatar":"","data-avatar-config":S,"data-avatar-breed":g3(e)?h3(e).breed:void 0,"data-file-activity":l,"data-renderer":g,"data-render-state":x,"data-fallback-reason":E,title:g==="fallback"?E==="webgl-unavailable"?"\u9759\u6001\u5934\u50CF \xB7 \u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 3D":E==="runtime-load"?"\u9759\u6001\u5934\u50CF \xB7 3D \u7EC4\u4EF6\u672A\u80FD\u52A0\u8F7D":"\u9759\u6001\u5934\u50CF \xB7 3D \u6682\u4E0D\u53EF\u7528":void 0,"aria-hidden":"true",style:{width:t,height:t},children:[g==="webgl"?null:(0,ft.jsx)(Pq,{config:e}),(0,ft.jsx)("canvas",{ref:p,width:t,height:t}),l!=="idle"?(0,ft.jsx)(Aq,{activity:l,pawColor:g3(e)?h3(e).coat:Bq(e)?"#cb803f":hd.find(C=>C.id===e.color)?.color??"#ecb6a3"}):o||a||g==="loading"?(0,ft.jsx)(H2,{}):null]})}var Wb=[{name:"\u6A58\u732B",base:"#F0923A",dark:"#C46A1A",light:"#F0923A"},{name:"\u94F6\u6E10\u5C42",base:"#9EAAB8",dark:"#6B7B8D",light:"#C5CED8",eye:"#3F8F55"},{name:"\u5976\u725B\u732B",base:"#F4F1EA",dark:"#2F2F33",light:"#F4F1EA"},{name:"\u9ED1\u732B",base:"#3A3A40",dark:"#1E1E22",light:"#55555C",eye:"#E9C63F"},{name:"\u66B9\u7F57",base:"#E9DCC4",dark:"#6B4A36",light:"#F4ECDD",eye:"#3F7FD8"},{name:"\u84DD\u732B",base:"#7C8BA6",dark:"#56627A",light:"#98A6BE",eye:"#E0A43A"},{name:"\u4E09\u82B1",base:"#F2E6D4",dark:"#C46A1A",light:"#3A3A40"},{name:"\u6A31\u7C89",base:"#F2B8C6",dark:"#C9788D",light:"#F8D3DC"}],tn="";function lhe(e){let t=Wb[e%Wb.length],r=t.base,n=t.dark,a=t.light??t.base,o="#FFFFFF",l=t.eye??"#2D2D2D",u="#F28B9A";return[[tn,n,tn,tn,tn,tn,tn,tn,n,tn],[n,r,n,tn,tn,tn,tn,n,r,n],[n,r,r,r,r,r,r,r,r,n],[r,r,o,l,r,r,o,l,r,r],[r,r,o,o,r,r,o,o,r,r],[r,r,r,r,u,u,r,r,r,r],[r,n,r,a,r,r,a,r,n,r],[tn,r,r,r,r,r,r,r,r,tn],[tn,tn,r,n,r,r,n,r,tn,tn],[tn,tn,tn,r,tn,tn,r,tn,tn,tn]]}function Rq(e,t){let r=0;for(let n=0;n<e.length;n+=1)r=(r<<5)-r+e.charCodeAt(n)|0;return Math.abs(r)%t}function Oq(e){let t=/^cat:(\d+)$/.exec(e.avatar??"");return t?Number(t[1])%Wb.length:Rq(e.id||e.name||"member",Wb.length)}var uhe="#FFFFFF",Eq=[{name:"\u8D6D\u6A59",from:"#A8471F",to:"#7E3214"},{name:"\u6E56\u84DD",from:"#2F6DB5",to:"#1F4E8A"},{name:"\u677E\u7EFF",from:"#2E7D5B",to:"#1C5B41"},{name:"\u7D2B\u68E0",from:"#6B4EA8",to:"#4F3883"},{name:"\u975B\u9752",from:"#2C6E7F",to:"#1B4F5E"},{name:"\u7EDB\u7EA2",from:"#B03A48",to:"#872633"},{name:"\u82A5\u9EC4",from:"#8A6A16",to:"#674D0D"},{name:"\u77F3\u9752",from:"#4A5B8C",to:"#34426A"}],che=/^cat:(\d+)$/;function dhe({id:e,name:t}){return(e??"").trim()||(t??"").trim()||"member"}function phe({id:e,name:t}){let r=(t??"").trim()||(e??"").trim(),n=Array.from(r)[0]??"";return n?/^[a-z]$/.test(n)?n.toUpperCase():n:"?"}function Zb(e){let t=Eq[Rq(dhe(e),Eq.length)];return{from:t.from,to:t.to,text:uhe,glyph:phe(e)}}function W2(e){return{background:`linear-gradient(135deg, ${e.from}, ${e.to})`,color:e.text}}function zq(e){let t=e.avatar??"";return t.startsWith("data:image/")?{kind:"upload",src:t}:!e.id&&!e.name?null:che.test(t)?{kind:"cat",coat:Oq({id:e.id??"",name:e.name??"",avatar:t})}:{kind:"generated",face:Zb(e)}}var sa=A(xe(),1);function Lq({coat:e}){let t=lhe(e),r=new Map;for(let n=0;n<t.length;n+=1){let a=t[n];for(let o=0;o<a.length;o+=1){let l=a[o];if(!l)continue;let u=r.get(l);u?u.push(`M${o} ${n}h1v1h-1z`):r.set(l,[`M${o} ${n}h1v1h-1z`])}}return(0,sa.jsx)("svg",{className:"wand-team-avatar-cat",width:"74%",height:"74%",viewBox:"0 0 10 10",shapeRendering:"crispEdges","aria-hidden":"true",children:[...r].map(([n,a])=>(0,sa.jsx)("path",{d:a.join(""),fill:n},n))})}function U2({face:e,size:t}){return(0,sa.jsx)("span",{className:"wand-generated-avatar-glyph","aria-hidden":"true",style:{display:"block",fontSize:Math.max(10,Math.round(t*.42)),fontWeight:600,lineHeight:1,color:e.text},children:e.glyph})}function V2(e,t){let r=Xb(e.avatar??"")??Qb(e.avatar??"")??x0(e.avatar??"");if(r)return{style:{background:"transparent"},icon:(0,sa.jsx)(E0,{config:r,size:t})};let n=zq(e)??{kind:"generated",face:Zb(e)};return n.kind==="upload"?{src:n.src}:n.kind==="cat"?{icon:(0,sa.jsx)(Lq,{coat:n.coat})}:{style:W2(n.face),icon:(0,sa.jsx)(U2,{face:n.face,size:t})}}function Hq({member:e,size:t="md",state:r="idle",showProvider:n=!1,className:a}){let o={sm:36,md:48,lg:56}[t],l=r==="done"?"var(--success)":r==="failed"?"var(--danger)":r==="waiting"?"var(--warning)":r==="working"?"var(--info)":void 0,u=e.employeeId?q2({...e,id:e.employeeId}):null,d=u?{style:{background:"transparent"},icon:(0,sa.jsx)(E0,{config:u,size:o})}:V2(e,o);return(0,sa.jsx)(Bt,{children:(0,sa.jsx)(qi,{className:et("wand-team-avatar",a),"data-size":t,"data-state":r==="idle"?void 0:r,"data-leader":e.isLeader||void 0,title:e.name,offset:[-o/2,-4],count:e.isLeader?(0,sa.jsx)("span",{"aria-hidden":"true",style:{color:"var(--warning)"},children:"\u265B"}):void 0,children:(0,sa.jsx)(qi,{offset:[0,o],count:r==="done"?(0,sa.jsx)(Yo,{size:16,style:{background:l},icon:(0,sa.jsx)("span",{children:"\u2713"})}):n?(0,sa.jsx)(Yo,{size:18,shape:"square",icon:(0,sa.jsx)(Xo,{provider:e.agent.provider})}):void 0,children:(0,sa.jsx)(Yo,{shape:"square",size:o,src:d.src,style:{...d.style,outline:l?`2px solid ${l}`:void 0,outlineOffset:1},icon:d.icon})})})})}function fhe({members:e,max:t=5,size:r="sm"}){let n=[...e].sort((a,o)=>Number(o.isLeader)-Number(a.isLeader));return(0,sa.jsx)(Bt,{children:(0,sa.jsx)(Yo.Group,{className:"wand-team-avatar-stack","data-size":r,max:{count:t},children:n.map((a,o)=>(0,sa.jsx)(Hq,{member:a,size:r},a.id||o))})})}async function A3(e,t){let r=URL.createObjectURL(e);try{let n=await new Promise((d,p)=>{let h=new Image;h.onload=()=>d(h),h.onerror=()=>p(new Error("\u56FE\u7247\u8BFB\u53D6\u5931\u8D25\u3002")),h.src=r}),a=document.createElement("canvas");a.width=96,a.height=96;let o=a.getContext("2d");if(!o)throw new Error("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u56FE\u7247\u88C1\u526A\u3002");let l=Math.min(n.naturalWidth,n.naturalHeight);o.drawImage(n,(n.naturalWidth-l)/2,(n.naturalHeight-l)/2,l,l,0,0,96,96);let u=a.toDataURL("image/jpeg",.8);if(u.length>t)throw new Error("\u56FE\u7247\u592A\u5927\uFF0C\u8BF7\u6362\u4E00\u5F20\u3002");return u}finally{URL.revokeObjectURL(r)}}var B3="\u6211",mhe=6e4,hhe=/^data:image\/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$/,ghe=/^cat:(\d{1,2})$/,qq=24;function Wq(e){return typeof e=="string"?e.trim():""}function vhe(e){return ghe.test(e)||hhe.test(e)||!!(x0(e)??Qb(e)??Xb(e))}function bhe(e){let t=Wq(e);return!t||t.length<=mhe&&vhe(t)?t:""}function I3(e){if(!e||typeof e!="object")return;let t=e,r=Wq(t.name).slice(0,qq),n=bhe(t.avatar);if(!(!r&&!n))return{...r?{name:r}:{},...n?{avatar:n}:{}}}function ga(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function k0(e){return ga(e)?e:{}}function Ge(e,t=""){return typeof e=="string"?e:t}function Na(e,t=0){return typeof e=="number"&&Number.isFinite(e)?e:t}async function $s(e){try{let t=await e.json();return ga(t)?t:{error:"\u670D\u52A1\u7AEF\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6570\u636E\uFF0C\u8BF7\u91CD\u8BD5\u3002"}}catch(t){if(t instanceof Error&&t.name==="AbortError")throw t;return{error:e.ok?"\u670D\u52A1\u7AEF\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6570\u636E\uFF0C\u8BF7\u91CD\u8BD5\u3002":`\u8BF7\u6C42\u5931\u8D25\uFF08${e.status}\uFF09`}}}var Uq={sessions:"sessions","structured-sessions":"sessions",commands:"sessions","session-list":"sessions","session-directories":"sessions",conversations:"conversations","wand-tasks":"tasks","wand-task-agent-defaults":"tasks",tasks:"tasks","workspace-tasks":"tasks",workspaces:"tasks","wand-milestones":"tasks",missions:"tasks","scheduled-tasks":"tasks",files:"files",upload:"files",directory:"files","session-files":"files","file-preview":"files","file-read":"files","file-write":"files","recent-paths":"files",settings:"settings",config:"settings","user-profile":"settings","auto-update":"settings","update-channel":"settings",models:"models","model-groups":"models","local-models":"models",login:"authentication",logout:"authentication","app-login":"authentication","session-check":"authentication","set-password":"authentication",update:"server_update","update-status":"server_update","check-update":"server_update","android-apk-update":"app_update","android-apk":"app_update","macos-app-update":"app_update","macos-dmg-update":"app_update","macos-dmg":"app_update","ios-ipa-update":"app_update","ios-ipa":"app_update","provider-cli-updates":"provider_update","daemon-maintenance":"daemon_update","storage-cleanup":"storage",git:"repository",github:"repository"};function yhe(e){let t=e.split("?")[0].split("/")[2]??"";return Object.prototype.hasOwnProperty.call(Uq,t)?Uq[t]:"api"}function M3(e){let t;try{t=new URL(e,"https://wand.invalid").pathname}catch{return"api"}return yhe(t)}var Vq=null,e1=new Map,T3=0;function j3(e){Vq=e}function whe(e,t){let r=new TextEncoder;return r.encode(e).length<=t?e:new TextDecoder().decode(r.encode(e).subarray(0,t-3)).replace(/\uFFFD$/,"")+"\u2026"}function _3(e,t){return whe(e.replace(/\b(Bearer|Basic)\s+[^\s"',;]+/gi,"$1 [REDACTED]").replace(/((?:authorization|cookie|set-cookie)\s*:\s*)[^\r\n]+/gi,"$1[REDACTED]").replace(/(["']?(?:password|passwd|api[_-]?key|access[_-]?token|refresh[_-]?token|token|secret)["']?\s*[:=]\s*)(?:"[^"\r\n]*"|'[^'\r\n]*'|[^\s&,;\r\n}]+)/gi,"$1[REDACTED]").replace(/(https?:\/\/)[^\s/@]+:[^\s/@]+@/gi,"$1[REDACTED]@"),t)}function _u(e,t,r){try{let n=Vq;if(!n||!n.ready()||!n.secure()||T3>=2||!(t instanceof Error)&&typeof t!="string"||t instanceof Error&&(t.name==="AbortError"||t.name==="CancellationError"))return;let a=t instanceof Error?t.name:"Error",o=r??(e==="update_failed"?"server_update":e==="websocket_error"?"realtime":e==="http_5xx"?"api":e==="startup_failed"?"startup":"runtime"),l=`${o}:${e}:${a}`,u=Date.now();if(u-(e1.get(l)??0)<5*6e4)return;e1.size>=32&&e1.delete(e1.keys().next().value),e1.set(l,u);let d=n.version(),p={schema:1,source:"web",event:e,feature:o,version:/^\d+\.\d+\.\d+(?:[-+][A-Za-z0-9.-]{1,80})?$/.test(d)?d:"0.0.0",error:{name:_3(a,128),message:_3(t instanceof Error?t.message:t,8192),stack:_3(t instanceof Error?t.stack??"":"",16384)}};if(new TextEncoder().encode(JSON.stringify(p)).length>32768)return;T3++,Promise.resolve().then(()=>n.fetch("/api/feedback/client",{method:"POST",credentials:"same-origin",redirect:"error",headers:{"Content-Type":"application/json"},body:JSON.stringify(p),signal:AbortSignal.timeout(3e3)})).then(h=>h.body?.cancel()).catch(()=>{}).finally(()=>{T3--})}catch{}}function N3(e){let t=n=>{n.error instanceof Error&&_u("uncaught_exception",n.error)},r=n=>_u("unhandled_rejection",n.reason);return e.addEventListener("error",t),e.addEventListener("unhandledrejection",r),()=>{e.removeEventListener("error",t),e.removeEventListener("unhandledrejection",r)}}var Pa=class extends Error{constructor(e,t,r){super(e),ae(this,"status",t),this.name="HttpResponseError",t>=500&&_u("http_5xx",this,r)}};function P3(){let e=globalThis.crypto;if(typeof e?.randomUUID=="function")return e.randomUUID();if(typeof e?.getRandomValues!="function")throw new Error("\u5F53\u524D\u6D4F\u89C8\u5668\u65E0\u6CD5\u751F\u6210\u8BF7\u6C42\u6807\u8BC6\uFF0C\u8BF7\u4F7F\u7528\u652F\u6301\u5B89\u5168\u968F\u673A\u6570\u7684\u6D4F\u89C8\u5668\u3002");let t=e.getRandomValues(new Uint8Array(16));t[6]=t[6]&15|64,t[8]=t[8]&63|128;let r=Array.from(t,n=>n.toString(16).padStart(2,"0"));return`${r.slice(0,4).join("")}-${r.slice(4,6).join("")}-${r.slice(6,8).join("")}-${r.slice(8,10).join("")}-${r.slice(10).join("")}`}async function It(e){let t;try{t=await e.json()}catch(n){throw n instanceof Error&&n.name==="AbortError"?n:new Pa(e.ok?"\u670D\u52A1\u7AEF\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6570\u636E\uFF0C\u8BF7\u91CD\u8BD5\u3002":`\u8BF7\u6C42\u5931\u8D25\uFF08${e.status}\uFF09`,e.status,M3(e.url))}let r=ga(t)&&typeof t.error=="string"?t.error:"";if(!e.ok||r)throw new Pa(r||`\u8BF7\u6C42\u5931\u8D25\uFF08${e.status}\uFF09`,e.status,M3(e.url));if(t===null||typeof t!="object")throw new Pa("\u670D\u52A1\u7AEF\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6570\u636E\uFF0C\u8BF7\u91CD\u8BD5\u3002",e.status,M3(e.url));return t}async function mt(e,t){let r;try{r=await fetch(e,t)}catch(n){throw n instanceof Error&&n.name==="AbortError"?n:new Pa("\u65E0\u6CD5\u8FDE\u63A5\u670D\u52A1\u3002\u8BF7\u68C0\u67E5\u7F51\u7EDC\u6216\u786E\u8BA4 Wand \u670D\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u7136\u540E\u91CD\u8BD5\u3002",0)}return It(r)}function rn(e,t="POST"){return{method:t,headers:{"content-type":"application/json"},body:JSON.stringify(e)}}var G2=A(xe(),1);function ju({className:e,style:t}){return(0,G2.jsxs)("svg",{className:e,style:{width:24,height:24,flexShrink:0,...t},viewBox:`0 0 ${Go.viewport} ${Go.viewport}`,"aria-hidden":"true",focusable:"false","data-wand-brand":"pixel-cat",children:[(0,G2.jsx)("rect",{width:Go.viewport,height:Go.viewport,rx:"24",fill:Go.background}),(0,G2.jsx)("g",{transform:`translate(${Go.inset} ${Go.inset})`,children:Go.paths.map(({fill:r,d:n})=>(0,G2.jsx)("path",{fill:r,d:n},r))})]})}var R3=A(xe(),1);function _e({className:e,kind:t="secondary",size:r="medium",type:n="button",ref:a,...o}){return(0,R3.jsx)(Bt,{children:(0,R3.jsx)(Li,{...o,ref:a,htmlType:n,type:t==="soft"?void 0:t==="primary"||t==="danger"?"primary":t==="ghost"?"text":"default",color:t==="soft"?"default":void 0,danger:t==="danger",variant:t==="soft"?"filled":void 0,size:r==="medium"?"middle":r,className:et("wand-ui-button",`wand-ui-button-${t}`,r!=="medium"&&`wand-ui-button-${r}`,e)})})}function Br({className:e,kind:t="ghost",size:r="small",children:n,...a}){return(0,R3.jsx)(_e,{...a,kind:t,size:r,className:et("wand-ui-icon-button",e),children:n})}var Gq=A(_()),xhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},Ehe=xhe;function O3(){return O3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},O3.apply(this,arguments)}var khe=(e,t)=>Gq.createElement(Ut,O3({},e,{ref:t,icon:Ehe})),Che=Gq.forwardRef(khe),z3=Che;var Kq=A(_()),She={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},Fhe=She;function L3(){return L3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},L3.apply(this,arguments)}var $he=(e,t)=>Kq.createElement(Ut,L3({},e,{ref:t,icon:Fhe})),Dhe=Kq.forwardRef($he),H3=Dhe;var Xq=A(_()),Ahe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},Bhe=Ahe;function q3(){return q3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},q3.apply(this,arguments)}var Ihe=(e,t)=>Xq.createElement(Ut,q3({},e,{ref:t,icon:Bhe})),Mhe=Xq.forwardRef(Ihe),W3=Mhe;var Qq=A(_()),The={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},_he=The;function U3(){return U3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},U3.apply(this,arguments)}var jhe=(e,t)=>Qq.createElement(Ut,U3({},e,{ref:t,icon:_he})),Nhe=Qq.forwardRef(jhe),gd=Nhe;var En=A(_()),K2=(e,t,r)=>({background:e,[`${r}-icon`]:{color:t}}),Phe=e=>{let{componentCls:t,motionDurationSlow:r,marginXS:n,marginSM:a,fontSize:o,fontSizeLG:l,lineHeight:u,motionEaseInOutCirc:d,borderRadius:p,withDescriptionIconSize:h,colorText:v,colorTextHeading:g,withDescriptionPadding:b,defaultPadding:x,lineWidth:y,lineType:E,colorSuccessBorder:F,colorWarningBorder:S,colorErrorBorder:D,colorInfoBorder:$}=e;return{[t]:{...Mt(e),position:"relative",display:"flex",alignItems:"center",padding:x,wordWrap:"break-word",borderRadius:p,borderWidth:ue(y),borderStyle:E,[`&${t}-success`]:{borderColor:F},[`&${t}-info`]:{borderColor:$},[`&${t}-warning`]:{borderColor:S},[`&${t}-error`]:{borderColor:D},[`&${t}-filled`]:{borderColor:"transparent"},[`&${t}-rtl`]:{direction:"rtl"},[`${t}-section`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:n,lineHeight:0},"&-description":{display:"none",fontSize:o,lineHeight:u},"&-title":{color:g},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:["max-height","opacity","padding-top","padding-bottom","margin-bottom"].map(C=>`${C} ${r} ${d}`).join(", ")},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0},[`&${t}-with-description`]:{alignItems:"flex-start",padding:b,[`${t}-icon`]:{marginInlineEnd:a,fontSize:h,lineHeight:0},[`${t}-title`]:{display:"block",marginBottom:n,color:g,fontSize:l},[`${t}-description`]:{display:"block",color:v}},[`&${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}}},Rhe=e=>{let{componentCls:t,colorSuccess:r,colorSuccessBg:n,colorWarning:a,colorWarningBg:o,colorError:l,colorErrorBg:u,colorInfo:d,colorInfoBg:p}=e;return{[t]:{"&-success":K2(n,r,t),"&-info":K2(p,d,t),"&-warning":K2(o,a,t),"&-error":{...K2(u,l,t),[`${t}-description > pre`]:{margin:0,padding:0}}}}},Ohe=e=>{let{componentCls:t,iconCls:r,motionDurationMid:n,marginXS:a,fontSizeIcon:o,colorIcon:l,colorIconHover:u}=e;return{[t]:{[`${t}-actions`]:{marginInlineStart:a},[`${t}-close-icon`]:{marginInlineStart:a,padding:0,overflow:"hidden",fontSize:o,lineHeight:ue(o),backgroundColor:"transparent",border:"none",cursor:"pointer",...Tn(e),[`${r}-close`]:{color:l,transition:`color ${n}`,"&:hover":{color:u}}},"&-close-text":{color:l,transition:`color ${n}`,"&:hover":{color:u}}}}},zhe=e=>({borderRadius:e.borderRadiusLG,withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`}),Lhe=ct("Alert",e=>[Phe(e),Rhe(e),Ohe(e)],zhe),Hhe=e=>{let{icon:t,type:r,className:n,style:a,successIcon:o,infoIcon:l,warningIcon:u,errorIcon:d}=e;return En.createElement("span",{className:n,style:a},t??{success:o??En.createElement(W3,null),info:l??En.createElement(z3,null),error:d??En.createElement(Fb,null),warning:u??En.createElement(H3,null)}[r])},qhe=e=>{let{isClosable:t,prefixCls:r,closeIcon:n,handleClose:a,ariaProps:o,className:l,style:u}=e,d=n===!0||n===void 0?En.createElement(gd,null):n;return t?En.createElement("button",{type:"button",onClick:a,className:Y(`${r}-close-icon`,l),tabIndex:0,style:u,...o},d):null},Whe=En.forwardRef((e,t)=>{let{description:r,prefixCls:n,message:a,title:o,banner:l,className:u,rootClassName:d,style:p,onMouseEnter:h,onMouseLeave:v,onClick:g,afterClose:b,showIcon:x,closable:y,closeText:E,closeIcon:F,action:S,id:D,styles:$,classNames:C,...B}=e,M=o??a,[I,j]=En.useState(!1),N=En.useRef(null);En.useImperativeHandle(t,()=>({nativeElement:N.current}));let{getPrefixCls:R,direction:L,variant:q,closable:W,closeIcon:U,className:P,style:H,classNames:V,styles:Q,successIcon:X,infoIcon:Z,warningIcon:O,errorIcon:z}=wt("alert"),K=R("alert",n),[J,te]=Lhe(K),{onClose:ee,afterClose:ie}=Ct(y)?y:{},me=He=>{j(!0),(ee??e.onClose)?.(He)},le=En.useMemo(()=>e.type!==void 0?e.type:l?"warning":"info",[e.type,l]),he=e.variant??q??"outlined",se=En.useMemo(()=>Ct(y)||E?!0:typeof y=="boolean"?y:F!==!1&&Lr(F)?!0:!!W,[E,F,y,W]),ke=l&&x===void 0?!0:x,De={...e,prefixCls:K,variant:he,type:le,showIcon:ke,closable:se},we=Ue(H),de=Ue(p),[be,ye]=Et([V,C],[Q,we,$,de],{props:De}),Re=Y(K,`${K}-${le}`,`${K}-${he}`,{[`${K}-with-description`]:Lt(r),[`${K}-no-icon`]:!ke,[`${K}-banner`]:!!l,[`${K}-rtl`]:L==="rtl"},P,u,d,be.root,te,J),Fe=Ya(B,{aria:!0,data:!0}),$e=En.useMemo(()=>Ct(y)&&y.closeIcon?y.closeIcon:E||(F!==void 0?F:Ct(W)&&W.closeIcon?W.closeIcon:U),[F,y,W,E,U]),Ie=En.useMemo(()=>{let He=y??W;return Ct(He)?Ya(He,{data:!0,aria:!0}):{}},[y,W]);return En.createElement(ra,{visible:!I,motionName:`${K}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:He=>({maxHeight:He.offsetHeight}),onLeaveEnd:ie??b},({className:He,style:Oe},Me)=>En.createElement("div",{id:D,ref:pn(N,Me),"data-show":!I,className:Y(Re,He),style:{...ye.root,...Oe},onMouseEnter:h,onMouseLeave:v,onClick:g,role:"alert",...Fe},ke?En.createElement(Hhe,{className:Y(`${K}-icon`,be.icon),style:ye.icon,description:r,icon:e.icon,prefixCls:K,type:le,successIcon:X,infoIcon:Z,warningIcon:O,errorIcon:z}):null,En.createElement("div",{className:Y(`${K}-section`,be.section),style:ye.section},Lt(M)?En.createElement("div",{className:Y(`${K}-title`,be.title),style:ye.title},M):null,Lt(r)?En.createElement("div",{className:Y(`${K}-description`,be.description),style:ye.description},r):null),Lt(S)?En.createElement("div",{className:Y(`${K}-actions`,be.actions),style:ye.actions},S):null,En.createElement(qhe,{className:be.close,style:ye.close,isClosable:se,prefixCls:K,closeIcon:$e,handleClose:me,ariaProps:Ie})))}),Yq=Whe;function Uhe(e,t,r){return t=Zc(t),Hx(e,ub()?Reflect.construct(t,r||[],Zc(e).constructor):t.apply(e,r))}var V3=A(_()),Vhe=(function(e){function t(){var r;return wu(this,t),r=Uhe(this,t,arguments),r.state={error:void 0,info:{}},r}return lb(t,e),xu(t,[{key:"componentDidCatch",value:function(r,n){this.setState({error:r,info:n})}},{key:"render",value:function(){let{message:r,title:n,description:a,id:o,children:l}=this.props,{error:u,info:d}=this.state,p=n??r,h=d?.componentStack||null,v=Lr(p)?p:u?.toString(),g=Lr(a)?a:h;return u?V3.createElement(Yq,{id:o,type:"error",title:v,description:V3.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},g)}):l}}])})(V3.PureComponent),Ghe=Vhe,Jq=Yq;Jq.ErrorBoundary=Ghe;var ei=Jq;var Khe=2,Xhe=8,Qhe=4;function Yhe(e){let t=e.engine==="sdk"?"|sdk":"";return`${e.provider}|${e.model}|${e.thinkingEffort}|${e.mode}|${e.kind}${t}`}var tW=6e4,Jhe=["running","awaiting_approval","waiting_user"];function rW(e,t){return Ko(t===void 0?e.agents?.[0]?.provider:t)}function nW(e,t){let r=Tu(e,t);return e==="pi"&&(t==="sdk"||t==="core")?r:`${r} CLI`}var Zhe=__wandCssTextPool[10];function aW(){_a("wand-avatar-editor-styles",Zhe)}var Ra=A(_(),1),qe=A(xe(),1);function mf({employee:e,provider:t,engine:r,size:n="md",className:a="",renderMode:o="live",speaking:l=!1,thinking:u=!1,loading:d=!1,fileActivity:p="idle"}){let h=rW(e,t),v=t===void 0?e.agents?.[0]?.engine:r,g=h?nW(h,v):"",b={sm:36,md:48,lg:56,xl:88,chat:48,composer:72,toolbar:24}[n],x=b<=36?14:b>=56?20:18,y=q2(e),E=y?null:V2(e,b);return(0,qe.jsx)(Bt,{children:(0,qe.jsx)(qi,{className:`wand-team-avatar wand-employee-avatar ${a}`.trim(),"data-size":n,title:e.name,offset:[0,b-x/2],count:h?(0,qe.jsx)("span",{role:"img","aria-label":g,title:g,className:"wand-employee-avatar-provider",children:(0,qe.jsx)(Yo,{size:x,shape:"square",icon:h==="pi"&&(v==="sdk"||v==="core")?(0,qe.jsx)(ju,{style:{width:14,height:14}}):(0,qe.jsx)(Xo,{provider:h})})}):void 0,children:y?o==="static"?(0,qe.jsx)("span",{style:{position:"relative",display:"inline-flex"},children:(0,qe.jsx)(D3,{config:y,size:b})}):(0,qe.jsx)(E0,{config:y,size:b,speaking:l,thinking:u,loading:d,fileActivity:p}):(0,qe.jsxs)("span",{style:{position:"relative",display:"inline-flex"},children:[(0,qe.jsx)(Yo,{shape:"square",size:b,src:E?.src,style:E?.style,icon:E?.icon}),o==="static"?null:d||u?(0,qe.jsx)(H2,{}):null]})})})}var e0e={heart:"M12 20C10 18 3 13 3 8.5C3 3 10 2 12 7C14 2 21 3 21 8.5C21 13 14 18 12 20Z",triangle:"M9 5Q12 1 15 5L21 16Q23 20 18 20H6Q1 20 3 16Z",diamond:"M10 3Q12 1 14 3L21 10Q23 12 21 14L14 21Q12 23 10 21L3 14Q1 12 3 10Z",round:"M12 3a9 9 0 1 1 0 18a9 9 0 1 1 0-18Z",square:"M7 3H17Q21 3 21 7V17Q21 21 17 21H7Q3 21 3 17V7Q3 3 7 3Z",capsule:"M12 2Q19 2 19 9V15Q19 22 12 22Q5 22 5 15V9Q5 2 12 2Z"};function t0e({field:e,id:t}){return e==="color"?(0,qe.jsx)("span",{className:"wand-avatar-color",style:{background:hd.find(r=>r.id===t)?.color}}):e==="shape"?(0,qe.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:(0,qe.jsx)("path",{d:e0e[t]})}):t==="none"?(0,qe.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,qe.jsx)("circle",{cx:"12",cy:"12",r:"8",fill:"none"}),(0,qe.jsx)("path",{d:"M6 18L18 6",fill:"none"})]}):e==="glasses"?(0,qe.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",style:{color:t==="gold"?"#9b7135":"currentColor"},children:[(0,qe.jsx)("circle",{cx:"6.5",cy:"12",r:"4.5",fill:"none"}),(0,qe.jsx)("circle",{cx:"17.5",cy:"12",r:"4.5",fill:"none"}),(0,qe.jsx)("path",{d:"M11 12h2M2 10H0M22 10h2",fill:"none"})]}):(0,qe.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:t==="beanie"?(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)("path",{d:"M5 15C5 3 19 3 19 15Z"}),(0,qe.jsx)("rect",{x:"4",y:"15",width:"16",height:"4",rx:"1"}),(0,qe.jsx)("circle",{cx:"12",cy:"3",r:"2"})]}):(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)("path",{d:"M3 13C0 4 21 3 22 11C22 16 6 18 3 13Z"}),(0,qe.jsx)("path",{d:"M7 17h11M14 5l1-3",fill:"none"})]})})}function X2({field:e,label:t,options:r,config:n,onChange:a,disabled:o}){let l=Ra.useId();return(0,qe.jsxs)("fieldset",{className:"wand-avatar-options",disabled:o,children:[(0,qe.jsxs)("legend",{children:[t,(0,qe.jsx)("span",{children:r.find(u=>u.id===n[e])?.label})]}),(0,qe.jsx)("div",{className:"wand-avatar-option-row",children:r.map(u=>(0,qe.jsxs)("label",{className:"wand-avatar-option","data-selected":n[e]===u.id,children:[(0,qe.jsx)("input",{type:"radio",name:l,value:u.id,checked:n[e]===u.id,"aria-label":u.label,onChange:()=>a({...n,[e]:u.id})}),(0,qe.jsx)("span",{className:"wand-avatar-option-mark",children:(0,qe.jsx)(t0e,{field:e,id:u.id})}),(0,qe.jsx)("span",{className:"wand-avatar-option-name",children:u.label})]},u.id))})]})}function r0e({avatar:e,name:t,employeeId:r="",disabled:n,onChange:a,onBusyChange:o}){let l={id:r||"employee-draft",name:t,avatar:e},u=Ra.useRef(null),d=Ra.useRef(null),p=Ra.useRef(null),[h,v]=Ra.useState(!1),[g,b]=Ra.useState(!1),[x,y]=Ra.useState(()=>Jb(l)??Yb(l)),[E,F]=Ra.useState(""),[S,D]=Ra.useState(!1),[$,C]=Ra.useState(!1),B=Ra.useRef(0),M=Ra.useRef(e),I=n||S;Ra.useEffect(()=>{aW()},[]),Ra.useEffect(()=>()=>{++B.current},[]),Ra.useEffect(()=>{o?.(S)},[S,o]),Ra.useEffect(()=>{++B.current,D(!1),g&&M.current!==e&&(b(!1),C(!1),F("\u5934\u50CF\u5DF2\u66F4\u65B0\uFF0C\u8BF7\u91CD\u65B0\u6253\u5F00\u634F\u8138\u3002"))},[e]),Ra.useEffect(()=>{if(g){let W=requestAnimationFrame(()=>p.current?.querySelector("input:checked")?.focus());return()=>cancelAnimationFrame(W)}},[g]);let j=()=>{b(!1),C(!1),u.current?.focus({preventScroll:!0})};$n(g,j);let N=()=>{v(!1),F(""),M.current=e,y(Jb(l)??Yb(l)),b(!0)},R=()=>{v(!1),F(""),d.current?.click()},L=W=>{let U=W.target.files?.[0];if(W.target.value="",!U)return;if(!/^image\/(png|jpeg|webp)$/.test(U.type)||U.size>10*1024*1024){F("\u8BF7\u9009\u62E9 10 MB \u4EE5\u5185\u7684 PNG\u3001JPEG \u6216 WebP \u56FE\u7247\u3002");return}D(!0),F("");let P=++B.current;A3(U,tW).then(H=>{P===B.current&&(b(!1),C(!1),a(H))}).catch(H=>{P===B.current&&F(H instanceof Error?H.message:"\u56FE\u7247\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")}).finally(()=>{P===B.current&&D(!1)})},q=e.startsWith("data:image/")?"\u5DF2\u4E0A\u4F20\u56FE\u7247":e.startsWith("plush:v1:")?"\u81EA\u5B9A\u4E49\u6BDB\u7ED2\u5934\u50CF":/^cat:/.test(e)?"\u50CF\u7D20\u732B\u5934\u50CF":"\u81EA\u52A8\u6BDB\u7ED2\u5934\u50CF";return(0,qe.jsxs)("section",{className:"wand-avatar-editor","aria-label":"\u5458\u5DE5\u5934\u50CF",children:[(0,qe.jsxs)(rt,{align:"center",gap:10,className:"wand-avatar-editor-summary",children:[(0,qe.jsx)(bi,{open:h&&!I,onOpenChange:v,align:"start",ariaLabel:"\u5934\u50CF\u64CD\u4F5C",trigger:(0,qe.jsxs)(Li,{ref:u,className:"wand-avatar-editor-trigger",type:"text",disabled:I,"aria-label":"\u7F16\u8F91\u5458\u5DE5\u5934\u50CF","aria-haspopup":"true","aria-expanded":h||g,children:[(0,qe.jsx)(mf,{employee:l,provider:"",size:"lg"}),(0,qe.jsx)("span",{className:"wand-avatar-edit-mark",children:(0,qe.jsx)(Be,{name:"edit",size:10})})]}),children:(0,qe.jsxs)(rt,{vertical:!0,gap:2,children:[(0,qe.jsxs)(_e,{kind:"ghost",onClick:R,children:[(0,qe.jsx)(Be,{name:"image",size:14}),"\u4E0A\u4F20\u56FE\u7247"]}),(0,qe.jsx)(_e,{kind:"ghost",onClick:N,children:"\u634F\u8138"})]})}),(0,qe.jsxs)(rt,{vertical:!0,gap:2,style:{flex:1,minWidth:0},children:[(0,qe.jsx)(Gt.Text,{children:"\u5934\u50CF"}),(0,qe.jsx)(Gt.Text,{type:"secondary",className:"wand-avatar-editor-caption",children:S?"\u6B63\u5728\u5904\u7406\u56FE\u7247\u2026":q})]}),(0,qe.jsx)(_e,{kind:"ghost",size:"small",disabled:I,onClick:N,children:"\u634F\u8138"}),(0,qe.jsx)(_e,{kind:"ghost",size:"small",disabled:I,onClick:R,children:"\u4E0A\u4F20"}),e?(0,qe.jsx)(_e,{kind:"ghost",size:"small",disabled:I,onClick:()=>{j(),F(""),a("")},children:"\u6062\u590D\u9ED8\u8BA4"}):null]}),(0,qe.jsx)(Gt.Text,{type:"secondary",className:"wand-avatar-upload-hint",children:"PNG\u3001JPEG \u6216 WebP \xB7 \u6700\u5927 10 MB"}),(0,qe.jsx)("input",{ref:d,type:"file",accept:"image/png,image/jpeg,image/webp",hidden:!0,tabIndex:-1,"aria-label":"\u4E0A\u4F20\u5934\u50CF\u56FE\u7247",onChange:L}),g?(0,qe.jsxs)("div",{ref:p,className:"wand-avatar-sculpt",role:"region","aria-label":"\u634F\u8138",onKeyDown:W=>{W.key==="Escape"&&(W.preventDefault(),W.stopPropagation(),j())},children:[(0,qe.jsxs)("div",{className:"wand-avatar-sculpt-preview",children:[(0,qe.jsx)(E0,{config:x,size:156,interactive:!0,speaking:$}),(0,qe.jsx)(Gt.Text,{type:"secondary",children:"\u5B9E\u65F6\u9884\u89C8"}),(0,qe.jsx)(_e,{kind:"ghost",size:"small","aria-pressed":$,disabled:I,onClick:()=>C(W=>!W),children:$?"\u505C\u6B62\u9884\u89C8":"\u9884\u89C8\u8BF4\u8BDD\u52A8\u4F5C"})]}),(0,qe.jsxs)("div",{className:"wand-avatar-sculpt-controls",children:[(0,qe.jsx)(X2,{field:"shape",label:"\u9020\u578B",options:Vb,config:x,disabled:I,onChange:y}),(0,qe.jsx)(X2,{field:"color",label:"\u989C\u8272",options:hd,config:x,disabled:I,onChange:y}),(0,qe.jsx)(X2,{field:"glasses",label:"\u773C\u955C",options:Gb,config:x,disabled:I,onChange:y}),(0,qe.jsx)(X2,{field:"hat",label:"\u5E3D\u5B50",options:Kb,config:x,disabled:I,onChange:y})]}),(0,qe.jsxs)(rt,{className:"wand-avatar-sculpt-footer",align:"center",wrap:!0,gap:8,justify:"space-between",children:[(0,qe.jsx)(Gt.Text,{type:"secondary",children:"\u4FDD\u5B58\u5458\u5DE5\u540E\u751F\u6548"}),(0,qe.jsxs)(rt,{gap:6,children:[(0,qe.jsx)(_e,{kind:"ghost",disabled:I,onClick:j,children:"\u53D6\u6D88"}),(0,qe.jsx)(_e,{kind:"primary",disabled:I,onClick:()=>{a(F3(x)),j()},children:"\u4F7F\u7528\u8FD9\u4E2A\u5934\u50CF"})]})]})]}):null,E?(0,qe.jsx)(ei,{type:"error",showIcon:!0,role:"alert",title:E}):null]})}var vd=A(_(),1);function C0(e,t={}){let r=null,n=null,a=0,o=0,l=!1,u=new Set,d=()=>{for(let h of[...u])h()},p=h=>{let v=r===null||!t.equals?.(r,h);r=h,v&&d()};return{peek:()=>r,load:h=>{if(!h?.force&&r!==null&&!l){let x=h?.maxAgeMs;if(x===void 0||Date.now()-o<=x)return Promise.resolve(r)}if(n)return n;let v=a,g;try{g=e()}catch(x){g=Promise.reject(x)}let b;return b=g.then(x=>(n===b&&(n=null),v!==a?r??x:(o=Date.now(),l=!1,p(x),x)),x=>{throw n===b&&(n=null),x}),n=b,b},publish(h){a++,n=null,p(h)},invalidate(){a++,n=null,r=null,o=0,l=!1},stale(){l=!0},subscribe(h){return u.add(h),()=>{u.delete(h)}}}}function n0e(e,t){if(S3(e)){let o={};for(let l of["name","duty","prompt","agents","systemSessionLimit","maxConcurrentTasks"])t[l]!==void 0&&Object.assign(o,{[l]:l==="maxConcurrentTasks"?t.maxConcurrentTasks??Ub:t[l]});return o}if(k3(e))return{agents:t.agents??e.agents,...t.systemSessionLimit!==void 0?{systemSessionLimit:t.systemSessionLimit}:{},...t.maxConcurrentTasks!==void 0?{maxConcurrentTasks:t.maxConcurrentTasks??Ub}:{}};let r={name:t.name??e.name,duty:t.duty??e.duty,prompt:t.prompt??e.prompt,avatar:t.avatar??e.avatar,tags:t.tags??e.tags??[],agents:t.agents??e.agents},n=t.systemSessionLimit!==void 0?t.systemSessionLimit:e.systemSessionLimit;n!==void 0&&(r.systemSessionLimit=n);let a=t.maxConcurrentTasks!==void 0?t.maxConcurrentTasks:e.maxConcurrentTasks;return a!==void 0&&(r.maxConcurrentTasks=a??Ub),r}var G3=new Set,a0e=new Set,Zq=new Map;function Q2(e){let t=Zq.get(e);if(!t){let r=e?"?includeArchived=1":"";t=C0(async()=>(await mt(`/api/silicon-employees${r}`,{cache:"no-store"})).employees??[]),Zq.set(e,t)}return t}function i0e(){Q2(!1).invalidate(),Q2(!0).invalidate();for(let e of a0e)e()}function eW(e=!1){return Q2(e).peek()}function Nu(e){i0e();for(let t of G3)t(e)}function Y2(e){return G3.add(e),()=>{G3.delete(e)}}var iW={list(e){return Q2(e?.includeArchived===!0).load()},get(e){return mt(`/api/silicon-employees/${encodeURIComponent(e)}`,{cache:"no-store"})},async draft(e){return(await mt("/api/silicon-employees/draft",rn({expectation:e}))).draft},async create(e){let t=await mt("/api/silicon-employees",rn(e));return Nu(t.id),t},async update(e,t){let r=await mt(`/api/silicon-employees/${encodeURIComponent(e)}`,rn(t,"PUT"));return Nu(r.id),r},async archive(e){await mt(`/api/silicon-employees/${encodeURIComponent(e)}/archive`,{method:"POST"}),Nu(e)},async unarchive(e){await mt(`/api/silicon-employees/${encodeURIComponent(e)}/unarchive`,{method:"POST"}),Nu(e)},async remove(e){await mt(`/api/silicon-employees/${encodeURIComponent(e)}`,{method:"DELETE"}),Nu(e)}};function o0e(e){let t=e?.includeArchived===!0,[r,n]=vd.useState(()=>eW(t)??[]),a=e?.enabled!==!1,[o,l]=vd.useState(()=>a&&eW(t)===null),[u,d]=vd.useState(null),p=vd.useRef(!1),h=vd.useRef(a),v=vd.useRef(0);h.current=a;let g=vd.useCallback(()=>{if(!p.current||!h.current)return;let b=++v.current,x=()=>p.current&&h.current&&v.current===b;l(!0),iW.list({includeArchived:t}).then(y=>{x()&&(n(y),d(null))}).catch(y=>{x()&&d(y instanceof Error?y.message:String(y))}).finally(()=>{x()&&l(!1)})},[t]);return vd.useEffect(()=>{if(!a){l(!1);return}p.current=!0,g();let b=Y2(g);return()=>{p.current=!1,v.current++,b()}},[g,a]),{employees:r,loading:o,error:u,reload:g}}var oW=A(xe(),1);function K3({employee:e,...t}){return(0,oW.jsx)(Br,{...t,className:`composer-employee-trigger ${t.className??""}`,"aria-label":t["aria-label"]??`\u67E5\u770B${e.name}\u7684\u8D44\u6599`,title:t.title??e.name,children:(0,oW.jsx)(mf,{employee:e,provider:"",size:"toolbar",renderMode:"static"})})}var hf=C0(async()=>mt("/api/config",{credentials:"same-origin"}));function t1(){return hf.peek()}function r1(){return hf.load()}function X3(e){return hf.subscribe(e)}function s0e(e){let t=hf.peek();if(!t){hf.invalidate();return}hf.publish({...t,...e})}function Q3(){hf.invalidate()}typeof window<"u"&&window.addEventListener("wand-settings-config-saved",e=>{let t=e.detail;t&&typeof t=="object"&&s0e(t)});function e$(e){return`${Math.max(0,Math.ceil(e*2))}px 0px 0px 0px`}var dW=-1;function pW(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function l0e(e){let t=e.scrollHeight-(e.scrollTop+e.clientHeight);return t<=24?dW:-(Math.round(t)+2)}function u0e(e,t){let r=pW(e);if(r===void 0||r===dW)return{top:t.scrollHeight,needsEarlier:!1};if(r>=0)return{top:r,needsEarlier:!1};let n=t.scrollHeight-t.clientHeight-(-r-2);return{top:Math.max(0,n),needsEarlier:n<0}}function c0e(e,t){return e.messageId??`${e.requestId??""}:${e.role}:${e.createdAt??""}:${e.author?.id??""}:${t}`}function Y3(e){let t=new Date(e??"");return Number.isFinite(t.getTime())?t.toLocaleDateString([],{year:"numeric",month:"long",day:"numeric"}):""}function d0e(e){let t=new Date(e??"");return Number.isFinite(t.getTime())?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}):""}function p0e(e,t){if(!e||!t||e.notice||t.notice||e.role!==t.role||e.role!=="user"&&(!e.author?.id||e.author.id!==t.author?.id)||e.conversationTarget?.runId!==t.conversationTarget?.runId)return!1;let r=Date.parse(t.createdAt??"")-Date.parse(e.createdAt??"");return r>=0&&r<5*6e4&&Y3(e.createdAt)===Y3(t.createdAt)}function f0e(e,t){if(!e)return[];if(!e.length)return[...t];let r=t.indexOf(e[e.length-1]);if(r<0)return[];let n=Math.min(r+1,e.length);return e.slice(-n).every((a,o)=>a===t[r+1-n+o])?t.slice(r+1):[]}function m0e(e){if(e.task.status==="archived")return"\u5DF2\u5F52\u6863";let t=e.runs[0];return t?{running:"\u8FDB\u884C\u4E2D",waiting_user:"\u7B49\u4F60\u56DE\u590D",awaiting_approval:"\u7B49\u4F60\u6279\u51C6",done:"\u5B8C\u6210",failed:"\u5931\u8D25",stopped:"\u5DF2\u505C\u6B62"}[t.status]??"":e.startup?.state==="failed"?"\u542F\u52A8\u5931\u8D25":"\u5F85\u5F00\u5DE5"}var J3=new Set;function t$(e){for(let t of J3)t(e)}function h0e(e){return J3.add(e),()=>{J3.delete(e)}}var sW=A(_(),1);function g0e(e){let[t,r]=sW.useState(()=>Date.now());return sW.useEffect(()=>{if(!e)return;r(Date.now());let n=window.setInterval(()=>r(Date.now()),1e3),a=()=>{document.visibilityState==="visible"&&r(Date.now())};return document.addEventListener("visibilitychange",a),()=>{window.clearInterval(n),document.removeEventListener("visibilitychange",a)}},[e]),t}function v0e(e){let t=/^[\p{L}\p{N}_.:-]{1,64}$/u.test(e.name)?e.name:"\u5DE5\u5177\u8C03\u7528";switch(e.activity?.kind){case"read_file":return`\u8BFB\u53D6\u6587\u4EF6 \xB7 ${t}`;case"edit_file":return`\u4FEE\u6539\u6587\u4EF6 \xB7 ${t}`;case"run_command":return`\u8FD0\u884C\u547D\u4EE4 \xB7 ${t}`;default:return t}}function fW(e){if(e.archived||["failed","stopped","done","exited"].includes(e.status??"")||!(e.structuredState?.inFlight||e.ptyRunning))return null;let t=e.messages??[],r=e.structuredState?.activeRequestId,n=Date.parse(e.structuredState?.turnStartedAt??e.turnStartedAt??""),a=t.length-1;for(;a>=0&&!(t[a].role==="user"&&(t[a].content??[]).some(g=>g.type==="text"&&!g.__subagent&&g.text.trim()));)a--;let o=t[a];if(r&&o?.requestId&&o.requestId!==r)return null;let l=!!(r&&o?.requestId===r),u=g=>{if(g.author?.sessionId&&g.author.sessionId!==e.id)return!1;if(r&&g.requestId)return g.requestId===r;if(l)return!0;let b=Date.parse(g.createdAt??"");return Number.isFinite(n)&&Number.isFinite(b)&&b>=n},d=new Map,p=new Set,h=null;for(let g=a+1;g<t.length;g++){let b=t[g];if(u(b))for(let x of b.content??[])x.__subagent||(x.type==="tool_result"&&(p.add(x.tool_use_id),h=null),b.role==="assistant"&&(x.type==="tool_use"?(d.set(x.id,x),h=null):!b.completedAt&&x.type==="text"&&x.text.trim()?h={kind:"output",label:"\u6B63\u5728\u8F93\u51FA"}:!b.completedAt&&x.type==="thinking"&&(h={kind:"thinking",label:"\u6B63\u5728\u601D\u8003"})))}let v=[...d.values()].reverse().find(g=>!p.has(g.id));return v?.semantic?.kind==="question_request"||v?.name==="AskUserQuestion"?{kind:"waiting",toolId:v.id,label:"\u7B49\u5F85\u4F60\u7684\u8F93\u5165"}:v?{kind:"tool",toolId:v.id,label:v0e(v)}:h}var mW=6e4,r$=new Set(["failed","stopped","exited","done"]),b0e=new Set(["waiting-input","waiting_input","waiting_user","awaiting_approval"]),y0e=new Set(["running","thinking","waiting-input","waiting_input","awaiting_approval","waiting_user"]);function gf(e){if(!e)return null;let t=new Date(e).getTime();return Number.isFinite(t)?t:null}function Z2(e){return e?gf(e.structuredState?.turnStartedAt)??gf(e.turnStartedAt):null}function w0e(e){if(!e)return null;let t=e.structuredState?.lastActivityAt;return gf(t)??gf(e.lastActivityAt)??gf(e.lastActivityAt)}function hW(e){if(!e||e.archived)return!1;let t=e;if(t.archived||r$.has(t.status??""))return!1;if(t.permissionBlocked||t.pendingEscalation||t.structuredState?.inFlight)return!0;let r=e.status;return typeof r=="string"&&y0e.has(r)}function gW(e){return!e||e.archived||r$.has(e.status??"")?!1:!!e.structuredState?.inFlight||e.ptyRunning===!0}function e6(e,t=!1){return!e||e.archived||r$.has(e.status??"")?"idle":e.permissionBlocked||e.pendingEscalation||b0e.has(e.status??"")?"waiting":(t?hW(e):gW(e))?!t&&fW(e)?.kind==="waiting"?"waiting":"executing":(e.queuedMessages?.length??0)>0||t&&e.status==="starting"?"received":"idle"}function vW(e,t,r=!1){if(!(r?hW(e):gW(e)))return 0;let n=w0e(e);return n===null?0:Math.max(0,t-n)}function a1(e){let t=Math.max(0,Math.floor(e/1e3));if(t<60)return`${t} \u79D2`;let r=Math.floor(t/60);if(r<60)return`${r} \u5206\u949F`;let n=Math.floor(r/60),a=r%60;return a?`${n} \u5C0F\u65F6 ${a} \u5206\u949F`:`${n} \u5C0F\u65F6`}var lW={received:"\u5DF2\u63A5\u6536",executing:"\u6B63\u5728\u6267\u884C",waiting:"\u7B49\u5F85\u4F60\u7684\u8F93\u5165",idle:""};function i1(e,t=!1){let r=e6(e,t),n={phase:r,stage:r,label:lW[r],action:null,active:r!=="idle"};if(!e||e.archived)return n;if(e.status==="failed"||e.status==="stopped")return{...n,stage:e.status,label:e.status==="failed"?"\u6267\u884C\u5931\u8D25":"\u5DF2\u505C\u6B62",active:!1};if(r==="received")return{...n,label:"\u5DF2\u63A5\u6536 \xB7 \u6392\u961F\u4E2D"};if(r==="waiting")return{...n,label:e.permissionBlocked||e.pendingEscalation||e.status==="awaiting_approval"?"\u7B49\u5F85\u4F60\u786E\u8BA4\u64CD\u4F5C":lW.waiting};if(r!=="executing"||t)return n;if(e.structuredState?.phase==="background")return{...n,stage:"background",label:"\u7B49\u5F85\u540E\u53F0\u4EFB\u52A1"};let a=fW(e);return a?{...n,stage:a.kind,label:a.kind==="tool"?"\u6B63\u5728\u4F7F\u7528\u5DE5\u5177":a.label,action:a.kind==="tool"?a.label:null,toolId:a.toolId}:n}function x0e(e,t,r=!1){let n=i1(e,r);if(!n.label)return"";let a=[n.label];if(n.action&&a.push(n.action),!n.active||n.phase==="received")return a.join(" \xB7 ");let o=r?gf(e?.turnStartedAt)??gf(e?.startedAt):Z2(e);o!==null&&a.push(`\u5DF2\u8FD0\u884C ${a1(Math.max(0,t-o))}`);let l=vW(e,t,r);return l>=mW&&a.push(`\u5DF2 ${a1(l)}\u65E0\u65B0\u6D88\u606F`),a.join(" \xB7 ")}var J2=A(xe(),1),E0e={received:"enter",executing:"spark",tool:"wrench",output:"enter",thinking:"spark",background:"history",waiting:"shield",failed:"warning",stopped:"stop",idle:"spark"};function o1(e){let t=e.activity,r=e.runMode===!0,n=i1(t,r),a=g0e(n.active&&n.phase!=="received"),o=Za(),l=x0e(t,a,r);if(!l)return null;let u=n.phase==="waiting",d=n.active&&n.phase!=="received"&&vW(t,a,r)>=mW;return(0,J2.jsxs)("div",{className:`chat-running-bar${u?" is-waiting":""}`,"data-phase":n.stage,"data-source-session":r?void 0:t?.id,"data-silent":d?"true":void 0,role:"status","aria-live":"polite",children:[(0,J2.jsx)("span",{className:`chat-running-pulse${o||!n.active?" is-instant":""}`,"data-phase":n.stage,"aria-hidden":"true",children:(0,J2.jsx)(Be,{name:E0e[n.stage],size:13})}),(0,J2.jsx)("span",{className:"chat-running-text",children:l})]})}var uW=A(_(),1),Z3=new Set,wl={name:"",avatar:"",loaded:!1};function bW(e){if(!(e.name===wl.name&&e.avatar===wl.avatar&&e.loaded===wl.loaded)){wl=e;for(let t of Z3)t()}}function n$(e){let t=I3(e);return{name:t?.name??"",avatar:t?.avatar??"",loaded:!0}}function yW(){let e=t1();e&&bW(n$(e.userProfile))}var cW=t1();cW&&(wl=n$(cW.userProfile));X3(yW);function k0e(){return r1().then(yW,()=>{})}typeof window<"u"&&window.addEventListener("wand-settings-config-saved",e=>{t1()||bW(n$(e.detail?.userProfile))});var n1={subscribe(e){return Z3.add(e),()=>{Z3.delete(e)}},getSnapshot(){return wl},refresh(){k0e()}};function s1(){let e=uW.useSyncExternalStore(n1.subscribe,n1.getSnapshot,n1.getSnapshot);return uW.useEffect(()=>{n1.refresh()},[]),e}function wW(){return{id:"user",name:wl.name||"\u6211",...wl.avatar?{avatar:wl.avatar}:{}}}function C0e(e){let t=wW();if(e?.role!=="user")return{id:"",name:"",avatar:t.avatar};let r=e.author;return!r||r.id!=="user"?t:{...t,name:wl.loaded?t.name:r.name||t.name}}var vf=A(xe(),1);function S0e({title:e,members:t,size:r=48}){let n=s1(),a=Math.ceil(Math.sqrt(t.length+1)),o=(r-4-(a-1))/a;return(0,vf.jsxs)("span",{className:"conversation-group-avatar conversation-group-mosaic",role:"img","aria-label":`\u7FA4\u804A\uFF1A${e}\uFF1B${n.name||"\u6211"}\u3001${t.map(l=>l.name).join("\u3001")}`,style:{width:r,height:r,gridTemplateColumns:`repeat(${a}, minmax(0, 1fr))`},children:[(0,vf.jsx)("span",{className:"conversation-group-cell","aria-hidden":"true",children:(0,vf.jsx)("span",{style:{width:36,height:36,transform:`scale(${o/36})`},children:(0,vf.jsx)(mf,{employee:{id:"user",name:n.name||"\u6211",avatar:n.avatar},provider:"",size:"sm"})})}),t.map(l=>(0,vf.jsx)("span",{className:"conversation-group-cell","aria-hidden":"true",title:l.name,children:(0,vf.jsx)("span",{style:{width:36,height:36,transform:`scale(${o/36})`},children:(0,vf.jsx)(mf,{employee:{id:l.employeeId||l.id,name:l.name,avatar:l.avatar},provider:"",size:"sm"})})},l.id))]})}function F0e(e){return e>=1e6?`${(e/1e6).toFixed(1).replace(/\.0$/,"")}M`:e>=1e3?`${(e/1e3).toFixed(1).replace(/\.0$/,"")}k`:String(Math.round(e))}function a$(e){let t,r={};for(let n of e)if(n.role==="user"&&(r={}),!(n.role!=="assistant"||!n.usage)){for(let a of["inputTokens","outputTokens","cacheReadInputTokens","cacheCreationInputTokens","reasoningOutputTokens","totalCostUsd"]){let o=n.usage[a];typeof o=="number"&&Number.isFinite(o)&&o>=0&&(r[a]=(r[a]??0)+o)}n.usage.estimated&&(r.estimated=!0),t={...r}}return t}function $0e(e){if(!e)return[];let t=[],r=[["inputTokens","\u8F93\u5165",!1],["cacheReadInputTokens","\u7F13\u5B58\u547D\u4E2D",!1],["cacheCreationInputTokens","\u7F13\u5B58\u5199\u5165",!1],["outputTokens","\u8F93\u51FA",!0],["reasoningOutputTokens","\u63A8\u7406",!0]];for(let[a,o,l]of r){let u=e[a];if(typeof u!="number"||!Number.isFinite(u)||u<=0)continue;let d=e.estimated===!0&&l?"\u2248":"";t.push({key:a,label:o,value:d+F0e(u),title:`${o} ${d}${Math.round(u)} Token${d?"\uFF08\u4F30\u7B97\uFF09":""}`})}let n=e.totalCostUsd;return typeof n=="number"&&Number.isFinite(n)&&n>0&&t.push({key:"totalCostUsd",label:"\u8D39\u7528",value:`$${n.toFixed(4).replace(/0+$/,"").replace(/\.$/,"")}`,title:`\u8D39\u7528 $${n}`}),!t.length&&e.estimated===!0&&t.push({key:"pending",label:"\u7528\u91CF",value:"\u7EDF\u8BA1\u4E2D\u2026",title:"\u6B63\u5728\u7EDF\u8BA1\u7528\u91CF\uFF0C\u5C1A\u65E0\u53EF\u663E\u793A\u7684\u8BA1\u6570"}),t}function D0e(e){if(e.role!=="assistant"||!e.createdAt||!e.completedAt)return null;let t=Date.parse(e.completedAt)-Date.parse(e.createdAt);return!Number.isFinite(t)||t<=0?null:t<1e3?"\u4E0D\u8DB3 1 \u79D2":a1(t)}var kMe=A(_(),1),Pu=A(xe(),1);function i$({usage:e,activity:t,employeeName:r,legacyStatus:n=!1,showName:a=!0}){let o=$0e(e);return!r&&!o.length&&e6(t)==="idle"?null:(0,Pu.jsxs)("div",{className:"composer-usage-line",role:"status","aria-label":r?`${r}\uFF0C\u72B6\u6001\u4E0E\u7528\u91CF`:"\u6700\u8FD1\u4E00\u8F6E\u7528\u91CF",tabIndex:0,title:o.map(l=>l.title).join(" \xB7 "),children:[r&&a?(0,Pu.jsxs)("span",{className:"composer-identity-name",title:r,children:[r,"\uFF1A"]}):null,n?(0,Pu.jsx)("span",{"data-composer-running-host":""}):(0,Pu.jsx)(o1,{activity:t}),o.length?(0,Pu.jsx)(bi,{side:"top",ariaLabel:"\u6700\u8FD1\u4E00\u8F6E\u7528\u91CF\u8BE6\u60C5",trigger:(0,Pu.jsx)(_e,{kind:"ghost",size:"small",className:"composer-usage-caption",children:"\u7528\u91CF"}),children:(0,Pu.jsx)("div",{className:"composer-usage-details",children:o.map(l=>(0,Pu.jsxs)("span",{className:"composer-usage-metric",title:l.title,children:[l.label," ",(0,Pu.jsx)("span",{className:"composer-usage-number",children:l.value})]},l.key))})}):null]})}var Ru=A(_(),1),A0e=A(er(),1),B0e=A(xe(),1);function o$({owner:e,input:t,surface:r,phase:n,pending:a,locked:o,forceExpanded:l,defaultExpanded:u=!0,onDismiss:d,popupOwners:p=[]}){let[h,v]=Ru.useState(u),[g,b]=Ru.useState(!1),x=Ru.useRef({input:t,surface:r,locked:o,phase:n,popupOwners:p,onDismiss:d,forceExpanded:l});x.current={input:t,surface:r,locked:o,phase:n,popupOwners:p,onDismiss:d,forceExpanded:l},Ru.useLayoutEffect(()=>{v(u),b(!1)},[e]),Ru.useEffect(()=>{(n==="failed"||n==="unknown")&&(b(!0),v(!0)),n==="sent"&&!a&&b(!1)},[n,a]);let y=h||g||!!o||!!l||n==="sending",E=Ru.useRef(y);E.current=y,Ru.useEffect(()=>{let S=t(),D=r();if(!S||!D)return;let $=new Set,C=R=>{if(!(R.target instanceof Node)||!D.contains(R.target))return;let{owner:L,active:q}=R.detail;q?$.add(L):$.delete(L)},B=()=>{v(!0)},M=()=>{b(!1),v(!0)},I=R=>{let L=x.current;$.size||L.locked||["sending","failed","unknown"].includes(L.phase)||(v(!1),S.blur(),L.onDismiss?.(R))},j=R=>{R.key!=="Escape"||!E.current||R.defaultPrevented||R.isComposing||of()||!D.contains(document.activeElement)||I2(x.current.popupOwners)||(R.preventDefault(),R.stopPropagation(),x.current.forceExpanded&&I("escape"))},N=()=>{of()||I("back")};return document.addEventListener("wand-composer-focus-borrow",C),S.addEventListener("focus",B),S.addEventListener("input",M),document.addEventListener("keydown",j,!0),window.addEventListener("popstate",N),()=>{document.removeEventListener("wand-composer-focus-borrow",C),S.removeEventListener("focus",B),S.removeEventListener("input",M),document.removeEventListener("keydown",j,!0),window.removeEventListener("popstate",N)}},[e]);let F=Ru.useRef(e);return F.current=e,Ru.useLayoutEffect(()=>{let S=t();S&&(S.tabIndex=y?0:-1)},[y,e]),{expanded:y,open:()=>{(0,A0e.flushSync)(()=>v(!0));let S=t();F.current!==e||!S||(S.focus({preventScroll:!0}),requestAnimationFrame(()=>{F.current===e&&S===x.current.input()&&S.isConnected&&document.activeElement===document.body&&S.focus({preventScroll:!0})}))}}}function s$({text:e,attachments:t,placeholder:r,disabled:n,onOpen:a}){let o=e.trim().split(/\n/).find(Boolean),l=o?`\u8349\u7A3F \xB7 ${o}`:t?`\u8349\u7A3F \xB7 ${t} \u4E2A\u9644\u4EF6`:r;return(0,B0e.jsx)(_e,{kind:"ghost",className:"composer-compact-entry",disabled:n,"aria-label":e||t?"\u7F16\u8F91\u672A\u53D1\u9001\u8349\u7A3F\u53CA\u9644\u4EF6":"\u5C55\u5F00\u6587\u5B57\u8F93\u5165",onClick:a,children:l})}function l1(e){let t=null;return{preload(){if(t)return;let r=e();t=r,r.catch(()=>{t===r&&(t=null)})},load(){let r=t;return t=null,r??e()},clear(){t=null}}}var l$=new Set;function Ui(){for(let e of l$)e()}function Ds(e){return l$.add(e),()=>{l$.delete(e)}}function t6(e){return Ui(),e}function bd(e){return It(e).then(t6)}function u$(e){return typeof e=="number"&&Number.isFinite(e)?Math.max(0,Math.floor(e)):0}function I0e(e){return e==="dirty"||e==="conflict"||e==="empty"||e==="unavailable"?e:"ready"}function M0e(e){let t=k0(e),r=Ge(t.taskId).trim(),n=Ge(t.branch).trim(),a=Ge(t.path).trim();if(!r||!n||!a)return null;let o=Array.isArray(t.commits)?t.commits.flatMap(l=>{let u=k0(l),d=Ge(u.hash).trim();return d?[{hash:d,shortHash:Ge(u.shortHash,d.slice(0,7)),subject:Ge(u.subject)}]:[]}):[];return{taskId:r,taskName:Ge(t.taskName,n),taskStatus:t.taskStatus==="done"?"done":"active",branch:n,path:a,baseRef:Ge(t.baseRef),state:I0e(t.state),actionable:t.actionable===!0,reason:Ge(t.reason),aheadCount:u$(t.aheadCount),hasUncommittedChanges:t.hasUncommittedChanges===!0,hasConflicts:t.hasConflicts===!0,commits:o}}function T0e(e){let t=k0(e);return{workspaceId:Ge(t.workspaceId),repoRoot:Ge(t.repoRoot),targetBranch:Ge(t.targetBranch),worktrees:Array.isArray(t.worktrees)?t.worktrees.map(M0e).filter(r=>r!==null):[]}}var _0e=class{constructor(e=(t,r)=>globalThis.fetch(t,r)){ae(this,"fetchImpl",e),ae(this,"startupGroups",l1(()=>this.readTaskGroups()))}preloadTaskGroups(){this.startupGroups.preload()}clearPreload(){this.startupGroups.clear()}async list(){let e=await It(await this.fetchImpl("/api/workspaces",{credentials:"same-origin"})),t=Array.isArray(e)?e:e.workspaces;return Array.isArray(t)?t.map(r=>{let n=k0(r);return{...r,sessionCount:u$(n.sessionCount),worktreeCount:u$(n.worktreeCount)}}):[]}listTaskGroups(e){return e===void 0?this.startupGroups.load():this.readTaskGroups(e)}async readTaskGroups(e){let t=`?revision=${encodeURIComponent(e??"")}&includeArchived=1`,r=await It(await this.fetchImpl(`/api/tasks${t}`,{credentials:"same-origin"}));if(Array.isArray(r))return{groups:r,unchanged:!1};let n=r&&typeof r=="object"?r:{};return{groups:Array.isArray(n.groups)?n.groups:[],revision:typeof n.revision=="string"?n.revision:void 0,unchanged:n.unchanged===!0}}async get(e){return It(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}`,{credentials:"same-origin"}))}async create(e){return bd(await this.fetchImpl("/api/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(e)}))}async update(e,t){return It(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(t)}))}async remove(e,t=!1){await It(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}${t?"?cascade=1":""}`,{method:"DELETE",credentials:"same-origin"}))}async renameDirectory(e,t){await It(await this.fetchImpl("/api/session-directories/name",{method:"PUT",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,name:t})}))}async saveLayout(e,t){return(await It(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}/layout`,{method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({layout:t})}))).layout??null}async listTasks(e){let t=await It(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}/tasks`,{credentials:"same-origin"}));return Array.isArray(t)?t:[]}async createTask(e,t){return bd(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}/tasks`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(t)}))}async createStandaloneTask(e){return bd(await this.fetchImpl("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(e)}))}async getTask(e){return It(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}`,{credentials:"same-origin"}))}async updateTask(e,t){return bd(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(t)}))}async deleteTask(e,t=!1){await bd(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}${t?"?cascade=1":""}`,{method:"DELETE",credentials:"same-origin"}))}async archiveTask(e){return bd(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}/archive`,{method:"POST",credentials:"same-origin"}))}async organizeByTitle(e,t=[],r="auto"){return this.organizeTasks({taskIds:e,sessionIds:t,mode:r})}async organizeTarget(e,t="auto"){return this.organizeTasks({target:e,mode:t})}async organizeTasks(e){return bd(await this.fetchImpl("/api/tasks/organize-by-title",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}))}async prepareConversationOrganization(e){return(await It(await this.fetchImpl("/api/sessions/auto-organize",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"preview",...e})}))).preview}async startConversationOrganization(e,t=!1){try{return(await It(await this.fetchImpl("/api/sessions/auto-organize",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"start",token:e,force:t})}))).job}catch(r){try{return(await It(await this.fetchImpl(`/api/sessions/auto-organize/by-token/${encodeURIComponent(e)}`,{credentials:"same-origin"}))).job}catch{throw r}}}async conversationOrganizationJobByToken(e){return(await It(await this.fetchImpl(`/api/sessions/auto-organize/by-token/${encodeURIComponent(e)}`,{credentials:"same-origin"}))).job}async conversationOrganizationJob(e){return(await It(await this.fetchImpl(`/api/sessions/auto-organize/${encodeURIComponent(e)}`,{credentials:"same-origin"}))).job}async watchConversationOrganization(e,t,r){let n=e,a="";for(;;){r?.throwIfAborted(),t?.(n);let o=`${n.result.createdTasks.length}:${n.result.movedSessions.length}`;if(o!==a&&o!=="0:0"&&(a=o,t6(n.result)),n.status!=="running")return n;await new Promise(l=>setTimeout(l,800)),n=(await It(await this.fetchImpl(`/api/sessions/auto-organize/${encodeURIComponent(n.id)}`,{credentials:"same-origin",signal:r}))).job}}async cancelConversationOrganization(e){await It(await this.fetchImpl(`/api/sessions/auto-organize/${encodeURIComponent(e)}/cancel`,{method:"POST",credentials:"same-origin"}))}async createSection(e){return It(await this.fetchImpl("/api/workspace-sections",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(e)}))}async unassignSession(e){await It(await this.fetchImpl("/api/workspace-sections/unassign",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({sessionId:e})}))}async moveSession(e,t){await bd(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}/sessions`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t})}))}async saveTaskLayout(e,t,r){let n=await It(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}/layout`,{method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({layout:t,layoutRevision:r})}));return{layout:n.layout??null,layoutRevision:n.layoutRevision}}async listWorktrees(e,t={}){let r=await It(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}/worktrees`,{credentials:"same-origin",signal:t.signal}));return T0e(r)}async deleteSessions(e){let t=[...new Set(e.filter(n=>typeof n=="string"&&n.trim().length>0))];if(t.length===0)return;let r=await It(await this.fetchImpl("/api/sessions/batch-delete",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({sessionIds:t})}));if(Array.isArray(r.failed)&&r.failed.length>0)throw new Error(`\u6709 ${r.failed.length} \u4E2A\u7EC8\u7AEF\u65E0\u6CD5\u5173\u95ED\u3002`)}async archiveSession(e,t){await It(await this.fetchImpl(`/api/sessions/${encodeURIComponent(e)}/${t?"archive":"unarchive"}`,{method:"POST",credentials:"same-origin"}))}async batchArchiveSessions(e,t){let r=[...new Set(e.filter(a=>typeof a=="string"&&a.trim().length>0))];if(r.length===0)return;let n=await It(await this.fetchImpl("/api/sessions/batch-archive",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({sessionIds:r,archived:t})}));if(Array.isArray(n.failed)&&n.failed.length>0)throw new Error(`\u6709 ${n.failed.length} \u4E2A\u4F1A\u8BDD\u672A\u80FD\u5F52\u6863\u3002`)}},mn=new _0e;Ds(()=>mn.clearPreload());var xW=A(_()),j0e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},N0e=j0e;function c$(){return c$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c$.apply(this,arguments)}var P0e=(e,t)=>xW.createElement(Ut,c$({},e,{ref:t,icon:N0e})),R0e=xW.forwardRef(P0e),d$=R0e;var EW=A(_()),O0e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},z0e=O0e;function p$(){return p$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p$.apply(this,arguments)}var L0e=(e,t)=>EW.createElement(Ut,p$({},e,{ref:t,icon:z0e})),H0e=EW.forwardRef(L0e),u1=H0e;var kW=A(_()),q0e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},W0e=q0e;function f$(){return f$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f$.apply(this,arguments)}var U0e=(e,t)=>kW.createElement(Ut,f$({},e,{ref:t,icon:W0e})),V0e=kW.forwardRef(U0e),yd=V0e;var m$=A(_(),1);function G0e(e){let t=new Map;function r(a){let o=t.get(a);return o||(o={detail:null,listeners:new Set},t.set(a,o)),o}function n(a){let o=r(a);if(o.pending)return o.pending;let l=e.getTask(a).then(u=>{if(u.id!==a)throw new Error("\u4EFB\u52A1\u8BE6\u60C5\u4E0E\u8BF7\u6C42\u4E0D\u5339\u914D\u3002");if(t.get(a)===o&&o.pending===l){o.detail=u;for(let d of o.listeners)d()}return u}).finally(()=>{o.pending===l&&(o.pending=void 0,o.listeners.size===0&&t.get(a)===o&&t.delete(a))});return o.pending=l,l}return{load:n,reload(a){return r(a).pending=void 0,n(a)},getSnapshot(a){return a?t.get(a)?.detail??null:null},subscribe(a,o){if(!a)return()=>{};let l=r(a);return l.listeners.add(o),l.timer||(n(a).catch(()=>{}),l.timer=setInterval(()=>{n(a).catch(()=>{})},4e3)),()=>{l.listeners.delete(o),!(l.listeners.size>0)&&(clearInterval(l.timer),t.get(a)===l&&t.delete(a))}}}}var As=G0e(mn);function b$(e){let t=(0,m$.useCallback)(n=>As.subscribe(e,n),[e]),r=(0,m$.useCallback)(()=>As.getSnapshot(e),[e]);return(0,m$.useSyncExternalStore)(t,r,()=>null)}var CW=A(_()),K0e=(0,CW.forwardRef)((e,t)=>{let{prefixCls:r,className:n,children:a,destroyOnHidden:o=!1,size:l,style:u,supportMotion:d}=e,p=l===0||typeof l=="string"&&Number.parseFloat(l)===0,h=Y(`${r}-panel`,{[`${r}-panel-hidden`]:p,[`${r}-panel-transition`]:d},n),v=l!==void 0;return CW.default.createElement("div",{ref:t,className:h,style:{...u,flexBasis:v?l:"auto",flexGrow:v?0:1}},!(o&&p)&&a)}),X0e=()=>null,Q0e=X0e,Zo=A(_()),SW=A(_());function Y0e(e){if(Ct(e))return{...e,showCollapsibleIcon:e.showCollapsibleIcon===void 0?"auto":e.showCollapsibleIcon};let t=!!e;return{start:t,end:t,showCollapsibleIcon:"auto"}}function J0e(e){return SW.useMemo(()=>Er(e).filter(t=>SW.isValidElement(t)).map(t=>{let{props:r}=t,{collapsible:n,...a}=r;return{...a,collapsible:Y0e(n)}}),[e])}var Z0e=J0e,ege=A(_());function FW(e,t){return e.collapsible&&t.collapsible?e.showCollapsibleIcon===!0||t.showCollapsibleIcon===!0?!0:e.showCollapsibleIcon==="auto"||t.showCollapsibleIcon==="auto"?"auto":!1:e.collapsible?e.showCollapsibleIcon:t.collapsible?t.showCollapsibleIcon:!1}function tge(e,t,r){return ege.useMemo(()=>{let n=[];for(let a=0;a<e.length-1;a+=1){let o=e[a],l=e[a+1],u=t[a],d=t[a+1],{resizable:p=!0,min:h,collapsible:v}=o,{resizable:g=!0,min:b,collapsible:x}=l,y=p&&g&&(u!==0||!h)&&(d!==0||!b),E=!!v.end&&u>0,F=!!x.start&&d===0&&u>0,S=E||F,D=!!x.start&&d>0,$=!!v.end&&u===0&&d>0,C=D||$,B=FW({collapsible:E,showCollapsibleIcon:v.showCollapsibleIcon},{collapsible:F,showCollapsibleIcon:x.showCollapsibleIcon}),M=FW({collapsible:D,showCollapsibleIcon:x.showCollapsibleIcon},{collapsible:$,showCollapsibleIcon:v.showCollapsibleIcon});n[a]={resizable:y,startCollapsible:!!(r?C:S),endCollapsible:!!(r?S:C),showStartCollapsibleIcon:r?M:B,showEndCollapsibleIcon:r?B:M}}return n},[t,e,r])}var h$=A(_()),bf=A(_());function rge(e,t,r){let n=e.map((x,y)=>x===0?0:t[y]??0),a=e.map((x,y)=>x===0?0:r[y]??1),o=n.some((x,y)=>x>a[y]),l=n.reduce((x,y)=>x+y,0),u=a.reduce((x,y)=>x+y,0);if(o||l>1||u<1)return e;let d=e.map((x,y)=>Math.min(a[y],Math.max(n[y],x))),p=d.reduce((x,y)=>x+y,0);if(p===1)return d;let h=p<1,v=d.map((x,y)=>h?a[y]-x:x-n[y]),g=v.reduce((x,y)=>x+y,0),b=1-p;return d.map((x,y)=>x+b*(v[y]/g))}function nge(e,t,r){let n=0,a=[];e.forEach((x,y)=>{x===void 0?a.push(y):n+=x});let o=1-n,l=a.length;if(e.length&&!a.length&&n!==1){if(n===0){let E=1/e.length;return e.map(()=>E)}let x=1/n,y=e.map(E=>E*x);return rge(y,t,r)}if(o<0){let x=1/n;return e.map(y=>y===void 0?0:y*x)}let u=0,d=0,p=0,h=1;for(let x of a){let y=t[x]||0,E=r[x]||1;u+=y,d+=E,p=Math.max(p,y),h=Math.min(h,E)}if(u>1&&d<1){let x=1/l;return e.map(y=>y===void 0?x:y)}let v=o/l;if(p<=v&&v<=h)return e.map(x=>x===void 0?v:x);let g=en(e),b=o-u;for(let x=0;x<l;x+=1){let y=a[x],E=t[y]||0,F=r[y]||1;g[y]=E;let S=F-E,D=Math.min(S,b);g[y]+=D,b-=D}return g}function r6(e){return Number(e.slice(0,-1))/100}function g$(e){return typeof e=="string"&&e.endsWith("%")}function age(e,t){let r=e.map(b=>b.size),n=e.length,a=t||0,o=b=>b*a,[l,u]=bf.default.useState(()=>e.map(b=>b.defaultSize)),d=bf.default.useMemo(()=>r.some(Lr)?r:l,[n,l,r]),p=bf.default.useMemo(()=>e.map(b=>g$(b.min)?r6(b.min):(b.min||0)/a),[e,a]),h=bf.default.useMemo(()=>e.map(b=>g$(b.max)?r6(b.max):(b.max||a)/a),[e,a]),v=bf.default.useMemo(()=>{let b=[];for(let x=0;x<n;x+=1){let y=d[x];if(g$(y))b[x]=r6(y);else if(y||y===0){let E=Number(y);Number.isNaN(E)||(b[x]=E/a)}else b[x]=void 0}return nge(b,p,h)},[n,d,a,p,h]),g=bf.default.useMemo(()=>v.map(o),[v,a]);return[bf.default.useMemo(()=>t?g:d,[g,d,t]),g,v,p,h,u]}function ige(e,t,r,n,a,o){let l=e.map(E=>[E.min,E.max]),u=n||0,d=E=>E*u;function p(E,F){return typeof E=="string"?d(r6(E)):E??F}let[h,v]=h$.useState([]),g=h$.useRef([]),[b,x]=h$.useState(null),y=()=>r.map(d);return[E=>{v(y()),x({index:E,confirmed:!1})},(E,F)=>{let S=null;if((!b||!b.confirmed)&&F!==0){if(F>0)S=E,x({index:E,confirmed:!0});else for(let R=E;R>=0;R-=1)if(h[R]>0&&t[R].resizable){S=R,x({index:R,confirmed:!0});break}}let D=S??b?.index??E,$=en(h),C=D+1,B=p(l[D][0],0),M=p(l[C][0],0),I=p(l[D][1],u),j=p(l[C][1],u),N=F;return $[D]+N<B&&(N=B-$[D]),$[C]-N<M&&(N=$[C]-M),$[D]+N>I&&(N=I-$[D]),$[C]-N>j&&(N=$[C]-j),$[D]+=N,$[C]-=N,a($),$},()=>{x(null)},(E,F)=>{let S=y(),D=o?F==="start"?"end":"start":F,$=D==="start"?E:E+1,C=D==="start"?E+1:E,B=S[$],M=S[C];if(B!==0&&M!==0)S[$]=0,S[C]+=B,g.current[E]=B;else{let I=B+M,j=p(l[$][0],0),N=p(l[$][1],u),R=p(l[C][0],0),L=p(l[C][1],u),q=Math.max(j,I-L),W=Math.min(N,I-R),U=R||(W-q)/2,P=g.current[E],H=I-P;P&&P<=L&&P>=R&&H<=N&&H>=j?(S[C]=P,S[$]=H):(S[$]-=U,S[C]+=U)}return a(S),S},b?.index]}var ti=A(_()),v$=e=>Gn(e)&&Number.isFinite(e)?Math.round(e):0,oge=300,sge=e=>{let{prefixCls:t,rootPrefixCls:r,vertical:n,index:a,active:o,ariaNow:l,ariaMin:u,ariaMax:d,resizable:p,draggerIcon:h,draggerStyle:v,draggerClassName:g,collapsibleIcon:b,startCollapsible:x,endCollapsible:y,onDraggerDoubleClick:E,onOffsetStart:F,onOffsetUpdate:S,onOffsetEnd:D,onCollapse:$,lazy:C,containerSize:B,showStartCollapsibleIcon:M,showEndCollapsibleIcon:I}=e,j=`${t}-bar`,N=(0,ti.useRef)(0),[R]=wn(r,"splitter"),[L,q]=(0,ti.useState)(null),[W,U]=(0,ti.useState)(0),P=n?0:W,H=n?W:0,V=le=>{le.stopPropagation();let he=Date.now(),se=he-N.current;se>0&&se<oge||(N.current=he,p&&le.currentTarget&&(q([le.pageX,le.pageY]),F(a)))},Q=le=>{if(p&&le.touches.length===1){let he=le.touches[0];q([he.pageX,he.pageY]),F(a)}},X=le=>{let he=B*l/100,se=he+le,ke=Math.max(0,B*u/100),De=Math.min(B,B*d/100);return Math.max(ke,Math.min(De,se))-he},Z=xt((le,he)=>{let se=X(n?he:le);U(se)}),O=xt(()=>{S(a,P,H,!0),U(0),D(!0)}),z=(le,he)=>{(le.key==="Enter"||le.key===" ")&&(le.preventDefault(),$(a,he))},K=le=>{switch(le){case!0:return`${j}-collapse-bar-always-visible`;case!1:return`${j}-collapse-bar-always-hidden`;case"auto":return`${j}-collapse-bar-hover-only`}};sr(()=>{if(!L)return;let le={mousemove:he=>{let{pageX:se,pageY:ke}=he,De=se-L[0],we=ke-L[1];C?Z(De,we):S(a,De,we)},mouseup:()=>{C?O():D(),q(null)},touchmove:he=>{if(he.touches.length===1){let se=he.touches[0],ke=se.pageX-L[0],De=se.pageY-L[1];C?Z(ke,De):S(a,ke,De)}},touchend:()=>{C?O():D(),q(null)}};for(let[he,se]of Object.entries(le))window.addEventListener(he,se);return()=>{for(let[he,se]of Object.entries(le))window.removeEventListener(he,se)}},[L,a,C]);let J={[R("bar-preview-offset")]:`${W}px`},[te,ee,ie,me]=ti.default.useMemo(()=>{let le=null,he=null,se=b?.start!==void 0,ke=b?.end!==void 0;return n?(le=se?b.start:ti.default.createElement(d$,null),he=ke?b.end:ti.default.createElement(u1,null)):(le=se?b.start:ti.default.createElement(yd,null),he=ke?b.end:ti.default.createElement(Du,null)),[le,he,se,ke]},[b,n]);return ti.default.createElement("div",{className:j},C&&ti.default.createElement("div",{className:Y(`${j}-preview`,{[`${j}-preview-active`]:!!W}),style:J}),ti.default.createElement("div",{style:v?.default,className:Y(`${j}-dragger`,{[`${j}-dragger-disabled`]:!p,[`${j}-dragger-active`]:o,[`${j}-dragger-customize`]:h!==void 0},g?.default,o&&g?.active),onMouseDown:V,onTouchStart:Q,onDoubleClick:()=>E?.(a),role:"separator","aria-disabled":!p,"aria-orientation":n?"horizontal":"vertical","aria-valuenow":v$(l),"aria-valuemin":v$(u),"aria-valuemax":v$(d)},h!==void 0?ti.default.createElement("div",{className:Y(`${j}-dragger-icon`)},h):null),x&&ti.default.createElement("div",{className:Y(`${j}-collapse-bar`,`${j}-collapse-bar-start`,{[`${j}-collapse-bar-customize`]:ie},K(M)),role:"button",tabIndex:0,"aria-label":"Toggle start panel",onClick:()=>$(a,"start"),onKeyDown:le=>z(le,"start")},ti.default.createElement("span",{className:Y(`${j}-collapse-icon`,`${j}-collapse-start`)},te)),y&&ti.default.createElement("div",{className:Y(`${j}-collapse-bar`,`${j}-collapse-bar-end`,{[`${j}-collapse-bar-customize`]:me},K(I)),role:"button",tabIndex:0,"aria-label":"Toggle end panel",onClick:()=>$(a,"end"),onKeyDown:le=>z(le,"end")},ti.default.createElement("span",{className:Y(`${j}-collapse-icon`,`${j}-collapse-end`)},ee)))},lge=sge,c1={position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)"},uge=e=>{let{componentCls:t,colorFill:r,splitBarDraggableSize:n,splitBarSize:a,splitTriggerSize:o,controlItemBgHover:l,controlItemBgActive:u,controlItemBgActiveHover:d,colorPrimary:p,antCls:h,calc:v}=e,[,g]=wn(h,"splitter"),b=`${t}-bar`,x=`${t}-mask`,y=`${t}-panel`,E=v(o).div(2).equal(),F={position:"absolute",background:e.colorPrimary,opacity:.2,pointerEvents:"none",transition:"none",zIndex:1,display:"none"};return{[t]:{...Mt(e),display:"flex",width:"100%",height:"100%",alignItems:"stretch",[`> ${b}`]:{flex:"none",position:"relative",userSelect:"none",[`${b}-dragger`]:{...c1,zIndex:1,"&::before":{content:'""',background:l,...c1},"&::after":{content:'""',background:r,...c1},[`&:hover:not(${b}-dragger-active)`]:{"&::before":{background:u}},"&-active":{zIndex:2,"&::before":{background:d}},[`&-active${b}-dragger-customize`]:{[`${b}-dragger-icon`]:{color:p}},[`&-disabled${b}-dragger`]:{zIndex:0,"&, &:hover, &-active":{cursor:"default","&::before":{background:l}},"&::after":{display:"none"},[`${b}-dragger-icon`]:{display:"none"}},"&-customize":{[`${b}-dragger-icon`]:{...c1,display:"flex",alignItems:"center",color:r},"&::after":{display:"none"}}},[`${b}-collapse-bar`]:{...c1,zIndex:e.zIndexPopupBase,background:l,fontSize:e.fontSizeSM,borderRadius:e.borderRadiusXS,color:e.colorText,cursor:"pointer",opacity:0,display:"flex",alignItems:"center",justifyContent:"center","&:focus-visible":gi(e),[`&:hover:not(${b}-collapse-bar-customize)`]:{background:u},[`&:active:not(${b}-collapse-bar-customize)`]:{background:d},[`${b}-collapse-icon`]:{display:"flex",alignItems:"center"}},[`${b}-collapse-bar-customize`]:{background:"transparent"},"&:hover, &:active, &:focus-within":{[`${b}-collapse-bar-hover-only`]:{opacity:1}},[`${b}-collapse-bar-hover-only`]:{"@media(hover:none)":{opacity:1}},[`${b}-collapse-bar-always-hidden`]:{display:"none"},[`${b}-collapse-bar-always-visible`]:{opacity:1}},[x]:{position:"fixed",zIndex:e.zIndexPopupBase,inset:0,"&-horizontal":{cursor:"col-resize"},"&-vertical":{cursor:"row-resize"}},"&-horizontal":{flexDirection:"row",[`> ${b}`]:{width:0,[`${b}-preview`]:{height:"100%",width:a,...F,[`&${b}-preview-active`]:{display:"block",transform:`translate3d(${g("bar-preview-offset")}, 0, 0)`}},[`${b}-dragger`]:{cursor:"col-resize",height:"100%",width:o,"&::before":{height:"100%",width:a},"&::after":{height:n,width:a}},[`${b}-collapse-bar`]:{width:e.fontSizeSM,height:e.controlHeightSM,"&-start":{left:{_skip_check_:!0,value:"auto"},right:{_skip_check_:!0,value:E},transform:"translateY(-50%)"},"&-end":{left:{_skip_check_:!0,value:E},right:{_skip_check_:!0,value:"auto"},transform:"translateY(-50%)"}}}},"&-vertical":{flexDirection:"column",[`> ${b}`]:{height:0,[`${b}-preview`]:{height:a,width:"100%",...F,[`&${b}-preview-active`]:{display:"block",transform:`translate3d(0, ${g("bar-preview-offset")}, 0)`}},[`${b}-dragger`]:{cursor:"row-resize",width:"100%",height:o,"&::before":{width:"100%",height:a},"&::after":{width:n,height:a}},[`${b}-collapse-bar`]:{height:e.fontSizeSM,width:e.controlHeightSM,"&-start":{top:"auto",bottom:E,transform:"translateX(-50%)"},"&-end":{top:E,bottom:"auto",transform:"translateX(-50%)"}}}},[y]:{overflow:"auto",scrollbarWidth:"thin",boxSizing:"border-box","&-hidden":{overflow:"hidden"},[`&:has(${t}:only-child)`]:{overflow:"hidden"},"&-transition":{transition:`flex-basis ${e.motionDurationSlow} ${e.motionEaseInOut}`,...qo()}}}}},cge=e=>{let t=e.splitBarSize||2,r=e.splitTriggerSize||6,n=e.resizeSpinnerSize||20,a=e.splitBarDraggableSize??n;return{splitBarSize:t,splitTriggerSize:r,splitBarDraggableSize:a,resizeSpinnerSize:n}},dge=ct("Splitter",uge,cge),pge=(e,t)=>{let{prefixCls:r,className:n,classNames:a,collapsible:o,style:l,styles:u,layout:d,orientation:p,vertical:h,children:v,destroyOnHidden:g,draggerIcon:b,collapsibleIcon:x,rootClassName:y,onDraggerDoubleClick:E,onResizeStart:F,onResize:S,onResizeEnd:D,lazy:$}=e,{getPrefixCls:C,direction:B,className:M,style:I,classNames:j,styles:N}=wt("splitter"),R=C("splitter",r),L=C(),q=xn(R),[W,U]=dge(R,q),[P,H]=Wo(p,h,d),V=B==="rtl",Q=!H&&V,X=Z0e(v),[Z,O]=(0,Zo.useState)(),z=Ye=>{let{offsetWidth:Ve,offsetHeight:Ae}=Ye,Ne=H?Ae:Ve;Ne!==0&&O(Ne)},[K,J,te,ee,ie,me]=age(X,Z),le=tge(X,J,Q),[he,se,ke,De,we]=ige(X,le,te,Z,me,Q),de=xt(Ye=>{he(Ye),F?.(J)}),be=xt((Ye,Ve,Ae)=>{let Ne=se(Ye,Ve);Ae?D?.(Ne):S?.(Ne)}),ye=xt(Ye=>{ke(),Ye||D?.(J)}),Re=xt((Ye,Ve)=>{let Ae=De(Ye,Ve);S?.(Ae),D?.(Ae);let Ne=Ae.map(ht=>Math.abs(ht)<Number.EPSILON);e.onCollapse?.(Ne,Ae)}),Fe={...e,vertical:H,orientation:P},$e=Ue(I),Ie=Ue(l),[He,Oe]=Et([j,a],[N,$e,u,Ie],{props:Fe},{dragger:{_default:"default"}}),Me=Y(R,n,`${R}-${P}`,{[`${R}-rtl`]:V},y,He.root,M,U,q,W),Te=Zo.default.useRef(null);Zo.default.useImperativeHandle(t,()=>({nativeElement:Te.current}));let Xe=`${R}-mask`,ot=Zo.default.useMemo(()=>{let Ye=[],Ve=0,Ae=X.length;for(let Ne=0;Ne<Ae;Ne+=1)Ve+=te[Ne],Ye.push(Ve);return Ye},[te,X.length]);return Zo.default.createElement(Ba,{onResize:z},Zo.default.createElement("div",{ref:Te,style:Oe.root,className:Me},X.map((Ye,Ve)=>{let Ae={...Ye,className:Y(He.panel,Ye.className),style:{...Oe.panel,...Ye.style}},Ne=Zo.default.createElement(K0e,{...Ae,prefixCls:R,size:K[Ve],supportMotion:o?.motion&&we===void 0,destroyOnHidden:Ye.destroyOnHidden??g}),ht=null,lt=le[Ve];if(lt){let Ke=Number.isFinite(ot[Ve-1])?ot[Ve-1]:0,je=Number.isFinite(ot[Ve+1])?ot[Ve+1]:1,nt=Ke+ee[Ve],Nt=je-ie[Ve+1],Pt=Ke+ie[Ve],Jr=je-ee[Ve+1];ht=Zo.default.createElement(lge,{lazy:$,index:Ve,active:we===Ve,prefixCls:R,rootPrefixCls:L,vertical:H,resizable:lt.resizable,draggerStyle:Oe.dragger,draggerClassName:He.dragger,draggerIcon:b,collapsibleIcon:o?.icon||x,ariaNow:ot[Ve]*100,ariaMin:Math.max(nt,Nt)*100,ariaMax:Math.min(Pt,Jr)*100,startCollapsible:lt.startCollapsible,endCollapsible:lt.endCollapsible,showStartCollapsibleIcon:lt.showStartCollapsibleIcon,showEndCollapsibleIcon:lt.showEndCollapsibleIcon,onDraggerDoubleClick:E,onOffsetStart:de,onOffsetUpdate:(Xt,Tr,tr,Tt)=>{let cr=H?tr:Tr;Q&&(cr=-cr),be(Xt,cr,Tt)},onOffsetEnd:ye,onCollapse:Re,containerSize:Z||0})}return Zo.default.createElement(Zo.default.Fragment,{key:`split-panel-${Ve}`},Ne,ht)}),Gn(we)&&Zo.default.createElement("div",{"aria-hidden":!0,className:Y(Xe,`${Xe}-${P}`)})))},fge=Zo.default.forwardRef(pge),mge=fge,$W=mge;$W.Panel=Q0e;var d1=$W;var yf=null,Nn={open:!1,dismissable:!0,context:null,revision:0},n6=new Set;function DW(e,t){Nn={open:e,dismissable:!0,context:t,revision:Nn.revision+1};for(let r of n6)r()}function hge(e){if(!(!Nn.open||Nn.dismissable===e)){Nn={...Nn,dismissable:e};for(let t of n6)t()}}var wd={open(e){let t=e.sessionId.trim();if(!yf||!t)return!1;if(Nn.open&&Nn.context?.sessionId===t)return!0;let r={sessionId:t};return yf.onOpen(r),DW(!0,r),!0},close(){if(!Nn.open||!Nn.context)return;let e=Nn.context;DW(!1,null),yf?.onClose(e)},closeIfOpen(){return!Nn.open||!Nn.dismissable?!1:(this.close(),!0)},closeTopmost(){return Nn.open?(Nn.dismissable&&this.close(),!0):!1},isOpen(){return Nn.open},isCurrentLifecycle(e,t){return Nn.open&&Nn.revision===e&&Nn.context?.sessionId===t},setDismissable(e){hge(e)}},y$={subscribe(e){return n6.add(e),()=>n6.delete(e)},getSnapshot(){return Nn},getRuntime(){return yf}};function w$(e){return yf=e,()=>{yf===e&&(Nn.open&&wd.close(),yf=null)}}var S0=null,la={open:!1,dismissable:!0,context:null,revision:0},a6=new Set;function AW(e,t){la={open:e,dismissable:!0,context:t,revision:la.revision+1};for(let r of a6)r()}function gge(e){if(!(!la.open||la.dismissable===e)){la={...la,dismissable:e};for(let t of a6)t()}}var xd={open(e){let t=e.sessionId.trim();if(!t)return!1;let r={...e,sessionId:t};return la.open&&la.context?.sessionId===t&&la.context.intent===r.intent||(S0?.onOpen(r),AW(!0,r)),!0},close(){if(!la.open||!la.context)return;let e=la.context;AW(!1,null),S0?.onClose(e)},closeIfOpen(){return!la.open||!la.dismissable?!1:(this.close(),!0)},closeTopmost(){return la.open?(la.dismissable&&this.close(),!0):!1},isOpen(){return la.open},setDismissable(e){gge(e)}},x$={subscribe(e){return a6.add(e),()=>a6.delete(e)},getSnapshot(){return la},getRuntime(){return S0}};function E$(e){return S0=e,()=>{S0===e&&(la.open&&xd.close(),S0=null)}}var Bs={open:!1,dismissable:!0,revision:0},F0=null,i6=new Set;function BW(e){Bs={open:e,dismissable:!0,revision:Bs.revision+1};for(let t of i6)t()}var wf={open(){return F0?.onOpen(),BW(!0),!0},close(){Bs.open&&(BW(!1),F0?.onClose())},closeIfOpen(){return Bs.open?Bs.dismissable?(this.close(),!0):!1:!0},isOpen(){return Bs.open},setDismissable(e){if(!(!Bs.open||Bs.dismissable===e)){Bs={...Bs,dismissable:e};for(let t of i6)t()}}},k$={subscribe(e){return i6.add(e),()=>i6.delete(e)},getSnapshot(){return Bs},getRuntime(){return F0}};function C$(e){return F0=e,()=>{F0===e&&(F0=null)}}var p1={open:!1,sessionId:"",revision:0},S$=new Set;function IW(e){p1={...p1,...e,revision:p1.revision+1},S$.forEach(t=>t())}var f1={open(e=""){return IW({open:!0,sessionId:e}),!0},close(){p1.open&&IW({open:!1})}},F$={subscribe(e){return S$.add(e),()=>S$.delete(e)},getSnapshot(){return p1}};var $$=null,o6=new Set,m1={open(e,t){$$={...e,trigger:t},o6.forEach(r=>r())},close(){$$=null,o6.forEach(e=>e())}},D$={subscribe(e){return o6.add(e),()=>{o6.delete(e)}},getSnapshot(){return $$},getServerSnapshot(){return null}};var A$="wand:page-route",B$=new Set(["view","session","workspace","workspaceTask","window","tab","task","run","team","settings","range","sidebar","sidebarQuery","workspaceView","conversation","conversationTask","conversationRun","chatFilter","chatActivity","chatQuery","chatTaskStage","chatWorkspace","chatRuntime","directoryTab","directoryQuery","boardView","q","directory","sort","filters","scheduleView","scheduleQuery","scheduleFilter","scheduleRange","scheduleDate","teamQuery","teamFilter","teamPage","settingsNested","knowledgeScope","knowledgeOwner","knowledgeDocument"]),MW=["sidebarMode","display","zoom","hideCompleted","queue","expandedTask","boardCollapsed","scheduleExpanded"],vge=[{views:["knowledge"],keys:["knowledgeScope","knowledgeOwner","knowledgeDocument"]},{views:["taskboard","issues"],keys:["boardView","q","sort","filters","directory","task"]},{views:["teams","teamchat"],keys:["team","teamQuery","teamFilter","teamPage","run"]},{views:["schedules","calendar"],keys:["scheduleView","scheduleQuery","scheduleFilter","scheduleRange","scheduleDate","range"]},{views:["chats","contacts"],keys:["conversation","conversationTask","conversationRun","directoryTab","directoryQuery"]}],bge=new Set([...MW,"embed","reactUi","nativeInput","reactShell","backToNative","switchServer","passthrough"]);function hn(){return typeof window>"u"?"":window.location.search}function yi(e){return typeof window>"u"?()=>{}:(window.addEventListener("popstate",e),window.addEventListener(A$,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(A$,e)})}var yge=256,wge=300,s6=null,$0=null;function xge(e,t){let r=new URLSearchParams(e);for(let o of MW)r.delete(o);let n=t.view;if(n&&n!==r.get("view")){for(let o of vge)if(!o.views.includes(n))for(let l of o.keys)l in t||r.delete(l)}for(let[o,l]of Object.entries(t))l===null||l===""||l.length>yge?r.delete(o):r.set(o,l);let a=r.toString();return a?`?${a}`:""}function TW(e,t){let r=new URL(window.location.href);r.search=xge(r.search,e);let n=`${r.pathname}${r.search}${r.hash}`;n!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&(window.history[t==="push"?"pushState":"replaceState"](window.history.state,"",n),window.dispatchEvent(new Event(A$)))}function I$(){$0&&(clearTimeout($0),$0=null);let e=s6;s6=null,e&&typeof window<"u"&&TW(e,"replace")}function M$(e){typeof window>"u"||(s6={...s6,...e},$0&&clearTimeout($0),$0=setTimeout(I$,wge))}typeof window<"u"&&window.addEventListener("pagehide",I$);function Qn(e,t="push"){typeof window>"u"||(I$(),TW(e,t))}function T$(e,t){let r=new URLSearchParams(e),n=r.get("session");return r.get("view")==="workspace"&&n&&t&&t!==n?"replace":"push"}function xf(e){let t=e.trim();t&&Qn({view:"workspace",session:t,task:null,workspace:null,workspaceTask:null,window:null,tab:null})}function Ou(e=hn()){return[...new URLSearchParams(e).keys()].some(t=>B$.has(t))}function _$(e){let t=new URL(e),r=new URL(t.pathname,t.origin);for(let[n,a]of t.searchParams)B$.has(n)&&r.searchParams.append(n,a);return r.href}function j$(e){return[...new Set(new URLSearchParams(e).keys())].filter(t=>!B$.has(t)&&!bge.has(t))}var R$=new Set;function N$(e){R$.forEach(t=>t(e))}function jW(e){return R$.add(e),()=>{R$.delete(e)}}var NW={owners:()=>mt("/api/knowledge/owners",{cache:"no-store"}),async list(e){let t=new URLSearchParams({scope:e.scope,ownerId:e.ownerId}),r=await mt(`/api/knowledge?${t}`,{cache:"no-store"});if(r.scope!==e.scope||r.ownerId!==e.ownerId||r.entries.some(n=>n.scope!==e.scope||n.ownerId!==e.ownerId))throw new Error("\u77E5\u8BC6\u5E93\u5F52\u5C5E\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u3002");return r},async save(e,t,r){let n=await mt(r?`/api/knowledge/${encodeURIComponent(r.id)}`:"/api/knowledge",rn({...e,...t,...r?{revision:r.revision}:{}},r?"PATCH":"POST"));if(n.entry.scope!==e.scope||n.entry.ownerId!==e.ownerId)throw new Error("\u4FDD\u5B58\u56DE\u6267\u5F52\u5C5E\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u5237\u65B0\u786E\u8BA4\uFF1B\u8349\u7A3F\u5DF2\u4FDD\u7559\u3002");return N$(e),n.entry},async remove(e){await mt(`/api/knowledge/${encodeURIComponent(e.id)}`,rn({scope:e.scope,ownerId:e.ownerId,revision:e.revision},"DELETE")),N$(e)},async clearPersonal(e){await mt(`/api/silicon-employees/${encodeURIComponent(e)}/knowledge`,{method:"DELETE"}),N$({scope:"personal",ownerId:e})}},Ege={open:!1,scope:"project",ownerId:"",selectedId:"",mobileDocument:!1,query:"",owners:null,library:null,loading:!1,error:"",busy:!1,conflict:!1,notice:"",draft:null,validationFailed:!1};function Oa(e){return`${e.scope}:${e.ownerId}`}function Ef(e,t){return`${Oa(e)}:${t||"new"}`}function P$(e){return e instanceof Error?e.message:"\u77E5\u8BC6\u5E93\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002"}function PW(e){return!!e&&(!e.original||e.title!==e.original.title||e.content!==e.original.content||e.folder!==e.original.folder)}var kge=class{constructor(e=NW,t=Qn){ae(this,"repository",e),ae(this,"route",t),ae(this,"snapshot",{...Ege}),ae(this,"listeners",new Set),ae(this,"drafts",new Map),ae(this,"reads",0),ae(this,"writes",0),ae(this,"getSnapshot",()=>this.snapshot),ae(this,"subscribe",r=>(this.listeners.add(r),()=>{this.listeners.delete(r)}))}publish(e){this.snapshot={...this.snapshot,...e},this.listeners.forEach(t=>t())}rememberDraft(){this.snapshot.draft&&this.drafts.set(Ef(this.snapshot,this.snapshot.draft.id),this.snapshot.draft)}hasDrafts(){return[...this.drafts.values(),this.snapshot.draft].some(PW)}restore(e,t=this.snapshot.scope,r=this.snapshot.ownerId,n=this.snapshot.selectedId){let a=this.snapshot;this.rememberDraft();let o=Oa(a)!==Oa({scope:t,ownerId:r});(o||!e)&&this.reads++,this.publish({open:e,scope:t,ownerId:r,selectedId:n,mobileDocument:e&&(!a.open||o||a.selectedId!==n)?!!n:a.mobileDocument,...o?{library:null,loading:!1,query:"",error:"",conflict:!1,notice:"",validationFailed:!1}:{},draft:this.drafts.get(Ef({scope:t,ownerId:r},n))??null})}open(e,t){let r=e??this.snapshot.scope,n=t??(r===this.snapshot.scope?this.snapshot.ownerId:""),a=r===this.snapshot.scope&&n===this.snapshot.ownerId?this.snapshot.selectedId:"";this.restore(!0,r,n,a),this.route({view:"knowledge",knowledgeScope:r,knowledgeOwner:n,knowledgeDocument:a})}close(){this.snapshot.open&&(this.restore(!1),this.route({view:"workspace"}))}select(e){this.rememberDraft(),this.publish({selectedId:e,mobileDocument:!0,draft:this.drafts.get(Ef(this.snapshot,e))??null,error:"",conflict:!1,notice:"",validationFailed:!1}),this.route({knowledgeDocument:e},"replace")}directory(){this.publish({mobileDocument:!1})}search(e){this.publish({query:e})}async load(){let e=++this.reads,t={scope:this.snapshot.scope,ownerId:this.snapshot.ownerId};this.publish({loading:!0,error:"",validationFailed:!1});try{let r=await this.repository.owners();if(e!==this.reads)return;let n=t.scope==="global"?r.global?[r.global]:[]:t.scope==="project"?r.projects:r.employees;if(t.scope==="global"&&!r.global)throw new Error("\u670D\u52A1\u5668\u5C1A\u4E0D\u652F\u6301\u5168\u5C40\u77E5\u8BC6\u5E93\uFF0C\u8BF7\u66F4\u65B0\u670D\u52A1\u7AEF\u3002");if(t.ownerId||(t.ownerId=n[0]?.id??""),this.publish({owners:r,ownerId:t.ownerId}),!t.ownerId){this.publish({library:null,loading:!1});return}if(!n.some(l=>l.id===t.ownerId))throw this.publish({library:null}),new Error(t.scope==="personal"?"\u8FD9\u4F4D\u5458\u5DE5\u5DF2\u4E0D\u53EF\u7528\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u5458\u5DE5\u3002":"\u8FD9\u4E2A\u9879\u76EE\u5DF2\u4E0D\u53EF\u7528\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u9879\u76EE\u3002");let a=await this.repository.list(t);if(e!==this.reads)return;let o=this.snapshot.draft?this.snapshot.draft.id:this.snapshot.selectedId||a.entries[0]?.id||"";this.publish({library:a,loading:!1,selectedId:o,draft:this.snapshot.draft??this.drafts.get(Ef(t,o))??null}),this.snapshot.open&&this.route({knowledgeScope:t.scope,knowledgeOwner:t.ownerId,knowledgeDocument:o},"replace")}catch(r){if(e===this.reads){let n=r?.status;this.publish({loading:!1,error:P$(r),...n===403||n===404?{library:null}:{}})}}}edit(e){if(this.snapshot.busy||this.snapshot.library?.readOnly||!this.snapshot.library)return;let t={title:e?.title??"",content:e?.content??"",folder:e?.folder??""},r={...t,id:e?.id??"",revision:e?.revision,original:e?t:null,generation:0};this.publish({draft:r,selectedId:e?.id??"",mobileDocument:!0,error:"",conflict:!1,notice:"",validationFailed:!1}),this.rememberDraft()}change(e){if(!this.snapshot.draft||this.snapshot.busy)return;let t={...this.snapshot.draft,...e,generation:this.snapshot.draft.generation+1};this.publish({draft:t,notice:"",...this.snapshot.validationFailed&&t.title.trim()&&t.content.trim()?{validationFailed:!1,error:""}:{}}),this.rememberDraft()}discard(){this.snapshot.busy||(this.snapshot.draft&&this.drafts.delete(Ef(this.snapshot,this.snapshot.draft.id)),this.publish({draft:null,error:"",conflict:!1,validationFailed:!1}))}acceptLatestRevision(){let e=this.snapshot.draft,t=this.snapshot.library?.entries.find(r=>r.id===e?.id);!e||!t||t.revision===e.revision||this.snapshot.busy||(this.publish({draft:{...e,revision:t.revision,original:{title:t.title,content:t.content,folder:t.folder},generation:e.generation+1},conflict:!1,error:"",notice:"\u5DF2\u4FDD\u7559\u8349\u7A3F\uFF0C\u8BF7\u5B8C\u6210\u5408\u5E76\u540E\u4FDD\u5B58\u3002"}),this.rememberDraft())}async save(){let e=this.snapshot,t=e.draft;if(!t||e.busy||!e.library||e.library.readOnly)return;if(!t.title.trim()||!t.content.trim()){this.publish({error:"\u8BF7\u586B\u5199\u6587\u6863\u6807\u9898\u548C\u6B63\u6587\u3002",validationFailed:!0});return}let r=Ef(e,t.id),n=++this.writes;this.publish({busy:!0,error:"",conflict:!1,notice:"",validationFailed:!1});try{let a=await this.repository.save({scope:e.scope,ownerId:e.ownerId},{title:t.title,content:t.content,folder:t.folder},t.id&&t.revision?{id:t.id,revision:t.revision}:void 0);if(this.drafts.get(r)?.generation===t.generation&&this.drafts.delete(r),n!==this.writes||Oa(e)!==Oa(this.snapshot)||this.snapshot.draft!==t)return;this.publish({draft:null,selectedId:a.id,notice:"\u5DF2\u4FDD\u5B58",library:e.library?{...e.library,entries:[a,...e.library.entries.filter(o=>o.id!==a.id)],total:e.library.total+(e.library.entries.some(o=>o.id===a.id)?0:1)}:null}),this.snapshot.open&&this.route({knowledgeDocument:a.id},"replace"),e.scope==="global"&&await this.load()}catch(a){Oa(e)===Oa(this.snapshot)&&this.snapshot.draft===t&&this.publish({error:P$(a),conflict:a.status===409})}finally{n===this.writes&&(this.publish({busy:!1}),this.snapshot.open&&this.snapshot.draft!==t&&Oa(e)===Oa(this.snapshot)&&this.load())}}async remove(e){if(this.snapshot.busy||Oa(e)!==Oa(this.snapshot))return;let t=++this.writes;this.publish({busy:!0,error:"",notice:""});try{if(await this.repository.remove(e),this.drafts.delete(Ef(e,e.id)),Oa(e)!==Oa(this.snapshot))return;let r=this.snapshot.library;r&&this.publish({library:{...r,entries:r.entries.filter(n=>n.id!==e.id),total:Math.max(0,r.total-(r.entries.some(n=>n.id===e.id)?1:0))}}),this.snapshot.selectedId===e.id&&this.publish({selectedId:"",draft:null,mobileDocument:!1,notice:"\u5DF2\u5220\u9664"}),await this.load()}catch(r){Oa(e)===Oa(this.snapshot)&&this.publish({error:P$(r)})}finally{t===this.writes&&this.publish({busy:!1})}}},ko=new kge,xl=ko,_W=!1;function O$(){if(_W||typeof window>"u")return;_W=!0;let e=()=>{let t=new URLSearchParams(hn());if(t.get("view")!=="knowledge"){ko.restore(!1);return}let r=t.get("knowledgeScope");ko.restore(!0,r==="global"||r==="personal"?r:"project",t.get("knowledgeOwner")??"",t.get("knowledgeDocument")??"")};yi(e),e(),jW(t=>{let r=xl.getSnapshot();r.open&&!r.busy&&Oa(r)===Oa(t)&&ko.load()}),window.addEventListener("beforeunload",t=>{ko.hasDrafts()&&(t.preventDefault(),t.returnValue="")})}var h1=A(_()),z$=A(_()),Cge=e=>{let{componentCls:t,borderRadius:r,paddingSM:n,colorBorder:a,paddingXS:o,fontSizeLG:l,fontSizeSM:u,borderRadiusLG:d,borderRadiusSM:p,colorBgContainerDisabled:h,lineWidth:v,lineType:g,antCls:b}=e,[x,y]=wn(b,"space-addon");return{[t]:[{...Mt(e),display:"inline-flex",alignItems:"center",gap:0,whiteSpace:"nowrap",paddingInline:n,margin:0,borderWidth:v,borderStyle:g,borderRadius:r,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:l,borderRadius:d},"&-small":{paddingInline:o,borderRadius:p,fontSize:u},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[x("addon-border-color")]:a,[x("addon-background")]:h,[x("addon-border-color-outlined")]:a,[x("addon-background-filled")]:h,borderColor:y("addon-border-color"),background:y("addon-background"),"&-variant-outlined":{[x("addon-border-color")]:y("addon-border-color-outlined")},"&-variant-filled":{[x("addon-border-color")]:"transparent",[x("addon-background")]:y("addon-background-filled"),[`&${t}-disabled`]:{[x("addon-border-color")]:a,[x("addon-background")]:h}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{[x("addon-border-color-outlined")]:e.colorError,[x("addon-background-filled")]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[x("addon-border-color-outlined")]:e.colorWarning,[x("addon-background-filled")]:e.colorWarningBg,color:e.colorWarning}}]}},Sge=ct("Addon",e=>[Cge(e),Yh(e,{focus:!1})]),Fge=z$.default.forwardRef((e,t)=>{let{className:r,children:n,style:a,prefixCls:o,variant:l="outlined",disabled:u,status:d,...p}=e,{getPrefixCls:h,direction:v}=z$.default.useContext(st),g=h("space-addon",o),[b,x]=Sge(g),{compactItemClassnames:y,compactSize:E}=ml(g,v),F=Up(g,d),S=Y(g,b,y,x,`${g}-variant-${l}`,F,{[`${g}-${E}`]:E,[`${g}-disabled`]:u},r);return z$.default.createElement("div",{ref:t,className:S,style:a,...p},n)}),RW=Fge,$ge=A(_()),OW=$ge.default.createContext({latestIndex:0}),Dge=OW.Provider,g1=A(_()),Age=e=>{let{className:t,prefix:r,index:n,children:a,separator:o,style:l,classNames:u,styles:d}=e,{latestIndex:p}=g1.useContext(OW);return Lt(a)?g1.createElement(g1.Fragment,null,g1.createElement("div",{className:t,style:l},a),n<p&&o&&g1.createElement("span",{className:Y(`${r}-item-separator`,u?.separator),style:d?.separator},o)):null},Bge=Age,Ige=e=>{let{componentCls:t,antCls:r}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},Mge=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},Tge=ct("Space",e=>{let t=vt(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[Ige(t),Mge(t)]},()=>({}),{resetStyle:!1}),_ge=h1.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n,size:a,className:o,style:l,classNames:u,styles:d}=wt("space"),{size:p=a??"small",align:h,className:v,rootClassName:g,children:b,direction:x,orientation:y,prefixCls:E,split:F,separator:S,style:D,vertical:$,wrap:C=!1,classNames:B,styles:M,...I}=e,[j,N]=Array.isArray(p)?p:[p,p],R=tf(N),L=tf(j),q=h2(N),W=h2(j),U=Er(b,{keepEmpty:!0}),[P,H]=Wo(y,$,x),V=h===void 0&&!H?"center":h,Q=S??F,X=r("space",E),[Z,O]=Tge(X),z={...e,size:p,orientation:P,align:V},K=Ue(l),J=Ue(D),[te,ee]=Et([u,B],[d,K,M,J],{props:z}),ie=Y(X,o,Z,`${X}-${P}`,{[`${X}-rtl`]:n==="rtl",[`${X}-align-${V}`]:V,[`${X}-gap-row-${N}`]:R,[`${X}-gap-col-${j}`]:L},v,g,O,te.root),me=Y(`${X}-item`,te.item),le=U.map((ke,De)=>{let we=ke?.key||`${me}-${De}`;return h1.createElement(Bge,{prefix:X,classNames:te,styles:ee,className:me,key:we,index:De,separator:Q,style:ee.item},ke)}),he=h1.useMemo(()=>({latestIndex:U.reduce((ke,De,we)=>Lt(De)?we:ke,0)}),[U]);if(U.length===0)return null;let se={};return C&&(se.flexWrap="wrap"),!L&&W&&(se.columnGap=j),!R&&q&&(se.rowGap=N),h1.createElement("div",{ref:t,className:ie,style:{...se,...ee.root},...I},h1.createElement(Dge,{value:he},le))}),L$=_ge;L$.Compact=xb;L$.Addon=RW;var H$=L$;var zW=A(_()),jge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},Nge=jge;function q$(){return q$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},q$.apply(this,arguments)}var Pge=(e,t)=>zW.createElement(Ut,q$({},e,{ref:t,icon:Nge})),Rge=zW.forwardRef(Pge),U$=Rge,LW=A(_()),Oge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},zge=Oge;function W$(){return W$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},W$.apply(this,arguments)}var Lge=(e,t)=>LW.createElement(Ut,W$({},e,{ref:t,icon:zge})),Hge=LW.forwardRef(Lge),V$=Hge;var HW=A(_()),qge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},Wge=qge;function G$(){return G$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},G$.apply(this,arguments)}var Uge=(e,t)=>HW.createElement(Ut,G$({},e,{ref:t,icon:Wge})),Vge=HW.forwardRef(Uge),K$=Vge;var qW=A(_()),X$=A(_()),Gge=e=>{let{getPrefixCls:t,direction:r}=(0,X$.useContext)(st),{prefixCls:n,className:a}=e,o=t("input-group",n),l=t("input"),[u,d]=p2(l),p=Y(o,d,{[`${o}-lg`]:e.size==="large",[`${o}-sm`]:e.size==="small",[`${o}-compact`]:e.compact,[`${o}-rtl`]:r==="rtl"},u,a),h=(0,X$.useContext)(go),v=(0,X$.useMemo)(()=>({...h,isFormItemInput:!1}),[h]);return qW.createElement(go.Provider,{value:v},qW.createElement(H$.Compact,{className:p,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},Kge=Gge,wi=A(_()),Xge=e=>{let{componentCls:t,paddingXS:r}=e;return{[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:r,[`${t}-input-wrapper`]:{position:"relative",[`${t}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${t}-mask-input`]:{color:"transparent",caretColor:e.colorText,"&::selection":{color:"transparent"}},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},Qge=ct(["Input","OTP"],e=>{let t=vt(e,Qp(e));return Xge(t)},Yp),kf=A(_()),Yge="\u2022",Jge=kf.forwardRef((e,t)=>{let{className:r,value:n,onChange:a,onActiveChange:o,index:l,mask:u,onFocus:d,type:p,...h}=e,{getPrefixCls:v}=kf.useContext(st),g=v("otp"),b=typeof u=="string"?u:Yge,x=kf.useRef(null);kf.useImperativeHandle(t,()=>x.current);let y=D=>{a(l,D.target.value)},E=()=>{br(()=>{let D=x.current?.input;document.activeElement===D&&D&&D.select()})},F=D=>{d?.(D),E()},S=D=>{let{key:$,ctrlKey:C,metaKey:B}=D;$==="ArrowLeft"?o(l-1):$==="ArrowRight"?o(l+1):$==="z"&&(C||B)?D.preventDefault():$==="Backspace"&&!n&&o(l-1),E()};return kf.createElement("span",{className:`${g}-input-wrapper`,role:"presentation"},u&&n!==""&&n!==void 0&&kf.createElement("span",{className:`${g}-mask-icon`,"aria-hidden":"true"},b),kf.createElement(Jh,{"aria-label":`OTP Input ${l+1}`,...h,type:p??(u?"password":"text"),ref:x,value:n,onInput:y,onFocus:F,onKeyDown:S,onMouseDown:E,onMouseUp:E,className:Y(r,{[`${g}-mask-input`]:u})}))}),Zge=Jge;function l6(e){return(e||"").split("")}var eve=e=>{let{index:t,prefixCls:r,separator:n,className:a,style:o}=e,l=pr(n)?n(t):n;return l?wi.createElement("span",{className:Y(`${r}-separator`,a),style:o},l):null},tve=wi.forwardRef((e,t)=>{let{prefixCls:r,length:n=6,size:a,defaultValue:o,value:l,onChange:u,formatter:d,separator:p,variant:h,disabled:v,status:g,autoFocus:b,mask:x,type:y,autoComplete:E,onInput:F,onFocus:S,inputMode:D,classNames:$,styles:C,className:B,style:M,...I}=e,{classNames:j,styles:N,getPrefixCls:R,direction:L,style:q,className:W}=wt("otp"),U=R("otp",r),[P]=Su("otp",h,void 0,"input"),H={...e,length:n,variant:P},V=Ue(q),Q=Ue(M),[X,Z]=Et([j,$],[N,V,C,Q],{props:H}),O=Ya(I,{aria:!0,data:!0,attr:!0}),[z,K]=Qge(U),J=qr(Fe=>a??Fe),te=wi.useContext(go),ee=qh(te.status,g),ie=wi.useMemo(()=>({...te,status:ee,hasFeedback:!1,feedbackIcon:null}),[te,ee]),me=wi.useRef(null),le=wi.useRef({});wi.useImperativeHandle(t,()=>({focus:()=>{le.current[0]?.focus()},blur:()=>{for(let Fe=0;Fe<n;Fe+=1)le.current[Fe]?.blur()},nativeElement:me.current}));let he=Fe=>d?d(Fe):Fe,[se,ke]=wi.useState(()=>l6(he(o||"")));wi.useEffect(()=>{l!==void 0&&ke(l6(l))},[l]);let De=xt(Fe=>{ke(Fe),F&&F(Fe),u&&Fe.length===n&&Fe.every($e=>$e)&&Fe.some(($e,Ie)=>se[Ie]!==$e)&&u(Fe.join(""))}),we=xt((Fe,$e)=>{let Ie=en(se);for(let Oe=0;Oe<Fe;Oe+=1)Ie[Oe]||(Ie[Oe]="");$e.length<=1?Ie[Fe]=$e:Ie=Ie.slice(0,Fe).concat(l6($e)),Ie=Ie.slice(0,n);for(let Oe=Ie.length-1;Oe>=0&&!Ie[Oe];Oe-=1)Ie.pop();let He=he(Ie.map(Oe=>Oe||" ").join(""));return Ie=l6(He).map((Oe,Me)=>Oe===" "&&!Ie[Me]?Ie[Me]:Oe),Ie}),de=(Fe,$e)=>{let Ie=we(Fe,$e),He=Math.min(Fe+$e.length,n-1);He!==Fe&&Ie[Fe]!==void 0&&le.current[He]?.focus(),De(Ie)},be=Fe=>{le.current[Fe]?.focus()},ye=(Fe,$e)=>{for(let Ie=0;Ie<$e;Ie+=1)if(!le.current[Ie]?.input?.value){le.current[Ie]?.focus();break}S?.(Fe)},Re={variant:P,disabled:v,status:ee,mask:x,type:y,inputMode:D,autoComplete:E};return wi.createElement("div",{...O,ref:me,className:Y(B,U,{[`${U}-sm`]:J==="small",[`${U}-lg`]:J==="large",[`${U}-rtl`]:L==="rtl"},K,z,W,X.root),style:Z.root,role:"group"},wi.createElement(go.Provider,{value:ie},Array.from({length:n}).map((Fe,$e)=>{let Ie=`otp-${$e}`,He=se[$e]||"";return wi.createElement(wi.Fragment,{key:Ie},wi.createElement(Zge,{ref:Oe=>{le.current[$e]=Oe},index:$e,size:J,htmlSize:1,className:Y(X.input,`${U}-input`),style:Z.input,onChange:de,value:He,onActiveChange:be,autoFocus:$e===0&&b,onFocus:Oe=>ye(Oe,$e),...Re}),$e<n-1&&wi.createElement(eve,{separator:p,index:$e,prefixCls:U,className:Y(X.separator),style:Z.separator}))})))}),rve=tve,zu=A(_()),WW=A(_()),nve=e=>e?zu.createElement(V$,null):zu.createElement(U$,null),ave={click:"onClick",hover:"onMouseOver"},ive=zu.forwardRef((e,t)=>{let{disabled:r,action:n="click",visibilityToggle:a=!0,iconRender:o,prefixCls:l,inputPrefixCls:u,suffix:d,className:p,style:h,classNames:v,styles:g,variant:b,...x}=e,{getPrefixCls:y,className:E,style:F,classNames:S,styles:D,iconRender:$}=wt("inputPassword"),[C]=Su("inputPassword",b,e.bordered,"input"),[B]=Lp("global"),M=zu.useContext(Ia),I=r??M,j={...e,disabled:I,variant:C},N=Ue(F),R=Ue(h),[L,q]=Et([S,v],[D,N,g,R],{props:j}),W=Ct(a)&&a.visible!==void 0,[U,P]=(0,WW.useState)(()=>W?a.visible:!1),H=(0,WW.useRef)(null);zu.useEffect(()=>{W&&P(a.visible)},[W,a]);let V=c2(H),Q=()=>{if(I)return;U&&V();let te=!U;W||P(te),Ct(a)&&a.onVisibleChange?.(te)},X=te=>{let ee=ave[n]||"",ie=(o||$||nve)(U),me=Ct(a)?a.tabIndex:void 0;return zu.createElement("span",{key:"passwordIcon",role:"button",tabIndex:I?-1:me??0,className:`${te}-icon`,"aria-disabled":I,"aria-pressed":U,"aria-label":U?B.hide:B.show,onMouseDown:le=>{le.preventDefault()},onMouseUp:le=>{le.preventDefault()},onKeyDown:le=>{(le.key==="Enter"||le.key===" ")&&(le.preventDefault(),le.repeat||Q())},[ee]:Q},ie)},Z=y("input",u),O=y("input-password",l),z=a&&X(O),K=Y(O,E,p,{[`${O}-${e.size}`]:!!e.size}),J={...x,type:U?"text":"password",prefixCls:Z,suffix:zu.createElement(zu.Fragment,null,z,d),disabled:I,className:K,classNames:L,styles:q,variant:C};return zu.createElement(Jh,{ref:pn(t,H),...J})}),ove=ive,Ed=A(_()),sve=e=>{let{componentCls:t,antCls:r,calc:n,max:a}=e,o=`${t}-btn`,[l,u]=wn(r,"input-search"),d=e.inputFontSizeSM??e.fontSize,p=a(e.controlHeightSM,n(d).mul(e.lineHeight).add(n(e.paddingBlockSM).mul(2)).add(n(e.lineWidth).mul(2)).equal());return{[t]:{[l("btn-height")]:ue(e.controlHeight),width:"100%",[o]:{height:u("btn-height"),"&:focus-visible":{zIndex:5},[`&${r}-btn-icon-only`]:{width:u("btn-height")},"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}},[`&${t}-large`]:{[l("btn-height")]:ue(e.controlHeightLG)},[`&${t}-small`]:{[l("btn-height")]:ue(e.controlHeightSM)},[`&${t}-small ${o}`]:{minHeight:p,[`&${e.antCls}-btn-icon-only`]:{minWidth:p}}}}},lve=ct(["Input","Search"],e=>{let t=vt(e,Qp(e));return sve(t)},Yp),uve=Ed.forwardRef((e,t)=>{let{prefixCls:r,inputPrefixCls:n,className:a,size:o,style:l,enterButton:u=!1,searchIcon:d,addonAfter:p,loading:h,disabled:v,onSearch:g,onChange:b,onCompositionStart:x,onCompositionEnd:y,variant:E,onPressEnter:F,classNames:S,styles:D,hidden:$,...C}=e,{direction:B,getPrefixCls:M,className:I,style:j,classNames:N,styles:R,searchIcon:L}=wt("inputSearch"),q=Ed.useContext(Ia),W=v??q,[U,,P]=Su("inputSearch",E,e.bordered),H=P?U:void 0,[V]=Su("inputSearch",E,e.bordered,"input"),Q={...e,enterButton:u,variant:H},X=Ue(j),Z=Ue(l),[O,z]=Et([N,S],[R,X,D,Z],{props:Q},{button:{_default:"root"}}),K=Ed.useRef(!1),J=M("input-search",r),te=M("input",n),[ee,ie]=lve(J),{compactSize:me}=ml(J,B),le=qr(Xe=>o??me??Xe),he=Ed.useRef(null),se=Xe=>{Xe?.target&&Xe.type==="click"&&g&&g(Xe.target.value,Xe,{source:"clear"}),b?.(Xe)},ke=Xe=>{document.activeElement===he.current?.input&&Xe.preventDefault()},De=Xe=>{g&&g(he.current?.input?.value,Xe,{source:"input"})},we=Xe=>{K.current||h||(F?.(Xe),De(Xe))},de=typeof u=="boolean"?bb(d,L,Ed.createElement(K$,null)):null,be=`${J}-btn`,ye=Y(be,{[`${be}-${H}`]:H}),Re,Fe=u||{},$e=Fe.type&&Fe.type.__ANT_BUTTON===!0;if($e||Fe.type==="button"){let Xe=Fe.props;Re=Fr(Fe,{disabled:W||Xe.disabled||!$e&&h,onMouseDown:ot=>{Xe.onMouseDown?.(ot),ke(ot)},onClick:ot=>{Fe?.props?.onClick?.(ot),De(ot)},key:"enterButton",...$e?{className:Y(ye,Xe.className),loading:h||Xe.loading,size:le}:{}})}else Re=Ed.createElement(Sb,{classNames:O.button,styles:z.button,className:ye,color:u?"primary":"default",size:le,disabled:v,key:"enterButton",onMouseDown:ke,onClick:De,loading:h,icon:de,variant:H==="borderless"||H==="filled"||H==="underlined"?"text":u?"solid":void 0},u);p&&(Re=[Re,Fr(p,{key:"addonAfter"})]);let Ie=Y(J,ie,{[`${J}-rtl`]:B==="rtl",[`${J}-${le}`]:!!le,[`${J}-with-button`]:!!u},a,I,ee,O.root),He=Xe=>{K.current=!0,x?.(Xe)},Oe=Xe=>{K.current=!1,y?.(Xe)},Me=Ya(C,{data:!0}),Te=Vt({...C,classNames:Vt(O,["button","root"]),styles:Vt(z,["button","root"]),prefixCls:te,type:"search",size:le,variant:V,onPressEnter:we,onCompositionStart:He,onCompositionEnd:Oe,onChange:se,disabled:v},Object.keys(Me));return Ed.createElement(xb,{className:Ie,style:z.root,...Me,hidden:$},Ed.createElement(Jh,{ref:pn(he,t),...Te}),Re)}),cve=uve,D0=Jh;D0.Group=Kge;D0.Search=cve;D0.TextArea=Db;D0.Password=ove;D0.OTP=rve;var Q$=D0;var dve=A(_(),1),u6=A(xe(),1);function Lu({className:e,size:t="md",inputSize:r=t,variant:n="outline",inputProps:a,startSlot:o,endSlot:l,clearable:u,clearLabel:d="\u6E05\u9664\u8F93\u5165",onClear:p,ref:h,...v}){let g=dve.useCallback(x=>{let y=x?.input??null;if(typeof h=="function")return h(y);h&&(h.current=y)},[h]),b=a?.["aria-invalid"]??v["aria-invalid"];return(0,u6.jsx)(Bt,{children:(0,u6.jsx)(Q$,{...v,...a,status:b===!0||b==="true"?"error":void 0,variant:n==="outline"?"outlined":"filled",ref:g,prefix:o,suffix:l,allowClear:u?{clearIcon:(0,u6.jsx)("span",{"aria-label":d,children:(0,u6.jsx)(Be,{name:"close",size:14})})}:!1,onClear:p,size:r==="sm"?"small":r==="lg"?"large":"middle",className:et("wand-ui-input",e)})})}var Y$=A(_(),1),kd=A(_(),1);function J$(e,t){return e?Array.from(e.querySelectorAll(t)).find(r=>!r.matches(":disabled, [aria-disabled='true']")&&r.getClientRects().length>0)??null:null}function pve(e,t){let r=e.ownerDocument,n=r.defaultView?.MutationObserver;if(!n)return()=>{};let a=!0,o=new n(()=>{if(!a)return;let u=J$(e,"[data-wand-autofocus]");if(!u)return;let d=r.activeElement===(t??e);l(),d&&u.focus()});function l(){a&&(a=!1,o.disconnect(),r.removeEventListener("pointerdown",l,!0),r.removeEventListener("keydown",l,!0))}return r.addEventListener("pointerdown",l,!0),r.addEventListener("keydown",l,!0),o.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-wand-autofocus","disabled","aria-disabled","hidden","style","class"]}),l}function fve(e,t,r,n,a,o){if(!e&&t.reason==="outside-press"&&(!r||a-n<500)){t.cancel();return}if(!e&&!r&&t.reason==="escape-key"){t.cancel();return}o(e)}var ri=A(xe(),1),mve={info:"info",warning:"warning",danger:"warning",success:"check",question:"question"};function El({open:e,title:t,description:r,children:n,width:a=520,styles:o,zIndex:l,className:u="wand-ui-dialog-content",overlayClassName:d="wand-ui-dialog-overlay",titleClassName:p="wand-ui-dialog-title",descriptionClassName:h="wand-ui-dialog-description",headerClassName:v="wand-ui-dialog-heading",closeLabel:g="\u5173\u95ED",closeContent:b=(0,ri.jsx)(Be,{name:"close",size:18}),testId:x,showClose:y=!0,dismissable:E=!0,onOpenChange:F,onEscape:S,dismissalPriority:D="normal",focusTriggerAfterClose:$,onAfterClose:C}){let B=Kn(),M=Y$.useId(),I=(0,kd.useRef)(null),j=(0,kd.useRef)(0),N=(0,kd.useRef)(null);$n(e,()=>{S?S():E&&F(!1)},D),(0,kd.useEffect)(()=>(e&&(j.current=performance.now()),()=>{N.current?.(),N.current=null}),[e]);let R=()=>{N.current?.();let W=I.current,U=J$(W,"[data-wand-autofocus]"),P=J$(W,"input, textarea, select, button, [tabindex='0']");(U??P)?.focus({preventScroll:!0}),W&&!U&&(N.current=pve(W,P))},[L,q]=Y$.useState(null);return Y$.useEffect(()=>{if(!e||L)return;let W=!0;return globalThis.__wandImportBrowserModule("0f5fdbfe56fd9050").then(U=>{W&&q(()=>U.WandDialogModal)}),()=>{W=!1}},[e,L]),L?(0,ri.jsx)(Bt,{children:(0,ri.jsx)(L,{open:e,centered:!0,footer:null,destroyOnHidden:!0,getContainer:B??void 0,"aria-describedby":r?M:void 0,keyboard:!1,closable:!1,mask:{closable:E},width:a,styles:o,zIndex:l,focusable:{focusTriggerAfterClose:$??!C},afterClose:C,classNames:{container:`wand-ui-dialog-content ${u}`,mask:d},onCancel:W=>{let U=W.type==="keydown"?"escape-key":"outside-press";fve(!1,{reason:U,cancel(){}},E,j.current,performance.now(),F)},afterOpenChange:W=>{W&&R()},modalRender:W=>(0,ri.jsx)("div",{ref:I,"data-testid":x,"data-wand-dialog-surface":"","data-slot":"dialog-popup",children:W}),title:(0,ri.jsxs)(rt,{className:v,align:"flex-start",justify:"space-between",gap:"small",children:[(0,ri.jsxs)(rt,{vertical:!0,style:{flex:1,minWidth:0,overflowWrap:"anywhere"},children:[(0,ri.jsx)(Gt.Text,{className:p,style:{fontSize:"inherit",fontWeight:"inherit"},children:t}),r&&(0,ri.jsx)(Gt.Paragraph,{id:M,className:h,style:{margin:0,whiteSpace:"pre-wrap",fontWeight:"normal"},children:r})]}),y&&(0,ri.jsx)(_e,{kind:"ghost",style:{flexShrink:0},"aria-label":g,disabled:!E,onClick:()=>F(!1),children:b})]}),children:n})}):(0,ri.jsx)(Bt,{children:null})}function Cf({open:e,title:t,description:r,tone:n="info",icon:a,actions:o,input:l,dismissable:u=!0,focusTriggerAfterClose:d,onAction:p,onDismiss:h}){let v=(0,kd.useRef)(null),g=(0,kd.useRef)(!1),[b,x]=(0,kd.useState)(l?.value??"");(0,kd.useEffect)(()=>{if(!e||!l)return;let S=requestAnimationFrame(()=>{v.current?.focus(),v.current?.select()});return()=>cancelAnimationFrame(S)},[e,!!l]);let y=o.find(S=>S.kind==="primary"||S.kind==="danger")??o.at(-1),E=S=>{S.key!=="Enter"||!y||g.current||S.nativeEvent.isComposing||S.nativeEvent.keyCode===229||(S.preventDefault(),p(y.value,b))},F=a==null||["","i","!","\u2713","?"].includes(String(a))?(0,ri.jsx)(Be,{name:mve[n],size:18}):a;return(0,ri.jsxs)(El,{open:e,title:t,description:r,dismissable:u,showClose:!1,focusTriggerAfterClose:d,onOpenChange:S=>{S||h()},children:[(0,ri.jsx)("div",{"aria-hidden":"true",className:"wand-ui-dialog-icon",children:F}),l&&(0,ri.jsx)(Lu,{ref:v,"data-wand-autofocus":"true","aria-label":l.label??t,autoComplete:"off",spellCheck:!1,placeholder:l.placeholder,value:b,onChange:S=>x(S.currentTarget.value),onCompositionStart:()=>{g.current=!0},onCompositionEnd:()=>{g.current=!1},onKeyDown:E}),(0,ri.jsx)("div",{className:"wand-ui-dialog-actions",children:o.map((S,D)=>(0,ri.jsx)(_e,{kind:S.kind,"data-wand-autofocus":S.autoFocus?"true":void 0,onClick:()=>p(S.value,l?b:void 0),children:S.label},`${S.label}:${D}`))})]})}var Sf=A(_(),1),ni=A(xe(),1);function Pn(e,t,r,n){let a=null,o=null;function l(){return a?Promise.resolve(a):(o||(o=e().then(u=>(a=u,u)).catch(u=>{throw o=null,u})),o)}return function(u){let d=Sf.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getSnapshot),p=r(d,u),h=n.dismissable?.(u)!==!1,[v,g]=Sf.useState(()=>a),[b,x]=Sf.useState(""),[y,E]=Sf.useState(0),F=Sf.useRef(!1);if(p&&(F.current=!0),Sf.useEffect(()=>{if(!p||v)return;let D=!0;return l().then($=>{D&&g(()=>$)},()=>{D&&x("\u8D44\u6E90\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\uFF1B\u670D\u52A1\u66F4\u65B0\u540E\u53EF\u80FD\u9700\u8981\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u3002")}),()=>{D=!1}},[p,v,y]),Sf.useEffect(()=>{if(!p||v||!n.page||!h)return;let D=$=>{$.key!=="Escape"||$.defaultPrevented||$.isComposing||($.preventDefault(),n.close())};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[p,v,h]),v&&F.current)return(0,ni.jsx)(v,{...u});if(!p)return null;let S=(0,ni.jsx)(rt,{vertical:!0,gap:"small","aria-busy":!b,children:b?(0,ni.jsxs)(ni.Fragment,{children:[(0,ni.jsx)(ei,{type:"error",showIcon:!0,title:b}),(0,ni.jsxs)(rt,{gap:"small",children:[(0,ni.jsx)(_e,{onClick:()=>{x(""),E(D=>D+1)},children:"\u91CD\u8BD5"}),(0,ni.jsx)(_e,{onClick:()=>window.location.reload(),children:"\u91CD\u65B0\u52A0\u8F7D\u9875\u9762"})]})]}):(0,ni.jsxs)(rt,{align:"center",gap:"small",role:"status",children:[(0,ni.jsx)(Wi,{}),"\u6B63\u5728\u52A0\u8F7D",n.title,"\u2026"]})});return n.renderPending?n.renderPending(S,u,{failed:!!b}):n.inline?S:n.page?(0,ni.jsxs)(rt,{vertical:!0,gap:"middle",component:"section","aria-label":n.title,style:{position:"absolute",inset:0,zIndex:8,background:"var(--bg-primary)",padding:"var(--wand-page-inset)",overflow:"auto"},children:[(0,ni.jsxs)(rt,{align:"center",gap:"small",children:[h?(0,ni.jsx)(_e,{kind:"soft",onClick:n.close,children:"\u8FD4\u56DE"}):null,(0,ni.jsx)("h1",{children:n.title})]}),S]}):(0,ni.jsx)(El,{open:!0,title:n.title,onOpenChange:D=>{D||n.close()},children:S})}}var hve={subscribe:()=>()=>{},getSnapshot:()=>null};function A0(e,t){return Pn(()=>e().then(r=>function({enabled:n,...a}){return(0,ni.jsx)(r,{...a})}),hve,(r,n)=>n.enabled!==!1,{...t,inline:!0,close:()=>{}})}var v1=A(_(),1),gve=A(er(),1),Dn=A(xe(),1);function B0({active:e,from:t,to:r,size:n=18}){let a=Za();return(0,Dn.jsx)("span",{className:"conversation-morph-icon",style:{width:n,height:n},"aria-hidden":"true",children:[t,r].map((o,l)=>(0,Dn.jsx)("span",{"data-active":l===1===e,style:{opacity:l===1===e?1:0,transform:a?"none":l===1===e?"rotate(0) scale(1)":`rotate(${l?-18:18}deg) scale(.9)`,transition:a?"none":void 0},children:(0,Dn.jsx)(Be,{name:o,size:n})},l))})}function vve({phase:e,disabled:t,onClick:r}){let n=Za(),a={idle:"\u660E\u786E\u6279\u51C6\u672C\u8F6E\u8BA1\u5212",sending:"\u6279\u51C6\u4E2D",sent:"\u5DF2\u6279\u51C6",result:"\u6279\u51C6\u5DF2\u63A5\u53D7",failed:"\u6279\u51C6\u5931\u8D25",unknown:"\u6279\u51C6\u672A\u786E\u8BA4"};return(0,Dn.jsx)(_e,{className:"conversation-approval","aria-label":a[e],disabled:t,onClick:r,style:{minWidth:96,height:44,flexShrink:0},children:(0,Dn.jsx)("span",{"data-approval-phase":e,style:{display:"grid"},"aria-live":"polite",children:Object.entries(a).map(([o,l])=>(0,Dn.jsx)("span",{"aria-hidden":o!==e,style:{gridArea:"1 / 1",opacity:o===e?1:0,transition:n?"none":"opacity var(--motion-fast) var(--ease-in-out-smooth)"},children:l},o))})})}var Z$=["\u53D1\u9001\u6D88\u606F","\u53D1\u9001\u5E76\u5F00\u59CB\u65B0\u5DE5\u4F5C","\u53D1\u9001\u4E2D","\u5DF2\u63A5\u53D7","\u64CD\u4F5C\u5931\u8D25","\u9001\u8FBE\u672A\u786E\u8BA4","\u505C\u6B62\u672C\u8F6E","\u6D3E\u53D1\u4EFB\u52A1","\u786E\u8BA4\u7EE7\u7EED\u6B64\u4EFB\u52A1"];function bve(e){return Z$.includes(e)?Z$:[...Z$,e]}function yve({phase:e,stops:t,disabled:r,label:n,onClick:a,showLabel:o=!1,disabledReason:l,descriptionId:u}){return(0,Dn.jsxs)(Br,{kind:"primary",className:`conversation-submit conversation-composer-control${o?" conversation-submit-labelled":""}`,"aria-label":n,title:r&&l?l:n,"aria-describedby":u,disabled:r,onClick:a,children:[(0,Dn.jsxs)("span",{className:"conversation-submit-slots","data-phase":e,children:[(0,Dn.jsx)("span",{"data-slot":"idle",children:(0,Dn.jsx)(B0,{active:t,from:"up",to:"stop"})}),(0,Dn.jsx)("span",{"data-slot":"sending",children:(0,Dn.jsx)(Be,{name:"refresh"})}),(0,Dn.jsx)("span",{"data-slot":"sent",children:(0,Dn.jsx)(Be,{name:"check"})}),(0,Dn.jsx)("span",{"data-slot":"failed",children:(0,Dn.jsx)(Be,{name:"warning"})}),(0,Dn.jsx)("span",{"data-slot":"unknown",children:(0,Dn.jsx)(Be,{name:"question"})})]}),o?(0,Dn.jsx)("span",{className:"conversation-submit-labels","aria-hidden":"true",children:bve(n).map(d=>(0,Dn.jsx)("span",{className:"conversation-submit-label","data-active":d===n||void 0,children:d},d))}):null]})}function wve({open:e,owner:t,anchorRef:r,triggerRef:n,onClose:a,direction:o="down",focusKey:l,children:u}){let d=Za(),p=v1.useRef(null),h=v1.useRef(a);h.current=a;let v=f0(),g=Kn();v1.useLayoutEffect(()=>e?l0(t,v):void 0,[e,t,v]),$n(e,()=>{h.current(),n.current?.focus({preventScroll:!0})}),v1.useEffect(()=>{if(!e)return;let x=y=>{r.current?.contains(y.target)||sf(y.target,t)||h.current()};return document.addEventListener("pointerdown",x,!0),()=>{document.removeEventListener("pointerdown",x,!0)}},[e,r,n,t]),v1.useLayoutEffect(()=>{let x=r.current,y=p.current;if(!e||!x||!y)return;let E=o==="up"?x.closest(".conversation-composer")??x:x,F=()=>{let j=x.closest(".sidebar,.conversation-root")?.getBoundingClientRect(),N=E.getBoundingClientRect(),R=j?.left??0,L=j?.right??window.innerWidth,q=Math.min(o==="up"?N.width:360,L-R-24,window.innerWidth-24),W=o==="up"?N.left:Math.max(R+12,Math.min(N.right-q,L-q-12));y.style.width=`${q}px`,y.style.left=`${Math.max(12,Math.min(W,window.innerWidth-q-12))}px`,y.style.right="auto";let U=o==="up"||window.innerHeight-N.bottom<Math.min(y.scrollHeight,280)&&N.top>window.innerHeight-N.bottom;y.style.top=U?"auto":`${N.bottom+4}px`,y.style.bottom=U?`${window.innerHeight-N.top+4}px`:"auto",y.style.maxHeight=`${Math.max(80,Math.min(window.innerHeight*.66,(U?N.top:window.innerHeight-N.bottom)-16))}px`};F();let S=!1,D=!1,$=0,C=()=>{if(S||D)return D;let j=Array.from(y.querySelectorAll("input,button,[tabindex='0']")).find(N=>!N.matches(":disabled")&&!N.closest("[hidden],[inert]")&&N.getClientRects().length&&getComputedStyle(N).visibility==="visible");return j?.focus({preventScroll:!0}),D=!!j&&document.activeElement===j,D};$=requestAnimationFrame(()=>{if(C()||S)return;let j=y.getAnimations();j.length&&Promise.allSettled(j.map(N=>N.finished)).then(()=>{S||($=requestAnimationFrame(C))})});let B=()=>{S=!0,cancelAnimationFrame($)},M=new MutationObserver(()=>{S||D||(cancelAnimationFrame($),$=requestAnimationFrame(C))});M.observe(y,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["disabled","hidden","inert"]}),document.addEventListener("pointerdown",B,!0),document.addEventListener("keydown",B,!0);let I=new ResizeObserver(F);return I.observe(x),I.observe(y),E!==x&&I.observe(E),window.addEventListener("resize",F),window.addEventListener("scroll",F,!0),()=>{B(),M.disconnect(),document.removeEventListener("pointerdown",B,!0),document.removeEventListener("keydown",B,!0),I.disconnect(),window.removeEventListener("resize",F),window.removeEventListener("scroll",F,!0)}},[e,r,o,l]);let b=(0,Dn.jsx)("div",{ref:p,id:t,className:`conversation-panel conversation-panel-${o}`,"data-open":e,"data-wand-popup-owner":t,"aria-hidden":!e,inert:!e,style:{position:"fixed",transition:d?"none":void 0},children:(0,Dn.jsx)(_2,{owner:t,children:u})});return typeof document>"u"?b:(0,gve.createPortal)(b,g??document.body)}var es=A(_(),1);function b1(){return es.useSyncExternalStore(yi,hn,()=>"")}function eD(e,t,r=l=>l,n=String,a="replace",o=0){let l=es.useSyncExternalStore(yi,()=>new URLSearchParams(hn()).get(e),()=>null),u=es.useRef({fallback:t,parse:r,serialize:n});u.current={fallback:t,parse:r,serialize:n};let d=F=>{if(F===null)return u.current.fallback;try{return u.current.parse(F)}catch{return u.current.fallback}},p=es.useMemo(()=>d(l),[e,l]),[h,v]=es.useState(null),g=es.useRef(null),b=es.useRef(null),x=es.useCallback(F=>{let S=u.current.serialize(F),D=u.current.serialize(u.current.fallback);Qn({[e]:S===D?null:S},a)},[e,a]),y=es.useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=null);let F=b.current;b.current=null,F&&x(F.value),v(null)},[x]);es.useEffect(()=>{b.current&&(g.current&&(clearTimeout(g.current),g.current=null),b.current=null,v(null))},[l]),es.useEffect(()=>()=>{g.current&&clearTimeout(g.current),b.current=null},[]);let E=es.useCallback(F=>{let S=b.current?b.current.value:d(new URLSearchParams(hn()).get(e)),D=typeof F=="function"?F(S):F;if(!o){x(D);return}b.current={value:D},v({value:D}),g.current&&clearTimeout(g.current),g.current=setTimeout(y,o)},[e,x,y,o]);return[h?h.value:p,E]}var xve=JSON.stringify;function Eve(e,t){return r=>e.includes(r)?r:t}var I0=A(_()),c6=e=>{if(!e)return;let{closable:t,closeIcon:r}=e;return{closable:t,closeIcon:r}},VW={},UW=(e,t)=>{if(!e&&(e===!1||t===!1||t===null))return!1;if(!Lr(e)&&!Lr(t))return null;let r={closeIcon:typeof t!="boolean"&&Lr(t)?t:void 0};return Ct(e)&&(r={...r,...e}),r},kve=(e,t,r)=>e===!1?!1:e?Cx(r,t,e):t===!1?!1:t?Cx(r,t):r.closable?r:!1,Cve=(e,t,r)=>{let{closeIconRender:n}=t,{closeIcon:a,...o}=e,l=a,u=Ya(o,!0);return Lr(l)&&(n&&(l=n(l)),l=I0.default.isValidElement(l)?I0.default.cloneElement(l,{"aria-label":r,...l.props,...u}):I0.default.createElement("span",{"aria-label":r,...u},l)),[l,{"aria-label":r,...u}]},GW=(e,t,r=VW,n="Close")=>{let a=UW(e?.closable,e?.closeIcon),o=UW(t?.closable,t?.closeIcon),l={closeIcon:I0.default.createElement(gd,null),...r},u=kve(a,o,l),d=typeof u!="boolean"?!!u?.disabled:!1;if(u===!1)return[!1,null,d,{}];let[p,h]=Cve(u,l,n);return[!0,p,d,h]},tD=(e,t,r=VW)=>{let[n]=Lp("global",bu.global);return I0.default.useMemo(()=>GW(e,t,{closeIcon:I0.default.createElement(gd,null),...r},n.close),[e,t,r,n.close])};var Vi=A(_()),y1=A(_()),Sve=e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:a,calc:o}=e,l=o(n).sub(r).equal(),u=o(t).sub(r).equal();return{[a]:{...Mt(e),display:"inline-block",height:"auto",paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",backgroundColor:e.defaultBg,border:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${a}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${a}-close-icon`]:{marginInlineStart:u,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${a}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive},"&-disabled":{cursor:"not-allowed",[`&:not(${a}-checkable-checked)`]:{color:e.colorTextDisabled,"&:hover":{backgroundColor:"transparent"}},[`&${a}-checkable-checked`]:{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled},"&:hover, &:active":{backgroundColor:e.colorBgContainerDisabled,color:e.colorTextDisabled},[`&:not(${a}-checkable-checked):hover`]:{color:e.colorTextDisabled}},"&-group":{display:"flex",flexWrap:"wrap",gap:e.paddingXS}},"&-hidden":{display:"none"},"> svg":{display:"inline-block",verticalAlign:"middle",marginBlockEnd:"0.2em"},[`> ${e.iconCls} + span, > span + ${e.iconCls}, > svg + span, > span + svg`]:{marginInlineStart:l}},[`&${e.componentCls}-solid`]:{borderColor:"transparent",color:e.colorTextLightSolid,backgroundColor:e.colorBgSolid,[`&${a}-default`]:{color:e.solidTextColor}},[`${a}-filled`]:{borderColor:"transparent",backgroundColor:e.tagBorderlessBg},[`&${a}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",backgroundColor:e.colorBgContainerDisabled,a:{cursor:"not-allowed",pointerEvents:"none",color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}},"a&":{"&:hover, &:active":{color:e.colorTextDisabled}},[`&${a}-outlined`]:{borderColor:e.colorBorderDisabled},[`&${a}-solid, &${a}-filled`]:{color:e.colorTextDisabled,[`${a}-close-icon`]:{color:e.colorTextDisabled}},[`${a}-close-icon`]:{cursor:"not-allowed",color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}}}}},rD=e=>{let{lineWidth:t,fontSizeIcon:r,calc:n}=e,a=e.fontSizeSM;return vt(e,{tagFontSize:a,tagLineHeight:ue(n(e.lineHeightSM).mul(a).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},nD=e=>{let t=s2(new Kp(e.colorBgSolid),"#fff")?"#000":"#fff";return{defaultBg:new Ar(e.colorFillTertiary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},aD=ct("Tag",e=>{let t=rD(e);return Sve(t)},nD),Fve=y1.forwardRef((e,t)=>{let{prefixCls:r,style:n,className:a,checked:o,children:l,icon:u,onChange:d,onClick:p,onKeyDown:h,disabled:v,...g}=e,{getPrefixCls:b,tag:x}=y1.useContext(st),y=y1.useContext(Ia),E=v??y,F=M=>{E||(d?.(!o),p?.(M))},S=M=>{h?.(M),!(M.defaultPrevented||E)&&M.key===" "&&(M.preventDefault(),M.repeat||d?.(!o))},D=b("tag",r),[$,C]=aD(D),B=Y(D,`${D}-checkable`,{[`${D}-checkable-checked`]:o,[`${D}-checkable-disabled`]:E},x?.className,a,$,C);return y1.createElement("span",{...g,ref:t,role:"checkbox","aria-checked":o,"aria-disabled":E||void 0,tabIndex:E?-1:0,style:{...x?.style,...n},className:B,onClick:F,onKeyDown:S},u,y1.createElement("span",null,l))}),KW=Fve,M0=A(_()),$ve=M0.default.forwardRef((e,t)=>{let{id:r,prefixCls:n,rootClassName:a,className:o,style:l,classNames:u,styles:d,disabled:p,options:h,value:v,defaultValue:g,onChange:b,multiple:x,...y}=e,{getPrefixCls:E,direction:F,className:S,style:D,classNames:$,styles:C}=wt("tag"),B=E("tag",n),M=`${B}-checkable-group`,I=xn(B),[j,N]=aD(B,I),R=Ue(D),L=Ue(l),[q,W]=Et([$,u],[C,R,d,L],{props:e}),U=(0,M0.useMemo)(()=>Array.isArray(h)?h.map(Z=>Ct(Z)?Z:{value:Z,label:Z}):[],[h]),[P,H]=qt(g,v),V=(Z,O)=>{let z=null;if(x){let K=P||[];z=Z?[].concat(en(K),[O.value]):K.filter(J=>J!==O.value)}else z=Z?O.value:null;H(z),b?.(z)},Q=M0.default.useRef(null);(0,M0.useImperativeHandle)(t,()=>({nativeElement:Q.current}));let X=Ya(y,{aria:!0,data:!0});return M0.default.createElement("div",{...X,className:Y(M,S,a,{[`${M}-disabled`]:p,[`${M}-rtl`]:F==="rtl"},j,N,o,q.root),style:W.root,id:r,ref:Q},U.map(Z=>M0.default.createElement(KW,{key:Z.value,className:Y(`${M}-item`,q.item,Z.className),style:{...W.item,...Z.style},checked:x?(P||[]).includes(Z.value):P===Z.value,onChange:O=>V(O,Z),disabled:p},Z.label)))}),Dve=$ve,Ave=A(_());function Bve(e,t){let{color:r,variant:n,bordered:a}=e;return Ave.useMemo(()=>{let o=r?.endsWith("-inverse"),l;n?l=n:o?l="solid":a===!1?l="filled":l=t||"filled";let u=o?r?.replace("-inverse",""):r;u===void 0&&l==="solid"&&(u="default");let d=ef(u),p=w7(u),h={};if(!d&&!p&&u)if(l==="solid")h.backgroundColor=r;else{let v=new Ar(u).toHsl();v.l=.95,h.backgroundColor=new Ar(v).toHexString(),h.color=r,l==="outlined"&&(h.borderColor=r)}return[l,u,d,p,h]},[r,n,a,t])}var Ive=e=>nd(e,(t,{textColor:r,lightBorderColor:n,lightColor:a,darkColor:o})=>({[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:a,borderColor:n,color:r},[`&${e.componentCls}-solid`]:{backgroundColor:o,borderColor:o,color:e.colorTextLightSolid},[`&${e.componentCls}-filled`]:{backgroundColor:a,color:r}}})),Mve=_h(["Tag","preset"],e=>{let t=rD(e);return Ive(t)},nD);function Tve(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}var d6=(e,t,r)=>{let n=Tve(r);return{[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:e[`color${n}Bg`],borderColor:e[`color${n}Border`],color:e[`color${r}`]},[`&${e.componentCls}-solid`]:{backgroundColor:e[`color${r}`],borderColor:e[`color${r}`]},[`&${e.componentCls}-filled`]:{backgroundColor:e[`color${n}Bg`],color:e[`color${r}`]}}}},_ve=_h(["Tag","status"],e=>{let t=rD(e);return[d6(t,"success","Success"),d6(t,"processing","Info"),d6(t,"error","Error"),d6(t,"warning","Warning")]},nD),jve=Vi.forwardRef((e,t)=>{let{prefixCls:r,className:n,rootClassName:a,style:o,children:l,icon:u,color:d,variant:p,onClose:h,bordered:v,disabled:g,href:b,target:x,styles:y,classNames:E,...F}=e,{getPrefixCls:S,direction:D,className:$,variant:C,style:B,classNames:M,styles:I}=wt("tag"),[j,N,R,L,q]=Bve(e,C),W=R||L,U=Vi.useContext(Ia),P=g??U,{tag:H}=Vi.useContext(st),[V,Q]=Vi.useState(!0),X=Vt(F,["closeIcon","closable"]),Z={...e,color:N,variant:j,disabled:P},O=Ue(B),z=Ue(o),[K,J]=Et([M,E],[I,O,y,z],{props:Z}),te=Vi.useMemo(()=>{let ye=J.root;return P||(ye={...q,...ye}),ye},[J.root,q,P]),ee=S("tag",r),[ie,me]=aD(ee),le=Y(ee,$,K.root,`${ee}-${j}`,{[`${ee}-${N}`]:W,[`${ee}-hidden`]:!V,[`${ee}-rtl`]:D==="rtl",[`${ee}-disabled`]:P},n,a,ie,me),he=ye=>{P||(ye.stopPropagation(),h?.(ye),!ye.defaultPrevented&&(b&&ye.preventDefault(),Q(!1)))},se=ye=>{(ye.key==="Enter"||ye.key===" ")&&(ye.preventDefault(),ye.repeat||ye.currentTarget.click())},[,ke]=tD(c6(e),c6(H),{closable:!1,closeIconRender:ye=>{let Re=Vi.createElement("span",{role:"button",tabIndex:P?-1:0,"aria-disabled":P||void 0,className:Y(`${ee}-close-icon`,K.close),onClick:he,onKeyDown:se,style:J.close},ye);return Wx(ye,Re,Fe=>({onClick:$e=>{Fe?.onClick?.($e),he($e)},onKeyDown:$e=>{Fe?.onKeyDown?.($e),$e.defaultPrevented||se($e)},role:"button",tabIndex:P?-1:0,"aria-disabled":P||void 0,className:Y(Fe?.className,`${ee}-close-icon`,K.close),style:{...J.close,...Fe?.style}}))}}),De=pr(F.onClick)||l&&l.type==="a",we=Fr(u,{className:Y(Vi.isValidElement(u)?u.props?.className:void 0,K.icon),style:J.icon}),de=we?Vi.createElement(Vi.Fragment,null,we,Lt(l)&&Vi.createElement("span",{className:K.content,style:J.content},l)):l,be=Vi.createElement(b?"a":"span",{...X,ref:t,className:le,style:te,href:P?void 0:b,target:x,onClick:P?void 0:X.onClick,...b&&P?{"aria-disabled":!0}:{}},de,ke,R&&Vi.createElement(Mve,{key:"preset",prefixCls:ee}),L&&Vi.createElement(_ve,{key:"status",prefixCls:ee}));return De?Vi.createElement(od,{component:"Tag"},be):be}),iD=jve;iD.CheckableTag=KW;iD.CheckableTagGroup=Dve;var Cd=iD;var Kr=A(_(),1),Is=A(xe(),1),sD=Kr.createContext(null);function Sd({children:e,contextTrigger:t,triggers:r=["click"],open:n,defaultOpen:a=!1,onOpenChange:o,closeOnSelect:l=!0}){let u=Kn(),d=Kr.useRef(null),p=Kr.useRef(null),h=Kr.useRef(null),v=Kr.useCallback(z=>{let K=p.current;if(p.current=z,z||!K)return;let J=h.current;h.current=null;let te=document.activeElement;J?.isConnected&&(te===document.body||te&&K.contains(te))&&J.focus({preventScroll:!0})},[]),[g,b]=Kr.useState(a),[x,y]=Kr.useState(()=>new Map),E=Kr.useCallback((z,K,J)=>(y(te=>new Map(te).set(z,{item:K,marker:J})),()=>y(te=>{let ee=new Map(te);return ee.delete(z),ee})),[]),F=n??g,S=z=>{z&&(h.current=null),b(z),o?.(z)},[D,$]=Kr.useState(null),C=Kr.useRef(null),B=Kr.useCallback(()=>D?Promise.resolve():(C.current||(C.current=globalThis.__wandImportBrowserModule("a16a3779a5201ce1").then(z=>{$(()=>z.DropdownSurface)})),C.current),[D]);Kr.useEffect(()=>{F&&B()},[F,B]);let M=Kr.Children.toArray(e).filter(Kr.isValidElement),I=M.find(z=>z.type===Hu),j=M.find(z=>z.type===qu);if($n(F,()=>{S(!1),d.current?.focus({preventScroll:!0})}),!I&&!t||!j)return null;let{align:N="start",side:R="bottom",sideOffset:L=6,container:q,collisionPadding:W=12,popupOwner:U,className:P,children:H,...V}=j.props,Q={items:[...x.values()].sort((z,K)=>{if(!z.marker||!K.marker)return 0;let J=z.marker.compareDocumentPosition(K.marker);return J&Node.DOCUMENT_POSITION_FOLLOWING?-1:J&Node.DOCUMENT_POSITION_PRECEDING?1:0}).map(z=>z.item),selectable:!1,onClick:()=>{l&&(h.current=d.current,S(!1))}},X=t??Kr.cloneElement(I,{"aria-haspopup":"menu","aria-expanded":F,"aria-controls":V.id}),Z=(t??I)?.props,O=Kr.cloneElement(t??I,{"aria-haspopup":"menu","aria-expanded":F,"aria-controls":V.id,onClick:z=>{Z?.onClick?.(z),r.includes("click")&&S(!0)},onMouseEnter:z=>{Z?.onMouseEnter?.(z),r.includes("hover")&&S(!0)},onContextMenu:z=>{Z?.onContextMenu?.(z),r.includes("contextMenu")&&S(!0)}});return(0,Is.jsxs)(Bt,{children:[(0,Is.jsx)(sD.Provider,{value:E,children:H}),D?(0,Is.jsx)(D,{trigger:X,triggerRef:d,open:F,onOpenChange:(z,K)=>{K.source==="menu"&&!l||S(z)},triggers:r,getPopupContainer:()=>q??u??document.body,placement:ud(R,N),destroyOnHidden:!0,autoFocus:!0,align:{offset:cd(R,L),overflow:{adjustX:!0,adjustY:!0,shiftX:W,shiftY:W}},classNames:{root:et("wand-ui-dropdown-content",P)},menu:Q,popupRender:z=>(0,Is.jsx)("div",{...V,ref:v,"data-wand-popup-owner":U??V.id,children:z})}):O]})}function Hu({render:e,className:t,...r}){return e?Kr.cloneElement(e,{...r,className:et("wand-ui-dropdown-trigger",e.props.className,t)}):(0,Is.jsx)(_e,{...r,type:r.type??"button",className:et("wand-ui-dropdown-trigger",t)})}function qu(e){return null}function nn({className:e,icon:t,iconSlot:r="start",hint:n,tone:a,children:o,onSelect:l,onClick:u,...d}){let p=Kr.useContext(sD),h=Kr.useId(),v=Kr.useRef(null),{type:g,...b}=d,x=Kr.useRef({onSelect:l,onClick:u});x.current={onSelect:l,onClick:u};let y=Kr.useMemo(()=>({...b,key:h,danger:a==="danger",className:et("wand-ui-dropdown-item",e),icon:t?(0,Is.jsx)(Be,{name:t,slot:r,size:15}):void 0,label:(0,Is.jsxs)(Is.Fragment,{children:[o,n!=null?(0,Is.jsx)("span",{className:"wand-ui-dropdown-item-hint",children:n}):null]}),onClick:({domEvent:E})=>{x.current.onClick?.(E),x.current.onSelect?.()}}),[h,d.id,d.disabled,d.title,e,a,t,r,n,o]);return Kr.useLayoutEffect(()=>p?.(h,y,v.current),[p,h,y]),(0,Is.jsx)("span",{hidden:!0,ref:v})}function Ms({className:e}){let t=Kr.useContext(sD),r=Kr.useId(),n=Kr.useRef(null);return Kr.useLayoutEffect(()=>t?.(r,{key:r,type:"divider",className:e},n.current),[t,r,e]),(0,Is.jsx)("span",{hidden:!0,ref:n})}var XW=A(_(),1),w1=A(xe(),1),QW=XW.createContext(null);function lD({className:e,active:t=null,orientation:r="vertical",variant:n,size:a,children:o,...l}){return(0,w1.jsx)(QW.Provider,{value:t,children:(0,w1.jsx)("nav",{...l,className:et("wand-ui-navigation",e),"data-orientation":r,children:o})})}function uD({className:e,...t}){return(0,w1.jsx)("ul",{...t,className:et("wand-ui-navigation-list",e)})}function cD({className:e,...t}){return(0,w1.jsx)("li",{...t,className:et("wand-ui-navigation-item",e)})}function dD({className:e,render:t,active:r,value:n,orientation:a,size:o="md",variant:l,indicator:u,children:d,...p}){let h=XW.useContext(QW),v=r??(n!=null&&n===h);return(0,w1.jsxs)(_e,{...t?.props,...p,className:et("wand-ui-navigation-link",t?.props.className,e),kind:v?"soft":"ghost","data-active":v?"":void 0,"aria-current":v?"page":void 0,size:o==="sm"?"small":o==="lg"?"large":"medium",children:[d??t?.props.children,u]})}var oD=A(_(),1),p6=A(xe(),1);function Wu({className:e,size:t="md",variant:r="soft",dismissible:n=!1,open:a,onOpenChange:o,onDismiss:l,closeLabel:u="Dismiss",onClick:d,children:p,...h}){let[v,g]=oD.useState(!0),b=a??v,x=oD.useRef(b);oD.useEffect(()=>{x.current&&!b&&l?.(),x.current=b},[b,l]);let y=h.kind??(r==="destructive"?"danger":r);if(!n)return(0,p6.jsx)(_e,{...h,onClick:d,kind:y,size:t==="sm"?"small":t==="lg"?"large":"medium",className:et("wand-ui-chip",e),children:p});if(!b)return null;let E=()=>{g(!1),o?.(!1)};return(0,p6.jsx)(Bt,{children:(0,p6.jsx)(Cd,{className:et("wand-ui-chip",e),closeIcon:(0,p6.jsx)("span",{"aria-label":u,children:"\xD7"}),closable:!h.disabled,color:y==="primary"?"var(--accent-solid)":y==="danger"?"error":void 0,onClick:F=>{d?.(F),h.disabled||E()},onClose:E,children:p})})}var YW=A(xe(),1);function x1({open:e,size:t=18}){return(0,YW.jsx)("span",{className:"sidebar-toggle-morph","data-open":e?"true":"false","aria-hidden":"true",children:(0,YW.jsx)(B0,{active:e,from:"rail",to:"close",size:t})})}var JW=A(_(),1),f6=A(xe(),1);function pD({label:e="\u590D\u5236\u5F53\u524D\u9875\u9762\u94FE\u63A5",menuItem:t=!1}){let r=b1(),[n,a]=JW.useState("idle");JW.useEffect(()=>a("idle"),[r]);let o=()=>{a("pending"),Promise.resolve().then(()=>navigator.clipboard.writeText(_$(window.location.href))).then(()=>a("done"),()=>a("failed"))},l=n==="pending"?"\u6B63\u5728\u590D\u5236\u2026":n==="done"?"\u94FE\u63A5\u5DF2\u590D\u5236":n==="failed"?"\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5":e;return t?(0,f6.jsx)(nn,{icon:"copy","aria-label":e,disabled:n==="pending",onSelect:o,children:l}):(0,f6.jsxs)(_e,{kind:"ghost",size:"small","aria-label":e,title:e,disabled:n==="pending",style:{minWidth:144},onClick:o,children:[(0,f6.jsx)(Be,{name:"copy",slot:"start"}),(0,f6.jsx)("span",{"aria-live":"polite",children:l})]})}function fD(){let e=null,t=!1;return{open(r){e=r,t=!1},clear(){e=null,t=!1},loaded(r){e===r&&(t=!0)},isOpen(r){return e===r},isLoaded(r){return e===r&&t}}}function m6(e,t){return t.completionRevision===void 0&&t.viewedCompletionRevision===void 0?{}:{completionRevision:Math.max(e?.completionRevision??0,t.completionRevision??0),viewedCompletionRevision:Math.max(e?.viewedCompletionRevision??0,t.viewedCompletionRevision??0)}}function Gi(e){return(e.completionRevision??0)>(e.viewedCompletionRevision??0)&&!e.archived&&!e.ptyBusy&&!e.ptyCommandRunning&&!e.inFlight&&!e.structuredState?.inFlight&&!e.permissionBlocked&&!e.pendingEscalation&&!(typeof e.providerCliExitCode=="number"&&e.providerCliExitCode!==0)&&["idle","running","exited"].includes(e.status??"")}function h6(e,t){if(e.type==="pane")return t(e);let[r,n]=e.children;return{...e,children:[h6(r,t),h6(n,t)]}}function Nve(e,t,r){return tU(e,t,0,r)}function tU(e,t,r,n){if(e.type==="pane")return e;if(r>=t.length)return{...e,ratio:n};let a=t[r]??0,[o,l]=e.children,u=tU(a===0?o:l,t,r+1,n);return{...e,children:a===0?[u,l]:[o,u]}}function Pve(e){let t=Math.max(0,e.tabs.length-1),r=e.tabs.length===0?0:Math.min(Math.max(0,e.active),t);return r===e.active?e:{type:"pane",active:r,tabs:e.tabs}}function rU(e){if(e.type==="pane")return e;let[t,r]=e.children.map(rU),n=t.type==="pane"&&t.tabs.length===0,a=r.type==="pane"&&r.tabs.length===0;return n&&a?t:n?r:a?t:{...e,children:[t,r]}}function gD(e,t){let r=h6(e,n=>n.tabs.findIndex(a=>a.id===t)<0?n:{type:"pane",active:n.active,tabs:n.tabs.filter(a=>a.id!==t)});return rU(h6(r,n=>Pve(n)))}function kl(e,t){return e.type==="pane"?e.tabs.find(r=>r.id===t):kl(e.children[0],t)??kl(e.children[1],t)}function Rve(e){return{id:`tab-${e}`,kind:"session",sessionId:e}}function T0(e){return{type:"pane",tabs:[e],active:0}}function ts(e){return e.type==="pane"?e.tabs:[...ts(e.children[0]),...ts(e.children[1])]}function Co(e){return ts(e).filter(t=>t.kind==="session").map(t=>t.sessionId)}function Ki(e,t){if(t){let r=kl(e,t);if(r)return r}return e.type==="pane"?e.tabs[e.active]??e.tabs[0]:Ki(e.children[0])??Ki(e.children[1])}function $f(e){return!e||e.windows.length===0?null:e.windows.find(t=>t.id===e.activeWindowId)??e.windows[0]??null}function Ts(e){let t=$f(e);return t?Ki(t.layout,t.activeTabId):void 0}function ZW(e){return!!(e&&e.type==="windows"&&Array.isArray(e.windows))}function E1(e,t){let r=e||"window",n=2;for(;t.has(r);)r=`${e||"window"}-${n++}`;return t.add(r),r}function g6(e){return e.kind==="session"?`window-${e.sessionId}`:`window-${e.id}`}function mD(e,t,r){if(e.type==="pane"){let d=e.tabs.filter(v=>r.has(v.id)||v.kind==="session"&&!t.has(v.sessionId)?!1:(r.add(v.id),!0));if(d.length===0)return{node:{type:"pane",tabs:[],active:0},extras:[]};let p=e.tabs[e.active],h=p&&d.some(v=>v.id===p.id)?p:d[0];return{node:T0(h),extras:d.filter(v=>v.id!==h.id)}}let n=mD(e.children[0],t,r),a=mD(e.children[1],t,r),o=ts(n.node).length===0,l=ts(a.node).length===0,u=[...n.extras,...a.extras];return o&&l?{node:n.node,extras:u}:o?{node:a.node,extras:u}:l?{node:n.node,extras:u}:{node:{...e,children:[n.node,a.node]},extras:u}}function Uu(e,t,r){let n=new Set(t),a=ZW(e)?e.windows:e?[{id:"window-legacy",layout:e}]:[],o=new Set,l=new Set,u=[];for(let h of a){let v=mD(h.layout,n,o);if(ts(v.node).length>0){let g=E1(h.id,l),b=Ki(v.node,h.activeTabId);u.push({id:g,layout:v.node,activeTabId:b?.id})}for(let g of v.extras){let b=E1(g6(g),l);u.push({id:b,layout:T0(g),activeTabId:g.id})}}for(let h of t){let v=Rve(h);if(o.has(v.id))continue;o.add(v.id);let g=E1(g6(v),l);u.push({id:g,layout:T0(v),activeTabId:v.id})}let d=ZW(e)?e.activeWindowId:null,p=(r?u.find(h=>Co(h.layout).includes(r)):void 0)?.id??u.find(h=>h.id===d)?.id??u[0]?.id??null;return{type:"windows",windows:u,activeWindowId:p}}function v6(e,t){return!e.windows.some(r=>r.id===t)||e.activeWindowId===t?e:{...e,activeWindowId:t}}function Ove(e,t,r){let n=e.activeWindowId!==t,a=e.windows.map(o=>o.id!==t||!kl(o.layout,r)||o.activeTabId===r?o:(n=!0,{...o,activeTabId:r}));return n?{...e,activeWindowId:t,windows:a}:e}function zve(e,t,r,n){let a=e.windows.map(o=>o.id===t?{...o,layout:r,activeTabId:Ki(r,n??o.activeTabId)?.id}:o);return{...e,windows:a}}function nU(e,t){for(let r of e.windows){let n=ts(r.layout).find(a=>a.kind==="session"&&a.sessionId===t);if(n)return n}}function hD(e,t,r,n){return e.type==="pane"?e.tabs.some(a=>a.id===t)?{type:"split",dir:n,ratio:.5,children:[e,T0(r)]}:e:kl(e.children[0],t)?{...e,children:[hD(e.children[0],t,r,n),e.children[1]]}:kl(e.children[1],t)?{...e,children:[e.children[0],hD(e.children[1],t,r,n)]}:e}function vD(e,t,r,n,a){let o=nU(e,t),l=e.windows.find(g=>g.id===r),u=l&&Ki(l.layout,n??l.activeTabId);if(!o||!u||o.id===u.id)return e;let d=e.windows.map(g=>kl(g.layout,o.id)?{...g,layout:gD(g.layout,o.id)}:g).filter(g=>ts(g.layout).length>0),p=d.findIndex(g=>g.id===r);if(p<0)return e;let h=d[p],v={...h,layout:hD(h.layout,u.id,o,a),activeTabId:o.id};return d=d.map((g,b)=>b===p?v:g),{...e,windows:d,activeWindowId:r}}function Lve(e,t){let r=e.windows.findIndex(p=>Co(p.layout).includes(t));if(r<0)return e;let n=e.windows[r],a=nU(e,t);if(!a)return e;if(ts(n.layout).length<=1)return v6(e,n.id);let o=gD(n.layout,a.id),l=new Set(e.windows.map(p=>p.id)),u={id:E1(g6(a),l),layout:T0(a),activeTabId:a.id},d=[...e.windows];return d.splice(r,1,{...n,layout:o,activeTabId:Ki(o)?.id},u),{...e,windows:d,activeWindowId:u.id}}function Hve(e,t,r,n){return n.length===0?null:e.activeWindowId!==r?n.some(a=>a.id===e.activeWindowId)?e.activeWindowId:n[0].id:n[Math.max(0,t-1)]?.id??n[0].id}function b6(e,t){let r=e.windows.findIndex(a=>a.id===t);if(r<0)return e;let n=e.windows.filter(a=>a.id!==t);return{...e,windows:n,activeWindowId:Hve(e,r,t,n)}}function bD(e,t){let r=e.windows.findIndex(u=>Co(u.layout).includes(t));if(r<0)return e;let n=e.windows[r],a=ts(n.layout).find(u=>u.kind==="session"&&u.sessionId===t);if(!a)return e;let o=gD(n.layout,a.id);if(ts(o).length===0)return b6(e,n.id);let l=e.windows.map((u,d)=>d===r?{...n,layout:o,activeTabId:Ki(o,n.activeTabId)?.id}:u);return{...e,windows:l}}function qve(e,t){let r=e.windows.findIndex(h=>h.id===t);if(r<0)return e;let n=e.windows[r],a=ts(n.layout);if(a.length<=1)return e;let o=new Set(e.windows.filter(h=>h.id!==t).map(h=>h.id)),l=a.map(h=>({id:E1(g6(h),o),layout:T0(h),activeTabId:h.id})),u=Ki(n.layout,n.activeTabId)??a[0],d=l[a.findIndex(h=>h.id===u.id)]??l[0],p=[...e.windows];return p.splice(r,1,...l),{...e,windows:p,activeWindowId:d?.id??null}}function Wve(e){let t=[],r=[];for(let n of e)n.teamStep&&(n.teamStep.runFinished&&!Gi(n)?r:t).push(n);return{live:t,history:r}}function Uve(e){return e.filter(t=>!t.teamStep)}var eU=26;function Vve(e){let t=(e.title||"").replace(/\s+/g," ").trim();return t?Array.from(t).length<=eU?t:`${Array.from(t).slice(0,eU-1).join("")}\u2026`:e.kind==="leader"?"\u8D1F\u8D23\u4EBA\u56DE\u5408":e.memberName||"\u56E2\u961F\u4F1A\u8BDD"}function Gve(e){return e.teamChat?.chatTitle?.trim()||e.title?.trim()||"\u4EFB\u52A1\u5904\u7406\u7FA4"}function aU(e){switch(e){case"claude":return"Claude";case"codex":return"Codex";case"opencode":return"OpenCode";case"grok":return"Grok";case"qoder":return"Qoder";case"pi":return"Pi";default:return"\u7EC8\u7AEF"}}function Cl(e){return e.provider==="claude"||e.provider==="codex"||e.provider==="opencode"||e.provider==="grok"||e.provider==="qoder"||e.provider==="pi"?e.provider:Mu(e.command)??void 0}function iU(e){let t=e.trim().toLowerCase();return!t||t==="\u4F1A\u8BDD"||t==="wand \u4F1A\u8BDD"||t==="claude"||t==="codex"||t==="opencode"||t==="grok"||t==="qoder"||t==="pi"||t==="\u7EC8\u7AEF"||/^(claude|codex|opencode|grok|qoder|pi|终端)\s+\d+$/i.test(t)}function oU(e){let t=(e.title||"").trim().toLowerCase(),r=(e.cwd||"").replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(Boolean).at(-1)?.toLowerCase()??"";return!!r&&t===r}function Df(e){return e.map((t,r)=>({session:t,index:r,startedAt:Date.parse(t.startedAt||"")})).sort((t,r)=>{let n=Number.isFinite(t.startedAt),a=Number.isFinite(r.startedAt);return n&&a&&t.startedAt!==r.startedAt?t.startedAt-r.startedAt:n!==a?n?-1:1:t.index-r.index}).map(({session:t})=>t)}function Af(e,t){let r=(e.title||"").trim();return!iU(r)&&!oU(e)?r:`${aU(Cl(e))} ${t+1}`}function k1(e,t,r){return e.teamStep?Vve(e.teamStep):e.teamChat?Gve(e):Af(C1(e,r),t)}function C1(e,t){let r=(t||"").trim();return iU(r)||oU({...e,title:r})?e:{...e,title:r}}var Ff=A(xe(),1);function _0({session:e,className:t,size:r}){let n=Cl(e);return n?r===void 0?(0,Ff.jsx)(Xo,{provider:n,className:t}):(0,Ff.jsx)("span",{className:t?`sidebar-provider-mark ${t}`:"sidebar-provider-mark","data-mark-size":r,title:n,style:{display:"inline-flex",width:r,height:r,fontSize:r,lineHeight:0},children:(0,Ff.jsx)(Xo,{provider:n})}):(0,Ff.jsx)(Be,{name:"terminal",size:r??13,className:t})}function Kve({teamChat:e}){let t=Array.from({length:Math.min(Math.max(e.memberCount,1),2)},(r,n)=>Zb({id:`${e.runId}#${n}`,name:e.teamName}));return(0,Ff.jsx)(Yo.Group,{className:"workspace-session-team-cats",size:18,children:t.map((r,n)=>(0,Ff.jsx)(Yo,{shape:"square",size:18,style:W2(r),icon:(0,Ff.jsx)(U2,{face:r,size:18})},n))})}var y6={workspaceId:null,workspaceName:"",taskId:null,taskName:"",cwd:"",layout:null,layoutRevision:void 0},S1=y6,w6=new Set,Xr={subscribe(e){return w6.add(e),()=>{w6.delete(e)}},getSnapshot(){return S1},getServerSnapshot(){return y6}};function Sl(e){S1={...S1,...e};for(let t of w6)t()}function yD(){if(S1!==y6){S1=y6;for(let e of w6)e()}}var Bf=null,ai={open:!1,dismissable:!0,initialCwd:"",initialEmployeeId:"",initialKind:"",workspaceId:"",workspaceTaskId:"",taskName:"",newTask:!1,revision:0},x6=new Set,sU=new Map,wD=new Map;function lU(e,t="",r="",n="",a="",o="",l="",u=!1,d){ai={open:e,dismissable:!0,initialCwd:e?t.trim():"",initialEmployeeId:e?r.trim():"",initialKind:e?n:"",workspaceId:e?a.trim():"",workspaceTaskId:e?o.trim():"",taskName:e?l.trim():"",newTask:e&&u,taskDraft:e?d:void 0,revision:ai.revision+1};for(let p of x6)p()}function Xve(e){if(!(!ai.open||ai.dismissable===e)){ai={...ai,dismissable:e};for(let t of x6)t()}}var ua={open(e={}){return!Bf||ai.open&&!ai.dismissable?!1:(Bf.onOpen(),lU(!0,e.initialCwd,e.initialEmployeeId,e.initialKind??"",e.workspaceId,e.workspaceTaskId,e.taskName,e.newTask,e.taskDraft),!0)},close(){ai.open&&(lU(!1),Bf?.onClose())},closeIfOpen(){return!ai.open||!ai.dismissable?!1:(this.close(),!0)},closeTopmost(){return ai.open?(ai.dismissable&&this.close(),!0):!1},isOpen(){return ai.open},setDismissable(e){Xve(e)},getUnknownCreation(e){return sU.get(e)},markUnknownCreation(e){sU.set(e.scope,e)},getAcceptedCreation(e){return wD.get(e)},setAcceptedCreation(e,t){t?wD.set(e,t):wD.delete(e)}},Fl={subscribe(e){return x6.add(e),()=>x6.delete(e)},getSnapshot(){return ai},getRuntime(){return Bf}};function xD(e){return Bf=e,()=>{Bf===e&&(ai.open&&ua.close(),Bf=null)}}var j0=null,Xi={open:!1,dismissable:!0,initialCwd:"",initialKind:"task",revision:0},E6=new Set;function ED(e){Xi={...Xi,...e,revision:Xi.revision+1};for(let t of E6)t()}function Qve(e){if(!(!Xi.open||Xi.dismissable===e)){Xi={...Xi,dismissable:e};for(let t of E6)t()}}var If={open(e,t="task"){return ua.open({initialCwd:e,newTask:t==="task"}),j0?.onOpen(),ED({open:!0,dismissable:!0,initialCwd:e??"",initialKind:t}),!0},close(){ua.close(),Xi.open&&(ED({open:!1}),j0?.onClose())},closeIfOpen(){return ua.closeIfOpen(),!Xi.open||!Xi.dismissable?!1:(this.close(),!0)},isOpen(){return Xi.open||ua.isOpen()},setDismissable(e){ua.setDismissable(e),Qve(e)}},va={subscribe(e){return E6.add(e),()=>E6.delete(e)},getSnapshot(){return Xi},getRuntime(){return j0},consumeOpen(){Xi.open&&ED({open:!1})}};function kD(e){return j0=e,()=>{j0===e&&(Xi.open&&If.close(),j0=null)}}var $l=A(_(),1),Yve=new Set(["claude","codex","opencode","grok","qoder","pi"]);function cU(e){return e.sessionKind==="structured"||e.runner==="claude-cli-print"}function dU(e){return!e||e.status!=="running"||cU(e)?!1:e.provider&&Yve.has(e.provider)?e.ptyBusy===!0:e.ptyCommandRunning===!0}function N0(e){if(!e||e.archived)return{active:!1,inFlight:!1,ptyRunning:!1,permissionBlocked:!1};let t=!!e.permissionBlocked,r=cU(e)&&!!e.structuredState?.inFlight,n=dU(e)&&(!e.provider||e.providerCliActive!==!1);return{active:r||n||t,inFlight:r,ptyRunning:n,permissionBlocked:t}}var uU="wand.sidebar.displayMode",k6=["full","folded","active"],Jve=new Set(["failed","waiting-input","waiting_input","permission-blocked","reconnecting"]);function Zve(e){return k6.includes(e)?e:"full"}function ebe(e){let t=k6.indexOf(e);return k6[(t+1)%k6.length]}function Qi(e){return Jve.has(String(e.status??""))}function rs(e){return e.archived?!1:e.ptyBusy===!0||e.inFlight===!0||e.status==="thinking"||dU(e)}function _s(e){return!e.archived&&!rs(e)&&!Qi(e)&&(e.executionStatus==="queued"||e.status==="queued")}function P0(e){return!e.archived&&(Qi(e)||rs(e)||_s(e)||Gi(e))}function tbe(e,t){return e.map(r=>{let n=u=>P0(u),a=new Set(r.tasks.filter(u=>u.executionStatus==="queued"||u.executionStatus==="running"||u.sessions.some(n)).map(u=>u.id));for(let u of[...a]){let d=r.tasks.find(h=>h.id===u)?.parentWorkspaceTaskId,p=new Set;for(;d&&!p.has(d);)p.add(d),a.add(d),d=r.tasks.find(h=>h.id===d)?.parentWorkspaceTaskId}let o=r.tasks.filter(u=>a.has(u.id)).map(u=>({...u,sessions:u.sessions.filter(n),archivedSessions:[]})),l=r.standaloneSessions.filter(n);return{...r,tasks:o,standaloneSessions:l,archivedSessions:[]}}).filter(r=>r.tasks.length>0||r.standaloneSessions.length>0)}function rbe(){let[e,t]=$l.useState(()=>{try{return Zve(window.localStorage.getItem(uU))}catch{return"full"}}),r=$l.useCallback(a=>{t(a);try{window.localStorage.setItem(uU,a)}catch{return}},[]),n=$l.useCallback(()=>r(ebe(e)),[e,r]);return[e,n,r]}var js=$l.createContext(null);function nbe(e,t,r){return e===t?r:{}}function CD(e,t,r,n,a,o=!0){return a?!0:e==="full"?t:r??(e==="active"?o:n)}function SD(){let[e,,t]=rbe(),[r,n]=eD("sidebarQuery","",void 0,void 0,"replace",250),[a,o]=$l.useState({}),[l,u]=$l.useState({}),d=$l.useCallback(v=>{u(g=>nbe(e,v,g)),t(v)},[e,t]),p=$l.useCallback((v,g)=>{o(b=>({...b,[v]:g}))},[]),h=$l.useCallback((v,g)=>{u(b=>({...b,[v]:g}))},[]);return $l.useMemo(()=>({mode:e,query:r,setMode:d,setQuery:n,normal:a,setNormal:p,overrides:l,setOverride:h}),[e,r,d,a,p,l,h])}var Vu=new Map,FD=new Set,abe=0,$D=()=>{for(let e of FD)e()};function DD(e){return FD.add(e),()=>{FD.delete(e)}}function AD(){return[...Vu.values()]}function ibe(e){Vu.delete(e)&&$D()}function F1(e,t={}){for(let[a,o]of Vu)o.expiresAt!==null&&o.expiresAt<=Date.now()&&Vu.delete(a);for(;Vu.size>=20;)Vu.delete(Vu.keys().next().value);let r=`wand-toast-${++abe}`,n=t.duration??3200;return Vu.set(r,{id:r,message:e,options:t,expiresAt:n>0?Date.now()+n:null}),$D(),{id:r,dismiss(){Vu.delete(r),$D()}}}var obe=0,Fd=[],pU={activeDialog:null},BD=new Set;function fU(){pU={activeDialog:Fd[0]??null};for(let e of BD)e()}var gn={dialog(e){let t=++obe;return new Promise(r=>{Fd=[...Fd,{id:t,options:e,resolve:r}],fU()})},toast(e,t={}){return F1(e,t)},closeTopmost(){let e=Fd[0];return!e||e.options.dismissable===!1?!1:(Ns.completeDialog(e.id,{dismissed:!0}),!0)}},Ns={subscribe(e){return BD.add(e),()=>BD.delete(e)},getSnapshot(){return pU},cancelDialogRequest(e){let t=Fd.find(r=>r.options===e);t&&this.completeDialog(t.id,{dismissed:!0})},completeDialog(e,t){let r=Fd.find(n=>n.id===e);r&&(Fd=Fd.filter(n=>n.id!==e),fU(),r.resolve(t))}};var sbe="Failed to fetch";function ns(e,t){return!(e instanceof Error)||!e.message||e.message===sbe?t:e.message}function Mf(e,t){return ns(e,t)}function $d(e){return e instanceof DOMException&&e.name==="AbortError"}function ii(e,t){return{message:Mf(e,t)}}var Tf=A(_(),1),mU=Tf.createContext(void 0),R0=Tf.createContext(!0);function ID(){let e=Tf.useContext(R0),t=Tf.useContext(js),[r,n]=Tf.useState(!1);return Tf.useEffect(()=>{n(!1)},[e,t?.mode,t?.query]),[e&&r,n]}function MD(){return Tf.useContext(mU)}async function hU(e,t){let r=await gn.dialog({title:t?"\u65B0\u5EFA\u5206\u533A\u5E76\u79FB\u5165":"\u65B0\u5EFA\u5206\u533A",description:`\u5728 ${e.workspaceName} \u4E2D\u6574\u7406\u4F1A\u8BDD\uFF0C\u4E0D\u521B\u5EFA\u4EFB\u52A1\u5361\u3002`,input:{label:"\u5206\u533A\u540D\u79F0",placeholder:"\u4F8B\u5982\uFF1A\u529F\u80FD\u5F00\u53D1"},actions:[{label:"\u53D6\u6D88",value:!1},{label:"\u521B\u5EFA",value:!0,autoFocus:!0}]});if(r.dismissed===!0||!r.action)return!1;let n=r.inputValue?.trim();if(!n)throw new Error("\u8BF7\u8F93\u5165\u5206\u533A\u540D\u79F0\u3002");return await mn.createSection({name:n,cwd:e.workspaceCwd,...!e.synthetic&&!e.global?{workspaceId:e.workspaceId}:{},sessionId:t}),!0}var Dd=A(_(),1);function TD({sessionId:e,taskId:t,intoNewTask:r,open:n,onMoved:a}){let[o,l]=Dd.useState([]),[u,d]=Dd.useState(!1),[p,h]=Dd.useState(!1),[v,g]=Dd.useState(""),[b,x]=Dd.useState(0),y=Dd.useRef(!1),E=Dd.useRef(r);Dd.useEffect(()=>{if(!n)return;let S=!1;return d(!0),g(""),mn.listTaskGroups().then(({groups:D})=>{S||(E.current=D.find($=>$.standaloneSessions.some(C=>C.id===e)||$.tasks.some(C=>C.sessions.some(B=>B.id===e)))??r,l([...t?[{id:"ungrouped",label:"\u79FB\u56DE\u5DE5\u4F5C\u533A\uFF08\u4E0D\u5206\u533A\uFF09"}]:[],...D.flatMap($=>$.tasks.filter(C=>C.id!==t).map(C=>({id:C.id,label:`${$.workspaceName} / ${C.kind==="section"?"":"\u4EFB\u52A1 \xB7 "}${C.name}`})))]))}).catch(D=>{S||g(ns(D,"\u65E0\u6CD5\u52A0\u8F7D\u5206\u533A\u3002"))}).finally(()=>{S||d(!1)}),()=>{S=!0}},[n,t,e,b]);let F=async(S,D,$)=>{if(y.current)return;y.current=!0,h(!0),g("");try{await S()}catch(B){g(ns(B,$)),y.current=!1,h(!1);return}a?.();let C=va.getRuntime();C?.toast(D,"success");try{await C?.refreshSessions()}catch(B){C?.toast(ns(B,"\u5F52\u5C5E\u5DF2\u66F4\u65B0\uFF0C\u4F46\u5217\u8868\u5237\u65B0\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u5217\u8868\u3002"),"danger")}finally{y.current=!1,h(!1)}};return{targets:o,loading:u,busy:p,error:v,move:S=>{let D=o.find($=>$.id===S);return D?F(()=>S==="ungrouped"?mn.unassignSession(e):mn.moveSession(S,e),`\u5DF2\u79FB\u81F3 ${D.label}\uFF0C\u8FD0\u884C\u76EE\u5F55\u4E0D\u53D8`,"\u65E0\u6CD5\u79FB\u52A8\u4F1A\u8BDD\u3002"):Promise.resolve()},summarize:async()=>{let S=E.current;if(!(!S||y.current)){y.current=!0,h(!0),g("");try{if(!await hU(S,e))return;a?.(),await va.getRuntime()?.refreshSessions()}catch(D){g(ns(D,"\u65E0\u6CD5\u521B\u5EFA\u5206\u533A\u3002"))}finally{y.current=!1,h(!1)}}},retry:()=>x(S=>S+1)}}function lbe(e,t){for(let r of e){let n=r.tasks.find(a=>a.sessions.some(o=>o.id===t));if(n)return{group:r,task:n}}return null}function _D(e,t){let r=t.trim();if(!r)return null;for(let n of e){let a=n.tasks.find(o=>o.id===r);if(a)return{group:n,task:a}}return null}function C6(e,t){let r={workspaceId:e.task.workspaceId,workspaceName:e.group.global?"":e.group.workspaceName,taskId:e.task.id,taskName:e.task.name,cwd:e.task.cwd};return t&&(r.preferredSessionId=t),r}async function jD(e,t){let r=va.getRuntime(),n=e.trim();if(!r||!n){t(e);return}try{let a=await mn.listTaskGroups(),o=lbe(a.groups,n);if(!o){let l=a.groups.find(u=>u.standaloneSessions.some(d=>d.id===n&&!d.teamChat));if(!l){t(e);return}l.synthetic||l.global?r.closeWorkspace():r.openWorkspace({id:l.workspaceId,name:l.workspaceName,cwd:l.workspaceCwd,layout:null,createdAt:l.createdAt??"",lastOpenedAt:null}),r.selectSession(n);return}if(Xr.getSnapshot().taskId===o.task.id){t(e);return}await r.openTask(C6(o,n)),r.selectSession(n)}catch{t(e)}}var ube="system-ai:",ND="\u8FD9\u662F\u7CFB\u7EDF\u8C03\u7528\u8BB0\u5F55\uFF0C\u53EA\u80FD\u67E5\u770B\u65E5\u5FD7\uFF0C\u4E0D\u80FD\u7EE7\u7EED\u53D1\u9001\u6216\u6062\u590D\u6267\u884C\u3002";function Dl(e){return typeof e?.automationId=="string"&&e.automationId.startsWith(ube)}var gU={"system-text":"unspecified","session-title":"auxiliary","task-title":"auxiliary","task-organize":"auxiliary","conversation-organize-job":"auxiliary","conversation-organize":"auxiliary","conversation-summary":"auxiliary","prompt-optimize":"auxiliary","git-commit":"auxiliary","git-tag":"auxiliary","git-fallback":"auxiliary","model-auto-assign":"auxiliary","user-memory":"auxiliary","employee-draft":"auxiliary",decision:"agent-call"},Hje=Object.keys(gU).filter(e=>gU[e]==="auxiliary");async function _f(e){if(typeof WandNative<"u"&&typeof WandNative.copyToClipboard=="function"){if(WandNative.copyToClipboard(e)!=="ok")throw new Error("\u590D\u5236\u5230\u7CFB\u7EDF\u526A\u8D34\u677F\u5931\u8D25\u3002");return}if(!globalThis.navigator?.clipboard?.writeText)throw new Error("\u5F53\u524D\u73AF\u5883\u65E0\u6CD5\u8BBF\u95EE\u526A\u8D34\u677F\u3002");await globalThis.navigator.clipboard.writeText(e)}function bU(e){return e.ptyBusy||e.ptyCommandRunning||e.inFlight||e.structuredState?.inFlight||e.permissionBlocked||e.pendingEscalation||e.queuedMessages?.length||e.queuedMessageCount||["thinking","initializing","starting","reconnecting","permission-blocked","waiting-input","waiting_input"].includes(e.status??"")?!0:e.status==="running"&&(e.sessionKind==="structured"||e.runner==="claude-cli-print")}var Rn=A(_(),1),cbe=A(er(),1),Ad=A(xe(),1),dbe=500;function S6({row:e,menu:t,open:r,onOpenChange:n,label:a,title:o,description:l,error:u,className:d,disabled:p=!1,rowRef:h}){let v=MD(),g=Kn(),b=Rn.useContext(R0),x=p||!b,y=r&&!x,E=Rn.useId(),F=Rn.useRef(null),S=Rn.useRef(null),D=Rn.useRef(null),$=Rn.useRef(null),C=Rn.useRef(!1),B=Rn.useRef(null),M=Rn.useRef(null),I=Rn.useRef(!1),[j,N]=Rn.useState([]),R=Rn.useRef(!1);R.current=j.length>0;let L=()=>{B.current!==null&&clearTimeout(B.current),B.current=null,M.current=null},q=z=>{let K=S.current;z.length&&K?.parentElement&&K.parentElement.appendChild(K),N(z),t.onOpenChange?.(z)},W=()=>{let z=$.current;z?.isConnected?z.focus({preventScroll:!0}):D.current?.querySelector("button,a[href]")?.focus({preventScroll:!0})};$n(y,()=>{n(!1),W()}),$n(y&&j.length>0,()=>{if(!R.current){n(!1),W();return}R.current=!1,q([]),F.current?.querySelector(".ant-dropdown-menu-submenu-title")?.focus({preventScroll:!0})}),Rn.useEffect(()=>(y||(L(),N([])),x&&r&&n(!1),L),[y,x]),Rn.useEffect(()=>(document.addEventListener("scroll",L,!0),()=>{L(),document.removeEventListener("scroll",L,!0)}),[]),Rn.useEffect(()=>{if(!y)return;let z=!1,K=()=>{z||F.current?.querySelector('[role="menuitem"]:not([aria-disabled="true"])')?.focus({preventScroll:!0})},J=requestAnimationFrame(()=>{K();let ee=F.current?.closest(".ant-dropdown");Promise.allSettled(ee?.getAnimations({subtree:!0}).map(ie=>ie.finished)??[]).then(K)}),te=()=>{z=!0,cancelAnimationFrame(J)};return document.addEventListener("pointerdown",te,!0),document.addEventListener("keydown",te,!0),()=>{te(),document.removeEventListener("pointerdown",te,!0),document.removeEventListener("keydown",te,!0)}},[y]);let U=(z,K,J)=>{$.current=J,C.current=!0,D.current?.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:z,clientY:K,button:2})),C.current=!1},[P,H]=Rn.useState(null),V=Rn.useRef(null),Q=Rn.useRef(null),X=Rn.useCallback(()=>P?Promise.resolve():(V.current||(V.current=globalThis.__wandImportBrowserModule("a16a3779a5201ce1").then(z=>{H(()=>z.DropdownSurface)})),V.current),[P]);Rn.useEffect(()=>{if(!P)return;let z=Q.current;if(!z)return;Q.current=null;let K=D.current?.querySelectorAll("button,a[href],[tabindex]")[z.focusIndex];U(z.x,z.y,K??D.current)},[P]);let Z=Rn.cloneElement(e,{ref:z=>{D.current=z,h&&(h.current=z),typeof e.props.ref=="function"?e.props.ref(z):e.props.ref&&(e.props.ref.current=z)},tabIndex:e.props.tabIndex??-1,"aria-haspopup":x?void 0:"menu","aria-expanded":x?void 0:y,"aria-controls":y?E:void 0,"aria-description":x?void 0:"\u53F3\u952E\u3001\u957F\u6309\u6216\u6309 Shift+F10 \u6253\u5F00\u64CD\u4F5C\u83DC\u5355","data-sidebar-menu-open":y||void 0,onContextMenu:z=>{z.preventDefault(),z.stopPropagation(),L(),!C.current&&!I.current&&($.current=z.target.closest("button,a[href],[tabindex]")??D.current),!x&&I.current&&!C.current&&n(!0),e.props.onContextMenu?.(z),!x&&!P&&(Q.current={x:z.clientX,y:z.clientY,focusIndex:Array.from(D.current?.querySelectorAll("button,a[href],[tabindex]")??[]).indexOf($.current)},X())},onKeyDown:z=>{if(e.props.onKeyDown?.(z),!(x||z.defaultPrevented||z.nativeEvent.isComposing)&&(z.key==="ContextMenu"||z.shiftKey&&z.key==="F10")){z.preventDefault(),z.stopPropagation(),L();let K=z.target,J=K.getBoundingClientRect();U(J.left+12,J.bottom,K)}},onPointerDown:z=>{if(e.props.onPointerDown?.(z),L(),I.current=!1,x||z.pointerType!=="touch")return;let K={x:z.clientX,y:z.clientY};M.current=K;let J=z.target.closest("button,a[href],[tabindex]")??D.current;B.current=setTimeout(()=>{B.current=null,I.current=!0,U(K.x,K.y,J)},dbe)},onPointerMove:z=>{e.props.onPointerMove?.(z),M.current&&Math.hypot(z.clientX-M.current.x,z.clientY-M.current.y)>8&&L()},onPointerUp:z=>{L(),I.current&&(z.preventDefault(),z.stopPropagation()),e.props.onPointerUp?.(z)},onTouchEnd:z=>{I.current&&(z.preventDefault(),z.stopPropagation()),e.props.onTouchEnd?.(z)},onPointerCancel:z=>{L(),e.props.onPointerCancel?.(z)},onClickCapture:z=>{I.current?(I.current=!1,z.preventDefault(),z.stopPropagation()):e.props.onClickCapture?.(z)}}),O=[...o?[{key:"context",type:"group",label:(0,Ad.jsxs)("div",{className:"sidebar-menu-heading",children:[(0,Ad.jsx)("strong",{title:o,children:o}),l?(0,Ad.jsx)("span",{title:l,children:l}):null]}),children:[]}]:[],...t.items??[],...u?[{key:"action-error",disabled:!0,label:(0,Ad.jsx)("span",{role:"alert",className:"sidebar-menu-error",children:u})}]:[]];return(0,Ad.jsxs)(Bt,{children:[P?(0,Ad.jsx)(P,{trigger:Z,open:y,disabled:x,triggers:["contextMenu"],onOpenChange:(z,K)=>{K.source==="trigger"&&n(z)},getPopupContainer:()=>g??document.body,placement:"bottomLeft",destroyOnHidden:!0,align:{overflow:{adjustX:!0,adjustY:!0,shiftX:12,shiftY:12}},classNames:{root:et("sidebar-row-menu",d)},styles:{root:{minWidth:"min(224px, calc(100vw - 24px))",maxWidth:"min(288px, calc(100vw - 24px))"},itemContent:{whiteSpace:"normal",overflowWrap:"anywhere"}},menu:{...t,id:E,"aria-label":a,selectable:!1,items:O,openKeys:j,onOpenChange:q,triggerSubMenuAction:"click",getPopupContainer:()=>S.current??g??document.body,builtinPlacements:{rightTop:{points:["tl","tr"],overflow:{adjustX:!0,adjustY:!0,shiftX:12,shiftY:12}},leftTop:{points:["tr","tl"],overflow:{adjustX:!0,adjustY:!0,shiftX:12,shiftY:12}},...t.builtinPlacements},style:{maxHeight:"calc(100dvh - 24px)",overflowY:"auto",overscrollBehavior:"contain",...t.style}},popupRender:z=>(0,Ad.jsx)("div",{ref:F,"data-wand-popup-owner":v,onKeyDown:K=>{K.key==="Tab"&&!K.nativeEvent.isComposing&&(n(!1),W(),K.stopPropagation())},children:z})}):Z,y&&(0,cbe.createPortal)((0,Ad.jsx)("div",{ref:S,className:"sidebar-menu-submenus","data-wand-popup-owner":v}),g??document.body)]})}var PD=A(_(),1),pbe=A(xe(),1);function OD({title:e,selector:t,children:r}){let n=PD.useRef(null),a=Kn(),[o,l]=PD.useState(!1);return $n(o,()=>l(!1)),(0,pbe.jsx)(Ma,{title:e,open:o,trigger:["hover","focus"],placement:"bottom",align:{overflow:{adjustX:!0,adjustY:!0,shiftX:!0,shiftY:!0}},getPopupContainer:()=>a??document.body,onOpenChange:u=>{let d=n.current?.querySelector(t);l(u&&!!d&&d.scrollWidth>d.clientWidth)},children:PD.cloneElement(r,{ref:n,title:void 0,onPointerDownCapture:u=>{l(!1),r.props.onPointerDownCapture?.(u)},onContextMenuCapture:u=>{l(!1),r.props.onContextMenuCapture?.(u)},onKeyDownCapture:u=>{(u.key==="ContextMenu"||u.key==="F10"&&u.shiftKey)&&l(!1),r.props.onKeyDownCapture?.(u)}})})}var jf=A(_(),1);async function fbe(e){let t=typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null,r=await gn.dialog({title:`\u5220\u9664\u4F1A\u8BDD\u300C${e}\u300D\uFF1F`,description:"\u5C06\u505C\u6B62\u6B64\u4F1A\u8BDD\u5E76\u5220\u9664\u8BB0\u5F55\uFF0C\u65E0\u6CD5\u64A4\u9500\u3002\u4EFB\u52A1\u548C\u5176\u4ED6\u4F1A\u8BDD\u4FDD\u7559\u3002",focusTriggerAfterClose:t?!1:void 0,actions:[{label:"\u53D6\u6D88",value:!1,autoFocus:!0},{label:"\u5220\u9664\u4F1A\u8BDD",value:!0,kind:"danger"}]});return t&&await new Promise(n=>requestAnimationFrame(()=>{t.isConnected&&!t.closest('[inert], [aria-hidden="true"]')&&(document.activeElement===document.body||document.activeElement?.closest('[role="dialog"]'))&&t.focus({preventScroll:!0}),n()})),r.dismissed!==!0&&!!r.action}var Ps=A(xe(),1);function zD({row:e,session:t,label:r,disabled:n,intoNewTask:a,onOpen:o,onArchive:l,onDelete:u}){let[d,p]=ID(),[h,v]=jf.useState(!1),[g,b]=jf.useState(null),[x,y]=jf.useState(""),E=jf.useRef(!1),F=jf.useRef(null),S=t.archived===!0,D=Dl(t),$=S||t.canArchive!==!1&&!bU(t),C=TD({sessionId:t.id,taskId:t.workspaceTaskId,intoNewTask:a,open:d&&h,onMoved:()=>p(!1)}),B=g!==null||C.busy;jf.useEffect(()=>{d||v(!1)},[d]);let M=async I=>{if(!(E.current||B||I==="archive"&&!$)){E.current=!0,y("");try{if(I==="delete"&&(p(!1),F.current?.querySelector("button,a[href]")?.focus({preventScroll:!0}),!await fbe(r)))return;b(I),I==="archive"?await l?.(!S):await u?.(),p(!1)}catch(j){y(ns(j,I==="delete"?"\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002":S?"\u65E0\u6CD5\u6062\u590D\u4F1A\u8BDD\u3002":"\u65E0\u6CD5\u5F52\u6863\u4F1A\u8BDD\u3002")),I==="delete"&&F.current?.contains(document.activeElement)&&p(!0)}finally{E.current=!1,b(null)}}};return(0,Ps.jsx)(S6,{row:jf.cloneElement(e,{"aria-busy":B||void 0,draggable:B?!1:e.props.draggable}),rowRef:F,disabled:n,open:d,onOpenChange:I=>{(!I||!B)&&p(I)},label:`\u4F1A\u8BDD ${r} \u7684\u64CD\u4F5C`,title:r,description:D?"\u7CFB\u7EDF\u8C03\u7528 \xB7 \u53EA\u8BFB\u8BB0\u5F55":S?"\u5DF2\u5F52\u6863\u4F1A\u8BDD":void 0,className:"workspace-session-menu",error:x,menu:{multiple:!0,onOpenChange:I=>{v(I.includes("move")),I.includes("move")&&y("")},items:[{key:"open",disabled:B,icon:(0,Ps.jsx)(Be,{name:"chat"}),label:"\u6253\u5F00\u4F1A\u8BDD"},...t.cwd?.trim()?[{key:"copy-cwd",disabled:B,icon:(0,Ps.jsx)(Be,{name:"copy"}),label:"\u590D\u5236\u5DE5\u4F5C\u76EE\u5F55"}]:[],...!S&&!D?[{key:"move",disabled:B,icon:(0,Ps.jsx)(Be,{name:"folder"}),label:"\u79FB\u52A8\u5230\u5206\u533A",popupClassName:"workspace-session-move-menu",children:[{key:"move-context",type:"group",label:"\u4FDD\u7559\u8FD0\u884C\u76EE\u5F55",children:[]},{key:"new-task",disabled:B,icon:(0,Ps.jsx)(Be,{name:"plus"}),label:C.busy?"\u6B63\u5728\u79FB\u52A8\u2026":"\u65B0\u5EFA\u5206\u533A\u5E76\u79FB\u5165"},{key:"move-divider",type:"divider"},...C.loading?[{key:"loading",disabled:!0,label:(0,Ps.jsx)("span",{role:"status",children:"\u6B63\u5728\u52A0\u8F7D\u5206\u533A\u2026"})}]:C.targets.length?C.targets.map(I=>({key:`target:${I.id}`,disabled:B,icon:(0,Ps.jsx)(Be,{name:"folder"}),label:I.label,title:I.label})):C.error?[]:[{key:"empty",disabled:!0,label:"\u8FD8\u6CA1\u6709\u5176\u4ED6\u5206\u533A\u3002"}],...C.error?[{key:"move-error",disabled:!0,label:(0,Ps.jsx)("span",{role:"alert",className:"sidebar-menu-error",children:C.error})},{key:"retry",disabled:B||C.loading,icon:(0,Ps.jsx)(Be,{name:"refresh"}),label:"\u91CD\u65B0\u52A0\u8F7D\u5206\u533A"}]:[]]}]:[],...l&&$?[{key:"archive",disabled:B,icon:(0,Ps.jsx)(Be,{name:S?"resume":"archive"}),label:g==="archive"?S?"\u6B63\u5728\u6062\u590D\u2026":"\u6B63\u5728\u5F52\u6863\u2026":S?"\u6062\u590D\u4F1A\u8BDD":"\u5F52\u6863\u4F1A\u8BDD"}]:[],...u?[{key:"danger-divider",type:"divider"},{key:"delete",disabled:B,danger:!0,icon:(0,Ps.jsx)(Be,{name:"trash"}),label:"\u5220\u9664\u4F1A\u8BDD\u2026"}]:[]],onClick:({key:I,domEvent:j})=>{j.stopPropagation(),!B&&(y(""),I==="open"?(p(!1),o()):I==="copy-cwd"&&t.cwd?.trim()?_f(t.cwd).then(()=>p(!1)).catch(N=>y(ns(N,"\u65E0\u6CD5\u590D\u5236\u5DE5\u4F5C\u76EE\u5F55\u3002"))):I==="archive"||I==="delete"?M(I):I==="new-task"?C.summarize():I==="retry"?C.retry():I.startsWith("target:")&&C.move(I.slice(7)))}}})}async function LD(e,t){let r=[...new Set(e.filter(a=>a.trim().length>0))];if(!r.length)return;await mn.deleteSessions(r);let n=va.getRuntime();try{let a=Xr.getSnapshot();if(n&&t&&a.taskId===t.id&&a.layout){let o=r.reduce((l,u)=>bD(l,u),a.layout);await n.saveTaskLayout(o)}}finally{try{await n?.refreshSessions()}finally{r.includes(new URLSearchParams(hn()).get("session")??"")&&Qn({session:null,tab:null},"replace")}}}async function HD(e,t){await mn.batchArchiveSessions([e],t),await va.getRuntime()?.refreshSessions()}var z0=A(_(),1),$1=A(xe(),1);function mbe({open:e,size:t=16,className:r=""}){return(0,$1.jsx)("span",{className:"sidebar-disclosure-chevron","data-open":e,"aria-hidden":"true",children:(0,$1.jsx)(Be,{name:"chevronDown",size:t,className:r})})}function hbe(e,t=!1){let r=z0.useContext(js),n=`wand.sidebar.${e}`,a=()=>{try{let p=window.localStorage.getItem(n);return p===null?t:p==="true"}catch{return t}},[o,l]=z0.useState(a),u=r?.normal[e]??o,d=p=>{l(p),r?.setNormal(e,p);try{window.localStorage.setItem(n,String(p))}catch{return}};return[u,()=>d(!u),d]}function gbe(e,t=!1,r=!1,n,a=!0){let o=z0.useContext(js),[l,,u]=hbe(e,t),[d,p]=z0.useState(()=>{try{return window.localStorage.getItem(`wand.sidebar.${e}`)!==null}catch{return!1}}),h=d||o?.normal[e]!==void 0;return[CD(o?.mode??"full",h?!l:n??!l,o?.overrides[e],r,!!o?.query.trim(),a),v=>{o?.query.trim()||(!o||o.mode==="full"?(p(!0),u(!v)):o.setOverride(e,v))}]}function yU(e,t){let r=e.closest(".sidebar-peek-body, .sidebar-body");if(!r){t();return}let n=e.getBoundingClientRect().top,a=e.getAttribute("aria-controls"),o=a?r.querySelector(`[id="${CSS.escape(a)}"]`):null;e.getAttribute("aria-expanded")==="true"&&o?.contains(document.activeElement)&&e.focus({preventScroll:!0});let l=r.querySelector(":scope > .sidebar-scroll-compensation");l||(l=document.createElement("div"),l.className="sidebar-scroll-compensation",l.setAttribute("aria-hidden","true"),l.inert=!0,r.append(l));let u=l,d=()=>{if(!e.isConnected){v();return}let g=e.getBoundingClientRect().top-n;if(Math.abs(g)<1)return;let b=r.scrollTop+g,x=Math.max(0,b-(r.scrollHeight-r.clientHeight));x&&(u.style.height=`${u.offsetHeight+x}px`),r.scrollTop=b},p=typeof ResizeObserver>"u"?null:new ResizeObserver(d),h=r.firstElementChild;h&&p?.observe(h);let v=()=>{p?.disconnect(),u.remove(),r.removeEventListener("wheel",v),r.removeEventListener("touchstart",v),r.removeEventListener("pointerdown",v),r.removeEventListener("keydown",v),window.removeEventListener("resize",v)};r.addEventListener("wheel",v,{once:!0,passive:!0}),r.addEventListener("touchstart",v,{once:!0,passive:!0}),r.addEventListener("pointerdown",v,{once:!0}),r.addEventListener("keydown",v,{once:!0}),window.addEventListener("resize",v,{once:!0}),t(),requestAnimationFrame(d)}function vbe(e,t,r){if(e.target!==e.currentTarget||e.nativeEvent.isComposing||e.key!=="ArrowRight"&&e.key!=="ArrowLeft")return;e.preventDefault();let n=e.key==="ArrowRight";n!==t&&yU(e.currentTarget,()=>r(n))}function qD({id:e,open:t,children:r}){let n=z0.useRef(null);return z0.useLayoutEffect(()=>{let a=n.current;if(!a)return;let o=a.closest(".sidebar"),l=a.closest(".workspaces-panel"),u=o??l,d=[u?.querySelector(`[aria-controls="${CSS.escape(e)}"]`)],p=a.parentElement?.closest(".wand-sidebar-disclosure");for(;p;)d.push(u?.querySelector(`[aria-controls="${CSS.escape(p.id)}"]`)),p=p.parentElement?.closest(".wand-sidebar-disclosure");d.push(...Array.from(a.closest(".sidebar-peek")?.querySelectorAll(".sidebar-peek-header button")??[]),...Array.from(u?.querySelectorAll(".sidebar-list-actions button, .sidebar-header-actions button")??[]));let h=()=>{d.find(v=>v?.isConnected&&!v.matches(":disabled")&&!v.closest('[inert], [aria-hidden="true"]')&&v.getClientRects().length>0&&getComputedStyle(v).visibility!=="hidden")?.focus({preventScroll:!0})};return!t&&a.contains(document.activeElement)&&h(),()=>{a.contains(document.activeElement)&&(h(),queueMicrotask(()=>{document.activeElement!==document.body&&!a.contains(document.activeElement)||h()}))}},[e,t]),(0,$1.jsx)("div",{ref:n,id:e,className:"wand-sidebar-disclosure","data-open":t,inert:!t,"aria-hidden":!t,children:(0,$1.jsx)(Bt,{children:(0,$1.jsx)(n7,{ghost:!0,destroyOnHidden:!0,activeKey:t?[e]:[],items:[{key:e,label:null,showArrow:!1,collapsible:"disabled",children:r,styles:{header:{display:"none"},body:{padding:0}}}]})})})}var gNe=A(xe(),1);function F6(e){if(e!=="none")return e==="queued"?"var(--text-secondary)":e==="failed"?"var(--danger, #b24f45)":e==="permission"||e==="waiting-input"||e==="reconnecting"?"var(--warning, #a96a2f)":e==="thinking"?"var(--info, #4a6fa5)":"var(--success, #4f7a58)"}function $6(e){return e.permissionBlocked||e.status==="permission-blocked"?"permission":e.status==="waiting-input"||e.status==="waiting_input"?"waiting-input":e.status==="reconnecting"?"reconnecting":e.status==="failed"?"failed":rs(e)?e.status==="thinking"?"thinking":"running":_s(e)?"queued":Gi(e)?"just-completed":"none"}function D1(e){switch(e.status){case"failed":return{label:"\u5931\u8D25",icon:"warning",tone:"warning"};case"permission-blocked":return{label:"\u7B49\u5F85\u6388\u6743",icon:"shield",tone:"warning"};case"waiting-input":case"waiting_input":return{label:"\u7B49\u5F85\u56DE\u7B54",icon:"question",tone:"warning"};case"reconnecting":return{label:"\u91CD\u8FDE\u4E2D",icon:"refresh",tone:"warning"}}if(rs(e))return e.status==="thinking"?{label:"\u601D\u8003\u4E2D",icon:"brain",tone:"accent"}:{label:"\u8FD0\u884C\u4E2D",icon:"refresh",tone:"accent",spinning:!0};if(_s(e))return{label:"\u6392\u961F\u4E2D",icon:"history",tone:"muted"};if(Gi(e))return{label:"\u521A\u5B8C\u6210",icon:"check",tone:"success"};switch(e.status){case"exited":return{label:"\u5DF2\u7ED3\u675F",icon:"stop",tone:"muted"};case"stopped":return{label:"\u5DF2\u505C\u6B62",icon:"stop",tone:"muted"};case"idle":case"running":return{label:"\u7A7A\u95F2",icon:"circle",tone:"muted"};default:return{label:"\u72B6\u6001\u672A\u77E5",icon:"question",tone:"muted"}}}function bbe(e,t){let r=e.filter(Qi).length,n=e.filter(rs).length,a=t?.queuedExecutionCount??e.filter(_s).length,o=n>0||t?.executionStatus==="running",l=t?.executionStatus==="queued"||e.some(_s),u=e.filter(d=>!Qi(d)&&!rs(d)&&Gi(d)).length;return{label:r?"\u5F85\u5904\u7406":o?"\u8FD0\u884C\u4E2D":l?"\u6392\u961F\u4E2D":u?"\u521A\u5B8C\u6210":"",tone:r?"warning":o?"accent":l?"muted":u?"success":"muted",description:`\u5F53\u524D\u5339\u914D ${e.length} \u4E2A\u4F1A\u8BDD\uFF0C${r} \u4E2A\u5F85\u5904\u7406\uFF0C${n} \u4E2A\u8FD0\u884C\u4E2D${a?`\uFF0C${a} \u6761\u6392\u961F\u4E2D`:""}\uFF0C${u} \u4E2A\u521A\u5B8C\u6210`}}function ybe(e,t){return t.standaloneSessions.length>0&&t.standaloneSessions.every(r=>e.sessionIds.includes(r.id))}function wbe(e,t){let r=new Set(t.standaloneSessions.map(n=>n.id));return{...e,sessionIds:ybe(e,t)?e.sessionIds.filter(n=>!r.has(n)):[...new Set([...e.sessionIds,...r])]}}function wU(e){return`${e.workspaceName} - \u672A\u5206\u7EC4\u4EFB\u52A1`}function xbe(e){return{id:`ungrouped:${e.workspaceId}`,workspaceId:e.workspaceId,name:wU(e),cwd:e.workspaceCwd,worktree:null,isolated:!1,layout:null,status:"active",createdAt:e.createdAt??"",lastOpenedAt:null,canArchive:!1,sessions:e.standaloneSessions,archivedSessions:e.archivedSessions}}function Gu(e,...t){let r=e.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);if(r.length===0)return!0;let n=t.filter(Boolean).join(" ").toLocaleLowerCase();return r.every(a=>n.includes(a))}function Ebe(e,t,r,n={}){return t.archived||t.status==="done"?[]:e.tasks.some(a=>a.id===t.parentWorkspaceTaskId&&Gu(r,a.name))||Gu(r,e.workspaceName,e.workspaceCwd,t.name,t.cwd)?t.sessions:t.sessions.filter(a=>Gu(r,a.title,n[a.id],a.cwd,a.provider,a.employeeName,a.teamStep?.title,a.teamStep?.memberName,a.teamChat?.chatTitle))}function kbe(e,t,r={}){let n=new Map(e.flatMap(p=>p.tasks.map(h=>[h.id,p.workspaceId]))),a=new Map(e.flatMap(p=>p.tasks.map(h=>[h.id,h]))),o=p=>{let h=p,v=new Set([h.id]);for(;h.parentWorkspaceTaskId&&a.has(h.parentWorkspaceTaskId)&&!v.has(h.parentWorkspaceTaskId);)h=a.get(h.parentWorkspaceTaskId),v.add(h.id);return n.get(h.id)},l=e.map(p=>({...p,tasks:e.flatMap(h=>h.tasks.filter(v=>v.parentWorkspaceTaskId?o(v)===p.workspaceId:h.workspaceId===p.workspaceId))})).map(p=>{let h=p.tasks,v=new Set(h.filter(b=>!b.archived&&b.status!=="done"&&(b.sessions.length>0||b.executionStatus==="queued"||b.executionStatus==="running"||t.trim()&&Gu(t,b.name,b.cwd))).map(b=>b.id)),g=new Map(h.map(b=>[b.id,b]));for(let b of[...v]){let x=g.get(b)?.parentWorkspaceTaskId,y=new Set;for(;x&&!y.has(x);)y.add(x),v.add(x),x=g.get(x)?.parentWorkspaceTaskId}return{...p,workspaceName:p.global?"\u672A\u5F52\u5C5E\u5DE5\u4F5C\u533A":p.workspaceName,tasks:h.filter(b=>v.has(b.id))}}).filter(p=>p.tasks.length>0||p.standaloneSessions.length>0||!!(t.trim()&&p.archivedSessions?.length)).sort((p,h)=>+!!p.global-+!!h.global);if(!t.trim())return l;let u=(...p)=>Gu(t,...p),d=p=>[p.title,p.cwd,p.provider,r[p.id]].filter(Boolean).join(" ");return l.flatMap(p=>{let h=p.workspaceName;if(u(h,p.workspaceCwd))return[p];let v=p.tasks.filter(F=>u(h,F.name,F.cwd,...F.sessions.map(d),...(F.archivedSessions??[]).map(d))),g=new Set(v.map(F=>F.id));for(let F of p.tasks)F.parentWorkspaceTaskId&&v.some(S=>S.id===F.parentWorkspaceTaskId)&&g.add(F.id);for(let F of v){let S=F.parentWorkspaceTaskId,D=new Set;for(;S&&!D.has(S);)D.add(S),g.add(S),S=p.tasks.find($=>$.id===S)?.parentWorkspaceTaskId}let b=p.tasks.filter(F=>g.has(F.id)),x=wU(p),y=p.standaloneSessions.filter(F=>u(x,d(F))),E=p.archivedSessions?.filter(F=>u(x,d(F)));return b.length||y.length||E?.length||u(x)?[{...p,tasks:b,standaloneSessions:y,archivedSessions:E}]:[]})}var Al=A(_(),1);function Cbe(e,t,r,n,a){let o=t.length;if(!o||!Number.isFinite(e)||e<=0)return{titles:!1,count:0};let l=Number.isFinite(n)?Math.max(0,n):0;if(t.every(d=>Number.isFinite(d)&&d>0)&&t.reduce((d,p)=>d+p,0)+l*(o-1)<=e)return{titles:!0,count:o};if(!Number.isFinite(r)||r<=0)return{titles:!1,count:0};if(r*o+l*(o-1)<=e)return{titles:!1,count:o};let u=0;for(let d=0;d<o;d++){let p=a(o-d);if(!Number.isFinite(p)||p<=0||d*(r+l)+p>e)break;u=d}return{titles:!1,count:u}}var On=A(xe(),1),Sbe=__wandCssTextPool[11];function Fbe({session:e}){let t=$6(e),r=F6(t)??"var(--text-tertiary)";return(0,On.jsx)("span",{className:"sidebar-session-preview-status",style:{color:r},"aria-hidden":"true",children:t==="just-completed"?(0,On.jsx)(Be,{name:"check",size:8}):(0,On.jsx)(qi,{color:r})})}function $be({sessions:e,expanded:t,selectedSessionId:r,liveTitles:n,label:a,className:o="",disabled:l=!1,expansionRef:u,onActivate:d,onExpand:p}){let h=Al.useRef(null),v=Al.useRef(null),g=Al.useRef(null),b=Al.useRef(null),x=Al.useRef(null),[y,E]=Al.useState({titles:!1,count:0}),[F,S]=Al.useState(!1),[D,$]=Al.useState(null),C=e.map((q,W)=>k1(q,W,n?.[q.id])),B=JSON.stringify(e.map((q,W)=>[q.id,C[W]]));if(Al.useLayoutEffect(()=>{_a("wand-sidebar-session-preview",Sbe)},[]),Al.useLayoutEffect(()=>{let q=h.current,W=v.current;if(!q||!W||!g.current||!b.current||!x.current)return;let U=!0,P=()=>{if(!U)return;let V=getComputedStyle(q),Q=Number.parseFloat(V.columnGap)||0,X=(Number.parseFloat(V.paddingInlineStart)||0)+(Number.parseFloat(V.paddingInlineEnd)||0),Z=q.clientWidth-X,O=g.current.getBoundingClientRect().width,z=O>0&&O*e.length+Q*(e.length-1)<=Z;S(te=>te===z?te:z);let K=z&&W.children.length===e.length?Array.from(W.children).map(te=>te.getBoundingClientRect().width):Array(e.length).fill(0),J=Cbe(Z,K,O,Q,te=>(x.current.textContent=`+${te}`,b.current.getBoundingClientRect().width));E(te=>te.titles===J.titles&&te.count===J.count?te:J)};P();let H=typeof ResizeObserver>"u"?null:new ResizeObserver(P);return H?.observe(q),H?.observe(W),window.addEventListener("resize",P),document.fonts?.ready.then(P),document.fonts?.addEventListener("loadingdone",P),()=>{U=!1,H?.disconnect(),window.removeEventListener("resize",P),document.fonts?.removeEventListener("loadingdone",P)}},[B,F]),!e.length)return null;let M=e.slice(0,y.count),I=e.length-M.length,j=e.slice(M.length).some(q=>q.id===r),N=(q,W,U)=>(0,On.jsxs)("span",{className:"sidebar-session-tag-content",children:[(0,On.jsx)(Fbe,{session:q}),(0,On.jsx)(_0,{session:q,size:14}),U?(0,On.jsx)("span",{className:"sidebar-session-tag-title",children:C[W]}):null]}),R=()=>{u?.current?.focus({preventScroll:!0})},L=`\u8FD8\u6709 ${I} \u4E2A\u5339\u914D\u4F1A\u8BDD${j?"\uFF0C\u5305\u542B\u5F53\u524D\u4F1A\u8BDD":""}\uFF0C\u5C55\u5F00\u5B8C\u6574\u5217\u8868`;return(0,On.jsx)(Bt,{children:(0,On.jsx)("div",{className:`sidebar-session-preview ${o}`,"data-expanded":t,inert:t||l,"aria-hidden":t||void 0,children:(0,On.jsx)("div",{className:"sidebar-session-preview-clip",children:(0,On.jsxs)("div",{ref:h,className:"sidebar-session-preview-row","data-title-mode":y.titles?"full":"icons","data-total-count":e.length,"data-visible-count":M.length,role:"group","aria-label":a,children:[M.map((q,W)=>{let U=D1(q),P=Cl(q),H=P?Tu(P,q.engine):"\u7EC8\u7AEF",V=`${C[W]} \xB7 ${H} \xB7 ${U.label}`;return(0,On.jsx)(Ma,{title:V,open:t||D===q.id?!1:void 0,children:(0,On.jsx)(Wu,{size:"sm",kind:"ghost",className:"sidebar-session-tag","data-preview-session-id":q.id,"data-titles":y.titles,"aria-label":V,"aria-pressed":q.id===r,disabled:l,onMouseEnter:()=>$(Q=>Q===q.id?null:Q),onFocus:()=>$(Q=>Q===q.id?null:Q),onClick:Q=>{$(q.id),Q.stopPropagation(),d(q)},children:N(q,W,y.titles)})},q.id)}),I>0?(0,On.jsx)(Ma,{title:L,open:t?!1:void 0,children:(0,On.jsxs)(Wu,{size:"sm",kind:"ghost",className:"sidebar-session-more","data-hidden-count":I,"data-contains-current":j,"aria-label":L,"aria-expanded":t,"aria-controls":u?.current?.getAttribute("aria-controls")??void 0,disabled:l||!p,onClick:q=>{q.stopPropagation(),R(),p?.()},children:["+",I]})}):null,(0,On.jsxs)("div",{className:"sidebar-session-preview-measure-clip","aria-hidden":"true",inert:!0,children:[(0,On.jsx)("div",{ref:v,className:"sidebar-session-preview-measure",children:F?e.map((q,W)=>(0,On.jsx)(Wu,{size:"sm",kind:"ghost",tabIndex:-1,className:"sidebar-session-tag","data-titles":"true",children:N(q,W,!0)},q.id)):null}),(0,On.jsx)(Wu,{ref:g,size:"sm",kind:"ghost",tabIndex:-1,className:"sidebar-session-tag",children:N(e[0],0,!1)}),(0,On.jsx)(Wu,{ref:b,size:"sm",kind:"ghost",tabIndex:-1,className:"sidebar-session-more",children:(0,On.jsxs)("span",{ref:x,children:["+",e.length]})})]})]})})})})}var Dbe=A(_(),1),vU=A(xe(),1),Abe=__wandCssTextPool[12];function Bbe({hasSessions:e=!0,reserve:t=!1,children:r}){return Dbe.useLayoutEffect(()=>{_a("wand-sidebar-session-area",Abe)},[]),!e&&!t?null:(0,vU.jsx)("div",{className:"sidebar-session-area","data-empty":!e||void 0,children:(0,vU.jsx)("div",{className:"sidebar-session-area-content",children:r})})}function Ibe(e,t,r=[]){let n=e.tasks.find(o=>o.id===t.workspaceTaskId)??e.tasks.find(o=>o.sessions.some(l=>l.id===t.id));if(n)return n;let a=r.find(o=>o.workspaceId===e.workspaceId);if(a)return a.tasks.find(o=>o.id===t.workspaceTaskId)??a.tasks.find(o=>o.sessions.some(l=>l.id===t.id))}var O0=null,RD=new Set;function Mbe(e){O0&&e&&O0.kind===e.kind&&O0.message===e.message||O0===null&&e===null||(O0=e?{...e}:null,RD.forEach(t=>t()))}function D6(){return O0}function WD(e){return RD.add(e),()=>RD.delete(e)}function UD(e){return e.kind!=="group"}function Tbe(e){return e.sessionSource!=="quick-terminal"&&!e.teamChat}var Nf=A(_(),1);function B6(){_a("wand-sidebar-layout",__wandCssTextPool[13])}var A6=A(xe(),1);function _be({value:e,children:t,animate:r=!0}){Nf.useLayoutEffect(()=>{B6()},[]);let n=Nf.useContext(js),a=Za(),o=Nf.useRef({value:e,children:t,scope:n}),[l,u]=Nf.useState(null),[d,p]=Nf.useState(!1);return Nf.useLayoutEffect(()=>{let h=0;return a||!r?(u(null),p(!1)):o.current.value!==e&&(u(o.current),p(!0),h=requestAnimationFrame(()=>p(!1))),()=>cancelAnimationFrame(h)},[e,a,r]),Nf.useLayoutEffect(()=>{o.current={value:e,children:t,scope:n}}),(0,A6.jsxs)("div",{className:"sidebar-projection-swap","data-entering":d,children:[(0,A6.jsx)("div",{className:"sidebar-projection-current",children:t}),l?(0,A6.jsx)("div",{className:"sidebar-projection-old","aria-hidden":"true",inert:!0,onTransitionEnd:h=>{h.target===h.currentTarget&&h.propertyName==="opacity"&&u(null)},children:(0,A6.jsx)(js.Provider,{value:l.scope,children:l.children})}):null]})}var Pf=null,VD=new Set;function xU(e){Pf=e;for(let t of VD)t()}var Bd={subscribe(e){return VD.add(e),()=>VD.delete(e)},getSnapshot(){return Pf},open(e,t,r=null){if(Pf?.sessionId===e&&Pf.toolId===t){this.close();return}xU({sessionId:e,toolId:t,trigger:r})},isOpen(){return Pf!==null},close(){let e=Pf?.trigger;xU(null),e?.isConnected&&e.focus({preventScroll:!0})},closeIfOpen(){return Pf?(this.close(),!0):!1}};var KD="wand-chat-width",jbe="data-chat-width";function EU(e){return e==="column"?"column":"full"}function kU(){try{return EU(window.localStorage.getItem(KD))}catch{return"full"}}function CU(e){typeof document>"u"||document.documentElement.setAttribute(jbe,e)}var I6=kU(),GD=new Set;CU(I6);var Nbe={subscribe(e){return GD.add(e),()=>{GD.delete(e)}},getSnapshot(){return I6},getServerSnapshot(){return"full"}};function SU(e){if(e!==I6){I6=e,CU(e);for(let t of GD)t()}}function Pbe(e){let t=EU(e),r=!0;try{window.localStorage.setItem(KD,t)}catch{r=!1}return SU(t),r}typeof window<"u"&&window.addEventListener("storage",e=>{(e.key===KD||e.key===null)&&SU(kU())});function Id(){return typeof document<"u"&&document.documentElement?.dataset.wandPage==="settings"}function Rbe(){return Id()&&document.documentElement.dataset.wandSettingsAuth==="client"}var Bl=A(_(),1);function Obe(e){return e.pending?e.phase==="updating"?"\u5E95\u5C42\u7EC4\u4EF6\u6B63\u5728\u81EA\u52A8\u66F4\u65B0\u3002\u65E0\u9700\u64CD\u4F5C\u3002":e.phase==="retrying"?"\u5E95\u5C42\u7EC4\u4EF6\u66F4\u65B0\u5C1A\u672A\u5B8C\u6210\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002\u65E0\u9700\u64CD\u4F5C\u3002":"\u5E95\u5C42\u7EC4\u4EF6\u4F1A\u5728\u5404\u81EA\u53EF\u5B89\u5168\u5207\u6362\u65F6\u81EA\u52A8\u66F4\u65B0\u3002\u65E0\u9700\u64CD\u4F5C\u3002":""}var Ku=A(xe(),1);function XD({compact:e=!1,visible:t=!0}){let[r,n]=Bl.useState({pending:!1,phase:"idle"}),[a,o]=Bl.useState(!1),[l,u]=Bl.useState(!1),[d,p]=Bl.useState(""),h=Bl.useRef(0),v=Bl.useRef(!0),g=Bl.useRef(!1),b=Bl.useRef(null);$n(a,()=>{o(!1),b.current?.focus()}),Bl.useEffect(()=>{t||o(!1)},[t]),Bl.useEffect(()=>{let S=!1;v.current=!0;let D,$=null,C=async()=>{if(S||$||document.hidden)return;D&&clearTimeout(D);let M=new AbortController;$=M;let I=h.current,j=setTimeout(()=>M.abort(),1e4);try{let N=await mt("/api/daemon-maintenance",{signal:M.signal,cache:"no-store"});!S&&I===h.current&&!g.current&&typeof N.pending=="boolean"&&["idle","waiting","updating","retrying"].includes(N.phase)&&n(N)}catch{}finally{clearTimeout(j),$=null,S||(D=setTimeout(()=>{C()},15e3))}},B=()=>{document.hidden||C()};return document.addEventListener("visibilitychange",B),C(),()=>{S=!0,v.current=!1,D&&clearTimeout(D),$?.abort(),document.removeEventListener("visibilitychange",B)}},[]);let x=async()=>{if(!g.current){g.current=!0,o(!1);try{let S=await gn.dialog({title:"\u5F3A\u5236\u66F4\u65B0\u5E95\u5C42\u7EC4\u4EF6\uFF1F",description:"\u5C06\u4E2D\u65AD\u5F53\u524D\u6240\u6709\u6B63\u5728\u6267\u884C\u7684\u7EC8\u7AEF\u548C\u6A21\u578B\u4EFB\u52A1\uFF0C\u5E76\u66F4\u65B0\u5E95\u5C42\u7EC4\u4EF6\u3002\u4F1A\u8BDD\u5386\u53F2\u4E0E\u6392\u961F\u6D88\u606F\u4F1A\u4FDD\u7559\uFF0C\u6392\u961F\u6D88\u606F\u53EF\u80FD\u5728\u66F4\u65B0\u540E\u7EE7\u7EED\u6267\u884C\u3002",actions:[{label:"\u53D6\u6D88",value:!1,autoFocus:!0},{label:"\u4E2D\u65AD\u5E76\u66F4\u65B0",value:!0,kind:"danger"}]});if(S.dismissed!==!1||!S.action||!v.current)return;h.current++,u(!0),p("");let D=await mt("/api/daemon-maintenance/force-update",{...rn({confirmInterrupt:!0}),signal:AbortSignal.timeout(6e4)});v.current&&n(D)}catch(S){v.current&&(p(S instanceof Error?S.message:"\u66F4\u65B0\u672A\u5B8C\u6210\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"),o(!0))}finally{g.current=!1,v.current&&u(!1)}}};if(!r.pending)return null;let y=l||r.phase==="updating",E=y?"\u7EC4\u4EF6\u66F4\u65B0\u4E2D":r.phase==="retrying"?"\u7EC4\u4EF6\u66F4\u65B0\u5F85\u91CD\u8BD5":"\u7EC4\u4EF6\u5F85\u66F4\u65B0",F=(0,Ku.jsx)(_e,{kind:"ghost",size:"small",loading:l,disabled:y||r.canForceUpdate===!1,"data-daemon-update-action":!0,title:r.canForceUpdate===!1?"\u9700\u8981\u7BA1\u7406\u5458\u6743\u9650":void 0,onClick:()=>{x()},children:"\u5F3A\u5236\u66F4\u65B0"});return(0,Ku.jsxs)(rt,{className:"daemon-update-notice",align:"center",gap:4,children:[(0,Ku.jsx)(m0,{open:a,onOpenChange:o,trigger:"click",placement:"bottomLeft",content:(0,Ku.jsxs)(rt,{vertical:!0,gap:"small",style:{maxWidth:"min(280px, calc(100vw - 48px))"},children:[(0,Ku.jsx)(Gt.Text,{children:l?"\u5E95\u5C42\u7EC4\u4EF6\u6B63\u5728\u66F4\u65B0\u3002\u65E0\u9700\u64CD\u4F5C\u3002":Obe(r)}),d&&(0,Ku.jsx)(Gt.Text,{type:"danger",role:"alert",children:d}),e&&F]}),children:(0,Ku.jsxs)(_e,{ref:b,kind:"ghost",size:"small","data-daemon-update-status":!0,"aria-label":E,"aria-expanded":a,title:E,children:[(0,Ku.jsx)(Be,{name:"info",size:12}),(0,Ku.jsx)("span",{hidden:e,role:"status","aria-live":"polite",children:E})]})}),!e&&F]})}function zbe(e,t){return e.resources?.skills.includes(t)?e.lockedSkills?.includes(t)?"locked":"on":"off"}function Lbe(e,t,r){let n=e.resources??{skills:[],mcpServers:[]},a=e.lockedSkills??[];return{resources:{...n,skills:r==="off"?n.skills.filter(o=>o!==t):[...new Set([...n.skills,t])]},lockedSkills:r==="locked"?[...new Set([...a,t])]:a.filter(o=>o!==t)}}function Hbe(e,t,r){if(!r||t.lockedSkills!==void 0&&JSON.stringify(r.lockedSkills)!==JSON.stringify(t.lockedSkills))return!1;if(t.resources===void 0&&t.lockedSkills===void 0)return!0;let n=t.resources??e.resources;if(!r.resources)return!n&&!t.lockedSkills?.length;let a;try{a=qbe(r.resources)}catch{return!1}let o=new Set(t.lockedSkills===void 0?[]:(e.lockedSkills??[]).filter(u=>!t.lockedSkills.includes(u))),l=(n?.skills??[]).filter(u=>!o.has(u)||a.skills.includes(u));return JSON.stringify(a.skills)===JSON.stringify(l)&&JSON.stringify(a.mcpServers)===JSON.stringify(n?.mcpServers??[])}function qbe(e){if(!e||typeof e!="object"||Array.isArray(e))throw new Error("\u8BF7\u9009\u62E9\u6709\u6548\u7684 Skills / MCP \u5217\u8868\u3002");let t=e;if(Object.keys(t).some(n=>n!=="skills"&&n!=="mcpServers"))throw new Error("\u8D44\u6E90\u9009\u62E9\u4E0D\u80FD\u5305\u542B\u8DEF\u5F84\u3001\u547D\u4EE4\u6216\u5176\u4ED6\u8BBE\u7F6E\u3002");let r=n=>{let a=t[n];if(!Array.isArray(a)||a.length>64||new Set(a).size!==a.length||a.some(o=>typeof o!="string"||!/^(?:skill-[a-f0-9]{24}|mcp-[a-f0-9]{24})$/.test(o)))throw new Error("\u8D44\u6E90\u9009\u62E9\u5FC5\u987B\u662F\u65E0\u91CD\u590D\u7684\u5DF2\u5B89\u88C5\u8D44\u6E90 ID\uFF08\u6BCF\u7C7B\u6700\u591A64\u9879\uFF09\u3002");return[...a]};return{skills:r("skills"),mcpServers:r("mcpServers")}}var ONe=Object.freeze({tools:!1,codemode:!1,codemodeOnly:!1,globalTools:!1,goalMode:!1,localDecision:!1,autoCompaction:!1});function A1(e){let t=e.trim();return t==="/"||["/settings","/codemode","/tools","/goal-mode"].some(r=>t.length>1&&r.startsWith(t))}var M6=new Map;function FU(e,t){if(t())return Promise.resolve();let r=M6.get(e);if(r)return r;let n=document.querySelector(`meta[name="wand-${e}-script"]`)?.content;if(!n)return Promise.reject(new Error("\u7EC4\u4EF6\u5730\u5740\u4E0D\u53EF\u7528\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\u3002"));let a=new Promise((o,l)=>{let u=document.createElement("script");u.src=n,u.async=!0;let d=!1,p=v=>{d||(d=!0,clearTimeout(h),u.onload=null,u.onerror=null,v?(u.remove(),l(v)):o())},h=setTimeout(()=>p(new Error("\u7EC4\u4EF6\u52A0\u8F7D\u8D85\u65F6\uFF0C\u8BF7\u91CD\u8BD5\u3002")),2e4);u.onload=()=>p(t()?void 0:new Error("\u7EC4\u4EF6\u52A0\u8F7D\u672A\u5B8C\u6210\uFF0C\u8BF7\u91CD\u8BD5\u3002")),u.onerror=()=>p(new Error("\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")),document.head.appendChild(u)}).finally(()=>{M6.get(e)===a&&M6.delete(e)});return M6.set(e,a),a}async function Wbe(){let e=globalThis;return await FU("qrcode",()=>typeof e.QRCodeLib?.toCanvas=="function"),e.QRCodeLib}async function Rf(){await FU("xterm",()=>{let e=globalThis.XTermLib;return typeof e?.Terminal=="function"&&typeof e.FitAddon=="function"})}var ca={open:!1,tab:"profile",nested:null,detail:!1,revision:0},QD=new Set;function L0(e){ca={...e,revision:ca.revision+1};for(let t of QD)t()}var Yi={open(e){L0({open:!0,tab:e??"profile",nested:null,detail:e!==void 0})},close(){!ca.open&&ca.nested===null||L0({...ca,open:!1,nested:null,detail:!1})},closeTopmost(){return ca.nested!==null?(L0({...ca,nested:null}),!0):ca.open&&ca.detail?(za.showDirectory(),!0):this.closeIfOpen()},closeIfOpen(){return ca.open?(this.close(),!0):!1},isOpen(){return ca.open}},za={subscribe(e){return QD.add(e),()=>QD.delete(e)},getSnapshot(){return ca},setTab(e){ca.tab===e&&ca.detail||L0({...ca,tab:e,detail:!0})},showDirectory(){ca.detail&&L0({...ca,detail:!1,nested:null})},setNested(e){ca.nested!==e&&L0({...ca,nested:e})}};async function YD(e){let t=new TextEncoder().encode(e),r=globalThis.crypto?.subtle,n=r?new Uint8Array(await r.digest("SHA-256",t)):(await globalThis.__wandImportBrowserModule("7950d87a3f5a01bd")).default(t);return Array.from(n,a=>a.toString(16).padStart(2,"0")).join("")}var H0=null,T6=new Set;function JD(e){return H0=e,T6.forEach(t=>t()),()=>{H0===e&&(H0=null,T6.forEach(t=>t()))}}function Of(){if(!H0)throw new Error("\u7FA4\u804A\u8F93\u5165\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\u3002");return H0}var q0={discardScope:e=>Of().discardScope?.(e),ready:()=>H0!==null,subscribeReady:e=>(T6.add(e),()=>{T6.delete(e)}),read:e=>Of().read(e),edit:(e,t)=>Of().edit(e,t),submit:(e,t,r)=>Of().submit(e,t,r),subscribe:e=>Of().subscribe(e),revision:e=>Of().read(e).revision,transfer:(e,t,r)=>Of().transfer?.(e,t,r)??!1};var as=A(_(),1),ZD=new Set;function _6(e){for(let t of ZD)t(e)}function U0(e){return ZD.add(e),()=>{ZD.delete(e)}}var eA=new Set;function B1(e){AU();for(let t of eA)t(e)}function $U(e){return eA.add(e),()=>{eA.delete(e)}}var tA=new Set;function aA(e){for(let t of tA)t(e)}function DU(e){return tA.add(e),()=>{tA.delete(e)}}function Ube(e){return mt(Md(e,"/live"))}var Md=(e,t="")=>`/api/ai-team-runs/${encodeURIComponent(e)}${t}`,Td=null,W0=null,rA=0,nA=new Set;function AU(){rA++,Td=null,W0=null}var Vbe=e=>new Promise(t=>{window.setTimeout(t,e)}),I1={list(){if(Td)return Promise.resolve(Td);if(!W0){let e=rA,t=mt("/api/ai-teams").then(r=>{if(e===rA){Td=r;for(let n of nA)n()}return r}).finally(()=>{W0===t&&(W0=null)});W0=t}return W0},async create(e){let t=await mt("/api/ai-teams",rn(e));return AU(),t},async update(e,t){let r=await mt(`/api/ai-teams/${encodeURIComponent(e)}`,rn(t,"PUT"));return B1(r.id),r},async remove(e){await mt(`/api/ai-teams/${encodeURIComponent(e)}`,{method:"DELETE"}),B1(e)},runs(e={}){let t=new URLSearchParams;e.teamId&&t.set("teamId",e.teamId),e.activeOnly&&t.set("active","1"),e.limit&&t.set("limit",String(e.limit));let r=t.toString();return mt(`/api/ai-team-runs${r?`?${r}`:""}`)},runsForTask(e){return mt(`/api/wand-tasks/${encodeURIComponent(e)}/team-runs`)},runsForChat(e,t){return I1.runsForTask(e).then(r=>r.filter(n=>n.chatSessionId===t))},start(e,t,r){return mt(`/api/wand-tasks/${encodeURIComponent(e)}/team-runs`,rn({teamId:t,note:r}))},startDirect(e,t){return mt(`/api/ai-teams/${encodeURIComponent(e)}/runs`,rn({note:t.note,workspaceId:t.workspaceId}))},dispatchPlan(e){return mt("/api/team-dispatch/plan",rn({note:e.note,...e.maxMembers===void 0?{}:{maxMembers:e.maxMembers}}))},dispatchStart(e){return mt("/api/team-dispatch/start",rn({workspaceId:e.workspaceId,note:e.note,members:e.members}))},settle(e){return Vbe(e==="error"?p0:d0)},detail(e){return mt(Md(e))},live:Ube,subscribeAiTeamStepLive:DU,approve(e){return mt(Md(e,"/approve"),rn({}))},reject(e,t){return mt(Md(e,"/reject"),rn({feedback:t}))},reply(e,t){return mt(Md(e,"/reply"),rn({text:t}))},continueRun(e,t){return mt(Md(e,"/continue"),rn({extraSteps:t}))},completeStep(e,t,r){return mt(Md(e,`/steps/${encodeURIComponent(t)}/complete`),rn({report:r}))},stop(e){return mt(Md(e,"/stop"),rn({}))}};function Gbe(e){let t=`${e.members.length} \u4EBA`;return{id:e.id,name:e.name,detail:e.description.trim()?`${t} \xB7 ${e.description.trim()}`:t}}function Kbe(e){let[t,r]=as.useState(null);return as.useEffect(()=>{if(!e)return;let n=!0;return I1.list().then(a=>{n&&r(a)},()=>{n&&r([])}),()=>{n=!1}},[e]),t}function Xbe(e){let[t,r]=as.useState(()=>Td??[]),[n,a]=as.useState(e&&!Td),[o,l]=as.useState(null),u=as.useRef(!1),d=as.useRef(e),p=as.useRef(0);d.current=e;let h=as.useCallback(()=>{if(!u.current||!d.current)return;let v=++p.current,g=()=>u.current&&d.current&&p.current===v;a(!0),I1.list().then(b=>{g()&&(r(b),l(null))},b=>{g()&&l(b instanceof Error?b.message:"\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}).finally(()=>{g()&&a(!1)})},[]);return as.useEffect(()=>{if(!e){a(!1);return}u.current=!0;let v=()=>{!u.current||!d.current||!Td||(r(Td),l(null))};nA.add(v),h();let g=$U(h);return()=>{u.current=!1,p.current++,nA.delete(v),g()}},[e,h]),{teams:t,loading:n,error:o,reload:h}}function iA(e=!0){let[t,r]=as.useState(0);return as.useEffect(()=>{if(!e)return;let n=!0,a=()=>{I1.runs({activeOnly:!0}).then(l=>{n&&r(l.filter(u=>u.status!=="running").length)}).catch(()=>{})};a();let o=U0(a);return()=>{n=!1,o()}},[e]),e?t:0}function Qbe(e,t){if(e&&e.id!==t.id&&(e=null),t.unchanged){if(!e)throw new Error("\u7F3A\u5C11\u5BF9\u8BDD\u540C\u6B65\u57FA\u7EBF\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u3002");return{...e,history:t.history}}let r=new Map((t.reset?[]:e?.messages??[]).map(o=>[o.messageId,o]));for(let o of t.messages??[])r.set(o.messageId,o);let n=(t.messageOrder??[]).map(o=>{let l=r.get(o);if(!l)throw new Error("\u5BF9\u8BDD\u540C\u6B65\u7F3A\u5C11\u6D88\u606F\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u3002");return l}),a=t.detail??e;if(!a||a.id!==t.id)throw new Error("\u5BF9\u8BDD\u540C\u6B65\u8EAB\u4EFD\u4E0D\u4E00\u81F4\u3002");return{...a,messages:n,history:t.history}}var is=A(_(),1),V0=C0(async()=>{let e=await mt("/api/sessions",{credentials:"same-origin"});if(!Array.isArray(e)||e.some(t=>!t||typeof t.id!="string"))throw new Error("Invalid session list response");return e});function Ybe(){return V0.peek()}function _1(e){return V0.load(e)}function P6(e){V0.publish(e)}var Jbe=["automationId","sessionSource","engine","provider","sessionKind","runner","command","title","titleGenerating","status","completionRevision","viewedCompletionRevision","cwd","startedAt","workspaceTaskId","ptyBusy","ptyCommandRunning","archived","archivedAt","providerCliActive","providerCliExitCode","inFlight","executionStatus","queuedMessageCount","canArchive","employeeId","employeeName","employeeAvatar","teamChat","teamStep"];function R6(e){let t=[];for(let r of e){if(!r||typeof r!="object")continue;let n=r;if(typeof n.id!="string"||n.sessionSource==="quick-terminal")continue;let a={id:n.id};for(let o of Jbe)n[o]!==void 0&&(a[o]=n[o]);t.push(a)}return t}function Zbe(e){return V0.subscribe(e)}function j1(){V0.invalidate()}function e1e(){V0.stale()}var N6=class extends Error{constructor(e){super("\u9001\u8FBE\u672A\u786E\u8BA4\uFF0C\u8BF7\u5148\u6838\u5BF9\u8BB0\u5F55\uFF0C\u52FF\u91CD\u590D\u53D1\u9001\u3002"),ae(this,"requestId",e),ae(this,"__wandAmbiguousDelivery",!0)}};async function BU(e,t){let r=await fetch(e,t),n=await r.json();if(!r.ok)throw new Pa(n.error||"\u8BF7\u6C42\u5931\u8D25\u3002",r.status);if(!n||typeof n.requestId!="string"||!["pending","accepted","rejected"].includes(n.state))throw new Error("\u65E0\u6CD5\u786E\u8BA4\u63A5\u53D7\u56DE\u6267\u3002");return n}var IU="wand-conversation-requests-v1",Il=new Map;try{let e=JSON.parse(localStorage.getItem(IU)??"{}");Object.entries(e).slice(0,200).forEach(([t,r])=>{typeof r=="string"&&Il.set(t,r)})}catch{}function j6(){try{localStorage.setItem(IU,JSON.stringify(Object.fromEntries(Il)))}catch{}}var T1=new Set;function M1(){for(let e of T1)e()}function t1e(e){return T1.add(e),()=>{T1.delete(e)}}var zf={list:()=>mt("/api/conversations").then(e=>e.conversations),systemSessions:e=>_1({force:e?.fresh,maxAgeMs:e?.maxAgeMs}).then(t=>t.filter(r=>Dl(r)&&!!r.employeeId)),peekSystemSessions:()=>{let e=Ybe();return e?e.filter(t=>Dl(t)&&!!t.employeeId):[]},async updateListState(e,t){let r=await mt(`/api/conversations/${encodeURIComponent(e)}/list-state`,rn(t,"PATCH"));return M1(),r},async remove(e){await mt(`/api/conversations/${encodeURIComponent(e)}`,{method:"DELETE"}),q0.ready()&&q0.discardScope(`conversation-draft:${location.origin}:local-owner:${e}:`),M1()},async detail(e,t=null,r=!1){let n=new URLSearchParams;t?.id===e&&t.history&&(n.set("since",t.history.revision),t.history.from&&n.set("from",t.history.from)),r&&n.set("older","1");try{let a=await mt(`/api/conversations/${encodeURIComponent(e)}/sync?${n}`);return Qbe(t,a)}catch(a){if(a instanceof Pa&&a.status===404)return mt(`/api/conversations/${encodeURIComponent(e)}`);throw a}},receipt:e=>BU(`/api/conversations/requests/${encodeURIComponent(e)}`),async post(e,t){let r=await YD(e+"\0"+JSON.stringify(t)),n=Il.get(r);if(n)throw new N6(n);if(Il.size>=200)throw new Pa("\u8BF7\u5148\u6838\u5BF9\u672A\u786E\u8BA4\u8BF7\u6C42\uFF0C\u518D\u7EE7\u7EED\u63D0\u4EA4\u3002",400);let a=P3();Il.set(r,a),j6();try{let o=await BU(e,rn({...t,requestId:a}));if(o.requestId!==a||o.state==="pending")throw new N6(a);if(o.state==="rejected")throw new Pa(o.error||"\u8BF7\u6C42\u672A\u63A5\u53D7\u3002",400);return Il.delete(r),j6(),M1(),o}catch(o){throw o instanceof Pa&&o.status>=400&&o.status<500&&o.status!==408&&o.status!==409?(Il.delete(r),j6(),Object.assign(o,{httpStatus:o.status})):new N6(a)}},pending:()=>[...Il.values()],async reconcile(e){let t=await this.receipt(e);if(t.state!=="pending"){for(let[r,n]of Il)n===e&&Il.delete(r);j6(),M1()}return t}},r1e=6e4;function oA(e=!1,t=!0){let[r,n]=is.useState([]),[a,o]=is.useState([]),[l,u]=is.useState(""),[d,p]=is.useState(!1),h=is.useRef(0),v=is.useRef(0),g=is.useCallback(async(E=!1,F)=>{let S=++h.current,D=v.current;try{let[$,C]=await Promise.all([zf.list(),e?zf.systemSessions({fresh:E,maxAgeMs:F}):Promise.resolve([])]);S===h.current&&(n($),p(!0),u("")),S===h.current&&D===v.current&&o(C)}catch($){S===h.current&&u($ instanceof Error?$.message:"\u5BF9\u8BDD\u5217\u8868\u8BFB\u53D6\u5931\u8D25\u3002")}},[e]),b=is.useCallback(()=>{g(!0)},[g]),x=is.useCallback(()=>{g(!1,r1e)},[g]),y=is.useCallback(()=>{e1e(),g(!1)},[g]);return is.useEffect(()=>{if(e)return Zbe(()=>{v.current++,o(zf.peekSystemSessions())})},[e]),is.useEffect(()=>{if(!t)return;g(),T1.add(x);let E=[U0(x),Ds(x),Y2(y)],F=window.setInterval(()=>{document.hidden||x()},3e4);return()=>{++h.current,T1.delete(x),E.forEach(S=>S()),clearInterval(F)}},[g,x,y,t]),{items:r,systemSessions:a,error:l,loaded:d,refresh:b}}var G0=A(_(),1),jt=A(xe(),1),K0=null,N1=null,n1e=rf.aiTeamsChunkSrc;function MU(){if(K0)return Promise.resolve(K0);if(N1)return N1;let e=globalThis;return e.__wandAiTeamsChunk?(K0=e.__wandAiTeamsChunk,Promise.resolve(K0)):(N1=Promise.all([globalThis.__wandImportBrowserModule("7f75952f913a9d96"),globalThis.__wandImportBrowserModule("b216e4997a446eba")]).then(([t,r])=>(t.installSharedLibraryBridge(),r.installAiTeamsHostBridge(),new Promise((n,a)=>{let o=document.createElement("script");o.src=n1e,o.async=!0,o.onload=()=>{let l=e.__wandAiTeamsChunk;l?n(l):a(new Error("AI \u56E2\u961F\u811A\u672C\u6CA1\u6709\u6CE8\u518C\u7EC4\u4EF6"))},o.onerror=()=>{o.remove(),a(new Error("AI \u56E2\u961F\u811A\u672C\u4E0B\u8F7D\u5931\u8D25"))},document.head.appendChild(o)}))).then(t=>(K0=t,t),t=>{throw N1=null,t}),N1)}function X0(e=!0){let[t,r]=G0.useState(K0),[n,a]=G0.useState(""),[o,l]=G0.useState(0);G0.useEffect(()=>{if(t||!e)return;let d=!0;return MU().then(p=>{d&&r(p)},p=>{d&&a(Mf(p,"AI \u56E2\u961F\u52A0\u8F7D\u5931\u8D25"))}),()=>{d=!1}},[t,o,e]);let u=G0.useCallback(()=>{a(""),l(d=>d+1)},[]);return{chunk:t,error:n,retry:u}}function a1e({admin:e}){let[t,r]=G0.useState(!1),{chunk:n,error:a,retry:o}=X0(t);return(0,jt.jsxs)(jt.Fragment,{children:[(0,jt.jsx)(_e,{kind:"secondary",onClick:()=>r(!0),children:`\u914D\u7F6E\u300C${E2}\u300D\u8C03\u7528\u94FE`}),n?(0,jt.jsx)(n.DecisionChainEditor,{admin:e,open:t,onOpenChange:r,providerOptions:s0.filter(l=>l.engine!=="sdk").map(l=>({value:l.provider,label:l.label}))}):(0,jt.jsx)(El,{open:t,onOpenChange:r,title:`${E2} \xB7 \u8C03\u7528\u94FE`,children:a?(0,jt.jsx)(ei,{type:"error",showIcon:!0,title:(0,jt.jsxs)(jt.Fragment,{children:[(0,jt.jsx)("span",{children:"\u8C03\u7528\u94FE\u7F16\u8F91\u5668\u52A0\u8F7D\u5931\u8D25\u3002"}),(0,jt.jsx)(_e,{kind:"soft",onClick:o,children:"\u91CD\u8BD5"})]})}):(0,jt.jsxs)("div",{role:"status","aria-busy":"true",children:[(0,jt.jsx)(Wi,{}),"\u6B63\u5728\u52A0\u8F7D\u8C03\u7528\u94FE\u7F16\u8F91\u5668\u2026"]})})]})}function sA(e){let{chunk:t,error:r,retry:n}=X0();return t?(0,jt.jsx)(t.AiTeamsPage,{...e}):(0,jt.jsx)(rt,{vertical:!0,gap:12,align:"center",justify:"center",component:"section",style:{height:"100%"},className:"task-board-native-page","aria-label":"AI \u56E2\u961F","aria-busy":!r,children:r?(0,jt.jsxs)(jt.Fragment,{children:[(0,jt.jsx)(ei,{type:"error",showIcon:!0,title:r}),(0,jt.jsx)(_e,{kind:"soft",size:"small",onClick:n,children:"\u91CD\u8BD5"})]}):(0,jt.jsxs)(jt.Fragment,{children:[(0,jt.jsx)(Wi,{}),(0,jt.jsx)("span",{role:"status",children:"\u6B63\u5728\u52A0\u8F7D AI \u56E2\u961F\u2026"})]})})}function i1e(e){let{chunk:t,error:r,retry:n}=X0();return t?(0,jt.jsx)(t.EmployeeListPage,{...e}):(0,jt.jsxs)("div",{role:"status",children:[r||"\u6B63\u5728\u8BFB\u53D6\u5458\u5DE5\u8D44\u6599\u2026",r?(0,jt.jsx)(_e,{onClick:n,children:"\u91CD\u8BD5"}):(0,jt.jsx)(Wi,{size:"small"})]})}function o1e(e){let{chunk:t}=X0();return t?(0,jt.jsx)(t.TaskTeamRunPanel,{...e}):null}async function s1e(e,t){return(await MU()).chatAttachmentPrompt(e,t)}function l1e(e){let{chunk:t,error:r,retry:n}=X0(e.active!==!1);if(t)return(0,jt.jsx)(t.ConversationMessages,{...e});let a=e.active===!1;return(0,jt.jsx)("div",{className:"conversation-messages-loading",role:a?void 0:"status","aria-hidden":a||void 0,style:{flex:"1 1 auto",minHeight:"100%",display:"flex",alignItems:"center"},children:a?null:(0,jt.jsxs)(jt.Fragment,{children:[r||"\u6B63\u5728\u8BFB\u53D6\u6D88\u606F\u7EC4\u4EF6\u2026",r?(0,jt.jsx)(_e,{onClick:n,children:"\u91CD\u8BD5"}):null]})})}function lA(e){let{chunk:t,error:r,retry:n}=X0();return t?(0,jt.jsx)(t.TeamChatPage,{...e}):(0,jt.jsx)(rt,{vertical:!0,gap:12,align:"center",justify:"center",component:"section",style:{height:"100%"},className:"task-board-native-page","aria-label":"\u7FA4\u804A","aria-busy":!r,children:r?(0,jt.jsxs)(jt.Fragment,{children:[(0,jt.jsx)(ei,{type:"error",showIcon:!0,title:r}),(0,jt.jsx)(_e,{kind:"soft",size:"small",onClick:n,children:"\u91CD\u8BD5"})]}):(0,jt.jsxs)(jt.Fragment,{children:[(0,jt.jsx)(Wi,{}),(0,jt.jsx)("span",{role:"status",children:"\u6B63\u5728\u52A0\u8F7D\u7FA4\u804A\u2026"})]})})}function Hf(e,t){let r=t??(typeof window>"u"?void 0:window.location.origin);if(!r||!/^https?:\/\//i.test(e)||/[\u0000-\u001f]/.test(e))return null;try{let n=new URL(e);return n.origin!==new URL(r).origin||n.username||n.password||!/^\/api\/(?:file-raw|file-preview|session-file|local-file|local-preview)(?:[/?]|$)/.test(n.pathname)?null:n.pathname+n.search+n.hash}catch{return null}}var Ml={open:!1,mode:"url",value:"",previewUrl:null,sourceLabel:"",error:null},uA=new Set;function Rs(e={}){Ml={...Ml,...e};for(let t of uA)t()}function TU(e){return["localhost","127.0.0.1","[::1]","::1"].includes(e.toLowerCase())}function Lf(e,t){try{let r=Hf(e.trim(),t)??e.trim();if(/[\u0000-\u001f]/.test(r))return null;if(r.startsWith("/api/local-preview/")){let o=new URL(r,"http://wand.invalid"),l=/^\/api\/local-preview\/([^/]+)\/(\d{1,5})(\/.*)?$/.exec(o.pathname);return!l||!TU(l[1])||Number(l[2])<1||Number(l[2])>65535?null:`/api/local-preview/${l[1].includes(":")?"::1":"127.0.0.1"}/${Number(l[2])}${l[3]||"/"}${o.search}${o.hash}`}/^(?:localhost|127\.0\.0\.1|\[::1\])(?::\d{1,5})?(?:[/?#]|$)/i.test(r)&&(r="http://"+r);let n=new URL(r);if(n.protocol!=="http:"||!TU(n.hostname)||n.username||n.password)return null;let a=n.port||"80";return Number(a)<1?null:`/api/local-preview/${n.hostname.includes(":")?"::1":"127.0.0.1"}/${a}${n.pathname}${n.search}${n.hash}`}catch{return null}}function _U(e){let t=e.trim();if(!t)throw new Error("\u8BF7\u8F93\u5165\u672C\u5730\u7AEF\u53E3\u6216\u5730\u5740\u3002");if(Hf(t)?.startsWith("/api/local-preview/")||t.startsWith("/api/local-preview/")){let a=Lf(t);if(!a)throw new Error("\u53EA\u5141\u8BB8\u9884\u89C8\u672C\u673A\uFF08localhost\uFF09HTTP \u670D\u52A1\u3002");return a}if(/^\d{1,5}$/.test(t)){let a=Number(t);if(a<1||a>65535)throw new Error("\u7AEF\u53E3\u53F7\u5FC5\u987B\u662F 1\u201365535\u3002");return`/api/local-preview/127.0.0.1/${a}/`}let r=/^https?:\/\//i.test(t)?t:`http://${t}`,n=Lf(r);if(!n)throw new Error("\u53EA\u5141\u8BB8\u9884\u89C8\u672C\u673A\uFF08localhost\uFF09HTTP \u670D\u52A1\u3002");return n}function u1e(e){let t=new TextEncoder().encode(e),r="";for(let n of t)r+=String.fromCharCode(n);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Q0(e){let t=e.trim();return!t.startsWith("/")&&!t.startsWith("~/")?null:`/api/local-file/${u1e(t)}/`}function jU(e){let t=Hf(e.trim())??e.trim();if(P1(t))return t;if(/^file:/i.test(t)){let r=new URL(t);if(r.hostname&&r.hostname!=="localhost")throw new Error("\u53EA\u5141\u8BB8\u6253\u5F00\u670D\u52A1\u7AEF\u672C\u5730\u6587\u4EF6\u3002");return(Q0(decodeURIComponent(r.pathname))??"")+r.search+r.hash}if(!t)throw new Error("\u8BF7\u8F93\u5165\u6587\u4EF6\u6216\u76EE\u5F55\u8DEF\u5F84\u3002");return Q0(t)??(()=>{throw new Error("\u8BF7\u8F93\u5165\u670D\u52A1\u7AEF\u6587\u4EF6\u8DEF\u5F84\u3002")})()}function c1e(e){try{return Rs({open:!0,mode:"file",value:e,previewUrl:jU(e),sourceLabel:e.trim(),error:null}),!0}catch(t){return Rs({open:!0,mode:"file",value:e,previewUrl:null,error:t instanceof Error?t.message:"\u65E0\u6CD5\u6253\u5F00\u672C\u5730\u6587\u4EF6\u9884\u89C8\u3002"}),!1}}function d1e(e){try{return Rs({open:!0,mode:"url",value:e,previewUrl:_U(e),sourceLabel:e.trim(),error:null}),!0}catch(t){return Rs({open:!0,mode:"url",value:e,previewUrl:null,error:t instanceof Error?t.message:"\u65E0\u6CD5\u6253\u5F00\u672C\u5730\u9884\u89C8\u3002"}),!1}}function P1(e){if(e=Hf(e)??e,!e.startsWith("/api/")||/[\u0000-\u001f]/.test(e))return!1;try{let t=new URL(e,"http://wand.invalid");if(/^\/api\/local-file\/[A-Za-z0-9_-]+(?:\/.*)?$/.test(t.pathname))return!0;let r=t.searchParams.get("path");return/^\/api\/session-file\/[^/]+$/.test(t.pathname)&&!!r&&!r.startsWith("/")&&t.searchParams.getAll("path").length===1&&t.searchParams.get("mode")==="preview"}catch{return!1}}var Os={openPreview(e,t="HTML \u9884\u89C8"){return P1(e)?(Rs({open:!0,mode:"file",value:e,previewUrl:e,sourceLabel:t,error:null}),!0):!1},subscribe(e){return uA.add(e),()=>uA.delete(e)},getSnapshot(){return Ml},isOpen(){return Ml.open},closeIfOpen(){return Ml.open?(this.close(),!0):!1},show(e=""){Rs({open:!0,value:e,error:null})},close(){Rs({open:!1,error:null})},setMode(e){e!==Ml.mode&&Rs({mode:e,error:null})},setValue(e){Rs({value:e,error:null})},openUrl:d1e,openFile:c1e,submit(){try{let e=Ml.mode==="url"?_U(Ml.value):jU(Ml.value);Rs({previewUrl:e,sourceLabel:Ml.value.trim(),error:null})}catch(e){Rs({previewUrl:null,error:e instanceof Error?e.message:"\u65E0\u6CD5\u6253\u5F00\u672C\u5730\u9884\u89C8\u3002"})}}};function cA(e){return/^[^:/?#]+\.[^:/?#]+:\d+(?::\d+)?(?:[?#]|$)/.test(e)}function pA(e,t={}){let r=e.trim();if(!r||/[\u0000-\u001f]/.test(r)||(r=Hf(r,t.serverOrigin)??r,Lf(r,t.serverOrigin)))return null;let n="",a="";if(/^file:/i.test(r))try{let d=new URL(r);if(d.hostname&&d.hostname!=="localhost")return null;r=decodeURIComponent(d.pathname),n=d.search,a=d.hash}catch{return null}else if(r.startsWith("/api/local-file/"))try{let d=new URL(r,"http://wand.invalid"),p=/^\/api\/local-file\/([A-Za-z0-9_-]+)(\/.*)?$/.exec(d.pathname);if(!p)return null;let h=p[1].replace(/-/g,"+").replace(/_/g,"/"),v=Uint8Array.from(atob(h),g=>g.charCodeAt(0));if(r=new TextDecoder("utf-8",{fatal:!0}).decode(v),!r.startsWith("/")&&!r.startsWith("~/"))return null;if(d.searchParams.delete("__wand_file_action"),p[2]&&p[2]!=="/"){let g=decodeURIComponent(p[2]),b=d.pathname+d.search,x=new URL(b,"http://wand.invalid");return x.searchParams.set("__wand_file_action","download"),{path:g,rawUrl:b,downloadUrl:x.pathname+x.search,previewUrl:/\.html?(?::\d+(?::\d+)?)?$/i.test(g)||g.endsWith("/")?b+d.hash:null}}if(!/\.html?(?::\d+(?::\d+)?)?$/i.test(r)&&!r.endsWith("/")){let g=d.pathname+d.search+d.hash;return d.searchParams.set("__wand_file_action","download"),{path:r,rawUrl:g,downloadUrl:d.pathname+d.search,previewUrl:null}}n=d.search,a=d.hash}catch{return null}else if(/^\/api\/session-file\/[^/?#]+\?/.test(r))try{let d=new URL(r,"http://wand.invalid");if(!/^\/api\/session-file\/[^/]+$/.test(d.pathname)||d.searchParams.getAll("path").length!==1||(r=d.searchParams.get("path")||"",r.startsWith("/")||/^[a-z][a-z\d+.-]*:/i.test(r)&&!cA(r)))return null;t={sessionId:decodeURIComponent(d.pathname.split("/")[3])},n=d.searchParams.get("search")||"",a=d.hash}catch{return null}else if(/^\/api\/file-(?:raw|preview)\?/.test(r))try{let d=new URL(r,"http://wand.invalid");if(d.searchParams.getAll("path").length!==1)return null;r=d.searchParams.get("path")||"",n=d.searchParams.get("search")||"",a=d.hash}catch{return null}else{if(/^(?:\/\/|#)/.test(r)||/^[a-z][a-z\d+.-]*:/i.test(r)&&!cA(r))return null;let d=r.indexOf("#");d>=0&&(a=r.slice(d),r=r.slice(0,d));let p=r.indexOf("?");p>=0&&(n=r.slice(p),r=r.slice(0,p));try{r=decodeURIComponent(r)}catch{}}if(n&&(!n.startsWith("?")||/[\u0000-\u001f]/.test(n))||(/^#L\d+(?:C\d+)?$/i.test(a)&&(a=""),!r||/[\u0000-\u001f]/.test(r)||/^\/(?:api|android|macos)(?:\/|$)/.test(r)))return null;let o=r.endsWith("/"),l=/\.html?(?::\d+(?::\d+)?)?$/i.test(r)||o;if(!r.startsWith("/")&&!r.startsWith("~/")){if(!t.sessionId&&!t.cwd?.startsWith("/"))return null;if(t.sessionId){let p="/api/session-file/"+encodeURIComponent(t.sessionId)+"?path="+encodeURIComponent(r);return{path:r,rawUrl:p,downloadUrl:p+"&mode=download",previewUrl:l?p+"&mode=preview"+(n?"&search="+encodeURIComponent(n):"")+a:null}}let d=[];for(let p of r.split("/"))if(!(!p||p==="."))if(p===".."){if(!d.length)return null;d.pop()}else d.push(p);r=t.cwd.replace(/\/$/,"")+"/"+d.join("/")}if(o){r.endsWith("/")||(r+="/");let d=Q0(r);return{path:r,rawUrl:d,downloadUrl:d+"?__wand_file_action=download",previewUrl:d+n+a}}let u="/api/file-raw?path="+encodeURIComponent(r);return{path:r,rawUrl:u,downloadUrl:u+"&download=1",previewUrl:l?Q0(r)+n+a:null}}function p1e(e){if(/^\/api\/(?:session-file|local-file)\//.test(e)){let r=new URL(e,"http://wand.invalid");return r.searchParams.set(e.startsWith("/api/local-file/")?"__wand_file_action":"mode","metadata"),r.pathname+r.search}let t=e.startsWith("/api/file-raw?")?new URL(e,"http://wand.invalid").searchParams.get("path")??e:e;return"/api/file-preview?path="+encodeURIComponent(t)}function f1e(e,t){let r=pA("/api/file-raw?path="+encodeURIComponent(e));return r?.previewUrl&&t?.startsWith("/api/local-file/")?{...r,previewUrl:t}:r}function O6(e){let t=e.trim().replace(/[\\/]+$/,"");return t.split(/[\\/]/).pop()||t||"file"}function z6(e){let t=e.lastIndexOf(".");return t>0?e.slice(t).toLowerCase():""}function fA(e){let t=typeof e=="string"?{path:e}:e,r=t.path.trim();if(!r)return null;let n=new Set,a=[];for(let o of t.siblings??[]){let l=o.path.trim();!l||o.type==="dir"||n.has(l)||(n.add(l),a.push({path:l,name:o.name?.trim()||O6(l),type:"file"}))}return{path:r,siblings:a}}function mA(e,t){let r=e?.siblings??[];if(r.length<2||!e)return null;let n=r.findIndex(l=>l.path===e.path);if(n<0)return null;let a=(n+t+r.length)%r.length,o=r[a];return o&&o.path!==e.path?o:null}function R1(e){return Number.isFinite(e)?Math.max(10,Math.min(22,Math.round(e))):13}function Y0(){return 13}function m1e(e){let t=typeof e=="number"&&Number.isFinite(e)?Math.max(0,e):0;if(t<1024)return`${Math.round(t)} B`;let r=["KB","MB","GB","TB"],n=t/1024,a=0;for(;n>=1024&&a<r.length-1;)n/=1024,a+=1;return`${n>=10?n.toFixed(0):n.toFixed(1)} ${r[a]}`}function h1e(e){return e.kind==="text"?e.lang||e.ext.replace(/^\./,"")||"text":{image:"\u56FE\u7247",pdf:"PDF",video:"\u89C6\u9891",audio:"\u97F3\u9891",binary:"\u4E8C\u8FDB\u5236"}[e.kind]||e.ext.replace(/^\./,"")||e.kind}function g1e(e){switch(e){case"image":case"pdf":case"video":case"audio":case"binary":return e;default:return"file"}}function hA(e){return e.lang==="markdown"||/\.(md|markdown|mdx)$/i.test(e.name)}function gA(e){return`'${e.replace(/'/g,"'\\''")}'`}var v1e=new Set(["abstract","as","async","await","break","case","catch","class","const","continue","default","def","delete","do","else","enum","export","extends","false","finally","fn","for","from","func","function","go","if","impl","import","in","instanceof","interface","let","match","mod","new","nil","null","of","package","pass","private","protected","pub","public","raise","readonly","return","self","static","struct","super","switch","throw","trait","true","try","type","typeof","undefined","unsafe","use","var","void","while","with","yield"]),b1e=/\/\/[^\n]*|#[^\n]*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|`(?:[^`\\]|\\.)*`|\b(?:0x[\da-fA-F]+|0b[01]+|\d+(?:\.\d+)?)\b|\b[A-Za-z_$][\w$]*\b|[+\-*/%=<>!&|^~?:]+/g;function y1e(e){let t=[],r=0;for(let n of e.matchAll(b1e)){let a=n.index??0;a>r&&t.push({value:e.slice(r,a)});let o=n[0],l;o.startsWith("//")||o.startsWith("#")?l="comment":/^["'`]/.test(o)?l="string":/^(?:0x|0b|\d)/.test(o)?l="number":v1e.has(o)?l="keyword":/^[+\-*/%=<>!&|^~?:]+$/.test(o)&&(l="operator"),t.push({value:o,kind:l}),r=a+o.length}return r<e.length&&t.push({value:e.slice(r)}),t}function w1e(e){switch(e){case"image":case"pdf":case"video":case"audio":case"binary":return e;default:return"text"}}function dA(e,t=!1){return`/api/file-raw?${t?"download=1&":""}path=${encodeURIComponent(e)}`}function NU(e,t,r,n){r=Ge(t.path,r);let a=O6(r),o=Na(t.size,-1),l={message:Ge(t.error,`${n} (HTTP ${e.status})`),status:e.status,size:o>=0?o:void 0,maxSize:Na(t.maxSize,-1)>=0?Na(t.maxSize):void 0};if(e.status===413){let u=r.startsWith("/api/")?pA(r):null;l.download={path:r,name:a,url:u?.downloadUrl??dA(r,!0),size:l.size}}return l}function L6(e,t){let r=ga(e)?e:{},n=Ge(r.path,t).trim()||t,a=Ge(r.name,O6(n)),o=w1e(r.kind),l=o==="text"?Ge(r.content):void 0;return{kind:o,path:n,name:a,ext:Ge(r.ext,z6(a)),size:Math.max(0,Na(r.size)),mime:Ge(r.mime)||void 0,lang:Ge(r.lang)||void 0,content:l,rawUrl:dA(n),url:dA(n,!0)}}var x1e=class{constructor(e=(t,r)=>globalThis.fetch(t,r)){ae(this,"fetchImpl",e)}async load(e,t={}){let r=await this.fetchImpl(p1e(e),{credentials:"same-origin",signal:t.signal}),n=await $s(r);return!r.ok||typeof n.error=="string"?{ok:!1,failure:NU(r,n,e,"\u52A0\u8F7D\u9884\u89C8\u5931\u8D25")}:{ok:!0,file:L6(n,e)}}async save(e,t){let r=await this.fetchImpl("/api/file-write",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,content:t})}),n=await $s(r);return!r.ok||typeof n.error=="string"?{ok:!1,failure:NU(r,n,e,"\u4FDD\u5B58\u6587\u4EF6\u5931\u8D25")}:{ok:!0,result:{path:Ge(n.path,e),size:Math.max(0,Na(n.size,new TextEncoder().encode(t).byteLength)),mtime:Ge(n.mtime)||void 0}}}},vA=new x1e;var E1e=500;function RU(e,t,r={}){if(!t)return[];let n=r.caseSensitive===!0,a=n?e:e.toLowerCase();if(a.length!==e.length)return k1e(e,t);let o=n?t:t.toLowerCase(),l=[],u=1,d=0,p=a.indexOf(o);for(;p!==-1;)u+=OU(e,d,p),d=p,l.push({start:p,end:p+o.length,line:u}),p=a.indexOf(o,p+o.length);return l}function k1e(e,t){let r=[],n=1,a=0,o=e.indexOf(t);for(;o!==-1;)n+=OU(e,a,o),a=o,r.push({start:o,end:o+t.length,line:n}),o=e.indexOf(t,o+t.length);return r}function OU(e,t,r){let n=0;for(let a=t;a<r;a+=1)e.charCodeAt(a)===10&&(n+=1);return n}function C1e(e,t,r){return t<=0?0:(((e%t+t)%t+r)%t+t)%t}function PU(e,t,r){return{message:Ge(t.error,`${r} (HTTP ${e.status})`),status:e.status,size:Na(t.size,-1)>=0?Na(t.size):void 0,maxSize:Na(t.maxSize,-1)>=0?Na(t.maxSize):void 0}}function S1e(e,t,r){return{message:Ge(e.error,r),path:Ge(e.path,t)||t,size:Na(e.size,-1)>=0?Na(e.size):void 0,mtime:Ge(e.mtime)||void 0}}var F1e=class{constructor(e=(t,r)=>globalThis.fetch(t,r)){ae(this,"fetchImpl",e)}async load(e,t={}){let r=await this.fetchImpl(`/api/file-preview?path=${encodeURIComponent(e)}`,{credentials:"same-origin",signal:t.signal}),n=await $s(r);if(!r.ok||typeof n.error=="string")return{ok:!1,failure:PU(r,n,"\u6253\u5F00\u6587\u4EF6\u5931\u8D25")};let a=L6(n,e);if(a.kind!=="text")return{ok:!1,failure:{message:"\u4EC5\u652F\u6301\u7F16\u8F91\u6587\u672C\u6587\u4EF6\u3002",status:415,size:a.size}};let o=a.content??"";return{ok:!0,file:{path:a.path,name:a.name,ext:a.ext||z6(a.name),lang:a.lang,size:a.size??0,mime:a.mime,mtime:Ge(n.mtime)||void 0,baseline:o,draft:o,dirty:!1}}}async save(e,t,r={}){let n={path:e,content:t};r.overwrite||(r.expectedMtime&&(n.expectedMtime=r.expectedMtime),typeof r.expectedSize=="number"&&Number.isFinite(r.expectedSize)&&(n.expectedSize=r.expectedSize));let a=await this.fetchImpl("/api/file-write",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}),o=await $s(a);return a.status===409?{ok:!1,conflict:S1e(o,e,"\u6587\u4EF6\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\u3002")}:!a.ok||typeof o.error=="string"?{ok:!1,failure:PU(a,o,"\u4FDD\u5B58\u6587\u4EF6\u5931\u8D25")}:{ok:!0,result:{path:Ge(o.path,e),size:Math.max(0,Na(o.size,new TextEncoder().encode(t).byteLength)),mtime:Ge(o.mtime)||void 0}}}},$1e=new F1e;function bA(e=0){return{open:!1,revision:e,activePath:null,tabs:[],file:null,status:"idle",failure:null,saving:!1,fontSize:Y0(),wrap:!1,preview:!1,findOpen:!1,findQuery:"",findCaseSensitive:!1,findIndex:0}}function D1e(e,t){return e==="switch"?{title:"\u5207\u6362\u6587\u4EF6\uFF1F",message:`${t}\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5207\u6362\u540E\u4F1A\u4E22\u5931\u3002`}:e==="replace"?{title:"\u5173\u95ED\u7F16\u8F91\u5668\uFF1F",message:`${t}\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5173\u95ED\u540E\u4F1A\u4E22\u5931\u3002`}:{title:"\u5173\u95ED\u6587\u4EF6\uFF1F",message:`${t}\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5173\u95ED\u540E\u4F1A\u4E22\u5931\u3002`}}function A1e(e){return`\u300C${e}\u300D`}var B1e={async confirmDiscard(e,t){let r=D1e(e,A1e(t.split("/").pop()||t)),n=await gn.dialog({title:r.title,description:r.message,tone:"warning",actions:[{label:"\u7EE7\u7EED\u7F16\u8F91",value:!1,kind:"secondary",autoFocus:!0},{label:"\u653E\u5F03\u4FEE\u6539",value:!0,kind:"danger"}],dismissable:!0});return"action"in n&&n.action===!0},async confirmConflict(e){let t=await gn.dialog({title:"\u78C1\u76D8\u6587\u4EF6\u5DF2\u66F4\u6539",description:`\u300C${e}\u300D\u5728\u6253\u5F00\u540E\u88AB\u5916\u90E8\u4FEE\u6539\u3002\u91CD\u65B0\u52A0\u8F7D\u4F1A\u4E22\u5F03\u5F53\u524D\u8349\u7A3F\uFF1B\u8986\u76D6\u4F1A\u7528\u7F16\u8F91\u5668\u5185\u5BB9\u66FF\u6362\u78C1\u76D8\u6587\u4EF6\u3002`,tone:"warning",actions:[{label:"\u53D6\u6D88",value:"cancel",kind:"secondary",autoFocus:!0},{label:"\u91CD\u65B0\u52A0\u8F7D",value:"reload",kind:"secondary"},{label:"\u4ECD\u8981\u8986\u76D6",value:"overwrite",kind:"danger"}],dismissable:!0});return"action"in t?t.action:"cancel"},notify(e,t){gn.toast(e,{tone:t})},onSaved(){}};function I1e(e){let t=new Set,r=bA(),n=e.runtime??B1e,a=0,o=null,l=new Map;function u($){r={...r,...$,revision:r.revision+1};for(let C of t)C()}function d($){return $?hA($):!1}function p($){let C=[];for(let B of l.values())C.push({path:B.path,name:B.name,dirty:B.dirty});return C}function h($){u({tabs:p(r.activePath),file:$!==void 0?$:r.activePath?l.get(r.activePath)??null:null})}async function v($,C){let B=C??(r.activePath?l.get(r.activePath)??null:null);if(!B||!B.dirty)return!0;try{return await n.confirmDiscard($,B.path)}catch(M){return n.notify(ii(M,"\u65E0\u6CD5\u786E\u8BA4\u662F\u5426\u653E\u5F03\u4FEE\u6539\u3002").message,"error"),!1}}async function g(){let $=[...l.values()].filter(M=>M.dirty);if($.length===0)return!0;let C=$.slice(0,3).map(M=>M.name).join("\u3001"),B=`${$.length} \u4E2A\u672A\u4FDD\u5B58\u6587\u4EF6\uFF08${C}${$.length>3?"\u2026":""}\uFF09`;try{return await n.confirmDiscard("replace",B)}catch(M){return n.notify(ii(M,"\u65E0\u6CD5\u786E\u8BA4\u662F\u5426\u653E\u5F03\u4FEE\u6539\u3002").message,"error"),!1}}async function b(){await g()&&(l.clear(),o?.abort(),o=null,u(bA(r.revision+1)))}async function x($){o?.abort();let C=new AbortController;o=C;let B=++a;u({open:!0,activePath:$,status:"loading",file:null,failure:null,findIndex:0});try{let M=await e.repository.load($,{signal:C.signal});return B!==a||C.signal.aborted||!r.open?!1:(o=null,M.ok===!1||!M.file?(u({status:"error",failure:M.failure??{message:"\u6253\u5F00\u6587\u4EF6\u5931\u8D25"}}),!1):(l.set($,M.file),u({status:"ready",file:M.file,failure:null,preview:d(M.file),tabs:p($)}),!0))}catch(M){return B!==a||C.signal.aborted||$d(M)||!r.open||(o=null,u({status:"error",failure:ii(M,"\u6253\u5F00\u6587\u4EF6\u5931\u8D25")})),!1}}async function y($){if(!n.confirmConflict)return"cancel";try{return await n.confirmConflict($)}catch(C){return n.notify(ii(C,"\u65E0\u6CD5\u786E\u8BA4\u662F\u5426\u8986\u76D6\u5916\u90E8\u4FEE\u6539\u3002").message,"error"),"cancel"}}function E($,C,B,M){let I=l.get($);if(!I)return;let j={...I,baseline:C,draft:I.draft,dirty:I.draft!==C,size:B,mtime:M};l.set($,j);let N=r.activePath?l.get(r.activePath)??null:null;u({saving:!1,file:N,failure:null,tabs:p(r.activePath)})}async function F($,C){u({saving:!0,failure:null});let B=$.draft;try{let M=await e.repository.save($.path,B,{expectedMtime:$.mtime,expectedSize:$.size,overwrite:C.overwrite});if(!(l.get($.path)??null))return u({saving:!1}),!1;if(M.ok===!1&&"conflict"in M){u({saving:!1,failure:{message:M.conflict.message,status:409,size:M.conflict.size}}),n.notify(M.conflict.message,"warning");let I=await y($.path);if(I==="reload"){let j=await x($.path);return j&&n.notify("\u5DF2\u91CD\u65B0\u52A0\u8F7D\u78C1\u76D8\u6587\u4EF6","info"),j}if(I==="overwrite"){let j=l.get($.path);return j?F(j,{overwrite:!0}):!1}return!1}if(M.ok===!1)return u({saving:!1,failure:M.failure}),n.notify(M.failure.message,"error"),!1;E($.path,B,M.result.size,M.result.mtime),n.notify("\u5DF2\u4FDD\u5B58","success");try{await n.onSaved?.($.path)}catch{}return!0}catch(M){return u({saving:!1,failure:ii(M,"\u4FDD\u5B58\u5931\u8D25\uFF1A\u7F51\u7EDC\u9519\u8BEF")}),n.notify(ii(M,"\u4FDD\u5B58\u5931\u8D25\uFF1A\u7F51\u7EDC\u9519\u8BEF").message,"error"),!1}}function S(){let $=r.activePath?l.get(r.activePath):null;return RU($?.draft??"",r.findQuery,{caseSensitive:r.findCaseSensitive}).length}async function D($){switch($.type){case"close":{if(r.saving)return!1;let C=$.path??r.activePath;if(!C)return!0;let B=l.get(C);if(B?.dirty&&!await v("close",B))return!1;l.delete(C);let M=p(null).filter(j=>j.path!==C);if(M.length===0)return u(bA(r.revision+1)),!0;let I=r.activePath===C?M[0].path:r.activePath;return u({activePath:I,file:I?l.get(I)??null:null,preview:d(I?l.get(I):null),tabs:M,status:I?"ready":"idle",findIndex:0}),!0}case"activate":{if(r.saving)return!1;if(r.activePath===$.path)return!0;let C=l.get($.path)??null;return u({activePath:$.path,file:C,status:C?"ready":"loading",failure:null,preview:d(C),findIndex:0}),C?!0:x($.path)}case"change":{if(!r.activePath)return!1;let C=l.get(r.activePath);if(!C)return!1;let B={...C,draft:$.value,dirty:$.value!==C.baseline};return l.set(C.path,B),h(B),!0}case"revert":{if(!r.activePath)return!1;let C=l.get(r.activePath);if(!C)return!1;let B={...C,draft:C.baseline,dirty:!1};return l.set(C.path,B),h(B),!0}case"save":{if(!r.activePath||r.saving)return!1;let C=l.get(r.activePath);return C?C.dirty?F(C,{overwrite:!1}):(n.notify("\u6CA1\u6709\u6539\u52A8","info"),!0):!1}case"wrap.toggle":return u({wrap:!r.wrap}),!0;case"preview.toggle":{let C=r.activePath?l.get(r.activePath):null;if(!C||!d(C))return!1;let B=!r.preview;return u({preview:B,...B?{findOpen:!1}:{}}),!0}case"font.adjust":return u({fontSize:R1(r.fontSize+$.delta)}),!0;case"find.open":return u({findOpen:!0}),!0;case"find.close":return r.findOpen&&u({findOpen:!1}),!0;case"find.set":return $.query===r.findQuery||u({findQuery:$.query,findOpen:!0,findIndex:0}),!0;case"find.step":{if(!r.findQuery)return!1;let C=S();return C===0?!1:(u({findIndex:C1e(r.findIndex,C,$.delta)}),!0)}case"find.case.toggle":return u({findCaseSensitive:!r.findCaseSensitive,findIndex:0}),!0}}return{controller:{async open($){let C=$.trim();return!C||r.saving?!1:l.has(C)?r.activePath===C?(u({open:!0}),!0):D({type:"activate",path:C}):x(C)},execute:D,closeAll(){b()},isActive(){return r.open&&r.activePath!==null},hasDirty(){for(let $ of l.values())if($.dirty)return!0;return!1}},store:{subscribe($){return t.add($),()=>t.delete($)},getSnapshot(){return r}},configureRuntime($){let C=n;return n=$,()=>{n===$&&(n=C)}}}}var zU=I1e({repository:$1e}),O1=zU.controller,_d=zU.store;var LU=A(_(),1),z1=A(_(),1),M1e=A(er(),1),L1=A(xe(),1),H1=z1.createContext(null);function J0({children:e}){let t=z1.useContext(H1),r=z1.useId(),n=t?.registerChrome;z1.useLayoutEffect(()=>n?.(r),[n,r]);let a=(0,L1.jsx)(pb,{value:"lucide",children:(0,L1.jsx)("div",{className:"wand-workbar-host",children:e})});return t?(0,M1e.createPortal)(a,t.chromeHost):a}function Z0(){let e=z1.useContext(H1);return e?(0,L1.jsx)(Br,{ref:e.trigger,"aria-label":"\u6253\u5F00\u7EC8\u7AEF",title:"\u6253\u5F00\u7EC8\u7AEF\uFF08\u8FD0\u884C\u5728 Wand / PTY \u4E3B\u673A\uFF09","aria-expanded":e.open,"aria-controls":"quick-terminal-panel","data-pressed":e.open||void 0,onClick:e.show,children:(0,L1.jsx)(Be,{name:"terminal",size:18})}):null}function yA({visible:e}){return e?(0,L1.jsx)(Z0,{}):null}var jd=A(xe(),1),wA=LU.createContext(!1);function xA(){let e=LU.useSyncExternalStore(Fl.subscribe,Fl.getSnapshot,Fl.getSnapshot);return e.open?(0,jd.jsx)(J0,{children:(0,jd.jsxs)(rt,{align:"center",gap:12,className:"new-work-heading unified-new-work-heading",children:[(0,jd.jsxs)(_e,{kind:"ghost","aria-label":"\u8FD4\u56DE\u539F\u9875\u9762",disabled:!e.dismissable,onClick:()=>ua.close(),children:[(0,jd.jsx)(Be,{name:"chevronLeft",size:18}),(0,jd.jsx)("span",{children:"\u8FD4\u56DE"})]}),(0,jd.jsx)("span",{className:"new-work-page-label",title:e.taskName||void 0,children:e.newTask?"\u65B0\u5EFA\u4EFB\u52A1":e.taskName?`\u65B0\u5EFA\u4F1A\u8BDD \xB7 ${e.taskName}`:"\u65B0\u5EFA\u4F1A\u8BDD"}),(0,jd.jsx)("div",{className:"workbar-spacer"}),(0,jd.jsx)(Z0,{})]})}):null}var H6=l1(()=>mt("/api/wand-tasks"));Ds(()=>H6.clear());function EA(){H6.preload()}function kA(){H6.clear()}function T1e(e){return e?mt(`/api/wand-tasks?workspaceId=${encodeURIComponent(e)}`):H6.load()}var CA=A(_(),1);function _1e(e){let t=[],r=[];for(let n of e)n.archived?r.push(n):t.push(n);return{active:t,archived:r}}function HU(e,t=[]){let r=new Map;for(let o of e)r.has(o.id)||r.set(o.id,o);let{active:n,archived:a}=_1e([...r.values()]);for(let o of t)r.has(o.id)||(r.set(o.id,o),a.push(o));return{active:n,archived:a}}function j1e(e){let{active:t,archived:r}=HU(e.sessions,e.archivedSessions);return{...e,sessions:t,archivedSessions:r}}function N1e(e){return e.map(t=>{let r=HU(t.standaloneSessions,t.archivedSessions);return{...t,tasks:t.tasks.map(j1e),standaloneSessions:r.active,archivedSessions:r.archived}})}function q1(e){return e.replace(/https?:\/\/[^\s,。;]+/gi,"[\u670D\u52A1\u5730\u5740]").replace(/(?:Bearer\s+\S+|(?:token|password|connectionCode|appToken)\s*[:=]\s*\S+)/gi,"[\u51ED\u636E\u5DF2\u9690\u85CF]").replace(/(?:\/[\w.~-]+){2,}/g,"[\u8DEF\u5F84]")}var SA={groups:[],loading:!0,error:""};function P1e(e,t={}){let r=new Set,n=t.subscribeChanges??Ds,a=t.setInterval??setInterval,o=t.clearInterval??clearInterval,l=SA,u,d=0,p,h=!1,v,g;function b(y){if(!(l.groups===y.groups&&l.loading===y.loading&&l.error===y.error)){l=y;for(let E of r)E()}}function x(y){if(p)return y&&(h=!0),p;let E=d,F=Promise.resolve().then(async()=>{if(E===d)do{h=!1;try{let S=await e.listTaskGroups(u);if(E!==d)return;u=S.revision??(S.unchanged?u:void 0),b({groups:S.unchanged?l.groups:N1e(S.groups),loading:!0,error:""})}catch(S){if(E!==d)return;b({...l,error:q1(ns(S,"\u65E0\u6CD5\u52A0\u8F7D\u4EFB\u52A1\u5217\u8868\u3002"))})}}while(h&&E===d)}).finally(()=>{E!==d||p!==F||(p=void 0,b({...l,loading:!1}))});return p=F,b({...l,loading:!0}),F}return{getSnapshot:()=>l,getServerSnapshot:()=>SA,reload:()=>x(!0),subscribe(y){return r.add(y),r.size===1&&(g=n(()=>{x(!0)}),v=a(()=>{x(!1)},6e3),x(!1)),()=>{r.delete(y),!(r.size>0)&&(g?.(),g=void 0,v!==void 0&&o(v),v=void 0,d+=1,p=void 0,h=!1,u=void 0,l=SA)}}}}var Tl=P1e(mn),XPe=Object.freeze({groups:[],loading:!0,error:""});function q6(e=0){let t=(0,CA.useSyncExternalStore)(Tl.subscribe,Tl.getSnapshot,Tl.getServerSnapshot),r=(0,CA.useRef)(e);return(0,CA.useEffect)(()=>{r.current!==e&&(r.current=e,Tl.reload())},[e]),{...t,reload:Tl.reload}}var R1e="taskboard",O1e="teams",z1e="teamchat",L1e="schedules",H1e="calendar",U6={board:R1e,teams:O1e,teamchat:z1e,schedules:L1e,calendar:H1e},os={open:!1,page:"board",workspaceId:"",sessionId:"",runId:"",teamId:"",calendarRange:"month",revision:0},FA=new Set,qU=!1;function W6(e){os={...os,...e,revision:os.revision+1},FA.forEach(t=>t())}function q1e(e){let t=new URLSearchParams(e).get("view");return t==="issues"||Object.values(U6).includes(t??"")}function W1e(e){let t=new URLSearchParams(e).get("view");return Object.keys(U6).find(r=>U6[r]===t)??"board"}function U1e(e){return new URLSearchParams(e).get("run")??""}function WU(){let e=hn(),t=q1e(e),r=W1e(e),n=new URLSearchParams(e),a=r==="teamchat"?U1e(e):"",o=r==="teams"?n.get("team")??"":"",l=n.get("range")==="week"?"week":"month";t===os.open&&r===os.page&&a===os.runId&&o===os.teamId&&l===os.calendarRange||W6({open:t,page:r,runId:a,teamId:o,calendarRange:l})}function W1(){qU||typeof window>"u"||(qU=!0,yi(WU),WU())}var zn={open(e="",t="",r="board",n="",a=""){W1();let o=new URLSearchParams(hn());Qn({view:U6[r],run:r==="teamchat"?n:null,...r==="teams"&&a?{team:a}:{},...r==="board"&&!o.has("directory")&&e?{directory:e}:{}}),W6({open:!0,page:r,workspaceId:r==="calendar"?"":e,sessionId:r==="calendar"?"":t,runId:r==="teamchat"?n:"",teamId:r==="teams"&&(a||o.get("team"))||""})},calendarRange(e){Qn({range:e}),os.calendarRange!==e&&W6({calendarRange:e})},close(){W1(),os.open&&(Qn({view:"workspace"}),os.open&&W6({open:!1}))}},_l={subscribe(e){return FA.add(e),()=>{FA.delete(e)}},getSnapshot(){return os}};var V1e=["backlog","todo","doing","review","ready","done","archived"];function V6(e){return e==="done"?"review":e}function G1e(e){return e.verification?.verdict==="passed"&&e.verification.revision===(e.deliveryRevision??0)&&typeof e.verification.evidence=="string"&&!!e.verification.evidence.trim()&&typeof e.verification.blocker=="string"&&!e.verification.blocker.trim()}function K1e(e){return!!e.acceptance?.acceptedAt&&e.acceptance?.confirmedRevision===(e.deliveryRevision??0)&&typeof e.acceptance?.evidence=="string"&&!!e.acceptance.evidence.trim()&&typeof e.acceptance?.blocker=="string"&&!e.acceptance.blocker.trim()}function G6(e){return typeof e=="string"&&V1e.includes(e)}function X1e(e){return e==="archived"}var Q1e="low";function Y1e(e){return e==="cli"||e==="sdk"}var J1e=["managed","full-access","default"],$A="default";function Z1e(e){return e==="managed"||e==="full-access"||e==="default"}function UU(e){return e==="codex"?["full-access"]:J1e}function eye(e,t){let r=UU(e);return Z1e(t)&&r.includes(t)?t:r.includes($A)?$A:r[0]}var tye="structured";function rye(e){return e==="structured"||e==="pty"}function nye(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=e;return(t.type==="employee"||t.type==="team"||t.type==="cli")&&typeof t.id=="string"&&t.id.length>0}var aye=60;var Nd=[{value:"confirmation",label:"\u9700\u8981\u6211\u786E\u8BA4",icon:"messageWarning"},{value:"working",label:"\u8FD0\u884C\u4E2D / \u6392\u961F\u4E2D",icon:"activity"},{value:"all",label:"\u5168\u90E8",icon:"layers"},{value:"failed",label:"\u8FD0\u884C\u5931\u8D25",icon:"circleX"}];function zs(e){return Nd.some(t=>t.value===e)?e:e==="active"||e==="running"||e==="queued"?"working":e==="attention"||e==="approval"||e==="waiting"?"confirmation":"all"}function iye(e="all"){return Nd.find(t=>t.value===zs(e))?.label??"\u5168\u90E8"}function eg(e){return!e.archived&&["permission-blocked","permission","waiting-input","waiting_input"].includes(e.status??"")}function DA(e,t="all"){return t==="confirmation"?eg(e):t==="working"?!e.archived&&!Qi(e)&&!eg(e)&&(_s(e)||!["exited","stopped"].includes(e.status??"")&&rs(e)):t==="all"?!0:t==="failed"?e.status==="failed":t==="finished"?e.status==="exited"||e.status==="stopped":e.archived?!1:t==="active"?P0(e):t==="running"?!Qi(e)&&e.status!=="exited"&&e.status!=="stopped"&&rs(e):t==="attention"?Qi(e):t==="approval"?e.status==="permission-blocked":t==="waiting"?e.status==="waiting-input"||e.status==="waiting_input":t==="queued"?_s(e):!rs(e)&&!Qi(e)&&!_s(e)&&(e.status==="idle"||e.status==="running")}var AA=[{value:"all",label:"\u5168\u90E8\u72B6\u6001"},{value:"backlog",label:"\u5F85\u7ACB\u9879"},{value:"todo",label:"\u7B49\u5F85\u8BA4\u9886"},{value:"doing",label:"\u6267\u884C\u4E2D"},{value:"review",label:"\u5F85\u9A8C\u6536"},{value:"ready",label:"\u5F85\u5F52\u6863"},{value:"archived",label:"\u5DF2\u5F52\u6863"},{value:"none",label:"\u672A\u5173\u8054\u4EFB\u52A1"}],U1={taskStage:"all",workspace:"all",archive:"all",activityOnly:!1,runtime:"all"};function K6(e){return AA.some(t=>t.value===e)?e:"all"}function X6(e){return+(e.taskStage!=="all")+ +(e.workspace!=="all")+ +(e.archive!=="all")+Number(e.runtime!==void 0&&e.runtime!=="all"||e.activityOnly)}function Q6(e){if(e==null)return"\u4EFB\u52A1\u72B6\u6001\u672A\u77E5";let t=G6(e)?V6(e):e;return AA.find(r=>r.value===t)?.label??"\u4EFB\u52A1\u72B6\u6001\u672A\u77E5"}function Y6(e){return e.task?G6(e.task.boardTaskStatus)?V6(e.task.boardTaskStatus):void 0:e.session.workspaceTaskId?void 0:"none"}function oye(e){if(!e.group.workspaceId.startsWith("system-calls:"))return e.group.synthetic||e.group.global||e.group.workspaceId==="wand-global"?"none":`id:${e.group.workspaceId}`}function BA(e,t){return(t.taskStage==="all"||Y6(e)===t.taskStage)&&(t.workspace==="all"||oye(e)===t.workspace)}function IA(e){let t=new Map;for(let r of e)!r.synthetic&&!r.global&&r.workspaceId!=="wand-global"&&t.set(`id:${r.workspaceId}`,r.workspaceName);return[{value:"all",label:"\u5168\u90E8\u5DE5\u4F5C\u533A"},{value:"none",label:"\u672A\u5206\u914D\u5DE5\u4F5C\u533A"},...Array.from(t,([r,n])=>({value:r,label:n}))]}function MA(e,t){return[iye(e.runtime??(e.activityOnly?"active":"all")),e.taskStage==="all"?"":`\u4EFB\u52A1\u9636\u6BB5\uFF1A${Q6(e.taskStage)}`,t.find(r=>r.value===e.workspace)?.label??"\u5DE5\u4F5C\u533A\u4E0D\u53EF\u7528",e.archive==="all"?"":e.archive==="archived"?"\u4F1A\u8BDD\u5DF2\u5F52\u6863":"\u4F1A\u8BDD\u672A\u5F52\u6863",e.activityOnly&&e.runtime!=="active"?"\u4EC5\u6D3B\u52A8":""].filter(Boolean).join(" \xB7 ")}var sye=A(_(),1),VU="wand-conversations-local-owner-v1";function J6(e){return e==="active"||e==="archived"?e:"all"}function lye(){let e={};try{let t=JSON.parse(localStorage.getItem(VU)??"{}");t&&typeof t=="object"&&!Array.isArray(t)&&(e=t)}catch{}return{mode:e.mode==="tasks"?"tasks":"chats",active:e.active??null,selectedId:typeof e.selectedId=="string"?e.selectedId:"",directory:!1,listFilter:J6(e.listFilter),activityOnly:e.activityOnly===!0,listRuntime:zs(e.listRuntime??(e.activityOnly?"active":"all")),lastCapsuleRuntime:zs(e.lastCapsuleRuntime??e.listRuntime)==="all"?"working":zs(e.lastCapsuleRuntime??e.listRuntime),lastCapsuleWorkspace:typeof(e.lastCapsuleWorkspace??e.listWorkspace)=="string"?e.lastCapsuleWorkspace??e.listWorkspace:"",listTaskStage:K6(e.listTaskStage),listWorkspace:typeof e.listWorkspace=="string"&&(e.listWorkspace==="none"||e.listWorkspace.startsWith("id:"))?e.listWorkspace:"all",targets:e.targets??{},filters:e.filters??{},scrolls:e.scrolls??{},focusRequest:null}}function GU(e){let t=new URLSearchParams(hn());if(!Ou())return e;let r=t.get("view"),n=t.get("conversation")??"",a=t.get("conversationTask")??"",o=t.get("conversationRun"),l=zs(t.get("chatRuntime")??(t.get("chatActivity")==="true"?"active":"all")),u=t.get("chatWorkspace")??"all";return{...e,mode:t.get("sidebar")==="tasks"?"tasks":t.get("sidebar")==="chats"||r==="chats"||r==="contacts"?"chats":"tasks",active:r==="chats"||r==="contacts",directory:r==="contacts",selectedId:n,listRuntime:l,lastCapsuleRuntime:l==="all"?e.lastCapsuleRuntime:l,lastCapsuleWorkspace:u==="all"?e.lastCapsuleWorkspace:u,listTaskStage:K6(t.get("chatTaskStage")),listWorkspace:t.get("chatWorkspace")??"all",listFilter:J6(t.get("chatFilter")),activityOnly:t.get("chatActivity")==="true",filters:{"list-query":t.get("chatQuery")??"",...n?{[n]:a}:{}},targets:n?{[n]:a&&o?{taskId:a,runId:o}:null}:{},focusRequest:e.selectedId===n?e.focusRequest:null}}var ur=GU(lye()),qf=0,Z6=new Set;function So(e){ur={...ur,...e};try{localStorage.setItem(VU,JSON.stringify({...ur,directory:!1,focusRequest:null}))}catch{}let t={};"mode"in e&&(t.sidebar=ur.mode),("active"in e||"directory"in e||"selectedId"in e)&&(t.view=ur.directory?"contacts":ur.active?"chats":"workspace",t.sidebar=ur.mode,t.conversation=ur.selectedId),"listRuntime"in e&&(t.chatRuntime=ur.listRuntime==="all"?null:ur.listRuntime),"listTaskStage"in e&&(t.chatTaskStage=ur.listTaskStage==="all"?null:ur.listTaskStage),"listWorkspace"in e&&(t.chatWorkspace=ur.listWorkspace==="all"?null:ur.listWorkspace),"listFilter"in e&&(t.chatFilter=ur.listFilter==="all"?null:ur.listFilter),"activityOnly"in e&&(t.chatActivity=ur.activityOnly?"true":null),"filters"in e&&(t.chatQuery=ur.filters["list-query"]??"",t.conversationTask=ur.filters[ur.selectedId]??""),"targets"in e&&(t.conversationTask=ur.targets[ur.selectedId]?.taskId??"",t.conversationRun=ur.targets[ur.selectedId]?.runId??"");let r="selectedId"in e||"active"in e||"directory"in e;!r&&Object.keys(e).every(n=>n==="filters")?M$(t):Qn(t,r?"push":"replace");for(let n of Z6)n()}yi(()=>{let e=GU(ur);(e.selectedId!==ur.selectedId||e.active!==ur.active)&&++qf,ur=e;for(let t of Z6)t()});var Ir={subscribe:e=>(Z6.add(e),()=>{Z6.delete(e)}),getSnapshot:()=>ur,selectionRevision:()=>qf,select:(e,t=!1)=>{let r=++qf;So({selectedId:e,active:!0,directory:!1,focusRequest:t?{id:e,revision:r}:null})},openTask:(e,t,r)=>{++qf,So({selectedId:e,active:!0,directory:!1,focusRequest:null,filters:{...ur.filters,[e]:t},targets:{...ur.targets,[e]:r?{taskId:t,runId:r}:null}})},consumeFocus:e=>{ur.focusRequest?.revision===e&&So({focusRequest:null})},show:()=>{++qf,So({active:!0,directory:!1,focusRequest:null})},suspend:()=>{++qf,So({active:!1,directory:!1,focusRequest:null})},directory:e=>{++qf,So({directory:e,active:e?!0:ur.active,focusRequest:null})},mode:e=>So({mode:e,active:e==="chats",directory:!1,focusRequest:null}),listFilter:e=>So({listFilter:J6(e)}),activityOnly:e=>So({activityOnly:e,listRuntime:e?"active":"all"}),listFacets:e=>{let t=zs(e.runtime==="active"&&!e.activityOnly?"all":e.activityOnly&&(!e.runtime||e.runtime==="all")?"active":e.runtime);So({listTaskStage:e.taskStage,listWorkspace:e.workspace,listFilter:J6(e.archive),activityOnly:e.activityOnly,listRuntime:t,...t!=="all"?{lastCapsuleRuntime:t}:{},...e.workspace!=="all"?{lastCapsuleWorkspace:e.workspace}:{}})},target:(e,t)=>So({targets:{...ur.targets,[e]:t}}),filter:(e,t)=>So({filters:{...ur.filters,[e]:t}}),scroll:(e,t)=>So({scrolls:{...ur.scrolls,[e]:t}})};function Wf(){return sye.useSyncExternalStore(Ir.subscribe,Ir.getSnapshot,Ir.getSnapshot)}function uye(e,t,r=!1){return`conversation-draft:${typeof location>"u"?"server":location.origin}:local-owner:${e||"unselected"}:${r?"dispatch":t?`${t.taskId}:${t.runId}`:"talk"}`}var cye="wand-model-group/",dye="wand-auto-assign/auto",V1="wand-openrouter-free",Pd=`${V1}/auto`,KU="wand-decision/laya";function Rd(e){return e?.startsWith(cye)===!0}function Xu(e){return e?.trim()===dye}function TA(e){return e?.startsWith(`${V1}/`)===!0}function pye(e){return e===KU}var Od="\u514D\u8D39\u5206\u7EC4",eV="opencode-free",fye="\u514D\u8D39\u5206\u7EC4";function mye(e){return/^opencode\/[a-z0-9][a-z0-9._-]*$/.test(e)&&e!=="opencode/default"&&e!=="opencode/auto"}function hye(e){return e.id===eV&&e.provider==="opencode"}var tg="\u667A\u80FD\u5206\u914D",NA="openrouter-free";function gye(e){return e.id===NA&&e.provider==="pi"||hye(e)}var eE=32,_A=32,vye=/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/;function bye(e){if(!Array.isArray(e)||e.length>eE*Iu.length+2)throw new Error("\u6A21\u578B\u5206\u7EC4\u5FC5\u987B\u662F\u6709\u754C\u6570\u7EC4\u3002");let t=new Set,r=new Set,n=new Map;return e.map(a=>{if(!a||typeof a!="object"||Array.isArray(a))throw new Error("\u6A21\u578B\u5206\u7EC4\u683C\u5F0F\u65E0\u6548\u3002");let o=a,l=typeof o.id=="string"?o.id.trim():"",u=typeof o.name=="string"?o.name.trim():"";if(!vye.test(l)||!G7(o.provider))throw new Error("\u6A21\u578B\u5206\u7EC4\u6807\u8BC6\u6216\u5DE5\u5177\u65E0\u6548\u3002");let d=o.provider;if(!u||u.length>40||/[\x00-\x1f\x7f]/.test(u))throw new Error("\u5206\u7EC4\u540D\u79F0\u9700\u4E3A 1\u201340 \u4E2A\u5B57\u7B26\u3002");let p=l===NA,h=l===eV,v=p||h;if(p&&(d!=="pi"||u!==Od)||h&&(d!=="opencode"||u!==fye))throw new Error("\u514D\u8D39\u5206\u7EC4\u7684\u5DE5\u5177\u4E0E\u540D\u79F0\u4E0D\u53EF\u4FEE\u6539\u3002");if(!v&&d==="pi"&&u===Od)throw new Error("\u514D\u8D39\u5206\u7EC4\u662F\u5185\u7F6E\u5206\u7EC4\uFF0C\u8BF7\u76F4\u63A5\u8C03\u6574\u5B83\u7684\u987A\u5E8F\u3002");let g=`${d}/${l}`,b=`${d}/${u}`;if(t.has(g)||r.has(b))throw new Error("\u540C\u4E00\u5DE5\u5177\u7684\u5206\u7EC4\u6807\u8BC6\u6216\u540D\u79F0\u4E0D\u80FD\u91CD\u590D\u3002");t.add(g),r.add(b);let x=(n.get(d)??0)+(v?0:1);if(x>eE)throw new Error(`\u6BCF\u4E2A\u5DE5\u5177\u6700\u591A ${eE} \u4E2A\u5206\u7EC4\u3002`);if(n.set(d,x),!Array.isArray(o.models)||!v&&!o.models.length||o.models.length>(v?128:_A))throw new Error(`\u5206\u7EC4\u9700\u5305\u542B 1\u2013${_A} \u4E2A\u6A21\u578B\uFF1B\u514D\u8D39\u5206\u7EC4\u53EF\u7559\u7A7A\u4F7F\u7528\u81EA\u52A8\u987A\u5E8F\u3002`);let y=o.models.map(E=>{let F=typeof E=="string"?E.trim():"";if(!F||F==="default"||F.length>256||/[\s\x00-\x1f\x7f]/.test(F)||Rd(F)||Xu(F)||F===Pd||F.startsWith("-"))throw new Error("\u7EC4\u5185\u5FC5\u987B\u662F\u5177\u4F53\u6A21\u578B ID\uFF0C\u4E0D\u80FD\u5D4C\u5957\u5206\u7EC4\u6216\u4F7F\u7528\u9ED8\u8BA4\u503C\u3002");if(TA(F)&&d!=="pi")throw new Error("\u514D\u8D39\u6A21\u578B\u4EC5\u5C5E\u4E8E Pi\u3002");if(p&&!F.startsWith(`${V1}/`)||h&&!mye(F))throw new Error("\u514D\u8D39\u5206\u7EC4\u53EA\u80FD\u5305\u542B\u5BF9\u5E94\u514D\u8D39\u6C60\u4E2D\u7684\u6A21\u578B\u3002");return F});if(new Set(y).size!==y.length)throw new Error("\u540C\u4E00\u5206\u7EC4\u4E2D\u7684\u6A21\u578B\u4E0D\u80FD\u91CD\u590D\u3002");return{id:l,provider:d,name:u,models:y}})}function yye(e,t){let r=new Set(e);return[...new Set([...t.filter(n=>r.has(n)),...e])]}var Uf="default";function XU(e){if(!Array.isArray(e))return[];let t=[];for(let r of e){if(!r||typeof r!="object")continue;let n=r,a=typeof n.effort=="string"?n.effort.trim().toLowerCase():"";if(!/^[a-z][a-z0-9_-]{0,31}$/.test(a))continue;let o=typeof n.description=="string"?n.description.trim():"";t.push(o?{effort:a,description:o}:{effort:a})}return t}function wye(e){let t=typeof e.id=="string"?e.id.trim():"";if(!t)return null;let r=typeof e.label=="string"&&e.label.trim()?e.label.trim():t;return{value:t,label:r,...typeof e.group=="string"&&e.group?{group:e.group}:{}}}var QU=[["claude","models","defaultModel"],["codex","codexModels","defaultCodexModel"],["opencode","opencodeModels","defaultOpenCodeModel"],["grok","grokModels","defaultGrokModel"],["qoder","qoderModels","defaultQoderModel"],["pi","piModels","defaultPiModel"]];function tV(e){let t=e&&typeof e=="object"?e:{},r=t.defaultModels&&typeof t.defaultModels=="object"?t.defaultModels:{},n={},a={},o={};for(let[d,p,h]of QU){let v=Array.isArray(t[p])?t[p]:[],g=v.map(wye).filter(y=>y!==null),b=(typeof r[d]=="string"?r[d]:typeof t[h]=="string"?t[h]:"").trim();b&&(a[d]=b),g.some(y=>y.value===Uf)||g.unshift({value:Uf,label:b?`\u8DDF\u968F\u670D\u52A1\u7AEF\u9ED8\u8BA4\uFF08${b===Pd?Od:Rd(b)?g.find(y=>y.value===b)?.label||"\u6A21\u578B\u5206\u7EC4":Xu(b)?g.find(y=>y.value===b)?.label||tg:b}\uFF09`:"\u8DDF\u968F\u670D\u52A1\u7AEF\u9ED8\u8BA4"}),n[d]=g;let x={};for(let y of v){let E=typeof y.id=="string"?y.id.trim():"",F=XU(y.reasoningEfforts);if(!E||!F.length)continue;let S=typeof y.defaultReasoningEffort=="string"?y.defaultReasoningEffort.trim():"";x[E]=S?{efforts:F,defaultEffort:S}:{efforts:F}}Object.keys(x).length&&(o[d]=x)}let l=t.thinkingEfforts&&typeof t.thinkingEfforts=="object"?t.thinkingEfforts:{},u={};for(let[d]of QU){let p=XU(l[d]);p.length&&(u[d]=p)}return{byProvider:n,defaultModels:a,effortsByProvider:u,modelEfforts:o,refreshedAt:typeof t.refreshedAt=="string"?t.refreshedAt:""}}function YU(e,t){return!e||!t?[]:e.byProvider[t]??[]}var xye=/^跟随.*默认$/,Eye=/\s*[((][^(())]*默认[^(())]*[))]\s*$/;function kye(e,t,r){let n=(r??"").trim(),a=u=>u===Pd?Od:Rd(u)||Xu(u)?YU(e,t).find(d=>d.value===u)?.label||(Xu(u)?tg:"\u6A21\u578B\u5206\u7EC4"):u;if(n&&n!==Uf)return a(n);let o=e?.defaultModels?.[t??""]?.trim();if(o)return a(o);let l=(YU(e,t).find(u=>u.value===Uf)?.label.trim()??"").replace(Eye,"").trim();return xye.test(l)?"":l}function Cye(e,t,r){if(!e)return{efforts:[]};let n=e.modelEfforts[t],a=r?n?.[r]:void 0,o=n?.[Uf],l=a?.efforts.length?a:o;return l?.efforts.length?l:{efforts:e.effortsByProvider[t]??[]}}function Sye(e,t){let r=e?.byProvider[t];return r&&r.length>0?r:[{value:Uf,label:"\u8DDF\u968F\u670D\u52A1\u7AEF\u9ED8\u8BA4"}]}var Fye=6e4,$ye=6e4,G1=null,rV=0,JU=0,jA=new Set;function Dye(e){return jA.add(e),()=>{jA.delete(e)}}function ZU(e){return JSON.stringify({refreshedAt:e.refreshedAt,byProvider:e.byProvider,defaultModels:e.defaultModels,effortsByProvider:e.effortsByProvider,modelEfforts:e.modelEfforts})}function rg(e){let t=tV(e),r=G1!==null&&ZU(G1)===ZU(t);if(G1=t,rV=Date.now(),r)return t;for(let n of jA)n(t);return typeof window<"u"&&window.dispatchEvent(new CustomEvent("wand-model-catalog",{detail:e})),t}function PA(){typeof window>"u"||JU||(JU=window.setInterval(()=>{mt("/api/models",{credentials:"same-origin"}).then(e=>{rg(e)}).catch(()=>{})},Fye))}function nV(){return G1&&Date.now()-rV<$ye?G1:null}async function Aye(e){return nV()||rg(await mt("/api/models",{signal:e,credentials:"same-origin"}))}var aV={claude:{standard:"low",deep:"medium",max:"max"},codex:{standard:"low",deep:"medium",max:"xhigh"},opencode:{standard:"low",deep:"high",max:"max"},grok:{standard:"low",deep:"high",max:"xhigh"},qoder:{standard:"low",deep:"high",max:"max"},pi:{standard:"low",deep:"high",max:"max"}},Bye={auto:"\u81EA\u52A8",none:"\u5173\u95ED",minimal:"\u6700\u4F4E",low:"\u4F4E",medium:"\u4E2D",high:"\u9AD8",xhigh:"\u8D85\u9AD8",max:"\u6781\u9AD8",ultra:"\u6781\u9650",ultracode:"\u6781\u9650\u4EE3\u7801"};function Iye(e,t){let r=aV[e];return r?.standard===t?"standard":r?.deep===t?"deep":r?.max===t?"max":`${e}:${t}`}function tE(e){return Bye[e]??e}function Mye(e,t){if(!t||t==="off")return"\u81EA\u52A8";let r=t.includes(":")?t.slice(t.indexOf(":")+1):aV[e]?.[t]??t;return tE(r)}function RA(e,t,r){if(!t.map(l=>l.effort.trim().toLowerCase()).filter(l=>/^[a-z][a-z0-9_-]{0,31}$/.test(l)).length)return null;let n=t.map(l=>({effort:l.effort.trim().toLowerCase(),description:l.description?.trim()||""})).filter(l=>/^[a-z][a-z0-9_-]{0,31}$/.test(l.effort)&&l.effort!=="off");if(!n.length)return[{id:"off",label:"auto",hint:"\u8FD9\u4E2A\u6A21\u578B\u4E0D\u80FD\u8C03\u601D\u8003\u6DF1\u5EA6"}];let a=[{id:"off",label:"auto",hint:r?`\u4F7F\u7528\u6A21\u578B\u9ED8\u8BA4\u6863\u4F4D\uFF08${r}\uFF09`:"\u4F7F\u7528\u6A21\u578B\u9ED8\u8BA4\u6863\u4F4D"}],o=new Set(["off"]);for(let l of n){let u=Iye(e,l.effort);o.has(u)||(o.add(u),a.push({id:u,label:l.effort,hint:l.description||l.effort}))}return a}var zd=null,oi={open:!1,dismissable:!0,initialPath:"",revision:0},rE=new Set;function iV(e,t=oi.initialPath){oi={open:e,dismissable:!0,initialPath:t,revision:oi.revision+1};for(let r of rE)r()}function Tye(e){if(!(!oi.open||oi.dismissable===e)){oi={...oi,dismissable:e};for(let t of rE)t()}}var Ld={open(e){if(!zd)return!1;let t=(e??zd.getInitialPath()).trim();return t?(zd.onOpen?.(),iV(!0,t),!0):!1},close(){oi.open&&(iV(!1),zd?.onClose?.())},closeIfOpen(){return!oi.open||!oi.dismissable?!1:(this.close(),!0)},closeTopmost(){return oi.open?(oi.dismissable&&this.close(),!0):!1},isOpen(){return oi.open},setDismissable(e){Tye(e)},async choose(e){let t=e.trim(),r=zd;return!oi.open||!r||!t?!1:(await r.applySelection(t),this.close(),!0)}},OA={subscribe(e){return rE.add(e),()=>rE.delete(e)},getSnapshot(){return oi}};function zA(e){return zd=e,()=>{zd===e&&(oi.open&&Ld.close(),zd=null)}}var _ye=e=>{let{checkboxCls:t,checkboxSize:r,lineWidth:n}=e,a=`${t}-wrapper`,o="@media (hover: hover) and (pointer: fine)";return[{[`${t}-group`]:{...Mt(e),display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[a]:{...Mt(e),display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${a}`]:{marginInlineStart:0}},[t]:{...Mt(e),position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",boxSizing:"border-box",display:"block",width:r,height:r,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${ue(n)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,flex:"none",...qo(),"&:after":{boxSizing:"border-box",position:"absolute",top:`calc(${r} / 2 - ${n})`,insetInlineStart:`calc(${r} / 4 - ${n})`,display:"table",width:e.calc(r).div(14).mul(5).equal(),height:e.calc(r).div(14).mul(8).equal(),border:`${ue(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`,...Kh()},[`${t}-input`]:{position:"absolute",inset:`calc(-1 * (${n}))`,zIndex:1,cursor:"pointer",opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:gi(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[o]:{[`
210
+ ${a}:not(${a}-disabled),
211
+ ${t}:not(${t}-disabled)
212
+ `]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${a}:not(${a}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...Kh()},[o]:{[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'},[o]:{[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}}},{[`${a}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function oV(e,t){let r=vt(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return _ye(r)}var nE=ct("Checkbox",(e,{prefixCls:t})=>[oV(t,e)]);var sV=A(_()),aE=A(_());function LA(){return LA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},LA.apply(this,arguments)}var jye=(0,aE.forwardRef)((e,t)=>{let{prefixCls:r="rc-checkbox",className:n,style:a,checked:o,disabled:l,defaultChecked:u=!1,type:d="checkbox",title:p,onChange:h,...v}=e,g=(0,aE.useRef)(null),b=(0,aE.useRef)(null),[x,y]=qt(u,o);(0,aE.useImperativeHandle)(t,()=>({focus:S=>{g.current?.focus(S)},blur:()=>{g.current?.blur()},input:g.current,nativeElement:b.current}));let E=Y(r,n,{[`${r}-checked`]:x,[`${r}-disabled`]:l}),F=S=>{l||("checked"in e||y(S.target.checked),h?.({target:{...e,type:d,checked:S.target.checked},stopPropagation(){S.stopPropagation()},preventDefault(){S.preventDefault()},nativeEvent:S.nativeEvent}))};return sV.createElement("span",{className:E,title:p,style:a,ref:b},sV.createElement("input",LA({},v,{className:`${r}-input`,ref:g,onChange:F,disabled:l,checked:!!x,type:d})))}),HA=jye,Nye=A(_());function qA(e){let t=Nye.default.useRef(null),r=()=>{br.cancel(t.current),t.current=null};return[()=>{r(),t.current=br(()=>{t.current=null})},n=>{t.current&&(n.stopPropagation(),r()),e?.(n)}]}var Ls=A(_()),Pye=A(_()),Rye=Pye.default.createContext(null),lV=Rye,Oye=(e,t)=>{let{prefixCls:r,children:n,indeterminate:a=!1,onMouseEnter:o,onMouseLeave:l,skipGroup:u=!1,disabled:d,rootClassName:p,className:h,style:v,classNames:g,styles:b,name:x,value:y,checked:E,defaultChecked:F,onChange:S,...D}=e,{getPrefixCls:$,direction:C,className:B,style:M,classNames:I,styles:j}=wt("checkbox"),N=Ls.useContext(lV),{isFormItemInput:R}=Ls.useContext(go),L=Ls.useContext(Ia),q=d??N?.disabled??L,[W,U]=qt(F,E),P=W,H=xt(De=>{U(De.target.checked),S?.(De),!u&&N?.toggleOption&&N.toggleOption({label:n,value:y})});N&&!u&&(P=N.value.includes(y));let V=Ls.useRef(null),Q=Qa(t,V);Ls.useEffect(()=>{if(!(u||!N))return N.registerValue(y),()=>{N.cancelValue(y)}},[y,u]),Ls.useEffect(()=>{V.current?.input&&(V.current.input.indeterminate=a)},[a]);let X=$("checkbox",r),Z=xn(X),[O,z]=nE(X,Z),K={...D},J={...e,indeterminate:a,disabled:q,checked:P},te=Ue(M),ee=Ue(v),[ie,me]=Et([I,g],[j,te,b,ee],{props:J}),le=Y(`${X}-wrapper`,{[`${X}-rtl`]:C==="rtl",[`${X}-wrapper-checked`]:P,[`${X}-wrapper-disabled`]:q,[`${X}-wrapper-in-form-item`]:R},B,h,ie.root,p,z,Z,O),he=Y(ie.icon,{[`${X}-indeterminate`]:a},Cb,O),[se,ke]=qA(K.onClick);return Ls.createElement(od,{component:"Checkbox",disabled:q},Ls.createElement("label",{className:le,style:me.root,onMouseEnter:o,onMouseLeave:l,onClick:se},Ls.createElement(HA,{...K,name:!u&&N?N.name:x,checked:P,onClick:ke,onChange:H,prefixCls:X,className:he,style:me.icon,disabled:q,ref:Q,value:y}),Lt(n)&&Ls.createElement("span",{className:Y(`${X}-label`,ie.label),style:me.label},n)))},zye=Ls.forwardRef(Oye),uV=zye,Hd=A(_()),Lye=Hd.forwardRef((e,t)=>{let{defaultValue:r,children:n,options:a=[],prefixCls:o,className:l,rootClassName:u,style:d,onChange:p,role:h="group",...v}=e,{getPrefixCls:g,direction:b}=Hd.useContext(st),[x,y]=qt(r||[],v.value),E=x||[],[F,S]=Hd.useState([]),D=Hd.useMemo(()=>a.map(P=>Ja(P)||Gn(P)?{label:P,value:P}:P).filter(P=>Lr(P)&&Lr(P.value)),[a]),$=P=>{S(H=>H.filter(V=>V!==P))},C=P=>{S(H=>[].concat(en(H),[P]))},B=P=>{let H=E.indexOf(P.value),V=en(E);H===-1?V.push(P.value):V.splice(H,1),y(V),p?.(V.filter(Q=>F.includes(Q)).sort((Q,X)=>{let Z=D.findIndex(z=>z.value===Q),O=D.findIndex(z=>z.value===X);return Z-O}))},M=g("checkbox",o),I=`${M}-group`,j=xn(M),[N,R]=nE(M,j),L=Vt(v,["value","disabled"]),q=Array.isArray(D)&&D.length>0?D.map(P=>Hd.createElement(uV,{prefixCls:M,key:P.value.toString(),disabled:"disabled"in P?P.disabled:v.disabled,value:P.value,checked:E.includes(P.value),onChange:P.onChange,className:Y(`${I}-item`,P.className),style:P.style,title:P.title,id:P.id,required:P.required},P.label)):n,W=Hd.useMemo(()=>({toggleOption:B,value:E,disabled:v.disabled,name:v.name,registerValue:C,cancelValue:$}),[B,E,v.disabled,v.name,C,$]),U=Y(I,{[`${I}-rtl`]:b==="rtl"},l,u,R,j,N);return Hd.createElement("div",{className:U,style:d,role:h,...L,ref:t},Hd.createElement(lV.Provider,{value:W},q))}),Hye=Lye,WA=uV;WA.Group=Hye;WA.__ANT_CHECKBOX=!0;var UA=WA;var jl=A(_()),Vf=A(_()),iE=A(_()),ng=void 0;function qye(e,t){let{prefixCls:r,invalidate:n,item:a,renderItem:o,responsive:l,responsiveDisabled:u,registerSize:d,itemKey:p,className:h,style:v,children:g,display:b,order:x,component:y="div",...E}=e,F=l&&!b;function S(M){d(p,M)}iE.useEffect(()=>()=>{S(null)},[]);let D=o&&a!==ng?o(a,{index:x}):g,$;n||($={opacity:F?0:1,height:F?0:ng,overflowY:F?"hidden":ng,order:l?x:ng,pointerEvents:F?"none":ng,position:F?"absolute":ng});let C={};F&&(C["aria-hidden"]=!0);let B=iE.createElement(y,_n({className:Y(!n&&r,h),style:{...$,...v}},C,E,{ref:t}),D);return l&&(B=iE.createElement(Ba,{onResize:({offsetWidth:M})=>{S(M)},disabled:u},B)),B}var Wye=iE.forwardRef(qye),K1=Wye,cV=A(_()),Uye=A(er());function Vye(e){if(typeof MessageChannel>"u")br(e);else{let t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function Gye(){let e=cV.useRef(null);return t=>{e.current||(e.current=[],Vye(()=>{(0,Uye.unstable_batchedUpdates)(()=>{e.current.forEach(r=>{r()}),e.current=null})})),e.current.push(t)}}function ag(e,t){let[r,n]=cV.useState(t),a=xt(o=>{e(()=>{n(o)})});return[r,a]}var X1=A(_()),Kye=A(_()),oE=Kye.default.createContext(null),Xye=(e,t)=>{let r=X1.useContext(oE);if(!r){let{component:u="div",...d}=e;return X1.createElement(u,_n({},d,{ref:t}))}let{className:n,...a}=r,{className:o,...l}=e;return X1.createElement(oE.Provider,{value:null},X1.createElement(K1,_n({ref:t,className:Y(n,o)},a,l)))},Qye=X1.forwardRef(Xye),Yye=Qye,dV="responsive",pV="invalidate";function Jye(e){return`+ ${e.length} ...`}function Zye(e,t){let{prefixCls:r="rc-overflow",data:n=[],renderItem:a,renderRawItem:o,itemKey:l,itemWidth:u=10,ssr:d,style:p,className:h,maxCount:v,renderRest:g,renderRawRest:b,prefix:x,suffix:y,component:E="div",itemComponent:F,onVisibleChange:S,...D}=e,$=d==="full",C=Gye(),[B,M]=ag(C,null),I=B||0,[j,N]=ag(C,new Map),[R,L]=ag(C,0),[q,W]=ag(C,0),[U,P]=ag(C,0),[H,V]=ag(C,0),[Q,X]=(0,Vf.useState)(null),[Z,O]=(0,Vf.useState)(null),z=jl.useMemo(()=>Z===null&&$?Number.MAX_SAFE_INTEGER:Z||0,[Z,B]),[K,J]=(0,Vf.useState)(!1),te=`${r}-item`,ee=Math.max(R,q),ie=v===dV,me=n.length&&ie,le=v===pV,he=me||typeof v=="number"&&n.length>v,se=(0,Vf.useMemo)(()=>{let Ae=n;return me?B===null&&$?Ae=n:Ae=n.slice(0,Math.min(n.length,I/u)):typeof v=="number"&&(Ae=n.slice(0,v)),Ae},[n,u,B,v,me]),ke=(0,Vf.useMemo)(()=>me?n.slice(z+1):n.slice(se.length),[n,se,me,z]),De=(0,Vf.useCallback)((Ae,Ne)=>typeof l=="function"?l(Ae):(l&&Ae?.[l])??Ne,[l]),we=(0,Vf.useCallback)(a||(Ae=>Ae),[a]);function de(Ae,Ne,ht){Z===Ae&&(Ne===void 0||Ne===Q)||(O(Ae),ht||(J(Ae<n.length-1),S?.(Ae)),Ne!==void 0&&X(Ne))}function be(Ae,Ne){M(Ne.clientWidth)}function ye(Ae,Ne){N(ht=>{let lt=new Map(ht);return Ne===null?lt.delete(Ae):lt.set(Ae,Ne),lt})}function Re(Ae,Ne){W(Ne),L(q)}function Fe(Ae,Ne){P(Ne)}function $e(Ae,Ne){V(Ne)}function Ie(Ae){return j.get(De(se[Ae],Ae))}sr(()=>{if(I&&typeof ee=="number"&&se){let Ae=U+H,Ne=se.length,ht=Ne-1;if(!Ne){de(0,null);return}for(let lt=0;lt<Ne;lt+=1){let Ke=Ie(lt);if($&&(Ke=Ke||0),Ke===void 0){de(lt-1,void 0,!0);break}if(Ae+=Ke,ht===0&&Ae<=I||lt===ht-1&&Ae+Ie(ht)<=I){de(ht,null);break}else if(Ae+ee>I){de(lt-1,Ae-Ke-H+q);break}}y&&Ie(0)+H>I&&X(null)}},[I,j,q,U,H,De,se]);let He=K&&!!ke.length,Oe={};Q!==null&&me&&(Oe={position:"absolute",top:0,insetInlineStart:Q});let Me={prefixCls:te,responsive:me,component:F,invalidate:le},Te=o?(Ae,Ne)=>{let ht=De(Ae,Ne);return jl.createElement(oE.Provider,{key:ht,value:{...Me,order:Ne,item:Ae,itemKey:ht,registerSize:ye,display:Ne<=z}},o(Ae,Ne))}:(Ae,Ne)=>{let ht=De(Ae,Ne);return jl.createElement(K1,_n({},Me,{order:Ne,key:ht,item:Ae,renderItem:we,itemKey:ht,registerSize:ye,display:Ne<=z}))},Xe={order:He?z:Number.MAX_SAFE_INTEGER,className:`${te}-rest`,registerSize:Re,display:He},ot=g||Jye,Ye=b?jl.createElement(oE.Provider,{value:{...Me,...Xe}},b(ke)):jl.createElement(K1,_n({},Me,Xe),typeof ot=="function"?ot(ke):ot),Ve=jl.createElement(E,_n({className:Y(!le&&r,h),style:p,ref:t},D),x&&jl.createElement(K1,_n({},Me,{responsive:ie,responsiveDisabled:!me,order:-1,className:`${te}-prefix`,registerSize:Fe,display:!0}),x),se.map(Te),he?Ye:null,y&&jl.createElement(K1,_n({},Me,{responsive:ie,responsiveDisabled:!me,order:z,className:`${te}-suffix`,registerSize:$e,display:!0,style:Oe}),y));return ie?jl.createElement(Ba,{onResize:be,disabled:!me},Ve):Ve}var sE=jl.forwardRef(Zye);sE.Item=Yye;sE.RESPONSIVE=dV;sE.INVALIDATE=pV;var ewe=sE,Gf=ewe;var Qf=A(_()),KA=A(_()),qs=KA.createContext(null);function twe(e,t){let r={...e};return Object.keys(t).forEach(n=>{let a=t[n];a!==void 0&&(r[n]=a)}),r}function Z1({children:e,locked:t,...r}){let n=KA.useContext(qs),a=$h(()=>twe(n,r),[n,r],(o,l)=>!t&&(o[0]!==l[0]||!ed(o[1],l[1],!0)));return KA.createElement(qs.Provider,{value:a},e)}var cg=A(_()),rwe=[],xV=cg.createContext(null);function fE(){return cg.useContext(xV)}var EV=cg.createContext(rwe);function Wd(e){let t=cg.useContext(EV);return cg.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}var kV=cg.createContext(null),fV=A(_());function i9(e,t){return Er(e).map((r,n)=>{if(fV.isValidElement(r)){let{key:a}=r,o=r.props?.eventKey??a;return o==null&&(o=`tmp_key-${[...t,n].join("-")}`),fV.cloneElement(r,{key:o,eventKey:o})}return r})}function cE(){return cE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cE.apply(this,arguments)}var nwe=Qf.forwardRef((e,t)=>{let{className:r,title:n,eventKey:a,children:o,...l}=e,{prefixCls:u,classNames:d,styles:p}=Qf.useContext(qs),h=`${u}-item-group`;return Qf.createElement("li",cE({ref:t,role:"presentation"},l,{onClick:v=>v.stopPropagation(),className:Y(h,r)}),Qf.createElement("div",{role:"presentation",className:Y(`${h}-title`,d?.listTitle),style:p?.listTitle,title:typeof n=="string"?n:void 0},n),Qf.createElement("ul",{role:"group",className:Y(`${h}-list`,d?.list),style:p?.list},o))}),awe=Qf.forwardRef((e,t)=>{let{eventKey:r,children:n}=e,a=Wd(r),o=i9(n,a);return fE()?o:Qf.createElement(nwe,cE({ref:t},Vt(e,["warnKey"])),o)}),ry=awe,Ur=A(_()),iwe=A(_()),owe=A(er()),CV=A(_()),SV=CV.createContext(null);function FV(e,t){return`${e}-${t}`}function $V(e){let t=CV.useContext(SV);return FV(t,e)}var swe=A(_()),lwe=swe.createContext({}),o9=lwe,VA=A(_()),{LEFT:XA,RIGHT:QA,UP:YA,DOWN:lE,ENTER:uE,ESC:DV,HOME:Q1,END:Y1}=yn,mV=[YA,lE,XA,QA];function uwe(e,t,r,n){let a="prev",o="next",l="children",u="parent";if(e==="inline"&&n===uE)return{inlineTrigger:!0};let d={[YA]:a,[lE]:o},p={[XA]:r?o:a,[QA]:r?a:o,[lE]:l,[uE]:l},h={[YA]:a,[lE]:o,[uE]:l,[DV]:u,[XA]:r?l:u,[QA]:r?u:l};switch({inline:d,horizontal:p,vertical:h,inlineSub:d,horizontalSub:h,verticalSub:h}[`${e}${t?"":"Sub"}`]?.[n]){case a:return{offset:-1,sibling:!0};case o:return{offset:1,sibling:!0};case u:return{offset:-1,sibling:!1};case l:return{offset:1,sibling:!1};default:return null}}function cwe(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function dwe(e,t){let r=e||document.activeElement;for(;r;){if(t.has(r))return r;r=r.parentElement}return null}function s9(e,t){return nb(e,!0).filter(r=>t.has(r))}function hV(e,t,r,n=1){if(!e)return null;let a=s9(e,t),o=a.length,l=a.findIndex(u=>r===u);return n<0?l===-1?l=o-1:l-=1:n>0&&(l+=1),l=(l+o)%o,a[l]}var dE=(e,t)=>{let r=new Set,n=new Map,a=new Map;return e.forEach(o=>{let l=document.querySelector(`[data-menu-id='${FV(t,o)}']`);l&&(r.add(l),a.set(l,o),n.set(o,l))}),{elements:r,key2element:n,element2key:a}};function pwe(e,t,r,n,a,o,l,u,d,p){let h=VA.useRef(void 0),v=VA.useRef(void 0);v.current=t;let g=()=>{br.cancel(h.current)};return VA.useEffect(()=>()=>{g()},[]),b=>{let{which:x}=b;if([...mV,uE,DV,Q1,Y1].includes(x)){let y=o(),E=dE(y,n),{elements:F,key2element:S,element2key:D}=E,$=S.get(t),C=dwe($,F),B=D.get(C),M=uwe(e,l(B,!0).length===1,r,x);if(!M&&x!==Q1&&x!==Y1)return;(mV.includes(x)||[Q1,Y1].includes(x))&&b.preventDefault();let I=j=>{if(j){let N=j,R=j.querySelector("a");R?.getAttribute("href")&&(N=R);let L=D.get(j);u(L),g(),h.current=br(()=>{v.current===L&&N.focus()})}};if([Q1,Y1].includes(x)||M.sibling||!C){let j;!C||e==="inline"?j=a.current:j=cwe(C);let N,R=s9(j,F);x===Q1?N=R[0]:x===Y1?N=R[R.length-1]:N=hV(j,F,C,M.offset),I(N)}else if(M.inlineTrigger)d(B);else if(M.offset>0)d(B,!0),g(),h.current=br(()=>{E=dE(y,n);let j=C.getAttribute("aria-controls"),N=document.getElementById(j),R=hV(N,E.elements);I(R)},5);else if(M.offset<0){let j=l(B,!0),N=j[j.length-2],R=S.get(N);d(N,!1),I(R)}}p?.(b)}}var GA=A(_()),Nl=A(_());function fwe(e){Promise.resolve().then(e)}var l9="__RC_UTIL_PATH_SPLIT__",gV=e=>e.join(l9),mwe=e=>e.split(l9),JA="rc-menu-more";function hwe(){let[,e]=GA.useState({}),t=(0,Nl.useRef)(new Map),r=(0,Nl.useRef)(new Map),[n,a]=GA.useState([]),o=(0,Nl.useRef)(0),l=(0,Nl.useRef)(!1),u=()=>{l.current||e({})},d=(0,Nl.useCallback)((y,E)=>{let F=gV(E);r.current.set(F,y),t.current.set(y,F),o.current+=1;let S=o.current;fwe(()=>{S===o.current&&u()})},[]),p=(0,Nl.useCallback)((y,E)=>{let F=gV(E);r.current.delete(F),t.current.delete(y)},[]),h=(0,Nl.useCallback)(y=>{a(y)},[]),v=(0,Nl.useCallback)((y,E)=>{let F=t.current.get(y)||"",S=mwe(F);return E&&n.includes(S[0])&&S.unshift(JA),S},[n]),g=(0,Nl.useCallback)((y,E)=>y.filter(F=>F!==void 0).some(F=>v(F,!0).includes(E)),[v]),b=()=>{let y=[...t.current.keys()];return n.length&&y.push(JA),y},x=(0,Nl.useCallback)(y=>{let E=`${t.current.get(y)}${l9}`,F=new Set;return[...r.current.keys()].forEach(S=>{S.startsWith(E)&&F.add(r.current.get(S))}),F},[]);return GA.useEffect(()=>()=>{l.current=!0},[]),{registerPath:d,unregisterPath:p,refreshOverflowKeys:h,isSubPathKey:g,getKeyPath:v,getKeys:b,getSubPathKeys:x}}var vV=A(_());function J1(e){let t=vV.useRef(e);t.current=e;let r=vV.useCallback((...n)=>t.current?.(...n),[]);return e?r:void 0}var ss=A(_()),gwe=A(_());function AV(e,t,r,n){let{activeKey:a,onActive:o,onInactive:l}=gwe.useContext(qs),u={active:a===e};return t||(u.onMouseEnter=d=>{r?.({key:e,domEvent:d}),o(e)},u.onMouseLeave=d=>{n?.({key:e,domEvent:d}),l(e)}),u}var vwe=A(_());function BV(e){let{mode:t,rtl:r,inlineIndent:n}=vwe.useContext(qs);if(t!=="inline")return null;let a=e;return r?{paddingRight:a*n}:{paddingLeft:a*n}}var bwe=A(_());function IV({icon:e,props:t,children:r}){let n;return e===null||e===!1?null:(typeof e=="function"?n=bwe.createElement(e,{...t}):typeof e!="boolean"&&(n=e),n||r||null)}function pE({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(Da(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function ey(){return ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ey.apply(this,arguments)}var ywe=class extends ss.Component{render(){let{title:e,attribute:t,elementRef:r,...n}=this.props,a=Vt(n,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Da(!t,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),ss.createElement(Gf.Item,ey({},t,{title:typeof e=="string"?e:void 0},a,{ref:r}))}},wwe=ss.forwardRef((e,t)=>{let{style:r,className:n,eventKey:a,warnKey:o,disabled:l,itemIcon:u,children:d,itemData:p,role:h,onMouseEnter:v,onMouseLeave:g,onClick:b,onKeyDown:x,onFocus:y,...E}=e,F=$V(a),{prefixCls:S,onItemClick:D,disabled:$,overflowDisabled:C,itemIcon:B,selectedKeys:M,onActive:I}=ss.useContext(qs),{_internalRenderMenuItem:j}=ss.useContext(o9),N=`${S}-item`,R=ss.useRef(null),L=ss.useRef(null),q=$||l,W=Qa(t,L),U=Wd(a),P=ee=>{let ie=p||{key:a||"",label:d,itemIcon:u,extra:e.extra,title:e.title};return{key:a,keyPath:[...U].reverse(),item:R.current,domEvent:ee,itemData:p||ie}},H=u||B,{active:V,...Q}=AV(a,q,v,g),X=M.includes(a),Z=BV(U.length),O=ee=>{if(q)return;let ie=P(ee);b?.(pE(ie)),D(ie)},z=ee=>{if(x?.(ee),ee.which===yn.ENTER){let ie=P(ee);b?.(pE(ie)),D(ie)}},K=ee=>{I(a),y?.(ee)},J={};e.role==="option"&&(J["aria-selected"]=X);let te=ss.createElement(ywe,ey({ref:R,elementRef:W,role:h===null?"none":h||"menuitem",tabIndex:l?null:-1,"data-menu-id":C&&F?null:F},Vt(E,["extra"]),Q,J,{component:"li","aria-disabled":l,style:{...Z,...r},className:Y(N,{[`${N}-active`]:V,[`${N}-selected`]:X,[`${N}-disabled`]:q},n),onClick:O,onKeyDown:z,onFocus:K}),d,ss.createElement(IV,{props:{...e,isSelected:X},icon:H}));return j&&(te=j(te,e,{selected:X})),te});function xwe(e,t){let{eventKey:r}=e,n=fE(),a=Wd(r);return ss.useEffect(()=>{if(n)return n.registerPath(r,a),()=>{n.unregisterPath(r,a)}},[a]),n?null:ss.createElement(wwe,ey({},e,{ref:t}))}var Ud=ss.forwardRef(xwe),vn=A(_()),ZA=A(_());function e9(){return e9=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e9.apply(this,arguments)}var Ewe=({className:e,children:t,...r},n)=>{let{prefixCls:a,mode:o,rtl:l}=ZA.useContext(qs);return ZA.createElement("ul",e9({className:Y(a,l&&`${a}-rtl`,`${a}-sub`,`${a}-${o==="inline"?"inline":"vertical"}`,e),role:"menu"},r,{"data-menu-list":!0,ref:n}),t)},kwe=ZA.forwardRef(Ewe),MV=kwe,ig=A(_()),si={adjustX:1,adjustY:1},Cwe={topLeft:{points:["bl","tl"],overflow:si},topRight:{points:["br","tr"],overflow:si},bottomLeft:{points:["tl","bl"],overflow:si},bottomRight:{points:["tr","br"],overflow:si},leftTop:{points:["tr","tl"],overflow:si},leftBottom:{points:["br","bl"],overflow:si},rightTop:{points:["tl","tr"],overflow:si},rightBottom:{points:["bl","br"],overflow:si}},Swe={topLeft:{points:["bl","tl"],overflow:si},topRight:{points:["br","tr"],overflow:si},bottomLeft:{points:["tl","bl"],overflow:si},bottomRight:{points:["tr","br"],overflow:si},rightTop:{points:["tr","tl"],overflow:si},rightBottom:{points:["br","bl"],overflow:si},leftTop:{points:["tl","tr"],overflow:si},leftBottom:{points:["bl","br"],overflow:si}};function TV(e,t,r){if(t)return t;if(r)return r[e]||r.other}var Fwe={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function $we({prefixCls:e,visible:t,children:r,popup:n,popupStyle:a,popupClassName:o,popupOffset:l,disabled:u,mode:d,onVisibleChange:p}){let{getPopupContainer:h,rtl:v,subMenuOpenDelay:g,subMenuCloseDelay:b,builtinPlacements:x,triggerSubMenuAction:y,forceSubMenuRender:E,rootClassName:F,motion:S,defaultMotions:D}=ig.useContext(qs),[$,C]=ig.useState(!1),B=v?{...Swe,...x}:{...Cwe,...x},M=Fwe[d],I=TV(d,S,D),j=ig.useRef(I);d!=="inline"&&(j.current=I);let N={...j.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},R=ig.useRef(void 0);return ig.useEffect(()=>(R.current=br(()=>{C(t)}),()=>{br.cancel(R.current)}),[t]),ig.createElement(jh,{prefixCls:e,popupClassName:Y(`${e}-popup`,{[`${e}-rtl`]:v},o,F),stretch:d==="horizontal"?"minWidth":null,getPopupContainer:h,builtinPlacements:B,popupPlacement:M,popupVisible:$,popup:n,popupStyle:a,popupAlign:l&&{offset:l},action:u?[]:[y],mouseEnterDelay:g,mouseLeaveDelay:b,onPopupVisibleChange:p,forceRender:E,popupMotion:N,fresh:!0},r)}var Kf=A(_());function t9(){return t9=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t9.apply(this,arguments)}function Dwe({id:e,open:t,keyPath:r,children:n}){let a="inline",{prefixCls:o,forceSubMenuRender:l,motion:u,defaultMotions:d,mode:p}=Kf.useContext(qs),h=Kf.useRef(!1);h.current=p===a;let[v,g]=Kf.useState(!h.current),b=h.current?t:!1;Kf.useEffect(()=>{h.current&&g(!1)},[p]);let x={...TV(a,u,d)};r.length>1&&(x.motionAppear=!1);let y=x.onVisibleChanged;return x.onVisibleChanged=E=>(!h.current&&!E&&g(!0),y?.(E)),v?null:Kf.createElement(Z1,{mode:a,locked:!h.current},Kf.createElement(ra,t9({visible:b},x,{forceRender:l,removeOnLeave:!1,leavedClassName:`${o}-hidden`}),({className:E,style:F})=>Kf.createElement(MV,{id:e,className:E,style:F},n)))}function ty(){return ty=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ty.apply(this,arguments)}var Awe=vn.forwardRef((e,t)=>{let{style:r,className:n,styles:a,classNames:o,title:l,itemTitle:u,eventKey:d,warnKey:p,disabled:h,internalPopupClose:v,children:g,itemIcon:b,expandIcon:x,popupClassName:y,popupOffset:E,popupStyle:F,onClick:S,onMouseEnter:D,onMouseLeave:$,onTitleClick:C,onTitleMouseEnter:B,onTitleMouseLeave:M,popupRender:I,...j}=e,N=$V(d),{prefixCls:R,mode:L,openKeys:q,disabled:W,overflowDisabled:U,activeKey:P,selectedKeys:H,itemIcon:V,expandIcon:Q,onItemClick:X,onOpenChange:Z,onActive:O,popupRender:z}=vn.useContext(qs),{_internalRenderSubMenuItem:K}=vn.useContext(o9),{isSubPathKey:J}=vn.useContext(kV),te=Wd(),ee=`${R}-submenu`,ie=W||h,me=vn.useRef(null),le=vn.useRef(null),he=b??V,se=x??Q,ke=q.includes(d),De=!U&&ke,we=J(H,d),{active:de,...be}=AV(d,ie,B,M),[ye,Re]=vn.useState(!1),Fe=je=>{ie||Re(je)},$e=je=>{Fe(!0),D?.({key:d,domEvent:je})},Ie=je=>{Fe(!1),$?.({key:d,domEvent:je})},He=vn.useMemo(()=>de||(L!=="inline"?ye||J([P],d):!1),[L,de,P,ye,d,J]),Oe=BV(te.length),Me=je=>{ie||(C?.({key:d,domEvent:je}),L==="inline"&&Z(d,!ke))},Te=J1(je=>{S?.(pE(je)),X(je)}),Xe=je=>{L!=="inline"&&Z(d,je)},ot=()=>{O(d)},Ye=N&&`${N}-popup`,Ve=vn.useMemo(()=>vn.createElement(IV,{icon:L!=="horizontal"?se:void 0,props:{...e,isOpen:De,isSubMenu:!0}},vn.createElement("i",{className:`${ee}-arrow`})),[L,se,e,De,ee]),Ae=vn.createElement("div",ty({role:"menuitem",style:Oe,className:`${ee}-title`,tabIndex:ie?null:-1,ref:me,title:u??(typeof l=="string"?l:null),"data-menu-id":U&&N?null:N,"aria-expanded":De,"aria-haspopup":!0,"aria-controls":Ye,"aria-disabled":ie,onClick:Me,onFocus:ot},be),l,Ve),Ne=vn.useRef(L);L!=="inline"&&te.length>1?Ne.current="vertical":Ne.current=L;let ht=Ne.current,lt=vn.useMemo(()=>{let je=vn.createElement(Z1,{classNames:o,styles:a,mode:ht==="horizontal"?"vertical":ht},vn.createElement(MV,{id:Ye,ref:le},g)),nt=I||z;return nt?nt(je,{item:e,keys:te}):je},[I,z,te,Ye,g,e,ht]);if(!U){let je=Ne.current;Ae=vn.createElement($we,{mode:je,prefixCls:ee,visible:!v&&De&&L!=="inline",popupClassName:y,popupOffset:E,popupStyle:F,popup:lt,disabled:ie,onVisibleChange:Xe},Ae)}let Ke=vn.createElement(Gf.Item,ty({ref:t,role:"none"},j,{component:"li",style:r,className:Y(ee,`${ee}-${L}`,n,{[`${ee}-open`]:De,[`${ee}-active`]:He,[`${ee}-selected`]:we,[`${ee}-disabled`]:ie}),onMouseEnter:$e,onMouseLeave:Ie}),Ae,!U&&vn.createElement(Dwe,{id:Ye,open:De,keyPath:te},g));return K&&(Ke=K(Ke,e,{selected:we,active:He,open:De,disabled:ie})),vn.createElement(Z1,{classNames:o,styles:a,onItemClick:Te,mode:L==="horizontal"?"vertical":L,itemIcon:he,expandIcon:se},Ke)}),Bwe=vn.forwardRef((e,t)=>{let{eventKey:r,children:n}=e,a=Wd(r),o=i9(n,a),l=fE();vn.useEffect(()=>{if(l)return l.registerPath(r,a),()=>{l.unregisterPath(r,a)}},[a]);let u;return l?u=o:u=vn.createElement(Awe,ty({ref:t},e),o),vn.createElement(EV.Provider,{value:a},u)}),dg=Bwe,qd=A(_()),bV=A(_());function ny({className:e,style:t}){let{prefixCls:r}=bV.useContext(qs);return fE()?null:bV.createElement("li",{role:"separator",className:Y(`${r}-item-divider`,e),style:t})}function ug(){return ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ug.apply(this,arguments)}function r9(e,t,r){let{item:n,group:a,submenu:o,divider:l}=t;return(e||[]).map((u,d)=>{if(u&&typeof u=="object"){let{label:p,children:h,key:v,type:g,extra:b,...x}=u,y=v??`tmp-${d}`;if(h||g==="group"){if(g==="group")return qd.createElement(a,ug({key:y},x,{title:p}),r9(h,t,r));let{title:F,...S}=x;return qd.createElement(o,ug({key:y},S,{title:p,itemTitle:typeof F=="string"?F:void 0}),r9(h,t,r))}if(g==="divider")return qd.createElement(l,ug({key:y},x));let E=!!b||b===0;return qd.createElement(n,ug({key:y},x,{extra:b,itemData:{...u,key:y}}),E?qd.createElement(qd.Fragment,null,qd.createElement("span",{className:`${r}-item-label`},p),qd.createElement("span",{className:`${r}-item-extra`},b)):p)}return null}).filter(u=>u)}function yV(e,t,r,n,a){let o=e,l={divider:ny,item:Ud,group:ry,submenu:dg,...n};return t&&(o=r9(t,l,a)),i9(o,r)}function n9(){return n9=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n9.apply(this,arguments)}var Xf=[],Iwe=Ur.forwardRef((e,t)=>{let{prefixCls:r="rc-menu",rootClassName:n,style:a,className:o,styles:l,classNames:u,tabIndex:d=0,items:p,children:h,direction:v,id:g,mode:b="vertical",inlineCollapsed:x,disabled:y,disabledOverflow:E,subMenuOpenDelay:F=.1,subMenuCloseDelay:S=.1,forceSubMenuRender:D,defaultOpenKeys:$,openKeys:C,activeKey:B,defaultActiveFirst:M,selectable:I=!0,multiple:j=!1,defaultSelectedKeys:N,selectedKeys:R,onSelect:L,onDeselect:q,inlineIndent:W=24,motion:U,defaultMotions:P,triggerSubMenuAction:H="hover",builtinPlacements:V,itemIcon:Q,expandIcon:X,overflowedIndicator:Z="...",overflowedIndicatorPopupClassName:O,getPopupContainer:z,onClick:K,onOpenChange:J,onKeyDown:te,openAnimation:ee,openTransitionName:ie,_internalRenderMenuItem:me,_internalRenderSubMenuItem:le,_internalComponents:he,popupRender:se,...ke}=e,[De,we]=Ur.useMemo(()=>[yV(h,p,Xf,he,r),yV(h,p,Xf,{},r)],[h,p,he]),[de,be]=Ur.useState(!1),ye=Ur.useRef(null),Re=pl(),Fe=g??`rc-menu-uuid-${Re}`,$e=v==="rtl",[Ie,He]=qt($,C),Oe=Ie||Xf,Me=(bt,Rt=!1)=>{function vr(){He(bt),J?.(bt)}Rt?(0,owe.flushSync)(vr):vr()},[Te,Xe]=Ur.useState(Oe),ot=Ur.useRef(!1),[Ye,Ve]=Ur.useMemo(()=>(b==="inline"||b==="vertical")&&x?["vertical",x]:[b,!1],[b,x]),Ae=Ye==="inline",[Ne,ht]=Ur.useState(Ye),[lt,Ke]=Ur.useState(Ve);Ur.useEffect(()=>{ht(Ye),Ke(Ve),ot.current&&(Ae?He(Te):Me(Xf))},[Ye,Ve]);let[je,nt]=Ur.useState(0),Nt=je>=De.length-1||Ne!=="horizontal"||E;Ur.useEffect(()=>{Ae&&Xe(Oe)},[Oe]),Ur.useEffect(()=>(ot.current=!0,()=>{ot.current=!1}),[]);let{registerPath:Pt,unregisterPath:Jr,refreshOverflowKeys:Xt,isSubPathKey:Tr,getKeyPath:tr,getKeys:Tt,getSubPathKeys:cr}=hwe(),$r=Ur.useMemo(()=>({registerPath:Pt,unregisterPath:Jr}),[Pt,Jr]),Wt=Ur.useMemo(()=>({isSubPathKey:Tr}),[Tr]);Ur.useEffect(()=>{Xt(Nt?Xf:De.slice(je+1).map(bt=>bt.key))},[je,Nt]);let[dt,St]=qt(B||M&&De[0]?.key,B),ze=J1(bt=>{St(bt)}),Je=J1(()=>{St(void 0)});(0,iwe.useImperativeHandle)(t,()=>({list:ye.current,focus:bt=>{let Rt=Tt(),{elements:vr,key2element:Bn,element2key:Va}=dE(Rt,Fe),fr=s9(ye.current,vr),di;dt&&Rt.includes(dt)?di=dt:di=fr[0]?Va.get(fr[0]):De.find(Dr=>!Dr.props.disabled)?.key;let Ga=Bn.get(di);di&&Ga&&Ga?.focus?.(bt)},findItem:({key:bt})=>{let Rt=Tt(),{key2element:vr}=dE(Rt,Fe);return vr.get(bt)||null}}));let[ut,Le]=qt(N||[],R),Ze=Ur.useMemo(()=>Array.isArray(ut)?ut:ut==null?Xf:[ut],[ut]),gt=bt=>{if(I){let{key:Rt}=bt,vr=Ze.includes(Rt),Bn;j?vr?Bn=Ze.filter(fr=>fr!==Rt):Bn=[...Ze,Rt]:Bn=[Rt],Le(Bn);let Va={...bt,selectedKeys:Bn};vr?q?.(Va):L?.(Va)}!j&&Oe.length&&Ne!=="inline"&&Me(Xf)},Qt=J1(bt=>{K?.(pE(bt)),gt(bt)}),Yt=J1((bt,Rt)=>{let vr=Oe.filter(Bn=>Bn!==bt);if(Rt)vr.push(bt);else if(Ne!=="inline"){let Bn=cr(bt);vr=vr.filter(Va=>!Bn.has(Va))}ed(Oe,vr,!0)||Me(vr,!0)}),on=pwe(Ne,dt,$e,Fe,ye,Tt,tr,St,(bt,Rt)=>{let vr=Rt??!Oe.includes(bt);Yt(bt,vr)},te);Ur.useEffect(()=>{be(!0)},[]);let Pr=Ur.useMemo(()=>({_internalRenderMenuItem:me,_internalRenderSubMenuItem:le}),[me,le]),rr=Ne!=="horizontal"||E?De:De.map((bt,Rt)=>Ur.createElement(Z1,{key:bt.key,overflowDisabled:Rt>je,classNames:u,styles:l},bt)),Vr=Ur.createElement(Gf,n9({id:g,ref:ye,prefixCls:`${r}-overflow`,component:"ul",itemComponent:Ud,className:Y(r,`${r}-root`,`${r}-${Ne}`,o,{[`${r}-inline-collapsed`]:lt,[`${r}-rtl`]:$e},n),dir:v,style:a,role:"menu",tabIndex:d,data:rr,renderRawItem:bt=>bt,renderRawRest:bt=>{let Rt=bt.length,vr=Rt?De.slice(-Rt):null;return Ur.createElement(dg,{eventKey:JA,title:Z,disabled:Nt,internalPopupClose:Rt===0,popupClassName:O},vr)},maxCount:Ne!=="horizontal"||E?Gf.INVALIDATE:Gf.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:bt=>{nt(bt)},onKeyDown:on},ke));return Ur.createElement(o9.Provider,{value:Pr},Ur.createElement(SV.Provider,{value:Fe},Ur.createElement(Z1,{prefixCls:r,rootClassName:n,classNames:u,styles:l,mode:Ne,openKeys:Oe,rtl:$e,disabled:y,motion:de?U:null,defaultMotions:de?P:null,activeKey:dt,onActive:ze,onInactive:Je,selectedKeys:Ze,inlineIndent:W,subMenuOpenDelay:F,subMenuCloseDelay:S,forceSubMenuRender:D,builtinPlacements:V,triggerSubMenuAction:H,getPopupContainer:z,itemIcon:Q,expandIcon:X,onItemClick:Qt,onOpenChange:Yt,popupRender:se},Ur.createElement(kV.Provider,{value:Wt},Vr),Ur.createElement("div",{style:{display:"none"},"aria-hidden":!0},Ur.createElement(xV.Provider,{value:$r},we)))))}),Mwe=Iwe,ay=Mwe;ay.Item=Ud;ay.SubMenu=dg;ay.ItemGroup=ry;ay.Divider=ny;var iy=ay,Hs=A(_()),wV=A(_()),{ESC:Twe,TAB:_we}=yn;function jwe({visible:e,triggerRef:t,onVisibleChange:r,autoFocus:n,overlayRef:a}){let o=wV.useRef(!1),l=()=>{e&&(t.current?.focus?.(),r?.(!1))},u=()=>a.current?.focus?(a.current.focus(),o.current=!0,!0):!1,d=p=>{switch(p.keyCode){case Twe:l();break;case _we:{let h=!1;o.current||(h=u()),h?p.preventDefault():l();break}}};wV.useEffect(()=>e?(window.addEventListener("keydown",d),n&&br(u,3),()=>{window.removeEventListener("keydown",d),o.current=!1}):()=>{o.current=!1},[e])}var og=A(_()),Nwe=(0,og.forwardRef)((e,t)=>{let{overlay:r,arrow:n,prefixCls:a}=e,o=(0,og.useMemo)(()=>{let u;return typeof r=="function"?u=r():u=r,u},[r]),l=pn(t,Pi(o));return og.default.createElement(og.default.Fragment,null,n&&og.default.createElement("div",{className:`${a}-arrow`}),og.default.cloneElement(o,{ref:yu(o)?l:void 0}))}),Pwe=Nwe,sg={adjustX:1,adjustY:1},lg=[0,0],Rwe={topLeft:{points:["bl","tl"],overflow:sg,offset:[0,-4],targetOffset:lg},top:{points:["bc","tc"],overflow:sg,offset:[0,-4],targetOffset:lg},topRight:{points:["br","tr"],overflow:sg,offset:[0,-4],targetOffset:lg},bottomLeft:{points:["tl","bl"],overflow:sg,offset:[0,4],targetOffset:lg},bottom:{points:["tc","bc"],overflow:sg,offset:[0,4],targetOffset:lg},bottomRight:{points:["tr","br"],overflow:sg,offset:[0,4],targetOffset:lg}},Owe=Rwe;function a9(){return a9=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a9.apply(this,arguments)}var zwe=Hs.default.forwardRef((e,t)=>{let{arrow:r=!1,prefixCls:n="rc-dropdown",transitionName:a,animation:o,align:l,placement:u="bottomLeft",placements:d=Owe,getPopupContainer:p,showAction:h,hideAction:v,overlayClassName:g,overlayStyle:b,visible:x,trigger:y=["hover"],autoFocus:E,overlay:F,children:S,onVisibleChange:D,disabled:$,...C}=e,[B,M]=Hs.default.useState(),I="visible"in e?x:B,j=o?`${n}-${o}`:a,N=Hs.default.useRef(null),R=Hs.default.useRef(null),L=Hs.default.useRef(null);Hs.default.useImperativeHandle(t,()=>N.current);let q=K=>{M(K),D?.(K)};jwe({visible:I,triggerRef:L,onVisibleChange:q,autoFocus:E,overlayRef:R});let W=K=>{let{onOverlayClick:J}=e;M(!1),J&&J(K)},U=()=>Hs.default.createElement(Pwe,{ref:R,overlay:F,prefixCls:n,arrow:r}),P=()=>typeof F=="function"?U:U(),H=()=>{let{minOverlayWidthMatchTrigger:K,alignPoint:J}=e;return"minOverlayWidthMatchTrigger"in e?K:!J},V=()=>{let{openClassName:K}=e;return K!==void 0?K:`${n}-open`},Q=S,X=Y(Q.props?.className,I&&V()),Z={className:X,ref:pn(L,Pi(Q))},O=yu(Q)?Hs.default.cloneElement(Q,Z):Hs.default.createElement("span",{className:X,ref:L},Hs.default.cloneElement(Q,{className:X})),z=v;return!z&&y.indexOf("contextMenu")!==-1&&(z=["click"]),Hs.default.createElement(jh,a9({builtinPlacements:d},C,{prefixCls:n,ref:N,popupClassName:Y(g,{[`${n}-show-arrow`]:r}),popupStyle:b,action:y,showAction:h,hideAction:z,popupPlacement:u,popupAlign:l,popupMotion:{motionName:j},popupVisible:I,stretch:H()?"minWidth":"",popup:P(),onOpenChange:q,onPopupClick:W,getPopupContainer:p}),O)}),Lwe=zwe,oy=Lwe;var _V=A(_()),Hwe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},qwe=Hwe;function u9(){return u9=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u9.apply(this,arguments)}var Wwe=(e,t)=>_V.createElement(Ut,u9({},e,{ref:t,icon:qwe})),Uwe=_V.forwardRef(Wwe),c9=Uwe;var jV=A(_()),Vwe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},Gwe=Vwe;function d9(){return d9=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d9.apply(this,arguments)}var Kwe=(e,t)=>jV.createElement(Ut,d9({},e,{ref:t,icon:Gwe})),Xwe=jV.forwardRef(Kwe),sy=Xwe;var Qu=A(_()),Yf=A(_()),ly=A(_()),Qwe=A(_()),g9=(0,Qwe.createContext)(null),Ywe=A(_()),Ji=A(_()),da=A(_()),mE=A(_()),Jwe=e=>{let{activeTabOffset:t,horizontal:r,rtl:n,indicator:a={}}=e,{size:o,align:l="center"}=a,[u,d]=(0,mE.useState)(),p=(0,mE.useRef)(void 0),h=mE.default.useCallback(g=>typeof o=="function"?o(g):typeof o=="number"?o:g,[o]);function v(){br.cancel(p.current)}return(0,mE.useEffect)(()=>{let g={};if(t)if(r){g.width=h(t.width);let b=n?"right":"left";l==="start"&&(g[b]=t[b]),l==="center"&&(g[b]=t[b]+t.width/2,g.transform=n?"translateX(50%)":"translateX(-50%)"),l==="end"&&(g[b]=t[b]+t.width,g.transform="translateX(-100%)")}else g.height=h(t.height),l==="start"&&(g.top=t.top),l==="center"&&(g.top=t.top+t.height/2,g.transform="translateY(-50%)"),l==="end"&&(g.top=t.top+t.height,g.transform="translateY(-100%)");return v(),p.current=br(()=>{u&&g&&Object.keys(g).every(b=>{let x=g[b],y=u[b];return typeof x=="number"&&typeof y=="number"?Math.round(x)===Math.round(y):x===y})||d(g)}),v},[JSON.stringify(t),r,n,l,h]),{style:u}},Zwe=Jwe,e5e=A(_()),NV={width:0,height:0,left:0,top:0};function t5e(e,t,r){return(0,e5e.useMemo)(()=>{let n=new Map,a=t.get(e[0]?.key)||NV,o=a.left+a.width;for(let l=0;l<e.length;l+=1){let{key:u}=e[l],d=t.get(u);d||(d=t.get(e[l-1]?.key)||NV);let p=n.get(u)||{...d};p.right=o-p.left-p.width,n.set(u,p)}return n},[e.map(n=>n.key).join("_"),t,r])}var PV=A(_());function RV(e,t){let r=PV.useRef(e),[,n]=PV.useState({});function a(o){let l=typeof o=="function"?o(r.current):o;l!==r.current&&t(l,r.current),r.current=l,n({})}return[r.current,a]}var r5e=A(_()),Jf=A(_()),n5e=.1,OV=.01,vE=20,zV=.995**vE;function a5e(e,t){let[r,n]=(0,Jf.useState)(),[a,o]=(0,Jf.useState)(0),[l,u]=(0,Jf.useState)(0),[d,p]=(0,Jf.useState)(),h=(0,Jf.useRef)(void 0);function v(F){let{screenX:S,screenY:D}=F.touches[0];n({x:S,y:D}),window.clearInterval(h.current)}function g(F){if(!r)return;let{screenX:S,screenY:D}=F.touches[0];n({x:S,y:D});let $=S-r.x,C=D-r.y;t($,C);let B=Date.now();o(B),u(B-a),p({x:$,y:C})}function b(){if(r&&(n(null),p(null),d)){let F=d.x/l,S=d.y/l,D=Math.abs(F),$=Math.abs(S);if(Math.max(D,$)<n5e)return;let C=F,B=S;h.current=window.setInterval(()=>{if(Math.abs(C)<OV&&Math.abs(B)<OV){window.clearInterval(h.current);return}C*=zV,B*=zV,t(C*vE,B*vE)},vE)}}let x=(0,Jf.useRef)(void 0);function y(F){let{deltaX:S,deltaY:D}=F,$,C=Math.abs(S),B=Math.abs(D);C===B?$=x.current==="x"?S:D:C>B?($=S,x.current="x"):($=D,x.current="y"),t(-$,-$)&&F.preventDefault()}let E=(0,Jf.useRef)(null);E.current={onTouchStart:v,onTouchMove:g,onTouchEnd:b,onWheel:y},r5e.useEffect(()=>{function F(C){E.current.onTouchStart(C)}function S(C){E.current.onTouchMove(C)}function D(C){E.current.onTouchEnd(C)}function $(C){E.current.onWheel(C)}return document.addEventListener("touchmove",S,{passive:!1}),document.addEventListener("touchend",D,{passive:!0}),e.current.addEventListener("touchstart",F,{passive:!0}),e.current.addEventListener("wheel",$,{passive:!1}),()=>{document.removeEventListener("touchmove",S),document.removeEventListener("touchend",D)}},[])}var fg=A(_());function GV(e){let[t,r]=(0,fg.useState)(0),n=(0,fg.useRef)(0),a=(0,fg.useRef)(void 0);return a.current=e,aF(()=>{a.current?.()},[t]),()=>{n.current===t&&(n.current+=1,r(n.current))}}function i5e(e){let t=(0,fg.useRef)([]),[,r]=(0,fg.useState)({}),n=(0,fg.useRef)(typeof e=="function"?e():e),a=GV(()=>{let l=n.current;t.current.forEach(u=>{l=u(l)}),t.current=[],n.current=l,r({})});function o(l){t.current.push(l),a()}return[n.current,o]}var o5e=A(_()),LV={width:0,height:0,left:0,top:0,right:0};function s5e(e,t,r,n,a,o,{tabs:l,tabPosition:u,rtl:d}){let p,h,v;return["top","bottom"].includes(u)?(p="width",h=d?"right":"left",v=Math.abs(r)):(p="height",h="top",v=-r),(0,o5e.useMemo)(()=>{if(!l.length)return[0,0];let g=l.length,b=g;for(let y=0;y<g;y+=1){let E=e.get(l[y].key)||LV;if(Math.floor(E[h]+E[p])>Math.floor(v+t)){b=y-1;break}}let x=0;for(let y=g-1;y>=0;y-=1)if((e.get(l[y].key)||LV)[h]<v){x=y+1;break}return x>b?[0,-1]:[x,b]},[e,t,n,a,o,v,u,l.map(g=>g.key).join("_"),d])}function HV(e){let t;return e instanceof Map?(t={},e.forEach((r,n)=>{t[n]=r})):t=e,JSON.stringify(t)}var l5e="TABS_DQ";function KV(e){return String(e).replace(/"/g,l5e)}function v9(e,t,r,n){return!(!r||n||e===!1||e===void 0&&(t===!1||t===null))}var qV=A(_()),u5e=qV.forwardRef((e,t)=>{let{prefixCls:r,editable:n,locale:a,style:o}=e;return!n||n.showAdd===!1?null:qV.createElement("button",{ref:t,type:"button",className:`${r}-nav-add`,style:o,"aria-label":a?.addAriaLabel||"Add tab",onClick:l=>{n.onEdit("add",{event:l})}},n.addIcon||"+")}),XV=u5e,p9=A(_()),c5e=p9.forwardRef((e,t)=>{let{position:r,prefixCls:n,extra:a}=e;if(!a)return null;let o,l={};return typeof a=="object"&&!p9.isValidElement(a)?l=a:l.right=a,r==="right"&&(o=l.right),r==="left"&&(o=l.left),o?p9.createElement("div",{className:`${n}-extra-content`,ref:t},o):null}),WV=c5e,Pl=A(_()),hE=A(_());function m9(){return m9=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m9.apply(this,arguments)}var d5e=Pl.forwardRef((e,t)=>{let{prefixCls:r,id:n,tabs:a,locale:o,mobile:l,more:u={},style:d,className:p,editable:h,tabBarGutter:v,rtl:g,removeAriaLabel:b,onTabClick:x,getPopupContainer:y,popupClassName:E,popupStyle:F,classNames:S,styles:D}=e,[$,C]=(0,hE.useState)(!1),[B,M]=(0,hE.useState)(null),{icon:I="More",popupRender:j}=u,N=`${n}-more-popup`,R=`${r}-dropdown`,L=B!==null?`${N}-${B}`:null,q=o?.dropdownAriaLabel;function W(O,z){O.preventDefault(),O.stopPropagation(),h.onEdit("remove",{key:z,event:O})}let U=Pl.createElement(iy,{onClick:({key:O,domEvent:z})=>{x(O,z),C(!1)},prefixCls:`${R}-menu`,id:N,tabIndex:-1,role:"listbox","aria-activedescendant":L,selectedKeys:[B],"aria-label":q!==void 0?q:"expanded dropdown"},a.map(O=>{let{closable:z,disabled:K,closeIcon:J,key:te,label:ee}=O,ie=v9(z,J,h,K);return Pl.createElement(Ud,{key:te,id:`${N}-${te}`,role:"option","aria-controls":n&&`${n}-panel-${te}`,disabled:K},Pl.createElement("span",null,ee),ie&&Pl.createElement("button",{type:"button","aria-label":b||"remove",tabIndex:0,className:Y(`${R}-menu-item-remove`,S?.remove),style:D?.remove,onClick:me=>{me.stopPropagation(),W(me,te)}},J||h.removeIcon||"\xD7"))})),P=j?j(U,{restTabs:a,onClose:()=>C(!1)}):U;function H(O){let z=a.filter(te=>!te.disabled),K=z.findIndex(te=>te.key===B)||0,J=z.length;for(let te=0;te<J;te+=1){K=(K+O+J)%J;let ee=z[K];if(!ee.disabled){M(ee.key);return}}}function V(O){let{which:z}=O;if(!$){[yn.DOWN,yn.SPACE,yn.ENTER].includes(z)&&(C(!0),O.preventDefault());return}switch(z){case yn.UP:H(-1),O.preventDefault();break;case yn.DOWN:H(1),O.preventDefault();break;case yn.ESC:C(!1);break;case yn.SPACE:case yn.ENTER:B!==null&&x(B,O);break}}(0,hE.useEffect)(()=>{let O=document.getElementById(L);O?.scrollIntoView&&O.scrollIntoView(!1)},[L,B]),(0,hE.useEffect)(()=>{$||M(null)},[$]);let Q={marginInlineStart:v};a.length||(Q.visibility="hidden",Q.order=1);let X=Y(E,{[`${R}-rtl`]:g}),Z=l?null:Pl.createElement(oy,m9({prefixCls:R,overlay:P,visible:a.length?$:!1,onVisibleChange:C,overlayClassName:X,overlayStyle:F,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:y},u),Pl.createElement("button",{type:"button",className:`${r}-nav-more`,style:Q,"aria-haspopup":"listbox","aria-controls":N,id:`${n}-more`,"aria-expanded":$,onKeyDown:V},I));return Pl.createElement("div",{className:Y(`${r}-nav-operations`,p),style:d,ref:t},Z,Pl.createElement(XV,{prefixCls:r,locale:o,editable:h}))}),p5e=Pl.memo(d5e,(e,t)=>t.tabMoving),Yu=A(_()),f5e=e=>{let{prefixCls:t,id:r,active:n,focus:a,tab:{key:o,label:l,disabled:u,closeIcon:d,icon:p},closable:h,renderWrapper:v,removeAriaLabel:g,editable:b,onClick:x,onFocus:y,onBlur:E,onKeyDown:F,onMouseDown:S,onMouseUp:D,styles:$,classNames:C,tabCount:B,currentPosition:M}=e,I=`${t}-tab`,j=v9(h,d,b,u);function N(U){u||x(U)}function R(U){U.preventDefault(),U.stopPropagation(),b.onEdit("remove",{key:o,event:U})}let L=Yu.useMemo(()=>p&&typeof l=="string"?Yu.createElement("span",null,l):l,[l,p]),q=Yu.useRef(null);Yu.useEffect(()=>{a&&q.current&&q.current.focus()},[a]);let W=Yu.createElement("div",{key:o,"data-node-key":KV(o),className:Y(I,C?.item,{[`${I}-with-remove`]:j,[`${I}-active`]:n,[`${I}-disabled`]:u,[`${I}-focus`]:a}),style:$?.item,onClick:N},Yu.createElement("div",{ref:q,role:"tab","aria-selected":n,id:r&&`${r}-tab-${o}`,className:`${I}-btn`,"aria-controls":r&&`${r}-panel-${o}`,"aria-disabled":u,tabIndex:u?null:n?0:-1,onClick:U=>{U.stopPropagation(),N(U)},onKeyDown:F,onMouseDown:S,onMouseUp:D,onFocus:y,onBlur:E},a&&Yu.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`Tab ${M} of ${B}`),p&&Yu.createElement("span",{className:`${I}-icon`},p),l&&L),j&&Yu.createElement("button",{type:"button","aria-label":g||"remove",tabIndex:n?0:-1,className:Y(`${I}-remove`,C?.remove),style:$?.remove,onClick:U=>{U.stopPropagation(),R(U)}},d||b.removeIcon||"\xD7"));return v?v(W):W},m5e=f5e;function h9(){return h9=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h9.apply(this,arguments)}var h5e=(e,t)=>{let{offsetWidth:r,offsetHeight:n,offsetTop:a,offsetLeft:o}=e,{width:l,height:u,left:d,top:p}=e.getBoundingClientRect();return Math.abs(l-r)<1?[l,u,d-t.left,p-t.top]:[r,n,o,a]},pg=e=>{let{offsetWidth:t=0,offsetHeight:r=0}=e.current||{};if(e.current){let{width:n,height:a}=e.current.getBoundingClientRect();if(Math.abs(n-t)<1)return[n,a]}return[t,r]},gE=(e,t)=>e[t?0:1],g5e=Ji.forwardRef((e,t)=>{let{className:r,style:n,id:a,animated:o,activeKey:l,rtl:u,extra:d,editable:p,locale:h,tabPosition:v,tabBarGutter:g,children:b,onTabClick:x,onTabScroll:y,indicator:E,classNames:F,styles:S}=e,{prefixCls:D,tabs:$}=Ji.useContext(g9),C=(0,da.useRef)(null),B=(0,da.useRef)(null),M=(0,da.useRef)(null),I=(0,da.useRef)(null),j=(0,da.useRef)(null),N=(0,da.useRef)(null),R=(0,da.useRef)(null),L=v==="top"||v==="bottom",[q,W]=RV(0,(ze,Je)=>{L&&y&&y({direction:ze>Je?"left":"right"})}),[U,P]=RV(0,(ze,Je)=>{!L&&y&&y({direction:ze>Je?"top":"bottom"})}),[H,V]=(0,da.useState)([0,0]),[Q,X]=(0,da.useState)([0,0]),[Z,O]=(0,da.useState)([0,0]),[z,K]=(0,da.useState)([0,0]),[J,te]=i5e(new Map),ee=t5e($,J,Q[0]),ie=gE(H,L),me=gE(Q,L),le=gE(Z,L),he=gE(z,L),se=Math.floor(ie)<Math.floor(me+le),ke=se?ie-he:ie-le,De=`${D}-nav-operations-hidden`,we=0,de=0;L&&u?(we=0,de=Math.max(0,me-ke)):(we=Math.min(0,ke-me),de=0);function be(ze){return ze<we?we:ze>de?de:ze}let ye=(0,da.useRef)(null),[Re,Fe]=(0,da.useState)();function $e(){Fe(Date.now())}function Ie(){ye.current&&clearTimeout(ye.current)}a5e(I,(ze,Je)=>{function ut(Le,Ze){Le(gt=>be(gt+Ze))}return se?(L?ut(W,ze):ut(P,Je),Ie(),$e(),!0):!1}),(0,da.useEffect)(()=>(Ie(),Re&&(ye.current=setTimeout(()=>{Fe(0)},100)),Ie),[Re]);let[He,Oe]=s5e(ee,ke,L?q:U,me,le,he,{...e,tabs:$}),Me=xt((ze=l)=>{let Je=ee.get(ze)||{width:0,height:0,left:0,right:0,top:0};if(L){let ut=q;u?Je.right<q?ut=Je.right:Je.right+Je.width>q+ke&&(ut=Je.right+Je.width-ke):Je.left<-q?ut=-Je.left:Je.left+Je.width>-q+ke&&(ut=-(Je.left+Je.width-ke)),P(0),W(be(ut))}else{let ut=U;Je.top<-U?ut=-Je.top:Je.top+Je.height>-U+ke&&(ut=-(Je.top+Je.height-ke)),W(0),P(be(ut))}}),[Te,Xe]=(0,da.useState)(),[ot,Ye]=(0,da.useState)(!1),Ve=$.filter(ze=>!ze.disabled).map(ze=>ze.key),Ae=ze=>{let Je=Ve.indexOf(Te||l),ut=Ve.length,Le=(Je+ze+ut)%ut,Ze=Ve[Le];Xe(Ze)},Ne=(ze,Je)=>{let ut=Ve.indexOf(ze),Le=$.find(Ze=>Ze.key===ze);v9(Le?.closable,Le?.closeIcon,p,Le?.disabled)&&(Je.preventDefault(),Je.stopPropagation(),p.onEdit("remove",{key:ze,event:Je}),ut===Ve.length-1?Ae(-1):Ae(1))},ht=(ze,Je)=>{Ye(!0),Je.button===1&&Ne(ze,Je)},lt=ze=>{let{code:Je}=ze,ut=u&&L,Le=Ve[0],Ze=Ve[Ve.length-1];switch(Je){case"ArrowLeft":{L&&Ae(ut?1:-1);break}case"ArrowRight":{L&&Ae(ut?-1:1);break}case"ArrowUp":{ze.preventDefault(),L||Ae(-1);break}case"ArrowDown":{ze.preventDefault(),L||Ae(1);break}case"Home":{ze.preventDefault(),Xe(Le);break}case"End":{ze.preventDefault(),Xe(Ze);break}case"Enter":case"Space":{ze.preventDefault(),x(Te??l,ze);break}case"Backspace":case"Delete":{Ne(Te,ze);break}}},Ke={};L?Ke.marginInlineStart=g:Ke.marginTop=g;let je=$.map((ze,Je)=>{let{key:ut}=ze;return Ji.createElement(m5e,{id:a,prefixCls:D,key:ut,tab:ze,classNames:{item:F?.item,remove:F?.remove},styles:{item:Je===0?S?.item:{...Ke,...S?.item},remove:S?.remove},closable:ze.closable,editable:p,active:ut===l,focus:ut===Te,renderWrapper:b,removeAriaLabel:h?.removeAriaLabel,tabCount:Ve.length,currentPosition:Je+1,onClick:Le=>{x(ut,Le)},onKeyDown:lt,onFocus:()=>{ot||Xe(ut),Me(ut),$e(),I.current&&(u||(I.current.scrollLeft=0),I.current.scrollTop=0)},onBlur:()=>{Xe(void 0)},onMouseDown:Le=>ht(ut,Le),onMouseUp:()=>{Ye(!1)}})}),nt=()=>te(()=>{let ze=new Map,Je=j.current?.getBoundingClientRect();return $.forEach(({key:ut})=>{let Le=j.current?.querySelector(`[data-node-key="${KV(ut)}"]`);if(Le){let[Ze,gt,Qt,Yt]=h5e(Le,Je);ze.set(ut,{width:Ze,height:gt,left:Qt,top:Yt})}}),ze});(0,da.useEffect)(()=>{nt()},[$.map(ze=>ze.key).join("_")]);let Nt=GV(()=>{let ze=pg(C),Je=pg(B),ut=pg(M);V([ze[0]-Je[0]-ut[0],ze[1]-Je[1]-ut[1]]);let Le=pg(R);O(Le);let Ze=pg(N);K(Ze);let gt=pg(j);X([gt[0]-Le[0],gt[1]-Le[1]]),nt()}),Pt=$.slice(0,He),Jr=$.slice(Oe+1),Xt=[...Pt,...Jr],Tr=ee.get(l),{style:tr}=Zwe({activeTabOffset:Tr,horizontal:L,indicator:E,rtl:u});(0,da.useEffect)(()=>{Me()},[l,we,de,HV(Tr),HV(ee),L]),(0,da.useEffect)(()=>{Nt()},[u]);let Tt=!!Xt.length,cr=`${D}-nav-wrap`,$r,Wt,dt,St;return L?u?(Wt=q>0,$r=q!==de):($r=q<0,Wt=q!==we):(dt=U<0,St=U!==we),Ji.createElement(Ba,{onResize:Nt},Ji.createElement("div",{ref:Qa(t,C),role:"tablist","aria-orientation":L?"horizontal":"vertical",className:Y(`${D}-nav`,r,F?.header),style:{...S?.header,...n},onKeyDown:()=>{$e()}},Ji.createElement(WV,{ref:B,position:"left",extra:d,prefixCls:D}),Ji.createElement(Ba,{onResize:Nt},Ji.createElement("div",{className:Y(cr,{[`${cr}-ping-left`]:$r,[`${cr}-ping-right`]:Wt,[`${cr}-ping-top`]:dt,[`${cr}-ping-bottom`]:St}),ref:I},Ji.createElement(Ba,{onResize:Nt},Ji.createElement("div",{ref:j,className:`${D}-nav-list`,style:{transform:`translate(${q}px, ${U}px)`,transition:Re?"none":void 0}},je,Ji.createElement(XV,{ref:R,prefixCls:D,locale:h,editable:p,style:{...je.length===0?void 0:Ke,visibility:Tt?"hidden":null}}),Ji.createElement("div",{className:Y(`${D}-ink-bar`,F?.indicator,{[`${D}-ink-bar-animated`]:o.inkBar}),style:{...tr,...S?.indicator}}))))),Ji.createElement(p5e,h9({},e,{removeAriaLabel:h?.removeAriaLabel,ref:N,prefixCls:D,tabs:Xt,className:!Tt&&De,popupStyle:S?.popup,tabMoving:!!Re})),Ji.createElement(WV,{ref:M,position:"right",extra:d,prefixCls:D})))}),UV=g5e,v5e=({renderTabBar:e,...t})=>e?e(t,UV):Ywe.createElement(UV,t),b5e=v5e,uy=A(_()),f9=A(_()),y5e=f9.forwardRef((e,t)=>{let{prefixCls:r,className:n,style:a,id:o,active:l,tabKey:u,children:d}=e,p=f9.Children.count(d)>0;return f9.createElement("div",{id:o&&`${o}-panel-${u}`,role:"tabpanel",tabIndex:l&&p?0:-1,"aria-labelledby":o&&`${o}-tab-${u}`,"aria-hidden":!l,style:a,className:Y(r,l&&`${r}-active`,n),ref:t},d)}),w5e=y5e;function bE(){return bE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bE.apply(this,arguments)}var x5e=e=>{let{id:t,activeKey:r,animated:n,tabPosition:a,destroyOnHidden:o,bodyStyle:l,bodyClassName:u,contentStyle:d,contentClassName:p}=e,{prefixCls:h,tabs:v}=uy.useContext(g9),g=n.tabPane,b=`${h}-body`,x=`${h}-content`;return uy.createElement("div",{className:Y(`${b}-holder`)},uy.createElement("div",{className:Y(b,`${b}-${a}`,{[`${b}-animated`]:g},u),style:l},v.map(y=>{let{key:E,forceRender:F,style:S,className:D,destroyOnHidden:$,...C}=y,B=E===r;return uy.createElement(ra,bE({key:E,visible:B,forceRender:F,removeOnLeave:!!(o??$),leavedClassName:`${x}-hidden`},n.tabPaneMotion),({style:M,className:I},j)=>uy.createElement(w5e,bE({},C,{prefixCls:x,id:t,tabKey:E,animated:g,active:B,style:{...d,...S,...M},className:Y(p,D,I),ref:j})))})))},E5e=x5e;function k5e(e={inkBar:!0,tabPane:!1}){let t;return e===!1?t={inkBar:!1,tabPane:!1}:e===!0?t={inkBar:!0,tabPane:!1}:t={inkBar:!0,...typeof e=="object"?e:{}},t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}function cy(){return cy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cy.apply(this,arguments)}var VV=0,C5e=Yf.forwardRef((e,t)=>{let{id:r,prefixCls:n="rc-tabs",className:a,items:o,direction:l,activeKey:u,defaultActiveKey:d,editable:p,animated:h,tabPosition:v="top",tabBarGutter:g,tabBarStyle:b,tabBarExtraContent:x,locale:y,more:E,destroyOnHidden:F,renderTabBar:S,onChange:D,onTabClick:$,onTabScroll:C,getPopupContainer:B,popupClassName:M,indicator:I,classNames:j,styles:N,...R}=e,L=Yf.useMemo(()=>(o||[]).filter(ee=>ee&&typeof ee=="object"&&"key"in ee),[o]),q=l==="rtl",W=k5e(h),[U,P]=(0,ly.useState)(!1);(0,ly.useEffect)(()=>{P(pF())},[]);let[H,V]=qt(d??L[0]?.key,u),[Q,X]=(0,ly.useState)(()=>L.findIndex(ee=>ee.key===H));(0,ly.useEffect)(()=>{let ee=L.findIndex(ie=>ie.key===H);ee===-1&&(ee=Math.max(0,Math.min(Q,L.length-1)),V(L[ee]?.key)),X(ee)},[L.map(ee=>ee.key).join("_"),H,Q]);let[Z,O]=qt(null,r);(0,ly.useEffect)(()=>{r||(O(`rc-tabs-${VV}`),VV+=1)},[]);function z(ee,ie){$?.(ee,ie);let me=ee!==H;V(ee),me&&D?.(ee)}let K={id:Z,activeKey:H,animated:W,tabPosition:v,rtl:q,mobile:U},J={...K,editable:p,locale:y,more:E,tabBarGutter:g,onTabClick:z,onTabScroll:C,extra:x,style:b,getPopupContainer:B,popupClassName:Y(M,j?.popup),indicator:I,styles:N,classNames:j},te=Yf.useMemo(()=>({tabs:L,prefixCls:n}),[L,n]);return Yf.createElement(g9.Provider,{value:te},Yf.createElement("div",cy({ref:t,id:r,className:Y(n,`${n}-${v}`,{[`${n}-mobile`]:U,[`${n}-editable`]:p,[`${n}-rtl`]:q},a)},R),Yf.createElement(b5e,cy({},J,{renderTabBar:S})),Yf.createElement(E5e,cy({destroyOnHidden:F},K,{bodyStyle:N?.body,bodyClassName:j?.body,contentStyle:N?.content,contentClassName:j?.content,animated:W}))))}),S5e=C5e,F5e=S5e,$5e={motionAppear:!1,motionEnter:!0,motionLeave:!0};function D5e(e,t={inkBar:!0,tabPane:!1}){let r;return t===!1?r={inkBar:!1,tabPane:!1}:t===!0?r={inkBar:!0,tabPane:!0}:r={inkBar:!0,...Ct(t)?t:{}},r.tabPane&&(r.tabPaneMotion={...$5e,motionName:Vp(e,"switch")}),r}var A5e=A(_());function B5e(e){return e.filter(t=>t)}function I5e(e,t){if(e)return e.map(n=>({...n,destroyOnHidden:n.destroyOnHidden??n.destroyInactiveTabPane}));let r=Er(t).map(n=>{if(A5e.isValidElement(n)){let{key:a,props:o}=n,{tab:l,...u}=o||{};return{key:String(a),...u,label:l}}return null});return B5e(r)}var M5e=I5e,T5e=e=>{let{componentCls:t,motionDurationSlow:r}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${r}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${r}`}}}}},[Ho(e,"slide-up"),Ho(e,"slide-down")]]},_5e=T5e,j5e=e=>{let{componentCls:t,tabsCardPadding:r,cardBg:n,cardGutter:a,colorBorderSecondary:o,itemSelectedColor:l}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:r,background:n,border:`${ue(e.lineWidth)} ${e.lineType} ${o}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:l,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:gi(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:"none"},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:ue(a)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${ue(e.borderRadiusLG)} ${ue(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${ue(e.borderRadiusLG)} ${ue(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:ue(a)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${ue(e.borderRadiusLG)} 0 0 ${ue(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${ue(e.borderRadiusLG)} ${ue(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},N5e=e=>{let{antCls:t,componentCls:r,itemHoverColor:n,dropdownEdgeChildVerticalPadding:a}=e;return{[`${r}-dropdown`]:{...Mt(e),position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`&${t}-slide-down-enter${t}-slide-down-enter-active${r}-dropdown-placement-bottomLeft,
213
+ &${t}-slide-down-appear${t}-slide-down-appear-active${r}-dropdown-placement-bottomLeft,
214
+ &${t}-slide-down-enter${t}-slide-down-enter-active${r}-dropdown-placement-bottom,
215
+ &${t}-slide-down-appear${t}-slide-down-appear-active${r}-dropdown-placement-bottom,
216
+ &${t}-slide-down-enter${t}-slide-down-enter-active${r}-dropdown-placement-bottomRight,
217
+ &${t}-slide-down-appear${t}-slide-down-appear-active${r}-dropdown-placement-bottomRight`]:{animationName:Wh},[`&${t}-slide-up-enter${t}-slide-up-enter-active${r}-dropdown-placement-topLeft,
218
+ &${t}-slide-up-appear${t}-slide-up-appear-active${r}-dropdown-placement-topLeft,
219
+ &${t}-slide-up-enter${t}-slide-up-enter-active${r}-dropdown-placement-top,
220
+ &${t}-slide-up-appear${t}-slide-up-appear-active${r}-dropdown-placement-top,
221
+ &${t}-slide-up-enter${t}-slide-up-enter-active${r}-dropdown-placement-topRight,
222
+ &${t}-slide-up-appear${t}-slide-up-appear-active${r}-dropdown-placement-topRight`]:{animationName:Vh},[`&${t}-slide-down-leave${t}-slide-down-leave-active${r}-dropdown-placement-bottomLeft,
223
+ &${t}-slide-down-leave${t}-slide-down-leave-active${r}-dropdown-placement-bottom,
224
+ &${t}-slide-down-leave${t}-slide-down-leave-active${r}-dropdown-placement-bottomRight`]:{animationName:Uh},[`&${t}-slide-up-leave${t}-slide-up-leave-active${r}-dropdown-placement-topLeft,
225
+ &${t}-slide-up-leave${t}-slide-up-leave-active${r}-dropdown-placement-top,
226
+ &${t}-slide-up-leave${t}-slide-up-leave-active${r}-dropdown-placement-topRight`]:{animationName:Gh},[`${r}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${ue(a)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":{...fl,display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${ue(e.paddingXXS)} ${ue(e.paddingSM)}`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}}}}}},P5e=e=>{let{componentCls:t,margin:r,colorBorderSecondary:n,horizontalMargin:a,verticalItemPadding:o,verticalItemMargin:l,motionDurationSlow:u,calc:d}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:a,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${ue(e.lineWidth)} ${e.lineType} ${n}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:["width","left","right"].map(p=>`${p} ${u}`).join(", ")}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,
227
+ > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:r,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-body-holder, > div > ${t}-body-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:d(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:o,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:l},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:["height","top"].map(p=>`${p} ${u}`).join(", ")}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-body-holder, > div > ${t}-body-holder`]:{marginLeft:{_skip_check_:!0,value:ue(d(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-body > ${t}-content`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-body-holder, > div > ${t}-body-holder`]:{order:0,marginRight:{_skip_check_:!0,value:d(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${ue(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-body > ${t}-content`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},R5e=e=>{let{componentCls:t,cardPaddingSM:r,cardPaddingLG:n,cardHeightSM:a,cardHeightLG:o,horizontalItemPaddingSM:l,horizontalItemPaddingLG:u}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:l,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:u,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:a,minHeight:a}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${ue(e.borderRadius)} ${ue(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${ue(e.borderRadius)} ${ue(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${ue(e.borderRadius)} ${ue(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${ue(e.borderRadius)} 0 0 ${ue(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:o,minHeight:o}}}}}},O5e=e=>{let{componentCls:t,itemActiveColor:r,itemHoverColor:n,iconCls:a,tabsHorizontalItemMargin:o,horizontalItemPadding:l,itemSelectedColor:u,itemColor:d}=e,p=`${t}-tab`;return{[p]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:l,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:d,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:r}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${p}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM},[`${p}-icon > svg`]:{display:"inline-block",verticalAlign:"middle",marginBlockEnd:"0.2em"}},"&-remove":{flex:"none",lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading},...Tn(e)},"&:hover":{color:n},[`&${p}-active ${p}-btn`]:{color:u},[`&${p}-focus ${p}-btn:focus-visible`]:gi(e),[`&${p}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${p}-disabled ${p}-btn, &${p}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${p}-remove ${a}`]:{margin:0,verticalAlign:"middle"},[`${a}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${p} + ${p}`]:{margin:{_skip_check_:!0,value:o}}}},z5e=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:r,iconCls:n,cardGutter:a,calc:o}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:r},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[n]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:e.marginSM}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:e.marginXS},marginLeft:{_skip_check_:!0,value:o(e.marginXXS).mul(-1).equal()},[n]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-body-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-body-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:a},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},L5e=e=>{let{componentCls:t,tabsCardPadding:r,cardHeight:n,cardGutter:a,itemHoverColor:o,itemActiveColor:l,colorBorderSecondary:u}=e;return{[t]:{...Mt(e),display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:r,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:{minWidth:n,minHeight:n,marginLeft:{_skip_check_:!0,value:a},background:"transparent",border:`${ue(e.lineWidth)} ${e.lineType} ${u}`,borderRadius:`${ue(e.borderRadiusLG)} ${ue(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:l},...Tn(e,-3)}},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"},...O5e(e),[`${t}-body`]:{position:"relative",width:"100%"},[`${t}-body-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-content`]:{...Tn(e),"&-hidden":{display:"none"}}},[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:"auto"}}}}}},H5e=e=>{let{cardHeight:t,cardHeightSM:r,cardHeightLG:n,controlHeight:a,controlHeightLG:o}=e,l=t||o,u=r||a,d=n||o+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:l,cardHeightSM:u,cardHeightLG:d,cardPadding:`${(l-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(u-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(d-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}},q5e=ct("Tabs",e=>{let t=vt(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${ue(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${ue(e.horizontalItemGutter)}`});return[R5e(t),z5e(t),P5e(t),N5e(t),j5e(t),L5e(t),_5e(t)]},H5e),W5e=()=>null,U5e=W5e,V5e=Qu.forwardRef((e,t)=>{let{type:r,className:n,rootClassName:a,size:o,onEdit:l,hideAdd:u,centered:d,addIcon:p,removeIcon:h,moreIcon:v,more:g,popupClassName:b,children:x,items:y,animated:E,style:F,indicatorSize:S,indicator:D,classNames:$,styles:C,destroyInactiveTabPane:B,destroyOnHidden:M,tabPlacement:I,tabPosition:j,...N}=e,{prefixCls:R}=N,{getPrefixCls:L,direction:q,getPopupContainer:W,className:U,style:P,classNames:H,styles:V}=wt("tabs"),{tabs:Q}=Qu.useContext(st),X=L("tabs",R),Z=xn(X),[O,z]=q5e(X,Z),K=Qu.useRef(null);Qu.useImperativeHandle(t,()=>({nativeElement:K.current}));let J;r==="editable-card"&&(J={onEdit:(be,{key:ye,event:Re})=>{l?.(be==="add"?Re:ye,be)},removeIcon:h??Q?.removeIcon??Qu.createElement(gd,null),addIcon:(p??Q?.addIcon)||Qu.createElement(c9,null),showAdd:u!==!0});let te=L(),ee=qr(o),ie=M5e(y,x),me=D5e(X,E),le={align:D?.align??Q?.indicator?.align,size:D?.size??S??Q?.indicator?.size??Q?.indicatorSize},he=Qu.useMemo(()=>{let be=I??j??void 0,ye=q==="rtl";switch(be){case"start":return ye?"right":"left";case"end":return ye?"left":"right";default:return be}},[I,j,q]),se={...e,size:ee,tabPlacement:he,items:ie},ke=Ue(P),De=Ue(F),[we,de]=Et([H,$],[V,ke,C,De],{props:se},{popup:{_default:"root"}});return Qu.createElement(F5e,{ref:K,direction:q,getPopupContainer:W,...N,items:ie,className:Y({[`${X}-large`]:ee==="large",[`${X}-small`]:ee==="small",[`${X}-card`]:["card","editable-card"].includes(r),[`${X}-editable-card`]:r==="editable-card",[`${X}-centered`]:d},U,n,a,we.root,O,z,Z),classNames:{...we,popup:Y(b,O,z,Z,we.popup?.root)},styles:{...de,popup:de.popup?.root},style:de.root,editable:J,more:{icon:Q?.more?.icon??Q?.moreIcon??v??Qu.createElement(sy,null),transitionName:`${te}-slide-up`,...g},prefixCls:X,animated:me,indicator:le,destroyOnHidden:M??B,tabPosition:he})}),QV=V5e;QV.TabPane=U5e;var dy=QV;var YV=A(_(),1),JV=A(xe(),1);function mg({value:e,onValueChange:t,onSearch:r,label:n,placeholder:a=n,disabled:o,className:l,inputRef:u,listId:d,activeOptionId:p}){let h=YV.useRef(null),v=u??h,g=Pb(),b=YV.useRef(!1),x=()=>{g.reset(),b.current=!1,t(""),r?.(""),v.current?.focus()};return(0,JV.jsx)(Lu,{className:et("wand-ui-search",l),startSlot:(0,JV.jsx)(Be,{name:"search",size:16}),clearable:!!e,clearLabel:"\u6E05\u7A7A\u641C\u7D22",onClear:x,ref:v,type:"search","aria-label":n,placeholder:a,value:e,disabled:o,autoComplete:"off",spellCheck:!1,role:d?"combobox":void 0,"aria-expanded":d?!0:void 0,"aria-autocomplete":d?"list":void 0,"aria-controls":d,"aria-activedescendant":p,onCompositionStart:()=>{b.current=!0,g.onCompositionStart()},onCompositionEnd:y=>{b.current=!1,g.onCompositionEnd(),r?.(y.currentTarget.value)},onChange:y=>{let E=y.currentTarget.value;t(E),b.current||r?.(E)},onKeyDown:y=>{g.shouldIgnore(y)||y.key==="Escape"&&e&&(y.preventDefault(),y.stopPropagation(),x())}})}var ZV=A(xe(),1);function b9({tabs:e,value:t,defaultValue:r,ariaLabel:n,className:a,orientation:o="horizontal",onValueChange:l}){return(0,ZV.jsx)(Bt,{children:(0,ZV.jsx)(dy,{className:a,"aria-label":n,activeKey:t,defaultActiveKey:r??e[0]?.value,tabPlacement:o==="vertical"?"start":"top",onChange:l,items:e.map(u=>({key:u.value,label:u.label,children:u.content,disabled:u.disabled}))})})}var eG=A(_()),G5e={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},K5e=G5e;function y9(){return y9=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y9.apply(this,arguments)}var X5e=(e,t)=>eG.createElement(Ut,y9({},e,{ref:t,icon:K5e})),Q5e=eG.forwardRef(X5e),w9=Q5e;var tG=A(_()),x9=A(_()),Fo=A(_()),hg=A(_()),Y5e=A(_()),wE=Y5e.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),J5e=e=>{let{antCls:t,componentCls:r,colorText:n,footerBg:a,headerHeight:o,headerPadding:l,headerColor:u,footerPadding:d,fontSize:p,bodyBg:h,headerBg:v}=e;return{[r]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:h,"&, *":{boxSizing:"border-box"},[`&${r}-has-sider`]:{flexDirection:"row",[`> ${r}, > ${r}-content`]:{width:0}},[`${r}-header, &${r}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${r}-header`]:{height:o,padding:l,color:u,lineHeight:ue(o),background:v,[`${t}-menu`]:{lineHeight:"inherit"}},[`${r}-footer`]:{padding:d,color:n,fontSize:p,background:a},[`${r}-content`]:{flex:"auto",color:n,minHeight:0}}},cG=e=>{let{colorBgLayout:t,controlHeight:r,controlHeightLG:n,colorText:a,controlHeightSM:o,marginXXS:l,colorTextLightSolid:u,colorBgContainer:d}=e,p=n*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:r*2,headerPadding:`0 ${p}px`,headerColor:a,footerPadding:`${o}px ${p}px`,footerBg:t,siderBg:"#001529",triggerHeight:n+l*2,triggerBg:"#002140",triggerColor:u,zeroTriggerWidth:n,zeroTriggerHeight:n,lightSiderBg:d,lightTriggerBg:d,lightTriggerColor:a}},dG=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]],xE=ct("Layout",J5e,cG,{deprecatedTokens:dG}),Z5e=e=>{let{componentCls:t,siderBg:r,motionDurationMid:n,motionDurationSlow:a,antCls:o,triggerHeight:l,triggerColor:u,triggerBg:d,headerHeight:p,zeroTriggerWidth:h,zeroTriggerHeight:v,borderRadiusLG:g,lightSiderBg:b,lightTriggerColor:x,lightTriggerBg:y,bodyBg:E}=e;return{[t]:{position:"relative",minWidth:0,background:r,transition:`all ${n}, background 0s`,"&-has-trigger":{paddingBottom:l},"&-right":{order:1},[`${t}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${o}-menu${o}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${t}-children`]:{overflow:"hidden"},[`${t}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:l,color:u,lineHeight:ue(l),textAlign:"center",background:d,cursor:"pointer",transition:`all ${n}`},[`${t}-zero-width-trigger`]:{position:"absolute",top:p,insetInlineEnd:e.calc(h).mul(-1).equal(),zIndex:1,width:h,height:v,color:u,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:r,borderRadius:`0 ${ue(g)} ${ue(g)} 0`,cursor:"pointer",transition:`background-color ${a} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${a}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(h).mul(-1).equal(),borderRadius:`${ue(g)} 0 0 ${ue(g)}`}},"&-light":{background:b,[`${t}-trigger`]:{color:x,background:y},[`${t}-zero-width-trigger`]:{color:x,background:y,border:`${ue(e.lineWidth)} ${e.lineType} ${E}`,borderInlineStart:0}}}}},exe=ct(["Layout","Sider"],Z5e,cG,{deprecatedTokens:dG}),rG={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1839.98px"},txe=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),gg=Fo.createContext({}),rxe=(()=>{let e=0;return(t="")=>(e+=1,`${t}${e}`)})(),nxe=Fo.forwardRef((e,t)=>{let{prefixCls:r,className:n,trigger:a,children:o,defaultCollapsed:l=!1,theme:u="dark",style:d={},collapsible:p=!1,reverseArrow:h=!1,width:v=200,collapsedWidth:g=80,zeroWidthTriggerStyle:b,breakpoint:x,onCollapse:y,onBreakpoint:E,classNames:F,styles:S,...D}=e,{siderHook:$}=(0,hg.useContext)(wE),[C,B]=qt(l,e.collapsed),[M,I]=(0,hg.useState)(!1),j=(le,he)=>{B(le),y?.(le,he)},N={...e,collapsed:C,defaultCollapsed:l,theme:u,style:d,collapsible:p,reverseArrow:h,width:v,collapsedWidth:g,zeroWidthTriggerStyle:b,breakpoint:x,onCollapse:y,onBreakpoint:E},[R,L]=Et([F],[S],{props:N}),{getPrefixCls:q,direction:W}=(0,hg.useContext)(st),U=q("layout-sider",r),[P,H]=exe(U),V=(0,hg.useRef)(null);V.current=le=>{I(le.matches),E?.(le.matches),C!==le.matches&&j(le.matches,"responsive")},(0,hg.useEffect)(()=>{function le(se){return V.current?.(se)}let he;return typeof window?.matchMedia<"u"&&x&&x in rG&&(he=window.matchMedia(`screen and (max-width: ${rG[x]})`),pr(he?.addEventListener)&&he.addEventListener("change",le),le(he)),()=>{pr(he?.removeEventListener)&&he.removeEventListener("change",le)}},[x]),(0,hg.useEffect)(()=>{let le=rxe("ant-sider-");return $.addSider(le),()=>$.removeSider(le)},[]);let Q=()=>{j(!C,"clickTrigger")},X=Vt(D,["collapsed"]),Z=C?g:v,O=txe(Z)?`${Z}px`:String(Z),z=Number.parseFloat(String(g||0))===0?Fo.createElement("span",{onClick:Q,className:Y(`${U}-zero-width-trigger`,`${U}-zero-width-trigger-${h?"right":"left"}`),style:b},a||Fo.createElement(w9,null)):null,K=W==="rtl"==!h,J={expanded:K?Fo.createElement(Du,null):Fo.createElement(yd,null),collapsed:K?Fo.createElement(yd,null):Fo.createElement(Du,null)}[C?"collapsed":"expanded"],te=a!==null?z||Fo.createElement("div",{className:`${U}-trigger`,onClick:Q,style:{width:O}},a||J):null,ee={...d,flex:`0 0 ${O}`,maxWidth:O,minWidth:O,width:O},ie=Y(U,`${U}-${u}`,{[`${U}-collapsed`]:!!C,[`${U}-has-trigger`]:p&&a!==null&&!z,[`${U}-below`]:!!M,[`${U}-zero-width`]:Number.parseFloat(O)===0},n,R.root,P,H),me=Fo.useMemo(()=>({siderCollapsed:C}),[C]);return Fo.createElement(gg.Provider,{value:me},Fo.createElement("aside",{className:ie,...X,style:{...L.root,...ee},ref:t},Fo.createElement("div",{className:Y(`${U}-children`,R.body),style:L.body},o),p||M&&z?te:null))}),EE=nxe,Ju=A(_()),axe=A(_()),ixe=A(_()),oxe=(0,ixe.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),yE=oxe,nG=A(_()),sxe=e=>{let{prefixCls:t,className:r,dashed:n,...a}=e,{getPrefixCls:o}=nG.useContext(st),l=o("menu",t),u=Y({[`${l}-item-divider-dashed`]:!!n},r);return nG.createElement(ny,{className:u,...a})},pG=sxe,Zu=A(_()),lxe=e=>{let{className:t,children:r,icon:n,title:a,danger:o,extra:l}=e,{prefixCls:u,firstLevel:d,direction:p,disableMenuItemTitleTooltip:h,tooltip:v,inlineCollapsed:g,styles:b,classNames:x}=Zu.useContext(yE),{siderCollapsed:y}=Zu.useContext(gg),E=!!(y||g),[F,S]=Zu.useState(!1);Zu.useEffect(()=>{S(!1)},[E]);let D=N=>{let R=r?.[0],L=Zu.createElement("span",{className:Y(`${u}-title-content`,d?x?.itemContent:x?.subMenu?.itemContent,{[`${u}-title-content-with-extra`]:!!l||l===0}),style:d?b?.itemContent:b?.subMenu?.itemContent},r);return(!n||Zu.isValidElement(r)&&r.type==="span")&&r&&N&&d&&typeof R=="string"?Zu.createElement("div",{className:`${u}-inline-collapsed-noicon`},R.charAt(0)):L},$=a;typeof a>"u"?$=d?r:"":a===!1&&($="");let C=v===!1?void 0:v,B=C&&C.title!==void 0?C.title:$,M={...C??null,title:B};E?(M.open=C?.open??F,M.onOpenChange=N=>{S(N),C?.onOpenChange?.(N)}):(M.title=null,M.open=!1);let I=Er(r).length,j=Zu.createElement(Ud,{...Vt(e,["title","icon","danger"]),className:Y(d?x?.item:x?.subMenu?.item,{[`${u}-item-danger`]:o,[`${u}-item-only-child`]:(n?I+1:I)===1},t),style:{...d?b?.item:b?.subMenu?.item,...e.style},title:typeof a=="string"?a:void 0,itemData:e?.itemData??{...e,key:e.eventKey}},Fr(n,N=>({className:Y(`${u}-item-icon`,d?x?.itemIcon:x?.subMenu?.itemIcon,N.className),style:{...d?b?.itemIcon:b?.subMenu?.itemIcon,...N.style}})),D(g));if(!h&&v!==!1){let N=C&&C.placement?C.placement:p==="rtl"?"left":"right",R=`${u}-inline-collapsed-tooltip`,L=W=>({...W,root:Y(R,W?.root)}),q=pr(C?.classNames)?W=>{let U=C.classNames(W);return L(U)}:L(C?.classNames);j=Zu.createElement(Ma,{...M,placement:N,classNames:q},j)}return j},fG=lxe,Zf=A(_()),k9=Zf.createContext(null),C9=Zf.forwardRef((e,t)=>{let{children:r,...n}=e,a=Zf.useContext(k9),o=Zf.useMemo(()=>({...a,...n}),[a,n.prefixCls,n.mode,n.selectable,n.rootClassName]),l=Sx(r),u=Qa(t,l?Pi(r):null);return Zf.createElement(k9.Provider,{value:o},Zf.createElement(id,{space:!0},l?Zf.cloneElement(r,{ref:u}):r))}),aG=k9,uxe=e=>{let{componentCls:t,motionDurationSlow:r,horizontalLineHeight:n,colorSplit:a,lineWidth:o,lineType:l,itemPaddingInline:u}=e;return{[`${t}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${ue(o)} ${l} ${a}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:u},[`> ${t}-item:hover,
228
+ > ${t}-item-active,
229
+ > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:["border-color","background-color"].map(d=>`${d} ${r}`).join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},cxe=uxe,dxe=({componentCls:e,menuArrowOffset:t,calc:r})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
230
+ ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${ue(r(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${ue(t)})`}}}}),pxe=dxe,iG=e=>gi(e),fxe=(e,t)=>{let{componentCls:r,itemColor:n,itemSelectedColor:a,subMenuItemSelectedColor:o,groupTitleColor:l,itemBg:u,subMenuItemBg:d,itemSelectedBg:p,activeBarHeight:h,activeBarWidth:v,activeBarBorderWidth:g,motionDurationSlow:b,motionEaseInOut:x,motionEaseOut:y,itemPaddingInline:E,motionDurationMid:F,itemHoverColor:S,lineType:D,colorSplit:$,itemDisabledColor:C,dangerItemColor:B,dangerItemHoverColor:M,dangerItemSelectedColor:I,dangerItemActiveBg:j,dangerItemSelectedBg:N,popupBg:R,itemHoverBg:L,itemActiveBg:q,menuSubMenuBg:W,horizontalItemSelectedColor:U,horizontalItemSelectedBg:P,horizontalItemBorderRadius:H,horizontalItemHoverBg:V}=e;return{[`${r}-${t}, ${r}-${t} > ${r}`]:{color:n,background:u,[`&${r}-root:focus-visible`]:{...iG(e)},[`${r}-item`]:{"&-group-title, &-extra":{color:l}},[`${r}-submenu-selected > ${r}-submenu-title`]:{color:o},[`${r}-item, ${r}-submenu-title`]:{color:n,[`&:not(${r}-item-disabled):focus-visible`]:{...iG(e)}},[`${r}-item-disabled, ${r}-submenu-disabled`]:{color:`${C} !important`},[`${r}-item:not(${r}-item-selected):not(${r}-submenu-selected)`]:{[`&:hover, > ${r}-submenu-title:hover`]:{color:S}},[`${r}-submenu:not(${r}-submenu-selected)`]:{[`> ${r}-submenu-title:hover`]:{color:S}},[`&:not(${r}-horizontal)`]:{[`${r}-item:not(${r}-item-selected)`]:{"&:hover":{backgroundColor:L},"&:active":{backgroundColor:q}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:L},"&:active":{backgroundColor:q}}},[`${r}-item-danger`]:{color:B,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:M}},[`&${r}-item:active`]:{background:j}},[`${r}-item a`]:{"&, &:hover":{color:"inherit"}},[`${r}-item-selected`]:{color:a,[`&${r}-item-danger`]:{color:I},"a, a:hover":{color:"inherit"}},[`& ${r}-item-selected`]:{backgroundColor:p,[`&${r}-item-danger`]:{backgroundColor:N}},[`&${r}-submenu > ${r}`]:{backgroundColor:W},[`&${r}-popup > ${r}`]:{backgroundColor:R},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:R},[`&${r}-horizontal`]:{...t==="dark"?{borderBottom:0}:{},[`> ${r}-item, > ${r}-submenu`]:{top:g,marginTop:e.calc(g).mul(-1).equal(),marginBottom:0,borderRadius:H,"&::after":{position:"absolute",insetInline:E,bottom:0,pointerEvents:"none",borderBottom:`${ue(h)} solid transparent`,transition:`border-color ${b} ${x}`,content:'""'},"&:hover, &-active, &-open":{background:V,"&::after":{borderBottomWidth:h,borderBottomColor:U}},"&-selected":{color:U,backgroundColor:P,"&:hover":{backgroundColor:P},"&::after":{borderBottomWidth:h,borderBottomColor:U}}}},[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${ue(g)} ${D} ${$}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:d},[`${r}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ue(v)} solid ${a}`,transform:"scaleY(0.0001)",opacity:0,transition:["transform","opacity"].map(Q=>`${Q} ${F} ${y}`).join(","),content:'""'},[`&${r}-item-danger`]:{"&::after":{borderInlineEndColor:I}}},[`${r}-selected, ${r}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform","opacity"].map(Q=>`${Q} ${F} ${x}`).join(",")}}}}}},oG=fxe,sG=e=>{let{componentCls:t,itemHeight:r,itemMarginInline:n,padding:a,menuArrowSize:o,marginXS:l,itemMarginBlock:u,itemWidth:d,itemPaddingInline:p}=e,h=e.calc(o).add(a).add(l).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:r,lineHeight:ue(r),paddingInline:p,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:u,width:d},[`> ${t}-item,
231
+ > ${t}-submenu > ${t}-submenu-title`]:{height:r,lineHeight:ue(r)},[`${t}-item-group-list ${t}-submenu-title,
232
+ ${t}-submenu-title`]:{paddingInlineEnd:h}}},mxe=e=>{let{componentCls:t,iconCls:r,itemHeight:n,colorTextLightSolid:a,dropdownWidth:o,controlHeightLG:l,padding:u,paddingXL:d,itemMarginInline:p,fontSizeLG:h,motionDurationSlow:v,paddingXS:g,boxShadowSecondary:b,collapsedWidth:x,collapsedIconSize:y}=e,E={height:n,lineHeight:ue(n),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:"none"},...sG(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...sG(e),boxShadow:b}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:o,maxHeight:`calc(100vh - ${ue(e.calc(l).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${v}`,`background-color ${v}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:E,[`& ${t}-item-group-title`]:{paddingInlineStart:d}},[`${t}-item`]:E}},{[`${t}-inline-collapsed`]:{width:x,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{transition:["border-color","background-color"].map(F=>`${F} ${v}`).join(","),[`> ${t}-inline-collapsed-noicon`]:{fontSize:h,textAlign:"center",width:"100%"}}},[`> ${t}-item,
233
+ > ${t}-item-group > ${t}-item-group-list > ${t}-item,
234
+ > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
235
+ > ${t}-submenu > ${t}-submenu-title`]:{display:"flex",alignItems:"center",justifyContent:"flex-start",insetInlineStart:0,paddingInline:`calc(50% - ${ue(e.calc(y).div(2).equal())} - ${ue(p)})`,textOverflow:"clip",[`
236
+ ${t}-submenu-arrow,
237
+ ${t}-submenu-expand-icon
238
+ `]:{opacity:0},[`> ${t}-title-content`]:{width:0,opacity:0,overflow:"hidden"},[`${t}-item-icon, ${r}`]:{margin:0,fontSize:y,lineHeight:ue(n),"+ span":{display:"inline-block",width:0,opacity:0,overflow:"hidden",marginInlineStart:0}}},[`${t}-item-icon, ${r}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${r}`]:{display:"none"},[`${t}-item-extra`]:{paddingInlineStart:u},"a, a:hover":{color:a}},[`${t}-item-group-title`]:{...fl,paddingInline:g}}}]},hxe=mxe,lG=e=>{let{componentCls:t,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:a,motionEaseOut:o,iconCls:l,iconSize:u,iconMarginInlineEnd:d}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${r}`,`background-color ${r}`,`padding calc(${r} + 0.1s) ${a}`].join(","),[`${t}-item-icon, ${l}`]:{minWidth:u,fontSize:u,transition:[`font-size ${n} ${o}`,`margin ${r} ${a}`,`color ${r}`].join(","),"+ span":{marginInlineStart:d,opacity:1,transition:[`opacity ${r} ${a}`,`margin ${r}`,`color ${r}`].join(",")}},[`${t}-item-icon`]:{...zp()},[`&${t}-item-only-child`]:{[`> ${l}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},uG=e=>{let{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,borderRadius:a,menuArrowSize:o,menuArrowOffset:l}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:o,color:"currentcolor",transform:"translateY(-50%)",transition:["transform","opacity"].map(u=>`${u} ${r}`).join(",")},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(o).mul(.6).equal(),height:e.calc(o).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:a,transition:["background-color","transform","top","color"].map(u=>`${u} ${r} ${n}`).join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${ue(e.calc(l).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${ue(l)})`}}}}},gxe=e=>{let{antCls:t,componentCls:r,fontSize:n,motionDurationSlow:a,motionDurationMid:o,motionEaseInOut:l,paddingXS:u,padding:d,colorSplit:p,lineWidth:h,zIndexPopup:v,borderRadiusLG:g,subMenuItemBorderRadius:b,menuArrowSize:x,menuArrowOffset:y,lineType:E,groupTitleLineHeight:F,groupTitleFontSize:S,iconSize:D,iconMarginInlineEnd:$}=e,C=[`> ${t}-typography-ellipsis-single-line`,`> ${r}-item-label > ${t}-typography-ellipsis-single-line`].join(",");return[{"":{[r]:{...Th(),"&-hidden":{display:"none"}}},[`${r}-submenu-hidden`]:{display:"none"}},{[r]:{...Mt(e),...Th(),marginBottom:0,paddingInlineStart:0,fontSize:n,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${a} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${r}-item`]:{flex:"none"}},[`${r}-item, ${r}-submenu, ${r}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${r}-item-group-title`]:{padding:`${ue(u)} ${ue(d)}`,fontSize:S,lineHeight:F,transition:`all ${a}`},[`&-horizontal ${r}-submenu`]:{transition:["border-color","background-color"].map(B=>`${B} ${a} ${l}`).join(",")},[`${r}-submenu, ${r}-submenu-inline`]:{transition:[`border-color ${a}`,`background-color ${a}`,`padding ${o}`].map(B=>`${B} ${l}`).join(",")},[`${r}-submenu ${r}-sub`]:{cursor:"initial",transition:["background-color","padding"].map(B=>`${B} ${a} ${l}`).join(",")},[`${r}-title-content`]:{transition:`color ${a}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%",minWidth:0},[`${r}-item-label`]:{flex:"auto",minWidth:0,...fl},[C]:{display:"inline",verticalAlign:"unset"},[`${r}-item-extra`]:{flex:"none",marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${r}-item-icon + ${r}-title-content-with-extra`]:{width:`calc(100% - ${ue(e.calc(D).add($??0).equal())})`},[`${r}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${r}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:p,borderStyle:E,borderWidth:0,borderTopWidth:h,marginBlock:h,padding:0,"&-dashed":{borderStyle:"dashed"}},...lG(e),[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${ue(e.calc(n).mul(2).equal())} ${ue(d)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:v,borderRadius:g,boxShadow:"none",transformOrigin:"0 0",[`&${r}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${r}`]:{borderRadius:g,...lG(e),...uG(e),[`${r}-item, ${r}-submenu > ${r}-submenu-title`]:{borderRadius:b},[`${r}-submenu-title::after`]:{transition:`transform ${a} ${l}`}}},"&-placement-leftTop, &-placement-bottomRight":{transformOrigin:"100% 0"},"&-placement-leftBottom, &-placement-topRight":{transformOrigin:"100% 100%"},"&-placement-rightBottom, &-placement-topLeft":{transformOrigin:"0 100%"},"&-placement-bottomLeft, &-placement-rightTop":{transformOrigin:"0 0"},"&-placement-leftTop, &-placement-leftBottom":{paddingInlineEnd:e.paddingXS},"&-placement-rightTop, &-placement-rightBottom":{paddingInlineStart:e.paddingXS},"&-placement-topRight, &-placement-topLeft":{paddingBottom:e.paddingXS},"&-placement-bottomRight, &-placement-bottomLeft":{paddingTop:e.paddingXS}},...uG(e),[`&-inline-collapsed ${r}-submenu-arrow,
239
+ &-inline ${r}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${ue(y)})`},"&::after":{transform:`rotate(45deg) translateX(${ue(e.calc(y).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${ue(e.calc(x).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${ue(e.calc(y).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${ue(y)})`}}}},{[`${t}-layout-header`]:{[r]:{lineHeight:"inherit"}}}]},vxe=e=>{let{colorPrimary:t,colorError:r,colorTextDisabled:n,colorErrorBg:a,colorText:o,colorTextDescription:l,colorBgContainer:u,colorFillAlter:d,colorFillContent:p,lineWidth:h,lineWidthBold:v,controlItemBgActive:g,colorBgTextHover:b,controlHeightLG:x,lineHeight:y,colorBgElevated:E,marginXXS:F,padding:S,fontSize:D,controlHeightSM:$,fontSizeLG:C,colorTextLightSolid:B,colorErrorHover:M}=e,I=e.activeBarWidth??0,j=e.activeBarBorderWidth??h,N=e.itemMarginInline??e.marginXXS,R=new Ar(B).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:o,itemColor:o,colorItemTextHover:o,itemHoverColor:o,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:l,groupTitleColor:l,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:u,itemBg:u,colorItemBgHover:b,itemHoverBg:b,colorItemBgActive:p,itemActiveBg:g,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:g,itemSelectedBg:g,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:I,colorActiveBarHeight:v,activeBarHeight:v,colorActiveBarBorderSize:h,activeBarBorderWidth:j,colorItemTextDisabled:n,itemDisabledColor:n,colorDangerItemText:r,dangerItemColor:r,colorDangerItemTextHover:r,dangerItemHoverColor:r,colorDangerItemTextSelected:r,dangerItemSelectedColor:r,colorDangerItemBgActive:a,dangerItemActiveBg:a,colorDangerItemBgSelected:a,dangerItemSelectedBg:a,itemMarginInline:N,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:x,groupTitleLineHeight:y,collapsedWidth:x*2,popupBg:E,itemMarginBlock:F,itemPaddingInline:S,horizontalLineHeight:`${x*1.15}px`,iconSize:D,iconMarginInlineEnd:$-D,collapsedIconSize:C,groupTitleFontSize:D,darkItemDisabledColor:new Ar(B).setA(.25).toRgbString(),darkItemColor:R,darkDangerItemColor:r,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:B,darkItemSelectedBg:t,darkDangerItemSelectedBg:r,darkItemHoverBg:"transparent",darkGroupTitleColor:R,darkItemHoverColor:B,darkDangerItemHoverColor:M,darkDangerItemSelectedColor:B,darkDangerItemActiveBg:r,itemWidth:I?`calc(100% + ${j}px)`:`calc(100% - ${N*2}px)`}},bxe=(e,t=e,r=!0)=>ct("Menu",n=>{let{colorBgElevated:a,controlHeightLG:o,fontSize:l,darkItemColor:u,darkDangerItemColor:d,darkItemBg:p,darkSubMenuItemBg:h,darkItemSelectedColor:v,darkItemSelectedBg:g,darkDangerItemSelectedBg:b,darkItemHoverBg:x,darkGroupTitleColor:y,darkItemHoverColor:E,darkItemDisabledColor:F,darkDangerItemHoverColor:S,darkDangerItemSelectedColor:D,darkDangerItemActiveBg:$,popupBg:C,darkPopupBg:B}=n,M=n.calc(l).div(7).mul(5).equal(),I=vt(n,{menuArrowSize:M,menuHorizontalHeight:n.calc(o).mul(1.15).equal(),menuArrowOffset:n.calc(M).mul(.25).equal(),menuSubMenuBg:a,calc:n.calc,popupBg:C}),j=vt(I,{itemColor:u,itemHoverColor:E,groupTitleColor:y,itemSelectedColor:v,subMenuItemSelectedColor:v,itemBg:p,popupBg:B,subMenuItemBg:h,itemActiveBg:"transparent",itemSelectedBg:g,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:x,itemDisabledColor:F,dangerItemColor:d,dangerItemHoverColor:S,dangerItemSelectedColor:D,dangerItemActiveBg:$,dangerItemSelectedBg:b,menuSubMenuBg:h,horizontalItemSelectedColor:v,horizontalItemSelectedBg:g});return[gxe(I),cxe(I),hxe(I),oG(I,"light"),oG(j,"dark"),pxe(I),wb(I),Ho(I,"slide-up"),Ho(I,"slide-down"),Fu(I,"zoom-big")]},vxe,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:r,unitless:{groupTitleLineHeight:!0}})(e,t),Rl=A(_()),yxe=e=>{let{popupClassName:t,icon:r,title:n,theme:a}=e,o=Rl.useContext(yE),{prefixCls:l,inlineCollapsed:u,theme:d,classNames:p,styles:h}=o,v=Wd(),g;if(!r)g=u&&!v.length&&n&&typeof n=="string"?Rl.createElement("div",{className:`${l}-inline-collapsed-noicon`},n.charAt(0)):Rl.createElement("span",{className:`${l}-title-content`},n);else{let y=Rl.isValidElement(n)&&n.type==="span";g=Rl.createElement(Rl.Fragment,null,Fr(r,E=>({className:Y(E.className,`${l}-item-icon`,p?.itemIcon),style:{...E.style,...h?.itemIcon}})),y?n:Rl.createElement("span",{className:`${l}-title-content`},n))}let b=Rl.useMemo(()=>({...o,firstLevel:!1}),[o]),[x]=Jp("Menu");return Rl.createElement(yE.Provider,{value:b},Rl.createElement(dg,{...Vt(e,["icon"]),title:g,classNames:{list:p?.subMenu?.list,listTitle:p?.subMenu?.itemTitle},styles:{list:h?.subMenu?.list,listTitle:h?.subMenu?.itemTitle},popupClassName:Y(l,t,p?.popup?.root,`${l}-${a||d}`),popupStyle:{zIndex:x,...e.popupStyle,...h?.popup?.root}}))},mG=yxe;function E9(e){return e===null||e===!1}var wxe={item:fG,submenu:mG,divider:pG},xxe=(0,axe.forwardRef)((e,t)=>{let r=Ju.useContext(aG),n=r||{},{prefixCls:a,className:o,style:l,theme:u="light",expandIcon:d,_internalDisableMenuItemTitleTooltip:p,tooltip:h,inlineCollapsed:v,siderCollapsed:g,rootClassName:b,mode:x,selectable:y,onClick:E,overflowedIndicatorPopupClassName:F,classNames:S,styles:D,...$}=e,{menu:C}=Ju.useContext(st),{getPrefixCls:B,getPopupContainer:M,direction:I,className:j,style:N,classNames:R,styles:L}=wt("menu"),q=B(),W=Vt($,["collapsedWidth"]);n.validator?.({mode:x});let U=xt((...se)=>{E?.(...se),n.onClick?.()}),P=n.mode||x,H=y??n.selectable,V=v??g,Q={...e,mode:P,inlineCollapsed:V,selectable:H,theme:u},X=Ue(N),Z=Ue(l),[O,z]=Et([R,S],[L,X,D,Z],{props:Q},{popup:{_default:"root"},subMenu:{_default:"item"}}),K={horizontal:{motionName:`${q}-slide-up`},inline:yb(q),other:{motionName:`${q}-zoom-big`}},J=B("menu",a||n.prefixCls),te=xn(J),[ee,ie]=bxe(J,te,!r),me=Y(`${J}-${u}`,j,o),le=Ju.useMemo(()=>{if(pr(d)||E9(d))return d||null;if(pr(n.expandIcon)||E9(n.expandIcon))return n.expandIcon||null;if(pr(C?.expandIcon)||E9(C?.expandIcon))return C?.expandIcon||null;let se=d??n?.expandIcon??C?.expandIcon;return Fr(se,{className:Y(`${J}-submenu-expand-icon`,Ju.isValidElement(se)?se.props?.className:void 0)})},[d,n?.expandIcon,C?.expandIcon,J]),he=Ju.useMemo(()=>({prefixCls:J,inlineCollapsed:V||!1,direction:I,firstLevel:!0,theme:u,mode:P,disableMenuItemTitleTooltip:p,tooltip:h,classNames:O,styles:z}),[J,V,I,p,u,P,O,z,h]);return Ju.createElement(aG.Provider,{value:null},Ju.createElement(yE.Provider,{value:he},Ju.createElement(iy,{getPopupContainer:M,overflowedIndicator:Ju.createElement(sy,null),overflowedIndicatorPopupClassName:Y(J,`${J}-${u}`,F),classNames:{list:O.list,listTitle:O.itemTitle},styles:{list:z.list,listTitle:z.itemTitle},mode:P,selectable:H,onClick:U,...W,inlineCollapsed:V,style:z.root,className:me,prefixCls:J,direction:I,defaultMotions:K,expandIcon:le,ref:t,rootClassName:Y(b,ee,n.rootClassName,ie,te,O.root),_internalComponents:wxe})))}),Exe=xxe,py=(0,x9.forwardRef)((e,t)=>{let r=(0,x9.useRef)(null),n=tG.useContext(gg);return(0,x9.useImperativeHandle)(t,()=>({menu:r.current,focus:a=>{r.current?.focus(a)}})),tG.createElement(Exe,{ref:r,...e,...n})});py.Item=fG;py.SubMenu=mG;py.Divider=pG;py.ItemGroup=ry;var S9=py;var Vd={open:!1,src:"",label:"",items:[],current:0},A9=new Set,F9;function $9(e){Vd={...Vd,...e};for(let t of A9)t()}function D9(e){return e.startsWith("data:image/")||e.startsWith("blob:")||e.startsWith("/")||/^https?:\/\//i.test(e)}var Ol={afterClosed(){if(Vd.open)return;let e=F9;F9=void 0,e?.()},subscribe(e){return A9.add(e),()=>A9.delete(e)},getSnapshot(){return Vd},isOpen(){return Vd.open},close(){$9({open:!1,src:"",label:"",items:[],current:0})},closeIfOpen(){return Vd.open?(this.close(),!0):!1},open(e,t=""){return this.openGroup([{src:e,label:t}])},openGroup(e,t=0,r){let n=e[t];if(!Number.isInteger(t)||!n||!D9(n.src.trim()))return!1;let a=e.map(l=>({src:l.src.trim(),label:l.label?.trim()||"\u56FE\u7247"})).filter(l=>D9(l.src)),o=e.slice(0,t).filter(l=>D9(l.src.trim())).length;return F9=r,$9({open:!0,items:a,current:o,src:a[o].src,label:a[o].label}),!0},select(e){let t=Vd.items[e];!Vd.open||!Number.isInteger(e)||!t||$9({current:e,src:t.src,label:t.label||"\u56FE\u7247"})}};var kxe=".markdown-content img, .wand-markdown-preview img, .inline-tool-image-thumb, .user-attachment-thumb";function B9(e){e.focus({preventScroll:!0});let t=e.closest(".chat-message")??e.closest('[data-chat-renderer="canonical"]')??e.closest(".wand-markdown-preview, .markdown-content, .chat-activity-detail-section"),r=t?Array.from(t.querySelectorAll(kxe)).filter(a=>!a.closest('[hidden], [inert], [data-image-state="error"]')&&!(a.complete&&a.naturalWidth===0)):[e],n=r.indexOf(e);return n<0?Ol.open(e.currentSrc||e.src,e.alt):Ol.openGroup(r.map(a=>({src:a.currentSrc||a.src,label:a.alt})),n)}function hG(e=0){return{open:!1,revision:e,request:null,status:"idle",file:null,failure:null,editing:!1,draft:"",baseline:"",dirty:!1,saving:!1,wrap:!1,fontSize:Y0(),imageZoomed:!1}}function Cxe(e){return e==="exit-edit"?{title:"\u653E\u5F03\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\uFF1F",message:"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u9000\u51FA\u7F16\u8F91\u540E\u4F1A\u4E22\u5931\u3002"}:e==="replace"?{title:"\u5207\u6362\u9884\u89C8\u6587\u4EF6\uFF1F",message:"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5207\u6362\u540E\u4F1A\u4E22\u5931\u3002"}:{title:"\u653E\u5F03\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\uFF1F",message:"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5173\u95ED\u540E\u4F1A\u4E22\u5931\u3002"}}var Sxe={async confirmDiscard(e){let t=Cxe(e),r=await gn.dialog({title:t.title,description:t.message,tone:"warning",actions:[{label:"\u7EE7\u7EED\u7F16\u8F91",value:!1,kind:"secondary",autoFocus:!0},{label:"\u653E\u5F03\u4FEE\u6539",value:!0,kind:"danger"}],dismissable:!0});return r.dismissed===!1&&r.action===!0},async copyText(e){await _f(e)},appendToComposer(){return!1},notify(e,t){gn.toast(e,{tone:t})},onSaved(){}};function Fxe(e){let t=new Set,r=hG(),n=e.runtime??Sxe,a=0,o=null;function l(g){r={...r,...g,revision:r.revision+1};for(let b of t)b()}function u(){o?.abort(),o=null,a+=1,r=hG(r.revision+1);for(let g of t)g()}async function d(g){if(!r.dirty||!r.request)return!0;try{return await n.confirmDiscard(g,r.request.path)}catch(b){return n.notify(ii(b,"\u65E0\u6CD5\u786E\u8BA4\u662F\u5426\u653E\u5F03\u4FEE\u6539\u3002").message,"error"),!1}}async function p(g){o?.abort();let b=new AbortController;o=b;let x=++a;l({open:!0,request:g,status:"loading",file:null,failure:null,editing:!1,draft:"",baseline:"",dirty:!1,saving:!1,wrap:!1,fontSize:Y0(),imageZoomed:!1});try{let y=await e.repository.load(g.path,{signal:b.signal});if(x!==a||b.signal.aborted||!r.open)return!1;if(o=null,y.ok===!1)return l({status:"error",failure:y.failure}),!1;let E=y.file.kind==="text"?y.file.content??"":"";return l({status:"ready",file:y.file,failure:null,draft:E,baseline:E}),!0}catch(y){return x!==a||b.signal.aborted||$d(y)||!r.open||(o=null,l({status:"error",failure:ii(y,"\u52A0\u8F7D\u9884\u89C8\u5931\u8D25")})),!1}}async function h(g,b){try{return await n.copyText(g),n.notify(b,"success"),!0}catch(x){return n.notify(ii(x,"\u590D\u5236\u5931\u8D25\u3002").message,"error"),!1}}async function v(g){if(!r.open)return!1;switch(g.type){case"close":return r.saving?!1:r.dirty?await d("close")?(u(),!0):!1:(u(),!0);case"navigate":{if(r.editing||r.saving)return!1;let b=mA(r.request,g.direction);return!b||!r.request?!1:p({...r.request,path:b.path})}case"edit.enter":{if(r.status!=="ready"||r.file?.kind!=="text"||r.saving)return!1;let b=r.file.content??"";return l({editing:!0,draft:b,baseline:b,dirty:!1,failure:null}),!0}case"edit.change":return!r.editing||r.saving?!1:(l({draft:g.value,dirty:g.value!==r.baseline,failure:null}),!0);case"edit.revert":return!r.editing||r.saving?!1:(l({draft:r.baseline,dirty:!1,failure:null}),!0);case"edit.exit":return!r.editing||r.saving||!await d("exit-edit")?!1:(l({editing:!1,draft:r.baseline,dirty:!1,failure:null}),!0);case"edit.save":{if(!r.editing||r.saving||r.file?.kind!=="text"||!r.request)return!1;if(r.draft===r.baseline)return n.notify("\u6CA1\u6709\u6539\u52A8","info"),!0;let b=r.file.path,x=r.request.path,y=a,E=r.draft;l({saving:!0,failure:null});try{let F=await e.repository.save(b,E);if(!r.open||r.request?.path!==x||y!==a)return!1;if(F.ok===!1)return l({saving:!1,failure:F.failure}),n.notify(F.failure.message,"error"),!1;let S=r.file;l({saving:!1,file:S&&{...S,content:E,size:F.result.size},baseline:E,draft:E,dirty:!1,failure:null}),n.notify("\u5DF2\u4FDD\u5B58","success");try{await n.onSaved(b)}catch{}return!0}catch(F){if(!r.open||r.request?.path!==x||y!==a)return!1;let S=ii(F,"\u4FDD\u5B58\u5931\u8D25\uFF1A\u7F51\u7EDC\u9519\u8BEF");return l({saving:!1,failure:S}),n.notify(S.message,"error"),!1}}case"copy.path":return r.file?h(r.file.path,"\u5DF2\u590D\u5236\u8DEF\u5F84"):!1;case"copy.content":return r.file?.kind==="text"?h(r.file.content??"","\u5DF2\u590D\u5236\u5185\u5BB9"):!1;case"composer.path":{if(!r.file)return!1;let b=n.appendToComposer(r.file.path);return n.notify(b?"\u5DF2\u7C98\u8D34\u5230\u8F93\u5165\u6846":"\u65E0\u6CD5\u7C98\u8D34\u5230\u8F93\u5165\u6846",b?"success":"error"),b}case"composer.cat":{if(!r.file)return!1;let b=n.appendToComposer(`cat -- ${gA(r.file.path)}`);return n.notify(b?"\u547D\u4EE4\u5DF2\u7C98\u8D34\u5230\u8F93\u5165\u6846":"\u65E0\u6CD5\u7C98\u8D34\u5230\u8F93\u5165\u6846",b?"success":"error"),b}case"view.wrap.toggle":return r.file?.kind!=="text"||r.editing?!1:(l({wrap:!r.wrap}),!0);case"view.font.adjust":return r.file?.kind!=="text"||r.editing?!1:(l({fontSize:R1(r.fontSize+g.delta)}),!0);case"view.image.zoom.toggle":return r.file?.kind!=="image"||r.editing?!1:(l({imageZoomed:!r.imageZoomed}),!0)}}return{controller:{async open(g){let b=fA(g);return b?r.open&&r.request?.path===b.path&&!r.dirty?(l({request:b}),!0):r.open&&r.dirty&&!await d("replace")?!1:p(b):!1},execute:v,closeIfOpen(){return r.open?(v({type:"close"}),!0):!1},closeTopmost(){return this.closeIfOpen()},isOpen(){return r.open}},store:{subscribe(g){return t.add(g),()=>t.delete(g)},getSnapshot(){return r}},configureRuntime(g){let b=n;return n=g,()=>{n===g&&(n=b)}}}}var I9=Fxe({repository:vA}),Ws=I9.controller,em=I9.store,M9=I9.configureRuntime;function $xe(e,t){return e.index===t.index&&e.name===t.name&&e.size===t.size&&e.sizeLabel===t.sizeLabel&&e.previewUrl===t.previewUrl}function Dxe(e,t){if(e.target!==t.target||e.items.length!==t.items.length)return!1;for(let r=0;r<e.items.length;r+=1)if(!$xe(e.items[r],t.items[r]))return!1;return!0}var Axe=class extends vl{constructor(){super(Dxe)}},kE=new Axe;function JE(e,t,r){if(e===null||typeof e!="object")return t?.kind==="value"&&Object.is(t.value,e)?t:{revision:r(),kind:"value",value:e};let n=Array.isArray(e)?"array":"object",a=Object.keys(e),o=Array.isArray(e)?e.length:void 0,l=t?.kind===n&&t.length===o&&a.length===t.keys?.length&&a.every((d,p)=>d===t.keys[p]),u=a.map((d,p)=>JE(e[d],l?t.children[p]:void 0,r));return l&&u.every((d,p)=>d===t.children[p])?t:{revision:r(),kind:n,keys:a,length:o,children:u}}var $K=class{constructor(){ae(this,"generation",0),ae(this,"revision",0),ae(this,"sessionId",null),ae(this,"messages",[]),ae(this,"rows",[]),ae(this,"structure")}reset(){this.generation++,this.sessionId=null,this.messages=[],this.rows=[],this.structure=void 0}prepare(e,t,r,n){let a=this.sessionId===e,o=()=>++this.revision,l=t.map((h,v)=>JE(h,a?this.messages[v]:void 0,o)),u=r(l.map(h=>h.revision)),d=l.map((h,v)=>JE({message:h.revision,dependencies:u[v]},a?this.rows[v]:void 0,o)),p=JE(n,a?this.structure:void 0,o);return{generation:this.generation,sessionId:e,messages:l,rows:d,structure:p,changedIndices:d.flatMap((h,v)=>!a||h!==this.rows[v]?[v]:[]),structureChanged:!a||p!==this.structure}}commit(e){e.generation===this.generation&&(this.sessionId=e.sessionId,this.messages=e.messages,this.rows=e.rows,this.structure=e.structure)}};function Bxe(e,t){return e===!1?!1:e===!0?!0:!t}function Ixe(e){if(!e)return!1;var t=e;if(t.__wandAmbiguousDelivery===!0||t.errorCode==="duplicate_idempotency_key"||t.errorCode==="duplicate_queued_message")return!0;if(typeof t.httpStatus=="number")return t.httpStatus>=500||t.httpStatus===408||t.httpStatus===409;var r=t.message==null?"":String(t.message);return r?/failed to fetch|networkerror|load failed|network connection was lost|aborted|aborterror|err_network|err_connection/i.test(r):!1}function rB(e){return!e}function gG(e){let t=e.attachments.map(r=>[r.name,r.size,r.file.lastModified||0].join(":")).join("|");return e.text.trim()+"\0"+t}var Mxe=class{constructor(e){ae(this,"dependencies",e),ae(this,"sessions",new Map),ae(this,"listeners",new Set),ae(this,"revision",0)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}notify(){for(let e of this.listeners)e()}session(e){let t=this.sessions.get(e);if(!t){let r="";try{r=this.dependencies.storage().getItem("wand-draft-"+e)??""}catch{}t={text:r,attachments:[],memoryOnly:!1,revision:++this.revision,submissions:new Map},this.sessions.set(e,t)}return t}read(e){let t=e?this.session(e):null;return{text:t?.text??"",attachments:t?.attachments.slice()??[],memoryOnly:t?.memoryOnly??!1,revision:t?.revision??0,recovery:t?.recovery?.payload??null,queueRetrieval:t?.queueRetrieval?{text:t.queueRetrieval.text,status:t.queueRetrieval.status}:null,queueRemoval:t?.queueRemoval?{text:t.queueRemoval.text,status:t.queueRemoval.status}:null}}isCurrentRevision(e,t){return this.sessions.get(e)?.revision===t}writeText(e,t,r,n){if(t.text!==r&&(t.revision=++this.revision),t.text=r,n===!1){t.memoryOnly=!0;try{this.dependencies.storage().removeItem("wand-draft-"+e)}catch{}}else if(Bxe(n,this.dependencies.isUnloading())){t.memoryOnly=!1;try{this.dependencies.storage().setItem("wand-draft-"+e,r)}catch{}}}edit(e,t){if(!e||"text"in t&&t.expectedRevision!==void 0&&!this.sessions.has(e))return!1;let r=this.session(e);if("text"in t){if(t.expectedRevision!==void 0&&t.expectedRevision!==r.revision)return!1;this.writeText(e,r,t.text,t.persist)}else if("preserve"in t)this.writeText(e,r,t.preserve,!r.memoryOnly);else if("addAttachment"in t)r.attachments.push(t.addAttachment),r.revision=++this.revision;else if("removeAttachment"in t){if(t.removeAttachment<0||t.removeAttachment>=r.attachments.length)return!1;let[n]=r.attachments.splice(t.removeAttachment,1);this.dependencies.disposeAttachment(n),r.revision=++this.revision}else{if("acknowledgeRevision"in t)return r.revision!==t.acknowledgeRevision?!1:(r.attachments.forEach(this.dependencies.disposeAttachment),r.attachments=[],this.edit(e,{clear:!0}));if("forgetRecovery"in t)r.recovery?.payload.attachments.forEach(this.dependencies.disposeAttachment),r.recovery=void 0,r.revision=++this.revision;else if("recoverCapture"in t){let n=r.recovery;return n?(r.recovery=void 0,this.edit(e,{restore:n.payload,persist:n.persist})):!1}else if("restore"in t){let n=t.restore.text,a=r.text;this.writeText(e,r,a&&a!==n?n?n+`
240
+ `+a:a:n,t.persist),t.restore.attachments.length>0&&(r.attachments=[...t.restore.attachments,...r.attachments.filter(o=>!t.restore.attachments.includes(o))],r.revision=++this.revision)}else{r.revision=++this.revision,r.text="",r.memoryOnly=!1;try{this.dependencies.storage().removeItem("wand-draft-"+e)}catch{}}}return this.notify(),!0}beginQueueRetrieval(e,t){let r=this.session(e);if(r.queueRetrieval)return null;let n={};return r.queueRetrieval={text:t,status:"pending",token:n},this.notify(),n}finishQueueRetrieval(e,t,r){let n=this.sessions.get(e)?.queueRetrieval;return!n||n.token!==t?!1:(n.status=r,this.notify(),!0)}restoreQueueRetrieval(e){let t=this.sessions.get(e);if(!t?.queueRetrieval||t.queueRetrieval.status!=="confirmed")return!1;let r=t.queueRetrieval.text;return t.queueRetrieval=void 0,this.edit(e,{text:t.text?t.text+`
241
+
242
+ `+r:r,persist:!t.memoryOnly})}dismissQueueRetrieval(e){let t=this.sessions.get(e);!t?.queueRetrieval||t.queueRetrieval.status==="pending"||(t.queueRetrieval=void 0,this.notify())}beginQueueRemoval(e,t){let r=this.session(e);if(r.queueRemoval||!t.length)return null;let n={};return r.queueRemoval={text:t.join(`
243
+
244
+ `),status:"pending",token:n},this.notify(),n}finishQueueRemoval(e,t,r){let n=this.sessions.get(e)?.queueRemoval;return!n||n.token!==t?!1:(n.status=r,this.notify(),!0)}restoreQueueRemoval(e){let t=this.sessions.get(e);if(!t?.queueRemoval||t.queueRemoval.status!=="confirmed")return!1;let r=t.queueRemoval.text;return t.queueRemoval=void 0,this.edit(e,{text:t.text?t.text+`
245
+
246
+ `+r:r,persist:!t.memoryOnly})}dismissQueueRemoval(e){let t=this.sessions.get(e);!t?.queueRemoval||t.queueRemoval.status==="pending"||(t.queueRemoval=void 0,this.notify())}transfer(e,t,r){let n=this.sessions.get(e);if(!n||n.revision!==r||n.submissions.size)return!1;let a=this.session(t);return a.text||a.attachments.length||a.submissions.size?!1:(a.attachments=n.attachments,a.revision=++this.revision,n.attachments=[],this.writeText(t,a,n.text,!n.memoryOnly),this.edit(e,{clear:!0}),this.notify(),!0)}pendingSubmission(e,t){return e?this.session(e).submissions.get(gG(t))??null:null}submit(e,t,r){let n=this.session(e),a={text:t,attachments:n.attachments.slice()},o=gG(a),l=n.submissions.get(o);if(l)return l;n.attachments=[],this.edit(e,{clear:!0});let u=Promise.resolve().then(()=>r(a)).then(d=>(a.attachments.forEach(this.dependencies.disposeAttachment),d),d=>{if(this.sessions.get(e)===n){let p=!Ixe(d);e.startsWith("conversation-draft:")&&(n.text||n.attachments.length)?(n.recovery?.payload.attachments.forEach(this.dependencies.disposeAttachment),n.recovery={payload:a,persist:p},n.revision=++this.revision,this.notify()):this.edit(e,{restore:a,persist:p})}else a.attachments.forEach(this.dependencies.disposeAttachment);throw d}).finally(()=>{n.submissions.get(o)===u&&n.submissions.delete(o)});return n.submissions.set(o,u),u}discardScope(e){for(let[t,r]of this.sessions)if(t.startsWith(e)){new Set([...r.attachments,...r.recovery?.payload.attachments??[]]).forEach(this.dependencies.disposeAttachment),this.sessions.delete(t);try{this.dependencies.storage().removeItem("wand-draft-"+t)}catch{}}try{let t=this.dependencies.storage();for(let r=(t.length??0)-1;r>=0;r--){let n=t.key?.(r);n?.startsWith("wand-draft-"+e)&&t.removeItem(n)}}catch{}this.notify()}retain(e){for(let[t,r]of this.sessions)if(!(e.has(t)||t.startsWith("conversation-draft:"))){r.attachments.forEach(this.dependencies.disposeAttachment),this.sessions.delete(t);try{this.dependencies.storage().removeItem("wand-draft-"+t)}catch{}}}},Txe=class{constructor(){ae(this,"versions",new Map)}read(e){return{...this.versions.get(e)??{revision:0,epoch:0}}}advance(e,t){let r=this.read(e);return t==="server"?r.epoch+=1:r.revision+=1,this.versions.set(e,r),{...r}}filter(e,t,r){let n=this.read(t);if(n.revision===r.revision&&n.epoch===r.epoch)return e;let{queuedMessages:a,...o}=e;return o}rollback(e,t,r,n,a){let o=this.read(e);if(o.epoch!==n.epoch||!a&&o.revision!==n.revision)return null;let l=r.slice();if(a){l=t.slice();let u=l[a.index]===a.text?a.index:l.lastIndexOf(a.text);if(u<0)return null;l.splice(u,1)}return this.advance(e,"local"),l}},vG=8,My=12,ZB=96*1024;function _xe(e){return Math.max(0,e.scrollHeight-e.clientHeight-Math.abs(e.scrollTop))}function jxe(e){return e.clientHeight>0&&_xe(e)<e.clientHeight*2}var Nxe=class{constructor(){ae(this,"attempt","")}canAttempt(e,t,r=!1){return r||this.attempt!==`${e}\0${t}`}attempted(e,t){this.attempt=`${e}\0${t}`}},At=new Mxe({storage:()=>localStorage,isUnloading:()=>!!m.pageUnloading,disposeAttachment:e=>{e.previewUrl&&URL.revokeObjectURL(e.previewUrl)}}),ui=new Txe,oc=new Map,eI=rf.configPath,nB="wand-chat-expand-state-v1",CE=[function(){},function(){localStorage.setItem("wand-sidebar-pinned","true"),localStorage.setItem("wand-sidebar-collapsed","false")}];(function(){try{var e=localStorage.getItem("wand-ls-schema"),t=e==null?0:parseInt(e,10);t>=0||(t=0);for(var r=t;r<CE.length;r++)try{CE[r]()}catch{}t<CE.length&&localStorage.setItem("wand-ls-schema",String(CE.length))}catch{}})();function Ty(e,t){try{var r=localStorage.getItem(e);return r==="true"?!0:r==="false"?!1:t}catch{return t}}function Qr(e,t){try{localStorage.setItem(e,String(!!t))}catch{}}var m={selectedId:(function(){try{var e=new URL(window.location.href),t=e.searchParams.get("session");if(t)return t}catch{}if(Ou())return null;try{return localStorage.getItem("wand-selected-session")||null}catch{return null}})(),pollTimer:null,config:null,sessions:[],terminal:null,terminalFitAddon:null,terminalWriteQueue:Promise.resolve(),terminalWriteGeneration:0,terminalRestoreGeneration:0,terminalRestoring:!1,terminalStatesBySession:{},terminalSessionId:null,terminalOutput:"",terminalLiveStreamSessions:{},terminalHealthTimer:null,terminalAutoFollow:!0,terminalProgrammaticScrollUntil:0,showTerminalJumpToBottom:!1,terminalViewportEl:null,terminalViewportScrollHandler:null,terminalViewportTouchHandler:null,terminalViewportTouchStartHandler:null,terminalComposing:!1,composerComposing:!1,composerCompositionGeneration:0,composerCompositionTarget:null,resizeObserver:null,resizeHandler:null,resizeTimer:null,inputQueue:Promise.resolve(),pendingMessages:[],messageQueue:[],crossSessionQueue:(function(){try{var e=localStorage.getItem("wand-cross-session-queue"),t=e?JSON.parse(e):[];return Array.isArray(t)?t:[]}catch{return[]}})(),structuredInputQueue:[],queueBarExpanded:!1,queueBarDrag:null,queueBarPromoting:!1,pageUnloading:!1,promptOptimizeRequest:null,actionError:null,loginPending:!1,loginChecked:!1,loginLockUntil:0,loginLockTicker:0,sessionsDrawerOpen:Ty("wand-sidebar-open",!1),sidebarPinned:Ty("wand-sidebar-pinned",!0),sidebarCollapsed:Ty("wand-sidebar-collapsed",!1),chatMode:"managed",chatModels:(function(){try{var e=localStorage.getItem("wand-chat-model")||"",t={};return Iu.forEach(function(n){t[n]=localStorage.getItem("wand-chat-model-"+n)||(n==="claude"?e:"")}),t}catch{var r={};return Iu.forEach(function(n){r[n]=""}),r}})(),chatModel:(function(){try{return localStorage.getItem("wand-chat-model")||""}catch{return""}})(),chatThinking:(function(){try{var e=localStorage.getItem("wand-thinking-effort")||"off";return e==="off"||e==="standard"||e==="deep"||e==="max"||k2(e)?e:"off"}catch{return"off"}})(),availableModels:[],availableCodexModels:[],availableOpenCodeModels:[],availableGrokModels:[],availableQoderModels:[],availablePiModels:[],providerThinkingEfforts:{},modelCatalogRevision:"",modelsRefreshing:!1,sessionTool:"claude",preferredCommand:"claude",lastResize:{cols:0,rows:0},isOnline:navigator.onLine,ws:null,wsConnected:!1,lastWsMessageAt:0,wsHeartbeatCheckTimer:null,_updateBubbleShown:!1,notificationHistory:{},notifSound:(function(){try{var e=localStorage.getItem("wand-notif-sound");return e===null?!0:e==="true"}catch{return!0}})(),notifVolume:(function(){try{var e=localStorage.getItem("wand-notif-volume");return e===null?80:Math.max(0,Math.min(100,parseInt(e,10)||80))}catch{return 80}})(),notifBubble:(function(){try{var e=localStorage.getItem("wand-notif-bubble");return e===null?!0:e==="true"}catch{return!0}})(),toolContentCache:{},lastSeqBySession:{},chatResyncPendingBySession:{},currentView:"terminal",terminalScale:(function(){try{var e=localStorage.getItem("wand-terminal-scale");return e?parseFloat(e):1}catch{return 1}})(),terminalBaseFontSize:13,filePanelOpen:(function(){try{return localStorage.getItem("wand-file-panel-open")==="true"}catch{return!1}})(),topbarMoreOpen:!1,gitStatus:null,gitStatusSessionId:null,gitStatusLastFetchAt:0,turnActiveBySession:{},chatStickToBottom:!0,chatUnreadCount:0,chatUnreadStartIndex:-1,chatScrollThreshold:160,chatIsProgrammaticScroll:!1,chatProgrammaticScrollUntil:0,chatScrollElement:null,chatScrollHandler:null,chatScrollWheelHandler:null,chatScrollTouchStartHandler:null,chatScrollTouchMoveHandler:null,chatTouchStartY:0,chatInitialRenderDone:!1,lastForegroundSyncAt:0,foregroundSyncTimer:null,wsReconnectAttempts:0,wsReconnectTimer:null,currentMessages:[],chatRenderCache:new $K,chatRenderEpoch:0,chatRenderPendingToken:null,lastRenderedMsgCount:0,lastRenderedEmpty:null,renderPending:!1,chatPageSize:vG,chatRenderedCount:vG,chatRenderWindowMessageCount:0,currentTask:null,terminalInteractive:!1,claudeHistory:[],claudeHistoryLoaded:!1,claudeHistoryExpanded:!1,claudeHistoryExpandedDirs:{},sessionsManageMode:!1,selectedSessionIds:{},selectedClaudeHistoryIds:{},codexHistory:[],codexHistoryLoaded:!1,codexHistoryExpandedDirs:{},selectedCodexHistoryIds:{},askUserSelections:{},workingDir:(function(){try{var e=localStorage.getItem("wand-working-dir");return e||""}catch{return""}})()};(function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var e=function(){m.pageUnloading=!0};window.addEventListener("pagehide",e),window.addEventListener("beforeunload",e),window.addEventListener("pageshow",function(){m.pageUnloading=!1})}})();var aB="\u4E2D\u6587",ZE={\u4E2D\u6587:{"agentRun.count":"{count} \u4E2A\u5B50 Agent","agentRun.subagent":"\u5B50 Agent","agentRun.status.failed":"\u5931\u8D25","agentRun.status.running":"\u8FD0\u884C\u4E2D","agentRun.status.background":"\u8FD0\u884C\u72B6\u6001\u672A\u77E5","agentRun.status.backgroundDone":"\u8FD0\u884C\u72B6\u6001\u672A\u77E5","agentRun.status.interrupted":"\u5DF2\u4E2D\u65AD","agentRun.status.pending":"\u672A\u5B8C\u6210","agentRun.status.completed":"\u5DF2\u5B8C\u6210","agentRun.noOutput":"\uFF08\u65E0\u8F93\u51FA\uFF09","agentRun.noTask":"\u672A\u63D0\u4F9B\u4EFB\u52A1\u8BF4\u660E","agentRun.agent_list":"\u5B50 Agent \u5217\u8868","agentRun.process":"\u8FC7\u7A0B","agentRun.process_count":"{count} \u6B65","agentRun.result.done":"\u6700\u7EC8\u7ED3\u8BBA","agentRun.result.failed":"\u5931\u8D25\u539F\u56E0","agentRun.receipt.action":"\u4EC5\u6709\u6D3E\u53D1\u56DE\u6267","agentRun.receipt.note":"\u4EC5\u6536\u5230\u540E\u53F0\u6D3E\u53D1\u56DE\u6267\uFF0C\u5C1A\u65E0\u53EF\u5173\u8054\u7684\u539F\u751F\u7EC8\u6001\u6216\u7ED3\u679C\uFF1B\u5F53\u524D\u8FD0\u884C\u72B6\u6001\u672A\u77E5\uFF0C\u4E3B\u4F1A\u8BDD\u72B6\u6001\u4E0D\u80FD\u8BC1\u660E\u5B50\u4EFB\u52A1\u4ECD\u5728\u6267\u884C\u6216\u5DF2\u5B8C\u6210\u3002","agentRun.receipt.run":"\u540E\u53F0\u4EFB\u52A1","agentRun.receipt.output":"\u8F93\u51FA\u6587\u4EF6","agentRun.waiting":"\u7B49\u5F85\u5B50 Agent \u8F93\u51FA\u2026","agentRun.summary_aria":"\u5B50 Agent\uFF0C{count} \u4E2A\uFF0C{status}\u3002\u6700\u540E\u52A8\u4F5C\uFF1A{latest}","history.expand":"\u5C55\u5F00\u5386\u53F2\u5BF9\u8BDD","history.collapse":"\u6536\u8D77\u5386\u53F2\u5BF9\u8BDD","stop.confirm.title":"\u505C\u6B62\u4EFB\u52A1","stop.confirm.message":"\u786E\u5B9A\u8981\u505C\u6B62\u5F53\u524D\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u5417\uFF1F","stop.confirm.ok":"\u505C\u6B62","stop.confirm.cancel":"\u53D6\u6D88"},English:{"agentRun.count":"{count} subagents","agentRun.subagent":"Subagent","agentRun.status.failed":"Failed","agentRun.status.running":"Running","agentRun.status.background":"Run status unknown","agentRun.status.backgroundDone":"Run status unknown","agentRun.status.interrupted":"Interrupted","agentRun.status.pending":"No result","agentRun.status.completed":"Done","agentRun.noOutput":"(no output)","agentRun.noTask":"No task description","agentRun.agent_list":"Subagents","agentRun.process":"Process","agentRun.process_count":"{count} steps","agentRun.result.done":"Final result","agentRun.result.failed":"Failure reason","agentRun.receipt.action":"Dispatch receipt only","agentRun.receipt.note":"Only a background dispatch receipt is available, without a correlated native terminal event or result. The run status is unknown; the parent session status cannot establish whether the child is running or finished.","agentRun.receipt.run":"Background task","agentRun.receipt.output":"Output file","agentRun.waiting":"Waiting for subagent output\u2026","agentRun.summary_aria":"Subagents, {count}, {status}. Last action: {latest}","history.expand":"Show earlier conversation","history.collapse":"Hide earlier conversation","stop.confirm.title":"Stop task","stop.confirm.message":"Stop the task that's currently running?","stop.confirm.ok":"Stop","stop.confirm.cancel":"Cancel"}};function DK(){var e=m.config&&typeof m.config.language=="string"?m.config.language.trim():"";if(!e)return aB;if(ZE[e])return e;var t=e.toLowerCase();return t==="english"||t==="en"||t.indexOf("english")===0||t.indexOf("\u82F1")===0?"English":t==="\u4E2D\u6587"||t==="zh"||t.indexOf("zh")===0||t.indexOf("\u4E2D")===0||t.indexOf("chinese")===0?"\u4E2D\u6587":"English"}function Sy(e,t){var r=DK(),n=ZE[r]||ZE[aB],a=n&&e in n?n[e]:null;if(a==null){var o=ZE[aB];a=o&&e in o?o[e]:e}if(t&&typeof a=="string")for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(a=a.split("{"+l+"}").join(t[l]));return a}var Pxe={shield:'<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>',shieldCheck:'<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/><polyline points="9 12 11 14 15 10"/>',cpu:'<rect x="7" y="7" width="10" height="10" rx="2"/><path d="M9 1v3"/><path d="M15 1v3"/><path d="M9 20v3"/><path d="M15 20v3"/><path d="M20 9h3"/><path d="M20 15h3"/><path d="M1 9h3"/><path d="M1 15h3"/><rect x="10" y="10" width="4" height="4" rx="1"/>',brain:'<path d="M9.5 4.5a3 3 0 0 0-4.7 3.1 3.3 3.3 0 0 0 .3 6.1A3 3 0 0 0 8 19h1.5V4.5z"/><path d="M14.5 4.5a3 3 0 0 1 4.7 3.1 3.3 3.3 0 0 1-.3 6.1A3 3 0 0 1 16 19h-1.5V4.5z"/><path d="M9.5 8H7.8"/><path d="M14.5 8h1.7"/><path d="M9.5 13H7.6"/><path d="M14.5 13h1.9"/>',keyboard:'<rect x="2" y="6" width="20" height="12" rx="2"/><path d="M6 10h.01M10 10h.01M14 10h.01M18 10h.01M6 14h.01M18 14h.01M9 14h6"/>',terminal:'<polyline points="4 7 9 12 4 17"/><line x1="12" y1="17" x2="20" y2="17"/>',chat:'<path d="M21 12a8 8 0 0 1-12.9 6.3L3 20l1.7-5.1A8 8 0 1 1 21 12z"/>',folder:'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/>',chevronDown:'<polyline points="6 9 12 15 18 9"/>',chevronRight:'<polyline points="9 6 15 12 9 18"/>',wrench:'<path d="M14.7 6.3a4 4 0 1 1 4 4l-9 9-3.5 1 1-3.5 7.5-7.5z"/>',sliders:'<path d="M4 7h10M18 7h2"/><circle cx="16" cy="7" r="2"/><path d="M4 17h2M10 17h10"/><circle cx="8" cy="17" r="2"/>',sparkle:'<path d="M12 3l1.3 3.8L17 8.1l-3.7 1.3L12 13l-1.3-3.6L7 8.1l3.7-1.3L12 3z"/><path d="M18 13l.7 2 2 .7-2 .7-.7 2-.7-2-2-.7 2-.7.7-2z"/>',spark:'<path d="M12 2v4M12 18v4M4.9 4.9l2.8 2.8M16.3 16.3l2.8 2.8M2 12h4M18 12h4M4.9 19.1l2.8-2.8M16.3 7.7l2.8-2.8"/><circle cx="12" cy="12" r="3"/>',info:'<circle cx="12" cy="12" r="9"/><path d="M12 11v5M12 8h.01"/>',warning:'<path d="M12 3l10 18H2L12 3z"/><path d="M12 10v5M12 18h.01"/>',question:'<circle cx="12" cy="12" r="9"/><path d="M9.8 9a2.5 2.5 0 1 1 3.5 2.3c-.9.4-1.3 1-1.3 2.2M12 17h.01"/>',check:'<path d="M20 6 9 17l-5-5"/>',circle:'<circle cx="12" cy="12" r="7"/>',close:'<path d="M18 6 6 18"/><path d="M6 6l12 12"/>',paw:'<circle cx="7.5" cy="9" r="2" fill="currentColor" stroke="none"/><circle cx="12" cy="6.8" r="2" fill="currentColor" stroke="none"/><circle cx="16.5" cy="9" r="2" fill="currentColor" stroke="none"/><circle cx="18" cy="13.3" r="1.8" fill="currentColor" stroke="none"/><path d="M7.2 16.3c.5-2.9 2.3-4.8 4.8-4.8s4.3 1.9 4.8 4.8c.3 1.8-.9 3.2-2.6 2.6-.8-.3-1.4-.6-2.2-.6s-1.4.3-2.2.6c-1.7.6-2.9-.8-2.6-2.6z" fill="currentColor" stroke="none"/>',refresh:'<polyline points="23 4 23 10 17 10"/><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"/>',signal:'<path d="M2 12a15 15 0 0 1 20 0"/><path d="M5 16a10 10 0 0 1 14 0"/><path d="M9 20a4 4 0 0 1 6 0"/><circle cx="12" cy="20" r="0.5" fill="currentColor"/>',file:'<path d="M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"/><polyline points="14 3 14 9 20 9"/>',sigma:'<polyline points="18 4 6 4 13 12 6 20 18 20"/>',x:'<path d="M18 6 6 18"/><path d="M6 6l12 12"/>',plus:'<line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/>',paperclip:'<path d="M21.44 11.05 12.25 20.24a6 6 0 0 1-8.49-8.49l8.84-8.84a4 4 0 1 1 5.66 5.66L9.41 17.41a2 2 0 1 1-2.83-2.83l8.84-8.83"/>'};function ek(e,t){var r=Pxe[e];if(!r)return"";t=t||{};var n=t.size||14,a=t.strokeWidth||1.8,o=t.cls?' class="'+t.cls+'"':"",l=t.fill||"none";return"<svg"+o+' width="'+n+'" height="'+n+'" viewBox="0 0 24 24" fill="'+l+'" stroke="currentColor" stroke-width="'+a+'" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">'+r+"</svg>"}function AK(e){let t=e.messages??[],r=null;for(let n=t.length-1;n>=0;n-=1){let a=t[n];if(a.role!=="user"||a.notice)continue;let o=a.content??[];if(o.some(h=>h.__queued)||(r===null&&a.requestId&&(r=a.requestId),o.length&&o.every(h=>h.type==="tool_result")))continue;let l=a.requestId||a.messageId||a.createdAt;if(!l||n===0&&(e.leadingBlockOffset??0)>0||!o.some(h=>h.type==="text"&&!!h.text.trim()||h.type==="image"))return null;let u=e.structuredState?.inFlight?e.structuredState.activeRequestId:null;if(u&&u!==r)return null;let d=new Set,p=[];for(let h of t.slice(n+1))for(let v of h.content??[])v.__subagent||(v.type==="tool_result"&&d.add(v.tool_use_id),v.type==="tool_use"&&(v.semantic?.kind==="question_request"||v.name==="AskUserQuestion")&&p.push(v.id));return{key:JSON.stringify([e.id,(e.messageOffset??0)+n,l]),startIndex:n+1,requestId:r,waitingQuestion:p.some(h=>!d.has(h))}}return null}function Rxe(e,t,r){let n=AK(t);if(!n)return;let a=e?.sourceKey===n.key&&e.requestId===n.requestId?e:void 0;if(!r)return a;r.type==="init"&&(a=void 0);let o=r.data?.structuredState?.activeRequestId;if(r.data?.structuredState?.inFlight===!0&&typeof o=="string"&&o===n.requestId)return{sourceKey:n.key,requestId:o};let l=r.data?.turnOutcome;return a&&["done","failed","stopped"].includes(l)&&Array.isArray(r.data?.messages)&&t.structuredState?.inFlight!==!0&&(!r.data.terminalRequestId||r.data.terminalRequestId===a.requestId)?{...a,outcome:l}:a}function Oxe(e,t,r,n=!0){let a="unknown",o=e.structuredState?e.structuredState.inFlight===!0:e.ptyBusy===!0,l=r?.sourceKey===t.key&&r.requestId===t.requestId?r.outcome:void 0;n&&!e.archived&&(l&&!o?a=l==="done"?"ended":l:l&&o?a="unknown":e.status==="failed"?a="failed":e.status==="stopped"?a="stopped":e.permissionBlocked||e.pendingEscalation?a="permission":!o&&e.status==="running"&&t.waitingQuestion?a="waiting":o&&e.status==="running"&&(a="running"));let u={running:["\u8FD0\u884C\u4E2D","\u8FDB\u5EA6\u6765\u81EA\u672C\u8F6E\u5DE5\u5177\u8BB0\u5F55\uFF1B\u6E05\u5355\u5B8C\u6210\u4E0D\u4EE3\u8868\u6267\u884C\u5DF2\u7ED3\u675F\u3002"],stopped:["\u5DF2\u505C\u6B62","\u672C\u8F6E\u5DF2\u505C\u6B62\u3002\u4EE5\u4E0B\u662F\u505C\u6B62\u524D\u6700\u540E\u8BB0\u5F55\uFF0C\u4E0D\u63D0\u4F9B\u7EED\u8DD1\u64CD\u4F5C\u3002"],waiting:["\u7B49\u5F85\u8F93\u5165","\u4EE5\u4E0B\u8FDB\u5EA6\u53EA\u8BFB\uFF1B\u8BF7\u5728\u672C\u8F6E\u539F\u63D0\u95EE\u5361\u56DE\u7B54\uFF0C\u4E0D\u5728\u8FD9\u91CC\u6062\u590D\u6267\u884C\u3002"],permission:["\u7B49\u5F85\u6388\u6743","\u4EE5\u4E0B\u8FDB\u5EA6\u53EA\u8BFB\uFF1B\u8BF7\u5728\u539F\u6388\u6743\u5165\u53E3\u5904\u7406\u3002"],failed:["\u6267\u884C\u5931\u8D25","\u4EE5\u4E0B\u662F\u5931\u8D25\u524D\u6700\u540E\u8BB0\u5F55\uFF0C\u4E0D\u81EA\u52A8\u91CD\u8BD5\u6216\u8865\u5168\u6E05\u5355\u3002"],ended:["\u672C\u8F6E\u5DF2\u7ED3\u675F","\u4EE5\u4E0B\u662F\u672C\u8F6E\u6700\u540E\u8BB0\u5F55\uFF1B\u672A\u5B8C\u6210\u9879\u4E0D\u81EA\u52A8\u8865\u5168\uFF0C\u6267\u884C\u7ED3\u675F\u4E0D\u4EE3\u8868\u4E1A\u52A1\u4EFB\u52A1\u9A8C\u6536\u901A\u8FC7\u3002"],unknown:["\u6700\u8FD1\u8BB0\u5F55","\u6267\u884C\u72B6\u6001\u672A\u786E\u8BA4\uFF1B\u672A\u5B8C\u6210\u9879\u4E0D\u4EE3\u8868\u4ECD\u5728\u8FD0\u884C\u3002"]};return{sourceKey:t.key,kind:a,label:u[a][0],note:u[a][1]}}function tI(e){if(!e)return null;let t=e.querySelector(".chat-messages");if(t)return t;let r=document.createElement("div");return r.className="chat-messages",e.appendChild(r),r}var BK=null;function zxe(e){BK=e}function Lxe(){return BK}var T9=A(_(),1),Hxe=A(Xa(),1),iB=A(er(),1),eo=A(xe(),1),pm=new Map;function qxe({attrs:e,source:t}){let r=T9.useRef(null),n=l=>({phase:l.dataset.phase||"idle",queued:l.classList.contains("queue-mode"),disabled:l.disabled,label:l.getAttribute("aria-label")||void 0,title:l.title}),[a,o]=T9.useState(()=>n(t));return T9.useLayoutEffect(()=>{let l=r.current;if(!l)return;let u=()=>o(p=>{let h=n(l);return p.phase===h.phase&&p.queued===h.queued&&p.disabled===h.disabled&&p.label===h.label&&p.title===h.title?p:h}),d=new MutationObserver(()=>(0,iB.flushSync)(u));return d.observe(l,{attributes:!0,attributeFilter:["data-phase","class","disabled","aria-label","title"]}),u(),()=>d.disconnect()},[]),(0,eo.jsx)(Li,{...e,ref:r,htmlType:"button",size:"middle","data-phase":a.phase,"aria-label":a.label,title:a.title,className:[...Array.from(t.classList).filter(l=>l!=="queue-mode"&&!l.startsWith("ant-btn")),a.queued&&"queue-mode"].filter(Boolean).join(" "),type:a.queued?"default":"primary",danger:a.phase==="running"||a.phase==="failed",disabled:a.disabled,loading:a.phase==="sending",icon:a.phase==="sending"?void 0:(0,eo.jsx)("span",{className:"composer-send-icons",children:["up","history","stop","check"].map(l=>(0,eo.jsx)("span",{"data-active":l===(a.phase==="running"?"stop":a.phase==="sent"?"check":a.queued?"history":"up"),children:(0,eo.jsx)(Be,{name:l,size:15})},l))}),children:(0,eo.jsx)("span",{children:a.phase==="sending"?"\u53D1\u9001\u4E2D":a.phase==="running"?"\u505C\u6B62":a.phase==="sent"?"\u5DF2\u63A5\u53D7":a.phase==="failed"?"\u91CD\u8BD5":a.queued?"\u52A0\u5165\u961F\u5217":"\u53D1\u9001"})})}function IK(e){let t=pm.get(e);return t?t.key:e.matches("button[data-antd-control]")?JSON.stringify(["library-button",e.id||null,Array.from(e.classList).filter(r=>!/^(is-|selected$|copied$)/.test(r)),e.getAttribute("data-action"),e.getAttribute("data-tool-use-id"),e.getAttribute("data-question-index"),e.getAttribute("data-option-index"),e.getAttribute("data-agent-run-id"),e.getAttribute("data-agent-task-id"),e.getAttribute("onclick")]):null}function Wxe(e,t){return pm.has(e)&&t.matches("button[data-antd-control]")}function rI(e,t,r){let n=e.querySelector("button");n?.classList.contains("copied")&&(t=t.cloneNode(!0),t.classList.add("copied"),t.textContent=n.textContent),r.source=t;let a={};for(let l of Array.from(t.attributes))!["class","type","data-antd-control","style","disabled"].includes(l.name)&&!l.name.startsWith("on")&&(a[l.name]=l.value);let o=Array.from(t.attributes).filter(l=>l.name.startsWith("on"));if(t.id==="send-input-button"){(0,iB.flushSync)(()=>r.root.render((0,eo.jsx)(Xn,{children:(0,eo.jsx)(qxe,{attrs:a,source:t})})));return}(0,iB.flushSync)(()=>r.root.render((0,eo.jsx)(Xn,{children:(0,eo.jsx)(Li,{...a,htmlType:"button",size:t.hasAttribute("data-composer-control")?"middle":"small",block:t.classList.contains("ask-user-option"),type:t.dataset.antdControl==="primary"||t.classList.contains("ask-user-option")&&t.classList.contains("selected")?"primary":t.id==="todo-progress-toggle"?"text":"default",disabled:t.disabled,className:t.className||void 0,ref:l=>{if(l){for(let u of o)l.setAttribute(u.name,u.value);t.hasAttribute("style")&&(l.style.cssText=t.style.cssText)}},children:t.classList.contains("ask-user-option")?(0,eo.jsxs)(rt,{vertical:!0,gap:"small",align:"start",children:[(0,eo.jsx)(Gt.Text,{strong:!0,children:t.dataset.optionLabel||t.querySelector(".ask-user-option-label")?.textContent}),t.querySelector(".ask-user-option-desc")&&(0,eo.jsx)(Gt.Text,{type:"secondary",children:t.querySelector(".ask-user-option-desc")?.textContent})]}):t.classList.contains("prompt-optimize-btn")?(0,eo.jsx)(rt,{component:"span",align:"center",gap:4,dangerouslySetInnerHTML:{__html:t.innerHTML}}):(0,eo.jsx)("span",{dangerouslySetInnerHTML:{__html:t.innerHTML}})})})))}function MK(e,t,r){let n=e.parentElement,a=n&&pm.get(n);if(!n||!a?.source){e.textContent=t,e.classList.toggle("copied",r);return}e.classList.remove("copied");let o=a.source.cloneNode(!0);o.textContent=t,o.classList.toggle("copied",r),rI(n,o,a)}function Uxe(e,t){let r=pm.get(e);return!r||!t.matches("button[data-antd-control]")?!1:(rI(e,t,r),!0)}function _y(e){_a("wand-browser-control-motion",`
247
+ /* These actions carry business summaries, not a one-line button label. */
248
+ .ant-btn.agent-run-summary, .ant-btn.agent-run-agent, .ant-btn.ask-user-option { height:auto; white-space:normal; }
249
+ .ant-btn.agent-run-summary > span:not([class]), .ant-btn.agent-run-agent > span:not([class]) { display:flex; align-items:center; gap:8px; width:100%; min-width:0; }
250
+ .ant-btn.code-copy { width:80px; flex-shrink:0; }
251
+ `);for(let[t,r]of pm)t.isConnected||(r.root.unmount(),pm.delete(t));e.querySelectorAll("button[data-antd-control]").forEach(t=>{t.closest(".input-composer")&&t.setAttribute("data-composer-control","");let r=document.createElement("span");r.style.display="contents";let n={root:(0,Hxe.createRoot)(r),key:IK(t)};t.replaceWith(r),pm.set(r,n),rI(r,t,n)})}var Qk=null;function Vxe(e){Qk=e}var Gxe=e=>{Qk?.presentChat(e)},TK=e=>{Qk?.refreshChatPresentation(e)},Kxe=(e,t,r)=>Qk?.patchChatPresentation(e,t,r)??!1,nc=null,jy=0,Ny=0,gk=new Map,vk=new WeakMap,Py=null;function fm(){nc=null,gk.clear(),vk=new WeakMap,jy++}function Xxe(){gk.clear(),vk=new WeakMap}function _K(e){let t=nc?.root;return!!t&&e.some(r=>Array.from(r.removedNodes).some(n=>n===t||n instanceof Element&&n.contains(t)))}function jK(){Py&&_K(Py.takeRecords())&&fm()}function nI(e){if(typeof HTMLElement>"u")return null;jK();let t=e||document.querySelector("#chat-output > .chat-messages"),r=m.currentView||"chat";return!t?.isConnected||r!=="chat"?(fm(),null):((!nc||nc.root!==t||nc.sessionId!==m.selectedId||nc.view!==r)&&(fm(),nc={id:++jy,sessionId:m.selectedId,view:r,root:t},Py||(Py=new MutationObserver(n=>{_K(n)&&fm()}),Py.observe(document,{childList:!0,subtree:!0}))),nc)}function aI(e){return jK(),!!e&&nc===e&&e.root.isConnected&&m.selectedId===e.sessionId&&(m.currentView||"chat")===e.view&&document.querySelector("#chat-output > .chat-messages")===e.root}if(typeof document<"u"){for(let e of["focusin","pointerdown","wheel","touchstart"])document.addEventListener(e,()=>{Ny++},{capture:!0,passive:!0});document.addEventListener("keydown",e=>{e.key==="Tab"&&Ny++},!0),window.addEventListener("blur",()=>{Ny++}),window.addEventListener("pagehide",fm),window.addEventListener("beforeunload",fm)}function bG(e){return!Array.isArray(e?.content)||!e.content.some(t=>t?.__processing||t?.__queued)}function Qxe(e){return JSON.stringify([e?.role,e?.author?.id||null,!!e?.notice])}function Yxe(e,t,r){let n=nI(r);if(!n)return null;let a=Array.isArray(e.messages)?e.messages:[],o=new Map,l=new Map,u=0;for(let v of a)bG(v)&&(o.set(v,u++),l.set(v,(l.get(v)||0)+1));let d=new Map;function p(v){for(let g of["uuid","id","messageId","turnId"])if(typeof v?.[g]=="string"&&v[g])return JSON.stringify([g,v[g]]);return null}for(let v of t){let g=p(v);g&&d.set(g,(d.get(g)||0)+1)}let h=new Map;return{messages:t.map(v=>{if(!bG(v))return null;let g=p(v),b=o.get(v),x=null;!g&&b!==void 0&&e.sessionKind!=="structured"&&l.get(v)===1&&(x=vk.get(v)||"reference:"+ ++jy,vk.set(v,x));let y=g&&d.get(g)===1?"id:"+g:!g&&e.sessionKind==="structured"&&b!==void 0?"structured:"+((e.messageOffset||0)+b):x;if(!y)return null;let E=Qxe(v),F=gk.get(y),S=F?.guard===E?F:{key:"view:"+n.id+":turn:"+ ++jy,displayKey:"source:"+y+":"+ ++jy,guard:E,blockOffset:0},D=b===0&&Number.isInteger(e.leadingBlockOffset)?e.leadingBlockOffset:0,$={...S,blockOffset:D};return h.set(y,$),$}),commit(){aI(n)&&(gk=h)}}}function Jxe(e,t){if(!e||typeof HTMLElement>"u")return e;let r=document.createElement("template");return r.innerHTML=e,Array.from(r.content.children).forEach((n,a)=>{n.setAttribute("data-chat-key",JSON.stringify(["block",t,a]))}),r.innerHTML}function SE(e){let t=IK(e);if(t)return t;if(e.matches(".chat-file-attachment"))return"attachment:"+e.getAttribute("data-path");let r=e.getAttribute("data-chat-key");if(r)return r;let n=e.getAttribute("data-entry-key");if(n)return"entry:"+n;if(e.classList.contains("agent-run-agent")||e.classList.contains("agent-run-detail-panel"))return e.tagName+":agent:"+e.getAttribute("data-agent-run-id")+":"+e.getAttribute("data-agent-task-id");let a=e.getAttribute("data-expand-key");if(a)return"expand:"+a;let o=e.getAttribute("data-tool-use-id");return o?e.tagName+":tool:"+o:e.matches("a[href]")?"link:"+e.getAttribute("href"):e.matches(".ask-user-option")?e.tagName+":option:"+e.getAttribute("data-question-index")+":"+e.getAttribute("data-option-index"):e.matches("button, summary, [role='button']")?"control:"+oB(e)+":"+(e.getAttribute("onclick")||""):null}function yG(e){return e instanceof Element&&e.matches(".assistant-reply-disclosure, .assistant-reply-host, .msg-copy-btn")}function oB(e){return e instanceof Element?e.tagName+":"+Array.from(e.classList).filter(t=>!/^(?:is-|collapsed$|expanded$|selected$|copied$|visible$|inline-tool-open$|assistant-reply-(?:collapsed|expanded)$)/.test(t)).join(" "):String(e.nodeType)}function Zxe(e,t){let r=e instanceof HTMLDetailsElement?e.open:null,n=e.matches(".code-copy, .msg-copy-btn")&&e.classList.contains("copied"),a=e.matches(".msg-copy-btn")&&e.classList.contains("visible"),o=e.matches(".chat-message")?["assistant-reply-collapsed","assistant-reply-expanded"].filter(l=>e.classList.contains(l)):[];n&&o.push("copied"),a&&o.push("visible");for(let l of Array.from(e.attributes))!t.hasAttribute(l.name)&&l.name!=="open"&&l.name!=="data-x-presentation"&&e.removeAttribute(l.name);for(let l of Array.from(t.attributes)){if(l.name==="open"&&r!==null)continue;let u=l.name==="class"&&o.length?Array.from(new Set(l.value.split(/\s+/).concat(o))).join(" "):l.value;e.getAttribute(l.name)!==u&&e.setAttribute(l.name,u)}r!==null&&(e.open=r),n&&e.classList.add("copied"),a&&e.classList.add("visible")}function iI(e,t){if(e.isEqualNode(t))return;if(!(e instanceof Element)||!(t instanceof Element)){e.nodeValue!==t.nodeValue&&(e.nodeValue=t.nodeValue);return}if(Uxe(e,t)||(Zxe(e,t),e.matches(".code-copy.copied, .msg-copy-btn.copied")))return;let r=e.scrollLeft,n=e.scrollTop,a=e2e(e);Kxe(e,t,iI)||NK(e,t),e instanceof HTMLElement&&e.matches(".chat-activity-timeline")&&Gxe(e),e.scrollLeft!==r&&(e.scrollLeft=r);let o=a?.node.isConnected&&e.contains(a.node)?n+a.node.getBoundingClientRect().top-e.getBoundingClientRect().top-a.top:n;e.scrollTop!==o&&(e.scrollTop=o)}function e2e(e){if(!e.matches(".chat-activity-timeline")||e.closest("[inert]"))return null;let t=e.getBoundingClientRect(),r=o=>{let l=o.getBoundingClientRect();return l.bottom>t.top&&l.top<t.bottom},n=document.activeElement,a=n instanceof HTMLElement&&e.contains(n)&&r(n)?n:Array.from(e.querySelectorAll(".chat-call")).find(r);return a?{node:a,top:a.getBoundingClientRect().top-t.top}:null}function NK(e,t){let r=Array.from(e.childNodes).filter(p=>!yG(p)),n=Array.from(t.childNodes),a=new Map,o=new Set;for(let p of r){let h=p instanceof Element?SE(p):null;h&&(a.has(h)?o.add(h):a.set(h,p))}let l=new Set;for(let p of n){let h=p instanceof Element?SE(p):null;h&&(l.has(h)&&o.add(h),l.add(h))}let u=new Set,d=e.firstChild;for(;d&&yG(d);)d=d.nextSibling;n.forEach((p,h)=>{let v=p instanceof Element?SE(p):null,g=v&&!o.has(v)?a.get(v):void 0;if(!v){let b=y=>!(y instanceof Element&&SE(y))&&oB(y)===oB(p),x=r.filter(b);x.length===1&&n.filter(b).length===1?g=x[0]:r.length===n.length&&r[h]&&b(r[h])&&(g=r[h])}if(g&&(u.has(g)||g.nodeType!==p.nodeType||g instanceof Element&&p instanceof Element&&g.tagName!==p.tagName&&!Wxe(g,p))&&(g=void 0),g){if(u.add(g),iI(g,p),g!==d)if(g instanceof Element&&g.contains(document.activeElement))for(;d&&d!==g;){let b=d.nextSibling;e.appendChild(d),d=b}else e.insertBefore(g,d);d=g.nextSibling}else e.insertBefore(p,d),u.add(p)});for(let p of r)!u.has(p)&&p.parentNode===e&&e.removeChild(p)}function PK(e,t){return iI(e,t),e}function t2e(e,t){let r=document.createElement(e.tagName);r.innerHTML=t,NK(e,r)}function r2e(e,t){let r=document.createElement("template");r.innerHTML=t;let n=Array.from(e.children),a=new Map;for(let d of n){let p=d.getAttribute("data-chat-owner");p&&a.set(p,d)}let o=Array.from(r.content.children),l=new Set,u=e.firstElementChild;for(let d of o){let p=d.getAttribute("data-chat-owner"),h=p?a.get(p):null;if(h&&!l.has(h)){if(PK(h,d),l.add(h),h!==u)if(h.contains(document.activeElement))for(;u&&u!==h;){let v=u.nextElementSibling;e.appendChild(u),u=v}else e.insertBefore(h,u);u=h.nextElementSibling}else e.insertBefore(d,u),l.add(d)}for(let d of n)!l.has(d)&&d.parentElement===e&&d.remove()}function wG(e){return e instanceof HTMLElement&&e.isConnected&&!e.closest("[hidden], [inert], .assistant-reply-collapsed .chat-message-content")&&!e.matches(":disabled, [aria-disabled='true']")&&e.getClientRects().length>0&&e.matches("button, a[href], summary, [tabindex]")}function n2e(e){let t=nI(e);if(!t)return null;let r=document.activeElement,n=r instanceof HTMLElement&&e.contains(r)?r:null,a=n?.closest(".chat-message"),o=!a||a.getAttribute("data-chat-owner")?.startsWith("view:"+t.id+":")?n:null,l=Ny,u=o?[o.closest(".chat-tool-card, .inline-terminal, .inline-diff"),o.closest(".chat-call"),o.closest(".chat-activity"),o.closest(".agent-run-process"),o.closest(".agent-run"),a]:[],d=[];for(let b of u){let x=b?.querySelector(".chat-tool-header[tabindex], .term-header, .diff-header, .chat-call-button, .chat-process-summary, .agent-run-process-summary, .agent-run-summary, .assistant-reply-disclosure");x&&x!==o&&d.push(x)}let p=e.getBoundingClientRect(),h=o?.getBoundingClientRect(),v=o&&h&&h.bottom>p.top&&h.top<p.bottom?{node:o,top:h.top-p.top}:null,g=()=>aI(t)&&l===Ny;return{anchor:v,current:g,finish(){if(!o||!g()||wG(o)||!document.hasFocus())return;let b=document.activeElement;if(b!==o&&b!==document.body)return;let x=d.find(wG);x?x.focus({preventScroll:!0}):(e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}))}}}var sB=A(Xa(),1),lB=A(er(),1);function a2e(){_1().catch(()=>{});let e=new URLSearchParams(hn()),t=e.get("view");(t==="taskboard"||t==="issues")&&(EA(),globalThis.__wandImportBrowserModule("91408c351070d6d7").catch(()=>{})),(e.get("sidebar")==="tasks"||!e.has("sidebar")&&Ir.getSnapshot().mode==="tasks")&&(mn.preloadTaskGroups(),globalThis.__wandImportBrowserModule("5f635cbcab701433").catch(()=>{}))}function bk(){kA(),mn.clearPreload()}yi(bk);async function i2e(e,t={}){let r=w2(e),n;try{n=await fetch(r?"/api/login/ticket":"/api/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r?{ticket:e}:{password:e}),credentials:"same-origin"})}catch{return{ok:!1,kind:r?"unknown":"offline",message:r?"\u7968\u636E\u767B\u5F55\u7ED3\u679C\u672A\u77E5\uFF1B\u8BF7\u5148\u5237\u65B0\u6838\u5BF9\u767B\u5F55\u72B6\u6001\uFF0C\u4E0D\u8981\u91CD\u590D\u63D0\u4EA4\u3002":t.networkMessage??"\u767B\u5F55\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5\u3002"}}if(n.status===429){let o=await n.json().catch(()=>null),l=o&&typeof o.retryAfter=="number"?Math.max(1,Math.ceil(o.retryAfter)):0;return{ok:!1,kind:"rejected",message:o&&typeof o.error=="string"?o.error:"\u767B\u5F55\u5C1D\u8BD5\u6B21\u6570\u8FC7\u591A\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002",retryAfterMs:l?l*1e3:void 0}}if(!n.ok){if(r){let o=await n.json().catch(()=>null);return{ok:!1,kind:"rejected",message:o&&typeof o.error=="string"?o.error:"\u7968\u636E\u767B\u5F55\u672A\u786E\u8BA4\uFF1B\u8BF7\u5148\u5237\u65B0\u6838\u5BF9\u767B\u5F55\u72B6\u6001\uFF0C\u4E0D\u8981\u81EA\u52A8\u91CD\u8BD5\u3002"}}return{ok:!1,kind:"rejected",message:"\u5BC6\u7801\u9519\u8BEF\uFF0C\u8BF7\u91CD\u8BD5\u3002",credentialInvalid:!0}}let a;try{a=await fetch("/api/config",{credentials:"same-origin"})}catch{return{ok:!1,kind:"unknown",message:r?"\u7968\u636E\u767B\u5F55\u7ED3\u679C\u672A\u77E5\uFF1B\u8BF7\u5148\u5237\u65B0\u6838\u5BF9\u767B\u5F55\u72B6\u6001\uFF0C\u4E0D\u8981\u91CD\u590D\u63D0\u4EA4\u3002":"\u767B\u5F55\u7ED3\u679C\u672A\u786E\u8BA4\uFF1B\u8BF7\u5148\u5237\u65B0\u6838\u5BF9\u767B\u5F55\u72B6\u6001\uFF0C\u4E0D\u8981\u91CD\u590D\u63D0\u4EA4\u3002"}}return a.ok?{ok:!0,config:await a.json().catch(()=>null)}:{ok:!1,kind:"cookie-not-stored",message:t.cookieMessage??"\u767B\u5F55\u72B6\u6001\u672A\u80FD\u4FDD\u5B58\uFF0C\u8BF7\u91CD\u8BD5\u3002"}}function o2e(e,t){e&&w2(t)&&H7(e)}function RK(e,t,r,n){return e==="pty"&&!!r&&t==="running"&&!n}function uB(e,t=new Map){if(e===null||typeof e!="object")return e;let r=t.get(e);if(r!==void 0)return r;if(Array.isArray(e)){let a=[];t.set(e,a);for(let o of e)a.push(uB(o,t));return a}let n={};t.set(e,n);for(let[a,o]of Object.entries(e))n[a]=uB(o,t);return n}function OK(e,t=new Set){if(e===null||typeof e!="object"||t.has(e))return e;t.add(e);for(let r of Object.values(e))OK(r,t);return Object.freeze(e)}function xG(e,t,r){let n=uB({auth:e.auth,viewport:e.viewport,capabilities:e.capabilities,layout:e.layout,selected:e.selected,sidebar:e.sidebar,topbar:e.topbar,legacyVisibility:e.legacyVisibility,revision:t});return r?OK(n):n}function s2e(e){let t=e??0;if(!Number.isFinite(t)||t<0||t>200)throw new RangeError("batchMs must be between 0 and 200 milliseconds");return t}function l2e(e){let t=globalThis.reportError;if(typeof t=="function"){t(e);return}console.error("[wand-ui-store] subscriber failed",e)}function u2e(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}var c2e=class{constructor(e){ae(this,"readSnapshot"),ae(this,"applyAction"),ae(this,"batchMs"),ae(this,"freezeSnapshots"),ae(this,"listeners",new Set),ae(this,"snapshot"),ae(this,"disposed",!1),ae(this,"pending",!1),ae(this,"scheduleGeneration",0),ae(this,"timer",null),this.readSnapshot=e.readSnapshot,this.applyAction=e.applyAction,this.batchMs=s2e(e.batchMs),this.freezeSnapshots=e.freezeSnapshots!==!1,this.snapshot=xG(this.readSnapshot(),0,this.freezeSnapshots)}getSnapshot(){return this.snapshot}subscribe(e){if(this.disposed)return()=>{};this.listeners.add(e);let t=!0;return()=>{t&&(t=!1,this.listeners.delete(e))}}dispatch(e){if(this.disposed)throw new Error("UiStore has been disposed");let t=this.applyAction(e);if(this.publish({sync:!0,reason:`action:${e.type}`}),!!u2e(t))return Promise.resolve(t).then(r=>(this.publish({sync:!0,reason:`action-settled:${e.type}`}),r),r=>{throw this.publish({sync:!0,reason:`action-settled:${e.type}`}),r})}publish(e={}){if(this.disposed)return;if(e.sync){this.cancelPendingPublish(),this.flush();return}if(this.pending)return;this.pending=!0;let t=++this.scheduleGeneration;if(this.batchMs===0){queueMicrotask(()=>this.flushScheduled(t));return}this.timer=setTimeout(()=>this.flushScheduled(t),this.batchMs)}dispose(){this.disposed||(this.disposed=!0,this.cancelPendingPublish(),this.listeners.clear())}isDisposed(){return this.disposed}flushScheduled(e){this.disposed||!this.pending||e!==this.scheduleGeneration||(this.pending=!1,this.timer=null,this.flush())}cancelPendingPublish(){this.pending=!1,this.scheduleGeneration+=1,this.timer!==null&&clearTimeout(this.timer),this.timer=null}flush(){if(!this.disposed){this.snapshot=xG(this.readSnapshot(),this.snapshot.revision+1,this.freezeSnapshots);for(let e of[...this.listeners])try{e()}catch(t){l2e(t)}}}},d2e=class{constructor(e){ae(this,"store"),ae(this,"unsubscribeLegacy"),this.store=new c2e({readSnapshot:e.readSnapshot,applyAction:e.applyAction,batchMs:e.batchMs,freezeSnapshots:e.freezeSnapshots});let t=e.subscribeLegacy(r=>this.publish({reason:r}));this.unsubscribeLegacy=typeof t=="function"?t:()=>{}}getSnapshot(){return this.store.getSnapshot()}subscribe(e){return this.store.subscribe(e)}dispatch(e){return this.store.dispatch(e)}publish(e){this.store.publish(e)}dispose(){this.store.dispose();let e=this.unsubscribeLegacy;this.unsubscribeLegacy=()=>{},e()}};function zK(e){return e.width>=640?e.coarsePointer&&e.height<480:!0}var p2e={idle:"\u7A7A\u95F2",stopped:"\u5DF2\u505C\u6B62",running:"\u8FD0\u884C\u4E2D",thinking:"\u601D\u8003\u4E2D","waiting-input":"\u7B49\u5F85\u8F93\u5165",waiting_input:"\u7B49\u5F85\u8F93\u5165",reconnecting:"\u91CD\u8FDE\u4E2D",exited:"\u5DF2\u9000\u51FA",failed:"\u5DF2\u5931\u8D25"};function EG(e,t=0){if(!e)return t;let r=new Date(e).getTime();return Number.isFinite(r)?r:t}function f2e(e){return e?Object.values(e).filter(Boolean).length:0}function m2e(e){return e.config?"authenticated":e.loginChecked?"anonymous":"booting"}function LK(e){let t=Ge(e.sessionSource).toLowerCase();return t==="automation"||t==="startup"}function h2e(e){if(e.permissionBlocked)return"\u7B49\u5F85\u6388\u6743";let t=e.sessionKind==="structured"?"structured":"pty";if(t==="structured"&&e.structuredState?.inFlight)return e.structuredState.phase==="background"?"\u540E\u53F0\u4EFB\u52A1\u4E2D":"\u601D\u8003\u4E2D";if(Gi(e))return"\u521A\u5B8C\u6210";let r=Ge(e.status,"idle");return RK(t,r,e.provider??"",!!e.ptyBusy)||t==="pty"&&!e.provider&&r==="running"&&!e.ptyCommandRunning?"\u7A7A\u95F2":p2e[r]??r}function g2e(e){if(e.permissionBlocked)return"permission-blocked";let t=e.sessionKind==="structured"?"structured":"pty";if(t==="structured"&&e.structuredState?.inFlight)return"running";if(Gi(e))return"just-completed";let r=Ge(e.status);return RK(t,r,e.provider??"",!!e.ptyBusy)||t==="pty"&&!e.provider&&r==="running"&&!e.ptyCommandRunning?"idle":r}function HK(e){return Ge(e.workingDir)||Ge(e.config?.defaultCwd)||Ge(e.config?.cwd)||"/tmp"}function v2e(e){return Ge(e.title)||Ge(e.description)||Ge(e.summary)||Ge(e.command)||"Wand \u4F1A\u8BDD"}function kG(e,t,r){let n=Ge(e.id),a=Ge(e.provider),o=Ko(a)??(a||Mu(e.command)||"terminal"),l=Ge(e.status,"idle"),u=e.sessionKind==="structured"?"structured":"pty",d=!!(e.worktree?.enabled??e.worktreeEnabled),p=LK(e)?"automation":"wand",h=N0(e),v=a==="pi"&&u==="structured"?e.structuredState?.engine==="core"?"sdk":"cli":void 0;return{id:n,source:p,provider:o,...v?{engine:v}:{},kind:u,title:v2e(e),description:Ge(e.description),cwd:Ge(e.cwd,HK(t)),status:l,statusLabel:h2e(e),active:n!==""&&n===t.selectedId,selected:!!r[n],resumable:u!=="structured"&&l!=="running"&&!!e.claudeSessionId,permissionBlocked:h.permissionBlocked,inFlight:h.inFlight,turnActive:h.inFlight||h.ptyRunning,titleGenerating:!!e.titleGenerating,...e.employeeId?{employeeId:e.employeeId}:{},...e.employeeName?{employeeName:e.employeeName}:{},...e.employeeAvatar?{employeeAvatar:e.employeeAvatar}:{},...e.startedAt?{startedAt:e.startedAt}:{},...e.endedAt?{endedAt:e.endedAt}:{},...(()=>{let g=Ge(e.structuredState?.turnStartedAt)||Ge(e.turnStartedAt),b=Ge(e.structuredState?.lastActivityAt)||Ge(e.lastActivityAt);return{...g?{turnStartedAt:g}:{},...b?{lastActivityAt:b}:{}}})(),...e.claudeSessionId?{claudeSessionId:e.claudeSessionId}:{},...e.workspaceId?{workspaceId:e.workspaceId}:{},...e.workspaceTaskId?{workspaceTaskId:e.workspaceTaskId}:{},...e.archived?{archived:!0}:{},...d?{worktree:{enabled:!0,branch:Ge(e.worktree?.branch??e.worktreeBranch)||void 0,path:Ge(e.worktree?.path??e.worktreePath)||void 0,mergeStatus:Ge(e.worktree?.mergeStatus??e.worktreeMergeStatus)||void 0}}:{}}}function CG(e,t){let r=new Map;return t.forEach((n,a)=>{n.id&&r.set(n.id,a)}),e.sort((n,a)=>{let o=EG(n.startedAt),l=EG(a.startedAt);return o!==l?l-o:(r.get(a.id)??0)-(r.get(n.id)??0)})}function qK(e,t){let r=(e.sessions??[]).filter($=>$.sessionSource!=="quick-terminal"),n=Object.fromEntries(r.flatMap($=>$.id?[[$.id,!!e.selectedSessionIds?.[$.id]]]:[])),a=r.map($=>kG($,e,n)),o=e.sessions?.find($=>$.id===e.selectedId)??null,l=o?kG(o,e,n):null,u=CG(a.filter($=>$.source==="wand"),r),d=CG(a.filter($=>$.source==="automation"),r),p=t.width<=768,h=zK({width:t.width,height:t.height??Number.POSITIVE_INFINITY,coarsePointer:t.coarsePointer??!1}),v=!!e.sessionsDrawerOpen,g=!!e.sidebarPinned,b=!h&&g&&!!e.sidebarCollapsed,x=!!e.filePanelOpen,y=l?.kind==="structured"||e.currentView==="chat"?"chat":"terminal",E=!!e.sessionsManageMode,F=f2e(n),S=l?.cwd??HK(e),D=l&&e.gitStatusSessionId===l.id&&e.gitStatus?.isGit?{branch:Ge(e.gitStatus.branch,"?"),modifiedCount:Number(e.gitStatus.modifiedCount)||0,clean:(Number(e.gitStatus.modifiedCount)||0)===0}:null;return{auth:{phase:m2e(e)},viewport:{mobile:p,online:typeof e.isOnline=="boolean"?e.isOnline:t.online,embedTerminal:t.embedTerminal,nativeInput:t.nativeInput},capabilities:{backToNative:t.backToNative,switchServer:t.switchServer},layout:{sessionsDrawerOpen:v,sidebarPinned:g,sidebarCollapsed:b,sidebarDrawer:h,sidebarAnchored:!h&&(g||v),sessionsBackdropVisible:v&&(h||!g),filePanelOpen:x,filePanelBackdropVisible:x&&p,topbarMoreOpen:!!e.topbarMoreOpen,currentView:y},selected:l,sidebar:{interactiveCount:r.filter($=>!LK($)).length,totalCount:u.length+d.length,manageMode:E,selectedCount:F,groups:[{kind:"wand",label:"Wand \u4F1A\u8BDD",expanded:!0,entries:u},{kind:"automation",label:"\u81EA\u52A8\u5316",expanded:E||!!t.automationExpanded,entries:d}]},topbar:{title:l?.title??"Wand \u63A7\u5236\u53F0",description:l?.description??"",statusLabel:l?.statusLabel??"",statusTone:o?g2e(o):"",cwd:S,currentTask:Ge(e.currentTask?.title)||Ge(o?.currentTaskTitle),titleGenerating:!!o?.titleGenerating,git:D},legacyVisibility:{terminal:!!l&&y==="terminal",chat:!!l&&y==="chat",blank:!l,composer:!!l&&!Dl(o)}}}var b2e=class{constructor(e,t){ae(this,"name"),ae(this,"port"),ae(this,"rememberedSlot",null),ae(this,"mounted",!1),ae(this,"disposed",!1),ae(this,"generation",0),this.name=e,this.port=t}mount(e){if(this.disposed)throw new Error(`${this.name} has been disposed`);if(this.rememberedSlot&&this.rememberedSlot!==e)throw new Error(`${this.name} cannot switch to a different slot`);if(this.mounted)return this.currentLease();if(!this.rememberedSlot&&e.childNodes.length!==0)throw new Error(`${this.name} requires an empty React slot`);return this.port.mount(e),this.rememberedSlot=e,this.mounted=!0,this.generation+=1,this.currentLease()}unmount(e){if(e&&this.rememberedSlot&&e!==this.rememberedSlot)throw new Error(`${this.name} cannot unmount a different slot`);if(!this.mounted||!this.rememberedSlot)return;let t=this.rememberedSlot;this.mounted=!1,this.generation+=1,this.port.unmount?.(t)}currentLease(){if(!this.mounted||!this.rememberedSlot||this.disposed)throw new Error(`${this.name} is not mounted`);return Object.freeze({slot:this.rememberedSlot,generation:this.generation})}isCurrent(e){return!this.disposed&&this.mounted&&this.rememberedSlot===e.slot&&this.generation===e.generation}isMounted(){return!this.disposed&&this.mounted}dispose(){if(!this.disposed)try{this.unmount()}finally{this.disposed=!0}}};function y2e(e,t){switch(t.type){case"nav.home":return e.goHome();case"nav.refresh":return e.refreshPage();case"terminal.display":return e.terminalDisplay?.(t.command);case"session.new":return e.openNewSession();case"session.newAt":return e.openNewSession(t.cwd);case"missions.open":return e.openMissions?.();case"workspace.new":return e.openNewProject?.();case"workspace.newAt":return e.openNewProject?.(t.cwd);case"session.quickStart.claude":return e.quickStartClaudeTerminal();case"session.quickStart.codex":return e.quickStartCodexTerminal();case"session.quickStart.opencode":return e.quickStartOpenCodeTerminal();case"session.quickStart.structured":return e.quickStartStructuredSession();case"session.select":return t.focusInput===!1?e.selectSession(t.id,{focusInput:!1}):e.selectSession(t.id);case"session.resume":return e.resumeSession(t.id);case"session.resumeHistory":return e.resumeHistory(t.provider,t.id,t.cwd);case"session.delete":return e.deleteItem(t.target,t.id);case"session.merge":return e.mergeSession(t.id);case"session.cleanup":return e.cleanupSession(t.id);case"session.manage.toggle":return e.toggleManageMode();case"session.manage.select":return e.toggleManagedSelection(t.target,t.id);case"session.manage.selectAll":return e.selectAllManaged();case"session.manage.clear":return e.clearManagedSelection();case"session.manage.deleteSelected":return e.deleteManagedSelection();case"layout.drawer.toggle":return e.toggleSessionsDrawer();case"layout.drawer.open":return e.openSessionsDrawer?e.openSessionsDrawer():e.toggleSessionsDrawer();case"layout.drawer.close":return e.closeSessionsDrawer();case"layout.drawer.pin":return e.toggleSidebarPin();case"layout.drawer.collapse":return e.toggleSidebarCollapsed();case"layout.drawer.expandGroup":return e.expandSidebarGroup(t.group);case"layout.drawer.group.set":return e.setSidebarGroupExpanded(t.group,t.expanded);case"layout.files.toggle":return e.toggleFilePanel();case"layout.files.close":return e.closeFilePanel();case"folderPicker.open":return e.openFolderPicker();case"topbar.menu.toggle":return e.toggleTopbarMenu();case"topbar.copy":return e.copyTopbarField(t.field);case"topbar.gitCommit":return e.openGitCommit();case"settings.open":return e.openSettings();case"native.back":return e.backToNative();case"native.switchServer":return e.switchServer();case"auth.logout":return e.logout();default:return w2e(t)}}function w2e(e){throw new Error(`Unsupported UI action: ${JSON.stringify(e)}`)}var x2e=A(_(),1),E2e=A(_(),1),_9=A(xe(),1),WK="",cB=new Set;function cw(e){WK=e,cB.forEach(t=>t())}var k2e=e=>(cB.add(e),()=>{cB.delete(e)}),SG=()=>WK,C2e=["knowledge","taskboard","issues","teams","teamchat","schedules","calendar","workspace","chats","contacts"];function S2e(){let e=b1(),t=E2e.useSyncExternalStore(k2e,SG,SG),r=j$(e),n=new URLSearchParams(e),a=n.has("view")&&!C2e.includes(n.get("view")),o=n.get("settings"),l=o&&!["directory","profile","notifications","display","ai","local-models","general","connectors","security","presets","about"].includes(o),u=a||l;return!t&&!r.length&&!u?null:(0,_9.jsx)("div",{style:{flexShrink:0,padding:8,zIndex:30},children:(0,_9.jsx)(ei,{type:"warning",showIcon:!0,role:"alert",title:t||(u?"\u94FE\u63A5\u4E2D\u7684\u9875\u9762\u6216\u8BBE\u7F6E\u9879\u65E0\u6548":"\u94FE\u63A5\u542B\u6709\u4E0D\u652F\u6301\u7684\u53C2\u6570\uFF0C\u5DF2\u5FFD\u7565"),action:(0,_9.jsx)(_e,{size:"small",onClick:()=>{cw(""),Qn(Object.fromEntries([...r.map(d=>[d,null]),...["view","settings","session","workspace","workspaceTask","window","tab","conversation","conversationTask","conversationRun"].map(d=>[d,null]),["view","workspace"]]))},children:"\u8FD4\u56DE\u5DE5\u4F5C\u533A"})})})}var Gs=A(_());function F2e(e,t,r){return typeof r=="boolean"?r:e.length?!0:Er(t).some(n=>n.type===EE)}var Yk=({suffixCls:e,tagName:t,displayName:r})=>n=>Gs.forwardRef((a,o)=>Gs.createElement(n,{ref:o,suffixCls:e,tagName:t,...a})),oI=Gs.forwardRef((e,t)=>{let{prefixCls:r,suffixCls:n,className:a,tagName:o,...l}=e,{getPrefixCls:u}=Gs.useContext(st),d=u("layout",r),[p,h]=xE(d),v=n?`${d}-${n}`:d;return Gs.createElement(o,{className:Y(r||v,a,p,h),ref:t,...l})}),$2e=Gs.forwardRef((e,t)=>{let{direction:r}=Gs.useContext(st),[n,a]=Gs.useState([]),{prefixCls:o,className:l,rootClassName:u,children:d,hasSider:p,tagName:h,style:v,...g}=e,b=Vt(g,["suffixCls"]),{getPrefixCls:x,className:y,style:E}=wt("layout"),F=x("layout",o),S=F2e(n,d,p),[D,$]=xE(F),C=Y(F,{[`${F}-has-sider`]:S,[`${F}-rtl`]:r==="rtl"},y,l,u,D,$),B=Gs.useMemo(()=>({siderHook:{addSider:M=>{a(I=>[].concat(en(I),[M]))},removeSider:M=>{a(I=>I.filter(j=>j!==M))}}}),[]);return Gs.createElement(wE.Provider,{value:B},Gs.createElement(h,{ref:t,className:C,style:{...E,...v},...b},d))}),D2e=Yk({tagName:"div",displayName:"Layout"})($2e),A2e=Yk({suffixCls:"header",tagName:"header",displayName:"Header"})(oI),B2e=Yk({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(oI),I2e=Yk({suffixCls:"content",tagName:"main",displayName:"Content"})(oI),M2e=D2e,Mg=M2e;Mg.Header=A2e;Mg.Footer=B2e;Mg.Content=I2e;Mg.Sider=EE;Mg._InternalSiderContext=gg;var yk=Mg,vg=A(_(),1),dB=A(xe(),1),sI=Pn(()=>globalThis.__wandImportBrowserModule("8bc3bf586a2b73fe").then(e=>e.ComposerAttachmentsHost),kE,e=>e.mounts.length>0,{title:"\u9644\u4EF6",close:()=>{},renderPending:()=>(0,dB.jsx)(dB.Fragment,{})}),lI=Pn(()=>globalThis.__wandImportBrowserModule("4a6ed04ec80dea3c").then(e=>e.PiExecutionHost),Bd,e=>e!==null,{title:"\u6267\u884C\u8BE6\u60C5",close:()=>Bd.close()}),Jk=Pn(()=>globalThis.__wandImportBrowserModule("70e00ced5ceba32d").then(e=>e.SettingsHost),za,(e,t)=>e.open||t.presentation==="page",{title:"\u8BBE\u7F6E",page:!0,close:()=>Yi.close(),dismissable:e=>e.presentation!=="page"}),T2e=Pn(()=>globalThis.__wandImportBrowserModule("e280bc3e8ac49e67").then(e=>e.CodeEditorHost),_d,e=>e.open,{title:"\u6587\u4EF6\u7F16\u8F91\u5668",page:!0,close:()=>{O1.execute({type:"close"})}}),_2e=Pn(()=>globalThis.__wandImportBrowserModule("91408c351070d6d7").then(e=>e.TaskBoardHost),_l,e=>e.open&&e.page!=="teams"&&e.page!=="teamchat",{title:"\u4EFB\u52A1\u770B\u677F",page:!0,close:()=>zn.close()}),j2e=Pn(()=>globalThis.__wandImportBrowserModule("4bd2adb3495d6dd4").then(e=>e.NewSessionHost),Fl,e=>e.open,{title:"\u65B0\u5EFA\u4F1A\u8BDD",page:!0,close:()=>ua.close(),renderPending:e=>(0,dB.jsx)("section",{"aria-label":"\u65B0\u5EFA\u4F1A\u8BDD\u52A0\u8F7D",style:{position:"absolute",inset:0,zIndex:8,background:"var(--bg-primary)",padding:"var(--wand-page-inset)"},children:e})}),uI=Pn(()=>globalThis.__wandImportBrowserModule("349206312bb65200").then(e=>e.FolderPickerHost),OA,e=>e.open,{title:"\u9009\u62E9\u76EE\u5F55",close:()=>Ld.close()}),cI=Pn(()=>globalThis.__wandImportBrowserModule("608565cf9381774c").then(e=>e.QuickCommitHost),y$,e=>e.open,{title:"\u5FEB\u901F\u63D0\u4EA4",close:()=>wd.close()}),dI=Pn(()=>globalThis.__wandImportBrowserModule("4574de49797344ae").then(e=>e.WorktreeMergeHost),x$,e=>e.open,{title:"\u5408\u5E76\u5DE5\u4F5C\u6811",close:()=>xd.close()}),pI=Pn(()=>globalThis.__wandImportBrowserModule("20b70b89cf3b3846").then(e=>e.FilePreviewHost),em,e=>e.open,{title:"\u6587\u4EF6\u9884\u89C8",close:()=>{Ws.execute({type:"close"})}}),fI=Pn(()=>globalThis.__wandImportBrowserModule("5a62d8f81561e955").then(e=>e.LocalPreviewHost),Os,e=>e.open,{title:"\u672C\u5730\u9884\u89C8",close:()=>Os.close()}),mI=Pn(()=>globalThis.__wandImportBrowserModule("ddc5d213cdc1ffeb").then(e=>e.ImageViewerHost),Ol,e=>e.open,{title:"\u56FE\u7247",close:()=>Ol.close()}),hI=Pn(()=>globalThis.__wandImportBrowserModule("79f6d648c25a1c7b").then(e=>e.MissionsHost),k$,e=>e.open,{title:"\u4EFB\u52A1",close:()=>wf.close()}),gI=Pn(()=>globalThis.__wandImportBrowserModule("b14b581260fe30bf").then(e=>e.WorkspacesHost),va,e=>e.open,{title:"\u5DE5\u4F5C\u533A",close:()=>If.close()}),vI=Pn(()=>globalThis.__wandImportBrowserModule("90c5a1669e510ab4").then(e=>e.GithubIssuesHost),F$,e=>e.open,{title:"GitHub Issues",close:()=>f1.close()}),FE=A(_(),1),us=A(_(),1),kLe=A(_(),1),FG=A(_(),1),$G=A(_(),1),j9=A(xe(),1);function tk({hint:e,iconOnly:t,...r}){let n=Kn(),[a,o]=$G.useState(!1);$n(a&&!!e,()=>o(!1));let l=t?(0,j9.jsx)(Br,{...r,children:r.children}):(0,j9.jsx)(_e,{...r});return(0,j9.jsx)(Ma,{title:e,open:!!e&&a,onOpenChange:o,trigger:["hover","focus"],placement:"right",getPopupContainer:()=>n??document.body,children:$G.cloneElement(l,{title:void 0,onPointerDownCapture:u=>{o(!1),r.onPointerDownCapture?.(u)}})})}var ac=A(xe(),1),N2e=A0(()=>globalThis.__wandImportBrowserModule("0c577e0e894b3c4a").then(e=>e.ConversationListFilterPanel),{title:"\u7B5B\u9009\u6761\u4EF6",renderPending:e=>(0,ac.jsx)("div",{className:"conversation-list-filter-panel",style:{minHeight:188},children:e})});function P2e({value:e,workspaces:t,enabled:r,onChange:n}){let[a,o]=FG.useState(!1),l=X6(e);return FG.useEffect(()=>{r||o(!1)},[r]),(0,ac.jsx)(bi,{open:a&&r,onOpenChange:o,align:"center",ariaLabel:"\u7B5B\u9009\u4F1A\u8BDD",popupOwner:"conversation-list-filters",trigger:(0,ac.jsxs)(tk,{hint:a?void 0:"\u8BBE\u7F6E\u4F1A\u8BDD\u5217\u8868\u7684\u4EFB\u52A1\u9636\u6BB5\u3001\u5DE5\u4F5C\u533A\u3001\u5F52\u6863\u53CA\u6D3B\u52A8\u7B5B\u9009\uFF0C\u4E0D\u5F71\u54CD\u5F53\u524D\u4F1A\u8BDD",className:"conversation-list-filter-trigger",kind:l?"soft":"secondary","aria-label":`\u7B5B\u9009\u4F1A\u8BDD${l?`\uFF0C${l} \u4E2A\u6761\u4EF6`:""}`,"aria-expanded":a,"aria-haspopup":"dialog",disabled:!r,children:[(0,ac.jsx)(Be,{name:"sliders",size:16}),(0,ac.jsx)("span",{children:l||"\u7B5B\u9009"})]}),children:a&&r?(0,ac.jsx)(N2e,{value:e,workspaces:t,onCancel:()=>o(!1),onApply:u=>{n(u),o(!1)}}):null})}function R2e({value:e,workspaces:t,onClear:r}){let n=MA(e,t);return(0,ac.jsxs)(rt,{align:"center",justify:"space-between",gap:4,className:"conversation-list-filter-summary",children:[(0,ac.jsx)(Gt.Text,{type:"secondary",ellipsis:!0,title:n,children:n}),X6(e)?(0,ac.jsx)(_e,{kind:"ghost",size:"small",onClick:r,children:"\u6E05\u9664\u7B5B\u9009"}):null]})}var O2e=A(_(),1),tm=A(xe(),1);function z2e({id:e,avatarNode:t,title:r,titleGenerating:n=!1,state:a,glow:o,summary:l,active:u=!1,onClick:d}){let p=o??(a.label==="\u8FD0\u884C\u4E2D"?"running":a.label==="\u601D\u8003\u4E2D"?"thinking":a.label==="\u521A\u5B8C\u6210"?"just-completed":a.tone==="warning"?"permission":a.label==="\u5931\u8D25"?"failed":"none"),h=O2e.useId();return(0,tm.jsx)(OD,{title:`${r} \xB7 ${l}`,selector:".im-sidebar-item-name",children:(0,tm.jsxs)(_e,{kind:u?"soft":"ghost",type:"button",className:`session-item wand-sidebar-session-row${u?" active":""}`,style:{width:"100%",height:"auto",whiteSpace:"normal",justifyContent:"flex-start",padding:8},"data-session-id":e,"aria-current":u?"page":void 0,"aria-describedby":h,title:`${r} \xB7 ${l}`,onClick:d,children:[(0,tm.jsx)("span",{className:et("im-sidebar-item-avatar-wrap",p!=="none"&&`wand-logo-glow glow-${p}`),style:{width:28,height:28,display:"inline-flex",flexShrink:0},"data-glow":p,"aria-hidden":"true",children:(0,tm.jsx)(qi,{dot:p!=="none",color:F6(p),children:t})}),(0,tm.jsxs)(rt,{vertical:!0,className:"im-sidebar-item-body",style:{minWidth:0,textAlign:"start",flex:1},children:[(0,tm.jsx)(Gt.Text,{ellipsis:!0,className:et("im-sidebar-item-name",n&&"title-generating"),"aria-busy":n||void 0,"aria-label":n?`${r}\uFF0CAI \u6B63\u5728\u751F\u6210\u6807\u9898`:void 0,title:n?"AI \u6B63\u5728\u751F\u6210\u6807\u9898":void 0,children:r}),(0,tm.jsx)(Gt.Text,{ellipsis:!0,type:"secondary",id:h,title:l,className:"im-sidebar-item-summary",style:{fontSize:12},children:l})]})]})})}var rc=A(xe(),1),CLe=A0(()=>globalThis.__wandImportBrowserModule("03a539f59a10f2c6").then(e=>e.GroupEditor),{title:"\u7FA4\u804A",renderPending:()=>(0,rc.jsx)(rc.Fragment,{})});function L2e({activePage:e,teamAttention:t,onNavigate:r}){let n=[{value:"chats",label:"\u4F1A\u8BDD",icon:"chat"},{value:"knowledge",label:"\u77E5\u8BC6\u5E93",icon:"file",id:"knowledge-library-button"},{value:"board",label:"\u4EFB\u52A1\u770B\u677F",icon:"board",id:"task-board-button"},{value:"teams",label:"\u56E2\u961F",icon:"users",id:"ai-teams-button"},{value:"calendar",label:"\u5B9A\u65F6",icon:"calendar",id:"global-calendar-button"}],a=e==="schedules"?"calendar":e;return(0,rc.jsx)(rt,{component:"nav",vertical:!0,gap:4,className:"conversation-navigation","aria-label":"\u529F\u80FD\u5BFC\u822A",children:n.filter(o=>o.value!=="teams").map(o=>(0,rc.jsxs)(Br,{id:"id"in o?o.id:void 0,"data-stretch-value":o.value,"aria-label":o.label,title:o.label,kind:a===o.value?"soft":"ghost","aria-current":a===o.value?"page":void 0,"aria-pressed":a===o.value,onClick:()=>r(o.value),children:[(0,rc.jsx)("span",{className:"sidebar-nav-icon","aria-hidden":"true",children:o.value==="teams"?(0,rc.jsx)(qi,{count:t,size:"small",children:(0,rc.jsx)(Be,{name:o.icon,size:18})}):(0,rc.jsx)(Be,{name:o.icon,size:18})}),(0,rc.jsx)("span",{className:"sidebar-nav-label","aria-hidden":"true",children:o.value==="board"?"\u4EFB\u52A1":o.label})]},o.value))})}var La=A(_(),1),at=A(xe(),1);function H2e(e,t){let r=new Map,n=(a,o,l,u=!1)=>{o.sessionSource==="quick-terminal"||r.has(o.id)||r.set(o.id,{group:a,session:o,task:l,taskName:l?.name??null,archived:u||o.archived===!0})};for(let a of e){for(let o of a.tasks){for(let l of o.sessions)n(a,l,o,o.archived===!0);for(let l of o.archivedSessions??[])n(a,l,o,!0)}for(let o of a.standaloneSessions)n(a,o);for(let o of a.archivedSessions??[])n(a,o,void 0,!0)}for(let a of t.filter(UD)){let o=a.communicationSessionId||a.sessionId;if(!o)continue;let l=r.get(o);if(l){r.set(o,{...l,conversation:a});continue}r.set(o,{conversation:a,group:{workspaceId:"wand-global",workspaceName:"\u672A\u5206\u914D\u5DE5\u4F5C\u533A",workspaceCwd:"",synthetic:!0,tasks:[],standaloneSessions:[]},taskName:null,archived:!!a.dissolvedAt,session:{id:o,title:a.title,employeeId:a.peerEmployeeId??void 0,startedAt:a.createdAt}})}return[...r.values()].sort((a,o)=>+!!o.conversation?.pinnedAt-+!!a.conversation?.pinnedAt||(o.conversation?.pinnedAt??"").localeCompare(a.conversation?.pinnedAt??"")||(o.session.startedAt??"").localeCompare(a.session.startedAt??"")||a.session.id.localeCompare(o.session.id))}function q2e(e,t){let r=q6(),n=oA(!1,e),a=Wf(),o={taskStage:a.listTaskStage,workspace:a.listWorkspace,archive:a.listFilter,activityOnly:a.activityOnly,runtime:a.listRuntime},l=La.useMemo(()=>H2e(r.groups,n.items),[r.groups,n.items]),u=a.filters["list-query"]??"",d=l.filter(p=>DA({...p.session,archived:p.archived},o.runtime)&&BA(p,o)&&(o.archive==="all"||(o.archive==="archived"?p.archived:!p.archived))&&(!o.activityOnly||!p.archived&&P0(p.session))&&Gu(u,t[p.session.id]??"",p.session.title??"",p.taskName??"",p.group.workspaceName,p.session.cwd??"",p.session.employeeName??"",p.conversation?.title??"",Tu(Cl(p.session),p.session.engine)));return{entries:l,rows:d,groups:r.groups,workspaces:IA(r.groups),facets:o,query:u,loading:r.loading&&!r.groups.length,error:r.error||n.error,refresh:()=>{n.refresh(),Tl.reload()}}}function W2e({model:e,enabled:t}){let r=Wf(),[n,a]=La.useState(null),[o,l]=La.useState(!1),[u,d]=La.useState(""),p=La.useRef(null);La.useEffect(()=>{t||(a(null),l(!1))},[t]),La.useEffect(()=>{o||d("")},[o]);let h=zs(e.facets.runtime),v=h==="all"?zs(r.lastCapsuleRuntime):h,g=Nd.find(C=>C.value===v&&C.value!=="all")??Nd[1],b=e.workspaces.filter(C=>C.value!=="all"),x=b.find(C=>C.value===(e.facets.workspace==="all"?r.lastCapsuleWorkspace:e.facets.workspace))??b.find(C=>C.value.startsWith("id:"))??b[0],y=C=>{Ir.listFacets({...e.facets,...C}),a(null),l(!1)},E=C=>C==="confirmation"?"\u9700\u8981\u6211\u786E\u8BA4\uFF1A\u67E5\u770B\u7B49\u5F85\u5BA1\u6279\u6216\u8865\u5145\u8F93\u5165\u7684\u4F1A\u8BDD":C==="working"?"\u8FD0\u884C\u4E2D / \u6392\u961F\u4E2D\uFF1A\u67E5\u770B\u6B63\u5728\u6267\u884C\u6216\u7B49\u5F85\u6267\u884C\u7684\u4F1A\u8BDD":C==="failed"?"\u8FD0\u884C\u5931\u8D25\uFF1A\u67E5\u770B\u6267\u884C\u5931\u8D25\u7684\u4F1A\u8BDD\uFF0C\u7EDF\u4E00\u5F52\u5165\u6211\u9700\u8981\u5173\u6CE8":"\u5168\u90E8\u8FD0\u884C\u72B6\u6001\uFF1A\u4FDD\u7559\u5DE5\u4F5C\u533A\u548C\u5176\u4ED6\u7B5B\u9009\u6761\u4EF6",F=C=>(0,at.jsx)(tk,{iconOnly:!0,"aria-label":`\u7B5B\u9009\u8FD0\u884C\u72B6\u6001\uFF1A${C.label}`,"aria-pressed":h===C.value,"data-filter-active":h===C.value,hint:E(C.value),kind:h===C.value?"soft":"ghost",onClick:()=>y({runtime:C.value,activityOnly:!1}),children:(0,at.jsx)(Be,{name:C.icon,size:18})},C.value),S=C=>{let B=C.trim().split(/[\s_/-]+/).filter(Boolean);return(B.length>1?B.slice(0,2).map(M=>[...M][0]).join(""):[...C].slice(0,2).join("")).toLocaleUpperCase()},D=C=>(0,at.jsx)(tk,{iconOnly:!0,"aria-label":`\u7B5B\u9009\u5DE5\u4F5C\u533A\uFF1A${C.label}`,"aria-pressed":e.facets.workspace===C.value,"data-filter-active":e.facets.workspace===C.value,hint:C.value==="all"?"\u5168\u90E8\u5DE5\u4F5C\u533A\uFF1A\u663E\u793A\u6240\u6709\u5DE5\u4F5C\u533A\u7684\u4F1A\u8BDD\uFF0C\u4FDD\u7559\u8FD0\u884C\u72B6\u6001\u7B5B\u9009":`\u53EA\u663E\u793A\u300C${C.label}\u300D\u7684\u4F1A\u8BDD\uFF0C\u4E0D\u5207\u6362\u5F53\u524D\u4F1A\u8BDD`,kind:e.facets.workspace===C.value?"soft":"ghost",onClick:()=>y({workspace:C.value}),children:C.value==="all"?(0,at.jsx)(Be,{name:"folders",size:22}):C.value==="none"?(0,at.jsx)(Be,{name:"folder",size:22}):(0,at.jsxs)("span",{className:"sidebar-workspace-symbol","aria-hidden":"true",children:[(0,at.jsx)(Be,{name:"folder",size:22}),(0,at.jsx)("span",{className:"sidebar-workspace-monogram",children:S(C.label)})]})},C.value),$=(C,B)=>(0,at.jsx)("div",{className:"sidebar-filter-capsule",role:"group","aria-label":C==="runtime"?"\u8FD0\u884C\u72B6\u6001\u7B5B\u9009":"\u5DE5\u4F5C\u533A\u7B5B\u9009","data-expanded":n===C,onMouseEnter:()=>{t&&a(C)},onMouseLeave:()=>a(M=>M===C?null:M),onFocusCapture:()=>{t&&a(C)},onBlurCapture:M=>{M.currentTarget.contains(M.relatedTarget)||a(I=>I===C?null:I)},onKeyDown:M=>{M.key==="Escape"&&!o&&(M.currentTarget.querySelector("button")?.focus({preventScroll:!0}),a(null),M.stopPropagation())},children:B});return(0,at.jsx)(pb,{value:"lucide",children:(0,at.jsxs)("div",{className:"sidebar-filter-capsules",children:[(0,at.jsx)("span",{className:"sidebar-capsule-label",children:"\u8FD0\u884C\u72B6\u6001"}),$("runtime",(0,at.jsxs)(at.Fragment,{children:[F(Nd[2]),F(g),n==="runtime"?(0,at.jsx)("div",{className:"sidebar-capsule-rest",children:Nd.filter(C=>C.value!=="all"&&C.value!==g.value).map(F)}):null]})),(0,at.jsx)("span",{className:"sidebar-capsule-label",children:"\u5DE5\u4F5C\u533A"}),$("workspaces",(0,at.jsxs)(at.Fragment,{children:[D({value:"all",label:"\u5168\u90E8\u5DE5\u4F5C\u533A"}),x?D(x):null,n==="workspaces"||o?(0,at.jsxs)("div",{className:"sidebar-capsule-rest",children:[b.filter(C=>C.value!==x?.value).map(D),(0,at.jsx)(bi,{side:"right",align:"start",open:t&&o,onOpenChange:l,ariaLabel:"\u641C\u7D22\u5DE5\u4F5C\u533A",popupOwner:"sidebar-filter-capsules",onAfterOpenChange:C=>{C&&p.current?.querySelector("input")?.focus({preventScroll:!0})},trigger:(0,at.jsx)(tk,{iconOnly:!0,"aria-label":"\u641C\u7D22\u5DE5\u4F5C\u533A",hint:o?void 0:"\u641C\u7D22\u5DE5\u4F5C\u533A\uFF1A\u6309\u540D\u79F0\u67E5\u627E\u66F4\u591A\u5DE5\u4F5C\u533A",children:(0,at.jsx)(Be,{name:"search",size:18})}),children:(0,at.jsxs)("div",{ref:p,className:"sidebar-capsule-picker",children:[(0,at.jsx)(Gt.Text,{strong:!0,children:"\u641C\u7D22\u5DE5\u4F5C\u533A"}),(0,at.jsx)(mg,{label:"\u641C\u7D22\u5DE5\u4F5C\u533A",value:u,onValueChange:d}),(0,at.jsxs)("div",{className:"sidebar-capsule-options",children:[e.workspaces.filter(C=>C.label.toLowerCase().includes(u.toLowerCase())).map(C=>(0,at.jsx)(_e,{kind:e.facets.workspace===C.value?"soft":"ghost",onClick:()=>y({workspace:C.value}),children:C.label},C.value)),e.workspaces.some(C=>C.label.toLowerCase().includes(u.toLowerCase()))?null:(0,at.jsx)(Gt.Text,{type:"secondary",role:"status",children:"\u6CA1\u6709\u5339\u914D\u7684\u5DE5\u4F5C\u533A"})]})]})})]}):null]}))]})})}function U2e({model:e,titles:t,selectedSessionId:r,selectedConversationId:n,onOpen:a,onCreate:o,historyRows:l,historyCount:u=0,enabled:d}){let p=Wf(),h=La.useRef(null),v=`${e.facets.runtime}:${e.facets.taskStage}:${e.facets.workspace}:${e.facets.archive}:${e.facets.activityOnly}:${e.query}`,g=La.useRef({});La.useLayoutEffect(()=>{let C=h.current;if(C)return C.scrollTop=g.current[v]??p.scrolls[`unified:${v}`]??0,()=>{g.current[v]=C.scrollTop,Ir.scroll(`unified:${v}`,C.scrollTop)}},[v]);let b=e.rows.filter(C=>Qi(C.session)||eg(C.session)),x=e.rows.filter(C=>!Qi(C.session)&&!eg(C.session)),y=[...b,...x],E=C=>n?C.conversation?.id===n:C.session.id===r,F=e.entries.find(E),S=F&&!e.rows.some(E),[D,$]=La.useState(!1);return La.useLayoutEffect(()=>{if(!D)return;let C=[...h.current?.querySelectorAll("[data-unified-session]")??[]].find(B=>B.dataset.unifiedSession===F?.session.id);C&&(C.scrollIntoView({block:"nearest"}),C.querySelector("button")?.focus({preventScroll:!0}),$(!1))},[D,v,F?.session.id]),(0,at.jsx)(R0.Provider,{value:d,children:(0,at.jsxs)("div",{className:"unified-sidebar-list",children:[(0,at.jsxs)("div",{className:"unified-sidebar-tools",children:[(0,at.jsxs)(_e,{id:"drawer-new-session-button",kind:"primary",className:"sidebar-new-task",onClick:o,children:[(0,at.jsx)(Be,{name:"plus",size:18}),"\u65B0\u5EFA\u4F1A\u8BDD"]}),(0,at.jsxs)(rt,{align:"center",gap:6,children:[(0,at.jsx)(mg,{label:"\u641C\u7D22\u4F1A\u8BDD",value:e.query,onValueChange:C=>Ir.filter("list-query",C)}),(0,at.jsx)(P2e,{value:e.facets,workspaces:e.workspaces,enabled:d,onChange:Ir.listFacets})]}),(0,at.jsx)(R2e,{value:e.facets,workspaces:e.workspaces,onClear:()=>Ir.listFacets(U1)}),(0,at.jsx)(Gt.Text,{type:"secondary",role:"status",children:e.loading?"\u6B63\u5728\u8BFB\u53D6\u4F1A\u8BDD\u2026":`${e.rows.length+u} \u4E2A\u4F1A\u8BDD`}),e.error?(0,at.jsxs)(rt,{vertical:!0,children:[(0,at.jsx)(Gt.Text,{type:"danger",role:"alert",children:e.error}),(0,at.jsx)(_e,{onClick:e.refresh,children:"\u91CD\u65B0\u8BFB\u53D6"})]}):null,S?(0,at.jsxs)("div",{className:"unified-sidebar-current",role:"status",children:[(0,at.jsx)("span",{children:"\u5F53\u524D\u4F1A\u8BDD\u4E0D\u5728\u7B5B\u9009\u7ED3\u679C\u4E2D"}),(0,at.jsx)(_e,{kind:"ghost",size:"small",onClick:()=>{Ir.listFacets(U1),Ir.filter("list-query",""),$(!0)},children:"\u5B9A\u4F4D\u5F53\u524D\u4F1A\u8BDD"})]}):null]}),(0,at.jsxs)("div",{className:"unified-sidebar-rows",ref:h,children:[y.map((C,B)=>{let M=C.session,I=k1(M,e.entries.indexOf(C),t[M.id]),j=C.group.synthetic||C.group.global?"\u672A\u5206\u914D\u5DE5\u4F5C\u533A":C.group.workspaceName,N=[M.employeeName||C.conversation?.title||(Cl(M)?Tu(Cl(M),M.engine):M.sessionKind==="pty"?"\u7A7A\u767D\u7EC8\u7AEF":"\u6267\u884C\u5DE5\u5177\u672A\u77E5"),j,C.task?Q6(Y6(C)):"",C.archived?"\u5DF2\u5F52\u6863":D1(M).label].filter(Boolean).join(" \xB7 "),R=(0,at.jsxs)("div",{"data-unified-session":M.id,className:"unified-sidebar-row",children:[(0,at.jsx)(z2e,{id:M.id,title:I,titleGenerating:M.titleGenerating,avatarNode:(0,at.jsx)(_0,{session:M,size:20}),state:D1(M),glow:$6(M),summary:N,active:E(C),onClick:()=>a(C)}),(0,at.jsx)(Br,{className:"unified-sidebar-more","aria-label":`${I}\u7684\u83DC\u5355`,onClick:q=>{let W=q.currentTarget.getBoundingClientRect();q.currentTarget.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:W.right,clientY:W.bottom,button:2}))},children:(0,at.jsx)(Be,{name:"more",size:16})})]}),L=C.conversation?(0,at.jsx)(V2e,{item:C.conversation,row:R,onOpen:()=>a(C),onChanged:e.refresh},M.id):(0,at.jsx)(zD,{session:{...M,archived:C.archived},label:I,intoNewTask:M.workspaceTaskId?void 0:C.group,onOpen:()=>a(C),onArchive:async q=>{await HD(M.id,q),await Tl.reload()},onDelete:async()=>{await LD([M.id],C.task??null),await Tl.reload()},row:R},M.id);return(0,at.jsxs)(La.Fragment,{children:[b.length&&B===0?(0,at.jsxs)("div",{className:"unified-sidebar-section",children:["\u6211\u9700\u8981\u5173\u6CE8 ",(0,at.jsx)("span",{children:b.length})]}):null,b.length&&B===b.length?(0,at.jsxs)("div",{className:"unified-sidebar-section",children:["\u5176\u4ED6\u4F1A\u8BDD ",(0,at.jsx)("span",{children:x.length})]}):null,L]},M.id)}),l,!e.loading&&!e.rows.length&&!u&&!e.error?(0,at.jsxs)(rt,{vertical:!0,gap:8,className:"unified-sidebar-empty",role:"status",children:[(0,at.jsx)(Gt.Text,{type:"secondary",children:e.entries.length?"\u6CA1\u6709\u7B26\u5408\u6761\u4EF6\u7684\u4F1A\u8BDD":"\u8FD8\u6CA1\u6709\u4F1A\u8BDD"}),(0,at.jsx)(_e,{kind:"ghost",onClick:()=>{Ir.listFacets(U1),Ir.filter("list-query","")},children:"\u6E05\u9664\u7B5B\u9009\u4E0E\u641C\u7D22"}),(0,at.jsx)(_e,{onClick:o,children:"\u65B0\u5EFA\u4F1A\u8BDD"})]}):null]})]})})}function V2e({item:e,row:t,onOpen:r,onChanged:n}){let[a,o]=La.useState(!1),[l,u]=La.useState(!1),[d,p]=La.useState(""),h=La.useRef(null),v=async g=>{if(!l){if(o(!1),p(""),g==="open"){r();return}if(g==="profile"&&e.peerEmployeeId){m1.open({id:e.peerEmployeeId,name:e.title},h.current?.querySelector("button")??null);return}if(g==="delete"){let b=await gn.dialog({title:`\u5220\u9664\u5BF9\u8BDD\u300C${e.title}\u300D\uFF1F`,description:e.kind==="group"?"\u5C06\u5220\u9664\u7FA4\u804A\u53CA\u5173\u8054\u4EFB\u52A1\u3001\u6D88\u606F\u4E0E\u6267\u884C\u8BB0\u5F55\uFF0C\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002":"\u5C06\u6C38\u4E45\u5220\u9664\u6B64\u79C1\u804A\u7684\u6D88\u606F\u8BB0\u5F55\u548C\u4F1A\u8BDD\u6587\u4EF6\u3002\u5458\u5DE5\u8D44\u6599\u53CA\u5DF2\u7ECF\u6D3E\u51FA\u7684\u7FA4\u804A\u4EFB\u52A1\u4FDD\u7559\u3002\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002",actions:[{label:"\u53D6\u6D88",value:!1,autoFocus:!0},{label:"\u5220\u9664\u5BF9\u8BDD",value:!0,kind:"danger"}]});if(b.dismissed===!0||!b.action)return}u(!0);try{g==="pin"?await zf.updateListState(e.id,{pinned:!e.pinnedAt}):g==="delete"&&(await zf.remove(e.id),Ir.getSnapshot().selectedId===e.id&&Ir.select("")),n()}catch(b){p(b instanceof Error?b.message:"\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")}finally{u(!1)}}};return(0,at.jsx)(S6,{row:t,rowRef:h,open:a,onOpenChange:o,title:e.title,label:"\u4F1A\u8BDD\u83DC\u5355",error:d,menu:{items:[{key:"open",label:"\u6253\u5F00\u4F1A\u8BDD",disabled:l},...e.peerEmployeeId?[{key:"profile",label:"\u67E5\u770B\u5458\u5DE5\u8D44\u6599",disabled:l}]:[],{key:"pin",label:e.pinnedAt?"\u53D6\u6D88\u7F6E\u9876":"\u7F6E\u9876",disabled:l},{key:"delete",label:"\u5220\u9664\u5BF9\u8BDD\u2026",danger:!0,disabled:l}],onClick:({key:g})=>{v(g)}}})}var im=A(_(),1),G2e=A(_(),1),UK={items:[]},VK=UK,pB=new Set,$E=0,N9=null,P9=null;function K2e(e){VK=e;for(let t of pB)t()}function fB(){P9||(P9=mt("/api/attention").then(e=>{K2e({items:Array.isArray(e.items)?e.items:[]})}).catch(()=>{}).finally(()=>{P9=null}))}function X2e(e){return pB.add(e),$E+=1,$E===1&&(N9=U0(()=>fB()),fB()),()=>{pB.delete(e),$E-=1,$E===0&&(N9?.(),N9=null)}}function Q2e(){return(0,G2e.useSyncExternalStore)(X2e,()=>VK.items,()=>UK.items)}var an=A(xe(),1);function Y2e(e){return e.map(t=>t.entries.map(r=>`${r.id}:${r.status}`).join(",")).join("|")}function GK(){let e=Q2e(),t=vi(),r=Y2e(t.sidebar.groups);return im.useEffect(()=>{fB()},[r]),e}function KK(e,t,r){if(r(),e.sessionId){zn.close(),t({type:"session.select",id:e.sessionId});return}zn.open("","","teams")}function XK({items:e,onOpen:t}){return(0,an.jsx)(Bt,{children:(0,an.jsx)("ul",{className:"wand-attention-list",children:e.map(r=>(0,an.jsx)("li",{children:(0,an.jsx)(_e,{kind:"ghost",className:"wand-attention-item",onClick:()=>t(r),children:(0,an.jsxs)("span",{children:[(0,an.jsx)("strong",{children:r.title}),(0,an.jsx)("br",{}),r.detail]})})},r.id))})})}function J2e({open:e,onToggle:t,compact:r=!1}){let n=GK(),a=Hi(),o=im.useRef(null);if(r)return(0,an.jsx)(bi,{open:e,onOpenChange:d=>{d!==e&&t(),d||o.current?.focus({preventScroll:!0})},side:"right",align:"start",contentId:"sidebar-notifications",ariaLabel:"\u901A\u77E5",trigger:(0,an.jsx)(Br,{ref:o,className:"sidebar-notification-button",title:"\u901A\u77E5","aria-label":n.length?`\u901A\u77E5\uFF0C${n.length} \u4E2A\u62A5\u9519`:"\u901A\u77E5","aria-expanded":e,"aria-controls":"sidebar-notifications",kind:"ghost",children:(0,an.jsx)(qi,{count:n.length,size:"small",children:(0,an.jsx)(Be,{name:"bell",size:20})})}),children:(0,an.jsxs)("div",{className:"sidebar-notification-content",children:[(0,an.jsx)(Gt.Text,{strong:!0,children:"\u901A\u77E5"}),n.length?(0,an.jsx)(XK,{items:n,onOpen:d=>KK(d,a,t)}):(0,an.jsx)(Gt.Paragraph,{type:"secondary",children:"\u6682\u65E0\u9700\u8981\u5904\u7406\u7684\u901A\u77E5"})]})});if(n.length===0)return null;let l=`${n.length} \u4E2A\u62A5\u9519`,u=e?`${l}\uFF0C\u6536\u8D77\u6E05\u5355`:`${l}\uFF0C\u70B9\u5F00\u67E5\u770B`;return(0,an.jsxs)(_e,{kind:"ghost",type:"button",className:et("sidebar-attention-badge",e&&"is-open"),title:u,"aria-label":u,"aria-expanded":e,"aria-controls":"sidebar-attention-list",onClick:t,children:[(0,an.jsx)(Be,{name:"info",size:12,className:"sidebar-attention-badge-icon"}),(0,an.jsx)("span",{className:"sidebar-attention-badge-label",children:l}),(0,an.jsx)(Be,{name:"chevronDown",size:11,className:"sidebar-attention-badge-chevron"})]})}function Z2e(){let e=GK(),t=Hi(),[r,n]=im.useState(!1),a=im.useCallback(()=>n(!1),[]),o=im.useId(),l=im.useRef(null);if(im.useEffect(()=>{e.length===0&&n(!1)},[e.length]),e.length===0)return null;let u=`${e.length} \u4E2A\u62A5\u9519`,d=r?`${u}\uFF0C\u6536\u8D77\u6E05\u5355`:`${u}\uFF0C\u70B9\u5F00\u67E5\u770B`;return(0,an.jsxs)("section",{className:"home-attention","aria-label":"\u9700\u8981\u5904\u7406\u7684\u62A5\u9519",onKeyDown:p=>{p.key!=="Escape"||p.defaultPrevented||p.nativeEvent.isComposing||!r||(p.preventDefault(),p.stopPropagation(),n(!1),l.current?.focus({preventScroll:!0}))},children:[(0,an.jsxs)(_e,{kind:"ghost",type:"button",className:"home-attention-trigger",ref:l,"aria-controls":o,"aria-expanded":r,"aria-label":d,title:d,onClick:()=>n(p=>!p),children:[(0,an.jsx)(Be,{name:"info",size:13,className:"home-attention-trigger-icon"}),(0,an.jsx)("span",{children:u}),(0,an.jsx)(Be,{name:"chevronDown",size:13,className:"home-attention-trigger-chevron"})]}),(0,an.jsx)(qD,{id:o,open:r,children:(0,an.jsx)(XK,{items:e,onOpen:p=>KK(p,t,a)})})]})}var R9=A(_(),1);function e6e(e,t){let r=R9.useRef(null),n=R9.useRef(t);return n.current=t,R9.useEffect(()=>{let a=r.current;if(!e||!a)return;let o=document.activeElement instanceof HTMLElement?document.activeElement:null;a.focus({preventScroll:!0});let l=u=>{if(!(u.defaultPrevented||!a.contains(u.target))){if(u.key==="Tab"){let d=[],p=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT);for(;p.nextNode();){let g=p.currentNode;g instanceof HTMLElement&&g.tabIndex>=0&&!g.matches(":disabled")&&!g.closest('[inert], [aria-hidden="true"]')&&g.getClientRects().length>0&&getComputedStyle(g).visibility!=="hidden"&&d.push(g)}let h=d[0],v=d[d.length-1];(!h||(u.shiftKey?document.activeElement===h||document.activeElement===a:document.activeElement===v||document.activeElement===a))&&(u.preventDefault(),(u.shiftKey?v:h)?.focus({preventScroll:!0}));return}u.key==="Escape"&&(u.preventDefault(),n.current())}};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l),a.contains(document.activeElement)&&o?.focus({preventScroll:!0})}},[e]),r}var DE=A(_(),1),DG=8,AE=.28,t6e=50,AG=.35,r6e=56;function n6e({drawerRef:e,backdropRef:t,enabled:r,isOpen:n,onOpen:a,onClose:o}){let l=DE.useRef(a),u=DE.useRef(o);l.current=a,u.current=o;let d=DE.useRef({phase:"idle",startX:0,startY:0,startTime:0,currentX:0,currentY:0,initialOpen:!1,samples:[],drawerWidth:320,cleanups:[]});DE.useEffect(()=>{if(!r||typeof window>"u")return;let p=d.current,h=()=>{let F=e.current;return F&&F.offsetWidth>0?F.offsetWidth:Math.min(344,Math.max(260,window.innerWidth-24))},v=F=>{if(!(F instanceof Element))return!1;let S=F.closest("input, textarea, select, [contenteditable='true']");return!!(S&&document.activeElement===S||F.closest(".ant-tabs-nav, pre, code, [data-scroll-x], [data-no-drawer-gesture]"))},g=()=>{let F=e.current,S=t.current;F&&(F.style.transform="",F.style.transition="",F.style.willChange="",F.style.pointerEvents="",delete F.dataset.drawerGesture),S&&(S.style.opacity="",S.style.transition="",S.style.willChange="",S.style.pointerEvents="",delete S.dataset.drawerGesture)},b=F=>{if(F.touches.length!==1||p.phase==="animating")return;let S=F.touches[0];if(!S||v(F.target))return;let D=Math.max(r6e,Math.round(window.innerWidth*.16)),$=S.clientX<=D,C=e.current,B=t.current,M=C&&C.contains(F.target)||B&&B.contains(F.target);!n&&!$||n&&!M||(p.phase="tracking",p.startX=S.clientX,p.startY=S.clientY,p.startTime=Date.now(),p.currentX=S.clientX,p.currentY=S.clientY,p.initialOpen=n,p.drawerWidth=h(),p.samples=[{x:S.clientX,y:S.clientY,time:p.startTime}])},x=F=>{if(p.phase==="idle"||p.phase==="animating")return;let S=F.touches[0];if(!S)return;let D=Date.now(),$=S.clientX-p.startX,C=S.clientY-p.startY;if(p.phase==="tracking"){let L=Math.abs($),q=Math.abs(C);if(L<DG&&q<DG)return;if(q>=L){p.phase="idle";return}if(!p.initialOpen&&$<=0){p.phase="idle";return}if(p.initialOpen&&$>=0){p.phase="idle";return}p.phase="dragging";let W=e.current,U=t.current;W&&(W.dataset.drawerGesture="active",W.style.display="flex",W.style.willChange="transform",W.style.transition="none",W.style.pointerEvents="auto"),U&&(U.dataset.drawerGesture="active",U.style.display="block",U.style.willChange="opacity",U.style.transition="none",U.style.pointerEvents="auto")}if(p.phase!=="dragging")return;F.cancelable&&F.preventDefault(),p.currentX=S.clientX,p.currentY=S.clientY,p.samples.push({x:S.clientX,y:S.clientY,time:D});let B=D-140;for(;p.samples.length>2&&(p.samples[0]?.time??0)<B;)p.samples.shift();let M=p.drawerWidth,I=0,j=0;p.initialOpen?(I=Math.min(1,Math.max(0,1+$/M)),j=Math.min(0,Math.max(-M,$))):(I=Math.min(1,Math.max(0,$/M)),j=-M+$,j=Math.min(0,j));let N=e.current,R=t.current;N&&(N.style.transform=`translate3d(${j}px, 0, 0)`),R&&(R.style.opacity=String(I*.98))},y=()=>{if(p.phase!=="dragging"){p.phase="idle";return}p.phase="animating";let F=Date.now(),S=p.samples,D=0,$=0;if(S.length>=2){let X=S[0],Z=S[S.length-1],O=Math.max(1,Z.time-X.time);if(D=(Z.x-X.x)/O,S.length>=3){let z=S[Math.floor(S.length/2)],K=Math.max(1,z.time-X.time),J=Math.max(1,Z.time-z.time),te=(z.x-X.x)/K;$=((Z.x-z.x)/J-te)/J}}let C=D+$*t6e,B=p.drawerWidth,M=p.currentX-p.startX,I=p.initialOpen?Math.max(0,1+M/B):Math.max(0,M/B);I=Math.min(1,I);let j=!1;p.initialOpen?C<=-AE?j=!1:C>=AE?j=!0:j=I>=1-AG:C>=AE?j=!0:C<=-AE?j=!1:j=I>=AG;let N=window.matchMedia("(prefers-reduced-motion: reduce)").matches,R=e.current,L=t.current,q=()=>{g(),p.phase="idle",j?l.current():u.current()};if(N||!R){q();return}let W=j?0:-B,U=j?1:0,P=Math.abs((j?0:-B)-(p.initialOpen?M:-B+M)),H=Math.round(Math.min(260,Math.max(140,P/Math.max(.8,Math.abs(C)*1.5))));R.style.transition=`transform ${H}ms cubic-bezier(0.16, 1, 0.3, 1)`,R.style.transform=`translate3d(${W}px, 0, 0)`,L&&(L.style.transition=`opacity ${H}ms cubic-bezier(0.16, 1, 0.3, 1)`,L.style.opacity=String(U));let V=null,Q=X=>{X.target!==R||X.propertyName!=="transform"||(R.removeEventListener("transitionend",Q),V&&clearTimeout(V),q())};R.addEventListener("transitionend",Q),V=setTimeout(()=>{R.removeEventListener("transitionend",Q),q()},H+40)},E=()=>{p.phase==="dragging"&&g(),p.phase="idle"};return document.addEventListener("touchstart",b,{passive:!0}),document.addEventListener("touchmove",x,{passive:!1}),document.addEventListener("touchend",y,{passive:!0}),document.addEventListener("touchcancel",E,{passive:!0}),()=>{document.removeEventListener("touchstart",b),document.removeEventListener("touchmove",x),document.removeEventListener("touchend",y),document.removeEventListener("touchcancel",E),g()}},[r,n,e,t])}var Pe=A(xe(),1),QK="\u5408\u5E76\u5230\u4E3B\u5206\u652F\u2026",YK="\u91CD\u8BD5 worktree \u6E05\u7406",JK="\u5220\u9664\u4F1A\u8BDD";function ZK(e){return e.source.endsWith("-history")?e.source:"session"}function eX(e){return e.source.endsWith("-history")}function tX(e){if(!eX(e))return null;let t=e.source.slice(0,-8);return t==="codex"||t==="opencode"||t==="qoder"?t:"claude"}function bI(e,t){let r=ZK(e);if(t)return{primary:{type:"session.manage.select",target:r,id:e.id},resume:null,delete:null,merge:null,cleanup:null};let n=tX(e),a=n?{type:"session.resumeHistory",provider:n,id:e.id,cwd:e.cwd}:null,o=e.worktree?.enabled&&e.worktree.mergeStatus==="merged"?{type:"session.cleanup",id:e.id}:null,l=e.worktree?.enabled&&e.worktree.branch&&e.worktree.path&&e.worktree.mergeStatus!=="merged"?{type:"session.merge",id:e.id}:null;return{primary:a??{type:"session.select",id:e.id},resume:a??(e.resumable?{type:"session.resume",id:e.id}:null),delete:{type:"session.delete",target:r,id:e.id},merge:l,cleanup:o}}function BE({action:e,dispatch:t,actionName:r,label:n,icon:a,className:o,disabled:l,data:u}){return(0,Pe.jsx)(Br,{className:et("session-action-btn",o),"data-action":r,"data-session-id":u?.sessionId,"data-claude-session-id":u?.historyId,"data-cwd":u?.cwd,"aria-label":n,title:n,disabled:l,onClick:d=>{d.stopPropagation(),t(e)},children:(0,Pe.jsx)(Be,{name:a})})}function a6e({entry:e,dispatch:t}){let r=ZK(e);return(0,Pe.jsx)("span",{className:"wand-session-manage-check",onClick:n=>n.stopPropagation(),children:(0,Pe.jsx)(Bt,{children:(0,Pe.jsx)(UA,{"data-action":"toggle-selection","data-kind":r==="session"?"sessions":r==="codex-history"?"codex":"history","data-id":e.id,checked:e.selected,"aria-label":`\u9009\u62E9\u4F1A\u8BDD ${e.title}`,onChange:()=>{t({type:"session.manage.select",target:r,id:e.id})}})})})}function i6e({entry:e}){if(!e.worktree?.enabled)return null;let t={ready:"\u53EF\u5408\u5E76",checking:"\u68C0\u67E5\u4E2D",merging:"\u5408\u5E76\u4E2D",merged:"\u5DF2\u5408\u5E76",failed:"\u5408\u5E76\u5931\u8D25"},r=[e.worktree.branch&&`Worktree: ${e.worktree.branch}`,e.worktree.path&&`Path: ${e.worktree.path}`].filter(Boolean).join(`
252
+ `);return(0,Pe.jsxs)(Pe.Fragment,{children:[(0,Pe.jsx)(Cd,{className:"session-kind-badge worktree",title:r||void 0,children:"Worktree"}),e.worktree.mergeStatus&&(0,Pe.jsx)(Cd,{className:et("session-kind-badge worktree-merge",e.worktree.mergeStatus),children:t[e.worktree.mergeStatus]??e.worktree.mergeStatus})]})}function o6e(e){let t=e.endedAt??e.startedAt;if(!t)return"";let r=new Date(t);if(!Number.isFinite(r.getTime()))return"";if(!e.endedAt&&e.turnActive){let a=e.turnStartedAt??e.startedAt;if(!a)return"";let o=new Date(a).getTime();if(!Number.isFinite(o))return"";let l=Math.max(0,Math.floor((Date.now()-o)/1e3)),u=Math.floor(l/3600),d=Math.floor(l%3600/60),p=l%60;return u>0?`${u}:${String(d).padStart(2,"0")}:${String(p).padStart(2,"0")}`:`${String(d).padStart(2,"0")}:${String(p).padStart(2,"0")}`}let n=Math.max(0,Date.now()-r.getTime());return n<6e4?"\u521A\u521A":n<36e5?`${Math.floor(n/6e4)}\u5206\u949F\u524D`:n<864e5?`${Math.floor(n/36e5)}\u5C0F\u65F6\u524D`:n<6048e5?`${Math.floor(n/864e5)}\u5929\u524D`:r.toLocaleDateString([],{month:"numeric",day:"numeric"})}function s6e({entry:e}){let t=e.engine==="sdk"?jb:Nb(e.provider),r=Ko(e.provider);return(0,Pe.jsx)("span",{className:et("session-provider-mark",`provider-${r??"generic"}`,e.engine==="sdk"&&"provider-engine-sdk"),"aria-hidden":"true",title:t,children:(0,Pe.jsx)(Xo,{provider:r})})}function BG({path:e}){return e?(0,Pe.jsx)(Gt.Text,{ellipsis:!0,type:"secondary",className:"session-path",style:{maxWidth:160,fontSize:12},title:e,"aria-label":e,children:e}):null}function l6e({entry:e,manageMode:t,dispatch:r}){let n=bI(e,t),a=eX(e),o=tX(e)??"claude",l=a?{historyId:e.id,cwd:e.cwd}:{sessionId:e.id},u=()=>{r(n.primary)},d=o6e(e),p=!a&&(e.permissionBlocked||e.inFlight||e.turnActive||["thinking","waiting-input","waiting_input","reconnecting"].includes(e.status)),h=e.permissionBlocked||["waiting-input","waiting_input","reconnecting"].includes(e.status),v=a?"none":e.permissionBlocked?"permission":e.status==="waiting-input"||e.status==="waiting_input"?"waiting-input":e.status==="reconnecting"?"reconnecting":e.status==="failed"?"failed":e.inFlight||e.turnActive&&e.status==="running"?e.status==="thinking"?"thinking":"running":e.status==="running"&&e.provider&&e.kind==="pty"&&!e.ptyBusy?"none":e.status==="running"?"running":e.status==="thinking"?"thinking":Gi(e)?"just-completed":"none";return(0,Pe.jsx)("div",{className:et("session-item",a&&"non-wand-session",e.active&&"active",t&&e.selected&&"selected",t&&"session-managing",p&&"status-prominent",h&&"status-prominent-warning"),style:{marginBlock:4},"data-session-id":a?void 0:e.id,"data-claude-history-id":a?e.id:void 0,"data-provider":a?o:void 0,"data-cwd":a?e.cwd:void 0,children:(0,Pe.jsx)("div",{className:"session-item-content",children:(0,Pe.jsxs)(rt,{align:"center",gap:4,className:"session-item-row",children:[t&&(0,Pe.jsx)(a6e,{entry:e,dispatch:r}),(0,Pe.jsxs)(_e,{kind:e.active?"soft":"ghost",className:"session-main wand-sidebar-history-action",style:{flex:1,minWidth:0,height:"auto",whiteSpace:"normal",padding:8,display:"flex",flexDirection:"column",alignItems:"stretch",textAlign:"start"},"aria-current":e.active?"page":void 0,onClick:u,children:[(0,Pe.jsxs)(rt,{align:"center",gap:"small",className:"session-title-row",children:[(0,Pe.jsx)("span",{className:et("session-leading-slot",v!=="none"&&`wand-logo-glow glow-${v}`),"data-glow":v,style:{display:"inline-flex",width:20,height:20,flexShrink:0},children:(0,Pe.jsx)(s6e,{entry:e})}),(0,Pe.jsx)("div",{className:et(a?"session-command claude-history-preview":"session-title",e.titleGenerating&&"title-generating"),"aria-busy":e.titleGenerating||void 0,"aria-label":e.titleGenerating?`${e.title}\uFF0CAI \u6B63\u5728\u751F\u6210\u6807\u9898`:void 0,style:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]}),e.description&&(0,Pe.jsx)("div",{className:"session-description",children:e.description}),(0,Pe.jsxs)(rt,{gap:"small",wrap:!0,className:"session-meta",style:{fontSize:12},children:[(0,Pe.jsx)("span",{className:"session-leading-slot session-time",children:d}),a?(0,Pe.jsxs)(Pe.Fragment,{children:[(0,Pe.jsxs)("span",{className:"session-context session-context-recoverable",children:[(0,Pe.jsx)(Be,{name:"history",size:11}),"\u53EF\u6062\u590D"]}),(0,Pe.jsx)(BG,{path:e.cwd})]}):(0,Pe.jsxs)(Pe.Fragment,{children:[(0,Pe.jsx)(BG,{path:e.cwd}),(0,Pe.jsx)(i6e,{entry:e})]})]})]}),!t&&(0,Pe.jsxs)(rt,{align:"center",gap:2,className:"session-actions",children:[n.resume&&(0,Pe.jsx)(BE,{action:n.resume,dispatch:r,actionName:a?o==="claude"?"resume-history":`resume-${o}-history`:"resume",label:a?`\u6062\u590D\u6B64 ${Nb(o)} \u4F1A\u8BDD`:"\u6062\u590D\u4F1A\u8BDD",icon:"resume",data:l}),n.merge&&(0,Pe.jsx)(BE,{action:n.merge,dispatch:r,actionName:"worktree-merge",label:QK,icon:"merge",className:"merge-btn",disabled:e.status==="running"||e.worktree?.mergeStatus==="merging",data:l}),n.cleanup&&(0,Pe.jsx)(BE,{action:n.cleanup,dispatch:r,actionName:"worktree-cleanup",label:YK,icon:"trash",className:"merge-btn",data:l}),n.delete&&(0,Pe.jsx)(BE,{action:n.delete,dispatch:r,actionName:a?o==="claude"?"delete-history":`delete-${o}-history`:"delete-session",label:JK,icon:"trash",className:"delete-btn",data:l})]})]})})})}var u6e={load:"\u52A0\u8F7D\u5931\u8D25",sync:"\u672A\u540C\u6B65"};function c6e(){let e=us.useSyncExternalStore(WD,D6,D6),[t,r]=us.useState(!1);if(us.useEffect(()=>{e||r(!1)},[e]),!e)return null;let n=u6e[e.kind];return(0,Pe.jsx)(_e,{kind:"ghost",type:"button",className:et("sidebar-list-error",t&&"is-retrying"),title:`${q1(e.message)}\uFF5C\u70B9\u51FB\u91CD\u65B0\u52A0\u8F7D`,"aria-label":`${n}\uFF1A${q1(e.message)}\uFF0C\u70B9\u51FB\u91CD\u65B0\u52A0\u8F7D`,disabled:t,onClick:()=>{r(!0),e.retry().finally(()=>r(!1))},children:(0,Pe.jsx)(Be,{name:"refresh",size:18,className:"sidebar-list-error-icon"})})}function d6e(e){switch(e.type){case"session.select":case"session.resume":case"session.resumeHistory":case"nav.home":case"auth.logout":case"native.back":case"native.switchServer":return!0;default:return!1}}async function p6e(e,t){let r=await gn.dialog({title:"\u9000\u51FA\u767B\u5F55\uFF1F",focusTriggerAfterClose:!1,description:"\u9000\u51FA\u540E\u9700\u8981\u91CD\u65B0\u8FDE\u63A5\u3002\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u4F1A\u7EE7\u7EED\u6267\u884C\u3002",actions:[{label:"\u53D6\u6D88",value:!1,autoFocus:!0},{label:"\u9000\u51FA\u767B\u5F55",value:!0,kind:"danger"}]});r.dismissed!==!0&&r.action?e():t?.()}function f6e({active:e,onToggle:t}){let r=e?"\u5C55\u5F00\u5B8C\u6574\u4FA7\u8FB9\u680F":"\u6536\u8D77\u4E3A\u7A84\u680F";return(0,Pe.jsxs)(Br,{className:et("sidebar-compact-toggle",e&&"active"),kind:"ghost",size:"small","aria-label":r,"aria-pressed":e,"data-pressed":e||void 0,title:r,onClick:t,children:[(0,Pe.jsx)(Be,{name:"chevronLeft",className:"sidebar-collapse-direction"}),(0,Pe.jsx)("span",{className:"sidebar-compact-toggle-label",children:e?"\u5C55\u5F00":"\u6536\u8D77"})]})}function m6e(){let e=vi(),t=Wf(),r=Hi(),n=us.useSyncExternalStore(_l.subscribe,_l.getSnapshot,_l.getSnapshot),a=us.useSyncExternalStore(xl.subscribe,xl.getSnapshot,xl.getSnapshot),o=us.useSyncExternalStore(za.subscribe,za.getSnapshot,za.getSnapshot),l=iA(!1),u=s1().name||B3,[d,p]=us.useState(!1),h=us.useRef(null),v=SD(),[g,b]=us.useState(!1),x=!e.layout.sidebarDrawer&&(o.open||t.directory||n.open||a.open||e.layout.filePanelOpen),y=!e.layout.sidebarDrawer&&e.layout.sidebarPinned&&e.layout.sidebarCollapsed,E=et("sidebar sidebar-refined sidebar-unified",e.layout.sessionsDrawerOpen&&"open",!e.layout.sidebarDrawer&&e.layout.sidebarAnchored&&"pinned",y&&!x&&"collapsed",x&&"context-rail"),F=e.layout.sessionsDrawerOpen||!e.layout.sidebarDrawer&&e.layout.sidebarAnchored,S=F&&(e.layout.sidebarDrawer||!e.layout.sidebarPinned),D=e6e(S,()=>{r({type:"layout.drawer.close"})}),$=us.useRef(null);n6e({drawerRef:D,backdropRef:$,enabled:e.layout.sidebarDrawer||S,isOpen:e.layout.sessionsDrawerOpen,onOpen:()=>{r({type:"layout.drawer.open"})},onClose:()=>{r({type:"layout.drawer.close"})}});let C=Object.fromEntries(e.sidebar.groups.flatMap(L=>L.entries.map(q=>[q.id,q.title]))),B=q2e(F,C),M=()=>{S&&r({type:"layout.drawer.close"})},I=()=>{let L=B.groups.find(q=>`id:${q.workspaceId}`===B.facets.workspace&&!q.synthetic&&!q.global);Yi.close(),zn.close(),ko.close(),ua.open(L?{workspaceId:L.workspaceId,initialCwd:L.workspaceCwd}:void 0),M()},j=L=>{Yi.close(),zn.close(),ko.close(),M(),L.conversation?Ir.select(L.conversation.id):(Ir.suspend(),jD(L.session.id,q=>{r({type:"session.select",id:q})}))},N=L=>{d6e(L)&&(Yi.close(),zn.close(),ko.close(),Ir.suspend()),L.type==="nav.home"&&Ir.show(),M(),r(L)},R=B.facets.runtime==="all"&&B.facets.taskStage==="all"&&B.facets.workspace==="all"&&B.facets.archive==="all"&&!B.facets.activityOnly?e.sidebar.groups.filter(L=>L.kind==="history").flatMap(L=>L.entries).filter(L=>!B.entries.some(q=>q.session.id===L.id)&&Gu(B.query,L.title,L.description,L.cwd,L.provider)):[];return us.useEffect(()=>{p(!1)},[F,y,x]),us.useEffect(()=>{F||b(!1)},[F]),(0,Pe.jsxs)(js.Provider,{value:v,children:[(0,Pe.jsx)("div",{id:"sessions-drawer-backdrop",ref:$,className:et("drawer-backdrop",e.layout.sessionsBackdropVisible&&"open"),"aria-hidden":"true",style:{position:"fixed",inset:0,background:"var(--bg-overlay)",zIndex:19999,display:e.layout.sessionsBackdropVisible?void 0:"none"},onClick:()=>{r({type:"layout.drawer.close"})}}),(0,Pe.jsxs)(yk.Sider,{id:"sessions-drawer",ref:D,className:E,width:x?76:"min(356px, calc(100vw - 24px))",collapsedWidth:76,collapsed:y&&!x,theme:"light",style:{position:S?"fixed":"relative",top:S?"var(--wand-safe-top, 0px)":void 0,bottom:S?"var(--wand-safe-bottom, 0px)":void 0,left:0,display:F?void 0:"none",zIndex:S?2e4:2,height:"100%",overflow:"visible"},styles:{body:{display:"flex",flexDirection:"row",height:"100%",minHeight:0}},"aria-label":"\u4E3B\u5BFC\u822A\u4E0E\u4F1A\u8BDD\u5217\u8868",role:S?"dialog":void 0,"aria-modal":S||void 0,"aria-hidden":!F||void 0,inert:!F,tabIndex:-1,children:[(0,Pe.jsxs)(rt,{vertical:!0,align:"center",className:"sidebar-navigation-rail",children:[(0,Pe.jsxs)("div",{className:"sidebar-rail-scroll",children:[(0,Pe.jsx)(ju,{className:"sidebar-brand-mark",style:{width:"var(--conversation-brand-size, 24px)",height:"var(--conversation-brand-size, 24px)"}}),!e.layout.sidebarDrawer&&(0,Pe.jsx)(f6e,{active:y,onToggle:()=>{r({type:"layout.drawer.collapse"})}}),(0,Pe.jsx)(L2e,{activePage:o.open?null:a.open?"knowledge":n.open?n.page==="board"?"board":n.page==="schedules"?"schedules":n.page==="calendar"?"calendar":"teams":t.directory?"teams":"chats",teamAttention:l,onNavigate:L=>{b(!1),Yi.close(),L!=="knowledge"&&a.open&&ko.close(),L==="knowledge"?(zn.close(),ko.open()):L==="board"||L==="teams"||L==="schedules"||L==="calendar"?zn.open(L==="calendar"?"":e.selected?.workspaceId??"",L==="calendar"?"":e.selected?.id??"",L):(zn.close(),L==="contacts"?Ir.directory(!0):(Ir.mode("tasks"),Ir.suspend())),L!=="chats"&&L!=="tasks"&&M()}}),(0,Pe.jsx)(W2e,{model:B,enabled:F})]}),(0,Pe.jsxs)(rt,{vertical:!0,align:"center",gap:4,className:"sidebar-rail-notices",children:[(0,Pe.jsx)(J2e,{compact:!0,open:g,onToggle:()=>b(L=>!L)}),(0,Pe.jsx)(c6e,{}),(0,Pe.jsx)(XD,{compact:!0,visible:F})]}),(0,Pe.jsxs)(Sd,{open:d,onOpenChange:p,modal:!1,children:[(0,Pe.jsx)(Hu,{ref:h,render:(0,Pe.jsxs)(Br,{kind:o.open?"soft":"ghost","aria-current":o.open?"page":void 0,id:"settings-button",className:"sidebar-profile-button",title:`${u} \xB7 \u8BBE\u7F6E`,"aria-label":"\u8D26\u6237\u4E0E\u8BBE\u7F6E",children:[(0,Pe.jsx)(Be,{name:"gear",size:18}),(0,Pe.jsx)("span",{className:"sidebar-nav-label","aria-hidden":"true",children:"\u8BBE\u7F6E"})]})}),(0,Pe.jsxs)(qu,{id:"sidebar-account-menu",className:"sidebar-tools-menu","aria-label":"\u8D26\u6237\u4E0E\u8BBE\u7F6E",side:"right",align:"end",sideOffset:6,children:[(0,Pe.jsx)(nn,{icon:"user",onClick:()=>{p(!1),Yi.close(),zn.close(),Ir.directory(!0),M()},children:"\u5458\u5DE5\u4E0E\u901A\u8BAF\u5F55"}),(0,Pe.jsx)(nn,{id:"sidebar-settings-entry",icon:"gear",onClick:()=>{p(!1),b(!1),N({type:"settings.open"})},children:"\u8BBE\u7F6E"}),(0,Pe.jsx)(Ms,{}),(0,Pe.jsx)(pD,{menuItem:!0}),(0,Pe.jsx)(nn,{id:"logout-button",icon:"logout",tone:"danger",onClick:()=>{p(!1),p6e(()=>N({type:"auth.logout"}),()=>{requestAnimationFrame(()=>h.current?.focus({preventScroll:!0}))})},children:"\u9000\u51FA\u767B\u5F55"})]})]})]}),(0,Pe.jsxs)(rt,{vertical:!0,className:"sidebar-list-panel",hidden:x||y,inert:x||y,children:[(0,Pe.jsxs)(rt,{align:"center",justify:"space-between",className:"sidebar-header",style:{padding:"10px 12px",flexShrink:0},children:[(0,Pe.jsx)(Gt.Text,{strong:!0,className:"sidebar-title",children:"\u4F1A\u8BDD"}),e.layout.sidebarDrawer&&(0,Pe.jsx)(Br,{id:"close-drawer-button","aria-label":"\u5173\u95ED\u4FA7\u680F",onClick:()=>{r({type:"layout.drawer.close"})},children:(0,Pe.jsx)(x1,{open:!0})})]}),(0,Pe.jsx)(U2e,{model:B,titles:C,enabled:F&&!x&&!y,selectedSessionId:e.selected?.id??null,selectedConversationId:t.active&&!t.directory?t.selectedId:null,onOpen:j,onCreate:I,historyCount:R.length,historyRows:R.map(L=>(0,Pe.jsx)(l6e,{entry:L,manageMode:!1,dispatch:N},`${L.source}:${L.id}`))}),(e.layout.sidebarDrawer||e.capabilities.backToNative||e.capabilities.switchServer)&&(0,Pe.jsx)(rt,{vertical:y,align:"center",justify:"space-between",gap:"small",className:"sidebar-footer",style:{flexShrink:0,padding:y?8:"8px 16px",borderTop:"1px solid var(--border-subtle)"},children:(0,Pe.jsxs)(rt,{component:"nav",wrap:!0,gap:4,vertical:y,className:"sidebar-footer-actions","aria-label":"\u4FA7\u680F\u5FEB\u6377\u64CD\u4F5C",children:[e.layout.sidebarDrawer&&(0,Pe.jsxs)(Br,{id:"file-panel-toggle-btn",title:"\u67E5\u770B\u6587\u4EF6","aria-label":"\u6587\u4EF6","aria-pressed":e.layout.filePanelOpen,onClick:()=>N({type:"layout.files.toggle"}),children:[(0,Pe.jsx)(Be,{name:"explorer",size:16}),(0,Pe.jsx)("span",{children:"\u6587\u4EF6"})]}),e.capabilities.backToNative&&(0,Pe.jsxs)(Br,{id:"back-to-native-button",title:"\u8FD4\u56DE App \u539F\u751F\u754C\u9762","aria-label":"\u8FD4\u56DE App",onClick:()=>N({type:"native.back"}),children:[(0,Pe.jsx)(Be,{name:"back",size:16}),(0,Pe.jsx)("span",{hidden:y,children:"\u8FD4\u56DEApp"})]}),e.capabilities.switchServer&&(0,Pe.jsxs)(Br,{id:"switch-server-button",title:"\u5207\u6362\u670D\u52A1\u5668","aria-label":"\u5207\u6362\u670D\u52A1\u5668",onClick:()=>N({type:"native.switchServer"}),children:[(0,Pe.jsx)(Be,{name:"server",size:16}),(0,Pe.jsx)("span",{hidden:y,children:"\u5207\u6362"})]})]})})]})]})]})}var wk=A(_(),1),h6e=A(xe(),1);function rX({id:e="topbar-git-badge",className:t}={}){let r=vi(),n=Hi(),a=r.topbar.git;if(!a)return null;let o=`${a.branch} \xB7 ${a.clean?"\u5DE5\u4F5C\u533A\u5E72\u51C0":`${a.modifiedCount} \u4E2A\u6587\u4EF6\u5F85\u63D0\u4EA4`}`;return(0,h6e.jsxs)(nn,{id:e,className:t,icon:"git",title:o,"aria-label":"\u5FEB\u6377\u63D0\u4EA4",onSelect:()=>{n({type:"topbar.gitCommit"})},hint:a.clean?"\u65E0\u6539\u52A8":`${a.modifiedCount} \u4E2A\u6539\u52A8`,children:["\u5FEB\u6377\u63D0\u4EA4 \xB7 ",a.branch]})}var $t=A(xe(),1);function g6e(e,t){let r=[];return e.claudeSessionId&&r.push({action:{type:"topbar.copy",field:"providerSessionId"},actionName:"copy-claude-session-id",label:e.provider==="codex"?"\u590D\u5236 Codex thread ID":e.provider==="opencode"?"\u590D\u5236 OpenCode session ID":`\u590D\u5236 ${Tu(e.provider,e.engine)} \u4F1A\u8BDD ID`,icon:"copy"}),e.cwd&&r.push({action:{type:"topbar.copy",field:"cwd"},actionName:"copy-cwd",label:"\u590D\u5236\u5DE5\u4F5C\u76EE\u5F55",icon:"folder"}),r.push({action:{type:"topbar.copy",field:"sessionId"},actionName:"copy-session-id",label:"\u590D\u5236\u4F1A\u8BDD ID",icon:"hash"}),t?.merge&&r.push({action:t.merge,actionName:"worktree-merge",label:QK,icon:"merge",dividerBefore:!0,disabled:e.status==="running"||e.worktree?.mergeStatus==="merging"}),t?.cleanup&&r.push({action:t.cleanup,actionName:"worktree-cleanup",label:YK,icon:"trash"}),t?.delete&&r.push({action:t.delete,actionName:"delete-session",label:JK,icon:"trash",tone:"danger"}),r}function nX({selected:e,actions:t,onAction:r,terminalControls:n=!0}){return(0,$t.jsxs)($t.Fragment,{children:[n&&e.kind==="pty"&&(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(nn,{onSelect:()=>r({type:"terminal.display",command:"zoom-in"}),children:"\u653E\u5927\u7EC8\u7AEF\u5B57\u53F7"}),(0,$t.jsx)(nn,{onSelect:()=>r({type:"terminal.display",command:"zoom-out"}),children:"\u7F29\u5C0F\u7EC8\u7AEF\u5B57\u53F7"}),(0,$t.jsx)(nn,{onSelect:()=>r({type:"terminal.display",command:"reset"}),children:"\u6062\u590D\u9ED8\u8BA4\u5B57\u53F7"}),(0,$t.jsx)(nn,{icon:"refresh",onSelect:()=>r({type:"terminal.display",command:"refresh"}),children:"\u5237\u65B0\u7EC8\u7AEF\u663E\u793A"}),(0,$t.jsx)(Ms,{})]}),g6e(e,t).map(a=>(0,$t.jsxs)(wk.Fragment,{children:[a.dividerBefore?(0,$t.jsx)(Ms,{}):null,(0,$t.jsx)(nn,{"data-action":a.actionName,icon:a.icon,tone:a.tone??"default",disabled:a.disabled,onClick:()=>r(a.action),children:a.label})]},a.actionName))]})}function v6e({terminalActionVisible:e=!0}={}){let t=vi(),r=Hi(),n=t.layout.topbarMoreOpen,a=wk.useRef(n);wk.useEffect(()=>{a.current=n},[n]);let o=(0,$t.jsx)(aX,{snapshot:t,onAction:r,terminalActionVisible:e,onMoreOpenChange:l=>{l!==a.current&&(a.current=l,r({type:"topbar.menu.toggle"}))}});return e?(0,$t.jsx)(J0,{children:o}):o}function aX({snapshot:e,onAction:t,onMoreOpenChange:r,measurement:n=!1,terminalActionVisible:a=!0}){let o=e.selected,l=e.layout.topbarMoreOpen,u=o?bI(o,!1):null,d=v=>n?void 0:v,p=wk.useRef(null),h=v=>{p.current?.focus({preventScroll:!0}),t?.(v)};return(0,$t.jsxs)(rt,{align:"center",gap:"small",wrap:!0,className:et("main-header-row",(o?.turnActive||o?.permissionBlocked)&&"is-running",o?.permissionBlocked&&"is-permission-blocked"),style:{flexShrink:0,padding:"8px var(--wand-page-inset, 20px)",borderBottom:"1px solid var(--border-subtle)"},children:[(0,$t.jsxs)(rt,{align:"center",gap:"small",className:"topbar-left",children:[(e.layout.sidebarDrawer||!e.layout.sidebarAnchored)&&(0,$t.jsx)(Br,{id:d("sessions-toggle-button"),className:et("floating-sidebar-toggle",e.layout.sessionsDrawerOpen&&"active"),"aria-label":e.layout.sessionsDrawerOpen?"\u5173\u95ED\u4F1A\u8BDD\u4FA7\u680F":"\u6253\u5F00\u4F1A\u8BDD\u4FA7\u680F","aria-expanded":e.layout.sessionsDrawerOpen,"aria-controls":n?void 0:"sessions-drawer","data-pressed":e.layout.sessionsDrawerOpen||void 0,onClick:()=>{t?.({type:"layout.drawer.toggle"})},children:(0,$t.jsx)(x1,{open:e.layout.sessionsDrawerOpen,size:18})}),!e.layout.sidebarAnchored&&(0,$t.jsx)(ju,{className:"topbar-brand",style:{width:24,height:24}})]}),(0,$t.jsx)(rt,{vertical:!0,gap:2,className:"topbar-center",style:{flex:"1 1 0",minWidth:0},children:o?(0,$t.jsx)($t.Fragment,{children:(0,$t.jsxs)(rt,{align:"center",gap:8,className:"topbar-title-row",children:[(0,$t.jsx)(Gt.Text,{ellipsis:!0,className:et("topbar-session-title",e.topbar.titleGenerating&&"title-generating"),title:[e.topbar.title,e.topbar.titleGenerating&&"AI \u6B63\u5728\u751F\u6210\u6807\u9898",e.topbar.description].filter(Boolean).join(`
253
+ `),"aria-label":e.topbar.titleGenerating?`${e.topbar.title}\uFF0CAI \u6B63\u5728\u751F\u6210\u6807\u9898`:void 0,"aria-busy":e.topbar.titleGenerating||void 0,style:{minWidth:0,maxWidth:520,fontWeight:"var(--font-weight-semibold)"},children:e.topbar.title}),(0,$t.jsx)(Gt.Text,{className:et("current-task",!e.topbar.currentTask&&"hidden"),id:d("current-task"),title:e.topbar.currentTask||void 0,hidden:!e.topbar.currentTask,children:e.topbar.currentTask})]})}):(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)("span",{className:"topbar-tagline",children:e.topbar.title||"Wand \u63A7\u5236\u53F0"}),(0,$t.jsx)("span",{className:"current-task hidden",id:d("current-task")})]})}),(0,$t.jsxs)(rt,{align:"center",gap:4,className:"topbar-right",children:[!n&&(0,$t.jsx)(yA,{visible:a}),(0,$t.jsx)("div",{className:"topbar-more-wrap",children:n?(0,$t.jsx)(Br,{kind:"ghost",size:"medium",children:(0,$t.jsx)(Be,{name:"more",size:18})}):(0,$t.jsxs)(Sd,{open:l,onOpenChange:r,children:[(0,$t.jsx)(Hu,{ref:p,render:(0,$t.jsx)(Br,{id:d("topbar-more-button"),kind:"ghost",size:"medium","aria-label":"\u5F53\u524D\u4F1A\u8BDD\u64CD\u4F5C",title:"\u5F53\u524D\u4F1A\u8BDD\u64CD\u4F5C","data-pressed":l||void 0,children:(0,$t.jsx)(Be,{name:"more",size:18})})}),(0,$t.jsxs)(qu,{id:d("topbar-more-menu"),"aria-label":"\u5F53\u524D\u4F1A\u8BDD",align:"end",sideOffset:6,children:[(0,$t.jsx)(nn,{id:"topbar-file-button",icon:"explorer",onSelect:()=>h({type:"layout.files.toggle"}),children:e.layout.filePanelOpen?"\u5173\u95ED\u6587\u4EF6\u9762\u677F":"\u6587\u4EF6"}),(0,$t.jsx)(nn,{id:"topbar-local-preview-button",icon:"eye",onSelect:()=>Os.show(),children:"\u672C\u5730\u9884\u89C8"}),(0,$t.jsx)(rX,{}),o&&(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(Ms,{}),(0,$t.jsx)(nX,{selected:o,actions:u,onAction:h})]})]})]})})]})]})}var pa=A(xe(),1);function iX({windowActions:e}){let t=vi(),r=Hi(),n=FE.useSyncExternalStore(Xr.subscribe,Xr.getSnapshot,Xr.getServerSnapshot),[a,o]=FE.useState(!1),l=FE.useRef(null),u=n.layout?.windows.find(h=>h.id===n.layout?.activeWindowId)?.layout.type==="split";FE.useEffect(()=>o(!1),[t.selected?.id,n.taskId,n.layout?.activeWindowId]);let d=()=>o(!1),p=h=>{d(),l.current?.focus({preventScroll:!0}),r(h)};return(0,pa.jsxs)("div",{className:"workbar-actions",children:[(0,pa.jsx)(Z0,{}),(0,pa.jsxs)(Sd,{open:a,onOpenChange:o,children:[(0,pa.jsx)(Hu,{ref:l,render:(0,pa.jsx)(Br,{"aria-label":"\u5F53\u524D\u4F1A\u8BDD\u4E0E\u7A97\u53E3\u64CD\u4F5C",title:"\u66F4\u591A\u64CD\u4F5C",children:(0,pa.jsx)(Be,{name:"more",size:18})})}),(0,pa.jsxs)(qu,{align:"end","aria-label":"\u5F53\u524D\u4F1A\u8BDD\u4E0E\u7A97\u53E3\u64CD\u4F5C",children:[(0,pa.jsx)(nn,{icon:"explorer",onSelect:()=>p({type:"layout.files.toggle"}),children:t.layout.filePanelOpen?"\u5173\u95ED\u6587\u4EF6\u9762\u677F":"\u6587\u4EF6"}),(0,pa.jsx)(nn,{icon:"eye",onSelect:()=>{d(),Os.show()},children:"\u672C\u5730\u9884\u89C8"}),(0,pa.jsx)(rX,{id:"workspace-tab-git-badge"}),t.selected&&(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsx)(Ms,{}),(0,pa.jsx)(nX,{selected:t.selected,actions:bI(t.selected,!1),onAction:p,terminalControls:!u})]}),e&&(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsx)(Ms,{}),e(d)]})]})]})]})}function oX(){let e=vi(),t=Hi();return e.layout.sidebarDrawer||!e.layout.sidebarAnchored?(0,pa.jsx)(Br,{"aria-label":e.layout.sessionsDrawerOpen?"\u5173\u95ED\u4F1A\u8BDD\u4FA7\u680F":"\u6253\u5F00\u4F1A\u8BDD\u4FA7\u680F","aria-expanded":e.layout.sessionsDrawerOpen,"aria-controls":"sessions-drawer",onClick:()=>{t({type:"layout.drawer.toggle"})},children:(0,pa.jsx)(x1,{open:e.layout.sessionsDrawerOpen,size:18})}):null}var bg=A(_(),1),Mr=A(xe(),1);function b6e({status:e}){let t=e==="running"||e==="thinking",r=e==="waiting-input"?"\u7B49\u5F85\u8F93\u5165":e==="failed"?"\u5931\u8D25":t?"\u8FD0\u884C\u4E2D":e==="stopped"||e==="exited"?"\u5DF2\u7ED3\u675F":"\u7A7A\u95F2";return!t&&e!=="failed"&&e!=="waiting-input"?(0,Mr.jsx)("span",{className:"workbar-accessible-title",children:r}):(0,Mr.jsx)("span",{"aria-label":r,title:r,children:(0,Mr.jsx)(qi,{status:e==="failed"?"error":t?"processing":"warning",className:et("workspace-tab-dot",t?"running":"idle"),"aria-hidden":!0})})}function y6e({className:e,...t}={}){return(0,Mr.jsx)(_e,{kind:"ghost","aria-label":"\u5DE5\u4F5C\u7A97\u53E3\u64CD\u4F5C",title:"\u5DE5\u4F5C\u7A97\u53E3\u64CD\u4F5C",...t,className:et("workspace-tab-more",e),children:(0,Mr.jsx)(Be,{name:"more",size:18})})}function w6e({children:e,onClose:t}){return(0,Mr.jsxs)("div",{className:"workbar-actions",children:[e,(0,Mr.jsx)(_e,{kind:"ghost","aria-label":"\u6253\u5F00\u7EC8\u7AEF",children:(0,Mr.jsx)(Be,{name:"terminal",size:18})}),(0,Mr.jsx)(y6e,{onClick:t})]})}function Zk({mobile:e,taskName:t,variant:r="task",activeWindowId:n,windows:a,movingDir:o,closingWindowId:l,onSelectWindow:u,onCloseWindow:d,onNewSession:p,onCancelMove:h,leading:v,actions:g}){let b=r==="standalone",x=a.find(y=>y.id===n);return(0,Mr.jsxs)(rt,{align:"center",gap:8,className:"workspace-tab-bar","data-session-tabs":r,children:[(0,Mr.jsx)("h1",{className:"workbar-accessible-title",children:x?.label||t||"\u5DE5\u4F5C\u7A97\u53E3"}),v,(0,Mr.jsxs)(rt,{align:"center",gap:8,className:"workspace-tab-bar-list",children:[(0,Mr.jsx)(Bt,{children:(0,Mr.jsx)(ad,{theme:{components:{Tabs:{cardBg:"transparent",cardPadding:"6px 10px",itemSelectedColor:"var(--text-link)",itemActiveColor:"var(--text-link)",itemHoverColor:"var(--text-link)"}}},children:(0,Mr.jsx)(dy,{className:"wand-workspace-tabs",type:"editable-card",hideAdd:!0,tabBarStyle:{marginBottom:0},style:{flex:1,minWidth:0},"aria-label":b?"\u672A\u5206\u7EC4\u4F1A\u8BDD\u6807\u7B7E":`\u4EFB\u52A1 ${t} \u7684\u5DE5\u4F5C\u7A97\u53E3\u6807\u7B7E`,activeKey:n??void 0,items:a.map(y=>({key:y.id,closable:b||!e,label:(0,Mr.jsxs)("span",{className:et("wand-workspace-tab-label",o&&!y.containsMoving&&"move-target",y.containsMoving&&"moving-source"),title:o&&!y.containsMoving?`\u628A\u5F53\u524D\u7EC8\u7AEF\u79FB\u5165\u300C${y.label}\u300D`:`${y.label}${y.count>1?"\uFF08\u5206\u5C4F\u5DE5\u4F5C\u7A97\u53E3\uFF09":""}${y.titleGenerating?" \xB7 AI \u6B63\u5728\u751F\u6210\u6807\u9898":""}`,children:[(0,Mr.jsx)(b6e,{status:y.status}),y.session?(0,Mr.jsx)(_0,{session:y.session,className:"workspace-tab-logo"}):null,(0,Mr.jsx)("span",{className:y.titleGenerating?"title-generating":void 0,"aria-busy":y.titleGenerating||void 0,children:y.label})]}),closeIcon:(0,Mr.jsx)("span",{title:b?"\u5173\u95ED\u5E76\u5220\u9664\u4F1A\u8BDD":"\u5173\u95ED\u5DE5\u4F5C\u7A97\u53E3\uFF08\u5C06\u7ED3\u675F\u5E76\u5220\u9664\u5176\u4E2D\u4F1A\u8BDD\uFF09","aria-label":`${b?"\u5173\u95ED\u5E76\u5220\u9664\u4F1A\u8BDD":"\u5173\u95ED\u5DE5\u4F5C\u7A97\u53E3"} ${y.label}`,"aria-busy":l===y.id,"aria-disabled":l!=null,children:(0,Mr.jsx)(Be,{name:"close",size:12})})})),onChange:o?void 0:y=>u?.(y),onTabClick:o?y=>u?.(y):void 0,onEdit:(y,E)=>{E==="remove"&&typeof y=="string"&&!l&&d?.(y)}})})}),(0,Mr.jsx)(_e,{kind:"ghost",type:"button",className:"workspace-tab-add",title:b?"\u5728\u5F53\u524D\u76EE\u5F55\u65B0\u5EFA Agent \u6216\u7A7A\u767D\u7EC8\u7AEF":"\u65B0\u5EFA Agent \u6216\u7A7A\u767D\u7EC8\u7AEF\uFF08\u5728\u540C\u4E00 worktree\uFF09","aria-label":"\u65B0\u5EFA Agent \u6216\u7A7A\u767D\u7EC8\u7AEF",onClick:p,children:(0,Mr.jsx)(Be,{name:"plus",size:18})})]}),(0,Mr.jsx)("div",{className:"workbar-spacer"}),o?(0,Mr.jsxs)(_e,{kind:"ghost",className:"workspace-tab-move-hint",title:"\u9009\u62E9\u76EE\u6807\u7A97\u53E3 \xB7 Esc \u53D6\u6D88",onClick:h,children:[(0,Mr.jsx)(Be,{name:"close",size:14}),(0,Mr.jsx)("span",{children:"\u9009\u62E9\u76EE\u6807 \xB7 Esc \u53D6\u6D88"})]}):null,g??(0,Mr.jsx)(w6e,{})]})}function x6e({mobile:e,taskName:t,session:r}){return(0,Mr.jsx)(Zk,{mobile:e,taskName:t,activeWindowId:r.id,windows:[{id:r.id,label:Af(r,0),status:r.status,count:1,session:r}]})}function E6e({mobile:e,session:t}){return(0,Mr.jsx)(Zk,{mobile:e,variant:"standalone",taskName:"",activeWindowId:t.id,windows:[{id:t.id,label:Af(t,0),status:t.status,count:1,session:t}]})}var fy=A(_(),1);function k6e(e,t,r){if(!t||t.source!=="wand"&&t.source!=="automation"||t.workspaceTaskId||t.archived)return null;let n=e.find(a=>a.standaloneSessions.some(o=>o.id===t.id));if(n){let a=Df(n.standaloneSessions.filter(o=>{let l=r?.get(o.id);return!o.archived&&!o.teamChat&&!o.workspaceTaskId&&(!r||!!l)&&!l?.archived&&!l?.workspaceTaskId}));return a.some(o=>o.id===t.id)?{group:n,sessions:a}:null}return e.some(a=>a.archivedSessions?.some(o=>o.id===t.id)||a.tasks.some(o=>[...o.sessions,...o.archivedSessions??[]].some(l=>l.id===t.id)))?null:{group:null,sessions:[{id:t.id,title:t.title,cwd:t.cwd,status:t.status,provider:Cl(t),sessionKind:t.kind,startedAt:t.startedAt}]}}var IE=A(xe(),1);function C6e({fallback:e=null}={}){let t=vi(),r=Hi(),{groups:n,loading:a,reload:o}=q6(),l=t.selected,[u,d]=fy.useState(null),p=fy.useRef(!1),h=fy.useRef(null),v=h.current;v&&t.selected?.id!==v.ownerId&&(t.selected||t.sidebar.groups.some(F=>F.entries.some(S=>S.id===v.ownerId)))&&(v.navigatedAway=!0);let g=fy.useRef(t);g.current=t,fy.useEffect(()=>{l?.id&&!(a&&n.length===0)&&!n.some(F=>F.standaloneSessions.some(S=>S.id===l.id))&&o()},[l?.id,o]);let b=new Map(t.sidebar.groups.flatMap(F=>F.entries.map(S=>[S.id,S]))),x=k6e(n,l,b);if(!x||!l)return e;let y=x.sessions.map(F=>{let S=b.get(F.id);return{...C1(F,S?.title),status:S?.status??F.status}}),E=x.group;return(0,IE.jsx)(J0,{children:(0,IE.jsx)(Zk,{mobile:t.viewport.mobile,variant:"standalone",taskName:"",leading:(0,IE.jsx)(oX,{}),actions:(0,IE.jsx)(iX,{}),activeWindowId:l.id,closingWindowId:u,windows:y.map((F,S)=>({id:F.id,label:Af(F,S),status:F.status,count:1,session:F,titleGenerating:F.id===l.id&&t.topbar.titleGenerating})),onSelectWindow:F=>{F!==l.id&&r({type:"session.select",id:F,focusInput:!1})},onCloseWindow:F=>{let S=va.getRuntime(),D=y.findIndex(C=>C.id===F);if(!S||p.current||D<0)return;p.current=!0;let $={ownerId:l.id,navigatedAway:!1};h.current=$,d(F),(async()=>{try{if(!await S.closeTaskSessions([F],"terminal"))return;let C=g.current;if(!$.navigatedAway&&l.id===F&&(!C.selected||C.selected.id===F)){let B=new Map(C.sidebar.groups.flatMap(I=>I.entries.map(j=>[j.id,j]))),M=[...y.slice(D+1),...y.slice(0,D).reverse()].find(I=>{let j=B.get(I.id);return j&&!j.archived&&!j.workspaceTaskId});await r(M?{type:"session.select",id:M.id,focusInput:!1}:{type:"nav.home"})}await o()}catch(C){S.toast(C instanceof Error?C.message:"\u5173\u95ED\u4F1A\u8BDD\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002","danger")}finally{h.current=null,p.current=!1,d(null)}})()},onNewSession:()=>ua.open({initialCwd:l.cwd||E?.workspaceCwd,workspaceId:E?!E.synthetic&&!E.global?E.workspaceId:void 0:l.workspaceId})})})}var $o=A(xe(),1);function ME(){return va.getRuntime()}function S6e(e,t){return e!==null&&JSON.stringify(e)===JSON.stringify(t)}function F6e(e,t){let r=Co(e.layout),n=Ki(e.layout,e.activeTabId),a=n?.kind==="session"?n.sessionId:r[0],o=a?t.get(a):void 0,l=o?Af(o.session,o.index):"\u5DE5\u4F5C\u7A97\u53E3";return{label:r.length>1?`${l} \xB7 ${r.length}`:l,status:o?.session.status,count:r.length,session:o?.session}}function $6e({fallback:e=null}={}){let t=bg.useSyncExternalStore(Xr.subscribe,Xr.getSnapshot,Xr.getServerSnapshot),r=vi(),n=Hi(),a=r.viewport.mobile,[o,l]=bg.useState(null),[u,d]=bg.useState(null),p=r.selected?.id??null,h=b$(t.taskId);bg.useEffect(()=>{l(null)},[t.taskId]),bg.useEffect(()=>{if(!o)return;let I=j=>{j.key==="Escape"&&l(null)};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[o]);let v=new Map(r.sidebar.groups.flatMap(I=>I.entries.map(j=>[j.id,j.title]))),g=Df(h?.sessions??[]).map(I=>C1(I,v.get(I.id))),b=h?.cwd??t.cwd,x=g.map(I=>I.id),y=t.layout??h?.layout??null,E=Uu(y,x,p),F=new Map(g.map((I,j)=>[I.id,{session:I,index:j}]));if(bg.useEffect(()=>{!t.taskId||!h||S6e(y,E)||ME()?.saveTaskLayout(E,{automatic:!0})},[y,t.taskId,h,E]),a)return e;if(!t.taskId)return(0,$o.jsx)(C6e,{fallback:e});if(E.windows.length===0)return e;let S=I=>{let j=ME();if(!j)return;if(o){let L=Ki(I.layout,I.activeTabId),q=vD(E,o.sessionId,I.id,L?.id,o.dir);if(q!==E){j.saveTaskLayout(q);let W=Ts(q);W?.kind==="session"&&n({type:"session.select",id:W.sessionId})}l(null);return}let N=v6(E,I.id);j.saveTaskLayout(N);let R=Ki(I.layout,I.activeTabId);R?.kind==="session"&&n({type:"session.select",id:R.sessionId,focusInput:!1})},D=I=>{let j=Ts(E);j?.kind!=="session"||E.windows.length<2||l({sessionId:j.sessionId,dir:I})},$=async I=>{let j=ME();if(!j||u)return;let N=Co(I.layout);d(I.id);try{if(!await j.closeTaskSessions(N,"window")||Xr.getSnapshot().taskId!==t.taskId)return;let R=b6(E,I.id);j.saveTaskLayout(R);let L=Ts(R);L?.kind==="session"&&n({type:"session.select",id:L.sessionId}),l(null),t.taskId&&As.load(t.taskId).catch(()=>{}),j.toast(N.length>1?`\u5DF2\u5173\u95ED ${N.length} \u4E2A\u7EC8\u7AEF`:"\u5DF2\u5173\u95ED\u7EC8\u7AEF","success")}finally{d(null)}},C=()=>{ME()?.closeWorkspace(),n({type:"nav.home"})},B=()=>ua.open({initialCwd:b,workspaceId:t.workspaceId||void 0,workspaceTaskId:t.taskId||void 0,taskName:t.taskName||void 0}),M=E.windows.find(I=>I.id===E.activeWindowId);return(0,$o.jsx)(J0,{children:(0,$o.jsx)(Zk,{mobile:a,taskName:t.taskName,activeWindowId:E.activeWindowId,windows:E.windows.map(I=>({id:I.id,...F6e(I,F),titleGenerating:Co(I.layout).includes(p??"")&&r.topbar.titleGenerating,containsMoving:!!(o&&Co(I.layout).includes(o.sessionId))})),movingDir:o?.dir,closingWindowId:u,onSelectWindow:I=>{let j=E.windows.find(N=>N.id===I);j&&S(j)},onCloseWindow:I=>{let j=E.windows.find(N=>N.id===I);j&&$(j)},onNewSession:B,onCancelMove:()=>l(null),leading:(0,$o.jsx)(oX,{}),actions:(0,$o.jsx)(iX,{windowActions:I=>(0,$o.jsxs)($o.Fragment,{children:[E.windows.length>1&&(0,$o.jsxs)($o.Fragment,{children:[(0,$o.jsx)(nn,{icon:"splitHorizontal",onSelect:()=>{I(),D("h")},children:"\u79FB\u52A8\u5F53\u524D\u4F1A\u8BDD\u5E76\u5DE6\u53F3\u5206\u5C4F"}),(0,$o.jsx)(nn,{icon:"splitVertical",onSelect:()=>{I(),D("v")},children:"\u79FB\u52A8\u5F53\u524D\u4F1A\u8BDD\u5E76\u4E0A\u4E0B\u5206\u5C4F"})]}),M&&(0,$o.jsx)(nn,{icon:"close",disabled:u!==null,onSelect:()=>{I(),$(M)},children:"\u5173\u95ED\u5F53\u524D\u5DE5\u4F5C\u7A97\u53E3"}),(0,$o.jsx)(nn,{icon:"back",onSelect:()=>{I(),C()},children:"\u9000\u51FA\u4EFB\u52A1\u6807\u7B7E\u7EC4"})]})})})})}function mB(e){return typeof e=="string"?e.trim().replace(/^v/,"").split("+")[0]:""}function D6e(e,t){let r=e.previousInstanceId.trim(),n=mB(e.expectedVersion),a=t.serverInstanceId.trim(),o=mB(t.packageVersion||t.currentVersion),l=!r||a.length>0&&a!==r,u=!n||o===n;return{ready:l&&u,instanceReady:l,versionReady:u,currentInstanceId:a,currentVersion:o}}function A6e(e){return e.lastError?`\u670D\u52A1\u6682\u4E0D\u53EF\u7528\uFF0C\u6B63\u5728\u7EE7\u7EED\u7B49\u5F85\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`:e.attempts===0?e.mode==="auto-update"?"\u6B63\u5728\u7B49\u5F85\u66F4\u65B0\u5B8C\u6210\u5E76\u91CD\u542F\u670D\u52A1\u2026":"\u6B63\u5728\u7B49\u5F85\u670D\u52A1\u91CD\u65B0\u542F\u52A8\u2026":!e.readiness.instanceReady&&!e.readiness.versionReady?`\u6B63\u5728\u7B49\u5F85\u65B0\u670D\u52A1\u5B9E\u4F8B\u548C\u76EE\u6807\u7248\u672C\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`:e.readiness.instanceReady?e.readiness.versionReady?`\u6B63\u5728\u7B49\u5F85\u670D\u52A1\u5C31\u7EEA\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`:`\u65B0\u670D\u52A1\u5DF2\u542F\u52A8\uFF0C\u6B63\u5728\u7B49\u5F85\u7248\u672C ${e.target.expectedVersion||e.latestVersion||"\u76EE\u6807\u7248\u672C"}\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`:`\u76EE\u6807\u7248\u672C\u5DF2\u5C31\u7EEA\uFF0C\u6B63\u5728\u7B49\u5F85\u65B0\u670D\u52A1\u5B9E\u4F8B\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`}function yI(e){let t=e.mode==="auto-update",r=t?"\u81EA\u52A8\u66F4\u65B0\u4E2D":e.target.expectedVersion?"\u6B63\u5728\u5B8C\u6210\u66F4\u65B0":"\u670D\u52A1\u6B63\u5728\u91CD\u542F",n=t?`${e.currentVersion||"-"} \u2192 ${e.latestVersion||"-"}
254
+ \u6B63\u5728\u4E0B\u8F7D\u5E76\u5B89\u88C5\u65B0\u7248\u672C\uFF0C\u5B8C\u6210\u540E\u5C06\u81EA\u52A8\u91CD\u542F\u3002`:e.target.expectedVersion?"\u5B89\u88C5\u5B8C\u6210\u5E76\u542F\u52A8\u65B0\u7248\u672C\u540E\u5C06\u81EA\u52A8\u5237\u65B0\u9875\u9762\u3002":"\u670D\u52A1\u6062\u590D\u540E\u5C06\u81EA\u52A8\u5237\u65B0\u9875\u9762\u3002",a="";return e.phase==="checking"?a=`\u6B63\u5728\u68C0\u67E5\u670D\u52A1\u72B6\u6001\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`:e.phase==="ready"?a="\u65B0\u670D\u52A1\u548C\u76EE\u6807\u7248\u672C\u5747\u5DF2\u5C31\u7EEA\uFF0C\u6B63\u5728\u5237\u65B0\u9875\u9762\u2026":e.phase==="timed-out"?a=e.lastError||"\u7B49\u5F85\u670D\u52A1\u91CD\u542F\u8D85\u65F6\uFF0C\u8BF7\u624B\u52A8\u5237\u65B0\u9875\u9762\u3002":e.phase==="waiting"&&(a=A6e(e)),e.phase==="timed-out"&&(r=t||e.target.expectedVersion?"\u66F4\u65B0\u672A\u5B8C\u6210":"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA",n="\u8BF7\u67E5\u770B\u5931\u8D25\u539F\u56E0\uFF0C\u624B\u52A8\u5237\u65B0\u540E\u6838\u5BF9\u670D\u52A1\u72B6\u6001\u3002"),{title:r,description:n,liveStatus:a}}function B6e(e){let t=ga(e)?e:{};return{serverInstanceId:Ge(t.serverInstanceId),packageVersion:Ge(t.packageVersion),currentVersion:Ge(t.currentVersion)}}var IG=class extends Error{constructor(e,t=0){super(e),ae(this,"status",t),this.name="RestartOverlayRepositoryError"}},I6e=class{constructor(e=(t,r)=>globalThis.fetch(t,r)){ae(this,"fetchImpl",e)}async loadConfig(e={}){let t=await this.fetchImpl("/api/config",{credentials:"same-origin",signal:e.signal}),r;try{r=await t.json()}catch{throw new IG(`\u670D\u52A1\u72B6\u6001\u54CD\u5E94\u65E0\u6548\uFF08HTTP ${t.status}\uFF09\u3002`,t.status)}let n=ga(r)?r:{};if(!t.ok||typeof n.error=="string")throw new IG(Ge(n.error)||`\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\uFF08HTTP ${t.status}\uFF09\u3002`,t.status);let a=B6e(n);if(e.expectedVersion){let o=await this.fetchImpl("/api/update-status",{credentials:"same-origin",signal:e.signal,cache:"no-store"});if(o.ok){let l=await o.json();ga(l)&&l.version===e.expectedVersion&&ga(l.status)&&l.status.phase==="failed"&&(a.updateFailure=Ge(l.status.message)||"\u66F4\u65B0\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\u3002",_u("update_failed",new Error(a.updateFailure)))}}return a}},M6e=new I6e,wI=2e3,xk=180,T6e=wI,_6e=wI*xk;function MG(e=0){return{open:!1,mode:"restart",phase:"idle",currentVersion:"",latestVersion:"",target:{previousInstanceId:"",expectedVersion:""},attempts:0,maxAttempts:xk,readiness:{ready:!1,instanceReady:!1,versionReady:!1,currentInstanceId:"",currentVersion:""},lastError:"",revision:e}}function TE(e){return typeof e=="string"?e.trim():""}function j6e(e){let t=MG(),r=null,n=null,a=null,o=null,l=0,u=new Set;function d($){t={...t,...$,revision:t.revision+1};for(let C of u)C()}function p(){r!==null&&(e.clock.clearInterval(r),r=null)}function h(){n!==null&&(e.clock.clearTimeout(n),n=null)}function v(){a!==null&&(e.clock.clearTimeout(a),a=null)}function g($=new DOMException("Restart probe cancelled.","AbortError")){v();let C=o;o=null,C?.abort($)}function b(){p(),h()}function x(){b(),g()}function y($){$!==l||!t.open||t.phase==="ready"||t.phase==="timed-out"||(b(),g(),d({phase:"timed-out"}))}function E($){d({phase:"timed-out",lastError:Mf($,"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\u3002")})}function F(){try{e.reloadPage()}catch($){E($)}}async function S($){if($!==l||!t.open||t.phase==="timed-out"||t.phase==="ready")return;o!==null&&g(new DOMException("Restart probe timed out.","TimeoutError"));let C=new AbortController;o=C;let B=t.attempts+1;d({phase:"checking",attempts:B,lastError:""});let M=()=>{},I=new Promise((N,R)=>{let L=()=>{M(),R(C.signal.reason instanceof Error?C.signal.reason:new DOMException("Restart probe cancelled.","AbortError"))};M=()=>C.signal.removeEventListener("abort",L),C.signal.addEventListener("abort",L,{once:!0})});a=e.clock.setTimeout(()=>{$!==l||o!==C||C.abort(new DOMException("Restart probe timed out.","TimeoutError"))},T6e);let j=!1;try{let N=await Promise.race([e.repository.loadConfig({signal:C.signal,expectedVersion:t.target.expectedVersion}),I]);if(C.signal.aborted||$!==l||o!==C||!t.open)return;if(N.updateFailure){b(),d({phase:"timed-out",lastError:N.updateFailure});return}let R=D6e(t.target,N);j=R.ready,d({phase:R.ready?"ready":"waiting",readiness:R,lastError:""}),R.ready&&(b(),F())}catch(N){if($!==l||o!==C||!t.open)return;if(C.signal.aborted&&C.signal.reason instanceof DOMException){if(C.signal.reason.name!=="TimeoutError")return;d({phase:"waiting",lastError:"\u670D\u52A1\u72B6\u6001\u68C0\u67E5\u8D85\u65F6\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002"})}else d({phase:"waiting",lastError:Mf(N,"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\u3002")})}finally{M(),o===C&&(v(),o=null)}!j&&$===l&&t.open&&B>=xk&&y($)}function D($,C,B,M,I){l+=1,x();let j={previousInstanceId:TE(M),expectedVersion:mB(I)};t={open:!0,mode:$,phase:"waiting",currentVersion:TE(C),latestVersion:TE(B),target:j,attempts:0,maxAttempts:xk,readiness:{ready:!1,instanceReady:!j.previousInstanceId,versionReady:!j.expectedVersion,currentInstanceId:"",currentVersion:""},lastError:"",revision:t.revision+1};for(let R of u)R();let N=l;r=e.clock.setInterval(()=>{S(N)},wI),n=e.clock.setTimeout(()=>y(N),_6e)}return{showRestart($,C){D("restart","",TE(C),$,C)},showAutoUpdate($,C,B){D("auto-update",$,C,B,C)},manualRefresh(){t.open&&F()},isOpen(){return t.open},subscribe($){return u.add($),()=>u.delete($)},getSnapshot(){return t},dispose(){if(l+=1,x(),!(!t.open&&t.phase==="idle")){t=MG(t.revision+1);for(let $ of u)$()}}}}var N6e={setInterval(e,t){return globalThis.setInterval(()=>{e()},t)},clearInterval(e){globalThis.clearInterval(e)},setTimeout(e,t){return globalThis.setTimeout(()=>{e()},t)},clearTimeout(e){globalThis.clearTimeout(e)}},Kl=j6e({repository:M6e,clock:N6e,reloadPage:()=>globalThis.location.reload()});function P6e(e,t){Kl.showRestart(e,t)}function R6e(e,t,r){Kl.showAutoUpdate(e,t,r)}var kr=A(xe(),1),O6e=A0(()=>globalThis.__wandImportBrowserModule("5efc2e6b76e3291b").then(e=>e.ConversationHome),{title:"\u804A\u5929"}),z6e=A0(()=>globalThis.__wandImportBrowserModule("fcc0972fcce206cc").then(e=>e.WorkspaceWindow),{title:"\u5206\u5C4F\u7EC8\u7AEF",renderPending:e=>(0,kr.jsx)("div",{className:"workspace-window",style:{flex:1,minHeight:0,minWidth:0},children:e})}),L6e=Pn(()=>globalThis.__wandImportBrowserModule("7a48036819d5122b").then(e=>e.ScheduledTasksPage),_l,(e,t)=>e.open&&(e.page==="schedules"||e.page==="calendar")&&t.visible,{title:"\u5B9A\u65F6",page:!0,close:()=>zn.close()}),H6e=Pn(()=>globalThis.__wandImportBrowserModule("b2c1133bca66543a").then(e=>e.KnowledgeHost),xl,(e,t)=>e.open&&t.visible,{title:"\u77E5\u8BC6\u5E93",page:!0,close:()=>ko.close()});function q6e(e){return{terminal:`terminal-container ${e.terminal?"active":"hidden"}`,chat:`chat-container ${e.chat?"active":"hidden"}`,blank:`blank-chat${e.blank?"":" hidden"}`,composer:`input-panel${e.composer?"":" hidden"}`}}function W6e({className:e,queueRef:t,workspaceTask:r,workspaceProject:n}){return(0,kr.jsxs)(rt,{vertical:!0,id:"blank-chat",className:e,style:{flex:1,minHeight:0,overflow:"auto",padding:24,position:"relative",display:e.includes("hidden")?"none":void 0},children:[(0,kr.jsx)("div",{className:"blank-chat-attention",children:(0,kr.jsx)(Z2e,{})}),(0,kr.jsxs)(rt,{vertical:!0,align:"center",justify:"center",gap:"middle",style:{flex:1},children:[(0,kr.jsx)(ju,{style:{width:48,height:48}}),(0,kr.jsx)(Gt.Title,{level:2,children:r?.taskName||n?.workspaceName||"\u5F00\u59CB\u65B0\u7684\u5DE5\u4F5C"}),(0,kr.jsx)(_e,{id:"welcome-new-work",kind:"primary",onClick:()=>ua.open({initialCwd:r?.cwd||n?.cwd,workspaceId:r?.workspaceId||n?.workspaceId,workspaceTaskId:r?.taskId,taskName:r?.taskName}),children:"\u65B0\u5EFA\u5DE5\u4F5C"})]}),(0,kr.jsx)("div",{id:"cross-session-queue-host",ref:t})]})}function U6e({legacyRefs:e}={}){let t=vg.useSyncExternalStore(_d.subscribe,_d.getSnapshot,_d.getSnapshot),r=vg.useSyncExternalStore(za.subscribe,za.getSnapshot,za.getSnapshot),n=vi(),a=Wf(),o=Hi(),l=vg.useSyncExternalStore(_l.subscribe,_l.getSnapshot,_l.getSnapshot),u=vg.useSyncExternalStore(xl.subscribe,xl.getSnapshot,xl.getSnapshot),d=q6e(n.legacyVisibility),p=vg.useSyncExternalStore(Xr.subscribe,Xr.getSnapshot,Xr.getServerSnapshot),h=!!p.taskId&&$f(p.layout)?.layout.type==="split",v=vg.useSyncExternalStore(Fl.subscribe,Fl.getSnapshot,Fl.getSnapshot),g=!v.open&&!r.open&&!l.open&&!u.open&&!t.open&&(a.active===!0||a.active===null&&!h&&!n.selected&&!p.workspaceId),b=v.open||r.open||g||l.open||u.open||t.open;return(0,kr.jsxs)(rt,{component:"main",vertical:!0,inert:n.layout.sessionsBackdropVisible,className:`main-content${n.layout.filePanelOpen&&!r.open?" file-panel-open":""}${h?" main-content-in-split":""}${g?" main-content-conversation":""}${l.open?" task-board-main-content":""}${b?" main-content-page-layer":""}`,style:{flex:1,minWidth:0,minHeight:0,position:"relative",overflow:"hidden"},children:[!b&&(0,kr.jsx)($6e,{fallback:(0,kr.jsx)(v6e,{})}),v.open&&!r.open&&(0,kr.jsx)(xA,{}),(0,kr.jsx)(U7,{explorerRef:e?.fileExplorer,suspended:r.open||v.open||u.open}),(0,kr.jsx)("div",{id:"output",inert:b,className:d.terminal,ref:e?.terminal,style:{flex:1,minHeight:0,position:"relative",overflow:"hidden",display:n.legacyVisibility.terminal&&!h?"flex":"none"}}),(0,kr.jsx)("div",{id:"chat-output",inert:b,className:d.chat,ref:e?.chat,style:{flex:1,minHeight:0,position:"relative",overflow:"hidden",display:n.legacyVisibility.chat&&!h?"flex":"none",flexDirection:"column"}}),(0,kr.jsx)(W6e,{className:`${d.blank}${h||v.open||g||r.open||u.open?" hidden":""}`,queueRef:e?.crossSessionQueue,workspaceTask:p.taskId&&p.workspaceId?{workspaceId:p.workspaceId,workspaceName:p.workspaceName,taskId:p.taskId,taskName:p.taskName,cwd:p.cwd}:void 0,workspaceProject:!p.taskId&&p.workspaceId?{workspaceId:p.workspaceId,workspaceName:p.workspaceName,cwd:p.cwd}:void 0}),(0,kr.jsx)("div",{inert:b,className:d.composer,ref:e?.composer,style:{flexShrink:0,position:"relative",display:n.legacyVisibility.composer&&!h?void 0:"none"}}),h?(0,kr.jsx)("div",{style:{display:"contents"},inert:v.open||g||r.open||u.open,"aria-hidden":v.open||g||r.open||u.open,children:(0,kr.jsx)(z6e,{})}):null,(0,kr.jsx)("div",{style:{display:"contents",visibility:r.open||v.open||u.open?"hidden":void 0},inert:r.open||v.open||u.open,"aria-hidden":r.open||v.open||u.open,children:(0,kr.jsx)(T2e,{})}),(0,kr.jsx)(O6e,{enabled:g,visible:g,sidebarOpen:n.layout.sessionsDrawerOpen,onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:xf}),(0,kr.jsxs)("div",{style:{display:"contents",visibility:r.open||v.open||u.open?"hidden":void 0},inert:r.open||v.open||u.open,"aria-hidden":r.open||v.open||u.open,children:[l.open&&l.page==="teamchat"?(0,kr.jsx)(lA,{runId:l.runId,sidebarOpen:n.layout.sessionsDrawerOpen,onBack:()=>zn.close(),onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:xf}):l.open&&l.page==="teams"?(0,kr.jsx)(sA,{sidebarOpen:n.layout.sessionsDrawerOpen,onBack:()=>zn.close(),onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:xf}):l.open&&l.page==="board"?(0,kr.jsx)(_2e,{sidebarOpen:n.layout.sessionsDrawerOpen,onBack:()=>zn.close(),onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:xf}):null,(0,kr.jsx)(L6e,{visible:l.open&&(l.page==="schedules"||l.page==="calendar")&&!r.open,view:l.page==="calendar"?"calendar":"list",calendarMode:l.calendarRange,onViewChange:x=>zn.open("","",x==="calendar"?"calendar":"schedules"),onCalendarModeChange:x=>zn.calendarRange(x),sidebarOpen:n.layout.sessionsDrawerOpen,onBack:()=>zn.close(),onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:xf})]}),(0,kr.jsx)(H6e,{visible:u.open&&!r.open&&!v.open,onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0}),(0,kr.jsx)(wA.Provider,{value:!0,children:(0,kr.jsx)(j2e,{})}),(0,kr.jsx)(Jk,{showRestart:Kl.showRestart})]})}var hr=A(_(),1),TG=A(er(),1);function sX(e,t){if(!e||t.sessionId&&t.sessionId!==e)return;if(t.type==="disconnected")return"\u5DF2\u65AD\u5F00 \xB7 \u81EA\u52A8\u91CD\u8FDE\u4E2D";if(t.type==="connected")return"\u8FDE\u63A5\u4E2D";if(t.sessionId!==e)return;let r=["stopped","exited","failed"].includes(t.data?.status||"");if(t.type==="init")return r?"\u8FDB\u7A0B\u5DF2\u7ED3\u675F":"\u5DF2\u8FDE\u63A5";if(t.type==="ended"||t.type==="status"&&r)return"\u8FDB\u7A0B\u5DF2\u7ED3\u675F";if(t.type==="status"&&(t.data?.status==="running"||t.data?.status==="idle"))return"\u5DF2\u8FDE\u63A5";if(t.type==="resync_required")return"\u8FDE\u63A5\u4E2D";if(t.type==="pty_error"||t.type==="error")return"\u8FDE\u63A5\u5F02\u5E38"}var hB=null;function V6e(e){hB=e}function ec(){if(!hB)throw new Error("\u7EC8\u7AEF\u8FD0\u884C\u65F6\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002");return hB}function G6e(){_a("wand-quick-terminal",`
255
+ .quick-terminal-workspace { min-width:0; min-height:0; }
256
+ .quick-terminal-toolbar .wand-ui-icon-button { flex:none; }
257
+ .quick-terminal-split > .ant-splitter-panel { overflow:hidden; min-width:0; min-height:0; }
258
+ .quick-terminal-split[data-dragging="false"] > .ant-splitter-panel { transition:flex-basis var(--motion-normal) var(--ease-out-expo); }
259
+ .quick-terminal-panel { display:flex; flex-direction:column; height:100%; min-height:0; min-width:0; overflow:hidden; background:var(--bg-terminal); opacity:0; transition:opacity var(--motion-quick-exit) var(--ease-in-out-smooth); }
260
+ .quick-terminal-panel[data-open="true"] { opacity:1; transition-duration:var(--motion-normal); }
261
+ .quick-terminal-header { flex:none; min-width:0; min-height:40px; padding:4px 8px; box-sizing:border-box; background:var(--bg-primary); }
262
+ .quick-terminal-title, .quick-terminal-status, .quick-terminal-header .wand-ui-icon-button { flex:none; }
263
+ .quick-terminal-status { font-size:var(--font-size-xs); }
264
+ .quick-terminal-header .quick-terminal-directory { flex:1; min-width:0; font-size:var(--font-size-xs); color:var(--text-secondary); }
265
+ .quick-terminal-surface .pooled-terminal-wrap { width:100%; height:100%; overflow:hidden; }
266
+ @media(prefers-reduced-motion:reduce) { .quick-terminal-split > .ant-splitter-panel,.quick-terminal-panel { transition:none !important; } }
267
+ `)}var xI="wand.quick-terminal.v1";function K6e(e){return e==="bottom"?"bottom":"right"}function _E(e){try{let t=JSON.parse(e.getItem(xI)||"{}");return{dock:K6e(t?.dock),sessionId:typeof t?.sessionId=="string"?t.sessionId:"",...t?.creationPending===!0?{creationPending:!0}:{}}}catch{return{dock:"right",sessionId:""}}}function X6e(e,t){try{return e.setItem(xI,JSON.stringify(t)),!0}catch{return!1}}async function O9(e){return typeof navigator<"u"&&navigator.locks?navigator.locks.request(xI,e):e()}var lX=class extends Error{constructor(e){super("\u539F\u7EC8\u7AEF\u5DF2\u4E0D\u5B58\u5728\uFF0C\u53EF\u4EE5\u65B0\u5EFA\u7EC8\u7AEF\u7EE7\u7EED\u4F7F\u7528\u3002"),ae(this,"sessionId",e)}};async function _G(e,t,r=fetch){let n=await r(e?`/api/sessions/${encodeURIComponent(e)}`:"/api/sessions",e?{credentials:"same-origin"}:{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({kind:"pty",shell:!0,cwd:t||"~",sessionSource:"quick-terminal"})});if(!n.ok)throw e&&(n.status===404||n.status===410)?new lX(e):new Error(e?n.status===401?"\u767B\u5F55\u5DF2\u5931\u6548\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55\u540E\u8FDE\u63A5\u539F\u7EC8\u7AEF\u3002":n.status===403?"\u6CA1\u6709\u8BBF\u95EE\u539F\u7EC8\u7AEF\u7684\u6743\u9650\uFF0C\u8BF7\u68C0\u67E5\u5F53\u524D\u8FDE\u63A5\u8D26\u53F7\u3002":"\u6682\u65F6\u65E0\u6CD5\u8FDE\u63A5\u539F\u7EC8\u7AEF\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u65B0\u8FDE\u63A5\uFF1B\u4E0D\u4F1A\u81EA\u52A8\u65B0\u5EFA\u8FDB\u7A0B\u3002":"\u521B\u5EFA\u7EC8\u7AEF\u672A\u786E\u8BA4\uFF0C\u5DF2\u6682\u505C\u91CD\u590D\u521B\u5EFA\uFF0C\u907F\u514D\u4EA7\u751F\u591A\u4E2A\u8FDB\u7A0B\u3002\u5237\u65B0\u9875\u9762\u4E0D\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002");let a=await n.json();if(!a||typeof a.id!="string"||!a.id||a.sessionKind!=="pty"||a.provider)throw new Error("\u7EC8\u7AEF\u54CD\u5E94\u65E0\u6548\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\uFF1B\u4E0D\u4F1A\u81EA\u52A8\u91CD\u590D\u521B\u5EFA\u3002");if(e&&a.id!==e)throw new Error("\u539F\u7EC8\u7AEF\u5F15\u7528\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\u3002");let o=!e;if(e&&a.sessionSource!=="quick-terminal"){let l=await r(`/api/sessions/${encodeURIComponent(e)}/quick-terminal`,{method:"PUT",credentials:"same-origin"});if(!l.ok)throw new Error("\u539F\u7EC8\u7AEF\u4ECD\u4FDD\u7559\uFF0C\u4F46\u65E0\u6CD5\u66F4\u65B0\u5FEB\u6377\u7EC8\u7AEF\u6807\u8BB0\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\u3002");if(a=await l.json(),a?.id!==e||a.sessionKind!=="pty"||a.provider||a.sessionSource!=="quick-terminal")throw new Error("\u5FEB\u6377\u7EC8\u7AEF\u6807\u8BB0\u672A\u786E\u8BA4\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\uFF1B\u4E0D\u4F1A\u81EA\u52A8\u65B0\u5EFA\u8FDB\u7A0B\u3002");o=!0}return{id:a.id,cwd:typeof a.cwd=="string"?a.cwd:t,status:a.status,navigationChanged:o}}var zt=A(xe(),1);function z9({host:e}){let t=hr.useCallback(r=>{r&&r.appendChild(e)},[e]);return(0,zt.jsx)("div",{ref:t,style:{width:"100%",height:"100%",minWidth:0,minHeight:0,overflow:"hidden"}})}function jG(){Ui(),Promise.resolve().then(()=>va.getRuntime()?.refreshSessions()).catch(()=>{})}function Q6e({children:e}){return typeof document>"u"?(0,zt.jsx)(zt.Fragment,{children:e}):(0,zt.jsx)(Y6e,{children:e})}function Y6e({children:e}){let t=vi(),[r,n]=hr.useState(()=>{try{return _E(localStorage)}catch{return{dock:"right",sessionId:""}}}),a=hr.useRef(r),[o,l]=hr.useState(!1),[u,d]=hr.useState(!1),[p,h]=hr.useState(!1),[v,g]=hr.useState(""),[b,x]=hr.useState("\u672A\u8FDE\u63A5"),[y,E]=hr.useState(r.creationPending?"\u4E0A\u6B21\u521B\u5EFA\u7EC8\u7AEF\u672A\u786E\u8BA4\uFF0C\u5DF2\u6682\u505C\u91CD\u590D\u521B\u5EFA\u3002":""),[F,S]=hr.useState(""),[D,$]=hr.useState(!1),[C,B]=hr.useState(!1),[M,I]=hr.useState(null),[j,N]=hr.useState(!1),[R,L]=hr.useState(()=>new Set),q=hr.useCallback(we=>(L(de=>new Set(de).add(we)),()=>L(de=>{let be=new Set(de);return be.delete(we),be})),[]),W=R.size>0,U=hr.useRef(null),P=hr.useRef(null),H=hr.useRef(""),V=hr.useRef(!1),Q=hr.useRef(!1),X=hr.useRef(0),Z=hr.useRef(!1),O=hr.useRef(!1),[z]=hr.useState(()=>document.createElement("div")),[K]=hr.useState(()=>document.createElement("div")),[J]=hr.useState(()=>document.createElement("div")),te=hr.useRef(null),ee=we=>{a.current=we,n(we);let de=!1;try{de=X6e(localStorage,we)}catch{}return $(!de),de};hr.useLayoutEffect(()=>{G6e(),z.style.width="100%";for(let de of[K,J])Object.assign(de.style,{width:"100%",height:"100%",minWidth:"0",minHeight:"0",display:"flex",flexDirection:"column"});let we=new ResizeObserver(de=>B(de[0].contentRect.width<680));return U.current&&we.observe(U.current),()=>we.disconnect()},[z,K,J]);let ie=hr.useCallback(()=>{if(!O.current||!Q.current||!V.current||!H.current)return;let we=document.activeElement;(we===P.current||we===document.body||J.contains(we))&&ec().focus(H.current),O.current=!1},[J]);hr.useLayoutEffect(()=>{o&&ie()},[o,ie]),hr.useEffect(()=>{if(t.auth.phase!=="authenticated")return;let we=!1;return O9(async()=>{if(we)return;let de=a.current;try{let ye=_E(localStorage);(ye.sessionId||ye.creationPending)&&(de=ye)}catch{}if(!de.sessionId||de.creationPending)return;let be=await _G(de.sessionId,"");!we&&be.navigationChanged&&jG()}).catch(()=>{}),()=>{we=!0}},[t.auth.phase]),hr.useEffect(()=>ec().observe(we=>{if(a.current.creationPending)return;let de=sX(H.current,we);de&&(x(de),we.sessionId===H.current&&(we.type==="ended"||(we.type==="init"||we.type==="status")&&["stopped","exited","failed"].includes(we.data?.status||"")?S(H.current):(we.type==="init"||we.type==="status"&&["running","idle"].includes(we.data?.status||""))&&S("")),we.type==="init"?(E(""),we.data?.cwd&&g(we.data.cwd),de==="\u5DF2\u8FDE\u63A5"&&ie()):de==="\u8FDE\u63A5\u5F02\u5E38"&&E("\u7EC8\u7AEF\u64CD\u4F5C\u672A\u786E\u8BA4\uFF0C\u8BF7\u68C0\u67E5\u8F93\u51FA\u540E\u91CD\u65B0\u8FDE\u63A5\uFF1B\u4E0D\u4F1A\u81EA\u52A8\u91CD\u53D1\u8F93\u5165\u3002"))}),[ie]),hr.useEffect(()=>()=>{X.current++,V.current=!1,O.current=!1,Z.current=!1,H.current&&(ec().retain(H.current,!1),ec().dispose(H.current))},[]);let me=async(we=!1,de="")=>{if(Q.current=!0,l(!0),d(!1),O.current=!0,H.current&&V.current&&!we&&!de&&!a.current.creationPending){o&&ie();return}if(Z.current)return;let be=X.current;Z.current=!0,h(!0),x("\u8FDE\u63A5\u4E2D"),E(""),S("");try{let ye=Xr.getSnapshot(),Re=t.selected?.worktree?.path||ye.cwd||t.selected?.cwd||"~",Fe=H.current&&!we&&!de&&!a.current.creationPending?{id:H.current,cwd:v}:await O9(async()=>{if(be!==X.current)throw new Error("\u7EC8\u7AEF\u9762\u677F\u5DF2\u5173\u95ED\u3002");let $e=a.current;try{let Oe=_E(localStorage);(Oe.sessionId||Oe.creationPending)&&($e=Oe)}catch{}if(!$e.sessionId&&$e.creationPending)throw ee({...$e,dock:a.current.dock}),new Error("\u4E0A\u6B21\u521B\u5EFA\u7EC8\u7AEF\u672A\u786E\u8BA4\uFF0C\u5DF2\u6682\u505C\u91CD\u590D\u521B\u5EFA\u3002");let Ie=$e;if(de&&$e.sessionId===de&&($e={dock:$e.dock,sessionId:""}),!$e.sessionId&&!ee({...$e,creationPending:!0}))throw ee(Ie),new Error("\u65E0\u6CD5\u4FDD\u5B58\u7EC8\u7AEF\u521B\u5EFA\u72B6\u6001\uFF0C\u8BF7\u5141\u8BB8\u672C\u7AD9\u5B58\u50A8\u540E\u91CD\u65B0\u8FDE\u63A5\uFF1B\u5C1A\u672A\u521B\u5EFA\u65B0\u7EC8\u7AEF\u3002");let He=await _G($e.sessionId,Re);return ee({dock:a.current.dock,sessionId:He.id}),He.navigationChanged&&jG(),He});if(be!==X.current||(H.current&&H.current!==Fe.id&&(ec().retain(H.current,!1),ec().dispose(H.current),V.current=!1),H.current=Fe.id,g(Fe.cwd),await Rf(),be!==X.current))return;if(!te.current)throw new Error("\u7EC8\u7AEF\u5BB9\u5668\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\u3002");if(ec().retain(Fe.id,!0),!ec().mount(Fe.id,te.current))throw new Error("\u7EC8\u7AEF\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\u3002");V.current=!0,we&&ec().reconnect(Fe.id)}catch(ye){if(be!==X.current)return;ye instanceof lX&&S(ye.sessionId),x("\u8FDE\u63A5\u5931\u8D25"),E(ye instanceof Error?ye.message:"\u7EC8\u7AEF\u8FDE\u63A5\u5931\u8D25")}finally{be===X.current&&(Z.current=!1,h(!1))}},le=()=>{Q.current=!1,O.current=!1,d(!1),l(!1),P.current?.focus({preventScroll:!0})},he=C?"bottom":r.dock,se=we=>{let de=X.current;O9(async()=>{if(de!==X.current)return;let be=a.current;try{let ye=_E(localStorage);(ye.sessionId||ye.creationPending)&&(be=ye)}catch{}ee({...be,dock:we}),I(null)})},ke=!!(H.current||r.sessionId),De=!!F&&!r.creationPending;return(0,zt.jsx)(H1.Provider,{value:{open:o,show:()=>{me()},trigger:P,chromeHost:z,registerChrome:q},children:(0,zt.jsxs)(rt,{vertical:!0,ref:U,className:"quick-terminal-workspace",style:{flex:1,minWidth:0,minHeight:0,overflow:"hidden"},children:[(0,zt.jsxs)(rt,{align:"center",justify:"end",className:"quick-terminal-toolbar",style:{padding:W?0:"2px var(--wand-page-inset, 20px)",borderBottom:W?void 0:"1px solid var(--border-subtle)",flexShrink:0},children:[(0,zt.jsx)("div",{style:{width:"100%",display:W?void 0:"none"},children:(0,zt.jsx)(z9,{host:z})}),!W&&(0,zt.jsx)(Z0,{})]}),(0,zt.jsxs)(d1,{orientation:he==="right"?"horizontal":"vertical",className:"quick-terminal-split","data-dragging":j,onResizeStart:()=>N(!0),onResizeEnd:()=>N(!1),style:{flex:1,minHeight:0,minWidth:0},onResize:we=>{let de=we[0]+we[1];o&&de&&I(we[1]/de*100)},children:[(0,zt.jsx)(d1.Panel,{min:o?"20%":0,size:o?`${100-(M??(he==="right"?40:35))}%`:"100%",children:(0,zt.jsx)(z9,{host:K})}),(0,zt.jsx)(d1.Panel,{min:o?"25%":0,max:"70%",size:o?`${M??(he==="right"?40:35)}%`:0,resizable:o,children:(0,zt.jsx)(z9,{host:J})})]},he),(0,TG.createPortal)(e,K),(0,TG.createPortal)((0,zt.jsxs)("section",{id:"quick-terminal-panel","aria-label":"\u5FEB\u6377\u7EC8\u7AEF","aria-describedby":"quick-terminal-description","aria-hidden":!o,inert:!o,className:"quick-terminal-panel","data-open":o,"data-dock":he,children:[(0,zt.jsxs)(rt,{align:"center",gap:8,className:"quick-terminal-header",children:[(0,zt.jsx)(Gt.Text,{strong:!0,className:"quick-terminal-title",children:"\u7EC8\u7AEF"}),(0,zt.jsx)("span",{role:"status",className:"quick-terminal-status",title:p?"\u8FDE\u63A5\u4E2D":b,children:!p&&b==="\u5DF2\u8FDE\u63A5"?(0,zt.jsxs)(zt.Fragment,{children:[(0,zt.jsx)(qi,{status:"success","aria-hidden":!0}),(0,zt.jsx)("span",{className:"workbar-accessible-title",children:"\u5DF2\u8FDE\u63A5"})]}):p?"\u8FDE\u63A5\u4E2D":b}),(0,zt.jsx)(Gt.Text,{ellipsis:{tooltip:v||"\u670D\u52A1\u7AEF\u4E3B\u76EE\u5F55"},title:v||"\u670D\u52A1\u7AEF\u4E3B\u76EE\u5F55",className:"quick-terminal-directory",children:v.replace(/[\\/]+$/,"").split(/[\\/]/).pop()||v||"\u670D\u52A1\u7AEF\u4E3B\u76EE\u5F55"}),(0,zt.jsxs)(Sd,{open:u&&o,onOpenChange:d,children:[(0,zt.jsx)(Hu,{render:(0,zt.jsx)(Br,{"aria-label":"\u7EC8\u7AEF\u9009\u9879",title:`\u7EC8\u7AEF\u9009\u9879 \xB7 ${he==="right"?"\u53F3\u4FA7":"\u5E95\u90E8"}\u505C\u9760`,children:(0,zt.jsx)(Be,{name:"more",size:16})})}),(0,zt.jsxs)(qu,{"aria-label":"\u7EC8\u7AEF\u9009\u9879",align:"end",children:[(0,zt.jsx)(nn,{onSelect:()=>se("right"),hint:r.dock==="right"?"\u5DF2\u9009":void 0,children:"\u505C\u9760\u5230\u53F3\u4FA7"}),(0,zt.jsx)(nn,{onSelect:()=>se("bottom"),hint:r.dock==="bottom"?"\u5DF2\u9009":void 0,children:"\u505C\u9760\u5230\u5E95\u90E8"}),(0,zt.jsx)(Ms,{}),(0,zt.jsx)(nn,{icon:"refresh",disabled:p||!ke,onSelect:()=>{me(!0)},children:"\u91CD\u65B0\u8FDE\u63A5"})]})]}),(0,zt.jsx)(Br,{"aria-label":"\u5173\u95ED\u7EC8\u7AEF\u9762\u677F",title:"\u4EC5\u9690\u85CF\u9762\u677F\uFF0C\u547D\u4EE4\u7EE7\u7EED\u8FD0\u884C\uFF1B\u7ED3\u675F shell \u8BF7\u5728\u7EC8\u7AEF\u8F93\u5165 exit",onClick:le,children:(0,zt.jsx)(Be,{name:"close",size:16})})]}),(0,zt.jsxs)("span",{id:"quick-terminal-description",className:"workbar-accessible-title",children:["\u8FD0\u884C\u5728 Wand \u4E3B\u673A\uFF1B\u5173\u95ED\u4EC5\u9690\u85CF\uFF0C\u547D\u4EE4\u7EE7\u7EED\u8FD0\u884C\u3002\u7ED3\u675F shell \u8BF7\u5728\u7EC8\u7AEF\u8F93\u5165 exit\u3002",C&&r.dock==="right"?"\u7A84\u7A97\u4E34\u65F6\u5728\u5E95\u90E8\u663E\u793A\u3002":""]}),D&&(0,zt.jsx)(ei,{type:"warning",title:"\u672C\u9875\u5DF2\u5E94\u7528\uFF0C\u4F46\u5BA2\u6237\u7AEF\u5B58\u50A8\u4E0D\u53EF\u7528\uFF0C\u5237\u65B0\u540E\u53EF\u80FD\u65E0\u6CD5\u6062\u590D\u4F4D\u7F6E\u6216\u7EC8\u7AEF\u3002"}),(y||De)&&(0,zt.jsx)(ei,{type:De?"info":"error",title:y||"\u539F\u7EC8\u7AEF\u8FDB\u7A0B\u5DF2\u7ED3\u675F\uFF0C\u53EF\u4EE5\u65B0\u5EFA\u7EC8\u7AEF\uFF1B\u539F\u4F1A\u8BDD\u8BB0\u5F55\u4F1A\u4FDD\u7559\u3002",action:De?(0,zt.jsx)(_e,{disabled:p,onClick:()=>{me(!1,F)},children:"\u65B0\u5EFA\u7EC8\u7AEF"}):ke?(0,zt.jsx)(_e,{disabled:p,onClick:()=>{me(!0)},children:"\u91CD\u65B0\u8FDE\u63A5"}):void 0}),(0,zt.jsx)("div",{ref:te,className:"quick-terminal-surface",style:{flex:1,minWidth:0,minHeight:0,position:"relative",overflow:"hidden"}})]}),J)]})})}var cs=A(xe(),1),J6e=Pn(()=>globalThis.__wandImportBrowserModule("6ed5e5176549288a").then(e=>e.EmployeeProfileHost),D$,e=>e!==null,{title:"\u5458\u5DE5\u8D44\u6599",close:()=>m1.close(),renderPending:()=>(0,cs.jsx)(cs.Fragment,{})});function Z6e(e){let t=["main-layout"];return e.sessionsDrawerOpen&&t.push("sidebar-open"),e.sidebarAnchored&&t.push("sidebar-pinned"),e.sidebarPinned&&e.sidebarCollapsed&&t.push("sidebar-collapsed"),t.join(" ")}function eEe({legacyRefs:e}={}){let t=vi();return(0,cs.jsxs)(yk,{className:"app-container",style:{position:"fixed",top:"calc(var(--app-viewport-top, 0px) + var(--conversation-frame-top, 0px))",left:"var(--conversation-frame-inline, 0px)",right:"var(--conversation-frame-inline, 0px)",height:"calc(var(--app-viewport-height, 100dvh) - var(--conversation-frame-top, 0px) - var(--conversation-frame-bottom, 0px))",overflow:"hidden",paddingTop:"var(--wand-safe-top, 0px)",paddingBottom:"var(--wand-safe-bottom, 0px)"},children:[(0,cs.jsx)(S2e,{}),(0,cs.jsxs)(yk,{hasSider:!0,className:Z6e(t.layout.sidebarDrawer?{...t.layout,sidebarAnchored:!1,sidebarCollapsed:!1}:t.layout),style:{flex:1,minHeight:0},children:[(0,cs.jsx)(m6e,{}),(0,cs.jsx)(Q6e,{children:(0,cs.jsx)(U6e,{legacyRefs:e})}),(0,cs.jsx)(J6e,{mobile:t.viewport.mobile})]})]})}function tEe({store:e,legacyRefs:t}){return x2e.useLayoutEffect(()=>B6(),[]),(0,cs.jsx)(Xn,{children:(0,cs.jsx)(W7,{store:e,children:(0,cs.jsx)(eEe,{legacyRefs:t})})})}var rEe="wand-automation-sessions-expanded",nEe="wand-non-wand-sessions-expanded",gB=new Set;function Ua(e){for(let t of[...gB])t(e)}function uX(){let e=typeof WandNative>"u"?void 0:WandNative;return{width:window.innerWidth,height:window.innerHeight,coarsePointer:typeof window.matchMedia=="function"&&window.matchMedia("(pointer: coarse)").matches,online:navigator.onLine,embedTerminal:document.documentElement.classList.contains("is-wand-embed-terminal"),nativeInput:!!(window.__wandImeNative||window.__wandIosNative),backToNative:typeof e?.backToNative=="function",switchServer:typeof e?.switchServer=="function",automationExpanded:Ty(rEe,!1),historyExpanded:Ty(nEe,!1)}}function aEe(e){gB.add(e);let t=()=>e("viewport:resize"),r=()=>e("network:online"),n=()=>e("network:offline");return window.addEventListener("resize",t),window.addEventListener("online",r),window.addEventListener("offline",n),()=>{gB.delete(e),window.removeEventListener("resize",t),window.removeEventListener("online",r),window.removeEventListener("offline",n)}}function iEe(e,t={}){return new d2e({readSnapshot:()=>qK(m,uX()),applyAction:r=>y2e(e,r),subscribeLegacy:aEe,batchMs:t.batchMs,freezeSnapshots:t.freezeSnapshots})}function cX(e){return e?.sessionKind==="structured"&&e.provider==="pi"}function EI(){let e=m.sessions.find(l=>l.id===m.selectedId),t=document.querySelector("[data-pi-settings-host]"),r=document.querySelector("[data-pi-settings-toggle-host]"),n=document.getElementById("input-box");if(!t||!r||!n||!cX(e)||m.terminalInteractive){ia.clear();return}let a=n.value,o=ia.isExpanded(e.id)||A1(a)&&!m.composerComposing&&!ia.isDismissed(e.id,a);ia.sync([{key:"pi-settings",target:t,toggleTarget:r,sessionId:e.id,draft:a,open:o,onSaved:(l,u)=>{let d=m.sessions.find(p=>p.id===l);d&&(d.piSettings=u,Ua("pi-settings"))},returnFocus:()=>{if(m.selectedId===e.id){if(ia.openedBy()==="toggle"){r.querySelector("button")?.focus();return}n.focus()}}}])}function oEe(e,t){return!cX(t)||m.terminalInteractive?!1:A1(e)?(EI(),ia.reopen(),ia.focusControl(),!0):(ia.dismiss(),!1)}function sEe(e){let t=ia.getSnapshot().mounts[0];return!t||!t.open||e.isComposing||e.keyCode===229?!1:e.key==="Escape"?(e.preventDefault(),e.stopPropagation(),ia.dismiss(),t.returnFocus(),!0):ia.openedBy()==="toggle"&&!A1(t.draft)?!1:(e.key==="ArrowDown"||e.key==="ArrowUp"||e.key==="Enter")&&!e.shiftKey?(e.preventDefault(),e.stopPropagation(),ia.focusControl(e.key==="ArrowUp"),!0):!1}var NG=Object.freeze({mode:"shortcuts",ctrl:!1,shift:!1,open:!1}),yg=new Map,L9=new Set,li={read(e){return e?yg.get(e)??NG:NG},subscribe(e){return L9.add(e),()=>{L9.delete(e)}},update(e,t){if(!e)return;let r=this.read(e),n={...r,...t};if(!(n.mode===r.mode&&n.ctrl===r.ctrl&&n.shift===r.shift&&n.open===r.open)){yg.delete(e),yg.set(e,Object.freeze(n)),yg.size>128&&yg.delete(yg.keys().next().value);for(let a of L9)a()}},toggle(e,t){this.update(e,{[t]:!this.read(e)[t]})}};function Yy(e,t){let r=li.read(e);return{ctrl:t.ctrl||r.ctrl,shift:t.shift||r.shift,alt:t.alt}}function eC(e,t){let{ctrl:r,shift:n,alt:a}=t;if(!r&&!n&&!a)return null;let o=1+(n?1:0)+(a?2:0)+(r?4:0),l={up:"A",down:"B",right:"C",left:"D",home:"H",end:"F"}[e];if(l)return`\x1B[1;${o}${l}`;let u={insert:2,delete:3,pageup:5,pagedown:6}[e];if(u)return`\x1B[${u};${o}~`;if(e==="tab"&&n)return"\x1B[Z";if(e.length!==1)return null;let d=n?e.toUpperCase():e;if(r){let p=d.toLowerCase();if(p>="a"&&p<="z")return String.fromCharCode(p.charCodeAt(0)-96);let h={" ":0,"@":0,"[":27,"\\":28,"]":29,"^":30,_:31};return h[d]===void 0?null:String.fromCharCode(h[d])}return a?"\x1B"+d:d}function lEe(e,t,r){return t?.inputType!=="insertText"||t.data!==e||e.length!==1||e.charCodeAt(0)>127?null:eC(e,r)}function uEe(){let e=new Map;return{begin(t){let r=new Map;return e.set(t,r),{isCurrent:()=>e.get(t)===r,changed:n=>r.has(n),merge(n,a){let o={...n};if(a)for(let l of r.get(n.id)??[])l in a?o[l]=a[l]:delete o[l];return o},finish(){e.get(t)===r&&e.delete(t)}}},record(t){for(let r of e.values()){let n=r.get(t.id);n||r.set(t.id,n=new Set);for(let a of Object.keys(t))a!=="id"&&n.add(a);if("messages"in t)for(let a of["messages","messageOffset","messageTotal","leadingBlockOffset","leadingBlockTotal"])n.add(a);("permissionBlocked"in t||"pendingEscalation"in t)&&(n.add("permissionBlocked"),n.add("pendingEscalation"))}},reset(){e.clear()}}}function Nr(e,t){let r;try{r=new Headers(t?.headers!==void 0?t.headers:typeof e=="object"&&e!==null&&"headers"in e?e.headers:void 0),r.set("X-Wand-Tool-Projection","compact")}catch(n){return Promise.reject(n)}return fetch(e,{...t,headers:r})}function qa(e,t){return e instanceof Error?e.message:t??String(e)}var rk=new Map;function cEe(e){for(let t of rk.get(e)??[])t()}function dEe(e,t=400){return new Promise(r=>{let n=rk.get(e)??new Set;rk.set(e,n);let a=u=>{clearTimeout(l),n.delete(o),n.size||rk.delete(e),r(u)},o=()=>a(!0),l=setTimeout(()=>a(!1),t);n.add(o)})}function PG(e){if(!e||!Array.isArray(e.content))return 0;for(var t=0,r=0;r<e.content.length;r++){var n=e.content[r];if(n){if(typeof n.text=="string"&&(t+=n.text.length),typeof n.thinking=="string"&&(t+=n.thinking.length),typeof n.content=="string")t+=n.content.length;else if(Array.isArray(n.content))for(var a=0;a<n.content.length;a++){var o=n.content[a];o&&typeof o.text=="string"&&(t+=o.text.length)}if(n.input)try{t+=JSON.stringify(n.input).length}catch{}}}return t}function dX(e,t,r="unknown"){return e?t?r==="latest"||PG(t)>=PG(e)?t:Object.assign({},e,{usage:t.usage||e.usage}):e:t}function pEe(e,t,r,n,a="unknown"){return r>0&&e?.role===t?.role&&Array.isArray(t?.content)&&t.content.length>=n?t:dX(e,t,a)}function fEe(e,t,r){return e?.role==="assistant"&&t?.role==="assistant"?dX(e,t,r):t||e}function mEe(e,t,r,n,a,o,l="unknown"){var u=e&&typeof e.messageOffset=="number"?e.messageOffset:0,d=e&&typeof e.leadingBlockOffset=="number"?e.leadingBlockOffset:0,p=e&&typeof e.leadingBlockTotal=="number"?e.leadingBlockTotal:0,h=e&&Array.isArray(e.messages)?e.messages:[],v=typeof n=="number"?n:r+t.length;if(l!=="latest"&&h.length&&v<(e.messageTotal||0))return{messages:h,messageOffset:u,messageTotal:e.messageTotal,leadingBlockOffset:d,leadingBlockTotal:p};if(h.length&&r>u&&a>0){var g=h[r-u],b=t[0];if(g?.role===b?.role&&Array.isArray(g.content)&&Array.isArray(b.content)&&g.content.length>=a&&(g.content.length<=o||l==="latest")){var x=l==="latest"?g.content.slice(0,o):g.content.slice();if(b.content.forEach(function(R,L){x[a+L]=R}),x.length>=o&&Array.from(x).every(function(R){return R!==void 0})){var y=t.slice();y[0]=Object.assign({},b,{content:x});var E=vB(e,y,r,n,l);return E.messages[r-E.messageOffset]=y[0],{...E,leadingBlockOffset:d,leadingBlockTotal:p}}}return{messages:t,messageOffset:r,messageTotal:v,leadingBlockOffset:a,leadingBlockTotal:o}}var F=t,S=!1,D=a,$=o;if(h.length&&t.length&&r===u&&!(l==="latest"&&a===0)&&!(d===0&&a===0)){var C=h[0],B=t[0];if(C?.role===B?.role&&Array.isArray(C.content)&&Array.isArray(B.content)){var M=Math.min(d,a),I=l==="latest"&&o>0?Math.max(o,a+B.content.length):Math.max(d+C.content.length,a+B.content.length),j=new Array(I-M);C.content.forEach(function(R,L){d+L<I&&(j[d+L-M]=R)}),B.content.forEach(function(R,L){j[a+L-M]=R}),Array.from(j).every(function(R){return R!==void 0})&&(F=t.slice(),F[0]=Object.assign({},B,{content:j}),S=!0,D=M,$=l==="latest"?Math.max(o,I):Math.max(p,o,I))}}var N=vB(e,F,r,n,l);return S&&N.messageOffset===r&&(N.messages[0]=F[0]),N.messageOffset<r&&(D=d,$=p),{...N,leadingBlockOffset:D,leadingBlockTotal:$}}function vB(e,t,r,n,a="unknown"){var o=r||0,l=typeof n=="number"?n:Math.max(o+t.length,t.length),u=e&&Array.isArray(e.messages)?e.messages:[],d=e&&typeof e.messageOffset=="number"?e.messageOffset:0,p=e&&typeof e.messageTotal=="number"?e.messageTotal:d+u.length;if(a!=="latest"&&t.length===0&&u.length>0&&l===0)return{messages:u,messageOffset:d,messageTotal:p};if(a!=="latest"&&u.length>0&&l<p)return{messages:u,messageOffset:d,messageTotal:p};if(u.length===0)return{messages:t,messageOffset:o,messageTotal:l};if(a==="latest"&&l===0)return{messages:[],messageOffset:0,messageTotal:0};var h=a==="latest"?Math.min(d+u.length,l):d+u.length,v=o+t.length;if(o>h||d>v)return{messages:t,messageOffset:o,messageTotal:l};for(var g=Math.min(d,o),b=Math.max(h,v),x=[],y=g;y<b;y++){var E=y>=d&&y<h?u[y-d]:void 0,F=y>=o&&y<v?t[y-o]:void 0;x.push(fEe(E,F,a))}return{messages:x,messageOffset:g,messageTotal:a==="latest"?l:Math.max(p,l,g+x.length)}}var hEe=A(Xa(),1),zl=A(xe(),1);function gEe(e,t,r){let n=document.createElement("div");n.dataset.chatLoadState=t?"failed":"loading",e.replaceChildren(n);let a=(0,hEe.createRoot)(n);return a.render((0,zl.jsx)(Bt,{children:(0,zl.jsx)(rt,{vertical:!0,gap:"small",style:{padding:"var(--wand-page-inset)",minHeight:144},"aria-busy":!t,children:t?(0,zl.jsxs)(zl.Fragment,{children:[(0,zl.jsx)(ei,{type:"error",showIcon:!0,title:"\u4F1A\u8BDD\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\uFF1B\u670D\u52A1\u66F4\u65B0\u540E\u53EF\u80FD\u9700\u8981\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u3002"}),(0,zl.jsxs)(rt,{gap:"small",children:[(0,zl.jsx)(_e,{onClick:r,children:"\u91CD\u8BD5"}),(0,zl.jsx)(_e,{onClick:()=>window.location.reload(),children:"\u91CD\u65B0\u52A0\u8F7D\u9875\u9762"})]})]}):(0,zl.jsxs)(rt,{align:"center",gap:"small",role:"status",children:[(0,zl.jsx)(Wi,{}),"\u6B63\u5728\u52A0\u8F7D\u4F1A\u8BDD\u7EC4\u4EF6\u2026"]})})})),()=>{a.unmount(),n.remove()}}function kI(){return bB??(bB=Lxe())}var bB=null,jE=null,Yd=null,Qd=null,Ek=0,Ry=null;function kk(e){return Ek===e.generation&&m.selectedId===e.sessionId&&(m.chatRenderEpoch||0)===e.epoch&&(m.currentView||"chat")==="chat"&&e.root.isConnected&&document.querySelector("#chat-output > .chat-messages")===e.root}function Ck(){Ry?.dispose(),Ry=null}function pX(e,t){kk(e)&&(Ry?.root===e.root&&Ry.failed===t||(Ck(),Ry={root:e.root,failed:t,dispose:gEe(e.root,t,()=>{!Yd||!kk(Yd)||(Qd=null,ba(!0))})}))}function vEe(){jE||(jE=globalThis.__wandImportBrowserModule("f11e12767426d28a").then(e=>{bB=e;let t=Yd;return Yd=null,Qd=null,e.clearActivityDetailState(),Ck(),t&&kk(t)&&e.renderChat(t.force),e}).catch(e=>{let t=Yd;return t&&kk(t)?(Qd=t,pX(t,!0)):Ck(),console.warn("[wand] chat component download failed"),Promise.reject(e)}).finally(()=>{jE=null}),jE.catch(()=>{}))}function ba(e=!1){let t=kI();if(t){t.renderChat(e);return}if(!m.selectedId||(m.currentView||"chat")!=="chat")return;let r=tI(document.getElementById("chat-output"));if(!r)return;let n={sessionId:m.selectedId,epoch:m.chatRenderEpoch||0,generation:Ek,root:r,force:!!e||!!Yd?.force};Yd=n,!(Qd&&Qd.generation===Ek&&Qd.sessionId===m.selectedId&&Qd.root===r)&&(pX(n,!1),vEe())}function cc(e=!1){let t=kI();t?t.scheduleChatRender(e):ba()}function tC(){Ek++,Yd=null,Qd=null,Ck(),kI()?.clearActivityDetailState()}typeof window<"u"&&(window.__scheduleChatRender=()=>cc(!0));function Oy(e,t=0){if(t>4||!e)return null;if(typeof e=="string"){let r=e.trim();if(!/^[\[{]/.test(r)||!/"type"\s*:\s*"image(?:_url)?"/.test(r))return null;try{return Oy(JSON.parse(r),t+1)}catch{return null}}if(Array.isArray(e))return e.some(r=>Sk(r)||Oy(r?.text,t+1))?e:null;if(typeof e=="object"){let r=e;return Sk(r)?[r]:Oy(r.content,t+1)}return null}function Sk(e){if(!e||typeof e!="object")return"";if(e.type==="image"){let t=e.source||{},r=t.type==="base64"?t.data:e.data,n=t.media_type||e.mimeType||e.mime_type||"image/png";return typeof r=="string"&&/^image\/[a-z0-9.+-]+$/i.test(n)?`data:${n};base64,${r}`:typeof t.url=="string"?t.url:typeof e.url=="string"?e.url:""}return e.type==="image_url"?typeof e.image_url=="string"?e.image_url:e.image_url?.url||"":""}function CI(e){let t=Oy(e);return t?t.flatMap(r=>{let n=Sk(r);return n?[{src:n}]:r?.type==="text"?CI(r.text):[]}):[]}function Jy(e){if(!e)return"";let t=Oy(e);return t?t.map(r=>r?.type==="text"?Jy(r.text):Sk(r)?"":JSON.stringify(r)).filter(Boolean).join(`
268
+ `):typeof e=="string"?e:Array.isArray(e)?e.map(r=>{if(!r||typeof r!="object")return"";if(r.type==="text"&&typeof r.text=="string")return Jy(r.text);if(r.type==="image"||r.type==="image_url")return"";try{return JSON.stringify(r)}catch{return""}}).filter(Boolean).join(`
269
+ `):""}function bEe(e){if(!e)return"";let t=e.preview||"";return CI(e.content).length||/"type"\s*:\s*"image(?:_url)?"/.test(t)||/(?:data:image\/[\w.+-]+;base64,|\/(?:9j|wAB)|iVBORw0KGgo)[A-Za-z0-9+/=]{16,}/.test(t)?"\u56FE\u7247\u7ED3\u679C \xB7 \u5C55\u5F00\u67E5\u770B":t}var Fy=/\bgpt-\d+(?:\.\d+)?(?:\s+[a-z0-9.-]+)?\s+·\s+\d+%\s+left\s+·\s+(?:\/|~\/).+/i,RG=/^(?:thinking|working|running|planning|applying|reading|searching|inspecting|reviewing|summarizing|editing|updating|writing|completed)\b/i;function yEe(e){if(!e)return!1;var t=String(e).trim();return t?!!(t.indexOf("\u2500\u2500\u2500\u2500")===0||t==="\u276F"||t==="\u203A"||/^[╭╰│┌└┐┘├┤┬┴┼─═]{2,}$/.test(t)||/^[▁▂▃▄▅▆▇█▔▕▏▐]+$/.test(t)||t.indexOf("esc to interrupt")!==-1||t.indexOf("Claude Code v")!==-1||/^Sonnet\b/.test(t)||t.indexOf("Failed to install Anthropic")!==-1||t.indexOf("Claude Code has switched")!==-1||t.indexOf("? for shortcuts")!==-1||t.indexOf("Claude is waiting")!==-1||t.indexOf("[wand]")!==-1||t.indexOf("0;")===0||t.indexOf("9;")===0||t.indexOf("ctrl+g")!==-1||t.indexOf("/effort")!==-1||/^Using .* for .* session/.test(t)||t.indexOf("Press ")===0&&t.indexOf(" for")!==-1||t.indexOf("type ")===0&&t.indexOf(" to ")!==-1||t.indexOf("auto mode is unavailable")!==-1||/MCP server.*failed/i.test(t)||t.indexOf("Germinating")!==-1||t.indexOf("Doodling")!==-1||t.indexOf("Brewing")!==-1||t.indexOf("Permissions")!==-1&&t.indexOf("mode")!==-1||t.indexOf("\u25CF")===0&&t.indexOf("\xB7")!==-1||t.indexOf("[>")===0||t.indexOf("[<")===0||t.indexOf("Captured Claude session ID")!==-1||/^>_\s*OpenAI Codex\b/.test(t)||/^OpenAI Codex\b/i.test(t)||/^(model|directory):\s+/i.test(t)||/^(tip|context):\s+/i.test(t)||/^work(tree|space):\s+/i.test(t)||/^(approvals?|sandbox|provider|session id):\s+/i.test(t)||/^(thinking|working)(\.\.\.|…)?$/i.test(t)||/^[•◦·]\s+Working\b/i.test(t)||/^[•◦·]\s+(Running|Planning|Applying|Reading|Searching)\b/i.test(t)||/^[•◦·]\s+(Inspecting|Reviewing|Summarizing|Editing|Updating|Writing)\b/i.test(t)||/^[•◦·]\s+Completed\b/i.test(t)||/^(ctrl|enter|tab|shift|esc|alt)\+/i.test(t)||/\b(open|close|toggle) (chat|terminal)\b/i.test(t)||/\b(approve|deny)\b.*\b(permission|approval)\b/i.test(t)||/^(use|press) .* (to|for) .*/i.test(t)||/^(?:token|context window|remaining context|conversation):\s+/i.test(t)||/^(?:cwd|path):\s+\//i.test(t)||/^[<>│┆╎].*[<>│┆╎]$/.test(t)&&t.length<8):!1}function wEe(e){if(!e)return!1;var t=String(e).trim();return t?!!(t.indexOf("\u2500\u2500\u2500\u2500")===0||t==="\u276F"||t==="?"||t.indexOf("Claude Code v")!==-1||t.indexOf("Opus")!==-1&&t.indexOf("with")!==-1||t.indexOf("Sonnet")!==-1&&t.indexOf("with")!==-1||t.indexOf("API Usage")!==-1||t.indexOf("Billing")!==-1||t.indexOf("for shortcuts")!==-1||t.indexOf("/effort")!==-1||/^[▸▐▝▘▗▖█▌▍▎▏▔▁▂▃▄▅▆▇██]/.test(t)):!1}function wg(e){var t=String(e||"").trim();return!!(!t||yEe(t)||Fy.test(t)||/^[╭╰│┌└┐┘├┤┬┴┼─═]/.test(t)||/^\[>[0-9;?]*u$/i.test(t)||/^M+$/i.test(t)||/^(?:OpenAI Codex|Codex)\b/i.test(t)||/^(?:tokens?|context window|remaining context|approvals?|sandbox|provider|session id):\s*/i.test(t)||/^(?:thinking|working)\s*(?:\.\.\.|…)?$/i.test(t)||/^[•◦·]\s+(?:thinking|working|running|planning|applying|reading|searching|inspecting|reviewing|summarizing|editing|updating|writing|completed)\b/i.test(t)||/^(?:model|directory|tip|context|cwd|path):\s+/i.test(t))}function xEe(e){return!e||e.indexOf("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")===0||e==="\u276F"||e.indexOf("esc to interrupt")!==-1||e.indexOf("Claude Code v")!==-1||e.indexOf("Sonnet")!==-1||e.indexOf("~/")===0||e.indexOf("\u25CF high")!==-1||e.indexOf("Failed to install Anthropic marketplace")!==-1||e.indexOf("Claude Code has switched from npm to native installer")!==-1||e.indexOf("Fluttering")!==-1||e.indexOf("? for shortcuts")!==-1||e.indexOf("0;")===0||e.indexOf("9;")===0||e.indexOf("Claude is waiting")!==-1||e.indexOf("\u2722")!==-1||e.indexOf("\u2733")!==-1||e.indexOf("\u2736")!==-1||e.indexOf("\u273B")!==-1||e.indexOf("\u273D")!==-1||e.indexOf("\u2590")===0||e.indexOf("\u259D")===0||e.indexOf("\u2598")===0||(e==="lu"||e==="ue"||e==="tr"||e==="ti"||e==="g"||e==="n"||e==="i\u2026"||e==="\u2026"||e==="uts"||e==="lt"||e==="rg"||e==="\xB7")&&e.length<4||e.indexOf("\u273DF")===0||e.indexOf("\u273BF")===0||e.indexOf("npm WARN")!==-1||e.indexOf("npm notice")!==-1||e.indexOf("added ")!==-1&&e.indexOf(" packages")!==-1||e.indexOf("audited ")!==-1||e.indexOf("found ")!==-1&&e.indexOf(" vulnerabilities")!==-1||e.indexOf("Using ")!==-1&&e.indexOf(" for ")!==-1&&e.indexOf("session")!==-1||e.indexOf("You can use")!==-1||e.indexOf("Press ")!==-1&&e.indexOf(" for")!==-1||e.indexOf("type ")===0&&e.indexOf(" to ")!==-1||e.indexOf("[wand]")===0||e.indexOf("Captured Claude session ID")!==-1||e.indexOf("\u23F5")!==-1||e.indexOf("acceptedit")!==-1||e.indexOf("shift+tab")!==-1||e.indexOf("tabtocycle")!==-1||e.indexOf("ctrl+g")!==-1||e.indexOf("/effort")!==-1||e.indexOf("Opus")!==-1&&e.indexOf("model")!==-1||e.indexOf("Haiku")!==-1||e.indexOf("to cycle")!==-1||e.indexOf("high \xB7")!==-1||e.indexOf("high\xB7")!==-1||e.indexOf("medium \xB7")!==-1||e.indexOf("medium\xB7")!==-1||e.indexOf("low \xB7")!==-1||e.indexOf("low\xB7")!==-1}function EEe(e){return String(e||"").replace(/\x1b\][^\x07]*(\x07|\x1b\\)/g,"").replace(/\x1b\[(\d+)C/g,function(t,r){return" ".repeat(Number(r)||1)}).replace(/\x1b\[[0-9;?]*[AB]/g,`
270
+ `).replace(/\x1b\[[0-9;?]*[su]/g,"").replace(/\x1b\[[0-9;?]*[HfJKr]/g,`
271
+ `).replace(/\x1bM/g,`
272
+ `).replace(/\x1b\[[0-9;?]*[ST]/g,`
273
+ `).replace(/\x1b\[[0-9;?]*[a-zA-Z]/g,"").replace(/\x1b[><=ePX^_]/g,"").replace(/[\u00a0\u200b-\u200d\ufeff]/g," ").replace(/[\x00-\x08\x0b\x0c\x0e-\x1f]/g,"").replace(/\r\n?/g,`
274
+ `).replace(/[ \t]+\n/g,`
275
+ `).replace(/\n{3,}/g,`
276
+
277
+ `)}function fX(e,t){var r=[];if(!e)return r;var n=String(e||""),a=`
278
+ `,o="\r",l="\x1B";if(/^codex\b/.test(String(t||"").trim())){let tr=function(Le){return String(Le||"").replace(/\x1b\][^\x07]*(\x07|\x1b\\)/g,"").replace(/\x1b\[(\d+)C/g,function(Ze,gt){return" ".repeat(Number(gt)||1)}).replace(/\x1b\[[0-9;?]*[AB]/g,a).replace(/\x1b\[[0-9;?]*[su]/g,"").replace(/\x1b\[[0-9;?]*[HfJKr]/g,a).replace(/\x1bM/g,a).replace(/\x1b\[[0-9;?]*[ST]/g,a).replace(/\x1b\[[0-9;?]*[a-zA-Z]/g,"").replace(/\x1b[><=ePX^_]/g,"").replace(/[\u00a0\u200b-\u200d\ufeff]/g," ").replace(/[\x00-\x08\x0b\x0c\x0e-\x1f]/g,"").replace(/[ \t]+\n/g,a)},Tt=function(Le){return String(Le||"").replace(/\s+/g," ").replace(/[M]+$/g,"").trim()},cr=function(Le){return String(Le||"").replace(/^›\s*/,"").replace(/^>\s*/,"").trim()},$r=function(Le){var Ze=String(Le||"").trim();if(!/^›(?:\s|$)/.test(Ze)||Fy.test(Ze))return null;var gt=Tt(cr(Ze));return!gt||wg(gt)?null:gt},Wt=function(Le){var Ze=String(Le||"").trim();if(!/^[•◦·⏺]/.test(Ze))return null;var gt=Ze.replace(/^[•◦·]\s*/,"").replace(/^⏺\s+/,"").replace(/^│\s*/,"").trim();return!gt||/^[•◦·⏺]$/.test(gt)||(gt=gt.replace(/\s*\(\d+[smh]?\s*•\s*esc to interrupt\)[\s\S]*$/i,"").replace(/(?:[a-z]{1,6})?›[\s\S]*$/,"").replace(/\s{2,}gpt-\d[\s\S]*$/i,"").replace(/\b(?:OpenAI Codex|model:|directory:|Tip:)\b[\s\S]*$/i,""),gt=Tt(gt),!gt||gt.length<2||RG.test(gt)||wg(gt))?null:gt},dt=function(Le){var Ze=Tt(Le);return!Ze||wg(Ze)||/^[•◦·⏺›]/.test(Ze)||/^[\[\]<>0-9;?]+u?$/i.test(Ze)||/^[╭╰│┌└┐┘├┤┬┴┼─═]/.test(Ze)||Ze.length>500?null:Ze},St=function(Le,Ze){if(Le.indexOf(Ze)!==0)return!1;var gt=Le.slice(Ze.length);return/^[a-z]{1,4}$/i.test(gt)},ze=function(Le){for(var Ze=[],gt=0;gt<Le.length;gt++){var Qt=Tt(Le[gt]);if(!(!Qt||Qt.length<2||wg(Qt))){var Yt=Ze[Ze.length-1];if(!Yt){Ze.push(Qt);continue}if(Qt!==Yt){if(Qt.indexOf(Yt)===0){Ze[Ze.length-1]=Qt;continue}if(Yt.indexOf(Qt)===0){St(Yt,Qt)&&(Ze[Ze.length-1]=Qt);continue}Ze.push(Qt)}}}return Ze.join(a).trim()},Je=function(Le){for(var Ze=0;Ze<Le.length;Ze++){var gt=String(Le[Ze]||"").trim();if(gt){var Qt=$r(gt);if(Qt)return Qt;if(gt==="\u203A")for(var Yt=Ze+1;Yt<Le.length;Yt++){var on=Tt(Le[Yt]);if(!(!on||Fy.test(on)||wg(on)))return on}}}return null},ut=function(Le){for(var Ze=[],gt=!1,Qt=0;Qt<Le.length;Qt++){var Yt=String(Le[Qt]||"").trim();if(!Yt){if(gt)break;continue}var on=Wt(Yt);if(on){Ze.push(on),gt=!0;continue}if(gt){if(Yt==="\u203A"||/^›(?:\s|$)/.test(Yt)||Fy.test(Yt)||wg(Yt))break;Ze.push(Tt(Yt))}}return Ze};for(var u=tr,d=Tt,p=cr,h=$r,v=Wt,g=dt,b=St,x=ze,y=Je,E=ut,F=[],S=0,D=n.replace(/\r\n?/g,a).split(a),$=0;$<D.length;$++)for(var C=tr(D[$]),B=C.split(a),M=0;M<B.length;M++){var I=String(B[M]||"").trim();if(I){var j=$r(I);if(j){F.push({kind:"user",order:S++,text:j});continue}var N=Wt(I);if(N){F.push({kind:"assistant",order:S++,text:N});continue}var R=dt(I);R&&F.push({kind:"echo",order:S++,text:R})}}for(var L=F.filter(function(Le,Ze,gt){var Qt=gt[Ze-1];return!Qt||Qt.kind!==Le.kind||Qt.text!==Le.text}),q=L.filter(function(Le){return Le.kind==="user"}),W=L.filter(function(Le){return Le.kind==="assistant"}),U=L.filter(function(Le){return Le.kind==="echo"}),P=EEe(n),H=P.split(a).map(function(Le){return String(Le||"").trimEnd()}),V=Je(H),Q=q.length?q[q.length-1]:null,X=U.map(function(Le){return Le.text}).filter(function(Le){return Le.length>=3}),Z=null,O=X.length-1;O>=0;O--)if(X[O]!==V){Z=X[O];break}!Z&&X.length&&(Z=X[X.length-1]);for(var z=Q?Q.text:Z,K=W.filter(function(Le){return!Q||Le.order>Q.order}).map(function(Le){return Le.text}),J=[],te=P.match(/^[ \t]*[•◦·⏺][ \t]*(.+)$/gm)||[],ee=0;ee<te.length;ee++){var ie=Tt(te[ee].replace(/^[ \t]*[•◦·⏺][ \t]*/,""));ie&&(RG.test(ie)||Fy.test(ie)||/\b(?:OpenAI Codex|model:|directory:|Tip:|esc to interrupt)\b/i.test(ie)||J.push(ie))}var me=ze(K)||ze(ut(H))||(J.length?J[J.length-1]:null);return z&&r.push({role:"user",content:z}),me&&r.push({role:"assistant",content:me}),!r.length&&Q?r.push({role:"user",content:Q.text}):!r.length&&Z&&r.push({role:"user",content:Z}),r}for(var le="\0",he="\b",se="\v",ke="\f",De="",we="",de="\xA0",be="\x07",ye=new RegExp(l+"\\[[0-9;?]*[a-zA-Z]|"+l+"\\][^"+be+"]*("+be+"|"+l+"\\\\\\\\)|"+l+"[><=eP_X^]|["+le+"-"+he+se+ke+De+"-"+we+"]|"+de+"|"+o,"g"),Re=n.replace(ye,function(tr){return tr===de?" ":tr===o?a:""}).split(o).join(a),Fe=Re.split(a).map(function(tr){return tr.trim()}).filter(Boolean),$e=[/thinking with high effort/i,/thinking with medium effort/i,/thinking with low effort/i,new RegExp("thought for [0-9]+s","i"),new RegExp("Sauteed for [0-9]+m","i"),/Germinating/i,/Doodling/i,/Brewing/i],Ie=[],He=[],Oe=[],Me=0;Me<Fe.length;Me++){var Te=Fe[Me],Xe=Te.replace(/^❯\s*/,"");if(Xe.indexOf('Try"')===0||Xe.indexOf('Try "')===0){Ie.push(Xe);continue}for(var ot=!1,Ye=0;Ye<$e.length;Ye++)if($e[Ye].test(Te)){ot=!0,Oe.push(Te);break}if(!ot&&!xEe(Te)){if(Te.indexOf("\u25CF")===0){if(Te=Te.slice(1).trim(),!Te)continue;He.push(Te);continue}Te.length<3&&!/^[a-zA-Z]{3}$/.test(Te)||He.push(Te)}}if(Oe.length>0){var Ve=Oe[Oe.length-1],Ae=Ve.match(new RegExp("for ([0-9]+[ms]+| [0-9]+m [0-9]+s)","i")),Ne=Ae?"\u6DF1\u5EA6\u601D\u8003 "+Ae[0].replace(/for /i,""):"\u6DF1\u5EA6\u601D\u8003\u4E2D...";r.push({role:"thinking",content:Ne,type:"deep-thought"})}if(Ie.length>0){var ht=Ie[Ie.length-1].replace(/^Try\s*/,"").trim();r.push({role:"prompt",content:ht,type:"suggestion"})}if(!He.length)return r;for(var lt=[],Ke=null,je=[],Me=0;Me<He.length;Me++)if(Te=He[Me],Te.indexOf("\u276F")===0){var nt=Te.replace(/^❯\s*/,"").trim();if(nt.indexOf('Try"')===0||nt.indexOf('Try "')===0)continue;Ke!==null&&je.length>0&&(lt.push({user:Ke,assistantLines:je}),je=[]),nt?Ke=nt:(Ke!==null&&je.length>0&&(lt.push({user:Ke,assistantLines:je}),je=[]),Ke=null)}else Ke!==null&&(Te.indexOf("\u23FA")!==-1&&(Te.indexOf("Hi!")!==-1||Te.indexOf("Hello")!==-1||Te.indexOf("What")!==-1||Te.indexOf("working")!==-1)?je.push(Te):Te.indexOf("\u23FA")===0?je.push(Te.slice(1).trim()||Te):Te.length>=8&&Te.indexOf("\u2722")===-1&&Te.indexOf("\u2733")===-1&&Te.indexOf("\u2736")===-1&&Te.indexOf("\u273B")===-1&&Te.indexOf("\u273D")===-1&&Te.indexOf("\u2590")!==0&&Te.indexOf("\u259D")!==0&&Te.indexOf("\u2598")!==0&&Te.indexOf("esctointerrupt")===-1&&Te.indexOf("?for")!==0&&Te.indexOf("? for")!==0&&je.push(Te));if(Ke!==null&&je.length>0&&lt.push({user:Ke,assistantLines:je}),lt.length===0){for(var Nt="",Pt=-1,Me=0;Me<He.length;Me++)if(Te=He[Me],!(Te.indexOf('Try"')===0||Te.indexOf('Try "')===0)&&Te.indexOf("Failed to install")===-1&&Te.indexOf("ctrl+g")===-1&&Te.indexOf("\u25CF ")!==0&&!(Te.length<2||Te.length>100)&&/^[a-zA-Z]/.test(Te)){Nt=Te.trim(),Pt=Me;break}if(Nt&&Pt>=0){var Jr=He.slice(Pt+1).filter(function(tr){return tr.length>=8});Jr.length>0&&lt.push({user:Nt,assistantLines:Jr})}}for(var Xt=0;Xt<lt.length;Xt++)if(r.push({role:"user",content:lt[Xt].user}),lt[Xt].assistantLines.length>0){var Tr=kEe(lt[Xt].assistantLines.join(a));r.push({role:"assistant",content:Tr})}return r}function kEe(e){if(!e)return"";for(var t=`
279
+ `,r=e.split(t),n=[],a=!1,o=0;o<r.length;o++){var l=r[o],u=l.trim();if(!(!a&&!u)){if(a=!0,u.indexOf("\u23FA")===0&&u.length>2){n.push(u.slice(1).trim());continue}if(u.indexOf("\u25CF")===0){if(u=u.slice(1).trim(),!u)continue;l=u}n.push(l)}}for(;n.length>0&&!n[n.length-1].trim();)n.pop();for(var d=[],p={},h=0;h<n.length;h++){var v=n[h].replace(/\s+/g,"");v.length>5&&p[v]||(v.length>5&&(p[v]=!0),d.push(n[h]))}return d.join(t)}var mX=null;function SI(e){mX=e}var yB=0;function dw(e){yB++;try{return e()}finally{yB--}}var wB=0;function CEe(){let e=wB;return()=>e===wB}function hX(){yB||(wB++,mX?.())}var gX=null;function FI(e){gX=e}function SEe(){return gX?.()??Promise.resolve(!1)}var FEe=A(Xa(),1),$Ee=A(er(),1),H9=A(xe(),1),my=new Map,NE=new Set;function DEe(){for(let[t,r]of my)t.isConnected||(r.unmount(),my.delete(t));let e=document.querySelector("[data-login-controls]");!e||my.has(e)||NE.has(e)||(NE.add(e),Promise.all([globalThis.__wandImportBrowserModule("75fb0efeeb030780"),globalThis.__wandImportBrowserModule("fc7dd2f84cb9b470"),globalThis.__wandImportBrowserModule("d0fff09448324ac0")]).then(([{LoginForm:t},{renderLoginVisual:r},{renderWandBrandMarkup:n}])=>{if(NE.delete(e),!e.isConnected||my.has(e))return;let a=(0,FEe.createRoot)(e);my.set(e,a);let o=(0,H9.jsx)("div",{dangerouslySetInnerHTML:{__html:r(n("brand-logo"))}}),l="http://"+location.host+location.pathname;(0,$Ee.flushSync)(()=>a.render((0,H9.jsx)(Xn,{children:(0,H9.jsx)(t,{checking:e.dataset.checking==="true",switchServer:e.dataset.switchServer==="true",visual:o,httpHref:l})})))}).catch(()=>{NE.delete(e),e.textContent="\u767B\u5F55\u754C\u9762\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u3002"}))}var AEe={piExecution:Bd,folderPicker:Ld,imageViewer:Ol,localPreview:Os,missions:wf,newSession:ua,quickCommit:wd,settings:Yi,worktreeMerge:xd,workspaces:If};function BEe(e){return!e?.isOpen()||e.closeIfOpen()}function ki(e=[]){let t=new Set(e);for(let[r,n]of Object.entries(AEe))if(!t.has(r)&&!BEe(n))return!1;return!0}function vX(e,t){return e?'<pre class="inline-tool-result-text" style="max-height: 300px; overflow-y: auto;">'+mc(e)+"</pre>":'<span class="inline-tool-empty">\u65E0\u8F93\u51FA</span>'}function bX(e){var t=String(e||"").trim();return t.length<=24?t||"\u672A\u9009\u62E9\u4F1A\u8BDD":t.slice(0,21)+"..."}function yX(e,t){e.closest(".inline-tool-image")?.setAttribute("data-image-state",t)}var Gd=A(_(),1),IEe=A(Xa(),1),$y=A(er(),1),MEe=A(_(),1),to=A(xe(),1),wX=MEe.forwardRef(({mode:e,hasDraft:t,disabled:r,onToggle:n},a)=>{let o=e==="keyboard",l=o?"\u5207\u6362\u5230\u5FEB\u6377\u952E":"\u5207\u6362\u5230\u952E\u76D8\u8F93\u5165"+(t?" \xB7 \u6709\u8349\u7A3F":"");return(0,to.jsxs)(_e,{ref:a,kind:"soft",className:"pty-input-mode-toggle","data-mode":e,"aria-label":l,title:l,"aria-controls":"input-box terminal-shortcuts",disabled:r,onPointerDown:u=>u.preventDefault(),onClick:n,children:[(0,to.jsx)(B0,{from:"keyboard",to:"keycaps",active:o}),(0,to.jsxs)("span",{className:"pty-input-mode-label","aria-hidden":"true",children:[(0,to.jsxs)("span",{"data-active":!o,children:["\u952E\u76D8",t?(0,to.jsx)("i",{className:"pty-draft-dot"}):null]}),(0,to.jsx)("span",{"data-active":o,children:"\u5FEB\u6377\u952E"})]})]})});function xX({collapsed:e,hasDraft:t,disabled:r,onToggle:n}){let a=e?"\u5C55\u5F00\u7EC8\u7AEF\u6309\u952E"+(t?" \xB7 \u6709\u8349\u7A3F":""):"\u6536\u8D77\u7EC8\u7AEF\u6309\u952E";return(0,to.jsx)(_e,{kind:"soft",className:"pty-dock-toggle","data-collapsed":e,"aria-label":a,title:a,"aria-expanded":!e,"aria-controls":"terminal-shortcuts",disabled:r,onPointerDown:o=>o.preventDefault(),onClick:n,children:e?(0,to.jsxs)(to.Fragment,{children:[(0,to.jsx)(Be,{name:"keyboard",size:16}),(0,to.jsxs)("span",{children:["\u6309\u952E",t?(0,to.jsx)("i",{className:"pty-draft-dot"}):null]}),(0,to.jsx)(Be,{name:"chevronUp",size:14})]}):(0,to.jsx)(Be,{name:"chevronDown",size:16})})}var OG=A(xe(),1);function EX({ctrl:e,shift:t,disabled:r,onToggle:n}){return(0,OG.jsx)("div",{className:"pty-modifier-buttons",role:"group","aria-label":"\u6301\u7EED\u7EC4\u5408\u952E",children:["ctrl","shift"].map(a=>{let o=a==="ctrl"?e:t,l=a==="ctrl"?"Ctrl":"Shift";return(0,OG.jsx)(_e,{className:"pty-modifier-toggle",kind:"soft","data-modifier":a,"aria-pressed":o,"aria-label":`${l} ${o?"\u5DF2\u6301\u7EED\u5F00\u542F\uFF0C\u518D\u70B9\u5173\u95ED":"\u70B9\u51FB\u6301\u7EED\u5F00\u542F"}`,title:`${l} ${o?"\u5DF2\u6301\u7EED\u5F00\u542F\uFF0C\u518D\u70B9\u5173\u95ED":"\u70B9\u51FB\u6301\u7EED\u5F00\u542F\uFF0C\u53EF\u4E0E\u5B57\u6BCD\u548C\u65B9\u5411\u952E\u7EC4\u5408"}`,disabled:r,onPointerDown:u=>u.preventDefault(),onClick:()=>n(a),children:l},a)})})}var Zi=A(xe(),1),PE=new Map;function zG({host:e,input:t,resize:r}){let[,n]=Gd.useReducer($=>$+1,0);Gd.useEffect(()=>At.subscribe(n),[]),Gd.useEffect(()=>li.subscribe(n),[]),Gd.useEffect(()=>{let $=new MutationObserver(n),C=e.querySelector("#send-input-button");C&&$.observe(C,{attributes:!0,attributeFilter:["data-phase"]}),$.observe(t,{attributes:!0,attributeFilter:["disabled","readonly","placeholder"]});let B=e.querySelector(".terminal-shortcuts");B&&$.observe(B,{attributes:!0,attributeFilter:["hidden"]});let M=0,I=()=>{M=requestAnimationFrame(n)};return t.addEventListener("compositionstart",n),t.addEventListener("compositionend",I),()=>{$.disconnect(),cancelAnimationFrame(M),t.removeEventListener("compositionstart",n),t.removeEventListener("compositionend",I)}},[e,t]);let a=m.selectedId??"",o=At.read(a),l=e.querySelector("#send-input-button")?.dataset.phase??"idle",u=e.querySelector(".terminal-shortcuts"),d=!!u&&!u.hidden,p=li.read(a),h=Gd.useRef(null),v=Gd.useRef(null),g=l==="failed"||l==="unknown"||!!o.recovery,b=g?"keyboard":p.mode,x=t.readOnly||!!o.recovery||m.composerComposing,y=()=>{v.current={owner:a,start:t.selectionStart,end:t.selectionEnd,direction:t.selectionDirection,scroll:t.scrollTop}};Gd.useEffect(()=>{d&&g&&li.update(a,{mode:"keyboard"})},[a,d,g]);let E=o$({owner:a,input:()=>t,surface:()=>e,phase:l,pending:!!o.text||!!o.attachments.length,locked:x,forceExpanded:d&&b==="keyboard",defaultExpanded:!d,onDismiss:$=>{d&&(y(),li.update(a,{mode:"shortcuts"}),($==="escape"||$==="back")&&requestAnimationFrame(()=>(h.current?.offsetParent?h.current:e.querySelector(".pty-dock-toggle"))?.focus({preventScroll:!0})))},popupOwners:["composer-plus-popover","composer-main",`wand-pi-settings-${a}`,`wand-pi-codemode-${a}`,`pty-extra-keys-${a}`]}),F=d&&!p.open&&b==="shortcuts"&&!p.ctrl&&!p.shift;Gd.useLayoutEffect(()=>{e.dataset.composerExpanded=String(E.expanded),d?e.dataset.ptyInputMode=b:delete e.dataset.ptyInputMode,F?e.dataset.ptyCollapsed="true":delete e.dataset.ptyCollapsed;let $=d?b==="keyboard":E.expanded;t.tabIndex=$?0:-1;let C=e.querySelector(".composer-input-wrap");C&&(C.inert=!$),u&&(u.inert=d&&($||F),u.setAttribute("aria-hidden",String(!d||$||F)));let B=e.querySelector("[data-pty-extra-keys-host]");B&&(B.inert=!d||$||F);let M=e.querySelector("[data-composer-rail-host]");M&&(M.inert=d&&!$);let I=e.querySelector(".composer-editor-controls");I&&(I.inert=!$),r(t)},[e,t,u,r,E.expanded,d,b,F]);let S=()=>{if(!(x||l==="sending"||g||m.composerComposing))if(fc(),b==="keyboard")y(),t.blur(),(0,$y.flushSync)(()=>li.update(a,{mode:"shortcuts"})),h.current?.focus({preventScroll:!0});else{(0,$y.flushSync)(()=>li.update(a,{mode:"keyboard"})),E.open();let $=v.current;$?.owner===a&&(t.setSelectionRange($.start,$.end,$.direction),t.scrollTop=$.scroll)}},D=()=>{if(!m.composerComposing){if(fc(),F){li.update(a,{open:!0});return}b==="keyboard"&&(y(),t.blur()),li.update(a,{open:!1,mode:"shortcuts",ctrl:!1,shift:!1})}};return(0,Zi.jsxs)(Zi.Fragment,{children:[(0,$y.createPortal)((0,Zi.jsx)(Zi.Fragment,{children:d?(0,Zi.jsxs)(Zi.Fragment,{children:[(0,Zi.jsx)(xX,{collapsed:F,hasDraft:!!o.text||!!o.attachments.length,disabled:g&&!F,onToggle:D}),(0,Zi.jsx)(wX,{ref:h,mode:b,hasDraft:!!o.text||!!o.attachments.length,disabled:x||l==="sending"||g,onToggle:S}),(0,Zi.jsx)(EX,{ctrl:p.ctrl,shift:p.shift,disabled:m.composerComposing,onToggle:$=>{m.composerComposing||li.toggle(a,$)}})]}):null}),e.querySelector(".composer-main-row")),(0,$y.createPortal)((0,Zi.jsx)(s$,{text:o.text,attachments:o.attachments.length,placeholder:t.placeholder,disabled:t.disabled,onOpen:E.open}),e.querySelector(".composer-actions-left"))]})}function TEe(e){for(let[l,u]of PE)l.isConnected||(u.root.unmount(),PE.delete(l));let t=document.querySelector(".input-composer"),r=t?.querySelector("#input-box");if(!t||!r)return;let n=PE.get(t);if(n){n.root.render((0,Zi.jsx)(Xn,{children:(0,Zi.jsx)(zG,{host:t,input:r,resize:e})}));return}let a=document.createElement("span");t.appendChild(a);let o=(0,IEe.createRoot)(a);PE.set(t,{root:o,chrome:a}),(0,$y.flushSync)(()=>o.render((0,Zi.jsx)(Xn,{children:(0,Zi.jsx)(zG,{host:t,input:r,resize:e})})))}var nk=null,hy=null,xB=new Map;function _Ee(){return nk?Promise.resolve(nk):(hy||(hy=globalThis.__wandImportBrowserModule("2a86f5afb165815d").then(e=>(nk=e,hy=null,e),e=>{throw hy=null,e})),hy)}function kX(e){let t=(xB.get(e)??0)+1;return xB.set(e,t),t}function rC(e,t){let r=kX(e);_Ee().then(n=>{xB.get(e)===r&&t(n)},()=>{e.textContent="\u901A\u77E5\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u3002"})}function $I(e){kX(e),nk?.clearNoticeView(e)}function jEe(e){rC(e,t=>t.paintOfflineNotice(e))}function DI(e,t,r){rC(e,n=>n.paintBootNotice(e,t,r))}function NEe(e,t){rC(e,r=>r.paintNotificationNotice(e,t))}function PEe(e,t,r){rC(e,n=>n.paintUpdateNotice(e,t,r))}var EB="wand-active-task",REe="wand-selected-session";function Tg(e){try{e?localStorage.setItem(EB,e):localStorage.removeItem(EB)}catch{}}function OEe(){try{return(localStorage.getItem(EB)||"").trim()}catch{return""}}var zEe=HEe();async function LEe(e=zEe,t=()=>!0){if(LG()||!t()||await SEe()||!t())return;let r=OEe();if(!r||LG())return;let n=va.getRuntime();if(n)try{let a=await mn.listTaskGroups();if(!t())return;let o=_D(a.groups,r);if(!o||o.task.status==="done"){Tg(null);return}await n.openTask({...C6(o,e||void 0),navigationCurrent:t}),e&&t()&&n.selectSession(e)}catch{}}function HEe(){try{return(localStorage.getItem(REe)||"").trim()||null}catch{return null}}function LG(){return typeof document<"u"&&document.documentElement?.classList?.contains("is-wand-embed-terminal")===!0}function qEe(e){try{let t=e&&e._core&&e._core._renderService&&e._core._renderService.dimensions&&e._core._renderService.dimensions.css?e._core._renderService.dimensions.css.cell:null,r=Number(t&&t.width),n=Number(t&&t.height);return!(r>0)||!(n>0)?null:{width:r,height:n}}catch{return null}}function xg(e){let t=parseInt(e||"",10);return Number.isFinite(t)?t:null}function WEe(e){if(Number(e&&e.options&&e.options.scrollback)===0)return 0;try{if(!e.element||!e.element.querySelector(".xterm-decoration-overview-ruler"))return 0}catch{return 0}let t=Number(e.options&&e.options.overviewRuler&&e.options.overviewRuler.width);return t>0?t:14}function CX(e){let t=e&&e.element,r=t&&t.parentElement;if(!r||typeof getComputedStyle!="function")return null;let n=qEe(e);if(!n)return null;let a=getComputedStyle(r),o=getComputedStyle(t),l=xg(a.getPropertyValue("width")),u=xg(a.getPropertyValue("height"));if(l===null||u===null)return null;let d=(xg(o.getPropertyValue("padding-left"))||0)+(xg(o.getPropertyValue("padding-right"))||0),p=(xg(o.getPropertyValue("padding-top"))||0)+(xg(o.getPropertyValue("padding-bottom"))||0),h=Math.max(0,l-d-WEe(e)),v=u-p;return v>0?{cols:Math.max(2,Math.floor(h/n.width)),rows:Math.max(1,Math.floor(v/n.height))}:null}function Zd(e,t){let r=CX(e);if(r){if(r.cols!==e.cols||r.rows!==e.rows){try{e._core&&e._core._renderService&&e._core._renderService.clear()}catch{}e.resize(r.cols,r.rows)}return}t&&typeof t.fit=="function"&&t.fit()}var q9=0,RE=0,HG=0,gy=0,Fk=[],$k=[];function AI(){return window.__wandIosNative===!0}function SX(e){HG=Math.max(HG,Date.now()+(e||1800))}function FX(e,t){setTimeout(function(){var r=document.activeElement;ak(r)&&r!==t||SX(e)},30)}function UEe(e){return Math.max(window.innerHeight||0,e&&e.height||0,document.documentElement&&document.documentElement.clientHeight||0,document.body&&document.body.clientHeight||0)}function VEe(e){var t=document.documentElement,r=Math.max(window.innerWidth||0,e&&e.width||0,t&&t.clientWidth||0),n=UEe(e);return!q9||Math.abs(r-q9)>8?(q9=r,RE=n):n>RE&&(RE=n),Math.max(1,Math.round(RE||n||1))}function GEe(e,t,r,n){return e||!AI()?!1:t>0||n>r+1}function kg(e){var t=window.visualViewport;if(t){var r=document.documentElement;if(r.classList.toggle("is-keyboard-open",!!e),window.__wandImeNative){r.style.setProperty("--app-viewport-top","0px"),r.style.setProperty("--app-viewport-height",Math.round(t.height)+"px");return}var n=VEe(t),a=Math.max(0,Math.round(t.offsetTop||0)),o=Math.max(1,Math.round(t.height));(!e&&AI()||GEe(e,a,o,n))&&(a=0,o=Math.max(o,n)),r.style.setProperty("--app-viewport-top",a+"px"),r.style.setProperty("--app-viewport-height",o+"px"),(e||(window.scrollY||0)>0)&&VB()}}function ak(e){if(!e)return!1;var t=e.tagName;if(t==="TEXTAREA"||t==="SELECT")return!0;if(t==="INPUT"){var r=(e.getAttribute("type")||"text").toLowerCase();return!/^(button|checkbox|color|file|hidden|image|radio|range|reset|submit)$/i.test(r)}return!!e.isContentEditable}function KEe(){if(!("visualViewport"in window)||window.__wandViewportHandlersBound)return;window.__wandViewportHandlersBound=!0;var e=window.visualViewport,t=e.height,r=!1,n=Math.max(window.innerWidth||0,e.width||0),a=Math.max(window.innerHeight||0,e.height||0);function o(){return Math.max(window.innerHeight||0,e.height||0)}function l(){var b=Math.max(window.innerWidth||0,e.width||0),x=o();if(Math.abs(b-n)>8){n=b,a=x;return}x>a&&(a=x)}function u(b,x){var y=document.activeElement,E=y===b||ak(y),F=a-e.height,S=a-(window.innerHeight||e.height||0),D=Date.now()<gy;return D?!!(E&&(F>120||S>120)):!!(x>80||E&&(F>120||S>120)||r&&(F>80||x>32))}function d(){Fk.forEach(function(b){clearTimeout(b)}),Fk=[60,180,360,620,900].map(function(b){return setTimeout(function(){kg(r)},b)})}function p(){$k.forEach(function(b){clearTimeout(b)}),$k=[0,50,120,220,360,560].map(function(b){return setTimeout(function(){h();var x=document.getElementById("input-box");x&&document.activeElement===x&&Lk(x)},b)})}function h(){if(e){var b=document.getElementById("input-box"),x=window.innerHeight-e.height-e.offsetTop;l();var y=u(b,x),E=Math.abs(e.height-t)>8;if(kg(y),y&&(!r||E)&&z8e(e,b)&&Lk(b),!r&&y){var F=m.terminalAutoFollow;ro("keyboard-open",{forceReplay:!0}),window.__wandImeNative||setTimeout(function(){kg(!0)},220),d(),F&&setTimeout(function(){m.terminal&&m.terminalAutoFollow&&ql("force")},220)}if(r&&!y){var S=!!window.__wandImeNative;S||(SX(2200),gy=Date.now()+1200,kg(!1),VB()),d(),setTimeout(function(){S||(kg(!1),VB()),ro("keyboard-close",{forceReplay:!0}),ql("keyboard")},200)}E&&r===y&&ro("viewport"),r=y,t=e.height}}var v=null;function g(){v!==null&&cancelAnimationFrame(v),v=requestAnimationFrame(function(){v=null,h()})}e.addEventListener("resize",g),e.addEventListener("scroll",g),document.addEventListener("visibilitychange",function(){document.visibilityState==="visible"&&(g(),setTimeout(g,240),setTimeout(g,720))}),window.addEventListener("pageshow",function(b){b&&b.persisted&&(g(),setTimeout(g,240))}),document.addEventListener("focusout",function(b){!b||!b.target||ak(b.target)&&(FX(1600,b.target),AI()&&(gy=Math.max(gy,Date.now()+1200)),setTimeout(g,80),setTimeout(g,420))}),document.addEventListener("focusin",function(b){!b||!b.target||!ak(b.target)||p()}),window.addEventListener("wand-ios-ime-state",function(b){var x=b&&b.detail&&b.detail.state;x==="hidden"&&(gy=Date.now()+900),p(),d()}),h()}function XEe(){var e=document.getElementById("output");if(e){var t=document.createElement("div");t.className="terminal-resize-handle",t.setAttribute("role","separator"),t.setAttribute("aria-orientation","horizontal"),t.setAttribute("aria-label","\u8C03\u6574\u7EC8\u7AEF\u9AD8\u5EA6"),t.innerHTML='<span aria-hidden="true">&#8942;</span>',e.appendChild(t);var r=!1,n=0,a=0;t.addEventListener("mousedown",function(o){r=!0,n=o.clientY,a=e.getBoundingClientRect().height,document.body.style.cursor="ns-resize",document.body.style.userSelect="none",o.preventDefault()}),m.resizeMouseMove=function(o){if(r){var l=o.clientY-n,u=Math.max(200,Math.min(a+l,window.innerHeight-200));e.style.height=u+"px",e.style.flex="none",sc()}},document.addEventListener("mousemove",m.resizeMouseMove),m.resizeMouseUp=function(){r&&(r=!1,document.body.style.cursor="",document.body.style.userSelect="",sc())},document.addEventListener("mouseup",m.resizeMouseUp),t.addEventListener("touchstart",function(o){r=!0,n=o.touches[0].clientY,a=e.getBoundingClientRect().height,o.preventDefault()},{passive:!1}),m.resizeTouchMove=function(o){if(r){var l=o.touches[0].clientY-n,u=Math.max(200,Math.min(a+l,window.innerHeight-200));e.style.height=u+"px",e.style.flex="none",sc(),o.preventDefault()}},document.addEventListener("touchmove",m.resizeTouchMove,{passive:!1}),m.resizeTouchEnd=function(){r&&(r=!1,sc())},document.addEventListener("touchend",m.resizeTouchEnd)}}function QEe(){var e=document.getElementById("output");if(e){var t=!Ao();m.resizeHandler=function(){sc(!0);var r=!Ao();t!==r&&(t=r,!r&&m.sidebarPinned&&m.sessionsDrawerOpen?(m.sessionsDrawerOpen=!1,Qr("wand-sidebar-open",!1),ym()):r&&m.sidebarPinned&&!m.sessionsDrawerOpen&&(m.sessionsDrawerOpen=!0,Qr("wand-sidebar-open",!0),ym()))},window.addEventListener("resize",m.resizeHandler),window.visualViewport&&(m.visualViewportHandler=function(){sc(!0)},window.visualViewport.addEventListener("resize",m.visualViewportHandler)),m.visibilityHandler=function(){document.hidden||ro("visibility",{forceReplay:!0})},document.addEventListener("visibilitychange",m.visibilityHandler),m.orientationHandler=function(){ro("orientation",{forceReplay:!0})},window.addEventListener("orientationchange",m.orientationHandler),requestAnimationFrame(function(){sc(!0)})}}function YEe(){m.terminalHealthTimer||(m.terminalHealthTimer=setInterval(function(){if(!(!m.terminal||m.currentView!=="terminal"||document.hidden)){var e=m.sessions.find(function(t){return t.id===m.selectedId});!e||e.sessionKind==="structured"||ro("health")}},5e3))}function JEe(){m.terminalHealthTimer&&(clearInterval(m.terminalHealthTimer),m.terminalHealthTimer=null)}function pw(){JEe(),Fk.forEach(function(a){clearTimeout(a)}),Fk=[],$k.forEach(function(a){clearTimeout(a)}),$k=[],m.resizeTimer&&(clearTimeout(m.resizeTimer),m.resizeTimer=null),m.resizeObserver&&(m.resizeObserver.disconnect(),m.resizeObserver=null),m.resizeHandler&&(window.removeEventListener("resize",m.resizeHandler),m.resizeHandler=null),m.visualViewportHandler&&window.visualViewport&&(window.visualViewport.removeEventListener("resize",m.visualViewportHandler),m.visualViewportHandler=null),m.visibilityHandler&&(document.removeEventListener("visibilitychange",m.visibilityHandler),m.visibilityHandler=null),m.orientationHandler&&(window.removeEventListener("orientationchange",m.orientationHandler),m.orientationHandler=null),[["mousemove","resizeMouseMove"],["mouseup","resizeMouseUp"],["touchmove","resizeTouchMove"],["touchend","resizeTouchEnd"]].forEach(function(a){m[a[1]]&&(document.removeEventListener(a[0],m[a[1]]),m[a[1]]=null)});var e=document.getElementById("output");if(m.terminalViewportEl&&(m.terminalViewportScrollHandler&&m.terminalViewportEl.removeEventListener("scroll",m.terminalViewportScrollHandler),m.terminalViewportTouchHandler&&m.terminalViewportEl.removeEventListener("touchmove",m.terminalViewportTouchHandler),m.terminalViewportTouchStartHandler&&m.terminalViewportEl.removeEventListener("touchstart",m.terminalViewportTouchStartHandler)),e&&(m.terminalWheelHandler&&e.removeEventListener("wheel",m.terminalWheelHandler,!0),m.terminalClickHandler&&e.removeEventListener("click",m.terminalClickHandler)),m.terminalViewportEl=null,m.terminalViewportScrollHandler=null,m.terminalViewportTouchHandler=null,m.terminalViewportTouchStartHandler=null,m.terminalWheelHandler=null,m.terminalClickHandler=null,m.terminalScrollbarHideTimer&&(clearTimeout(m.terminalScrollbarHideTimer),m.terminalScrollbarHideTimer=null),m.terminalScrollbarEl&&m.terminalScrollbarEl.parentNode&&m.terminalScrollbarEl.parentNode.removeChild(m.terminalScrollbarEl),m.terminalScrollbarEl=null,m.terminalScrollbarDragging=!1,m.terminalScrollbarRafPending=!1,m.terminal&&(typeof m.terminal.dispose=="function"?m.terminal.dispose():typeof m.terminal.destroy=="function"&&m.terminal.destroy(),m.terminal=null),e)for(var t=e.querySelectorAll(".terminal-scroll-wrap"),r=0;r<t.length;r++){var n=t[r];n.parentNode===e&&e.removeChild(n)}m.terminalSessionId=null,m.terminalFitAddon=null,m.terminalWriteQueue=Promise.resolve(),m.terminalRestoring=!1,m.terminalWriteGeneration=(m.terminalWriteGeneration||0)+1,m.terminalRestoreGeneration=(m.terminalRestoreGeneration||0)+1,m.terminalOutput="",m.terminalAutoFollow=!0,m.showTerminalJumpToBottom=!1,Qs(),m.softResyncTimer&&(clearTimeout(m.softResyncTimer),m.softResyncTimer=null),m.lastResize={cols:0,rows:0}}function fw(e,t){if(!(!m.selectedId||m.terminalRestoring)){var r=m.sessions.find(function(a){return a.id===m.selectedId});if(!(!r||r.status!=="running")&&!gr(r)){e=Math.max(20,Math.min(Math.floor(e),1e3)),t=Math.max(5,Math.min(Math.floor(t),500));var n={cols:e,rows:t};(m.lastResize.cols!==n.cols||m.lastResize.rows!==n.rows)&&(m.lastResize=n,m.ws&&m.ws.readyState===WebSocket.OPEN?m.ws.send(JSON.stringify({type:"pty_resize",sessionId:m.selectedId,cols:n.cols,rows:n.rows})):Nr("/api/sessions/"+m.selectedId+"/resize",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(n)}).catch(function(){}))}}}function ro(e,t){if(!m.terminal||m.terminalRestoring)return!1;var r=document.getElementById("output");if(!r||r.offsetWidth===0||r.offsetHeight===0)return Zy(e||"fit-retry"),!1;var n=m.terminalAutoFollow;return requestAnimationFrame(function(){requestAnimationFrame(function(){!m.terminal||m.terminalRestoring||(m.terminalFitAddon&&typeof m.terminalFitAddon.fit=="function"&&Zd(m.terminal,m.terminalFitAddon),fw(m.terminal.cols,m.terminal.rows),n&&m.terminalAutoFollow?ql("force"):Qs())})}),!0}function Zy(e,t){if(!m.terminal)return;var r=0,n=8;function a(){if(m.terminal){var o=document.getElementById("output");if(o&&o.offsetHeight,o&&o.offsetWidth>0&&o.offsetHeight>0){ro(e);return}++r>=n||(r<=4?requestAnimationFrame(a):setTimeout(a,32))}}a()}function sc(e){m.resizeTimer&&(clearTimeout(m.resizeTimer),m.resizeTimer=null);var t=e?0:100;m.resizeTimer=setTimeout(function(){m.resizeTimer=null,requestAnimationFrame(ZEe)},t)}function ZEe(){!m.terminal||m.terminalRestoring||(m.terminalAutoFollow&&ql("force"),fw(m.terminal.cols,m.terminal.rows))}var om=A(er(),1),$X=A(Xa(),1),Ll=A(_(),1),eke=A(er(),1),ls=A(xe(),1),OE=[{key:"enter",label:"Enter",title:"\u53D1\u9001\u56DE\u8F66"},{key:"up",label:"\u2191",title:"\u65B9\u5411\u952E\u4E0A"},{key:"down",label:"\u2193",title:"\u65B9\u5411\u952E\u4E0B"},{key:"left",label:"\u2190",title:"\u65B9\u5411\u952E\u5DE6"},{key:"right",label:"\u2192",title:"\u65B9\u5411\u952E\u53F3"},{key:"escape",label:"Esc",title:"Escape"},{key:"tab",label:"Tab",title:"Tab"},{key:"ctrl_c",label:"Ctrl+C",title:"Ctrl+C \xB7 \u4E2D\u65AD"},{key:"home",label:"Home",title:"\u884C\u9996"},{key:"end",label:"End",title:"\u884C\u5C3E"},{key:"backspace",label:"\u232B",title:"\u9000\u683C"},{key:"delete",label:"Del",title:"\u5220\u9664\u540E\u4E00\u5B57\u7B26"},{key:"pageup",label:"PgUp",title:"\u4E0A\u4E00\u9875"},{key:"pagedown",label:"PgDn",title:"\u4E0B\u4E00\u9875"}];function tke(e,t,r){let n=0,a=0;for(let o of t){let l=n+(a?r:0)+o;if(l>e+.5)break;n=l,a++}return a}function DX({disabled:e,onKey:t,owner:r=""}){let n=Ll.useRef(null),a=Ll.useRef(null),[o,l]=Ll.useState(OE.length),[u,d]=Ll.useState(null),[p,h]=Ll.useState(!1),v=Ll.useRef(null),g=Ll.useSyncExternalStore(li.subscribe,()=>li.read(r),()=>li.read(r));Ll.useEffect(()=>{(g.mode!=="shortcuts"||e)&&h(!1)},[g.mode,e]),Ll.useEffect(()=>{h(!1)},[r]),Ll.useLayoutEffect(()=>{let x=n.current,y=a.current;if(!x||!y)return;let E=()=>{let D=x.clientWidth;if(!D)return;let $=parseFloat(getComputedStyle(x).columnGap)||0,C=Array.from(y.querySelectorAll("button"),B=>B.getBoundingClientRect().width);C.every(B=>B>0)&&l(tke(D,C,$))};E();let F=new ResizeObserver(E);F.observe(x),F.observe(y);let S=!0;return document.fonts.ready.then(()=>{S&&E()}),d(r?x.closest(".input-composer")?.querySelector("[data-pty-extra-keys-host]")??null:null),()=>{S=!1,F.disconnect()}},[r]);let b=OE.slice(o);return(0,ls.jsxs)(ls.Fragment,{children:[(0,ls.jsxs)(rt,{ref:n,gap:4,wrap:!1,role:"group","aria-label":"PTY \u5FEB\u6377\u952E",className:"terminal-shortcuts-row",children:[OE.map(({key:x,label:y,title:E},F)=>(0,ls.jsx)(Li,{"data-terminal-key":x,hidden:F>=o,disabled:e,title:E,"aria-label":E,onMouseDown:S=>{S.button===0&&S.preventDefault()},onClick:()=>t?.(x),children:y},x)),(0,ls.jsx)("div",{className:"terminal-shortcuts-measure","aria-hidden":"true",inert:!0,children:(0,ls.jsx)(rt,{ref:a,gap:4,wrap:!1,className:"terminal-shortcuts-row terminal-shortcuts-probe",children:OE.map(({key:x,label:y})=>(0,ls.jsx)(Li,{tabIndex:-1,children:y},x))})})]}),u?(0,eke.createPortal)((0,ls.jsx)(bi,{side:"top",ariaLabel:"\u5176\u4ED6\u7EC8\u7AEF\u6309\u952E",popupOwner:`pty-extra-keys-${r}`,open:p,onOpenChange:h,trigger:(0,ls.jsx)(_e,{ref:v,className:"pty-extra-keys-trigger",kind:"soft","aria-label":"\u66F4\u591A\u7EC8\u7AEF\u6309\u952E",title:"\u66F4\u591A\u7EC8\u7AEF\u6309\u952E",disabled:e||!b.length,"aria-expanded":p,style:{visibility:b.length?void 0:"hidden"},children:(0,ls.jsx)(Be,{name:"more",size:18})}),children:(0,ls.jsx)("div",{className:"pty-extra-keys-grid",role:"group","aria-label":"\u672A\u663E\u793A\u7684\u7EC8\u7AEF\u6309\u952E",children:b.map(({key:x,label:y,title:E})=>(0,ls.jsx)(_e,{title:E,"aria-label":E,"data-extra-terminal-key":x,onClick:()=>{t?.(x),h(!1),v.current?.focus({preventScroll:!0})},children:y},x))})}),u):null]})}var rke=A(_(),1),nke=A(er(),1),ake=Object.freeze({revision:0,mounts:Object.freeze([])}),ike=class{constructor(){ae(this,"snapshot",ake),ae(this,"listeners",new Set),ae(this,"subscribe",e=>(this.listeners.add(e),()=>this.listeners.delete(e))),ae(this,"getSnapshot",()=>this.snapshot)}sync(e){this.snapshot=Object.freeze({revision:this.snapshot.revision+1,mounts:Object.freeze(e.slice())});for(let t of this.listeners)t()}clear(){this.snapshot.mounts.length!==0&&this.sync([])}},zy=new ike,ik=A(xe(),1),qG="\u53D1\u9001\u56DE\u8F66\u5230\u7EC8\u7AEF\uFF08\u76F8\u5F53\u4E8E Enter\uFF09";function AX({disabled:e,hint:t,onSubmit:r}){return(0,ik.jsxs)(_e,{className:"wand-composer-rail-submit",kind:"soft",size:"medium",disabled:e,title:t??qG,"aria-label":t??qG,onClick:r,children:[(0,ik.jsx)(Be,{name:"enter",slot:"start",size:14}),(0,ik.jsx)("span",{children:"\u53D1\u9001"})]})}function BI(){return(0,rke.useSyncExternalStore)(zy.subscribe,zy.getSnapshot,zy.getSnapshot).mounts.map(e=>(0,nke.createPortal)((0,ik.jsx)(AX,{disabled:e.disabled,hint:e.hint,onSubmit:e.onSubmit}),e.target,e.key))}var Do=A(xe(),1),BX=0;function II(e,t,r){let n=document.createElement("div");n.dataset.terminalCreationMeasure="true",n.setAttribute("aria-hidden","true"),n.inert=!0,Object.assign(n.style,{position:"fixed",left:"-10000px",top:"0",width:`${t}px`,visibility:"hidden",pointerEvents:"none",contain:"layout style"}),document.body.appendChild(n);let a;try{return a=(0,$X.createRoot)(n,{identifierPrefix:`wand-terminal-measure-${++BX}-`}),(0,om.flushSync)(()=>a.render((0,Do.jsx)(Lb,{children:(0,Do.jsx)(yk,{children:e})}))),n.querySelector(r)?.getBoundingClientRect().height??0}finally{try{(0,om.flushSync)(()=>a?.unmount())}finally{n.remove()}}}function oke(e,t){return II((0,Do.jsx)(aX,{snapshot:e,measurement:!0}),t,".main-header-row")}function ske(e,t){return II((0,Do.jsx)(x6e,{...e}),t,".workspace-tab-bar")}function lke(e,t){return II((0,Do.jsx)(E6e,{...e}),t,'[data-session-tabs="standalone"]')}function uke(e){let t=[],r=[],n=(l,u,d)=>{let p=l.style.getPropertyValue(u),h=l.style.getPropertyPriority(u);r.push(()=>p?l.style.setProperty(u,p,h):l.style.removeProperty(u)),l.style.setProperty(u,d,"important")},a,o=()=>{try{(0,om.flushSync)(()=>a?.unmount())}finally{for(let l of t)l.remove();for(let l of r.reverse())l()}};try{let l=e.querySelector(".composer-top-row");l&&n(l,"display","none");let u=e.querySelector(".input-composer");if(u){let b=u.className;r.push(()=>{u.className=b}),u.classList.add("is-terminal-interactive");let x=u.dataset.ptyInputMode;r.push(()=>{x===void 0?delete u.dataset.ptyInputMode:u.dataset.ptyInputMode=x}),u.dataset.ptyInputMode="shortcuts";let y=u.dataset.ptyCollapsed;r.push(()=>{y===void 0?delete u.dataset.ptyCollapsed:u.dataset.ptyCollapsed=y}),u.dataset.ptyCollapsed="true";for(let E of["--motion-normal","--motion-fast","--motion-quick-exit","--motion-morph"])n(u,E,"0s")}let d=e.querySelector(".input-textarea");if(d){n(d,"min-height","");let b=parseFloat(getComputedStyle(d).minHeight);n(d,"height",`${Number.isFinite(b)?b:40}px`)}let p=[],h=u?.querySelector(".composer-main-row");if(h&&!h.querySelector(".pty-input-mode-toggle")){let b=document.createElement("span");b.style.display="contents",t.push(b),h.appendChild(b),p.push((0,om.createPortal)((0,Do.jsxs)(Do.Fragment,{children:[(0,Do.jsx)(xX,{collapsed:!0,onToggle:()=>{}}),(0,Do.jsx)(wX,{mode:"shortcuts",onToggle:()=>{}}),(0,Do.jsx)(EX,{ctrl:!1,shift:!1,onToggle:()=>{}})]}),b))}let v=e.querySelector(".terminal-shortcuts");if(v?.hidden&&!document.documentElement.classList.contains("is-wand-native-input")){let b=document.createElement("div");b.className="terminal-shortcuts",t.push(b),v.before(b),p.push((0,om.createPortal)((0,Do.jsx)(DX,{disabled:!1}),b))}let g=e.querySelector("[data-composer-rail-host]");if(g&&!document.documentElement.classList.contains("is-wand-embed-terminal")&&!g.querySelector(".wand-composer-rail-submit")){let b=document.createElement("span");b.style.display="contents",t.push(b),g.appendChild(b),p.push((0,om.createPortal)((0,Do.jsx)(AX,{}),b))}if(p.length){let b=document.createElement("div");t.push(b),b.dataset.terminalCreationMeasure="true",b.inert=!0,document.body.appendChild(b),a=(0,$X.createRoot)(b,{identifierPrefix:`wand-terminal-measure-${++BX}-`}),(0,om.flushSync)(()=>a.render((0,Do.jsx)(Lb,{children:p})))}return o}catch(l){throw o(),l}}function IX(e,t){if(!Number.isFinite(e.deltaY)||e.deltaY===0||(t.accumulatedPixels+=e.deltaY,Math.abs(t.accumulatedPixels)<40))return 0;let r=t.accumulatedPixels<0?1:-1;return t.accumulatedPixels=0,r}function MX(e,t){let r=1,n=l=>{l.preventDefault(),r=1},a=l=>{l.preventDefault();let u=l.scale;typeof u=="number"&&Number.isFinite(u)&&(r=u)},o=l=>{l.preventDefault(),r>=1.08?t(1):r<=.92&&t(-1),r=1};e.addEventListener("gesturestart",n),e.addEventListener("gesturechange",a),e.addEventListener("gestureend",o)}var cke=180,WG=80,dke=80,pke=180;function TX(e,t,r,n=Date.now()){if(!Number.isFinite(e.deltaY)||e.deltaY===0)return 0;var a=e.deltaY<0?-1:1,o=Math.abs(jX(e,r));return o===0||((t.direction!==a||n-t.lastEventAt>pke)&&(t.accumulatedPixels=0),t.direction=a,t.lastEventAt=n,t.accumulatedPixels+=o,t.accumulatedPixels<WG)||n-t.lastPageAt<dke?0:(t.accumulatedPixels%=WG,t.lastPageAt=n,a)}var UG=60,fke=80;function mke(e,t,r=Date.now()){if(!Number.isFinite(e)||e===0||(t.accumulatedPixels+=e,Math.abs(t.accumulatedPixels)<UG)||r-t.lastPageAt<fke)return 0;var n=t.accumulatedPixels>0?1:-1;return t.accumulatedPixels-=n*UG,t.lastPageAt=r,n}function _X(e,t,r,n,a=Date.now()){if(!Number.isFinite(e.deltaY)||e.deltaY===0)return 0;var o=jX(e,n);if(!Number.isFinite(o)||o===0)return 0;a-t.lastEventAt>cke&&(t.accumulatedPixels=0),t.lastEventAt=a;var l=Number.isFinite(r)&&r>0?r:16;t.accumulatedPixels+=o;var u=Math.trunc(t.accumulatedPixels/l);return u===0?0:(t.accumulatedPixels-=u*l,u)}function MI(e){return e<0?"\x1B[5~":e>0?"\x1B[6~":""}function jX(e,t){return e.deltaMode===1?e.deltaY*16:e.deltaMode===2?e.deltaY*Math.max(1,t):e.deltaY}function ew(e){let t=typeof e=="string"?e.trim():"";return!t||!ki(["localPreview"])?!1:P1(t)?Os.openPreview(t):Lf(t)?Os.openUrl(t):t.startsWith("/")?Os.openFile(t):Os.openUrl(t)}var lc=new Map;function NX(e){return{...e.base,data:e.prefix+e.base.data,pending:[...e.base.pending,...e.live?[{type:"data",data:e.live}]:[]],historyBefore:e.before}}function PX(e,t){let r=lc.get(e);return r?.base===t&&!r.stale?NX(r):null}function RX(e,t){lc.delete(e),!(!t||t.version!==1||!Number.isSafeInteger(t.historyBefore)||!Number.isSafeInteger(t.historyRevision))&&lc.set(e,{base:t,prefix:"",before:t.historyBefore,revision:t.historyRevision,live:"",stale:!1,resyncRequested:!1,loading:!1})}function hke(e,t){let r=lc.get(e);!r||r.stale||(r.live+=t,r.live.length>2e5&&(r.live="",r.stale=!0))}async function OX(e,t){let r=lc.get(e);if(!r||r.loading||r.before<=0)return;if(r.stale){if(!r.resyncRequested&&m.ws?.readyState===WebSocket.OPEN)try{m.ws.send(JSON.stringify({type:"resync",sessionId:e})),r.resyncRequested=!0}catch{}return}r.loading=!0;let n=r.before;try{let a=await fetch(`/api/sessions/${encodeURIComponent(e)}/pty-history?before=${n}&revision=${r.revision}`,{credentials:"same-origin"});if(a.status===409){lc.delete(e),m.ws?.readyState===WebSocket.OPEN&&m.ws.send(JSON.stringify({type:"resync",sessionId:e}));return}let o=await It(a);if(lc.get(e)!==r||r.stale||r.before!==n||!Number.isSafeInteger(o.start)||o.start<0||o.start>=n||o.before!==n||o.revision!==r.revision||typeof o.data!="string"||o.separator!==""&&o.separator!==`\r
280
+ `)return;let l=o.data+o.separator+r.prefix;await t({...NX(r),data:l+r.base.data,historyBefore:o.start},n-o.start)&&lc.get(e)===r&&!r.stale&&r.before===n&&(r.prefix=l,r.before=o.start)}catch{}finally{r.loading=!1}}function gke(e){lc.delete(e)}var zE=new WeakMap,vke=64*1024;function zX(e,t,r,n,a,o){let l=zE.get(e);if(l&&l.tail===r&&l.current()&&n()&&l.chars+t.length<=vke)return l.chunks.push(t),l.chars+=t.length,l.consumed.push(o),l.tail;let u={chunks:[t],chars:t.length,tail:Promise.resolve(),current:n,consumed:[o]};return u.tail=r.catch(()=>{}).then(async()=>{zE.get(e)===u&&zE.delete(e);try{if(!n())return;await new Promise((d,p)=>{try{e.write(u.chunks.join(""),d)}catch(h){p(h)}}),n()&&a()}finally{for(let d of u.consumed)try{d()}catch{}}}),zE.set(e,u),u.tail}xo.subscribe(()=>{m.terminal&&(m.terminal.options.theme=fd())});function nC(e){m.workingDir=e;try{localStorage.setItem("wand-working-dir",e)}catch{}bke(e)}function bke(e){return fetch("/api/recent-paths",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({path:e})}).then(function(t){return It(t)}).catch(function(t){console.warn("[wand] \u8BB0\u5F55\u6700\u8FD1\u8DEF\u5F84\u5931\u8D25\uFF1A"+qa(t,"\u672A\u77E5\u9519\u8BEF"))})}function mw(e,t){var r=m.sessions.find(function(a){return a.id===m.selectedId});if(r){var n=r[e];if(!n){Qe("\u5F53\u524D\u4F1A\u8BDD\u6CA1\u6709\u53EF\u590D\u5236\u7684\u5185\u5BB9\u3002","error");return}CY(String(n),null,function(){Qe(t||"\u5DF2\u590D\u5236","info")})}}function ds(){return!m.terminal||!m.terminal.element?null:(m.terminalViewportEl=m.terminal.element.querySelector(".xterm-viewport"),m.terminalViewportEl)}function Qs(){var e=document.getElementById("terminal-jump-bottom"),t=!!m.selectedId&&m.currentView==="terminal"&&!m.terminalAutoFollow&&!kB();m.showTerminalJumpToBottom=t,e&&e.classList.toggle("visible",t);var r=document.getElementById("output");r&&r.classList.toggle("has-jump-btn",t)}function kB(){if(m.terminal?.buffer?.active){var e=m.terminal.buffer.active;return e.viewportY>=e.baseY}var t=ds();if(!t)return!0;var r=t.scrollHeight-t.clientHeight-t.scrollTop;return r<=2}function CB(e){if(m.terminal){var t=ds();if(t){var r=e?500:120;m.terminalProgrammaticScrollUntil=Math.max(m.terminalProgrammaticScrollUntil,Date.now()+r),e?t.scrollTo({top:t.scrollHeight,behavior:"smooth"}):m.terminal.scrollToBottom()}}}function Dy(){m.terminalAutoFollow=!1,m.terminalProgrammaticScrollUntil=0,Qs()}function ql(e){if(m.terminal){var t=e==="force";if(t){m.terminalAutoFollow=!0,CB(!1),Qs();return}if(!m.terminalAutoFollow){Qs();return}CB(!1),Qs()}}function VG(){if(!W9){var e=typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):function(t){return window.setTimeout(t,16)};W9=e(function(){W9=0,ql()})}}function ok(e){if(!(m.terminal!==e||m.terminalAutoFollow!==!1||Date.now()<m.terminalProgrammaticScrollUntil||e.buffer.active.type!=="normal")&&!(e.buffer.active.viewportY>12||!m.selectedId)){var t=m.selectedId;OX(t,async function(r){return m.terminal!==e||m.selectedId!==t?!1:(Bk(t,r,m.terminalOutput,!0),await m.terminalWriteQueue,m.terminal===e&&m.selectedId===t)})}}function yke(e,t){var r=null,n=0,a=16,o=0,l=0,u={accumulatedPixels:0,lastPageAt:0};function d(){try{var g=e.querySelector(".xterm-screen");if(g&&t.rows>0){var b=g.clientHeight/t.rows;if(b>4)return b}}catch{}var x=getComputedStyle(e).getPropertyValue("--term-row-height").trim(),y=parseFloat(x);return y>0?y:16}function p(){try{return!!t.element&&t.element.classList.contains("enable-mouse-events")}catch{return!1}}function h(g,b){var x=t.cols||80,y=t.rows||24,E=1,F=1;try{var S=e.querySelector(".xterm-screen");if(S){var D=S.getBoundingClientRect();D.width>0&&D.height>0&&(E=Math.min(x,Math.max(1,Math.floor((b.clientX-D.left)/(D.width/x))+1)),F=Math.min(y,Math.max(1,Math.floor((b.clientY-D.top)/(D.height/y))+1)))}}catch{}var $=g>0?65:64;return"\x1B[<"+$+";"+E+";"+F+"M"}e.addEventListener("touchstart",function(g){if(g.touches.length!==1){r=null;return}var b=g.touches[0];r=b.identifier,n=b.clientY,a=d(),o=0,l=0,u.accumulatedPixels=0,u.lastPageAt=0},{passive:!0}),e.addEventListener("touchmove",function(g){if(r!==null){for(var b=null,x=0;x<g.touches.length;x++)if(g.touches[x].identifier===r){b=g.touches[x];break}if(b){g.cancelable&&g.preventDefault();var y=b.clientY-n;if(n=b.clientY,y!==0){l+=Math.abs(y);var E=t.buffer.active.type==="alternate";if(E){var F=mke(-y,u,Date.now());if(F!==0){var S=p()?h(F,b):MI(F);S&&Ay(S)}return}o-=y;var D=Math.trunc(o/a);D!==0&&(o-=D*a,t.scrollLines(D)),l>8&&(Dy(),y>0&&ok(t))}}}},{passive:!1});function v(){r=null}e.addEventListener("touchend",v,{passive:!0}),e.addEventListener("touchcancel",v,{passive:!0})}function wke(e){var t=document.createElement("div");t.className="terminal-scrollbar";var r=document.createElement("div");r.className="terminal-scrollbar-track";var n=document.createElement("div");n.className="terminal-scrollbar-thumb",r.appendChild(n),t.appendChild(r),e.appendChild(t),m.terminalScrollbarEl=t,m.terminalScrollbarHideTimer=null,m.terminalScrollbarDragging=!1,m.terminalScrollbarRafPending=!1;function a(){m.terminalScrollbarHideTimer&&(clearTimeout(m.terminalScrollbarHideTimer),m.terminalScrollbarHideTimer=null),t.classList.add("visible")}function o(){m.terminalScrollbarDragging||(m.terminalScrollbarHideTimer&&clearTimeout(m.terminalScrollbarHideTimer),m.terminalScrollbarHideTimer=setTimeout(function(){m.terminalScrollbarHideTimer=null,m.terminalScrollbarDragging||t.classList.remove("visible")},1500))}function l(){m.terminalScrollbarRafPending=!1;var y=ds();if(y){var E=y.scrollHeight,F=y.clientHeight;if(E<=F){t.classList.remove("visible");return}var S=r.clientHeight,D=Math.max(28,F/E*S),$=E-F,C=y.scrollTop/$,B=C*(S-D);n.style.height=D+"px",n.style.top=B+"px"}}function u(){m.terminalScrollbarRafPending||(m.terminalScrollbarRafPending=!0,requestAnimationFrame(l))}var d=ds();d&&d.addEventListener("scroll",function(){a(),u(),o()},{passive:!0}),r.addEventListener("mousedown",function(y){if(y.target!==n){y.preventDefault();var E=ds();if(E){var F=r.getBoundingClientRect(),S=(y.clientY-F.top)/F.height,D=E.scrollHeight-E.clientHeight;E.scrollTop=S*D}}});var p=0,h=0;n.addEventListener("mousedown",function(y){y.preventDefault(),y.stopPropagation(),m.terminalScrollbarDragging=!0,n.classList.add("dragging"),p=y.clientY;var E=ds();h=E?E.scrollTop:0,document.addEventListener("mousemove",v),document.addEventListener("mouseup",g)});function v(y){y.preventDefault();var E=ds();if(E){var F=r.clientHeight,S=E.scrollHeight,D=E.clientHeight,$=S-D;if(!($<=0)){var C=Math.max(28,D/S*F),B=F-C;if(!(B<=0)){var M=y.clientY-p,I=M/B*$;E.scrollTop=h+I}}}}function g(){m.terminalScrollbarDragging=!1,n.classList.remove("dragging"),document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",g),o()}n.addEventListener("touchstart",function(y){if(y.touches.length===1){y.stopPropagation(),m.terminalScrollbarDragging=!0,n.classList.add("dragging"),p=y.touches[0].clientY;var E=ds();h=E?E.scrollTop:0,document.addEventListener("touchmove",b,{passive:!1}),document.addEventListener("touchend",x),document.addEventListener("touchcancel",x)}},{passive:!1});function b(y){if(y.touches.length===1){y.preventDefault();var E=ds();if(E){var F=r.clientHeight,S=E.scrollHeight,D=E.clientHeight,$=S-D;if(!($<=0)){var C=Math.max(28,D/S*F),B=F-C;if(!(B<=0)){var M=y.touches[0].clientY-p,I=M/B*$;E.scrollTop=h+I}}}}}function x(){m.terminalScrollbarDragging=!1,n.classList.remove("dragging"),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",x),document.removeEventListener("touchcancel",x),o()}t.addEventListener("mouseenter",function(){a()}),t.addEventListener("mouseleave",function(){m.terminalScrollbarDragging||o()}),u()}var xke=150,Eke=30,kke=160*1024,Cke=192*1024,W9=0,Ske=120,Fke=120,$ke=800,Dke=1500,Ake=5e3,Bke=3e3;function aC(e){return m.terminal?(m.terminal.refresh(0,Math.max(0,m.terminal.rows-1)),!0):!1}function Ike(e){m.softResyncTimer&&clearTimeout(m.softResyncTimer),m.softResyncTimer=setTimeout(function(){m.softResyncTimer=null,aC()},typeof e=="number"?e:0)}function Ly(e){return!e||e.length<=Cke?e:e.slice(-kke)}function LX(e){return!m.ws||m.ws.readyState!==WebSocket.OPEN?!1:(m.ws.send(JSON.stringify(e)),!0)}function Ay(e,t){return!m.selectedId||!e||m.terminalRestoring?!1:LX({type:"pty_input",sessionId:m.selectedId,data:e,shortcutKey:t,userInput:m.terminalInteractive===!0})}function GG(e,t){!e||!(t>0)||LX({type:"pty_ack",sessionId:e,bytes:t})}var TI=0;function Dk(e,t){var r=typeof e=="number"?e:Date.now(),n=r+(typeof t=="number"?t:Dke);return new Promise(function(a){(function o(){var l=Date.now(),u=TI,d=u>r?Math.max(u+Fke,r+Ske):r+$ke;if(l>=d||l>=n){a(null);return}setTimeout(o,Math.max(10,Math.min(60,d-l)))})()})}function Mke(e){var t=Date.now(),r=t+Bke,n=t+(typeof e=="number"?e:Ake);return new Promise(function(a){(function o(){var l=Date.now();if(l>=n){a(null);return}if(l>=r&&TI>t){Dk(l).then(function(){a(null)});return}setTimeout(o,50)})()})}function Ak(e,t,r,n){if(!e||t==null||t==="")return r&&n&&GG(n,r),Promise.resolve();var a=String(t);TI=Date.now();var o=m.terminalWriteGeneration||0,l=m.terminalWriteQueue||Promise.resolve();return m.terminalWriteQueue=zX(e,a,l,function(){return e===m.terminal&&o===(m.terminalWriteGeneration||0)},function(){m.terminalAutoFollow!==!1&&CB(!1)},function(){r&&n&&GG(n,r)}),m.terminalWriteQueue}function Tke(){m.terminal&&(m.terminal.reset(),m.terminal.clear())}function SB(e,t){return new Promise(function(r){if(!t){r(null);return}e.write(t,function(){r(null)})})}function Bk(e,t,r,n=!1){if(!t||t.version!==1)return!1;if(e&&!n){var a=PX(e,t);m.terminalStatesBySession[e]=t,a?t=a:RX(e,t)}if(!m.terminal)return!0;var o=m.terminal;m.terminalWriteGeneration=(m.terminalWriteGeneration||0)+1;var l=(m.terminalRestoreGeneration||0)+1;m.terminalRestoreGeneration=l,m.terminalProgrammaticScrollUntil=Date.now()+400;var u=m.terminalWriteQueue||Promise.resolve();return m.terminalWriteQueue=u.catch(function(){}).then(async function(){if(!(o!==m.terminal||l!==m.terminalRestoreGeneration)){var d=m.terminalAutoFollow===!1,p=ds(),h=Math.max(0,o.buffer.active.baseY-o.buffer.active.viewportY);!Number.isFinite(h)&&p&&(h=p.scrollHeight-p.clientHeight-p.scrollTop),m.terminalRestoring=!0;try{if(o.reset(),o.clear(),t.cols>0&&t.rows>0&&o.resize(t.cols,t.rows),await SB(o,String(t.data||"")),o!==m.terminal||l!==m.terminalRestoreGeneration)return;for(var v=Array.isArray(t.pending)?t.pending:[],g=0;g<v.length;g++){if(o!==m.terminal||l!==m.terminalRestoreGeneration)return;var b=v[g]||{};b.type==="resize"&&b.cols>0&&b.rows>0?o.resize(b.cols,b.rows):b.type==="data"&&await SB(o,String(b.data||""))}if(o!==m.terminal||l!==m.terminalRestoreGeneration)return;m.lastResize={cols:o.cols,rows:o.rows},m.terminalSessionId=e||null,m.terminalOutput=String(r||""),m.terminalProgrammaticScrollUntil=Date.now()+120,d&&h>0?(m.terminalAutoFollow=!1,m.terminalFitAddon&&typeof m.terminalFitAddon.fit=="function"&&Zd(o,m.terminalFitAddon),o.scrollToLine(Math.max(0,o.buffer.active.baseY-h))):(m.terminalAutoFollow=!0,m.terminalFitAddon&&typeof m.terminalFitAddon.fit=="function"&&Zd(o,m.terminalFitAddon),o.scrollToBottom()),Qs()}finally{o===m.terminal&&(m.terminalRestoring=!1)}o===m.terminal&&l===m.terminalRestoreGeneration&&fw(o.cols,o.rows)}}),!0}function tw(e,t,r){if(!m.terminal)return!1;var n=String(t||""),a=e||null,o=r||{},l=o.mode==="replace",u=m.terminalSessionId!==a,d=String(m.terminalOutput||""),p=!1;if(u||l){var h=m.terminal,v=(m.terminalWriteGeneration||0)+1;m.terminalWriteGeneration=v,m.terminalRestoreGeneration=(m.terminalRestoreGeneration||0)+1,m.terminalWriteQueue=(m.terminalWriteQueue||Promise.resolve()).catch(function(){}).then(async function(){if(!(h!==m.terminal||v!==m.terminalWriteGeneration)){m.terminalRestoring=!0;try{Tke(),await SB(h,n)}finally{h===m.terminal&&(m.terminalRestoring=!1)}}}),p=!!n||u}else if(n.startsWith(d)){var g=n.slice(d.length);g&&(Ak(m.terminal,g),p=!0)}else return!1;return m.terminalSessionId=a,m.terminalOutput=n,o.scroll!==!1&&p&&ql("output"),u&&fw(m.terminal.cols,m.terminal.rows),p}var LE=!1,tc=null,Us=null;function HX(e,t){let r=e.parentElement;if(!r||!t&&e.offsetWidth>0&&e.offsetHeight>0)return function(){};let n=[],a=[],o=[],l=function(p,h,v){o.push({node:p,property:h,value:p.style.getPropertyValue(h),priority:p.style.getPropertyPriority(h)}),p.style.setProperty(h,v,"important")},u=function(p){if(!(p>0))return;let h=document.createElement("div");h.dataset.terminalCreationSpace="true",Object.assign(h.style,{height:`${p}px`,flexShrink:"0",visibility:"hidden"}),n.push(h),r.insertBefore(h,e)},d=function(){try{for(let p of a)p()}finally{for(let p of n)p.remove();for(let p of o.reverse())p.value?p.node.style.setProperty(p.property,p.value,p.priority):p.node.style.removeProperty(p.property)}};try{if(l(e,"display","flex"),l(e,"visibility","hidden"),t&&!document.documentElement.classList.contains("is-wand-embed-terminal")){let p="terminal-creation-measurement",h=qK({...m,selectedId:p,currentTask:null,gitStatus:null,currentView:"terminal",sessions:[{id:p,sessionKind:"pty",status:"running",cwd:t.cwd||m.workingDir,provider:t.kind==="shell"?void 0:t.provider,command:t.command||(t.kind==="shell"?"Shell":t.provider)}]},uX()),v={id:p,sessionKind:"pty",status:"running",provider:t.kind==="shell"?void 0:t.provider,command:t.command||(t.kind==="shell"?"Shell":t.provider),cwd:t.cwd,workspaceTaskId:t.workspaceTaskId},g=r.closest(".quick-terminal-workspace")?.querySelector(".quick-terminal-toolbar"),b=r.querySelector(".main-header-row, .workspace-tab-bar"),x=g?.clientWidth||r.clientWidth,y=h.viewport.mobile?oke(h,x):t.workspaceTaskId?ske({mobile:!1,taskName:Xr.getSnapshot().taskName,session:v},x):lke({mobile:!1,session:v},x),E=g||b;E?(l(E,"box-sizing","border-box"),l(E,"height",`${y}px`),l(E,"min-height",`${y}px`),l(E,"max-height",`${y}px`)):u(y);for(let F of r.querySelectorAll(".workspace-mobile-navigation, .workspace-window"))l(F,"display","none")}for(let p of Array.from(r.children))if(!(!(p instanceof HTMLElement)||p===e)&&((p.id==="chat-output"||p.id==="blank-chat")&&l(p,"display","none"),p.classList.contains("input-panel"))){if(document.documentElement.classList.contains("is-wand-embed-terminal")&&document.documentElement.classList.contains("is-wand-native-input"))continue;getComputedStyle(p).display==="none"&&(l(p,"display","block"),l(p,"visibility","hidden")),t&&(l(p,"visibility","hidden"),a.push(uke(p)))}}catch(p){throw d(),p}return d}function _ke(e){let t=document.getElementById("output");if(!t||!m.terminal)return null;let r=HX(t,e);try{return CX(m.terminal)}finally{r()}}function Ys(e){if(!e?.prepare&&Ir.getSnapshot().active===!0)return;Us&&!Us.wrap.isConnected&&Us.release();var t=document.getElementById("output");if(!t||m.terminal||m.terminalInitializing)return;var r=m.sessions.find(function(D){return D.id===m.selectedId});if(!e?.prepare&&(!r||gr(r))||!e?.prepare&&tc&&tc===m.selectedId)return;if(typeof XTermLib>"u"||!XTermLib.Terminal){if(LE||tc===m.selectedId)return;LE=!0;let D=document.createElement("div");D.dataset.terminalLoadState="loading",D.setAttribute("role","status"),t.querySelector("[data-terminal-load-state]")?.remove(),D.textContent="\u6B63\u5728\u52A0\u8F7D\u7EC8\u7AEF\u2026",t.appendChild(D),Rf().then(()=>{LE=!1,tc=null,Ys(e)}).catch(()=>{if(LE=!1,m.terminal||Us)return;let $=m.sessions.find(B=>B.id===m.selectedId),C=document.getElementById("output");if(tc=$&&!gr($)?$.id:null,C?.isConnected&&tc){C.querySelector("[data-terminal-load-state]")?.remove();let B=document.createElement("div");B.dataset.terminalLoadState="error";let M=document.createElement("button");M.type="button",M.dataset.antdControl="default",M.textContent="\u7EC8\u7AEF\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF0C\u70B9\u51FB\u91CD\u8BD5",B.appendChild(M),C.appendChild(B),_y(C),B.querySelector("button")?.addEventListener("click",()=>{tc=null,Ys()})}});return}m.terminalInitRetries=0,m.terminalInitializing=!0,t.querySelector("[data-terminal-load-state]")?.remove(),_y(t);var n=!!r&&!gr(r)&&m.currentView==="terminal";n&&(t.classList.remove("hidden"),t.classList.add("active"));for(var a=t.querySelectorAll(".terminal-scroll-wrap"),o=0;o<a.length;o++){var l=a[o];l.parentNode===t&&t.removeChild(l)}var u=document.createElement("div");u.className="terminal-scroll-wrap",t.appendChild(u);var d=getComputedStyle(u),p=d.getPropertyValue("--term-font-family").trim()||"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",h=m.terminalBaseFontSize,v=Math.max(8,Math.round(h*Number(m.terminalScale||1))),g=null,b=null,x=!1;let y={wrap:u,release:function(){if(x)return;x=!0;let D=Us===y;if(D&&(Us=null),g&&m.terminal===g){try{pw()}catch{try{b?.dispose?.()}catch{}try{g?.dispose?.()}catch{}m.terminal=null,m.terminalFitAddon=null,u.remove()}window.__wandTerminal===g&&(window.__wandTerminal=null)}else{try{b?.dispose?.()}catch{}try{g?.dispose?.()}catch{}u.remove()}D&&!m.terminal&&(m.terminalInitializing=!1)}};Us=y;let E=function(D){let $=Us===y||g&&m.terminal===g;if(y.release(),$){console.error("[wand] xterm init failed:",D);let C=m.sessions.find(B=>B.id===m.selectedId);if(t.isConnected&&C&&!gr(C)){tc=C.id;let B=document.createElement("div");B.dataset.terminalLoadState="error";let M=document.createElement("button");M.type="button",M.dataset.antdControl="default",M.textContent="\u7EC8\u7AEF\u672A\u80FD\u6253\u5F00\uFF0C\u70B9\u51FB\u91CD\u8BD5",B.appendChild(M),t.appendChild(B),_y(t),B.querySelector("button")?.addEventListener("click",()=>{tc=null,Ys()})}}};try{g=new XTermLib.Terminal({cols:120,rows:36,allowProposedApi:!0,convertEol:!1,cursorBlink:!1,disableStdin:!1,fontFamily:p,fontSize:v,lineHeight:1.25,scrollback:5e3,theme:fd()}),b=new XTermLib.FitAddon;var F=new XTermLib.Unicode11Addon;g.loadAddon(b),g.loadAddon(F),g.unicode.activeVersion="11";var S=document.fonts&&typeof document.fonts.ready=="object"?Promise.race([document.fonts.ready,new Promise(function(D){setTimeout(D,800)})]):Promise.resolve();S.then(function(){if(Us!==y||!u.isConnected||document.getElementById("output")!==t||!e?.prepare&&Ir.getSnapshot().active===!0){y.release();return}let D=e?.prepare?HX(t):function(){};try{let q=function(){try{var W=u.querySelector(".xterm-screen");if(W&&g.rows>0){var U=W.clientHeight/g.rows;if(U>4)return U}}catch{}return Math.max(1,v*1.25)};var $=q;g.options.theme=fd(),g.open(u),g.registerLinkProvider({provideLinks:function(W,U){for(var P=g.buffer.active.getLine(W),H=P?P.translateToString(!0):"",V=[],Q=/https?:\/\/(?:localhost|127\.0\.0\.1|\[::1\])(?::\d+)?(?:\/[^\s]+)?/gi,X;(X=Q.exec(H))!==null;){var Z=X.index+1,O=X.index+X[0].length;V.push({text:X[0],range:{start:{x:Z,y:W},end:{x:O,y:W}},activate:function(ee,ie){ew(ie)}})}for(var z=/(^|[\s(\['"])(\/[^\s]+?\.(?:html?|\/))(?=$|[\s)\]'"])/gi;(X=z.exec(H))!==null;){var K=X[2],J=X.index+X[1].length+1,te=X.index+X[1].length+K.length;V.push({text:K,range:{start:{x:J,y:W},end:{x:te,y:W}},activate:function(ee,ie){ew(ie)}})}U(V.length?V:void 0)}}),g.attachCustomKeyEventHandler(function(W){if(!m.terminalInteractive||W.defaultPrevented)return!1;let U=li.read(m.selectedId);if(W.type!=="keydown"||W.isComposing||W.keyCode===229||W.metaKey||!U.ctrl&&!U.shift||W.ctrlKey&&W.key.toLowerCase()==="c"&&sw())return!0;let P=eC(Ok(W),Yy(m.selectedId,{ctrl:W.ctrlKey,shift:W.shiftKey,alt:W.altKey}));return P===null?!0:(W.preventDefault(),Ay(P,U.ctrl&&W.key.length===1?"ctrl_"+W.key.toLowerCase():Ok(W)),!1)});var C={direction:0,accumulatedPixels:0,lastEventAt:0,lastPageAt:0},B={accumulatedPixels:0,lastEventAt:0},M={accumulatedPixels:0};MX(u,function(W){vm(W*.25)}),u.addEventListener("wheel",function(W){if(W.ctrlKey||W.metaKey){W.preventDefault(),W.stopPropagation();var U=IX(W,M);U!==0&&vm(U*.25);return}if(!(Math.abs(W.deltaY)<=Math.abs(W.deltaX))){if(W.preventDefault(),W.stopPropagation(),g.buffer.active.type==="alternate"){var P=ds(),H=TX(W,C,P?P.clientHeight:g.rows*q()),V=MI(H);V&&Ay(V);return}W.deltaY<0&&Dy();var Q=_X(W,B,q(),g.rows*q());Q!==0&&g.scrollLines(Q)}},{capture:!0,passive:!1});var I=u.querySelector(".xterm-helper-textarea");I&&(I.readOnly=rp()?!0:!m.terminalInteractive),C8e(),zk(),m.terminal=g;try{window.__wandTerminal=g}catch{}m.terminalFitAddon=b,m.terminalWriteQueue=Promise.resolve(),m.terminalInitializing=!1,Zd(g,b),g.onData(function(W){Ay(W)}),g.onBinary(function(W){m.terminalInteractive&&Ay(W)}),g.onResize(function(W){fw(W.cols,W.rows)}),m.terminalAutoFollow=!0;var j=ds();if(j&&(m.terminalViewportScrollHandler=function(){if(Date.now()<m.terminalProgrammaticScrollUntil){Qs();return}kB()?m.terminalAutoFollow=!0:Dy(),Qs(),ok(g)},j.addEventListener("scroll",m.terminalViewportScrollHandler,{passive:!0})),m.terminalWheelHandler=function(W){W.deltaY<0&&g.buffer.active.type==="normal"&&(Dy(),ok(g))},t.addEventListener("wheel",m.terminalWheelHandler,{capture:!0,passive:!0}),g.onScroll(function(){Date.now()<m.terminalProgrammaticScrollUntil||(kB()?m.terminalAutoFollow=!0:m.terminalAutoFollow&&Dy(),Qs(),ok(g))}),wke(t),yke(u,g),m.selectedId){var N=m.sessions.find(function(W){return W.id===m.selectedId}),R=N&&m.terminalStatesBySession[N.id],L=N&&(N.terminalState||R);N&&!Bk(N.id,L,N.output||"")&&tw(N.id,N.output||"",{mode:"replace",scroll:!1})}else Ak(g,`\u70B9\u51FB\u4E0A\u65B9\u300C\u65B0\u5BF9\u8BDD\u300D\u5F00\u59CB\u4F60\u7684\u7B2C\u4E00\u6B21\u5BF9\u8BDD\u3002\r
281
+ `);m.terminalClickHandler=function(W){if(!sw()){if(rp()){zk();return}m.terminalInteractive?g.focus():Xl(W)}},t.addEventListener("click",m.terminalClickHandler),Qs(),XEe(),QEe(),YEe(),ro("mount"),document.documentElement.classList.contains("is-wand-embed-terminal")&&[120,350,700].forEach(function(W){setTimeout(function(){m.terminal&&ro("embed-settle")},W)}),Us===y&&(Us=null)}finally{D()}}).catch(E)}catch(D){E(D)}}function jke(e,t){return e===t?!0:!e||!t?!1:e.total===t.total&&e.command===t.command&&e.file===t.file&&e.tool===t.tool}function Nke(e,t){return e.key!==t.key||e.target!==t.target?!1:e.kind==="auto-approve"&&t.kind==="auto-approve"?e.sessionId===t.sessionId&&e.enabled===t.enabled&&e.pending===t.pending:e.kind==="permissions"&&t.kind==="permissions"?e.sessionId===t.sessionId&&e.pending===t.pending&&e.permission.requestId===t.permission.requestId&&e.permission.label===t.permission.label&&e.permission.autoApproving===t.permission.autoApproving:e.kind==="approval-stats"&&t.kind==="approval-stats"?jke(e.stats,t.stats):!1}var Pke=class extends vl{constructor(){super(Nke)}},_g=new Pke,Rke=A(er(),1);function hw(e){let t=[];document.querySelectorAll(e.selector).forEach((n,a)=>{if(!n.isConnected)return;let o=e.build(n,a);o&&t.push(o)});let r=()=>{t.length===0?e.store.clear():e.store.sync(t)};e.flush?(0,Rke.flushSync)(r):r()}function Oke(e){return!e||e.autoApproveHidden?{visible:!1,enabled:!1}:{visible:!0,enabled:e.autoApproveEnabled}}function zke(e){return e&&e.total>0?e:null}function Lke(e){let t=e.resolve();hw({selector:"[data-composer-badge-host]",store:_g,build(r,n){let a=r.dataset.composerBadgeHost,o=a||`composer-badge-${n}`;if(a==="auto-approve"){let{visible:l,enabled:u}=Oke(t);if(r.classList.toggle("hidden",!l),!l||!t)return null;let d=t.sessionId;return{key:o,kind:"auto-approve",target:r,sessionId:d,pending:t.autoApprovePending,enabled:u,onToggle(){e.onToggleAutoApprove(d)}}}if(a==="permissions"){if(r.classList.toggle("hidden",!t?.permission),!t?.permission)return null;let{sessionId:l,permission:u}=t;return{key:o,kind:"permissions",target:r,sessionId:l,pending:t.permissionPending,permission:u,onAction(d){e.onPermissionAction(l,u.requestId,d)}}}if(a==="approval-stats"){let l=zke(t?.approvalStats);return r.classList.toggle("hidden",!l),{key:o,kind:"approval-stats",target:r,stats:l}}return null}})}function qX(e){if(!e||e.provider==="codex")return null;let t=e.pendingEscalation;if(!t&&!e.permissionBlocked)return null;let r=!!e.autoApprovePermissions,n=r?"\u81EA\u52A8\u6279\u51C6\u4E2D...":t?(t.reason||"\u7B49\u5F85\u6388\u6743")+(t.target?` \xB7 ${t.target}`:""):"\u7B49\u5F85\u6388\u6743";return{requestId:t?.requestId||null,label:n,autoApproving:r}}function Hke(e){var t=e&&e.messages;if(!t||t.length===0)return"";for(var r=t.length-1;r>=0;r--){var n=t[r];if(n.role==="assistant"){for(var a=n.content||[],o=0;o<a.length;o++)if(a[o].type==="text"&&a[o].text&&a[o].text.trim()){var l=a[o].text.trim();l=l.replace(/^#+\s+/gm,"").replace(/\*\*/g,"").replace(/`/g,"");var u=l.split(`
282
+ `)[0].trim();return u.slice(0,100)}}}return""}function qke(e,t){let r=m.sessions.find(n=>n.id===e);r&&(r.output=Ly((r.output||"")+t))}function WX(e,t){let r=m.sessions.find(n=>n.id===e);r&&(r.output=Ly(t))}var cn=new Map,_I=new Map,Zs=new Set,FB=new Set;function Cg(e){for(let t of Zs){let r=cn.get(t),n=sX(t,e);r&&n&&(r.terminal.options.disableStdin=n!=="\u5DF2\u8FDE\u63A5")}for(let t of FB)t(e)}function Wke(e){return FB.add(e),()=>{FB.delete(e)}}function Uke(e,t){t?Zs.add(e):Zs.delete(e)}function KG(e){return Zs.has(e)}function Vke(e){cn.get(e)?.terminal.focus()}function Gke(e){ep({type:"subscribe",mode:"add",sessionId:e,compactTools:!0,capabilities:{ptyAck:!0}})}function UX(e){return Math.round(Math.max(.5,Math.min(2,e))*4)/4}function jI(){return m.ws&&m.ws.readyState===WebSocket.OPEN?m.ws:null}function ep(e){let t=jI();t&&t.send(JSON.stringify(e))}function Kke(){return(typeof getComputedStyle=="function"?getComputedStyle(document.documentElement).getPropertyValue("--term-font-family").trim():"")||"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"}function $B(e=Number(m.terminalScale||1)){let t=m.terminalBaseFontSize||13;return Math.max(8,Math.round(t*e))}function U9(e,t){if(!cn.get(e)?.restoring){if(Zs.has(e)&&!jI()){Cg({sessionId:e,type:"pty_error"});return}ep({type:"pty_input",sessionId:e,data:t,userInput:Zs.has(e)||m.terminalInteractive===!0})}}function VX(e,t,r){let n=cn.get(e);if(n?.restoring||!jI())return;let a=Math.max(20,Math.min(Math.floor(t),1e3)),o=Math.max(5,Math.min(Math.floor(r),500)),l=`${a}x${o}`;n?.lastSize!==l&&(n&&(n.lastSize=l),ep({type:"pty_resize",sessionId:e,cols:a,rows:o}))}function Hy(e){if(e.disposed||e.restoring||Zs.has(e.sessionId)&&(e.container.clientWidth<=0||e.container.clientHeight<=0))return;try{Zd(e.terminal,e.fitAddon)}catch{}let t=Number(e.terminal.cols),r=Number(e.terminal.rows);t>0&&r>0&&VX(e.sessionId,t,r)}function DB(e){requestAnimationFrame(()=>{Hy(e),requestAnimationFrame(()=>Hy(e))}),window.setTimeout(()=>Hy(e),120)}function lm(e){return _I.get(e)??UX(Number(m.terminalScale||1))}function rw(e,t){let r=UX(t);_I.set(e,r);let n=cn.get(e);return!n||n.disposed||(n.terminal.options.fontSize=$B(r),DB(n)),r}xo.subscribe(()=>{for(let e of cn.values())e.disposed||(e.terminal.options.theme=fd())});function $g(e){return cn.has(e)}function Xke(e){return!!cn.get(e)?.terminal?.modes?.bracketedPasteMode}function AB(e,t,r=e.restoreGeneration){return!t||e.disposed||r!==e.restoreGeneration?Promise.resolve():new Promise(n=>{try{e.terminal.write(t,()=>n())}catch{n()}})}function iC(e,t){if(!e||!t)return!1;let r=cn.get(e);if(r&&!r.disposed){if(r.container!==t){try{r.resizeObserver.disconnect()}catch{}t.appendChild(r.wrap),r.container=t,r.resizeObserver.observe(t)}return DB(r),!0}let n=globalThis.XTermLib;if(!n||!n.Terminal||!n.FitAddon)return!1;let a=document.createElement("div");a.className="terminal-scroll-wrap pooled-terminal-wrap",a.dataset.ptySessionId=e,t.appendChild(a);let o=null,l=null,u=null;try{let d=new n.Terminal({cols:120,rows:36,allowProposedApi:!0,convertEol:!1,cursorBlink:!1,disableStdin:Zs.has(e),fontFamily:Kke(),fontSize:$B(lm(e)),lineHeight:1.25,scrollback:5e3,theme:fd()});o=d;let p=new n.FitAddon;l=p;let h=null;try{n.Unicode11Addon&&(h=new n.Unicode11Addon,d.loadAddon(h),d.unicode.activeVersion="11")}catch{}d.loadAddon(p),d.open(a);try{Zd(d,p)}catch{}d.onData($=>U9(e,$)),d.onBinary($=>{(Zs.has(e)||m.terminalInteractive)&&U9(e,$)}),d.onResize($=>VX(e,$.cols,$.rows));let v=new ResizeObserver(()=>{let $=cn.get(e);$&&Hy($)});u=v,v.observe(t);let g={direction:0,accumulatedPixels:0,lastEventAt:0,lastPageAt:0},b={accumulatedPixels:0,lastEventAt:0},x=()=>{let $=cn.get(e);!$||$.autoFollow||$.disposed||d.buffer.active.type!=="normal"||d.buffer.active.viewportY>12||OX(e,async C=>cn.get(e)!==$?!1:(Ik(e,C,"",!0),await $.writeQueue,cn.get(e)===$))},y=()=>{try{let $=a.querySelector(".xterm-screen");if($&&d.rows>0){let C=$.clientHeight/d.rows;if(C>4)return C}}catch{}return Math.max(1,$B(lm(e))*1.25)},E={accumulatedPixels:0};MX(a,$=>{rw(e,lm(e)+$*.25)}),a.addEventListener("wheel",$=>{if($.ctrlKey||$.metaKey){$.preventDefault(),$.stopPropagation();let B=IX($,E);B!==0&&rw(e,lm(e)+B*.25);return}if(Math.abs($.deltaY)<=Math.abs($.deltaX))return;if($.preventDefault(),$.stopPropagation(),d.buffer.active.type==="alternate"){let B=TX($,g,t.clientHeight||d.rows*y()),M=MI(B);M&&U9(e,M);return}if($.deltaY<0){let B=cn.get(e);B&&(B.autoFollow=!1)}let C=_X($,b,y(),t.clientHeight||d.rows*y());if(C!==0&&d.scrollLines(C),$.deltaY<0&&x(),d.buffer.active.viewportY>=d.buffer.active.baseY){let B=cn.get(e);B&&(B.autoFollow=!0)}},{capture:!0,passive:!1}),d.onScroll(()=>{let $=cn.get(e);$&&d.buffer.active.viewportY>=d.buffer.active.baseY&&($.autoFollow=!0)});let F={sessionId:e,terminal:d,fitAddon:p,wrap:a,container:t,resizeObserver:v,writeQueue:Promise.resolve(),wheelPagingState:g,wheelScrollState:b,autoFollow:!0,restoreGeneration:0,restoring:!1,disposed:!1};cn.set(e,F);let S=m.sessions.find($=>$.id===e),D=m.terminalStatesBySession?.[e];return Ik(e,S?.terminalState??D,S?.output||"")||sk(e,S?.output||""),ep({type:"subscribe",mode:"add",sessionId:e,compactTools:!0,capabilities:{ptyAck:!0}}),DB(F),!0}catch(d){if(cn.has(e))GX(e);else{u?.disconnect();try{l?.dispose?.()}catch{}try{o?.dispose?.()}catch{}a.remove()}throw d}}function Qke(){for(let e of cn.keys())ep({type:"subscribe",mode:"add",sessionId:e,compactTools:!0,capabilities:{ptyAck:!0}})}function Yke(e,t,r){qke(e,t);let n=cn.get(e);if(!n||n.disposed){r&&e&&ep({type:"pty_ack",sessionId:e,bytes:r});return}let a=n.restoreGeneration;n.writeQueue=zX(n.terminal,t,n.writeQueue,()=>!n.disposed&&a===n.restoreGeneration,()=>{n.autoFollow&&n.terminal.scrollToBottom()},()=>{r&&e&&ep({type:"pty_ack",sessionId:e,bytes:r})})}function sk(e,t){WX(e,t);let r=cn.get(e);if(!r||r.disposed)return;let n=++r.restoreGeneration;r.writeQueue=r.writeQueue.catch(()=>{}).then(async()=>{if(!(r.disposed||n!==r.restoreGeneration)){r.restoring=!0;try{try{r.terminal.reset(),r.terminal.clear()}catch{}if(await AB(r,t,n),r.disposed||n!==r.restoreGeneration)return;try{r.terminal.scrollToBottom()}catch{}}finally{r.restoring=!1}}})}function Ik(e,t,r="",n=!1){if(!t||t.version!==1)return!1;if(e&&!n){let l=PX(e,t);m.terminalStatesBySession[e]=t,l?t=l:RX(e,t)}n||WX(e,r);let a=cn.get(e);if(!a||a.disposed)return!0;let o=++a.restoreGeneration;return a.writeQueue=a.writeQueue.catch(()=>{}).then(async()=>{if(a.disposed||o!==a.restoreGeneration)return;let l=!a.autoFollow,u=a.terminal.buffer.active.baseY-a.terminal.buffer.active.viewportY;a.restoring=!0;try{try{a.terminal.reset(),a.terminal.clear(),t.cols>0&&t.rows>0&&a.terminal.resize(t.cols,t.rows)}catch{}await AB(a,String(t.data||""),o);let d=Array.isArray(t.pending)?t.pending:[];for(let p of d){if(a.disposed||o!==a.restoreGeneration)return;if(p?.type==="resize"&&p.cols>0&&p.rows>0)try{a.terminal.resize(p.cols,p.rows)}catch{}else p?.type==="data"&&await AB(a,String(p.data||""),o)}if(a.disposed||o!==a.restoreGeneration)return;a.lastSize=`${a.terminal.cols}x${a.terminal.rows}`;try{a.container.clientWidth!==0&&a.container.clientHeight!==0&&Zd(a.terminal,a.fitAddon),l?(a.autoFollow=!1,a.terminal.scrollToLine(Math.max(0,a.terminal.buffer.active.baseY-u))):a.terminal.scrollToBottom()}catch{}}finally{a.restoring=!1}!a.disposed&&o===a.restoreGeneration&&Hy(a)}),!0}function jg(e){Zs.has(e)||GX(e)}function GX(e){_I.delete(e),gke(e);let t=cn.get(e);if(t){t.disposed=!0;try{t.resizeObserver.disconnect()}catch{}try{t.terminal.dispose()}catch{}t.wrap.parentNode&&t.wrap.parentNode.removeChild(t.wrap),cn.delete(e),ep({type:"unsubscribe",sessionId:e})}}function gw(){for(let e of[...cn.keys()])Zs.has(e)||jg(e)}V6e({mount:iC,dispose:jg,retain:Uke,focus:Vke,reconnect:Gke,observe:Wke});var BB=!1;function Jke(){BB=!1,oc.clear()}function HE(e,t){if(e){m.turnActiveBySession||(m.turnActiveBySession={});var r=m.turnActiveBySession[e];m.turnActiveBySession[e]=t,r===!0&&!t&&dQ()}}function IB(e){if(!(!m.ws||m.ws.readyState!==WebSocket.OPEN)){var t=m.chatResyncPendingBySession||(m.chatResyncPendingBySession={});if(!t[e]){t[e]=!0;try{m.ws.send(JSON.stringify({type:"resync",sessionId:e}))}catch(r){delete t[e],console.error("[wand] chat resync failed:",r)}}}}function qE(e){if(e!==m.selectedId)return null;var t=m.sessions.find(function(r){return r.id===e});return t?(m.currentMessages=Ks(t,pc(t,t.output,!1)),t):null}function KX(){YX(),yCe(),iSe(),eCe(),!oC()&&(m.pollTimer=setInterval(Ql,1600))}var Zke=3e4,qy=null;function eCe(){qy===null&&(qy=setInterval(function(){var e=document.querySelectorAll(".session-time");e.length>0&&Sg()},Zke))}function tCe(){qy!==null&&(clearInterval(qy),qy=null)}function NI(){m.wsReconnectTimer&&(clearTimeout(m.wsReconnectTimer),m.wsReconnectTimer=null)}var rCe=1e4,nCe=4e4;function aCe(){XX(),m.wsHeartbeatCheckTimer=setInterval(QX,rCe)}function XX(){m.wsHeartbeatCheckTimer&&(clearInterval(m.wsHeartbeatCheckTimer),m.wsHeartbeatCheckTimer=null)}function QX(){if(!(!m.ws||m.ws.readyState!==WebSocket.OPEN)&&m.lastWsMessageAt){var e=Date.now()-m.lastWsMessageAt;e>nCe&&PI("heartbeat-stale-"+Math.round(e/1e3)+"s")}}function PI(e){if(NI(),m.ws){var t=m.ws;try{t.onopen=null}catch{}try{t.onclose=null}catch{}try{t.onerror=null}catch{}try{t.onmessage=null}catch{}try{t.close()}catch{}m.ws=null}m.wsConnected=!1,m.wsReconnectAttempts=0,oC(e)}function XG(){if(!m.wsReconnectTimer&&!document.hidden){var e=m.wsReconnectAttempts||0,t=[500,1e3,2e3,4e3,8e3],r=t[e<t.length?e:t.length-1];m.wsReconnectAttempts=e+1,m.wsReconnectTimer=setTimeout(function(){m.wsReconnectTimer=null,m.config&&!m.ws&&!document.hidden&&oC("backoff")},r)}}function oC(e){if(!window.WebSocket)return!1;if(m.ws){if(m.ws.readyState===WebSocket.OPEN||m.ws.readyState===WebSocket.CONNECTING)return!0;m.ws.onopen=m.ws.onmessage=m.ws.onclose=m.ws.onerror=null;try{m.ws.close()}catch{}m.ws=null}var t=window.location.protocol==="https:"?"wss:":"ws:",r=t+"//"+window.location.host+"/ws";try{var n=new WebSocket(r);return m.ws=n,m.wsConnected=!1,n.onopen=function(){if(m.ws===n){try{window.__wandWs=n}catch{}m.wsConnected=!0,oc.clear(),Cg({type:"connected"}),m.lastWsMessageAt=Date.now(),m.wsReconnectAttempts=0,NI(),m.lastSeqBySession={},m.chatResyncPendingBySession={},BB&&(j1(),Nu(),Ci({skipSelectedOutputReload:!0})),BB=!0,aCe(),kC(m.selectedId),Qke(),I8e(),Zy("ws-reconnect")}},n.onmessage=function(a){if(m.ws===n){m.lastWsMessageAt=Date.now();try{var o=JSON.parse(a.data);if(o&&o.type==="ping"){if(m.ws&&m.ws.readyState===WebSocket.OPEN)try{m.ws.send(JSON.stringify({type:"pong",t:o.t}))}catch{}return}if(o&&o.type==="pty_error"){Cg(o),Qe("\u7EC8\u7AEF\u64CD\u4F5C\u672A\u786E\u8BA4\u3002\u8BF7\u68C0\u67E5\u8F93\u51FA\u540E\u518D\u91CD\u8BD5\u3002","error"),o.sessionId&&m.ws&&m.ws.readyState===WebSocket.OPEN&&m.ws.send(JSON.stringify({type:"resync",sessionId:o.sessionId}));return}if(o&&o.type==="resync_required"&&o.sessionId){Cg(o),oc.delete(o.sessionId),IB(o.sessionId),m.lastSeqBySession||(m.lastSeqBySession={}),m.lastSeqBySession[o.sessionId]=0;return}if(o&&(o.type==="init"||o.type==="output")&&o.sessionId&&typeof o.seq=="number"){m.lastSeqBySession||(m.lastSeqBySession={});var l=m.lastSeqBySession[o.sessionId]||0;if(o.type==="init"){if(l>0&&o.seq<=l)return;m.lastSeqBySession[o.sessionId]=o.seq}else if(o.seq===l+1)m.lastSeqBySession[o.sessionId]=o.seq;else if(o.seq>l+1&&l>0){oc.delete(o.sessionId),IB(o.sessionId),m.lastSeqBySession[o.sessionId]=0;return}else{if(l>0&&o.seq<=l)return;m.lastSeqBySession[o.sessionId]=o.seq}}o?.sessionId&&(o.type==="init"||Array.isArray(o.data?.messages))&&m.chatResyncPendingBySession&&delete m.chatResyncPendingBySession[o.sessionId],Cg(o),iCe(o),o.type==="init"&&o.sessionId&&cEe(o.sessionId)}catch{}}},n.onclose=function(){m.ws===n&&(m.ws=null,m.wsConnected=!1,oc.clear(),cc(),Cg({type:"disconnected"}),XX(),XG())},n.onerror=function(){m.ws===n&&(_u("websocket_error",new Error("WebSocket transport error")),n.close())},!0}catch(a){return _u("websocket_error",a),XG(),!1}}function iCe(e){switch(e.type){case"output":if(e.sessionId&&typeof e.data?.chunk=="string"&&hke(e.sessionId,e.data.chunk),e.data&&e.sessionId&&Object.prototype.hasOwnProperty.call(e.data,"isResponding")&&HE(e.sessionId,!!e.data.isResponding),e.data&&e.sessionId&&e.data.structuredState&&HE(e.sessionId,e.data.structuredState.inFlight===!0),e.data&&e.sessionId){var t=!!e.data.incremental,r={id:e.sessionId},n=!1;if(!t&&e.data.output!==void 0&&(r.output=e.data.output),Object.prototype.hasOwnProperty.call(e.data,"permissionBlocked")&&(r.permissionBlocked=!!e.data.permissionBlocked),Object.prototype.hasOwnProperty.call(e.data,"queuedMessages")&&(r.queuedMessages=e.data.queuedMessages||[],ui.advance(e.sessionId,"server")),e.data.structuredState&&(r.structuredState=e.data.structuredState),e.data.sessionKind&&(r.sessionKind=e.data.sessionKind),Object.prototype.hasOwnProperty.call(e.data,"title")&&(r.title=e.data.title,n=!0),Object.prototype.hasOwnProperty.call(e.data,"description")&&(r.description=e.data.description,n=!0),Object.prototype.hasOwnProperty.call(e.data,"titleGenerating")&&(r.titleGenerating=!!e.data.titleGenerating,n=!0),Object.prototype.hasOwnProperty.call(e.data,"summary")&&(r.summary=e.data.summary),e.data.messages)r.messages=e.data.messages,typeof e.data.messageOffset=="number"&&(r.messageOffset=e.data.messageOffset),typeof e.data.messageTotal=="number"&&(r.messageTotal=e.data.messageTotal),typeof e.data.leadingBlockOffset=="number"&&(r.leadingBlockOffset=e.data.leadingBlockOffset,r.leadingBlockTotal=e.data.leadingBlockTotal);else if(t&&e.data.lastMessage){var a=m.sessions.find(function(Q){return Q.id===e.sessionId});if(a){var o=Array.isArray(a.messages)?a.messages.slice():[],l=e.data.messageCount,u=typeof a.messageOffset=="number"?a.messageOffset:0,d=u+o.length,p=e.data.lastMessage,h=m.chatResyncPendingBySession?.[e.sessionId];h||!Number.isInteger(l)||!(l===d&&o.length>0||l===d+1)?IB(e.sessionId):(l===d+1?o.push(p):o[o.length-1]=pEe(o[o.length-1],p,o.length===1&&a.leadingBlockOffset||0,a.leadingBlockTotal||0,"latest"),r.messages=o,r.messageOffset=u,r.messageTotal=l,r.leadingBlockOffset=a.leadingBlockOffset||0,r.leadingBlockTotal=a.leadingBlockTotal||0,o.length===1&&(r.leadingBlockOffset=0,r.leadingBlockTotal=Array.isArray(p.content)?p.content.length:0))}}var v=t&&e.data.chunk&&!e.data.lastMessage&&!r.messages&&r.output===void 0&&!e.data.structuredState&&!e.data.sessionKind&&!n;if(v){if(e.data.permissionBlocked!==void 0){var g=m.sessions.find(function(Q){return Q.id===e.sessionId});g&&!!g.permissionBlocked!=!!e.data.permissionBlocked&&(Kt(r,"latest"),e.sessionId===m.selectedId&&Xd())}}else if((r.output!==void 0||r.messages||t||e.data.permissionBlocked!==void 0||r.title||r.description||r.titleGenerating!==void 0)&&(Kt(r,"latest",e),n&&Sg(),e.sessionId===m.selectedId)){var b=m.sessions.find(function(Q){return Q.id===e.sessionId})||r;qE(e.sessionId),Xd(),b.sessionKind==="structured"||e.data.sessionKind==="structured"?ba():cc()}}e.sessionId===m.selectedId&&m.terminal&&e.data&&KG(e.sessionId)&&(e.data.chunk&&cK(e.sessionId)?(Ak(m.terminal,String(e.data.chunk)),m.terminalOutput=Ly((m.terminalOutput||"")+String(e.data.chunk)),VG()):!e.data.incremental&&Object.prototype.hasOwnProperty.call(e.data,"output")&&tw(e.sessionId,e.data.output||"",{mode:"append"})),e.sessionId===m.selectedId&&m.terminal&&e.data&&!$g(e.sessionId)?e.data.chunk&&cK(e.sessionId)?(m.terminalLiveStreamSessions[e.sessionId]=!0,Ak(m.terminal,e.data.chunk,e.ptyBytes,e.sessionId),m.terminalSessionId=e.sessionId,e.data.output?m.terminalOutput=Ly(String(e.data.output)):m.terminalOutput=Ly((m.terminalOutput||"")+String(e.data.chunk)),VG()):!e.data.incremental&&Object.prototype.hasOwnProperty.call(e.data,"output")&&tw(e.sessionId,e.data.output||"",{mode:"append"}):e.data&&$g(e.sessionId)?e.data.chunk?Yke(e.sessionId,String(e.data.chunk),e.ptyBytes):!e.data.incremental&&Object.prototype.hasOwnProperty.call(e.data,"output")?(sk(e.sessionId,String(e.data.output||"")),e.ptyBytes&&m.ws.send(JSON.stringify({type:"pty_ack",sessionId:e.sessionId,bytes:e.ptyBytes}))):e.ptyBytes&&m.ws.send(JSON.stringify({type:"pty_ack",sessionId:e.sessionId,bytes:e.ptyBytes})):e.ptyBytes&&m.ws&&m.ws.readyState===WebSocket.OPEN&&m.ws.send(JSON.stringify({type:"pty_ack",sessionId:e.sessionId,bytes:e.ptyBytes}));break;case"started":e.data&&e.data.id?Kt(e.data):Kt({id:e.sessionId,status:"running"}),Sg(),Ui();break;case"ended":{dQ();var x=e.data&&e.data.status?e.data.status:"exited",y=e.data&&Object.prototype.hasOwnProperty.call(e.data,"permissionBlocked")?!!e.data.permissionBlocked:!1,E={id:e.sessionId,status:x,permissionBlocked:y};for(let Q of["completionRevision","viewedCompletionRevision"])typeof e.data?.[Q]=="number"&&(E[Q]=e.data[Q]);e.data&&e.data.messages&&(E.messages=e.data.messages,typeof e.data.messageOffset=="number"&&(E.messageOffset=e.data.messageOffset),typeof e.data.leadingBlockOffset=="number"&&(E.leadingBlockOffset=e.data.leadingBlockOffset,E.leadingBlockTotal=e.data.leadingBlockTotal),typeof e.data.messageTotal=="number"&&(E.messageTotal=e.data.messageTotal)),e.data&&e.data.structuredState&&(E.structuredState=e.data.structuredState),e.data&&e.data.queuedMessages&&(E.queuedMessages=e.data.queuedMessages),Kt(E,"latest",e),typeof e.data?.completionRevision=="number"&&Ui(),m.currentView==="terminal"&&Wk(m.sessions.find(Q=>Q.id===e.sessionId)),e.sessionId===m.selectedId&&(qE(e.sessionId),cc(!0));var F=m.sessions.find(function(Q){return Q.id===e.sessionId}),S=e.data&&e.data.exitCode,D=S!=null&&S!==0,$=F&&F.summary||"",C=F?Hke(F):"",B=D?"\u4EFB\u52A1\u5F02\u5E38\u7ED3\u675F":"\u4EFB\u52A1\u5DF2\u5B8C\u6210",M="";$?(M=$,C&&!D&&(M+=`
283
+ `+C)):M=F&&F.command||e.sessionId,UCe(e.sessionId,B,M),sQ(e.sessionId),PB(),(e.sessionId!==m.selectedId||document.hidden)&&jB({title:B,body:M,type:D?"warning":"success",duration:6e3,actionLabel:"\u67E5\u770B",action:function(){An(e.sessionId)}}),m.messageQueue=[],m.pendingMessages=[];var I=m.sessions.find(function(Q){return Q.id===e.sessionId}),j=e.sessionId===m.selectedId?m.sessions.find(function(Q){return Q.id===m.selectedId}):null,N=!!(I&&I.sessionKind==="structured"||j&&j.sessionKind==="structured");N&&e.sessionId===m.selectedId?(lK(),qk(e.sessionId)):N||(m.structuredInputQueue=[],qk(m.selectedId),Jd()),e.sessionId===m.selectedId&&(N||gm(!1),m.currentTask=null,Xd()),e.sessionId===m.selectedId&&Sw(),Sg(),uC(),e.sessionId===m.selectedId&&(N||Gl(e.sessionId));break}case"init":if(e.sessionId===m.selectedId&&e.data){m.chatRenderTimer&&(clearTimeout(m.chatRenderTimer),m.chatRenderTimer=null),Kt(e.data,"latest",e),qE(e.sessionId),ba(!0),Xd(),Hl();var R=e.data.output||"";KG(e.sessionId)&&(Bk(e.sessionId,e.data.terminalState,R)||QG(R,e.sessionId,"replace")),$g(e.sessionId)?Ik(e.sessionId,e.data.terminalState,R)||sk(e.sessionId,R):Bk(e.sessionId,e.data.terminalState,R)||(QG(R,e.sessionId,"replace"),Zy("init"))}else if(e.data&&$g(e.sessionId)){Kt(e.data,"latest",e);var L=e.data.output||"";Ik(e.sessionId,e.data.terminalState,L)||sk(e.sessionId,L)}e.data&&e.data.structuredState&&e.data.structuredState.inFlight===!0&&Rk(e.sessionId);break;case"usage":break;case"task":e.sessionId===m.selectedId&&(m.currentTask=e.data||null,Xd()),qCe(e.sessionId,e.data||null),RB(e.sessionId),Sg();break;case"status":if(e.sessionId&&e.data){var q={id:e.sessionId};for(let X of["completionRevision","viewedCompletionRevision"])typeof e.data[X]=="number"&&(q[X]=e.data[X]);if(Object.prototype.hasOwnProperty.call(e.data,"status")&&(q.status=e.data.status),Object.prototype.hasOwnProperty.call(e.data,"exitCode")&&(q.exitCode=e.data.exitCode),Object.prototype.hasOwnProperty.call(e.data,"providerCliActive")&&(q.providerCliActive=!!e.data.providerCliActive),Object.prototype.hasOwnProperty.call(e.data,"providerCliExitCode")&&(q.providerCliExitCode=e.data.providerCliExitCode),Object.prototype.hasOwnProperty.call(e.data,"ptyBusy")&&(q.ptyBusy=!!e.data.ptyBusy),Object.prototype.hasOwnProperty.call(e.data,"ptyCommandRunning")&&(q.ptyCommandRunning=e.data.ptyCommandRunning===!0,Ui()),e.data.structuredState)q.structuredState=e.data.structuredState;else if(Object.prototype.hasOwnProperty.call(e.data,"status")){var a=m.sessions.find(function(Z){return Z.id===e.sessionId});a&&a.sessionKind==="structured"&&(q.structuredState=Object.assign({},a.structuredState||{},{inFlight:e.data.status==="running"}))}if(Object.prototype.hasOwnProperty.call(e.data,"queuedMessages")&&(q.queuedMessages=e.data.queuedMessages||[],ui.advance(e.sessionId,"server")),Object.prototype.hasOwnProperty.call(e.data,"permissionBlocked")&&(q.permissionBlocked=!!e.data.permissionBlocked),e.data.pendingEscalation?q.pendingEscalation=e.data.pendingEscalation:e.data.permissionRequest&&(q.pendingEscalation={scope:e.data.permissionRequest.scope,target:e.data.permissionRequest.target,reason:e.data.permissionRequest.prompt}),e.data.pendingEscalation||e.data.permissionRequest){var W=m.sessions.find(function(X){return X.id===e.sessionId}),U=W&&(W.summary||W.command)||e.sessionId,P=e.data.pendingEscalation?e.data.pendingEscalation.reason||"\u9700\u8981\u6743\u9650\u5BA1\u6279":e.data.permissionRequest.prompt||"\u9700\u8981\u6743\u9650\u5BA1\u6279",H=e.data.pendingEscalation?e.data.pendingEscalation.target:e.data.permissionRequest.target,V=U;H?V+=`
284
+ `+P+" \xB7 "+H:V+=`
285
+ `+P,WCe(e.sessionId,V),e.sessionId!==m.selectedId&&jB({title:"\u9700\u8981\u4F60\u7684\u6388\u6743",body:V,type:"warning",duration:0,actionLabel:"\u53BB\u5904\u7406",action:function(){An(e.sessionId)}})}e.data.permissionBlocked===!1&&(q.pendingEscalation=null),e.data.approvalStats&&(q.approvalStats=e.data.approvalStats);var n=!1;Object.prototype.hasOwnProperty.call(e.data,"title")&&(q.title=e.data.title,n=!0),Object.prototype.hasOwnProperty.call(e.data,"description")&&(q.description=e.data.description,n=!0),Object.prototype.hasOwnProperty.call(e.data,"summary")&&(q.summary=e.data.summary),Object.prototype.hasOwnProperty.call(e.data,"titleGenerating")&&(q.titleGenerating=!!e.data.titleGenerating,n=!0),q.structuredState&&HE(e.sessionId,q.structuredState.inFlight===!0),q.structuredState&&q.structuredState.inFlight===!0&&Rk(e.sessionId),Object.prototype.hasOwnProperty.call(e.data,"ptyBusy")&&HE(e.sessionId,!!e.data.ptyBusy),Array.isArray(e.data.messages)&&(q.messages=e.data.messages,["messageOffset","messageTotal","leadingBlockOffset","leadingBlockTotal"].forEach(function(X){typeof e.data[X]=="number"&&(q[X]=e.data[X])})),Kt(q,"latest",e),typeof e.data.completionRevision=="number"&&(Ui(),m.currentView==="terminal"&&Wk(m.sessions.find(X=>X.id===e.sessionId))),n&&Sg(),RB(e.sessionId),PB(),e.sessionId===m.selectedId&&(Xd(),e.data.approvalStats&&Hl(),(q.structuredState||q.messages||Object.prototype.hasOwnProperty.call(q,"ptyBusy")||Object.prototype.hasOwnProperty.call(q,"ptyCommandRunning"))&&(q.structuredState&&!q.structuredState.inFlight&&lK(),qE(e.sessionId),cc()))}break;case"notification":e.data&&(e.data.kind==="models"?wY():e.data.kind==="update"?oQ(e.data.current||"-",e.data.latest||"-"):e.data.kind==="auto-update-start"?YCe(e.data.current||"-",e.data.latest||"-",e.data.previousInstanceId||null):e.data.kind==="auto-update-restart"?aw(e.data.previousInstanceId||null,e.data.latest||null):e.data.kind==="restart"?aw():e.data.kind==="conversation-session-preview"&&typeof e.data.sessionId=="string"&&typeof e.data.conversationId=="string"&&typeof e.data.preview?.text=="string"?t$(e.data):e.data.kind==="conversations-changed"?_6({runId:"",taskId:""}):e.data.kind==="ai-team-run"&&typeof e.data.runId=="string"?_6({runId:e.data.runId,taskId:String(e.data.taskId||"")}):e.data.kind==="ai-team-definition"&&typeof e.data.teamId=="string"?B1(e.data.teamId):e.data.kind==="silicon-employee-definition"&&typeof e.data.employeeId=="string"?Nu(e.data.employeeId):e.data.kind==="task-retention"?(Ui(),Ci({skipSelectedOutputReload:!0})):e.data.kind==="ai-team-step-live"&&typeof e.data.runId=="string"&&aA({runId:e.data.runId,taskId:String(e.data.taskId||""),steps:Array.isArray(e.data.steps)?e.data.steps:[]}));break}}function Xd(){Ua("task:update"),Hl()}function Hl(){var e=m.sessions.find(function(t){return t.id===m.selectedId});Lke({resolve:function(){return e?{sessionId:e.id,autoApprovePending:uk.has(e.id),permissionPending:lk.has(e.id),permission:qX(e),autoApproveHidden:K4e(e),autoApproveEnabled:!!e.autoApprovePermissions,approvalStats:e.approvalStats||null}:null},onToggleAutoApprove:function(t){sCe(t)},onPermissionAction:function(t,r,n){oCe(t,r,n)}})}var lk=new Set;async function oCe(e,t,r){if(e!==m.selectedId||lk.has(e))return;let n=m.sessions.find(function(u){return u.id===e}),a=qX(n);if(!a||a.autoApproving||a.requestId!==t){Hl();return}if(r==="approve-turn"&&!t)return;let o="/api/sessions/"+encodeURIComponent(e),l=r==="approve-turn"?o+"/escalations/"+encodeURIComponent(t)+"/resolve":o+(r==="approve"?"/approve-permission":"/deny-permission");lk.add(e),Hl();try{let u=await Nr(l,{method:"POST",credentials:"same-origin",...r==="approve-turn"?{headers:{"content-type":"application/json"},body:JSON.stringify({resolution:"approve_turn"})}:{}}),d=await It(u);if(d.id!==e)throw new Error("\u6388\u6743\u54CD\u5E94\u4E0E\u5F53\u524D\u64CD\u4F5C\u7684\u4F1A\u8BDD\u4E0D\u4E00\u81F4\u3002");Kt(d),Xd()}catch(u){Qe(qa(u,"\u65E0\u6CD5\u5B8C\u6210\u6388\u6743\u64CD\u4F5C\u3002"),"error")}finally{lk.delete(e),Hl()}}var uk=new Set;async function sCe(e){if(!e||e!==m.selectedId||uk.has(e))return;let t=m.sessions.find(function(r){return r.id===e});if(t){if(t.provider==="codex"){Qe("Codex \u4F1A\u8BDD\u56FA\u5B9A\u4EE5 full-access PTY \u542F\u52A8\uFF0C\u4E0D\u652F\u6301\u5207\u6362\u81EA\u52A8\u6279\u51C6\u3002","info");return}uk.add(e),Hl();try{let r=await Nr("/api/sessions/"+encodeURIComponent(e)+"/toggle-auto-approve",{method:"POST",credentials:"same-origin"}),n=await It(r);if(n.id!==e)throw new Error("\u81EA\u52A8\u6279\u51C6\u54CD\u5E94\u4E0E\u5F53\u524D\u64CD\u4F5C\u7684\u4F1A\u8BDD\u4E0D\u4E00\u81F4\u3002");Kt(n),m.selectedId===e&&Qe(n.autoApprovePermissions?"\u81EA\u52A8\u6279\u51C6\u5DF2\u5F00\u542F":"\u81EA\u52A8\u6279\u51C6\u5DF2\u5173\u95ED","info")}catch(r){Qe(qa(r,"\u65E0\u6CD5\u5207\u6362\u81EA\u52A8\u6279\u51C6\u3002"),"error")}finally{uk.delete(e),Hl()}}}function lCe(){Hl()}function QG(e,t,r){return m.terminal?tw(t||m.selectedId,e,{mode:r||"append"}):!1}function YX(){m.pollTimer&&(clearInterval(m.pollTimer),m.pollTimer=null),oSe(),tCe()}function uCe(e,t){return e.target===t.target&&e.message===t.message}var cCe=class extends vl{constructor(){super(uCe)}},Ng=new cCe;function Mk(e){m.actionError=e,JX()}function JX(){hw({selector:"[data-composer-action-error-host]",store:Ng,flush:!0,build(e){let t=m.actionError;return t?{key:"action-error",target:e,message:t}:null}})}var dCe=A(_(),1),MB=A(er(),1),pCe=A(Xa(),1),TB=null,ic=null;function RI(e){if(ic)throw new Error("Cannot replace browser shell commands after mount");TB=e}function sC(){return ic!==null}function fCe(e,t){for(;e.firstChild;)t.appendChild(e.firstChild)}function mCe(e){let t=document.createElement("template");t.innerHTML=e;let r=[{name:"BrowserTerminalSlot",selector:"#output",key:"terminal"},{name:"BrowserChatSlot",selector:"#chat-output",key:"chat"},{name:"BrowserComposerSlot",selector:".input-panel",key:"composer"},{name:"BrowserFileExplorerSlot",selector:"#file-explorer",key:"fileExplorer"},{name:"BrowserCrossSessionQueueSlot",selector:"#cross-session-queue-host",key:"crossSessionQueue"}],n={},a=r.map(({name:o,selector:l,key:u})=>{let d=t.content.querySelector(l);if(!d)throw new Error(`${o} seed is missing ${l}`);let p=new b2e(o,{mount(h){fCe(d,h)}});return n[u]=h=>{h?p.mount(h):p.unmount()},p});return{refs:n,hosts:a}}function hCe(e,t){if(!TB)throw new Error("Browser shell commands were not configured");if(ic){if(ic.app!==e)throw new Error("React shell cannot move to a different #app root");return(0,MB.flushSync)(()=>ic?.store.publish({sync:!0,reason:"legacy:render"})),"updated"}let r=mCe(t()),n=iEe(TB,{batchMs:0});e.replaceChildren(),e.dataset.reactShell="enabled";let a=(0,pCe.createRoot)(e);ic={app:e,root:a,store:n,hosts:r.hosts};try{(0,MB.flushSync)(()=>a.render(dCe.createElement(tEe,{store:n,legacyRefs:r.refs})))}catch(o){ic=null,n.dispose();for(let l of r.hosts)l.dispose();throw delete e.dataset.reactShell,o}return"mounted"}function YG(){let e=ic;if(e){ic=null,(0,MB.flushSync)(()=>e.root.unmount()),e.store.dispose();for(let t of e.hosts)t.dispose();delete e.app.dataset.reactShell}}function Em(e){var t=e||{};m.chatRenderCache?.reset(),m.chatRenderEpoch=(m.chatRenderEpoch||0)+1,m.chatRenderPendingToken=null,m.lastRenderedMsgCount=0,m.lastRenderedEmpty=null,m.renderPending=!1,t.preserveStickState||(m.chatRenderedCount=m.chatPageSize,m.chatRenderWindowMessageCount=0,fm(),m.askUserSelections={}),m.chatScrollElement&&(m.chatScrollHandler&&m.chatScrollElement.removeEventListener("scroll",m.chatScrollHandler),m.chatScrollWheelHandler&&m.chatScrollElement.removeEventListener("wheel",m.chatScrollWheelHandler),m.chatScrollTouchStartHandler&&m.chatScrollElement.removeEventListener("touchstart",m.chatScrollTouchStartHandler),m.chatScrollTouchMoveHandler&&m.chatScrollElement.removeEventListener("touchmove",m.chatScrollTouchMoveHandler)),m.chatScrollElement=null,m.chatScrollHandler=null,m.chatScrollWheelHandler=null,m.chatScrollTouchStartHandler=null,m.chatScrollTouchMoveHandler=null,m.chatIsProgrammaticScroll=!1,t.preserveStickState||(m.chatStickToBottom=!0,m.chatUnreadCount=0,m.chatUnreadStartIndex=-1,m.chatInitialRenderDone=!1)}function ps(){return m.workingDir||o4e()}window.addEventListener("online",function(){m.isOnline=!0,Tk()});window.addEventListener("offline",function(){m.isOnline=!1,Tk()});function Tk(){var e=document.getElementById("offline-banner");if(!m.isOnline&&!e){var t=document.createElement("div");t.id="offline-banner",t.className="offline-banner",t.style.cssText="position:fixed;top:var(--wand-safe-top);left:50%;transform:translateX(-50%);z-index:20030;width:min(440px,calc(100vw - 32px))",document.body.appendChild(t),jEe(t)}else m.isOnline&&e&&($I(e),e.remove())}function gCe(){if(!Id()){var e=document.getElementById("app");e&&DI(e)}}function vCe(){var e=document.getElementById("app");e&&DI(e,"\u754C\u9762\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u91CD\u8BD5")}function vy(e,t){if(m.config&&!document.hidden){var r=t&&t.immediate===!0,n=Date.now();!r&&n-m.lastForegroundSyncAt<1500||(m.lastForegroundSyncAt=n,m.foregroundSyncTimer&&(clearTimeout(m.foregroundSyncTimer),m.foregroundSyncTimer=null),bCe(e,r))}}function bCe(e,t){return!m.config||document.hidden?Promise.resolve():(t||QX(),t?PI("resume-force"):(!m.ws||m.ws.readyState!==WebSocket.OPEN&&m.ws.readyState!==WebSocket.CONNECTING)&&oC(),m.selectedId&&vw(m.selectedId,{force:!0}),Ci({skipSelectedOutputReload:!0}).catch(function(r){console.error("[wand] foreground sync failed:",e,r)}))}function yCe(){window.__wandForegroundSyncBound||(window.__wandForegroundSyncBound=!0,document.addEventListener("visibilitychange",function(){document.hidden?NI():(vy("visibility"),Zy("visibility"))}),window.addEventListener("focus",function(){vy("focus")}),window.addEventListener("pageshow",function(){vy("pageshow")}),window.addEventListener("resume",function(){vy("resume")}),window.addEventListener("wand-android-resume",function(){vy("android-resume",{immediate:!0}),Zy("android-resume")}),window.addEventListener("wand-ime-state",function(e){var t=e&&e.detail&&e.detail.state;if(t==="shown"||t==="hidden")try{ro("native-ime-"+t,{forceReplay:!0}),ql("native-ime")}catch{}}),window.addEventListener("wand-android-network",function(e){var t=e&&e.detail&&e.detail.state;if(t==="lost"){m.isOnline=!1;try{Tk()}catch{}return}if(t==="available"||t==="changed"||t==="validated"){m.isOnline=!0;try{Tk()}catch{}PI("android-network-"+t)}}))}function wCe(){if(Id())return;let e=CEe();fetch("/api/session-check",{credentials:"same-origin"}).then(function(t){return t.ok?t.json():{authed:!1}}).then(function(t){if(!t||!t.authed)return m.loginChecked=!0,um(),null;let r=r1();return a2e(),r.catch(function(n){if(bk(),j1(),n&&typeof n.status=="number"&&n.status>0)return m.loginChecked=!0,um(),null;throw n})}).then(function(t){t&&(m.config=t,Cw(t),m.loginChecked=!0,requestAnimationFrame(function(){if(m.config===t){try{um({skipShellChrome:!0})}catch{}KX(),Ci({reuseSnapshot:!0,skipSelectedOutputReload:Ou()}).then(function(){if(m.config!==t||!e())return;let r=hn();return LEe(void 0,()=>m.config===t&&e()&&hn()===r)}),wY(),zCe(),t.updateAvailable&&t.latestVersion&&oQ(t.currentVersion||"-",t.latestVersion),aQ&&aFe(),NB&&iFe()}}))}).catch(function(){if(bk(),m.loginChecked=!0,!navigator.onLine){var t=document.getElementById("app");t&&DI(t,"\u65E0\u6CD5\u8FDE\u63A5\u5230\u670D\u52A1\u5668","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5\u6216\u786E\u8BA4 Wand \u670D\u52A1\u6B63\u5728\u8FD0\u884C\u3002"),window.addEventListener("online",function(){location.reload()},{once:!0});return}um()})}document.addEventListener("click",function(e){if(!Ao()&&!m.sidebarPinned&&!m.sidebarCollapsed&&m.sessionsDrawerOpen){var t=e.target;!t||!(t instanceof Element)||t.closest("#sessions-drawer")||t.closest("#sessions-toggle-button")||t.closest(".floating-sidebar-toggle")||t.closest(".sidebar-tile-bubble")||t.closest(".modal-backdrop, .modal-overlay, .modal-container, [role='dialog'], [role='menu'], .topbar-more-menu, .sidebar-header-overflow, .path-suggestions")||Z4e()}},!0);gCe();wCe();function um(e){if(Id())return;let t=document.getElementById("app");t&&$I(t);var r=e&&e.skipShellChrome,n=document.getElementById("app");if(n){var a=m.config!==null,o=sC(),l=!a||!o&&!!document.getElementById("output");l&&pw(),!a&&o&&YG(),document.documentElement.classList.add("no-transition"),m.sidebarPinned&&!m.sidebarCollapsed&&!Ao()&&(m.sessionsDrawerOpen=!0,Qr("wand-sidebar-open",!0));var u,d=!1;if(a){try{u=hCe(n,ECe)}catch(p){console.error("[wand] React shell mount failed",p),YG(),document.documentElement.classList.remove("no-transition"),vCe();return}d=u==="mounted"}else n.innerHTML=xCe(),d=!0;d&&(Em(),Y8e()),ym(),mY(),BM(Rg()),Hl(),JX(),MM(),r||Sw(),document.body.offsetHeight,requestAnimationFrame(function(){a&&ya(document.getElementById("input-box")),document.documentElement.classList.remove("no-transition")}),a&&m.selectedId&&m.gitStatusSessionId!==m.selectedId&&vw(m.selectedId),_Y()}}function xCe(){return'<div data-login-controls style="height:100%" data-checking="'+!m.loginChecked+'" data-switch-server="'+lY()+'"></div>'}function ECe(){var e=m.sessions.find(function(r){return r.id===m.selectedId}),t=At.read(m.selectedId).text;return'<div class="file-explorer" id="file-explorer"></div><div id="output" class="terminal-container'+(m.selectedId?"":" hidden")+' active"><button data-antd-control id="terminal-jump-bottom" class="terminal-jump-bottom'+(m.showTerminalJumpToBottom?" visible":"")+'" type="button" title="\u56DE\u5230\u5E95\u90E8" aria-label="\u56DE\u5230\u5E95\u90E8"><svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3.5v9M3.5 8l4.5 4.5L12.5 8"/></svg></button></div><div id="chat-output" class="chat-container hidden"><div id="chat-fold-bar" class="chat-fold-bar hidden" aria-live="polite"></div><button data-antd-control id="chat-unread-bubble" class="chat-unread-bubble" type="button" title="\u56DE\u5230\u6700\u65B0\u6D88\u606F" aria-label="\u56DE\u5230\u6700\u65B0\u6D88\u606F"><span class="chat-unread-bubble-icon"><svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3.5v9M3.5 8l4.5 4.5L12.5 8"/></svg></span><span class="chat-unread-bubble-count" aria-hidden="true"></span></button></div><div id="chat-running-host"></div><div id="cross-session-queue-host"></div><div class="input-panel'+(m.selectedId?"":" hidden")+'"><div class="input-composer-row" data-pi-composer=""><span data-pi-settings-host=""></span><div class="input-composer'+(String(t||"").trim()?" has-text":"")+(m.terminalInteractive?" is-terminal-interactive":"")+'" role="group" aria-label="\u6D88\u606F\u7F16\u8F91\u5668"><div class="wand-composer-context composer-session-context"><span data-composer-avatar-host></span></div><div class="composer-top-row"><div id="todo-progress" class="todo-progress hidden"></div><div id="composer-agent-capsule-host" class="composer-capsule-host"></div><div id="queue-bar-host" class="queue-bar-host" hidden></div></div><div class="composer-surface"><div class="composer-main-row"><div id="terminal-shortcuts" class="terminal-shortcuts" hidden></div><div class="composer-input-wrap"><span class="composer-attachments-host" data-composer-attachments-host="main"></span><div data-composer-sender><textarea id="input-box" class="input-textarea" aria-label="\u6D88\u606F\u8F93\u5165" placeholder="'+dY(e,m.terminalInteractive)+'" rows="1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" enterkeyhint="send">'+mc(t)+'</textarea></div></div><div class="composer-actions-left" role="group" aria-label="\u6DFB\u52A0\u5185\u5BB9\u4E0E\u6743\u9650"><button id="attach-btn" data-antd-control class="composer-attach-trigger" type="button" title="\u9644\u4EF6\u4E0E\u6267\u884C\u9009\u9879\uFF08\u601D\u8003\u6DF1\u5EA6\u3001\u6A21\u578B\u548C\u6743\u9650\uFF09" aria-label="\u66F4\u591A\u64CD\u4F5C" aria-haspopup="dialog" aria-controls="composer-plus-popover" aria-expanded="false">'+ek("plus",{size:18,strokeWidth:2.2})+'</button><button id="composer-attach-file" data-composer-control data-antd-control class="composer-file-trigger" type="button" title="\u6DFB\u52A0\u9644\u4EF6" aria-label="\u6DFB\u52A0\u9644\u4EF6">'+ek("paperclip",{size:18})+'</button><input type="file" id="file-upload-input" multiple tabindex="-1" style="position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;clip:rect(0,0,0,0);pointer-events:none"><span class="composer-pi-settings-toggle-host" data-pi-settings-toggle-host=""></span><div class="composer-status-row" id="composer-status-row"><span class="composer-config-host" data-composer-config-host="mode"></span><span class="composer-badge-host" data-composer-badge-host="auto-approve"></span><span class="composer-badge-host hidden" data-composer-badge-host="permissions"></span><span class="composer-badge-host" data-composer-badge-host="approval-stats"></span><span class="composer-status-line" id="composer-status-line" role="status" aria-live="polite">'+mc(cY)+'</span></div></div><div class="composer-actions-right" role="group" aria-label="\u6A21\u578B\u4E0E\u53D1\u9001"><span data-composer-employee-host></span><div class="composer-inline-config"><span class="composer-config-host" data-composer-config-host="runtime"></span></div><span class="composer-rail-host" data-pty-extra-keys-host></span><span class="composer-rail-host" data-composer-rail-host="pty"></span><button id="send-input-button" data-antd-control="primary" type="button" data-phase="idle" title="\u53D1\u9001" aria-label="\u53D1\u9001\u6D88\u606F"></button></div></div></div></div></div><div class="composer-plus-popover hidden" id="composer-plus-popover" data-wand-popup-owner="composer-plus-popover" role="dialog" aria-modal="false" aria-label="\u66F4\u591A\u64CD\u4F5C" aria-hidden="true"><span class="plus-popover-items-host" data-composer-popover-host="items"></span><div class="composer-editor-menu" data-composer-editor-control></div><button data-antd-control class="prompt-optimize-btn" id="prompt-optimize-btn" type="button" title="\u4F18\u5316\u63D0\u793A\u8BCD" aria-label="\u4F18\u5316\u63D0\u793A\u8BCD">'+ek("sparkle",{size:15,strokeWidth:1.9,cls:"prompt-optimize-icon"})+'<span class="prompt-optimize-label">\u4F18\u5316\u63D0\u793A\u8BCD</span></button><div class="plus-popover-sep" aria-hidden="true"></div><div class="plus-popover-trio-wrap"><p class="composer-settings-scope">\u6267\u884C\u9009\u9879 \xB7 \u5E94\u7528\u4E8E\u5F53\u524D\u4F1A\u8BDD\uFF1B\u6A21\u578B\u548C\u601D\u8003\u6DF1\u5EA6\u540C\u65F6\u8BB0\u4E3A\u6B64\u8BBE\u5907\u7684\u65B0\u4F1A\u8BDD\u504F\u597D\u3002\u5DF2\u542F\u52A8\u7684\u7EC8\u7AEF\u53C2\u6570\u4FDD\u6301\u4E0D\u53D8\u3002</p><span class="composer-config-host" data-composer-config-host="all"></span></div></div><span class="composer-action-error-host" data-composer-action-error-host="main"></span></div>'}var kCe=A(Xa(),1),V9=A(xe(),1),JG=Promise.resolve(),_k=null;function CCe(e){let t=JG.then(()=>new Promise((r,n)=>{b0();let a=document.createElement("div");a.dataset.wandOwnedDialogRoot="",document.body.appendChild(a);let o=document.createElement("div");a.appendChild(o);let l=Ob(),u=l??document.createElement("div");l||(u.className="wand-ui-portals",u.style.zIndex=String(pd.token?.zIndexPopupBase??20010),a.appendChild(u));let d=!1,p=(0,kCe.createRoot)(o,{onUncaughtError:v=>h(void 0,v)}),h=(v,g)=>{d||(d=!0,_k=null,queueMicrotask(()=>{p.unmount(),a.remove(),g?n(g):r(v)}))};_k=()=>{e.dismissable!==!1&&h({dismissed:!0})},p.render((0,V9.jsx)(dd,{container:u,children:(0,V9.jsx)(Xn,{children:(0,V9.jsx)(Cf,{open:!0,title:e.title,description:e.description,tone:e.tone,icon:e.icon,actions:e.actions,input:e.input,dismissable:e.dismissable,onAction:(v,g)=>h({dismissed:!1,action:v,inputValue:g}),onDismiss:()=>h({dismissed:!0})})})}))}));return JG=t.then(()=>{},()=>{}),t}function SCe(){return _k?(_k(),!0):!1}var mm=0,_B=null,Wy=!1;function ZX(){let e=window.__wandReactUi;return!e||typeof e.dialog!="function"||typeof e.toast!="function"?null:e}function FCe(e){switch(e){case"warning":case"danger":case"success":case"question":return e;case"error":return"danger";default:return"info"}}function $Ce(e){switch(e){case"success":case"warning":case"error":return e;case"danger":return"error";default:return"info"}}function ZG(e){switch(e){case"primary":case"outline":case"ghost":case"danger":return e;default:return"secondary"}}function DCe(e){return Array.isArray(e.buttons)&&e.buttons.length>0?e.buttons:[{label:"\u597D",value:!0,kind:"primary",autofocus:!0}]}function ACe(e){return e.cancelValue!==void 0?e.cancelValue:e.input?null:!1}function BCe(){if(typeof document>"u")return null;let e=document.activeElement;return e&&typeof e.focus=="function"?e:null}function ICe(){Wy||(Wy=!0,(typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):e=>setTimeout(()=>e(Date.now()),0))(()=>{if(Wy=!1,mm>0)return;let e=_B;if(_B=null,!(!e||!e.isConnected||typeof document>"u"||!document.contains(e)))try{e.focus()}catch{}}))}function MCe(){mm=Math.max(0,mm-1),mm===0&&ICe()}function TCe(e){let t=ZX();return t?eQ(e,t):null}function eK(e){return eQ(e,{dialog:CCe})}function eQ(e,t){let r=mm===0&&!Wy?BCe():null,n=DCe(e),a=FCe(e.type),o=!!e.input,l={title:e.title?String(e.title):a==="danger"?"\u786E\u8BA4\u64CD\u4F5C":"\u63D0\u793A",description:e.message?String(e.message):void 0,tone:a,icon:e.icon==null?void 0:String(e.icon),actions:n.map(d=>({label:d.label==null?"":String(d.label),value:{button:d},kind:ZG(d.kind),autoFocus:d.autofocus===!0||d.autoFocus===!0})),input:o?{value:e.inputValue==null?"":String(e.inputValue),placeholder:e.inputPlaceholder==null?void 0:String(e.inputPlaceholder),label:e.inputLabel==null?e.title==null?"\u8F93\u5165\u5185\u5BB9":String(e.title):String(e.inputLabel)}:void 0,dismissable:e.dismissable!==!1},u;try{u=Promise.resolve(t.dialog(l))}catch{return Ns.cancelDialogRequest(l),null}return mm===0&&!Wy&&(_B=r),mm+=1,u.then(d=>{if(d.dismissed===!0)return ACe(e);let p=d.action.button;return o&&ZG(p.kind)==="primary"?d.inputValue??"":p.value}).catch(d=>{throw Ns.cancelDialogRequest(l),d}).finally(MCe)}function _Ce(e,t,r){let n=ZX();if(!n)return!1;let a={tone:$Ce(t),duration:r};try{return n.toast(e,a),!0}catch{return!1}}function Uy(e,t){if(e){e.textContent=t,e.classList.remove("hidden");for(var r=e.previousElementSibling;r;){if(r.tagName==="INPUT"){r.setAttribute("data-error","true");break}r=r.previousElementSibling}}}function tQ(e){if(e){e.textContent="",e.classList.add("hidden");for(var t=e.previousElementSibling;t;){if(t.tagName==="INPUT"){t.setAttribute("data-error","false");break}t=t.previousElementSibling}}}function Qe(e,t){var r=t==="error"||t==="danger",n=r?4e3:2200;_Ce(e,t,n)||jB({title:e,type:r?"warning":t==="success"?"success":"info",duration:n})}function km(e){e=e||{};var t=TCe(e);return t?t.catch(function(){return eK(e)}):eK(e)}function jCe(e,t){return t=t||{},km({title:t.title||"\u63D0\u793A",message:typeof e=="string"?e:String(e??""),type:t.type||"info",dismissable:t.dismissable,buttons:[{label:t.okLabel||"\u597D",value:void 0,kind:"primary",autofocus:!0}]})}function OI(e,t){t=t||{};var r=!!t.danger||t.type==="danger";return km({title:t.title||(r?"\u786E\u8BA4\u64CD\u4F5C":"\u8BF7\u786E\u8BA4"),message:typeof e=="string"?e:String(e??""),type:t.type||(r?"danger":"question"),cancelValue:!1,dismissable:t.dismissable,buttons:[{label:t.cancelLabel||"\u53D6\u6D88",value:!1,kind:"secondary"},{label:t.okLabel||(r?"\u5220\u9664":"\u786E\u5B9A"),value:!0,kind:r?"danger":"primary",autofocus:!r}]}).then(function(n){return n===!0})}function NCe(e,t,r){return r=r||{},km({title:r.title||"\u8BF7\u8F93\u5165",message:typeof e=="string"?e:String(e??""),type:r.type||"question",input:!0,inputValue:t==null?"":String(t),inputPlaceholder:r.placeholder||"",cancelValue:null,dismissable:r.dismissable,buttons:[{label:r.cancelLabel||"\u53D6\u6D88",value:null,kind:"secondary"},{label:r.okLabel||"\u786E\u5B9A",value:void 0,kind:"primary"}]}).then(function(n){return n==null?null:String(n)})}window.wandAlert=jCe;window.wandConfirm=OI;window.wandPrompt=NCe;window.openWandDialog=km;window.showToast=Qe;var uc=[],rQ=0,PCe=6,RCe=16;function jB(e){if((e.actionLabel||e.playSound)&&lQ(),!m.notifBubble)return{dismiss:function(){}};var t=++rQ,r=e.type||"info",n=e.duration!==void 0?e.duration:8e3,a=document.createElement("div");a.className="notification-bubble",a.setAttribute("data-nid",String(t)),document.body.appendChild(a),NEe(a,e);var o={id:t,el:a};uc.push(o),zI();var l=a.querySelector(".notification-bubble-close");if(l&&(l.onclick=function(){By(t)}),e.actionLabel&&e.action){var u=a.querySelector(".notification-bubble-actions button");u&&(u.onclick=function(){e.action(),By(t)})}return n>0&&setTimeout(function(){By(t)},n),{dismiss:function(){By(t)}}}function By(e){for(var t=-1,r=0;r<uc.length;r++)if(uc[r].id===e){t=r;break}if(t!==-1){var n=uc[t];n.el.classList.add("slide-out"),uc.splice(t,1),zI(),setTimeout(function(){$I(n.el),n.el.parentNode&&n.el.parentNode.removeChild(n.el)},300)}}function zI(){for(var e=RCe,t=0;t<uc.length;t++)uc[t].el.style.top=e+"px",e+=uc[t].el.offsetHeight+PCe}try{tK=navigator.userAgent.match(/WandPlatform\/macOS/),G9=window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.wandNative||null,tK&&G9&&typeof window.WandNative>"u"&&(window.WandNative={downloadUpdate:function(e,t,r){try{G9.postMessage({type:"downloadUpdate",url:String(e||""),fileName:String(t||"wand-update.dmg"),source:String(r||"local")})}catch{}}})}catch{}var tK,G9,Cm=typeof WandNative<"u"&&typeof WandNative.sendNotification=="function",nw=navigator.userAgent.match(/WandApp\/([^\s]+)/),nQ=/WandPlatform\/macOS/.test(navigator.userAgent),OCe=!!nw&&!nQ,aQ=nw&&OCe?nw[1]:null,NB=nw&&nQ?nw[1]:null;function PB(){if(Cm){var e=m.sessions.some(function(t){return!t.archived&&(t.status==="running"||t.status==="thinking"||t.status==="initializing")});if(typeof WandNative.setKeepScreenOn=="function")try{WandNative.setKeepScreenOn(e)}catch{}if(e){if(typeof WandNative.startKeepAlive=="function")try{WandNative.startKeepAlive()}catch{}}else if(typeof WandNative.stopKeepAlive=="function")try{WandNative.stopKeepAlive()}catch{}}}function iQ(){if(Cm&&typeof WandNative.getPermission=="function")try{return WandNative.getPermission()}catch{}return null}function zCe(){if(Cm){var e=iQ();if(e==="default"||e==="denied")try{WandNative.requestPermission()}catch{}return}typeof Notification<"u"&&Notification.permission==="default"&&Notification.requestPermission()}function LCe(e){var t=e||{};return!(t.onlyWhenHidden&&!document.hidden||t.skipWhenSelectedSessionId&&t.skipWhenSelectedSessionId===m.selectedId&&!document.hidden)}function HCe(e,t){if(!e||!t||t<=0)return!1;var r=m.notificationHistory[e]||0,n=Date.now();return n-r<t?!0:(m.notificationHistory[e]=n,!1)}function lC(e,t,r){var n=r||{},a=n.tag||"";if(LCe(n)&&!HCe(a,n.minIntervalMs||0)){if(Cm){var o=iQ();if(o!=="granted")return;try{var l=a;n.kind&&(l=n.kind+(a?":"+a:"")),WandNative.sendNotification(e||"Wand",t||"",l||"")}catch{}return}if(!(typeof Notification>"u"||Notification.permission!=="granted")&&document.hidden)try{var u=new Notification(e,{body:t||"",icon:n.icon||q7,tag:a||void 0});u.onclick=function(){window.focus(),u.close(),n.onClick&&n.onClick()},setTimeout(function(){u.close()},1e4)}catch{}}}function qCe(e,t){if(!(!t||!t.title)){var r=m.sessions.find(function(a){return a.id===e});if(r){var n=r.summary||r.command||e;lC("\u4EFB\u52A1\u8FDB\u884C\u4E2D",n+`
286
+ `+t.title,{kind:"task",tag:"wand-task-"+e+"-"+t.title,minIntervalMs:9e4,onlyWhenHidden:!0,skipWhenSelectedSessionId:e,onClick:function(){e!==m.selectedId&&An(e)}})}}}function oQ(e,t){!m.config||m.config.canManageSettings===!1||(XCe(e||"-",t||"-"),lC("Wand \u53D1\u73B0\u65B0\u7248\u672C","\u5F53\u524D "+(e||"-")+" \u2192 \u6700\u65B0 "+(t||"-"),{kind:"update",tag:"wand-update",minIntervalMs:3e5}))}function WCe(e,t){lC("\u9700\u8981\u4F60\u7684\u6388\u6743",t,{kind:"permission",tag:"wand-perm-"+e,minIntervalMs:6e4,onlyWhenHidden:!0,skipWhenSelectedSessionId:e,onClick:function(){e!==m.selectedId&&An(e)}})}function UCe(e,t,r){lC(t,r,{kind:"task-ended",tag:"wand-ended-"+e,minIntervalMs:1e4,onClick:function(){e!==m.selectedId&&An(e)}})}var cm={},VCe=30;function rK(e){if(!e)return"";var t=String(e).replace(/^#+\s+/gm,"").replace(/\*\*/g,"").replace(/`/g,"").trim(),r=t.split(`
287
+ `)[0].trim();return r.length>100&&(r=r.slice(0,100)+"\u2026"),r}function RB(e){!Cm||typeof WandNative.updateSessionProgress!="function"||e&&(cm[e]&&clearTimeout(cm[e]),cm[e]=setTimeout(function(){delete cm[e],GCe(e)},VCe))}function GCe(e){var t=m.sessions.find(function(C){return C.id===e});if(t){var r=t.summary||t.command||e,n=t.status||"running";if(n==="idle"||n==="archived"||n==="exited"){sQ(e);return}for(var a=null,o="",l="",u=[],d=t.messages||[],p=d.length-1;p>=0;p--){var h=d[p];if(!(!h.content||!Array.isArray(h.content))){if(!l&&h.role==="assistant")for(var v=h.content.length-1;v>=0;v--){var g=h.content[v];if(g&&g.type==="text"&&g.text&&g.text.trim()){l=rK(g.text);break}}if(h.role==="user"){var b=h.content.some(function(C){return C&&C.__queued});if(!b)for(var x=0;x<h.content.length;x++){var y=h.content[x];if(y&&y.type==="text"&&y.text&&y.text.trim()){var E=rK(y.text);o||(o=E),u.length<4&&u.push(E);break}}}if(!a)for(var F=h.content.length-1;F>=0;F--){var S=h.content[F];if(S&&S.type==="tool_use"&&S.name==="TodoWrite"&&S.input&&S.input.todos){a=S.input.todos;break}}if(a&&u.length>=4&&l)break}}u.reverse();var D="";e===m.selectedId&&m.currentTask&&m.currentTask.title&&(D=m.currentTask.title);var $={sessionLabel:r,status:n,currentTask:D,latestUserText:o,latestAssistantText:l,todos:a||[],recentUserTexts:u};try{WandNative.updateSessionProgress(e,JSON.stringify($))}catch{}}}function sQ(e){if(!(!Cm||typeof WandNative.clearSessionProgress!="function")){cm[e]&&(clearTimeout(cm[e]),delete cm[e]);try{WandNative.clearSessionProgress(e)}catch{}}}window.handleNativeBack=function(){if(Kl.isOpen()||SCe())return!0;var e=window.__wandReactUi;if(e&&typeof e.closeTopmost=="function")try{if(e.closeTopmost())return!0}catch{}var t=window.__wandReactFilePreview;if(t&&typeof t.closeTopmost=="function")try{if(t.closeTopmost())return!0}catch{}if(Bd.closeIfOpen()||Ol.closeIfOpen())return!0;var r=window.__wandReactQuickCommit;if(r&&typeof r.closeTopmost=="function")try{if(r.closeTopmost())return!0}catch{}var n=window.__wandReactNewSession;if(n&&typeof n.closeTopmost=="function")try{if(n.closeTopmost())return!0}catch{}var a=window.__wandReactFolderPicker;if(a&&typeof a.closeTopmost=="function")try{if(a.closeTopmost())return!0}catch{}var o=window.__wandReactWorktreeMerge;if(o&&typeof o.closeTopmost=="function")try{if(o.closeTopmost())return!0}catch{}var l=window.__wandReactSettings;if(l&&typeof l.closeTopmost=="function")try{if(l.closeTopmost())return!0}catch{}return m.filePanelOpen&&mK()?(Og(!1),!0):m.sessionsDrawerOpen&&Ao()?(Wg(),!0):mK()&&m.selectedId?(m.selectedId=null,ip(),m.sessionsDrawerOpen=!0,Qr("wand-sidebar-open",!0),um(),!0):!1};function lQ(){m.notifSound&&KCe()}function KCe(){try{let a=function(o,l,u){var d=r.createOscillator(),p=r.createGain();d.type="sine",d.frequency.value=o,p.gain.setValueAtTime(0,r.currentTime+l),p.gain.linearRampToValueAtTime(.5*n,r.currentTime+l+.04),p.gain.exponentialRampToValueAtTime(.001,r.currentTime+l+u),d.connect(p),p.connect(r.destination),d.start(r.currentTime+l),d.stop(r.currentTime+l+u)};var e=a,t=window.AudioContext||window.webkitAudioContext;if(!t)return!1;var r=new t;r.state==="suspended"&&r.resume();var n=(m.notifVolume||0)/100;return a(523,0,.25),a(659,.12,.3),setTimeout(function(){r.close()},600),!0}catch{return!1}}function XCe(e,t){if(m._updateBubbleShown)return;m._updateBubbleShown=!0,lQ();var r=++rQ,n=document.createElement("div");n.className="notification-bubble update-card",n.setAttribute("data-nid",String(r)),document.body.appendChild(n),PEe(n,e,t);var a={id:r,el:n};uc.push(a),zI();var o=n.querySelector(".update-card-close");o&&(o.onclick=function(){By(r),m._updateBubbleShown=!1});var l=n.querySelector("#update-bubble-action"),u=n.querySelector(".update-card-action-label"),d=n.querySelector("#update-card-subtitle"),p=n.querySelector("#update-card-status"),h=n.querySelector("#update-card-progress");function v(y,E){if(p){if(p.textContent=y||"",p.classList.remove("hidden","error","success"),!y){p.classList.add("hidden");return}E&&p.classList.add(E)}}function g(y){d&&(d.textContent=y||"")}function b(y){h&&h.classList.toggle("active",!!y)}function x(y){b(!1),n.classList.remove("is-busy","is-success"),g("\u66F4\u65B0\u672A\u5B8C\u6210"),v(y,"error"),l.disabled=!1,u&&(u.textContent="\u91CD\u8BD5")}l&&(l.onclick=function(){l.disabled=!0,n.classList.add("is-busy"),u&&(u.textContent="\u66F4\u65B0\u4E2D\u2026"),g("\u6B63\u5728\u4E0B\u8F7D\u5E76\u5B89\u88C5\u65B0\u7248\u672C\u2026"),b(!0),v(""),fetch("/api/update",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin"}).then(function(y){return It(y)}).then(function(y){if(n.classList.add("is-success"),g((y.message||"\u66F4\u65B0\u5B8C\u6210")+"\uFF0C\u6B63\u5728\u91CD\u542F\u670D\u52A1\u2026"),v(""),u&&(u.textContent="\u6B63\u5728\u91CD\u542F\u2026"),y.detachedUpdate){aw(y.previousInstanceId||null,y.version||null);return}if(y.restartRequired===!1){b(!1),n.classList.remove("is-busy"),l.disabled=!1,u&&(u.textContent="\u5DF2\u5B8C\u6210");return}QCe(x)}).catch(function(y){_u("update_failed",y),x(y instanceof Pa?qa(y,"\u66F4\u65B0\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002"):"\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5\u540E\u91CD\u8BD5")})})}function QCe(e){fetch("/api/restart",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin"}).then(function(t){return It(t)}).then(function(){aw()}).catch(function(t){if(t instanceof Pa&&t.status>0){e(qa(t,"\u91CD\u542F\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002"));return}aw()})}function aw(e,t){P6e(e,t)}function YCe(e,t,r){R6e(e,t,r)}var JCe={setTimeout:(e,t)=>globalThis.setTimeout(e,t),clearTimeout:e=>globalThis.clearTimeout(e),setInterval:(e,t)=>globalThis.setInterval(e,t),clearInterval:e=>globalThis.clearInterval(e)};function ZCe(e){let t=e.timers??JCe,r=null,n=null;function a(){r!==null||!e.selectedSessionId()||(r=t.setTimeout(()=>{r=null;let u=e.selectedSessionId();u&&e.refresh(u)},e.coalesceMs))}function o(){n===null&&(n=t.setInterval(()=>{if(e.hidden())return;let u=e.selectedSessionId();u&&e.refresh(u)},e.pollMs))}function l(){r!==null&&(t.clearTimeout(r),r=null),n!==null&&(t.clearInterval(n),n=null)}return{schedule:a,startPolling:o,stop:l}}var K9=0;function LI(){return K9=Math.max(Date.now(),K9+1),K9}function eSe(){let e=new Map;return{accept(t,r,n){if(!t||!r)return!1;let a=e.get(t);return a&&n<a.requestedAt?!1:(e.set(t,{status:r,requestedAt:n}),!0)},peek(t){return t?e.get(t)?.status??null:null},forget(t){e.delete(t)}}}var ck=null,WE=null,UE=null,dk=null;function tSe(e){let t=[];for(let r of e)r.type!=="file"||typeof r.path!="string"||!r.path.trim()||t.push({path:r.path,...typeof r.name=="string"&&r.name?{name:r.name}:{},type:"file"});return t}function rSe(){return ki()}function HI(e){WE?.(),ck=e,WE=M9({confirmDiscard:e.confirmDiscard,async copyText(r){if(!await e.copyText(r))throw new Error("\u590D\u5236\u5931\u8D25\u3002")},appendToComposer:e.appendToComposer,notify:e.notify,onSaved:e.onSaved});let t=!1;return()=>{t||ck!==e||(t=!0,dk=null,Ws.closeIfOpen(),WE?.(),WE=null,ck=null)}}function nSe(e){let t=ck,r=typeof e=="string"?e.trim():"";return!t||!r||Kl.isOpen()||!rSe()?!1:(Ws.open({path:r,siblings:tSe(t.getSiblings(r))}),!0)}function Sm(e){if(!Ws.isOpen())return!0;let t=em.getSnapshot();return t.saving?!1:t.dirty?(dk=e,UE||(UE=Ws.execute({type:"close"}),UE.then(r=>{let n=dk;if(dk=null,UE=null,!(!r||!n))try{n()}catch(a){console.warn("[wand] Failed to continue overlay open intent",a)}})),!1):(Ws.closeIfOpen(),!Ws.isOpen())}function aSe(){Ua("topbar:git")}var qI=ZCe({coalesceMs:1200,pollMs:2e4,selectedSessionId:function(){return m.selectedId},hidden:function(){return document.hidden},refresh:function(e){vw(e,{force:!0})}}),WI=eSe(),by=new Map;function UI(e,t,r){m.gitStatus=t||null,m.gitStatusSessionId=t?e:null,r&&(m.gitStatusLastFetchAt=Date.now()),aSe()}function uQ(e,t,r){WI.accept(e,t,r??LI())&&e===m.selectedId&&UI(e,t,!0)}function cQ(e){UI(e,e?WI.peek(e):null,!1)}function dQ(){qI.schedule()}function iSe(){qI.startPolling()}function oSe(){qI.stop()}function vw(e,t){if(!e)return Promise.resolve(null);var r=t&&t.force,n=Date.now();if(!r&&m.gitStatusSessionId===e&&m.gitStatus&&n-m.gitStatusLastFetchAt<1e3)return Promise.resolve(m.gitStatus);if(!r&&by.has(e))return by.get(e);var a=LI(),o=fetch("/api/sessions/"+encodeURIComponent(e)+"/git-status",{credentials:"same-origin"}).then(function(l){if(!l.ok)throw new Error("git-status "+l.status);return l.json()}).then(function(l){return uQ(e,l||{isGit:!1},a),l}).catch(function(){var l=WI.peek(e);return e===m.selectedId&&UI(e,l,!1),null}).finally(function(){by.get(e)===o&&by.delete(e)});return by.set(e,o),o}w$({onOpen:function(){ki(["quickCommit"])},onClose:function(){},onArchived:function(){Ql()},nextStatusRequestTime:LI,onStatusLoaded:function(e,t,r){uQ(e,t,r)},toast:function(e,t){Qe(e,t)}});function VI(){if(m.selectedId){var e=m.selectedId,t=function(){ki(["quickCommit"])&&wd.open({sessionId:e})};Sm(t)&&t()}}var sSe=A(Xa(),1),nK=A(xe(),1),Bg=new Map;function lSe(e){if(!e)return"";let t=e.structuredState,r=i1(e);return JSON.stringify([e.id??"",e.archived===!0,r.stage,r.label,r.action,r.toolId,t?.activeRequestId??"",e.status??"",e.ptyRunning?"1":"0",e.permissionBlocked?"1":"0",e.pendingEscalation?"1":"0",t?.inFlight?"1":"0",t?.phase??"",t?.turnStartedAt??"",t?.lastActivityAt??"",e.turnStartedAt??"",e.lastActivityAt??"",e.queuedMessages?.length??0])}function uSe(){for(let[e,t]of Bg)e.isConnected||(t.root.unmount(),Bg.delete(e))}function cSe(e,t){uSe();let r=lSe(t),n=Bg.get(e);n&&n.lastKey===r||(n?n.lastKey=r:(n={root:(0,sSe.createRoot)(e),lastKey:r},Bg.set(e,n)),n.root.render((0,nK.jsx)(Xn,{children:(0,nK.jsx)(o1,{activity:t??null})})))}function dSe(e){let t=Bg.get(e);t&&(t.root.unmount(),Bg.delete(e)),e.replaceChildren()}var pSe=A(Xa(),1),fSe=A(er(),1),aK=A(xe(),1),VE=new Map;function mSe(e,t,r,n=""){for(let[l,u]of VE)l.isConnected||(u.root.unmount(),VE.delete(l));let a=VE.get(e);if(a&&a.disabled===t&&a.onKey===r&&a.owner===n)return;let o=a?.root??(0,pSe.createRoot)(e);VE.set(e,{root:o,disabled:t,onKey:r,owner:n}),(0,fSe.flushSync)(()=>o.render((0,aK.jsx)(Xn,{children:(0,aK.jsx)(DX,{disabled:t,onKey:r,owner:n})})))}var hSe="\x1B[200~",gSe="\x1B[201~";function pQ(e,t=!0){if(!e)return"";let r=e.replace(/\r?\n/g,"\r");if(!t)return r;let n=r.replace(/\u001b/g,"\u241B");return`${hSe}${n}${gSe}`}function vSe(e){return e?/^[a-zA-Z0-9_./:@%+,=-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`:""}function bSe(e,t=!0){return pQ(vSe(e),t)}function ySe(e){let t=String(e||"").trim().toLowerCase();return t==="claude"||t==="pi"}var wSe=/\.(?:png|jpe?g|gif|webp|bmp|svg)$/i;function fQ(e){return e?iw(e.mimeType)||wSe.test(e.savedPath||e.originalName||""):!1}function mQ(e,t={}){let r=t.bracketedPaste!==!1,n=ySe(t.provider),a=[];for(let o of e||[]){let l=typeof o?.savedPath=="string"?o.savedPath:"";if(!l)continue;let u=fQ(o);a.push({data:bSe(l,r),shortcutKey:"paste",...u?{image:!0}:{}}),(!u||n)&&a.push({data:" "})}return a}function iw(e){return typeof e=="string"&&e.toLowerCase().startsWith("image/")}function xSe(e){switch(String(e||"").toLowerCase()){case"image/jpeg":case"image/jpg":return".jpg";case"image/gif":return".gif";case"image/webp":return".webp";case"image/bmp":return".bmp";case"image/svg+xml":return".svg";default:return".png"}}function ESe(e){if(!e.active()){zy.clear();return}let t=[];document.querySelectorAll("[data-composer-rail-host]").forEach((r,n)=>{r.isConnected&&t.push({key:r.dataset.composerRailHost||`composer-rail-${n}`,target:r,onSubmit(){e.submit(),e.focusInput()}})}),zy.sync(t)}function kSe(e,t){return e.target===t.target&&e.interactiveVisible===t.interactiveVisible&&e.interactiveOn===t.interactiveOn}var CSe=class extends vl{constructor(){super(kSe)}},Pg=new CSe,SSe="[data-composer-popover-host]";function FSe(e){hw({selector:SSe,store:Pg,flush:!0,build(t){return{key:"composer-popover-items",target:t,...e.resolve(),onAttach:e.onAttach,onToggleInteractive:e.onToggleInteractive}}})}function $Se(e,t){if(!e||!t)return null;for(var r=t;r&&r.parentNode&&r.parentNode!==e;)r=r.parentNode;return!r||r.parentNode!==e?null:r}function DSe(e,t){if(!e)return null;for(var r=0;r<t.length;r++){var n=$Se(e,t[r]);if(n)return n}return null}var tp=null,X9=!1,jk=new Map,Nk=new Map;function hQ(){tp||X9||(X9=!0,globalThis.__wandImportBrowserModule("843c2750657d433e").then(e=>{tp=e,jk.forEach(t=>e.paintQueueBar(...t)),Nk.forEach(t=>e.paintCrossSessionQueue(...t)),jk.clear(),Nk.clear()}).catch(()=>{X9=!1}))}function ASe(...e){if(hQ(),tp){tp.paintQueueBar(...e);return}jk.set(e[0],e)}function BSe(...e){if(hQ(),tp){tp.paintCrossSessionQueue(...e);return}Nk.set(e[0],e)}function OB(e){jk.delete(e),Nk.delete(e),tp?tp.clearQueueView(e):e.replaceChildren()}function ya(e){if(e){e.style.minHeight="";var t=window.getComputedStyle(e),r=parseFloat(t.minHeight||""),n=Number.isFinite(r)?r:40,a=parseFloat(t.maxHeight||""),o=Number.isFinite(a)?Math.max(n,a):240,l=hc(),u=e.classList.contains("is-terminal-passthrough")&&e.closest(".input-composer")?.dataset.composerExpanded!=="true";if(u||!e.value||e.value.trim()===""){e.style.height=n+"px",e.style.minHeight=n+"px",e.style.overflowY=l?"auto":"hidden",e.scrollTop=0,e.classList.remove("has-multiline-draft","has-clipped-draft"),e.closest(".input-composer")?.classList.remove("is-expanded"),xm(e);return}var d=e.scrollTop,p=e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;e.style.overflowY="hidden",e.style.height=n+"px";var h=e.scrollHeight,v=Math.max(n,Math.min(h,o)),g=h>o,b=h>n+1;if(e.style.height=v+"px",e.style.minHeight=n+"px",e.style.overflowY=g||l?"auto":"hidden",e.classList.toggle("has-multiline-draft",b),e.classList.toggle("has-clipped-draft",g),e.closest(".input-composer")?.classList.toggle("is-expanded",b),g)if(p)Lk(e);else{var x=Math.max(0,e.scrollHeight-e.clientHeight);e.scrollTop=Math.min(d,x)}else e.scrollTop=0;xm(e)}}var Iy=!1;function gQ(e){return!e||e.archived?!1:gr(e)?!!(e.structuredState&&e.structuredState.inFlight):e.status==="running"}function vQ(){return m.sessions.some(gQ)}function ISe(){var e=m.sessions.filter(gQ);if(e.length===0)return null;if(m.selectedId){var t=e.find(function(r){return r.id===m.selectedId});if(t)return t}return e.sort(function(r,n){return(Date.parse(n.startedAt)||0)-(Date.parse(r.startedAt)||0)}),e[0]}function bQ(e){if(!e)return"";for(var t=Array.isArray(e.queuedMessages)?e.queuedMessages:[],r=t.length-1;r>=0;r--){var n=typeof t[r]=="string"?t[r].trim():"";if(n)return n}for(var a=Array.isArray(e.messages)?e.messages:[],o=a.length-1;o>=0;o--){var l=a[o];if(!(!l||l.role!=="user"||!Array.isArray(l.content))){var u=l.content.filter(function(h){return h&&h.type==="text"&&typeof h.text=="string"}).map(function(h){return h.text});if(u.length)return u.join(`
288
+ `).trim();for(var d=0;d<l.content.length;d++){var p=l.content[d];if(p&&p.type==="tool_result"&&typeof p.content=="string")return p.content.trim()}return""}}return""}function yQ(e,t,r,n){var a=m.sessions.find(function(l){return l.id===e}),o=a&&Array.isArray(a.queuedMessages)?a.queuedMessages:[];return ui.rollback(e,o,[],n,{text:t,index:r})}function MSe(e,t){var r=typeof t=="string"?t.trim():"";if(r&&bQ(e)===r)return Qe("\u4E0E\u4E0A\u4E00\u6761\u6D88\u606F\u76F8\u540C\uFF0C\u5DF2\u5FFD\u7565\uFF0C\u4E0D\u4F1A\u52A0\u5165\u6392\u961F\u3002","warning"),Promise.resolve();var n=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,10),a=Array.isArray(e.queuedMessages)?e.queuedMessages.slice():[],o=a.slice();o.push(t);var l=ui.advance(e.id,"local");Kt({id:e.id,queuedMessages:o}),e.id===m.selectedId&&kn();var u=e.title||bX(e.command)||"\u5F53\u524D\u4F1A\u8BDD";return Qe("\u5DF2\u52A0\u5165\u300C"+u+"\u300D\u7684\u5F85\u53D1\u9001\u961F\u5217\uFF08\u4FDD\u7559\u4E0A\u4E0B\u6587\uFF09\u3002","info"),Nr("/api/structured-sessions/"+e.id+"/messages",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({input:t,idempotencyKey:n})}).then(function(d){return d.ok?d.json():d.json().catch(function(){return{error:"\u8BF7\u6C42\u5931\u8D25"}}).then(function(p){throw new Error(p&&p.error||"\u65E0\u6CD5\u6392\u961F\u6D88\u606F\u3002")})}).then(function(d){d&&d.id&&(d=ui.filter(d,e.id,l),Kt(d),d.id===m.selectedId&&kn())}).catch(function(d){var p=yQ(e.id,t,a.length,l);p&&Kt({id:e.id,queuedMessages:p}),e.id===m.selectedId&&kn(),Qe(d&&d.message||"\u6392\u961F\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002","error")})}function TSe(e){var t=ISe();if(t&&gr(t)){MSe(t,e);return}if(m.crossSessionQueue.length>=10){Qe("\u6392\u961F\u6D88\u606F\u5DF2\u6EE1\uFF08\u6700\u591A 10 \u6761\uFF09\uFF0C\u8BF7\u7B49\u5F85\u5F53\u524D\u4F1A\u8BDD\u5B8C\u6210\u3002","warning");return}var r="csq-"+Date.now()+"-"+Math.random().toString(36).slice(2,8);m.crossSessionQueue.push({id:r,text:e,cwd:ps(),mode:m.chatMode||"managed",tool:np(),queuedAt:Date.now()}),gc(),Wl()}function _Se(e){if(Iy){m.crossSessionQueue.unshift(e),rB(!!m.pageUnloading)&&gc(),Wl();return}Iy=!0,Nr("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Yl({kind:"pty",command:e.tool,cwd:e.cwd,mode:e.mode,initialInput:e.text}))}).then(function(t){return It(t)}).then(function(t){return Iy=!1,yw(t)}).catch(function(t){Iy=!1,Qe(t&&t.message||"\u65E0\u6CD5\u542F\u52A8\u6392\u961F\u4F1A\u8BDD\u3002","error"),m.crossSessionQueue.unshift(e),rB(!!m.pageUnloading)&&gc(),Wl()})}function jSe(e){var t=m.crossSessionQueue.findIndex(function(n){return n.id===e});if(!(t<0)){var r=m.crossSessionQueue.splice(t,1)[0];gc(),Wl(),Nr("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Yl({kind:"pty",command:r.tool,cwd:r.cwd,mode:r.mode,initialInput:r.text}))}).then(function(n){return It(n)}).then(function(n){return yw(n)}).catch(function(n){Qe(n&&n.message||"\u65E0\u6CD5\u542F\u52A8\u6392\u961F\u4F1A\u8BDD\u3002","error"),m.crossSessionQueue.splice(t,0,r),rB(!!m.pageUnloading)&&gc(),Wl()})}}function NSe(e){var t=m.crossSessionQueue.findIndex(function(r){return r.id===e});t<0||(m.crossSessionQueue.splice(t,1),gc(),Wl())}function uC(){if(m.config&&m.crossSessionQueue.length!==0&&!vQ()&&!Iy){var e=m.crossSessionQueue.shift();gc(),_Se(e),Wl()}}function wQ(e){var t=Math.floor((Date.now()-e)/1e3);if(t<60)return t+"s";var r=Math.floor(t/60);return r<60?r+"m":Math.floor(r/60)+"h"}function Wl(){try{PSe()}catch(e){console.error("[wand] cross-session queue render failed:",e)}finally{zSe()}}function PSe(){var e=document.querySelector(".cross-session-queue"),t=document.querySelector(".input-panel"),r=document.querySelector(".structured-status-bar"),n=document.querySelector(".input-composer"),a=document.getElementById("cross-session-queue-host");if(m.crossSessionQueue.length===0){e&&(OB(e),e.remove()),gc();return}var o=t&&!t.classList.contains("hidden"),l=o?t:a;if(l){var u=o?DSe(l,[r,n]):null;e&&e.parentNode!==l&&(OB(e),e.remove(),e=null),e?o&&u&&e.nextSibling!==u&&l.insertBefore(e,u):(e=document.createElement("div"),e.className="cross-session-queue",u?l.insertBefore(e,u):l.appendChild(e)),BSe(e,m.crossSessionQueue.map(d=>({id:d.id,text:d.text,age:wQ(d.queuedAt)})))}}var RSe=5e3,Vy=null;function OSe(){if(m.crossSessionQueue.length===0){GI();return}var e=document.querySelectorAll(".queue-item-age");m.crossSessionQueue.forEach(function(t,r){e[r]&&(e[r].textContent=wQ(t.queuedAt))}),uC()}function GI(){Vy!==null&&(clearInterval(Vy),Vy=null)}function zSe(){if(m.crossSessionQueue.length===0){GI();return}Vy===null&&(Vy=setInterval(OSe,RSe))}document.addEventListener("click",function(e){var t=e.target;if(t.closest("#queue-clear-all")){e.preventDefault(),m.crossSessionQueue=[],gc(),Wl();return}var r=t.closest(".queue-item-send-now");if(r){e.preventDefault(),jSe(r.dataset.queueId);return}var n=t.closest(".queue-item-cancel");if(n){e.preventDefault(),NSe(n.dataset.queueId);return}});function LSe(e){e=e||{};var t=document.getElementById("input-box"),r=t?t.value:"",n=r.trim();if(m.selectedId){$C(r,m.selectedId)&&Fm(e);return}if(n&&vQ()){t&&(t.value=""),xm(t),TSe(n);return}var a=m.chatMode||"managed",o=ps(),l=np();Nr("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Yl({kind:"pty",command:l,provider:l,cwd:o,mode:a,initialInput:n||void 0}))}).then(function(u){return It(u)}).then(function(u){return op(u.id),!m.selectedId&&t&&(t.value=""),yw(u)}).catch(function(u){Qe(qa(u,l==="codex"?"\u65E0\u6CD5\u542F\u52A8 Codex \u4F1A\u8BDD\u3002":"\u65E0\u6CD5\u542F\u52A8 Claude \u4F1A\u8BDD\u3002"),"error")})}var zB=0;function KI(e){var t=zB,r=document.activeElement;return function(){return m.selectedId===e&&zB===t&&(document.activeElement===r||document.activeElement===document.body)}}function HSe(e,t){zB++;var r=m.sessions.find(function(a){return a.id===e}),n=gr(r);n?m.currentView="chat":m.currentView="terminal",n||m.terminal||Ys(),MM(),dC(),bc(e),t?.focusInput!==!1&&m.terminalInteractive?hc()||ZI():t?.focusInput!==!1&&Xl(!0),!n&&r&&bw(r)&&qSe(r,t),n||ro("view-switch",{forceReplay:!0}),Ua("session:view")}var GE=null;function qSe(e,t){if(!(!e||GE===e.id||!bw(e))){var r=KI(e.id);GE=e.id,aM(e.id).then(function(n){if(!(!n||m.selectedId!==e.id))return Kt(n),Si(),kC(n.id),Gl(n.id).then(function(){m.selectedId===e.id&&(dC(),t?.focusInput!==!1&&r()&&m.terminalInteractive&&!hc()&&ZI())})}).finally(function(){GE===e.id&&(GE=null)})}}function WSe(e,t,r,n){At.edit(e,{restore:{text:t,attachments:r},persist:n}),bc(e),Wa()}function USe(e,t){if(!(!e||!hc())){var r=function(){if(!(m.selectedId!==t||!e.isConnected||e.disabled))try{e.focus({preventScroll:!0})}catch{e.focus()}};r(),requestAnimationFrame(r)}}function iK(e,t,r){var n=IQ(r);if(e&&t){WSe(e,t,[],!1),xi("\u8FD9\u6BB5\u8F93\u5165\u6CA1\u6709\u9001\u5230\u7EC8\u7AEF\uFF08"+n+"\uFF09\uFF0C\u5DF2\u653E\u56DE\u8F93\u5165\u6846\uFF1B\u91CD\u8BD5\u524D\u5148\u770B\u7EC8\u7AEF\u91CC\u662F\u5426\u7559\u4E0B\u534A\u884C\u3002",e);return}xi("\u56DE\u8F66\u6CA1\u6709\u9001\u5230\u7EC8\u7AEF\uFF08"+n+"\uFF09\u3002",e)}function Fm(e){e=e||{};var t=!!e.interrupt,r=document.documentElement.classList.contains("is-wand-embed-terminal");if(m.terminalInteractive&&!r){var n=document.getElementById("input-box"),a=n?n.value:"",o=m.selectedId,l=m.currentView;return n&&a?(n.value="",wm("",!0),ya(n),fa(a,"interactive_text",l,o).then(function(){return fa("\r","enter_text",l,o)}).catch(function(E){iK(o,a,E)})):fa("\r","enter_text",l,o).catch(function(E){iK(o,"",E)})}var u=document.getElementById("input-box"),d=Rg(),p=d&&d.id||m.selectedId,h=m.currentView,v=u?u.value:AY(p),g=$w(p);if(m.promptOptimizeRequest&&m.promptOptimizeRequest.sessionId===p||oEe(v,d)||!p||!$C(v,p))return Promise.resolve();var b=At.pendingSubmission(p,{text:v,attachments:g});if(b)return b;u&&m.selectedId===p&&(u.value="",ya(u)),Wa(),USe(u,p);var x=kQ("\u6B63\u5728\u53D1\u9001\u2026",p,"\u5DF2\u53D1\u9001"),y=At.submit(p,v,function(E){var F=E.attachments;return Promise.resolve().then(function(){return F.length?$Y(p,F).catch(function(S){throw new Error("\u9644\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF1A"+(S&&S.message||S))}):[]}).then(function(S){var D=!!v.trim(),$=CK(S)+(D?v:S.length?"\u8BF7\u67E5\u770B\u9644\u4EF6\u3002":""),C=null;if(!gr(d)&&S.length){var B=S.filter(function(N){return fQ({savedPath:N&&N.savedPath,mimeType:N&&(N.mimeType||N.type),originalName:N&&N.originalName})});if(B.length){var M=S.filter(function(N){return B.indexOf(N)<0}),I=CK(M)+(D?v:M.length?"\u8BF7\u67E5\u770B\u9644\u4EF6\u3002":"");C=mQ(B,{bracketedPaste:LM(d.id,d.provider),provider:d.provider||Mu(d.command||"")}),I&&C.push({data:I,shortcutKey:"enter_text"}),C.push({data:"\r",shortcutKey:"enter_text"})}}if(p===m.selectedId&&MY(),gr(d))return GSe($,u,d,{interrupt:t,composerCaptured:!0});var j=C||l8e(d,$);if(m.selectedId!==p)throw new Error("\u53D1\u9001\u524D\u4F1A\u8BDD\u5DF2\u5207\u6362\uFF0C\u539F\u8349\u7A3F\u5DF2\u6062\u590D\u3002");if(!m.wsConnected)throw new Error("\u7F51\u7EDC\u5DF2\u65AD\u5F00\uFF0C\u6D88\u606F\u672A\u53D1\u9001\uFF0C\u539F\u8349\u7A3F\u5DF2\u6062\u590D\u3002");return s8e(d).then(function(N){if(!N){var R=new Error("\u4F1A\u8BDD\u5C1A\u672A\u51C6\u5907\u597D\uFF0C\u6D88\u606F\u672A\u53D1\u9001\u3002");throw R.__wandComposerReported=!0,R}if(m.selectedId!==p)throw new Error("\u53D1\u9001\u524D\u4F1A\u8BDD\u5DF2\u5207\u6362\uFF0C\u539F\u8349\u7A3F\u5DF2\u6062\u590D\u3002");return VQ(),d8e(j,"enter_text",C?0:30,h,N.id||p,!!C)})}).then(function(S){return Rk(p,x),S})}).catch(function(E){bc(p),E&&E.__wandComposerReported||xi(IQ(E),p)}).finally(function(){Wa()});return Dw(),y}var KE={},VSe=350;function GSe(e,t,r,n){n=n||{};var a=!!n.interrupt;if(!e)return Promise.resolve();if(!r)return Promise.reject(new Error("\u4F1A\u8BDD\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6216\u65B0\u5EFA\u4F1A\u8BDD\u3002"));var o=!!(r.structuredState&&r.structuredState.inFlight&&r.status==="running");if(o&&!a&&bQ(r)===e.trim())return n.composerCaptured||(t&&r.id===m.selectedId&&(t.value="",ya(t)),Gk(r.id,"",!0)),xi("\u4E0E\u4E0A\u4E00\u6761\u6D88\u606F\u76F8\u540C\uFF0C\u672A\u52A0\u5165\u6392\u961F\u3002",r.id),Promise.resolve();var l=Date.now(),u=!n.composerCaptured,d=KE[r.id],p=typeof d=="number"?d:d&&d.at||0,h=typeof d=="number"?e:d&&d.input;if(u&&h===e&&l-p<VSe)return Promise.resolve();var v=u?{at:l,input:e}:null;v&&(KE[r.id]=v),r.id===m.selectedId&&ow(!1);var g=o&&a,b=o&&!a,x=ui.read(r.id),y=-1,E=hC(Array.isArray(r.messages)?r.messages.slice():[]),F;if(b){var S=Array.isArray(r.queuedMessages)?r.queuedMessages.slice():[];if(y=S.length,S.push(e),x=ui.advance(r.id,"local"),F={id:r.id,queuedMessages:S},Kt(F),r.id===m.selectedId){var D=m.sessions.find(function(I){return I.id===r.id})||r;m.currentMessages=Ks(D,pc(D,D.output,!1)),ba(!0),Jd()}r.id===m.selectedId?qB(S.length>1?"\u5DF2\u52A0\u5165\u6392\u961F\uFF08\u5171 "+S.length+" \u6761\u7B49\u5F85\uFF09":"\u5DF2\u52A0\u5165\u961F\u5217\uFF0C\u5C06\u6309\u6267\u884C\u5668\u652F\u6301\u7684\u65F6\u673A\u81EA\u52A8\u53D1\u9001\u3002",r.id):Qe(S.length>1?"\u5DF2\u52A0\u5165\u300C"+(r.title||"\u8BE5\u4F1A\u8BDD")+"\u300D\u6392\u961F\uFF08\u5171 "+S.length+" \u6761\u7B49\u5F85\uFF09":"\u5DF2\u52A0\u5165\u300C"+(r.title||"\u8BE5\u4F1A\u8BDD")+"\u300D\u7684\u5F85\u53D1\u9001\u961F\u5217\u3002","info")}else{var $={role:"user",content:[{type:"text",text:e}]};E.push($);var C=Object.assign({},r.structuredState||{},{inFlight:!0});Kt({id:r.id,status:"running",messages:E,structuredState:C}),r.id===m.selectedId&&(m.currentMessages=Ks(Object.assign({},r,{status:"running",messages:E,structuredState:C}),E),VQ(),ba(!0),g&&qB("\u5DF2\u4E2D\u65AD\u4E0A\u4E00\u6761\u56DE\u590D\uFF0C\u6B63\u5728\u5904\u7406\u65B0\u6D88\u606F\u2026",r.id))}n.composerCaptured||(t&&r.id===m.selectedId&&(t.value="",ya(t)),Gk(r.id,"",!0));var B=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,10),M=!1;return Nr("/api/structured-sessions/"+r.id+"/messages",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({input:e,interrupt:g||void 0,idempotencyKey:B})}).then(function(I){return I.ok?(M=!0,I.json()):I.json().catch(function(){return{error:"\u8BF7\u6C42\u5931\u8D25"}}).then(function(j){var N=new Error(j&&j.error||"\u65E0\u6CD5\u53D1\u9001\u7ED3\u6784\u5316\u6D88\u606F\u3002");throw N.errorCode=j&&j.errorCode,N.httpStatus=I.status,N})}).then(function(I){if(I&&I.error)throw new Error(I.error);if(I&&I.id&&(I=ui.filter(I,r.id,x),Kt(I),I.id===m.selectedId)){var j=m.sessions.find(function(N){return N.id===I.id})||I;m.currentMessages=Ks(j,pc(j,I.output,!1)),ba(!0),Jd()}}).catch(function(I){if(M&&(I=YI(I)),I&&I.errorCode==="duplicate_idempotency_key"){r.id===m.selectedId?xi(I.message||"\u68C0\u6D4B\u5230\u91CD\u590D\u53D1\u9001\uFF0C\u5DF2\u62E6\u622A\u3002",r.id):Qe(I.message||"\u68C0\u6D4B\u5230\u91CD\u590D\u53D1\u9001\uFF0C\u5DF2\u62E6\u622A\u3002","warning");return}if(v&&KE[r.id]===v&&delete KE[r.id],b){var j=yQ(r.id,e,y,x);if(j&&Kt({id:r.id,queuedMessages:j}),r.id===m.selectedId){var N=m.sessions.find(function(W){return W.id===r.id})||r;m.currentMessages=Ks(N,pc(N,N.output,!1)),ba(!0),Jd()}}else{var R=E.slice(0,-1);Kt({id:r.id,status:r.status,messages:R,structuredState:Object.assign({},r.structuredState||{},{inFlight:!1})}),r.id===m.selectedId&&(m.currentMessages=Ks(Object.assign({},r,{messages:R,structuredState:Object.assign({},r.structuredState||{},{inFlight:!1})}),R),ba(!0))}var L=I&&I.message||"",q=L==="Failed to fetch"||L==="NetworkError when attempting to fetch resource."||L==="Load failed"||/aborted|aborterror|networkerror|failed to fetch/i.test(L);throw q&&(I.__wandAmbiguousDelivery=!0,xi("\u7F51\u7EDC\u4E2D\u65AD\uFF0C\u8FD9\u6761\u6D88\u606F\u53EF\u80FD\u5DF2\u9001\u8FBE\uFF1B\u8349\u7A3F\u5DF2\u56DE\u586B\uFF0C\u91CD\u8BD5\u524D\u8BF7\u5148\u770B\u4F1A\u8BDD\u5185\u5BB9\u3002",r.id),I.__wandComposerReported=!0),I})}var Pk=null,LB="",yy=0,hm=null,oK=0,HB=0,xQ="",pk=new Set;function XI(e){return e==="failed"?p0:d0}function KSe(e,t){return!t&&N0(e).active?"running":"idle"}function XSe(){var e=document.getElementById("send-input-button");return e&&e.getAttribute("data-phase")||"idle"}function EQ(e){var t=e===void 0?m.selectedId:e;return!!hm&&hm===t}function QSe(e){return cY}function YSe(e,t,r,n){return e==="running"?{title:"\u505C\u6B62\u751F\u6210",label:"\u505C\u6B62\u751F\u6210"}:e==="sending"?{title:"\u6B63\u5728\u53D1\u9001\u2026",label:"\u6B63\u5728\u53D1\u9001\u2026"}:e==="sent"?{title:n||"\u5DF2\u53D1\u9001",label:"\u5DF2\u53D1\u9001"}:e==="failed"?{title:n||"\u53D1\u9001\u5931\u8D25",label:"\u53D1\u9001\u5931\u8D25"}:{title:t,label:r}}function JSe(e,t,r){var n=document.getElementById("composer-status-line");if(n){var a=e==="sending"||e==="sent"||e==="failed",o=a&&t?t:QSe(r);n.textContent!==o&&(n.textContent=o);var l=a?e:"",u=(n.getAttribute("data-tone")||"")!==l;u&&n.removeAttribute("data-tone"),l&&u&&(n.offsetWidth,n.setAttribute("data-tone",l))}}function ZSe(){var e=document.getElementById("composer-status-line");return!!e&&e.getClientRects().length>0}function cC(e,t,r,n){yy&&(clearTimeout(yy),yy=0),Pk=e,LB=t||"",hm=n===void 0?m.selectedId||null:n||null,Wa(),e==="failed"&&(!EQ()||!ZSe())&&Qe(t||"\u64CD\u4F5C\u672A\u5B8C\u6210\u3002","error"),!(r<=0)&&(yy=window.setTimeout(function(){yy=0,Pk=null,LB="",hm=null,Wa()},r))}function kQ(e,t,r){return oK+=1,HB=oK,xQ=r||"\u5DF2\u53D1\u9001",cC("sending",e,0,t),HB}function qB(e,t){cC("sent",e,XI("sent"),t)}function xi(e,t){cC("failed",e,XI("failed"),t)}function Rk(e,t){Pk!=="sending"||!hm||e&&e!==hm||t!==void 0&&t!==HB||cC("sent",xQ||"\u5DF2\u53D1\u9001",XI("sent"),hm)}function Jd(){kn()}var e8e=10;function t8e(){return!!m.queueBarExpanded}function ow(e){!!m.queueBarExpanded!=!!e&&(m.queueBarExpanded=!!e,kn())}var sK=null;function kn(){var e=document.getElementById("queue-bar-host");if(e){var t=m.sessions.find(function(d){return d.id===m.selectedId});sK!==(t?.id??null)&&(sK=t?.id??null,m.queueBarExpanded=!1,m.queueBarDrag&&sm(null,!0));var r=t&&t.sessionKind==="structured",n=r?xM(t):[];n=Array.isArray(n)?n:[];var a=t?At.read(t.id).queueRetrieval:null,o=t?At.read(t.id).queueRemoval:null;if(m.queueBarDrag){let d=m.queueBarDrag;if(!r||!m.queueBarExpanded||JSON.stringify(n)!==JSON.stringify(d.queueSnapshot))sm(null,!0);else return}if(!r||n.length===0&&!a&&!o){e.hidden=!0,OB(e),m.queueBarExpanded=!1;return}e.hidden=!1;var l=!!(t.structuredState&&t.structuredState.inFlight&&t.status==="running"),u=n.length>=e8e;ASe(e,n,l,u,{expanded:!!m.queueBarExpanded,onExpandedChange:ow,busy:dc.has(t.id)||Js.has(t.id),retrieval:a,removal:o,steering:t.structuredState?.inputMode==="steer"||t.provider==="pi"&&t.structuredState?.engine==="core",onDragStart:BQ,onAction:(d,p,h)=>{if(m.selectedId===t.id){if(d==="restore-retrieved"){QI(t.id);return}if(d==="dismiss-retrieved"){At.dismissQueueRetrieval(t.id),kn();return}if(d==="dismiss-removed"){At.dismissQueueRemoval(t.id),kn();return}if(d==="restore-removed"){if(m.composerComposing||!At.restoreQueueRemoval(t.id))return;bc(t.id),document.getElementById("input-box")?.focus({preventScroll:!0}),ow(!1),kn();return}var v=m.sessions.find(g=>g.id===t.id)?.queuedMessages||[];if(v.length!==h.length||v.some((g,b)=>g!==h[b])){xi("\u961F\u5217\u5DF2\u66F4\u65B0\uFF0C\u8BF7\u6838\u5BF9\u540E\u91CD\u8BD5\u3002",t.id),kn();return}if(d==="edit"){CQ(p);return}if(d==="promote-item"){AQ(p);return}if(d==="delete"){SQ(p);return}if(d==="clear-all"){FQ();return}(d==="move-up"||d==="move-down")&&r8e(t.id,p,d==="move-up"?-1:1,h)}}})}}var dc=new Set,Js=new Set;async function CQ(e){var t=m.sessions.find(function(v){return v.id===m.selectedId}),r=t&&t.queuedMessages&&t.queuedMessages[e];if(!(typeof r!="string"||dc.has(t.id)||Js.has(t.id))){var n=t.id,a=At.beginQueueRetrieval(n,r);if(a){var o=ui.advance(n,"local");dc.add(n),kn();var l=!1;try{var u=await Nr("/api/structured-sessions/"+encodeURIComponent(n)+"/queued/"+e,{method:"DELETE",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({expectedText:r})});if(!u.ok){l=u.status>=400&&u.status<500&&u.status!==408;var d=await u.json().catch(function(){return{}});throw new Error(d&&d.error||"\u53D6\u56DE\u6392\u961F\u6D88\u606F\u5931\u8D25\u3002")}var p=await u.json();if(p.id!==n||!Array.isArray(p.queuedMessages))throw new Error("\u53D6\u56DE\u7ED3\u679C\u6682\u4E0D\u53EF\u7528\uFF0C\u8BF7\u68C0\u67E5\u6392\u961F\u5185\u5BB9\u3002");if(!m.sessions.some(function(v){return v.id===n}))return;var h=ui.filter({id:n,queuedMessages:p.queuedMessages},n,o);if(h.queuedMessages&&Kt(h),!At.finishQueueRetrieval(n,a,"confirmed"))return;(m.selectedId!==n||!m.composerComposing)&&QI(n)}catch(v){At.finishQueueRetrieval(n,a,l?"rejected":"unknown"),m.selectedId===n&&(xi(qa(v,"\u53D6\u56DE\u7ED3\u679C\u672A\u77E5\uFF0C\u539F\u6587\u5DF2\u4FDD\u7559\uFF0C\u672A\u81EA\u52A8\u91CD\u8BD5\u3002"),n),Gl(n))}finally{dc.delete(n),m.selectedId===n&&kn()}}}}function QI(e){if(!(m.selectedId===e&&m.composerComposing)&&At.restoreQueueRetrieval(e)&&m.selectedId===e){bc(e);var t=document.getElementById("input-box");if(t){xm(t);try{t.focus({preventScroll:!0})}catch{t.focus()}}ow(!1),kn()}}function SQ(e){var t=m.sessions.find(function(n){return n.id===m.selectedId}),r=t?.queuedMessages?.[e];typeof r=="string"&&$Q(t.id,"/"+e,{expectedText:r},[r])}function FQ(){var e=m.sessions.find(function(t){return t.id===m.selectedId});e?.queuedMessages?.length&&$Q(e.id,"",{expectedQueue:e.queuedMessages.slice()},e.queuedMessages.slice())}async function $Q(e,t,r,n){if(!(dc.has(e)||Js.has(e))){var a=At.beginQueueRemoval(e,n);if(a){var o=!1;Js.add(e);var l=ui.advance(e,"local");kn();try{var u=await Nr("/api/structured-sessions/"+encodeURIComponent(e)+"/queued"+t,{method:"DELETE",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),d=await u.json();if(!u.ok)throw o=u.status>=400&&u.status<500&&u.status!==408&&u.status!==409,new Error(d.error||"\u65E0\u6CD5\u66F4\u65B0\u6392\u961F\u6D88\u606F\u3002");if(d.id!==e||!Array.isArray(d.queuedMessages))throw new Error("\u961F\u5217\u56DE\u6267\u65E0\u6548\uFF0C\u8BF7\u6838\u5BF9\u6700\u65B0\u72B6\u6001\u3002");m.sessions.some(function(p){return p.id===e})&&(Kt(ui.filter(d,e,l)),At.finishQueueRemoval(e,a,"confirmed"))}catch(p){At.finishQueueRemoval(e,a,o?"rejected":"unknown"),m.selectedId===e&&(xi(qa(p,"\u961F\u5217\u66F4\u65B0\u7ED3\u679C\u672A\u77E5\uFF0C\u672A\u81EA\u52A8\u91CD\u8BD5\u3002"),e),Gl(e))}finally{Js.delete(e),m.selectedId===e&&kn()}}}}async function r8e(e,t,r,n){if(Js.has(e)||dc.has(e))return;let a=t+r;if(t<0||t>=n.length||a<0||a>=n.length)return;let o=n.map((l,u)=>u);return[o[t],o[a]]=[o[a],o[t]],DQ(e,o,n)}async function DQ(e,t,r){if(m.selectedId!==e||Js.has(e)||dc.has(e))return;let n=m.sessions.find(o=>o.id===e)?.queuedMessages||[];if(JSON.stringify(n)!==JSON.stringify(r)){kn();return}Js.add(e);let a=ui.advance(e,"local");kn();try{let o=await Nr("/api/structured-sessions/"+encodeURIComponent(e)+"/queued",{method:"PATCH",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({order:t,expectedQueue:r})}),l=await o.json();if(!o.ok||l.id!==e||!Array.isArray(l.queuedMessages))throw new Error(l.error||"\u961F\u5217\u6392\u5E8F\u7ED3\u679C\u5F85\u6838\u5BF9\u3002");m.sessions.some(u=>u.id===e)&&Kt(ui.filter(l,e,a))}catch(o){m.selectedId===e&&(xi(qa(o,"\u6392\u5E8F\u7ED3\u679C\u672A\u77E5\uFF0C\u672A\u81EA\u52A8\u91CD\u8BD5\u3002"),e),Gl(e))}finally{Js.delete(e),m.selectedId===e&&kn()}}function AQ(e){if(!m.queueBarPromoting){var t=m.sessions.find(function(p){return p.id===m.selectedId});if(!(!t||dc.has(t.id)||Js.has(t.id))){var r=Array.isArray(t.queuedMessages)?t.queuedMessages.slice():[];if(!(e<0||e>=r.length)){var n=r[e],a=r.slice(0,e).concat(r.slice(e+1)),o=!!(t.structuredState&&t.structuredState.inFlight&&t.status==="running");m.queueBarPromoting=!0,a.length===0&&(m.queueBarExpanded=!1);var l=ui.advance(t.id,"local");Kt({id:t.id,queuedMessages:a});var u=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,10),d=kQ(o?"\u6B63\u5728\u63D2\u961F\u53D1\u9001\uFF0C\u51C6\u5907\u6253\u65AD\u5F53\u524D\u56DE\u590D\u2026":"\u6B63\u5728\u53D1\u9001\u8FD9\u6761\u2026",t.id,o?"\u5DF2\u4E2D\u65AD\u4E0A\u4E00\u6761\u56DE\u590D\uFF0C\u8FD9\u6761\u7ACB\u5373\u53D1\u9001\u3002":"\u5DF2\u7ACB\u5373\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002");Nr("/api/structured-sessions/"+t.id+"/queued/"+e+"/promote",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({expectedText:n,idempotencyKey:u})}).then(function(p){return p.ok?p.json():p.json().catch(function(){return{}}).then(function(h){throw new Error(h&&h.error||"\u7ACB\u5373\u53D1\u9001\u5931\u8D25")})}).then(function(p){if(p&&p.id&&(p=ui.filter(p,t.id,l),Kt(p),p.id===m.selectedId)){var h=m.sessions.find(function(v){return v.id===p.id})||p;m.currentMessages=Ks(h,pc(h,p.output,!1)),ba(!0),kn()}Rk(t.id,d),m.queueBarPromoting=!1}).catch(function(p){m.queueBarPromoting=!1,m.selectedId===t.id&&Gl(t.id),xi(p&&p.message||"\u7ACB\u5373\u53D1\u9001\u7ED3\u679C\u672A\u77E5\uFF0C\u8BF7\u6838\u5BF9\u5BF9\u8BDD\uFF1B\u672A\u81EA\u52A8\u91CD\u8BD5\u3002",t.id)})}}}}function BQ(e,t){if(!(m.queueBarDrag||!e.target?.closest?.(".queue-drag-handle"))){var r=m.sessions.find(function(E){return E.id===m.selectedId});if(!(!r||dc.has(r.id)||Js.has(r.id))){var n=Array.isArray(r.queuedMessages)?r.queuedMessages.slice():[];if(!(n.length<=1)&&t){var a=t.parentElement;if(a){var o=Number(t.getAttribute("data-index")),l=Array.prototype.slice.call(a.children),u=l.map(function(E){return E.getBoundingClientRect()}),d=3;u.length>=2&&(d=Math.max(0,u[1].top-u[0].top-u[0].height)),e.preventDefault();var p=t.querySelector(".queue-drag-handle");if(p){p.focus({preventScroll:!0});try{p.setPointerCapture(e.pointerId)}catch{}if(navigator&&navigator.vibrate)try{navigator.vibrate(8)}catch{}m.queueBarDrag={pointerId:e.pointerId,handleEl:p,itemEl:t,listEl:a,siblings:l,rects:u,origIndex:o,targetIndex:o,startY:e.clientY,gap:d,queueSnapshot:n,sessionId:r.id},t.classList.add("dragging"),l.forEach(function(E){E!==t&&E.classList.add("queue-bar-item-sliding")});var h=function(E){a8e(E)},v=function(E){sm(E)},g=function(E){sm(E,!0)},b=function(){sm(null,!0)},x=function(){document.hidden&&sm(null,!0)},y=function(E){E.key==="Escape"&&sm(null,!0)};Object.assign(m.queueBarDrag,{moveHandler:h,upHandler:v,cancelHandler:g,blurHandler:b,hiddenHandler:x,keyHandler:y}),p.addEventListener("pointermove",h),p.addEventListener("pointerup",v),p.addEventListener("pointercancel",g),p.addEventListener("lostpointercapture",g),window.addEventListener("blur",b),document.addEventListener("visibilitychange",x),document.addEventListener("keydown",y,!0)}}}}}}function n8e(e,t,r,n){for(var a=r.length,o=[],l=0;l<a;l++)o.push(l);o.splice(e,1),o.splice(t,0,e);for(var u=r[0].top,d=1;d<a;d++)r[d].top<u&&(u=r[d].top);for(var p={},h=u,v=0;v<a;v++){var g=o[v];p[g]=h,h+=r[g].height+n}return p}function a8e(e){var t=m.queueBarDrag;if(!(!t||e.pointerId!==t.pointerId)){e.preventDefault();var r=e.clientY-t.startY;t.itemEl.style.transform="translateY("+r+"px)";for(var n=t.rects[t.origIndex].top+t.rects[t.origIndex].height/2+r,a=t.origIndex,o=0;o<t.rects.length;o++)if(o!==t.origIndex){var l=t.rects[o].top+t.rects[o].height/2;o<t.origIndex&&n<l?a=Math.min(a,o):o>t.origIndex&&n>l&&(a=Math.max(a,o))}if(a!==t.targetIndex){t.targetIndex=a;var u=n8e(t.origIndex,a,t.rects,t.gap);t.siblings.forEach(function(d,p){if(p!==t.origIndex){var h=u[p]-t.rects[p].top;d.style.transform=h?"translateY("+h+"px)":""}})}}}function sm(e,t=!1){var r=m.queueBarDrag;if(!(!r||e&&e.pointerId!==r.pointerId)){m.queueBarDrag=null,r.handleEl.removeEventListener("pointermove",r.moveHandler),r.handleEl.removeEventListener("pointerup",r.upHandler),r.handleEl.removeEventListener("pointercancel",r.cancelHandler),r.handleEl.removeEventListener("lostpointercapture",r.cancelHandler),window.removeEventListener("blur",r.blurHandler),document.removeEventListener("visibilitychange",r.hiddenHandler),document.removeEventListener("keydown",r.keyHandler,!0);try{r.handleEl.releasePointerCapture(r.pointerId)}catch{}var n=r.origIndex,a=r.targetIndex,o=r.queueSnapshot;if(r.siblings.forEach(function(h){h.style.transform="",h.classList.remove("queue-bar-item-sliding")}),r.itemEl.classList.remove("dragging"),t||!e||e.type!=="pointerup"||n===a){kn();return}for(var l=[],u=0;u<o.length;u++)l.push(u);l.splice(n,1),l.splice(a,0,n);var d=m.sessions.find(function(h){return h.id===m.selectedId});if(!d||d.id!==r.sessionId){kn();return}var p=Array.isArray(d.queuedMessages)?d.queuedMessages:[];if(p.length!==o.length||p.some(function(h,v){return h!==o[v]})){kn(),xi("\u6392\u961F\u5185\u5BB9\u5DF2\u66F4\u65B0\uFF0C\u8BF7\u91CD\u65B0\u62D6\u52A8\u6392\u5E8F\u3002",d.id);return}DQ(d.id,l,o)}}function i8e(){var e=document.getElementById("queue-bar-host");!e||e.__queueDelegated||(e.__queueDelegated=!0,e.addEventListener("click",function(t){var r=t.target,n=r&&r.closest?r.closest("[data-action]"):null;if(n&&e.contains(n)){var a=n.getAttribute("data-action");if(a==="drag")return;if(t.preventDefault(),t.stopPropagation(),a==="edit"){var o=n.closest(".queue-bar-item");o&&CQ(Number(o.getAttribute("data-index")))}else if(a==="promote-item"){var l=n.closest(".queue-bar-item");l&&AQ(Number(l.getAttribute("data-index")))}else if(a==="delete"){var u=n.closest(".queue-bar-item");u&&SQ(Number(u.getAttribute("data-index")))}else a==="clear-all"?FQ():a==="restore-retrieved"?QI(m.selectedId):a==="dismiss-retrieved"&&(At.dismissQueueRetrieval(m.selectedId),kn());return}}),e.addEventListener("pointerdown",function(t){if(!(t.button!==void 0&&t.button!==0)){var r=t.target;if(r?.closest?.(".queue-drag-handle")){var n=r&&r.closest?r.closest(".queue-bar-item"):null;n&&BQ(t,n)}}}),e.addEventListener("keydown",function(t){t.key==="Escape"&&t8e()&&(t.stopPropagation(),ow(!1))}))}function Ks(e,t){var r=Array.isArray(t)?hC(t):[],n=Array.isArray(r)?r.slice():[];if(!e||e.sessionKind!=="structured")return n;if(e.structuredState&&e.structuredState.inFlight){for(var a=null,o=n.length-1;o>=0;o--){var l=n[o];if(l.role!=="user"||!Array.isArray(l.content)||l.content.some(function(u){return u?.type!=="tool_result"})){a=l;break}}(!a||a.role!=="assistant")&&n.push({role:"assistant",content:[{type:"text",text:"",__processing:!0}]})}return n}function lK(){var e=m.sessions.find(function(t){return t.id===m.selectedId});mC(e),Jd()}function IQ(e){var t=Rg(),r=t&&t.provider==="codex";return e&&(e.errorCode==="SESSION_NOT_RUNNING"||e.errorCode==="SESSION_NO_PTY")?r?"Codex \u4F1A\u8BDD\u5DF2\u7ED3\u675F\uFF1B\u82E5\u5B58\u5728 Codex \u5386\u53F2\u4F1A\u8BDD\uFF0C\u5C06\u5728\u4F60\u4E0B\u6B21\u53D1\u9001\u6D88\u606F\u65F6\u81EA\u52A8\u6062\u590D\u3002":"\u4F1A\u8BDD\u5DF2\u7ED3\u675F\uFF1B\u82E5\u5B58\u5728 Claude \u5386\u53F2\u4F1A\u8BDD\uFF0C\u5C06\u5728\u4F60\u4E0B\u6B21\u53D1\u9001\u6D88\u606F\u65F6\u81EA\u52A8\u6062\u590D\u3002":e&&e.errorCode==="SESSION_NOT_FOUND"?"\u4F1A\u8BDD\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6216\u65B0\u5EFA\u4F1A\u8BDD\u3002":e&&e.message||(r?"Codex \u4F1A\u8BDD\u6682\u4E0D\u53EF\u7528\uFF1B\u82E5\u5B58\u5728 Codex \u5386\u53F2\u4F1A\u8BDD\uFF0C\u5C06\u81EA\u52A8\u5C1D\u8BD5\u6062\u590D\u3002":"\u4F1A\u8BDD\u6682\u4E0D\u53EF\u7528\uFF1B\u82E5\u5B58\u5728 Claude \u5386\u53F2\u4F1A\u8BDD\uFF0C\u5C06\u81EA\u52A8\u5C1D\u8BD5\u6062\u590D\u3002")}function MQ(e){var t=new Error(e&&e.error||"\u4F1A\u8BDD\u5DF2\u7ED3\u675F\u3002");return e&&typeof e=="object"&&(t.errorCode=e.errorCode||null,t.sessionId=e.sessionId||m.selectedId||null,t.sessionStatus=Object.prototype.hasOwnProperty.call(e,"sessionStatus")?e.sessionStatus:null),t}function TQ(e){return e&&(e.errorCode==="SESSION_NOT_RUNNING"||e.errorCode==="SESSION_NO_PTY"||e.errorCode==="SESSION_NOT_FOUND")}function o8e(e,t){e&&Kt({id:e,status:t||"exited"})}function bw(e){return!!(e&&!gr(e)&&Iu.indexOf(e.provider)!==-1&&e.status!=="running"&&e.claudeSessionId)}function s8e(e){if(!e)return xi("\u4F1A\u8BDD\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6216\u65B0\u5EFA\u4F1A\u8BDD\u3002"),Promise.resolve(null);if(e.status==="running")return Promise.resolve(e);if(!bw(e)){var t=e&&bl[e.provider]||"Provider";return xi("\u8BE5\u4F1A\u8BDD\u6CA1\u6709\u53EF\u6062\u590D\u7684 "+t+" \u5386\u53F2\u4E0A\u4E0B\u6587\uFF0C\u8BF7\u65B0\u5EFA\u4F1A\u8BDD\u3002",e.id),Promise.resolve(null)}var r=KI(e.id);return aM(e.id).then(function(n){return n?(Kt(n),Si(),kC(n.id),Gl(n.id).then(function(){return r()&&Xl(!0),gr(n)?n:Mke().then(function(){return n})})):null})}function l8e(e,t){return[t,"\r"]}function u8e(e){return typeof e=="string"?e?{data:e}:null:e&&typeof e.data=="string"&&e.data?{data:e.data,shortcutKey:e.shortcutKey,image:!!e.image}:null}var c8e=3e3;function YI(e){return Object.assign(new Error(qa(e,"\u8F93\u5165\u63D0\u4EA4\u7ED3\u679C\u672A\u77E5\u3002")),e,{__wandAmbiguousDelivery:!0})}function d8e(e,t,r,n,a,o){var l=(Array.isArray(e)?e:[]).map(u8e).filter(Boolean);if(l.length===0)return Promise.resolve();var u=typeof r=="number"?r:0,d=0;return l.reduce(function(p,h,v){var g=h.shortcutKey!==void 0?h.shortcutKey:t&&(v===0||v===l.length-1)?t:void 0;return p.then(function(){if(v>0){var b=l[v-1],x=o?Dk(void 0,b&&b.image?c8e:void 0):u>0?new Promise(function(y){setTimeout(y,u)}):Promise.resolve();return x.then(function(){return fa(h.data,g,n,a)})}return fa(h.data,g,n,a)}).then(function(b){return d+=1,b})},Promise.resolve()).catch(function(p){throw d>0?YI(p):p})}var p8e=5e3,f8e=100;function uK(e){e&&(m.pendingMessages.length>=f8e&&m.pendingMessages.shift(),m.pendingMessages.push({input:e,at:Date.now()}))}function fa(e,t,r,n){var a=n||m.selectedId;if(!e||!a)return Promise.resolve();var o=r||m.currentView;if(o==="terminal"&&a===m.selectedId&&m.ws&&m.ws.readyState===WebSocket.OPEN){try{m.ws.send(JSON.stringify({type:"pty_input",sessionId:a,data:e,shortcutKey:t,userInput:!0}))}catch(u){return Promise.reject(u)}return Promise.resolve()}m.messageQueue.push(e);var l=m.inputQueue.then(function(){return m8e(e,t,r,a,!!n).finally(function(){var u=m.messageQueue.indexOf(e);u>-1&&m.messageQueue.splice(u,1)})});return m.inputQueue=l.catch(function(){}),l}function m8e(e,t,r,n,a){var o=n||m.selectedId;if(!o)return Promise.resolve();var l=r||m.currentView,u=m.sessions.find(function(v){return v.id===o}),d=!!u&&!gr(u)&&u.status==="running";if(!d){if(a){var p=new Error("\u76EE\u6807\u4F1A\u8BDD\u5DF2\u505C\u6B62\uFF0C\u6D88\u606F\u672A\u53D1\u9001\u3002");throw p.errorCode=u?"SESSION_NOT_RUNNING":"SESSION_NOT_FOUND",p}return m.wsConnected?(console.warn("[wand] postInput: session not running, skipping send",{sessionId:o}),Qe("\u4F1A\u8BDD\u672A\u8FD0\u884C\uFF0C\u6B63\u5728\u7B49\u5F85\u81EA\u52A8\u6062\u590D\u540E\u91CD\u8BD5\u3002","info"),Promise.resolve()):(uK(e),Promise.resolve())}if(!m.wsConnected){if(a)throw new Error("\u7F51\u7EDC\u5DF2\u65AD\u5F00\uFF0C\u6D88\u606F\u672A\u53D1\u9001\u3002");return uK(e),Promise.resolve()}var h=!1;return Nr("/api/sessions/"+o+"/input",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({input:e,view:l,shortcutKey:t||void 0})}).then(function(v){return v.ok?(h=!0,v.json()):v.json().catch(function(){return{error:"\u8BF7\u6C42\u5931\u8D25"}}).then(function(g){var b=MQ(g);throw b.httpStatus=v.status,console.error("[wand] postInput: request failed",{status:v.status,errorCode:b.errorCode,message:b.message,sessionId:o}),TQ(b)&&o8e(o,b.sessionStatus||"exited"),b})}).then(function(v){return v&&v.id&&(Kt(v),v.id===m.selectedId&&(v.messages&&v.messages.length>0&&(m.currentMessages=v.messages),ba(!0))),v}).catch(function(v){throw h?YI(v):v})}function Rg(){return m.sessions.find(function(e){return e.id===m.selectedId})||null}function JI(){return!!m.selectedId&&m.currentView==="terminal"}function cK(e){return!(!m.terminal||!e||e!==m.selectedId||m.terminalSessionId&&m.terminalSessionId!==e)}function _Q(e){return!!e&&(!!e.isComposing||e.keyCode===229||!!m.composerComposing)}function jQ(e){if(!m.terminalInteractive||!JI()||e.defaultPrevented||_Q(e))return!1;var t=e.target;return t?!(t.closest&&t.closest("#input-box")||v8e(t)):!0}var h8e={Esc:"escape",ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right",Enter:"enter",Tab:"tab",Backspace:"backspace",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown",Delete:"delete",Insert:"insert"," ":"space"},g8e={space:" ",tab:" ",shift_tab:"\x1B[Z",backspace:"\x7F",home:"\x1B[H",end:"\x1B[F",pageup:"\x1B[5~",pagedown:"\x1B[6~",delete:"\x1B[3~",insert:"\x1B[2~"},dK={" ":0,"[":27,"\\":28,"]":29,"^":30,_:31};function v8e(e){return e?!!(e.closest&&e.closest('[role="dialog"], [role="alertdialog"], .wand-ui-select-trigger, .wand-ui-select-content, [role="listbox"], [role="option"], [data-wand-popup-owner], .terminal-shortcuts, .pty-input-mode-toggle, .pty-modifier-toggle, .composer-actions-left button, .composer-actions-right button')):!1}var b8e=new Set(["ctrl","alt","shift"]);function NQ(e){return b8e.has(e)}function y8e(e){return g8e[e]||""}function w8e(e){var t=e.toLowerCase();return t>="a"&&t<="z"?String.fromCharCode(t.charCodeAt(0)-96):Object.prototype.hasOwnProperty.call(dK,t)?String.fromCharCode(dK[t]):""}function Ok(e){return h8e[e.key]||e.key}function x8e(e,t){return{ctrl:e.ctrlKey,alt:e.altKey,shift:e.shiftKey&&(t.length===1||t==="tab"),meta:e.metaKey}}function WB(e,t){e&&fa(e,t).catch(function(){})}function ZI(){WQ()}function E8e(){JI()&&gm(!m.terminalInteractive)}function k8e(e=!1){fc(e);var t=document.getElementById("file-upload-input");t&&t.click()}function PQ(e){return!!e&&!gr(e)&&e.status==="running"&&m.currentView==="terminal"}function eM(){return document.documentElement.classList.contains("is-wand-native-input")}function rp(){return eM()&&!document.documentElement.classList.contains("is-wand-terminal-passthrough")}function zk(){if(!rp())return!1;if(m.terminal&&m.terminal.element){var e=m.terminal.element.querySelector(".xterm-helper-textarea");if(e&&(e.readOnly=!0,e.setAttribute("aria-readonly","true"),document.activeElement===e))try{e.blur()}catch{}}return!0}var pK=!1;function C8e(){pK||!rp()||(pK=!0,document.addEventListener("focusin",function(e){var t=e.target;!t||!t.classList||!t.classList.contains("xterm-helper-textarea")||zk()},!0))}function gm(e,t){var r=t||{},n=!!e&&JI();if(m.terminalInteractive!==n){if(m.terminalInteractive=n,m.terminal&&m.terminal.element){var a=m.terminal.element.querySelector(".xterm-helper-textarea");a&&(a.readOnly=rp()?!0:!n)}n?(A8e(),r.focus!==!1&&!rp()&&ZI(),r.announce!==!1&&Qe("\u7EC8\u7AEF\u4EA4\u4E92\u6A21\u5F0F\u5DF2\u5F00\u542F","info")):B8e(),Wa();var o=document.getElementById("input-box");o&&ya(o)}}function dC(){var e=m.sessions.find(function(n){return n.id===m.selectedId}),t=PQ(e),r=!t;if(r&&m.terminalInteractive){gm(!1);return}if(t&&!m.terminalInteractive){gm(!0,{announce:!1,focus:!1});return}Wa()}function Wa(e=!1){e||Xk(ya);var t=m.sessions.find(function(q){return q.id===m.selectedId}),r=gr(t),n=t&&t.provider==="codex",a=r?!!(t&&t.structuredState&&t.structuredState.inFlight):!!t&&t.status==="running",o=document.getElementById("input-box"),l=document.querySelector(".input-composer"),u=m.promptOptimizeRequest,d=!!(u&&u.sessionId===m.selectedId),p=!!u,h=PQ(t),v=!r&&!a&&bw(t);if(!e){FSe({resolve:function(){return{interactiveVisible:!(r||m.currentView!=="terminal"||!t||h),interactiveOn:m.terminalInteractive}},onAttach:function(q){k8e(q)},onToggleInteractive:E8e}),o&&(o.placeholder=dY(t,m.terminalInteractive),o.disabled=!r&&!!t&&!a&&!v,o.setAttribute("aria-disabled",o.disabled?"true":"false"),o.readOnly=d,o.setAttribute("aria-readonly",o.readOnly?"true":"false"),o.setAttribute("aria-busy",d?"true":"false"),o.classList.toggle("is-terminal-passthrough",!!m.terminalInteractive&&!document.documentElement.classList.contains("is-wand-embed-terminal"))),l&&(l.classList.toggle("is-optimizing",d),l.classList.toggle("is-terminal-interactive",!!m.terminalInteractive)),ESe({active:function(){return!!m.terminalInteractive&&!document.documentElement.classList.contains("is-wand-embed-terminal")},submit:function(){Fm(void 0)},focusInput:function(){lM(document.getElementById("input-box"))}}),EI();var g=document.getElementById("prompt-optimize-btn");if(g){g.hidden=m.terminalInteractive,g.disabled=p,g.classList.toggle("is-loading",d),g.setAttribute("aria-busy",d?"true":"false"),g.setAttribute("aria-label",d?"\u6B63\u5728\u4F18\u5316\u63D0\u793A\u8BCD":p?"\u5176\u4ED6\u4F1A\u8BDD\u6B63\u5728\u4F18\u5316\u63D0\u793A\u8BCD":"\u4F18\u5316\u63D0\u793A\u8BCD"),g.setAttribute("title",d?"\u6B63\u5728\u4F18\u5316\u2026":p?"\u5176\u4ED6\u4F1A\u8BDD\u6B63\u5728\u4F18\u5316\u2026":"\u4F18\u5316\u63D0\u793A\u8BCD");var b=g.querySelector(".prompt-optimize-label");b&&(b.textContent=d?"\u4F18\u5316\u4E2D":"\u4F18\u5316")}}var x=document.getElementById("send-input-button"),y=r&&a;if(x){var E=!r&&!!t&&!a&&!v,F=o?o.value:"",S=$w(m.selectedId),D=$C(F,m.selectedId),$=!!(D&&At.pendingSubmission(m.selectedId,{text:F,attachments:S})),C=d||!D||$||E,B=EQ(),M=B?LB:"",I=B&&Pk||KSe(t,D);I==="running"&&(C=!1),m.selectedId&&pk.has(m.selectedId)&&(C=!0),x.disabled!==C&&(x.disabled=C),x.getAttribute("aria-disabled")!==String(C)&&x.setAttribute("aria-disabled",String(C)),x.dataset.phase!==I&&(x.dataset.phase=I);var j=d?"\u6B63\u5728\u4F18\u5316\u63D0\u793A\u8BCD":r?y?"\u52A0\u5165\u5F85\u53D1\u9001\u961F\u5217":"\u53D1\u9001":n?a?"\u53D1\u9001\u7ED9 Codex":"Codex \u4F1A\u8BDD\u5DF2\u7ED3\u675F":!t||a||v?"\u53D1\u9001":"\u4F1A\u8BDD\u5DF2\u7ED3\u675F",N=d?"\u6B63\u5728\u4F18\u5316\u63D0\u793A\u8BCD":y?"\u52A0\u5165\u53D1\u9001\u961F\u5217":"\u53D1\u9001\u6D88\u606F",R=YSe(I,j,N,M);x.title!==R.title&&(x.title=R.title),x.getAttribute("aria-label")!==R.label&&x.setAttribute("aria-label",R.label),x.classList.toggle("queue-mode",y&&I!=="running"),JSe(I,M,n)}if(!e){var L=document.getElementById("output");L&&L.classList.toggle("interactive",!r&&m.terminalInteractive),D8e(),TEe(ya),S8e()}}function S8e(){var e=document.getElementById("chat-running-host");if(e){var t=m.sessions.find(function(n){return n.id===m.selectedId}),r=!!t&&document.getElementById("chat-output")!=null&&!document.getElementById("chat-output").classList.contains("hidden");if(!r){dSe(e);return}cSe(e,t?{...t,ptyRunning:N0(t).ptyRunning,turnStartedAt:t.ptyTurnStartedAt,lastActivityAt:t.ptyLastActivityAt}:null)}}function sw(){var e=window.getSelection&&window.getSelection();if(!e||e.isCollapsed)return!1;var t=document.getElementById("output");if(!t)return!1;var r=e.anchorNode;return r&&r.nodeType===3&&(r=r.parentNode),!!(r&&t.contains(r))}function RQ(e){if(jQ(e)&&!e.metaKey){var t=Ok(e);if(t){var r=x8e(e,t),n={...r,...Yy(m.selectedId,r)};if(!NQ(t)&&!(r.ctrl&&t.length===1&&t.toLowerCase()==="c"&&sw())){var a=tM(t,n);a&&(e.preventDefault(),WB(a,t))}}}}function F8e(){m.terminal&&Ike(500)}function $8e(e){var t=Rg();if(!(!t||gr(t)||eM())&&t.status==="running"){if(e==="enter"){if(m.composerComposing||m.terminalComposing)return;var r=document.getElementById("input-box");m.terminalInteractive||$C(r?r.value:"",t.id)?Fm(void 0):WB("\r","enter_text");return}WB(tM(e,Yy(t.id,{ctrl:!1,shift:!1})),e),F8e()}}function D8e(){var e=document.getElementById("terminal-shortcuts");if(e){var t=Rg();e.hidden=!t||gr(t)||eM(),!e.hidden&&mSe(e,t.status!=="running",$8e,t.id)}}function A8e(){if(m.terminal&&m.terminal.element){var e=m.terminal.element.querySelector(".xterm-helper-textarea");e&&(e.readOnly=!!rp())}}function B8e(){if(document.removeEventListener("keydown",RQ,!0),m.terminal&&m.terminal.element){var e=m.terminal.element.querySelector(".xterm-helper-textarea");e&&(e.readOnly=!0)}}function tM(e,t){var r=t||{ctrl:!1,alt:!1,shift:!1};if(NQ(e))return"";var n=eC(e,r);if(n!==null)return n;if(e==="tab"&&r.shift)return"\x1B[Z";var a=y8e(e);if(a)return a;if(e.indexOf("ctrl_")===0)return String.fromCharCode(e.charCodeAt(e.length-1)-96);var o=Dg(e);if(o)return o;if(!e)return"";var l=e.length===1?e:"";return l?(r.shift&&(l=l.toUpperCase()),r.ctrl?w8e(l):r.alt?"\x1B"+l:l):""}function Dg(e){switch(e){case"yes":return"y\r";case"no":return"n\r";case"up":return"\x1B[A";case"down":return"\x1B[B";case"left":return"\x1B[D";case"right":return"\x1B[C";case"enter":return"\r";case"ctrl_c":return"";case"ctrl_d":return"";case"ctrl_l":return"\f";case"ctrl_u":return"";case"ctrl_k":return"\v";case"ctrl_w":return"";case"ctrl_z":return"";case"escape":return"\x1B";default:return""}}function I8e(){if(m.pendingMessages.length!==0){var e=Rg();if(gr(e)){m.pendingMessages=[];return}var t=Date.now(),r=[],n=0;m.pendingMessages.forEach(function(o){if(typeof o=="string"){r.push(o);return}if(!(!o||typeof o.input!="string")){if(t-(o.at||0)>p8e){n++;return}r.push(o.input)}}),m.pendingMessages=[];var a=Promise.resolve();r.forEach(function(o){a=a.then(function(){return M8e(o).catch(function(){})})})}}function M8e(e){if(!e||!m.selectedId)return Promise.resolve();var t=m.selectedId;return Nr("/api/sessions/"+t+"/input",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({input:e,view:m.currentView})}).then(function(r){return r.ok?r.json():r.json().catch(function(){return{error:"\u8BF7\u6C42\u5931\u8D25"}}).then(function(n){var a=MQ(n);if(a.httpStatus=r.status,TQ(a))return null;throw a})}).then(function(r){return r&&r.id&&(Kt(r),r.id===m.selectedId&&(r.messages&&r.messages.length>0&&(m.currentMessages=r.messages),ba(!0))),r})}function UB(){if(!(!m.selectedId||pk.has(m.selectedId))){var e=m.selectedId;return pk.add(e),Wa(),OI(Sy("stop.confirm.message"),{title:Sy("stop.confirm.title"),danger:!0,okLabel:Sy("stop.confirm.ok"),cancelLabel:Sy("stop.confirm.cancel")}).then(function(t){if(t&&m.selectedId===e){var r=m.sessions.find(function(a){return a.id===e});if(r){var n=gr(r)?Nr("/api/sessions/"+e+"/stop",{method:"POST",credentials:"same-origin"}).then(function(a){return It(a)}).then(function(a){if(!a||a.id!==e)throw new Error("\u505C\u6B62\u56DE\u590D\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u4F1A\u8BDD\u72B6\u6001\u3002");Kt(a)}):fa(Dg("ctrl_c"),"ctrl_c","chat",e);return n.then(function(){m.selectedId===e&&qB("\u5DF2\u8BF7\u6C42\u505C\u6B62\u5F53\u524D\u56DE\u590D\u3002"),Ql()})}}}).catch(function(t){m.selectedId===e?xi(qa(t,"\u65E0\u6CD5\u505C\u6B62\u5F53\u524D\u56DE\u590D\u3002")):Qe(qa(t,"\u65E0\u6CD5\u505C\u6B62\u539F\u4F1A\u8BDD\u7684\u56DE\u590D\u3002"),"error")}).finally(function(){pk.delete(e),Wa()})}}function rM(e){var t=m.sessions.find(function(n){return n.id===e}),r=t&&t.claudeSessionId;setTimeout(function(){Nr("/api/sessions/"+e,{method:"DELETE",credentials:"same-origin"}).then(function(n){return n.json()}).then(function(n){if(n&&n.error)throw new Error(n.error);return At.retain(new Set(m.sessions.filter(function(a){return a.id!==e}).map(function(a){return a.id}))),m.selectedId===e&&(tC(),m.selectedId=null,ip()),r&&(m.claudeHistory=m.claudeHistory.filter(function(a){return a.claudeSessionId!==r}),m.codexHistory=m.codexHistory.filter(function(a){return a.claudeSessionId!==r})),Ql()}).catch(function(){Mk("\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002")})},250)}function T8e(e,t){t&&t.classList.add("deleting"),setTimeout(function(){fetch("/api/claude-history/"+encodeURIComponent(e),{method:"DELETE",credentials:"same-origin"}).then(function(r){return r.json()}).then(function(r){if(r&&r.error)throw new Error(r.error);m.claudeHistory=m.claudeHistory.filter(function(n){return n.claudeSessionId!==e}),delete m.selectedClaudeHistoryIds[e],Si()}).catch(function(){t&&t.classList.remove("deleting"),Mk("\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002")})},250)}function nM(e,t){T8e(e,t)}var Q9=!1;function aM(e){return!e||Q9?Promise.resolve(null):(Q9=!0,Nr("/api/sessions/"+encodeURIComponent(e)+"/resume",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Yl({mode:m.chatMode||m.config.defaultMode||"default"}))}).then(function(t){return t.json()}).then(function(t){return t.error?(Qe(t.error,"error"),null):t}).catch(function(t){var r=t&&t.message||"\u65E0\u6CD5\u6062\u590D\u4F1A\u8BDD\u3002";return Qe(r,"error"),null}).finally(function(){Q9=!1}))}function yw(e){return!e||!e.id?Promise.resolve():(Kt(e),Promise.resolve(An(e.id)))}function iM(e){return aM(e).then(function(t){return t?(t.claudeSessionId&&(t.provider==="codex"?m.codexHistory=m.codexHistory.filter(function(r){return r.claudeSessionId!==t.claudeSessionId}):m.claudeHistory=m.claudeHistory.filter(function(r){return r.claudeSessionId!==t.claudeSessionId})),yw(t).then(function(){return t})):null})}function OQ(e,t,r){return fetch("/api/"+e+"-sessions/"+encodeURIComponent(t)+"/resume",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Yl({mode:m.chatMode||m.config&&m.config.defaultMode||"default",cwd:r}))}).then(function(n){return n.json()}).then(function(n){return n.error?(Qe(n.error,"error"),null):n}).catch(function(n){return Qe(n&&n.message||"\u65E0\u6CD5\u6062\u590D\u4F1A\u8BDD\u3002","error"),null})}function _8e(e,t){return OQ("codex",e,t)}function j8e(e,t){return OQ("claude",e,t)}function oM(e,t,r){var n=e==="codex"?_8e(t,r):e==="claude"?j8e(t,r):fetch("/api/"+encodeURIComponent(e)+"-sessions/"+encodeURIComponent(t)+"/resume",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({mode:m.chatMode||m.config&&m.config.defaultMode||"default",cwd:r})}).then(function(a){return a.json()}).then(function(a){if(a&&a.error)throw new Error(a.error);return a});return n.then(function(a){return!a||!a.id?null:(e==="codex"?m.codexHistory=m.codexHistory.filter(function(o){return o.claudeSessionId!==t}):e==="claude"&&(m.claudeHistory=m.claudeHistory.filter(function(o){return o.claudeSessionId!==t})),yw(a).then(function(){return Ei(),a}))})}function pC(e,t){return fetch("/api/"+encodeURIComponent(e)+"-history/"+encodeURIComponent(t),{method:"DELETE",credentials:"same-origin"}).then(function(r){return r.json()}).then(function(r){if(!r||r.ok!==!0)throw new Error(r&&r.error||"\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002");return Si(),r})}function sM(e){return fetch("/api/codex-history/"+encodeURIComponent(e),{method:"DELETE",credentials:"same-origin"}).then(function(t){return t.json()}).then(function(t){if(!t||t.ok!==!0)throw new Error(t&&t.error||"\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002");return m.codexHistory=m.codexHistory.filter(function(r){return r.claudeSessionId!==e}),Si(),t})}function hc(){return"ontouchstart"in window||navigator.maxTouchPoints>0}function Xl(e){if(!m.terminalInteractive){var t=document.getElementById("input-box");!t||!m.selectedId||document.activeElement!==t&&(e&&hc()||lM(t))}}function zQ(){var e=document.querySelector(".input-panel");e&&e.style.removeProperty("--keyboard-offset")}function LQ(e){if(e){var t=e.selectionStart,r=e.selectionEnd;Lk(e),typeof t=="number"&&typeof r=="number"&&e.setSelectionRange(t,r)}}function HQ(e){!e||e.dataset.touchScrollBound==="true"||(e.dataset.touchScrollBound="true",e.addEventListener("touchstart",function(){e.scrollHeight<=e.clientHeight+1||(e.scrollTop<=0?e.scrollTop=1:e.scrollTop+e.clientHeight>=e.scrollHeight&&(e.scrollTop=Math.max(1,e.scrollHeight-e.clientHeight-1)))},{passive:!0}))}function qQ(e){e&&(ya(e),LQ(e))}function N8e(e){var t=e&&e.target?e.target:document.getElementById("input-box");t&&(zQ(),qQ(t))}function P8e(e){var t=e&&e.target?e.target:document.getElementById("input-box");if(zQ(),t&&ya(t),!!hc()){FX(2200,t);var r=[80,200,380,620,900];r.forEach(function(n,a){setTimeout(function(){document.activeElement!==t&&(kg(!1),t&&t.value&&ya(t),a===1&&hc()&&(ro("keyboard-blur",{forceReplay:!0}),ql("keyboard")))},n)})}}function R8e(e){e&&(e.setSelectionRange(e.value.length,e.value.length),LQ(e))}function lM(e){e&&(e.focus({preventScroll:!0}),R8e(e))}function O8e(e){HQ(e),qQ(e)}function wy(e){O8e(e)}function z8e(e,t){if(!e||!t||document.activeElement!==t)return!1;var r=window.innerHeight-e.height-e.offsetTop;if(r<=50)return!1;var n=t.getBoundingClientRect();return n.bottom>e.offsetTop+e.height-12}function Lk(e){if(e){var t=e.scrollHeight>e.clientHeight+1;if(!t){e.scrollTop=0;return}e.scrollTop=e.scrollHeight}}function fK(){if(m.terminalInteractive){WQ();return}if(!hc()){var e=document.getElementById("input-box");!e||!m.selectedId||document.activeElement===e||lM(e)}}function WQ(){if(rp()){zk();return}var e=document.getElementById("output");e&&(e.setAttribute("tabindex","0"),e.focus(),m.terminal&&m.terminal.focus&&m.terminal.focus())}function L8e(){var e=document.querySelector(".input-panel"),t=document.querySelector(".chat-messages");if("virtualKeyboard"in navigator){var r=navigator.virtualKeyboard;r.addEventListener("geometrychange",function(){e&&e.style.removeProperty("padding-bottom")})}var n=document.getElementById("output");n&&n.addEventListener("click",function(){fK()}),t&&t.addEventListener("click",function(a){var o=a.target;o.tagName!=="A"&&o.tagName!=="BUTTON"&&!o.closest("button")&&!o.closest("[data-tool-toggle]")&&fK()}),document.addEventListener("click",function(a){if(hc()){var o=document.getElementById("input-box");if(!(!o||document.activeElement!==o)){var l=a.target;!l||typeof l.closest!="function"||l.closest(".input-panel")||o.blur()}}},!0)}function VB(){try{window.scrollTo(0,0)}catch{}document.scrollingElement&&(document.scrollingElement.scrollTop=0),document.documentElement&&(document.documentElement.scrollTop=0),document.body&&(document.body.scrollTop=0)}function H8e(){return UQ().filter(function(e){return!!m.selectedSessionIds[e.id]}).map(function(e){return e.id})}function uM(){m.selectedSessionIds={},m.selectedClaudeHistoryIds={},m.selectedCodexHistoryIds={}}function cM(e){m.sessionsManageMode=typeof e=="boolean"?e:!m.sessionsManageMode,m.sessionsManageMode||uM(),Si()}function UQ(){return m.sessions.filter(function(e){return e.sessionSource!=="quick-terminal"})}function dM(){var e={};UQ().forEach(function(t){e[t.id]=!0}),m.selectedSessionIds=e,m.selectedClaudeHistoryIds={},m.selectedCodexHistoryIds={},Si()}function pM(){uM(),Si()}function fM(e,t){if(!(!m.sessionsManageMode||!t)){var r=e==="history"?m.selectedClaudeHistoryIds:e==="codex"?m.selectedCodexHistoryIds:m.selectedSessionIds;r[t]?delete r[t]:r[t]=!0,Si()}}function ww(e,t){return OI(e,Object.assign({type:"danger",danger:!0,okLabel:"\u5220\u9664"},t||{}))}function mM(){var e=H8e(),t=e.length;t&&ww("\u786E\u8BA4\u5220\u9664\u6240\u9009 "+t+" \u9879\u5417\uFF1F\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002",{title:"\u5220\u9664\u6240\u9009 "+t+" \u9879"}).then(function(r){r&&fetch("/api/sessions/batch-delete",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({sessionIds:e})}).then(function(n){return It(n)}).then(function(n){var a=n&&Array.isArray(n.failed)?n.failed:[];return a.length>0&&Mk("\u6709 "+a.length+" \u4E2A\u4F1A\u8BDD\u672A\u80FD\u5220\u9664\uFF0C\u8BF7\u91CD\u8BD5\u3002"),e.indexOf(m.selectedId)!==-1&&a.indexOf(m.selectedId)===-1&&(m.selectedId=null,ip()),uM(),a.forEach(function(o){m.selectedSessionIds[o]=!0}),Ql()}).catch(function(n){Mk(qa(n,"\u65E0\u6CD5\u6279\u91CF\u5220\u9664\u6240\u9009\u9879\u76EE\u3002"))})})}function mK(){return window.innerWidth<=768}function Ao(){return zK({width:window.innerWidth,height:window.innerHeight,coarsePointer:typeof window.matchMedia=="function"&&window.matchMedia("(pointer: coarse)").matches})}function Og(e){m.filePanelOpen=e;try{localStorage.setItem("wand-file-panel-open",String(m.filePanelOpen))}catch{}m.filePanelOpen&&Ao()&&(m.sessionsDrawerOpen=!1,Qr("wand-sidebar-open",!1)),Ul()}function hM(){Og(!m.filePanelOpen)}function q8e(){Ua("layout:files")}function Ul(){ym(),q8e()}function W8e(e){Ua("layout:file-cwd")}function gM(){m.filePanelOpen&&Og(!1)}function vm(e){xw(m.terminalScale+e)}function xw(e){var t=Math.max(.5,Math.min(2,e));if(t=Math.round(t*4)/4,t!==m.terminalScale){m.terminalScale=t;try{localStorage.setItem("wand-terminal-scale",String(t))}catch{}V8e()}}function U8e(e){if(!e||e.altKey||!(e.metaKey||e.ctrlKey)||m.currentView!=="terminal")return!1;var t=e.key==="="||e.key==="+"?.25:e.key==="-"||e.key==="_"?-.25:e.key==="0"?0:null;if(t===null)return!1;var r=e.target;return r&&r.closest&&r.closest("input, textarea, [contenteditable='true']")&&(!r.classList||!r.classList.contains("xterm-helper-textarea"))?!1:(e.preventDefault(),t===0?xw(1):vm(t),!0)}function V8e(){if(!(!m.terminal||!m.terminal.element)){var e=m.terminalBaseFontSize*m.terminalScale,t=Math.max(1,Math.round(e));m.terminal.options.fontSize=t,requestAnimationFrame(function(){!m.terminal||!m.terminalFitAddon||Zd(m.terminal,m.terminalFitAddon)})}}function vM(e){var t=document.getElementById("input-box");if(!t)return!1;var r=t.value||"",n=r&&!r.endsWith(" ")&&!r.endsWith(`
289
+ `)?" ":"";t.value=r+n+e,t.dispatchEvent(new Event("input",{bubbles:!0}));try{t.focus(),t.setSelectionRange(t.value.length,t.value.length)}catch{}return!0}function bM(e){if(navigator.clipboard&&navigator.clipboard.writeText)return navigator.clipboard.writeText(e).then(function(){return!0}).catch(function(){return t()});return Promise.resolve(t());function t(){try{var r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.left="-9999px",document.body.appendChild(r),r.select();var n=document.execCommand("copy");return document.body.removeChild(r),n}catch{return!1}}}function G8e(e){nSe(e)}function K8e(e,t){if(!(!m.selectedId||!e)){var r=m.selectedId+":"+e;if(m.toolContentCache[r]){t(null,m.toolContentCache[r]);return}fetch("/api/sessions/"+encodeURIComponent(m.selectedId)+"/tool-content/"+encodeURIComponent(e),{credentials:"same-origin"}).then(function(n){return It(n)}).then(function(n){m.toolContentCache[r]=n,t(null,n)}).catch(function(n){if(n instanceof Pa){t(qa(n,"\u52A0\u8F7D\u5931\u8D25")+"\uFF08HTTP "+n.status+"\uFF09",null);return}t(qa(n,"\u52A0\u8F7D\u5931\u8D25"),null)})}}function X8e(e){var t=m.config&&m.config.cardDefaults&&m.config.cardDefaults[e];return e==="thinking"&&t==null?!0:!!t}function yM(e,t,r,n){if(!(!e||e.dataset.truncated!=="true"||e.dataset.loaded==="true")){var a=e.dataset.toolUseId;a&&(t&&(t.innerHTML='<div class="tool-content-loading">\u52A0\u8F7D\u4E2D\u2026</div>'),e.dataset.loaded="loading",K8e(a,function(o,l){if(o){t&&(t.innerHTML=n||'<div class="tool-content-error">\u52A0\u8F7D\u5931\u8D25\uFF0C\u70B9\u51FB\u91CD\u8BD5</div>'),e.dataset.loaded="";return}e.dataset.truncated="false",e.dataset.loaded="true";var u=typeof l.content=="string"?l.content:JSON.stringify(l.content);r(u,l)}))}}window.__tcToggle=function(e,t){var r=t.closest(".chat-tool-card")||t.closest(".inline-diff");if(r){var n=r.classList.contains("collapsed");r.classList.toggle("collapsed");var a=n;t.setAttribute("aria-expanded",a?"true":"false");var o=r.querySelector(".chat-tool-body, .diff-body");o&&o.setAttribute("aria-hidden",a?"false":"true");var l=r.dataset.expandKind||"tool-card";if(zg(r,l),n){var u=r.querySelector(".tool-use-result");yM(r,u,function(d){u&&(u.innerHTML='<pre class="tool-use-result-content">'+mc(d)+"</pre>")},`<div class="tool-content-error" onclick="__tcToggle(null, this.closest('.chat-tool-card,.inline-diff').querySelector('.chat-tool-header,.diff-header'))">\u52A0\u8F7D\u5931\u8D25\uFF0C\u70B9\u51FB\u91CD\u8BD5</div>`)}}e&&(e.preventDefault(),e.stopPropagation())};window.__openAuthorSession=function(e){typeof e=="string"&&e&&An(e)};window.__thinkingToggle=function(e){var t=e.classList.contains("collapsed");e.classList.toggle("collapsed",!t),e.classList.toggle("expanded",t),zg(e,"thinking")};window.__piExecutionOpen=function(e,t){e.preventDefault(),e.stopPropagation();let r=t.dataset.toolId;!m.selectedId||!r||!ki(["piExecution"])||Bd.open(m.selectedId,r,t)};window.__agentRunToggle=function(e,t){e&&(e.preventDefault(),e.stopPropagation());var r=t&&t.closest?t.closest(".agent-run"):null;if(r){var n=r.getAttribute("data-expanded")!=="true";EM(r,"agent-run",n),zg(r,"agent-run"),TK(r)}};window.__agentRunSelect=function(e,t){var r=t&&t.closest?t.closest(".agent-run"):null;if(r){var n=Array.prototype.slice.call(r.querySelectorAll(".agent-run-agent"));if(n.length){var a=e&&e.type==="keydown"?String(e.key||""):"";if(a){if(a!=="ArrowLeft"&&a!=="ArrowRight"&&a!=="Home"&&a!=="End")return;e&&(e.preventDefault(),e.stopPropagation());var o=n.indexOf(t);o<0&&(o=0);var l=o;a==="ArrowLeft"?l=(o-1+n.length)%n.length:a==="ArrowRight"?l=(o+1)%n.length:a==="Home"?l=0:a==="End"&&(l=n.length-1);var u=n[l];hK(r,n,u);try{u.focus()}catch{}return}e&&e.stopPropagation(),hK(r,n,t)}}};function hK(e,t,r){if(!(!e||!r)){for(var n=r.getAttribute("data-agent-task-id")||"",a=e.getAttribute("data-agent-run-id")||"",o=0;o<t.length;o++){var l=t[o]===r;t[o].classList.toggle("is-selected",l),t[o].setAttribute("aria-selected",l?"true":"false"),t[o].setAttribute("tabindex",l?"0":"-1")}for(var u=e.querySelectorAll(".agent-run-detail-panel"),d=0;d<u.length;d++){var p=u[d].getAttribute("data-agent-task-id")===n;u[d].classList.toggle("is-selected",p),p?u[d].removeAttribute("hidden"):u[d].setAttribute("hidden","")}a&&n&&d4e(a,n),TK(e)}}window.__openFilePreview=function(e){e&&G8e(e)};window.__openImageViewer=function(e,t){e instanceof HTMLImageElement?B9(e):e&&Ol.open(String(e),typeof t=="string"?t:"")};window.__inlineToolImageState=function(e,t){e&&yX(e,t==="error"?"error":"ready")};window.__inlineToolToggle=function(e){var t=e.classList.toggle("inline-tool-open");e.setAttribute("aria-expanded",t?"true":"false");var r=e.querySelector(".inline-tool-expanded"),n=e.querySelector(".inline-tool-expanded-inner");r&&(r.inert=!t,t?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden","true"));var a=e.querySelector(".inline-tool-status");a&&(e.dataset.status==="error"?a.textContent="\u2717":e.dataset.status==="done"&&(a.textContent="\u2713")),t&&yM(e,n,function(o){e.dataset.result=o,n&&(n.innerHTML='<div class="inline-tool-result">'+vX(o,"")+"</div>")}),zg(e,"inline-tool")};window.__inlineToolKeydown=function(e,t){e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),window.__inlineToolToggle(t))};window.__terminalExpand=function(e){var t=e.closest(".inline-terminal");if(t){var r=t.querySelector(".term-body");if(r){var n=r.style.display==="none";r.style.display=n?"block":"none",t.dataset.expanded=n?"true":"false",e.setAttribute("aria-expanded",n?"true":"false"),r.setAttribute("aria-hidden",n?"false":"true");var a=e.querySelector(".term-toggle-icon");if(a&&(a.textContent=n?"\u25BC":"\u25B6"),zg(t,"terminal"),n){var o=r.querySelector(".term-output");yM(t,o,function(l){if(o){for(var u=l.split(`
290
+ `),d="",p=0;p<u.length;p++)!u[p]&&p===u.length-1||(d+='<div class="term-line">'+mc(u[p])+"</div>");o.innerHTML=d}})}}}};window.__askSelect=function(e,t,r,n){var a=m.askUserSelections[e];if(a||(a={submitted:!1},m.askUserSelections[e]=a),!a.submitted){var o=a[t]||[];if(n){var l=o.indexOf(r);l===-1?o.push(r):o.splice(l,1)}else o=o[0]===r?[]:[r];a[t]=o,window.__askRender(e)}};window.__askRender=function(e){var t=document.querySelector('[data-tool-use-id="'+e+'"]');if(t){var r=m.askUserSelections[e]||{};t.querySelectorAll(".ask-user-option").forEach(function(l){var u=parseInt(l.dataset.questionIndex,10),d=parseInt(l.dataset.optionIndex,10),p=(r[u]||[]).indexOf(d)!==-1;l.classList.toggle("selected",p)});var n=t.querySelector(".ask-user-submit");if(n){var a=t.querySelectorAll(".ask-user-question-group"),o=!0;a.forEach(function(l,u){(!r[u]||r[u].length===0)&&(o=!1)}),n.disabled=!o||!!r.submitted,r.submitted&&(n.textContent="\u5DF2\u63D0\u4EA4...",n.classList.add("ask-user-submitted"))}}};window.__askSubmit=function(e){var t=m.askUserSelections[e];if(!(!t||t.submitted||!m.selectedId)){var r=document.querySelector('[data-tool-use-id="'+e+'"]');if(r){var n=r.querySelectorAll(".ask-user-question-group"),a=[],o=!0;if(n.forEach(function(u,d){var p=t[d]||[];if(p.length===0){o=!1;return}var h=[];p.forEach(function(v){var g=u.querySelector('[data-option-index="'+v+'"]');g&&h.push(g.dataset.optionLabel)}),a.push(h.join(", "))}),!!o){t.submitted=!0,window.__askRender(e);var l=a.join(`
291
+ `);fetch("/api/sessions/"+m.selectedId+"/input",{method:"POST",headers:{"Content-Type":"application/json","X-Wand-Tool-Projection":"compact"},credentials:"same-origin",body:JSON.stringify({input:l+`
292
+ `,view:m.currentView})}).catch(function(u){console.error("[wand] Error sending answer:",u),t.submitted=!1,window.__askRender(e)})}}}};var rm=null;function Q8e(){m.__globalListenersBound||(m.__globalListenersBound=!0,document.addEventListener("paste",function(e){gFe(e)&&e.stopPropagation()},!0),document.addEventListener("click",function(e){if(m.plusPopoverOpen){var t=document.getElementById("composer-plus-popover"),r=document.getElementById("attach-btn"),n=e.target;n&&typeof n.closest=="function"&&n.closest(".wand-composer-select-content")||t&&t.contains(e.target)||r&&r.contains(e.target)||fc()}}),document.addEventListener("keydown",function(e){if(e.key==="Escape"&&m.plusPopoverOpen){var t=e.target;if(t&&typeof t.closest=="function"&&t.closest(".wand-composer-select-content"))return;e.preventDefault(),fc(!0)}}),document.addEventListener("click",function(e){var t=e.target;!t||t.closest}),document.addEventListener("change",function(e){var t=e.target;if(!(!t||t.nodeType!==1)&&!(typeof t.matches!="function"||!t.matches("[data-mode-control]"))){var r=t.getAttribute("data-mode-control"),n=t.value;r==="mode"?EY(n):r==="model"?xY(n):r==="thinking"&&yY(n),t.closest&&t.closest("#composer-plus-popover")&&fc(!0)}}))}function Y8e(){Q8e(),rm&&(rm.disconnect(),rm=null),DEe(),Xk(wy),_y(document);var e=document.getElementById("login-button");if(e){e.addEventListener("click",Z9);var t=document.getElementById("login-form");t&&t.addEventListener("submit",function(y){y.preventDefault(),Z9()});var r=document.getElementById("login-switch-server-button");r&&r.addEventListener("click",vC);var n=document.getElementById("password");n&&(n.addEventListener("keydown",function(y){y.key==="Enter"&&Z9()}),n.addEventListener("input",function(){n.dataset.error="false",n.setAttribute("aria-invalid","false");var y=document.getElementById("login-error");y&&tQ(y)}),n.focus());return}var a=document.getElementById("send-input-button");a&&a.addEventListener("click",function(){if(Ei(),XSe()==="running"){UB();return}LSe()}),document.getElementById("composer-attach-file")?.addEventListener("click",function(){fc(),document.getElementById("file-upload-input")?.click()});var o=document.getElementById("input-box");if(o){m.composerCompositionTarget!==o&&(m.composerCompositionGeneration+=1,m.composerCompositionTarget=o,m.composerComposing=!1,m.terminalComposing=!1),HQ(o),o.addEventListener("keydown",oFe),o.addEventListener("paste",vFe),o.addEventListener("input",function(y){m.terminalComposing||SK(o,y)||(wm(o.value,!0),wy(o),EI())}),o.addEventListener("compositionstart",function(){m.composerCompositionGeneration+=1,m.composerCompositionTarget=o,m.composerComposing=!0,m.terminalComposing=!!m.terminalInteractive}),o.addEventListener("compositionend",function(){var y=m.composerCompositionGeneration,E=m.terminalComposing;setTimeout(function(){if(y===m.composerCompositionGeneration){if(!o.isConnected){m.composerCompositionTarget===o&&(m.composerCompositionTarget=null),m.terminalComposing=!1,m.composerComposing=!1;return}E&&(m.terminalComposing=!1,m.terminalInteractive?SK(o):(wy(o),wm(o.value,!0),xm(o))),m.composerComposing=!1}},0)}),o.addEventListener("focus",function(){Ei(),N8e({target:o})}),o.addEventListener("blur",P8e),wy(o);var l=o.closest(".composer-input-wrap");if(l&&typeof ResizeObserver<"u"){var u=-1;rm=new ResizeObserver(function(y){if(!o.isConnected){rm?.disconnect(),rm=null;return}var E=y[0]?y[0].contentRect.width:l.getBoundingClientRect().width;E<=0||Math.abs(E-u)<.5||(u=E,wy(o))}),rm.observe(l)}}var d=document.getElementById("attach-btn"),p=document.getElementById("file-upload-input"),h=document.getElementById("composer-plus-popover");d&&h&&(d.addEventListener("click",function(y){y.stopPropagation(),tFe(y.detail===0)}),h.addEventListener("keydown",function(y){var E=y.target;if(!(y.target instanceof HTMLSelectElement||y.target instanceof HTMLInputElement||E.matches('[role="combobox"], .wand-ui-select-trigger, .wand-ui-select-search-input')||typeof E.closest=="function"&&E.closest(".wand-composer-select-content"))&&["ArrowDown","ArrowUp","Home","End"].includes(y.key)){var F=Array.from(h.querySelectorAll('button:not([disabled]):not(.hidden), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(function($){return $.getClientRects().length>0});if(F.length){y.preventDefault();var S=F.indexOf(document.activeElement),D=y.key==="Home"?0:y.key==="End"?F.length-1:y.key==="ArrowUp"?S<=0?F.length-1:S-1:(S+1)%F.length;F[D]?.focus()}}})),p&&p.addEventListener("change",function(){var y=p.files;y&&QB(y),p.value=""});var v=document.getElementById("prompt-optimize-btn");v&&(v.addEventListener("pointerdown",function(y){y.preventDefault()}),v.addEventListener("click",function(){fc(),bFe()}));var g=document.querySelector(".input-composer");g&&(g.addEventListener("dragover",function(y){y.preventDefault(),y.stopPropagation(),g.classList.add("drag-over")}),g.addEventListener("dragleave",function(y){y.preventDefault(),y.stopPropagation(),g.classList.remove("drag-over")}),g.addEventListener("drop",function(y){y.preventDefault(),y.stopPropagation(),g.classList.remove("drag-over");var E=y.dataTransfer&&y.dataTransfer.files;E&&QB(E)}));var b=document.getElementById("terminal-jump-bottom");b&&b.addEventListener("click",function(){ql("force")});var x=document.getElementById("chat-unread-bubble");x&&x.addEventListener("click",function(){Z8e(!0)}),Ys(),L8e(),KEe(),i8e(),kn()}function Vl(){var e=document.getElementById("chat-output");return e?.querySelector(".chat-messages")||null}function wM(e){var t=e||Vl();return t?Math.abs(t.scrollTop)<m.chatScrollThreshold:!0}function fC(e){e=e||{};var t=m.chatUnreadCount>0||m.chatUnreadStartIndex>=0;if(m.chatUnreadCount=0,m.chatUnreadStartIndex=-1,e.removeDivider!==!1){var r=Vl();if(r){var n=r.querySelector(".chat-unread-divider");n&&n.parentNode&&n.parentNode.removeChild(n)}}t&&Xs()}function J8e(e){if(e||(e=Vl()),!!e){var t=e.querySelector(".chat-unread-divider");if(m.chatUnreadStartIndex<0||m.chatUnreadCount<=0){t&&t.parentNode&&t.parentNode.removeChild(t);return}for(var r=m.chatUnreadStartIndex,n=e.querySelectorAll(".chat-message"),a=null,o=0;o<n.length;o++){var l=n[o].getAttribute("data-msg-index");if(l!==null){var u=parseInt(l,10);if(!isNaN(u)&&u<r){a=n[o];break}}}var d=m.chatUnreadCount+" \u6761\u65B0\u6D88\u606F";t||(t=document.createElement("div"),t.className="chat-unread-divider",t.setAttribute("role","separator"),t.innerHTML='<span class="chat-unread-divider-line"></span><span class="chat-unread-divider-label"></span><span class="chat-unread-divider-line"></span>'),t.querySelector(".chat-unread-divider-label").textContent=d,a?(t.nextSibling!==a||t.parentNode!==e)&&e.insertBefore(t,a):(t.parentNode!==e||t.nextSibling!==null)&&e.appendChild(t)}}function Xs(){var e=document.getElementById("chat-unread-bubble");if(e){var t=m.sessions.find(function(u){return u.id===m.selectedId}),r=!wM(),n=!!t&&m.currentView==="chat"&&r;e.classList.toggle("visible",n),e.classList.toggle("has-unread",m.chatUnreadCount>0);var a=e.querySelector(".chat-unread-bubble-count");a&&(m.chatUnreadCount>0?(a.textContent=m.chatUnreadCount>99?"99+":String(m.chatUnreadCount),a.classList.add("visible")):(a.textContent="",a.classList.remove("visible")));var o=m.chatUnreadCount>0?m.chatUnreadCount+" \u6761\u65B0\u6D88\u606F\uFF0C\u70B9\u51FB\u67E5\u770B":"\u56DE\u5230\u6700\u65B0\u6D88\u606F";e.setAttribute("aria-label",o),e.setAttribute("title",o);var l=document.getElementById("chat-output");l&&l.classList.toggle("has-jump-btn",n)}}function Z8e(e){var t=Vl();if(!(!t||!t.isConnected)){m.chatIsProgrammaticScroll=!0;var r=function(){m.chatIsProgrammaticScroll=!1,m.chatStickToBottom=!0,fC({removeDivider:!0}),Xs()};if(e&&typeof t.scrollTo=="function"){t.scrollTo({top:0,behavior:"smooth"}),setTimeout(r,260);return}t.scrollTop=0,requestAnimationFrame(r)}}function VQ(){var e=Vl();m.chatStickToBottom=!0,fC({removeDivider:!0}),e&&e.isConnected&&(m.chatIsProgrammaticScroll=!0,m.chatProgrammaticScrollUntil=Date.now()+180,e.scrollTop=0,requestAnimationFrame(function(){m.chatIsProgrammaticScroll=!1})),Xs()}function e4e(e){if(e!==Vl())return;let t=m.selectedId;m.chatStickToBottom=!1,m.chatIsProgrammaticScroll=!0,m.chatProgrammaticScrollUntil=0,requestAnimationFrame(()=>{m.selectedId===t&&Vl()===e&&(m.chatIsProgrammaticScroll=!1,Xs())})}function GQ(){var e=Vl();if(!e||!e.isConnected)return;if(m.chatScrollElement===e&&m.chatScrollHandler){Xs();return}m.chatScrollElement&&(m.chatScrollHandler&&m.chatScrollElement.removeEventListener("scroll",m.chatScrollHandler),m.chatScrollWheelHandler&&m.chatScrollElement.removeEventListener("wheel",m.chatScrollWheelHandler),m.chatScrollTouchStartHandler&&m.chatScrollElement.removeEventListener("touchstart",m.chatScrollTouchStartHandler),m.chatScrollTouchMoveHandler&&m.chatScrollElement.removeEventListener("touchmove",m.chatScrollTouchMoveHandler)),m.chatScrollElement=e;function t(){m.chatStickToBottom=!1,e.querySelector(".chat-history-summary")&&ba(!0),Xs()}m.chatScrollHandler=function(){if(e.isConnected){if(Hk(),m.chatIsProgrammaticScroll||Date.now()<m.chatProgrammaticScrollUntil){Xs();return}var r=wM(e);if(r)m.chatStickToBottom=!0,fC({removeDivider:!0});else{t();return}Xs()}},m.chatScrollWheelHandler=function(r){m.chatIsProgrammaticScroll||r.deltaY<0&&t()},m.chatScrollTouchStartHandler=function(r){!r.touches||r.touches.length===0||(m.chatTouchStartY=r.touches[0].clientY)},m.chatScrollTouchMoveHandler=function(r){if(!m.chatIsProgrammaticScroll&&!(!r.touches||r.touches.length===0)){var n=r.touches[0].clientY-m.chatTouchStartY;n>4&&t()}},e.addEventListener("scroll",m.chatScrollHandler,{passive:!0}),e.addEventListener("wheel",m.chatScrollWheelHandler,{passive:!0}),e.addEventListener("touchstart",m.chatScrollTouchStartHandler,{passive:!0}),e.addEventListener("touchmove",m.chatScrollTouchMoveHandler,{passive:!0}),Xs()}var Y9=new Nxe;function KQ(e=!1){var t=m.sessions.find(function(o){return o.id===m.selectedId});if(!(!t||m.currentView!=="chat")){var r=t.id+":"+(m.chatRenderEpoch||0),n=m.chatRenderedCount<m.currentMessages.length,a=n?"local:"+m.chatRenderedCount+":"+m.currentMessages.length:"server:"+(t.messageOffset||0)+":"+(t.leadingBlockOffset||0);Y9.canAttempt(r,a,e)&&(n?(Y9.attempted(r,a),m.chatRenderedCount=Math.min(m.currentMessages.length,m.chatRenderedCount+m.chatPageSize),ba(!0)):(t.messageOffset>0||t.leadingBlockOffset>0)&&J4e()&&Y9.attempted(r,a))}}function Hk(){if(!(document.hidden||m.currentView!=="chat")){var e=Vl();!e?.isConnected||!document.getElementById("chat-load-more-sentinel")||jxe(e)&&KQ()}}var dm=null;function XQ(){dm!==null&&cancelAnimationFrame(dm);var e=m.selectedId,t=m.chatRenderEpoch||0;dm=requestAnimationFrame(function(){dm=null,m.selectedId===e&&(m.chatRenderEpoch||0)===t&&Hk()})}document.addEventListener("visibilitychange",function(){document.hidden||XQ()});function gK(e,t,r){if(!(m.selectedId!==e||(m.chatRenderEpoch||0)!==t)){var n=document.getElementById("chat-load-more-sentinel"),a=n?.querySelector(".chat-load-more-btn");!n||!a||(n.dataset.historyLoad=r,MK(a,r==="loading"?"\u6B63\u5728\u52A0\u8F7D\u66F4\u65E9\u5185\u5BB9\u2026":r==="failed"?"\u52A0\u8F7D\u5931\u8D25 \xB7 \u70B9\u51FB\u91CD\u8BD5":"\u52A0\u8F7D\u66F4\u65E9\u7684\u6D88\u606F",!1),a.setAttribute("aria-busy",String(r==="loading")),r==="idle"&&XQ())}}var xy=null,XE=null;function t4e(){dm!==null&&(cancelAnimationFrame(dm),dm=null),xy?.disconnect(),xy=null,XE?.disconnect(),XE=null;var e=document.getElementById("chat-load-more-sentinel"),t=Vl();if(!(!e||!t)){var r=e.querySelector(".chat-load-more-btn");r&&(r.onclick=function(){KQ(!0)});var n=m.selectedId,a=m.chatRenderEpoch||0,o=function(){return m.selectedId===n&&(m.chatRenderEpoch||0)===a&&t.isConnected&&e.isConnected&&document.getElementById("chat-load-more-sentinel")===e},l=function(){xy?.disconnect(),!(!o()||t.clientHeight<=0)&&(typeof IntersectionObserver<"u"&&(xy=new IntersectionObserver(function(u){o()&&u.some(function(d){return d.isIntersecting})&&Hk()},{root:t,rootMargin:e$(t.clientHeight)}),xy.observe(e)),Hk())};l(),typeof ResizeObserver<"u"&&(XE=new ResizeObserver(l),XE.observe(t))}}function ip(){try{m.selectedId?localStorage.setItem("wand-selected-session",m.selectedId):localStorage.removeItem("wand-selected-session")}catch{}}function xM(e){return e&&Array.isArray(e.queuedMessages)?e.queuedMessages:m.structuredInputQueue}function r4e(){var e=m.sessions.find(function(t){return t.id===m.selectedId});return xM(e)}function mC(e){var t=xM(e);m.structuredInputQueue=Array.isArray(t)?t.slice():[]}function QQ(e,t){return!!(e&&Array.isArray(e.content)&&e.content.some(function(r){return r&&typeof r=="object"&&r[t]}))}function n4e(e){return!!(e&&e.role==="user"&&QQ(e,"__queued"))}function a4e(e){return!!(e&&e.role==="assistant"&&QQ(e,"__processing"))}function hC(e){if(!Array.isArray(e))return[];for(var t=!1,r=[],n=0;n<e.length;n++){var a=e[n];if(n4e(a)||a4e(a)){t=!0;continue}r.push(a)}return t?r:e}function i4e(e,t){if(!e||!Array.isArray(e.messages))return e;var r=e.sessionKind||t&&t.sessionKind;if(r!=="structured")return e;var n=hC(e.messages);return n===e.messages?e:Object.assign({},e,{messages:n})}function YQ(){try{if(!m.selectedId)return;var e=r4e();if(e.length===0){qk(m.selectedId);return}localStorage.setItem("wand-structured-queue",JSON.stringify({sessionId:m.selectedId,items:e}))}catch{}}function qk(e){try{var t=localStorage.getItem("wand-structured-queue");if(!t)return;var r=JSON.parse(t);(!e||!r||r.sessionId===e)&&localStorage.removeItem("wand-structured-queue")}catch{localStorage.removeItem("wand-structured-queue")}}function JQ(){var e=m.sessions.find(function(n){return n.id===m.selectedId});if(e&&Array.isArray(e.queuedMessages)){mC(e),YQ();return}if(e&&e.status!=="running"){m.structuredInputQueue=[],qk(e.id);return}try{var t=localStorage.getItem("wand-structured-queue");if(!t)return;var r=JSON.parse(t);if(!r||r.sessionId!==m.selectedId||!Array.isArray(r.items))return;m.structuredInputQueue=r.items.slice(0,10)}catch{m.structuredInputQueue=[]}}function gc(){try{if(m.crossSessionQueue.length===0){localStorage.removeItem("wand-cross-session-queue");return}localStorage.setItem("wand-cross-session-queue",JSON.stringify(m.crossSessionQueue))}catch{}}function o4e(){return m.config&&m.config.defaultCwd||"/tmp"}function ZQ(){try{var e=localStorage.getItem(nB);if(!e)return{};var t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function s4e(e){try{if(!e||Object.keys(e).length===0){localStorage.removeItem(nB);return}localStorage.setItem(nB,JSON.stringify(e))}catch{}}function l4e(){var e=m.selectedId;if(!e)return{};var t=ZQ(),r=t[e];return r&&typeof r=="object"?r:{}}function eY(e){if(!e||!m.selectedId)return null;var t=l4e();return typeof t[e]=="boolean"?t[e]:null}function tY(e,t){if(!(!e||!m.selectedId)){var r=ZQ(),n=m.selectedId,a=r[n];(!a||typeof a!="object")&&(a={}),a[e]=!!t,r[n]=a,s4e(r)}}var GB="wand-agent-run-selection-v1";function u4e(){try{var e=localStorage.getItem(GB);if(!e)return{};var t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function c4e(e){try{if(!e||Object.keys(e).length===0){localStorage.removeItem(GB);return}localStorage.setItem(GB,JSON.stringify(e))}catch{}}function d4e(e,t){if(!(!e||!t||!m.selectedId)){var r=u4e(),n=m.selectedId,a=r[n];(!a||typeof a!="object")&&(a={}),a[e]=t,r[n]=a,c4e(r)}}function p4e(e,t){return e?e.uuid?"msg:"+e.uuid:e.id?"msg:"+e.id:e.messageId?"msg:"+e.messageId:e.turnId?"msg:"+e.turnId:"msg:"+(typeof t=="number"?t:0):"msg:unknown-"+(typeof t=="number"?t:0)}function f4e(e,t){for(var r=[],n=0;n<t.length;n++){var a=t[n];a==null||a===""||r.push(String(a))}return e+":"+r.join(":")}function rY(e){return!e||!e.dataset?"":e.dataset.expandKey||""}function m4e(e,t){if(!e)return!1;switch(t){case"tool-card":case"diff":return!e.classList.contains("collapsed");case"thinking":return e.classList.contains("expanded")&&!e.classList.contains("collapsed");case"inline-tool":return e.classList.contains("inline-tool-open");case"terminal":{var r=e.querySelector(".term-body");return r?r.style.display!=="none":e.dataset.expanded==="true"}case"agent-run":return e.getAttribute("data-expanded")==="true";case"activity":return e.getAttribute("data-expanded")==="true";default:return!1}}function EM(e,t,r){if(e)switch(t){case"tool-card":case"diff":{e.classList.toggle("collapsed",!r);break}case"thinking":{e.classList.toggle("collapsed",!r),e.classList.toggle("expanded",!!r);break}case"inline-tool":{e.classList.toggle("inline-tool-open",!!r),e.setAttribute("aria-expanded",r?"true":"false");var n=e.querySelector(".inline-tool-expanded");n&&(n.toggleAttribute("inert",!r),r?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden","true"));break}case"terminal":{var a=e.querySelector(".term-body");a&&(a.style.display=r?"block":"none"),e.dataset.expanded=r?"true":"false";var o=e.querySelector(".term-toggle-icon");o&&(o.textContent=r?"\u25BC":"\u25B6");break}case"activity":{e.setAttribute("data-expanded",r?"true":"false");var l=e.querySelector(".chat-activity-menu");l&&(l.toggleAttribute("inert",!r),r?l.removeAttribute("aria-hidden"):l.setAttribute("aria-hidden","true"));var u=e.querySelector(".chat-process-summary");u&&u.setAttribute("aria-expanded",r?"true":"false");break}case"agent-run":{e.setAttribute("data-expanded",r?"true":"false");var d=e.querySelector(".agent-run-summary");d&&d.setAttribute("aria-expanded",r?"true":"false");var p=e.querySelector(".agent-run-body");p&&p.setAttribute("aria-hidden",r?"false":"true");break}}}function zg(e,t){var r=rY(e);r&&tY(r,m4e(e,t))}function h4e(e){!e||!m.selectedId||e.querySelectorAll("[data-expand-key]").forEach(function(t){var r=rY(t),n=t.dataset.expandKind||"",a=eY(r);a===null||!n||EM(t,n,a)})}var g4e=new Set(["ready","checking","merging","merged","failed"]),am=null;function nm(e){return typeof e!="string"?void 0:e.trim()||void 0}function v4e(e){return typeof e=="string"&&g4e.has(e)?e:void 0}function b4e(e,t){if(!e)return null;let r=nm(e.id);if(!r)return null;let n=ga(e.worktree)?e.worktree:{},a=ga(e.worktreeMergeInfo)?e.worktreeMergeInfo:{},o=nm(n.branch)??nm(e.worktreeBranch),l=nm(n.path)??nm(e.worktreePath),u=nm(a.targetBranch),d=nm(e.status),p=v4e(e.worktreeMergeStatus),h=p==="merged"&&a.cleanupDone===!1;return{sessionId:r,intent:t??(h?"cleanup":"merge"),...o?{sourceBranch:o}:{},...l?{worktreePath:l}:{},...u?{targetBranch:u}:{},...d?{sessionStatus:d}:{},...p?{mergeStatus:p}:{},cleanupPending:h}}function nY(){return ki(["worktreeMerge"])}function vK(e,t){let r=t instanceof Error&&t.message?`\uFF1A${t.message}`:"";e.toast(`Worktree \u5DF2\u66F4\u65B0\uFF0C\u4F46\u4F1A\u8BDD\u5217\u8868\u5237\u65B0\u5931\u8D25${r}`,"error")}function y4e(e,t){try{Promise.resolve(e.refreshSessions(t)).catch(r=>{vK(e,r)})}catch(r){vK(e,r)}}function w4e(e){return{onOpen(t){nY(),e.onOpen?.(t)},onClose(t){e.onClose?.(t)},onRepositoryChanged(t){y4e(e,t)},toast(t,r){e.toast(t,r)}}}function kM(e){if(am?.dependencies===e)return am.dispose;am?.dispose();let t=E$(w4e(e)),r=!1,n={dependencies:e,dispose(){r||(r=!0,t(),am===n&&(am=null))}};return am=n,n.dispose}function aY(e,t){let r=am,n=e.trim();return!r||!n||!Sm(()=>{bK(r,n,t)})?!1:bK(r,n,t)}function bK(e,t,r){if(!nY())return!1;let n=b4e(e.dependencies.getSession(t),r);return n?xd.open(n)?!0:(e.dependencies.toast("Worktree \u5408\u5E76\u754C\u9762\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\u3002","error"),!1):(e.dependencies.toast("\u672A\u627E\u5230\u53EF\u64CD\u4F5C\u7684 worktree \u4F1A\u8BDD\u3002","error"),!1)}var x4e=Object.freeze({revision:0,mounts:Object.freeze([])}),E4e=class{constructor(){ae(this,"snapshot",x4e),ae(this,"listeners",new Set),ae(this,"subscribe",e=>(this.listeners.add(e),()=>this.listeners.delete(e))),ae(this,"getSnapshot",()=>this.snapshot)}sync(e){this.snapshot=Object.freeze({revision:this.snapshot.revision+1,mounts:Object.freeze(e.slice())});for(let t of this.listeners)t()}clear(){this.snapshot.mounts.length!==0&&this.sync([])}},Lg=new E4e;function k4e(e){return e==="mode"||e==="model"||e==="thinking"||e==="tool"}function C4e(e){return e==="mode"||e==="runtime"||e==="all"||e==="dropdown"}function S4e(e){let t=[];document.querySelectorAll("[data-composer-select-host]").forEach((r,n)=>{let a=r.dataset.modeControl,o=r.dataset.composerSelectScope;if(!k4e(a)||!C4e(o)||!r.isConnected)return;let l=e.resolve(a,o);t.push({key:r.dataset.composerSelectKey||`${o}-${a}-${n}`,target:r,control:a,scope:o,value:l.value,options:l.options,ariaLabel:l.ariaLabel,placeholder:l.placeholder,displayValue:l.displayValue,displayTitle:l.displayTitle,disabled:l.disabled,align:a==="mode"?"start":"end",onValueChange(u){e.onValueChange(a,u,o)}})}),Lg.sync(t)}function F4e(e,t){return e.groupTitle===t.groupTitle&&e.modeLabel===t.modeLabel&&e.modelFullLabel===t.modelFullLabel&&e.modelRefreshing===t.modelRefreshing&&e.thinkingValue===t.thinkingValue&&e.thinkingLabel===t.thinkingLabel&&e.toolVisible===t.toolVisible&&e.toolStatus===t.toolStatus&&e.toolDisabled===t.toolDisabled}function $4e(e,t){return e.target===t.target&&e.scope===t.scope&&F4e(e,t)}var D4e=class extends vl{constructor(){super($4e)}},Hg=new D4e;function A4e(e){return e==="mode"||e==="runtime"||e==="all"}function B4e(e){hw({selector:"[data-composer-config-host]",store:Hg,flush:!0,build(t){let r=t.dataset.composerConfigHost;return A4e(r)?{key:`composer-config-${r}`,target:t,scope:r,...e.resolve(r),onRefreshModels:e.onRefreshModels}:null}})}function I4e(e){hw({selector:"[data-composer-attachments-host]",store:kE,build(t){let r=e.resolve();return r.length===0?null:{key:"composer-attachments",target:t,items:r,onRemove:e.onRemove}}})}function iY(e){return e==="default"?"":e||""}function M4e(e,t,r){let n=e||r;return t.some(a=>a.value===n)?n:r}var J9="default";function oY(e){let t=e.split(/\s+·\s+/);return t.length>1&&t[0].trim().toLocaleLowerCase()===t[1].trim().toLocaleLowerCase()&&t.splice(1,1),t.join(" \xB7 ")}var T4e=/^跟随.*默认$/,_4e=/\s*[((][^(())]*默认[^(())]*[))]\s*$/;function j4e(e,t,r){let n=(e??"").trim();if(n&&n!==J9)return n===Pd?Od:(t.find(l=>l.id===n)?.label??"").trim()||(Rd(n)?"\u6A21\u578B\u5206\u7EC4":Xu(n)?tg:n);let a=(r??"").trim();if(a&&a!==J9)return a===Pd?Od:(t.find(l=>l.id===a)?.label??"").trim()||(Rd(a)?"\u6A21\u578B\u5206\u7EC4":Xu(a)?tg:a);let o=(t.find(l=>l.id===J9)?.label??"").trim().replace(_4e,"").trim();return T4e.test(o)?"":o}function sY(e,t=0){return!!e&&e.sessionKind==="structured"&&e.status==="idle"&&!e.archived&&!e.structuredState?.inFlight&&!e.claudeSessionId&&!e.resumedFromSessionId&&!e.autoRecovered&&!e.automationId&&(!e.sessionSource||e.sessionSource==="interactive")&&!(e.messages?.length||e.messageCount||e.messageTotal||t)&&!e.queuedMessages?.length}function KB(e){return X7(e?.provider,e?.structuredState?.engine==="core"?"sdk":"cli")}var bm=uEe(),QE=new Map,gC=fD();async function Wk(e){if(!e||!gC.isLoaded(e.id)||m.selectedId!==e.id||document.visibilityState!=="visible"||!Gi(e)||!document.getElementById(m.currentView==="chat"?"chat-output":"output")?.getClientRects().length||Array.from(document.querySelectorAll('[role="dialog"][aria-modal="true"]')).some(r=>r.getClientRects().length>0))return;let t=e.completionRevision;if(QE.get(e.id)!==t){QE.set(e.id,t);try{let r=await fetch("/api/sessions/"+encodeURIComponent(e.id)+"/completion/view",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({completionRevision:t})}),n=await It(r);Kt({id:e.id,completionRevision:n.completionRevision,viewedCompletionRevision:n.viewedCompletionRevision},"latest"),Si(),Ui()}catch{}finally{QE.get(e.id)===t&&QE.delete(e.id)}}}function yK(e){return e?[e.sessionSource??"",e.status??"",e.title??"",e.titleGenerating===!0?"1":"0",e.archived===!0?"1":"0",e.employeeId??"",e.employeeName??"",e.teamChat?"1":"0",e.teamStep?.title??""].join(""):""}function N4e(){var e=document.getElementById("login-cert-hint");e&&e.classList.remove("hidden");var t=document.getElementById("login-cert-http-link");t&&(t.href="http://"+location.host+location.pathname,t.style.display=location.protocol==="https:"?"":"none")}function P4e(){var e=document.getElementById("login-cert-hint");e&&e.classList.add("hidden")}function XB(){m.loginLockTicker||(m.loginLockTicker=setTimeout(function(){m.loginLockTicker=0;var e=document.getElementById("login-button"),t=document.getElementById("login-error"),r=Math.ceil((m.loginLockUntil-Date.now())/1e3);if(r>0){if(XB(),m.loginPending||!e)return;e.disabled=!0,e.textContent="\u8BF7\u7B49\u5F85 "+r+"s",t&&Uy(t,"\u767B\u5F55\u5C1D\u8BD5\u6B21\u6570\u8FC7\u591A\uFF0C\u8BF7\u7B49\u5F85 "+r+" \u79D2\u3002");return}m.loginLockUntil=0,e&&(e.disabled=!1,e.textContent="\u8FDB\u5165\u63A7\u5236\u53F0"),t&&Uy(t,"\u73B0\u5728\u53EF\u4EE5\u518D\u8BD5\u4E00\u6B21\u4E86\u3002")},1e3))}function Z9(){var e=document.getElementById("password"),t=document.getElementById("login-button"),r=document.getElementById("login-error");if(!(!e||!t||!r)){var n=Math.ceil((m.loginLockUntil-Date.now())/1e3);if(n>0){Uy(r,"\u767B\u5F55\u5C1D\u8BD5\u6B21\u6570\u8FC7\u591A\uFF0C\u8BF7\u7B49\u5F85 "+n+" \u79D2\u3002"),XB();return}if(!m.loginPending){tQ(r),P4e(),e.dataset.error="false",e.setAttribute("aria-invalid","false"),m.loginPending=!0,t.disabled=!0,t.textContent="\u767B\u5F55\u4E2D...";var a=e.value;o2e(e,a),i2e(a).then(function(o){if(!o.ok){o.retryAfterMs&&(m.loginLockUntil=Date.now()+o.retryAfterMs,XB()),o.kind==="cookie-not-stored"&&location.protocol==="https:"&&N4e(),o.credentialInvalid&&(e.dataset.error="true",e.setAttribute("aria-invalid","true")),Uy(r,o.message);return}return m.config=o.config,Cw(m.config),Ql().then(function(){KX(),um()})}).catch(function(o){Uy(r,"\u767B\u5F55\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")}).finally(function(){if(m.loginPending=!1,m.loginLockUntil>Date.now()){t.disabled=!0;return}m.loginLockUntil=0,t.disabled=!1,t.textContent="\u8FDB\u5165\u63A7\u5236\u53F0"})}}}function lY(){return typeof WandNative<"u"&&typeof WandNative.switchServer=="function"}function vC(){if(lY())try{WandNative.switchServer()}catch{}}function CM(){try{if(typeof WandNative<"u"&&typeof WandNative.backToNative=="function"){WandNative.backToNative();return}typeof window.__wandBackToNative=="function"&&window.__wandBackToNative()}catch{}}function uY(){bk(),bm.reset(),j1(),Q3(),Jke(),Fg.clear(),YX(),GI(),gm(!1),pw(),m.config=null,m.selectedId=null,ip(),m.sessions=[],m.claudeHistory=[],m.claudeHistoryLoaded=!1,m.claudeHistoryExpanded=!1,m.claudeHistoryExpandedDirs={},m.sessionsDrawerOpen=!1,Qr("wand-sidebar-open",!1),um()}async function SM(){var e;try{e=await fetch("/api/logout",{method:"POST",credentials:"same-origin"})}catch(t){Qe(qa(t,"\u6CE8\u9500\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5\u3002"),"error");return}if(!e.ok){Qe("\u6CE8\u9500\u5931\u8D25\uFF08HTTP "+e.status+"\uFF09\uFF0C\u8BF7\u91CD\u8BD5\u3002","error");return}uY()}function R4e(){uY()}function Ql(){return Ci()}function wK(e){return e==="full-access"?"\u5B8C\u5168\u8BBF\u95EE":e==="default"?"\u9ED8\u8BA4":e==="native"?"\u539F\u751F":e==="auto-edit"?"\u81EA\u52A8\u7F16\u8F91":e==="managed"?"\u6258\u7BA1":e}function np(){return m.sessionTool||m.preferredCommand||"claude"}var cY="Enter \u53D1\u9001 \xB7 Shift+Enter \u6362\u884C";function dY(e,t){return Dl(e)?ND:t?"\u952E\u76D8\u8F93\u5165\u76F4\u901A\u7EC8\u7AEF \xB7 Enter \u63D0\u4EA4":e&&(e.status==="exited"||e.status==="failed"||e.status==="stopped")?bw(e)?"\u8F93\u5165\u6D88\u606F\u4EE5\u7EE7\u7EED\u4F1A\u8BDD":"\u4F1A\u8BDD\u5DF2\u7ED3\u675F":gr(e)&&e.structuredState&&e.structuredState.inFlight?"\u56DE\u590D\u4E2D\uFF0C\u53EF\u7EE7\u7EED\u8F93\u5165":document.documentElement.classList.contains("is-wand-app")?"\u6253\u5B57\u6216\u6309\u4F4F\u8BF4\u8BDD":"\u8F93\u5165\u6D88\u606F\u2026"}function pY(e){return e==="codex"?["full-access"]:e==="opencode"||e==="grok"?["default","full-access","managed"]:e==="qoder"?["default","full-access","auto-edit","managed"]:["default","full-access","auto-edit","native","managed"]}function ap(e,t){var r=pY(e);if(r.indexOf(t)!==-1)return t;var n=m.config&&m.config.defaultMode?m.config.defaultMode:"default";return r.indexOf(n)!==-1?n:r[0]}function fY(e){return e?gr(e)||e.provider==="codex":!1}function O4e(e,t){if(!e||!e.is_error||!t||t.is_error)return!1;var r=Jy(e.content).toLowerCase(),n=Jy(t.content).toLowerCase();return r?r.indexOf("invalid pages parameter")!==-1&&n.length>0:!1}function gr(e){return!!e&&(e.sessionKind==="structured"||e.runner==="claude-cli-print")}function mY(){m.chatMode=ap("claude",m.chatMode),Bo()}var xK=Object.create(null),YE=Object.create(null),Uk=Object.create(null),Ag=new Map;async function z4e(e){let t=Ha(),r=nf(e);if(!r||!sY(t,m.currentMessages?.length)||bC(t.id)||Ag.get(t.id)?.pending||KB(t)===e)return;let n={pending:!0,status:"\u6B63\u5728\u5207\u6362\u5DE5\u5177\u2026",failed:!1};Ag.set(t.id,n),Bo(),Wa();try{let a=await yC(t.id,async function(){let o=await Nr("/api/sessions/"+encodeURIComponent(t.id)+"/provider",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r.provider,engine:r.engine})}),l=await It(o);if(l.id!==t.id||l.employeeId!==t.employeeId||KB(l)!==e)throw new Error("\u672A\u6536\u5230\u6709\u6548\u7684\u5DE5\u5177\u5207\u6362\u56DE\u6267\uFF0C\u8BF7\u5237\u65B0\u4F1A\u8BDD\u6838\u5BF9\u3002");return l});a.latest&&m.sessions.some(function(o){return o.id===t.id})&&(Kt(a.data),FM(t.id),m.selectedId===t.id&&(m.sessionTool=r.provider,m.chatMode=a.data.mode),n.status="\u5DF2\u5207\u6362\u4E3A "+r.label,Si())}catch(a){n.failed=!0,n.status=qa(a?.error??a,"\u5207\u6362\u5DE5\u5177\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u6838\u5BF9\u3002")}finally{n.pending=!1,Bo(),Wa()}}function bC(e){return e&&Uk[e]||null}function Vk(e,t,r){if(e){var n=Uk[e]||(Uk[e]={});n[t]=r}}function FM(e){e&&delete Uk[e]}function yC(e,t){var r=(YE[e]||0)+1;YE[e]=r;var n=xK[e]||Promise.resolve(),a=n.catch(function(){}).then(t);return xK[e]=a.catch(function(){}),a.then(function(o){return{data:o,latest:YE[e]===r}},function(o){return Promise.reject({error:o,latest:YE[e]===r})})}function lw(e,t){FM(e),Promise.resolve(Ci()).catch(function(){}).finally(function(){Bo()}),Qe(t,"error")}function $M(e,t){if(!t.latest)return!1;var r=t.data;return r&&r.error?(lw(e,r.error),!1):!r||!r.id?(lw(e,"\u4F1A\u8BDD\u8BBE\u7F6E\u66F4\u65B0\u5931\u8D25"),!1):(Kt(r),FM(e),Bo(),!0)}function wC(e,t){var r=G4e(e,t);return!r||r==="auto"?"\u81EA\u52A8":tE(r)}function uw(e,t){var r=j4e(e,AM(t),DM(Ew(t)));return r||"\u9ED8\u8BA4"}function L4e(e,t){var r=oY(uw(e,t)),n=r.search(/[((]/);n>0&&(r=r.slice(0,n).trim());var a=r.lastIndexOf("/");return a>=0&&a<r.length-1&&(r=r.slice(a+1).trim()),r}function H4e(e,t){var r=xC(t);return r.map(function(n){var a=n.id==="off"?"\u81EA\u52A8\uFF08\u6A21\u578B\u9ED8\u8BA4\uFF09":wC(n.id,t);return{value:n.id,label:a}})}function Bo(){var e=Ha(),t=m.chatMode||"default",r=gY(e);q4e(e,t,hY(e)||"",r)}function q4e(e,t,r,n){var a=np();for(let[F,S]of Ag)!S.pending&&!m.sessions.some(function(D){return D.id===F})&&Ag.delete(F);let o=Ag.get(e?.id),l=sY(e,m.currentMessages?.length),u=!!e||l,d=!!o?.pending;var p=U4e(r,e),h=iY(r),v=H4e(n,e),g=M4e(n,v,"off"),b=wK(t),x=L4e(h,e),y=uw(h,e)||x,E=wC(g,e);B4e({resolve:function(){return{groupTitle:"\u6A21\u5F0F "+b+" \xB7 \u6A21\u578B "+y+" \xB7 \u601D\u8003 "+E,modeLabel:b,modelFullLabel:y,modelRefreshing:!!m.modelsRefreshing||d,toolVisible:u,toolStatus:o?.status,toolDisabled:d,thinkingValue:g,thinkingLabel:E}},onRefreshModels:function(){X4e()}}),S4e({resolve:function(F,S){if(F==="tool"){let D=KB(e);return{value:D,options:s0.map(function($){return{value:$.id,label:$.label}}),ariaLabel:"\u66F4\u6362\u6267\u884C\u5DE5\u5177",displayValue:d?"\u5207\u6362\u4E2D\u2026":o?.failed?"\u5207\u6362\u5931\u8D25":nf(D)?.label,displayTitle:o?.status||nf(D)?.description,disabled:!l||d||!!bC(e?.id)}}return F==="mode"?{value:t,disabled:d,options:pY(a).map(function(D){return{value:D,label:wK(D)}}),ariaLabel:"\u6A21\u5F0F",placeholder:b,displayValue:b}:F==="model"?{value:h,disabled:d,options:p,ariaLabel:"\u6A21\u578B",placeholder:x,displayValue:x,displayTitle:y}:{value:g,disabled:d,options:v,ariaLabel:"\u601D\u8003\u6DF1\u5EA6",placeholder:E,displayValue:E}},onValueChange:function(F,S,D){F==="tool"?z4e(S):F==="mode"?EY(S):F==="model"?xY(S):yY(S),D==="all"&&requestAnimationFrame(function(){fc(!0)})}})}function qg(e){return e==="codex"||e==="opencode"||e==="grok"||e==="qoder"||e==="pi"?e:"claude"}function Ew(e){return qg(e&&e.provider||m.sessionTool||"claude")}function W4e(){var e=m.config&&m.config.defaultModels&&typeof m.config.defaultModels=="object"?m.config.defaultModels:{};return{claude:typeof e.claude=="string"?e.claude:m.config&&m.config.defaultModel||"",codex:typeof e.codex=="string"?e.codex:m.config&&m.config.defaultCodexModel||"",opencode:typeof e.opencode=="string"?e.opencode:m.config&&m.config.defaultOpenCodeModel||"",grok:typeof e.grok=="string"?e.grok:m.config&&m.config.defaultGrokModel||"",qoder:typeof e.qoder=="string"?e.qoder:m.config&&m.config.defaultQoderModel||"",pi:typeof e.pi=="string"?e.pi:m.config&&m.config.defaultPiModel||""}}function DM(e){var t=W4e(),r=qg(e);return r==="codex"?t.codex||"":r==="opencode"?t.opencode||"":r==="grok"?t.grok||"":r==="qoder"?t.qoder||"":r==="pi"?t.pi||"":t.claude||""}function el(e){var t=qg(e),r=m.chatModels&&typeof m.chatModels[t]=="string"?m.chatModels[t]:"";return!r&&t==="claude"&&(r=m.chatModel||""),r||""}function kw(e,t){var r=qg(e),n=(t||"").trim();m.chatModels||(m.chatModels={},Iu.forEach(function(a){m.chatModels[a]=""})),m.chatModels[r]=n,m.chatModel=n;try{localStorage.setItem("wand-chat-model-"+r,n),localStorage.removeItem("wand-chat-model")}catch{}}function hY(e){var t=e&&e.id?bC(e.id):null;if(t&&Object.prototype.hasOwnProperty.call(t,"model"))return t.model||"";if(e&&e.selectedModel)return e.selectedModel;var r=Ew(e),n=el(r);return n||DM(r)||""}function AM(e){var t=qg(e&&e.provider||m.sessionTool||"claude");return t==="codex"?m.availableCodexModels||[]:t==="opencode"?m.availableOpenCodeModels||[]:t==="grok"?m.availableGrokModels||[]:t==="qoder"?m.availableQoderModels||[]:t==="pi"?(m.availablePiModels||[]).filter(function(r){return e?.sessionKind!=="pty"||!r.id.startsWith("wand-openrouter-free/")}):m.availableModels||[]}function U4e(e,t){for(var r=AM(t),n=iY(e),a=[{value:"",label:"\u9ED8\u8BA4 \xB7 "+uw("",t)}],o=0;o<r.length;o++){var l=r[o];if(l.id!=="default"){var u=oY(l.label||l.id),d=Ew(t)==="claude"?l.availability==="verified"?" \xB7 \u5DF2\u9A8C\u8BC1":l.availability==="stale"?" \xB7 \u5F85\u5237\u65B0":l.source==="models-api"?" \xB7 API \u5019\u9009":" \xB7 \u5019\u9009":"";a.push({value:l.id,label:u+d,group:l.group})}}return n&&!r.some(function(p){return p.id===n})&&a.push({value:n,label:n+"\uFF08\u81EA\u5B9A\u4E49\uFF09"}),a}function BM(e){Bo()}var fk=[{id:"off",label:"auto",hint:"\u4F7F\u7528 provider / \u6A21\u578B\u9ED8\u8BA4\u601D\u8003\u6863\u4F4D"},{id:"standard",label:"low",hint:"Claude/Codex: low \xB7 OpenCode variant: low"},{id:"deep",label:"medium",hint:"Claude/Codex: medium \xB7 OpenCode variant: high"},{id:"max",label:"max",hint:"Claude: max \xB7 Codex: xhigh \xB7 OpenCode variant: max"}];function V4e(e){var t=Ew(e),r=hY(e)||"default",n=AM(e),a=n.find(function(u){return u.id===r})||n.find(function(u){return u.id==="default"});if(a&&Array.isArray(a.reasoningEfforts)&&a.reasoningEfforts.length)return{provider:t,efforts:a.reasoningEfforts,defaultEffort:a.defaultReasoningEffort||""};var o=m.providerThinkingEfforts||{},l=Array.isArray(o[t])?o[t]:[];return{provider:t,efforts:l,defaultEffort:""}}function xC(e){var t=V4e(e),r=RA(t.provider,t.efforts,t.defaultEffort);return r||fk}function G4e(e,t){for(var r=xC(t),n=0;n<r.length;n++)if(r[n].id===e)return r[n].label;if(typeof e=="string"&&e.indexOf("codex:")===0)return e.slice(6);for(var a=0;a<fk.length;a++)if(fk[a].id===e)return fk[a].label;return"auto"}function gY(e){var t=e&&e.id?bC(e.id):null;return t&&Object.prototype.hasOwnProperty.call(t,"thinking")?t.thinking||"off":e&&e.thinkingEffort?e.thinkingEffort:m.chatThinking?m.chatThinking:"off"}function vY(e){m.chatThinking=e;try{localStorage.setItem("wand-thinking-effort",e)}catch{}}function Cw(e){var t=e&&typeof e=="object"?e.defaultThinkingEffort:"",r=t==="off"||t==="standard"||t==="deep"||t==="max"||k2(String(t||""));if(r){try{if(localStorage.getItem("wand-thinking-effort"))return}catch{}m.chatThinking!==t&&(m.chatThinking=t,Bo())}}function bY(e,t,r,n){return yC(e.id,function(){return n&&!n.ok?{error:n.error||"\u5207\u6362\u6A21\u578B\u5931\u8D25"}:Nr("/api/sessions/"+encodeURIComponent(e.id)+"/thinking-effort",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({thinkingEffort:t})}).then(function(a){return a.json()})}).then(function(a){$M(e.id,a)&&typeof Qe=="function"&&Qe(r||"\u5DF2\u5207\u6362\u601D\u8003\u6DF1\u5EA6 \u2192 "+wC(t,Ha()),"success")}).catch(function(a){a&&a.latest&&lw(e.id,"\u5207\u6362\u601D\u8003\u6DF1\u5EA6\u5931\u8D25")})}function yY(e){var t=(e||"off").trim(),r=Ha(),n=xC(r).some(function(a){return a.id===t});n||(t="off"),vY(t),r&&Vk(r.id,"thinking",t),Bo(),r&&bY(r,t,"\u5DF2\u5207\u6362\u601D\u8003\u6DF1\u5EA6 \u2192 "+wC(t,r))}function K4e(e){if(!e)return!1;var t=e.mode;return t==="managed"||t==="full-access"}function wY(){return PA(),fetch("/api/models",{credentials:"same-origin"}).then(function(e){return e.json()}).then(function(e){return IM(e),rg(e),e}).catch(function(){return null})}function IM(e){return!e||!Array.isArray(e.models)?!1:(m.availableModels=e.models,m.availableCodexModels=Array.isArray(e.codexModels)?e.codexModels:[],m.availableOpenCodeModels=Array.isArray(e.opencodeModels)?e.opencodeModels:[],m.availableGrokModels=Array.isArray(e.grokModels)?e.grokModels:[],m.availableQoderModels=Array.isArray(e.qoderModels)?e.qoderModels:[],m.availablePiModels=Array.isArray(e.piModels)?e.piModels:[],m.providerThinkingEfforts=e.thinkingEfforts&&typeof e.thinkingEfforts=="object"?e.thinkingEfforts:{},e.revision&&(m.modelCatalogRevision=e.revision),BM(Ha()),!0)}typeof window<"u"&&window.addEventListener("wand-model-catalog",function(e){var t=e&&e.detail;!t||!Array.isArray(t.models)||t.revision&&t.revision===m.modelCatalogRevision||IM(t)});function X4e(){return m.modelsRefreshing?Promise.resolve(null):(m.modelsRefreshing=!0,Bo(),fetch("/api/models/refresh",{method:"POST",credentials:"same-origin"}).then(function(e){return e.ok?e.json():e.json().catch(function(){return{}}).then(function(t){throw new Error(t&&t.error?t.error:"\u5237\u65B0\u6A21\u578B\u5217\u8868\u5931\u8D25\u3002")})}).then(function(e){if(!IM(e))throw new Error("\u5237\u65B0\u6A21\u578B\u5217\u8868\u5931\u8D25\u3002");return rg(e),Qe("\u6A21\u578B\u5217\u8868\u5DF2\u5237\u65B0\u3002","success"),e}).catch(function(e){return Qe(e&&e.message?e.message:"\u5237\u65B0\u6A21\u578B\u5217\u8868\u5931\u8D25\u3002","error"),null}).finally(function(){m.modelsRefreshing=!1,Bo()}))}function Ha(){if(!m.selectedId)return null;for(var e=0;e<m.sessions.length;e++)if(m.sessions[e].id===m.selectedId)return m.sessions[e];return null}function xY(e){var t=(e||"").trim(),r=Ha(),n=Ew(r);kw(n,t),r&&Vk(r.id,"model",t);var a=!1;if(xC(r).some(function(u){return u.id===gY(r)})||(a=!0,vY("off"),r&&Vk(r.id,"thinking","off")),Bo(),!!r){var o={ok:!1,error:""};if(yC(r.id,function(){return Nr("/api/sessions/"+encodeURIComponent(r.id)+"/model",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({model:t||null})}).then(function(u){return u.json()}).then(function(u){return o.ok=!!(u&&u.id&&!u.error),o.error=u&&u.error?u.error:"",u})}).then(function(u){if(!a&&$M(r.id,u)&&typeof Qe=="function"){var d=uw(t,Ha()||r),p=r.provider==="codex"?"\uFF08\u4E0B\u6B21\u5BF9\u8BDD\u751F\u6548\uFF09":"";Qe("\u5DF2\u5207\u6362\u6A21\u578B \u2192 "+d+p,"success")}}).catch(function(u){o.ok=!1,!a&&u&&u.latest&&lw(r.id,"\u5207\u6362\u6A21\u578B\u5931\u8D25")}),a){var l=uw(t,r);bY(r,"off","\u5DF2\u5207\u6362\u6A21\u578B \u2192 "+l+"\uFF1B\u601D\u8003\u6DF1\u5EA6\u5DF2\u56DE\u843D\u4E3A\u81EA\u52A8",o)}}}function EY(e){var t=ap(np(),(e||"default").trim());m.chatMode=t,Bo();var r=Ha();if(!r||!r.id){Qe&&Qe("\u65B0\u4F1A\u8BDD\u6A21\u5F0F\uFF1A"+t,"info");return}Vk(r.id,"mode",t),yC(r.id,function(){return Nr("/api/sessions/"+encodeURIComponent(r.id)+"/mode",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({mode:t})}).then(function(n){return n.json()})}).then(function(n){if($M(r.id,n)&&typeof Qe=="function"){var a=m.sessions.find(function(u){return u.id===r.id})||r,o=a.mode||t;m.chatMode=ap(a.provider||np(),o),Bo();var l=r.provider==="codex"?"\uFF08Codex \u56FA\u5B9A\u5168\u6743\u9650\uFF09":"";Qe("\u5DF2\u5207\u6362\u6A21\u5F0F \u2192 "+o+l,"success")}}).catch(function(n){n&&n.latest&&lw(r.id,"\u5207\u6362\u6A21\u5F0F\u5931\u8D25")})}function EC(e,t,r,n,a){var o=a&&a.provider||qg(m.sessionTool),l=(a&&a.model?String(a.model):"").trim(),u=l||el(o)||DM(o),d=m.chatThinking||"off",p={kind:"structured",cwd:t||ps(),mode:r||m.chatMode||m.config&&m.config.defaultMode||"default",provider:o,runner:K7(o),engine:a&&a.engine?a.engine:void 0,prompt:e||void 0,worktreeEnabled:n===!0,model:u||void 0,thinkingEffort:d,sessionSource:"interactive",workspaceId:a&&a.workspaceId,workspaceTaskId:a&&a.workspaceTaskId,systemPrompt:a&&a.systemPrompt,employeeId:a&&a.employeeId,respondImmediately:e?!0:void 0};return Nr("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(p)}).then(function(h){return h.json()}).then(function(h){if(h.error)throw new Error(h.error);return op(h.id,!0),Kt(h),Promise.resolve(An(h.id)).then(function(){return h})})}function MM(){var e=!!m.selectedId,t=document.getElementById("chat-output"),r=m.sessions.find(function(o){return o.id===m.selectedId}),n=gr(r),a=e&&(n||m.currentView!=="terminal");n?m.currentView="chat":e||(m.currentView="terminal"),t&&a&&tI(t),GQ(),Xs(),Wa(),Ua("shell:view")}function Kt(e,t="unknown",r){if(!e||!e.id)return;t==="latest"&&(Array.isArray(e.messages)||typeof e.output=="string")&&gC.loaded(e.id);var n=yK(m.sessions.find(function(b){return b.id===e.id})),a=m.sessions.find(function(b){return b.id===e.id})||null,o=Object.assign({},i4e(e,a),m6(a,e));if(t==="latest"&&Array.isArray(o.messages)&&typeof o.messageOffset!="number"&&(o.messageOffset=0,o.messageTotal=o.messages.length),Array.isArray(o.messages)&&typeof o.messageOffset=="number"){var l=o.messageOffset,u=typeof o.leadingBlockOffset=="number"?mEe(a,o.messages,o.messageOffset,o.messageTotal,o.leadingBlockOffset,o.leadingBlockTotal||0,t):vB(a,o.messages,o.messageOffset,o.messageTotal,t);Object.assign(o,u),typeof o.leadingBlockOffset!="number"&&(o.leadingBlockOffset=u.messageOffset<l&&a?.leadingBlockOffset||0,o.leadingBlockTotal=o.messages[0]?.content?.length||0)}let d=Object.assign({},a,o),p=Rxe(oc.get(e.id),d,r);p?oc.set(e.id,p):oc.delete(e.id),bm.record(o);var h=!1;m.sessions=m.sessions.map(function(b){return b.id!==o.id?b:(h=!0,Object.assign({},b,o))}),h||m.sessions.unshift(o);var v=yK(m.sessions.find(function(b){return b.id===e.id}));v!==n&&P6(R6(m.sessions));var g=m.sessions.find(function(b){return b.id===o.id})||o;g&&Array.isArray(g.queuedMessages)&&o.id===m.selectedId&&(mC(g),YQ(),Jd()),o.id===m.selectedId&&(dC(),Xd()),o.status&&o.status!=="running"&&m.crossSessionQueue.length>0&&setTimeout(uC,0)}function kC(e){!e||!m.ws||m.ws.readyState!==WebSocket.OPEN||m.ws.send(JSON.stringify({type:"subscribe",mode:$g(e)?"add":"replace",sessionId:e,blockBudget:My,byteBudget:ZB,omitStructuredOutput:!0,compactTools:!0,capabilities:{ptyAck:!0}}))}function Q4e(e,t){if(!e)return t;var r=Object.assign({},e,t,m6(e,t)),n=!Array.isArray(t.messages)&&typeof t.output!="string";if(n)return Array.isArray(e.messages)&&!Array.isArray(t.messages)&&(r.messages=e.messages),typeof e.output=="string"&&typeof t.output!="string"&&(r.output=e.output),r;var a=typeof t.output=="string"&&t.output.length>0;!a&&typeof e.output=="string"&&(r.output=e.output);var o=e.structuredState||null,l=t.structuredState||null,u=e.sessionKind==="structured"||t.sessionKind==="structured",d=!!(e.messages&&e.messages.length&&(function(){var g=e.messages[e.messages.length-1];return g&&g.role==="assistant"&&Array.isArray(g.content)&&g.content.some(function(b){return b&&b.__processing})})()),p=Array.isArray(t.messages)?u?hC(t.messages):t.messages:[],h=p.length>0&&(function(){var g=p[p.length-1];return g&&g.role==="assistant"&&Array.isArray(g.content)&&!g.content.some(function(b){return b&&b.__processing})})(),v=e.sessionKind==="structured"&&!!o&&o.inFlight===!0&&(!l||l.inFlight!==!0)&&d&&!!o.activeRequestId&&!!l&&!!l.activeRequestId&&l.activeRequestId===o.activeRequestId&&!h;return v&&(r.status=e.status||r.status,r.structuredState=Object.assign({},l||{},o,{inFlight:!0}),r.messages=e.messages),e.id===m.selectedId&&(e.permissionBlocked&&!t.permissionBlocked&&t.permissionBlocked!==!1&&(r.permissionBlocked=!0),e.pendingEscalation&&!t.pendingEscalation&&t.permissionBlocked!==!1&&(r.pendingEscalation=e.pendingEscalation)),r}function pc(e,t,r){if(e&&e.messages&&e.messages.length>0)return e.messages;if(e&&e.sessionKind==="structured")return[];if(!r)return[];var n=typeof t=="string"?t:e&&e.output||"";return n?fX(n,e&&e.command):[]}function Y4e(e){if(!e||!e.length)return null;if(m.selectedId){var t=e.find(function(a){return a.id===m.selectedId});return t?t.id:null}if(Ou())return null;var r=e.find(function(a){return a.status==="running"});if(r)return r.id;var n=e.find(function(a){return!a.archived});return n?n.id:e[0].id}function Ci(e){var t=e||{},r=bm.begin("list");return _1({force:!t.reuseSnapshot}).then(function(n){if(r.isCurrent()){if(!Array.isArray(n)||n.some(function(h){return!h||typeof h.id!="string"}))throw new Error("Invalid session list response");var a=n.slice();m.sessions.forEach(function(h){r.changed(h.id)&&!a.some(function(v){return v.id===h.id})&&a.push(h)});var o=new Set(a.map(function(h){return h.id})),l=m.selectedId;At.retain(o),Object.keys(m.terminalStatesBySession).forEach(function(h){o.has(h)||delete m.terminalStatesBySession[h]}),m.sessions=a.map(function(h){var v=m.sessions.find(function(b){return b.id===h.id}),g=r.merge(h,v);return bm.record(g),Q4e(v,g)}),P6(R6(m.sessions));var u=t.preserveNoSelection&&!m.selectedId?null:Y4e(m.sessions);u!==void 0&&(m.selectedId=u),m.selectedId!==l&&(m.selectedId?bc(m.selectedId):Dw()),JQ(),Jd(),ip(),Sw(),m.selectedId&&m.gitStatusSessionId!==m.selectedId&&vw(m.selectedId);var d=Promise.resolve();if(!t.skipSelectedOutputReload&&m.selectedId)d=Gl(m.selectedId);else if(m.selectedId){var p=m.sessions.find(function(h){return h.id===m.selectedId});gr(p)&&(Em({preserveStickState:!0}),cc(!0))}return d.then(function(){r.isCurrent()&&(m.crossSessionQueue.length>0&&uC(),Wl(),PB())})}}).catch(function(n){if(r.isCurrent()){if(n&&n.status===401){R4e();return}var a=n&&n.message||"",o=a==="Failed to fetch"||a==="NetworkError when attempting to fetch resource."||a==="Load failed"||/aborted|aborterror|networkerror|failed to fetch/i.test(a);o||console.error("[wand] loadSessions failed:",n)}}).finally(function(){r.finish()})}var eB=null;function Sg(){eB||(eB=setTimeout(function(){eB=null,Si()},200))}function Si(){Ua("sessions:update"),Sw(),m.crossSessionQueue.length>0&&Wl()}function Sw(){var e=m.sessions.find(function(r){return r.id===m.selectedId});e||(gm(!1),Wa()),lCe();var t=document.getElementById("output");!m.terminal&&t&&e&&!gr(e)&&Ys(),m.terminal&&t&&e&&!gr(e)&&!t.contains(m.terminal.element)&&(pw(),Ys()),e||(m.terminalSessionId=null,m.terminalOutput=""),m.terminal&&e&&m.currentView==="terminal"&&ql("view"),mY(),BM(Ha()),MM(),dC(),Ua("shell:chrome")}function Gl(e){var t=bm.begin("detail");m.chatRenderTimer&&(clearTimeout(m.chatRenderTimer),m.chatRenderTimer=null);var r=m.sessions.find(function(a){return a.id===e}),n="/api/sessions/"+e;return fY(r)&&(n+="?format=chat&blockBudget="+My+"&byteBudget="+ZB+"&output=omit"),Nr(n,{credentials:"same-origin"}).then(async function(a){if(!(!a||!t.isCurrent()||m.selectedId!==e))return a.status===404?{missing:!0}:It(a)}).then(function(a){if(!(!t.isCurrent()||m.selectedId!==e)&&a){if(a.missing){m.selectedId===e&&(tC(),m.selectedId=null,ip()),Ci();return}if(a.id!==e)throw new Error("Session detail identity mismatch");if(a=t.merge(a,m.sessions.find(function(u){return u.id===e})),Kt(a,"latest"),Sw(),m.terminal&&e===m.selectedId&&a.output!==void 0){var o=!!m.ws&&(m.ws.readyState===WebSocket.OPEN||m.ws.readyState===WebSocket.CONNECTING);o?ro("session-switch"):(tw(e,a.output,{mode:"append"}),ro("session-switch",{forceReplay:!0}))}var l=m.sessions.find(function(u){return u.id===e});m.currentMessages=Ks(l,pc(l,a.output,!1)),ba(!1),a.sessionKind!=="structured"&&Wk(l)}}).catch(function(a){t.isCurrent()&&console.error("[wand] loadOutput failed:",a)}).finally(function(){t.finish()})}var Fg=new Map;function J4e(){var e=m.selectedId;if(!e||Fg.has(e))return!1;var t=m.sessions.find(function(d){return d.id===e});if(!t)return!1;var r=typeof t.messageOffset=="number"?t.messageOffset:0,n=typeof t.leadingBlockOffset=="number"?t.leadingBlockOffset:0;if(r<=0&&n<=0)return!1;var a={},o=m.chatRenderEpoch||0,l=!1;Fg.set(e,a),gK(e,o,"loading");var u=n>0?"/api/sessions/"+encodeURIComponent(e)+"/messages?turn="+r+"&blockOffset="+n+"&blockLimit="+My+"&blockBudget="+My:"/api/sessions/"+encodeURIComponent(e)+"/messages?before="+r+"&blockBudget="+My;return u+="&byteBudget="+ZB,Nr(u,{credentials:"same-origin"}).then(function(d){return It(d)}).then(function(d){if(Fg.get(e)===a&&(t=m.sessions.find(function(v){return v.id===e}),!!t)){if(n>0&&d&&Array.isArray(d.blocks)&&t.messageOffset===r&&t.leadingBlockOffset===n&&d.turnIndex===r&&d.blockOffset<n&&d.blockOffset+d.blocks.length===n){var p=Array.isArray(t.messages)?t.messages.slice():[];if(!p.length)return;p[0]=Object.assign({},p[0],{content:d.blocks.concat(p[0].content)}),t.messages=p,t.leadingBlockOffset=d.blockOffset,t.leadingBlockTotal=d.blockTotal,l=!0,bm.record({id:e,messages:p,leadingBlockOffset:d.blockOffset,leadingBlockTotal:d.blockTotal}),e===m.selectedId&&(m.currentMessages=Ks(t,pc(t,t.output,!1)),ba(!0));return}if(n===0&&d&&Array.isArray(d.messages)&&t.messageOffset===r&&Number.isSafeInteger(d.offset)&&d.offset>=0&&d.offset<r&&d.offset+d.messages.length===r&&Number.isSafeInteger(d.leadingBlockOffset)&&d.leadingBlockOffset>=0){var h=Array.isArray(t.messages)?t.messages:[];t.messages=d.messages.concat(h),t.messageOffset=d.offset,t.leadingBlockOffset=d.leadingBlockOffset,t.leadingBlockTotal=d.leadingBlockTotal,typeof d.total=="number"&&(t.messageTotal=d.total),l=!0,bm.record({id:e,messages:t.messages,messageOffset:t.messageOffset,messageTotal:t.messageTotal,leadingBlockOffset:t.leadingBlockOffset,leadingBlockTotal:t.leadingBlockTotal}),e===m.selectedId&&(m.currentMessages=Ks(t,pc(t,t.output,!1)),ba(!0))}}}).catch(function(){}).finally(function(){if(Fg.get(e)===a){Fg.delete(e);var d=m.sessions.find(function(p){return p.id===e});(l||d&&(d.messageOffset||0)===r&&(d.leadingBlockOffset||0)===n)&&gK(e,o,l?"idle":"failed")}}),!0}function An(e,t){var r=m.sessions.find(function(v){return v.id===e});if(!r)return;Xr.getSnapshot().taskId&&!r.workspaceTaskId&&va.getRuntime()?.closeWorkspace(),gC.open(e);var n=m.selectedId;if(n&&n!==e){var a=document.getElementById("input-box");a&&At.edit(n,{preserve:a.value})}m.selectedId!==e&&(Bd.closeIfOpen(),pw()),tC(),m.selectedId=e,ip(),t?.updateRoute!==!1&&hX(),m.toolContentCache={},m.messageQueue=[],m.pendingMessages=[],mC(r),JQ(),Jd(),Em(),m.currentMessages=[],m.chatRenderTimer&&(clearTimeout(m.chatRenderTimer),m.chatRenderTimer=null),MY();var o=document.querySelector(".structured-status-bar");o&&o.remove(),m._statusBarTimerId&&(clearInterval(m._statusBarTimerId),m._statusBarTimerId=null),m._statusBarStartTime=0;var l=document.querySelector(".input-composer");l&&l.classList.remove("in-flight");var u=r;m.preferredCommand=np(),m.chatMode=ap("claude",u&&u.mode?u.mode:m.chatMode),m.terminalInteractive&&u&&u.status!=="running"&&gm(!1),Si(),HSe(e,t);var d=KI(e);ba(!0),m.filePanelOpen&&W8e(u);let p=m.ws&&typeof m.ws.readyState=="number"&&fY(u)&&(m.ws.readyState===WebSocket.OPEN||m.ws.readyState===WebSocket.CONNECTING)?dEe(e):null;kC(e);var h=(p?p.then(function(v){if(!v&&m.selectedId===e&&d())return Gl(e)}):Gl(e)).then(function(){t?.focusInput!==!1&&d()&&Xl(!0)});return cQ(e),vw(e,{force:!0}),h}function vc(e){gC.clear(),e?.updateRoute!==!1&&hX(),m.selectedId&&(tC(),m.selectedId=null,m.currentTask=null,m.currentMessages=[],cQ(null),ip(),Em(),Ei(),Si())}function ym(){Ua("layout:drawer")}function TM(){var e=Ao();if(!e){var t=m.sidebarPinned?!1:!m.sessionsDrawerOpen;m.sessionsDrawerOpen=t,t&&(m.sidebarCollapsed=!1,Qr("wand-sidebar-collapsed",!1)),Qr("wand-sidebar-open",m.sessionsDrawerOpen),Ul(),Ug();return}if(m.sessionsDrawerOpen=!m.sessionsDrawerOpen,Qr("wand-sidebar-open",m.sessionsDrawerOpen),m.sessionsDrawerOpen){m.filePanelOpen=!1;try{localStorage.setItem("wand-file-panel-open","false")}catch{}}Ul()}function _M(){var e=Ao();if(!e){if(m.sidebarPinned&&!m.sidebarCollapsed)return;m.sessionsDrawerOpen=!0,m.sidebarCollapsed=!1,Qr("wand-sidebar-collapsed",!1),Qr("wand-sidebar-open",!0),Ul(),Ug();return}if(!m.sessionsDrawerOpen){m.sessionsDrawerOpen=!0,Qr("wand-sidebar-open",!0),m.filePanelOpen=!1;try{localStorage.setItem("wand-file-panel-open","false")}catch{}Ul()}}function Wg(){var e=Ao();if(!e){if(!m.sidebarPinned&&!m.sessionsDrawerOpen)return;m.sidebarPinned=!1,m.sessionsDrawerOpen=!1,Qr("wand-sidebar-pinned",!1),Qr("wand-sidebar-open",!1),Ul(),Ug();return}m.sessionsDrawerOpen&&(m.sessionsDrawerOpen=!1,Qr("wand-sidebar-open",!1),Ul())}function Z4e(){if(Ao()){Wg();return}m.sidebarPinned||m.sidebarCollapsed||!m.sessionsDrawerOpen||(m.sessionsDrawerOpen=!1,Qr("wand-sidebar-open",!1),Ul(),Ug())}function eFe(e){var t=e&&e.querySelector('button:not([disabled]):not(.hidden), select:not([disabled]), [tabindex]:not([tabindex="-1"])');if(t)try{t.focus({preventScroll:!0})}catch{t.focus()}}function kY(e,t=!1){var r=document.getElementById("composer-plus-popover"),n=document.getElementById("attach-btn");m.plusPopoverOpen=!!e,r&&(e&&r.classList.toggle("is-keyboard-open",!!t),r.classList.toggle("hidden",!e),r.setAttribute("aria-hidden",e?"false":"true")),n&&(n.classList.toggle("active",!!e),n.setAttribute("aria-expanded",e?"true":"false"),n.setAttribute("aria-label",e?"\u5173\u95ED\u66F4\u591A\u64CD\u4F5C":"\u66F4\u591A\u64CD\u4F5C"),n.setAttribute("title",e?"\u5173\u95ED":"\u66F4\u591A")),e&&t&&r&&requestAnimationFrame(function(){m.plusPopoverOpen&&r.isConnected&&eFe(r)})}function tFe(e=!1){kY(!m.plusPopoverOpen,!m.plusPopoverOpen&&!!e)}function fc(e=!1){if(m.plusPopoverOpen){var t=document.getElementById("attach-btn"),r=document.getElementById("composer-plus-popover"),n=!!e||!!(r&&r.contains(document.activeElement));if(n&&t)try{t.focus({preventScroll:!0})}catch{t.focus()}kY(!1,!1)}}function Ei(){Ao()&&m.sessionsDrawerOpen&&Wg()}function Ug(){var e=document.querySelector(".main-layout");if(e){var t=function(r){r.propertyName==="padding-left"&&(e.removeEventListener("transitionend",t),sc(!0))};e.addEventListener("transitionend",t)}setTimeout(function(){sc(!0)},350)}function CC(){var e=Ao();m.sidebarPinned||(m.sidebarPinned=!0,Qr("wand-sidebar-pinned",!0)),m.sidebarCollapsed=!m.sidebarCollapsed,Qr("wand-sidebar-collapsed",m.sidebarCollapsed),m.sidebarCollapsed?m.sessionsDrawerOpen=!1:e?(m.sidebarPinned=!1,m.sessionsDrawerOpen=!0,Qr("wand-sidebar-pinned",!1)):m.sessionsDrawerOpen=!0,Qr("wand-sidebar-open",m.sessionsDrawerOpen),Ul(),Si(),rFe(),Ug()}function jM(){Ao()||(m.sidebarPinned=!m.sidebarPinned,m.sessionsDrawerOpen=!0,Qr("wand-sidebar-pinned",m.sidebarPinned),Qr("wand-sidebar-open",!0),Ul(),Ug())}function rFe(){Ua("layout:collapse-button")}function nFe(e){if(ki(["newSession"])){var t=window.__wandReactNewSession;if(t&&typeof t.open=="function")try{if(t.open(e?{initialCwd:e}:void 0))return}catch(n){console.warn("[wand] React new-session host unavailable",n)}try{var r=new URL(window.location.href).searchParams.get("reactUi")==="0";if(r){Qe("\u65B0\u5EFA\u4F1A\u8BDD\u754C\u9762\u5DF2\u88AB ?reactUi=0 \u7981\u7528\uFF1B\u79FB\u9664\u8BE5\u53C2\u6570\u5E76\u5237\u65B0\u540E\u5373\u53EF\u4F7F\u7528\u3002","error");return}if(window.localStorage.getItem("wand.reactUi.enabled")==="false"){window.localStorage.setItem("wand.reactUi.enabled","true"),Qe("\u6B63\u5728\u542F\u7528\u65B0\u5EFA\u4F1A\u8BDD\u754C\u9762\u2026","info"),window.setTimeout(function(){window.location.reload()},120);return}}catch{}Qe("\u65B0\u5EFA\u4F1A\u8BDD\u754C\u9762\u672A\u80FD\u542F\u52A8\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\u3002","error")}}function SC(e){var t=function(){nFe(e)};Sm(t)&&t()}function NM(e){aY(e,"merge")}function PM(e){aY(e,"cleanup")}function EK(){if(ki(["settings"])){var e=window.__wandReactSettings;if(e&&typeof e.open=="function"){var t=document.getElementById("settings-button");t&&t.focus({preventScroll:!0}),e.open();return}try{var r=new URL(window.location.href).searchParams.get("reactUi")==="0";if(r){Qe("\u8BBE\u7F6E\u754C\u9762\u5DF2\u88AB ?reactUi=0 \u7981\u7528\uFF1B\u79FB\u9664\u8BE5\u53C2\u6570\u5E76\u5237\u65B0\u540E\u5373\u53EF\u4F7F\u7528\u3002","error");return}if(window.localStorage.getItem("wand.reactUi.enabled")==="false"){window.localStorage.setItem("wand.reactUi.enabled","true"),Qe("\u6B63\u5728\u542F\u7528\u8BBE\u7F6E\u754C\u9762\u2026","info"),window.setTimeout(function(){window.location.reload()},120);return}}catch{}Qe("\u8BBE\u7F6E\u754C\u9762\u672A\u80FD\u542F\u52A8\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\u3002","error")}}function RM(){Sm(EK)&&EK()}function CY(e,t,r){if(!e)return;function n(){if(r){r();return}if(t){var a=t.textContent;t.textContent="\u5DF2\u590D\u5236",setTimeout(function(){t.textContent=a},1500)}}if(Cm&&typeof WandNative.copyToClipboard=="function")try{if(WandNative.copyToClipboard(e)==="ok"){n();return}}catch{}navigator.clipboard.writeText(e).then(n).catch(function(){var a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),n()})}function aFe(){fetch("/api/auto-update",{credentials:"same-origin"}).then(function(e){return e.json()}).then(function(e){if(e.apk)return fetch("/api/android-apk-update?currentVersion="+encodeURIComponent(aQ),{credentials:"same-origin"}).then(function(t){return t.json()}).then(function(t){if(!(!t.updateAvailable||!t.downloadUrl))try{WandNative.downloadUpdate(t.downloadUrl,t.fileName||"wand-update.apk",t.source||"local")}catch{}})}).catch(function(){})}function iFe(){NB&&fetch("/api/auto-update",{credentials:"same-origin"}).then(function(e){return e.json()}).then(function(e){if(e.dmg)return fetch("/api/macos-dmg-update?currentVersion="+encodeURIComponent(NB),{credentials:"same-origin"}).then(function(t){return t.json()}).then(function(t){if(!(!t.updateAvailable||!t.downloadUrl))try{WandNative.downloadUpdate(t.downloadUrl,t.fileName||"wand-update.dmg",t.source||"local")}catch{}})}).catch(function(){})}function Yl(e,t){if(!e||typeof e!="object"||!m.terminal)return e;var r;try{r=_ke(t)}catch{}var n=r?.cols??m.terminal.cols,a=r?.rows??m.terminal.rows;return typeof n=="number"&&typeof a=="number"&&Number.isFinite(n)&&Number.isFinite(a)&&n>0&&a>0&&(e.cols=n,e.rows=a),e}async function Fw(){return m.terminal&&m.terminal.cols?Promise.resolve():(await Rf(),new Promise(function(e){var t=!1,r=function(){t||(t=!0,e())},n=setTimeout(r,2e3);try{Ys({prepare:!0})}catch{}requestAnimationFrame(function(){requestAnimationFrame(function(){m.terminal&&m.terminal.cols&&(clearTimeout(n),r())})})}))}function OM(){var e=np(),t=C2(e),r=ps(),n=ap(e,m.config&&m.config.defaultMode?m.config.defaultMode:"default");return m.preferredCommand=e,m.chatMode=ap(e,m.chatMode),Fw().then(function(){return Nr("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Yl({kind:"pty",command:t,provider:e,cwd:r,mode:n,sessionSource:"interactive"},{kind:"pty",provider:e,command:t,cwd:r}))})}).then(function(a){return a.json()}).then(function(a){if(a.error){Qe(a.error,"error");return}var o=String(a.id);return op(o,!0),Ci({skipSelectedOutputReload:!0}).then(function(){An(o)})}).then(function(){Xl(!0)}).catch(function(){Qe("\u65E0\u6CD5\u542F\u52A8\u4F1A\u8BDD\u3002","error")})}function zM(e,t){var r=!!(t&&t.shell),n=r?"":t&&t.provider||np(),a=(t&&t.model?String(t.model):"").trim(),o=r?"pty":t&&t.kind||m.config&&m.config.defaultSessionKind||"structured";if(o==="structured")return EC(t&&t.initialInput,e,t&&t.mode,!1,{workspaceId:t&&t.workspaceId,workspaceTaskId:t&&t.workspaceTaskId,provider:n,engine:t&&t.engine,model:a||void 0,systemPrompt:t&&t.systemPrompt,employeeId:t&&t.employeeId});var l=r?"default":ap(n,t&&t.mode||(m.config&&m.config.defaultMode?m.config.defaultMode:"default"));r||(m.preferredCommand=n,m.chatMode=ap(n,m.chatMode));var u=r?void 0:C2(n),d=r?{kind:"pty",shell:!0,cwd:e,mode:l,sessionSource:"interactive"}:{kind:"pty",command:u,provider:n,cwd:e,mode:l,model:a||void 0,initialInput:t&&t.initialInput,systemPrompt:t&&t.systemPrompt,sessionSource:"interactive"};return t&&t.workspaceId&&(d.workspaceId=t.workspaceId),t&&t.workspaceTaskId&&(d.workspaceTaskId=t.workspaceTaskId),Fw().then(function(){return Nr("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Yl(d,{kind:r?"shell":"pty",provider:r?void 0:n,command:u,cwd:e,workspaceTaskId:t?.workspaceTaskId}))})}).then(function(p){return p.json()}).then(function(p){if(p.error)throw new Error(String(p.error));if(!p.id)throw new Error("\u670D\u52A1\u7AEF\u672A\u8FD4\u56DE\u65B0\u4F1A\u8BDD ID\u3002");var h=String(p.id);return op(h,!0),Ci({skipSelectedOutputReload:!0}).then(function(){return An(h),h})}).then(function(p){return Xl(!0),p}).catch(function(p){throw Qe(p&&p.message?p.message:"\u65E0\u6CD5\u542F\u52A8\u4F1A\u8BDD\u3002","error"),p})}function oFe(e){if(_Q(e)||sEe(e)||U8e(e))return;let t=Ha(),r=li.read(m.selectedId);if(!gr(t)&&(r.ctrl||r.shift)&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key.length===1&&!e.target?.readOnly){let x=eC(e.key,Yy(m.selectedId,{ctrl:!1,shift:e.shiftKey}));if(x!==null){e.preventDefault(),r.ctrl||m.terminalInteractive?fa(x,r.ctrl?"ctrl_"+e.key.toLowerCase():"interactive_text").catch(function(){}):YB(e.target,x);return}}if(!gr(t)&&m.terminalInteractive&&(r.ctrl||r.shift)&&!e.metaKey&&!e.target?.readOnly){let x=Ok(e);if(["up","down","left","right","home","end","pageup","pagedown","delete","tab"].includes(x)){e.preventDefault(),fa(tM(x,Yy(m.selectedId,{ctrl:e.ctrlKey,shift:e.shiftKey,alt:e.altKey})),x).catch(function(){});return}}if(jQ(e)){RQ(e);return}if(e.key==="Enter"){if(m.promptOptimizeRequest&&m.promptOptimizeRequest.sessionId===m.selectedId){e.preventDefault();return}if(e.shiftKey){e.preventDefault();var n=document.getElementById("input-box");n&&YB(n,`
293
+ `);return}e.preventDefault();var a=!!(e.metaKey||e.ctrlKey);Fm(a?{interrupt:!0}:void 0);return}if(e.key==="Backspace"){if(m.terminalInteractive&&!document.documentElement.classList.contains("is-wand-embed-terminal")){e.preventDefault(),fa("\x7F","backspace").catch(function(){});return}setTimeout(function(){var x=document.getElementById("input-box");x&&wm(x.value,!0)},0);return}if(e.key==="Escape"){if(e.preventDefault(),m.plusPopoverOpen||of())return;var o=Ha();gr(o)?o&&o.structuredState&&o.structuredState.inFlight&&UB():fa(Dg("escape"),"escape");return}if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="c"){var l=document.getElementById("input-box"),u=l&&l.selectionStart!==l.selectionEnd||sw();if(u)return;var d=Ha();if(gr(d)){e.preventDefault(),d&&d.structuredState&&d.structuredState.inFlight&&UB();return}e.preventDefault(),fa(Dg("ctrl_c"),"ctrl_c");return}if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="d"){var p=document.getElementById("input-box"),h=p&&p.selectionStart!==p.selectionEnd||sw();if(h)return;var v=Ha();if(gr(v)){e.preventDefault();return}e.preventDefault(),fa(Dg("ctrl_d"),"ctrl_d");return}if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="l"){e.preventDefault();var g=Ha();if(gr(g))return;fa(Dg("ctrl_l"),"ctrl_l");return}if(!((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="a")&&!((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="v")){if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="x"){var n=document.getElementById("input-box"),b=n&&n.selectionStart!==n.selectionEnd;if(b)return;e.preventDefault(),fa("","ctrl_x");return}e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&setTimeout(function(){var x=document.getElementById("input-box");x&&wm(x.value)},0)}}var sFe=10*1024*1024;function lFe(e){return e<1024?e+" B":e<1024*1024?(e/1024).toFixed(1)+" KB":(e/(1024*1024)).toFixed(1)+" MB"}function uFe(e){return/^image\/(png|jpe?g|gif|webp|bmp|svg\+xml)/.test(e)}function SY(e){var t=e?m.sessions.find(function(r){return r.id===e}):Ha();return m.currentView==="terminal"&&t&&!gr(t)&&t.status==="running"?t:null}function cFe(e){var t=e&&e.target;if(!t||typeof t.closest!="function")return null;var r=t.closest("[data-pty-session-id]");return r&&r.dataset.ptySessionId?r.dataset.ptySessionId:t.closest("#output, .xterm")||m.terminalInteractive&&t.closest("#input-box")?m.selectedId:null}function dFe(e,t){var r=typeof e.name=="string"?e.name.trim():"",n=iw(e.type),a=n?"clipboard-image-"+Date.now()+"-"+((t||0)+1)+xSe(e.type):"attachment-"+Date.now()+"-"+((t||0)+1),o=/\.(?:png|jpe?g|gif|webp|bmp|svg)$/i.test(r);return{file:e,name:n&&!o?a:r||a,size:e.size,previewUrl:null}}function FY(e){var t=[],r=Array.from(e||[]).slice(0,5);(e&&e.length||0)>5&&Qe("\u4E00\u6B21\u6700\u591A\u7C98\u8D34\u6216\u4E0A\u4F20 5 \u4E2A\u9644\u4EF6\u3002","warning");for(var n=0;n<r.length;n++){var a=r[n];if(a){if(a.size>sFe){Qe("\u6587\u4EF6\u8FC7\u5927\uFF08\u4E0A\u9650 10 MB\uFF09: "+(a.name||"\u526A\u8D34\u677F\u56FE\u7247"),"error");continue}t.push(dFe(a,n))}}return t}function LM(e,t){if(!t){var r=m.sessions.find(function(n){return n.id===e});t=r&&(r.provider||Mu(r.command||""))}return String(t||"").toLowerCase()==="codex"?!0:$g(e)?Xke(e):!!(m.terminal&&m.terminal.modes&&m.terminal.modes.bracketedPasteMode)}var tB=Promise.resolve(),kK=0;function pFe(e,t){var r=tB;return tB=r.then(function(){return kK?Dk():void 0}).then(function(){return e.reduce(function(n,a,o){var l=n.then(function(){return kK+=1,fa(a.data,a.shortcutKey,"terminal",t)});return o<e.length-1?l.then(Dk):l},Promise.resolve())}),tB}function fFe(e,t,r,n){var a=mQ(t,{bracketedPaste:r,provider:n});return a.length?pFe(a,e):Promise.resolve()}function FC(e,t){var r=SY(t);if(!r)return!1;var n=FY(e);if(!n.length)return!0;var a=r.id,o=r.provider||Mu(r.command||""),l=n.filter(function(d){return iw(d.file&&d.file.type)}).length,u=LM(a,o);return Qe(l===n.length?"\u6B63\u5728\u7C98\u8D34\u56FE\u7247\u2026":"\u6B63\u5728\u4E0A\u4F20\u9644\u4EF6\u2026","info"),$Y(a,n).then(function(d){return fFe(a,d,u,o).then(function(){var p=l===n.length?n.length+" \u5F20\u56FE\u7247":n.length+" \u4E2A\u9644\u4EF6",h=o==="codex"?"Codex":"CLI";Qe("\u5DF2\u5C06 "+p+"\u7C98\u8D34\u5230 "+h+" \u8F93\u5165\u533A\u3002","info")})}).catch(function(d){Qe("\u9644\u4EF6\u7C98\u8D34\u5931\u8D25: "+(d&&d.message||d),"error")}),!0}function QB(e){var t=Array.from(e||[]);if(t.length&&!(m.terminalInteractive&&FC(t)))for(var r=0;r<t.length;r++)mFe(t[r])}function mFe(e){if(e&&m.selectedId&&!(m.terminalInteractive&&FC([e]))){var t=FY([e]);if(t.length){var r=t[0];uFe(e.type)&&(r.previewUrl=URL.createObjectURL(e)),At.edit(m.selectedId,{addAttachment:r}),Dw()}}}function hFe(e){At.edit(m.selectedId,{removeAttachment:e}),Dw()}function $w(e){var t=e===void 0?m.selectedId:e;return At.read(t).attachments}function Dw(){var e=$w(m.selectedId);I4e({resolve:function(){return e.map(function(t,r){return{index:r,name:t.name,sizeLabel:lFe(t.size),size:t.size,previewUrl:t.previewUrl||null}})},onRemove:function(t){hFe(t)}}),Wa()}function $Y(e,t){var r=t||$w(e);if(!r.length)return Promise.resolve([]);var n=new FormData;return r.forEach(function(a){n.append("files",a.file,a.name)}),fetch("/api/sessions/"+encodeURIComponent(e)+"/upload",{method:"POST",body:n,credentials:"same-origin"}).then(function(a){return a.ok?a.json():a.json().then(function(o){throw new Error(o.error||"\u4E0A\u4F20\u5931\u8D25")})}).then(function(a){return a.files||[]})}function CK(e){if(!e||!e.length)return"";var t=e.map(function(r){return r.savedPath});return`[\u9644\u4EF6\u5DF2\u4E0A\u4F20\uFF0C\u8BF7\u67E5\u770B\u4EE5\u4E0B\u6587\u4EF6:
294
+ `+t.join(`
295
+ `)+`]
296
+
297
+ `}function SK(e,t){if(!e||gr(Ha())||document.documentElement.classList.contains("is-wand-embed-terminal"))return!1;var r=e.value||"";if(!r)return!1;let n=li.read(m.selectedId),a=t?.data??r,o=lEe(a,t,n);if(!m.terminalInteractive){if(!n.ctrl||o===null||!m.selectedId)return!1;let l=Math.max(0,e.selectionStart-a.length);return e.value=At.read(m.selectedId).text,e.setSelectionRange(l,l),ya(e),fa(o,"ctrl_"+a.toLowerCase()).catch(function(){}),!0}return fa(r===a&&o!==null?o:r,n.ctrl&&o!==null&&r===a?"ctrl_"+a.toLowerCase():"interactive_text").catch(function(){}),e.value="",ya(e),wm("",!0),!0}function DY(e){var t=e&&e.clipboardData;if(!t)return[];var r=[],n=t.items;if(n){for(var a=0;a<n.length;a++)if(iw(n[a].type)){var o=n[a].getAsFile();o&&r.push(o)}}if(!r.length&&t.files)for(var l=0;l<t.files.length;l++)iw(t.files[l].type)&&r.push(t.files[l]);return r}function gFe(e){var t=cFe(e);if(!t||!SY(t))return!1;var r=DY(e);return r.length?(e.preventDefault(),FC(r,t)):!1}function vFe(e){var t=DY(e);if(t.length){if(e.preventDefault(),m.terminalInteractive&&FC(t))return;QB(t);return}var r=e.clipboardData&&e.clipboardData.getData("text");if(r){if(e.preventDefault(),m.terminalInteractive){var n=Ha(),a=n&&(n.provider||Mu(n.command||""));fa(pQ(r,LM(m.selectedId,a)),"paste").catch(function(){});return}var o=document.getElementById("input-box");o&&YB(o,r)}}function AY(e){return At.read(e).text}function Gk(e,t,r,n){if(e&&(At.edit(e,{text:String(t||""),persist:n}),!r&&e===m.selectedId)){var a=document.getElementById("input-box");a&&(a.value=t,ya(a))}}function op(e,t){if(e&&(At.edit(e,{clear:!0}),!t&&e===m.selectedId)){var r=document.getElementById("input-box");r&&(r.value="",ya(r),xm(r))}}function wm(e,t){Gk(m.selectedId,e,t)}function YB(e,t){if(!e)return"";if(e.readOnly||m.promptOptimizeRequest&&m.promptOptimizeRequest.sessionId===m.selectedId)return e.value;var r=e.selectionStart===null?e.value.length:e.selectionStart,n=e.selectionEnd===null?r:e.selectionEnd;if(typeof e.setRangeText=="function")e.setRangeText(t,r,n,"end");else{var a=e.value;e.value=a.slice(0,r)+t+a.slice(n);var o=r+t.length;e.setSelectionRange(o,o)}return wm(e.value,!0),ya(e),xm(e),e.value}function bc(e){if(!(!e||e!==m.selectedId)){var t=document.getElementById("input-box");if(t){var r=AY(e);t.value=r,ya(t);try{t.setSelectionRange(r.length,r.length)}catch{}}Dw()}}function $C(e,t){var r=t===void 0?m.selectedId:t;return Dl(m.sessions.find(n=>n.id===r))||Ag.get(r)?.pending?!1:!!String(e||"").trim()||$w(r).length>0}function bFe(){if(!m.promptOptimizeRequest){var e=document.getElementById("input-box"),t=document.getElementById("prompt-optimize-btn");if(e){var r=(e.value||"").trim(),n=m.selectedId;if(!r){typeof Qe=="function"&&Qe("\u8BF7\u5148\u8F93\u5165\u8981\u4F18\u5316\u7684\u5185\u5BB9\u3002","info"),e.focus();return}n&&At.edit(n,{text:e.value});var a={sessionId:n,revision:At.read(n).revision},o=document.activeElement===t,l=document.activeElement===e||o;m.promptOptimizeRequest=a,Wa();var u={text:r};n&&(u.sessionId=n),fetch("/api/optimize-prompt",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(u)}).then(function(d){return d.text().then(function(p){var h={};if(p)try{h=JSON.parse(p)}catch{}return{ok:d.ok,status:d.status,data:h}})}).then(function(d){if(!d.ok)throw new Error(d.data&&d.data.error||"\u63D0\u793A\u8BCD\u4F18\u5316\u5931\u8D25\uFF08HTTP "+d.status+"\uFF09\u3002");var p=d.data&&d.data.optimized||"";if(!p)throw new Error("Claude \u8FD4\u56DE\u4E3A\u7A7A\u3002");if(n&&!At.edit(n,{text:p,expectedRevision:a.revision})){Qe("\u539F\u8349\u7A3F\u5DF2\u4FEE\u6539\uFF0C\u4FDD\u7559\u6700\u65B0\u5185\u5BB9\u3002","info");return}if(n&&m.selectedId!==n){typeof Qe=="function"&&Qe("\u63D0\u793A\u8BCD\u5DF2\u5199\u56DE\u539F\u4F1A\u8BDD\u8349\u7A3F\u3002","info");return}var h=document.getElementById("input-box");h&&yFe(h,p,n)}).catch(function(d){typeof Qe=="function"&&Qe(d&&d.message||"\u63D0\u793A\u8BCD\u4F18\u5316\u5931\u8D25\u3002","error");var p=document.getElementById("prompt-optimize-btn");p&&m.selectedId===n&&(p.classList.add("is-error"),setTimeout(function(){p.isConnected&&p.classList.remove("is-error")},800))}).finally(function(){if(m.promptOptimizeRequest===a&&(m.promptOptimizeRequest=null),Wa(),l&&m.selectedId===n){var d=document.getElementById("input-box");if(d)try{d.focus({preventScroll:!0})}catch{d.focus()}}})}}}function yFe(e,t,r){if(e){var n=r||m.selectedId,a=String(t||"");if(Gk(n,a,!0),!(n&&m.selectedId!==n)){e.value=a,ya(e);try{e.setSelectionRange(a.length,a.length)}catch{}}}}function xm(e){var t=document.querySelector(".input-composer");if(t){var r=e||document.getElementById("input-box"),n=!!(r&&String(r.value||"").trim());t.classList.toggle("has-text",n),Wa(!0)}}function mc(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var FK=A(_(),1),wFe=A(Xa(),1),xFe=A(er(),1);function Gy(e){return e==="completed"||e==="in_progress"?e:"pending"}function EFe(e){let t=0,r=0,n="";for(let o of e){let l=Gy(o.status);l==="completed"&&(t+=1),l==="in_progress"&&(r+=1,n||(n=o.activeForm||o.content||""))}if(!n){let o=e.find(l=>Gy(l.status)==="pending"&&!!(l.activeForm||l.content));n=o&&(o.activeForm||o.content)||""}let a=e.length;return{total:a,completed:t,inProgress:r,activeTask:n,ratio:a>0?t/a:0,allDone:a>0&&t===a}}var Vs=A(xe(),1),mk=null,Kk=null,BY=[],JB=null,Ig=!1;function hk(e,t=!1){Ig!==e&&(Ig=e,e&&document.dispatchEvent(new CustomEvent("wand-composer-work-popup",{detail:"todo"})),IY(),t&&document.getElementById("todo-progress-toggle")?.focus({preventScroll:!0}))}function kFe({todos:e,context:t}){let r=EFe(e),n=`${r.completed}/${r.total}`;if(FK.useEffect(()=>{let d=p=>{p.detail!=="todo"&&hk(!1)};return document.addEventListener("wand-composer-work-popup",d),()=>document.removeEventListener("wand-composer-work-popup",d)},[]),!t)return null;let a=t.kind==="running",o=t.kind==="ended"?"\u5DF2\u7ED3\u675F":t.kind==="failed"?"\u5931\u8D25":t.label,l=e.find(d=>Gy(d.status)==="in_progress")??e.find(d=>Gy(d.status)==="pending"),u=r.allDone?"\u6E05\u5355\u5DF2\u5B8C\u6210":a?r.activeTask||"\u5C1A\u65E0\u5F53\u524D\u9879":l?.content||"\u53EA\u8BFB\u8BB0\u5F55";return(0,Vs.jsx)(bi,{open:Ig,onOpenChange:hk,side:"top",align:"center",className:"composer-work-popover composer-todo-popover",contentId:"todo-progress-body",contentRole:"dialog",popupOwner:"composer-todo",ariaLabel:"\u672C\u8F6E\u5F85\u529E\u8FDB\u5EA6",trigger:FK.cloneElement(O7({label:`\u5F85\u529E ${o}`,count:n,preview:u,icon:"task",expanded:Ig,id:"todo-progress-toggle",className:"todo-progress-header"}),{"aria-label":`\u5F85\u529E\uFF0C${t.label}\uFF0C\u5DF2\u5B8C\u6210 ${n}\uFF0C${u}\uFF0C\u67E5\u770B\u8BE6\u60C5`,"aria-controls":"todo-progress-body"}),children:(0,Vs.jsx)(z7,{className:"composer-todo-panel",title:`\u5F85\u529E \xB7 \u5DF2\u5B8C\u6210 ${n}`,description:a?r.allDone?"\u6E05\u5355\u5DF2\u5B8C\u6210\uFF0C\u4E0D\u4EE3\u8868\u6267\u884C\u7ED3\u675F\u6216\u4EFB\u52A1\u9A8C\u6536\u901A\u8FC7\u3002":void 0:`${t.label} \xB7 ${t.note}`,onClose:()=>hk(!1,!0),children:(0,Vs.jsx)("ol",{className:"composer-todo-list",id:"todo-progress-list","data-execution":t.kind,children:e.map((d,p)=>{let h=Gy(d.status);return(0,Vs.jsxs)("li",{"data-status":!a&&h==="in_progress"?"pending":h,"data-recorded-status":h,"aria-current":a&&h==="in_progress"?"step":void 0,children:[(0,Vs.jsx)("span",{className:"composer-todo-icon",role:"img","aria-label":h==="completed"?"\u5DF2\u5B8C\u6210":h==="in_progress"?a?"\u8FDB\u884C\u4E2D":"\u6700\u540E\u8BB0\u5F55\u9879\uFF0C\u975E\u8FD0\u884C\u4FE1\u53F7":"\u5F85\u5904\u7406",children:(0,Vs.jsx)(Be,{name:h==="completed"?"check":"circle",size:16})}),(0,Vs.jsxs)("div",{"data-short":(d.content||"").length<=60,children:[h==="in_progress"&&(0,Vs.jsx)("span",{className:"composer-todo-status",children:a?`\u5F53\u524D \xB7 \u7B2C ${p+1} \u9879`:`\u6700\u540E\u8BB0\u5F55 \xB7 \u7B2C ${p+1} \u9879`}),(0,Vs.jsx)(L7,{text:d.content||"\uFF08\u672A\u63D0\u4F9B\u4EFB\u52A1\u6B63\u6587\uFF09"})]})]},`${t.sourceKey}:${p}:${d.content}`)})})})})}function IY(){!Kk||!mk?.isConnected||(0,xFe.flushSync)(()=>Kk.render((0,Vs.jsx)(Xn,{children:(0,Vs.jsx)(kFe,{todos:BY,context:JB})})))}function CFe(e,t){let r=document.getElementById("todo-progress");r&&(mk!==r&&(Kk?.unmount(),mk=r,Kk=(0,wFe.createRoot)(mk),Ig=!1),JB?.sourceKey!==t?.sourceKey&&(Ig=!1),BY=e,JB=t,IY())}m._statusBarTimerId=null;m._statusBarStartTime=0;function MY(){hk(!1),document.getElementById("todo-progress")?.classList.add("hidden")}function TY(e,t){var r=document.querySelector("[data-composer-running-host]"),n=document.querySelector(".structured-status-bar"),a=document.querySelector(".input-composer");if(n&&r&&n.parentElement!==r&&r.appendChild(n),!t||!gr(t)){n&&n.remove(),a&&a.classList.remove("in-flight"),clearInterval(m._statusBarTimerId),m._statusBarTimerId=null;return}var o=t.structuredState&&t.structuredState.inFlight,l=t.structuredState&&t.structuredState.phase==="background"?"\u540E\u53F0\u4EFB\u52A1\u4E2D":"\u56DE\u590D\u4E2D";if(o){var u=Z2(t);if(m._statusBarStartTime=u??0,a&&a.classList.add("in-flight"),!n&&r){var d=document.createElement("div");d.className="structured-status-bar",d.innerHTML='<span class="status-bar-dot"></span><span class="status-bar-label">'+l+'</span><span class="status-bar-timer">0.0s</span>',r.appendChild(d),n=d}else if(n&&n.classList.contains("completed")){n.classList.remove("completed"),n.style.animation="none",n.querySelector(".status-bar-label").textContent=l;var p=n.querySelector(".status-bar-dot");p&&(p.style.display="")}var h=n&&n.querySelector(".status-bar-label");h&&(h.textContent=l);var v=n&&n.querySelector(".status-bar-timer");v&&(v.hidden=u===null,u!==null&&(v.textContent=(Math.max(0,Date.now()-u)/1e3).toFixed(1)+"s")),u===null&&(clearInterval(m._statusBarTimerId),m._statusBarTimerId=null),!m._statusBarTimerId&&u!==null&&(m._statusBarTimerId=setInterval(function(){var F=document.querySelector(".structured-status-bar:not(.completed)");if(!F){clearInterval(m._statusBarTimerId),m._statusBarTimerId=null;return}var S=(Math.max(0,Date.now()-m._statusBarStartTime)/1e3).toFixed(1),D=F.querySelector(".status-bar-timer");D&&(D.textContent=S+"s")},100))}else if(clearInterval(m._statusBarTimerId),m._statusBarTimerId=null,a&&a.classList.remove("in-flight"),n&&!n.classList.contains("completed")){var g=m._statusBarStartTime?((Date.now()-m._statusBarStartTime)/1e3).toFixed(1):"0.0";n.classList.add("completed"),n.querySelector(".status-bar-label").textContent="\u5B8C\u6210";var b=new Date,x=function(S){return S<10?"0"+S:String(S)},y=x(b.getHours())+":"+x(b.getMinutes())+":"+x(b.getSeconds()),E=n.querySelector(".status-bar-timer");E&&(E.hidden=!1,E.textContent=y,E.title="\u8017\u65F6 "+g+"s");var p=n.querySelector(".status-bar-dot");p&&(p.style.display="none"),m._statusBarStartTime=0,setTimeout(function(){n.classList.contains("completed")&&n.parentNode&&n.remove()},3e3)}}function SFe(e,t,r){var n=String(e||""),a=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\")),o=a>=0?n.slice(0,a+1):"",l=a>=0?n.slice(a+1):n;return'<span class="'+t+' tail-marquee-path" title="'+mc(n)+'"'+(r||"")+'><span class="tail-marquee-path-inner"><span class="tail-marquee-prefix">'+mc(o)+'</span><span class="tail-marquee-leaf">'+mc(l)+"</span></span></span>"}var FFe=/\.(png|jpe?g|gif|webp|svg|avif|bmp|ico|heic|heif)$/i;function $Fe(e){if(typeof e!="string")return!1;var t=e.trim().split(/[?#]/)[0];return FFe.test(t)}function DFe(e){if(e){var t=function(){try{var r=e.firstElementChild&&e.firstElementChild.classList&&e.firstElementChild.classList.contains("tail-marquee-path-inner")?e.firstElementChild:null;if(r){var n=Math.max(0,r.scrollWidth-e.clientWidth);e.classList.toggle("is-overflowing",n>1),e.style.setProperty("--tail-marquee-shift",n+"px");var a=Math.max(4.8,n/18);e.style.setProperty("--tail-marquee-duration",Math.max(6.8,a/.68)+"s");return}e.scrollWidth>e.clientWidth&&(e.scrollLeft=e.scrollWidth)}catch{}};t(),typeof requestAnimationFrame=="function"&&requestAnimationFrame(t)}}function _Y(e){var t=e||document;!t||typeof t.querySelectorAll!="function"||t.querySelectorAll(".tail-marquee-path").forEach(function(r){DFe(r)})}var Ky=A(xe(),1),Ey=new Map,Eg=new Map,Xy=null,ky=null,Kd=null;function AFe(){return Xy?Promise.resolve(Xy):(ky||(ky=globalThis.__wandImportBrowserModule("a1195decf69de8a4").then(e=>(Xy=e,ky=null,e),e=>{throw ky=null,e})),ky)}var Qy=null,Cy=null;function BFe(){return Qy?Promise.resolve(Qy):(Cy||(Cy=globalThis.__wandImportBrowserModule("1cdc7dc11ebbb0be").then(e=>(Qy=e,Cy=null,e),e=>{throw Cy=null,e})),Cy)}var IFe={subscribe:At.subscribe.bind(At),revision:()=>At.read(m.selectedId).revision,text:()=>At.read(m.selectedId).text,isComposing:()=>m.composerComposing};function jY(){for(let[a,o]of Eg)a.isConnected||(o.unmount(),Eg.delete(a));let e=document.querySelector("[data-composer-avatar-host]"),t=m.sessions.find(a=>a.id===m.selectedId),r=t?{...t,ptyRunning:N0(t).ptyRunning,turnStartedAt:t.ptyTurnStartedAt,lastActivityAt:t.ptyLastActivityAt}:void 0;if(e){let a=Eg.get(e)??(0,sB.createRoot)(e);Eg.set(e,a),(0,lB.flushSync)(()=>a.render((0,Ky.jsx)(i$,{employeeName:t?.employeeId?t.employeeName||"\u5458\u5DE5":void 0,usage:a$(t?.messages??[]),activity:r,legacyStatus:t?.sessionKind==="structured"}))),TY(null,t)}let n=document.querySelector("[data-composer-employee-host]");if(n){let a=Eg.get(n)??(0,sB.createRoot)(n);Eg.set(n,a);let o=t?.employeeId?{id:t.employeeId,name:t.employeeName||"\u5458\u5DE5",avatar:t.employeeAvatar}:null;(0,lB.flushSync)(()=>a.render((0,Ky.jsx)(Xn,{children:o?(0,Ky.jsx)(K3,{employee:o,onClick:l=>m1.open(o,l.currentTarget)}):null})))}}function Xk(e){if(!Qy){Kd=e,BFe().then(()=>{let p=Kd;Kd=null,p&&Xk(p)},()=>{Kd=null});return}Qy.mountComposerSurfaces(),jY();let t=m.sessions.find(p=>p.id===m.selectedId);_a("wand-sender-owned-input","[data-composer-sender] .ant-sender-input { width:100%; }");for(let[p,h]of Ey)p.isConnected||(h.root.unmount(),Ey.delete(p));let r=document.querySelector("[data-composer-sender]");if(!r)return;let n=t?.sessionKind==="structured",a=Ey.get(r);if(!n){if(a){let p=document.activeElement===a.input,h=r;h.moveBefore?h.moveBefore(a.input,null):(r.appendChild(a.input),p&&a.input.focus({preventScroll:!0})),a.root.unmount(),a.chrome.remove(),Ey.delete(r),a.input.className="input-textarea"}return}if(a)return;if(!Xy){Kd=e,AFe().then(()=>{let p=Kd;Kd=null,p&&Xk(p)},()=>{Kd=null});return}let o=r.querySelector("#input-box");if(!o)return;let l=document.createElement("div");r.appendChild(l);let u=(0,sB.createRoot)(l);Ey.set(r,{root:u,chrome:l,input:o});let{ComposerSender:d}=Xy;(0,lB.flushSync)(()=>u.render((0,Ky.jsx)(Xn,{children:(0,Ky.jsx)(d,{input:o,resize:e,projection:IFe})})))}function MFe(e){return`dm_${e}`}function TFe(e,t){let r=t.trim();if(!r)return e;let n=e.replace(/\\/g,"/").replace(/\/+$/,"");return n?`${n}/${r}`:`/${r}`}function Jl(e){let t=e.replace(/\\/g,"/").replace(/\/+$/,"");if(!t||t==="/")return"/";let r=t.lastIndexOf("/");return r<=0?"/":t.slice(0,r)}function _Fe(e){let t=e.replace(/\\/g,"/").replace(/\/+$/,""),r=t.lastIndexOf("/");return r<0?t:t.slice(r+1)}function HM(e,t){let r=t.replace(/\\/g,"/").replace(/\/+$/,""),n=e.replace(/\\/g,"/").replace(/\/+$/,"");return r?n===r||n.startsWith(`${r}/`):!1}function qM(e,t,r){return{message:Ge(t.error,`${r} (HTTP ${e.status})`),status:e.status}}function NY(e){let t=Ge(e.path),r=Ge(e.name);if(!t||!r)return null;let n=e.type==="dir"?"dir":"file",a={path:t,name:r,type:n};typeof e.size=="number"&&Number.isFinite(e.size)&&(a.size=e.size),typeof e.mtime=="string"&&e.mtime&&(a.mtime=e.mtime);let o=ga(e.gitStatus)?e.gitStatus:void 0;if(o){let l={},u=Ge(o.staged),d=Ge(o.unstaged);(u==="added"||u==="modified"||u==="deleted"||u==="renamed")&&(l.staged=u),(d==="modified"||d==="deleted")&&(l.unstaged=d),o.untracked&&(l.untracked=!0),a.gitStatus=l}return a}async function DC(e,t,r,n,a){let o=await e(t,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),l=await $s(o);return!o.ok||typeof l.error=="string"?{ok:!1,failure:qM(o,l,n)}:{ok:!0,affectedPath:a}}var jFe=class{constructor(e=(t,r)=>globalThis.fetch(t,r)){ae(this,"fetchImpl",e)}async list(e,t){let r=await this.fetchImpl(`/api/directory?q=${encodeURIComponent(e)}&gitStatus=true`,{credentials:"same-origin",signal:t}),n=await $s(r);if(!r.ok||typeof n.error=="string")return{ok:!1,failure:qM(r,n,"\u8BFB\u53D6\u76EE\u5F55\u5931\u8D25")};let a=Array.isArray(n.items)?n.items:[],o=[];for(let l of a){let u=ga(l)?NY(l):null;u&&o.push(u)}return{ok:!0,entries:o,truncated:!!n.truncated,total:Na(n.total,o.length)}}async search(e,t,r,n=!1){let a=new URLSearchParams({q:e,cwd:t,depth:"5",limit:"80"});n&&a.set("includeGenerated","true");let o=await this.fetchImpl(`/api/file-search?${a.toString()}`,{credentials:"same-origin",signal:r}),l=await $s(o);if(!o.ok||typeof l.error=="string")return{ok:!1,failure:qM(o,l,"\u641C\u7D22\u5931\u8D25")};let u=Array.isArray(l.results)?l.results:[],d=[];for(let p of u){let h=ga(p)?NY(p):null;h&&d.push(h)}return{ok:!0,results:d,truncated:!!l.truncated}}createFile(e){return DC(this.fetchImpl,"/api/file-create",{path:e},"\u521B\u5EFA\u6587\u4EF6\u5931\u8D25",e)}createDir(e){return DC(this.fetchImpl,"/api/dir-create",{path:e},"\u521B\u5EFA\u6587\u4EF6\u5939\u5931\u8D25",e)}rename(e,t){return DC(this.fetchImpl,"/api/file-rename",{from:e,to:t},"\u91CD\u547D\u540D\u5931\u8D25",t)}delete(e){return DC(this.fetchImpl,"/api/file-delete",{path:e},"\u5220\u9664\u5931\u8D25",e)}},NFe=new jFe,PFe={openFile(){},notify(e,t){gn.toast(e,{tone:t})},async copyText(e){try{return await _f(e),!0}catch{return!1}},async confirmDelete(e,t){let r=await gn.dialog({title:"\u786E\u8BA4\u5220\u9664",description:`\u786E\u5B9A\u8981\u5220\u9664${t?"\u6587\u4EF6\u5939":"\u6587\u4EF6"}\u300C${e}\u300D\u5417\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002`,tone:"warning",actions:[{label:"\u53D6\u6D88",value:!1,kind:"secondary",autoFocus:!0},{label:"\u5220\u9664",value:!0,kind:"danger"}],dismissable:!0});return r.dismissed===!1&&r.action===!0},async promptForName(e,t){let r=await gn.dialog({title:e,input:{value:t,label:"\u540D\u79F0"},actions:[{label:"\u53D6\u6D88",value:"",kind:"secondary"},{label:"\u786E\u8BA4",value:"confirm",kind:"primary",autoFocus:!0}],dismissable:!0});return r.dismissed===!0||r.action!=="confirm"?null:(r.inputValue??"").trim()||null}};function RFe(e){let t=new Set,r={revision:0,root:"",activeDir:"",expanded:new Map,searchQuery:"",searchResults:null,searchFilter:"all",includeGenerated:!1,searchTruncated:!1,searchDurationMs:null,searching:!1,revealPath:null,busy:!1},n=e.runtime??PFe,a=new Map,o=null;function l(D){r={...r,...D,revision:r.revision+1};for(let $ of t)$()}function u(D){l({expanded:new Map(D)})}function d(D,$){return D?.message||$}async function p(D){a.get(D)?.abort();let $=new AbortController;a.set(D,$);let C=new Map(r.expanded);C.set(D,{entries:[],status:"loading"}),u(C);try{let B=await e.repository.list(D,$.signal);if($.signal.aborted)return;let M=new Map(r.expanded);B.ok&&B.entries?M.set(D,{entries:B.entries,status:"loaded"}):M.set(D,{entries:[],status:"error",error:d(B.failure,"\u8BFB\u53D6\u76EE\u5F55\u5931\u8D25")}),u(M)}catch(B){if($.signal.aborted||$d(B))return;let M=new Map(r.expanded);M.set(D,{entries:[],status:"error",error:ii(B,"\u8BFB\u53D6\u76EE\u5F55\u5931\u8D25").message}),u(M)}finally{a.delete(D)}}function h(D){D&&(r.root!==D&&(o?.abort(),l({root:D,activeDir:D,searchQuery:"",searchResults:null,searching:!1,searchError:"",searchDurationMs:null,searchTruncated:!1,revealPath:null})),r.expanded.has(D)||p(D))}async function v(D){if(o?.abort(),!D.trim()||!r.root){l({searchQuery:D,searchResults:null,searchDurationMs:null,searchTruncated:!1,searching:!1,searchError:""});return}let $=new AbortController;if(o=$,l({searchQuery:D,searching:!0,searchResults:null,searchTruncated:!1,searchError:"",revealPath:null}),await new Promise(B=>{let M=setTimeout(B,300);$.signal.addEventListener("abort",()=>{clearTimeout(M),B()},{once:!0})}),$.signal.aborted)return;let C=Date.now();try{let B=await e.repository.search(D.trim(),r.root,$.signal,r.includeGenerated);if($.signal.aborted)return;l({searching:!1,searchResults:B.ok&&B.results?B.results:[],searchDurationMs:B.ok?Date.now()-C:null,searchTruncated:!!(B.ok&&B.truncated),searchError:B.ok?"":d(B.failure,"\u641C\u7D22\u6587\u4EF6\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")})}catch(B){if($.signal.aborted||$d(B))return;l({searching:!1,searchResults:[],searchDurationMs:null,searchError:ii(B,"\u641C\u7D22\u6587\u4EF6\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002").message})}}function g(){o?.abort(),o=null,l({searchQuery:"",searchResults:null,searchDurationMs:null,searchTruncated:!1,searching:!1,searchError:""})}async function b(D){let $=r.root;if(!$||!HM(D,$))return!1;g();let C=[],B=Jl(D);for(;B!==$&&HM(B,$);){C.unshift(B);let N=Jl(B);if(N===B)break;B=N}for(let N of C)r.expanded.has(N)||await p(N);let M=Jl(D),I=D===$,j=I||x(M,D);return j&&!I&&!r.expanded.has(D)&&await p(D),l({activeDir:j?D:M,revealPath:D}),!0}function x(D,$){return r.expanded.get(D)?.entries.some(C=>C.path===$&&C.type==="dir")??!1}function y(D,$){let C=$.trim();return C?`${D.replace(/\/+$/,"")}/${C}`:D}function E(D){let $=new Set;for(let C of D){let B=Jl(C);B&&r.expanded.has(B)&&$.add(B),r.root&&r.expanded.has(r.root)&&$.add(r.root),r.expanded.has(C)&&$.add(C)}for(let C of $)p(C)}function F(D){E([D])}async function S(D){switch(D.type){case"setRoot":return h(D.root),!0;case"navigate":return D.dir?(n.openDirectory?.(D.dir),!0):!1;case"toggle":{let $=new Map(r.expanded);return $.get(D.dir)?($.delete(D.dir),u($),!0):(await p(D.dir),!0)}case"expand":return await p(D.dir),!0;case"refresh":{let $=D.dir??r.root;return $?(await p($),!0):!1}case"reveal":return b(D.path);case"reveal.done":return r.revealPath===null||l({revealPath:null}),!0;case"search.start":return await v(D.query),!0;case"search.filter":return r.searchFilter===D.filter||l({searchFilter:D.filter}),!0;case"search.scope":return r.includeGenerated===D.includeGenerated||(l({includeGenerated:D.includeGenerated}),await v(r.searchQuery)),!0;case"search.clear":return g(),!0;case"create.file":{let $=y(D.dir,D.name);l({busy:!0});try{let C=await e.repository.createFile($);return C.ok?(n.notify("\u5DF2\u521B\u5EFA\u6587\u4EF6","success"),F(D.dir),n.openFile($)):n.notify(d(C.failure,"\u521B\u5EFA\u6587\u4EF6\u5931\u8D25"),"error"),C.ok}finally{l({busy:!1})}}case"create.dir":{let $=y(D.dir,D.name);l({busy:!0});try{let C=await e.repository.createDir($);return C.ok?(n.notify("\u5DF2\u521B\u5EFA\u6587\u4EF6\u5939","success"),F(D.dir)):n.notify(d(C.failure,"\u521B\u5EFA\u6587\u4EF6\u5939\u5931\u8D25"),"error"),C.ok}finally{l({busy:!1})}}case"rename":{l({busy:!0});try{let $=await e.repository.rename(D.from,D.to);return $.ok?(n.notify("\u5DF2\u91CD\u547D\u540D","success"),F(Jl(D.from))):n.notify(d($.failure,"\u91CD\u547D\u540D\u5931\u8D25"),"error"),$.ok}finally{l({busy:!1})}}case"move":{l({busy:!0});try{let $=await e.repository.rename(D.from,D.to);return $.ok?(n.notify("\u5DF2\u79FB\u52A8","success"),E([D.from,D.to])):n.notify(d($.failure,"\u79FB\u52A8\u5931\u8D25"),"error"),$.ok}finally{l({busy:!1})}}case"delete":{let $=r.expanded.has(D.path)||r.activeDir===D.path,C=(r.expanded.get(Jl(D.path))?.entries??[]).find(B=>B.path===D.path)?.type==="dir"||$;if(!await n.confirmDelete(D.path,C))return!1;l({busy:!0});try{let B=await e.repository.delete(D.path);return B.ok?(n.notify("\u5DF2\u5220\u9664","success"),F(Jl(D.path))):n.notify(d(B.failure,"\u5220\u9664\u5931\u8D25"),"error"),B.ok}finally{l({busy:!1})}}}}return{controller:{setRoot(D){h(D)},execute:S},store:{subscribe(D){return t.add(D),()=>t.delete(D)},getSnapshot(){return r}},configureRuntime(D){let $=n;return n=D,()=>{n===D&&(n=$)}}}}var PY=RFe({repository:NFe}),WM=PY.controller,UM=PY.store;var VM=A(xe(),1);function GM({id:e,icon:t,label:r,onClick:n}){return(0,VM.jsxs)(_e,{kind:"ghost",id:e,type:"button",onClick:n,children:[(0,VM.jsx)(Be,{name:t,size:14,strokeWidth:1.8,className:"plus-popover-icon"}),(0,VM.jsx)("span",{className:"plus-popover-label",children:r})]})}function OFe(e,t,r){if(t.workspaceId)return{workspaceId:t.workspaceId,taskId:t.taskId};if(r)for(let n of e){let a=n.tasks.find(o=>o.sessions.some(l=>l.id===r));if(a||n.standaloneSessions.some(o=>o.id===r))return{workspaceId:n.workspaceId,taskId:a?.id??null}}return{workspaceId:null,taskId:null}}function zFe(e,t){let r=new Date(e);if(!Number.isFinite(r.getTime()))return"";let n=Math.max(0,Math.floor((t-r.getTime())/6e4));if(n<1)return"\u521A\u521A";if(n<60)return`${n}\u5206`;if(n<1440)return`${Math.floor(n/60)}\u65F6`;if(n<10080)return`${Math.floor(n/1440)}\u5929`;let a=`${r.getMonth()+1}/${r.getDate()}`;return r.getFullYear()===new Date(t).getFullYear()?a:`${r.getFullYear()}/${a}`}function KM(e){return e==="shell"?"":e===o0?"pi":e}function XM(e){return e===o0?"sdk":void 0}var Vg=A(_()),Aw=A(_());function QM(){return QM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},QM.apply(this,arguments)}var RY=Aw.forwardRef(({prefixCls:e="rc-switch",className:t,checked:r,defaultChecked:n,disabled:a,loadingIcon:o,checkedChildren:l,unCheckedChildren:u,onClick:d,onChange:p,onKeyDown:h,styles:v,classNames:g,...b},x)=>{let[y,E]=qt(n??!1,r);function F(C,B){let M=y;return a||(M=C,E(M),p?.(M,B)),M}function S(C){C.which===yn.LEFT?F(!1,C):C.which===yn.RIGHT&&F(!0,C),h?.(C)}function D(C){let B=F(!y,C);d?.(B,C)}let $=Y(e,t,{[`${e}-checked`]:y,[`${e}-disabled`]:a});return Aw.createElement("button",QM({},b,{type:"button",role:"switch","aria-checked":y,disabled:a,className:$,ref:x,onKeyDown:S,onClick:D}),o,Aw.createElement("span",{className:`${e}-inner`},Aw.createElement("span",{className:Y(`${e}-inner-checked`,g?.content),style:v?.content},l),Aw.createElement("span",{className:Y(`${e}-inner-unchecked`,g?.content),style:v?.content},u)))});RY.displayName="Switch";var LFe=RY,HFe=e=>{let{componentCls:t,trackHeightSM:r,trackPadding:n,trackMinWidthSM:a,innerMinMarginSM:o,innerMaxMarginSM:l,handleSizeSM:u,calc:d}=e,p=`${t}-inner`,h=ue(d(u).add(d(n).mul(2)).equal()),v=ue(d(l).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:a,height:r,lineHeight:ue(r),[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:o,[`${p}-checked, ${p}-unchecked`]:{minHeight:r},[`${p}-checked`]:{marginInlineStart:`calc(-100% + ${h} - ${v})`,marginInlineEnd:`calc(100% - ${h} + ${v})`},[`${p}-unchecked`]:{marginTop:d(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:u,height:u},[`${t}-loading-icon`]:{top:d(d(u).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:o,paddingInlineEnd:l,[`${p}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${p}-unchecked`]:{marginInlineStart:`calc(100% - ${h} + ${v})`,marginInlineEnd:`calc(-100% + ${h} - ${v})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${ue(d(u).add(n).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${p}`]:{[`${p}-unchecked`]:{marginInlineStart:d(e.marginXXS).div(2).equal(),marginInlineEnd:d(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${p}`]:{[`${p}-checked`]:{marginInlineStart:d(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:d(e.marginXXS).div(2).equal()}}}}}}},qFe=e=>{let{componentCls:t,handleSize:r,calc:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:n(n(r).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},WFe=e=>{let{componentCls:t,trackPadding:r,handleBg:n,handleShadow:a,handleSize:o,calc:l}=e,u=`${t}-handle`;return{[t]:{[u]:{position:"absolute",top:r,insetInlineStart:r,width:o,height:o,transition:`all ${e.switchDuration} ease-in-out`,...qo(),"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:l(o).div(2).equal(),boxShadow:a,transition:`all ${e.switchDuration} ease-in-out`,content:'""',...Kh()}},[`&${t}-checked ${u}`]:{insetInlineStart:`calc(100% - ${ue(l(o).add(r).equal())})`},[`&:not(${t}-disabled):active`]:{[`${u}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${u}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},UFe=e=>{let{componentCls:t,trackHeight:r,trackPadding:n,innerMinMargin:a,innerMaxMargin:o,handleSize:l,switchDuration:u,calc:d}=e,p=`${t}-inner`,h=ue(d(l).add(d(n).mul(2)).equal()),v=ue(d(o).mul(2).equal());return{[t]:{[p]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:a,transition:["padding-inline-start","padding-inline-end"].map(g=>`${g} ${u} ease-in-out`).join(", "),...qo(),[`${p}-checked, ${p}-unchecked`]:{display:"flex",alignItems:"center",justifyContent:"center",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,pointerEvents:"none",minHeight:r,transition:["margin-inline-start","margin-inline-end"].map(g=>`${g} ${u} ease-in-out`).join(", "),...qo()},[`${p}-checked`]:{marginInlineStart:`calc(-100% + ${h} - ${v})`,marginInlineEnd:`calc(100% - ${h} + ${v})`},[`${p}-unchecked`]:{marginTop:d(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${p}`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${p}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${p}-unchecked`]:{marginInlineStart:`calc(100% - ${h} + ${v})`,marginInlineEnd:`calc(-100% + ${h} - ${v})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${p}`]:{[`${p}-unchecked`]:{marginInlineStart:d(n).mul(2).equal(),marginInlineEnd:d(n).mul(-1).mul(2).equal()}},[`&${t}-checked ${p}`]:{[`${p}-checked`]:{marginInlineStart:d(n).mul(-1).mul(2).equal(),marginInlineEnd:d(n).mul(2).equal()}}}}}},VFe=e=>{let{componentCls:t,trackHeight:r,trackMinWidth:n}=e;return{[t]:{...Mt(e),position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:r,lineHeight:ue(r),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",...qo(),[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary},...Tn(e),[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}}}},GFe=e=>{let{fontSize:t,lineHeight:r,controlHeight:n,colorWhite:a}=e,o=t*r,l=n/2,u=2,d=o-u*2,p=l-u*2;return{trackHeight:o,trackHeightSM:l,trackMinWidth:d*2+u*4,trackMinWidthSM:p*2+u*2,trackPadding:u,handleBg:a,handleSize:d,handleSizeSM:p,handleShadow:`0 2px 4px 0 ${new Ar("#00230b").setA(.2).toRgbString()}`,innerMinMargin:d/2,innerMaxMargin:d+u+u*2,innerMinMarginSM:p/2,innerMaxMarginSM:p+u+u*2}},KFe=ct("Switch",e=>{let t=vt(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[VFe(t),UFe(t),WFe(t),qFe(t),HFe(t)]},GFe),XFe=Vg.forwardRef((e,t)=>{let{prefixCls:r,size:n,disabled:a,loading:o,className:l,rootClassName:u,style:d,checked:p,value:h,defaultChecked:v,defaultValue:g,onChange:b,styles:x,classNames:y,...E}=e,[F,S]=qt(v??g??!1,p??h),{getPrefixCls:D,direction:$,className:C,style:B,classNames:M,styles:I}=wt("switch"),j=Vg.useContext(Ia),N=(a??j)||o,R=D("switch",r),[L,q]=KFe(R),W=qr(n),U={...e,size:W,disabled:N},P=Ue(B),H=Ue(d),[V,Q]=Et([M,y],[I,P,x,H],{props:U}),X=Vg.createElement("div",{className:Y(`${R}-handle`,V.indicator),style:Q.indicator},o&&Vg.createElement(Xp,{className:`${R}-loading-icon`})),Z=Y(C,{[`${R}-small`]:W==="small",[`${R}-loading`]:o,[`${R}-rtl`]:$==="rtl"},l,u,V.root,L,q);return Vg.createElement(od,{component:"Switch",disabled:N},Vg.createElement(LFe,{...E,classNames:V,styles:Q,checked:F,onChange:(...O)=>{S(O[0]),b?.(...O)},prefixCls:R,className:Z,style:Q.root,disabled:N,ref:t,loadingIcon:X}))}),OY=XFe;OY.__ANT_SWITCH=!0;var YM=OY;var sp=A(_()),no=A(_()),lp=A(_()),zY=(e,t)=>{if(!e)return null;let r={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return t?{left:0,right:0,width:0,top:r.top,bottom:r.bottom,height:r.height}:{left:r.left,right:r.right,width:r.width,top:0,bottom:0,height:0}},Gg=e=>e!==void 0?`${e}px`:void 0;function QFe(e){let{prefixCls:t,containerRef:r,value:n,getValueIndex:a,motionName:o,onMotionStart:l,onMotionEnd:u,direction:d,vertical:p=!1}=e,h=lp.useRef(null),[v,g]=lp.useState(n),b=M=>{let I=a(M),j=r.current?.querySelectorAll(`.${t}-item`)[I];return j?.offsetParent&&j},[x,y]=lp.useState(null),[E,F]=lp.useState(null);sr(()=>{if(v!==n){let M=b(v),I=b(n),j=zY(M,p),N=zY(I,p);g(n),y(j),F(N),M&&I?l():u()}},[n]);let S=lp.useMemo(()=>Gg(p?x?.top??0:d==="rtl"?-x?.right:x?.left),[p,d,x]),D=lp.useMemo(()=>Gg(p?E?.top??0:d==="rtl"?-E?.right:E?.left),[p,d,E]),$=()=>p?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"},C=()=>p?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"},B=()=>{y(null),F(null),u()};return!x||!E?null:lp.createElement(ra,{visible:!0,motionName:o,motionAppear:!0,onAppearStart:$,onAppearActive:C,onVisibleChanged:B},({className:M,style:I},j)=>{let N={...I,"--thumb-start-left":S,"--thumb-start-width":Gg(x?.width),"--thumb-active-left":D,"--thumb-active-width":Gg(E?.width),"--thumb-start-top":S,"--thumb-start-height":Gg(x?.height),"--thumb-active-top":D,"--thumb-active-height":Gg(E?.height)},R={ref:pn(h,j),style:N,className:Y(`${t}-thumb`,M)};return lp.createElement("div",R)})}function AC(){return AC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},AC.apply(this,arguments)}function YFe(e){if(typeof e.title<"u")return e.title;if(typeof e.label!="object")return e.label?.toString()}function JFe(e){return e.map(t=>{if(typeof t=="object"&&t!==null){let r=YFe(t);return{...t,value:t.value,title:r}}return{label:t?.toString(),title:t?.toString(),value:t}})}var ZFe=({prefixCls:e,className:t,style:r,styles:n,classNames:a,data:o,disabled:l,checked:u,label:d,title:p,value:h,name:v,onChange:g,onFocus:b,onBlur:x,onKeyDown:y,onKeyUp:E,onMouseDown:F,itemRender:S=D=>D})=>{let D=C=>{l||g(C,h)},$=no.createElement("label",{className:Y(t,{[`${e}-item-disabled`]:l}),style:r,onMouseDown:F},no.createElement("input",{name:v,className:`${e}-item-input`,type:"radio",disabled:l,checked:u,onChange:D,onFocus:b,onBlur:x,onKeyDown:y,onKeyUp:E}),no.createElement("div",{className:Y(`${e}-item-label`,a?.label),title:p,style:n?.label},d));return S($,{item:o})},e7e=no.forwardRef((e,t)=>{let{prefixCls:r="rc-segmented",direction:n,vertical:a,options:o=[],disabled:l,defaultValue:u,value:d,name:p,onChange:h,className:v="",style:g,styles:b,classNames:x,motionName:y="thumb-motion",itemRender:E,...F}=e,S=no.useRef(null),D=no.useMemo(()=>pn(S,t),[S,t]),$=no.useMemo(()=>JFe(o),[o]),[C,B]=qt(u??$[0]?.value,d),[M,I]=no.useState(!1),j=(O,z)=>{B(z),h?.(z)},N=Vt(F,["children"]),[R,L]=no.useState(!1),[q,W]=no.useState(!1),U=()=>{W(!0)},P=()=>{W(!1)},H=()=>{L(!1)},V=O=>{O.key==="Tab"&&L(!0)},Q=O=>{let z=$.filter(ie=>ie.value===C||!ie.disabled),K=z.findIndex(ie=>ie.value===C),J=z.length,te=(K+O+J)%J,ee=z[te];ee&&ee.value!==C&&(B(ee.value),h?.(ee.value))},X=O=>{switch(O.key){case"ArrowLeft":case"ArrowUp":Q(-1);break;case"ArrowRight":case"ArrowDown":Q(1);break}},Z=O=>{let{value:z,disabled:K}=O;return no.createElement(ZFe,AC({},O,{name:p,data:O,itemRender:E,key:z,prefixCls:r,className:Y(O.className,`${r}-item`,x?.item,{[`${r}-item-selected`]:z===C&&!M,[`${r}-item-selected-text`]:z===C,[`${r}-item-focused`]:q&&R&&z===C}),style:b?.item,classNames:x,styles:b,checked:z===C,onChange:j,onFocus:U,onBlur:P,onKeyDown:X,onKeyUp:V,onMouseDown:H,disabled:!!l||!!K}))};return no.createElement("div",AC({role:"radiogroup","aria-label":"segmented control",tabIndex:l?void 0:0,"aria-orientation":a?"vertical":"horizontal",style:g},N,{className:Y(r,{[`${r}-rtl`]:n==="rtl",[`${r}-disabled`]:l,[`${r}-vertical`]:a},v),ref:D}),no.createElement("div",{className:`${r}-group`},no.createElement(QFe,{vertical:a,prefixCls:r,value:C,containerRef:S,motionName:`${r}-${y}`,direction:n,getValueIndex:O=>$.findIndex(z=>z.value===O),onMotionStart:()=>{I(!0)},onMotionEnd:()=>{I(!1)}}),$.map(Z)))}),t7e=e7e,r7e=t7e;function LY(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}var HY=e=>({background:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}),n7e={overflow:"hidden",...fl},a7e=e=>{let{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,motionDurationMid:a}=e,o=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),l=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),u=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:{...Mt(e),display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${a}`,...Tn(e),[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${ue(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${a}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":{...HY(e),color:e.itemSelectedColor},"&-selected-text":{color:e.itemSelectedColor,transition:`color ${a}`},"&-focused":gi(e),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,pointerEvents:"none",transition:["opacity","background-color"].map(d=>`${d} ${a}`).join(", ")},[`&:not(${t}-item-selected):not(${t}-item-selected-text):not(${t}-item-disabled)`]:{"&:hover, &:active":{color:e.itemHoverColor},"&:hover::after":{opacity:1,backgroundColor:e.itemHoverBg},"&:active::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":{minHeight:o,lineHeight:ue(o),padding:`0 ${ue(e.segmentedPaddingHorizontal)}`,...n7e},"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-icon > svg":{display:"inline-block",verticalAlign:"middle",marginBlockEnd:"0.2em"},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:{...HY(e),position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${ue(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}},[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:l,lineHeight:ue(l),padding:`0 ${ue(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:u,lineHeight:ue(u),padding:`0 ${ue(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}},...LY(`&-disabled ${t}-item`,e),...LY(`${t}-item-disabled`,e),[`${t}-thumb-motion-appear-active`]:{willChange:"transform, width",transition:["transform","width"].map(d=>`${d} ${r} ${n}`).join(", ")},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}}}},i7e=e=>{let{colorTextLabel:t,colorText:r,colorFillSecondary:n,colorBgElevated:a,colorFill:o,lineWidthBold:l,colorBgLayout:u}=e;return{trackPadding:l,trackBg:u,itemColor:t,itemHoverColor:r,itemHoverBg:n,itemSelectedBg:a,itemActiveBg:o,itemSelectedColor:r}},o7e=ct("Segmented",e=>{let{lineWidth:t,calc:r}=e,n=vt(e,{segmentedPaddingHorizontal:r(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:r(e.controlPaddingHorizontalSM).sub(t).equal()});return a7e(n)},i7e);function s7e(e){return Ct(e)&&!!e?.icon}var l7e=sp.forwardRef((e,t)=>{let r=pl(),{prefixCls:n,className:a,rootClassName:o,block:l,options:u=[],size:d,style:p,vertical:h,orientation:v,shape:g="default",name:b=r,styles:x,classNames:y,...E}=e,{getPrefixCls:F,direction:S,className:D,style:$,classNames:C,styles:B}=wt("segmented"),M={...e,options:u,size:d,shape:g},I=Ue($),j=Ue(p),[N,R]=Et([C,y],[B,I,x,j],{props:M}),L=F("segmented",n),[q,W]=o7e(L),U=qr(d),P=sp.useMemo(()=>u.map(X=>{if(s7e(X)){let{icon:Z,label:O,...z}=X;return{...z,label:sp.createElement(sp.Fragment,null,sp.createElement("span",{className:Y(`${L}-item-icon`,N.icon),style:R.icon},Z),Lt(O)&&sp.createElement("span",null,O))}}return X}),[u,L,N.icon,R.icon]),[,H]=Wo(v,h),V=Y(a,o,D,N.root,{[`${L}-block`]:l,[`${L}-sm`]:U==="small",[`${L}-lg`]:U==="large",[`${L}-vertical`]:H,[`${L}-shape-${g}`]:g==="round"},q,W),Q=(X,{item:Z})=>{if(!Z.tooltip)return X;let O=Ct(Z.tooltip)?Z.tooltip:{title:Z.tooltip};return sp.createElement(Ma,{...O},X)};return sp.createElement(r7e,{...E,name:b,className:V,style:R.root,classNames:N,styles:R,itemRender:Q,options:P,ref:t,prefixCls:L,direction:S,vertical:H})}),u7e=l7e,UY=u7e,$m=A(_(),1);function c7e(e,t,r){if(!e||r)return[t];let n=Math.min(e.left,t.left),a=Math.max(e.left+e.width,t.left+t.width),o={left:n,width:a-n};return o.left===t.left&&o.width===t.width?[t]:[o,t]}var Bw=A(xe(),1);function qY(e,t){let r=e.querySelector(`[data-stretch-value="${CSS.escape(t)}"]`)?.closest(".ant-segmented-item");return r?{left:r.offsetLeft,width:r.offsetWidth}:null}function WY(e,t){return Math.abs(e.left-t.left)<1&&Math.abs(e.width-t.width)<1}function JM({tabs:e,value:t,ariaLabel:r,className:n,onValueChange:a}){let o=$m.useRef(null),l=$m.useRef(null),u=$m.useRef(null),d=$m.useRef(null),p=Za(),[h,v]=$m.useState(null),g=e.map(b=>b.value).join("\0");return $m.useLayoutEffect(()=>{let b=o.current;if(!b)return;let x=qY(b,t);if(!x){l.current=null,d.current=null,v(null);return}let y=u.current,E=y&&l.current?{left:y.offsetLeft,width:y.offsetWidth}:l.current,F=c7e(E,x,p);l.current=x,d.current=F[1]??null,v(F[0]??x),y&&F[1]&&WY({left:y.offsetLeft,width:y.offsetWidth},F[0])&&(d.current=null,v(x))},[p,g,t]),$m.useEffect(()=>{let b=o.current;if(!b||typeof ResizeObserver>"u")return;let x=new ResizeObserver(()=>{if(d.current)return;let y=qY(b,t);y&&(l.current=y,v(y))});return x.observe(b),()=>x.disconnect()},[g,t]),(0,Bw.jsx)(Bt,{children:(0,Bw.jsxs)("div",{ref:o,className:et("wand-ui-stretch-tabs",n),onKeyDown:b=>{if(b.key!=="Home"&&b.key!=="End")return;b.preventDefault();let x=e[b.key==="Home"?0:e.length-1];x&&(a(x.value),o.current?.querySelector(`[data-stretch-value="${CSS.escape(x.value)}"]`)?.closest(".ant-segmented-item")?.querySelector("input")?.focus({preventScroll:!0}))},children:[h?(0,Bw.jsx)("span",{ref:u,className:"wand-ui-stretch-indicator",onTransitionEnd:b=>{if(b.target!==b.currentTarget||!h||p||b.propertyName!=="left"&&b.propertyName!=="width")return;let x=b.currentTarget;if(!WY({left:x.offsetLeft,width:x.offsetWidth},h))return;let y=d.current;y&&(d.current=null,v(y))},style:{left:h.left,width:h.width},"aria-hidden":"true"}):null,(0,Bw.jsx)(UY,{value:t,onChange:a,"aria-label":r,options:e.map(b=>({value:b.value,label:(0,Bw.jsx)("span",{"data-stretch-value":b.value,children:b.label})}))})]})})}var Fi=A(_(),1),fs=A(xe(),1);function Iw({value:e,defaultValue:t,options:r,placeholder:n="\u8BF7\u9009\u62E9",displayValue:a,startSlot:o,displayTitle:l,ariaLabel:u,id:d,"aria-describedby":p,"aria-invalid":h,triggerRef:v,disabled:g,triggerKind:b,searchable:x,searchPlaceholder:y="\u641C\u7D22",className:E,contentClassName:F,itemClassName:S,side:D="bottom",align:$="start",sideOffset:C=6,collisionPadding:B=12,popupOwner:M=u,onValueChange:I,onOpenChange:j}){let N=Kn(),R=f0();Fi.useEffect(()=>l0(M,R),[M,R]);let L=Fi.useId(),[q,W]=Fi.useState(t),U=e===void 0?q:e,[P,H]=Fi.useState(!1),V=Fi.useRef(!1),[Q,X]=Fi.useState(""),Z=Pb(),O=Fi.useRef(null),z=Fi.useRef(null),K=Fi.useRef(null),J=Fi.useCallback(de=>{if(!de||K.current===de)return;let be=requestAnimationFrame(()=>{!V.current||!de.isConnected||(K.current=de,de.focus({preventScroll:!0}))});return()=>cancelAnimationFrame(be)},[]),te=a??r.find(de=>de.value===U)?.label??n,ee=de=>{V.current=de,H(de),de||(X(""),Z.reset(),K.current=null),j?.(de)},ie=BC(r,Q),me=[];ie.forEach((de,be)=>{de.group!==ie[be-1]?.group&&(de.group||ie[be-1]?.group)&&me.push({type:"group",key:`group:${be}`,label:de.group||"\u5176\u4ED6\u6A21\u578B",children:[]});let ye={key:de.value,label:de.label,title:de.label,disabled:de.disabled,role:"option","aria-selected":de.value===U,className:et("wand-ui-select-item",S)};me.push(ye)}),$n(P,()=>{ee(!1),O.current?.focus({preventScroll:!0})}),Fi.useEffect(()=>{g&&P&&ee(!1)},[g,P]);let[le,he]=Fi.useState(null),se=Fi.useRef(null),ke=Fi.useCallback(()=>le?Promise.resolve():(se.current||(se.current=globalThis.__wandImportBrowserModule("a16a3779a5201ce1").then(de=>{he(()=>de.DropdownSurface)})),se.current),[le]);Fi.useEffect(()=>{P&&ke()},[P,ke]);let De=(0,fs.jsxs)(_e,{ref:de=>{if(O.current=de,typeof v=="function")return v(de);v&&(v.current=de)},kind:b,id:d,"aria-describedby":p,"aria-invalid":h,disabled:g,className:et("wand-ui-select-trigger",E),"data-popup-open":P?"":void 0,"data-placeholder":U===void 0&&!a?"":void 0,"aria-controls":P?L:void 0,role:"combobox","aria-haspopup":"listbox","aria-expanded":P,"aria-label":u,title:l??te,children:[o,(0,fs.jsx)("span",{className:"wand-ui-select-value",children:te}),(0,fs.jsx)(Be,{name:"chevronDown",size:14})]}),we=(0,fs.jsxs)(_e,{ref:de=>{if(O.current=de,typeof v=="function")return v(de);v&&(v.current=de)},kind:b,id:d,"aria-describedby":p,"aria-invalid":h,disabled:g,className:et("wand-ui-select-trigger",E),"data-popup-open":P?"":void 0,"data-placeholder":U===void 0&&!a?"":void 0,"aria-controls":P?L:void 0,role:"combobox","aria-haspopup":"listbox","aria-expanded":P,"aria-label":u,title:l??te,onClick:()=>{g||ee(!0)},children:[o,(0,fs.jsx)("span",{className:"wand-ui-select-value",children:te}),(0,fs.jsx)(Be,{name:"chevronDown",size:14})]});return(0,fs.jsx)(Bt,{children:le?(0,fs.jsx)(le,{trigger:De,open:P,triggers:["click"],disabled:g,onOpenChange:(de,be)=>{be.source==="trigger"&&ee(de)},getPopupContainer:()=>N??document.body,placement:ud(D,$),destroyOnHidden:!0,align:{offset:cd(D,C),overflow:{adjustX:!0,adjustY:!0,shiftX:B,shiftY:B}},classNames:{root:et("wand-ui-select-content",x&&"wand-ui-select-searchable",F)},menu:{id:L,items:me,role:"listbox",selectable:!0,selectedKeys:U===void 0?[]:[U],onClick:({key:de})=>{W(de),I?.(de),ee(!1),O.current?.focus({preventScroll:!0})}},popupRender:de=>(0,fs.jsxs)("div",{ref:z,"data-wand-popup-owner":M,children:[x&&(0,fs.jsx)(Lu,{ref:J,type:"search","aria-label":y,placeholder:y,value:Q,onChange:be=>X(be.currentTarget.value),onCompositionStart:Z.onCompositionStart,onCompositionEnd:Z.onCompositionEnd,startSlot:(0,fs.jsx)(Be,{name:"search",size:14}),onKeyDown:be=>{if(!Z.shouldIgnore(be)&&(be.key==="ArrowDown"||be.key==="ArrowUp")){be.preventDefault();let ye=z.current?.querySelectorAll('[role="option"]:not([aria-disabled="true"])');(be.key==="ArrowUp"?ye?.[ye.length-1]:ye?.[0])?.focus()}}}),ie.length?de:(0,fs.jsx)("div",{role:"status",children:"\u6CA1\u6709\u5339\u914D\u7684\u9009\u9879"})]})}):we})}function BC(e,t){return t.trim()?e.filter(r=>d7e(p7e(r),t)):e.slice()}function d7e(e,t){return t.trim().toLowerCase().split(/\s+/).filter(Boolean).every(r=>e.toLowerCase().includes(r))}function p7e(e){return`${e.value} ${e.label} ${e.group??""}`}var yc=A(_());function VY(e){return t=>yc.createElement(ad,{theme:{token:{motion:!1,zIndexPopupBase:0}}},yc.createElement(e,{...t}))}var f7e=(e,t,r,n,a)=>VY(o=>{let{prefixCls:l,style:u}=o,d=yc.useRef(null),[p,h]=yc.useState(0),[v,g]=yc.useState(0),[b,x]=qt(!1,o.open),{getPrefixCls:y}=yc.useContext(st),E=y(n||"select",l);yc.useEffect(()=>{if(x(!0),typeof ResizeObserver<"u"){let S=new ResizeObserver($=>{let C=$[0].target;h(C.offsetHeight+8),g(C.offsetWidth)}),D=setInterval(()=>{let $=a?`.${a(E)}`:`.${E}-dropdown`,C=d.current?.querySelector($);C&&(clearInterval(D),S.observe(C))},10);return()=>{clearInterval(D),S.disconnect()}}},[E]);let F={...o,style:{...u,margin:0},open:b,getPopupContainer:()=>d.current};return r&&(F=r(F)),t&&(F={...F,[t]:{overflow:{adjustX:!1,adjustY:!1}}}),yc.createElement("div",{ref:d,style:{paddingBottom:p,position:"relative",minWidth:v}},yc.createElement(e,{...F}))}),ZM=f7e;var wa=A(_()),m7e=e=>{let{componentCls:t,menuCls:r,colorError:n,colorTextLightSolid:a}=e,o=`${r}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${r} ${o}`]:{[`&${o}-danger:not(${o}-disabled)`]:{color:n,"&:hover":{color:a,backgroundColor:n}}}}}},h7e=m7e,g7e=e=>{let{componentCls:t,menuCls:r,zIndexPopup:n,dropdownArrowDistance:a,sizePopupArrow:o,antCls:l,iconCls:u,motionDurationMid:d,paddingBlock:p,fontSize:h,dropdownEdgeChildPadding:v,colorTextDisabled:g,fontSizeIcon:b,controlPaddingHorizontal:x,colorBgElevated:y,controlHeightLG:E}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:n,display:"block","&::before":{position:"absolute",insetBlock:e.calc(o).div(2).sub(a).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:`calc(100vh - ${ue(e.calc(E).mul(2.5).equal())})`,overflowY:"auto"},[`&-trigger${l}-btn`]:{[`& > ${u}-down, & > ${l}-btn-icon > ${u}-down`]:{fontSize:b}},[`${t}-wrap`]:{position:"relative",[`${l}-btn > ${u}-down`]:{fontSize:b},[`${u}-down::before`]:{transition:`transform ${d}`}},[`${t}-wrap-open`]:{[`${u}-down::before`]:{transform:"rotate(180deg)"}},"&-hidden, &-menu-hidden, &-menu-submenu-hidden":{display:"none"},[`&${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomLeft,
298
+ &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomLeft,
299
+ &${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottom,
300
+ &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottom,
301
+ &${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomRight,
302
+ &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:Wh},[`&${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topLeft,
303
+ &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topLeft,
304
+ &${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-top,
305
+ &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-top,
306
+ &${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topRight,
307
+ &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Vh},[`&${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomLeft,
308
+ &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottom,
309
+ &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Uh},[`&${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topLeft,
310
+ &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-top,
311
+ &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Gh},[`&${l}-slide-right-enter${l}-slide-right-enter-active${t}-placement-right,
312
+ &${l}-slide-right-appear${l}-slide-right-appear-active${t}-placement-right,
313
+ &${l}-slide-right-enter${l}-slide-right-enter-active${t}-placement-rightTop,
314
+ &${l}-slide-right-appear${l}-slide-right-appear-active${t}-placement-rightTop,
315
+ &${l}-slide-right-enter${l}-slide-right-enter-active${t}-placement-rightBottom,
316
+ &${l}-slide-right-appear${l}-slide-right-appear-active${t}-placement-rightBottom`]:{animationName:Zx},[`&${l}-slide-left-enter${l}-slide-left-enter-active${t}-placement-left,
317
+ &${l}-slide-left-appear${l}-slide-left-appear-active${t}-placement-left,
318
+ &${l}-slide-left-enter${l}-slide-left-enter-active${t}-placement-leftTop,
319
+ &${l}-slide-left-appear${l}-slide-left-appear-active${t}-placement-leftTop,
320
+ &${l}-slide-left-enter${l}-slide-left-enter-active${t}-placement-leftBottom,
321
+ &${l}-slide-left-appear${l}-slide-left-appear-active${t}-placement-leftBottom`]:{animationName:t2},[`&${l}-slide-right-leave${l}-slide-right-leave-active${t}-placement-right,
322
+ &${l}-slide-right-leave${l}-slide-right-leave-active${t}-placement-rightTop,
323
+ &${l}-slide-right-leave${l}-slide-right-leave-active${t}-placement-rightBottom`]:{animationName:e2},[`&${l}-slide-left-leave${l}-slide-left-leave-active${t}-placement-left,
324
+ &${l}-slide-left-leave${l}-slide-left-leave-active${t}-placement-leftTop,
325
+ &${l}-slide-left-leave${l}-slide-left-leave-active${t}-placement-leftBottom`]:{animationName:r2}}},a0(e,y),{[`${t} ${r}`]:{position:"relative",margin:0},[`${r}-submenu-popup`]:{position:"absolute",zIndex:n,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:{...Mt(e),[r]:{padding:v,listStyleType:"none",backgroundColor:y,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,...Tn(e),"&:empty":{padding:0,boxShadow:"none"},[`${r}-item-group-title`]:{padding:`${ue(p)} ${ue(x)}`,color:e.colorTextDescription,transition:`all ${d}`},[`${r}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${r}-item-icon`]:{minWidth:h,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${r}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> a, > ${r}-item-label > a`]:{color:"inherit",transition:`all ${d}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${r}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${r}-item, ${r}-submenu-title`]:{display:"flex",margin:0,padding:`${ue(p)} ${ue(x)}`,color:e.colorText,fontWeight:"normal",fontSize:h,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${d}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Tn(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:g,cursor:"not-allowed","&:hover":{color:g,backgroundColor:y,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${ue(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:b,fontStyle:"normal"}}},[`${r}-item-group-list`]:{margin:`0 ${ue(e.marginXS)}`,padding:0,listStyle:"none"},[`${r}-submenu-title`]:{paddingInlineEnd:e.calc(x).add(e.fontSizeSM).equal()},[`${r}-submenu-vertical`]:{position:"relative"},[`${r}-submenu${r}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:g,backgroundColor:y,cursor:"not-allowed"}},[`${r}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[Ho(e,"slide-up"),Ho(e,"slide-down"),Ho(e,"slide-left"),Ho(e,"slide-right"),n2(e,"move-up"),n2(e,"move-down"),Fu(e,"zoom-big")]]},v7e=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...Zp({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...n0(e)}),b7e=ct("Dropdown",e=>{let{marginXXS:t,sizePopupArrow:r,paddingXXS:n,componentCls:a}=e,o=vt(e,{menuCls:`${a}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[g7e(o),h7e(o)]},v7e,{resetStyle:!1}),eT=wa.forwardRef((e,t)=>{let{menu:r,arrow:n,prefixCls:a,children:o,trigger:l,disabled:u,dropdownRender:d,popupRender:p,getPopupContainer:h,overlayClassName:v,rootClassName:g,overlayStyle:b,open:x,onOpenChange:y,mouseEnterDelay:E=.15,mouseLeaveDelay:F=.1,autoAdjustOverflow:S=!0,placement:D="",transitionName:$,classNames:C,styles:B,destroyPopupOnHide:M,destroyOnHidden:I}=e,{getPrefixCls:j,direction:N,getPopupContainer:R,className:L,style:q,classNames:W,styles:U}=wt("dropdown"),P={...e,mouseEnterDelay:E,mouseLeaveDelay:F,autoAdjustOverflow:S},H=Ue(q),V=Ue(b),[Q,X]=Et([W,C],[U,H,B,V],{props:P}),Z={...X.root},O=p||d,z=Dh("Dropdown"),K=wa.useMemo(()=>{let Te=j();return $!==void 0?$:D.startsWith("top")?`${Te}-slide-down`:D.startsWith("left")?`${Te}-slide-right`:D.startsWith("right")?`${Te}-slide-left`:`${Te}-slide-up`},[j,D,$]),J=wa.useMemo(()=>D?D.includes("Center")?D.slice(0,D.indexOf("Center")):D:N==="rtl"?"bottomRight":"bottomLeft",[D,N]),te=j("dropdown",a),ee=xn(te),[ie,me]=b7e(te,ee),[,le]=Aa(),he=wa.Children.only(fF(o)?wa.createElement("span",null,o):o),se=Qa(t,Pi(he)),ke=Fr(he,{className:Y(`${te}-trigger`,{[`${te}-rtl`]:N==="rtl"},he.props.className),disabled:he.props.disabled??u,ref:se}),De=u?[]:l,we=!!De?.includes("contextMenu"),[de,be]=qt(!1,x),ye=xt(Te=>{y?.(Te,{source:"trigger"}),be(Te)}),Re=Y(v,g,ie,me,ee,L,Q.root,{[`${te}-rtl`]:N==="rtl"}),Fe=f2({arrowPointAtCenter:Ct(n)&&n.pointAtCenter,autoAdjustOverflow:S,offset:le.marginXXS,arrowWidth:n?le.sizePopupArrow:0,borderRadius:le.borderRadius}),$e=xt(()=>{r?.selectable&&r?.multiple||(y?.(!1,{source:"menu"}),be(!1))}),Ie=()=>{let Te=Vt(Q,["root"]),Xe=Vt(X,["root"]),ot;return r?.items&&(ot=wa.createElement(S9,{...r,classNames:{...Te,subMenu:{...Te}},styles:{...Xe,subMenu:{...Xe}}})),O&&(ot=O(ot)),Ja(ot)?ot=wa.createElement("span",null,ot):wa.isValidElement(ot)||(ot=wa.createElement(wa.Fragment,null,ot)),wa.createElement(C9,{prefixCls:`${te}-menu`,rootClassName:Y(me,ee),expandIcon:wa.createElement("span",{className:`${te}-menu-submenu-arrow`},N==="rtl"?wa.createElement(yd,{className:`${te}-menu-submenu-arrow-icon`}):wa.createElement(Du,{className:`${te}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:$e,validator:({mode:Ye})=>{}},ot)},[He,Oe]=Jp("Dropdown",Z.zIndex),Me=wa.createElement(oy,{alignPoint:we,...Vt(e,["rootClassName","onOpenChange"]),mouseEnterDelay:E,mouseLeaveDelay:F,visible:de,builtinPlacements:Fe,arrow:!!n,overlayClassName:Re,prefixCls:te,getPopupContainer:h||R,transitionName:K,trigger:De,overlay:Ie,placement:J,onVisibleChange:ye,overlayStyle:{...Z,zIndex:He},autoDestroy:I??M},ke);return He&&(Me=wa.createElement(Zh.Provider,{value:Oe},Me)),Me}),y7e=ZM(eT,"align",void 0,"dropdown",e=>e),w7e=e=>wa.createElement(y7e,{...e},wa.createElement("span",null));eT._InternalPanelDoNotUseOrYouWillBeFired=w7e;var tT=eT;var GY=A(_(),1),KY=A(xe(),1);function Mw(){let[e,t]=GY.useState(null);return GY.useEffect(()=>{if(e)return;let r=!0,n=!1,a=()=>{n||(n=!0,globalThis.__wandImportBrowserModule("e4f0f5105c74ead9").then(l=>{n=!1,r&&t(()=>l.WandToastRegion)},()=>{n=!1}))},o=DD(()=>{a()});return AD().length>0&&a(),()=>{r=!1,o()}},[e]),(0,KY.jsx)(Bt,{children:e?(0,KY.jsx)(e,{}):null})}var wc=A(_()),rT=A(_()),XY=A(_()),x7e=e=>{let{prefixCls:t,className:r,style:n,size:a,shape:o}=e,l=Y({[`${t}-lg`]:a==="large",[`${t}-sm`]:a==="small"}),u=Y({[`${t}-circle`]:o==="circle",[`${t}-square`]:o==="square",[`${t}-round`]:o==="round"}),d=XY.useMemo(()=>Gn(a)?{width:a,height:a,lineHeight:`${a}px`}:{},[a]);return XY.createElement("span",{className:Y(t,l,u,r),style:{...d,...n}})},IC=x7e,E7e=new Dt("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),cT=e=>({height:e,lineHeight:ue(e)}),up=e=>({width:e,...cT(e)}),k7e=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:E7e,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),nT=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...cT(e)}),C7e=e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:n,controlHeightLG:a,controlHeightSM:o}=e;return{[t]:{display:"inline-block",verticalAlign:"top",background:r,...up(n)},[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:{...up(a)},[`${t}${t}-sm`]:{...up(o)}}},S7e=e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:n,controlHeightLG:a,controlHeightSM:o,gradientFromColor:l,calc:u}=e;return{[n]:{display:"inline-block",verticalAlign:"top",background:l,borderRadius:r,...nT(t,u)},[`${n}-lg`]:{...nT(a,u)},[`${n}-sm`]:{...nT(o,u)}}},YY=e=>{let{gradientFromColor:t,borderRadiusSM:r,imageSizeBase:n,calc:a}=e;return{display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:t,borderRadius:r,...up(a(n).mul(2).equal())}},F7e=e=>({[e.skeletonNodeCls]:{...YY(e)}}),$7e=e=>{let{skeletonImageCls:t,imageSizeBase:r,calc:n}=e;return{[t]:{...YY(e),[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:{...up(r),maxWidth:n(r).mul(4).equal(),maxHeight:n(r).mul(4).equal()},[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}},[`${t}${t}-circle`]:{borderRadius:"50%"}}},aT=(e,t,r)=>{let{skeletonButtonCls:n}=e;return{[`${r}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${n}-round`]:{borderRadius:t}}},iT=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...cT(e)}),D7e=e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:n,controlHeightLG:a,controlHeightSM:o,gradientFromColor:l,calc:u}=e;return{[r]:{display:"inline-block",verticalAlign:"top",background:l,borderRadius:t,width:u(n).mul(2).equal(),minWidth:u(n).mul(2).equal(),...iT(n,u)},...aT(e,n,r),[`${r}-lg`]:{...iT(a,u)},...aT(e,a,`${r}-lg`),[`${r}-sm`]:{...iT(o,u)},...aT(e,o,`${r}-sm`)}},A7e=e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:n,skeletonParagraphCls:a,skeletonButtonCls:o,skeletonInputCls:l,skeletonNodeCls:u,skeletonImageCls:d,controlHeight:p,controlHeightLG:h,controlHeightSM:v,gradientFromColor:g,padding:b,marginSM:x,borderRadius:y,titleHeight:E,blockRadius:F,paragraphLiHeight:S,controlHeightXS:D,paragraphMarginTop:$}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:b,verticalAlign:"top",[r]:{display:"inline-block",verticalAlign:"top",background:g,...up(p)},[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:{...up(h)},[`${r}-sm`]:{...up(v)}},[`${t}-section`]:{display:"table-cell",width:"100%",verticalAlign:"top",[n]:{width:"100%",height:E,background:g,borderRadius:F,[`+ ${a}`]:{marginBlockStart:v}},[a]:{padding:0,"> li":{width:"100%",height:S,listStyle:"none",background:g,borderRadius:F,"+ li":{marginBlockStart:D}}},[`${a}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-section`]:{[`${n}, ${a} > li`]:{borderRadius:y}}},[`${t}-with-avatar ${t}-section`]:{[n]:{marginBlockStart:x,[`+ ${a}`]:{marginBlockStart:$}}},[`${t}${t}-element`]:{display:"inline-block",width:"auto",...D7e(e),...C7e(e),...S7e(e),...F7e(e),...$7e(e)},[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[l]:{width:"100%"}},[`${t}${t}-active`]:{[`
326
+ ${n},
327
+ ${a} > li,
328
+ ${r},
329
+ ${o},
330
+ ${l},
331
+ ${u},
332
+ ${d}
333
+ `]:{...k7e(e)}}}},B7e=e=>{let{colorFillContent:t,colorFill:r}=e,n=t,a=r;return{color:n,colorGradientEnd:a,gradientFromColor:n,gradientToColor:a,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},_w=ct("Skeleton",e=>{let{componentCls:t,calc:r}=e,n=vt(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonNodeCls:`${t}-node`,skeletonImageCls:`${t}-image`,imageSizeBase:r(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return A7e(n)},B7e,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),I7e=e=>{let{prefixCls:t,className:r,classNames:n,rootClassName:a,active:o,style:l,styles:u,shape:d="circle",size:p,...h}=e,{getPrefixCls:v}=rT.useContext(st),g=v("skeleton",t),[b,x]=_w(g),y=qr(F=>p??F),E=Y(g,`${g}-element`,{[`${g}-active`]:o},n?.root,r,a,b,x);return rT.createElement("div",{className:E,style:u?.root},rT.createElement(IC,{prefixCls:`${g}-avatar`,className:n?.content,style:{...u?.content,...l},shape:d,size:y,...h}))},M7e=I7e,oT=A(_()),T7e=e=>{let{prefixCls:t,className:r,rootClassName:n,classNames:a,active:o,style:l,styles:u,block:d=!1,size:p,...h}=e,{getPrefixCls:v}=oT.useContext(st),g=v("skeleton",t),[b,x]=_w(g),y=qr(F=>p??F),E=Y(g,`${g}-element`,{[`${g}-active`]:o,[`${g}-block`]:d},a?.root,r,n,b,x);return oT.createElement("div",{className:E,style:u?.root},oT.createElement(IC,{prefixCls:`${g}-button`,className:a?.content,style:{...u?.content,...l},size:y,...h}))},_7e=T7e,Tw=A(_()),sT=A(_()),j7e=e=>{let{prefixCls:t,className:r,classNames:n,rootClassName:a,internalClassName:o,style:l,styles:u,active:d,children:p}=e,{getPrefixCls:h}=sT.useContext(st),v=h("skeleton",t),[g,b]=_w(v),x=Y(v,`${v}-element`,{[`${v}-active`]:d},g,n?.root,r,a,b);return sT.createElement("div",{className:x,style:u?.root},sT.createElement("div",{className:Y(n?.content,o||`${v}-node`),style:{...u?.content,...l}},p))},JY=j7e,N7e=e=>{let{getPrefixCls:t}=Tw.useContext(st),r=t("skeleton",e.prefixCls);return Tw.createElement(JY,{...e,internalClassName:`${r}-image`},Tw.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${r}-image-svg`,"aria-hidden":"true",focusable:"false"},Tw.createElement("title",null,"Image placeholder"),Tw.createElement("path",{d:"M365.7 329.1q0 45.8-32 77.7t-77.7 32-77.7-32-32-77.7 32-77.6 77.7-32 77.7 32 32 77.6M951 548.6v256H146.3V694.9L329 512l91.5 91.4L713 311zm54.8-402.3H91.4q-7.4 0-12.8 5.4T73 164.6v694.8q0 7.5 5.5 12.9t12.8 5.4h914.3q7.5 0 12.9-5.4t5.4-12.9V164.6q0-7.5-5.4-12.9t-12.9-5.4m91.4 18.3v694.8q0 37.8-26.8 64.6t-64.6 26.9H91.4q-37.7 0-64.6-26.9T0 859.4V164.6q0-37.8 26.8-64.6T91.4 73h914.3q37.8 0 64.6 26.9t26.8 64.6",className:`${r}-image-path`})))},P7e=N7e,lT=A(_()),R7e=e=>{let{prefixCls:t,className:r,classNames:n,rootClassName:a,active:o,block:l,style:u,styles:d,size:p,...h}=e,{getPrefixCls:v}=lT.useContext(st),g=v("skeleton",t),[b,x]=_w(g),y=qr(F=>p??F),E=Y(g,`${g}-element`,{[`${g}-active`]:o,[`${g}-block`]:l},n?.root,r,a,b,x);return lT.createElement("div",{className:E,style:d?.root},lT.createElement(IC,{prefixCls:`${g}-input`,className:n?.content,style:{...d?.content,...u},size:y,...h}))},O7e=R7e,QY=A(_()),z7e=(e,t)=>{let{width:r,rows:n=2}=t;if(Array.isArray(r))return r[e];if(n-1===e)return r},L7e=e=>{let{prefixCls:t,className:r,style:n,rows:a=0}=e,o=Array.from({length:a}).map((l,u)=>QY.createElement("li",{key:u,style:{width:z7e(u,e)}}));return QY.createElement("ul",{className:Y(t,r),style:n},o)},H7e=L7e,q7e=A(_()),W7e=({prefixCls:e,className:t,width:r,style:n})=>q7e.createElement("h3",{className:Y(e,t),style:{width:r,...n}}),U7e=W7e;function uT(e){return Ct(e)?e:{}}function V7e(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function G7e(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function K7e(e,t){let r={};return(!e||!t)&&(r.width="61%"),!e&&t?r.rows=3:r.rows=2,r}var Kg=wc.default.forwardRef((e,t)=>{let{prefixCls:r,loading:n,className:a,rootClassName:o,classNames:l,style:u,styles:d,children:p,avatar:h=!1,title:v=!0,paragraph:g=!0,active:b,round:x}=e,{getPrefixCls:y,direction:E,className:F,style:S,classNames:D,styles:$}=wt("skeleton"),C=y("skeleton",r),[B,M]=_w(C),I={...e,avatar:h,title:v,paragraph:g},j=Ue(S),N=Ue(u),[R,L]=Et([D,l],[$,j,d,N],{props:I}),q=wc.default.useRef(null);if(wc.default.useImperativeHandle(t,()=>({nativeElement:q.current})),n||!("loading"in e)){let W=!!h,U=!!v,P=!!g,H;if(W){let X={className:R.avatar,prefixCls:`${C}-avatar`,...V7e(U,P),...uT(h),style:L.avatar};H=wc.default.createElement("div",{className:Y(R.header,`${C}-header`),style:L.header},wc.default.createElement(IC,{...X}))}let V;if(U||P){let X;if(U){let O={className:R.title,prefixCls:`${C}-title`,...G7e(W,P),...uT(v),style:L.title};X=wc.default.createElement(U7e,{...O})}let Z;if(P){let O={className:R.paragraph,prefixCls:`${C}-paragraph`,...K7e(W,U),...uT(g),style:L.paragraph};Z=wc.default.createElement(H7e,{...O})}V=wc.default.createElement("div",{className:Y(R.section,`${C}-section`),style:L.section},X,Z)}let Q=Y(C,{[`${C}-with-avatar`]:W,[`${C}-active`]:b,[`${C}-rtl`]:E==="rtl",[`${C}-round`]:x},R.root,F,a,o,B,M);return wc.default.createElement("div",{ref:q,className:Q,style:L.root},H,V)}return p??null});Kg.Button=_7e;Kg.Avatar=M7e;Kg.Input=O7e;Kg.Image=P7e;Kg.Node=JY;var X7e=Kg,dT=X7e;var ZY=A(xe(),1),Q7e={neutral:void 0,accent:"var(--accent-solid)",info:"processing",success:"success",warning:"warning"};function tJ({className:e,tone:t="neutral",size:r,...n}){return(0,ZY.jsx)(Bt,{children:(0,ZY.jsx)(Cd,{...n,color:Q7e[t],className:et("wand-ui-badge",`wand-ui-badge-${t}`,e)})})}var rl=A(_()),Y7e=A(_()),J7e=Y7e.default.createContext({}),mT=J7e,Zl=A(_()),pT=A(_()),rJ=({children:e})=>{let{getPrefixCls:t}=pT.useContext(st),r=t("breadcrumb"),n=pT.useContext(mT),{classNames:a,styles:o}=n;return pT.createElement("li",{className:Y(`${r}-separator`,a?.separator),style:o?.separator,"aria-hidden":"true"},e===""?e:e??"/")};rJ.__ANT_BREADCRUMB_SEPARATOR=!0;var hT=rJ,eJ=A(_());function Z7e(e,t){if(!Lt(e.title))return null;let r=Object.keys(t).join("|");return Ct(e.title)?e.title:String(e.title).replace(new RegExp(`:(${r})`,"g"),(n,a)=>t[a]||n)}function nJ(e,t,r,n){if(!Lt(r))return null;let{className:a,onClick:o,...l}=t,u={...Ya(l,{data:!0,aria:!0}),onClick:o};return n!==void 0?eJ.createElement("a",{...u,className:Y(`${e}-link`,a),href:n},r):eJ.createElement("span",{...u,className:Y(`${e}-link`,a)},r)}function e3e(e,t){return(r,n,a,o,l)=>{if(t)return t(r,n,a,o);let u=Z7e(r,n);return nJ(e,r,u,l)}}var aJ=e=>{let{prefixCls:t,separator:r="/",children:n,menu:a,dropdownProps:o,href:l,dropdownIcon:u}=e,d=Zl.useContext(mT),{classNames:p,styles:h}=d,v=(g=>{if(a){let b={...o};if(a){let{items:x,...y}=a||{};b.menu={...y,items:x?.map(({key:E,title:F,label:S,path:D,...$},C)=>{let B=S??F;return D&&(B=Zl.createElement("a",{href:`${l}${D}`},B)),{...$,key:E??C,label:B}})}}return Zl.createElement(tT,{placement:"bottom",...b},Zl.createElement("span",{className:`${t}-overlay-link`},g,u))}return g})(n);return Lr(v)?Zl.createElement(Zl.Fragment,null,Zl.createElement("li",{className:Y(`${t}-item`,p?.item),style:h?.item},v),Lt(r)&&Zl.createElement(hT,null,r)):null},iJ=e=>{let{prefixCls:t,children:r,href:n,...a}=e,{getPrefixCls:o}=Zl.useContext(st),l=o("breadcrumb",t);return Zl.createElement(aJ,{...a,prefixCls:l},nJ(l,a,r,n))};iJ.__ANT_BREADCRUMB_ITEM=!0;var t3e=iJ,r3e=e=>{let{componentCls:t,iconCls:r,calc:n}=e;return{[t]:{...Mt(e),color:e.itemColor,fontSize:e.fontSize,[r]:{fontSize:e.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},[`${t}-item a`]:{color:e.linkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${ue(e.paddingXXS)}`,borderRadius:e.borderRadiusSM,height:e.fontHeight,display:"inline-block",marginInline:n(e.marginXXS).mul(-1).equal(),"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover},...Tn(e)},[`${t}-item:last-child`]:{color:e.lastItemColor},[`${t}-separator`]:{marginInline:e.separatorMargin,color:e.separatorColor},[`${t}-link`]:{"> svg":{display:"inline-block",verticalAlign:"middle",marginBlockEnd:"0.2em"},[`
334
+ > ${r} + span,
335
+ > ${r} + a,
336
+ > svg + span,
337
+ > svg + a
338
+ `]:{marginInlineStart:e.marginXXS}},[`${t}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.fontHeight,display:"inline-block",padding:`0 ${ue(e.paddingXXS)}`,marginInline:n(e.marginXXS).mul(-1).equal(),[`> ${r}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover,a:{color:e.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}}}},n3e=e=>({itemColor:e.colorTextDescription,lastItemColor:e.colorText,iconFontSize:e.fontSize,linkColor:e.colorTextDescription,linkHoverColor:e.colorText,separatorColor:e.colorTextDescription,separatorMargin:e.marginXS}),a3e=ct("Breadcrumb",e=>{let t=vt(e,{});return r3e(t)},n3e),i3e=A(_());function o3e(e){let{breadcrumbName:t,children:r,...n}=e,a={title:t,...n};return r&&(a.menu={items:r.map(({breadcrumbName:o,...l})=>({...l,title:o}))}),a}function s3e(e,t){return(0,i3e.useMemo)(()=>e||(t?t.map(o3e):null),[e,t])}var l3e=(e,t)=>{if(t===void 0)return t;let r=(t||"").replace(/^\//,"");return Object.keys(e).forEach(n=>{r=r.replace(`:${n}`,e[n])}),r},u3e=(e,t)=>{let{prefixCls:r,separator:n,style:a,className:o,rootClassName:l,routes:u,items:d,children:p,itemRender:h,params:v={},classNames:g,styles:b,dropdownIcon:x,...y}=e,{getPrefixCls:E,direction:F,className:S,style:D,classNames:$,styles:C,separator:B,dropdownIcon:M}=wt("breadcrumb"),I=n??B??"/",j=x??M??rl.createElement(u1,null),N,R=E("breadcrumb",r),[L,q]=a3e(R),W=s3e(d,u),U=rl.useMemo(()=>({...e,separator:I}),[e,I]),P=Ue(D),H=Ue(a),[V,Q]=Et([$,g],[C,P,b,H],{props:U}),X=e3e(R,h);if(W&&W.length>0){let J=[],te=d||u;N=W.map((ee,ie)=>{let{path:me,key:le,type:he,menu:se,onClick:ke,className:De,style:we,separator:de,dropdownProps:be}=ee,ye=l3e(v,me);ye!==void 0&&J.push(ye);let Re=le??ie;if(he==="separator")return rl.createElement(hT,{key:Re},de);let Fe={},$e=ie===W.length-1;se&&(Fe.menu=se);let{href:Ie}=ee;return J.length&&ye!==void 0&&(Ie=`#/${J.join("/")}`),rl.createElement(aJ,{key:Re,...Fe,...Ya(ee,{data:!0,aria:!0}),className:De,style:we,dropdownProps:be,dropdownIcon:j,href:Ie,separator:$e?"":I,onClick:ke,prefixCls:R},X(ee,v,te,J,Ie))})}else if(p){let J=Er(p).length;N=Er(p).map((te,ee)=>{if(!te)return te;let ie=ee===J-1;return Fr(te,{separator:ie?"":I,key:ee})})}let Z=Y(R,S,{[`${R}-rtl`]:F==="rtl"},o,l,V.root,L,q),O={...Q.root},z=rl.useMemo(()=>({classNames:V,styles:Q}),[V,Q]),K=rl.useRef(null);return rl.useImperativeHandle(t,()=>({nativeElement:K.current})),rl.createElement(mT.Provider,{value:z},rl.createElement("nav",{ref:K,className:Z,style:O,...y},rl.createElement("ol",null,N)))},c3e=rl.forwardRef(u3e),d3e=c3e,gT=d3e;gT.Item=t3e;gT.Separator=hT;var p3e=gT,jw=A(xe(),1);function oJ({items:e,variant:t="compact",className:r,ariaLabel:n="\u9762\u5305\u5C51"}){return(0,jw.jsx)(Bt,{children:(0,jw.jsx)(p3e,{className:et("wand-crumb",t==="title"?"is-title":"is-compact",r),"aria-label":n,items:e.map((a,o)=>({title:o===e.length-1?t==="title"?(0,jw.jsx)("h1",{"aria-current":"page",children:a.label}):(0,jw.jsx)("strong",{"aria-current":"page",children:a.label}):(0,jw.jsx)(_e,{kind:"ghost",size:"small",type:"button",onClick:a.onNavigate,children:a.label})}))})})}var f3e=A(_(),1),tl=A(_()),m3e=e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},h3e=e=>{let{componentCls:t,sizePaddingEdgeHorizontal:r,colorSplit:n,lineWidth:a,textPaddingInline:o,orientationMargin:l,verticalMarginInline:u}=e,d=`${t}-rail`;return{[t]:{...Mt(e),borderBlockStart:`${ue(a)} solid ${n}`,[d]:{borderBlockStart:`${ue(a)} solid ${n}`},"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:u,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${ue(a)} solid ${n}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${ue(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${ue(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${n}`,[`${d}-start, ${d}-end`]:{width:"50%",borderBlockStartColor:"inherit",borderBlockEnd:0,content:"''"}},[`&-horizontal${t}-with-text-start`]:{[`${d}-start`]:{width:`calc(${l} * 100%)`},[`${d}-end`]:{width:`calc(100% - ${l} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{[`${d}-start`]:{width:`calc(100% - ${l} * 100%)`},[`${d}-end`]:{width:`calc(${l} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:n,borderStyle:"dashed",borderWidth:`${ue(a)} 0 0`,[d]:{borderBlockStart:`${ue(a)} dashed ${n}`}},[`&-horizontal${t}-with-text${t}-dashed`]:{[`${d}-start, ${d}-end`]:{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:n,borderStyle:"dotted",borderWidth:`${ue(a)} 0 0`,[d]:{borderBlockStart:`${ue(a)} dotted ${n}`}},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{[`${d}-start`]:{width:0},[`${d}-end`]:{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:r}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{[`${d}-start`]:{width:"100%"},[`${d}-end`]:{width:0},[`${t}-inner-text`]:{paddingInlineEnd:r}}}}},g3e=e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),v3e=ct("Divider",e=>{let t=vt(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[h3e(t),m3e(t)]},g3e,{unitless:{orientationMargin:!0}}),b3e=["left","right","center","start","end"],y3e=tl.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n,className:a,style:o,classNames:l,styles:u}=wt("divider"),{prefixCls:d,type:p,orientation:h,vertical:v,titlePlacement:g,orientationMargin:b,className:x,rootClassName:y,children:E,dashed:F,variant:S="solid",plain:D,style:$,size:C,classNames:B,styles:M,...I}=e,j=r("divider",d),N=`${j}-rail`,[R,L]=v3e(j),q=qr(C),W=!!E,U=b3e.includes(h||""),P=tl.useMemo(()=>{let me=g??(U?h:"center");return me==="left"?n==="rtl"?"end":"start":me==="right"?n==="rtl"?"start":"end":me},[n,h,g,U]),H=P==="start"&&b!=null,V=P==="end"&&b!=null,[Q,X]=Wo(h,v,p),Z={...e,orientation:Q,titlePlacement:P,size:q},O=Ue(o),[z,K]=Et([l,B],[u,O,M],{props:Z}),J=Y(j,a,R,L,`${j}-${Q}`,{[`${j}-with-text`]:W,[`${j}-with-text-${P}`]:W,[`${j}-dashed`]:!!F,[`${j}-${S}`]:S!=="solid",[`${j}-plain`]:!!D,[`${j}-rtl`]:n==="rtl",[`${j}-no-default-orientation-margin-start`]:H,[`${j}-no-default-orientation-margin-end`]:V,[`${j}-md`]:q==="medium"||q==="middle",[`${j}-sm`]:q==="small",[N]:!E,[z.rail]:z.rail&&!E},x,y,z.root),te=tl.useMemo(()=>Gn(b)?b:/^\d+$/.test(b)?Number(b):b,[b]),ee={marginInlineStart:H?te:void 0,marginInlineEnd:V?te:void 0},ie=tl.useRef(null);return tl.useImperativeHandle(t,()=>({nativeElement:ie.current})),tl.createElement("div",{ref:ie,className:J,style:{...K.root,...E?{}:K.rail,...$},...I,role:"separator"},E&&!X&&tl.createElement(tl.Fragment,null,tl.createElement("div",{className:Y(N,`${N}-start`,z.rail),style:K.rail}),tl.createElement("span",{className:Y(`${j}-inner-text`,z.content),style:{...ee,...K.content}},E),tl.createElement("div",{className:Y(N,`${N}-end`,z.rail),style:K.rail})))}),sJ=y3e,cp=A(xe(),1),lJ=(0,f3e.forwardRef)(function({label:e,icon:t,hint:r,shortcut:n,tone:a="default",selected:o,className:l,type:u,...d},p){return(0,cp.jsxs)(_e,{kind:a==="danger"?"danger":"ghost",...d,onClick:d.onClick,ref:p,type:u??"button",role:d.role??"menuitem","aria-checked":o===void 0?d["aria-checked"]:o,className:et("wand-ui-menu-item",a==="danger"&&"wand-ui-menu-item-danger",l),children:[t?(0,cp.jsx)(Be,{className:"wand-ui-menu-item-icon",name:t,size:15}):null,(0,cp.jsx)("span",{className:"wand-ui-menu-item-label",children:e}),r!=null?(0,cp.jsx)("span",{className:"wand-ui-menu-item-hint",children:r}):null,n?(0,cp.jsx)("span",{className:"wand-ui-menu-item-hint",children:n}):null]})});function uJ({className:e}){return(0,cp.jsx)(sJ,{className:et("wand-ui-menu-separator",e)})}function w3e({children:e,className:t}){return(0,cp.jsx)("div",{className:et("wand-ui-menu-label",t),children:e})}function x3e({children:e,className:t}){return(0,cp.jsx)("div",{className:et("wand-ui-menu",t),children:e})}var fT=A(xe(),1);function cJ({className:e,effect:t="shimmer",...r}){return(0,fT.jsx)(Bt,{children:(0,fT.jsx)("div",{...r,"aria-hidden":"true",className:et("wand-ui-skeleton",e),children:(0,fT.jsx)(dT.Input,{active:t!=="none",block:!0,size:"small"})})})}var dJ={};ws(dJ,{PortalContainerProvider:()=>dd,REACT_UI_PORTALS_ID:()=>cf,WandBadge:()=>tJ,WandBrandMark:()=>ju,WandBreadcrumb:()=>oJ,WandButton:()=>_e,WandChip:()=>Wu,WandDialog:()=>Cf,WandDialogSurface:()=>El,WandDropdownMenu:()=>Sd,WandDropdownMenuContent:()=>qu,WandDropdownMenuItem:()=>nn,WandDropdownMenuSeparator:()=>Ms,WandDropdownMenuTrigger:()=>Hu,WandIcon:()=>Be,WandIconButton:()=>Br,WandInput:()=>Lu,WandMenu:()=>x3e,WandMenuItem:()=>lJ,WandMenuLabel:()=>w3e,WandMenuSeparator:()=>uJ,WandNavigation:()=>lD,WandNavigationItem:()=>cD,WandNavigationLink:()=>dD,WandNavigationList:()=>uD,WandPopover:()=>bi,WandSearchField:()=>mg,WandSelect:()=>Iw,WandSkeleton:()=>cJ,WandStretchTabs:()=>JM,WandSwitch:()=>pJ,WandTabs:()=>b9,WandToastRegion:()=>Mw,WandUiBoundary:()=>Bt,WandUiProvider:()=>Xn,filterSelectOptions:()=>BC,isWandPopupOwnedBy:()=>sf,showWandToast:()=>F1,usePortalContainer:()=>Kn,wandTheme:()=>pd,workspaceTaskIconName:()=>CF});var E3e=A(_(),1),MC=A(xe(),1);function pJ({checked:e,onCheckedChange:t,ariaLabel:r,label:n,disabled:a,className:o,id:l,size:u="lg"}){let d=(0,E3e.useId)(),p=l??d;return(0,MC.jsxs)("div",{className:et("wand-ui-switch-row",o),children:[(0,MC.jsx)(Bt,{children:(0,MC.jsx)(YM,{id:p,size:u==="sm"?"small":"default",className:"wand-ui-switch",checked:e,disabled:a,"aria-label":r,onChange:t})}),n?(0,MC.jsx)("label",{htmlFor:p,children:n}):null]})}var k3e=()=>Ka()&&window.document.documentElement;var $J="wand-legacy-pwa-cleanup-v1",C3e=["wand-static-","wand-runtime-"];function _C(e){if(!e)return!1;try{let t=new URL(e.scriptURL,location.href);return t.origin===location.origin&&t.pathname==="/sw.js"}catch{return!1}}function S3e(e){return _C(e.installing)||_C(e.waiting)||_C(e.active)}function F3e(){try{return localStorage.getItem($J)==="done"}catch{return!1}}function $3e(){try{localStorage.setItem($J,"done")}catch{}}async function D3e(){if(!("serviceWorker"in navigator))return!0;try{let e=(await navigator.serviceWorker.getRegistrations()).filter(S3e);return await Promise.all(e.map(t=>t.unregister())),!0}catch{return!1}}async function A3e(){if(!("caches"in window))return!0;try{let e=(await caches.keys()).filter(t=>C3e.some(r=>t.startsWith(r)));return await Promise.all(e.map(t=>caches.delete(t))),!0}catch{return!1}}async function B3e(){if(F3e())return;let e="serviceWorker"in navigator&&_C(navigator.serviceWorker.controller),[t,r]=await Promise.all([D3e(),A3e()]);!t||!r||($3e(),e&&location.reload())}B3e();var I3e=A(Xa(),1),M3e="wand.reactUi.enabled";function fJ(e){if(e==null||e==="")return null;let t=e.trim().toLowerCase();return["1","true","on","enabled"].includes(t)?!0:["0","false","off","disabled"].includes(t)?!1:null}function T3e(e=window){try{let r=fJ(new URL(e.location.href).searchParams.get("reactUi"));if(r!=null)return r}catch{}let t=e.__wandFeatureFlags?.reactUi;if(typeof t=="boolean")return t;try{let r=fJ(e.localStorage.getItem(M3e));if(r!=null)return r}catch{}return!0}var _3e=A(_(),1),Xg=A(_(),1),DJ=A(_(),1),ms=A(xe(),1),j3e=DJ.lazy(()=>globalThis.__wandImportBrowserModule("4d02d91878bb9936").then(e=>({default:e.RestartProgress})));function N3e({controller:e=Kl}){let t=(0,Xg.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot),r=yI(t),n=(0,Xg.useRef)(null),a=(0,Xg.useRef)(null),o=(0,Xg.useRef)(null);(0,Xg.useEffect)(()=>{if(!t.open)return;let d=a.current?.ownerDocument??document,p=h=>{a.current&&(h.stopPropagation(),a.current.contains(h.target)||(n.current??o.current)?.focus({preventScroll:!0}))};return d.addEventListener("focusin",p,!0),()=>{d.removeEventListener("focusin",p,!0)}},[t.open]),(0,Xg.useEffect)(()=>{t.phase==="timed-out"&&n.current?.focus()},[t.phase]);let l=t.phase==="waiting"||t.phase==="checking",u=t.maxAttempts>0?Math.min(100,Math.round(Math.min(t.attempts,t.maxAttempts)/t.maxAttempts*100)):0;return(0,ms.jsx)(ms.Fragment,{children:(0,ms.jsx)(El,{open:t.open,onOpenChange:()=>{},title:r.title,description:r.description,className:"wand-restart-surface",width:{xs:"calc(100vw - 32px)",sm:520},zIndex:(pd.token?.zIndexPopupBase??1e3)+2e3,styles:{wrapper:{padding:"max(16px, var(--wand-safe-top)) max(16px, var(--wand-safe-right)) max(16px, var(--wand-safe-bottom)) max(16px, var(--wand-safe-left))"}},testId:"restart-overlay",showClose:!1,dismissable:!1,dismissalPriority:"blocking",children:(0,ms.jsxs)(rt,{ref:a,vertical:!0,align:"center",gap:"middle",className:"wand-restart-body","aria-busy":l,style:{paddingBlock:24},children:[t.phase!=="timed-out"?(0,ms.jsx)(Wi,{size:"large","aria-hidden":"true"}):null,(0,ms.jsx)(Gt.Paragraph,{ref:o,className:"wand-restart-live",role:t.phase==="timed-out"?"alert":"status","aria-live":t.phase==="timed-out"?"assertive":"polite","data-wand-autofocus":t.phase==="timed-out"?void 0:"true",tabIndex:-1,children:r.liveStatus}),t.phase!=="timed-out"?(0,ms.jsxs)(ms.Fragment,{children:[(0,ms.jsx)(DJ.Suspense,{fallback:null,children:(0,ms.jsx)(j3e,{percent:u})}),(0,ms.jsxs)(Gt.Text,{type:"secondary",className:"wand-restart-attempts",children:["\u5DF2\u68C0\u67E5 ",t.attempts," / ",t.maxAttempts," \u6B21"]})]}):(0,ms.jsx)(_e,{ref:n,className:"wand-restart-manual","data-wand-autofocus":"true",kind:"primary",onClick:()=>e.manualRefresh(),children:"\u624B\u52A8\u5237\u65B0"})]})})})}var P3e=A(_(),1),R3e=A(er(),1),mJ=A(xe(),1);function O3e(){return(0,P3e.useSyncExternalStore)(Lg.subscribe,Lg.getSnapshot,Lg.getSnapshot).mounts.map(e=>(0,R3e.createPortal)((0,mJ.jsx)(Iw,{value:e.value,options:e.options,ariaLabel:e.ariaLabel,popupOwner:e.scope==="dropdown"?"composer-plus-popover":"composer-main",placeholder:e.placeholder,displayValue:e.scope==="runtime"&&e.control==="tool"?"":e.displayValue,startSlot:e.scope==="runtime"&&e.control==="tool"?(0,mJ.jsx)(Xo,{provider:nf(e.value)?.provider,className:"composer-tool-logo"}):void 0,displayTitle:e.scope==="runtime"&&e.control==="tool"?e.displayTitle||e.options.find(t=>t.value===e.value)?.label:e.displayTitle,disabled:e.disabled,triggerKind:e.scope==="runtime"?"ghost":void 0,searchable:e.control==="model",searchPlaceholder:"\u641C\u7D22\u6A21\u578B",className:`wand-composer-select-trigger wand-composer-select-trigger-${e.control}`,contentClassName:`wand-composer-select-content wand-composer-select-content-${e.control}`,itemClassName:"wand-composer-select-item",side:"top",align:e.align,sideOffset:8,collisionPadding:14,onValueChange:e.onValueChange}),e.target,e.key))}var z3e=A(_(),1),L3e=A(er(),1),nl=A(xe(),1);function H3e(e){return e==="mode"?"\u6743\u9650\u6A21\u5F0F":e==="runtime"?"\u6A21\u578B\u4E0E\u601D\u8003\u8BBE\u7F6E":"\u4F1A\u8BDD\u8BBE\u7F6E"}function TC(e,t){return(0,nl.jsx)("span",{className:"composer-config-select-host","data-composer-select-host":"","data-composer-select-key":`${e}-${t}`,"data-composer-select-scope":e,"data-mode-control":t})}function q3e({mount:e}){let{scope:t}=e,r=t!=="runtime",n=t!=="mode",a=t==="all";return(0,nl.jsxs)(rt,{align:"center",gap:6,wrap:t!=="runtime",style:{flex:n?1:void 0,minWidth:0},className:`composer-config-controls composer-config-controls-${t}`,"data-config-scope":t,role:"group","aria-label":H3e(t),title:e.groupTitle,children:[n&&e.toolVisible&&(0,nl.jsx)("span",{"data-mode-control-pill":"tool",style:{display:"inline-flex",width:t==="runtime"?32:120,flexShrink:0},"aria-live":"polite","aria-busy":e.toolDisabled||void 0,title:e.toolStatus,children:TC(t,"tool")}),r&&(0,nl.jsx)("span",{"data-mode-control-pill":"mode",title:`\u6A21\u5F0F\uFF1A${e.modeLabel}${e.modeLabel==="\u5B8C\u5168\u8BBF\u95EE"?"\uFF1B\u8BF7\u6838\u5BF9\u6267\u884C\u4EFB\u52A1\u4E0E\u5DE5\u4F5C\u76EE\u5F55\u540E\u53D1\u9001":""}`,children:TC(t,"mode")}),n&&(0,nl.jsxs)(nl.Fragment,{children:[(0,nl.jsx)("span",{"data-mode-control-pill":"model",style:{minWidth:t==="runtime"?0:120},title:`\u6A21\u578B\uFF1A${e.modelFullLabel}`,children:TC(t,"model")}),a&&(0,nl.jsx)(Br,{size:"medium",type:"button","data-models-refresh":"","data-models-refresh-scope":t,"aria-label":e.modelRefreshing?"\u6B63\u5728\u5237\u65B0\u6A21\u578B\u5217\u8868":"\u5237\u65B0\u6A21\u578B\u5217\u8868",title:e.modelRefreshing?"\u6B63\u5728\u5237\u65B0\u6A21\u578B\u5217\u8868":"\u5237\u65B0\u6A21\u578B\u5217\u8868","aria-busy":e.modelRefreshing?"true":"false",disabled:e.modelRefreshing,onClick:e.onRefreshModels,children:(0,nl.jsx)(Be,{name:"refresh",size:13,strokeWidth:1.9})}),(0,nl.jsx)("span",{"aria-label":`\u601D\u8003\u6DF1\u5EA6\uFF1A${e.thinkingLabel}`,"data-mode-control-pill":"thinking",style:{minWidth:t==="runtime"?0:68},"data-thinking":e.thinkingValue,title:`\u601D\u8003\u6DF1\u5EA6\uFF1A${e.thinkingLabel}`,children:TC(t,"thinking")})]})]})}function W3e(){return(0,z3e.useSyncExternalStore)(Hg.subscribe,Hg.getSnapshot,Hg.getSnapshot).mounts.map(e=>(0,L3e.createPortal)((0,nl.jsx)(q3e,{mount:e}),e.target,e.key))}var vT=A(_(),1),hJ=A(er(),1),NC=A(xe(),1),U3e=e=>`wand-pi-settings-panel-${e.sessionId}`;function V3e({mount:e}){let t=e.open;return(0,NC.jsx)(_e,{kind:"ghost",type:"button",className:"btn-circle btn-circle-action composer-pi-settings-toggle","data-open":t?"true":"false","aria-expanded":t,"aria-controls":U3e(e),"aria-label":t?"\u6536\u8D77\u4F1A\u8BDD\u529F\u80FD\u8BBE\u7F6E":"\u4F1A\u8BDD\u529F\u80FD\u8BBE\u7F6E\uFF1ACodeMode / Skills / MCP",title:t?"\u6536\u8D77\u4F1A\u8BDD\u529F\u80FD\u8BBE\u7F6E":"\u4F1A\u8BDD\u529F\u80FD\u8BBE\u7F6E\uFF1ACodeMode / Skills / MCP",onClick:()=>{ia.toggle(e.sessionId)},children:(0,NC.jsx)(Be,{name:t?"close":"gear",size:17,strokeWidth:1.9})})}function G3e(){let e=vT.useSyncExternalStore(ia.subscribe,ia.getSnapshot,ia.getSnapshot),[t,r]=vT.useState(null),n=e.mounts.some(a=>a.open);return vT.useEffect(()=>{if(!n||t)return;let a=!0;return globalThis.__wandImportBrowserModule("9ed60ee59dc91419").then(o=>{a&&r(()=>o.PiSettingsPanelHost)}),()=>{a=!1}},[n,t]),e.mounts.flatMap(a=>[(0,hJ.createPortal)((0,NC.jsx)(V3e,{mount:a},`${a.sessionId}-toggle`),a.toggleTarget,`${a.key}-toggle`),...t?[(0,hJ.createPortal)((0,NC.jsx)(t,{mount:a},a.sessionId),a.target,a.key)]:[]])}var K3e=A(_(),1),X3e=A(er(),1),dp=A(xe(),1);function Q3e({mount:e}){let t=`${e.interactiveOn?"is-on":""}${e.interactiveVisible?"":" hidden"}`;return(0,dp.jsxs)(dp.Fragment,{children:[(0,dp.jsx)(GM,{id:"plus-attach-item",icon:"paperclip",label:"\u4E0A\u4F20\u9644\u4EF6",onClick:r=>e.onAttach(r.detail===0)}),(0,dp.jsxs)(_e,{kind:"ghost",className:t,id:"terminal-interactive-toggle-top",type:"button","aria-pressed":e.interactiveOn?"true":"false",title:"\u7EC8\u7AEF\u4EA4\u4E92\u5F00\u542F\u65F6\uFF0C\u952E\u76D8\u76F4\u901A\u539F\u59CB\u7EC8\u7AEF\uFF1B\u5173\u95ED\u540E\u5728\u5BF9\u8BDD\u4E2D\u9605\u8BFB\u89E3\u6790\u540E\u7684\u8F93\u51FA",onClick:()=>e.onToggleInteractive(),children:[(0,dp.jsx)(Be,{name:"keyboard",size:14,strokeWidth:1.8,className:"plus-popover-icon"}),(0,dp.jsx)("span",{className:"plus-popover-label",children:"\u7EC8\u7AEF\u4EA4\u4E92"}),(0,dp.jsx)("span",{className:"plus-popover-toggle-state",children:e.interactiveOn?"\u5F00":"\u5173"})]})]})}function Y3e(){return(0,K3e.useSyncExternalStore)(Pg.subscribe,Pg.getSnapshot,Pg.getSnapshot).mounts.map(e=>(0,X3e.createPortal)((0,dp.jsx)(Q3e,{mount:e}),e.target,e.key))}var J3e=A(_(),1),Z3e=A(er(),1),xT=A(xe(),1);function e$e({mount:e}){return(0,xT.jsx)(Bt,{children:(0,xT.jsx)(ei,{id:"action-error",role:"alert",type:"error",title:e.message,showIcon:!0})})}function t$e(){return(0,J3e.useSyncExternalStore)(Ng.subscribe,Ng.getSnapshot,Ng.getSnapshot).mounts.map(e=>(0,Z3e.createPortal)((0,xT.jsx)(e$e,{mount:e}),e.target,e.key))}var r$e=A(_(),1),n$e=A(er(),1),ci=A(xe(),1);function a$e({enabled:e,pending:t=!1,onToggle:r}){return(0,ci.jsxs)(_e,{id:"auto-approve-toggle",size:"medium",kind:e?"soft":"ghost","aria-pressed":e,"aria-busy":t||void 0,disabled:t,"aria-label":`\u81EA\u52A8\u6279\u51C6\u5DF2${e?"\u542F\u7528\uFF0C\u70B9\u51FB\u5173\u95ED":"\u5173\u95ED\uFF0C\u70B9\u51FB\u5F00\u542F"}`,onClick:r,children:[(0,ci.jsx)(Be,{name:e?"shieldCheck":"shield",size:12}),e?"\u81EA\u52A8":"\u624B\u52A8"]})}function i$e({stats:e}){return e?(0,ci.jsx)(bi,{ariaLabel:"\u81EA\u52A8\u6279\u51C6\u7EDF\u8BA1",contentId:"approval-stats-popup",trigger:(0,ci.jsxs)(_e,{id:"approval-stats-badge",kind:"ghost",size:"medium","aria-label":"\u672C\u6B21\u4F1A\u8BDD\u81EA\u52A8\u6279\u51C6\u7EDF\u8BA1",children:[(0,ci.jsx)(Be,{name:"shield",size:12}),e.total]}),children:(0,ci.jsxs)("div",{id:"approval-stats",children:["\u547D\u4EE4\u6267\u884C ",e.command," \xB7 \u6587\u4EF6\u5199\u5165 ",e.file," \xB7 \u5176\u4ED6\u5DE5\u5177 ",e.tool," \xB7 \u5408\u8BA1 ",e.total]})}):null}function o$e({permission:e,pending:t,onAction:r}){return(0,ci.jsxs)("span",{id:"permission-actions","aria-busy":t||void 0,children:[(0,ci.jsx)("span",{id:"permission-actions-label",role:"status","aria-live":"polite","aria-atomic":"true",children:e.label}),!e.autoApproving&&(0,ci.jsxs)(ci.Fragment,{children:[(0,ci.jsx)(_e,{id:"approve-permission-btn",size:"medium",kind:"primary",disabled:t,onClick:()=>r("approve"),children:"\u6279\u51C6"}),e.requestId&&(0,ci.jsx)(_e,{id:"approve-turn-permission-btn",size:"medium",disabled:t,onClick:()=>r("approve-turn"),children:"\u672C\u8F6E\u5141\u8BB8"}),(0,ci.jsx)(_e,{id:"deny-permission-btn",size:"medium",kind:"danger",disabled:t,onClick:()=>r("deny"),children:"\u62D2\u7EDD"})]})]})}function s$e(e,t){return e.kind==="permissions"?(0,ci.jsx)(o$e,{permission:e.permission,pending:e.pending,onAction:e.onAction}):e.kind==="auto-approve"?(0,ci.jsx)(a$e,{enabled:e.enabled,pending:e.pending,onToggle:e.onToggle}):(0,ci.jsx)(i$e,{stats:e.stats,revision:t})}function l$e(){let e=(0,r$e.useSyncExternalStore)(_g.subscribe,_g.getSnapshot,_g.getSnapshot);return e.mounts.map(t=>(0,n$e.createPortal)(s$e(t,e.revision),t.target,t.key))}var Yr=A(xe(),1);function u$e({portalContainer:e,settingsPresentation:t="workspace"}){let r=(0,_3e.useSyncExternalStore)(Ns.subscribe,Ns.getSnapshot,Ns.getSnapshot).activeDialog;return(0,Yr.jsxs)(dd,{container:e,children:[t==="workspace"?(0,Yr.jsxs)(Yr.Fragment,{children:[(0,Yr.jsx)(O3e,{}),(0,Yr.jsx)(W3e,{}),(0,Yr.jsx)(G3e,{}),(0,Yr.jsx)(lI,{}),(0,Yr.jsx)(Y3e,{}),(0,Yr.jsx)(t$e,{}),(0,Yr.jsx)(sI,{}),(0,Yr.jsx)(l$e,{}),(0,Yr.jsx)(BI,{}),(0,Yr.jsx)(hI,{}),(0,Yr.jsx)(gI,{}),(0,Yr.jsx)(vI,{})]}):null,t==="page"?(0,Yr.jsx)(Jk,{presentation:"page",showRestart:Kl.showRestart}):null,t==="workspace"?(0,Yr.jsxs)(Yr.Fragment,{children:[(0,Yr.jsx)(uI,{}),(0,Yr.jsx)(cI,{}),(0,Yr.jsx)(dI,{}),(0,Yr.jsx)(pI,{}),(0,Yr.jsx)(fI,{}),(0,Yr.jsx)(mI,{})]}):null,(0,Yr.jsx)(N3e,{}),(0,Yr.jsx)(Mw,{}),r?(0,Yr.jsx)(Cf,{open:!0,title:r.options.title,description:r.options.description,tone:r.options.tone,icon:r.options.icon,actions:r.options.actions,input:r.options.input,dismissable:r.options.dismissable,focusTriggerAfterClose:r.options.focusTriggerAfterClose,onAction:(n,a)=>{Ns.completeDialog(r.id,{dismissed:!1,action:n,inputValue:a})},onDismiss:()=>{Ns.completeDialog(r.id,{dismissed:!0})}},r.id):null]})}var c$e=["profile","notifications","display","ai","local-models","general","connectors","security","presets","about"];function d$e(e){let t=new URLSearchParams(e).get("settings");return t==="directory"||c$e.includes(t)?t:null}function p$e(){let e=!1,t=za.getSnapshot(),r=()=>{e=!0;let o=d$e(window.location.search),l=za.getSnapshot();o?((!l.open||(o==="directory"?l.detail:l.tab!==o||!l.detail))&&Yi.open(o==="directory"?void 0:o),za.setNested(new URLSearchParams(window.location.search).get("settingsNested")==="environment"?"environment":null)):Yi.close(),t=za.getSnapshot(),e=!1};r();let n=za.subscribe(()=>{let o=za.getSnapshot();e||((o.open!==t.open||o.tab!==t.tab||o.detail!==t.detail||o.nested!==t.nested)&&Qn({settings:o.open?o.detail?o.tab:"directory":null,settingsNested:o.open?o.nested:null}),t=o)}),a=yi(r);return()=>{n(),a()}}var gJ=A(xe(),1),vJ="overlay-root",f$e="wand-react-ui-mount",bT=null;function bJ(e,t,r){let n=document.getElementById(t);if(n&&n.parentElement===e)return n;let a=document.createElement("div");return a.id=t,a.className=r,e.appendChild(a),a}function m$e(){let e=document.getElementById(vJ);if(e)return e;let t=document.createElement("div");return t.id=vJ,t.dataset.wandUiRoot="",document.body.appendChild(t),t}function h$e(){window.__wandReactSettings=Yi,window.__wandReactNewSession=ua,window.__wandReactFolderPicker=Ld,window.__wandReactQuickCommit=wd,window.__wandReactWorktreeMerge=xd,window.__wandReactRestartOverlay=Kl,window.__wandReactFilePreview=Ws,window.__wandReactMissions=wf,window.__wandReactWorkspaces=If,window.__wandReactGithubIssues=f1,window.__wandReactTaskBoard=zn,W1(),O$()}function g$e(){let e=m$e(),t=T3e(),r=Id();if(!bT){r||p$e(),b0();let n=bJ(e,f$e,"wand-ui-mount"),a=bJ(e,cf,"wand-ui-portals");bT=(0,I3e.createRoot)(n),bT.render((0,gJ.jsx)(Xn,{children:(0,gJ.jsx)(u$e,{portalContainer:a,settingsPresentation:r?"page":"workspace"})}))}return r?window.__wandReactSettings=Yi:h$e(),e.dataset.reactUi=t?"enabled":"fallback",t?(window.__wandReactUi=gn,gn):(delete window.__wandReactUi,null)}var yJ=null;function v$e(e){Ua("working-dir")}var b$e={getInitialPath:ps,onOpen(){ki(["folderPicker"])},onClose(){},applySelection(e){nC(e),v$e(e)}};function wJ(){return ki(["folderPicker"])?Ld.open(ps())?!0:(Qe("\u5DE5\u4F5C\u76EE\u5F55\u9009\u62E9\u5668\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\u3002","error"),!1):!1}function y$e(){return Sm(()=>{wJ()})?wJ():!1}function w$e(){yJ||(yJ=zA(b$e))}var xJ=null;function x$e(){xJ||(xJ=JD({discardScope:e=>At.discardScope(e),read:e=>At.read(e),edit:(e,t)=>At.edit(e,t),submit:(e,t,r)=>At.submit(e,t,r),subscribe:e=>At.subscribe(e),transfer:(e,t,r)=>At.transfer(e,t,r)}))}var EJ=null,E$e={onOpen(){ki(["newSession"]),m.sessionsDrawerOpen=!1,Qr("wand-sidebar-open",!1),ym()},onClose(){},getContext(){return{effectiveCwd:ps(),selectedModels:{claude:el("claude"),codex:el("codex"),opencode:el("opencode"),grok:el("grok"),qoder:el("qoder"),pi:el("pi")},thinkingEffort:m.chatThinking||"off"}},rememberModel(e,t){kw(e,t||"")},async prepareCreate(e,t){return e==="structured"?{}:(await Rf(),Ys({prepare:!0}),await Fw(),Yl({},{kind:e,provider:t?.kind==="pty"?t.provider:void 0,command:t?.kind==="pty"?t.command:void 0,cwd:t?.cwd||ps(),workspaceTaskId:t?.workspaceTaskId}))},async completeCreate(e,t,r){if(m.chatMode=e.mode,e.kind!=="shell"&&(m.sessionTool=e.provider,m.preferredCommand=e.provider),op(t.id,!0),nC(e.cwd),await Ci({skipSelectedOutputReload:!0}),e.workspaceTaskId){await As.reload(e.workspaceTaskId).catch(()=>{});let n=va.getRuntime();if(Xr.getSnapshot().taskId===e.workspaceTaskId&&n){let a=Xr.getSnapshot().layout,o=a?a.windows.flatMap(u=>Co(u.layout)):[],l=Uu(a,[...o,t.id],t.id);n.saveTaskLayout(l)}Ui()}if(Ir.suspend(),r&&!q0.transfer(r.key,t.id,r.revision))throw new Error("\u65B0\u5DE5\u4F5C\u5DF2\u521B\u5EFA\uFF0C\u4F46\u8F93\u5165\u5DF2\u53D8\u5316\uFF0C\u8349\u7A3F\u4FDD\u7559\u3002\u8BF7\u4ECE\u4F1A\u8BDD\u5217\u8868\u6253\u5F00\u540E\u7EE7\u7EED\u3002");An(t.id),Ei(),r&&(bc(t.id),Fm(void 0)),window.setTimeout(()=>Xl(!0),0)}};function k$e(){EJ||(EJ=xD(E$e))}function C$e(){window.addEventListener("wand-settings-notifications-changed",e=>{let t=e.detail||{};typeof t.sound=="boolean"&&(m.notifSound=t.sound),typeof t.volume=="number"&&(m.notifVolume=t.volume),typeof t.bubble=="boolean"&&(m.notifBubble=t.bubble)}),window.addEventListener("wand-settings-config-saved",e=>{let t=e.detail;t&&(m.config||(m.config={}),Object.assign(m.config,t),Cw(t))})}function S$e(e){return e==="claude-history"?"history":e==="codex-history"?"codex":e==="opencode-history"||e==="qoder-history"?"history":"sessions"}function F$e(e,t){return ww(`\u786E\u8BA4\u5220\u9664\u8FD9\u6761 ${e==="codex-history"?"Codex":e==="opencode-history"?"OpenCode":e==="qoder-history"?"Qoder":e==="claude-history"?"Claude":"Wand"} \u4F1A\u8BDD\u5417\uFF1F`,{title:"\u5220\u9664\u4F1A\u8BDD"}).then(r=>{if(r)return e==="codex-history"?sM(t):e==="claude-history"?nM(t,null):e==="opencode-history"?pC("opencode",t):e==="qoder-history"?pC("qoder",t):rM(t)})}function AJ(e){m.sessionTool=e,m.preferredCommand=e}function yT(e){return AJ(e),OM()}function $$e(){return AJ("claude"),EC().then(e=>(Xl(!0),e))}function D$e(e){let t=m.sessions.find(n=>n.id===m.selectedId);if(e==="cwd")return mw("cwd","\u5DE5\u4F5C\u76EE\u5F55\u5DF2\u590D\u5236");if(e==="sessionId")return mw("id","\u4F1A\u8BDD ID \u5DF2\u590D\u5236");let r=t?.provider;return mw("claudeSessionId",r==="codex"?"Codex thread ID \u5DF2\u590D\u5236":r==="opencode"?"OpenCode session ID \u5DF2\u590D\u5236":r==="grok"?"Grok \u4F1A\u8BDD ID \u5DF2\u590D\u5236":r==="qoder"?"Qoder \u4F1A\u8BDD ID \u5DF2\u590D\u5236":"Claude \u4F1A\u8BDD ID \u5DF2\u590D\u5236")}function A$e(){return{goHome:vc,refreshPage:()=>window.location.reload(),terminalDisplay:e=>{e==="zoom-in"?vm(.25):e==="zoom-out"?vm(-.25):e==="reset"?xw(1):(aC(),Em({preserveStickState:!0}),cc(!0))},openNewSession:e=>SC(e),openMissions:()=>{wf.open()},openNewProject:e=>SC(e),quickStartClaudeTerminal:()=>yT("claude"),quickStartCodexTerminal:()=>yT("codex"),quickStartOpenCodeTerminal:()=>yT("opencode"),quickStartStructuredSession:$$e,selectSession:(e,t)=>{let r=An(e,t);return Ei(),r},resumeSession:e=>iM(e).then(t=>(Ei(),t)),resumeHistory:(e,t,r)=>oM(e,t,r),deleteItem:F$e,mergeSession:NM,cleanupSession:PM,toggleManageMode:cM,toggleManagedSelection:(e,t)=>fM(S$e(e),t),selectAllManaged:dM,clearManagedSelection:pM,deleteManagedSelection:mM,toggleSessionsDrawer:TM,openSessionsDrawer:_M,closeSessionsDrawer:Wg,toggleSidebarPin:jM,toggleSidebarCollapsed:CC,expandSidebarGroup:e=>{Qr(e==="automation"?"wand-automation-sessions-expanded":"wand-non-wand-sessions-expanded",!0),CC()},setSidebarGroupExpanded:(e,t)=>{Qr(e==="automation"?"wand-automation-sessions-expanded":"wand-non-wand-sessions-expanded",t)},toggleFilePanel:hM,closeFilePanel:gM,openFolderPicker:()=>{y$e()},toggleTopbarMenu:()=>{m.topbarMoreOpen=!m.topbarMoreOpen},copyTopbarField:D$e,openGitCommit:VI,openSettings:RM,backToNative:CM,switchServer:vC,logout:SM}}function B$e(e){return{openFiles(){return e.isReady()?(e.setFilePanelOpen(!0),!0):!1},getCloseState(){return e.isSavingFile()?"busy":e.hasUnsavedFiles()?"unsaved":"ready"},getSelectedSessionId(){return e.isReady()?e.getSelectedSessionId():""}}}var kJ=null;function I$e(){kJ||(kJ=C$({onOpen(){ki(["missions"]),Ei()},onClose(){},effectiveCwd:ps,async openSession(e){await Ci({skipSelectedOutputReload:!0}),m.sessions.some(t=>t.id===e)&&(An(e),Ei())}}))}function M$e(e,t){let r=new Map;function n(d){let p=r.get(d);return p||(p={epoch:0,automaticBlocked:!1},r.set(d,p)),p}async function a(d,p){let h=await e.getTask(d);if(h.id!==d)throw new Error("\u4EFB\u52A1\u8BE6\u60C5\u4E0E\u8BF7\u6C42\u4E0D\u5339\u914D\u3002");return p.revision=h.layoutRevision??0,h}function o(d,p){d.pending?.resolve(p),d.pending=void 0}async function l(d,p){for(;p.pending;){let h=p.pending;p.pending=void 0;try{p.revision===void 0&&await a(d,p);let v=await e.saveTaskLayout(d,h.layout,p.revision);p.revision=v.layoutRevision,h.automatic||(p.automaticBlocked=!1),t.onSaved(d,v.layoutRevision),h.resolve("saved")}catch(v){let g=p.epoch,b=h.automatic&&v instanceof Pa&&v.status===409;p.automaticBlocked=!b,o(p,"failed"),p.revision=void 0,b||t.onError(d,v);try{let x=await a(d,p);p.epoch===g&&t.onRestore(d,x)}catch{}h.resolve("failed")}}}function u(d,p){p.running||(p.running=l(d,p).finally(()=>{p.running=void 0,p.pending&&u(d,p)}))}return{remember(d,p){let h=n(d);h.running||(h.revision=p??0)},canSaveAutomatically(d){return!r.get(d)?.automaticBlocked},save(d,p,h={}){let v=n(d);if(h.automatic&&v.automaticBlocked)return Promise.resolve("failed");v.epoch++,o(v,"superseded");let g=new Promise(b=>{v.pending={layout:p,resolve:b,automatic:h.automatic===!0}});return u(d,v),g},isSaving(d){return!!r.get(d)?.running},async flush(d){let p=r.get(d);for(;p?.running;)await p.running}}}var CJ=null,Nw=0;function Am(){return Xr.getSnapshot().taskId}var Dm=M$e(mn,{onSaved(e,t){Am()===e&&Sl({layoutRevision:t})},onError(e,t){let r=t instanceof Error?t.message:"\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5\u3002";Qe(`\u4EFB\u52A1 ${e} \u7684\u5E03\u5C40\u672A\u4FDD\u5B58\uFF1A${r}`,"danger")},onRestore(e,t){if(Am()!==e)return;let r=Df(t.sessions).map(u=>u.id),n=Ts(t.layout),a=n?.kind==="session"?n.sessionId:r[0],o=Uu(t.layout,r,a);$f(o)?.layout.type!=="split"&&gw();let l=Ts(o);l?.kind==="session"?An(l.sessionId):vc(),Sl({layout:o,layoutRevision:t.layoutRevision})}});function wT(e,t,r){return r?.automatic&&!Dm.canSaveAutomatically(e)?Promise.resolve("failed"):(Am()===e&&($f(t)?.layout.type!=="split"&&gw(),Sl({layout:t})),Dm.save(e,t,r))}function T$e(){if(CJ)return;let e=Ds(()=>{let r=Am();r&&Dm.flush(r).then(async()=>{let n=await As.reload(r);Am()===r&&(Dm.remember(r,n.layoutRevision),Sl({taskName:n.name,cwd:n.cwd,workspaceId:n.workspaceId,layout:n.layout,layoutRevision:n.layoutRevision}))}).catch(()=>{})}),t=kD({onOpen(){ki(["workspaces"]),Ei()},onClose(){},effectiveCwd:ps,openWorkspace(r){++Nw,Tg(null),Sl({workspaceId:r.id,workspaceName:r.name,taskId:null,taskName:"",cwd:r.cwd,provider:r.defaultProvider,layout:null}),Ua("workspace:open"),vc(),Ei()},closeWorkspace(){++Nw,Tg(null),yD(),Ua("workspace:close")},refreshSessions:Ql,selectSession(r){An(r),Ei()},async openTask(r){let n=++Nw,a=r.preferredSessionId||m.selectedId;Tg(r.taskId),Sl({workspaceId:r.workspaceId,workspaceName:r.workspaceName,taskId:r.taskId,taskName:r.taskName,cwd:r.cwd,provider:r.provider,layout:null,layoutRevision:void 0}),Ua("workspace:open"),vc({updateRoute:!r.restoreRoute});let o=Dm.isSaving(r.taskId);if(await Dm.flush(r.taskId),!(n!==Nw||r.navigationCurrent?.()===!1))return(o?As.reload(r.taskId):As.load(r.taskId)).then(l=>{if(n!==Nw||r.navigationCurrent?.()===!1)return;let u=Df(l.sessions).map(g=>g.id),d=Ts(l.layout),p=a&&u.includes(a)?a:d?.kind==="session"&&u.includes(d.sessionId)?d.sessionId:u[0],h=u.length>0?Uu(l.layout,u,p):Uu(l.layout,[],null),v=Ts(h);v?.kind==="session"&&An(v.sessionId,{updateRoute:!r.restoreRoute}),Dm.remember(r.taskId,l.layoutRevision),Sl({layout:h,layoutRevision:l.layoutRevision}),!r.restoreRoute&&JSON.stringify(h)!==JSON.stringify(l.layout)&&wT(r.taskId,h,{automatic:!0}),Ei()}).catch(()=>{})},newTaskSession(r){return Promise.resolve(zM(r.cwd,{workspaceId:r.workspaceId,workspaceTaskId:r.taskId,shell:r.target==="shell",provider:KM(r.target)||void 0,engine:XM(r.target),kind:r.target==="shell"?"pty":r.kind??"structured",model:r.model,employeeId:r.employeeId,initialInput:r.prompt})).then(async n=>{let a=typeof n=="string"&&n?n:n&&typeof n=="object"&&"id"in n&&typeof n.id=="string"&&n.id?n.id:void 0;if(a){if(!r.taskId)return Ui(),a;if(await As.reload(r.taskId).catch(()=>{}),Am()===r.taskId){let o=Xr.getSnapshot().layout,l=o?o.windows.flatMap(d=>Co(d.layout)):[],u=Uu(o,[...l,a],a);wT(r.taskId,u)}return Ui(),a}})},startWorktreeMergeAgent(r){return Nr(`/api/workspaces/${encodeURIComponent(r.workspaceId)}/worktree-merge-agent`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({prompt:r.prompt,systemPrompt:r.systemPrompt})}).then(function(n){return n.json()}).then(function(n){if(n.error)throw new Error(n.error);return op(n.id,!0),Kt(n),Promise.resolve(An(n.id)).then(function(){return n})})},saveTaskLayout(r,n){let a=Am();if(a)return wT(a,r,n)},async closeTaskSessions(r,n){let a=[...new Set(r.filter(Boolean))];if(a.length===0)return!0;let o=n==="window";if(!await ww(o&&a.length>1?`\u5173\u95ED\u8FD9\u4E2A\u5DE5\u4F5C\u7A97\u53E3\uFF1F\u5176\u4E2D\u7684 ${a.length} \u4E2A\u7EC8\u7AEF\u4F1A\u8BDD\u4F1A\u7ED3\u675F\u5E76\u88AB\u5220\u9664\u3002`:"\u5173\u95ED\u8FD9\u4E2A\u7EC8\u7AEF\uFF1F\u5F53\u524D\u4F1A\u8BDD\u4F1A\u7ED3\u675F\u5E76\u88AB\u5220\u9664\u3002",{title:o?"\u5173\u95ED\u5DE5\u4F5C\u7A97\u53E3":"\u5173\u95ED\u7EC8\u7AEF",okLabel:"\u5173\u95ED"}))return!1;try{return await mn.deleteSessions(a),a.forEach(l=>jg(l)),await Ci({preserveNoSelection:!0}),!0}catch(l){return await Ci({preserveNoSelection:!0}).catch(()=>{}),Qe(l instanceof Error?l.message:"\u65E0\u6CD5\u5173\u95ED\u7EC8\u7AEF\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002","danger"),!1}},mountSessionTerminal(r,n){return iC(r,n)},unmountSessionTerminal(r){jg(r)},getSessionTerminalScale(r){return lm(r)},setSessionTerminalScale(r,n){return rw(r,n)},disposeAllSessionTerminals(){gw()},modelPreference(r){return el(r)||""},rememberModelPreference(r,n){kw(r,n||"")},toast(r,n){Qe(r,n)}});CJ=()=>{e(),t()}}var SJ=!1,Bm=!1,Qg=0,ET=0,jC=!1,kT=!1,Rw="";function Pw(){let e=new URLSearchParams(hn());return JSON.stringify(["view","session","workspace","workspaceTask","window","tab"].map(t=>e.get(t)))}function CT(e="push",t=!1){!Bm||Qg&&!t||jC||(jC=!0,queueMicrotask(()=>{if(jC=!1,!Bm||Qg&&!t)return;let r=Xr.getSnapshot(),n=r.layout?.windows.find(l=>l.id===r.layout?.activeWindowId),a=new URLSearchParams(hn());kT=!0;let o=e==="push"?T$(hn(),m.selectedId||null):e;Qn({...a.has("view")?{}:{view:"workspace"},session:m.selectedId||null,workspace:r.workspaceId,workspaceTask:r.taskId,window:n?.id??null,tab:n?.activeTabId??null},o),kT=!1,Rw=Pw()}))}async function FJ(){if(!Ou()){Bm=!0;let o=Ir.getSnapshot();return o.active===!0||o.directory?(Qn({view:o.directory?"contacts":"chats",sidebar:o.mode,conversation:o.selectedId,chatRuntime:o.listRuntime,chatTaskStage:o.listTaskStage,chatWorkspace:o.listWorkspace,chatFilter:o.listFilter,chatActivity:String(o.activityOnly),chatQuery:o.filters["list-query"]??""},"replace"),Rw=Pw()):CT("replace"),!1}let e=++ET,t=Pw();Rw=t;let r=new URLSearchParams(hn()),n=va.getRuntime();if(!n)return!0;Qg++,cw("");let a=()=>e===ET&&Pw()===t;try{let o=r.get("session"),l=r.get("workspace"),u=r.get("window"),d=r.get("tab"),p=o?m.sessions.find(v=>v.id===o):null;if(o&&!p)throw new Error("\u94FE\u63A5\u4E2D\u7684\u4F1A\u8BDD\u4E0D\u5B58\u5728\u3001\u5DF2\u5220\u9664\u6216\u65E0\u6743\u8BBF\u95EE\u3002");let h=r.get("workspaceTask")||p?.workspaceTaskId;if((u||d)&&!h)throw new Error("\u7A97\u53E3\u94FE\u63A5\u7F3A\u5C11\u6240\u5C5E\u4EFB\u52A1\uFF0C\u8BF7\u8FD4\u56DE\u5DE5\u4F5C\u533A\u91CD\u65B0\u9009\u62E9\u3002");if(h){let v=await mn.getTask(h);if(!a())return!0;if(l&&v.workspaceId!==l)throw new Error("\u94FE\u63A5\u4E2D\u7684\u4EFB\u52A1\u4E0D\u5C5E\u4E8E\u6307\u5B9A\u5DE5\u4F5C\u533A\u3002");if(p&&p.workspaceTaskId!==h)throw new Error("\u94FE\u63A5\u4E2D\u7684\u4F1A\u8BDD\u4E0D\u5C5E\u4E8E\u6307\u5B9A\u4EFB\u52A1\u3002");if(await n.openTask({workspaceId:v.workspaceId,workspaceName:"",taskId:v.id,taskName:v.name,cwd:v.cwd,preferredSessionId:o||void 0,restoreRoute:!0,navigationCurrent:a}),!a())return!0;let g=Xr.getSnapshot().layout;if(g&&u){let x=g.windows.find(y=>y.id===u);if(!x)throw new Error("\u94FE\u63A5\u4E2D\u7684\u7A97\u53E3\u5DF2\u5173\u95ED\u6216\u4E0D\u5B58\u5728\u3002");if(d&&!kl(x.layout,d))throw new Error("\u94FE\u63A5\u4E2D\u7684\u7A97\u683C\u5DF2\u5173\u95ED\u6216\u4E0D\u5B58\u5728\u3002");if(o&&!Co(x.layout).includes(o))throw new Error("\u94FE\u63A5\u4E2D\u7684\u4F1A\u8BDD\u4E0D\u5728\u6307\u5B9A\u7A97\u53E3\u5185\u3002");g={...g,activeWindowId:u,windows:g.windows.map(y=>y.id===u&&d?{...y,activeTabId:d}:y)},Sl({layout:g})}let b=Ts(g);o?await An(o,{focusInput:!1,updateRoute:!1}):b?.kind==="session"?await An(b.sessionId,{focusInput:!1,updateRoute:!1}):vc({updateRoute:!1})}else{if(dw(()=>n.closeWorkspace()),l){let v=await mn.list();if(!a())return!0;let g=v.find(b=>b.id===l);if(!g)throw new Error("\u94FE\u63A5\u4E2D\u7684\u5DE5\u4F5C\u533A\u4E0D\u5B58\u5728\u3001\u5DF2\u5220\u9664\u6216\u65E0\u6743\u8BBF\u95EE\u3002");if(p&&p.workspaceId!==l)throw new Error("\u94FE\u63A5\u4E2D\u7684\u4F1A\u8BDD\u4E0D\u5C5E\u4E8E\u6307\u5B9A\u5DE5\u4F5C\u533A\u3002");dw(()=>n.openWorkspace(g))}o?await An(o,{focusInput:!1,updateRoute:!1}):vc({updateRoute:!1})}}catch(o){a()&&(dw(()=>n.closeWorkspace()),vc({updateRoute:!1}),cw(o instanceof Error?o.message:"\u94FE\u63A5\u76EE\u6807\u8BFB\u53D6\u5931\u8D25\uFF0C\u8BF7\u8FD4\u56DE\u5DE5\u4F5C\u533A\u91CD\u8BD5\u3002"))}finally{Qg--,Bm=!0}return!0}function _$e(){SJ||(SJ=!0,SI(()=>{(Qg||!Bm)&&(ET++,Bm=!0),CT("push",!0)}),FI(FJ),Xr.subscribe(()=>CT()),yi(()=>{let e=Pw();!Bm&&!Qg||kT||e===Rw||(Rw=e,!jC&&FJ())}))}j3({ready:()=>!!m.config&&!m.pageUnloading,version:()=>String(m.config?.currentVersion||m.config?.packageVersion||"0.0.0"),secure:()=>window.location.protocol==="https:"||["localhost","127.0.0.1","[::1]"].includes(window.location.hostname),fetch:(e,t)=>globalThis.fetch(e,t)});N3(window);x$e();C$e();RI(A$e());window.__wandDesktopTools=B$e({isReady:sC,setFilePanelOpen:Og,hasUnsavedFiles:()=>O1.hasDirty()||em.getSnapshot().dirty,isSavingFile:()=>_d.getSnapshot().saving||em.getSnapshot().saving,getSelectedSessionId:()=>m.selectedId||""});(function(){try{var e=navigator&&navigator.userAgent||"";/WandApp\//.test(e)&&document.documentElement.classList.add("is-wand-app"),/WandPlatform\/iOS/.test(e)&&document.documentElement.classList.add("is-wand-ios"),/WandPlatform\/Android/.test(e)&&document.documentElement.classList.add("is-wand-android"),/WandPlatform\/macOS/.test(e)&&document.documentElement.classList.add("is-wand-macos")}catch{}try{let t=new URL(window.location.href).searchParams;t.get("embed")==="terminal"&&(document.documentElement.classList.add("is-wand-embed-terminal"),t.get("nativeInput")==="1"&&document.documentElement.classList.add("is-wand-native-input"),t.get("passthrough")==="1"&&document.documentElement.classList.add("is-wand-terminal-passthrough"))}catch{}try{window.__wandNativeBackHooked=!0}catch{}try{window.__wandConfigPath=eI}catch{}})();g$e();k$e();I$e();T$e();_$e();w$e();kM({getSession(e){return m.sessions.find(t=>t.id===e)??null},refreshSessions(){return Ql()},toast(e,t){Qe(e,t)}});(function(){try{window.__openLocalPreview=e=>ew(String(e??""))}catch{}})();HI({getSiblings(e){let t=UM.getSnapshot(),r=t.expanded.get(Jl(e))??t.expanded.get(t.activeDir);return r?r.entries:[]},confirmDiscard(e){let t=e==="replace";return km({type:"warning",title:t?"\u5207\u6362\u9884\u89C8\u6587\u4EF6\uFF1F":"\u653E\u5F03\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\uFF1F",message:t?"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5207\u6362\u540E\u4F1A\u4E22\u5931\u3002":e==="exit-edit"?"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u9000\u51FA\u7F16\u8F91\u540E\u4F1A\u4E22\u5931\u3002":"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5173\u95ED\u540E\u4F1A\u4E22\u5931\u3002",buttons:[{label:"\u7EE7\u7EED\u7F16\u8F91",value:!1,kind:"secondary",autofocus:!0},{label:"\u653E\u5F03\u4FEE\u6539",value:!0,kind:"danger"}],cancelValue:!1}).then(r=>r===!0)},copyText:bM,appendToComposer:vM,notify(e,t){Qe(e,t)},onSaved(){return WM.execute({type:"refresh"}).then(function(){})}});export{B6 as shared100_a,_be as shared100_b,Bd as shared101_a,Nbe as shared102_a,Pbe as shared102_b,Id as shared102_c,Rbe as shared102_d,XD as shared102_e,zbe as shared103_a,Lbe as shared103_b,Hbe as shared103_c,A1 as shared103_d,Wbe as shared104_a,Rf as shared104_b,Yi as shared105_a,za as shared105_b,_1 as shared106_a,P6 as shared106_b,R6 as shared106_c,j1 as shared106_d,N6 as shared106_e,M1 as shared106_f,t1e as shared106_g,zf as shared106_h,oA as shared106_i,YD as shared107_a,JD as shared108_a,q0 as shared108_b,_6 as shared109_a,U0 as shared109_b,B1 as shared109_c,$U as shared109_d,aA as shared109_e,DU as shared109_f,I1 as shared109_g,Gbe as shared109_h,Kbe as shared109_i,Xbe as shared109_j,iA as shared109_k,Wp as shared10_a,vb as shared10_b,RF as shared10_c,jz as shared10_d,OF as shared10_e,Bz as shared10_f,_se as shared10_g,jse as shared10_h,Nse as shared10_i,Pse as shared10_j,Rse as shared10_k,go as shared10_l,zF as shared10_m,LF as shared10_n,a1e as shared110_a,sA as shared110_b,i1e as shared110_c,o1e as shared110_d,s1e as shared110_e,l1e as shared110_f,lA as shared110_g,E1e as shared111_a,RU as shared111_b,O1 as shared111_c,_d as shared111_d,cA as shared112_a,pA as shared112_b,f1e as shared112_c,O6 as shared112_d,z6 as shared112_e,fA as shared112_f,mA as shared112_g,R1 as shared112_h,Y0 as shared112_i,m1e as shared112_j,h1e as shared112_k,g1e as shared112_l,hA as shared112_m,gA as shared112_n,y1e as shared112_o,L6 as shared112_p,vA as shared112_q,Hf as shared113_a,Lf as shared113_b,Q0 as shared113_c,P1 as shared113_d,Os as shared113_e,H1 as shared114_a,J0 as shared114_b,Z0 as shared114_c,yA as shared114_d,wA as shared114_e,xA as shared114_f,EA as shared115_a,kA as shared115_b,T1e as shared115_c,q1 as shared116_a,Tl as shared116_b,q6 as shared116_c,W1 as shared117_a,zn as shared117_b,_l as shared117_c,Ir as shared118_a,Wf as shared118_b,uye as shared118_c,Nd as shared119_a,zs as shared119_b,eg as shared119_c,DA as shared119_d,AA as shared119_e,U1 as shared119_f,K6 as shared119_g,X6 as shared119_h,Q6 as shared119_i,Y6 as shared119_j,BA as shared119_k,IA as shared119_l,MA as shared119_m,bb as shared11_a,V6 as shared120_a,G1e as shared120_b,K1e as shared120_c,G6 as shared120_d,X1e as shared120_e,Q1e as shared120_f,Y1e as shared120_g,$A as shared120_h,UU as shared120_i,eye as shared120_j,tye as shared120_k,rye as shared120_l,nye as shared120_m,aye as shared120_n,tE as shared121_a,Mye as shared121_b,RA as shared121_c,Od as shared121_d,tg as shared121_e,NA as shared121_f,gye as shared121_g,eE as shared121_h,_A as shared121_i,bye as shared121_j,yye as shared121_k,Uf as shared121_l,tV as shared121_m,kye as shared121_n,Cye as shared121_o,Sye as shared121_p,Dye as shared121_q,rg as shared121_r,PA as shared121_s,nV as shared121_t,Aye as shared121_u,V1 as shared122_a,Pd as shared122_b,KU as shared122_c,Rd as shared122_d,Xu as shared122_e,TA as shared122_f,pye as shared122_g,Ld as shared123_a,OA as shared123_b,zA as shared123_c,UA as shared124_a,oV as shared125_a,nE as shared125_b,HA as shared126_a,qA as shared126_b,mg as shared127_a,b9 as shared127_b,dy as shared128_a,oy as shared129_a,Wd as shared129_b,Ud as shared129_c,dg as shared129_d,ny as shared129_e,ry as shared129_f,iy as shared129_g,Up as shared12_a,qh as shared12_b,Gf as shared130_a,c9 as shared131_a,sy as shared132_a,wE as shared133_a,xE as shared133_b,gg as shared133_c,EE as shared133_d,C9 as shared133_e,S9 as shared133_f,w9 as shared134_a,B9 as shared135_a,Ws as shared135_b,em as shared135_c,M9 as shared135_d,Ol as shared136_a,kE as shared137_a,MFe as shared138_a,TFe as shared139_a,Jl as shared139_b,_Fe as shared139_c,HM as shared139_d,WM as shared139_e,UM as shared139_f,id as shared13_a,GM as shared140_a,OFe as shared141_a,zFe as shared141_b,KM as shared142_a,XM as shared142_b,tJ as shared143_a,oJ as shared143_b,sJ as shared143_c,lJ as shared143_d,uJ as shared143_e,cJ as shared143_f,pJ as shared143_g,dJ as shared143_h,YM as shared144_a,UY as shared145_a,JM as shared145_b,Iw as shared146_a,BC as shared146_b,tT as shared147_a,VY as shared148_a,ZM as shared148_b,Mw as shared149_a,Wo as shared14_a,ml as shared14_b,VF as shared14_c,xb as shared14_d,Gp as shared14_e,Kp as shared14_f,GF as shared14_g,dT as shared150_a,k3e as shared151_a,qr as shared15_a,Vp as shared15_b,yb as shared15_c,wb as shared15_d,WF as shared15_e,n2 as shared15_f,Wh as shared15_g,Uh as shared15_h,Vh as shared15_i,Gh as shared15_j,Zx as shared15_k,e2 as shared15_l,t2 as shared15_m,r2 as shared15_n,Ho as shared15_o,qo as shared15_p,Kh as shared15_q,qz as shared15_r,Fu as shared15_s,Yh as shared16_a,Cb as shared16_b,od as shared16_c,iue as shared16_d,Du as shared16_e,n7 as shared16_f,s2 as shared16_g,Sb as shared16_h,Xp as shared17_a,_n as shared18_a,Fb as shared19_a,nC as shared1_$,eY as shared1_$a,_Y as shared1_$b,Ua as shared1_A,nM as shared1_Aa,EC as shared1_Ab,Nr as shared1_B,iM as shared1_Ba,Kt as shared1_Bb,tI as shared1_C,oM as shared1_Ca,pc as shared1_Cb,zxe as shared1_D,pC as shared1_Da,Ci as shared1_Db,Vxe as shared1_E,sM as shared1_Ea,An as shared1_Eb,MK as shared1_F,Xl as shared1_Fa,vc as shared1_Fb,_y as shared1_G,cM as shared1_Ga,ym as shared1_Gb,Xxe as shared1_H,dM as shared1_Ha,TM as shared1_Hb,nI as shared1_I,pM as shared1_Ia,_M as shared1_Ib,aI as shared1_J,fM as shared1_Ja,Wg as shared1_Jb,Yxe as shared1_K,ww as shared1_Ka,Ei as shared1_Kb,Jxe as shared1_L,mM as shared1_La,CC as shared1_Lb,PK as shared1_M,Og as shared1_Ma,jM as shared1_Mb,t2e as shared1_N,hM as shared1_Na,SC as shared1_Nb,r2e as shared1_O,gM as shared1_Oa,NM as shared1_Ob,n2e as shared1_P,vm as shared1_Pa,PM as shared1_Pb,jY as shared1_Q,xw as shared1_Qa,RM as shared1_Qb,ki as shared1_R,vM as shared1_Ra,CY as shared1_Rb,vX as shared1_S,bM as shared1_Sa,Yl as shared1_Sb,bX as shared1_T,X8e as shared1_Ta,Fw as shared1_Tb,yX as shared1_U,wM as shared1_Ua,OM as shared1_Ub,SI as shared1_V,fC as shared1_Va,zM as shared1_Vb,dw as shared1_W,J8e as shared1_Wa,op as shared1_Wb,FI as shared1_X,Xs as shared1_Xa,bc as shared1_Xb,Tg as shared1_Y,e4e as shared1_Ya,TY as shared1_Yb,BI as shared1_Z,GQ as shared1_Za,SFe as shared1_Zb,ew as shared1__,t4e as shared1__a,$Fe as shared1__b,$K as shared1_a,mw as shared1_aa,tY as shared1_ab,At as shared1_b,xke as shared1_ba,p4e as shared1_bb,oc as shared1_c,Eke as shared1_ca,f4e as shared1_cb,eI as shared1_d,aC as shared1_da,EM as shared1_db,Qr as shared1_e,Ys as shared1_ea,zg as shared1_eb,m as shared1_f,_g as shared1_fa,h4e as shared1_fb,DK as shared1_g,lm as shared1_ga,mc as shared1_gb,Sy as shared1_h,rw as shared1_ha,CFe as shared1_hb,ek as shared1_i,iC as shared1_ia,wEe as shared1_ib,AK as shared1_j,jg as shared1_ja,CI as shared1_jb,Oxe as shared1_k,gw as shared1_ka,Jy as shared1_kb,cw as shared1_l,Ng as shared1_la,bEe as shared1_lb,sI as shared1_m,RI as shared1_ma,fX as shared1_mb,lI as shared1_n,sC as shared1_na,cc as shared1_nb,Jk as shared1_o,Em as shared1_oa,kM as shared1_ob,uI as shared1_p,ps as shared1_pa,Lg as shared1_pb,cI as shared1_q,Qe as shared1_qa,Hg as shared1_qb,dI as shared1_r,km as shared1_ra,Wk as shared1_rb,pI as shared1_s,RB as shared1_sa,vC as shared1_sb,fI as shared1_t,HI as shared1_ta,CM as shared1_tb,mI as shared1_u,Sm as shared1_ua,SM as shared1_ub,hI as shared1_v,VI as shared1_va,Ql as shared1_vb,gI as shared1_w,Pg as shared1_wa,O4e as shared1_wb,vI as shared1_x,Fm as shared1_xa,el as shared1_xb,yI as shared1_y,Ks as shared1_ya,kw as shared1_yb,Kl as shared1_z,rM as shared1_za,Cw as shared1_zb,Bb as shared20_a,n0 as shared20_b,LL as shared20_c,Zp as shared20_d,a0 as shared20_e,f2 as shared20_f,m2 as shared20_g,ef as shared20_h,w7 as shared20_i,Ma as shared20_j,Zh as shared21_a,NL as shared21_b,Jp as shared21_c,rt as shared22_a,F7 as shared22_b,$7 as shared22_c,D7 as shared22_d,tf as shared23_a,h2 as shared23_b,Li as shared23_c,B7 as shared24_a,ia as shared25_a,vl as shared26_a,w2 as shared27_a,H7 as shared27_b,dH as shared28_a,q7 as shared28_b,Go as shared29_a,O7 as shared2_a,z7 as shared2_b,L7 as shared2_c,hH as shared30_a,mpe as shared30_b,U7 as shared30_c,W7 as shared31_a,vi as shared31_b,Hi as shared31_c,et as shared32_a,S0e as shared33_a,a$ as shared33_b,D0e as shared33_c,i$ as shared33_d,o$ as shared33_e,s$ as shared33_f,e$ as shared34_a,pW as shared34_b,l0e as shared34_c,u0e as shared34_d,c0e as shared34_e,Y3 as shared34_f,d0e as shared34_g,p0e as shared34_h,f0e as shared34_i,m0e as shared34_j,t$ as shared34_k,h0e as shared34_l,Z2 as shared34_m,e6 as shared34_n,a1 as shared34_o,i1 as shared34_p,o1 as shared34_q,n1 as shared34_r,s1 as shared34_s,wW as shared34_t,C0e as shared34_u,B3 as shared35_a,qq as shared35_b,I3 as shared35_c,H2 as shared36_A,rhe as shared36_B,D3 as shared36_C,E0 as shared36_D,Wb as shared36_E,Oq as shared36_F,Zb as shared36_G,W2 as shared36_H,zq as shared36_I,Lq as shared36_J,U2 as shared36_K,V2 as shared36_L,Hq as shared36_M,fhe as shared36_N,A3 as shared36_O,Ub as shared36_a,Cq as shared36_b,Rme as shared36_c,x3 as shared36_d,Sq as shared36_e,Fq as shared36_f,Dq as shared36_g,k3 as shared36_h,f3 as shared36_i,m3 as shared36_j,zme as shared36_k,Hme as shared36_l,C3 as shared36_m,S3 as shared36_n,Vb as shared36_o,hd as shared36_p,Gb as shared36_q,Kb as shared36_r,Xb as shared36_s,Qb as shared36_t,q2 as shared36_u,x0 as shared36_v,F3 as shared36_w,Yb as shared36_x,Jb as shared36_y,Aq as shared36_z,rf as shared37_a,x2 as shared37_b,E2 as shared37_c,hpe as shared37_d,Xo as shared38_a,Iu as shared39_a,k2 as shared39_b,G7 as shared39_c,C2 as shared39_d,K7 as shared39_e,bl as shared39_f,jb as shared39_g,Ko as shared39_h,Nb as shared39_i,Mu as shared39_j,o0 as shared39_k,s0 as shared39_l,nf as shared39_m,X7 as shared39_n,Tu as shared39_o,S2 as shared39_p,F2 as shared39_q,$2 as shared39_r,D2 as shared39_s,A2 as shared39_t,Fpe as shared39_u,pb as shared3_a,CF as shared3_b,Be as shared3_c,Yo as shared40_a,gH as shared41_a,af as shared41_b,Dpe as shared41_c,Ipe as shared41_d,Q7 as shared41_e,m0 as shared42_a,bi as shared42_b,Pb as shared43_a,ud as shared43_b,cd as shared43_c,of as shared43_d,l0 as shared43_e,sf as shared43_f,I2 as shared43_g,$n as shared43_h,EH as shared43_i,fd as shared44_A,Xn as shared44_B,Bt as shared44_C,Lb as shared44_D,LH as shared44_E,Ype as shared44_a,J7 as shared44_b,nfe as shared44_c,qH as shared44_d,cfe as shared44_e,pfe as shared44_f,r3 as shared44_g,n3 as shared44_h,d0 as shared44_i,p0 as shared44_j,_H as shared44_k,jH as shared44_l,NH as shared44_m,Za as shared44_n,TH as shared44_o,cf as shared44_p,_2 as shared44_q,f0 as shared44_r,dd as shared44_s,Ob as shared44_t,Kn as shared44_u,PH as shared44_v,M2 as shared44_w,xo as shared44_x,Ife as shared44_y,pd as shared44_z,qi as shared45_a,Wi as shared46_a,b0 as shared47_a,_a as shared47_b,bq as shared47_c,K3 as shared48_a,t1 as shared48_b,r1 as shared48_c,X3 as shared48_d,Q3 as shared48_e,C0 as shared49_a,Khe as shared49_b,Xhe as shared49_c,Qhe as shared49_d,Yhe as shared49_e,tW as shared49_f,Jhe as shared49_g,rW as shared49_h,nW as shared49_i,aW as shared49_j,mf as shared49_k,r0e as shared49_l,n0e as shared49_m,Nu as shared49_n,Y2 as shared49_o,iW as shared49_p,o0e as shared49_q,Ja as shared4_$,Lx as shared4_$a,rb as shared4_A,qx as shared4_Aa,xe as shared4_Ab,nb as shared4_B,yF as shared4_Ba,Dx as shared4_C,Oo as shared4_Ca,_te as shared4_D,wu as shared4_Da,Ax as shared4_E,xu as shared4_Ea,yn as shared4_F,lb as shared4_Fa,Da as shared4_G,Zc as shared4_Ga,ed as shared4_H,ub as shared4_Ha,Lr as shared4_I,Hx as shared4_Ia,Lt as shared4_J,vt as shared4_Ja,pF as shared4_K,jO as shared4_Ka,Vt as shared4_L,hi as shared4_La,Ya as shared4_M,Ih as shared4_Ma,Zte as shared4_N,ib as shared4_Na,Er as shared4_O,Jc as shared4_Oa,Cx as shared4_P,Ar as shared4_Pa,Ni as shared4_Q,Bh as shared4_Qa,mi as shared4_R,hx as shared4_Ra,td as shared4_S,Ch as shared4_Sa,er as shared4_T,Rx as shared4_Ta,Xa as shared4_U,Ox as shared4_Ua,iF as shared4_V,zx as shared4_Va,oF as shared4_W,Mh as shared4_Wa,kie as shared4_X,ob as shared4_Xa,ra as shared4_Y,Op as shared4_Ya,en as shared4_Z,sb as shared4_Za,Gn as shared4__,_p as shared4__a,Y as shared4_a,Ct as shared4_aa,Aa as shared4_ab,eF as shared4_b,pr as shared4_ba,ct as shared4_bb,Sh as shared4_c,ore as shared4_ca,wF as shared4_cb,nF as shared4_d,fF as shared4_da,_h as shared4_db,lte as shared4_e,ab as shared4_ea,wn as shared4_eb,OR as shared4_f,Ue as shared4_fa,nd as shared4_fb,Ut as shared4_g,g4 as shared4_ga,PO as shared4_gb,xt as shared4_h,Et as shared4_ha,EF as shared4_hb,Ka as shared4_i,oO as shared4_ia,OO as shared4_ib,aF as shared4_j,Dh as shared4_ja,bu as shared4_jb,sr as shared4_k,Yc as shared4_ka,Dae as shared4_kb,qR as shared4_l,mF as shared4_la,Lp as shared4_lb,qt as shared4_m,st as shared4_ma,mz as shared4_mb,br as shared4_n,wt as shared4_na,Ux as shared4_nb,Fh as shared4_o,rd as shared4_oa,Ba as shared4_ob,mte as shared4_p,Eh as shared4_pa,jh as shared4_pb,pl as shared4_q,ue as shared4_qa,cb as shared4_qb,$h as shared4_r,_x as shared4_ra,Wx as shared4_rb,KR as shared4_s,pO as shared4_sa,Fr as shared4_sb,pn as shared4_t,Dt as shared4_ta,Vx as shared4_tb,Qa as shared4_u,fl as shared4_ua,fz as shared4_ub,yu as shared4_v,Mt as shared4_va,Ia as shared4_vb,Sx as shared4_w,zp as shared4_wa,Nh as shared4_wb,Pi as shared4_x,Th as shared4_xa,ioe as shared4_xb,QR as shared4_y,gi as shared4_ya,ad as shared4_yb,$x as shared4_z,Tn as shared4_za,xn as shared4_zb,j3 as shared50_a,_u as shared50_b,N3 as shared50_c,Pa as shared50_d,P3 as shared50_e,It as shared50_f,mt as shared50_g,rn as shared50_h,ga as shared51_a,k0 as shared51_b,Ge as shared51_c,Na as shared51_d,$s as shared51_e,ju as shared52_a,_e as shared53_a,Br as shared53_b,ei as shared54_a,z3 as shared55_a,H3 as shared56_a,W3 as shared57_a,gd as shared58_a,As as shared59_a,b$ as shared59_b,d1 as shared59_c,_ as shared5_a,mn as shared60_a,l1 as shared61_a,Ui as shared62_a,Ds as shared62_b,t6 as shared62_c,d$ as shared63_a,u1 as shared64_a,yd as shared65_a,wd as shared66_a,y$ as shared66_b,w$ as shared66_c,xd as shared67_a,x$ as shared67_b,E$ as shared67_c,wf as shared68_a,k$ as shared68_b,C$ as shared68_c,f1 as shared69_a,F$ as shared69_b,or as shared6_a,ws as shared6_b,A as shared6_c,ae as shared6_d,m1 as shared70_a,D$ as shared70_b,jW as shared71_a,NW as shared71_b,PW as shared71_c,ko as shared71_d,xl as shared71_e,O$ as shared71_f,hn as shared72_a,yi as shared72_b,M$ as shared72_c,Qn as shared72_d,T$ as shared72_e,xf as shared72_f,Ou as shared72_g,_$ as shared72_h,j$ as shared72_i,Pn as shared73_a,A0 as shared73_b,El as shared74_a,Cf as shared74_b,Lu as shared75_a,Q$ as shared76_a,RW as shared77_a,H$ as shared77_b,U$ as shared78_a,V$ as shared78_b,K$ as shared79_a,Gt as shared7_a,x1 as shared80_a,pD as shared80_b,B0 as shared81_a,vve as shared81_b,yve as shared81_c,wve as shared81_d,b1 as shared82_a,eD as shared82_b,xve as shared82_c,Eve as shared82_d,Wu as shared83_a,Sd as shared83_b,Hu as shared83_c,qu as shared83_d,nn as shared83_e,Ms as shared83_f,lD as shared83_g,uD as shared83_h,cD as shared83_i,dD as shared83_j,Cd as shared84_a,c6 as shared85_a,GW as shared85_b,tD as shared85_c,bU as shared86_a,S6 as shared86_b,OD as shared86_c,zD as shared86_d,LD as shared86_e,HD as shared86_f,mbe as shared86_g,gbe as shared86_h,yU as shared86_i,vbe as shared86_j,qD as shared86_k,F6 as shared86_l,$6 as shared86_m,D1 as shared86_n,bbe as shared86_o,wbe as shared86_p,xbe as shared86_q,Gu as shared86_r,Ebe as shared86_s,kbe as shared86_t,$be as shared86_u,Bbe as shared86_v,Ibe as shared86_w,Mbe as shared86_x,D6 as shared86_y,WD as shared86_z,Nve as shared87_a,kl as shared87_b,Co as shared87_c,Ki as shared87_d,$f as shared87_e,Ts as shared87_f,Uu as shared87_g,v6 as shared87_h,Ove as shared87_i,zve as shared87_j,vD as shared87_k,Lve as shared87_l,b6 as shared87_m,bD as shared87_n,qve as shared87_o,Wve as shared87_p,Uve as shared87_q,aU as shared87_r,Cl as shared87_s,Df as shared87_t,Af as shared87_u,k1 as shared87_v,C1 as shared87_w,_0 as shared87_x,Kve as shared87_y,fD as shared88_a,m6 as shared88_b,Gi as shared88_c,mU as shared89_a,R0 as shared89_b,ID as shared89_c,MD as shared89_d,hU as shared89_e,TD as shared89_f,_D as shared89_g,C6 as shared89_h,jD as shared89_i,m7 as shared8_a,c2 as shared8_b,Qp as shared8_c,Yp as shared8_d,d2 as shared8_e,h7 as shared8_f,FL as shared8_g,AL as shared8_h,IL as shared8_i,TL as shared8_j,_L as shared8_k,g7 as shared8_l,v7 as shared8_m,b7 as shared8_n,p2 as shared8_o,Jh as shared8_p,Db as shared8_q,Xr as shared90_a,Sl as shared90_b,yD as shared90_c,If as shared91_a,va as shared91_b,kD as shared91_c,ua as shared92_a,Fl as shared92_b,xD as shared92_c,N0 as shared93_a,Qi as shared93_b,rs as shared93_c,_s as shared93_d,P0 as shared93_e,tbe as shared93_f,js as shared93_g,CD as shared93_h,SD as shared93_i,gn as shared94_a,Ns as shared94_b,DD as shared95_a,AD as shared95_b,ibe as shared95_c,F1 as shared95_d,ns as shared96_a,Mf as shared96_b,$d as shared96_c,ii as shared96_d,ND as shared97_a,Dl as shared97_b,_f as shared98_a,UD as shared99_a,Tbe as shared99_b,Su as shared9_a};