agent-tower 0.7.2 → 0.7.4-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 (339) hide show
  1. package/dist/executors/__tests__/providers.test.js +53 -0
  2. package/dist/executors/__tests__/providers.test.js.map +1 -1
  3. package/dist/executors/providers.d.ts +2 -0
  4. package/dist/executors/providers.d.ts.map +1 -1
  5. package/dist/executors/providers.js +3 -2
  6. package/dist/executors/providers.js.map +1 -1
  7. package/dist/git/base-branch.d.ts +3 -0
  8. package/dist/git/base-branch.d.ts.map +1 -0
  9. package/dist/git/base-branch.js +17 -0
  10. package/dist/git/base-branch.js.map +1 -0
  11. package/dist/git/worktree.manager.d.ts +2 -0
  12. package/dist/git/worktree.manager.d.ts.map +1 -1
  13. package/dist/git/worktree.manager.js +29 -8
  14. package/dist/git/worktree.manager.js.map +1 -1
  15. package/dist/git/worktree.manager.test.js +38 -0
  16. package/dist/git/worktree.manager.test.js.map +1 -1
  17. package/dist/mcp/http-client.d.ts +4 -6
  18. package/dist/mcp/http-client.d.ts.map +1 -1
  19. package/dist/mcp/http-client.js +6 -0
  20. package/dist/mcp/http-client.js.map +1 -1
  21. package/dist/mcp/tools/__tests__/providers.test.d.ts +2 -0
  22. package/dist/mcp/tools/__tests__/providers.test.d.ts.map +1 -0
  23. package/dist/mcp/tools/__tests__/providers.test.js +22 -0
  24. package/dist/mcp/tools/__tests__/providers.test.js.map +1 -0
  25. package/dist/mcp/tools/__tests__/tasks.test.d.ts +2 -0
  26. package/dist/mcp/tools/__tests__/tasks.test.d.ts.map +1 -0
  27. package/dist/mcp/tools/__tests__/tasks.test.js +49 -0
  28. package/dist/mcp/tools/__tests__/tasks.test.js.map +1 -0
  29. package/dist/mcp/tools/providers.d.ts.map +1 -1
  30. package/dist/mcp/tools/providers.js +3 -2
  31. package/dist/mcp/tools/providers.js.map +1 -1
  32. package/dist/mcp/tools/tasks.d.ts.map +1 -1
  33. package/dist/mcp/tools/tasks.js +31 -2
  34. package/dist/mcp/tools/tasks.js.map +1 -1
  35. package/dist/mcp/types.d.ts +27 -0
  36. package/dist/mcp/types.d.ts.map +1 -1
  37. package/dist/mcp/types.js +13 -0
  38. package/dist/mcp/types.js.map +1 -1
  39. package/dist/output/__tests__/text-block-lifecycle.test.js +37 -0
  40. package/dist/output/__tests__/text-block-lifecycle.test.js.map +1 -1
  41. package/dist/output/text-block-tracker.d.ts.map +1 -1
  42. package/dist/output/text-block-tracker.js +24 -1
  43. package/dist/output/text-block-tracker.js.map +1 -1
  44. package/dist/prompts/task-handoff.d.ts +6 -0
  45. package/dist/prompts/task-handoff.d.ts.map +1 -0
  46. package/dist/prompts/task-handoff.js +17 -0
  47. package/dist/prompts/task-handoff.js.map +1 -0
  48. package/dist/prompts/task-handoff.test.d.ts +2 -0
  49. package/dist/prompts/task-handoff.test.d.ts.map +1 -0
  50. package/dist/prompts/task-handoff.test.js +27 -0
  51. package/dist/prompts/task-handoff.test.js.map +1 -0
  52. package/dist/prompts/workspace-background-service-policy.d.ts +6 -0
  53. package/dist/prompts/workspace-background-service-policy.d.ts.map +1 -1
  54. package/dist/prompts/workspace-background-service-policy.js +2 -1
  55. package/dist/prompts/workspace-background-service-policy.js.map +1 -1
  56. package/dist/routes/__tests__/providers.test.js +67 -0
  57. package/dist/routes/__tests__/providers.test.js.map +1 -1
  58. package/dist/routes/__tests__/task-handoff.test.d.ts +2 -0
  59. package/dist/routes/__tests__/task-handoff.test.d.ts.map +1 -0
  60. package/dist/routes/__tests__/task-handoff.test.js +185 -0
  61. package/dist/routes/__tests__/task-handoff.test.js.map +1 -0
  62. package/dist/routes/__tests__/tasks.test.js +46 -0
  63. package/dist/routes/__tests__/tasks.test.js.map +1 -1
  64. package/dist/routes/providers.d.ts.map +1 -1
  65. package/dist/routes/providers.js +8 -0
  66. package/dist/routes/providers.js.map +1 -1
  67. package/dist/routes/tasks.d.ts.map +1 -1
  68. package/dist/routes/tasks.js +60 -2
  69. package/dist/routes/tasks.js.map +1 -1
  70. package/dist/runtime/acp/history-reconciler.js +1 -1
  71. package/dist/runtime/acp/history-reconciler.js.map +1 -1
  72. package/dist/services/__tests__/session-manager.lifecycle.test.js +171 -1
  73. package/dist/services/__tests__/session-manager.lifecycle.test.js.map +1 -1
  74. package/dist/services/__tests__/task.service.test.js +142 -76
  75. package/dist/services/__tests__/task.service.test.js.map +1 -1
  76. package/dist/services/__tests__/translation-protection.test.js +48 -18
  77. package/dist/services/__tests__/translation-protection.test.js.map +1 -1
  78. package/dist/services/__tests__/translation-session-blocks.test.js +66 -2
  79. package/dist/services/__tests__/translation-session-blocks.test.js.map +1 -1
  80. package/dist/services/__tests__/workspace-background-service.service.test.js +74 -26
  81. package/dist/services/__tests__/workspace-background-service.service.test.js.map +1 -1
  82. package/dist/services/__tests__/workspace.service.test.js +70 -0
  83. package/dist/services/__tests__/workspace.service.test.js.map +1 -1
  84. package/dist/services/message-delivery.service.d.ts +4 -1
  85. package/dist/services/message-delivery.service.d.ts.map +1 -1
  86. package/dist/services/project.service.d.ts +3 -0
  87. package/dist/services/project.service.d.ts.map +1 -1
  88. package/dist/services/provider-config.service.d.ts.map +1 -1
  89. package/dist/services/provider-config.service.js +1 -0
  90. package/dist/services/provider-config.service.js.map +1 -1
  91. package/dist/services/session-manager.d.ts +15 -5
  92. package/dist/services/session-manager.d.ts.map +1 -1
  93. package/dist/services/session-manager.js +19 -3
  94. package/dist/services/session-manager.js.map +1 -1
  95. package/dist/services/task-cleanup.service.d.ts +2 -0
  96. package/dist/services/task-cleanup.service.d.ts.map +1 -1
  97. package/dist/services/task-cleanup.service.js +2 -2
  98. package/dist/services/task-cleanup.service.js.map +1 -1
  99. package/dist/services/task-handoff.service.d.ts +18 -0
  100. package/dist/services/task-handoff.service.d.ts.map +1 -0
  101. package/dist/services/task-handoff.service.js +87 -0
  102. package/dist/services/task-handoff.service.js.map +1 -0
  103. package/dist/services/task.service.d.ts +45 -18
  104. package/dist/services/task.service.d.ts.map +1 -1
  105. package/dist/services/task.service.js +215 -160
  106. package/dist/services/task.service.js.map +1 -1
  107. package/dist/services/team-run.service.d.ts +3 -0
  108. package/dist/services/team-run.service.d.ts.map +1 -1
  109. package/dist/services/team-task-input.service.d.ts +3 -0
  110. package/dist/services/team-task-input.service.d.ts.map +1 -1
  111. package/dist/services/translation-protection.d.ts +3 -1
  112. package/dist/services/translation-protection.d.ts.map +1 -1
  113. package/dist/services/translation-protection.js +21 -67
  114. package/dist/services/translation-protection.js.map +1 -1
  115. package/dist/services/translation-settings.service.d.ts +4 -4
  116. package/dist/services/translation.service.d.ts.map +1 -1
  117. package/dist/services/translation.service.js +44 -20
  118. package/dist/services/translation.service.js.map +1 -1
  119. package/dist/services/workspace-background-service.service.d.ts +1 -3
  120. package/dist/services/workspace-background-service.service.d.ts.map +1 -1
  121. package/dist/services/workspace-background-service.service.js +17 -65
  122. package/dist/services/workspace-background-service.service.js.map +1 -1
  123. package/dist/services/workspace.service.d.ts +21 -6
  124. package/dist/services/workspace.service.d.ts.map +1 -1
  125. package/dist/services/workspace.service.js +56 -11
  126. package/dist/services/workspace.service.js.map +1 -1
  127. package/dist/web/assets/AgentDemoPage-JXetlNBf.js +1 -0
  128. package/dist/web/assets/{AgentEnvironmentSettingsPage-GHjKIWpb.js → AgentEnvironmentSettingsPage-CdYyUCwJ.js} +1 -1
  129. package/dist/web/assets/AttachmentPreview-DMS-PM-1.js +2 -0
  130. package/dist/web/assets/BranchSelect-BAq4L2ZS.js +1 -0
  131. package/dist/web/assets/BrandLogo--kWXXJtZ.js +1 -0
  132. package/dist/web/assets/ConversationPage-CvC4RyB5.js +1 -0
  133. package/dist/web/assets/CreateTaskInput-DjVxCAfc.js +1 -0
  134. package/dist/web/assets/{DemoPage-DK-ikg1_.js → DemoPage-cDVTGOp8.js} +3 -3
  135. package/dist/web/assets/DesignSystemPage-BI54IkKi.js +12 -0
  136. package/dist/web/assets/{ExecutionPermissionSelector-B8befbxJ.js → ExecutionPermissionSelector-f1UYIm1z.js} +1 -1
  137. package/dist/web/assets/GeneralSettingsPage-C0yto6C_.js +1 -0
  138. package/dist/web/assets/{LoadingPreviewPage-BDlf89rJ.js → LoadingPreviewPage-BiJSaHUi.js} +1 -1
  139. package/dist/web/assets/McpSettingsPage-BbHwZtyj.js +1 -0
  140. package/dist/web/assets/{MemberAvatar-YVr_erAr.js → MemberAvatar-BLezO3vS.js} +1 -1
  141. package/dist/web/assets/MobileTaskDetail-M_Kke9rL.js +3 -0
  142. package/dist/web/assets/NotificationSettingsPage-CiKoL2Kv.js +1 -0
  143. package/dist/web/assets/{ProfileSettingsPage-CHe4LlRp.js → ProfileSettingsPage-DCB48cPS.js} +2 -2
  144. package/dist/web/assets/ProjectKanbanPage-soDqevjQ.js +12 -0
  145. package/dist/web/assets/ProjectSettingsPage-COvIVq1h.js +2 -0
  146. package/dist/web/assets/ProviderSettingsPage-CPuJcZDg.js +67 -0
  147. package/dist/web/assets/{SettingsMasterDetail-DjWR9Sqk.js → SettingsMasterDetail-Cv7YaRJB.js} +1 -1
  148. package/dist/web/assets/TaskDetail-CqhPxvg3.js +1 -0
  149. package/dist/web/assets/TaskHandoffPanel-CxH3Mgyd.js +70 -0
  150. package/dist/web/assets/TeamSettingsPage-D-XDefNd.js +1 -0
  151. package/dist/web/assets/{TranslationSettingsPage-Cod9c4Ug.js → TranslationSettingsPage-BPHI-SZW.js} +1 -1
  152. package/dist/web/assets/{arc-DEy33vTc.js → arc-CC81aLuf.js} +1 -1
  153. package/dist/web/assets/{architectureDiagram-3BPJPVTR-Ky1D1LBk.js → architectureDiagram-3BPJPVTR-DL08XGaN.js} +1 -1
  154. package/dist/web/assets/{at-sign-C48_y345.js → at-sign-DYPIlD6D.js} +1 -1
  155. package/dist/web/assets/{blockDiagram-GPEHLZMM-BNgB7kNT.js → blockDiagram-GPEHLZMM-B4IW5WxI.js} +1 -1
  156. package/dist/web/assets/{c4Diagram-AAUBKEIU-4GMrPMgQ.js → c4Diagram-AAUBKEIU-Cj4d_FqK.js} +1 -1
  157. package/dist/web/assets/channel-CUa8oyzC.js +1 -0
  158. package/dist/web/assets/check-DaZqOL8l.js +1 -0
  159. package/dist/web/assets/{chevron-down-3y5Aiolp.js → chevron-down-DNhYsNAt.js} +1 -1
  160. package/dist/web/assets/{chevron-up-DqaYcjpq.js → chevron-up-CjrLieBR.js} +1 -1
  161. package/dist/web/assets/chip-Cf92J-pQ.js +1 -0
  162. package/dist/web/assets/{chunk-2J33WTMH-C439hRe_.js → chunk-2J33WTMH-DeCj8QSD.js} +1 -1
  163. package/dist/web/assets/{chunk-4BX2VUAB-D8GK3M3t.js → chunk-4BX2VUAB-k-6rzQmQ.js} +1 -1
  164. package/dist/web/assets/{chunk-55IACEB6-Dl4UhJ8X.js → chunk-55IACEB6-qMTCQ5bX.js} +1 -1
  165. package/dist/web/assets/{chunk-727SXJPM-BSEeayBq.js → chunk-727SXJPM-CMnu18d1.js} +1 -1
  166. package/dist/web/assets/{chunk-AQP2D5EJ-B6chbZfT.js → chunk-AQP2D5EJ-C0mFbUMn.js} +1 -1
  167. package/dist/web/assets/{chunk-FMBD7UC4-DaLkiLdQ.js → chunk-FMBD7UC4-u6-_M137.js} +1 -1
  168. package/dist/web/assets/{chunk-ND2GUHAM-DeQwZAAT.js → chunk-ND2GUHAM-DHrIE_8H.js} +1 -1
  169. package/dist/web/assets/{chunk-QZHKN3VN-CLRr4YRM.js → chunk-QZHKN3VN-aTyC0wZq.js} +1 -1
  170. package/dist/web/assets/classDiagram-4FO5ZUOK-BAx111NO.js +1 -0
  171. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-BAx111NO.js +1 -0
  172. package/dist/web/assets/{code-block-OCS4YCEC-CnoxUpOx.js → code-block-OCS4YCEC-CBIOQOMH.js} +1 -1
  173. package/dist/web/assets/confirm-dialog-DWeBZLJW.js +1 -0
  174. package/dist/web/assets/content-JM9E1MeD.js +2 -0
  175. package/dist/web/assets/{copy-HRMhTkIG.js → copy-D0gl9kF8.js} +1 -1
  176. package/dist/web/assets/{cose-bilkent-S5V4N54A-C1UiYzfk.js → cose-bilkent-S5V4N54A-xLyliSgU.js} +1 -1
  177. package/dist/web/assets/cssMode-DO5UnQ64.js +1 -0
  178. package/dist/web/assets/{dagre-BM42HDAG-CTJpBgye.js → dagre-BM42HDAG-CbNpoO2d.js} +1 -1
  179. package/dist/web/assets/{diagram-2AECGRRQ-Dj1_TEYp.js → diagram-2AECGRRQ-CG3hKxAX.js} +1 -1
  180. package/dist/web/assets/{diagram-5GNKFQAL-V-KUpwqh.js → diagram-5GNKFQAL-mQu9M28s.js} +1 -1
  181. package/dist/web/assets/{diagram-KO2AKTUF-CXG1ZIeX.js → diagram-KO2AKTUF-BSeEp_Uw.js} +1 -1
  182. package/dist/web/assets/{diagram-LMA3HP47-BZSJUwk9.js → diagram-LMA3HP47-D6yRdao-.js} +1 -1
  183. package/dist/web/assets/{diagram-OG6HWLK6-CCr4gq4u.js → diagram-OG6HWLK6-BUBUW9wD.js} +1 -1
  184. package/dist/web/assets/dialog-D1lkhqVL.js +5 -0
  185. package/dist/web/assets/{erDiagram-TEJ5UH35-Djtyzh6z.js → erDiagram-TEJ5UH35-BQSZgRqq.js} +1 -1
  186. package/dist/web/assets/file-BijjwxRR.js +1 -0
  187. package/dist/web/assets/{flowDiagram-I6XJVG4X-BmSVSiXJ.js → flowDiagram-I6XJVG4X-D-eqyr5Y.js} +1 -1
  188. package/dist/web/assets/folder-picker-Czxm0_S9.js +1 -0
  189. package/dist/web/assets/{freemarker2-DdptX5f1.js → freemarker2-B4RvEa_U.js} +2 -2
  190. package/dist/web/assets/{ganttDiagram-6RSMTGT7-r5vQX-b5.js → ganttDiagram-6RSMTGT7-BWGkCt_x.js} +1 -1
  191. package/dist/web/assets/{gitGraphDiagram-PVQCEYII-Zj9aloh9.js → gitGraphDiagram-PVQCEYII-DGVc49pR.js} +1 -1
  192. package/dist/web/assets/{globe-B9I-jHBB.js → globe-Ce01-45x.js} +1 -1
  193. package/dist/web/assets/handlebars-oyT7drqS.js +1 -0
  194. package/dist/web/assets/html-CxxWf2Qk.js +1 -0
  195. package/dist/web/assets/htmlMode-RfAHh5Jj.js +1 -0
  196. package/dist/web/assets/index-BMZFF1UJ.js +1 -0
  197. package/dist/web/assets/index-BN53vGxp.css +1 -0
  198. package/dist/web/assets/index-Cc3qXMhU.js +122 -0
  199. package/dist/web/assets/{index-Bhvt-E6d.js → index-DWrSDMX2.js} +2 -2
  200. package/dist/web/assets/{index-DkRy6eNX.js → index-Dh-tgeaL.js} +4 -4
  201. package/dist/web/assets/{index-B1oVmCie.js → index-Disv1kQS.js} +1 -1
  202. package/dist/web/assets/{index-DcOU2m2F.js → index-DyJfPc4O.js} +1 -1
  203. package/dist/web/assets/{index-Dk3bRQAK.js → index-Pt4TsHjm.js} +1 -1
  204. package/dist/web/assets/{index-CThFsQNP.js → index-T38iVLEb.js} +1 -1
  205. package/dist/web/assets/{index-BtUQYU5l.js → index-hpHE1jXY.js} +1 -1
  206. package/dist/web/assets/{infoDiagram-5YYISTIA-BHtVaxZx.js → infoDiagram-5YYISTIA-DLPs3dV_.js} +1 -1
  207. package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-BYmwjkbC.js → ishikawaDiagram-YF4QCWOH-d_OrnwDY.js} +1 -1
  208. package/dist/web/assets/javascript-BNXtViSL.js +1 -0
  209. package/dist/web/assets/{journeyDiagram-JHISSGLW-c8BBqqRS.js → journeyDiagram-JHISSGLW-EtU1st_0.js} +1 -1
  210. package/dist/web/assets/jsonMode-Bqh5vIxx.js +7 -0
  211. package/dist/web/assets/{kanban-definition-UN3LZRKU-D4Vr-oFT.js → kanban-definition-UN3LZRKU-ZWzUnsFK.js} +1 -1
  212. package/dist/web/assets/{kbd-C88ut3t9.js → kbd-IjDGsZ2B.js} +1 -1
  213. package/dist/web/assets/{key-round-Cjbj2qNa.js → key-round-CbnAuUxp.js} +1 -1
  214. package/dist/web/assets/{layers-eaHAVcc3.js → layers-Pdy9vZ6K.js} +1 -1
  215. package/dist/web/assets/{linear-opi90s0L.js → linear-D7n23wcA.js} +1 -1
  216. package/dist/web/assets/{link-BSGb85gq.js → link-Bl1ZbjFh.js} +1 -1
  217. package/dist/web/assets/liquid-Ds47iVLN.js +1 -0
  218. package/dist/web/assets/{lspLanguageFeatures-DWu2Ubf0.js → lspLanguageFeatures-Dcch3bsp.js} +1 -1
  219. package/dist/web/assets/mdx-CM7ky-2B.js +1 -0
  220. package/dist/web/assets/{menu--sjyisSg.js → menu-DubntFHq.js} +1 -1
  221. package/dist/web/assets/{mermaid-NOHMQCX5-BSNbBj78.js → mermaid-NOHMQCX5-nBsnjgeU.js} +54 -54
  222. package/dist/web/assets/{message-square-BLEJN6p7.js → message-square-BE-pW0m_.js} +1 -1
  223. package/dist/web/assets/{mindmap-definition-RKZ34NQL-BN3ZjBh-.js → mindmap-definition-RKZ34NQL-ClHORNTt.js} +1 -1
  224. package/dist/web/assets/modal-CHLtZWvx.js +1 -0
  225. package/dist/web/assets/{monaco-BkuNyOkP.js → monaco-BbAmalE2.js} +3 -3
  226. package/dist/web/assets/nav-row-DH7rNq1V.js +1 -0
  227. package/dist/web/assets/{paperclip-CTNoXpUW.js → paperclip-YP3Bk1lI.js} +1 -1
  228. package/dist/web/assets/{pencil-Cp70ZwtG.js → pencil-BFDuhbtW.js} +1 -1
  229. package/dist/web/assets/{people-DT78SebR.js → people-DEeNaaLt.js} +1 -1
  230. package/dist/web/assets/{pieDiagram-4H26LBE5-CfmFHpPI.js → pieDiagram-4H26LBE5-BUOaKIyP.js} +1 -1
  231. package/dist/web/assets/popover-CUmBEXxL.js +1 -0
  232. package/dist/web/assets/provider-selection-DSu7SCI7.js +1 -0
  233. package/dist/web/assets/python-BODTtU6m.js +1 -0
  234. package/dist/web/assets/{quadrantDiagram-W4KKPZXB-CeaumJAa.js → quadrantDiagram-W4KKPZXB-Caezg-U2.js} +1 -1
  235. package/dist/web/assets/razor-CHm8DY1p.js +1 -0
  236. package/dist/web/assets/{requirementDiagram-4Y6WPE33-BWWCDXCE.js → requirementDiagram-4Y6WPE33-BtdP3Ka6.js} +1 -1
  237. package/dist/web/assets/{sankeyDiagram-5OEKKPKP-DAJut743.js → sankeyDiagram-5OEKKPKP-Bv74oA-n.js} +1 -1
  238. package/dist/web/assets/{search-DniD_AGC.js → search-ClmOQd4H.js} +1 -1
  239. package/dist/web/assets/{select-BPdJrr5M.js → select-BB7QG08o.js} +1 -1
  240. package/dist/web/assets/{select-B5RYunTs.js → select-CYtYPr-c.js} +1 -1
  241. package/dist/web/assets/{sequenceDiagram-3UESZ5HK-CynjRGW4.js → sequenceDiagram-3UESZ5HK-DuNPl-dg.js} +1 -1
  242. package/dist/web/assets/{server-xswxWpKD.js → server-bEB_DY55.js} +1 -1
  243. package/dist/web/assets/{stateDiagram-AJRCARHV-amAtpx9w.js → stateDiagram-AJRCARHV-B72HAgBJ.js} +1 -1
  244. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-Bu3l_CgB.js +1 -0
  245. package/dist/web/assets/{textarea-BVyPl9rM.js → textarea-BqYPvoO-.js} +1 -1
  246. package/dist/web/assets/{timeline-definition-PNZ67QCA-DZ9W7WlP.js → timeline-definition-PNZ67QCA-DTmHUgmQ.js} +1 -1
  247. package/dist/web/assets/{toggles-QcIz43DP.js → toggles-a5fkwT_D.js} +1 -1
  248. package/dist/web/assets/tooltip-DuyJMci9.js +1 -0
  249. package/dist/web/assets/{track-Ckye0-tt.js → track-DCjyrv3n.js} +1 -1
  250. package/dist/web/assets/{trash-2-CvUJsbtT.js → trash-2-CIyBqaVy.js} +1 -1
  251. package/dist/web/assets/tsMode-C1UXAkMh.js +11 -0
  252. package/dist/web/assets/typescript-Biht2wHb.js +1 -0
  253. package/dist/web/assets/{upload-CsXAmAun.js → upload-D05XS5-G.js} +1 -1
  254. package/dist/web/assets/use-profiles-CrWTyz1G.js +1 -0
  255. package/dist/web/assets/{use-providers-Td1-gyrN.js → use-providers-Dv1Nk6s7.js} +1 -1
  256. package/dist/web/assets/{use-translation-settings-NYM0lmBx.js → use-translation-settings-CcUnipVO.js} +1 -1
  257. package/dist/web/assets/useNormalizedLogs-D9W1cT4R.js +1 -0
  258. package/dist/web/assets/useTokenUsage-CZ5mDshD.js +1 -0
  259. package/dist/web/assets/{vennDiagram-CIIHVFJN-CB2Ubvy9.js → vennDiagram-CIIHVFJN-ByoNydXe.js} +1 -1
  260. package/dist/web/assets/{wardley-L42UT6IY-BXOkk77I.js → wardley-L42UT6IY-BqdMkOLl.js} +1 -1
  261. package/dist/web/assets/{wardleyDiagram-YWT4CUSO-VA6ywdQQ.js → wardleyDiagram-YWT4CUSO-AO22HrEF.js} +1 -1
  262. package/dist/web/assets/xml-NLGqNFDv.js +1 -0
  263. package/dist/web/assets/{xychartDiagram-2RQKCTM6-FNcvDj5G.js → xychartDiagram-2RQKCTM6-vzPgjgqW.js} +1 -1
  264. package/dist/web/assets/yaml-AWlGS_Ig.js +1 -0
  265. package/dist/web/index.html +2 -2
  266. package/node_modules/@agent-tower/shared/dist/index.d.ts +1 -0
  267. package/node_modules/@agent-tower/shared/dist/index.d.ts.map +1 -1
  268. package/node_modules/@agent-tower/shared/dist/index.js +1 -0
  269. package/node_modules/@agent-tower/shared/dist/index.js.map +1 -1
  270. package/node_modules/@agent-tower/shared/dist/task-handoff.d.ts +12 -0
  271. package/node_modules/@agent-tower/shared/dist/task-handoff.d.ts.map +1 -0
  272. package/node_modules/@agent-tower/shared/dist/task-handoff.js +2 -0
  273. package/node_modules/@agent-tower/shared/dist/task-handoff.js.map +1 -0
  274. package/node_modules/@agent-tower/shared/dist/translation.d.ts +12 -0
  275. package/node_modules/@agent-tower/shared/dist/translation.d.ts.map +1 -1
  276. package/node_modules/@agent-tower/shared/dist/translation.js +19 -0
  277. package/node_modules/@agent-tower/shared/dist/translation.js.map +1 -1
  278. package/node_modules/@agent-tower/shared/dist/types.d.ts +28 -1
  279. package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -1
  280. package/node_modules/@agent-tower/shared/dist/types.js.map +1 -1
  281. package/package.json +1 -1
  282. package/prisma/migrations/20261023000000_add_task_base_branch/migration.sql +2 -0
  283. package/prisma/migrations/20261023010000_add_subtasks/migration.sql +2 -0
  284. package/prisma/migrations/20261026000000_add_task_handoff/migration.sql +1 -0
  285. package/prisma/schema.prisma +6 -0
  286. package/dist/web/assets/AgentDemoPage-BfXkNCdN.js +0 -1
  287. package/dist/web/assets/AttachmentPreview-CLN1lnLe.js +0 -2
  288. package/dist/web/assets/BranchSelect-Cofp8vYf.js +0 -1
  289. package/dist/web/assets/BrandLogo-BUimEX-9.js +0 -1
  290. package/dist/web/assets/ConversationPage-R7vNaOQv.js +0 -1
  291. package/dist/web/assets/CreateTaskInput-CasITF8y.js +0 -1
  292. package/dist/web/assets/DesignSystemPage-BhjNs2vP.js +0 -12
  293. package/dist/web/assets/EditableTaskTitle-BJ9Rxggf.js +0 -70
  294. package/dist/web/assets/GeneralSettingsPage-RMN2al8I.js +0 -1
  295. package/dist/web/assets/McpSettingsPage-CPNxFF67.js +0 -1
  296. package/dist/web/assets/MobileTaskDetail-QNUHMq7u.js +0 -3
  297. package/dist/web/assets/NotificationSettingsPage-BEyuyu3Z.js +0 -1
  298. package/dist/web/assets/ProjectKanbanPage-Bt_01giW.js +0 -12
  299. package/dist/web/assets/ProjectSettingsPage-cus6Ns97.js +0 -2
  300. package/dist/web/assets/ProviderSettingsPage-DqA_B1Ey.js +0 -67
  301. package/dist/web/assets/TaskDetail-rEXNe2h3.js +0 -1
  302. package/dist/web/assets/TeamSettingsPage-DwWROtW6.js +0 -1
  303. package/dist/web/assets/channel-DTP-syjA.js +0 -1
  304. package/dist/web/assets/check-BmiJ7qMY.js +0 -1
  305. package/dist/web/assets/classDiagram-4FO5ZUOK-CUKgurLa.js +0 -1
  306. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-CUKgurLa.js +0 -1
  307. package/dist/web/assets/confirm-dialog-ltNBFYCs.js +0 -1
  308. package/dist/web/assets/content-DPQMfMae.js +0 -2
  309. package/dist/web/assets/cssMode-DkuSsGeg.js +0 -1
  310. package/dist/web/assets/dialog-CuFEdqLg.js +0 -5
  311. package/dist/web/assets/handlebars-B34f-LAf.js +0 -1
  312. package/dist/web/assets/hooks-BLxb16IA.js +0 -1
  313. package/dist/web/assets/html-CnvOQ63o.js +0 -1
  314. package/dist/web/assets/htmlMode-RdxZ8Svp.js +0 -1
  315. package/dist/web/assets/icon-button-CYiKa-7C.js +0 -1
  316. package/dist/web/assets/index-0XPZayUU.css +0 -1
  317. package/dist/web/assets/index-BJObbxud.js +0 -122
  318. package/dist/web/assets/index-DZLnTISJ.js +0 -1
  319. package/dist/web/assets/javascript-BhombDEO.js +0 -1
  320. package/dist/web/assets/jsonMode-BJGOUeaV.js +0 -7
  321. package/dist/web/assets/liquid-Czy1WpPz.js +0 -1
  322. package/dist/web/assets/mdx-DhXfoSnM.js +0 -1
  323. package/dist/web/assets/modal-CSGOqphK.js +0 -1
  324. package/dist/web/assets/popover-BiVxGGgp.js +0 -1
  325. package/dist/web/assets/python-DIcQDjcf.js +0 -1
  326. package/dist/web/assets/razor-DYK6Rxer.js +0 -1
  327. package/dist/web/assets/search-field-CQLDXLeA.js +0 -1
  328. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-V-lSceg1.js +0 -1
  329. package/dist/web/assets/tooltip-CPqGK_WZ.js +0 -1
  330. package/dist/web/assets/tsMode-c5x0d47n.js +0 -11
  331. package/dist/web/assets/typescript-i7eYblLt.js +0 -1
  332. package/dist/web/assets/use-profiles-DuXaBRju.js +0 -1
  333. package/dist/web/assets/use-projects-Ddz0knyr.js +0 -1
  334. package/dist/web/assets/use-workspaces-CdJZLmGh.js +0 -1
  335. package/dist/web/assets/useNormalizedLogs--RbVywYa.js +0 -1
  336. package/dist/web/assets/useTokenUsage-DDXf7E4p.js +0 -1
  337. package/dist/web/assets/xml-D2EGActB.js +0 -1
  338. package/dist/web/assets/yaml-jeiIZSL4.js +0 -1
  339. /package/dist/web/assets/{EditableTaskTitle-DcpNTP1B.css → TaskHandoffPanel-DcpNTP1B.css} +0 -0
@@ -1,122 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GeneralSettingsPage-RMN2al8I.js","assets/select-BPdJrr5M.js","assets/select-B5RYunTs.js","assets/menu-styles-DWynpVVz.js","assets/chevron-down-3y5Aiolp.js","assets/check-BmiJ7qMY.js","assets/index-DZLnTISJ.js","assets/index-Bhvt-E6d.js","assets/index-B1oVmCie.js","assets/index-CThFsQNP.js","assets/index-Dk3bRQAK.js","assets/textarea-BVyPl9rM.js","assets/toggles-QcIz43DP.js","assets/index-BtUQYU5l.js","assets/use-providers-Td1-gyrN.js","assets/TranslationSettingsPage-Cod9c4Ug.js","assets/use-translation-settings-NYM0lmBx.js","assets/search-DniD_AGC.js","assets/index-DcOU2m2F.js","assets/ProviderSettingsPage-DqA_B1Ey.js","assets/ExecutionPermissionSelector-B8befbxJ.js","assets/confirm-dialog-ltNBFYCs.js","assets/dialog-CuFEdqLg.js","assets/modal-CSGOqphK.js","assets/mermaid-NOHMQCX5-BSNbBj78.js","assets/AttachmentPreview-CLN1lnLe.js","assets/tooltip-CPqGK_WZ.js","assets/kbd-C88ut3t9.js","assets/copy-HRMhTkIG.js","assets/mermaid-NOHMQCX5-lI9o3AWT.css","assets/SettingsMasterDetail-DjWR9Sqk.js","assets/key-round-Cjbj2qNa.js","assets/trash-2-CvUJsbtT.js","assets/upload-CsXAmAun.js","assets/pencil-Cp70ZwtG.js","assets/TeamSettingsPage-DwWROtW6.js","assets/MemberAvatar-YVr_erAr.js","assets/people-DT78SebR.js","assets/chevron-up-DqaYcjpq.js","assets/ProjectSettingsPage-cus6Ns97.js","assets/use-projects-Ddz0knyr.js","assets/search-field-CQLDXLeA.js","assets/hooks-BLxb16IA.js","assets/popover-BiVxGGgp.js","assets/use-workspaces-CdJZLmGh.js","assets/BranchSelect-Cofp8vYf.js","assets/NotificationSettingsPage-BEyuyu3Z.js","assets/message-square-BLEJN6p7.js","assets/link-BSGb85gq.js","assets/McpSettingsPage-CPNxFF67.js","assets/server-xswxWpKD.js","assets/ProfileSettingsPage-CHe4LlRp.js","assets/use-profiles-DuXaBRju.js","assets/layers-eaHAVcc3.js","assets/ProjectKanbanPage-Bt_01giW.js","assets/CreateTaskInput-CasITF8y.js","assets/BrandLogo-BUimEX-9.js","assets/paperclip-CTNoXpUW.js","assets/icon-button-CYiKa-7C.js","assets/ConversationPage-R7vNaOQv.js","assets/useNormalizedLogs--RbVywYa.js","assets/track-Ckye0-tt.js","assets/useTokenUsage-DDXf7E4p.js","assets/menu--sjyisSg.js","assets/AgentDemoPage-BfXkNCdN.js","assets/at-sign-C48_y345.js","assets/globe-B9I-jHBB.js","assets/DesignSystemPage-BhjNs2vP.js","assets/content-DPQMfMae.js"])))=>i.map(i=>d[i]);
2
- function P1(t,a){for(var i=0;i<a.length;i++){const o=a[i];if(typeof o!="string"&&!Array.isArray(o)){for(const c in o)if(c!=="default"&&!(c in t)){const d=Object.getOwnPropertyDescriptor(o,c);d&&Object.defineProperty(t,c,d.get?d:{enumerable:!0,get:()=>o[c]})}}}return Object.freeze(Object.defineProperty(t,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"]'))o(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function i(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(c){if(c.ep)return;c.ep=!0;const d=i(c);fetch(c.href,d)}})();function vv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ed={exports:{}},Xs={};var Lg;function I1(){if(Lg)return Xs;Lg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(o,c,d){var f=null;if(d!==void 0&&(f=""+d),c.key!==void 0&&(f=""+c.key),"key"in c){d={};for(var h in c)h!=="key"&&(d[h]=c[h])}else d=c;return c=d.ref,{$$typeof:t,type:o,key:f,ref:c!==void 0?c:null,props:d}}return Xs.Fragment=a,Xs.jsx=i,Xs.jsxs=i,Xs}var Ug;function H1(){return Ug||(Ug=1,Ed.exports=I1()),Ed.exports}var m=H1(),Td={exports:{}},De={};var Bg;function Q1(){if(Bg)return De;Bg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),E=Symbol.iterator;function R(C){return C===null||typeof C!="object"?null:(C=E&&C[E]||C["@@iterator"],typeof C=="function"?C:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},U=Object.assign,K={};function H(C,q,P){this.props=C,this.context=q,this.refs=K,this.updater=P||j}H.prototype.isReactComponent={},H.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")},H.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function Q(){}Q.prototype=H.prototype;function W(C,q,P){this.props=C,this.context=q,this.refs=K,this.updater=P||j}var me=W.prototype=new Q;me.constructor=W,U(me,H.prototype),me.isPureReactComponent=!0;var he=Array.isArray;function fe(){}var k={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function re(C,q,P){var Z=P.ref;return{$$typeof:t,type:C,key:q,ref:Z!==void 0?Z:null,props:P}}function Oe(C,q){return re(C.type,q,C.props)}function Ne(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function Ee(C){var q={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(P){return q[P]})}var je=/\/+/g;function Ue(C,q){return typeof C=="object"&&C!==null&&C.key!=null?Ee(""+C.key):q.toString(36)}function Ce(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 _(C,q,P,Z,ee){var J=typeof C;(J==="undefined"||J==="boolean")&&(C=null);var ae=!1;if(C===null)ae=!0;else switch(J){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(C.$$typeof){case t:case a:ae=!0;break;case x:return ae=C._init,_(ae(C._payload),q,P,Z,ee)}}if(ae)return ee=ee(C),ae=Z===""?"."+Ue(C,0):Z,he(ee)?(P="",ae!=null&&(P=ae.replace(je,"$&/")+"/"),_(ee,q,P,"",function(Qt){return Qt})):ee!=null&&(Ne(ee)&&(ee=Oe(ee,P+(ee.key==null||C&&C.key===ee.key?"":(""+ee.key).replace(je,"$&/")+"/")+ae)),q.push(ee)),1;ae=0;var Ae=Z===""?".":Z+":";if(he(C))for(var Pe=0;Pe<C.length;Pe++)Z=C[Pe],J=Ae+Ue(Z,Pe),ae+=_(Z,q,P,J,ee);else if(Pe=R(C),typeof Pe=="function")for(C=Pe.call(C),Pe=0;!(Z=C.next()).done;)Z=Z.value,J=Ae+Ue(Z,Pe++),ae+=_(Z,q,P,J,ee);else if(J==="object"){if(typeof C.then=="function")return _(Ce(C),q,P,Z,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 F(C,q,P){if(C==null)return C;var Z=[],ee=0;return _(C,Z,"","",function(J){return q.call(P,J,ee++)}),Z}function I(C){if(C._status===-1){var q=C._result;q=q(),q.then(function(P){(C._status===0||C._status===-1)&&(C._status=1,C._result=P)},function(P){(C._status===0||C._status===-1)&&(C._status=2,C._result=P)}),C._status===-1&&(C._status=0,C._result=q)}if(C._status===1)return C._result.default;throw C._result}var pe=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)},be={map:F,forEach:function(C,q,P){F(C,function(){q.apply(this,arguments)},P)},count:function(C){var q=0;return F(C,function(){q++}),q},toArray:function(C){return F(C,function(q){return q})||[]},only:function(C){if(!Ne(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return De.Activity=v,De.Children=be,De.Component=H,De.Fragment=i,De.Profiler=c,De.PureComponent=W,De.StrictMode=o,De.Suspense=y,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,De.__COMPILER_RUNTIME={__proto__:null,c:function(C){return k.H.useMemoCache(C)}},De.cache=function(C){return function(){return C.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(C,q,P){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var Z=U({},C.props),ee=C.key;if(q!=null)for(J in q.key!==void 0&&(ee=""+q.key),q)!Y.call(q,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&q.ref===void 0||(Z[J]=q[J]);var J=arguments.length-2;if(J===1)Z.children=P;else if(1<J){for(var ae=Array(J),Ae=0;Ae<J;Ae++)ae[Ae]=arguments[Ae+2];Z.children=ae}return re(C.type,ee,Z)},De.createContext=function(C){return C={$$typeof:f,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:d,_context:C},C},De.createElement=function(C,q,P){var Z,ee={},J=null;if(q!=null)for(Z in q.key!==void 0&&(J=""+q.key),q)Y.call(q,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ee[Z]=q[Z]);var ae=arguments.length-2;if(ae===1)ee.children=P;else if(1<ae){for(var Ae=Array(ae),Pe=0;Pe<ae;Pe++)Ae[Pe]=arguments[Pe+2];ee.children=Ae}if(C&&C.defaultProps)for(Z in ae=C.defaultProps,ae)ee[Z]===void 0&&(ee[Z]=ae[Z]);return re(C,J,ee)},De.createRef=function(){return{current:null}},De.forwardRef=function(C){return{$$typeof:h,render:C}},De.isValidElement=Ne,De.lazy=function(C){return{$$typeof:x,_payload:{_status:-1,_result:C},_init:I}},De.memo=function(C,q){return{$$typeof:g,type:C,compare:q===void 0?null:q}},De.startTransition=function(C){var q=k.T,P={};k.T=P;try{var Z=C(),ee=k.S;ee!==null&&ee(P,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(fe,pe)}catch(J){pe(J)}finally{q!==null&&P.types!==null&&(q.types=P.types),k.T=q}},De.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},De.use=function(C){return k.H.use(C)},De.useActionState=function(C,q,P){return k.H.useActionState(C,q,P)},De.useCallback=function(C,q){return k.H.useCallback(C,q)},De.useContext=function(C){return k.H.useContext(C)},De.useDebugValue=function(){},De.useDeferredValue=function(C,q){return k.H.useDeferredValue(C,q)},De.useEffect=function(C,q){return k.H.useEffect(C,q)},De.useEffectEvent=function(C){return k.H.useEffectEvent(C)},De.useId=function(){return k.H.useId()},De.useImperativeHandle=function(C,q,P){return k.H.useImperativeHandle(C,q,P)},De.useInsertionEffect=function(C,q){return k.H.useInsertionEffect(C,q)},De.useLayoutEffect=function(C,q){return k.H.useLayoutEffect(C,q)},De.useMemo=function(C,q){return k.H.useMemo(C,q)},De.useOptimistic=function(C,q){return k.H.useOptimistic(C,q)},De.useReducer=function(C,q,P){return k.H.useReducer(C,q,P)},De.useRef=function(C){return k.H.useRef(C)},De.useState=function(C){return k.H.useState(C)},De.useSyncExternalStore=function(C,q,P){return k.H.useSyncExternalStore(C,q,P)},De.useTransition=function(){return k.H.useTransition()},De.version="19.2.4",De}var qg;function gf(){return qg||(qg=1,Td.exports=Q1()),Td.exports}var S=gf();const ne=vv(S),yf=P1({__proto__:null,default:ne},[S]);var Cd={exports:{}},Zs={},Ad={exports:{}},Rd={};var Pg;function K1(){return Pg||(Pg=1,(function(t){function a(_,F){var I=_.length;_.push(F);e:for(;0<I;){var pe=I-1>>>1,be=_[pe];if(0<c(be,F))_[pe]=F,_[I]=be,I=pe;else break e}}function i(_){return _.length===0?null:_[0]}function o(_){if(_.length===0)return null;var F=_[0],I=_.pop();if(I!==F){_[0]=I;e:for(var pe=0,be=_.length,C=be>>>1;pe<C;){var q=2*(pe+1)-1,P=_[q],Z=q+1,ee=_[Z];if(0>c(P,I))Z<be&&0>c(ee,P)?(_[pe]=ee,_[Z]=I,pe=Z):(_[pe]=P,_[q]=I,pe=q);else if(Z<be&&0>c(ee,I))_[pe]=ee,_[Z]=I,pe=Z;else break e}}return F}function c(_,F){var I=_.sortIndex-F.sortIndex;return I!==0?I:_.id-F.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;t.unstable_now=function(){return d.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var y=[],g=[],x=1,v=null,E=3,R=!1,j=!1,U=!1,K=!1,H=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function me(_){for(var F=i(g);F!==null;){if(F.callback===null)o(g);else if(F.startTime<=_)o(g),F.sortIndex=F.expirationTime,a(y,F);else break;F=i(g)}}function he(_){if(U=!1,me(_),!j)if(i(y)!==null)j=!0,fe||(fe=!0,Ee());else{var F=i(g);F!==null&&Ce(he,F.startTime-_)}}var fe=!1,k=-1,Y=5,re=-1;function Oe(){return K?!0:!(t.unstable_now()-re<Y)}function Ne(){if(K=!1,fe){var _=t.unstable_now();re=_;var F=!0;try{e:{j=!1,U&&(U=!1,Q(k),k=-1),R=!0;var I=E;try{t:{for(me(_),v=i(y);v!==null&&!(v.expirationTime>_&&Oe());){var pe=v.callback;if(typeof pe=="function"){v.callback=null,E=v.priorityLevel;var be=pe(v.expirationTime<=_);if(_=t.unstable_now(),typeof be=="function"){v.callback=be,me(_),F=!0;break t}v===i(y)&&o(y),me(_)}else o(y);v=i(y)}if(v!==null)F=!0;else{var C=i(g);C!==null&&Ce(he,C.startTime-_),F=!1}}break e}finally{v=null,E=I,R=!1}F=void 0}}finally{F?Ee():fe=!1}}}var Ee;if(typeof W=="function")Ee=function(){W(Ne)};else if(typeof MessageChannel<"u"){var je=new MessageChannel,Ue=je.port2;je.port1.onmessage=Ne,Ee=function(){Ue.postMessage(null)}}else Ee=function(){H(Ne,0)};function Ce(_,F){k=H(function(){_(t.unstable_now())},F)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(_){_.callback=null},t.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<_?Math.floor(1e3/_):5},t.unstable_getCurrentPriorityLevel=function(){return E},t.unstable_next=function(_){switch(E){case 1:case 2:case 3:var F=3;break;default:F=E}var I=E;E=F;try{return _()}finally{E=I}},t.unstable_requestPaint=function(){K=!0},t.unstable_runWithPriority=function(_,F){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var I=E;E=_;try{return F()}finally{E=I}},t.unstable_scheduleCallback=function(_,F,I){var pe=t.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?pe+I:pe):I=pe,_){case 1:var be=-1;break;case 2:be=250;break;case 5:be=1073741823;break;case 4:be=1e4;break;default:be=5e3}return be=I+be,_={id:x++,callback:F,priorityLevel:_,startTime:I,expirationTime:be,sortIndex:-1},I>pe?(_.sortIndex=I,a(g,_),i(y)===null&&_===i(g)&&(U?(Q(k),k=-1):U=!0,Ce(he,I-pe))):(_.sortIndex=be,a(y,_),j||R||(j=!0,fe||(fe=!0,Ee()))),_},t.unstable_shouldYield=Oe,t.unstable_wrapCallback=function(_){var F=E;return function(){var I=E;E=F;try{return _.apply(this,arguments)}finally{E=I}}}})(Rd)),Rd}var Ig;function G1(){return Ig||(Ig=1,Ad.exports=K1()),Ad.exports}var kd={exports:{}},tn={};var Hg;function Y1(){if(Hg)return tn;Hg=1;var t=gf();function a(y){var g="https://react.dev/errors/"+y;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+y+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var o={d:{f:i,r:function(){throw Error(a(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},c=Symbol.for("react.portal");function d(y,g,x){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:v==null?null:""+v,children:y,containerInfo:g,implementation:x}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(y,g){if(y==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return tn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,tn.createPortal=function(y,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(a(299));return d(y,g,null,x)},tn.flushSync=function(y){var g=f.T,x=o.p;try{if(f.T=null,o.p=2,y)return y()}finally{f.T=g,o.p=x,o.d.f()}},tn.preconnect=function(y,g){typeof y=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(y,g))},tn.prefetchDNS=function(y){typeof y=="string"&&o.d.D(y)},tn.preinit=function(y,g){if(typeof y=="string"&&g&&typeof g.as=="string"){var x=g.as,v=h(x,g.crossOrigin),E=typeof g.integrity=="string"?g.integrity:void 0,R=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?o.d.S(y,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:v,integrity:E,fetchPriority:R}):x==="script"&&o.d.X(y,{crossOrigin:v,integrity:E,fetchPriority:R,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},tn.preinitModule=function(y,g){if(typeof y=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=h(g.as,g.crossOrigin);o.d.M(y,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&o.d.M(y)},tn.preload=function(y,g){if(typeof y=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,v=h(x,g.crossOrigin);o.d.L(y,x,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},tn.preloadModule=function(y,g){if(typeof y=="string")if(g){var x=h(g.as,g.crossOrigin);o.d.m(y,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(y)},tn.requestFormReset=function(y){o.d.r(y)},tn.unstable_batchedUpdates=function(y,g){return y(g)},tn.useFormState=function(y,g,x){return f.H.useFormState(y,g,x)},tn.useFormStatus=function(){return f.H.useHostTransitionStatus()},tn.version="19.2.4",tn}var Qg;function bv(){if(Qg)return kd.exports;Qg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),kd.exports=Y1(),kd.exports}var Kg;function V1(){if(Kg)return Zs;Kg=1;var t=G1(),a=gf(),i=bv();function o(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+n+" 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 d(e){var n=e,r=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(r=n.return),e=n.return;while(e)}return n.tag===3?r:null}function f(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function y(e){if(d(e)!==e)throw Error(o(188))}function g(e){var n=e.alternate;if(!n){if(n=d(e),n===null)throw Error(o(188));return n!==e?null:e}for(var r=e,s=n;;){var l=r.return;if(l===null)break;var u=l.alternate;if(u===null){if(s=l.return,s!==null){r=s;continue}break}if(l.child===u.child){for(u=l.child;u;){if(u===r)return y(l),e;if(u===s)return y(l),n;u=u.sibling}throw Error(o(188))}if(r.return!==s.return)r=l,s=u;else{for(var p=!1,b=l.child;b;){if(b===r){p=!0,r=l,s=u;break}if(b===s){p=!0,s=l,r=u;break}b=b.sibling}if(!p){for(b=u.child;b;){if(b===r){p=!0,r=u,s=l;break}if(b===s){p=!0,s=u,r=l;break}b=b.sibling}if(!p)throw Error(o(189))}}if(r.alternate!==s)throw Error(o(190))}if(r.tag!==3)throw Error(o(188));return r.stateNode.current===r?e:n}function x(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=x(e),n!==null)return n;e=e.sibling}return null}var v=Object.assign,E=Symbol.for("react.element"),R=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),W=Symbol.for("react.context"),me=Symbol.for("react.forward_ref"),he=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),Oe=Symbol.for("react.memo_cache_sentinel"),Ne=Symbol.iterator;function Ee(e){return e===null||typeof e!="object"?null:(e=Ne&&e[Ne]||e["@@iterator"],typeof e=="function"?e:null)}var je=Symbol.for("react.client.reference");function Ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===je?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case U:return"Fragment";case H:return"Profiler";case K:return"StrictMode";case he:return"Suspense";case fe:return"SuspenseList";case re:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case W:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case me:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case k:return n=e.displayName||null,n!==null?n:Ue(e.type)||"Memo";case Y:n=e._payload,e=e._init;try{return Ue(e(n))}catch{}}return null}var Ce=Array.isArray,_=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},pe=[],be=-1;function C(e){return{current:e}}function q(e){0>be||(e.current=pe[be],pe[be]=null,be--)}function P(e,n){be++,pe[be]=e.current,e.current=n}var Z=C(null),ee=C(null),J=C(null),ae=C(null);function Ae(e,n){switch(P(J,n),P(ee,e),P(Z,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?ig(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=ig(n),e=sg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(Z),P(Z,e)}function Pe(){q(Z),q(ee),q(J)}function Qt(e){e.memoizedState!==null&&P(ae,e);var n=Z.current,r=sg(n,e.type);n!==r&&(P(ee,e),P(Z,r))}function an(e){ee.current===e&&(q(Z),q(ee)),ae.current===e&&(q(ae),Gs._currentValue=I)}var We,Jn;function un(e){if(We===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);We=n&&n[1]||"",Jn=-1<r.stack.indexOf(`
3
- at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
4
- `+We+e+Jn}var _r=!1;function dn(e,n){if(!e||_r)return"";_r=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(n){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(B){var z=B}Reflect.construct(e,[],X)}else{try{X.call()}catch(B){z=B}e.call(X.prototype)}}else{try{throw Error()}catch(B){z=B}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(B){if(B&&z&&typeof B.stack=="string")return[B.stack,z.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=s.DetermineComponentFrameRoot(),p=u[0],b=u[1];if(p&&b){var T=p.split(`
5
- `),D=b.split(`
6
- `);for(l=s=0;s<T.length&&!T[s].includes("DetermineComponentFrameRoot");)s++;for(;l<D.length&&!D[l].includes("DetermineComponentFrameRoot");)l++;if(s===T.length||l===D.length)for(s=T.length-1,l=D.length-1;1<=s&&0<=l&&T[s]!==D[l];)l--;for(;1<=s&&0<=l;s--,l--)if(T[s]!==D[l]){if(s!==1||l!==1)do if(s--,l--,0>l||T[s]!==D[l]){var G=`
7
- `+T[s].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=s&&0<=l);break}}}finally{_r=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?un(r):""}function Ea(e,n){switch(e.tag){case 26:case 27:case 5:return un(e.type);case 16:return un("Lazy");case 13:return e.child!==n&&n!==null?un("Suspense Fallback"):un("Suspense");case 19:return un("SuspenseList");case 0:case 15:return dn(e.type,!1);case 11:return dn(e.type.render,!1);case 1:return dn(e.type,!0);case 31:return un("Activity");default:return""}}function Or(e){try{var n="",r=null;do n+=Ea(e,r),r=e,e=e.return;while(e);return n}catch(s){return`
8
- Error generating stack: `+s.message+`
9
- `+s.stack}}var Wt=Object.prototype.hasOwnProperty,Mr=t.unstable_scheduleCallback,Dr=t.unstable_cancelCallback,Kt=t.unstable_shouldYield,da=t.unstable_requestPaint,bt=t.unstable_now,Ta=t.unstable_getCurrentPriorityLevel,fa=t.unstable_ImmediatePriority,Xa=t.unstable_UserBlockingPriority,Gt=t.unstable_NormalPriority,rn=t.unstable_LowPriority,Dn=t.unstable_IdlePriority,li=t.log,jn=t.unstable_setDisableYieldValue,Ca=null,ht=null;function fn(e){if(typeof li=="function"&&jn(e),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Ca,e)}catch{}}var Ut=Math.clz32?Math.clz32:Sn,ci=Math.log,jr=Math.LN2;function Sn(e){return e>>>=0,e===0?32:31-(ci(e)/jr|0)|0}var Wn=256,Aa=262144,ea=4194304;function zn(e){var n=e&42;if(n!==0)return n;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,n,r){var s=e.pendingLanes;if(s===0)return 0;var l=0,u=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var b=s&134217727;return b!==0?(s=b&~u,s!==0?l=zn(s):(p&=b,p!==0?l=zn(p):r||(r=b&~e,r!==0&&(l=zn(r))))):(b=s&~u,b!==0?l=zn(b):p!==0?l=zn(p):r||(r=s&~e,r!==0&&(l=zn(r)))),l===0?0:n!==0&&n!==l&&(n&u)===0&&(u=l&-l,r=n&-n,u>=r||u===32&&(r&4194048)!==0)?n:l}function dt(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function Ct(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 At(){var e=ea;return ea<<=1,(ea&62914560)===0&&(ea=4194304),e}function wn(e){for(var n=[],r=0;31>r;r++)n.push(e);return n}function ft(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function en(e,n,r,s,l,u){var p=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var b=e.entanglements,T=e.expirationTimes,D=e.hiddenUpdates;for(r=p&~r;0<r;){var G=31-Ut(r),X=1<<G;b[G]=0,T[G]=-1;var z=D[G];if(z!==null)for(D[G]=null,G=0;G<z.length;G++){var B=z[G];B!==null&&(B.lane&=-536870913)}r&=~X}s!==0&&Ra(e,s,0),u!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=u&~(p&~n))}function Ra(e,n,r){e.pendingLanes|=n,e.suspendedLanes&=~n;var s=31-Ut(n);e.entangledLanes|=n,e.entanglements[s]=e.entanglements[s]|1073741824|r&261930}function w(e,n){var r=e.entangledLanes|=n;for(e=e.entanglements;r;){var s=31-Ut(r),l=1<<s;l&n|e[s]&n&&(e[s]|=n),r&=~l}}function N(e,n){var r=n&-n;return r=(r&42)!==0?1:L(r),(r&(e.suspendedLanes|n))!==0?0:r}function L(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 $(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function te(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:Ng(e.type))}function xe(e,n){var r=F.p;try{return F.p=e,n()}finally{F.p=r}}var se=Math.random().toString(36).slice(2),ie="__reactFiber$"+se,oe="__reactProps$"+se,ve="__reactContainer$"+se,Re="__reactEvents$"+se,we="__reactListeners$"+se,Je="__reactHandles$"+se,Ye="__reactResources$"+se,xt="__reactMarker$"+se;function St(e){delete e[ie],delete e[oe],delete e[Re],delete e[we],delete e[Je]}function wt(e){var n=e[ie];if(n)return n;for(var r=e.parentNode;r;){if(n=r[ve]||r[ie]){if(r=n.alternate,n.child!==null||r!==null&&r.child!==null)for(e=hg(e);e!==null;){if(r=e[ie])return r;e=hg(e)}return n}e=r,r=e.parentNode}return null}function Ve(e){if(e=e[ie]||e[ve]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function It(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(o(33))}function hn(e){var n=e[Ye];return n||(n=e[Ye]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function yt(e){e[xt]=!0}var ta=new Set,En={};function na(e,n){Ln(e,n),Ln(e+"Capture",n)}function Ln(e,n){for(En[e]=n,e=0;e<n.length;e++)ta.add(n[e])}var ka=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]*$"),zr={},Lr={};function Fe(e){return Wt.call(Lr,e)?!0:Wt.call(zr,e)?!1:ka.test(e)?Lr[e]=!0:(zr[e]=!0,!1)}function Rt(e,n,r){if(Fe(n))if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var s=n.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+r)}}function aa(e,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+r)}}function Yt(e,n,r,s){if(s===null)e.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(n,r,""+s)}}function Xe(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ur(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Eo(e,n,r){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var l=s.get,u=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(p){r=""+p,u.call(this,p)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return r},setValue:function(p){r=""+p},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function os(e){if(!e._valueTracker){var n=Ur(e)?"checked":"value";e._valueTracker=Eo(e,n,""+e[n])}}function Jf(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var r=n.getValue(),s="";return e&&(s=Ur(e)?e.checked?"true":"false":e.value),e=s,e!==r?(n.setValue(e),!0):!1}function To(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 j0=/[\n"\\]/g;function Un(e){return e.replace(j0,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function yc(e,n,r,s,l,u,p,b){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),n!=null?p==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Xe(n)):e.value!==""+Xe(n)&&(e.value=""+Xe(n)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),n!=null?vc(e,p,Xe(n)):r!=null?vc(e,p,Xe(r)):s!=null&&e.removeAttribute("value"),l==null&&u!=null&&(e.defaultChecked=!!u),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Xe(b):e.removeAttribute("name")}function Wf(e,n,r,s,l,u,p,b){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),n!=null||r!=null){if(!(u!=="submit"&&u!=="reset"||n!=null)){os(e);return}r=r!=null?""+Xe(r):"",n=n!=null?""+Xe(n):r,b||n===e.value||(e.value=n),e.defaultValue=n}s=s??l,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=b?e.checked:!!s,e.defaultChecked=!!s,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),os(e)}function vc(e,n,r){n==="number"&&To(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function ui(e,n,r,s){if(e=e.options,n){n={};for(var l=0;l<r.length;l++)n["$"+r[l]]=!0;for(r=0;r<e.length;r++)l=n.hasOwnProperty("$"+e[r].value),e[r].selected!==l&&(e[r].selected=l),l&&s&&(e[r].defaultSelected=!0)}else{for(r=""+Xe(r),n=null,l=0;l<e.length;l++){if(e[l].value===r){e[l].selected=!0,s&&(e[l].defaultSelected=!0);return}n!==null||e[l].disabled||(n=e[l])}n!==null&&(n.selected=!0)}}function eh(e,n,r){if(n!=null&&(n=""+Xe(n),n!==e.value&&(e.value=n),r==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=r!=null?""+Xe(r):""}function th(e,n,r,s){if(n==null){if(s!=null){if(r!=null)throw Error(o(92));if(Ce(s)){if(1<s.length)throw Error(o(93));s=s[0]}r=s}r==null&&(r=""),n=r}r=Xe(n),e.defaultValue=r,s=e.textContent,s===r&&s!==""&&s!==null&&(e.value=s),os(e)}function di(e,n){if(n){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=n;return}}e.textContent=n}var z0=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 nh(e,n,r){var s=n.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?s?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":s?e.setProperty(n,r):typeof r!="number"||r===0||z0.has(n)?n==="float"?e.cssFloat=r:e[n]=(""+r).trim():e[n]=r+"px"}function ah(e,n,r){if(n!=null&&typeof n!="object")throw Error(o(62));if(e=e.style,r!=null){for(var s in r)!r.hasOwnProperty(s)||n!=null&&n.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var l in n)s=n[l],n.hasOwnProperty(l)&&r[l]!==s&&nh(e,l,s)}else for(var u in n)n.hasOwnProperty(u)&&nh(e,u,n[u])}function bc(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 L0=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"]]),U0=/^[\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 Co(e){return U0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Na(){}var xc=null;function Sc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fi=null,hi=null;function rh(e){var n=Ve(e);if(n&&(e=n.stateNode)){var r=e[oe]||null;e:switch(e=n.stateNode,n.type){case"input":if(yc(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),n=r.name,r.type==="radio"&&n!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+Un(""+n)+'"][type="radio"]'),n=0;n<r.length;n++){var s=r[n];if(s!==e&&s.form===e.form){var l=s[oe]||null;if(!l)throw Error(o(90));yc(s,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(n=0;n<r.length;n++)s=r[n],s.form===e.form&&Jf(s)}break e;case"textarea":eh(e,r.value,r.defaultValue);break e;case"select":n=r.value,n!=null&&ui(e,!!r.multiple,n,!1)}}}var wc=!1;function ih(e,n,r){if(wc)return e(n,r);wc=!0;try{var s=e(n);return s}finally{if(wc=!1,(fi!==null||hi!==null)&&(fl(),fi&&(n=fi,e=hi,hi=fi=null,rh(n),e)))for(n=0;n<e.length;n++)rh(e[n])}}function ls(e,n){var r=e.stateNode;if(r===null)return null;var s=r[oe]||null;if(s===null)return null;r=s[n];e:switch(n){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(r&&typeof r!="function")throw Error(o(231,n,typeof r));return r}var _a=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ec=!1;if(_a)try{var cs={};Object.defineProperty(cs,"passive",{get:function(){Ec=!0}}),window.addEventListener("test",cs,cs),window.removeEventListener("test",cs,cs)}catch{Ec=!1}var Za=null,Tc=null,Ao=null;function sh(){if(Ao)return Ao;var e,n=Tc,r=n.length,s,l="value"in Za?Za.value:Za.textContent,u=l.length;for(e=0;e<r&&n[e]===l[e];e++);var p=r-e;for(s=1;s<=p&&n[r-s]===l[u-s];s++);return Ao=l.slice(e,1<s?1-s:void 0)}function Ro(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function ko(){return!0}function oh(){return!1}function mn(e){function n(r,s,l,u,p){this._reactName=r,this._targetInst=l,this.type=s,this.nativeEvent=u,this.target=p,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(r=e[b],this[b]=r?r(u):u[b]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ko:oh,this.isPropagationStopped=oh,this}return v(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=ko)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ko)},persist:function(){},isPersistent:ko}),n}var Br={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},No=mn(Br),us=v({},Br,{view:0,detail:0}),B0=mn(us),Cc,Ac,ds,_o=v({},us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kc,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!==ds&&(ds&&e.type==="mousemove"?(Cc=e.screenX-ds.screenX,Ac=e.screenY-ds.screenY):Ac=Cc=0,ds=e),Cc)},movementY:function(e){return"movementY"in e?e.movementY:Ac}}),lh=mn(_o),q0=v({},_o,{dataTransfer:0}),P0=mn(q0),I0=v({},us,{relatedTarget:0}),Rc=mn(I0),H0=v({},Br,{animationName:0,elapsedTime:0,pseudoElement:0}),Q0=mn(H0),K0=v({},Br,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),G0=mn(K0),Y0=v({},Br,{data:0}),ch=mn(Y0),V0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},F0={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"},X0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Z0(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=X0[e])?!!n[e]:!1}function kc(){return Z0}var $0=v({},us,{key:function(e){if(e.key){var n=V0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ro(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?F0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kc,charCode:function(e){return e.type==="keypress"?Ro(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ro(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),J0=mn($0),W0=v({},_o,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uh=mn(W0),ex=v({},us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kc}),tx=mn(ex),nx=v({},Br,{propertyName:0,elapsedTime:0,pseudoElement:0}),ax=mn(nx),rx=v({},_o,{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}),ix=mn(rx),sx=v({},Br,{newState:0,oldState:0}),ox=mn(sx),lx=[9,13,27,32],Nc=_a&&"CompositionEvent"in window,fs=null;_a&&"documentMode"in document&&(fs=document.documentMode);var cx=_a&&"TextEvent"in window&&!fs,dh=_a&&(!Nc||fs&&8<fs&&11>=fs),fh=" ",hh=!1;function mh(e,n){switch(e){case"keyup":return lx.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ph(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mi=!1;function ux(e,n){switch(e){case"compositionend":return ph(n);case"keypress":return n.which!==32?null:(hh=!0,fh);case"textInput":return e=n.data,e===fh&&hh?null:e;default:return null}}function dx(e,n){if(mi)return e==="compositionend"||!Nc&&mh(e,n)?(e=sh(),Ao=Tc=Za=null,mi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return dh&&n.locale!=="ko"?null:n.data;default:return null}}var fx={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 gh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!fx[e.type]:n==="textarea"}function yh(e,n,r,s){fi?hi?hi.push(s):hi=[s]:fi=s,n=bl(n,"onChange"),0<n.length&&(r=new No("onChange","change",null,r,s),e.push({event:r,listeners:n}))}var hs=null,ms=null;function hx(e){Wp(e,0)}function Oo(e){var n=It(e);if(Jf(n))return e}function vh(e,n){if(e==="change")return n}var bh=!1;if(_a){var _c;if(_a){var Oc="oninput"in document;if(!Oc){var xh=document.createElement("div");xh.setAttribute("oninput","return;"),Oc=typeof xh.oninput=="function"}_c=Oc}else _c=!1;bh=_c&&(!document.documentMode||9<document.documentMode)}function Sh(){hs&&(hs.detachEvent("onpropertychange",wh),ms=hs=null)}function wh(e){if(e.propertyName==="value"&&Oo(ms)){var n=[];yh(n,ms,e,Sc(e)),ih(hx,n)}}function mx(e,n,r){e==="focusin"?(Sh(),hs=n,ms=r,hs.attachEvent("onpropertychange",wh)):e==="focusout"&&Sh()}function px(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Oo(ms)}function gx(e,n){if(e==="click")return Oo(n)}function yx(e,n){if(e==="input"||e==="change")return Oo(n)}function vx(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Tn=typeof Object.is=="function"?Object.is:vx;function ps(e,n){if(Tn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var r=Object.keys(e),s=Object.keys(n);if(r.length!==s.length)return!1;for(s=0;s<r.length;s++){var l=r[s];if(!Wt.call(n,l)||!Tn(e[l],n[l]))return!1}return!0}function Eh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Th(e,n){var r=Eh(e);e=0;for(var s;r;){if(r.nodeType===3){if(s=e+r.textContent.length,e<=n&&s>=n)return{node:r,offset:n-e};e=s}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Eh(r)}}function Ch(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Ch(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Ah(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=To(e.document);n instanceof e.HTMLIFrameElement;){try{var r=typeof n.contentWindow.location.href=="string"}catch{r=!1}if(r)e=n.contentWindow;else break;n=To(e.document)}return n}function Mc(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var bx=_a&&"documentMode"in document&&11>=document.documentMode,pi=null,Dc=null,gs=null,jc=!1;function Rh(e,n,r){var s=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;jc||pi==null||pi!==To(s)||(s=pi,"selectionStart"in s&&Mc(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}),gs&&ps(gs,s)||(gs=s,s=bl(Dc,"onSelect"),0<s.length&&(n=new No("onSelect","select",null,n,r),e.push({event:n,listeners:s}),n.target=pi)))}function qr(e,n){var r={};return r[e.toLowerCase()]=n.toLowerCase(),r["Webkit"+e]="webkit"+n,r["Moz"+e]="moz"+n,r}var gi={animationend:qr("Animation","AnimationEnd"),animationiteration:qr("Animation","AnimationIteration"),animationstart:qr("Animation","AnimationStart"),transitionrun:qr("Transition","TransitionRun"),transitionstart:qr("Transition","TransitionStart"),transitioncancel:qr("Transition","TransitionCancel"),transitionend:qr("Transition","TransitionEnd")},zc={},kh={};_a&&(kh=document.createElement("div").style,"AnimationEvent"in window||(delete gi.animationend.animation,delete gi.animationiteration.animation,delete gi.animationstart.animation),"TransitionEvent"in window||delete gi.transitionend.transition);function Pr(e){if(zc[e])return zc[e];if(!gi[e])return e;var n=gi[e],r;for(r in n)if(n.hasOwnProperty(r)&&r in kh)return zc[e]=n[r];return e}var Nh=Pr("animationend"),_h=Pr("animationiteration"),Oh=Pr("animationstart"),xx=Pr("transitionrun"),Sx=Pr("transitionstart"),wx=Pr("transitioncancel"),Mh=Pr("transitionend"),Dh=new Map,Lc="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(" ");Lc.push("scrollEnd");function ra(e,n){Dh.set(e,n),na(n,[e])}var Mo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=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(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Bn=[],yi=0,Uc=0;function Do(){for(var e=yi,n=Uc=yi=0;n<e;){var r=Bn[n];Bn[n++]=null;var s=Bn[n];Bn[n++]=null;var l=Bn[n];Bn[n++]=null;var u=Bn[n];if(Bn[n++]=null,s!==null&&l!==null){var p=s.pending;p===null?l.next=l:(l.next=p.next,p.next=l),s.pending=l}u!==0&&jh(r,l,u)}}function jo(e,n,r,s){Bn[yi++]=e,Bn[yi++]=n,Bn[yi++]=r,Bn[yi++]=s,Uc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Bc(e,n,r,s){return jo(e,n,r,s),zo(e)}function Ir(e,n){return jo(e,null,null,n),zo(e)}function jh(e,n,r){e.lanes|=r;var s=e.alternate;s!==null&&(s.lanes|=r);for(var l=!1,u=e.return;u!==null;)u.childLanes|=r,s=u.alternate,s!==null&&(s.childLanes|=r),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(l=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,l&&n!==null&&(l=31-Ut(r),e=u.hiddenUpdates,s=e[l],s===null?e[l]=[n]:s.push(n),n.lane=r|536870912),u):null}function zo(e){if(50<Bs)throw Bs=0,Vu=null,Error(o(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var vi={};function Ex(e,n,r,s){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,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 Cn(e,n,r,s){return new Ex(e,n,r,s)}function qc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oa(e,n){var r=e.alternate;return r===null?(r=Cn(e.tag,n,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=n,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,n=e.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function zh(e,n){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,n=r.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Lo(e,n,r,s,l,u){var p=0;if(s=e,typeof e=="function")qc(e)&&(p=1);else if(typeof e=="string")p=k1(e,r,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case re:return e=Cn(31,r,n,l),e.elementType=re,e.lanes=u,e;case U:return Hr(r.children,l,u,n);case K:p=8,l|=24;break;case H:return e=Cn(12,r,n,l|2),e.elementType=H,e.lanes=u,e;case he:return e=Cn(13,r,n,l),e.elementType=he,e.lanes=u,e;case fe:return e=Cn(19,r,n,l),e.elementType=fe,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:p=10;break e;case Q:p=9;break e;case me:p=11;break e;case k:p=14;break e;case Y:p=16,s=null;break e}p=29,r=Error(o(130,e===null?"null":typeof e,"")),s=null}return n=Cn(p,r,n,l),n.elementType=e,n.type=s,n.lanes=u,n}function Hr(e,n,r,s){return e=Cn(7,e,s,n),e.lanes=r,e}function Pc(e,n,r){return e=Cn(6,e,null,n),e.lanes=r,e}function Lh(e){var n=Cn(18,null,null,0);return n.stateNode=e,n}function Ic(e,n,r){return n=Cn(4,e.children!==null?e.children:[],e.key,n),n.lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Uh=new WeakMap;function qn(e,n){if(typeof e=="object"&&e!==null){var r=Uh.get(e);return r!==void 0?r:(n={value:e,source:n,stack:Or(n)},Uh.set(e,n),n)}return{value:e,source:n,stack:Or(n)}}var bi=[],xi=0,Uo=null,ys=0,Pn=[],In=0,$a=null,ha=1,ma="";function Ma(e,n){bi[xi++]=ys,bi[xi++]=Uo,Uo=e,ys=n}function Bh(e,n,r){Pn[In++]=ha,Pn[In++]=ma,Pn[In++]=$a,$a=e;var s=ha;e=ma;var l=32-Ut(s)-1;s&=~(1<<l),r+=1;var u=32-Ut(n)+l;if(30<u){var p=l-l%5;u=(s&(1<<p)-1).toString(32),s>>=p,l-=p,ha=1<<32-Ut(n)+l|r<<l|s,ma=u+e}else ha=1<<u|r<<l|s,ma=e}function Hc(e){e.return!==null&&(Ma(e,1),Bh(e,1,0))}function Qc(e){for(;e===Uo;)Uo=bi[--xi],bi[xi]=null,ys=bi[--xi],bi[xi]=null;for(;e===$a;)$a=Pn[--In],Pn[In]=null,ma=Pn[--In],Pn[In]=null,ha=Pn[--In],Pn[In]=null}function qh(e,n){Pn[In++]=ha,Pn[In++]=ma,Pn[In++]=$a,ha=n.id,ma=n.overflow,$a=e}var Vt=null,mt=null,Ze=!1,Ja=null,Hn=!1,Kc=Error(o(519));function Wa(e){var n=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw vs(qn(n,e)),Kc}function Ph(e){var n=e.stateNode,r=e.type,s=e.memoizedProps;switch(n[ie]=e,n[oe]=s,r){case"dialog":Qe("cancel",n),Qe("close",n);break;case"iframe":case"object":case"embed":Qe("load",n);break;case"video":case"audio":for(r=0;r<Ps.length;r++)Qe(Ps[r],n);break;case"source":Qe("error",n);break;case"img":case"image":case"link":Qe("error",n),Qe("load",n);break;case"details":Qe("toggle",n);break;case"input":Qe("invalid",n),Wf(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Qe("invalid",n);break;case"textarea":Qe("invalid",n),th(n,s.value,s.defaultValue,s.children)}r=s.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||n.textContent===""+r||s.suppressHydrationWarning===!0||ag(n.textContent,r)?(s.popover!=null&&(Qe("beforetoggle",n),Qe("toggle",n)),s.onScroll!=null&&Qe("scroll",n),s.onScrollEnd!=null&&Qe("scrollend",n),s.onClick!=null&&(n.onclick=Na),n=!0):n=!1,n||Wa(e,!0)}function Ih(e){for(Vt=e.return;Vt;)switch(Vt.tag){case 5:case 31:case 13:Hn=!1;return;case 27:case 3:Hn=!0;return;default:Vt=Vt.return}}function Si(e){if(e!==Vt)return!1;if(!Ze)return Ih(e),Ze=!0,!1;var n=e.tag,r;if((r=n!==3&&n!==27)&&((r=n===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||ld(e.type,e.memoizedProps)),r=!r),r&&mt&&Wa(e),Ih(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));mt=fg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));mt=fg(e)}else n===27?(n=mt,hr(e.type)?(e=hd,hd=null,mt=e):mt=n):mt=Vt?Kn(e.stateNode.nextSibling):null;return!0}function Qr(){mt=Vt=null,Ze=!1}function Gc(){var e=Ja;return e!==null&&(vn===null?vn=e:vn.push.apply(vn,e),Ja=null),e}function vs(e){Ja===null?Ja=[e]:Ja.push(e)}var Yc=C(null),Kr=null,Da=null;function er(e,n,r){P(Yc,n._currentValue),n._currentValue=r}function ja(e){e._currentValue=Yc.current,q(Yc)}function Vc(e,n,r){for(;e!==null;){var s=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),e===r)break;e=e.return}}function Fc(e,n,r,s){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var u=l.dependencies;if(u!==null){var p=l.child;u=u.firstContext;e:for(;u!==null;){var b=u;u=l;for(var T=0;T<n.length;T++)if(b.context===n[T]){u.lanes|=r,b=u.alternate,b!==null&&(b.lanes|=r),Vc(u.return,r,e),s||(p=null);break e}u=b.next}}else if(l.tag===18){if(p=l.return,p===null)throw Error(o(341));p.lanes|=r,u=p.alternate,u!==null&&(u.lanes|=r),Vc(p,r,e),p=null}else p=l.child;if(p!==null)p.return=l;else for(p=l;p!==null;){if(p===e){p=null;break}if(l=p.sibling,l!==null){l.return=p.return,p=l;break}p=p.return}l=p}}function wi(e,n,r,s){e=null;for(var l=n,u=!1;l!==null;){if(!u){if((l.flags&524288)!==0)u=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var p=l.alternate;if(p===null)throw Error(o(387));if(p=p.memoizedProps,p!==null){var b=l.type;Tn(l.pendingProps.value,p.value)||(e!==null?e.push(b):e=[b])}}else if(l===ae.current){if(p=l.alternate,p===null)throw Error(o(387));p.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(Gs):e=[Gs])}l=l.return}e!==null&&Fc(n,e,r,s),n.flags|=262144}function Bo(e){for(e=e.firstContext;e!==null;){if(!Tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Gr(e){Kr=e,Da=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ft(e){return Hh(Kr,e)}function qo(e,n){return Kr===null&&Gr(e),Hh(e,n)}function Hh(e,n){var r=n._currentValue;if(n={context:n,memoizedValue:r,next:null},Da===null){if(e===null)throw Error(o(308));Da=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Da=Da.next=n;return r}var Tx=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(r,s){e.push(s)}};this.abort=function(){n.aborted=!0,e.forEach(function(r){return r()})}},Cx=t.unstable_scheduleCallback,Ax=t.unstable_NormalPriority,Ot={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xc(){return{controller:new Tx,data:new Map,refCount:0}}function bs(e){e.refCount--,e.refCount===0&&Cx(Ax,function(){e.controller.abort()})}var xs=null,Zc=0,Ei=0,Ti=null;function Rx(e,n){if(xs===null){var r=xs=[];Zc=0,Ei=Wu(),Ti={status:"pending",value:void 0,then:function(s){r.push(s)}}}return Zc++,n.then(Qh,Qh),n}function Qh(){if(--Zc===0&&xs!==null){Ti!==null&&(Ti.status="fulfilled");var e=xs;xs=null,Ei=0,Ti=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function kx(e,n){var r=[],s={status:"pending",value:null,reason:null,then:function(l){r.push(l)}};return e.then(function(){s.status="fulfilled",s.value=n;for(var l=0;l<r.length;l++)(0,r[l])(n)},function(l){for(s.status="rejected",s.reason=l,l=0;l<r.length;l++)(0,r[l])(void 0)}),s}var Kh=_.S;_.S=function(e,n){Rp=bt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&Rx(e,n),Kh!==null&&Kh(e,n)};var Yr=C(null);function $c(){var e=Yr.current;return e!==null?e:ut.pooledCache}function Po(e,n){n===null?P(Yr,Yr.current):P(Yr,n.pool)}function Gh(){var e=$c();return e===null?null:{parent:Ot._currentValue,pool:e}}var Ci=Error(o(460)),Jc=Error(o(474)),Io=Error(o(542)),Ho={then:function(){}};function Yh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Vh(e,n,r){switch(r=e[r],r===void 0?e.push(n):r!==n&&(n.then(Na,Na),n=r),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Xh(e),e;default:if(typeof n.status=="string")n.then(Na,Na);else{if(e=ut,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=n,e.status="pending",e.then(function(s){if(n.status==="pending"){var l=n;l.status="fulfilled",l.value=s}},function(s){if(n.status==="pending"){var l=n;l.status="rejected",l.reason=s}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Xh(e),e}throw Fr=n,Ci}}function Vr(e){try{var n=e._init;return n(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Fr=r,Ci):r}}var Fr=null;function Fh(){if(Fr===null)throw Error(o(459));var e=Fr;return Fr=null,e}function Xh(e){if(e===Ci||e===Io)throw Error(o(483))}var Ai=null,Ss=0;function Qo(e){var n=Ss;return Ss+=1,Ai===null&&(Ai=[]),Vh(Ai,e,n)}function ws(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Ko(e,n){throw n.$$typeof===E?Error(o(525)):(e=Object.prototype.toString.call(n),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Zh(e){function n(O,A){if(e){var M=O.deletions;M===null?(O.deletions=[A],O.flags|=16):M.push(A)}}function r(O,A){if(!e)return null;for(;A!==null;)n(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 l(O,A){return O=Oa(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 p(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function b(O,A,M,V){return A===null||A.tag!==6?(A=Pc(M,O.mode,V),A.return=O,A):(A=l(A,M),A.return=O,A)}function T(O,A,M,V){var Te=M.type;return Te===U?G(O,A,M.props.children,V,M.key):A!==null&&(A.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===Y&&Vr(Te)===A.type)?(A=l(A,M.props),ws(A,M),A.return=O,A):(A=Lo(M.type,M.key,M.props,null,O.mode,V),ws(A,M),A.return=O,A)}function D(O,A,M,V){return A===null||A.tag!==4||A.stateNode.containerInfo!==M.containerInfo||A.stateNode.implementation!==M.implementation?(A=Ic(M,O.mode,V),A.return=O,A):(A=l(A,M.children||[]),A.return=O,A)}function G(O,A,M,V,Te){return A===null||A.tag!==7?(A=Hr(M,O.mode,V,Te),A.return=O,A):(A=l(A,M),A.return=O,A)}function X(O,A,M){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return A=Pc(""+A,O.mode,M),A.return=O,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case R:return M=Lo(A.type,A.key,A.props,null,O.mode,M),ws(M,A),M.return=O,M;case j:return A=Ic(A,O.mode,M),A.return=O,A;case Y:return A=Vr(A),X(O,A,M)}if(Ce(A)||Ee(A))return A=Hr(A,O.mode,M,null),A.return=O,A;if(typeof A.then=="function")return X(O,Qo(A),M);if(A.$$typeof===W)return X(O,qo(O,A),M);Ko(O,A)}return null}function z(O,A,M,V){var Te=A!==null?A.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return Te!==null?null:b(O,A,""+M,V);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case R:return M.key===Te?T(O,A,M,V):null;case j:return M.key===Te?D(O,A,M,V):null;case Y:return M=Vr(M),z(O,A,M,V)}if(Ce(M)||Ee(M))return Te!==null?null:G(O,A,M,V,null);if(typeof M.then=="function")return z(O,A,Qo(M),V);if(M.$$typeof===W)return z(O,A,qo(O,M),V);Ko(O,M)}return null}function B(O,A,M,V,Te){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return O=O.get(M)||null,b(A,O,""+V,Te);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case R:return O=O.get(V.key===null?M:V.key)||null,T(A,O,V,Te);case j:return O=O.get(V.key===null?M:V.key)||null,D(A,O,V,Te);case Y:return V=Vr(V),B(O,A,M,V,Te)}if(Ce(V)||Ee(V))return O=O.get(M)||null,G(A,O,V,Te,null);if(typeof V.then=="function")return B(O,A,M,Qo(V),Te);if(V.$$typeof===W)return B(O,A,M,qo(A,V),Te);Ko(A,V)}return null}function ce(O,A,M,V){for(var Te=null,et=null,ge=A,Le=A=0,Ge=null;ge!==null&&Le<M.length;Le++){ge.index>Le?(Ge=ge,ge=null):Ge=ge.sibling;var tt=z(O,ge,M[Le],V);if(tt===null){ge===null&&(ge=Ge);break}e&&ge&&tt.alternate===null&&n(O,ge),A=u(tt,A,Le),et===null?Te=tt:et.sibling=tt,et=tt,ge=Ge}if(Le===M.length)return r(O,ge),Ze&&Ma(O,Le),Te;if(ge===null){for(;Le<M.length;Le++)ge=X(O,M[Le],V),ge!==null&&(A=u(ge,A,Le),et===null?Te=ge:et.sibling=ge,et=ge);return Ze&&Ma(O,Le),Te}for(ge=s(ge);Le<M.length;Le++)Ge=B(ge,O,Le,M[Le],V),Ge!==null&&(e&&Ge.alternate!==null&&ge.delete(Ge.key===null?Le:Ge.key),A=u(Ge,A,Le),et===null?Te=Ge:et.sibling=Ge,et=Ge);return e&&ge.forEach(function(vr){return n(O,vr)}),Ze&&Ma(O,Le),Te}function ke(O,A,M,V){if(M==null)throw Error(o(151));for(var Te=null,et=null,ge=A,Le=A=0,Ge=null,tt=M.next();ge!==null&&!tt.done;Le++,tt=M.next()){ge.index>Le?(Ge=ge,ge=null):Ge=ge.sibling;var vr=z(O,ge,tt.value,V);if(vr===null){ge===null&&(ge=Ge);break}e&&ge&&vr.alternate===null&&n(O,ge),A=u(vr,A,Le),et===null?Te=vr:et.sibling=vr,et=vr,ge=Ge}if(tt.done)return r(O,ge),Ze&&Ma(O,Le),Te;if(ge===null){for(;!tt.done;Le++,tt=M.next())tt=X(O,tt.value,V),tt!==null&&(A=u(tt,A,Le),et===null?Te=tt:et.sibling=tt,et=tt);return Ze&&Ma(O,Le),Te}for(ge=s(ge);!tt.done;Le++,tt=M.next())tt=B(ge,O,Le,tt.value,V),tt!==null&&(e&&tt.alternate!==null&&ge.delete(tt.key===null?Le:tt.key),A=u(tt,A,Le),et===null?Te=tt:et.sibling=tt,et=tt);return e&&ge.forEach(function(q1){return n(O,q1)}),Ze&&Ma(O,Le),Te}function ct(O,A,M,V){if(typeof M=="object"&&M!==null&&M.type===U&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case R:e:{for(var Te=M.key;A!==null;){if(A.key===Te){if(Te=M.type,Te===U){if(A.tag===7){r(O,A.sibling),V=l(A,M.props.children),V.return=O,O=V;break e}}else if(A.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===Y&&Vr(Te)===A.type){r(O,A.sibling),V=l(A,M.props),ws(V,M),V.return=O,O=V;break e}r(O,A);break}else n(O,A);A=A.sibling}M.type===U?(V=Hr(M.props.children,O.mode,V,M.key),V.return=O,O=V):(V=Lo(M.type,M.key,M.props,null,O.mode,V),ws(V,M),V.return=O,O=V)}return p(O);case j:e:{for(Te=M.key;A!==null;){if(A.key===Te)if(A.tag===4&&A.stateNode.containerInfo===M.containerInfo&&A.stateNode.implementation===M.implementation){r(O,A.sibling),V=l(A,M.children||[]),V.return=O,O=V;break e}else{r(O,A);break}else n(O,A);A=A.sibling}V=Ic(M,O.mode,V),V.return=O,O=V}return p(O);case Y:return M=Vr(M),ct(O,A,M,V)}if(Ce(M))return ce(O,A,M,V);if(Ee(M)){if(Te=Ee(M),typeof Te!="function")throw Error(o(150));return M=Te.call(M),ke(O,A,M,V)}if(typeof M.then=="function")return ct(O,A,Qo(M),V);if(M.$$typeof===W)return ct(O,A,qo(O,M),V);Ko(O,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,A!==null&&A.tag===6?(r(O,A.sibling),V=l(A,M),V.return=O,O=V):(r(O,A),V=Pc(M,O.mode,V),V.return=O,O=V),p(O)):r(O,A)}return function(O,A,M,V){try{Ss=0;var Te=ct(O,A,M,V);return Ai=null,Te}catch(ge){if(ge===Ci||ge===Io)throw ge;var et=Cn(29,ge,null,O.mode);return et.lanes=V,et.return=O,et}}}var Xr=Zh(!0),$h=Zh(!1),tr=!1;function Wc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function eu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function nr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ar(e,n,r){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(nt&2)!==0){var l=s.pending;return l===null?n.next=n:(n.next=l.next,l.next=n),s.pending=n,n=zo(e),jh(e,null,r),n}return jo(e,s,n,r),zo(e)}function Es(e,n,r){if(n=n.updateQueue,n!==null&&(n=n.shared,(r&4194048)!==0)){var s=n.lanes;s&=e.pendingLanes,r|=s,n.lanes=r,w(e,r)}}function tu(e,n){var r=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,r===s)){var l=null,u=null;if(r=r.firstBaseUpdate,r!==null){do{var p={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};u===null?l=u=p:u=u.next=p,r=r.next}while(r!==null);u===null?l=u=n:u=u.next=n}else l=u=n;r={baseState:s.baseState,firstBaseUpdate:l,lastBaseUpdate:u,shared:s.shared,callbacks:s.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=n:e.next=n,r.lastBaseUpdate=n}var nu=!1;function Ts(){if(nu){var e=Ti;if(e!==null)throw e}}function Cs(e,n,r,s){nu=!1;var l=e.updateQueue;tr=!1;var u=l.firstBaseUpdate,p=l.lastBaseUpdate,b=l.shared.pending;if(b!==null){l.shared.pending=null;var T=b,D=T.next;T.next=null,p===null?u=D:p.next=D,p=T;var G=e.alternate;G!==null&&(G=G.updateQueue,b=G.lastBaseUpdate,b!==p&&(b===null?G.firstBaseUpdate=D:b.next=D,G.lastBaseUpdate=T))}if(u!==null){var X=l.baseState;p=0,G=D=T=null,b=u;do{var z=b.lane&-536870913,B=z!==b.lane;if(B?(Ke&z)===z:(s&z)===z){z!==0&&z===Ei&&(nu=!0),G!==null&&(G=G.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ce=e,ke=b;z=n;var ct=r;switch(ke.tag){case 1:if(ce=ke.payload,typeof ce=="function"){X=ce.call(ct,X,z);break e}X=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=ke.payload,z=typeof ce=="function"?ce.call(ct,X,z):ce,z==null)break e;X=v({},X,z);break e;case 2:tr=!0}}z=b.callback,z!==null&&(e.flags|=64,B&&(e.flags|=8192),B=l.callbacks,B===null?l.callbacks=[z]:B.push(z))}else B={lane:z,tag:b.tag,payload:b.payload,callback:b.callback,next:null},G===null?(D=G=B,T=X):G=G.next=B,p|=z;if(b=b.next,b===null){if(b=l.shared.pending,b===null)break;B=b,b=B.next,B.next=null,l.lastBaseUpdate=B,l.shared.pending=null}}while(!0);G===null&&(T=X),l.baseState=T,l.firstBaseUpdate=D,l.lastBaseUpdate=G,u===null&&(l.shared.lanes=0),lr|=p,e.lanes=p,e.memoizedState=X}}function Jh(e,n){if(typeof e!="function")throw Error(o(191,e));e.call(n)}function Wh(e,n){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)Jh(r[e],n)}var Ri=C(null),Go=C(0);function em(e,n){e=Qa,P(Go,e),P(Ri,n),Qa=e|n.baseLanes}function au(){P(Go,Qa),P(Ri,Ri.current)}function ru(){Qa=Go.current,q(Ri),q(Go)}var An=C(null),Qn=null;function rr(e){var n=e.alternate;P(kt,kt.current&1),P(An,e),Qn===null&&(n===null||Ri.current!==null||n.memoizedState!==null)&&(Qn=e)}function iu(e){P(kt,kt.current),P(An,e),Qn===null&&(Qn=e)}function tm(e){e.tag===22?(P(kt,kt.current),P(An,e),Qn===null&&(Qn=e)):ir()}function ir(){P(kt,kt.current),P(An,An.current)}function Rn(e){q(An),Qn===e&&(Qn=null),q(kt)}var kt=C(0);function Yo(e){for(var n=e;n!==null;){if(n.tag===13){var r=n.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||dd(r)||fd(r)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var za=0,ze=null,ot=null,Mt=null,Vo=!1,ki=!1,Zr=!1,Fo=0,As=0,Ni=null,Nx=0;function Et(){throw Error(o(321))}function su(e,n){if(n===null)return!1;for(var r=0;r<n.length&&r<e.length;r++)if(!Tn(e[r],n[r]))return!1;return!0}function ou(e,n,r,s,l,u){return za=u,ze=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,_.H=e===null||e.memoizedState===null?Bm:wu,Zr=!1,u=r(s,l),Zr=!1,ki&&(u=am(n,r,s,l)),nm(e),u}function nm(e){_.H=Ns;var n=ot!==null&&ot.next!==null;if(za=0,Mt=ot=ze=null,Vo=!1,As=0,Ni=null,n)throw Error(o(300));e===null||Dt||(e=e.dependencies,e!==null&&Bo(e)&&(Dt=!0))}function am(e,n,r,s){ze=e;var l=0;do{if(ki&&(Ni=null),As=0,ki=!1,25<=l)throw Error(o(301));if(l+=1,Mt=ot=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}_.H=qm,u=n(r,s)}while(ki);return u}function _x(){var e=_.H,n=e.useState()[0];return n=typeof n.then=="function"?Rs(n):n,e=e.useState()[0],(ot!==null?ot.memoizedState:null)!==e&&(ze.flags|=1024),n}function lu(){var e=Fo!==0;return Fo=0,e}function cu(e,n,r){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~r}function uu(e){if(Vo){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Vo=!1}za=0,Mt=ot=ze=null,ki=!1,As=Fo=0,Ni=null}function sn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?ze.memoizedState=Mt=e:Mt=Mt.next=e,Mt}function Nt(){if(ot===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var n=Mt===null?ze.memoizedState:Mt.next;if(n!==null)Mt=n,ot=e;else{if(e===null)throw ze.alternate===null?Error(o(467)):Error(o(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},Mt===null?ze.memoizedState=Mt=e:Mt=Mt.next=e}return Mt}function Xo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rs(e){var n=As;return As+=1,Ni===null&&(Ni=[]),e=Vh(Ni,e,n),n=ze,(Mt===null?n.memoizedState:Mt.next)===null&&(n=n.alternate,_.H=n===null||n.memoizedState===null?Bm:wu),e}function Zo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Rs(e);if(e.$$typeof===W)return Ft(e)}throw Error(o(438,String(e)))}function du(e){var n=null,r=ze.updateQueue;if(r!==null&&(n=r.memoCache),n==null){var s=ze.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(n={data:s.data.map(function(l){return l.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),r===null&&(r=Xo(),ze.updateQueue=r),r.memoCache=n,r=n.data[n.index],r===void 0)for(r=n.data[n.index]=Array(e),s=0;s<e;s++)r[s]=Oe;return n.index++,r}function La(e,n){return typeof n=="function"?n(e):n}function $o(e){var n=Nt();return fu(n,ot,e)}function fu(e,n,r){var s=e.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=r;var l=e.baseQueue,u=s.pending;if(u!==null){if(l!==null){var p=l.next;l.next=u.next,u.next=p}n.baseQueue=l=u,s.pending=null}if(u=e.baseState,l===null)e.memoizedState=u;else{n=l.next;var b=p=null,T=null,D=n,G=!1;do{var X=D.lane&-536870913;if(X!==D.lane?(Ke&X)===X:(za&X)===X){var z=D.revertLane;if(z===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),X===Ei&&(G=!0);else if((za&z)===z){D=D.next,z===Ei&&(G=!0);continue}else X={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},T===null?(b=T=X,p=u):T=T.next=X,ze.lanes|=z,lr|=z;X=D.action,Zr&&r(u,X),u=D.hasEagerState?D.eagerState:r(u,X)}else z={lane:X,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},T===null?(b=T=z,p=u):T=T.next=z,ze.lanes|=X,lr|=X;D=D.next}while(D!==null&&D!==n);if(T===null?p=u:T.next=b,!Tn(u,e.memoizedState)&&(Dt=!0,G&&(r=Ti,r!==null)))throw r;e.memoizedState=u,e.baseState=p,e.baseQueue=T,s.lastRenderedState=u}return l===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function hu(e){var n=Nt(),r=n.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=e;var s=r.dispatch,l=r.pending,u=n.memoizedState;if(l!==null){r.pending=null;var p=l=l.next;do u=e(u,p.action),p=p.next;while(p!==l);Tn(u,n.memoizedState)||(Dt=!0),n.memoizedState=u,n.baseQueue===null&&(n.baseState=u),r.lastRenderedState=u}return[u,s]}function rm(e,n,r){var s=ze,l=Nt(),u=Ze;if(u){if(r===void 0)throw Error(o(407));r=r()}else r=n();var p=!Tn((ot||l).memoizedState,r);if(p&&(l.memoizedState=r,Dt=!0),l=l.queue,gu(om.bind(null,s,l,e),[e]),l.getSnapshot!==n||p||Mt!==null&&Mt.memoizedState.tag&1){if(s.flags|=2048,_i(9,{destroy:void 0},sm.bind(null,s,l,r,n),null),ut===null)throw Error(o(349));u||(za&127)!==0||im(s,n,r)}return r}function im(e,n,r){e.flags|=16384,e={getSnapshot:n,value:r},n=ze.updateQueue,n===null?(n=Xo(),ze.updateQueue=n,n.stores=[e]):(r=n.stores,r===null?n.stores=[e]:r.push(e))}function sm(e,n,r,s){n.value=r,n.getSnapshot=s,lm(n)&&cm(e)}function om(e,n,r){return r(function(){lm(n)&&cm(e)})}function lm(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!Tn(e,r)}catch{return!0}}function cm(e){var n=Ir(e,2);n!==null&&bn(n,e,2)}function mu(e){var n=sn();if(typeof e=="function"){var r=e;if(e=r(),Zr){fn(!0);try{r()}finally{fn(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:e},n}function um(e,n,r,s){return e.baseState=r,fu(e,ot,typeof s=="function"?s:La)}function Ox(e,n,r,s,l){if(el(e))throw Error(o(485));if(e=n.action,e!==null){var u={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){u.listeners.push(p)}};_.T!==null?r(!0):u.isTransition=!1,s(u),r=n.pending,r===null?(u.next=n.pending=u,dm(n,u)):(u.next=r.next,n.pending=r.next=u)}}function dm(e,n){var r=n.action,s=n.payload,l=e.state;if(n.isTransition){var u=_.T,p={};_.T=p;try{var b=r(l,s),T=_.S;T!==null&&T(p,b),fm(e,n,b)}catch(D){pu(e,n,D)}finally{u!==null&&p.types!==null&&(u.types=p.types),_.T=u}}else try{u=r(l,s),fm(e,n,u)}catch(D){pu(e,n,D)}}function fm(e,n,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(s){hm(e,n,s)},function(s){return pu(e,n,s)}):hm(e,n,r)}function hm(e,n,r){n.status="fulfilled",n.value=r,mm(n),e.state=r,n=e.pending,n!==null&&(r=n.next,r===n?e.pending=null:(r=r.next,n.next=r,dm(e,r)))}function pu(e,n,r){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=r,mm(n),n=n.next;while(n!==s)}e.action=null}function mm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function pm(e,n){return n}function gm(e,n){if(Ze){var r=ut.formState;if(r!==null){e:{var s=ze;if(Ze){if(mt){t:{for(var l=mt,u=Hn;l.nodeType!==8;){if(!u){l=null;break t}if(l=Kn(l.nextSibling),l===null){l=null;break t}}u=l.data,l=u==="F!"||u==="F"?l:null}if(l){mt=Kn(l.nextSibling),s=l.data==="F!";break e}}Wa(s)}s=!1}s&&(n=r[0])}}return r=sn(),r.memoizedState=r.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pm,lastRenderedState:n},r.queue=s,r=zm.bind(null,ze,s),s.dispatch=r,s=mu(!1),u=Su.bind(null,ze,!1,s.queue),s=sn(),l={state:n,dispatch:null,action:e,pending:null},s.queue=l,r=Ox.bind(null,ze,l,u,r),l.dispatch=r,s.memoizedState=e,[n,r,!1]}function ym(e){var n=Nt();return vm(n,ot,e)}function vm(e,n,r){if(n=fu(e,n,pm)[0],e=$o(La)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=Rs(n)}catch(p){throw p===Ci?Io:p}else s=n;n=Nt();var l=n.queue,u=l.dispatch;return r!==n.memoizedState&&(ze.flags|=2048,_i(9,{destroy:void 0},Mx.bind(null,l,r),null)),[s,u,e]}function Mx(e,n){e.action=n}function bm(e){var n=Nt(),r=ot;if(r!==null)return vm(n,r,e);Nt(),n=n.memoizedState,r=Nt();var s=r.queue.dispatch;return r.memoizedState=e,[n,s,!1]}function _i(e,n,r,s){return e={tag:e,create:r,deps:s,inst:n,next:null},n=ze.updateQueue,n===null&&(n=Xo(),ze.updateQueue=n),r=n.lastEffect,r===null?n.lastEffect=e.next=e:(s=r.next,r.next=e,e.next=s,n.lastEffect=e),e}function xm(){return Nt().memoizedState}function Jo(e,n,r,s){var l=sn();ze.flags|=e,l.memoizedState=_i(1|n,{destroy:void 0},r,s===void 0?null:s)}function Wo(e,n,r,s){var l=Nt();s=s===void 0?null:s;var u=l.memoizedState.inst;ot!==null&&s!==null&&su(s,ot.memoizedState.deps)?l.memoizedState=_i(n,u,r,s):(ze.flags|=e,l.memoizedState=_i(1|n,u,r,s))}function Sm(e,n){Jo(8390656,8,e,n)}function gu(e,n){Wo(2048,8,e,n)}function Dx(e){ze.flags|=4;var n=ze.updateQueue;if(n===null)n=Xo(),ze.updateQueue=n,n.events=[e];else{var r=n.events;r===null?n.events=[e]:r.push(e)}}function wm(e){var n=Nt().memoizedState;return Dx({ref:n,nextImpl:e}),function(){if((nt&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}function Em(e,n){return Wo(4,2,e,n)}function Tm(e,n){return Wo(4,4,e,n)}function Cm(e,n){if(typeof n=="function"){e=e();var r=n(e);return function(){typeof r=="function"?r():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Am(e,n,r){r=r!=null?r.concat([e]):null,Wo(4,4,Cm.bind(null,n,e),r)}function yu(){}function Rm(e,n){var r=Nt();n=n===void 0?null:n;var s=r.memoizedState;return n!==null&&su(n,s[1])?s[0]:(r.memoizedState=[e,n],e)}function km(e,n){var r=Nt();n=n===void 0?null:n;var s=r.memoizedState;if(n!==null&&su(n,s[1]))return s[0];if(s=e(),Zr){fn(!0);try{e()}finally{fn(!1)}}return r.memoizedState=[s,n],s}function vu(e,n,r){return r===void 0||(za&1073741824)!==0&&(Ke&261930)===0?e.memoizedState=n:(e.memoizedState=r,e=Np(),ze.lanes|=e,lr|=e,r)}function Nm(e,n,r,s){return Tn(r,n)?r:Ri.current!==null?(e=vu(e,r,s),Tn(e,n)||(Dt=!0),e):(za&42)===0||(za&1073741824)!==0&&(Ke&261930)===0?(Dt=!0,e.memoizedState=r):(e=Np(),ze.lanes|=e,lr|=e,n)}function _m(e,n,r,s,l){var u=F.p;F.p=u!==0&&8>u?u:8;var p=_.T,b={};_.T=b,Su(e,!1,n,r);try{var T=l(),D=_.S;if(D!==null&&D(b,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var G=kx(T,s);ks(e,n,G,_n(e))}else ks(e,n,s,_n(e))}catch(X){ks(e,n,{then:function(){},status:"rejected",reason:X},_n())}finally{F.p=u,p!==null&&b.types!==null&&(p.types=b.types),_.T=p}}function jx(){}function bu(e,n,r,s){if(e.tag!==5)throw Error(o(476));var l=Om(e).queue;_m(e,l,n,I,r===null?jx:function(){return Mm(e),r(s)})}function Om(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:I},next:null};var r={};return n.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:r},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Mm(e){var n=Om(e);n.next===null&&(n=e.alternate.memoizedState),ks(e,n.next.queue,{},_n())}function xu(){return Ft(Gs)}function Dm(){return Nt().memoizedState}function jm(){return Nt().memoizedState}function zx(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var r=_n();e=nr(r);var s=ar(n,e,r);s!==null&&(bn(s,n,r),Es(s,n,r)),n={cache:Xc()},e.payload=n;return}n=n.return}}function Lx(e,n,r){var s=_n();r={lane:s,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},el(e)?Lm(n,r):(r=Bc(e,n,r,s),r!==null&&(bn(r,e,s),Um(r,n,s)))}function zm(e,n,r){var s=_n();ks(e,n,r,s)}function ks(e,n,r,s){var l={lane:s,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(el(e))Lm(n,l);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=n.lastRenderedReducer,u!==null))try{var p=n.lastRenderedState,b=u(p,r);if(l.hasEagerState=!0,l.eagerState=b,Tn(b,p))return jo(e,n,l,0),ut===null&&Do(),!1}catch{}if(r=Bc(e,n,l,s),r!==null)return bn(r,e,s),Um(r,n,s),!0}return!1}function Su(e,n,r,s){if(s={lane:2,revertLane:Wu(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},el(e)){if(n)throw Error(o(479))}else n=Bc(e,r,s,2),n!==null&&bn(n,e,2)}function el(e){var n=e.alternate;return e===ze||n!==null&&n===ze}function Lm(e,n){ki=Vo=!0;var r=e.pending;r===null?n.next=n:(n.next=r.next,r.next=n),e.pending=n}function Um(e,n,r){if((r&4194048)!==0){var s=n.lanes;s&=e.pendingLanes,r|=s,n.lanes=r,w(e,r)}}var Ns={readContext:Ft,use:Zo,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useLayoutEffect:Et,useInsertionEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useSyncExternalStore:Et,useId:Et,useHostTransitionStatus:Et,useFormState:Et,useActionState:Et,useOptimistic:Et,useMemoCache:Et,useCacheRefresh:Et};Ns.useEffectEvent=Et;var Bm={readContext:Ft,use:Zo,useCallback:function(e,n){return sn().memoizedState=[e,n===void 0?null:n],e},useContext:Ft,useEffect:Sm,useImperativeHandle:function(e,n,r){r=r!=null?r.concat([e]):null,Jo(4194308,4,Cm.bind(null,n,e),r)},useLayoutEffect:function(e,n){return Jo(4194308,4,e,n)},useInsertionEffect:function(e,n){Jo(4,2,e,n)},useMemo:function(e,n){var r=sn();n=n===void 0?null:n;var s=e();if(Zr){fn(!0);try{e()}finally{fn(!1)}}return r.memoizedState=[s,n],s},useReducer:function(e,n,r){var s=sn();if(r!==void 0){var l=r(n);if(Zr){fn(!0);try{r(n)}finally{fn(!1)}}}else l=n;return s.memoizedState=s.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},s.queue=e,e=e.dispatch=Lx.bind(null,ze,e),[s.memoizedState,e]},useRef:function(e){var n=sn();return e={current:e},n.memoizedState=e},useState:function(e){e=mu(e);var n=e.queue,r=zm.bind(null,ze,n);return n.dispatch=r,[e.memoizedState,r]},useDebugValue:yu,useDeferredValue:function(e,n){var r=sn();return vu(r,e,n)},useTransition:function(){var e=mu(!1);return e=_m.bind(null,ze,e.queue,!0,!1),sn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,r){var s=ze,l=sn();if(Ze){if(r===void 0)throw Error(o(407));r=r()}else{if(r=n(),ut===null)throw Error(o(349));(Ke&127)!==0||im(s,n,r)}l.memoizedState=r;var u={value:r,getSnapshot:n};return l.queue=u,Sm(om.bind(null,s,u,e),[e]),s.flags|=2048,_i(9,{destroy:void 0},sm.bind(null,s,u,r,n),null),r},useId:function(){var e=sn(),n=ut.identifierPrefix;if(Ze){var r=ma,s=ha;r=(s&~(1<<32-Ut(s)-1)).toString(32)+r,n="_"+n+"R_"+r,r=Fo++,0<r&&(n+="H"+r.toString(32)),n+="_"}else r=Nx++,n="_"+n+"r_"+r.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:xu,useFormState:gm,useActionState:gm,useOptimistic:function(e){var n=sn();n.memoizedState=n.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=r,n=Su.bind(null,ze,!0,r),r.dispatch=n,[e,n]},useMemoCache:du,useCacheRefresh:function(){return sn().memoizedState=zx.bind(null,ze)},useEffectEvent:function(e){var n=sn(),r={impl:e};return n.memoizedState=r,function(){if((nt&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}},wu={readContext:Ft,use:Zo,useCallback:Rm,useContext:Ft,useEffect:gu,useImperativeHandle:Am,useInsertionEffect:Em,useLayoutEffect:Tm,useMemo:km,useReducer:$o,useRef:xm,useState:function(){return $o(La)},useDebugValue:yu,useDeferredValue:function(e,n){var r=Nt();return Nm(r,ot.memoizedState,e,n)},useTransition:function(){var e=$o(La)[0],n=Nt().memoizedState;return[typeof e=="boolean"?e:Rs(e),n]},useSyncExternalStore:rm,useId:Dm,useHostTransitionStatus:xu,useFormState:ym,useActionState:ym,useOptimistic:function(e,n){var r=Nt();return um(r,ot,e,n)},useMemoCache:du,useCacheRefresh:jm};wu.useEffectEvent=wm;var qm={readContext:Ft,use:Zo,useCallback:Rm,useContext:Ft,useEffect:gu,useImperativeHandle:Am,useInsertionEffect:Em,useLayoutEffect:Tm,useMemo:km,useReducer:hu,useRef:xm,useState:function(){return hu(La)},useDebugValue:yu,useDeferredValue:function(e,n){var r=Nt();return ot===null?vu(r,e,n):Nm(r,ot.memoizedState,e,n)},useTransition:function(){var e=hu(La)[0],n=Nt().memoizedState;return[typeof e=="boolean"?e:Rs(e),n]},useSyncExternalStore:rm,useId:Dm,useHostTransitionStatus:xu,useFormState:bm,useActionState:bm,useOptimistic:function(e,n){var r=Nt();return ot!==null?um(r,ot,e,n):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:du,useCacheRefresh:jm};qm.useEffectEvent=wm;function Eu(e,n,r,s){n=e.memoizedState,r=r(s,n),r=r==null?n:v({},n,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Tu={enqueueSetState:function(e,n,r){e=e._reactInternals;var s=_n(),l=nr(s);l.payload=n,r!=null&&(l.callback=r),n=ar(e,l,s),n!==null&&(bn(n,e,s),Es(n,e,s))},enqueueReplaceState:function(e,n,r){e=e._reactInternals;var s=_n(),l=nr(s);l.tag=1,l.payload=n,r!=null&&(l.callback=r),n=ar(e,l,s),n!==null&&(bn(n,e,s),Es(n,e,s))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var r=_n(),s=nr(r);s.tag=2,n!=null&&(s.callback=n),n=ar(e,s,r),n!==null&&(bn(n,e,r),Es(n,e,r))}};function Pm(e,n,r,s,l,u,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,u,p):n.prototype&&n.prototype.isPureReactComponent?!ps(r,s)||!ps(l,u):!0}function Im(e,n,r,s){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(r,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(r,s),n.state!==e&&Tu.enqueueReplaceState(n,n.state,null)}function $r(e,n){var r=n;if("ref"in n){r={};for(var s in n)s!=="ref"&&(r[s]=n[s])}if(e=e.defaultProps){r===n&&(r=v({},r));for(var l in e)r[l]===void 0&&(r[l]=e[l])}return r}function Hm(e){Mo(e)}function Qm(e){console.error(e)}function Km(e){Mo(e)}function tl(e,n){try{var r=e.onUncaughtError;r(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function Gm(e,n,r){try{var s=e.onCaughtError;s(r.value,{componentStack:r.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function Cu(e,n,r){return r=nr(r),r.tag=3,r.payload={element:null},r.callback=function(){tl(e,n)},r}function Ym(e){return e=nr(e),e.tag=3,e}function Vm(e,n,r,s){var l=r.type.getDerivedStateFromError;if(typeof l=="function"){var u=s.value;e.payload=function(){return l(u)},e.callback=function(){Gm(n,r,s)}}var p=r.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){Gm(n,r,s),typeof l!="function"&&(cr===null?cr=new Set([this]):cr.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})})}function Ux(e,n,r,s,l){if(r.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=r.alternate,n!==null&&wi(n,r,l,!0),r=An.current,r!==null){switch(r.tag){case 31:case 13:return Qn===null?hl():r.alternate===null&&Tt===0&&(Tt=3),r.flags&=-257,r.flags|=65536,r.lanes=l,s===Ho?r.flags|=16384:(n=r.updateQueue,n===null?r.updateQueue=new Set([s]):n.add(s),Zu(e,s,l)),!1;case 22:return r.flags|=65536,s===Ho?r.flags|=16384:(n=r.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([s])},r.updateQueue=n):(r=n.retryQueue,r===null?n.retryQueue=new Set([s]):r.add(s)),Zu(e,s,l)),!1}throw Error(o(435,r.tag))}return Zu(e,s,l),hl(),!1}if(Ze)return n=An.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=l,s!==Kc&&(e=Error(o(422),{cause:s}),vs(qn(e,r)))):(s!==Kc&&(n=Error(o(423),{cause:s}),vs(qn(n,r))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,s=qn(s,r),l=Cu(e.stateNode,s,l),tu(e,l),Tt!==4&&(Tt=2)),!1;var u=Error(o(520),{cause:s});if(u=qn(u,r),Us===null?Us=[u]:Us.push(u),Tt!==4&&(Tt=2),n===null)return!0;s=qn(s,r),r=n;do{switch(r.tag){case 3:return r.flags|=65536,e=l&-l,r.lanes|=e,e=Cu(r.stateNode,s,e),tu(r,e),!1;case 1:if(n=r.type,u=r.stateNode,(r.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(cr===null||!cr.has(u))))return r.flags|=65536,l&=-l,r.lanes|=l,l=Ym(l),Vm(l,e,r,s),tu(r,l),!1}r=r.return}while(r!==null);return!1}var Au=Error(o(461)),Dt=!1;function Xt(e,n,r,s){n.child=e===null?$h(n,null,r,s):Xr(n,e.child,r,s)}function Fm(e,n,r,s,l){r=r.render;var u=n.ref;if("ref"in s){var p={};for(var b in s)b!=="ref"&&(p[b]=s[b])}else p=s;return Gr(n),s=ou(e,n,r,p,u,l),b=lu(),e!==null&&!Dt?(cu(e,n,l),Ua(e,n,l)):(Ze&&b&&Hc(n),n.flags|=1,Xt(e,n,s,l),n.child)}function Xm(e,n,r,s,l){if(e===null){var u=r.type;return typeof u=="function"&&!qc(u)&&u.defaultProps===void 0&&r.compare===null?(n.tag=15,n.type=u,Zm(e,n,u,s,l)):(e=Lo(r.type,null,s,n,n.mode,l),e.ref=n.ref,e.return=n,n.child=e)}if(u=e.child,!ju(e,l)){var p=u.memoizedProps;if(r=r.compare,r=r!==null?r:ps,r(p,s)&&e.ref===n.ref)return Ua(e,n,l)}return n.flags|=1,e=Oa(u,s),e.ref=n.ref,e.return=n,n.child=e}function Zm(e,n,r,s,l){if(e!==null){var u=e.memoizedProps;if(ps(u,s)&&e.ref===n.ref)if(Dt=!1,n.pendingProps=s=u,ju(e,l))(e.flags&131072)!==0&&(Dt=!0);else return n.lanes=e.lanes,Ua(e,n,l)}return Ru(e,n,r,s,l)}function $m(e,n,r,s){var l=s.children,u=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((n.flags&128)!==0){if(u=u!==null?u.baseLanes|r:r,e!==null){for(s=n.child=e.child,l=0;s!==null;)l=l|s.lanes|s.childLanes,s=s.sibling;s=l&~u}else s=0,n.child=null;return Jm(e,n,u,r,s)}if((r&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Po(n,u!==null?u.cachePool:null),u!==null?em(n,u):au(),tm(n);else return s=n.lanes=536870912,Jm(e,n,u!==null?u.baseLanes|r:r,r,s)}else u!==null?(Po(n,u.cachePool),em(n,u),ir(),n.memoizedState=null):(e!==null&&Po(n,null),au(),ir());return Xt(e,n,l,r),n.child}function _s(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Jm(e,n,r,s,l){var u=$c();return u=u===null?null:{parent:Ot._currentValue,pool:u},n.memoizedState={baseLanes:r,cachePool:u},e!==null&&Po(n,null),au(),tm(n),e!==null&&wi(e,n,s,!0),n.childLanes=l,null}function nl(e,n){return n=rl({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Wm(e,n,r){return Xr(n,e.child,null,r),e=nl(n,n.pendingProps),e.flags|=2,Rn(n),n.memoizedState=null,e}function Bx(e,n,r){var s=n.pendingProps,l=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Ze){if(s.mode==="hidden")return e=nl(n,s),n.lanes=536870912,_s(null,e);if(iu(n),(e=mt)?(e=dg(e,Hn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:$a!==null?{id:ha,overflow:ma}:null,retryLane:536870912,hydrationErrors:null},r=Lh(e),r.return=n,n.child=r,Vt=n,mt=null)):e=null,e===null)throw Wa(n);return n.lanes=536870912,null}return nl(n,s)}var u=e.memoizedState;if(u!==null){var p=u.dehydrated;if(iu(n),l)if(n.flags&256)n.flags&=-257,n=Wm(e,n,r);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(o(558));else if(Dt||wi(e,n,r,!1),l=(r&e.childLanes)!==0,Dt||l){if(s=ut,s!==null&&(p=N(s,r),p!==0&&p!==u.retryLane))throw u.retryLane=p,Ir(e,p),bn(s,e,p),Au;hl(),n=Wm(e,n,r)}else e=u.treeContext,mt=Kn(p.nextSibling),Vt=n,Ze=!0,Ja=null,Hn=!1,e!==null&&qh(n,e),n=nl(n,s),n.flags|=4096;return n}return e=Oa(e.child,{mode:s.mode,children:s.children}),e.ref=n.ref,n.child=e,e.return=n,e}function al(e,n){var r=n.ref;if(r===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(o(284));(e===null||e.ref!==r)&&(n.flags|=4194816)}}function Ru(e,n,r,s,l){return Gr(n),r=ou(e,n,r,s,void 0,l),s=lu(),e!==null&&!Dt?(cu(e,n,l),Ua(e,n,l)):(Ze&&s&&Hc(n),n.flags|=1,Xt(e,n,r,l),n.child)}function ep(e,n,r,s,l,u){return Gr(n),n.updateQueue=null,r=am(n,s,r,l),nm(e),s=lu(),e!==null&&!Dt?(cu(e,n,u),Ua(e,n,u)):(Ze&&s&&Hc(n),n.flags|=1,Xt(e,n,r,u),n.child)}function tp(e,n,r,s,l){if(Gr(n),n.stateNode===null){var u=vi,p=r.contextType;typeof p=="object"&&p!==null&&(u=Ft(p)),u=new r(s,u),n.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Tu,n.stateNode=u,u._reactInternals=n,u=n.stateNode,u.props=s,u.state=n.memoizedState,u.refs={},Wc(n),p=r.contextType,u.context=typeof p=="object"&&p!==null?Ft(p):vi,u.state=n.memoizedState,p=r.getDerivedStateFromProps,typeof p=="function"&&(Eu(n,r,p,s),u.state=n.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(p=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),p!==u.state&&Tu.enqueueReplaceState(u,u.state,null),Cs(n,s,u,l),Ts(),u.state=n.memoizedState),typeof u.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(e===null){u=n.stateNode;var b=n.memoizedProps,T=$r(r,b);u.props=T;var D=u.context,G=r.contextType;p=vi,typeof G=="object"&&G!==null&&(p=Ft(G));var X=r.getDerivedStateFromProps;G=typeof X=="function"||typeof u.getSnapshotBeforeUpdate=="function",b=n.pendingProps!==b,G||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(b||D!==p)&&Im(n,u,s,p),tr=!1;var z=n.memoizedState;u.state=z,Cs(n,s,u,l),Ts(),D=n.memoizedState,b||z!==D||tr?(typeof X=="function"&&(Eu(n,r,X,s),D=n.memoizedState),(T=tr||Pm(n,r,T,s,z,D,p))?(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"&&(n.flags|=4194308)):(typeof u.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=D),u.props=s,u.state=D,u.context=p,s=T):(typeof u.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{u=n.stateNode,eu(e,n),p=n.memoizedProps,G=$r(r,p),u.props=G,X=n.pendingProps,z=u.context,D=r.contextType,T=vi,typeof D=="object"&&D!==null&&(T=Ft(D)),b=r.getDerivedStateFromProps,(D=typeof b=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(p!==X||z!==T)&&Im(n,u,s,T),tr=!1,z=n.memoizedState,u.state=z,Cs(n,s,u,l),Ts();var B=n.memoizedState;p!==X||z!==B||tr||e!==null&&e.dependencies!==null&&Bo(e.dependencies)?(typeof b=="function"&&(Eu(n,r,b,s),B=n.memoizedState),(G=tr||Pm(n,r,G,s,z,B,T)||e!==null&&e.dependencies!==null&&Bo(e.dependencies))?(D||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(s,B,T),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(s,B,T)),typeof u.componentDidUpdate=="function"&&(n.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof u.componentDidUpdate!="function"||p===e.memoizedProps&&z===e.memoizedState||(n.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&z===e.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=B),u.props=s,u.state=B,u.context=T,s=G):(typeof u.componentDidUpdate!="function"||p===e.memoizedProps&&z===e.memoizedState||(n.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&z===e.memoizedState||(n.flags|=1024),s=!1)}return u=s,al(e,n),s=(n.flags&128)!==0,u||s?(u=n.stateNode,r=s&&typeof r.getDerivedStateFromError!="function"?null:u.render(),n.flags|=1,e!==null&&s?(n.child=Xr(n,e.child,null,l),n.child=Xr(n,null,r,l)):Xt(e,n,r,l),n.memoizedState=u.state,e=n.child):e=Ua(e,n,l),e}function np(e,n,r,s){return Qr(),n.flags|=256,Xt(e,n,r,s),n.child}var ku={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Nu(e){return{baseLanes:e,cachePool:Gh()}}function _u(e,n,r){return e=e!==null?e.childLanes&~r:0,n&&(e|=Nn),e}function ap(e,n,r){var s=n.pendingProps,l=!1,u=(n.flags&128)!==0,p;if((p=u)||(p=e!==null&&e.memoizedState===null?!1:(kt.current&2)!==0),p&&(l=!0,n.flags&=-129),p=(n.flags&32)!==0,n.flags&=-33,e===null){if(Ze){if(l?rr(n):ir(),(e=mt)?(e=dg(e,Hn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:$a!==null?{id:ha,overflow:ma}:null,retryLane:536870912,hydrationErrors:null},r=Lh(e),r.return=n,n.child=r,Vt=n,mt=null)):e=null,e===null)throw Wa(n);return fd(e)?n.lanes=32:n.lanes=536870912,null}var b=s.children;return s=s.fallback,l?(ir(),l=n.mode,b=rl({mode:"hidden",children:b},l),s=Hr(s,l,r,null),b.return=n,s.return=n,b.sibling=s,n.child=b,s=n.child,s.memoizedState=Nu(r),s.childLanes=_u(e,p,r),n.memoizedState=ku,_s(null,s)):(rr(n),Ou(n,b))}var T=e.memoizedState;if(T!==null&&(b=T.dehydrated,b!==null)){if(u)n.flags&256?(rr(n),n.flags&=-257,n=Mu(e,n,r)):n.memoizedState!==null?(ir(),n.child=e.child,n.flags|=128,n=null):(ir(),b=s.fallback,l=n.mode,s=rl({mode:"visible",children:s.children},l),b=Hr(b,l,r,null),b.flags|=2,s.return=n,b.return=n,s.sibling=b,n.child=s,Xr(n,e.child,null,r),s=n.child,s.memoizedState=Nu(r),s.childLanes=_u(e,p,r),n.memoizedState=ku,n=_s(null,s));else if(rr(n),fd(b)){if(p=b.nextSibling&&b.nextSibling.dataset,p)var D=p.dgst;p=D,s=Error(o(419)),s.stack="",s.digest=p,vs({value:s,source:null,stack:null}),n=Mu(e,n,r)}else if(Dt||wi(e,n,r,!1),p=(r&e.childLanes)!==0,Dt||p){if(p=ut,p!==null&&(s=N(p,r),s!==0&&s!==T.retryLane))throw T.retryLane=s,Ir(e,s),bn(p,e,s),Au;dd(b)||hl(),n=Mu(e,n,r)}else dd(b)?(n.flags|=192,n.child=e.child,n=null):(e=T.treeContext,mt=Kn(b.nextSibling),Vt=n,Ze=!0,Ja=null,Hn=!1,e!==null&&qh(n,e),n=Ou(n,s.children),n.flags|=4096);return n}return l?(ir(),b=s.fallback,l=n.mode,T=e.child,D=T.sibling,s=Oa(T,{mode:"hidden",children:s.children}),s.subtreeFlags=T.subtreeFlags&65011712,D!==null?b=Oa(D,b):(b=Hr(b,l,r,null),b.flags|=2),b.return=n,s.return=n,s.sibling=b,n.child=s,_s(null,s),s=n.child,b=e.child.memoizedState,b===null?b=Nu(r):(l=b.cachePool,l!==null?(T=Ot._currentValue,l=l.parent!==T?{parent:T,pool:T}:l):l=Gh(),b={baseLanes:b.baseLanes|r,cachePool:l}),s.memoizedState=b,s.childLanes=_u(e,p,r),n.memoizedState=ku,_s(e.child,s)):(rr(n),r=e.child,e=r.sibling,r=Oa(r,{mode:"visible",children:s.children}),r.return=n,r.sibling=null,e!==null&&(p=n.deletions,p===null?(n.deletions=[e],n.flags|=16):p.push(e)),n.child=r,n.memoizedState=null,r)}function Ou(e,n){return n=rl({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function rl(e,n){return e=Cn(22,e,null,n),e.lanes=0,e}function Mu(e,n,r){return Xr(n,e.child,null,r),e=Ou(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function rp(e,n,r){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n),Vc(e.return,n,r)}function Du(e,n,r,s,l,u){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:r,tailMode:l,treeForkCount:u}:(p.isBackwards=n,p.rendering=null,p.renderingStartTime=0,p.last=s,p.tail=r,p.tailMode=l,p.treeForkCount=u)}function ip(e,n,r){var s=n.pendingProps,l=s.revealOrder,u=s.tail;s=s.children;var p=kt.current,b=(p&2)!==0;if(b?(p=p&1|2,n.flags|=128):p&=1,P(kt,p),Xt(e,n,s,r),s=Ze?ys:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rp(e,r,n);else if(e.tag===19)rp(e,r,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"forwards":for(r=n.child,l=null;r!==null;)e=r.alternate,e!==null&&Yo(e)===null&&(l=r),r=r.sibling;r=l,r===null?(l=n.child,n.child=null):(l=r.sibling,r.sibling=null),Du(n,!1,l,r,u,s);break;case"backwards":case"unstable_legacy-backwards":for(r=null,l=n.child,n.child=null;l!==null;){if(e=l.alternate,e!==null&&Yo(e)===null){n.child=l;break}e=l.sibling,l.sibling=r,r=l,l=e}Du(n,!0,r,null,u,s);break;case"together":Du(n,!1,null,null,void 0,s);break;default:n.memoizedState=null}return n.child}function Ua(e,n,r){if(e!==null&&(n.dependencies=e.dependencies),lr|=n.lanes,(r&n.childLanes)===0)if(e!==null){if(wi(e,n,r,!1),(r&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(o(153));if(n.child!==null){for(e=n.child,r=Oa(e,e.pendingProps),n.child=r,r.return=n;e.sibling!==null;)e=e.sibling,r=r.sibling=Oa(e,e.pendingProps),r.return=n;r.sibling=null}return n.child}function ju(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Bo(e)))}function qx(e,n,r){switch(n.tag){case 3:Ae(n,n.stateNode.containerInfo),er(n,Ot,e.memoizedState.cache),Qr();break;case 27:case 5:Qt(n);break;case 4:Ae(n,n.stateNode.containerInfo);break;case 10:er(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,iu(n),null;break;case 13:var s=n.memoizedState;if(s!==null)return s.dehydrated!==null?(rr(n),n.flags|=128,null):(r&n.child.childLanes)!==0?ap(e,n,r):(rr(n),e=Ua(e,n,r),e!==null?e.sibling:null);rr(n);break;case 19:var l=(e.flags&128)!==0;if(s=(r&n.childLanes)!==0,s||(wi(e,n,r,!1),s=(r&n.childLanes)!==0),l){if(s)return ip(e,n,r);n.flags|=128}if(l=n.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),P(kt,kt.current),s)break;return null;case 22:return n.lanes=0,$m(e,n,r,n.pendingProps);case 24:er(n,Ot,e.memoizedState.cache)}return Ua(e,n,r)}function sp(e,n,r){if(e!==null)if(e.memoizedProps!==n.pendingProps)Dt=!0;else{if(!ju(e,r)&&(n.flags&128)===0)return Dt=!1,qx(e,n,r);Dt=(e.flags&131072)!==0}else Dt=!1,Ze&&(n.flags&1048576)!==0&&Bh(n,ys,n.index);switch(n.lanes=0,n.tag){case 16:e:{var s=n.pendingProps;if(e=Vr(n.elementType),n.type=e,typeof e=="function")qc(e)?(s=$r(e,s),n.tag=1,n=tp(null,n,e,s,r)):(n.tag=0,n=Ru(null,n,e,s,r));else{if(e!=null){var l=e.$$typeof;if(l===me){n.tag=11,n=Fm(null,n,e,s,r);break e}else if(l===k){n.tag=14,n=Xm(null,n,e,s,r);break e}}throw n=Ue(e)||e,Error(o(306,n,""))}}return n;case 0:return Ru(e,n,n.type,n.pendingProps,r);case 1:return s=n.type,l=$r(s,n.pendingProps),tp(e,n,s,l,r);case 3:e:{if(Ae(n,n.stateNode.containerInfo),e===null)throw Error(o(387));s=n.pendingProps;var u=n.memoizedState;l=u.element,eu(e,n),Cs(n,s,null,r);var p=n.memoizedState;if(s=p.cache,er(n,Ot,s),s!==u.cache&&Fc(n,[Ot],r,!0),Ts(),s=p.element,u.isDehydrated)if(u={element:s,isDehydrated:!1,cache:p.cache},n.updateQueue.baseState=u,n.memoizedState=u,n.flags&256){n=np(e,n,s,r);break e}else if(s!==l){l=qn(Error(o(424)),n),vs(l),n=np(e,n,s,r);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,mt=Kn(e.firstChild),Vt=n,Ze=!0,Ja=null,Hn=!0,r=$h(n,null,s,r),n.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Qr(),s===l){n=Ua(e,n,r);break e}Xt(e,n,s,r)}n=n.child}return n;case 26:return al(e,n),e===null?(r=yg(n.type,null,n.pendingProps,null))?n.memoizedState=r:Ze||(r=n.type,e=n.pendingProps,s=xl(J.current).createElement(r),s[ie]=n,s[oe]=e,Zt(s,r,e),yt(s),n.stateNode=s):n.memoizedState=yg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Qt(n),e===null&&Ze&&(s=n.stateNode=mg(n.type,n.pendingProps,J.current),Vt=n,Hn=!0,l=mt,hr(n.type)?(hd=l,mt=Kn(s.firstChild)):mt=l),Xt(e,n,n.pendingProps.children,r),al(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Ze&&((l=s=mt)&&(s=p1(s,n.type,n.pendingProps,Hn),s!==null?(n.stateNode=s,Vt=n,mt=Kn(s.firstChild),Hn=!1,l=!0):l=!1),l||Wa(n)),Qt(n),l=n.type,u=n.pendingProps,p=e!==null?e.memoizedProps:null,s=u.children,ld(l,u)?s=null:p!==null&&ld(l,p)&&(n.flags|=32),n.memoizedState!==null&&(l=ou(e,n,_x,null,null,r),Gs._currentValue=l),al(e,n),Xt(e,n,s,r),n.child;case 6:return e===null&&Ze&&((e=r=mt)&&(r=g1(r,n.pendingProps,Hn),r!==null?(n.stateNode=r,Vt=n,mt=null,e=!0):e=!1),e||Wa(n)),null;case 13:return ap(e,n,r);case 4:return Ae(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=Xr(n,null,s,r):Xt(e,n,s,r),n.child;case 11:return Fm(e,n,n.type,n.pendingProps,r);case 7:return Xt(e,n,n.pendingProps,r),n.child;case 8:return Xt(e,n,n.pendingProps.children,r),n.child;case 12:return Xt(e,n,n.pendingProps.children,r),n.child;case 10:return s=n.pendingProps,er(n,n.type,s.value),Xt(e,n,s.children,r),n.child;case 9:return l=n.type._context,s=n.pendingProps.children,Gr(n),l=Ft(l),s=s(l),n.flags|=1,Xt(e,n,s,r),n.child;case 14:return Xm(e,n,n.type,n.pendingProps,r);case 15:return Zm(e,n,n.type,n.pendingProps,r);case 19:return ip(e,n,r);case 31:return Bx(e,n,r);case 22:return $m(e,n,r,n.pendingProps);case 24:return Gr(n),s=Ft(Ot),e===null?(l=$c(),l===null&&(l=ut,u=Xc(),l.pooledCache=u,u.refCount++,u!==null&&(l.pooledCacheLanes|=r),l=u),n.memoizedState={parent:s,cache:l},Wc(n),er(n,Ot,l)):((e.lanes&r)!==0&&(eu(e,n),Cs(n,null,null,r),Ts()),l=e.memoizedState,u=n.memoizedState,l.parent!==s?(l={parent:s,cache:s},n.memoizedState=l,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=l),er(n,Ot,s)):(s=u.cache,er(n,Ot,s),s!==l.cache&&Fc(n,[Ot],r,!0))),Xt(e,n,n.pendingProps.children,r),n.child;case 29:throw n.pendingProps}throw Error(o(156,n.tag))}function Ba(e){e.flags|=4}function zu(e,n,r,s,l){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(Dp())e.flags|=8192;else throw Fr=Ho,Jc}else e.flags&=-16777217}function op(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wg(n))if(Dp())e.flags|=8192;else throw Fr=Ho,Jc}function il(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?At():536870912,e.lanes|=n,ji|=n)}function Os(e,n){if(!Ze)switch(e.tailMode){case"hidden":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function pt(e){var n=e.alternate!==null&&e.alternate.child===e.child,r=0,s=0;if(n)for(var l=e.child;l!==null;)r|=l.lanes|l.childLanes,s|=l.subtreeFlags&65011712,s|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)r|=l.lanes|l.childLanes,s|=l.subtreeFlags,s|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=s,e.childLanes=r,n}function Px(e,n,r){var s=n.pendingProps;switch(Qc(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(n),null;case 1:return pt(n),null;case 3:return r=n.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),ja(Ot),Pe(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Si(n)?Ba(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Gc())),pt(n),null;case 26:var l=n.type,u=n.memoizedState;return e===null?(Ba(n),u!==null?(pt(n),op(n,u)):(pt(n),zu(n,l,null,s,r))):u?u!==e.memoizedState?(Ba(n),pt(n),op(n,u)):(pt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==s&&Ba(n),pt(n),zu(n,l,e,s,r)),null;case 27:if(an(n),r=J.current,l=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&Ba(n);else{if(!s){if(n.stateNode===null)throw Error(o(166));return pt(n),null}e=Z.current,Si(n)?Ph(n):(e=mg(l,s,r),n.stateNode=e,Ba(n))}return pt(n),null;case 5:if(an(n),l=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&Ba(n);else{if(!s){if(n.stateNode===null)throw Error(o(166));return pt(n),null}if(u=Z.current,Si(n))Ph(n);else{var p=xl(J.current);switch(u){case 1:u=p.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:u=p.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":u=p.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":u=p.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":u=p.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof s.is=="string"?p.createElement("select",{is:s.is}):p.createElement("select"),s.multiple?u.multiple=!0:s.size&&(u.size=s.size);break;default:u=typeof s.is=="string"?p.createElement(l,{is:s.is}):p.createElement(l)}}u[ie]=n,u[oe]=s;e:for(p=n.child;p!==null;){if(p.tag===5||p.tag===6)u.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===n)break e;for(;p.sibling===null;){if(p.return===null||p.return===n)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}n.stateNode=u;e:switch(Zt(u,l,s),l){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Ba(n)}}return pt(n),zu(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,r),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==s&&Ba(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(o(166));if(e=J.current,Si(n)){if(e=n.stateNode,r=n.memoizedProps,s=null,l=Vt,l!==null)switch(l.tag){case 27:case 5:s=l.memoizedProps}e[ie]=n,e=!!(e.nodeValue===r||s!==null&&s.suppressHydrationWarning===!0||ag(e.nodeValue,r)),e||Wa(n,!0)}else e=xl(e).createTextNode(s),e[ie]=n,n.stateNode=e}return pt(n),null;case 31:if(r=n.memoizedState,e===null||e.memoizedState!==null){if(s=Si(n),r!==null){if(e===null){if(!s)throw Error(o(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[ie]=n}else Qr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;pt(n),e=!1}else r=Gc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return n.flags&256?(Rn(n),n):(Rn(n),null);if((n.flags&128)!==0)throw Error(o(558))}return pt(n),null;case 13:if(s=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=Si(n),s!==null&&s.dehydrated!==null){if(e===null){if(!l)throw Error(o(318));if(l=n.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(o(317));l[ie]=n}else Qr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;pt(n),l=!1}else l=Gc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return n.flags&256?(Rn(n),n):(Rn(n),null)}return Rn(n),(n.flags&128)!==0?(n.lanes=r,n):(r=s!==null,e=e!==null&&e.memoizedState!==null,r&&(s=n.child,l=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(l=s.alternate.memoizedState.cachePool.pool),u=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),u!==l&&(s.flags|=2048)),r!==e&&r&&(n.child.flags|=8192),il(n,n.updateQueue),pt(n),null);case 4:return Pe(),e===null&&ad(n.stateNode.containerInfo),pt(n),null;case 10:return ja(n.type),pt(n),null;case 19:if(q(kt),s=n.memoizedState,s===null)return pt(n),null;if(l=(n.flags&128)!==0,u=s.rendering,u===null)if(l)Os(s,!1);else{if(Tt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(u=Yo(e),u!==null){for(n.flags|=128,Os(s,!1),e=u.updateQueue,n.updateQueue=e,il(n,e),n.subtreeFlags=0,e=r,r=n.child;r!==null;)zh(r,e),r=r.sibling;return P(kt,kt.current&1|2),Ze&&Ma(n,s.treeForkCount),n.child}e=e.sibling}s.tail!==null&&bt()>ul&&(n.flags|=128,l=!0,Os(s,!1),n.lanes=4194304)}else{if(!l)if(e=Yo(u),e!==null){if(n.flags|=128,l=!0,e=e.updateQueue,n.updateQueue=e,il(n,e),Os(s,!0),s.tail===null&&s.tailMode==="hidden"&&!u.alternate&&!Ze)return pt(n),null}else 2*bt()-s.renderingStartTime>ul&&r!==536870912&&(n.flags|=128,l=!0,Os(s,!1),n.lanes=4194304);s.isBackwards?(u.sibling=n.child,n.child=u):(e=s.last,e!==null?e.sibling=u:n.child=u,s.last=u)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=bt(),e.sibling=null,r=kt.current,P(kt,l?r&1|2:r&1),Ze&&Ma(n,s.treeForkCount),e):(pt(n),null);case 22:case 23:return Rn(n),ru(),s=n.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(r&536870912)!==0&&(n.flags&128)===0&&(pt(n),n.subtreeFlags&6&&(n.flags|=8192)):pt(n),r=n.updateQueue,r!==null&&il(n,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==r&&(n.flags|=2048),e!==null&&q(Yr),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),ja(Ot),pt(n),null;case 25:return null;case 30:return null}throw Error(o(156,n.tag))}function Ix(e,n){switch(Qc(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ja(Ot),Pe(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return an(n),null;case 31:if(n.memoizedState!==null){if(Rn(n),n.alternate===null)throw Error(o(340));Qr()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Rn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(o(340));Qr()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return q(kt),null;case 4:return Pe(),null;case 10:return ja(n.type),null;case 22:case 23:return Rn(n),ru(),e!==null&&q(Yr),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return ja(Ot),null;case 25:return null;default:return null}}function lp(e,n){switch(Qc(n),n.tag){case 3:ja(Ot),Pe();break;case 26:case 27:case 5:an(n);break;case 4:Pe();break;case 31:n.memoizedState!==null&&Rn(n);break;case 13:Rn(n);break;case 19:q(kt);break;case 10:ja(n.type);break;case 22:case 23:Rn(n),ru(),e!==null&&q(Yr);break;case 24:ja(Ot)}}function Ms(e,n){try{var r=n.updateQueue,s=r!==null?r.lastEffect:null;if(s!==null){var l=s.next;r=l;do{if((r.tag&e)===e){s=void 0;var u=r.create,p=r.inst;s=u(),p.destroy=s}r=r.next}while(r!==l)}}catch(b){st(n,n.return,b)}}function sr(e,n,r){try{var s=n.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var u=l.next;s=u;do{if((s.tag&e)===e){var p=s.inst,b=p.destroy;if(b!==void 0){p.destroy=void 0,l=n;var T=r,D=b;try{D()}catch(G){st(l,T,G)}}}s=s.next}while(s!==u)}}catch(G){st(n,n.return,G)}}function cp(e){var n=e.updateQueue;if(n!==null){var r=e.stateNode;try{Wh(n,r)}catch(s){st(e,e.return,s)}}}function up(e,n,r){r.props=$r(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(s){st(e,n,s)}}function Ds(e,n){try{var r=e.ref;if(r!==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 r=="function"?e.refCleanup=r(s):r.current=s}}catch(l){st(e,n,l)}}function pa(e,n){var r=e.ref,s=e.refCleanup;if(r!==null)if(typeof s=="function")try{s()}catch(l){st(e,n,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(l){st(e,n,l)}else r.current=null}function dp(e){var n=e.type,r=e.memoizedProps,s=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":r.autoFocus&&s.focus();break e;case"img":r.src?s.src=r.src:r.srcSet&&(s.srcset=r.srcSet)}}catch(l){st(e,e.return,l)}}function Lu(e,n,r){try{var s=e.stateNode;c1(s,e.type,r,n),s[oe]=n}catch(l){st(e,e.return,l)}}function fp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&hr(e.type)||e.tag===4}function Uu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fp(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&&hr(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 Bu(e,n,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,n):(n=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,n.appendChild(e),r=r._reactRootContainer,r!=null||n.onclick!==null||(n.onclick=Na));else if(s!==4&&(s===27&&hr(e.type)&&(r=e.stateNode,n=null),e=e.child,e!==null))for(Bu(e,n,r),e=e.sibling;e!==null;)Bu(e,n,r),e=e.sibling}function sl(e,n,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?r.insertBefore(e,n):r.appendChild(e);else if(s!==4&&(s===27&&hr(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(sl(e,n,r),e=e.sibling;e!==null;)sl(e,n,r),e=e.sibling}function hp(e){var n=e.stateNode,r=e.memoizedProps;try{for(var s=e.type,l=n.attributes;l.length;)n.removeAttributeNode(l[0]);Zt(n,s,r),n[ie]=e,n[oe]=r}catch(u){st(e,e.return,u)}}var qa=!1,jt=!1,qu=!1,mp=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function Hx(e,n){if(e=e.containerInfo,sd=Rl,e=Ah(e),Mc(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var s=r.getSelection&&r.getSelection();if(s&&s.rangeCount!==0){r=s.anchorNode;var l=s.anchorOffset,u=s.focusNode;s=s.focusOffset;try{r.nodeType,u.nodeType}catch{r=null;break e}var p=0,b=-1,T=-1,D=0,G=0,X=e,z=null;t:for(;;){for(var B;X!==r||l!==0&&X.nodeType!==3||(b=p+l),X!==u||s!==0&&X.nodeType!==3||(T=p+s),X.nodeType===3&&(p+=X.nodeValue.length),(B=X.firstChild)!==null;)z=X,X=B;for(;;){if(X===e)break t;if(z===r&&++D===l&&(b=p),z===u&&++G===s&&(T=p),(B=X.nextSibling)!==null)break;X=z,z=X.parentNode}X=B}r=b===-1||T===-1?null:{start:b,end:T}}else r=null}r=r||{start:0,end:0}}else r=null;for(od={focusedElem:e,selectionRange:r},Rl=!1,Ht=n;Ht!==null;)if(n=Ht,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Ht=e;else for(;Ht!==null;){switch(n=Ht,u=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)l=e[r],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,r=n,l=u.memoizedProps,u=u.memoizedState,s=r.stateNode;try{var ce=$r(r.type,l);e=s.getSnapshotBeforeUpdate(ce,u),s.__reactInternalSnapshotBeforeUpdate=e}catch(ke){st(r,r.return,ke)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,r=e.nodeType,r===9)ud(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ud(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(o(163))}if(e=n.sibling,e!==null){e.return=n.return,Ht=e;break}Ht=n.return}}function pp(e,n,r){var s=r.flags;switch(r.tag){case 0:case 11:case 15:Ia(e,r),s&4&&Ms(5,r);break;case 1:if(Ia(e,r),s&4)if(e=r.stateNode,n===null)try{e.componentDidMount()}catch(p){st(r,r.return,p)}else{var l=$r(r.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(l,n,e.__reactInternalSnapshotBeforeUpdate)}catch(p){st(r,r.return,p)}}s&64&&cp(r),s&512&&Ds(r,r.return);break;case 3:if(Ia(e,r),s&64&&(e=r.updateQueue,e!==null)){if(n=null,r.child!==null)switch(r.child.tag){case 27:case 5:n=r.child.stateNode;break;case 1:n=r.child.stateNode}try{Wh(e,n)}catch(p){st(r,r.return,p)}}break;case 27:n===null&&s&4&&hp(r);case 26:case 5:Ia(e,r),n===null&&s&4&&dp(r),s&512&&Ds(r,r.return);break;case 12:Ia(e,r);break;case 31:Ia(e,r),s&4&&vp(e,r);break;case 13:Ia(e,r),s&4&&bp(e,r),s&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=$x.bind(null,r),y1(e,r))));break;case 22:if(s=r.memoizedState!==null||qa,!s){n=n!==null&&n.memoizedState!==null||jt,l=qa;var u=jt;qa=s,(jt=n)&&!u?Ha(e,r,(r.subtreeFlags&8772)!==0):Ia(e,r),qa=l,jt=u}break;case 30:break;default:Ia(e,r)}}function gp(e){var n=e.alternate;n!==null&&(e.alternate=null,gp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&St(n)),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 vt=null,pn=!1;function Pa(e,n,r){for(r=r.child;r!==null;)yp(e,n,r),r=r.sibling}function yp(e,n,r){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Ca,r)}catch{}switch(r.tag){case 26:jt||pa(r,n),Pa(e,n,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:jt||pa(r,n);var s=vt,l=pn;hr(r.type)&&(vt=r.stateNode,pn=!1),Pa(e,n,r),Hs(r.stateNode),vt=s,pn=l;break;case 5:jt||pa(r,n);case 6:if(s=vt,l=pn,vt=null,Pa(e,n,r),vt=s,pn=l,vt!==null)if(pn)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(r.stateNode)}catch(u){st(r,n,u)}else try{vt.removeChild(r.stateNode)}catch(u){st(r,n,u)}break;case 18:vt!==null&&(pn?(e=vt,cg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),Hi(e)):cg(vt,r.stateNode));break;case 4:s=vt,l=pn,vt=r.stateNode.containerInfo,pn=!0,Pa(e,n,r),vt=s,pn=l;break;case 0:case 11:case 14:case 15:sr(2,r,n),jt||sr(4,r,n),Pa(e,n,r);break;case 1:jt||(pa(r,n),s=r.stateNode,typeof s.componentWillUnmount=="function"&&up(r,n,s)),Pa(e,n,r);break;case 21:Pa(e,n,r);break;case 22:jt=(s=jt)||r.memoizedState!==null,Pa(e,n,r),jt=s;break;default:Pa(e,n,r)}}function vp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hi(e)}catch(r){st(n,n.return,r)}}}function bp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hi(e)}catch(r){st(n,n.return,r)}}function Qx(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new mp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new mp),n;default:throw Error(o(435,e.tag))}}function ol(e,n){var r=Qx(e);n.forEach(function(s){if(!r.has(s)){r.add(s);var l=Jx.bind(null,e,s);s.then(l,l)}})}function gn(e,n){var r=n.deletions;if(r!==null)for(var s=0;s<r.length;s++){var l=r[s],u=e,p=n,b=p;e:for(;b!==null;){switch(b.tag){case 27:if(hr(b.type)){vt=b.stateNode,pn=!1;break e}break;case 5:vt=b.stateNode,pn=!1;break e;case 3:case 4:vt=b.stateNode.containerInfo,pn=!0;break e}b=b.return}if(vt===null)throw Error(o(160));yp(u,p,l),vt=null,pn=!1,u=l.alternate,u!==null&&(u.return=null),l.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)xp(n,e),n=n.sibling}var ia=null;function xp(e,n){var r=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gn(n,e),yn(e),s&4&&(sr(3,e,e.return),Ms(3,e),sr(5,e,e.return));break;case 1:gn(n,e),yn(e),s&512&&(jt||r===null||pa(r,r.return)),s&64&&qa&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?s:r.concat(s))));break;case 26:var l=ia;if(gn(n,e),yn(e),s&512&&(jt||r===null||pa(r,r.return)),s&4){var u=r!==null?r.memoizedState:null;if(s=e.memoizedState,r===null)if(s===null)if(e.stateNode===null){e:{s=e.type,r=e.memoizedProps,l=l.ownerDocument||l;t:switch(s){case"title":u=l.getElementsByTagName("title")[0],(!u||u[xt]||u[ie]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=l.createElement(s),l.head.insertBefore(u,l.querySelector("head > title"))),Zt(u,s,r),u[ie]=e,yt(u),s=u;break e;case"link":var p=xg("link","href",l).get(s+(r.href||""));if(p){for(var b=0;b<p.length;b++)if(u=p[b],u.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&u.getAttribute("rel")===(r.rel==null?null:r.rel)&&u.getAttribute("title")===(r.title==null?null:r.title)&&u.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){p.splice(b,1);break t}}u=l.createElement(s),Zt(u,s,r),l.head.appendChild(u);break;case"meta":if(p=xg("meta","content",l).get(s+(r.content||""))){for(b=0;b<p.length;b++)if(u=p[b],u.getAttribute("content")===(r.content==null?null:""+r.content)&&u.getAttribute("name")===(r.name==null?null:r.name)&&u.getAttribute("property")===(r.property==null?null:r.property)&&u.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&u.getAttribute("charset")===(r.charSet==null?null:r.charSet)){p.splice(b,1);break t}}u=l.createElement(s),Zt(u,s,r),l.head.appendChild(u);break;default:throw Error(o(468,s))}u[ie]=e,yt(u),s=u}e.stateNode=s}else Sg(l,e.type,e.stateNode);else e.stateNode=bg(l,s,e.memoizedProps);else u!==s?(u===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):u.count--,s===null?Sg(l,e.type,e.stateNode):bg(l,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Lu(e,e.memoizedProps,r.memoizedProps)}break;case 27:gn(n,e),yn(e),s&512&&(jt||r===null||pa(r,r.return)),r!==null&&s&4&&Lu(e,e.memoizedProps,r.memoizedProps);break;case 5:if(gn(n,e),yn(e),s&512&&(jt||r===null||pa(r,r.return)),e.flags&32){l=e.stateNode;try{di(l,"")}catch(ce){st(e,e.return,ce)}}s&4&&e.stateNode!=null&&(l=e.memoizedProps,Lu(e,l,r!==null?r.memoizedProps:l)),s&1024&&(qu=!0);break;case 6:if(gn(n,e),yn(e),s&4){if(e.stateNode===null)throw Error(o(162));s=e.memoizedProps,r=e.stateNode;try{r.nodeValue=s}catch(ce){st(e,e.return,ce)}}break;case 3:if(El=null,l=ia,ia=Sl(n.containerInfo),gn(n,e),ia=l,yn(e),s&4&&r!==null&&r.memoizedState.isDehydrated)try{Hi(n.containerInfo)}catch(ce){st(e,e.return,ce)}qu&&(qu=!1,Sp(e));break;case 4:s=ia,ia=Sl(e.stateNode.containerInfo),gn(n,e),yn(e),ia=s;break;case 12:gn(n,e),yn(e);break;case 31:gn(n,e),yn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ol(e,s)));break;case 13:gn(n,e),yn(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(cl=bt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ol(e,s)));break;case 22:l=e.memoizedState!==null;var T=r!==null&&r.memoizedState!==null,D=qa,G=jt;if(qa=D||l,jt=G||T,gn(n,e),jt=G,qa=D,yn(e),s&8192)e:for(n=e.stateNode,n._visibility=l?n._visibility&-2:n._visibility|1,l&&(r===null||T||qa||jt||Jr(e)),r=null,n=e;;){if(n.tag===5||n.tag===26){if(r===null){T=r=n;try{if(u=T.stateNode,l)p=u.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{b=T.stateNode;var X=T.memoizedProps.style,z=X!=null&&X.hasOwnProperty("display")?X.display:null;b.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(ce){st(T,T.return,ce)}}}else if(n.tag===6){if(r===null){T=n;try{T.stateNode.nodeValue=l?"":T.memoizedProps}catch(ce){st(T,T.return,ce)}}}else if(n.tag===18){if(r===null){T=n;try{var B=T.stateNode;l?ug(B,!0):ug(T.stateNode,!1)}catch(ce){st(T,T.return,ce)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;r===n&&(r=null),n=n.return}r===n&&(r=null),n.sibling.return=n.return,n=n.sibling}s&4&&(s=e.updateQueue,s!==null&&(r=s.retryQueue,r!==null&&(s.retryQueue=null,ol(e,r))));break;case 19:gn(n,e),yn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,ol(e,s)));break;case 30:break;case 21:break;default:gn(n,e),yn(e)}}function yn(e){var n=e.flags;if(n&2){try{for(var r,s=e.return;s!==null;){if(fp(s)){r=s;break}s=s.return}if(r==null)throw Error(o(160));switch(r.tag){case 27:var l=r.stateNode,u=Uu(e);sl(e,u,l);break;case 5:var p=r.stateNode;r.flags&32&&(di(p,""),r.flags&=-33);var b=Uu(e);sl(e,b,p);break;case 3:case 4:var T=r.stateNode.containerInfo,D=Uu(e);Bu(e,D,T);break;default:throw Error(o(161))}}catch(G){st(e,e.return,G)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Sp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Sp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Ia(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)pp(e,n.alternate,n),n=n.sibling}function Jr(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:sr(4,n,n.return),Jr(n);break;case 1:pa(n,n.return);var r=n.stateNode;typeof r.componentWillUnmount=="function"&&up(n,n.return,r),Jr(n);break;case 27:Hs(n.stateNode);case 26:case 5:pa(n,n.return),Jr(n);break;case 22:n.memoizedState===null&&Jr(n);break;case 30:Jr(n);break;default:Jr(n)}e=e.sibling}}function Ha(e,n,r){for(r=r&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var s=n.alternate,l=e,u=n,p=u.flags;switch(u.tag){case 0:case 11:case 15:Ha(l,u,r),Ms(4,u);break;case 1:if(Ha(l,u,r),s=u,l=s.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(D){st(s,s.return,D)}if(s=u,l=s.updateQueue,l!==null){var b=s.stateNode;try{var T=l.shared.hiddenCallbacks;if(T!==null)for(l.shared.hiddenCallbacks=null,l=0;l<T.length;l++)Jh(T[l],b)}catch(D){st(s,s.return,D)}}r&&p&64&&cp(u),Ds(u,u.return);break;case 27:hp(u);case 26:case 5:Ha(l,u,r),r&&s===null&&p&4&&dp(u),Ds(u,u.return);break;case 12:Ha(l,u,r);break;case 31:Ha(l,u,r),r&&p&4&&vp(l,u);break;case 13:Ha(l,u,r),r&&p&4&&bp(l,u);break;case 22:u.memoizedState===null&&Ha(l,u,r),Ds(u,u.return);break;case 30:break;default:Ha(l,u,r)}n=n.sibling}}function Pu(e,n){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&bs(r))}function Iu(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&bs(e))}function sa(e,n,r,s){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)wp(e,n,r,s),n=n.sibling}function wp(e,n,r,s){var l=n.flags;switch(n.tag){case 0:case 11:case 15:sa(e,n,r,s),l&2048&&Ms(9,n);break;case 1:sa(e,n,r,s);break;case 3:sa(e,n,r,s),l&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&bs(e)));break;case 12:if(l&2048){sa(e,n,r,s),e=n.stateNode;try{var u=n.memoizedProps,p=u.id,b=u.onPostCommit;typeof b=="function"&&b(p,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){st(n,n.return,T)}}else sa(e,n,r,s);break;case 31:sa(e,n,r,s);break;case 13:sa(e,n,r,s);break;case 23:break;case 22:u=n.stateNode,p=n.alternate,n.memoizedState!==null?u._visibility&2?sa(e,n,r,s):js(e,n):u._visibility&2?sa(e,n,r,s):(u._visibility|=2,Oi(e,n,r,s,(n.subtreeFlags&10256)!==0||!1)),l&2048&&Pu(p,n);break;case 24:sa(e,n,r,s),l&2048&&Iu(n.alternate,n);break;default:sa(e,n,r,s)}}function Oi(e,n,r,s,l){for(l=l&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var u=e,p=n,b=r,T=s,D=p.flags;switch(p.tag){case 0:case 11:case 15:Oi(u,p,b,T,l),Ms(8,p);break;case 23:break;case 22:var G=p.stateNode;p.memoizedState!==null?G._visibility&2?Oi(u,p,b,T,l):js(u,p):(G._visibility|=2,Oi(u,p,b,T,l)),l&&D&2048&&Pu(p.alternate,p);break;case 24:Oi(u,p,b,T,l),l&&D&2048&&Iu(p.alternate,p);break;default:Oi(u,p,b,T,l)}n=n.sibling}}function js(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var r=e,s=n,l=s.flags;switch(s.tag){case 22:js(r,s),l&2048&&Pu(s.alternate,s);break;case 24:js(r,s),l&2048&&Iu(s.alternate,s);break;default:js(r,s)}n=n.sibling}}var zs=8192;function Mi(e,n,r){if(e.subtreeFlags&zs)for(e=e.child;e!==null;)Ep(e,n,r),e=e.sibling}function Ep(e,n,r){switch(e.tag){case 26:Mi(e,n,r),e.flags&zs&&e.memoizedState!==null&&N1(r,ia,e.memoizedState,e.memoizedProps);break;case 5:Mi(e,n,r);break;case 3:case 4:var s=ia;ia=Sl(e.stateNode.containerInfo),Mi(e,n,r),ia=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=zs,zs=16777216,Mi(e,n,r),zs=s):Mi(e,n,r));break;default:Mi(e,n,r)}}function Tp(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Ls(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];Ht=s,Ap(s,e)}Tp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Cp(e),e=e.sibling}function Cp(e){switch(e.tag){case 0:case 11:case 15:Ls(e),e.flags&2048&&sr(9,e,e.return);break;case 3:Ls(e);break;case 12:Ls(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,ll(e)):Ls(e);break;default:Ls(e)}}function ll(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];Ht=s,Ap(s,e)}Tp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:sr(8,n,n.return),ll(n);break;case 22:r=n.stateNode,r._visibility&2&&(r._visibility&=-3,ll(n));break;default:ll(n)}e=e.sibling}}function Ap(e,n){for(;Ht!==null;){var r=Ht;switch(r.tag){case 0:case 11:case 15:sr(8,r,n);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var s=r.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:bs(r.memoizedState.cache)}if(s=r.child,s!==null)s.return=r,Ht=s;else e:for(r=e;Ht!==null;){s=Ht;var l=s.sibling,u=s.return;if(gp(s),s===r){Ht=null;break e}if(l!==null){l.return=u,Ht=l;break e}Ht=u}}}var Kx={getCacheForType:function(e){var n=Ft(Ot),r=n.data.get(e);return r===void 0&&(r=e(),n.data.set(e,r)),r},cacheSignal:function(){return Ft(Ot).controller.signal}},Gx=typeof WeakMap=="function"?WeakMap:Map,nt=0,ut=null,He=null,Ke=0,it=0,kn=null,or=!1,Di=!1,Hu=!1,Qa=0,Tt=0,lr=0,Wr=0,Qu=0,Nn=0,ji=0,Us=null,vn=null,Ku=!1,cl=0,Rp=0,ul=1/0,dl=null,cr=null,Bt=0,ur=null,zi=null,Ka=0,Gu=0,Yu=null,kp=null,Bs=0,Vu=null;function _n(){return(nt&2)!==0&&Ke!==0?Ke&-Ke:_.T!==null?Wu():te()}function Np(){if(Nn===0)if((Ke&536870912)===0||Ze){var e=Aa;Aa<<=1,(Aa&3932160)===0&&(Aa=262144),Nn=e}else Nn=536870912;return e=An.current,e!==null&&(e.flags|=32),Nn}function bn(e,n,r){(e===ut&&(it===2||it===9)||e.cancelPendingCommit!==null)&&(Li(e,0),dr(e,Ke,Nn,!1)),ft(e,r),((nt&2)===0||e!==ut)&&(e===ut&&((nt&2)===0&&(Wr|=r),Tt===4&&dr(e,Ke,Nn,!1)),ga(e))}function _p(e,n,r){if((nt&6)!==0)throw Error(o(327));var s=!r&&(n&127)===0&&(n&e.expiredLanes)===0||dt(e,n),l=s?Fx(e,n):Xu(e,n,!0),u=s;do{if(l===0){Di&&!s&&dr(e,n,0,!1);break}else{if(r=e.current.alternate,u&&!Yx(r)){l=Xu(e,n,!1),u=!1;continue}if(l===2){if(u=n,e.errorRecoveryDisabledLanes&u)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){n=p;e:{var b=e;l=Us;var T=b.current.memoizedState.isDehydrated;if(T&&(Li(b,p).flags|=256),p=Xu(b,p,!1),p!==2){if(Hu&&!T){b.errorRecoveryDisabledLanes|=u,Wr|=u,l=4;break e}u=vn,vn=l,u!==null&&(vn===null?vn=u:vn.push.apply(vn,u))}l=p}if(u=!1,l!==2)continue}}if(l===1){Li(e,0),dr(e,n,0,!0);break}e:{switch(s=e,u=l,u){case 0:case 1:throw Error(o(345));case 4:if((n&4194048)!==n)break;case 6:dr(s,n,Nn,!or);break e;case 2:vn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((n&62914560)===n&&(l=cl+300-bt(),10<l)){if(dr(s,n,Nn,!or),_e(s,0,!0)!==0)break e;Ka=n,s.timeoutHandle=og(Op.bind(null,s,r,vn,dl,Ku,n,Nn,Wr,ji,or,u,"Throttled",-0,0),l);break e}Op(s,r,vn,dl,Ku,n,Nn,Wr,ji,or,u,null,-0,0)}}break}while(!0);ga(e)}function Op(e,n,r,s,l,u,p,b,T,D,G,X,z,B){if(e.timeoutHandle=-1,X=n.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Na},Ep(n,u,X);var ce=(u&62914560)===u?cl-bt():(u&4194048)===u?Rp-bt():0;if(ce=_1(X,ce),ce!==null){Ka=u,e.cancelPendingCommit=ce(qp.bind(null,e,n,u,r,s,l,p,b,T,G,X,null,z,B)),dr(e,u,p,!D);return}}qp(e,n,u,r,s,l,p,b,T)}function Yx(e){for(var n=e;;){var r=n.tag;if((r===0||r===11||r===15)&&n.flags&16384&&(r=n.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var s=0;s<r.length;s++){var l=r[s],u=l.getSnapshot;l=l.value;try{if(!Tn(u(),l))return!1}catch{return!1}}if(r=n.child,n.subtreeFlags&16384&&r!==null)r.return=n,n=r;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function dr(e,n,r,s){n&=~Qu,n&=~Wr,e.suspendedLanes|=n,e.pingedLanes&=~n,s&&(e.warmLanes|=n),s=e.expirationTimes;for(var l=n;0<l;){var u=31-Ut(l),p=1<<u;s[u]=-1,l&=~p}r!==0&&Ra(e,r,n)}function fl(){return(nt&6)===0?(qs(0),!1):!0}function Fu(){if(He!==null){if(it===0)var e=He.return;else e=He,Da=Kr=null,uu(e),Ai=null,Ss=0,e=He;for(;e!==null;)lp(e.alternate,e),e=e.return;He=null}}function Li(e,n){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,f1(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Ka=0,Fu(),ut=e,He=r=Oa(e.current,null),Ke=n,it=0,kn=null,or=!1,Di=dt(e,n),Hu=!1,ji=Nn=Qu=Wr=lr=Tt=0,vn=Us=null,Ku=!1,(n&8)!==0&&(n|=n&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=n;0<s;){var l=31-Ut(s),u=1<<l;n|=e[l],s&=~u}return Qa=n,Do(),r}function Mp(e,n){ze=null,_.H=Ns,n===Ci||n===Io?(n=Fh(),it=3):n===Jc?(n=Fh(),it=4):it=n===Au?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,kn=n,He===null&&(Tt=1,tl(e,qn(n,e.current)))}function Dp(){var e=An.current;return e===null?!0:(Ke&4194048)===Ke?Qn===null:(Ke&62914560)===Ke||(Ke&536870912)!==0?e===Qn:!1}function jp(){var e=_.H;return _.H=Ns,e===null?Ns:e}function zp(){var e=_.A;return _.A=Kx,e}function hl(){Tt=4,or||(Ke&4194048)!==Ke&&An.current!==null||(Di=!0),(lr&134217727)===0&&(Wr&134217727)===0||ut===null||dr(ut,Ke,Nn,!1)}function Xu(e,n,r){var s=nt;nt|=2;var l=jp(),u=zp();(ut!==e||Ke!==n)&&(dl=null,Li(e,n)),n=!1;var p=Tt;e:do try{if(it!==0&&He!==null){var b=He,T=kn;switch(it){case 8:Fu(),p=6;break e;case 3:case 2:case 9:case 6:An.current===null&&(n=!0);var D=it;if(it=0,kn=null,Ui(e,b,T,D),r&&Di){p=0;break e}break;default:D=it,it=0,kn=null,Ui(e,b,T,D)}}Vx(),p=Tt;break}catch(G){Mp(e,G)}while(!0);return n&&e.shellSuspendCounter++,Da=Kr=null,nt=s,_.H=l,_.A=u,He===null&&(ut=null,Ke=0,Do()),p}function Vx(){for(;He!==null;)Lp(He)}function Fx(e,n){var r=nt;nt|=2;var s=jp(),l=zp();ut!==e||Ke!==n?(dl=null,ul=bt()+500,Li(e,n)):Di=dt(e,n);e:do try{if(it!==0&&He!==null){n=He;var u=kn;t:switch(it){case 1:it=0,kn=null,Ui(e,n,u,1);break;case 2:case 9:if(Yh(u)){it=0,kn=null,Up(n);break}n=function(){it!==2&&it!==9||ut!==e||(it=7),ga(e)},u.then(n,n);break e;case 3:it=7;break e;case 4:it=5;break e;case 7:Yh(u)?(it=0,kn=null,Up(n)):(it=0,kn=null,Ui(e,n,u,7));break;case 5:var p=null;switch(He.tag){case 26:p=He.memoizedState;case 5:case 27:var b=He;if(p?wg(p):b.stateNode.complete){it=0,kn=null;var T=b.sibling;if(T!==null)He=T;else{var D=b.return;D!==null?(He=D,ml(D)):He=null}break t}}it=0,kn=null,Ui(e,n,u,5);break;case 6:it=0,kn=null,Ui(e,n,u,6);break;case 8:Fu(),Tt=6;break e;default:throw Error(o(462))}}Xx();break}catch(G){Mp(e,G)}while(!0);return Da=Kr=null,_.H=s,_.A=l,nt=r,He!==null?0:(ut=null,Ke=0,Do(),Tt)}function Xx(){for(;He!==null&&!Kt();)Lp(He)}function Lp(e){var n=sp(e.alternate,e,Qa);e.memoizedProps=e.pendingProps,n===null?ml(e):He=n}function Up(e){var n=e,r=n.alternate;switch(n.tag){case 15:case 0:n=ep(r,n,n.pendingProps,n.type,void 0,Ke);break;case 11:n=ep(r,n,n.pendingProps,n.type.render,n.ref,Ke);break;case 5:uu(n);default:lp(r,n),n=He=zh(n,Qa),n=sp(r,n,Qa)}e.memoizedProps=e.pendingProps,n===null?ml(e):He=n}function Ui(e,n,r,s){Da=Kr=null,uu(n),Ai=null,Ss=0;var l=n.return;try{if(Ux(e,l,n,r,Ke)){Tt=1,tl(e,qn(r,e.current)),He=null;return}}catch(u){if(l!==null)throw He=l,u;Tt=1,tl(e,qn(r,e.current)),He=null;return}n.flags&32768?(Ze||s===1?e=!0:Di||(Ke&536870912)!==0?e=!1:(or=e=!0,(s===2||s===9||s===3||s===6)&&(s=An.current,s!==null&&s.tag===13&&(s.flags|=16384))),Bp(n,e)):ml(n)}function ml(e){var n=e;do{if((n.flags&32768)!==0){Bp(n,or);return}e=n.return;var r=Px(n.alternate,n,Qa);if(r!==null){He=r;return}if(n=n.sibling,n!==null){He=n;return}He=n=e}while(n!==null);Tt===0&&(Tt=5)}function Bp(e,n){do{var r=Ix(e.alternate,e);if(r!==null){r.flags&=32767,He=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!n&&(e=e.sibling,e!==null)){He=e;return}He=e=r}while(e!==null);Tt=6,He=null}function qp(e,n,r,s,l,u,p,b,T){e.cancelPendingCommit=null;do pl();while(Bt!==0);if((nt&6)!==0)throw Error(o(327));if(n!==null){if(n===e.current)throw Error(o(177));if(u=n.lanes|n.childLanes,u|=Uc,en(e,r,u,p,b,T),e===ut&&(He=ut=null,Ke=0),zi=n,ur=e,Ka=r,Gu=u,Yu=l,kp=s,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Wx(Gt,function(){return Kp(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=_.T,_.T=null,l=F.p,F.p=2,p=nt,nt|=4;try{Hx(e,n,r)}finally{nt=p,F.p=l,_.T=s}}Bt=1,Pp(),Ip(),Hp()}}function Pp(){if(Bt===1){Bt=0;var e=ur,n=zi,r=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||r){r=_.T,_.T=null;var s=F.p;F.p=2;var l=nt;nt|=4;try{xp(n,e);var u=od,p=Ah(e.containerInfo),b=u.focusedElem,T=u.selectionRange;if(p!==b&&b&&b.ownerDocument&&Ch(b.ownerDocument.documentElement,b)){if(T!==null&&Mc(b)){var D=T.start,G=T.end;if(G===void 0&&(G=D),"selectionStart"in b)b.selectionStart=D,b.selectionEnd=Math.min(G,b.value.length);else{var X=b.ownerDocument||document,z=X&&X.defaultView||window;if(z.getSelection){var B=z.getSelection(),ce=b.textContent.length,ke=Math.min(T.start,ce),ct=T.end===void 0?ke:Math.min(T.end,ce);!B.extend&&ke>ct&&(p=ct,ct=ke,ke=p);var O=Th(b,ke),A=Th(b,ct);if(O&&A&&(B.rangeCount!==1||B.anchorNode!==O.node||B.anchorOffset!==O.offset||B.focusNode!==A.node||B.focusOffset!==A.offset)){var M=X.createRange();M.setStart(O.node,O.offset),B.removeAllRanges(),ke>ct?(B.addRange(M),B.extend(A.node,A.offset)):(M.setEnd(A.node,A.offset),B.addRange(M))}}}}for(X=[],B=b;B=B.parentNode;)B.nodeType===1&&X.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<X.length;b++){var V=X[b];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Rl=!!sd,od=sd=null}finally{nt=l,F.p=s,_.T=r}}e.current=n,Bt=2}}function Ip(){if(Bt===2){Bt=0;var e=ur,n=zi,r=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||r){r=_.T,_.T=null;var s=F.p;F.p=2;var l=nt;nt|=4;try{pp(e,n.alternate,n)}finally{nt=l,F.p=s,_.T=r}}Bt=3}}function Hp(){if(Bt===4||Bt===3){Bt=0,da();var e=ur,n=zi,r=Ka,s=kp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Bt=5:(Bt=0,zi=ur=null,Qp(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(cr=null),$(r),n=n.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(Ca,n,void 0,(n.current.flags&128)===128)}catch{}if(s!==null){n=_.T,l=F.p,F.p=2,_.T=null;try{for(var u=e.onRecoverableError,p=0;p<s.length;p++){var b=s[p];u(b.value,{componentStack:b.stack})}}finally{_.T=n,F.p=l}}(Ka&3)!==0&&pl(),ga(e),l=e.pendingLanes,(r&261930)!==0&&(l&42)!==0?e===Vu?Bs++:(Bs=0,Vu=e):Bs=0,qs(0)}}function Qp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,bs(n)))}function pl(){return Pp(),Ip(),Hp(),Kp()}function Kp(){if(Bt!==5)return!1;var e=ur,n=Gu;Gu=0;var r=$(Ka),s=_.T,l=F.p;try{F.p=32>r?32:r,_.T=null,r=Yu,Yu=null;var u=ur,p=Ka;if(Bt=0,zi=ur=null,Ka=0,(nt&6)!==0)throw Error(o(331));var b=nt;if(nt|=4,Cp(u.current),wp(u,u.current,p,r),nt=b,qs(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Ca,u)}catch{}return!0}finally{F.p=l,_.T=s,Qp(e,n)}}function Gp(e,n,r){n=qn(r,n),n=Cu(e.stateNode,n,2),e=ar(e,n,2),e!==null&&(ft(e,2),ga(e))}function st(e,n,r){if(e.tag===3)Gp(e,e,r);else for(;n!==null;){if(n.tag===3){Gp(n,e,r);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(cr===null||!cr.has(s))){e=qn(r,e),r=Ym(2),s=ar(n,r,2),s!==null&&(Vm(r,s,n,e),ft(s,2),ga(s));break}}n=n.return}}function Zu(e,n,r){var s=e.pingCache;if(s===null){s=e.pingCache=new Gx;var l=new Set;s.set(n,l)}else l=s.get(n),l===void 0&&(l=new Set,s.set(n,l));l.has(r)||(Hu=!0,l.add(r),e=Zx.bind(null,e,n,r),n.then(e,e))}function Zx(e,n,r){var s=e.pingCache;s!==null&&s.delete(n),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,ut===e&&(Ke&r)===r&&(Tt===4||Tt===3&&(Ke&62914560)===Ke&&300>bt()-cl?(nt&2)===0&&Li(e,0):Qu|=r,ji===Ke&&(ji=0)),ga(e)}function Yp(e,n){n===0&&(n=At()),e=Ir(e,n),e!==null&&(ft(e,n),ga(e))}function $x(e){var n=e.memoizedState,r=0;n!==null&&(r=n.retryLane),Yp(e,r)}function Jx(e,n){var r=0;switch(e.tag){case 31:case 13:var s=e.stateNode,l=e.memoizedState;l!==null&&(r=l.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(o(314))}s!==null&&s.delete(n),Yp(e,r)}function Wx(e,n){return Mr(e,n)}var gl=null,Bi=null,$u=!1,yl=!1,Ju=!1,fr=0;function ga(e){e!==Bi&&e.next===null&&(Bi===null?gl=Bi=e:Bi=Bi.next=e),yl=!0,$u||($u=!0,t1())}function qs(e,n){if(!Ju&&yl){Ju=!0;do for(var r=!1,s=gl;s!==null;){if(e!==0){var l=s.pendingLanes;if(l===0)var u=0;else{var p=s.suspendedLanes,b=s.pingedLanes;u=(1<<31-Ut(42|e)+1)-1,u&=l&~(p&~b),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(r=!0,Zp(s,u))}else u=Ke,u=_e(s,s===ut?u:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(u&3)===0||dt(s,u)||(r=!0,Zp(s,u));s=s.next}while(r);Ju=!1}}function e1(){Vp()}function Vp(){yl=$u=!1;var e=0;fr!==0&&d1()&&(e=fr);for(var n=bt(),r=null,s=gl;s!==null;){var l=s.next,u=Fp(s,n);u===0?(s.next=null,r===null?gl=l:r.next=l,l===null&&(Bi=r)):(r=s,(e!==0||(u&3)!==0)&&(yl=!0)),s=l}Bt!==0&&Bt!==5||qs(e),fr!==0&&(fr=0)}function Fp(e,n){for(var r=e.suspendedLanes,s=e.pingedLanes,l=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var p=31-Ut(u),b=1<<p,T=l[p];T===-1?((b&r)===0||(b&s)!==0)&&(l[p]=Ct(b,n)):T<=n&&(e.expiredLanes|=b),u&=~b}if(n=ut,r=Ke,r=_e(e,e===n?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,r===0||e===n&&(it===2||it===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Dr(s),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||dt(e,r)){if(n=r&-r,n===e.callbackPriority)return n;switch(s!==null&&Dr(s),$(r)){case 2:case 8:r=Xa;break;case 32:r=Gt;break;case 268435456:r=Dn;break;default:r=Gt}return s=Xp.bind(null,e),r=Mr(r,s),e.callbackPriority=n,e.callbackNode=r,n}return s!==null&&s!==null&&Dr(s),e.callbackPriority=2,e.callbackNode=null,2}function Xp(e,n){if(Bt!==0&&Bt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(pl()&&e.callbackNode!==r)return null;var s=Ke;return s=_e(e,e===ut?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(_p(e,s,n),Fp(e,bt()),e.callbackNode!=null&&e.callbackNode===r?Xp.bind(null,e):null)}function Zp(e,n){if(pl())return null;_p(e,n,!0)}function t1(){h1(function(){(nt&6)!==0?Mr(fa,e1):Vp()})}function Wu(){if(fr===0){var e=Ei;e===0&&(e=Wn,Wn<<=1,(Wn&261888)===0&&(Wn=256)),fr=e}return fr}function $p(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Co(""+e)}function Jp(e,n){var r=n.ownerDocument.createElement("input");return r.name=n.name,r.value=n.value,e.id&&r.setAttribute("form",e.id),n.parentNode.insertBefore(r,n),e=new FormData(e),r.parentNode.removeChild(r),e}function n1(e,n,r,s,l){if(n==="submit"&&r&&r.stateNode===l){var u=$p((l[oe]||null).action),p=s.submitter;p&&(n=(n=p[oe]||null)?$p(n.formAction):p.getAttribute("formAction"),n!==null&&(u=n,p=null));var b=new No("action","action",null,s,l);e.push({event:b,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(fr!==0){var T=p?Jp(l,p):new FormData(l);bu(r,{pending:!0,data:T,method:l.method,action:u},null,T)}}else typeof u=="function"&&(b.preventDefault(),T=p?Jp(l,p):new FormData(l),bu(r,{pending:!0,data:T,method:l.method,action:u},u,T))},currentTarget:l}]})}}for(var ed=0;ed<Lc.length;ed++){var td=Lc[ed],a1=td.toLowerCase(),r1=td[0].toUpperCase()+td.slice(1);ra(a1,"on"+r1)}ra(Nh,"onAnimationEnd"),ra(_h,"onAnimationIteration"),ra(Oh,"onAnimationStart"),ra("dblclick","onDoubleClick"),ra("focusin","onFocus"),ra("focusout","onBlur"),ra(xx,"onTransitionRun"),ra(Sx,"onTransitionStart"),ra(wx,"onTransitionCancel"),ra(Mh,"onTransitionEnd"),Ln("onMouseEnter",["mouseout","mouseover"]),Ln("onMouseLeave",["mouseout","mouseover"]),Ln("onPointerEnter",["pointerout","pointerover"]),Ln("onPointerLeave",["pointerout","pointerover"]),na("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),na("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),na("onBeforeInput",["compositionend","keypress","textInput","paste"]),na("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),na("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),na("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ps="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(" "),i1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ps));function Wp(e,n){n=(n&4)!==0;for(var r=0;r<e.length;r++){var s=e[r],l=s.event;s=s.listeners;e:{var u=void 0;if(n)for(var p=s.length-1;0<=p;p--){var b=s[p],T=b.instance,D=b.currentTarget;if(b=b.listener,T!==u&&l.isPropagationStopped())break e;u=b,l.currentTarget=D;try{u(l)}catch(G){Mo(G)}l.currentTarget=null,u=T}else for(p=0;p<s.length;p++){if(b=s[p],T=b.instance,D=b.currentTarget,b=b.listener,T!==u&&l.isPropagationStopped())break e;u=b,l.currentTarget=D;try{u(l)}catch(G){Mo(G)}l.currentTarget=null,u=T}}}}function Qe(e,n){var r=n[Re];r===void 0&&(r=n[Re]=new Set);var s=e+"__bubble";r.has(s)||(eg(n,e,2,!1),r.add(s))}function nd(e,n,r){var s=0;n&&(s|=4),eg(r,e,s,n)}var vl="_reactListening"+Math.random().toString(36).slice(2);function ad(e){if(!e[vl]){e[vl]=!0,ta.forEach(function(r){r!=="selectionchange"&&(i1.has(r)||nd(r,!1,e),nd(r,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[vl]||(n[vl]=!0,nd("selectionchange",!1,n))}}function eg(e,n,r,s){switch(Ng(n)){case 2:var l=D1;break;case 8:l=j1;break;default:l=vd}r=l.bind(null,n,r,e),l=void 0,!Ec||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(l=!0),s?l!==void 0?e.addEventListener(n,r,{capture:!0,passive:l}):e.addEventListener(n,r,!0):l!==void 0?e.addEventListener(n,r,{passive:l}):e.addEventListener(n,r,!1)}function rd(e,n,r,s,l){var u=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var p=s.tag;if(p===3||p===4){var b=s.stateNode.containerInfo;if(b===l)break;if(p===4)for(p=s.return;p!==null;){var T=p.tag;if((T===3||T===4)&&p.stateNode.containerInfo===l)return;p=p.return}for(;b!==null;){if(p=wt(b),p===null)return;if(T=p.tag,T===5||T===6||T===26||T===27){s=u=p;continue e}b=b.parentNode}}s=s.return}ih(function(){var D=u,G=Sc(r),X=[];e:{var z=Dh.get(e);if(z!==void 0){var B=No,ce=e;switch(e){case"keypress":if(Ro(r)===0)break e;case"keydown":case"keyup":B=J0;break;case"focusin":ce="focus",B=Rc;break;case"focusout":ce="blur",B=Rc;break;case"beforeblur":case"afterblur":B=Rc;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=lh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=P0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=tx;break;case Nh:case _h:case Oh:B=Q0;break;case Mh:B=ax;break;case"scroll":case"scrollend":B=B0;break;case"wheel":B=ix;break;case"copy":case"cut":case"paste":B=G0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=uh;break;case"toggle":case"beforetoggle":B=ox}var ke=(n&4)!==0,ct=!ke&&(e==="scroll"||e==="scrollend"),O=ke?z!==null?z+"Capture":null:z;ke=[];for(var A=D,M;A!==null;){var V=A;if(M=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||M===null||O===null||(V=ls(A,O),V!=null&&ke.push(Is(A,V,M))),ct)break;A=A.return}0<ke.length&&(z=new B(z,ce,null,r,G),X.push({event:z,listeners:ke}))}}if((n&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",z&&r!==xc&&(ce=r.relatedTarget||r.fromElement)&&(wt(ce)||ce[ve]))break e;if((B||z)&&(z=G.window===G?G:(z=G.ownerDocument)?z.defaultView||z.parentWindow:window,B?(ce=r.relatedTarget||r.toElement,B=D,ce=ce?wt(ce):null,ce!==null&&(ct=d(ce),ke=ce.tag,ce!==ct||ke!==5&&ke!==27&&ke!==6)&&(ce=null)):(B=null,ce=D),B!==ce)){if(ke=lh,V="onMouseLeave",O="onMouseEnter",A="mouse",(e==="pointerout"||e==="pointerover")&&(ke=uh,V="onPointerLeave",O="onPointerEnter",A="pointer"),ct=B==null?z:It(B),M=ce==null?z:It(ce),z=new ke(V,A+"leave",B,r,G),z.target=ct,z.relatedTarget=M,V=null,wt(G)===D&&(ke=new ke(O,A+"enter",ce,r,G),ke.target=M,ke.relatedTarget=ct,V=ke),ct=V,B&&ce)t:{for(ke=s1,O=B,A=ce,M=0,V=O;V;V=ke(V))M++;V=0;for(var Te=A;Te;Te=ke(Te))V++;for(;0<M-V;)O=ke(O),M--;for(;0<V-M;)A=ke(A),V--;for(;M--;){if(O===A||A!==null&&O===A.alternate){ke=O;break t}O=ke(O),A=ke(A)}ke=null}else ke=null;B!==null&&tg(X,z,B,ke,!1),ce!==null&&ct!==null&&tg(X,ct,ce,ke,!0)}}e:{if(z=D?It(D):window,B=z.nodeName&&z.nodeName.toLowerCase(),B==="select"||B==="input"&&z.type==="file")var et=vh;else if(gh(z))if(bh)et=yx;else{et=px;var ge=mx}else B=z.nodeName,!B||B.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?D&&bc(D.elementType)&&(et=vh):et=gx;if(et&&(et=et(e,D))){yh(X,et,r,G);break e}ge&&ge(e,z,D),e==="focusout"&&D&&z.type==="number"&&D.memoizedProps.value!=null&&vc(z,"number",z.value)}switch(ge=D?It(D):window,e){case"focusin":(gh(ge)||ge.contentEditable==="true")&&(pi=ge,Dc=D,gs=null);break;case"focusout":gs=Dc=pi=null;break;case"mousedown":jc=!0;break;case"contextmenu":case"mouseup":case"dragend":jc=!1,Rh(X,r,G);break;case"selectionchange":if(bx)break;case"keydown":case"keyup":Rh(X,r,G)}var Le;if(Nc)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 mi?mh(e,r)&&(Ge="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(Ge="onCompositionStart");Ge&&(dh&&r.locale!=="ko"&&(mi||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&mi&&(Le=sh()):(Za=G,Tc="value"in Za?Za.value:Za.textContent,mi=!0)),ge=bl(D,Ge),0<ge.length&&(Ge=new ch(Ge,e,null,r,G),X.push({event:Ge,listeners:ge}),Le?Ge.data=Le:(Le=ph(r),Le!==null&&(Ge.data=Le)))),(Le=cx?ux(e,r):dx(e,r))&&(Ge=bl(D,"onBeforeInput"),0<Ge.length&&(ge=new ch("onBeforeInput","beforeinput",null,r,G),X.push({event:ge,listeners:Ge}),ge.data=Le)),n1(X,e,D,r,G)}Wp(X,n)})}function Is(e,n,r){return{instance:e,listener:n,currentTarget:r}}function bl(e,n){for(var r=n+"Capture",s=[];e!==null;){var l=e,u=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||u===null||(l=ls(e,r),l!=null&&s.unshift(Is(e,l,u)),l=ls(e,n),l!=null&&s.push(Is(e,l,u))),e.tag===3)return s;e=e.return}return[]}function s1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function tg(e,n,r,s,l){for(var u=n._reactName,p=[];r!==null&&r!==s;){var b=r,T=b.alternate,D=b.stateNode;if(b=b.tag,T!==null&&T===s)break;b!==5&&b!==26&&b!==27||D===null||(T=D,l?(D=ls(r,u),D!=null&&p.unshift(Is(r,D,T))):l||(D=ls(r,u),D!=null&&p.push(Is(r,D,T)))),r=r.return}p.length!==0&&e.push({event:n,listeners:p})}var o1=/\r\n?/g,l1=/\u0000|\uFFFD/g;function ng(e){return(typeof e=="string"?e:""+e).replace(o1,`
10
- `).replace(l1,"")}function ag(e,n){return n=ng(n),ng(e)===n}function lt(e,n,r,s,l,u){switch(r){case"children":typeof s=="string"?n==="body"||n==="textarea"&&s===""||di(e,s):(typeof s=="number"||typeof s=="bigint")&&n!=="body"&&di(e,""+s);break;case"className":aa(e,"class",s);break;case"tabIndex":aa(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":aa(e,r,s);break;case"style":ah(e,s,u);break;case"data":if(n!=="object"){aa(e,"data",s);break}case"src":case"href":if(s===""&&(n!=="a"||r!=="href")){e.removeAttribute(r);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(r);break}s=Co(""+s),e.setAttribute(r,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(r,"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"&&(r==="formAction"?(n!=="input"&&lt(e,n,"name",l.name,l,null),lt(e,n,"formEncType",l.formEncType,l,null),lt(e,n,"formMethod",l.formMethod,l,null),lt(e,n,"formTarget",l.formTarget,l,null)):(lt(e,n,"encType",l.encType,l,null),lt(e,n,"method",l.method,l,null),lt(e,n,"target",l.target,l,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(r);break}s=Co(""+s),e.setAttribute(r,s);break;case"onClick":s!=null&&(e.onclick=Na);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(o(61));if(r=s.__html,r!=null){if(l.children!=null)throw Error(o(60));e.innerHTML=r}}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}r=Co(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);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(r,""+s):e.removeAttribute(r);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(r,""):e.removeAttribute(r);break;case"capture":case"download":s===!0?e.setAttribute(r,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(r,s):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(r,s):e.removeAttribute(r);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(r):e.setAttribute(r,s);break;case"popover":Qe("beforetoggle",e),Qe("toggle",e),Rt(e,"popover",s);break;case"xlinkActuate":Yt(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Yt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Yt(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Yt(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Yt(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Yt(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Yt(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Yt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Yt(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Rt(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=L0.get(r)||r,Rt(e,r,s))}}function id(e,n,r,s,l,u){switch(r){case"style":ah(e,s,u);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(r=s.__html,r!=null){if(l.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"children":typeof s=="string"?di(e,s):(typeof s=="number"||typeof s=="bigint")&&di(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=Na);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!En.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(l=r.endsWith("Capture"),n=r.slice(2,l?r.length-7:void 0),u=e[oe]||null,u=u!=null?u[r]:null,typeof u=="function"&&e.removeEventListener(n,u,l),typeof s=="function")){typeof u!="function"&&u!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(n,s,l);break e}r in e?e[r]=s:s===!0?e.setAttribute(r,""):Rt(e,r,s)}}}function Zt(e,n,r){switch(n){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,l=!1,u;for(u in r)if(r.hasOwnProperty(u)){var p=r[u];if(p!=null)switch(u){case"src":s=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:lt(e,n,u,p,r,null)}}l&&lt(e,n,"srcSet",r.srcSet,r,null),s&&lt(e,n,"src",r.src,r,null);return;case"input":Qe("invalid",e);var b=u=p=l=null,T=null,D=null;for(s in r)if(r.hasOwnProperty(s)){var G=r[s];if(G!=null)switch(s){case"name":l=G;break;case"type":p=G;break;case"checked":T=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(o(137,n));break;default:lt(e,n,s,G,r,null)}}Wf(e,u,b,T,D,p,l,!1);return;case"select":Qe("invalid",e),s=p=u=null;for(l in r)if(r.hasOwnProperty(l)&&(b=r[l],b!=null))switch(l){case"value":u=b;break;case"defaultValue":p=b;break;case"multiple":s=b;default:lt(e,n,l,b,r,null)}n=u,r=p,e.multiple=!!s,n!=null?ui(e,!!s,n,!1):r!=null&&ui(e,!!s,r,!0);return;case"textarea":Qe("invalid",e),u=l=s=null;for(p in r)if(r.hasOwnProperty(p)&&(b=r[p],b!=null))switch(p){case"value":s=b;break;case"defaultValue":l=b;break;case"children":u=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:lt(e,n,p,b,r,null)}th(e,s,l,u);return;case"option":for(T in r)r.hasOwnProperty(T)&&(s=r[T],s!=null)&&(T==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":lt(e,n,T,s,r,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<Ps.length;s++)Qe(Ps[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 r)if(r.hasOwnProperty(D)&&(s=r[D],s!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:lt(e,n,D,s,r,null)}return;default:if(bc(n)){for(G in r)r.hasOwnProperty(G)&&(s=r[G],s!==void 0&&id(e,n,G,s,r,void 0));return}}for(b in r)r.hasOwnProperty(b)&&(s=r[b],s!=null&&lt(e,n,b,s,r,null))}function c1(e,n,r,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,u=null,p=null,b=null,T=null,D=null,G=null;for(B in r){var X=r[B];if(r.hasOwnProperty(B)&&X!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":T=X;default:s.hasOwnProperty(B)||lt(e,n,B,null,s,X)}}for(var z in s){var B=s[z];if(X=r[z],s.hasOwnProperty(z)&&(B!=null||X!=null))switch(z){case"type":u=B;break;case"name":l=B;break;case"checked":D=B;break;case"defaultChecked":G=B;break;case"value":p=B;break;case"defaultValue":b=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(o(137,n));break;default:B!==X&&lt(e,n,z,B,s,X)}}yc(e,p,b,T,D,G,u,l);return;case"select":B=p=b=z=null;for(u in r)if(T=r[u],r.hasOwnProperty(u)&&T!=null)switch(u){case"value":break;case"multiple":B=T;default:s.hasOwnProperty(u)||lt(e,n,u,null,s,T)}for(l in s)if(u=s[l],T=r[l],s.hasOwnProperty(l)&&(u!=null||T!=null))switch(l){case"value":z=u;break;case"defaultValue":b=u;break;case"multiple":p=u;default:u!==T&&lt(e,n,l,u,s,T)}n=b,r=p,s=B,z!=null?ui(e,!!r,z,!1):!!s!=!!r&&(n!=null?ui(e,!!r,n,!0):ui(e,!!r,r?[]:"",!1));return;case"textarea":B=z=null;for(b in r)if(l=r[b],r.hasOwnProperty(b)&&l!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:lt(e,n,b,null,s,l)}for(p in s)if(l=s[p],u=r[p],s.hasOwnProperty(p)&&(l!=null||u!=null))switch(p){case"value":z=l;break;case"defaultValue":B=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(o(91));break;default:l!==u&&lt(e,n,p,l,s,u)}eh(e,z,B);return;case"option":for(var ce in r)z=r[ce],r.hasOwnProperty(ce)&&z!=null&&!s.hasOwnProperty(ce)&&(ce==="selected"?e.selected=!1:lt(e,n,ce,null,s,z));for(T in s)z=s[T],B=r[T],s.hasOwnProperty(T)&&z!==B&&(z!=null||B!=null)&&(T==="selected"?e.selected=z&&typeof z!="function"&&typeof z!="symbol":lt(e,n,T,z,s,B));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 ke in r)z=r[ke],r.hasOwnProperty(ke)&&z!=null&&!s.hasOwnProperty(ke)&&lt(e,n,ke,null,s,z);for(D in s)if(z=s[D],B=r[D],s.hasOwnProperty(D)&&z!==B&&(z!=null||B!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(137,n));break;default:lt(e,n,D,z,s,B)}return;default:if(bc(n)){for(var ct in r)z=r[ct],r.hasOwnProperty(ct)&&z!==void 0&&!s.hasOwnProperty(ct)&&id(e,n,ct,void 0,s,z);for(G in s)z=s[G],B=r[G],!s.hasOwnProperty(G)||z===B||z===void 0&&B===void 0||id(e,n,G,z,s,B);return}}for(var O in r)z=r[O],r.hasOwnProperty(O)&&z!=null&&!s.hasOwnProperty(O)&&lt(e,n,O,null,s,z);for(X in s)z=s[X],B=r[X],!s.hasOwnProperty(X)||z===B||z==null&&B==null||lt(e,n,X,z,s,B)}function rg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function u1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,r=performance.getEntriesByType("resource"),s=0;s<r.length;s++){var l=r[s],u=l.transferSize,p=l.initiatorType,b=l.duration;if(u&&b&&rg(p)){for(p=0,b=l.responseEnd,s+=1;s<r.length;s++){var T=r[s],D=T.startTime;if(D>b)break;var G=T.transferSize,X=T.initiatorType;G&&rg(X)&&(T=T.responseEnd,p+=G*(T<b?1:(b-D)/(T-D)))}if(--s,n+=8*(u+p)/(l.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var sd=null,od=null;function xl(e){return e.nodeType===9?e:e.ownerDocument}function ig(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 sg(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function ld(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var cd=null;function d1(){var e=window.event;return e&&e.type==="popstate"?e===cd?!1:(cd=e,!0):(cd=null,!1)}var og=typeof setTimeout=="function"?setTimeout:void 0,f1=typeof clearTimeout=="function"?clearTimeout:void 0,lg=typeof Promise=="function"?Promise:void 0,h1=typeof queueMicrotask=="function"?queueMicrotask:typeof lg<"u"?function(e){return lg.resolve(null).then(e).catch(m1)}:og;function m1(e){setTimeout(function(){throw e})}function hr(e){return e==="head"}function cg(e,n){var r=n,s=0;do{var l=r.nextSibling;if(e.removeChild(r),l&&l.nodeType===8)if(r=l.data,r==="/$"||r==="/&"){if(s===0){e.removeChild(l),Hi(n);return}s--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")s++;else if(r==="html")Hs(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,Hs(r);for(var u=r.firstChild;u;){var p=u.nextSibling,b=u.nodeName;u[xt]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&u.rel.toLowerCase()==="stylesheet"||r.removeChild(u),u=p}}else r==="body"&&Hs(e.ownerDocument.body);r=l}while(r);Hi(n)}function ug(e,n){var r=e;e=0;do{var s=r.nextSibling;if(r.nodeType===1?n?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(n?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=s}while(r)}function ud(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var r=n;switch(n=n.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":ud(r),St(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function p1(e,n,r,s){for(;e.nodeType===1;){var l=r;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[xt])switch(n){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!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var u=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Kn(e.nextSibling),e===null)break}return null}function g1(e,n,r){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Kn(e.nextSibling),e===null))return null;return e}function dg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Kn(e.nextSibling),e===null))return null;return e}function dd(e){return e.data==="$?"||e.data==="$~"}function fd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function y1(e,n){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||r.readyState!=="loading")n();else{var s=function(){n(),r.removeEventListener("DOMContentLoaded",s)};r.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Kn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var hd=null;function fg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(n===0)return Kn(e.nextSibling);n--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||n++}e=e.nextSibling}return null}function hg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(n===0)return e;n--}else r!=="/$"&&r!=="/&"||n++}e=e.previousSibling}return null}function mg(e,n,r){switch(n=xl(r),e){case"html":if(e=n.documentElement,!e)throw Error(o(452));return e;case"head":if(e=n.head,!e)throw Error(o(453));return e;case"body":if(e=n.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Hs(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);St(e)}var Gn=new Map,pg=new Set;function Sl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ga=F.d;F.d={f:v1,r:b1,D:x1,C:S1,L:w1,m:E1,X:C1,S:T1,M:A1};function v1(){var e=Ga.f(),n=fl();return e||n}function b1(e){var n=Ve(e);n!==null&&n.tag===5&&n.type==="form"?Mm(n):Ga.r(e)}var qi=typeof document>"u"?null:document;function gg(e,n,r){var s=qi;if(s&&typeof n=="string"&&n){var l=Un(n);l='link[rel="'+e+'"][href="'+l+'"]',typeof r=="string"&&(l+='[crossorigin="'+r+'"]'),pg.has(l)||(pg.add(l),e={rel:e,crossOrigin:r,href:n},s.querySelector(l)===null&&(n=s.createElement("link"),Zt(n,"link",e),yt(n),s.head.appendChild(n)))}}function x1(e){Ga.D(e),gg("dns-prefetch",e,null)}function S1(e,n){Ga.C(e,n),gg("preconnect",e,n)}function w1(e,n,r){Ga.L(e,n,r);var s=qi;if(s&&e&&n){var l='link[rel="preload"][as="'+Un(n)+'"]';n==="image"&&r&&r.imageSrcSet?(l+='[imagesrcset="'+Un(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(l+='[imagesizes="'+Un(r.imageSizes)+'"]')):l+='[href="'+Un(e)+'"]';var u=l;switch(n){case"style":u=Pi(e);break;case"script":u=Ii(e)}Gn.has(u)||(e=v({rel:"preload",href:n==="image"&&r&&r.imageSrcSet?void 0:e,as:n},r),Gn.set(u,e),s.querySelector(l)!==null||n==="style"&&s.querySelector(Qs(u))||n==="script"&&s.querySelector(Ks(u))||(n=s.createElement("link"),Zt(n,"link",e),yt(n),s.head.appendChild(n)))}}function E1(e,n){Ga.m(e,n);var r=qi;if(r&&e){var s=n&&typeof n.as=="string"?n.as:"script",l='link[rel="modulepreload"][as="'+Un(s)+'"][href="'+Un(e)+'"]',u=l;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ii(e)}if(!Gn.has(u)&&(e=v({rel:"modulepreload",href:e},n),Gn.set(u,e),r.querySelector(l)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Ks(u)))return}s=r.createElement("link"),Zt(s,"link",e),yt(s),r.head.appendChild(s)}}}function T1(e,n,r){Ga.S(e,n,r);var s=qi;if(s&&e){var l=hn(s).hoistableStyles,u=Pi(e);n=n||"default";var p=l.get(u);if(!p){var b={loading:0,preload:null};if(p=s.querySelector(Qs(u)))b.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":n},r),(r=Gn.get(u))&&md(e,r);var T=p=s.createElement("link");yt(T),Zt(T,"link",e),T._p=new Promise(function(D,G){T.onload=D,T.onerror=G}),T.addEventListener("load",function(){b.loading|=1}),T.addEventListener("error",function(){b.loading|=2}),b.loading|=4,wl(p,n,s)}p={type:"stylesheet",instance:p,count:1,state:b},l.set(u,p)}}}function C1(e,n){Ga.X(e,n);var r=qi;if(r&&e){var s=hn(r).hoistableScripts,l=Ii(e),u=s.get(l);u||(u=r.querySelector(Ks(l)),u||(e=v({src:e,async:!0},n),(n=Gn.get(l))&&pd(e,n),u=r.createElement("script"),yt(u),Zt(u,"link",e),r.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(l,u))}}function A1(e,n){Ga.M(e,n);var r=qi;if(r&&e){var s=hn(r).hoistableScripts,l=Ii(e),u=s.get(l);u||(u=r.querySelector(Ks(l)),u||(e=v({src:e,async:!0,type:"module"},n),(n=Gn.get(l))&&pd(e,n),u=r.createElement("script"),yt(u),Zt(u,"link",e),r.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(l,u))}}function yg(e,n,r,s){var l=(l=J.current)?Sl(l):null;if(!l)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(n=Pi(r.href),r=hn(l).hoistableStyles,s=r.get(n),s||(s={type:"style",instance:null,count:0,state:null},r.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=Pi(r.href);var u=hn(l).hoistableStyles,p=u.get(e);if(p||(l=l.ownerDocument||l,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,p),(u=l.querySelector(Qs(e)))&&!u._p&&(p.instance=u,p.state.loading=5),Gn.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Gn.set(e,r),u||R1(l,e,r,p.state))),n&&s===null)throw Error(o(528,""));return p}if(n&&s!==null)throw Error(o(529,""));return null;case"script":return n=r.async,r=r.src,typeof r=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Ii(r),r=hn(l).hoistableScripts,s=r.get(n),s||(s={type:"script",instance:null,count:0,state:null},r.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Pi(e){return'href="'+Un(e)+'"'}function Qs(e){return'link[rel="stylesheet"]['+e+"]"}function vg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function R1(e,n,r,s){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?s.loading=1:(n=e.createElement("link"),s.preload=n,n.addEventListener("load",function(){return s.loading|=1}),n.addEventListener("error",function(){return s.loading|=2}),Zt(n,"link",r),yt(n),e.head.appendChild(n))}function Ii(e){return'[src="'+Un(e)+'"]'}function Ks(e){return"script[async]"+e}function bg(e,n,r){if(n.count++,n.instance===null)switch(n.type){case"style":var s=e.querySelector('style[data-href~="'+Un(r.href)+'"]');if(s)return n.instance=s,yt(s),s;var l=v({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),yt(s),Zt(s,"style",l),wl(s,r.precedence,e),n.instance=s;case"stylesheet":l=Pi(r.href);var u=e.querySelector(Qs(l));if(u)return n.state.loading|=4,n.instance=u,yt(u),u;s=vg(r),(l=Gn.get(l))&&md(s,l),u=(e.ownerDocument||e).createElement("link"),yt(u);var p=u;return p._p=new Promise(function(b,T){p.onload=b,p.onerror=T}),Zt(u,"link",s),n.state.loading|=4,wl(u,r.precedence,e),n.instance=u;case"script":return u=Ii(r.src),(l=e.querySelector(Ks(u)))?(n.instance=l,yt(l),l):(s=r,(l=Gn.get(u))&&(s=v({},r),pd(s,l)),e=e.ownerDocument||e,l=e.createElement("script"),yt(l),Zt(l,"link",s),e.head.appendChild(l),n.instance=l);case"void":return null;default:throw Error(o(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(s=n.instance,n.state.loading|=4,wl(s,r.precedence,e));return n.instance}function wl(e,n,r){for(var s=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=s.length?s[s.length-1]:null,u=l,p=0;p<s.length;p++){var b=s[p];if(b.dataset.precedence===n)u=b;else if(u!==l)break}u?u.parentNode.insertBefore(e,u.nextSibling):(n=r.nodeType===9?r.head:r,n.insertBefore(e,n.firstChild))}function md(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function pd(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var El=null;function xg(e,n,r){if(El===null){var s=new Map,l=El=new Map;l.set(r,s)}else l=El,s=l.get(r),s||(s=new Map,l.set(r,s));if(s.has(e))return s;for(s.set(e,null),r=r.getElementsByTagName(e),l=0;l<r.length;l++){var u=r[l];if(!(u[xt]||u[ie]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var p=u.getAttribute(n)||"";p=e+p;var b=s.get(p);b?b.push(u):s.set(p,[u])}}return s}function Sg(e,n,r){e=e.ownerDocument||e,e.head.insertBefore(r,n==="title"?e.querySelector("head > title"):null)}function k1(e,n,r){if(r===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function wg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function N1(e,n,r,s){if(r.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var l=Pi(s.href),u=n.querySelector(Qs(l));if(u){n=u._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Tl.bind(e),n.then(e,e)),r.state.loading|=4,r.instance=u,yt(u);return}u=n.ownerDocument||n,s=vg(s),(l=Gn.get(l))&&md(s,l),u=u.createElement("link"),yt(u);var p=u;p._p=new Promise(function(b,T){p.onload=b,p.onerror=T}),Zt(u,"link",s),r.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,n),(n=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=Tl.bind(e),n.addEventListener("load",r),n.addEventListener("error",r))}}var gd=0;function _1(e,n){return e.stylesheets&&e.count===0&&Al(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var s=setTimeout(function(){if(e.stylesheets&&Al(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+n);0<e.imgBytes&&gd===0&&(gd=62500*u1());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Al(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>gd?50:800)+n);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(l)}}:null}function Tl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Al(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Cl=null;function Al(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Cl=new Map,n.forEach(O1,e),Cl=null,Tl.call(e))}function O1(e,n){if(!(n.state.loading&4)){var r=Cl.get(e);if(r)var s=r.get(null);else{r=new Map,Cl.set(e,r);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<l.length;u++){var p=l[u];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(r.set(p.dataset.precedence,p),s=p)}s&&r.set(null,s)}l=n.instance,p=l.getAttribute("data-precedence"),u=r.get(p)||s,u===s&&r.set(null,l),r.set(p,l),this.count++,s=Tl.bind(this),l.addEventListener("load",s),l.addEventListener("error",s),u?u.parentNode.insertBefore(l,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),n.state.loading|=4}}var Gs={$$typeof:W,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function M1(e,n,r,s,l,u,p,b,T){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=wn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wn(0),this.hiddenUpdates=wn(null),this.identifierPrefix=s,this.onUncaughtError=l,this.onCaughtError=u,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function Eg(e,n,r,s,l,u,p,b,T,D,G,X){return e=new M1(e,n,r,p,T,D,G,X,b),n=1,u===!0&&(n|=24),u=Cn(3,null,null,n),e.current=u,u.stateNode=e,n=Xc(),n.refCount++,e.pooledCache=n,n.refCount++,u.memoizedState={element:s,isDehydrated:r,cache:n},Wc(u),e}function Tg(e){return e?(e=vi,e):vi}function Cg(e,n,r,s,l,u){l=Tg(l),s.context===null?s.context=l:s.pendingContext=l,s=nr(n),s.payload={element:r},u=u===void 0?null:u,u!==null&&(s.callback=u),r=ar(e,s,n),r!==null&&(bn(r,e,n),Es(r,e,n))}function Ag(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<n?r:n}}function yd(e,n){Ag(e,n),(e=e.alternate)&&Ag(e,n)}function Rg(e){if(e.tag===13||e.tag===31){var n=Ir(e,67108864);n!==null&&bn(n,e,67108864),yd(e,67108864)}}function kg(e){if(e.tag===13||e.tag===31){var n=_n();n=L(n);var r=Ir(e,n);r!==null&&bn(r,e,n),yd(e,n)}}var Rl=!0;function D1(e,n,r,s){var l=_.T;_.T=null;var u=F.p;try{F.p=2,vd(e,n,r,s)}finally{F.p=u,_.T=l}}function j1(e,n,r,s){var l=_.T;_.T=null;var u=F.p;try{F.p=8,vd(e,n,r,s)}finally{F.p=u,_.T=l}}function vd(e,n,r,s){if(Rl){var l=bd(s);if(l===null)rd(e,n,s,kl,r),_g(e,s);else if(L1(l,e,n,r,s))s.stopPropagation();else if(_g(e,s),n&4&&-1<z1.indexOf(e)){for(;l!==null;){var u=Ve(l);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var p=zn(u.pendingLanes);if(p!==0){var b=u;for(b.pendingLanes|=2,b.entangledLanes|=2;p;){var T=1<<31-Ut(p);b.entanglements[1]|=T,p&=~T}ga(u),(nt&6)===0&&(ul=bt()+500,qs(0))}}break;case 31:case 13:b=Ir(u,2),b!==null&&bn(b,u,2),fl(),yd(u,2)}if(u=bd(s),u===null&&rd(e,n,s,kl,r),u===l)break;l=u}l!==null&&s.stopPropagation()}else rd(e,n,s,null,r)}}function bd(e){return e=Sc(e),xd(e)}var kl=null;function xd(e){if(kl=null,e=wt(e),e!==null){var n=d(e);if(n===null)e=null;else{var r=n.tag;if(r===13){if(e=f(n),e!==null)return e;e=null}else if(r===31){if(e=h(n),e!==null)return e;e=null}else if(r===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return kl=e,null}function Ng(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(Ta()){case fa:return 2;case Xa:return 8;case Gt:case rn:return 32;case Dn:return 268435456;default:return 32}default:return 32}}var Sd=!1,mr=null,pr=null,gr=null,Ys=new Map,Vs=new Map,yr=[],z1="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 _g(e,n){switch(e){case"focusin":case"focusout":mr=null;break;case"dragenter":case"dragleave":pr=null;break;case"mouseover":case"mouseout":gr=null;break;case"pointerover":case"pointerout":Ys.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vs.delete(n.pointerId)}}function Fs(e,n,r,s,l,u){return e===null||e.nativeEvent!==u?(e={blockedOn:n,domEventName:r,eventSystemFlags:s,nativeEvent:u,targetContainers:[l]},n!==null&&(n=Ve(n),n!==null&&Rg(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,l!==null&&n.indexOf(l)===-1&&n.push(l),e)}function L1(e,n,r,s,l){switch(n){case"focusin":return mr=Fs(mr,e,n,r,s,l),!0;case"dragenter":return pr=Fs(pr,e,n,r,s,l),!0;case"mouseover":return gr=Fs(gr,e,n,r,s,l),!0;case"pointerover":var u=l.pointerId;return Ys.set(u,Fs(Ys.get(u)||null,e,n,r,s,l)),!0;case"gotpointercapture":return u=l.pointerId,Vs.set(u,Fs(Vs.get(u)||null,e,n,r,s,l)),!0}return!1}function Og(e){var n=wt(e.target);if(n!==null){var r=d(n);if(r!==null){if(n=r.tag,n===13){if(n=f(r),n!==null){e.blockedOn=n,xe(e.priority,function(){kg(r)});return}}else if(n===31){if(n=h(r),n!==null){e.blockedOn=n,xe(e.priority,function(){kg(r)});return}}else if(n===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Nl(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var r=bd(e.nativeEvent);if(r===null){r=e.nativeEvent;var s=new r.constructor(r.type,r);xc=s,r.target.dispatchEvent(s),xc=null}else return n=Ve(r),n!==null&&Rg(n),e.blockedOn=r,!1;n.shift()}return!0}function Mg(e,n,r){Nl(e)&&r.delete(n)}function U1(){Sd=!1,mr!==null&&Nl(mr)&&(mr=null),pr!==null&&Nl(pr)&&(pr=null),gr!==null&&Nl(gr)&&(gr=null),Ys.forEach(Mg),Vs.forEach(Mg)}function _l(e,n){e.blockedOn===n&&(e.blockedOn=null,Sd||(Sd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,U1)))}var Ol=null;function Dg(e){Ol!==e&&(Ol=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ol===e&&(Ol=null);for(var n=0;n<e.length;n+=3){var r=e[n],s=e[n+1],l=e[n+2];if(typeof s!="function"){if(xd(s||r)===null)continue;break}var u=Ve(r);u!==null&&(e.splice(n,3),n-=3,bu(u,{pending:!0,data:l,method:r.method,action:s},s,l))}}))}function Hi(e){function n(T){return _l(T,e)}mr!==null&&_l(mr,e),pr!==null&&_l(pr,e),gr!==null&&_l(gr,e),Ys.forEach(n),Vs.forEach(n);for(var r=0;r<yr.length;r++){var s=yr[r];s.blockedOn===e&&(s.blockedOn=null)}for(;0<yr.length&&(r=yr[0],r.blockedOn===null);)Og(r),r.blockedOn===null&&yr.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(s=0;s<r.length;s+=3){var l=r[s],u=r[s+1],p=l[oe]||null;if(typeof u=="function")p||Dg(r);else if(p){var b=null;if(u&&u.hasAttribute("formAction")){if(l=u,p=u[oe]||null)b=p.formAction;else if(xd(l)!==null)continue}else b=p.action;typeof b=="function"?r[s+1]=b:(r.splice(s,3),s-=3),Dg(r)}}}function jg(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(p){return l=p})},focusReset:"manual",scroll:"manual"})}function n(){l!==null&&(l(),l=null),s||setTimeout(r,20)}function r(){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,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(r,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),l!==null&&(l(),l=null)}}}function wd(e){this._internalRoot=e}Ml.prototype.render=wd.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(o(409));var r=n.current,s=_n();Cg(r,s,e,n,null,null)},Ml.prototype.unmount=wd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Cg(e.current,2,null,e,null,null),fl(),n[ve]=null}};function Ml(e){this._internalRoot=e}Ml.prototype.unstable_scheduleHydration=function(e){if(e){var n=te();e={blockedOn:null,target:e,priority:n};for(var r=0;r<yr.length&&n!==0&&n<yr[r].priority;r++);yr.splice(r,0,e),r===0&&Og(e)}};var zg=a.version;if(zg!=="19.2.4")throw Error(o(527,zg,"19.2.4"));F.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(n),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var B1={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:_,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Dl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Dl.isDisabled&&Dl.supportsFiber)try{Ca=Dl.inject(B1),ht=Dl}catch{}}return Zs.createRoot=function(e,n){if(!c(e))throw Error(o(299));var r=!1,s="",l=Hm,u=Qm,p=Km;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(l=n.onUncaughtError),n.onCaughtError!==void 0&&(u=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError)),n=Eg(e,1,!1,null,null,r,s,null,l,u,p,jg),e[ve]=n.current,ad(e),new wd(n)},Zs.hydrateRoot=function(e,n,r){if(!c(e))throw Error(o(299));var s=!1,l="",u=Hm,p=Qm,b=Km,T=null;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onUncaughtError!==void 0&&(u=r.onUncaughtError),r.onCaughtError!==void 0&&(p=r.onCaughtError),r.onRecoverableError!==void 0&&(b=r.onRecoverableError),r.formState!==void 0&&(T=r.formState)),n=Eg(e,1,!0,n,r??null,s,l,T,u,p,b,jg),n.context=Tg(null),r=n.current,s=_n(),s=L(s),l=nr(s),l.callback=null,ar(r,l,s),r=s,n.current.lanes=r,ft(n,r),ga(n),e[ve]=n.current,ad(e),new Ml(n)},Zs.version="19.2.4",Zs}var Gg;function F1(){if(Gg)return Cd.exports;Gg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),Cd.exports=V1(),Cd.exports}var X1=F1(),ts=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Z1={setTimeout:(t,a)=>setTimeout(t,a),clearTimeout:t=>clearTimeout(t),setInterval:(t,a)=>setInterval(t,a),clearInterval:t=>clearInterval(t)},$1=class{#e=Z1;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,a){return this.#e.setTimeout(t,a)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,a){return this.#e.setInterval(t,a)}clearInterval(t){this.#e.clearInterval(t)}},ni=new $1;function J1(t){setTimeout(t,0)}var ri=typeof window>"u"||"Deno"in globalThis;function on(){}function W1(t,a){return typeof t=="function"?t(a):t}function Hd(t){return typeof t=="number"&&t>=0&&t!==1/0}function xv(t,a){return Math.max(t+(a||0)-Date.now(),0)}function Tr(t,a){return typeof t=="function"?t(a):t}function Vn(t,a){return typeof t=="function"?t(a):t}function Yg(t,a){const{type:i="all",exact:o,fetchStatus:c,predicate:d,queryKey:f,stale:h}=t;if(f){if(o){if(a.queryHash!==vf(f,a.options))return!1}else if(!co(a.queryKey,f))return!1}if(i!=="all"){const y=a.isActive();if(i==="active"&&!y||i==="inactive"&&y)return!1}return!(typeof h=="boolean"&&a.isStale()!==h||c&&c!==a.state.fetchStatus||d&&!d(a))}function Vg(t,a){const{exact:i,status:o,predicate:c,mutationKey:d}=t;if(d){if(!a.options.mutationKey)return!1;if(i){if(ii(a.options.mutationKey)!==ii(d))return!1}else if(!co(a.options.mutationKey,d))return!1}return!(o&&a.state.status!==o||c&&!c(a))}function vf(t,a){return(a?.queryKeyHashFn||ii)(t)}function ii(t){return JSON.stringify(t,(a,i)=>Qd(i)?Object.keys(i).sort().reduce((o,c)=>(o[c]=i[c],o),{}):i)}function co(t,a){return t===a?!0:typeof t!=typeof a?!1:t&&a&&typeof t=="object"&&typeof a=="object"?Object.keys(a).every(i=>co(t[i],a[i])):!1}var eS=Object.prototype.hasOwnProperty;function Sv(t,a,i=0){if(t===a)return t;if(i>500)return a;const o=Fg(t)&&Fg(a);if(!o&&!(Qd(t)&&Qd(a)))return a;const d=(o?t:Object.keys(t)).length,f=o?a:Object.keys(a),h=f.length,y=o?new Array(h):{};let g=0;for(let x=0;x<h;x++){const v=o?x:f[x],E=t[v],R=a[v];if(E===R){y[v]=E,(o?x<d:eS.call(t,v))&&g++;continue}if(E===null||R===null||typeof E!="object"||typeof R!="object"){y[v]=R;continue}const j=Sv(E,R,i+1);y[v]=j,j===E&&g++}return d===h&&g===d?t:y}function rc(t,a){if(!a||Object.keys(t).length!==Object.keys(a).length)return!1;for(const i in t)if(t[i]!==a[i])return!1;return!0}function Fg(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Qd(t){if(!Xg(t))return!1;const a=t.constructor;if(a===void 0)return!0;const i=a.prototype;return!(!Xg(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Xg(t){return Object.prototype.toString.call(t)==="[object Object]"}function tS(t){return new Promise(a=>{ni.setTimeout(a,t)})}function Kd(t,a,i){return typeof i.structuralSharing=="function"?i.structuralSharing(t,a):i.structuralSharing!==!1?Sv(t,a):a}function nS(t,a,i=0){const o=[...t,a];return i&&o.length>i?o.slice(1):o}function aS(t,a,i=0){const o=[a,...t];return i&&o.length>i?o.slice(0,-1):o}var bf=Symbol();function wv(t,a){return!t.queryFn&&a?.initialPromise?()=>a.initialPromise:!t.queryFn||t.queryFn===bf?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function xf(t,a){return typeof t=="function"?t(...a):!!t}function rS(t,a,i){let o=!1,c;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(c??=a(),o||(o=!0,c.aborted?i():c.addEventListener("abort",i,{once:!0})),c)}),t}var iS=class extends ts{#e;#t;#n;constructor(){super(),this.#n=t=>{if(!ri&&window.addEventListener){const a=()=>t();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(t){this.#n=t,this.#t?.(),this.#t=t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(a=>{a(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Sf=new iS;function Gd(){let t,a;const i=new Promise((c,d)=>{t=c,a=d});i.status="pending",i.catch(()=>{});function o(c){Object.assign(i,c),delete i.resolve,delete i.reject}return i.resolve=c=>{o({status:"fulfilled",value:c}),t(c)},i.reject=c=>{o({status:"rejected",reason:c}),a(c)},i}var sS=J1;function oS(){let t=[],a=0,i=h=>{h()},o=h=>{h()},c=sS;const d=h=>{a?t.push(h):c(()=>{i(h)})},f=()=>{const h=t;t=[],h.length&&c(()=>{o(()=>{h.forEach(y=>{i(y)})})})};return{batch:h=>{let y;a++;try{y=h()}finally{a--,a||f()}return y},batchCalls:h=>(...y)=>{d(()=>{h(...y)})},schedule:d,setNotifyFunction:h=>{i=h},setBatchNotifyFunction:h=>{o=h},setScheduler:h=>{c=h}}}var Pt=oS(),lS=class extends ts{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(!ri&&window.addEventListener){const a=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(i=>{i(t)}))}isOnline(){return this.#e}},ic=new lS;function cS(t){return Math.min(1e3*2**t,3e4)}function Ev(t){return(t??"online")==="online"?ic.isOnline():!0}var Yd=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Tv(t){let a=!1,i=0,o;const c=Gd(),d=()=>c.status!=="pending",f=U=>{if(!d()){const K=new Yd(U);E(K),t.onCancel?.(K)}},h=()=>{a=!0},y=()=>{a=!1},g=()=>Sf.isFocused()&&(t.networkMode==="always"||ic.isOnline())&&t.canRun(),x=()=>Ev(t.networkMode)&&t.canRun(),v=U=>{d()||(o?.(),c.resolve(U))},E=U=>{d()||(o?.(),c.reject(U))},R=()=>new Promise(U=>{o=K=>{(d()||g())&&U(K)},t.onPause?.()}).then(()=>{o=void 0,d()||t.onContinue?.()}),j=()=>{if(d())return;let U;const K=i===0?t.initialPromise:void 0;try{U=K??t.fn()}catch(H){U=Promise.reject(H)}Promise.resolve(U).then(v).catch(H=>{if(d())return;const Q=t.retry??(ri?0:3),W=t.retryDelay??cS,me=typeof W=="function"?W(i,H):W,he=Q===!0||typeof Q=="number"&&i<Q||typeof Q=="function"&&Q(i,H);if(a||!he){E(H);return}i++,t.onFail?.(i,H),tS(me).then(()=>g()?void 0:R()).then(()=>{a?E(H):j()})})};return{promise:c,status:()=>c.status,cancel:f,continue:()=>(o?.(),c),cancelRetry:h,continueRetry:y,canStart:x,start:()=>(x()?j():R().then(j),c)}}var Cv=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hd(this.gcTime)&&(this.#e=ni.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(ri?1/0:300*1e3))}clearGcTimeout(){this.#e&&(ni.clearTimeout(this.#e),this.#e=void 0)}},uS=class extends Cv{#e;#t;#n;#r;#a;#s;#o;constructor(t){super(),this.#o=!1,this.#s=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#r=t.client,this.#n=this.#r.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=$g(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(t){if(this.options={...this.#s,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=$g(this.options);a.data!==void 0&&(this.setState(Zg(a.data,a.dataUpdatedAt)),this.#e=a)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,a){const i=Kd(this.state.data,t,this.options);return this.#i({data:i,type:"success",dataUpdatedAt:a?.updatedAt,manual:a?.manual}),i}setState(t,a){this.#i({type:"setState",state:t,setStateOptions:a})}cancel(t){const a=this.#a?.promise;return this.#a?.cancel(t),a?a.then(on).catch(on):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(t=>Vn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===bf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Tr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!xv(this.state.dataUpdatedAt,t)}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(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(a=>a!==t),this.observers.length||(this.#a&&(this.#o?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(t,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(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(y=>y.options.queryFn);h&&this.setOptions(h.options)}const i=new AbortController,o=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#o=!0,i.signal)})},c=()=>{const h=wv(this.options,a),g=(()=>{const x={client:this.#r,queryKey:this.queryKey,meta:this.meta};return o(x),x})();return this.#o=!1,this.options.persister?this.options.persister(h,g,this):h(g)},f=(()=>{const h={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:c};return o(h),h})();this.options.behavior?.onFetch(f,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==f.fetchOptions?.meta)&&this.#i({type:"fetch",meta:f.fetchOptions?.meta}),this.#a=Tv({initialPromise:a?.initialPromise,fn:f.fetchFn,onCancel:h=>{h instanceof Yd&&h.revert&&this.setState({...this.#t,fetchStatus:"idle"}),i.abort()},onFail:(h,y)=>{this.#i({type:"failed",failureCount:h,error:y})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0});try{const h=await this.#a.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#n.config.onSuccess?.(h,this),this.#n.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof Yd){if(h.silent)return this.#a.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#i({type:"error",error:h}),this.#n.config.onError?.(h,this),this.#n.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#i(t){const a=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Av(i.data,this.options),fetchMeta:t.meta??null};case"success":const o={...i,...Zg(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=t.manual?o:void 0,o;case"error":const c=t.error;return{...i,error:c,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=a(this.state),Pt.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function Av(t,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ev(a.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Zg(t,a){return{data:t,dataUpdatedAt:a??Date.now(),error:null,isInvalidated:!1,status:"success"}}function $g(t){const a=typeof t.initialData=="function"?t.initialData():t.initialData,i=a!==void 0,o=i?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:a,dataUpdateCount:0,dataUpdatedAt:i?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var dS=class extends ts{constructor(t,a){super(),this.options=a,this.#e=t,this.#i=null,this.#o=Gd(),this.bindMethods(),this.setOptions(a)}#e;#t=void 0;#n=void 0;#r=void 0;#a;#s;#o;#i;#p;#f;#h;#c;#u;#l;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Jg(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Vd(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Vd(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(t){const a=this.options,i=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Vn(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&&!rc(this.options,a)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const o=this.hasListeners();o&&Wg(this.#t,i,this.options,a)&&this.#d(),this.updateResult(),o&&(this.#t!==i||Vn(this.options.enabled,this.#t)!==Vn(a.enabled,this.#t)||Tr(this.options.staleTime,this.#t)!==Tr(a.staleTime,this.#t))&&this.#g();const c=this.#y();o&&(this.#t!==i||Vn(this.options.enabled,this.#t)!==Vn(a.enabled,this.#t)||c!==this.#l)&&this.#v(c)}getOptimisticResult(t){const a=this.#e.getQueryCache().build(this.#e,t),i=this.createResult(a,t);return hS(this,i)&&(this.#r=i,this.#s=this.options,this.#a=this.#t.state),i}getCurrentResult(){return this.#r}trackResult(t,a){return new Proxy(t,{get:(i,o)=>(this.trackProp(o),a?.(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,o))})}trackProp(t){this.#m.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const a=this.#e.defaultQueryOptions(t),i=this.#e.getQueryCache().build(this.#e,a);return i.fetch().then(()=>this.createResult(i,a))}fetch(t){return this.#d({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#d(t){this.#w();let a=this.#t.fetch(this.options,t);return t?.throwOnError||(a=a.catch(on)),a}#g(){this.#x();const t=Tr(this.options.staleTime,this.#t);if(ri||this.#r.isStale||!Hd(t))return;const i=xv(this.#r.dataUpdatedAt,t)+1;this.#c=ni.setTimeout(()=>{this.#r.isStale||this.updateResult()},i)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(t){this.#S(),this.#l=t,!(ri||Vn(this.options.enabled,this.#t)===!1||!Hd(this.#l)||this.#l===0)&&(this.#u=ni.setInterval(()=>{(this.options.refetchIntervalInBackground||Sf.isFocused())&&this.#d()},this.#l))}#b(){this.#g(),this.#v(this.#y())}#x(){this.#c&&(ni.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(ni.clearInterval(this.#u),this.#u=void 0)}createResult(t,a){const i=this.#t,o=this.options,c=this.#r,d=this.#a,f=this.#s,y=t!==i?t.state:this.#n,{state:g}=t;let x={...g},v=!1,E;if(a._optimisticResults){const Y=this.hasListeners(),re=!Y&&Jg(t,a),Oe=Y&&Wg(t,i,a,o);(re||Oe)&&(x={...x,...Av(g.data,t.options)}),a._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:R,errorUpdatedAt:j,status:U}=x;E=x.data;let K=!1;if(a.placeholderData!==void 0&&E===void 0&&U==="pending"){let Y;c?.isPlaceholderData&&a.placeholderData===f?.placeholderData?(Y=c.data,K=!0):Y=typeof a.placeholderData=="function"?a.placeholderData(this.#h?.state.data,this.#h):a.placeholderData,Y!==void 0&&(U="success",E=Kd(c?.data,Y,a),v=!0)}if(a.select&&E!==void 0&&!K)if(c&&E===d?.data&&a.select===this.#p)E=this.#f;else try{this.#p=a.select,E=a.select(E),E=Kd(c?.data,E,a),this.#f=E,this.#i=null}catch(Y){this.#i=Y}this.#i&&(R=this.#i,E=this.#f,j=Date.now(),U="error");const H=x.fetchStatus==="fetching",Q=U==="pending",W=U==="error",me=Q&&H,he=E!==void 0,k={status:U,fetchStatus:x.fetchStatus,isPending:Q,isSuccess:U==="success",isError:W,isInitialLoading:me,isLoading:me,data:E,dataUpdatedAt:x.dataUpdatedAt,error:R,errorUpdatedAt:j,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:x.dataUpdateCount>0||x.errorUpdateCount>0,isFetchedAfterMount:x.dataUpdateCount>y.dataUpdateCount||x.errorUpdateCount>y.errorUpdateCount,isFetching:H,isRefetching:H&&!Q,isLoadingError:W&&!he,isPaused:x.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:W&&he,isStale:wf(t,a),refetch:this.refetch,promise:this.#o,isEnabled:Vn(a.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const Y=k.data!==void 0,re=k.status==="error"&&!Y,Oe=je=>{re?je.reject(k.error):Y&&je.resolve(k.data)},Ne=()=>{const je=this.#o=k.promise=Gd();Oe(je)},Ee=this.#o;switch(Ee.status){case"pending":t.queryHash===i.queryHash&&Oe(Ee);break;case"fulfilled":(re||k.data!==Ee.value)&&Ne();break;case"rejected":(!re||k.error!==Ee.reason)&&Ne();break}}return k}updateResult(){const t=this.#r,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),rc(a,t))return;this.#r=a;const i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,c=typeof o=="function"?o():o;if(c==="all"||!c&&!this.#m.size)return!0;const d=new Set(c??this.#m);return this.options.throwOnError&&d.add("error"),Object.keys(this.#r).some(f=>{const h=f;return this.#r[h]!==t[h]&&d.has(h)})};this.#E({listeners:i()})}#w(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const a=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(a?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(t){Pt.batch(()=>{t.listeners&&this.listeners.forEach(a=>{a(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function fS(t,a){return Vn(a.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&a.retryOnMount===!1)}function Jg(t,a){return fS(t,a)||t.state.data!==void 0&&Vd(t,a,a.refetchOnMount)}function Vd(t,a,i){if(Vn(a.enabled,t)!==!1&&Tr(a.staleTime,t)!=="static"){const o=typeof i=="function"?i(t):i;return o==="always"||o!==!1&&wf(t,a)}return!1}function Wg(t,a,i,o){return(t!==a||Vn(o.enabled,t)===!1)&&(!i.suspense||t.state.status!=="error")&&wf(t,i)}function wf(t,a){return Vn(a.enabled,t)!==!1&&t.isStaleByTime(Tr(a.staleTime,t))}function hS(t,a){return!rc(t.getCurrentResult(),a)}function ey(t){return{onFetch:(a,i)=>{const o=a.options,c=a.fetchOptions?.meta?.fetchMore?.direction,d=a.state.data?.pages||[],f=a.state.data?.pageParams||[];let h={pages:[],pageParams:[]},y=0;const g=async()=>{let x=!1;const v=j=>{rS(j,()=>a.signal,()=>x=!0)},E=wv(a.options,a.fetchOptions),R=async(j,U,K)=>{if(x)return Promise.reject();if(U==null&&j.pages.length)return Promise.resolve(j);const Q=(()=>{const fe={client:a.client,queryKey:a.queryKey,pageParam:U,direction:K?"backward":"forward",meta:a.options.meta};return v(fe),fe})(),W=await E(Q),{maxPages:me}=a.options,he=K?aS:nS;return{pages:he(j.pages,W,me),pageParams:he(j.pageParams,U,me)}};if(c&&d.length){const j=c==="backward",U=j?Rv:Fd,K={pages:d,pageParams:f},H=U(o,K);h=await R(K,H,j)}else{const j=t??d.length;do{const U=y===0?f[0]??o.initialPageParam:Fd(o,h);if(y>0&&U==null)break;h=await R(h,U),y++}while(y<j)}return h};a.options.persister?a.fetchFn=()=>a.options.persister?.(g,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},i):a.fetchFn=g}}}function Fd(t,{pages:a,pageParams:i}){const o=a.length-1;return a.length>0?t.getNextPageParam(a[o],a,i[o],i):void 0}function Rv(t,{pages:a,pageParams:i}){return a.length>0?t.getPreviousPageParam?.(a[0],a,i[0],i):void 0}function KN(t,a){return a?Fd(t,a)!=null:!1}function GN(t,a){return!a||!t.getPreviousPageParam?!1:Rv(t,a)!=null}var mS=class extends Cv{#e;#t;#n;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||kv(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(a=>a!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const a=()=>{this.#a({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Tv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(d,f)=>{this.#a({type:"failed",failureCount:d,error:f})},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 o=this.state.status==="pending",c=!this.#r.canStart();try{if(o)a();else{this.#a({type:"pending",variables:t,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,i);const f=await this.options.onMutate?.(t,i);f!==this.state.context&&this.#a({type:"pending",context:f,variables:t,isPaused:c})}const d=await this.#r.start();return await this.#n.config.onSuccess?.(d,t,this.state.context,this,i),await this.options.onSuccess?.(d,t,this.state.context,i),await this.#n.config.onSettled?.(d,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(d,null,t,this.state.context,i),this.#a({type:"success",data:d}),d}catch(d){try{await this.#n.config.onError?.(d,t,this.state.context,this,i)}catch(f){Promise.reject(f)}try{await this.options.onError?.(d,t,this.state.context,i)}catch(f){Promise.reject(f)}try{await this.#n.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,i)}catch(f){Promise.reject(f)}try{await this.options.onSettled?.(void 0,d,t,this.state.context,i)}catch(f){Promise.reject(f)}throw this.#a({type:"error",error:d}),d}finally{this.#n.runNext(this)}}#a(t){const a=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=a(this.state),Pt.batch(()=>{this.#t.forEach(i=>{i.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function kv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var pS=class extends ts{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,a,i){const o=new mS({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(a),state:i});return this.add(o),o}add(t){this.#e.add(t);const a=jl(t);if(typeof a=="string"){const i=this.#t.get(a);i?i.push(t):this.#t.set(a,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const a=jl(t);if(typeof a=="string"){const i=this.#t.get(a);if(i)if(i.length>1){const o=i.indexOf(t);o!==-1&&i.splice(o,1)}else i[0]===t&&this.#t.delete(a)}}this.notify({type:"removed",mutation:t})}canRun(t){const a=jl(t);if(typeof a=="string"){const o=this.#t.get(a)?.find(c=>c.state.status==="pending");return!o||o===t}else return!0}runNext(t){const a=jl(t);return typeof a=="string"?this.#t.get(a)?.find(o=>o!==t&&o.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Pt.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const a={exact:!0,...t};return this.getAll().find(i=>Vg(a,i))}findAll(t={}){return this.getAll().filter(a=>Vg(t,a))}notify(t){Pt.batch(()=>{this.listeners.forEach(a=>{a(t)})})}resumePausedMutations(){const t=this.getAll().filter(a=>a.state.isPaused);return Pt.batch(()=>Promise.all(t.map(a=>a.continue().catch(on))))}};function jl(t){return t.options.scope?.id}var gS=class extends ts{#e;#t=void 0;#n;#r;constructor(a,i){super(),this.#e=a,this.setOptions(i),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(a){const i=this.options;this.options=this.#e.defaultMutationOptions(a),rc(this.options,i)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),i?.mutationKey&&this.options.mutationKey&&ii(i.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,i){return this.#r=i,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??kv();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){Pt.batch(()=>{if(this.#r&&this.hasListeners()){const i=this.#t.variables,o=this.#t.context,c={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(a?.type==="success"){try{this.#r.onSuccess?.(a.data,i,o,c)}catch(d){Promise.reject(d)}try{this.#r.onSettled?.(a.data,null,i,o,c)}catch(d){Promise.reject(d)}}else if(a?.type==="error"){try{this.#r.onError?.(a.error,i,o,c)}catch(d){Promise.reject(d)}try{this.#r.onSettled?.(void 0,a.error,i,o,c)}catch(d){Promise.reject(d)}}}this.listeners.forEach(i=>{i(this.#t)})})}},yS=class extends ts{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,a,i){const o=a.queryKey,c=a.queryHash??vf(o,a);let d=this.get(c);return d||(d=new uS({client:t,queryKey:o,queryHash:c,options:t.defaultQueryOptions(a),state:i,defaultOptions:t.getQueryDefaults(o)}),this.add(d)),d}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const a=this.#e.get(t.queryHash);a&&(t.destroy(),a===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Pt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const a={exact:!0,...t};return this.getAll().find(i=>Yg(a,i))}findAll(t={}){const a=this.getAll();return Object.keys(t).length>0?a.filter(i=>Yg(t,i)):a}notify(t){Pt.batch(()=>{this.listeners.forEach(a=>{a(t)})})}onFocus(){Pt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Pt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},vS=class{#e;#t;#n;#r;#a;#s;#o;#i;constructor(t={}){this.#e=t.queryCache||new yS,this.#t=t.mutationCache||new pS,this.#n=t.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=Sf.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=ic.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const a=this.defaultQueryOptions({queryKey:t});return this.#e.get(a.queryHash)?.state.data}ensureQueryData(t){const a=this.defaultQueryOptions(t),i=this.#e.build(this,a),o=i.state.data;return o===void 0?this.fetchQuery(t):(t.revalidateIfStale&&i.isStaleByTime(Tr(a.staleTime,i))&&this.prefetchQuery(a),Promise.resolve(o))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:a,state:i})=>{const o=i.data;return[a,o]})}setQueryData(t,a,i){const o=this.defaultQueryOptions({queryKey:t}),d=this.#e.get(o.queryHash)?.state.data,f=W1(a,d);if(f!==void 0)return this.#e.build(this,o).setData(f,{...i,manual:!0})}setQueriesData(t,a,i){return Pt.batch(()=>this.#e.findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,a,i)]))}getQueryState(t){const a=this.defaultQueryOptions({queryKey:t});return this.#e.get(a.queryHash)?.state}removeQueries(t){const a=this.#e;Pt.batch(()=>{a.findAll(t).forEach(i=>{a.remove(i)})})}resetQueries(t,a){const i=this.#e;return Pt.batch(()=>(i.findAll(t).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...t},a)))}cancelQueries(t,a={}){const i={revert:!0,...a},o=Pt.batch(()=>this.#e.findAll(t).map(c=>c.cancel(i)));return Promise.all(o).then(on).catch(on)}invalidateQueries(t,a={}){return Pt.batch(()=>(this.#e.findAll(t).forEach(i=>{i.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},a)))}refetchQueries(t,a={}){const i={...a,cancelRefetch:a.cancelRefetch??!0},o=Pt.batch(()=>this.#e.findAll(t).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let d=c.fetch(void 0,i);return i.throwOnError||(d=d.catch(on)),c.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(o).then(on)}fetchQuery(t){const a=this.defaultQueryOptions(t);a.retry===void 0&&(a.retry=!1);const i=this.#e.build(this,a);return i.isStaleByTime(Tr(a.staleTime,i))?i.fetch(a):Promise.resolve(i.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(on).catch(on)}fetchInfiniteQuery(t){return t.behavior=ey(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(on).catch(on)}ensureInfiniteQueryData(t){return t.behavior=ey(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return ic.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,a){this.#r.set(ii(t),{queryKey:t,defaultOptions:a})}getQueryDefaults(t){const a=[...this.#r.values()],i={};return a.forEach(o=>{co(t,o.queryKey)&&Object.assign(i,o.defaultOptions)}),i}setMutationDefaults(t,a){this.#a.set(ii(t),{mutationKey:t,defaultOptions:a})}getMutationDefaults(t){const a=[...this.#a.values()],i={};return a.forEach(o=>{co(t,o.mutationKey)&&Object.assign(i,o.defaultOptions)}),i}defaultQueryOptions(t){if(t._defaulted)return t;const a={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return a.queryHash||(a.queryHash=vf(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===bf&&(a.enabled=!1),a}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Nv=S.createContext(void 0),rt=t=>{const a=S.useContext(Nv);if(t)return t;if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},bS=({client:t,children:a})=>(S.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),m.jsx(Nv.Provider,{value:t,children:a})),_v=S.createContext(!1),xS=()=>S.useContext(_v);_v.Provider;function SS(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var wS=S.createContext(SS()),ES=()=>S.useContext(wS),TS=(t,a,i)=>{const o=i?.state.error&&typeof t.throwOnError=="function"?xf(t.throwOnError,[i.state.error,i]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||o)&&(a.isReset()||(t.retryOnMount=!1))},CS=t=>{S.useEffect(()=>{t.clearReset()},[t])},AS=({result:t,errorResetBoundary:a,throwOnError:i,query:o,suspense:c})=>t.isError&&!a.isReset()&&!t.isFetching&&o&&(c&&t.data===void 0||xf(i,[t.error,o])),RS=t=>{if(t.suspense){const i=c=>c==="static"?c:Math.max(c??1e3,1e3),o=t.staleTime;t.staleTime=typeof o=="function"?(...c)=>i(o(...c)):i(o),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},kS=(t,a)=>t.isLoading&&t.isFetching&&!a,NS=(t,a)=>t?.suspense&&a.isPending,ty=(t,a,i)=>a.fetchOptimistic(t).catch(()=>{i.clearReset()});function _S(t,a,i){const o=xS(),c=ES(),d=rt(i),f=d.defaultQueryOptions(t);d.getDefaultOptions().queries?._experimental_beforeQuery?.(f);const h=d.getQueryCache().get(f.queryHash);f._optimisticResults=o?"isRestoring":"optimistic",RS(f),TS(f,c,h),CS(c);const y=!d.getQueryCache().get(f.queryHash),[g]=S.useState(()=>new a(d,f)),x=g.getOptimisticResult(f),v=!o&&t.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(E=>{const R=v?g.subscribe(Pt.batchCalls(E)):on;return g.updateResult(),R},[g,v]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),S.useEffect(()=>{g.setOptions(f)},[f,g]),NS(f,x))throw ty(f,g,c);if(AS({result:x,errorResetBoundary:c,throwOnError:f.throwOnError,query:h,suspense:f.suspense}))throw x.error;return d.getDefaultOptions().queries?._experimental_afterQuery?.(f,x),f.experimental_prefetchInRender&&!ri&&kS(x,o)&&(y?ty(f,g,c):h?.promise)?.catch(on).finally(()=>{g.updateResult()}),f.notifyOnChangeProps?x:g.trackResult(x)}function ln(t,a){return _S(t,dS,a)}function gt(t,a){const i=rt(a),[o]=S.useState(()=>new gS(i,t));S.useEffect(()=>{o.setOptions(t)},[o,t]);const c=S.useSyncExternalStore(S.useCallback(f=>o.subscribe(Pt.batchCalls(f)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d=S.useCallback((f,h)=>{o.mutate(f,h).catch(on)},[o]);if(c.error&&xf(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}var Ef=bv();const OS=vv(Ef);function MS(t){if(typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",a.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}const DS=t=>{switch(t){case"success":return LS;case"info":return BS;case"warning":return US;case"error":return qS;default:return null}},jS=Array(12).fill(0),zS=({visible:t,className:a})=>ne.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":t},ne.createElement("div",{className:"sonner-spinner"},jS.map((i,o)=>ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),LS=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"})),US=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"})),BS=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"})),qS=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"})),PS=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"})),IS=()=>{const[t,a]=ne.useState(document.hidden);return ne.useEffect(()=>{const i=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",i),()=>window.removeEventListener("visibilitychange",i)},[]),t};let Xd=1;class HS{constructor(){this.subscribe=a=>(this.subscribers.push(a),()=>{const i=this.subscribers.indexOf(a);this.subscribers.splice(i,1)}),this.publish=a=>{this.subscribers.forEach(i=>i(a))},this.addToast=a=>{this.publish(a),this.toasts=[...this.toasts,a]},this.create=a=>{var i;const{message:o,...c}=a,d=typeof a?.id=="number"||((i=a.id)==null?void 0:i.length)>0?a.id:Xd++,f=this.toasts.find(y=>y.id===d),h=a.dismissible===void 0?!0:a.dismissible;return this.dismissedToasts.has(d)&&this.dismissedToasts.delete(d),f?this.toasts=this.toasts.map(y=>y.id===d?(this.publish({...y,...a,id:d,title:o}),{...y,...a,id:d,dismissible:h,title:o}):y):this.addToast({title:o,...c,dismissible:h,id:d}),d},this.dismiss=a=>(a?(this.dismissedToasts.add(a),requestAnimationFrame(()=>this.subscribers.forEach(i=>i({id:a,dismiss:!0})))):this.toasts.forEach(i=>{this.subscribers.forEach(o=>o({id:i.id,dismiss:!0}))}),a),this.message=(a,i)=>this.create({...i,message:a}),this.error=(a,i)=>this.create({...i,message:a,type:"error"}),this.success=(a,i)=>this.create({...i,type:"success",message:a}),this.info=(a,i)=>this.create({...i,type:"info",message:a}),this.warning=(a,i)=>this.create({...i,type:"warning",message:a}),this.loading=(a,i)=>this.create({...i,type:"loading",message:a}),this.promise=(a,i)=>{if(!i)return;let o;i.loading!==void 0&&(o=this.create({...i,promise:a,type:"loading",message:i.loading,description:typeof i.description!="function"?i.description:void 0}));const c=Promise.resolve(a instanceof Function?a():a);let d=o!==void 0,f;const h=c.then(async g=>{if(f=["resolve",g],ne.isValidElement(g))d=!1,this.create({id:o,type:"default",message:g});else if(KS(g)&&!g.ok){d=!1;const v=typeof i.error=="function"?await i.error(`HTTP error! status: ${g.status}`):i.error,E=typeof i.description=="function"?await i.description(`HTTP error! status: ${g.status}`):i.description,j=typeof v=="object"&&!ne.isValidElement(v)?v:{message:v};this.create({id:o,type:"error",description:E,...j})}else if(g instanceof Error){d=!1;const v=typeof i.error=="function"?await i.error(g):i.error,E=typeof i.description=="function"?await i.description(g):i.description,j=typeof v=="object"&&!ne.isValidElement(v)?v:{message:v};this.create({id:o,type:"error",description:E,...j})}else if(i.success!==void 0){d=!1;const v=typeof i.success=="function"?await i.success(g):i.success,E=typeof i.description=="function"?await i.description(g):i.description,j=typeof v=="object"&&!ne.isValidElement(v)?v:{message:v};this.create({id:o,type:"success",description:E,...j})}}).catch(async g=>{if(f=["reject",g],i.error!==void 0){d=!1;const x=typeof i.error=="function"?await i.error(g):i.error,v=typeof i.description=="function"?await i.description(g):i.description,R=typeof x=="object"&&!ne.isValidElement(x)?x:{message:x};this.create({id:o,type:"error",description:v,...R})}}).finally(()=>{d&&(this.dismiss(o),o=void 0),i.finally==null||i.finally.call(i)}),y=()=>new Promise((g,x)=>h.then(()=>f[0]==="reject"?x(f[1]):g(f[1])).catch(x));return typeof o!="string"&&typeof o!="number"?{unwrap:y}:Object.assign(o,{unwrap:y})},this.custom=(a,i)=>{const o=i?.id||Xd++;return this.create({jsx:a(o),id:o,...i}),o},this.getActiveToasts=()=>this.toasts.filter(a=>!this.dismissedToasts.has(a.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const xn=new HS,QS=(t,a)=>{const i=a?.id||Xd++;return xn.addToast({title:t,...a,id:i}),i},KS=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",GS=QS,YS=()=>xn.toasts,VS=()=>xn.getActiveToasts(),Gi=Object.assign(GS,{success:xn.success,info:xn.info,warning:xn.warning,error:xn.error,custom:xn.custom,message:xn.message,promise:xn.promise,dismiss:xn.dismiss,loading:xn.loading},{getHistory:YS,getToasts:VS});MS("[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 zl(t){return t.label!==void 0}const FS=3,XS="24px",ZS="16px",ny=4e3,$S=356,JS=14,WS=45,ew=200;function ya(...t){return t.filter(Boolean).join(" ")}function tw(t){const[a,i]=t.split("-"),o=[];return a&&o.push(a),i&&o.push(i),o}const nw=t=>{var a,i,o,c,d,f,h,y,g;const{invert:x,toast:v,unstyled:E,interacting:R,setHeights:j,visibleToasts:U,heights:K,index:H,toasts:Q,expanded:W,removeToast:me,defaultRichColors:he,closeButton:fe,style:k,cancelButtonStyle:Y,actionButtonStyle:re,className:Oe="",descriptionClassName:Ne="",duration:Ee,position:je,gap:Ue,expandByDefault:Ce,classNames:_,icons:F,closeButtonAriaLabel:I="Close toast"}=t,[pe,be]=ne.useState(null),[C,q]=ne.useState(null),[P,Z]=ne.useState(!1),[ee,J]=ne.useState(!1),[ae,Ae]=ne.useState(!1),[Pe,Qt]=ne.useState(!1),[an,We]=ne.useState(!1),[Jn,un]=ne.useState(0),[_r,dn]=ne.useState(0),Ea=ne.useRef(v.duration||Ee||ny),Or=ne.useRef(null),Wt=ne.useRef(null),Mr=H===0,Dr=H+1<=U,Kt=v.type,da=v.dismissible!==!1,bt=v.className||"",Ta=v.descriptionClassName||"",fa=ne.useMemo(()=>K.findIndex(_e=>_e.toastId===v.id)||0,[K,v.id]),Xa=ne.useMemo(()=>{var _e;return(_e=v.closeButton)!=null?_e:fe},[v.closeButton,fe]),Gt=ne.useMemo(()=>v.duration||Ee||ny,[v.duration,Ee]),rn=ne.useRef(0),Dn=ne.useRef(0),li=ne.useRef(0),jn=ne.useRef(null),[Ca,ht]=je.split("-"),fn=ne.useMemo(()=>K.reduce((_e,dt,Ct)=>Ct>=fa?_e:_e+dt.height,0),[K,fa]),Ut=IS(),ci=v.invert||x,jr=Kt==="loading";Dn.current=ne.useMemo(()=>fa*Ue+fn,[fa,fn]),ne.useEffect(()=>{Ea.current=Gt},[Gt]),ne.useEffect(()=>{Z(!0)},[]),ne.useEffect(()=>{const _e=Wt.current;if(_e){const dt=_e.getBoundingClientRect().height;return dn(dt),j(Ct=>[{toastId:v.id,height:dt,position:v.position},...Ct]),()=>j(Ct=>Ct.filter(At=>At.toastId!==v.id))}},[j,v.id]),ne.useLayoutEffect(()=>{if(!P)return;const _e=Wt.current,dt=_e.style.height;_e.style.height="auto";const Ct=_e.getBoundingClientRect().height;_e.style.height=dt,dn(Ct),j(At=>At.find(ft=>ft.toastId===v.id)?At.map(ft=>ft.toastId===v.id?{...ft,height:Ct}:ft):[{toastId:v.id,height:Ct,position:v.position},...At])},[P,v.title,v.description,j,v.id,v.jsx,v.action,v.cancel]);const Sn=ne.useCallback(()=>{J(!0),un(Dn.current),j(_e=>_e.filter(dt=>dt.toastId!==v.id)),setTimeout(()=>{me(v)},ew)},[v,me,j,Dn]);ne.useEffect(()=>{if(v.promise&&Kt==="loading"||v.duration===1/0||v.type==="loading")return;let _e;return W||R||Ut?(()=>{if(li.current<rn.current){const At=new Date().getTime()-rn.current;Ea.current=Ea.current-At}li.current=new Date().getTime()})():Ea.current!==1/0&&(rn.current=new Date().getTime(),_e=setTimeout(()=>{v.onAutoClose==null||v.onAutoClose.call(v,v),Sn()},Ea.current)),()=>clearTimeout(_e)},[W,R,v,Kt,Ut,Sn]),ne.useEffect(()=>{v.delete&&(Sn(),v.onDismiss==null||v.onDismiss.call(v,v))},[Sn,v.delete]);function Wn(){var _e;if(F?.loading){var dt;return ne.createElement("div",{className:ya(_?.loader,v==null||(dt=v.classNames)==null?void 0:dt.loader,"sonner-loader"),"data-visible":Kt==="loading"},F.loading)}return ne.createElement(zS,{className:ya(_?.loader,v==null||(_e=v.classNames)==null?void 0:_e.loader),visible:Kt==="loading"})}const Aa=v.icon||F?.[Kt]||DS(Kt);var ea,zn;return ne.createElement("li",{tabIndex:0,ref:Wt,className:ya(Oe,bt,_?.toast,v==null||(a=v.classNames)==null?void 0:a.toast,_?.default,_?.[Kt],v==null||(i=v.classNames)==null?void 0:i[Kt]),"data-sonner-toast":"","data-rich-colors":(ea=v.richColors)!=null?ea:he,"data-styled":!(v.jsx||v.unstyled||E),"data-mounted":P,"data-promise":!!v.promise,"data-swiped":an,"data-removed":ee,"data-visible":Dr,"data-y-position":Ca,"data-x-position":ht,"data-index":H,"data-front":Mr,"data-swiping":ae,"data-dismissible":da,"data-type":Kt,"data-invert":ci,"data-swipe-out":Pe,"data-swipe-direction":C,"data-expanded":!!(W||Ce&&P),"data-testid":v.testId,style:{"--index":H,"--toasts-before":H,"--z-index":Q.length-H,"--offset":`${ee?Jn:Dn.current}px`,"--initial-height":Ce?"auto":`${_r}px`,...k,...v.style},onDragEnd:()=>{Ae(!1),be(null),jn.current=null},onPointerDown:_e=>{_e.button!==2&&(jr||!da||(Or.current=new Date,un(Dn.current),_e.target.setPointerCapture(_e.pointerId),_e.target.tagName!=="BUTTON"&&(Ae(!0),jn.current={x:_e.clientX,y:_e.clientY})))},onPointerUp:()=>{var _e,dt,Ct;if(Pe||!da)return;jn.current=null;const At=Number(((_e=Wt.current)==null?void 0:_e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),wn=Number(((dt=Wt.current)==null?void 0:dt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ft=new Date().getTime()-((Ct=Or.current)==null?void 0:Ct.getTime()),en=pe==="x"?At:wn,Ra=Math.abs(en)/ft;if(Math.abs(en)>=WS||Ra>.11){un(Dn.current),v.onDismiss==null||v.onDismiss.call(v,v),q(pe==="x"?At>0?"right":"left":wn>0?"down":"up"),Sn(),Qt(!0);return}else{var w,N;(w=Wt.current)==null||w.style.setProperty("--swipe-amount-x","0px"),(N=Wt.current)==null||N.style.setProperty("--swipe-amount-y","0px")}We(!1),Ae(!1),be(null)},onPointerMove:_e=>{var dt,Ct,At;if(!jn.current||!da||((dt=window.getSelection())==null?void 0:dt.toString().length)>0)return;const ft=_e.clientY-jn.current.y,en=_e.clientX-jn.current.x;var Ra;const w=(Ra=t.swipeDirections)!=null?Ra:tw(je);!pe&&(Math.abs(en)>1||Math.abs(ft)>1)&&be(Math.abs(en)>Math.abs(ft)?"x":"y");let N={x:0,y:0};const L=$=>1/(1.5+Math.abs($)/20);if(pe==="y"){if(w.includes("top")||w.includes("bottom"))if(w.includes("top")&&ft<0||w.includes("bottom")&&ft>0)N.y=ft;else{const $=ft*L(ft);N.y=Math.abs($)<Math.abs(ft)?$:ft}}else if(pe==="x"&&(w.includes("left")||w.includes("right")))if(w.includes("left")&&en<0||w.includes("right")&&en>0)N.x=en;else{const $=en*L(en);N.x=Math.abs($)<Math.abs(en)?$:en}(Math.abs(N.x)>0||Math.abs(N.y)>0)&&We(!0),(Ct=Wt.current)==null||Ct.style.setProperty("--swipe-amount-x",`${N.x}px`),(At=Wt.current)==null||At.style.setProperty("--swipe-amount-y",`${N.y}px`)}},Xa&&!v.jsx&&Kt!=="loading"?ne.createElement("button",{"aria-label":I,"data-disabled":jr,"data-close-button":!0,onClick:jr||!da?()=>{}:()=>{Sn(),v.onDismiss==null||v.onDismiss.call(v,v)},className:ya(_?.closeButton,v==null||(o=v.classNames)==null?void 0:o.closeButton)},(zn=F?.close)!=null?zn:PS):null,(Kt||v.icon||v.promise)&&v.icon!==null&&(F?.[Kt]!==null||v.icon)?ne.createElement("div",{"data-icon":"",className:ya(_?.icon,v==null||(c=v.classNames)==null?void 0:c.icon)},v.promise||v.type==="loading"&&!v.icon?v.icon||Wn():null,v.type!=="loading"?Aa:null):null,ne.createElement("div",{"data-content":"",className:ya(_?.content,v==null||(d=v.classNames)==null?void 0:d.content)},ne.createElement("div",{"data-title":"",className:ya(_?.title,v==null||(f=v.classNames)==null?void 0:f.title)},v.jsx?v.jsx:typeof v.title=="function"?v.title():v.title),v.description?ne.createElement("div",{"data-description":"",className:ya(Ne,Ta,_?.description,v==null||(h=v.classNames)==null?void 0:h.description)},typeof v.description=="function"?v.description():v.description):null),ne.isValidElement(v.cancel)?v.cancel:v.cancel&&zl(v.cancel)?ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:v.cancelButtonStyle||Y,onClick:_e=>{zl(v.cancel)&&da&&(v.cancel.onClick==null||v.cancel.onClick.call(v.cancel,_e),Sn())},className:ya(_?.cancelButton,v==null||(y=v.classNames)==null?void 0:y.cancelButton)},v.cancel.label):null,ne.isValidElement(v.action)?v.action:v.action&&zl(v.action)?ne.createElement("button",{"data-button":!0,"data-action":!0,style:v.actionButtonStyle||re,onClick:_e=>{zl(v.action)&&(v.action.onClick==null||v.action.onClick.call(v.action,_e),!_e.defaultPrevented&&Sn())},className:ya(_?.actionButton,v==null||(g=v.classNames)==null?void 0:g.actionButton)},v.action.label):null)};function ay(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function aw(t,a){const i={};return[t,a].forEach((o,c)=>{const d=c===1,f=d?"--mobile-offset":"--offset",h=d?ZS:XS;function y(g){["top","right","bottom","left"].forEach(x=>{i[`${f}-${x}`]=typeof g=="number"?`${g}px`:g})}typeof o=="number"||typeof o=="string"?y(o):typeof o=="object"?["top","right","bottom","left"].forEach(g=>{o[g]===void 0?i[`${f}-${g}`]=h:i[`${f}-${g}`]=typeof o[g]=="number"?`${o[g]}px`:o[g]}):y(h)}),i}const rw=ne.forwardRef(function(a,i){const{id:o,invert:c,position:d="bottom-right",hotkey:f=["altKey","KeyT"],expand:h,closeButton:y,className:g,offset:x,mobileOffset:v,theme:E="light",richColors:R,duration:j,style:U,visibleToasts:K=FS,toastOptions:H,dir:Q=ay(),gap:W=JS,icons:me,containerAriaLabel:he="Notifications"}=a,[fe,k]=ne.useState([]),Y=ne.useMemo(()=>o?fe.filter(P=>P.toasterId===o):fe.filter(P=>!P.toasterId),[fe,o]),re=ne.useMemo(()=>Array.from(new Set([d].concat(Y.filter(P=>P.position).map(P=>P.position)))),[Y,d]),[Oe,Ne]=ne.useState([]),[Ee,je]=ne.useState(!1),[Ue,Ce]=ne.useState(!1),[_,F]=ne.useState(E!=="system"?E:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),I=ne.useRef(null),pe=f.join("+").replace(/Key/g,"").replace(/Digit/g,""),be=ne.useRef(null),C=ne.useRef(!1),q=ne.useCallback(P=>{k(Z=>{var ee;return(ee=Z.find(J=>J.id===P.id))!=null&&ee.delete||xn.dismiss(P.id),Z.filter(({id:J})=>J!==P.id)})},[]);return ne.useEffect(()=>xn.subscribe(P=>{if(P.dismiss){requestAnimationFrame(()=>{k(Z=>Z.map(ee=>ee.id===P.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{OS.flushSync(()=>{k(Z=>{const ee=Z.findIndex(J=>J.id===P.id);return ee!==-1?[...Z.slice(0,ee),{...Z[ee],...P},...Z.slice(ee+1)]:[P,...Z]})})})}),[fe]),ne.useEffect(()=>{if(E!=="system"){F(E);return}if(E==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const P=window.matchMedia("(prefers-color-scheme: dark)");try{P.addEventListener("change",({matches:Z})=>{F(Z?"dark":"light")})}catch{P.addListener(({matches:ee})=>{try{F(ee?"dark":"light")}catch(J){console.error(J)}})}},[E]),ne.useEffect(()=>{fe.length<=1&&je(!1)},[fe]),ne.useEffect(()=>{const P=Z=>{var ee;if(f.every(Ae=>Z[Ae]||Z.code===Ae)){var ae;je(!0),(ae=I.current)==null||ae.focus()}Z.code==="Escape"&&(document.activeElement===I.current||(ee=I.current)!=null&&ee.contains(document.activeElement))&&je(!1)};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[f]),ne.useEffect(()=>{if(I.current)return()=>{be.current&&(be.current.focus({preventScroll:!0}),be.current=null,C.current=!1)}},[I.current]),ne.createElement("section",{ref:i,"aria-label":`${he} ${pe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},re.map((P,Z)=>{var ee;const[J,ae]=P.split("-");return Y.length?ne.createElement("ol",{key:P,dir:Q==="auto"?ay():Q,tabIndex:-1,ref:I,className:g,"data-sonner-toaster":!0,"data-sonner-theme":_,"data-y-position":J,"data-x-position":ae,style:{"--front-toast-height":`${((ee=Oe[0])==null?void 0:ee.height)||0}px`,"--width":`${$S}px`,"--gap":`${W}px`,...U,...aw(x,v)},onBlur:Ae=>{C.current&&!Ae.currentTarget.contains(Ae.relatedTarget)&&(C.current=!1,be.current&&(be.current.focus({preventScroll:!0}),be.current=null))},onFocus:Ae=>{Ae.target instanceof HTMLElement&&Ae.target.dataset.dismissible==="false"||C.current||(C.current=!0,be.current=Ae.relatedTarget)},onMouseEnter:()=>je(!0),onMouseMove:()=>je(!0),onMouseLeave:()=>{Ue||je(!1)},onDragEnd:()=>je(!1),onPointerDown:Ae=>{Ae.target instanceof HTMLElement&&Ae.target.dataset.dismissible==="false"||Ce(!0)},onPointerUp:()=>Ce(!1)},Y.filter(Ae=>!Ae.position&&Z===0||Ae.position===P).map((Ae,Pe)=>{var Qt,an;return ne.createElement(nw,{key:Ae.id,icons:me,index:Pe,toast:Ae,defaultRichColors:R,duration:(Qt=H?.duration)!=null?Qt:j,className:H?.className,descriptionClassName:H?.descriptionClassName,invert:c,visibleToasts:K,closeButton:(an=H?.closeButton)!=null?an:y,interacting:Ue,position:P,style:H?.style,unstyled:H?.unstyled,classNames:H?.classNames,cancelButtonStyle:H?.cancelButtonStyle,actionButtonStyle:H?.actionButtonStyle,closeButtonAriaLabel:H?.closeButtonAriaLabel,removeToast:q,toasts:Y.filter(We=>We.position==Ae.position),heights:Oe.filter(We=>We.position==Ae.position),setHeights:Ne,expandByDefault:h,gap:W,expanded:Ee,swipeDirections:a.swipeDirections})})):null}))}),iw=new vS({defaultOptions:{queries:{staleTime:1e3*60,retry:1}}});var Ov=t=>{throw TypeError(t)},sw=(t,a,i)=>a.has(t)||Ov("Cannot "+i),Nd=(t,a,i)=>(sw(t,a,"read from private field"),i?i.call(t):a.get(t)),ow=(t,a,i)=>a.has(t)?Ov("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(t):a.set(t,i),ry="popstate";function lw(t={}){function a(o,c){let{pathname:d,search:f,hash:h}=o.location;return uo("",{pathname:d,search:f,hash:h},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function i(o,c){return typeof c=="string"?c:Sa(c)}return uw(a,i,null,t)}function Ie(t,a){if(t===!1||t===null||typeof t>"u")throw new Error(a)}function Lt(t,a){if(!t){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function cw(){return Math.random().toString(36).substring(2,10)}function iy(t,a){return{usr:t.state,key:t.key,idx:a}}function uo(t,a,i=null,o){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof a=="string"?kr(a):a,state:i,key:a&&a.key||o||cw()}}function Sa({pathname:t="/",search:a="",hash:i=""}){return a&&a!=="?"&&(t+=a.charAt(0)==="?"?a:"?"+a),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function kr(t){let a={};if(t){let i=t.indexOf("#");i>=0&&(a.hash=t.substring(i),t=t.substring(0,i));let o=t.indexOf("?");o>=0&&(a.search=t.substring(o),t=t.substring(0,o)),t&&(a.pathname=t)}return a}function uw(t,a,i,o={}){let{window:c=document.defaultView,v5Compat:d=!1}=o,f=c.history,h="POP",y=null,g=x();g==null&&(g=0,f.replaceState({...f.state,idx:g},""));function x(){return(f.state||{idx:null}).idx}function v(){h="POP";let K=x(),H=K==null?null:K-g;g=K,y&&y({action:h,location:U.location,delta:H})}function E(K,H){h="PUSH";let Q=uo(U.location,K,H);g=x()+1;let W=iy(Q,g),me=U.createHref(Q);try{f.pushState(W,"",me)}catch(he){if(he instanceof DOMException&&he.name==="DataCloneError")throw he;c.location.assign(me)}d&&y&&y({action:h,location:U.location,delta:1})}function R(K,H){h="REPLACE";let Q=uo(U.location,K,H);g=x();let W=iy(Q,g),me=U.createHref(Q);f.replaceState(W,"",me),d&&y&&y({action:h,location:U.location,delta:0})}function j(K){return Mv(K)}let U={get action(){return h},get location(){return t(c,f)},listen(K){if(y)throw new Error("A history only accepts one active listener");return c.addEventListener(ry,v),y=K,()=>{c.removeEventListener(ry,v),y=null}},createHref(K){return a(c,K)},createURL:j,encodeLocation(K){let H=j(K);return{pathname:H.pathname,search:H.search,hash:H.hash}},push:E,replace:R,go(K){return f.go(K)}};return U}function Mv(t,a=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Ie(i,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:Sa(t);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=i+o),new URL(o,i)}var ao,sy=class{constructor(t){if(ow(this,ao,new Map),t)for(let[a,i]of t)this.set(a,i)}get(t){if(Nd(this,ao).has(t))return Nd(this,ao).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,a){Nd(this,ao).set(t,a)}};ao=new WeakMap;var dw=new Set(["lazy","caseSensitive","path","id","index","children"]);function fw(t){return dw.has(t)}var hw=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function mw(t){return hw.has(t)}function pw(t){return t.index===!0}function fo(t,a,i=[],o={},c=!1){return t.map((d,f)=>{let h=[...i,String(f)],y=typeof d.id=="string"?d.id:h.join("-");if(Ie(d.index!==!0||!d.children,"Cannot specify children on an index route"),Ie(c||!o[y],`Found a route id collision on id "${y}". Route id's must be globally unique within Data Router usages`),pw(d)){let g={...d,id:y};return o[y]=oy(g,a(g)),g}else{let g={...d,id:y,children:void 0};return o[y]=oy(g,a(g)),d.children&&(g.children=fo(d.children,a,h,o,c)),g}})}function oy(t,a){return Object.assign(t,{...a,...typeof a.lazy=="object"&&a.lazy!=null?{lazy:{...t.lazy,...a.lazy}}:{}})}function xr(t,a,i="/"){return ro(t,a,i,!1)}function ro(t,a,i,o){let c=typeof a=="string"?kr(a):a,d=Zn(c.pathname||"/",i);if(d==null)return null;let f=Dv(t);yw(f);let h=null;for(let y=0;h==null&&y<f.length;++y){let g=kw(d);h=Aw(f[y],g,o)}return h}function gw(t,a){let{route:i,pathname:o,params:c}=t;return{id:i.id,pathname:o,params:c,data:a[i.id],loaderData:a[i.id],handle:i.handle}}function Dv(t,a=[],i=[],o="",c=!1){let d=(f,h,y=c,g)=>{let x={relativePath:g===void 0?f.path||"":g,caseSensitive:f.caseSensitive===!0,childrenIndex:h,route:f};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(o)&&y)return;Ie(x.relativePath.startsWith(o),`Absolute route path "${x.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(o.length)}let v=ba([o,x.relativePath]),E=i.concat(x);f.children&&f.children.length>0&&(Ie(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),Dv(f.children,a,E,v,y)),!(f.path==null&&!f.index)&&a.push({path:v,score:Tw(v,f.index),routesMeta:E})};return t.forEach((f,h)=>{if(f.path===""||!f.path?.includes("?"))d(f,h);else for(let y of jv(f.path))d(f,h,!0,y)}),a}function jv(t){let a=t.split("/");if(a.length===0)return[];let[i,...o]=a,c=i.endsWith("?"),d=i.replace(/\?$/,"");if(o.length===0)return c?[d,""]:[d];let f=jv(o.join("/")),h=[];return h.push(...f.map(y=>y===""?d:[d,y].join("/"))),c&&h.push(...f),h.map(y=>t.startsWith("/")&&y===""?"/":y)}function yw(t){t.sort((a,i)=>a.score!==i.score?i.score-a.score:Cw(a.routesMeta.map(o=>o.childrenIndex),i.routesMeta.map(o=>o.childrenIndex)))}var vw=/^:[\w-]+$/,bw=3,xw=2,Sw=1,ww=10,Ew=-2,ly=t=>t==="*";function Tw(t,a){let i=t.split("/"),o=i.length;return i.some(ly)&&(o+=Ew),a&&(o+=xw),i.filter(c=>!ly(c)).reduce((c,d)=>c+(vw.test(d)?bw:d===""?Sw:ww),o)}function Cw(t,a){return t.length===a.length&&t.slice(0,-1).every((o,c)=>o===a[c])?t[t.length-1]-a[a.length-1]:0}function Aw(t,a,i=!1){let{routesMeta:o}=t,c={},d="/",f=[];for(let h=0;h<o.length;++h){let y=o[h],g=h===o.length-1,x=d==="/"?a:a.slice(d.length)||"/",v=sc({path:y.relativePath,caseSensitive:y.caseSensitive,end:g},x),E=y.route;if(!v&&g&&i&&!o[o.length-1].route.index&&(v=sc({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},x)),!v)return null;Object.assign(c,v.params),f.push({params:c,pathname:ba([d,v.pathname]),pathnameBase:Ow(ba([d,v.pathnameBase])),route:E}),v.pathnameBase!=="/"&&(d=ba([d,v.pathnameBase]))}return f}function sc(t,a){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[i,o]=Rw(t.path,t.caseSensitive,t.end),c=a.match(i);if(!c)return null;let d=c[0],f=d.replace(/(.)\/+$/,"$1"),h=c.slice(1);return{params:o.reduce((g,{paramName:x,isOptional:v},E)=>{if(x==="*"){let j=h[E]||"";f=d.slice(0,d.length-j.length).replace(/(.)\/+$/,"$1")}const R=h[E];return v&&!R?g[x]=void 0:g[x]=(R||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:f,pattern:t}}function Rw(t,a=!1,i=!0){Lt(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let o=[],c="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,h,y)=>(o.push({paramName:h,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(o.push({paramName:"*"}),c+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?c+="\\/*$":t!==""&&t!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,a?void 0:"i"),o]}function kw(t){try{return t.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Lt(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),t}}function Zn(t,a){if(a==="/")return t;if(!t.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,o=t.charAt(i);return o&&o!=="/"?null:t.slice(i)||"/"}function Nw({basename:t,pathname:a}){return a==="/"?t:ba([t,a])}var zv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tf=t=>zv.test(t);function _w(t,a="/"){let{pathname:i,search:o="",hash:c=""}=typeof t=="string"?kr(t):t,d;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?d=cy(i.substring(1),"/"):d=cy(i,a)):d=a,{pathname:d,search:Mw(o),hash:Dw(c)}}function cy(t,a){let i=a.replace(/\/+$/,"").split("/");return t.split("/").forEach(c=>{c===".."?i.length>1&&i.pop():c!=="."&&i.push(c)}),i.length>1?i.join("/"):"/"}function _d(t,a,i,o){return`Cannot include a '${t}' character in a manually specified \`to.${a}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Lv(t){return t.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function Cf(t){let a=Lv(t);return a.map((i,o)=>o===a.length-1?i.pathname:i.pathnameBase)}function Af(t,a,i,o=!1){let c;typeof t=="string"?c=kr(t):(c={...t},Ie(!c.pathname||!c.pathname.includes("?"),_d("?","pathname","search",c)),Ie(!c.pathname||!c.pathname.includes("#"),_d("#","pathname","hash",c)),Ie(!c.search||!c.search.includes("#"),_d("#","search","hash",c)));let d=t===""||c.pathname==="",f=d?"/":c.pathname,h;if(f==null)h=i;else{let v=a.length-1;if(!o&&f.startsWith("..")){let E=f.split("/");for(;E[0]==="..";)E.shift(),v-=1;c.pathname=E.join("/")}h=v>=0?a[v]:"/"}let y=_w(c,h),g=f&&f!=="/"&&f.endsWith("/"),x=(d||f===".")&&i.endsWith("/");return!y.pathname.endsWith("/")&&(g||x)&&(y.pathname+="/"),y}var ba=t=>t.join("/").replace(/\/\/+/g,"/"),Ow=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Mw=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Dw=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,yo=class{constructor(t,a,i,o=!1){this.status=t,this.statusText=a||"",this.internal=o,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function ho(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function vo(t){return t.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Uv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Bv(t,a){let i=t;if(typeof i!="string"||!zv.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let o=i,c=!1;if(Uv)try{let d=new URL(window.location.href),f=i.startsWith("//")?new URL(d.protocol+i):new URL(i),h=Zn(f.pathname,a);f.origin===d.origin&&h!=null?i=h+f.search+f.hash:c=!0}catch{Lt(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:c,to:i}}var wr=Symbol("Uninstrumented");function jw(t,a){let i={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};t.forEach(c=>c({id:a.id,index:a.index,path:a.path,instrument(d){let f=Object.keys(i);for(let h of f)d[h]&&i[h].push(d[h])}}));let o={};if(typeof a.lazy=="function"&&i.lazy.length>0){let c=Vi(i.lazy,a.lazy,()=>{});c&&(o.lazy=c)}if(typeof a.lazy=="object"){let c=a.lazy;["middleware","loader","action"].forEach(d=>{let f=c[d],h=i[`lazy.${d}`];if(typeof f=="function"&&h.length>0){let y=Vi(h,f,()=>{});y&&(o.lazy=Object.assign(o.lazy||{},{[d]:y}))}})}return["loader","action"].forEach(c=>{let d=a[c];if(typeof d=="function"&&i[c].length>0){let f=d[wr]??d,h=Vi(i[c],f,(...y)=>uy(y[0]));h&&(c==="loader"&&f.hydrate===!0&&(h.hydrate=!0),h[wr]=f,o[c]=h)}}),a.middleware&&a.middleware.length>0&&i.middleware.length>0&&(o.middleware=a.middleware.map(c=>{let d=c[wr]??c,f=Vi(i.middleware,d,(...h)=>uy(h[0]));return f?(f[wr]=d,f):c})),o}function zw(t,a){let i={navigate:[],fetch:[]};if(a.forEach(o=>o({instrument(c){let d=Object.keys(c);for(let f of d)c[f]&&i[f].push(c[f])}})),i.navigate.length>0){let o=t.navigate[wr]??t.navigate,c=Vi(i.navigate,o,(...d)=>{let[f,h]=d;return{to:typeof f=="number"||typeof f=="string"?f:f?Sa(f):".",...dy(t,h??{})}});c&&(c[wr]=o,t.navigate=c)}if(i.fetch.length>0){let o=t.fetch[wr]??t.fetch,c=Vi(i.fetch,o,(...d)=>{let[f,,h,y]=d;return{href:h??".",fetcherKey:f,...dy(t,y??{})}});c&&(c[wr]=o,t.fetch=c)}return t}function Vi(t,a,i){return t.length===0?null:async(...o)=>{let c=await qv(t,i(...o),()=>a(...o),t.length-1);if(c.type==="error")throw c.value;return c.value}}async function qv(t,a,i,o){let c=t[o],d;if(c){let f,h=async()=>(f?console.error("You cannot call instrumented handlers more than once"):f=qv(t,a,i,o-1),d=await f,Ie(d,"Expected a result"),d.type==="error"&&d.value instanceof Error?{status:"error",error:d.value}:{status:"success",error:void 0});try{await c(h,a)}catch(y){console.error("An instrumentation function threw an error:",y)}f||await h(),await f}else try{d={type:"success",value:await i()}}catch(f){d={type:"error",value:f}}return d||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function uy(t){let{request:a,context:i,params:o,unstable_pattern:c}=t;return{request:Lw(a),params:{...o},unstable_pattern:c,context:Uw(i)}}function dy(t,a){return{currentUrl:Sa(t.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 Lw(t){return{method:t.method,url:t.url,headers:{get:(...a)=>t.headers.get(...a)}}}function Uw(t){if(qw(t)){let a={...t};return Object.freeze(a),a}else return{get:a=>t.get(a)}}var Bw=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function qw(t){if(t===null||typeof t!="object")return!1;const a=Object.getPrototypeOf(t);return a===Object.prototype||a===null||Object.getOwnPropertyNames(a).sort().join("\0")===Bw}var Pv=["POST","PUT","PATCH","DELETE"],Pw=new Set(Pv),Iw=["GET",...Pv],Hw=new Set(Iw),Iv=new Set([301,302,303,307,308]),Qw=new Set([307,308]),Od={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Kw={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$s={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Gw=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),Hv="remix-router-transitions",Qv=Symbol("ResetLoaderData");function Yw(t){const a=t.window?t.window:typeof window<"u"?window:void 0,i=typeof a<"u"&&typeof a.document<"u"&&typeof a.document.createElement<"u";Ie(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let o=t.hydrationRouteProperties||[],c=t.mapRouteProperties||Gw,d=c;if(t.unstable_instrumentations){let w=t.unstable_instrumentations;d=N=>({...c(N),...jw(w.map(L=>L.route).filter(Boolean),N)})}let f={},h=fo(t.routes,d,void 0,f),y,g=t.basename||"/";g.startsWith("/")||(g=`/${g}`);let x=t.dataStrategy||$w,v={...t.future},E=null,R=new Set,j=null,U=null,K=null,H=t.hydrationData!=null,Q=xr(h,t.history.location,g),W=!1,me=null,he;if(Q==null&&!t.patchRoutesOnNavigation){let w=Yn(404,{pathname:t.history.location.pathname}),{matches:N,route:L}=Ll(h);he=!0,Q=N,me={[L.id]:w}}else if(Q&&!t.hydrationData&&At(Q,h,t.history.location.pathname).active&&(Q=null),Q)if(Q.some(w=>w.route.lazy))he=!1;else if(!Q.some(w=>Rf(w.route)))he=!0;else{let w=t.hydrationData?t.hydrationData.loaderData:null,N=t.hydrationData?t.hydrationData.errors:null;if(N){let L=Q.findIndex($=>N[$.route.id]!==void 0);he=Q.slice(0,L+1).every($=>!$d($.route,w,N))}else he=Q.every(L=>!$d(L.route,w,N))}else{he=!1,Q=[];let w=At(null,h,t.history.location.pathname);w.active&&w.matches&&(W=!0,Q=w.matches)}let fe,k={historyAction:t.history.action,location:t.history.location,matches:Q,initialized:he,navigation:Od,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||me,fetchers:new Map,blockers:new Map},Y="POP",re=null,Oe=!1,Ne,Ee=!1,je=new Map,Ue=null,Ce=!1,_=!1,F=new Set,I=new Map,pe=0,be=-1,C=new Map,q=new Set,P=new Map,Z=new Map,ee=new Set,J=new Map,ae,Ae=null;function Pe(){if(E=t.history.listen(({action:w,location:N,delta:L})=>{if(ae){ae(),ae=void 0;return}Lt(J.size===0||L!=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 $=Aa({currentLocation:k.location,nextLocation:N,historyAction:w});if($&&L!=null){let te=new Promise(xe=>{ae=xe});t.history.go(L*-1),Wn($,{state:"blocked",location:N,proceed(){Wn($,{state:"proceeding",proceed:void 0,reset:void 0,location:N}),te.then(()=>t.history.go(L))},reset(){let xe=new Map(k.blockers);xe.set($,$s),We({blockers:xe})}}),re?.resolve(),re=null;return}return dn(w,N)}),i){pE(a,je);let w=()=>gE(a,je);a.addEventListener("pagehide",w),Ue=()=>a.removeEventListener("pagehide",w)}return k.initialized||dn("POP",k.location,{initialHydration:!0}),fe}function Qt(){E&&E(),Ue&&Ue(),R.clear(),Ne&&Ne.abort(),k.fetchers.forEach((w,N)=>jn(N)),k.blockers.forEach((w,N)=>Sn(N))}function an(w){return R.add(w),()=>R.delete(w)}function We(w,N={}){w.matches&&(w.matches=w.matches.map(te=>{let xe=f[te.route.id],se=te.route;return se.element!==xe.element||se.errorElement!==xe.errorElement||se.hydrateFallbackElement!==xe.hydrateFallbackElement?{...te,route:xe}:te})),k={...k,...w};let L=[],$=[];k.fetchers.forEach((te,xe)=>{te.state==="idle"&&(ee.has(xe)?L.push(xe):$.push(xe))}),ee.forEach(te=>{!k.fetchers.has(te)&&!I.has(te)&&L.push(te)}),[...R].forEach(te=>te(k,{deletedFetchers:L,newErrors:w.errors??null,viewTransitionOpts:N.viewTransitionOpts,flushSync:N.flushSync===!0})),L.forEach(te=>jn(te)),$.forEach(te=>k.fetchers.delete(te))}function Jn(w,N,{flushSync:L}={}){let $=k.actionData!=null&&k.navigation.formMethod!=null&&nn(k.navigation.formMethod)&&k.navigation.state==="loading"&&w.state?._isRedirect!==!0,te;N.actionData?Object.keys(N.actionData).length>0?te=N.actionData:te=null:$?te=k.actionData:te=null;let xe=N.loaderData?Sy(k.loaderData,N.loaderData,N.matches||[],N.errors):k.loaderData,se=k.blockers;se.size>0&&(se=new Map(se),se.forEach((Re,we)=>se.set(we,$s)));let ie=Ce?!1:Ct(w,N.matches||k.matches),oe=Oe===!0||k.navigation.formMethod!=null&&nn(k.navigation.formMethod)&&w.state?._isRedirect!==!0;y&&(h=y,y=void 0),Ce||Y==="POP"||(Y==="PUSH"?t.history.push(w,w.state):Y==="REPLACE"&&t.history.replace(w,w.state));let ve;if(Y==="POP"){let Re=je.get(k.location.pathname);Re&&Re.has(w.pathname)?ve={currentLocation:k.location,nextLocation:w}:je.has(w.pathname)&&(ve={currentLocation:w,nextLocation:k.location})}else if(Ee){let Re=je.get(k.location.pathname);Re?Re.add(w.pathname):(Re=new Set([w.pathname]),je.set(k.location.pathname,Re)),ve={currentLocation:k.location,nextLocation:w}}We({...N,actionData:te,loaderData:xe,historyAction:Y,location:w,initialized:!0,navigation:Od,revalidation:"idle",restoreScrollPosition:ie,preventScrollReset:oe,blockers:se},{viewTransitionOpts:ve,flushSync:L===!0}),Y="POP",Oe=!1,Ee=!1,Ce=!1,_=!1,re?.resolve(),re=null,Ae?.resolve(),Ae=null}async function un(w,N){if(re?.resolve(),re=null,typeof w=="number"){re||(re=Cy());let Ye=re.promise;return t.history.go(w),Ye}let L=Zd(k.location,k.matches,g,w,N?.fromRouteId,N?.relative),{path:$,submission:te,error:xe}=fy(!1,L,N),se=k.location,ie=uo(k.location,$,N&&N.state);ie={...ie,...t.history.encodeLocation(ie)};let oe=N&&N.replace!=null?N.replace:void 0,ve="PUSH";oe===!0?ve="REPLACE":oe===!1||te!=null&&nn(te.formMethod)&&te.formAction===k.location.pathname+k.location.search&&(ve="REPLACE");let Re=N&&"preventScrollReset"in N?N.preventScrollReset===!0:void 0,we=(N&&N.flushSync)===!0,Je=Aa({currentLocation:se,nextLocation:ie,historyAction:ve});if(Je){Wn(Je,{state:"blocked",location:ie,proceed(){Wn(Je,{state:"proceeding",proceed:void 0,reset:void 0,location:ie}),un(w,N)},reset(){let Ye=new Map(k.blockers);Ye.set(Je,$s),We({blockers:Ye})}});return}await dn(ve,ie,{submission:te,pendingError:xe,preventScrollReset:Re,replace:N&&N.replace,enableViewTransition:N&&N.viewTransition,flushSync:we,callSiteDefaultShouldRevalidate:N&&N.unstable_defaultShouldRevalidate})}function _r(){Ae||(Ae=Cy()),Xa(),We({revalidation:"loading"});let w=Ae.promise;return k.navigation.state==="submitting"?w:k.navigation.state==="idle"?(dn(k.historyAction,k.location,{startUninterruptedRevalidation:!0}),w):(dn(Y||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation,enableViewTransition:Ee===!0}),w)}async function dn(w,N,L){Ne&&Ne.abort(),Ne=null,Y=w,Ce=(L&&L.startUninterruptedRevalidation)===!0,dt(k.location,k.matches),Oe=(L&&L.preventScrollReset)===!0,Ee=(L&&L.enableViewTransition)===!0;let $=y||h,te=L&&L.overrideNavigation,xe=L?.initialHydration&&k.matches&&k.matches.length>0&&!W?k.matches:xr($,N,g),se=(L&&L.flushSync)===!0;if(xe&&k.initialized&&!_&&iE(k.location,N)&&!(L&&L.submission&&nn(L.submission.formMethod))){Jn(N,{matches:xe},{flushSync:se});return}let ie=At(xe,$,N.pathname);if(ie.active&&ie.matches&&(xe=ie.matches),!xe){let{error:St,notFoundMatches:wt,route:Ve}=ea(N.pathname);Jn(N,{matches:wt,loaderData:{},errors:{[Ve.id]:St}},{flushSync:se});return}Ne=new AbortController;let oe=Yi(t.history,N,Ne.signal,L&&L.submission),ve=t.getContext?await t.getContext():new sy,Re;if(L&&L.pendingError)Re=[Sr(xe).route.id,{type:"error",error:L.pendingError}];else if(L&&L.submission&&nn(L.submission.formMethod)){let St=await Ea(oe,N,L.submission,xe,ve,ie.active,L&&L.initialHydration===!0,{replace:L.replace,flushSync:se});if(St.shortCircuited)return;if(St.pendingActionResult){let[wt,Ve]=St.pendingActionResult;if(Mn(Ve)&&ho(Ve.error)&&Ve.error.status===404){Ne=null,Jn(N,{matches:St.matches,loaderData:{},errors:{[wt]:Ve.error}});return}}xe=St.matches||xe,Re=St.pendingActionResult,te=Md(N,L.submission),se=!1,ie.active=!1,oe=Yi(t.history,oe.url,oe.signal)}let{shortCircuited:we,matches:Je,loaderData:Ye,errors:xt}=await Or(oe,N,xe,ve,ie.active,te,L&&L.submission,L&&L.fetcherSubmission,L&&L.replace,L&&L.initialHydration===!0,se,Re,L&&L.callSiteDefaultShouldRevalidate);we||(Ne=null,Jn(N,{matches:Je||xe,...wy(Re),loaderData:Ye,errors:xt}))}async function Ea(w,N,L,$,te,xe,se,ie={}){Xa();let oe=hE(N,L);if(We({navigation:oe},{flushSync:ie.flushSync===!0}),xe){let we=await wn($,N.pathname,w.signal);if(we.type==="aborted")return{shortCircuited:!0};if(we.type==="error"){if(we.partialMatches.length===0){let{matches:Ye,route:xt}=Ll(h);return{matches:Ye,pendingActionResult:[xt.id,{type:"error",error:we.error}]}}let Je=Sr(we.partialMatches).route.id;return{matches:we.partialMatches,pendingActionResult:[Je,{type:"error",error:we.error}]}}else if(we.matches)$=we.matches;else{let{notFoundMatches:Je,error:Ye,route:xt}=ea(N.pathname);return{matches:Je,pendingActionResult:[xt.id,{type:"error",error:Ye}]}}}let ve,Re=Vl($,N);if(!Re.route.action&&!Re.route.lazy)ve={type:"error",error:Yn(405,{method:w.method,pathname:N.pathname,routeId:Re.route.id})};else{let we=Fi(d,f,w,$,Re,se?[]:o,te),Je=await Ta(w,we,te,null);if(ve=Je[Re.route.id],!ve){for(let Ye of $)if(Je[Ye.route.id]){ve=Je[Ye.route.id];break}}if(w.signal.aborted)return{shortCircuited:!0}}if(ai(ve)){let we;return ie&&ie.replace!=null?we=ie.replace:we=vy(ve.response.headers.get("Location"),new URL(w.url),g,t.history)===k.location.pathname+k.location.search,await bt(w,ve,!0,{submission:L,replace:we}),{shortCircuited:!0}}if(Mn(ve)){let we=Sr($,Re.route.id);return(ie&&ie.replace)!==!0&&(Y="PUSH"),{matches:$,pendingActionResult:[we.route.id,ve,Re.route.id]}}return{matches:$,pendingActionResult:[Re.route.id,ve]}}async function Or(w,N,L,$,te,xe,se,ie,oe,ve,Re,we,Je){let Ye=xe||Md(N,se),xt=se||ie||Ty(Ye),St=!Ce&&!ve;if(te){if(St){let Rt=Wt(we);We({navigation:Ye,...Rt!==void 0?{actionData:Rt}:{}},{flushSync:Re})}let Fe=await wn(L,N.pathname,w.signal);if(Fe.type==="aborted")return{shortCircuited:!0};if(Fe.type==="error"){if(Fe.partialMatches.length===0){let{matches:aa,route:Yt}=Ll(h);return{matches:aa,loaderData:{},errors:{[Yt.id]:Fe.error}}}let Rt=Sr(Fe.partialMatches).route.id;return{matches:Fe.partialMatches,loaderData:{},errors:{[Rt]:Fe.error}}}else if(Fe.matches)L=Fe.matches;else{let{error:Rt,notFoundMatches:aa,route:Yt}=ea(N.pathname);return{matches:aa,loaderData:{},errors:{[Yt.id]:Rt}}}}let wt=y||h,{dsMatches:Ve,revalidatingFetchers:It}=hy(w,$,d,f,t.history,k,L,xt,N,ve?[]:o,ve===!0,_,F,ee,P,q,wt,g,t.patchRoutesOnNavigation!=null,we,Je);if(be=++pe,!t.dataStrategy&&!Ve.some(Fe=>Fe.shouldLoad)&&!Ve.some(Fe=>Fe.route.middleware&&Fe.route.middleware.length>0)&&It.length===0){let Fe=Ut();return Jn(N,{matches:L,loaderData:{},errors:we&&Mn(we[1])?{[we[0]]:we[1].error}:null,...wy(we),...Fe?{fetchers:new Map(k.fetchers)}:{}},{flushSync:Re}),{shortCircuited:!0}}if(St){let Fe={};if(!te){Fe.navigation=Ye;let Rt=Wt(we);Rt!==void 0&&(Fe.actionData=Rt)}It.length>0&&(Fe.fetchers=Mr(It)),We(Fe,{flushSync:Re})}It.forEach(Fe=>{ht(Fe.key),Fe.controller&&I.set(Fe.key,Fe.controller)});let hn=()=>It.forEach(Fe=>ht(Fe.key));Ne&&Ne.signal.addEventListener("abort",hn);let{loaderResults:yt,fetcherResults:ta}=await fa(Ve,It,w,$);if(w.signal.aborted)return{shortCircuited:!0};Ne&&Ne.signal.removeEventListener("abort",hn),It.forEach(Fe=>I.delete(Fe.key));let En=Ul(yt);if(En)return await bt(w,En.result,!0,{replace:oe}),{shortCircuited:!0};if(En=Ul(ta),En)return q.add(En.key),await bt(w,En.result,!0,{replace:oe}),{shortCircuited:!0};let{loaderData:na,errors:Ln}=xy(k,L,yt,we,It,ta);ve&&k.errors&&(Ln={...k.errors,...Ln});let ka=Ut(),zr=ci(be),Lr=ka||zr||It.length>0;return{matches:L,loaderData:na,errors:Ln,...Lr?{fetchers:new Map(k.fetchers)}:{}}}function Wt(w){if(w&&!Mn(w[1]))return{[w[0]]:w[1].data};if(k.actionData)return Object.keys(k.actionData).length===0?null:k.actionData}function Mr(w){return w.forEach(N=>{let L=k.fetchers.get(N.key),$=Js(void 0,L?L.data:void 0);k.fetchers.set(N.key,$)}),new Map(k.fetchers)}async function Dr(w,N,L,$){ht(w);let te=($&&$.flushSync)===!0,xe=y||h,se=Zd(k.location,k.matches,g,L,N,$?.relative),ie=xr(xe,se,g),oe=At(ie,xe,se);if(oe.active&&oe.matches&&(ie=oe.matches),!ie){rn(w,N,Yn(404,{pathname:se}),{flushSync:te});return}let{path:ve,submission:Re,error:we}=fy(!0,se,$);if(we){rn(w,N,we,{flushSync:te});return}let Je=t.getContext?await t.getContext():new sy,Ye=($&&$.preventScrollReset)===!0;if(Re&&nn(Re.formMethod)){await Kt(w,N,ve,ie,Je,oe.active,te,Ye,Re,$&&$.unstable_defaultShouldRevalidate);return}P.set(w,{routeId:N,path:ve}),await da(w,N,ve,ie,Je,oe.active,te,Ye,Re)}async function Kt(w,N,L,$,te,xe,se,ie,oe,ve){Xa(),P.delete(w);let Re=k.fetchers.get(w);Gt(w,mE(oe,Re),{flushSync:se});let we=new AbortController,Je=Yi(t.history,L,we.signal,oe);if(xe){let Xe=await wn($,new URL(Je.url).pathname,Je.signal,w);if(Xe.type==="aborted")return;if(Xe.type==="error"){rn(w,N,Xe.error,{flushSync:se});return}else if(Xe.matches)$=Xe.matches;else{rn(w,N,Yn(404,{pathname:L}),{flushSync:se});return}}let Ye=Vl($,L);if(!Ye.route.action&&!Ye.route.lazy){let Xe=Yn(405,{method:oe.formMethod,pathname:L,routeId:N});rn(w,N,Xe,{flushSync:se});return}I.set(w,we);let xt=pe,St=Fi(d,f,Je,$,Ye,o,te),wt=await Ta(Je,St,te,w),Ve=wt[Ye.route.id];if(!Ve){for(let Xe of St)if(wt[Xe.route.id]){Ve=wt[Xe.route.id];break}}if(Je.signal.aborted){I.get(w)===we&&I.delete(w);return}if(ee.has(w)){if(ai(Ve)||Mn(Ve)){Gt(w,Va(void 0));return}}else{if(ai(Ve))if(I.delete(w),be>xt){Gt(w,Va(void 0));return}else return q.add(w),Gt(w,Js(oe)),bt(Je,Ve,!1,{fetcherSubmission:oe,preventScrollReset:ie});if(Mn(Ve)){rn(w,N,Ve.error);return}}let It=k.navigation.location||k.location,hn=Yi(t.history,It,we.signal),yt=y||h,ta=k.navigation.state!=="idle"?xr(yt,k.navigation.location,g):k.matches;Ie(ta,"Didn't find any matches after fetcher action");let En=++pe;C.set(w,En);let na=Js(oe,Ve.data);k.fetchers.set(w,na);let{dsMatches:Ln,revalidatingFetchers:ka}=hy(hn,te,d,f,t.history,k,ta,oe,It,o,!1,_,F,ee,P,q,yt,g,t.patchRoutesOnNavigation!=null,[Ye.route.id,Ve],ve);ka.filter(Xe=>Xe.key!==w).forEach(Xe=>{let Ur=Xe.key,Eo=k.fetchers.get(Ur),os=Js(void 0,Eo?Eo.data:void 0);k.fetchers.set(Ur,os),ht(Ur),Xe.controller&&I.set(Ur,Xe.controller)}),We({fetchers:new Map(k.fetchers)});let zr=()=>ka.forEach(Xe=>ht(Xe.key));we.signal.addEventListener("abort",zr);let{loaderResults:Lr,fetcherResults:Fe}=await fa(Ln,ka,hn,te);if(we.signal.aborted)return;if(we.signal.removeEventListener("abort",zr),C.delete(w),I.delete(w),ka.forEach(Xe=>I.delete(Xe.key)),k.fetchers.has(w)){let Xe=Va(Ve.data);k.fetchers.set(w,Xe)}let Rt=Ul(Lr);if(Rt)return bt(hn,Rt.result,!1,{preventScrollReset:ie});if(Rt=Ul(Fe),Rt)return q.add(Rt.key),bt(hn,Rt.result,!1,{preventScrollReset:ie});let{loaderData:aa,errors:Yt}=xy(k,ta,Lr,void 0,ka,Fe);ci(En),k.navigation.state==="loading"&&En>be?(Ie(Y,"Expected pending action"),Ne&&Ne.abort(),Jn(k.navigation.location,{matches:ta,loaderData:aa,errors:Yt,fetchers:new Map(k.fetchers)})):(We({errors:Yt,loaderData:Sy(k.loaderData,aa,ta,Yt),fetchers:new Map(k.fetchers)}),_=!1)}async function da(w,N,L,$,te,xe,se,ie,oe){let ve=k.fetchers.get(w);Gt(w,Js(oe,ve?ve.data:void 0),{flushSync:se});let Re=new AbortController,we=Yi(t.history,L,Re.signal);if(xe){let Ve=await wn($,new URL(we.url).pathname,we.signal,w);if(Ve.type==="aborted")return;if(Ve.type==="error"){rn(w,N,Ve.error,{flushSync:se});return}else if(Ve.matches)$=Ve.matches;else{rn(w,N,Yn(404,{pathname:L}),{flushSync:se});return}}let Je=Vl($,L);I.set(w,Re);let Ye=pe,xt=Fi(d,f,we,$,Je,o,te),wt=(await Ta(we,xt,te,w))[Je.route.id];if(I.get(w)===Re&&I.delete(w),!we.signal.aborted){if(ee.has(w)){Gt(w,Va(void 0));return}if(ai(wt))if(be>Ye){Gt(w,Va(void 0));return}else{q.add(w),await bt(we,wt,!1,{preventScrollReset:ie});return}if(Mn(wt)){rn(w,N,wt.error);return}Gt(w,Va(wt.data))}}async function bt(w,N,L,{submission:$,fetcherSubmission:te,preventScrollReset:xe,replace:se}={}){L||(re?.resolve(),re=null),N.response.headers.has("X-Remix-Revalidate")&&(_=!0);let ie=N.response.headers.get("Location");Ie(ie,"Expected a Location header on the redirect Response"),ie=vy(ie,new URL(w.url),g,t.history);let oe=uo(k.location,ie,{_isRedirect:!0});if(i){let xt=!1;if(N.response.headers.has("X-Remix-Reload-Document"))xt=!0;else if(Tf(ie)){const St=Mv(ie,!0);xt=St.origin!==a.location.origin||Zn(St.pathname,g)==null}if(xt){se?a.location.replace(ie):a.location.assign(ie);return}}Ne=null;let ve=se===!0||N.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Re,formAction:we,formEncType:Je}=k.navigation;!$&&!te&&Re&&we&&Je&&($=Ty(k.navigation));let Ye=$||te;if(Qw.has(N.response.status)&&Ye&&nn(Ye.formMethod))await dn(ve,oe,{submission:{...Ye,formAction:ie},preventScrollReset:xe||Oe,enableViewTransition:L?Ee:void 0});else{let xt=Md(oe,$);await dn(ve,oe,{overrideNavigation:xt,fetcherSubmission:te,preventScrollReset:xe||Oe,enableViewTransition:L?Ee:void 0})}}async function Ta(w,N,L,$){let te,xe={};try{te=await Ww(x,w,N,$,L,!1)}catch(se){return N.filter(ie=>ie.shouldLoad).forEach(ie=>{xe[ie.route.id]={type:"error",error:se}}),xe}if(w.signal.aborted)return xe;if(!nn(w.method))for(let se of N){if(te[se.route.id]?.type==="error")break;!te.hasOwnProperty(se.route.id)&&!k.loaderData.hasOwnProperty(se.route.id)&&(!k.errors||!k.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,ie]of Object.entries(te))if(cE(ie)){let oe=ie.result;xe[se]={type:"redirect",response:aE(oe,w,se,N,g)}}else xe[se]=await nE(ie);return xe}async function fa(w,N,L,$){let te=Ta(L,w,$,null),xe=Promise.all(N.map(async oe=>{if(oe.matches&&oe.match&&oe.request&&oe.controller){let Re=(await Ta(oe.request,oe.matches,$,oe.key))[oe.match.route.id];return{[oe.key]:Re}}else return Promise.resolve({[oe.key]:{type:"error",error:Yn(404,{pathname:oe.path})}})})),se=await te,ie=(await xe).reduce((oe,ve)=>Object.assign(oe,ve),{});return{loaderResults:se,fetcherResults:ie}}function Xa(){_=!0,P.forEach((w,N)=>{I.has(N)&&F.add(N),ht(N)})}function Gt(w,N,L={}){k.fetchers.set(w,N),We({fetchers:new Map(k.fetchers)},{flushSync:(L&&L.flushSync)===!0})}function rn(w,N,L,$={}){let te=Sr(k.matches,N);jn(w),We({errors:{[te.route.id]:L},fetchers:new Map(k.fetchers)},{flushSync:($&&$.flushSync)===!0})}function Dn(w){return Z.set(w,(Z.get(w)||0)+1),ee.has(w)&&ee.delete(w),k.fetchers.get(w)||Kw}function li(w,N){ht(w,N?.reason),Gt(w,Va(null))}function jn(w){let N=k.fetchers.get(w);I.has(w)&&!(N&&N.state==="loading"&&C.has(w))&&ht(w),P.delete(w),C.delete(w),q.delete(w),ee.delete(w),F.delete(w),k.fetchers.delete(w)}function Ca(w){let N=(Z.get(w)||0)-1;N<=0?(Z.delete(w),ee.add(w)):Z.set(w,N),We({fetchers:new Map(k.fetchers)})}function ht(w,N){let L=I.get(w);L&&(L.abort(N),I.delete(w))}function fn(w){for(let N of w){let L=Dn(N),$=Va(L.data);k.fetchers.set(N,$)}}function Ut(){let w=[],N=!1;for(let L of q){let $=k.fetchers.get(L);Ie($,`Expected fetcher: ${L}`),$.state==="loading"&&(q.delete(L),w.push(L),N=!0)}return fn(w),N}function ci(w){let N=[];for(let[L,$]of C)if($<w){let te=k.fetchers.get(L);Ie(te,`Expected fetcher: ${L}`),te.state==="loading"&&(ht(L),C.delete(L),N.push(L))}return fn(N),N.length>0}function jr(w,N){let L=k.blockers.get(w)||$s;return J.get(w)!==N&&J.set(w,N),L}function Sn(w){k.blockers.delete(w),J.delete(w)}function Wn(w,N){let L=k.blockers.get(w)||$s;Ie(L.state==="unblocked"&&N.state==="blocked"||L.state==="blocked"&&N.state==="blocked"||L.state==="blocked"&&N.state==="proceeding"||L.state==="blocked"&&N.state==="unblocked"||L.state==="proceeding"&&N.state==="unblocked",`Invalid blocker state transition: ${L.state} -> ${N.state}`);let $=new Map(k.blockers);$.set(w,N),We({blockers:$})}function Aa({currentLocation:w,nextLocation:N,historyAction:L}){if(J.size===0)return;J.size>1&&Lt(!1,"A router only supports one blocker at a time");let $=Array.from(J.entries()),[te,xe]=$[$.length-1],se=k.blockers.get(te);if(!(se&&se.state==="proceeding")&&xe({currentLocation:w,nextLocation:N,historyAction:L}))return te}function ea(w){let N=Yn(404,{pathname:w}),L=y||h,{matches:$,route:te}=Ll(L);return{notFoundMatches:$,route:te,error:N}}function zn(w,N,L){if(j=w,K=N,U=L||null,!H&&k.navigation===Od){H=!0;let $=Ct(k.location,k.matches);$!=null&&We({restoreScrollPosition:$})}return()=>{j=null,K=null,U=null}}function _e(w,N){return U&&U(w,N.map($=>gw($,k.loaderData)))||w.key}function dt(w,N){if(j&&K){let L=_e(w,N);j[L]=K()}}function Ct(w,N){if(j){let L=_e(w,N),$=j[L];if(typeof $=="number")return $}return null}function At(w,N,L){if(t.patchRoutesOnNavigation)if(w){if(Object.keys(w[0].params).length>0)return{active:!0,matches:ro(N,L,g,!0)}}else return{active:!0,matches:ro(N,L,g,!0)||[]};return{active:!1,matches:null}}async function wn(w,N,L,$){if(!t.patchRoutesOnNavigation)return{type:"success",matches:w};let te=w;for(;;){let xe=y==null,se=y||h,ie=f;try{await t.patchRoutesOnNavigation({signal:L,path:N,matches:te,fetcherKey:$,patch:(Re,we)=>{L.aborted||my(Re,we,se,ie,d,!1)}})}catch(Re){return{type:"error",error:Re,partialMatches:te}}finally{xe&&!L.aborted&&(h=[...h])}if(L.aborted)return{type:"aborted"};let oe=xr(se,N,g),ve=null;if(oe){if(Object.keys(oe[0].params).length===0)return{type:"success",matches:oe};if(ve=ro(se,N,g,!0),!(ve&&te.length<ve.length&&ft(te,ve.slice(0,te.length))))return{type:"success",matches:oe}}if(ve||(ve=ro(se,N,g,!0)),!ve||ft(te,ve))return{type:"success",matches:null};te=ve}}function ft(w,N){return w.length===N.length&&w.every((L,$)=>L.route.id===N[$].route.id)}function en(w){f={},y=fo(w,d,void 0,f)}function Ra(w,N,L=!1){let $=y==null;my(w,N,y||h,f,d,L),$&&(h=[...h],We({}))}return fe={get basename(){return g},get future(){return v},get state(){return k},get routes(){return h},get window(){return a},initialize:Pe,subscribe:an,enableScrollRestoration:zn,navigate:un,fetch:Dr,revalidate:_r,createHref:w=>t.history.createHref(w),encodeLocation:w=>t.history.encodeLocation(w),getFetcher:Dn,resetFetcher:li,deleteFetcher:Ca,dispose:Qt,getBlocker:jr,deleteBlocker:Sn,patchRoutes:Ra,_internalFetchControllers:I,_internalSetRoutes:en,_internalSetStateDoNotUseOrYouWillBreakYourApp(w){We(w)}},t.unstable_instrumentations&&(fe=zw(fe,t.unstable_instrumentations.map(w=>w.router).filter(Boolean))),fe}function Vw(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function Zd(t,a,i,o,c,d){let f,h;if(c){f=[];for(let g of a)if(f.push(g),g.route.id===c){h=g;break}}else f=a,h=a[a.length-1];let y=Af(o||".",Cf(f),Zn(t.pathname,i)||t.pathname,d==="path");if(o==null&&(y.search=t.search,y.hash=t.hash),(o==null||o===""||o===".")&&h){let g=Nf(y.search);if(h.route.index&&!g)y.search=y.search?y.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&g){let x=new URLSearchParams(y.search),v=x.getAll("index");x.delete("index"),v.filter(R=>R).forEach(R=>x.append("index",R));let E=x.toString();y.search=E?`?${E}`:""}}return i!=="/"&&(y.pathname=Nw({basename:i,pathname:y.pathname})),Sa(y)}function fy(t,a,i){if(!i||!Vw(i))return{path:a};if(i.formMethod&&!fE(i.formMethod))return{path:a,error:Yn(405,{method:i.formMethod})};let o=()=>({path:a,error:Yn(400,{type:"invalid-body"})}),d=(i.formMethod||"get").toUpperCase(),f=Xv(a);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!nn(d))return o();let v=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((E,[R,j])=>`${E}${R}=${j}
11
- `,""):String(i.body);return{path:a,submission:{formMethod:d,formAction:f,formEncType:i.formEncType,formData:void 0,json:void 0,text:v}}}else if(i.formEncType==="application/json"){if(!nn(d))return o();try{let v=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:a,submission:{formMethod:d,formAction:f,formEncType:i.formEncType,formData:void 0,json:v,text:void 0}}}catch{return o()}}}Ie(typeof FormData=="function","FormData is not available in this environment");let h,y;if(i.formData)h=Wd(i.formData),y=i.formData;else if(i.body instanceof FormData)h=Wd(i.body),y=i.body;else if(i.body instanceof URLSearchParams)h=i.body,y=by(h);else if(i.body==null)h=new URLSearchParams,y=new FormData;else try{h=new URLSearchParams(i.body),y=by(h)}catch{return o()}let g={formMethod:d,formAction:f,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:y,json:void 0,text:void 0};if(nn(g.formMethod))return{path:a,submission:g};let x=kr(a);return t&&x.search&&Nf(x.search)&&h.append("index",""),x.search=`?${h}`,{path:Sa(x),submission:g}}function hy(t,a,i,o,c,d,f,h,y,g,x,v,E,R,j,U,K,H,Q,W,me){let he=W?Mn(W[1])?W[1].error:W[1].data:void 0,fe=c.createURL(d.location),k=c.createURL(y),Y;if(x&&d.errors){let Ce=Object.keys(d.errors)[0];Y=f.findIndex(_=>_.route.id===Ce)}else if(W&&Mn(W[1])){let Ce=W[0];Y=f.findIndex(_=>_.route.id===Ce)-1}let re=W?W[1].statusCode:void 0,Oe=re&&re>=400,Ne={currentUrl:fe,currentParams:d.matches[0]?.params||{},nextUrl:k,nextParams:f[0].params,...h,actionResult:he,actionStatus:re},Ee=vo(f),je=f.map((Ce,_)=>{let{route:F}=Ce,I=null;if(Y!=null&&_>Y?I=!1:F.lazy?I=!0:Rf(F)?x?I=$d(F,d.loaderData,d.errors):Fw(d.loaderData,d.matches[_],Ce)&&(I=!0):I=!1,I!==null)return Jd(i,o,t,Ee,Ce,g,a,I);let pe=!1;typeof me=="boolean"?pe=me:Oe?pe=!1:(v||fe.pathname+fe.search===k.pathname+k.search||fe.search!==k.search||Xw(d.matches[_],Ce))&&(pe=!0);let be={...Ne,defaultShouldRevalidate:pe},C=oo(Ce,be);return Jd(i,o,t,Ee,Ce,g,a,C,be,me)}),Ue=[];return j.forEach((Ce,_)=>{if(x||!f.some(Z=>Z.route.id===Ce.routeId)||R.has(_))return;let F=d.fetchers.get(_),I=F&&F.state!=="idle"&&F.data===void 0,pe=xr(K,Ce.path,H);if(!pe){if(Q&&I)return;Ue.push({key:_,routeId:Ce.routeId,path:Ce.path,matches:null,match:null,request:null,controller:null});return}if(U.has(_))return;let be=Vl(pe,Ce.path),C=new AbortController,q=Yi(c,Ce.path,C.signal),P=null;if(E.has(_))E.delete(_),P=Fi(i,o,q,pe,be,g,a);else if(I)v&&(P=Fi(i,o,q,pe,be,g,a));else{let Z;typeof me=="boolean"?Z=me:Oe?Z=!1:Z=v;let ee={...Ne,defaultShouldRevalidate:Z};oo(be,ee)&&(P=Fi(i,o,q,pe,be,g,a,ee))}P&&Ue.push({key:_,routeId:Ce.routeId,path:Ce.path,matches:P,match:be,request:q,controller:C})}),{dsMatches:je,revalidatingFetchers:Ue}}function Rf(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function $d(t,a,i){if(t.lazy)return!0;if(!Rf(t))return!1;let o=a!=null&&t.id in a,c=i!=null&&i[t.id]!==void 0;return!o&&c?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!o&&!c}function Fw(t,a,i){let o=!a||i.route.id!==a.route.id,c=!t.hasOwnProperty(i.route.id);return o||c}function Xw(t,a){let i=t.route.path;return t.pathname!==a.pathname||i!=null&&i.endsWith("*")&&t.params["*"]!==a.params["*"]}function oo(t,a){if(t.route.shouldRevalidate){let i=t.route.shouldRevalidate(a);if(typeof i=="boolean")return i}return a.defaultShouldRevalidate}function my(t,a,i,o,c,d){let f;if(t){let g=o[t];Ie(g,`No route found to patch children into: routeId = ${t}`),g.children||(g.children=[]),f=g.children}else f=i;let h=[],y=[];if(a.forEach(g=>{let x=f.find(v=>Kv(g,v));x?y.push({existingRoute:x,newRoute:g}):h.push(g)}),h.length>0){let g=fo(h,c,[t||"_","patch",String(f?.length||"0")],o);f.push(...g)}if(d&&y.length>0)for(let g=0;g<y.length;g++){let{existingRoute:x,newRoute:v}=y[g],E=x,[R]=fo([v],c,[],{},!0);Object.assign(E,{element:R.element?R.element:E.element,errorElement:R.errorElement?R.errorElement:E.errorElement,hydrateFallbackElement:R.hydrateFallbackElement?R.hydrateFallbackElement:E.hydrateFallbackElement})}}function Kv(t,a){return"id"in t&&"id"in a&&t.id===a.id?!0:t.index===a.index&&t.path===a.path&&t.caseSensitive===a.caseSensitive?(!t.children||t.children.length===0)&&(!a.children||a.children.length===0)?!0:t.children.every((i,o)=>a.children?.some(c=>Kv(i,c))):!1}var py=new WeakMap,Gv=({key:t,route:a,manifest:i,mapRouteProperties:o})=>{let c=i[a.id];if(Ie(c,"No route found in manifest"),!c.lazy||typeof c.lazy!="object")return;let d=c.lazy[t];if(!d)return;let f=py.get(c);f||(f={},py.set(c,f));let h=f[t];if(h)return h;let y=(async()=>{let g=fw(t),v=c[t]!==void 0&&t!=="hasErrorBoundary";if(g)Lt(!g,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),f[t]=Promise.resolve();else if(v)Lt(!1,`Route "${c.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let E=await d();E!=null&&(Object.assign(c,{[t]:E}),Object.assign(c,o(c)))}typeof c.lazy=="object"&&(c.lazy[t]=void 0,Object.values(c.lazy).every(E=>E===void 0)&&(c.lazy=void 0))})();return f[t]=y,y},gy=new WeakMap;function Zw(t,a,i,o,c){let d=i[t.id];if(Ie(d,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let x=gy.get(d);if(x)return{lazyRoutePromise:x,lazyHandlerPromise:x};let v=(async()=>{Ie(typeof t.lazy=="function","No lazy route function found");let E=await t.lazy(),R={};for(let j in E){let U=E[j];if(U===void 0)continue;let K=mw(j),Q=d[j]!==void 0&&j!=="hasErrorBoundary";K?Lt(!K,"Route property "+j+" is not a supported property to be returned from a lazy route function. This property will be ignored."):Q?Lt(!Q,`Route "${d.id}" has a static property "${j}" defined but its lazy function is also returning a value for this property. The lazy route property "${j}" will be ignored.`):R[j]=U}Object.assign(d,R),Object.assign(d,{...o(d),lazy:void 0})})();return gy.set(d,v),v.catch(()=>{}),{lazyRoutePromise:v,lazyHandlerPromise:v}}let f=Object.keys(t.lazy),h=[],y;for(let x of f){if(c&&c.includes(x))continue;let v=Gv({key:x,route:t,manifest:i,mapRouteProperties:o});v&&(h.push(v),x===a&&(y=v))}let g=h.length>0?Promise.all(h).then(()=>{}):void 0;return g?.catch(()=>{}),y?.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:y}}async function yy(t){let a=t.matches.filter(c=>c.shouldLoad),i={};return(await Promise.all(a.map(c=>c.resolve()))).forEach((c,d)=>{i[a[d].route.id]=c}),i}async function $w(t){return t.matches.some(a=>a.route.middleware)?Yv(t,()=>yy(t)):yy(t)}function Yv(t,a){return Jw(t,a,o=>{if(dE(o))throw o;return o},oE,i);function i(o,c,d){if(d)return Promise.resolve(Object.assign(d.value,{[c]:{type:"error",result:o}}));{let{matches:f}=t,h=Math.min(Math.max(f.findIndex(g=>g.route.id===c),0),Math.max(f.findIndex(g=>g.shouldCallHandler()),0)),y=Sr(f,f[h].route.id).route.id;return Promise.resolve({[y]:{type:"error",result:o}})}}}async function Jw(t,a,i,o,c){let{matches:d,request:f,params:h,context:y,unstable_pattern:g}=t,x=d.flatMap(E=>E.route.middleware?E.route.middleware.map(R=>[E.route.id,R]):[]);return await Vv({request:f,params:h,context:y,unstable_pattern:g},x,a,i,o,c)}async function Vv(t,a,i,o,c,d,f=0){let{request:h}=t;if(h.signal.aborted)throw h.signal.reason??new Error(`Request aborted: ${h.method} ${h.url}`);let y=a[f];if(!y)return await i();let[g,x]=y,v,E=async()=>{if(v)throw new Error("You may only call `next()` once per middleware");try{return v={value:await Vv(t,a,i,o,c,d,f+1)},v.value}catch(R){return v={value:await d(R,g,v)},v.value}};try{let R=await x(t,E),j=R!=null?o(R):void 0;return c(j)?j:v?j??v.value:(v={value:await E()},v.value)}catch(R){return await d(R,g,v)}}function Fv(t,a,i,o,c){let d=Gv({key:"middleware",route:o.route,manifest:a,mapRouteProperties:t}),f=Zw(o.route,nn(i.method)?"action":"loader",a,t,c);return{middleware:d,route:f.lazyRoutePromise,handler:f.lazyHandlerPromise}}function Jd(t,a,i,o,c,d,f,h,y=null,g){let x=!1,v=Fv(t,a,i,c,d);return{...c,_lazyPromises:v,shouldLoad:h,shouldRevalidateArgs:y,shouldCallHandler(E){return x=!0,y?typeof g=="boolean"?oo(c,{...y,defaultShouldRevalidate:g}):typeof E=="boolean"?oo(c,{...y,defaultShouldRevalidate:E}):oo(c,y):h},resolve(E){let{lazy:R,loader:j,middleware:U}=c.route,K=x||h||E&&!nn(i.method)&&(R||j),H=U&&U.length>0&&!j&&!R;return K&&(nn(i.method)||!H)?eE({request:i,unstable_pattern:o,match:c,lazyHandlerPromise:v?.handler,lazyRoutePromise:v?.route,handlerOverride:E,scopedContext:f}):Promise.resolve({type:"data",result:void 0})}}}function Fi(t,a,i,o,c,d,f,h=null){return o.map(y=>y.route.id!==c.route.id?{...y,shouldLoad:!1,shouldRevalidateArgs:h,shouldCallHandler:()=>!1,_lazyPromises:Fv(t,a,i,y,d),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Jd(t,a,i,vo(o),y,d,f,!0,h))}async function Ww(t,a,i,o,c,d){i.some(g=>g._lazyPromises?.middleware)&&await Promise.all(i.map(g=>g._lazyPromises?.middleware));let f={request:a,unstable_pattern:vo(i),params:i[0].params,context:c,matches:i},y=await t({...f,fetcherKey:o,runClientMiddleware:g=>{let x=f;return Yv(x,()=>g({...x,fetcherKey:o,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(i.flatMap(g=>[g._lazyPromises?.handler,g._lazyPromises?.route]))}catch{}return y}async function eE({request:t,unstable_pattern:a,match:i,lazyHandlerPromise:o,lazyRoutePromise:c,handlerOverride:d,scopedContext:f}){let h,y,g=nn(t.method),x=g?"action":"loader",v=E=>{let R,j=new Promise((H,Q)=>R=Q);y=()=>R(),t.signal.addEventListener("abort",y);let U=H=>typeof E!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${x}" [routeId: ${i.route.id}]`)):E({request:t,unstable_pattern:a,params:i.params,context:f},...H!==void 0?[H]:[]),K=(async()=>{try{return{type:"data",result:await(d?d(Q=>U(Q)):U())}}catch(H){return{type:"error",result:H}}})();return Promise.race([K,j])};try{let E=g?i.route.action:i.route.loader;if(o||c)if(E){let R,[j]=await Promise.all([v(E).catch(U=>{R=U}),o,c]);if(R!==void 0)throw R;h=j}else{await o;let R=g?i.route.action:i.route.loader;if(R)[h]=await Promise.all([v(R),c]);else if(x==="action"){let j=new URL(t.url),U=j.pathname+j.search;throw Yn(405,{method:t.method,pathname:U,routeId:i.route.id})}else return{type:"data",result:void 0}}else if(E)h=await v(E);else{let R=new URL(t.url),j=R.pathname+R.search;throw Yn(404,{pathname:j})}}catch(E){return{type:"error",result:E}}finally{y&&t.signal.removeEventListener("abort",y)}return h}async function tE(t){let a=t.headers.get("Content-Type");return a&&/\bapplication\/json\b/.test(a)?t.body==null?null:t.json():t.text()}async function nE(t){let{result:a,type:i}=t;if(kf(a)){let o;try{o=await tE(a)}catch(c){return{type:"error",error:c}}return i==="error"?{type:"error",error:new yo(a.status,a.statusText,o),statusCode:a.status,headers:a.headers}:{type:"data",data:o,statusCode:a.status,headers:a.headers}}return i==="error"?Ey(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:sE(a),statusCode:ho(a)?a.status:void 0,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:a,statusCode:ho(a)?a.status:void 0}:Ey(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 aE(t,a,i,o,c){let d=t.headers.get("Location");if(Ie(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!Tf(d)){let f=o.slice(0,o.findIndex(h=>h.route.id===i)+1);d=Zd(new URL(a.url),f,c,d),t.headers.set("Location",d)}return t}function vy(t,a,i,o){let c=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Tf(t)){let d=t,f=d.startsWith("//")?new URL(a.protocol+d):new URL(d);if(c.includes(f.protocol))throw new Error("Invalid redirect location");let h=Zn(f.pathname,i)!=null;if(f.origin===a.origin&&h)return f.pathname+f.search+f.hash}try{let d=o.createURL(t);if(c.includes(d.protocol))throw new Error("Invalid redirect location")}catch{}return t}function Yi(t,a,i,o){let c=t.createURL(Xv(a)).toString(),d={signal:i};if(o&&nn(o.formMethod)){let{formMethod:f,formEncType:h}=o;d.method=f.toUpperCase(),h==="application/json"?(d.headers=new Headers({"Content-Type":h}),d.body=JSON.stringify(o.json)):h==="text/plain"?d.body=o.text:h==="application/x-www-form-urlencoded"&&o.formData?d.body=Wd(o.formData):d.body=o.formData}return new Request(c,d)}function Wd(t){let a=new URLSearchParams;for(let[i,o]of t.entries())a.append(i,typeof o=="string"?o:o.name);return a}function by(t){let a=new FormData;for(let[i,o]of t.entries())a.append(i,o);return a}function rE(t,a,i,o=!1,c=!1){let d={},f=null,h,y=!1,g={},x=i&&Mn(i[1])?i[1].error:void 0;return t.forEach(v=>{if(!(v.route.id in a))return;let E=v.route.id,R=a[E];if(Ie(!ai(R),"Cannot handle redirect results in processLoaderData"),Mn(R)){let j=R.error;if(x!==void 0&&(j=x,x=void 0),f=f||{},c)f[E]=j;else{let U=Sr(t,E);f[U.route.id]==null&&(f[U.route.id]=j)}o||(d[E]=Qv),y||(y=!0,h=ho(R.error)?R.error.status:500),R.headers&&(g[E]=R.headers)}else d[E]=R.data,R.statusCode&&R.statusCode!==200&&!y&&(h=R.statusCode),R.headers&&(g[E]=R.headers)}),x!==void 0&&i&&(f={[i[0]]:x},i[2]&&(d[i[2]]=void 0)),{loaderData:d,errors:f,statusCode:h||200,loaderHeaders:g}}function xy(t,a,i,o,c,d){let{loaderData:f,errors:h}=rE(a,i,o);return c.filter(y=>!y.matches||y.matches.some(g=>g.shouldLoad)).forEach(y=>{let{key:g,match:x,controller:v}=y;if(v&&v.signal.aborted)return;let E=d[g];if(Ie(E,"Did not find corresponding fetcher result"),Mn(E)){let R=Sr(t.matches,x?.route.id);h&&h[R.route.id]||(h={...h,[R.route.id]:E.error}),t.fetchers.delete(g)}else if(ai(E))Ie(!1,"Unhandled fetcher revalidation redirect");else{let R=Va(E.data);t.fetchers.set(g,R)}}),{loaderData:f,errors:h}}function Sy(t,a,i,o){let c=Object.entries(a).filter(([,d])=>d!==Qv).reduce((d,[f,h])=>(d[f]=h,d),{});for(let d of i){let f=d.route.id;if(!a.hasOwnProperty(f)&&t.hasOwnProperty(f)&&d.route.loader&&(c[f]=t[f]),o&&o.hasOwnProperty(f))break}return c}function wy(t){return t?Mn(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function Sr(t,a){return(a?t.slice(0,t.findIndex(o=>o.route.id===a)+1):[...t]).reverse().find(o=>o.route.hasErrorBoundary===!0)||t[0]}function Ll(t){let a=t.length===1?t[0]:t.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:a}],route:a}}function Yn(t,{pathname:a,routeId:i,method:o,type:c,message:d}={}){let f="Unknown Server Error",h="Unknown @remix-run/router error";return t===400?(f="Bad Request",o&&a&&i?h=`You made a ${o} request to "${a}" but did not provide a \`loader\` for route "${i}", so there is no way to handle the request.`:c==="invalid-body"&&(h="Unable to encode submission body")):t===403?(f="Forbidden",h=`Route "${i}" does not match URL "${a}"`):t===404?(f="Not Found",h=`No route matches URL "${a}"`):t===405&&(f="Method Not Allowed",o&&a&&i?h=`You made a ${o.toUpperCase()} request to "${a}" but did not provide an \`action\` for route "${i}", so there is no way to handle the request.`:o&&(h=`Invalid request method "${o.toUpperCase()}"`)),new yo(t||500,f,new Error(h),!0)}function Ul(t){let a=Object.entries(t);for(let i=a.length-1;i>=0;i--){let[o,c]=a[i];if(ai(c))return{key:o,result:c}}}function Xv(t){let a=typeof t=="string"?kr(t):t;return Sa({...a,hash:""})}function iE(t,a){return t.pathname!==a.pathname||t.search!==a.search?!1:t.hash===""?a.hash!=="":t.hash===a.hash?!0:a.hash!==""}function sE(t){return new yo(t.init?.status??500,t.init?.statusText??"Internal Server Error",t.data)}function oE(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([a,i])=>typeof a=="string"&&lE(i))}function lE(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function cE(t){return kf(t.result)&&Iv.has(t.result.status)}function Mn(t){return t.type==="error"}function ai(t){return(t&&t.type)==="redirect"}function Ey(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function kf(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function uE(t){return Iv.has(t)}function dE(t){return kf(t)&&uE(t.status)&&t.headers.has("Location")}function fE(t){return Hw.has(t.toUpperCase())}function nn(t){return Pw.has(t.toUpperCase())}function Nf(t){return new URLSearchParams(t).getAll("index").some(a=>a==="")}function Vl(t,a){let i=typeof a=="string"?kr(a).search:a.search;if(t[t.length-1].route.index&&Nf(i||""))return t[t.length-1];let o=Lv(t);return o[o.length-1]}function Ty(t){let{formMethod:a,formAction:i,formEncType:o,text:c,formData:d,json:f}=t;if(!(!a||!i||!o)){if(c!=null)return{formMethod:a,formAction:i,formEncType:o,formData:void 0,json:void 0,text:c};if(d!=null)return{formMethod:a,formAction:i,formEncType:o,formData:d,json:void 0,text:void 0};if(f!==void 0)return{formMethod:a,formAction:i,formEncType:o,formData:void 0,json:f,text:void 0}}}function Md(t,a){return a?{state:"loading",location:t,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function hE(t,a){return{state:"submitting",location:t,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function Js(t,a){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.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 mE(t,a){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:a?a.data:void 0}}function Va(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function pE(t,a){try{let i=t.sessionStorage.getItem(Hv);if(i){let o=JSON.parse(i);for(let[c,d]of Object.entries(o||{}))d&&Array.isArray(d)&&a.set(c,new Set(d||[]))}}catch{}}function gE(t,a){if(a.size>0){let i={};for(let[o,c]of a)i[o]=[...c];try{t.sessionStorage.setItem(Hv,JSON.stringify(i))}catch(o){Lt(!1,`Failed to save applied view transitions in sessionStorage (${o}).`)}}}function Cy(){let t,a,i=new Promise((o,c)=>{t=async d=>{o(d);try{await i}catch{}},a=async d=>{c(d);try{await i}catch{}}});return{promise:i,resolve:t,reject:a}}var oi=S.createContext(null);oi.displayName="DataRouter";var bo=S.createContext(null);bo.displayName="DataRouterState";var Zv=S.createContext(!1);function yE(){return S.useContext(Zv)}var _f=S.createContext({isTransitioning:!1});_f.displayName="ViewTransition";var $v=S.createContext(new Map);$v.displayName="Fetchers";var vE=S.createContext(null);vE.displayName="Await";var $n=S.createContext(null);$n.displayName="Navigation";var uc=S.createContext(null);uc.displayName="Location";var ua=S.createContext({outlet:null,matches:[],isDataRoute:!1});ua.displayName="Route";var Of=S.createContext(null);Of.displayName="RouteError";var Jv="REACT_ROUTER_ERROR",bE="REDIRECT",xE="ROUTE_ERROR_RESPONSE";function SE(t){if(t.startsWith(`${Jv}:${bE}:{`))try{let a=JSON.parse(t.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 wE(t){if(t.startsWith(`${Jv}:${xE}:{`))try{let a=JSON.parse(t.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new yo(a.status,a.statusText,a.data)}catch{}}function EE(t,{relative:a}={}){Ie(xo(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:o}=S.useContext($n),{hash:c,pathname:d,search:f}=So(t,{relative:a}),h=d;return i!=="/"&&(h=d==="/"?i:ba([i,d])),o.createHref({pathname:h,search:f,hash:c})}function xo(){return S.useContext(uc)!=null}function Nr(){return Ie(xo(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(uc).location}var Wv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function eb(t){S.useContext($n).static||S.useLayoutEffect(t)}function Mf(){let{isDataRoute:t}=S.useContext(ua);return t?BE():TE()}function TE(){Ie(xo(),"useNavigate() may be used only in the context of a <Router> component.");let t=S.useContext(oi),{basename:a,navigator:i}=S.useContext($n),{matches:o}=S.useContext(ua),{pathname:c}=Nr(),d=JSON.stringify(Cf(o)),f=S.useRef(!1);return eb(()=>{f.current=!0}),S.useCallback((y,g={})=>{if(Lt(f.current,Wv),!f.current)return;if(typeof y=="number"){i.go(y);return}let x=Af(y,JSON.parse(d),c,g.relative==="path");t==null&&a!=="/"&&(x.pathname=x.pathname==="/"?a:ba([a,x.pathname])),(g.replace?i.replace:i.push)(x,g.state,g)},[a,i,d,c,t])}var CE=S.createContext(null);function AE(t){let a=S.useContext(ua).outlet;return S.useMemo(()=>a&&S.createElement(CE.Provider,{value:t},a),[a,t])}function RE(){let{matches:t}=S.useContext(ua),a=t[t.length-1];return a?a.params:{}}function So(t,{relative:a}={}){let{matches:i}=S.useContext(ua),{pathname:o}=Nr(),c=JSON.stringify(Cf(i));return S.useMemo(()=>Af(t,JSON.parse(c),o,a==="path"),[t,c,o,a])}function kE(t,a,i,o,c){Ie(xo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=S.useContext($n),{matches:f}=S.useContext(ua),h=f[f.length-1],y=h?h.params:{},g=h?h.pathname:"/",x=h?h.pathnameBase:"/",v=h&&h.route;{let Q=v&&v.path||"";ab(g,!v||Q.endsWith("*")||Q.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${Q}">) 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
-
13
- Please change the parent <Route path="${Q}"> to <Route path="${Q==="/"?"*":`${Q}/*`}">.`)}let E=Nr(),R;R=E;let j=R.pathname||"/",U=j;if(x!=="/"){let Q=x.replace(/^\//,"").split("/");U="/"+j.replace(/^\//,"").split("/").slice(Q.length).join("/")}let K=xr(t,{pathname:U});return Lt(v||K!=null,`No routes matched location "${R.pathname}${R.search}${R.hash}" `),Lt(K==null||K[K.length-1].route.element!==void 0||K[K.length-1].route.Component!==void 0||K[K.length-1].route.lazy!==void 0,`Matched leaf route at location "${R.pathname}${R.search}${R.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.`),DE(K&&K.map(Q=>Object.assign({},Q,{params:Object.assign({},y,Q.params),pathname:ba([x,d.encodeLocation?d.encodeLocation(Q.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Q.pathname]),pathnameBase:Q.pathnameBase==="/"?x:ba([x,d.encodeLocation?d.encodeLocation(Q.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Q.pathnameBase])})),f,i,o,c)}function NE(){let t=nb(),a=ho(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),i=t instanceof Error?t.stack:null,o="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:o},d={padding:"2px 4px",backgroundColor:o},f=null;return console.error("Error handled by React Router default ErrorBoundary:",t),f=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:d},"ErrorBoundary")," or"," ",S.createElement("code",{style:d},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),i?S.createElement("pre",{style:c},i):null,f)}var _E=S.createElement(NE,null),tb=class extends S.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,a){return a.location!==t.location||a.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:a.error,location:a.location,revalidation:t.revalidation||a.revalidation}}componentDidCatch(t,a){this.props.onError?this.props.onError(t,a):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const i=wE(t.digest);i&&(t=i)}let a=t!==void 0?S.createElement(ua.Provider,{value:this.props.routeContext},S.createElement(Of.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?S.createElement(OE,{error:t},a):a}};tb.contextType=Zv;var Dd=new WeakMap;function OE({children:t,error:a}){let{basename:i}=S.useContext($n);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let o=SE(a.digest);if(o){let c=Dd.get(a);if(c)throw c;let d=Bv(o.location,i);if(Uv&&!Dd.get(a))if(d.isExternal||o.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:o.replace}));throw Dd.set(a,f),f}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return t}function ME({routeContext:t,match:a,children:i}){let o=S.useContext(oi);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(ua.Provider,{value:t},i)}function DE(t,a=[],i=null,o=null,c=null){if(t==null){if(!i)return null;if(i.errors)t=i.matches;else if(a.length===0&&!i.initialized&&i.matches.length>0)t=i.matches;else return null}let d=t,f=i?.errors;if(f!=null){let x=d.findIndex(v=>v.route.id&&f?.[v.route.id]!==void 0);Ie(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),d=d.slice(0,Math.min(d.length,x+1))}let h=!1,y=-1;if(i)for(let x=0;x<d.length;x++){let v=d[x];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(y=x),v.route.id){let{loaderData:E,errors:R}=i,j=v.route.loader&&!E.hasOwnProperty(v.route.id)&&(!R||R[v.route.id]===void 0);if(v.route.lazy||j){h=!0,y>=0?d=d.slice(0,y+1):d=[d[0]];break}}}let g=i&&o?(x,v)=>{o(x,{location:i.location,params:i.matches?.[0]?.params??{},unstable_pattern:vo(i.matches),errorInfo:v})}:void 0;return d.reduceRight((x,v,E)=>{let R,j=!1,U=null,K=null;i&&(R=f&&v.route.id?f[v.route.id]:void 0,U=v.route.errorElement||_E,h&&(y<0&&E===0?(ab("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,K=null):y===E&&(j=!0,K=v.route.hydrateFallbackElement||null)));let H=a.concat(d.slice(0,E+1)),Q=()=>{let W;return R?W=U:j?W=K:v.route.Component?W=S.createElement(v.route.Component,null):v.route.element?W=v.route.element:W=x,S.createElement(ME,{match:v,routeContext:{outlet:x,matches:H,isDataRoute:i!=null},children:W})};return i&&(v.route.ErrorBoundary||v.route.errorElement||E===0)?S.createElement(tb,{location:i.location,revalidation:i.revalidation,component:U,error:R,children:Q(),routeContext:{outlet:null,matches:H,isDataRoute:!0},onError:g}):Q()},null)}function Df(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jE(t){let a=S.useContext(oi);return Ie(a,Df(t)),a}function zE(t){let a=S.useContext(bo);return Ie(a,Df(t)),a}function LE(t){let a=S.useContext(ua);return Ie(a,Df(t)),a}function jf(t){let a=LE(t),i=a.matches[a.matches.length-1];return Ie(i.route.id,`${t} can only be used on routes that contain a unique "id"`),i.route.id}function UE(){return jf("useRouteId")}function nb(){let t=S.useContext(Of),a=zE("useRouteError"),i=jf("useRouteError");return t!==void 0?t:a.errors?.[i]}function BE(){let{router:t}=jE("useNavigate"),a=jf("useNavigate"),i=S.useRef(!1);return eb(()=>{i.current=!0}),S.useCallback(async(c,d={})=>{Lt(i.current,Wv),i.current&&(typeof c=="number"?await t.navigate(c):await t.navigate(c,{fromRouteId:a,...d}))},[t,a])}var Ay={};function ab(t,a,i){!a&&!Ay[t]&&(Ay[t]=!0,Lt(!1,i))}var Ry={};function ky(t,a){!t&&!Ry[a]&&(Ry[a]=!0,console.warn(a))}var qE="useOptimistic",Ny=yf[qE],PE=()=>{};function IE(t){return Ny?Ny(t):[t,PE]}function HE(t){let a={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&Lt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:S.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&Lt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:S.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&Lt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:S.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),a}var QE=["HydrateFallback","hydrateFallbackElement"],KE=class{constructor(){this.status="pending",this.promise=new Promise((t,a)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",t(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",a(i))}})}};function GE({router:t,flushSync:a,onError:i,unstable_useTransitions:o}){o=yE()||o;let[d,f]=S.useState(t.state),[h,y]=IE(d),[g,x]=S.useState(),[v,E]=S.useState({isTransitioning:!1}),[R,j]=S.useState(),[U,K]=S.useState(),[H,Q]=S.useState(),W=S.useRef(new Map),me=S.useCallback((Y,{deletedFetchers:re,newErrors:Oe,flushSync:Ne,viewTransitionOpts:Ee})=>{Oe&&i&&Object.values(Oe).forEach(Ue=>i(Ue,{location:Y.location,params:Y.matches[0]?.params??{},unstable_pattern:vo(Y.matches)})),Y.fetchers.forEach((Ue,Ce)=>{Ue.data!==void 0&&W.current.set(Ce,Ue.data)}),re.forEach(Ue=>W.current.delete(Ue)),ky(Ne===!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 je=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(ky(Ee==null||je,"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."),!Ee||!je){a&&Ne?a(()=>f(Y)):o===!1?f(Y):S.startTransition(()=>{o===!0&&y(Ue=>_y(Ue,Y)),f(Y)});return}if(a&&Ne){a(()=>{U&&(R?.resolve(),U.skipTransition()),E({isTransitioning:!0,flushSync:!0,currentLocation:Ee.currentLocation,nextLocation:Ee.nextLocation})});let Ue=t.window.document.startViewTransition(()=>{a(()=>f(Y))});Ue.finished.finally(()=>{a(()=>{j(void 0),K(void 0),x(void 0),E({isTransitioning:!1})})}),a(()=>K(Ue));return}U?(R?.resolve(),U.skipTransition(),Q({state:Y,currentLocation:Ee.currentLocation,nextLocation:Ee.nextLocation})):(x(Y),E({isTransitioning:!0,flushSync:!1,currentLocation:Ee.currentLocation,nextLocation:Ee.nextLocation}))},[t.window,a,U,R,o,y,i]);S.useLayoutEffect(()=>t.subscribe(me),[t,me]),S.useEffect(()=>{v.isTransitioning&&!v.flushSync&&j(new KE)},[v]),S.useEffect(()=>{if(R&&g&&t.window){let Y=g,re=R.promise,Oe=t.window.document.startViewTransition(async()=>{o===!1?f(Y):S.startTransition(()=>{o===!0&&y(Ne=>_y(Ne,Y)),f(Y)}),await re});Oe.finished.finally(()=>{j(void 0),K(void 0),x(void 0),E({isTransitioning:!1})}),K(Oe)}},[g,R,t.window,o,y]),S.useEffect(()=>{R&&g&&h.location.key===g.location.key&&R.resolve()},[R,U,h.location,g]),S.useEffect(()=>{!v.isTransitioning&&H&&(x(H.state),E({isTransitioning:!0,flushSync:!1,currentLocation:H.currentLocation,nextLocation:H.nextLocation}),Q(void 0))},[v.isTransitioning,H]);let he=S.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:Y=>t.navigate(Y),push:(Y,re,Oe)=>t.navigate(Y,{state:re,preventScrollReset:Oe?.preventScrollReset}),replace:(Y,re,Oe)=>t.navigate(Y,{replace:!0,state:re,preventScrollReset:Oe?.preventScrollReset})}),[t]),fe=t.basename||"/",k=S.useMemo(()=>({router:t,navigator:he,static:!1,basename:fe,onError:i}),[t,he,fe,i]);return S.createElement(S.Fragment,null,S.createElement(oi.Provider,{value:k},S.createElement(bo.Provider,{value:h},S.createElement($v.Provider,{value:W.current},S.createElement(_f.Provider,{value:v},S.createElement(XE,{basename:fe,location:h.location,navigationType:h.historyAction,navigator:he,unstable_useTransitions:o},S.createElement(YE,{routes:t.routes,future:t.future,state:h,onError:i})))))),null)}function _y(t,a){return{...t,navigation:a.navigation.state!=="idle"?a.navigation:t.navigation,revalidation:a.revalidation!=="idle"?a.revalidation:t.revalidation,actionData:a.navigation.state!=="submitting"?a.actionData:t.actionData,fetchers:a.fetchers}}var YE=S.memo(VE);function VE({routes:t,future:a,state:i,onError:o}){return kE(t,void 0,i,o,a)}function FE(t){return AE(t.context)}function XE({basename:t="/",children:a=null,location:i,navigationType:o="POP",navigator:c,static:d=!1,unstable_useTransitions:f}){Ie(!xo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=t.replace(/^\/*/,"/"),y=S.useMemo(()=>({basename:h,navigator:c,static:d,unstable_useTransitions:f,future:{}}),[h,c,d,f]);typeof i=="string"&&(i=kr(i));let{pathname:g="/",search:x="",hash:v="",state:E=null,key:R="default"}=i,j=S.useMemo(()=>{let U=Zn(g,h);return U==null?null:{location:{pathname:U,search:x,hash:v,state:E,key:R},navigationType:o}},[h,g,x,v,E,R,o]);return Lt(j!=null,`<Router basename="${h}"> is not able to match the URL "${g}${x}${v}" because it does not start with the basename, so the <Router> won't render anything.`),j==null?null:S.createElement($n.Provider,{value:y},S.createElement(uc.Provider,{children:a,value:j}))}var Fl="get",Xl="application/x-www-form-urlencoded";function dc(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function ZE(t){return dc(t)&&t.tagName.toLowerCase()==="button"}function $E(t){return dc(t)&&t.tagName.toLowerCase()==="form"}function JE(t){return dc(t)&&t.tagName.toLowerCase()==="input"}function WE(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function eT(t,a){return t.button===0&&(!a||a==="_self")&&!WE(t)}var Bl=null;function tT(){if(Bl===null)try{new FormData(document.createElement("form"),0),Bl=!1}catch{Bl=!0}return Bl}var nT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function jd(t){return t!=null&&!nT.has(t)?(Lt(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Xl}"`),null):t}function aT(t,a){let i,o,c,d,f;if($E(t)){let h=t.getAttribute("action");o=h?Zn(h,a):null,i=t.getAttribute("method")||Fl,c=jd(t.getAttribute("enctype"))||Xl,d=new FormData(t)}else if(ZE(t)||JE(t)&&(t.type==="submit"||t.type==="image")){let h=t.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=t.getAttribute("formaction")||h.getAttribute("action");if(o=y?Zn(y,a):null,i=t.getAttribute("formmethod")||h.getAttribute("method")||Fl,c=jd(t.getAttribute("formenctype"))||jd(h.getAttribute("enctype"))||Xl,d=new FormData(h,t),!tT()){let{name:g,type:x,value:v}=t;if(x==="image"){let E=g?`${g}.`:"";d.append(`${E}x`,"0"),d.append(`${E}y`,"0")}else g&&d.append(g,v)}}else{if(dc(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Fl,o=null,c=Xl,f=t}return d&&c==="text/plain"&&(f=d,d=void 0),{action:o,method:i.toLowerCase(),encType:c,formData:d,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function zf(t,a){if(t===!1||t===null||typeof t>"u")throw new Error(a)}function rT(t,a,i,o){let c=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return i?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${o}`:c.pathname=`${c.pathname}.${o}`:c.pathname==="/"?c.pathname=`_root.${o}`:a&&Zn(c.pathname,a)==="/"?c.pathname=`${a.replace(/\/$/,"")}/_root.${o}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${o}`,c}async function iT(t,a){if(t.id in a)return a[t.id];try{let i=await import(t.module);return a[t.id]=i,i}catch(i){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function sT(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function oT(t,a,i){let o=await Promise.all(t.map(async c=>{let d=a.routes[c.route.id];if(d){let f=await iT(d,i);return f.links?f.links():[]}return[]}));return dT(o.flat(1).filter(sT).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function Oy(t,a,i,o,c,d){let f=(y,g)=>i[g]?y.route.id!==i[g].route.id:!0,h=(y,g)=>i[g].pathname!==y.pathname||i[g].route.path?.endsWith("*")&&i[g].params["*"]!==y.params["*"];return d==="assets"?a.filter((y,g)=>f(y,g)||h(y,g)):d==="data"?a.filter((y,g)=>{let x=o.routes[y.route.id];if(!x||!x.hasLoader)return!1;if(f(y,g)||h(y,g))return!0;if(y.route.shouldRevalidate){let v=y.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:i[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function lT(t,a,{includeHydrateFallback:i}={}){return cT(t.map(o=>{let c=a.routes[o.route.id];if(!c)return[];let d=[c.module];return c.clientActionModule&&(d=d.concat(c.clientActionModule)),c.clientLoaderModule&&(d=d.concat(c.clientLoaderModule)),i&&c.hydrateFallbackModule&&(d=d.concat(c.hydrateFallbackModule)),c.imports&&(d=d.concat(c.imports)),d}).flat(1))}function cT(t){return[...new Set(t)]}function uT(t){let a={},i=Object.keys(t).sort();for(let o of i)a[o]=t[o];return a}function dT(t,a){let i=new Set;return new Set(a),t.reduce((o,c)=>{let d=JSON.stringify(uT(c));return i.has(d)||(i.add(d),o.push({key:d,link:c})),o},[])}function rb(){let t=S.useContext(oi);return zf(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function fT(){let t=S.useContext(bo);return zf(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Lf=S.createContext(void 0);Lf.displayName="FrameworkContext";function ib(){let t=S.useContext(Lf);return zf(t,"You must render this element inside a <HydratedRouter> element"),t}function hT(t,a){let i=S.useContext(Lf),[o,c]=S.useState(!1),[d,f]=S.useState(!1),{onFocus:h,onBlur:y,onMouseEnter:g,onMouseLeave:x,onTouchStart:v}=a,E=S.useRef(null);S.useEffect(()=>{if(t==="render"&&f(!0),t==="viewport"){let U=H=>{H.forEach(Q=>{f(Q.isIntersecting)})},K=new IntersectionObserver(U,{threshold:.5});return E.current&&K.observe(E.current),()=>{K.disconnect()}}},[t]),S.useEffect(()=>{if(o){let U=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(U)}}},[o]);let R=()=>{c(!0)},j=()=>{c(!1),f(!1)};return i?t!=="intent"?[d,E,{}]:[d,E,{onFocus:Ws(h,R),onBlur:Ws(y,j),onMouseEnter:Ws(g,R),onMouseLeave:Ws(x,j),onTouchStart:Ws(v,R)}]:[!1,E,{}]}function Ws(t,a){return i=>{t&&t(i),i.defaultPrevented||a(i)}}function mT({page:t,...a}){let{router:i}=rb(),o=S.useMemo(()=>xr(i.routes,t,i.basename),[i.routes,t,i.basename]);return o?S.createElement(gT,{page:t,matches:o,...a}):null}function pT(t){let{manifest:a,routeModules:i}=ib(),[o,c]=S.useState([]);return S.useEffect(()=>{let d=!1;return oT(t,a,i).then(f=>{d||c(f)}),()=>{d=!0}},[t,a,i]),o}function gT({page:t,matches:a,...i}){let o=Nr(),{future:c,manifest:d,routeModules:f}=ib(),{basename:h}=rb(),{loaderData:y,matches:g}=fT(),x=S.useMemo(()=>Oy(t,a,g,d,o,"data"),[t,a,g,d,o]),v=S.useMemo(()=>Oy(t,a,g,d,o,"assets"),[t,a,g,d,o]),E=S.useMemo(()=>{if(t===o.pathname+o.search+o.hash)return[];let U=new Set,K=!1;if(a.forEach(Q=>{let W=d.routes[Q.route.id];!W||!W.hasLoader||(!x.some(me=>me.route.id===Q.route.id)&&Q.route.id in y&&f[Q.route.id]?.shouldRevalidate||W.hasClientLoader?K=!0:U.add(Q.route.id))}),U.size===0)return[];let H=rT(t,h,c.unstable_trailingSlashAwareDataRequests,"data");return K&&U.size>0&&H.searchParams.set("_routes",a.filter(Q=>U.has(Q.route.id)).map(Q=>Q.route.id).join(",")),[H.pathname+H.search]},[h,c.unstable_trailingSlashAwareDataRequests,y,o,d,x,a,t,f]),R=S.useMemo(()=>lT(v,d),[v,d]),j=pT(v);return S.createElement(S.Fragment,null,E.map(U=>S.createElement("link",{key:U,rel:"prefetch",as:"fetch",href:U,...i})),R.map(U=>S.createElement("link",{key:U,rel:"modulepreload",href:U,...i})),j.map(({key:U,link:K})=>S.createElement("link",{key:U,nonce:i.nonce,...K,crossOrigin:K.crossOrigin??i.crossOrigin})))}function yT(...t){return a=>{t.forEach(i=>{typeof i=="function"?i(a):i!=null&&(i.current=a)})}}var vT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{vT&&(window.__reactRouterVersion="7.13.0")}catch{}function bT(t,a){return Yw({basename:a?.basename,getContext:a?.getContext,future:a?.future,history:lw({window:a?.window}),hydrationData:xT(),routes:t,mapRouteProperties:HE,hydrationRouteProperties:QE,dataStrategy:a?.dataStrategy,patchRoutesOnNavigation:a?.patchRoutesOnNavigation,window:a?.window,unstable_instrumentations:a?.unstable_instrumentations}).initialize()}function xT(){let t=window?.__staticRouterHydrationData;return t&&t.errors&&(t={...t,errors:ST(t.errors)}),t}function ST(t){if(!t)return null;let a=Object.entries(t),i={};for(let[o,c]of a)if(c&&c.__type==="RouteErrorResponse")i[o]=new yo(c.status,c.statusText,c.data,c.internal===!0);else if(c&&c.__type==="Error"){if(c.__subType){let d=window[c.__subType];if(typeof d=="function")try{let f=new d(c.message);f.stack="",i[o]=f}catch{}}if(i[o]==null){let d=new Error(c.message);d.stack="",i[o]=d}}else i[o]=c;return i}var sb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ob=S.forwardRef(function({onClick:a,discover:i="render",prefetch:o="none",relative:c,reloadDocument:d,replace:f,state:h,target:y,to:g,preventScrollReset:x,viewTransition:v,unstable_defaultShouldRevalidate:E,...R},j){let{basename:U,unstable_useTransitions:K}=S.useContext($n),H=typeof g=="string"&&sb.test(g),Q=Bv(g,U);g=Q.to;let W=EE(g,{relative:c}),[me,he,fe]=hT(o,R),k=CT(g,{replace:f,state:h,target:y,preventScrollReset:x,relative:c,viewTransition:v,unstable_defaultShouldRevalidate:E,unstable_useTransitions:K});function Y(Oe){a&&a(Oe),Oe.defaultPrevented||k(Oe)}let re=S.createElement("a",{...R,...fe,href:Q.absoluteURL||W,onClick:Q.isExternal||d?a:Y,ref:yT(j,he),target:y,"data-discover":!H&&i==="render"?"true":void 0});return me&&!H?S.createElement(S.Fragment,null,re,S.createElement(mT,{page:W})):re});ob.displayName="Link";var wT=S.forwardRef(function({"aria-current":a="page",caseSensitive:i=!1,className:o="",end:c=!1,style:d,to:f,viewTransition:h,children:y,...g},x){let v=So(f,{relative:g.relative}),E=Nr(),R=S.useContext(bo),{navigator:j,basename:U}=S.useContext($n),K=R!=null&&_T(v)&&h===!0,H=j.encodeLocation?j.encodeLocation(v).pathname:v.pathname,Q=E.pathname,W=R&&R.navigation&&R.navigation.location?R.navigation.location.pathname:null;i||(Q=Q.toLowerCase(),W=W?W.toLowerCase():null,H=H.toLowerCase()),W&&U&&(W=Zn(W,U)||W);const me=H!=="/"&&H.endsWith("/")?H.length-1:H.length;let he=Q===H||!c&&Q.startsWith(H)&&Q.charAt(me)==="/",fe=W!=null&&(W===H||!c&&W.startsWith(H)&&W.charAt(H.length)==="/"),k={isActive:he,isPending:fe,isTransitioning:K},Y=he?a:void 0,re;typeof o=="function"?re=o(k):re=[o,he?"active":null,fe?"pending":null,K?"transitioning":null].filter(Boolean).join(" ");let Oe=typeof d=="function"?d(k):d;return S.createElement(ob,{...g,"aria-current":Y,className:re,ref:x,style:Oe,to:f,viewTransition:h},typeof y=="function"?y(k):y)});wT.displayName="NavLink";var ET=S.forwardRef(({discover:t="render",fetcherKey:a,navigate:i,reloadDocument:o,replace:c,state:d,method:f=Fl,action:h,onSubmit:y,relative:g,preventScrollReset:x,viewTransition:v,unstable_defaultShouldRevalidate:E,...R},j)=>{let{unstable_useTransitions:U}=S.useContext($n),K=kT(),H=NT(h,{relative:g}),Q=f.toLowerCase()==="get"?"get":"post",W=typeof h=="string"&&sb.test(h),me=he=>{if(y&&y(he),he.defaultPrevented)return;he.preventDefault();let fe=he.nativeEvent.submitter,k=fe?.getAttribute("formmethod")||f,Y=()=>K(fe||he.currentTarget,{fetcherKey:a,method:k,navigate:i,replace:c,state:d,relative:g,preventScrollReset:x,viewTransition:v,unstable_defaultShouldRevalidate:E});U&&i!==!1?S.startTransition(()=>Y()):Y()};return S.createElement("form",{ref:j,method:Q,action:H,onSubmit:o?y:me,...R,"data-discover":!W&&t==="render"?"true":void 0})});ET.displayName="Form";function TT(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lb(t){let a=S.useContext(oi);return Ie(a,TT(t)),a}function CT(t,{target:a,replace:i,state:o,preventScrollReset:c,relative:d,viewTransition:f,unstable_defaultShouldRevalidate:h,unstable_useTransitions:y}={}){let g=Mf(),x=Nr(),v=So(t,{relative:d});return S.useCallback(E=>{if(eT(E,a)){E.preventDefault();let R=i!==void 0?i:Sa(x)===Sa(v),j=()=>g(t,{replace:R,state:o,preventScrollReset:c,relative:d,viewTransition:f,unstable_defaultShouldRevalidate:h});y?S.startTransition(()=>j()):j()}},[x,g,v,i,o,a,t,c,d,f,h,y])}var AT=0,RT=()=>`__${String(++AT)}__`;function kT(){let{router:t}=lb("useSubmit"),{basename:a}=S.useContext($n),i=UE(),o=t.fetch,c=t.navigate;return S.useCallback(async(d,f={})=>{let{action:h,method:y,encType:g,formData:x,body:v}=aT(d,a);if(f.navigate===!1){let E=f.fetcherKey||RT();await o(E,i,f.action||h,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:x,body:v,formMethod:f.method||y,formEncType:f.encType||g,flushSync:f.flushSync})}else await c(f.action||h,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:x,body:v,formMethod:f.method||y,formEncType:f.encType||g,replace:f.replace,state:f.state,fromRouteId:i,flushSync:f.flushSync,viewTransition:f.viewTransition})},[o,c,a,i])}function NT(t,{relative:a}={}){let{basename:i}=S.useContext($n),o=S.useContext(ua);Ie(o,"useFormAction must be used inside a RouteContext");let[c]=o.matches.slice(-1),d={...So(t||".",{relative:a})},f=Nr();if(t==null){d.search=f.search;let h=new URLSearchParams(d.search),y=h.getAll("index");if(y.some(x=>x==="")){h.delete("index"),y.filter(v=>v).forEach(v=>h.append("index",v));let x=h.toString();d.search=x?`?${x}`:""}}return(!t||t===".")&&c.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(d.pathname=d.pathname==="/"?i:ba([i,d.pathname])),Sa(d)}function _T(t,{relative:a}={}){let i=S.useContext(_f);Ie(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=lb("useViewTransitionState"),c=So(t,{relative:a});if(!i.isTransitioning)return!1;let d=Zn(i.currentLocation.pathname,o)||i.currentLocation.pathname,f=Zn(i.nextLocation.pathname,o)||i.nextLocation.pathname;return sc(c.pathname,f)!=null||sc(c.pathname,d)!=null}function OT(t){return S.createElement(GE,{flushSync:Ef.flushSync,...t})}const MT="modulepreload",DT=function(t){return"/"+t},My={},cn=function(a,i,o){let c=Promise.resolve();if(i&&i.length>0){let y=function(g){return Promise.all(g.map(x=>Promise.resolve(x).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),h=f?.nonce||f?.getAttribute("nonce");c=y(i.map(g=>{if(g=DT(g),g in My)return;My[g]=!0;const x=g.endsWith(".css"),v=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${v}`))return;const E=document.createElement("link");if(E.rel=x?"stylesheet":MT,x||(E.as="script"),E.crossOrigin="",E.href=g,h&&E.setAttribute("nonce",h),document.head.appendChild(E),x)return new Promise((R,j)=>{E.addEventListener("load",R),E.addEventListener("error",()=>j(new Error(`Unable to preload CSS for ${g}`)))})}))}function d(f){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=f,window.dispatchEvent(h),!h.defaultPrevented)throw f}return c.then(f=>{for(const h of f||[])h.status==="rejected"&&d(h.reason);return a().catch(d)})};const cb=(...t)=>t.filter((a,i,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===i).join(" ").trim();const jT=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const zT=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,i,o)=>o?o.toUpperCase():i.toLowerCase());const Dy=t=>{const a=zT(t);return a.charAt(0).toUpperCase()+a.slice(1)};var LT={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 UT=t=>{for(const a in t)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};const BT=S.forwardRef(({color:t="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:c="",children:d,iconNode:f,...h},y)=>S.createElement("svg",{ref:y,...LT,width:a,height:a,stroke:t,strokeWidth:o?Number(i)*24/Number(a):i,className:cb("lucide",c),...!d&&!UT(h)&&{"aria-hidden":"true"},...h},[...f.map(([g,x])=>S.createElement(g,x)),...Array.isArray(d)?d:[d]]));const at=(t,a)=>{const i=S.forwardRef(({className:o,...c},d)=>S.createElement(BT,{ref:d,iconNode:a,className:cb(`lucide-${jT(Dy(t))}`,`lucide-${t}`,o),...c}));return i.displayName=Dy(t),i};const qT=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],PT=at("arrow-down",qT);const IT=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],HT=at("arrow-left",IT);const QT=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],KT=at("arrow-up",QT);const GT=[["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"}]],YT=at("bell",GT);const VT=[["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"}]],ub=at("bot",VT);const FT=[["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"}]],XT=at("cable",FT);const ZT=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],$T=at("chevron-right",ZT);const JT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],WT=at("circle-alert",JT);const eC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ji=at("circle-check",eC);const tC=[["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"}]],Uf=at("circle-dashed",tC);const nC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],db=at("circle-slash",nC);const aC=[["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"}]],fb=at("circle-x",aC);const rC=[["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"}]],hb=at("cpu",rC);const iC=[["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"}]],mb=at("download",iC);const sC=[["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"}]],oC=at("external-link",sC);const lC=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],cC=at("eye",lC);const uC=[["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"}]],dC=at("folder-git-2",uC);const fC=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],hC=at("git-branch",fC);const mC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ef=at("info",mC);const pC=[["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"}]],jy=at("languages",pC);const gC=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ar=at("loader-circle",gC);const yC=[["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"}]],vC=at("lock-keyhole",yC);const bC=[["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"}]],xC=at("refresh-cw",bC);const SC=[["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"}]],fc=at("rotate-ccw",SC);const wC=[["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"}]],EC=at("settings",wC);const TC=[["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"}]],CC=at("shield-check",TC);const AC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],RC=at("square",AC);const kC=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],NC=at("terminal",kC);const _C=[["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"}]],Rr=at("triangle-alert",_C);const OC=[["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"}]],MC=at("users",OC);const DC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Bf=at("x",DC),zy=t=>{let a;const i=new Set,o=(g,x)=>{const v=typeof g=="function"?g(a):g;if(!Object.is(v,a)){const E=a;a=x??(typeof v!="object"||v===null)?v:Object.assign({},a,v),i.forEach(R=>R(a,E))}},c=()=>a,h={setState:o,getState:c,getInitialState:()=>y,subscribe:g=>(i.add(g),()=>i.delete(g))},y=a=t(o,c,h);return h},jC=(t=>t?zy(t):zy),zC=t=>t;function LC(t,a=zC){const i=ne.useSyncExternalStore(t.subscribe,ne.useCallback(()=>a(t.getState()),[t,a]),ne.useCallback(()=>a(t.getInitialState()),[t,a]));return ne.useDebugValue(i),i}const Ly=t=>{const a=jC(t),i=o=>LC(a,o);return Object.assign(i,a),i},pb=(t=>t?Ly(t):Ly),io=pb(t=>({sidebarOpen:!0,theme:"system",settingsOpen:!1,settingsTab:"general",toggleSidebar:()=>t(a=>({sidebarOpen:!a.sidebarOpen})),setSidebarOpen:a=>t({sidebarOpen:a}),setTheme:a=>t({theme:a}),openSettings:a=>t({settingsOpen:!0,...a?{settingsTab:a}:{}}),closeSettings:()=>t({settingsOpen:!1}),setSettingsTab:a=>t({settingsTab:a})})),Uy="/api";function gb(t){return t.endsWith("/")?t.slice(0,-1):t}function yb(t){return!1}function UC(){return yb()?Uy:gb(Uy)}function BC(){return yb()?"":gb("")}const vb="tower:conflict-recovery:v1:",qC="tower:conflict-recovery-changed",mo=new Map;let Wi=!1;function wo(t){try{if(!t||t.length>256*1024)return;const a=t.split(".")[0].replace(/-/g,"+").replace(/_/g,"/"),i=JSON.parse(new TextDecoder().decode(Uint8Array.from(atob(a),o=>o.charCodeAt(0))));if(typeof i.actor=="string"&&typeof i.operationId=="string"&&i.context&&typeof i.context=="object")return i}catch{}}function VN(t){const a=wo(t);return a?[a.actor,a.operationId,a.context]:null}function bb(t){const a=wo(t.resolutionContextToken)?.context,i={...t};if(!a)return i;for(const o of["sourceWorkspaceId","targetWorkspaceId","sourceWorktreePath","targetWorktreePath","sourceBranch","targetBranch"])typeof a[o]=="string"&&a[o]&&(i[o]=a[o]);return(a.conflictOp==="MERGE"||a.conflictOp==="REBASE")&&(i.conflictOp=a.conflictOp),Array.isArray(a.conflictedFiles)&&a.conflictedFiles.every(o=>typeof o=="string")&&(i.conflictedFiles=a.conflictedFiles),typeof a.mergeAborted=="boolean"&&(i.mergeAborted=a.mergeAborted),(a.mergeStrategy==="squash"||a.mergeStrategy==="no_ff")&&(i.mergeStrategy=a.mergeStrategy),i}const xb=t=>`${vb}${t.actor}:${t.operationId}`;function Sb(){window.dispatchEvent(new Event(qC))}function PC(t,a){t=bb(t);const i=wo(t.resolutionContextToken);if(!i||i.actor==="unbound")return;const o=xb(i),c=mo.get(o),d={actor:i.actor,operationId:i.operationId,details:t,intent:"resolve_conflicts",savedAt:c?.savedAt??Date.now(),expiresAt:i.recovery?.expiresAt??i.expiresAt,receiverSessionId:a??c?.receiverSessionId};mo.set(o,d);try{sessionStorage.setItem(o,JSON.stringify(d)),Wi=!1}catch{Wi=!0}return Sb(),d}function FN(t){try{for(let a=0;a<sessionStorage.length;a++){const i=sessionStorage.key(a);if(i?.startsWith(`${vb}${t}:`))try{const o=JSON.parse(sessionStorage.getItem(i)),c=wo(o.details?.resolutionContextToken);o.actor===t&&o.intent==="resolve_conflicts"&&c?.actor===t&&c.operationId===o.operationId&&mo.set(i,{...o,details:bb(o.details)})}catch{Wi=!0}}}catch{Wi=!0}return[...mo.values()].filter(a=>a.actor===t).sort((a,i)=>i.savedAt-a.savedAt)}function XN(t){const a=wo(t);if(!a)return;const i=xb(a);mo.delete(i);try{sessionStorage.removeItem(i)}catch{Wi=!0}Sb()}function ZN(){return Wi}const IC=UC();class HC{baseUrl;constructor(a){this.baseUrl=a}async request(a,i={}){const{params:o,...c}=i;let d=`${this.baseUrl}${a}`;if(o){const y=new URLSearchParams(o);d+=`?${y.toString()}`}const f={...c.headers};c.body!==void 0&&(f["Content-Type"]="application/json");const h=await fetch(d,{...c,headers:f,credentials:c.credentials??"same-origin"});if(!h.ok){const y=await h.json().catch(()=>({}));throw h.status===409&&y.code==="MERGE_CONFLICT"&&(y.conflictOp==="MERGE"||y.conflictOp==="REBASE")&&Array.isArray(y.conflictedFiles)&&PC(y),new ns(h.status,typeof y.message=="string"?y.message:typeof y.error=="string"?y.error:"Request failed",y)}if(h.status!==204)return h.json()}get(a,i){return this.request(a,{...i,method:"GET"})}post(a,i,o){return this.request(a,{...o,method:"POST",body:i?JSON.stringify(i):void 0})}put(a,i,o){return this.request(a,{...o,method:"PUT",body:i?JSON.stringify(i):void 0})}patch(a,i,o){return this.request(a,{...o,method:"PATCH",body:i?JSON.stringify(i):void 0})}delete(a,i){return this.request(a,{...i,method:"DELETE"})}}class ns extends Error{status;details;constructor(a,i,o={}){super(i),this.name="ApiError",this.status=a,this.details=o}}const Be=new HC(IC),le={roomTranslations:{all:["room-translations"],scope:t=>["room-translations",t],summaries:t=>["room-translations",t,"summaries"],details:t=>["room-translations",t,"full"],full:(t,a,i,o,c)=>["room-translations",t,"full",a,i,o,c]},translationSettings:{detail:["translation-settings"]},sessionTranslations:{session:t=>["session-translations",t],blocks:(t,a)=>["session-translations",t,a]},projects:{all:["projects"],list:t=>["projects","list",t],detail:t=>["projects","detail",t],gitCapability:t=>["projects","gitCapability",t]},tasks:{all:["tasks"],boardAll:["tasks","board"],board:t=>["tasks","board",t],list:(t,a)=>["tasks","list",t,a],detail:t=>["tasks","detail",t],body:t=>["tasks","body",t],stats:t=>["tasks","stats",t]},workspaces:{all:["workspaces"],projectBranches:t=>["workspaces","project-branches",t],list:t=>["workspaces","list",t],setupProgress:t=>["workspaces","setup-progress",t],detail:t=>["workspaces","detail",t],diff:t=>["workspaces","diff",t],gitStatus:t=>["workspaces","gitStatus",t]},workspaceServices:{all:["workspace-services"],list:t=>["workspace-services","list",t],logs:(t,a)=>["workspace-services","logs",t,a]},previews:{all:["previews"],status:t=>["previews","status",t]},sessions:{all:["sessions"],detail:t=>["sessions","detail",t],runtime:t=>["sessions","runtime",t]},conversations:{all:["conversations"],list:t=>["conversations","list",t],detail:t=>["conversations","detail",t]},files:{all:["files"],tree:(t,a)=>["files","tree",t,a],content:(t,a)=>["files","content",t,a]},git:{all:["git"],changes:t=>["git","changes",t],diff:(t,a,i)=>["git","diff",t,a,i],log:t=>["git","log",t],commitFiles:(t,a)=>["git","commitFiles",t,a],commitDiff:(t,a,i)=>["git","commitDiff",t,a,i]},profiles:{all:["profiles"],defaults:["profiles","defaults"],agent:t=>["profiles","agent",t],variant:(t,a)=>["profiles","variant",t,a]},providers:{all:["providers"],capabilities:(t,a,i,o,c,d)=>["providers","capabilities",t??"",a??"",i??"",o??"",c??null,d??null],detail:t=>["providers","detail",t]},tunnel:{status:["tunnel","status"]},notifications:{settings:["notifications","settings"]},appSettings:{detail:["app-settings"]},accessAuth:{identityChange:["access-auth","identity-change"],conflictRecoveryIdentity:["conflict-recovery-identity"],status:["access-auth","status"],settings:["access-auth","settings"]},agentCli:{manifest:["agent-cli","manifest"],status:["agent-cli","status"],preview:t=>["agent-cli","preview",t],task:t=>["agent-cli","task",t],logs:t=>["agent-cli","logs",t]},system:{cursorAgentModels:["system","cursor-agent-models"],mcpConfig:["system","mcp-config"],slashCommandCatalog:(t,a)=>["system","slash-command-catalog",t??null,a??null],skillCatalog:(t,a)=>["system","skill-catalog",t??null,a??null]}};function QC(){return ln({queryKey:le.appSettings.detail,queryFn:()=>Be.get("/app-settings")})}function KC(){const t=rt();return gt({mutationFn:a=>Be.put("/app-settings",a),onSuccess:()=>{t.invalidateQueries({queryKey:le.appSettings.detail})}})}function $N(){return ln({queryKey:[...le.appSettings.detail,"commit-message-defaults"],queryFn:()=>Be.get("/app-settings/commit-message-defaults")})}const GC={"zh-CN":{"Search languages":"搜索语言","Search language or code…":"搜索语言名称或代码…","Saved custom language":"已保存的自定义语言","No matching languages":"没有匹配的语言","Language matches: {count}. Search to narrow the list.":"共匹配 {count} 项,输入名称或代码缩小范围。","Language directory: IANA language subtags and Unicode CLDR 48.1 regional variants. Saved custom values are preserved.":"目录包含 IANA 注册语言子标签及 Unicode CLDR 48.1 地区变体;保留已保存的自定义语言。","Search branches":"搜索分支","No matching branches":"没有匹配的分支","Refreshing branches":"正在刷新分支","{count} local branches":"共 {count} 个本地分支","{shown} of {total} local branches":"{shown} / {total} 个本地分支","Default base branch":"默认基础分支","New task and TeamRun main workspaces start from this branch. Existing workspaces keep their base branch.":"新建任务工作区和 TeamRun 主工作区将从此分支创建,已有工作区保留各自的基础分支。","Could not load branches. Refresh to try again.":"无法加载分支,请刷新重试。","Default base branch saved":"默认基础分支已保存","Save default base branch":"保存默认基础分支","Could not save the default base branch. Refresh and choose an existing local branch.":"默认基础分支保存失败,请刷新并选择已存在的本地分支。","Base branch for this workspace":"当前工作区的基础分支","Changing this base branch updates the comparison, update and merge target for this workspace only. Save and review the changes before merging.":"仅修改当前工作区的差异比较、更新及合并目标。保存后请重新审查变更,再确认合并。","Save base branch and review changes":"保存基础分支并审查变更","Workspace base branch saved. Review the changes before merging.":"工作区基础分支已保存,请重新审查变更后合并。","Review the changes and sync the base branch before submitting.":"请先审查变更、同步基础分支更新,再提交。","Team creation pending":"待创建团队","Team creation result unknown. Check the original request.":"团队创建结果待核对,请恢复原创建请求。","Check team creation":"核对创建结果",语言转换:"语言转换","Could not load translation settings.":"无法加载翻译设置。","Translate outgoing messages and Agent replies. Saving applies the global switch.":"转换发送消息与 Agent 回复。总开关在保存后生效。","Enable translation":"启用语言转换","When disabled, successful historical translations remain available. Pending messages are not sent automatically.":"关闭后仍可对照历史成功译文;待发消息不会自动发送原文。","Send target language":"发送目标语言","Reply display language":"回复显示目标语言","API base URL":"API 基础地址","OpenAI compatible base URL. The server appends /chat/completions.":"填写 OpenAI 兼容服务的基础地址,服务端会追加 /chat/completions。",Model:"模型","API key (write only)":"API Key(只写)","A stored credential is configured. Its value is never displayed.":"已配置凭据,不显示已存的 Key。","No stored credential is indicated. A service without credentials may already be configured.":"未显示已存凭据,也可能已配置为免凭据服务。","Keep saved credential choice":"保留已存凭据选择","Replace API key":"替换 API Key","Clear credential configuration":"清除凭据配置","Service without credentials":"免凭据服务","New API key":"新 API Key","Clearing prevents enabling and testing until a credential choice is configured.":"清除后需要重新配置凭据或选择免凭据,才能启用或测试。","Shared prompt template":"共用提示词模板","Both directions use this template. Include {{target_language}} and {{text}}; unknown variables are invalid.":"两个方向共用此模板,必须包含 {{target_language}} 和 {{text}},不支持其他变量。","Maximum translation concurrency (1–16)":"最大翻译并发数(1–16)","Test draft translation":"测试当前草稿","Sample text is sent to the configured translation service. Testing does not save settings or send messages to an Agent.":"示例正文会交给所配翻译服务。测试不会保存设置,也不会向 Agent 投递消息。","Test direction":"测试方向","Sample text":"示例正文","Testing…":"测试中…","Test translation":"测试翻译","Translation settings saved.":"翻译设置已保存。","Settings changed in another tab. Your draft is preserved. Reload saved settings to discard this draft.":"其他标签已修改设置,当前草稿已保留。可丢弃草稿,重新读取已存设置。","Discard draft and reload saved settings":"丢弃草稿并重新读取","Enter a new API key, or explicitly choose a service without credentials.":"请输入新 API Key,或明确选择免凭据服务。","Enter sample text to test.":"请输入用于测试的示例正文。","Concurrency must be an integer from 1 to 16.":"并发数必须为 1 到 16 的整数。","Enter an HTTP(S) base URL without credentials, query or fragment.":"请填写 HTTP(S) 基础地址,不包含凭据、查询参数或片段。","Enter a model and both target languages.":"请填写模型和两个目标语言。","The template must contain only {{target_language}} and {{text}}, including both variables.":"模板必须同时包含 {{target_language}} 和 {{text}},且不能使用其他变量。","Complete the translation configuration and credential choice.":"请补全翻译配置,并配置凭据或选择免凭据服务。","Translation credential was rejected. Check the API key.":"翻译服务拒绝了凭据,请检查 API Key。","Check the translation base URL and model.":"请检查翻译基础地址和模型。","Check the translation fields and credential choice.":"请检查翻译字段和凭据选择。","The translation request timed out. Try again.":"翻译请求超时,请重试。","Could not connect to the translation service.":"无法连接翻译服务。","The translation service is busy. Try again later.":"翻译服务繁忙,请稍后重试。","The translation queue is full. Try again later.":"翻译队列已满,请稍后重试。","Translation testing is temporarily unavailable.":"翻译测试暂不可用。","The translation request was cancelled.":"翻译请求已取消。","The translation text is too large.":"待翻译正文过长。","The translation changed protected content. The original is preserved.":"译文改动了受保护内容,已保留原文。","The translation service returned no usable text.":"翻译服务未返回可用正文。","The translation service returned incomplete text.":"翻译服务返回的正文不完整。","The translation response is too large.":"翻译结果过长。","The translation service returned an error. Try again later.":"翻译服务返回错误,请稍后重试。","An internal translation error occurred. Try again.":"翻译发生内部错误,请重试。","Translation retry limit reached. Try again manually.":"翻译自动重试次数或时限已用尽,请手动重试。","Translation is paused after a configuration error. Check the API key, base URL and model.":"翻译因配置错误暂停,请检查 API Key、基础地址和模型。","Translation is disabled. Enable it to retry.":"翻译功能已关闭,启用后可重试。","Translation was interrupted. Try again.":"翻译已中断,请重试。","The translation attempt expired. Try again.":"本次翻译已过期,请重试。","The original text changed. Retry the current text.":"原文已变更,请对当前正文重试。","The original message is no longer available.":"原消息已不可用。","The original message or translation attempt is no longer valid. Try again.":"原消息或本次翻译已失效,请重试。","Translation request failed. Check the service and try again.":"翻译请求失败,请检查服务后重试。",Original:"原文","Copy original":"复制原文","Copy displayed text":"复制当前正文",Translated:"译文","Copy failed.":"复制失败。","Translating…":"翻译中…","Waiting to retry translation":"等待重试翻译","Translation cancelled":"翻译已取消","Translation interrupted":"翻译已中断","Translation queue full":"翻译队列已满","Translation paused":"翻译已暂停","Retrying…":"重试中…","浏览器存储不可用或资料损坏;本页仅在内存中保留,刷新后可能无法恢复。请先保存操作资料。":"浏览器存储不可用或资料损坏;本页仅在内存中保留,刷新后可能无法恢复。请先保存操作资料。","无法确认当前身份,暂不展示已保存的冲突资料。":"无法确认当前身份,暂不展示已保存的冲突资料。","已保留原冲突资料;关闭弹窗后可在此重新打开。仅当前身份和本标签页可恢复,关闭标签页或清理浏览器数据会删除资料。":"已保留原冲突资料;关闭弹窗后可在此重新打开。仅当前身份和本标签页可恢复,关闭标签页或清理浏览器数据会删除资料。","恢复证明已过期;保留成果,在实际目标手工继续,或确认后明确中止并重做。已提交但结果未知的请求仍可核对原 UUID。":"恢复证明已过期;保留成果,在实际目标手工继续,或确认后明确中止并重做。已提交但结果未知的请求仍可核对原 UUID。",恢复截止时间:"恢复截止时间",未知:"未知",恢复上次冲突资料:"恢复上次冲突资料",清理本地操作资料:"清理本地操作资料","清理不会取消服务端已受理请求;结果未知时请先核对原提交。":"清理不会取消服务端已受理请求;结果未知时请先核对原提交。","重新核验仅读取 Git,不自动发送。现场变化(包括部分 stage)可能无法继续 AI 恢复;请保留成果,在实际目标手工继续,或确认后明确中止并重做原操作。":"重新核验仅读取 Git,不自动发送。现场变化(包括部分 stage)可能无法继续 AI 恢复;请保留成果,在实际目标手工继续,或确认后明确中止并重做原操作。",实际冲突目标目录:"实际冲突目标目录","结果未知或待重试的原提交将先使用原 Session、UUID 和原请求核对;明确未受理后才使用新凭据。":"结果未知或待重试的原提交将先使用原 Session、UUID 和原请求核对;明确未受理后才使用新凭据。","Waiting for translation":"等待翻译","Waiting for task input":"等待任务输入","Task input":"任务输入","Load more task inputs":"加载更早任务输入","Failed to restore pending messages":"待发消息恢复失败","Acceptance unknown; check or retry the same submission.":"受理结果待核对,请核对或重试同一条提交。","Retry original submission":"核对原提交","Acceptance unknown":"受理结果待核对","Submitting...":"正在提交...","已受理,等待发送到 Team Room":"已受理,等待发送到 Team Room","Waiting to send":"等待发送","Sent original":"已发送原文","Load earlier sent messages":"加载更早已发送消息","Queued, not sent":"已入队,尚未发送","Sending paused":"发送已暂停","Translation failed":"翻译失败","Delivery failed":"投递失败","Delivery result unknown. Verify before retrying.":"投递结果待核对,请核实后再重试。","Confirmed not sent: retry":"已确认未发送:重试投递","End operation (may already be received)":"结束此操作(Agent 可能已收到)","Retry translation":"重试翻译","Retry delivery":"重试投递","Send original":"发送原文","Delivery action failed. Refresh and try again.":"操作失败,请刷新状态后重试。","Actual sent text":"实际发送内容","Workspace base branch":"Workspace 基础分支","Choose the branch used for changes, updates and merges in an existing workspace.":"为已有 workspace 选择用于差异比较、更新和合并的基础分支。","Could not load workspace branches. Refresh to try again.":"无法加载 workspace 分支,请刷新重试。","No active worktree workspaces to configure.":"暂无可配置的活跃工作树 workspace。","Select a workspace":"选择 workspace","Available for active task and TeamRun main workspaces. Member workspaces follow their parent workspace.":"支持活跃的任务 workspace 和 TeamRun 主 workspace;成员 workspace 跟随父 workspace。","Base branch":"基础分支",Unavailable:"不可用","Saving changes the comparison, update and merge target for this workspace. Existing commits and files stay in place; review the changes before merging.":"保存后将更改此 workspace 的差异比较、更新及合并目标。已有提交和文件保持原状,合并前请重新审查变更。","Save base branch":"保存基础分支","Workspace base branch saved":"Workspace 基础分支已保存","Could not save the base branch. Refresh and try again.":"基础分支保存失败,请刷新重试。","Choose an existing local branch different from the workspace branch.":"请选择已存在且不同于 workspace 自身分支的本地分支。","The selected branch has no shared commit history with this workspace.":"所选分支与此 workspace 没有共同的提交历史。","Wait for the Agent to finish or stop it before changing the base branch.":"请等待 Agent 完成或停止运行后再修改基础分支。","Finish or abort the current Git operation before changing the base branch.":"请完成或中止当前 Git 操作后再修改基础分支。","The workspace changed. Refresh and select the base branch again.":"Workspace 已发生变化,请刷新后重新选择基础分支。","Only active workspaces can change base branch. Refresh the list.":"仅活跃的 workspace 支持修改基础分支,请刷新列表。","TeamRun member base branches are managed by their parent workspace.":"TeamRun 成员的基础分支由父 workspace 管理。","Execution permission":"执行权限","Ask for approval":"请求批准","Auto approve (sandbox)":"自动同意(沙箱)","Auto approve (full access)":"自动同意(完全访问)","Use native approvals. Already permitted actions can run without asking.":"遵循原生审批规则,已允许的操作可以直接执行。","Use the native sandbox and automatic review. Some actions can still require approval.":"使用原生沙箱与自动审阅,部分操作仍可能请求批准。","Codex auto-review may approve writes or destructive deletions outside the workspace, or network access, without a human approval card. Dangerous actions are not guaranteed to prompt you. The native sandbox does not fully isolate the host or MCP tools.":"Codex 原生自动审阅可能不弹人工审批卡片就批准工作区外写入、破坏性删除或网络访问。危险操作不保证弹卡;原生沙箱也不完整隔离宿主或 MCP 工具。","Agent executable is unavailable.":"Agent 可执行程序当前不可用。","Selected Provider is unavailable.":"所选 Provider 当前不可用。","No available Provider for this session.":"当前会话没有可用的 Provider。","Remove sandbox_workspace_write from Codex advanced settings before using automatic sandbox approval.":"使用 Codex 自动同意(沙箱)前,请移除高级配置中的 sandbox_workspace_write。","Use native broad approval and disable the configurable sandbox. Upstream rules still apply.":"使用原生广泛自动批准并关闭可配置沙箱,上游强制规则仍然生效。","Loading permission support…":"正在加载权限支持信息…","This Agent has no available execution permission mode.":"此 Agent 没有可用的执行权限档位。","Changes apply when a new runtime starts. Running sessions keep their launch mode.":"修改在新运行实例启动时生效,运行中的会话保留启动模式。","This Agent does not support this runtime.":"该 Agent 不支持此运行协议。","The current headless CLI integration cannot forward native approval requests. Use ACP.":"当前非交互 CLI 接入无法转发原生审批请求,请使用 ACP。","A per-launch allowlist configuration has not been verified for Cursor ACP.":"Cursor ACP 尚未核实单次启动的人工审批配置。","This integration has no native sandbox permission mode.":"此接入方式没有原生沙箱权限模式。","A native sandbox mode has not been verified for this integration.":"此接入方式的原生沙箱档尚未核实。","Pi ordinary tools do not provide a complete approval gate.":"Pi 普通工具没有完整的审批机制。","Kiro V2/V3 trust configuration has not been verified for this integration.":"此接入方式的 Kiro V2/V3 信任配置尚未核实。","Your deployment does not allow this permission mode.":"当前部署或账号未开放此权限档位。","Legacy Codex permissions did not explicitly select the human reviewer. Select an execution permission mode.":"旧 Codex 配置没有明确选择人工审阅,请重新选择执行权限。","Legacy permission fields conflict with executionPermission":"旧权限字段与统一执行权限冲突。","Required permission: {mode}":"所需权限:{mode}",Settings:"设置",General:"通用",Back:"返回","Loading...":"加载中...","No options":"暂无选项","Processing...":"处理中...","Allow once":"本次批准","Reject once":"本次拒绝","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:"待开始",Priority:"优先级","Task priority":"任务优先级",紧急:"紧急",高:"高",普通:"普通",低:"低",优先级变更失败:"优先级变更失败",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:"预览","Open visualization":"打开可视化","Download file":"下载文件","Viewing agent visualization":"正在查看 Agent 可视化","Session file":"会话文件","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} 天前",now:"刚刚","{count}m":"{count} 分钟","{count}h":"{count} 小时","{count}d":"{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.":"启动失败,请重试","Failed to stop session. Refreshing status; check it and try again.":"停止会话失败。正在刷新状态,请确认后重试。",Files:"文件","No working directory":"未选择工作目录","Refresh file tree":"刷新文件树","Collapse file tree":"收起文件树","Shell {count}":"终端 {count}","New Terminal":"新终端","No terminals open":"暂无打开终端","Interactive terminals":"交互终端","Background services":"后台服务","Background service logs":"后台服务日志","Loading background services...":"正在加载后台服务...","Failed to load background services.":"加载后台服务失败。","No background services":"暂无后台服务","Select a background service":"选择一个后台服务","Loading service logs...":"正在加载服务日志...","Failed to refresh service logs.":"刷新服务日志失败。","Earlier log output is unavailable.":"较早的日志内容已不可用。","No logs yet":"暂无日志",Retry:"重试","Something went wrong":"出了点问题","Only rendering errors are caught here. Errors from event handlers, async callbacks or observers are not.":"此处只兜住渲染阶段抛出的错误;事件处理器、异步回调或 observer 中抛出的错误不会进入兜底。","This section hit a rendering error and was replaced by this message.":"这一区域渲染出错,已由本条提示替代。","Failed to display logs":"日志显示失败","The log view hit a rendering error. Retry renders the same data again, so it will fail again while the bad data is still there.":"日志视图渲染出错。重试只是重新渲染同一份数据,坏数据仍在时会再次出错。","This page could not be displayed. Go back to the task board and try again.":"这个页面无法显示。请返回任务看板后重试。","The interface hit a rendering error. Reload the page to continue.":"界面渲染出错,请重新加载页面后继续。","The interface could not be displayed. Reload the page to try again.":"界面无法显示,请重新加载页面后再试。","Reload page":"重新加载页面","Back to home":"返回首页",Command:"命令","Working directory":"工作目录",Started:"启动时间","Not started":"尚未启动",Exited:"已退出","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...","Creating worktree":"正在创建工作树","Creating session":"正在创建会话","Starting agent":"正在启动 Agent","Starting task":"正在启动任务","Agent start failed":"启动 Agent 失败","Preparing workspace":"准备工作空间","Run setup script":"执行 Setup 脚本","Running setup ({current}/{total})":"正在执行 Setup({current}/{total})","Setup complete":"Setup 完成","View setup output":"查看 Setup 输出","Hide setup output":"收起 Setup 输出","Setup failed":"Setup 失败","More details":"更多详情","Hide details":"收起详情","Retry start":"重试启动 Agent","Workspace setup is running in the background.":"工作空间正在后台准备。","启动 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:"工作中",Copy:"复制",Copied:"已复制",Clear:"清除",Dismiss:"关闭提示",Chart:"图表",Table:"表格",Expand:"展开",Collapse:"收起",Today:"今天",Total:"合计",Less:"少",More:"多","On track":"正常",Ahead:"领先","At risk":"有风险","Off track":"已延期","days overdue":"天已逾期","Due today":"今天到期","days left":"天后到期"},en:{语言转换:"Conversation translation","Could not load translation settings.":"Could not load translation settings.","Translate outgoing messages and Agent replies. Saving applies the global switch.":"Translate outgoing messages and Agent replies. Saving applies the global switch.","Enable translation":"Enable translation","When disabled, successful historical translations remain available. Pending messages are not sent automatically.":"When disabled, successful historical translations remain available. Pending messages are not sent automatically.","Send target language":"Send target language","Reply display language":"Reply display language","API base URL":"API base URL","OpenAI compatible base URL. The server appends /chat/completions.":"OpenAI compatible base URL. The server appends /chat/completions.",Model:"Model","API key (write only)":"API key (write only)","A stored credential is configured. Its value is never displayed.":"A stored credential is configured. Its value is never displayed.","No stored credential is indicated. A service without credentials may already be configured.":"No stored credential is indicated. A service without credentials may already be configured.","Keep saved credential choice":"Keep saved credential choice","Replace API key":"Replace API key","Clear credential configuration":"Clear credential configuration","Service without credentials":"Service without credentials","New API key":"New API key","Clearing prevents enabling and testing until a credential choice is configured.":"Clearing prevents enabling and testing until a credential choice is configured.","Shared prompt template":"Shared prompt template","Both directions use this template. Include {{target_language}} and {{text}}; unknown variables are invalid.":"Both directions use this template. Include {{target_language}} and {{text}}; unknown variables are invalid.","Maximum translation concurrency (1–16)":"Maximum translation concurrency (1–16)","Test draft translation":"Test draft translation","Sample text is sent to the configured translation service. Testing does not save settings or send messages to an Agent.":"Sample text is sent to the configured translation service. Testing does not save settings or send messages to an Agent.","Test direction":"Test direction","Sample text":"Sample text","Testing…":"Testing…","Test translation":"Test translation","Translation settings saved.":"Translation settings saved.","Settings changed in another tab. Your draft is preserved. Reload saved settings to discard this draft.":"Settings changed in another tab. Your draft is preserved. Reload saved settings to discard this draft.","Discard draft and reload saved settings":"Discard draft and reload saved settings","Enter a new API key, or explicitly choose a service without credentials.":"Enter a new API key, or explicitly choose a service without credentials.","Enter sample text to test.":"Enter sample text to test.","Concurrency must be an integer from 1 to 16.":"Concurrency must be an integer from 1 to 16.","Enter an HTTP(S) base URL without credentials, query or fragment.":"Enter an HTTP(S) base URL without credentials, query or fragment.","Enter a model and both target languages.":"Enter a model and both target languages.","The template must contain only {{target_language}} and {{text}}, including both variables.":"The template must contain only {{target_language}} and {{text}}, including both variables.","Complete the translation configuration and credential choice.":"Complete the translation configuration and credential choice.","Translation credential was rejected. Check the API key.":"Translation credential was rejected. Check the API key.","Check the translation base URL and model.":"Check the translation base URL and model.","Check the translation fields and credential choice.":"Check the translation fields and credential choice.","The translation request timed out. Try again.":"The translation request timed out. Try again.","Could not connect to the translation service.":"Could not connect to the translation service.","The translation service is busy. Try again later.":"The translation service is busy. Try again later.","The translation queue is full. Try again later.":"The translation queue is full. Try again later.","Translation testing is temporarily unavailable.":"Translation testing is temporarily unavailable.","The translation request was cancelled.":"The translation request was cancelled.","The translation text is too large.":"The translation text is too large.","The translation changed protected content. The original is preserved.":"The translation changed protected content. The original is preserved.","The translation service returned no usable text.":"The translation service returned no usable text.","The translation service returned incomplete text.":"The translation service returned incomplete text.","The translation response is too large.":"The translation response is too large.","The translation service returned an error. Try again later.":"The translation service returned an error. Try again later.","An internal translation error occurred. Try again.":"An internal translation error occurred. Try again.","Translation retry limit reached. Try again manually.":"Translation retry limit reached. Try again manually.","Translation is paused after a configuration error. Check the API key, base URL and model.":"Translation is paused after a configuration error. Check the API key, base URL and model.","Translation is disabled. Enable it to retry.":"Translation is disabled. Enable it to retry.","Translation was interrupted. Try again.":"Translation was interrupted. Try again.","The translation attempt expired. Try again.":"The translation attempt expired. Try again.","The original text changed. Retry the current text.":"The original text changed. Retry the current text.","The original message is no longer available.":"The original message is no longer available.","The original message or translation attempt is no longer valid. Try again.":"The original message or translation attempt is no longer valid. Try again.","Translation request failed. Check the service and try again.":"Translation request failed. Check the service and try again.",Original:"Original","Copy original":"Copy original","Copy displayed text":"Copy displayed text",Translated:"Translated","Copy failed.":"Copy failed.","Translating…":"Translating…","Waiting to retry translation":"Waiting to retry translation","Translation cancelled":"Translation cancelled","Translation interrupted":"Translation interrupted","Translation queue full":"Translation queue full","Translation paused":"Translation paused","Retrying…":"Retrying…","浏览器存储不可用或资料损坏;本页仅在内存中保留,刷新后可能无法恢复。请先保存操作资料。":"Browser storage is unavailable or damaged. This page retains evidence in memory only; refreshing may lose it. Save the operation details first.","无法确认当前身份,暂不展示已保存的冲突资料。":"Could not verify the current identity. Saved conflict details are hidden.","已保留原冲突资料;关闭弹窗后可在此重新打开。仅当前身份和本标签页可恢复,关闭标签页或清理浏览器数据会删除资料。":"Original conflict details are retained here after closing the dialog. Recovery is limited to this identity and tab. Closing the tab or clearing browser data removes them.","恢复证明已过期;保留成果,在实际目标手工继续,或确认后明确中止并重做。已提交但结果未知的请求仍可核对原 UUID。":"Recovery evidence expired. Preserve your work and continue manually at the actual target, or explicitly abort and redo after checking it. An uncertain submission can still be checked with its original UUID.",恢复截止时间:"Recovery deadline",未知:"Unknown",恢复上次冲突资料:"Reopen saved conflict details",清理本地操作资料:"Clear local operation details","清理不会取消服务端已受理请求;结果未知时请先核对原提交。":"Clearing local details does not cancel accepted server requests. Check uncertain submissions first.","重新核验仅读取 Git,不自动发送。现场变化(包括部分 stage)可能无法继续 AI 恢复;请保留成果,在实际目标手工继续,或确认后明确中止并重做原操作。":"Revalidation only reads Git and never sends automatically. Scene changes, including partial staging, may prevent AI recovery. Preserve your work and continue manually at the actual target, or explicitly abort and redo the original operation after checking it.",实际冲突目标目录:"Actual conflict target directory","结果未知或待重试的原提交将先使用原 Session、UUID 和原请求核对;明确未受理后才使用新凭据。":"The original submission is checked using its original Session, UUID and request. Refreshed credentials are used only after an explicit rejection.",设置:"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",Priority:"Priority","Task priority":"Task priority",紧急:"Urgent",普通:"Normal",优先级变更失败:"Failed to update task priority","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","已受理,等待发送到 Team Room":"Accepted, waiting to send 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","Fast 模式":"Fast mode","支持的模型速度约提升至 1.5 倍,并增加用量消耗。ChatGPT 登录消耗更多额度;API Key 按 Priority 处理计费。":"Supported models run about 1.5x faster with increased usage. ChatGPT sign-in consumes more credits; API keys use Priority processing rates.","Fast 模式字段必须为 true 或 false,请在运行配置 JSON 中修正。":"The Fast mode field must be true or false. Fix it in the runtime configuration JSON.","跟随 Codex":"Use Codex default",标准速度:"Standard speed",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 have full access to this computer.","执行权限字段必须为 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",无限制:"Unrestricted","ACP 权限策略必须为 ASK 或 UNRESTRICTED":"ACP permission policy must be ASK or UNRESTRICTED",运行配置:"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",编辑标题:"Edit title",输入任务标题:"Enter task title",字符:"characters",删除自定义覆盖并恢复默认:"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","正在检查后台服务...":"Checking services...","无法检查后台服务状态,提交时会再次确认。":"Background service status could not be checked. The server will verify it when submitting.","合并前将停止 {count} 个后台服务":"{count} background services will be stopped before merging","停止后不会自动恢复。":"They will not restart automatically after being stopped.",停止服务并提交:"Stop Services and Submit","正在停止服务并提交...":"Stopping and submitting...","后台服务仍在运行,请确认停止服务后再提交。":"Background services are still running. Confirm that they should be stopped before submitting.",请描述本次修改的内容:"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..."}},wb=S.createContext(null),Eb="agent-tower.locale";function Tb(t){return t?t==="en"?"en":t==="zh-CN"?"zh-CN":null:null}function YC(){if(typeof window>"u")return null;try{return Tb(window.localStorage.getItem(Eb))}catch{return null}}function VC(t){if(!(typeof window>"u"))try{window.localStorage.setItem(Eb,t)}catch{}}function FC(){return typeof navigator>"u"||navigator.language.toLowerCase().startsWith("zh")?"zh-CN":"en"}function Cb(){return YC()??FC()}function XC(t,a){if(!a)return t;let i=t;for(const[o,c]of Object.entries(a))i=i.replaceAll(`{${o}}`,String(c??""));return i}let tf=Cb();function Ab(t,a,i){const o=GC[t]?.[a]??a;return XC(o,i)}function la(t,a){return Ab(tf,t,a)}function ZC({children:t}){const a=S.useRef(Cb()),[i,o]=S.useState(a.current),{data:c}=QC(),d=KC(),f=S.useRef(!1),h=S.useCallback(x=>{tf=x,o(x),document.documentElement.lang=x,VC(x)},[]);S.useEffect(()=>{const x=Tb(c?.locale)??a.current;h(x),c&&c.locale===null&&!f.current&&(f.current=!0,d.mutate({locale:x}))},[c,h,d]);const y=S.useCallback(x=>{const v=tf;h(x),d.mutate({locale:x},{onError:()=>{h(v),Gi.error(la("语言设置保存失败"))}})},[h,d]),g=S.useMemo(()=>({locale:i,setLocale:y,t:(x,v)=>Ab(i,x,v)}),[i,y]);return m.jsx(wb.Provider,{value:g,children:t})}function Jt(){const t=S.useContext(wb);if(!t)throw new Error("useI18n must be used within I18nProvider");return t}function Rb(t){var a,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var c=t.length;for(a=0;a<c;a++)t[a]&&(i=Rb(t[a]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function $C(){for(var t,a,i=0,o="",c=arguments.length;i<c;i++)(t=arguments[i])&&(a=Rb(t))&&(o&&(o+=" "),o+=a);return o}const JC=(t,a)=>{const i=new Array(t.length+a.length);for(let o=0;o<t.length;o++)i[o]=t[o];for(let o=0;o<a.length;o++)i[t.length+o]=a[o];return i},WC=(t,a)=>({classGroupId:t,validator:a}),kb=(t=new Map,a=null,i)=>({nextPart:t,validators:a,classGroupId:i}),oc="-",By=[],eA="arbitrary..",tA=t=>{const a=aA(t),{conflictingClassGroups:i,conflictingClassGroupModifiers:o}=t;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return nA(f);const h=f.split(oc),y=h[0]===""&&h.length>1?1:0;return Nb(h,y,a)},getConflictingClassGroupIds:(f,h)=>{if(h){const y=o[f],g=i[f];return y?g?JC(g,y):y:g||By}return i[f]||By}}},Nb=(t,a,i)=>{if(t.length-a===0)return i.classGroupId;const c=t[a],d=i.nextPart.get(c);if(d){const g=Nb(t,a+1,d);if(g)return g}const f=i.validators;if(f===null)return;const h=a===0?t.join(oc):t.slice(a).join(oc),y=f.length;for(let g=0;g<y;g++){const x=f[g];if(x.validator(h))return x.classGroupId}},nA=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=t.slice(1,-1),i=a.indexOf(":"),o=a.slice(0,i);return o?eA+o:void 0})(),aA=t=>{const{theme:a,classGroups:i}=t;return rA(i,a)},rA=(t,a)=>{const i=kb();for(const o in t){const c=t[o];qf(c,i,o,a)}return i},qf=(t,a,i,o)=>{const c=t.length;for(let d=0;d<c;d++){const f=t[d];iA(f,a,i,o)}},iA=(t,a,i,o)=>{if(typeof t=="string"){sA(t,a,i);return}if(typeof t=="function"){oA(t,a,i,o);return}lA(t,a,i,o)},sA=(t,a,i)=>{const o=t===""?a:_b(a,t);o.classGroupId=i},oA=(t,a,i,o)=>{if(cA(t)){qf(t(o),a,i,o);return}a.validators===null&&(a.validators=[]),a.validators.push(WC(i,t))},lA=(t,a,i,o)=>{const c=Object.entries(t),d=c.length;for(let f=0;f<d;f++){const[h,y]=c[f];qf(y,_b(a,h),i,o)}},_b=(t,a)=>{let i=t;const o=a.split(oc),c=o.length;for(let d=0;d<c;d++){const f=o[d];let h=i.nextPart.get(f);h||(h=kb(),i.nextPart.set(f,h)),i=h}return i},cA=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,uA=t=>{if(t<1)return{get:()=>{},set:()=>{}};let a=0,i=Object.create(null),o=Object.create(null);const c=(d,f)=>{i[d]=f,a++,a>t&&(a=0,o=i,i=Object.create(null))};return{get(d){let f=i[d];if(f!==void 0)return f;if((f=o[d])!==void 0)return c(d,f),f},set(d,f){d in i?i[d]=f:c(d,f)}}},nf="!",qy=":",dA=[],Py=(t,a,i,o,c)=>({modifiers:t,hasImportantModifier:a,baseClassName:i,maybePostfixModifierPosition:o,isExternal:c}),fA=t=>{const{prefix:a,experimentalParseClassName:i}=t;let o=c=>{const d=[];let f=0,h=0,y=0,g;const x=c.length;for(let U=0;U<x;U++){const K=c[U];if(f===0&&h===0){if(K===qy){d.push(c.slice(y,U)),y=U+1;continue}if(K==="/"){g=U;continue}}K==="["?f++:K==="]"?f--:K==="("?h++:K===")"&&h--}const v=d.length===0?c:c.slice(y);let E=v,R=!1;v.endsWith(nf)?(E=v.slice(0,-1),R=!0):v.startsWith(nf)&&(E=v.slice(1),R=!0);const j=g&&g>y?g-y:void 0;return Py(d,R,E,j)};if(a){const c=a+qy,d=o;o=f=>f.startsWith(c)?d(f.slice(c.length)):Py(dA,!1,f,void 0,!0)}if(i){const c=o;o=d=>i({className:d,parseClassName:c})}return o},hA=t=>{const a=new Map;return t.orderSensitiveModifiers.forEach((i,o)=>{a.set(i,1e6+o)}),i=>{const o=[];let c=[];for(let d=0;d<i.length;d++){const f=i[d],h=f[0]==="[",y=a.has(f);h||y?(c.length>0&&(c.sort(),o.push(...c),c=[]),o.push(f)):c.push(f)}return c.length>0&&(c.sort(),o.push(...c)),o}},mA=t=>({cache:uA(t.cacheSize),parseClassName:fA(t),sortModifiers:hA(t),...tA(t)}),pA=/\s+/,gA=(t,a)=>{const{parseClassName:i,getClassGroupId:o,getConflictingClassGroupIds:c,sortModifiers:d}=a,f=[],h=t.trim().split(pA);let y="";for(let g=h.length-1;g>=0;g-=1){const x=h[g],{isExternal:v,modifiers:E,hasImportantModifier:R,baseClassName:j,maybePostfixModifierPosition:U}=i(x);if(v){y=x+(y.length>0?" "+y:y);continue}let K=!!U,H=o(K?j.substring(0,U):j);if(!H){if(!K){y=x+(y.length>0?" "+y:y);continue}if(H=o(j),!H){y=x+(y.length>0?" "+y:y);continue}K=!1}const Q=E.length===0?"":E.length===1?E[0]:d(E).join(":"),W=R?Q+nf:Q,me=W+H;if(f.indexOf(me)>-1)continue;f.push(me);const he=c(H,K);for(let fe=0;fe<he.length;++fe){const k=he[fe];f.push(W+k)}y=x+(y.length>0?" "+y:y)}return y},yA=(...t)=>{let a=0,i,o,c="";for(;a<t.length;)(i=t[a++])&&(o=Ob(i))&&(c&&(c+=" "),c+=o);return c},Ob=t=>{if(typeof t=="string")return t;let a,i="";for(let o=0;o<t.length;o++)t[o]&&(a=Ob(t[o]))&&(i&&(i+=" "),i+=a);return i},vA=(t,...a)=>{let i,o,c,d;const f=y=>{const g=a.reduce((x,v)=>v(x),t());return i=mA(g),o=i.cache.get,c=i.cache.set,d=h,h(y)},h=y=>{const g=o(y);if(g)return g;const x=gA(y,i);return c(y,x),x};return d=f,(...y)=>d(yA(...y))},bA=[],qt=t=>{const a=i=>i[t]||bA;return a.isThemeGetter=!0,a},Mb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Db=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xA=/^\d+\/\d+$/,SA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wA=/\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$/,EA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,TA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,CA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qi=t=>xA.test(t),qe=t=>!!t&&!Number.isNaN(Number(t)),br=t=>!!t&&Number.isInteger(Number(t)),zd=t=>t.endsWith("%")&&qe(t.slice(0,-1)),Ya=t=>SA.test(t),AA=()=>!0,RA=t=>wA.test(t)&&!EA.test(t),jb=()=>!1,kA=t=>TA.test(t),NA=t=>CA.test(t),_A=t=>!ue(t)&&!de(t),OA=t=>as(t,Ub,jb),ue=t=>Mb.test(t),ei=t=>as(t,Bb,RA),Ld=t=>as(t,LA,qe),Iy=t=>as(t,zb,jb),MA=t=>as(t,Lb,NA),ql=t=>as(t,qb,kA),de=t=>Db.test(t),eo=t=>rs(t,Bb),DA=t=>rs(t,UA),Hy=t=>rs(t,zb),jA=t=>rs(t,Ub),zA=t=>rs(t,Lb),Pl=t=>rs(t,qb,!0),as=(t,a,i)=>{const o=Mb.exec(t);return o?o[1]?a(o[1]):i(o[2]):!1},rs=(t,a,i=!1)=>{const o=Db.exec(t);return o?o[1]?a(o[1]):i:!1},zb=t=>t==="position"||t==="percentage",Lb=t=>t==="image"||t==="url",Ub=t=>t==="length"||t==="size"||t==="bg-size",Bb=t=>t==="length",LA=t=>t==="number",UA=t=>t==="family-name",qb=t=>t==="shadow",BA=()=>{const t=qt("color"),a=qt("font"),i=qt("text"),o=qt("font-weight"),c=qt("tracking"),d=qt("leading"),f=qt("breakpoint"),h=qt("container"),y=qt("spacing"),g=qt("radius"),x=qt("shadow"),v=qt("inset-shadow"),E=qt("text-shadow"),R=qt("drop-shadow"),j=qt("blur"),U=qt("perspective"),K=qt("aspect"),H=qt("ease"),Q=qt("animate"),W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],me=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],he=()=>[...me(),de,ue],fe=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],Y=()=>[de,ue,y],re=()=>[Qi,"full","auto",...Y()],Oe=()=>[br,"none","subgrid",de,ue],Ne=()=>["auto",{span:["full",br,de,ue]},br,de,ue],Ee=()=>[br,"auto",de,ue],je=()=>["auto","min","max","fr",de,ue],Ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ce=()=>["start","end","center","stretch","center-safe","end-safe"],_=()=>["auto",...Y()],F=()=>[Qi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Y()],I=()=>[t,de,ue],pe=()=>[...me(),Hy,Iy,{position:[de,ue]}],be=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",jA,OA,{size:[de,ue]}],q=()=>[zd,eo,ei],P=()=>["","none","full",g,de,ue],Z=()=>["",qe,eo,ei],ee=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[qe,zd,Hy,Iy],Ae=()=>["","none",j,de,ue],Pe=()=>["none",qe,de,ue],Qt=()=>["none",qe,de,ue],an=()=>[qe,de,ue],We=()=>[Qi,"full",...Y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ya],breakpoint:[Ya],color:[AA],container:[Ya],"drop-shadow":[Ya],ease:["in","out","in-out"],font:[_A],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ya],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ya],shadow:[Ya],spacing:["px",qe],text:[Ya],"text-shadow":[Ya],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Qi,ue,de,K]}],container:["container"],columns:[{columns:[qe,ue,de,h]}],"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:he()}],overflow:[{overflow:fe()}],"overflow-x":[{"overflow-x":fe()}],"overflow-y":[{"overflow-y":fe()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:re()}],"inset-x":[{"inset-x":re()}],"inset-y":[{"inset-y":re()}],start:[{start:re()}],end:[{end:re()}],top:[{top:re()}],right:[{right:re()}],bottom:[{bottom:re()}],left:[{left:re()}],visibility:["visible","invisible","collapse"],z:[{z:[br,"auto",de,ue]}],basis:[{basis:[Qi,"full","auto",h,...Y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,Qi,"auto","initial","none",ue]}],grow:[{grow:["",qe,de,ue]}],shrink:[{shrink:["",qe,de,ue]}],order:[{order:[br,"first","last","none",de,ue]}],"grid-cols":[{"grid-cols":Oe()}],"col-start-end":[{col:Ne()}],"col-start":[{"col-start":Ee()}],"col-end":[{"col-end":Ee()}],"grid-rows":[{"grid-rows":Oe()}],"row-start-end":[{row:Ne()}],"row-start":[{"row-start":Ee()}],"row-end":[{"row-end":Ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":je()}],"auto-rows":[{"auto-rows":je()}],gap:[{gap:Y()}],"gap-x":[{"gap-x":Y()}],"gap-y":[{"gap-y":Y()}],"justify-content":[{justify:[...Ue(),"normal"]}],"justify-items":[{"justify-items":[...Ce(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ce()]}],"align-content":[{content:["normal",...Ue()]}],"align-items":[{items:[...Ce(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ce(),{baseline:["","last"]}]}],"place-content":[{"place-content":Ue()}],"place-items":[{"place-items":[...Ce(),"baseline"]}],"place-self":[{"place-self":["auto",...Ce()]}],p:[{p:Y()}],px:[{px:Y()}],py:[{py:Y()}],ps:[{ps:Y()}],pe:[{pe:Y()}],pt:[{pt:Y()}],pr:[{pr:Y()}],pb:[{pb:Y()}],pl:[{pl:Y()}],m:[{m:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":Y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Y()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[h,"screen",...F()]}],"min-w":[{"min-w":[h,"screen","none",...F()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[f]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",i,eo,ei]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,de,Ld]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",zd,ue]}],"font-family":[{font:[DA,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,de,ue]}],"line-clamp":[{"line-clamp":[qe,"none",de,Ld]}],leading:[{leading:[d,...Y()]}],"list-image":[{"list-image":["none",de,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",de,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",de,ei]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[qe,"auto",de,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",de,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",de,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:pe()}],"bg-repeat":[{bg:be()}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},br,de,ue],radial:["",de,ue],conic:[br,de,ue]},zA,MA]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"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:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,de,ue]}],"outline-w":[{outline:["",qe,eo,ei]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",x,Pl,ql]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",v,Pl,ql]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[qe,ei]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",E,Pl,ql]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[qe,de,ue]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"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":[qe]}],"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":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"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":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"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":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"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":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"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":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"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":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"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":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[de,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":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":me()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"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":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:pe()}],"mask-repeat":[{mask:be()}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",de,ue]}],filter:[{filter:["","none",de,ue]}],blur:[{blur:Ae()}],brightness:[{brightness:[qe,de,ue]}],contrast:[{contrast:[qe,de,ue]}],"drop-shadow":[{"drop-shadow":["","none",R,Pl,ql]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",qe,de,ue]}],"hue-rotate":[{"hue-rotate":[qe,de,ue]}],invert:[{invert:["",qe,de,ue]}],saturate:[{saturate:[qe,de,ue]}],sepia:[{sepia:["",qe,de,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",de,ue]}],"backdrop-blur":[{"backdrop-blur":Ae()}],"backdrop-brightness":[{"backdrop-brightness":[qe,de,ue]}],"backdrop-contrast":[{"backdrop-contrast":[qe,de,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,de,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,de,ue]}],"backdrop-invert":[{"backdrop-invert":["",qe,de,ue]}],"backdrop-opacity":[{"backdrop-opacity":[qe,de,ue]}],"backdrop-saturate":[{"backdrop-saturate":[qe,de,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,de,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Y()}],"border-spacing-x":[{"border-spacing-x":Y()}],"border-spacing-y":[{"border-spacing-y":Y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",de,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",de,ue]}],ease:[{ease:["linear","initial",H,de,ue]}],delay:[{delay:[qe,de,ue]}],animate:[{animate:["none",Q,de,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[U,de,ue]}],"perspective-origin":[{"perspective-origin":he()}],rotate:[{rotate:Pe()}],"rotate-x":[{"rotate-x":Pe()}],"rotate-y":[{"rotate-y":Pe()}],"rotate-z":[{"rotate-z":Pe()}],scale:[{scale:Qt()}],"scale-x":[{"scale-x":Qt()}],"scale-y":[{"scale-y":Qt()}],"scale-z":[{"scale-z":Qt()}],"scale-3d":["scale-3d"],skew:[{skew:an()}],"skew-x":[{"skew-x":an()}],"skew-y":[{"skew-y":an()}],transform:[{transform:[de,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:he()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:We()}],"translate-x":[{"translate-x":We()}],"translate-y":[{"translate-y":We()}],"translate-z":[{"translate-z":We()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"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",de,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":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"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",de,ue]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[qe,eo,ei,Ld]}],stroke:[{stroke:["none",...I()]}],"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"]}},qA=vA(BA);function ye(...t){return qA($C(t))}function Xi(t){let a=0;for(const i of t){const o=i.codePointAt(0);o>=19968&&o<=40959||o>=13312&&o<=19903||o>=65280&&o<=65376||o>=12288&&o<=12351?a+=2:a+=1}return a}function JN(t,a){if(Xi(t)<=a)return t;const i=a-1,o=Math.ceil(i/2),c=Math.floor(i/2);let d="",f=0;for(const x of t){const v=Xi(x);if(f+v>o)break;d+=x,f+=v}const h=[...t];let y="",g=0;for(let x=h.length-1;x>=0;x--){const v=Xi(h[x]);if(g+v>c)break;y=h[x]+y,g+=v}return d+"…"+y}function PA(t,a,i="…"){if(Xi(t)<=a)return t;const o=a-Xi(i);let c="",d=0;for(const f of t){const h=Xi(f);if(d+h>o)break;c+=f,d+=h}return c+i}let Zi=0;function Pf(){Zi++,Zi===1&&(document.body.style.overflow="hidden")}function lc(){Zi=Math.max(0,Zi-1),Zi===0&&(document.body.style.overflow="")}function IA(){return Zi}function WN(t){S.useEffect(()=>{if(t)return Pf(),()=>lc()},[t])}function Qy(t,a){if(typeof t=="function")return t(a);t!=null&&(t.current=a)}function Pb(...t){return a=>{let i=!1;const o=t.map(c=>{const d=Qy(c,a);return!i&&typeof d=="function"&&(i=!0),d});if(i)return()=>{for(let c=0;c<o.length;c++){const d=o[c];typeof d=="function"?d():Qy(t[c],null)}}}}function Ib(...t){return S.useCallback(Pb(...t),t)}function Hb(t){const a=HA(t),i=S.forwardRef((o,c)=>{const{children:d,...f}=o,h=S.Children.toArray(d),y=h.find(QA);if(y){const g=y.props.children,x=h.map(v=>v===y?S.Children.count(g)>1?S.Children.only(null):S.isValidElement(g)?g.props.children:null:v);return m.jsx(a,{...f,ref:c,children:S.isValidElement(g)?S.cloneElement(g,void 0,x):null})}return m.jsx(a,{...f,ref:c,children:d})});return i.displayName=`${t}.Slot`,i}var Qb=Hb("Slot");function HA(t){const a=S.forwardRef((i,o)=>{const{children:c,...d}=i;if(S.isValidElement(c)){const f=GA(c),h=KA(d,c.props);return c.type!==S.Fragment&&(h.ref=o?Pb(o,f):f),S.cloneElement(c,h)}return S.Children.count(c)>1?S.Children.only(null):null});return a.displayName=`${t}.SlotClone`,a}var Kb=Symbol("radix.slottable");function e_(t){const a=({children:i})=>m.jsx(m.Fragment,{children:i});return a.displayName=`${t}.Slottable`,a.__radixId=Kb,a}function QA(t){return S.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Kb}function KA(t,a){const i={...a};for(const o in a){const c=t[o],d=a[o];/^on[A-Z]/.test(o)?c&&d?i[o]=(...h)=>{const y=d(...h);return c(...h),y}:c&&(i[o]=c):o==="style"?i[o]={...c,...d}:o==="className"&&(i[o]=[c,d].filter(Boolean).join(" "))}return{...t,...i}}function GA(t){let a=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,i=a&&"isReactWarning"in a&&a.isReactWarning;return i?t.ref:(a=Object.getOwnPropertyDescriptor(t,"ref")?.get,i=a&&"isReactWarning"in a&&a.isReactWarning,i?t.props.ref:t.props.ref||t.ref)}var YA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],If=YA.reduce((t,a)=>{const i=Hb(`Primitive.${a}`),o=S.forwardRef((c,d)=>{const{asChild:f,...h}=c,y=f?i:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(y,{...h,ref:d})});return o.displayName=`Primitive.${a}`,{...t,[a]:o}},{});function t_(t,a){t&&Ef.flushSync(()=>t.dispatchEvent(a))}function n_(t,a){const i=S.createContext(a),o=d=>{const{children:f,...h}=d,y=S.useMemo(()=>h,Object.values(h));return m.jsx(i.Provider,{value:y,children:f})};o.displayName=t+"Provider";function c(d){const f=S.useContext(i);if(f)return f;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${t}\``)}return[o,c]}function VA(t,a=[]){let i=[];function o(d,f){const h=S.createContext(f),y=i.length;i=[...i,f];const g=v=>{const{scope:E,children:R,...j}=v,U=E?.[t]?.[y]||h,K=S.useMemo(()=>j,Object.values(j));return m.jsx(U.Provider,{value:K,children:R})};g.displayName=d+"Provider";function x(v,E){const R=E?.[t]?.[y]||h,j=S.useContext(R);if(j)return j;if(f!==void 0)return f;throw new Error(`\`${v}\` must be used within \`${d}\``)}return[g,x]}const c=()=>{const d=i.map(f=>S.createContext(f));return function(h){const y=h?.[t]||d;return S.useMemo(()=>({[`__scope${t}`]:{...h,[t]:y}}),[h,y])}};return c.scopeName=t,[o,FA(c,...a)]}function FA(...t){const a=t[0];if(t.length===1)return a;const i=()=>{const o=t.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(d){const f=o.reduce((h,{useScope:y,scopeName:g})=>{const v=y(d)[`__scope${g}`];return{...h,...v}},{});return S.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return i.scopeName=a.scopeName,i}function XA(t,a,{checkForDefaultPrevented:i=!0}={}){return function(c){if(t?.(c),i===!1||!c.defaultPrevented)return a?.(c)}}var po=globalThis?.document?S.useLayoutEffect:()=>{},ZA=yf[" useInsertionEffect ".trim().toString()]||po;function $A({prop:t,defaultProp:a,onChange:i=()=>{},caller:o}){const[c,d,f]=JA({defaultProp:a,onChange:i}),h=t!==void 0,y=h?t:c;{const x=S.useRef(t!==void 0);S.useEffect(()=>{const v=x.current;v!==h&&console.warn(`${o} is changing from ${v?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=h},[h,o])}const g=S.useCallback(x=>{if(h){const v=WA(x)?x(t):x;v!==t&&f.current?.(v)}else d(x)},[h,t,d,f]);return[y,g]}function JA({defaultProp:t,onChange:a}){const[i,o]=S.useState(t),c=S.useRef(i),d=S.useRef(a);return ZA(()=>{d.current=a},[a]),S.useEffect(()=>{c.current!==i&&(d.current?.(i),c.current=i)},[i,c]),[i,o,d]}function WA(t){return typeof t=="function"}function eR(t,a){return S.useReducer((i,o)=>a[i][o]??i,t)}var Gb=t=>{const{present:a,children:i}=t,o=tR(a),c=typeof i=="function"?i({present:o.isPresent}):S.Children.only(i),d=Ib(o.ref,nR(c));return typeof i=="function"||o.isPresent?S.cloneElement(c,{ref:d}):null};Gb.displayName="Presence";function tR(t){const[a,i]=S.useState(),o=S.useRef(null),c=S.useRef(t),d=S.useRef("none"),f=t?"mounted":"unmounted",[h,y]=eR(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const g=Il(o.current);d.current=h==="mounted"?g:"none"},[h]),po(()=>{const g=o.current,x=c.current;if(x!==t){const E=d.current,R=Il(g);t?y("MOUNT"):R==="none"||g?.display==="none"?y("UNMOUNT"):y(x&&E!==R?"ANIMATION_OUT":"UNMOUNT"),c.current=t}},[t,y]),po(()=>{if(a){let g;const x=a.ownerDocument.defaultView??window,v=R=>{const U=Il(o.current).includes(CSS.escape(R.animationName));if(R.target===a&&U&&(y("ANIMATION_END"),!c.current)){const K=a.style.animationFillMode;a.style.animationFillMode="forwards",g=x.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=K)})}},E=R=>{R.target===a&&(d.current=Il(o.current))};return a.addEventListener("animationstart",E),a.addEventListener("animationcancel",v),a.addEventListener("animationend",v),()=>{x.clearTimeout(g),a.removeEventListener("animationstart",E),a.removeEventListener("animationcancel",v),a.removeEventListener("animationend",v)}}else y("ANIMATION_END")},[a,y]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:S.useCallback(g=>{o.current=g?getComputedStyle(g):null,i(g)},[])}}function Il(t){return t?.animationName||"none"}function nR(t){let a=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,i=a&&"isReactWarning"in a&&a.isReactWarning;return i?t.ref:(a=Object.getOwnPropertyDescriptor(t,"ref")?.get,i=a&&"isReactWarning"in a&&a.isReactWarning,i?t.props.ref:t.props.ref||t.ref)}var aR=yf[" useId ".trim().toString()]||(()=>{}),rR=0;function iR(t){const[a,i]=S.useState(aR());return po(()=>{i(o=>o??String(rR++))},[t]),t||(a?`radix-${a}`:"")}var hc="Collapsible",[sR]=VA(hc),[oR,Hf]=sR(hc),Yb=S.forwardRef((t,a)=>{const{__scopeCollapsible:i,open:o,defaultOpen:c,disabled:d,onOpenChange:f,...h}=t,[y,g]=$A({prop:o,defaultProp:c??!1,onChange:f,caller:hc});return m.jsx(oR,{scope:i,disabled:d,contentId:iR(),open:y,onOpenToggle:S.useCallback(()=>g(x=>!x),[g]),children:m.jsx(If.div,{"data-state":Kf(y),"data-disabled":d?"":void 0,...h,ref:a})})});Yb.displayName=hc;var Vb="CollapsibleTrigger",Fb=S.forwardRef((t,a)=>{const{__scopeCollapsible:i,...o}=t,c=Hf(Vb,i);return m.jsx(If.button,{type:"button","aria-controls":c.contentId,"aria-expanded":c.open||!1,"data-state":Kf(c.open),"data-disabled":c.disabled?"":void 0,disabled:c.disabled,...o,ref:a,onClick:XA(t.onClick,c.onOpenToggle)})});Fb.displayName=Vb;var Qf="CollapsibleContent",Xb=S.forwardRef((t,a)=>{const{forceMount:i,...o}=t,c=Hf(Qf,t.__scopeCollapsible);return m.jsx(Gb,{present:i||c.open,children:({present:d})=>m.jsx(lR,{...o,ref:a,present:d})})});Xb.displayName=Qf;var lR=S.forwardRef((t,a)=>{const{__scopeCollapsible:i,present:o,children:c,...d}=t,f=Hf(Qf,i),[h,y]=S.useState(o),g=S.useRef(null),x=Ib(a,g),v=S.useRef(0),E=v.current,R=S.useRef(0),j=R.current,U=f.open||h,K=S.useRef(U),H=S.useRef(void 0);return S.useEffect(()=>{const Q=requestAnimationFrame(()=>K.current=!1);return()=>cancelAnimationFrame(Q)},[]),po(()=>{const Q=g.current;if(Q){H.current=H.current||{transitionDuration:Q.style.transitionDuration,animationName:Q.style.animationName},Q.style.transitionDuration="0s",Q.style.animationName="none";const W=Q.getBoundingClientRect();v.current=W.height,R.current=W.width,K.current||(Q.style.transitionDuration=H.current.transitionDuration,Q.style.animationName=H.current.animationName),y(o)}},[f.open,o]),m.jsx(If.div,{"data-state":Kf(f.open),"data-disabled":f.disabled?"":void 0,id:f.contentId,hidden:!U,...d,ref:x,style:{"--radix-collapsible-content-height":E?`${E}px`:void 0,"--radix-collapsible-content-width":j?`${j}px`:void 0,...t.style},children:U&&c})});function Kf(t){return t?"open":"closed"}var cR=Yb,uR=Fb,dR=Xb;const af={neutral:"text-muted-foreground",info:"text-info",success:"text-success",warning:"text-warning",danger:"text-destructive"},fR={neutral:"bg-muted-foreground/60",info:"bg-info",success:"bg-success",warning:"bg-warning",danger:"bg-destructive"},es={neutral:"text-foreground/70",info:"text-info-ink",success:"text-success-ink",warning:"text-warning-ink",danger:"text-destructive-ink"},Zb={neutral:"bg-foreground/[0.06]",info:"bg-info/10",success:"bg-success/10",warning:"bg-warning/10",danger:"bg-destructive/10"},hR={neutral:"bg-primary text-primary-foreground",info:"bg-info-ink text-white",success:"bg-success-ink text-white",warning:"bg-warning-ink text-white",danger:"bg-destructive-ink text-white"},Ky={ink:"var(--viz-6)",context:"var(--viz-2)",plan:"var(--viz-3)",empty:"var(--viz-0)",grid:"var(--viz-grid)",axis:"var(--viz-axis)",surface:"var(--background)",label:"var(--muted-foreground)",text:"var(--foreground)"},mR=["var(--viz-0)","var(--viz-1)","var(--viz-2)","var(--viz-3)","var(--viz-4)","var(--viz-5)","var(--viz-6)"],pR={1:[6],2:[2,6],3:[2,4,6],4:[2,3,4,6],5:[2,3,4,5,6]};function gR(t){return pR[Math.min(5,Math.max(1,t))].map(i=>mR[i])}const a_={neutral:"var(--viz-2)",info:"var(--info)",success:"var(--success)",warning:"var(--warning)",danger:"var(--destructive)"},r_={instant:100,fast:150,base:200,enter:250,move:260,slow:500,easeEnter:"cubic-bezier(0.16, 1, 0.3, 1)",easeMove:"cubic-bezier(0.2, 0, 0, 1)"},Gy=new Map;function yR(t,a){const i=`${t??""}|${JSON.stringify(a)}`;let o=Gy.get(i);return o||(o=new Intl.NumberFormat(t,a),Gy.set(i,o)),o}function rf(t,{compact:a=!1,maximumFractionDigits:i,locale:o}={}){return Number.isFinite(t)?yR(o,{notation:a?"compact":"standard",maximumFractionDigits:i??(a||Math.abs(t)<10?1:0)}).format(t):"—"}function i_(t,a=0){return Number.isFinite(t)?`${(t*100).toFixed(a)}%`:"—"}function s_(t,a=1){if(!Number.isFinite(t))return"—";const i=Math.abs(t*100),o=Number.isInteger(i)?i.toFixed(0):i.toFixed(a);return Number(o)===0?"0%":`${t>0?"+":"−"}${o}%`}function o_(t){return Number.isFinite(t)?t>0?`+${rf(t)}`:t<0?`−${rf(Math.abs(t))}`:"0":"—"}function Fa(t){return t!=null&&typeof t!="boolean"&&t!==""}const vR=3e4;let sf=Date.now();const Hl=new Set;let to=null;function bR(t){return Hl.add(t),to||(sf=Date.now(),to=setInterval(()=>{sf=Date.now(),Hl.forEach(a=>a())},vR)),()=>{Hl.delete(t),Hl.size===0&&to&&(clearInterval(to),to=null)}}function Yy(){return sf}function xR(){return S.useSyncExternalStore(bR,Yy,Yy)}const of=60,lf=60*of,Ud=24*lf;function SR(t,a,i,o){const c=t instanceof Date?t:new Date(t),d=Math.max(0,Math.floor((a-c.getTime())/1e3));if(d<of)return i("now");if(d<lf)return i("{count}m",{count:Math.floor(d/of)});if(d<Ud)return i("{count}h",{count:Math.floor(d/lf)});if(d<7*Ud)return i("{count}d",{count:Math.floor(d/Ud)});const f=c.getFullYear()===new Date(a).getFullYear();return c.toLocaleDateString(o,f?{month:"numeric",day:"numeric"}:{year:"numeric",month:"numeric"})}const wR={xs:12,sm:14,md:16,lg:20};function ER({size:t="sm",label:a,className:i}){const o=wR[t],c=m.jsxs("svg",{viewBox:"0 0 16 16",width:o,height:o,fill:"none","aria-hidden":"true",className:ye("shrink-0 animate-spin motion-reduce:[animation-duration:2.4s]",!a&&i),children:[m.jsx("circle",{cx:"8",cy:"8",r:"6.25",stroke:"currentColor",strokeOpacity:"0.18",strokeWidth:"1.75"}),m.jsx("path",{d:"M8 1.75a6.25 6.25 0 0 1 6.25 6.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]});return a?m.jsxs("span",{role:"status","aria-live":"polite",className:ye("inline-flex items-center gap-2 text-[13px] text-muted-foreground",i),children:[c,m.jsx("span",{children:a})]}):c}const TR={sm:"h-[18px] px-1.5 text-[11px] gap-1 [&_svg]:size-2.5",md:"h-5 px-2 text-xs gap-1 [&_svg]:size-3"};function CR({tone:t="neutral",variant:a="soft",size:i="md",shape:o="pill",icon:c,className:d,children:f,...h}){return m.jsxs("span",{"data-slot":"badge",className:ye("inline-flex shrink-0 items-center whitespace-nowrap font-medium leading-none [&_svg]:shrink-0",TR[i],o==="pill"?"rounded-full":"rounded",a==="soft"&&[Zb[t],es[t]],a==="outline"&&["bg-background ring-1 ring-inset",t==="neutral"?"text-foreground/80 ring-border":[es[t],"ring-current/25"]],a==="solid"&&hR[t],a==="dot"&&"px-0 text-foreground/80",d),...h,children:[a==="dot"&&m.jsx("span",{"aria-hidden":"true",className:ye("size-1.5 shrink-0 rounded-full",fR[t])}),c,f]})}function AR({count:t,max:a=99,tone:i="neutral",className:o,...c}){const d=t>a?`${a}+`:String(t);return m.jsx("span",{"data-slot":"count-badge",className:ye("inline-flex shrink-0 items-center justify-center text-[11px] leading-4 tabular-nums",i==="neutral"?"font-normal text-muted-foreground":["min-w-4 rounded-full px-1.5 font-semibold",Zb[i],es[i]],o),...c,children:d})}const RR={neutral:m.jsx(ef,{}),info:m.jsx(ef,{}),success:m.jsx(Ji,{}),warning:m.jsx(Rr,{}),danger:m.jsx(WT,{})},kR={neutral:"bg-foreground/[0.04]",info:"bg-info/[0.06]",success:"bg-success/[0.07]",warning:"bg-warning/[0.08]",danger:"bg-destructive/[0.06]"},Vy={sm:{box:"gap-2 rounded-md px-2.5 py-1.5 text-xs leading-[18px]",icon:"mt-0.5 [&_svg]:size-3.5"},md:{box:"gap-2.5 rounded-lg px-3 py-2.5 text-[13px] leading-5",icon:"mt-0.5 [&_svg]:size-4"}};function NR({tone:t="neutral",size:a="md",title:i,icon:o,action:c,onDismiss:d,className:f,children:h,...y}){const{t:g}=Jt();return m.jsxs("div",{"data-slot":"notice",className:ye("flex items-start",Vy[a].box,kR[t],f),...y,children:[o!==!1&&m.jsx("span",{"aria-hidden":"true",className:ye("shrink-0",Vy[a].icon,af[t]),children:o??RR[t]}),m.jsxs("div",{className:"min-w-0 flex-1",children:[i&&m.jsx("div",{className:"font-medium text-foreground",children:i}),h&&m.jsx("div",{className:ye("text-foreground/80",i&&"mt-0.5"),children:h})]}),c&&m.jsx("div",{className:"shrink-0 self-center",children:c}),d&&m.jsx("button",{type:"button",onClick:d,"aria-label":g("Dismiss"),className:"-mr-1 shrink-0 rounded-md p-0.5 text-muted-foreground transition-colors hover:bg-foreground/[0.06] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:m.jsx(Bf,{className:"size-3.5","aria-hidden":"true"})})]})}const _R="relative inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap font-medium outline-none transition-[background-color,color,box-shadow,opacity] duration-150 focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-40 aria-disabled:pointer-events-none aria-disabled:opacity-40 [&_svg]:pointer-events-none [&_svg]:shrink-0",OR={xs:"h-6 gap-1 rounded-md px-2 text-xs [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1.5 rounded-md px-2.5 text-xs [&_svg:not([class*='size-'])]:size-3.5",md:"h-8 gap-1.5 rounded-md px-3 text-[13px] [&_svg:not([class*='size-'])]:size-4",lg:"h-9 gap-2 rounded-lg px-4 text-sm [&_svg:not([class*='size-'])]:size-4",xl:"h-11 gap-2 rounded-lg px-5 text-sm [&_svg:not([class*='size-'])]:size-4"},MR={xs:"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",sm:"size-7 rounded-md [&_svg:not([class*='size-'])]:size-3.5",md:"size-8 rounded-lg [&_svg:not([class*='size-'])]:size-4",lg:"size-9 rounded-lg [&_svg:not([class*='size-'])]:size-[18px]",xl:"size-11 rounded-lg [&_svg:not([class*='size-'])]:size-5"},DR={primary:{neutral:"bg-primary text-primary-foreground shadow-raised hover:bg-primary/90 active:bg-primary/85",danger:"bg-destructive-ink text-white shadow-raised hover:bg-destructive-ink/90 active:bg-destructive-ink/85"},secondary:{neutral:"bg-background text-foreground shadow-raised ring-1 ring-inset ring-border hover:bg-accent active:bg-foreground/[0.06]",danger:"bg-background text-destructive-ink shadow-raised ring-1 ring-inset ring-destructive/25 hover:bg-destructive/[0.06] active:bg-destructive/10"},ghost:{neutral:"text-foreground/80 hover:bg-accent hover:text-foreground active:bg-foreground/[0.06]",danger:"text-destructive-ink hover:bg-destructive/10 active:bg-destructive/15"},soft:{neutral:"bg-foreground/[0.05] text-foreground/90 hover:bg-foreground/[0.08] active:bg-foreground/10",danger:"bg-destructive/10 text-destructive-ink hover:bg-destructive/15 active:bg-destructive/20"},link:{neutral:"h-auto rounded-sm px-0 text-foreground underline decoration-border underline-offset-4 hover:decoration-foreground/50",danger:"h-auto rounded-sm px-0 text-destructive-ink underline decoration-destructive/30 underline-offset-4 hover:decoration-destructive/60"}},jR="text-muted-foreground hover:bg-accent hover:text-foreground active:bg-foreground/[0.06] data-[state=open]:bg-accent data-[state=open]:text-foreground";function $b({variant:t="secondary",tone:a="neutral",size:i="md",block:o=!1,iconOnly:c=!1,loading:d=!1,className:f}={}){return ye(_R,c?MR[i]:OR[i],c&&t==="ghost"&&a==="neutral"?jR:DR[t][a],o&&"w-full",d&&"disabled:opacity-100",f)}function cc({variant:t="secondary",tone:a="neutral",size:i="md",loading:o=!1,block:c=!1,asChild:d=!1,className:f,disabled:h,children:y,type:g,...x}){const v=$b({variant:t,tone:a,size:i,block:c,loading:o,className:f});return d?m.jsx(Qb,{"data-slot":"button",className:v,...x,children:y}):m.jsxs("button",{type:g??"button","data-slot":"button","data-variant":t,className:v,disabled:h||o,"aria-busy":o||void 0,...x,children:[o&&m.jsx(ER,{size:i==="xs"?"xs":"sm"}),y]})}const zR=S.createContext(null);function l_(){return S.useContext(zR)}const c_="rounded-lg border border-input bg-background text-foreground transition-colors hover:border-ring/50",u_="border-destructive hover:border-destructive focus-within:border-destructive focus:border-destructive",d_="cursor-not-allowed bg-muted/50 text-muted-foreground hover:border-input",f_={sm:"h-8 px-2.5 text-[13px]",md:"h-9 px-3 text-sm"};function LR(t,a){return ye("flex h-8 w-full min-w-0 items-center gap-2.5 rounded-md px-2 text-left text-sm transition-[background-color,box-shadow,color] duration-150 pointer-coarse:h-10 pointer-coarse:text-[15px]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent",t?"bg-background text-foreground shadow-raised ring-1 ring-border/80":"text-foreground/80 hover:bg-accent hover:text-foreground active:bg-foreground/[0.06]",a)}function UR({title:t,icon:a,count:i,countTone:o="neutral",sticky:c=!1,defaultOpen:d=!0,open:f,onOpenChange:h,children:y,className:g}){const x=S.useId();return m.jsxs(cR,{defaultOpen:d,open:f,onOpenChange:h,className:ye("mb-2",g),children:[m.jsx("div",{className:ye(c&&"sticky top-0 z-10 bg-sidebar"),children:m.jsxs(uR,{"data-sidebar-item":"",className:"group/header flex h-8 w-full items-center gap-1 rounded-md px-2 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 pointer-coarse:h-10 pointer-coarse:text-[15px]",children:[a&&m.jsx("span",{className:"mr-1.5 flex shrink-0 -translate-y-px [&_svg]:size-4",children:a}),m.jsx("span",{id:x,className:"truncate",children:t}),m.jsx($T,{"aria-hidden":"true",className:"size-3.5 shrink-0 text-muted-foreground/60 transition-transform duration-150 group-hover/header:text-muted-foreground group-data-[state=open]/header:rotate-90"}),i!==void 0&&m.jsx(AR,{count:i,tone:i>0?o:"neutral",className:"ml-auto text-xs leading-5"})]})}),m.jsx(dR,{role:"group","aria-labelledby":x,className:"mt-0.5 flex flex-col gap-px",children:y})]})}const h_={ink:Ky.ink,context:Ky.context,plan:"var(--viz-4)"};function m_(t){return Math.round(t)+.5}function BR(t){return Array.from(t).reduce((a,i)=>a+(i.charCodeAt(0)>11904?2:1),0)*6.6}function p_(t){return Math.ceil(Math.max(0,...t.map(BR)))+10}function g_(t){return rf(t,{compact:!0})}function y_(t,a,i,o){const c=Math.max(2,Math.floor(a/i)),d=Math.max(1,Math.ceil(t/c)),f=new Set;for(let y=0;y<t;y+=d)f.add(y);const h=Math.floor((t-1)/d)*d;if(t>0&&h!==t-1&&(t-1-h<d*.6&&h!==0&&f.delete(h),f.add(t-1)),o!=null&&o>=0&&o<t){for(const y of[...f])y!==o&&Math.abs(y-o)<d&&f.delete(y);f.add(o)}return f}const v_="rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-2";function b_(t,a,i,o="x"){if(i===0)return;const c=a??i-1,d=o==="x"?"ArrowRight":"ArrowDown",f=o==="x"?"ArrowLeft":"ArrowUp";switch(t){case d:return a===null?c:Math.min(i-1,c+1);case f:return a===null?c:Math.max(0,c-1);case"Home":return 0;case"End":return i-1;default:return}}function x_(t){return gR(t).slice().reverse()}const Jb={todo:{icon:Uf,label:"Pending",className:af.neutral},doing:{icon:Ar,label:"Running",className:af.info},done:{icon:Ji,label:"Done",className:"text-success/80"},cancelled:{icon:db,label:"Cancelled",className:"text-muted-foreground/70"}};function Bd({state:t,className:a}){const{icon:i,className:o}=Jb[t];return m.jsx(i,{"aria-hidden":"true",className:ye("size-4 shrink-0",o,a)})}function S_({items:t,onToggle:a,summary:i=!0,className:o}){const{t:c}=Jt(),d={doing:t.filter(f=>f.state==="doing").length,todo:t.filter(f=>f.state==="todo").length,done:t.filter(f=>f.state==="done").length};return m.jsxs("div",{className:o,children:[i&&m.jsx("div",{className:"mb-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:["doing","todo","done"].map(f=>m.jsxs("span",{className:"inline-flex items-center gap-1",children:[m.jsx(Bd,{state:f,className:"size-3.5"}),c(Jb[f].label)," ",m.jsx("span",{className:"tabular-nums text-foreground/80",children:d[f]})]},f))}),m.jsx("ul",{className:"flex flex-col",children:t.map(f=>{const h=f.state==="done"||f.state==="cancelled";return m.jsxs("li",{className:"flex min-h-9 items-center gap-2.5 border-b border-border/40 py-1.5 last:border-0",children:[a?m.jsx("button",{type:"button",role:"checkbox","aria-checked":f.state==="done","aria-label":typeof f.title=="string"?f.title:void 0,onClick:()=>a(f.id),className:"-m-1 flex shrink-0 rounded p-1 transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:m.jsx(Bd,{state:f.state})}):m.jsx(Bd,{state:f.state}),m.jsx("span",{className:ye("min-w-0 flex-1 truncate text-[13px]",h?"text-muted-foreground line-through decoration-foreground/30":"text-foreground/90"),children:f.title}),Fa(f.tag)&&m.jsx("span",{className:"shrink-0",children:f.tag}),Fa(f.meta)&&m.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:f.meta}),f.due&&m.jsx("span",{className:ye("w-14 shrink-0 text-right text-xs tabular-nums",f.due.tone&&!h?ye("font-medium",es[f.due.tone]):"text-muted-foreground"),children:f.due.label})]},f.id)})})]})}function w_({groups:t,className:a}){return m.jsx("div",{className:ye("flex flex-col gap-4",a),children:t.map(i=>m.jsxs("section",{children:[m.jsxs("h4",{className:"mb-1.5 flex items-baseline gap-2 text-xs font-semibold text-foreground",children:[i.title,Fa(i.caption)&&m.jsx("span",{className:"font-normal text-muted-foreground",children:i.caption})]}),m.jsx("ul",{className:"flex flex-col gap-1",children:i.entries.map(o=>m.jsxs("li",{className:"grid grid-cols-[2.75rem_3px_minmax(0,1fr)] gap-x-2.5 py-1",children:[m.jsxs("span",{className:"flex flex-col pt-px text-right leading-4 tabular-nums",children:[m.jsx("span",{className:"text-xs text-foreground/80",children:o.time}),o.endTime&&m.jsx("span",{className:"text-[11px] text-muted-foreground",children:o.endTime})]}),m.jsx("span",{"aria-hidden":"true",className:ye("rounded-full",o.active?"bg-viz-6":"bg-viz-1")}),m.jsxs("div",{className:"min-w-0",children:[m.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[m.jsx("span",{className:"truncate text-[13px] text-foreground/90",children:o.title}),Fa(o.tag)&&m.jsx("span",{className:"shrink-0",children:o.tag})]}),Fa(o.meta)&&m.jsx("div",{className:"truncate text-xs text-muted-foreground",children:o.meta})]})]},o.id))})]},i.id))})}function E_({entries:t,className:a}){return m.jsx("ol",{className:ye("flex flex-col",a),children:t.map((i,o)=>m.jsxs("li",{className:"relative flex gap-2.5 pb-3 last:pb-0",children:[o<t.length-1&&m.jsx("span",{"aria-hidden":"true",className:"absolute bottom-0 left-[11px] top-7 w-px bg-border"}),m.jsx("span",{className:"relative flex size-6 shrink-0 items-center justify-center",children:i.avatar}),m.jsxs("div",{className:"min-w-0 flex-1 pt-0.5",children:[m.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[m.jsx("p",{className:"min-w-0 text-[13px] leading-5 text-foreground/85",children:i.text}),m.jsx("span",{className:"shrink-0 text-[11px] tabular-nums text-muted-foreground",children:i.time})]}),Fa(i.detail)&&m.jsx("div",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:i.detail})]})]},i.id))})}function T_({items:t,className:a}){const{t:i}=Jt();return m.jsx("ul",{className:ye("flex flex-col",a),children:t.map(o=>{const c=o.days<0?"danger":o.days<=3?"warning":null,d=o.days<0?i("days overdue"):o.days===0?i("Due today"):i("days left");return m.jsxs("li",{className:"flex items-center gap-3 border-b border-border/40 py-2 last:border-0",children:[m.jsxs("div",{className:"flex w-14 shrink-0 flex-col items-center leading-none",children:[m.jsx("span",{className:ye("text-xl font-semibold tabular-nums",c?es[c]:"text-foreground"),children:o.days===0?"0":Math.abs(o.days)}),m.jsx("span",{className:ye("mt-1 text-xs",c?es[c]:"text-muted-foreground"),children:d})]}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"truncate text-[13px] text-foreground/90",children:o.title}),Fa(o.meta)&&m.jsx("div",{className:"truncate text-xs text-muted-foreground",children:o.meta})]})]},o.id)})})}function C_({entries:t,className:a}){return m.jsx("ol",{className:ye("flex flex-col",a),children:t.map((i,o)=>m.jsxs("li",{className:"flex items-center gap-3 border-b border-border/40 py-2 last:border-0",children:[m.jsx("span",{className:ye("w-6 shrink-0 text-[15px] font-semibold tabular-nums",o<3?"text-foreground":"text-muted-foreground"),children:String(o+1).padStart(2,"0")}),i.avatar,m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"truncate text-[13px] font-medium text-foreground/90",children:i.name}),Fa(i.meta)&&m.jsx("div",{className:"truncate text-xs text-muted-foreground",children:i.meta})]}),i.change!==void 0&&m.jsxs("span",{className:ye("inline-flex w-8 shrink-0 items-center justify-end gap-0.5 text-[11px] font-medium tabular-nums",i.change>0?"text-success-ink":i.change<0?"text-destructive-ink":"text-muted-foreground"),children:[i.change>0&&m.jsx(KT,{"aria-hidden":"true",className:"size-3",strokeWidth:2.5}),i.change<0&&m.jsx(PT,{"aria-hidden":"true",className:"size-3",strokeWidth:2.5}),i.change===0?"—":Math.abs(i.change)]}),m.jsx("span",{className:"w-16 shrink-0 text-right text-[13px] font-semibold tabular-nums text-foreground",children:i.value})]},i.id))})}function A_({items:t,locale:a,className:i}){const o=new Intl.DateTimeFormat(a,{month:"short"});return m.jsx("ul",{className:ye("flex flex-col",i),children:t.map(c=>m.jsxs("li",{className:"flex gap-3 border-b border-border/40 py-2.5 last:border-0",children:[m.jsxs("div",{className:"flex w-10 shrink-0 flex-col items-center rounded-lg bg-foreground/[0.04] py-1 leading-none",children:[m.jsx("span",{className:"text-lg font-semibold tabular-nums text-foreground",children:c.date.getDate()}),m.jsx("span",{className:"mt-0.5 text-[11px] text-muted-foreground",children:o.format(c.date)})]}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[m.jsx("span",{className:"truncate text-[13px] font-medium text-foreground",children:c.title}),c.badge]}),c.body&&m.jsx("p",{className:"mt-0.5 line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:c.body}),Fa(c.meta)&&m.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:c.meta})]})]},c.id))})}var Fy;(function(t){t.TODO="TODO",t.IN_PROGRESS="IN_PROGRESS",t.IN_REVIEW="IN_REVIEW",t.DONE="DONE",t.CANCELLED="CANCELLED"})(Fy||(Fy={}));var Xn;(function(t){t[t.LOW=-1]="LOW",t[t.NORMAL=0]="NORMAL",t[t.HIGH=1]="HIGH",t[t.URGENT=2]="URGENT"})(Xn||(Xn={}));var Xy;(function(t){t.ACTIVE="ACTIVE",t.MERGED="MERGED",t.ABANDONED="ABANDONED",t.HIBERNATED="HIBERNATED"})(Xy||(Xy={}));var Zy;(function(t){t.WORKTREE="WORKTREE",t.MAIN_DIRECTORY="MAIN_DIRECTORY"})(Zy||(Zy={}));var Se;(function(t){t.CLAUDE_CODE="CLAUDE_CODE",t.GEMINI_CLI="GEMINI_CLI",t.CURSOR_AGENT="CURSOR_AGENT",t.CODEX="CODEX",t.QWEN_CODE="QWEN_CODE",t.KIRO_CLI="KIRO_CLI",t.OPENCODE="OPENCODE",t.PI_CODING_AGENT="PI_CODING_AGENT",t.GROK_BUILD="GROK_BUILD",t.MINION_CODE="MINION_CODE",t.DEEPSEEK_HERMES="DEEPSEEK_HERMES"})(Se||(Se={}));var $t;(function(t){t.CLI="CLI",t.ACP="ACP"})($t||($t={}));var $y;(function(t){t.PENDING="PENDING",t.RUNNING="RUNNING",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t.CANCELLED="CANCELLED"})($y||($y={}));var Jy;(function(t){t.CHAT="CHAT",t.COMMIT_MSG="COMMIT_MSG"})(Jy||(Jy={}));var Wy;(function(t){t.WORKSPACE="WORKSPACE",t.CONVERSATION="CONVERSATION"})(Wy||(Wy={}));var ev;(function(t){t.REBASE="REBASE",t.MERGE="MERGE"})(ev||(ev={}));const qR=["oss","ollama","lmstudio","amazon-bedrock"];function R_(t){return qR.includes(t)}const PR={[Se.CLAUDE_CODE]:{agentType:Se.CLAUDE_CODE,apiBaseUrl:{kind:"env",path:"ANTHROPIC_BASE_URL",placeholder:"https://api.anthropic.com"},apiKey:{kind:"env",path:"ANTHROPIC_API_KEY"},model:{kind:"config",path:"model",placeholder:"claude-sonnet-4-20250514"},reasoningEffort:{kind:"config",path:"effort",options:["low","medium","high","xhigh","max"]},executionPermission:{kind:"config",path:"dangerouslySkipPermissions",riskKind:"skip-permissions"},settingsFormat:"json"},[Se.CODEX]:{agentType:Se.CODEX,apiBaseUrl:{kind:"settings",path:"openai_base_url",placeholder:"https://api.openai.com/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model",placeholder:"gpt-5.3-codex"},reasoningEffort:{kind:"settings",path:"model_reasoning_effort",options:["minimal","low","medium","high","xhigh"]},executionPermission:{kind:"config",path:"dangerouslyBypassApprovalsAndSandbox",riskKind:"bypass-approvals-and-sandbox"},fastMode:{kind:"config",path:"fastMode"},disableResponsesWebsocket:{kind:"config",path:"disableResponsesWebsocket"},settingsFormat:"toml"},[Se.GEMINI_CLI]:{agentType:Se.GEMINI_CLI,apiKey:{kind:"env",path:"GEMINI_API_KEY"},model:{kind:"config",path:"model",placeholder:"gemini-2.5-pro"},executionPermission:{kind:"config",path:"yolo",riskKind:"auto-approve"}},[Se.CURSOR_AGENT]:{agentType:Se.CURSOR_AGENT,model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"force",riskKind:"force-execution"}},[Se.QWEN_CODE]:{agentType:Se.QWEN_CODE,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://dashscope.aliyuncs.com/compatible-mode/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model",placeholder:"qwen3-coder-plus"},executionPermission:{kind:"config",path:"yolo",riskKind:"auto-approve"}},[Se.KIRO_CLI]:{agentType:Se.KIRO_CLI,model:{kind:"config",path:"model"},reasoningEffort:{kind:"config",path:"effort",options:["low","medium","high","xhigh","max"]},executionPermission:{kind:"config",path:"trustAllTools",riskKind:"auto-approve"}},[Se.OPENCODE]:{agentType:Se.OPENCODE,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://api.openai.com/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"autoApprove",riskKind:"auto-approve"}},[Se.PI_CODING_AGENT]:{agentType:Se.PI_CODING_AGENT,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://api.openai.com/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model"},reasoningEffort:{kind:"config",path:"effort",options:["minimal","low","medium","high","xhigh"]},executionPermission:{kind:"config",path:"autoApprove",riskKind:"auto-approve"}},[Se.GROK_BUILD]:{agentType:Se.GROK_BUILD,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://api.x.ai/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"alwaysApprove",riskKind:"auto-approve"}},[Se.MINION_CODE]:{agentType:Se.MINION_CODE,apiBaseUrl:{kind:"env",path:"OPENAI_BASE_URL",placeholder:"https://api.openai.com/v1"},apiKey:{kind:"env",path:"OPENAI_API_KEY"},model:{kind:"config",path:"model"},executionPermission:{kind:"config",path:"dangerouslySkipPermissions",riskKind:"skip-permissions"}},[Se.DEEPSEEK_HERMES]:{agentType:Se.DEEPSEEK_HERMES,apiBaseUrl:{kind:"env",path:"DEEPSEEK_BASE_URL",placeholder:"https://api.deepseek.com"},apiKey:{kind:"env",path:"DEEPSEEK_API_KEY"},model:{kind:"config",path:"model",placeholder:"deepseek-v4-pro"},reasoningEffort:{kind:"config",path:"effort",options:["off","low","high","max"]},executionPermission:{kind:"config",riskKind:"auto-approve"}}};function k_(t){return PR[t]}const Ql="/events",N_={SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",INPUT:"input",RESIZE:"resize",TERMINAL_INPUT:"terminal:input",TERMINAL_RESIZE:"terminal:resize"},Er={MESSAGE_DELIVERY_INVALIDATED:"message-delivery:invalidated",TRANSLATION_INVALIDATED:"translation:invalidated",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"};var On;(function(t){t.Action="Action",t.Assistant="Assistant",t.Info="Info",t.Tool="Tool",t.User="User",t.Cursor="Cursor",t.Error="Error",t.Warning="Warning"})(On||(On={}));function IR(t){const a=t.metadata?.toolName||"Tool",i=t.metadata?.action,o=t.metadata?.status,c={file_read:"Read File",file_edit:"Edit File",command_run:"Run Command",search:"Search",web_fetch:"Fetch URL",tool:"Tool",task_create:"Create Task",plan_presentation:"Present Plan",todo_management:"Manage Todo",other:"Action"},d=t.metadata?.toolKind?a:i?c[i]:a;return o==="success"?`${d} ✓`:o==="failed"?`${d} ✗`:o==="pending_approval"?`${d} (待审批)`:d}function tv(t){switch(t.entryType){case"user_message":case"user_feedback":return{id:t.id,timestamp:t.timestamp,type:On.User,content:t.content,...t.metadata?.deliveryId?{deliveryId:t.metadata.deliveryId}:{}};case"assistant_message":return{id:t.id,timestamp:t.timestamp,type:On.Assistant,content:t.content,...t.metadata?.textBlock?{textBlock:t.metadata.textBlock}:{}};case"next_action":return{id:t.id,timestamp:t.timestamp,type:On.Action,content:t.content};case"thinking":return{id:t.id,timestamp:t.timestamp,type:On.Info,title:"Thinking",content:t.content};case"tool_use":return{id:t.id,timestamp:t.timestamp,type:On.Tool,title:IR(t),content:t.content,isCollapsed:t.metadata?.status==="success",tool:{action:t.metadata?.action,name:t.metadata?.toolName,id:t.metadata?.toolId,kind:t.metadata?.toolKind,status:t.metadata?.status,content:t.metadata?.toolContent,locations:t.metadata?.toolLocations,inputSummary:t.metadata?.toolInputSummary,outputSummary:t.metadata?.toolOutputSummary}};case"error_message":return{id:t.id,timestamp:t.timestamp,type:On.Error,content:t.content};case"warning_message":return{id:t.id,timestamp:t.timestamp,type:On.Warning,content:t.content};case"system_message":return{id:t.id,timestamp:t.timestamp,type:On.Info,content:t.content};case"loading":return{id:t.id,timestamp:t.timestamp,type:On.Cursor,content:"",cursorActivity:{processingStartedAt:t.timestamp}};case"token_usage_info":if(t.metadata?.tokenUsage){const{totalTokens:a=0,modelContextWindow:i}=t.metadata.tokenUsage;return{id:t.id,timestamp:t.timestamp,type:On.Info,content:t.content,tokenUsage:{totalTokens:a,modelContextWindow:i}}}return null;default:return null}}const nv=new WeakMap;function HR(t){if(typeof t!="object"||t===null)return tv(t);const a=nv.get(t);if(a!==void 0)return a;const i=tv(t);return nv.set(t,i),i}function __(t){const a=[];for(const i of t){const o=HR(i);o!==null&&a.push(o)}return a}function O_(t){return{id:`cursor-${Date.now()}`,timestamp:t?.processingStartedAt??Date.now(),type:On.Cursor,content:"",cursorActivity:t}}const M_={[Se.CLAUDE_CODE]:[$t.CLI,$t.ACP],[Se.GEMINI_CLI]:[$t.CLI,$t.ACP],[Se.CURSOR_AGENT]:[$t.CLI,$t.ACP],[Se.CODEX]:[$t.CLI,$t.ACP],[Se.QWEN_CODE]:[$t.ACP],[Se.KIRO_CLI]:[$t.ACP],[Se.OPENCODE]:[$t.ACP],[Se.PI_CODING_AGENT]:[$t.ACP],[Se.GROK_BUILD]:[$t.ACP],[Se.MINION_CODE]:[$t.ACP],[Se.DEEPSEEK_HERMES]:[$t.ACP]},QR=Object.freeze(Object.values(Se).filter(t=>t!==Se.MINION_CODE));new Set(QR);function KR(t){return t.origin==="TASK_INITIAL"||t.origin==="TASK_FOLLOWUP"||t.origin==="CONVERSATION"}const GR={[Se.CLAUDE_CODE]:{agentType:Se.CLAUDE_CODE,label:"Claude Code",logoSrc:"/agent-icons/claude-code.svg"},[Se.GEMINI_CLI]:{agentType:Se.GEMINI_CLI,label:"Gemini CLI",logoSrc:"/agent-icons/gemini-cli.svg"},[Se.CURSOR_AGENT]:{agentType:Se.CURSOR_AGENT,label:"Cursor Agent",logoSrc:"/agent-icons/cursor-agent.svg"},[Se.CODEX]:{agentType:Se.CODEX,label:"Codex",logoSrc:"/agent-icons/codex.svg"},[Se.QWEN_CODE]:{agentType:Se.QWEN_CODE,label:"Qwen Code",logoSrc:"/agent-icons/qwen-code.svg"},[Se.KIRO_CLI]:{agentType:Se.KIRO_CLI,label:"Kiro CLI",logoSrc:"/agent-icons/kiro-cli.svg"},[Se.OPENCODE]:{agentType:Se.OPENCODE,label:"OpenCode",logoSrc:"/agent-icons/opencode.svg"},[Se.PI_CODING_AGENT]:{agentType:Se.PI_CODING_AGENT,label:"Pi Coding Agent",logoSrc:"/agent-icons/pi-coding-agent.svg"},[Se.GROK_BUILD]:{agentType:Se.GROK_BUILD,label:"Grok Build",logoSrc:"/agent-icons/grok-build.svg"},[Se.MINION_CODE]:{agentType:Se.MINION_CODE,label:"Minion Code"},[Se.DEEPSEEK_HERMES]:{agentType:Se.DEEPSEEK_HERMES,label:"DeepSeek Harness",logoSrc:"/agent-icons/deepseek-hermes.svg"}};function Wb(t){return t?GR[t]??null:null}function YR(t,a){return Wb(t)?.label??a??(t?String(t):"")}function VR({agentType:t,className:a,fallbackClassName:i}){const o=Wb(t),[c,d]=S.useState(!1);return S.useEffect(()=>{d(!1)},[o?.logoSrc]),!o?.logoSrc||c?m.jsx(hb,{"aria-hidden":"true",className:ye("shrink-0 text-muted-foreground",a,i)}):m.jsx("img",{src:o.logoSrc,alt:"","aria-hidden":"true",className:ye("shrink-0 object-contain",a),draggable:!1,onError:()=>d(!0)})}function FR(t){const a=PA(t,9,"..");if(a===t)return t;const i=a.slice(0,-2),o=i.search(/[-_.\s][^-_.\s]*$/);return`${o>=3?i.slice(0,o):i}..`}function XR(t){return t.replace("text-","bg-")}function D_({color:t,className:a}){return m.jsx("span",{"aria-hidden":"true",className:ye("size-2 shrink-0 rounded-full",XR(t),a)})}function ZR({name:t,color:a,shorten:i=!0,className:o}){return m.jsx("span",{title:t,className:ye("shrink-0 whitespace-nowrap rounded bg-foreground/[0.05] px-1 py-0.5 text-[10px] font-medium leading-none",o),children:m.jsx("span",{className:ye(a,"bg-[linear-gradient(90deg,currentColor_0.6em,var(--muted-foreground)_2.6em)] bg-clip-text [-webkit-text-fill-color:transparent]"),children:i?FR(t):t})})}const $R={sm:"size-3.5",md:"size-4",lg:"size-5"};function j_({agentType:t,label:a,showLabel:i=!0,size:o="md",className:c}){const d=a??YR(t,"Agent");return m.jsxs("span",{className:ye("inline-flex min-w-0 items-center gap-1.5",o==="sm"?"text-xs":"text-[13px]",c),title:i?void 0:d,children:[m.jsx(VR,{agentType:t,className:$R[o]}),i?m.jsx("span",{className:"truncate text-foreground/80",children:d}):m.jsx("span",{className:"sr-only",children:d})]})}function z_({name:t,className:a}){return m.jsxs("span",{title:t,className:ye("inline-flex min-w-0 items-center gap-1 text-muted-foreground",a),children:[m.jsx(hC,{"aria-hidden":"true",className:"size-3 shrink-0"}),m.jsx("span",{className:"truncate font-mono text-[11px]",children:t})]})}function L_({additions:t=0,deletions:a=0,bar:i=!1,className:o}){const c=t+a,d=c===0?0:Math.round(t/c*5);return m.jsxs("span",{className:ye("inline-flex shrink-0 items-center gap-1.5 font-mono text-[11px] tabular-nums",o),children:[t>0&&m.jsxs("span",{className:"text-success-ink",children:["+",t]}),a>0&&m.jsxs("span",{className:"text-destructive-ink",children:["−",a]}),c===0&&m.jsx("span",{className:"text-muted-foreground",children:"0"}),i&&m.jsx("span",{"aria-hidden":"true",className:"flex gap-px",children:Array.from({length:5}).map((f,h)=>m.jsx("span",{className:ye("size-1.5 rounded-[1px]",c===0?"bg-foreground/10":h<d?"bg-success":"bg-destructive")},h))})]})}const ca={Review:"Review",Running:"Running",Pending:"Pending",Done:"Done",Cancelled:"Cancelled"},mc={[ca.Review]:{label:"Review",icon:cC,iconClass:"text-warning",accentClass:"text-warning",titleClass:"font-semibold text-foreground"},[ca.Running]:{label:"Running",icon:Ar,iconClass:"text-info",accentClass:"text-info",titleClass:"task-title-running"},[ca.Pending]:{label:"Pending",icon:Uf,iconClass:"text-muted-foreground",accentClass:"text-muted-foreground",titleClass:""},[ca.Done]:{label:"Done",icon:Ji,iconClass:"text-success/80",accentClass:"text-success",titleClass:"text-muted-foreground"},[ca.Cancelled]:{label:"Cancelled",icon:db,iconClass:"text-muted-foreground/70",accentClass:"text-muted-foreground/70",titleClass:"text-muted-foreground"}},U_=[ca.Review,ca.Running,ca.Pending,ca.Done,ca.Cancelled],av=[{value:Xn.URGENT,code:"P0",label:"紧急",className:"bg-destructive/10 text-destructive-ink",iconName:"chevrons-up"},{value:Xn.HIGH,code:"P1",label:"高",className:"bg-warning/15 text-warning-ink",iconName:"signal-high"},{value:Xn.NORMAL,code:"P2",label:"普通",className:"bg-muted text-muted-foreground",iconName:"minus"},{value:Xn.LOW,code:"P3",label:"低",className:"bg-foreground/[0.06] text-muted-foreground",iconName:"chevrons-down"}];function JR(t){return av.find(a=>a.value===t)??av[2]}function WR({value:t,now:a,className:i}){const{t:o,locale:c}=Jt(),d=xR(),f=t instanceof Date?t:new Date(t);return m.jsx("time",{dateTime:f.toISOString(),title:f.toLocaleString(c),className:ye("shrink-0 tabular-nums text-muted-foreground",i),children:SR(f,a??d,o,c)})}function ek({status:t,className:a}){const{icon:i,iconClass:o}=mc[t];return m.jsx(i,{className:ye("size-4 shrink-0",o,a)})}function B_({status:t,className:a}){const{t:i}=Jt(),{label:o}=mc[t];return m.jsxs("span",{className:ye("inline-flex shrink-0 items-center gap-1.5 text-xs font-medium text-foreground/80 [&_svg]:size-3.5",a),children:[m.jsx(ek,{status:t}),i(o)]})}const tk={[Xn.URGENT]:"danger",[Xn.HIGH]:"warning",[Xn.NORMAL]:"neutral",[Xn.LOW]:"neutral"};function nk({priority:t,showLabel:a=!1,className:i}){const{t:o}=Jt(),c=JR(t),d=tk[c.value]??"neutral";return m.jsxs(CR,{tone:d,size:"sm",shape:"tag",title:`${c.code} · ${o(c.label)}`,className:ye("font-semibold",c.value===Xn.LOW&&"bg-foreground/[0.04]",i),children:[c.code,a&&m.jsx("span",{className:"font-medium",children:o(c.label)})]})}function q_({title:t,status:a,priority:i,project:o,updatedAt:c,now:d,active:f=!1,className:h,...y}){const{titleClass:g}=mc[a];return m.jsxs("button",{type:"button","data-sidebar-item":"","aria-current":f||void 0,title:o?`${t} · ${o.name}`:t,className:ye("task-row",LR(f),h),...y,children:[m.jsx("span",{className:ye("min-w-0 flex-1 truncate",g),children:t}),i!==void 0&&i!==Xn.NORMAL&&m.jsx(nk,{priority:i}),(o||c!==void 0)&&m.jsx("span",{className:"task-row-meta",children:m.jsxs("span",{className:"flex items-center gap-1",children:[o&&m.jsx(ZR,{name:o.name,color:o.color,className:"@max-[22rem]:hidden"}),c!==void 0&&m.jsx(WR,{value:c,now:d,className:"text-[11px]"})]})})]})}function P_({status:t,count:a,defaultOpen:i=!0,sticky:o=!0,children:c,className:d}){const{t:f}=Jt(),{icon:h,label:y,accentClass:g}=mc[t];return m.jsx(UR,{title:f(y),icon:m.jsx(h,{className:g}),count:a,countTone:t===ca.Review?"warning":"neutral",sticky:o,defaultOpen:i,className:ye(a>0&&"data-[state=open]:mb-4",d),children:c})}const ak={default:{variant:"primary"},destructive:{variant:"primary",tone:"danger"},outline:{variant:"secondary"},secondary:{variant:"soft"},ghost:{variant:"ghost"},link:{variant:"link"}},rk={default:{size:"lg"},xs:{size:"xs"},sm:{size:"md"},lg:{size:"xl"},icon:{size:"lg",iconOnly:!0},"icon-xs":{size:"xs",iconOnly:!0},"icon-sm":{size:"md",iconOnly:!0},"icon-lg":{size:"xl",iconOnly:!0}};function xa({className:t,variant:a="default",size:i="default",asChild:o=!1,...c}){const d=o?Qb:"button",f=a??"default",h=i??"default";return m.jsx(d,{"data-slot":"button","data-variant":f,"data-size":h,className:$b({...ak[f],...rk[h],className:t}),...c})}function _t({className:t,...a}){return m.jsx("div",{"data-slot":"skeleton","aria-hidden":"true",className:ye("animate-pulse rounded-md bg-muted motion-reduce:animate-none",t),...a})}function ik({children:t,className:a}){return m.jsx("div",{className:ye("mx-auto w-full max-w-4xl px-5 py-5 sm:px-8 sm:py-6",a),children:t})}function I_({title:t,description:a,actions:i,className:o}){return m.jsxs("div",{className:ye("mb-5 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",o),children:[m.jsxs("div",{className:"min-w-0",children:[m.jsx("h2",{className:"text-[22px] font-semibold tracking-tight text-foreground",children:t}),a&&m.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-muted-foreground",children:a})]}),i&&m.jsx("div",{className:"flex flex-wrap items-center gap-2 shrink-0",children:i})]})}function H_({children:t,className:a}){return m.jsx("h3",{className:ye("text-[12px] font-semibold uppercase tracking-wide text-muted-foreground",a),children:t})}function Q_({label:t,description:a,icon:i,children:o,align:c="start",controlWidth:d="fixed",className:f}){return m.jsxs("div",{className:ye("flex flex-col gap-3 py-5 sm:flex-row sm:justify-between sm:gap-8",c==="center"?"sm:items-center":"sm:items-start",f),children:[m.jsxs("div",{className:"flex min-w-0 items-start gap-3 sm:max-w-[360px]",children:[i&&m.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:m.jsx(i,{size:15})}),m.jsxs("div",{className:"min-w-0",children:[m.jsx("div",{className:"text-[13px] font-medium text-foreground",children:t}),a&&m.jsx("p",{className:"mt-0.5 text-xs leading-relaxed text-muted-foreground",children:a})]})]}),m.jsx("div",{className:ye("shrink-0",d==="fixed"?"w-full sm:w-[260px]":"w-auto"),children:o})]})}function K_({label:t,description:a,children:i,className:o,htmlFor:c}){return m.jsxs("div",{className:ye("space-y-1.5",o),children:[m.jsxs("div",{children:[m.jsx("label",{htmlFor:c,className:"block text-[13px] font-medium text-foreground",children:t}),a&&m.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:a})]}),i]})}function G_({icon:t,message:a,action:i,className:o}){return m.jsxs("div",{className:ye("rounded-xl border border-dashed border-border bg-muted/30 py-14 text-center",o),children:[t&&m.jsx(t,{size:48,strokeWidth:1.25,className:"mx-auto mb-3 text-muted-foreground/50","aria-hidden":"true"}),m.jsx("p",{className:"text-sm text-muted-foreground",children:a}),i&&m.jsx("div",{className:"mt-4 flex justify-center",children:i})]})}function Y_({saving:t,onSave:a,onCancel:i,className:o}){const{t:c}=Jt();return m.jsx("div",{className:ye("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",o),children:m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("span",{className:"text-xs text-muted-foreground",children:c("有未保存的更改")}),m.jsxs("div",{className:"flex items-center gap-2",children:[i&&m.jsx(xa,{size:"sm",variant:"ghost",onClick:i,disabled:t,children:c("取消")}),m.jsx(xa,{size:"sm",onClick:a,disabled:t,children:c(t?"保存中...":"保存")})]})]})})}function sk({rows:t=3}){return m.jsxs("div",{role:"status","aria-label":"Loading",children:[m.jsx(_t,{className:"h-7 w-36"}),m.jsx("div",{className:"mt-6 divide-y divide-border/60",children:Array.from({length:t}).map((a,i)=>m.jsxs("div",{className:"flex items-start justify-between gap-8 py-5",children:[m.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[m.jsx(_t,{className:"h-4 w-32"}),m.jsx(_t,{className:"h-3 w-64 max-w-full"})]}),m.jsx(_t,{className:"h-9 w-[260px] shrink-0 rounded-lg"})]},i))})]})}function V_(){return m.jsxs("div",{role:"status","aria-label":"Loading",children:[m.jsx(_t,{className:"h-7 w-36"}),m.jsxs("div",{className:"mt-6 grid gap-5 lg:grid-cols-[240px_minmax(0,1fr)]",children:[m.jsx("div",{className:"space-y-1",children:Array.from({length:5}).map((t,a)=>m.jsxs("div",{className:"flex items-center gap-3 rounded-lg px-3 py-2.5",children:[m.jsx(_t,{className:"h-2 w-2 rounded-full"}),m.jsxs("div",{className:"flex-1 space-y-1.5",children:[m.jsx(_t,{className:"h-3.5 w-3/4"}),m.jsx(_t,{className:"h-2.5 w-1/2"})]})]},a))}),m.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[m.jsxs("div",{className:"flex items-start justify-between gap-4",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx(_t,{className:"h-5 w-44"}),m.jsx(_t,{className:"h-3 w-28"})]}),m.jsx(_t,{className:"h-8 w-24 rounded-md"})]}),m.jsxs("div",{className:"mt-8 space-y-3",children:[m.jsx(_t,{className:"h-3 w-20"}),m.jsx(_t,{className:"h-24 w-full rounded-lg"}),m.jsx(_t,{className:"h-3 w-20"}),m.jsx(_t,{className:"h-16 w-full rounded-lg"})]})]})]})]})}function F_({cards:t=6}){return m.jsxs("div",{role:"status","aria-label":"Loading",children:[m.jsxs("div",{className:"flex items-center justify-between gap-4",children:[m.jsx(_t,{className:"h-7 w-36"}),m.jsx(_t,{className:"h-8 w-44 rounded-lg"})]}),m.jsx("div",{className:"mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:t}).map((a,i)=>m.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-border bg-card p-4",children:[m.jsx(_t,{className:"h-10 w-10 shrink-0 rounded-full"}),m.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[m.jsx(_t,{className:"h-4 w-2/3"}),m.jsx(_t,{className:"h-3 w-1/2"}),m.jsx(_t,{className:"h-3 w-3/4"})]})]},i))})]})}const ok=S.lazy(()=>cn(()=>import("./GeneralSettingsPage-RMN2al8I.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(t=>({default:t.GeneralSettingsPage}))),lk=S.lazy(()=>cn(()=>import("./TranslationSettingsPage-Cod9c4Ug.js"),__vite__mapDeps([15,16,11,12,13,6,7,5,9,8,17,18])).then(t=>({default:t.TranslationSettingsPage}))),ck=S.lazy(()=>cn(()=>import("./ProviderSettingsPage-DqA_B1Ey.js"),__vite__mapDeps([19,20,4,5,14,21,22,7,23,1,2,3,6,8,9,10,11,12,13,24,25,26,27,16,28,18,29,30,31,32,33,34])).then(t=>({default:t.ProviderSettingsPage}))),uk=S.lazy(()=>cn(()=>import("./AgentEnvironmentSettingsPage-GHjKIWpb.js"),[]).then(t=>({default:t.AgentEnvironmentSettingsPage}))),dk=S.lazy(()=>cn(()=>import("./TeamSettingsPage-DwWROtW6.js"),__vite__mapDeps([35,21,22,7,23,1,2,3,4,5,6,8,9,10,24,25,26,27,16,28,18,29,36,37,14,32,38])).then(t=>({default:t.TeamSettingsPage}))),fk=S.lazy(()=>cn(()=>import("./ProjectSettingsPage-cus6Ns97.js"),__vite__mapDeps([39,40,41,42,27,43,18,7,8,17,32,23,22,44,5,30,45,3,4])).then(t=>({default:t.ProjectSettingsPage}))),hk=S.lazy(()=>cn(()=>import("./NotificationSettingsPage-BEyuyu3Z.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,8,9,10,12,13,47,48])).then(t=>({default:t.NotificationSettingsPage}))),mk=S.lazy(()=>cn(()=>import("./McpSettingsPage-CPNxFF67.js"),__vite__mapDeps([49,28,50,5])).then(t=>({default:t.McpSettingsPage}))),pk=S.lazy(()=>cn(()=>import("./ProfileSettingsPage-CHe4LlRp.js"),__vite__mapDeps([51,52,23,22,7,21,11,53,4,32,34])).then(t=>({default:t.ProfileSettingsPage}))),rv=[{id:"general",label:"通用",icon:jy},{id:"translation",label:"语言转换",icon:jy},{id:"agent-environment",label:"Agent 环境",icon:ub},{id:"agents",label:"Agent 配置",icon:hb},{id:"team",label:"团队协作",icon:MC},{id:"projects",label:"项目配置",icon:dC},{id:"notifications",label:"通知",icon:YT},{id:"mcp",label:"MCP 配置",icon:XT}];function gk({tab:t}){switch(t){case"general":return m.jsx(ok,{});case"translation":return m.jsx(lk,{});case"agent-environment":return m.jsx(uk,{});case"agents":return m.jsx(ck,{});case"team":return m.jsx(dk,{});case"projects":return m.jsx(fk,{});case"notifications":return m.jsx(hk,{});case"mcp":return m.jsx(mk,{});case"agents-legacy":return m.jsx(pk,{})}}function yk(){return m.jsx(ik,{children:m.jsx(sk,{rows:3})})}function vk(){const{t}=Jt(),a=io(g=>g.settingsOpen),i=io(g=>g.settingsTab),o=io(g=>g.closeSettings),c=io(g=>g.setSettingsTab),[d,f]=S.useState(!1),h=S.useRef(!1),y=S.useRef(null);return S.useEffect(()=>{if(a){const g=requestAnimationFrame(()=>f(!0));h.current||(Pf(),h.current=!0);const x=requestAnimationFrame(()=>y.current?.focus());return()=>{cancelAnimationFrame(g),cancelAnimationFrame(x)}}else{const g=setTimeout(()=>f(!1),200);return h.current&&(lc(),h.current=!1),()=>clearTimeout(g)}},[a]),S.useEffect(()=>()=>{h.current&&(lc(),h.current=!1)},[]),S.useEffect(()=>{if(!a)return;const g=x=>{x.key==="Escape"&&IA()===1&&o()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[a,o]),!d&&!a?null:m.jsxs("div",{className:ye("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:[m.jsx("div",{className:"absolute inset-0 bg-black/20",onClick:o,"aria-hidden":"true"}),m.jsxs("div",{ref:y,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":t("设置"),className:ye("relative flex w-full max-w-[1100px] flex-col overflow-hidden rounded-xl bg-background shadow-overlay 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:[m.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:[m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary text-primary-foreground","aria-hidden":"true",children:m.jsx(EC,{size:14})}),m.jsx("h2",{className:"text-[15px] font-semibold text-foreground",children:t("设置")})]}),m.jsx("button",{onClick:o,"aria-label":t("取消"),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:m.jsx(Bf,{size:15})})]}),m.jsx("div",{className:"sm:hidden flex shrink-0 border-b border-border/60 bg-background overflow-x-auto scrollbar-none",role:"tablist",children:rv.map(g=>m.jsxs("button",{role:"tab","aria-selected":i===g.id,onClick:()=>c(g.id),className:ye("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",i===g.id?"border-primary text-foreground font-medium":"border-transparent text-muted-foreground hover:text-foreground"),children:[m.jsx(g.icon,{size:13,"aria-hidden":"true"}),m.jsx("span",{children:t(g.label)})]},g.id))}),m.jsxs("div",{className:"flex flex-1 min-h-0",children:[m.jsx("nav",{"aria-label":t("设置"),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:rv.map(g=>m.jsxs("button",{"aria-current":i===g.id?"page":void 0,onClick:()=>c(g.id),className:ye("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",i===g.id?"bg-background text-foreground font-medium shadow-raised ring-1 ring-foreground/[0.04]":"text-muted-foreground hover:text-foreground hover:bg-background/60"),children:[m.jsx(g.icon,{size:15,className:"shrink-0","aria-hidden":"true"}),m.jsx("span",{children:t(g.label)})]},g.id))}),m.jsx("div",{className:"flex-1 min-w-0 overflow-y-auto scrollbar-app-thin bg-background",children:m.jsx(S.Suspense,{fallback:m.jsx(yk,{}),children:a&&m.jsx(gk,{tab:i})})})]})]})]})}const e0="agent-tower:desktop-titlebar",cf="agent-tower:desktop-platform",si={desktop:"1",desktopTitlebar:"integrated"},t0=S.createContext(null),bk={usesIntegratedTitlebar:!1,desktopPlatform:"unknown",hasMacTrafficLights:!1,preserveDesktopSearch:t=>t};function xk(t){const a=new URLSearchParams(t);return a.get("desktop")===si.desktop&&a.get("desktopTitlebar")===si.desktopTitlebar}function n0(t){return t==="darwin"||t==="win32"||t==="linux"?t:"unknown"}function Sk(){if(typeof window>"u")return"unknown";try{return n0(window.sessionStorage.getItem(cf))}catch{return"unknown"}}function wk(t){if(!(typeof window>"u"))try{t==="unknown"?window.sessionStorage.removeItem(cf):window.sessionStorage.setItem(cf,t)}catch{}}function Ek(){if(typeof window>"u")return"none";try{return window.sessionStorage.getItem(e0)===si.desktopTitlebar?"integrated":"none"}catch{return"none"}}function Tk(t){if(!(typeof window>"u"))try{t==="integrated"&&window.sessionStorage.setItem(e0,si.desktopTitlebar)}catch{}}function Ck(t){return xk(t)?(Tk("integrated"),"integrated"):Ek()}function Ak(t){const a=new URLSearchParams(t),i=n0(a.get("desktopPlatform"));return a.get("desktop")===si.desktop&&i!=="unknown"?(wk(i),i):Sk()}function iv(t,a){const i=new URLSearchParams(t);i.set("desktop",si.desktop),i.set("desktopTitlebar",si.desktopTitlebar),a!=="unknown"&&i.set("desktopPlatform",a);const o=i.toString();return o?`?${o}`:""}function Rk(t,a){if(typeof t=="string"){const i=t.indexOf("#"),o=i>=0?t.slice(0,i):t,c=i>=0?t.slice(i):"",d=o.indexOf("?"),f=d>=0?o.slice(0,d):o,h=d>=0?o.slice(d):"";return`${f}${iv(h,a)}${c}`}return{...t,search:iv(t.search??"",a)}}function kk({children:t}){const a=Nr(),i=S.useMemo(()=>Ck(a.search),[a.search]),o=S.useMemo(()=>Ak(a.search),[a.search]),c=i==="integrated",d=c&&o==="darwin",f=S.useMemo(()=>({usesIntegratedTitlebar:c,desktopPlatform:o,hasMacTrafficLights:d,preserveDesktopSearch:h=>c?Rk(h,o):h}),[o,d,c]);return m.jsx(t0.Provider,{value:f,children:t})}function a0(){return S.useContext(t0)??bk}function Nk(){const t=Mf(),{preserveDesktopSearch:a}=a0();return S.useMemo(()=>((o,c)=>typeof o=="number"?t(o):t(a(o),c)),[t,a])}function _k(){return ln({queryKey:le.agentCli.manifest,queryFn:()=>Be.get("/agent-cli/manifest")})}function r0(){return ln({queryKey:le.agentCli.status,queryFn:()=>Be.get("/agent-cli/status")})}function i0(){const t=rt();return gt({mutationFn:()=>Be.post("/agent-cli/status/refresh"),onSuccess:a=>{t.setQueryData(le.agentCli.status,a)}})}function Ok(){const t=rt();return gt({mutationFn:a=>Be.post("/agent-cli/install-previews",{toolId:a}),onSuccess:a=>{t.setQueryData(le.agentCli.preview(a.id),a)}})}function Mk(t,a=!0){return ln({queryKey:t?le.agentCli.task(t):["agent-cli","task",null],queryFn:()=>Be.get(`/agent-cli/install-tasks/${t}`),enabled:!!t&&a,refetchInterval:i=>{const o=i.state.data?.status;return o==="running"||o==="verifying"||o==="cancelling"?1e3:!1}})}function Dk(t,a=!0){return ln({queryKey:t?le.agentCli.logs(t):["agent-cli","logs",null],queryFn:()=>Be.get(`/agent-cli/install-tasks/${t}/logs`),enabled:!!t&&a,refetchInterval:a&&t?1e3:!1})}function jk(){const t=rt();return gt({mutationFn:a=>Be.post("/agent-cli/install-tasks",{previewId:a}),onSuccess:({task:a})=>{t.setQueryData(le.agentCli.task(a.id),a),t.invalidateQueries({queryKey:le.agentCli.status})}})}function zk(){const t=rt();return gt({mutationFn:a=>Be.post(`/agent-cli/install-tasks/${a}/cancel`),onSuccess:a=>{t.setQueryData(le.agentCli.task(a.id),a)}})}const s0=["codex","claude-code","cursor-agent"];function o0(t){return s0.includes(t)}function Lk(t){return s0.some(a=>t?.some(i=>i.toolId===a&&i.installStatus==="installed"))}const Zl=new Set(["succeeded","failed","cancelled"]),Uk="AGENT_CLI_INSTALL_LOCAL_ONLY",Bk=[];function qk(t){if(!(t instanceof ns))return;const a=t.details.code;return typeof a=="string"?a:void 0}function Ki(t,a){return t instanceof ns&&(t.status===403||qk(t)===Uk)?"需要在本机 Agent Tower 打开后安装。":t instanceof Error?t.message:a}function Pk(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/1024/1024).toFixed(2)} MB`}function Ik(t){return t==="darwin"?"macOS":t==="linux"?"Linux":t==="win32"?"Windows":t??"Unknown"}function Hk(t){return t.map(a=>a.data.endsWith(`
14
- `)?a.data:`${a.data}
15
- `).join("")}function Qk(t){switch(t?.installStatus){case"installed":return{label:"已安装",className:"bg-success/10 text-success-ink",icon:Ji};case"legacy_detected":return{label:"Legacy 已检测",className:"bg-warning/10 text-warning-ink",icon:Ji};case"missing":return{label:"未安装",className:"bg-muted text-muted-foreground",icon:fb};case"unsupported":return{label:"当前平台不支持",className:"bg-muted text-muted-foreground",icon:Rr};case"error":return{label:"检测失败",className:"bg-destructive/10 text-destructive-ink",icon:Rr};default:return{label:"未检测",className:"bg-muted text-muted-foreground",icon:Uf}}}function Kk(t){switch(t){case"running":return"安装中";case"verifying":return"验证中";case"succeeded":return"已完成";case"failed":return"失败";case"cancelling":return"取消中";case"cancelled":return"已取消";default:return"未开始"}}function Gk(t){return t?.installStatus==="installed"}function Yk({status:t}){const{t:a}=Jt(),i=Qk(t),o=i.icon;return m.jsxs("span",{className:ye("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",i.className),children:[m.jsx(o,{size:11,"aria-hidden":"true"}),a(i.label)]})}function Vk({item:t,status:a,selected:i,disabled:o,onSelect:c,onPreview:d,previewing:f,previewDisabled:h}){const{t:y}=Jt(),g=t.install.kind==="downloaded-script"&&o0(t.id),x=Gk(a),v=a?.installStatus==="unsupported";return m.jsx("div",{className:ye("rounded-lg border px-4 py-3 transition-colors",i?"border-primary bg-muted/30":"border-border bg-background"),children:m.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[m.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:[m.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[m.jsx("span",{className:"text-sm font-semibold text-foreground",children:t.displayName}),m.jsx(Yk,{status:a}),t.legacy&&m.jsx("span",{className:"rounded-full bg-warning/10 px-2 py-0.5 text-xs font-medium text-warning-ink",children:y("迁移中")})]}),m.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[m.jsx("span",{children:t.description??y("Agent CLI 工具")}),t.install.kind==="detect-only"&&m.jsx("span",{children:t.install.reason}),a?.version&&m.jsxs("span",{className:"font-mono",children:["v",a.version]}),a?.authStatus==="needs_interactive_login"&&m.jsx("span",{children:y("需要登录")})]})]}),m.jsx("div",{className:"flex shrink-0 items-center gap-2",children:g?m.jsxs("div",{className:"flex flex-col items-start gap-1 sm:items-end",children:[m.jsxs(xa,{size:"sm",variant:x?"outline":"default",onClick:d,disabled:o||h||f||v,children:[f?m.jsx(Ar,{className:"animate-spin motion-reduce:[animation-duration:2.4s]",size:14}):m.jsx(mb,{size:14}),y(x?"重新预览":"预览安装")]}),v&&m.jsx("span",{className:"max-w-40 text-xs text-muted-foreground",children:y("当前平台不可安装。")})]}):m.jsxs(xa,{size:"sm",variant:"outline",disabled:!0,children:[m.jsx(ef,{size:14}),y("只检测")]})})]})})}function Fk({preview:t,item:a,confirmed:i,onConfirmedChange:o,onInstall:c,installing:d,disabled:f}){const{t:h}=Jt();return m.jsxs("section",{className:"rounded-lg border border-border bg-muted/20 p-4",children:[m.jsxs("div",{className:"flex items-start gap-2.5",children:[m.jsx(CC,{size:16,className:"mt-0.5 shrink-0 text-success","aria-hidden":"true"}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("h3",{className:"text-sm font-semibold text-foreground",children:h("安装预览")}),m.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:h("安装任务将使用后端 manifest 中的受控计划执行,前端只提交工具选择和预览 ID。")})]})]}),m.jsxs("dl",{className:"mt-4 grid gap-3 text-xs sm:grid-cols-2",children:[m.jsxs("div",{children:[m.jsx("dt",{className:"text-muted-foreground",children:h("平台")}),m.jsx("dd",{className:"mt-1 font-medium text-foreground",children:Ik(t.platform)})]}),m.jsxs("div",{children:[m.jsx("dt",{className:"text-muted-foreground",children:h("脚本大小")}),m.jsx("dd",{className:"mt-1 font-medium text-foreground",children:Pk(t.sizeBytes)})]}),m.jsxs("div",{className:"sm:col-span-2",children:[m.jsx("dt",{className:"text-muted-foreground",children:h("最终下载地址")}),m.jsx("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:t.finalUrl})]}),m.jsxs("div",{children:[m.jsx("dt",{className:"text-muted-foreground",children:h("解释器")}),m.jsxs("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:[t.interpreter.command,t.interpreter.args.length>0?` ${t.interpreter.args.join(" ")}`:""]})]}),m.jsxs("div",{children:[m.jsx("dt",{className:"text-muted-foreground",children:h("固定参数")}),m.jsx("dd",{className:"mt-1 break-all font-mono text-xs text-foreground",children:t.fixedArgs.length>0?t.fixedArgs.join(" "):h("无")})]}),m.jsxs("div",{className:"sm:col-span-2",children:[m.jsx("dt",{className:"text-muted-foreground",children:"SHA-256"}),m.jsx("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:t.sha256})]})]}),t.platform==="win32"&&m.jsx(NR,{tone:"info",size:"sm",className:"mt-4",children:h("Windows 将下载并执行官方 PowerShell 安装脚本;不会使用复制粘贴式 shell pipeline。")}),a?.officialSources.length?m.jsxs("div",{className:"mt-4",children:[m.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:h("官方来源")}),m.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:a.officialSources.map(y=>m.jsxs("a",{href:y.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:[y.label,m.jsx(oC,{size:11,"aria-hidden":"true"})]},y.url))})]}):null,t.redirectChain.length>0&&m.jsxs("div",{className:"mt-4",children:[m.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:h("下载链路")}),m.jsx("div",{className:"mt-2 space-y-1 rounded-md bg-background px-3 py-2",children:t.redirectChain.map((y,g)=>m.jsxs("div",{className:"flex items-start justify-between gap-3 text-[11px]",children:[m.jsxs("span",{className:"break-all text-foreground",children:[y.host,y.path]}),m.jsx("span",{className:"shrink-0 font-mono text-muted-foreground",children:y.statusCode})]},`${y.url}-${g}`))})]}),t.riskNotes.length>0&&m.jsxs("div",{className:"mt-4 rounded-lg border border-warning/25 bg-warning/10 px-3 py-2.5",children:[m.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-warning-ink",children:[m.jsx(Rr,{size:13,"aria-hidden":"true"}),h("安装风险")]}),m.jsx("ul",{className:"mt-2 space-y-1 text-xs leading-relaxed text-foreground",children:t.riskNotes.map(y=>m.jsxs("li",{children:["• ",y]},y))})]}),m.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:[m.jsx("input",{type:"checkbox",checked:i,onChange:y=>o(y.target.checked),className:"mt-0.5 h-4 w-4 rounded border-border"}),m.jsx("span",{children:h("我已确认官方来源、下载摘要和风险说明。")})]}),m.jsx("div",{className:"mt-4 flex justify-end",children:m.jsxs(xa,{onClick:c,disabled:!i||d||f,children:[d?m.jsx(Ar,{className:"animate-spin motion-reduce:[animation-duration:2.4s]",size:14}):m.jsx(mb,{size:14}),h("确认安装")]})})]})}function Xk({task:t,logs:a,onCancel:i,cancelling:o}){const{t:c}=Jt(),d=t&&!Zl.has(t.status),f=t?.status==="failed",h=t?.status==="succeeded";return m.jsxs("section",{className:"rounded-lg border border-border bg-background p-4",children:[m.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[d?m.jsx(Ar,{className:"animate-spin motion-reduce:[animation-duration:2.4s] text-primary",size:16,"aria-hidden":"true"}):h?m.jsx(Ji,{className:"text-success",size:16,"aria-hidden":"true"}):f?m.jsx(fb,{className:"text-destructive",size:16,"aria-hidden":"true"}):m.jsx(NC,{className:"text-muted-foreground",size:16,"aria-hidden":"true"}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-sm font-semibold text-foreground",children:c("安装任务")}),m.jsx("p",{className:"text-xs text-muted-foreground",children:c(Kk(t?.status))})]})]}),d&&m.jsxs(xa,{size:"sm",variant:"outline",onClick:i,disabled:o,children:[o?m.jsx(Ar,{className:"animate-spin motion-reduce:[animation-duration:2.4s]",size:14}):m.jsx(RC,{size:14}),c("取消")]})]}),t?.errorMessage&&m.jsx("div",{className:"mt-3 rounded-md border border-destructive/25 bg-destructive/10 px-3 py-2 text-xs text-destructive-ink",children:t.errorMessage}),t?.errorCode==="VERIFY_FAILED"&&m.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 后重新检测。")}),m.jsx("pre",{className:"mt-4 max-h-56 overflow-auto rounded-lg bg-muted/60 p-3 font-mono text-xs leading-relaxed text-foreground scrollbar-app-thin",children:a||c("等待安装日志...")})]})}function Zk({variant:t="settings",onSkip:a}){const{t:i}=Jt(),o=_k(),c=r0(),d=i0(),f=Ok(),h=jk(),y=zk(),[g,x]=S.useState(null),[v,E]=S.useState(null),[R,j]=S.useState(null),[U,K]=S.useState(!1),[H,Q]=S.useState(null),[W,me]=S.useState(null),he=S.useRef(!1),fe=S.useRef(null),k=S.useRef(0),Y=Mk(R),re=R?Y.data??(h.data?.task.id===R?h.data.task:void 0):void 0,Oe=re?!Zl.has(re.status):!1,Ne=Dk(R,!!R&&(Oe||!re)),Ee=o.data??Bk,je=S.useMemo(()=>new Map((c.data?.tools??[]).map(J=>[J.toolId,J])),[c.data]),Ue=S.useMemo(()=>(Ee.find(ae=>o0(ae.id)&&je.get(ae.id)?.installStatus!=="installed")??Ee[0])?.id??null,[Ee,je]),Ce=g??Ue,_=v?Ee.find(J=>J.id===v.toolId)??null:null,F=!!re&&!Zl.has(re.status),I=Hk(Ne.data?.entries??[]),pe=()=>{E(null),K(!1)};S.useEffect(()=>{he.current||c.data?.stale&&(he.current=!0,d.mutate(void 0,{onError:J=>{Q(Ki(J,i("检测失败")))}}))},[d,c.data?.stale,i]),S.useEffect(()=>{!re||!Zl.has(re.status)||fe.current!==re.id&&(fe.current=re.id,Ne.refetch(),d.mutate(void 0,{onError:J=>{Q(Ki(J,i("检测失败")))}}))},[Ne,d,re,i]);const be=()=>{Q(null),d.mutate(void 0,{onError:J=>{const ae=Ki(J,i("检测失败"));Q(ae),Gi.error(ae)}})},C=J=>{k.current+=1,me(null),x(J),pe(),Q(null)},q=J=>{const ae=k.current+1;k.current=ae,x(J),me(J),pe(),Q(null),f.mutate(J,{onSuccess:Ae=>{k.current!==ae||Ae.toolId!==J||(E(Ae),K(!1))},onError:Ae=>{if(k.current!==ae)return;const Pe=Ki(Ae,i("创建安装预览失败"));Q(Pe),Gi.error(Pe)},onSettled:()=>{k.current===ae&&me(null)}})},P=()=>{if(!v||!_||v.toolId!==_.id||!U){K(!1),Q(i("安装预览已失效,请重新预览当前工具。"));return}Q(null),h.mutate(v.id,{onSuccess:J=>{j(J.task.id),E(null),K(!1),Gi.success(J.reused?i("已有安装任务正在运行"):i("安装任务已启动"))},onError:J=>{const ae=Ki(J,i("启动安装失败"));Q(ae),Gi.error(ae)}})},Z=()=>{R&&y.mutate(R,{onError:J=>{const ae=Ki(J,i("取消安装失败"));Q(ae),Gi.error(ae)}})},ee=()=>{re?.toolId&&(j(null),fe.current=null,q(re.toolId))};return o.isLoading||c.isLoading?m.jsx("div",{className:"space-y-3",children:Array.from({length:4}).map((J,ae)=>m.jsx("div",{className:"h-20 animate-pulse motion-reduce:animate-none rounded-lg bg-muted"},ae))}):o.isError||c.isError?m.jsx("div",{role:"alert",className:"rounded-lg border border-destructive/25 bg-destructive/10 px-4 py-3 text-sm text-destructive-ink",children:i("Agent CLI 环境信息加载失败。")}):m.jsxs("div",{className:ye("space-y-5",t==="onboarding"&&"max-h-[min(72vh,720px)] overflow-y-auto pr-1 scrollbar-app-thin"),children:[m.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[m.jsxs("div",{className:"min-w-0",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[m.jsx("h3",{className:"text-base font-semibold text-foreground",children:i("Agent CLI 环境")}),c.data?.stale&&m.jsx("span",{className:"rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground",children:i("状态待检测")})]}),m.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:i("Codex、Claude Code 和 Cursor 可通过官方安装计划引导安装;Gemini CLI 首版只检测。")})]}),m.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a&&m.jsx(xa,{size:"sm",variant:"ghost",onClick:a,children:i("跳过")}),m.jsxs(xa,{size:"sm",variant:"outline",onClick:be,disabled:d.isPending,children:[m.jsx(xC,{className:ye(d.isPending&&"animate-spin motion-reduce:[animation-duration:2.4s]"),size:14}),i("重新检测")]})]})]}),H&&m.jsx("div",{role:"alert",className:"rounded-lg border border-warning/25 bg-warning/10 px-4 py-3 text-sm text-foreground",children:m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx(Rr,{size:15,className:"mt-0.5 shrink-0 text-warning","aria-hidden":"true"}),m.jsx("span",{children:H})]})}),m.jsx("div",{className:"grid gap-3",children:Ee.map(J=>m.jsx(Vk,{item:J,status:je.get(J.id),selected:J.id===Ce,disabled:F,onSelect:()=>C(J.id),onPreview:()=>q(J.id),previewing:f.isPending&&W===J.id,previewDisabled:f.isPending},J.id))}),v&&_&&m.jsx(Fk,{preview:v,item:_,confirmed:U,onConfirmedChange:K,onInstall:P,installing:h.isPending,disabled:F}),re&&m.jsxs("div",{className:"space-y-3",children:[m.jsx(Xk,{task:re,logs:I,onCancel:Z,cancelling:y.isPending}),re.status==="failed"&&m.jsx("div",{className:"flex justify-end",children:m.jsxs(xa,{size:"sm",variant:"outline",onClick:ee,disabled:f.isPending,children:[m.jsx(fc,{size:14}),i("重试")]})})]})]})}const l0="agentCliEnvironmentOnboardingSkipped";function $k(){return typeof window>"u"?!0:window.localStorage.getItem(l0)==="true"}function Jk(){typeof window>"u"||window.localStorage.setItem(l0,"true")}function Wk(){const{t}=Jt(),a=r0(),i=i0(),[o,c]=S.useState($k),d=S.useRef(!1),f=S.useMemo(()=>{if(o)return!1;const y=a.data;return!y||y.stale?!1:!Lk(y.tools)},[o,a.data]);S.useEffect(()=>{o||d.current||!a.data?.stale||(d.current=!0,i.mutate())},[o,i,a.data?.stale]),S.useEffect(()=>{if(f)return Pf(),()=>lc()},[f]);const h=()=>{Jk(),c(!0)};return f?m.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":t("Agent 环境引导"),children:[m.jsx("div",{className:"absolute inset-0 bg-black/20","aria-hidden":"true"}),m.jsxs("div",{className:ye("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-popover","sm:max-h-[calc(100vh-3rem)]"),children:[m.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:[m.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[m.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:m.jsx(ub,{size:18})}),m.jsxs("div",{className:"min-w-0",children:[m.jsx("h2",{className:"text-base font-semibold text-foreground",children:t("配置本机 Agent CLI")}),m.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:t("当前没有检测到可用的 Codex、Claude Code 或 Cursor CLI。可以先完成安装,也可以稍后从设置里打开。")})]})]}),m.jsx("button",{type:"button",onClick:h,"aria-label":t("跳过"),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:m.jsx(Bf,{size:16})})]}),m.jsx("div",{className:"min-h-0 flex-1 overflow-hidden p-5",children:m.jsx(Zk,{variant:"onboarding",onSkip:h})})]})]}):null}function e2(){return m.jsx(kk,{children:m.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[m.jsx(FE,{}),m.jsx(vk,{}),m.jsx(Wk,{})]})})}function t2(t,a,i={}){const o=a instanceof Error?a:new Error(n2(a));return{time:new Date().toISOString(),source:t,name:o.name,message:o.message,...o.stack?{stack:o.stack}:{},...i.componentStack?{componentStack:i.componentStack}:{},...i.metadata?{metadata:i.metadata}:{}}}function c0(t,a,i={}){try{console.error(`[error-log] ${t}`,t2(t,a,i))}catch{}}function n2(t){if(typeof t=="string")return t;if(t===void 0)return"undefined";try{return JSON.stringify(t)??String(t)}catch{return String(t)}}class Gf extends S.Component{state={error:null};static getDerivedStateFromError(a){return{error:a}}componentDidCatch(a,i){c0(this.props.source,a,{componentStack:i.componentStack,metadata:this.props.metadata}),this.props.onError?.(a,i)}reset=()=>{this.setState({error:null})};render(){const{error:a}=this.state;return a?this.props.fallback({error:a,reset:this.reset}):this.props.children}}function a2({children:t}){const{t:a}=Jt();return m.jsx(Gf,{source:"app-root",fallback:({error:i})=>m.jsxs("div",{role:"alert",className:"flex min-h-dvh flex-col items-center justify-center gap-4 bg-background px-6 py-12 text-center text-foreground",children:[m.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full border border-destructive/20 bg-destructive/10 text-destructive",children:m.jsx(Rr,{size:22})}),m.jsxs("div",{className:"space-y-1",children:[m.jsx("h1",{className:"text-base font-semibold",children:a("Something went wrong")}),m.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:a("The interface hit a rendering error. Reload the page to continue.")})]}),m.jsx("p",{className:"max-w-xl truncate rounded-md border border-border/60 bg-muted/40 px-2 py-1 font-mono text-xs text-muted-foreground",title:i.message||i.name,children:i.message||i.name}),m.jsx("p",{className:"max-w-md text-xs text-muted-foreground",children:a("Only rendering errors are caught here. Errors from event handlers, async callbacks or observers are not.")}),m.jsxs(cc,{variant:"primary",size:"sm",onClick:()=>window.location.reload(),children:[m.jsx(fc,{}),a("Reload page")]})]}),children:t})}function r2({children:t}){return m.jsx(Gf,{source:"app-shell",fallback:({error:a})=>m.jsxs("div",{role:"alert",className:"flex min-h-dvh flex-col items-center justify-center gap-4 bg-background px-6 py-12 text-center text-foreground",children:[m.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full border border-destructive/20 bg-destructive/10 text-destructive",children:m.jsx(Rr,{size:22})}),m.jsxs("div",{className:"space-y-1",children:[m.jsx("h1",{className:"text-base font-semibold",children:la("Something went wrong")}),m.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:la("The interface could not be displayed. Reload the page to try again.")})]}),m.jsx("p",{className:"max-w-xl truncate rounded-md border border-border/60 bg-muted/40 px-2 py-1 font-mono text-xs text-muted-foreground",title:a.message||a.name,children:a.message||a.name}),m.jsx("p",{className:"max-w-md text-xs text-muted-foreground",children:la("Only rendering errors are caught here. Errors from event handlers, async callbacks or observers are not.")}),m.jsxs(cc,{variant:"primary",size:"sm",onClick:()=>window.location.reload(),children:[m.jsx(fc,{}),la("Reload page")]})]}),children:t})}function i2(t){if(t instanceof Error)return t.message||t.name;if(typeof t=="string")return t;if(t&&typeof t=="object"){const{status:a,statusText:i,message:o}=t;if(typeof o=="string"&&o)return o;if(typeof a=="number")return typeof i=="string"&&i?`${a} ${i}`:String(a)}return t==null?"Unknown route error":String(t)}function sv(){const t=nb(),a=Mf(),{t:i}=Jt(),o=S.useRef(void 0);S.useEffect(()=>{o.current!==t&&(o.current=t,c0("router.errorElement",t,{metadata:{path:typeof window>"u"?null:window.location.pathname}}))},[t]);const c=i2(t);return m.jsxs("div",{role:"alert",className:"flex min-h-dvh flex-col items-center justify-center gap-4 bg-background px-6 py-12 text-center text-foreground",children:[m.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full border border-destructive/20 bg-destructive/10 text-destructive",children:m.jsx(Rr,{size:22})}),m.jsxs("div",{className:"space-y-1",children:[m.jsx("h1",{className:"text-base font-semibold",children:i("Something went wrong")}),m.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:i("This page could not be displayed. Go back to the task board and try again.")})]}),m.jsx("p",{className:"max-w-xl truncate rounded-md border border-border/60 bg-muted/40 px-2 py-1 font-mono text-xs text-muted-foreground",title:c,children:c}),m.jsx("p",{className:"max-w-md text-xs text-muted-foreground",children:i("Only rendering errors are caught here. Errors from event handlers, async callbacks or observers are not.")}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsxs(cc,{variant:"primary",size:"sm",onClick:()=>a("/"),children:[m.jsx(HT,{}),i("Back to home")]}),m.jsxs(cc,{size:"sm",onClick:()=>window.location.reload(),children:[m.jsx(fc,{}),i("Retry")]})]})]})}const s2="/assets/agent-tower-logo-fKNk9Ce3.png",o2=`
16
- @media (prefers-reduced-motion: reduce) {
17
- .loading-anim-area,
18
- .loading-anim-area * {
19
- animation-duration: 0.01ms !important;
20
- animation-iteration-count: 1 !important;
21
- transition-duration: 0.01ms !important;
22
- }
23
- }
24
- `;function l2(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsxs("div",{className:"relative w-10 h-10 loading-anim-area",children:[m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",className:"w-10 h-10 text-primary",children:[m.jsx("path",{d:"M12 2L2 7L12 12L22 7L12 2Z",fill:"currentColor",className:"animate-pulse motion-reduce:animate-none"}),m.jsx("path",{d:"M2 17L12 22L22 17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-40"}),m.jsx("path",{d:"M2 12L12 17L22 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-60"})]}),m.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:m.jsx("div",{className:"w-2 h-2 rounded-full bg-primary animate-ping motion-reduce:animate-none opacity-40"})})]}),m.jsx("span",{className:"text-sm text-muted-foreground animate-pulse motion-reduce:animate-none",children:"Loading"})]})}function c2(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsx("div",{className:"flex items-end gap-1 h-8 loading-anim-area",children:[0,1,2,3,4].map(t=>m.jsx("div",{className:"w-1.5 bg-primary/80 rounded-full",style:{animation:`stackRise 1.2s ease-in-out ${t*.15}s infinite`,height:"8px"}},t))}),m.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),m.jsx("style",{children:`
25
- @keyframes stackRise {
26
- 0%, 100% { height: 8px; opacity: 0.4; }
27
- 50% { height: 28px; opacity: 1; }
28
- }
29
- @media (prefers-reduced-motion: reduce) {
30
- @keyframes stackRise {
31
- 0%, 100% { height: 16px; opacity: 0.7; }
32
- }
33
- }
34
- `})]})}function u2(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsxs("div",{className:"relative w-10 h-10 loading-anim-area",children:[m.jsx("div",{className:"absolute inset-0 border-2 border-border rounded-full"}),m.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"}}),m.jsx("div",{className:"absolute inset-[6px] border border-border/60 rounded-full"}),m.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"}})]}),m.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),m.jsx("style",{children:`
35
- @keyframes orbitSpin {
36
- to { transform: rotate(360deg); }
37
- }
38
- @media (prefers-reduced-motion: reduce) {
39
- @keyframes orbitSpin {
40
- to { transform: rotate(0deg); }
41
- }
42
- }
43
- `})]})}function d2(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsxs("div",{className:"flex items-center gap-0.5 px-4 py-2 bg-primary rounded-lg loading-anim-area",children:[m.jsx("span",{className:"text-primary-foreground text-xs font-mono tracking-wider",children:"loading"}),m.jsx("span",{className:"inline-block w-[7px] h-4 bg-primary-foreground/80 ml-0.5",style:{animation:"termBlink 1s steps(1) infinite"}})]}),m.jsx("style",{children:`
44
- @keyframes termBlink {
45
- 0%, 50% { opacity: 1; }
46
- 51%, 100% { opacity: 0; }
47
- }
48
- @media (prefers-reduced-motion: reduce) {
49
- @keyframes termBlink {
50
- 0%, 100% { opacity: 0.8; }
51
- }
52
- }
53
- `})]})}function f2(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsx("div",{className:"flex items-center gap-2 loading-anim-area",children:[0,1,2].map(t=>m.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-primary",style:{animation:`dotWave 1.4s ease-in-out ${t*.2}s infinite`}},t))}),m.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),m.jsx("style",{children:`
54
- @keyframes dotWave {
55
- 0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
56
- 40% { transform: scale(1); opacity: 1; }
57
- }
58
- @media (prefers-reduced-motion: reduce) {
59
- @keyframes dotWave {
60
- 0%, 100% { transform: scale(1); opacity: 0.7; }
61
- }
62
- }
63
- `})]})}function h2(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsx("div",{className:"relative w-10 h-10 loading-anim-area",children:[0,1,2].map(t=>m.jsx("div",{className:"absolute rounded-md border border-border bg-background",style:{width:`${28-t*4}px`,height:`${28-t*4}px`,left:`${6+t*2}px`,top:`${6+t*2}px`,animation:`layerShift 2s ease-in-out ${t*.3}s infinite`,boxShadow:"0 1px 2px rgba(0,0,0,0.05)"}},t))}),m.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),m.jsx("style",{children:`
64
- @keyframes layerShift {
65
- 0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.5; }
66
- 25% { transform: translate(-3px, -3px) rotate(-2deg); opacity: 0.8; }
67
- 50% { transform: translate(0, -4px) rotate(0deg); opacity: 1; }
68
- 75% { transform: translate(3px, -3px) rotate(2deg); opacity: 0.8; }
69
- }
70
- @media (prefers-reduced-motion: reduce) {
71
- @keyframes layerShift {
72
- 0%, 100% { transform: none; opacity: 0.8; }
73
- }
74
- }
75
- `})]})}function m2(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsx("div",{className:"w-32 h-1 bg-border rounded-full overflow-hidden loading-anim-area",children:m.jsx("div",{className:"h-full bg-primary rounded-full",style:{animation:"progressBeam 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite"}})}),m.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),m.jsx("style",{children:`
76
- @keyframes progressBeam {
77
- 0% { width: 0%; margin-left: 0%; }
78
- 50% { width: 60%; margin-left: 20%; }
79
- 100% { width: 0%; margin-left: 100%; }
80
- }
81
- @media (prefers-reduced-motion: reduce) {
82
- @keyframes progressBeam {
83
- 0%, 100% { width: 40%; margin-left: 30%; }
84
- }
85
- }
86
- `})]})}function p2(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsx("div",{className:"flex gap-2 loading-anim-area",children:[0,1,2].map(t=>m.jsxs("div",{className:"flex flex-col gap-1.5 w-16",children:[m.jsx("div",{className:"h-2 rounded-full bg-border",style:{animation:`shimmer 1.8s ease-in-out ${t*.2}s infinite`}}),[0,1].map(a=>m.jsx("div",{className:"h-6 rounded bg-muted",style:{animation:`shimmer 1.8s ease-in-out ${(t*2+a)*.15}s infinite`}},a))]},t))}),m.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),m.jsx("style",{children:`
87
- @keyframes shimmer {
88
- 0%, 100% { opacity: 0.4; }
89
- 50% { opacity: 1; }
90
- }
91
- @media (prefers-reduced-motion: reduce) {
92
- @keyframes shimmer {
93
- 0%, 100% { opacity: 0.7; }
94
- }
95
- }
96
- `})]})}function g2(){return m.jsxs("div",{className:"flex flex-col items-center gap-4",children:[m.jsx("div",{className:"relative w-10 h-10 loading-anim-area",children:m.jsxs("svg",{viewBox:"0 0 40 40",className:"w-10 h-10",children:[m.jsx("circle",{cx:"20",cy:"20",r:"16",fill:"none",stroke:"var(--border)",strokeWidth:"2"}),m.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)"}),m.jsx("path",{d:"M20 10L14 16L20 22L26 16Z",fill:"var(--primary)",opacity:"0.8",style:{animation:"glyphFade 1.2s ease-in-out infinite"}})]})}),m.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading"}),m.jsx("style",{children:`
97
- @keyframes glyphRotate {
98
- to { stroke-dashoffset: -100; }
99
- }
100
- @keyframes glyphFade {
101
- 0%, 100% { opacity: 0.4; transform: scale(0.9); }
102
- 50% { opacity: 0.9; transform: scale(1); }
103
- }
104
- @media (prefers-reduced-motion: reduce) {
105
- @keyframes glyphRotate {
106
- to { stroke-dashoffset: 0; }
107
- }
108
- @keyframes glyphFade {
109
- 0%, 100% { opacity: 0.8; transform: scale(1); }
110
- }
111
- }
112
- `})]})}function u0({size:t="md"}){const a=t==="lg"?{container:"w-20 h-20",img:"w-16 h-16"}:{container:"w-12 h-12",img:"w-10 h-10"};return m.jsxs("div",{className:"flex flex-col items-center",children:[m.jsx("div",{className:`flex items-center justify-center ${a.container} loading-anim-area`,children:m.jsx("img",{src:s2,alt:"Agent Tower",className:`${a.img} object-contain rounded-xl`,style:{animation:"charcoalBreathe 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"}})}),m.jsx("style",{children:`
113
- @keyframes charcoalBreathe {
114
- 0%, 100% { transform: scale(1); opacity: 0.85; }
115
- 50% { transform: scale(1.08); opacity: 1; }
116
- }
117
- @media (prefers-reduced-motion: reduce) {
118
- @keyframes charcoalBreathe {
119
- 0%, 100% { transform: scale(1); opacity: 1; }
120
- }
121
- }
122
- `})]})}const X_=[{id:"tower-pulse",name:"Tower Pulse",description:"Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。",component:l2},{id:"stack-rise",name:"Stack Rise",description:"五根柱状条交错升降,暗喻任务编排队列,节奏感强。",component:c2},{id:"orbit-ring",name:"Orbit Ring",description:"双层同心圆环反向旋转,精密工具质感,不浮夸。",component:u2},{id:"terminal-cursor",name:"Terminal Cursor",description:"终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。",component:d2},{id:"dot-wave",name:"Dot Wave",description:"三点波浪脉动,极简克制,适合工具型产品的默认加载。",component:f2},{id:"layer-shift",name:"Layer Shift",description:"三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。",component:h2},{id:"progress-beam",name:"Progress Beam",description:"水平光束往复滑过进度条,线性进度隐喻,不阻断视线。",component:m2},{id:"skeleton-board",name:"Skeleton Board",description:"三列骨架屏微闪,预示看板布局,减少布局跳变。",component:p2},{id:"glyph-rotate",name:"Glyph Rotate",description:"圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。",component:g2},{id:"charcoal-breathe",name:"Charcoal Breathe",description:"Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。",component:u0}];function ti(){const{usesIntegratedTitlebar:t}=a0();return m.jsxs("div",{className:`fixed inset-0 z-50 flex items-center justify-center bg-background ${t?"app-region-drag":""}`,children:[m.jsx("style",{children:o2}),m.jsx(u0,{size:"lg"})]})}const y2=new Set(["general","translation","agent-environment","agents","team","projects","notifications","mcp","agents-legacy"]);function ov(){const t=Nk(),{tab:a}=RE();return S.useEffect(()=>{const i=a&&y2.has(a)?a:"general";io.getState().openSettings(i),t("/",{replace:!0})},[t,a]),null}const v2=S.lazy(()=>cn(()=>import("./ProjectKanbanPage-Bt_01giW.js").then(t=>t.P),__vite__mapDeps([54,21,22,7,44,43,18,8,42,5,55,25,26,27,10,40,36,37,56,13,6,14,32,4,20,57,17,47,53,58,28,23])).then(t=>({default:t.ProjectKanbanPage}))),lv=S.lazy(()=>cn(()=>import("./ConversationPage-R7vNaOQv.js"),__vite__mapDeps([59,25,26,27,7,8,10,24,16,28,18,4,29,20,5,60,61,62,55,40,36,37,56,42,13,6,14,32,57,63,3,17,47])).then(t=>({default:t.ConversationPage}))),b2=S.lazy(()=>cn(()=>import("./DemoPage-DK-ikg1_.js"),[]).then(t=>({default:t.DemoPage}))),x2=S.lazy(()=>cn(()=>import("./AgentDemoPage-BfXkNCdN.js"),__vite__mapDeps([64,60,61,4,24,25,26,27,7,8,10,16,28,18,29,52,38,57,65,66])).then(t=>({default:t.AgentDemoPage}))),S2=S.lazy(()=>cn(()=>import("./LoadingPreviewPage-BDlf89rJ.js"),[]).then(t=>({default:t.LoadingPreviewPage}))),w2=S.lazy(()=>cn(()=>import("./DesignSystemPage-BhjNs2vP.js"),__vite__mapDeps([67,56,42,13,6,7,61,68,5,28,26,27,8,10,41,43,18,17,31,63,3,66,50,48,57,33,32,34,4,47,53,58,2,9,12,22,37])).then(t=>({default:t.DesignSystemPage}))),E2=[{path:"/",element:m.jsx(e2,{}),errorElement:m.jsx(sv,{}),children:[{errorElement:m.jsx(sv,{}),children:[{index:!0,element:m.jsx(S.Suspense,{fallback:m.jsx(ti,{}),children:m.jsx(v2,{})})},{path:"conversations",element:m.jsx(S.Suspense,{fallback:m.jsx(ti,{}),children:m.jsx(lv,{})})},{path:"conversations/:conversationId",element:m.jsx(S.Suspense,{fallback:m.jsx(ti,{}),children:m.jsx(lv,{})})},{path:"demo",element:m.jsx(S.Suspense,{fallback:m.jsx(ti,{}),children:m.jsx(b2,{})})},{path:"agent-demo",element:m.jsx(S.Suspense,{fallback:m.jsx(ti,{}),children:m.jsx(x2,{})})},{path:"loading-preview",element:m.jsx(S.Suspense,{fallback:m.jsx(ti,{}),children:m.jsx(S2,{})})},{path:"design-system",element:m.jsx(S.Suspense,{fallback:m.jsx(ti,{}),children:m.jsx(w2,{})})},{path:"settings",element:m.jsx(ov,{})},{path:"settings/:tab",element:m.jsx(ov,{})}]}]}],T2=bT(E2);function C2(){return m.jsx(OT,{router:T2})}const wa=Object.create(null);wa.open="0";wa.close="1";wa.ping="2";wa.pong="3";wa.message="4";wa.upgrade="5";wa.noop="6";const $l=Object.create(null);Object.keys(wa).forEach(t=>{$l[wa[t]]=t});const uf={type:"error",data:"parser error"},d0=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",f0=typeof ArrayBuffer=="function",h0=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Yf=({type:t,data:a},i,o)=>d0&&a instanceof Blob?i?o(a):cv(a,o):f0&&(a instanceof ArrayBuffer||h0(a))?i?o(a):cv(new Blob([a]),o):o(wa[t]+(a||"")),cv=(t,a)=>{const i=new FileReader;return i.onload=function(){const o=i.result.split(",")[1];a("b"+(o||""))},i.readAsDataURL(t)};function uv(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let qd;function A2(t,a){if(d0&&t.data instanceof Blob)return t.data.arrayBuffer().then(uv).then(a);if(f0&&(t.data instanceof ArrayBuffer||h0(t.data)))return a(uv(t.data));Yf(t,!1,i=>{qd||(qd=new TextEncoder),a(qd.encode(i))})}const dv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",so=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<dv.length;t++)so[dv.charCodeAt(t)]=t;const R2=t=>{let a=t.length*.75,i=t.length,o,c=0,d,f,h,y;t[t.length-1]==="="&&(a--,t[t.length-2]==="="&&a--);const g=new ArrayBuffer(a),x=new Uint8Array(g);for(o=0;o<i;o+=4)d=so[t.charCodeAt(o)],f=so[t.charCodeAt(o+1)],h=so[t.charCodeAt(o+2)],y=so[t.charCodeAt(o+3)],x[c++]=d<<2|f>>4,x[c++]=(f&15)<<4|h>>2,x[c++]=(h&3)<<6|y&63;return g},k2=typeof ArrayBuffer=="function",Vf=(t,a)=>{if(typeof t!="string")return{type:"message",data:m0(t,a)};const i=t.charAt(0);return i==="b"?{type:"message",data:N2(t.substring(1),a)}:$l[i]?t.length>1?{type:$l[i],data:t.substring(1)}:{type:$l[i]}:uf},N2=(t,a)=>{if(k2){const i=R2(t);return m0(i,a)}else return{base64:!0,data:t}},m0=(t,a)=>a==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,p0="",_2=(t,a)=>{const i=t.length,o=new Array(i);let c=0;t.forEach((d,f)=>{Yf(d,!1,h=>{o[f]=h,++c===i&&a(o.join(p0))})})},O2=(t,a)=>{const i=t.split(p0),o=[];for(let c=0;c<i.length;c++){const d=Vf(i[c],a);if(o.push(d),d.type==="error")break}return o};function M2(){return new TransformStream({transform(t,a){A2(t,i=>{const o=i.length;let c;if(o<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,o);else if(o<65536){c=new Uint8Array(3);const d=new DataView(c.buffer);d.setUint8(0,126),d.setUint16(1,o)}else{c=new Uint8Array(9);const d=new DataView(c.buffer);d.setUint8(0,127),d.setBigUint64(1,BigInt(o))}t.data&&typeof t.data!="string"&&(c[0]|=128),a.enqueue(c),a.enqueue(i)})}})}let Pd;function Kl(t){return t.reduce((a,i)=>a+i.length,0)}function Gl(t,a){if(t[0].length===a)return t.shift();const i=new Uint8Array(a);let o=0;for(let c=0;c<a;c++)i[c]=t[0][o++],o===t[0].length&&(t.shift(),o=0);return t.length&&o<t[0].length&&(t[0]=t[0].slice(o)),i}function D2(t,a){Pd||(Pd=new TextDecoder);const i=[];let o=0,c=-1,d=!1;return new TransformStream({transform(f,h){for(i.push(f);;){if(o===0){if(Kl(i)<1)break;const y=Gl(i,1);d=(y[0]&128)===128,c=y[0]&127,c<126?o=3:c===126?o=1:o=2}else if(o===1){if(Kl(i)<2)break;const y=Gl(i,2);c=new DataView(y.buffer,y.byteOffset,y.length).getUint16(0),o=3}else if(o===2){if(Kl(i)<8)break;const y=Gl(i,8),g=new DataView(y.buffer,y.byteOffset,y.length),x=g.getUint32(0);if(x>Math.pow(2,21)-1){h.enqueue(uf);break}c=x*Math.pow(2,32)+g.getUint32(4),o=3}else{if(Kl(i)<c)break;const y=Gl(i,c);h.enqueue(Vf(d?y:Pd.decode(y),a)),o=0}if(c===0||c>t){h.enqueue(uf);break}}}})}const g0=4;function zt(t){if(t)return j2(t)}function j2(t){for(var a in zt.prototype)t[a]=zt.prototype[a];return t}zt.prototype.on=zt.prototype.addEventListener=function(t,a){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(a),this};zt.prototype.once=function(t,a){function i(){this.off(t,i),a.apply(this,arguments)}return i.fn=a,this.on(t,i),this};zt.prototype.off=zt.prototype.removeListener=zt.prototype.removeAllListeners=zt.prototype.removeEventListener=function(t,a){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+t];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,c=0;c<i.length;c++)if(o=i[c],o===a||o.fn===a){i.splice(c,1);break}return i.length===0&&delete this._callbacks["$"+t],this};zt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var a=new Array(arguments.length-1),i=this._callbacks["$"+t],o=1;o<arguments.length;o++)a[o-1]=arguments[o];if(i){i=i.slice(0);for(var o=0,c=i.length;o<c;++o)i[o].apply(this,a)}return this};zt.prototype.emitReserved=zt.prototype.emit;zt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};zt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const pc=typeof Promise=="function"&&typeof Promise.resolve=="function"?a=>Promise.resolve().then(a):(a,i)=>i(a,0),Fn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),z2="arraybuffer";function y0(t,...a){return a.reduce((i,o)=>(t.hasOwnProperty(o)&&(i[o]=t[o]),i),{})}const L2=Fn.setTimeout,U2=Fn.clearTimeout;function gc(t,a){a.useNativeTimers?(t.setTimeoutFn=L2.bind(Fn),t.clearTimeoutFn=U2.bind(Fn)):(t.setTimeoutFn=Fn.setTimeout.bind(Fn),t.clearTimeoutFn=Fn.clearTimeout.bind(Fn))}const B2=1.33;function q2(t){return typeof t=="string"?P2(t):Math.ceil((t.byteLength||t.size)*B2)}function P2(t){let a=0,i=0;for(let o=0,c=t.length;o<c;o++)a=t.charCodeAt(o),a<128?i+=1:a<2048?i+=2:a<55296||a>=57344?i+=3:(o++,i+=4);return i}function v0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function I2(t){let a="";for(let i in t)t.hasOwnProperty(i)&&(a.length&&(a+="&"),a+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return a}function H2(t){let a={},i=t.split("&");for(let o=0,c=i.length;o<c;o++){let d=i[o].split("=");a[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return a}class Q2 extends Error{constructor(a,i,o){super(a),this.description=i,this.context=o,this.type="TransportError"}}class Ff extends zt{constructor(a){super(),this.writable=!1,gc(this,a),this.opts=a,this.query=a.query,this.socket=a.socket,this.supportsBinary=!a.forceBase64}onError(a,i,o){return super.emitReserved("error",new Q2(a,i,o)),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 i=Vf(a,this.socket.binaryType);this.onPacket(i)}onPacket(a){super.emitReserved("packet",a)}onClose(a){this.readyState="closed",super.emitReserved("close",a)}pause(a){}createUri(a,i={}){return a+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_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 i=I2(a);return i.length?"?"+i:""}}class K2 extends Ff{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(a){this.readyState="pausing";const i=()=>{this.readyState="paused",a()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||i()})),this.writable||(o++,this.once("drain",function(){--o||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(a){const i=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};O2(a,this.socket.binaryType).forEach(i),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,_2(a,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const a=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=v0()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(a,i)}}let b0=!1;try{b0=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const G2=b0;function Y2(){}class V2 extends K2{constructor(a){if(super(a),typeof location<"u"){const i=location.protocol==="https:";let o=location.port;o||(o=i?"443":"80"),this.xd=typeof location<"u"&&a.hostname!==location.hostname||o!==a.port}}doWrite(a,i){const o=this.request({method:"POST",data:a});o.on("success",i),o.on("error",(c,d)=>{this.onError("xhr post error",c,d)})}doPoll(){const a=this.request();a.on("data",this.onData.bind(this)),a.on("error",(i,o)=>{this.onError("xhr poll error",i,o)}),this.pollXhr=a}}let $i=class Jl extends zt{constructor(a,i,o){super(),this.createRequest=a,gc(this,o),this._opts=o,this._method=o.method||"GET",this._uri=i,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var a;const i=y0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(i);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let c in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(c)&&o.setRequestHeader(c,this._opts.extraHeaders[c])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(a=this._opts.cookieJar)===null||a===void 0||a.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var c;o.readyState===3&&((c=this._opts.cookieJar)===null||c===void 0||c.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(c){this.setTimeoutFn(()=>{this._onError(c)},0);return}typeof document<"u"&&(this._index=Jl.requestsCount++,Jl.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=Y2,a)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Jl.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()}};$i.requestsCount=0;$i.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",fv);else if(typeof addEventListener=="function"){const t="onpagehide"in Fn?"pagehide":"unload";addEventListener(t,fv,!1)}}function fv(){for(let t in $i.requests)$i.requests.hasOwnProperty(t)&&$i.requests[t].abort()}const F2=(function(){const t=x0({xdomain:!1});return t&&t.responseType!==null})();class X2 extends V2{constructor(a){super(a);const i=a&&a.forceBase64;this.supportsBinary=F2&&!i}request(a={}){return Object.assign(a,{xd:this.xd},this.opts),new $i(x0,this.uri(),a)}}function x0(t){const a=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!a||G2))return new XMLHttpRequest}catch{}if(!a)try{return new Fn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const S0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Z2 extends Ff{get name(){return"websocket"}doOpen(){const a=this.uri(),i=this.opts.protocols,o=S0?{}:y0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(a,i,o)}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 i=0;i<a.length;i++){const o=a[i],c=i===a.length-1;Yf(o,this.supportsBinary,d=>{try{this.doWrite(o,d)}catch{}c&&pc(()=>{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",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=v0()),this.supportsBinary||(i.b64=1),this.createUri(a,i)}}const Id=Fn.WebSocket||Fn.MozWebSocket;class $2 extends Z2{createSocket(a,i,o){return S0?new Id(a,i,o):i?new Id(a,i):new Id(a)}doWrite(a,i){this.ws.send(i)}}class J2 extends Ff{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 i=D2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=a.readable.pipeThrough(i).getReader(),c=M2();c.readable.pipeTo(a.writable),this._writer=c.writable.getWriter();const d=()=>{o.read().then(({done:h,value:y})=>{h||(this.onPacket(y),d())}).catch(h=>{})};d();const f={type:"open"};this.query.sid&&(f.data=`{"sid":"${this.query.sid}"}`),this._writer.write(f).then(()=>this.onOpen())})})}write(a){this.writable=!1;for(let i=0;i<a.length;i++){const o=a[i],c=i===a.length-1;this._writer.write(o).then(()=>{c&&pc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var a;(a=this._transport)===null||a===void 0||a.close()}}const W2={websocket:$2,webtransport:J2,polling:X2},eN=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,tN=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function df(t){if(t.length>8e3)throw"URI too long";const a=t,i=t.indexOf("["),o=t.indexOf("]");i!=-1&&o!=-1&&(t=t.substring(0,i)+t.substring(i,o).replace(/:/g,";")+t.substring(o,t.length));let c=eN.exec(t||""),d={},f=14;for(;f--;)d[tN[f]]=c[f]||"";return i!=-1&&o!=-1&&(d.source=a,d.host=d.host.substring(1,d.host.length-1).replace(/;/g,":"),d.authority=d.authority.replace("[","").replace("]","").replace(/;/g,":"),d.ipv6uri=!0),d.pathNames=nN(d,d.path),d.queryKey=aN(d,d.query),d}function nN(t,a){const i=/\/{2,9}/g,o=a.replace(i,"/").split("/");return(a.slice(0,1)=="/"||a.length===0)&&o.splice(0,1),a.slice(-1)=="/"&&o.splice(o.length-1,1),o}function aN(t,a){const i={};return a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,c,d){c&&(i[c]=d)}),i}const ff=typeof addEventListener=="function"&&typeof removeEventListener=="function",Wl=[];ff&&addEventListener("offline",()=>{Wl.forEach(t=>t())},!1);class Cr extends zt{constructor(a,i){if(super(),this.binaryType=z2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,a&&typeof a=="object"&&(i=a,a=null),a){const o=df(a);i.hostname=o.host,i.secure=o.protocol==="https"||o.protocol==="wss",i.port=o.port,o.query&&(i.query=o.query)}else i.host&&(i.hostname=df(i.host).host);gc(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(o=>{const c=o.prototype.name;this.transports.push(c),this._transportsByName[c]=o}),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},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=H2(this.opts.query)),ff&&(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"})},Wl.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(a){const i=Object.assign({},this.opts.query);i.EIO=g0,i.transport=a,this.id&&(i.sid=this.id);const o=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[a]);return new this._transportsByName[a](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const a=this.opts.rememberUpgrade&&Cr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const i=this.createTransport(a);i.open(),this.setTransport(i)}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",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",Cr.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 i=new Error("server error");i.code=a.data,this._onError(i);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 i=1;for(let o=0;o<this.writeBuffer.length;o++){const c=this.writeBuffer[o].data;if(c&&(i+=q2(c)),o>0&&i>this._maxPayload)return this.writeBuffer.slice(0,o);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const a=Date.now()>this._pingTimeoutTime;return a&&(this._pingTimeoutTime=0,pc(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),a}write(a,i,o){return this._sendPacket("message",a,i,o),this}send(a,i,o){return this._sendPacket("message",a,i,o),this}_sendPacket(a,i,o,c){if(typeof i=="function"&&(c=i,i=void 0),typeof o=="function"&&(c=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const d={type:a,data:i,options:o};this.emitReserved("packetCreate",d),this.writeBuffer.push(d),c&&this.once("flush",c),this.flush()}close(){const a=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),a()},o=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():a()}):this.upgrading?o():a()),this}_onError(a){if(Cr.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,i){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(),ff&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=Wl.indexOf(this._offlineEventListener);o!==-1&&Wl.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",a,i),this.writeBuffer=[],this._prevBufferLen=0}}}Cr.protocol=g0;class rN extends Cr{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 i=this.createTransport(a),o=!1;Cr.priorWebsocketSuccess=!1;const c=()=>{o||(i.send([{type:"ping",data:"probe"}]),i.once("packet",v=>{if(!o)if(v.type==="pong"&&v.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;Cr.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(x(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const E=new Error("probe error");E.transport=i.name,this.emitReserved("upgradeError",E)}}))};function d(){o||(o=!0,x(),i.close(),i=null)}const f=v=>{const E=new Error("probe error: "+v);E.transport=i.name,d(),this.emitReserved("upgradeError",E)};function h(){f("transport closed")}function y(){f("socket closed")}function g(v){i&&v.name!==i.name&&d()}const x=()=>{i.removeListener("open",c),i.removeListener("error",f),i.removeListener("close",h),this.off("close",y),this.off("upgrading",g)};i.once("open",c),i.once("error",f),i.once("close",h),this.once("close",y),this.once("upgrading",g),this._upgrades.indexOf("webtransport")!==-1&&a!=="webtransport"?this.setTimeoutFn(()=>{o||i.open()},200):i.open()}onHandshake(a){this._upgrades=this._filterUpgrades(a.upgrades),super.onHandshake(a)}_filterUpgrades(a){const i=[];for(let o=0;o<a.length;o++)~this.transports.indexOf(a[o])&&i.push(a[o]);return i}}let iN=class extends rN{constructor(a,i={}){const o=typeof a=="object"?a:i;(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(c=>W2[c]).filter(c=>!!c)),super(a,o)}};function sN(t,a="",i){let o=t;i=i||typeof location<"u"&&location,t==null&&(t=i.protocol+"//"+i.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=i.protocol+t:t=i.host+t),/^(https?|wss?):\/\//.test(t)||(typeof i<"u"?t=i.protocol+"//"+t:t="https://"+t),o=df(t)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const d=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+d+":"+o.port+a,o.href=o.protocol+"://"+d+(i&&i.port===o.port?"":":"+o.port),o}const oN=typeof ArrayBuffer=="function",lN=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,w0=Object.prototype.toString,cN=typeof Blob=="function"||typeof Blob<"u"&&w0.call(Blob)==="[object BlobConstructor]",uN=typeof File=="function"||typeof File<"u"&&w0.call(File)==="[object FileConstructor]";function Xf(t){return oN&&(t instanceof ArrayBuffer||lN(t))||cN&&t instanceof Blob||uN&&t instanceof File}function ec(t,a){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let i=0,o=t.length;i<o;i++)if(ec(t[i]))return!0;return!1}if(Xf(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return ec(t.toJSON(),!0);for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&ec(t[i]))return!0;return!1}function dN(t){const a=[],i=t.data,o=t;return o.data=hf(i,a),o.attachments=a.length,{packet:o,buffers:a}}function hf(t,a){if(!t)return t;if(Xf(t)){const i={_placeholder:!0,num:a.length};return a.push(t),i}else if(Array.isArray(t)){const i=new Array(t.length);for(let o=0;o<t.length;o++)i[o]=hf(t[o],a);return i}else if(typeof t=="object"&&!(t instanceof Date)){const i={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=hf(t[o],a));return i}return t}function fN(t,a){return t.data=mf(t.data,a),delete t.attachments,t}function mf(t,a){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<a.length)return a[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let i=0;i<t.length;i++)t[i]=mf(t[i],a);else if(typeof t=="object")for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(t[i]=mf(t[i],a));return t}const hN=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var $e;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})($e||($e={}));class mN{constructor(a){this.replacer=a}encode(a){return(a.type===$e.EVENT||a.type===$e.ACK)&&ec(a)?this.encodeAsBinary({type:a.type===$e.EVENT?$e.BINARY_EVENT:$e.BINARY_ACK,nsp:a.nsp,data:a.data,id:a.id}):[this.encodeAsString(a)]}encodeAsString(a){let i=""+a.type;return(a.type===$e.BINARY_EVENT||a.type===$e.BINARY_ACK)&&(i+=a.attachments+"-"),a.nsp&&a.nsp!=="/"&&(i+=a.nsp+","),a.id!=null&&(i+=a.id),a.data!=null&&(i+=JSON.stringify(a.data,this.replacer)),i}encodeAsBinary(a){const i=dN(a),o=this.encodeAsString(i.packet),c=i.buffers;return c.unshift(o),c}}class Zf extends zt{constructor(a){super(),this.reviver=a}add(a){let i;if(typeof a=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(a);const o=i.type===$e.BINARY_EVENT;o||i.type===$e.BINARY_ACK?(i.type=o?$e.EVENT:$e.ACK,this.reconstructor=new pN(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(Xf(a)||a.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(a),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+a)}decodeString(a){let i=0;const o={type:Number(a.charAt(0))};if($e[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===$e.BINARY_EVENT||o.type===$e.BINARY_ACK){const d=i+1;for(;a.charAt(++i)!=="-"&&i!=a.length;);const f=a.substring(d,i);if(f!=Number(f)||a.charAt(i)!=="-")throw new Error("Illegal attachments");o.attachments=Number(f)}if(a.charAt(i+1)==="/"){const d=i+1;for(;++i&&!(a.charAt(i)===","||i===a.length););o.nsp=a.substring(d,i)}else o.nsp="/";const c=a.charAt(i+1);if(c!==""&&Number(c)==c){const d=i+1;for(;++i;){const f=a.charAt(i);if(f==null||Number(f)!=f){--i;break}if(i===a.length)break}o.id=Number(a.substring(d,i+1))}if(a.charAt(++i)){const d=this.tryParse(a.substr(i));if(Zf.isPayloadValid(o.type,d))o.data=d;else throw new Error("invalid payload")}return o}tryParse(a){try{return JSON.parse(a,this.reviver)}catch{return!1}}static isPayloadValid(a,i){switch(a){case $e.CONNECT:return hv(i);case $e.DISCONNECT:return i===void 0;case $e.CONNECT_ERROR:return typeof i=="string"||hv(i);case $e.EVENT:case $e.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&hN.indexOf(i[0])===-1);case $e.ACK:case $e.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class pN{constructor(a){this.packet=a,this.buffers=[],this.reconPack=a}takeBinaryData(a){if(this.buffers.push(a),this.buffers.length===this.reconPack.attachments){const i=fN(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function hv(t){return Object.prototype.toString.call(t)==="[object Object]"}const gN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Zf,Encoder:mN,get PacketType(){return $e}},Symbol.toStringTag,{value:"Module"}));function oa(t,a,i){return t.on(a,i),function(){t.off(a,i)}}const yN=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class E0 extends zt{constructor(a,i,o){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=i,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const a=this.io;this.subs=[oa(a,"open",this.onopen.bind(this)),oa(a,"packet",this.onpacket.bind(this)),oa(a,"error",this.onerror.bind(this)),oa(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,...i){var o,c,d;if(yN.hasOwnProperty(a))throw new Error('"'+a.toString()+'" is a reserved event name');if(i.unshift(a),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const f={type:$e.EVENT,data:i};if(f.options={},f.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const x=this.ids++,v=i.pop();this._registerAckCallback(x,v),f.id=x}const h=(c=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||c===void 0?void 0:c.writable,y=this.connected&&!(!((d=this.io.engine)===null||d===void 0)&&d._hasPingExpired());return this.flags.volatile&&!h||(y?(this.notifyOutgoingListeners(f),this.packet(f)):this.sendBuffer.push(f)),this.flags={},this}_registerAckCallback(a,i){var o;const c=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(c===void 0){this.acks[a]=i;return}const d=this.io.setTimeoutFn(()=>{delete this.acks[a];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===a&&this.sendBuffer.splice(h,1);i.call(this,new Error("operation has timed out"))},c),f=(...h)=>{this.io.clearTimeoutFn(d),i.apply(this,h)};f.withError=!0,this.acks[a]=f}emitWithAck(a,...i){return new Promise((o,c)=>{const d=(f,h)=>f?c(f):o(h);d.withError=!0,i.push(d),this.emit(a,...i)})}_addToQueue(a){let i;typeof a[a.length-1]=="function"&&(i=a.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:a,flags:Object.assign({fromQueue:!0},this.flags)};a.push((c,...d)=>(this._queue[0],c!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(c)):(this._queue.shift(),i&&i(null,...d)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(a=!1){if(!this.connected||this._queue.length===0)return;const i=this._queue[0];i.pending&&!a||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.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:$e.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,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",a,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(a=>{if(!this.sendBuffer.some(o=>String(o.id)===a)){const o=this.acks[a];delete this.acks[a],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(a){if(a.nsp===this.nsp)switch(a.type){case $e.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 $e.EVENT:case $e.BINARY_EVENT:this.onevent(a);break;case $e.ACK:case $e.BINARY_ACK:this.onack(a);break;case $e.DISCONNECT:this.ondisconnect();break;case $e.CONNECT_ERROR:this.destroy();const o=new Error(a.data.message);o.data=a.data.data,this.emitReserved("connect_error",o);break}}onevent(a){const i=a.data||[];a.id!=null&&i.push(this.ack(a.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(a){if(this._anyListeners&&this._anyListeners.length){const i=this._anyListeners.slice();for(const o of i)o.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 i=this;let o=!1;return function(...c){o||(o=!0,i.packet({type:$e.ACK,id:a,data:c}))}}onack(a){const i=this.acks[a.id];typeof i=="function"&&(delete this.acks[a.id],i.withError&&a.data.unshift(null),i.apply(this,a.data))}onconnect(a,i){this.id=a,this.recovered=i&&this._pid===i,this._pid=i,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:$e.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 i=this._anyListeners;for(let o=0;o<i.length;o++)if(a===i[o])return i.splice(o,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 i=this._anyOutgoingListeners;for(let o=0;o<i.length;o++)if(a===i[o])return i.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(a){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const i=this._anyOutgoingListeners.slice();for(const o of i)o.apply(this,a.data)}}}function is(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}is.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var a=Math.random(),i=Math.floor(a*this.jitter*t);t=(Math.floor(a*10)&1)==0?t-i:t+i}return Math.min(t,this.max)|0};is.prototype.reset=function(){this.attempts=0};is.prototype.setMin=function(t){this.ms=t};is.prototype.setMax=function(t){this.max=t};is.prototype.setJitter=function(t){this.jitter=t};class pf extends zt{constructor(a,i){var o;super(),this.nsps={},this.subs=[],a&&typeof a=="object"&&(i=a,a=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,gc(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((o=i.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new is({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=a;const c=i.parser||gN;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=i.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 i;return a===void 0?this._reconnectionDelay:(this._reconnectionDelay=a,(i=this.backoff)===null||i===void 0||i.setMin(a),this)}randomizationFactor(a){var i;return a===void 0?this._randomizationFactor:(this._randomizationFactor=a,(i=this.backoff)===null||i===void 0||i.setJitter(a),this)}reconnectionDelayMax(a){var i;return a===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=a,(i=this.backoff)===null||i===void 0||i.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 iN(this.uri,this.opts);const i=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const c=oa(i,"open",function(){o.onopen(),a&&a()}),d=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),a?a(h):this.maybeReconnectOnOpen()},f=oa(i,"error",d);if(this._timeout!==!1){const h=this._timeout,y=this.setTimeoutFn(()=>{c(),d(new Error("timeout")),i.close()},h);this.opts.autoUnref&&y.unref(),this.subs.push(()=>{this.clearTimeoutFn(y)})}return this.subs.push(c),this.subs.push(f),this}connect(a){return this.open(a)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const a=this.engine;this.subs.push(oa(a,"ping",this.onping.bind(this)),oa(a,"data",this.ondata.bind(this)),oa(a,"error",this.onerror.bind(this)),oa(a,"close",this.onclose.bind(this)),oa(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(a){try{this.decoder.add(a)}catch(i){this.onclose("parse error",i)}}ondecoded(a){pc(()=>{this.emitReserved("packet",a)},this.setTimeoutFn)}onerror(a){this.emitReserved("error",a)}socket(a,i){let o=this.nsps[a];return o?this._autoConnect&&!o.active&&o.connect():(o=new E0(this,a,i),this.nsps[a]=o),o}_destroy(a){const i=Object.keys(this.nsps);for(const o of i)if(this.nsps[o].active)return;this._close()}_packet(a){const i=this.encoder.encode(a);for(let o=0;o<i.length;o++)this.engine.write(i[o],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,i){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",a,i),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 i=this.backoff.duration();this._reconnecting=!0;const o=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()}))},i);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const a=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",a)}}const no={};function tc(t,a){typeof t=="object"&&(a=t,t=void 0),a=a||{};const i=sN(t,a.path||"/socket.io"),o=i.source,c=i.id,d=i.path,f=no[c]&&d in no[c].nsps,h=a.forceNew||a["force new connection"]||a.multiplex===!1||f;let y;return h?y=new pf(o,a):(no[c]||(no[c]=new pf(o,a)),y=no[c]),i.query&&!a.query&&(a.query=i.queryKey),y.socket(i.path,a)}Object.assign(tc,{Manager:pf,Socket:E0,io:tc,connect:tc});class vN{socket=null;baseUrl;visibilityHandler=null;constructor(){this.baseUrl=BC()}getSocket(){return this.socket||(this.socket=tc(`${this.baseUrl}${Ql}`,{autoConnect:!1,transports:["websocket"],reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,reconnectionDelayMax:1e4}),this.socket.on("connect",()=>{console.log(`[Socket] Connected to ${Ql} t=${Date.now()}`)}),this.socket.on("disconnect",a=>{console.log(`[Socket] Disconnected from ${Ql}: t=${Date.now()}`,a)}),this.socket.on("connect_error",a=>{console.error(`[Socket] Connection error on ${Ql}: 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 go=new vN;function T0(t,a,i){const o=d=>nc(d.queryKey,i),c=t.getQueriesData({predicate:o});return t.setQueriesData({predicate:o},d=>{if(!d||!Array.isArray(d.data))return d;const f=d.data.filter(h=>h.id!==a);return f.length===d.data.length?d:{...d,data:f,total:Math.max(0,d.total-(d.data.length-f.length))}}),t.removeQueries({queryKey:le.tasks.detail(a),exact:!0}),t.removeQueries({queryKey:le.tasks.body(a),exact:!0}),c}function nc(t,a){return!Array.isArray(t)||t[0]!=="tasks"||t[1]!=="list"?!1:a?t[2]===a:!0}function ac(t,a){if(!Array.isArray(t)||t[0]!=="tasks"||t[1]!=="board")return!1;if(!a)return!0;const i=t[2];if(!i||typeof i!="object")return!0;const o=i.projectId;return o==null||o===a}function C0(t,a,i){const o=d=>ac(d.queryKey,i),c=t.getQueriesData({predicate:o});return t.setQueriesData({predicate:o},d=>{if(!d||!Array.isArray(d.data))return d;const f=d.data.filter(h=>h.id!==a);return f.length===d.data.length?d:{...d,data:f,total:Math.max(0,d.total-(d.data.length-f.length))}}),c}function bN(t,a){for(const[i,o]of a)t.setQueryData(i,o)}function xN(t,a){for(const[i,o]of a)t.setQueryData(i,o)}function $_(t){const a={};return t?.projectId&&(a.projectId=t.projectId),t?.status!=null&&(a.status=t.status),t?.page!=null&&(a.page=String(t.page)),t?.limit!=null&&(a.limit=String(t.limit)),ln({queryKey:le.tasks.board(t),queryFn:()=>Be.get("/task-board",{params:a})})}function J_(t,a=!0){return ln({queryKey:le.tasks.body(t),queryFn:()=>Be.get(`/tasks/${t}/body`),enabled:!!t&&a})}function W_(){const t=rt();return gt({mutationFn:({id:a,...i})=>Be.put(`/tasks/${a}`,i),onSuccess:a=>{t.invalidateQueries({queryKey:le.tasks.all}),t.invalidateQueries({queryKey:le.tasks.detail(a.id)}),t.invalidateQueries({queryKey:le.tasks.body(a.id)})}})}function eO(){const t=rt();return gt({mutationFn:({id:a,status:i})=>Be.patch(`/tasks/${a}/status`,{status:i}),onSuccess:a=>{t.invalidateQueries({queryKey:le.tasks.all}),t.invalidateQueries({queryKey:le.tasks.detail(a.id)})}})}function tO(){const t=rt();return gt({mutationFn:a=>Be.delete(`/tasks/${a}`),onMutate:async a=>{await t.cancelQueries({queryKey:le.tasks.all});const i=T0(t,a),o=C0(t,a);return{snapshots:i,boardSnapshots:o}},onError:(a,i,o)=>{o?.snapshots&&bN(t,o.snapshots),o?.boardSnapshots&&xN(t,o.boardSnapshots)},onSuccess:()=>{t.invalidateQueries({queryKey:le.tasks.all}),t.invalidateQueries({queryKey:le.projects.all})}})}function SN(){const t=rt();S.useEffect(()=>{const a=go.connect(),i=()=>{t.invalidateQueries({queryKey:le.tasks.all})},o=async d=>{await t.cancelQueries({predicate:f=>nc(f.queryKey,d.projectId)||ac(f.queryKey,d.projectId)}),t.invalidateQueries({predicate:f=>nc(f.queryKey,d.projectId)||ac(f.queryKey,d.projectId)}),t.invalidateQueries({queryKey:le.tasks.detail(d.taskId)})},c=d=>{T0(t,d.taskId,d.projectId),C0(t,d.taskId,d.projectId),t.invalidateQueries({predicate:f=>nc(f.queryKey,d.projectId)||ac(f.queryKey,d.projectId)}),t.invalidateQueries({queryKey:le.projects.all})};return a.on("connect",i),a.on(Er.TASK_UPDATED,o),a.on(Er.TASK_DELETED,c),()=>{a.off("connect",i),a.off(Er.TASK_UPDATED,o),a.off(Er.TASK_DELETED,c)}},[t])}function A0(){const t=globalThis.crypto;if(typeof t.randomUUID=="function")return t.randomUUID();const a=t.getRandomValues(new Uint8Array(16));a[6]=a[6]&15|64,a[8]=a[8]&63|128;const i=Array.from(a,o=>o.toString(16).padStart(2,"0")).join("");return`${i.slice(0,8)}-${i.slice(8,12)}-${i.slice(12,16)}-${i.slice(16,20)}-${i.slice(20)}`}const $f="tower:team-initial-submission:";function R0(t){const a=sessionStorage.getItem(`${$f}${t}`);if(!a)return null;try{const i=JSON.parse(a);if(i.version!==1||i.taskId!==t||!i.body||!["AUTO","CONFIRM"].includes(i.body.mode)||typeof i.body.clientSubmissionId!="string"||!/^[0-9a-f-]{36}$/i.test(i.body.clientSubmissionId))throw new Error;return i.body}catch{throw new Error("Pending team creation is damaged. Check the original submission before creating again.")}}function wN(t,a){const i=R0(t);if(i){const{clientSubmissionId:c,...d}=i,{clientSubmissionId:f,...h}=a;if(JSON.stringify(d)!==JSON.stringify(h)||f&&f!==c)throw new Error("Check the original team creation before changing its configuration.");return i}const o={...a,clientSubmissionId:a.clientSubmissionId??A0()};return sessionStorage.setItem(`${$f}${t}`,JSON.stringify({version:1,taskId:t,body:o})),o}function mv(t,a){try{R0(t)?.clientSubmissionId===a&&sessionStorage.removeItem(`${$f}${t}`)}catch{}}function EN(t,a){const i=new Map(t?.pages.flatMap(o=>o.items.map(c=>[c.id,c])));return{...a,pages:a.pages.map(o=>({...o,items:o.items.map(c=>{const d=i.get(c.id);return d&&d.revision>c.revision?d:c})}))}}function pv(t,a){return t&&EN(t,{...t,pages:t.pages.map(i=>({...i,items:i.items.map(o=>o.id===a.id?a:o)}))})}function k0(t,a){const i=["message-deliveries",KR(a)?a.sessionId:`task:${a.destination.taskId}`];t.setQueriesData({queryKey:i},o=>pv(o,a)),a.state!=="CANCELLED"&&t.setQueryData([...i,a.state==="SENT"?"sent":"pending"],o=>o?o.pages.some(c=>c.items.some(d=>d.id===a.id))?pv(o,a):{...o,pages:o.pages.map((c,d)=>d?c:{...c,items:[...c.items,a].sort((f,h)=>f.sequence-h.sequence)})}:{pages:[{items:[a],nextCursor:null}],pageParams:[""]})}const lo="tower:team-room-submission:";function Yl(t){return JSON.stringify([t.content,t.mentions??[],t.attachmentIds??[],t.artifactRefs??[],t.kind??null])}function nO(t){const a=[];try{for(let i=0;i<sessionStorage.length;i++){const o=sessionStorage.key(i);if(!o?.startsWith(`${lo}${t}:`))continue;const c=JSON.parse(sessionStorage.getItem(o));typeof c.content=="string"&&typeof c.clientSubmissionId=="string"&&a.push(c)}}catch{}return a}function TN(t,a){for(let o=0;o<sessionStorage.length;o++){const c=sessionStorage.key(o);if(!c?.startsWith(`${lo}${t}:`))continue;let d;try{if(d=JSON.parse(sessionStorage.getItem(c)),!d||typeof d.content!="string"||typeof d.clientSubmissionId!="string"||c!==`${lo}${t}:${d.clientSubmissionId}`)throw new Error}catch{throw new Error("Pending room submission is unavailable or damaged. Check the original submission before sending again.")}if(a.clientSubmissionId===d.clientSubmissionId){if(Yl(a)!==Yl(d))throw new Error("The original room submission must be checked before changing its content.");return d}if(!a.clientSubmissionId&&Yl(a)===Yl(d))return d}const i={...a,clientSubmissionId:a.clientSubmissionId??A0()};return sessionStorage.setItem(`${lo}${t}:${i.clientSubmissionId}`,JSON.stringify(i)),i}function CN(t,a){try{sessionStorage.removeItem(`${lo}${t}:${a}`)}catch{}}const Me={all:["team-runs"],memberPresets:["member-presets"],memberPresetDetail:t=>["member-presets","detail",t],teamTemplates:["team-templates"],teamTemplateDetail:t=>["team-templates","detail",t],task:t=>["team-runs","task",t],detail:t=>["team-runs","detail",t],messages:t=>["team-runs","messages",t],messageDetail:(t,a)=>["team-runs","messages",t,a],workRequests:t=>["team-runs","work-requests",t],invocations:t=>["team-runs","invocations",t]},N0=5e3,AN=45e3;function _0(t,a){const i=t??[],o=i.findIndex(c=>c.id===a.id);return o>=0?i.map((c,d)=>d===o?a:c):[...i,a]}function gv(t,a){return!t||t.id!==a.teamRunId?t:{...t,messages:_0(t.messages,a)}}function O0(t,a){const i=t.getQueryData(Me.detail(a));if(i?.taskId)return i.taskId;const o=t.getQueriesData({queryKey:Me.all});for(const[,c]of o)if(c?.id===a&&c.taskId)return c.taskId}function ss(t,a){const i=O0(t,a);t.invalidateQueries({queryKey:Me.all}),t.invalidateQueries({queryKey:Me.detail(a)}),t.invalidateQueries({queryKey:Me.workRequests(a)}),t.invalidateQueries({queryKey:Me.invocations(a)}),t.invalidateQueries({queryKey:le.tasks.all}),t.invalidateQueries({queryKey:le.workspaces.all}),i&&(t.invalidateQueries({queryKey:le.tasks.detail(i)}),t.invalidateQueries({queryKey:Me.task(i)}),t.invalidateQueries({queryKey:le.workspaces.list(i)}))}function aO(){return ln({queryKey:Me.memberPresets,queryFn:()=>Be.get("/member-presets")})}function rO(){const t=rt();return gt({mutationFn:a=>Be.post("/member-presets",a),onSuccess:()=>{t.invalidateQueries({queryKey:Me.memberPresets}),t.invalidateQueries({queryKey:Me.teamTemplates})}})}function iO(){const t=rt();return gt({mutationFn:({id:a,data:i})=>Be.patch(`/member-presets/${a}`,i),onSuccess:(a,i)=>{t.invalidateQueries({queryKey:Me.memberPresets}),t.invalidateQueries({queryKey:Me.memberPresetDetail(i.id)}),t.invalidateQueries({queryKey:Me.teamTemplates})}})}function sO(){const t=rt();return gt({mutationFn:a=>Be.delete(`/member-presets/${a}`),onSuccess:()=>{t.invalidateQueries({queryKey:Me.memberPresets}),t.invalidateQueries({queryKey:Me.teamTemplates})}})}function oO(){return ln({queryKey:Me.teamTemplates,queryFn:()=>Be.get("/team-templates")})}function lO(){const t=rt();return gt({mutationFn:a=>Be.post("/team-templates",a),onSuccess:()=>{t.invalidateQueries({queryKey:Me.teamTemplates})}})}function cO(){const t=rt();return gt({mutationFn:({id:a,data:i})=>Be.patch(`/team-templates/${a}`,i),onSuccess:(a,i)=>{t.invalidateQueries({queryKey:Me.teamTemplates}),t.invalidateQueries({queryKey:Me.teamTemplateDetail(i.id)})}})}function uO(){const t=rt();return gt({mutationFn:a=>Be.delete(`/team-templates/${a}`),onSuccess:()=>{t.invalidateQueries({queryKey:Me.teamTemplates})}})}function dO(){const t=rt();return gt({mutationFn:async({taskId:a,...i})=>{const o=wN(a,i);try{const c=await Be.post(`/tasks/${a}/team-runs`,o);return mv(a,o.clientSubmissionId),c}catch(c){throw c instanceof ns&&[400,401,403,404,409,422,429].includes(c.status)&&mv(a,o.clientSubmissionId),c}},onSuccess:(a,i)=>{if("operationId"in a){k0(t,a.delivery),t.invalidateQueries({queryKey:Me.task(i.taskId)});return}t.setQueryData(Me.task(i.taskId),a),t.setQueryData(Me.detail(a.id),a),t.setQueryData(Me.messages(a.id),a.messages??[]),t.setQueryData(Me.workRequests(a.id),a.workRequests??[]),t.setQueryData(Me.invocations(a.id),a.invocations??[]),t.invalidateQueries({queryKey:Me.task(i.taskId)}),t.invalidateQueries({queryKey:Me.all}),t.invalidateQueries({queryKey:le.tasks.all}),t.invalidateQueries({queryKey:le.tasks.detail(i.taskId)}),t.invalidateQueries({queryKey:le.workspaces.all}),t.invalidateQueries({queryKey:le.workspaces.list(i.taskId)})},onError:(a,i)=>{t.invalidateQueries({queryKey:Me.task(i.taskId)}),t.invalidateQueries({queryKey:Me.all})}})}function fO(t){return ln({queryKey:Me.task(t),queryFn:async()=>{try{return await Be.get(`/tasks/${t}/team-run`)}catch(a){if(a instanceof ns&&a.status===404)return null;throw a}},enabled:!!t,retry:!1,refetchInterval:a=>a.state.data?N0:!1})}function hO(t){return ln({queryKey:Me.messages(t),queryFn:async()=>{try{return await Be.get(`/team-runs/${t}/messages`)}catch(a){if(a instanceof ns&&a.status===404)return[];throw a}},enabled:!!t,retry:!1,refetchInterval:N0})}function mO(t,a,i=!1){return ln({queryKey:Me.messageDetail(t,a),queryFn:()=>Be.get(`/team-runs/${t}/messages/${a}`),enabled:!!(t&&a&&i),retry:!1})}function pO(t){const a=rt();return gt({mutationFn:async i=>{const o=TN(t,i),c=await Be.post(`/team-runs/${t}/messages`,o);return CN(t,o.clientSubmissionId),c},onSuccess:i=>{if("operationId"in i){k0(a,i.delivery),a.invalidateQueries({queryKey:Me.all});return}a.setQueryData(Me.messages(t),c=>_0(c,i)),a.setQueryData(Me.detail(t),c=>gv(c,i));const o=O0(a,t);o&&a.setQueryData(Me.task(o),c=>gv(c,i)),a.invalidateQueries({queryKey:Me.all}),a.invalidateQueries({queryKey:["tasks"]}),a.invalidateQueries({queryKey:le.workspaces.all})}})}function gO(t){const a=rt();return gt({mutationFn:i=>Be.post(`/team-runs/${t}/members`,i),onSuccess:()=>{ss(a,t)}})}function yO(t){const a=rt();return gt({mutationFn:({memberId:i,data:o})=>Be.patch(`/team-runs/${t}/members/${i}`,o),onSuccess:()=>{ss(a,t)}})}function vO(t){const a=rt();return gt({mutationFn:({memberId:i,stopActive:o=!0,cancelQueued:c=!0})=>Be.post(`/team-runs/${t}/members/${i}/remove`,{stopActive:o,cancelQueued:c}),onSuccess:()=>{ss(a,t)}})}function bO(t){const a=rt();return gt({mutationFn:i=>Be.post(`/team-runs/work-requests/${i}/approve`),onSuccess:()=>{ss(a,t)}})}function xO(t){const a=rt();return gt({mutationFn:i=>Be.post(`/team-runs/work-requests/${i}/reject`),onSuccess:()=>{ss(a,t)}})}function SO(t){const a=rt();return gt({mutationFn:async({memberId:i,cancelQueued:o})=>{try{return await Be.post(`/team-runs/${t}/members/${i}/stop`,{cancelQueued:o},{signal:AbortSignal.timeout(AN)})}catch(c){throw c instanceof DOMException&&c.name==="TimeoutError"?new Error("Stop request timed out before the server answered. Refresh the team status and retry."):c}},onSuccess:()=>{ss(a,t)}})}function va(t,a){return t.scopes.includes(a)}function RN(){const t=rt();S.useEffect(()=>{const a=go.connect(),i=d=>{if(!d){t.invalidateQueries({queryKey:Me.all});return}t.invalidateQueries({queryKey:Me.detail(d.teamRunId)}),(va(d,"team-run")||va(d,"team-members"))&&t.invalidateQueries({queryKey:Me.all}),va(d,"room-messages")&&t.invalidateQueries({queryKey:Me.messages(d.teamRunId)}),va(d,"work-requests")&&t.invalidateQueries({queryKey:Me.workRequests(d.teamRunId)}),va(d,"agent-invocations")&&t.invalidateQueries({queryKey:Me.invocations(d.teamRunId)}),d.taskId&&t.invalidateQueries({queryKey:Me.task(d.taskId)}),d.taskId&&(va(d,"task")||va(d,"team-run"))&&t.invalidateQueries({queryKey:le.tasks.detail(d.taskId)}),d.projectId&&(va(d,"task")||va(d,"team-run"))&&(t.invalidateQueries({queryKey:le.tasks.list(d.projectId)}),t.invalidateQueries({queryKey:le.tasks.boardAll})),va(d,"workspaces")&&(t.invalidateQueries({queryKey:le.workspaces.all}),d.taskId&&t.invalidateQueries({queryKey:le.workspaces.list(d.taskId)}))},o=()=>i(),c=d=>i(d);return a.on("connect",o),a.on(Er.TEAM_RUN_INVALIDATED,c),()=>{a.off("connect",o),a.off(Er.TEAM_RUN_INVALIDATED,c)}},[t])}const kN=pb(t=>({visibleContext:null,setVisibleContext:a=>t({visibleContext:a})}));function NN(t){t.invalidateQueries({queryKey:le.git.all,refetchType:"none"}),t.invalidateQueries({queryKey:["workspaces","gitStatus"],refetchType:"none"}),t.invalidateQueries({queryKey:["workspaces","diff"],refetchType:"none"})}function _N(t,a){a.workingDir&&(t.invalidateQueries({queryKey:le.git.changes(a.workingDir),refetchType:"none"}),t.invalidateQueries({queryKey:le.git.log(a.workingDir),refetchType:"none"})),a.workspaceId&&t.invalidateQueries({queryKey:le.workspaces.gitStatus(a.workspaceId),refetchType:"none"})}function yv(t,a,i){if(!(!a?.workspaceId||!a?.workingDir)){if(a.reason==="base-branch"&&(t.invalidateQueries({queryKey:le.workspaces.detail(a.workspaceId)}),a.taskId&&t.invalidateQueries({queryKey:le.workspaces.list(a.taskId)}),a.projectId&&t.invalidateQueries({queryKey:le.workspaces.projectBranches(a.projectId)}),t.invalidateQueries({queryKey:le.tasks.all}),t.invalidateQueries({queryKey:le.workspaces.diff(a.workspaceId)}),t.invalidateQueries({queryKey:["git","diff",a.workingDir]})),!i||i.workspaceId!==a.workspaceId||i.workingDir!==a.workingDir){_N(t,a);return}if(i.tab==="changes"){t.invalidateQueries({queryKey:le.git.changes(a.workingDir)}),t.invalidateQueries({queryKey:le.workspaces.gitStatus(a.workspaceId)}),t.invalidateQueries({queryKey:le.git.log(a.workingDir),refetchType:"none"});return}t.invalidateQueries({queryKey:le.git.log(a.workingDir)}),t.invalidateQueries({queryKey:le.git.changes(a.workingDir),refetchType:"none"}),t.invalidateQueries({queryKey:le.workspaces.gitStatus(a.workspaceId),refetchType:"none"})}}function ON(){const t=rt(),a=kN(i=>i.visibleContext);S.useEffect(()=>{const i=go.connect(),o=()=>{NN(t);for(const d of["list","detail","project-branches"])t.invalidateQueries({queryKey:["workspaces",d]});a&&yv(t,{workspaceId:a.workspaceId,workingDir:a.workingDir},a)},c=d=>{yv(t,d,a)};return i.on("connect",o),i.on(Er.WORKSPACE_GIT_CHANGED,c),()=>{i.off("connect",o),i.off(Er.WORKSPACE_GIT_CHANGED,c)}},[t,a])}function MN(){return SN(),RN(),ON(),null}function DN({className:t,type:a="text",...i}){return m.jsx("input",{type:a,"data-slot":"input",className:ye("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",t),...i})}let M0=0;const wO=()=>M0;async function D0(t){M0++;const a=t.cancelQueries({queryKey:le.roomTranslations.all});t.removeQueries({queryKey:le.roomTranslations.all}),await a}function jN(){return ln({queryKey:le.accessAuth.status,queryFn:()=>Be.get("/access-auth/status"),retry:!1})}function EO(t=!0){return ln({queryKey:le.accessAuth.settings,queryFn:()=>Be.get("/access-auth/settings"),enabled:t})}function zN(){const t=rt();return gt({mutationKey:le.accessAuth.identityChange,onMutate:()=>Promise.all([D0(t),t.cancelQueries({queryKey:le.accessAuth.conflictRecoveryIdentity})]),onSettled:()=>t.resetQueries({queryKey:le.accessAuth.conflictRecoveryIdentity}),mutationFn:a=>Be.post("/access-auth/login",{password:a}),onSuccess:a=>{t.setQueryData(le.accessAuth.status,a),t.invalidateQueries()}})}function TO(){const t=rt();return gt({mutationKey:le.accessAuth.identityChange,onMutate:()=>Promise.all([D0(t),t.cancelQueries({queryKey:le.accessAuth.conflictRecoveryIdentity})]),onSettled:()=>t.resetQueries({queryKey:le.accessAuth.conflictRecoveryIdentity}),mutationFn:()=>Be.post("/access-auth/logout",{}),onSuccess:a=>{t.setQueryData(le.accessAuth.status,a),t.invalidateQueries()}})}function CO(){const t=rt();return gt({mutationFn:a=>Be.put("/access-auth/settings",a),onSuccess:()=>{t.invalidateQueries({queryKey:le.accessAuth.status}),t.invalidateQueries({queryKey:le.accessAuth.settings})}})}function LN(){return m.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background text-foreground",children:m.jsx(Ar,{size:18,className:"animate-spin text-muted-foreground motion-reduce:animate-none","aria-hidden":"true"})})}function UN(){const[t,a]=S.useState(""),i=zN(),o=i.isError?la("密码不正确,请重试"):null;return m.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-foreground",children:m.jsxs("form",{className:"w-full max-w-sm space-y-5",onSubmit:c=>{c.preventDefault();const d=t;d&&i.mutate(d)},children:[m.jsxs("div",{className:"space-y-2 text-center",children:[m.jsx("div",{className:"mx-auto flex h-10 w-10 items-center justify-center rounded-lg bg-muted text-muted-foreground",children:m.jsx(vC,{size:18,"aria-hidden":"true"})}),m.jsx("h1",{className:"text-[22px] font-semibold tracking-tight",children:"Agent Tower"}),m.jsx("p",{className:"text-sm text-muted-foreground",children:la("输入访问密码继续")})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(DN,{type:"password",autoFocus:!0,autoComplete:"current-password",value:t,onChange:c=>{a(c.target.value),i.reset()},"aria-invalid":!!o,placeholder:la("访问密码")}),o&&m.jsx("p",{className:"text-xs text-destructive-ink",children:o})]}),m.jsxs(xa,{className:"w-full",type:"submit",disabled:!t||i.isPending,children:[i.isPending&&m.jsx(Ar,{size:14,className:"mr-2 animate-spin motion-reduce:animate-none","aria-hidden":"true"}),i.isPending?la("验证中..."):la("解锁")]})]})})}function BN({children:t}){const{data:a,isLoading:i,isError:o}=jN();return i?m.jsx(LN,{}):o?m.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-sm text-muted-foreground",children:la("访问状态加载失败,请刷新后重试。")}):a?.enabled&&!a.authenticated?m.jsx(UN,{}):m.jsx(m.Fragment,{children:t})}function qN(){return S.useEffect(()=>(go.connect(),()=>go.disconnect()),[]),m.jsxs(ZC,{children:[m.jsxs(a2,{children:[m.jsx(MN,{}),m.jsx(C2,{})]}),m.jsx(Gf,{source:"toaster",fallback:()=>null,children:m.jsx(rw,{position:"top-center",toastOptions:{className:"text-sm",style:{fontFamily:"inherit"},classNames:{toast:"!bg-inverse !text-inverse-foreground !border-inverse !shadow-overlay",description:"!text-inverse-muted"}}})})]})}function PN(){return m.jsx(r2,{children:m.jsx(bS,{client:iw,children:m.jsx(BN,{children:m.jsx(qN,{})})})})}const IN="/api/tunnel/bootstrap";async function HN(){const t=new URL(window.location.href),a=t.searchParams.get("token");if(!a)return;const i=await fetch(`${IN}?token=${encodeURIComponent(a)}`,{method:"POST",credentials:"same-origin"});if(!i.ok)throw new Error(`Tunnel bootstrap failed (${i.status})`);t.searchParams.delete("token"),window.history.replaceState({},"",t.toString())}async function QN(){try{await HN()}catch(t){console.error("[Tunnel] Failed to bootstrap tunnel session",t)}X1.createRoot(document.getElementById("root")).render(m.jsx(S.StrictMode,{children:m.jsx(PN,{})}))}QN();export{uO as $,Zk as A,xa as B,XA as C,Gb as D,VA as E,Hb as F,G_ as G,K_ as H,DN as I,_t as J,WN as K,X_ as L,ns as M,cc as N,hC as O,If as P,Ar as Q,o2 as R,ER as S,aO as T,oO as U,rO as V,iO as W,Bf as X,sO as Y,lO as Z,cO as _,QC as a,PR as a$,VR as a0,F_ as a1,UC as a2,sk as a3,YT as a4,Ji as a5,WT as a6,Y_ as a7,ne as a8,NC as a9,MC as aA,po as aB,Ef as aC,l_ as aD,d_ as aE,u_ as aF,f_ as aG,c_ as aH,k0 as aI,Nk as aJ,a0 as aK,RE as aL,EC as aM,io as aN,ob as aO,e_ as aP,xC as aQ,V_ as aR,dC as aS,Gf as aT,Bd as aU,__ as aV,O_ as aW,Pb as aX,t_ as aY,$t as aZ,Se as a_,n_ as aa,Rr as ab,go as ac,Er as ad,N_ as ae,dO as af,NR as ag,CR as ah,fO as ai,hO as aj,pO as ak,J_ as al,Xy as am,$y as an,kN as ao,bb as ap,Zy as aq,Me as ar,fc as as,PT as at,RC as au,KT as av,ca as aw,mc as ax,$T as ay,la as az,$b as b,ZR as b$,QR as b0,M_ as b1,mb as b2,hb as b3,YR as b4,fb as b5,wo as b6,A0 as b7,VN as b8,af as b9,LR as bA,Ky as bB,rf as bC,a_ as bD,i_ as bE,m_ as bF,y_ as bG,g_ as bH,p_ as bI,v_ as bJ,h_ as bK,b_ as bL,BR as bM,x_ as bN,s_ as bO,mR as bP,E_ as bQ,j_ as bR,z_ as bS,A_ as bT,AR as bU,T_ as bV,C_ as bW,r_ as bX,UR as bY,nk as bZ,D_ as b_,es as ba,JN as bb,vv as bc,k_ as bd,R_ as be,Fa as bf,zR as bg,L_ as bh,Zb as bi,JR as bj,av as bk,Xn as bl,ef as bm,CC as bn,U_ as bo,PA as bp,Fy as bq,$_ as br,tO as bs,eO as bt,W_ as bu,cn as bv,OS as bw,ub as bx,fR as by,Qb as bz,at as c,WR as c0,hR as c1,q_ as c2,B_ as c3,P_ as c4,ek as c5,w_ as c6,S_ as c7,SR as c8,o_ as c9,XN as cA,qC as cB,dS as cC,ey as cD,GN as cE,KN as cF,_S as cG,On as cH,EN as cI,jy as cJ,KR as cK,qA as cL,$C as cM,pb as cN,gR as ca,XR as cb,FR as cc,xR as cd,u0 as ce,GR as cf,oC as cg,s2 as ch,Sv as ci,Pt as cj,R0 as ck,wO as cl,SO as cm,CN as cn,nO as co,bO as cp,xO as cq,vC as cr,mO as cs,gO as ct,yO as cu,vO as cv,ev as cw,FN as cx,ZN as cy,PC as cz,$N as d,EO as e,KC as f,CO as g,TO as h,ik as i,m as j,I_ as k,Q_ as l,H_ as m,ye as n,ln as o,gt as p,rt as q,S as r,le as s,Gi as t,Jt as u,Be as v,HT as w,$A as x,iR as y,Ib as z};