agent-tower 0.5.4 → 0.6.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/README.md +1 -1
  2. package/dist/core/event-bus.d.ts +4 -1
  3. package/dist/core/event-bus.d.ts.map +1 -1
  4. package/dist/core/event-bus.js.map +1 -1
  5. package/dist/executors/__tests__/codex.executor.test.js +27 -21
  6. package/dist/executors/__tests__/codex.executor.test.js.map +1 -1
  7. package/dist/executors/__tests__/providers-availability.test.js +23 -0
  8. package/dist/executors/__tests__/providers-availability.test.js.map +1 -1
  9. package/dist/executors/__tests__/providers.test.js +34 -1
  10. package/dist/executors/__tests__/providers.test.js.map +1 -1
  11. package/dist/executors/codex.executor.d.ts.map +1 -1
  12. package/dist/executors/codex.executor.js +4 -0
  13. package/dist/executors/codex.executor.js.map +1 -1
  14. package/dist/executors/default-providers.json +106 -0
  15. package/dist/executors/index.d.ts +1 -1
  16. package/dist/executors/index.d.ts.map +1 -1
  17. package/dist/executors/index.js +32 -13
  18. package/dist/executors/index.js.map +1 -1
  19. package/dist/executors/providers.d.ts +12 -3
  20. package/dist/executors/providers.d.ts.map +1 -1
  21. package/dist/executors/providers.js +45 -18
  22. package/dist/executors/providers.js.map +1 -1
  23. package/dist/output/types.d.ts +32 -2
  24. package/dist/output/types.d.ts.map +1 -1
  25. package/dist/output/types.js +10 -0
  26. package/dist/output/types.js.map +1 -1
  27. package/dist/routes/__tests__/providers.test.js +181 -1
  28. package/dist/routes/__tests__/providers.test.js.map +1 -1
  29. package/dist/routes/__tests__/sessions-runtime.test.d.ts +2 -0
  30. package/dist/routes/__tests__/sessions-runtime.test.d.ts.map +1 -0
  31. package/dist/routes/__tests__/sessions-runtime.test.js +107 -0
  32. package/dist/routes/__tests__/sessions-runtime.test.js.map +1 -0
  33. package/dist/routes/providers.d.ts.map +1 -1
  34. package/dist/routes/providers.js +3 -1
  35. package/dist/routes/providers.js.map +1 -1
  36. package/dist/routes/sessions.d.ts.map +1 -1
  37. package/dist/routes/sessions.js +50 -3
  38. package/dist/routes/sessions.js.map +1 -1
  39. package/dist/routes/system.d.ts.map +1 -1
  40. package/dist/routes/system.js +8 -0
  41. package/dist/routes/system.js.map +1 -1
  42. package/dist/runtime/__tests__/acp-agent-definitions.test.d.ts +2 -0
  43. package/dist/runtime/__tests__/acp-agent-definitions.test.d.ts.map +1 -0
  44. package/dist/runtime/__tests__/acp-agent-definitions.test.js +360 -0
  45. package/dist/runtime/__tests__/acp-agent-definitions.test.js.map +1 -0
  46. package/dist/runtime/__tests__/acp-driver-cleanup.test.d.ts +2 -0
  47. package/dist/runtime/__tests__/acp-driver-cleanup.test.d.ts.map +1 -0
  48. package/dist/runtime/__tests__/acp-driver-cleanup.test.js +39 -0
  49. package/dist/runtime/__tests__/acp-driver-cleanup.test.js.map +1 -0
  50. package/dist/runtime/__tests__/acp-driver.test.d.ts +2 -0
  51. package/dist/runtime/__tests__/acp-driver.test.d.ts.map +1 -0
  52. package/dist/runtime/__tests__/acp-driver.test.js +122 -0
  53. package/dist/runtime/__tests__/acp-driver.test.js.map +1 -0
  54. package/dist/runtime/__tests__/acp-process-manager.test.d.ts +2 -0
  55. package/dist/runtime/__tests__/acp-process-manager.test.d.ts.map +1 -0
  56. package/dist/runtime/__tests__/acp-process-manager.test.js +51 -0
  57. package/dist/runtime/__tests__/acp-process-manager.test.js.map +1 -0
  58. package/dist/runtime/__tests__/acp-projector.test.d.ts +2 -0
  59. package/dist/runtime/__tests__/acp-projector.test.d.ts.map +1 -0
  60. package/dist/runtime/__tests__/acp-projector.test.js +195 -0
  61. package/dist/runtime/__tests__/acp-projector.test.js.map +1 -0
  62. package/dist/runtime/__tests__/runtime-coordinator.test.d.ts +2 -0
  63. package/dist/runtime/__tests__/runtime-coordinator.test.d.ts.map +1 -0
  64. package/dist/runtime/__tests__/runtime-coordinator.test.js +134 -0
  65. package/dist/runtime/__tests__/runtime-coordinator.test.js.map +1 -0
  66. package/dist/runtime/acp/acp-driver.d.ts +7 -0
  67. package/dist/runtime/acp/acp-driver.d.ts.map +1 -0
  68. package/dist/runtime/acp/acp-driver.js +406 -0
  69. package/dist/runtime/acp/acp-driver.js.map +1 -0
  70. package/dist/runtime/acp/agents/claude-code.d.ts +3 -0
  71. package/dist/runtime/acp/agents/claude-code.d.ts.map +1 -0
  72. package/dist/runtime/acp/agents/claude-code.js +147 -0
  73. package/dist/runtime/acp/agents/claude-code.js.map +1 -0
  74. package/dist/runtime/acp/agents/codex.d.ts +3 -0
  75. package/dist/runtime/acp/agents/codex.d.ts.map +1 -0
  76. package/dist/runtime/acp/agents/codex.js +68 -0
  77. package/dist/runtime/acp/agents/codex.js.map +1 -0
  78. package/dist/runtime/acp/agents/cursor-agent.d.ts +2 -0
  79. package/dist/runtime/acp/agents/cursor-agent.d.ts.map +1 -0
  80. package/dist/runtime/acp/agents/cursor-agent.js +12 -0
  81. package/dist/runtime/acp/agents/cursor-agent.js.map +1 -0
  82. package/dist/runtime/acp/agents/executable-resolution.d.ts +6 -0
  83. package/dist/runtime/acp/agents/executable-resolution.d.ts.map +1 -0
  84. package/dist/runtime/acp/agents/executable-resolution.js +72 -0
  85. package/dist/runtime/acp/agents/executable-resolution.js.map +1 -0
  86. package/dist/runtime/acp/agents/gemini-cli.d.ts +2 -0
  87. package/dist/runtime/acp/agents/gemini-cli.d.ts.map +1 -0
  88. package/dist/runtime/acp/agents/gemini-cli.js +13 -0
  89. package/dist/runtime/acp/agents/gemini-cli.js.map +1 -0
  90. package/dist/runtime/acp/agents/grok-build.d.ts +2 -0
  91. package/dist/runtime/acp/agents/grok-build.d.ts.map +1 -0
  92. package/dist/runtime/acp/agents/grok-build.js +26 -0
  93. package/dist/runtime/acp/agents/grok-build.js.map +1 -0
  94. package/dist/runtime/acp/agents/kiro-cli.d.ts +2 -0
  95. package/dist/runtime/acp/agents/kiro-cli.d.ts.map +1 -0
  96. package/dist/runtime/acp/agents/kiro-cli.js +18 -0
  97. package/dist/runtime/acp/agents/kiro-cli.js.map +1 -0
  98. package/dist/runtime/acp/agents/managed-directory.d.ts +6 -0
  99. package/dist/runtime/acp/agents/managed-directory.d.ts.map +1 -0
  100. package/dist/runtime/acp/agents/managed-directory.js +31 -0
  101. package/dist/runtime/acp/agents/managed-directory.js.map +1 -0
  102. package/dist/runtime/acp/agents/minion-acp-sitecustomize.d.ts +2 -0
  103. package/dist/runtime/acp/agents/minion-acp-sitecustomize.d.ts.map +1 -0
  104. package/dist/runtime/acp/agents/minion-acp-sitecustomize.js +118 -0
  105. package/dist/runtime/acp/agents/minion-acp-sitecustomize.js.map +1 -0
  106. package/dist/runtime/acp/agents/minion-code.d.ts +2 -0
  107. package/dist/runtime/acp/agents/minion-code.d.ts.map +1 -0
  108. package/dist/runtime/acp/agents/minion-code.js +53 -0
  109. package/dist/runtime/acp/agents/minion-code.js.map +1 -0
  110. package/dist/runtime/acp/agents/native-agent.d.ts +23 -0
  111. package/dist/runtime/acp/agents/native-agent.d.ts.map +1 -0
  112. package/dist/runtime/acp/agents/native-agent.js +158 -0
  113. package/dist/runtime/acp/agents/native-agent.js.map +1 -0
  114. package/dist/runtime/acp/agents/opencode.d.ts +2 -0
  115. package/dist/runtime/acp/agents/opencode.d.ts.map +1 -0
  116. package/dist/runtime/acp/agents/opencode.js +35 -0
  117. package/dist/runtime/acp/agents/opencode.js.map +1 -0
  118. package/dist/runtime/acp/agents/pi-coding-agent.d.ts +3 -0
  119. package/dist/runtime/acp/agents/pi-coding-agent.d.ts.map +1 -0
  120. package/dist/runtime/acp/agents/pi-coding-agent.js +178 -0
  121. package/dist/runtime/acp/agents/pi-coding-agent.js.map +1 -0
  122. package/dist/runtime/acp/agents/qwen-code.d.ts +3 -0
  123. package/dist/runtime/acp/agents/qwen-code.d.ts.map +1 -0
  124. package/dist/runtime/acp/agents/qwen-code.js +67 -0
  125. package/dist/runtime/acp/agents/qwen-code.js.map +1 -0
  126. package/dist/runtime/acp/agents/registry.d.ts +5 -0
  127. package/dist/runtime/acp/agents/registry.d.ts.map +1 -0
  128. package/dist/runtime/acp/agents/registry.js +34 -0
  129. package/dist/runtime/acp/agents/registry.js.map +1 -0
  130. package/dist/runtime/acp/agents/types.d.ts +35 -0
  131. package/dist/runtime/acp/agents/types.d.ts.map +1 -0
  132. package/dist/runtime/acp/agents/types.js +2 -0
  133. package/dist/runtime/acp/agents/types.js.map +1 -0
  134. package/dist/runtime/acp/codex-provider-config.d.ts +9 -0
  135. package/dist/runtime/acp/codex-provider-config.d.ts.map +1 -0
  136. package/dist/runtime/acp/codex-provider-config.js +107 -0
  137. package/dist/runtime/acp/codex-provider-config.js.map +1 -0
  138. package/dist/runtime/acp/process-manager.d.ts +33 -0
  139. package/dist/runtime/acp/process-manager.d.ts.map +1 -0
  140. package/dist/runtime/acp/process-manager.js +204 -0
  141. package/dist/runtime/acp/process-manager.js.map +1 -0
  142. package/dist/runtime/acp/projector.d.ts +23 -0
  143. package/dist/runtime/acp/projector.d.ts.map +1 -0
  144. package/dist/runtime/acp/projector.js +354 -0
  145. package/dist/runtime/acp/projector.js.map +1 -0
  146. package/dist/runtime/cli-driver.d.ts +7 -0
  147. package/dist/runtime/cli-driver.d.ts.map +1 -0
  148. package/dist/runtime/cli-driver.js +282 -0
  149. package/dist/runtime/cli-driver.js.map +1 -0
  150. package/dist/runtime/cli-parser.d.ts +5 -0
  151. package/dist/runtime/cli-parser.d.ts.map +1 -0
  152. package/dist/runtime/cli-parser.js +15 -0
  153. package/dist/runtime/cli-parser.js.map +1 -0
  154. package/dist/runtime/contracts.d.ts +109 -0
  155. package/dist/runtime/contracts.d.ts.map +1 -0
  156. package/dist/runtime/contracts.js +2 -0
  157. package/dist/runtime/contracts.js.map +1 -0
  158. package/dist/runtime/errors.d.ts +9 -0
  159. package/dist/runtime/errors.d.ts.map +1 -0
  160. package/dist/runtime/errors.js +29 -0
  161. package/dist/runtime/errors.js.map +1 -0
  162. package/dist/runtime/index.d.ts +9 -0
  163. package/dist/runtime/index.d.ts.map +1 -0
  164. package/dist/runtime/index.js +9 -0
  165. package/dist/runtime/index.js.map +1 -0
  166. package/dist/runtime/runtime-coordinator.d.ts +32 -0
  167. package/dist/runtime/runtime-coordinator.d.ts.map +1 -0
  168. package/dist/runtime/runtime-coordinator.js +327 -0
  169. package/dist/runtime/runtime-coordinator.js.map +1 -0
  170. package/dist/runtime/runtime-registry.d.ts +8 -0
  171. package/dist/runtime/runtime-registry.d.ts.map +1 -0
  172. package/dist/runtime/runtime-registry.js +17 -0
  173. package/dist/runtime/runtime-registry.js.map +1 -0
  174. package/dist/runtime/runtime-state-view.d.ts +5 -0
  175. package/dist/runtime/runtime-state-view.d.ts.map +1 -0
  176. package/dist/runtime/runtime-state-view.js +15 -0
  177. package/dist/runtime/runtime-state-view.js.map +1 -0
  178. package/dist/services/__tests__/provider-config.service.test.js +31 -2
  179. package/dist/services/__tests__/provider-config.service.test.js.map +1 -1
  180. package/dist/services/__tests__/session-manager.lifecycle.test.js +105 -2
  181. package/dist/services/__tests__/session-manager.lifecycle.test.js.map +1 -1
  182. package/dist/services/__tests__/session-manager.team-run.test.js +16 -14
  183. package/dist/services/__tests__/session-manager.team-run.test.js.map +1 -1
  184. package/dist/services/conversation.service.d.ts.map +1 -1
  185. package/dist/services/conversation.service.js +3 -0
  186. package/dist/services/conversation.service.js.map +1 -1
  187. package/dist/services/provider-config.service.d.ts.map +1 -1
  188. package/dist/services/provider-config.service.js +34 -5
  189. package/dist/services/provider-config.service.js.map +1 -1
  190. package/dist/services/provider-effective-connection.service.d.ts +7 -1
  191. package/dist/services/provider-effective-connection.service.d.ts.map +1 -1
  192. package/dist/services/provider-effective-connection.service.js +56 -1
  193. package/dist/services/provider-effective-connection.service.js.map +1 -1
  194. package/dist/services/session-manager.d.ts +32 -24
  195. package/dist/services/session-manager.d.ts.map +1 -1
  196. package/dist/services/session-manager.js +265 -448
  197. package/dist/services/session-manager.js.map +1 -1
  198. package/dist/services/team-reconciler.service.d.ts +3 -0
  199. package/dist/services/team-reconciler.service.d.ts.map +1 -1
  200. package/dist/services/team-reconciler.service.js +14 -3
  201. package/dist/services/team-reconciler.service.js.map +1 -1
  202. package/dist/services/team-run.service.d.ts.map +1 -1
  203. package/dist/services/team-run.service.js +5 -1
  204. package/dist/services/team-run.service.js.map +1 -1
  205. package/dist/services/workspace.service.d.ts +2 -0
  206. package/dist/services/workspace.service.d.ts.map +1 -1
  207. package/dist/socket/__tests__/socket-gateway.test.js +42 -0
  208. package/dist/socket/__tests__/socket-gateway.test.js.map +1 -1
  209. package/dist/socket/events.d.ts +1 -1
  210. package/dist/socket/events.d.ts.map +1 -1
  211. package/dist/socket/events.js.map +1 -1
  212. package/dist/socket/index.js +1 -1
  213. package/dist/socket/index.js.map +1 -1
  214. package/dist/socket/socket-gateway.d.ts.map +1 -1
  215. package/dist/socket/socket-gateway.js +13 -1
  216. package/dist/socket/socket-gateway.js.map +1 -1
  217. package/dist/types/index.d.ts +7 -1
  218. package/dist/types/index.d.ts.map +1 -1
  219. package/dist/types/index.js +6 -0
  220. package/dist/types/index.js.map +1 -1
  221. package/dist/utils/process-launch.d.ts.map +1 -1
  222. package/dist/utils/process-launch.js +3 -1
  223. package/dist/utils/process-launch.js.map +1 -1
  224. package/dist/utils/process-launch.test.js +17 -2
  225. package/dist/utils/process-launch.test.js.map +1 -1
  226. package/dist/web/assets/{AgentDemoPage-C3SHOCDR.js → AgentDemoPage-BpUO2gR6.js} +1 -1
  227. package/dist/web/assets/{AgentEnvironmentSettingsPage-D-BWLcC0.js → AgentEnvironmentSettingsPage-CSBMaAvL.js} +1 -1
  228. package/dist/web/assets/AgentLogo-C190Z6bw.js +1 -0
  229. package/dist/web/assets/ConversationPage-Cer_WtdC.js +3 -0
  230. package/dist/web/assets/CreateTaskInput-ByeWDjc8.js +1 -0
  231. package/dist/web/assets/{DemoPage-Cd1ggnZY.js → DemoPage-Dpb9aAKX.js} +1 -1
  232. package/dist/web/assets/{GeneralSettingsPage-B9D9wA_9.js → GeneralSettingsPage-TqbAsCZM.js} +1 -1
  233. package/dist/web/assets/{Icons-CM6Yg2lw.js → Icons-CyNNz4Z5.js} +1 -1
  234. package/dist/web/assets/{LoadingPreviewPage-BJ_Se_T_.js → LoadingPreviewPage-DmH1TGln.js} +1 -1
  235. package/dist/web/assets/{McpSettingsPage-B5GtqNme.js → McpSettingsPage-z1_NcsMR.js} +1 -1
  236. package/dist/web/assets/{MemberAvatar-yC8O30hv.js → MemberAvatar-BPoYS6Il.js} +1 -1
  237. package/dist/web/assets/{NotificationSettingsPage-BaJpYHLD.js → NotificationSettingsPage-CNsRJ6nN.js} +1 -1
  238. package/dist/web/assets/{ProfileSettingsPage-DYXew66J.js → ProfileSettingsPage-g1RKcEbo.js} +1 -1
  239. package/dist/web/assets/{ProjectKanbanPage-DbgIwiUC.js → ProjectKanbanPage-j2v5fLfg.js} +37 -36
  240. package/dist/web/assets/{ProjectSettingsPage-B2K8Kw_S.js → ProjectSettingsPage-Cp89NvwE.js} +1 -1
  241. package/dist/web/assets/ProviderSettingsPage-B-bBs2qN.js +93 -0
  242. package/dist/web/assets/{SettingsMasterDetail-ByKe_zcK.js → SettingsMasterDetail-BYB-1oyf.js} +1 -1
  243. package/dist/web/assets/{TeamSettingsPage-4sHo9Wpb.js → TeamSettingsPage-Y2zCVbVD.js} +1 -1
  244. package/dist/web/assets/agent-tower-lockup-DPAcheCt.png +0 -0
  245. package/dist/web/assets/{arc-g6Y4qqcK.js → arc-BmDnqN7Q.js} +1 -1
  246. package/dist/web/assets/{architectureDiagram-3BPJPVTR-ILRcqNPe.js → architectureDiagram-3BPJPVTR-BIG4K9gT.js} +1 -1
  247. package/dist/web/assets/{arrow-left-D0MkHwKU.js → arrow-left-CB4qTjQs.js} +1 -1
  248. package/dist/web/assets/{blockDiagram-GPEHLZMM-ZTMQ6CTT.js → blockDiagram-GPEHLZMM-CowveYw0.js} +1 -1
  249. package/dist/web/assets/{c4Diagram-AAUBKEIU-CAW8PcM8.js → c4Diagram-AAUBKEIU-CLjbYgNG.js} +1 -1
  250. package/dist/web/assets/channel-BsOpjSZw.js +1 -0
  251. package/dist/web/assets/check-BVOtZt28.js +1 -0
  252. package/dist/web/assets/{chevron-down-CmGXPki1.js → chevron-down-BXYCSpWd.js} +1 -1
  253. package/dist/web/assets/{chevron-right-jrkLz9qG.js → chevron-right-CkcSaX8x.js} +1 -1
  254. package/dist/web/assets/{chevron-up-UwBybVMK.js → chevron-up-Y8L6pbzc.js} +1 -1
  255. package/dist/web/assets/{chunk-2J33WTMH-BvuLBX1d.js → chunk-2J33WTMH-DRf_miP4.js} +1 -1
  256. package/dist/web/assets/{chunk-4BX2VUAB-DJO5Yx2A.js → chunk-4BX2VUAB-C6Ne_vwR.js} +1 -1
  257. package/dist/web/assets/{chunk-55IACEB6-Dc117Qwf.js → chunk-55IACEB6-DejCglMr.js} +1 -1
  258. package/dist/web/assets/{chunk-727SXJPM-DsZmTw67.js → chunk-727SXJPM-B0MC9Ojc.js} +1 -1
  259. package/dist/web/assets/{chunk-AQP2D5EJ-DgmF7gD6.js → chunk-AQP2D5EJ-D9f4hbMX.js} +1 -1
  260. package/dist/web/assets/{chunk-FMBD7UC4-vgh3Erl0.js → chunk-FMBD7UC4-k90hkOQq.js} +1 -1
  261. package/dist/web/assets/{chunk-ND2GUHAM-Ogtl4wwd.js → chunk-ND2GUHAM-CX2-qxPx.js} +1 -1
  262. package/dist/web/assets/{chunk-QZHKN3VN-Cif7bPpF.js → chunk-QZHKN3VN-CpFs7UD0.js} +1 -1
  263. package/dist/web/assets/{circle-alert-B6ZM3dSn.js → circle-alert-ClX4sQ2K.js} +1 -1
  264. package/dist/web/assets/classDiagram-4FO5ZUOK-KkLqUSdB.js +1 -0
  265. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-KkLqUSdB.js +1 -0
  266. package/dist/web/assets/{code-block-OCS4YCEC-BQnKZly0.js → code-block-OCS4YCEC-_lkU1VUC.js} +1 -1
  267. package/dist/web/assets/{confirm-dialog-BZeaAl5j.js → confirm-dialog-BJwzwwOk.js} +1 -1
  268. package/dist/web/assets/{copy-DqNqPI8d.js → copy-jQAntc98.js} +1 -1
  269. package/dist/web/assets/{cose-bilkent-S5V4N54A-rxJB-TPw.js → cose-bilkent-S5V4N54A-CLWAfEVg.js} +1 -1
  270. package/dist/web/assets/cssMode-q0rL0Hjc.js +1 -0
  271. package/dist/web/assets/{dagre-BM42HDAG-BkB6VpXn.js → dagre-BM42HDAG-DKviWU-X.js} +1 -1
  272. package/dist/web/assets/{diagram-2AECGRRQ-BH2e-eqy.js → diagram-2AECGRRQ-L6emXRJ1.js} +1 -1
  273. package/dist/web/assets/{diagram-5GNKFQAL-B0I47Yhs.js → diagram-5GNKFQAL-CXGUerks.js} +1 -1
  274. package/dist/web/assets/{diagram-KO2AKTUF-BVXUYRvI.js → diagram-KO2AKTUF-C8FHXqeH.js} +1 -1
  275. package/dist/web/assets/{diagram-LMA3HP47-C1fEOLke.js → diagram-LMA3HP47-Cng_aa5j.js} +1 -1
  276. package/dist/web/assets/{diagram-OG6HWLK6-CVE8cOcO.js → diagram-OG6HWLK6-BEC6IDf4.js} +1 -1
  277. package/dist/web/assets/{erDiagram-TEJ5UH35-qCfnXmfp.js → erDiagram-TEJ5UH35-BWMCTdYK.js} +1 -1
  278. package/dist/web/assets/{flowDiagram-I6XJVG4X-KMhbF5QC.js → flowDiagram-I6XJVG4X-aAEYIyx2.js} +1 -1
  279. package/dist/web/assets/{folder-picker-C3BgqamQ.js → folder-picker-CioQjSzV.js} +1 -1
  280. package/dist/web/assets/{freemarker2-tYgVOcFl.js → freemarker2-DZgAIr6s.js} +2 -2
  281. package/dist/web/assets/{ganttDiagram-6RSMTGT7-CaX3qYV1.js → ganttDiagram-6RSMTGT7-DVqWnwcH.js} +1 -1
  282. package/dist/web/assets/{gitGraphDiagram-PVQCEYII-CBAlZX7C.js → gitGraphDiagram-PVQCEYII-BVWrTXBv.js} +1 -1
  283. package/dist/web/assets/handlebars-9RRQrLUb.js +1 -0
  284. package/dist/web/assets/html-BVI4F9TT.js +1 -0
  285. package/dist/web/assets/htmlMode-t0djrjSv.js +1 -0
  286. package/dist/web/assets/index-CjAJoGg5.css +1 -0
  287. package/dist/web/assets/{index-BuQDZjol.js → index-Da9mzleR.js} +4 -4
  288. package/dist/web/assets/{index-DHKgc87I.js → index-RYlllU6n.js} +18 -18
  289. package/dist/web/assets/{infoDiagram-5YYISTIA-Bp_GeFtA.js → infoDiagram-5YYISTIA-DYG1ew4x.js} +1 -1
  290. package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-BfBNEV_D.js → ishikawaDiagram-YF4QCWOH-COBW1j3-.js} +1 -1
  291. package/dist/web/assets/javascript-DaUCpDvL.js +1 -0
  292. package/dist/web/assets/{journeyDiagram-JHISSGLW-DJkUQG4Z.js → journeyDiagram-JHISSGLW-BI_FlncW.js} +1 -1
  293. package/dist/web/assets/{jsonMode-D4_2geMa.js → jsonMode-A5wuW-PC.js} +2 -2
  294. package/dist/web/assets/{kanban-definition-UN3LZRKU-Bk7sA26p.js → kanban-definition-UN3LZRKU-BKrHEd7r.js} +1 -1
  295. package/dist/web/assets/{layers-BFkjcml2.js → layers-BZMh9pqm.js} +1 -1
  296. package/dist/web/assets/{linear-CmC68WUf.js → linear-DyoMQJGq.js} +1 -1
  297. package/dist/web/assets/liquid-HXqG_RIQ.js +1 -0
  298. package/dist/web/assets/{lspLanguageFeatures-vY541IS0.js → lspLanguageFeatures-s3xWnrXc.js} +1 -1
  299. package/dist/web/assets/mdx-k_7JTYp2.js +1 -0
  300. package/dist/web/assets/{mermaid-NOHMQCX5-C6wHDXti.js → mermaid-NOHMQCX5-orMHhlAj.js} +59 -61
  301. package/dist/web/assets/{message-square-Wwixl9YA.js → message-square-CStQg7sr.js} +1 -1
  302. package/dist/web/assets/{mindmap-definition-RKZ34NQL-Ck1je2Hf.js → mindmap-definition-RKZ34NQL-CKOIIjUJ.js} +1 -1
  303. package/dist/web/assets/{modal-kFSArLJi.js → modal-ZYdX5Krr.js} +1 -1
  304. package/dist/web/assets/{monaco-D3FVQqPj.js → monaco-DX9iObLO.js} +3 -3
  305. package/dist/web/assets/{pencil-5Kegi5_H.js → pencil-DoB4p30x.js} +1 -1
  306. package/dist/web/assets/{pieDiagram-4H26LBE5-6Ao8YaoY.js → pieDiagram-4H26LBE5-BW18kL8l.js} +1 -1
  307. package/dist/web/assets/python-abx8p9WS.js +1 -0
  308. package/dist/web/assets/{quadrantDiagram-W4KKPZXB-md1eBgjS.js → quadrantDiagram-W4KKPZXB-Df_F1INR.js} +1 -1
  309. package/dist/web/assets/razor-DGdDlX86.js +1 -0
  310. package/dist/web/assets/{requirementDiagram-4Y6WPE33-DJOb4wf-.js → requirementDiagram-4Y6WPE33-De6R8t8O.js} +1 -1
  311. package/dist/web/assets/{sankeyDiagram-5OEKKPKP-B7srXhHb.js → sankeyDiagram-5OEKKPKP-ChlLeN5m.js} +1 -1
  312. package/dist/web/assets/{select-C2v0aFwN.js → select-B9kjO67b.js} +1 -1
  313. package/dist/web/assets/{sequenceDiagram-3UESZ5HK-L0qwgf37.js → sequenceDiagram-3UESZ5HK-CPVnbcvz.js} +1 -1
  314. package/dist/web/assets/{stateDiagram-AJRCARHV-DGbH9dJ5.js → stateDiagram-AJRCARHV-BFS1G-aJ.js} +1 -1
  315. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-DSxC8AfE.js +1 -0
  316. package/dist/web/assets/{switch-DjnF5A3R.js → switch-C2r5pofB.js} +1 -1
  317. package/dist/web/assets/{textarea-CbZnd5PO.js → textarea-BB3UoYxg.js} +1 -1
  318. package/dist/web/assets/{timeline-definition-PNZ67QCA-Dku_Yjmk.js → timeline-definition-PNZ67QCA-C1Rgs32y.js} +1 -1
  319. package/dist/web/assets/{trash-2-DA--Uikt.js → trash-2-BNiAEW-6.js} +1 -1
  320. package/dist/web/assets/{tsMode-CRNPFR24.js → tsMode-DHruHjGh.js} +2 -2
  321. package/dist/web/assets/typescript-SLYiKRhJ.js +1 -0
  322. package/dist/web/assets/{upload-hWnFHuhE.js → upload-BLLmywZY.js} +1 -1
  323. package/dist/web/assets/{use-profiles-roHXR8He.js → use-profiles-OJaV4lOv.js} +1 -1
  324. package/dist/web/assets/{use-projects-DiJMGduU.js → use-projects-D_Sq7ahS.js} +1 -1
  325. package/dist/web/assets/{use-providers-efX4HCcr.js → use-providers-SSHcslI-.js} +1 -1
  326. package/dist/web/assets/{useNormalizedLogs-xEobyuGF.js → useNormalizedLogs-DeA-fso_.js} +1 -1
  327. package/dist/web/assets/{vennDiagram-CIIHVFJN-_ufI1hxk.js → vennDiagram-CIIHVFJN-DLGPZTKg.js} +1 -1
  328. package/dist/web/assets/{wardley-L42UT6IY-Dve662aX.js → wardley-L42UT6IY-BVMPWfq9.js} +1 -1
  329. package/dist/web/assets/{wardleyDiagram-YWT4CUSO-Dn2x3M_Q.js → wardleyDiagram-YWT4CUSO-_KXuEg6G.js} +1 -1
  330. package/dist/web/assets/xml-BmreQojr.js +1 -0
  331. package/dist/web/assets/{xychartDiagram-2RQKCTM6-BMe6JPre.js → xychartDiagram-2RQKCTM6-a-Do3v5G.js} +1 -1
  332. package/dist/web/assets/yaml-CJoLHuqv.js +1 -0
  333. package/dist/web/index.html +2 -2
  334. package/node_modules/@agent-tower/shared/dist/agent-runtime-support.d.ts +9 -0
  335. package/node_modules/@agent-tower/shared/dist/agent-runtime-support.d.ts.map +1 -0
  336. package/node_modules/@agent-tower/shared/dist/agent-runtime-support.js +21 -0
  337. package/node_modules/@agent-tower/shared/dist/agent-runtime-support.js.map +1 -0
  338. package/node_modules/@agent-tower/shared/dist/index.d.ts +1 -0
  339. package/node_modules/@agent-tower/shared/dist/index.d.ts.map +1 -1
  340. package/node_modules/@agent-tower/shared/dist/index.js +1 -0
  341. package/node_modules/@agent-tower/shared/dist/index.js.map +1 -1
  342. package/node_modules/@agent-tower/shared/dist/log-adapter.d.ts +38 -3
  343. package/node_modules/@agent-tower/shared/dist/log-adapter.d.ts.map +1 -1
  344. package/node_modules/@agent-tower/shared/dist/log-adapter.js +21 -2
  345. package/node_modules/@agent-tower/shared/dist/log-adapter.js.map +1 -1
  346. package/node_modules/@agent-tower/shared/dist/provider-capabilities.d.ts.map +1 -1
  347. package/node_modules/@agent-tower/shared/dist/provider-capabilities.js +58 -0
  348. package/node_modules/@agent-tower/shared/dist/provider-capabilities.js.map +1 -1
  349. package/node_modules/@agent-tower/shared/dist/socket/events.d.ts +17 -0
  350. package/node_modules/@agent-tower/shared/dist/socket/events.d.ts.map +1 -1
  351. package/node_modules/@agent-tower/shared/dist/socket/events.js +3 -0
  352. package/node_modules/@agent-tower/shared/dist/socket/events.js.map +1 -1
  353. package/node_modules/@agent-tower/shared/dist/types.d.ts +63 -2
  354. package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -1
  355. package/node_modules/@agent-tower/shared/dist/types.js +12 -0
  356. package/node_modules/@agent-tower/shared/dist/types.js.map +1 -1
  357. package/package.json +9 -3
  358. package/prisma/migrations/20260723000000_add_agent_runtime/migration.sql +2 -0
  359. package/prisma/schema.prisma +2 -0
  360. package/scripts/patch-claude-agent-acp.mjs +77 -0
  361. package/scripts/postinstall.js +5 -0
  362. package/dist/web/assets/AgentLogo-DOc8QQHe.js +0 -1
  363. package/dist/web/assets/ConversationPage-sknzMK-I.js +0 -3
  364. package/dist/web/assets/CreateTaskInput-Cn0k5D8K.js +0 -1
  365. package/dist/web/assets/ProviderSettingsPage-n2AFrtkZ.js +0 -93
  366. package/dist/web/assets/channel-DpisCjBV.js +0 -1
  367. package/dist/web/assets/check-VMcYyBr4.js +0 -1
  368. package/dist/web/assets/classDiagram-4FO5ZUOK-ByrAXg7x.js +0 -1
  369. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-ByrAXg7x.js +0 -1
  370. package/dist/web/assets/cssMode-BvIKUSIl.js +0 -1
  371. package/dist/web/assets/handlebars-O23dzm6n.js +0 -1
  372. package/dist/web/assets/html-QaPgl834.js +0 -1
  373. package/dist/web/assets/htmlMode-CWyii3pY.js +0 -1
  374. package/dist/web/assets/index-BeEbDvc9.css +0 -1
  375. package/dist/web/assets/javascript-C_IpQDkn.js +0 -1
  376. package/dist/web/assets/liquid-C6FS7ekL.js +0 -1
  377. package/dist/web/assets/mdx-LQJToB8m.js +0 -1
  378. package/dist/web/assets/python-HMxhKAEt.js +0 -1
  379. package/dist/web/assets/razor-CfDc2DcT.js +0 -1
  380. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-Bq1LxgY_.js +0 -1
  381. package/dist/web/assets/typescript-CNopspEc.js +0 -1
  382. package/dist/web/assets/xml-dqhfYLW3.js +0 -1
  383. package/dist/web/assets/yaml-BOxNX83z.js +0 -1
@@ -1,18 +1,18 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GeneralSettingsPage-B9D9wA_9.js","assets/select-C2v0aFwN.js","assets/chevron-down-CmGXPki1.js","assets/check-VMcYyBr4.js","assets/textarea-CbZnd5PO.js","assets/switch-DjnF5A3R.js","assets/use-providers-efX4HCcr.js","assets/ProviderSettingsPage-n2AFrtkZ.js","assets/confirm-dialog-BZeaAl5j.js","assets/modal-kFSArLJi.js","assets/mermaid-NOHMQCX5-C6wHDXti.js","assets/chevron-right-jrkLz9qG.js","assets/mermaid-NOHMQCX5-lI9o3AWT.css","assets/AgentLogo-DOc8QQHe.js","assets/SettingsMasterDetail-ByKe_zcK.js","assets/arrow-left-D0MkHwKU.js","assets/trash-2-DA--Uikt.js","assets/upload-hWnFHuhE.js","assets/pencil-5Kegi5_H.js","assets/TeamSettingsPage-4sHo9Wpb.js","assets/MemberAvatar-yC8O30hv.js","assets/chevron-up-UwBybVMK.js","assets/ProjectSettingsPage-B2K8Kw_S.js","assets/use-projects-DiJMGduU.js","assets/folder-picker-C3BgqamQ.js","assets/circle-alert-B6ZM3dSn.js","assets/NotificationSettingsPage-BaJpYHLD.js","assets/message-square-Wwixl9YA.js","assets/McpSettingsPage-B5GtqNme.js","assets/copy-DqNqPI8d.js","assets/ProfileSettingsPage-DYXew66J.js","assets/use-profiles-roHXR8He.js","assets/layers-BFkjcml2.js","assets/ProjectKanbanPage-DbgIwiUC.js","assets/Icons-CM6Yg2lw.js","assets/CreateTaskInput-Cn0k5D8K.js","assets/useNormalizedLogs-xEobyuGF.js","assets/ProjectKanbanPage-DcpNTP1B.css","assets/ConversationPage-sknzMK-I.js","assets/AgentDemoPage-C3SHOCDR.js"])))=>i.map(i=>d[i]);
2
- function g1(n,a){for(var r=0;r<a.length;r++){const l=a[r];if(typeof l!="string"&&!Array.isArray(l)){for(const c in l)if(c!=="default"&&!(c in n)){const f=Object.getOwnPropertyDescriptor(l,c);f&&Object.defineProperty(n,c,f.get?f:{enumerable:!0,get:()=>l[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function r(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function l(c){if(c.ep)return;c.ep=!0;const f=r(c);fetch(c.href,f)}})();function gy(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ef={exports:{}},Us={};var Ip;function y1(){if(Ip)return Us;Ip=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function r(l,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var m in c)m!=="key"&&(f[m]=c[m])}else f=c;return c=f.ref,{$$typeof:n,type:l,key:d,ref:c!==void 0?c:null,props:f}}return Us.Fragment=a,Us.jsx=r,Us.jsxs=r,Us}var Jp;function v1(){return Jp||(Jp=1,ef.exports=y1()),ef.exports}var v=v1(),tf={exports:{}},Ne={};var $p;function b1(){if($p)return Ne;$p=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),T=Symbol.iterator;function N(C){return C===null||typeof C!="object"?null:(C=T&&C[T]||C["@@iterator"],typeof C=="function"?C:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,P={};function K(C,q,H){this.props=C,this.context=q,this.refs=P,this.updater=H||L}K.prototype.isReactComponent={},K.prototype.setState=function(C,q){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,q,"setState")},K.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function Y(){}Y.prototype=K.prototype;function W(C,q,H){this.props=C,this.context=q,this.refs=P,this.updater=H||L}var he=W.prototype=new Y;he.constructor=W,B(he,K.prototype),he.isPureReactComponent=!0;var de=Array.isArray;function fe(){}var R={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function ie(C,q,H){var I=H.ref;return{$$typeof:n,type:C,key:q,ref:I!==void 0?I:null,props:H}}function ke(C,q){return ie(C.type,q,C.props)}function Re(C){return typeof C=="object"&&C!==null&&C.$$typeof===n}function Se(C){var q={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(H){return q[H]})}var Me=/\/+/g;function ze(C,q){return typeof C=="object"&&C!==null&&C.key!=null?Se(""+C.key):q.toString(36)}function Ee(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(fe,fe):(C.status="pending",C.then(function(q){C.status==="pending"&&(C.status="fulfilled",C.value=q)},function(q){C.status==="pending"&&(C.status="rejected",C.reason=q)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function k(C,q,H,I,ee){var $=typeof C;($==="undefined"||$==="boolean")&&(C=null);var ae=!1;if(C===null)ae=!0;else switch($){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(C.$$typeof){case n:case a:ae=!0;break;case x:return ae=C._init,k(ae(C._payload),q,H,I,ee)}}if(ae)return ee=ee(C),ae=I===""?"."+ze(C,0):I,de(ee)?(H="",ae!=null&&(H=ae.replace(Me,"$&/")+"/"),k(ee,q,H,"",function(Pt){return Pt})):ee!=null&&(Re(ee)&&(ee=ke(ee,H+(ee.key==null||C&&C.key===ee.key?"":(""+ee.key).replace(Me,"$&/")+"/")+ae)),q.push(ee)),1;ae=0;var Te=I===""?".":I+":";if(de(C))for(var Be=0;Be<C.length;Be++)I=C[Be],$=Te+ze(I,Be),ae+=k(I,q,H,$,ee);else if(Be=N(C),typeof Be=="function")for(C=Be.call(C),Be=0;!(I=C.next()).done;)I=I.value,$=Te+ze(I,Be++),ae+=k(I,q,H,$,ee);else if($==="object"){if(typeof C.then=="function")return k(Ee(C),q,H,I,ee);throw q=String(C),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ae}function X(C,q,H){if(C==null)return C;var I=[],ee=0;return k(C,I,"","",function($){return q.call(H,$,ee++)}),I}function Q(C){if(C._status===-1){var q=C._result;q=q(),q.then(function(H){(C._status===0||C._status===-1)&&(C._status=1,C._result=H)},function(H){(C._status===0||C._status===-1)&&(C._status=2,C._result=H)}),C._status===-1&&(C._status=0,C._result=q)}if(C._status===1)return C._result.default;throw C._result}var me=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},ye={map:X,forEach:function(C,q,H){X(C,function(){q.apply(this,arguments)},H)},count:function(C){var q=0;return X(C,function(){q++}),q},toArray:function(C){return X(C,function(q){return q})||[]},only:function(C){if(!Re(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return Ne.Activity=y,Ne.Children=ye,Ne.Component=K,Ne.Fragment=r,Ne.Profiler=c,Ne.PureComponent=W,Ne.StrictMode=l,Ne.Suspense=g,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(C){return R.H.useMemoCache(C)}},Ne.cache=function(C){return function(){return C.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(C,q,H){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var I=B({},C.props),ee=C.key;if(q!=null)for($ in q.key!==void 0&&(ee=""+q.key),q)!V.call(q,$)||$==="key"||$==="__self"||$==="__source"||$==="ref"&&q.ref===void 0||(I[$]=q[$]);var $=arguments.length-2;if($===1)I.children=H;else if(1<$){for(var ae=Array($),Te=0;Te<$;Te++)ae[Te]=arguments[Te+2];I.children=ae}return ie(C.type,ee,I)},Ne.createContext=function(C){return C={$$typeof:d,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:f,_context:C},C},Ne.createElement=function(C,q,H){var I,ee={},$=null;if(q!=null)for(I in q.key!==void 0&&($=""+q.key),q)V.call(q,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ee[I]=q[I]);var ae=arguments.length-2;if(ae===1)ee.children=H;else if(1<ae){for(var Te=Array(ae),Be=0;Be<ae;Be++)Te[Be]=arguments[Be+2];ee.children=Te}if(C&&C.defaultProps)for(I in ae=C.defaultProps,ae)ee[I]===void 0&&(ee[I]=ae[I]);return ie(C,$,ee)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(C){return{$$typeof:m,render:C}},Ne.isValidElement=Re,Ne.lazy=function(C){return{$$typeof:x,_payload:{_status:-1,_result:C},_init:Q}},Ne.memo=function(C,q){return{$$typeof:p,type:C,compare:q===void 0?null:q}},Ne.startTransition=function(C){var q=R.T,H={};R.T=H;try{var I=C(),ee=R.S;ee!==null&&ee(H,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(fe,me)}catch($){me($)}finally{q!==null&&H.types!==null&&(q.types=H.types),R.T=q}},Ne.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},Ne.use=function(C){return R.H.use(C)},Ne.useActionState=function(C,q,H){return R.H.useActionState(C,q,H)},Ne.useCallback=function(C,q){return R.H.useCallback(C,q)},Ne.useContext=function(C){return R.H.useContext(C)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(C,q){return R.H.useDeferredValue(C,q)},Ne.useEffect=function(C,q){return R.H.useEffect(C,q)},Ne.useEffectEvent=function(C){return R.H.useEffectEvent(C)},Ne.useId=function(){return R.H.useId()},Ne.useImperativeHandle=function(C,q,H){return R.H.useImperativeHandle(C,q,H)},Ne.useInsertionEffect=function(C,q){return R.H.useInsertionEffect(C,q)},Ne.useLayoutEffect=function(C,q){return R.H.useLayoutEffect(C,q)},Ne.useMemo=function(C,q){return R.H.useMemo(C,q)},Ne.useOptimistic=function(C,q){return R.H.useOptimistic(C,q)},Ne.useReducer=function(C,q,H){return R.H.useReducer(C,q,H)},Ne.useRef=function(C){return R.H.useRef(C)},Ne.useState=function(C){return R.H.useState(C)},Ne.useSyncExternalStore=function(C,q,H){return R.H.useSyncExternalStore(C,q,H)},Ne.useTransition=function(){return R.H.useTransition()},Ne.version="19.2.4",Ne}var Wp;function Pf(){return Wp||(Wp=1,tf.exports=b1()),tf.exports}var S=Pf();const ne=gy(S),x1=g1({__proto__:null,default:ne},[S]);var nf={exports:{}},Bs={},af={exports:{}},rf={};var eg;function S1(){return eg||(eg=1,(function(n){function a(k,X){var Q=k.length;k.push(X);e:for(;0<Q;){var me=Q-1>>>1,ye=k[me];if(0<c(ye,X))k[me]=X,k[Q]=ye,Q=me;else break e}}function r(k){return k.length===0?null:k[0]}function l(k){if(k.length===0)return null;var X=k[0],Q=k.pop();if(Q!==X){k[0]=Q;e:for(var me=0,ye=k.length,C=ye>>>1;me<C;){var q=2*(me+1)-1,H=k[q],I=q+1,ee=k[I];if(0>c(H,Q))I<ye&&0>c(ee,H)?(k[me]=ee,k[I]=Q,me=I):(k[me]=H,k[q]=Q,me=q);else if(I<ye&&0>c(ee,Q))k[me]=ee,k[I]=Q,me=I;else break e}}return X}function c(k,X){var Q=k.sortIndex-X.sortIndex;return Q!==0?Q:k.id-X.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var g=[],p=[],x=1,y=null,T=3,N=!1,L=!1,B=!1,P=!1,K=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function he(k){for(var X=r(p);X!==null;){if(X.callback===null)l(p);else if(X.startTime<=k)l(p),X.sortIndex=X.expirationTime,a(g,X);else break;X=r(p)}}function de(k){if(B=!1,he(k),!L)if(r(g)!==null)L=!0,fe||(fe=!0,Se());else{var X=r(p);X!==null&&Ee(de,X.startTime-k)}}var fe=!1,R=-1,V=5,ie=-1;function ke(){return P?!0:!(n.unstable_now()-ie<V)}function Re(){if(P=!1,fe){var k=n.unstable_now();ie=k;var X=!0;try{e:{L=!1,B&&(B=!1,Y(R),R=-1),N=!0;var Q=T;try{t:{for(he(k),y=r(g);y!==null&&!(y.expirationTime>k&&ke());){var me=y.callback;if(typeof me=="function"){y.callback=null,T=y.priorityLevel;var ye=me(y.expirationTime<=k);if(k=n.unstable_now(),typeof ye=="function"){y.callback=ye,he(k),X=!0;break t}y===r(g)&&l(g),he(k)}else l(g);y=r(g)}if(y!==null)X=!0;else{var C=r(p);C!==null&&Ee(de,C.startTime-k),X=!1}}break e}finally{y=null,T=Q,N=!1}X=void 0}}finally{X?Se():fe=!1}}}var Se;if(typeof W=="function")Se=function(){W(Re)};else if(typeof MessageChannel<"u"){var Me=new MessageChannel,ze=Me.port2;Me.port1.onmessage=Re,Se=function(){ze.postMessage(null)}}else Se=function(){K(Re,0)};function Ee(k,X){R=K(function(){k(n.unstable_now())},X)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(k){k.callback=null},n.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<k?Math.floor(1e3/k):5},n.unstable_getCurrentPriorityLevel=function(){return T},n.unstable_next=function(k){switch(T){case 1:case 2:case 3:var X=3;break;default:X=T}var Q=T;T=X;try{return k()}finally{T=Q}},n.unstable_requestPaint=function(){P=!0},n.unstable_runWithPriority=function(k,X){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var Q=T;T=k;try{return X()}finally{T=Q}},n.unstable_scheduleCallback=function(k,X,Q){var me=n.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?me+Q:me):Q=me,k){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=Q+ye,k={id:x++,callback:X,priorityLevel:k,startTime:Q,expirationTime:ye,sortIndex:-1},Q>me?(k.sortIndex=Q,a(p,k),r(g)===null&&k===r(p)&&(B?(Y(R),R=-1):B=!0,Ee(de,Q-me))):(k.sortIndex=ye,a(g,k),L||N||(L=!0,fe||(fe=!0,Se()))),k},n.unstable_shouldYield=ke,n.unstable_wrapCallback=function(k){var X=T;return function(){var Q=T;T=X;try{return k.apply(this,arguments)}finally{T=Q}}}})(rf)),rf}var tg;function w1(){return tg||(tg=1,af.exports=S1()),af.exports}var sf={exports:{}},$t={};var ng;function E1(){if(ng)return $t;ng=1;var n=Pf();function a(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)p+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var l={d:{f:r,r:function(){throw Error(a(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(g,p,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:y==null?null:""+y,children:g,containerInfo:p,implementation:x}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return $t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,$t.createPortal=function(g,p){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(a(299));return f(g,p,null,x)},$t.flushSync=function(g){var p=d.T,x=l.p;try{if(d.T=null,l.p=2,g)return g()}finally{d.T=p,l.p=x,l.d.f()}},$t.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,l.d.C(g,p))},$t.prefetchDNS=function(g){typeof g=="string"&&l.d.D(g)},$t.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var x=p.as,y=m(x,p.crossOrigin),T=typeof p.integrity=="string"?p.integrity:void 0,N=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;x==="style"?l.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:T,fetchPriority:N}):x==="script"&&l.d.X(g,{crossOrigin:y,integrity:T,fetchPriority:N,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},$t.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var x=m(p.as,p.crossOrigin);l.d.M(g,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&l.d.M(g)},$t.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var x=p.as,y=m(x,p.crossOrigin);l.d.L(g,x,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},$t.preloadModule=function(g,p){if(typeof g=="string")if(p){var x=m(p.as,p.crossOrigin);l.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else l.d.m(g)},$t.requestFormReset=function(g){l.d.r(g)},$t.unstable_batchedUpdates=function(g,p){return g(p)},$t.useFormState=function(g,p,x){return d.H.useFormState(g,p,x)},$t.useFormStatus=function(){return d.H.useHostTransitionStatus()},$t.version="19.2.4",$t}var ag;function yy(){if(ag)return sf.exports;ag=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),sf.exports=E1(),sf.exports}var ig;function T1(){if(ig)return Bs;ig=1;var n=w1(),a=Pf(),r=yy();function l(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(l(188))}function p(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(l(188));return t!==e?null:e}for(var i=e,s=t;;){var o=i.return;if(o===null)break;var u=o.alternate;if(u===null){if(s=o.return,s!==null){i=s;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===i)return g(o),e;if(u===s)return g(o),t;u=u.sibling}throw Error(l(188))}if(i.return!==s.return)i=o,s=u;else{for(var h=!1,b=o.child;b;){if(b===i){h=!0,i=o,s=u;break}if(b===s){h=!0,s=o,i=u;break}b=b.sibling}if(!h){for(b=u.child;b;){if(b===i){h=!0,i=u,s=o;break}if(b===s){h=!0,s=u,i=o;break}b=b.sibling}if(!h)throw Error(l(189))}}if(i.alternate!==s)throw Error(l(190))}if(i.tag!==3)throw Error(l(188));return i.stateNode.current===i?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,T=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),W=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),ke=Symbol.for("react.memo_cache_sentinel"),Re=Symbol.iterator;function Se(e){return e===null||typeof e!="object"?null:(e=Re&&e[Re]||e["@@iterator"],typeof e=="function"?e:null)}var Me=Symbol.for("react.client.reference");function ze(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case B:return"Fragment";case K:return"Profiler";case P:return"StrictMode";case de:return"Suspense";case fe:return"SuspenseList";case ie:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case L:return"Portal";case W:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case he:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case R:return t=e.displayName||null,t!==null?t:ze(e.type)||"Memo";case V:t=e._payload,e=e._init;try{return ze(e(t))}catch{}}return null}var Ee=Array.isArray,k=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},me=[],ye=-1;function C(e){return{current:e}}function q(e){0>ye||(e.current=me[ye],me[ye]=null,ye--)}function H(e,t){ye++,me[ye]=e.current,e.current=t}var I=C(null),ee=C(null),$=C(null),ae=C(null);function Te(e,t){switch(H($,t),H(ee,e),H(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?bp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=bp(t),e=xp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(I),H(I,e)}function Be(){q(I),q(ee),q($)}function Pt(e){e.memoizedState!==null&&H(ae,e);var t=I.current,i=xp(t,e.type);t!==i&&(H(ee,e),H(I,i))}function en(e){ee.current===e&&(q(I),q(ee)),ae.current===e&&(q(ae),Ds._currentValue=Q)}var Je,Fn;function sn(e){if(Je===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Je=t&&t[1]||"",Fn=-1<i.stack.indexOf(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GeneralSettingsPage-TqbAsCZM.js","assets/select-B9kjO67b.js","assets/chevron-down-BXYCSpWd.js","assets/check-BVOtZt28.js","assets/textarea-BB3UoYxg.js","assets/switch-C2r5pofB.js","assets/use-providers-SSHcslI-.js","assets/ProviderSettingsPage-B-bBs2qN.js","assets/confirm-dialog-BJwzwwOk.js","assets/modal-ZYdX5Krr.js","assets/mermaid-NOHMQCX5-orMHhlAj.js","assets/chevron-right-CkcSaX8x.js","assets/mermaid-NOHMQCX5-lI9o3AWT.css","assets/AgentLogo-C190Z6bw.js","assets/SettingsMasterDetail-BYB-1oyf.js","assets/arrow-left-CB4qTjQs.js","assets/trash-2-BNiAEW-6.js","assets/upload-BLLmywZY.js","assets/pencil-DoB4p30x.js","assets/TeamSettingsPage-Y2zCVbVD.js","assets/MemberAvatar-BPoYS6Il.js","assets/chevron-up-Y8L6pbzc.js","assets/ProjectSettingsPage-Cp89NvwE.js","assets/use-projects-D_Sq7ahS.js","assets/folder-picker-CioQjSzV.js","assets/circle-alert-ClX4sQ2K.js","assets/NotificationSettingsPage-CNsRJ6nN.js","assets/message-square-CStQg7sr.js","assets/McpSettingsPage-z1_NcsMR.js","assets/copy-jQAntc98.js","assets/ProfileSettingsPage-g1RKcEbo.js","assets/use-profiles-OJaV4lOv.js","assets/layers-BZMh9pqm.js","assets/ProjectKanbanPage-j2v5fLfg.js","assets/Icons-CyNNz4Z5.js","assets/CreateTaskInput-ByeWDjc8.js","assets/useNormalizedLogs-DeA-fso_.js","assets/ProjectKanbanPage-DcpNTP1B.css","assets/ConversationPage-Cer_WtdC.js","assets/AgentDemoPage-BpUO2gR6.js"])))=>i.map(i=>d[i]);
2
+ function g1(n,a){for(var r=0;r<a.length;r++){const l=a[r];if(typeof l!="string"&&!Array.isArray(l)){for(const c in l)if(c!=="default"&&!(c in n)){const f=Object.getOwnPropertyDescriptor(l,c);f&&Object.defineProperty(n,c,f.get?f:{enumerable:!0,get:()=>l[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function r(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function l(c){if(c.ep)return;c.ep=!0;const f=r(c);fetch(c.href,f)}})();function gy(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ef={exports:{}},Us={};var Zp;function y1(){if(Zp)return Us;Zp=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function r(l,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var m in c)m!=="key"&&(f[m]=c[m])}else f=c;return c=f.ref,{$$typeof:n,type:l,key:d,ref:c!==void 0?c:null,props:f}}return Us.Fragment=a,Us.jsx=r,Us.jsxs=r,Us}var Jp;function v1(){return Jp||(Jp=1,ef.exports=y1()),ef.exports}var v=v1(),tf={exports:{}},Ne={};var $p;function b1(){if($p)return Ne;$p=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),T=Symbol.iterator;function N(A){return A===null||typeof A!="object"?null:(A=T&&A[T]||A["@@iterator"],typeof A=="function"?A:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,P={};function K(A,q,H){this.props=A,this.context=q,this.refs=P,this.updater=H||L}K.prototype.isReactComponent={},K.prototype.setState=function(A,q){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,q,"setState")},K.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function Y(){}Y.prototype=K.prototype;function W(A,q,H){this.props=A,this.context=q,this.refs=P,this.updater=H||L}var he=W.prototype=new Y;he.constructor=W,B(he,K.prototype),he.isPureReactComponent=!0;var de=Array.isArray;function fe(){}var R={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function ie(A,q,H){var Z=H.ref;return{$$typeof:n,type:A,key:q,ref:Z!==void 0?Z:null,props:H}}function ke(A,q){return ie(A.type,q,A.props)}function Re(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function Se(A){var q={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(H){return q[H]})}var Me=/\/+/g;function ze(A,q){return typeof A=="object"&&A!==null&&A.key!=null?Se(""+A.key):q.toString(36)}function Ee(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(fe,fe):(A.status="pending",A.then(function(q){A.status==="pending"&&(A.status="fulfilled",A.value=q)},function(q){A.status==="pending"&&(A.status="rejected",A.reason=q)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function k(A,q,H,Z,ee){var $=typeof A;($==="undefined"||$==="boolean")&&(A=null);var ae=!1;if(A===null)ae=!0;else switch($){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(A.$$typeof){case n:case a:ae=!0;break;case x:return ae=A._init,k(ae(A._payload),q,H,Z,ee)}}if(ae)return ee=ee(A),ae=Z===""?"."+ze(A,0):Z,de(ee)?(H="",ae!=null&&(H=ae.replace(Me,"$&/")+"/"),k(ee,q,H,"",function(Pt){return Pt})):ee!=null&&(Re(ee)&&(ee=ke(ee,H+(ee.key==null||A&&A.key===ee.key?"":(""+ee.key).replace(Me,"$&/")+"/")+ae)),q.push(ee)),1;ae=0;var Te=Z===""?".":Z+":";if(de(A))for(var Be=0;Be<A.length;Be++)Z=A[Be],$=Te+ze(Z,Be),ae+=k(Z,q,H,$,ee);else if(Be=N(A),typeof Be=="function")for(A=Be.call(A),Be=0;!(Z=A.next()).done;)Z=Z.value,$=Te+ze(Z,Be++),ae+=k(Z,q,H,$,ee);else if($==="object"){if(typeof A.then=="function")return k(Ee(A),q,H,Z,ee);throw q=String(A),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ae}function X(A,q,H){if(A==null)return A;var Z=[],ee=0;return k(A,Z,"","",function($){return q.call(H,$,ee++)}),Z}function Q(A){if(A._status===-1){var q=A._result;q=q(),q.then(function(H){(A._status===0||A._status===-1)&&(A._status=1,A._result=H)},function(H){(A._status===0||A._status===-1)&&(A._status=2,A._result=H)}),A._status===-1&&(A._status=0,A._result=q)}if(A._status===1)return A._result.default;throw A._result}var me=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},ye={map:X,forEach:function(A,q,H){X(A,function(){q.apply(this,arguments)},H)},count:function(A){var q=0;return X(A,function(){q++}),q},toArray:function(A){return X(A,function(q){return q})||[]},only:function(A){if(!Re(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Ne.Activity=y,Ne.Children=ye,Ne.Component=K,Ne.Fragment=r,Ne.Profiler=c,Ne.PureComponent=W,Ne.StrictMode=l,Ne.Suspense=g,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(A){return R.H.useMemoCache(A)}},Ne.cache=function(A){return function(){return A.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(A,q,H){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var Z=B({},A.props),ee=A.key;if(q!=null)for($ in q.key!==void 0&&(ee=""+q.key),q)!V.call(q,$)||$==="key"||$==="__self"||$==="__source"||$==="ref"&&q.ref===void 0||(Z[$]=q[$]);var $=arguments.length-2;if($===1)Z.children=H;else if(1<$){for(var ae=Array($),Te=0;Te<$;Te++)ae[Te]=arguments[Te+2];Z.children=ae}return ie(A.type,ee,Z)},Ne.createContext=function(A){return A={$$typeof:d,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:f,_context:A},A},Ne.createElement=function(A,q,H){var Z,ee={},$=null;if(q!=null)for(Z in q.key!==void 0&&($=""+q.key),q)V.call(q,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ee[Z]=q[Z]);var ae=arguments.length-2;if(ae===1)ee.children=H;else if(1<ae){for(var Te=Array(ae),Be=0;Be<ae;Be++)Te[Be]=arguments[Be+2];ee.children=Te}if(A&&A.defaultProps)for(Z in ae=A.defaultProps,ae)ee[Z]===void 0&&(ee[Z]=ae[Z]);return ie(A,$,ee)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(A){return{$$typeof:m,render:A}},Ne.isValidElement=Re,Ne.lazy=function(A){return{$$typeof:x,_payload:{_status:-1,_result:A},_init:Q}},Ne.memo=function(A,q){return{$$typeof:p,type:A,compare:q===void 0?null:q}},Ne.startTransition=function(A){var q=R.T,H={};R.T=H;try{var Z=A(),ee=R.S;ee!==null&&ee(H,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(fe,me)}catch($){me($)}finally{q!==null&&H.types!==null&&(q.types=H.types),R.T=q}},Ne.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},Ne.use=function(A){return R.H.use(A)},Ne.useActionState=function(A,q,H){return R.H.useActionState(A,q,H)},Ne.useCallback=function(A,q){return R.H.useCallback(A,q)},Ne.useContext=function(A){return R.H.useContext(A)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(A,q){return R.H.useDeferredValue(A,q)},Ne.useEffect=function(A,q){return R.H.useEffect(A,q)},Ne.useEffectEvent=function(A){return R.H.useEffectEvent(A)},Ne.useId=function(){return R.H.useId()},Ne.useImperativeHandle=function(A,q,H){return R.H.useImperativeHandle(A,q,H)},Ne.useInsertionEffect=function(A,q){return R.H.useInsertionEffect(A,q)},Ne.useLayoutEffect=function(A,q){return R.H.useLayoutEffect(A,q)},Ne.useMemo=function(A,q){return R.H.useMemo(A,q)},Ne.useOptimistic=function(A,q){return R.H.useOptimistic(A,q)},Ne.useReducer=function(A,q,H){return R.H.useReducer(A,q,H)},Ne.useRef=function(A){return R.H.useRef(A)},Ne.useState=function(A){return R.H.useState(A)},Ne.useSyncExternalStore=function(A,q,H){return R.H.useSyncExternalStore(A,q,H)},Ne.useTransition=function(){return R.H.useTransition()},Ne.version="19.2.4",Ne}var Wp;function Pf(){return Wp||(Wp=1,tf.exports=b1()),tf.exports}var S=Pf();const ne=gy(S),x1=g1({__proto__:null,default:ne},[S]);var nf={exports:{}},Bs={},af={exports:{}},rf={};var eg;function S1(){return eg||(eg=1,(function(n){function a(k,X){var Q=k.length;k.push(X);e:for(;0<Q;){var me=Q-1>>>1,ye=k[me];if(0<c(ye,X))k[me]=X,k[Q]=ye,Q=me;else break e}}function r(k){return k.length===0?null:k[0]}function l(k){if(k.length===0)return null;var X=k[0],Q=k.pop();if(Q!==X){k[0]=Q;e:for(var me=0,ye=k.length,A=ye>>>1;me<A;){var q=2*(me+1)-1,H=k[q],Z=q+1,ee=k[Z];if(0>c(H,Q))Z<ye&&0>c(ee,H)?(k[me]=ee,k[Z]=Q,me=Z):(k[me]=H,k[q]=Q,me=q);else if(Z<ye&&0>c(ee,Q))k[me]=ee,k[Z]=Q,me=Z;else break e}}return X}function c(k,X){var Q=k.sortIndex-X.sortIndex;return Q!==0?Q:k.id-X.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var g=[],p=[],x=1,y=null,T=3,N=!1,L=!1,B=!1,P=!1,K=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function he(k){for(var X=r(p);X!==null;){if(X.callback===null)l(p);else if(X.startTime<=k)l(p),X.sortIndex=X.expirationTime,a(g,X);else break;X=r(p)}}function de(k){if(B=!1,he(k),!L)if(r(g)!==null)L=!0,fe||(fe=!0,Se());else{var X=r(p);X!==null&&Ee(de,X.startTime-k)}}var fe=!1,R=-1,V=5,ie=-1;function ke(){return P?!0:!(n.unstable_now()-ie<V)}function Re(){if(P=!1,fe){var k=n.unstable_now();ie=k;var X=!0;try{e:{L=!1,B&&(B=!1,Y(R),R=-1),N=!0;var Q=T;try{t:{for(he(k),y=r(g);y!==null&&!(y.expirationTime>k&&ke());){var me=y.callback;if(typeof me=="function"){y.callback=null,T=y.priorityLevel;var ye=me(y.expirationTime<=k);if(k=n.unstable_now(),typeof ye=="function"){y.callback=ye,he(k),X=!0;break t}y===r(g)&&l(g),he(k)}else l(g);y=r(g)}if(y!==null)X=!0;else{var A=r(p);A!==null&&Ee(de,A.startTime-k),X=!1}}break e}finally{y=null,T=Q,N=!1}X=void 0}}finally{X?Se():fe=!1}}}var Se;if(typeof W=="function")Se=function(){W(Re)};else if(typeof MessageChannel<"u"){var Me=new MessageChannel,ze=Me.port2;Me.port1.onmessage=Re,Se=function(){ze.postMessage(null)}}else Se=function(){K(Re,0)};function Ee(k,X){R=K(function(){k(n.unstable_now())},X)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(k){k.callback=null},n.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<k?Math.floor(1e3/k):5},n.unstable_getCurrentPriorityLevel=function(){return T},n.unstable_next=function(k){switch(T){case 1:case 2:case 3:var X=3;break;default:X=T}var Q=T;T=X;try{return k()}finally{T=Q}},n.unstable_requestPaint=function(){P=!0},n.unstable_runWithPriority=function(k,X){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var Q=T;T=k;try{return X()}finally{T=Q}},n.unstable_scheduleCallback=function(k,X,Q){var me=n.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?me+Q:me):Q=me,k){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=Q+ye,k={id:x++,callback:X,priorityLevel:k,startTime:Q,expirationTime:ye,sortIndex:-1},Q>me?(k.sortIndex=Q,a(p,k),r(g)===null&&k===r(p)&&(B?(Y(R),R=-1):B=!0,Ee(de,Q-me))):(k.sortIndex=ye,a(g,k),L||N||(L=!0,fe||(fe=!0,Se()))),k},n.unstable_shouldYield=ke,n.unstable_wrapCallback=function(k){var X=T;return function(){var Q=T;T=X;try{return k.apply(this,arguments)}finally{T=Q}}}})(rf)),rf}var tg;function w1(){return tg||(tg=1,af.exports=S1()),af.exports}var sf={exports:{}},$t={};var ng;function E1(){if(ng)return $t;ng=1;var n=Pf();function a(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)p+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var l={d:{f:r,r:function(){throw Error(a(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(g,p,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:y==null?null:""+y,children:g,containerInfo:p,implementation:x}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return $t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,$t.createPortal=function(g,p){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(a(299));return f(g,p,null,x)},$t.flushSync=function(g){var p=d.T,x=l.p;try{if(d.T=null,l.p=2,g)return g()}finally{d.T=p,l.p=x,l.d.f()}},$t.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,l.d.C(g,p))},$t.prefetchDNS=function(g){typeof g=="string"&&l.d.D(g)},$t.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var x=p.as,y=m(x,p.crossOrigin),T=typeof p.integrity=="string"?p.integrity:void 0,N=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;x==="style"?l.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:T,fetchPriority:N}):x==="script"&&l.d.X(g,{crossOrigin:y,integrity:T,fetchPriority:N,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},$t.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var x=m(p.as,p.crossOrigin);l.d.M(g,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&l.d.M(g)},$t.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var x=p.as,y=m(x,p.crossOrigin);l.d.L(g,x,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},$t.preloadModule=function(g,p){if(typeof g=="string")if(p){var x=m(p.as,p.crossOrigin);l.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else l.d.m(g)},$t.requestFormReset=function(g){l.d.r(g)},$t.unstable_batchedUpdates=function(g,p){return g(p)},$t.useFormState=function(g,p,x){return d.H.useFormState(g,p,x)},$t.useFormStatus=function(){return d.H.useHostTransitionStatus()},$t.version="19.2.4",$t}var ag;function yy(){if(ag)return sf.exports;ag=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),sf.exports=E1(),sf.exports}var ig;function T1(){if(ig)return Bs;ig=1;var n=w1(),a=Pf(),r=yy();function l(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(l(188))}function p(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(l(188));return t!==e?null:e}for(var i=e,s=t;;){var o=i.return;if(o===null)break;var u=o.alternate;if(u===null){if(s=o.return,s!==null){i=s;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===i)return g(o),e;if(u===s)return g(o),t;u=u.sibling}throw Error(l(188))}if(i.return!==s.return)i=o,s=u;else{for(var h=!1,b=o.child;b;){if(b===i){h=!0,i=o,s=u;break}if(b===s){h=!0,s=o,i=u;break}b=b.sibling}if(!h){for(b=u.child;b;){if(b===i){h=!0,i=u,s=o;break}if(b===s){h=!0,s=u,i=o;break}b=b.sibling}if(!h)throw Error(l(189))}}if(i.alternate!==s)throw Error(l(190))}if(i.tag!==3)throw Error(l(188));return i.stateNode.current===i?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,T=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),W=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),ke=Symbol.for("react.memo_cache_sentinel"),Re=Symbol.iterator;function Se(e){return e===null||typeof e!="object"?null:(e=Re&&e[Re]||e["@@iterator"],typeof e=="function"?e:null)}var Me=Symbol.for("react.client.reference");function ze(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case B:return"Fragment";case K:return"Profiler";case P:return"StrictMode";case de:return"Suspense";case fe:return"SuspenseList";case ie:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case L:return"Portal";case W:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case he:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case R:return t=e.displayName||null,t!==null?t:ze(e.type)||"Memo";case V:t=e._payload,e=e._init;try{return ze(e(t))}catch{}}return null}var Ee=Array.isArray,k=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},me=[],ye=-1;function A(e){return{current:e}}function q(e){0>ye||(e.current=me[ye],me[ye]=null,ye--)}function H(e,t){ye++,me[ye]=e.current,e.current=t}var Z=A(null),ee=A(null),$=A(null),ae=A(null);function Te(e,t){switch(H($,t),H(ee,e),H(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?bp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=bp(t),e=xp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(Z),H(Z,e)}function Be(){q(Z),q(ee),q($)}function Pt(e){e.memoizedState!==null&&H(ae,e);var t=Z.current,i=xp(t,e.type);t!==i&&(H(ee,e),H(Z,i))}function en(e){ee.current===e&&(q(Z),q(ee)),ae.current===e&&(q(ae),Ds._currentValue=Q)}var Je,Fn;function sn(e){if(Je===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Je=t&&t[1]||"",Fn=-1<i.stack.indexOf(`
3
3
  at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
4
- `+Je+e+Fn}var Si=!1;function ln(e,t){if(!e||Si)return"";Si=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(U){var j=U}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(U){j=U}e.call(Z.prototype)}}else{try{throw Error()}catch(U){j=U}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(U){if(U&&j&&typeof U.stack=="string")return[U.stack,j.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=s.DetermineComponentFrameRoot(),h=u[0],b=u[1];if(h&&b){var E=h.split(`
4
+ `+Je+e+Fn}var Si=!1;function ln(e,t){if(!e||Si)return"";Si=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(U){var j=U}Reflect.construct(e,[],I)}else{try{I.call()}catch(U){j=U}e.call(I.prototype)}}else{try{throw Error()}catch(U){j=U}(I=e())&&typeof I.catch=="function"&&I.catch(function(){})}}catch(U){if(U&&j&&typeof U.stack=="string")return[U.stack,j.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=s.DetermineComponentFrameRoot(),h=u[0],b=u[1];if(h&&b){var E=h.split(`
5
5
  `),D=b.split(`
6
6
  `);for(o=s=0;s<E.length&&!E[s].includes("DetermineComponentFrameRoot");)s++;for(;o<D.length&&!D[o].includes("DetermineComponentFrameRoot");)o++;if(s===E.length||o===D.length)for(s=E.length-1,o=D.length-1;1<=s&&0<=o&&E[s]!==D[o];)o--;for(;1<=s&&0<=o;s--,o--)if(E[s]!==D[o]){if(s!==1||o!==1)do if(s--,o--,0>o||E[s]!==D[o]){var G=`
7
7
  `+E[s].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=s&&0<=o);break}}}finally{Si=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?sn(i):""}function ga(e,t){switch(e.tag){case 26:case 27:case 5:return sn(e.type);case 16:return sn("Lazy");case 13:return e.child!==t&&t!==null?sn("Suspense Fallback"):sn("Suspense");case 19:return sn("SuspenseList");case 0:case 15:return ln(e.type,!1);case 11:return ln(e.type.render,!1);case 1:return ln(e.type,!0);case 31:return sn("Activity");default:return""}}function wi(e){try{var t="",i=null;do t+=ga(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
8
8
  Error generating stack: `+s.message+`
9
- `+s.stack}}var It=Object.prototype.hasOwnProperty,Ei=n.unstable_scheduleCallback,Ti=n.unstable_cancelCallback,Gt=n.unstable_shouldYield,ia=n.unstable_requestPaint,gt=n.unstable_now,ya=n.unstable_getCurrentPriorityLevel,ra=n.unstable_ImmediatePriority,Qa=n.unstable_UserBlockingPriority,Kt=n.unstable_NormalPriority,tn=n.unstable_LowPriority,kn=n.unstable_IdlePriority,Wi=n.log,Nn=n.unstable_setDisableYieldValue,va=null,ct=null;function on(e){if(typeof Wi=="function"&&Nn(e),ct&&typeof ct.setStrictMode=="function")try{ct.setStrictMode(va,e)}catch{}}var Lt=Math.clz32?Math.clz32:yn,er=Math.log,Ci=Math.LN2;function yn(e){return e>>>=0,e===0?32:31-(er(e)/Ci|0)|0}var Xn=256,ba=262144,Zn=4194304;function On(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function _e(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var o=0,u=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var b=s&134217727;return b!==0?(s=b&~u,s!==0?o=On(s):(h&=b,h!==0?o=On(h):i||(i=b&~e,i!==0&&(o=On(i))))):(b=s&~u,b!==0?o=On(b):h!==0?o=On(h):i||(i=s&~e,i!==0&&(o=On(i)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,i=t&-t,u>=i||u===32&&(i&4194048)!==0)?t:o}function ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Et(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Tt(){var e=Zn;return Zn<<=1,(Zn&62914560)===0&&(Zn=4194304),e}function vn(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Jt(e,t,i,s,o,u){var h=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var b=e.entanglements,E=e.expirationTimes,D=e.hiddenUpdates;for(i=h&~i;0<i;){var G=31-Lt(i),Z=1<<G;b[G]=0,E[G]=-1;var j=D[G];if(j!==null)for(D[G]=null,G=0;G<j.length;G++){var U=j[G];U!==null&&(U.lane&=-536870913)}i&=~Z}s!==0&&xa(e,s,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(h&~t))}function xa(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Lt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function w(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Lt(i),o=1<<s;o&t|e[s]&t&&(e[s]|=t),i&=~o}}function _(e,t){var i=t&-t;return i=(i&42)!==0?1:z(i),(i&(e.suspendedLanes|t))!==0?0:i}function z(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function J(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function te(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:Gp(e.type))}function ve(e,t){var i=X.p;try{return X.p=e,t()}finally{X.p=i}}var se=Math.random().toString(36).slice(2),re="__reactFiber$"+se,le="__reactProps$"+se,ge="__reactContainer$"+se,Ce="__reactEvents$"+se,xe="__reactListeners$"+se,Ie="__reactHandles$"+se,Ke="__reactResources$"+se,yt="__reactMarker$"+se;function bt(e){delete e[re],delete e[le],delete e[Ce],delete e[xe],delete e[Ie]}function xt(e){var t=e[re];if(t)return t;for(var i=e.parentNode;i;){if(t=i[ge]||i[re]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Rp(e);e!==null;){if(i=e[re])return i;e=Rp(e)}return t}e=i,i=e.parentNode}return null}function Ve(e){if(e=e[re]||e[ge]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(l(33))}function un(e){var t=e[Ke];return t||(t=e[Ke]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function mt(e){e[yt]=!0}var In=new Set,bn={};function Jn(e,t){Mn(e,t),Mn(e+"Capture",t)}function Mn(e,t){for(bn[e]=t,e=0;e<t.length;e++)In.add(t[e])}var Sa=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]*$"),Ai={},Ri={};function Ye(e){return It.call(Ri,e)?!0:It.call(Ai,e)?!1:Sa.test(e)?Ri[e]=!0:(Ai[e]=!0,!1)}function Ct(e,t,i){if(Ye(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function $n(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function Vt(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function Fe(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _i(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sl(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var o=s.get,u=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(h){i=""+h,u.call(this,h)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(h){i=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zr(e){if(!e._valueTracker){var t=_i(e)?"checked":"value";e._valueTracker=sl(e,t,""+e[t])}}function dd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=_i(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function ll(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var c0=/[\n"\\]/g;function Dn(e){return e.replace(c0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Xo(e,t,i,s,o,u,h,b){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Fe(t)):e.value!==""+Fe(t)&&(e.value=""+Fe(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?Zo(e,h,Fe(t)):i!=null?Zo(e,h,Fe(i)):s!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Fe(b):e.removeAttribute("name")}function hd(e,t,i,s,o,u,h,b){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||i!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Zr(e);return}i=i!=null?""+Fe(i):"",t=t!=null?""+Fe(t):i,b||t===e.value||(e.value=t),e.defaultValue=t}s=s??o,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=b?e.checked:!!s,e.defaultChecked=!!s,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Zr(e)}function Zo(e,t,i){t==="number"&&ll(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function tr(e,t,i,s){if(e=e.options,t){t={};for(var o=0;o<i.length;o++)t["$"+i[o]]=!0;for(i=0;i<e.length;i++)o=t.hasOwnProperty("$"+e[i].value),e[i].selected!==o&&(e[i].selected=o),o&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Fe(i),t=null,o=0;o<e.length;o++){if(e[o].value===i){e[o].selected=!0,s&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function md(e,t,i){if(t!=null&&(t=""+Fe(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Fe(i):""}function pd(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(l(92));if(Ee(s)){if(1<s.length)throw Error(l(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Fe(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),Zr(e)}function nr(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var f0=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 gd(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||f0.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function yd(e,t,i){if(t!=null&&typeof t!="object")throw Error(l(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var o in t)s=t[o],t.hasOwnProperty(o)&&i[o]!==s&&gd(e,o,s)}else for(var u in t)t.hasOwnProperty(u)&&gd(e,u,t[u])}function Io(e){if(e.indexOf("-")===-1)return!1;switch(e){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 d0=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"]]),h0=/^[\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 ol(e){return h0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function wa(){}var Jo=null;function $o(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ar=null,ir=null;function vd(e){var t=Ve(e);if(t&&(e=t.stateNode)){var i=e[le]||null;e:switch(e=t.stateNode,t.type){case"input":if(Xo(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Dn(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var o=s[le]||null;if(!o)throw Error(l(90));Xo(s,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&dd(s)}break e;case"textarea":md(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&tr(e,!!i.multiple,t,!1)}}}var Wo=!1;function bd(e,t,i){if(Wo)return e(t,i);Wo=!0;try{var s=e(t);return s}finally{if(Wo=!1,(ar!==null||ir!==null)&&(Zl(),ar&&(t=ar,e=ir,ir=ar=null,vd(t),e)))for(t=0;t<e.length;t++)vd(e[t])}}function Ir(e,t){var i=e.stateNode;if(i===null)return null;var s=i[le]||null;if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(l(231,t,typeof i));return i}var Ea=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),eu=!1;if(Ea)try{var Jr={};Object.defineProperty(Jr,"passive",{get:function(){eu=!0}}),window.addEventListener("test",Jr,Jr),window.removeEventListener("test",Jr,Jr)}catch{eu=!1}var Pa=null,tu=null,ul=null;function xd(){if(ul)return ul;var e,t=tu,i=t.length,s,o="value"in Pa?Pa.value:Pa.textContent,u=o.length;for(e=0;e<i&&t[e]===o[e];e++);var h=i-e;for(s=1;s<=h&&t[i-s]===o[u-s];s++);return ul=o.slice(e,1<s?1-s:void 0)}function cl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function fl(){return!0}function Sd(){return!1}function cn(e){function t(i,s,o,u,h){this._reactName=i,this._targetInst=o,this.type=s,this.nativeEvent=u,this.target=h,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(i=e[b],this[b]=i?i(u):u[b]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?fl:Sd,this.isPropagationStopped=Sd,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=fl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=fl)},persist:function(){},isPersistent:fl}),t}var ki={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dl=cn(ki),$r=y({},ki,{view:0,detail:0}),m0=cn($r),nu,au,Wr,hl=y({},$r,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ru,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Wr&&(Wr&&e.type==="mousemove"?(nu=e.screenX-Wr.screenX,au=e.screenY-Wr.screenY):au=nu=0,Wr=e),nu)},movementY:function(e){return"movementY"in e?e.movementY:au}}),wd=cn(hl),p0=y({},hl,{dataTransfer:0}),g0=cn(p0),y0=y({},$r,{relatedTarget:0}),iu=cn(y0),v0=y({},ki,{animationName:0,elapsedTime:0,pseudoElement:0}),b0=cn(v0),x0=y({},ki,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),S0=cn(x0),w0=y({},ki,{data:0}),Ed=cn(w0),E0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},T0={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"},C0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function A0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=C0[e])?!!t[e]:!1}function ru(){return A0}var R0=y({},$r,{key:function(e){if(e.key){var t=E0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?T0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ru,charCode:function(e){return e.type==="keypress"?cl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_0=cn(R0),k0=y({},hl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=cn(k0),N0=y({},$r,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ru}),O0=cn(N0),M0=y({},ki,{propertyName:0,elapsedTime:0,pseudoElement:0}),D0=cn(M0),j0=y({},hl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),z0=cn(j0),L0=y({},ki,{newState:0,oldState:0}),U0=cn(L0),B0=[9,13,27,32],su=Ea&&"CompositionEvent"in window,es=null;Ea&&"documentMode"in document&&(es=document.documentMode);var q0=Ea&&"TextEvent"in window&&!es,Cd=Ea&&(!su||es&&8<es&&11>=es),Ad=" ",Rd=!1;function _d(e,t){switch(e){case"keyup":return B0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rr=!1;function H0(e,t){switch(e){case"compositionend":return kd(t);case"keypress":return t.which!==32?null:(Rd=!0,Ad);case"textInput":return e=t.data,e===Ad&&Rd?null:e;default:return null}}function Q0(e,t){if(rr)return e==="compositionend"||!su&&_d(e,t)?(e=xd(),ul=tu=Pa=null,rr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Cd&&t.locale!=="ko"?null:t.data;default:return null}}var P0={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 Nd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!P0[e.type]:t==="textarea"}function Od(e,t,i,s){ar?ir?ir.push(s):ir=[s]:ar=s,t=no(t,"onChange"),0<t.length&&(i=new dl("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var ts=null,ns=null;function G0(e){hp(e,0)}function ml(e){var t=Ht(e);if(dd(t))return e}function Md(e,t){if(e==="change")return t}var Dd=!1;if(Ea){var lu;if(Ea){var ou="oninput"in document;if(!ou){var jd=document.createElement("div");jd.setAttribute("oninput","return;"),ou=typeof jd.oninput=="function"}lu=ou}else lu=!1;Dd=lu&&(!document.documentMode||9<document.documentMode)}function zd(){ts&&(ts.detachEvent("onpropertychange",Ld),ns=ts=null)}function Ld(e){if(e.propertyName==="value"&&ml(ns)){var t=[];Od(t,ns,e,$o(e)),bd(G0,t)}}function K0(e,t,i){e==="focusin"?(zd(),ts=t,ns=i,ts.attachEvent("onpropertychange",Ld)):e==="focusout"&&zd()}function V0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ml(ns)}function Y0(e,t){if(e==="click")return ml(t)}function F0(e,t){if(e==="input"||e==="change")return ml(t)}function X0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xn=typeof Object.is=="function"?Object.is:X0;function as(e,t){if(xn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var o=i[s];if(!It.call(t,o)||!xn(e[o],t[o]))return!1}return!0}function Ud(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Bd(e,t){var i=Ud(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Ud(i)}}function qd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ll(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=ll(e.document)}return t}function uu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Z0=Ea&&"documentMode"in document&&11>=document.documentMode,sr=null,cu=null,is=null,fu=!1;function Qd(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;fu||sr==null||sr!==ll(s)||(s=sr,"selectionStart"in s&&uu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),is&&as(is,s)||(is=s,s=no(cu,"onSelect"),0<s.length&&(t=new dl("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=sr)))}function Ni(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var lr={animationend:Ni("Animation","AnimationEnd"),animationiteration:Ni("Animation","AnimationIteration"),animationstart:Ni("Animation","AnimationStart"),transitionrun:Ni("Transition","TransitionRun"),transitionstart:Ni("Transition","TransitionStart"),transitioncancel:Ni("Transition","TransitionCancel"),transitionend:Ni("Transition","TransitionEnd")},du={},Pd={};Ea&&(Pd=document.createElement("div").style,"AnimationEvent"in window||(delete lr.animationend.animation,delete lr.animationiteration.animation,delete lr.animationstart.animation),"TransitionEvent"in window||delete lr.transitionend.transition);function Oi(e){if(du[e])return du[e];if(!lr[e])return e;var t=lr[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Pd)return du[e]=t[i];return e}var Gd=Oi("animationend"),Kd=Oi("animationiteration"),Vd=Oi("animationstart"),I0=Oi("transitionrun"),J0=Oi("transitionstart"),$0=Oi("transitioncancel"),Yd=Oi("transitionend"),Fd=new Map,hu="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(" ");hu.push("scrollEnd");function Wn(e,t){Fd.set(e,t),Jn(t,[e])}var pl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},jn=[],or=0,mu=0;function gl(){for(var e=or,t=mu=or=0;t<e;){var i=jn[t];jn[t++]=null;var s=jn[t];jn[t++]=null;var o=jn[t];jn[t++]=null;var u=jn[t];if(jn[t++]=null,s!==null&&o!==null){var h=s.pending;h===null?o.next=o:(o.next=h.next,h.next=o),s.pending=o}u!==0&&Xd(i,o,u)}}function yl(e,t,i,s){jn[or++]=e,jn[or++]=t,jn[or++]=i,jn[or++]=s,mu|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function pu(e,t,i,s){return yl(e,t,i,s),vl(e)}function Mi(e,t){return yl(e,null,null,t),vl(e)}function Xd(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var o=!1,u=e.return;u!==null;)u.childLanes|=i,s=u.alternate,s!==null&&(s.childLanes|=i),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-Lt(i),e=u.hiddenUpdates,s=e[o],s===null?e[o]=[t]:s.push(t),t.lane=i|536870912),u):null}function vl(e){if(50<As)throw As=0,Tc=null,Error(l(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ur={};function W0(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sn(e,t,i,s){return new W0(e,t,i,s)}function gu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ta(e,t){var i=e.alternate;return i===null?(i=Sn(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Zd(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function bl(e,t,i,s,o,u){var h=0;if(s=e,typeof e=="function")gu(e)&&(h=1);else if(typeof e=="string")h=i1(e,i,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ie:return e=Sn(31,i,t,o),e.elementType=ie,e.lanes=u,e;case B:return Di(i.children,o,u,t);case P:h=8,o|=24;break;case K:return e=Sn(12,i,t,o|2),e.elementType=K,e.lanes=u,e;case de:return e=Sn(13,i,t,o),e.elementType=de,e.lanes=u,e;case fe:return e=Sn(19,i,t,o),e.elementType=fe,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:h=10;break e;case Y:h=9;break e;case he:h=11;break e;case R:h=14;break e;case V:h=16,s=null;break e}h=29,i=Error(l(130,e===null?"null":typeof e,"")),s=null}return t=Sn(h,i,t,o),t.elementType=e,t.type=s,t.lanes=u,t}function Di(e,t,i,s){return e=Sn(7,e,s,t),e.lanes=i,e}function yu(e,t,i){return e=Sn(6,e,null,t),e.lanes=i,e}function Id(e){var t=Sn(18,null,null,0);return t.stateNode=e,t}function vu(e,t,i){return t=Sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Jd=new WeakMap;function zn(e,t){if(typeof e=="object"&&e!==null){var i=Jd.get(e);return i!==void 0?i:(t={value:e,source:t,stack:wi(t)},Jd.set(e,t),t)}return{value:e,source:t,stack:wi(t)}}var cr=[],fr=0,xl=null,rs=0,Ln=[],Un=0,Ga=null,sa=1,la="";function Ca(e,t){cr[fr++]=rs,cr[fr++]=xl,xl=e,rs=t}function $d(e,t,i){Ln[Un++]=sa,Ln[Un++]=la,Ln[Un++]=Ga,Ga=e;var s=sa;e=la;var o=32-Lt(s)-1;s&=~(1<<o),i+=1;var u=32-Lt(t)+o;if(30<u){var h=o-o%5;u=(s&(1<<h)-1).toString(32),s>>=h,o-=h,sa=1<<32-Lt(t)+o|i<<o|s,la=u+e}else sa=1<<u|i<<o|s,la=e}function bu(e){e.return!==null&&(Ca(e,1),$d(e,1,0))}function xu(e){for(;e===xl;)xl=cr[--fr],cr[fr]=null,rs=cr[--fr],cr[fr]=null;for(;e===Ga;)Ga=Ln[--Un],Ln[Un]=null,la=Ln[--Un],Ln[Un]=null,sa=Ln[--Un],Ln[Un]=null}function Wd(e,t){Ln[Un++]=sa,Ln[Un++]=la,Ln[Un++]=Ga,sa=t.id,la=t.overflow,Ga=e}var Yt=null,ft=null,Xe=!1,Ka=null,Bn=!1,Su=Error(l(519));function Va(e){var t=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ss(zn(t,e)),Su}function eh(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[re]=e,t[le]=s,i){case"dialog":Qe("cancel",t),Qe("close",t);break;case"iframe":case"object":case"embed":Qe("load",t);break;case"video":case"audio":for(i=0;i<_s.length;i++)Qe(_s[i],t);break;case"source":Qe("error",t);break;case"img":case"image":case"link":Qe("error",t),Qe("load",t);break;case"details":Qe("toggle",t);break;case"input":Qe("invalid",t),hd(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Qe("invalid",t);break;case"textarea":Qe("invalid",t),pd(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||yp(t.textContent,i)?(s.popover!=null&&(Qe("beforetoggle",t),Qe("toggle",t)),s.onScroll!=null&&Qe("scroll",t),s.onScrollEnd!=null&&Qe("scrollend",t),s.onClick!=null&&(t.onclick=wa),t=!0):t=!1,t||Va(e,!0)}function th(e){for(Yt=e.return;Yt;)switch(Yt.tag){case 5:case 31:case 13:Bn=!1;return;case 27:case 3:Bn=!0;return;default:Yt=Yt.return}}function dr(e){if(e!==Yt)return!1;if(!Xe)return th(e),Xe=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||qc(e.type,e.memoizedProps)),i=!i),i&&ft&&Va(e),th(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));ft=Ap(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));ft=Ap(e)}else t===27?(t=ft,ri(e.type)?(e=Kc,Kc=null,ft=e):ft=t):ft=Yt?Hn(e.stateNode.nextSibling):null;return!0}function ji(){ft=Yt=null,Xe=!1}function wu(){var e=Ka;return e!==null&&(mn===null?mn=e:mn.push.apply(mn,e),Ka=null),e}function ss(e){Ka===null?Ka=[e]:Ka.push(e)}var Eu=C(null),zi=null,Aa=null;function Ya(e,t,i){H(Eu,t._currentValue),t._currentValue=i}function Ra(e){e._currentValue=Eu.current,q(Eu)}function Tu(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Cu(e,t,i,s){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var h=o.child;u=u.firstContext;e:for(;u!==null;){var b=u;u=o;for(var E=0;E<t.length;E++)if(b.context===t[E]){u.lanes|=i,b=u.alternate,b!==null&&(b.lanes|=i),Tu(u.return,i,e),s||(h=null);break e}u=b.next}}else if(o.tag===18){if(h=o.return,h===null)throw Error(l(341));h.lanes|=i,u=h.alternate,u!==null&&(u.lanes|=i),Tu(h,i,e),h=null}else h=o.child;if(h!==null)h.return=o;else for(h=o;h!==null;){if(h===e){h=null;break}if(o=h.sibling,o!==null){o.return=h.return,h=o;break}h=h.return}o=h}}function hr(e,t,i,s){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var h=o.alternate;if(h===null)throw Error(l(387));if(h=h.memoizedProps,h!==null){var b=o.type;xn(o.pendingProps.value,h.value)||(e!==null?e.push(b):e=[b])}}else if(o===ae.current){if(h=o.alternate,h===null)throw Error(l(387));h.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Ds):e=[Ds])}o=o.return}e!==null&&Cu(t,e,i,s),t.flags|=262144}function Sl(e){for(e=e.firstContext;e!==null;){if(!xn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Li(e){zi=e,Aa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ft(e){return nh(zi,e)}function wl(e,t){return zi===null&&Li(e),nh(e,t)}function nh(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Aa===null){if(e===null)throw Error(l(308));Aa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Aa=Aa.next=t;return i}var eb=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},tb=n.unstable_scheduleCallback,nb=n.unstable_NormalPriority,kt={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Au(){return{controller:new eb,data:new Map,refCount:0}}function ls(e){e.refCount--,e.refCount===0&&tb(nb,function(){e.controller.abort()})}var os=null,Ru=0,mr=0,pr=null;function ab(e,t){if(os===null){var i=os=[];Ru=0,mr=Nc(),pr={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Ru++,t.then(ah,ah),t}function ah(){if(--Ru===0&&os!==null){pr!==null&&(pr.status="fulfilled");var e=os;os=null,mr=0,pr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ib(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(o){i.push(o)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var o=0;o<i.length;o++)(0,i[o])(t)},function(o){for(s.status="rejected",s.reason=o,o=0;o<i.length;o++)(0,i[o])(void 0)}),s}var ih=k.S;k.S=function(e,t){Qm=gt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ab(e,t),ih!==null&&ih(e,t)};var Ui=C(null);function _u(){var e=Ui.current;return e!==null?e:lt.pooledCache}function El(e,t){t===null?H(Ui,Ui.current):H(Ui,t.pool)}function rh(){var e=_u();return e===null?null:{parent:kt._currentValue,pool:e}}var gr=Error(l(460)),ku=Error(l(474)),Tl=Error(l(542)),Cl={then:function(){}};function sh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function lh(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(wa,wa),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uh(e),e;default:if(typeof t.status=="string")t.then(wa,wa);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=s}},function(s){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uh(e),e}throw qi=t,gr}}function Bi(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(qi=i,gr):i}}var qi=null;function oh(){if(qi===null)throw Error(l(459));var e=qi;return qi=null,e}function uh(e){if(e===gr||e===Tl)throw Error(l(483))}var yr=null,us=0;function Al(e){var t=us;return us+=1,yr===null&&(yr=[]),lh(yr,e,t)}function cs(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Rl(e,t){throw t.$$typeof===T?Error(l(525)):(e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ch(e){function t(O,A){if(e){var M=O.deletions;M===null?(O.deletions=[A],O.flags|=16):M.push(A)}}function i(O,A){if(!e)return null;for(;A!==null;)t(O,A),A=A.sibling;return null}function s(O){for(var A=new Map;O!==null;)O.key!==null?A.set(O.key,O):A.set(O.index,O),O=O.sibling;return A}function o(O,A){return O=Ta(O,A),O.index=0,O.sibling=null,O}function u(O,A,M){return O.index=M,e?(M=O.alternate,M!==null?(M=M.index,M<A?(O.flags|=67108866,A):M):(O.flags|=67108866,A)):(O.flags|=1048576,A)}function h(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function b(O,A,M,F){return A===null||A.tag!==6?(A=yu(M,O.mode,F),A.return=O,A):(A=o(A,M),A.return=O,A)}function E(O,A,M,F){var we=M.type;return we===B?G(O,A,M.props.children,F,M.key):A!==null&&(A.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===V&&Bi(we)===A.type)?(A=o(A,M.props),cs(A,M),A.return=O,A):(A=bl(M.type,M.key,M.props,null,O.mode,F),cs(A,M),A.return=O,A)}function D(O,A,M,F){return A===null||A.tag!==4||A.stateNode.containerInfo!==M.containerInfo||A.stateNode.implementation!==M.implementation?(A=vu(M,O.mode,F),A.return=O,A):(A=o(A,M.children||[]),A.return=O,A)}function G(O,A,M,F,we){return A===null||A.tag!==7?(A=Di(M,O.mode,F,we),A.return=O,A):(A=o(A,M),A.return=O,A)}function Z(O,A,M){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return A=yu(""+A,O.mode,M),A.return=O,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case N:return M=bl(A.type,A.key,A.props,null,O.mode,M),cs(M,A),M.return=O,M;case L:return A=vu(A,O.mode,M),A.return=O,A;case V:return A=Bi(A),Z(O,A,M)}if(Ee(A)||Se(A))return A=Di(A,O.mode,M,null),A.return=O,A;if(typeof A.then=="function")return Z(O,Al(A),M);if(A.$$typeof===W)return Z(O,wl(O,A),M);Rl(O,A)}return null}function j(O,A,M,F){var we=A!==null?A.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return we!==null?null:b(O,A,""+M,F);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case N:return M.key===we?E(O,A,M,F):null;case L:return M.key===we?D(O,A,M,F):null;case V:return M=Bi(M),j(O,A,M,F)}if(Ee(M)||Se(M))return we!==null?null:G(O,A,M,F,null);if(typeof M.then=="function")return j(O,A,Al(M),F);if(M.$$typeof===W)return j(O,A,wl(O,M),F);Rl(O,M)}return null}function U(O,A,M,F,we){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return O=O.get(M)||null,b(A,O,""+F,we);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case N:return O=O.get(F.key===null?M:F.key)||null,E(A,O,F,we);case L:return O=O.get(F.key===null?M:F.key)||null,D(A,O,F,we);case V:return F=Bi(F),U(O,A,M,F,we)}if(Ee(F)||Se(F))return O=O.get(M)||null,G(A,O,F,we,null);if(typeof F.then=="function")return U(O,A,M,Al(F),we);if(F.$$typeof===W)return U(O,A,M,wl(A,F),we);Rl(A,F)}return null}function oe(O,A,M,F){for(var we=null,$e=null,pe=A,je=A=0,Ge=null;pe!==null&&je<M.length;je++){pe.index>je?(Ge=pe,pe=null):Ge=pe.sibling;var We=j(O,pe,M[je],F);if(We===null){pe===null&&(pe=Ge);break}e&&pe&&We.alternate===null&&t(O,pe),A=u(We,A,je),$e===null?we=We:$e.sibling=We,$e=We,pe=Ge}if(je===M.length)return i(O,pe),Xe&&Ca(O,je),we;if(pe===null){for(;je<M.length;je++)pe=Z(O,M[je],F),pe!==null&&(A=u(pe,A,je),$e===null?we=pe:$e.sibling=pe,$e=pe);return Xe&&Ca(O,je),we}for(pe=s(pe);je<M.length;je++)Ge=U(pe,O,je,M[je],F),Ge!==null&&(e&&Ge.alternate!==null&&pe.delete(Ge.key===null?je:Ge.key),A=u(Ge,A,je),$e===null?we=Ge:$e.sibling=Ge,$e=Ge);return e&&pe.forEach(function(ci){return t(O,ci)}),Xe&&Ca(O,je),we}function Ae(O,A,M,F){if(M==null)throw Error(l(151));for(var we=null,$e=null,pe=A,je=A=0,Ge=null,We=M.next();pe!==null&&!We.done;je++,We=M.next()){pe.index>je?(Ge=pe,pe=null):Ge=pe.sibling;var ci=j(O,pe,We.value,F);if(ci===null){pe===null&&(pe=Ge);break}e&&pe&&ci.alternate===null&&t(O,pe),A=u(ci,A,je),$e===null?we=ci:$e.sibling=ci,$e=ci,pe=Ge}if(We.done)return i(O,pe),Xe&&Ca(O,je),we;if(pe===null){for(;!We.done;je++,We=M.next())We=Z(O,We.value,F),We!==null&&(A=u(We,A,je),$e===null?we=We:$e.sibling=We,$e=We);return Xe&&Ca(O,je),we}for(pe=s(pe);!We.done;je++,We=M.next())We=U(pe,O,je,We.value,F),We!==null&&(e&&We.alternate!==null&&pe.delete(We.key===null?je:We.key),A=u(We,A,je),$e===null?we=We:$e.sibling=We,$e=We);return e&&pe.forEach(function(p1){return t(O,p1)}),Xe&&Ca(O,je),we}function st(O,A,M,F){if(typeof M=="object"&&M!==null&&M.type===B&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case N:e:{for(var we=M.key;A!==null;){if(A.key===we){if(we=M.type,we===B){if(A.tag===7){i(O,A.sibling),F=o(A,M.props.children),F.return=O,O=F;break e}}else if(A.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===V&&Bi(we)===A.type){i(O,A.sibling),F=o(A,M.props),cs(F,M),F.return=O,O=F;break e}i(O,A);break}else t(O,A);A=A.sibling}M.type===B?(F=Di(M.props.children,O.mode,F,M.key),F.return=O,O=F):(F=bl(M.type,M.key,M.props,null,O.mode,F),cs(F,M),F.return=O,O=F)}return h(O);case L:e:{for(we=M.key;A!==null;){if(A.key===we)if(A.tag===4&&A.stateNode.containerInfo===M.containerInfo&&A.stateNode.implementation===M.implementation){i(O,A.sibling),F=o(A,M.children||[]),F.return=O,O=F;break e}else{i(O,A);break}else t(O,A);A=A.sibling}F=vu(M,O.mode,F),F.return=O,O=F}return h(O);case V:return M=Bi(M),st(O,A,M,F)}if(Ee(M))return oe(O,A,M,F);if(Se(M)){if(we=Se(M),typeof we!="function")throw Error(l(150));return M=we.call(M),Ae(O,A,M,F)}if(typeof M.then=="function")return st(O,A,Al(M),F);if(M.$$typeof===W)return st(O,A,wl(O,M),F);Rl(O,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,A!==null&&A.tag===6?(i(O,A.sibling),F=o(A,M),F.return=O,O=F):(i(O,A),F=yu(M,O.mode,F),F.return=O,O=F),h(O)):i(O,A)}return function(O,A,M,F){try{us=0;var we=st(O,A,M,F);return yr=null,we}catch(pe){if(pe===gr||pe===Tl)throw pe;var $e=Sn(29,pe,null,O.mode);return $e.lanes=F,$e.return=O,$e}}}var Hi=ch(!0),fh=ch(!1),Fa=!1;function Nu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ou(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Xa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Za(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(et&2)!==0){var o=s.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),s.pending=t,t=vl(e),Xd(e,null,i),t}return yl(e,s,t,i),vl(e)}function fs(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,w(e,i)}}function Mu(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var o=null,u=null;if(i=i.firstBaseUpdate,i!==null){do{var h={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};u===null?o=u=h:u=u.next=h,i=i.next}while(i!==null);u===null?o=u=t:u=u.next=t}else o=u=t;i={baseState:s.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var Du=!1;function ds(){if(Du){var e=pr;if(e!==null)throw e}}function hs(e,t,i,s){Du=!1;var o=e.updateQueue;Fa=!1;var u=o.firstBaseUpdate,h=o.lastBaseUpdate,b=o.shared.pending;if(b!==null){o.shared.pending=null;var E=b,D=E.next;E.next=null,h===null?u=D:h.next=D,h=E;var G=e.alternate;G!==null&&(G=G.updateQueue,b=G.lastBaseUpdate,b!==h&&(b===null?G.firstBaseUpdate=D:b.next=D,G.lastBaseUpdate=E))}if(u!==null){var Z=o.baseState;h=0,G=D=E=null,b=u;do{var j=b.lane&-536870913,U=j!==b.lane;if(U?(Pe&j)===j:(s&j)===j){j!==0&&j===mr&&(Du=!0),G!==null&&(G=G.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var oe=e,Ae=b;j=t;var st=i;switch(Ae.tag){case 1:if(oe=Ae.payload,typeof oe=="function"){Z=oe.call(st,Z,j);break e}Z=oe;break e;case 3:oe.flags=oe.flags&-65537|128;case 0:if(oe=Ae.payload,j=typeof oe=="function"?oe.call(st,Z,j):oe,j==null)break e;Z=y({},Z,j);break e;case 2:Fa=!0}}j=b.callback,j!==null&&(e.flags|=64,U&&(e.flags|=8192),U=o.callbacks,U===null?o.callbacks=[j]:U.push(j))}else U={lane:j,tag:b.tag,payload:b.payload,callback:b.callback,next:null},G===null?(D=G=U,E=Z):G=G.next=U,h|=j;if(b=b.next,b===null){if(b=o.shared.pending,b===null)break;U=b,b=U.next,U.next=null,o.lastBaseUpdate=U,o.shared.pending=null}}while(!0);G===null&&(E=Z),o.baseState=E,o.firstBaseUpdate=D,o.lastBaseUpdate=G,u===null&&(o.shared.lanes=0),ei|=h,e.lanes=h,e.memoizedState=Z}}function dh(e,t){if(typeof e!="function")throw Error(l(191,e));e.call(t)}function hh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)dh(i[e],t)}var vr=C(null),_l=C(0);function mh(e,t){e=La,H(_l,e),H(vr,t),La=e|t.baseLanes}function ju(){H(_l,La),H(vr,vr.current)}function zu(){La=_l.current,q(vr),q(_l)}var wn=C(null),qn=null;function Ia(e){var t=e.alternate;H(At,At.current&1),H(wn,e),qn===null&&(t===null||vr.current!==null||t.memoizedState!==null)&&(qn=e)}function Lu(e){H(At,At.current),H(wn,e),qn===null&&(qn=e)}function ph(e){e.tag===22?(H(At,At.current),H(wn,e),qn===null&&(qn=e)):Ja()}function Ja(){H(At,At.current),H(wn,wn.current)}function En(e){q(wn),qn===e&&(qn=null),q(At)}var At=C(0);function kl(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Pc(i)||Gc(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var _a=0,De=null,it=null,Nt=null,Nl=!1,br=!1,Qi=!1,Ol=0,ms=0,xr=null,rb=0;function St(){throw Error(l(321))}function Uu(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!xn(e[i],t[i]))return!1;return!0}function Bu(e,t,i,s,o,u){return _a=u,De=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?$h:Wu,Qi=!1,u=i(s,o),Qi=!1,br&&(u=yh(t,i,s,o)),gh(e),u}function gh(e){k.H=ys;var t=it!==null&&it.next!==null;if(_a=0,Nt=it=De=null,Nl=!1,ms=0,xr=null,t)throw Error(l(300));e===null||Ot||(e=e.dependencies,e!==null&&Sl(e)&&(Ot=!0))}function yh(e,t,i,s){De=e;var o=0;do{if(br&&(xr=null),ms=0,br=!1,25<=o)throw Error(l(301));if(o+=1,Nt=it=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}k.H=Wh,u=t(i,s)}while(br);return u}function sb(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?ps(t):t,e=e.useState()[0],(it!==null?it.memoizedState:null)!==e&&(De.flags|=1024),t}function qu(){var e=Ol!==0;return Ol=0,e}function Hu(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Qu(e){if(Nl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Nl=!1}_a=0,Nt=it=De=null,br=!1,ms=Ol=0,xr=null}function nn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?De.memoizedState=Nt=e:Nt=Nt.next=e,Nt}function Rt(){if(it===null){var e=De.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var t=Nt===null?De.memoizedState:Nt.next;if(t!==null)Nt=t,it=e;else{if(e===null)throw De.alternate===null?Error(l(467)):Error(l(310));it=e,e={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},Nt===null?De.memoizedState=Nt=e:Nt=Nt.next=e}return Nt}function Ml(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ps(e){var t=ms;return ms+=1,xr===null&&(xr=[]),e=lh(xr,e,t),t=De,(Nt===null?t.memoizedState:Nt.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?$h:Wu),e}function Dl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ps(e);if(e.$$typeof===W)return Ft(e)}throw Error(l(438,String(e)))}function Pu(e){var t=null,i=De.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=De.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Ml(),De.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=ke;return t.index++,i}function ka(e,t){return typeof t=="function"?t(e):t}function jl(e){var t=Rt();return Gu(t,it,e)}function Gu(e,t,i){var s=e.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=i;var o=e.baseQueue,u=s.pending;if(u!==null){if(o!==null){var h=o.next;o.next=u.next,u.next=h}t.baseQueue=o=u,s.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var b=h=null,E=null,D=t,G=!1;do{var Z=D.lane&-536870913;if(Z!==D.lane?(Pe&Z)===Z:(_a&Z)===Z){var j=D.revertLane;if(j===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),Z===mr&&(G=!0);else if((_a&j)===j){D=D.next,j===mr&&(G=!0);continue}else Z={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},E===null?(b=E=Z,h=u):E=E.next=Z,De.lanes|=j,ei|=j;Z=D.action,Qi&&i(u,Z),u=D.hasEagerState?D.eagerState:i(u,Z)}else j={lane:Z,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},E===null?(b=E=j,h=u):E=E.next=j,De.lanes|=Z,ei|=Z;D=D.next}while(D!==null&&D!==t);if(E===null?h=u:E.next=b,!xn(u,e.memoizedState)&&(Ot=!0,G&&(i=pr,i!==null)))throw i;e.memoizedState=u,e.baseState=h,e.baseQueue=E,s.lastRenderedState=u}return o===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Ku(e){var t=Rt(),i=t.queue;if(i===null)throw Error(l(311));i.lastRenderedReducer=e;var s=i.dispatch,o=i.pending,u=t.memoizedState;if(o!==null){i.pending=null;var h=o=o.next;do u=e(u,h.action),h=h.next;while(h!==o);xn(u,t.memoizedState)||(Ot=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),i.lastRenderedState=u}return[u,s]}function vh(e,t,i){var s=De,o=Rt(),u=Xe;if(u){if(i===void 0)throw Error(l(407));i=i()}else i=t();var h=!xn((it||o).memoizedState,i);if(h&&(o.memoizedState=i,Ot=!0),o=o.queue,Fu(Sh.bind(null,s,o,e),[e]),o.getSnapshot!==t||h||Nt!==null&&Nt.memoizedState.tag&1){if(s.flags|=2048,Sr(9,{destroy:void 0},xh.bind(null,s,o,i,t),null),lt===null)throw Error(l(349));u||(_a&127)!==0||bh(s,t,i)}return i}function bh(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=De.updateQueue,t===null?(t=Ml(),De.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function xh(e,t,i,s){t.value=i,t.getSnapshot=s,wh(t)&&Eh(e)}function Sh(e,t,i){return i(function(){wh(t)&&Eh(e)})}function wh(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!xn(e,i)}catch{return!0}}function Eh(e){var t=Mi(e,2);t!==null&&pn(t,e,2)}function Vu(e){var t=nn();if(typeof e=="function"){var i=e;if(e=i(),Qi){on(!0);try{i()}finally{on(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:e},t}function Th(e,t,i,s){return e.baseState=i,Gu(e,it,typeof s=="function"?s:ka)}function lb(e,t,i,s,o){if(Ul(e))throw Error(l(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){u.listeners.push(h)}};k.T!==null?i(!0):u.isTransition=!1,s(u),i=t.pending,i===null?(u.next=t.pending=u,Ch(t,u)):(u.next=i.next,t.pending=i.next=u)}}function Ch(e,t){var i=t.action,s=t.payload,o=e.state;if(t.isTransition){var u=k.T,h={};k.T=h;try{var b=i(o,s),E=k.S;E!==null&&E(h,b),Ah(e,t,b)}catch(D){Yu(e,t,D)}finally{u!==null&&h.types!==null&&(u.types=h.types),k.T=u}}else try{u=i(o,s),Ah(e,t,u)}catch(D){Yu(e,t,D)}}function Ah(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){Rh(e,t,s)},function(s){return Yu(e,t,s)}):Rh(e,t,i)}function Rh(e,t,i){t.status="fulfilled",t.value=i,_h(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Ch(e,i)))}function Yu(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,_h(t),t=t.next;while(t!==s)}e.action=null}function _h(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function kh(e,t){return t}function Nh(e,t){if(Xe){var i=lt.formState;if(i!==null){e:{var s=De;if(Xe){if(ft){t:{for(var o=ft,u=Bn;o.nodeType!==8;){if(!u){o=null;break t}if(o=Hn(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){ft=Hn(o.nextSibling),s=o.data==="F!";break e}}Va(s)}s=!1}s&&(t=i[0])}}return i=nn(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:kh,lastRenderedState:t},i.queue=s,i=Zh.bind(null,De,s),s.dispatch=i,s=Vu(!1),u=$u.bind(null,De,!1,s.queue),s=nn(),o={state:t,dispatch:null,action:e,pending:null},s.queue=o,i=lb.bind(null,De,o,u,i),o.dispatch=i,s.memoizedState=e,[t,i,!1]}function Oh(e){var t=Rt();return Mh(t,it,e)}function Mh(e,t,i){if(t=Gu(e,t,kh)[0],e=jl(ka)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=ps(t)}catch(h){throw h===gr?Tl:h}else s=t;t=Rt();var o=t.queue,u=o.dispatch;return i!==t.memoizedState&&(De.flags|=2048,Sr(9,{destroy:void 0},ob.bind(null,o,i),null)),[s,u,e]}function ob(e,t){e.action=t}function Dh(e){var t=Rt(),i=it;if(i!==null)return Mh(t,i,e);Rt(),t=t.memoizedState,i=Rt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Sr(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=De.updateQueue,t===null&&(t=Ml(),De.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function jh(){return Rt().memoizedState}function zl(e,t,i,s){var o=nn();De.flags|=e,o.memoizedState=Sr(1|t,{destroy:void 0},i,s===void 0?null:s)}function Ll(e,t,i,s){var o=Rt();s=s===void 0?null:s;var u=o.memoizedState.inst;it!==null&&s!==null&&Uu(s,it.memoizedState.deps)?o.memoizedState=Sr(t,u,i,s):(De.flags|=e,o.memoizedState=Sr(1|t,u,i,s))}function zh(e,t){zl(8390656,8,e,t)}function Fu(e,t){Ll(2048,8,e,t)}function ub(e){De.flags|=4;var t=De.updateQueue;if(t===null)t=Ml(),De.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Lh(e){var t=Rt().memoizedState;return ub({ref:t,nextImpl:e}),function(){if((et&2)!==0)throw Error(l(440));return t.impl.apply(void 0,arguments)}}function Uh(e,t){return Ll(4,2,e,t)}function Bh(e,t){return Ll(4,4,e,t)}function qh(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Hh(e,t,i){i=i!=null?i.concat([e]):null,Ll(4,4,qh.bind(null,t,e),i)}function Xu(){}function Qh(e,t){var i=Rt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&Uu(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Ph(e,t){var i=Rt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&Uu(t,s[1]))return s[0];if(s=e(),Qi){on(!0);try{e()}finally{on(!1)}}return i.memoizedState=[s,t],s}function Zu(e,t,i){return i===void 0||(_a&1073741824)!==0&&(Pe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Gm(),De.lanes|=e,ei|=e,i)}function Gh(e,t,i,s){return xn(i,t)?i:vr.current!==null?(e=Zu(e,i,s),xn(e,t)||(Ot=!0),e):(_a&42)===0||(_a&1073741824)!==0&&(Pe&261930)===0?(Ot=!0,e.memoizedState=i):(e=Gm(),De.lanes|=e,ei|=e,t)}function Kh(e,t,i,s,o){var u=X.p;X.p=u!==0&&8>u?u:8;var h=k.T,b={};k.T=b,$u(e,!1,t,i);try{var E=o(),D=k.S;if(D!==null&&D(b,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var G=ib(E,s);gs(e,t,G,An(e))}else gs(e,t,s,An(e))}catch(Z){gs(e,t,{then:function(){},status:"rejected",reason:Z},An())}finally{X.p=u,h!==null&&b.types!==null&&(h.types=b.types),k.T=h}}function cb(){}function Iu(e,t,i,s){if(e.tag!==5)throw Error(l(476));var o=Vh(e).queue;Kh(e,o,t,Q,i===null?cb:function(){return Yh(e),i(s)})}function Vh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:Q},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Yh(e){var t=Vh(e);t.next===null&&(t=e.alternate.memoizedState),gs(e,t.next.queue,{},An())}function Ju(){return Ft(Ds)}function Fh(){return Rt().memoizedState}function Xh(){return Rt().memoizedState}function fb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=An();e=Xa(i);var s=Za(t,e,i);s!==null&&(pn(s,t,i),fs(s,t,i)),t={cache:Au()},e.payload=t;return}t=t.return}}function db(e,t,i){var s=An();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Ul(e)?Ih(t,i):(i=pu(e,t,i,s),i!==null&&(pn(i,e,s),Jh(i,t,s)))}function Zh(e,t,i){var s=An();gs(e,t,i,s)}function gs(e,t,i,s){var o={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Ul(e))Ih(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var h=t.lastRenderedState,b=u(h,i);if(o.hasEagerState=!0,o.eagerState=b,xn(b,h))return yl(e,t,o,0),lt===null&&gl(),!1}catch{}if(i=pu(e,t,o,s),i!==null)return pn(i,e,s),Jh(i,t,s),!0}return!1}function $u(e,t,i,s){if(s={lane:2,revertLane:Nc(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Ul(e)){if(t)throw Error(l(479))}else t=pu(e,i,s,2),t!==null&&pn(t,e,2)}function Ul(e){var t=e.alternate;return e===De||t!==null&&t===De}function Ih(e,t){br=Nl=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Jh(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,w(e,i)}}var ys={readContext:Ft,use:Dl,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useLayoutEffect:St,useInsertionEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useSyncExternalStore:St,useId:St,useHostTransitionStatus:St,useFormState:St,useActionState:St,useOptimistic:St,useMemoCache:St,useCacheRefresh:St};ys.useEffectEvent=St;var $h={readContext:Ft,use:Dl,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:zh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,zl(4194308,4,qh.bind(null,t,e),i)},useLayoutEffect:function(e,t){return zl(4194308,4,e,t)},useInsertionEffect:function(e,t){zl(4,2,e,t)},useMemo:function(e,t){var i=nn();t=t===void 0?null:t;var s=e();if(Qi){on(!0);try{e()}finally{on(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=nn();if(i!==void 0){var o=i(t);if(Qi){on(!0);try{i(t)}finally{on(!1)}}}else o=t;return s.memoizedState=s.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},s.queue=e,e=e.dispatch=db.bind(null,De,e),[s.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:function(e){e=Vu(e);var t=e.queue,i=Zh.bind(null,De,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Xu,useDeferredValue:function(e,t){var i=nn();return Zu(i,e,t)},useTransition:function(){var e=Vu(!1);return e=Kh.bind(null,De,e.queue,!0,!1),nn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=De,o=nn();if(Xe){if(i===void 0)throw Error(l(407));i=i()}else{if(i=t(),lt===null)throw Error(l(349));(Pe&127)!==0||bh(s,t,i)}o.memoizedState=i;var u={value:i,getSnapshot:t};return o.queue=u,zh(Sh.bind(null,s,u,e),[e]),s.flags|=2048,Sr(9,{destroy:void 0},xh.bind(null,s,u,i,t),null),i},useId:function(){var e=nn(),t=lt.identifierPrefix;if(Xe){var i=la,s=sa;i=(s&~(1<<32-Lt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Ol++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=rb++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ju,useFormState:Nh,useActionState:Nh,useOptimistic:function(e){var t=nn();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=$u.bind(null,De,!0,i),i.dispatch=t,[e,t]},useMemoCache:Pu,useCacheRefresh:function(){return nn().memoizedState=fb.bind(null,De)},useEffectEvent:function(e){var t=nn(),i={impl:e};return t.memoizedState=i,function(){if((et&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}},Wu={readContext:Ft,use:Dl,useCallback:Qh,useContext:Ft,useEffect:Fu,useImperativeHandle:Hh,useInsertionEffect:Uh,useLayoutEffect:Bh,useMemo:Ph,useReducer:jl,useRef:jh,useState:function(){return jl(ka)},useDebugValue:Xu,useDeferredValue:function(e,t){var i=Rt();return Gh(i,it.memoizedState,e,t)},useTransition:function(){var e=jl(ka)[0],t=Rt().memoizedState;return[typeof e=="boolean"?e:ps(e),t]},useSyncExternalStore:vh,useId:Fh,useHostTransitionStatus:Ju,useFormState:Oh,useActionState:Oh,useOptimistic:function(e,t){var i=Rt();return Th(i,it,e,t)},useMemoCache:Pu,useCacheRefresh:Xh};Wu.useEffectEvent=Lh;var Wh={readContext:Ft,use:Dl,useCallback:Qh,useContext:Ft,useEffect:Fu,useImperativeHandle:Hh,useInsertionEffect:Uh,useLayoutEffect:Bh,useMemo:Ph,useReducer:Ku,useRef:jh,useState:function(){return Ku(ka)},useDebugValue:Xu,useDeferredValue:function(e,t){var i=Rt();return it===null?Zu(i,e,t):Gh(i,it.memoizedState,e,t)},useTransition:function(){var e=Ku(ka)[0],t=Rt().memoizedState;return[typeof e=="boolean"?e:ps(e),t]},useSyncExternalStore:vh,useId:Fh,useHostTransitionStatus:Ju,useFormState:Dh,useActionState:Dh,useOptimistic:function(e,t){var i=Rt();return it!==null?Th(i,it,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Pu,useCacheRefresh:Xh};Wh.useEffectEvent=Lh;function ec(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:y({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var tc={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=An(),o=Xa(s);o.payload=t,i!=null&&(o.callback=i),t=Za(e,o,s),t!==null&&(pn(t,e,s),fs(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=An(),o=Xa(s);o.tag=1,o.payload=t,i!=null&&(o.callback=i),t=Za(e,o,s),t!==null&&(pn(t,e,s),fs(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=An(),s=Xa(i);s.tag=2,t!=null&&(s.callback=t),t=Za(e,s,i),t!==null&&(pn(t,e,i),fs(t,e,i))}};function em(e,t,i,s,o,u,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,u,h):t.prototype&&t.prototype.isPureReactComponent?!as(i,s)||!as(o,u):!0}function tm(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&tc.enqueueReplaceState(t,t.state,null)}function Pi(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=y({},i));for(var o in e)i[o]===void 0&&(i[o]=e[o])}return i}function nm(e){pl(e)}function am(e){console.error(e)}function im(e){pl(e)}function Bl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function rm(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function nc(e,t,i){return i=Xa(i),i.tag=3,i.payload={element:null},i.callback=function(){Bl(e,t)},i}function sm(e){return e=Xa(e),e.tag=3,e}function lm(e,t,i,s){var o=i.type.getDerivedStateFromError;if(typeof o=="function"){var u=s.value;e.payload=function(){return o(u)},e.callback=function(){rm(t,i,s)}}var h=i.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){rm(t,i,s),typeof o!="function"&&(ti===null?ti=new Set([this]):ti.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})})}function hb(e,t,i,s,o){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&hr(t,i,o,!0),i=wn.current,i!==null){switch(i.tag){case 31:case 13:return qn===null?Il():i.alternate===null&&wt===0&&(wt=3),i.flags&=-257,i.flags|=65536,i.lanes=o,s===Cl?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Rc(e,s,o)),!1;case 22:return i.flags|=65536,s===Cl?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Rc(e,s,o)),!1}throw Error(l(435,i.tag))}return Rc(e,s,o),Il(),!1}if(Xe)return t=wn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,s!==Su&&(e=Error(l(422),{cause:s}),ss(zn(e,i)))):(s!==Su&&(t=Error(l(423),{cause:s}),ss(zn(t,i))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,s=zn(s,i),o=nc(e.stateNode,s,o),Mu(e,o),wt!==4&&(wt=2)),!1;var u=Error(l(520),{cause:s});if(u=zn(u,i),Cs===null?Cs=[u]:Cs.push(u),wt!==4&&(wt=2),t===null)return!0;s=zn(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=o&-o,i.lanes|=e,e=nc(i.stateNode,s,e),Mu(i,e),!1;case 1:if(t=i.type,u=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(ti===null||!ti.has(u))))return i.flags|=65536,o&=-o,i.lanes|=o,o=sm(o),lm(o,e,i,s),Mu(i,o),!1}i=i.return}while(i!==null);return!1}var ac=Error(l(461)),Ot=!1;function Xt(e,t,i,s){t.child=e===null?fh(t,null,i,s):Hi(t,e.child,i,s)}function om(e,t,i,s,o){i=i.render;var u=t.ref;if("ref"in s){var h={};for(var b in s)b!=="ref"&&(h[b]=s[b])}else h=s;return Li(t),s=Bu(e,t,i,h,u,o),b=qu(),e!==null&&!Ot?(Hu(e,t,o),Na(e,t,o)):(Xe&&b&&bu(t),t.flags|=1,Xt(e,t,s,o),t.child)}function um(e,t,i,s,o){if(e===null){var u=i.type;return typeof u=="function"&&!gu(u)&&u.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=u,cm(e,t,u,s,o)):(e=bl(i.type,null,s,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!fc(e,o)){var h=u.memoizedProps;if(i=i.compare,i=i!==null?i:as,i(h,s)&&e.ref===t.ref)return Na(e,t,o)}return t.flags|=1,e=Ta(u,s),e.ref=t.ref,e.return=t,t.child=e}function cm(e,t,i,s,o){if(e!==null){var u=e.memoizedProps;if(as(u,s)&&e.ref===t.ref)if(Ot=!1,t.pendingProps=s=u,fc(e,o))(e.flags&131072)!==0&&(Ot=!0);else return t.lanes=e.lanes,Na(e,t,o)}return ic(e,t,i,s,o)}function fm(e,t,i,s){var o=s.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|i:i,e!==null){for(s=t.child=e.child,o=0;s!==null;)o=o|s.lanes|s.childLanes,s=s.sibling;s=o&~u}else s=0,t.child=null;return dm(e,t,u,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&El(t,u!==null?u.cachePool:null),u!==null?mh(t,u):ju(),ph(t);else return s=t.lanes=536870912,dm(e,t,u!==null?u.baseLanes|i:i,i,s)}else u!==null?(El(t,u.cachePool),mh(t,u),Ja(),t.memoizedState=null):(e!==null&&El(t,null),ju(),Ja());return Xt(e,t,o,i),t.child}function vs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function dm(e,t,i,s,o){var u=_u();return u=u===null?null:{parent:kt._currentValue,pool:u},t.memoizedState={baseLanes:i,cachePool:u},e!==null&&El(t,null),ju(),ph(t),e!==null&&hr(e,t,s,!0),t.childLanes=o,null}function ql(e,t){return t=Ql({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function hm(e,t,i){return Hi(t,e.child,null,i),e=ql(t,t.pendingProps),e.flags|=2,En(t),t.memoizedState=null,e}function mb(e,t,i){var s=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Xe){if(s.mode==="hidden")return e=ql(t,s),t.lanes=536870912,vs(null,e);if(Lu(t),(e=ft)?(e=Cp(e,Bn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ga!==null?{id:sa,overflow:la}:null,retryLane:536870912,hydrationErrors:null},i=Id(e),i.return=t,t.child=i,Yt=t,ft=null)):e=null,e===null)throw Va(t);return t.lanes=536870912,null}return ql(t,s)}var u=e.memoizedState;if(u!==null){var h=u.dehydrated;if(Lu(t),o)if(t.flags&256)t.flags&=-257,t=hm(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(l(558));else if(Ot||hr(e,t,i,!1),o=(i&e.childLanes)!==0,Ot||o){if(s=lt,s!==null&&(h=_(s,i),h!==0&&h!==u.retryLane))throw u.retryLane=h,Mi(e,h),pn(s,e,h),ac;Il(),t=hm(e,t,i)}else e=u.treeContext,ft=Hn(h.nextSibling),Yt=t,Xe=!0,Ka=null,Bn=!1,e!==null&&Wd(t,e),t=ql(t,s),t.flags|=4096;return t}return e=Ta(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hl(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(l(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function ic(e,t,i,s,o){return Li(t),i=Bu(e,t,i,s,void 0,o),s=qu(),e!==null&&!Ot?(Hu(e,t,o),Na(e,t,o)):(Xe&&s&&bu(t),t.flags|=1,Xt(e,t,i,o),t.child)}function mm(e,t,i,s,o,u){return Li(t),t.updateQueue=null,i=yh(t,s,i,o),gh(e),s=qu(),e!==null&&!Ot?(Hu(e,t,u),Na(e,t,u)):(Xe&&s&&bu(t),t.flags|=1,Xt(e,t,i,u),t.child)}function pm(e,t,i,s,o){if(Li(t),t.stateNode===null){var u=ur,h=i.contextType;typeof h=="object"&&h!==null&&(u=Ft(h)),u=new i(s,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=tc,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=s,u.state=t.memoizedState,u.refs={},Nu(t),h=i.contextType,u.context=typeof h=="object"&&h!==null?Ft(h):ur,u.state=t.memoizedState,h=i.getDerivedStateFromProps,typeof h=="function"&&(ec(t,i,h,s),u.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(h=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),h!==u.state&&tc.enqueueReplaceState(u,u.state,null),hs(t,s,u,o),ds(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){u=t.stateNode;var b=t.memoizedProps,E=Pi(i,b);u.props=E;var D=u.context,G=i.contextType;h=ur,typeof G=="object"&&G!==null&&(h=Ft(G));var Z=i.getDerivedStateFromProps;G=typeof Z=="function"||typeof u.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,G||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(b||D!==h)&&tm(t,u,s,h),Fa=!1;var j=t.memoizedState;u.state=j,hs(t,s,u,o),ds(),D=t.memoizedState,b||j!==D||Fa?(typeof Z=="function"&&(ec(t,i,Z,s),D=t.memoizedState),(E=Fa||em(t,i,E,s,j,D,h))?(G||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=D),u.props=s,u.state=D,u.context=h,s=E):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{u=t.stateNode,Ou(e,t),h=t.memoizedProps,G=Pi(i,h),u.props=G,Z=t.pendingProps,j=u.context,D=i.contextType,E=ur,typeof D=="object"&&D!==null&&(E=Ft(D)),b=i.getDerivedStateFromProps,(D=typeof b=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==Z||j!==E)&&tm(t,u,s,E),Fa=!1,j=t.memoizedState,u.state=j,hs(t,s,u,o),ds();var U=t.memoizedState;h!==Z||j!==U||Fa||e!==null&&e.dependencies!==null&&Sl(e.dependencies)?(typeof b=="function"&&(ec(t,i,b,s),U=t.memoizedState),(G=Fa||em(t,i,G,s,j,U,E)||e!==null&&e.dependencies!==null&&Sl(e.dependencies))?(D||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(s,U,E),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(s,U,E)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=U),u.props=s,u.state=U,u.context=E,s=G):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),s=!1)}return u=s,Hl(e,t),s=(t.flags&128)!==0,u||s?(u=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&s?(t.child=Hi(t,e.child,null,o),t.child=Hi(t,null,i,o)):Xt(e,t,i,o),t.memoizedState=u.state,e=t.child):e=Na(e,t,o),e}function gm(e,t,i,s){return ji(),t.flags|=256,Xt(e,t,i,s),t.child}var rc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sc(e){return{baseLanes:e,cachePool:rh()}}function lc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Cn),e}function ym(e,t,i){var s=t.pendingProps,o=!1,u=(t.flags&128)!==0,h;if((h=u)||(h=e!==null&&e.memoizedState===null?!1:(At.current&2)!==0),h&&(o=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Xe){if(o?Ia(t):Ja(),(e=ft)?(e=Cp(e,Bn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ga!==null?{id:sa,overflow:la}:null,retryLane:536870912,hydrationErrors:null},i=Id(e),i.return=t,t.child=i,Yt=t,ft=null)):e=null,e===null)throw Va(t);return Gc(e)?t.lanes=32:t.lanes=536870912,null}var b=s.children;return s=s.fallback,o?(Ja(),o=t.mode,b=Ql({mode:"hidden",children:b},o),s=Di(s,o,i,null),b.return=t,s.return=t,b.sibling=s,t.child=b,s=t.child,s.memoizedState=sc(i),s.childLanes=lc(e,h,i),t.memoizedState=rc,vs(null,s)):(Ia(t),oc(t,b))}var E=e.memoizedState;if(E!==null&&(b=E.dehydrated,b!==null)){if(u)t.flags&256?(Ia(t),t.flags&=-257,t=uc(e,t,i)):t.memoizedState!==null?(Ja(),t.child=e.child,t.flags|=128,t=null):(Ja(),b=s.fallback,o=t.mode,s=Ql({mode:"visible",children:s.children},o),b=Di(b,o,i,null),b.flags|=2,s.return=t,b.return=t,s.sibling=b,t.child=s,Hi(t,e.child,null,i),s=t.child,s.memoizedState=sc(i),s.childLanes=lc(e,h,i),t.memoizedState=rc,t=vs(null,s));else if(Ia(t),Gc(b)){if(h=b.nextSibling&&b.nextSibling.dataset,h)var D=h.dgst;h=D,s=Error(l(419)),s.stack="",s.digest=h,ss({value:s,source:null,stack:null}),t=uc(e,t,i)}else if(Ot||hr(e,t,i,!1),h=(i&e.childLanes)!==0,Ot||h){if(h=lt,h!==null&&(s=_(h,i),s!==0&&s!==E.retryLane))throw E.retryLane=s,Mi(e,s),pn(h,e,s),ac;Pc(b)||Il(),t=uc(e,t,i)}else Pc(b)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,ft=Hn(b.nextSibling),Yt=t,Xe=!0,Ka=null,Bn=!1,e!==null&&Wd(t,e),t=oc(t,s.children),t.flags|=4096);return t}return o?(Ja(),b=s.fallback,o=t.mode,E=e.child,D=E.sibling,s=Ta(E,{mode:"hidden",children:s.children}),s.subtreeFlags=E.subtreeFlags&65011712,D!==null?b=Ta(D,b):(b=Di(b,o,i,null),b.flags|=2),b.return=t,s.return=t,s.sibling=b,t.child=s,vs(null,s),s=t.child,b=e.child.memoizedState,b===null?b=sc(i):(o=b.cachePool,o!==null?(E=kt._currentValue,o=o.parent!==E?{parent:E,pool:E}:o):o=rh(),b={baseLanes:b.baseLanes|i,cachePool:o}),s.memoizedState=b,s.childLanes=lc(e,h,i),t.memoizedState=rc,vs(e.child,s)):(Ia(t),i=e.child,e=i.sibling,i=Ta(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=i,t.memoizedState=null,i)}function oc(e,t){return t=Ql({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ql(e,t){return e=Sn(22,e,null,t),e.lanes=0,e}function uc(e,t,i){return Hi(t,e.child,null,i),e=oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vm(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Tu(e.return,t,i)}function cc(e,t,i,s,o,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:o,treeForkCount:u}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=s,h.tail=i,h.tailMode=o,h.treeForkCount=u)}function bm(e,t,i){var s=t.pendingProps,o=s.revealOrder,u=s.tail;s=s.children;var h=At.current,b=(h&2)!==0;if(b?(h=h&1|2,t.flags|=128):h&=1,H(At,h),Xt(e,t,s,i),s=Xe?rs:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vm(e,i,t);else if(e.tag===19)vm(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(i=t.child,o=null;i!==null;)e=i.alternate,e!==null&&kl(e)===null&&(o=i),i=i.sibling;i=o,i===null?(o=t.child,t.child=null):(o=i.sibling,i.sibling=null),cc(t,!1,o,i,u,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&kl(e)===null){t.child=o;break}e=o.sibling,o.sibling=i,i=o,o=e}cc(t,!0,i,null,u,s);break;case"together":cc(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Na(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),ei|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(hr(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,i=Ta(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Ta(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function fc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Sl(e)))}function pb(e,t,i){switch(t.tag){case 3:Te(t,t.stateNode.containerInfo),Ya(t,kt,e.memoizedState.cache),ji();break;case 27:case 5:Pt(t);break;case 4:Te(t,t.stateNode.containerInfo);break;case 10:Ya(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Lu(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Ia(t),t.flags|=128,null):(i&t.child.childLanes)!==0?ym(e,t,i):(Ia(t),e=Na(e,t,i),e!==null?e.sibling:null);Ia(t);break;case 19:var o=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(hr(e,t,i,!1),s=(i&t.childLanes)!==0),o){if(s)return bm(e,t,i);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),H(At,At.current),s)break;return null;case 22:return t.lanes=0,fm(e,t,i,t.pendingProps);case 24:Ya(t,kt,e.memoizedState.cache)}return Na(e,t,i)}function xm(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ot=!0;else{if(!fc(e,i)&&(t.flags&128)===0)return Ot=!1,pb(e,t,i);Ot=(e.flags&131072)!==0}else Ot=!1,Xe&&(t.flags&1048576)!==0&&$d(t,rs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=Bi(t.elementType),t.type=e,typeof e=="function")gu(e)?(s=Pi(e,s),t.tag=1,t=pm(null,t,e,s,i)):(t.tag=0,t=ic(null,t,e,s,i));else{if(e!=null){var o=e.$$typeof;if(o===he){t.tag=11,t=om(null,t,e,s,i);break e}else if(o===R){t.tag=14,t=um(null,t,e,s,i);break e}}throw t=ze(e)||e,Error(l(306,t,""))}}return t;case 0:return ic(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,o=Pi(s,t.pendingProps),pm(e,t,s,o,i);case 3:e:{if(Te(t,t.stateNode.containerInfo),e===null)throw Error(l(387));s=t.pendingProps;var u=t.memoizedState;o=u.element,Ou(e,t),hs(t,s,null,i);var h=t.memoizedState;if(s=h.cache,Ya(t,kt,s),s!==u.cache&&Cu(t,[kt],i,!0),ds(),s=h.element,u.isDehydrated)if(u={element:s,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=gm(e,t,s,i);break e}else if(s!==o){o=zn(Error(l(424)),t),ss(o),t=gm(e,t,s,i);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ft=Hn(e.firstChild),Yt=t,Xe=!0,Ka=null,Bn=!0,i=fh(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(ji(),s===o){t=Na(e,t,i);break e}Xt(e,t,s,i)}t=t.child}return t;case 26:return Hl(e,t),e===null?(i=Op(t.type,null,t.pendingProps,null))?t.memoizedState=i:Xe||(i=t.type,e=t.pendingProps,s=ao($.current).createElement(i),s[re]=t,s[le]=e,Zt(s,i,e),mt(s),t.stateNode=s):t.memoizedState=Op(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Pt(t),e===null&&Xe&&(s=t.stateNode=_p(t.type,t.pendingProps,$.current),Yt=t,Bn=!0,o=ft,ri(t.type)?(Kc=o,ft=Hn(s.firstChild)):ft=o),Xt(e,t,t.pendingProps.children,i),Hl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Xe&&((o=s=ft)&&(s=Vb(s,t.type,t.pendingProps,Bn),s!==null?(t.stateNode=s,Yt=t,ft=Hn(s.firstChild),Bn=!1,o=!0):o=!1),o||Va(t)),Pt(t),o=t.type,u=t.pendingProps,h=e!==null?e.memoizedProps:null,s=u.children,qc(o,u)?s=null:h!==null&&qc(o,h)&&(t.flags|=32),t.memoizedState!==null&&(o=Bu(e,t,sb,null,null,i),Ds._currentValue=o),Hl(e,t),Xt(e,t,s,i),t.child;case 6:return e===null&&Xe&&((e=i=ft)&&(i=Yb(i,t.pendingProps,Bn),i!==null?(t.stateNode=i,Yt=t,ft=null,e=!0):e=!1),e||Va(t)),null;case 13:return ym(e,t,i);case 4:return Te(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Hi(t,null,s,i):Xt(e,t,s,i),t.child;case 11:return om(e,t,t.type,t.pendingProps,i);case 7:return Xt(e,t,t.pendingProps,i),t.child;case 8:return Xt(e,t,t.pendingProps.children,i),t.child;case 12:return Xt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Ya(t,t.type,s.value),Xt(e,t,s.children,i),t.child;case 9:return o=t.type._context,s=t.pendingProps.children,Li(t),o=Ft(o),s=s(o),t.flags|=1,Xt(e,t,s,i),t.child;case 14:return um(e,t,t.type,t.pendingProps,i);case 15:return cm(e,t,t.type,t.pendingProps,i);case 19:return bm(e,t,i);case 31:return mb(e,t,i);case 22:return fm(e,t,i,t.pendingProps);case 24:return Li(t),s=Ft(kt),e===null?(o=_u(),o===null&&(o=lt,u=Au(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=i),o=u),t.memoizedState={parent:s,cache:o},Nu(t),Ya(t,kt,o)):((e.lanes&i)!==0&&(Ou(e,t),hs(t,null,null,i),ds()),o=e.memoizedState,u=t.memoizedState,o.parent!==s?(o={parent:s,cache:s},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Ya(t,kt,s)):(s=u.cache,Ya(t,kt,s),s!==o.cache&&Cu(t,[kt],i,!0))),Xt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(l(156,t.tag))}function Oa(e){e.flags|=4}function dc(e,t,i,s,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Fm())e.flags|=8192;else throw qi=Cl,ku}else e.flags&=-16777217}function Sm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Lp(t))if(Fm())e.flags|=8192;else throw qi=Cl,ku}function Pl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Tt():536870912,e.lanes|=t,Cr|=t)}function bs(e,t){if(!Xe)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var o=e.child;o!==null;)i|=o.lanes|o.childLanes,s|=o.subtreeFlags&65011712,s|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)i|=o.lanes|o.childLanes,s|=o.subtreeFlags,s|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function gb(e,t,i){var s=t.pendingProps;switch(xu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return dt(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ra(kt),Be(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(dr(t)?Oa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,wu())),dt(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(Oa(t),u!==null?(dt(t),Sm(t,u)):(dt(t),dc(t,o,null,s,i))):u?u!==e.memoizedState?(Oa(t),dt(t),Sm(t,u)):(dt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Oa(t),dt(t),dc(t,o,e,s,i)),null;case 27:if(en(t),i=$.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Oa(t);else{if(!s){if(t.stateNode===null)throw Error(l(166));return dt(t),null}e=I.current,dr(t)?eh(t):(e=_p(o,s,i),t.stateNode=e,Oa(t))}return dt(t),null;case 5:if(en(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Oa(t);else{if(!s){if(t.stateNode===null)throw Error(l(166));return dt(t),null}if(u=I.current,dr(t))eh(t);else{var h=ao($.current);switch(u){case 1:u=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:u=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":u=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":u=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":u=h.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof s.is=="string"?h.createElement("select",{is:s.is}):h.createElement("select"),s.multiple?u.multiple=!0:s.size&&(u.size=s.size);break;default:u=typeof s.is=="string"?h.createElement(o,{is:s.is}):h.createElement(o)}}u[re]=t,u[le]=s;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)u.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=u;e:switch(Zt(u,o,s),o){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Oa(t)}}return dt(t),dc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Oa(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(l(166));if(e=$.current,dr(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,o=Yt,o!==null)switch(o.tag){case 27:case 5:s=o.memoizedProps}e[re]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||yp(e.nodeValue,i)),e||Va(t,!0)}else e=ao(e).createTextNode(s),e[re]=t,t.stateNode=e}return dt(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=dr(t),i!==null){if(e===null){if(!s)throw Error(l(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[re]=t}else ji(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),e=!1}else i=wu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(En(t),t):(En(t),null);if((t.flags&128)!==0)throw Error(l(558))}return dt(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=dr(t),s!==null&&s.dehydrated!==null){if(e===null){if(!o)throw Error(l(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(l(317));o[re]=t}else ji(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),o=!1}else o=wu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(En(t),t):(En(t),null)}return En(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,o=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(o=s.alternate.memoizedState.cachePool.pool),u=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),u!==o&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Pl(t,t.updateQueue),dt(t),null);case 4:return Be(),e===null&&jc(t.stateNode.containerInfo),dt(t),null;case 10:return Ra(t.type),dt(t),null;case 19:if(q(At),s=t.memoizedState,s===null)return dt(t),null;if(o=(t.flags&128)!==0,u=s.rendering,u===null)if(o)bs(s,!1);else{if(wt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=kl(e),u!==null){for(t.flags|=128,bs(s,!1),e=u.updateQueue,t.updateQueue=e,Pl(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Zd(i,e),i=i.sibling;return H(At,At.current&1|2),Xe&&Ca(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&gt()>Fl&&(t.flags|=128,o=!0,bs(s,!1),t.lanes=4194304)}else{if(!o)if(e=kl(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Pl(t,e),bs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!u.alternate&&!Xe)return dt(t),null}else 2*gt()-s.renderingStartTime>Fl&&i!==536870912&&(t.flags|=128,o=!0,bs(s,!1),t.lanes=4194304);s.isBackwards?(u.sibling=t.child,t.child=u):(e=s.last,e!==null?e.sibling=u:t.child=u,s.last=u)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=gt(),e.sibling=null,i=At.current,H(At,o?i&1|2:i&1),Xe&&Ca(t,s.treeForkCount),e):(dt(t),null);case 22:case 23:return En(t),zu(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),i=t.updateQueue,i!==null&&Pl(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&q(Ui),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Ra(kt),dt(t),null;case 25:return null;case 30:return null}throw Error(l(156,t.tag))}function yb(e,t){switch(xu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ra(kt),Be(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return en(t),null;case 31:if(t.memoizedState!==null){if(En(t),t.alternate===null)throw Error(l(340));ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(En(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(At),null;case 4:return Be(),null;case 10:return Ra(t.type),null;case 22:case 23:return En(t),zu(),e!==null&&q(Ui),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ra(kt),null;case 25:return null;default:return null}}function wm(e,t){switch(xu(t),t.tag){case 3:Ra(kt),Be();break;case 26:case 27:case 5:en(t);break;case 4:Be();break;case 31:t.memoizedState!==null&&En(t);break;case 13:En(t);break;case 19:q(At);break;case 10:Ra(t.type);break;case 22:case 23:En(t),zu(),e!==null&&q(Ui);break;case 24:Ra(kt)}}function xs(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var o=s.next;i=o;do{if((i.tag&e)===e){s=void 0;var u=i.create,h=i.inst;s=u(),h.destroy=s}i=i.next}while(i!==o)}}catch(b){at(t,t.return,b)}}function $a(e,t,i){try{var s=t.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var u=o.next;s=u;do{if((s.tag&e)===e){var h=s.inst,b=h.destroy;if(b!==void 0){h.destroy=void 0,o=t;var E=i,D=b;try{D()}catch(G){at(o,E,G)}}}s=s.next}while(s!==u)}}catch(G){at(t,t.return,G)}}function Em(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{hh(t,i)}catch(s){at(e,e.return,s)}}}function Tm(e,t,i){i.props=Pi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){at(e,t,s)}}function Ss(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(o){at(e,t,o)}}function oa(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(o){at(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(o){at(e,t,o)}else i.current=null}function Cm(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(o){at(e,e.return,o)}}function hc(e,t,i){try{var s=e.stateNode;qb(s,e.type,i,t),s[le]=t}catch(o){at(e,e.return,o)}}function Am(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ri(e.type)||e.tag===4}function mc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Am(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ri(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function pc(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=wa));else if(s!==4&&(s===27&&ri(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(pc(e,t,i),e=e.sibling;e!==null;)pc(e,t,i),e=e.sibling}function Gl(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&ri(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Gl(e,t,i),e=e.sibling;e!==null;)Gl(e,t,i),e=e.sibling}function Rm(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Zt(t,s,i),t[re]=e,t[le]=i}catch(u){at(e,e.return,u)}}var Ma=!1,Mt=!1,gc=!1,_m=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function vb(e,t){if(e=e.containerInfo,Uc=co,e=Hd(e),uu(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var o=s.anchorOffset,u=s.focusNode;s=s.focusOffset;try{i.nodeType,u.nodeType}catch{i=null;break e}var h=0,b=-1,E=-1,D=0,G=0,Z=e,j=null;t:for(;;){for(var U;Z!==i||o!==0&&Z.nodeType!==3||(b=h+o),Z!==u||s!==0&&Z.nodeType!==3||(E=h+s),Z.nodeType===3&&(h+=Z.nodeValue.length),(U=Z.firstChild)!==null;)j=Z,Z=U;for(;;){if(Z===e)break t;if(j===i&&++D===o&&(b=h),j===u&&++G===s&&(E=h),(U=Z.nextSibling)!==null)break;Z=j,j=Z.parentNode}Z=U}i=b===-1||E===-1?null:{start:b,end:E}}else i=null}i=i||{start:0,end:0}}else i=null;for(Bc={focusedElem:e,selectionRange:i},co=!1,Qt=t;Qt!==null;)if(t=Qt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Qt=e;else for(;Qt!==null;){switch(t=Qt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)o=e[i],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,i=t,o=u.memoizedProps,u=u.memoizedState,s=i.stateNode;try{var oe=Pi(i.type,o);e=s.getSnapshotBeforeUpdate(oe,u),s.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){at(i,i.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Qc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=t.sibling,e!==null){e.return=t.return,Qt=e;break}Qt=t.return}}function km(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:ja(e,i),s&4&&xs(5,i);break;case 1:if(ja(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(h){at(i,i.return,h)}else{var o=Pi(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){at(i,i.return,h)}}s&64&&Em(i),s&512&&Ss(i,i.return);break;case 3:if(ja(e,i),s&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{hh(e,t)}catch(h){at(i,i.return,h)}}break;case 27:t===null&&s&4&&Rm(i);case 26:case 5:ja(e,i),t===null&&s&4&&Cm(i),s&512&&Ss(i,i.return);break;case 12:ja(e,i);break;case 31:ja(e,i),s&4&&Mm(e,i);break;case 13:ja(e,i),s&4&&Dm(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Rb.bind(null,i),Fb(e,i))));break;case 22:if(s=i.memoizedState!==null||Ma,!s){t=t!==null&&t.memoizedState!==null||Mt,o=Ma;var u=Mt;Ma=s,(Mt=t)&&!u?za(e,i,(i.subtreeFlags&8772)!==0):ja(e,i),Ma=o,Mt=u}break;case 30:break;default:ja(e,i)}}function Nm(e){var t=e.alternate;t!==null&&(e.alternate=null,Nm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var pt=null,fn=!1;function Da(e,t,i){for(i=i.child;i!==null;)Om(e,t,i),i=i.sibling}function Om(e,t,i){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(va,i)}catch{}switch(i.tag){case 26:Mt||oa(i,t),Da(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Mt||oa(i,t);var s=pt,o=fn;ri(i.type)&&(pt=i.stateNode,fn=!1),Da(e,t,i),Ns(i.stateNode),pt=s,fn=o;break;case 5:Mt||oa(i,t);case 6:if(s=pt,o=fn,pt=null,Da(e,t,i),pt=s,fn=o,pt!==null)if(fn)try{(pt.nodeType===9?pt.body:pt.nodeName==="HTML"?pt.ownerDocument.body:pt).removeChild(i.stateNode)}catch(u){at(i,t,u)}else try{pt.removeChild(i.stateNode)}catch(u){at(i,t,u)}break;case 18:pt!==null&&(fn?(e=pt,Ep(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Dr(e)):Ep(pt,i.stateNode));break;case 4:s=pt,o=fn,pt=i.stateNode.containerInfo,fn=!0,Da(e,t,i),pt=s,fn=o;break;case 0:case 11:case 14:case 15:$a(2,i,t),Mt||$a(4,i,t),Da(e,t,i);break;case 1:Mt||(oa(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&Tm(i,t,s)),Da(e,t,i);break;case 21:Da(e,t,i);break;case 22:Mt=(s=Mt)||i.memoizedState!==null,Da(e,t,i),Mt=s;break;default:Da(e,t,i)}}function Mm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Dr(e)}catch(i){at(t,t.return,i)}}}function Dm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Dr(e)}catch(i){at(t,t.return,i)}}function bb(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _m),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _m),t;default:throw Error(l(435,e.tag))}}function Kl(e,t){var i=bb(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var o=_b.bind(null,e,s);s.then(o,o)}})}function dn(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var o=i[s],u=e,h=t,b=h;e:for(;b!==null;){switch(b.tag){case 27:if(ri(b.type)){pt=b.stateNode,fn=!1;break e}break;case 5:pt=b.stateNode,fn=!1;break e;case 3:case 4:pt=b.stateNode.containerInfo,fn=!0;break e}b=b.return}if(pt===null)throw Error(l(160));Om(u,h,o),pt=null,fn=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)jm(t,e),t=t.sibling}var ea=null;function jm(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:dn(t,e),hn(e),s&4&&($a(3,e,e.return),xs(3,e),$a(5,e,e.return));break;case 1:dn(t,e),hn(e),s&512&&(Mt||i===null||oa(i,i.return)),s&64&&Ma&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var o=ea;if(dn(t,e),hn(e),s&512&&(Mt||i===null||oa(i,i.return)),s&4){var u=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,o=o.ownerDocument||o;t:switch(s){case"title":u=o.getElementsByTagName("title")[0],(!u||u[yt]||u[re]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(s),o.head.insertBefore(u,o.querySelector("head > title"))),Zt(u,s,i),u[re]=e,mt(u),s=u;break e;case"link":var h=jp("link","href",o).get(s+(i.href||""));if(h){for(var b=0;b<h.length;b++)if(u=h[b],u.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&u.getAttribute("rel")===(i.rel==null?null:i.rel)&&u.getAttribute("title")===(i.title==null?null:i.title)&&u.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){h.splice(b,1);break t}}u=o.createElement(s),Zt(u,s,i),o.head.appendChild(u);break;case"meta":if(h=jp("meta","content",o).get(s+(i.content||""))){for(b=0;b<h.length;b++)if(u=h[b],u.getAttribute("content")===(i.content==null?null:""+i.content)&&u.getAttribute("name")===(i.name==null?null:i.name)&&u.getAttribute("property")===(i.property==null?null:i.property)&&u.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&u.getAttribute("charset")===(i.charSet==null?null:i.charSet)){h.splice(b,1);break t}}u=o.createElement(s),Zt(u,s,i),o.head.appendChild(u);break;default:throw Error(l(468,s))}u[re]=e,mt(u),s=u}e.stateNode=s}else zp(o,e.type,e.stateNode);else e.stateNode=Dp(o,s,e.memoizedProps);else u!==s?(u===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):u.count--,s===null?zp(o,e.type,e.stateNode):Dp(o,s,e.memoizedProps)):s===null&&e.stateNode!==null&&hc(e,e.memoizedProps,i.memoizedProps)}break;case 27:dn(t,e),hn(e),s&512&&(Mt||i===null||oa(i,i.return)),i!==null&&s&4&&hc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(dn(t,e),hn(e),s&512&&(Mt||i===null||oa(i,i.return)),e.flags&32){o=e.stateNode;try{nr(o,"")}catch(oe){at(e,e.return,oe)}}s&4&&e.stateNode!=null&&(o=e.memoizedProps,hc(e,o,i!==null?i.memoizedProps:o)),s&1024&&(gc=!0);break;case 6:if(dn(t,e),hn(e),s&4){if(e.stateNode===null)throw Error(l(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(oe){at(e,e.return,oe)}}break;case 3:if(so=null,o=ea,ea=io(t.containerInfo),dn(t,e),ea=o,hn(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Dr(t.containerInfo)}catch(oe){at(e,e.return,oe)}gc&&(gc=!1,zm(e));break;case 4:s=ea,ea=io(e.stateNode.containerInfo),dn(t,e),hn(e),ea=s;break;case 12:dn(t,e),hn(e);break;case 31:dn(t,e),hn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Kl(e,s)));break;case 13:dn(t,e),hn(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Yl=gt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Kl(e,s)));break;case 22:o=e.memoizedState!==null;var E=i!==null&&i.memoizedState!==null,D=Ma,G=Mt;if(Ma=D||o,Mt=G||E,dn(t,e),Mt=G,Ma=D,hn(e),s&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(i===null||E||Ma||Mt||Gi(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){E=i=t;try{if(u=E.stateNode,o)h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{b=E.stateNode;var Z=E.memoizedProps.style,j=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;b.style.display=j==null||typeof j=="boolean"?"":(""+j).trim()}}catch(oe){at(E,E.return,oe)}}}else if(t.tag===6){if(i===null){E=t;try{E.stateNode.nodeValue=o?"":E.memoizedProps}catch(oe){at(E,E.return,oe)}}}else if(t.tag===18){if(i===null){E=t;try{var U=E.stateNode;o?Tp(U,!0):Tp(E.stateNode,!1)}catch(oe){at(E,E.return,oe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,Kl(e,i))));break;case 19:dn(t,e),hn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Kl(e,s)));break;case 30:break;case 21:break;default:dn(t,e),hn(e)}}function hn(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(Am(s)){i=s;break}s=s.return}if(i==null)throw Error(l(160));switch(i.tag){case 27:var o=i.stateNode,u=mc(e);Gl(e,u,o);break;case 5:var h=i.stateNode;i.flags&32&&(nr(h,""),i.flags&=-33);var b=mc(e);Gl(e,b,h);break;case 3:case 4:var E=i.stateNode.containerInfo,D=mc(e);pc(e,D,E);break;default:throw Error(l(161))}}catch(G){at(e,e.return,G)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;zm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ja(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)km(e,t.alternate,t),t=t.sibling}function Gi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:$a(4,t,t.return),Gi(t);break;case 1:oa(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Tm(t,t.return,i),Gi(t);break;case 27:Ns(t.stateNode);case 26:case 5:oa(t,t.return),Gi(t);break;case 22:t.memoizedState===null&&Gi(t);break;case 30:Gi(t);break;default:Gi(t)}e=e.sibling}}function za(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,o=e,u=t,h=u.flags;switch(u.tag){case 0:case 11:case 15:za(o,u,i),xs(4,u);break;case 1:if(za(o,u,i),s=u,o=s.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(D){at(s,s.return,D)}if(s=u,o=s.updateQueue,o!==null){var b=s.stateNode;try{var E=o.shared.hiddenCallbacks;if(E!==null)for(o.shared.hiddenCallbacks=null,o=0;o<E.length;o++)dh(E[o],b)}catch(D){at(s,s.return,D)}}i&&h&64&&Em(u),Ss(u,u.return);break;case 27:Rm(u);case 26:case 5:za(o,u,i),i&&s===null&&h&4&&Cm(u),Ss(u,u.return);break;case 12:za(o,u,i);break;case 31:za(o,u,i),i&&h&4&&Mm(o,u);break;case 13:za(o,u,i),i&&h&4&&Dm(o,u);break;case 22:u.memoizedState===null&&za(o,u,i),Ss(u,u.return);break;case 30:break;default:za(o,u,i)}t=t.sibling}}function yc(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&ls(i))}function vc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ls(e))}function ta(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Lm(e,t,i,s),t=t.sibling}function Lm(e,t,i,s){var o=t.flags;switch(t.tag){case 0:case 11:case 15:ta(e,t,i,s),o&2048&&xs(9,t);break;case 1:ta(e,t,i,s);break;case 3:ta(e,t,i,s),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ls(e)));break;case 12:if(o&2048){ta(e,t,i,s),e=t.stateNode;try{var u=t.memoizedProps,h=u.id,b=u.onPostCommit;typeof b=="function"&&b(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){at(t,t.return,E)}}else ta(e,t,i,s);break;case 31:ta(e,t,i,s);break;case 13:ta(e,t,i,s);break;case 23:break;case 22:u=t.stateNode,h=t.alternate,t.memoizedState!==null?u._visibility&2?ta(e,t,i,s):ws(e,t):u._visibility&2?ta(e,t,i,s):(u._visibility|=2,wr(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),o&2048&&yc(h,t);break;case 24:ta(e,t,i,s),o&2048&&vc(t.alternate,t);break;default:ta(e,t,i,s)}}function wr(e,t,i,s,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,h=t,b=i,E=s,D=h.flags;switch(h.tag){case 0:case 11:case 15:wr(u,h,b,E,o),xs(8,h);break;case 23:break;case 22:var G=h.stateNode;h.memoizedState!==null?G._visibility&2?wr(u,h,b,E,o):ws(u,h):(G._visibility|=2,wr(u,h,b,E,o)),o&&D&2048&&yc(h.alternate,h);break;case 24:wr(u,h,b,E,o),o&&D&2048&&vc(h.alternate,h);break;default:wr(u,h,b,E,o)}t=t.sibling}}function ws(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,o=s.flags;switch(s.tag){case 22:ws(i,s),o&2048&&yc(s.alternate,s);break;case 24:ws(i,s),o&2048&&vc(s.alternate,s);break;default:ws(i,s)}t=t.sibling}}var Es=8192;function Er(e,t,i){if(e.subtreeFlags&Es)for(e=e.child;e!==null;)Um(e,t,i),e=e.sibling}function Um(e,t,i){switch(e.tag){case 26:Er(e,t,i),e.flags&Es&&e.memoizedState!==null&&r1(i,ea,e.memoizedState,e.memoizedProps);break;case 5:Er(e,t,i);break;case 3:case 4:var s=ea;ea=io(e.stateNode.containerInfo),Er(e,t,i),ea=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Es,Es=16777216,Er(e,t,i),Es=s):Er(e,t,i));break;default:Er(e,t,i)}}function Bm(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ts(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];Qt=s,Hm(s,e)}Bm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)qm(e),e=e.sibling}function qm(e){switch(e.tag){case 0:case 11:case 15:Ts(e),e.flags&2048&&$a(9,e,e.return);break;case 3:Ts(e);break;case 12:Ts(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Vl(e)):Ts(e);break;default:Ts(e)}}function Vl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];Qt=s,Hm(s,e)}Bm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:$a(8,t,t.return),Vl(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Vl(t));break;default:Vl(t)}e=e.sibling}}function Hm(e,t){for(;Qt!==null;){var i=Qt;switch(i.tag){case 0:case 11:case 15:$a(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:ls(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,Qt=s;else e:for(i=e;Qt!==null;){s=Qt;var o=s.sibling,u=s.return;if(Nm(s),s===i){Qt=null;break e}if(o!==null){o.return=u,Qt=o;break e}Qt=u}}}var xb={getCacheForType:function(e){var t=Ft(kt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Ft(kt).controller.signal}},Sb=typeof WeakMap=="function"?WeakMap:Map,et=0,lt=null,He=null,Pe=0,nt=0,Tn=null,Wa=!1,Tr=!1,bc=!1,La=0,wt=0,ei=0,Ki=0,xc=0,Cn=0,Cr=0,Cs=null,mn=null,Sc=!1,Yl=0,Qm=0,Fl=1/0,Xl=null,ti=null,Ut=0,ni=null,Ar=null,Ua=0,wc=0,Ec=null,Pm=null,As=0,Tc=null;function An(){return(et&2)!==0&&Pe!==0?Pe&-Pe:k.T!==null?Nc():te()}function Gm(){if(Cn===0)if((Pe&536870912)===0||Xe){var e=ba;ba<<=1,(ba&3932160)===0&&(ba=262144),Cn=e}else Cn=536870912;return e=wn.current,e!==null&&(e.flags|=32),Cn}function pn(e,t,i){(e===lt&&(nt===2||nt===9)||e.cancelPendingCommit!==null)&&(Rr(e,0),ai(e,Pe,Cn,!1)),ut(e,i),((et&2)===0||e!==lt)&&(e===lt&&((et&2)===0&&(Ki|=i),wt===4&&ai(e,Pe,Cn,!1)),ua(e))}function Km(e,t,i){if((et&6)!==0)throw Error(l(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||ot(e,t),o=s?Tb(e,t):Ac(e,t,!0),u=s;do{if(o===0){Tr&&!s&&ai(e,t,0,!1);break}else{if(i=e.current.alternate,u&&!wb(i)){o=Ac(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var b=e;o=Cs;var E=b.current.memoizedState.isDehydrated;if(E&&(Rr(b,h).flags|=256),h=Ac(b,h,!1),h!==2){if(bc&&!E){b.errorRecoveryDisabledLanes|=u,Ki|=u,o=4;break e}u=mn,mn=o,u!==null&&(mn===null?mn=u:mn.push.apply(mn,u))}o=h}if(u=!1,o!==2)continue}}if(o===1){Rr(e,0),ai(e,t,0,!0);break}e:{switch(s=e,u=o,u){case 0:case 1:throw Error(l(345));case 4:if((t&4194048)!==t)break;case 6:ai(s,t,Cn,!Wa);break e;case 2:mn=null;break;case 3:case 5:break;default:throw Error(l(329))}if((t&62914560)===t&&(o=Yl+300-gt(),10<o)){if(ai(s,t,Cn,!Wa),_e(s,0,!0)!==0)break e;Ua=t,s.timeoutHandle=Sp(Vm.bind(null,s,i,mn,Xl,Sc,t,Cn,Ki,Cr,Wa,u,"Throttled",-0,0),o);break e}Vm(s,i,mn,Xl,Sc,t,Cn,Ki,Cr,Wa,u,null,-0,0)}}break}while(!0);ua(e)}function Vm(e,t,i,s,o,u,h,b,E,D,G,Z,j,U){if(e.timeoutHandle=-1,Z=t.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:wa},Um(t,u,Z);var oe=(u&62914560)===u?Yl-gt():(u&4194048)===u?Qm-gt():0;if(oe=s1(Z,oe),oe!==null){Ua=u,e.cancelPendingCommit=oe(Wm.bind(null,e,t,u,i,s,o,h,b,E,G,Z,null,j,U)),ai(e,u,h,!D);return}}Wm(e,t,u,i,s,o,h,b,E)}function wb(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var o=i[s],u=o.getSnapshot;o=o.value;try{if(!xn(u(),o))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ai(e,t,i,s){t&=~xc,t&=~Ki,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var o=t;0<o;){var u=31-Lt(o),h=1<<u;s[u]=-1,o&=~h}i!==0&&xa(e,i,t)}function Zl(){return(et&6)===0?(Rs(0),!1):!0}function Cc(){if(He!==null){if(nt===0)var e=He.return;else e=He,Aa=zi=null,Qu(e),yr=null,us=0,e=He;for(;e!==null;)wm(e.alternate,e),e=e.return;He=null}}function Rr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Pb(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Ua=0,Cc(),lt=e,He=i=Ta(e.current,null),Pe=t,nt=0,Tn=null,Wa=!1,Tr=ot(e,t),bc=!1,Cr=Cn=xc=Ki=ei=wt=0,mn=Cs=null,Sc=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var o=31-Lt(s),u=1<<o;t|=e[o],s&=~u}return La=t,gl(),i}function Ym(e,t){De=null,k.H=ys,t===gr||t===Tl?(t=oh(),nt=3):t===ku?(t=oh(),nt=4):nt=t===ac?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Tn=t,He===null&&(wt=1,Bl(e,zn(t,e.current)))}function Fm(){var e=wn.current;return e===null?!0:(Pe&4194048)===Pe?qn===null:(Pe&62914560)===Pe||(Pe&536870912)!==0?e===qn:!1}function Xm(){var e=k.H;return k.H=ys,e===null?ys:e}function Zm(){var e=k.A;return k.A=xb,e}function Il(){wt=4,Wa||(Pe&4194048)!==Pe&&wn.current!==null||(Tr=!0),(ei&134217727)===0&&(Ki&134217727)===0||lt===null||ai(lt,Pe,Cn,!1)}function Ac(e,t,i){var s=et;et|=2;var o=Xm(),u=Zm();(lt!==e||Pe!==t)&&(Xl=null,Rr(e,t)),t=!1;var h=wt;e:do try{if(nt!==0&&He!==null){var b=He,E=Tn;switch(nt){case 8:Cc(),h=6;break e;case 3:case 2:case 9:case 6:wn.current===null&&(t=!0);var D=nt;if(nt=0,Tn=null,_r(e,b,E,D),i&&Tr){h=0;break e}break;default:D=nt,nt=0,Tn=null,_r(e,b,E,D)}}Eb(),h=wt;break}catch(G){Ym(e,G)}while(!0);return t&&e.shellSuspendCounter++,Aa=zi=null,et=s,k.H=o,k.A=u,He===null&&(lt=null,Pe=0,gl()),h}function Eb(){for(;He!==null;)Im(He)}function Tb(e,t){var i=et;et|=2;var s=Xm(),o=Zm();lt!==e||Pe!==t?(Xl=null,Fl=gt()+500,Rr(e,t)):Tr=ot(e,t);e:do try{if(nt!==0&&He!==null){t=He;var u=Tn;t:switch(nt){case 1:nt=0,Tn=null,_r(e,t,u,1);break;case 2:case 9:if(sh(u)){nt=0,Tn=null,Jm(t);break}t=function(){nt!==2&&nt!==9||lt!==e||(nt=7),ua(e)},u.then(t,t);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:sh(u)?(nt=0,Tn=null,Jm(t)):(nt=0,Tn=null,_r(e,t,u,7));break;case 5:var h=null;switch(He.tag){case 26:h=He.memoizedState;case 5:case 27:var b=He;if(h?Lp(h):b.stateNode.complete){nt=0,Tn=null;var E=b.sibling;if(E!==null)He=E;else{var D=b.return;D!==null?(He=D,Jl(D)):He=null}break t}}nt=0,Tn=null,_r(e,t,u,5);break;case 6:nt=0,Tn=null,_r(e,t,u,6);break;case 8:Cc(),wt=6;break e;default:throw Error(l(462))}}Cb();break}catch(G){Ym(e,G)}while(!0);return Aa=zi=null,k.H=s,k.A=o,et=i,He!==null?0:(lt=null,Pe=0,gl(),wt)}function Cb(){for(;He!==null&&!Gt();)Im(He)}function Im(e){var t=xm(e.alternate,e,La);e.memoizedProps=e.pendingProps,t===null?Jl(e):He=t}function Jm(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=mm(i,t,t.pendingProps,t.type,void 0,Pe);break;case 11:t=mm(i,t,t.pendingProps,t.type.render,t.ref,Pe);break;case 5:Qu(t);default:wm(i,t),t=He=Zd(t,La),t=xm(i,t,La)}e.memoizedProps=e.pendingProps,t===null?Jl(e):He=t}function _r(e,t,i,s){Aa=zi=null,Qu(t),yr=null,us=0;var o=t.return;try{if(hb(e,o,t,i,Pe)){wt=1,Bl(e,zn(i,e.current)),He=null;return}}catch(u){if(o!==null)throw He=o,u;wt=1,Bl(e,zn(i,e.current)),He=null;return}t.flags&32768?(Xe||s===1?e=!0:Tr||(Pe&536870912)!==0?e=!1:(Wa=e=!0,(s===2||s===9||s===3||s===6)&&(s=wn.current,s!==null&&s.tag===13&&(s.flags|=16384))),$m(t,e)):Jl(t)}function Jl(e){var t=e;do{if((t.flags&32768)!==0){$m(t,Wa);return}e=t.return;var i=gb(t.alternate,t,La);if(i!==null){He=i;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);wt===0&&(wt=5)}function $m(e,t){do{var i=yb(e.alternate,e);if(i!==null){i.flags&=32767,He=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){He=e;return}He=e=i}while(e!==null);wt=6,He=null}function Wm(e,t,i,s,o,u,h,b,E){e.cancelPendingCommit=null;do $l();while(Ut!==0);if((et&6)!==0)throw Error(l(327));if(t!==null){if(t===e.current)throw Error(l(177));if(u=t.lanes|t.childLanes,u|=mu,Jt(e,i,u,h,b,E),e===lt&&(He=lt=null,Pe=0),Ar=t,ni=e,Ua=i,wc=u,Ec=o,Pm=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,kb(Kt,function(){return ip(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=k.T,k.T=null,o=X.p,X.p=2,h=et,et|=4;try{vb(e,t,i)}finally{et=h,X.p=o,k.T=s}}Ut=1,ep(),tp(),np()}}function ep(){if(Ut===1){Ut=0;var e=ni,t=Ar,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=k.T,k.T=null;var s=X.p;X.p=2;var o=et;et|=4;try{jm(t,e);var u=Bc,h=Hd(e.containerInfo),b=u.focusedElem,E=u.selectionRange;if(h!==b&&b&&b.ownerDocument&&qd(b.ownerDocument.documentElement,b)){if(E!==null&&uu(b)){var D=E.start,G=E.end;if(G===void 0&&(G=D),"selectionStart"in b)b.selectionStart=D,b.selectionEnd=Math.min(G,b.value.length);else{var Z=b.ownerDocument||document,j=Z&&Z.defaultView||window;if(j.getSelection){var U=j.getSelection(),oe=b.textContent.length,Ae=Math.min(E.start,oe),st=E.end===void 0?Ae:Math.min(E.end,oe);!U.extend&&Ae>st&&(h=st,st=Ae,Ae=h);var O=Bd(b,Ae),A=Bd(b,st);if(O&&A&&(U.rangeCount!==1||U.anchorNode!==O.node||U.anchorOffset!==O.offset||U.focusNode!==A.node||U.focusOffset!==A.offset)){var M=Z.createRange();M.setStart(O.node,O.offset),U.removeAllRanges(),Ae>st?(U.addRange(M),U.extend(A.node,A.offset)):(M.setEnd(A.node,A.offset),U.addRange(M))}}}}for(Z=[],U=b;U=U.parentNode;)U.nodeType===1&&Z.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<Z.length;b++){var F=Z[b];F.element.scrollLeft=F.left,F.element.scrollTop=F.top}}co=!!Uc,Bc=Uc=null}finally{et=o,X.p=s,k.T=i}}e.current=t,Ut=2}}function tp(){if(Ut===2){Ut=0;var e=ni,t=Ar,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=k.T,k.T=null;var s=X.p;X.p=2;var o=et;et|=4;try{km(e,t.alternate,t)}finally{et=o,X.p=s,k.T=i}}Ut=3}}function np(){if(Ut===4||Ut===3){Ut=0,ia();var e=ni,t=Ar,i=Ua,s=Pm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ut=5:(Ut=0,Ar=ni=null,ap(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(ti=null),J(i),t=t.stateNode,ct&&typeof ct.onCommitFiberRoot=="function")try{ct.onCommitFiberRoot(va,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=k.T,o=X.p,X.p=2,k.T=null;try{for(var u=e.onRecoverableError,h=0;h<s.length;h++){var b=s[h];u(b.value,{componentStack:b.stack})}}finally{k.T=t,X.p=o}}(Ua&3)!==0&&$l(),ua(e),o=e.pendingLanes,(i&261930)!==0&&(o&42)!==0?e===Tc?As++:(As=0,Tc=e):As=0,Rs(0)}}function ap(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ls(t)))}function $l(){return ep(),tp(),np(),ip()}function ip(){if(Ut!==5)return!1;var e=ni,t=wc;wc=0;var i=J(Ua),s=k.T,o=X.p;try{X.p=32>i?32:i,k.T=null,i=Ec,Ec=null;var u=ni,h=Ua;if(Ut=0,Ar=ni=null,Ua=0,(et&6)!==0)throw Error(l(331));var b=et;if(et|=4,qm(u.current),Lm(u,u.current,h,i),et=b,Rs(0,!1),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot(va,u)}catch{}return!0}finally{X.p=o,k.T=s,ap(e,t)}}function rp(e,t,i){t=zn(i,t),t=nc(e.stateNode,t,2),e=Za(e,t,2),e!==null&&(ut(e,2),ua(e))}function at(e,t,i){if(e.tag===3)rp(e,e,i);else for(;t!==null;){if(t.tag===3){rp(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ti===null||!ti.has(s))){e=zn(i,e),i=sm(2),s=Za(t,i,2),s!==null&&(lm(i,s,t,e),ut(s,2),ua(s));break}}t=t.return}}function Rc(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new Sb;var o=new Set;s.set(t,o)}else o=s.get(t),o===void 0&&(o=new Set,s.set(t,o));o.has(i)||(bc=!0,o.add(i),e=Ab.bind(null,e,t,i),t.then(e,e))}function Ab(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,lt===e&&(Pe&i)===i&&(wt===4||wt===3&&(Pe&62914560)===Pe&&300>gt()-Yl?(et&2)===0&&Rr(e,0):xc|=i,Cr===Pe&&(Cr=0)),ua(e)}function sp(e,t){t===0&&(t=Tt()),e=Mi(e,t),e!==null&&(ut(e,t),ua(e))}function Rb(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),sp(e,i)}function _b(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,o=e.memoizedState;o!==null&&(i=o.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(l(314))}s!==null&&s.delete(t),sp(e,i)}function kb(e,t){return Ei(e,t)}var Wl=null,kr=null,_c=!1,eo=!1,kc=!1,ii=0;function ua(e){e!==kr&&e.next===null&&(kr===null?Wl=kr=e:kr=kr.next=e),eo=!0,_c||(_c=!0,Ob())}function Rs(e,t){if(!kc&&eo){kc=!0;do for(var i=!1,s=Wl;s!==null;){if(e!==0){var o=s.pendingLanes;if(o===0)var u=0;else{var h=s.suspendedLanes,b=s.pingedLanes;u=(1<<31-Lt(42|e)+1)-1,u&=o&~(h&~b),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(i=!0,cp(s,u))}else u=Pe,u=_e(s,s===lt?u:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(u&3)===0||ot(s,u)||(i=!0,cp(s,u));s=s.next}while(i);kc=!1}}function Nb(){lp()}function lp(){eo=_c=!1;var e=0;ii!==0&&Qb()&&(e=ii);for(var t=gt(),i=null,s=Wl;s!==null;){var o=s.next,u=op(s,t);u===0?(s.next=null,i===null?Wl=o:i.next=o,o===null&&(kr=i)):(i=s,(e!==0||(u&3)!==0)&&(eo=!0)),s=o}Ut!==0&&Ut!==5||Rs(e),ii!==0&&(ii=0)}function op(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var h=31-Lt(u),b=1<<h,E=o[h];E===-1?((b&i)===0||(b&s)!==0)&&(o[h]=Et(b,t)):E<=t&&(e.expiredLanes|=b),u&=~b}if(t=lt,i=Pe,i=_e(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(nt===2||nt===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Ti(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||ot(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Ti(s),J(i)){case 2:case 8:i=Qa;break;case 32:i=Kt;break;case 268435456:i=kn;break;default:i=Kt}return s=up.bind(null,e),i=Ei(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Ti(s),e.callbackPriority=2,e.callbackNode=null,2}function up(e,t){if(Ut!==0&&Ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if($l()&&e.callbackNode!==i)return null;var s=Pe;return s=_e(e,e===lt?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Km(e,s,t),op(e,gt()),e.callbackNode!=null&&e.callbackNode===i?up.bind(null,e):null)}function cp(e,t){if($l())return null;Km(e,t,!0)}function Ob(){Gb(function(){(et&6)!==0?Ei(ra,Nb):lp()})}function Nc(){if(ii===0){var e=mr;e===0&&(e=Xn,Xn<<=1,(Xn&261888)===0&&(Xn=256)),ii=e}return ii}function fp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ol(""+e)}function dp(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function Mb(e,t,i,s,o){if(t==="submit"&&i&&i.stateNode===o){var u=fp((o[le]||null).action),h=s.submitter;h&&(t=(t=h[le]||null)?fp(t.formAction):h.getAttribute("formAction"),t!==null&&(u=t,h=null));var b=new dl("action","action",null,s,o);e.push({event:b,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(ii!==0){var E=h?dp(o,h):new FormData(o);Iu(i,{pending:!0,data:E,method:o.method,action:u},null,E)}}else typeof u=="function"&&(b.preventDefault(),E=h?dp(o,h):new FormData(o),Iu(i,{pending:!0,data:E,method:o.method,action:u},u,E))},currentTarget:o}]})}}for(var Oc=0;Oc<hu.length;Oc++){var Mc=hu[Oc],Db=Mc.toLowerCase(),jb=Mc[0].toUpperCase()+Mc.slice(1);Wn(Db,"on"+jb)}Wn(Gd,"onAnimationEnd"),Wn(Kd,"onAnimationIteration"),Wn(Vd,"onAnimationStart"),Wn("dblclick","onDoubleClick"),Wn("focusin","onFocus"),Wn("focusout","onBlur"),Wn(I0,"onTransitionRun"),Wn(J0,"onTransitionStart"),Wn($0,"onTransitionCancel"),Wn(Yd,"onTransitionEnd"),Mn("onMouseEnter",["mouseout","mouseover"]),Mn("onMouseLeave",["mouseout","mouseover"]),Mn("onPointerEnter",["pointerout","pointerover"]),Mn("onPointerLeave",["pointerout","pointerover"]),Jn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _s="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(" "),zb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_s));function hp(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],o=s.event;s=s.listeners;e:{var u=void 0;if(t)for(var h=s.length-1;0<=h;h--){var b=s[h],E=b.instance,D=b.currentTarget;if(b=b.listener,E!==u&&o.isPropagationStopped())break e;u=b,o.currentTarget=D;try{u(o)}catch(G){pl(G)}o.currentTarget=null,u=E}else for(h=0;h<s.length;h++){if(b=s[h],E=b.instance,D=b.currentTarget,b=b.listener,E!==u&&o.isPropagationStopped())break e;u=b,o.currentTarget=D;try{u(o)}catch(G){pl(G)}o.currentTarget=null,u=E}}}}function Qe(e,t){var i=t[Ce];i===void 0&&(i=t[Ce]=new Set);var s=e+"__bubble";i.has(s)||(mp(t,e,2,!1),i.add(s))}function Dc(e,t,i){var s=0;t&&(s|=4),mp(i,e,s,t)}var to="_reactListening"+Math.random().toString(36).slice(2);function jc(e){if(!e[to]){e[to]=!0,In.forEach(function(i){i!=="selectionchange"&&(zb.has(i)||Dc(i,!1,e),Dc(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[to]||(t[to]=!0,Dc("selectionchange",!1,t))}}function mp(e,t,i,s){switch(Gp(t)){case 2:var o=u1;break;case 8:o=c1;break;default:o=Zc}i=o.bind(null,t,i,e),o=void 0,!eu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),s?o!==void 0?e.addEventListener(t,i,{capture:!0,passive:o}):e.addEventListener(t,i,!0):o!==void 0?e.addEventListener(t,i,{passive:o}):e.addEventListener(t,i,!1)}function zc(e,t,i,s,o){var u=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var h=s.tag;if(h===3||h===4){var b=s.stateNode.containerInfo;if(b===o)break;if(h===4)for(h=s.return;h!==null;){var E=h.tag;if((E===3||E===4)&&h.stateNode.containerInfo===o)return;h=h.return}for(;b!==null;){if(h=xt(b),h===null)return;if(E=h.tag,E===5||E===6||E===26||E===27){s=u=h;continue e}b=b.parentNode}}s=s.return}bd(function(){var D=u,G=$o(i),Z=[];e:{var j=Fd.get(e);if(j!==void 0){var U=dl,oe=e;switch(e){case"keypress":if(cl(i)===0)break e;case"keydown":case"keyup":U=_0;break;case"focusin":oe="focus",U=iu;break;case"focusout":oe="blur",U=iu;break;case"beforeblur":case"afterblur":U=iu;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":U=wd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=g0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=O0;break;case Gd:case Kd:case Vd:U=b0;break;case Yd:U=D0;break;case"scroll":case"scrollend":U=m0;break;case"wheel":U=z0;break;case"copy":case"cut":case"paste":U=S0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=Td;break;case"toggle":case"beforetoggle":U=U0}var Ae=(t&4)!==0,st=!Ae&&(e==="scroll"||e==="scrollend"),O=Ae?j!==null?j+"Capture":null:j;Ae=[];for(var A=D,M;A!==null;){var F=A;if(M=F.stateNode,F=F.tag,F!==5&&F!==26&&F!==27||M===null||O===null||(F=Ir(A,O),F!=null&&Ae.push(ks(A,F,M))),st)break;A=A.return}0<Ae.length&&(j=new U(j,oe,null,i,G),Z.push({event:j,listeners:Ae}))}}if((t&7)===0){e:{if(j=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",j&&i!==Jo&&(oe=i.relatedTarget||i.fromElement)&&(xt(oe)||oe[ge]))break e;if((U||j)&&(j=G.window===G?G:(j=G.ownerDocument)?j.defaultView||j.parentWindow:window,U?(oe=i.relatedTarget||i.toElement,U=D,oe=oe?xt(oe):null,oe!==null&&(st=f(oe),Ae=oe.tag,oe!==st||Ae!==5&&Ae!==27&&Ae!==6)&&(oe=null)):(U=null,oe=D),U!==oe)){if(Ae=wd,F="onMouseLeave",O="onMouseEnter",A="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=Td,F="onPointerLeave",O="onPointerEnter",A="pointer"),st=U==null?j:Ht(U),M=oe==null?j:Ht(oe),j=new Ae(F,A+"leave",U,i,G),j.target=st,j.relatedTarget=M,F=null,xt(G)===D&&(Ae=new Ae(O,A+"enter",oe,i,G),Ae.target=M,Ae.relatedTarget=st,F=Ae),st=F,U&&oe)t:{for(Ae=Lb,O=U,A=oe,M=0,F=O;F;F=Ae(F))M++;F=0;for(var we=A;we;we=Ae(we))F++;for(;0<M-F;)O=Ae(O),M--;for(;0<F-M;)A=Ae(A),F--;for(;M--;){if(O===A||A!==null&&O===A.alternate){Ae=O;break t}O=Ae(O),A=Ae(A)}Ae=null}else Ae=null;U!==null&&pp(Z,j,U,Ae,!1),oe!==null&&st!==null&&pp(Z,st,oe,Ae,!0)}}e:{if(j=D?Ht(D):window,U=j.nodeName&&j.nodeName.toLowerCase(),U==="select"||U==="input"&&j.type==="file")var $e=Md;else if(Nd(j))if(Dd)$e=F0;else{$e=V0;var pe=K0}else U=j.nodeName,!U||U.toLowerCase()!=="input"||j.type!=="checkbox"&&j.type!=="radio"?D&&Io(D.elementType)&&($e=Md):$e=Y0;if($e&&($e=$e(e,D))){Od(Z,$e,i,G);break e}pe&&pe(e,j,D),e==="focusout"&&D&&j.type==="number"&&D.memoizedProps.value!=null&&Zo(j,"number",j.value)}switch(pe=D?Ht(D):window,e){case"focusin":(Nd(pe)||pe.contentEditable==="true")&&(sr=pe,cu=D,is=null);break;case"focusout":is=cu=sr=null;break;case"mousedown":fu=!0;break;case"contextmenu":case"mouseup":case"dragend":fu=!1,Qd(Z,i,G);break;case"selectionchange":if(Z0)break;case"keydown":case"keyup":Qd(Z,i,G)}var je;if(su)e:{switch(e){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else rr?_d(e,i)&&(Ge="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ge="onCompositionStart");Ge&&(Cd&&i.locale!=="ko"&&(rr||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&rr&&(je=xd()):(Pa=G,tu="value"in Pa?Pa.value:Pa.textContent,rr=!0)),pe=no(D,Ge),0<pe.length&&(Ge=new Ed(Ge,e,null,i,G),Z.push({event:Ge,listeners:pe}),je?Ge.data=je:(je=kd(i),je!==null&&(Ge.data=je)))),(je=q0?H0(e,i):Q0(e,i))&&(Ge=no(D,"onBeforeInput"),0<Ge.length&&(pe=new Ed("onBeforeInput","beforeinput",null,i,G),Z.push({event:pe,listeners:Ge}),pe.data=je)),Mb(Z,e,D,i,G)}hp(Z,t)})}function ks(e,t,i){return{instance:e,listener:t,currentTarget:i}}function no(e,t){for(var i=t+"Capture",s=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=Ir(e,i),o!=null&&s.unshift(ks(e,o,u)),o=Ir(e,t),o!=null&&s.push(ks(e,o,u))),e.tag===3)return s;e=e.return}return[]}function Lb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function pp(e,t,i,s,o){for(var u=t._reactName,h=[];i!==null&&i!==s;){var b=i,E=b.alternate,D=b.stateNode;if(b=b.tag,E!==null&&E===s)break;b!==5&&b!==26&&b!==27||D===null||(E=D,o?(D=Ir(i,u),D!=null&&h.unshift(ks(i,D,E))):o||(D=Ir(i,u),D!=null&&h.push(ks(i,D,E)))),i=i.return}h.length!==0&&e.push({event:t,listeners:h})}var Ub=/\r\n?/g,Bb=/\u0000|\uFFFD/g;function gp(e){return(typeof e=="string"?e:""+e).replace(Ub,`
10
- `).replace(Bb,"")}function yp(e,t){return t=gp(t),gp(e)===t}function rt(e,t,i,s,o,u){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||nr(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&nr(e,""+s);break;case"className":$n(e,"class",s);break;case"tabIndex":$n(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":$n(e,i,s);break;case"style":yd(e,s,u);break;case"data":if(t!=="object"){$n(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=ol(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(i,"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 u=="function"&&(i==="formAction"?(t!=="input"&&rt(e,t,"name",o.name,o,null),rt(e,t,"formEncType",o.formEncType,o,null),rt(e,t,"formMethod",o.formMethod,o,null),rt(e,t,"formTarget",o.formTarget,o,null)):(rt(e,t,"encType",o.encType,o,null),rt(e,t,"method",o.method,o,null),rt(e,t,"target",o.target,o,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=ol(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=wa);break;case"onScroll":s!=null&&Qe("scroll",e);break;case"onScrollEnd":s!=null&&Qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(i=s.__html,i!=null){if(o.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=ol(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):e.removeAttribute(i);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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":Qe("beforetoggle",e),Qe("toggle",e),Ct(e,"popover",s);break;case"xlinkActuate":Vt(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Vt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Vt(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Vt(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Vt(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Vt(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Ct(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=d0.get(i)||i,Ct(e,i,s))}}function Lc(e,t,i,s,o,u){switch(i){case"style":yd(e,s,u);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(i=s.__html,i!=null){if(o.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"children":typeof s=="string"?nr(e,s):(typeof s=="number"||typeof s=="bigint")&&nr(e,""+s);break;case"onScroll":s!=null&&Qe("scroll",e);break;case"onScrollEnd":s!=null&&Qe("scrollend",e);break;case"onClick":s!=null&&(e.onclick=wa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bn.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(o=i.endsWith("Capture"),t=i.slice(2,o?i.length-7:void 0),u=e[le]||null,u=u!=null?u[i]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof s=="function")){typeof u!="function"&&u!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,o);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Ct(e,i,s)}}}function Zt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",e),Qe("load",e);var s=!1,o=!1,u;for(u in i)if(i.hasOwnProperty(u)){var h=i[u];if(h!=null)switch(u){case"src":s=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:rt(e,t,u,h,i,null)}}o&&rt(e,t,"srcSet",i.srcSet,i,null),s&&rt(e,t,"src",i.src,i,null);return;case"input":Qe("invalid",e);var b=u=h=o=null,E=null,D=null;for(s in i)if(i.hasOwnProperty(s)){var G=i[s];if(G!=null)switch(s){case"name":o=G;break;case"type":h=G;break;case"checked":E=G;break;case"defaultChecked":D=G;break;case"value":u=G;break;case"defaultValue":b=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(l(137,t));break;default:rt(e,t,s,G,i,null)}}hd(e,u,b,E,D,h,o,!1);return;case"select":Qe("invalid",e),s=h=u=null;for(o in i)if(i.hasOwnProperty(o)&&(b=i[o],b!=null))switch(o){case"value":u=b;break;case"defaultValue":h=b;break;case"multiple":s=b;default:rt(e,t,o,b,i,null)}t=u,i=h,e.multiple=!!s,t!=null?tr(e,!!s,t,!1):i!=null&&tr(e,!!s,i,!0);return;case"textarea":Qe("invalid",e),u=o=s=null;for(h in i)if(i.hasOwnProperty(h)&&(b=i[h],b!=null))switch(h){case"value":s=b;break;case"defaultValue":o=b;break;case"children":u=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(l(91));break;default:rt(e,t,h,b,i,null)}pd(e,s,o,u);return;case"option":for(E in i)i.hasOwnProperty(E)&&(s=i[E],s!=null)&&(E==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":rt(e,t,E,s,i,null));return;case"dialog":Qe("beforetoggle",e),Qe("toggle",e),Qe("cancel",e),Qe("close",e);break;case"iframe":case"object":Qe("load",e);break;case"video":case"audio":for(s=0;s<_s.length;s++)Qe(_s[s],e);break;case"image":Qe("error",e),Qe("load",e);break;case"details":Qe("toggle",e);break;case"embed":case"source":case"link":Qe("error",e),Qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in i)if(i.hasOwnProperty(D)&&(s=i[D],s!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:rt(e,t,D,s,i,null)}return;default:if(Io(t)){for(G in i)i.hasOwnProperty(G)&&(s=i[G],s!==void 0&&Lc(e,t,G,s,i,void 0));return}}for(b in i)i.hasOwnProperty(b)&&(s=i[b],s!=null&&rt(e,t,b,s,i,null))}function qb(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,h=null,b=null,E=null,D=null,G=null;for(U in i){var Z=i[U];if(i.hasOwnProperty(U)&&Z!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":E=Z;default:s.hasOwnProperty(U)||rt(e,t,U,null,s,Z)}}for(var j in s){var U=s[j];if(Z=i[j],s.hasOwnProperty(j)&&(U!=null||Z!=null))switch(j){case"type":u=U;break;case"name":o=U;break;case"checked":D=U;break;case"defaultChecked":G=U;break;case"value":h=U;break;case"defaultValue":b=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(l(137,t));break;default:U!==Z&&rt(e,t,j,U,s,Z)}}Xo(e,h,b,E,D,G,u,o);return;case"select":U=h=b=j=null;for(u in i)if(E=i[u],i.hasOwnProperty(u)&&E!=null)switch(u){case"value":break;case"multiple":U=E;default:s.hasOwnProperty(u)||rt(e,t,u,null,s,E)}for(o in s)if(u=s[o],E=i[o],s.hasOwnProperty(o)&&(u!=null||E!=null))switch(o){case"value":j=u;break;case"defaultValue":b=u;break;case"multiple":h=u;default:u!==E&&rt(e,t,o,u,s,E)}t=b,i=h,s=U,j!=null?tr(e,!!i,j,!1):!!s!=!!i&&(t!=null?tr(e,!!i,t,!0):tr(e,!!i,i?[]:"",!1));return;case"textarea":U=j=null;for(b in i)if(o=i[b],i.hasOwnProperty(b)&&o!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:rt(e,t,b,null,s,o)}for(h in s)if(o=s[h],u=i[h],s.hasOwnProperty(h)&&(o!=null||u!=null))switch(h){case"value":j=o;break;case"defaultValue":U=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(l(91));break;default:o!==u&&rt(e,t,h,o,s,u)}md(e,j,U);return;case"option":for(var oe in i)j=i[oe],i.hasOwnProperty(oe)&&j!=null&&!s.hasOwnProperty(oe)&&(oe==="selected"?e.selected=!1:rt(e,t,oe,null,s,j));for(E in s)j=s[E],U=i[E],s.hasOwnProperty(E)&&j!==U&&(j!=null||U!=null)&&(E==="selected"?e.selected=j&&typeof j!="function"&&typeof j!="symbol":rt(e,t,E,j,s,U));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 Ae in i)j=i[Ae],i.hasOwnProperty(Ae)&&j!=null&&!s.hasOwnProperty(Ae)&&rt(e,t,Ae,null,s,j);for(D in s)if(j=s[D],U=i[D],s.hasOwnProperty(D)&&j!==U&&(j!=null||U!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(l(137,t));break;default:rt(e,t,D,j,s,U)}return;default:if(Io(t)){for(var st in i)j=i[st],i.hasOwnProperty(st)&&j!==void 0&&!s.hasOwnProperty(st)&&Lc(e,t,st,void 0,s,j);for(G in s)j=s[G],U=i[G],!s.hasOwnProperty(G)||j===U||j===void 0&&U===void 0||Lc(e,t,G,j,s,U);return}}for(var O in i)j=i[O],i.hasOwnProperty(O)&&j!=null&&!s.hasOwnProperty(O)&&rt(e,t,O,null,s,j);for(Z in s)j=s[Z],U=i[Z],!s.hasOwnProperty(Z)||j===U||j==null&&U==null||rt(e,t,Z,j,s,U)}function vp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Hb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var o=i[s],u=o.transferSize,h=o.initiatorType,b=o.duration;if(u&&b&&vp(h)){for(h=0,b=o.responseEnd,s+=1;s<i.length;s++){var E=i[s],D=E.startTime;if(D>b)break;var G=E.transferSize,Z=E.initiatorType;G&&vp(Z)&&(E=E.responseEnd,h+=G*(E<b?1:(b-D)/(E-D)))}if(--s,t+=8*(u+h)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Uc=null,Bc=null;function ao(e){return e.nodeType===9?e:e.ownerDocument}function bp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function xp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function qc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Hc=null;function Qb(){var e=window.event;return e&&e.type==="popstate"?e===Hc?!1:(Hc=e,!0):(Hc=null,!1)}var Sp=typeof setTimeout=="function"?setTimeout:void 0,Pb=typeof clearTimeout=="function"?clearTimeout:void 0,wp=typeof Promise=="function"?Promise:void 0,Gb=typeof queueMicrotask=="function"?queueMicrotask:typeof wp<"u"?function(e){return wp.resolve(null).then(e).catch(Kb)}:Sp;function Kb(e){setTimeout(function(){throw e})}function ri(e){return e==="head"}function Ep(e,t){var i=t,s=0;do{var o=i.nextSibling;if(e.removeChild(i),o&&o.nodeType===8)if(i=o.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(o),Dr(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Ns(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Ns(i);for(var u=i.firstChild;u;){var h=u.nextSibling,b=u.nodeName;u[yt]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&u.rel.toLowerCase()==="stylesheet"||i.removeChild(u),u=h}}else i==="body"&&Ns(e.ownerDocument.body);i=o}while(i);Dr(t)}function Tp(e,t){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function Qc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Qc(i),bt(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function Vb(e,t,i,s){for(;e.nodeType===1;){var o=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[yt])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Hn(e.nextSibling),e===null)break}return null}function Yb(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Hn(e.nextSibling),e===null))return null;return e}function Cp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Hn(e.nextSibling),e===null))return null;return e}function Pc(e){return e.data==="$?"||e.data==="$~"}function Gc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Fb(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Hn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Kc=null;function Ap(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Hn(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Rp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function _p(e,t,i){switch(t=ao(i),e){case"html":if(e=t.documentElement,!e)throw Error(l(452));return e;case"head":if(e=t.head,!e)throw Error(l(453));return e;case"body":if(e=t.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function Ns(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bt(e)}var Qn=new Map,kp=new Set;function io(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ba=X.d;X.d={f:Xb,r:Zb,D:Ib,C:Jb,L:$b,m:Wb,X:t1,S:e1,M:n1};function Xb(){var e=Ba.f(),t=Zl();return e||t}function Zb(e){var t=Ve(e);t!==null&&t.tag===5&&t.type==="form"?Yh(t):Ba.r(e)}var Nr=typeof document>"u"?null:document;function Np(e,t,i){var s=Nr;if(s&&typeof t=="string"&&t){var o=Dn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof i=="string"&&(o+='[crossorigin="'+i+'"]'),kp.has(o)||(kp.add(o),e={rel:e,crossOrigin:i,href:t},s.querySelector(o)===null&&(t=s.createElement("link"),Zt(t,"link",e),mt(t),s.head.appendChild(t)))}}function Ib(e){Ba.D(e),Np("dns-prefetch",e,null)}function Jb(e,t){Ba.C(e,t),Np("preconnect",e,t)}function $b(e,t,i){Ba.L(e,t,i);var s=Nr;if(s&&e&&t){var o='link[rel="preload"][as="'+Dn(t)+'"]';t==="image"&&i&&i.imageSrcSet?(o+='[imagesrcset="'+Dn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(o+='[imagesizes="'+Dn(i.imageSizes)+'"]')):o+='[href="'+Dn(e)+'"]';var u=o;switch(t){case"style":u=Or(e);break;case"script":u=Mr(e)}Qn.has(u)||(e=y({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Qn.set(u,e),s.querySelector(o)!==null||t==="style"&&s.querySelector(Os(u))||t==="script"&&s.querySelector(Ms(u))||(t=s.createElement("link"),Zt(t,"link",e),mt(t),s.head.appendChild(t)))}}function Wb(e,t){Ba.m(e,t);var i=Nr;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Dn(s)+'"][href="'+Dn(e)+'"]',u=o;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Mr(e)}if(!Qn.has(u)&&(e=y({rel:"modulepreload",href:e},t),Qn.set(u,e),i.querySelector(o)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ms(u)))return}s=i.createElement("link"),Zt(s,"link",e),mt(s),i.head.appendChild(s)}}}function e1(e,t,i){Ba.S(e,t,i);var s=Nr;if(s&&e){var o=un(s).hoistableStyles,u=Or(e);t=t||"default";var h=o.get(u);if(!h){var b={loading:0,preload:null};if(h=s.querySelector(Os(u)))b.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Qn.get(u))&&Vc(e,i);var E=h=s.createElement("link");mt(E),Zt(E,"link",e),E._p=new Promise(function(D,G){E.onload=D,E.onerror=G}),E.addEventListener("load",function(){b.loading|=1}),E.addEventListener("error",function(){b.loading|=2}),b.loading|=4,ro(h,t,s)}h={type:"stylesheet",instance:h,count:1,state:b},o.set(u,h)}}}function t1(e,t){Ba.X(e,t);var i=Nr;if(i&&e){var s=un(i).hoistableScripts,o=Mr(e),u=s.get(o);u||(u=i.querySelector(Ms(o)),u||(e=y({src:e,async:!0},t),(t=Qn.get(o))&&Yc(e,t),u=i.createElement("script"),mt(u),Zt(u,"link",e),i.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(o,u))}}function n1(e,t){Ba.M(e,t);var i=Nr;if(i&&e){var s=un(i).hoistableScripts,o=Mr(e),u=s.get(o);u||(u=i.querySelector(Ms(o)),u||(e=y({src:e,async:!0,type:"module"},t),(t=Qn.get(o))&&Yc(e,t),u=i.createElement("script"),mt(u),Zt(u,"link",e),i.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(o,u))}}function Op(e,t,i,s){var o=(o=$.current)?io(o):null;if(!o)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Or(i.href),i=un(o).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Or(i.href);var u=un(o).hoistableStyles,h=u.get(e);if(h||(o=o.ownerDocument||o,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=o.querySelector(Os(e)))&&!u._p&&(h.instance=u,h.state.loading=5),Qn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Qn.set(e,i),u||a1(o,e,i,h.state))),t&&s===null)throw Error(l(528,""));return h}if(t&&s!==null)throw Error(l(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Mr(i),i=un(o).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Or(e){return'href="'+Dn(e)+'"'}function Os(e){return'link[rel="stylesheet"]['+e+"]"}function Mp(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function a1(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),Zt(t,"link",i),mt(t),e.head.appendChild(t))}function Mr(e){return'[src="'+Dn(e)+'"]'}function Ms(e){return"script[async]"+e}function Dp(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Dn(i.href)+'"]');if(s)return t.instance=s,mt(s),s;var o=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),mt(s),Zt(s,"style",o),ro(s,i.precedence,e),t.instance=s;case"stylesheet":o=Or(i.href);var u=e.querySelector(Os(o));if(u)return t.state.loading|=4,t.instance=u,mt(u),u;s=Mp(i),(o=Qn.get(o))&&Vc(s,o),u=(e.ownerDocument||e).createElement("link"),mt(u);var h=u;return h._p=new Promise(function(b,E){h.onload=b,h.onerror=E}),Zt(u,"link",s),t.state.loading|=4,ro(u,i.precedence,e),t.instance=u;case"script":return u=Mr(i.src),(o=e.querySelector(Ms(u)))?(t.instance=o,mt(o),o):(s=i,(o=Qn.get(u))&&(s=y({},i),Yc(s,o)),e=e.ownerDocument||e,o=e.createElement("script"),mt(o),Zt(o,"link",s),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(l(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,ro(s,i.precedence,e));return t.instance}function ro(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=s.length?s[s.length-1]:null,u=o,h=0;h<s.length;h++){var b=s[h];if(b.dataset.precedence===t)u=b;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Vc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Yc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var so=null;function jp(e,t,i){if(so===null){var s=new Map,o=so=new Map;o.set(i,s)}else o=so,s=o.get(i),s||(s=new Map,o.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),o=0;o<i.length;o++){var u=i[o];if(!(u[yt]||u[re]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var h=u.getAttribute(t)||"";h=e+h;var b=s.get(h);b?b.push(u):s.set(h,[u])}}return s}function zp(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function i1(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Lp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function r1(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var o=Or(s.href),u=t.querySelector(Os(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=lo.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=u,mt(u);return}u=t.ownerDocument||t,s=Mp(s),(o=Qn.get(o))&&Vc(s,o),u=u.createElement("link"),mt(u);var h=u;h._p=new Promise(function(b,E){h.onload=b,h.onerror=E}),Zt(u,"link",s),i.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=lo.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Fc=0;function s1(e,t){return e.stylesheets&&e.count===0&&uo(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&uo(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Fc===0&&(Fc=62500*Hb());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&uo(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Fc?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(o)}}:null}function lo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)uo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var oo=null;function uo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oo=new Map,t.forEach(l1,e),oo=null,lo.call(e))}function l1(e,t){if(!(t.state.loading&4)){var i=oo.get(e);if(i)var s=i.get(null);else{i=new Map,oo.set(e,i);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var h=o[u];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(i.set(h.dataset.precedence,h),s=h)}s&&i.set(null,s)}o=t.instance,h=o.getAttribute("data-precedence"),u=i.get(h)||s,u===s&&i.set(null,o),i.set(h,o),this.count++,s=lo.bind(this),o.addEventListener("load",s),o.addEventListener("error",s),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Ds={$$typeof:W,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function o1(e,t,i,s,o,u,h,b,E){this.tag=1,this.containerInfo=e,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=vn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vn(0),this.hiddenUpdates=vn(null),this.identifierPrefix=s,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Up(e,t,i,s,o,u,h,b,E,D,G,Z){return e=new o1(e,t,i,h,E,D,G,Z,b),t=1,u===!0&&(t|=24),u=Sn(3,null,null,t),e.current=u,u.stateNode=e,t=Au(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:s,isDehydrated:i,cache:t},Nu(u),e}function Bp(e){return e?(e=ur,e):ur}function qp(e,t,i,s,o,u){o=Bp(o),s.context===null?s.context=o:s.pendingContext=o,s=Xa(t),s.payload={element:i},u=u===void 0?null:u,u!==null&&(s.callback=u),i=Za(e,s,t),i!==null&&(pn(i,e,t),fs(i,e,t))}function Hp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Xc(e,t){Hp(e,t),(e=e.alternate)&&Hp(e,t)}function Qp(e){if(e.tag===13||e.tag===31){var t=Mi(e,67108864);t!==null&&pn(t,e,67108864),Xc(e,67108864)}}function Pp(e){if(e.tag===13||e.tag===31){var t=An();t=z(t);var i=Mi(e,t);i!==null&&pn(i,e,t),Xc(e,t)}}var co=!0;function u1(e,t,i,s){var o=k.T;k.T=null;var u=X.p;try{X.p=2,Zc(e,t,i,s)}finally{X.p=u,k.T=o}}function c1(e,t,i,s){var o=k.T;k.T=null;var u=X.p;try{X.p=8,Zc(e,t,i,s)}finally{X.p=u,k.T=o}}function Zc(e,t,i,s){if(co){var o=Ic(s);if(o===null)zc(e,t,s,fo,i),Kp(e,s);else if(d1(o,e,t,i,s))s.stopPropagation();else if(Kp(e,s),t&4&&-1<f1.indexOf(e)){for(;o!==null;){var u=Ve(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=On(u.pendingLanes);if(h!==0){var b=u;for(b.pendingLanes|=2,b.entangledLanes|=2;h;){var E=1<<31-Lt(h);b.entanglements[1]|=E,h&=~E}ua(u),(et&6)===0&&(Fl=gt()+500,Rs(0))}}break;case 31:case 13:b=Mi(u,2),b!==null&&pn(b,u,2),Zl(),Xc(u,2)}if(u=Ic(s),u===null&&zc(e,t,s,fo,i),u===o)break;o=u}o!==null&&s.stopPropagation()}else zc(e,t,s,null,i)}}function Ic(e){return e=$o(e),Jc(e)}var fo=null;function Jc(e){if(fo=null,e=xt(e),e!==null){var t=f(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=d(t),e!==null)return e;e=null}else if(i===31){if(e=m(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fo=e,null}function Gp(e){switch(e){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(ya()){case ra:return 2;case Qa:return 8;case Kt:case tn:return 32;case kn:return 268435456;default:return 32}default:return 32}}var $c=!1,si=null,li=null,oi=null,js=new Map,zs=new Map,ui=[],f1="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 Kp(e,t){switch(e){case"focusin":case"focusout":si=null;break;case"dragenter":case"dragleave":li=null;break;case"mouseover":case"mouseout":oi=null;break;case"pointerover":case"pointerout":js.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zs.delete(t.pointerId)}}function Ls(e,t,i,s,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:u,targetContainers:[o]},t!==null&&(t=Ve(t),t!==null&&Qp(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function d1(e,t,i,s,o){switch(t){case"focusin":return si=Ls(si,e,t,i,s,o),!0;case"dragenter":return li=Ls(li,e,t,i,s,o),!0;case"mouseover":return oi=Ls(oi,e,t,i,s,o),!0;case"pointerover":var u=o.pointerId;return js.set(u,Ls(js.get(u)||null,e,t,i,s,o)),!0;case"gotpointercapture":return u=o.pointerId,zs.set(u,Ls(zs.get(u)||null,e,t,i,s,o)),!0}return!1}function Vp(e){var t=xt(e.target);if(t!==null){var i=f(t);if(i!==null){if(t=i.tag,t===13){if(t=d(i),t!==null){e.blockedOn=t,ve(e.priority,function(){Pp(i)});return}}else if(t===31){if(t=m(i),t!==null){e.blockedOn=t,ve(e.priority,function(){Pp(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ho(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Ic(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Jo=s,i.target.dispatchEvent(s),Jo=null}else return t=Ve(i),t!==null&&Qp(t),e.blockedOn=i,!1;t.shift()}return!0}function Yp(e,t,i){ho(e)&&i.delete(t)}function h1(){$c=!1,si!==null&&ho(si)&&(si=null),li!==null&&ho(li)&&(li=null),oi!==null&&ho(oi)&&(oi=null),js.forEach(Yp),zs.forEach(Yp)}function mo(e,t){e.blockedOn===t&&(e.blockedOn=null,$c||($c=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,h1)))}var po=null;function Fp(e){po!==e&&(po=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){po===e&&(po=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],o=e[t+2];if(typeof s!="function"){if(Jc(s||i)===null)continue;break}var u=Ve(i);u!==null&&(e.splice(t,3),t-=3,Iu(u,{pending:!0,data:o,method:i.method,action:s},s,o))}}))}function Dr(e){function t(E){return mo(E,e)}si!==null&&mo(si,e),li!==null&&mo(li,e),oi!==null&&mo(oi,e),js.forEach(t),zs.forEach(t);for(var i=0;i<ui.length;i++){var s=ui[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ui.length&&(i=ui[0],i.blockedOn===null);)Vp(i),i.blockedOn===null&&ui.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var o=i[s],u=i[s+1],h=o[le]||null;if(typeof u=="function")h||Fp(i);else if(h){var b=null;if(u&&u.hasAttribute("formAction")){if(o=u,h=u[le]||null)b=h.formAction;else if(Jc(o)!==null)continue}else b=h.action;typeof b=="function"?i[s+1]=b:(i.splice(s,3),s-=3),Fp(i)}}}function Xp(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Wc(e){this._internalRoot=e}go.prototype.render=Wc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));var i=t.current,s=An();qp(i,s,e,t,null,null)},go.prototype.unmount=Wc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;qp(e.current,2,null,e,null,null),Zl(),t[ge]=null}};function go(e){this._internalRoot=e}go.prototype.unstable_scheduleHydration=function(e){if(e){var t=te();e={blockedOn:null,target:e,priority:t};for(var i=0;i<ui.length&&t!==0&&t<ui[i].priority;i++);ui.splice(i,0,e),i===0&&Vp(e)}};var Zp=a.version;if(Zp!=="19.2.4")throw Error(l(527,Zp,"19.2.4"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=p(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var m1={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yo.isDisabled&&yo.supportsFiber)try{va=yo.inject(m1),ct=yo}catch{}}return Bs.createRoot=function(e,t){if(!c(e))throw Error(l(299));var i=!1,s="",o=nm,u=am,h=im;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Up(e,1,!1,null,null,i,s,null,o,u,h,Xp),e[ge]=t.current,jc(e),new Wc(t)},Bs.hydrateRoot=function(e,t,i){if(!c(e))throw Error(l(299));var s=!1,o="",u=nm,h=am,b=im,E=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(o=i.identifierPrefix),i.onUncaughtError!==void 0&&(u=i.onUncaughtError),i.onCaughtError!==void 0&&(h=i.onCaughtError),i.onRecoverableError!==void 0&&(b=i.onRecoverableError),i.formState!==void 0&&(E=i.formState)),t=Up(e,1,!0,t,i??null,s,o,E,u,h,b,Xp),t.context=Bp(null),i=t.current,s=An(),s=z(s),o=Xa(s),o.callback=null,Za(i,o,s),i=s,t.current.lanes=i,ut(t,i),ua(t),e[ge]=t.current,jc(e),new go(t)},Bs.version="19.2.4",Bs}var rg;function C1(){if(rg)return nf.exports;rg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),nf.exports=T1(),nf.exports}var A1=C1(),Kr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},R1={setTimeout:(n,a)=>setTimeout(n,a),clearTimeout:n=>clearTimeout(n),setInterval:(n,a)=>setInterval(n,a),clearInterval:n=>clearInterval(n)},_1=class{#e=R1;#t=!1;setTimeoutProvider(n){this.#e=n}setTimeout(n,a){return this.#e.setTimeout(n,a)}clearTimeout(n){this.#e.clearTimeout(n)}setInterval(n,a){return this.#e.setInterval(n,a)}clearInterval(n){this.#e.clearInterval(n)}},Fi=new _1;function k1(n){setTimeout(n,0)}var Zi=typeof window>"u"||"Deno"in globalThis;function an(){}function N1(n,a){return typeof n=="function"?n(a):n}function bf(n){return typeof n=="number"&&n>=0&&n!==1/0}function vy(n,a){return Math.max(n+(a||0)-Date.now(),0)}function gi(n,a){return typeof n=="function"?n(a):n}function Gn(n,a){return typeof n=="function"?n(a):n}function sg(n,a){const{type:r="all",exact:l,fetchStatus:c,predicate:f,queryKey:d,stale:m}=n;if(d){if(l){if(a.queryHash!==Gf(d,a.options))return!1}else if(!Zs(a.queryKey,d))return!1}if(r!=="all"){const g=a.isActive();if(r==="active"&&!g||r==="inactive"&&g)return!1}return!(typeof m=="boolean"&&a.isStale()!==m||c&&c!==a.state.fetchStatus||f&&!f(a))}function lg(n,a){const{exact:r,status:l,predicate:c,mutationKey:f}=n;if(f){if(!a.options.mutationKey)return!1;if(r){if(Ii(a.options.mutationKey)!==Ii(f))return!1}else if(!Zs(a.options.mutationKey,f))return!1}return!(l&&a.state.status!==l||c&&!c(a))}function Gf(n,a){return(a?.queryKeyHashFn||Ii)(n)}function Ii(n){return JSON.stringify(n,(a,r)=>xf(r)?Object.keys(r).sort().reduce((l,c)=>(l[c]=r[c],l),{}):r)}function Zs(n,a){return n===a?!0:typeof n!=typeof a?!1:n&&a&&typeof n=="object"&&typeof a=="object"?Object.keys(a).every(r=>Zs(n[r],a[r])):!1}var O1=Object.prototype.hasOwnProperty;function by(n,a,r=0){if(n===a)return n;if(r>500)return a;const l=og(n)&&og(a);if(!l&&!(xf(n)&&xf(a)))return a;const f=(l?n:Object.keys(n)).length,d=l?a:Object.keys(a),m=d.length,g=l?new Array(m):{};let p=0;for(let x=0;x<m;x++){const y=l?x:d[x],T=n[y],N=a[y];if(T===N){g[y]=T,(l?x<f:O1.call(n,y))&&p++;continue}if(T===null||N===null||typeof T!="object"||typeof N!="object"){g[y]=N;continue}const L=by(T,N,r+1);g[y]=L,L===T&&p++}return f===m&&p===f?n:g}function qo(n,a){if(!a||Object.keys(n).length!==Object.keys(a).length)return!1;for(const r in n)if(n[r]!==a[r])return!1;return!0}function og(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function xf(n){if(!ug(n))return!1;const a=n.constructor;if(a===void 0)return!0;const r=a.prototype;return!(!ug(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function ug(n){return Object.prototype.toString.call(n)==="[object Object]"}function M1(n){return new Promise(a=>{Fi.setTimeout(a,n)})}function Sf(n,a,r){return typeof r.structuralSharing=="function"?r.structuralSharing(n,a):r.structuralSharing!==!1?by(n,a):a}function D1(n,a,r=0){const l=[...n,a];return r&&l.length>r?l.slice(1):l}function j1(n,a,r=0){const l=[a,...n];return r&&l.length>r?l.slice(0,-1):l}var Kf=Symbol();function xy(n,a){return!n.queryFn&&a?.initialPromise?()=>a.initialPromise:!n.queryFn||n.queryFn===Kf?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Vf(n,a){return typeof n=="function"?n(...a):!!n}function z1(n,a,r){let l=!1,c;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(c??=a(),l||(l=!0,c.aborted?r():c.addEventListener("abort",r,{once:!0})),c)}),n}var L1=class extends Kr{#e;#t;#n;constructor(){super(),this.#n=n=>{if(!Zi&&window.addEventListener){const a=()=>n();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()})}setFocused(n){this.#e!==n&&(this.#e=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(a=>{a(n)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Yf=new L1;function wf(){let n,a;const r=new Promise((c,f)=>{n=c,a=f});r.status="pending",r.catch(()=>{});function l(c){Object.assign(r,c),delete r.resolve,delete r.reject}return r.resolve=c=>{l({status:"fulfilled",value:c}),n(c)},r.reject=c=>{l({status:"rejected",reason:c}),a(c)},r}var U1=k1;function B1(){let n=[],a=0,r=m=>{m()},l=m=>{m()},c=U1;const f=m=>{a?n.push(m):c(()=>{r(m)})},d=()=>{const m=n;n=[],m.length&&c(()=>{l(()=>{m.forEach(g=>{r(g)})})})};return{batch:m=>{let g;a++;try{g=m()}finally{a--,a||d()}return g},batchCalls:m=>(...g)=>{f(()=>{m(...g)})},schedule:f,setNotifyFunction:m=>{r=m},setBatchNotifyFunction:m=>{l=m},setScheduler:m=>{c=m}}}var qt=B1(),q1=class extends Kr{#e=!0;#t;#n;constructor(){super(),this.#n=n=>{if(!Zi&&window.addEventListener){const a=()=>n(!0),r=()=>n(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(this.setOnline.bind(this))}setOnline(n){this.#e!==n&&(this.#e=n,this.listeners.forEach(r=>{r(n)}))}isOnline(){return this.#e}},Ho=new q1;function H1(n){return Math.min(1e3*2**n,3e4)}function Sy(n){return(n??"online")==="online"?Ho.isOnline():!0}var Ef=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function wy(n){let a=!1,r=0,l;const c=wf(),f=()=>c.status!=="pending",d=B=>{if(!f()){const P=new Ef(B);T(P),n.onCancel?.(P)}},m=()=>{a=!0},g=()=>{a=!1},p=()=>Yf.isFocused()&&(n.networkMode==="always"||Ho.isOnline())&&n.canRun(),x=()=>Sy(n.networkMode)&&n.canRun(),y=B=>{f()||(l?.(),c.resolve(B))},T=B=>{f()||(l?.(),c.reject(B))},N=()=>new Promise(B=>{l=P=>{(f()||p())&&B(P)},n.onPause?.()}).then(()=>{l=void 0,f()||n.onContinue?.()}),L=()=>{if(f())return;let B;const P=r===0?n.initialPromise:void 0;try{B=P??n.fn()}catch(K){B=Promise.reject(K)}Promise.resolve(B).then(y).catch(K=>{if(f())return;const Y=n.retry??(Zi?0:3),W=n.retryDelay??H1,he=typeof W=="function"?W(r,K):W,de=Y===!0||typeof Y=="number"&&r<Y||typeof Y=="function"&&Y(r,K);if(a||!de){T(K);return}r++,n.onFail?.(r,K),M1(he).then(()=>p()?void 0:N()).then(()=>{a?T(K):L()})})};return{promise:c,status:()=>c.status,cancel:d,continue:()=>(l?.(),c),cancelRetry:m,continueRetry:g,canStart:x,start:()=>(x()?L():N().then(L),c)}}var Ey=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bf(this.gcTime)&&(this.#e=Fi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Zi?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Fi.clearTimeout(this.#e),this.#e=void 0)}},Q1=class extends Ey{#e;#t;#n;#i;#a;#s;#l;constructor(n){super(),this.#l=!1,this.#s=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.#i=n.client,this.#n=this.#i.getQueryCache(),this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.#e=fg(this.options),this.state=n.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(n){if(this.options={...this.#s,...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=fg(this.options);a.data!==void 0&&(this.setState(cg(a.data,a.dataUpdatedAt)),this.#e=a)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(n,a){const r=Sf(this.state.data,n,this.options);return this.#r({data:r,type:"success",dataUpdatedAt:a?.updatedAt,manual:a?.manual}),r}setState(n,a){this.#r({type:"setState",state:n,setStateOptions:a})}cancel(n){const a=this.#a?.promise;return this.#a?.cancel(n),a?a.then(an).catch(an):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(n=>Gn(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Kf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>gi(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!vy(this.state.dataUpdatedAt,n)}onFocus(){this.observers.find(a=>a.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(a=>a.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(a=>a!==n),this.observers.length||(this.#a&&(this.#l?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#r({type:"invalidate"})}async fetch(n,a){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&a?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(n&&this.setOptions(n),!this.options.queryFn){const m=this.observers.find(g=>g.options.queryFn);m&&this.setOptions(m.options)}const r=new AbortController,l=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(this.#l=!0,r.signal)})},c=()=>{const m=xy(this.options,a),p=(()=>{const x={client:this.#i,queryKey:this.queryKey,meta:this.meta};return l(x),x})();return this.#l=!1,this.options.persister?this.options.persister(m,p,this):m(p)},d=(()=>{const m={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:c};return l(m),m})();this.options.behavior?.onFetch(d,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==d.fetchOptions?.meta)&&this.#r({type:"fetch",meta:d.fetchOptions?.meta}),this.#a=wy({initialPromise:a?.initialPromise,fn:d.fetchFn,onCancel:m=>{m instanceof Ef&&m.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(m,g)=>{this.#r({type:"failed",failureCount:m,error:g})},onPause:()=>{this.#r({type:"pause"})},onContinue:()=>{this.#r({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0});try{const m=await this.#a.start();if(m===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(m),this.#n.config.onSuccess?.(m,this),this.#n.config.onSettled?.(m,this.state.error,this),m}catch(m){if(m instanceof Ef){if(m.silent)return this.#a.promise;if(m.revert){if(this.state.data===void 0)throw m;return this.state.data}}throw this.#r({type:"error",error:m}),this.#n.config.onError?.(m,this),this.#n.config.onSettled?.(this.state.data,m,this),m}finally{this.scheduleGc()}}#r(n){const a=r=>{switch(n.type){case"failed":return{...r,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Ty(r.data,this.options),fetchMeta:n.meta??null};case"success":const l={...r,...cg(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=n.manual?l:void 0,l;case"error":const c=n.error;return{...r,error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...n.state}}};this.state=a(this.state),qt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:n})})}};function Ty(n,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Sy(a.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function cg(n,a){return{data:n,dataUpdatedAt:a??Date.now(),error:null,isInvalidated:!1,status:"success"}}function fg(n){const a=typeof n.initialData=="function"?n.initialData():n.initialData,r=a!==void 0,l=r?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:a,dataUpdateCount:0,dataUpdatedAt:r?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var P1=class extends Kr{constructor(n,a){super(),this.options=a,this.#e=n,this.#r=null,this.#l=wf(),this.bindMethods(),this.setOptions(a)}#e;#t=void 0;#n=void 0;#i=void 0;#a;#s;#l;#r;#p;#d;#h;#u;#c;#o;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),dg(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Tf(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Tf(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(n){const a=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Gn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),a._defaulted&&!qo(this.options,a)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const l=this.hasListeners();l&&hg(this.#t,r,this.options,a)&&this.#f(),this.updateResult(),l&&(this.#t!==r||Gn(this.options.enabled,this.#t)!==Gn(a.enabled,this.#t)||gi(this.options.staleTime,this.#t)!==gi(a.staleTime,this.#t))&&this.#g();const c=this.#y();l&&(this.#t!==r||Gn(this.options.enabled,this.#t)!==Gn(a.enabled,this.#t)||c!==this.#o)&&this.#v(c)}getOptimisticResult(n){const a=this.#e.getQueryCache().build(this.#e,n),r=this.createResult(a,n);return K1(this,r)&&(this.#i=r,this.#s=this.options,this.#a=this.#t.state),r}getCurrentResult(){return this.#i}trackResult(n,a){return new Proxy(n,{get:(r,l)=>(this.trackProp(l),a?.(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,l))})}trackProp(n){this.#m.add(n)}getCurrentQuery(){return this.#t}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const a=this.#e.defaultQueryOptions(n),r=this.#e.getQueryCache().build(this.#e,a);return r.fetch().then(()=>this.createResult(r,a))}fetch(n){return this.#f({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#f(n){this.#w();let a=this.#t.fetch(this.options,n);return n?.throwOnError||(a=a.catch(an)),a}#g(){this.#x();const n=gi(this.options.staleTime,this.#t);if(Zi||this.#i.isStale||!bf(n))return;const r=vy(this.#i.dataUpdatedAt,n)+1;this.#u=Fi.setTimeout(()=>{this.#i.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(n){this.#S(),this.#o=n,!(Zi||Gn(this.options.enabled,this.#t)===!1||!bf(this.#o)||this.#o===0)&&(this.#c=Fi.setInterval(()=>{(this.options.refetchIntervalInBackground||Yf.isFocused())&&this.#f()},this.#o))}#b(){this.#g(),this.#v(this.#y())}#x(){this.#u&&(Fi.clearTimeout(this.#u),this.#u=void 0)}#S(){this.#c&&(Fi.clearInterval(this.#c),this.#c=void 0)}createResult(n,a){const r=this.#t,l=this.options,c=this.#i,f=this.#a,d=this.#s,g=n!==r?n.state:this.#n,{state:p}=n;let x={...p},y=!1,T;if(a._optimisticResults){const V=this.hasListeners(),ie=!V&&dg(n,a),ke=V&&hg(n,r,a,l);(ie||ke)&&(x={...x,...Ty(p.data,n.options)}),a._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:N,errorUpdatedAt:L,status:B}=x;T=x.data;let P=!1;if(a.placeholderData!==void 0&&T===void 0&&B==="pending"){let V;c?.isPlaceholderData&&a.placeholderData===d?.placeholderData?(V=c.data,P=!0):V=typeof a.placeholderData=="function"?a.placeholderData(this.#h?.state.data,this.#h):a.placeholderData,V!==void 0&&(B="success",T=Sf(c?.data,V,a),y=!0)}if(a.select&&T!==void 0&&!P)if(c&&T===f?.data&&a.select===this.#p)T=this.#d;else try{this.#p=a.select,T=a.select(T),T=Sf(c?.data,T,a),this.#d=T,this.#r=null}catch(V){this.#r=V}this.#r&&(N=this.#r,T=this.#d,L=Date.now(),B="error");const K=x.fetchStatus==="fetching",Y=B==="pending",W=B==="error",he=Y&&K,de=T!==void 0,R={status:B,fetchStatus:x.fetchStatus,isPending:Y,isSuccess:B==="success",isError:W,isInitialLoading:he,isLoading:he,data:T,dataUpdatedAt:x.dataUpdatedAt,error:N,errorUpdatedAt:L,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:x.dataUpdateCount>0||x.errorUpdateCount>0,isFetchedAfterMount:x.dataUpdateCount>g.dataUpdateCount||x.errorUpdateCount>g.errorUpdateCount,isFetching:K,isRefetching:K&&!Y,isLoadingError:W&&!de,isPaused:x.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:W&&de,isStale:Ff(n,a),refetch:this.refetch,promise:this.#l,isEnabled:Gn(a.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const V=R.data!==void 0,ie=R.status==="error"&&!V,ke=Me=>{ie?Me.reject(R.error):V&&Me.resolve(R.data)},Re=()=>{const Me=this.#l=R.promise=wf();ke(Me)},Se=this.#l;switch(Se.status){case"pending":n.queryHash===r.queryHash&&ke(Se);break;case"fulfilled":(ie||R.data!==Se.value)&&Re();break;case"rejected":(!ie||R.error!==Se.reason)&&Re();break}}return R}updateResult(){const n=this.#i,a=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#s=this.options,this.#a.data!==void 0&&(this.#h=this.#t),qo(a,n))return;this.#i=a;const r=()=>{if(!n)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!this.#m.size)return!0;const f=new Set(c??this.#m);return this.options.throwOnError&&f.add("error"),Object.keys(this.#i).some(d=>{const m=d;return this.#i[m]!==n[m]&&f.has(m)})};this.#E({listeners:r()})}#w(){const n=this.#e.getQueryCache().build(this.#e,this.options);if(n===this.#t)return;const a=this.#t;this.#t=n,this.#n=n.state,this.hasListeners()&&(a?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(n){qt.batch(()=>{n.listeners&&this.listeners.forEach(a=>{a(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function G1(n,a){return Gn(a.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&a.retryOnMount===!1)}function dg(n,a){return G1(n,a)||n.state.data!==void 0&&Tf(n,a,a.refetchOnMount)}function Tf(n,a,r){if(Gn(a.enabled,n)!==!1&&gi(a.staleTime,n)!=="static"){const l=typeof r=="function"?r(n):r;return l==="always"||l!==!1&&Ff(n,a)}return!1}function hg(n,a,r,l){return(n!==a||Gn(l.enabled,n)===!1)&&(!r.suspense||n.state.status!=="error")&&Ff(n,r)}function Ff(n,a){return Gn(a.enabled,n)!==!1&&n.isStaleByTime(gi(a.staleTime,n))}function K1(n,a){return!qo(n.getCurrentResult(),a)}function mg(n){return{onFetch:(a,r)=>{const l=a.options,c=a.fetchOptions?.meta?.fetchMore?.direction,f=a.state.data?.pages||[],d=a.state.data?.pageParams||[];let m={pages:[],pageParams:[]},g=0;const p=async()=>{let x=!1;const y=L=>{z1(L,()=>a.signal,()=>x=!0)},T=xy(a.options,a.fetchOptions),N=async(L,B,P)=>{if(x)return Promise.reject();if(B==null&&L.pages.length)return Promise.resolve(L);const Y=(()=>{const fe={client:a.client,queryKey:a.queryKey,pageParam:B,direction:P?"backward":"forward",meta:a.options.meta};return y(fe),fe})(),W=await T(Y),{maxPages:he}=a.options,de=P?j1:D1;return{pages:de(L.pages,W,he),pageParams:de(L.pageParams,B,he)}};if(c&&f.length){const L=c==="backward",B=L?Cy:Cf,P={pages:f,pageParams:d},K=B(l,P);m=await N(P,K,L)}else{const L=n??f.length;do{const B=g===0?d[0]??l.initialPageParam:Cf(l,m);if(g>0&&B==null)break;m=await N(m,B),g++}while(g<L)}return m};a.options.persister?a.fetchFn=()=>a.options.persister?.(p,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},r):a.fetchFn=p}}}function Cf(n,{pages:a,pageParams:r}){const l=a.length-1;return a.length>0?n.getNextPageParam(a[l],a,r[l],r):void 0}function Cy(n,{pages:a,pageParams:r}){return a.length>0?n.getPreviousPageParam?.(a[0],a,r[0],r):void 0}function PA(n,a){return a?Cf(n,a)!=null:!1}function GA(n,a){return!a||!n.getPreviousPageParam?!1:Cy(n,a)!=null}var V1=class extends Ey{#e;#t;#n;#i;constructor(n){super(),this.#e=n.client,this.mutationId=n.mutationId,this.#n=n.mutationCache,this.#t=[],this.state=n.state||Ay(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#t.includes(n)||(this.#t.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#t=this.#t.filter(a=>a!==n),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(n){const a=()=>{this.#a({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=wy({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(f,d)=>{this.#a({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const l=this.state.status==="pending",c=!this.#i.canStart();try{if(l)a();else{this.#a({type:"pending",variables:n,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(n,this,r);const d=await this.options.onMutate?.(n,r);d!==this.state.context&&this.#a({type:"pending",context:d,variables:n,isPaused:c})}const f=await this.#i.start();return await this.#n.config.onSuccess?.(f,n,this.state.context,this,r),await this.options.onSuccess?.(f,n,this.state.context,r),await this.#n.config.onSettled?.(f,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(f,null,n,this.state.context,r),this.#a({type:"success",data:f}),f}catch(f){try{await this.#n.config.onError?.(f,n,this.state.context,this,r)}catch(d){Promise.reject(d)}try{await this.options.onError?.(f,n,this.state.context,r)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,f,this.state.variables,this.state.context,this,r)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,f,n,this.state.context,r)}catch(d){Promise.reject(d)}throw this.#a({type:"error",error:f}),f}finally{this.#n.runNext(this)}}#a(n){const a=r=>{switch(n.type){case"failed":return{...r,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...r,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:n.error,failureCount:r.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=a(this.state),qt.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(n)}),this.#n.notify({mutation:this,type:"updated",action:n})})}};function Ay(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Y1=class extends Kr{constructor(n={}){super(),this.config=n,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(n,a,r){const l=new V1({client:n,mutationCache:this,mutationId:++this.#n,options:n.defaultMutationOptions(a),state:r});return this.add(l),l}add(n){this.#e.add(n);const a=vo(n);if(typeof a=="string"){const r=this.#t.get(a);r?r.push(n):this.#t.set(a,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#e.delete(n)){const a=vo(n);if(typeof a=="string"){const r=this.#t.get(a);if(r)if(r.length>1){const l=r.indexOf(n);l!==-1&&r.splice(l,1)}else r[0]===n&&this.#t.delete(a)}}this.notify({type:"removed",mutation:n})}canRun(n){const a=vo(n);if(typeof a=="string"){const l=this.#t.get(a)?.find(c=>c.state.status==="pending");return!l||l===n}else return!0}runNext(n){const a=vo(n);return typeof a=="string"?this.#t.get(a)?.find(l=>l!==n&&l.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){qt.batch(()=>{this.#e.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(n){const a={exact:!0,...n};return this.getAll().find(r=>lg(a,r))}findAll(n={}){return this.getAll().filter(a=>lg(n,a))}notify(n){qt.batch(()=>{this.listeners.forEach(a=>{a(n)})})}resumePausedMutations(){const n=this.getAll().filter(a=>a.state.isPaused);return qt.batch(()=>Promise.all(n.map(a=>a.continue().catch(an))))}};function vo(n){return n.options.scope?.id}var F1=class extends Kr{#e;#t=void 0;#n;#i;constructor(a,r){super(),this.#e=a,this.setOptions(r),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(a){const r=this.options;this.options=this.#e.defaultMutationOptions(a),qo(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&Ii(r.mutationKey)!==Ii(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(a){this.#a(),this.#s(a)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#s()}mutate(a,r){return this.#i=r,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(a)}#a(){const a=this.#n?.state??Ay();this.#t={...a,isPending:a.status==="pending",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset}}#s(a){qt.batch(()=>{if(this.#i&&this.hasListeners()){const r=this.#t.variables,l=this.#t.context,c={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(a?.type==="success"){try{this.#i.onSuccess?.(a.data,r,l,c)}catch(f){Promise.reject(f)}try{this.#i.onSettled?.(a.data,null,r,l,c)}catch(f){Promise.reject(f)}}else if(a?.type==="error"){try{this.#i.onError?.(a.error,r,l,c)}catch(f){Promise.reject(f)}try{this.#i.onSettled?.(void 0,a.error,r,l,c)}catch(f){Promise.reject(f)}}}this.listeners.forEach(r=>{r(this.#t)})})}},X1=class extends Kr{constructor(n={}){super(),this.config=n,this.#e=new Map}#e;build(n,a,r){const l=a.queryKey,c=a.queryHash??Gf(l,a);let f=this.get(c);return f||(f=new Q1({client:n,queryKey:l,queryHash:c,options:n.defaultQueryOptions(a),state:r,defaultOptions:n.getQueryDefaults(l)}),this.add(f)),f}add(n){this.#e.has(n.queryHash)||(this.#e.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const a=this.#e.get(n.queryHash);a&&(n.destroy(),a===n&&this.#e.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){qt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#e.get(n)}getAll(){return[...this.#e.values()]}find(n){const a={exact:!0,...n};return this.getAll().find(r=>sg(a,r))}findAll(n={}){const a=this.getAll();return Object.keys(n).length>0?a.filter(r=>sg(n,r)):a}notify(n){qt.batch(()=>{this.listeners.forEach(a=>{a(n)})})}onFocus(){qt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){qt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Z1=class{#e;#t;#n;#i;#a;#s;#l;#r;constructor(n={}){this.#e=n.queryCache||new X1,this.#t=n.mutationCache||new Y1,this.#n=n.defaultOptions||{},this.#i=new Map,this.#a=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#l=Yf.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#r=Ho.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#l?.(),this.#l=void 0,this.#r?.(),this.#r=void 0)}isFetching(n){return this.#e.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#t.findAll({...n,status:"pending"}).length}getQueryData(n){const a=this.defaultQueryOptions({queryKey:n});return this.#e.get(a.queryHash)?.state.data}ensureQueryData(n){const a=this.defaultQueryOptions(n),r=this.#e.build(this,a),l=r.state.data;return l===void 0?this.fetchQuery(n):(n.revalidateIfStale&&r.isStaleByTime(gi(a.staleTime,r))&&this.prefetchQuery(a),Promise.resolve(l))}getQueriesData(n){return this.#e.findAll(n).map(({queryKey:a,state:r})=>{const l=r.data;return[a,l]})}setQueryData(n,a,r){const l=this.defaultQueryOptions({queryKey:n}),f=this.#e.get(l.queryHash)?.state.data,d=N1(a,f);if(d!==void 0)return this.#e.build(this,l).setData(d,{...r,manual:!0})}setQueriesData(n,a,r){return qt.batch(()=>this.#e.findAll(n).map(({queryKey:l})=>[l,this.setQueryData(l,a,r)]))}getQueryState(n){const a=this.defaultQueryOptions({queryKey:n});return this.#e.get(a.queryHash)?.state}removeQueries(n){const a=this.#e;qt.batch(()=>{a.findAll(n).forEach(r=>{a.remove(r)})})}resetQueries(n,a){const r=this.#e;return qt.batch(()=>(r.findAll(n).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...n},a)))}cancelQueries(n,a={}){const r={revert:!0,...a},l=qt.batch(()=>this.#e.findAll(n).map(c=>c.cancel(r)));return Promise.all(l).then(an).catch(an)}invalidateQueries(n,a={}){return qt.batch(()=>(this.#e.findAll(n).forEach(r=>{r.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},a)))}refetchQueries(n,a={}){const r={...a,cancelRefetch:a.cancelRefetch??!0},l=qt.batch(()=>this.#e.findAll(n).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let f=c.fetch(void 0,r);return r.throwOnError||(f=f.catch(an)),c.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(l).then(an)}fetchQuery(n){const a=this.defaultQueryOptions(n);a.retry===void 0&&(a.retry=!1);const r=this.#e.build(this,a);return r.isStaleByTime(gi(a.staleTime,r))?r.fetch(a):Promise.resolve(r.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(an).catch(an)}fetchInfiniteQuery(n){return n.behavior=mg(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(an).catch(an)}ensureInfiniteQueryData(n){return n.behavior=mg(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Ho.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(n){this.#n=n}setQueryDefaults(n,a){this.#i.set(Ii(n),{queryKey:n,defaultOptions:a})}getQueryDefaults(n){const a=[...this.#i.values()],r={};return a.forEach(l=>{Zs(n,l.queryKey)&&Object.assign(r,l.defaultOptions)}),r}setMutationDefaults(n,a){this.#a.set(Ii(n),{mutationKey:n,defaultOptions:a})}getMutationDefaults(n){const a=[...this.#a.values()],r={};return a.forEach(l=>{Zs(n,l.mutationKey)&&Object.assign(r,l.defaultOptions)}),r}defaultQueryOptions(n){if(n._defaulted)return n;const a={...this.#n.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return a.queryHash||(a.queryHash=Gf(a.queryKey,a)),a.refetchOnReconnect===void 0&&(a.refetchOnReconnect=a.networkMode!=="always"),a.throwOnError===void 0&&(a.throwOnError=!!a.suspense),!a.networkMode&&a.persister&&(a.networkMode="offlineFirst"),a.queryFn===Kf&&(a.enabled=!1),a}defaultMutationOptions(n){return n?._defaulted?n:{...this.#n.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ry=S.createContext(void 0),tt=n=>{const a=S.useContext(Ry);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},I1=({client:n,children:a})=>(S.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),v.jsx(Ry.Provider,{value:n,children:a})),_y=S.createContext(!1),J1=()=>S.useContext(_y);_y.Provider;function $1(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var W1=S.createContext($1()),ex=()=>S.useContext(W1),tx=(n,a,r)=>{const l=r?.state.error&&typeof n.throwOnError=="function"?Vf(n.throwOnError,[r.state.error,r]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||l)&&(a.isReset()||(n.retryOnMount=!1))},nx=n=>{S.useEffect(()=>{n.clearReset()},[n])},ax=({result:n,errorResetBoundary:a,throwOnError:r,query:l,suspense:c})=>n.isError&&!a.isReset()&&!n.isFetching&&l&&(c&&n.data===void 0||Vf(r,[n.error,l])),ix=n=>{if(n.suspense){const r=c=>c==="static"?c:Math.max(c??1e3,1e3),l=n.staleTime;n.staleTime=typeof l=="function"?(...c)=>r(l(...c)):r(l),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},rx=(n,a)=>n.isLoading&&n.isFetching&&!a,sx=(n,a)=>n?.suspense&&a.isPending,pg=(n,a,r)=>a.fetchOptimistic(n).catch(()=>{r.clearReset()});function lx(n,a,r){const l=J1(),c=ex(),f=tt(),d=f.defaultQueryOptions(n);f.getDefaultOptions().queries?._experimental_beforeQuery?.(d);const m=f.getQueryCache().get(d.queryHash);d._optimisticResults=l?"isRestoring":"optimistic",ix(d),tx(d,c,m),nx(c);const g=!f.getQueryCache().get(d.queryHash),[p]=S.useState(()=>new a(f,d)),x=p.getOptimisticResult(d),y=!l&&n.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(T=>{const N=y?p.subscribe(qt.batchCalls(T)):an;return p.updateResult(),N},[p,y]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),S.useEffect(()=>{p.setOptions(d)},[d,p]),sx(d,x))throw pg(d,p,c);if(ax({result:x,errorResetBoundary:c,throwOnError:d.throwOnError,query:m,suspense:d.suspense}))throw x.error;return f.getDefaultOptions().queries?._experimental_afterQuery?.(d,x),d.experimental_prefetchInRender&&!Zi&&rx(x,l)&&(g?pg(d,p,c):m?.promise)?.catch(an).finally(()=>{p.updateResult()}),d.notifyOnChangeProps?x:p.trackResult(x)}function rn(n,a){return lx(n,P1)}function ht(n,a){const r=tt(),[l]=S.useState(()=>new F1(r,n));S.useEffect(()=>{l.setOptions(n)},[l,n]);const c=S.useSyncExternalStore(S.useCallback(d=>l.subscribe(qt.batchCalls(d)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),f=S.useCallback((d,m)=>{l.mutate(d,m).catch(an)},[l]);if(c.error&&Vf(l.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:f,mutateAsync:c.mutate}}var ky=yy();const ox=gy(ky);function ux(n){if(typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",a.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}const cx=n=>{switch(n){case"success":return hx;case"info":return px;case"warning":return mx;case"error":return gx;default:return null}},fx=Array(12).fill(0),dx=({visible:n,className:a})=>ne.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":n},ne.createElement("div",{className:"sonner-spinner"},fx.map((r,l)=>ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${l}`})))),hx=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),mx=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),px=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),gx=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),yx=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),vx=()=>{const[n,a]=ne.useState(document.hidden);return ne.useEffect(()=>{const r=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),n};let Af=1;class bx{constructor(){this.subscribe=a=>(this.subscribers.push(a),()=>{const r=this.subscribers.indexOf(a);this.subscribers.splice(r,1)}),this.publish=a=>{this.subscribers.forEach(r=>r(a))},this.addToast=a=>{this.publish(a),this.toasts=[...this.toasts,a]},this.create=a=>{var r;const{message:l,...c}=a,f=typeof a?.id=="number"||((r=a.id)==null?void 0:r.length)>0?a.id:Af++,d=this.toasts.find(g=>g.id===f),m=a.dismissible===void 0?!0:a.dismissible;return this.dismissedToasts.has(f)&&this.dismissedToasts.delete(f),d?this.toasts=this.toasts.map(g=>g.id===f?(this.publish({...g,...a,id:f,title:l}),{...g,...a,id:f,dismissible:m,title:l}):g):this.addToast({title:l,...c,dismissible:m,id:f}),f},this.dismiss=a=>(a?(this.dismissedToasts.add(a),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:a,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(l=>l({id:r.id,dismiss:!0}))}),a),this.message=(a,r)=>this.create({...r,message:a}),this.error=(a,r)=>this.create({...r,message:a,type:"error"}),this.success=(a,r)=>this.create({...r,type:"success",message:a}),this.info=(a,r)=>this.create({...r,type:"info",message:a}),this.warning=(a,r)=>this.create({...r,type:"warning",message:a}),this.loading=(a,r)=>this.create({...r,type:"loading",message:a}),this.promise=(a,r)=>{if(!r)return;let l;r.loading!==void 0&&(l=this.create({...r,promise:a,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const c=Promise.resolve(a instanceof Function?a():a);let f=l!==void 0,d;const m=c.then(async p=>{if(d=["resolve",p],ne.isValidElement(p))f=!1,this.create({id:l,type:"default",message:p});else if(Sx(p)&&!p.ok){f=!1;const y=typeof r.error=="function"?await r.error(`HTTP error! status: ${p.status}`):r.error,T=typeof r.description=="function"?await r.description(`HTTP error! status: ${p.status}`):r.description,L=typeof y=="object"&&!ne.isValidElement(y)?y:{message:y};this.create({id:l,type:"error",description:T,...L})}else if(p instanceof Error){f=!1;const y=typeof r.error=="function"?await r.error(p):r.error,T=typeof r.description=="function"?await r.description(p):r.description,L=typeof y=="object"&&!ne.isValidElement(y)?y:{message:y};this.create({id:l,type:"error",description:T,...L})}else if(r.success!==void 0){f=!1;const y=typeof r.success=="function"?await r.success(p):r.success,T=typeof r.description=="function"?await r.description(p):r.description,L=typeof y=="object"&&!ne.isValidElement(y)?y:{message:y};this.create({id:l,type:"success",description:T,...L})}}).catch(async p=>{if(d=["reject",p],r.error!==void 0){f=!1;const x=typeof r.error=="function"?await r.error(p):r.error,y=typeof r.description=="function"?await r.description(p):r.description,N=typeof x=="object"&&!ne.isValidElement(x)?x:{message:x};this.create({id:l,type:"error",description:y,...N})}}).finally(()=>{f&&(this.dismiss(l),l=void 0),r.finally==null||r.finally.call(r)}),g=()=>new Promise((p,x)=>m.then(()=>d[0]==="reject"?x(d[1]):p(d[1])).catch(x));return typeof l!="string"&&typeof l!="number"?{unwrap:g}:Object.assign(l,{unwrap:g})},this.custom=(a,r)=>{const l=r?.id||Af++;return this.create({jsx:a(l),id:l,...r}),l},this.getActiveToasts=()=>this.toasts.filter(a=>!this.dismissedToasts.has(a.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const gn=new bx,xx=(n,a)=>{const r=a?.id||Af++;return gn.addToast({title:n,...a,id:r}),r},Sx=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",wx=xx,Ex=()=>gn.toasts,Tx=()=>gn.getActiveToasts(),Ur=Object.assign(wx,{success:gn.success,info:gn.info,warning:gn.warning,error:gn.error,custom:gn.custom,message:gn.message,promise:gn.promise,dismiss:gn.dismiss,loading:gn.loading},{getHistory:Ex,getToasts:Tx});ux("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function bo(n){return n.label!==void 0}const Cx=3,Ax="24px",Rx="16px",gg=4e3,_x=356,kx=14,Nx=45,Ox=200;function ca(...n){return n.filter(Boolean).join(" ")}function Mx(n){const[a,r]=n.split("-"),l=[];return a&&l.push(a),r&&l.push(r),l}const Dx=n=>{var a,r,l,c,f,d,m,g,p;const{invert:x,toast:y,unstyled:T,interacting:N,setHeights:L,visibleToasts:B,heights:P,index:K,toasts:Y,expanded:W,removeToast:he,defaultRichColors:de,closeButton:fe,style:R,cancelButtonStyle:V,actionButtonStyle:ie,className:ke="",descriptionClassName:Re="",duration:Se,position:Me,gap:ze,expandByDefault:Ee,classNames:k,icons:X,closeButtonAriaLabel:Q="Close toast"}=n,[me,ye]=ne.useState(null),[C,q]=ne.useState(null),[H,I]=ne.useState(!1),[ee,$]=ne.useState(!1),[ae,Te]=ne.useState(!1),[Be,Pt]=ne.useState(!1),[en,Je]=ne.useState(!1),[Fn,sn]=ne.useState(0),[Si,ln]=ne.useState(0),ga=ne.useRef(y.duration||Se||gg),wi=ne.useRef(null),It=ne.useRef(null),Ei=K===0,Ti=K+1<=B,Gt=y.type,ia=y.dismissible!==!1,gt=y.className||"",ya=y.descriptionClassName||"",ra=ne.useMemo(()=>P.findIndex(_e=>_e.toastId===y.id)||0,[P,y.id]),Qa=ne.useMemo(()=>{var _e;return(_e=y.closeButton)!=null?_e:fe},[y.closeButton,fe]),Kt=ne.useMemo(()=>y.duration||Se||gg,[y.duration,Se]),tn=ne.useRef(0),kn=ne.useRef(0),Wi=ne.useRef(0),Nn=ne.useRef(null),[va,ct]=Me.split("-"),on=ne.useMemo(()=>P.reduce((_e,ot,Et)=>Et>=ra?_e:_e+ot.height,0),[P,ra]),Lt=vx(),er=y.invert||x,Ci=Gt==="loading";kn.current=ne.useMemo(()=>ra*ze+on,[ra,on]),ne.useEffect(()=>{ga.current=Kt},[Kt]),ne.useEffect(()=>{I(!0)},[]),ne.useEffect(()=>{const _e=It.current;if(_e){const ot=_e.getBoundingClientRect().height;return ln(ot),L(Et=>[{toastId:y.id,height:ot,position:y.position},...Et]),()=>L(Et=>Et.filter(Tt=>Tt.toastId!==y.id))}},[L,y.id]),ne.useLayoutEffect(()=>{if(!H)return;const _e=It.current,ot=_e.style.height;_e.style.height="auto";const Et=_e.getBoundingClientRect().height;_e.style.height=ot,ln(Et),L(Tt=>Tt.find(ut=>ut.toastId===y.id)?Tt.map(ut=>ut.toastId===y.id?{...ut,height:Et}:ut):[{toastId:y.id,height:Et,position:y.position},...Tt])},[H,y.title,y.description,L,y.id,y.jsx,y.action,y.cancel]);const yn=ne.useCallback(()=>{$(!0),sn(kn.current),L(_e=>_e.filter(ot=>ot.toastId!==y.id)),setTimeout(()=>{he(y)},Ox)},[y,he,L,kn]);ne.useEffect(()=>{if(y.promise&&Gt==="loading"||y.duration===1/0||y.type==="loading")return;let _e;return W||N||Lt?(()=>{if(Wi.current<tn.current){const Tt=new Date().getTime()-tn.current;ga.current=ga.current-Tt}Wi.current=new Date().getTime()})():ga.current!==1/0&&(tn.current=new Date().getTime(),_e=setTimeout(()=>{y.onAutoClose==null||y.onAutoClose.call(y,y),yn()},ga.current)),()=>clearTimeout(_e)},[W,N,y,Gt,Lt,yn]),ne.useEffect(()=>{y.delete&&(yn(),y.onDismiss==null||y.onDismiss.call(y,y))},[yn,y.delete]);function Xn(){var _e;if(X?.loading){var ot;return ne.createElement("div",{className:ca(k?.loader,y==null||(ot=y.classNames)==null?void 0:ot.loader,"sonner-loader"),"data-visible":Gt==="loading"},X.loading)}return ne.createElement(dx,{className:ca(k?.loader,y==null||(_e=y.classNames)==null?void 0:_e.loader),visible:Gt==="loading"})}const ba=y.icon||X?.[Gt]||cx(Gt);var Zn,On;return ne.createElement("li",{tabIndex:0,ref:It,className:ca(ke,gt,k?.toast,y==null||(a=y.classNames)==null?void 0:a.toast,k?.default,k?.[Gt],y==null||(r=y.classNames)==null?void 0:r[Gt]),"data-sonner-toast":"","data-rich-colors":(Zn=y.richColors)!=null?Zn:de,"data-styled":!(y.jsx||y.unstyled||T),"data-mounted":H,"data-promise":!!y.promise,"data-swiped":en,"data-removed":ee,"data-visible":Ti,"data-y-position":va,"data-x-position":ct,"data-index":K,"data-front":Ei,"data-swiping":ae,"data-dismissible":ia,"data-type":Gt,"data-invert":er,"data-swipe-out":Be,"data-swipe-direction":C,"data-expanded":!!(W||Ee&&H),"data-testid":y.testId,style:{"--index":K,"--toasts-before":K,"--z-index":Y.length-K,"--offset":`${ee?Fn:kn.current}px`,"--initial-height":Ee?"auto":`${Si}px`,...R,...y.style},onDragEnd:()=>{Te(!1),ye(null),Nn.current=null},onPointerDown:_e=>{_e.button!==2&&(Ci||!ia||(wi.current=new Date,sn(kn.current),_e.target.setPointerCapture(_e.pointerId),_e.target.tagName!=="BUTTON"&&(Te(!0),Nn.current={x:_e.clientX,y:_e.clientY})))},onPointerUp:()=>{var _e,ot,Et;if(Be||!ia)return;Nn.current=null;const Tt=Number(((_e=It.current)==null?void 0:_e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),vn=Number(((ot=It.current)==null?void 0:ot.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ut=new Date().getTime()-((Et=wi.current)==null?void 0:Et.getTime()),Jt=me==="x"?Tt:vn,xa=Math.abs(Jt)/ut;if(Math.abs(Jt)>=Nx||xa>.11){sn(kn.current),y.onDismiss==null||y.onDismiss.call(y,y),q(me==="x"?Tt>0?"right":"left":vn>0?"down":"up"),yn(),Pt(!0);return}else{var w,_;(w=It.current)==null||w.style.setProperty("--swipe-amount-x","0px"),(_=It.current)==null||_.style.setProperty("--swipe-amount-y","0px")}Je(!1),Te(!1),ye(null)},onPointerMove:_e=>{var ot,Et,Tt;if(!Nn.current||!ia||((ot=window.getSelection())==null?void 0:ot.toString().length)>0)return;const ut=_e.clientY-Nn.current.y,Jt=_e.clientX-Nn.current.x;var xa;const w=(xa=n.swipeDirections)!=null?xa:Mx(Me);!me&&(Math.abs(Jt)>1||Math.abs(ut)>1)&&ye(Math.abs(Jt)>Math.abs(ut)?"x":"y");let _={x:0,y:0};const z=J=>1/(1.5+Math.abs(J)/20);if(me==="y"){if(w.includes("top")||w.includes("bottom"))if(w.includes("top")&&ut<0||w.includes("bottom")&&ut>0)_.y=ut;else{const J=ut*z(ut);_.y=Math.abs(J)<Math.abs(ut)?J:ut}}else if(me==="x"&&(w.includes("left")||w.includes("right")))if(w.includes("left")&&Jt<0||w.includes("right")&&Jt>0)_.x=Jt;else{const J=Jt*z(Jt);_.x=Math.abs(J)<Math.abs(Jt)?J:Jt}(Math.abs(_.x)>0||Math.abs(_.y)>0)&&Je(!0),(Et=It.current)==null||Et.style.setProperty("--swipe-amount-x",`${_.x}px`),(Tt=It.current)==null||Tt.style.setProperty("--swipe-amount-y",`${_.y}px`)}},Qa&&!y.jsx&&Gt!=="loading"?ne.createElement("button",{"aria-label":Q,"data-disabled":Ci,"data-close-button":!0,onClick:Ci||!ia?()=>{}:()=>{yn(),y.onDismiss==null||y.onDismiss.call(y,y)},className:ca(k?.closeButton,y==null||(l=y.classNames)==null?void 0:l.closeButton)},(On=X?.close)!=null?On:yx):null,(Gt||y.icon||y.promise)&&y.icon!==null&&(X?.[Gt]!==null||y.icon)?ne.createElement("div",{"data-icon":"",className:ca(k?.icon,y==null||(c=y.classNames)==null?void 0:c.icon)},y.promise||y.type==="loading"&&!y.icon?y.icon||Xn():null,y.type!=="loading"?ba:null):null,ne.createElement("div",{"data-content":"",className:ca(k?.content,y==null||(f=y.classNames)==null?void 0:f.content)},ne.createElement("div",{"data-title":"",className:ca(k?.title,y==null||(d=y.classNames)==null?void 0:d.title)},y.jsx?y.jsx:typeof y.title=="function"?y.title():y.title),y.description?ne.createElement("div",{"data-description":"",className:ca(Re,ya,k?.description,y==null||(m=y.classNames)==null?void 0:m.description)},typeof y.description=="function"?y.description():y.description):null),ne.isValidElement(y.cancel)?y.cancel:y.cancel&&bo(y.cancel)?ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:y.cancelButtonStyle||V,onClick:_e=>{bo(y.cancel)&&ia&&(y.cancel.onClick==null||y.cancel.onClick.call(y.cancel,_e),yn())},className:ca(k?.cancelButton,y==null||(g=y.classNames)==null?void 0:g.cancelButton)},y.cancel.label):null,ne.isValidElement(y.action)?y.action:y.action&&bo(y.action)?ne.createElement("button",{"data-button":!0,"data-action":!0,style:y.actionButtonStyle||ie,onClick:_e=>{bo(y.action)&&(y.action.onClick==null||y.action.onClick.call(y.action,_e),!_e.defaultPrevented&&yn())},className:ca(k?.actionButton,y==null||(p=y.classNames)==null?void 0:p.actionButton)},y.action.label):null)};function yg(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function jx(n,a){const r={};return[n,a].forEach((l,c)=>{const f=c===1,d=f?"--mobile-offset":"--offset",m=f?Rx:Ax;function g(p){["top","right","bottom","left"].forEach(x=>{r[`${d}-${x}`]=typeof p=="number"?`${p}px`:p})}typeof l=="number"||typeof l=="string"?g(l):typeof l=="object"?["top","right","bottom","left"].forEach(p=>{l[p]===void 0?r[`${d}-${p}`]=m:r[`${d}-${p}`]=typeof l[p]=="number"?`${l[p]}px`:l[p]}):g(m)}),r}const zx=ne.forwardRef(function(a,r){const{id:l,invert:c,position:f="bottom-right",hotkey:d=["altKey","KeyT"],expand:m,closeButton:g,className:p,offset:x,mobileOffset:y,theme:T="light",richColors:N,duration:L,style:B,visibleToasts:P=Cx,toastOptions:K,dir:Y=yg(),gap:W=kx,icons:he,containerAriaLabel:de="Notifications"}=a,[fe,R]=ne.useState([]),V=ne.useMemo(()=>l?fe.filter(H=>H.toasterId===l):fe.filter(H=>!H.toasterId),[fe,l]),ie=ne.useMemo(()=>Array.from(new Set([f].concat(V.filter(H=>H.position).map(H=>H.position)))),[V,f]),[ke,Re]=ne.useState([]),[Se,Me]=ne.useState(!1),[ze,Ee]=ne.useState(!1),[k,X]=ne.useState(T!=="system"?T:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=ne.useRef(null),me=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),ye=ne.useRef(null),C=ne.useRef(!1),q=ne.useCallback(H=>{R(I=>{var ee;return(ee=I.find($=>$.id===H.id))!=null&&ee.delete||gn.dismiss(H.id),I.filter(({id:$})=>$!==H.id)})},[]);return ne.useEffect(()=>gn.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{R(I=>I.map(ee=>ee.id===H.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{ox.flushSync(()=>{R(I=>{const ee=I.findIndex($=>$.id===H.id);return ee!==-1?[...I.slice(0,ee),{...I[ee],...H},...I.slice(ee+1)]:[H,...I]})})})}),[fe]),ne.useEffect(()=>{if(T!=="system"){X(T);return}if(T==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:I})=>{X(I?"dark":"light")})}catch{H.addListener(({matches:ee})=>{try{X(ee?"dark":"light")}catch($){console.error($)}})}},[T]),ne.useEffect(()=>{fe.length<=1&&Me(!1)},[fe]),ne.useEffect(()=>{const H=I=>{var ee;if(d.every(Te=>I[Te]||I.code===Te)){var ae;Me(!0),(ae=Q.current)==null||ae.focus()}I.code==="Escape"&&(document.activeElement===Q.current||(ee=Q.current)!=null&&ee.contains(document.activeElement))&&Me(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[d]),ne.useEffect(()=>{if(Q.current)return()=>{ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null,C.current=!1)}},[Q.current]),ne.createElement("section",{ref:r,"aria-label":`${de} ${me}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ie.map((H,I)=>{var ee;const[$,ae]=H.split("-");return V.length?ne.createElement("ol",{key:H,dir:Y==="auto"?yg():Y,tabIndex:-1,ref:Q,className:p,"data-sonner-toaster":!0,"data-sonner-theme":k,"data-y-position":$,"data-x-position":ae,style:{"--front-toast-height":`${((ee=ke[0])==null?void 0:ee.height)||0}px`,"--width":`${_x}px`,"--gap":`${W}px`,...B,...jx(x,y)},onBlur:Te=>{C.current&&!Te.currentTarget.contains(Te.relatedTarget)&&(C.current=!1,ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null))},onFocus:Te=>{Te.target instanceof HTMLElement&&Te.target.dataset.dismissible==="false"||C.current||(C.current=!0,ye.current=Te.relatedTarget)},onMouseEnter:()=>Me(!0),onMouseMove:()=>Me(!0),onMouseLeave:()=>{ze||Me(!1)},onDragEnd:()=>Me(!1),onPointerDown:Te=>{Te.target instanceof HTMLElement&&Te.target.dataset.dismissible==="false"||Ee(!0)},onPointerUp:()=>Ee(!1)},V.filter(Te=>!Te.position&&I===0||Te.position===H).map((Te,Be)=>{var Pt,en;return ne.createElement(Dx,{key:Te.id,icons:he,index:Be,toast:Te,defaultRichColors:N,duration:(Pt=K?.duration)!=null?Pt:L,className:K?.className,descriptionClassName:K?.descriptionClassName,invert:c,visibleToasts:P,closeButton:(en=K?.closeButton)!=null?en:g,interacting:ze,position:H,style:K?.style,unstyled:K?.unstyled,classNames:K?.classNames,cancelButtonStyle:K?.cancelButtonStyle,actionButtonStyle:K?.actionButtonStyle,closeButtonAriaLabel:K?.closeButtonAriaLabel,removeToast:q,toasts:V.filter(Je=>Je.position==Te.position),heights:ke.filter(Je=>Je.position==Te.position),setHeights:Re,expandByDefault:m,gap:W,expanded:Se,swipeDirections:a.swipeDirections})})):null}))}),Lx=new Z1({defaultOptions:{queries:{staleTime:1e3*60,retry:1}}}),Ux="modulepreload",Bx=function(n){return"/"+n},vg={},_n=function(a,r,l){let c=Promise.resolve();if(r&&r.length>0){let g=function(p){return Promise.all(p.map(x=>Promise.resolve(x).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),m=d?.nonce||d?.getAttribute("nonce");c=g(r.map(p=>{if(p=Bx(p),p in vg)return;vg[p]=!0;const x=p.endsWith(".css"),y=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${y}`))return;const T=document.createElement("link");if(T.rel=x?"stylesheet":Ux,x||(T.as="script"),T.crossOrigin="",T.href=p,m&&T.setAttribute("nonce",m),document.head.appendChild(T),x)return new Promise((N,L)=>{T.addEventListener("load",N),T.addEventListener("error",()=>L(new Error(`Unable to preload CSS for ${p}`)))})}))}function f(d){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=d,window.dispatchEvent(m),!m.defaultPrevented)throw d}return c.then(d=>{for(const m of d||[])m.status==="rejected"&&f(m.reason);return a().catch(f)})};var Ny=n=>{throw TypeError(n)},qx=(n,a,r)=>a.has(n)||Ny("Cannot "+r),lf=(n,a,r)=>(qx(n,a,"read from private field"),r?r.call(n):a.get(n)),Hx=(n,a,r)=>a.has(n)?Ny("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,r),bg="popstate";function Qx(n={}){function a(l,c){let{pathname:f,search:d,hash:m}=l.location;return Is("",{pathname:f,search:d,hash:m},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function r(l,c){return typeof c=="string"?c:ma(c)}return Gx(a,r,null,n)}function qe(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function zt(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function Px(){return Math.random().toString(36).substring(2,10)}function xg(n,a){return{usr:n.state,key:n.key,idx:a}}function Is(n,a,r=null,l){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?vi(a):a,state:r,key:a&&a.key||l||Px()}}function ma({pathname:n="/",search:a="",hash:r=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),r&&r!=="#"&&(n+=r.charAt(0)==="#"?r:"#"+r),n}function vi(n){let a={};if(n){let r=n.indexOf("#");r>=0&&(a.hash=n.substring(r),n=n.substring(0,r));let l=n.indexOf("?");l>=0&&(a.search=n.substring(l),n=n.substring(0,l)),n&&(a.pathname=n)}return a}function Gx(n,a,r,l={}){let{window:c=document.defaultView,v5Compat:f=!1}=l,d=c.history,m="POP",g=null,p=x();p==null&&(p=0,d.replaceState({...d.state,idx:p},""));function x(){return(d.state||{idx:null}).idx}function y(){m="POP";let P=x(),K=P==null?null:P-p;p=P,g&&g({action:m,location:B.location,delta:K})}function T(P,K){m="PUSH";let Y=Is(B.location,P,K);p=x()+1;let W=xg(Y,p),he=B.createHref(Y);try{d.pushState(W,"",he)}catch(de){if(de instanceof DOMException&&de.name==="DataCloneError")throw de;c.location.assign(he)}f&&g&&g({action:m,location:B.location,delta:1})}function N(P,K){m="REPLACE";let Y=Is(B.location,P,K);p=x();let W=xg(Y,p),he=B.createHref(Y);d.replaceState(W,"",he),f&&g&&g({action:m,location:B.location,delta:0})}function L(P){return Oy(P)}let B={get action(){return m},get location(){return n(c,d)},listen(P){if(g)throw new Error("A history only accepts one active listener");return c.addEventListener(bg,y),g=P,()=>{c.removeEventListener(bg,y),g=null}},createHref(P){return a(c,P)},createURL:L,encodeLocation(P){let K=L(P);return{pathname:K.pathname,search:K.search,hash:K.hash}},push:T,replace:N,go(P){return d.go(P)}};return B}function Oy(n,a=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),qe(r,"No window.location.(origin|href) available to create URL");let l=typeof n=="string"?n:ma(n);return l=l.replace(/ $/,"%20"),!a&&l.startsWith("//")&&(l=r+l),new URL(l,r)}var Ks,Sg=class{constructor(n){if(Hx(this,Ks,new Map),n)for(let[a,r]of n)this.set(a,r)}get(n){if(lf(this,Ks).has(n))return lf(this,Ks).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,a){lf(this,Ks).set(n,a)}};Ks=new WeakMap;var Kx=new Set(["lazy","caseSensitive","path","id","index","children"]);function Vx(n){return Kx.has(n)}var Yx=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Fx(n){return Yx.has(n)}function Xx(n){return n.index===!0}function Js(n,a,r=[],l={},c=!1){return n.map((f,d)=>{let m=[...r,String(d)],g=typeof f.id=="string"?f.id:m.join("-");if(qe(f.index!==!0||!f.children,"Cannot specify children on an index route"),qe(c||!l[g],`Found a route id collision on id "${g}". Route id's must be globally unique within Data Router usages`),Xx(f)){let p={...f,id:g};return l[g]=wg(p,a(p)),p}else{let p={...f,id:g,children:void 0};return l[g]=wg(p,a(p)),f.children&&(p.children=Js(f.children,a,m,l,c)),p}})}function wg(n,a){return Object.assign(n,{...a,...typeof a.lazy=="object"&&a.lazy!=null?{lazy:{...n.lazy,...a.lazy}}:{}})}function di(n,a,r="/"){return Vs(n,a,r,!1)}function Vs(n,a,r,l){let c=typeof a=="string"?vi(a):a,f=Vn(c.pathname||"/",r);if(f==null)return null;let d=My(n);Ix(d);let m=null;for(let g=0;m==null&&g<d.length;++g){let p=lS(f);m=rS(d[g],p,l)}return m}function Zx(n,a){let{route:r,pathname:l,params:c}=n;return{id:r.id,pathname:l,params:c,data:a[r.id],loaderData:a[r.id],handle:r.handle}}function My(n,a=[],r=[],l="",c=!1){let f=(d,m,g=c,p)=>{let x={relativePath:p===void 0?d.path||"":p,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(l)&&g)return;qe(x.relativePath.startsWith(l),`Absolute route path "${x.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(l.length)}let y=da([l,x.relativePath]),T=r.concat(x);d.children&&d.children.length>0&&(qe(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),My(d.children,a,T,y,g)),!(d.path==null&&!d.index)&&a.push({path:y,score:aS(y,d.index),routesMeta:T})};return n.forEach((d,m)=>{if(d.path===""||!d.path?.includes("?"))f(d,m);else for(let g of Dy(d.path))f(d,m,!0,g)}),a}function Dy(n){let a=n.split("/");if(a.length===0)return[];let[r,...l]=a,c=r.endsWith("?"),f=r.replace(/\?$/,"");if(l.length===0)return c?[f,""]:[f];let d=Dy(l.join("/")),m=[];return m.push(...d.map(g=>g===""?f:[f,g].join("/"))),c&&m.push(...d),m.map(g=>n.startsWith("/")&&g===""?"/":g)}function Ix(n){n.sort((a,r)=>a.score!==r.score?r.score-a.score:iS(a.routesMeta.map(l=>l.childrenIndex),r.routesMeta.map(l=>l.childrenIndex)))}var Jx=/^:[\w-]+$/,$x=3,Wx=2,eS=1,tS=10,nS=-2,Eg=n=>n==="*";function aS(n,a){let r=n.split("/"),l=r.length;return r.some(Eg)&&(l+=nS),a&&(l+=Wx),r.filter(c=>!Eg(c)).reduce((c,f)=>c+(Jx.test(f)?$x:f===""?eS:tS),l)}function iS(n,a){return n.length===a.length&&n.slice(0,-1).every((l,c)=>l===a[c])?n[n.length-1]-a[a.length-1]:0}function rS(n,a,r=!1){let{routesMeta:l}=n,c={},f="/",d=[];for(let m=0;m<l.length;++m){let g=l[m],p=m===l.length-1,x=f==="/"?a:a.slice(f.length)||"/",y=Qo({path:g.relativePath,caseSensitive:g.caseSensitive,end:p},x),T=g.route;if(!y&&p&&r&&!l[l.length-1].route.index&&(y=Qo({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},x)),!y)return null;Object.assign(c,y.params),d.push({params:c,pathname:da([f,y.pathname]),pathnameBase:cS(da([f,y.pathnameBase])),route:T}),y.pathnameBase!=="/"&&(f=da([f,y.pathnameBase]))}return d}function Qo(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,l]=sS(n.path,n.caseSensitive,n.end),c=a.match(r);if(!c)return null;let f=c[0],d=f.replace(/(.)\/+$/,"$1"),m=c.slice(1);return{params:l.reduce((p,{paramName:x,isOptional:y},T)=>{if(x==="*"){let L=m[T]||"";d=f.slice(0,f.length-L.length).replace(/(.)\/+$/,"$1")}const N=m[T];return y&&!N?p[x]=void 0:p[x]=(N||"").replace(/%2F/g,"/"),p},{}),pathname:f,pathnameBase:d,pattern:n}}function sS(n,a=!1,r=!0){zt(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let l=[],c="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,g)=>(l.push({paramName:m,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(l.push({paramName:"*"}),c+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?c+="\\/*$":n!==""&&n!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,a?void 0:"i"),l]}function lS(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return zt(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function Vn(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let r=a.endsWith("/")?a.length-1:a.length,l=n.charAt(r);return l&&l!=="/"?null:n.slice(r)||"/"}function oS({basename:n,pathname:a}){return a==="/"?n:da([n,a])}var jy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Xf=n=>jy.test(n);function uS(n,a="/"){let{pathname:r,search:l="",hash:c=""}=typeof n=="string"?vi(n):n,f;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?f=Tg(r.substring(1),"/"):f=Tg(r,a)):f=a,{pathname:f,search:fS(l),hash:dS(c)}}function Tg(n,a){let r=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(c=>{c===".."?r.length>1&&r.pop():c!=="."&&r.push(c)}),r.length>1?r.join("/"):"/"}function of(n,a,r,l){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(l)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function zy(n){return n.filter((a,r)=>r===0||a.route.path&&a.route.path.length>0)}function Zf(n){let a=zy(n);return a.map((r,l)=>l===a.length-1?r.pathname:r.pathnameBase)}function If(n,a,r,l=!1){let c;typeof n=="string"?c=vi(n):(c={...n},qe(!c.pathname||!c.pathname.includes("?"),of("?","pathname","search",c)),qe(!c.pathname||!c.pathname.includes("#"),of("#","pathname","hash",c)),qe(!c.search||!c.search.includes("#"),of("#","search","hash",c)));let f=n===""||c.pathname==="",d=f?"/":c.pathname,m;if(d==null)m=r;else{let y=a.length-1;if(!l&&d.startsWith("..")){let T=d.split("/");for(;T[0]==="..";)T.shift(),y-=1;c.pathname=T.join("/")}m=y>=0?a[y]:"/"}let g=uS(c,m),p=d&&d!=="/"&&d.endsWith("/"),x=(f||d===".")&&r.endsWith("/");return!g.pathname.endsWith("/")&&(p||x)&&(g.pathname+="/"),g}var da=n=>n.join("/").replace(/\/\/+/g,"/"),cS=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),fS=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,dS=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,el=class{constructor(n,a,r,l=!1){this.status=n,this.statusText=a||"",this.internal=l,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function $s(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function tl(n){return n.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ly=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Uy(n,a){let r=n;if(typeof r!="string"||!jy.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let l=r,c=!1;if(Ly)try{let f=new URL(window.location.href),d=r.startsWith("//")?new URL(f.protocol+r):new URL(r),m=Vn(d.pathname,a);d.origin===f.origin&&m!=null?r=m+d.search+d.hash:c=!0}catch{zt(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:l,isExternal:c,to:r}}var mi=Symbol("Uninstrumented");function hS(n,a){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};n.forEach(c=>c({id:a.id,index:a.index,path:a.path,instrument(f){let d=Object.keys(r);for(let m of d)f[m]&&r[m].push(f[m])}}));let l={};if(typeof a.lazy=="function"&&r.lazy.length>0){let c=qr(r.lazy,a.lazy,()=>{});c&&(l.lazy=c)}if(typeof a.lazy=="object"){let c=a.lazy;["middleware","loader","action"].forEach(f=>{let d=c[f],m=r[`lazy.${f}`];if(typeof d=="function"&&m.length>0){let g=qr(m,d,()=>{});g&&(l.lazy=Object.assign(l.lazy||{},{[f]:g}))}})}return["loader","action"].forEach(c=>{let f=a[c];if(typeof f=="function"&&r[c].length>0){let d=f[mi]??f,m=qr(r[c],d,(...g)=>Cg(g[0]));m&&(c==="loader"&&d.hydrate===!0&&(m.hydrate=!0),m[mi]=d,l[c]=m)}}),a.middleware&&a.middleware.length>0&&r.middleware.length>0&&(l.middleware=a.middleware.map(c=>{let f=c[mi]??c,d=qr(r.middleware,f,(...m)=>Cg(m[0]));return d?(d[mi]=f,d):c})),l}function mS(n,a){let r={navigate:[],fetch:[]};if(a.forEach(l=>l({instrument(c){let f=Object.keys(c);for(let d of f)c[d]&&r[d].push(c[d])}})),r.navigate.length>0){let l=n.navigate[mi]??n.navigate,c=qr(r.navigate,l,(...f)=>{let[d,m]=f;return{to:typeof d=="number"||typeof d=="string"?d:d?ma(d):".",...Ag(n,m??{})}});c&&(c[mi]=l,n.navigate=c)}if(r.fetch.length>0){let l=n.fetch[mi]??n.fetch,c=qr(r.fetch,l,(...f)=>{let[d,,m,g]=f;return{href:m??".",fetcherKey:d,...Ag(n,g??{})}});c&&(c[mi]=l,n.fetch=c)}return n}function qr(n,a,r){return n.length===0?null:async(...l)=>{let c=await By(n,r(...l),()=>a(...l),n.length-1);if(c.type==="error")throw c.value;return c.value}}async function By(n,a,r,l){let c=n[l],f;if(c){let d,m=async()=>(d?console.error("You cannot call instrumented handlers more than once"):d=By(n,a,r,l-1),f=await d,qe(f,"Expected a result"),f.type==="error"&&f.value instanceof Error?{status:"error",error:f.value}:{status:"success",error:void 0});try{await c(m,a)}catch(g){console.error("An instrumentation function threw an error:",g)}d||await m(),await d}else try{f={type:"success",value:await r()}}catch(d){f={type:"error",value:d}}return f||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Cg(n){let{request:a,context:r,params:l,unstable_pattern:c}=n;return{request:pS(a),params:{...l},unstable_pattern:c,context:gS(r)}}function Ag(n,a){return{currentUrl:ma(n.state.location),..."formMethod"in a?{formMethod:a.formMethod}:{},..."formEncType"in a?{formEncType:a.formEncType}:{},..."formData"in a?{formData:a.formData}:{},..."body"in a?{body:a.body}:{}}}function pS(n){return{method:n.method,url:n.url,headers:{get:(...a)=>n.headers.get(...a)}}}function gS(n){if(vS(n)){let a={...n};return Object.freeze(a),a}else return{get:a=>n.get(a)}}var yS=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function vS(n){if(n===null||typeof n!="object")return!1;const a=Object.getPrototypeOf(n);return a===Object.prototype||a===null||Object.getOwnPropertyNames(a).sort().join("\0")===yS}var qy=["POST","PUT","PATCH","DELETE"],bS=new Set(qy),xS=["GET",...qy],SS=new Set(xS),Hy=new Set([301,302,303,307,308]),wS=new Set([307,308]),uf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ES={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},qs={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},TS=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),Qy="remix-router-transitions",Py=Symbol("ResetLoaderData");function CS(n){const a=n.window?n.window:typeof window<"u"?window:void 0,r=typeof a<"u"&&typeof a.document<"u"&&typeof a.document.createElement<"u";qe(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let l=n.hydrationRouteProperties||[],c=n.mapRouteProperties||TS,f=c;if(n.unstable_instrumentations){let w=n.unstable_instrumentations;f=_=>({...c(_),...hS(w.map(z=>z.route).filter(Boolean),_)})}let d={},m=Js(n.routes,f,void 0,d),g,p=n.basename||"/";p.startsWith("/")||(p=`/${p}`);let x=n.dataStrategy||NS,y={...n.future},T=null,N=new Set,L=null,B=null,P=null,K=n.hydrationData!=null,Y=di(m,n.history.location,p),W=!1,he=null,de;if(Y==null&&!n.patchRoutesOnNavigation){let w=Pn(404,{pathname:n.history.location.pathname}),{matches:_,route:z}=xo(m);de=!0,Y=_,he={[z.id]:w}}else if(Y&&!n.hydrationData&&Tt(Y,m,n.history.location.pathname).active&&(Y=null),Y)if(Y.some(w=>w.route.lazy))de=!1;else if(!Y.some(w=>Jf(w.route)))de=!0;else{let w=n.hydrationData?n.hydrationData.loaderData:null,_=n.hydrationData?n.hydrationData.errors:null;if(_){let z=Y.findIndex(J=>_[J.route.id]!==void 0);de=Y.slice(0,z+1).every(J=>!_f(J.route,w,_))}else de=Y.every(z=>!_f(z.route,w,_))}else{de=!1,Y=[];let w=Tt(null,m,n.history.location.pathname);w.active&&w.matches&&(W=!0,Y=w.matches)}let fe,R={historyAction:n.history.action,location:n.history.location,matches:Y,initialized:de,navigation:uf,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||he,fetchers:new Map,blockers:new Map},V="POP",ie=null,ke=!1,Re,Se=!1,Me=new Map,ze=null,Ee=!1,k=!1,X=new Set,Q=new Map,me=0,ye=-1,C=new Map,q=new Set,H=new Map,I=new Map,ee=new Set,$=new Map,ae,Te=null;function Be(){if(T=n.history.listen(({action:w,location:_,delta:z})=>{if(ae){ae(),ae=void 0;return}zt($.size===0||z!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let J=ba({currentLocation:R.location,nextLocation:_,historyAction:w});if(J&&z!=null){let te=new Promise(ve=>{ae=ve});n.history.go(z*-1),Xn(J,{state:"blocked",location:_,proceed(){Xn(J,{state:"proceeding",proceed:void 0,reset:void 0,location:_}),te.then(()=>n.history.go(z))},reset(){let ve=new Map(R.blockers);ve.set(J,qs),Je({blockers:ve})}}),ie?.resolve(),ie=null;return}return ln(w,_)}),r){XS(a,Me);let w=()=>ZS(a,Me);a.addEventListener("pagehide",w),ze=()=>a.removeEventListener("pagehide",w)}return R.initialized||ln("POP",R.location,{initialHydration:!0}),fe}function Pt(){T&&T(),ze&&ze(),N.clear(),Re&&Re.abort(),R.fetchers.forEach((w,_)=>Nn(_)),R.blockers.forEach((w,_)=>yn(_))}function en(w){return N.add(w),()=>N.delete(w)}function Je(w,_={}){w.matches&&(w.matches=w.matches.map(te=>{let ve=d[te.route.id],se=te.route;return se.element!==ve.element||se.errorElement!==ve.errorElement||se.hydrateFallbackElement!==ve.hydrateFallbackElement?{...te,route:ve}:te})),R={...R,...w};let z=[],J=[];R.fetchers.forEach((te,ve)=>{te.state==="idle"&&(ee.has(ve)?z.push(ve):J.push(ve))}),ee.forEach(te=>{!R.fetchers.has(te)&&!Q.has(te)&&z.push(te)}),[...N].forEach(te=>te(R,{deletedFetchers:z,newErrors:w.errors??null,viewTransitionOpts:_.viewTransitionOpts,flushSync:_.flushSync===!0})),z.forEach(te=>Nn(te)),J.forEach(te=>R.fetchers.delete(te))}function Fn(w,_,{flushSync:z}={}){let J=R.actionData!=null&&R.navigation.formMethod!=null&&Wt(R.navigation.formMethod)&&R.navigation.state==="loading"&&w.state?._isRedirect!==!0,te;_.actionData?Object.keys(_.actionData).length>0?te=_.actionData:te=null:J?te=R.actionData:te=null;let ve=_.loaderData?Lg(R.loaderData,_.loaderData,_.matches||[],_.errors):R.loaderData,se=R.blockers;se.size>0&&(se=new Map(se),se.forEach((Ce,xe)=>se.set(xe,qs)));let re=Ee?!1:Et(w,_.matches||R.matches),le=ke===!0||R.navigation.formMethod!=null&&Wt(R.navigation.formMethod)&&w.state?._isRedirect!==!0;g&&(m=g,g=void 0),Ee||V==="POP"||(V==="PUSH"?n.history.push(w,w.state):V==="REPLACE"&&n.history.replace(w,w.state));let ge;if(V==="POP"){let Ce=Me.get(R.location.pathname);Ce&&Ce.has(w.pathname)?ge={currentLocation:R.location,nextLocation:w}:Me.has(w.pathname)&&(ge={currentLocation:w,nextLocation:R.location})}else if(Se){let Ce=Me.get(R.location.pathname);Ce?Ce.add(w.pathname):(Ce=new Set([w.pathname]),Me.set(R.location.pathname,Ce)),ge={currentLocation:R.location,nextLocation:w}}Je({..._,actionData:te,loaderData:ve,historyAction:V,location:w,initialized:!0,navigation:uf,revalidation:"idle",restoreScrollPosition:re,preventScrollReset:le,blockers:se},{viewTransitionOpts:ge,flushSync:z===!0}),V="POP",ke=!1,Se=!1,Ee=!1,k=!1,ie?.resolve(),ie=null,Te?.resolve(),Te=null}async function sn(w,_){if(ie?.resolve(),ie=null,typeof w=="number"){ie||(ie=Hg());let Ke=ie.promise;return n.history.go(w),Ke}let z=Rf(R.location,R.matches,p,w,_?.fromRouteId,_?.relative),{path:J,submission:te,error:ve}=Rg(!1,z,_),se=R.location,re=Is(R.location,J,_&&_.state);re={...re,...n.history.encodeLocation(re)};let le=_&&_.replace!=null?_.replace:void 0,ge="PUSH";le===!0?ge="REPLACE":le===!1||te!=null&&Wt(te.formMethod)&&te.formAction===R.location.pathname+R.location.search&&(ge="REPLACE");let Ce=_&&"preventScrollReset"in _?_.preventScrollReset===!0:void 0,xe=(_&&_.flushSync)===!0,Ie=ba({currentLocation:se,nextLocation:re,historyAction:ge});if(Ie){Xn(Ie,{state:"blocked",location:re,proceed(){Xn(Ie,{state:"proceeding",proceed:void 0,reset:void 0,location:re}),sn(w,_)},reset(){let Ke=new Map(R.blockers);Ke.set(Ie,qs),Je({blockers:Ke})}});return}await ln(ge,re,{submission:te,pendingError:ve,preventScrollReset:Ce,replace:_&&_.replace,enableViewTransition:_&&_.viewTransition,flushSync:xe,callSiteDefaultShouldRevalidate:_&&_.unstable_defaultShouldRevalidate})}function Si(){Te||(Te=Hg()),Qa(),Je({revalidation:"loading"});let w=Te.promise;return R.navigation.state==="submitting"?w:R.navigation.state==="idle"?(ln(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),w):(ln(V||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:Se===!0}),w)}async function ln(w,_,z){Re&&Re.abort(),Re=null,V=w,Ee=(z&&z.startUninterruptedRevalidation)===!0,ot(R.location,R.matches),ke=(z&&z.preventScrollReset)===!0,Se=(z&&z.enableViewTransition)===!0;let J=g||m,te=z&&z.overrideNavigation,ve=z?.initialHydration&&R.matches&&R.matches.length>0&&!W?R.matches:di(J,_,p),se=(z&&z.flushSync)===!0;if(ve&&R.initialized&&!k&&BS(R.location,_)&&!(z&&z.submission&&Wt(z.submission.formMethod))){Fn(_,{matches:ve},{flushSync:se});return}let re=Tt(ve,J,_.pathname);if(re.active&&re.matches&&(ve=re.matches),!ve){let{error:bt,notFoundMatches:xt,route:Ve}=Zn(_.pathname);Fn(_,{matches:xt,loaderData:{},errors:{[Ve.id]:bt}},{flushSync:se});return}Re=new AbortController;let le=Br(n.history,_,Re.signal,z&&z.submission),ge=n.getContext?await n.getContext():new Sg,Ce;if(z&&z.pendingError)Ce=[hi(ve).route.id,{type:"error",error:z.pendingError}];else if(z&&z.submission&&Wt(z.submission.formMethod)){let bt=await ga(le,_,z.submission,ve,ge,re.active,z&&z.initialHydration===!0,{replace:z.replace,flushSync:se});if(bt.shortCircuited)return;if(bt.pendingActionResult){let[xt,Ve]=bt.pendingActionResult;if(Rn(Ve)&&$s(Ve.error)&&Ve.error.status===404){Re=null,Fn(_,{matches:bt.matches,loaderData:{},errors:{[xt]:Ve.error}});return}}ve=bt.matches||ve,Ce=bt.pendingActionResult,te=cf(_,z.submission),se=!1,re.active=!1,le=Br(n.history,le.url,le.signal)}let{shortCircuited:xe,matches:Ie,loaderData:Ke,errors:yt}=await wi(le,_,ve,ge,re.active,te,z&&z.submission,z&&z.fetcherSubmission,z&&z.replace,z&&z.initialHydration===!0,se,Ce,z&&z.callSiteDefaultShouldRevalidate);xe||(Re=null,Fn(_,{matches:Ie||ve,...Ug(Ce),loaderData:Ke,errors:yt}))}async function ga(w,_,z,J,te,ve,se,re={}){Qa();let le=YS(_,z);if(Je({navigation:le},{flushSync:re.flushSync===!0}),ve){let xe=await vn(J,_.pathname,w.signal);if(xe.type==="aborted")return{shortCircuited:!0};if(xe.type==="error"){if(xe.partialMatches.length===0){let{matches:Ke,route:yt}=xo(m);return{matches:Ke,pendingActionResult:[yt.id,{type:"error",error:xe.error}]}}let Ie=hi(xe.partialMatches).route.id;return{matches:xe.partialMatches,pendingActionResult:[Ie,{type:"error",error:xe.error}]}}else if(xe.matches)J=xe.matches;else{let{notFoundMatches:Ie,error:Ke,route:yt}=Zn(_.pathname);return{matches:Ie,pendingActionResult:[yt.id,{type:"error",error:Ke}]}}}let ge,Ce=_o(J,_);if(!Ce.route.action&&!Ce.route.lazy)ge={type:"error",error:Pn(405,{method:w.method,pathname:_.pathname,routeId:Ce.route.id})};else{let xe=Hr(f,d,w,J,Ce,se?[]:l,te),Ie=await ya(w,xe,te,null);if(ge=Ie[Ce.route.id],!ge){for(let Ke of J)if(Ie[Ke.route.id]){ge=Ie[Ke.route.id];break}}if(w.signal.aborted)return{shortCircuited:!0}}if(Xi(ge)){let xe;return re&&re.replace!=null?xe=re.replace:xe=Dg(ge.response.headers.get("Location"),new URL(w.url),p,n.history)===R.location.pathname+R.location.search,await gt(w,ge,!0,{submission:z,replace:xe}),{shortCircuited:!0}}if(Rn(ge)){let xe=hi(J,Ce.route.id);return(re&&re.replace)!==!0&&(V="PUSH"),{matches:J,pendingActionResult:[xe.route.id,ge,Ce.route.id]}}return{matches:J,pendingActionResult:[Ce.route.id,ge]}}async function wi(w,_,z,J,te,ve,se,re,le,ge,Ce,xe,Ie){let Ke=ve||cf(_,se),yt=se||re||qg(Ke),bt=!Ee&&!ge;if(te){if(bt){let Ct=It(xe);Je({navigation:Ke,...Ct!==void 0?{actionData:Ct}:{}},{flushSync:Ce})}let Ye=await vn(z,_.pathname,w.signal);if(Ye.type==="aborted")return{shortCircuited:!0};if(Ye.type==="error"){if(Ye.partialMatches.length===0){let{matches:$n,route:Vt}=xo(m);return{matches:$n,loaderData:{},errors:{[Vt.id]:Ye.error}}}let Ct=hi(Ye.partialMatches).route.id;return{matches:Ye.partialMatches,loaderData:{},errors:{[Ct]:Ye.error}}}else if(Ye.matches)z=Ye.matches;else{let{error:Ct,notFoundMatches:$n,route:Vt}=Zn(_.pathname);return{matches:$n,loaderData:{},errors:{[Vt.id]:Ct}}}}let xt=g||m,{dsMatches:Ve,revalidatingFetchers:Ht}=_g(w,J,f,d,n.history,R,z,yt,_,ge?[]:l,ge===!0,k,X,ee,H,q,xt,p,n.patchRoutesOnNavigation!=null,xe,Ie);if(ye=++me,!n.dataStrategy&&!Ve.some(Ye=>Ye.shouldLoad)&&!Ve.some(Ye=>Ye.route.middleware&&Ye.route.middleware.length>0)&&Ht.length===0){let Ye=Lt();return Fn(_,{matches:z,loaderData:{},errors:xe&&Rn(xe[1])?{[xe[0]]:xe[1].error}:null,...Ug(xe),...Ye?{fetchers:new Map(R.fetchers)}:{}},{flushSync:Ce}),{shortCircuited:!0}}if(bt){let Ye={};if(!te){Ye.navigation=Ke;let Ct=It(xe);Ct!==void 0&&(Ye.actionData=Ct)}Ht.length>0&&(Ye.fetchers=Ei(Ht)),Je(Ye,{flushSync:Ce})}Ht.forEach(Ye=>{ct(Ye.key),Ye.controller&&Q.set(Ye.key,Ye.controller)});let un=()=>Ht.forEach(Ye=>ct(Ye.key));Re&&Re.signal.addEventListener("abort",un);let{loaderResults:mt,fetcherResults:In}=await ra(Ve,Ht,w,J);if(w.signal.aborted)return{shortCircuited:!0};Re&&Re.signal.removeEventListener("abort",un),Ht.forEach(Ye=>Q.delete(Ye.key));let bn=So(mt);if(bn)return await gt(w,bn.result,!0,{replace:le}),{shortCircuited:!0};if(bn=So(In),bn)return q.add(bn.key),await gt(w,bn.result,!0,{replace:le}),{shortCircuited:!0};let{loaderData:Jn,errors:Mn}=zg(R,z,mt,xe,Ht,In);ge&&R.errors&&(Mn={...R.errors,...Mn});let Sa=Lt(),Ai=er(ye),Ri=Sa||Ai||Ht.length>0;return{matches:z,loaderData:Jn,errors:Mn,...Ri?{fetchers:new Map(R.fetchers)}:{}}}function It(w){if(w&&!Rn(w[1]))return{[w[0]]:w[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function Ei(w){return w.forEach(_=>{let z=R.fetchers.get(_.key),J=Hs(void 0,z?z.data:void 0);R.fetchers.set(_.key,J)}),new Map(R.fetchers)}async function Ti(w,_,z,J){ct(w);let te=(J&&J.flushSync)===!0,ve=g||m,se=Rf(R.location,R.matches,p,z,_,J?.relative),re=di(ve,se,p),le=Tt(re,ve,se);if(le.active&&le.matches&&(re=le.matches),!re){tn(w,_,Pn(404,{pathname:se}),{flushSync:te});return}let{path:ge,submission:Ce,error:xe}=Rg(!0,se,J);if(xe){tn(w,_,xe,{flushSync:te});return}let Ie=n.getContext?await n.getContext():new Sg,Ke=(J&&J.preventScrollReset)===!0;if(Ce&&Wt(Ce.formMethod)){await Gt(w,_,ge,re,Ie,le.active,te,Ke,Ce,J&&J.unstable_defaultShouldRevalidate);return}H.set(w,{routeId:_,path:ge}),await ia(w,_,ge,re,Ie,le.active,te,Ke,Ce)}async function Gt(w,_,z,J,te,ve,se,re,le,ge){Qa(),H.delete(w);let Ce=R.fetchers.get(w);Kt(w,FS(le,Ce),{flushSync:se});let xe=new AbortController,Ie=Br(n.history,z,xe.signal,le);if(ve){let Fe=await vn(J,new URL(Ie.url).pathname,Ie.signal,w);if(Fe.type==="aborted")return;if(Fe.type==="error"){tn(w,_,Fe.error,{flushSync:se});return}else if(Fe.matches)J=Fe.matches;else{tn(w,_,Pn(404,{pathname:z}),{flushSync:se});return}}let Ke=_o(J,z);if(!Ke.route.action&&!Ke.route.lazy){let Fe=Pn(405,{method:le.formMethod,pathname:z,routeId:_});tn(w,_,Fe,{flushSync:se});return}Q.set(w,xe);let yt=me,bt=Hr(f,d,Ie,J,Ke,l,te),xt=await ya(Ie,bt,te,w),Ve=xt[Ke.route.id];if(!Ve){for(let Fe of bt)if(xt[Fe.route.id]){Ve=xt[Fe.route.id];break}}if(Ie.signal.aborted){Q.get(w)===xe&&Q.delete(w);return}if(ee.has(w)){if(Xi(Ve)||Rn(Ve)){Kt(w,Ha(void 0));return}}else{if(Xi(Ve))if(Q.delete(w),ye>yt){Kt(w,Ha(void 0));return}else return q.add(w),Kt(w,Hs(le)),gt(Ie,Ve,!1,{fetcherSubmission:le,preventScrollReset:re});if(Rn(Ve)){tn(w,_,Ve.error);return}}let Ht=R.navigation.location||R.location,un=Br(n.history,Ht,xe.signal),mt=g||m,In=R.navigation.state!=="idle"?di(mt,R.navigation.location,p):R.matches;qe(In,"Didn't find any matches after fetcher action");let bn=++me;C.set(w,bn);let Jn=Hs(le,Ve.data);R.fetchers.set(w,Jn);let{dsMatches:Mn,revalidatingFetchers:Sa}=_g(un,te,f,d,n.history,R,In,le,Ht,l,!1,k,X,ee,H,q,mt,p,n.patchRoutesOnNavigation!=null,[Ke.route.id,Ve],ge);Sa.filter(Fe=>Fe.key!==w).forEach(Fe=>{let _i=Fe.key,sl=R.fetchers.get(_i),Zr=Hs(void 0,sl?sl.data:void 0);R.fetchers.set(_i,Zr),ct(_i),Fe.controller&&Q.set(_i,Fe.controller)}),Je({fetchers:new Map(R.fetchers)});let Ai=()=>Sa.forEach(Fe=>ct(Fe.key));xe.signal.addEventListener("abort",Ai);let{loaderResults:Ri,fetcherResults:Ye}=await ra(Mn,Sa,un,te);if(xe.signal.aborted)return;if(xe.signal.removeEventListener("abort",Ai),C.delete(w),Q.delete(w),Sa.forEach(Fe=>Q.delete(Fe.key)),R.fetchers.has(w)){let Fe=Ha(Ve.data);R.fetchers.set(w,Fe)}let Ct=So(Ri);if(Ct)return gt(un,Ct.result,!1,{preventScrollReset:re});if(Ct=So(Ye),Ct)return q.add(Ct.key),gt(un,Ct.result,!1,{preventScrollReset:re});let{loaderData:$n,errors:Vt}=zg(R,In,Ri,void 0,Sa,Ye);er(bn),R.navigation.state==="loading"&&bn>ye?(qe(V,"Expected pending action"),Re&&Re.abort(),Fn(R.navigation.location,{matches:In,loaderData:$n,errors:Vt,fetchers:new Map(R.fetchers)})):(Je({errors:Vt,loaderData:Lg(R.loaderData,$n,In,Vt),fetchers:new Map(R.fetchers)}),k=!1)}async function ia(w,_,z,J,te,ve,se,re,le){let ge=R.fetchers.get(w);Kt(w,Hs(le,ge?ge.data:void 0),{flushSync:se});let Ce=new AbortController,xe=Br(n.history,z,Ce.signal);if(ve){let Ve=await vn(J,new URL(xe.url).pathname,xe.signal,w);if(Ve.type==="aborted")return;if(Ve.type==="error"){tn(w,_,Ve.error,{flushSync:se});return}else if(Ve.matches)J=Ve.matches;else{tn(w,_,Pn(404,{pathname:z}),{flushSync:se});return}}let Ie=_o(J,z);Q.set(w,Ce);let Ke=me,yt=Hr(f,d,xe,J,Ie,l,te),xt=(await ya(xe,yt,te,w))[Ie.route.id];if(Q.get(w)===Ce&&Q.delete(w),!xe.signal.aborted){if(ee.has(w)){Kt(w,Ha(void 0));return}if(Xi(xt))if(ye>Ke){Kt(w,Ha(void 0));return}else{q.add(w),await gt(xe,xt,!1,{preventScrollReset:re});return}if(Rn(xt)){tn(w,_,xt.error);return}Kt(w,Ha(xt.data))}}async function gt(w,_,z,{submission:J,fetcherSubmission:te,preventScrollReset:ve,replace:se}={}){z||(ie?.resolve(),ie=null),_.response.headers.has("X-Remix-Revalidate")&&(k=!0);let re=_.response.headers.get("Location");qe(re,"Expected a Location header on the redirect Response"),re=Dg(re,new URL(w.url),p,n.history);let le=Is(R.location,re,{_isRedirect:!0});if(r){let yt=!1;if(_.response.headers.has("X-Remix-Reload-Document"))yt=!0;else if(Xf(re)){const bt=Oy(re,!0);yt=bt.origin!==a.location.origin||Vn(bt.pathname,p)==null}if(yt){se?a.location.replace(re):a.location.assign(re);return}}Re=null;let ge=se===!0||_.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ce,formAction:xe,formEncType:Ie}=R.navigation;!J&&!te&&Ce&&xe&&Ie&&(J=qg(R.navigation));let Ke=J||te;if(wS.has(_.response.status)&&Ke&&Wt(Ke.formMethod))await ln(ge,le,{submission:{...Ke,formAction:re},preventScrollReset:ve||ke,enableViewTransition:z?Se:void 0});else{let yt=cf(le,J);await ln(ge,le,{overrideNavigation:yt,fetcherSubmission:te,preventScrollReset:ve||ke,enableViewTransition:z?Se:void 0})}}async function ya(w,_,z,J){let te,ve={};try{te=await MS(x,w,_,J,z,!1)}catch(se){return _.filter(re=>re.shouldLoad).forEach(re=>{ve[re.route.id]={type:"error",error:se}}),ve}if(w.signal.aborted)return ve;if(!Wt(w.method))for(let se of _){if(te[se.route.id]?.type==="error")break;!te.hasOwnProperty(se.route.id)&&!R.loaderData.hasOwnProperty(se.route.id)&&(!R.errors||!R.errors.hasOwnProperty(se.route.id))&&se.shouldCallHandler()&&(te[se.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${se.route.id}`)})}for(let[se,re]of Object.entries(te))if(PS(re)){let le=re.result;ve[se]={type:"redirect",response:LS(le,w,se,_,p)}}else ve[se]=await zS(re);return ve}async function ra(w,_,z,J){let te=ya(z,w,J,null),ve=Promise.all(_.map(async le=>{if(le.matches&&le.match&&le.request&&le.controller){let Ce=(await ya(le.request,le.matches,J,le.key))[le.match.route.id];return{[le.key]:Ce}}else return Promise.resolve({[le.key]:{type:"error",error:Pn(404,{pathname:le.path})}})})),se=await te,re=(await ve).reduce((le,ge)=>Object.assign(le,ge),{});return{loaderResults:se,fetcherResults:re}}function Qa(){k=!0,H.forEach((w,_)=>{Q.has(_)&&X.add(_),ct(_)})}function Kt(w,_,z={}){R.fetchers.set(w,_),Je({fetchers:new Map(R.fetchers)},{flushSync:(z&&z.flushSync)===!0})}function tn(w,_,z,J={}){let te=hi(R.matches,_);Nn(w),Je({errors:{[te.route.id]:z},fetchers:new Map(R.fetchers)},{flushSync:(J&&J.flushSync)===!0})}function kn(w){return I.set(w,(I.get(w)||0)+1),ee.has(w)&&ee.delete(w),R.fetchers.get(w)||ES}function Wi(w,_){ct(w,_?.reason),Kt(w,Ha(null))}function Nn(w){let _=R.fetchers.get(w);Q.has(w)&&!(_&&_.state==="loading"&&C.has(w))&&ct(w),H.delete(w),C.delete(w),q.delete(w),ee.delete(w),X.delete(w),R.fetchers.delete(w)}function va(w){let _=(I.get(w)||0)-1;_<=0?(I.delete(w),ee.add(w)):I.set(w,_),Je({fetchers:new Map(R.fetchers)})}function ct(w,_){let z=Q.get(w);z&&(z.abort(_),Q.delete(w))}function on(w){for(let _ of w){let z=kn(_),J=Ha(z.data);R.fetchers.set(_,J)}}function Lt(){let w=[],_=!1;for(let z of q){let J=R.fetchers.get(z);qe(J,`Expected fetcher: ${z}`),J.state==="loading"&&(q.delete(z),w.push(z),_=!0)}return on(w),_}function er(w){let _=[];for(let[z,J]of C)if(J<w){let te=R.fetchers.get(z);qe(te,`Expected fetcher: ${z}`),te.state==="loading"&&(ct(z),C.delete(z),_.push(z))}return on(_),_.length>0}function Ci(w,_){let z=R.blockers.get(w)||qs;return $.get(w)!==_&&$.set(w,_),z}function yn(w){R.blockers.delete(w),$.delete(w)}function Xn(w,_){let z=R.blockers.get(w)||qs;qe(z.state==="unblocked"&&_.state==="blocked"||z.state==="blocked"&&_.state==="blocked"||z.state==="blocked"&&_.state==="proceeding"||z.state==="blocked"&&_.state==="unblocked"||z.state==="proceeding"&&_.state==="unblocked",`Invalid blocker state transition: ${z.state} -> ${_.state}`);let J=new Map(R.blockers);J.set(w,_),Je({blockers:J})}function ba({currentLocation:w,nextLocation:_,historyAction:z}){if($.size===0)return;$.size>1&&zt(!1,"A router only supports one blocker at a time");let J=Array.from($.entries()),[te,ve]=J[J.length-1],se=R.blockers.get(te);if(!(se&&se.state==="proceeding")&&ve({currentLocation:w,nextLocation:_,historyAction:z}))return te}function Zn(w){let _=Pn(404,{pathname:w}),z=g||m,{matches:J,route:te}=xo(z);return{notFoundMatches:J,route:te,error:_}}function On(w,_,z){if(L=w,P=_,B=z||null,!K&&R.navigation===uf){K=!0;let J=Et(R.location,R.matches);J!=null&&Je({restoreScrollPosition:J})}return()=>{L=null,P=null,B=null}}function _e(w,_){return B&&B(w,_.map(J=>Zx(J,R.loaderData)))||w.key}function ot(w,_){if(L&&P){let z=_e(w,_);L[z]=P()}}function Et(w,_){if(L){let z=_e(w,_),J=L[z];if(typeof J=="number")return J}return null}function Tt(w,_,z){if(n.patchRoutesOnNavigation)if(w){if(Object.keys(w[0].params).length>0)return{active:!0,matches:Vs(_,z,p,!0)}}else return{active:!0,matches:Vs(_,z,p,!0)||[]};return{active:!1,matches:null}}async function vn(w,_,z,J){if(!n.patchRoutesOnNavigation)return{type:"success",matches:w};let te=w;for(;;){let ve=g==null,se=g||m,re=d;try{await n.patchRoutesOnNavigation({signal:z,path:_,matches:te,fetcherKey:J,patch:(Ce,xe)=>{z.aborted||kg(Ce,xe,se,re,f,!1)}})}catch(Ce){return{type:"error",error:Ce,partialMatches:te}}finally{ve&&!z.aborted&&(m=[...m])}if(z.aborted)return{type:"aborted"};let le=di(se,_,p),ge=null;if(le){if(Object.keys(le[0].params).length===0)return{type:"success",matches:le};if(ge=Vs(se,_,p,!0),!(ge&&te.length<ge.length&&ut(te,ge.slice(0,te.length))))return{type:"success",matches:le}}if(ge||(ge=Vs(se,_,p,!0)),!ge||ut(te,ge))return{type:"success",matches:null};te=ge}}function ut(w,_){return w.length===_.length&&w.every((z,J)=>z.route.id===_[J].route.id)}function Jt(w){d={},g=Js(w,f,void 0,d)}function xa(w,_,z=!1){let J=g==null;kg(w,_,g||m,d,f,z),J&&(m=[...m],Je({}))}return fe={get basename(){return p},get future(){return y},get state(){return R},get routes(){return m},get window(){return a},initialize:Be,subscribe:en,enableScrollRestoration:On,navigate:sn,fetch:Ti,revalidate:Si,createHref:w=>n.history.createHref(w),encodeLocation:w=>n.history.encodeLocation(w),getFetcher:kn,resetFetcher:Wi,deleteFetcher:va,dispose:Pt,getBlocker:Ci,deleteBlocker:yn,patchRoutes:xa,_internalFetchControllers:Q,_internalSetRoutes:Jt,_internalSetStateDoNotUseOrYouWillBreakYourApp(w){Je(w)}},n.unstable_instrumentations&&(fe=mS(fe,n.unstable_instrumentations.map(w=>w.router).filter(Boolean))),fe}function AS(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function Rf(n,a,r,l,c,f){let d,m;if(c){d=[];for(let p of a)if(d.push(p),p.route.id===c){m=p;break}}else d=a,m=a[a.length-1];let g=If(l||".",Zf(d),Vn(n.pathname,r)||n.pathname,f==="path");if(l==null&&(g.search=n.search,g.hash=n.hash),(l==null||l===""||l===".")&&m){let p=Wf(g.search);if(m.route.index&&!p)g.search=g.search?g.search.replace(/^\?/,"?index&"):"?index";else if(!m.route.index&&p){let x=new URLSearchParams(g.search),y=x.getAll("index");x.delete("index"),y.filter(N=>N).forEach(N=>x.append("index",N));let T=x.toString();g.search=T?`?${T}`:""}}return r!=="/"&&(g.pathname=oS({basename:r,pathname:g.pathname})),ma(g)}function Rg(n,a,r){if(!r||!AS(r))return{path:a};if(r.formMethod&&!VS(r.formMethod))return{path:a,error:Pn(405,{method:r.formMethod})};let l=()=>({path:a,error:Pn(400,{type:"invalid-body"})}),f=(r.formMethod||"get").toUpperCase(),d=Xy(a);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Wt(f))return l();let y=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((T,[N,L])=>`${T}${N}=${L}
11
- `,""):String(r.body);return{path:a,submission:{formMethod:f,formAction:d,formEncType:r.formEncType,formData:void 0,json:void 0,text:y}}}else if(r.formEncType==="application/json"){if(!Wt(f))return l();try{let y=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:a,submission:{formMethod:f,formAction:d,formEncType:r.formEncType,formData:void 0,json:y,text:void 0}}}catch{return l()}}}qe(typeof FormData=="function","FormData is not available in this environment");let m,g;if(r.formData)m=Nf(r.formData),g=r.formData;else if(r.body instanceof FormData)m=Nf(r.body),g=r.body;else if(r.body instanceof URLSearchParams)m=r.body,g=jg(m);else if(r.body==null)m=new URLSearchParams,g=new FormData;else try{m=new URLSearchParams(r.body),g=jg(m)}catch{return l()}let p={formMethod:f,formAction:d,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(Wt(p.formMethod))return{path:a,submission:p};let x=vi(a);return n&&x.search&&Wf(x.search)&&m.append("index",""),x.search=`?${m}`,{path:ma(x),submission:p}}function _g(n,a,r,l,c,f,d,m,g,p,x,y,T,N,L,B,P,K,Y,W,he){let de=W?Rn(W[1])?W[1].error:W[1].data:void 0,fe=c.createURL(f.location),R=c.createURL(g),V;if(x&&f.errors){let Ee=Object.keys(f.errors)[0];V=d.findIndex(k=>k.route.id===Ee)}else if(W&&Rn(W[1])){let Ee=W[0];V=d.findIndex(k=>k.route.id===Ee)-1}let ie=W?W[1].statusCode:void 0,ke=ie&&ie>=400,Re={currentUrl:fe,currentParams:f.matches[0]?.params||{},nextUrl:R,nextParams:d[0].params,...m,actionResult:de,actionStatus:ie},Se=tl(d),Me=d.map((Ee,k)=>{let{route:X}=Ee,Q=null;if(V!=null&&k>V?Q=!1:X.lazy?Q=!0:Jf(X)?x?Q=_f(X,f.loaderData,f.errors):RS(f.loaderData,f.matches[k],Ee)&&(Q=!0):Q=!1,Q!==null)return kf(r,l,n,Se,Ee,p,a,Q);let me=!1;typeof he=="boolean"?me=he:ke?me=!1:(y||fe.pathname+fe.search===R.pathname+R.search||fe.search!==R.search||_S(f.matches[k],Ee))&&(me=!0);let ye={...Re,defaultShouldRevalidate:me},C=Xs(Ee,ye);return kf(r,l,n,Se,Ee,p,a,C,ye,he)}),ze=[];return L.forEach((Ee,k)=>{if(x||!d.some(I=>I.route.id===Ee.routeId)||N.has(k))return;let X=f.fetchers.get(k),Q=X&&X.state!=="idle"&&X.data===void 0,me=di(P,Ee.path,K);if(!me){if(Y&&Q)return;ze.push({key:k,routeId:Ee.routeId,path:Ee.path,matches:null,match:null,request:null,controller:null});return}if(B.has(k))return;let ye=_o(me,Ee.path),C=new AbortController,q=Br(c,Ee.path,C.signal),H=null;if(T.has(k))T.delete(k),H=Hr(r,l,q,me,ye,p,a);else if(Q)y&&(H=Hr(r,l,q,me,ye,p,a));else{let I;typeof he=="boolean"?I=he:ke?I=!1:I=y;let ee={...Re,defaultShouldRevalidate:I};Xs(ye,ee)&&(H=Hr(r,l,q,me,ye,p,a,ee))}H&&ze.push({key:k,routeId:Ee.routeId,path:Ee.path,matches:H,match:ye,request:q,controller:C})}),{dsMatches:Me,revalidatingFetchers:ze}}function Jf(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function _f(n,a,r){if(n.lazy)return!0;if(!Jf(n))return!1;let l=a!=null&&n.id in a,c=r!=null&&r[n.id]!==void 0;return!l&&c?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!l&&!c}function RS(n,a,r){let l=!a||r.route.id!==a.route.id,c=!n.hasOwnProperty(r.route.id);return l||c}function _S(n,a){let r=n.route.path;return n.pathname!==a.pathname||r!=null&&r.endsWith("*")&&n.params["*"]!==a.params["*"]}function Xs(n,a){if(n.route.shouldRevalidate){let r=n.route.shouldRevalidate(a);if(typeof r=="boolean")return r}return a.defaultShouldRevalidate}function kg(n,a,r,l,c,f){let d;if(n){let p=l[n];qe(p,`No route found to patch children into: routeId = ${n}`),p.children||(p.children=[]),d=p.children}else d=r;let m=[],g=[];if(a.forEach(p=>{let x=d.find(y=>Gy(p,y));x?g.push({existingRoute:x,newRoute:p}):m.push(p)}),m.length>0){let p=Js(m,c,[n||"_","patch",String(d?.length||"0")],l);d.push(...p)}if(f&&g.length>0)for(let p=0;p<g.length;p++){let{existingRoute:x,newRoute:y}=g[p],T=x,[N]=Js([y],c,[],{},!0);Object.assign(T,{element:N.element?N.element:T.element,errorElement:N.errorElement?N.errorElement:T.errorElement,hydrateFallbackElement:N.hydrateFallbackElement?N.hydrateFallbackElement:T.hydrateFallbackElement})}}function Gy(n,a){return"id"in n&&"id"in a&&n.id===a.id?!0:n.index===a.index&&n.path===a.path&&n.caseSensitive===a.caseSensitive?(!n.children||n.children.length===0)&&(!a.children||a.children.length===0)?!0:n.children.every((r,l)=>a.children?.some(c=>Gy(r,c))):!1}var Ng=new WeakMap,Ky=({key:n,route:a,manifest:r,mapRouteProperties:l})=>{let c=r[a.id];if(qe(c,"No route found in manifest"),!c.lazy||typeof c.lazy!="object")return;let f=c.lazy[n];if(!f)return;let d=Ng.get(c);d||(d={},Ng.set(c,d));let m=d[n];if(m)return m;let g=(async()=>{let p=Vx(n),y=c[n]!==void 0&&n!=="hasErrorBoundary";if(p)zt(!p,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),d[n]=Promise.resolve();else if(y)zt(!1,`Route "${c.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let T=await f();T!=null&&(Object.assign(c,{[n]:T}),Object.assign(c,l(c)))}typeof c.lazy=="object"&&(c.lazy[n]=void 0,Object.values(c.lazy).every(T=>T===void 0)&&(c.lazy=void 0))})();return d[n]=g,g},Og=new WeakMap;function kS(n,a,r,l,c){let f=r[n.id];if(qe(f,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let x=Og.get(f);if(x)return{lazyRoutePromise:x,lazyHandlerPromise:x};let y=(async()=>{qe(typeof n.lazy=="function","No lazy route function found");let T=await n.lazy(),N={};for(let L in T){let B=T[L];if(B===void 0)continue;let P=Fx(L),Y=f[L]!==void 0&&L!=="hasErrorBoundary";P?zt(!P,"Route property "+L+" is not a supported property to be returned from a lazy route function. This property will be ignored."):Y?zt(!Y,`Route "${f.id}" has a static property "${L}" defined but its lazy function is also returning a value for this property. The lazy route property "${L}" will be ignored.`):N[L]=B}Object.assign(f,N),Object.assign(f,{...l(f),lazy:void 0})})();return Og.set(f,y),y.catch(()=>{}),{lazyRoutePromise:y,lazyHandlerPromise:y}}let d=Object.keys(n.lazy),m=[],g;for(let x of d){if(c&&c.includes(x))continue;let y=Ky({key:x,route:n,manifest:r,mapRouteProperties:l});y&&(m.push(y),x===a&&(g=y))}let p=m.length>0?Promise.all(m).then(()=>{}):void 0;return p?.catch(()=>{}),g?.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:g}}async function Mg(n){let a=n.matches.filter(c=>c.shouldLoad),r={};return(await Promise.all(a.map(c=>c.resolve()))).forEach((c,f)=>{r[a[f].route.id]=c}),r}async function NS(n){return n.matches.some(a=>a.route.middleware)?Vy(n,()=>Mg(n)):Mg(n)}function Vy(n,a){return OS(n,a,l=>{if(KS(l))throw l;return l},HS,r);function r(l,c,f){if(f)return Promise.resolve(Object.assign(f.value,{[c]:{type:"error",result:l}}));{let{matches:d}=n,m=Math.min(Math.max(d.findIndex(p=>p.route.id===c),0),Math.max(d.findIndex(p=>p.shouldCallHandler()),0)),g=hi(d,d[m].route.id).route.id;return Promise.resolve({[g]:{type:"error",result:l}})}}}async function OS(n,a,r,l,c){let{matches:f,request:d,params:m,context:g,unstable_pattern:p}=n,x=f.flatMap(T=>T.route.middleware?T.route.middleware.map(N=>[T.route.id,N]):[]);return await Yy({request:d,params:m,context:g,unstable_pattern:p},x,a,r,l,c)}async function Yy(n,a,r,l,c,f,d=0){let{request:m}=n;if(m.signal.aborted)throw m.signal.reason??new Error(`Request aborted: ${m.method} ${m.url}`);let g=a[d];if(!g)return await r();let[p,x]=g,y,T=async()=>{if(y)throw new Error("You may only call `next()` once per middleware");try{return y={value:await Yy(n,a,r,l,c,f,d+1)},y.value}catch(N){return y={value:await f(N,p,y)},y.value}};try{let N=await x(n,T),L=N!=null?l(N):void 0;return c(L)?L:y?L??y.value:(y={value:await T()},y.value)}catch(N){return await f(N,p,y)}}function Fy(n,a,r,l,c){let f=Ky({key:"middleware",route:l.route,manifest:a,mapRouteProperties:n}),d=kS(l.route,Wt(r.method)?"action":"loader",a,n,c);return{middleware:f,route:d.lazyRoutePromise,handler:d.lazyHandlerPromise}}function kf(n,a,r,l,c,f,d,m,g=null,p){let x=!1,y=Fy(n,a,r,c,f);return{...c,_lazyPromises:y,shouldLoad:m,shouldRevalidateArgs:g,shouldCallHandler(T){return x=!0,g?typeof p=="boolean"?Xs(c,{...g,defaultShouldRevalidate:p}):typeof T=="boolean"?Xs(c,{...g,defaultShouldRevalidate:T}):Xs(c,g):m},resolve(T){let{lazy:N,loader:L,middleware:B}=c.route,P=x||m||T&&!Wt(r.method)&&(N||L),K=B&&B.length>0&&!L&&!N;return P&&(Wt(r.method)||!K)?DS({request:r,unstable_pattern:l,match:c,lazyHandlerPromise:y?.handler,lazyRoutePromise:y?.route,handlerOverride:T,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function Hr(n,a,r,l,c,f,d,m=null){return l.map(g=>g.route.id!==c.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:m,shouldCallHandler:()=>!1,_lazyPromises:Fy(n,a,r,g,f),resolve:()=>Promise.resolve({type:"data",result:void 0})}:kf(n,a,r,tl(l),g,f,d,!0,m))}async function MS(n,a,r,l,c,f){r.some(p=>p._lazyPromises?.middleware)&&await Promise.all(r.map(p=>p._lazyPromises?.middleware));let d={request:a,unstable_pattern:tl(r),params:r[0].params,context:c,matches:r},g=await n({...d,fetcherKey:l,runClientMiddleware:p=>{let x=d;return Vy(x,()=>p({...x,fetcherKey:l,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(p=>[p._lazyPromises?.handler,p._lazyPromises?.route]))}catch{}return g}async function DS({request:n,unstable_pattern:a,match:r,lazyHandlerPromise:l,lazyRoutePromise:c,handlerOverride:f,scopedContext:d}){let m,g,p=Wt(n.method),x=p?"action":"loader",y=T=>{let N,L=new Promise((K,Y)=>N=Y);g=()=>N(),n.signal.addEventListener("abort",g);let B=K=>typeof T!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${x}" [routeId: ${r.route.id}]`)):T({request:n,unstable_pattern:a,params:r.params,context:d},...K!==void 0?[K]:[]),P=(async()=>{try{return{type:"data",result:await(f?f(Y=>B(Y)):B())}}catch(K){return{type:"error",result:K}}})();return Promise.race([P,L])};try{let T=p?r.route.action:r.route.loader;if(l||c)if(T){let N,[L]=await Promise.all([y(T).catch(B=>{N=B}),l,c]);if(N!==void 0)throw N;m=L}else{await l;let N=p?r.route.action:r.route.loader;if(N)[m]=await Promise.all([y(N),c]);else if(x==="action"){let L=new URL(n.url),B=L.pathname+L.search;throw Pn(405,{method:n.method,pathname:B,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(T)m=await y(T);else{let N=new URL(n.url),L=N.pathname+N.search;throw Pn(404,{pathname:L})}}catch(T){return{type:"error",result:T}}finally{g&&n.signal.removeEventListener("abort",g)}return m}async function jS(n){let a=n.headers.get("Content-Type");return a&&/\bapplication\/json\b/.test(a)?n.body==null?null:n.json():n.text()}async function zS(n){let{result:a,type:r}=n;if($f(a)){let l;try{l=await jS(a)}catch(c){return{type:"error",error:c}}return r==="error"?{type:"error",error:new el(a.status,a.statusText,l),statusCode:a.status,headers:a.headers}:{type:"data",data:l,statusCode:a.status,headers:a.headers}}return r==="error"?Bg(a)?a.data instanceof Error?{type:"error",error:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:qS(a),statusCode:$s(a)?a.status:void 0,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:a,statusCode:$s(a)?a.status:void 0}:Bg(a)?{type:"data",data:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"data",data:a}}function LS(n,a,r,l,c){let f=n.headers.get("Location");if(qe(f,"Redirects returned/thrown from loaders/actions must have a Location header"),!Xf(f)){let d=l.slice(0,l.findIndex(m=>m.route.id===r)+1);f=Rf(new URL(a.url),d,c,f),n.headers.set("Location",f)}return n}function Dg(n,a,r,l){let c=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Xf(n)){let f=n,d=f.startsWith("//")?new URL(a.protocol+f):new URL(f);if(c.includes(d.protocol))throw new Error("Invalid redirect location");let m=Vn(d.pathname,r)!=null;if(d.origin===a.origin&&m)return d.pathname+d.search+d.hash}try{let f=l.createURL(n);if(c.includes(f.protocol))throw new Error("Invalid redirect location")}catch{}return n}function Br(n,a,r,l){let c=n.createURL(Xy(a)).toString(),f={signal:r};if(l&&Wt(l.formMethod)){let{formMethod:d,formEncType:m}=l;f.method=d.toUpperCase(),m==="application/json"?(f.headers=new Headers({"Content-Type":m}),f.body=JSON.stringify(l.json)):m==="text/plain"?f.body=l.text:m==="application/x-www-form-urlencoded"&&l.formData?f.body=Nf(l.formData):f.body=l.formData}return new Request(c,f)}function Nf(n){let a=new URLSearchParams;for(let[r,l]of n.entries())a.append(r,typeof l=="string"?l:l.name);return a}function jg(n){let a=new FormData;for(let[r,l]of n.entries())a.append(r,l);return a}function US(n,a,r,l=!1,c=!1){let f={},d=null,m,g=!1,p={},x=r&&Rn(r[1])?r[1].error:void 0;return n.forEach(y=>{if(!(y.route.id in a))return;let T=y.route.id,N=a[T];if(qe(!Xi(N),"Cannot handle redirect results in processLoaderData"),Rn(N)){let L=N.error;if(x!==void 0&&(L=x,x=void 0),d=d||{},c)d[T]=L;else{let B=hi(n,T);d[B.route.id]==null&&(d[B.route.id]=L)}l||(f[T]=Py),g||(g=!0,m=$s(N.error)?N.error.status:500),N.headers&&(p[T]=N.headers)}else f[T]=N.data,N.statusCode&&N.statusCode!==200&&!g&&(m=N.statusCode),N.headers&&(p[T]=N.headers)}),x!==void 0&&r&&(d={[r[0]]:x},r[2]&&(f[r[2]]=void 0)),{loaderData:f,errors:d,statusCode:m||200,loaderHeaders:p}}function zg(n,a,r,l,c,f){let{loaderData:d,errors:m}=US(a,r,l);return c.filter(g=>!g.matches||g.matches.some(p=>p.shouldLoad)).forEach(g=>{let{key:p,match:x,controller:y}=g;if(y&&y.signal.aborted)return;let T=f[p];if(qe(T,"Did not find corresponding fetcher result"),Rn(T)){let N=hi(n.matches,x?.route.id);m&&m[N.route.id]||(m={...m,[N.route.id]:T.error}),n.fetchers.delete(p)}else if(Xi(T))qe(!1,"Unhandled fetcher revalidation redirect");else{let N=Ha(T.data);n.fetchers.set(p,N)}}),{loaderData:d,errors:m}}function Lg(n,a,r,l){let c=Object.entries(a).filter(([,f])=>f!==Py).reduce((f,[d,m])=>(f[d]=m,f),{});for(let f of r){let d=f.route.id;if(!a.hasOwnProperty(d)&&n.hasOwnProperty(d)&&f.route.loader&&(c[d]=n[d]),l&&l.hasOwnProperty(d))break}return c}function Ug(n){return n?Rn(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function hi(n,a){return(a?n.slice(0,n.findIndex(l=>l.route.id===a)+1):[...n]).reverse().find(l=>l.route.hasErrorBoundary===!0)||n[0]}function xo(n){let a=n.length===1?n[0]:n.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:a}],route:a}}function Pn(n,{pathname:a,routeId:r,method:l,type:c,message:f}={}){let d="Unknown Server Error",m="Unknown @remix-run/router error";return n===400?(d="Bad Request",l&&a&&r?m=`You made a ${l} request to "${a}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:c==="invalid-body"&&(m="Unable to encode submission body")):n===403?(d="Forbidden",m=`Route "${r}" does not match URL "${a}"`):n===404?(d="Not Found",m=`No route matches URL "${a}"`):n===405&&(d="Method Not Allowed",l&&a&&r?m=`You made a ${l.toUpperCase()} request to "${a}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:l&&(m=`Invalid request method "${l.toUpperCase()}"`)),new el(n||500,d,new Error(m),!0)}function So(n){let a=Object.entries(n);for(let r=a.length-1;r>=0;r--){let[l,c]=a[r];if(Xi(c))return{key:l,result:c}}}function Xy(n){let a=typeof n=="string"?vi(n):n;return ma({...a,hash:""})}function BS(n,a){return n.pathname!==a.pathname||n.search!==a.search?!1:n.hash===""?a.hash!=="":n.hash===a.hash?!0:a.hash!==""}function qS(n){return new el(n.init?.status??500,n.init?.statusText??"Internal Server Error",n.data)}function HS(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([a,r])=>typeof a=="string"&&QS(r))}function QS(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function PS(n){return $f(n.result)&&Hy.has(n.result.status)}function Rn(n){return n.type==="error"}function Xi(n){return(n&&n.type)==="redirect"}function Bg(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function $f(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function GS(n){return Hy.has(n)}function KS(n){return $f(n)&&GS(n.status)&&n.headers.has("Location")}function VS(n){return SS.has(n.toUpperCase())}function Wt(n){return bS.has(n.toUpperCase())}function Wf(n){return new URLSearchParams(n).getAll("index").some(a=>a==="")}function _o(n,a){let r=typeof a=="string"?vi(a).search:a.search;if(n[n.length-1].route.index&&Wf(r||""))return n[n.length-1];let l=zy(n);return l[l.length-1]}function qg(n){let{formMethod:a,formAction:r,formEncType:l,text:c,formData:f,json:d}=n;if(!(!a||!r||!l)){if(c!=null)return{formMethod:a,formAction:r,formEncType:l,formData:void 0,json:void 0,text:c};if(f!=null)return{formMethod:a,formAction:r,formEncType:l,formData:f,json:void 0,text:void 0};if(d!==void 0)return{formMethod:a,formAction:r,formEncType:l,formData:void 0,json:d,text:void 0}}}function cf(n,a){return a?{state:"loading",location:n,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function YS(n,a){return{state:"submitting",location:n,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function Hs(n,a){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:a}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:a}}function FS(n,a){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:a?a.data:void 0}}function Ha(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function XS(n,a){try{let r=n.sessionStorage.getItem(Qy);if(r){let l=JSON.parse(r);for(let[c,f]of Object.entries(l||{}))f&&Array.isArray(f)&&a.set(c,new Set(f||[]))}}catch{}}function ZS(n,a){if(a.size>0){let r={};for(let[l,c]of a)r[l]=[...c];try{n.sessionStorage.setItem(Qy,JSON.stringify(r))}catch(l){zt(!1,`Failed to save applied view transitions in sessionStorage (${l}).`)}}}function Hg(){let n,a,r=new Promise((l,c)=>{n=async f=>{l(f);try{await r}catch{}},a=async f=>{c(f);try{await r}catch{}}});return{promise:r,resolve:n,reject:a}}var $i=S.createContext(null);$i.displayName="DataRouter";var nl=S.createContext(null);nl.displayName="DataRouterState";var Zy=S.createContext(!1);function IS(){return S.useContext(Zy)}var ed=S.createContext({isTransitioning:!1});ed.displayName="ViewTransition";var Iy=S.createContext(new Map);Iy.displayName="Fetchers";var JS=S.createContext(null);JS.displayName="Await";var Yn=S.createContext(null);Yn.displayName="Navigation";var Ko=S.createContext(null);Ko.displayName="Location";var aa=S.createContext({outlet:null,matches:[],isDataRoute:!1});aa.displayName="Route";var td=S.createContext(null);td.displayName="RouteError";var Jy="REACT_ROUTER_ERROR",$S="REDIRECT",WS="ROUTE_ERROR_RESPONSE";function ew(n){if(n.startsWith(`${Jy}:${$S}:{`))try{let a=JSON.parse(n.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function tw(n){if(n.startsWith(`${Jy}:${WS}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new el(a.status,a.statusText,a.data)}catch{}}function nw(n,{relative:a}={}){qe(al(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:l}=S.useContext(Yn),{hash:c,pathname:f,search:d}=il(n,{relative:a}),m=f;return r!=="/"&&(m=f==="/"?r:da([r,f])),l.createHref({pathname:m,search:d,hash:c})}function al(){return S.useContext(Ko)!=null}function bi(){return qe(al(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Ko).location}var $y="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Wy(n){S.useContext(Yn).static||S.useLayoutEffect(n)}function ev(){let{isDataRoute:n}=S.useContext(aa);return n?vw():aw()}function aw(){qe(al(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext($i),{basename:a,navigator:r}=S.useContext(Yn),{matches:l}=S.useContext(aa),{pathname:c}=bi(),f=JSON.stringify(Zf(l)),d=S.useRef(!1);return Wy(()=>{d.current=!0}),S.useCallback((g,p={})=>{if(zt(d.current,$y),!d.current)return;if(typeof g=="number"){r.go(g);return}let x=If(g,JSON.parse(f),c,p.relative==="path");n==null&&a!=="/"&&(x.pathname=x.pathname==="/"?a:da([a,x.pathname])),(p.replace?r.replace:r.push)(x,p.state,p)},[a,r,f,c,n])}var iw=S.createContext(null);function rw(n){let a=S.useContext(aa).outlet;return S.useMemo(()=>a&&S.createElement(iw.Provider,{value:n},a),[a,n])}function sw(){let{matches:n}=S.useContext(aa),a=n[n.length-1];return a?a.params:{}}function il(n,{relative:a}={}){let{matches:r}=S.useContext(aa),{pathname:l}=bi(),c=JSON.stringify(Zf(r));return S.useMemo(()=>If(n,JSON.parse(c),l,a==="path"),[n,c,l,a])}function lw(n,a,r,l,c){qe(al(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=S.useContext(Yn),{matches:d}=S.useContext(aa),m=d[d.length-1],g=m?m.params:{},p=m?m.pathname:"/",x=m?m.pathnameBase:"/",y=m&&m.route;{let Y=y&&y.path||"";nv(p,!y||Y.endsWith("*")||Y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${Y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
9
+ `+s.stack}}var Zt=Object.prototype.hasOwnProperty,Ei=n.unstable_scheduleCallback,Ti=n.unstable_cancelCallback,Gt=n.unstable_shouldYield,ia=n.unstable_requestPaint,gt=n.unstable_now,ya=n.unstable_getCurrentPriorityLevel,ra=n.unstable_ImmediatePriority,Qa=n.unstable_UserBlockingPriority,Kt=n.unstable_NormalPriority,tn=n.unstable_LowPriority,kn=n.unstable_IdlePriority,Wi=n.log,Nn=n.unstable_setDisableYieldValue,va=null,ct=null;function on(e){if(typeof Wi=="function"&&Nn(e),ct&&typeof ct.setStrictMode=="function")try{ct.setStrictMode(va,e)}catch{}}var Lt=Math.clz32?Math.clz32:yn,er=Math.log,Ai=Math.LN2;function yn(e){return e>>>=0,e===0?32:31-(er(e)/Ai|0)|0}var Xn=256,ba=262144,In=4194304;function On(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function _e(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var o=0,u=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var b=s&134217727;return b!==0?(s=b&~u,s!==0?o=On(s):(h&=b,h!==0?o=On(h):i||(i=b&~e,i!==0&&(o=On(i))))):(b=s&~u,b!==0?o=On(b):h!==0?o=On(h):i||(i=s&~e,i!==0&&(o=On(i)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,i=t&-t,u>=i||u===32&&(i&4194048)!==0)?t:o}function ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Et(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Tt(){var e=In;return In<<=1,(In&62914560)===0&&(In=4194304),e}function vn(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Jt(e,t,i,s,o,u){var h=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var b=e.entanglements,E=e.expirationTimes,D=e.hiddenUpdates;for(i=h&~i;0<i;){var G=31-Lt(i),I=1<<G;b[G]=0,E[G]=-1;var j=D[G];if(j!==null)for(D[G]=null,G=0;G<j.length;G++){var U=j[G];U!==null&&(U.lane&=-536870913)}i&=~I}s!==0&&xa(e,s,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(h&~t))}function xa(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Lt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function w(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Lt(i),o=1<<s;o&t|e[s]&t&&(e[s]|=t),i&=~o}}function _(e,t){var i=t&-t;return i=(i&42)!==0?1:z(i),(i&(e.suspendedLanes|t))!==0?0:i}function z(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function J(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function te(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:Gp(e.type))}function ve(e,t){var i=X.p;try{return X.p=e,t()}finally{X.p=i}}var se=Math.random().toString(36).slice(2),re="__reactFiber$"+se,le="__reactProps$"+se,ge="__reactContainer$"+se,Ae="__reactEvents$"+se,xe="__reactListeners$"+se,Ze="__reactHandles$"+se,Ke="__reactResources$"+se,yt="__reactMarker$"+se;function bt(e){delete e[re],delete e[le],delete e[Ae],delete e[xe],delete e[Ze]}function xt(e){var t=e[re];if(t)return t;for(var i=e.parentNode;i;){if(t=i[ge]||i[re]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Rp(e);e!==null;){if(i=e[re])return i;e=Rp(e)}return t}e=i,i=e.parentNode}return null}function Ve(e){if(e=e[re]||e[ge]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(l(33))}function un(e){var t=e[Ke];return t||(t=e[Ke]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function mt(e){e[yt]=!0}var Zn=new Set,bn={};function Jn(e,t){Mn(e,t),Mn(e+"Capture",t)}function Mn(e,t){for(bn[e]=t,e=0;e<t.length;e++)Zn.add(t[e])}var Sa=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]*$"),Ci={},Ri={};function Ye(e){return Zt.call(Ri,e)?!0:Zt.call(Ci,e)?!1:Sa.test(e)?Ri[e]=!0:(Ci[e]=!0,!1)}function At(e,t,i){if(Ye(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function $n(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function Vt(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function Fe(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _i(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sl(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var o=s.get,u=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(h){i=""+h,u.call(this,h)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(h){i=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ir(e){if(!e._valueTracker){var t=_i(e)?"checked":"value";e._valueTracker=sl(e,t,""+e[t])}}function dd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=_i(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function ll(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var c0=/[\n"\\]/g;function Dn(e){return e.replace(c0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Xo(e,t,i,s,o,u,h,b){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Fe(t)):e.value!==""+Fe(t)&&(e.value=""+Fe(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?Io(e,h,Fe(t)):i!=null?Io(e,h,Fe(i)):s!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Fe(b):e.removeAttribute("name")}function hd(e,t,i,s,o,u,h,b){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||i!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Ir(e);return}i=i!=null?""+Fe(i):"",t=t!=null?""+Fe(t):i,b||t===e.value||(e.value=t),e.defaultValue=t}s=s??o,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=b?e.checked:!!s,e.defaultChecked=!!s,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Ir(e)}function Io(e,t,i){t==="number"&&ll(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function tr(e,t,i,s){if(e=e.options,t){t={};for(var o=0;o<i.length;o++)t["$"+i[o]]=!0;for(i=0;i<e.length;i++)o=t.hasOwnProperty("$"+e[i].value),e[i].selected!==o&&(e[i].selected=o),o&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Fe(i),t=null,o=0;o<e.length;o++){if(e[o].value===i){e[o].selected=!0,s&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function md(e,t,i){if(t!=null&&(t=""+Fe(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Fe(i):""}function pd(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(l(92));if(Ee(s)){if(1<s.length)throw Error(l(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Fe(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),Ir(e)}function nr(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var f0=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 gd(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||f0.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function yd(e,t,i){if(t!=null&&typeof t!="object")throw Error(l(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var o in t)s=t[o],t.hasOwnProperty(o)&&i[o]!==s&&gd(e,o,s)}else for(var u in t)t.hasOwnProperty(u)&&gd(e,u,t[u])}function Zo(e){if(e.indexOf("-")===-1)return!1;switch(e){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 d0=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"]]),h0=/^[\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 ol(e){return h0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function wa(){}var Jo=null;function $o(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ar=null,ir=null;function vd(e){var t=Ve(e);if(t&&(e=t.stateNode)){var i=e[le]||null;e:switch(e=t.stateNode,t.type){case"input":if(Xo(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Dn(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var o=s[le]||null;if(!o)throw Error(l(90));Xo(s,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&dd(s)}break e;case"textarea":md(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&tr(e,!!i.multiple,t,!1)}}}var Wo=!1;function bd(e,t,i){if(Wo)return e(t,i);Wo=!0;try{var s=e(t);return s}finally{if(Wo=!1,(ar!==null||ir!==null)&&(Il(),ar&&(t=ar,e=ir,ir=ar=null,vd(t),e)))for(t=0;t<e.length;t++)vd(e[t])}}function Zr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[le]||null;if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(l(231,t,typeof i));return i}var Ea=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),eu=!1;if(Ea)try{var Jr={};Object.defineProperty(Jr,"passive",{get:function(){eu=!0}}),window.addEventListener("test",Jr,Jr),window.removeEventListener("test",Jr,Jr)}catch{eu=!1}var Pa=null,tu=null,ul=null;function xd(){if(ul)return ul;var e,t=tu,i=t.length,s,o="value"in Pa?Pa.value:Pa.textContent,u=o.length;for(e=0;e<i&&t[e]===o[e];e++);var h=i-e;for(s=1;s<=h&&t[i-s]===o[u-s];s++);return ul=o.slice(e,1<s?1-s:void 0)}function cl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function fl(){return!0}function Sd(){return!1}function cn(e){function t(i,s,o,u,h){this._reactName=i,this._targetInst=o,this.type=s,this.nativeEvent=u,this.target=h,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(i=e[b],this[b]=i?i(u):u[b]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?fl:Sd,this.isPropagationStopped=Sd,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=fl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=fl)},persist:function(){},isPersistent:fl}),t}var ki={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dl=cn(ki),$r=y({},ki,{view:0,detail:0}),m0=cn($r),nu,au,Wr,hl=y({},$r,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ru,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Wr&&(Wr&&e.type==="mousemove"?(nu=e.screenX-Wr.screenX,au=e.screenY-Wr.screenY):au=nu=0,Wr=e),nu)},movementY:function(e){return"movementY"in e?e.movementY:au}}),wd=cn(hl),p0=y({},hl,{dataTransfer:0}),g0=cn(p0),y0=y({},$r,{relatedTarget:0}),iu=cn(y0),v0=y({},ki,{animationName:0,elapsedTime:0,pseudoElement:0}),b0=cn(v0),x0=y({},ki,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),S0=cn(x0),w0=y({},ki,{data:0}),Ed=cn(w0),E0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},T0={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"},A0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function C0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=A0[e])?!!t[e]:!1}function ru(){return C0}var R0=y({},$r,{key:function(e){if(e.key){var t=E0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?T0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ru,charCode:function(e){return e.type==="keypress"?cl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_0=cn(R0),k0=y({},hl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=cn(k0),N0=y({},$r,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ru}),O0=cn(N0),M0=y({},ki,{propertyName:0,elapsedTime:0,pseudoElement:0}),D0=cn(M0),j0=y({},hl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),z0=cn(j0),L0=y({},ki,{newState:0,oldState:0}),U0=cn(L0),B0=[9,13,27,32],su=Ea&&"CompositionEvent"in window,es=null;Ea&&"documentMode"in document&&(es=document.documentMode);var q0=Ea&&"TextEvent"in window&&!es,Ad=Ea&&(!su||es&&8<es&&11>=es),Cd=" ",Rd=!1;function _d(e,t){switch(e){case"keyup":return B0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rr=!1;function H0(e,t){switch(e){case"compositionend":return kd(t);case"keypress":return t.which!==32?null:(Rd=!0,Cd);case"textInput":return e=t.data,e===Cd&&Rd?null:e;default:return null}}function Q0(e,t){if(rr)return e==="compositionend"||!su&&_d(e,t)?(e=xd(),ul=tu=Pa=null,rr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ad&&t.locale!=="ko"?null:t.data;default:return null}}var P0={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 Nd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!P0[e.type]:t==="textarea"}function Od(e,t,i,s){ar?ir?ir.push(s):ir=[s]:ar=s,t=no(t,"onChange"),0<t.length&&(i=new dl("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var ts=null,ns=null;function G0(e){hp(e,0)}function ml(e){var t=Ht(e);if(dd(t))return e}function Md(e,t){if(e==="change")return t}var Dd=!1;if(Ea){var lu;if(Ea){var ou="oninput"in document;if(!ou){var jd=document.createElement("div");jd.setAttribute("oninput","return;"),ou=typeof jd.oninput=="function"}lu=ou}else lu=!1;Dd=lu&&(!document.documentMode||9<document.documentMode)}function zd(){ts&&(ts.detachEvent("onpropertychange",Ld),ns=ts=null)}function Ld(e){if(e.propertyName==="value"&&ml(ns)){var t=[];Od(t,ns,e,$o(e)),bd(G0,t)}}function K0(e,t,i){e==="focusin"?(zd(),ts=t,ns=i,ts.attachEvent("onpropertychange",Ld)):e==="focusout"&&zd()}function V0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ml(ns)}function Y0(e,t){if(e==="click")return ml(t)}function F0(e,t){if(e==="input"||e==="change")return ml(t)}function X0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xn=typeof Object.is=="function"?Object.is:X0;function as(e,t){if(xn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var o=i[s];if(!Zt.call(t,o)||!xn(e[o],t[o]))return!1}return!0}function Ud(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Bd(e,t){var i=Ud(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Ud(i)}}function qd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ll(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=ll(e.document)}return t}function uu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var I0=Ea&&"documentMode"in document&&11>=document.documentMode,sr=null,cu=null,is=null,fu=!1;function Qd(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;fu||sr==null||sr!==ll(s)||(s=sr,"selectionStart"in s&&uu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),is&&as(is,s)||(is=s,s=no(cu,"onSelect"),0<s.length&&(t=new dl("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=sr)))}function Ni(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var lr={animationend:Ni("Animation","AnimationEnd"),animationiteration:Ni("Animation","AnimationIteration"),animationstart:Ni("Animation","AnimationStart"),transitionrun:Ni("Transition","TransitionRun"),transitionstart:Ni("Transition","TransitionStart"),transitioncancel:Ni("Transition","TransitionCancel"),transitionend:Ni("Transition","TransitionEnd")},du={},Pd={};Ea&&(Pd=document.createElement("div").style,"AnimationEvent"in window||(delete lr.animationend.animation,delete lr.animationiteration.animation,delete lr.animationstart.animation),"TransitionEvent"in window||delete lr.transitionend.transition);function Oi(e){if(du[e])return du[e];if(!lr[e])return e;var t=lr[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Pd)return du[e]=t[i];return e}var Gd=Oi("animationend"),Kd=Oi("animationiteration"),Vd=Oi("animationstart"),Z0=Oi("transitionrun"),J0=Oi("transitionstart"),$0=Oi("transitioncancel"),Yd=Oi("transitionend"),Fd=new Map,hu="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(" ");hu.push("scrollEnd");function Wn(e,t){Fd.set(e,t),Jn(t,[e])}var pl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},jn=[],or=0,mu=0;function gl(){for(var e=or,t=mu=or=0;t<e;){var i=jn[t];jn[t++]=null;var s=jn[t];jn[t++]=null;var o=jn[t];jn[t++]=null;var u=jn[t];if(jn[t++]=null,s!==null&&o!==null){var h=s.pending;h===null?o.next=o:(o.next=h.next,h.next=o),s.pending=o}u!==0&&Xd(i,o,u)}}function yl(e,t,i,s){jn[or++]=e,jn[or++]=t,jn[or++]=i,jn[or++]=s,mu|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function pu(e,t,i,s){return yl(e,t,i,s),vl(e)}function Mi(e,t){return yl(e,null,null,t),vl(e)}function Xd(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var o=!1,u=e.return;u!==null;)u.childLanes|=i,s=u.alternate,s!==null&&(s.childLanes|=i),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-Lt(i),e=u.hiddenUpdates,s=e[o],s===null?e[o]=[t]:s.push(t),t.lane=i|536870912),u):null}function vl(e){if(50<Cs)throw Cs=0,Tc=null,Error(l(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ur={};function W0(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sn(e,t,i,s){return new W0(e,t,i,s)}function gu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ta(e,t){var i=e.alternate;return i===null?(i=Sn(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Id(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function bl(e,t,i,s,o,u){var h=0;if(s=e,typeof e=="function")gu(e)&&(h=1);else if(typeof e=="string")h=i1(e,i,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ie:return e=Sn(31,i,t,o),e.elementType=ie,e.lanes=u,e;case B:return Di(i.children,o,u,t);case P:h=8,o|=24;break;case K:return e=Sn(12,i,t,o|2),e.elementType=K,e.lanes=u,e;case de:return e=Sn(13,i,t,o),e.elementType=de,e.lanes=u,e;case fe:return e=Sn(19,i,t,o),e.elementType=fe,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:h=10;break e;case Y:h=9;break e;case he:h=11;break e;case R:h=14;break e;case V:h=16,s=null;break e}h=29,i=Error(l(130,e===null?"null":typeof e,"")),s=null}return t=Sn(h,i,t,o),t.elementType=e,t.type=s,t.lanes=u,t}function Di(e,t,i,s){return e=Sn(7,e,s,t),e.lanes=i,e}function yu(e,t,i){return e=Sn(6,e,null,t),e.lanes=i,e}function Zd(e){var t=Sn(18,null,null,0);return t.stateNode=e,t}function vu(e,t,i){return t=Sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Jd=new WeakMap;function zn(e,t){if(typeof e=="object"&&e!==null){var i=Jd.get(e);return i!==void 0?i:(t={value:e,source:t,stack:wi(t)},Jd.set(e,t),t)}return{value:e,source:t,stack:wi(t)}}var cr=[],fr=0,xl=null,rs=0,Ln=[],Un=0,Ga=null,sa=1,la="";function Aa(e,t){cr[fr++]=rs,cr[fr++]=xl,xl=e,rs=t}function $d(e,t,i){Ln[Un++]=sa,Ln[Un++]=la,Ln[Un++]=Ga,Ga=e;var s=sa;e=la;var o=32-Lt(s)-1;s&=~(1<<o),i+=1;var u=32-Lt(t)+o;if(30<u){var h=o-o%5;u=(s&(1<<h)-1).toString(32),s>>=h,o-=h,sa=1<<32-Lt(t)+o|i<<o|s,la=u+e}else sa=1<<u|i<<o|s,la=e}function bu(e){e.return!==null&&(Aa(e,1),$d(e,1,0))}function xu(e){for(;e===xl;)xl=cr[--fr],cr[fr]=null,rs=cr[--fr],cr[fr]=null;for(;e===Ga;)Ga=Ln[--Un],Ln[Un]=null,la=Ln[--Un],Ln[Un]=null,sa=Ln[--Un],Ln[Un]=null}function Wd(e,t){Ln[Un++]=sa,Ln[Un++]=la,Ln[Un++]=Ga,sa=t.id,la=t.overflow,Ga=e}var Yt=null,ft=null,Xe=!1,Ka=null,Bn=!1,Su=Error(l(519));function Va(e){var t=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ss(zn(t,e)),Su}function eh(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[re]=e,t[le]=s,i){case"dialog":Qe("cancel",t),Qe("close",t);break;case"iframe":case"object":case"embed":Qe("load",t);break;case"video":case"audio":for(i=0;i<_s.length;i++)Qe(_s[i],t);break;case"source":Qe("error",t);break;case"img":case"image":case"link":Qe("error",t),Qe("load",t);break;case"details":Qe("toggle",t);break;case"input":Qe("invalid",t),hd(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Qe("invalid",t);break;case"textarea":Qe("invalid",t),pd(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||yp(t.textContent,i)?(s.popover!=null&&(Qe("beforetoggle",t),Qe("toggle",t)),s.onScroll!=null&&Qe("scroll",t),s.onScrollEnd!=null&&Qe("scrollend",t),s.onClick!=null&&(t.onclick=wa),t=!0):t=!1,t||Va(e,!0)}function th(e){for(Yt=e.return;Yt;)switch(Yt.tag){case 5:case 31:case 13:Bn=!1;return;case 27:case 3:Bn=!0;return;default:Yt=Yt.return}}function dr(e){if(e!==Yt)return!1;if(!Xe)return th(e),Xe=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||qc(e.type,e.memoizedProps)),i=!i),i&&ft&&Va(e),th(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));ft=Cp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));ft=Cp(e)}else t===27?(t=ft,ri(e.type)?(e=Kc,Kc=null,ft=e):ft=t):ft=Yt?Hn(e.stateNode.nextSibling):null;return!0}function ji(){ft=Yt=null,Xe=!1}function wu(){var e=Ka;return e!==null&&(mn===null?mn=e:mn.push.apply(mn,e),Ka=null),e}function ss(e){Ka===null?Ka=[e]:Ka.push(e)}var Eu=A(null),zi=null,Ca=null;function Ya(e,t,i){H(Eu,t._currentValue),t._currentValue=i}function Ra(e){e._currentValue=Eu.current,q(Eu)}function Tu(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Au(e,t,i,s){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var h=o.child;u=u.firstContext;e:for(;u!==null;){var b=u;u=o;for(var E=0;E<t.length;E++)if(b.context===t[E]){u.lanes|=i,b=u.alternate,b!==null&&(b.lanes|=i),Tu(u.return,i,e),s||(h=null);break e}u=b.next}}else if(o.tag===18){if(h=o.return,h===null)throw Error(l(341));h.lanes|=i,u=h.alternate,u!==null&&(u.lanes|=i),Tu(h,i,e),h=null}else h=o.child;if(h!==null)h.return=o;else for(h=o;h!==null;){if(h===e){h=null;break}if(o=h.sibling,o!==null){o.return=h.return,h=o;break}h=h.return}o=h}}function hr(e,t,i,s){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var h=o.alternate;if(h===null)throw Error(l(387));if(h=h.memoizedProps,h!==null){var b=o.type;xn(o.pendingProps.value,h.value)||(e!==null?e.push(b):e=[b])}}else if(o===ae.current){if(h=o.alternate,h===null)throw Error(l(387));h.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Ds):e=[Ds])}o=o.return}e!==null&&Au(t,e,i,s),t.flags|=262144}function Sl(e){for(e=e.firstContext;e!==null;){if(!xn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Li(e){zi=e,Ca=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ft(e){return nh(zi,e)}function wl(e,t){return zi===null&&Li(e),nh(e,t)}function nh(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Ca===null){if(e===null)throw Error(l(308));Ca=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ca=Ca.next=t;return i}var eb=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},tb=n.unstable_scheduleCallback,nb=n.unstable_NormalPriority,kt={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cu(){return{controller:new eb,data:new Map,refCount:0}}function ls(e){e.refCount--,e.refCount===0&&tb(nb,function(){e.controller.abort()})}var os=null,Ru=0,mr=0,pr=null;function ab(e,t){if(os===null){var i=os=[];Ru=0,mr=Nc(),pr={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Ru++,t.then(ah,ah),t}function ah(){if(--Ru===0&&os!==null){pr!==null&&(pr.status="fulfilled");var e=os;os=null,mr=0,pr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ib(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(o){i.push(o)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var o=0;o<i.length;o++)(0,i[o])(t)},function(o){for(s.status="rejected",s.reason=o,o=0;o<i.length;o++)(0,i[o])(void 0)}),s}var ih=k.S;k.S=function(e,t){Qm=gt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ab(e,t),ih!==null&&ih(e,t)};var Ui=A(null);function _u(){var e=Ui.current;return e!==null?e:lt.pooledCache}function El(e,t){t===null?H(Ui,Ui.current):H(Ui,t.pool)}function rh(){var e=_u();return e===null?null:{parent:kt._currentValue,pool:e}}var gr=Error(l(460)),ku=Error(l(474)),Tl=Error(l(542)),Al={then:function(){}};function sh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function lh(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(wa,wa),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uh(e),e;default:if(typeof t.status=="string")t.then(wa,wa);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=s}},function(s){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uh(e),e}throw qi=t,gr}}function Bi(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(qi=i,gr):i}}var qi=null;function oh(){if(qi===null)throw Error(l(459));var e=qi;return qi=null,e}function uh(e){if(e===gr||e===Tl)throw Error(l(483))}var yr=null,us=0;function Cl(e){var t=us;return us+=1,yr===null&&(yr=[]),lh(yr,e,t)}function cs(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Rl(e,t){throw t.$$typeof===T?Error(l(525)):(e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ch(e){function t(O,C){if(e){var M=O.deletions;M===null?(O.deletions=[C],O.flags|=16):M.push(C)}}function i(O,C){if(!e)return null;for(;C!==null;)t(O,C),C=C.sibling;return null}function s(O){for(var C=new Map;O!==null;)O.key!==null?C.set(O.key,O):C.set(O.index,O),O=O.sibling;return C}function o(O,C){return O=Ta(O,C),O.index=0,O.sibling=null,O}function u(O,C,M){return O.index=M,e?(M=O.alternate,M!==null?(M=M.index,M<C?(O.flags|=67108866,C):M):(O.flags|=67108866,C)):(O.flags|=1048576,C)}function h(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function b(O,C,M,F){return C===null||C.tag!==6?(C=yu(M,O.mode,F),C.return=O,C):(C=o(C,M),C.return=O,C)}function E(O,C,M,F){var we=M.type;return we===B?G(O,C,M.props.children,F,M.key):C!==null&&(C.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===V&&Bi(we)===C.type)?(C=o(C,M.props),cs(C,M),C.return=O,C):(C=bl(M.type,M.key,M.props,null,O.mode,F),cs(C,M),C.return=O,C)}function D(O,C,M,F){return C===null||C.tag!==4||C.stateNode.containerInfo!==M.containerInfo||C.stateNode.implementation!==M.implementation?(C=vu(M,O.mode,F),C.return=O,C):(C=o(C,M.children||[]),C.return=O,C)}function G(O,C,M,F,we){return C===null||C.tag!==7?(C=Di(M,O.mode,F,we),C.return=O,C):(C=o(C,M),C.return=O,C)}function I(O,C,M){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=yu(""+C,O.mode,M),C.return=O,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case N:return M=bl(C.type,C.key,C.props,null,O.mode,M),cs(M,C),M.return=O,M;case L:return C=vu(C,O.mode,M),C.return=O,C;case V:return C=Bi(C),I(O,C,M)}if(Ee(C)||Se(C))return C=Di(C,O.mode,M,null),C.return=O,C;if(typeof C.then=="function")return I(O,Cl(C),M);if(C.$$typeof===W)return I(O,wl(O,C),M);Rl(O,C)}return null}function j(O,C,M,F){var we=C!==null?C.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return we!==null?null:b(O,C,""+M,F);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case N:return M.key===we?E(O,C,M,F):null;case L:return M.key===we?D(O,C,M,F):null;case V:return M=Bi(M),j(O,C,M,F)}if(Ee(M)||Se(M))return we!==null?null:G(O,C,M,F,null);if(typeof M.then=="function")return j(O,C,Cl(M),F);if(M.$$typeof===W)return j(O,C,wl(O,M),F);Rl(O,M)}return null}function U(O,C,M,F,we){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return O=O.get(M)||null,b(C,O,""+F,we);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case N:return O=O.get(F.key===null?M:F.key)||null,E(C,O,F,we);case L:return O=O.get(F.key===null?M:F.key)||null,D(C,O,F,we);case V:return F=Bi(F),U(O,C,M,F,we)}if(Ee(F)||Se(F))return O=O.get(M)||null,G(C,O,F,we,null);if(typeof F.then=="function")return U(O,C,M,Cl(F),we);if(F.$$typeof===W)return U(O,C,M,wl(C,F),we);Rl(C,F)}return null}function oe(O,C,M,F){for(var we=null,$e=null,pe=C,je=C=0,Ge=null;pe!==null&&je<M.length;je++){pe.index>je?(Ge=pe,pe=null):Ge=pe.sibling;var We=j(O,pe,M[je],F);if(We===null){pe===null&&(pe=Ge);break}e&&pe&&We.alternate===null&&t(O,pe),C=u(We,C,je),$e===null?we=We:$e.sibling=We,$e=We,pe=Ge}if(je===M.length)return i(O,pe),Xe&&Aa(O,je),we;if(pe===null){for(;je<M.length;je++)pe=I(O,M[je],F),pe!==null&&(C=u(pe,C,je),$e===null?we=pe:$e.sibling=pe,$e=pe);return Xe&&Aa(O,je),we}for(pe=s(pe);je<M.length;je++)Ge=U(pe,O,je,M[je],F),Ge!==null&&(e&&Ge.alternate!==null&&pe.delete(Ge.key===null?je:Ge.key),C=u(Ge,C,je),$e===null?we=Ge:$e.sibling=Ge,$e=Ge);return e&&pe.forEach(function(ci){return t(O,ci)}),Xe&&Aa(O,je),we}function Ce(O,C,M,F){if(M==null)throw Error(l(151));for(var we=null,$e=null,pe=C,je=C=0,Ge=null,We=M.next();pe!==null&&!We.done;je++,We=M.next()){pe.index>je?(Ge=pe,pe=null):Ge=pe.sibling;var ci=j(O,pe,We.value,F);if(ci===null){pe===null&&(pe=Ge);break}e&&pe&&ci.alternate===null&&t(O,pe),C=u(ci,C,je),$e===null?we=ci:$e.sibling=ci,$e=ci,pe=Ge}if(We.done)return i(O,pe),Xe&&Aa(O,je),we;if(pe===null){for(;!We.done;je++,We=M.next())We=I(O,We.value,F),We!==null&&(C=u(We,C,je),$e===null?we=We:$e.sibling=We,$e=We);return Xe&&Aa(O,je),we}for(pe=s(pe);!We.done;je++,We=M.next())We=U(pe,O,je,We.value,F),We!==null&&(e&&We.alternate!==null&&pe.delete(We.key===null?je:We.key),C=u(We,C,je),$e===null?we=We:$e.sibling=We,$e=We);return e&&pe.forEach(function(p1){return t(O,p1)}),Xe&&Aa(O,je),we}function st(O,C,M,F){if(typeof M=="object"&&M!==null&&M.type===B&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case N:e:{for(var we=M.key;C!==null;){if(C.key===we){if(we=M.type,we===B){if(C.tag===7){i(O,C.sibling),F=o(C,M.props.children),F.return=O,O=F;break e}}else if(C.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===V&&Bi(we)===C.type){i(O,C.sibling),F=o(C,M.props),cs(F,M),F.return=O,O=F;break e}i(O,C);break}else t(O,C);C=C.sibling}M.type===B?(F=Di(M.props.children,O.mode,F,M.key),F.return=O,O=F):(F=bl(M.type,M.key,M.props,null,O.mode,F),cs(F,M),F.return=O,O=F)}return h(O);case L:e:{for(we=M.key;C!==null;){if(C.key===we)if(C.tag===4&&C.stateNode.containerInfo===M.containerInfo&&C.stateNode.implementation===M.implementation){i(O,C.sibling),F=o(C,M.children||[]),F.return=O,O=F;break e}else{i(O,C);break}else t(O,C);C=C.sibling}F=vu(M,O.mode,F),F.return=O,O=F}return h(O);case V:return M=Bi(M),st(O,C,M,F)}if(Ee(M))return oe(O,C,M,F);if(Se(M)){if(we=Se(M),typeof we!="function")throw Error(l(150));return M=we.call(M),Ce(O,C,M,F)}if(typeof M.then=="function")return st(O,C,Cl(M),F);if(M.$$typeof===W)return st(O,C,wl(O,M),F);Rl(O,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,C!==null&&C.tag===6?(i(O,C.sibling),F=o(C,M),F.return=O,O=F):(i(O,C),F=yu(M,O.mode,F),F.return=O,O=F),h(O)):i(O,C)}return function(O,C,M,F){try{us=0;var we=st(O,C,M,F);return yr=null,we}catch(pe){if(pe===gr||pe===Tl)throw pe;var $e=Sn(29,pe,null,O.mode);return $e.lanes=F,$e.return=O,$e}}}var Hi=ch(!0),fh=ch(!1),Fa=!1;function Nu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ou(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Xa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(et&2)!==0){var o=s.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),s.pending=t,t=vl(e),Xd(e,null,i),t}return yl(e,s,t,i),vl(e)}function fs(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,w(e,i)}}function Mu(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var o=null,u=null;if(i=i.firstBaseUpdate,i!==null){do{var h={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};u===null?o=u=h:u=u.next=h,i=i.next}while(i!==null);u===null?o=u=t:u=u.next=t}else o=u=t;i={baseState:s.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var Du=!1;function ds(){if(Du){var e=pr;if(e!==null)throw e}}function hs(e,t,i,s){Du=!1;var o=e.updateQueue;Fa=!1;var u=o.firstBaseUpdate,h=o.lastBaseUpdate,b=o.shared.pending;if(b!==null){o.shared.pending=null;var E=b,D=E.next;E.next=null,h===null?u=D:h.next=D,h=E;var G=e.alternate;G!==null&&(G=G.updateQueue,b=G.lastBaseUpdate,b!==h&&(b===null?G.firstBaseUpdate=D:b.next=D,G.lastBaseUpdate=E))}if(u!==null){var I=o.baseState;h=0,G=D=E=null,b=u;do{var j=b.lane&-536870913,U=j!==b.lane;if(U?(Pe&j)===j:(s&j)===j){j!==0&&j===mr&&(Du=!0),G!==null&&(G=G.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var oe=e,Ce=b;j=t;var st=i;switch(Ce.tag){case 1:if(oe=Ce.payload,typeof oe=="function"){I=oe.call(st,I,j);break e}I=oe;break e;case 3:oe.flags=oe.flags&-65537|128;case 0:if(oe=Ce.payload,j=typeof oe=="function"?oe.call(st,I,j):oe,j==null)break e;I=y({},I,j);break e;case 2:Fa=!0}}j=b.callback,j!==null&&(e.flags|=64,U&&(e.flags|=8192),U=o.callbacks,U===null?o.callbacks=[j]:U.push(j))}else U={lane:j,tag:b.tag,payload:b.payload,callback:b.callback,next:null},G===null?(D=G=U,E=I):G=G.next=U,h|=j;if(b=b.next,b===null){if(b=o.shared.pending,b===null)break;U=b,b=U.next,U.next=null,o.lastBaseUpdate=U,o.shared.pending=null}}while(!0);G===null&&(E=I),o.baseState=E,o.firstBaseUpdate=D,o.lastBaseUpdate=G,u===null&&(o.shared.lanes=0),ei|=h,e.lanes=h,e.memoizedState=I}}function dh(e,t){if(typeof e!="function")throw Error(l(191,e));e.call(t)}function hh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)dh(i[e],t)}var vr=A(null),_l=A(0);function mh(e,t){e=La,H(_l,e),H(vr,t),La=e|t.baseLanes}function ju(){H(_l,La),H(vr,vr.current)}function zu(){La=_l.current,q(vr),q(_l)}var wn=A(null),qn=null;function Za(e){var t=e.alternate;H(Ct,Ct.current&1),H(wn,e),qn===null&&(t===null||vr.current!==null||t.memoizedState!==null)&&(qn=e)}function Lu(e){H(Ct,Ct.current),H(wn,e),qn===null&&(qn=e)}function ph(e){e.tag===22?(H(Ct,Ct.current),H(wn,e),qn===null&&(qn=e)):Ja()}function Ja(){H(Ct,Ct.current),H(wn,wn.current)}function En(e){q(wn),qn===e&&(qn=null),q(Ct)}var Ct=A(0);function kl(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Pc(i)||Gc(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var _a=0,De=null,it=null,Nt=null,Nl=!1,br=!1,Qi=!1,Ol=0,ms=0,xr=null,rb=0;function St(){throw Error(l(321))}function Uu(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!xn(e[i],t[i]))return!1;return!0}function Bu(e,t,i,s,o,u){return _a=u,De=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?$h:Wu,Qi=!1,u=i(s,o),Qi=!1,br&&(u=yh(t,i,s,o)),gh(e),u}function gh(e){k.H=ys;var t=it!==null&&it.next!==null;if(_a=0,Nt=it=De=null,Nl=!1,ms=0,xr=null,t)throw Error(l(300));e===null||Ot||(e=e.dependencies,e!==null&&Sl(e)&&(Ot=!0))}function yh(e,t,i,s){De=e;var o=0;do{if(br&&(xr=null),ms=0,br=!1,25<=o)throw Error(l(301));if(o+=1,Nt=it=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}k.H=Wh,u=t(i,s)}while(br);return u}function sb(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?ps(t):t,e=e.useState()[0],(it!==null?it.memoizedState:null)!==e&&(De.flags|=1024),t}function qu(){var e=Ol!==0;return Ol=0,e}function Hu(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Qu(e){if(Nl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Nl=!1}_a=0,Nt=it=De=null,br=!1,ms=Ol=0,xr=null}function nn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?De.memoizedState=Nt=e:Nt=Nt.next=e,Nt}function Rt(){if(it===null){var e=De.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var t=Nt===null?De.memoizedState:Nt.next;if(t!==null)Nt=t,it=e;else{if(e===null)throw De.alternate===null?Error(l(467)):Error(l(310));it=e,e={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},Nt===null?De.memoizedState=Nt=e:Nt=Nt.next=e}return Nt}function Ml(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ps(e){var t=ms;return ms+=1,xr===null&&(xr=[]),e=lh(xr,e,t),t=De,(Nt===null?t.memoizedState:Nt.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?$h:Wu),e}function Dl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ps(e);if(e.$$typeof===W)return Ft(e)}throw Error(l(438,String(e)))}function Pu(e){var t=null,i=De.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=De.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Ml(),De.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=ke;return t.index++,i}function ka(e,t){return typeof t=="function"?t(e):t}function jl(e){var t=Rt();return Gu(t,it,e)}function Gu(e,t,i){var s=e.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=i;var o=e.baseQueue,u=s.pending;if(u!==null){if(o!==null){var h=o.next;o.next=u.next,u.next=h}t.baseQueue=o=u,s.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var b=h=null,E=null,D=t,G=!1;do{var I=D.lane&-536870913;if(I!==D.lane?(Pe&I)===I:(_a&I)===I){var j=D.revertLane;if(j===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),I===mr&&(G=!0);else if((_a&j)===j){D=D.next,j===mr&&(G=!0);continue}else I={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},E===null?(b=E=I,h=u):E=E.next=I,De.lanes|=j,ei|=j;I=D.action,Qi&&i(u,I),u=D.hasEagerState?D.eagerState:i(u,I)}else j={lane:I,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},E===null?(b=E=j,h=u):E=E.next=j,De.lanes|=I,ei|=I;D=D.next}while(D!==null&&D!==t);if(E===null?h=u:E.next=b,!xn(u,e.memoizedState)&&(Ot=!0,G&&(i=pr,i!==null)))throw i;e.memoizedState=u,e.baseState=h,e.baseQueue=E,s.lastRenderedState=u}return o===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Ku(e){var t=Rt(),i=t.queue;if(i===null)throw Error(l(311));i.lastRenderedReducer=e;var s=i.dispatch,o=i.pending,u=t.memoizedState;if(o!==null){i.pending=null;var h=o=o.next;do u=e(u,h.action),h=h.next;while(h!==o);xn(u,t.memoizedState)||(Ot=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),i.lastRenderedState=u}return[u,s]}function vh(e,t,i){var s=De,o=Rt(),u=Xe;if(u){if(i===void 0)throw Error(l(407));i=i()}else i=t();var h=!xn((it||o).memoizedState,i);if(h&&(o.memoizedState=i,Ot=!0),o=o.queue,Fu(Sh.bind(null,s,o,e),[e]),o.getSnapshot!==t||h||Nt!==null&&Nt.memoizedState.tag&1){if(s.flags|=2048,Sr(9,{destroy:void 0},xh.bind(null,s,o,i,t),null),lt===null)throw Error(l(349));u||(_a&127)!==0||bh(s,t,i)}return i}function bh(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=De.updateQueue,t===null?(t=Ml(),De.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function xh(e,t,i,s){t.value=i,t.getSnapshot=s,wh(t)&&Eh(e)}function Sh(e,t,i){return i(function(){wh(t)&&Eh(e)})}function wh(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!xn(e,i)}catch{return!0}}function Eh(e){var t=Mi(e,2);t!==null&&pn(t,e,2)}function Vu(e){var t=nn();if(typeof e=="function"){var i=e;if(e=i(),Qi){on(!0);try{i()}finally{on(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:e},t}function Th(e,t,i,s){return e.baseState=i,Gu(e,it,typeof s=="function"?s:ka)}function lb(e,t,i,s,o){if(Ul(e))throw Error(l(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){u.listeners.push(h)}};k.T!==null?i(!0):u.isTransition=!1,s(u),i=t.pending,i===null?(u.next=t.pending=u,Ah(t,u)):(u.next=i.next,t.pending=i.next=u)}}function Ah(e,t){var i=t.action,s=t.payload,o=e.state;if(t.isTransition){var u=k.T,h={};k.T=h;try{var b=i(o,s),E=k.S;E!==null&&E(h,b),Ch(e,t,b)}catch(D){Yu(e,t,D)}finally{u!==null&&h.types!==null&&(u.types=h.types),k.T=u}}else try{u=i(o,s),Ch(e,t,u)}catch(D){Yu(e,t,D)}}function Ch(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){Rh(e,t,s)},function(s){return Yu(e,t,s)}):Rh(e,t,i)}function Rh(e,t,i){t.status="fulfilled",t.value=i,_h(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Ah(e,i)))}function Yu(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,_h(t),t=t.next;while(t!==s)}e.action=null}function _h(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function kh(e,t){return t}function Nh(e,t){if(Xe){var i=lt.formState;if(i!==null){e:{var s=De;if(Xe){if(ft){t:{for(var o=ft,u=Bn;o.nodeType!==8;){if(!u){o=null;break t}if(o=Hn(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){ft=Hn(o.nextSibling),s=o.data==="F!";break e}}Va(s)}s=!1}s&&(t=i[0])}}return i=nn(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:kh,lastRenderedState:t},i.queue=s,i=Ih.bind(null,De,s),s.dispatch=i,s=Vu(!1),u=$u.bind(null,De,!1,s.queue),s=nn(),o={state:t,dispatch:null,action:e,pending:null},s.queue=o,i=lb.bind(null,De,o,u,i),o.dispatch=i,s.memoizedState=e,[t,i,!1]}function Oh(e){var t=Rt();return Mh(t,it,e)}function Mh(e,t,i){if(t=Gu(e,t,kh)[0],e=jl(ka)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=ps(t)}catch(h){throw h===gr?Tl:h}else s=t;t=Rt();var o=t.queue,u=o.dispatch;return i!==t.memoizedState&&(De.flags|=2048,Sr(9,{destroy:void 0},ob.bind(null,o,i),null)),[s,u,e]}function ob(e,t){e.action=t}function Dh(e){var t=Rt(),i=it;if(i!==null)return Mh(t,i,e);Rt(),t=t.memoizedState,i=Rt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Sr(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=De.updateQueue,t===null&&(t=Ml(),De.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function jh(){return Rt().memoizedState}function zl(e,t,i,s){var o=nn();De.flags|=e,o.memoizedState=Sr(1|t,{destroy:void 0},i,s===void 0?null:s)}function Ll(e,t,i,s){var o=Rt();s=s===void 0?null:s;var u=o.memoizedState.inst;it!==null&&s!==null&&Uu(s,it.memoizedState.deps)?o.memoizedState=Sr(t,u,i,s):(De.flags|=e,o.memoizedState=Sr(1|t,u,i,s))}function zh(e,t){zl(8390656,8,e,t)}function Fu(e,t){Ll(2048,8,e,t)}function ub(e){De.flags|=4;var t=De.updateQueue;if(t===null)t=Ml(),De.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Lh(e){var t=Rt().memoizedState;return ub({ref:t,nextImpl:e}),function(){if((et&2)!==0)throw Error(l(440));return t.impl.apply(void 0,arguments)}}function Uh(e,t){return Ll(4,2,e,t)}function Bh(e,t){return Ll(4,4,e,t)}function qh(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Hh(e,t,i){i=i!=null?i.concat([e]):null,Ll(4,4,qh.bind(null,t,e),i)}function Xu(){}function Qh(e,t){var i=Rt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&Uu(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Ph(e,t){var i=Rt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&Uu(t,s[1]))return s[0];if(s=e(),Qi){on(!0);try{e()}finally{on(!1)}}return i.memoizedState=[s,t],s}function Iu(e,t,i){return i===void 0||(_a&1073741824)!==0&&(Pe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Gm(),De.lanes|=e,ei|=e,i)}function Gh(e,t,i,s){return xn(i,t)?i:vr.current!==null?(e=Iu(e,i,s),xn(e,t)||(Ot=!0),e):(_a&42)===0||(_a&1073741824)!==0&&(Pe&261930)===0?(Ot=!0,e.memoizedState=i):(e=Gm(),De.lanes|=e,ei|=e,t)}function Kh(e,t,i,s,o){var u=X.p;X.p=u!==0&&8>u?u:8;var h=k.T,b={};k.T=b,$u(e,!1,t,i);try{var E=o(),D=k.S;if(D!==null&&D(b,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var G=ib(E,s);gs(e,t,G,Cn(e))}else gs(e,t,s,Cn(e))}catch(I){gs(e,t,{then:function(){},status:"rejected",reason:I},Cn())}finally{X.p=u,h!==null&&b.types!==null&&(h.types=b.types),k.T=h}}function cb(){}function Zu(e,t,i,s){if(e.tag!==5)throw Error(l(476));var o=Vh(e).queue;Kh(e,o,t,Q,i===null?cb:function(){return Yh(e),i(s)})}function Vh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:Q},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Yh(e){var t=Vh(e);t.next===null&&(t=e.alternate.memoizedState),gs(e,t.next.queue,{},Cn())}function Ju(){return Ft(Ds)}function Fh(){return Rt().memoizedState}function Xh(){return Rt().memoizedState}function fb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Cn();e=Xa(i);var s=Ia(t,e,i);s!==null&&(pn(s,t,i),fs(s,t,i)),t={cache:Cu()},e.payload=t;return}t=t.return}}function db(e,t,i){var s=Cn();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Ul(e)?Zh(t,i):(i=pu(e,t,i,s),i!==null&&(pn(i,e,s),Jh(i,t,s)))}function Ih(e,t,i){var s=Cn();gs(e,t,i,s)}function gs(e,t,i,s){var o={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Ul(e))Zh(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var h=t.lastRenderedState,b=u(h,i);if(o.hasEagerState=!0,o.eagerState=b,xn(b,h))return yl(e,t,o,0),lt===null&&gl(),!1}catch{}if(i=pu(e,t,o,s),i!==null)return pn(i,e,s),Jh(i,t,s),!0}return!1}function $u(e,t,i,s){if(s={lane:2,revertLane:Nc(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Ul(e)){if(t)throw Error(l(479))}else t=pu(e,i,s,2),t!==null&&pn(t,e,2)}function Ul(e){var t=e.alternate;return e===De||t!==null&&t===De}function Zh(e,t){br=Nl=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Jh(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,w(e,i)}}var ys={readContext:Ft,use:Dl,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useLayoutEffect:St,useInsertionEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useSyncExternalStore:St,useId:St,useHostTransitionStatus:St,useFormState:St,useActionState:St,useOptimistic:St,useMemoCache:St,useCacheRefresh:St};ys.useEffectEvent=St;var $h={readContext:Ft,use:Dl,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:zh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,zl(4194308,4,qh.bind(null,t,e),i)},useLayoutEffect:function(e,t){return zl(4194308,4,e,t)},useInsertionEffect:function(e,t){zl(4,2,e,t)},useMemo:function(e,t){var i=nn();t=t===void 0?null:t;var s=e();if(Qi){on(!0);try{e()}finally{on(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=nn();if(i!==void 0){var o=i(t);if(Qi){on(!0);try{i(t)}finally{on(!1)}}}else o=t;return s.memoizedState=s.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},s.queue=e,e=e.dispatch=db.bind(null,De,e),[s.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:function(e){e=Vu(e);var t=e.queue,i=Ih.bind(null,De,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Xu,useDeferredValue:function(e,t){var i=nn();return Iu(i,e,t)},useTransition:function(){var e=Vu(!1);return e=Kh.bind(null,De,e.queue,!0,!1),nn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=De,o=nn();if(Xe){if(i===void 0)throw Error(l(407));i=i()}else{if(i=t(),lt===null)throw Error(l(349));(Pe&127)!==0||bh(s,t,i)}o.memoizedState=i;var u={value:i,getSnapshot:t};return o.queue=u,zh(Sh.bind(null,s,u,e),[e]),s.flags|=2048,Sr(9,{destroy:void 0},xh.bind(null,s,u,i,t),null),i},useId:function(){var e=nn(),t=lt.identifierPrefix;if(Xe){var i=la,s=sa;i=(s&~(1<<32-Lt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Ol++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=rb++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ju,useFormState:Nh,useActionState:Nh,useOptimistic:function(e){var t=nn();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=$u.bind(null,De,!0,i),i.dispatch=t,[e,t]},useMemoCache:Pu,useCacheRefresh:function(){return nn().memoizedState=fb.bind(null,De)},useEffectEvent:function(e){var t=nn(),i={impl:e};return t.memoizedState=i,function(){if((et&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}},Wu={readContext:Ft,use:Dl,useCallback:Qh,useContext:Ft,useEffect:Fu,useImperativeHandle:Hh,useInsertionEffect:Uh,useLayoutEffect:Bh,useMemo:Ph,useReducer:jl,useRef:jh,useState:function(){return jl(ka)},useDebugValue:Xu,useDeferredValue:function(e,t){var i=Rt();return Gh(i,it.memoizedState,e,t)},useTransition:function(){var e=jl(ka)[0],t=Rt().memoizedState;return[typeof e=="boolean"?e:ps(e),t]},useSyncExternalStore:vh,useId:Fh,useHostTransitionStatus:Ju,useFormState:Oh,useActionState:Oh,useOptimistic:function(e,t){var i=Rt();return Th(i,it,e,t)},useMemoCache:Pu,useCacheRefresh:Xh};Wu.useEffectEvent=Lh;var Wh={readContext:Ft,use:Dl,useCallback:Qh,useContext:Ft,useEffect:Fu,useImperativeHandle:Hh,useInsertionEffect:Uh,useLayoutEffect:Bh,useMemo:Ph,useReducer:Ku,useRef:jh,useState:function(){return Ku(ka)},useDebugValue:Xu,useDeferredValue:function(e,t){var i=Rt();return it===null?Iu(i,e,t):Gh(i,it.memoizedState,e,t)},useTransition:function(){var e=Ku(ka)[0],t=Rt().memoizedState;return[typeof e=="boolean"?e:ps(e),t]},useSyncExternalStore:vh,useId:Fh,useHostTransitionStatus:Ju,useFormState:Dh,useActionState:Dh,useOptimistic:function(e,t){var i=Rt();return it!==null?Th(i,it,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Pu,useCacheRefresh:Xh};Wh.useEffectEvent=Lh;function ec(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:y({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var tc={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Cn(),o=Xa(s);o.payload=t,i!=null&&(o.callback=i),t=Ia(e,o,s),t!==null&&(pn(t,e,s),fs(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Cn(),o=Xa(s);o.tag=1,o.payload=t,i!=null&&(o.callback=i),t=Ia(e,o,s),t!==null&&(pn(t,e,s),fs(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Cn(),s=Xa(i);s.tag=2,t!=null&&(s.callback=t),t=Ia(e,s,i),t!==null&&(pn(t,e,i),fs(t,e,i))}};function em(e,t,i,s,o,u,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,u,h):t.prototype&&t.prototype.isPureReactComponent?!as(i,s)||!as(o,u):!0}function tm(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&tc.enqueueReplaceState(t,t.state,null)}function Pi(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=y({},i));for(var o in e)i[o]===void 0&&(i[o]=e[o])}return i}function nm(e){pl(e)}function am(e){console.error(e)}function im(e){pl(e)}function Bl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function rm(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function nc(e,t,i){return i=Xa(i),i.tag=3,i.payload={element:null},i.callback=function(){Bl(e,t)},i}function sm(e){return e=Xa(e),e.tag=3,e}function lm(e,t,i,s){var o=i.type.getDerivedStateFromError;if(typeof o=="function"){var u=s.value;e.payload=function(){return o(u)},e.callback=function(){rm(t,i,s)}}var h=i.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){rm(t,i,s),typeof o!="function"&&(ti===null?ti=new Set([this]):ti.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})})}function hb(e,t,i,s,o){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&hr(t,i,o,!0),i=wn.current,i!==null){switch(i.tag){case 31:case 13:return qn===null?Zl():i.alternate===null&&wt===0&&(wt=3),i.flags&=-257,i.flags|=65536,i.lanes=o,s===Al?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Rc(e,s,o)),!1;case 22:return i.flags|=65536,s===Al?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Rc(e,s,o)),!1}throw Error(l(435,i.tag))}return Rc(e,s,o),Zl(),!1}if(Xe)return t=wn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,s!==Su&&(e=Error(l(422),{cause:s}),ss(zn(e,i)))):(s!==Su&&(t=Error(l(423),{cause:s}),ss(zn(t,i))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,s=zn(s,i),o=nc(e.stateNode,s,o),Mu(e,o),wt!==4&&(wt=2)),!1;var u=Error(l(520),{cause:s});if(u=zn(u,i),As===null?As=[u]:As.push(u),wt!==4&&(wt=2),t===null)return!0;s=zn(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=o&-o,i.lanes|=e,e=nc(i.stateNode,s,e),Mu(i,e),!1;case 1:if(t=i.type,u=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(ti===null||!ti.has(u))))return i.flags|=65536,o&=-o,i.lanes|=o,o=sm(o),lm(o,e,i,s),Mu(i,o),!1}i=i.return}while(i!==null);return!1}var ac=Error(l(461)),Ot=!1;function Xt(e,t,i,s){t.child=e===null?fh(t,null,i,s):Hi(t,e.child,i,s)}function om(e,t,i,s,o){i=i.render;var u=t.ref;if("ref"in s){var h={};for(var b in s)b!=="ref"&&(h[b]=s[b])}else h=s;return Li(t),s=Bu(e,t,i,h,u,o),b=qu(),e!==null&&!Ot?(Hu(e,t,o),Na(e,t,o)):(Xe&&b&&bu(t),t.flags|=1,Xt(e,t,s,o),t.child)}function um(e,t,i,s,o){if(e===null){var u=i.type;return typeof u=="function"&&!gu(u)&&u.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=u,cm(e,t,u,s,o)):(e=bl(i.type,null,s,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!fc(e,o)){var h=u.memoizedProps;if(i=i.compare,i=i!==null?i:as,i(h,s)&&e.ref===t.ref)return Na(e,t,o)}return t.flags|=1,e=Ta(u,s),e.ref=t.ref,e.return=t,t.child=e}function cm(e,t,i,s,o){if(e!==null){var u=e.memoizedProps;if(as(u,s)&&e.ref===t.ref)if(Ot=!1,t.pendingProps=s=u,fc(e,o))(e.flags&131072)!==0&&(Ot=!0);else return t.lanes=e.lanes,Na(e,t,o)}return ic(e,t,i,s,o)}function fm(e,t,i,s){var o=s.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|i:i,e!==null){for(s=t.child=e.child,o=0;s!==null;)o=o|s.lanes|s.childLanes,s=s.sibling;s=o&~u}else s=0,t.child=null;return dm(e,t,u,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&El(t,u!==null?u.cachePool:null),u!==null?mh(t,u):ju(),ph(t);else return s=t.lanes=536870912,dm(e,t,u!==null?u.baseLanes|i:i,i,s)}else u!==null?(El(t,u.cachePool),mh(t,u),Ja(),t.memoizedState=null):(e!==null&&El(t,null),ju(),Ja());return Xt(e,t,o,i),t.child}function vs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function dm(e,t,i,s,o){var u=_u();return u=u===null?null:{parent:kt._currentValue,pool:u},t.memoizedState={baseLanes:i,cachePool:u},e!==null&&El(t,null),ju(),ph(t),e!==null&&hr(e,t,s,!0),t.childLanes=o,null}function ql(e,t){return t=Ql({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function hm(e,t,i){return Hi(t,e.child,null,i),e=ql(t,t.pendingProps),e.flags|=2,En(t),t.memoizedState=null,e}function mb(e,t,i){var s=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Xe){if(s.mode==="hidden")return e=ql(t,s),t.lanes=536870912,vs(null,e);if(Lu(t),(e=ft)?(e=Ap(e,Bn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ga!==null?{id:sa,overflow:la}:null,retryLane:536870912,hydrationErrors:null},i=Zd(e),i.return=t,t.child=i,Yt=t,ft=null)):e=null,e===null)throw Va(t);return t.lanes=536870912,null}return ql(t,s)}var u=e.memoizedState;if(u!==null){var h=u.dehydrated;if(Lu(t),o)if(t.flags&256)t.flags&=-257,t=hm(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(l(558));else if(Ot||hr(e,t,i,!1),o=(i&e.childLanes)!==0,Ot||o){if(s=lt,s!==null&&(h=_(s,i),h!==0&&h!==u.retryLane))throw u.retryLane=h,Mi(e,h),pn(s,e,h),ac;Zl(),t=hm(e,t,i)}else e=u.treeContext,ft=Hn(h.nextSibling),Yt=t,Xe=!0,Ka=null,Bn=!1,e!==null&&Wd(t,e),t=ql(t,s),t.flags|=4096;return t}return e=Ta(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hl(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(l(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function ic(e,t,i,s,o){return Li(t),i=Bu(e,t,i,s,void 0,o),s=qu(),e!==null&&!Ot?(Hu(e,t,o),Na(e,t,o)):(Xe&&s&&bu(t),t.flags|=1,Xt(e,t,i,o),t.child)}function mm(e,t,i,s,o,u){return Li(t),t.updateQueue=null,i=yh(t,s,i,o),gh(e),s=qu(),e!==null&&!Ot?(Hu(e,t,u),Na(e,t,u)):(Xe&&s&&bu(t),t.flags|=1,Xt(e,t,i,u),t.child)}function pm(e,t,i,s,o){if(Li(t),t.stateNode===null){var u=ur,h=i.contextType;typeof h=="object"&&h!==null&&(u=Ft(h)),u=new i(s,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=tc,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=s,u.state=t.memoizedState,u.refs={},Nu(t),h=i.contextType,u.context=typeof h=="object"&&h!==null?Ft(h):ur,u.state=t.memoizedState,h=i.getDerivedStateFromProps,typeof h=="function"&&(ec(t,i,h,s),u.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(h=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),h!==u.state&&tc.enqueueReplaceState(u,u.state,null),hs(t,s,u,o),ds(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){u=t.stateNode;var b=t.memoizedProps,E=Pi(i,b);u.props=E;var D=u.context,G=i.contextType;h=ur,typeof G=="object"&&G!==null&&(h=Ft(G));var I=i.getDerivedStateFromProps;G=typeof I=="function"||typeof u.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,G||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(b||D!==h)&&tm(t,u,s,h),Fa=!1;var j=t.memoizedState;u.state=j,hs(t,s,u,o),ds(),D=t.memoizedState,b||j!==D||Fa?(typeof I=="function"&&(ec(t,i,I,s),D=t.memoizedState),(E=Fa||em(t,i,E,s,j,D,h))?(G||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=D),u.props=s,u.state=D,u.context=h,s=E):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{u=t.stateNode,Ou(e,t),h=t.memoizedProps,G=Pi(i,h),u.props=G,I=t.pendingProps,j=u.context,D=i.contextType,E=ur,typeof D=="object"&&D!==null&&(E=Ft(D)),b=i.getDerivedStateFromProps,(D=typeof b=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==I||j!==E)&&tm(t,u,s,E),Fa=!1,j=t.memoizedState,u.state=j,hs(t,s,u,o),ds();var U=t.memoizedState;h!==I||j!==U||Fa||e!==null&&e.dependencies!==null&&Sl(e.dependencies)?(typeof b=="function"&&(ec(t,i,b,s),U=t.memoizedState),(G=Fa||em(t,i,G,s,j,U,E)||e!==null&&e.dependencies!==null&&Sl(e.dependencies))?(D||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(s,U,E),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(s,U,E)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=U),u.props=s,u.state=U,u.context=E,s=G):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),s=!1)}return u=s,Hl(e,t),s=(t.flags&128)!==0,u||s?(u=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&s?(t.child=Hi(t,e.child,null,o),t.child=Hi(t,null,i,o)):Xt(e,t,i,o),t.memoizedState=u.state,e=t.child):e=Na(e,t,o),e}function gm(e,t,i,s){return ji(),t.flags|=256,Xt(e,t,i,s),t.child}var rc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sc(e){return{baseLanes:e,cachePool:rh()}}function lc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=An),e}function ym(e,t,i){var s=t.pendingProps,o=!1,u=(t.flags&128)!==0,h;if((h=u)||(h=e!==null&&e.memoizedState===null?!1:(Ct.current&2)!==0),h&&(o=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Xe){if(o?Za(t):Ja(),(e=ft)?(e=Ap(e,Bn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ga!==null?{id:sa,overflow:la}:null,retryLane:536870912,hydrationErrors:null},i=Zd(e),i.return=t,t.child=i,Yt=t,ft=null)):e=null,e===null)throw Va(t);return Gc(e)?t.lanes=32:t.lanes=536870912,null}var b=s.children;return s=s.fallback,o?(Ja(),o=t.mode,b=Ql({mode:"hidden",children:b},o),s=Di(s,o,i,null),b.return=t,s.return=t,b.sibling=s,t.child=b,s=t.child,s.memoizedState=sc(i),s.childLanes=lc(e,h,i),t.memoizedState=rc,vs(null,s)):(Za(t),oc(t,b))}var E=e.memoizedState;if(E!==null&&(b=E.dehydrated,b!==null)){if(u)t.flags&256?(Za(t),t.flags&=-257,t=uc(e,t,i)):t.memoizedState!==null?(Ja(),t.child=e.child,t.flags|=128,t=null):(Ja(),b=s.fallback,o=t.mode,s=Ql({mode:"visible",children:s.children},o),b=Di(b,o,i,null),b.flags|=2,s.return=t,b.return=t,s.sibling=b,t.child=s,Hi(t,e.child,null,i),s=t.child,s.memoizedState=sc(i),s.childLanes=lc(e,h,i),t.memoizedState=rc,t=vs(null,s));else if(Za(t),Gc(b)){if(h=b.nextSibling&&b.nextSibling.dataset,h)var D=h.dgst;h=D,s=Error(l(419)),s.stack="",s.digest=h,ss({value:s,source:null,stack:null}),t=uc(e,t,i)}else if(Ot||hr(e,t,i,!1),h=(i&e.childLanes)!==0,Ot||h){if(h=lt,h!==null&&(s=_(h,i),s!==0&&s!==E.retryLane))throw E.retryLane=s,Mi(e,s),pn(h,e,s),ac;Pc(b)||Zl(),t=uc(e,t,i)}else Pc(b)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,ft=Hn(b.nextSibling),Yt=t,Xe=!0,Ka=null,Bn=!1,e!==null&&Wd(t,e),t=oc(t,s.children),t.flags|=4096);return t}return o?(Ja(),b=s.fallback,o=t.mode,E=e.child,D=E.sibling,s=Ta(E,{mode:"hidden",children:s.children}),s.subtreeFlags=E.subtreeFlags&65011712,D!==null?b=Ta(D,b):(b=Di(b,o,i,null),b.flags|=2),b.return=t,s.return=t,s.sibling=b,t.child=s,vs(null,s),s=t.child,b=e.child.memoizedState,b===null?b=sc(i):(o=b.cachePool,o!==null?(E=kt._currentValue,o=o.parent!==E?{parent:E,pool:E}:o):o=rh(),b={baseLanes:b.baseLanes|i,cachePool:o}),s.memoizedState=b,s.childLanes=lc(e,h,i),t.memoizedState=rc,vs(e.child,s)):(Za(t),i=e.child,e=i.sibling,i=Ta(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=i,t.memoizedState=null,i)}function oc(e,t){return t=Ql({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ql(e,t){return e=Sn(22,e,null,t),e.lanes=0,e}function uc(e,t,i){return Hi(t,e.child,null,i),e=oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vm(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Tu(e.return,t,i)}function cc(e,t,i,s,o,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:o,treeForkCount:u}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=s,h.tail=i,h.tailMode=o,h.treeForkCount=u)}function bm(e,t,i){var s=t.pendingProps,o=s.revealOrder,u=s.tail;s=s.children;var h=Ct.current,b=(h&2)!==0;if(b?(h=h&1|2,t.flags|=128):h&=1,H(Ct,h),Xt(e,t,s,i),s=Xe?rs:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vm(e,i,t);else if(e.tag===19)vm(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(i=t.child,o=null;i!==null;)e=i.alternate,e!==null&&kl(e)===null&&(o=i),i=i.sibling;i=o,i===null?(o=t.child,t.child=null):(o=i.sibling,i.sibling=null),cc(t,!1,o,i,u,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&kl(e)===null){t.child=o;break}e=o.sibling,o.sibling=i,i=o,o=e}cc(t,!0,i,null,u,s);break;case"together":cc(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Na(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),ei|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(hr(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,i=Ta(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Ta(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function fc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Sl(e)))}function pb(e,t,i){switch(t.tag){case 3:Te(t,t.stateNode.containerInfo),Ya(t,kt,e.memoizedState.cache),ji();break;case 27:case 5:Pt(t);break;case 4:Te(t,t.stateNode.containerInfo);break;case 10:Ya(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Lu(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Za(t),t.flags|=128,null):(i&t.child.childLanes)!==0?ym(e,t,i):(Za(t),e=Na(e,t,i),e!==null?e.sibling:null);Za(t);break;case 19:var o=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(hr(e,t,i,!1),s=(i&t.childLanes)!==0),o){if(s)return bm(e,t,i);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),H(Ct,Ct.current),s)break;return null;case 22:return t.lanes=0,fm(e,t,i,t.pendingProps);case 24:Ya(t,kt,e.memoizedState.cache)}return Na(e,t,i)}function xm(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ot=!0;else{if(!fc(e,i)&&(t.flags&128)===0)return Ot=!1,pb(e,t,i);Ot=(e.flags&131072)!==0}else Ot=!1,Xe&&(t.flags&1048576)!==0&&$d(t,rs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=Bi(t.elementType),t.type=e,typeof e=="function")gu(e)?(s=Pi(e,s),t.tag=1,t=pm(null,t,e,s,i)):(t.tag=0,t=ic(null,t,e,s,i));else{if(e!=null){var o=e.$$typeof;if(o===he){t.tag=11,t=om(null,t,e,s,i);break e}else if(o===R){t.tag=14,t=um(null,t,e,s,i);break e}}throw t=ze(e)||e,Error(l(306,t,""))}}return t;case 0:return ic(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,o=Pi(s,t.pendingProps),pm(e,t,s,o,i);case 3:e:{if(Te(t,t.stateNode.containerInfo),e===null)throw Error(l(387));s=t.pendingProps;var u=t.memoizedState;o=u.element,Ou(e,t),hs(t,s,null,i);var h=t.memoizedState;if(s=h.cache,Ya(t,kt,s),s!==u.cache&&Au(t,[kt],i,!0),ds(),s=h.element,u.isDehydrated)if(u={element:s,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=gm(e,t,s,i);break e}else if(s!==o){o=zn(Error(l(424)),t),ss(o),t=gm(e,t,s,i);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ft=Hn(e.firstChild),Yt=t,Xe=!0,Ka=null,Bn=!0,i=fh(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(ji(),s===o){t=Na(e,t,i);break e}Xt(e,t,s,i)}t=t.child}return t;case 26:return Hl(e,t),e===null?(i=Op(t.type,null,t.pendingProps,null))?t.memoizedState=i:Xe||(i=t.type,e=t.pendingProps,s=ao($.current).createElement(i),s[re]=t,s[le]=e,It(s,i,e),mt(s),t.stateNode=s):t.memoizedState=Op(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Pt(t),e===null&&Xe&&(s=t.stateNode=_p(t.type,t.pendingProps,$.current),Yt=t,Bn=!0,o=ft,ri(t.type)?(Kc=o,ft=Hn(s.firstChild)):ft=o),Xt(e,t,t.pendingProps.children,i),Hl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Xe&&((o=s=ft)&&(s=Vb(s,t.type,t.pendingProps,Bn),s!==null?(t.stateNode=s,Yt=t,ft=Hn(s.firstChild),Bn=!1,o=!0):o=!1),o||Va(t)),Pt(t),o=t.type,u=t.pendingProps,h=e!==null?e.memoizedProps:null,s=u.children,qc(o,u)?s=null:h!==null&&qc(o,h)&&(t.flags|=32),t.memoizedState!==null&&(o=Bu(e,t,sb,null,null,i),Ds._currentValue=o),Hl(e,t),Xt(e,t,s,i),t.child;case 6:return e===null&&Xe&&((e=i=ft)&&(i=Yb(i,t.pendingProps,Bn),i!==null?(t.stateNode=i,Yt=t,ft=null,e=!0):e=!1),e||Va(t)),null;case 13:return ym(e,t,i);case 4:return Te(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Hi(t,null,s,i):Xt(e,t,s,i),t.child;case 11:return om(e,t,t.type,t.pendingProps,i);case 7:return Xt(e,t,t.pendingProps,i),t.child;case 8:return Xt(e,t,t.pendingProps.children,i),t.child;case 12:return Xt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Ya(t,t.type,s.value),Xt(e,t,s.children,i),t.child;case 9:return o=t.type._context,s=t.pendingProps.children,Li(t),o=Ft(o),s=s(o),t.flags|=1,Xt(e,t,s,i),t.child;case 14:return um(e,t,t.type,t.pendingProps,i);case 15:return cm(e,t,t.type,t.pendingProps,i);case 19:return bm(e,t,i);case 31:return mb(e,t,i);case 22:return fm(e,t,i,t.pendingProps);case 24:return Li(t),s=Ft(kt),e===null?(o=_u(),o===null&&(o=lt,u=Cu(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=i),o=u),t.memoizedState={parent:s,cache:o},Nu(t),Ya(t,kt,o)):((e.lanes&i)!==0&&(Ou(e,t),hs(t,null,null,i),ds()),o=e.memoizedState,u=t.memoizedState,o.parent!==s?(o={parent:s,cache:s},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Ya(t,kt,s)):(s=u.cache,Ya(t,kt,s),s!==o.cache&&Au(t,[kt],i,!0))),Xt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(l(156,t.tag))}function Oa(e){e.flags|=4}function dc(e,t,i,s,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Fm())e.flags|=8192;else throw qi=Al,ku}else e.flags&=-16777217}function Sm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Lp(t))if(Fm())e.flags|=8192;else throw qi=Al,ku}function Pl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Tt():536870912,e.lanes|=t,Ar|=t)}function bs(e,t){if(!Xe)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var o=e.child;o!==null;)i|=o.lanes|o.childLanes,s|=o.subtreeFlags&65011712,s|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)i|=o.lanes|o.childLanes,s|=o.subtreeFlags,s|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function gb(e,t,i){var s=t.pendingProps;switch(xu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return dt(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ra(kt),Be(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(dr(t)?Oa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,wu())),dt(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(Oa(t),u!==null?(dt(t),Sm(t,u)):(dt(t),dc(t,o,null,s,i))):u?u!==e.memoizedState?(Oa(t),dt(t),Sm(t,u)):(dt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Oa(t),dt(t),dc(t,o,e,s,i)),null;case 27:if(en(t),i=$.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Oa(t);else{if(!s){if(t.stateNode===null)throw Error(l(166));return dt(t),null}e=Z.current,dr(t)?eh(t):(e=_p(o,s,i),t.stateNode=e,Oa(t))}return dt(t),null;case 5:if(en(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Oa(t);else{if(!s){if(t.stateNode===null)throw Error(l(166));return dt(t),null}if(u=Z.current,dr(t))eh(t);else{var h=ao($.current);switch(u){case 1:u=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:u=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":u=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":u=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":u=h.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof s.is=="string"?h.createElement("select",{is:s.is}):h.createElement("select"),s.multiple?u.multiple=!0:s.size&&(u.size=s.size);break;default:u=typeof s.is=="string"?h.createElement(o,{is:s.is}):h.createElement(o)}}u[re]=t,u[le]=s;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)u.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=u;e:switch(It(u,o,s),o){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Oa(t)}}return dt(t),dc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Oa(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(l(166));if(e=$.current,dr(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,o=Yt,o!==null)switch(o.tag){case 27:case 5:s=o.memoizedProps}e[re]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||yp(e.nodeValue,i)),e||Va(t,!0)}else e=ao(e).createTextNode(s),e[re]=t,t.stateNode=e}return dt(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=dr(t),i!==null){if(e===null){if(!s)throw Error(l(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[re]=t}else ji(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),e=!1}else i=wu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(En(t),t):(En(t),null);if((t.flags&128)!==0)throw Error(l(558))}return dt(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=dr(t),s!==null&&s.dehydrated!==null){if(e===null){if(!o)throw Error(l(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(l(317));o[re]=t}else ji(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),o=!1}else o=wu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(En(t),t):(En(t),null)}return En(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,o=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(o=s.alternate.memoizedState.cachePool.pool),u=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),u!==o&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Pl(t,t.updateQueue),dt(t),null);case 4:return Be(),e===null&&jc(t.stateNode.containerInfo),dt(t),null;case 10:return Ra(t.type),dt(t),null;case 19:if(q(Ct),s=t.memoizedState,s===null)return dt(t),null;if(o=(t.flags&128)!==0,u=s.rendering,u===null)if(o)bs(s,!1);else{if(wt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=kl(e),u!==null){for(t.flags|=128,bs(s,!1),e=u.updateQueue,t.updateQueue=e,Pl(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Id(i,e),i=i.sibling;return H(Ct,Ct.current&1|2),Xe&&Aa(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&gt()>Fl&&(t.flags|=128,o=!0,bs(s,!1),t.lanes=4194304)}else{if(!o)if(e=kl(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Pl(t,e),bs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!u.alternate&&!Xe)return dt(t),null}else 2*gt()-s.renderingStartTime>Fl&&i!==536870912&&(t.flags|=128,o=!0,bs(s,!1),t.lanes=4194304);s.isBackwards?(u.sibling=t.child,t.child=u):(e=s.last,e!==null?e.sibling=u:t.child=u,s.last=u)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=gt(),e.sibling=null,i=Ct.current,H(Ct,o?i&1|2:i&1),Xe&&Aa(t,s.treeForkCount),e):(dt(t),null);case 22:case 23:return En(t),zu(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),i=t.updateQueue,i!==null&&Pl(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&q(Ui),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Ra(kt),dt(t),null;case 25:return null;case 30:return null}throw Error(l(156,t.tag))}function yb(e,t){switch(xu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ra(kt),Be(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return en(t),null;case 31:if(t.memoizedState!==null){if(En(t),t.alternate===null)throw Error(l(340));ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(En(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(Ct),null;case 4:return Be(),null;case 10:return Ra(t.type),null;case 22:case 23:return En(t),zu(),e!==null&&q(Ui),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ra(kt),null;case 25:return null;default:return null}}function wm(e,t){switch(xu(t),t.tag){case 3:Ra(kt),Be();break;case 26:case 27:case 5:en(t);break;case 4:Be();break;case 31:t.memoizedState!==null&&En(t);break;case 13:En(t);break;case 19:q(Ct);break;case 10:Ra(t.type);break;case 22:case 23:En(t),zu(),e!==null&&q(Ui);break;case 24:Ra(kt)}}function xs(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var o=s.next;i=o;do{if((i.tag&e)===e){s=void 0;var u=i.create,h=i.inst;s=u(),h.destroy=s}i=i.next}while(i!==o)}}catch(b){at(t,t.return,b)}}function $a(e,t,i){try{var s=t.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var u=o.next;s=u;do{if((s.tag&e)===e){var h=s.inst,b=h.destroy;if(b!==void 0){h.destroy=void 0,o=t;var E=i,D=b;try{D()}catch(G){at(o,E,G)}}}s=s.next}while(s!==u)}}catch(G){at(t,t.return,G)}}function Em(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{hh(t,i)}catch(s){at(e,e.return,s)}}}function Tm(e,t,i){i.props=Pi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){at(e,t,s)}}function Ss(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(o){at(e,t,o)}}function oa(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(o){at(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(o){at(e,t,o)}else i.current=null}function Am(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(o){at(e,e.return,o)}}function hc(e,t,i){try{var s=e.stateNode;qb(s,e.type,i,t),s[le]=t}catch(o){at(e,e.return,o)}}function Cm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ri(e.type)||e.tag===4}function mc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ri(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function pc(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=wa));else if(s!==4&&(s===27&&ri(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(pc(e,t,i),e=e.sibling;e!==null;)pc(e,t,i),e=e.sibling}function Gl(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&ri(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Gl(e,t,i),e=e.sibling;e!==null;)Gl(e,t,i),e=e.sibling}function Rm(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);It(t,s,i),t[re]=e,t[le]=i}catch(u){at(e,e.return,u)}}var Ma=!1,Mt=!1,gc=!1,_m=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function vb(e,t){if(e=e.containerInfo,Uc=co,e=Hd(e),uu(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var o=s.anchorOffset,u=s.focusNode;s=s.focusOffset;try{i.nodeType,u.nodeType}catch{i=null;break e}var h=0,b=-1,E=-1,D=0,G=0,I=e,j=null;t:for(;;){for(var U;I!==i||o!==0&&I.nodeType!==3||(b=h+o),I!==u||s!==0&&I.nodeType!==3||(E=h+s),I.nodeType===3&&(h+=I.nodeValue.length),(U=I.firstChild)!==null;)j=I,I=U;for(;;){if(I===e)break t;if(j===i&&++D===o&&(b=h),j===u&&++G===s&&(E=h),(U=I.nextSibling)!==null)break;I=j,j=I.parentNode}I=U}i=b===-1||E===-1?null:{start:b,end:E}}else i=null}i=i||{start:0,end:0}}else i=null;for(Bc={focusedElem:e,selectionRange:i},co=!1,Qt=t;Qt!==null;)if(t=Qt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Qt=e;else for(;Qt!==null;){switch(t=Qt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)o=e[i],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,i=t,o=u.memoizedProps,u=u.memoizedState,s=i.stateNode;try{var oe=Pi(i.type,o);e=s.getSnapshotBeforeUpdate(oe,u),s.__reactInternalSnapshotBeforeUpdate=e}catch(Ce){at(i,i.return,Ce)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Qc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=t.sibling,e!==null){e.return=t.return,Qt=e;break}Qt=t.return}}function km(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:ja(e,i),s&4&&xs(5,i);break;case 1:if(ja(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(h){at(i,i.return,h)}else{var o=Pi(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){at(i,i.return,h)}}s&64&&Em(i),s&512&&Ss(i,i.return);break;case 3:if(ja(e,i),s&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{hh(e,t)}catch(h){at(i,i.return,h)}}break;case 27:t===null&&s&4&&Rm(i);case 26:case 5:ja(e,i),t===null&&s&4&&Am(i),s&512&&Ss(i,i.return);break;case 12:ja(e,i);break;case 31:ja(e,i),s&4&&Mm(e,i);break;case 13:ja(e,i),s&4&&Dm(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Rb.bind(null,i),Fb(e,i))));break;case 22:if(s=i.memoizedState!==null||Ma,!s){t=t!==null&&t.memoizedState!==null||Mt,o=Ma;var u=Mt;Ma=s,(Mt=t)&&!u?za(e,i,(i.subtreeFlags&8772)!==0):ja(e,i),Ma=o,Mt=u}break;case 30:break;default:ja(e,i)}}function Nm(e){var t=e.alternate;t!==null&&(e.alternate=null,Nm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var pt=null,fn=!1;function Da(e,t,i){for(i=i.child;i!==null;)Om(e,t,i),i=i.sibling}function Om(e,t,i){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(va,i)}catch{}switch(i.tag){case 26:Mt||oa(i,t),Da(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Mt||oa(i,t);var s=pt,o=fn;ri(i.type)&&(pt=i.stateNode,fn=!1),Da(e,t,i),Ns(i.stateNode),pt=s,fn=o;break;case 5:Mt||oa(i,t);case 6:if(s=pt,o=fn,pt=null,Da(e,t,i),pt=s,fn=o,pt!==null)if(fn)try{(pt.nodeType===9?pt.body:pt.nodeName==="HTML"?pt.ownerDocument.body:pt).removeChild(i.stateNode)}catch(u){at(i,t,u)}else try{pt.removeChild(i.stateNode)}catch(u){at(i,t,u)}break;case 18:pt!==null&&(fn?(e=pt,Ep(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Dr(e)):Ep(pt,i.stateNode));break;case 4:s=pt,o=fn,pt=i.stateNode.containerInfo,fn=!0,Da(e,t,i),pt=s,fn=o;break;case 0:case 11:case 14:case 15:$a(2,i,t),Mt||$a(4,i,t),Da(e,t,i);break;case 1:Mt||(oa(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&Tm(i,t,s)),Da(e,t,i);break;case 21:Da(e,t,i);break;case 22:Mt=(s=Mt)||i.memoizedState!==null,Da(e,t,i),Mt=s;break;default:Da(e,t,i)}}function Mm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Dr(e)}catch(i){at(t,t.return,i)}}}function Dm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Dr(e)}catch(i){at(t,t.return,i)}}function bb(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _m),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _m),t;default:throw Error(l(435,e.tag))}}function Kl(e,t){var i=bb(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var o=_b.bind(null,e,s);s.then(o,o)}})}function dn(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var o=i[s],u=e,h=t,b=h;e:for(;b!==null;){switch(b.tag){case 27:if(ri(b.type)){pt=b.stateNode,fn=!1;break e}break;case 5:pt=b.stateNode,fn=!1;break e;case 3:case 4:pt=b.stateNode.containerInfo,fn=!0;break e}b=b.return}if(pt===null)throw Error(l(160));Om(u,h,o),pt=null,fn=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)jm(t,e),t=t.sibling}var ea=null;function jm(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:dn(t,e),hn(e),s&4&&($a(3,e,e.return),xs(3,e),$a(5,e,e.return));break;case 1:dn(t,e),hn(e),s&512&&(Mt||i===null||oa(i,i.return)),s&64&&Ma&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var o=ea;if(dn(t,e),hn(e),s&512&&(Mt||i===null||oa(i,i.return)),s&4){var u=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,o=o.ownerDocument||o;t:switch(s){case"title":u=o.getElementsByTagName("title")[0],(!u||u[yt]||u[re]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(s),o.head.insertBefore(u,o.querySelector("head > title"))),It(u,s,i),u[re]=e,mt(u),s=u;break e;case"link":var h=jp("link","href",o).get(s+(i.href||""));if(h){for(var b=0;b<h.length;b++)if(u=h[b],u.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&u.getAttribute("rel")===(i.rel==null?null:i.rel)&&u.getAttribute("title")===(i.title==null?null:i.title)&&u.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){h.splice(b,1);break t}}u=o.createElement(s),It(u,s,i),o.head.appendChild(u);break;case"meta":if(h=jp("meta","content",o).get(s+(i.content||""))){for(b=0;b<h.length;b++)if(u=h[b],u.getAttribute("content")===(i.content==null?null:""+i.content)&&u.getAttribute("name")===(i.name==null?null:i.name)&&u.getAttribute("property")===(i.property==null?null:i.property)&&u.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&u.getAttribute("charset")===(i.charSet==null?null:i.charSet)){h.splice(b,1);break t}}u=o.createElement(s),It(u,s,i),o.head.appendChild(u);break;default:throw Error(l(468,s))}u[re]=e,mt(u),s=u}e.stateNode=s}else zp(o,e.type,e.stateNode);else e.stateNode=Dp(o,s,e.memoizedProps);else u!==s?(u===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):u.count--,s===null?zp(o,e.type,e.stateNode):Dp(o,s,e.memoizedProps)):s===null&&e.stateNode!==null&&hc(e,e.memoizedProps,i.memoizedProps)}break;case 27:dn(t,e),hn(e),s&512&&(Mt||i===null||oa(i,i.return)),i!==null&&s&4&&hc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(dn(t,e),hn(e),s&512&&(Mt||i===null||oa(i,i.return)),e.flags&32){o=e.stateNode;try{nr(o,"")}catch(oe){at(e,e.return,oe)}}s&4&&e.stateNode!=null&&(o=e.memoizedProps,hc(e,o,i!==null?i.memoizedProps:o)),s&1024&&(gc=!0);break;case 6:if(dn(t,e),hn(e),s&4){if(e.stateNode===null)throw Error(l(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(oe){at(e,e.return,oe)}}break;case 3:if(so=null,o=ea,ea=io(t.containerInfo),dn(t,e),ea=o,hn(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Dr(t.containerInfo)}catch(oe){at(e,e.return,oe)}gc&&(gc=!1,zm(e));break;case 4:s=ea,ea=io(e.stateNode.containerInfo),dn(t,e),hn(e),ea=s;break;case 12:dn(t,e),hn(e);break;case 31:dn(t,e),hn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Kl(e,s)));break;case 13:dn(t,e),hn(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Yl=gt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Kl(e,s)));break;case 22:o=e.memoizedState!==null;var E=i!==null&&i.memoizedState!==null,D=Ma,G=Mt;if(Ma=D||o,Mt=G||E,dn(t,e),Mt=G,Ma=D,hn(e),s&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(i===null||E||Ma||Mt||Gi(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){E=i=t;try{if(u=E.stateNode,o)h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{b=E.stateNode;var I=E.memoizedProps.style,j=I!=null&&I.hasOwnProperty("display")?I.display:null;b.style.display=j==null||typeof j=="boolean"?"":(""+j).trim()}}catch(oe){at(E,E.return,oe)}}}else if(t.tag===6){if(i===null){E=t;try{E.stateNode.nodeValue=o?"":E.memoizedProps}catch(oe){at(E,E.return,oe)}}}else if(t.tag===18){if(i===null){E=t;try{var U=E.stateNode;o?Tp(U,!0):Tp(E.stateNode,!1)}catch(oe){at(E,E.return,oe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,Kl(e,i))));break;case 19:dn(t,e),hn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Kl(e,s)));break;case 30:break;case 21:break;default:dn(t,e),hn(e)}}function hn(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(Cm(s)){i=s;break}s=s.return}if(i==null)throw Error(l(160));switch(i.tag){case 27:var o=i.stateNode,u=mc(e);Gl(e,u,o);break;case 5:var h=i.stateNode;i.flags&32&&(nr(h,""),i.flags&=-33);var b=mc(e);Gl(e,b,h);break;case 3:case 4:var E=i.stateNode.containerInfo,D=mc(e);pc(e,D,E);break;default:throw Error(l(161))}}catch(G){at(e,e.return,G)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;zm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ja(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)km(e,t.alternate,t),t=t.sibling}function Gi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:$a(4,t,t.return),Gi(t);break;case 1:oa(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Tm(t,t.return,i),Gi(t);break;case 27:Ns(t.stateNode);case 26:case 5:oa(t,t.return),Gi(t);break;case 22:t.memoizedState===null&&Gi(t);break;case 30:Gi(t);break;default:Gi(t)}e=e.sibling}}function za(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,o=e,u=t,h=u.flags;switch(u.tag){case 0:case 11:case 15:za(o,u,i),xs(4,u);break;case 1:if(za(o,u,i),s=u,o=s.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(D){at(s,s.return,D)}if(s=u,o=s.updateQueue,o!==null){var b=s.stateNode;try{var E=o.shared.hiddenCallbacks;if(E!==null)for(o.shared.hiddenCallbacks=null,o=0;o<E.length;o++)dh(E[o],b)}catch(D){at(s,s.return,D)}}i&&h&64&&Em(u),Ss(u,u.return);break;case 27:Rm(u);case 26:case 5:za(o,u,i),i&&s===null&&h&4&&Am(u),Ss(u,u.return);break;case 12:za(o,u,i);break;case 31:za(o,u,i),i&&h&4&&Mm(o,u);break;case 13:za(o,u,i),i&&h&4&&Dm(o,u);break;case 22:u.memoizedState===null&&za(o,u,i),Ss(u,u.return);break;case 30:break;default:za(o,u,i)}t=t.sibling}}function yc(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&ls(i))}function vc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ls(e))}function ta(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Lm(e,t,i,s),t=t.sibling}function Lm(e,t,i,s){var o=t.flags;switch(t.tag){case 0:case 11:case 15:ta(e,t,i,s),o&2048&&xs(9,t);break;case 1:ta(e,t,i,s);break;case 3:ta(e,t,i,s),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ls(e)));break;case 12:if(o&2048){ta(e,t,i,s),e=t.stateNode;try{var u=t.memoizedProps,h=u.id,b=u.onPostCommit;typeof b=="function"&&b(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){at(t,t.return,E)}}else ta(e,t,i,s);break;case 31:ta(e,t,i,s);break;case 13:ta(e,t,i,s);break;case 23:break;case 22:u=t.stateNode,h=t.alternate,t.memoizedState!==null?u._visibility&2?ta(e,t,i,s):ws(e,t):u._visibility&2?ta(e,t,i,s):(u._visibility|=2,wr(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),o&2048&&yc(h,t);break;case 24:ta(e,t,i,s),o&2048&&vc(t.alternate,t);break;default:ta(e,t,i,s)}}function wr(e,t,i,s,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,h=t,b=i,E=s,D=h.flags;switch(h.tag){case 0:case 11:case 15:wr(u,h,b,E,o),xs(8,h);break;case 23:break;case 22:var G=h.stateNode;h.memoizedState!==null?G._visibility&2?wr(u,h,b,E,o):ws(u,h):(G._visibility|=2,wr(u,h,b,E,o)),o&&D&2048&&yc(h.alternate,h);break;case 24:wr(u,h,b,E,o),o&&D&2048&&vc(h.alternate,h);break;default:wr(u,h,b,E,o)}t=t.sibling}}function ws(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,o=s.flags;switch(s.tag){case 22:ws(i,s),o&2048&&yc(s.alternate,s);break;case 24:ws(i,s),o&2048&&vc(s.alternate,s);break;default:ws(i,s)}t=t.sibling}}var Es=8192;function Er(e,t,i){if(e.subtreeFlags&Es)for(e=e.child;e!==null;)Um(e,t,i),e=e.sibling}function Um(e,t,i){switch(e.tag){case 26:Er(e,t,i),e.flags&Es&&e.memoizedState!==null&&r1(i,ea,e.memoizedState,e.memoizedProps);break;case 5:Er(e,t,i);break;case 3:case 4:var s=ea;ea=io(e.stateNode.containerInfo),Er(e,t,i),ea=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Es,Es=16777216,Er(e,t,i),Es=s):Er(e,t,i));break;default:Er(e,t,i)}}function Bm(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ts(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];Qt=s,Hm(s,e)}Bm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)qm(e),e=e.sibling}function qm(e){switch(e.tag){case 0:case 11:case 15:Ts(e),e.flags&2048&&$a(9,e,e.return);break;case 3:Ts(e);break;case 12:Ts(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Vl(e)):Ts(e);break;default:Ts(e)}}function Vl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];Qt=s,Hm(s,e)}Bm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:$a(8,t,t.return),Vl(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Vl(t));break;default:Vl(t)}e=e.sibling}}function Hm(e,t){for(;Qt!==null;){var i=Qt;switch(i.tag){case 0:case 11:case 15:$a(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:ls(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,Qt=s;else e:for(i=e;Qt!==null;){s=Qt;var o=s.sibling,u=s.return;if(Nm(s),s===i){Qt=null;break e}if(o!==null){o.return=u,Qt=o;break e}Qt=u}}}var xb={getCacheForType:function(e){var t=Ft(kt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Ft(kt).controller.signal}},Sb=typeof WeakMap=="function"?WeakMap:Map,et=0,lt=null,He=null,Pe=0,nt=0,Tn=null,Wa=!1,Tr=!1,bc=!1,La=0,wt=0,ei=0,Ki=0,xc=0,An=0,Ar=0,As=null,mn=null,Sc=!1,Yl=0,Qm=0,Fl=1/0,Xl=null,ti=null,Ut=0,ni=null,Cr=null,Ua=0,wc=0,Ec=null,Pm=null,Cs=0,Tc=null;function Cn(){return(et&2)!==0&&Pe!==0?Pe&-Pe:k.T!==null?Nc():te()}function Gm(){if(An===0)if((Pe&536870912)===0||Xe){var e=ba;ba<<=1,(ba&3932160)===0&&(ba=262144),An=e}else An=536870912;return e=wn.current,e!==null&&(e.flags|=32),An}function pn(e,t,i){(e===lt&&(nt===2||nt===9)||e.cancelPendingCommit!==null)&&(Rr(e,0),ai(e,Pe,An,!1)),ut(e,i),((et&2)===0||e!==lt)&&(e===lt&&((et&2)===0&&(Ki|=i),wt===4&&ai(e,Pe,An,!1)),ua(e))}function Km(e,t,i){if((et&6)!==0)throw Error(l(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||ot(e,t),o=s?Tb(e,t):Cc(e,t,!0),u=s;do{if(o===0){Tr&&!s&&ai(e,t,0,!1);break}else{if(i=e.current.alternate,u&&!wb(i)){o=Cc(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var b=e;o=As;var E=b.current.memoizedState.isDehydrated;if(E&&(Rr(b,h).flags|=256),h=Cc(b,h,!1),h!==2){if(bc&&!E){b.errorRecoveryDisabledLanes|=u,Ki|=u,o=4;break e}u=mn,mn=o,u!==null&&(mn===null?mn=u:mn.push.apply(mn,u))}o=h}if(u=!1,o!==2)continue}}if(o===1){Rr(e,0),ai(e,t,0,!0);break}e:{switch(s=e,u=o,u){case 0:case 1:throw Error(l(345));case 4:if((t&4194048)!==t)break;case 6:ai(s,t,An,!Wa);break e;case 2:mn=null;break;case 3:case 5:break;default:throw Error(l(329))}if((t&62914560)===t&&(o=Yl+300-gt(),10<o)){if(ai(s,t,An,!Wa),_e(s,0,!0)!==0)break e;Ua=t,s.timeoutHandle=Sp(Vm.bind(null,s,i,mn,Xl,Sc,t,An,Ki,Ar,Wa,u,"Throttled",-0,0),o);break e}Vm(s,i,mn,Xl,Sc,t,An,Ki,Ar,Wa,u,null,-0,0)}}break}while(!0);ua(e)}function Vm(e,t,i,s,o,u,h,b,E,D,G,I,j,U){if(e.timeoutHandle=-1,I=t.subtreeFlags,I&8192||(I&16785408)===16785408){I={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:wa},Um(t,u,I);var oe=(u&62914560)===u?Yl-gt():(u&4194048)===u?Qm-gt():0;if(oe=s1(I,oe),oe!==null){Ua=u,e.cancelPendingCommit=oe(Wm.bind(null,e,t,u,i,s,o,h,b,E,G,I,null,j,U)),ai(e,u,h,!D);return}}Wm(e,t,u,i,s,o,h,b,E)}function wb(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var o=i[s],u=o.getSnapshot;o=o.value;try{if(!xn(u(),o))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ai(e,t,i,s){t&=~xc,t&=~Ki,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var o=t;0<o;){var u=31-Lt(o),h=1<<u;s[u]=-1,o&=~h}i!==0&&xa(e,i,t)}function Il(){return(et&6)===0?(Rs(0),!1):!0}function Ac(){if(He!==null){if(nt===0)var e=He.return;else e=He,Ca=zi=null,Qu(e),yr=null,us=0,e=He;for(;e!==null;)wm(e.alternate,e),e=e.return;He=null}}function Rr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Pb(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Ua=0,Ac(),lt=e,He=i=Ta(e.current,null),Pe=t,nt=0,Tn=null,Wa=!1,Tr=ot(e,t),bc=!1,Ar=An=xc=Ki=ei=wt=0,mn=As=null,Sc=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var o=31-Lt(s),u=1<<o;t|=e[o],s&=~u}return La=t,gl(),i}function Ym(e,t){De=null,k.H=ys,t===gr||t===Tl?(t=oh(),nt=3):t===ku?(t=oh(),nt=4):nt=t===ac?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Tn=t,He===null&&(wt=1,Bl(e,zn(t,e.current)))}function Fm(){var e=wn.current;return e===null?!0:(Pe&4194048)===Pe?qn===null:(Pe&62914560)===Pe||(Pe&536870912)!==0?e===qn:!1}function Xm(){var e=k.H;return k.H=ys,e===null?ys:e}function Im(){var e=k.A;return k.A=xb,e}function Zl(){wt=4,Wa||(Pe&4194048)!==Pe&&wn.current!==null||(Tr=!0),(ei&134217727)===0&&(Ki&134217727)===0||lt===null||ai(lt,Pe,An,!1)}function Cc(e,t,i){var s=et;et|=2;var o=Xm(),u=Im();(lt!==e||Pe!==t)&&(Xl=null,Rr(e,t)),t=!1;var h=wt;e:do try{if(nt!==0&&He!==null){var b=He,E=Tn;switch(nt){case 8:Ac(),h=6;break e;case 3:case 2:case 9:case 6:wn.current===null&&(t=!0);var D=nt;if(nt=0,Tn=null,_r(e,b,E,D),i&&Tr){h=0;break e}break;default:D=nt,nt=0,Tn=null,_r(e,b,E,D)}}Eb(),h=wt;break}catch(G){Ym(e,G)}while(!0);return t&&e.shellSuspendCounter++,Ca=zi=null,et=s,k.H=o,k.A=u,He===null&&(lt=null,Pe=0,gl()),h}function Eb(){for(;He!==null;)Zm(He)}function Tb(e,t){var i=et;et|=2;var s=Xm(),o=Im();lt!==e||Pe!==t?(Xl=null,Fl=gt()+500,Rr(e,t)):Tr=ot(e,t);e:do try{if(nt!==0&&He!==null){t=He;var u=Tn;t:switch(nt){case 1:nt=0,Tn=null,_r(e,t,u,1);break;case 2:case 9:if(sh(u)){nt=0,Tn=null,Jm(t);break}t=function(){nt!==2&&nt!==9||lt!==e||(nt=7),ua(e)},u.then(t,t);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:sh(u)?(nt=0,Tn=null,Jm(t)):(nt=0,Tn=null,_r(e,t,u,7));break;case 5:var h=null;switch(He.tag){case 26:h=He.memoizedState;case 5:case 27:var b=He;if(h?Lp(h):b.stateNode.complete){nt=0,Tn=null;var E=b.sibling;if(E!==null)He=E;else{var D=b.return;D!==null?(He=D,Jl(D)):He=null}break t}}nt=0,Tn=null,_r(e,t,u,5);break;case 6:nt=0,Tn=null,_r(e,t,u,6);break;case 8:Ac(),wt=6;break e;default:throw Error(l(462))}}Ab();break}catch(G){Ym(e,G)}while(!0);return Ca=zi=null,k.H=s,k.A=o,et=i,He!==null?0:(lt=null,Pe=0,gl(),wt)}function Ab(){for(;He!==null&&!Gt();)Zm(He)}function Zm(e){var t=xm(e.alternate,e,La);e.memoizedProps=e.pendingProps,t===null?Jl(e):He=t}function Jm(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=mm(i,t,t.pendingProps,t.type,void 0,Pe);break;case 11:t=mm(i,t,t.pendingProps,t.type.render,t.ref,Pe);break;case 5:Qu(t);default:wm(i,t),t=He=Id(t,La),t=xm(i,t,La)}e.memoizedProps=e.pendingProps,t===null?Jl(e):He=t}function _r(e,t,i,s){Ca=zi=null,Qu(t),yr=null,us=0;var o=t.return;try{if(hb(e,o,t,i,Pe)){wt=1,Bl(e,zn(i,e.current)),He=null;return}}catch(u){if(o!==null)throw He=o,u;wt=1,Bl(e,zn(i,e.current)),He=null;return}t.flags&32768?(Xe||s===1?e=!0:Tr||(Pe&536870912)!==0?e=!1:(Wa=e=!0,(s===2||s===9||s===3||s===6)&&(s=wn.current,s!==null&&s.tag===13&&(s.flags|=16384))),$m(t,e)):Jl(t)}function Jl(e){var t=e;do{if((t.flags&32768)!==0){$m(t,Wa);return}e=t.return;var i=gb(t.alternate,t,La);if(i!==null){He=i;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);wt===0&&(wt=5)}function $m(e,t){do{var i=yb(e.alternate,e);if(i!==null){i.flags&=32767,He=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){He=e;return}He=e=i}while(e!==null);wt=6,He=null}function Wm(e,t,i,s,o,u,h,b,E){e.cancelPendingCommit=null;do $l();while(Ut!==0);if((et&6)!==0)throw Error(l(327));if(t!==null){if(t===e.current)throw Error(l(177));if(u=t.lanes|t.childLanes,u|=mu,Jt(e,i,u,h,b,E),e===lt&&(He=lt=null,Pe=0),Cr=t,ni=e,Ua=i,wc=u,Ec=o,Pm=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,kb(Kt,function(){return ip(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=k.T,k.T=null,o=X.p,X.p=2,h=et,et|=4;try{vb(e,t,i)}finally{et=h,X.p=o,k.T=s}}Ut=1,ep(),tp(),np()}}function ep(){if(Ut===1){Ut=0;var e=ni,t=Cr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=k.T,k.T=null;var s=X.p;X.p=2;var o=et;et|=4;try{jm(t,e);var u=Bc,h=Hd(e.containerInfo),b=u.focusedElem,E=u.selectionRange;if(h!==b&&b&&b.ownerDocument&&qd(b.ownerDocument.documentElement,b)){if(E!==null&&uu(b)){var D=E.start,G=E.end;if(G===void 0&&(G=D),"selectionStart"in b)b.selectionStart=D,b.selectionEnd=Math.min(G,b.value.length);else{var I=b.ownerDocument||document,j=I&&I.defaultView||window;if(j.getSelection){var U=j.getSelection(),oe=b.textContent.length,Ce=Math.min(E.start,oe),st=E.end===void 0?Ce:Math.min(E.end,oe);!U.extend&&Ce>st&&(h=st,st=Ce,Ce=h);var O=Bd(b,Ce),C=Bd(b,st);if(O&&C&&(U.rangeCount!==1||U.anchorNode!==O.node||U.anchorOffset!==O.offset||U.focusNode!==C.node||U.focusOffset!==C.offset)){var M=I.createRange();M.setStart(O.node,O.offset),U.removeAllRanges(),Ce>st?(U.addRange(M),U.extend(C.node,C.offset)):(M.setEnd(C.node,C.offset),U.addRange(M))}}}}for(I=[],U=b;U=U.parentNode;)U.nodeType===1&&I.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<I.length;b++){var F=I[b];F.element.scrollLeft=F.left,F.element.scrollTop=F.top}}co=!!Uc,Bc=Uc=null}finally{et=o,X.p=s,k.T=i}}e.current=t,Ut=2}}function tp(){if(Ut===2){Ut=0;var e=ni,t=Cr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=k.T,k.T=null;var s=X.p;X.p=2;var o=et;et|=4;try{km(e,t.alternate,t)}finally{et=o,X.p=s,k.T=i}}Ut=3}}function np(){if(Ut===4||Ut===3){Ut=0,ia();var e=ni,t=Cr,i=Ua,s=Pm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ut=5:(Ut=0,Cr=ni=null,ap(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(ti=null),J(i),t=t.stateNode,ct&&typeof ct.onCommitFiberRoot=="function")try{ct.onCommitFiberRoot(va,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=k.T,o=X.p,X.p=2,k.T=null;try{for(var u=e.onRecoverableError,h=0;h<s.length;h++){var b=s[h];u(b.value,{componentStack:b.stack})}}finally{k.T=t,X.p=o}}(Ua&3)!==0&&$l(),ua(e),o=e.pendingLanes,(i&261930)!==0&&(o&42)!==0?e===Tc?Cs++:(Cs=0,Tc=e):Cs=0,Rs(0)}}function ap(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ls(t)))}function $l(){return ep(),tp(),np(),ip()}function ip(){if(Ut!==5)return!1;var e=ni,t=wc;wc=0;var i=J(Ua),s=k.T,o=X.p;try{X.p=32>i?32:i,k.T=null,i=Ec,Ec=null;var u=ni,h=Ua;if(Ut=0,Cr=ni=null,Ua=0,(et&6)!==0)throw Error(l(331));var b=et;if(et|=4,qm(u.current),Lm(u,u.current,h,i),et=b,Rs(0,!1),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot(va,u)}catch{}return!0}finally{X.p=o,k.T=s,ap(e,t)}}function rp(e,t,i){t=zn(i,t),t=nc(e.stateNode,t,2),e=Ia(e,t,2),e!==null&&(ut(e,2),ua(e))}function at(e,t,i){if(e.tag===3)rp(e,e,i);else for(;t!==null;){if(t.tag===3){rp(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ti===null||!ti.has(s))){e=zn(i,e),i=sm(2),s=Ia(t,i,2),s!==null&&(lm(i,s,t,e),ut(s,2),ua(s));break}}t=t.return}}function Rc(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new Sb;var o=new Set;s.set(t,o)}else o=s.get(t),o===void 0&&(o=new Set,s.set(t,o));o.has(i)||(bc=!0,o.add(i),e=Cb.bind(null,e,t,i),t.then(e,e))}function Cb(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,lt===e&&(Pe&i)===i&&(wt===4||wt===3&&(Pe&62914560)===Pe&&300>gt()-Yl?(et&2)===0&&Rr(e,0):xc|=i,Ar===Pe&&(Ar=0)),ua(e)}function sp(e,t){t===0&&(t=Tt()),e=Mi(e,t),e!==null&&(ut(e,t),ua(e))}function Rb(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),sp(e,i)}function _b(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,o=e.memoizedState;o!==null&&(i=o.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(l(314))}s!==null&&s.delete(t),sp(e,i)}function kb(e,t){return Ei(e,t)}var Wl=null,kr=null,_c=!1,eo=!1,kc=!1,ii=0;function ua(e){e!==kr&&e.next===null&&(kr===null?Wl=kr=e:kr=kr.next=e),eo=!0,_c||(_c=!0,Ob())}function Rs(e,t){if(!kc&&eo){kc=!0;do for(var i=!1,s=Wl;s!==null;){if(e!==0){var o=s.pendingLanes;if(o===0)var u=0;else{var h=s.suspendedLanes,b=s.pingedLanes;u=(1<<31-Lt(42|e)+1)-1,u&=o&~(h&~b),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(i=!0,cp(s,u))}else u=Pe,u=_e(s,s===lt?u:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(u&3)===0||ot(s,u)||(i=!0,cp(s,u));s=s.next}while(i);kc=!1}}function Nb(){lp()}function lp(){eo=_c=!1;var e=0;ii!==0&&Qb()&&(e=ii);for(var t=gt(),i=null,s=Wl;s!==null;){var o=s.next,u=op(s,t);u===0?(s.next=null,i===null?Wl=o:i.next=o,o===null&&(kr=i)):(i=s,(e!==0||(u&3)!==0)&&(eo=!0)),s=o}Ut!==0&&Ut!==5||Rs(e),ii!==0&&(ii=0)}function op(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var h=31-Lt(u),b=1<<h,E=o[h];E===-1?((b&i)===0||(b&s)!==0)&&(o[h]=Et(b,t)):E<=t&&(e.expiredLanes|=b),u&=~b}if(t=lt,i=Pe,i=_e(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(nt===2||nt===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Ti(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||ot(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Ti(s),J(i)){case 2:case 8:i=Qa;break;case 32:i=Kt;break;case 268435456:i=kn;break;default:i=Kt}return s=up.bind(null,e),i=Ei(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Ti(s),e.callbackPriority=2,e.callbackNode=null,2}function up(e,t){if(Ut!==0&&Ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if($l()&&e.callbackNode!==i)return null;var s=Pe;return s=_e(e,e===lt?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Km(e,s,t),op(e,gt()),e.callbackNode!=null&&e.callbackNode===i?up.bind(null,e):null)}function cp(e,t){if($l())return null;Km(e,t,!0)}function Ob(){Gb(function(){(et&6)!==0?Ei(ra,Nb):lp()})}function Nc(){if(ii===0){var e=mr;e===0&&(e=Xn,Xn<<=1,(Xn&261888)===0&&(Xn=256)),ii=e}return ii}function fp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ol(""+e)}function dp(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function Mb(e,t,i,s,o){if(t==="submit"&&i&&i.stateNode===o){var u=fp((o[le]||null).action),h=s.submitter;h&&(t=(t=h[le]||null)?fp(t.formAction):h.getAttribute("formAction"),t!==null&&(u=t,h=null));var b=new dl("action","action",null,s,o);e.push({event:b,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(ii!==0){var E=h?dp(o,h):new FormData(o);Zu(i,{pending:!0,data:E,method:o.method,action:u},null,E)}}else typeof u=="function"&&(b.preventDefault(),E=h?dp(o,h):new FormData(o),Zu(i,{pending:!0,data:E,method:o.method,action:u},u,E))},currentTarget:o}]})}}for(var Oc=0;Oc<hu.length;Oc++){var Mc=hu[Oc],Db=Mc.toLowerCase(),jb=Mc[0].toUpperCase()+Mc.slice(1);Wn(Db,"on"+jb)}Wn(Gd,"onAnimationEnd"),Wn(Kd,"onAnimationIteration"),Wn(Vd,"onAnimationStart"),Wn("dblclick","onDoubleClick"),Wn("focusin","onFocus"),Wn("focusout","onBlur"),Wn(Z0,"onTransitionRun"),Wn(J0,"onTransitionStart"),Wn($0,"onTransitionCancel"),Wn(Yd,"onTransitionEnd"),Mn("onMouseEnter",["mouseout","mouseover"]),Mn("onMouseLeave",["mouseout","mouseover"]),Mn("onPointerEnter",["pointerout","pointerover"]),Mn("onPointerLeave",["pointerout","pointerover"]),Jn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _s="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(" "),zb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_s));function hp(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],o=s.event;s=s.listeners;e:{var u=void 0;if(t)for(var h=s.length-1;0<=h;h--){var b=s[h],E=b.instance,D=b.currentTarget;if(b=b.listener,E!==u&&o.isPropagationStopped())break e;u=b,o.currentTarget=D;try{u(o)}catch(G){pl(G)}o.currentTarget=null,u=E}else for(h=0;h<s.length;h++){if(b=s[h],E=b.instance,D=b.currentTarget,b=b.listener,E!==u&&o.isPropagationStopped())break e;u=b,o.currentTarget=D;try{u(o)}catch(G){pl(G)}o.currentTarget=null,u=E}}}}function Qe(e,t){var i=t[Ae];i===void 0&&(i=t[Ae]=new Set);var s=e+"__bubble";i.has(s)||(mp(t,e,2,!1),i.add(s))}function Dc(e,t,i){var s=0;t&&(s|=4),mp(i,e,s,t)}var to="_reactListening"+Math.random().toString(36).slice(2);function jc(e){if(!e[to]){e[to]=!0,Zn.forEach(function(i){i!=="selectionchange"&&(zb.has(i)||Dc(i,!1,e),Dc(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[to]||(t[to]=!0,Dc("selectionchange",!1,t))}}function mp(e,t,i,s){switch(Gp(t)){case 2:var o=u1;break;case 8:o=c1;break;default:o=Ic}i=o.bind(null,t,i,e),o=void 0,!eu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),s?o!==void 0?e.addEventListener(t,i,{capture:!0,passive:o}):e.addEventListener(t,i,!0):o!==void 0?e.addEventListener(t,i,{passive:o}):e.addEventListener(t,i,!1)}function zc(e,t,i,s,o){var u=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var h=s.tag;if(h===3||h===4){var b=s.stateNode.containerInfo;if(b===o)break;if(h===4)for(h=s.return;h!==null;){var E=h.tag;if((E===3||E===4)&&h.stateNode.containerInfo===o)return;h=h.return}for(;b!==null;){if(h=xt(b),h===null)return;if(E=h.tag,E===5||E===6||E===26||E===27){s=u=h;continue e}b=b.parentNode}}s=s.return}bd(function(){var D=u,G=$o(i),I=[];e:{var j=Fd.get(e);if(j!==void 0){var U=dl,oe=e;switch(e){case"keypress":if(cl(i)===0)break e;case"keydown":case"keyup":U=_0;break;case"focusin":oe="focus",U=iu;break;case"focusout":oe="blur",U=iu;break;case"beforeblur":case"afterblur":U=iu;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":U=wd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=g0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=O0;break;case Gd:case Kd:case Vd:U=b0;break;case Yd:U=D0;break;case"scroll":case"scrollend":U=m0;break;case"wheel":U=z0;break;case"copy":case"cut":case"paste":U=S0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=Td;break;case"toggle":case"beforetoggle":U=U0}var Ce=(t&4)!==0,st=!Ce&&(e==="scroll"||e==="scrollend"),O=Ce?j!==null?j+"Capture":null:j;Ce=[];for(var C=D,M;C!==null;){var F=C;if(M=F.stateNode,F=F.tag,F!==5&&F!==26&&F!==27||M===null||O===null||(F=Zr(C,O),F!=null&&Ce.push(ks(C,F,M))),st)break;C=C.return}0<Ce.length&&(j=new U(j,oe,null,i,G),I.push({event:j,listeners:Ce}))}}if((t&7)===0){e:{if(j=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",j&&i!==Jo&&(oe=i.relatedTarget||i.fromElement)&&(xt(oe)||oe[ge]))break e;if((U||j)&&(j=G.window===G?G:(j=G.ownerDocument)?j.defaultView||j.parentWindow:window,U?(oe=i.relatedTarget||i.toElement,U=D,oe=oe?xt(oe):null,oe!==null&&(st=f(oe),Ce=oe.tag,oe!==st||Ce!==5&&Ce!==27&&Ce!==6)&&(oe=null)):(U=null,oe=D),U!==oe)){if(Ce=wd,F="onMouseLeave",O="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(Ce=Td,F="onPointerLeave",O="onPointerEnter",C="pointer"),st=U==null?j:Ht(U),M=oe==null?j:Ht(oe),j=new Ce(F,C+"leave",U,i,G),j.target=st,j.relatedTarget=M,F=null,xt(G)===D&&(Ce=new Ce(O,C+"enter",oe,i,G),Ce.target=M,Ce.relatedTarget=st,F=Ce),st=F,U&&oe)t:{for(Ce=Lb,O=U,C=oe,M=0,F=O;F;F=Ce(F))M++;F=0;for(var we=C;we;we=Ce(we))F++;for(;0<M-F;)O=Ce(O),M--;for(;0<F-M;)C=Ce(C),F--;for(;M--;){if(O===C||C!==null&&O===C.alternate){Ce=O;break t}O=Ce(O),C=Ce(C)}Ce=null}else Ce=null;U!==null&&pp(I,j,U,Ce,!1),oe!==null&&st!==null&&pp(I,st,oe,Ce,!0)}}e:{if(j=D?Ht(D):window,U=j.nodeName&&j.nodeName.toLowerCase(),U==="select"||U==="input"&&j.type==="file")var $e=Md;else if(Nd(j))if(Dd)$e=F0;else{$e=V0;var pe=K0}else U=j.nodeName,!U||U.toLowerCase()!=="input"||j.type!=="checkbox"&&j.type!=="radio"?D&&Zo(D.elementType)&&($e=Md):$e=Y0;if($e&&($e=$e(e,D))){Od(I,$e,i,G);break e}pe&&pe(e,j,D),e==="focusout"&&D&&j.type==="number"&&D.memoizedProps.value!=null&&Io(j,"number",j.value)}switch(pe=D?Ht(D):window,e){case"focusin":(Nd(pe)||pe.contentEditable==="true")&&(sr=pe,cu=D,is=null);break;case"focusout":is=cu=sr=null;break;case"mousedown":fu=!0;break;case"contextmenu":case"mouseup":case"dragend":fu=!1,Qd(I,i,G);break;case"selectionchange":if(I0)break;case"keydown":case"keyup":Qd(I,i,G)}var je;if(su)e:{switch(e){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else rr?_d(e,i)&&(Ge="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ge="onCompositionStart");Ge&&(Ad&&i.locale!=="ko"&&(rr||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&rr&&(je=xd()):(Pa=G,tu="value"in Pa?Pa.value:Pa.textContent,rr=!0)),pe=no(D,Ge),0<pe.length&&(Ge=new Ed(Ge,e,null,i,G),I.push({event:Ge,listeners:pe}),je?Ge.data=je:(je=kd(i),je!==null&&(Ge.data=je)))),(je=q0?H0(e,i):Q0(e,i))&&(Ge=no(D,"onBeforeInput"),0<Ge.length&&(pe=new Ed("onBeforeInput","beforeinput",null,i,G),I.push({event:pe,listeners:Ge}),pe.data=je)),Mb(I,e,D,i,G)}hp(I,t)})}function ks(e,t,i){return{instance:e,listener:t,currentTarget:i}}function no(e,t){for(var i=t+"Capture",s=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=Zr(e,i),o!=null&&s.unshift(ks(e,o,u)),o=Zr(e,t),o!=null&&s.push(ks(e,o,u))),e.tag===3)return s;e=e.return}return[]}function Lb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function pp(e,t,i,s,o){for(var u=t._reactName,h=[];i!==null&&i!==s;){var b=i,E=b.alternate,D=b.stateNode;if(b=b.tag,E!==null&&E===s)break;b!==5&&b!==26&&b!==27||D===null||(E=D,o?(D=Zr(i,u),D!=null&&h.unshift(ks(i,D,E))):o||(D=Zr(i,u),D!=null&&h.push(ks(i,D,E)))),i=i.return}h.length!==0&&e.push({event:t,listeners:h})}var Ub=/\r\n?/g,Bb=/\u0000|\uFFFD/g;function gp(e){return(typeof e=="string"?e:""+e).replace(Ub,`
10
+ `).replace(Bb,"")}function yp(e,t){return t=gp(t),gp(e)===t}function rt(e,t,i,s,o,u){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||nr(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&nr(e,""+s);break;case"className":$n(e,"class",s);break;case"tabIndex":$n(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":$n(e,i,s);break;case"style":yd(e,s,u);break;case"data":if(t!=="object"){$n(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=ol(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(i,"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 u=="function"&&(i==="formAction"?(t!=="input"&&rt(e,t,"name",o.name,o,null),rt(e,t,"formEncType",o.formEncType,o,null),rt(e,t,"formMethod",o.formMethod,o,null),rt(e,t,"formTarget",o.formTarget,o,null)):(rt(e,t,"encType",o.encType,o,null),rt(e,t,"method",o.method,o,null),rt(e,t,"target",o.target,o,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=ol(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=wa);break;case"onScroll":s!=null&&Qe("scroll",e);break;case"onScrollEnd":s!=null&&Qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(i=s.__html,i!=null){if(o.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=ol(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):e.removeAttribute(i);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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":Qe("beforetoggle",e),Qe("toggle",e),At(e,"popover",s);break;case"xlinkActuate":Vt(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Vt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Vt(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Vt(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Vt(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Vt(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":At(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=d0.get(i)||i,At(e,i,s))}}function Lc(e,t,i,s,o,u){switch(i){case"style":yd(e,s,u);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(i=s.__html,i!=null){if(o.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"children":typeof s=="string"?nr(e,s):(typeof s=="number"||typeof s=="bigint")&&nr(e,""+s);break;case"onScroll":s!=null&&Qe("scroll",e);break;case"onScrollEnd":s!=null&&Qe("scrollend",e);break;case"onClick":s!=null&&(e.onclick=wa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bn.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(o=i.endsWith("Capture"),t=i.slice(2,o?i.length-7:void 0),u=e[le]||null,u=u!=null?u[i]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof s=="function")){typeof u!="function"&&u!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,o);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):At(e,i,s)}}}function It(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",e),Qe("load",e);var s=!1,o=!1,u;for(u in i)if(i.hasOwnProperty(u)){var h=i[u];if(h!=null)switch(u){case"src":s=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:rt(e,t,u,h,i,null)}}o&&rt(e,t,"srcSet",i.srcSet,i,null),s&&rt(e,t,"src",i.src,i,null);return;case"input":Qe("invalid",e);var b=u=h=o=null,E=null,D=null;for(s in i)if(i.hasOwnProperty(s)){var G=i[s];if(G!=null)switch(s){case"name":o=G;break;case"type":h=G;break;case"checked":E=G;break;case"defaultChecked":D=G;break;case"value":u=G;break;case"defaultValue":b=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(l(137,t));break;default:rt(e,t,s,G,i,null)}}hd(e,u,b,E,D,h,o,!1);return;case"select":Qe("invalid",e),s=h=u=null;for(o in i)if(i.hasOwnProperty(o)&&(b=i[o],b!=null))switch(o){case"value":u=b;break;case"defaultValue":h=b;break;case"multiple":s=b;default:rt(e,t,o,b,i,null)}t=u,i=h,e.multiple=!!s,t!=null?tr(e,!!s,t,!1):i!=null&&tr(e,!!s,i,!0);return;case"textarea":Qe("invalid",e),u=o=s=null;for(h in i)if(i.hasOwnProperty(h)&&(b=i[h],b!=null))switch(h){case"value":s=b;break;case"defaultValue":o=b;break;case"children":u=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(l(91));break;default:rt(e,t,h,b,i,null)}pd(e,s,o,u);return;case"option":for(E in i)i.hasOwnProperty(E)&&(s=i[E],s!=null)&&(E==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":rt(e,t,E,s,i,null));return;case"dialog":Qe("beforetoggle",e),Qe("toggle",e),Qe("cancel",e),Qe("close",e);break;case"iframe":case"object":Qe("load",e);break;case"video":case"audio":for(s=0;s<_s.length;s++)Qe(_s[s],e);break;case"image":Qe("error",e),Qe("load",e);break;case"details":Qe("toggle",e);break;case"embed":case"source":case"link":Qe("error",e),Qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in i)if(i.hasOwnProperty(D)&&(s=i[D],s!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:rt(e,t,D,s,i,null)}return;default:if(Zo(t)){for(G in i)i.hasOwnProperty(G)&&(s=i[G],s!==void 0&&Lc(e,t,G,s,i,void 0));return}}for(b in i)i.hasOwnProperty(b)&&(s=i[b],s!=null&&rt(e,t,b,s,i,null))}function qb(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,h=null,b=null,E=null,D=null,G=null;for(U in i){var I=i[U];if(i.hasOwnProperty(U)&&I!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":E=I;default:s.hasOwnProperty(U)||rt(e,t,U,null,s,I)}}for(var j in s){var U=s[j];if(I=i[j],s.hasOwnProperty(j)&&(U!=null||I!=null))switch(j){case"type":u=U;break;case"name":o=U;break;case"checked":D=U;break;case"defaultChecked":G=U;break;case"value":h=U;break;case"defaultValue":b=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(l(137,t));break;default:U!==I&&rt(e,t,j,U,s,I)}}Xo(e,h,b,E,D,G,u,o);return;case"select":U=h=b=j=null;for(u in i)if(E=i[u],i.hasOwnProperty(u)&&E!=null)switch(u){case"value":break;case"multiple":U=E;default:s.hasOwnProperty(u)||rt(e,t,u,null,s,E)}for(o in s)if(u=s[o],E=i[o],s.hasOwnProperty(o)&&(u!=null||E!=null))switch(o){case"value":j=u;break;case"defaultValue":b=u;break;case"multiple":h=u;default:u!==E&&rt(e,t,o,u,s,E)}t=b,i=h,s=U,j!=null?tr(e,!!i,j,!1):!!s!=!!i&&(t!=null?tr(e,!!i,t,!0):tr(e,!!i,i?[]:"",!1));return;case"textarea":U=j=null;for(b in i)if(o=i[b],i.hasOwnProperty(b)&&o!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:rt(e,t,b,null,s,o)}for(h in s)if(o=s[h],u=i[h],s.hasOwnProperty(h)&&(o!=null||u!=null))switch(h){case"value":j=o;break;case"defaultValue":U=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(l(91));break;default:o!==u&&rt(e,t,h,o,s,u)}md(e,j,U);return;case"option":for(var oe in i)j=i[oe],i.hasOwnProperty(oe)&&j!=null&&!s.hasOwnProperty(oe)&&(oe==="selected"?e.selected=!1:rt(e,t,oe,null,s,j));for(E in s)j=s[E],U=i[E],s.hasOwnProperty(E)&&j!==U&&(j!=null||U!=null)&&(E==="selected"?e.selected=j&&typeof j!="function"&&typeof j!="symbol":rt(e,t,E,j,s,U));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 Ce in i)j=i[Ce],i.hasOwnProperty(Ce)&&j!=null&&!s.hasOwnProperty(Ce)&&rt(e,t,Ce,null,s,j);for(D in s)if(j=s[D],U=i[D],s.hasOwnProperty(D)&&j!==U&&(j!=null||U!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(l(137,t));break;default:rt(e,t,D,j,s,U)}return;default:if(Zo(t)){for(var st in i)j=i[st],i.hasOwnProperty(st)&&j!==void 0&&!s.hasOwnProperty(st)&&Lc(e,t,st,void 0,s,j);for(G in s)j=s[G],U=i[G],!s.hasOwnProperty(G)||j===U||j===void 0&&U===void 0||Lc(e,t,G,j,s,U);return}}for(var O in i)j=i[O],i.hasOwnProperty(O)&&j!=null&&!s.hasOwnProperty(O)&&rt(e,t,O,null,s,j);for(I in s)j=s[I],U=i[I],!s.hasOwnProperty(I)||j===U||j==null&&U==null||rt(e,t,I,j,s,U)}function vp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Hb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var o=i[s],u=o.transferSize,h=o.initiatorType,b=o.duration;if(u&&b&&vp(h)){for(h=0,b=o.responseEnd,s+=1;s<i.length;s++){var E=i[s],D=E.startTime;if(D>b)break;var G=E.transferSize,I=E.initiatorType;G&&vp(I)&&(E=E.responseEnd,h+=G*(E<b?1:(b-D)/(E-D)))}if(--s,t+=8*(u+h)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Uc=null,Bc=null;function ao(e){return e.nodeType===9?e:e.ownerDocument}function bp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function xp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function qc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Hc=null;function Qb(){var e=window.event;return e&&e.type==="popstate"?e===Hc?!1:(Hc=e,!0):(Hc=null,!1)}var Sp=typeof setTimeout=="function"?setTimeout:void 0,Pb=typeof clearTimeout=="function"?clearTimeout:void 0,wp=typeof Promise=="function"?Promise:void 0,Gb=typeof queueMicrotask=="function"?queueMicrotask:typeof wp<"u"?function(e){return wp.resolve(null).then(e).catch(Kb)}:Sp;function Kb(e){setTimeout(function(){throw e})}function ri(e){return e==="head"}function Ep(e,t){var i=t,s=0;do{var o=i.nextSibling;if(e.removeChild(i),o&&o.nodeType===8)if(i=o.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(o),Dr(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Ns(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Ns(i);for(var u=i.firstChild;u;){var h=u.nextSibling,b=u.nodeName;u[yt]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&u.rel.toLowerCase()==="stylesheet"||i.removeChild(u),u=h}}else i==="body"&&Ns(e.ownerDocument.body);i=o}while(i);Dr(t)}function Tp(e,t){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function Qc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Qc(i),bt(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function Vb(e,t,i,s){for(;e.nodeType===1;){var o=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[yt])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Hn(e.nextSibling),e===null)break}return null}function Yb(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Hn(e.nextSibling),e===null))return null;return e}function Ap(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Hn(e.nextSibling),e===null))return null;return e}function Pc(e){return e.data==="$?"||e.data==="$~"}function Gc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Fb(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Hn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Kc=null;function Cp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Hn(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Rp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function _p(e,t,i){switch(t=ao(i),e){case"html":if(e=t.documentElement,!e)throw Error(l(452));return e;case"head":if(e=t.head,!e)throw Error(l(453));return e;case"body":if(e=t.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function Ns(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bt(e)}var Qn=new Map,kp=new Set;function io(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ba=X.d;X.d={f:Xb,r:Ib,D:Zb,C:Jb,L:$b,m:Wb,X:t1,S:e1,M:n1};function Xb(){var e=Ba.f(),t=Il();return e||t}function Ib(e){var t=Ve(e);t!==null&&t.tag===5&&t.type==="form"?Yh(t):Ba.r(e)}var Nr=typeof document>"u"?null:document;function Np(e,t,i){var s=Nr;if(s&&typeof t=="string"&&t){var o=Dn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof i=="string"&&(o+='[crossorigin="'+i+'"]'),kp.has(o)||(kp.add(o),e={rel:e,crossOrigin:i,href:t},s.querySelector(o)===null&&(t=s.createElement("link"),It(t,"link",e),mt(t),s.head.appendChild(t)))}}function Zb(e){Ba.D(e),Np("dns-prefetch",e,null)}function Jb(e,t){Ba.C(e,t),Np("preconnect",e,t)}function $b(e,t,i){Ba.L(e,t,i);var s=Nr;if(s&&e&&t){var o='link[rel="preload"][as="'+Dn(t)+'"]';t==="image"&&i&&i.imageSrcSet?(o+='[imagesrcset="'+Dn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(o+='[imagesizes="'+Dn(i.imageSizes)+'"]')):o+='[href="'+Dn(e)+'"]';var u=o;switch(t){case"style":u=Or(e);break;case"script":u=Mr(e)}Qn.has(u)||(e=y({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Qn.set(u,e),s.querySelector(o)!==null||t==="style"&&s.querySelector(Os(u))||t==="script"&&s.querySelector(Ms(u))||(t=s.createElement("link"),It(t,"link",e),mt(t),s.head.appendChild(t)))}}function Wb(e,t){Ba.m(e,t);var i=Nr;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Dn(s)+'"][href="'+Dn(e)+'"]',u=o;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Mr(e)}if(!Qn.has(u)&&(e=y({rel:"modulepreload",href:e},t),Qn.set(u,e),i.querySelector(o)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ms(u)))return}s=i.createElement("link"),It(s,"link",e),mt(s),i.head.appendChild(s)}}}function e1(e,t,i){Ba.S(e,t,i);var s=Nr;if(s&&e){var o=un(s).hoistableStyles,u=Or(e);t=t||"default";var h=o.get(u);if(!h){var b={loading:0,preload:null};if(h=s.querySelector(Os(u)))b.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Qn.get(u))&&Vc(e,i);var E=h=s.createElement("link");mt(E),It(E,"link",e),E._p=new Promise(function(D,G){E.onload=D,E.onerror=G}),E.addEventListener("load",function(){b.loading|=1}),E.addEventListener("error",function(){b.loading|=2}),b.loading|=4,ro(h,t,s)}h={type:"stylesheet",instance:h,count:1,state:b},o.set(u,h)}}}function t1(e,t){Ba.X(e,t);var i=Nr;if(i&&e){var s=un(i).hoistableScripts,o=Mr(e),u=s.get(o);u||(u=i.querySelector(Ms(o)),u||(e=y({src:e,async:!0},t),(t=Qn.get(o))&&Yc(e,t),u=i.createElement("script"),mt(u),It(u,"link",e),i.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(o,u))}}function n1(e,t){Ba.M(e,t);var i=Nr;if(i&&e){var s=un(i).hoistableScripts,o=Mr(e),u=s.get(o);u||(u=i.querySelector(Ms(o)),u||(e=y({src:e,async:!0,type:"module"},t),(t=Qn.get(o))&&Yc(e,t),u=i.createElement("script"),mt(u),It(u,"link",e),i.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(o,u))}}function Op(e,t,i,s){var o=(o=$.current)?io(o):null;if(!o)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Or(i.href),i=un(o).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Or(i.href);var u=un(o).hoistableStyles,h=u.get(e);if(h||(o=o.ownerDocument||o,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=o.querySelector(Os(e)))&&!u._p&&(h.instance=u,h.state.loading=5),Qn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Qn.set(e,i),u||a1(o,e,i,h.state))),t&&s===null)throw Error(l(528,""));return h}if(t&&s!==null)throw Error(l(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Mr(i),i=un(o).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Or(e){return'href="'+Dn(e)+'"'}function Os(e){return'link[rel="stylesheet"]['+e+"]"}function Mp(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function a1(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),It(t,"link",i),mt(t),e.head.appendChild(t))}function Mr(e){return'[src="'+Dn(e)+'"]'}function Ms(e){return"script[async]"+e}function Dp(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Dn(i.href)+'"]');if(s)return t.instance=s,mt(s),s;var o=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),mt(s),It(s,"style",o),ro(s,i.precedence,e),t.instance=s;case"stylesheet":o=Or(i.href);var u=e.querySelector(Os(o));if(u)return t.state.loading|=4,t.instance=u,mt(u),u;s=Mp(i),(o=Qn.get(o))&&Vc(s,o),u=(e.ownerDocument||e).createElement("link"),mt(u);var h=u;return h._p=new Promise(function(b,E){h.onload=b,h.onerror=E}),It(u,"link",s),t.state.loading|=4,ro(u,i.precedence,e),t.instance=u;case"script":return u=Mr(i.src),(o=e.querySelector(Ms(u)))?(t.instance=o,mt(o),o):(s=i,(o=Qn.get(u))&&(s=y({},i),Yc(s,o)),e=e.ownerDocument||e,o=e.createElement("script"),mt(o),It(o,"link",s),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(l(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,ro(s,i.precedence,e));return t.instance}function ro(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=s.length?s[s.length-1]:null,u=o,h=0;h<s.length;h++){var b=s[h];if(b.dataset.precedence===t)u=b;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Vc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Yc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var so=null;function jp(e,t,i){if(so===null){var s=new Map,o=so=new Map;o.set(i,s)}else o=so,s=o.get(i),s||(s=new Map,o.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),o=0;o<i.length;o++){var u=i[o];if(!(u[yt]||u[re]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var h=u.getAttribute(t)||"";h=e+h;var b=s.get(h);b?b.push(u):s.set(h,[u])}}return s}function zp(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function i1(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Lp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function r1(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var o=Or(s.href),u=t.querySelector(Os(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=lo.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=u,mt(u);return}u=t.ownerDocument||t,s=Mp(s),(o=Qn.get(o))&&Vc(s,o),u=u.createElement("link"),mt(u);var h=u;h._p=new Promise(function(b,E){h.onload=b,h.onerror=E}),It(u,"link",s),i.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=lo.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Fc=0;function s1(e,t){return e.stylesheets&&e.count===0&&uo(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&uo(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Fc===0&&(Fc=62500*Hb());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&uo(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Fc?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(o)}}:null}function lo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)uo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var oo=null;function uo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oo=new Map,t.forEach(l1,e),oo=null,lo.call(e))}function l1(e,t){if(!(t.state.loading&4)){var i=oo.get(e);if(i)var s=i.get(null);else{i=new Map,oo.set(e,i);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var h=o[u];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(i.set(h.dataset.precedence,h),s=h)}s&&i.set(null,s)}o=t.instance,h=o.getAttribute("data-precedence"),u=i.get(h)||s,u===s&&i.set(null,o),i.set(h,o),this.count++,s=lo.bind(this),o.addEventListener("load",s),o.addEventListener("error",s),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Ds={$$typeof:W,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function o1(e,t,i,s,o,u,h,b,E){this.tag=1,this.containerInfo=e,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=vn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vn(0),this.hiddenUpdates=vn(null),this.identifierPrefix=s,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Up(e,t,i,s,o,u,h,b,E,D,G,I){return e=new o1(e,t,i,h,E,D,G,I,b),t=1,u===!0&&(t|=24),u=Sn(3,null,null,t),e.current=u,u.stateNode=e,t=Cu(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:s,isDehydrated:i,cache:t},Nu(u),e}function Bp(e){return e?(e=ur,e):ur}function qp(e,t,i,s,o,u){o=Bp(o),s.context===null?s.context=o:s.pendingContext=o,s=Xa(t),s.payload={element:i},u=u===void 0?null:u,u!==null&&(s.callback=u),i=Ia(e,s,t),i!==null&&(pn(i,e,t),fs(i,e,t))}function Hp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Xc(e,t){Hp(e,t),(e=e.alternate)&&Hp(e,t)}function Qp(e){if(e.tag===13||e.tag===31){var t=Mi(e,67108864);t!==null&&pn(t,e,67108864),Xc(e,67108864)}}function Pp(e){if(e.tag===13||e.tag===31){var t=Cn();t=z(t);var i=Mi(e,t);i!==null&&pn(i,e,t),Xc(e,t)}}var co=!0;function u1(e,t,i,s){var o=k.T;k.T=null;var u=X.p;try{X.p=2,Ic(e,t,i,s)}finally{X.p=u,k.T=o}}function c1(e,t,i,s){var o=k.T;k.T=null;var u=X.p;try{X.p=8,Ic(e,t,i,s)}finally{X.p=u,k.T=o}}function Ic(e,t,i,s){if(co){var o=Zc(s);if(o===null)zc(e,t,s,fo,i),Kp(e,s);else if(d1(o,e,t,i,s))s.stopPropagation();else if(Kp(e,s),t&4&&-1<f1.indexOf(e)){for(;o!==null;){var u=Ve(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=On(u.pendingLanes);if(h!==0){var b=u;for(b.pendingLanes|=2,b.entangledLanes|=2;h;){var E=1<<31-Lt(h);b.entanglements[1]|=E,h&=~E}ua(u),(et&6)===0&&(Fl=gt()+500,Rs(0))}}break;case 31:case 13:b=Mi(u,2),b!==null&&pn(b,u,2),Il(),Xc(u,2)}if(u=Zc(s),u===null&&zc(e,t,s,fo,i),u===o)break;o=u}o!==null&&s.stopPropagation()}else zc(e,t,s,null,i)}}function Zc(e){return e=$o(e),Jc(e)}var fo=null;function Jc(e){if(fo=null,e=xt(e),e!==null){var t=f(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=d(t),e!==null)return e;e=null}else if(i===31){if(e=m(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fo=e,null}function Gp(e){switch(e){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(ya()){case ra:return 2;case Qa:return 8;case Kt:case tn:return 32;case kn:return 268435456;default:return 32}default:return 32}}var $c=!1,si=null,li=null,oi=null,js=new Map,zs=new Map,ui=[],f1="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 Kp(e,t){switch(e){case"focusin":case"focusout":si=null;break;case"dragenter":case"dragleave":li=null;break;case"mouseover":case"mouseout":oi=null;break;case"pointerover":case"pointerout":js.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zs.delete(t.pointerId)}}function Ls(e,t,i,s,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:u,targetContainers:[o]},t!==null&&(t=Ve(t),t!==null&&Qp(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function d1(e,t,i,s,o){switch(t){case"focusin":return si=Ls(si,e,t,i,s,o),!0;case"dragenter":return li=Ls(li,e,t,i,s,o),!0;case"mouseover":return oi=Ls(oi,e,t,i,s,o),!0;case"pointerover":var u=o.pointerId;return js.set(u,Ls(js.get(u)||null,e,t,i,s,o)),!0;case"gotpointercapture":return u=o.pointerId,zs.set(u,Ls(zs.get(u)||null,e,t,i,s,o)),!0}return!1}function Vp(e){var t=xt(e.target);if(t!==null){var i=f(t);if(i!==null){if(t=i.tag,t===13){if(t=d(i),t!==null){e.blockedOn=t,ve(e.priority,function(){Pp(i)});return}}else if(t===31){if(t=m(i),t!==null){e.blockedOn=t,ve(e.priority,function(){Pp(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ho(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Zc(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Jo=s,i.target.dispatchEvent(s),Jo=null}else return t=Ve(i),t!==null&&Qp(t),e.blockedOn=i,!1;t.shift()}return!0}function Yp(e,t,i){ho(e)&&i.delete(t)}function h1(){$c=!1,si!==null&&ho(si)&&(si=null),li!==null&&ho(li)&&(li=null),oi!==null&&ho(oi)&&(oi=null),js.forEach(Yp),zs.forEach(Yp)}function mo(e,t){e.blockedOn===t&&(e.blockedOn=null,$c||($c=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,h1)))}var po=null;function Fp(e){po!==e&&(po=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){po===e&&(po=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],o=e[t+2];if(typeof s!="function"){if(Jc(s||i)===null)continue;break}var u=Ve(i);u!==null&&(e.splice(t,3),t-=3,Zu(u,{pending:!0,data:o,method:i.method,action:s},s,o))}}))}function Dr(e){function t(E){return mo(E,e)}si!==null&&mo(si,e),li!==null&&mo(li,e),oi!==null&&mo(oi,e),js.forEach(t),zs.forEach(t);for(var i=0;i<ui.length;i++){var s=ui[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ui.length&&(i=ui[0],i.blockedOn===null);)Vp(i),i.blockedOn===null&&ui.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var o=i[s],u=i[s+1],h=o[le]||null;if(typeof u=="function")h||Fp(i);else if(h){var b=null;if(u&&u.hasAttribute("formAction")){if(o=u,h=u[le]||null)b=h.formAction;else if(Jc(o)!==null)continue}else b=h.action;typeof b=="function"?i[s+1]=b:(i.splice(s,3),s-=3),Fp(i)}}}function Xp(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Wc(e){this._internalRoot=e}go.prototype.render=Wc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));var i=t.current,s=Cn();qp(i,s,e,t,null,null)},go.prototype.unmount=Wc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;qp(e.current,2,null,e,null,null),Il(),t[ge]=null}};function go(e){this._internalRoot=e}go.prototype.unstable_scheduleHydration=function(e){if(e){var t=te();e={blockedOn:null,target:e,priority:t};for(var i=0;i<ui.length&&t!==0&&t<ui[i].priority;i++);ui.splice(i,0,e),i===0&&Vp(e)}};var Ip=a.version;if(Ip!=="19.2.4")throw Error(l(527,Ip,"19.2.4"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=p(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var m1={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yo.isDisabled&&yo.supportsFiber)try{va=yo.inject(m1),ct=yo}catch{}}return Bs.createRoot=function(e,t){if(!c(e))throw Error(l(299));var i=!1,s="",o=nm,u=am,h=im;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Up(e,1,!1,null,null,i,s,null,o,u,h,Xp),e[ge]=t.current,jc(e),new Wc(t)},Bs.hydrateRoot=function(e,t,i){if(!c(e))throw Error(l(299));var s=!1,o="",u=nm,h=am,b=im,E=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(o=i.identifierPrefix),i.onUncaughtError!==void 0&&(u=i.onUncaughtError),i.onCaughtError!==void 0&&(h=i.onCaughtError),i.onRecoverableError!==void 0&&(b=i.onRecoverableError),i.formState!==void 0&&(E=i.formState)),t=Up(e,1,!0,t,i??null,s,o,E,u,h,b,Xp),t.context=Bp(null),i=t.current,s=Cn(),s=z(s),o=Xa(s),o.callback=null,Ia(i,o,s),i=s,t.current.lanes=i,ut(t,i),ua(t),e[ge]=t.current,jc(e),new go(t)},Bs.version="19.2.4",Bs}var rg;function A1(){if(rg)return nf.exports;rg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),nf.exports=T1(),nf.exports}var C1=A1(),Kr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},R1={setTimeout:(n,a)=>setTimeout(n,a),clearTimeout:n=>clearTimeout(n),setInterval:(n,a)=>setInterval(n,a),clearInterval:n=>clearInterval(n)},_1=class{#e=R1;#t=!1;setTimeoutProvider(n){this.#e=n}setTimeout(n,a){return this.#e.setTimeout(n,a)}clearTimeout(n){this.#e.clearTimeout(n)}setInterval(n,a){return this.#e.setInterval(n,a)}clearInterval(n){this.#e.clearInterval(n)}},Fi=new _1;function k1(n){setTimeout(n,0)}var Ii=typeof window>"u"||"Deno"in globalThis;function an(){}function N1(n,a){return typeof n=="function"?n(a):n}function bf(n){return typeof n=="number"&&n>=0&&n!==1/0}function vy(n,a){return Math.max(n+(a||0)-Date.now(),0)}function gi(n,a){return typeof n=="function"?n(a):n}function Gn(n,a){return typeof n=="function"?n(a):n}function sg(n,a){const{type:r="all",exact:l,fetchStatus:c,predicate:f,queryKey:d,stale:m}=n;if(d){if(l){if(a.queryHash!==Gf(d,a.options))return!1}else if(!Is(a.queryKey,d))return!1}if(r!=="all"){const g=a.isActive();if(r==="active"&&!g||r==="inactive"&&g)return!1}return!(typeof m=="boolean"&&a.isStale()!==m||c&&c!==a.state.fetchStatus||f&&!f(a))}function lg(n,a){const{exact:r,status:l,predicate:c,mutationKey:f}=n;if(f){if(!a.options.mutationKey)return!1;if(r){if(Zi(a.options.mutationKey)!==Zi(f))return!1}else if(!Is(a.options.mutationKey,f))return!1}return!(l&&a.state.status!==l||c&&!c(a))}function Gf(n,a){return(a?.queryKeyHashFn||Zi)(n)}function Zi(n){return JSON.stringify(n,(a,r)=>xf(r)?Object.keys(r).sort().reduce((l,c)=>(l[c]=r[c],l),{}):r)}function Is(n,a){return n===a?!0:typeof n!=typeof a?!1:n&&a&&typeof n=="object"&&typeof a=="object"?Object.keys(a).every(r=>Is(n[r],a[r])):!1}var O1=Object.prototype.hasOwnProperty;function by(n,a,r=0){if(n===a)return n;if(r>500)return a;const l=og(n)&&og(a);if(!l&&!(xf(n)&&xf(a)))return a;const f=(l?n:Object.keys(n)).length,d=l?a:Object.keys(a),m=d.length,g=l?new Array(m):{};let p=0;for(let x=0;x<m;x++){const y=l?x:d[x],T=n[y],N=a[y];if(T===N){g[y]=T,(l?x<f:O1.call(n,y))&&p++;continue}if(T===null||N===null||typeof T!="object"||typeof N!="object"){g[y]=N;continue}const L=by(T,N,r+1);g[y]=L,L===T&&p++}return f===m&&p===f?n:g}function qo(n,a){if(!a||Object.keys(n).length!==Object.keys(a).length)return!1;for(const r in n)if(n[r]!==a[r])return!1;return!0}function og(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function xf(n){if(!ug(n))return!1;const a=n.constructor;if(a===void 0)return!0;const r=a.prototype;return!(!ug(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function ug(n){return Object.prototype.toString.call(n)==="[object Object]"}function M1(n){return new Promise(a=>{Fi.setTimeout(a,n)})}function Sf(n,a,r){return typeof r.structuralSharing=="function"?r.structuralSharing(n,a):r.structuralSharing!==!1?by(n,a):a}function D1(n,a,r=0){const l=[...n,a];return r&&l.length>r?l.slice(1):l}function j1(n,a,r=0){const l=[a,...n];return r&&l.length>r?l.slice(0,-1):l}var Kf=Symbol();function xy(n,a){return!n.queryFn&&a?.initialPromise?()=>a.initialPromise:!n.queryFn||n.queryFn===Kf?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Vf(n,a){return typeof n=="function"?n(...a):!!n}function z1(n,a,r){let l=!1,c;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(c??=a(),l||(l=!0,c.aborted?r():c.addEventListener("abort",r,{once:!0})),c)}),n}var L1=class extends Kr{#e;#t;#n;constructor(){super(),this.#n=n=>{if(!Ii&&window.addEventListener){const a=()=>n();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()})}setFocused(n){this.#e!==n&&(this.#e=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(a=>{a(n)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Yf=new L1;function wf(){let n,a;const r=new Promise((c,f)=>{n=c,a=f});r.status="pending",r.catch(()=>{});function l(c){Object.assign(r,c),delete r.resolve,delete r.reject}return r.resolve=c=>{l({status:"fulfilled",value:c}),n(c)},r.reject=c=>{l({status:"rejected",reason:c}),a(c)},r}var U1=k1;function B1(){let n=[],a=0,r=m=>{m()},l=m=>{m()},c=U1;const f=m=>{a?n.push(m):c(()=>{r(m)})},d=()=>{const m=n;n=[],m.length&&c(()=>{l(()=>{m.forEach(g=>{r(g)})})})};return{batch:m=>{let g;a++;try{g=m()}finally{a--,a||d()}return g},batchCalls:m=>(...g)=>{f(()=>{m(...g)})},schedule:f,setNotifyFunction:m=>{r=m},setBatchNotifyFunction:m=>{l=m},setScheduler:m=>{c=m}}}var qt=B1(),q1=class extends Kr{#e=!0;#t;#n;constructor(){super(),this.#n=n=>{if(!Ii&&window.addEventListener){const a=()=>n(!0),r=()=>n(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(this.setOnline.bind(this))}setOnline(n){this.#e!==n&&(this.#e=n,this.listeners.forEach(r=>{r(n)}))}isOnline(){return this.#e}},Ho=new q1;function H1(n){return Math.min(1e3*2**n,3e4)}function Sy(n){return(n??"online")==="online"?Ho.isOnline():!0}var Ef=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function wy(n){let a=!1,r=0,l;const c=wf(),f=()=>c.status!=="pending",d=B=>{if(!f()){const P=new Ef(B);T(P),n.onCancel?.(P)}},m=()=>{a=!0},g=()=>{a=!1},p=()=>Yf.isFocused()&&(n.networkMode==="always"||Ho.isOnline())&&n.canRun(),x=()=>Sy(n.networkMode)&&n.canRun(),y=B=>{f()||(l?.(),c.resolve(B))},T=B=>{f()||(l?.(),c.reject(B))},N=()=>new Promise(B=>{l=P=>{(f()||p())&&B(P)},n.onPause?.()}).then(()=>{l=void 0,f()||n.onContinue?.()}),L=()=>{if(f())return;let B;const P=r===0?n.initialPromise:void 0;try{B=P??n.fn()}catch(K){B=Promise.reject(K)}Promise.resolve(B).then(y).catch(K=>{if(f())return;const Y=n.retry??(Ii?0:3),W=n.retryDelay??H1,he=typeof W=="function"?W(r,K):W,de=Y===!0||typeof Y=="number"&&r<Y||typeof Y=="function"&&Y(r,K);if(a||!de){T(K);return}r++,n.onFail?.(r,K),M1(he).then(()=>p()?void 0:N()).then(()=>{a?T(K):L()})})};return{promise:c,status:()=>c.status,cancel:d,continue:()=>(l?.(),c),cancelRetry:m,continueRetry:g,canStart:x,start:()=>(x()?L():N().then(L),c)}}var Ey=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bf(this.gcTime)&&(this.#e=Fi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Ii?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Fi.clearTimeout(this.#e),this.#e=void 0)}},Q1=class extends Ey{#e;#t;#n;#i;#a;#s;#l;constructor(n){super(),this.#l=!1,this.#s=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.#i=n.client,this.#n=this.#i.getQueryCache(),this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.#e=fg(this.options),this.state=n.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(n){if(this.options={...this.#s,...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=fg(this.options);a.data!==void 0&&(this.setState(cg(a.data,a.dataUpdatedAt)),this.#e=a)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(n,a){const r=Sf(this.state.data,n,this.options);return this.#r({data:r,type:"success",dataUpdatedAt:a?.updatedAt,manual:a?.manual}),r}setState(n,a){this.#r({type:"setState",state:n,setStateOptions:a})}cancel(n){const a=this.#a?.promise;return this.#a?.cancel(n),a?a.then(an).catch(an):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(n=>Gn(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Kf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>gi(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!vy(this.state.dataUpdatedAt,n)}onFocus(){this.observers.find(a=>a.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(a=>a.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(a=>a!==n),this.observers.length||(this.#a&&(this.#l?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#r({type:"invalidate"})}async fetch(n,a){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&a?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(n&&this.setOptions(n),!this.options.queryFn){const m=this.observers.find(g=>g.options.queryFn);m&&this.setOptions(m.options)}const r=new AbortController,l=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(this.#l=!0,r.signal)})},c=()=>{const m=xy(this.options,a),p=(()=>{const x={client:this.#i,queryKey:this.queryKey,meta:this.meta};return l(x),x})();return this.#l=!1,this.options.persister?this.options.persister(m,p,this):m(p)},d=(()=>{const m={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:c};return l(m),m})();this.options.behavior?.onFetch(d,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==d.fetchOptions?.meta)&&this.#r({type:"fetch",meta:d.fetchOptions?.meta}),this.#a=wy({initialPromise:a?.initialPromise,fn:d.fetchFn,onCancel:m=>{m instanceof Ef&&m.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(m,g)=>{this.#r({type:"failed",failureCount:m,error:g})},onPause:()=>{this.#r({type:"pause"})},onContinue:()=>{this.#r({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0});try{const m=await this.#a.start();if(m===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(m),this.#n.config.onSuccess?.(m,this),this.#n.config.onSettled?.(m,this.state.error,this),m}catch(m){if(m instanceof Ef){if(m.silent)return this.#a.promise;if(m.revert){if(this.state.data===void 0)throw m;return this.state.data}}throw this.#r({type:"error",error:m}),this.#n.config.onError?.(m,this),this.#n.config.onSettled?.(this.state.data,m,this),m}finally{this.scheduleGc()}}#r(n){const a=r=>{switch(n.type){case"failed":return{...r,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Ty(r.data,this.options),fetchMeta:n.meta??null};case"success":const l={...r,...cg(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=n.manual?l:void 0,l;case"error":const c=n.error;return{...r,error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...n.state}}};this.state=a(this.state),qt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:n})})}};function Ty(n,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Sy(a.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function cg(n,a){return{data:n,dataUpdatedAt:a??Date.now(),error:null,isInvalidated:!1,status:"success"}}function fg(n){const a=typeof n.initialData=="function"?n.initialData():n.initialData,r=a!==void 0,l=r?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:a,dataUpdateCount:0,dataUpdatedAt:r?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var P1=class extends Kr{constructor(n,a){super(),this.options=a,this.#e=n,this.#r=null,this.#l=wf(),this.bindMethods(),this.setOptions(a)}#e;#t=void 0;#n=void 0;#i=void 0;#a;#s;#l;#r;#p;#d;#h;#u;#c;#o;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),dg(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Tf(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Tf(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(n){const a=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Gn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),a._defaulted&&!qo(this.options,a)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const l=this.hasListeners();l&&hg(this.#t,r,this.options,a)&&this.#f(),this.updateResult(),l&&(this.#t!==r||Gn(this.options.enabled,this.#t)!==Gn(a.enabled,this.#t)||gi(this.options.staleTime,this.#t)!==gi(a.staleTime,this.#t))&&this.#g();const c=this.#y();l&&(this.#t!==r||Gn(this.options.enabled,this.#t)!==Gn(a.enabled,this.#t)||c!==this.#o)&&this.#v(c)}getOptimisticResult(n){const a=this.#e.getQueryCache().build(this.#e,n),r=this.createResult(a,n);return K1(this,r)&&(this.#i=r,this.#s=this.options,this.#a=this.#t.state),r}getCurrentResult(){return this.#i}trackResult(n,a){return new Proxy(n,{get:(r,l)=>(this.trackProp(l),a?.(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,l))})}trackProp(n){this.#m.add(n)}getCurrentQuery(){return this.#t}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const a=this.#e.defaultQueryOptions(n),r=this.#e.getQueryCache().build(this.#e,a);return r.fetch().then(()=>this.createResult(r,a))}fetch(n){return this.#f({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#f(n){this.#w();let a=this.#t.fetch(this.options,n);return n?.throwOnError||(a=a.catch(an)),a}#g(){this.#x();const n=gi(this.options.staleTime,this.#t);if(Ii||this.#i.isStale||!bf(n))return;const r=vy(this.#i.dataUpdatedAt,n)+1;this.#u=Fi.setTimeout(()=>{this.#i.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(n){this.#S(),this.#o=n,!(Ii||Gn(this.options.enabled,this.#t)===!1||!bf(this.#o)||this.#o===0)&&(this.#c=Fi.setInterval(()=>{(this.options.refetchIntervalInBackground||Yf.isFocused())&&this.#f()},this.#o))}#b(){this.#g(),this.#v(this.#y())}#x(){this.#u&&(Fi.clearTimeout(this.#u),this.#u=void 0)}#S(){this.#c&&(Fi.clearInterval(this.#c),this.#c=void 0)}createResult(n,a){const r=this.#t,l=this.options,c=this.#i,f=this.#a,d=this.#s,g=n!==r?n.state:this.#n,{state:p}=n;let x={...p},y=!1,T;if(a._optimisticResults){const V=this.hasListeners(),ie=!V&&dg(n,a),ke=V&&hg(n,r,a,l);(ie||ke)&&(x={...x,...Ty(p.data,n.options)}),a._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:N,errorUpdatedAt:L,status:B}=x;T=x.data;let P=!1;if(a.placeholderData!==void 0&&T===void 0&&B==="pending"){let V;c?.isPlaceholderData&&a.placeholderData===d?.placeholderData?(V=c.data,P=!0):V=typeof a.placeholderData=="function"?a.placeholderData(this.#h?.state.data,this.#h):a.placeholderData,V!==void 0&&(B="success",T=Sf(c?.data,V,a),y=!0)}if(a.select&&T!==void 0&&!P)if(c&&T===f?.data&&a.select===this.#p)T=this.#d;else try{this.#p=a.select,T=a.select(T),T=Sf(c?.data,T,a),this.#d=T,this.#r=null}catch(V){this.#r=V}this.#r&&(N=this.#r,T=this.#d,L=Date.now(),B="error");const K=x.fetchStatus==="fetching",Y=B==="pending",W=B==="error",he=Y&&K,de=T!==void 0,R={status:B,fetchStatus:x.fetchStatus,isPending:Y,isSuccess:B==="success",isError:W,isInitialLoading:he,isLoading:he,data:T,dataUpdatedAt:x.dataUpdatedAt,error:N,errorUpdatedAt:L,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:x.dataUpdateCount>0||x.errorUpdateCount>0,isFetchedAfterMount:x.dataUpdateCount>g.dataUpdateCount||x.errorUpdateCount>g.errorUpdateCount,isFetching:K,isRefetching:K&&!Y,isLoadingError:W&&!de,isPaused:x.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:W&&de,isStale:Ff(n,a),refetch:this.refetch,promise:this.#l,isEnabled:Gn(a.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const V=R.data!==void 0,ie=R.status==="error"&&!V,ke=Me=>{ie?Me.reject(R.error):V&&Me.resolve(R.data)},Re=()=>{const Me=this.#l=R.promise=wf();ke(Me)},Se=this.#l;switch(Se.status){case"pending":n.queryHash===r.queryHash&&ke(Se);break;case"fulfilled":(ie||R.data!==Se.value)&&Re();break;case"rejected":(!ie||R.error!==Se.reason)&&Re();break}}return R}updateResult(){const n=this.#i,a=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#s=this.options,this.#a.data!==void 0&&(this.#h=this.#t),qo(a,n))return;this.#i=a;const r=()=>{if(!n)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!this.#m.size)return!0;const f=new Set(c??this.#m);return this.options.throwOnError&&f.add("error"),Object.keys(this.#i).some(d=>{const m=d;return this.#i[m]!==n[m]&&f.has(m)})};this.#E({listeners:r()})}#w(){const n=this.#e.getQueryCache().build(this.#e,this.options);if(n===this.#t)return;const a=this.#t;this.#t=n,this.#n=n.state,this.hasListeners()&&(a?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(n){qt.batch(()=>{n.listeners&&this.listeners.forEach(a=>{a(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function G1(n,a){return Gn(a.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&a.retryOnMount===!1)}function dg(n,a){return G1(n,a)||n.state.data!==void 0&&Tf(n,a,a.refetchOnMount)}function Tf(n,a,r){if(Gn(a.enabled,n)!==!1&&gi(a.staleTime,n)!=="static"){const l=typeof r=="function"?r(n):r;return l==="always"||l!==!1&&Ff(n,a)}return!1}function hg(n,a,r,l){return(n!==a||Gn(l.enabled,n)===!1)&&(!r.suspense||n.state.status!=="error")&&Ff(n,r)}function Ff(n,a){return Gn(a.enabled,n)!==!1&&n.isStaleByTime(gi(a.staleTime,n))}function K1(n,a){return!qo(n.getCurrentResult(),a)}function mg(n){return{onFetch:(a,r)=>{const l=a.options,c=a.fetchOptions?.meta?.fetchMore?.direction,f=a.state.data?.pages||[],d=a.state.data?.pageParams||[];let m={pages:[],pageParams:[]},g=0;const p=async()=>{let x=!1;const y=L=>{z1(L,()=>a.signal,()=>x=!0)},T=xy(a.options,a.fetchOptions),N=async(L,B,P)=>{if(x)return Promise.reject();if(B==null&&L.pages.length)return Promise.resolve(L);const Y=(()=>{const fe={client:a.client,queryKey:a.queryKey,pageParam:B,direction:P?"backward":"forward",meta:a.options.meta};return y(fe),fe})(),W=await T(Y),{maxPages:he}=a.options,de=P?j1:D1;return{pages:de(L.pages,W,he),pageParams:de(L.pageParams,B,he)}};if(c&&f.length){const L=c==="backward",B=L?Ay:Af,P={pages:f,pageParams:d},K=B(l,P);m=await N(P,K,L)}else{const L=n??f.length;do{const B=g===0?d[0]??l.initialPageParam:Af(l,m);if(g>0&&B==null)break;m=await N(m,B),g++}while(g<L)}return m};a.options.persister?a.fetchFn=()=>a.options.persister?.(p,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},r):a.fetchFn=p}}}function Af(n,{pages:a,pageParams:r}){const l=a.length-1;return a.length>0?n.getNextPageParam(a[l],a,r[l],r):void 0}function Ay(n,{pages:a,pageParams:r}){return a.length>0?n.getPreviousPageParam?.(a[0],a,r[0],r):void 0}function PC(n,a){return a?Af(n,a)!=null:!1}function GC(n,a){return!a||!n.getPreviousPageParam?!1:Ay(n,a)!=null}var V1=class extends Ey{#e;#t;#n;#i;constructor(n){super(),this.#e=n.client,this.mutationId=n.mutationId,this.#n=n.mutationCache,this.#t=[],this.state=n.state||Cy(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#t.includes(n)||(this.#t.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#t=this.#t.filter(a=>a!==n),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(n){const a=()=>{this.#a({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=wy({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(f,d)=>{this.#a({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const l=this.state.status==="pending",c=!this.#i.canStart();try{if(l)a();else{this.#a({type:"pending",variables:n,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(n,this,r);const d=await this.options.onMutate?.(n,r);d!==this.state.context&&this.#a({type:"pending",context:d,variables:n,isPaused:c})}const f=await this.#i.start();return await this.#n.config.onSuccess?.(f,n,this.state.context,this,r),await this.options.onSuccess?.(f,n,this.state.context,r),await this.#n.config.onSettled?.(f,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(f,null,n,this.state.context,r),this.#a({type:"success",data:f}),f}catch(f){try{await this.#n.config.onError?.(f,n,this.state.context,this,r)}catch(d){Promise.reject(d)}try{await this.options.onError?.(f,n,this.state.context,r)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,f,this.state.variables,this.state.context,this,r)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,f,n,this.state.context,r)}catch(d){Promise.reject(d)}throw this.#a({type:"error",error:f}),f}finally{this.#n.runNext(this)}}#a(n){const a=r=>{switch(n.type){case"failed":return{...r,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...r,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:n.error,failureCount:r.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=a(this.state),qt.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(n)}),this.#n.notify({mutation:this,type:"updated",action:n})})}};function Cy(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Y1=class extends Kr{constructor(n={}){super(),this.config=n,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(n,a,r){const l=new V1({client:n,mutationCache:this,mutationId:++this.#n,options:n.defaultMutationOptions(a),state:r});return this.add(l),l}add(n){this.#e.add(n);const a=vo(n);if(typeof a=="string"){const r=this.#t.get(a);r?r.push(n):this.#t.set(a,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#e.delete(n)){const a=vo(n);if(typeof a=="string"){const r=this.#t.get(a);if(r)if(r.length>1){const l=r.indexOf(n);l!==-1&&r.splice(l,1)}else r[0]===n&&this.#t.delete(a)}}this.notify({type:"removed",mutation:n})}canRun(n){const a=vo(n);if(typeof a=="string"){const l=this.#t.get(a)?.find(c=>c.state.status==="pending");return!l||l===n}else return!0}runNext(n){const a=vo(n);return typeof a=="string"?this.#t.get(a)?.find(l=>l!==n&&l.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){qt.batch(()=>{this.#e.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(n){const a={exact:!0,...n};return this.getAll().find(r=>lg(a,r))}findAll(n={}){return this.getAll().filter(a=>lg(n,a))}notify(n){qt.batch(()=>{this.listeners.forEach(a=>{a(n)})})}resumePausedMutations(){const n=this.getAll().filter(a=>a.state.isPaused);return qt.batch(()=>Promise.all(n.map(a=>a.continue().catch(an))))}};function vo(n){return n.options.scope?.id}var F1=class extends Kr{#e;#t=void 0;#n;#i;constructor(a,r){super(),this.#e=a,this.setOptions(r),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(a){const r=this.options;this.options=this.#e.defaultMutationOptions(a),qo(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&Zi(r.mutationKey)!==Zi(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(a){this.#a(),this.#s(a)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#s()}mutate(a,r){return this.#i=r,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(a)}#a(){const a=this.#n?.state??Cy();this.#t={...a,isPending:a.status==="pending",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset}}#s(a){qt.batch(()=>{if(this.#i&&this.hasListeners()){const r=this.#t.variables,l=this.#t.context,c={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(a?.type==="success"){try{this.#i.onSuccess?.(a.data,r,l,c)}catch(f){Promise.reject(f)}try{this.#i.onSettled?.(a.data,null,r,l,c)}catch(f){Promise.reject(f)}}else if(a?.type==="error"){try{this.#i.onError?.(a.error,r,l,c)}catch(f){Promise.reject(f)}try{this.#i.onSettled?.(void 0,a.error,r,l,c)}catch(f){Promise.reject(f)}}}this.listeners.forEach(r=>{r(this.#t)})})}},X1=class extends Kr{constructor(n={}){super(),this.config=n,this.#e=new Map}#e;build(n,a,r){const l=a.queryKey,c=a.queryHash??Gf(l,a);let f=this.get(c);return f||(f=new Q1({client:n,queryKey:l,queryHash:c,options:n.defaultQueryOptions(a),state:r,defaultOptions:n.getQueryDefaults(l)}),this.add(f)),f}add(n){this.#e.has(n.queryHash)||(this.#e.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const a=this.#e.get(n.queryHash);a&&(n.destroy(),a===n&&this.#e.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){qt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#e.get(n)}getAll(){return[...this.#e.values()]}find(n){const a={exact:!0,...n};return this.getAll().find(r=>sg(a,r))}findAll(n={}){const a=this.getAll();return Object.keys(n).length>0?a.filter(r=>sg(n,r)):a}notify(n){qt.batch(()=>{this.listeners.forEach(a=>{a(n)})})}onFocus(){qt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){qt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},I1=class{#e;#t;#n;#i;#a;#s;#l;#r;constructor(n={}){this.#e=n.queryCache||new X1,this.#t=n.mutationCache||new Y1,this.#n=n.defaultOptions||{},this.#i=new Map,this.#a=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#l=Yf.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#r=Ho.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#l?.(),this.#l=void 0,this.#r?.(),this.#r=void 0)}isFetching(n){return this.#e.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#t.findAll({...n,status:"pending"}).length}getQueryData(n){const a=this.defaultQueryOptions({queryKey:n});return this.#e.get(a.queryHash)?.state.data}ensureQueryData(n){const a=this.defaultQueryOptions(n),r=this.#e.build(this,a),l=r.state.data;return l===void 0?this.fetchQuery(n):(n.revalidateIfStale&&r.isStaleByTime(gi(a.staleTime,r))&&this.prefetchQuery(a),Promise.resolve(l))}getQueriesData(n){return this.#e.findAll(n).map(({queryKey:a,state:r})=>{const l=r.data;return[a,l]})}setQueryData(n,a,r){const l=this.defaultQueryOptions({queryKey:n}),f=this.#e.get(l.queryHash)?.state.data,d=N1(a,f);if(d!==void 0)return this.#e.build(this,l).setData(d,{...r,manual:!0})}setQueriesData(n,a,r){return qt.batch(()=>this.#e.findAll(n).map(({queryKey:l})=>[l,this.setQueryData(l,a,r)]))}getQueryState(n){const a=this.defaultQueryOptions({queryKey:n});return this.#e.get(a.queryHash)?.state}removeQueries(n){const a=this.#e;qt.batch(()=>{a.findAll(n).forEach(r=>{a.remove(r)})})}resetQueries(n,a){const r=this.#e;return qt.batch(()=>(r.findAll(n).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...n},a)))}cancelQueries(n,a={}){const r={revert:!0,...a},l=qt.batch(()=>this.#e.findAll(n).map(c=>c.cancel(r)));return Promise.all(l).then(an).catch(an)}invalidateQueries(n,a={}){return qt.batch(()=>(this.#e.findAll(n).forEach(r=>{r.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},a)))}refetchQueries(n,a={}){const r={...a,cancelRefetch:a.cancelRefetch??!0},l=qt.batch(()=>this.#e.findAll(n).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let f=c.fetch(void 0,r);return r.throwOnError||(f=f.catch(an)),c.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(l).then(an)}fetchQuery(n){const a=this.defaultQueryOptions(n);a.retry===void 0&&(a.retry=!1);const r=this.#e.build(this,a);return r.isStaleByTime(gi(a.staleTime,r))?r.fetch(a):Promise.resolve(r.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(an).catch(an)}fetchInfiniteQuery(n){return n.behavior=mg(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(an).catch(an)}ensureInfiniteQueryData(n){return n.behavior=mg(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Ho.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(n){this.#n=n}setQueryDefaults(n,a){this.#i.set(Zi(n),{queryKey:n,defaultOptions:a})}getQueryDefaults(n){const a=[...this.#i.values()],r={};return a.forEach(l=>{Is(n,l.queryKey)&&Object.assign(r,l.defaultOptions)}),r}setMutationDefaults(n,a){this.#a.set(Zi(n),{mutationKey:n,defaultOptions:a})}getMutationDefaults(n){const a=[...this.#a.values()],r={};return a.forEach(l=>{Is(n,l.mutationKey)&&Object.assign(r,l.defaultOptions)}),r}defaultQueryOptions(n){if(n._defaulted)return n;const a={...this.#n.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return a.queryHash||(a.queryHash=Gf(a.queryKey,a)),a.refetchOnReconnect===void 0&&(a.refetchOnReconnect=a.networkMode!=="always"),a.throwOnError===void 0&&(a.throwOnError=!!a.suspense),!a.networkMode&&a.persister&&(a.networkMode="offlineFirst"),a.queryFn===Kf&&(a.enabled=!1),a}defaultMutationOptions(n){return n?._defaulted?n:{...this.#n.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ry=S.createContext(void 0),tt=n=>{const a=S.useContext(Ry);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},Z1=({client:n,children:a})=>(S.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),v.jsx(Ry.Provider,{value:n,children:a})),_y=S.createContext(!1),J1=()=>S.useContext(_y);_y.Provider;function $1(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var W1=S.createContext($1()),ex=()=>S.useContext(W1),tx=(n,a,r)=>{const l=r?.state.error&&typeof n.throwOnError=="function"?Vf(n.throwOnError,[r.state.error,r]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||l)&&(a.isReset()||(n.retryOnMount=!1))},nx=n=>{S.useEffect(()=>{n.clearReset()},[n])},ax=({result:n,errorResetBoundary:a,throwOnError:r,query:l,suspense:c})=>n.isError&&!a.isReset()&&!n.isFetching&&l&&(c&&n.data===void 0||Vf(r,[n.error,l])),ix=n=>{if(n.suspense){const r=c=>c==="static"?c:Math.max(c??1e3,1e3),l=n.staleTime;n.staleTime=typeof l=="function"?(...c)=>r(l(...c)):r(l),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},rx=(n,a)=>n.isLoading&&n.isFetching&&!a,sx=(n,a)=>n?.suspense&&a.isPending,pg=(n,a,r)=>a.fetchOptimistic(n).catch(()=>{r.clearReset()});function lx(n,a,r){const l=J1(),c=ex(),f=tt(),d=f.defaultQueryOptions(n);f.getDefaultOptions().queries?._experimental_beforeQuery?.(d);const m=f.getQueryCache().get(d.queryHash);d._optimisticResults=l?"isRestoring":"optimistic",ix(d),tx(d,c,m),nx(c);const g=!f.getQueryCache().get(d.queryHash),[p]=S.useState(()=>new a(f,d)),x=p.getOptimisticResult(d),y=!l&&n.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(T=>{const N=y?p.subscribe(qt.batchCalls(T)):an;return p.updateResult(),N},[p,y]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),S.useEffect(()=>{p.setOptions(d)},[d,p]),sx(d,x))throw pg(d,p,c);if(ax({result:x,errorResetBoundary:c,throwOnError:d.throwOnError,query:m,suspense:d.suspense}))throw x.error;return f.getDefaultOptions().queries?._experimental_afterQuery?.(d,x),d.experimental_prefetchInRender&&!Ii&&rx(x,l)&&(g?pg(d,p,c):m?.promise)?.catch(an).finally(()=>{p.updateResult()}),d.notifyOnChangeProps?x:p.trackResult(x)}function rn(n,a){return lx(n,P1)}function ht(n,a){const r=tt(),[l]=S.useState(()=>new F1(r,n));S.useEffect(()=>{l.setOptions(n)},[l,n]);const c=S.useSyncExternalStore(S.useCallback(d=>l.subscribe(qt.batchCalls(d)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),f=S.useCallback((d,m)=>{l.mutate(d,m).catch(an)},[l]);if(c.error&&Vf(l.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:f,mutateAsync:c.mutate}}var ky=yy();const ox=gy(ky);function ux(n){if(typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",a.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}const cx=n=>{switch(n){case"success":return hx;case"info":return px;case"warning":return mx;case"error":return gx;default:return null}},fx=Array(12).fill(0),dx=({visible:n,className:a})=>ne.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":n},ne.createElement("div",{className:"sonner-spinner"},fx.map((r,l)=>ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${l}`})))),hx=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),mx=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),px=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),gx=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),yx=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),vx=()=>{const[n,a]=ne.useState(document.hidden);return ne.useEffect(()=>{const r=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),n};let Cf=1;class bx{constructor(){this.subscribe=a=>(this.subscribers.push(a),()=>{const r=this.subscribers.indexOf(a);this.subscribers.splice(r,1)}),this.publish=a=>{this.subscribers.forEach(r=>r(a))},this.addToast=a=>{this.publish(a),this.toasts=[...this.toasts,a]},this.create=a=>{var r;const{message:l,...c}=a,f=typeof a?.id=="number"||((r=a.id)==null?void 0:r.length)>0?a.id:Cf++,d=this.toasts.find(g=>g.id===f),m=a.dismissible===void 0?!0:a.dismissible;return this.dismissedToasts.has(f)&&this.dismissedToasts.delete(f),d?this.toasts=this.toasts.map(g=>g.id===f?(this.publish({...g,...a,id:f,title:l}),{...g,...a,id:f,dismissible:m,title:l}):g):this.addToast({title:l,...c,dismissible:m,id:f}),f},this.dismiss=a=>(a?(this.dismissedToasts.add(a),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:a,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(l=>l({id:r.id,dismiss:!0}))}),a),this.message=(a,r)=>this.create({...r,message:a}),this.error=(a,r)=>this.create({...r,message:a,type:"error"}),this.success=(a,r)=>this.create({...r,type:"success",message:a}),this.info=(a,r)=>this.create({...r,type:"info",message:a}),this.warning=(a,r)=>this.create({...r,type:"warning",message:a}),this.loading=(a,r)=>this.create({...r,type:"loading",message:a}),this.promise=(a,r)=>{if(!r)return;let l;r.loading!==void 0&&(l=this.create({...r,promise:a,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const c=Promise.resolve(a instanceof Function?a():a);let f=l!==void 0,d;const m=c.then(async p=>{if(d=["resolve",p],ne.isValidElement(p))f=!1,this.create({id:l,type:"default",message:p});else if(Sx(p)&&!p.ok){f=!1;const y=typeof r.error=="function"?await r.error(`HTTP error! status: ${p.status}`):r.error,T=typeof r.description=="function"?await r.description(`HTTP error! status: ${p.status}`):r.description,L=typeof y=="object"&&!ne.isValidElement(y)?y:{message:y};this.create({id:l,type:"error",description:T,...L})}else if(p instanceof Error){f=!1;const y=typeof r.error=="function"?await r.error(p):r.error,T=typeof r.description=="function"?await r.description(p):r.description,L=typeof y=="object"&&!ne.isValidElement(y)?y:{message:y};this.create({id:l,type:"error",description:T,...L})}else if(r.success!==void 0){f=!1;const y=typeof r.success=="function"?await r.success(p):r.success,T=typeof r.description=="function"?await r.description(p):r.description,L=typeof y=="object"&&!ne.isValidElement(y)?y:{message:y};this.create({id:l,type:"success",description:T,...L})}}).catch(async p=>{if(d=["reject",p],r.error!==void 0){f=!1;const x=typeof r.error=="function"?await r.error(p):r.error,y=typeof r.description=="function"?await r.description(p):r.description,N=typeof x=="object"&&!ne.isValidElement(x)?x:{message:x};this.create({id:l,type:"error",description:y,...N})}}).finally(()=>{f&&(this.dismiss(l),l=void 0),r.finally==null||r.finally.call(r)}),g=()=>new Promise((p,x)=>m.then(()=>d[0]==="reject"?x(d[1]):p(d[1])).catch(x));return typeof l!="string"&&typeof l!="number"?{unwrap:g}:Object.assign(l,{unwrap:g})},this.custom=(a,r)=>{const l=r?.id||Cf++;return this.create({jsx:a(l),id:l,...r}),l},this.getActiveToasts=()=>this.toasts.filter(a=>!this.dismissedToasts.has(a.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const gn=new bx,xx=(n,a)=>{const r=a?.id||Cf++;return gn.addToast({title:n,...a,id:r}),r},Sx=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",wx=xx,Ex=()=>gn.toasts,Tx=()=>gn.getActiveToasts(),Ur=Object.assign(wx,{success:gn.success,info:gn.info,warning:gn.warning,error:gn.error,custom:gn.custom,message:gn.message,promise:gn.promise,dismiss:gn.dismiss,loading:gn.loading},{getHistory:Ex,getToasts:Tx});ux("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function bo(n){return n.label!==void 0}const Ax=3,Cx="24px",Rx="16px",gg=4e3,_x=356,kx=14,Nx=45,Ox=200;function ca(...n){return n.filter(Boolean).join(" ")}function Mx(n){const[a,r]=n.split("-"),l=[];return a&&l.push(a),r&&l.push(r),l}const Dx=n=>{var a,r,l,c,f,d,m,g,p;const{invert:x,toast:y,unstyled:T,interacting:N,setHeights:L,visibleToasts:B,heights:P,index:K,toasts:Y,expanded:W,removeToast:he,defaultRichColors:de,closeButton:fe,style:R,cancelButtonStyle:V,actionButtonStyle:ie,className:ke="",descriptionClassName:Re="",duration:Se,position:Me,gap:ze,expandByDefault:Ee,classNames:k,icons:X,closeButtonAriaLabel:Q="Close toast"}=n,[me,ye]=ne.useState(null),[A,q]=ne.useState(null),[H,Z]=ne.useState(!1),[ee,$]=ne.useState(!1),[ae,Te]=ne.useState(!1),[Be,Pt]=ne.useState(!1),[en,Je]=ne.useState(!1),[Fn,sn]=ne.useState(0),[Si,ln]=ne.useState(0),ga=ne.useRef(y.duration||Se||gg),wi=ne.useRef(null),Zt=ne.useRef(null),Ei=K===0,Ti=K+1<=B,Gt=y.type,ia=y.dismissible!==!1,gt=y.className||"",ya=y.descriptionClassName||"",ra=ne.useMemo(()=>P.findIndex(_e=>_e.toastId===y.id)||0,[P,y.id]),Qa=ne.useMemo(()=>{var _e;return(_e=y.closeButton)!=null?_e:fe},[y.closeButton,fe]),Kt=ne.useMemo(()=>y.duration||Se||gg,[y.duration,Se]),tn=ne.useRef(0),kn=ne.useRef(0),Wi=ne.useRef(0),Nn=ne.useRef(null),[va,ct]=Me.split("-"),on=ne.useMemo(()=>P.reduce((_e,ot,Et)=>Et>=ra?_e:_e+ot.height,0),[P,ra]),Lt=vx(),er=y.invert||x,Ai=Gt==="loading";kn.current=ne.useMemo(()=>ra*ze+on,[ra,on]),ne.useEffect(()=>{ga.current=Kt},[Kt]),ne.useEffect(()=>{Z(!0)},[]),ne.useEffect(()=>{const _e=Zt.current;if(_e){const ot=_e.getBoundingClientRect().height;return ln(ot),L(Et=>[{toastId:y.id,height:ot,position:y.position},...Et]),()=>L(Et=>Et.filter(Tt=>Tt.toastId!==y.id))}},[L,y.id]),ne.useLayoutEffect(()=>{if(!H)return;const _e=Zt.current,ot=_e.style.height;_e.style.height="auto";const Et=_e.getBoundingClientRect().height;_e.style.height=ot,ln(Et),L(Tt=>Tt.find(ut=>ut.toastId===y.id)?Tt.map(ut=>ut.toastId===y.id?{...ut,height:Et}:ut):[{toastId:y.id,height:Et,position:y.position},...Tt])},[H,y.title,y.description,L,y.id,y.jsx,y.action,y.cancel]);const yn=ne.useCallback(()=>{$(!0),sn(kn.current),L(_e=>_e.filter(ot=>ot.toastId!==y.id)),setTimeout(()=>{he(y)},Ox)},[y,he,L,kn]);ne.useEffect(()=>{if(y.promise&&Gt==="loading"||y.duration===1/0||y.type==="loading")return;let _e;return W||N||Lt?(()=>{if(Wi.current<tn.current){const Tt=new Date().getTime()-tn.current;ga.current=ga.current-Tt}Wi.current=new Date().getTime()})():ga.current!==1/0&&(tn.current=new Date().getTime(),_e=setTimeout(()=>{y.onAutoClose==null||y.onAutoClose.call(y,y),yn()},ga.current)),()=>clearTimeout(_e)},[W,N,y,Gt,Lt,yn]),ne.useEffect(()=>{y.delete&&(yn(),y.onDismiss==null||y.onDismiss.call(y,y))},[yn,y.delete]);function Xn(){var _e;if(X?.loading){var ot;return ne.createElement("div",{className:ca(k?.loader,y==null||(ot=y.classNames)==null?void 0:ot.loader,"sonner-loader"),"data-visible":Gt==="loading"},X.loading)}return ne.createElement(dx,{className:ca(k?.loader,y==null||(_e=y.classNames)==null?void 0:_e.loader),visible:Gt==="loading"})}const ba=y.icon||X?.[Gt]||cx(Gt);var In,On;return ne.createElement("li",{tabIndex:0,ref:Zt,className:ca(ke,gt,k?.toast,y==null||(a=y.classNames)==null?void 0:a.toast,k?.default,k?.[Gt],y==null||(r=y.classNames)==null?void 0:r[Gt]),"data-sonner-toast":"","data-rich-colors":(In=y.richColors)!=null?In:de,"data-styled":!(y.jsx||y.unstyled||T),"data-mounted":H,"data-promise":!!y.promise,"data-swiped":en,"data-removed":ee,"data-visible":Ti,"data-y-position":va,"data-x-position":ct,"data-index":K,"data-front":Ei,"data-swiping":ae,"data-dismissible":ia,"data-type":Gt,"data-invert":er,"data-swipe-out":Be,"data-swipe-direction":A,"data-expanded":!!(W||Ee&&H),"data-testid":y.testId,style:{"--index":K,"--toasts-before":K,"--z-index":Y.length-K,"--offset":`${ee?Fn:kn.current}px`,"--initial-height":Ee?"auto":`${Si}px`,...R,...y.style},onDragEnd:()=>{Te(!1),ye(null),Nn.current=null},onPointerDown:_e=>{_e.button!==2&&(Ai||!ia||(wi.current=new Date,sn(kn.current),_e.target.setPointerCapture(_e.pointerId),_e.target.tagName!=="BUTTON"&&(Te(!0),Nn.current={x:_e.clientX,y:_e.clientY})))},onPointerUp:()=>{var _e,ot,Et;if(Be||!ia)return;Nn.current=null;const Tt=Number(((_e=Zt.current)==null?void 0:_e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),vn=Number(((ot=Zt.current)==null?void 0:ot.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ut=new Date().getTime()-((Et=wi.current)==null?void 0:Et.getTime()),Jt=me==="x"?Tt:vn,xa=Math.abs(Jt)/ut;if(Math.abs(Jt)>=Nx||xa>.11){sn(kn.current),y.onDismiss==null||y.onDismiss.call(y,y),q(me==="x"?Tt>0?"right":"left":vn>0?"down":"up"),yn(),Pt(!0);return}else{var w,_;(w=Zt.current)==null||w.style.setProperty("--swipe-amount-x","0px"),(_=Zt.current)==null||_.style.setProperty("--swipe-amount-y","0px")}Je(!1),Te(!1),ye(null)},onPointerMove:_e=>{var ot,Et,Tt;if(!Nn.current||!ia||((ot=window.getSelection())==null?void 0:ot.toString().length)>0)return;const ut=_e.clientY-Nn.current.y,Jt=_e.clientX-Nn.current.x;var xa;const w=(xa=n.swipeDirections)!=null?xa:Mx(Me);!me&&(Math.abs(Jt)>1||Math.abs(ut)>1)&&ye(Math.abs(Jt)>Math.abs(ut)?"x":"y");let _={x:0,y:0};const z=J=>1/(1.5+Math.abs(J)/20);if(me==="y"){if(w.includes("top")||w.includes("bottom"))if(w.includes("top")&&ut<0||w.includes("bottom")&&ut>0)_.y=ut;else{const J=ut*z(ut);_.y=Math.abs(J)<Math.abs(ut)?J:ut}}else if(me==="x"&&(w.includes("left")||w.includes("right")))if(w.includes("left")&&Jt<0||w.includes("right")&&Jt>0)_.x=Jt;else{const J=Jt*z(Jt);_.x=Math.abs(J)<Math.abs(Jt)?J:Jt}(Math.abs(_.x)>0||Math.abs(_.y)>0)&&Je(!0),(Et=Zt.current)==null||Et.style.setProperty("--swipe-amount-x",`${_.x}px`),(Tt=Zt.current)==null||Tt.style.setProperty("--swipe-amount-y",`${_.y}px`)}},Qa&&!y.jsx&&Gt!=="loading"?ne.createElement("button",{"aria-label":Q,"data-disabled":Ai,"data-close-button":!0,onClick:Ai||!ia?()=>{}:()=>{yn(),y.onDismiss==null||y.onDismiss.call(y,y)},className:ca(k?.closeButton,y==null||(l=y.classNames)==null?void 0:l.closeButton)},(On=X?.close)!=null?On:yx):null,(Gt||y.icon||y.promise)&&y.icon!==null&&(X?.[Gt]!==null||y.icon)?ne.createElement("div",{"data-icon":"",className:ca(k?.icon,y==null||(c=y.classNames)==null?void 0:c.icon)},y.promise||y.type==="loading"&&!y.icon?y.icon||Xn():null,y.type!=="loading"?ba:null):null,ne.createElement("div",{"data-content":"",className:ca(k?.content,y==null||(f=y.classNames)==null?void 0:f.content)},ne.createElement("div",{"data-title":"",className:ca(k?.title,y==null||(d=y.classNames)==null?void 0:d.title)},y.jsx?y.jsx:typeof y.title=="function"?y.title():y.title),y.description?ne.createElement("div",{"data-description":"",className:ca(Re,ya,k?.description,y==null||(m=y.classNames)==null?void 0:m.description)},typeof y.description=="function"?y.description():y.description):null),ne.isValidElement(y.cancel)?y.cancel:y.cancel&&bo(y.cancel)?ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:y.cancelButtonStyle||V,onClick:_e=>{bo(y.cancel)&&ia&&(y.cancel.onClick==null||y.cancel.onClick.call(y.cancel,_e),yn())},className:ca(k?.cancelButton,y==null||(g=y.classNames)==null?void 0:g.cancelButton)},y.cancel.label):null,ne.isValidElement(y.action)?y.action:y.action&&bo(y.action)?ne.createElement("button",{"data-button":!0,"data-action":!0,style:y.actionButtonStyle||ie,onClick:_e=>{bo(y.action)&&(y.action.onClick==null||y.action.onClick.call(y.action,_e),!_e.defaultPrevented&&yn())},className:ca(k?.actionButton,y==null||(p=y.classNames)==null?void 0:p.actionButton)},y.action.label):null)};function yg(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function jx(n,a){const r={};return[n,a].forEach((l,c)=>{const f=c===1,d=f?"--mobile-offset":"--offset",m=f?Rx:Cx;function g(p){["top","right","bottom","left"].forEach(x=>{r[`${d}-${x}`]=typeof p=="number"?`${p}px`:p})}typeof l=="number"||typeof l=="string"?g(l):typeof l=="object"?["top","right","bottom","left"].forEach(p=>{l[p]===void 0?r[`${d}-${p}`]=m:r[`${d}-${p}`]=typeof l[p]=="number"?`${l[p]}px`:l[p]}):g(m)}),r}const zx=ne.forwardRef(function(a,r){const{id:l,invert:c,position:f="bottom-right",hotkey:d=["altKey","KeyT"],expand:m,closeButton:g,className:p,offset:x,mobileOffset:y,theme:T="light",richColors:N,duration:L,style:B,visibleToasts:P=Ax,toastOptions:K,dir:Y=yg(),gap:W=kx,icons:he,containerAriaLabel:de="Notifications"}=a,[fe,R]=ne.useState([]),V=ne.useMemo(()=>l?fe.filter(H=>H.toasterId===l):fe.filter(H=>!H.toasterId),[fe,l]),ie=ne.useMemo(()=>Array.from(new Set([f].concat(V.filter(H=>H.position).map(H=>H.position)))),[V,f]),[ke,Re]=ne.useState([]),[Se,Me]=ne.useState(!1),[ze,Ee]=ne.useState(!1),[k,X]=ne.useState(T!=="system"?T:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=ne.useRef(null),me=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),ye=ne.useRef(null),A=ne.useRef(!1),q=ne.useCallback(H=>{R(Z=>{var ee;return(ee=Z.find($=>$.id===H.id))!=null&&ee.delete||gn.dismiss(H.id),Z.filter(({id:$})=>$!==H.id)})},[]);return ne.useEffect(()=>gn.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{R(Z=>Z.map(ee=>ee.id===H.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{ox.flushSync(()=>{R(Z=>{const ee=Z.findIndex($=>$.id===H.id);return ee!==-1?[...Z.slice(0,ee),{...Z[ee],...H},...Z.slice(ee+1)]:[H,...Z]})})})}),[fe]),ne.useEffect(()=>{if(T!=="system"){X(T);return}if(T==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:Z})=>{X(Z?"dark":"light")})}catch{H.addListener(({matches:ee})=>{try{X(ee?"dark":"light")}catch($){console.error($)}})}},[T]),ne.useEffect(()=>{fe.length<=1&&Me(!1)},[fe]),ne.useEffect(()=>{const H=Z=>{var ee;if(d.every(Te=>Z[Te]||Z.code===Te)){var ae;Me(!0),(ae=Q.current)==null||ae.focus()}Z.code==="Escape"&&(document.activeElement===Q.current||(ee=Q.current)!=null&&ee.contains(document.activeElement))&&Me(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[d]),ne.useEffect(()=>{if(Q.current)return()=>{ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null,A.current=!1)}},[Q.current]),ne.createElement("section",{ref:r,"aria-label":`${de} ${me}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ie.map((H,Z)=>{var ee;const[$,ae]=H.split("-");return V.length?ne.createElement("ol",{key:H,dir:Y==="auto"?yg():Y,tabIndex:-1,ref:Q,className:p,"data-sonner-toaster":!0,"data-sonner-theme":k,"data-y-position":$,"data-x-position":ae,style:{"--front-toast-height":`${((ee=ke[0])==null?void 0:ee.height)||0}px`,"--width":`${_x}px`,"--gap":`${W}px`,...B,...jx(x,y)},onBlur:Te=>{A.current&&!Te.currentTarget.contains(Te.relatedTarget)&&(A.current=!1,ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null))},onFocus:Te=>{Te.target instanceof HTMLElement&&Te.target.dataset.dismissible==="false"||A.current||(A.current=!0,ye.current=Te.relatedTarget)},onMouseEnter:()=>Me(!0),onMouseMove:()=>Me(!0),onMouseLeave:()=>{ze||Me(!1)},onDragEnd:()=>Me(!1),onPointerDown:Te=>{Te.target instanceof HTMLElement&&Te.target.dataset.dismissible==="false"||Ee(!0)},onPointerUp:()=>Ee(!1)},V.filter(Te=>!Te.position&&Z===0||Te.position===H).map((Te,Be)=>{var Pt,en;return ne.createElement(Dx,{key:Te.id,icons:he,index:Be,toast:Te,defaultRichColors:N,duration:(Pt=K?.duration)!=null?Pt:L,className:K?.className,descriptionClassName:K?.descriptionClassName,invert:c,visibleToasts:P,closeButton:(en=K?.closeButton)!=null?en:g,interacting:ze,position:H,style:K?.style,unstyled:K?.unstyled,classNames:K?.classNames,cancelButtonStyle:K?.cancelButtonStyle,actionButtonStyle:K?.actionButtonStyle,closeButtonAriaLabel:K?.closeButtonAriaLabel,removeToast:q,toasts:V.filter(Je=>Je.position==Te.position),heights:ke.filter(Je=>Je.position==Te.position),setHeights:Re,expandByDefault:m,gap:W,expanded:Se,swipeDirections:a.swipeDirections})})):null}))}),Lx=new I1({defaultOptions:{queries:{staleTime:1e3*60,retry:1}}}),Ux="modulepreload",Bx=function(n){return"/"+n},vg={},_n=function(a,r,l){let c=Promise.resolve();if(r&&r.length>0){let g=function(p){return Promise.all(p.map(x=>Promise.resolve(x).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),m=d?.nonce||d?.getAttribute("nonce");c=g(r.map(p=>{if(p=Bx(p),p in vg)return;vg[p]=!0;const x=p.endsWith(".css"),y=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${y}`))return;const T=document.createElement("link");if(T.rel=x?"stylesheet":Ux,x||(T.as="script"),T.crossOrigin="",T.href=p,m&&T.setAttribute("nonce",m),document.head.appendChild(T),x)return new Promise((N,L)=>{T.addEventListener("load",N),T.addEventListener("error",()=>L(new Error(`Unable to preload CSS for ${p}`)))})}))}function f(d){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=d,window.dispatchEvent(m),!m.defaultPrevented)throw d}return c.then(d=>{for(const m of d||[])m.status==="rejected"&&f(m.reason);return a().catch(f)})};var Ny=n=>{throw TypeError(n)},qx=(n,a,r)=>a.has(n)||Ny("Cannot "+r),lf=(n,a,r)=>(qx(n,a,"read from private field"),r?r.call(n):a.get(n)),Hx=(n,a,r)=>a.has(n)?Ny("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,r),bg="popstate";function Qx(n={}){function a(l,c){let{pathname:f,search:d,hash:m}=l.location;return Zs("",{pathname:f,search:d,hash:m},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function r(l,c){return typeof c=="string"?c:ma(c)}return Gx(a,r,null,n)}function qe(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function zt(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function Px(){return Math.random().toString(36).substring(2,10)}function xg(n,a){return{usr:n.state,key:n.key,idx:a}}function Zs(n,a,r=null,l){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?vi(a):a,state:r,key:a&&a.key||l||Px()}}function ma({pathname:n="/",search:a="",hash:r=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),r&&r!=="#"&&(n+=r.charAt(0)==="#"?r:"#"+r),n}function vi(n){let a={};if(n){let r=n.indexOf("#");r>=0&&(a.hash=n.substring(r),n=n.substring(0,r));let l=n.indexOf("?");l>=0&&(a.search=n.substring(l),n=n.substring(0,l)),n&&(a.pathname=n)}return a}function Gx(n,a,r,l={}){let{window:c=document.defaultView,v5Compat:f=!1}=l,d=c.history,m="POP",g=null,p=x();p==null&&(p=0,d.replaceState({...d.state,idx:p},""));function x(){return(d.state||{idx:null}).idx}function y(){m="POP";let P=x(),K=P==null?null:P-p;p=P,g&&g({action:m,location:B.location,delta:K})}function T(P,K){m="PUSH";let Y=Zs(B.location,P,K);p=x()+1;let W=xg(Y,p),he=B.createHref(Y);try{d.pushState(W,"",he)}catch(de){if(de instanceof DOMException&&de.name==="DataCloneError")throw de;c.location.assign(he)}f&&g&&g({action:m,location:B.location,delta:1})}function N(P,K){m="REPLACE";let Y=Zs(B.location,P,K);p=x();let W=xg(Y,p),he=B.createHref(Y);d.replaceState(W,"",he),f&&g&&g({action:m,location:B.location,delta:0})}function L(P){return Oy(P)}let B={get action(){return m},get location(){return n(c,d)},listen(P){if(g)throw new Error("A history only accepts one active listener");return c.addEventListener(bg,y),g=P,()=>{c.removeEventListener(bg,y),g=null}},createHref(P){return a(c,P)},createURL:L,encodeLocation(P){let K=L(P);return{pathname:K.pathname,search:K.search,hash:K.hash}},push:T,replace:N,go(P){return d.go(P)}};return B}function Oy(n,a=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),qe(r,"No window.location.(origin|href) available to create URL");let l=typeof n=="string"?n:ma(n);return l=l.replace(/ $/,"%20"),!a&&l.startsWith("//")&&(l=r+l),new URL(l,r)}var Ks,Sg=class{constructor(n){if(Hx(this,Ks,new Map),n)for(let[a,r]of n)this.set(a,r)}get(n){if(lf(this,Ks).has(n))return lf(this,Ks).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,a){lf(this,Ks).set(n,a)}};Ks=new WeakMap;var Kx=new Set(["lazy","caseSensitive","path","id","index","children"]);function Vx(n){return Kx.has(n)}var Yx=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Fx(n){return Yx.has(n)}function Xx(n){return n.index===!0}function Js(n,a,r=[],l={},c=!1){return n.map((f,d)=>{let m=[...r,String(d)],g=typeof f.id=="string"?f.id:m.join("-");if(qe(f.index!==!0||!f.children,"Cannot specify children on an index route"),qe(c||!l[g],`Found a route id collision on id "${g}". Route id's must be globally unique within Data Router usages`),Xx(f)){let p={...f,id:g};return l[g]=wg(p,a(p)),p}else{let p={...f,id:g,children:void 0};return l[g]=wg(p,a(p)),f.children&&(p.children=Js(f.children,a,m,l,c)),p}})}function wg(n,a){return Object.assign(n,{...a,...typeof a.lazy=="object"&&a.lazy!=null?{lazy:{...n.lazy,...a.lazy}}:{}})}function di(n,a,r="/"){return Vs(n,a,r,!1)}function Vs(n,a,r,l){let c=typeof a=="string"?vi(a):a,f=Vn(c.pathname||"/",r);if(f==null)return null;let d=My(n);Zx(d);let m=null;for(let g=0;m==null&&g<d.length;++g){let p=lS(f);m=rS(d[g],p,l)}return m}function Ix(n,a){let{route:r,pathname:l,params:c}=n;return{id:r.id,pathname:l,params:c,data:a[r.id],loaderData:a[r.id],handle:r.handle}}function My(n,a=[],r=[],l="",c=!1){let f=(d,m,g=c,p)=>{let x={relativePath:p===void 0?d.path||"":p,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(l)&&g)return;qe(x.relativePath.startsWith(l),`Absolute route path "${x.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(l.length)}let y=da([l,x.relativePath]),T=r.concat(x);d.children&&d.children.length>0&&(qe(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),My(d.children,a,T,y,g)),!(d.path==null&&!d.index)&&a.push({path:y,score:aS(y,d.index),routesMeta:T})};return n.forEach((d,m)=>{if(d.path===""||!d.path?.includes("?"))f(d,m);else for(let g of Dy(d.path))f(d,m,!0,g)}),a}function Dy(n){let a=n.split("/");if(a.length===0)return[];let[r,...l]=a,c=r.endsWith("?"),f=r.replace(/\?$/,"");if(l.length===0)return c?[f,""]:[f];let d=Dy(l.join("/")),m=[];return m.push(...d.map(g=>g===""?f:[f,g].join("/"))),c&&m.push(...d),m.map(g=>n.startsWith("/")&&g===""?"/":g)}function Zx(n){n.sort((a,r)=>a.score!==r.score?r.score-a.score:iS(a.routesMeta.map(l=>l.childrenIndex),r.routesMeta.map(l=>l.childrenIndex)))}var Jx=/^:[\w-]+$/,$x=3,Wx=2,eS=1,tS=10,nS=-2,Eg=n=>n==="*";function aS(n,a){let r=n.split("/"),l=r.length;return r.some(Eg)&&(l+=nS),a&&(l+=Wx),r.filter(c=>!Eg(c)).reduce((c,f)=>c+(Jx.test(f)?$x:f===""?eS:tS),l)}function iS(n,a){return n.length===a.length&&n.slice(0,-1).every((l,c)=>l===a[c])?n[n.length-1]-a[a.length-1]:0}function rS(n,a,r=!1){let{routesMeta:l}=n,c={},f="/",d=[];for(let m=0;m<l.length;++m){let g=l[m],p=m===l.length-1,x=f==="/"?a:a.slice(f.length)||"/",y=Qo({path:g.relativePath,caseSensitive:g.caseSensitive,end:p},x),T=g.route;if(!y&&p&&r&&!l[l.length-1].route.index&&(y=Qo({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},x)),!y)return null;Object.assign(c,y.params),d.push({params:c,pathname:da([f,y.pathname]),pathnameBase:cS(da([f,y.pathnameBase])),route:T}),y.pathnameBase!=="/"&&(f=da([f,y.pathnameBase]))}return d}function Qo(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,l]=sS(n.path,n.caseSensitive,n.end),c=a.match(r);if(!c)return null;let f=c[0],d=f.replace(/(.)\/+$/,"$1"),m=c.slice(1);return{params:l.reduce((p,{paramName:x,isOptional:y},T)=>{if(x==="*"){let L=m[T]||"";d=f.slice(0,f.length-L.length).replace(/(.)\/+$/,"$1")}const N=m[T];return y&&!N?p[x]=void 0:p[x]=(N||"").replace(/%2F/g,"/"),p},{}),pathname:f,pathnameBase:d,pattern:n}}function sS(n,a=!1,r=!0){zt(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let l=[],c="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,g)=>(l.push({paramName:m,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(l.push({paramName:"*"}),c+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?c+="\\/*$":n!==""&&n!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,a?void 0:"i"),l]}function lS(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return zt(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function Vn(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let r=a.endsWith("/")?a.length-1:a.length,l=n.charAt(r);return l&&l!=="/"?null:n.slice(r)||"/"}function oS({basename:n,pathname:a}){return a==="/"?n:da([n,a])}var jy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Xf=n=>jy.test(n);function uS(n,a="/"){let{pathname:r,search:l="",hash:c=""}=typeof n=="string"?vi(n):n,f;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?f=Tg(r.substring(1),"/"):f=Tg(r,a)):f=a,{pathname:f,search:fS(l),hash:dS(c)}}function Tg(n,a){let r=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(c=>{c===".."?r.length>1&&r.pop():c!=="."&&r.push(c)}),r.length>1?r.join("/"):"/"}function of(n,a,r,l){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(l)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function zy(n){return n.filter((a,r)=>r===0||a.route.path&&a.route.path.length>0)}function If(n){let a=zy(n);return a.map((r,l)=>l===a.length-1?r.pathname:r.pathnameBase)}function Zf(n,a,r,l=!1){let c;typeof n=="string"?c=vi(n):(c={...n},qe(!c.pathname||!c.pathname.includes("?"),of("?","pathname","search",c)),qe(!c.pathname||!c.pathname.includes("#"),of("#","pathname","hash",c)),qe(!c.search||!c.search.includes("#"),of("#","search","hash",c)));let f=n===""||c.pathname==="",d=f?"/":c.pathname,m;if(d==null)m=r;else{let y=a.length-1;if(!l&&d.startsWith("..")){let T=d.split("/");for(;T[0]==="..";)T.shift(),y-=1;c.pathname=T.join("/")}m=y>=0?a[y]:"/"}let g=uS(c,m),p=d&&d!=="/"&&d.endsWith("/"),x=(f||d===".")&&r.endsWith("/");return!g.pathname.endsWith("/")&&(p||x)&&(g.pathname+="/"),g}var da=n=>n.join("/").replace(/\/\/+/g,"/"),cS=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),fS=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,dS=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,el=class{constructor(n,a,r,l=!1){this.status=n,this.statusText=a||"",this.internal=l,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function $s(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function tl(n){return n.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ly=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Uy(n,a){let r=n;if(typeof r!="string"||!jy.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let l=r,c=!1;if(Ly)try{let f=new URL(window.location.href),d=r.startsWith("//")?new URL(f.protocol+r):new URL(r),m=Vn(d.pathname,a);d.origin===f.origin&&m!=null?r=m+d.search+d.hash:c=!0}catch{zt(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:l,isExternal:c,to:r}}var mi=Symbol("Uninstrumented");function hS(n,a){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};n.forEach(c=>c({id:a.id,index:a.index,path:a.path,instrument(f){let d=Object.keys(r);for(let m of d)f[m]&&r[m].push(f[m])}}));let l={};if(typeof a.lazy=="function"&&r.lazy.length>0){let c=qr(r.lazy,a.lazy,()=>{});c&&(l.lazy=c)}if(typeof a.lazy=="object"){let c=a.lazy;["middleware","loader","action"].forEach(f=>{let d=c[f],m=r[`lazy.${f}`];if(typeof d=="function"&&m.length>0){let g=qr(m,d,()=>{});g&&(l.lazy=Object.assign(l.lazy||{},{[f]:g}))}})}return["loader","action"].forEach(c=>{let f=a[c];if(typeof f=="function"&&r[c].length>0){let d=f[mi]??f,m=qr(r[c],d,(...g)=>Ag(g[0]));m&&(c==="loader"&&d.hydrate===!0&&(m.hydrate=!0),m[mi]=d,l[c]=m)}}),a.middleware&&a.middleware.length>0&&r.middleware.length>0&&(l.middleware=a.middleware.map(c=>{let f=c[mi]??c,d=qr(r.middleware,f,(...m)=>Ag(m[0]));return d?(d[mi]=f,d):c})),l}function mS(n,a){let r={navigate:[],fetch:[]};if(a.forEach(l=>l({instrument(c){let f=Object.keys(c);for(let d of f)c[d]&&r[d].push(c[d])}})),r.navigate.length>0){let l=n.navigate[mi]??n.navigate,c=qr(r.navigate,l,(...f)=>{let[d,m]=f;return{to:typeof d=="number"||typeof d=="string"?d:d?ma(d):".",...Cg(n,m??{})}});c&&(c[mi]=l,n.navigate=c)}if(r.fetch.length>0){let l=n.fetch[mi]??n.fetch,c=qr(r.fetch,l,(...f)=>{let[d,,m,g]=f;return{href:m??".",fetcherKey:d,...Cg(n,g??{})}});c&&(c[mi]=l,n.fetch=c)}return n}function qr(n,a,r){return n.length===0?null:async(...l)=>{let c=await By(n,r(...l),()=>a(...l),n.length-1);if(c.type==="error")throw c.value;return c.value}}async function By(n,a,r,l){let c=n[l],f;if(c){let d,m=async()=>(d?console.error("You cannot call instrumented handlers more than once"):d=By(n,a,r,l-1),f=await d,qe(f,"Expected a result"),f.type==="error"&&f.value instanceof Error?{status:"error",error:f.value}:{status:"success",error:void 0});try{await c(m,a)}catch(g){console.error("An instrumentation function threw an error:",g)}d||await m(),await d}else try{f={type:"success",value:await r()}}catch(d){f={type:"error",value:d}}return f||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Ag(n){let{request:a,context:r,params:l,unstable_pattern:c}=n;return{request:pS(a),params:{...l},unstable_pattern:c,context:gS(r)}}function Cg(n,a){return{currentUrl:ma(n.state.location),..."formMethod"in a?{formMethod:a.formMethod}:{},..."formEncType"in a?{formEncType:a.formEncType}:{},..."formData"in a?{formData:a.formData}:{},..."body"in a?{body:a.body}:{}}}function pS(n){return{method:n.method,url:n.url,headers:{get:(...a)=>n.headers.get(...a)}}}function gS(n){if(vS(n)){let a={...n};return Object.freeze(a),a}else return{get:a=>n.get(a)}}var yS=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function vS(n){if(n===null||typeof n!="object")return!1;const a=Object.getPrototypeOf(n);return a===Object.prototype||a===null||Object.getOwnPropertyNames(a).sort().join("\0")===yS}var qy=["POST","PUT","PATCH","DELETE"],bS=new Set(qy),xS=["GET",...qy],SS=new Set(xS),Hy=new Set([301,302,303,307,308]),wS=new Set([307,308]),uf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ES={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},qs={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},TS=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),Qy="remix-router-transitions",Py=Symbol("ResetLoaderData");function AS(n){const a=n.window?n.window:typeof window<"u"?window:void 0,r=typeof a<"u"&&typeof a.document<"u"&&typeof a.document.createElement<"u";qe(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let l=n.hydrationRouteProperties||[],c=n.mapRouteProperties||TS,f=c;if(n.unstable_instrumentations){let w=n.unstable_instrumentations;f=_=>({...c(_),...hS(w.map(z=>z.route).filter(Boolean),_)})}let d={},m=Js(n.routes,f,void 0,d),g,p=n.basename||"/";p.startsWith("/")||(p=`/${p}`);let x=n.dataStrategy||NS,y={...n.future},T=null,N=new Set,L=null,B=null,P=null,K=n.hydrationData!=null,Y=di(m,n.history.location,p),W=!1,he=null,de;if(Y==null&&!n.patchRoutesOnNavigation){let w=Pn(404,{pathname:n.history.location.pathname}),{matches:_,route:z}=xo(m);de=!0,Y=_,he={[z.id]:w}}else if(Y&&!n.hydrationData&&Tt(Y,m,n.history.location.pathname).active&&(Y=null),Y)if(Y.some(w=>w.route.lazy))de=!1;else if(!Y.some(w=>Jf(w.route)))de=!0;else{let w=n.hydrationData?n.hydrationData.loaderData:null,_=n.hydrationData?n.hydrationData.errors:null;if(_){let z=Y.findIndex(J=>_[J.route.id]!==void 0);de=Y.slice(0,z+1).every(J=>!_f(J.route,w,_))}else de=Y.every(z=>!_f(z.route,w,_))}else{de=!1,Y=[];let w=Tt(null,m,n.history.location.pathname);w.active&&w.matches&&(W=!0,Y=w.matches)}let fe,R={historyAction:n.history.action,location:n.history.location,matches:Y,initialized:de,navigation:uf,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||he,fetchers:new Map,blockers:new Map},V="POP",ie=null,ke=!1,Re,Se=!1,Me=new Map,ze=null,Ee=!1,k=!1,X=new Set,Q=new Map,me=0,ye=-1,A=new Map,q=new Set,H=new Map,Z=new Map,ee=new Set,$=new Map,ae,Te=null;function Be(){if(T=n.history.listen(({action:w,location:_,delta:z})=>{if(ae){ae(),ae=void 0;return}zt($.size===0||z!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let J=ba({currentLocation:R.location,nextLocation:_,historyAction:w});if(J&&z!=null){let te=new Promise(ve=>{ae=ve});n.history.go(z*-1),Xn(J,{state:"blocked",location:_,proceed(){Xn(J,{state:"proceeding",proceed:void 0,reset:void 0,location:_}),te.then(()=>n.history.go(z))},reset(){let ve=new Map(R.blockers);ve.set(J,qs),Je({blockers:ve})}}),ie?.resolve(),ie=null;return}return ln(w,_)}),r){XS(a,Me);let w=()=>IS(a,Me);a.addEventListener("pagehide",w),ze=()=>a.removeEventListener("pagehide",w)}return R.initialized||ln("POP",R.location,{initialHydration:!0}),fe}function Pt(){T&&T(),ze&&ze(),N.clear(),Re&&Re.abort(),R.fetchers.forEach((w,_)=>Nn(_)),R.blockers.forEach((w,_)=>yn(_))}function en(w){return N.add(w),()=>N.delete(w)}function Je(w,_={}){w.matches&&(w.matches=w.matches.map(te=>{let ve=d[te.route.id],se=te.route;return se.element!==ve.element||se.errorElement!==ve.errorElement||se.hydrateFallbackElement!==ve.hydrateFallbackElement?{...te,route:ve}:te})),R={...R,...w};let z=[],J=[];R.fetchers.forEach((te,ve)=>{te.state==="idle"&&(ee.has(ve)?z.push(ve):J.push(ve))}),ee.forEach(te=>{!R.fetchers.has(te)&&!Q.has(te)&&z.push(te)}),[...N].forEach(te=>te(R,{deletedFetchers:z,newErrors:w.errors??null,viewTransitionOpts:_.viewTransitionOpts,flushSync:_.flushSync===!0})),z.forEach(te=>Nn(te)),J.forEach(te=>R.fetchers.delete(te))}function Fn(w,_,{flushSync:z}={}){let J=R.actionData!=null&&R.navigation.formMethod!=null&&Wt(R.navigation.formMethod)&&R.navigation.state==="loading"&&w.state?._isRedirect!==!0,te;_.actionData?Object.keys(_.actionData).length>0?te=_.actionData:te=null:J?te=R.actionData:te=null;let ve=_.loaderData?Lg(R.loaderData,_.loaderData,_.matches||[],_.errors):R.loaderData,se=R.blockers;se.size>0&&(se=new Map(se),se.forEach((Ae,xe)=>se.set(xe,qs)));let re=Ee?!1:Et(w,_.matches||R.matches),le=ke===!0||R.navigation.formMethod!=null&&Wt(R.navigation.formMethod)&&w.state?._isRedirect!==!0;g&&(m=g,g=void 0),Ee||V==="POP"||(V==="PUSH"?n.history.push(w,w.state):V==="REPLACE"&&n.history.replace(w,w.state));let ge;if(V==="POP"){let Ae=Me.get(R.location.pathname);Ae&&Ae.has(w.pathname)?ge={currentLocation:R.location,nextLocation:w}:Me.has(w.pathname)&&(ge={currentLocation:w,nextLocation:R.location})}else if(Se){let Ae=Me.get(R.location.pathname);Ae?Ae.add(w.pathname):(Ae=new Set([w.pathname]),Me.set(R.location.pathname,Ae)),ge={currentLocation:R.location,nextLocation:w}}Je({..._,actionData:te,loaderData:ve,historyAction:V,location:w,initialized:!0,navigation:uf,revalidation:"idle",restoreScrollPosition:re,preventScrollReset:le,blockers:se},{viewTransitionOpts:ge,flushSync:z===!0}),V="POP",ke=!1,Se=!1,Ee=!1,k=!1,ie?.resolve(),ie=null,Te?.resolve(),Te=null}async function sn(w,_){if(ie?.resolve(),ie=null,typeof w=="number"){ie||(ie=Hg());let Ke=ie.promise;return n.history.go(w),Ke}let z=Rf(R.location,R.matches,p,w,_?.fromRouteId,_?.relative),{path:J,submission:te,error:ve}=Rg(!1,z,_),se=R.location,re=Zs(R.location,J,_&&_.state);re={...re,...n.history.encodeLocation(re)};let le=_&&_.replace!=null?_.replace:void 0,ge="PUSH";le===!0?ge="REPLACE":le===!1||te!=null&&Wt(te.formMethod)&&te.formAction===R.location.pathname+R.location.search&&(ge="REPLACE");let Ae=_&&"preventScrollReset"in _?_.preventScrollReset===!0:void 0,xe=(_&&_.flushSync)===!0,Ze=ba({currentLocation:se,nextLocation:re,historyAction:ge});if(Ze){Xn(Ze,{state:"blocked",location:re,proceed(){Xn(Ze,{state:"proceeding",proceed:void 0,reset:void 0,location:re}),sn(w,_)},reset(){let Ke=new Map(R.blockers);Ke.set(Ze,qs),Je({blockers:Ke})}});return}await ln(ge,re,{submission:te,pendingError:ve,preventScrollReset:Ae,replace:_&&_.replace,enableViewTransition:_&&_.viewTransition,flushSync:xe,callSiteDefaultShouldRevalidate:_&&_.unstable_defaultShouldRevalidate})}function Si(){Te||(Te=Hg()),Qa(),Je({revalidation:"loading"});let w=Te.promise;return R.navigation.state==="submitting"?w:R.navigation.state==="idle"?(ln(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),w):(ln(V||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:Se===!0}),w)}async function ln(w,_,z){Re&&Re.abort(),Re=null,V=w,Ee=(z&&z.startUninterruptedRevalidation)===!0,ot(R.location,R.matches),ke=(z&&z.preventScrollReset)===!0,Se=(z&&z.enableViewTransition)===!0;let J=g||m,te=z&&z.overrideNavigation,ve=z?.initialHydration&&R.matches&&R.matches.length>0&&!W?R.matches:di(J,_,p),se=(z&&z.flushSync)===!0;if(ve&&R.initialized&&!k&&BS(R.location,_)&&!(z&&z.submission&&Wt(z.submission.formMethod))){Fn(_,{matches:ve},{flushSync:se});return}let re=Tt(ve,J,_.pathname);if(re.active&&re.matches&&(ve=re.matches),!ve){let{error:bt,notFoundMatches:xt,route:Ve}=In(_.pathname);Fn(_,{matches:xt,loaderData:{},errors:{[Ve.id]:bt}},{flushSync:se});return}Re=new AbortController;let le=Br(n.history,_,Re.signal,z&&z.submission),ge=n.getContext?await n.getContext():new Sg,Ae;if(z&&z.pendingError)Ae=[hi(ve).route.id,{type:"error",error:z.pendingError}];else if(z&&z.submission&&Wt(z.submission.formMethod)){let bt=await ga(le,_,z.submission,ve,ge,re.active,z&&z.initialHydration===!0,{replace:z.replace,flushSync:se});if(bt.shortCircuited)return;if(bt.pendingActionResult){let[xt,Ve]=bt.pendingActionResult;if(Rn(Ve)&&$s(Ve.error)&&Ve.error.status===404){Re=null,Fn(_,{matches:bt.matches,loaderData:{},errors:{[xt]:Ve.error}});return}}ve=bt.matches||ve,Ae=bt.pendingActionResult,te=cf(_,z.submission),se=!1,re.active=!1,le=Br(n.history,le.url,le.signal)}let{shortCircuited:xe,matches:Ze,loaderData:Ke,errors:yt}=await wi(le,_,ve,ge,re.active,te,z&&z.submission,z&&z.fetcherSubmission,z&&z.replace,z&&z.initialHydration===!0,se,Ae,z&&z.callSiteDefaultShouldRevalidate);xe||(Re=null,Fn(_,{matches:Ze||ve,...Ug(Ae),loaderData:Ke,errors:yt}))}async function ga(w,_,z,J,te,ve,se,re={}){Qa();let le=YS(_,z);if(Je({navigation:le},{flushSync:re.flushSync===!0}),ve){let xe=await vn(J,_.pathname,w.signal);if(xe.type==="aborted")return{shortCircuited:!0};if(xe.type==="error"){if(xe.partialMatches.length===0){let{matches:Ke,route:yt}=xo(m);return{matches:Ke,pendingActionResult:[yt.id,{type:"error",error:xe.error}]}}let Ze=hi(xe.partialMatches).route.id;return{matches:xe.partialMatches,pendingActionResult:[Ze,{type:"error",error:xe.error}]}}else if(xe.matches)J=xe.matches;else{let{notFoundMatches:Ze,error:Ke,route:yt}=In(_.pathname);return{matches:Ze,pendingActionResult:[yt.id,{type:"error",error:Ke}]}}}let ge,Ae=_o(J,_);if(!Ae.route.action&&!Ae.route.lazy)ge={type:"error",error:Pn(405,{method:w.method,pathname:_.pathname,routeId:Ae.route.id})};else{let xe=Hr(f,d,w,J,Ae,se?[]:l,te),Ze=await ya(w,xe,te,null);if(ge=Ze[Ae.route.id],!ge){for(let Ke of J)if(Ze[Ke.route.id]){ge=Ze[Ke.route.id];break}}if(w.signal.aborted)return{shortCircuited:!0}}if(Xi(ge)){let xe;return re&&re.replace!=null?xe=re.replace:xe=Dg(ge.response.headers.get("Location"),new URL(w.url),p,n.history)===R.location.pathname+R.location.search,await gt(w,ge,!0,{submission:z,replace:xe}),{shortCircuited:!0}}if(Rn(ge)){let xe=hi(J,Ae.route.id);return(re&&re.replace)!==!0&&(V="PUSH"),{matches:J,pendingActionResult:[xe.route.id,ge,Ae.route.id]}}return{matches:J,pendingActionResult:[Ae.route.id,ge]}}async function wi(w,_,z,J,te,ve,se,re,le,ge,Ae,xe,Ze){let Ke=ve||cf(_,se),yt=se||re||qg(Ke),bt=!Ee&&!ge;if(te){if(bt){let At=Zt(xe);Je({navigation:Ke,...At!==void 0?{actionData:At}:{}},{flushSync:Ae})}let Ye=await vn(z,_.pathname,w.signal);if(Ye.type==="aborted")return{shortCircuited:!0};if(Ye.type==="error"){if(Ye.partialMatches.length===0){let{matches:$n,route:Vt}=xo(m);return{matches:$n,loaderData:{},errors:{[Vt.id]:Ye.error}}}let At=hi(Ye.partialMatches).route.id;return{matches:Ye.partialMatches,loaderData:{},errors:{[At]:Ye.error}}}else if(Ye.matches)z=Ye.matches;else{let{error:At,notFoundMatches:$n,route:Vt}=In(_.pathname);return{matches:$n,loaderData:{},errors:{[Vt.id]:At}}}}let xt=g||m,{dsMatches:Ve,revalidatingFetchers:Ht}=_g(w,J,f,d,n.history,R,z,yt,_,ge?[]:l,ge===!0,k,X,ee,H,q,xt,p,n.patchRoutesOnNavigation!=null,xe,Ze);if(ye=++me,!n.dataStrategy&&!Ve.some(Ye=>Ye.shouldLoad)&&!Ve.some(Ye=>Ye.route.middleware&&Ye.route.middleware.length>0)&&Ht.length===0){let Ye=Lt();return Fn(_,{matches:z,loaderData:{},errors:xe&&Rn(xe[1])?{[xe[0]]:xe[1].error}:null,...Ug(xe),...Ye?{fetchers:new Map(R.fetchers)}:{}},{flushSync:Ae}),{shortCircuited:!0}}if(bt){let Ye={};if(!te){Ye.navigation=Ke;let At=Zt(xe);At!==void 0&&(Ye.actionData=At)}Ht.length>0&&(Ye.fetchers=Ei(Ht)),Je(Ye,{flushSync:Ae})}Ht.forEach(Ye=>{ct(Ye.key),Ye.controller&&Q.set(Ye.key,Ye.controller)});let un=()=>Ht.forEach(Ye=>ct(Ye.key));Re&&Re.signal.addEventListener("abort",un);let{loaderResults:mt,fetcherResults:Zn}=await ra(Ve,Ht,w,J);if(w.signal.aborted)return{shortCircuited:!0};Re&&Re.signal.removeEventListener("abort",un),Ht.forEach(Ye=>Q.delete(Ye.key));let bn=So(mt);if(bn)return await gt(w,bn.result,!0,{replace:le}),{shortCircuited:!0};if(bn=So(Zn),bn)return q.add(bn.key),await gt(w,bn.result,!0,{replace:le}),{shortCircuited:!0};let{loaderData:Jn,errors:Mn}=zg(R,z,mt,xe,Ht,Zn);ge&&R.errors&&(Mn={...R.errors,...Mn});let Sa=Lt(),Ci=er(ye),Ri=Sa||Ci||Ht.length>0;return{matches:z,loaderData:Jn,errors:Mn,...Ri?{fetchers:new Map(R.fetchers)}:{}}}function Zt(w){if(w&&!Rn(w[1]))return{[w[0]]:w[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function Ei(w){return w.forEach(_=>{let z=R.fetchers.get(_.key),J=Hs(void 0,z?z.data:void 0);R.fetchers.set(_.key,J)}),new Map(R.fetchers)}async function Ti(w,_,z,J){ct(w);let te=(J&&J.flushSync)===!0,ve=g||m,se=Rf(R.location,R.matches,p,z,_,J?.relative),re=di(ve,se,p),le=Tt(re,ve,se);if(le.active&&le.matches&&(re=le.matches),!re){tn(w,_,Pn(404,{pathname:se}),{flushSync:te});return}let{path:ge,submission:Ae,error:xe}=Rg(!0,se,J);if(xe){tn(w,_,xe,{flushSync:te});return}let Ze=n.getContext?await n.getContext():new Sg,Ke=(J&&J.preventScrollReset)===!0;if(Ae&&Wt(Ae.formMethod)){await Gt(w,_,ge,re,Ze,le.active,te,Ke,Ae,J&&J.unstable_defaultShouldRevalidate);return}H.set(w,{routeId:_,path:ge}),await ia(w,_,ge,re,Ze,le.active,te,Ke,Ae)}async function Gt(w,_,z,J,te,ve,se,re,le,ge){Qa(),H.delete(w);let Ae=R.fetchers.get(w);Kt(w,FS(le,Ae),{flushSync:se});let xe=new AbortController,Ze=Br(n.history,z,xe.signal,le);if(ve){let Fe=await vn(J,new URL(Ze.url).pathname,Ze.signal,w);if(Fe.type==="aborted")return;if(Fe.type==="error"){tn(w,_,Fe.error,{flushSync:se});return}else if(Fe.matches)J=Fe.matches;else{tn(w,_,Pn(404,{pathname:z}),{flushSync:se});return}}let Ke=_o(J,z);if(!Ke.route.action&&!Ke.route.lazy){let Fe=Pn(405,{method:le.formMethod,pathname:z,routeId:_});tn(w,_,Fe,{flushSync:se});return}Q.set(w,xe);let yt=me,bt=Hr(f,d,Ze,J,Ke,l,te),xt=await ya(Ze,bt,te,w),Ve=xt[Ke.route.id];if(!Ve){for(let Fe of bt)if(xt[Fe.route.id]){Ve=xt[Fe.route.id];break}}if(Ze.signal.aborted){Q.get(w)===xe&&Q.delete(w);return}if(ee.has(w)){if(Xi(Ve)||Rn(Ve)){Kt(w,Ha(void 0));return}}else{if(Xi(Ve))if(Q.delete(w),ye>yt){Kt(w,Ha(void 0));return}else return q.add(w),Kt(w,Hs(le)),gt(Ze,Ve,!1,{fetcherSubmission:le,preventScrollReset:re});if(Rn(Ve)){tn(w,_,Ve.error);return}}let Ht=R.navigation.location||R.location,un=Br(n.history,Ht,xe.signal),mt=g||m,Zn=R.navigation.state!=="idle"?di(mt,R.navigation.location,p):R.matches;qe(Zn,"Didn't find any matches after fetcher action");let bn=++me;A.set(w,bn);let Jn=Hs(le,Ve.data);R.fetchers.set(w,Jn);let{dsMatches:Mn,revalidatingFetchers:Sa}=_g(un,te,f,d,n.history,R,Zn,le,Ht,l,!1,k,X,ee,H,q,mt,p,n.patchRoutesOnNavigation!=null,[Ke.route.id,Ve],ge);Sa.filter(Fe=>Fe.key!==w).forEach(Fe=>{let _i=Fe.key,sl=R.fetchers.get(_i),Ir=Hs(void 0,sl?sl.data:void 0);R.fetchers.set(_i,Ir),ct(_i),Fe.controller&&Q.set(_i,Fe.controller)}),Je({fetchers:new Map(R.fetchers)});let Ci=()=>Sa.forEach(Fe=>ct(Fe.key));xe.signal.addEventListener("abort",Ci);let{loaderResults:Ri,fetcherResults:Ye}=await ra(Mn,Sa,un,te);if(xe.signal.aborted)return;if(xe.signal.removeEventListener("abort",Ci),A.delete(w),Q.delete(w),Sa.forEach(Fe=>Q.delete(Fe.key)),R.fetchers.has(w)){let Fe=Ha(Ve.data);R.fetchers.set(w,Fe)}let At=So(Ri);if(At)return gt(un,At.result,!1,{preventScrollReset:re});if(At=So(Ye),At)return q.add(At.key),gt(un,At.result,!1,{preventScrollReset:re});let{loaderData:$n,errors:Vt}=zg(R,Zn,Ri,void 0,Sa,Ye);er(bn),R.navigation.state==="loading"&&bn>ye?(qe(V,"Expected pending action"),Re&&Re.abort(),Fn(R.navigation.location,{matches:Zn,loaderData:$n,errors:Vt,fetchers:new Map(R.fetchers)})):(Je({errors:Vt,loaderData:Lg(R.loaderData,$n,Zn,Vt),fetchers:new Map(R.fetchers)}),k=!1)}async function ia(w,_,z,J,te,ve,se,re,le){let ge=R.fetchers.get(w);Kt(w,Hs(le,ge?ge.data:void 0),{flushSync:se});let Ae=new AbortController,xe=Br(n.history,z,Ae.signal);if(ve){let Ve=await vn(J,new URL(xe.url).pathname,xe.signal,w);if(Ve.type==="aborted")return;if(Ve.type==="error"){tn(w,_,Ve.error,{flushSync:se});return}else if(Ve.matches)J=Ve.matches;else{tn(w,_,Pn(404,{pathname:z}),{flushSync:se});return}}let Ze=_o(J,z);Q.set(w,Ae);let Ke=me,yt=Hr(f,d,xe,J,Ze,l,te),xt=(await ya(xe,yt,te,w))[Ze.route.id];if(Q.get(w)===Ae&&Q.delete(w),!xe.signal.aborted){if(ee.has(w)){Kt(w,Ha(void 0));return}if(Xi(xt))if(ye>Ke){Kt(w,Ha(void 0));return}else{q.add(w),await gt(xe,xt,!1,{preventScrollReset:re});return}if(Rn(xt)){tn(w,_,xt.error);return}Kt(w,Ha(xt.data))}}async function gt(w,_,z,{submission:J,fetcherSubmission:te,preventScrollReset:ve,replace:se}={}){z||(ie?.resolve(),ie=null),_.response.headers.has("X-Remix-Revalidate")&&(k=!0);let re=_.response.headers.get("Location");qe(re,"Expected a Location header on the redirect Response"),re=Dg(re,new URL(w.url),p,n.history);let le=Zs(R.location,re,{_isRedirect:!0});if(r){let yt=!1;if(_.response.headers.has("X-Remix-Reload-Document"))yt=!0;else if(Xf(re)){const bt=Oy(re,!0);yt=bt.origin!==a.location.origin||Vn(bt.pathname,p)==null}if(yt){se?a.location.replace(re):a.location.assign(re);return}}Re=null;let ge=se===!0||_.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ae,formAction:xe,formEncType:Ze}=R.navigation;!J&&!te&&Ae&&xe&&Ze&&(J=qg(R.navigation));let Ke=J||te;if(wS.has(_.response.status)&&Ke&&Wt(Ke.formMethod))await ln(ge,le,{submission:{...Ke,formAction:re},preventScrollReset:ve||ke,enableViewTransition:z?Se:void 0});else{let yt=cf(le,J);await ln(ge,le,{overrideNavigation:yt,fetcherSubmission:te,preventScrollReset:ve||ke,enableViewTransition:z?Se:void 0})}}async function ya(w,_,z,J){let te,ve={};try{te=await MS(x,w,_,J,z,!1)}catch(se){return _.filter(re=>re.shouldLoad).forEach(re=>{ve[re.route.id]={type:"error",error:se}}),ve}if(w.signal.aborted)return ve;if(!Wt(w.method))for(let se of _){if(te[se.route.id]?.type==="error")break;!te.hasOwnProperty(se.route.id)&&!R.loaderData.hasOwnProperty(se.route.id)&&(!R.errors||!R.errors.hasOwnProperty(se.route.id))&&se.shouldCallHandler()&&(te[se.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${se.route.id}`)})}for(let[se,re]of Object.entries(te))if(PS(re)){let le=re.result;ve[se]={type:"redirect",response:LS(le,w,se,_,p)}}else ve[se]=await zS(re);return ve}async function ra(w,_,z,J){let te=ya(z,w,J,null),ve=Promise.all(_.map(async le=>{if(le.matches&&le.match&&le.request&&le.controller){let Ae=(await ya(le.request,le.matches,J,le.key))[le.match.route.id];return{[le.key]:Ae}}else return Promise.resolve({[le.key]:{type:"error",error:Pn(404,{pathname:le.path})}})})),se=await te,re=(await ve).reduce((le,ge)=>Object.assign(le,ge),{});return{loaderResults:se,fetcherResults:re}}function Qa(){k=!0,H.forEach((w,_)=>{Q.has(_)&&X.add(_),ct(_)})}function Kt(w,_,z={}){R.fetchers.set(w,_),Je({fetchers:new Map(R.fetchers)},{flushSync:(z&&z.flushSync)===!0})}function tn(w,_,z,J={}){let te=hi(R.matches,_);Nn(w),Je({errors:{[te.route.id]:z},fetchers:new Map(R.fetchers)},{flushSync:(J&&J.flushSync)===!0})}function kn(w){return Z.set(w,(Z.get(w)||0)+1),ee.has(w)&&ee.delete(w),R.fetchers.get(w)||ES}function Wi(w,_){ct(w,_?.reason),Kt(w,Ha(null))}function Nn(w){let _=R.fetchers.get(w);Q.has(w)&&!(_&&_.state==="loading"&&A.has(w))&&ct(w),H.delete(w),A.delete(w),q.delete(w),ee.delete(w),X.delete(w),R.fetchers.delete(w)}function va(w){let _=(Z.get(w)||0)-1;_<=0?(Z.delete(w),ee.add(w)):Z.set(w,_),Je({fetchers:new Map(R.fetchers)})}function ct(w,_){let z=Q.get(w);z&&(z.abort(_),Q.delete(w))}function on(w){for(let _ of w){let z=kn(_),J=Ha(z.data);R.fetchers.set(_,J)}}function Lt(){let w=[],_=!1;for(let z of q){let J=R.fetchers.get(z);qe(J,`Expected fetcher: ${z}`),J.state==="loading"&&(q.delete(z),w.push(z),_=!0)}return on(w),_}function er(w){let _=[];for(let[z,J]of A)if(J<w){let te=R.fetchers.get(z);qe(te,`Expected fetcher: ${z}`),te.state==="loading"&&(ct(z),A.delete(z),_.push(z))}return on(_),_.length>0}function Ai(w,_){let z=R.blockers.get(w)||qs;return $.get(w)!==_&&$.set(w,_),z}function yn(w){R.blockers.delete(w),$.delete(w)}function Xn(w,_){let z=R.blockers.get(w)||qs;qe(z.state==="unblocked"&&_.state==="blocked"||z.state==="blocked"&&_.state==="blocked"||z.state==="blocked"&&_.state==="proceeding"||z.state==="blocked"&&_.state==="unblocked"||z.state==="proceeding"&&_.state==="unblocked",`Invalid blocker state transition: ${z.state} -> ${_.state}`);let J=new Map(R.blockers);J.set(w,_),Je({blockers:J})}function ba({currentLocation:w,nextLocation:_,historyAction:z}){if($.size===0)return;$.size>1&&zt(!1,"A router only supports one blocker at a time");let J=Array.from($.entries()),[te,ve]=J[J.length-1],se=R.blockers.get(te);if(!(se&&se.state==="proceeding")&&ve({currentLocation:w,nextLocation:_,historyAction:z}))return te}function In(w){let _=Pn(404,{pathname:w}),z=g||m,{matches:J,route:te}=xo(z);return{notFoundMatches:J,route:te,error:_}}function On(w,_,z){if(L=w,P=_,B=z||null,!K&&R.navigation===uf){K=!0;let J=Et(R.location,R.matches);J!=null&&Je({restoreScrollPosition:J})}return()=>{L=null,P=null,B=null}}function _e(w,_){return B&&B(w,_.map(J=>Ix(J,R.loaderData)))||w.key}function ot(w,_){if(L&&P){let z=_e(w,_);L[z]=P()}}function Et(w,_){if(L){let z=_e(w,_),J=L[z];if(typeof J=="number")return J}return null}function Tt(w,_,z){if(n.patchRoutesOnNavigation)if(w){if(Object.keys(w[0].params).length>0)return{active:!0,matches:Vs(_,z,p,!0)}}else return{active:!0,matches:Vs(_,z,p,!0)||[]};return{active:!1,matches:null}}async function vn(w,_,z,J){if(!n.patchRoutesOnNavigation)return{type:"success",matches:w};let te=w;for(;;){let ve=g==null,se=g||m,re=d;try{await n.patchRoutesOnNavigation({signal:z,path:_,matches:te,fetcherKey:J,patch:(Ae,xe)=>{z.aborted||kg(Ae,xe,se,re,f,!1)}})}catch(Ae){return{type:"error",error:Ae,partialMatches:te}}finally{ve&&!z.aborted&&(m=[...m])}if(z.aborted)return{type:"aborted"};let le=di(se,_,p),ge=null;if(le){if(Object.keys(le[0].params).length===0)return{type:"success",matches:le};if(ge=Vs(se,_,p,!0),!(ge&&te.length<ge.length&&ut(te,ge.slice(0,te.length))))return{type:"success",matches:le}}if(ge||(ge=Vs(se,_,p,!0)),!ge||ut(te,ge))return{type:"success",matches:null};te=ge}}function ut(w,_){return w.length===_.length&&w.every((z,J)=>z.route.id===_[J].route.id)}function Jt(w){d={},g=Js(w,f,void 0,d)}function xa(w,_,z=!1){let J=g==null;kg(w,_,g||m,d,f,z),J&&(m=[...m],Je({}))}return fe={get basename(){return p},get future(){return y},get state(){return R},get routes(){return m},get window(){return a},initialize:Be,subscribe:en,enableScrollRestoration:On,navigate:sn,fetch:Ti,revalidate:Si,createHref:w=>n.history.createHref(w),encodeLocation:w=>n.history.encodeLocation(w),getFetcher:kn,resetFetcher:Wi,deleteFetcher:va,dispose:Pt,getBlocker:Ai,deleteBlocker:yn,patchRoutes:xa,_internalFetchControllers:Q,_internalSetRoutes:Jt,_internalSetStateDoNotUseOrYouWillBreakYourApp(w){Je(w)}},n.unstable_instrumentations&&(fe=mS(fe,n.unstable_instrumentations.map(w=>w.router).filter(Boolean))),fe}function CS(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function Rf(n,a,r,l,c,f){let d,m;if(c){d=[];for(let p of a)if(d.push(p),p.route.id===c){m=p;break}}else d=a,m=a[a.length-1];let g=Zf(l||".",If(d),Vn(n.pathname,r)||n.pathname,f==="path");if(l==null&&(g.search=n.search,g.hash=n.hash),(l==null||l===""||l===".")&&m){let p=Wf(g.search);if(m.route.index&&!p)g.search=g.search?g.search.replace(/^\?/,"?index&"):"?index";else if(!m.route.index&&p){let x=new URLSearchParams(g.search),y=x.getAll("index");x.delete("index"),y.filter(N=>N).forEach(N=>x.append("index",N));let T=x.toString();g.search=T?`?${T}`:""}}return r!=="/"&&(g.pathname=oS({basename:r,pathname:g.pathname})),ma(g)}function Rg(n,a,r){if(!r||!CS(r))return{path:a};if(r.formMethod&&!VS(r.formMethod))return{path:a,error:Pn(405,{method:r.formMethod})};let l=()=>({path:a,error:Pn(400,{type:"invalid-body"})}),f=(r.formMethod||"get").toUpperCase(),d=Xy(a);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Wt(f))return l();let y=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((T,[N,L])=>`${T}${N}=${L}
11
+ `,""):String(r.body);return{path:a,submission:{formMethod:f,formAction:d,formEncType:r.formEncType,formData:void 0,json:void 0,text:y}}}else if(r.formEncType==="application/json"){if(!Wt(f))return l();try{let y=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:a,submission:{formMethod:f,formAction:d,formEncType:r.formEncType,formData:void 0,json:y,text:void 0}}}catch{return l()}}}qe(typeof FormData=="function","FormData is not available in this environment");let m,g;if(r.formData)m=Nf(r.formData),g=r.formData;else if(r.body instanceof FormData)m=Nf(r.body),g=r.body;else if(r.body instanceof URLSearchParams)m=r.body,g=jg(m);else if(r.body==null)m=new URLSearchParams,g=new FormData;else try{m=new URLSearchParams(r.body),g=jg(m)}catch{return l()}let p={formMethod:f,formAction:d,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(Wt(p.formMethod))return{path:a,submission:p};let x=vi(a);return n&&x.search&&Wf(x.search)&&m.append("index",""),x.search=`?${m}`,{path:ma(x),submission:p}}function _g(n,a,r,l,c,f,d,m,g,p,x,y,T,N,L,B,P,K,Y,W,he){let de=W?Rn(W[1])?W[1].error:W[1].data:void 0,fe=c.createURL(f.location),R=c.createURL(g),V;if(x&&f.errors){let Ee=Object.keys(f.errors)[0];V=d.findIndex(k=>k.route.id===Ee)}else if(W&&Rn(W[1])){let Ee=W[0];V=d.findIndex(k=>k.route.id===Ee)-1}let ie=W?W[1].statusCode:void 0,ke=ie&&ie>=400,Re={currentUrl:fe,currentParams:f.matches[0]?.params||{},nextUrl:R,nextParams:d[0].params,...m,actionResult:de,actionStatus:ie},Se=tl(d),Me=d.map((Ee,k)=>{let{route:X}=Ee,Q=null;if(V!=null&&k>V?Q=!1:X.lazy?Q=!0:Jf(X)?x?Q=_f(X,f.loaderData,f.errors):RS(f.loaderData,f.matches[k],Ee)&&(Q=!0):Q=!1,Q!==null)return kf(r,l,n,Se,Ee,p,a,Q);let me=!1;typeof he=="boolean"?me=he:ke?me=!1:(y||fe.pathname+fe.search===R.pathname+R.search||fe.search!==R.search||_S(f.matches[k],Ee))&&(me=!0);let ye={...Re,defaultShouldRevalidate:me},A=Xs(Ee,ye);return kf(r,l,n,Se,Ee,p,a,A,ye,he)}),ze=[];return L.forEach((Ee,k)=>{if(x||!d.some(Z=>Z.route.id===Ee.routeId)||N.has(k))return;let X=f.fetchers.get(k),Q=X&&X.state!=="idle"&&X.data===void 0,me=di(P,Ee.path,K);if(!me){if(Y&&Q)return;ze.push({key:k,routeId:Ee.routeId,path:Ee.path,matches:null,match:null,request:null,controller:null});return}if(B.has(k))return;let ye=_o(me,Ee.path),A=new AbortController,q=Br(c,Ee.path,A.signal),H=null;if(T.has(k))T.delete(k),H=Hr(r,l,q,me,ye,p,a);else if(Q)y&&(H=Hr(r,l,q,me,ye,p,a));else{let Z;typeof he=="boolean"?Z=he:ke?Z=!1:Z=y;let ee={...Re,defaultShouldRevalidate:Z};Xs(ye,ee)&&(H=Hr(r,l,q,me,ye,p,a,ee))}H&&ze.push({key:k,routeId:Ee.routeId,path:Ee.path,matches:H,match:ye,request:q,controller:A})}),{dsMatches:Me,revalidatingFetchers:ze}}function Jf(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function _f(n,a,r){if(n.lazy)return!0;if(!Jf(n))return!1;let l=a!=null&&n.id in a,c=r!=null&&r[n.id]!==void 0;return!l&&c?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!l&&!c}function RS(n,a,r){let l=!a||r.route.id!==a.route.id,c=!n.hasOwnProperty(r.route.id);return l||c}function _S(n,a){let r=n.route.path;return n.pathname!==a.pathname||r!=null&&r.endsWith("*")&&n.params["*"]!==a.params["*"]}function Xs(n,a){if(n.route.shouldRevalidate){let r=n.route.shouldRevalidate(a);if(typeof r=="boolean")return r}return a.defaultShouldRevalidate}function kg(n,a,r,l,c,f){let d;if(n){let p=l[n];qe(p,`No route found to patch children into: routeId = ${n}`),p.children||(p.children=[]),d=p.children}else d=r;let m=[],g=[];if(a.forEach(p=>{let x=d.find(y=>Gy(p,y));x?g.push({existingRoute:x,newRoute:p}):m.push(p)}),m.length>0){let p=Js(m,c,[n||"_","patch",String(d?.length||"0")],l);d.push(...p)}if(f&&g.length>0)for(let p=0;p<g.length;p++){let{existingRoute:x,newRoute:y}=g[p],T=x,[N]=Js([y],c,[],{},!0);Object.assign(T,{element:N.element?N.element:T.element,errorElement:N.errorElement?N.errorElement:T.errorElement,hydrateFallbackElement:N.hydrateFallbackElement?N.hydrateFallbackElement:T.hydrateFallbackElement})}}function Gy(n,a){return"id"in n&&"id"in a&&n.id===a.id?!0:n.index===a.index&&n.path===a.path&&n.caseSensitive===a.caseSensitive?(!n.children||n.children.length===0)&&(!a.children||a.children.length===0)?!0:n.children.every((r,l)=>a.children?.some(c=>Gy(r,c))):!1}var Ng=new WeakMap,Ky=({key:n,route:a,manifest:r,mapRouteProperties:l})=>{let c=r[a.id];if(qe(c,"No route found in manifest"),!c.lazy||typeof c.lazy!="object")return;let f=c.lazy[n];if(!f)return;let d=Ng.get(c);d||(d={},Ng.set(c,d));let m=d[n];if(m)return m;let g=(async()=>{let p=Vx(n),y=c[n]!==void 0&&n!=="hasErrorBoundary";if(p)zt(!p,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),d[n]=Promise.resolve();else if(y)zt(!1,`Route "${c.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let T=await f();T!=null&&(Object.assign(c,{[n]:T}),Object.assign(c,l(c)))}typeof c.lazy=="object"&&(c.lazy[n]=void 0,Object.values(c.lazy).every(T=>T===void 0)&&(c.lazy=void 0))})();return d[n]=g,g},Og=new WeakMap;function kS(n,a,r,l,c){let f=r[n.id];if(qe(f,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let x=Og.get(f);if(x)return{lazyRoutePromise:x,lazyHandlerPromise:x};let y=(async()=>{qe(typeof n.lazy=="function","No lazy route function found");let T=await n.lazy(),N={};for(let L in T){let B=T[L];if(B===void 0)continue;let P=Fx(L),Y=f[L]!==void 0&&L!=="hasErrorBoundary";P?zt(!P,"Route property "+L+" is not a supported property to be returned from a lazy route function. This property will be ignored."):Y?zt(!Y,`Route "${f.id}" has a static property "${L}" defined but its lazy function is also returning a value for this property. The lazy route property "${L}" will be ignored.`):N[L]=B}Object.assign(f,N),Object.assign(f,{...l(f),lazy:void 0})})();return Og.set(f,y),y.catch(()=>{}),{lazyRoutePromise:y,lazyHandlerPromise:y}}let d=Object.keys(n.lazy),m=[],g;for(let x of d){if(c&&c.includes(x))continue;let y=Ky({key:x,route:n,manifest:r,mapRouteProperties:l});y&&(m.push(y),x===a&&(g=y))}let p=m.length>0?Promise.all(m).then(()=>{}):void 0;return p?.catch(()=>{}),g?.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:g}}async function Mg(n){let a=n.matches.filter(c=>c.shouldLoad),r={};return(await Promise.all(a.map(c=>c.resolve()))).forEach((c,f)=>{r[a[f].route.id]=c}),r}async function NS(n){return n.matches.some(a=>a.route.middleware)?Vy(n,()=>Mg(n)):Mg(n)}function Vy(n,a){return OS(n,a,l=>{if(KS(l))throw l;return l},HS,r);function r(l,c,f){if(f)return Promise.resolve(Object.assign(f.value,{[c]:{type:"error",result:l}}));{let{matches:d}=n,m=Math.min(Math.max(d.findIndex(p=>p.route.id===c),0),Math.max(d.findIndex(p=>p.shouldCallHandler()),0)),g=hi(d,d[m].route.id).route.id;return Promise.resolve({[g]:{type:"error",result:l}})}}}async function OS(n,a,r,l,c){let{matches:f,request:d,params:m,context:g,unstable_pattern:p}=n,x=f.flatMap(T=>T.route.middleware?T.route.middleware.map(N=>[T.route.id,N]):[]);return await Yy({request:d,params:m,context:g,unstable_pattern:p},x,a,r,l,c)}async function Yy(n,a,r,l,c,f,d=0){let{request:m}=n;if(m.signal.aborted)throw m.signal.reason??new Error(`Request aborted: ${m.method} ${m.url}`);let g=a[d];if(!g)return await r();let[p,x]=g,y,T=async()=>{if(y)throw new Error("You may only call `next()` once per middleware");try{return y={value:await Yy(n,a,r,l,c,f,d+1)},y.value}catch(N){return y={value:await f(N,p,y)},y.value}};try{let N=await x(n,T),L=N!=null?l(N):void 0;return c(L)?L:y?L??y.value:(y={value:await T()},y.value)}catch(N){return await f(N,p,y)}}function Fy(n,a,r,l,c){let f=Ky({key:"middleware",route:l.route,manifest:a,mapRouteProperties:n}),d=kS(l.route,Wt(r.method)?"action":"loader",a,n,c);return{middleware:f,route:d.lazyRoutePromise,handler:d.lazyHandlerPromise}}function kf(n,a,r,l,c,f,d,m,g=null,p){let x=!1,y=Fy(n,a,r,c,f);return{...c,_lazyPromises:y,shouldLoad:m,shouldRevalidateArgs:g,shouldCallHandler(T){return x=!0,g?typeof p=="boolean"?Xs(c,{...g,defaultShouldRevalidate:p}):typeof T=="boolean"?Xs(c,{...g,defaultShouldRevalidate:T}):Xs(c,g):m},resolve(T){let{lazy:N,loader:L,middleware:B}=c.route,P=x||m||T&&!Wt(r.method)&&(N||L),K=B&&B.length>0&&!L&&!N;return P&&(Wt(r.method)||!K)?DS({request:r,unstable_pattern:l,match:c,lazyHandlerPromise:y?.handler,lazyRoutePromise:y?.route,handlerOverride:T,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function Hr(n,a,r,l,c,f,d,m=null){return l.map(g=>g.route.id!==c.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:m,shouldCallHandler:()=>!1,_lazyPromises:Fy(n,a,r,g,f),resolve:()=>Promise.resolve({type:"data",result:void 0})}:kf(n,a,r,tl(l),g,f,d,!0,m))}async function MS(n,a,r,l,c,f){r.some(p=>p._lazyPromises?.middleware)&&await Promise.all(r.map(p=>p._lazyPromises?.middleware));let d={request:a,unstable_pattern:tl(r),params:r[0].params,context:c,matches:r},g=await n({...d,fetcherKey:l,runClientMiddleware:p=>{let x=d;return Vy(x,()=>p({...x,fetcherKey:l,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(p=>[p._lazyPromises?.handler,p._lazyPromises?.route]))}catch{}return g}async function DS({request:n,unstable_pattern:a,match:r,lazyHandlerPromise:l,lazyRoutePromise:c,handlerOverride:f,scopedContext:d}){let m,g,p=Wt(n.method),x=p?"action":"loader",y=T=>{let N,L=new Promise((K,Y)=>N=Y);g=()=>N(),n.signal.addEventListener("abort",g);let B=K=>typeof T!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${x}" [routeId: ${r.route.id}]`)):T({request:n,unstable_pattern:a,params:r.params,context:d},...K!==void 0?[K]:[]),P=(async()=>{try{return{type:"data",result:await(f?f(Y=>B(Y)):B())}}catch(K){return{type:"error",result:K}}})();return Promise.race([P,L])};try{let T=p?r.route.action:r.route.loader;if(l||c)if(T){let N,[L]=await Promise.all([y(T).catch(B=>{N=B}),l,c]);if(N!==void 0)throw N;m=L}else{await l;let N=p?r.route.action:r.route.loader;if(N)[m]=await Promise.all([y(N),c]);else if(x==="action"){let L=new URL(n.url),B=L.pathname+L.search;throw Pn(405,{method:n.method,pathname:B,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(T)m=await y(T);else{let N=new URL(n.url),L=N.pathname+N.search;throw Pn(404,{pathname:L})}}catch(T){return{type:"error",result:T}}finally{g&&n.signal.removeEventListener("abort",g)}return m}async function jS(n){let a=n.headers.get("Content-Type");return a&&/\bapplication\/json\b/.test(a)?n.body==null?null:n.json():n.text()}async function zS(n){let{result:a,type:r}=n;if($f(a)){let l;try{l=await jS(a)}catch(c){return{type:"error",error:c}}return r==="error"?{type:"error",error:new el(a.status,a.statusText,l),statusCode:a.status,headers:a.headers}:{type:"data",data:l,statusCode:a.status,headers:a.headers}}return r==="error"?Bg(a)?a.data instanceof Error?{type:"error",error:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:qS(a),statusCode:$s(a)?a.status:void 0,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:a,statusCode:$s(a)?a.status:void 0}:Bg(a)?{type:"data",data:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"data",data:a}}function LS(n,a,r,l,c){let f=n.headers.get("Location");if(qe(f,"Redirects returned/thrown from loaders/actions must have a Location header"),!Xf(f)){let d=l.slice(0,l.findIndex(m=>m.route.id===r)+1);f=Rf(new URL(a.url),d,c,f),n.headers.set("Location",f)}return n}function Dg(n,a,r,l){let c=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Xf(n)){let f=n,d=f.startsWith("//")?new URL(a.protocol+f):new URL(f);if(c.includes(d.protocol))throw new Error("Invalid redirect location");let m=Vn(d.pathname,r)!=null;if(d.origin===a.origin&&m)return d.pathname+d.search+d.hash}try{let f=l.createURL(n);if(c.includes(f.protocol))throw new Error("Invalid redirect location")}catch{}return n}function Br(n,a,r,l){let c=n.createURL(Xy(a)).toString(),f={signal:r};if(l&&Wt(l.formMethod)){let{formMethod:d,formEncType:m}=l;f.method=d.toUpperCase(),m==="application/json"?(f.headers=new Headers({"Content-Type":m}),f.body=JSON.stringify(l.json)):m==="text/plain"?f.body=l.text:m==="application/x-www-form-urlencoded"&&l.formData?f.body=Nf(l.formData):f.body=l.formData}return new Request(c,f)}function Nf(n){let a=new URLSearchParams;for(let[r,l]of n.entries())a.append(r,typeof l=="string"?l:l.name);return a}function jg(n){let a=new FormData;for(let[r,l]of n.entries())a.append(r,l);return a}function US(n,a,r,l=!1,c=!1){let f={},d=null,m,g=!1,p={},x=r&&Rn(r[1])?r[1].error:void 0;return n.forEach(y=>{if(!(y.route.id in a))return;let T=y.route.id,N=a[T];if(qe(!Xi(N),"Cannot handle redirect results in processLoaderData"),Rn(N)){let L=N.error;if(x!==void 0&&(L=x,x=void 0),d=d||{},c)d[T]=L;else{let B=hi(n,T);d[B.route.id]==null&&(d[B.route.id]=L)}l||(f[T]=Py),g||(g=!0,m=$s(N.error)?N.error.status:500),N.headers&&(p[T]=N.headers)}else f[T]=N.data,N.statusCode&&N.statusCode!==200&&!g&&(m=N.statusCode),N.headers&&(p[T]=N.headers)}),x!==void 0&&r&&(d={[r[0]]:x},r[2]&&(f[r[2]]=void 0)),{loaderData:f,errors:d,statusCode:m||200,loaderHeaders:p}}function zg(n,a,r,l,c,f){let{loaderData:d,errors:m}=US(a,r,l);return c.filter(g=>!g.matches||g.matches.some(p=>p.shouldLoad)).forEach(g=>{let{key:p,match:x,controller:y}=g;if(y&&y.signal.aborted)return;let T=f[p];if(qe(T,"Did not find corresponding fetcher result"),Rn(T)){let N=hi(n.matches,x?.route.id);m&&m[N.route.id]||(m={...m,[N.route.id]:T.error}),n.fetchers.delete(p)}else if(Xi(T))qe(!1,"Unhandled fetcher revalidation redirect");else{let N=Ha(T.data);n.fetchers.set(p,N)}}),{loaderData:d,errors:m}}function Lg(n,a,r,l){let c=Object.entries(a).filter(([,f])=>f!==Py).reduce((f,[d,m])=>(f[d]=m,f),{});for(let f of r){let d=f.route.id;if(!a.hasOwnProperty(d)&&n.hasOwnProperty(d)&&f.route.loader&&(c[d]=n[d]),l&&l.hasOwnProperty(d))break}return c}function Ug(n){return n?Rn(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function hi(n,a){return(a?n.slice(0,n.findIndex(l=>l.route.id===a)+1):[...n]).reverse().find(l=>l.route.hasErrorBoundary===!0)||n[0]}function xo(n){let a=n.length===1?n[0]:n.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:a}],route:a}}function Pn(n,{pathname:a,routeId:r,method:l,type:c,message:f}={}){let d="Unknown Server Error",m="Unknown @remix-run/router error";return n===400?(d="Bad Request",l&&a&&r?m=`You made a ${l} request to "${a}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:c==="invalid-body"&&(m="Unable to encode submission body")):n===403?(d="Forbidden",m=`Route "${r}" does not match URL "${a}"`):n===404?(d="Not Found",m=`No route matches URL "${a}"`):n===405&&(d="Method Not Allowed",l&&a&&r?m=`You made a ${l.toUpperCase()} request to "${a}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:l&&(m=`Invalid request method "${l.toUpperCase()}"`)),new el(n||500,d,new Error(m),!0)}function So(n){let a=Object.entries(n);for(let r=a.length-1;r>=0;r--){let[l,c]=a[r];if(Xi(c))return{key:l,result:c}}}function Xy(n){let a=typeof n=="string"?vi(n):n;return ma({...a,hash:""})}function BS(n,a){return n.pathname!==a.pathname||n.search!==a.search?!1:n.hash===""?a.hash!=="":n.hash===a.hash?!0:a.hash!==""}function qS(n){return new el(n.init?.status??500,n.init?.statusText??"Internal Server Error",n.data)}function HS(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([a,r])=>typeof a=="string"&&QS(r))}function QS(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function PS(n){return $f(n.result)&&Hy.has(n.result.status)}function Rn(n){return n.type==="error"}function Xi(n){return(n&&n.type)==="redirect"}function Bg(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function $f(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function GS(n){return Hy.has(n)}function KS(n){return $f(n)&&GS(n.status)&&n.headers.has("Location")}function VS(n){return SS.has(n.toUpperCase())}function Wt(n){return bS.has(n.toUpperCase())}function Wf(n){return new URLSearchParams(n).getAll("index").some(a=>a==="")}function _o(n,a){let r=typeof a=="string"?vi(a).search:a.search;if(n[n.length-1].route.index&&Wf(r||""))return n[n.length-1];let l=zy(n);return l[l.length-1]}function qg(n){let{formMethod:a,formAction:r,formEncType:l,text:c,formData:f,json:d}=n;if(!(!a||!r||!l)){if(c!=null)return{formMethod:a,formAction:r,formEncType:l,formData:void 0,json:void 0,text:c};if(f!=null)return{formMethod:a,formAction:r,formEncType:l,formData:f,json:void 0,text:void 0};if(d!==void 0)return{formMethod:a,formAction:r,formEncType:l,formData:void 0,json:d,text:void 0}}}function cf(n,a){return a?{state:"loading",location:n,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function YS(n,a){return{state:"submitting",location:n,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function Hs(n,a){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:a}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:a}}function FS(n,a){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:a?a.data:void 0}}function Ha(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function XS(n,a){try{let r=n.sessionStorage.getItem(Qy);if(r){let l=JSON.parse(r);for(let[c,f]of Object.entries(l||{}))f&&Array.isArray(f)&&a.set(c,new Set(f||[]))}}catch{}}function IS(n,a){if(a.size>0){let r={};for(let[l,c]of a)r[l]=[...c];try{n.sessionStorage.setItem(Qy,JSON.stringify(r))}catch(l){zt(!1,`Failed to save applied view transitions in sessionStorage (${l}).`)}}}function Hg(){let n,a,r=new Promise((l,c)=>{n=async f=>{l(f);try{await r}catch{}},a=async f=>{c(f);try{await r}catch{}}});return{promise:r,resolve:n,reject:a}}var $i=S.createContext(null);$i.displayName="DataRouter";var nl=S.createContext(null);nl.displayName="DataRouterState";var Iy=S.createContext(!1);function ZS(){return S.useContext(Iy)}var ed=S.createContext({isTransitioning:!1});ed.displayName="ViewTransition";var Zy=S.createContext(new Map);Zy.displayName="Fetchers";var JS=S.createContext(null);JS.displayName="Await";var Yn=S.createContext(null);Yn.displayName="Navigation";var Ko=S.createContext(null);Ko.displayName="Location";var aa=S.createContext({outlet:null,matches:[],isDataRoute:!1});aa.displayName="Route";var td=S.createContext(null);td.displayName="RouteError";var Jy="REACT_ROUTER_ERROR",$S="REDIRECT",WS="ROUTE_ERROR_RESPONSE";function ew(n){if(n.startsWith(`${Jy}:${$S}:{`))try{let a=JSON.parse(n.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function tw(n){if(n.startsWith(`${Jy}:${WS}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new el(a.status,a.statusText,a.data)}catch{}}function nw(n,{relative:a}={}){qe(al(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:l}=S.useContext(Yn),{hash:c,pathname:f,search:d}=il(n,{relative:a}),m=f;return r!=="/"&&(m=f==="/"?r:da([r,f])),l.createHref({pathname:m,search:d,hash:c})}function al(){return S.useContext(Ko)!=null}function bi(){return qe(al(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Ko).location}var $y="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Wy(n){S.useContext(Yn).static||S.useLayoutEffect(n)}function ev(){let{isDataRoute:n}=S.useContext(aa);return n?vw():aw()}function aw(){qe(al(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext($i),{basename:a,navigator:r}=S.useContext(Yn),{matches:l}=S.useContext(aa),{pathname:c}=bi(),f=JSON.stringify(If(l)),d=S.useRef(!1);return Wy(()=>{d.current=!0}),S.useCallback((g,p={})=>{if(zt(d.current,$y),!d.current)return;if(typeof g=="number"){r.go(g);return}let x=Zf(g,JSON.parse(f),c,p.relative==="path");n==null&&a!=="/"&&(x.pathname=x.pathname==="/"?a:da([a,x.pathname])),(p.replace?r.replace:r.push)(x,p.state,p)},[a,r,f,c,n])}var iw=S.createContext(null);function rw(n){let a=S.useContext(aa).outlet;return S.useMemo(()=>a&&S.createElement(iw.Provider,{value:n},a),[a,n])}function sw(){let{matches:n}=S.useContext(aa),a=n[n.length-1];return a?a.params:{}}function il(n,{relative:a}={}){let{matches:r}=S.useContext(aa),{pathname:l}=bi(),c=JSON.stringify(If(r));return S.useMemo(()=>Zf(n,JSON.parse(c),l,a==="path"),[n,c,l,a])}function lw(n,a,r,l,c){qe(al(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=S.useContext(Yn),{matches:d}=S.useContext(aa),m=d[d.length-1],g=m?m.params:{},p=m?m.pathname:"/",x=m?m.pathnameBase:"/",y=m&&m.route;{let Y=y&&y.path||"";nv(p,!y||Y.endsWith("*")||Y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${Y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
12
12
 
13
- Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}/*`}">.`)}let T=bi(),N;N=T;let L=N.pathname||"/",B=L;if(x!=="/"){let Y=x.replace(/^\//,"").split("/");B="/"+L.replace(/^\//,"").split("/").slice(Y.length).join("/")}let P=di(n,{pathname:B});return zt(y||P!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),zt(P==null||P[P.length-1].route.element!==void 0||P[P.length-1].route.Component!==void 0||P[P.length-1].route.lazy!==void 0,`Matched leaf route at location "${N.pathname}${N.search}${N.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),dw(P&&P.map(Y=>Object.assign({},Y,{params:Object.assign({},g,Y.params),pathname:da([x,f.encodeLocation?f.encodeLocation(Y.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathname]),pathnameBase:Y.pathnameBase==="/"?x:da([x,f.encodeLocation?f.encodeLocation(Y.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathnameBase])})),d,r,l,c)}function ow(){let n=yw(),a=$s(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),r=n instanceof Error?n.stack:null,l="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:l},f={padding:"2px 4px",backgroundColor:l},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:f},"ErrorBoundary")," or"," ",S.createElement("code",{style:f},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),r?S.createElement("pre",{style:c},r):null,d)}var uw=S.createElement(ow,null),tv=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){this.props.onError?this.props.onError(n,a):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const r=tw(n.digest);r&&(n=r)}let a=n!==void 0?S.createElement(aa.Provider,{value:this.props.routeContext},S.createElement(td.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(cw,{error:n},a):a}};tv.contextType=Zy;var ff=new WeakMap;function cw({children:n,error:a}){let{basename:r}=S.useContext(Yn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let l=ew(a.digest);if(l){let c=ff.get(a);if(c)throw c;let f=Uy(l.location,r);if(Ly&&!ff.get(a))if(f.isExternal||l.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:l.replace}));throw ff.set(a,d),d}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function fw({routeContext:n,match:a,children:r}){let l=S.useContext($i);return l&&l.static&&l.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(aa.Provider,{value:n},r)}function dw(n,a=[],r=null,l=null,c=null){if(n==null){if(!r)return null;if(r.errors)n=r.matches;else if(a.length===0&&!r.initialized&&r.matches.length>0)n=r.matches;else return null}let f=n,d=r?.errors;if(d!=null){let x=f.findIndex(y=>y.route.id&&d?.[y.route.id]!==void 0);qe(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),f=f.slice(0,Math.min(f.length,x+1))}let m=!1,g=-1;if(r)for(let x=0;x<f.length;x++){let y=f[x];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(g=x),y.route.id){let{loaderData:T,errors:N}=r,L=y.route.loader&&!T.hasOwnProperty(y.route.id)&&(!N||N[y.route.id]===void 0);if(y.route.lazy||L){m=!0,g>=0?f=f.slice(0,g+1):f=[f[0]];break}}}let p=r&&l?(x,y)=>{l(x,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:tl(r.matches),errorInfo:y})}:void 0;return f.reduceRight((x,y,T)=>{let N,L=!1,B=null,P=null;r&&(N=d&&y.route.id?d[y.route.id]:void 0,B=y.route.errorElement||uw,m&&(g<0&&T===0?(nv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,P=null):g===T&&(L=!0,P=y.route.hydrateFallbackElement||null)));let K=a.concat(f.slice(0,T+1)),Y=()=>{let W;return N?W=B:L?W=P:y.route.Component?W=S.createElement(y.route.Component,null):y.route.element?W=y.route.element:W=x,S.createElement(fw,{match:y,routeContext:{outlet:x,matches:K,isDataRoute:r!=null},children:W})};return r&&(y.route.ErrorBoundary||y.route.errorElement||T===0)?S.createElement(tv,{location:r.location,revalidation:r.revalidation,component:B,error:N,children:Y(),routeContext:{outlet:null,matches:K,isDataRoute:!0},onError:p}):Y()},null)}function nd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function hw(n){let a=S.useContext($i);return qe(a,nd(n)),a}function mw(n){let a=S.useContext(nl);return qe(a,nd(n)),a}function pw(n){let a=S.useContext(aa);return qe(a,nd(n)),a}function ad(n){let a=pw(n),r=a.matches[a.matches.length-1];return qe(r.route.id,`${n} can only be used on routes that contain a unique "id"`),r.route.id}function gw(){return ad("useRouteId")}function yw(){let n=S.useContext(td),a=mw("useRouteError"),r=ad("useRouteError");return n!==void 0?n:a.errors?.[r]}function vw(){let{router:n}=hw("useNavigate"),a=ad("useNavigate"),r=S.useRef(!1);return Wy(()=>{r.current=!0}),S.useCallback(async(c,f={})=>{zt(r.current,$y),r.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:a,...f}))},[n,a])}var Qg={};function nv(n,a,r){!a&&!Qg[n]&&(Qg[n]=!0,zt(!1,r))}var Pg={};function Gg(n,a){!n&&!Pg[a]&&(Pg[a]=!0,console.warn(a))}var bw="useOptimistic",Kg=x1[bw],xw=()=>{};function Sw(n){return Kg?Kg(n):[n,xw]}function ww(n){let a={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&zt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:S.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&zt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:S.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&zt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:S.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),a}var Ew=["HydrateFallback","hydrateFallbackElement"],Tw=class{constructor(){this.status="pending",this.promise=new Promise((n,a)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",n(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",a(r))}})}};function Cw({router:n,flushSync:a,onError:r,unstable_useTransitions:l}){l=IS()||l;let[f,d]=S.useState(n.state),[m,g]=Sw(f),[p,x]=S.useState(),[y,T]=S.useState({isTransitioning:!1}),[N,L]=S.useState(),[B,P]=S.useState(),[K,Y]=S.useState(),W=S.useRef(new Map),he=S.useCallback((V,{deletedFetchers:ie,newErrors:ke,flushSync:Re,viewTransitionOpts:Se})=>{ke&&r&&Object.values(ke).forEach(ze=>r(ze,{location:V.location,params:V.matches[0]?.params??{},unstable_pattern:tl(V.matches)})),V.fetchers.forEach((ze,Ee)=>{ze.data!==void 0&&W.current.set(Ee,ze.data)}),ie.forEach(ze=>W.current.delete(ze)),Gg(Re===!1||a!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Me=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(Gg(Se==null||Me,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!Se||!Me){a&&Re?a(()=>d(V)):l===!1?d(V):S.startTransition(()=>{l===!0&&g(ze=>Vg(ze,V)),d(V)});return}if(a&&Re){a(()=>{B&&(N?.resolve(),B.skipTransition()),T({isTransitioning:!0,flushSync:!0,currentLocation:Se.currentLocation,nextLocation:Se.nextLocation})});let ze=n.window.document.startViewTransition(()=>{a(()=>d(V))});ze.finished.finally(()=>{a(()=>{L(void 0),P(void 0),x(void 0),T({isTransitioning:!1})})}),a(()=>P(ze));return}B?(N?.resolve(),B.skipTransition(),Y({state:V,currentLocation:Se.currentLocation,nextLocation:Se.nextLocation})):(x(V),T({isTransitioning:!0,flushSync:!1,currentLocation:Se.currentLocation,nextLocation:Se.nextLocation}))},[n.window,a,B,N,l,g,r]);S.useLayoutEffect(()=>n.subscribe(he),[n,he]),S.useEffect(()=>{y.isTransitioning&&!y.flushSync&&L(new Tw)},[y]),S.useEffect(()=>{if(N&&p&&n.window){let V=p,ie=N.promise,ke=n.window.document.startViewTransition(async()=>{l===!1?d(V):S.startTransition(()=>{l===!0&&g(Re=>Vg(Re,V)),d(V)}),await ie});ke.finished.finally(()=>{L(void 0),P(void 0),x(void 0),T({isTransitioning:!1})}),P(ke)}},[p,N,n.window,l,g]),S.useEffect(()=>{N&&p&&m.location.key===p.location.key&&N.resolve()},[N,B,m.location,p]),S.useEffect(()=>{!y.isTransitioning&&K&&(x(K.state),T({isTransitioning:!0,flushSync:!1,currentLocation:K.currentLocation,nextLocation:K.nextLocation}),Y(void 0))},[y.isTransitioning,K]);let de=S.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:V=>n.navigate(V),push:(V,ie,ke)=>n.navigate(V,{state:ie,preventScrollReset:ke?.preventScrollReset}),replace:(V,ie,ke)=>n.navigate(V,{replace:!0,state:ie,preventScrollReset:ke?.preventScrollReset})}),[n]),fe=n.basename||"/",R=S.useMemo(()=>({router:n,navigator:de,static:!1,basename:fe,onError:r}),[n,de,fe,r]);return S.createElement(S.Fragment,null,S.createElement($i.Provider,{value:R},S.createElement(nl.Provider,{value:m},S.createElement(Iy.Provider,{value:W.current},S.createElement(ed.Provider,{value:y},S.createElement(kw,{basename:fe,location:m.location,navigationType:m.historyAction,navigator:de,unstable_useTransitions:l},S.createElement(Aw,{routes:n.routes,future:n.future,state:m,onError:r})))))),null)}function Vg(n,a){return{...n,navigation:a.navigation.state!=="idle"?a.navigation:n.navigation,revalidation:a.revalidation!=="idle"?a.revalidation:n.revalidation,actionData:a.navigation.state!=="submitting"?a.actionData:n.actionData,fetchers:a.fetchers}}var Aw=S.memo(Rw);function Rw({routes:n,future:a,state:r,onError:l}){return lw(n,void 0,r,l,a)}function _w(n){return rw(n.context)}function kw({basename:n="/",children:a=null,location:r,navigationType:l="POP",navigator:c,static:f=!1,unstable_useTransitions:d}){qe(!al(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),g=S.useMemo(()=>({basename:m,navigator:c,static:f,unstable_useTransitions:d,future:{}}),[m,c,f,d]);typeof r=="string"&&(r=vi(r));let{pathname:p="/",search:x="",hash:y="",state:T=null,key:N="default"}=r,L=S.useMemo(()=>{let B=Vn(p,m);return B==null?null:{location:{pathname:B,search:x,hash:y,state:T,key:N},navigationType:l}},[m,p,x,y,T,N,l]);return zt(L!=null,`<Router basename="${m}"> is not able to match the URL "${p}${x}${y}" because it does not start with the basename, so the <Router> won't render anything.`),L==null?null:S.createElement(Yn.Provider,{value:g},S.createElement(Ko.Provider,{children:a,value:L}))}var ko="get",No="application/x-www-form-urlencoded";function Vo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Nw(n){return Vo(n)&&n.tagName.toLowerCase()==="button"}function Ow(n){return Vo(n)&&n.tagName.toLowerCase()==="form"}function Mw(n){return Vo(n)&&n.tagName.toLowerCase()==="input"}function Dw(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function jw(n,a){return n.button===0&&(!a||a==="_self")&&!Dw(n)}var wo=null;function zw(){if(wo===null)try{new FormData(document.createElement("form"),0),wo=!1}catch{wo=!0}return wo}var Lw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function df(n){return n!=null&&!Lw.has(n)?(zt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${No}"`),null):n}function Uw(n,a){let r,l,c,f,d;if(Ow(n)){let m=n.getAttribute("action");l=m?Vn(m,a):null,r=n.getAttribute("method")||ko,c=df(n.getAttribute("enctype"))||No,f=new FormData(n)}else if(Nw(n)||Mw(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=n.getAttribute("formaction")||m.getAttribute("action");if(l=g?Vn(g,a):null,r=n.getAttribute("formmethod")||m.getAttribute("method")||ko,c=df(n.getAttribute("formenctype"))||df(m.getAttribute("enctype"))||No,f=new FormData(m,n),!zw()){let{name:p,type:x,value:y}=n;if(x==="image"){let T=p?`${p}.`:"";f.append(`${T}x`,"0"),f.append(`${T}y`,"0")}else p&&f.append(p,y)}}else{if(Vo(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ko,l=null,c=No,d=n}return f&&c==="text/plain"&&(d=f,f=void 0),{action:l,method:r.toLowerCase(),encType:c,formData:f,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function id(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function Bw(n,a,r,l){let c=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return r?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${l}`:c.pathname=`${c.pathname}.${l}`:c.pathname==="/"?c.pathname=`_root.${l}`:a&&Vn(c.pathname,a)==="/"?c.pathname=`${a.replace(/\/$/,"")}/_root.${l}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${l}`,c}async function qw(n,a){if(n.id in a)return a[n.id];try{let r=await import(n.module);return a[n.id]=r,r}catch(r){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Hw(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Qw(n,a,r){let l=await Promise.all(n.map(async c=>{let f=a.routes[c.route.id];if(f){let d=await qw(f,r);return d.links?d.links():[]}return[]}));return Vw(l.flat(1).filter(Hw).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function Yg(n,a,r,l,c,f){let d=(g,p)=>r[p]?g.route.id!==r[p].route.id:!0,m=(g,p)=>r[p].pathname!==g.pathname||r[p].route.path?.endsWith("*")&&r[p].params["*"]!==g.params["*"];return f==="assets"?a.filter((g,p)=>d(g,p)||m(g,p)):f==="data"?a.filter((g,p)=>{let x=l.routes[g.route.id];if(!x||!x.hasLoader)return!1;if(d(g,p)||m(g,p))return!0;if(g.route.shouldRevalidate){let y=g.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function Pw(n,a,{includeHydrateFallback:r}={}){return Gw(n.map(l=>{let c=a.routes[l.route.id];if(!c)return[];let f=[c.module];return c.clientActionModule&&(f=f.concat(c.clientActionModule)),c.clientLoaderModule&&(f=f.concat(c.clientLoaderModule)),r&&c.hydrateFallbackModule&&(f=f.concat(c.hydrateFallbackModule)),c.imports&&(f=f.concat(c.imports)),f}).flat(1))}function Gw(n){return[...new Set(n)]}function Kw(n){let a={},r=Object.keys(n).sort();for(let l of r)a[l]=n[l];return a}function Vw(n,a){let r=new Set;return new Set(a),n.reduce((l,c)=>{let f=JSON.stringify(Kw(c));return r.has(f)||(r.add(f),l.push({key:f,link:c})),l},[])}function av(){let n=S.useContext($i);return id(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Yw(){let n=S.useContext(nl);return id(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var rd=S.createContext(void 0);rd.displayName="FrameworkContext";function iv(){let n=S.useContext(rd);return id(n,"You must render this element inside a <HydratedRouter> element"),n}function Fw(n,a){let r=S.useContext(rd),[l,c]=S.useState(!1),[f,d]=S.useState(!1),{onFocus:m,onBlur:g,onMouseEnter:p,onMouseLeave:x,onTouchStart:y}=a,T=S.useRef(null);S.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let B=K=>{K.forEach(Y=>{d(Y.isIntersecting)})},P=new IntersectionObserver(B,{threshold:.5});return T.current&&P.observe(T.current),()=>{P.disconnect()}}},[n]),S.useEffect(()=>{if(l){let B=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(B)}}},[l]);let N=()=>{c(!0)},L=()=>{c(!1),d(!1)};return r?n!=="intent"?[f,T,{}]:[f,T,{onFocus:Qs(m,N),onBlur:Qs(g,L),onMouseEnter:Qs(p,N),onMouseLeave:Qs(x,L),onTouchStart:Qs(y,N)}]:[!1,T,{}]}function Qs(n,a){return r=>{n&&n(r),r.defaultPrevented||a(r)}}function Xw({page:n,...a}){let{router:r}=av(),l=S.useMemo(()=>di(r.routes,n,r.basename),[r.routes,n,r.basename]);return l?S.createElement(Iw,{page:n,matches:l,...a}):null}function Zw(n){let{manifest:a,routeModules:r}=iv(),[l,c]=S.useState([]);return S.useEffect(()=>{let f=!1;return Qw(n,a,r).then(d=>{f||c(d)}),()=>{f=!0}},[n,a,r]),l}function Iw({page:n,matches:a,...r}){let l=bi(),{future:c,manifest:f,routeModules:d}=iv(),{basename:m}=av(),{loaderData:g,matches:p}=Yw(),x=S.useMemo(()=>Yg(n,a,p,f,l,"data"),[n,a,p,f,l]),y=S.useMemo(()=>Yg(n,a,p,f,l,"assets"),[n,a,p,f,l]),T=S.useMemo(()=>{if(n===l.pathname+l.search+l.hash)return[];let B=new Set,P=!1;if(a.forEach(Y=>{let W=f.routes[Y.route.id];!W||!W.hasLoader||(!x.some(he=>he.route.id===Y.route.id)&&Y.route.id in g&&d[Y.route.id]?.shouldRevalidate||W.hasClientLoader?P=!0:B.add(Y.route.id))}),B.size===0)return[];let K=Bw(n,m,c.unstable_trailingSlashAwareDataRequests,"data");return P&&B.size>0&&K.searchParams.set("_routes",a.filter(Y=>B.has(Y.route.id)).map(Y=>Y.route.id).join(",")),[K.pathname+K.search]},[m,c.unstable_trailingSlashAwareDataRequests,g,l,f,x,a,n,d]),N=S.useMemo(()=>Pw(y,f),[y,f]),L=Zw(y);return S.createElement(S.Fragment,null,T.map(B=>S.createElement("link",{key:B,rel:"prefetch",as:"fetch",href:B,...r})),N.map(B=>S.createElement("link",{key:B,rel:"modulepreload",href:B,...r})),L.map(({key:B,link:P})=>S.createElement("link",{key:B,nonce:r.nonce,...P,crossOrigin:P.crossOrigin??r.crossOrigin})))}function Jw(...n){return a=>{n.forEach(r=>{typeof r=="function"?r(a):r!=null&&(r.current=a)})}}var $w=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{$w&&(window.__reactRouterVersion="7.13.0")}catch{}function Ww(n,a){return CS({basename:a?.basename,getContext:a?.getContext,future:a?.future,history:Qx({window:a?.window}),hydrationData:eE(),routes:n,mapRouteProperties:ww,hydrationRouteProperties:Ew,dataStrategy:a?.dataStrategy,patchRoutesOnNavigation:a?.patchRoutesOnNavigation,window:a?.window,unstable_instrumentations:a?.unstable_instrumentations}).initialize()}function eE(){let n=window?.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:tE(n.errors)}),n}function tE(n){if(!n)return null;let a=Object.entries(n),r={};for(let[l,c]of a)if(c&&c.__type==="RouteErrorResponse")r[l]=new el(c.status,c.statusText,c.data,c.internal===!0);else if(c&&c.__type==="Error"){if(c.__subType){let f=window[c.__subType];if(typeof f=="function")try{let d=new f(c.message);d.stack="",r[l]=d}catch{}}if(r[l]==null){let f=new Error(c.message);f.stack="",r[l]=f}}else r[l]=c;return r}var rv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sv=S.forwardRef(function({onClick:a,discover:r="render",prefetch:l="none",relative:c,reloadDocument:f,replace:d,state:m,target:g,to:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T,...N},L){let{basename:B,unstable_useTransitions:P}=S.useContext(Yn),K=typeof p=="string"&&rv.test(p),Y=Uy(p,B);p=Y.to;let W=nw(p,{relative:c}),[he,de,fe]=Fw(l,N),R=rE(p,{replace:d,state:m,target:g,preventScrollReset:x,relative:c,viewTransition:y,unstable_defaultShouldRevalidate:T,unstable_useTransitions:P});function V(ke){a&&a(ke),ke.defaultPrevented||R(ke)}let ie=S.createElement("a",{...N,...fe,href:Y.absoluteURL||W,onClick:Y.isExternal||f?a:V,ref:Jw(L,de),target:g,"data-discover":!K&&r==="render"?"true":void 0});return he&&!K?S.createElement(S.Fragment,null,ie,S.createElement(Xw,{page:W})):ie});sv.displayName="Link";var nE=S.forwardRef(function({"aria-current":a="page",caseSensitive:r=!1,className:l="",end:c=!1,style:f,to:d,viewTransition:m,children:g,...p},x){let y=il(d,{relative:p.relative}),T=bi(),N=S.useContext(nl),{navigator:L,basename:B}=S.useContext(Yn),P=N!=null&&cE(y)&&m===!0,K=L.encodeLocation?L.encodeLocation(y).pathname:y.pathname,Y=T.pathname,W=N&&N.navigation&&N.navigation.location?N.navigation.location.pathname:null;r||(Y=Y.toLowerCase(),W=W?W.toLowerCase():null,K=K.toLowerCase()),W&&B&&(W=Vn(W,B)||W);const he=K!=="/"&&K.endsWith("/")?K.length-1:K.length;let de=Y===K||!c&&Y.startsWith(K)&&Y.charAt(he)==="/",fe=W!=null&&(W===K||!c&&W.startsWith(K)&&W.charAt(K.length)==="/"),R={isActive:de,isPending:fe,isTransitioning:P},V=de?a:void 0,ie;typeof l=="function"?ie=l(R):ie=[l,de?"active":null,fe?"pending":null,P?"transitioning":null].filter(Boolean).join(" ");let ke=typeof f=="function"?f(R):f;return S.createElement(sv,{...p,"aria-current":V,className:ie,ref:x,style:ke,to:d,viewTransition:m},typeof g=="function"?g(R):g)});nE.displayName="NavLink";var aE=S.forwardRef(({discover:n="render",fetcherKey:a,navigate:r,reloadDocument:l,replace:c,state:f,method:d=ko,action:m,onSubmit:g,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T,...N},L)=>{let{unstable_useTransitions:B}=S.useContext(Yn),P=oE(),K=uE(m,{relative:p}),Y=d.toLowerCase()==="get"?"get":"post",W=typeof m=="string"&&rv.test(m),he=de=>{if(g&&g(de),de.defaultPrevented)return;de.preventDefault();let fe=de.nativeEvent.submitter,R=fe?.getAttribute("formmethod")||d,V=()=>P(fe||de.currentTarget,{fetcherKey:a,method:R,navigate:r,replace:c,state:f,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T});B&&r!==!1?S.startTransition(()=>V()):V()};return S.createElement("form",{ref:L,method:Y,action:K,onSubmit:l?g:he,...N,"data-discover":!W&&n==="render"?"true":void 0})});aE.displayName="Form";function iE(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lv(n){let a=S.useContext($i);return qe(a,iE(n)),a}function rE(n,{target:a,replace:r,state:l,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:m,unstable_useTransitions:g}={}){let p=ev(),x=bi(),y=il(n,{relative:f});return S.useCallback(T=>{if(jw(T,a)){T.preventDefault();let N=r!==void 0?r:ma(x)===ma(y),L=()=>p(n,{replace:N,state:l,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:m});g?S.startTransition(()=>L()):L()}},[x,p,y,r,l,a,n,c,f,d,m,g])}var sE=0,lE=()=>`__${String(++sE)}__`;function oE(){let{router:n}=lv("useSubmit"),{basename:a}=S.useContext(Yn),r=gw(),l=n.fetch,c=n.navigate;return S.useCallback(async(f,d={})=>{let{action:m,method:g,encType:p,formData:x,body:y}=Uw(f,a);if(d.navigate===!1){let T=d.fetcherKey||lE();await l(T,r,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:y,formMethod:d.method||g,formEncType:d.encType||p,flushSync:d.flushSync})}else await c(d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:y,formMethod:d.method||g,formEncType:d.encType||p,replace:d.replace,state:d.state,fromRouteId:r,flushSync:d.flushSync,viewTransition:d.viewTransition})},[l,c,a,r])}function uE(n,{relative:a}={}){let{basename:r}=S.useContext(Yn),l=S.useContext(aa);qe(l,"useFormAction must be used inside a RouteContext");let[c]=l.matches.slice(-1),f={...il(n||".",{relative:a})},d=bi();if(n==null){f.search=d.search;let m=new URLSearchParams(f.search),g=m.getAll("index");if(g.some(x=>x==="")){m.delete("index"),g.filter(y=>y).forEach(y=>m.append("index",y));let x=m.toString();f.search=x?`?${x}`:""}}return(!n||n===".")&&c.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:da([r,f.pathname])),ma(f)}function cE(n,{relative:a}={}){let r=S.useContext(ed);qe(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=lv("useViewTransitionState"),c=il(n,{relative:a});if(!r.isTransitioning)return!1;let f=Vn(r.currentLocation.pathname,l)||r.currentLocation.pathname,d=Vn(r.nextLocation.pathname,l)||r.nextLocation.pathname;return Qo(c.pathname,d)!=null||Qo(c.pathname,f)!=null}function fE(n){return S.createElement(Cw,{flushSync:ky.flushSync,...n})}const ov=(...n)=>n.filter((a,r,l)=>!!a&&a.trim()!==""&&l.indexOf(a)===r).join(" ").trim();const dE=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const hE=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,r,l)=>l?l.toUpperCase():r.toLowerCase());const Fg=n=>{const a=hE(n);return a.charAt(0).toUpperCase()+a.slice(1)};var mE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const pE=n=>{for(const a in n)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};const gE=S.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:r=2,absoluteStrokeWidth:l,className:c="",children:f,iconNode:d,...m},g)=>S.createElement("svg",{ref:g,...mE,width:a,height:a,stroke:n,strokeWidth:l?Number(r)*24/Number(a):r,className:ov("lucide",c),...!f&&!pE(m)&&{"aria-hidden":"true"},...m},[...d.map(([p,x])=>S.createElement(p,x)),...Array.isArray(f)?f:[f]]));const vt=(n,a)=>{const r=S.forwardRef(({className:l,...c},f)=>S.createElement(gE,{ref:f,iconNode:a,className:ov(`lucide-${dE(Fg(n))}`,`lucide-${n}`,l),...c}));return r.displayName=Fg(n),r};const yE=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],vE=vt("bell",yE);const bE=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],uv=vt("bot",bE);const xE=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],SE=vt("cable",xE);const wE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Of=vt("circle-check",wE);const EE=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],TE=vt("circle-dashed",EE);const CE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],cv=vt("circle-x",CE);const AE=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],RE=vt("cpu",AE);const _E=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],fv=vt("download",_E);const kE=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],NE=vt("external-link",kE);const OE=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],ME=vt("folder-git-2",OE);const DE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],jE=vt("info",DE);const zE=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],LE=vt("languages",zE);const UE=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Gr=vt("loader-circle",UE);const BE=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],qE=vt("lock-keyhole",BE);const HE=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],QE=vt("refresh-cw",HE);const PE=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],GE=vt("rotate-ccw",PE);const KE=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],VE=vt("settings",KE);const YE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],FE=vt("shield-check",YE);const XE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],ZE=vt("square",XE);const IE=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],JE=vt("terminal",IE);const $E=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Po=vt("triangle-alert",$E);const WE=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],eT=vt("users",WE);const tT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],dv=vt("x",tT),Xg=n=>{let a;const r=new Set,l=(p,x)=>{const y=typeof p=="function"?p(a):p;if(!Object.is(y,a)){const T=a;a=x??(typeof y!="object"||y===null)?y:Object.assign({},a,y),r.forEach(N=>N(a,T))}},c=()=>a,m={setState:l,getState:c,getInitialState:()=>g,subscribe:p=>(r.add(p),()=>r.delete(p))},g=a=n(l,c,m);return m},nT=(n=>n?Xg(n):Xg),aT=n=>n;function iT(n,a=aT){const r=ne.useSyncExternalStore(n.subscribe,ne.useCallback(()=>a(n.getState()),[n,a]),ne.useCallback(()=>a(n.getInitialState()),[n,a]));return ne.useDebugValue(r),r}const Zg=n=>{const a=nT(n),r=l=>iT(a,l);return Object.assign(r,a),r},hv=(n=>n?Zg(n):Zg),Ys=hv(n=>({sidebarOpen:!0,theme:"system",settingsOpen:!1,settingsTab:"general",toggleSidebar:()=>n(a=>({sidebarOpen:!a.sidebarOpen})),setSidebarOpen:a=>n({sidebarOpen:a}),setTheme:a=>n({theme:a}),openSettings:a=>n({settingsOpen:!0,...a?{settingsTab:a}:{}}),closeSettings:()=>n({settingsOpen:!1}),setSettingsTab:a=>n({settingsTab:a})})),Ig="/api";function mv(n){return n.endsWith("/")?n.slice(0,-1):n}function pv(n){return!1}function rT(){return pv()?Ig:mv(Ig)}function sT(){return pv()?"":mv("")}const lT=rT();class oT{baseUrl;constructor(a){this.baseUrl=a}async request(a,r={}){const{params:l,...c}=r;let f=`${this.baseUrl}${a}`;if(l){const g=new URLSearchParams(l);f+=`?${g.toString()}`}const d={...c.headers};c.body!==void 0&&(d["Content-Type"]="application/json");const m=await fetch(f,{...c,headers:d,credentials:c.credentials??"same-origin"});if(!m.ok){const g=await m.json().catch(()=>({}));throw new rl(m.status,typeof g.message=="string"?g.message:typeof g.error=="string"?g.error:"Request failed",g)}if(m.status!==204)return m.json()}get(a,r){return this.request(a,{...r,method:"GET"})}post(a,r,l){return this.request(a,{...l,method:"POST",body:r?JSON.stringify(r):void 0})}put(a,r,l){return this.request(a,{...l,method:"PUT",body:r?JSON.stringify(r):void 0})}patch(a,r,l){return this.request(a,{...l,method:"PATCH",body:r?JSON.stringify(r):void 0})}delete(a,r){return this.request(a,{...r,method:"DELETE"})}}class rl extends Error{status;details;constructor(a,r,l={}){super(r),this.name="ApiError",this.status=a,this.details=l}}const Le=new oT(lT),be={projects:{all:["projects"],list:n=>["projects","list",n],detail:n=>["projects","detail",n],gitCapability:n=>["projects","gitCapability",n]},tasks:{all:["tasks"],boardAll:["tasks","board"],board:n=>["tasks","board",n],list:(n,a)=>["tasks","list",n,a],detail:n=>["tasks","detail",n],body:n=>["tasks","body",n],stats:n=>["tasks","stats",n]},workspaces:{all:["workspaces"],list:n=>["workspaces","list",n],detail:n=>["workspaces","detail",n],diff:n=>["workspaces","diff",n],gitStatus:n=>["workspaces","gitStatus",n]},previews:{all:["previews"],status:n=>["previews","status",n]},sessions:{all:["sessions"],detail:n=>["sessions","detail",n]},conversations:{all:["conversations"],list:n=>["conversations","list",n],detail:n=>["conversations","detail",n]},files:{all:["files"],tree:(n,a)=>["files","tree",n,a],content:(n,a)=>["files","content",n,a]},git:{all:["git"],changes:n=>["git","changes",n],diff:(n,a,r)=>["git","diff",n,a,r],log:n=>["git","log",n],commitFiles:(n,a)=>["git","commitFiles",n,a],commitDiff:(n,a,r)=>["git","commitDiff",n,a,r]},profiles:{all:["profiles"],defaults:["profiles","defaults"],agent:n=>["profiles","agent",n],variant:(n,a)=>["profiles","variant",n,a]},providers:{all:["providers"],capabilities:["providers","capabilities"],detail:n=>["providers","detail",n]},tunnel:{status:["tunnel","status"]},notifications:{settings:["notifications","settings"]},appSettings:{detail:["app-settings"]},accessAuth:{status:["access-auth","status"],settings:["access-auth","settings"]},agentCli:{manifest:["agent-cli","manifest"],status:["agent-cli","status"],preview:n=>["agent-cli","preview",n],task:n=>["agent-cli","task",n],logs:n=>["agent-cli","logs",n]},system:{cursorAgentModels:["system","cursor-agent-models"],mcpConfig:["system","mcp-config"],slashCommandCatalog:(n,a)=>["system","slash-command-catalog",n??null,a??null],skillCatalog:(n,a)=>["system","skill-catalog",n??null,a??null]}};function uT(){return rn({queryKey:be.appSettings.detail,queryFn:()=>Le.get("/app-settings")})}function cT(){const n=tt();return ht({mutationFn:a=>Le.put("/app-settings",a),onSuccess:()=>{n.invalidateQueries({queryKey:be.appSettings.detail})}})}function VA(){return rn({queryKey:[...be.appSettings.detail,"commit-message-defaults"],queryFn:()=>Le.get("/app-settings/commit-message-defaults")})}const fT={"zh-CN":{Settings:"设置",General:"通用",Back:"返回","Loading...":"加载中...","No options":"暂无选项","Processing...":"处理中...",Confirm:"确认",Cancel:"取消",Start:"开始","Starting...":"启动中...","General Settings":"通用设置","Display Language":"显示语言","Choose the interface language. The setting is saved to the local Agent Tower database and will still apply after restart.":"选择界面语言。设置会保存到本地 Agent Tower 数据库,并在重新打开后继续生效。",English:"English","Simplified Chinese":"简体中文","Language setting":"语言设置","Language setting could not be saved":"语言设置保存失败","Browse and select a Git repository, or type a path and press Enter":"浏览并选择一个 Git 仓库,或输入路径后按 Enter","Browse and select a directory, or type a path and press Enter":"浏览并选择一个目录,或输入路径后按 Enter","Select Current":"选择当前目录","Project Path":"项目路径","Create Local Project":"创建本地项目","Local project":"本地项目","Local projects only support local Solo tasks. Initialize Git to use worktrees and TeamRun.":"本地项目仅支持本地 Solo 任务。初始化 Git 后可使用工作树和 TeamRun。","You can also create it as a local project now. Local projects only support local Solo tasks until Git is initialized.":"你也可以现在将其创建为本地项目。初始化 Git 前,本地项目仅支持本地 Solo 任务。","This setting applies only to Git worktree projects.":"此设置仅适用于 Git 工作树项目。","Agent 配置":"Agent 配置",项目配置:"项目配置",通知:"通知",通用:"通用","AI Agent Task Management Dashboard":"AI Agent 任务管理面板","Project Management":"项目管理","Manage your AI agent projects":"管理你的 AI Agent 项目","View Projects":"查看项目","Task Board":"任务看板",Tasks:"任务","Kanban-style task management":"Kanban 风格的任务管理","Open Board":"打开看板",Workspace:"工作区","Git worktree isolated environments":"Git Worktree 隔离环境","Manage Workspaces":"管理工作区","Move to":"移动到","Delete Task":"删除任务","Drop into {title}":"放入 {title}","Drop here":"拖到此处","No tasks":"暂无任务","All Projects":"所有项目",Projects:"项目","Select View":"选择视图","Create New Project...":"创建新项目...","New Task":"新任务","New Project":"新项目",Search:"搜索","Search tasks...":"搜索任务...","Search conversations...":"搜索对话...","Recent tasks":"近期任务","Recent conversations":"最近对话","No matching tasks":"没有匹配的任务","No matching conversations":"没有匹配的对话","{count} tasks":"{count} 个任务","Clear filter":"清除筛选",Review:"待审查",Running:"进行中",Pending:"待开始",Done:"已完成",Cancelled:"已取消",Starting:"启动中",Completed:"已完成",Stopped:"已停止",Changes:"变更",History:"历史",Conversation:"对话",Conversations:"对话","New Conversation":"新对话","No conversations":"暂无对话","Conversation not found":"对话不存在","Delete this conversation?":"删除这个对话?","Ask a question...":"问一个问题...",Editor:"编辑器",Terminal:"终端",Preview:"预览","Coming soon...":"即将推出...",Modified:"已修改",Added:"已新增",Deleted:"已删除",Delete:"删除",Renamed:"已重命名","Loading diff...":"正在加载差异...","Failed to load diff.":"加载差异失败。","No diff content available.":"没有可显示的差异内容。","No workspace selected.":"未选择工作区。","Loading changes...":"正在加载变更...","Failed to load changes.":"加载变更失败。","No pending changes":"暂无待处理变更",Uncommitted:"未提交",Committed:"已提交","Select a file to view diff":"选择一个文件以查看差异","{count}s ago":"{count} 秒前","{count}m ago":"{count} 分钟前","{count}h ago":"{count} 小时前","{count}d ago":"{count} 天前",正在思考:"正在思考","最后一次输出于 {duration}前":"最后一次输出于 {duration}前",等待首次输出:"等待首次输出","{count} 秒":"{count} 秒","{minutes} 分 {seconds} 秒":"{minutes} 分 {seconds} 秒","{hours} 小时 {minutes} 分":"{hours} 小时 {minutes} 分","Loading files...":"正在加载文件列表...","No files changed":"没有文件变更","Loading history...":"正在加载历史记录...","Failed to load history.":"加载历史记录失败。","No commit history":"暂无提交历史","Load more":"加载更多","Select a commit to view changes":"选择一个提交以查看变更","Zoom out":"缩小","Reset zoom":"重置缩放","Zoom in":"放大","Fit to view":"适应视图","Failed to load image.":"加载图片失败。","Close tab":"关闭标签页",Close:"关闭","Expand file tree":"展开文件树","No open files":"暂无打开文件",Saving:"保存中",Unsaved:"未保存","Select a file from the tree to open.":"从文件树中选择一个文件以打开。","Loading file...":"正在加载文件...","Failed to load file":"加载文件失败","Failed to load":"加载失败","Failed to start. Please try again.":"启动失败,请重试",Files:"文件","No working directory":"未选择工作目录","Refresh file tree":"刷新文件树","Collapse file tree":"收起文件树","Shell {count}":"终端 {count}","New Terminal":"新终端","No terminals open":"暂无打开终端",Disconnected:"未连接","Connecting...":"连接中...",Connected:"已连接","No active session":"暂无活动会话","Create a workspace and start a session to see terminal output.":"创建工作区并启动会话后即可查看终端输出。","Process exited with code {code}":"进程已退出,退出码 {code}","Error: {message}":"错误: {message}","Session: {id}":"会话: {id}","Tunnel active":"隧道已启用","Share via tunnel":"通过隧道分享","Tunnel Active":"隧道已启用","Tunnel healthy":"隧道健康","Tunnel needs attention":"隧道需要注意","Tunnel unavailable":"隧道不可用","Tunnel starting":"隧道启动中","Tunnel is off":"隧道未开启","Checking tunnel health":"正在检查隧道健康","Observing original link":"正在观察原链接","Local service unavailable":"本地服务不可用","Tunnel process exited":"隧道进程已退出","Tunnel error":"隧道错误","New link generated":"新链接已生成","Use Agent Tower on your phone":"在手机上使用 Agent Tower","After enabling the tunnel, you can scan a QR code with your phone to visit this Agent Tower instance, assign tasks, and check agent status.":"开启隧道后,可以用手机扫码访问本机的 Agent Tower,用手机派任务、查看 Agent 状态。","Enable phone access":"开启手机访问","Starting tunnel...":"正在开启隧道...","Start a temporary Quick Tunnel when you need to share this Agent Tower session.":"需要分享当前 Agent Tower 会话时,可以启动一个临时 Quick Tunnel。","The Cloudflare tunnel is running and the local Agent Tower health check passed.":"Cloudflare 隧道正在运行,且本地 Agent Tower 健康检查已通过。","The Cloudflare tunnel is running. Agent Tower is waiting for the first local health check.":"Cloudflare 隧道正在运行,Agent Tower 正在等待首次本地健康检查。","The original public URL is currently unreachable. Agent Tower is watching for it to recover and will not generate a new link automatically.":"原公网链接当前不可访问。Agent Tower 正在观察它是否恢复,不会自动生成新链接。","The local Agent Tower target is not responding, so the tunnel cannot be considered healthy.":"本地 Agent Tower 目标没有响应,因此隧道不能视为健康。","The tunnel process has exited. The old Quick Tunnel link is unlikely to recover.":"隧道进程已退出,旧 Quick Tunnel 链接大概率无法恢复。","The tunnel reported an error. Check the diagnostics before generating a new link.":"隧道报告了错误。生成新链接前请先查看诊断信息。","A new Quick Tunnel link was generated. The old link and token are no longer valid.":"已生成新的 Quick Tunnel 链接。旧链接和 token 已失效。","Agent Tower is asking Cloudflare Quick Tunnel for a temporary public URL.":"Agent Tower 正在向 Cloudflare Quick Tunnel 申请临时公网链接。","Last checked":"上次检查","Last healthy":"上次健康",Never:"从未","Agent Tower is keeping the same URL and waiting for Cloudflare Quick Tunnel to recover.":"Agent Tower 会保留同一个 URL,并等待 Cloudflare Quick Tunnel 自行恢复。","The previous tunnel link and token are no longer valid.":"之前的隧道链接和 token 已不再有效。","Generating a new link will invalidate the current link. People using the old URL must receive the new one.":"生成新链接会使当前链接失效。正在使用旧 URL 的人需要收到新链接。","Regenerate link":"重新生成链接","Generating...":"生成中...","Token protected":"受 Token 保护","Copy shareable link":"复制分享链接","No tunnel link available":"暂无可用隧道链接","Hide token":"隐藏 Token","Show token":"显示 Token","Copy token":"复制 Token","Stopping...":"停止中...","Stop Tunnel":"停止隧道","Create & Start":"创建并启动","Create TeamRun":"创建 TeamRun","Creating TeamRun...":"正在创建 TeamRun...","Team Status":"团队状态","Team mode":"团队模式","Review reason":"审查原因",Members:"成员","No members":"暂无成员",Queue:"队列","No queued work requests":"暂无排队中的工作请求","Active invocations":"活动调用","No active invocations":"暂无活动调用","Recently completed":"最近完成","No completed invocations":"暂无已完成调用","New session per request":"每次新会话","Resume last session":"复用上次会话",Latest:"最新","Invocation history":"调用历史","No invocation history":"暂无调用历史","No invocations yet":"暂无调用记录","All members idle":"所有成员空闲",Log:"日志",Details:"详情",Workspaces:"工作区",Owner:"所有者",Parent:"父级",Selected:"已选",Select:"选择","View workspace":"查看工作区",Invocation:"调用",Session:"会话","View log":"查看日志","View details":"查看详情","Team room":"团队房间","No room messages yet":"暂无房间消息",Messages:"消息","Work requests":"工作请求","Active work":"进行中的工作",Working:"正在工作","Queued...":"排队中...","Waiting reply...":"等待回复...",running:"进行中",queued:"排队",waiting:"等待",ended:"已结束",Elapsed:"耗时",Failed:"失败","Session ended":"会话已结束","Failed to send room message":"发送房间消息失败",selected:"已选择","Back to bottom":"回到底部","Expand full message":"展开全部","Collapse message":"收起","Invocation details":"调用详情","Back to room":"返回群聊","Pending approval":"待审批","Tool Calls":"工具调用",已处理:"已处理","已处理 {duration}":"已处理 {duration}","No pending approvals":"暂无待审批项",Requester:"发起者",User:"用户",System:"系统","Waiting room reply":"等待房间回复",Queued:"排队中",Idle:"空闲","Queue if busy":"忙碌时排队","Cancel current if busy":"忙碌时取消当前并开始","Cancel queued":"取消排队",Approve:"批准",Approving:"批准中...",Reject:"拒绝",Rejecting:"拒绝中...",Cancelling:"取消中...","Failed to update work request":"更新工作请求失败","Failed to cancel work request":"取消工作请求失败",Stop:"停止","Stop running work?":"停止正在运行的工作?","Stop only":"仅停止","Stop + clear queue":"停止并清空队列",Stopping:"停止中...","Failed to stop member work":"停止成员工作失败",Yes:"是",No:"否","Creating Task...":"正在创建任务...","Creating Workspace...":"正在创建工作区...","Creating Session...":"正在创建会话...","Starting Agent...":"正在启动 Agent...","启动 Agent 失败":"启动 Agent 失败","重试启动 Agent":"重试启动 Agent","Create New Project":"创建新项目","Creating...":"创建中...","Checking...":"检查中...",Create:"创建","Create Project":"创建项目","Initialize Git repository?":"初始化 Git 仓库?","Initialize and Create":"初始化并创建","This directory is empty and does not have Git version control yet. Agent Tower can initialize Git and create the initial commit before creating the project.":"该目录为空且尚未启用 Git 版本管理。Agent Tower 可以先初始化 Git 并创建初始提交,然后再创建项目。","The selected directory is not a Git repository and is not empty. Initialize Git manually and make an initial commit, then create the project.":"所选目录不是 Git 仓库且不为空。请手动初始化 Git 并完成首次提交,然后再创建项目。","Selected path is not a valid directory":"所选路径不是有效目录","Could not check repository path":"无法检查仓库路径","Could not check project path":"无法检查项目路径","Project Name":"项目名称","e.g., Agent Tower":"例如:Agent Tower","Repository Path":"仓库路径","Create New Task":"创建新任务",Execution:"执行方式","Solo Agent":"Solo Agent",Project:"项目",Provider:"Provider",Agent:"Agent","Select project...":"选择项目...","Select provider...":"选择 Provider...","Task Title":"任务标题","e.g., Implement login flow":"例如:实现登录流程",Description:"描述","Optional...":"可选...","Optional description...":"可选描述...","Drop files here":"将文件拖到这里","Attach files":"添加文件","or paste files":"或粘贴文件","or paste/drag files":"或粘贴/拖拽文件","Drag to resize":"拖动以调整大小","Failed to create task":"创建任务失败","Failed to create project":"创建项目失败","Select a task from the sidebar to view logs, monitor execution, or interact with an agent.":"从侧边栏选择一个任务,以查看日志、监控执行过程,或与 Agent 交互。","Open in IDE":"在 IDE 中打开","Toggle Workspace":"切换工作区面板","More actions":"更多操作","No description":"暂无描述","Setup ({current}/{total}): {command}":"Setup({current}/{total}):{command}","Loading logs...":"正在加载日志...","Waiting for agent output...":"等待 Agent 输出...","No logs recorded for this session.":"当前会话暂无日志记录。","Scroll to bottom":"滚动到底部","Send failed. Please try again.":"发送失败,请重试","Drop files here...":"将文件拖到这里...","Continue conversation...":"继续对话...","Message Agent...":"给 Agent 发送消息...","Upload file":"上传文件","Uploading...":"上传中...",Send:"发送","Describe your task...":"描述你的任务...","Switch to TeamRun":"切换到 TeamRun","Switch to Solo Agent":"切换到单 Agent"," (unavailable)":"(不可用)","Manage Team Members":"管理团队成员","Add member":"添加成员","Save member":"保存成员","Edit member":"编辑成员","Remove member":"移除成员",Remove:"移除","Member added":"成员已添加","Member updated":"成员已更新","Member removed":"成员已移除","Failed to save member":"保存成员失败","Failed to remove member":"移除成员失败","Name, provider, and role prompt are required":"名称、Provider 和角色提示词不能为空","No active members":"暂无活跃成员","Add member from preset":"从预设添加成员","Choose a saved preset to add a ready-to-run member snapshot.":"选择已保存的预设,添加一个可直接工作的成员快照。","Custom member":"自定义成员",Custom:"自定义","Use preset":"使用预设",Preset:"预设","Select a member":"选择成员","Choose a member on the left to edit its future TeamRun configuration.":"从左侧选择成员,编辑其后续 TeamRun 配置。","Provider, role, workspace, and session changes apply to future work only.":"Provider、角色、工作区和会话变更只影响后续工作。","Create a one-off member snapshot for this TeamRun.":"为当前 TeamRun 创建一次性的成员快照。","Create a custom member for this TeamRun, or add presets from Team Collaboration Settings.":"可以为当前 TeamRun 创建自定义成员,或先在团队协作设置中添加预设。","Remove this member from future TeamRun work?":"将该成员从后续 TeamRun 工作中移除?",Name:"名称",Aliases:"别名",Avatar:"头像","Workspace policy":"工作区策略","Trigger policy":"触发策略","Session policy":"会话策略","Queue policy":"队列策略","Role prompt":"角色提示词",Capabilities:"能力","Comma separated":"用逗号分隔","No member presets":"暂无成员预设","...":"...","alice, a, reviewer":"alice, a, reviewer","Checking preview target...":"正在检查预览目标...","Configure a local preview target to display it here.":"配置本地预览目标后将在此显示。","Delete Project":"删除项目","Deleted projects are read-only":"已删除项目为只读","Deleting...":"删除中...","Enter a local preview URL on the Agent Tower machine.":"输入 Agent Tower 所在机器上的本地预览 URL。","Failed to delete project":"删除项目失败","Failed to load full message":"加载完整消息失败","Failed to restore project":"恢复项目失败","Failed to save preview target":"保存预览目标失败",Forward:"前进","Git Commit Message":"Git Commit Message",Loading:"加载中","Loopback only":"仅限本机回环地址","Mention members":"提及成员","Message the team room...":"向 Team Room 发送消息...","No active workspace.":"暂无活动工作区。","Open preview in new tab":"在新标签页打开预览","Preview target is not reachable":"预览目标不可访问","Preview target saved":"预览目标已保存","Preview address":"预览地址",Private:"私密",Proxying:"代理中","Read-only":"只读",Refresh:"刷新","Refresh preview":"刷新预览","Remove mention":"移除提及","Restore Project":"恢复项目","Restoring...":"恢复中...",Save:"保存","Save preview target":"保存预览目标","Start the preview server, then refresh.":"启动预览服务后刷新。","Stop loading":"停止加载","Team members":"团队成员","this project":"此项目","This project is read-only":"此项目为只读","10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果":"10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果",设计推荐:"设计推荐","首选:Charcoal Breathe (#10)":"首选:Charcoal Breathe (#10)","备选A:Tower Pulse (#1)":"备选A:Tower Pulse (#1)","备选B:Terminal Cursor (#4)":"备选B:Terminal Cursor (#4)","品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。":"品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。","品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。":"品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。","终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。":"终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。","全屏预览:{name}":"全屏预览:{name}",关闭预览:"关闭预览","按 Esc 或点击关闭按钮退出":"按 Esc 或点击关闭按钮退出","Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。":"Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。","五根柱状条交错升降,暗喻任务编排队列,节奏感强。":"五根柱状条交错升降,暗喻任务编排队列,节奏感强。","双层同心圆环反向旋转,精密工具质感,不浮夸。":"双层同心圆环反向旋转,精密工具质感,不浮夸。","终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。":"终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。","三点波浪脉动,极简克制,适合工具型产品的默认加载。":"三点波浪脉动,极简克制,适合工具型产品的默认加载。","三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。":"三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。","水平光束往复滑过进度条,线性进度隐喻,不阻断视线。":"水平光束往复滑过进度条,线性进度隐喻,不阻断视线。","三列骨架屏微闪,预示看板布局,减少布局跳变。":"三列骨架屏微闪,预示看板布局,减少布局跳变。","圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。":"圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。","Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。":"Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。",active:"活跃",working:"工作中"},en:{设置:"Settings",通用:"General",返回:"Back","加载中...":"Loading...",暂无选项:"No options","处理中...":"Processing...",确认:"Confirm",取消:"Cancel",工具调用:"Tool Calls",已处理:"Processed","已处理 {duration}":"Processed {duration}",正在思考:"Thinking","最后一次输出于 {duration}前":"Last output {duration} ago",等待首次输出:"Waiting for the first output","{count} 秒":"{count}s","{minutes} 分 {seconds} 秒":"{minutes}m {seconds}s","{hours} 小时 {minutes} 分":"{hours}h {minutes}m","失败 {count}":"Failed {count}",通用设置:"General Settings",显示语言:"Display Language","选择界面语言。设置会保存到本地 Agent Tower 数据库,并在重新打开后继续生效。":"Choose the interface language. The setting is saved to the local Agent Tower database and will still apply after restart.",简体中文:"Simplified Chinese",语言设置:"Language setting",语言设置保存失败:"Language setting could not be saved","Agent 配置":"Agent Settings",项目配置:"Project Settings",通知:"Notifications","MCP 配置":"MCP Config","复制下面的 JSON 到支持 MCP 的客户端配置中。桌面打包版使用 App 内置 runtime,不需要全局安装 agent-tower。":"Copy this JSON into an MCP-capable client config. The packaged desktop app uses the bundled runtime and does not require a global agent-tower install.",复制配置:"Copy Config","MCP 配置已复制":"MCP config copied","复制 MCP 配置失败":"Failed to copy MCP config","MCP 配置加载失败":"Failed to load MCP config","无需全局 CLI":"No global CLI needed","桌面打包 runtime":"Desktop packaged runtime","工作区 runtime":"Workspace runtime","当前版本只生成通用 MCP 配置,不会自动修改 Claude、Codex 或其他第三方客户端配置文件。":"This version only generates generic MCP config and does not modify Claude, Codex, or other third-party client config files automatically.","暂无项目,请先创建项目":"No projects yet. Create one first.",选择项目:"Select Project","选择项目...":"Select project...",自动复制文件:"Auto-copy Files","创建 worktree 时自动从主仓库复制的文件或目录。支持 glob 模式。":"Files or directories to copy from the main repository when creating a worktree. Glob patterns are supported.","适用于不在 git 管理中但启动必需的文件,如 .env、node_modules、数据库文件等":"Useful for required startup files that are not tracked by git, such as .env, node_modules, or database files.","Setup 脚本":"Setup Script","创建 worktree 后自动执行的命令,每行一条,按顺序执行。":"Commands to run automatically after creating the worktree, one per line in order.","命令在 worktree 目录下执行,单条命令超时 5 分钟,失败不会阻断后续命令":"Commands run inside the worktree directory. Each command times out after 5 minutes, and a failure does not block later commands.",常用命令:"Quick Commands","在终端中可快速执行的命令,不会自动运行。":"Commands that can be run quickly in the terminal. They are not executed automatically.","保存中...":"Saving...",保存:"Save",有未保存的更改:"You have unsaved changes",系统通知:"System Notifications",任务完成时弹出桌面通知:"Show a desktop notification when a task finishes.",第三方通知:"Third-party Notifications",选择一个第三方渠道接收通知:"Choose a third-party channel to receive notifications.",无:"None",飞书:"Feishu",测试发送:"Send Test",发送成功:"Sent successfully",发送失败:"Send failed","跳转地址(用于生成任务链接)":"Base URL (used to generate task links)",'通知卡片中的"查看任务"按钮将跳转到 {path}':'The "View Task" button in the notification card will open {path}',通知模板:"Notification Templates","支持变量: {taskTitle}, {taskId}, {projectId}, {projectName}, {status}":"Supported variables: {taskTitle}, {taskId}, {projectId}, {projectName}, {status}",标题模板:"Title Template",内容模板:"Body Template",'✅ "{taskTitle}" 已完成,等待审查':'✅ "{taskTitle}" is complete and ready for review',保存所有更改:"Save All Changes","启动失败: {message}":"Start failed: {message}",未知错误:"Unknown error",会话已停止:"Session stopped","Agent 交互演示":"Agent Interaction Demo","选择 Agent":"Select Agent","输入你的问题或任务...":"Enter your question or task...","启动中...":"Starting...",开始:"Start",对话:"Conversation",已连接:"Connected","连接中...":"Connecting...",未连接:"Disconnected",停止:"Stop","选择 Agent 并输入问题开始对话":"Select an agent and enter a prompt to start chatting.",你:"You","发送后续消息...":"Send a follow-up message...",发送:"Send",新会话:"New Session",未选择:"Not selected",连接:"Connection","Profiles 设置":"Profile Settings","配置变体 (Profile Variant)":"Profile Variant",输入任务:"Task Input","等待 Agent 响应...":"Waiting for agent output...","发送消息给 Agent...":"Send a message to the agent...","启动失败,请重试":"Failed to start. Please try again.",启动:"Start","创建工作空间...":"Creating workspace...","创建会话...":"Creating session...","启动 Agent...":"Starting agent...","启动 Agent":"Start Agent","选择 Provider":"Select Provider"," (不可用)":" (Unavailable)",任务描述:"Task Description","描述你想让 Agent 完成的任务...":"Describe the task you want the agent to complete...","输入文件路径...":"Enter a file path...",添加:"Add",添加此目录:"Add this directory",名称:"Name",命令:"Command",切换渠道:"Switch Provider","(默认)":"(Default)","留空为 auto;或直接输入模型 ID(与 cursor-agent --model 一致)":"Leave empty for auto, or enter a model ID directly (same as cursor-agent --model).","正在加载 cursor-agent 模型列表…":"Loading cursor-agent model list...",收起列表:"Collapse List","从本机 cursor-agent 选择({count} 个)":"Choose from local cursor-agent ({count})","筛选模型…":"Filter models...","默认 (auto)":"Default (auto)",无匹配项:"No matches",请求失败:"Request failed","无法从本机加载模型列表({error})。仍可手动输入;或在安装 cursor-agent 的机器上运行":"Could not load models from the local machine ({error}). You can still enter one manually, or run","查看 ID。":"to inspect available IDs.","Windows 将下载并执行官方 PowerShell 安装脚本;不会使用复制粘贴式 shell pipeline。":"Windows will download and run the official PowerShell installer script; no copy-paste shell pipeline is used.","安装器可能已完成,但当前 Agent Tower 进程尚未刷新 PATH;请重启 Agent Tower 后重新检测。":"The installer may have completed, but the current Agent Tower process has not refreshed PATH. Restart Agent Tower and detect again.","JSON 格式错误":"Invalid JSON format","删除 Profile Variant":"Delete Profile Variant","确定删除 {agentType} / {variant}?":"Delete {agentType} / {variant}?",新增:"New",内置:"Built-in","新增 Variant — {agentType}":"New Variant — {agentType}","编辑 {variant}":"Edit {variant}","Variant 名称":"Variant Name","例如: CUSTOM":"e.g. CUSTOM","配置 (JSON)":"Configuration (JSON)","状态变更失败,该操作不被允许":"Status change failed. This action is not allowed.","Git 操作":"Git Operations",删除任务:"Delete Task","Setup 完成":"Setup complete","Setup 失败: {error}":"Setup failed: {error}","尚未启动 Agent":"No agent started yet","选择一个 Agent 来执行此任务":"Choose an agent to execute this task.","选择一个 Agent 来执行此任务,Agent 将自动创建工作空间并开始工作。":"Choose an agent to execute this task. The agent will create a workspace automatically and start working.",回到底部:"Back to Bottom","代码已合并,以上为历史沟通记录":"The code has been merged. The conversation above is historical.","启动新 Agent":"Start New Agent","确认删除任务「{title}」?此操作不可撤销。":'Delete task "{title}"? This action cannot be undone.',删除:"Delete","正在运行的 Agent 将被停止":"The running agent will be stopped.",分支上未合并的变更将丢失:"Unmerged changes on the branch will be lost.","关联的工作目录(worktree)将被清理":"The associated worktree directory will be cleaned up.","{opLabel} 冲突 — {count} 个文件":"{opLabel} conflicts — {count} files",中止操作:"Abort Operation",解决冲突:"Resolve Conflicts","解决 {opLabel} 冲突":"Resolve {opLabel} Conflicts","在 IDE 中打开":"Open in IDE","发送中...":"Sending...","AI 辅助解决":"Resolve with AI","冲突文件({count})":"Conflicted Files ({count})","选择 Session(AI 辅助解决)":"Choose Session (Resolve with AI)","选择一个 Session...":"Select a session...","没有可用的 Session,请在 IDE 中手动解决冲突。":"No session is available. Please resolve the conflicts manually in your IDE.","TeamRun 模式下会把处理冲突请求发送到 Team Room,由团队调度处理。":"In TeamRun mode, the conflict request will be sent to Team Room for team scheduling.","已发送到 Team Room":"Sent to Team Room",快捷命令:"Quick Commands",待办:"Todos","上下文: {used} / {max} tokens":"Context: {used} / {max} tokens","已使用: {used} tokens":"Used: {used} tokens",可用:"Available",不可用:"Unavailable",该类型暂无运行配置:"No runtime configuration is available for this type.","追加 Prompt":"Append Prompt","追加到每次 prompt 末尾的文本":"Text appended to the end of every prompt.",跳过权限确认:"Skip Permission Confirmation","自动批准操作(YOLO)":"Auto-approve Actions (YOLO)",模型:"Model",推理强度:"Reasoning Effort",强制执行:"Force Execution",跳过所有确认和沙盒:"Skip All Confirmations and Sandbox",Profile:"Profile","~/.codex/config.toml 中的 profile 名称":"Profile name in ~/.codex/config.toml",是:"Yes",否:"No",覆盖:"Overwrite",跳过:"Skip","JSON 语法错误":"Invalid JSON syntax","TOML 语法错误: {message}":"Invalid TOML syntax: {message}","编辑 Provider":"Edit Provider","新建 Provider":"New Provider","例如: Claude Code (官方)":"e.g. Claude Code (Official)","Agent 类型":"Agent Type","选择 Agent 类型":"Select Agent Type","设为该类型的默认 Provider":"Set as the default provider for this agent type",基本配置:"Basic Configuration","API 地址":"API URL","请输入以 http:// 或 https:// 开头的完整 API 地址":"Enter a complete API URL beginning with http:// or https://.","输入 API Key":"Enter API Key",未配置:"Not configured",由高级配置管理:"Managed in advanced configuration",替换:"Replace",取消替换:"Cancel replacement","确定清除此 API Key?":"Clear this API key?",思考强度:"Reasoning Effort","跟随 CLI":"Use CLI default",更高效:"More efficient",更智能:"More capable",当前:"Current",最低:"Minimal",低:"Low",中:"Medium",高:"High",超高:"Extra high",最高:"Maximum","请选择当前 Agent 支持的思考强度档位":"Choose a reasoning effort supported by this agent.",测试配置:"Test Configuration","测试中...":"Testing...","保存 Provider":"Save Provider",高级配置:"Advanced Configuration",执行权限:"Execution Permission","禁用 WebSocket":"Disable WebSocket","仅禁用 Codex Responses API 的 WebSocket 传输;新启动和后续继续的请求将使用 HTTP。":"Disable only the Codex Responses API WebSocket transport. New sessions and follow-ups will use HTTP.","当前原生 Provider 已使用非 WebSocket 传输;此开关不会添加额外运行时覆盖。":"The current native provider already uses a non-WebSocket transport. This switch adds no runtime override.","禁用 WebSocket 字段必须为 true 或 false,请在运行配置 JSON 中修正。":"The Disable WebSocket field must be true or false. Correct it in the runtime JSON.",高风险执行已开启:"High-risk execution enabled","Agent 将不再请求工具执行权限确认。":"The agent will no longer ask for tool execution permission.","Agent 将自动批准操作,不再逐项请求确认。":"The agent will approve operations automatically without asking for each action.","Agent 将以强制模式执行操作。":"The agent will execute operations in force mode.","Agent 将跳过确认并禁用沙盒保护。":"The agent will skip confirmations and disable sandbox protection.","执行权限字段必须为 true 或 false,请在运行配置 JSON 中修正。":"The execution permission field must be true or false. Correct it in the runtime JSON.","开启高风险执行权限?":"Enable high-risk execution permission?",确认开启:"Enable","配置错误:权限字段必须为布尔值":"Configuration error: the permission field must be a boolean.",配置错误:"Configuration error",权限已开启:"Enabled",权限已关闭:"Disabled","运行配置 (JSON)":"Runtime Configuration (JSON)",配置检查通过:"Configuration check passed",连接测试通过:"Connection test passed",本机可用性检查通过:"Local availability check passed",配置检查未通过:"Configuration check did not pass",测试对象:"Test target",测试时间:"Tested at",需要解决配置冲突:"Configuration conflicts must be resolved",简化字段与高级配置值不同:"The simplified and advanced values differ",采用简化值:"Use simplified value",保留高级值:"Keep advanced value","测试失败不会阻止保存。":"A failed test does not prevent saving.",测试配置失败:"Configuration test failed","存在未保存的修改,确定放弃吗?":"Discard the unsaved changes?","切换 Agent 类型会清空当前类型的配置,是否继续?":"Changing the agent type clears the current type-specific configuration. Continue?","JSON 顶层必须是对象":"The top-level JSON value must be an object.","{format} 语法错误: {message}":"Invalid {format} syntax: {message}","已配置,输入新值以替换":"Configured. Enter a new value to replace it.",运行配置:"Runtime Configuration",环境变量:"Environment Variables","注入到 Agent 进程的环境变量。Codex 的":"Environment variables injected into the agent process. Codex","指定的是变量名,实际值需在此处设置。":"specifies the variable name in env_key, and the actual value must be set here.","变量名,如 AZURE_OPENAI_API_KEY":"Variable name, e.g. AZURE_OPENAI_API_KEY",值:"Value",添加变量:"Add Variable","CLI 原生配置 (config.toml)":"Native CLI Config (config.toml)","CLI 原生配置 (settings.json)":"Native CLI Config (settings.json)","直接填写 Codex":"Enter a Codex","格式的配置片段,通过":"configuration snippet directly and inject it via","参数注入。不会修改你的":". It will not modify your","文件。":"file.","对应 Claude Code 的":"This corresponds to Claude Code",通过:"and is injected through","参数注入。在":". Configure","中设置 ANTHROPIC_API_KEY、ANTHROPIC_BASE_URL 等。":"inside env, such as ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL.","导出 Provider 备份":"Export Provider Backup","导出中...":"Exporting...",导出备份:"Export Backup","导出的备份文件将包含完整的 Provider 配置,包括环境变量、CLI settings 等敏感信息。任何拿到文件的人都可能直接使用这些 Provider。":"The exported backup file contains the full provider configuration, including sensitive information such as environment variables and CLI settings. Anyone with this file may be able to use those providers directly.","这个功能用于备份和迁移,不用于分享配置。":"This feature is for backup and migration, not for sharing configuration.","导出内容只包含用户层配置:自定义 Provider,以及对内置 Provider 的覆盖。":"The export only contains user-level configuration: custom providers and overrides of built-in providers.","我已知晓该备份文件包含敏感信息,只会保存在安全位置。":"I understand that this backup contains sensitive information and will only store it in a secure location.","导入 Provider 备份":"Import Provider Backup","导入中...":"Importing...","确认导入 {count} 项":"Import {count} item(s)","导出时间:{value}":"Exported at: {value}","模式:完整备份(含敏感信息)":"Mode: Full backup (contains sensitive data)","文件内 Provider 数量:{count}":"Providers in file: {count}","将覆盖当前已有的 Provider:{name}":"This will overwrite the existing provider: {name}","当前同 ID Provider 配置一致,本次不会重复写入。":"The provider with the same ID is already identical. It will not be written again.","当前不存在同 ID Provider,将直接新增。":"No provider with the same ID exists. It will be created directly.","系统内置 Provider 不可删除":"Built-in providers cannot be deleted.","已恢复默认 Provider 配置":"Default provider configuration restored.","Provider 已删除":"Provider deleted.","删除 Provider 失败":"Failed to delete provider.","Provider 备份已导出":"Provider backup exported.","导出 Provider 备份失败":"Failed to export provider backup.","备份文件不是有效的 JSON":"The backup file is not valid JSON.",导入预览失败:"Failed to preview import.","导入完成,当前配置无需变更":"Import complete. No changes were needed.","导入完成:新增 {create},覆盖 {overwrite},跳过 {skip}":"Import complete: created {create}, overwritten {overwrite}, skipped {skip}","导入 Provider 备份失败":"Failed to import provider backup.","Provider 配置":"Provider Configuration","管理 AI Agent 的连接配置和运行参数":"Manage AI agent connection settings and runtime parameters.",导入备份:"Import Backup","暂无 Provider 配置":"No providers configured yet.",默认:"Default","CLI 配置:":"CLI Config:",已配置:"Configured","环境变量:":"Environment Variables:",编辑:"Edit",删除自定义覆盖并恢复默认:"Delete custom override and restore default","恢复默认 Provider":"Restore Default Provider",'确定删除 "{name}" 的自定义覆盖,并恢复系统默认配置?':'Delete the custom override for "{name}" and restore the system default configuration?','确定删除 "{name}"?此操作不可撤销。':'Delete "{name}"? This action cannot be undone.',恢复默认:"Restore Default","{count} 个未提交变更":"{count} uncommitted changes","{count} 个冲突文件":"{count} conflicted files",变基进行中:"Rebase in progress",合并进行中:"Merge in progress","领先 {count} 个提交":"{count} commits ahead","落后 {count} 个提交":"{count} commits behind",已是最新:"Up to date","工作区有未提交的变更,请先让 Agent 提交或手动处理后再执行 Rebase / Merge 操作。":"The workspace has uncommitted changes. Ask the agent to commit them or handle them manually before running Rebase / Merge.",变基失败:"Rebase failed",合并失败:"Merge failed",确认合并:"Confirm Merge","加载分支状态...":"Loading branch status...","变基中...":"Rebasing...","变基 (Rebase)":"Rebase","将当前分支变基到最新的 {targetBranch}":"Rebase the current branch onto the latest {targetBranch}","合并 (Merge)":"Merge","合并中...":"Merging...","Squash merge 到 {targetBranch}":"Squash merge into {targetBranch}",提交消息:"Commit Message","输入提交消息...":"Enter commit message...",留空将使用默认消息:"Leave blank to use the default message.","Git Commit Message":"Git Commit Message","配置自动生成 commit message 时使用的 Agent 渠道和提示词。":"Configure the agent provider and prompt used for auto-generating commit messages.",访问安全:"Access Security",访问密码:"Access Password","开启后,进入 Agent Tower 需要输入密码。":"When enabled, Agent Tower requires this password before opening.",未启用:"Off",已启用:"On",将启用:"Will turn on",将关闭:"Will turn off",修改密码:"Change password",退出登录:"Log out","退出中...":"Logging out...",退出登录失败:"Failed to log out",已退出登录:"Logged out",当前密码:"Current password",新密码:"New password",确认密码:"Confirm password",请输入当前密码:"Enter the current password","密码至少需要 8 个字符":"Password must be at least 8 characters",两次输入不一致:"Passwords do not match",当前密码不正确:"Current password is incorrect","关闭后不再要求访问密码。":"After turning it off, Agent Tower will no longer require an access password.","保存后其他已登录页面需要重新输入。":"After saving, other signed-in pages will need to enter the password again.",关闭访问密码:"Turn off access password",已关闭:"Turned off","密码不正确,请重试":"Incorrect password. Please try again.",输入访问密码继续:"Enter the access password to continue","验证中...":"Verifying...",解锁:"Unlock","访问状态加载失败,请刷新后重试。":"Failed to load access status. Refresh and try again.","Agent 渠道":"Agent Provider",跟随任务:"Follow Task",'"跟随任务"表示使用当前任务所用的 Agent 渠道。选择具体渠道可使用更经济的模型。':'"Follow Task" uses the same provider as the current task. Select a specific provider to use a more cost-effective model.',提示词模板:"Prompt Template","自定义生成 commit message 的提示词。留空则使用内置默认模板。":"Custom prompt for generating commit messages. Leave empty to use the built-in default template.",保存失败:"Save failed",已保存:"Saved",已创建:"Created",创建:"Create",单人:"Solo",团队:"Team",团队协作:"Team Collaboration",团队协作设置:"Team Collaboration Settings","管理成员预设与团队模板。":"Manage member presets and team templates.",成员预设:"Member Presets",团队模板:"Team Templates","点击列表项可编辑。":"Click an item to edit it.",当前没有成员预设:"No member presets yet.",当前没有团队模板:"No team templates yet.",创建新成员预设:"Create a new member preset",编辑成员预设:"Edit member preset",创建新团队模板:"Create a new team template",编辑团队模板:"Edit team template",成员预设名称:"Member preset name",成员预设别名:"Member preset aliases",成员预设头像:"Member preset avatar",成员预设角色提示词:"Member preset role prompt",团队模板名称:"Team template name",别名:"Aliases",头像:"Avatar",角色提示词:"Role Prompt",可用能力:"Capabilities",工作区策略:"Workspace Policy",触发策略:"Trigger Policy",共享:"Shared",独占:"Dedicated",仅提及:"Mention only",所有用户消息:"All user messages",读房间:"Read room",发房间消息:"Post room message",提及成员:"Mention members",停止成员工作:"Stop member work",标记可审查:"Mark ready for review",读文件:"Read files",写文件:"Write files",运行命令:"Run commands","读 diff":"Read diff",合并工作区:"Merge workspace","{count} 个成员":"{count} member(s)","Provider 列表加载失败":"Failed to load providers","Provider 列表加载失败,无法创建或修改成员预设。":"Failed to load providers. Member presets cannot be created or updated.",成员预设加载失败:"Failed to load member presets",团队模板加载失败:"Failed to load team templates","请稍后重试。":"Please try again later.",重试:"Retry","暂无可用 Provider,请先在 Agent 配置中创建。":"No available provider. Create one in Agent Settings first.","alice, a, reviewer":"alice, a, reviewer","选择顺序即保存顺序。":"Selection order is the saved order.",已选成员:"Selected Members","上移下移后即为保存顺序。":"Use up/down to change the saved order.",尚未选择成员预设:"No member presets selected yet.","先创建成员预设,再配置团队模板。":"Create member presets first, then configure a team template.",删除失败:"Delete failed",上移:"Move up",下移:"Move down","创建 TeamRun":"Create TeamRun",TeamRun:"TeamRun",模式:"Mode",执行模式:"Execution mode","TeamRun 模式":"TeamRun mode",确认模式:"Confirm mode",自动模式:"Auto mode","默认使用自动模式,团队消息会直接排队执行。":"Auto mode is the default. Team messages are queued for execution directly.","模板成员会先加入,随后按顺序追加所选成员。":"Template members are added first, then the selected members are appended in order.","请选择至少一个团队模板或成员预设。":"Select at least one team template or member preset.","该任务已经存在 TeamRun。请刷新后再试。":"This task already has a TeamRun. Refresh and try again.","创建 TeamRun 失败":"Failed to create TeamRun","TeamRun 创建失败,请检查团队配置后重试":"TeamRun creation failed. Please check team config and retry.","前往 /settings/team 创建":"Go to /settings/team to create one","欢迎使用 Agent Tower":"Welcome to Agent Tower","需要我帮你做点什么?":"What can I help you with?","描述任务,选择 Agent 或团队,即刻开始":"Describe a task, pick an Agent or team, and start right away","描述一个任务,AI Agent 将为你开始工作":"Describe a task and an AI agent will start working on it.","TeamRun 协作配置":"TeamRun Configuration",团队协作配置:"Team Collaboration Config","切换回单 Agent":"Switch to Solo Agent",追加成员:"Additional Members","{count} 个追加成员":"{count} additional member(s)",去创建:"Create",请选择团队模板或追加成员:"Select a team template or add members","工作树隔离改动,支持 TeamRun、Merge、Rebase 和冲突解决。":"Worktrees isolate changes and support TeamRun, Merge, Rebase, and conflict resolution.","初始化 Git 后可使用工作树模式。":"Initialize Git to use worktree mode.","本地模式会直接修改项目主目录,不会自动提交,也不能使用 Merge、Rebase 或冲突解决。":"Main directory mode modifies the project directory directly. Auto-commit, Merge, Rebase, and conflict resolution are unavailable.","非 Git 项目只能使用本地模式。":"Non-Git projects can only use main directory mode.","TeamRun 需要工作树模式。开启团队模式时会自动切换为工作树模式。":"TeamRun requires worktree mode. Enabling team mode will switch to worktree mode automatically.","启用 TeamRun 后可选择团队模板或成员。":"After enabling TeamRun, choose a team template or members.",收起:"Collapse","没有可用项目,请先创建或恢复项目":"No available projects. Please create or restore a project first.","任务已创建,但启动 Agent 失败,可在详情中重试":"Task created, but failed to start Agent. You can retry from the task detail.",冲突:"Conflict",变基中:"Rebasing",合并中:"Merging","{count} 未提交":"{count} uncommitted","落后 {count}":"Behind {count}",可合并:"Mergeable",查看变更详情:"View changes","分支落后 {count} 个提交,建议先执行变基 (Rebase) 同步最新代码。":"The branch is {count} commits behind. Consider rebasing to sync the latest code.","合并到 {target}":"Merge into {target}",需要先变基同步最新代码:"Rebase required to sync latest code",请先处理未提交变更:"Handle uncommitted changes first","中止中...":"Aborting...","正在检查工作区状态...":"Checking workspace status...",当前分支还没有任何变更:"No changes on this branch yet",调整工作区宽度:"Resize workspace panel","{files} 个文件 · {lines} 行":"{files} files · {lines} lines",更新:"Update",合并:"Merge","{count} 个本地改动未处理,需要先整理后再继续":"{count} local changes pending — clean them up before continuing","{count} 个文件存在冲突,需要处理后继续":"{count} files have conflicts — resolve them to continue","正在同步源分支更新...":"Syncing updates from source branch...","正在提交变更...":"Submitting changes...","源分支 {branch} 有 {count} 个更新":"Source branch {branch} has {count} updates","{count} 个文件变更,可以安全提交":"{count} file changes, safe to submit",同步更新:"Sync updates","正在同步...":"Syncing...",提交变更:"Submit changes",需要先同步源分支更新:"Sync source branch updates first","更新失败,请稍后重试":"Update failed. Please try again later.","提交失败,请稍后重试":"Submit failed. Please try again later.","正在提交...":"Submitting...",确认提交:"Confirm Submit",请描述本次修改的内容:"Describe the changes in this submission","建议以 feat、fix、docs、refactor、chore 开头,保持提交记录清晰。feat 新增功能,fix 修复问题,docs 文档更新,refactor 代码重构,chore 日常维护。":"Start with feat (new feature), fix (bug fix), docs (documentation), refactor (restructure), or chore (maintenance) to keep the history clean.",需要先处理本地改动:"Handle local changes first",处理冲突:"Resolve conflicts","正在撤销...":"Undoing...",撤销操作:"Undo operation",确认后会停止当前工作并取消队列:"Confirming will stop the current work and clear the queue",每次新会话:"New session per request",复用上次会话:"Resume last session",仅自己队列:"Own queue only",全队列待处理:"Team pending queue",代码审查:"Review","{count} 个文件":"{count} files",未选择工作区:"No workspace selected",没有可显示的差异内容:"No diff content available","还有 {count} 行变更被折叠,点击展开全部":"{count} more lines collapsed — click to expand all","正在加载差异...":"Loading diff...",差异加载失败:"Failed to load diff",变更加载失败:"Failed to load changes",没有匹配筛选条件的文件:"No files match the filter",该提交没有文件变更:"No file changes in this commit",没有待审查的变更:"No changes to review",未提交:"Uncommitted",已提交:"Committed","筛选文件...":"Filter files...",无匹配文件:"No matching files",暂无变更文件:"No changed files",提交记录:"Commits",全部变更:"All changes","正在加载提交记录...":"Loading commits...",暂无提交记录:"No commits yet",加载更多提交:"Load more commits","{count} 个成员预设":"{count} member preset(s)","{count} 个团队模板":"{count} team template(s)",本地模式:"Main directory mode",编辑模板:"Edit template",编辑预设:"Edit preset",标题:"Title",测试:"Test",测试消息发送成功:"Test message sent successfully",触发:"Trigger","创建 Provider 失败":"Failed to create provider","创建 worktree 后自动执行的命令,每行一条。在 worktree 目录下执行,单条超时 5 分钟。":"Commands to run automatically after creating a worktree, one per line. Commands run inside the worktree directory and time out after 5 minutes each.","创建 worktree 时自动从主仓库复制的文件或目录,适用于 .env、node_modules 等不在 git 管理中的文件。支持 glob。":"Files or directories to copy from the main repository when creating a worktree, such as .env or node_modules files not tracked by git. Glob patterns are supported.",创建新模板:"Create new template",创建新预设:"Create new preset",当前没有可配置的项目:"No configurable projects yet",导出:"Export",导入:"Import",队列:"Queue","发送失败,请检查 Webhook 地址":"Failed to send. Check the webhook URL.","发送失败: {message}":"Send failed: {message}",返回列表:"Back to list","飞书 Webhook":"Feishu Webhook",'该 Provider 未配置额外参数。点击"编辑"添加运行配置、环境变量或 CLI 配置。':'This provider has no extra parameters configured. Click "Edit" to add runtime configuration, environment variables, or CLI configuration.',个变体:"variants",个文件:"files","更新 Provider 失败":"Failed to update provider",工作区:"Workspace",工作树模式:"Worktree mode","勾选后会连项目文件一起删除,请谨慎选择。":"When checked, project files will also be deleted. Choose carefully.","勾选后会删除 repoPath 指向的本地仓库目录,并禁用代码/Git 相关能力。":"When checked, the local repository directory pointed to by repoPath will be deleted, and code/Git capabilities will be disabled.","勾选后会删除项目路径指向的本地目录,并禁用代码/Git 相关能力。":"When checked, the local directory at the project path will be deleted, and code/Git capabilities will be disabled.",关闭:"Off","管理 Agent 执行器的配置变体。每个变体定义一组运行参数。":"Manage configuration variants for agent executors. Each variant defines a set of runtime parameters.","合并到 {targetBranch}":"Merge into {targetBranch}","恢复该项目时需要重新绑定一个有效的 Git 仓库路径。":"Restoring this project requires rebinding a valid Git repository path.","恢复该项目时需要重新绑定一个有效的项目路径。":"Restoring this project requires rebinding a valid project path.","恢复后,项目会重新出现在默认项目列表中。":"After restore, the project will appear in the default project list again.",恢复项目:"Restore project",会话:"Session",加载失败:"Failed to load","将归档当前工作区并自动在新 Worktree 中重新启动 Agent,旧工作区内容保留供参考。":"The current workspace will be archived and the agent will restart automatically in a new worktree. The old workspace content is kept for reference.","界面语言会保存到本地数据库,重启后继续生效。":"The interface language is saved to the local database and remains active after restart.","仅支持 PNG、JPG、WebP 头像。":"Only PNG, JPG, and WebP avatars are supported.",可用预设:"Available presets",模板名称:"Template name","成员心跳检测时间(分钟)":"Member heartbeat timeout (minutes)",内容:"Content",能力:"capabilities","启动 Agent 失败":"Failed to start Agent",启用团队模式:"Enable team mode",清除:"Clear",确认重试:"Confirm retry",人:" members",任务完成时弹出系统通知:"Show a system notification when a task finishes.","删除 Provider":"Delete Provider",删除任务失败:"Failed to delete task",删除项目:"Delete project",上传:"Upload",尚未选择:"Nothing selected yet",跳转地址:"Link target",'通知卡片中的"查看任务"按钮跳转地址前缀':'URL prefix for the "View Task" button in notification cards',通知设置:"Notification Settings",同时删除本地项目文件:"Also delete local project files",头像上传失败:"Avatar upload failed","头像图片不能超过 2MB。":"Avatar image must be 2 MB or smaller.",头像已上传:"Avatar uploaded",团队模式:"Team mode","推送到外部渠道(飞书群机器人等)":"Push to external channels such as Feishu bot webhooks.",我已确认这会删除本地项目文件:"I understand this will delete local project files",先创建成员预设:"Create member presets first","项目「{title}」的本地仓库文件已删除。恢复前需要重新绑定一个有效的 Git 仓库路径。":'Local repository files for project "{title}" have been deleted. Rebind a valid Git repository path before restoring it.',"项目「{title}」的本地项目文件已删除。恢复前需要重新绑定一个有效的项目路径。":'Local project files for project "{title}" have been deleted. Rebind a valid project path before restoring it.',"项目「{title}」将从默认项目列表隐藏,但历史任务、workspace 和会话记录仍会保留。":'Project "{title}" will be hidden from the default project list, but historical tasks, workspaces, and sessions will be kept.',"项目将从默认列表隐藏,历史记录保留。可选同时删除本地文件。":"The project will be hidden from the default list while history is kept. You can also delete local files.",项目为只读历史:"Project is read-only history",项目已恢复:"Project restored",项目已删除:"Project deleted","项目已删除,本地仓库文件也已清理。恢复项目并重新绑定仓库后才能继续操作。":"The project was deleted and local repository files were removed. Restore the project and rebind a repository before continuing.","项目已删除,并清理了本地文件":"Project deleted and local files removed","项目已删除。恢复项目后才能继续创建会话或修改任务。":"The project was deleted. Restore it before creating sessions or editing tasks.","项目已删除。Workspace 以只读模式展示历史内容。":"The project was deleted. The workspace shows historical content in read-only mode.","项目已删除且本地仓库文件已清理。这里只保留历史视图。":"The project was deleted and local repository files were removed. Only the historical view remains here.",新建:"New",新建配置:"New configuration",新增模板:"New template",新增预设:"New preset",选择:"Select","选择 {name} 头像":"Select {name} avatar","选择...":"Select...","选择一个 Provider 查看详情":"Select a provider to view details",选择一个项目查看配置:"Select a project to view configuration",选择预设头像:"Select preset avatar",已删除:"Deleted",源码已删除:"Source deleted","暂无 Agent 配置":"No agent configuration yet","暂无 Profile 配置":"No profile configuration yet",暂无变体:"No variants yet",暂无成员预设:"No member presets yet",暂无团队模板:"No team templates yet","重试启动 Agent":"Retry starting Agent",重新开始:"Restart",重新开始任务:"Restart task",追加独立成员:"Add standalone members",桌面通知:"Desktop notifications","Agent 将直接修改项目主目录;不会自动提交,也不能使用 Merge、Rebase 或冲突解决流程。":"The agent will modify the project main directory directly. Auto-commit, Merge, Rebase, and conflict resolution flows are unavailable.","Agent Tower 会尽量校验仓库 identity;如果 remote URL 或目录名不同,会给出警告但允许继续。":"Agent Tower will try to verify repository identity. If the remote URL or directory name differs, it will show a warning but still allow restore.","Agent Tower 会尽量校验项目 identity;如果 remote URL 或目录名不同,会给出警告但允许继续。":"Agent Tower will try to verify project identity. If the remote URL or directory name differs, it will show a warning but still allow restore.","CLI 配置":"CLI Config","Profile 配置":"Profile Configuration","Provider 列表加载失败。":"Failed to load provider list.","10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果":"10 first-screen loading animation candidates. Colors follow the Agent Tower design system. Click a card to view it fullscreen.",设计推荐:"Design recommendation","首选:Charcoal Breathe (#10)":"Top choice: Charcoal Breathe (#10)","备选A:Tower Pulse (#1)":"Alternative A: Tower Pulse (#1)","备选B:Terminal Cursor (#4)":"Alternative B: Terminal Cursor (#4)","品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。":"Strongest brand presence: a breathing Charcoal block with the Tower icon, making the product brand the first impression.","品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。":"The brand icon appears directly with a steady pulse. It stays restrained and fits a workspace product.","终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。":"A blinking terminal cursor matches the core agent and terminal collaboration flow and feels familiar to developers.","全屏预览:{name}":"Fullscreen preview: {name}",关闭预览:"Close preview","按 Esc 或点击关闭按钮退出":"Press Esc or click the close button to exit","Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。":'Agent Tower brand icon with a pulsing dot, conveying a branded "system is getting ready" state.',"五根柱状条交错升降,暗喻任务编排队列,节奏感强。":"Five bars rise in sequence, suggesting an orchestration queue with a strong rhythm.","双层同心圆环反向旋转,精密工具质感,不浮夸。":"Two concentric rings rotate in opposite directions for a precise tool feel without excess.","终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。":"A terminal-style cursor blink that directly echoes Agent Tower terminal collaboration.","三点波浪脉动,极简克制,适合工具型产品的默认加载。":"A minimal three-dot wave, restrained enough for a default loading state in a tool product.","三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。":"Three cards float subtly, suggesting stacked kanban pages and task management.","水平光束往复滑过进度条,线性进度隐喻,不阻断视线。":"A horizontal beam sweeps across a progress bar, implying linear progress without distraction.","三列骨架屏微闪,预示看板布局,减少布局跳变。":"Three shimmering skeleton columns preview the kanban layout and reduce layout shift.","圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。":"A ring progress arc and breathing center diamond combine progress feedback with a brand mark.","Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。":"A breathing Charcoal rounded block with the Tower icon embedded, giving the strongest brand presence.","正在加载...":"Loading..."}},gv=S.createContext(null),yv="agent-tower.locale";function vv(n){return n?n==="en"?"en":n==="zh-CN"?"zh-CN":null:null}function dT(){if(typeof window>"u")return null;try{return vv(window.localStorage.getItem(yv))}catch{return null}}function hT(n){if(!(typeof window>"u"))try{window.localStorage.setItem(yv,n)}catch{}}function mT(){return typeof navigator>"u"||navigator.language.toLowerCase().startsWith("zh")?"zh-CN":"en"}function bv(){return dT()??mT()}function pT(n,a){if(!a)return n;let r=n;for(const[l,c]of Object.entries(a))r=r.replaceAll(`{${l}}`,String(c??""));return r}let Mf=bv();function xv(n,a,r){const l=fT[n]?.[a]??a;return pT(l,r)}function Yi(n,a){return xv(Mf,n,a)}function gT({children:n}){const a=S.useRef(bv()),[r,l]=S.useState(a.current),{data:c}=uT(),f=cT(),d=S.useRef(!1),m=S.useCallback(x=>{Mf=x,l(x),document.documentElement.lang=x,hT(x)},[]);S.useEffect(()=>{const x=vv(c?.locale)??a.current;m(x),c&&c.locale===null&&!d.current&&(d.current=!0,f.mutate({locale:x}))},[c,m,f]);const g=S.useCallback(x=>{const y=Mf;m(x),f.mutate({locale:x},{onError:()=>{m(y),Ur.error(Yi("语言设置保存失败"))}})},[m,f]),p=S.useMemo(()=>({locale:r,setLocale:g,t:(x,y)=>xv(r,x,y)}),[r,g]);return v.jsx(gv.Provider,{value:p,children:n})}function xi(){const n=S.useContext(gv);if(!n)throw new Error("useI18n must be used within I18nProvider");return n}function Sv(n){var a,r,l="";if(typeof n=="string"||typeof n=="number")l+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(a=0;a<c;a++)n[a]&&(r=Sv(n[a]))&&(l&&(l+=" "),l+=r)}else for(r in n)n[r]&&(l&&(l+=" "),l+=r);return l}function wv(){for(var n,a,r=0,l="",c=arguments.length;r<c;r++)(n=arguments[r])&&(a=Sv(n))&&(l&&(l+=" "),l+=a);return l}const yT=(n,a)=>{const r=new Array(n.length+a.length);for(let l=0;l<n.length;l++)r[l]=n[l];for(let l=0;l<a.length;l++)r[n.length+l]=a[l];return r},vT=(n,a)=>({classGroupId:n,validator:a}),Ev=(n=new Map,a=null,r)=>({nextPart:n,validators:a,classGroupId:r}),Go="-",Jg=[],bT="arbitrary..",xT=n=>{const a=wT(n),{conflictingClassGroups:r,conflictingClassGroupModifiers:l}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return ST(d);const m=d.split(Go),g=m[0]===""&&m.length>1?1:0;return Tv(m,g,a)},getConflictingClassGroupIds:(d,m)=>{if(m){const g=l[d],p=r[d];return g?p?yT(p,g):g:p||Jg}return r[d]||Jg}}},Tv=(n,a,r)=>{if(n.length-a===0)return r.classGroupId;const c=n[a],f=r.nextPart.get(c);if(f){const p=Tv(n,a+1,f);if(p)return p}const d=r.validators;if(d===null)return;const m=a===0?n.join(Go):n.slice(a).join(Go),g=d.length;for(let p=0;p<g;p++){const x=d[p];if(x.validator(m))return x.classGroupId}},ST=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=n.slice(1,-1),r=a.indexOf(":"),l=a.slice(0,r);return l?bT+l:void 0})(),wT=n=>{const{theme:a,classGroups:r}=n;return ET(r,a)},ET=(n,a)=>{const r=Ev();for(const l in n){const c=n[l];sd(c,r,l,a)}return r},sd=(n,a,r,l)=>{const c=n.length;for(let f=0;f<c;f++){const d=n[f];TT(d,a,r,l)}},TT=(n,a,r,l)=>{if(typeof n=="string"){CT(n,a,r);return}if(typeof n=="function"){AT(n,a,r,l);return}RT(n,a,r,l)},CT=(n,a,r)=>{const l=n===""?a:Cv(a,n);l.classGroupId=r},AT=(n,a,r,l)=>{if(_T(n)){sd(n(l),a,r,l);return}a.validators===null&&(a.validators=[]),a.validators.push(vT(r,n))},RT=(n,a,r,l)=>{const c=Object.entries(n),f=c.length;for(let d=0;d<f;d++){const[m,g]=c[d];sd(g,Cv(a,m),r,l)}},Cv=(n,a)=>{let r=n;const l=a.split(Go),c=l.length;for(let f=0;f<c;f++){const d=l[f];let m=r.nextPart.get(d);m||(m=Ev(),r.nextPart.set(d,m)),r=m}return r},_T=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,kT=n=>{if(n<1)return{get:()=>{},set:()=>{}};let a=0,r=Object.create(null),l=Object.create(null);const c=(f,d)=>{r[f]=d,a++,a>n&&(a=0,l=r,r=Object.create(null))};return{get(f){let d=r[f];if(d!==void 0)return d;if((d=l[f])!==void 0)return c(f,d),d},set(f,d){f in r?r[f]=d:c(f,d)}}},Df="!",$g=":",NT=[],Wg=(n,a,r,l,c)=>({modifiers:n,hasImportantModifier:a,baseClassName:r,maybePostfixModifierPosition:l,isExternal:c}),OT=n=>{const{prefix:a,experimentalParseClassName:r}=n;let l=c=>{const f=[];let d=0,m=0,g=0,p;const x=c.length;for(let B=0;B<x;B++){const P=c[B];if(d===0&&m===0){if(P===$g){f.push(c.slice(g,B)),g=B+1;continue}if(P==="/"){p=B;continue}}P==="["?d++:P==="]"?d--:P==="("?m++:P===")"&&m--}const y=f.length===0?c:c.slice(g);let T=y,N=!1;y.endsWith(Df)?(T=y.slice(0,-1),N=!0):y.startsWith(Df)&&(T=y.slice(1),N=!0);const L=p&&p>g?p-g:void 0;return Wg(f,N,T,L)};if(a){const c=a+$g,f=l;l=d=>d.startsWith(c)?f(d.slice(c.length)):Wg(NT,!1,d,void 0,!0)}if(r){const c=l;l=f=>r({className:f,parseClassName:c})}return l},MT=n=>{const a=new Map;return n.orderSensitiveModifiers.forEach((r,l)=>{a.set(r,1e6+l)}),r=>{const l=[];let c=[];for(let f=0;f<r.length;f++){const d=r[f],m=d[0]==="[",g=a.has(d);m||g?(c.length>0&&(c.sort(),l.push(...c),c=[]),l.push(d)):c.push(d)}return c.length>0&&(c.sort(),l.push(...c)),l}},DT=n=>({cache:kT(n.cacheSize),parseClassName:OT(n),sortModifiers:MT(n),...xT(n)}),jT=/\s+/,zT=(n,a)=>{const{parseClassName:r,getClassGroupId:l,getConflictingClassGroupIds:c,sortModifiers:f}=a,d=[],m=n.trim().split(jT);let g="";for(let p=m.length-1;p>=0;p-=1){const x=m[p],{isExternal:y,modifiers:T,hasImportantModifier:N,baseClassName:L,maybePostfixModifierPosition:B}=r(x);if(y){g=x+(g.length>0?" "+g:g);continue}let P=!!B,K=l(P?L.substring(0,B):L);if(!K){if(!P){g=x+(g.length>0?" "+g:g);continue}if(K=l(L),!K){g=x+(g.length>0?" "+g:g);continue}P=!1}const Y=T.length===0?"":T.length===1?T[0]:f(T).join(":"),W=N?Y+Df:Y,he=W+K;if(d.indexOf(he)>-1)continue;d.push(he);const de=c(K,P);for(let fe=0;fe<de.length;++fe){const R=de[fe];d.push(W+R)}g=x+(g.length>0?" "+g:g)}return g},LT=(...n)=>{let a=0,r,l,c="";for(;a<n.length;)(r=n[a++])&&(l=Av(r))&&(c&&(c+=" "),c+=l);return c},Av=n=>{if(typeof n=="string")return n;let a,r="";for(let l=0;l<n.length;l++)n[l]&&(a=Av(n[l]))&&(r&&(r+=" "),r+=a);return r},UT=(n,...a)=>{let r,l,c,f;const d=g=>{const p=a.reduce((x,y)=>y(x),n());return r=DT(p),l=r.cache.get,c=r.cache.set,f=m,m(g)},m=g=>{const p=l(g);if(p)return p;const x=zT(g,r);return c(g,x),x};return f=d,(...g)=>f(LT(...g))},BT=[],Bt=n=>{const a=r=>r[n]||BT;return a.isThemeGetter=!0,a},Rv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_v=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qT=/^\d+\/\d+$/,HT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,QT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,PT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,GT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jr=n=>qT.test(n),Ue=n=>!!n&&!Number.isNaN(Number(n)),fi=n=>!!n&&Number.isInteger(Number(n)),hf=n=>n.endsWith("%")&&Ue(n.slice(0,-1)),qa=n=>HT.test(n),VT=()=>!0,YT=n=>QT.test(n)&&!PT.test(n),kv=()=>!1,FT=n=>GT.test(n),XT=n=>KT.test(n),ZT=n=>!ue(n)&&!ce(n),IT=n=>Vr(n,Mv,kv),ue=n=>Rv.test(n),Vi=n=>Vr(n,Dv,YT),mf=n=>Vr(n,t2,Ue),ey=n=>Vr(n,Nv,kv),JT=n=>Vr(n,Ov,XT),Eo=n=>Vr(n,jv,FT),ce=n=>_v.test(n),Ps=n=>Yr(n,Dv),$T=n=>Yr(n,n2),ty=n=>Yr(n,Nv),WT=n=>Yr(n,Mv),e2=n=>Yr(n,Ov),To=n=>Yr(n,jv,!0),Vr=(n,a,r)=>{const l=Rv.exec(n);return l?l[1]?a(l[1]):r(l[2]):!1},Yr=(n,a,r=!1)=>{const l=_v.exec(n);return l?l[1]?a(l[1]):r:!1},Nv=n=>n==="position"||n==="percentage",Ov=n=>n==="image"||n==="url",Mv=n=>n==="length"||n==="size"||n==="bg-size",Dv=n=>n==="length",t2=n=>n==="number",n2=n=>n==="family-name",jv=n=>n==="shadow",a2=()=>{const n=Bt("color"),a=Bt("font"),r=Bt("text"),l=Bt("font-weight"),c=Bt("tracking"),f=Bt("leading"),d=Bt("breakpoint"),m=Bt("container"),g=Bt("spacing"),p=Bt("radius"),x=Bt("shadow"),y=Bt("inset-shadow"),T=Bt("text-shadow"),N=Bt("drop-shadow"),L=Bt("blur"),B=Bt("perspective"),P=Bt("aspect"),K=Bt("ease"),Y=Bt("animate"),W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],he=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],de=()=>[...he(),ce,ue],fe=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],V=()=>[ce,ue,g],ie=()=>[jr,"full","auto",...V()],ke=()=>[fi,"none","subgrid",ce,ue],Re=()=>["auto",{span:["full",fi,ce,ue]},fi,ce,ue],Se=()=>[fi,"auto",ce,ue],Me=()=>["auto","min","max","fr",ce,ue],ze=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ee=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...V()],X=()=>[jr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...V()],Q=()=>[n,ce,ue],me=()=>[...he(),ty,ey,{position:[ce,ue]}],ye=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",WT,IT,{size:[ce,ue]}],q=()=>[hf,Ps,Vi],H=()=>["","none","full",p,ce,ue],I=()=>["",Ue,Ps,Vi],ee=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Ue,hf,ty,ey],Te=()=>["","none",L,ce,ue],Be=()=>["none",Ue,ce,ue],Pt=()=>["none",Ue,ce,ue],en=()=>[Ue,ce,ue],Je=()=>[jr,"full",...V()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qa],breakpoint:[qa],color:[VT],container:[qa],"drop-shadow":[qa],ease:["in","out","in-out"],font:[ZT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qa],shadow:[qa],spacing:["px",Ue],text:[qa],"text-shadow":[qa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",jr,ue,ce,P]}],container:["container"],columns:[{columns:[Ue,ue,ce,m]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:de()}],overflow:[{overflow:fe()}],"overflow-x":[{"overflow-x":fe()}],"overflow-y":[{"overflow-y":fe()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{start:ie()}],end:[{end:ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[fi,"auto",ce,ue]}],basis:[{basis:[jr,"full","auto",m,...V()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ue,jr,"auto","initial","none",ue]}],grow:[{grow:["",Ue,ce,ue]}],shrink:[{shrink:["",Ue,ce,ue]}],order:[{order:[fi,"first","last","none",ce,ue]}],"grid-cols":[{"grid-cols":ke()}],"col-start-end":[{col:Re()}],"col-start":[{"col-start":Se()}],"col-end":[{"col-end":Se()}],"grid-rows":[{"grid-rows":ke()}],"row-start-end":[{row:Re()}],"row-start":[{"row-start":Se()}],"row-end":[{"row-end":Se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Me()}],"auto-rows":[{"auto-rows":Me()}],gap:[{gap:V()}],"gap-x":[{"gap-x":V()}],"gap-y":[{"gap-y":V()}],"justify-content":[{justify:[...ze(),"normal"]}],"justify-items":[{"justify-items":[...Ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ee()]}],"align-content":[{content:["normal",...ze()]}],"align-items":[{items:[...Ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":ze()}],"place-items":[{"place-items":[...Ee(),"baseline"]}],"place-self":[{"place-self":["auto",...Ee()]}],p:[{p:V()}],px:[{px:V()}],py:[{py:V()}],ps:[{ps:V()}],pe:[{pe:V()}],pt:[{pt:V()}],pr:[{pr:V()}],pb:[{pb:V()}],pl:[{pl:V()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":V()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":V()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[m,"screen",...X()]}],"min-w":[{"min-w":[m,"screen","none",...X()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,Ps,Vi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,ce,mf]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hf,ue]}],"font-family":[{font:[$T,ue,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,ce,ue]}],"line-clamp":[{"line-clamp":[Ue,"none",ce,mf]}],leading:[{leading:[f,...V()]}],"list-image":[{"list-image":["none",ce,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Q()}],"text-color":[{text:Q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ue,"from-font","auto",ce,Vi]}],"text-decoration-color":[{decoration:Q()}],"underline-offset":[{"underline-offset":[Ue,"auto",ce,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:me()}],"bg-repeat":[{bg:ye()}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},fi,ce,ue],radial:["",ce,ue],conic:[fi,ce,ue]},e2,JT]}],"bg-color":[{bg:Q()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Q()}],"gradient-via":[{via:Q()}],"gradient-to":[{to:Q()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":I()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:Q()}],"border-color-x":[{"border-x":Q()}],"border-color-y":[{"border-y":Q()}],"border-color-s":[{"border-s":Q()}],"border-color-e":[{"border-e":Q()}],"border-color-t":[{"border-t":Q()}],"border-color-r":[{"border-r":Q()}],"border-color-b":[{"border-b":Q()}],"border-color-l":[{"border-l":Q()}],"divide-color":[{divide:Q()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ue,ce,ue]}],"outline-w":[{outline:["",Ue,Ps,Vi]}],"outline-color":[{outline:Q()}],shadow:[{shadow:["","none",x,To,Eo]}],"shadow-color":[{shadow:Q()}],"inset-shadow":[{"inset-shadow":["none",y,To,Eo]}],"inset-shadow-color":[{"inset-shadow":Q()}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Q()}],"ring-offset-w":[{"ring-offset":[Ue,Vi]}],"ring-offset-color":[{"ring-offset":Q()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":Q()}],"text-shadow":[{"text-shadow":["none",T,To,Eo]}],"text-shadow-color":[{"text-shadow":Q()}],opacity:[{opacity:[Ue,ce,ue]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ue]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":Q()}],"mask-image-linear-to-color":[{"mask-linear-to":Q()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":Q()}],"mask-image-t-to-color":[{"mask-t-to":Q()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":Q()}],"mask-image-r-to-color":[{"mask-r-to":Q()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":Q()}],"mask-image-b-to-color":[{"mask-b-to":Q()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":Q()}],"mask-image-l-to-color":[{"mask-l-to":Q()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":Q()}],"mask-image-x-to-color":[{"mask-x-to":Q()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":Q()}],"mask-image-y-to-color":[{"mask-y-to":Q()}],"mask-image-radial":[{"mask-radial":[ce,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":Q()}],"mask-image-radial-to-color":[{"mask-radial-to":Q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":he()}],"mask-image-conic-pos":[{"mask-conic":[Ue]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":Q()}],"mask-image-conic-to-color":[{"mask-conic-to":Q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:me()}],"mask-repeat":[{mask:ye()}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,ue]}],filter:[{filter:["","none",ce,ue]}],blur:[{blur:Te()}],brightness:[{brightness:[Ue,ce,ue]}],contrast:[{contrast:[Ue,ce,ue]}],"drop-shadow":[{"drop-shadow":["","none",N,To,Eo]}],"drop-shadow-color":[{"drop-shadow":Q()}],grayscale:[{grayscale:["",Ue,ce,ue]}],"hue-rotate":[{"hue-rotate":[Ue,ce,ue]}],invert:[{invert:["",Ue,ce,ue]}],saturate:[{saturate:[Ue,ce,ue]}],sepia:[{sepia:["",Ue,ce,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,ue]}],"backdrop-blur":[{"backdrop-blur":Te()}],"backdrop-brightness":[{"backdrop-brightness":[Ue,ce,ue]}],"backdrop-contrast":[{"backdrop-contrast":[Ue,ce,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ue,ce,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ue,ce,ue]}],"backdrop-invert":[{"backdrop-invert":["",Ue,ce,ue]}],"backdrop-opacity":[{"backdrop-opacity":[Ue,ce,ue]}],"backdrop-saturate":[{"backdrop-saturate":[Ue,ce,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",Ue,ce,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":V()}],"border-spacing-x":[{"border-spacing-x":V()}],"border-spacing-y":[{"border-spacing-y":V()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ue,"initial",ce,ue]}],ease:[{ease:["linear","initial",K,ce,ue]}],delay:[{delay:[Ue,ce,ue]}],animate:[{animate:["none",Y,ce,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[B,ce,ue]}],"perspective-origin":[{"perspective-origin":de()}],rotate:[{rotate:Be()}],"rotate-x":[{"rotate-x":Be()}],"rotate-y":[{"rotate-y":Be()}],"rotate-z":[{"rotate-z":Be()}],scale:[{scale:Pt()}],"scale-x":[{"scale-x":Pt()}],"scale-y":[{"scale-y":Pt()}],"scale-z":[{"scale-z":Pt()}],"scale-3d":["scale-3d"],skew:[{skew:en()}],"skew-x":[{"skew-x":en()}],"skew-y":[{"skew-y":en()}],transform:[{transform:[ce,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:de()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Je()}],"translate-x":[{"translate-x":Je()}],"translate-y":[{"translate-y":Je()}],"translate-z":[{"translate-z":Je()}],"translate-none":["translate-none"],accent:[{accent:Q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce,ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce,ue]}],fill:[{fill:["none",...Q()]}],"stroke-w":[{stroke:[Ue,Ps,Vi,mf]}],stroke:[{stroke:["none",...Q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},i2=UT(a2);function Dt(...n){return i2(wv(n))}function pf(n){let a=0;for(const r of n){const l=r.codePointAt(0);l>=19968&&l<=40959||l>=13312&&l<=19903||l>=65280&&l<=65376||l>=12288&&l<=12351?a+=2:a+=1}return a}function YA(n,a){if(pf(n)<=a)return n;const r=a-1,l=Math.ceil(r/2),c=Math.floor(r/2);let f="",d=0;for(const x of n){const y=pf(x);if(d+y>l)break;f+=x,d+=y}const m=[...n];let g="",p=0;for(let x=m.length-1;x>=0;x--){const y=pf(m[x]);if(p+y>c)break;g=m[x]+g,p+=y}return f+"…"+g}let Qr=0;function zv(){Qr++,Qr===1&&(document.body.style.overflow="hidden")}function jf(){Qr=Math.max(0,Qr-1),Qr===0&&(document.body.style.overflow="")}function r2(){return Qr}const ny=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,ay=wv,s2=(n,a)=>r=>{var l;if(a?.variants==null)return ay(n,r?.class,r?.className);const{variants:c,defaultVariants:f}=a,d=Object.keys(c).map(p=>{const x=r?.[p],y=f?.[p];if(x===null)return null;const T=ny(x)||ny(y);return c[p][T]}),m=r&&Object.entries(r).reduce((p,x)=>{let[y,T]=x;return T===void 0||(p[y]=T),p},{}),g=a==null||(l=a.compoundVariants)===null||l===void 0?void 0:l.reduce((p,x)=>{let{class:y,className:T,...N}=x;return Object.entries(N).every(L=>{let[B,P]=L;return Array.isArray(P)?P.includes({...f,...m}[B]):{...f,...m}[B]===P})?[...p,y,T]:p},[]);return ay(n,d,g,r?.class,r?.className)};function iy(n,a){if(typeof n=="function")return n(a);n!=null&&(n.current=a)}function l2(...n){return a=>{let r=!1;const l=n.map(c=>{const f=iy(c,a);return!r&&typeof f=="function"&&(r=!0),f});if(r)return()=>{for(let c=0;c<l.length;c++){const f=l[c];typeof f=="function"?f():iy(n[c],null)}}}}function o2(n){const a=c2(n),r=S.forwardRef((l,c)=>{const{children:f,...d}=l,m=S.Children.toArray(f),g=m.find(d2);if(g){const p=g.props.children,x=m.map(y=>y===g?S.Children.count(p)>1?S.Children.only(null):S.isValidElement(p)?p.props.children:null:y);return v.jsx(a,{...d,ref:c,children:S.isValidElement(p)?S.cloneElement(p,void 0,x):null})}return v.jsx(a,{...d,ref:c,children:f})});return r.displayName=`${n}.Slot`,r}var u2=o2("Slot");function c2(n){const a=S.forwardRef((r,l)=>{const{children:c,...f}=r;if(S.isValidElement(c)){const d=m2(c),m=h2(f,c.props);return c.type!==S.Fragment&&(m.ref=l?l2(l,d):d),S.cloneElement(c,m)}return S.Children.count(c)>1?S.Children.only(null):null});return a.displayName=`${n}.SlotClone`,a}var f2=Symbol("radix.slottable");function d2(n){return S.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===f2}function h2(n,a){const r={...a};for(const l in a){const c=n[l],f=a[l];/^on[A-Z]/.test(l)?c&&f?r[l]=(...m)=>{const g=f(...m);return c(...m),g}:c&&(r[l]=c):l==="style"?r[l]={...c,...f}:l==="className"&&(r[l]=[c,f].filter(Boolean).join(" "))}return{...n,...r}}function m2(n){let a=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,r=a&&"isReactWarning"in a&&a.isReactWarning;return r?n.ref:(a=Object.getOwnPropertyDescriptor(n,"ref")?.get,r=a&&"isReactWarning"in a&&a.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}const p2=s2("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function ha({className:n,variant:a="default",size:r="default",asChild:l=!1,...c}){const f=l?u2:"button";return v.jsx(f,{"data-slot":"button","data-variant":a,"data-size":r,className:Dt(p2({variant:a,size:r,className:n})),...c})}function _t({className:n,...a}){return v.jsx("div",{"data-slot":"skeleton","aria-hidden":"true",className:Dt("animate-pulse rounded-md bg-muted motion-reduce:animate-none",n),...a})}function g2({children:n,className:a}){return v.jsx("div",{className:Dt("mx-auto w-full max-w-4xl px-5 py-5 sm:px-8 sm:py-6",a),children:n})}function FA({title:n,description:a,actions:r,className:l}){return v.jsxs("div",{className:Dt("mb-5 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",l),children:[v.jsxs("div",{className:"min-w-0",children:[v.jsx("h2",{className:"text-xl font-semibold tracking-tight text-foreground",children:n}),a&&v.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-muted-foreground",children:a})]}),r&&v.jsx("div",{className:"flex flex-wrap items-center gap-2 shrink-0",children:r})]})}function XA({children:n,className:a}){return v.jsx("h3",{className:Dt("text-[12px] font-semibold uppercase tracking-wide text-muted-foreground",a),children:n})}function ZA({label:n,description:a,icon:r,children:l,align:c="start",controlWidth:f="fixed",className:d}){return v.jsxs("div",{className:Dt("flex flex-col gap-3 py-5 sm:flex-row sm:justify-between sm:gap-8",c==="center"?"sm:items-center":"sm:items-start",d),children:[v.jsxs("div",{className:"flex min-w-0 items-start gap-3 sm:max-w-[360px]",children:[r&&v.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground","aria-hidden":"true",children:v.jsx(r,{size:15})}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("div",{className:"text-[13px] font-medium text-foreground",children:n}),a&&v.jsx("p",{className:"mt-0.5 text-xs leading-relaxed text-muted-foreground",children:a})]})]}),v.jsx("div",{className:Dt("shrink-0",f==="fixed"?"w-full sm:w-[260px]":"w-auto"),children:l})]})}function IA({label:n,description:a,children:r,className:l,htmlFor:c}){return v.jsxs("div",{className:Dt("space-y-1.5",l),children:[v.jsxs("div",{children:[v.jsx("label",{htmlFor:c,className:"block text-[13px] font-medium text-foreground",children:n}),a&&v.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:a})]}),r]})}function JA({icon:n,message:a,action:r,className:l}){return v.jsxs("div",{className:Dt("rounded-xl border border-dashed border-border bg-muted/30 py-14 text-center",l),children:[n&&v.jsx(n,{size:48,strokeWidth:1.25,className:"mx-auto mb-3 text-muted-foreground/40","aria-hidden":"true"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:a}),r&&v.jsx("div",{className:"mt-4 flex justify-center",children:r})]})}function $A({saving:n,onSave:a,onCancel:r,className:l}){const{t:c}=xi();return v.jsx("div",{className:Dt("sticky bottom-0 z-10 -mx-5 border-t border-border/60 bg-background/90 px-5 py-3 backdrop-blur sm:-mx-8 sm:px-8",l),children:v.jsxs("div",{className:"flex items-center justify-between gap-3",children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:c("有未保存的更改")}),v.jsxs("div",{className:"flex items-center gap-2",children:[r&&v.jsx(ha,{size:"sm",variant:"ghost",onClick:r,disabled:n,children:c("取消")}),v.jsx(ha,{size:"sm",onClick:a,disabled:n,children:c(n?"保存中...":"保存")})]})]})})}function y2({rows:n=3}){return v.jsxs("div",{role:"status","aria-label":"Loading",children:[v.jsx(_t,{className:"h-7 w-36"}),v.jsx("div",{className:"mt-6 divide-y divide-border/60",children:Array.from({length:n}).map((a,r)=>v.jsxs("div",{className:"flex items-start justify-between gap-8 py-5",children:[v.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[v.jsx(_t,{className:"h-4 w-32"}),v.jsx(_t,{className:"h-3 w-64 max-w-full"})]}),v.jsx(_t,{className:"h-9 w-[260px] shrink-0 rounded-lg"})]},r))})]})}function WA(){return v.jsxs("div",{role:"status","aria-label":"Loading",children:[v.jsx(_t,{className:"h-7 w-36"}),v.jsxs("div",{className:"mt-6 grid gap-5 lg:grid-cols-[240px_minmax(0,1fr)]",children:[v.jsx("div",{className:"space-y-1",children:Array.from({length:5}).map((n,a)=>v.jsxs("div",{className:"flex items-center gap-3 rounded-lg px-3 py-2.5",children:[v.jsx(_t,{className:"h-2 w-2 rounded-full"}),v.jsxs("div",{className:"flex-1 space-y-1.5",children:[v.jsx(_t,{className:"h-3.5 w-3/4"}),v.jsx(_t,{className:"h-2.5 w-1/2"})]})]},a))}),v.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[v.jsxs("div",{className:"flex items-start justify-between gap-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx(_t,{className:"h-5 w-44"}),v.jsx(_t,{className:"h-3 w-28"})]}),v.jsx(_t,{className:"h-8 w-24 rounded-md"})]}),v.jsxs("div",{className:"mt-8 space-y-3",children:[v.jsx(_t,{className:"h-3 w-20"}),v.jsx(_t,{className:"h-24 w-full rounded-lg"}),v.jsx(_t,{className:"h-3 w-20"}),v.jsx(_t,{className:"h-16 w-full rounded-lg"})]})]})]})]})}function eR({cards:n=6}){return v.jsxs("div",{role:"status","aria-label":"Loading",children:[v.jsxs("div",{className:"flex items-center justify-between gap-4",children:[v.jsx(_t,{className:"h-7 w-36"}),v.jsx(_t,{className:"h-8 w-44 rounded-lg"})]}),v.jsx("div",{className:"mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:n}).map((a,r)=>v.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-border bg-card p-4",children:[v.jsx(_t,{className:"h-10 w-10 shrink-0 rounded-full"}),v.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[v.jsx(_t,{className:"h-4 w-2/3"}),v.jsx(_t,{className:"h-3 w-1/2"}),v.jsx(_t,{className:"h-3 w-3/4"})]})]},r))})]})}const v2=S.lazy(()=>_n(()=>import("./GeneralSettingsPage-B9D9wA_9.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(n=>({default:n.GeneralSettingsPage}))),b2=S.lazy(()=>_n(()=>import("./ProviderSettingsPage-n2AFrtkZ.js"),__vite__mapDeps([7,6,8,9,1,2,3,4,5,10,11,12,13,14,15,16,17,18])).then(n=>({default:n.ProviderSettingsPage}))),x2=S.lazy(()=>_n(()=>import("./AgentEnvironmentSettingsPage-D-BWLcC0.js"),[]).then(n=>({default:n.AgentEnvironmentSettingsPage}))),S2=S.lazy(()=>_n(()=>import("./TeamSettingsPage-4sHo9Wpb.js"),__vite__mapDeps([19,8,9,1,2,3,10,11,12,13,20,6,15,16,21])).then(n=>({default:n.TeamSettingsPage}))),w2=S.lazy(()=>_n(()=>import("./ProjectSettingsPage-B2K8Kw_S.js"),__vite__mapDeps([22,23,24,11,25,3,16,9,14,15])).then(n=>({default:n.ProjectSettingsPage}))),E2=S.lazy(()=>_n(()=>import("./NotificationSettingsPage-BaJpYHLD.js"),__vite__mapDeps([26,1,2,3,5,27,25])).then(n=>({default:n.NotificationSettingsPage}))),T2=S.lazy(()=>_n(()=>import("./McpSettingsPage-B5GtqNme.js"),__vite__mapDeps([28,29,3])).then(n=>({default:n.McpSettingsPage}))),C2=S.lazy(()=>_n(()=>import("./ProfileSettingsPage-DYXew66J.js"),__vite__mapDeps([30,31,9,8,4,32,2,16,18])).then(n=>({default:n.ProfileSettingsPage}))),ry=[{id:"general",label:"通用",icon:LE},{id:"agent-environment",label:"Agent 环境",icon:uv},{id:"agents",label:"Agent 配置",icon:RE},{id:"team",label:"团队协作",icon:eT},{id:"projects",label:"项目配置",icon:ME},{id:"notifications",label:"通知",icon:vE},{id:"mcp",label:"MCP 配置",icon:SE}];function A2({tab:n}){switch(n){case"general":return v.jsx(v2,{});case"agent-environment":return v.jsx(x2,{});case"agents":return v.jsx(b2,{});case"team":return v.jsx(S2,{});case"projects":return v.jsx(w2,{});case"notifications":return v.jsx(E2,{});case"mcp":return v.jsx(T2,{});case"agents-legacy":return v.jsx(C2,{})}}function R2(){return v.jsx(g2,{children:v.jsx(y2,{rows:3})})}function _2(){const{t:n}=xi(),a=Ys(p=>p.settingsOpen),r=Ys(p=>p.settingsTab),l=Ys(p=>p.closeSettings),c=Ys(p=>p.setSettingsTab),[f,d]=S.useState(!1),m=S.useRef(!1),g=S.useRef(null);return S.useEffect(()=>{if(a){const p=requestAnimationFrame(()=>d(!0));m.current||(zv(),m.current=!0);const x=requestAnimationFrame(()=>g.current?.focus());return()=>{cancelAnimationFrame(p),cancelAnimationFrame(x)}}else{const p=setTimeout(()=>d(!1),200);return m.current&&(jf(),m.current=!1),()=>clearTimeout(p)}},[a]),S.useEffect(()=>()=>{m.current&&(jf(),m.current=!1)},[]),S.useEffect(()=>{if(!a)return;const p=x=>{x.key==="Escape"&&r2()===1&&l()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[a,l]),!f&&!a?null:v.jsxs("div",{className:Dt("fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-6 transition-opacity duration-200 motion-reduce:transition-none",a?"opacity-100":"opacity-0 pointer-events-none"),children:[v.jsx("div",{className:"absolute inset-0 bg-black/20 backdrop-blur-sm",onClick:l,"aria-hidden":"true"}),v.jsxs("div",{ref:g,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":n("设置"),className:Dt("relative flex w-full max-w-[1100px] flex-col overflow-hidden rounded-2xl bg-background shadow-[0_12px_16px_-4px_rgba(36,36,36,0.08)] ring-1 ring-foreground/5 transform transition-all duration-200 outline-none motion-reduce:transition-none","h-[min(calc(100vh-1.5rem),840px)] sm:h-[min(calc(100vh-3rem),840px)]",a?"scale-100 translate-y-0":"scale-[0.97] translate-y-1"),children:[v.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border/60 bg-muted/40 px-5 py-3 sm:px-6",children:[v.jsxs("div",{className:"flex items-center gap-2.5",children:[v.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary text-primary-foreground","aria-hidden":"true",children:v.jsx(VE,{size:14})}),v.jsx("h2",{className:"text-[15px] font-semibold text-foreground",children:n("设置")})]}),v.jsx("button",{onClick:l,"aria-label":n("取消"),className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:v.jsx(dv,{size:15})})]}),v.jsx("div",{className:"sm:hidden flex shrink-0 border-b border-border/60 bg-background overflow-x-auto scrollbar-none",role:"tablist",children:ry.map(p=>v.jsxs("button",{role:"tab","aria-selected":r===p.id,onClick:()=>c(p.id),className:Dt("flex items-center gap-1.5 px-4 py-2.5 text-xs whitespace-nowrap transition-colors border-b-2 -mb-px focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-inset",r===p.id?"border-primary text-foreground font-medium":"border-transparent text-muted-foreground hover:text-foreground"),children:[v.jsx(p.icon,{size:13,"aria-hidden":"true"}),v.jsx("span",{children:n(p.label)})]},p.id))}),v.jsxs("div",{className:"flex flex-1 min-h-0",children:[v.jsx("nav",{"aria-label":n("设置"),className:"hidden sm:flex w-[180px] shrink-0 flex-col gap-0.5 border-r border-border/60 bg-muted/30 p-3 overflow-y-auto scrollbar-app-thin",children:ry.map(p=>v.jsxs("button",{"aria-current":r===p.id?"page":void 0,onClick:()=>c(p.id),className:Dt("flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",r===p.id?"bg-background text-foreground font-medium shadow-[0_1px_2px_rgba(0,0,0,0.05)] ring-1 ring-foreground/[0.04]":"text-muted-foreground hover:text-foreground hover:bg-background/60"),children:[v.jsx(p.icon,{size:15,className:"shrink-0","aria-hidden":"true"}),v.jsx("span",{children:n(p.label)})]},p.id))}),v.jsx("div",{className:"flex-1 min-w-0 overflow-y-auto scrollbar-app-thin bg-background",children:v.jsx(S.Suspense,{fallback:v.jsx(R2,{}),children:v.jsx(A2,{tab:r})})})]})]})]})}const Lv="agent-tower:desktop-titlebar",zf="agent-tower:desktop-platform",Ji={desktop:"1",desktopTitlebar:"integrated"},Uv=S.createContext(null),k2={usesIntegratedTitlebar:!1,desktopPlatform:"unknown",hasMacTrafficLights:!1,preserveDesktopSearch:n=>n};function N2(n){const a=new URLSearchParams(n);return a.get("desktop")===Ji.desktop&&a.get("desktopTitlebar")===Ji.desktopTitlebar}function Bv(n){return n==="darwin"||n==="win32"||n==="linux"?n:"unknown"}function O2(){if(typeof window>"u")return"unknown";try{return Bv(window.sessionStorage.getItem(zf))}catch{return"unknown"}}function M2(n){if(!(typeof window>"u"))try{n==="unknown"?window.sessionStorage.removeItem(zf):window.sessionStorage.setItem(zf,n)}catch{}}function D2(){if(typeof window>"u")return"none";try{return window.sessionStorage.getItem(Lv)===Ji.desktopTitlebar?"integrated":"none"}catch{return"none"}}function j2(n){if(!(typeof window>"u"))try{n==="integrated"&&window.sessionStorage.setItem(Lv,Ji.desktopTitlebar)}catch{}}function z2(n){return N2(n)?(j2("integrated"),"integrated"):D2()}function L2(n){const a=new URLSearchParams(n),r=Bv(a.get("desktopPlatform"));return a.get("desktop")===Ji.desktop&&r!=="unknown"?(M2(r),r):O2()}function sy(n,a){const r=new URLSearchParams(n);r.set("desktop",Ji.desktop),r.set("desktopTitlebar",Ji.desktopTitlebar),a!=="unknown"&&r.set("desktopPlatform",a);const l=r.toString();return l?`?${l}`:""}function U2(n,a){if(typeof n=="string"){const r=n.indexOf("#"),l=r>=0?n.slice(0,r):n,c=r>=0?n.slice(r):"",f=l.indexOf("?"),d=f>=0?l.slice(0,f):l,m=f>=0?l.slice(f):"";return`${d}${sy(m,a)}${c}`}return{...n,search:sy(n.search??"",a)}}function B2({children:n}){const a=bi(),r=S.useMemo(()=>z2(a.search),[a.search]),l=S.useMemo(()=>L2(a.search),[a.search]),c=r==="integrated",f=c&&l==="darwin",d=S.useMemo(()=>({usesIntegratedTitlebar:c,desktopPlatform:l,hasMacTrafficLights:f,preserveDesktopSearch:m=>c?U2(m,l):m}),[l,f,c]);return v.jsx(Uv.Provider,{value:d,children:n})}function qv(){return S.useContext(Uv)??k2}function q2(){const n=ev(),{preserveDesktopSearch:a}=qv();return S.useMemo(()=>((l,c)=>typeof l=="number"?n(l):n(a(l),c)),[n,a])}function H2(){return rn({queryKey:be.agentCli.manifest,queryFn:()=>Le.get("/agent-cli/manifest")})}function Hv(){return rn({queryKey:be.agentCli.status,queryFn:()=>Le.get("/agent-cli/status")})}function Qv(){const n=tt();return ht({mutationFn:()=>Le.post("/agent-cli/status/refresh"),onSuccess:a=>{n.setQueryData(be.agentCli.status,a)}})}function Q2(){const n=tt();return ht({mutationFn:a=>Le.post("/agent-cli/install-previews",{toolId:a}),onSuccess:a=>{n.setQueryData(be.agentCli.preview(a.id),a)}})}function P2(n,a=!0){return rn({queryKey:n?be.agentCli.task(n):["agent-cli","task",null],queryFn:()=>Le.get(`/agent-cli/install-tasks/${n}`),enabled:!!n&&a,refetchInterval:r=>{const l=r.state.data?.status;return l==="running"||l==="verifying"||l==="cancelling"?1e3:!1}})}function G2(n,a=!0){return rn({queryKey:n?be.agentCli.logs(n):["agent-cli","logs",null],queryFn:()=>Le.get(`/agent-cli/install-tasks/${n}/logs`),enabled:!!n&&a,refetchInterval:a&&n?1e3:!1})}function K2(){const n=tt();return ht({mutationFn:a=>Le.post("/agent-cli/install-tasks",{previewId:a}),onSuccess:({task:a})=>{n.setQueryData(be.agentCli.task(a.id),a),n.invalidateQueries({queryKey:be.agentCli.status})}})}function V2(){const n=tt();return ht({mutationFn:a=>Le.post(`/agent-cli/install-tasks/${a}/cancel`),onSuccess:a=>{n.setQueryData(be.agentCli.task(a.id),a)}})}const Pv=["codex","claude-code","cursor-agent"];function Gv(n){return Pv.includes(n)}function Y2(n){return Pv.some(a=>n?.some(r=>r.toolId===a&&r.installStatus==="installed"))}const Oo=new Set(["succeeded","failed","cancelled"]),F2="AGENT_CLI_INSTALL_LOCAL_ONLY",X2=[];function Z2(n){if(!(n instanceof rl))return;const a=n.details.code;return typeof a=="string"?a:void 0}function zr(n,a){return n instanceof rl&&(n.status===403||Z2(n)===F2)?"需要在本机 Agent Tower 打开后安装。":n instanceof Error?n.message:a}function I2(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/1024/1024).toFixed(2)} MB`}function J2(n){return n==="darwin"?"macOS":n==="linux"?"Linux":n==="win32"?"Windows":n??"Unknown"}function $2(n){return n.map(a=>a.data.endsWith(`
13
+ Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}/*`}">.`)}let T=bi(),N;N=T;let L=N.pathname||"/",B=L;if(x!=="/"){let Y=x.replace(/^\//,"").split("/");B="/"+L.replace(/^\//,"").split("/").slice(Y.length).join("/")}let P=di(n,{pathname:B});return zt(y||P!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),zt(P==null||P[P.length-1].route.element!==void 0||P[P.length-1].route.Component!==void 0||P[P.length-1].route.lazy!==void 0,`Matched leaf route at location "${N.pathname}${N.search}${N.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),dw(P&&P.map(Y=>Object.assign({},Y,{params:Object.assign({},g,Y.params),pathname:da([x,f.encodeLocation?f.encodeLocation(Y.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathname]),pathnameBase:Y.pathnameBase==="/"?x:da([x,f.encodeLocation?f.encodeLocation(Y.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathnameBase])})),d,r,l,c)}function ow(){let n=yw(),a=$s(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),r=n instanceof Error?n.stack:null,l="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:l},f={padding:"2px 4px",backgroundColor:l},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:f},"ErrorBoundary")," or"," ",S.createElement("code",{style:f},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),r?S.createElement("pre",{style:c},r):null,d)}var uw=S.createElement(ow,null),tv=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){this.props.onError?this.props.onError(n,a):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const r=tw(n.digest);r&&(n=r)}let a=n!==void 0?S.createElement(aa.Provider,{value:this.props.routeContext},S.createElement(td.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(cw,{error:n},a):a}};tv.contextType=Iy;var ff=new WeakMap;function cw({children:n,error:a}){let{basename:r}=S.useContext(Yn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let l=ew(a.digest);if(l){let c=ff.get(a);if(c)throw c;let f=Uy(l.location,r);if(Ly&&!ff.get(a))if(f.isExternal||l.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:l.replace}));throw ff.set(a,d),d}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function fw({routeContext:n,match:a,children:r}){let l=S.useContext($i);return l&&l.static&&l.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(aa.Provider,{value:n},r)}function dw(n,a=[],r=null,l=null,c=null){if(n==null){if(!r)return null;if(r.errors)n=r.matches;else if(a.length===0&&!r.initialized&&r.matches.length>0)n=r.matches;else return null}let f=n,d=r?.errors;if(d!=null){let x=f.findIndex(y=>y.route.id&&d?.[y.route.id]!==void 0);qe(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),f=f.slice(0,Math.min(f.length,x+1))}let m=!1,g=-1;if(r)for(let x=0;x<f.length;x++){let y=f[x];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(g=x),y.route.id){let{loaderData:T,errors:N}=r,L=y.route.loader&&!T.hasOwnProperty(y.route.id)&&(!N||N[y.route.id]===void 0);if(y.route.lazy||L){m=!0,g>=0?f=f.slice(0,g+1):f=[f[0]];break}}}let p=r&&l?(x,y)=>{l(x,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:tl(r.matches),errorInfo:y})}:void 0;return f.reduceRight((x,y,T)=>{let N,L=!1,B=null,P=null;r&&(N=d&&y.route.id?d[y.route.id]:void 0,B=y.route.errorElement||uw,m&&(g<0&&T===0?(nv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,P=null):g===T&&(L=!0,P=y.route.hydrateFallbackElement||null)));let K=a.concat(f.slice(0,T+1)),Y=()=>{let W;return N?W=B:L?W=P:y.route.Component?W=S.createElement(y.route.Component,null):y.route.element?W=y.route.element:W=x,S.createElement(fw,{match:y,routeContext:{outlet:x,matches:K,isDataRoute:r!=null},children:W})};return r&&(y.route.ErrorBoundary||y.route.errorElement||T===0)?S.createElement(tv,{location:r.location,revalidation:r.revalidation,component:B,error:N,children:Y(),routeContext:{outlet:null,matches:K,isDataRoute:!0},onError:p}):Y()},null)}function nd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function hw(n){let a=S.useContext($i);return qe(a,nd(n)),a}function mw(n){let a=S.useContext(nl);return qe(a,nd(n)),a}function pw(n){let a=S.useContext(aa);return qe(a,nd(n)),a}function ad(n){let a=pw(n),r=a.matches[a.matches.length-1];return qe(r.route.id,`${n} can only be used on routes that contain a unique "id"`),r.route.id}function gw(){return ad("useRouteId")}function yw(){let n=S.useContext(td),a=mw("useRouteError"),r=ad("useRouteError");return n!==void 0?n:a.errors?.[r]}function vw(){let{router:n}=hw("useNavigate"),a=ad("useNavigate"),r=S.useRef(!1);return Wy(()=>{r.current=!0}),S.useCallback(async(c,f={})=>{zt(r.current,$y),r.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:a,...f}))},[n,a])}var Qg={};function nv(n,a,r){!a&&!Qg[n]&&(Qg[n]=!0,zt(!1,r))}var Pg={};function Gg(n,a){!n&&!Pg[a]&&(Pg[a]=!0,console.warn(a))}var bw="useOptimistic",Kg=x1[bw],xw=()=>{};function Sw(n){return Kg?Kg(n):[n,xw]}function ww(n){let a={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&zt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:S.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&zt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:S.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&zt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:S.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),a}var Ew=["HydrateFallback","hydrateFallbackElement"],Tw=class{constructor(){this.status="pending",this.promise=new Promise((n,a)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",n(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",a(r))}})}};function Aw({router:n,flushSync:a,onError:r,unstable_useTransitions:l}){l=ZS()||l;let[f,d]=S.useState(n.state),[m,g]=Sw(f),[p,x]=S.useState(),[y,T]=S.useState({isTransitioning:!1}),[N,L]=S.useState(),[B,P]=S.useState(),[K,Y]=S.useState(),W=S.useRef(new Map),he=S.useCallback((V,{deletedFetchers:ie,newErrors:ke,flushSync:Re,viewTransitionOpts:Se})=>{ke&&r&&Object.values(ke).forEach(ze=>r(ze,{location:V.location,params:V.matches[0]?.params??{},unstable_pattern:tl(V.matches)})),V.fetchers.forEach((ze,Ee)=>{ze.data!==void 0&&W.current.set(Ee,ze.data)}),ie.forEach(ze=>W.current.delete(ze)),Gg(Re===!1||a!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Me=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(Gg(Se==null||Me,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!Se||!Me){a&&Re?a(()=>d(V)):l===!1?d(V):S.startTransition(()=>{l===!0&&g(ze=>Vg(ze,V)),d(V)});return}if(a&&Re){a(()=>{B&&(N?.resolve(),B.skipTransition()),T({isTransitioning:!0,flushSync:!0,currentLocation:Se.currentLocation,nextLocation:Se.nextLocation})});let ze=n.window.document.startViewTransition(()=>{a(()=>d(V))});ze.finished.finally(()=>{a(()=>{L(void 0),P(void 0),x(void 0),T({isTransitioning:!1})})}),a(()=>P(ze));return}B?(N?.resolve(),B.skipTransition(),Y({state:V,currentLocation:Se.currentLocation,nextLocation:Se.nextLocation})):(x(V),T({isTransitioning:!0,flushSync:!1,currentLocation:Se.currentLocation,nextLocation:Se.nextLocation}))},[n.window,a,B,N,l,g,r]);S.useLayoutEffect(()=>n.subscribe(he),[n,he]),S.useEffect(()=>{y.isTransitioning&&!y.flushSync&&L(new Tw)},[y]),S.useEffect(()=>{if(N&&p&&n.window){let V=p,ie=N.promise,ke=n.window.document.startViewTransition(async()=>{l===!1?d(V):S.startTransition(()=>{l===!0&&g(Re=>Vg(Re,V)),d(V)}),await ie});ke.finished.finally(()=>{L(void 0),P(void 0),x(void 0),T({isTransitioning:!1})}),P(ke)}},[p,N,n.window,l,g]),S.useEffect(()=>{N&&p&&m.location.key===p.location.key&&N.resolve()},[N,B,m.location,p]),S.useEffect(()=>{!y.isTransitioning&&K&&(x(K.state),T({isTransitioning:!0,flushSync:!1,currentLocation:K.currentLocation,nextLocation:K.nextLocation}),Y(void 0))},[y.isTransitioning,K]);let de=S.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:V=>n.navigate(V),push:(V,ie,ke)=>n.navigate(V,{state:ie,preventScrollReset:ke?.preventScrollReset}),replace:(V,ie,ke)=>n.navigate(V,{replace:!0,state:ie,preventScrollReset:ke?.preventScrollReset})}),[n]),fe=n.basename||"/",R=S.useMemo(()=>({router:n,navigator:de,static:!1,basename:fe,onError:r}),[n,de,fe,r]);return S.createElement(S.Fragment,null,S.createElement($i.Provider,{value:R},S.createElement(nl.Provider,{value:m},S.createElement(Zy.Provider,{value:W.current},S.createElement(ed.Provider,{value:y},S.createElement(kw,{basename:fe,location:m.location,navigationType:m.historyAction,navigator:de,unstable_useTransitions:l},S.createElement(Cw,{routes:n.routes,future:n.future,state:m,onError:r})))))),null)}function Vg(n,a){return{...n,navigation:a.navigation.state!=="idle"?a.navigation:n.navigation,revalidation:a.revalidation!=="idle"?a.revalidation:n.revalidation,actionData:a.navigation.state!=="submitting"?a.actionData:n.actionData,fetchers:a.fetchers}}var Cw=S.memo(Rw);function Rw({routes:n,future:a,state:r,onError:l}){return lw(n,void 0,r,l,a)}function _w(n){return rw(n.context)}function kw({basename:n="/",children:a=null,location:r,navigationType:l="POP",navigator:c,static:f=!1,unstable_useTransitions:d}){qe(!al(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),g=S.useMemo(()=>({basename:m,navigator:c,static:f,unstable_useTransitions:d,future:{}}),[m,c,f,d]);typeof r=="string"&&(r=vi(r));let{pathname:p="/",search:x="",hash:y="",state:T=null,key:N="default"}=r,L=S.useMemo(()=>{let B=Vn(p,m);return B==null?null:{location:{pathname:B,search:x,hash:y,state:T,key:N},navigationType:l}},[m,p,x,y,T,N,l]);return zt(L!=null,`<Router basename="${m}"> is not able to match the URL "${p}${x}${y}" because it does not start with the basename, so the <Router> won't render anything.`),L==null?null:S.createElement(Yn.Provider,{value:g},S.createElement(Ko.Provider,{children:a,value:L}))}var ko="get",No="application/x-www-form-urlencoded";function Vo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Nw(n){return Vo(n)&&n.tagName.toLowerCase()==="button"}function Ow(n){return Vo(n)&&n.tagName.toLowerCase()==="form"}function Mw(n){return Vo(n)&&n.tagName.toLowerCase()==="input"}function Dw(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function jw(n,a){return n.button===0&&(!a||a==="_self")&&!Dw(n)}var wo=null;function zw(){if(wo===null)try{new FormData(document.createElement("form"),0),wo=!1}catch{wo=!0}return wo}var Lw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function df(n){return n!=null&&!Lw.has(n)?(zt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${No}"`),null):n}function Uw(n,a){let r,l,c,f,d;if(Ow(n)){let m=n.getAttribute("action");l=m?Vn(m,a):null,r=n.getAttribute("method")||ko,c=df(n.getAttribute("enctype"))||No,f=new FormData(n)}else if(Nw(n)||Mw(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=n.getAttribute("formaction")||m.getAttribute("action");if(l=g?Vn(g,a):null,r=n.getAttribute("formmethod")||m.getAttribute("method")||ko,c=df(n.getAttribute("formenctype"))||df(m.getAttribute("enctype"))||No,f=new FormData(m,n),!zw()){let{name:p,type:x,value:y}=n;if(x==="image"){let T=p?`${p}.`:"";f.append(`${T}x`,"0"),f.append(`${T}y`,"0")}else p&&f.append(p,y)}}else{if(Vo(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ko,l=null,c=No,d=n}return f&&c==="text/plain"&&(d=f,f=void 0),{action:l,method:r.toLowerCase(),encType:c,formData:f,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function id(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function Bw(n,a,r,l){let c=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return r?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${l}`:c.pathname=`${c.pathname}.${l}`:c.pathname==="/"?c.pathname=`_root.${l}`:a&&Vn(c.pathname,a)==="/"?c.pathname=`${a.replace(/\/$/,"")}/_root.${l}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${l}`,c}async function qw(n,a){if(n.id in a)return a[n.id];try{let r=await import(n.module);return a[n.id]=r,r}catch(r){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Hw(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Qw(n,a,r){let l=await Promise.all(n.map(async c=>{let f=a.routes[c.route.id];if(f){let d=await qw(f,r);return d.links?d.links():[]}return[]}));return Vw(l.flat(1).filter(Hw).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function Yg(n,a,r,l,c,f){let d=(g,p)=>r[p]?g.route.id!==r[p].route.id:!0,m=(g,p)=>r[p].pathname!==g.pathname||r[p].route.path?.endsWith("*")&&r[p].params["*"]!==g.params["*"];return f==="assets"?a.filter((g,p)=>d(g,p)||m(g,p)):f==="data"?a.filter((g,p)=>{let x=l.routes[g.route.id];if(!x||!x.hasLoader)return!1;if(d(g,p)||m(g,p))return!0;if(g.route.shouldRevalidate){let y=g.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function Pw(n,a,{includeHydrateFallback:r}={}){return Gw(n.map(l=>{let c=a.routes[l.route.id];if(!c)return[];let f=[c.module];return c.clientActionModule&&(f=f.concat(c.clientActionModule)),c.clientLoaderModule&&(f=f.concat(c.clientLoaderModule)),r&&c.hydrateFallbackModule&&(f=f.concat(c.hydrateFallbackModule)),c.imports&&(f=f.concat(c.imports)),f}).flat(1))}function Gw(n){return[...new Set(n)]}function Kw(n){let a={},r=Object.keys(n).sort();for(let l of r)a[l]=n[l];return a}function Vw(n,a){let r=new Set;return new Set(a),n.reduce((l,c)=>{let f=JSON.stringify(Kw(c));return r.has(f)||(r.add(f),l.push({key:f,link:c})),l},[])}function av(){let n=S.useContext($i);return id(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Yw(){let n=S.useContext(nl);return id(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var rd=S.createContext(void 0);rd.displayName="FrameworkContext";function iv(){let n=S.useContext(rd);return id(n,"You must render this element inside a <HydratedRouter> element"),n}function Fw(n,a){let r=S.useContext(rd),[l,c]=S.useState(!1),[f,d]=S.useState(!1),{onFocus:m,onBlur:g,onMouseEnter:p,onMouseLeave:x,onTouchStart:y}=a,T=S.useRef(null);S.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let B=K=>{K.forEach(Y=>{d(Y.isIntersecting)})},P=new IntersectionObserver(B,{threshold:.5});return T.current&&P.observe(T.current),()=>{P.disconnect()}}},[n]),S.useEffect(()=>{if(l){let B=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(B)}}},[l]);let N=()=>{c(!0)},L=()=>{c(!1),d(!1)};return r?n!=="intent"?[f,T,{}]:[f,T,{onFocus:Qs(m,N),onBlur:Qs(g,L),onMouseEnter:Qs(p,N),onMouseLeave:Qs(x,L),onTouchStart:Qs(y,N)}]:[!1,T,{}]}function Qs(n,a){return r=>{n&&n(r),r.defaultPrevented||a(r)}}function Xw({page:n,...a}){let{router:r}=av(),l=S.useMemo(()=>di(r.routes,n,r.basename),[r.routes,n,r.basename]);return l?S.createElement(Zw,{page:n,matches:l,...a}):null}function Iw(n){let{manifest:a,routeModules:r}=iv(),[l,c]=S.useState([]);return S.useEffect(()=>{let f=!1;return Qw(n,a,r).then(d=>{f||c(d)}),()=>{f=!0}},[n,a,r]),l}function Zw({page:n,matches:a,...r}){let l=bi(),{future:c,manifest:f,routeModules:d}=iv(),{basename:m}=av(),{loaderData:g,matches:p}=Yw(),x=S.useMemo(()=>Yg(n,a,p,f,l,"data"),[n,a,p,f,l]),y=S.useMemo(()=>Yg(n,a,p,f,l,"assets"),[n,a,p,f,l]),T=S.useMemo(()=>{if(n===l.pathname+l.search+l.hash)return[];let B=new Set,P=!1;if(a.forEach(Y=>{let W=f.routes[Y.route.id];!W||!W.hasLoader||(!x.some(he=>he.route.id===Y.route.id)&&Y.route.id in g&&d[Y.route.id]?.shouldRevalidate||W.hasClientLoader?P=!0:B.add(Y.route.id))}),B.size===0)return[];let K=Bw(n,m,c.unstable_trailingSlashAwareDataRequests,"data");return P&&B.size>0&&K.searchParams.set("_routes",a.filter(Y=>B.has(Y.route.id)).map(Y=>Y.route.id).join(",")),[K.pathname+K.search]},[m,c.unstable_trailingSlashAwareDataRequests,g,l,f,x,a,n,d]),N=S.useMemo(()=>Pw(y,f),[y,f]),L=Iw(y);return S.createElement(S.Fragment,null,T.map(B=>S.createElement("link",{key:B,rel:"prefetch",as:"fetch",href:B,...r})),N.map(B=>S.createElement("link",{key:B,rel:"modulepreload",href:B,...r})),L.map(({key:B,link:P})=>S.createElement("link",{key:B,nonce:r.nonce,...P,crossOrigin:P.crossOrigin??r.crossOrigin})))}function Jw(...n){return a=>{n.forEach(r=>{typeof r=="function"?r(a):r!=null&&(r.current=a)})}}var $w=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{$w&&(window.__reactRouterVersion="7.13.0")}catch{}function Ww(n,a){return AS({basename:a?.basename,getContext:a?.getContext,future:a?.future,history:Qx({window:a?.window}),hydrationData:eE(),routes:n,mapRouteProperties:ww,hydrationRouteProperties:Ew,dataStrategy:a?.dataStrategy,patchRoutesOnNavigation:a?.patchRoutesOnNavigation,window:a?.window,unstable_instrumentations:a?.unstable_instrumentations}).initialize()}function eE(){let n=window?.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:tE(n.errors)}),n}function tE(n){if(!n)return null;let a=Object.entries(n),r={};for(let[l,c]of a)if(c&&c.__type==="RouteErrorResponse")r[l]=new el(c.status,c.statusText,c.data,c.internal===!0);else if(c&&c.__type==="Error"){if(c.__subType){let f=window[c.__subType];if(typeof f=="function")try{let d=new f(c.message);d.stack="",r[l]=d}catch{}}if(r[l]==null){let f=new Error(c.message);f.stack="",r[l]=f}}else r[l]=c;return r}var rv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sv=S.forwardRef(function({onClick:a,discover:r="render",prefetch:l="none",relative:c,reloadDocument:f,replace:d,state:m,target:g,to:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T,...N},L){let{basename:B,unstable_useTransitions:P}=S.useContext(Yn),K=typeof p=="string"&&rv.test(p),Y=Uy(p,B);p=Y.to;let W=nw(p,{relative:c}),[he,de,fe]=Fw(l,N),R=rE(p,{replace:d,state:m,target:g,preventScrollReset:x,relative:c,viewTransition:y,unstable_defaultShouldRevalidate:T,unstable_useTransitions:P});function V(ke){a&&a(ke),ke.defaultPrevented||R(ke)}let ie=S.createElement("a",{...N,...fe,href:Y.absoluteURL||W,onClick:Y.isExternal||f?a:V,ref:Jw(L,de),target:g,"data-discover":!K&&r==="render"?"true":void 0});return he&&!K?S.createElement(S.Fragment,null,ie,S.createElement(Xw,{page:W})):ie});sv.displayName="Link";var nE=S.forwardRef(function({"aria-current":a="page",caseSensitive:r=!1,className:l="",end:c=!1,style:f,to:d,viewTransition:m,children:g,...p},x){let y=il(d,{relative:p.relative}),T=bi(),N=S.useContext(nl),{navigator:L,basename:B}=S.useContext(Yn),P=N!=null&&cE(y)&&m===!0,K=L.encodeLocation?L.encodeLocation(y).pathname:y.pathname,Y=T.pathname,W=N&&N.navigation&&N.navigation.location?N.navigation.location.pathname:null;r||(Y=Y.toLowerCase(),W=W?W.toLowerCase():null,K=K.toLowerCase()),W&&B&&(W=Vn(W,B)||W);const he=K!=="/"&&K.endsWith("/")?K.length-1:K.length;let de=Y===K||!c&&Y.startsWith(K)&&Y.charAt(he)==="/",fe=W!=null&&(W===K||!c&&W.startsWith(K)&&W.charAt(K.length)==="/"),R={isActive:de,isPending:fe,isTransitioning:P},V=de?a:void 0,ie;typeof l=="function"?ie=l(R):ie=[l,de?"active":null,fe?"pending":null,P?"transitioning":null].filter(Boolean).join(" ");let ke=typeof f=="function"?f(R):f;return S.createElement(sv,{...p,"aria-current":V,className:ie,ref:x,style:ke,to:d,viewTransition:m},typeof g=="function"?g(R):g)});nE.displayName="NavLink";var aE=S.forwardRef(({discover:n="render",fetcherKey:a,navigate:r,reloadDocument:l,replace:c,state:f,method:d=ko,action:m,onSubmit:g,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T,...N},L)=>{let{unstable_useTransitions:B}=S.useContext(Yn),P=oE(),K=uE(m,{relative:p}),Y=d.toLowerCase()==="get"?"get":"post",W=typeof m=="string"&&rv.test(m),he=de=>{if(g&&g(de),de.defaultPrevented)return;de.preventDefault();let fe=de.nativeEvent.submitter,R=fe?.getAttribute("formmethod")||d,V=()=>P(fe||de.currentTarget,{fetcherKey:a,method:R,navigate:r,replace:c,state:f,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T});B&&r!==!1?S.startTransition(()=>V()):V()};return S.createElement("form",{ref:L,method:Y,action:K,onSubmit:l?g:he,...N,"data-discover":!W&&n==="render"?"true":void 0})});aE.displayName="Form";function iE(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lv(n){let a=S.useContext($i);return qe(a,iE(n)),a}function rE(n,{target:a,replace:r,state:l,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:m,unstable_useTransitions:g}={}){let p=ev(),x=bi(),y=il(n,{relative:f});return S.useCallback(T=>{if(jw(T,a)){T.preventDefault();let N=r!==void 0?r:ma(x)===ma(y),L=()=>p(n,{replace:N,state:l,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:m});g?S.startTransition(()=>L()):L()}},[x,p,y,r,l,a,n,c,f,d,m,g])}var sE=0,lE=()=>`__${String(++sE)}__`;function oE(){let{router:n}=lv("useSubmit"),{basename:a}=S.useContext(Yn),r=gw(),l=n.fetch,c=n.navigate;return S.useCallback(async(f,d={})=>{let{action:m,method:g,encType:p,formData:x,body:y}=Uw(f,a);if(d.navigate===!1){let T=d.fetcherKey||lE();await l(T,r,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:y,formMethod:d.method||g,formEncType:d.encType||p,flushSync:d.flushSync})}else await c(d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:y,formMethod:d.method||g,formEncType:d.encType||p,replace:d.replace,state:d.state,fromRouteId:r,flushSync:d.flushSync,viewTransition:d.viewTransition})},[l,c,a,r])}function uE(n,{relative:a}={}){let{basename:r}=S.useContext(Yn),l=S.useContext(aa);qe(l,"useFormAction must be used inside a RouteContext");let[c]=l.matches.slice(-1),f={...il(n||".",{relative:a})},d=bi();if(n==null){f.search=d.search;let m=new URLSearchParams(f.search),g=m.getAll("index");if(g.some(x=>x==="")){m.delete("index"),g.filter(y=>y).forEach(y=>m.append("index",y));let x=m.toString();f.search=x?`?${x}`:""}}return(!n||n===".")&&c.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:da([r,f.pathname])),ma(f)}function cE(n,{relative:a}={}){let r=S.useContext(ed);qe(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=lv("useViewTransitionState"),c=il(n,{relative:a});if(!r.isTransitioning)return!1;let f=Vn(r.currentLocation.pathname,l)||r.currentLocation.pathname,d=Vn(r.nextLocation.pathname,l)||r.nextLocation.pathname;return Qo(c.pathname,d)!=null||Qo(c.pathname,f)!=null}function fE(n){return S.createElement(Aw,{flushSync:ky.flushSync,...n})}const ov=(...n)=>n.filter((a,r,l)=>!!a&&a.trim()!==""&&l.indexOf(a)===r).join(" ").trim();const dE=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const hE=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,r,l)=>l?l.toUpperCase():r.toLowerCase());const Fg=n=>{const a=hE(n);return a.charAt(0).toUpperCase()+a.slice(1)};var mE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const pE=n=>{for(const a in n)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};const gE=S.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:r=2,absoluteStrokeWidth:l,className:c="",children:f,iconNode:d,...m},g)=>S.createElement("svg",{ref:g,...mE,width:a,height:a,stroke:n,strokeWidth:l?Number(r)*24/Number(a):r,className:ov("lucide",c),...!f&&!pE(m)&&{"aria-hidden":"true"},...m},[...d.map(([p,x])=>S.createElement(p,x)),...Array.isArray(f)?f:[f]]));const vt=(n,a)=>{const r=S.forwardRef(({className:l,...c},f)=>S.createElement(gE,{ref:f,iconNode:a,className:ov(`lucide-${dE(Fg(n))}`,`lucide-${n}`,l),...c}));return r.displayName=Fg(n),r};const yE=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],vE=vt("bell",yE);const bE=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],uv=vt("bot",bE);const xE=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],SE=vt("cable",xE);const wE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Of=vt("circle-check",wE);const EE=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],TE=vt("circle-dashed",EE);const AE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],cv=vt("circle-x",AE);const CE=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],RE=vt("cpu",CE);const _E=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],fv=vt("download",_E);const kE=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],NE=vt("external-link",kE);const OE=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],ME=vt("folder-git-2",OE);const DE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],jE=vt("info",DE);const zE=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],LE=vt("languages",zE);const UE=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Gr=vt("loader-circle",UE);const BE=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],qE=vt("lock-keyhole",BE);const HE=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],QE=vt("refresh-cw",HE);const PE=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],GE=vt("rotate-ccw",PE);const KE=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],VE=vt("settings",KE);const YE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],FE=vt("shield-check",YE);const XE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],IE=vt("square",XE);const ZE=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],JE=vt("terminal",ZE);const $E=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Po=vt("triangle-alert",$E);const WE=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],eT=vt("users",WE);const tT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],dv=vt("x",tT),Xg=n=>{let a;const r=new Set,l=(p,x)=>{const y=typeof p=="function"?p(a):p;if(!Object.is(y,a)){const T=a;a=x??(typeof y!="object"||y===null)?y:Object.assign({},a,y),r.forEach(N=>N(a,T))}},c=()=>a,m={setState:l,getState:c,getInitialState:()=>g,subscribe:p=>(r.add(p),()=>r.delete(p))},g=a=n(l,c,m);return m},nT=(n=>n?Xg(n):Xg),aT=n=>n;function iT(n,a=aT){const r=ne.useSyncExternalStore(n.subscribe,ne.useCallback(()=>a(n.getState()),[n,a]),ne.useCallback(()=>a(n.getInitialState()),[n,a]));return ne.useDebugValue(r),r}const Ig=n=>{const a=nT(n),r=l=>iT(a,l);return Object.assign(r,a),r},hv=(n=>n?Ig(n):Ig),Ys=hv(n=>({sidebarOpen:!0,theme:"system",settingsOpen:!1,settingsTab:"general",toggleSidebar:()=>n(a=>({sidebarOpen:!a.sidebarOpen})),setSidebarOpen:a=>n({sidebarOpen:a}),setTheme:a=>n({theme:a}),openSettings:a=>n({settingsOpen:!0,...a?{settingsTab:a}:{}}),closeSettings:()=>n({settingsOpen:!1}),setSettingsTab:a=>n({settingsTab:a})})),Zg="/api";function mv(n){return n.endsWith("/")?n.slice(0,-1):n}function pv(n){return!1}function rT(){return pv()?Zg:mv(Zg)}function sT(){return pv()?"":mv("")}const lT=rT();class oT{baseUrl;constructor(a){this.baseUrl=a}async request(a,r={}){const{params:l,...c}=r;let f=`${this.baseUrl}${a}`;if(l){const g=new URLSearchParams(l);f+=`?${g.toString()}`}const d={...c.headers};c.body!==void 0&&(d["Content-Type"]="application/json");const m=await fetch(f,{...c,headers:d,credentials:c.credentials??"same-origin"});if(!m.ok){const g=await m.json().catch(()=>({}));throw new rl(m.status,typeof g.message=="string"?g.message:typeof g.error=="string"?g.error:"Request failed",g)}if(m.status!==204)return m.json()}get(a,r){return this.request(a,{...r,method:"GET"})}post(a,r,l){return this.request(a,{...l,method:"POST",body:r?JSON.stringify(r):void 0})}put(a,r,l){return this.request(a,{...l,method:"PUT",body:r?JSON.stringify(r):void 0})}patch(a,r,l){return this.request(a,{...l,method:"PATCH",body:r?JSON.stringify(r):void 0})}delete(a,r){return this.request(a,{...r,method:"DELETE"})}}class rl extends Error{status;details;constructor(a,r,l={}){super(r),this.name="ApiError",this.status=a,this.details=l}}const Le=new oT(lT),be={projects:{all:["projects"],list:n=>["projects","list",n],detail:n=>["projects","detail",n],gitCapability:n=>["projects","gitCapability",n]},tasks:{all:["tasks"],boardAll:["tasks","board"],board:n=>["tasks","board",n],list:(n,a)=>["tasks","list",n,a],detail:n=>["tasks","detail",n],body:n=>["tasks","body",n],stats:n=>["tasks","stats",n]},workspaces:{all:["workspaces"],list:n=>["workspaces","list",n],detail:n=>["workspaces","detail",n],diff:n=>["workspaces","diff",n],gitStatus:n=>["workspaces","gitStatus",n]},previews:{all:["previews"],status:n=>["previews","status",n]},sessions:{all:["sessions"],detail:n=>["sessions","detail",n],runtime:n=>["sessions","runtime",n]},conversations:{all:["conversations"],list:n=>["conversations","list",n],detail:n=>["conversations","detail",n]},files:{all:["files"],tree:(n,a)=>["files","tree",n,a],content:(n,a)=>["files","content",n,a]},git:{all:["git"],changes:n=>["git","changes",n],diff:(n,a,r)=>["git","diff",n,a,r],log:n=>["git","log",n],commitFiles:(n,a)=>["git","commitFiles",n,a],commitDiff:(n,a,r)=>["git","commitDiff",n,a,r]},profiles:{all:["profiles"],defaults:["profiles","defaults"],agent:n=>["profiles","agent",n],variant:(n,a)=>["profiles","variant",n,a]},providers:{all:["providers"],capabilities:["providers","capabilities"],detail:n=>["providers","detail",n]},tunnel:{status:["tunnel","status"]},notifications:{settings:["notifications","settings"]},appSettings:{detail:["app-settings"]},accessAuth:{status:["access-auth","status"],settings:["access-auth","settings"]},agentCli:{manifest:["agent-cli","manifest"],status:["agent-cli","status"],preview:n=>["agent-cli","preview",n],task:n=>["agent-cli","task",n],logs:n=>["agent-cli","logs",n]},system:{cursorAgentModels:["system","cursor-agent-models"],mcpConfig:["system","mcp-config"],slashCommandCatalog:(n,a)=>["system","slash-command-catalog",n??null,a??null],skillCatalog:(n,a)=>["system","skill-catalog",n??null,a??null]}};function uT(){return rn({queryKey:be.appSettings.detail,queryFn:()=>Le.get("/app-settings")})}function cT(){const n=tt();return ht({mutationFn:a=>Le.put("/app-settings",a),onSuccess:()=>{n.invalidateQueries({queryKey:be.appSettings.detail})}})}function VC(){return rn({queryKey:[...be.appSettings.detail,"commit-message-defaults"],queryFn:()=>Le.get("/app-settings/commit-message-defaults")})}const fT={"zh-CN":{Settings:"设置",General:"通用",Back:"返回","Loading...":"加载中...","No options":"暂无选项","Processing...":"处理中...","Permission required":"需要授权","The agent needs approval to continue.":"Agent 需要你的授权才能继续。",Confirm:"确认",Cancel:"取消",Start:"开始","Starting...":"启动中...","General Settings":"通用设置","Display Language":"显示语言","Choose the interface language. The setting is saved to the local Agent Tower database and will still apply after restart.":"选择界面语言。设置会保存到本地 Agent Tower 数据库,并在重新打开后继续生效。",English:"English","Simplified Chinese":"简体中文","Language setting":"语言设置","Language setting could not be saved":"语言设置保存失败","Browse and select a Git repository, or type a path and press Enter":"浏览并选择一个 Git 仓库,或输入路径后按 Enter","Browse and select a directory, or type a path and press Enter":"浏览并选择一个目录,或输入路径后按 Enter","Select Current":"选择当前目录","Project Path":"项目路径","Create Local Project":"创建本地项目","Local project":"本地项目","Local projects only support local Solo tasks. Initialize Git to use worktrees and TeamRun.":"本地项目仅支持本地 Solo 任务。初始化 Git 后可使用工作树和 TeamRun。","You can also create it as a local project now. Local projects only support local Solo tasks until Git is initialized.":"你也可以现在将其创建为本地项目。初始化 Git 前,本地项目仅支持本地 Solo 任务。","This setting applies only to Git worktree projects.":"此设置仅适用于 Git 工作树项目。","Agent 配置":"Agent 配置",项目配置:"项目配置",通知:"通知",通用:"通用","AI Agent Task Management Dashboard":"AI Agent 任务管理面板","Project Management":"项目管理","Manage your AI agent projects":"管理你的 AI Agent 项目","View Projects":"查看项目","Task Board":"任务看板",Tasks:"任务","Kanban-style task management":"Kanban 风格的任务管理","Open Board":"打开看板",Workspace:"工作区","Git worktree isolated environments":"Git Worktree 隔离环境","Manage Workspaces":"管理工作区","Move to":"移动到","Delete Task":"删除任务","Drop into {title}":"放入 {title}","Drop here":"拖到此处","No tasks":"暂无任务","All Projects":"所有项目",Projects:"项目","Select View":"选择视图","Create New Project...":"创建新项目...","New Task":"新任务","New Project":"新项目",Search:"搜索","Search tasks...":"搜索任务...","Search conversations...":"搜索对话...","Recent tasks":"近期任务","Recent conversations":"最近对话","No matching tasks":"没有匹配的任务","No matching conversations":"没有匹配的对话","{count} tasks":"{count} 个任务","Clear filter":"清除筛选",Review:"待审查",Running:"进行中",Pending:"待开始",Done:"已完成",Cancelled:"已取消",Starting:"启动中",Completed:"已完成",Stopped:"已停止",Changes:"变更",History:"历史",Conversation:"对话",Conversations:"对话","New Conversation":"新对话","No conversations":"暂无对话","Conversation not found":"对话不存在","Delete this conversation?":"删除这个对话?","Ask a question...":"问一个问题...",Editor:"编辑器",Terminal:"终端",Preview:"预览","Coming soon...":"即将推出...",Modified:"已修改",Added:"已新增",Deleted:"已删除",Delete:"删除",Renamed:"已重命名","Loading diff...":"正在加载差异...","Failed to load diff.":"加载差异失败。","No diff content available.":"没有可显示的差异内容。","No workspace selected.":"未选择工作区。","Loading changes...":"正在加载变更...","Failed to load changes.":"加载变更失败。","No pending changes":"暂无待处理变更",Uncommitted:"未提交",Committed:"已提交","Select a file to view diff":"选择一个文件以查看差异","{count}s ago":"{count} 秒前","{count}m ago":"{count} 分钟前","{count}h ago":"{count} 小时前","{count}d ago":"{count} 天前",正在思考:"正在思考","最后一次输出于 {duration}前":"最后一次输出于 {duration}前",等待首次输出:"等待首次输出","{count} 秒":"{count} 秒","{minutes} 分 {seconds} 秒":"{minutes} 分 {seconds} 秒","{hours} 小时 {minutes} 分":"{hours} 小时 {minutes} 分","Loading files...":"正在加载文件列表...","No files changed":"没有文件变更","Loading history...":"正在加载历史记录...","Failed to load history.":"加载历史记录失败。","No commit history":"暂无提交历史","Load more":"加载更多","Select a commit to view changes":"选择一个提交以查看变更","Zoom out":"缩小","Reset zoom":"重置缩放","Zoom in":"放大","Fit to view":"适应视图","Failed to load image.":"加载图片失败。","Close tab":"关闭标签页",Close:"关闭","Expand file tree":"展开文件树","No open files":"暂无打开文件",Saving:"保存中",Unsaved:"未保存","Select a file from the tree to open.":"从文件树中选择一个文件以打开。","Loading file...":"正在加载文件...","Failed to load file":"加载文件失败","Failed to load":"加载失败","Failed to start. Please try again.":"启动失败,请重试",Files:"文件","No working directory":"未选择工作目录","Refresh file tree":"刷新文件树","Collapse file tree":"收起文件树","Shell {count}":"终端 {count}","New Terminal":"新终端","No terminals open":"暂无打开终端","Paste into terminal":"粘贴到终端","Paste terminal input here":"在此粘贴终端输入内容","Terminal paste content":"终端粘贴内容","Terminal is not ready":"终端尚未就绪","Pasted into terminal":"已粘贴到终端",Paste:"粘贴",Disconnected:"未连接","Connecting...":"连接中...",Connected:"已连接","No active session":"暂无活动会话","Create a workspace and start a session to see terminal output.":"创建工作区并启动会话后即可查看终端输出。","Process exited with code {code}":"进程已退出,退出码 {code}","Error: {message}":"错误: {message}","Session: {id}":"会话: {id}","Tunnel active":"隧道已启用","Share via tunnel":"通过隧道分享","Tunnel Active":"隧道已启用","Tunnel healthy":"隧道健康","Tunnel needs attention":"隧道需要注意","Tunnel unavailable":"隧道不可用","Tunnel starting":"隧道启动中","Tunnel is off":"隧道未开启","Checking tunnel health":"正在检查隧道健康","Observing original link":"正在观察原链接","Local service unavailable":"本地服务不可用","Tunnel process exited":"隧道进程已退出","Tunnel error":"隧道错误","New link generated":"新链接已生成","Use Agent Tower on your phone":"在手机上使用 Agent Tower","After enabling the tunnel, you can scan a QR code with your phone to visit this Agent Tower instance, assign tasks, and check agent status.":"开启隧道后,可以用手机扫码访问本机的 Agent Tower,用手机派任务、查看 Agent 状态。","Enable phone access":"开启手机访问","Starting tunnel...":"正在开启隧道...","Start a temporary Quick Tunnel when you need to share this Agent Tower session.":"需要分享当前 Agent Tower 会话时,可以启动一个临时 Quick Tunnel。","The Cloudflare tunnel is running and the local Agent Tower health check passed.":"Cloudflare 隧道正在运行,且本地 Agent Tower 健康检查已通过。","The Cloudflare tunnel is running. Agent Tower is waiting for the first local health check.":"Cloudflare 隧道正在运行,Agent Tower 正在等待首次本地健康检查。","The original public URL is currently unreachable. Agent Tower is watching for it to recover and will not generate a new link automatically.":"原公网链接当前不可访问。Agent Tower 正在观察它是否恢复,不会自动生成新链接。","The local Agent Tower target is not responding, so the tunnel cannot be considered healthy.":"本地 Agent Tower 目标没有响应,因此隧道不能视为健康。","The tunnel process has exited. The old Quick Tunnel link is unlikely to recover.":"隧道进程已退出,旧 Quick Tunnel 链接大概率无法恢复。","The tunnel reported an error. Check the diagnostics before generating a new link.":"隧道报告了错误。生成新链接前请先查看诊断信息。","A new Quick Tunnel link was generated. The old link and token are no longer valid.":"已生成新的 Quick Tunnel 链接。旧链接和 token 已失效。","Agent Tower is asking Cloudflare Quick Tunnel for a temporary public URL.":"Agent Tower 正在向 Cloudflare Quick Tunnel 申请临时公网链接。","Last checked":"上次检查","Last healthy":"上次健康",Never:"从未","Agent Tower is keeping the same URL and waiting for Cloudflare Quick Tunnel to recover.":"Agent Tower 会保留同一个 URL,并等待 Cloudflare Quick Tunnel 自行恢复。","The previous tunnel link and token are no longer valid.":"之前的隧道链接和 token 已不再有效。","Generating a new link will invalidate the current link. People using the old URL must receive the new one.":"生成新链接会使当前链接失效。正在使用旧 URL 的人需要收到新链接。","Regenerate link":"重新生成链接","Generating...":"生成中...","Token protected":"受 Token 保护","Copy shareable link":"复制分享链接","No tunnel link available":"暂无可用隧道链接","Hide token":"隐藏 Token","Show token":"显示 Token","Copy token":"复制 Token","Stopping...":"停止中...","Stop Tunnel":"停止隧道","Create & Start":"创建并启动","Create TeamRun":"创建 TeamRun","Creating TeamRun...":"正在创建 TeamRun...","Team Status":"团队状态","Team mode":"团队模式","Review reason":"审查原因",Members:"成员","No members":"暂无成员",Queue:"队列","No queued work requests":"暂无排队中的工作请求","Active invocations":"活动调用","No active invocations":"暂无活动调用","Recently completed":"最近完成","No completed invocations":"暂无已完成调用","New session per request":"每次新会话","Resume last session":"复用上次会话",Latest:"最新","Invocation history":"调用历史","No invocation history":"暂无调用历史","No invocations yet":"暂无调用记录","All members idle":"所有成员空闲",Log:"日志",Details:"详情",Workspaces:"工作区",Owner:"所有者",Parent:"父级",Selected:"已选",Select:"选择","View workspace":"查看工作区",Invocation:"调用",Session:"会话","View log":"查看日志","View details":"查看详情","Team room":"团队房间","No room messages yet":"暂无房间消息",Messages:"消息","Work requests":"工作请求","Active work":"进行中的工作",Working:"正在工作","Queued...":"排队中...","Waiting reply...":"等待回复...",running:"进行中",queued:"排队",waiting:"等待",ended:"已结束",Elapsed:"耗时",Failed:"失败","Session ended":"会话已结束","Failed to send room message":"发送房间消息失败",selected:"已选择","Back to bottom":"回到底部","Expand full message":"展开全部","Collapse message":"收起","Invocation details":"调用详情","Back to room":"返回群聊","Pending approval":"待审批","Tool Calls":"工具调用",已处理:"已处理","已处理 {duration}":"已处理 {duration}","No pending approvals":"暂无待审批项",Requester:"发起者",User:"用户",System:"系统","Waiting room reply":"等待房间回复",Queued:"排队中",Idle:"空闲","Queue if busy":"忙碌时排队","Cancel current if busy":"忙碌时取消当前并开始","Cancel queued":"取消排队",Approve:"批准",Approving:"批准中...",Reject:"拒绝",Rejecting:"拒绝中...",Cancelling:"取消中...","Failed to update work request":"更新工作请求失败","Failed to cancel work request":"取消工作请求失败",Stop:"停止","Stop running work?":"停止正在运行的工作?","Stop only":"仅停止","Stop + clear queue":"停止并清空队列",Stopping:"停止中...","Failed to stop member work":"停止成员工作失败",Yes:"是",No:"否","Creating Task...":"正在创建任务...","Creating Workspace...":"正在创建工作区...","Creating Session...":"正在创建会话...","Starting Agent...":"正在启动 Agent...","启动 Agent 失败":"启动 Agent 失败","重试启动 Agent":"重试启动 Agent","Create New Project":"创建新项目","Creating...":"创建中...","Checking...":"检查中...",Create:"创建","Create Project":"创建项目","Initialize Git repository?":"初始化 Git 仓库?","Initialize and Create":"初始化并创建","This directory is empty and does not have Git version control yet. Agent Tower can initialize Git and create the initial commit before creating the project.":"该目录为空且尚未启用 Git 版本管理。Agent Tower 可以先初始化 Git 并创建初始提交,然后再创建项目。","The selected directory is not a Git repository and is not empty. Initialize Git manually and make an initial commit, then create the project.":"所选目录不是 Git 仓库且不为空。请手动初始化 Git 并完成首次提交,然后再创建项目。","Selected path is not a valid directory":"所选路径不是有效目录","Could not check repository path":"无法检查仓库路径","Could not check project path":"无法检查项目路径","Project Name":"项目名称","e.g., Agent Tower":"例如:Agent Tower","Repository Path":"仓库路径","Create New Task":"创建新任务",Execution:"执行方式","Solo Agent":"Solo Agent",Project:"项目",Provider:"Provider",Agent:"Agent","Select project...":"选择项目...","Select provider...":"选择 Provider...","Task Title":"任务标题","e.g., Implement login flow":"例如:实现登录流程",Description:"描述","Optional...":"可选...","Optional description...":"可选描述...","Drop files here":"将文件拖到这里","Attach files":"添加文件","or paste files":"或粘贴文件","or paste/drag files":"或粘贴/拖拽文件","Drag to resize":"拖动以调整大小","Failed to create task":"创建任务失败","Failed to create project":"创建项目失败","Select a task from the sidebar to view logs, monitor execution, or interact with an agent.":"从侧边栏选择一个任务,以查看日志、监控执行过程,或与 Agent 交互。","Open in IDE":"在 IDE 中打开","Toggle Workspace":"切换工作区面板","More actions":"更多操作","No description":"暂无描述","Setup ({current}/{total}): {command}":"Setup({current}/{total}):{command}","Loading logs...":"正在加载日志...","Waiting for agent output...":"等待 Agent 输出...","No logs recorded for this session.":"当前会话暂无日志记录。","Scroll to bottom":"滚动到底部","Send failed. Please try again.":"发送失败,请重试","Drop files here...":"将文件拖到这里...","Continue conversation...":"继续对话...","Message Agent...":"给 Agent 发送消息...","Upload file":"上传文件","Uploading...":"上传中...",Send:"发送","Describe your task...":"描述你的任务...","Switch to TeamRun":"切换到 TeamRun","Switch to Solo Agent":"切换到单 Agent"," (unavailable)":"(不可用)","Manage Team Members":"管理团队成员","Add member":"添加成员","Save member":"保存成员","Edit member":"编辑成员","Remove member":"移除成员",Remove:"移除","Member added":"成员已添加","Member updated":"成员已更新","Member removed":"成员已移除","Failed to save member":"保存成员失败","Failed to remove member":"移除成员失败","Name, provider, and role prompt are required":"名称、Provider 和角色提示词不能为空","No active members":"暂无活跃成员","Add member from preset":"从预设添加成员","Choose a saved preset to add a ready-to-run member snapshot.":"选择已保存的预设,添加一个可直接工作的成员快照。","Custom member":"自定义成员",Custom:"自定义","Use preset":"使用预设",Preset:"预设","Select a member":"选择成员","Choose a member on the left to edit its future TeamRun configuration.":"从左侧选择成员,编辑其后续 TeamRun 配置。","Provider, role, workspace, and session changes apply to future work only.":"Provider、角色、工作区和会话变更只影响后续工作。","Create a one-off member snapshot for this TeamRun.":"为当前 TeamRun 创建一次性的成员快照。","Create a custom member for this TeamRun, or add presets from Team Collaboration Settings.":"可以为当前 TeamRun 创建自定义成员,或先在团队协作设置中添加预设。","Remove this member from future TeamRun work?":"将该成员从后续 TeamRun 工作中移除?",Name:"名称",Aliases:"别名",Avatar:"头像","Workspace policy":"工作区策略","Trigger policy":"触发策略","Session policy":"会话策略","Queue policy":"队列策略","Role prompt":"角色提示词",Capabilities:"能力","Comma separated":"用逗号分隔","No member presets":"暂无成员预设","...":"...","alice, a, reviewer":"alice, a, reviewer","Checking preview target...":"正在检查预览目标...","Configure a local preview target to display it here.":"配置本地预览目标后将在此显示。","Delete Project":"删除项目","Deleted projects are read-only":"已删除项目为只读","Deleting...":"删除中...","Enter a local preview URL on the Agent Tower machine.":"输入 Agent Tower 所在机器上的本地预览 URL。","Failed to delete project":"删除项目失败","Failed to load full message":"加载完整消息失败","Failed to restore project":"恢复项目失败","Failed to save preview target":"保存预览目标失败",Forward:"前进","Git Commit Message":"Git Commit Message",Loading:"加载中","Loopback only":"仅限本机回环地址","Mention members":"提及成员","Message the team room...":"向 Team Room 发送消息...","No active workspace.":"暂无活动工作区。","Open preview in new tab":"在新标签页打开预览","Preview target is not reachable":"预览目标不可访问","Preview target saved":"预览目标已保存","Preview address":"预览地址",Private:"私密",Proxying:"代理中","Read-only":"只读",Refresh:"刷新","Refresh preview":"刷新预览","Remove mention":"移除提及","Restore Project":"恢复项目","Restoring...":"恢复中...",Save:"保存","Save preview target":"保存预览目标","Start the preview server, then refresh.":"启动预览服务后刷新。","Stop loading":"停止加载","Team members":"团队成员","this project":"此项目","This project is read-only":"此项目为只读","10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果":"10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果",设计推荐:"设计推荐","首选:Charcoal Breathe (#10)":"首选:Charcoal Breathe (#10)","备选A:Tower Pulse (#1)":"备选A:Tower Pulse (#1)","备选B:Terminal Cursor (#4)":"备选B:Terminal Cursor (#4)","品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。":"品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。","品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。":"品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。","终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。":"终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。","全屏预览:{name}":"全屏预览:{name}",关闭预览:"关闭预览","按 Esc 或点击关闭按钮退出":"按 Esc 或点击关闭按钮退出","Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。":"Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。","五根柱状条交错升降,暗喻任务编排队列,节奏感强。":"五根柱状条交错升降,暗喻任务编排队列,节奏感强。","双层同心圆环反向旋转,精密工具质感,不浮夸。":"双层同心圆环反向旋转,精密工具质感,不浮夸。","终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。":"终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。","三点波浪脉动,极简克制,适合工具型产品的默认加载。":"三点波浪脉动,极简克制,适合工具型产品的默认加载。","三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。":"三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。","水平光束往复滑过进度条,线性进度隐喻,不阻断视线。":"水平光束往复滑过进度条,线性进度隐喻,不阻断视线。","三列骨架屏微闪,预示看板布局,减少布局跳变。":"三列骨架屏微闪,预示看板布局,减少布局跳变。","圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。":"圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。","Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。":"Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。",active:"活跃",working:"工作中"},en:{设置:"Settings",通用:"General",返回:"Back","加载中...":"Loading...",暂无选项:"No options","处理中...":"Processing...",确认:"Confirm",取消:"Cancel",工具调用:"Tool Calls",已处理:"Processed","已处理 {duration}":"Processed {duration}",正在思考:"Thinking","最后一次输出于 {duration}前":"Last output {duration} ago",等待首次输出:"Waiting for the first output","{count} 秒":"{count}s","{minutes} 分 {seconds} 秒":"{minutes}m {seconds}s","{hours} 小时 {minutes} 分":"{hours}h {minutes}m","失败 {count}":"Failed {count}",通用设置:"General Settings",显示语言:"Display Language","选择界面语言。设置会保存到本地 Agent Tower 数据库,并在重新打开后继续生效。":"Choose the interface language. The setting is saved to the local Agent Tower database and will still apply after restart.",简体中文:"Simplified Chinese",语言设置:"Language setting",语言设置保存失败:"Language setting could not be saved","Agent 配置":"Agent Settings",项目配置:"Project Settings",通知:"Notifications","MCP 配置":"MCP Config","复制下面的 JSON 到支持 MCP 的客户端配置中。桌面打包版使用 App 内置 runtime,不需要全局安装 agent-tower。":"Copy this JSON into an MCP-capable client config. The packaged desktop app uses the bundled runtime and does not require a global agent-tower install.",复制配置:"Copy Config","MCP 配置已复制":"MCP config copied","复制 MCP 配置失败":"Failed to copy MCP config","MCP 配置加载失败":"Failed to load MCP config","无需全局 CLI":"No global CLI needed","桌面打包 runtime":"Desktop packaged runtime","工作区 runtime":"Workspace runtime","当前版本只生成通用 MCP 配置,不会自动修改 Claude、Codex 或其他第三方客户端配置文件。":"This version only generates generic MCP config and does not modify Claude, Codex, or other third-party client config files automatically.","暂无项目,请先创建项目":"No projects yet. Create one first.",选择项目:"Select Project","选择项目...":"Select project...",自动复制文件:"Auto-copy Files","创建 worktree 时自动从主仓库复制的文件或目录。支持 glob 模式。":"Files or directories to copy from the main repository when creating a worktree. Glob patterns are supported.","适用于不在 git 管理中但启动必需的文件,如 .env、node_modules、数据库文件等":"Useful for required startup files that are not tracked by git, such as .env, node_modules, or database files.","Setup 脚本":"Setup Script","创建 worktree 后自动执行的命令,每行一条,按顺序执行。":"Commands to run automatically after creating the worktree, one per line in order.","命令在 worktree 目录下执行,单条命令超时 5 分钟,失败不会阻断后续命令":"Commands run inside the worktree directory. Each command times out after 5 minutes, and a failure does not block later commands.",常用命令:"Quick Commands","在终端中可快速执行的命令,不会自动运行。":"Commands that can be run quickly in the terminal. They are not executed automatically.","保存中...":"Saving...",保存:"Save",有未保存的更改:"You have unsaved changes",系统通知:"System Notifications",任务完成时弹出桌面通知:"Show a desktop notification when a task finishes.",第三方通知:"Third-party Notifications",选择一个第三方渠道接收通知:"Choose a third-party channel to receive notifications.",无:"None",飞书:"Feishu",测试发送:"Send Test",发送成功:"Sent successfully",发送失败:"Send failed","跳转地址(用于生成任务链接)":"Base URL (used to generate task links)",'通知卡片中的"查看任务"按钮将跳转到 {path}':'The "View Task" button in the notification card will open {path}',通知模板:"Notification Templates","支持变量: {taskTitle}, {taskId}, {projectId}, {projectName}, {status}":"Supported variables: {taskTitle}, {taskId}, {projectId}, {projectName}, {status}",标题模板:"Title Template",内容模板:"Body Template",'✅ "{taskTitle}" 已完成,等待审查':'✅ "{taskTitle}" is complete and ready for review',保存所有更改:"Save All Changes","启动失败: {message}":"Start failed: {message}",未知错误:"Unknown error",会话已停止:"Session stopped","Agent 交互演示":"Agent Interaction Demo","选择 Agent":"Select Agent","输入你的问题或任务...":"Enter your question or task...","启动中...":"Starting...",开始:"Start",对话:"Conversation",已连接:"Connected","连接中...":"Connecting...",未连接:"Disconnected",停止:"Stop","选择 Agent 并输入问题开始对话":"Select an agent and enter a prompt to start chatting.",你:"You","发送后续消息...":"Send a follow-up message...",发送:"Send",新会话:"New Session",未选择:"Not selected",连接:"Connection","Profiles 设置":"Profile Settings","配置变体 (Profile Variant)":"Profile Variant",输入任务:"Task Input","等待 Agent 响应...":"Waiting for agent output...","发送消息给 Agent...":"Send a message to the agent...","启动失败,请重试":"Failed to start. Please try again.",启动:"Start","创建工作空间...":"Creating workspace...","创建会话...":"Creating session...","启动 Agent...":"Starting agent...","启动 Agent":"Start Agent","选择 Provider":"Select Provider"," (不可用)":" (Unavailable)",任务描述:"Task Description","描述你想让 Agent 完成的任务...":"Describe the task you want the agent to complete...","输入文件路径...":"Enter a file path...",添加:"Add",添加此目录:"Add this directory",名称:"Name",命令:"Command",切换渠道:"Switch Provider","(默认)":"(Default)","留空为 auto;或直接输入模型 ID(与 cursor-agent --model 一致)":"Leave empty for auto, or enter a model ID directly (same as cursor-agent --model).","正在加载 cursor-agent 模型列表…":"Loading cursor-agent model list...",收起列表:"Collapse List","从本机 cursor-agent 选择({count} 个)":"Choose from local cursor-agent ({count})","筛选模型…":"Filter models...","默认 (auto)":"Default (auto)",无匹配项:"No matches",请求失败:"Request failed","无法从本机加载模型列表({error})。仍可手动输入;或在安装 cursor-agent 的机器上运行":"Could not load models from the local machine ({error}). You can still enter one manually, or run","查看 ID。":"to inspect available IDs.","Windows 将下载并执行官方 PowerShell 安装脚本;不会使用复制粘贴式 shell pipeline。":"Windows will download and run the official PowerShell installer script; no copy-paste shell pipeline is used.","安装器可能已完成,但当前 Agent Tower 进程尚未刷新 PATH;请重启 Agent Tower 后重新检测。":"The installer may have completed, but the current Agent Tower process has not refreshed PATH. Restart Agent Tower and detect again.","JSON 格式错误":"Invalid JSON format","删除 Profile Variant":"Delete Profile Variant","确定删除 {agentType} / {variant}?":"Delete {agentType} / {variant}?",新增:"New",内置:"Built-in","新增 Variant — {agentType}":"New Variant — {agentType}","编辑 {variant}":"Edit {variant}","Variant 名称":"Variant Name","例如: CUSTOM":"e.g. CUSTOM","配置 (JSON)":"Configuration (JSON)","状态变更失败,该操作不被允许":"Status change failed. This action is not allowed.","Git 操作":"Git Operations",删除任务:"Delete Task","Setup 完成":"Setup complete","Setup 失败: {error}":"Setup failed: {error}","尚未启动 Agent":"No agent started yet","选择一个 Agent 来执行此任务":"Choose an agent to execute this task.","选择一个 Agent 来执行此任务,Agent 将自动创建工作空间并开始工作。":"Choose an agent to execute this task. The agent will create a workspace automatically and start working.",回到底部:"Back to Bottom","代码已合并,以上为历史沟通记录":"The code has been merged. The conversation above is historical.","启动新 Agent":"Start New Agent","确认删除任务「{title}」?此操作不可撤销。":'Delete task "{title}"? This action cannot be undone.',删除:"Delete","正在运行的 Agent 将被停止":"The running agent will be stopped.",分支上未合并的变更将丢失:"Unmerged changes on the branch will be lost.","关联的工作目录(worktree)将被清理":"The associated worktree directory will be cleaned up.","{opLabel} 冲突 — {count} 个文件":"{opLabel} conflicts — {count} files",中止操作:"Abort Operation",解决冲突:"Resolve Conflicts","解决 {opLabel} 冲突":"Resolve {opLabel} Conflicts","在 IDE 中打开":"Open in IDE","发送中...":"Sending...","AI 辅助解决":"Resolve with AI","冲突文件({count})":"Conflicted Files ({count})","选择 Session(AI 辅助解决)":"Choose Session (Resolve with AI)","选择一个 Session...":"Select a session...","没有可用的 Session,请在 IDE 中手动解决冲突。":"No session is available. Please resolve the conflicts manually in your IDE.","TeamRun 模式下会把处理冲突请求发送到 Team Room,由团队调度处理。":"In TeamRun mode, the conflict request will be sent to Team Room for team scheduling.","已发送到 Team Room":"Sent to Team Room",快捷命令:"Quick Commands",待办:"Todos","上下文: {used} / {max} tokens":"Context: {used} / {max} tokens","已使用: {used} tokens":"Used: {used} tokens",可用:"Available",不可用:"Unavailable",该类型暂无运行配置:"No runtime configuration is available for this type.","追加 Prompt":"Append Prompt","追加到每次 prompt 末尾的文本":"Text appended to the end of every prompt.",跳过权限确认:"Skip Permission Confirmation","自动批准操作(YOLO)":"Auto-approve Actions (YOLO)",模型:"Model",推理强度:"Reasoning Effort",强制执行:"Force Execution",跳过所有确认和沙盒:"Skip All Confirmations and Sandbox",Profile:"Profile","~/.codex/config.toml 中的 profile 名称":"Profile name in ~/.codex/config.toml",是:"Yes",否:"No",覆盖:"Overwrite",跳过:"Skip","JSON 语法错误":"Invalid JSON syntax","TOML 语法错误: {message}":"Invalid TOML syntax: {message}","编辑 Provider":"Edit Provider","新建 Provider":"New Provider","例如: Claude Code (官方)":"e.g. Claude Code (Official)","Agent 类型":"Agent Type","选择 Agent 类型":"Select Agent Type","Codex (ACP)":"Codex (ACP)","设为该类型的默认 Provider":"Set as the default provider for this agent type",基本配置:"Basic Configuration","API 地址":"API URL","请输入以 http:// 或 https:// 开头的完整 API 地址":"Enter a complete API URL beginning with http:// or https://.","输入 API Key":"Enter API Key",未配置:"Not configured",由高级配置管理:"Managed in advanced configuration",替换:"Replace",取消替换:"Cancel replacement","确定清除此 API Key?":"Clear this API key?",思考强度:"Reasoning Effort","跟随 CLI":"Use CLI default",更高效:"More efficient",更智能:"More capable",当前:"Current",最低:"Minimal",低:"Low",中:"Medium",高:"High",超高:"Extra high",最高:"Maximum","请选择当前 Agent 支持的思考强度档位":"Choose a reasoning effort supported by this agent.",测试配置:"Test Configuration","测试中...":"Testing...","保存 Provider":"Save Provider",高级配置:"Advanced Configuration",执行权限:"Execution Permission","禁用 WebSocket":"Disable WebSocket","仅禁用 Codex Responses API 的 WebSocket 传输;新启动和后续继续的请求将使用 HTTP。":"Disable only the Codex Responses API WebSocket transport. New sessions and follow-ups will use HTTP.","当前原生 Provider 已使用非 WebSocket 传输;此开关不会添加额外运行时覆盖。":"The current native provider already uses a non-WebSocket transport. This switch adds no runtime override.","禁用 WebSocket 字段必须为 true 或 false,请在运行配置 JSON 中修正。":"The Disable WebSocket field must be true or false. Correct it in the runtime JSON.",高风险执行已开启:"High-risk execution enabled","Agent 将不再请求工具执行权限确认。":"The agent will no longer ask for tool execution permission.","Agent 将自动批准操作,不再逐项请求确认。":"The agent will approve operations automatically without asking for each action.","Agent 将以强制模式执行操作。":"The agent will execute operations in force mode.","Agent 将跳过确认并禁用沙盒保护。":"The agent will skip confirmations and disable sandbox protection.","执行权限字段必须为 true 或 false,请在运行配置 JSON 中修正。":"The execution permission field must be true or false. Correct it in the runtime JSON.","开启高风险执行权限?":"Enable high-risk execution permission?",确认开启:"Enable","配置错误:权限字段必须为布尔值":"Configuration error: the permission field must be a boolean.",配置错误:"Configuration error",权限已开启:"Enabled",权限已关闭:"Disabled","运行配置 (JSON)":"Runtime Configuration (JSON)",配置检查通过:"Configuration check passed",连接测试通过:"Connection test passed",本机可用性检查通过:"Local availability check passed",配置检查未通过:"Configuration check did not pass",测试对象:"Test target",测试时间:"Tested at",需要解决配置冲突:"Configuration conflicts must be resolved",简化字段与高级配置值不同:"The simplified and advanced values differ",采用简化值:"Use simplified value",保留高级值:"Keep advanced value","测试失败不会阻止保存。":"A failed test does not prevent saving.",测试配置失败:"Configuration test failed","存在未保存的修改,确定放弃吗?":"Discard the unsaved changes?","切换 Agent 类型会清空当前类型的配置,是否继续?":"Changing the agent type clears the current type-specific configuration. Continue?","JSON 顶层必须是对象":"The top-level JSON value must be an object.","{format} 语法错误: {message}":"Invalid {format} syntax: {message}","已配置,输入新值以替换":"Configured. Enter a new value to replace it.",权限策略:"Permission Policy",每次询问:"Ask Every Time",自动批准:"Auto Approve","ACP 权限策略必须为 ASK 或 AUTO_APPROVE":"ACP permission policy must be ASK or AUTO_APPROVE",运行配置:"Runtime Configuration",环境变量:"Environment Variables","注入到 Agent 进程的环境变量。Codex 的":"Environment variables injected into the agent process. Codex","指定的是变量名,实际值需在此处设置。":"specifies the variable name in env_key, and the actual value must be set here.","变量名,如 AZURE_OPENAI_API_KEY":"Variable name, e.g. AZURE_OPENAI_API_KEY",值:"Value",添加变量:"Add Variable","CLI 原生配置 (config.toml)":"Native CLI Config (config.toml)","CLI 原生配置 (settings.json)":"Native CLI Config (settings.json)","Agent 原生配置 (config.toml)":"Native Agent Config (config.toml)","Agent 原生配置 (settings.json)":"Native Agent Config (settings.json)","直接填写 Codex":"Enter a Codex","格式的配置片段,由当前 Runtime 注入。不会修改你的":"configuration snippet. The selected runtime injects it without modifying your","格式的配置片段,通过":"configuration snippet directly and inject it via","参数注入。不会修改你的":". It will not modify your","文件。":"file.","对应 Claude Code 的":"This corresponds to Claude Code","由当前 Runtime 注入。在":". The selected runtime injects it. Configure",通过:"and is injected through","参数注入。在":". Configure","中设置 ANTHROPIC_API_KEY、ANTHROPIC_BASE_URL 等。":"inside env, such as ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL.","导出 Provider 备份":"Export Provider Backup","导出中...":"Exporting...",导出备份:"Export Backup","导出的备份文件将包含完整的 Provider 配置,包括环境变量、CLI settings 等敏感信息。任何拿到文件的人都可能直接使用这些 Provider。":"The exported backup file contains the full provider configuration, including sensitive information such as environment variables and CLI settings. Anyone with this file may be able to use those providers directly.","这个功能用于备份和迁移,不用于分享配置。":"This feature is for backup and migration, not for sharing configuration.","导出内容只包含用户层配置:自定义 Provider,以及对内置 Provider 的覆盖。":"The export only contains user-level configuration: custom providers and overrides of built-in providers.","我已知晓该备份文件包含敏感信息,只会保存在安全位置。":"I understand that this backup contains sensitive information and will only store it in a secure location.","导入 Provider 备份":"Import Provider Backup","导入中...":"Importing...","确认导入 {count} 项":"Import {count} item(s)","导出时间:{value}":"Exported at: {value}","模式:完整备份(含敏感信息)":"Mode: Full backup (contains sensitive data)","文件内 Provider 数量:{count}":"Providers in file: {count}","将覆盖当前已有的 Provider:{name}":"This will overwrite the existing provider: {name}","当前同 ID Provider 配置一致,本次不会重复写入。":"The provider with the same ID is already identical. It will not be written again.","当前不存在同 ID Provider,将直接新增。":"No provider with the same ID exists. It will be created directly.","系统内置 Provider 不可删除":"Built-in providers cannot be deleted.","已恢复默认 Provider 配置":"Default provider configuration restored.","Provider 已删除":"Provider deleted.","删除 Provider 失败":"Failed to delete provider.","Provider 备份已导出":"Provider backup exported.","导出 Provider 备份失败":"Failed to export provider backup.","备份文件不是有效的 JSON":"The backup file is not valid JSON.",导入预览失败:"Failed to preview import.","导入完成,当前配置无需变更":"Import complete. No changes were needed.","导入完成:新增 {create},覆盖 {overwrite},跳过 {skip}":"Import complete: created {create}, overwritten {overwrite}, skipped {skip}","导入 Provider 备份失败":"Failed to import provider backup.","Provider 配置":"Provider Configuration","管理 AI Agent 的连接配置和运行参数":"Manage AI agent connection settings and runtime parameters.",导入备份:"Import Backup","暂无 Provider 配置":"No providers configured yet.",默认:"Default","CLI 配置:":"CLI Config:",已配置:"Configured","环境变量:":"Environment Variables:",编辑:"Edit",删除自定义覆盖并恢复默认:"Delete custom override and restore default","恢复默认 Provider":"Restore Default Provider",'确定删除 "{name}" 的自定义覆盖,并恢复系统默认配置?':'Delete the custom override for "{name}" and restore the system default configuration?','确定删除 "{name}"?此操作不可撤销。':'Delete "{name}"? This action cannot be undone.',恢复默认:"Restore Default","{count} 个未提交变更":"{count} uncommitted changes","{count} 个冲突文件":"{count} conflicted files",变基进行中:"Rebase in progress",合并进行中:"Merge in progress","领先 {count} 个提交":"{count} commits ahead","落后 {count} 个提交":"{count} commits behind",已是最新:"Up to date","工作区有未提交的变更,请先让 Agent 提交或手动处理后再执行 Rebase / Merge 操作。":"The workspace has uncommitted changes. Ask the agent to commit them or handle them manually before running Rebase / Merge.",变基失败:"Rebase failed",合并失败:"Merge failed",确认合并:"Confirm Merge","加载分支状态...":"Loading branch status...","变基中...":"Rebasing...","变基 (Rebase)":"Rebase","将当前分支变基到最新的 {targetBranch}":"Rebase the current branch onto the latest {targetBranch}","合并 (Merge)":"Merge","合并中...":"Merging...","Squash merge 到 {targetBranch}":"Squash merge into {targetBranch}",提交消息:"Commit Message","输入提交消息...":"Enter commit message...",留空将使用默认消息:"Leave blank to use the default message.","Git Commit Message":"Git Commit Message","配置自动生成 commit message 时使用的 Agent 渠道和提示词。":"Configure the agent provider and prompt used for auto-generating commit messages.",访问安全:"Access Security",访问密码:"Access Password","开启后,进入 Agent Tower 需要输入密码。":"When enabled, Agent Tower requires this password before opening.",未启用:"Off",已启用:"On",将启用:"Will turn on",将关闭:"Will turn off",修改密码:"Change password",退出登录:"Log out","退出中...":"Logging out...",退出登录失败:"Failed to log out",已退出登录:"Logged out",当前密码:"Current password",新密码:"New password",确认密码:"Confirm password",请输入当前密码:"Enter the current password","密码至少需要 8 个字符":"Password must be at least 8 characters",两次输入不一致:"Passwords do not match",当前密码不正确:"Current password is incorrect","关闭后不再要求访问密码。":"After turning it off, Agent Tower will no longer require an access password.","保存后其他已登录页面需要重新输入。":"After saving, other signed-in pages will need to enter the password again.",关闭访问密码:"Turn off access password",已关闭:"Turned off","密码不正确,请重试":"Incorrect password. Please try again.",输入访问密码继续:"Enter the access password to continue","验证中...":"Verifying...",解锁:"Unlock","访问状态加载失败,请刷新后重试。":"Failed to load access status. Refresh and try again.","Agent 渠道":"Agent Provider",跟随任务:"Follow Task",'"跟随任务"表示使用当前任务所用的 Agent 渠道。选择具体渠道可使用更经济的模型。':'"Follow Task" uses the same provider as the current task. Select a specific provider to use a more cost-effective model.',提示词模板:"Prompt Template","自定义生成 commit message 的提示词。留空则使用内置默认模板。":"Custom prompt for generating commit messages. Leave empty to use the built-in default template.",保存失败:"Save failed",已保存:"Saved",已创建:"Created",创建:"Create",单人:"Solo",团队:"Team",团队协作:"Team Collaboration",团队协作设置:"Team Collaboration Settings","管理成员预设与团队模板。":"Manage member presets and team templates.",成员预设:"Member Presets",团队模板:"Team Templates","点击列表项可编辑。":"Click an item to edit it.",当前没有成员预设:"No member presets yet.",当前没有团队模板:"No team templates yet.",创建新成员预设:"Create a new member preset",编辑成员预设:"Edit member preset",创建新团队模板:"Create a new team template",编辑团队模板:"Edit team template",成员预设名称:"Member preset name",成员预设别名:"Member preset aliases",成员预设头像:"Member preset avatar",成员预设角色提示词:"Member preset role prompt",团队模板名称:"Team template name",别名:"Aliases",头像:"Avatar",角色提示词:"Role Prompt",可用能力:"Capabilities",工作区策略:"Workspace Policy",触发策略:"Trigger Policy",共享:"Shared",独占:"Dedicated",仅提及:"Mention only",所有用户消息:"All user messages",读房间:"Read room",发房间消息:"Post room message",提及成员:"Mention members",停止成员工作:"Stop member work",标记可审查:"Mark ready for review",读文件:"Read files",写文件:"Write files",运行命令:"Run commands","读 diff":"Read diff",合并工作区:"Merge workspace","{count} 个成员":"{count} member(s)","Provider 列表加载失败":"Failed to load providers","Provider 列表加载失败,无法创建或修改成员预设。":"Failed to load providers. Member presets cannot be created or updated.",成员预设加载失败:"Failed to load member presets",团队模板加载失败:"Failed to load team templates","请稍后重试。":"Please try again later.",重试:"Retry","暂无可用 Provider,请先在 Agent 配置中创建。":"No available provider. Create one in Agent Settings first.","alice, a, reviewer":"alice, a, reviewer","选择顺序即保存顺序。":"Selection order is the saved order.",已选成员:"Selected Members","上移下移后即为保存顺序。":"Use up/down to change the saved order.",尚未选择成员预设:"No member presets selected yet.","先创建成员预设,再配置团队模板。":"Create member presets first, then configure a team template.",删除失败:"Delete failed",上移:"Move up",下移:"Move down","创建 TeamRun":"Create TeamRun",TeamRun:"TeamRun",模式:"Mode",执行模式:"Execution mode","TeamRun 模式":"TeamRun mode",确认模式:"Confirm mode",自动模式:"Auto mode","默认使用自动模式,团队消息会直接排队执行。":"Auto mode is the default. Team messages are queued for execution directly.","模板成员会先加入,随后按顺序追加所选成员。":"Template members are added first, then the selected members are appended in order.","请选择至少一个团队模板或成员预设。":"Select at least one team template or member preset.","该任务已经存在 TeamRun。请刷新后再试。":"This task already has a TeamRun. Refresh and try again.","创建 TeamRun 失败":"Failed to create TeamRun","TeamRun 创建失败,请检查团队配置后重试":"TeamRun creation failed. Please check team config and retry.","前往 /settings/team 创建":"Go to /settings/team to create one","欢迎使用 Agent Tower":"Welcome to Agent Tower","需要我帮你做点什么?":"What can I help you with?","描述任务,选择 Agent 或团队,即刻开始":"Describe a task, pick an Agent or team, and start right away","描述一个任务,AI Agent 将为你开始工作":"Describe a task and an AI agent will start working on it.","TeamRun 协作配置":"TeamRun Configuration",团队协作配置:"Team Collaboration Config","切换回单 Agent":"Switch to Solo Agent",追加成员:"Additional Members","{count} 个追加成员":"{count} additional member(s)",去创建:"Create",请选择团队模板或追加成员:"Select a team template or add members","工作树隔离改动,支持 TeamRun、Merge、Rebase 和冲突解决。":"Worktrees isolate changes and support TeamRun, Merge, Rebase, and conflict resolution.","初始化 Git 后可使用工作树模式。":"Initialize Git to use worktree mode.","本地模式会直接修改项目主目录,不会自动提交,也不能使用 Merge、Rebase 或冲突解决。":"Main directory mode modifies the project directory directly. Auto-commit, Merge, Rebase, and conflict resolution are unavailable.","非 Git 项目只能使用本地模式。":"Non-Git projects can only use main directory mode.","TeamRun 需要工作树模式。开启团队模式时会自动切换为工作树模式。":"TeamRun requires worktree mode. Enabling team mode will switch to worktree mode automatically.","启用 TeamRun 后可选择团队模板或成员。":"After enabling TeamRun, choose a team template or members.",收起:"Collapse","没有可用项目,请先创建或恢复项目":"No available projects. Please create or restore a project first.","任务已创建,但启动 Agent 失败,可在详情中重试":"Task created, but failed to start Agent. You can retry from the task detail.",冲突:"Conflict",变基中:"Rebasing",合并中:"Merging","{count} 未提交":"{count} uncommitted","落后 {count}":"Behind {count}",可合并:"Mergeable",查看变更详情:"View changes","分支落后 {count} 个提交,建议先执行变基 (Rebase) 同步最新代码。":"The branch is {count} commits behind. Consider rebasing to sync the latest code.","合并到 {target}":"Merge into {target}",需要先变基同步最新代码:"Rebase required to sync latest code",请先处理未提交变更:"Handle uncommitted changes first","中止中...":"Aborting...","正在检查工作区状态...":"Checking workspace status...",当前分支还没有任何变更:"No changes on this branch yet",调整工作区宽度:"Resize workspace panel","{files} 个文件 · {lines} 行":"{files} files · {lines} lines",更新:"Update",合并:"Merge","{count} 个本地改动未处理,需要先整理后再继续":"{count} local changes pending — clean them up before continuing","{count} 个文件存在冲突,需要处理后继续":"{count} files have conflicts — resolve them to continue","正在同步源分支更新...":"Syncing updates from source branch...","正在提交变更...":"Submitting changes...","源分支 {branch} 有 {count} 个更新":"Source branch {branch} has {count} updates","{count} 个文件变更,可以安全提交":"{count} file changes, safe to submit",同步更新:"Sync updates","正在同步...":"Syncing...",提交变更:"Submit changes",需要先同步源分支更新:"Sync source branch updates first","更新失败,请稍后重试":"Update failed. Please try again later.","提交失败,请稍后重试":"Submit failed. Please try again later.","正在提交...":"Submitting...",确认提交:"Confirm Submit",请描述本次修改的内容:"Describe the changes in this submission","建议以 feat、fix、docs、refactor、chore 开头,保持提交记录清晰。feat 新增功能,fix 修复问题,docs 文档更新,refactor 代码重构,chore 日常维护。":"Start with feat (new feature), fix (bug fix), docs (documentation), refactor (restructure), or chore (maintenance) to keep the history clean.",需要先处理本地改动:"Handle local changes first",处理冲突:"Resolve conflicts","正在撤销...":"Undoing...",撤销操作:"Undo operation",确认后会停止当前工作并取消队列:"Confirming will stop the current work and clear the queue",每次新会话:"New session per request",复用上次会话:"Resume last session",仅自己队列:"Own queue only",全队列待处理:"Team pending queue",代码审查:"Review","{count} 个文件":"{count} files",未选择工作区:"No workspace selected",没有可显示的差异内容:"No diff content available","还有 {count} 行变更被折叠,点击展开全部":"{count} more lines collapsed — click to expand all","正在加载差异...":"Loading diff...",差异加载失败:"Failed to load diff",变更加载失败:"Failed to load changes",没有匹配筛选条件的文件:"No files match the filter",该提交没有文件变更:"No file changes in this commit",没有待审查的变更:"No changes to review",未提交:"Uncommitted",已提交:"Committed","筛选文件...":"Filter files...",无匹配文件:"No matching files",暂无变更文件:"No changed files",提交记录:"Commits",全部变更:"All changes","正在加载提交记录...":"Loading commits...",暂无提交记录:"No commits yet",加载更多提交:"Load more commits","{count} 个成员预设":"{count} member preset(s)","{count} 个团队模板":"{count} team template(s)",本地模式:"Main directory mode",编辑模板:"Edit template",编辑预设:"Edit preset",标题:"Title",测试:"Test",测试消息发送成功:"Test message sent successfully",触发:"Trigger","创建 Provider 失败":"Failed to create provider","创建 worktree 后自动执行的命令,每行一条。在 worktree 目录下执行,单条超时 5 分钟。":"Commands to run automatically after creating a worktree, one per line. Commands run inside the worktree directory and time out after 5 minutes each.","创建 worktree 时自动从主仓库复制的文件或目录,适用于 .env、node_modules 等不在 git 管理中的文件。支持 glob。":"Files or directories to copy from the main repository when creating a worktree, such as .env or node_modules files not tracked by git. Glob patterns are supported.",创建新模板:"Create new template",创建新预设:"Create new preset",当前没有可配置的项目:"No configurable projects yet",导出:"Export",导入:"Import",队列:"Queue","发送失败,请检查 Webhook 地址":"Failed to send. Check the webhook URL.","发送失败: {message}":"Send failed: {message}",返回列表:"Back to list","飞书 Webhook":"Feishu Webhook",'该 Provider 未配置额外参数。点击"编辑"添加运行配置、环境变量或 CLI 配置。':'This provider has no extra parameters configured. Click "Edit" to add runtime configuration, environment variables, or CLI configuration.','该 Provider 未配置额外参数。点击"编辑"添加运行配置、环境变量或 Agent 原生配置。':'This provider has no extra parameters configured. Click "Edit" to add runtime configuration, environment variables, or native agent configuration.',个变体:"variants",个文件:"files","更新 Provider 失败":"Failed to update provider",工作区:"Workspace",工作树模式:"Worktree mode","勾选后会连项目文件一起删除,请谨慎选择。":"When checked, project files will also be deleted. Choose carefully.","勾选后会删除 repoPath 指向的本地仓库目录,并禁用代码/Git 相关能力。":"When checked, the local repository directory pointed to by repoPath will be deleted, and code/Git capabilities will be disabled.","勾选后会删除项目路径指向的本地目录,并禁用代码/Git 相关能力。":"When checked, the local directory at the project path will be deleted, and code/Git capabilities will be disabled.",关闭:"Off","管理 Agent 执行器的配置变体。每个变体定义一组运行参数。":"Manage configuration variants for agent executors. Each variant defines a set of runtime parameters.","合并到 {targetBranch}":"Merge into {targetBranch}","恢复该项目时需要重新绑定一个有效的 Git 仓库路径。":"Restoring this project requires rebinding a valid Git repository path.","恢复该项目时需要重新绑定一个有效的项目路径。":"Restoring this project requires rebinding a valid project path.","恢复后,项目会重新出现在默认项目列表中。":"After restore, the project will appear in the default project list again.",恢复项目:"Restore project",会话:"Session",加载失败:"Failed to load","将归档当前工作区并自动在新 Worktree 中重新启动 Agent,旧工作区内容保留供参考。":"The current workspace will be archived and the agent will restart automatically in a new worktree. The old workspace content is kept for reference.","界面语言会保存到本地数据库,重启后继续生效。":"The interface language is saved to the local database and remains active after restart.","仅支持 PNG、JPG、WebP 头像。":"Only PNG, JPG, and WebP avatars are supported.",可用预设:"Available presets",模板名称:"Template name","成员心跳检测时间(分钟)":"Member heartbeat timeout (minutes)",内容:"Content",能力:"capabilities","启动 Agent 失败":"Failed to start Agent",启用团队模式:"Enable team mode",清除:"Clear",确认重试:"Confirm retry",人:" members",任务完成时弹出系统通知:"Show a system notification when a task finishes.","删除 Provider":"Delete Provider",删除任务失败:"Failed to delete task",删除项目:"Delete project",上传:"Upload",尚未选择:"Nothing selected yet",跳转地址:"Link target",'通知卡片中的"查看任务"按钮跳转地址前缀':'URL prefix for the "View Task" button in notification cards',通知设置:"Notification Settings",同时删除本地项目文件:"Also delete local project files",头像上传失败:"Avatar upload failed","头像图片不能超过 2MB。":"Avatar image must be 2 MB or smaller.",头像已上传:"Avatar uploaded",团队模式:"Team mode","推送到外部渠道(飞书群机器人等)":"Push to external channels such as Feishu bot webhooks.",我已确认这会删除本地项目文件:"I understand this will delete local project files",先创建成员预设:"Create member presets first","项目「{title}」的本地仓库文件已删除。恢复前需要重新绑定一个有效的 Git 仓库路径。":'Local repository files for project "{title}" have been deleted. Rebind a valid Git repository path before restoring it.',"项目「{title}」的本地项目文件已删除。恢复前需要重新绑定一个有效的项目路径。":'Local project files for project "{title}" have been deleted. Rebind a valid project path before restoring it.',"项目「{title}」将从默认项目列表隐藏,但历史任务、workspace 和会话记录仍会保留。":'Project "{title}" will be hidden from the default project list, but historical tasks, workspaces, and sessions will be kept.',"项目将从默认列表隐藏,历史记录保留。可选同时删除本地文件。":"The project will be hidden from the default list while history is kept. You can also delete local files.",项目为只读历史:"Project is read-only history",项目已恢复:"Project restored",项目已删除:"Project deleted","项目已删除,本地仓库文件也已清理。恢复项目并重新绑定仓库后才能继续操作。":"The project was deleted and local repository files were removed. Restore the project and rebind a repository before continuing.","项目已删除,并清理了本地文件":"Project deleted and local files removed","项目已删除。恢复项目后才能继续创建会话或修改任务。":"The project was deleted. Restore it before creating sessions or editing tasks.","项目已删除。Workspace 以只读模式展示历史内容。":"The project was deleted. The workspace shows historical content in read-only mode.","项目已删除且本地仓库文件已清理。这里只保留历史视图。":"The project was deleted and local repository files were removed. Only the historical view remains here.",新建:"New",新建配置:"New configuration",新增模板:"New template",新增预设:"New preset",选择:"Select","选择 {name} 头像":"Select {name} avatar","选择...":"Select...","选择一个 Provider 查看详情":"Select a provider to view details",选择一个项目查看配置:"Select a project to view configuration",选择预设头像:"Select preset avatar",已删除:"Deleted",源码已删除:"Source deleted","暂无 Agent 配置":"No agent configuration yet","暂无 Profile 配置":"No profile configuration yet",暂无变体:"No variants yet",暂无成员预设:"No member presets yet",暂无团队模板:"No team templates yet","重试启动 Agent":"Retry starting Agent",重新开始:"Restart",重新开始任务:"Restart task",追加独立成员:"Add standalone members",桌面通知:"Desktop notifications","Agent 将直接修改项目主目录;不会自动提交,也不能使用 Merge、Rebase 或冲突解决流程。":"The agent will modify the project main directory directly. Auto-commit, Merge, Rebase, and conflict resolution flows are unavailable.","Agent Tower 会尽量校验仓库 identity;如果 remote URL 或目录名不同,会给出警告但允许继续。":"Agent Tower will try to verify repository identity. If the remote URL or directory name differs, it will show a warning but still allow restore.","Agent Tower 会尽量校验项目 identity;如果 remote URL 或目录名不同,会给出警告但允许继续。":"Agent Tower will try to verify project identity. If the remote URL or directory name differs, it will show a warning but still allow restore.","CLI 配置":"CLI Config","Agent 原生配置":"Native Agent Config","Profile 配置":"Profile Configuration","Provider 列表加载失败。":"Failed to load provider list.","10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果":"10 first-screen loading animation candidates. Colors follow the Agent Tower design system. Click a card to view it fullscreen.",设计推荐:"Design recommendation","首选:Charcoal Breathe (#10)":"Top choice: Charcoal Breathe (#10)","备选A:Tower Pulse (#1)":"Alternative A: Tower Pulse (#1)","备选B:Terminal Cursor (#4)":"Alternative B: Terminal Cursor (#4)","品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。":"Strongest brand presence: a breathing Charcoal block with the Tower icon, making the product brand the first impression.","品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。":"The brand icon appears directly with a steady pulse. It stays restrained and fits a workspace product.","终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。":"A blinking terminal cursor matches the core agent and terminal collaboration flow and feels familiar to developers.","全屏预览:{name}":"Fullscreen preview: {name}",关闭预览:"Close preview","按 Esc 或点击关闭按钮退出":"Press Esc or click the close button to exit","Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。":'Agent Tower brand icon with a pulsing dot, conveying a branded "system is getting ready" state.',"五根柱状条交错升降,暗喻任务编排队列,节奏感强。":"Five bars rise in sequence, suggesting an orchestration queue with a strong rhythm.","双层同心圆环反向旋转,精密工具质感,不浮夸。":"Two concentric rings rotate in opposite directions for a precise tool feel without excess.","终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。":"A terminal-style cursor blink that directly echoes Agent Tower terminal collaboration.","三点波浪脉动,极简克制,适合工具型产品的默认加载。":"A minimal three-dot wave, restrained enough for a default loading state in a tool product.","三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。":"Three cards float subtly, suggesting stacked kanban pages and task management.","水平光束往复滑过进度条,线性进度隐喻,不阻断视线。":"A horizontal beam sweeps across a progress bar, implying linear progress without distraction.","三列骨架屏微闪,预示看板布局,减少布局跳变。":"Three shimmering skeleton columns preview the kanban layout and reduce layout shift.","圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。":"A ring progress arc and breathing center diamond combine progress feedback with a brand mark.","Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。":"A breathing Charcoal rounded block with the Tower icon embedded, giving the strongest brand presence.","正在加载...":"Loading..."}},gv=S.createContext(null),yv="agent-tower.locale";function vv(n){return n?n==="en"?"en":n==="zh-CN"?"zh-CN":null:null}function dT(){if(typeof window>"u")return null;try{return vv(window.localStorage.getItem(yv))}catch{return null}}function hT(n){if(!(typeof window>"u"))try{window.localStorage.setItem(yv,n)}catch{}}function mT(){return typeof navigator>"u"||navigator.language.toLowerCase().startsWith("zh")?"zh-CN":"en"}function bv(){return dT()??mT()}function pT(n,a){if(!a)return n;let r=n;for(const[l,c]of Object.entries(a))r=r.replaceAll(`{${l}}`,String(c??""));return r}let Mf=bv();function xv(n,a,r){const l=fT[n]?.[a]??a;return pT(l,r)}function Yi(n,a){return xv(Mf,n,a)}function gT({children:n}){const a=S.useRef(bv()),[r,l]=S.useState(a.current),{data:c}=uT(),f=cT(),d=S.useRef(!1),m=S.useCallback(x=>{Mf=x,l(x),document.documentElement.lang=x,hT(x)},[]);S.useEffect(()=>{const x=vv(c?.locale)??a.current;m(x),c&&c.locale===null&&!d.current&&(d.current=!0,f.mutate({locale:x}))},[c,m,f]);const g=S.useCallback(x=>{const y=Mf;m(x),f.mutate({locale:x},{onError:()=>{m(y),Ur.error(Yi("语言设置保存失败"))}})},[m,f]),p=S.useMemo(()=>({locale:r,setLocale:g,t:(x,y)=>xv(r,x,y)}),[r,g]);return v.jsx(gv.Provider,{value:p,children:n})}function xi(){const n=S.useContext(gv);if(!n)throw new Error("useI18n must be used within I18nProvider");return n}function Sv(n){var a,r,l="";if(typeof n=="string"||typeof n=="number")l+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(a=0;a<c;a++)n[a]&&(r=Sv(n[a]))&&(l&&(l+=" "),l+=r)}else for(r in n)n[r]&&(l&&(l+=" "),l+=r);return l}function wv(){for(var n,a,r=0,l="",c=arguments.length;r<c;r++)(n=arguments[r])&&(a=Sv(n))&&(l&&(l+=" "),l+=a);return l}const yT=(n,a)=>{const r=new Array(n.length+a.length);for(let l=0;l<n.length;l++)r[l]=n[l];for(let l=0;l<a.length;l++)r[n.length+l]=a[l];return r},vT=(n,a)=>({classGroupId:n,validator:a}),Ev=(n=new Map,a=null,r)=>({nextPart:n,validators:a,classGroupId:r}),Go="-",Jg=[],bT="arbitrary..",xT=n=>{const a=wT(n),{conflictingClassGroups:r,conflictingClassGroupModifiers:l}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return ST(d);const m=d.split(Go),g=m[0]===""&&m.length>1?1:0;return Tv(m,g,a)},getConflictingClassGroupIds:(d,m)=>{if(m){const g=l[d],p=r[d];return g?p?yT(p,g):g:p||Jg}return r[d]||Jg}}},Tv=(n,a,r)=>{if(n.length-a===0)return r.classGroupId;const c=n[a],f=r.nextPart.get(c);if(f){const p=Tv(n,a+1,f);if(p)return p}const d=r.validators;if(d===null)return;const m=a===0?n.join(Go):n.slice(a).join(Go),g=d.length;for(let p=0;p<g;p++){const x=d[p];if(x.validator(m))return x.classGroupId}},ST=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=n.slice(1,-1),r=a.indexOf(":"),l=a.slice(0,r);return l?bT+l:void 0})(),wT=n=>{const{theme:a,classGroups:r}=n;return ET(r,a)},ET=(n,a)=>{const r=Ev();for(const l in n){const c=n[l];sd(c,r,l,a)}return r},sd=(n,a,r,l)=>{const c=n.length;for(let f=0;f<c;f++){const d=n[f];TT(d,a,r,l)}},TT=(n,a,r,l)=>{if(typeof n=="string"){AT(n,a,r);return}if(typeof n=="function"){CT(n,a,r,l);return}RT(n,a,r,l)},AT=(n,a,r)=>{const l=n===""?a:Av(a,n);l.classGroupId=r},CT=(n,a,r,l)=>{if(_T(n)){sd(n(l),a,r,l);return}a.validators===null&&(a.validators=[]),a.validators.push(vT(r,n))},RT=(n,a,r,l)=>{const c=Object.entries(n),f=c.length;for(let d=0;d<f;d++){const[m,g]=c[d];sd(g,Av(a,m),r,l)}},Av=(n,a)=>{let r=n;const l=a.split(Go),c=l.length;for(let f=0;f<c;f++){const d=l[f];let m=r.nextPart.get(d);m||(m=Ev(),r.nextPart.set(d,m)),r=m}return r},_T=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,kT=n=>{if(n<1)return{get:()=>{},set:()=>{}};let a=0,r=Object.create(null),l=Object.create(null);const c=(f,d)=>{r[f]=d,a++,a>n&&(a=0,l=r,r=Object.create(null))};return{get(f){let d=r[f];if(d!==void 0)return d;if((d=l[f])!==void 0)return c(f,d),d},set(f,d){f in r?r[f]=d:c(f,d)}}},Df="!",$g=":",NT=[],Wg=(n,a,r,l,c)=>({modifiers:n,hasImportantModifier:a,baseClassName:r,maybePostfixModifierPosition:l,isExternal:c}),OT=n=>{const{prefix:a,experimentalParseClassName:r}=n;let l=c=>{const f=[];let d=0,m=0,g=0,p;const x=c.length;for(let B=0;B<x;B++){const P=c[B];if(d===0&&m===0){if(P===$g){f.push(c.slice(g,B)),g=B+1;continue}if(P==="/"){p=B;continue}}P==="["?d++:P==="]"?d--:P==="("?m++:P===")"&&m--}const y=f.length===0?c:c.slice(g);let T=y,N=!1;y.endsWith(Df)?(T=y.slice(0,-1),N=!0):y.startsWith(Df)&&(T=y.slice(1),N=!0);const L=p&&p>g?p-g:void 0;return Wg(f,N,T,L)};if(a){const c=a+$g,f=l;l=d=>d.startsWith(c)?f(d.slice(c.length)):Wg(NT,!1,d,void 0,!0)}if(r){const c=l;l=f=>r({className:f,parseClassName:c})}return l},MT=n=>{const a=new Map;return n.orderSensitiveModifiers.forEach((r,l)=>{a.set(r,1e6+l)}),r=>{const l=[];let c=[];for(let f=0;f<r.length;f++){const d=r[f],m=d[0]==="[",g=a.has(d);m||g?(c.length>0&&(c.sort(),l.push(...c),c=[]),l.push(d)):c.push(d)}return c.length>0&&(c.sort(),l.push(...c)),l}},DT=n=>({cache:kT(n.cacheSize),parseClassName:OT(n),sortModifiers:MT(n),...xT(n)}),jT=/\s+/,zT=(n,a)=>{const{parseClassName:r,getClassGroupId:l,getConflictingClassGroupIds:c,sortModifiers:f}=a,d=[],m=n.trim().split(jT);let g="";for(let p=m.length-1;p>=0;p-=1){const x=m[p],{isExternal:y,modifiers:T,hasImportantModifier:N,baseClassName:L,maybePostfixModifierPosition:B}=r(x);if(y){g=x+(g.length>0?" "+g:g);continue}let P=!!B,K=l(P?L.substring(0,B):L);if(!K){if(!P){g=x+(g.length>0?" "+g:g);continue}if(K=l(L),!K){g=x+(g.length>0?" "+g:g);continue}P=!1}const Y=T.length===0?"":T.length===1?T[0]:f(T).join(":"),W=N?Y+Df:Y,he=W+K;if(d.indexOf(he)>-1)continue;d.push(he);const de=c(K,P);for(let fe=0;fe<de.length;++fe){const R=de[fe];d.push(W+R)}g=x+(g.length>0?" "+g:g)}return g},LT=(...n)=>{let a=0,r,l,c="";for(;a<n.length;)(r=n[a++])&&(l=Cv(r))&&(c&&(c+=" "),c+=l);return c},Cv=n=>{if(typeof n=="string")return n;let a,r="";for(let l=0;l<n.length;l++)n[l]&&(a=Cv(n[l]))&&(r&&(r+=" "),r+=a);return r},UT=(n,...a)=>{let r,l,c,f;const d=g=>{const p=a.reduce((x,y)=>y(x),n());return r=DT(p),l=r.cache.get,c=r.cache.set,f=m,m(g)},m=g=>{const p=l(g);if(p)return p;const x=zT(g,r);return c(g,x),x};return f=d,(...g)=>f(LT(...g))},BT=[],Bt=n=>{const a=r=>r[n]||BT;return a.isThemeGetter=!0,a},Rv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_v=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qT=/^\d+\/\d+$/,HT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,QT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,PT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,GT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jr=n=>qT.test(n),Ue=n=>!!n&&!Number.isNaN(Number(n)),fi=n=>!!n&&Number.isInteger(Number(n)),hf=n=>n.endsWith("%")&&Ue(n.slice(0,-1)),qa=n=>HT.test(n),VT=()=>!0,YT=n=>QT.test(n)&&!PT.test(n),kv=()=>!1,FT=n=>GT.test(n),XT=n=>KT.test(n),IT=n=>!ue(n)&&!ce(n),ZT=n=>Vr(n,Mv,kv),ue=n=>Rv.test(n),Vi=n=>Vr(n,Dv,YT),mf=n=>Vr(n,t2,Ue),ey=n=>Vr(n,Nv,kv),JT=n=>Vr(n,Ov,XT),Eo=n=>Vr(n,jv,FT),ce=n=>_v.test(n),Ps=n=>Yr(n,Dv),$T=n=>Yr(n,n2),ty=n=>Yr(n,Nv),WT=n=>Yr(n,Mv),e2=n=>Yr(n,Ov),To=n=>Yr(n,jv,!0),Vr=(n,a,r)=>{const l=Rv.exec(n);return l?l[1]?a(l[1]):r(l[2]):!1},Yr=(n,a,r=!1)=>{const l=_v.exec(n);return l?l[1]?a(l[1]):r:!1},Nv=n=>n==="position"||n==="percentage",Ov=n=>n==="image"||n==="url",Mv=n=>n==="length"||n==="size"||n==="bg-size",Dv=n=>n==="length",t2=n=>n==="number",n2=n=>n==="family-name",jv=n=>n==="shadow",a2=()=>{const n=Bt("color"),a=Bt("font"),r=Bt("text"),l=Bt("font-weight"),c=Bt("tracking"),f=Bt("leading"),d=Bt("breakpoint"),m=Bt("container"),g=Bt("spacing"),p=Bt("radius"),x=Bt("shadow"),y=Bt("inset-shadow"),T=Bt("text-shadow"),N=Bt("drop-shadow"),L=Bt("blur"),B=Bt("perspective"),P=Bt("aspect"),K=Bt("ease"),Y=Bt("animate"),W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],he=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],de=()=>[...he(),ce,ue],fe=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],V=()=>[ce,ue,g],ie=()=>[jr,"full","auto",...V()],ke=()=>[fi,"none","subgrid",ce,ue],Re=()=>["auto",{span:["full",fi,ce,ue]},fi,ce,ue],Se=()=>[fi,"auto",ce,ue],Me=()=>["auto","min","max","fr",ce,ue],ze=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ee=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...V()],X=()=>[jr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...V()],Q=()=>[n,ce,ue],me=()=>[...he(),ty,ey,{position:[ce,ue]}],ye=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",WT,ZT,{size:[ce,ue]}],q=()=>[hf,Ps,Vi],H=()=>["","none","full",p,ce,ue],Z=()=>["",Ue,Ps,Vi],ee=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Ue,hf,ty,ey],Te=()=>["","none",L,ce,ue],Be=()=>["none",Ue,ce,ue],Pt=()=>["none",Ue,ce,ue],en=()=>[Ue,ce,ue],Je=()=>[jr,"full",...V()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qa],breakpoint:[qa],color:[VT],container:[qa],"drop-shadow":[qa],ease:["in","out","in-out"],font:[IT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qa],shadow:[qa],spacing:["px",Ue],text:[qa],"text-shadow":[qa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",jr,ue,ce,P]}],container:["container"],columns:[{columns:[Ue,ue,ce,m]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:de()}],overflow:[{overflow:fe()}],"overflow-x":[{"overflow-x":fe()}],"overflow-y":[{"overflow-y":fe()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{start:ie()}],end:[{end:ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[fi,"auto",ce,ue]}],basis:[{basis:[jr,"full","auto",m,...V()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ue,jr,"auto","initial","none",ue]}],grow:[{grow:["",Ue,ce,ue]}],shrink:[{shrink:["",Ue,ce,ue]}],order:[{order:[fi,"first","last","none",ce,ue]}],"grid-cols":[{"grid-cols":ke()}],"col-start-end":[{col:Re()}],"col-start":[{"col-start":Se()}],"col-end":[{"col-end":Se()}],"grid-rows":[{"grid-rows":ke()}],"row-start-end":[{row:Re()}],"row-start":[{"row-start":Se()}],"row-end":[{"row-end":Se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Me()}],"auto-rows":[{"auto-rows":Me()}],gap:[{gap:V()}],"gap-x":[{"gap-x":V()}],"gap-y":[{"gap-y":V()}],"justify-content":[{justify:[...ze(),"normal"]}],"justify-items":[{"justify-items":[...Ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ee()]}],"align-content":[{content:["normal",...ze()]}],"align-items":[{items:[...Ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":ze()}],"place-items":[{"place-items":[...Ee(),"baseline"]}],"place-self":[{"place-self":["auto",...Ee()]}],p:[{p:V()}],px:[{px:V()}],py:[{py:V()}],ps:[{ps:V()}],pe:[{pe:V()}],pt:[{pt:V()}],pr:[{pr:V()}],pb:[{pb:V()}],pl:[{pl:V()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":V()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":V()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[m,"screen",...X()]}],"min-w":[{"min-w":[m,"screen","none",...X()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,Ps,Vi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,ce,mf]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hf,ue]}],"font-family":[{font:[$T,ue,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,ce,ue]}],"line-clamp":[{"line-clamp":[Ue,"none",ce,mf]}],leading:[{leading:[f,...V()]}],"list-image":[{"list-image":["none",ce,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Q()}],"text-color":[{text:Q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ue,"from-font","auto",ce,Vi]}],"text-decoration-color":[{decoration:Q()}],"underline-offset":[{"underline-offset":[Ue,"auto",ce,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:me()}],"bg-repeat":[{bg:ye()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},fi,ce,ue],radial:["",ce,ue],conic:[fi,ce,ue]},e2,JT]}],"bg-color":[{bg:Q()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Q()}],"gradient-via":[{via:Q()}],"gradient-to":[{to:Q()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:Q()}],"border-color-x":[{"border-x":Q()}],"border-color-y":[{"border-y":Q()}],"border-color-s":[{"border-s":Q()}],"border-color-e":[{"border-e":Q()}],"border-color-t":[{"border-t":Q()}],"border-color-r":[{"border-r":Q()}],"border-color-b":[{"border-b":Q()}],"border-color-l":[{"border-l":Q()}],"divide-color":[{divide:Q()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ue,ce,ue]}],"outline-w":[{outline:["",Ue,Ps,Vi]}],"outline-color":[{outline:Q()}],shadow:[{shadow:["","none",x,To,Eo]}],"shadow-color":[{shadow:Q()}],"inset-shadow":[{"inset-shadow":["none",y,To,Eo]}],"inset-shadow-color":[{"inset-shadow":Q()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Q()}],"ring-offset-w":[{"ring-offset":[Ue,Vi]}],"ring-offset-color":[{"ring-offset":Q()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":Q()}],"text-shadow":[{"text-shadow":["none",T,To,Eo]}],"text-shadow-color":[{"text-shadow":Q()}],opacity:[{opacity:[Ue,ce,ue]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ue]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":Q()}],"mask-image-linear-to-color":[{"mask-linear-to":Q()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":Q()}],"mask-image-t-to-color":[{"mask-t-to":Q()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":Q()}],"mask-image-r-to-color":[{"mask-r-to":Q()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":Q()}],"mask-image-b-to-color":[{"mask-b-to":Q()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":Q()}],"mask-image-l-to-color":[{"mask-l-to":Q()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":Q()}],"mask-image-x-to-color":[{"mask-x-to":Q()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":Q()}],"mask-image-y-to-color":[{"mask-y-to":Q()}],"mask-image-radial":[{"mask-radial":[ce,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":Q()}],"mask-image-radial-to-color":[{"mask-radial-to":Q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":he()}],"mask-image-conic-pos":[{"mask-conic":[Ue]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":Q()}],"mask-image-conic-to-color":[{"mask-conic-to":Q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:me()}],"mask-repeat":[{mask:ye()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,ue]}],filter:[{filter:["","none",ce,ue]}],blur:[{blur:Te()}],brightness:[{brightness:[Ue,ce,ue]}],contrast:[{contrast:[Ue,ce,ue]}],"drop-shadow":[{"drop-shadow":["","none",N,To,Eo]}],"drop-shadow-color":[{"drop-shadow":Q()}],grayscale:[{grayscale:["",Ue,ce,ue]}],"hue-rotate":[{"hue-rotate":[Ue,ce,ue]}],invert:[{invert:["",Ue,ce,ue]}],saturate:[{saturate:[Ue,ce,ue]}],sepia:[{sepia:["",Ue,ce,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,ue]}],"backdrop-blur":[{"backdrop-blur":Te()}],"backdrop-brightness":[{"backdrop-brightness":[Ue,ce,ue]}],"backdrop-contrast":[{"backdrop-contrast":[Ue,ce,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ue,ce,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ue,ce,ue]}],"backdrop-invert":[{"backdrop-invert":["",Ue,ce,ue]}],"backdrop-opacity":[{"backdrop-opacity":[Ue,ce,ue]}],"backdrop-saturate":[{"backdrop-saturate":[Ue,ce,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",Ue,ce,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":V()}],"border-spacing-x":[{"border-spacing-x":V()}],"border-spacing-y":[{"border-spacing-y":V()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ue,"initial",ce,ue]}],ease:[{ease:["linear","initial",K,ce,ue]}],delay:[{delay:[Ue,ce,ue]}],animate:[{animate:["none",Y,ce,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[B,ce,ue]}],"perspective-origin":[{"perspective-origin":de()}],rotate:[{rotate:Be()}],"rotate-x":[{"rotate-x":Be()}],"rotate-y":[{"rotate-y":Be()}],"rotate-z":[{"rotate-z":Be()}],scale:[{scale:Pt()}],"scale-x":[{"scale-x":Pt()}],"scale-y":[{"scale-y":Pt()}],"scale-z":[{"scale-z":Pt()}],"scale-3d":["scale-3d"],skew:[{skew:en()}],"skew-x":[{"skew-x":en()}],"skew-y":[{"skew-y":en()}],transform:[{transform:[ce,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:de()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Je()}],"translate-x":[{"translate-x":Je()}],"translate-y":[{"translate-y":Je()}],"translate-z":[{"translate-z":Je()}],"translate-none":["translate-none"],accent:[{accent:Q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce,ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce,ue]}],fill:[{fill:["none",...Q()]}],"stroke-w":[{stroke:[Ue,Ps,Vi,mf]}],stroke:[{stroke:["none",...Q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},i2=UT(a2);function Dt(...n){return i2(wv(n))}function pf(n){let a=0;for(const r of n){const l=r.codePointAt(0);l>=19968&&l<=40959||l>=13312&&l<=19903||l>=65280&&l<=65376||l>=12288&&l<=12351?a+=2:a+=1}return a}function YC(n,a){if(pf(n)<=a)return n;const r=a-1,l=Math.ceil(r/2),c=Math.floor(r/2);let f="",d=0;for(const x of n){const y=pf(x);if(d+y>l)break;f+=x,d+=y}const m=[...n];let g="",p=0;for(let x=m.length-1;x>=0;x--){const y=pf(m[x]);if(p+y>c)break;g=m[x]+g,p+=y}return f+"…"+g}let Qr=0;function zv(){Qr++,Qr===1&&(document.body.style.overflow="hidden")}function jf(){Qr=Math.max(0,Qr-1),Qr===0&&(document.body.style.overflow="")}function r2(){return Qr}const ny=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,ay=wv,s2=(n,a)=>r=>{var l;if(a?.variants==null)return ay(n,r?.class,r?.className);const{variants:c,defaultVariants:f}=a,d=Object.keys(c).map(p=>{const x=r?.[p],y=f?.[p];if(x===null)return null;const T=ny(x)||ny(y);return c[p][T]}),m=r&&Object.entries(r).reduce((p,x)=>{let[y,T]=x;return T===void 0||(p[y]=T),p},{}),g=a==null||(l=a.compoundVariants)===null||l===void 0?void 0:l.reduce((p,x)=>{let{class:y,className:T,...N}=x;return Object.entries(N).every(L=>{let[B,P]=L;return Array.isArray(P)?P.includes({...f,...m}[B]):{...f,...m}[B]===P})?[...p,y,T]:p},[]);return ay(n,d,g,r?.class,r?.className)};function iy(n,a){if(typeof n=="function")return n(a);n!=null&&(n.current=a)}function l2(...n){return a=>{let r=!1;const l=n.map(c=>{const f=iy(c,a);return!r&&typeof f=="function"&&(r=!0),f});if(r)return()=>{for(let c=0;c<l.length;c++){const f=l[c];typeof f=="function"?f():iy(n[c],null)}}}}function o2(n){const a=c2(n),r=S.forwardRef((l,c)=>{const{children:f,...d}=l,m=S.Children.toArray(f),g=m.find(d2);if(g){const p=g.props.children,x=m.map(y=>y===g?S.Children.count(p)>1?S.Children.only(null):S.isValidElement(p)?p.props.children:null:y);return v.jsx(a,{...d,ref:c,children:S.isValidElement(p)?S.cloneElement(p,void 0,x):null})}return v.jsx(a,{...d,ref:c,children:f})});return r.displayName=`${n}.Slot`,r}var u2=o2("Slot");function c2(n){const a=S.forwardRef((r,l)=>{const{children:c,...f}=r;if(S.isValidElement(c)){const d=m2(c),m=h2(f,c.props);return c.type!==S.Fragment&&(m.ref=l?l2(l,d):d),S.cloneElement(c,m)}return S.Children.count(c)>1?S.Children.only(null):null});return a.displayName=`${n}.SlotClone`,a}var f2=Symbol("radix.slottable");function d2(n){return S.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===f2}function h2(n,a){const r={...a};for(const l in a){const c=n[l],f=a[l];/^on[A-Z]/.test(l)?c&&f?r[l]=(...m)=>{const g=f(...m);return c(...m),g}:c&&(r[l]=c):l==="style"?r[l]={...c,...f}:l==="className"&&(r[l]=[c,f].filter(Boolean).join(" "))}return{...n,...r}}function m2(n){let a=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,r=a&&"isReactWarning"in a&&a.isReactWarning;return r?n.ref:(a=Object.getOwnPropertyDescriptor(n,"ref")?.get,r=a&&"isReactWarning"in a&&a.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}const p2=s2("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function ha({className:n,variant:a="default",size:r="default",asChild:l=!1,...c}){const f=l?u2:"button";return v.jsx(f,{"data-slot":"button","data-variant":a,"data-size":r,className:Dt(p2({variant:a,size:r,className:n})),...c})}function _t({className:n,...a}){return v.jsx("div",{"data-slot":"skeleton","aria-hidden":"true",className:Dt("animate-pulse rounded-md bg-muted motion-reduce:animate-none",n),...a})}function g2({children:n,className:a}){return v.jsx("div",{className:Dt("mx-auto w-full max-w-4xl px-5 py-5 sm:px-8 sm:py-6",a),children:n})}function FC({title:n,description:a,actions:r,className:l}){return v.jsxs("div",{className:Dt("mb-5 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",l),children:[v.jsxs("div",{className:"min-w-0",children:[v.jsx("h2",{className:"text-xl font-semibold tracking-tight text-foreground",children:n}),a&&v.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-muted-foreground",children:a})]}),r&&v.jsx("div",{className:"flex flex-wrap items-center gap-2 shrink-0",children:r})]})}function XC({children:n,className:a}){return v.jsx("h3",{className:Dt("text-[12px] font-semibold uppercase tracking-wide text-muted-foreground",a),children:n})}function IC({label:n,description:a,icon:r,children:l,align:c="start",controlWidth:f="fixed",className:d}){return v.jsxs("div",{className:Dt("flex flex-col gap-3 py-5 sm:flex-row sm:justify-between sm:gap-8",c==="center"?"sm:items-center":"sm:items-start",d),children:[v.jsxs("div",{className:"flex min-w-0 items-start gap-3 sm:max-w-[360px]",children:[r&&v.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground","aria-hidden":"true",children:v.jsx(r,{size:15})}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("div",{className:"text-[13px] font-medium text-foreground",children:n}),a&&v.jsx("p",{className:"mt-0.5 text-xs leading-relaxed text-muted-foreground",children:a})]})]}),v.jsx("div",{className:Dt("shrink-0",f==="fixed"?"w-full sm:w-[260px]":"w-auto"),children:l})]})}function ZC({label:n,description:a,children:r,className:l,htmlFor:c}){return v.jsxs("div",{className:Dt("space-y-1.5",l),children:[v.jsxs("div",{children:[v.jsx("label",{htmlFor:c,className:"block text-[13px] font-medium text-foreground",children:n}),a&&v.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:a})]}),r]})}function JC({icon:n,message:a,action:r,className:l}){return v.jsxs("div",{className:Dt("rounded-xl border border-dashed border-border bg-muted/30 py-14 text-center",l),children:[n&&v.jsx(n,{size:48,strokeWidth:1.25,className:"mx-auto mb-3 text-muted-foreground/40","aria-hidden":"true"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:a}),r&&v.jsx("div",{className:"mt-4 flex justify-center",children:r})]})}function $C({saving:n,onSave:a,onCancel:r,className:l}){const{t:c}=xi();return v.jsx("div",{className:Dt("sticky bottom-0 z-10 -mx-5 border-t border-border/60 bg-background/90 px-5 py-3 backdrop-blur sm:-mx-8 sm:px-8",l),children:v.jsxs("div",{className:"flex items-center justify-between gap-3",children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:c("有未保存的更改")}),v.jsxs("div",{className:"flex items-center gap-2",children:[r&&v.jsx(ha,{size:"sm",variant:"ghost",onClick:r,disabled:n,children:c("取消")}),v.jsx(ha,{size:"sm",onClick:a,disabled:n,children:c(n?"保存中...":"保存")})]})]})})}function y2({rows:n=3}){return v.jsxs("div",{role:"status","aria-label":"Loading",children:[v.jsx(_t,{className:"h-7 w-36"}),v.jsx("div",{className:"mt-6 divide-y divide-border/60",children:Array.from({length:n}).map((a,r)=>v.jsxs("div",{className:"flex items-start justify-between gap-8 py-5",children:[v.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[v.jsx(_t,{className:"h-4 w-32"}),v.jsx(_t,{className:"h-3 w-64 max-w-full"})]}),v.jsx(_t,{className:"h-9 w-[260px] shrink-0 rounded-lg"})]},r))})]})}function WC(){return v.jsxs("div",{role:"status","aria-label":"Loading",children:[v.jsx(_t,{className:"h-7 w-36"}),v.jsxs("div",{className:"mt-6 grid gap-5 lg:grid-cols-[240px_minmax(0,1fr)]",children:[v.jsx("div",{className:"space-y-1",children:Array.from({length:5}).map((n,a)=>v.jsxs("div",{className:"flex items-center gap-3 rounded-lg px-3 py-2.5",children:[v.jsx(_t,{className:"h-2 w-2 rounded-full"}),v.jsxs("div",{className:"flex-1 space-y-1.5",children:[v.jsx(_t,{className:"h-3.5 w-3/4"}),v.jsx(_t,{className:"h-2.5 w-1/2"})]})]},a))}),v.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[v.jsxs("div",{className:"flex items-start justify-between gap-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx(_t,{className:"h-5 w-44"}),v.jsx(_t,{className:"h-3 w-28"})]}),v.jsx(_t,{className:"h-8 w-24 rounded-md"})]}),v.jsxs("div",{className:"mt-8 space-y-3",children:[v.jsx(_t,{className:"h-3 w-20"}),v.jsx(_t,{className:"h-24 w-full rounded-lg"}),v.jsx(_t,{className:"h-3 w-20"}),v.jsx(_t,{className:"h-16 w-full rounded-lg"})]})]})]})]})}function eR({cards:n=6}){return v.jsxs("div",{role:"status","aria-label":"Loading",children:[v.jsxs("div",{className:"flex items-center justify-between gap-4",children:[v.jsx(_t,{className:"h-7 w-36"}),v.jsx(_t,{className:"h-8 w-44 rounded-lg"})]}),v.jsx("div",{className:"mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:n}).map((a,r)=>v.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-border bg-card p-4",children:[v.jsx(_t,{className:"h-10 w-10 shrink-0 rounded-full"}),v.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[v.jsx(_t,{className:"h-4 w-2/3"}),v.jsx(_t,{className:"h-3 w-1/2"}),v.jsx(_t,{className:"h-3 w-3/4"})]})]},r))})]})}const v2=S.lazy(()=>_n(()=>import("./GeneralSettingsPage-TqbAsCZM.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(n=>({default:n.GeneralSettingsPage}))),b2=S.lazy(()=>_n(()=>import("./ProviderSettingsPage-B-bBs2qN.js"),__vite__mapDeps([7,6,8,9,1,2,3,4,5,10,11,12,13,14,15,16,17,18])).then(n=>({default:n.ProviderSettingsPage}))),x2=S.lazy(()=>_n(()=>import("./AgentEnvironmentSettingsPage-CSBMaAvL.js"),[]).then(n=>({default:n.AgentEnvironmentSettingsPage}))),S2=S.lazy(()=>_n(()=>import("./TeamSettingsPage-Y2zCVbVD.js"),__vite__mapDeps([19,8,9,1,2,3,10,11,12,13,20,6,15,16,21])).then(n=>({default:n.TeamSettingsPage}))),w2=S.lazy(()=>_n(()=>import("./ProjectSettingsPage-Cp89NvwE.js"),__vite__mapDeps([22,23,24,11,25,3,16,9,14,15])).then(n=>({default:n.ProjectSettingsPage}))),E2=S.lazy(()=>_n(()=>import("./NotificationSettingsPage-CNsRJ6nN.js"),__vite__mapDeps([26,1,2,3,5,27,25])).then(n=>({default:n.NotificationSettingsPage}))),T2=S.lazy(()=>_n(()=>import("./McpSettingsPage-z1_NcsMR.js"),__vite__mapDeps([28,29,3])).then(n=>({default:n.McpSettingsPage}))),A2=S.lazy(()=>_n(()=>import("./ProfileSettingsPage-g1RKcEbo.js"),__vite__mapDeps([30,31,9,8,4,32,2,16,18])).then(n=>({default:n.ProfileSettingsPage}))),ry=[{id:"general",label:"通用",icon:LE},{id:"agent-environment",label:"Agent 环境",icon:uv},{id:"agents",label:"Agent 配置",icon:RE},{id:"team",label:"团队协作",icon:eT},{id:"projects",label:"项目配置",icon:ME},{id:"notifications",label:"通知",icon:vE},{id:"mcp",label:"MCP 配置",icon:SE}];function C2({tab:n}){switch(n){case"general":return v.jsx(v2,{});case"agent-environment":return v.jsx(x2,{});case"agents":return v.jsx(b2,{});case"team":return v.jsx(S2,{});case"projects":return v.jsx(w2,{});case"notifications":return v.jsx(E2,{});case"mcp":return v.jsx(T2,{});case"agents-legacy":return v.jsx(A2,{})}}function R2(){return v.jsx(g2,{children:v.jsx(y2,{rows:3})})}function _2(){const{t:n}=xi(),a=Ys(p=>p.settingsOpen),r=Ys(p=>p.settingsTab),l=Ys(p=>p.closeSettings),c=Ys(p=>p.setSettingsTab),[f,d]=S.useState(!1),m=S.useRef(!1),g=S.useRef(null);return S.useEffect(()=>{if(a){const p=requestAnimationFrame(()=>d(!0));m.current||(zv(),m.current=!0);const x=requestAnimationFrame(()=>g.current?.focus());return()=>{cancelAnimationFrame(p),cancelAnimationFrame(x)}}else{const p=setTimeout(()=>d(!1),200);return m.current&&(jf(),m.current=!1),()=>clearTimeout(p)}},[a]),S.useEffect(()=>()=>{m.current&&(jf(),m.current=!1)},[]),S.useEffect(()=>{if(!a)return;const p=x=>{x.key==="Escape"&&r2()===1&&l()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[a,l]),!f&&!a?null:v.jsxs("div",{className:Dt("fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-6 transition-opacity duration-200 motion-reduce:transition-none",a?"opacity-100":"opacity-0 pointer-events-none"),children:[v.jsx("div",{className:"absolute inset-0 bg-black/20 backdrop-blur-sm",onClick:l,"aria-hidden":"true"}),v.jsxs("div",{ref:g,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":n("设置"),className:Dt("relative flex w-full max-w-[1100px] flex-col overflow-hidden rounded-2xl bg-background shadow-[0_12px_16px_-4px_rgba(36,36,36,0.08)] ring-1 ring-foreground/5 transform transition-all duration-200 outline-none motion-reduce:transition-none","h-[min(calc(100vh-1.5rem),840px)] sm:h-[min(calc(100vh-3rem),840px)]",a?"scale-100 translate-y-0":"scale-[0.97] translate-y-1"),children:[v.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border/60 bg-muted/40 px-5 py-3 sm:px-6",children:[v.jsxs("div",{className:"flex items-center gap-2.5",children:[v.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary text-primary-foreground","aria-hidden":"true",children:v.jsx(VE,{size:14})}),v.jsx("h2",{className:"text-[15px] font-semibold text-foreground",children:n("设置")})]}),v.jsx("button",{onClick:l,"aria-label":n("取消"),className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:v.jsx(dv,{size:15})})]}),v.jsx("div",{className:"sm:hidden flex shrink-0 border-b border-border/60 bg-background overflow-x-auto scrollbar-none",role:"tablist",children:ry.map(p=>v.jsxs("button",{role:"tab","aria-selected":r===p.id,onClick:()=>c(p.id),className:Dt("flex items-center gap-1.5 px-4 py-2.5 text-xs whitespace-nowrap transition-colors border-b-2 -mb-px focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-inset",r===p.id?"border-primary text-foreground font-medium":"border-transparent text-muted-foreground hover:text-foreground"),children:[v.jsx(p.icon,{size:13,"aria-hidden":"true"}),v.jsx("span",{children:n(p.label)})]},p.id))}),v.jsxs("div",{className:"flex flex-1 min-h-0",children:[v.jsx("nav",{"aria-label":n("设置"),className:"hidden sm:flex w-[180px] shrink-0 flex-col gap-0.5 border-r border-border/60 bg-muted/30 p-3 overflow-y-auto scrollbar-app-thin",children:ry.map(p=>v.jsxs("button",{"aria-current":r===p.id?"page":void 0,onClick:()=>c(p.id),className:Dt("flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",r===p.id?"bg-background text-foreground font-medium shadow-[0_1px_2px_rgba(0,0,0,0.05)] ring-1 ring-foreground/[0.04]":"text-muted-foreground hover:text-foreground hover:bg-background/60"),children:[v.jsx(p.icon,{size:15,className:"shrink-0","aria-hidden":"true"}),v.jsx("span",{children:n(p.label)})]},p.id))}),v.jsx("div",{className:"flex-1 min-w-0 overflow-y-auto scrollbar-app-thin bg-background",children:v.jsx(S.Suspense,{fallback:v.jsx(R2,{}),children:v.jsx(C2,{tab:r})})})]})]})]})}const Lv="agent-tower:desktop-titlebar",zf="agent-tower:desktop-platform",Ji={desktop:"1",desktopTitlebar:"integrated"},Uv=S.createContext(null),k2={usesIntegratedTitlebar:!1,desktopPlatform:"unknown",hasMacTrafficLights:!1,preserveDesktopSearch:n=>n};function N2(n){const a=new URLSearchParams(n);return a.get("desktop")===Ji.desktop&&a.get("desktopTitlebar")===Ji.desktopTitlebar}function Bv(n){return n==="darwin"||n==="win32"||n==="linux"?n:"unknown"}function O2(){if(typeof window>"u")return"unknown";try{return Bv(window.sessionStorage.getItem(zf))}catch{return"unknown"}}function M2(n){if(!(typeof window>"u"))try{n==="unknown"?window.sessionStorage.removeItem(zf):window.sessionStorage.setItem(zf,n)}catch{}}function D2(){if(typeof window>"u")return"none";try{return window.sessionStorage.getItem(Lv)===Ji.desktopTitlebar?"integrated":"none"}catch{return"none"}}function j2(n){if(!(typeof window>"u"))try{n==="integrated"&&window.sessionStorage.setItem(Lv,Ji.desktopTitlebar)}catch{}}function z2(n){return N2(n)?(j2("integrated"),"integrated"):D2()}function L2(n){const a=new URLSearchParams(n),r=Bv(a.get("desktopPlatform"));return a.get("desktop")===Ji.desktop&&r!=="unknown"?(M2(r),r):O2()}function sy(n,a){const r=new URLSearchParams(n);r.set("desktop",Ji.desktop),r.set("desktopTitlebar",Ji.desktopTitlebar),a!=="unknown"&&r.set("desktopPlatform",a);const l=r.toString();return l?`?${l}`:""}function U2(n,a){if(typeof n=="string"){const r=n.indexOf("#"),l=r>=0?n.slice(0,r):n,c=r>=0?n.slice(r):"",f=l.indexOf("?"),d=f>=0?l.slice(0,f):l,m=f>=0?l.slice(f):"";return`${d}${sy(m,a)}${c}`}return{...n,search:sy(n.search??"",a)}}function B2({children:n}){const a=bi(),r=S.useMemo(()=>z2(a.search),[a.search]),l=S.useMemo(()=>L2(a.search),[a.search]),c=r==="integrated",f=c&&l==="darwin",d=S.useMemo(()=>({usesIntegratedTitlebar:c,desktopPlatform:l,hasMacTrafficLights:f,preserveDesktopSearch:m=>c?U2(m,l):m}),[l,f,c]);return v.jsx(Uv.Provider,{value:d,children:n})}function qv(){return S.useContext(Uv)??k2}function q2(){const n=ev(),{preserveDesktopSearch:a}=qv();return S.useMemo(()=>((l,c)=>typeof l=="number"?n(l):n(a(l),c)),[n,a])}function H2(){return rn({queryKey:be.agentCli.manifest,queryFn:()=>Le.get("/agent-cli/manifest")})}function Hv(){return rn({queryKey:be.agentCli.status,queryFn:()=>Le.get("/agent-cli/status")})}function Qv(){const n=tt();return ht({mutationFn:()=>Le.post("/agent-cli/status/refresh"),onSuccess:a=>{n.setQueryData(be.agentCli.status,a)}})}function Q2(){const n=tt();return ht({mutationFn:a=>Le.post("/agent-cli/install-previews",{toolId:a}),onSuccess:a=>{n.setQueryData(be.agentCli.preview(a.id),a)}})}function P2(n,a=!0){return rn({queryKey:n?be.agentCli.task(n):["agent-cli","task",null],queryFn:()=>Le.get(`/agent-cli/install-tasks/${n}`),enabled:!!n&&a,refetchInterval:r=>{const l=r.state.data?.status;return l==="running"||l==="verifying"||l==="cancelling"?1e3:!1}})}function G2(n,a=!0){return rn({queryKey:n?be.agentCli.logs(n):["agent-cli","logs",null],queryFn:()=>Le.get(`/agent-cli/install-tasks/${n}/logs`),enabled:!!n&&a,refetchInterval:a&&n?1e3:!1})}function K2(){const n=tt();return ht({mutationFn:a=>Le.post("/agent-cli/install-tasks",{previewId:a}),onSuccess:({task:a})=>{n.setQueryData(be.agentCli.task(a.id),a),n.invalidateQueries({queryKey:be.agentCli.status})}})}function V2(){const n=tt();return ht({mutationFn:a=>Le.post(`/agent-cli/install-tasks/${a}/cancel`),onSuccess:a=>{n.setQueryData(be.agentCli.task(a.id),a)}})}const Pv=["codex","claude-code","cursor-agent"];function Gv(n){return Pv.includes(n)}function Y2(n){return Pv.some(a=>n?.some(r=>r.toolId===a&&r.installStatus==="installed"))}const Oo=new Set(["succeeded","failed","cancelled"]),F2="AGENT_CLI_INSTALL_LOCAL_ONLY",X2=[];function I2(n){if(!(n instanceof rl))return;const a=n.details.code;return typeof a=="string"?a:void 0}function zr(n,a){return n instanceof rl&&(n.status===403||I2(n)===F2)?"需要在本机 Agent Tower 打开后安装。":n instanceof Error?n.message:a}function Z2(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/1024/1024).toFixed(2)} MB`}function J2(n){return n==="darwin"?"macOS":n==="linux"?"Linux":n==="win32"?"Windows":n??"Unknown"}function $2(n){return n.map(a=>a.data.endsWith(`
14
14
  `)?a.data:`${a.data}
15
- `).join("")}function W2(n){switch(n?.installStatus){case"installed":return{label:"已安装",className:"bg-success/10 text-success",icon:Of};case"legacy_detected":return{label:"Legacy 已检测",className:"bg-warning/10 text-warning",icon:Of};case"missing":return{label:"未安装",className:"bg-muted text-muted-foreground",icon:cv};case"unsupported":return{label:"当前平台不支持",className:"bg-muted text-muted-foreground",icon:Po};case"error":return{label:"检测失败",className:"bg-destructive/10 text-destructive",icon:Po};default:return{label:"未检测",className:"bg-muted text-muted-foreground",icon:TE}}}function eC(n){switch(n){case"running":return"安装中";case"verifying":return"验证中";case"succeeded":return"已完成";case"failed":return"失败";case"cancelling":return"取消中";case"cancelled":return"已取消";default:return"未开始"}}function tC(n){return n?.installStatus==="installed"}function nC({status:n}){const{t:a}=xi(),r=W2(n),l=r.icon;return v.jsxs("span",{className:Dt("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-medium",r.className),children:[v.jsx(l,{size:11,"aria-hidden":"true"}),a(r.label)]})}function aC({item:n,status:a,selected:r,disabled:l,onSelect:c,onPreview:f,previewing:d,previewDisabled:m}){const{t:g}=xi(),p=n.install.kind==="downloaded-script"&&Gv(n.id),x=tC(a),y=a?.installStatus==="unsupported";return v.jsx("div",{className:Dt("rounded-lg border px-4 py-3 transition-colors",r?"border-primary bg-muted/30":"border-border bg-background"),children:v.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[v.jsxs("button",{type:"button",onClick:c,className:"min-w-0 flex-1 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:[v.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[v.jsx("span",{className:"text-sm font-semibold text-foreground",children:n.displayName}),v.jsx(nC,{status:a}),n.legacy&&v.jsx("span",{className:"rounded-full bg-warning/10 px-2 py-0.5 text-[11px] font-medium text-warning",children:g("迁移中")})]}),v.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[v.jsx("span",{children:n.description??g("Agent CLI 工具")}),n.install.kind==="detect-only"&&v.jsx("span",{children:n.install.reason}),a?.version&&v.jsxs("span",{className:"font-mono",children:["v",a.version]}),a?.authStatus==="needs_interactive_login"&&v.jsx("span",{children:g("需要登录")})]})]}),v.jsx("div",{className:"flex shrink-0 items-center gap-2",children:p?v.jsxs("div",{className:"flex flex-col items-start gap-1 sm:items-end",children:[v.jsxs(ha,{size:"sm",variant:x?"outline":"default",onClick:f,disabled:l||m||d||y,children:[d?v.jsx(Gr,{className:"animate-spin",size:14}):v.jsx(fv,{size:14}),g(x?"重新预览":"预览安装")]}),y&&v.jsx("span",{className:"max-w-40 text-xs text-muted-foreground",children:g("当前平台不可安装。")})]}):v.jsxs(ha,{size:"sm",variant:"outline",disabled:!0,children:[v.jsx(jE,{size:14}),g("只检测")]})})]})})}function iC({preview:n,item:a,confirmed:r,onConfirmedChange:l,onInstall:c,installing:f,disabled:d}){const{t:m}=xi();return v.jsxs("section",{className:"rounded-lg border border-border bg-muted/20 p-4",children:[v.jsxs("div",{className:"flex items-start gap-2.5",children:[v.jsx(FE,{size:16,className:"mt-0.5 shrink-0 text-success","aria-hidden":"true"}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx("h3",{className:"text-sm font-semibold text-foreground",children:m("安装预览")}),v.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:m("安装任务将使用后端 manifest 中的受控计划执行,前端只提交工具选择和预览 ID。")})]})]}),v.jsxs("dl",{className:"mt-4 grid gap-3 text-xs sm:grid-cols-2",children:[v.jsxs("div",{children:[v.jsx("dt",{className:"text-muted-foreground",children:m("平台")}),v.jsx("dd",{className:"mt-1 font-medium text-foreground",children:J2(n.platform)})]}),v.jsxs("div",{children:[v.jsx("dt",{className:"text-muted-foreground",children:m("脚本大小")}),v.jsx("dd",{className:"mt-1 font-medium text-foreground",children:I2(n.sizeBytes)})]}),v.jsxs("div",{className:"sm:col-span-2",children:[v.jsx("dt",{className:"text-muted-foreground",children:m("最终下载地址")}),v.jsx("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:n.finalUrl})]}),v.jsxs("div",{children:[v.jsx("dt",{className:"text-muted-foreground",children:m("解释器")}),v.jsxs("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:[n.interpreter.command,n.interpreter.args.length>0?` ${n.interpreter.args.join(" ")}`:""]})]}),v.jsxs("div",{children:[v.jsx("dt",{className:"text-muted-foreground",children:m("固定参数")}),v.jsx("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:n.fixedArgs.length>0?n.fixedArgs.join(" "):m("无")})]}),v.jsxs("div",{className:"sm:col-span-2",children:[v.jsx("dt",{className:"text-muted-foreground",children:"SHA-256"}),v.jsx("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:n.sha256})]})]}),n.platform==="win32"&&v.jsx("div",{className:"mt-4 rounded-lg border border-info/25 bg-info/10 px-3 py-2.5 text-xs leading-relaxed text-foreground",children:m("Windows 将下载并执行官方 PowerShell 安装脚本;不会使用复制粘贴式 shell pipeline。")}),a?.officialSources.length?v.jsxs("div",{className:"mt-4",children:[v.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:m("官方来源")}),v.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:a.officialSources.map(g=>v.jsxs("a",{href:g.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md border border-border bg-background px-2 py-1 text-xs text-foreground hover:bg-muted",children:[g.label,v.jsx(NE,{size:11,"aria-hidden":"true"})]},g.url))})]}):null,n.redirectChain.length>0&&v.jsxs("div",{className:"mt-4",children:[v.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:m("下载链路")}),v.jsx("div",{className:"mt-2 space-y-1 rounded-md bg-background px-3 py-2",children:n.redirectChain.map((g,p)=>v.jsxs("div",{className:"flex items-start justify-between gap-3 text-[11px]",children:[v.jsxs("span",{className:"break-all text-foreground",children:[g.host,g.path]}),v.jsx("span",{className:"shrink-0 font-mono text-muted-foreground",children:g.statusCode})]},`${g.url}-${p}`))})]}),n.riskNotes.length>0&&v.jsxs("div",{className:"mt-4 rounded-lg border border-warning/25 bg-warning/10 px-3 py-2.5",children:[v.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-warning",children:[v.jsx(Po,{size:13,"aria-hidden":"true"}),m("安装风险")]}),v.jsx("ul",{className:"mt-2 space-y-1 text-xs leading-relaxed text-foreground",children:n.riskNotes.map(g=>v.jsxs("li",{children:["• ",g]},g))})]}),v.jsxs("label",{className:"mt-4 flex cursor-pointer items-start gap-2 rounded-lg border border-border bg-background px-3 py-2.5 text-xs leading-relaxed text-foreground",children:[v.jsx("input",{type:"checkbox",checked:r,onChange:g=>l(g.target.checked),className:"mt-0.5 h-4 w-4 rounded border-border"}),v.jsx("span",{children:m("我已确认官方来源、下载摘要和风险说明。")})]}),v.jsx("div",{className:"mt-4 flex justify-end",children:v.jsxs(ha,{onClick:c,disabled:!r||f||d,children:[f?v.jsx(Gr,{className:"animate-spin",size:14}):v.jsx(fv,{size:14}),m("确认安装")]})})]})}function rC({task:n,logs:a,onCancel:r,cancelling:l}){const{t:c}=xi(),f=n&&!Oo.has(n.status),d=n?.status==="failed",m=n?.status==="succeeded";return v.jsxs("section",{className:"rounded-lg border border-border bg-background p-4",children:[v.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[f?v.jsx(Gr,{className:"animate-spin text-primary",size:16,"aria-hidden":"true"}):m?v.jsx(Of,{className:"text-success",size:16,"aria-hidden":"true"}):d?v.jsx(cv,{className:"text-destructive",size:16,"aria-hidden":"true"}):v.jsx(JE,{className:"text-muted-foreground",size:16,"aria-hidden":"true"}),v.jsxs("div",{children:[v.jsx("h3",{className:"text-sm font-semibold text-foreground",children:c("安装任务")}),v.jsx("p",{className:"text-xs text-muted-foreground",children:c(eC(n?.status))})]})]}),f&&v.jsxs(ha,{size:"sm",variant:"outline",onClick:r,disabled:l,children:[l?v.jsx(Gr,{className:"animate-spin",size:14}):v.jsx(ZE,{size:14}),c("取消")]})]}),n?.errorMessage&&v.jsx("div",{className:"mt-3 rounded-md border border-destructive/25 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:n.errorMessage}),n?.errorCode==="VERIFY_FAILED"&&v.jsx("div",{className:"mt-3 rounded-md border border-warning/25 bg-warning/10 px-3 py-2 text-xs leading-relaxed text-foreground",children:c("安装器可能已完成,但当前 Agent Tower 进程尚未刷新 PATH;请重启 Agent Tower 后重新检测。")}),v.jsx("pre",{className:"mt-4 max-h-56 overflow-auto rounded-lg bg-muted/60 p-3 font-mono text-[11px] leading-relaxed text-foreground scrollbar-app-thin",children:a||c("等待安装日志...")})]})}function sC({variant:n="settings",onSkip:a}){const{t:r}=xi(),l=H2(),c=Hv(),f=Qv(),d=Q2(),m=K2(),g=V2(),[p,x]=S.useState(null),[y,T]=S.useState(null),[N,L]=S.useState(null),[B,P]=S.useState(!1),[K,Y]=S.useState(null),[W,he]=S.useState(null),de=S.useRef(!1),fe=S.useRef(null),R=S.useRef(0),V=P2(N),ie=N?V.data??(m.data?.task.id===N?m.data.task:void 0):void 0,ke=ie?!Oo.has(ie.status):!1,Re=G2(N,!!N&&(ke||!ie)),Se=l.data??X2,Me=S.useMemo(()=>new Map((c.data?.tools??[]).map($=>[$.toolId,$])),[c.data]),ze=S.useMemo(()=>(Se.find(ae=>Gv(ae.id)&&Me.get(ae.id)?.installStatus!=="installed")??Se[0])?.id??null,[Se,Me]),Ee=p??ze,k=y?Se.find($=>$.id===y.toolId)??null:null,X=!!ie&&!Oo.has(ie.status),Q=$2(Re.data?.entries??[]),me=()=>{T(null),P(!1)};S.useEffect(()=>{de.current||c.data?.stale&&(de.current=!0,f.mutate(void 0,{onError:$=>{Y(zr($,r("检测失败")))}}))},[f,c.data?.stale,r]),S.useEffect(()=>{!ie||!Oo.has(ie.status)||fe.current!==ie.id&&(fe.current=ie.id,Re.refetch(),f.mutate(void 0,{onError:$=>{Y(zr($,r("检测失败")))}}))},[Re,f,ie,r]);const ye=()=>{Y(null),f.mutate(void 0,{onError:$=>{const ae=zr($,r("检测失败"));Y(ae),Ur.error(ae)}})},C=$=>{R.current+=1,he(null),x($),me(),Y(null)},q=$=>{const ae=R.current+1;R.current=ae,x($),he($),me(),Y(null),d.mutate($,{onSuccess:Te=>{R.current!==ae||Te.toolId!==$||(T(Te),P(!1))},onError:Te=>{if(R.current!==ae)return;const Be=zr(Te,r("创建安装预览失败"));Y(Be),Ur.error(Be)},onSettled:()=>{R.current===ae&&he(null)}})},H=()=>{if(!y||!k||y.toolId!==k.id||!B){P(!1),Y(r("安装预览已失效,请重新预览当前工具。"));return}Y(null),m.mutate(y.id,{onSuccess:$=>{L($.task.id),T(null),P(!1),Ur.success($.reused?r("已有安装任务正在运行"):r("安装任务已启动"))},onError:$=>{const ae=zr($,r("启动安装失败"));Y(ae),Ur.error(ae)}})},I=()=>{N&&g.mutate(N,{onError:$=>{const ae=zr($,r("取消安装失败"));Y(ae),Ur.error(ae)}})},ee=()=>{ie?.toolId&&(L(null),fe.current=null,q(ie.toolId))};return l.isLoading||c.isLoading?v.jsx("div",{className:"space-y-3",children:Array.from({length:4}).map(($,ae)=>v.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-muted"},ae))}):l.isError||c.isError?v.jsx("div",{role:"alert",className:"rounded-lg border border-destructive/25 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:r("Agent CLI 环境信息加载失败。")}):v.jsxs("div",{className:Dt("space-y-5",n==="onboarding"&&"max-h-[min(72vh,720px)] overflow-y-auto pr-1 scrollbar-app-thin"),children:[v.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[v.jsxs("div",{className:"min-w-0",children:[v.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[v.jsx("h3",{className:"text-base font-semibold text-foreground",children:r("Agent CLI 环境")}),c.data?.stale&&v.jsx("span",{className:"rounded-full bg-muted px-2 py-0.5 text-[11px] font-medium text-muted-foreground",children:r("状态待检测")})]}),v.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:r("Codex、Claude Code 和 Cursor 可通过官方安装计划引导安装;Gemini CLI 首版只检测。")})]}),v.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a&&v.jsx(ha,{size:"sm",variant:"ghost",onClick:a,children:r("跳过")}),v.jsxs(ha,{size:"sm",variant:"outline",onClick:ye,disabled:f.isPending,children:[v.jsx(QE,{className:Dt(f.isPending&&"animate-spin"),size:14}),r("重新检测")]})]})]}),K&&v.jsx("div",{role:"alert",className:"rounded-lg border border-warning/25 bg-warning/10 px-4 py-3 text-sm text-foreground",children:v.jsxs("div",{className:"flex items-start gap-2",children:[v.jsx(Po,{size:15,className:"mt-0.5 shrink-0 text-warning","aria-hidden":"true"}),v.jsx("span",{children:K})]})}),v.jsx("div",{className:"grid gap-3",children:Se.map($=>v.jsx(aC,{item:$,status:Me.get($.id),selected:$.id===Ee,disabled:X,onSelect:()=>C($.id),onPreview:()=>q($.id),previewing:d.isPending&&W===$.id,previewDisabled:d.isPending},$.id))}),y&&k&&v.jsx(iC,{preview:y,item:k,confirmed:B,onConfirmedChange:P,onInstall:H,installing:m.isPending,disabled:X}),ie&&v.jsxs("div",{className:"space-y-3",children:[v.jsx(rC,{task:ie,logs:Q,onCancel:I,cancelling:g.isPending}),ie.status==="failed"&&v.jsx("div",{className:"flex justify-end",children:v.jsxs(ha,{size:"sm",variant:"outline",onClick:ee,disabled:d.isPending,children:[v.jsx(GE,{size:14}),r("重试")]})})]})]})}const Kv="agentCliEnvironmentOnboardingSkipped";function lC(){return typeof window>"u"?!0:window.localStorage.getItem(Kv)==="true"}function oC(){typeof window>"u"||window.localStorage.setItem(Kv,"true")}function uC(){const{t:n}=xi(),a=Hv(),r=Qv(),[l,c]=S.useState(lC),f=S.useRef(!1),d=S.useMemo(()=>{if(l)return!1;const g=a.data;return!g||g.stale?!1:!Y2(g.tools)},[l,a.data]);S.useEffect(()=>{l||f.current||!a.data?.stale||(f.current=!0,r.mutate())},[l,r,a.data?.stale]),S.useEffect(()=>{if(d)return zv(),()=>jf()},[d]);const m=()=>{oC(),c(!0)};return d?v.jsxs("div",{className:"fixed inset-0 z-[55] flex items-center justify-center p-3 sm:p-6",role:"dialog","aria-modal":"true","aria-label":n("Agent 环境引导"),children:[v.jsx("div",{className:"absolute inset-0 bg-black/25 backdrop-blur-sm","aria-hidden":"true"}),v.jsxs("div",{className:Dt("relative flex max-h-[calc(100vh-1.5rem)] w-full max-w-4xl flex-col overflow-hidden rounded-xl border border-border bg-background shadow-xl","sm:max-h-[calc(100vh-3rem)]"),children:[v.jsxs("div",{className:"flex shrink-0 items-start justify-between gap-4 border-b border-border/60 bg-muted/30 px-5 py-4",children:[v.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[v.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary text-primary-foreground","aria-hidden":"true",children:v.jsx(uv,{size:18})}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("h2",{className:"text-base font-semibold text-foreground",children:n("配置本机 Agent CLI")}),v.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:n("当前没有检测到可用的 Codex、Claude Code 或 Cursor CLI。可以先完成安装,也可以稍后从设置里打开。")})]})]}),v.jsx("button",{type:"button",onClick:m,"aria-label":n("跳过"),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:v.jsx(dv,{size:16})})]}),v.jsx("div",{className:"min-h-0 flex-1 overflow-hidden p-5",children:v.jsx(sC,{variant:"onboarding",onSkip:m})})]})]}):null}function cC(){return v.jsx(B2,{children:v.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[v.jsx(_w,{}),v.jsx(_2,{}),v.jsx(uC,{})]})})}const fC="/assets/agent-tower-logo-fKNk9Ce3.png",dC=`
15
+ `).join("")}function W2(n){switch(n?.installStatus){case"installed":return{label:"已安装",className:"bg-success/10 text-success",icon:Of};case"legacy_detected":return{label:"Legacy 已检测",className:"bg-warning/10 text-warning",icon:Of};case"missing":return{label:"未安装",className:"bg-muted text-muted-foreground",icon:cv};case"unsupported":return{label:"当前平台不支持",className:"bg-muted text-muted-foreground",icon:Po};case"error":return{label:"检测失败",className:"bg-destructive/10 text-destructive",icon:Po};default:return{label:"未检测",className:"bg-muted text-muted-foreground",icon:TE}}}function eA(n){switch(n){case"running":return"安装中";case"verifying":return"验证中";case"succeeded":return"已完成";case"failed":return"失败";case"cancelling":return"取消中";case"cancelled":return"已取消";default:return"未开始"}}function tA(n){return n?.installStatus==="installed"}function nA({status:n}){const{t:a}=xi(),r=W2(n),l=r.icon;return v.jsxs("span",{className:Dt("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-medium",r.className),children:[v.jsx(l,{size:11,"aria-hidden":"true"}),a(r.label)]})}function aA({item:n,status:a,selected:r,disabled:l,onSelect:c,onPreview:f,previewing:d,previewDisabled:m}){const{t:g}=xi(),p=n.install.kind==="downloaded-script"&&Gv(n.id),x=tA(a),y=a?.installStatus==="unsupported";return v.jsx("div",{className:Dt("rounded-lg border px-4 py-3 transition-colors",r?"border-primary bg-muted/30":"border-border bg-background"),children:v.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[v.jsxs("button",{type:"button",onClick:c,className:"min-w-0 flex-1 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:[v.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[v.jsx("span",{className:"text-sm font-semibold text-foreground",children:n.displayName}),v.jsx(nA,{status:a}),n.legacy&&v.jsx("span",{className:"rounded-full bg-warning/10 px-2 py-0.5 text-[11px] font-medium text-warning",children:g("迁移中")})]}),v.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[v.jsx("span",{children:n.description??g("Agent CLI 工具")}),n.install.kind==="detect-only"&&v.jsx("span",{children:n.install.reason}),a?.version&&v.jsxs("span",{className:"font-mono",children:["v",a.version]}),a?.authStatus==="needs_interactive_login"&&v.jsx("span",{children:g("需要登录")})]})]}),v.jsx("div",{className:"flex shrink-0 items-center gap-2",children:p?v.jsxs("div",{className:"flex flex-col items-start gap-1 sm:items-end",children:[v.jsxs(ha,{size:"sm",variant:x?"outline":"default",onClick:f,disabled:l||m||d||y,children:[d?v.jsx(Gr,{className:"animate-spin",size:14}):v.jsx(fv,{size:14}),g(x?"重新预览":"预览安装")]}),y&&v.jsx("span",{className:"max-w-40 text-xs text-muted-foreground",children:g("当前平台不可安装。")})]}):v.jsxs(ha,{size:"sm",variant:"outline",disabled:!0,children:[v.jsx(jE,{size:14}),g("只检测")]})})]})})}function iA({preview:n,item:a,confirmed:r,onConfirmedChange:l,onInstall:c,installing:f,disabled:d}){const{t:m}=xi();return v.jsxs("section",{className:"rounded-lg border border-border bg-muted/20 p-4",children:[v.jsxs("div",{className:"flex items-start gap-2.5",children:[v.jsx(FE,{size:16,className:"mt-0.5 shrink-0 text-success","aria-hidden":"true"}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx("h3",{className:"text-sm font-semibold text-foreground",children:m("安装预览")}),v.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:m("安装任务将使用后端 manifest 中的受控计划执行,前端只提交工具选择和预览 ID。")})]})]}),v.jsxs("dl",{className:"mt-4 grid gap-3 text-xs sm:grid-cols-2",children:[v.jsxs("div",{children:[v.jsx("dt",{className:"text-muted-foreground",children:m("平台")}),v.jsx("dd",{className:"mt-1 font-medium text-foreground",children:J2(n.platform)})]}),v.jsxs("div",{children:[v.jsx("dt",{className:"text-muted-foreground",children:m("脚本大小")}),v.jsx("dd",{className:"mt-1 font-medium text-foreground",children:Z2(n.sizeBytes)})]}),v.jsxs("div",{className:"sm:col-span-2",children:[v.jsx("dt",{className:"text-muted-foreground",children:m("最终下载地址")}),v.jsx("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:n.finalUrl})]}),v.jsxs("div",{children:[v.jsx("dt",{className:"text-muted-foreground",children:m("解释器")}),v.jsxs("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:[n.interpreter.command,n.interpreter.args.length>0?` ${n.interpreter.args.join(" ")}`:""]})]}),v.jsxs("div",{children:[v.jsx("dt",{className:"text-muted-foreground",children:m("固定参数")}),v.jsx("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:n.fixedArgs.length>0?n.fixedArgs.join(" "):m("无")})]}),v.jsxs("div",{className:"sm:col-span-2",children:[v.jsx("dt",{className:"text-muted-foreground",children:"SHA-256"}),v.jsx("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:n.sha256})]})]}),n.platform==="win32"&&v.jsx("div",{className:"mt-4 rounded-lg border border-info/25 bg-info/10 px-3 py-2.5 text-xs leading-relaxed text-foreground",children:m("Windows 将下载并执行官方 PowerShell 安装脚本;不会使用复制粘贴式 shell pipeline。")}),a?.officialSources.length?v.jsxs("div",{className:"mt-4",children:[v.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:m("官方来源")}),v.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:a.officialSources.map(g=>v.jsxs("a",{href:g.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md border border-border bg-background px-2 py-1 text-xs text-foreground hover:bg-muted",children:[g.label,v.jsx(NE,{size:11,"aria-hidden":"true"})]},g.url))})]}):null,n.redirectChain.length>0&&v.jsxs("div",{className:"mt-4",children:[v.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:m("下载链路")}),v.jsx("div",{className:"mt-2 space-y-1 rounded-md bg-background px-3 py-2",children:n.redirectChain.map((g,p)=>v.jsxs("div",{className:"flex items-start justify-between gap-3 text-[11px]",children:[v.jsxs("span",{className:"break-all text-foreground",children:[g.host,g.path]}),v.jsx("span",{className:"shrink-0 font-mono text-muted-foreground",children:g.statusCode})]},`${g.url}-${p}`))})]}),n.riskNotes.length>0&&v.jsxs("div",{className:"mt-4 rounded-lg border border-warning/25 bg-warning/10 px-3 py-2.5",children:[v.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-warning",children:[v.jsx(Po,{size:13,"aria-hidden":"true"}),m("安装风险")]}),v.jsx("ul",{className:"mt-2 space-y-1 text-xs leading-relaxed text-foreground",children:n.riskNotes.map(g=>v.jsxs("li",{children:["• ",g]},g))})]}),v.jsxs("label",{className:"mt-4 flex cursor-pointer items-start gap-2 rounded-lg border border-border bg-background px-3 py-2.5 text-xs leading-relaxed text-foreground",children:[v.jsx("input",{type:"checkbox",checked:r,onChange:g=>l(g.target.checked),className:"mt-0.5 h-4 w-4 rounded border-border"}),v.jsx("span",{children:m("我已确认官方来源、下载摘要和风险说明。")})]}),v.jsx("div",{className:"mt-4 flex justify-end",children:v.jsxs(ha,{onClick:c,disabled:!r||f||d,children:[f?v.jsx(Gr,{className:"animate-spin",size:14}):v.jsx(fv,{size:14}),m("确认安装")]})})]})}function rA({task:n,logs:a,onCancel:r,cancelling:l}){const{t:c}=xi(),f=n&&!Oo.has(n.status),d=n?.status==="failed",m=n?.status==="succeeded";return v.jsxs("section",{className:"rounded-lg border border-border bg-background p-4",children:[v.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[f?v.jsx(Gr,{className:"animate-spin text-primary",size:16,"aria-hidden":"true"}):m?v.jsx(Of,{className:"text-success",size:16,"aria-hidden":"true"}):d?v.jsx(cv,{className:"text-destructive",size:16,"aria-hidden":"true"}):v.jsx(JE,{className:"text-muted-foreground",size:16,"aria-hidden":"true"}),v.jsxs("div",{children:[v.jsx("h3",{className:"text-sm font-semibold text-foreground",children:c("安装任务")}),v.jsx("p",{className:"text-xs text-muted-foreground",children:c(eA(n?.status))})]})]}),f&&v.jsxs(ha,{size:"sm",variant:"outline",onClick:r,disabled:l,children:[l?v.jsx(Gr,{className:"animate-spin",size:14}):v.jsx(IE,{size:14}),c("取消")]})]}),n?.errorMessage&&v.jsx("div",{className:"mt-3 rounded-md border border-destructive/25 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:n.errorMessage}),n?.errorCode==="VERIFY_FAILED"&&v.jsx("div",{className:"mt-3 rounded-md border border-warning/25 bg-warning/10 px-3 py-2 text-xs leading-relaxed text-foreground",children:c("安装器可能已完成,但当前 Agent Tower 进程尚未刷新 PATH;请重启 Agent Tower 后重新检测。")}),v.jsx("pre",{className:"mt-4 max-h-56 overflow-auto rounded-lg bg-muted/60 p-3 font-mono text-[11px] leading-relaxed text-foreground scrollbar-app-thin",children:a||c("等待安装日志...")})]})}function sA({variant:n="settings",onSkip:a}){const{t:r}=xi(),l=H2(),c=Hv(),f=Qv(),d=Q2(),m=K2(),g=V2(),[p,x]=S.useState(null),[y,T]=S.useState(null),[N,L]=S.useState(null),[B,P]=S.useState(!1),[K,Y]=S.useState(null),[W,he]=S.useState(null),de=S.useRef(!1),fe=S.useRef(null),R=S.useRef(0),V=P2(N),ie=N?V.data??(m.data?.task.id===N?m.data.task:void 0):void 0,ke=ie?!Oo.has(ie.status):!1,Re=G2(N,!!N&&(ke||!ie)),Se=l.data??X2,Me=S.useMemo(()=>new Map((c.data?.tools??[]).map($=>[$.toolId,$])),[c.data]),ze=S.useMemo(()=>(Se.find(ae=>Gv(ae.id)&&Me.get(ae.id)?.installStatus!=="installed")??Se[0])?.id??null,[Se,Me]),Ee=p??ze,k=y?Se.find($=>$.id===y.toolId)??null:null,X=!!ie&&!Oo.has(ie.status),Q=$2(Re.data?.entries??[]),me=()=>{T(null),P(!1)};S.useEffect(()=>{de.current||c.data?.stale&&(de.current=!0,f.mutate(void 0,{onError:$=>{Y(zr($,r("检测失败")))}}))},[f,c.data?.stale,r]),S.useEffect(()=>{!ie||!Oo.has(ie.status)||fe.current!==ie.id&&(fe.current=ie.id,Re.refetch(),f.mutate(void 0,{onError:$=>{Y(zr($,r("检测失败")))}}))},[Re,f,ie,r]);const ye=()=>{Y(null),f.mutate(void 0,{onError:$=>{const ae=zr($,r("检测失败"));Y(ae),Ur.error(ae)}})},A=$=>{R.current+=1,he(null),x($),me(),Y(null)},q=$=>{const ae=R.current+1;R.current=ae,x($),he($),me(),Y(null),d.mutate($,{onSuccess:Te=>{R.current!==ae||Te.toolId!==$||(T(Te),P(!1))},onError:Te=>{if(R.current!==ae)return;const Be=zr(Te,r("创建安装预览失败"));Y(Be),Ur.error(Be)},onSettled:()=>{R.current===ae&&he(null)}})},H=()=>{if(!y||!k||y.toolId!==k.id||!B){P(!1),Y(r("安装预览已失效,请重新预览当前工具。"));return}Y(null),m.mutate(y.id,{onSuccess:$=>{L($.task.id),T(null),P(!1),Ur.success($.reused?r("已有安装任务正在运行"):r("安装任务已启动"))},onError:$=>{const ae=zr($,r("启动安装失败"));Y(ae),Ur.error(ae)}})},Z=()=>{N&&g.mutate(N,{onError:$=>{const ae=zr($,r("取消安装失败"));Y(ae),Ur.error(ae)}})},ee=()=>{ie?.toolId&&(L(null),fe.current=null,q(ie.toolId))};return l.isLoading||c.isLoading?v.jsx("div",{className:"space-y-3",children:Array.from({length:4}).map(($,ae)=>v.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-muted"},ae))}):l.isError||c.isError?v.jsx("div",{role:"alert",className:"rounded-lg border border-destructive/25 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:r("Agent CLI 环境信息加载失败。")}):v.jsxs("div",{className:Dt("space-y-5",n==="onboarding"&&"max-h-[min(72vh,720px)] overflow-y-auto pr-1 scrollbar-app-thin"),children:[v.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[v.jsxs("div",{className:"min-w-0",children:[v.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[v.jsx("h3",{className:"text-base font-semibold text-foreground",children:r("Agent CLI 环境")}),c.data?.stale&&v.jsx("span",{className:"rounded-full bg-muted px-2 py-0.5 text-[11px] font-medium text-muted-foreground",children:r("状态待检测")})]}),v.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:r("Codex、Claude Code 和 Cursor 可通过官方安装计划引导安装;Gemini CLI 首版只检测。")})]}),v.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a&&v.jsx(ha,{size:"sm",variant:"ghost",onClick:a,children:r("跳过")}),v.jsxs(ha,{size:"sm",variant:"outline",onClick:ye,disabled:f.isPending,children:[v.jsx(QE,{className:Dt(f.isPending&&"animate-spin"),size:14}),r("重新检测")]})]})]}),K&&v.jsx("div",{role:"alert",className:"rounded-lg border border-warning/25 bg-warning/10 px-4 py-3 text-sm text-foreground",children:v.jsxs("div",{className:"flex items-start gap-2",children:[v.jsx(Po,{size:15,className:"mt-0.5 shrink-0 text-warning","aria-hidden":"true"}),v.jsx("span",{children:K})]})}),v.jsx("div",{className:"grid gap-3",children:Se.map($=>v.jsx(aA,{item:$,status:Me.get($.id),selected:$.id===Ee,disabled:X,onSelect:()=>A($.id),onPreview:()=>q($.id),previewing:d.isPending&&W===$.id,previewDisabled:d.isPending},$.id))}),y&&k&&v.jsx(iA,{preview:y,item:k,confirmed:B,onConfirmedChange:P,onInstall:H,installing:m.isPending,disabled:X}),ie&&v.jsxs("div",{className:"space-y-3",children:[v.jsx(rA,{task:ie,logs:Q,onCancel:Z,cancelling:g.isPending}),ie.status==="failed"&&v.jsx("div",{className:"flex justify-end",children:v.jsxs(ha,{size:"sm",variant:"outline",onClick:ee,disabled:d.isPending,children:[v.jsx(GE,{size:14}),r("重试")]})})]})]})}const Kv="agentCliEnvironmentOnboardingSkipped";function lA(){return typeof window>"u"?!0:window.localStorage.getItem(Kv)==="true"}function oA(){typeof window>"u"||window.localStorage.setItem(Kv,"true")}function uA(){const{t:n}=xi(),a=Hv(),r=Qv(),[l,c]=S.useState(lA),f=S.useRef(!1),d=S.useMemo(()=>{if(l)return!1;const g=a.data;return!g||g.stale?!1:!Y2(g.tools)},[l,a.data]);S.useEffect(()=>{l||f.current||!a.data?.stale||(f.current=!0,r.mutate())},[l,r,a.data?.stale]),S.useEffect(()=>{if(d)return zv(),()=>jf()},[d]);const m=()=>{oA(),c(!0)};return d?v.jsxs("div",{className:"fixed inset-0 z-[55] flex items-center justify-center p-3 sm:p-6",role:"dialog","aria-modal":"true","aria-label":n("Agent 环境引导"),children:[v.jsx("div",{className:"absolute inset-0 bg-black/25 backdrop-blur-sm","aria-hidden":"true"}),v.jsxs("div",{className:Dt("relative flex max-h-[calc(100vh-1.5rem)] w-full max-w-4xl flex-col overflow-hidden rounded-xl border border-border bg-background shadow-xl","sm:max-h-[calc(100vh-3rem)]"),children:[v.jsxs("div",{className:"flex shrink-0 items-start justify-between gap-4 border-b border-border/60 bg-muted/30 px-5 py-4",children:[v.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[v.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary text-primary-foreground","aria-hidden":"true",children:v.jsx(uv,{size:18})}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("h2",{className:"text-base font-semibold text-foreground",children:n("配置本机 Agent CLI")}),v.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:n("当前没有检测到可用的 Codex、Claude Code 或 Cursor CLI。可以先完成安装,也可以稍后从设置里打开。")})]})]}),v.jsx("button",{type:"button",onClick:m,"aria-label":n("跳过"),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:v.jsx(dv,{size:16})})]}),v.jsx("div",{className:"min-h-0 flex-1 overflow-hidden p-5",children:v.jsx(sA,{variant:"onboarding",onSkip:m})})]})]}):null}function cA(){return v.jsx(B2,{children:v.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[v.jsx(_w,{}),v.jsx(_2,{}),v.jsx(uA,{})]})})}const fA="/assets/agent-tower-logo-fKNk9Ce3.png",dA=`
16
16
  @media (prefers-reduced-motion: reduce) {
17
17
  .loading-anim-area,
18
18
  .loading-anim-area * {
@@ -21,7 +21,7 @@ Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}
21
21
  transition-duration: 0.01ms !important;
22
22
  }
23
23
  }
24
- `;function hC(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsxs("div",{className:"relative w-10 h-10 loading-anim-area",children:[v.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",className:"w-10 h-10 text-primary",children:[v.jsx("path",{d:"M12 2L2 7L12 12L22 7L12 2Z",fill:"currentColor",className:"animate-pulse motion-reduce:animate-none"}),v.jsx("path",{d:"M2 17L12 22L22 17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-40"}),v.jsx("path",{d:"M2 12L12 17L22 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-60"})]}),v.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:v.jsx("div",{className:"w-2 h-2 rounded-full bg-primary animate-ping motion-reduce:animate-none opacity-40"})})]}),v.jsx("span",{className:"text-sm text-muted-foreground animate-pulse motion-reduce:animate-none",children:"Loading"})]})}function mC(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsx("div",{className:"flex items-end gap-1 h-8 loading-anim-area",children:[0,1,2,3,4].map(n=>v.jsx("div",{className:"w-1.5 bg-primary/80 rounded-full",style:{animation:`stackRise 1.2s ease-in-out ${n*.15}s infinite`,height:"8px"}},n))}),v.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),v.jsx("style",{children:`
24
+ `;function hA(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsxs("div",{className:"relative w-10 h-10 loading-anim-area",children:[v.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",className:"w-10 h-10 text-primary",children:[v.jsx("path",{d:"M12 2L2 7L12 12L22 7L12 2Z",fill:"currentColor",className:"animate-pulse motion-reduce:animate-none"}),v.jsx("path",{d:"M2 17L12 22L22 17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-40"}),v.jsx("path",{d:"M2 12L12 17L22 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-60"})]}),v.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:v.jsx("div",{className:"w-2 h-2 rounded-full bg-primary animate-ping motion-reduce:animate-none opacity-40"})})]}),v.jsx("span",{className:"text-sm text-muted-foreground animate-pulse motion-reduce:animate-none",children:"Loading"})]})}function mA(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsx("div",{className:"flex items-end gap-1 h-8 loading-anim-area",children:[0,1,2,3,4].map(n=>v.jsx("div",{className:"w-1.5 bg-primary/80 rounded-full",style:{animation:`stackRise 1.2s ease-in-out ${n*.15}s infinite`,height:"8px"}},n))}),v.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),v.jsx("style",{children:`
25
25
  @keyframes stackRise {
26
26
  0%, 100% { height: 8px; opacity: 0.4; }
27
27
  50% { height: 28px; opacity: 1; }
@@ -31,7 +31,7 @@ Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}
31
31
  0%, 100% { height: 16px; opacity: 0.7; }
32
32
  }
33
33
  }
34
- `})]})}function pC(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsxs("div",{className:"relative w-10 h-10 loading-anim-area",children:[v.jsx("div",{className:"absolute inset-0 border-2 border-border rounded-full"}),v.jsx("div",{className:"absolute inset-0 border-2 border-transparent border-t-primary rounded-full",style:{animation:"orbitSpin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite"}}),v.jsx("div",{className:"absolute inset-[6px] border border-border/60 rounded-full"}),v.jsx("div",{className:"absolute inset-[6px] border border-transparent border-b-primary/60 rounded-full",style:{animation:"orbitSpin 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite reverse"}})]}),v.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),v.jsx("style",{children:`
34
+ `})]})}function pA(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsxs("div",{className:"relative w-10 h-10 loading-anim-area",children:[v.jsx("div",{className:"absolute inset-0 border-2 border-border rounded-full"}),v.jsx("div",{className:"absolute inset-0 border-2 border-transparent border-t-primary rounded-full",style:{animation:"orbitSpin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite"}}),v.jsx("div",{className:"absolute inset-[6px] border border-border/60 rounded-full"}),v.jsx("div",{className:"absolute inset-[6px] border border-transparent border-b-primary/60 rounded-full",style:{animation:"orbitSpin 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite reverse"}})]}),v.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),v.jsx("style",{children:`
35
35
  @keyframes orbitSpin {
36
36
  to { transform: rotate(360deg); }
37
37
  }
@@ -40,7 +40,7 @@ Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}
40
40
  to { transform: rotate(0deg); }
41
41
  }
42
42
  }
43
- `})]})}function gC(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsxs("div",{className:"flex items-center gap-0.5 px-4 py-2 bg-primary rounded-lg loading-anim-area",children:[v.jsx("span",{className:"text-primary-foreground text-xs font-mono tracking-wider",children:"loading"}),v.jsx("span",{className:"inline-block w-[7px] h-4 bg-primary-foreground/80 ml-0.5",style:{animation:"termBlink 1s steps(1) infinite"}})]}),v.jsx("style",{children:`
43
+ `})]})}function gA(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsxs("div",{className:"flex items-center gap-0.5 px-4 py-2 bg-primary rounded-lg loading-anim-area",children:[v.jsx("span",{className:"text-primary-foreground text-xs font-mono tracking-wider",children:"loading"}),v.jsx("span",{className:"inline-block w-[7px] h-4 bg-primary-foreground/80 ml-0.5",style:{animation:"termBlink 1s steps(1) infinite"}})]}),v.jsx("style",{children:`
44
44
  @keyframes termBlink {
45
45
  0%, 50% { opacity: 1; }
46
46
  51%, 100% { opacity: 0; }
@@ -50,7 +50,7 @@ Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}
50
50
  0%, 100% { opacity: 0.8; }
51
51
  }
52
52
  }
53
- `})]})}function yC(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsx("div",{className:"flex items-center gap-2 loading-anim-area",children:[0,1,2].map(n=>v.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-primary",style:{animation:`dotWave 1.4s ease-in-out ${n*.2}s infinite`}},n))}),v.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),v.jsx("style",{children:`
53
+ `})]})}function yA(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsx("div",{className:"flex items-center gap-2 loading-anim-area",children:[0,1,2].map(n=>v.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-primary",style:{animation:`dotWave 1.4s ease-in-out ${n*.2}s infinite`}},n))}),v.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),v.jsx("style",{children:`
54
54
  @keyframes dotWave {
55
55
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
56
56
  40% { transform: scale(1); opacity: 1; }
@@ -60,7 +60,7 @@ Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}
60
60
  0%, 100% { transform: scale(1); opacity: 0.7; }
61
61
  }
62
62
  }
63
- `})]})}function vC(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsx("div",{className:"relative w-10 h-10 loading-anim-area",children:[0,1,2].map(n=>v.jsx("div",{className:"absolute rounded-md border border-border bg-background",style:{width:`${28-n*4}px`,height:`${28-n*4}px`,left:`${6+n*2}px`,top:`${6+n*2}px`,animation:`layerShift 2s ease-in-out ${n*.3}s infinite`,boxShadow:"0 1px 2px rgba(0,0,0,0.05)"}},n))}),v.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),v.jsx("style",{children:`
63
+ `})]})}function vA(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsx("div",{className:"relative w-10 h-10 loading-anim-area",children:[0,1,2].map(n=>v.jsx("div",{className:"absolute rounded-md border border-border bg-background",style:{width:`${28-n*4}px`,height:`${28-n*4}px`,left:`${6+n*2}px`,top:`${6+n*2}px`,animation:`layerShift 2s ease-in-out ${n*.3}s infinite`,boxShadow:"0 1px 2px rgba(0,0,0,0.05)"}},n))}),v.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),v.jsx("style",{children:`
64
64
  @keyframes layerShift {
65
65
  0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.5; }
66
66
  25% { transform: translate(-3px, -3px) rotate(-2deg); opacity: 0.8; }
@@ -72,7 +72,7 @@ Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}
72
72
  0%, 100% { transform: none; opacity: 0.8; }
73
73
  }
74
74
  }
75
- `})]})}function bC(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsx("div",{className:"w-32 h-1 bg-border rounded-full overflow-hidden loading-anim-area",children:v.jsx("div",{className:"h-full bg-primary rounded-full",style:{animation:"progressBeam 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite"}})}),v.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),v.jsx("style",{children:`
75
+ `})]})}function bA(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsx("div",{className:"w-32 h-1 bg-border rounded-full overflow-hidden loading-anim-area",children:v.jsx("div",{className:"h-full bg-primary rounded-full",style:{animation:"progressBeam 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite"}})}),v.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),v.jsx("style",{children:`
76
76
  @keyframes progressBeam {
77
77
  0% { width: 0%; margin-left: 0%; }
78
78
  50% { width: 60%; margin-left: 20%; }
@@ -83,7 +83,7 @@ Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}
83
83
  0%, 100% { width: 40%; margin-left: 30%; }
84
84
  }
85
85
  }
86
- `})]})}function xC(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsx("div",{className:"flex gap-2 loading-anim-area",children:[0,1,2].map(n=>v.jsxs("div",{className:"flex flex-col gap-1.5 w-16",children:[v.jsx("div",{className:"h-2 rounded-full bg-border",style:{animation:`shimmer 1.8s ease-in-out ${n*.2}s infinite`}}),[0,1].map(a=>v.jsx("div",{className:"h-6 rounded bg-muted",style:{animation:`shimmer 1.8s ease-in-out ${(n*2+a)*.15}s infinite`}},a))]},n))}),v.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),v.jsx("style",{children:`
86
+ `})]})}function xA(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsx("div",{className:"flex gap-2 loading-anim-area",children:[0,1,2].map(n=>v.jsxs("div",{className:"flex flex-col gap-1.5 w-16",children:[v.jsx("div",{className:"h-2 rounded-full bg-border",style:{animation:`shimmer 1.8s ease-in-out ${n*.2}s infinite`}}),[0,1].map(a=>v.jsx("div",{className:"h-6 rounded bg-muted",style:{animation:`shimmer 1.8s ease-in-out ${(n*2+a)*.15}s infinite`}},a))]},n))}),v.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),v.jsx("style",{children:`
87
87
  @keyframes shimmer {
88
88
  0%, 100% { opacity: 0.4; }
89
89
  50% { opacity: 1; }
@@ -93,7 +93,7 @@ Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}
93
93
  0%, 100% { opacity: 0.7; }
94
94
  }
95
95
  }
96
- `})]})}function SC(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsx("div",{className:"relative w-10 h-10 loading-anim-area",children:v.jsxs("svg",{viewBox:"0 0 40 40",className:"w-10 h-10",children:[v.jsx("circle",{cx:"20",cy:"20",r:"16",fill:"none",stroke:"var(--border)",strokeWidth:"2"}),v.jsx("circle",{cx:"20",cy:"20",r:"16",fill:"none",stroke:"var(--primary)",strokeWidth:"2",strokeDasharray:"25 75",strokeLinecap:"round",style:{animation:"glyphRotate 1.2s linear infinite"},transform:"rotate(-90 20 20)"}),v.jsx("path",{d:"M20 10L14 16L20 22L26 16Z",fill:"var(--primary)",opacity:"0.8",style:{animation:"glyphFade 1.2s ease-in-out infinite"}})]})}),v.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),v.jsx("style",{children:`
96
+ `})]})}function SA(){return v.jsxs("div",{className:"flex flex-col items-center gap-4",children:[v.jsx("div",{className:"relative w-10 h-10 loading-anim-area",children:v.jsxs("svg",{viewBox:"0 0 40 40",className:"w-10 h-10",children:[v.jsx("circle",{cx:"20",cy:"20",r:"16",fill:"none",stroke:"var(--border)",strokeWidth:"2"}),v.jsx("circle",{cx:"20",cy:"20",r:"16",fill:"none",stroke:"var(--primary)",strokeWidth:"2",strokeDasharray:"25 75",strokeLinecap:"round",style:{animation:"glyphRotate 1.2s linear infinite"},transform:"rotate(-90 20 20)"}),v.jsx("path",{d:"M20 10L14 16L20 22L26 16Z",fill:"var(--primary)",opacity:"0.8",style:{animation:"glyphFade 1.2s ease-in-out infinite"}})]})}),v.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),v.jsx("style",{children:`
97
97
  @keyframes glyphRotate {
98
98
  to { stroke-dashoffset: -100; }
99
99
  }
@@ -109,7 +109,7 @@ Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}
109
109
  0%, 100% { opacity: 0.8; transform: scale(1); }
110
110
  }
111
111
  }
112
- `})]})}function Vv({size:n="md"}){const a=n==="lg"?{container:"w-20 h-20",img:"w-16 h-16"}:{container:"w-12 h-12",img:"w-10 h-10"};return v.jsxs("div",{className:"flex flex-col items-center",children:[v.jsx("div",{className:`flex items-center justify-center ${a.container} loading-anim-area`,children:v.jsx("img",{src:fC,alt:"Agent Tower",className:`${a.img} object-contain rounded-xl`,style:{animation:"charcoalBreathe 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"}})}),v.jsx("style",{children:`
112
+ `})]})}function Vv({size:n="md"}){const a=n==="lg"?{container:"w-20 h-20",img:"w-16 h-16"}:{container:"w-12 h-12",img:"w-10 h-10"};return v.jsxs("div",{className:"flex flex-col items-center",children:[v.jsx("div",{className:`flex items-center justify-center ${a.container} loading-anim-area`,children:v.jsx("img",{src:fA,alt:"Agent Tower",className:`${a.img} object-contain rounded-xl`,style:{animation:"charcoalBreathe 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"}})}),v.jsx("style",{children:`
113
113
  @keyframes charcoalBreathe {
114
114
  0%, 100% { transform: scale(1); opacity: 0.85; }
115
115
  50% { transform: scale(1.08); opacity: 1; }
@@ -119,4 +119,4 @@ Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}
119
119
  0%, 100% { transform: scale(1); opacity: 1; }
120
120
  }
121
121
  }
122
- `})]})}const tR=[{id:"tower-pulse",name:"Tower Pulse",description:"Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。",component:hC},{id:"stack-rise",name:"Stack Rise",description:"五根柱状条交错升降,暗喻任务编排队列,节奏感强。",component:mC},{id:"orbit-ring",name:"Orbit Ring",description:"双层同心圆环反向旋转,精密工具质感,不浮夸。",component:pC},{id:"terminal-cursor",name:"Terminal Cursor",description:"终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。",component:gC},{id:"dot-wave",name:"Dot Wave",description:"三点波浪脉动,极简克制,适合工具型产品的默认加载。",component:yC},{id:"layer-shift",name:"Layer Shift",description:"三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。",component:vC},{id:"progress-beam",name:"Progress Beam",description:"水平光束往复滑过进度条,线性进度隐喻,不阻断视线。",component:bC},{id:"skeleton-board",name:"Skeleton Board",description:"三列骨架屏微闪,预示看板布局,减少布局跳变。",component:xC},{id:"glyph-rotate",name:"Glyph Rotate",description:"圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。",component:SC},{id:"charcoal-breathe",name:"Charcoal Breathe",description:"Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。",component:Vv}];function Lr(){const{usesIntegratedTitlebar:n}=qv();return v.jsxs("div",{className:`fixed inset-0 z-50 flex items-center justify-center bg-background ${n?"app-region-drag":""}`,children:[v.jsx("style",{children:dC}),v.jsx(Vv,{size:"lg"})]})}const wC=S.lazy(()=>_n(()=>import("./ProjectKanbanPage-DbgIwiUC.js").then(n=>n.P),__vite__mapDeps([33,10,11,2,12,8,9,34,35,13,3,23,20,6,16,36,24,25,27,32,21,1,17,15,29,37])).then(n=>({default:n.ProjectKanbanPage}))),ly=S.lazy(()=>_n(()=>import("./ConversationPage-sknzMK-I.js"),__vite__mapDeps([38,10,11,2,12,36,3,35,13,23,20,6,16,27,15])).then(n=>({default:n.ConversationPage}))),EC=S.lazy(()=>_n(()=>import("./DemoPage-Cd1ggnZY.js"),[]).then(n=>({default:n.DemoPage}))),TC=S.lazy(()=>_n(()=>import("./AgentDemoPage-C3SHOCDR.js"),__vite__mapDeps([39,36,2,3,10,11,12,34,31,21])).then(n=>({default:n.AgentDemoPage}))),CC=S.lazy(()=>_n(()=>import("./LoadingPreviewPage-BJ_Se_T_.js"),[]).then(n=>({default:n.LoadingPreviewPage}))),AC=new Set(["general","agent-environment","agents","team","projects","notifications","mcp","agents-legacy"]);function oy(){const n=q2(),{tab:a}=sw();return S.useEffect(()=>{const r=a&&AC.has(a)?a:"general";Ys.getState().openSettings(r),n("/",{replace:!0})},[n,a]),null}const RC=Ww([{path:"/",element:v.jsx(cC,{}),children:[{index:!0,element:v.jsx(S.Suspense,{fallback:v.jsx(Lr,{}),children:v.jsx(wC,{})})},{path:"conversations",element:v.jsx(S.Suspense,{fallback:v.jsx(Lr,{}),children:v.jsx(ly,{})})},{path:"conversations/:conversationId",element:v.jsx(S.Suspense,{fallback:v.jsx(Lr,{}),children:v.jsx(ly,{})})},{path:"demo",element:v.jsx(S.Suspense,{fallback:v.jsx(Lr,{}),children:v.jsx(EC,{})})},{path:"agent-demo",element:v.jsx(S.Suspense,{fallback:v.jsx(Lr,{}),children:v.jsx(TC,{})})},{path:"loading-preview",element:v.jsx(S.Suspense,{fallback:v.jsx(Lr,{}),children:v.jsx(CC,{})})},{path:"settings",element:v.jsx(oy,{})},{path:"settings/:tab",element:v.jsx(oy,{})}]}]);function _C(){return v.jsx(fE,{router:RC})}const pa=Object.create(null);pa.open="0";pa.close="1";pa.ping="2";pa.pong="3";pa.message="4";pa.upgrade="5";pa.noop="6";const Mo=Object.create(null);Object.keys(pa).forEach(n=>{Mo[pa[n]]=n});const Lf={type:"error",data:"parser error"},Yv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Fv=typeof ArrayBuffer=="function",Xv=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,ld=({type:n,data:a},r,l)=>Yv&&a instanceof Blob?r?l(a):uy(a,l):Fv&&(a instanceof ArrayBuffer||Xv(a))?r?l(a):uy(new Blob([a]),l):l(pa[n]+(a||"")),uy=(n,a)=>{const r=new FileReader;return r.onload=function(){const l=r.result.split(",")[1];a("b"+(l||""))},r.readAsDataURL(n)};function cy(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let gf;function kC(n,a){if(Yv&&n.data instanceof Blob)return n.data.arrayBuffer().then(cy).then(a);if(Fv&&(n.data instanceof ArrayBuffer||Xv(n.data)))return a(cy(n.data));ld(n,!1,r=>{gf||(gf=new TextEncoder),a(gf.encode(r))})}const fy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<fy.length;n++)Fs[fy.charCodeAt(n)]=n;const NC=n=>{let a=n.length*.75,r=n.length,l,c=0,f,d,m,g;n[n.length-1]==="="&&(a--,n[n.length-2]==="="&&a--);const p=new ArrayBuffer(a),x=new Uint8Array(p);for(l=0;l<r;l+=4)f=Fs[n.charCodeAt(l)],d=Fs[n.charCodeAt(l+1)],m=Fs[n.charCodeAt(l+2)],g=Fs[n.charCodeAt(l+3)],x[c++]=f<<2|d>>4,x[c++]=(d&15)<<4|m>>2,x[c++]=(m&3)<<6|g&63;return p},OC=typeof ArrayBuffer=="function",od=(n,a)=>{if(typeof n!="string")return{type:"message",data:Zv(n,a)};const r=n.charAt(0);return r==="b"?{type:"message",data:MC(n.substring(1),a)}:Mo[r]?n.length>1?{type:Mo[r],data:n.substring(1)}:{type:Mo[r]}:Lf},MC=(n,a)=>{if(OC){const r=NC(n);return Zv(r,a)}else return{base64:!0,data:n}},Zv=(n,a)=>a==="blob"?n instanceof Blob?n:new Blob([n]):n instanceof ArrayBuffer?n:n.buffer,Iv="",DC=(n,a)=>{const r=n.length,l=new Array(r);let c=0;n.forEach((f,d)=>{ld(f,!1,m=>{l[d]=m,++c===r&&a(l.join(Iv))})})},jC=(n,a)=>{const r=n.split(Iv),l=[];for(let c=0;c<r.length;c++){const f=od(r[c],a);if(l.push(f),f.type==="error")break}return l};function zC(){return new TransformStream({transform(n,a){kC(n,r=>{const l=r.length;let c;if(l<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,l);else if(l<65536){c=new Uint8Array(3);const f=new DataView(c.buffer);f.setUint8(0,126),f.setUint16(1,l)}else{c=new Uint8Array(9);const f=new DataView(c.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(l))}n.data&&typeof n.data!="string"&&(c[0]|=128),a.enqueue(c),a.enqueue(r)})}})}let yf;function Co(n){return n.reduce((a,r)=>a+r.length,0)}function Ao(n,a){if(n[0].length===a)return n.shift();const r=new Uint8Array(a);let l=0;for(let c=0;c<a;c++)r[c]=n[0][l++],l===n[0].length&&(n.shift(),l=0);return n.length&&l<n[0].length&&(n[0]=n[0].slice(l)),r}function LC(n,a){yf||(yf=new TextDecoder);const r=[];let l=0,c=-1,f=!1;return new TransformStream({transform(d,m){for(r.push(d);;){if(l===0){if(Co(r)<1)break;const g=Ao(r,1);f=(g[0]&128)===128,c=g[0]&127,c<126?l=3:c===126?l=1:l=2}else if(l===1){if(Co(r)<2)break;const g=Ao(r,2);c=new DataView(g.buffer,g.byteOffset,g.length).getUint16(0),l=3}else if(l===2){if(Co(r)<8)break;const g=Ao(r,8),p=new DataView(g.buffer,g.byteOffset,g.length),x=p.getUint32(0);if(x>Math.pow(2,21)-1){m.enqueue(Lf);break}c=x*Math.pow(2,32)+p.getUint32(4),l=3}else{if(Co(r)<c)break;const g=Ao(r,c);m.enqueue(od(f?g:yf.decode(g),a)),l=0}if(c===0||c>n){m.enqueue(Lf);break}}}})}const Jv=4;function jt(n){if(n)return UC(n)}function UC(n){for(var a in jt.prototype)n[a]=jt.prototype[a];return n}jt.prototype.on=jt.prototype.addEventListener=function(n,a){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(a),this};jt.prototype.once=function(n,a){function r(){this.off(n,r),a.apply(this,arguments)}return r.fn=a,this.on(n,r),this};jt.prototype.off=jt.prototype.removeListener=jt.prototype.removeAllListeners=jt.prototype.removeEventListener=function(n,a){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+n];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var l,c=0;c<r.length;c++)if(l=r[c],l===a||l.fn===a){r.splice(c,1);break}return r.length===0&&delete this._callbacks["$"+n],this};jt.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var a=new Array(arguments.length-1),r=this._callbacks["$"+n],l=1;l<arguments.length;l++)a[l-1]=arguments[l];if(r){r=r.slice(0);for(var l=0,c=r.length;l<c;++l)r[l].apply(this,a)}return this};jt.prototype.emitReserved=jt.prototype.emit;jt.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};jt.prototype.hasListeners=function(n){return!!this.listeners(n).length};const Yo=typeof Promise=="function"&&typeof Promise.resolve=="function"?a=>Promise.resolve().then(a):(a,r)=>r(a,0),Kn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),BC="arraybuffer";function $v(n,...a){return a.reduce((r,l)=>(n.hasOwnProperty(l)&&(r[l]=n[l]),r),{})}const qC=Kn.setTimeout,HC=Kn.clearTimeout;function Fo(n,a){a.useNativeTimers?(n.setTimeoutFn=qC.bind(Kn),n.clearTimeoutFn=HC.bind(Kn)):(n.setTimeoutFn=Kn.setTimeout.bind(Kn),n.clearTimeoutFn=Kn.clearTimeout.bind(Kn))}const QC=1.33;function PC(n){return typeof n=="string"?GC(n):Math.ceil((n.byteLength||n.size)*QC)}function GC(n){let a=0,r=0;for(let l=0,c=n.length;l<c;l++)a=n.charCodeAt(l),a<128?r+=1:a<2048?r+=2:a<55296||a>=57344?r+=3:(l++,r+=4);return r}function Wv(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function KC(n){let a="";for(let r in n)n.hasOwnProperty(r)&&(a.length&&(a+="&"),a+=encodeURIComponent(r)+"="+encodeURIComponent(n[r]));return a}function VC(n){let a={},r=n.split("&");for(let l=0,c=r.length;l<c;l++){let f=r[l].split("=");a[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return a}class YC extends Error{constructor(a,r,l){super(a),this.description=r,this.context=l,this.type="TransportError"}}class ud extends jt{constructor(a){super(),this.writable=!1,Fo(this,a),this.opts=a,this.query=a.query,this.socket=a.socket,this.supportsBinary=!a.forceBase64}onError(a,r,l){return super.emitReserved("error",new YC(a,r,l)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(a){this.readyState==="open"&&this.write(a)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(a){const r=od(a,this.socket.binaryType);this.onPacket(r)}onPacket(a){super.emitReserved("packet",a)}onClose(a){this.readyState="closed",super.emitReserved("close",a)}pause(a){}createUri(a,r={}){return a+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const a=this.opts.hostname;return a.indexOf(":")===-1?a:"["+a+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(a){const r=KC(a);return r.length?"?"+r:""}}class FC extends ud{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(a){this.readyState="pausing";const r=()=>{this.readyState="paused",a()};if(this._polling||!this.writable){let l=0;this._polling&&(l++,this.once("pollComplete",function(){--l||r()})),this.writable||(l++,this.once("drain",function(){--l||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(a){const r=l=>{if(this.readyState==="opening"&&l.type==="open"&&this.onOpen(),l.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(l)};jC(a,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const a=()=>{this.write([{type:"close"}])};this.readyState==="open"?a():this.once("open",a)}write(a){this.writable=!1,DC(a,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const a=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=Wv()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(a,r)}}let e0=!1;try{e0=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const XC=e0;function ZC(){}class IC extends FC{constructor(a){if(super(a),typeof location<"u"){const r=location.protocol==="https:";let l=location.port;l||(l=r?"443":"80"),this.xd=typeof location<"u"&&a.hostname!==location.hostname||l!==a.port}}doWrite(a,r){const l=this.request({method:"POST",data:a});l.on("success",r),l.on("error",(c,f)=>{this.onError("xhr post error",c,f)})}doPoll(){const a=this.request();a.on("data",this.onData.bind(this)),a.on("error",(r,l)=>{this.onError("xhr poll error",r,l)}),this.pollXhr=a}}let Pr=class Do extends jt{constructor(a,r,l){super(),this.createRequest=a,Fo(this,l),this._opts=l,this._method=l.method||"GET",this._uri=r,this._data=l.data!==void 0?l.data:null,this._create()}_create(){var a;const r=$v(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const l=this._xhr=this.createRequest(r);try{l.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){l.setDisableHeaderCheck&&l.setDisableHeaderCheck(!0);for(let c in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(c)&&l.setRequestHeader(c,this._opts.extraHeaders[c])}}catch{}if(this._method==="POST")try{l.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{l.setRequestHeader("Accept","*/*")}catch{}(a=this._opts.cookieJar)===null||a===void 0||a.addCookies(l),"withCredentials"in l&&(l.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(l.timeout=this._opts.requestTimeout),l.onreadystatechange=()=>{var c;l.readyState===3&&((c=this._opts.cookieJar)===null||c===void 0||c.parseCookies(l.getResponseHeader("set-cookie"))),l.readyState===4&&(l.status===200||l.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof l.status=="number"?l.status:0)},0))},l.send(this._data)}catch(c){this.setTimeoutFn(()=>{this._onError(c)},0);return}typeof document<"u"&&(this._index=Do.requestsCount++,Do.requests[this._index]=this)}_onError(a){this.emitReserved("error",a,this._xhr),this._cleanup(!0)}_cleanup(a){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=ZC,a)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Do.requests[this._index],this._xhr=null}}_onLoad(){const a=this._xhr.responseText;a!==null&&(this.emitReserved("data",a),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Pr.requestsCount=0;Pr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",dy);else if(typeof addEventListener=="function"){const n="onpagehide"in Kn?"pagehide":"unload";addEventListener(n,dy,!1)}}function dy(){for(let n in Pr.requests)Pr.requests.hasOwnProperty(n)&&Pr.requests[n].abort()}const JC=(function(){const n=t0({xdomain:!1});return n&&n.responseType!==null})();class $C extends IC{constructor(a){super(a);const r=a&&a.forceBase64;this.supportsBinary=JC&&!r}request(a={}){return Object.assign(a,{xd:this.xd},this.opts),new Pr(t0,this.uri(),a)}}function t0(n){const a=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!a||XC))return new XMLHttpRequest}catch{}if(!a)try{return new Kn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const n0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class WC extends ud{get name(){return"websocket"}doOpen(){const a=this.uri(),r=this.opts.protocols,l=n0?{}:$v(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(l.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(a,r,l)}catch(c){return this.emitReserved("error",c)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=a=>this.onClose({description:"websocket connection closed",context:a}),this.ws.onmessage=a=>this.onData(a.data),this.ws.onerror=a=>this.onError("websocket error",a)}write(a){this.writable=!1;for(let r=0;r<a.length;r++){const l=a[r],c=r===a.length-1;ld(l,this.supportsBinary,f=>{try{this.doWrite(l,f)}catch{}c&&Yo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const a=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=Wv()),this.supportsBinary||(r.b64=1),this.createUri(a,r)}}const vf=Kn.WebSocket||Kn.MozWebSocket;class eA extends WC{createSocket(a,r,l){return n0?new vf(a,r,l):r?new vf(a,r):new vf(a)}doWrite(a,r){this.ws.send(r)}}class tA extends ud{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(a){return this.emitReserved("error",a)}this._transport.closed.then(()=>{this.onClose()}).catch(a=>{this.onError("webtransport error",a)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(a=>{const r=LC(Number.MAX_SAFE_INTEGER,this.socket.binaryType),l=a.readable.pipeThrough(r).getReader(),c=zC();c.readable.pipeTo(a.writable),this._writer=c.writable.getWriter();const f=()=>{l.read().then(({done:m,value:g})=>{m||(this.onPacket(g),f())}).catch(m=>{})};f();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(a){this.writable=!1;for(let r=0;r<a.length;r++){const l=a[r],c=r===a.length-1;this._writer.write(l).then(()=>{c&&Yo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var a;(a=this._transport)===null||a===void 0||a.close()}}const nA={websocket:eA,webtransport:tA,polling:$C},aA=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,iA=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Uf(n){if(n.length>8e3)throw"URI too long";const a=n,r=n.indexOf("["),l=n.indexOf("]");r!=-1&&l!=-1&&(n=n.substring(0,r)+n.substring(r,l).replace(/:/g,";")+n.substring(l,n.length));let c=aA.exec(n||""),f={},d=14;for(;d--;)f[iA[d]]=c[d]||"";return r!=-1&&l!=-1&&(f.source=a,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=rA(f,f.path),f.queryKey=sA(f,f.query),f}function rA(n,a){const r=/\/{2,9}/g,l=a.replace(r,"/").split("/");return(a.slice(0,1)=="/"||a.length===0)&&l.splice(0,1),a.slice(-1)=="/"&&l.splice(l.length-1,1),l}function sA(n,a){const r={};return a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(l,c,f){c&&(r[c]=f)}),r}const Bf=typeof addEventListener=="function"&&typeof removeEventListener=="function",jo=[];Bf&&addEventListener("offline",()=>{jo.forEach(n=>n())},!1);class yi extends jt{constructor(a,r){if(super(),this.binaryType=BC,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,a&&typeof a=="object"&&(r=a,a=null),a){const l=Uf(a);r.hostname=l.host,r.secure=l.protocol==="https"||l.protocol==="wss",r.port=l.port,l.query&&(r.query=l.query)}else r.host&&(r.hostname=Uf(r.host).host);Fo(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(l=>{const c=l.prototype.name;this.transports.push(c),this._transportsByName[c]=l}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=VC(this.opts.query)),Bf&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},jo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(a){const r=Object.assign({},this.opts.query);r.EIO=Jv,r.transport=a,this.id&&(r.sid=this.id);const l=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[a]);return new this._transportsByName[a](l)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const a=this.opts.rememberUpgrade&&yi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(a);r.open(),this.setTransport(r)}setTransport(a){this.transport&&this.transport.removeAllListeners(),this.transport=a,a.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",yi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(a){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",a),this.emitReserved("heartbeat"),a.type){case"open":this.onHandshake(JSON.parse(a.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=a.data,this._onError(r);break;case"message":this.emitReserved("data",a.data),this.emitReserved("message",a.data);break}}onHandshake(a){this.emitReserved("handshake",a),this.id=a.sid,this.transport.query.sid=a.sid,this._pingInterval=a.pingInterval,this._pingTimeout=a.pingTimeout,this._maxPayload=a.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const a=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+a,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},a),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const a=this._getWritablePackets();this.transport.send(a),this._prevBufferLen=a.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let l=0;l<this.writeBuffer.length;l++){const c=this.writeBuffer[l].data;if(c&&(r+=PC(c)),l>0&&r>this._maxPayload)return this.writeBuffer.slice(0,l);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const a=Date.now()>this._pingTimeoutTime;return a&&(this._pingTimeoutTime=0,Yo(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),a}write(a,r,l){return this._sendPacket("message",a,r,l),this}send(a,r,l){return this._sendPacket("message",a,r,l),this}_sendPacket(a,r,l,c){if(typeof r=="function"&&(c=r,r=void 0),typeof l=="function"&&(c=l,l=null),this.readyState==="closing"||this.readyState==="closed")return;l=l||{},l.compress=l.compress!==!1;const f={type:a,data:r,options:l};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),c&&this.once("flush",c),this.flush()}close(){const a=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),a()},l=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?l():a()}):this.upgrading?l():a()),this}_onError(a){if(yi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",a),this._onClose("transport error",a)}_onClose(a,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Bf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const l=jo.indexOf(this._offlineEventListener);l!==-1&&jo.splice(l,1)}this.readyState="closed",this.id=null,this.emitReserved("close",a,r),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=Jv;class lA extends yi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let a=0;a<this._upgrades.length;a++)this._probe(this._upgrades[a])}_probe(a){let r=this.createTransport(a),l=!1;yi.priorWebsocketSuccess=!1;const c=()=>{l||(r.send([{type:"ping",data:"probe"}]),r.once("packet",y=>{if(!l)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;yi.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{l||this.readyState!=="closed"&&(x(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=r.name,this.emitReserved("upgradeError",T)}}))};function f(){l||(l=!0,x(),r.close(),r=null)}const d=y=>{const T=new Error("probe error: "+y);T.transport=r.name,f(),this.emitReserved("upgradeError",T)};function m(){d("transport closed")}function g(){d("socket closed")}function p(y){r&&y.name!==r.name&&f()}const x=()=>{r.removeListener("open",c),r.removeListener("error",d),r.removeListener("close",m),this.off("close",g),this.off("upgrading",p)};r.once("open",c),r.once("error",d),r.once("close",m),this.once("close",g),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&a!=="webtransport"?this.setTimeoutFn(()=>{l||r.open()},200):r.open()}onHandshake(a){this._upgrades=this._filterUpgrades(a.upgrades),super.onHandshake(a)}_filterUpgrades(a){const r=[];for(let l=0;l<a.length;l++)~this.transports.indexOf(a[l])&&r.push(a[l]);return r}}let oA=class extends lA{constructor(a,r={}){const l=typeof a=="object"?a:r;(!l.transports||l.transports&&typeof l.transports[0]=="string")&&(l.transports=(l.transports||["polling","websocket","webtransport"]).map(c=>nA[c]).filter(c=>!!c)),super(a,l)}};function uA(n,a="",r){let l=n;r=r||typeof location<"u"&&location,n==null&&(n=r.protocol+"//"+r.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=r.protocol+n:n=r.host+n),/^(https?|wss?):\/\//.test(n)||(typeof r<"u"?n=r.protocol+"//"+n:n="https://"+n),l=Uf(n)),l.port||(/^(http|ws)$/.test(l.protocol)?l.port="80":/^(http|ws)s$/.test(l.protocol)&&(l.port="443")),l.path=l.path||"/";const f=l.host.indexOf(":")!==-1?"["+l.host+"]":l.host;return l.id=l.protocol+"://"+f+":"+l.port+a,l.href=l.protocol+"://"+f+(r&&r.port===l.port?"":":"+l.port),l}const cA=typeof ArrayBuffer=="function",fA=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,a0=Object.prototype.toString,dA=typeof Blob=="function"||typeof Blob<"u"&&a0.call(Blob)==="[object BlobConstructor]",hA=typeof File=="function"||typeof File<"u"&&a0.call(File)==="[object FileConstructor]";function cd(n){return cA&&(n instanceof ArrayBuffer||fA(n))||dA&&n instanceof Blob||hA&&n instanceof File}function zo(n,a){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let r=0,l=n.length;r<l;r++)if(zo(n[r]))return!0;return!1}if(cd(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return zo(n.toJSON(),!0);for(const r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&zo(n[r]))return!0;return!1}function mA(n){const a=[],r=n.data,l=n;return l.data=qf(r,a),l.attachments=a.length,{packet:l,buffers:a}}function qf(n,a){if(!n)return n;if(cd(n)){const r={_placeholder:!0,num:a.length};return a.push(n),r}else if(Array.isArray(n)){const r=new Array(n.length);for(let l=0;l<n.length;l++)r[l]=qf(n[l],a);return r}else if(typeof n=="object"&&!(n instanceof Date)){const r={};for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(r[l]=qf(n[l],a));return r}return n}function pA(n,a){return n.data=Hf(n.data,a),delete n.attachments,n}function Hf(n,a){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<a.length)return a[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let r=0;r<n.length;r++)n[r]=Hf(n[r],a);else if(typeof n=="object")for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=Hf(n[r],a));return n}const gA=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ze;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(Ze||(Ze={}));class yA{constructor(a){this.replacer=a}encode(a){return(a.type===Ze.EVENT||a.type===Ze.ACK)&&zo(a)?this.encodeAsBinary({type:a.type===Ze.EVENT?Ze.BINARY_EVENT:Ze.BINARY_ACK,nsp:a.nsp,data:a.data,id:a.id}):[this.encodeAsString(a)]}encodeAsString(a){let r=""+a.type;return(a.type===Ze.BINARY_EVENT||a.type===Ze.BINARY_ACK)&&(r+=a.attachments+"-"),a.nsp&&a.nsp!=="/"&&(r+=a.nsp+","),a.id!=null&&(r+=a.id),a.data!=null&&(r+=JSON.stringify(a.data,this.replacer)),r}encodeAsBinary(a){const r=mA(a),l=this.encodeAsString(r.packet),c=r.buffers;return c.unshift(l),c}}class fd extends jt{constructor(a){super(),this.reviver=a}add(a){let r;if(typeof a=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(a);const l=r.type===Ze.BINARY_EVENT;l||r.type===Ze.BINARY_ACK?(r.type=l?Ze.EVENT:Ze.ACK,this.reconstructor=new vA(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(cd(a)||a.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(a),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+a)}decodeString(a){let r=0;const l={type:Number(a.charAt(0))};if(Ze[l.type]===void 0)throw new Error("unknown packet type "+l.type);if(l.type===Ze.BINARY_EVENT||l.type===Ze.BINARY_ACK){const f=r+1;for(;a.charAt(++r)!=="-"&&r!=a.length;);const d=a.substring(f,r);if(d!=Number(d)||a.charAt(r)!=="-")throw new Error("Illegal attachments");l.attachments=Number(d)}if(a.charAt(r+1)==="/"){const f=r+1;for(;++r&&!(a.charAt(r)===","||r===a.length););l.nsp=a.substring(f,r)}else l.nsp="/";const c=a.charAt(r+1);if(c!==""&&Number(c)==c){const f=r+1;for(;++r;){const d=a.charAt(r);if(d==null||Number(d)!=d){--r;break}if(r===a.length)break}l.id=Number(a.substring(f,r+1))}if(a.charAt(++r)){const f=this.tryParse(a.substr(r));if(fd.isPayloadValid(l.type,f))l.data=f;else throw new Error("invalid payload")}return l}tryParse(a){try{return JSON.parse(a,this.reviver)}catch{return!1}}static isPayloadValid(a,r){switch(a){case Ze.CONNECT:return hy(r);case Ze.DISCONNECT:return r===void 0;case Ze.CONNECT_ERROR:return typeof r=="string"||hy(r);case Ze.EVENT:case Ze.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&gA.indexOf(r[0])===-1);case Ze.ACK:case Ze.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class vA{constructor(a){this.packet=a,this.buffers=[],this.reconPack=a}takeBinaryData(a){if(this.buffers.push(a),this.buffers.length===this.reconPack.attachments){const r=pA(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function hy(n){return Object.prototype.toString.call(n)==="[object Object]"}const bA=Object.freeze(Object.defineProperty({__proto__:null,Decoder:fd,Encoder:yA,get PacketType(){return Ze}},Symbol.toStringTag,{value:"Module"}));function na(n,a,r){return n.on(a,r),function(){n.off(a,r)}}const xA=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class i0 extends jt{constructor(a,r,l){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=a,this.nsp=r,l&&l.auth&&(this.auth=l.auth),this._opts=Object.assign({},l),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const a=this.io;this.subs=[na(a,"open",this.onopen.bind(this)),na(a,"packet",this.onpacket.bind(this)),na(a,"error",this.onerror.bind(this)),na(a,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...a){return a.unshift("message"),this.emit.apply(this,a),this}emit(a,...r){var l,c,f;if(xA.hasOwnProperty(a))throw new Error('"'+a.toString()+'" is a reserved event name');if(r.unshift(a),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const d={type:Ze.EVENT,data:r};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const x=this.ids++,y=r.pop();this._registerAckCallback(x,y),d.id=x}const m=(c=(l=this.io.engine)===null||l===void 0?void 0:l.transport)===null||c===void 0?void 0:c.writable,g=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!m||(g?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(a,r){var l;const c=(l=this.flags.timeout)!==null&&l!==void 0?l:this._opts.ackTimeout;if(c===void 0){this.acks[a]=r;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[a];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===a&&this.sendBuffer.splice(m,1);r.call(this,new Error("operation has timed out"))},c),d=(...m)=>{this.io.clearTimeoutFn(f),r.apply(this,m)};d.withError=!0,this.acks[a]=d}emitWithAck(a,...r){return new Promise((l,c)=>{const f=(d,m)=>d?c(d):l(m);f.withError=!0,r.push(f),this.emit(a,...r)})}_addToQueue(a){let r;typeof a[a.length-1]=="function"&&(r=a.pop());const l={id:this._queueSeq++,tryCount:0,pending:!1,args:a,flags:Object.assign({fromQueue:!0},this.flags)};a.push((c,...f)=>(this._queue[0],c!==null?l.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(c)):(this._queue.shift(),r&&r(null,...f)),l.pending=!1,this._drainQueue())),this._queue.push(l),this._drainQueue()}_drainQueue(a=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!a||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(a){a.nsp=this.nsp,this.io._packet(a)}onopen(){typeof this.auth=="function"?this.auth(a=>{this._sendConnectPacket(a)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(a){this.packet({type:Ze.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},a):a})}onerror(a){this.connected||this.emitReserved("connect_error",a)}onclose(a,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",a,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(a=>{if(!this.sendBuffer.some(l=>String(l.id)===a)){const l=this.acks[a];delete this.acks[a],l.withError&&l.call(this,new Error("socket has been disconnected"))}})}onpacket(a){if(a.nsp===this.nsp)switch(a.type){case Ze.CONNECT:a.data&&a.data.sid?this.onconnect(a.data.sid,a.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ze.EVENT:case Ze.BINARY_EVENT:this.onevent(a);break;case Ze.ACK:case Ze.BINARY_ACK:this.onack(a);break;case Ze.DISCONNECT:this.ondisconnect();break;case Ze.CONNECT_ERROR:this.destroy();const l=new Error(a.data.message);l.data=a.data.data,this.emitReserved("connect_error",l);break}}onevent(a){const r=a.data||[];a.id!=null&&r.push(this.ack(a.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(a){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const l of r)l.apply(this,a)}super.emit.apply(this,a),this._pid&&a.length&&typeof a[a.length-1]=="string"&&(this._lastOffset=a[a.length-1])}ack(a){const r=this;let l=!1;return function(...c){l||(l=!0,r.packet({type:Ze.ACK,id:a,data:c}))}}onack(a){const r=this.acks[a.id];typeof r=="function"&&(delete this.acks[a.id],r.withError&&a.data.unshift(null),r.apply(this,a.data))}onconnect(a,r){this.id=a,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(a=>this.emitEvent(a)),this.receiveBuffer=[],this.sendBuffer.forEach(a=>{this.notifyOutgoingListeners(a),this.packet(a)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(a=>a()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ze.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(a){return this.flags.compress=a,this}get volatile(){return this.flags.volatile=!0,this}timeout(a){return this.flags.timeout=a,this}onAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(a),this}prependAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(a),this}offAny(a){if(!this._anyListeners)return this;if(a){const r=this._anyListeners;for(let l=0;l<r.length;l++)if(a===r[l])return r.splice(l,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(a),this}prependAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(a),this}offAnyOutgoing(a){if(!this._anyOutgoingListeners)return this;if(a){const r=this._anyOutgoingListeners;for(let l=0;l<r.length;l++)if(a===r[l])return r.splice(l,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(a){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const l of r)l.apply(this,a.data)}}}function Fr(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}Fr.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var a=Math.random(),r=Math.floor(a*this.jitter*n);n=(Math.floor(a*10)&1)==0?n-r:n+r}return Math.min(n,this.max)|0};Fr.prototype.reset=function(){this.attempts=0};Fr.prototype.setMin=function(n){this.ms=n};Fr.prototype.setMax=function(n){this.max=n};Fr.prototype.setJitter=function(n){this.jitter=n};class Qf extends jt{constructor(a,r){var l;super(),this.nsps={},this.subs=[],a&&typeof a=="object"&&(r=a,a=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Fo(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((l=r.randomizationFactor)!==null&&l!==void 0?l:.5),this.backoff=new Fr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=a;const c=r.parser||bA;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(a){return arguments.length?(this._reconnection=!!a,a||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(a){return a===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=a,this)}reconnectionDelay(a){var r;return a===void 0?this._reconnectionDelay:(this._reconnectionDelay=a,(r=this.backoff)===null||r===void 0||r.setMin(a),this)}randomizationFactor(a){var r;return a===void 0?this._randomizationFactor:(this._randomizationFactor=a,(r=this.backoff)===null||r===void 0||r.setJitter(a),this)}reconnectionDelayMax(a){var r;return a===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=a,(r=this.backoff)===null||r===void 0||r.setMax(a),this)}timeout(a){return arguments.length?(this._timeout=a,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(a){if(~this._readyState.indexOf("open"))return this;this.engine=new oA(this.uri,this.opts);const r=this.engine,l=this;this._readyState="opening",this.skipReconnect=!1;const c=na(r,"open",function(){l.onopen(),a&&a()}),f=m=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),a?a(m):this.maybeReconnectOnOpen()},d=na(r,"error",f);if(this._timeout!==!1){const m=this._timeout,g=this.setTimeoutFn(()=>{c(),f(new Error("timeout")),r.close()},m);this.opts.autoUnref&&g.unref(),this.subs.push(()=>{this.clearTimeoutFn(g)})}return this.subs.push(c),this.subs.push(d),this}connect(a){return this.open(a)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const a=this.engine;this.subs.push(na(a,"ping",this.onping.bind(this)),na(a,"data",this.ondata.bind(this)),na(a,"error",this.onerror.bind(this)),na(a,"close",this.onclose.bind(this)),na(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(a){try{this.decoder.add(a)}catch(r){this.onclose("parse error",r)}}ondecoded(a){Yo(()=>{this.emitReserved("packet",a)},this.setTimeoutFn)}onerror(a){this.emitReserved("error",a)}socket(a,r){let l=this.nsps[a];return l?this._autoConnect&&!l.active&&l.connect():(l=new i0(this,a,r),this.nsps[a]=l),l}_destroy(a){const r=Object.keys(this.nsps);for(const l of r)if(this.nsps[l].active)return;this._close()}_packet(a){const r=this.encoder.encode(a);for(let l=0;l<r.length;l++)this.engine.write(r[l],a.options)}cleanup(){this.subs.forEach(a=>a()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(a,r){var l;this.cleanup(),(l=this.engine)===null||l===void 0||l.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",a,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const a=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const l=this.setTimeoutFn(()=>{a.skipReconnect||(this.emitReserved("reconnect_attempt",a.backoff.attempts),!a.skipReconnect&&a.open(c=>{c?(a._reconnecting=!1,a.reconnect(),this.emitReserved("reconnect_error",c)):a.onreconnect()}))},r);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}}onreconnect(){const a=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",a)}}const Gs={};function Lo(n,a){typeof n=="object"&&(a=n,n=void 0),a=a||{};const r=uA(n,a.path||"/socket.io"),l=r.source,c=r.id,f=r.path,d=Gs[c]&&f in Gs[c].nsps,m=a.forceNew||a["force new connection"]||a.multiplex===!1||d;let g;return m?g=new Qf(l,a):(Gs[c]||(Gs[c]=new Qf(l,a)),g=Gs[c]),r.query&&!a.query&&(a.query=r.queryKey),g.socket(r.path,a)}Object.assign(Lo,{Manager:Qf,Socket:i0,io:Lo,connect:Lo});const Ro="/events",aR={SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",INPUT:"input",RESIZE:"resize",TERMINAL_INPUT:"terminal:input",TERMINAL_RESIZE:"terminal:resize"},pi={SESSION_STDOUT:"session:stdout",SESSION_PATCH:"session:patch",SESSION_EXIT:"session:exit",SESSION_COMPLETED:"session:completed",SESSION_ID:"session:sessionId",SESSION_ERROR:"session:error",TASK_UPDATED:"task:updated",TASK_DELETED:"task:deleted",TERMINAL_STDOUT:"terminal:stdout",TERMINAL_EXIT:"terminal:exit",TERMINAL_SUBSCRIBED:"terminal:subscribed",TERMINAL_UNSUBSCRIBED:"terminal:unsubscribed",WORKSPACE_SETUP_PROGRESS:"workspace:setup_progress",WORKSPACE_COMMIT_MESSAGE_UPDATED:"workspace:commit_message_updated",WORKSPACE_HIBERNATED:"workspace:hibernated",WORKSPACE_GIT_CHANGED:"workspace:git_changed",TEAM_RUN_INVALIDATED:"team-run:invalidated"};class SA{socket=null;baseUrl;visibilityHandler=null;constructor(){this.baseUrl=sT()}getSocket(){return this.socket||(this.socket=Lo(`${this.baseUrl}${Ro}`,{autoConnect:!1,transports:["websocket"],reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,reconnectionDelayMax:1e4}),this.socket.on("connect",()=>{console.log(`[Socket] Connected to ${Ro} t=${Date.now()}`)}),this.socket.on("disconnect",a=>{console.log(`[Socket] Disconnected from ${Ro}: t=${Date.now()}`,a)}),this.socket.on("connect_error",a=>{console.error(`[Socket] Connection error on ${Ro}: t=${Date.now()}`,a.message)})),this.socket}connect(){const a=this.getSocket();return a.connected||a.connect(),this.visibilityHandler||(this.visibilityHandler=()=>{document.visibilityState==="visible"&&this.socket&&!this.socket.connected&&(console.log("[Socket] Page became visible, socket disconnected — reconnecting"),this.socket.connect())},document.addEventListener("visibilitychange",this.visibilityHandler)),a}disconnect(){this.visibilityHandler&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.visibilityHandler=null),this.socket&&(this.socket.disconnect(),this.socket=null)}isConnected(){return this.socket?.connected??!1}}const Ws=new SA;function r0(n,a,r){const l=f=>Uo(f.queryKey,r),c=n.getQueriesData({predicate:l});return n.setQueriesData({predicate:l},f=>{if(!f||!Array.isArray(f.data))return f;const d=f.data.filter(m=>m.id!==a);return d.length===f.data.length?f:{...f,data:d,total:Math.max(0,f.total-(f.data.length-d.length))}}),n.removeQueries({queryKey:be.tasks.detail(a),exact:!0}),n.removeQueries({queryKey:be.tasks.body(a),exact:!0}),c}function Uo(n,a){return!Array.isArray(n)||n[0]!=="tasks"||n[1]!=="list"?!1:a?n[2]===a:!0}function Bo(n,a){if(!Array.isArray(n)||n[0]!=="tasks"||n[1]!=="board")return!1;if(!a)return!0;const r=n[2];if(!r||typeof r!="object")return!0;const l=r.projectId;return l==null||l===a}function s0(n,a,r){const l=f=>Bo(f.queryKey,r),c=n.getQueriesData({predicate:l});return n.setQueriesData({predicate:l},f=>{if(!f||!Array.isArray(f.data))return f;const d=f.data.filter(m=>m.id!==a);return d.length===f.data.length?f:{...f,data:d,total:Math.max(0,f.total-(f.data.length-d.length))}}),c}function wA(n,a){for(const[r,l]of a)n.setQueryData(r,l)}function EA(n,a){for(const[r,l]of a)n.setQueryData(r,l)}function iR(n){const a={};return n?.projectId&&(a.projectId=n.projectId),n?.status!=null&&(a.status=n.status),n?.page!=null&&(a.page=String(n.page)),n?.limit!=null&&(a.limit=String(n.limit)),rn({queryKey:be.tasks.board(n),queryFn:()=>Le.get("/task-board",{params:a})})}function rR(n,a=!0){return rn({queryKey:be.tasks.body(n),queryFn:()=>Le.get(`/tasks/${n}/body`),enabled:!!n&&a})}function sR(){const n=tt();return ht({mutationFn:({id:a,status:r})=>Le.patch(`/tasks/${a}/status`,{status:r}),onSuccess:a=>{n.invalidateQueries({queryKey:be.tasks.all}),n.invalidateQueries({queryKey:be.tasks.detail(a.id)})}})}function lR(){const n=tt();return ht({mutationFn:a=>Le.delete(`/tasks/${a}`),onMutate:async a=>{await n.cancelQueries({queryKey:be.tasks.all});const r=r0(n,a),l=s0(n,a);return{snapshots:r,boardSnapshots:l}},onError:(a,r,l)=>{l?.snapshots&&wA(n,l.snapshots),l?.boardSnapshots&&EA(n,l.boardSnapshots)},onSuccess:()=>{n.invalidateQueries({queryKey:be.tasks.all}),n.invalidateQueries({queryKey:be.projects.all})}})}function oR(){const n=tt();return ht({mutationFn:a=>Le.post(`/tasks/${a}/retry`,{}),onSuccess:a=>{n.invalidateQueries({queryKey:be.tasks.all}),n.invalidateQueries({queryKey:be.workspaces.all}),n.invalidateQueries({queryKey:be.tasks.detail(a.id)}),n.invalidateQueries({queryKey:be.tasks.body(a.id)})}})}function TA(){const n=tt();S.useEffect(()=>{const a=Ws.connect(),r=()=>{n.invalidateQueries({queryKey:be.tasks.all})},l=async f=>{await n.cancelQueries({predicate:d=>Uo(d.queryKey,f.projectId)||Bo(d.queryKey,f.projectId)}),n.invalidateQueries({predicate:d=>Uo(d.queryKey,f.projectId)||Bo(d.queryKey,f.projectId)}),n.invalidateQueries({queryKey:be.tasks.detail(f.taskId)})},c=f=>{r0(n,f.taskId,f.projectId),s0(n,f.taskId,f.projectId),n.invalidateQueries({predicate:d=>Uo(d.queryKey,f.projectId)||Bo(d.queryKey,f.projectId)}),n.invalidateQueries({queryKey:be.projects.all})};return a.on("connect",r),a.on(pi.TASK_UPDATED,l),a.on(pi.TASK_DELETED,c),()=>{a.off("connect",r),a.off(pi.TASK_UPDATED,l),a.off(pi.TASK_DELETED,c)}},[n])}const Oe={all:["team-runs"],memberPresets:["member-presets"],memberPresetDetail:n=>["member-presets","detail",n],teamTemplates:["team-templates"],teamTemplateDetail:n=>["team-templates","detail",n],task:n=>["team-runs","task",n],detail:n=>["team-runs","detail",n],messages:n=>["team-runs","messages",n],messageDetail:(n,a)=>["team-runs","messages",n,a],workRequests:n=>["team-runs","work-requests",n],invocations:n=>["team-runs","invocations",n]},l0=5e3;function o0(n,a){const r=n??[],l=r.findIndex(c=>c.id===a.id);return l>=0?r.map((c,f)=>f===l?a:c):[...r,a]}function my(n,a){return!n||n.id!==a.teamRunId?n:{...n,messages:o0(n.messages,a)}}function u0(n,a){const r=n.getQueryData(Oe.detail(a));if(r?.taskId)return r.taskId;const l=n.getQueriesData({queryKey:Oe.all});for(const[,c]of l)if(c?.id===a&&c.taskId)return c.taskId}function Xr(n,a){const r=u0(n,a);n.invalidateQueries({queryKey:Oe.all}),n.invalidateQueries({queryKey:Oe.detail(a)}),n.invalidateQueries({queryKey:Oe.workRequests(a)}),n.invalidateQueries({queryKey:Oe.invocations(a)}),n.invalidateQueries({queryKey:be.tasks.all}),n.invalidateQueries({queryKey:be.workspaces.all}),r&&(n.invalidateQueries({queryKey:be.tasks.detail(r)}),n.invalidateQueries({queryKey:Oe.task(r)}),n.invalidateQueries({queryKey:be.workspaces.list(r)}))}function uR(){return rn({queryKey:Oe.memberPresets,queryFn:()=>Le.get("/member-presets")})}function cR(){const n=tt();return ht({mutationFn:a=>Le.post("/member-presets",a),onSuccess:()=>{n.invalidateQueries({queryKey:Oe.memberPresets}),n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function fR(){const n=tt();return ht({mutationFn:({id:a,data:r})=>Le.patch(`/member-presets/${a}`,r),onSuccess:(a,r)=>{n.invalidateQueries({queryKey:Oe.memberPresets}),n.invalidateQueries({queryKey:Oe.memberPresetDetail(r.id)}),n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function dR(){const n=tt();return ht({mutationFn:a=>Le.delete(`/member-presets/${a}`),onSuccess:()=>{n.invalidateQueries({queryKey:Oe.memberPresets}),n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function hR(){return rn({queryKey:Oe.teamTemplates,queryFn:()=>Le.get("/team-templates")})}function mR(){const n=tt();return ht({mutationFn:a=>Le.post("/team-templates",a),onSuccess:()=>{n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function pR(){const n=tt();return ht({mutationFn:({id:a,data:r})=>Le.patch(`/team-templates/${a}`,r),onSuccess:(a,r)=>{n.invalidateQueries({queryKey:Oe.teamTemplates}),n.invalidateQueries({queryKey:Oe.teamTemplateDetail(r.id)})}})}function gR(){const n=tt();return ht({mutationFn:a=>Le.delete(`/team-templates/${a}`),onSuccess:()=>{n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function yR(){const n=tt();return ht({mutationFn:({taskId:a,...r})=>Le.post(`/tasks/${a}/team-runs`,r),onSuccess:(a,r)=>{n.setQueryData(Oe.task(r.taskId),a),n.setQueryData(Oe.detail(a.id),a),n.setQueryData(Oe.messages(a.id),a.messages??[]),n.setQueryData(Oe.workRequests(a.id),a.workRequests??[]),n.setQueryData(Oe.invocations(a.id),a.invocations??[]),n.invalidateQueries({queryKey:Oe.task(r.taskId)}),n.invalidateQueries({queryKey:Oe.all}),n.invalidateQueries({queryKey:be.tasks.all}),n.invalidateQueries({queryKey:be.tasks.detail(r.taskId)}),n.invalidateQueries({queryKey:be.workspaces.all}),n.invalidateQueries({queryKey:be.workspaces.list(r.taskId)})},onError:(a,r)=>{n.invalidateQueries({queryKey:Oe.task(r.taskId)}),n.invalidateQueries({queryKey:Oe.all})}})}function vR(n){return rn({queryKey:Oe.task(n),queryFn:async()=>{try{return await Le.get(`/tasks/${n}/team-run`)}catch(a){if(a instanceof rl&&a.status===404)return null;throw a}},enabled:!!n,retry:!1,refetchInterval:a=>a.state.data?l0:!1})}function bR(n){return rn({queryKey:Oe.messages(n),queryFn:async()=>{try{return await Le.get(`/team-runs/${n}/messages`)}catch(a){if(a instanceof rl&&a.status===404)return[];throw a}},enabled:!!n,retry:!1,refetchInterval:l0})}function xR(n,a,r=!1){return rn({queryKey:Oe.messageDetail(n,a),queryFn:()=>Le.get(`/team-runs/${n}/messages/${a}`),enabled:!!(n&&a&&r),retry:!1})}function SR(n){const a=tt();return ht({mutationFn:r=>Le.post(`/team-runs/${n}/messages`,r),onSuccess:r=>{a.setQueryData(Oe.messages(n),c=>o0(c,r)),a.setQueryData(Oe.detail(n),c=>my(c,r));const l=u0(a,n);l&&a.setQueryData(Oe.task(l),c=>my(c,r)),a.invalidateQueries({queryKey:Oe.all}),a.invalidateQueries({queryKey:["tasks"]}),a.invalidateQueries({queryKey:be.workspaces.all})}})}function wR(n){const a=tt();return ht({mutationFn:r=>Le.post(`/team-runs/${n}/members`,r),onSuccess:()=>{Xr(a,n)}})}function ER(n){const a=tt();return ht({mutationFn:({memberId:r,data:l})=>Le.patch(`/team-runs/${n}/members/${r}`,l),onSuccess:()=>{Xr(a,n)}})}function TR(n){const a=tt();return ht({mutationFn:({memberId:r,stopActive:l=!0,cancelQueued:c=!0})=>Le.post(`/team-runs/${n}/members/${r}/remove`,{stopActive:l,cancelQueued:c}),onSuccess:()=>{Xr(a,n)}})}function CR(n){const a=tt();return ht({mutationFn:r=>Le.post(`/team-runs/work-requests/${r}/approve`),onSuccess:()=>{Xr(a,n)}})}function AR(n){const a=tt();return ht({mutationFn:r=>Le.post(`/team-runs/work-requests/${r}/reject`),onSuccess:()=>{Xr(a,n)}})}function RR(n){const a=tt();return ht({mutationFn:({memberId:r,cancelQueued:l})=>Le.post(`/team-runs/${n}/members/${r}/stop`,{cancelQueued:l}),onSuccess:()=>{Xr(a,n)}})}function fa(n,a){return n.scopes.includes(a)}function CA(){const n=tt();S.useEffect(()=>{const a=Ws.connect(),r=f=>{if(!f){n.invalidateQueries({queryKey:Oe.all});return}n.invalidateQueries({queryKey:Oe.detail(f.teamRunId)}),(fa(f,"team-run")||fa(f,"team-members"))&&n.invalidateQueries({queryKey:Oe.all}),fa(f,"room-messages")&&n.invalidateQueries({queryKey:Oe.messages(f.teamRunId)}),fa(f,"work-requests")&&n.invalidateQueries({queryKey:Oe.workRequests(f.teamRunId)}),fa(f,"agent-invocations")&&n.invalidateQueries({queryKey:Oe.invocations(f.teamRunId)}),f.taskId&&n.invalidateQueries({queryKey:Oe.task(f.taskId)}),f.taskId&&(fa(f,"task")||fa(f,"team-run"))&&n.invalidateQueries({queryKey:be.tasks.detail(f.taskId)}),f.projectId&&(fa(f,"task")||fa(f,"team-run"))&&(n.invalidateQueries({queryKey:be.tasks.list(f.projectId)}),n.invalidateQueries({queryKey:be.tasks.boardAll})),fa(f,"workspaces")&&(n.invalidateQueries({queryKey:be.workspaces.all}),f.taskId&&n.invalidateQueries({queryKey:be.workspaces.list(f.taskId)}))},l=()=>r(),c=f=>r(f);return a.on("connect",l),a.on(pi.TEAM_RUN_INVALIDATED,c),()=>{a.off("connect",l),a.off(pi.TEAM_RUN_INVALIDATED,c)}},[n])}const AA=hv(n=>({visibleContext:null,setVisibleContext:a=>n({visibleContext:a})}));function RA(n){n.invalidateQueries({queryKey:be.git.all,refetchType:"none"}),n.invalidateQueries({queryKey:["workspaces","gitStatus"],refetchType:"none"}),n.invalidateQueries({queryKey:["workspaces","diff"],refetchType:"none"})}function _A(n,a){a.workingDir&&(n.invalidateQueries({queryKey:be.git.changes(a.workingDir),refetchType:"none"}),n.invalidateQueries({queryKey:be.git.log(a.workingDir),refetchType:"none"})),a.workspaceId&&n.invalidateQueries({queryKey:be.workspaces.gitStatus(a.workspaceId),refetchType:"none"})}function py(n,a,r){if(!(!a?.workspaceId||!a?.workingDir)){if(!r||r.workspaceId!==a.workspaceId||r.workingDir!==a.workingDir){_A(n,a);return}if(r.tab==="changes"){n.invalidateQueries({queryKey:be.git.changes(a.workingDir)}),n.invalidateQueries({queryKey:be.workspaces.gitStatus(a.workspaceId)}),n.invalidateQueries({queryKey:be.git.log(a.workingDir),refetchType:"none"});return}n.invalidateQueries({queryKey:be.git.log(a.workingDir)}),n.invalidateQueries({queryKey:be.git.changes(a.workingDir),refetchType:"none"}),n.invalidateQueries({queryKey:be.workspaces.gitStatus(a.workspaceId),refetchType:"none"})}}function kA(){const n=tt(),a=AA(r=>r.visibleContext);S.useEffect(()=>{const r=Ws.connect(),l=()=>{RA(n),a&&py(n,{workspaceId:a.workspaceId,workingDir:a.workingDir},a)},c=f=>{py(n,f,a)};return r.on("connect",l),r.on(pi.WORKSPACE_GIT_CHANGED,c),()=>{r.off("connect",l),r.off(pi.WORKSPACE_GIT_CHANGED,c)}},[n,a])}function NA(){return TA(),CA(),kA(),null}function OA({className:n,type:a="text",...r}){return v.jsx("input",{type:a,"data-slot":"input",className:Dt("w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground transition-colors","placeholder:text-muted-foreground/70","focus:border-ring focus:outline-none focus-visible:border-ring","disabled:cursor-not-allowed disabled:bg-muted/50 disabled:text-muted-foreground","aria-invalid:border-destructive",n),...r})}function MA(){return rn({queryKey:be.accessAuth.status,queryFn:()=>Le.get("/access-auth/status"),retry:!1})}function _R(n=!0){return rn({queryKey:be.accessAuth.settings,queryFn:()=>Le.get("/access-auth/settings"),enabled:n})}function DA(){const n=tt();return ht({mutationFn:a=>Le.post("/access-auth/login",{password:a}),onSuccess:a=>{n.setQueryData(be.accessAuth.status,a),n.invalidateQueries()}})}function kR(){const n=tt();return ht({mutationFn:()=>Le.post("/access-auth/logout",{}),onSuccess:a=>{n.setQueryData(be.accessAuth.status,a),n.invalidateQueries()}})}function NR(){const n=tt();return ht({mutationFn:a=>Le.put("/access-auth/settings",a),onSuccess:()=>{n.invalidateQueries({queryKey:be.accessAuth.status}),n.invalidateQueries({queryKey:be.accessAuth.settings})}})}function jA(){return v.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background text-foreground",children:v.jsx(Gr,{size:18,className:"animate-spin text-muted-foreground motion-reduce:animate-none","aria-hidden":"true"})})}function zA(){const[n,a]=S.useState(""),r=DA(),l=r.isError?Yi("密码不正确,请重试"):null;return v.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-foreground",children:v.jsxs("form",{className:"w-full max-w-sm space-y-5",onSubmit:c=>{c.preventDefault();const f=n;f&&r.mutate(f)},children:[v.jsxs("div",{className:"space-y-2 text-center",children:[v.jsx("div",{className:"mx-auto flex h-10 w-10 items-center justify-center rounded-lg bg-muted text-muted-foreground",children:v.jsx(qE,{size:18,"aria-hidden":"true"})}),v.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Agent Tower"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:Yi("输入访问密码继续")})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(OA,{type:"password",autoFocus:!0,autoComplete:"current-password",value:n,onChange:c=>{a(c.target.value),r.reset()},"aria-invalid":!!l,placeholder:Yi("访问密码")}),l&&v.jsx("p",{className:"text-xs text-destructive",children:l})]}),v.jsxs(ha,{className:"w-full",type:"submit",disabled:!n||r.isPending,children:[r.isPending&&v.jsx(Gr,{size:14,className:"mr-2 animate-spin motion-reduce:animate-none","aria-hidden":"true"}),r.isPending?Yi("验证中..."):Yi("解锁")]})]})})}function LA({children:n}){const{data:a,isLoading:r,isError:l}=MA();return r?v.jsx(jA,{}):l?v.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-sm text-muted-foreground",children:Yi("访问状态加载失败,请刷新后重试。")}):a?.enabled&&!a.authenticated?v.jsx(zA,{}):v.jsx(v.Fragment,{children:n})}function UA(){return S.useEffect(()=>(Ws.connect(),()=>Ws.disconnect()),[]),v.jsxs(gT,{children:[v.jsx(NA,{}),v.jsx(_C,{}),v.jsx(zx,{position:"top-center",toastOptions:{className:"text-sm",style:{fontFamily:"inherit"},classNames:{error:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg",success:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg",default:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg"}}})]})}function BA(){return v.jsx(I1,{client:Lx,children:v.jsx(LA,{children:v.jsx(UA,{})})})}const qA="/api/tunnel/bootstrap";async function HA(){const n=new URL(window.location.href),a=n.searchParams.get("token");if(!a)return;const r=await fetch(`${qA}?token=${encodeURIComponent(a)}`,{method:"POST",credentials:"same-origin"});if(!r.ok)throw new Error(`Tunnel bootstrap failed (${r.status})`);n.searchParams.delete("token"),window.history.replaceState({},"",n.toString())}async function QA(){try{await HA()}catch(n){console.error("[Tunnel] Failed to bootstrap tunnel session",n)}A1.createRoot(document.getElementById("root")).render(v.jsx(S.StrictMode,{children:v.jsx(BA,{})}))}QA();export{$A as $,sC as A,ha as B,RE as C,uR as D,hR as E,cR as F,fR as G,dR as H,OA as I,mR as J,pR as K,tR as L,gR as M,eR as N,rT as O,Ws as P,pi as Q,dC as R,g2 as S,Po as T,aR as U,qv as V,sv as W,dv as X,VE as Y,ZE as Z,WA as _,uT as a,GE as a0,y2 as a1,vE as a2,Gr as a3,Of as a4,JE as a5,q2 as a6,sw as a7,Ys as a8,Yi as a9,rl as aA,yR as aB,SR as aC,vR as aD,bR as aE,rR as aF,oR as aG,Oe as aH,iR as aI,lR as aJ,sR as aK,i2 as aL,wv as aM,hv as aN,ME as aa,gy as ab,fv as ac,cv as ad,YA as ae,fC as af,eT as ag,jE as ah,P1 as ai,mg as aj,GA as ak,PA as al,lx as am,ne as an,AA as ao,CR as ap,AR as aq,RR as ar,NE as as,qE as at,xR as au,wR as av,ER as aw,TR as ax,QE as ay,_n as az,VA as b,_R as c,cT as d,NR as e,kR as f,FA as g,ZA as h,XA as i,v as j,vt as k,Dt as l,rn as m,ht as n,tt as o,Le as p,be as q,S as r,JA as s,Ur as t,xi as u,IA as v,_t as w,zv as x,jf as y,ky as z};
122
+ `})]})}const tR=[{id:"tower-pulse",name:"Tower Pulse",description:"Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。",component:hA},{id:"stack-rise",name:"Stack Rise",description:"五根柱状条交错升降,暗喻任务编排队列,节奏感强。",component:mA},{id:"orbit-ring",name:"Orbit Ring",description:"双层同心圆环反向旋转,精密工具质感,不浮夸。",component:pA},{id:"terminal-cursor",name:"Terminal Cursor",description:"终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。",component:gA},{id:"dot-wave",name:"Dot Wave",description:"三点波浪脉动,极简克制,适合工具型产品的默认加载。",component:yA},{id:"layer-shift",name:"Layer Shift",description:"三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。",component:vA},{id:"progress-beam",name:"Progress Beam",description:"水平光束往复滑过进度条,线性进度隐喻,不阻断视线。",component:bA},{id:"skeleton-board",name:"Skeleton Board",description:"三列骨架屏微闪,预示看板布局,减少布局跳变。",component:xA},{id:"glyph-rotate",name:"Glyph Rotate",description:"圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。",component:SA},{id:"charcoal-breathe",name:"Charcoal Breathe",description:"Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。",component:Vv}];function Lr(){const{usesIntegratedTitlebar:n}=qv();return v.jsxs("div",{className:`fixed inset-0 z-50 flex items-center justify-center bg-background ${n?"app-region-drag":""}`,children:[v.jsx("style",{children:dA}),v.jsx(Vv,{size:"lg"})]})}const wA=S.lazy(()=>_n(()=>import("./ProjectKanbanPage-j2v5fLfg.js").then(n=>n.P),__vite__mapDeps([33,10,11,2,12,8,9,34,35,13,3,23,20,6,16,36,24,25,27,32,21,1,4,17,15,29,37])).then(n=>({default:n.ProjectKanbanPage}))),ly=S.lazy(()=>_n(()=>import("./ConversationPage-Cer_WtdC.js"),__vite__mapDeps([38,10,11,2,12,36,3,35,13,23,20,6,16,27,15])).then(n=>({default:n.ConversationPage}))),EA=S.lazy(()=>_n(()=>import("./DemoPage-Dpb9aAKX.js"),[]).then(n=>({default:n.DemoPage}))),TA=S.lazy(()=>_n(()=>import("./AgentDemoPage-BpUO2gR6.js"),__vite__mapDeps([39,36,2,3,10,11,12,34,31,21])).then(n=>({default:n.AgentDemoPage}))),AA=S.lazy(()=>_n(()=>import("./LoadingPreviewPage-DmH1TGln.js"),[]).then(n=>({default:n.LoadingPreviewPage}))),CA=new Set(["general","agent-environment","agents","team","projects","notifications","mcp","agents-legacy"]);function oy(){const n=q2(),{tab:a}=sw();return S.useEffect(()=>{const r=a&&CA.has(a)?a:"general";Ys.getState().openSettings(r),n("/",{replace:!0})},[n,a]),null}const RA=Ww([{path:"/",element:v.jsx(cA,{}),children:[{index:!0,element:v.jsx(S.Suspense,{fallback:v.jsx(Lr,{}),children:v.jsx(wA,{})})},{path:"conversations",element:v.jsx(S.Suspense,{fallback:v.jsx(Lr,{}),children:v.jsx(ly,{})})},{path:"conversations/:conversationId",element:v.jsx(S.Suspense,{fallback:v.jsx(Lr,{}),children:v.jsx(ly,{})})},{path:"demo",element:v.jsx(S.Suspense,{fallback:v.jsx(Lr,{}),children:v.jsx(EA,{})})},{path:"agent-demo",element:v.jsx(S.Suspense,{fallback:v.jsx(Lr,{}),children:v.jsx(TA,{})})},{path:"loading-preview",element:v.jsx(S.Suspense,{fallback:v.jsx(Lr,{}),children:v.jsx(AA,{})})},{path:"settings",element:v.jsx(oy,{})},{path:"settings/:tab",element:v.jsx(oy,{})}]}]);function _A(){return v.jsx(fE,{router:RA})}const pa=Object.create(null);pa.open="0";pa.close="1";pa.ping="2";pa.pong="3";pa.message="4";pa.upgrade="5";pa.noop="6";const Mo=Object.create(null);Object.keys(pa).forEach(n=>{Mo[pa[n]]=n});const Lf={type:"error",data:"parser error"},Yv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Fv=typeof ArrayBuffer=="function",Xv=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,ld=({type:n,data:a},r,l)=>Yv&&a instanceof Blob?r?l(a):uy(a,l):Fv&&(a instanceof ArrayBuffer||Xv(a))?r?l(a):uy(new Blob([a]),l):l(pa[n]+(a||"")),uy=(n,a)=>{const r=new FileReader;return r.onload=function(){const l=r.result.split(",")[1];a("b"+(l||""))},r.readAsDataURL(n)};function cy(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let gf;function kA(n,a){if(Yv&&n.data instanceof Blob)return n.data.arrayBuffer().then(cy).then(a);if(Fv&&(n.data instanceof ArrayBuffer||Xv(n.data)))return a(cy(n.data));ld(n,!1,r=>{gf||(gf=new TextEncoder),a(gf.encode(r))})}const fy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<fy.length;n++)Fs[fy.charCodeAt(n)]=n;const NA=n=>{let a=n.length*.75,r=n.length,l,c=0,f,d,m,g;n[n.length-1]==="="&&(a--,n[n.length-2]==="="&&a--);const p=new ArrayBuffer(a),x=new Uint8Array(p);for(l=0;l<r;l+=4)f=Fs[n.charCodeAt(l)],d=Fs[n.charCodeAt(l+1)],m=Fs[n.charCodeAt(l+2)],g=Fs[n.charCodeAt(l+3)],x[c++]=f<<2|d>>4,x[c++]=(d&15)<<4|m>>2,x[c++]=(m&3)<<6|g&63;return p},OA=typeof ArrayBuffer=="function",od=(n,a)=>{if(typeof n!="string")return{type:"message",data:Iv(n,a)};const r=n.charAt(0);return r==="b"?{type:"message",data:MA(n.substring(1),a)}:Mo[r]?n.length>1?{type:Mo[r],data:n.substring(1)}:{type:Mo[r]}:Lf},MA=(n,a)=>{if(OA){const r=NA(n);return Iv(r,a)}else return{base64:!0,data:n}},Iv=(n,a)=>a==="blob"?n instanceof Blob?n:new Blob([n]):n instanceof ArrayBuffer?n:n.buffer,Zv="",DA=(n,a)=>{const r=n.length,l=new Array(r);let c=0;n.forEach((f,d)=>{ld(f,!1,m=>{l[d]=m,++c===r&&a(l.join(Zv))})})},jA=(n,a)=>{const r=n.split(Zv),l=[];for(let c=0;c<r.length;c++){const f=od(r[c],a);if(l.push(f),f.type==="error")break}return l};function zA(){return new TransformStream({transform(n,a){kA(n,r=>{const l=r.length;let c;if(l<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,l);else if(l<65536){c=new Uint8Array(3);const f=new DataView(c.buffer);f.setUint8(0,126),f.setUint16(1,l)}else{c=new Uint8Array(9);const f=new DataView(c.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(l))}n.data&&typeof n.data!="string"&&(c[0]|=128),a.enqueue(c),a.enqueue(r)})}})}let yf;function Ao(n){return n.reduce((a,r)=>a+r.length,0)}function Co(n,a){if(n[0].length===a)return n.shift();const r=new Uint8Array(a);let l=0;for(let c=0;c<a;c++)r[c]=n[0][l++],l===n[0].length&&(n.shift(),l=0);return n.length&&l<n[0].length&&(n[0]=n[0].slice(l)),r}function LA(n,a){yf||(yf=new TextDecoder);const r=[];let l=0,c=-1,f=!1;return new TransformStream({transform(d,m){for(r.push(d);;){if(l===0){if(Ao(r)<1)break;const g=Co(r,1);f=(g[0]&128)===128,c=g[0]&127,c<126?l=3:c===126?l=1:l=2}else if(l===1){if(Ao(r)<2)break;const g=Co(r,2);c=new DataView(g.buffer,g.byteOffset,g.length).getUint16(0),l=3}else if(l===2){if(Ao(r)<8)break;const g=Co(r,8),p=new DataView(g.buffer,g.byteOffset,g.length),x=p.getUint32(0);if(x>Math.pow(2,21)-1){m.enqueue(Lf);break}c=x*Math.pow(2,32)+p.getUint32(4),l=3}else{if(Ao(r)<c)break;const g=Co(r,c);m.enqueue(od(f?g:yf.decode(g),a)),l=0}if(c===0||c>n){m.enqueue(Lf);break}}}})}const Jv=4;function jt(n){if(n)return UA(n)}function UA(n){for(var a in jt.prototype)n[a]=jt.prototype[a];return n}jt.prototype.on=jt.prototype.addEventListener=function(n,a){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(a),this};jt.prototype.once=function(n,a){function r(){this.off(n,r),a.apply(this,arguments)}return r.fn=a,this.on(n,r),this};jt.prototype.off=jt.prototype.removeListener=jt.prototype.removeAllListeners=jt.prototype.removeEventListener=function(n,a){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+n];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var l,c=0;c<r.length;c++)if(l=r[c],l===a||l.fn===a){r.splice(c,1);break}return r.length===0&&delete this._callbacks["$"+n],this};jt.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var a=new Array(arguments.length-1),r=this._callbacks["$"+n],l=1;l<arguments.length;l++)a[l-1]=arguments[l];if(r){r=r.slice(0);for(var l=0,c=r.length;l<c;++l)r[l].apply(this,a)}return this};jt.prototype.emitReserved=jt.prototype.emit;jt.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};jt.prototype.hasListeners=function(n){return!!this.listeners(n).length};const Yo=typeof Promise=="function"&&typeof Promise.resolve=="function"?a=>Promise.resolve().then(a):(a,r)=>r(a,0),Kn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),BA="arraybuffer";function $v(n,...a){return a.reduce((r,l)=>(n.hasOwnProperty(l)&&(r[l]=n[l]),r),{})}const qA=Kn.setTimeout,HA=Kn.clearTimeout;function Fo(n,a){a.useNativeTimers?(n.setTimeoutFn=qA.bind(Kn),n.clearTimeoutFn=HA.bind(Kn)):(n.setTimeoutFn=Kn.setTimeout.bind(Kn),n.clearTimeoutFn=Kn.clearTimeout.bind(Kn))}const QA=1.33;function PA(n){return typeof n=="string"?GA(n):Math.ceil((n.byteLength||n.size)*QA)}function GA(n){let a=0,r=0;for(let l=0,c=n.length;l<c;l++)a=n.charCodeAt(l),a<128?r+=1:a<2048?r+=2:a<55296||a>=57344?r+=3:(l++,r+=4);return r}function Wv(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function KA(n){let a="";for(let r in n)n.hasOwnProperty(r)&&(a.length&&(a+="&"),a+=encodeURIComponent(r)+"="+encodeURIComponent(n[r]));return a}function VA(n){let a={},r=n.split("&");for(let l=0,c=r.length;l<c;l++){let f=r[l].split("=");a[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return a}class YA extends Error{constructor(a,r,l){super(a),this.description=r,this.context=l,this.type="TransportError"}}class ud extends jt{constructor(a){super(),this.writable=!1,Fo(this,a),this.opts=a,this.query=a.query,this.socket=a.socket,this.supportsBinary=!a.forceBase64}onError(a,r,l){return super.emitReserved("error",new YA(a,r,l)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(a){this.readyState==="open"&&this.write(a)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(a){const r=od(a,this.socket.binaryType);this.onPacket(r)}onPacket(a){super.emitReserved("packet",a)}onClose(a){this.readyState="closed",super.emitReserved("close",a)}pause(a){}createUri(a,r={}){return a+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const a=this.opts.hostname;return a.indexOf(":")===-1?a:"["+a+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(a){const r=KA(a);return r.length?"?"+r:""}}class FA extends ud{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(a){this.readyState="pausing";const r=()=>{this.readyState="paused",a()};if(this._polling||!this.writable){let l=0;this._polling&&(l++,this.once("pollComplete",function(){--l||r()})),this.writable||(l++,this.once("drain",function(){--l||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(a){const r=l=>{if(this.readyState==="opening"&&l.type==="open"&&this.onOpen(),l.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(l)};jA(a,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const a=()=>{this.write([{type:"close"}])};this.readyState==="open"?a():this.once("open",a)}write(a){this.writable=!1,DA(a,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const a=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=Wv()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(a,r)}}let e0=!1;try{e0=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const XA=e0;function IA(){}class ZA extends FA{constructor(a){if(super(a),typeof location<"u"){const r=location.protocol==="https:";let l=location.port;l||(l=r?"443":"80"),this.xd=typeof location<"u"&&a.hostname!==location.hostname||l!==a.port}}doWrite(a,r){const l=this.request({method:"POST",data:a});l.on("success",r),l.on("error",(c,f)=>{this.onError("xhr post error",c,f)})}doPoll(){const a=this.request();a.on("data",this.onData.bind(this)),a.on("error",(r,l)=>{this.onError("xhr poll error",r,l)}),this.pollXhr=a}}let Pr=class Do extends jt{constructor(a,r,l){super(),this.createRequest=a,Fo(this,l),this._opts=l,this._method=l.method||"GET",this._uri=r,this._data=l.data!==void 0?l.data:null,this._create()}_create(){var a;const r=$v(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const l=this._xhr=this.createRequest(r);try{l.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){l.setDisableHeaderCheck&&l.setDisableHeaderCheck(!0);for(let c in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(c)&&l.setRequestHeader(c,this._opts.extraHeaders[c])}}catch{}if(this._method==="POST")try{l.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{l.setRequestHeader("Accept","*/*")}catch{}(a=this._opts.cookieJar)===null||a===void 0||a.addCookies(l),"withCredentials"in l&&(l.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(l.timeout=this._opts.requestTimeout),l.onreadystatechange=()=>{var c;l.readyState===3&&((c=this._opts.cookieJar)===null||c===void 0||c.parseCookies(l.getResponseHeader("set-cookie"))),l.readyState===4&&(l.status===200||l.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof l.status=="number"?l.status:0)},0))},l.send(this._data)}catch(c){this.setTimeoutFn(()=>{this._onError(c)},0);return}typeof document<"u"&&(this._index=Do.requestsCount++,Do.requests[this._index]=this)}_onError(a){this.emitReserved("error",a,this._xhr),this._cleanup(!0)}_cleanup(a){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=IA,a)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Do.requests[this._index],this._xhr=null}}_onLoad(){const a=this._xhr.responseText;a!==null&&(this.emitReserved("data",a),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Pr.requestsCount=0;Pr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",dy);else if(typeof addEventListener=="function"){const n="onpagehide"in Kn?"pagehide":"unload";addEventListener(n,dy,!1)}}function dy(){for(let n in Pr.requests)Pr.requests.hasOwnProperty(n)&&Pr.requests[n].abort()}const JA=(function(){const n=t0({xdomain:!1});return n&&n.responseType!==null})();class $A extends ZA{constructor(a){super(a);const r=a&&a.forceBase64;this.supportsBinary=JA&&!r}request(a={}){return Object.assign(a,{xd:this.xd},this.opts),new Pr(t0,this.uri(),a)}}function t0(n){const a=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!a||XA))return new XMLHttpRequest}catch{}if(!a)try{return new Kn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const n0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class WA extends ud{get name(){return"websocket"}doOpen(){const a=this.uri(),r=this.opts.protocols,l=n0?{}:$v(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(l.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(a,r,l)}catch(c){return this.emitReserved("error",c)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=a=>this.onClose({description:"websocket connection closed",context:a}),this.ws.onmessage=a=>this.onData(a.data),this.ws.onerror=a=>this.onError("websocket error",a)}write(a){this.writable=!1;for(let r=0;r<a.length;r++){const l=a[r],c=r===a.length-1;ld(l,this.supportsBinary,f=>{try{this.doWrite(l,f)}catch{}c&&Yo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const a=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=Wv()),this.supportsBinary||(r.b64=1),this.createUri(a,r)}}const vf=Kn.WebSocket||Kn.MozWebSocket;class eC extends WA{createSocket(a,r,l){return n0?new vf(a,r,l):r?new vf(a,r):new vf(a)}doWrite(a,r){this.ws.send(r)}}class tC extends ud{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(a){return this.emitReserved("error",a)}this._transport.closed.then(()=>{this.onClose()}).catch(a=>{this.onError("webtransport error",a)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(a=>{const r=LA(Number.MAX_SAFE_INTEGER,this.socket.binaryType),l=a.readable.pipeThrough(r).getReader(),c=zA();c.readable.pipeTo(a.writable),this._writer=c.writable.getWriter();const f=()=>{l.read().then(({done:m,value:g})=>{m||(this.onPacket(g),f())}).catch(m=>{})};f();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(a){this.writable=!1;for(let r=0;r<a.length;r++){const l=a[r],c=r===a.length-1;this._writer.write(l).then(()=>{c&&Yo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var a;(a=this._transport)===null||a===void 0||a.close()}}const nC={websocket:eC,webtransport:tC,polling:$A},aC=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,iC=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Uf(n){if(n.length>8e3)throw"URI too long";const a=n,r=n.indexOf("["),l=n.indexOf("]");r!=-1&&l!=-1&&(n=n.substring(0,r)+n.substring(r,l).replace(/:/g,";")+n.substring(l,n.length));let c=aC.exec(n||""),f={},d=14;for(;d--;)f[iC[d]]=c[d]||"";return r!=-1&&l!=-1&&(f.source=a,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=rC(f,f.path),f.queryKey=sC(f,f.query),f}function rC(n,a){const r=/\/{2,9}/g,l=a.replace(r,"/").split("/");return(a.slice(0,1)=="/"||a.length===0)&&l.splice(0,1),a.slice(-1)=="/"&&l.splice(l.length-1,1),l}function sC(n,a){const r={};return a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(l,c,f){c&&(r[c]=f)}),r}const Bf=typeof addEventListener=="function"&&typeof removeEventListener=="function",jo=[];Bf&&addEventListener("offline",()=>{jo.forEach(n=>n())},!1);class yi extends jt{constructor(a,r){if(super(),this.binaryType=BA,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,a&&typeof a=="object"&&(r=a,a=null),a){const l=Uf(a);r.hostname=l.host,r.secure=l.protocol==="https"||l.protocol==="wss",r.port=l.port,l.query&&(r.query=l.query)}else r.host&&(r.hostname=Uf(r.host).host);Fo(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(l=>{const c=l.prototype.name;this.transports.push(c),this._transportsByName[c]=l}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=VA(this.opts.query)),Bf&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},jo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(a){const r=Object.assign({},this.opts.query);r.EIO=Jv,r.transport=a,this.id&&(r.sid=this.id);const l=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[a]);return new this._transportsByName[a](l)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const a=this.opts.rememberUpgrade&&yi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(a);r.open(),this.setTransport(r)}setTransport(a){this.transport&&this.transport.removeAllListeners(),this.transport=a,a.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",yi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(a){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",a),this.emitReserved("heartbeat"),a.type){case"open":this.onHandshake(JSON.parse(a.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=a.data,this._onError(r);break;case"message":this.emitReserved("data",a.data),this.emitReserved("message",a.data);break}}onHandshake(a){this.emitReserved("handshake",a),this.id=a.sid,this.transport.query.sid=a.sid,this._pingInterval=a.pingInterval,this._pingTimeout=a.pingTimeout,this._maxPayload=a.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const a=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+a,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},a),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const a=this._getWritablePackets();this.transport.send(a),this._prevBufferLen=a.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let l=0;l<this.writeBuffer.length;l++){const c=this.writeBuffer[l].data;if(c&&(r+=PA(c)),l>0&&r>this._maxPayload)return this.writeBuffer.slice(0,l);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const a=Date.now()>this._pingTimeoutTime;return a&&(this._pingTimeoutTime=0,Yo(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),a}write(a,r,l){return this._sendPacket("message",a,r,l),this}send(a,r,l){return this._sendPacket("message",a,r,l),this}_sendPacket(a,r,l,c){if(typeof r=="function"&&(c=r,r=void 0),typeof l=="function"&&(c=l,l=null),this.readyState==="closing"||this.readyState==="closed")return;l=l||{},l.compress=l.compress!==!1;const f={type:a,data:r,options:l};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),c&&this.once("flush",c),this.flush()}close(){const a=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),a()},l=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?l():a()}):this.upgrading?l():a()),this}_onError(a){if(yi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",a),this._onClose("transport error",a)}_onClose(a,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Bf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const l=jo.indexOf(this._offlineEventListener);l!==-1&&jo.splice(l,1)}this.readyState="closed",this.id=null,this.emitReserved("close",a,r),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=Jv;class lC extends yi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let a=0;a<this._upgrades.length;a++)this._probe(this._upgrades[a])}_probe(a){let r=this.createTransport(a),l=!1;yi.priorWebsocketSuccess=!1;const c=()=>{l||(r.send([{type:"ping",data:"probe"}]),r.once("packet",y=>{if(!l)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;yi.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{l||this.readyState!=="closed"&&(x(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=r.name,this.emitReserved("upgradeError",T)}}))};function f(){l||(l=!0,x(),r.close(),r=null)}const d=y=>{const T=new Error("probe error: "+y);T.transport=r.name,f(),this.emitReserved("upgradeError",T)};function m(){d("transport closed")}function g(){d("socket closed")}function p(y){r&&y.name!==r.name&&f()}const x=()=>{r.removeListener("open",c),r.removeListener("error",d),r.removeListener("close",m),this.off("close",g),this.off("upgrading",p)};r.once("open",c),r.once("error",d),r.once("close",m),this.once("close",g),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&a!=="webtransport"?this.setTimeoutFn(()=>{l||r.open()},200):r.open()}onHandshake(a){this._upgrades=this._filterUpgrades(a.upgrades),super.onHandshake(a)}_filterUpgrades(a){const r=[];for(let l=0;l<a.length;l++)~this.transports.indexOf(a[l])&&r.push(a[l]);return r}}let oC=class extends lC{constructor(a,r={}){const l=typeof a=="object"?a:r;(!l.transports||l.transports&&typeof l.transports[0]=="string")&&(l.transports=(l.transports||["polling","websocket","webtransport"]).map(c=>nC[c]).filter(c=>!!c)),super(a,l)}};function uC(n,a="",r){let l=n;r=r||typeof location<"u"&&location,n==null&&(n=r.protocol+"//"+r.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=r.protocol+n:n=r.host+n),/^(https?|wss?):\/\//.test(n)||(typeof r<"u"?n=r.protocol+"//"+n:n="https://"+n),l=Uf(n)),l.port||(/^(http|ws)$/.test(l.protocol)?l.port="80":/^(http|ws)s$/.test(l.protocol)&&(l.port="443")),l.path=l.path||"/";const f=l.host.indexOf(":")!==-1?"["+l.host+"]":l.host;return l.id=l.protocol+"://"+f+":"+l.port+a,l.href=l.protocol+"://"+f+(r&&r.port===l.port?"":":"+l.port),l}const cC=typeof ArrayBuffer=="function",fC=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,a0=Object.prototype.toString,dC=typeof Blob=="function"||typeof Blob<"u"&&a0.call(Blob)==="[object BlobConstructor]",hC=typeof File=="function"||typeof File<"u"&&a0.call(File)==="[object FileConstructor]";function cd(n){return cC&&(n instanceof ArrayBuffer||fC(n))||dC&&n instanceof Blob||hC&&n instanceof File}function zo(n,a){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let r=0,l=n.length;r<l;r++)if(zo(n[r]))return!0;return!1}if(cd(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return zo(n.toJSON(),!0);for(const r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&zo(n[r]))return!0;return!1}function mC(n){const a=[],r=n.data,l=n;return l.data=qf(r,a),l.attachments=a.length,{packet:l,buffers:a}}function qf(n,a){if(!n)return n;if(cd(n)){const r={_placeholder:!0,num:a.length};return a.push(n),r}else if(Array.isArray(n)){const r=new Array(n.length);for(let l=0;l<n.length;l++)r[l]=qf(n[l],a);return r}else if(typeof n=="object"&&!(n instanceof Date)){const r={};for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(r[l]=qf(n[l],a));return r}return n}function pC(n,a){return n.data=Hf(n.data,a),delete n.attachments,n}function Hf(n,a){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<a.length)return a[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let r=0;r<n.length;r++)n[r]=Hf(n[r],a);else if(typeof n=="object")for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=Hf(n[r],a));return n}const gC=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ie;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(Ie||(Ie={}));class yC{constructor(a){this.replacer=a}encode(a){return(a.type===Ie.EVENT||a.type===Ie.ACK)&&zo(a)?this.encodeAsBinary({type:a.type===Ie.EVENT?Ie.BINARY_EVENT:Ie.BINARY_ACK,nsp:a.nsp,data:a.data,id:a.id}):[this.encodeAsString(a)]}encodeAsString(a){let r=""+a.type;return(a.type===Ie.BINARY_EVENT||a.type===Ie.BINARY_ACK)&&(r+=a.attachments+"-"),a.nsp&&a.nsp!=="/"&&(r+=a.nsp+","),a.id!=null&&(r+=a.id),a.data!=null&&(r+=JSON.stringify(a.data,this.replacer)),r}encodeAsBinary(a){const r=mC(a),l=this.encodeAsString(r.packet),c=r.buffers;return c.unshift(l),c}}class fd extends jt{constructor(a){super(),this.reviver=a}add(a){let r;if(typeof a=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(a);const l=r.type===Ie.BINARY_EVENT;l||r.type===Ie.BINARY_ACK?(r.type=l?Ie.EVENT:Ie.ACK,this.reconstructor=new vC(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(cd(a)||a.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(a),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+a)}decodeString(a){let r=0;const l={type:Number(a.charAt(0))};if(Ie[l.type]===void 0)throw new Error("unknown packet type "+l.type);if(l.type===Ie.BINARY_EVENT||l.type===Ie.BINARY_ACK){const f=r+1;for(;a.charAt(++r)!=="-"&&r!=a.length;);const d=a.substring(f,r);if(d!=Number(d)||a.charAt(r)!=="-")throw new Error("Illegal attachments");l.attachments=Number(d)}if(a.charAt(r+1)==="/"){const f=r+1;for(;++r&&!(a.charAt(r)===","||r===a.length););l.nsp=a.substring(f,r)}else l.nsp="/";const c=a.charAt(r+1);if(c!==""&&Number(c)==c){const f=r+1;for(;++r;){const d=a.charAt(r);if(d==null||Number(d)!=d){--r;break}if(r===a.length)break}l.id=Number(a.substring(f,r+1))}if(a.charAt(++r)){const f=this.tryParse(a.substr(r));if(fd.isPayloadValid(l.type,f))l.data=f;else throw new Error("invalid payload")}return l}tryParse(a){try{return JSON.parse(a,this.reviver)}catch{return!1}}static isPayloadValid(a,r){switch(a){case Ie.CONNECT:return hy(r);case Ie.DISCONNECT:return r===void 0;case Ie.CONNECT_ERROR:return typeof r=="string"||hy(r);case Ie.EVENT:case Ie.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&gC.indexOf(r[0])===-1);case Ie.ACK:case Ie.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class vC{constructor(a){this.packet=a,this.buffers=[],this.reconPack=a}takeBinaryData(a){if(this.buffers.push(a),this.buffers.length===this.reconPack.attachments){const r=pC(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function hy(n){return Object.prototype.toString.call(n)==="[object Object]"}const bC=Object.freeze(Object.defineProperty({__proto__:null,Decoder:fd,Encoder:yC,get PacketType(){return Ie}},Symbol.toStringTag,{value:"Module"}));function na(n,a,r){return n.on(a,r),function(){n.off(a,r)}}const xC=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class i0 extends jt{constructor(a,r,l){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=a,this.nsp=r,l&&l.auth&&(this.auth=l.auth),this._opts=Object.assign({},l),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const a=this.io;this.subs=[na(a,"open",this.onopen.bind(this)),na(a,"packet",this.onpacket.bind(this)),na(a,"error",this.onerror.bind(this)),na(a,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...a){return a.unshift("message"),this.emit.apply(this,a),this}emit(a,...r){var l,c,f;if(xC.hasOwnProperty(a))throw new Error('"'+a.toString()+'" is a reserved event name');if(r.unshift(a),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const d={type:Ie.EVENT,data:r};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const x=this.ids++,y=r.pop();this._registerAckCallback(x,y),d.id=x}const m=(c=(l=this.io.engine)===null||l===void 0?void 0:l.transport)===null||c===void 0?void 0:c.writable,g=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!m||(g?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(a,r){var l;const c=(l=this.flags.timeout)!==null&&l!==void 0?l:this._opts.ackTimeout;if(c===void 0){this.acks[a]=r;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[a];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===a&&this.sendBuffer.splice(m,1);r.call(this,new Error("operation has timed out"))},c),d=(...m)=>{this.io.clearTimeoutFn(f),r.apply(this,m)};d.withError=!0,this.acks[a]=d}emitWithAck(a,...r){return new Promise((l,c)=>{const f=(d,m)=>d?c(d):l(m);f.withError=!0,r.push(f),this.emit(a,...r)})}_addToQueue(a){let r;typeof a[a.length-1]=="function"&&(r=a.pop());const l={id:this._queueSeq++,tryCount:0,pending:!1,args:a,flags:Object.assign({fromQueue:!0},this.flags)};a.push((c,...f)=>(this._queue[0],c!==null?l.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(c)):(this._queue.shift(),r&&r(null,...f)),l.pending=!1,this._drainQueue())),this._queue.push(l),this._drainQueue()}_drainQueue(a=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!a||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(a){a.nsp=this.nsp,this.io._packet(a)}onopen(){typeof this.auth=="function"?this.auth(a=>{this._sendConnectPacket(a)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(a){this.packet({type:Ie.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},a):a})}onerror(a){this.connected||this.emitReserved("connect_error",a)}onclose(a,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",a,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(a=>{if(!this.sendBuffer.some(l=>String(l.id)===a)){const l=this.acks[a];delete this.acks[a],l.withError&&l.call(this,new Error("socket has been disconnected"))}})}onpacket(a){if(a.nsp===this.nsp)switch(a.type){case Ie.CONNECT:a.data&&a.data.sid?this.onconnect(a.data.sid,a.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ie.EVENT:case Ie.BINARY_EVENT:this.onevent(a);break;case Ie.ACK:case Ie.BINARY_ACK:this.onack(a);break;case Ie.DISCONNECT:this.ondisconnect();break;case Ie.CONNECT_ERROR:this.destroy();const l=new Error(a.data.message);l.data=a.data.data,this.emitReserved("connect_error",l);break}}onevent(a){const r=a.data||[];a.id!=null&&r.push(this.ack(a.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(a){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const l of r)l.apply(this,a)}super.emit.apply(this,a),this._pid&&a.length&&typeof a[a.length-1]=="string"&&(this._lastOffset=a[a.length-1])}ack(a){const r=this;let l=!1;return function(...c){l||(l=!0,r.packet({type:Ie.ACK,id:a,data:c}))}}onack(a){const r=this.acks[a.id];typeof r=="function"&&(delete this.acks[a.id],r.withError&&a.data.unshift(null),r.apply(this,a.data))}onconnect(a,r){this.id=a,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(a=>this.emitEvent(a)),this.receiveBuffer=[],this.sendBuffer.forEach(a=>{this.notifyOutgoingListeners(a),this.packet(a)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(a=>a()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ie.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(a){return this.flags.compress=a,this}get volatile(){return this.flags.volatile=!0,this}timeout(a){return this.flags.timeout=a,this}onAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(a),this}prependAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(a),this}offAny(a){if(!this._anyListeners)return this;if(a){const r=this._anyListeners;for(let l=0;l<r.length;l++)if(a===r[l])return r.splice(l,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(a),this}prependAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(a),this}offAnyOutgoing(a){if(!this._anyOutgoingListeners)return this;if(a){const r=this._anyOutgoingListeners;for(let l=0;l<r.length;l++)if(a===r[l])return r.splice(l,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(a){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const l of r)l.apply(this,a.data)}}}function Fr(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}Fr.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var a=Math.random(),r=Math.floor(a*this.jitter*n);n=(Math.floor(a*10)&1)==0?n-r:n+r}return Math.min(n,this.max)|0};Fr.prototype.reset=function(){this.attempts=0};Fr.prototype.setMin=function(n){this.ms=n};Fr.prototype.setMax=function(n){this.max=n};Fr.prototype.setJitter=function(n){this.jitter=n};class Qf extends jt{constructor(a,r){var l;super(),this.nsps={},this.subs=[],a&&typeof a=="object"&&(r=a,a=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Fo(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((l=r.randomizationFactor)!==null&&l!==void 0?l:.5),this.backoff=new Fr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=a;const c=r.parser||bC;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(a){return arguments.length?(this._reconnection=!!a,a||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(a){return a===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=a,this)}reconnectionDelay(a){var r;return a===void 0?this._reconnectionDelay:(this._reconnectionDelay=a,(r=this.backoff)===null||r===void 0||r.setMin(a),this)}randomizationFactor(a){var r;return a===void 0?this._randomizationFactor:(this._randomizationFactor=a,(r=this.backoff)===null||r===void 0||r.setJitter(a),this)}reconnectionDelayMax(a){var r;return a===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=a,(r=this.backoff)===null||r===void 0||r.setMax(a),this)}timeout(a){return arguments.length?(this._timeout=a,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(a){if(~this._readyState.indexOf("open"))return this;this.engine=new oC(this.uri,this.opts);const r=this.engine,l=this;this._readyState="opening",this.skipReconnect=!1;const c=na(r,"open",function(){l.onopen(),a&&a()}),f=m=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),a?a(m):this.maybeReconnectOnOpen()},d=na(r,"error",f);if(this._timeout!==!1){const m=this._timeout,g=this.setTimeoutFn(()=>{c(),f(new Error("timeout")),r.close()},m);this.opts.autoUnref&&g.unref(),this.subs.push(()=>{this.clearTimeoutFn(g)})}return this.subs.push(c),this.subs.push(d),this}connect(a){return this.open(a)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const a=this.engine;this.subs.push(na(a,"ping",this.onping.bind(this)),na(a,"data",this.ondata.bind(this)),na(a,"error",this.onerror.bind(this)),na(a,"close",this.onclose.bind(this)),na(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(a){try{this.decoder.add(a)}catch(r){this.onclose("parse error",r)}}ondecoded(a){Yo(()=>{this.emitReserved("packet",a)},this.setTimeoutFn)}onerror(a){this.emitReserved("error",a)}socket(a,r){let l=this.nsps[a];return l?this._autoConnect&&!l.active&&l.connect():(l=new i0(this,a,r),this.nsps[a]=l),l}_destroy(a){const r=Object.keys(this.nsps);for(const l of r)if(this.nsps[l].active)return;this._close()}_packet(a){const r=this.encoder.encode(a);for(let l=0;l<r.length;l++)this.engine.write(r[l],a.options)}cleanup(){this.subs.forEach(a=>a()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(a,r){var l;this.cleanup(),(l=this.engine)===null||l===void 0||l.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",a,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const a=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const l=this.setTimeoutFn(()=>{a.skipReconnect||(this.emitReserved("reconnect_attempt",a.backoff.attempts),!a.skipReconnect&&a.open(c=>{c?(a._reconnecting=!1,a.reconnect(),this.emitReserved("reconnect_error",c)):a.onreconnect()}))},r);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}}onreconnect(){const a=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",a)}}const Gs={};function Lo(n,a){typeof n=="object"&&(a=n,n=void 0),a=a||{};const r=uC(n,a.path||"/socket.io"),l=r.source,c=r.id,f=r.path,d=Gs[c]&&f in Gs[c].nsps,m=a.forceNew||a["force new connection"]||a.multiplex===!1||d;let g;return m?g=new Qf(l,a):(Gs[c]||(Gs[c]=new Qf(l,a)),g=Gs[c]),r.query&&!a.query&&(a.query=r.queryKey),g.socket(r.path,a)}Object.assign(Lo,{Manager:Qf,Socket:i0,io:Lo,connect:Lo});const Ro="/events",aR={SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",INPUT:"input",RESIZE:"resize",TERMINAL_INPUT:"terminal:input",TERMINAL_RESIZE:"terminal:resize"},pi={SESSION_STDOUT:"session:stdout",SESSION_PATCH:"session:patch",SESSION_EXIT:"session:exit",SESSION_COMPLETED:"session:completed",SESSION_ID:"session:sessionId",SESSION_ERROR:"session:error",SESSION_PERMISSION_REQUESTED:"session:permission_requested",SESSION_PERMISSION_INVALIDATED:"session:permission_invalidated",SESSION_RUNTIME_STATE_CHANGED:"session:runtime_state_changed",TASK_UPDATED:"task:updated",TASK_DELETED:"task:deleted",TERMINAL_STDOUT:"terminal:stdout",TERMINAL_EXIT:"terminal:exit",TERMINAL_SUBSCRIBED:"terminal:subscribed",TERMINAL_UNSUBSCRIBED:"terminal:unsubscribed",WORKSPACE_SETUP_PROGRESS:"workspace:setup_progress",WORKSPACE_COMMIT_MESSAGE_UPDATED:"workspace:commit_message_updated",WORKSPACE_HIBERNATED:"workspace:hibernated",WORKSPACE_GIT_CHANGED:"workspace:git_changed",TEAM_RUN_INVALIDATED:"team-run:invalidated"};class SC{socket=null;baseUrl;visibilityHandler=null;constructor(){this.baseUrl=sT()}getSocket(){return this.socket||(this.socket=Lo(`${this.baseUrl}${Ro}`,{autoConnect:!1,transports:["websocket"],reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,reconnectionDelayMax:1e4}),this.socket.on("connect",()=>{console.log(`[Socket] Connected to ${Ro} t=${Date.now()}`)}),this.socket.on("disconnect",a=>{console.log(`[Socket] Disconnected from ${Ro}: t=${Date.now()}`,a)}),this.socket.on("connect_error",a=>{console.error(`[Socket] Connection error on ${Ro}: t=${Date.now()}`,a.message)})),this.socket}connect(){const a=this.getSocket();return a.connected||a.connect(),this.visibilityHandler||(this.visibilityHandler=()=>{document.visibilityState==="visible"&&this.socket&&!this.socket.connected&&(console.log("[Socket] Page became visible, socket disconnected — reconnecting"),this.socket.connect())},document.addEventListener("visibilitychange",this.visibilityHandler)),a}disconnect(){this.visibilityHandler&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.visibilityHandler=null),this.socket&&(this.socket.disconnect(),this.socket=null)}isConnected(){return this.socket?.connected??!1}}const Ws=new SC;function r0(n,a,r){const l=f=>Uo(f.queryKey,r),c=n.getQueriesData({predicate:l});return n.setQueriesData({predicate:l},f=>{if(!f||!Array.isArray(f.data))return f;const d=f.data.filter(m=>m.id!==a);return d.length===f.data.length?f:{...f,data:d,total:Math.max(0,f.total-(f.data.length-d.length))}}),n.removeQueries({queryKey:be.tasks.detail(a),exact:!0}),n.removeQueries({queryKey:be.tasks.body(a),exact:!0}),c}function Uo(n,a){return!Array.isArray(n)||n[0]!=="tasks"||n[1]!=="list"?!1:a?n[2]===a:!0}function Bo(n,a){if(!Array.isArray(n)||n[0]!=="tasks"||n[1]!=="board")return!1;if(!a)return!0;const r=n[2];if(!r||typeof r!="object")return!0;const l=r.projectId;return l==null||l===a}function s0(n,a,r){const l=f=>Bo(f.queryKey,r),c=n.getQueriesData({predicate:l});return n.setQueriesData({predicate:l},f=>{if(!f||!Array.isArray(f.data))return f;const d=f.data.filter(m=>m.id!==a);return d.length===f.data.length?f:{...f,data:d,total:Math.max(0,f.total-(f.data.length-d.length))}}),c}function wC(n,a){for(const[r,l]of a)n.setQueryData(r,l)}function EC(n,a){for(const[r,l]of a)n.setQueryData(r,l)}function iR(n){const a={};return n?.projectId&&(a.projectId=n.projectId),n?.status!=null&&(a.status=n.status),n?.page!=null&&(a.page=String(n.page)),n?.limit!=null&&(a.limit=String(n.limit)),rn({queryKey:be.tasks.board(n),queryFn:()=>Le.get("/task-board",{params:a})})}function rR(n,a=!0){return rn({queryKey:be.tasks.body(n),queryFn:()=>Le.get(`/tasks/${n}/body`),enabled:!!n&&a})}function sR(){const n=tt();return ht({mutationFn:({id:a,status:r})=>Le.patch(`/tasks/${a}/status`,{status:r}),onSuccess:a=>{n.invalidateQueries({queryKey:be.tasks.all}),n.invalidateQueries({queryKey:be.tasks.detail(a.id)})}})}function lR(){const n=tt();return ht({mutationFn:a=>Le.delete(`/tasks/${a}`),onMutate:async a=>{await n.cancelQueries({queryKey:be.tasks.all});const r=r0(n,a),l=s0(n,a);return{snapshots:r,boardSnapshots:l}},onError:(a,r,l)=>{l?.snapshots&&wC(n,l.snapshots),l?.boardSnapshots&&EC(n,l.boardSnapshots)},onSuccess:()=>{n.invalidateQueries({queryKey:be.tasks.all}),n.invalidateQueries({queryKey:be.projects.all})}})}function oR(){const n=tt();return ht({mutationFn:a=>Le.post(`/tasks/${a}/retry`,{}),onSuccess:a=>{n.invalidateQueries({queryKey:be.tasks.all}),n.invalidateQueries({queryKey:be.workspaces.all}),n.invalidateQueries({queryKey:be.tasks.detail(a.id)}),n.invalidateQueries({queryKey:be.tasks.body(a.id)})}})}function TC(){const n=tt();S.useEffect(()=>{const a=Ws.connect(),r=()=>{n.invalidateQueries({queryKey:be.tasks.all})},l=async f=>{await n.cancelQueries({predicate:d=>Uo(d.queryKey,f.projectId)||Bo(d.queryKey,f.projectId)}),n.invalidateQueries({predicate:d=>Uo(d.queryKey,f.projectId)||Bo(d.queryKey,f.projectId)}),n.invalidateQueries({queryKey:be.tasks.detail(f.taskId)})},c=f=>{r0(n,f.taskId,f.projectId),s0(n,f.taskId,f.projectId),n.invalidateQueries({predicate:d=>Uo(d.queryKey,f.projectId)||Bo(d.queryKey,f.projectId)}),n.invalidateQueries({queryKey:be.projects.all})};return a.on("connect",r),a.on(pi.TASK_UPDATED,l),a.on(pi.TASK_DELETED,c),()=>{a.off("connect",r),a.off(pi.TASK_UPDATED,l),a.off(pi.TASK_DELETED,c)}},[n])}const Oe={all:["team-runs"],memberPresets:["member-presets"],memberPresetDetail:n=>["member-presets","detail",n],teamTemplates:["team-templates"],teamTemplateDetail:n=>["team-templates","detail",n],task:n=>["team-runs","task",n],detail:n=>["team-runs","detail",n],messages:n=>["team-runs","messages",n],messageDetail:(n,a)=>["team-runs","messages",n,a],workRequests:n=>["team-runs","work-requests",n],invocations:n=>["team-runs","invocations",n]},l0=5e3;function o0(n,a){const r=n??[],l=r.findIndex(c=>c.id===a.id);return l>=0?r.map((c,f)=>f===l?a:c):[...r,a]}function my(n,a){return!n||n.id!==a.teamRunId?n:{...n,messages:o0(n.messages,a)}}function u0(n,a){const r=n.getQueryData(Oe.detail(a));if(r?.taskId)return r.taskId;const l=n.getQueriesData({queryKey:Oe.all});for(const[,c]of l)if(c?.id===a&&c.taskId)return c.taskId}function Xr(n,a){const r=u0(n,a);n.invalidateQueries({queryKey:Oe.all}),n.invalidateQueries({queryKey:Oe.detail(a)}),n.invalidateQueries({queryKey:Oe.workRequests(a)}),n.invalidateQueries({queryKey:Oe.invocations(a)}),n.invalidateQueries({queryKey:be.tasks.all}),n.invalidateQueries({queryKey:be.workspaces.all}),r&&(n.invalidateQueries({queryKey:be.tasks.detail(r)}),n.invalidateQueries({queryKey:Oe.task(r)}),n.invalidateQueries({queryKey:be.workspaces.list(r)}))}function uR(){return rn({queryKey:Oe.memberPresets,queryFn:()=>Le.get("/member-presets")})}function cR(){const n=tt();return ht({mutationFn:a=>Le.post("/member-presets",a),onSuccess:()=>{n.invalidateQueries({queryKey:Oe.memberPresets}),n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function fR(){const n=tt();return ht({mutationFn:({id:a,data:r})=>Le.patch(`/member-presets/${a}`,r),onSuccess:(a,r)=>{n.invalidateQueries({queryKey:Oe.memberPresets}),n.invalidateQueries({queryKey:Oe.memberPresetDetail(r.id)}),n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function dR(){const n=tt();return ht({mutationFn:a=>Le.delete(`/member-presets/${a}`),onSuccess:()=>{n.invalidateQueries({queryKey:Oe.memberPresets}),n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function hR(){return rn({queryKey:Oe.teamTemplates,queryFn:()=>Le.get("/team-templates")})}function mR(){const n=tt();return ht({mutationFn:a=>Le.post("/team-templates",a),onSuccess:()=>{n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function pR(){const n=tt();return ht({mutationFn:({id:a,data:r})=>Le.patch(`/team-templates/${a}`,r),onSuccess:(a,r)=>{n.invalidateQueries({queryKey:Oe.teamTemplates}),n.invalidateQueries({queryKey:Oe.teamTemplateDetail(r.id)})}})}function gR(){const n=tt();return ht({mutationFn:a=>Le.delete(`/team-templates/${a}`),onSuccess:()=>{n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function yR(){const n=tt();return ht({mutationFn:({taskId:a,...r})=>Le.post(`/tasks/${a}/team-runs`,r),onSuccess:(a,r)=>{n.setQueryData(Oe.task(r.taskId),a),n.setQueryData(Oe.detail(a.id),a),n.setQueryData(Oe.messages(a.id),a.messages??[]),n.setQueryData(Oe.workRequests(a.id),a.workRequests??[]),n.setQueryData(Oe.invocations(a.id),a.invocations??[]),n.invalidateQueries({queryKey:Oe.task(r.taskId)}),n.invalidateQueries({queryKey:Oe.all}),n.invalidateQueries({queryKey:be.tasks.all}),n.invalidateQueries({queryKey:be.tasks.detail(r.taskId)}),n.invalidateQueries({queryKey:be.workspaces.all}),n.invalidateQueries({queryKey:be.workspaces.list(r.taskId)})},onError:(a,r)=>{n.invalidateQueries({queryKey:Oe.task(r.taskId)}),n.invalidateQueries({queryKey:Oe.all})}})}function vR(n){return rn({queryKey:Oe.task(n),queryFn:async()=>{try{return await Le.get(`/tasks/${n}/team-run`)}catch(a){if(a instanceof rl&&a.status===404)return null;throw a}},enabled:!!n,retry:!1,refetchInterval:a=>a.state.data?l0:!1})}function bR(n){return rn({queryKey:Oe.messages(n),queryFn:async()=>{try{return await Le.get(`/team-runs/${n}/messages`)}catch(a){if(a instanceof rl&&a.status===404)return[];throw a}},enabled:!!n,retry:!1,refetchInterval:l0})}function xR(n,a,r=!1){return rn({queryKey:Oe.messageDetail(n,a),queryFn:()=>Le.get(`/team-runs/${n}/messages/${a}`),enabled:!!(n&&a&&r),retry:!1})}function SR(n){const a=tt();return ht({mutationFn:r=>Le.post(`/team-runs/${n}/messages`,r),onSuccess:r=>{a.setQueryData(Oe.messages(n),c=>o0(c,r)),a.setQueryData(Oe.detail(n),c=>my(c,r));const l=u0(a,n);l&&a.setQueryData(Oe.task(l),c=>my(c,r)),a.invalidateQueries({queryKey:Oe.all}),a.invalidateQueries({queryKey:["tasks"]}),a.invalidateQueries({queryKey:be.workspaces.all})}})}function wR(n){const a=tt();return ht({mutationFn:r=>Le.post(`/team-runs/${n}/members`,r),onSuccess:()=>{Xr(a,n)}})}function ER(n){const a=tt();return ht({mutationFn:({memberId:r,data:l})=>Le.patch(`/team-runs/${n}/members/${r}`,l),onSuccess:()=>{Xr(a,n)}})}function TR(n){const a=tt();return ht({mutationFn:({memberId:r,stopActive:l=!0,cancelQueued:c=!0})=>Le.post(`/team-runs/${n}/members/${r}/remove`,{stopActive:l,cancelQueued:c}),onSuccess:()=>{Xr(a,n)}})}function AR(n){const a=tt();return ht({mutationFn:r=>Le.post(`/team-runs/work-requests/${r}/approve`),onSuccess:()=>{Xr(a,n)}})}function CR(n){const a=tt();return ht({mutationFn:r=>Le.post(`/team-runs/work-requests/${r}/reject`),onSuccess:()=>{Xr(a,n)}})}function RR(n){const a=tt();return ht({mutationFn:({memberId:r,cancelQueued:l})=>Le.post(`/team-runs/${n}/members/${r}/stop`,{cancelQueued:l}),onSuccess:()=>{Xr(a,n)}})}function fa(n,a){return n.scopes.includes(a)}function AC(){const n=tt();S.useEffect(()=>{const a=Ws.connect(),r=f=>{if(!f){n.invalidateQueries({queryKey:Oe.all});return}n.invalidateQueries({queryKey:Oe.detail(f.teamRunId)}),(fa(f,"team-run")||fa(f,"team-members"))&&n.invalidateQueries({queryKey:Oe.all}),fa(f,"room-messages")&&n.invalidateQueries({queryKey:Oe.messages(f.teamRunId)}),fa(f,"work-requests")&&n.invalidateQueries({queryKey:Oe.workRequests(f.teamRunId)}),fa(f,"agent-invocations")&&n.invalidateQueries({queryKey:Oe.invocations(f.teamRunId)}),f.taskId&&n.invalidateQueries({queryKey:Oe.task(f.taskId)}),f.taskId&&(fa(f,"task")||fa(f,"team-run"))&&n.invalidateQueries({queryKey:be.tasks.detail(f.taskId)}),f.projectId&&(fa(f,"task")||fa(f,"team-run"))&&(n.invalidateQueries({queryKey:be.tasks.list(f.projectId)}),n.invalidateQueries({queryKey:be.tasks.boardAll})),fa(f,"workspaces")&&(n.invalidateQueries({queryKey:be.workspaces.all}),f.taskId&&n.invalidateQueries({queryKey:be.workspaces.list(f.taskId)}))},l=()=>r(),c=f=>r(f);return a.on("connect",l),a.on(pi.TEAM_RUN_INVALIDATED,c),()=>{a.off("connect",l),a.off(pi.TEAM_RUN_INVALIDATED,c)}},[n])}const CC=hv(n=>({visibleContext:null,setVisibleContext:a=>n({visibleContext:a})}));function RC(n){n.invalidateQueries({queryKey:be.git.all,refetchType:"none"}),n.invalidateQueries({queryKey:["workspaces","gitStatus"],refetchType:"none"}),n.invalidateQueries({queryKey:["workspaces","diff"],refetchType:"none"})}function _C(n,a){a.workingDir&&(n.invalidateQueries({queryKey:be.git.changes(a.workingDir),refetchType:"none"}),n.invalidateQueries({queryKey:be.git.log(a.workingDir),refetchType:"none"})),a.workspaceId&&n.invalidateQueries({queryKey:be.workspaces.gitStatus(a.workspaceId),refetchType:"none"})}function py(n,a,r){if(!(!a?.workspaceId||!a?.workingDir)){if(!r||r.workspaceId!==a.workspaceId||r.workingDir!==a.workingDir){_C(n,a);return}if(r.tab==="changes"){n.invalidateQueries({queryKey:be.git.changes(a.workingDir)}),n.invalidateQueries({queryKey:be.workspaces.gitStatus(a.workspaceId)}),n.invalidateQueries({queryKey:be.git.log(a.workingDir),refetchType:"none"});return}n.invalidateQueries({queryKey:be.git.log(a.workingDir)}),n.invalidateQueries({queryKey:be.git.changes(a.workingDir),refetchType:"none"}),n.invalidateQueries({queryKey:be.workspaces.gitStatus(a.workspaceId),refetchType:"none"})}}function kC(){const n=tt(),a=CC(r=>r.visibleContext);S.useEffect(()=>{const r=Ws.connect(),l=()=>{RC(n),a&&py(n,{workspaceId:a.workspaceId,workingDir:a.workingDir},a)},c=f=>{py(n,f,a)};return r.on("connect",l),r.on(pi.WORKSPACE_GIT_CHANGED,c),()=>{r.off("connect",l),r.off(pi.WORKSPACE_GIT_CHANGED,c)}},[n,a])}function NC(){return TC(),AC(),kC(),null}function OC({className:n,type:a="text",...r}){return v.jsx("input",{type:a,"data-slot":"input",className:Dt("w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground transition-colors","placeholder:text-muted-foreground/70","focus:border-ring focus:outline-none focus-visible:border-ring","disabled:cursor-not-allowed disabled:bg-muted/50 disabled:text-muted-foreground","aria-invalid:border-destructive",n),...r})}function MC(){return rn({queryKey:be.accessAuth.status,queryFn:()=>Le.get("/access-auth/status"),retry:!1})}function _R(n=!0){return rn({queryKey:be.accessAuth.settings,queryFn:()=>Le.get("/access-auth/settings"),enabled:n})}function DC(){const n=tt();return ht({mutationFn:a=>Le.post("/access-auth/login",{password:a}),onSuccess:a=>{n.setQueryData(be.accessAuth.status,a),n.invalidateQueries()}})}function kR(){const n=tt();return ht({mutationFn:()=>Le.post("/access-auth/logout",{}),onSuccess:a=>{n.setQueryData(be.accessAuth.status,a),n.invalidateQueries()}})}function NR(){const n=tt();return ht({mutationFn:a=>Le.put("/access-auth/settings",a),onSuccess:()=>{n.invalidateQueries({queryKey:be.accessAuth.status}),n.invalidateQueries({queryKey:be.accessAuth.settings})}})}function jC(){return v.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background text-foreground",children:v.jsx(Gr,{size:18,className:"animate-spin text-muted-foreground motion-reduce:animate-none","aria-hidden":"true"})})}function zC(){const[n,a]=S.useState(""),r=DC(),l=r.isError?Yi("密码不正确,请重试"):null;return v.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-foreground",children:v.jsxs("form",{className:"w-full max-w-sm space-y-5",onSubmit:c=>{c.preventDefault();const f=n;f&&r.mutate(f)},children:[v.jsxs("div",{className:"space-y-2 text-center",children:[v.jsx("div",{className:"mx-auto flex h-10 w-10 items-center justify-center rounded-lg bg-muted text-muted-foreground",children:v.jsx(qE,{size:18,"aria-hidden":"true"})}),v.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Agent Tower"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:Yi("输入访问密码继续")})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(OC,{type:"password",autoFocus:!0,autoComplete:"current-password",value:n,onChange:c=>{a(c.target.value),r.reset()},"aria-invalid":!!l,placeholder:Yi("访问密码")}),l&&v.jsx("p",{className:"text-xs text-destructive",children:l})]}),v.jsxs(ha,{className:"w-full",type:"submit",disabled:!n||r.isPending,children:[r.isPending&&v.jsx(Gr,{size:14,className:"mr-2 animate-spin motion-reduce:animate-none","aria-hidden":"true"}),r.isPending?Yi("验证中..."):Yi("解锁")]})]})})}function LC({children:n}){const{data:a,isLoading:r,isError:l}=MC();return r?v.jsx(jC,{}):l?v.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-sm text-muted-foreground",children:Yi("访问状态加载失败,请刷新后重试。")}):a?.enabled&&!a.authenticated?v.jsx(zC,{}):v.jsx(v.Fragment,{children:n})}function UC(){return S.useEffect(()=>(Ws.connect(),()=>Ws.disconnect()),[]),v.jsxs(gT,{children:[v.jsx(NC,{}),v.jsx(_A,{}),v.jsx(zx,{position:"top-center",toastOptions:{className:"text-sm",style:{fontFamily:"inherit"},classNames:{error:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg",success:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg",default:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg"}}})]})}function BC(){return v.jsx(Z1,{client:Lx,children:v.jsx(LC,{children:v.jsx(UC,{})})})}const qC="/api/tunnel/bootstrap";async function HC(){const n=new URL(window.location.href),a=n.searchParams.get("token");if(!a)return;const r=await fetch(`${qC}?token=${encodeURIComponent(a)}`,{method:"POST",credentials:"same-origin"});if(!r.ok)throw new Error(`Tunnel bootstrap failed (${r.status})`);n.searchParams.delete("token"),window.history.replaceState({},"",n.toString())}async function QC(){try{await HC()}catch(n){console.error("[Tunnel] Failed to bootstrap tunnel session",n)}C1.createRoot(document.getElementById("root")).render(v.jsx(S.StrictMode,{children:v.jsx(BC,{})}))}QC();export{$C as $,sA as A,ha as B,RE as C,uR as D,hR as E,cR as F,fR as G,dR as H,OC as I,mR as J,pR as K,tR as L,gR as M,eR as N,rT as O,Ws as P,pi as Q,dA as R,g2 as S,Po as T,aR as U,qv as V,sv as W,dv as X,VE as Y,IE as Z,WC as _,uT as a,GE as a0,y2 as a1,vE as a2,Gr as a3,Of as a4,JE as a5,q2 as a6,sw as a7,Ys as a8,Yi as a9,yR as aA,SR as aB,vR as aC,bR as aD,rR as aE,oR as aF,Oe as aG,iR as aH,lR as aI,sR as aJ,i2 as aK,wv as aL,hv as aM,ME as aa,gy as ab,fv as ac,cv as ad,YC as ae,eT as af,jE as ag,P1 as ah,mg as ai,GC as aj,PC as ak,lx as al,ne as am,CC as an,AR as ao,CR as ap,RR as aq,NE as ar,qE as as,xR as at,wR as au,ER as av,TR as aw,QE as ax,_n as ay,rl as az,VC as b,_R as c,cT as d,NR as e,kR as f,FC as g,IC as h,XC as i,v as j,vt as k,Dt as l,rn as m,ht as n,tt as o,Le as p,be as q,S as r,JC as s,Ur as t,xi as u,ZC as v,_t as w,zv as x,jf as y,ky as z};